[
  {
    "path": "Agents/AgentHost.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Diagnostics;\r\nusing System.Windows;\r\nusing PhoneVoIPApp.BackEnd;\r\nusing PhoneVoIPApp.BackEnd.OutOfProcess;\r\n\r\nnamespace PhoneVoIPApp.Agents\r\n{\r\n    /// <summary>\r\n    /// A static class that does process-level initialization/deinitializations.\r\n    /// </summary>\r\n    public static class AgentHost\r\n    {\r\n        #region Methods\r\n\r\n        /// <summary>\r\n        /// Indicates that an agent started running.\r\n        /// </summary>\r\n        internal static void OnAgentStarted()\r\n        {\r\n            // Initialize the native code - this only needs to be done once per process,s\r\n            // but the method below will effectively be a no-op if called more than once.\r\n            BackEnd.Globals.Instance.StartServer(RegistrationHelper.OutOfProcServerClassNames);\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Private members\r\n\r\n        /// <summary>\r\n        /// Class constructor\r\n        /// </summary>\r\n        static AgentHost()\r\n        {\r\n            // Subscribe to the unhandled exception event\r\n            Deployment.Current.Dispatcher.BeginInvoke(delegate\r\n            {\r\n                Application.Current.UnhandledException += AgentHost.OnUnhandledException;\r\n            });\r\n\r\n            // Create the singleton video renderer\r\n            AgentHost.videoRenderer = new VideoRenderer();\r\n\r\n            AgentHost.mtProtoUpdater = new MTProtoUpdater();\r\n\r\n            // Store a pointer to the video renderer in the native Globals singleton,\r\n            // so that the renderer can be used by native code in this process.\r\n            Globals.Instance.VideoRenderer = AgentHost.videoRenderer;\r\n\r\n            Globals.Instance.MTProtoUpdater = AgentHost.mtProtoUpdater;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Code to execute on unhandled exceptions.\r\n        /// </summary>\r\n        private static void OnUnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)\r\n        {\r\n            Debug.WriteLine(\"[AgentHost] An unhandled exception of type {0} has occurred. Error code: 0x{1:X8}. Message: {2}\",\r\n                e.ExceptionObject.GetType(), e.ExceptionObject.HResult, e.ExceptionObject.Message);\r\n\r\n            if (Debugger.IsAttached)\r\n            {\r\n                // An unhandled exception has occurred; break into the debugger\r\n                Debugger.Break();\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Private\r\n\r\n        // The singleton video renderer\r\n        static VideoRenderer videoRenderer;\r\n\r\n        static MTProtoUpdater mtProtoUpdater;\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "Agents/Agents.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{820034C1-645D-4340-8813-D980C1EF77DE}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>PhoneVoIPApp.Agents</RootNamespace>\r\n    <AssemblyName>PhoneVoIPApp.Agents</AssemblyName>\r\n    <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>\r\n    <TargetFrameworkVersion>v8.1</TargetFrameworkVersion>\r\n    <SilverlightVersion>\r\n    </SilverlightVersion>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <TargetFrameworkProfile />\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|x86' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\x86\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <PlatformTarget />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|x86' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\x86\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <PlatformTarget />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|ARM' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\ARM\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <PlatformTarget />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|ARM' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\ARM\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <PlatformTarget />\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"AgentHost.cs\" />\r\n    <Compile Include=\"CallInProgressAgentImpl.cs\" />\r\n    <Compile Include=\"ForegroundLifetimeAgentImpl.cs\" />\r\n    <Compile Include=\"MTProtoUpdater.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"PushPayload.cs\" />\r\n    <Compile Include=\"PushUtils.cs\" />\r\n    <Compile Include=\"RegistrationHelper.cs\" />\r\n    <Compile Include=\"ScheduledAgentImpl.cs\" />\r\n    <Compile Include=\"VideoMediaStreamSource.cs\" />\r\n    <Compile Include=\"VideoRenderer.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"PushPayload.xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\BackEnd\\BackEnd.vcxproj\">\r\n      <Project>{C8D75245-FFCF-4932-A228-C9CC8BB60B03}</Project>\r\n      <Name>BackEnd</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\Telegram.Api.WP8\\Telegram.Api.WP8.csproj\">\r\n      <Project>{e79d5093-8038-4a5f-8a98-ca38c0d0886f}</Project>\r\n      <Name>Telegram.Api.WP8</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "Agents/CallInProgressAgentImpl.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Threading;\r\nusing Microsoft.Phone.Networking.Voip;\r\nusing PhoneVoIPApp.BackEnd;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Connection;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Updates;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace PhoneVoIPApp.Agents\r\n{\r\n    /// <summary>\r\n    /// An agent that is launched when the first call becomes active and is canceled when the last call ends.\r\n    /// </summary>\r\n    public class CallInProgressAgentImpl : VoipCallInProgressAgent\r\n    {\r\n        public static bool Suppress { get; set; }\r\n\r\n        private bool _logEnabled = true;\r\n\r\n        private void Log(string message, Action callback = null)\r\n        {\r\n            if (!_logEnabled) return;\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"[CallInProgressAgentImpl] {0} {1}\", GetHashCode(), message), callback.SafeInvoke);\r\n#if DEBUG\r\n            //PushUtils.AddToast(\"push\", message, string.Empty, string.Empty, null, null);\r\n#endif\r\n        }\r\n\r\n        private readonly object _initConnectionSyncRoot = new object();\r\n\r\n        private TLInitConnection GetInitConnection()\r\n        {\r\n            return TLUtils.OpenObjectFromMTProtoFile<TLInitConnection>(_initConnectionSyncRoot, Constants.InitConnectionFileName) ??\r\n                new TLInitConnection78\r\n                {\r\n                    Flags = new TLInt(0),\r\n                    DeviceModel = new TLString(\"unknown\"),\r\n                    AppVersion = new TLString(\"background task\"),\r\n                    SystemVersion = new TLString(\"8.10.0.0\")\r\n                };\r\n        }\r\n\r\n        private static IMTProtoService _mtProtoService;\r\n\r\n        private static IMTProtoService MTProtoService\r\n        {\r\n            get\r\n            {\r\n                return _mtProtoService;\r\n\r\n            }\r\n            set\r\n            {\r\n                _mtProtoService = value;\r\n\r\n            }\r\n        }\r\n\r\n        private static ITransportService _transportService;\r\n\r\n        private void InitializeServiceAsync(System.Action callback)\r\n        {\r\n            Debug.WriteLine(\"[CallInProgressAgentImpl {0}] _mtProtoService == null {1}\", GetHashCode(), _mtProtoService == null);\r\n\r\n            if (MTProtoService == null)\r\n            {\r\n                var deviceInfoService = new Telegram.Api.Services.DeviceInfo.DeviceInfoService(GetInitConnection(), true, \"BackgroundDifferenceLoader\", 1);\r\n                var cacheService = new MockupCacheService();\r\n                var updatesService = new MockupUpdatesService();\r\n\r\n                _transportService = new TransportService();\r\n                var connectionService = new ConnectionService(deviceInfoService);\r\n                var publicConfigService = new MockupPublicConfigService();\r\n\r\n                var mtProtoService = new MTProtoService(deviceInfoService, updatesService, cacheService, _transportService, connectionService, publicConfigService);\r\n                mtProtoService.Initialized += (o, e) =>\r\n                {\r\n                    //Log(string.Format(\"[MTProtoUpdater {0}] Initialized\", GetHashCode()));\r\n                    Thread.Sleep(1000);\r\n                    callback.SafeInvoke();\r\n                };\r\n                mtProtoService.InitializationFailed += (o, e) =>\r\n                {\r\n                    //Log(string.Format(\"[MTProtoUpdater {0}] InitializationFailed\", GetHashCode()));\r\n                };\r\n                mtProtoService.Initialize();\r\n\r\n                MTProtoService = mtProtoService;\r\n            }\r\n            else\r\n            {\r\n                callback.SafeInvoke();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Constructor\r\n        /// </summary>\r\n        public CallInProgressAgentImpl()\r\n            : base()\r\n        {\r\n            _timer = new Timer(OnTimer);\r\n        }\r\n\r\n        private Timer _timer;\r\n\r\n        private void OnTimer(object state)\r\n        {\r\n            Log(string.Format(\"OnTimer call_id={0} suppress={1}\", Globals.Instance.CallController != null ? Globals.Instance.CallController.CallId.ToString() : \"null\", Suppress));\r\n            Debug.WriteLine(\"[CallInProgressAgentImpl {0}] OnTick.\", GetHashCode());\r\n\r\n            //InitializeServiceAsync(() =>\r\n            //{\r\n            //    var getStateAction = new TLGetState();\r\n            //    var actions = new List<TLObject> { getStateAction };\r\n            //    MTProtoService.SendActionsAsync(actions, (request, result) =>\r\n            //        {\r\n            //            Log(\"[CallInProgressAgentImpl] getState result=\" + result);\r\n            //        },\r\n            //        error =>\r\n            //        {\r\n            //            Log(\"[CallInProgressAgentImpl] getState error=\" + error);\r\n            //        });\r\n            //});\r\n        }\r\n\r\n        /// <summary>\r\n        /// The first call has become active.\r\n        /// </summary>\r\n        protected override void OnFirstCallStarting()\r\n        {\r\n            Debug.WriteLine(\"[CallInProgressAgentImpl {0}] The first call has started.\", GetHashCode());\r\n\r\n            Log(\"Start timer\");\r\n            // Indicate that an agent has started running\r\n            AgentHost.OnAgentStarted();\r\n            _timer.Change(TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(5.0));\r\n        }\r\n\r\n        /// <summary>\r\n        /// The last call has ended.\r\n        /// </summary>\r\n        protected override void OnCancel()\r\n        {\r\n            Debug.WriteLine(\"[CallInProgressAgentImpl {0}] The last call has ended. Calling NotifyComplete\", GetHashCode());\r\n\r\n            if (MTProtoService != null) MTProtoService.Stop();\r\n            Log(\"Stop timer\");\r\n            _timer.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);\r\n\r\n            // This agent is done\r\n            base.NotifyComplete();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Agents/ForegroundLifetimeAgentImpl.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Microsoft.Phone.Networking.Voip;\r\nusing System.Diagnostics;\r\nusing System.Threading;\r\nusing Microsoft.Phone.Scheduler;\r\n\r\nnamespace PhoneVoIPApp.Agents\r\n{\r\n    /// <summary>\r\n    /// An agent that is invoked when the UI process calls Microsoft.Phone.Networking.Voip.VoipBackgroundProcess.Launched()\r\n    /// and is canceled when the UI leaves the foreground.\r\n    /// </summary>\r\n    public sealed class ForegroundLifetimeAgentImpl : VoipForegroundLifetimeAgent\r\n    {\r\n        public ForegroundLifetimeAgentImpl()\r\n            : base()\r\n        {\r\n\r\n        }\r\n\r\n        /// <summary>\r\n        /// A method that is called as a result of \r\n        /// </summary>\r\n        protected override void OnLaunched()\r\n        {\r\n            Debug.WriteLine(\"[ForegroundLifetimeAgentImpl] The UI has entered the foreground.\");\r\n\r\n            // Indicate that an agent has started running\r\n            AgentHost.OnAgentStarted();\r\n        }\r\n\r\n        protected override void OnCancel()\r\n        {\r\n            Debug.WriteLine(\"[ForegroundLifetimeAgentImpl] The UI is leaving the foreground\");\r\n            \r\n            // Make sure that this process has finished becoming ready before trying to complete this agent.\r\n            // Otherwise, the process may exit without telling the UI that it is ready (and therefore make the UI unresponsive)\r\n            uint currentProcessId = PhoneVoIPApp.BackEnd.Globals.GetCurrentProcessId();\r\n            string backgroundProcessReadyEventName = PhoneVoIPApp.BackEnd.Globals.GetBackgroundProcessReadyEventName(currentProcessId);\r\n            using (EventWaitHandle backgroundProcessReadyEvent = new EventWaitHandle(initialState: false, mode: EventResetMode.ManualReset, name: backgroundProcessReadyEventName))\r\n            {\r\n                backgroundProcessReadyEvent.WaitOne();\r\n                Debug.WriteLine(\"[ForegroundLifetimeAgentImpl] Background process {0} is ready\", currentProcessId);\r\n            }\r\n\r\n            // This agent is done\r\n            Debug.WriteLine(\"[ForegroundLifetimeAgentImpl] Calling NotifyComplete\");\r\n            base.NotifyComplete();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Agents/MTProtoUpdater.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing PhoneVoIPApp.BackEnd;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace PhoneVoIPApp.Agents\r\n{\r\n    internal class MTProtoUpdater : IMTProtoUpdater, IHandle<TLUpdateBase>\r\n    {\r\n        private static bool _logEnabled = true;\r\n\r\n        private static readonly int _id = new Random().Next(999);\r\n\r\n        private static void Log(string message, Action callback = null)\r\n        {\r\n            if (!_logEnabled) return;\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"::MTProtoUpdater {0} {1}\", _id, message), callback.SafeInvoke);\r\n#if DEBUG\r\n            //PushUtils.AddToast(\"push\", message, string.Empty, string.Empty, null, null);\r\n#endif\r\n        }\r\n\r\n        private readonly object _initConnectionSyncRoot = new object();\r\n\r\n        private TLInitConnection GetInitConnection()\r\n        {\r\n            return TLUtils.OpenObjectFromMTProtoFile<TLInitConnection>(_initConnectionSyncRoot, Constants.InitConnectionFileName) ??\r\n                new TLInitConnection\r\n                {\r\n                    DeviceModel = new TLString(\"unknown\"),\r\n                    AppVersion = new TLString(\"background task\"),\r\n                    SystemVersion = new TLString(\"8.10.0.0\")\r\n                };\r\n        }\r\n\r\n        public void Start(int pts, int date, int qts)\r\n        {\r\n            Log(string.Format(\"[MTProtoUpdater {0}] Start timer\", GetHashCode()));\r\n\r\n            CallInProgressAgentImpl.Suppress = true;\r\n        }\r\n\r\n        public void Stop()\r\n        {\r\n            Log(string.Format(\"[MTProtoUpdater {0}] Stop timer\", GetHashCode()));\r\n\r\n            CallInProgressAgentImpl.Suppress = false;\r\n        }\r\n\r\n        public void ReceivedCall(long id, long accessHash)\r\n        {\r\n        }\r\n\r\n        public void DiscardCall(long id, long accessHash)\r\n        {\r\n\r\n        }\r\n\r\n        public static void Handle(TLUpdateBase updateBase)\r\n        {\r\n            var updatePhoneCall = updateBase as TLUpdatePhoneCall;\r\n            if (updatePhoneCall != null)\r\n            {\r\n                var phoneCallDiscarded = updatePhoneCall.PhoneCall as TLPhoneCallDiscarded61;\r\n                //if (phoneCallDiscarded != null && Globals.Instance.CallController.CallId == phoneCallDiscarded.Id.Value)\r\n                //{\r\n                //    Globals.Instance.CallController.EndCall();\r\n                //}\r\n            }\r\n\r\n            //Globals.Instance.CallController.HandleUpdatePhoneCall();\r\n        }\r\n\r\n        void IHandle<TLUpdateBase>.Handle(TLUpdateBase message)\r\n        {\r\n            Handle(message);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Agents/Properties/AssemblyInfo.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Agents\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Agents\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2012\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"77ef4b49-898d-4cfc-b8d7-ef7338a0da79\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "Agents/PushPayload.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace PhoneVoIPApp.Agents {\r\n    using System.Xml.Serialization;\r\n    \r\n    \r\n    /// <remarks/>\r\n    [System.CodeDom.Compiler.GeneratedCodeAttribute(\"xsd\", \"4.0.30319.17613\")]\r\n    [System.Diagnostics.DebuggerStepThroughAttribute()]\r\n    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace=\"WPNotification\")]\r\n    [System.Xml.Serialization.XmlRootAttribute(Namespace=\"WPNotification\", IsNullable=false)]\r\n    public partial class Notification {\r\n        \r\n        private string nameField;\r\n        \r\n        /// <remarks/>\r\n        [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]\r\n        public string Name {\r\n            get {\r\n                return this.nameField;\r\n            }\r\n            set {\r\n                this.nameField = value;\r\n            }\r\n        }\r\n\r\n        private string numberField;\r\n        \r\n        /// <remarks/>\r\n        [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]\r\n        public string Number {\r\n            get {\r\n                return this.numberField;\r\n            }\r\n            set {\r\n                this.numberField = value;\r\n            }\r\n        }\r\n\r\n        private string locKey;\r\n\r\n        /// <remarks/>\r\n        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]\r\n        public string LocKey\r\n        {\r\n            get\r\n            {\r\n                return this.locKey;\r\n            }\r\n            set\r\n            {\r\n                this.locKey = value;\r\n            }\r\n        }\r\n\r\n        private string locArguments;\r\n\r\n        /// <remarks/>\r\n        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]\r\n        public string LocArguments\r\n        {\r\n            get\r\n            {\r\n                return this.locArguments;\r\n            }\r\n            set\r\n            {\r\n                this.locArguments = value;\r\n            }\r\n        }\r\n\r\n        private string data;\r\n\r\n        /// <remarks/>\r\n        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]\r\n        public string Data\r\n        {\r\n            get\r\n            {\r\n                return this.data;\r\n            }\r\n            set\r\n            {\r\n                this.data = value;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Agents/PushPayload.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<wp:Notification xmlns:wp=\"WPNotification\">\r\n  <Name>Kim Abercrombie</Name>\r\n  <Number>+1-555-555-1234</Number>\r\n</wp:Notification>\r\n"
  },
  {
    "path": "Agents/PushUtils.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define INTERACTIVE_NOTIFICATIONS\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Runtime.Serialization.Json;\r\nusing System.Text;\r\nusing System.Text.RegularExpressions;\r\nusing System.Threading.Tasks;\r\nusing Windows.Data.Xml.Dom;\r\nusing Windows.Storage;\r\n#if WNS_PUSH_SERVICE\r\nusing Windows.UI.Notifications;\r\n#endif\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace PhoneVoIPApp.Agents\r\n{\r\n    public static class PushUtils2\r\n    {\r\n\r\n        private static readonly Dictionary<string, string> _locKeys = new Dictionary<string, string>\r\n        {\r\n            {\"PINNED_AUDIO\", \"pinned a voice message\"},\r\n            {\"PINNED_CONTACT\", \"pinned a contact\"},\r\n            {\"PINNED_DOC\", \"pinned a file\"},\r\n            {\"PINNED_GAME\", \"pinned a game\"},\r\n            {\"PINNED_GEO\", \"pinned a map\"},\r\n            {\"PINNED_GIF\", \"pinned a GIF\"},\r\n            {\"PINNED_INVOICE\", \"pinned an invoice\"},\r\n            {\"PINNED_NOTEXT\", \"pinned a message\"},\r\n            {\"PINNED_PHOTO\", \"pinned a photo\"},\r\n            {\"PINNED_STICKER\", \"pinned a sticker\"},\r\n            {\"PINNED_TEXT\", \"pinned \\\"{1}\\\"\"},\r\n            {\"PINNED_VIDEO\", \"pinned a video\"},\r\n\r\n            {\"MESSAGE_FWDS\", \"forwarded you {1} messages\"},\r\n            {\"MESSAGE_TEXT\", \"{1}\"},\r\n            {\"MESSAGE_NOTEXT\", \"sent you a message\"},\r\n            {\"MESSAGE_PHOTO\", \"sent you a photo\"},\r\n            {\"MESSAGE_VIDEO\", \"sent you a video\"},\r\n            {\"MESSAGE_DOC\", \"sent you a document\"},\r\n            {\"MESSAGE_GIF\", \"sent you a GIF\"},\r\n            {\"MESSAGE_AUDIO\", \"sent you a voice message\"},\r\n            {\"MESSAGE_CONTACT\", \"shared a contact with you\"},\r\n            {\"MESSAGE_GEO\", \"sent you a map\"},\r\n            {\"MESSAGE_STICKER\", \"sent you a sticker\"},\r\n            {\"MESSAGE_GAME\", \"invited you to play {1}\"},\r\n            {\"MESSAGE_INVOICE\", \"sent you an invoice for {1}\"},\r\n\r\n            {\"CHAT_MESSAGE_FWDS\", \"{0} forwarded {2} messages to the group\"},\r\n            {\"CHAT_MESSAGE_TEXT\", \"{0}: {2}\"},\r\n            {\"CHAT_MESSAGE_NOTEXT\", \"{0} sent a message to the group\"},\r\n            {\"CHAT_MESSAGE_PHOTO\", \"{0} sent a photo to the group\"},\r\n            {\"CHAT_MESSAGE_VIDEO\", \"{0} sent a video to the group\"},\r\n            {\"CHAT_MESSAGE_DOC\", \"{0} sent a document to the group\"},\r\n            {\"CHAT_MESSAGE_GIF\", \"{0} sent a GIF to the group\"},\r\n            {\"CHAT_MESSAGE_AUDIO\", \"{0} sent a voice message to the group\"},\r\n            {\"CHAT_MESSAGE_CONTACT\", \"{0} shared a contact in the group\"},\r\n            {\"CHAT_MESSAGE_GEO\", \"{0} sent a map to the group\"},\r\n            {\"CHAT_MESSAGE_STICKER\", \"{0} sent a sticker to the group\"},\r\n            {\"CHAT_MESSAGE_GAME\", \"{0} invited the group to play {2}\"},\r\n            {\"CHAT_MESSAGE_INVOICE\", \"{0} sent an invoice for {2}\"},\r\n\r\n            {\"CHANNEL_MESSAGE_FWDS\", \"posted {1} forwarded messages\"},\r\n            {\"CHANNEL_MESSAGE_TEXT\", \"{1}\"},\r\n            {\"CHANNEL_MESSAGE_NOTEXT\", \"posted a message\"},\r\n            {\"CHANNEL_MESSAGE_PHOTO\", \"posted a photo\"},\r\n            {\"CHANNEL_MESSAGE_VIDEO\", \"posted a video\"},\r\n            {\"CHANNEL_MESSAGE_DOC\", \"posted a document\"},\r\n            {\"CHANNEL_MESSAGE_GIF\", \"posted a GIF\"},\r\n            {\"CHANNEL_MESSAGE_AUDIO\", \"posted a voice message\"},\r\n            {\"CHANNEL_MESSAGE_CONTACT\", \"posted a contact\"},\r\n            {\"CHANNEL_MESSAGE_GEO\", \"posted a map\"},\r\n            {\"CHANNEL_MESSAGE_STICKER\", \"posted a sticker\"},\r\n            {\"CHANNEL_MESSAGE_GAME\", \"invited you to play {1}\"},\r\n\r\n            {\"CHAT_CREATED\", \"{0} invited you to the group\"},\r\n            {\"CHAT_TITLE_EDITED\", \"{0} edited the group's name\"},\r\n            {\"CHAT_PHOTO_EDITED\", \"{0} edited the group's photo\"},\r\n            {\"CHAT_ADD_MEMBER\", \"{0} invited {2} to the group\"},\r\n            {\"CHAT_ADD_YOU\", \"{0} invited you to the group\"},\r\n            {\"CHAT_DELETE_MEMBER\", \"{0} kicked {2} from the group\"},\r\n            {\"CHAT_DELETE_YOU\", \"{0} kicked you from the group\"},\r\n            {\"CHAT_LEFT\", \"{0} has left the group\"},\r\n            {\"CHAT_RETURNED\", \"{0} has returned to the group\"},\r\n            {\"GEOCHAT_CHECKIN\", \"{0} has checked-in\"},\r\n            {\"CHAT_JOINED\", \"{0} has joined the group\"},\r\n\r\n            {\"CONTACT_JOINED\", \"{0} joined the App!\"},\r\n            {\"AUTH_UNKNOWN\", \"New login from unrecognized device {0}\"},\r\n            {\"AUTH_REGION\", \"New login from unrecognized device {0}, location: {1}\"},\r\n\r\n            {\"CONTACT_PHOTO\", \"updated profile photo\"},\r\n\r\n            {\"ENCRYPTION_REQUEST\", \"You have a new message\"},\r\n            {\"ENCRYPTION_ACCEPT\", \"You have a new message\"},\r\n            {\"ENCRYPTED_MESSAGE\", \"You have a new message\"},\r\n\r\n            {\"DC_UPDATE\", \"Open this notification to update app settings\"},\r\n\r\n            {\"LOCKED_MESSAGE\", \"You have a new message\"}\r\n        };\r\n\r\n        private static void AppendTile(XmlDocument toTile, XmlDocument fromTile)\r\n        {\r\n            var fromTileNode = toTile.ImportNode(fromTile.GetElementsByTagName(\"binding\").Item(0), true);\r\n            toTile.GetElementsByTagName(\"visual\")[0].AppendChild(fromTileNode);\r\n        }\r\n\r\n        private static void UpdateTile(string caption, string message)\r\n        {\r\n#if WNS_PUSH_SERVICE\r\n            var tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication(\"xcee0f789y8059y4881y8883y347265c01f93x\");\r\n            //tileUpdater.EnableNotificationQueue(false);\r\n            tileUpdater.EnableNotificationQueue(true);\r\n            tileUpdater.EnableNotificationQueueForSquare150x150(false);\r\n            //tileUpdater.EnableNotificationQueueForWide310x150(true);\r\n\r\n            var wideTileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWide310x150IconWithBadgeAndText);\r\n            SetImage(wideTileXml, \"IconicSmall110.png\");\r\n            SetText(wideTileXml, caption, message);\r\n\r\n            var squareTile150Xml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare150x150IconWithBadge);\r\n            SetImage(squareTile150Xml, \"IconicTileMedium202.png\");\r\n            AppendTile(wideTileXml, squareTile150Xml);\r\n\r\n            var squareTile71Xml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare71x71IconWithBadge);\r\n            SetImage(squareTile71Xml, \"IconicSmall110.png\");\r\n            AppendTile(wideTileXml, squareTile71Xml);\r\n\r\n            try\r\n            {\r\n                tileUpdater.Update(new TileNotification(wideTileXml));\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(ex.ToString());\r\n            }\r\n#endif\r\n        }\r\n\r\n        private static void UpdateBadge(int badgeNumber)\r\n        {\r\n#if WNS_PUSH_SERVICE\r\n            var badgeUpdater = BadgeUpdateManager.CreateBadgeUpdaterForApplication(\"xcee0f789y8059y4881y8883y347265c01f93x\");\r\n            if (badgeNumber == 0)\r\n            {\r\n                badgeUpdater.Clear();\r\n                return;\r\n            }\r\n\r\n            var badgeXml = BadgeUpdateManager.GetTemplateContent(BadgeTemplateType.BadgeNumber);\r\n\r\n            var badgeElement = (XmlElement)badgeXml.SelectSingleNode(\"/badge\");\r\n            badgeElement.SetAttribute(\"value\", badgeNumber.ToString());\r\n\r\n            try\r\n            {\r\n                badgeUpdater.Update(new BadgeNotification(badgeXml));\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(ex.ToString());\r\n            }\r\n#endif\r\n        }\r\n\r\n        private static bool IsMuted(Data data)\r\n        {\r\n            return data.mute == \"1\";\r\n        }\r\n\r\n        private static bool IsServiceNotification(Data data)\r\n        {\r\n            return data.loc_key == \"DC_UPDATE\";\r\n        }\r\n\r\n        private static void RemoveToastGroup(string groupname)\r\n        {\r\n#if WNS_PUSH_SERVICE\r\n            ToastNotificationManager.History.RemoveGroup(groupname);\r\n#endif\r\n        }\r\n\r\n        private static string GetCaption(Data data)\r\n        {\r\n            var locKey = data.loc_key;\r\n            if (locKey == null)\r\n            {\r\n                return \"locKey=null\";\r\n            }\r\n\r\n            if (locKey.StartsWith(\"CHAT\") || locKey.StartsWith(\"GEOCHAT\"))\r\n            {\r\n                return data.loc_args[1];\r\n            }\r\n\r\n            if (locKey.StartsWith(\"MESSAGE\"))\r\n            {\r\n                return data.loc_args[0];\r\n            }\r\n\r\n            if (locKey.StartsWith(\"CHANNEL\"))\r\n            {\r\n                return data.loc_args[0];\r\n            }\r\n\r\n            if (locKey.StartsWith(\"PINNED\"))\r\n            {\r\n                return data.loc_args[0];\r\n            }\r\n\r\n            if (locKey.StartsWith(\"AUTH\")\r\n                || locKey.StartsWith(\"CONTACT\")\r\n                || locKey.StartsWith(\"ENCRYPTED\")\r\n                || locKey.StartsWith(\"ENCRYPTION\")\r\n                || locKey.StartsWith(\"PHONE\"))\r\n            {\r\n                return \"Telegram\";\r\n            }\r\n\r\n#if DEBUG\r\n            return locKey;\r\n#else\r\n            return \"Telegram\";\r\n#endif\r\n        }\r\n\r\n        private static string GetSound(Data data)\r\n        {\r\n            return data.sound;\r\n        }\r\n\r\n        private static string GetGroup(Data data)\r\n        {\r\n            return data.group;\r\n        }\r\n\r\n        private static string GetTag(Data data)\r\n        {\r\n            return data.tag;\r\n        }\r\n\r\n        private static string GetLaunch(Data data)\r\n        {\r\n            var locKey = data.loc_key;\r\n            if (locKey == null) return null;\r\n\r\n            var path = \"/Views/ShellView.xaml\";\r\n            if (locKey == \"DC_UPDATE\")\r\n            {\r\n                path = \"/Views/Additional/SettingsView.xaml\";\r\n            }\r\n\r\n            var customParams = new List<string> { \"Action=\" + locKey };\r\n            if (data.custom != null)\r\n            {\r\n                customParams.AddRange(data.custom.GetParams());\r\n            }\r\n\r\n            return string.Format(\"{0}?{1}\", path, string.Join(\"&\", customParams));\r\n        }\r\n\r\n        private static string GetMessage(Data data)\r\n        {\r\n            var locKey = data.loc_key;\r\n            if (locKey == null)\r\n            {\r\n                Telegram.Logs.Log.Write(\"::PushNotificationsBackgroundTask locKey=null text=\" + data.text);\r\n                return string.Empty;\r\n            }\r\n\r\n            string locValue = \"\";\r\n            if (_locKeys.TryGetValue(locKey, out locValue))\r\n            {\r\n                \r\n            }\r\n            //var resourceLoader = ResourceLoader.GetForViewIndependentUse(\"TelegramClient.Tasks/Resources\");\r\n            //locValue = resourceLoader.GetString(locKey);\r\n\r\n            if (locValue != \"\")\r\n            {\r\n                return string.Format(locValue, data.loc_args).Replace(\"\\r\\n\", \"\\n\").Replace(\"\\n\", \" \");\r\n            }\r\n            var builder = new StringBuilder();\r\n            if (data.loc_args != null)\r\n            {\r\n                builder.AppendLine(\"loc_args\");\r\n                foreach (var locArg in data.loc_args)\r\n                {\r\n                    builder.AppendLine(locArg);\r\n                }\r\n            }\r\n            Telegram.Logs.Log.Write(string.Format(\"::PushNotificationsBackgroundTask missing locKey={0} locArgs={1}\", locKey, builder.ToString()));\r\n\r\n            //if (locKey.StartsWith(\"CHAT\") || locKey.StartsWith(\"GEOCHAT\"))\r\n            //{\r\n            //    return data.text;\r\n            //}\r\n\r\n            //if (locKey.StartsWith(\"MESSAGE\"))\r\n            //{\r\n            //    if (locKey == \"MESSAGE_TEXT\")\r\n            //    {\r\n            //        return data.loc_args[1];\r\n            //    }\r\n\r\n            //    return data.text; //add localization string here \r\n            //}\r\n\r\n#if DEBUG\r\n            return data.text;\r\n#else\r\n            return string.Empty;\r\n#endif\r\n        }\r\n\r\n        public static void UpdateToastAndTiles(RootObject rootObject)\r\n        {\r\n            if (rootObject == null) return;\r\n            if (rootObject.data == null) return;\r\n\r\n            if (rootObject.data.loc_key == null)\r\n            {\r\n                var groupname = GetGroup(rootObject.data);\r\n                RemoveToastGroup(groupname);\r\n                return;\r\n            }\r\n\r\n            var caption = GetCaption(rootObject.data);\r\n            var message = GetMessage(rootObject.data);\r\n            var sound = GetSound(rootObject.data);\r\n            var launch = GetLaunch(rootObject.data);\r\n            var tag = GetTag(rootObject.data);\r\n            var group = GetGroup(rootObject.data);\r\n\r\n            if (!IsMuted(rootObject.data) && !Notifications.IsDisabled)\r\n            {\r\n                AddToast(rootObject, caption, message, sound, launch, tag, group);\r\n            }\r\n            if (!IsServiceNotification(rootObject.data))\r\n            {\r\n                UpdateTile(caption, message);\r\n            }\r\n            UpdateBadge(rootObject.data.badge);\r\n        }\r\n\r\n        private static void SetToastImage(XmlDocument document, string imageSource, bool isUserPlaceholder)\r\n        {\r\n            var imageElements = document.GetElementsByTagName(\"image\");\r\n            if (imageSource == null)\r\n            {\r\n                ((XmlElement)imageElements[0]).SetAttribute(\"src\", isUserPlaceholder ? \"ms-appx:///Images/W10M/user_placeholder.png\" : \"ms-appx:///Images/W10M/group_placeholder.png\");\r\n            }\r\n            else\r\n            {\r\n                ((XmlElement)imageElements[0]).SetAttribute(\"src\", \"ms-appdata:///local/\" + imageSource);\r\n            }\r\n        }\r\n\r\n        private static void SetImage(XmlDocument document, string imageSource)\r\n        {\r\n            var imageElements = document.GetElementsByTagName(\"image\");\r\n            ((XmlElement)imageElements[0]).SetAttribute(\"src\", imageSource);\r\n        }\r\n\r\n        private static void SetSound(XmlDocument document, string soundSource)\r\n        {\r\n            //return;\r\n\r\n            if (!Regex.IsMatch(soundSource, @\"^sound[1-6]$\", RegexOptions.IgnoreCase))\r\n            {\r\n                return;\r\n            }\r\n\r\n            var toastNode = document.SelectSingleNode(\"/toast\");\r\n            ((XmlElement)toastNode).SetAttribute(\"duration\", \"long\");\r\n            var audioElement = document.CreateElement(\"audio\");\r\n            audioElement.SetAttribute(\"src\", \"ms-appx:///Sounds/\" + soundSource + \".wav\");\r\n            audioElement.SetAttribute(\"loop\", \"false\");\r\n\r\n            toastNode.AppendChild(audioElement);\r\n        }\r\n\r\n        private static void SetLaunch(RootObject rootObject, XmlDocument document, string launch)\r\n        {\r\n            if (string.IsNullOrEmpty(launch))\r\n            {\r\n                return;\r\n            }\r\n            if (rootObject != null\r\n                && rootObject.data != null\r\n                && rootObject.data.system != null\r\n                && rootObject.data.system.StartsWith(\"10\")) //10.0.10572.0 or less\r\n            {\r\n                try\r\n                {\r\n                    var currentVersion = new Version(rootObject.data.system);\r\n                    var minVersion = new Version(\"10.0.10572.0\");\r\n                    if (currentVersion < minVersion)\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Telegram.Logs.Log.Write(ex.ToString());\r\n                }\r\n            }\r\n            //launch = \"/Views/ShellView.xaml\";\r\n            var toastNode = document.SelectSingleNode(\"/toast\");\r\n            ((XmlElement)toastNode).SetAttribute(\"launch\", launch);\r\n        }\r\n\r\n        private static void SetText(XmlDocument document, string caption, string message)\r\n        {\r\n            var toastTextElements = document.GetElementsByTagName(\"text\");\r\n            toastTextElements[0].InnerText = caption ?? string.Empty;\r\n            toastTextElements[1].InnerText = message ?? string.Empty;\r\n        }\r\n\r\n        private static string GetArguments(string peer, string peerId, bool needAccessHash, Custom custom)\r\n        {\r\n            string arguments = null;\r\n\r\n            if (custom.mtpeer != null && custom.mtpeer.ah != null || !needAccessHash)\r\n            {\r\n                arguments = string.Format(\"{0}={1}\", peer, peerId);\r\n\r\n                if (custom.mtpeer != null && custom.mtpeer.ah != null)\r\n                {\r\n                    arguments += string.Format(\" access_hash={0}\", custom.mtpeer.ah);\r\n                }\r\n\r\n                if (custom.msg_id != null)\r\n                {\r\n                    arguments += string.Format(\" msg_id={0}\", custom.msg_id);\r\n                }\r\n            }\r\n\r\n            return arguments;\r\n        }\r\n\r\n        private static void GetArgumentsAndImageSource(RootObject rootObject, out string arguments, out string imageSource)\r\n        {\r\n            arguments = null;\r\n            imageSource = null;\r\n\r\n            if (rootObject != null)\r\n            {\r\n                var data = rootObject.data;\r\n                if (data != null)\r\n                {\r\n                    var custom = data.custom;\r\n                    if (custom != null)\r\n                    {\r\n                        if (custom.from_id != null)\r\n                        {\r\n                            int fromId;\r\n                            if (Int32.TryParse(custom.from_id, out fromId))\r\n                            {\r\n                                arguments = GetArguments(\"from_id\", custom.from_id, true, custom);\r\n                            }\r\n                        }\r\n                        else if (custom.chat_id != null)\r\n                        {\r\n                            int chatId;\r\n                            if (Int32.TryParse(custom.chat_id, out chatId))\r\n                            {\r\n                                arguments = GetArguments(\"chat_id\", custom.chat_id, false, custom);\r\n                            }\r\n                        }\r\n                        else if (custom.channel_id != null)\r\n                        {\r\n                            int channelId;\r\n                            if (Int32.TryParse(custom.channel_id, out channelId))\r\n                            {\r\n                                if (data.loc_key != null\r\n                                    && data.loc_key.StartsWith(\"CHAT\"))\r\n                                {\r\n                                    arguments = GetArguments(\"channel_id\", custom.channel_id, true, custom);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        imageSource = GetImageSource(custom);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void SetActions(XmlDocument document, string arguments)\r\n        {\r\n            if (arguments == null) return;\r\n\r\n            //var resourceLoader = ResourceLoader.GetForViewIndependentUse(\"TelegramClient.Tasks/Resources\");\r\n\r\n            //\"<actions>\" +\r\n            //\"<input id=\\\"message\\\" type=\\\"text\\\" placeHolderContent=\\\"Type a reply\\\" />\" +\r\n            //\"<action activationType=\\\"background\\\" content=\\\"Reply\\\" arguments=\\\"{0}\\\" hint-inputId=\\\"message\\\" imageUri=\\\"Assets/Icons/send.png\\\"/>\" +\r\n            //\"</actions>\"\r\n\r\n            var toastNode = document.SelectSingleNode(\"/toast\");\r\n            var actionsElement = document.CreateElement(\"actions\");\r\n\r\n            var inputElement = document.CreateElement(\"input\");\r\n            inputElement.SetAttribute(\"id\", \"message\");\r\n            inputElement.SetAttribute(\"type\", \"text\");\r\n            inputElement.SetAttribute(\"placeHolderContent\", \"Type reply\"); //resourceLoader.GetString(\"TypeReply\"));\r\n            actionsElement.AppendChild(inputElement);\r\n\r\n            var replyAction = document.CreateElement(\"action\");\r\n            replyAction.SetAttribute(\"activationType\", \"background\");\r\n            replyAction.SetAttribute(\"content\", \"Reply\"); //resourceLoader.GetString(\"Reply\"));\r\n            replyAction.SetAttribute(\"arguments\", \"action=reply \" + arguments);\r\n            replyAction.SetAttribute(\"hint-inputId\", \"message\");\r\n            replyAction.SetAttribute(\"imageUri\", \"Images/W10M/ic_send_2x.png\");\r\n            actionsElement.AppendChild(replyAction);\r\n\r\n            var muteAction = document.CreateElement(\"action\");\r\n            muteAction.SetAttribute(\"activationType\", \"background\");\r\n            muteAction.SetAttribute(\"content\", \"Mute 1 hour\"); //resourceLoader.GetString(\"Mute1Hour\"));\r\n            muteAction.SetAttribute(\"arguments\", \"action=mute \" + arguments);\r\n            actionsElement.AppendChild(muteAction);\r\n\r\n            var disableAction = document.CreateElement(\"action\");\r\n            disableAction.SetAttribute(\"activationType\", \"background\");\r\n            disableAction.SetAttribute(\"content\", \"Disable\"); //resourceLoader.GetString(\"Disable\"));\r\n            disableAction.SetAttribute(\"arguments\", \"action=disable \" + arguments);\r\n            actionsElement.AppendChild(disableAction);\r\n\r\n            toastNode.AppendChild(actionsElement);\r\n        }\r\n\r\n        public static void AddToast(RootObject rootObject, string caption, string message, string sound, string launch, string tag, string group)\r\n        {\r\n#if WNS_PUSH_SERVICE\r\n\r\n#if INTERACTIVE_NOTIFICATIONS\r\n\r\n            var toastNotifier = ToastNotificationManager.CreateToastNotifier(\"xcee0f789y8059y4881y8883y347265c01f93x\"); //(\"xcee0f789y8059y4881y8883y347265c01f93x\");\r\n            //toastNotifier.Setting = \r\n            Version version = Environment.OSVersion.Version;\r\n            if (rootObject.data.system != null && rootObject.data.system != null)\r\n            {\r\n                Version.TryParse(rootObject.data.system, out version);\r\n            }\r\n            var toastXml = new XmlDocument();\r\n            if (version != null && version.Major >= 10)\r\n            {\r\n                string arguments;\r\n                string imageSource;\r\n                GetArgumentsAndImageSource(rootObject, out arguments, out imageSource);\r\n\r\n                var xml = \r\n                    \"<toast>\" +\r\n                    \"<visual>\" +\r\n                    \"<binding template=\\\"ToastImageAndText02\\\">\" +\r\n                    \"<text id=\\\"1\\\"></text>\" +\r\n                    \"<text id=\\\"2\\\"></text>\" +\r\n                    \"<image id=\\\"1\\\" placement=\\\"appLogoOverride\\\" src=\\\"\\\" hint-crop=\\\"circle\\\" />\" +\r\n                    \"</binding>\" +\r\n                    \"</visual>\" +\r\n                    \"</toast>\";\r\n\r\n                toastXml.LoadXml(xml);\r\n                SetToastImage(toastXml, imageSource, arguments != null && arguments.StartsWith(\"from_id\"));\r\n                SetActions(toastXml, arguments);\r\n            }\r\n            else\r\n            {\r\n                toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);\r\n            }\r\n\r\n            SetText(toastXml, caption, message);\r\n            SetLaunch(rootObject, toastXml, launch);\r\n\r\n            if (!string.IsNullOrEmpty(sound) \r\n                && !string.Equals(sound, \"default\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                SetSound(toastXml, sound);\r\n            }\r\n\r\n            try\r\n            {\r\n                var toast = new ToastNotification(toastXml);\r\n                if (tag != null) toast.Tag = tag;\r\n                if (group != null) toast.Group = group;\r\n                //RemoveToastGroup(group);\r\n                toastNotifier.Show(toast);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(ex.ToString());\r\n            }\r\n#else\r\n            var toastNotifier = ToastNotificationManager.CreateToastNotifier();\r\n\r\n            var toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);\r\n            SetText(toastXml, caption, message);\r\n            SetLaunch(toastXml, launch);\r\n\r\n            if (!string.IsNullOrEmpty(sound)\r\n                && !string.Equals(sound, \"default\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                SetSound(toastXml, sound);\r\n            }\r\n\r\n            try\r\n            {\r\n                var toast = new ToastNotification(toastXml);\r\n                if (tag != null) toast.Tag = tag;\r\n                if (group != null) toast.Group = group;\r\n                //RemoveToastGroup(group);\r\n                toastNotifier.Show(toast);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(ex.ToString());\r\n            }\r\n#endif\r\n\r\n#endif\r\n        }\r\n\r\n        public static T GetRootObject<T>(string payload) where T : class\r\n        {\r\n            var serializer = new DataContractJsonSerializer(typeof(T));\r\n            T rootObject;\r\n            using (var stream = new MemoryStream(Encoding.Unicode.GetBytes(payload)))\r\n            {\r\n                rootObject = serializer.ReadObject(stream) as T;\r\n            }\r\n\r\n            return rootObject;\r\n        }\r\n\r\n        private static async Task<bool> IsFileExists(string fileName)\r\n        {\r\n            bool fileExists = true;\r\n            Stream fileStream = null;\r\n            StorageFile file = null;\r\n\r\n            try\r\n            {\r\n                file = await ApplicationData.Current.LocalFolder.GetFileAsync(fileName);\r\n                fileStream = await file.OpenStreamForReadAsync();\r\n                fileStream.Dispose();\r\n            }\r\n            catch (FileNotFoundException)\r\n            {\r\n                // If the file dosn't exits it throws an exception, make fileExists false in this case \r\n                fileExists = false;\r\n            }\r\n            finally\r\n            {\r\n                if (fileStream != null)\r\n                {\r\n                    fileStream.Dispose();\r\n                }\r\n            }\r\n\r\n            return fileExists;\r\n        }\r\n\r\n        private static string GetImageSource(Custom custom)\r\n        {\r\n            string imageSource = null;\r\n            if (custom.mtpeer != null)\r\n            {\r\n                var location = custom.mtpeer.ph;\r\n                if (location != null)\r\n                {\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.volume_id,\r\n                        location.local_id,\r\n                        location.secret);\r\n\r\n                    if (IsFileExists(fileName).Result)\r\n                    {\r\n                        imageSource = fileName;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return imageSource;\r\n        }\r\n\r\n        public static string GetImageSource(MTPeer mtpeer)\r\n        {\r\n            string imageSource = null;\r\n            if (mtpeer != null)\r\n            {\r\n                var location = mtpeer.ph;\r\n                if (location != null)\r\n                {\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.volume_id,\r\n                        location.local_id,\r\n                        location.secret);\r\n\r\n                    if (IsFileExists(fileName).Result)\r\n                    {\r\n                        imageSource = fileName;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return imageSource;\r\n        }\r\n    }\r\n\r\n    public sealed class Photo\r\n    {\r\n        public string volume_id { get; set; }\r\n        public string local_id { get; set; }\r\n        public string secret { get; set; }\r\n        public int dc_id { get; set; }\r\n    }\r\n\r\n    public sealed class MTPeer\r\n    {\r\n        public string ah { get; set; }\r\n        public Photo ph { get; set; }\r\n    }\r\n\r\n    public sealed class Custom\r\n    {\r\n        public string msg_id { get; set; }\r\n        public string from_id { get; set; }\r\n        public string chat_id { get; set; }\r\n        public string channel_id { get; set; }\r\n        public MTPeer mtpeer { get; set; }\r\n        public string call_id { get; set; }\r\n        public string call_ah { get; set; }\r\n\r\n        public string group\r\n        {\r\n            get\r\n            {\r\n                if (chat_id != null) return \"c\" + chat_id;\r\n                if (channel_id != null) return \"c\" + chat_id;\r\n                if (from_id != null) return \"u\" + from_id;\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public string tag { get { return msg_id; } }\r\n\r\n        public IEnumerable<string> GetParams()\r\n        {\r\n            if (msg_id != null) yield return \"msg_id=\" + msg_id;\r\n            if (from_id != null) yield return \"from_id=\" + from_id;\r\n            if (chat_id != null) yield return \"chat_id=\" + chat_id;\r\n            if (channel_id != null) yield return \"channel_id=\" + channel_id;\r\n        }\r\n    }\r\n\r\n    public sealed class Data\r\n    {\r\n        public Custom custom { get; set; }\r\n        public string sound { get; set; }\r\n        public string mute { get; set; }\r\n        public int badge { get; set; }\r\n        public string loc_key { get; set; }\r\n        public string[] loc_args { get; set; }\r\n        public int random_id { get; set; }\r\n        public int user_id { get; set; }\r\n        public string text { get; set; }\r\n        public string system { get; set; }\r\n\r\n        public string group { get { return custom != null ? custom.group : null; } }\r\n        public string tag { get { return custom != null ? custom.tag : null; } }\r\n    }\r\n\r\n    public sealed class RootObject\r\n    {\r\n        public int date { get; set; }\r\n        public Data data { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Agents/RegistrationHelper.cs",
    "content": "//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code was generated by a tool.\r\n//     Runtime Version:4.0.30319.34011\r\n//\r\n//     Changes to this file may cause incorrect behavior and will be lost if\r\n//     the code is regenerated.\r\n// </auto-generated>\r\n//------------------------------------------------------------------------------\r\n\r\nnamespace PhoneVoIPApp.BackEnd.OutOfProcess {\r\n    \r\n    \r\n    internal sealed class RegistrationHelper {\r\n        \r\n        internal static string[] OutOfProcServerClassNames = new string[] {\r\n                \"PhoneVoIPApp.BackEnd.OutOfProcess.Server\"};\r\n    }\r\n}\r\n"
  },
  {
    "path": "Agents/ScheduledAgentImpl.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Net;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Xml.Serialization;\r\nusing Windows.Data.Xml.Dom;\r\nusing Windows.UI.Notifications;\r\nusing Microsoft.Phone.Networking.Voip;\r\nusing Microsoft.Phone.Scheduler;\r\nusing PhoneVoIPApp.BackEnd;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Connection;\r\nusing Telegram.Api.Services.Location;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Phone;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace PhoneVoIPApp.Agents\r\n{\r\n    public class ScheduledAgentImpl : ScheduledTaskAgent\r\n    {\r\n        private readonly Mutex _appOpenMutex = new Mutex(false, Constants.TelegramMessengerMutexName);\r\n\r\n        private static bool _logEnabled = true;\r\n\r\n        private static readonly int _id = new Random().Next(999);\r\n\r\n        private static void Log(string message, Action callback = null)\r\n        {\r\n            if (!_logEnabled) return;\r\n\r\n            Telegram.Logs.Log.WriteSync = true;\r\n            Telegram.Logs.Log.Write(string.Format(\"::ScheduledAgentImpl {0} {1}\", _id, message), callback);\r\n#if DEBUG\r\n            //PushUtils.AddToast(\"push\", message, string.Empty, string.Empty, null, null);\r\n#endif\r\n        }\r\n\r\n        public ScheduledAgentImpl()\r\n        {\r\n        }\r\n\r\n        //private static void SetText(XmlDocument document, string caption, string message)\r\n        //{\r\n        //    var toastTextElements = document.GetElementsByTagName(\"text\");\r\n        //    toastTextElements[0].InnerText = caption ?? string.Empty;\r\n        //    toastTextElements[1].InnerText = message ?? string.Empty;\r\n        //}\r\n\r\n        private static void SetText(XmlDocument document, string caption, string message)\r\n        {\r\n            var toastTextElements = document.GetElementsByTagName(\"text\");\r\n            toastTextElements[0].InnerText = caption ?? string.Empty;\r\n            toastTextElements[1].InnerText = message ?? string.Empty;\r\n        }\r\n\r\n        protected override void OnInvoke(ScheduledTask task)\r\n        {\r\n            Debug.WriteLine(\"[ScheduledAgentImpl {0}] ScheduledAgentImpl has been invoked with argument of type {1}.\", GetHashCode(), task.GetType());\r\n\r\n            // Indicate that an agent has started running\r\n            AgentHost.OnAgentStarted();\r\n\r\n            Log(string.Format(\"start with argument of type {0}\", task.GetType()));\r\n            if (!_appOpenMutex.WaitOne(0))\r\n            {\r\n                Log(\"cancel\");\r\n                Complete();\r\n                return;\r\n            }\r\n            _appOpenMutex.ReleaseMutex();\r\n\r\n            var incomingCallTask = task as VoipHttpIncomingCallTask;\r\n            if (incomingCallTask != null)\r\n            {\r\n                isIncomingCallAgent = true;\r\n\r\n                var messageBody = HttpUtility.HtmlDecode(Encoding.UTF8.GetString(incomingCallTask.MessageBody, 0, incomingCallTask.MessageBody.Length));\r\n                Notification pushNotification = null;\r\n                try\r\n                {\r\n                    using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(messageBody ?? string.Empty)))\r\n                    {\r\n                        var xs = new XmlSerializer(typeof(Notification));\r\n                        pushNotification = (Notification)xs.Deserialize(ms);\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Log(string.Format(\"cannot deserialize message_body={0}\", messageBody));\r\n#if DEBUG\r\n                    var toastNotifier = ToastNotificationManager.CreateToastNotifier();\r\n\r\n                    var toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);\r\n                    SetText(toastXml, \"Notification Exception\", string.Empty);\r\n\r\n                    try\r\n                    {\r\n                        var toast = new ToastNotification(toastXml);\r\n                        //RemoveToastGroup(group);\r\n                        toastNotifier.Show(toast);\r\n                    }\r\n                    catch (Exception ex2)\r\n                    {\r\n                        Telegram.Logs.Log.Write(ex.ToString());\r\n                    }\r\n#endif\r\n                }\r\n\r\n                if (pushNotification != null)\r\n                {\r\n                    var rootObject = PushUtils2.GetRootObject<RootObject>(pushNotification.Data);\r\n                    if (rootObject != null\r\n                        && rootObject.data != null)\r\n                    {\r\n                        if (rootObject.data.custom != null\r\n                            && rootObject.data.custom.from_id != null\r\n                            && rootObject.data.custom.call_id != null\r\n                            && rootObject.data.custom.call_ah != null)\r\n                        {\r\n                            var contactImage = PushUtils2.GetImageSource(rootObject.data.custom.mtpeer) ?? string.Empty;\r\n                            var contactName = rootObject.data.loc_args != null && rootObject.data.loc_args.Length > 0\r\n                                ? rootObject.data.loc_args[0]\r\n                                : string.Empty;\r\n                            Debug.WriteLine(\"[{0}] Incoming call from caller {1}, id {2}\", incomingCallAgentId,\r\n                                contactName, rootObject.data.custom.from_id);\r\n\r\n                            long contactId = 0;\r\n                            long callId = 0;\r\n                            long callAccessHash = 0;\r\n                            if (long.TryParse(rootObject.data.custom.from_id, out contactId)\r\n                                && long.TryParse(rootObject.data.custom.call_id, out callId)\r\n                                && long.TryParse(rootObject.data.custom.call_ah, out callAccessHash))\r\n                            {\r\n                                if (string.Equals(rootObject.data.loc_key, \"PHONE_CALL_REQUEST\",\r\n                                    StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    if (BackEnd.Globals.Instance.CallController.CallStatus == CallStatus.InProgress)\r\n                                    {\r\n                                        OnIncomingCallDialogDismissed(callId, callAccessHash, true);\r\n                                        return;\r\n                                    }\r\n\r\n                                    // Initiate incoming call processing\r\n                                    // If you want to pass in additional information such as pushNotification.Number, you can\r\n                                    var incomingCallProcessingStarted =\r\n                                        BackEnd.Globals.Instance.CallController.OnIncomingCallReceived(contactName,\r\n                                            contactId, contactImage, callId, callAccessHash,\r\n                                            OnIncomingCallDialogDismissed);\r\n                                    if (incomingCallProcessingStarted)\r\n                                    {\r\n                                        // will Complete() at OnIncomingCallDialogDismissed\r\n                                        return;\r\n                                    }\r\n\r\n                                    //PushUtils2.AddToast(rootObject, \"Caption\", \"Message\", \"\", \"\", \"tag\", \"group\");\r\n                                }\r\n                                else if (string.Equals(rootObject.data.loc_key, \"PHONE_CALL_DECLINE\",\r\n                                    StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    var currentCallId = BackEnd.Globals.Instance.CallController.CallId;\r\n                                    if (currentCallId == callId)\r\n                                    {\r\n                                        Log(string.Format(\"PHONE_CALL_DECLINE CallController.EndCall call_id={0}\", callId));\r\n                                        var result = BackEnd.Globals.Instance.CallController.EndCall();\r\n                                        Log(string.Format(\"PHONE_CALL_DECLINE CallController.EndCall call_id={0} result={1}\", callId, result));\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (string.Equals(rootObject.data.loc_key, \"GEO_LIVE_PENDING\"))\r\n                        {\r\n                            ProcessLiveLocations();\r\n                        }\r\n                        else\r\n                        {\r\n                            //PushUtils2.UpdateToastAndTiles(rootObject);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                Complete();\r\n                return;\r\n            }\r\n            else\r\n            {\r\n                VoipKeepAliveTask keepAliveTask = task as VoipKeepAliveTask;\r\n                if (keepAliveTask != null)\r\n                {\r\n                    this.isIncomingCallAgent = false;\r\n\r\n                    // Refresh tokens, get new certs from server, etc.\r\n                    BackEnd.Globals.Instance.DoPeriodicKeepAlive();\r\n                    this.Complete();\r\n                }\r\n                else\r\n                {\r\n                    throw new InvalidOperationException(string.Format(\"Unknown scheduled task type {0}\", task.GetType()));\r\n                }\r\n            }\r\n        }\r\n\r\n        // This is a request to complete this agent\r\n        protected override void OnCancel()\r\n        {\r\n            Debug.WriteLine(\"[{0}] Cancel requested.\", this.isIncomingCallAgent ? ScheduledAgentImpl.incomingCallAgentId : ScheduledAgentImpl.keepAliveAgentId);\r\n            this.Complete();\r\n        }\r\n\r\n        private readonly object _initConnectionSyncRoot = new object();\r\n\r\n        private TLInitConnection GetInitConnection()\r\n        {\r\n            return TLUtils.OpenObjectFromMTProtoFile<TLInitConnection>(_initConnectionSyncRoot, Constants.InitConnectionFileName) ??\r\n                new TLInitConnection\r\n                {\r\n                    DeviceModel = new TLString(\"unknown\"),\r\n                    AppVersion = new TLString(\"background task\"),\r\n                    SystemVersion = new TLString(\"8.10.0.0\")\r\n                };\r\n        }\r\n\r\n        // This method is called when the incoming call processing is complete\r\n        private void OnIncomingCallDialogDismissed(long callId, long callAccessHash, bool rejected)\r\n        {\r\n            Debug.WriteLine(\"[IncomingCallAgent] Incoming call processing is now complete.\");\r\n\r\n            if (rejected)\r\n            {\r\n                var deviceInfoService = new Telegram.Api.Services.DeviceInfo.DeviceInfoService(GetInitConnection(), true, \"BackgroundDifferenceLoader\", 1);\r\n                var cacheService = new MockupCacheService();\r\n                var updatesService = new MockupUpdatesService();\r\n                var transportService = new TransportService();\r\n                var connectionService = new ConnectionService(deviceInfoService);\r\n                var publicConfigService = new MockupPublicConfigService();\r\n\r\n                var manualResetEvent = new ManualResetEvent(false);\r\n                var mtProtoService = new MTProtoService(deviceInfoService, updatesService, cacheService, transportService, connectionService, publicConfigService);\r\n                mtProtoService.Initialized += (o, e) =>\r\n                {\r\n                    var peer = new TLInputPhoneCall\r\n                    {\r\n                        Id = new TLLong(callId),\r\n                        AccessHash = new TLLong(callAccessHash)\r\n                    };\r\n\r\n                    var getStateAction = new TLDiscardCall\r\n                    {\r\n                        Peer = peer,\r\n                        Duration = new TLInt(0),\r\n                        Reason = new TLPhoneCallDiscardReasonBusy(),\r\n                        ConnectionId = new TLLong(0)\r\n                    };\r\n                    var actions = new List<TLObject> { getStateAction };\r\n\r\n                    mtProtoService.SendActionsAsync(actions,\r\n                        (request, result) =>\r\n                        {\r\n                            manualResetEvent.Set();\r\n                        },\r\n                        error =>\r\n                        {\r\n                            manualResetEvent.Set();\r\n                        });\r\n                };\r\n                mtProtoService.InitializationFailed += (o, e) =>\r\n                {\r\n                    manualResetEvent.Set();\r\n                };\r\n                mtProtoService.Initialize();\r\n\r\n#if DEBUG\r\n                manualResetEvent.WaitOne();\r\n#else\r\n                manualResetEvent.WaitOne(TimeSpan.FromSeconds(10.0));\r\n#endif\r\n\r\n                mtProtoService.Stop();\r\n            }\r\n\r\n            this.Complete();\r\n        }\r\n\r\n        private void ProcessLiveLocations()\r\n        {\r\n            var deviceInfoService = new Telegram.Api.Services.DeviceInfo.DeviceInfoService(GetInitConnection(), true, \"BackgroundDifferenceLoader\", 1);\r\n            var cacheService = new MockupCacheService();\r\n            var updatesService = new MockupUpdatesService();\r\n            var transportService = new TransportService();\r\n            var connectionService = new ConnectionService(deviceInfoService);\r\n            var publicConfigService = new MockupPublicConfigService();\r\n\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            var eventAggregator = new TelegramEventAggregator();\r\n            var mtProtoService = new MTProtoService(deviceInfoService, updatesService, cacheService, transportService, connectionService, publicConfigService);\r\n            mtProtoService.Initialized += (o, e) =>\r\n            {\r\n                var liveLocationsService = new LiveLocationService(mtProtoService, eventAggregator);\r\n\r\n                liveLocationsService.Load();\r\n\r\n                liveLocationsService.UpdateAll();\r\n\r\n                manualResetEvent.Set();\r\n            };\r\n            mtProtoService.InitializationFailed += (o, e) =>\r\n            {\r\n                manualResetEvent.Set();\r\n            };\r\n            mtProtoService.Initialize();\r\n\r\n            var timeout = \r\n#if DEBUG\r\n                Timeout.InfiniteTimeSpan;\r\n#else\r\n                TimeSpan.FromSeconds(30.0);\r\n#endif\r\n\r\n            var result = manualResetEvent.WaitOne(timeout);\r\n        }\r\n\r\n        // Complete this agent.\r\n        private void Complete()\r\n        {\r\n            Debug.WriteLine(\"[{0}] Calling NotifyComplete\", this.isIncomingCallAgent ? ScheduledAgentImpl.incomingCallAgentId : ScheduledAgentImpl.keepAliveAgentId);\r\n\r\n            Log(string.Format(\"[{0}] Calling NotifyComplete\", this.isIncomingCallAgent ? ScheduledAgentImpl.incomingCallAgentId : ScheduledAgentImpl.keepAliveAgentId));\r\n\r\n            // This agent is done\r\n            base.NotifyComplete();\r\n        }\r\n\r\n        // Strings used in tracing\r\n        private const string keepAliveAgentId = \"KeepAliveAgent\";\r\n        private const string incomingCallAgentId = \"IncomingCallAgent\";\r\n\r\n        // Indicates if this agent instance is handling an incoming call or not\r\n        private bool isIncomingCallAgent;\r\n    }\r\n}\r\n"
  },
  {
    "path": "Agents/VideoMediaStreamSource.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Windows.Media;\r\nusing System.Threading;\r\n\r\nnamespace PhoneVoIPApp.Agents\r\n{\r\n    public class VideoMediaStreamSource : MediaStreamSource, IDisposable\r\n    {\r\n        public class VideoSample\r\n        {\r\n            public VideoSample(Windows.Storage.Streams.IBuffer _buffer, UInt64 _hnsPresentationTime, UInt64 _hnsSampleDuration)\r\n            {\r\n                buffer = _buffer;\r\n                hnsPresentationTime = _hnsPresentationTime;\r\n                hnsSampleDuration = _hnsSampleDuration;\r\n            }\r\n\r\n            public Windows.Storage.Streams.IBuffer buffer;\r\n            public UInt64 hnsPresentationTime;\r\n            public UInt64 hnsSampleDuration;\r\n        }\r\n\r\n        private const int maxQueueSize = 4;\r\n        private int _frameWidth;\r\n        private int _frameHeight;\r\n        private bool isDisposed = false;\r\n        private Queue<VideoSample> _sampleQueue;\r\n\r\n        private object lockObj = new object();\r\n        private ManualResetEvent shutdownEvent;\r\n\r\n        private int _outstandingGetVideoSampleCount;\r\n\r\n        private MediaStreamDescription _videoDesc;\r\n        private Dictionary<MediaSampleAttributeKeys, string> _emptySampleDict = new Dictionary<MediaSampleAttributeKeys, string>();\r\n\r\n        public VideoMediaStreamSource(Stream audioStream, int frameWidth, int frameHeight)\r\n        {\r\n            _frameWidth = frameWidth;\r\n            _frameHeight = frameHeight;\r\n            shutdownEvent = new ManualResetEvent(false);\r\n            _sampleQueue = new Queue<VideoSample>(VideoMediaStreamSource.maxQueueSize);\r\n            _outstandingGetVideoSampleCount = 0;\r\n            BackEnd.Globals.Instance.TransportController.VideoMessageReceived += TransportController_VideoMessageReceived;\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            Dispose(true);\r\n            GC.SuppressFinalize(this);\r\n        }\r\n\r\n        public void Shutdown()\r\n        {\r\n            shutdownEvent.Set();\r\n            lock (lockObj)\r\n            {\r\n                if (_outstandingGetVideoSampleCount > 0)\r\n                {\r\n                    // ReportGetSampleCompleted must be called after GetSampleAsync to avoid memory leak. So, send\r\n                    // an empty MediaStreamSample here.\r\n                    MediaStreamSample msSamp = new MediaStreamSample(\r\n                        _videoDesc,\r\n                        null,\r\n                        0,\r\n                        0,\r\n                        0,\r\n                        0,\r\n                        _emptySampleDict);\r\n                    ReportGetSampleCompleted(msSamp);\r\n                    _outstandingGetVideoSampleCount = 0;\r\n                }\r\n            }\r\n        }\r\n\r\n        protected virtual void Dispose(bool disposing)\r\n        {\r\n            if (!this.isDisposed)\r\n            {\r\n                if (disposing)\r\n                {\r\n                    BackEnd.Globals.Instance.TransportController.VideoMessageReceived -= TransportController_VideoMessageReceived;\r\n                }\r\n                isDisposed = true;\r\n            }\r\n        }\r\n\r\n        void TransportController_VideoMessageReceived(Windows.Storage.Streams.IBuffer ibuffer, UInt64 hnsPresenationTime, UInt64 hnsSampleDuration)\r\n        {\r\n            lock (lockObj)\r\n            {\r\n                if (_sampleQueue.Count >= VideoMediaStreamSource.maxQueueSize)\r\n                {\r\n                    // Dequeue and discard oldest\r\n                    _sampleQueue.Dequeue();\r\n                }\r\n\r\n                _sampleQueue.Enqueue(new VideoSample(ibuffer, hnsPresenationTime, hnsSampleDuration));\r\n                SendSamples();\r\n            }\r\n\r\n        }\r\n\r\n        private void SendSamples()\r\n        {\r\n            while (_sampleQueue.Count() > 0 && _outstandingGetVideoSampleCount > 0)\r\n            {\r\n                if (!(shutdownEvent.WaitOne(0)))\r\n                {\r\n                    VideoSample vs = _sampleQueue.Dequeue();\r\n                    Stream s = System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeBufferExtensions.AsStream(vs.buffer);\r\n\r\n                    // Send out the next sample\r\n                    MediaStreamSample msSamp = new MediaStreamSample(\r\n                        _videoDesc,\r\n                        s,\r\n                        0,\r\n                        s.Length,\r\n                        (long)vs.hnsPresentationTime,\r\n                        (long)vs.hnsSampleDuration,\r\n                        _emptySampleDict);\r\n\r\n                    ReportGetSampleCompleted(msSamp);\r\n                    _outstandingGetVideoSampleCount--;\r\n                }\r\n                else\r\n                {\r\n                    // If video rendering is shutting down we should no longer deliver frames\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void PrepareVideo()\r\n        {\r\n            // Stream Description \r\n            Dictionary<MediaStreamAttributeKeys, string> streamAttributes =\r\n                new Dictionary<MediaStreamAttributeKeys, string>();\r\n\r\n            // Select the same encoding and dimensions as the video capture\r\n            streamAttributes[MediaStreamAttributeKeys.VideoFourCC] = \"H264\";\r\n            streamAttributes[MediaStreamAttributeKeys.Height] = _frameHeight.ToString();\r\n            streamAttributes[MediaStreamAttributeKeys.Width] = _frameWidth.ToString();\r\n\r\n            MediaStreamDescription msd =\r\n                new MediaStreamDescription(MediaStreamType.Video, streamAttributes);\r\n\r\n            _videoDesc = msd;\r\n        }\r\n\r\n        private void PrepareAudio()\r\n        {\r\n        }\r\n\r\n        protected override void OpenMediaAsync()\r\n        {\r\n            // Init\r\n            Dictionary<MediaSourceAttributesKeys, string> sourceAttributes =\r\n                new Dictionary<MediaSourceAttributesKeys, string>();\r\n            List<MediaStreamDescription> availableStreams =\r\n                new List<MediaStreamDescription>();\r\n\r\n            PrepareVideo();\r\n\r\n            availableStreams.Add(_videoDesc);\r\n\r\n            // a zero timespan is an infinite video\r\n            sourceAttributes[MediaSourceAttributesKeys.Duration] =\r\n                TimeSpan.FromSeconds(0).Ticks.ToString(CultureInfo.InvariantCulture);\r\n\r\n            sourceAttributes[MediaSourceAttributesKeys.CanSeek] = false.ToString();\r\n\r\n            // tell Silverlight that we've prepared and opened our video\r\n            ReportOpenMediaCompleted(sourceAttributes, availableStreams);\r\n        }\r\n\r\n        protected override void GetSampleAsync(MediaStreamType mediaStreamType)\r\n        {\r\n            if (mediaStreamType == MediaStreamType.Audio)\r\n            {\r\n            }\r\n            else if (mediaStreamType == MediaStreamType.Video)\r\n            {\r\n                lock (lockObj)\r\n                {\r\n                    _outstandingGetVideoSampleCount++;\r\n                    SendSamples();\r\n                }\r\n            }\r\n        }\r\n\r\n        protected override void CloseMedia()\r\n        {\r\n        }\r\n\r\n        protected override void GetDiagnosticAsync(MediaStreamSourceDiagnosticKind diagnosticKind)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        protected override void SwitchMediaStreamAsync(MediaStreamDescription mediaStreamDescription)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        protected override void SeekAsync(long seekToTime)\r\n        {\r\n            ReportSeekCompleted(seekToTime);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Agents/VideoRenderer.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Microsoft.Phone.Media;\r\nusing PhoneVoIPApp.BackEnd;\r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Windows;\r\n\r\nnamespace PhoneVoIPApp.Agents\r\n{\r\n    /// <summary>\r\n    /// A class that renders video from the background process.\r\n    /// Note, the MediaElement that actually displays the video is in the UI process - \r\n    /// this class receives video from the remote party and writes it to a media streamer.\r\n    /// The media streamer handles connecting the rendered video stream to the media element that\r\n    /// displays it in the UI process.\r\n    /// </summary>\r\n    internal class VideoRenderer : IVideoRenderer\r\n    {\r\n        /// <summary>\r\n        /// Constructor\r\n        /// </summary>\r\n        internal VideoRenderer()\r\n        {\r\n        }\r\n\r\n        #region IVideoRenderer methods\r\n\r\n        /// <summary>\r\n        /// Start rendering video.\r\n        /// Note, this method may be called multiple times in a row.\r\n        /// </summary>\r\n        public void Start()\r\n        {\r\n            if (this.isRendering)\r\n                return; // Nothing more to be done\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                try\r\n                {\r\n                    Debug.WriteLine(\"[VideoRenderer::Start] Video rendering setup\");\r\n                    StartMediaStreamer();\r\n                    this.isRendering = true;\r\n                }\r\n                catch (Exception err)\r\n                {\r\n                    Debug.WriteLine(\"[VideoRenderer::Start] \" + err.Message);\r\n                }\r\n            });\r\n        }\r\n\r\n        private void StartMediaStreamer()\r\n        {\r\n            if (mediaStreamer == null)\r\n            {\r\n                mediaStreamer = MediaStreamerFactory.CreateMediaStreamer(123);\r\n            }\r\n\r\n            // Using default resolution of 640x480\r\n            mediaStreamSource = new VideoMediaStreamSource(null, 640, 480);\r\n            mediaStreamer.SetSource(mediaStreamSource);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stop rendering video.\r\n        /// Note, this method may be called multiple times in a row.\r\n        /// </summary>\r\n        public void Stop()\r\n        {\r\n            Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                if (!this.isRendering)\r\n                    return; // Nothing more to be done\r\n\r\n                Debug.WriteLine(\"[VoIP Background Process] Video rendering stopped.\");\r\n                mediaStreamSource.Shutdown();                \r\n                mediaStreamSource.Dispose();\r\n                mediaStreamSource = null;\r\n                mediaStreamer.Dispose();\r\n                mediaStreamer = null;\r\n\r\n                this.isRendering = false;\r\n            });\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Private members\r\n\r\n        // Indicates if rendering is already in progress or not\r\n        private bool isRendering;\r\n        private VideoMediaStreamSource mediaStreamSource;\r\n        private MediaStreamer mediaStreamer;\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/ApiLock.cpp",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"ApiLock.h\"\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n    namespace BackEnd\r\n    {\r\n        // A mutex used to protect objects accessible from the API surface exposed by this DLL\r\n        std::recursive_mutex g_apiLock;\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/ApiLock.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n#include <mutex>\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n    namespace BackEnd\r\n    {\r\n        // A mutex used to protect objects accessible from the API surface exposed by this DLL\r\n        extern std::recursive_mutex g_apiLock;\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/BackEnd.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|ARM\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{c8d75245-ffcf-4932-a228-c9cc8bb60b03}</ProjectGuid>\r\n    <RootNamespace>PhoneVoIPApp.BackEnd</RootNamespace>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and '$(VisualStudioVersion)' == ''\">$(VCTargetsPath11)</VCTargetsPath>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n    <TargetPlatformIdentifier>Windows Phone</TargetPlatformIdentifier>\r\n    <TargetPlatformVersion>8.0</TargetPlatformVersion>\r\n    <WinMDAssembly>true</WinMDAssembly>\r\n    <ProjectName>BackEnd</ProjectName>\r\n    <ApplicationType>Windows Phone Silverlight</ApplicationType>\r\n    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <MidlEnv>win32</MidlEnv>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <MidlEnv>arm32</MidlEnv>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <MidlEnv>win32</MidlEnv>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <MidlEnv>arm32</MidlEnv>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup>\r\n    <GenerateManifest>false</GenerateManifest>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <TargetName>$(RootNamespace)</TargetName>\r\n    <CustomBuildAfterTargets>PostBuildEvent</CustomBuildAfterTargets>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <TargetName>$(RootNamespace)</TargetName>\r\n    <CustomBuildAfterTargets>PostBuildEvent</CustomBuildAfterTargets>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <TargetName>$(RootNamespace)</TargetName>\r\n    <CustomBuildAfterTargets>PostBuildEvent</CustomBuildAfterTargets>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <TargetName>$(RootNamespace)</TargetName>\r\n    <CustomBuildAfterTargets>PostBuildEvent</CustomBuildAfterTargets>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;WIN32_LEAN_AND_MEAN;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;WIN32_LEAN_AND_MEAN;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup>\r\n    <ClCompile>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">true</CompileAsWinRT>\r\n      <CompileAsWinRT Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">true</CompileAsWinRT>\r\n      <CompileAsWinRT Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</CompileAsWinRT>\r\n      <CompileAsWinRT Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</CompileAsWinRT>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <AdditionalDependencies>windowsphonecore.lib;runtimeobject.lib;PhoneAudioSes.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n      <!-- TODO:Please remove below IgnoreSpecificDefaultLibraries once dev11 bug 362091 is fixed -->\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">true</GenerateWindowsMetadata>\r\n      <GenerateWindowsMetadata Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">true</GenerateWindowsMetadata>\r\n      <GenerateWindowsMetadata Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</GenerateWindowsMetadata>\r\n      <GenerateWindowsMetadata Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</GenerateWindowsMetadata>\r\n    </Link>\r\n    <CustomBuildStep>\r\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n        pushd \"$(OutDir)\"\r\n        WinMdIdl.exe \"$(OutDir)$(RootNamespace).winmd\"\r\n        MIdl.exe /env $(MidlEnv) /winrt /ns_prefix /metadata_dir \"$(TargetPlatformSdkMetadataLocation)\" /out \"$(SolutionDir)$(ProjectName)ProxyStub\" \"$(OutDir)$(RootNamespace).idl\"\r\n        MIdl.exe /env $(MidlEnv) /winrt /ns_prefix /metadata_dir \"$(TargetPlatformSdkMetadataLocation)\" /out \"$(SolutionDir)$(ProjectName)ProxyStub\" \"$(OutDir)$(RootNamespace).OutOfProcess.idl\"\r\n        popd</Command>\r\n    </CustomBuildStep>\r\n    <CustomBuildStep>\r\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">$(OutDir)$(RootNamespace).idl;$(OutDir)$(RootNamespace).OutOfProcess.idl;$(SolutionDir)$(ProjectName)ProxyStub\\dlldata.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace)_i.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace)_p.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).h;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess.h;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess_i.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess_p.c;%(Outputs)</Outputs>\r\n    </CustomBuildStep>\r\n    <CustomBuildStep>\r\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n        pushd \"$(OutDir)\"\r\n        WinMdIdl.exe \"$(OutDir)$(RootNamespace).winmd\"\r\n        MIdl.exe /env $(MidlEnv) /winrt /ns_prefix /metadata_dir \"$(TargetPlatformSdkMetadataLocation)\" /out \"$(SolutionDir)$(ProjectName)ProxyStub\" \"$(OutDir)$(RootNamespace).idl\"\r\n        MIdl.exe /env $(MidlEnv) /winrt /ns_prefix /metadata_dir \"$(TargetPlatformSdkMetadataLocation)\" /out \"$(SolutionDir)$(ProjectName)ProxyStub\" \"$(OutDir)$(RootNamespace).OutOfProcess.idl\"       \r\n        popd</Command>\r\n    </CustomBuildStep>\r\n    <CustomBuildStep>\r\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">$(OutDir)$(RootNamespace).idl;$(OutDir)$(RootNamespace).OutOfProcess.idl;$(SolutionDir)$(ProjectName)ProxyStub\\dlldata.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace)_i.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace)_p.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).h;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess.h;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess_i.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess_p.c;%(Outputs)</Outputs>\r\n    </CustomBuildStep>\r\n    <CustomBuildStep>\r\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n        pushd \"$(OutDir)\"\r\n        WinMdIdl.exe \"$(OutDir)$(RootNamespace).winmd\"\r\n        MIdl.exe /env $(MidlEnv) /winrt /ns_prefix /metadata_dir \"$(TargetPlatformSdkMetadataLocation)\" /out \"$(SolutionDir)$(ProjectName)ProxyStub\" \"$(OutDir)$(RootNamespace).idl\"\r\n        MIdl.exe /env $(MidlEnv) /winrt /ns_prefix /metadata_dir \"$(TargetPlatformSdkMetadataLocation)\" /out \"$(SolutionDir)$(ProjectName)ProxyStub\" \"$(OutDir)$(RootNamespace).OutOfProcess.idl\"\r\n        popd</Command>\r\n    </CustomBuildStep>\r\n    <CustomBuildStep>\r\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$(OutDir)$(RootNamespace).idl;$(OutDir)$(RootNamespace).OutOfProcess.idl;$(SolutionDir)$(ProjectName)ProxyStub\\dlldata.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace)_i.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace)_p.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).h;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess.h;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess_i.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess_p.c;%(Outputs)</Outputs>\r\n    </CustomBuildStep>\r\n    <CustomBuildStep>\r\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n        pushd \"$(OutDir)\"\r\n        WinMdIdl.exe \"$(OutDir)$(RootNamespace).winmd\"\r\n        MIdl.exe /env $(MidlEnv) /winrt /ns_prefix /metadata_dir \"$(TargetPlatformSdkMetadataLocation)\" /out \"$(SolutionDir)$(ProjectName)ProxyStub\" \"$(OutDir)$(RootNamespace).idl\"\r\n        MIdl.exe /env $(MidlEnv) /winrt /ns_prefix /metadata_dir \"$(TargetPlatformSdkMetadataLocation)\" /out \"$(SolutionDir)$(ProjectName)ProxyStub\" \"$(OutDir)$(RootNamespace).OutOfProcess.idl\"\r\n        popd</Command>\r\n    </CustomBuildStep>\r\n    <CustomBuildStep>\r\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$(OutDir)$(RootNamespace).idl;$(OutDir)$(RootNamespace).OutOfProcess.idl;$(SolutionDir)$(ProjectName)ProxyStub\\dlldata.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace)_i.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace)_p.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).h;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess.h;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess_i.c;$(SolutionDir)$(ProjectName)ProxyStub\\$(RootNamespace).OutOfProcess_p.c;%(Outputs)</Outputs>\r\n    </CustomBuildStep>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Windows\">\r\n      <IsWinMDFile>true</IsWinMDFile>\r\n    </Reference>\r\n    <Reference Include=\"platform.winmd\">\r\n      <IsWinMDFile>true</IsWinMDFile>\r\n      <Private>false</Private>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"ApiLock.h\" />\r\n    <ClInclude Include=\"BackEndAudio.h\" />\r\n    <ClInclude Include=\"BackEndCapture.h\" />\r\n    <ClInclude Include=\"BackEndNativeBuffer.h\" />\r\n    <ClInclude Include=\"BackEndTransport.h\" />\r\n    <ClInclude Include=\"CallController.h\" />\r\n    <ClInclude Include=\"Globals.h\" />\r\n    <ClInclude Include=\"ICallControllerStatusListener.h\" />\r\n    <ClInclude Include=\"IConfig.h\" />\r\n    <ClInclude Include=\"IVideoRenderer.h\" />\r\n    <ClInclude Include=\"IMTProtoUpdater.h\" />\r\n    <ClInclude Include=\"Server.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"ApiLock.cpp\" />\r\n    <ClCompile Include=\"BackEndAudio.cpp\" />\r\n    <ClCompile Include=\"BackEndCapture.cpp\" />\r\n    <ClCompile Include=\"BackEndTransport.cpp\" />\r\n    <ClCompile Include=\"CallController.cpp\" />\r\n    <ClCompile Include=\"Globals.cpp\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\libtgvoip-public\\libtgvoip.WP81.vcxproj\">\r\n      <Project>{21f10158-c078-4bd7-a82a-9c4aeb8e2f8e}</Project>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\WindowsPhone\\v$(TargetPlatformVersion)\\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "BackEnd/BackEndAudio.cpp",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"BackEndAudio.h\"\r\n#include \"ApiLock.h\"\r\n#include \"BackEndNativeBuffer.h\"\r\n\r\nusing namespace PhoneVoIPApp::BackEnd;\r\nusing namespace Windows::System::Threading;\r\n\r\n// Begin of audio helpers\r\n//size_t inline GetWaveFormatSize(const WAVEFORMATEX& format)\r\n//{\r\n//    return (sizeof WAVEFORMATEX) + (format.wFormatTag == WAVE_FORMAT_PCM ? 0 : format.cbSize);\r\n//}\r\n//\r\n//void FillPcmFormat(WAVEFORMATEX& format, WORD wChannels, int nSampleRate, WORD wBits)\r\n//{\r\n//    format.wFormatTag        = WAVE_FORMAT_PCM;\r\n//    format.nChannels         = wChannels;\r\n//    format.nSamplesPerSec    = nSampleRate;\r\n//    format.wBitsPerSample    = wBits;\r\n//    format.nBlockAlign       = format.nChannels * (format.wBitsPerSample / 8);\r\n//    format.nAvgBytesPerSec   = format.nSamplesPerSec * format.nBlockAlign;\r\n//    format.cbSize            = 0;\r\n//}\r\n//\r\n//size_t BytesFromDuration(int nDurationInMs, const WAVEFORMATEX& format)\r\n//{\r\n//    return size_t(nDurationInMs * FLOAT(format.nAvgBytesPerSec) / 1000);\r\n//}\r\n//\r\n//size_t SamplesFromDuration(int nDurationInMs, const WAVEFORMATEX& format)\r\n//{\r\n//    return size_t(nDurationInMs * FLOAT(format.nSamplesPerSec) / 1000);\r\n//}\r\n//// End of audio helpers\r\n//\r\n//BOOL WaveFormatCompare(const WAVEFORMATEX& format1, const WAVEFORMATEX& format2)\r\n//{\r\n//    size_t cbSizeFormat1 = GetWaveFormatSize(format1);\r\n//    size_t cbSizeFormat2 = GetWaveFormatSize(format2);\r\n//\r\n//    return (cbSizeFormat1 == cbSizeFormat2) && (memcmp(&format1, &format2, cbSizeFormat1) == 0);\r\n//}\r\n//\r\n//BackEndAudio::BackEndAudio() :\r\n//    m_pDefaultRenderDevice(NULL),\r\n//    m_pRenderClient(NULL),\r\n//    m_pClock(NULL),\r\n//    m_pVolume(NULL),\r\n//    m_nMaxFrameCount(0),\r\n//    m_pwfx(NULL),\r\n//    m_pDefaultCaptureDevice(NULL),\r\n//    m_pCaptureClient(NULL),\r\n//    m_sourceFrameSizeInBytes(0),\r\n//    hCaptureEvent(NULL),\r\n//    hShutdownEvent(NULL),\r\n//    m_CaptureThread(nullptr),\r\n//    transportController(nullptr),\r\n//    started(false)\r\n//{\r\n//    this->onTransportMessageReceivedHandler = ref new MessageReceivedEventHandler(this, &BackEndAudio::OnTransportMessageReceived);\r\n//}\r\n//\r\n//void BackEndAudio::OnTransportMessageReceived(Windows::Storage::Streams::IBuffer^ stream, UINT64, UINT64)\r\n//{\r\n//    BYTE* pBuffer = NativeBuffer::GetBytesFromIBuffer(stream);\r\n//    int size = stream->Length;\r\n//\r\n//    while (m_pRenderClient && size && pBuffer)\r\n//    {\r\n//        HRESULT hr = E_FAIL;\r\n//        unsigned int padding = 0;\r\n//\r\n//        hr = m_pDefaultRenderDevice->GetCurrentPadding(&padding);\r\n//        if (SUCCEEDED(hr))\r\n//        {\r\n//            BYTE* pRenderBuffer = NULL;\r\n//            unsigned int incomingFrameCount = size / m_sourceFrameSizeInBytes;\r\n//            unsigned int framesToWrite = m_nMaxFrameCount - padding;\r\n//            \r\n//            if (framesToWrite > incomingFrameCount)\r\n//            {\r\n//                framesToWrite = incomingFrameCount;\r\n//            }\r\n//\r\n//            if (framesToWrite)\r\n//            {\r\n//                hr = m_pRenderClient->GetBuffer(framesToWrite, &pRenderBuffer);\r\n//\r\n//                if (SUCCEEDED(hr))\r\n//                {\r\n//                    unsigned int bytesToBeWritten = framesToWrite * m_sourceFrameSizeInBytes;\r\n//\r\n//                    memcpy(pRenderBuffer, pBuffer, bytesToBeWritten);\r\n//\r\n//                    // Release the buffer\r\n//                    m_pRenderClient->ReleaseBuffer(framesToWrite, 0);\r\n//\r\n//                    pBuffer += bytesToBeWritten;\r\n//                    size -= bytesToBeWritten;\r\n//                }\r\n//            }\r\n//        }\r\n//    }\r\n//}\r\n//\r\n//void BackEndAudio::Start()\r\n//{\r\n//    // Make sure only one API call is in progress at a time\r\n//    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n//\r\n//    if (started)\r\n//        return;\r\n//\r\n//    HRESULT hr = InitCapture();\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hr =  InitRender();\r\n//    }\r\n//\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hr = StartAudioThreads();\r\n//    }\r\n//\r\n//    if (FAILED(hr))\r\n//    {\r\n//        Stop();\r\n//        throw ref new Platform::COMException(hr, L\"Unable to start audio\");\r\n//    }\r\n//\r\n//    started = true;\r\n//}\r\n//\r\n//void BackEndAudio::Stop()\r\n//{\r\n//    // Make sure only one API call is in progress at a time\r\n//    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n//\r\n//    if (!started)\r\n//        return;\r\n//\r\n//    // Shutdown the threads\r\n//    if (hShutdownEvent)\r\n//    {\r\n//        SetEvent(hShutdownEvent);\r\n//    }\r\n//\r\n//    if (m_CaptureThread != nullptr)\r\n//    {\r\n//        m_CaptureThread->Cancel();\r\n//        m_CaptureThread->Close();\r\n//        m_CaptureThread = nullptr;\r\n//    }\r\n//\r\n//    if (m_pDefaultRenderDevice)\r\n//    {\r\n//        m_pDefaultRenderDevice->Stop();\r\n//    }\r\n//\r\n//    if (m_pDefaultCaptureDevice)\r\n//    {\r\n//        m_pDefaultCaptureDevice->Stop();\r\n//    }\r\n//\r\n//    if (m_pVolume)\r\n//    {\r\n//        m_pVolume->Release();\r\n//        m_pVolume = NULL;\r\n//    }\r\n//    if (m_pClock)\r\n//    {\r\n//        m_pClock->Release();\r\n//        m_pClock = NULL;\r\n//    }\r\n//\r\n//    if (m_pRenderClient)\r\n//    {\r\n//        m_pRenderClient->Release();\r\n//        m_pRenderClient = NULL;\r\n//    }\r\n//\r\n//\r\n//\r\n//    if (m_pDefaultRenderDevice)\r\n//    {\r\n//        m_pDefaultRenderDevice->Release();\r\n//        m_pDefaultRenderDevice = NULL;\r\n//    }\r\n//\r\n//    if (m_pDefaultCaptureDevice)\r\n//    {\r\n//        m_pDefaultCaptureDevice->Release();\r\n//        m_pDefaultCaptureDevice = NULL;\r\n//    }\r\n//\r\n//\tif (m_pCaptureClient)\r\n//\t{\r\n//\t\tm_pCaptureClient->Release();\r\n//\t\tm_pCaptureClient = NULL;\r\n//\t}\r\n//\r\n//    if (m_pwfx)\r\n//    {\r\n//        CoTaskMemFree((LPVOID)m_pwfx);\r\n//        m_pwfx = NULL;\r\n//    }\r\n//\r\n//    if (hCaptureEvent)\r\n//    {\r\n//        CloseHandle(hCaptureEvent);\r\n//        hCaptureEvent = NULL;\r\n//    }\r\n//\r\n//    if (hShutdownEvent)\r\n//    {\r\n//        CloseHandle(hShutdownEvent);\r\n//        hShutdownEvent = NULL;\r\n//    }\r\n//\r\n//    started = false;\r\n//}\r\n//\r\n//void BackEndAudio::CaptureThread(Windows::Foundation::IAsyncAction^ operation)\r\n//{\r\n//    HRESULT hr = m_pDefaultCaptureDevice->Start();\r\n//    BYTE *pLocalBuffer = new BYTE[MAX_RAW_BUFFER_SIZE];\r\n//    HANDLE eventHandles[] = {\r\n//                             hCaptureEvent,        // WAIT_OBJECT0 \r\n//                             hShutdownEvent        // WAIT_OBJECT0 + 1\r\n//                            };\r\n//\r\n//    if (SUCCEEDED(hr) && pLocalBuffer)\r\n//    {\r\n//        unsigned int uAccumulatedBytes = 0;\r\n//        while (SUCCEEDED(hr))\r\n//        {\r\n//            DWORD waitResult = WaitForMultipleObjectsEx(SIZEOF_ARRAY(eventHandles), eventHandles, FALSE, INFINITE, FALSE);\r\n//            if (WAIT_OBJECT_0 == waitResult)\r\n//            {\r\n//                BYTE* pbData = nullptr;\r\n//                UINT32 nFrames = 0;\r\n//                DWORD dwFlags = 0;\r\n//                if (SUCCEEDED(hr))\r\n//                {\r\n//                    hr = m_pCaptureClient->GetBuffer(&pbData, &nFrames, &dwFlags, nullptr, nullptr);\r\n//                    unsigned int incomingBufferSize = nFrames * m_sourceFrameSizeInBytes;\r\n//\r\n//                    if (MAX_RAW_BUFFER_SIZE - uAccumulatedBytes < incomingBufferSize)\r\n//                    {\r\n//                        // Send what has been accumulated\r\n//                        if (transportController)\r\n//                        {\r\n//                            transportController->WriteAudio(pLocalBuffer, uAccumulatedBytes);\r\n//                        }\r\n//\r\n//                        // Reset our counter\r\n//                        uAccumulatedBytes = 0;\r\n//                    }\r\n//\r\n//                    memcpy(pLocalBuffer + uAccumulatedBytes, pbData, incomingBufferSize);\r\n//                    uAccumulatedBytes += incomingBufferSize;\r\n//                }\r\n//\r\n//                if (SUCCEEDED(hr))\r\n//                {\r\n//                    hr = m_pCaptureClient->ReleaseBuffer(nFrames);\r\n//                }\r\n//            }\r\n//            else if (WAIT_OBJECT_0 + 1 == waitResult)\r\n//            {\r\n//                // We're being asked to shutdown\r\n//                break;\r\n//            }\r\n//            else\r\n//            {\r\n//                // Unknown return value\r\n//                DbgRaiseAssertionFailure();\r\n//            }\r\n//        }\r\n//    }\r\n//    delete[] pLocalBuffer;\r\n//}\r\n//\r\n//HRESULT BackEndAudio::StartAudioThreads()\r\n//{\r\n//    hShutdownEvent = CreateEventEx(NULL, NULL, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);\r\n//    if (!hShutdownEvent)\r\n//    {\r\n//        return HRESULT_FROM_WIN32(GetLastError());\r\n//    }\r\n//\r\n//    m_CaptureThread = ThreadPool::RunAsync(ref new WorkItemHandler(this, &BackEndAudio::CaptureThread), WorkItemPriority::High, WorkItemOptions::TimeSliced);\r\n//    return S_OK;\r\n//}\r\n//\r\n//BackEndAudio::~BackEndAudio()\r\n//{\r\n//    if (transportController)\r\n//    {\r\n//        transportController->AudioMessageReceived -= onTransportMessageReceivedHandlerToken;\r\n//        transportController = nullptr;\r\n//    }\r\n//}\r\n//\r\n//HRESULT BackEndAudio::InitRender()\r\n//{\r\n//    HRESULT hr = E_FAIL;\r\n//\r\n//    LPCWSTR pwstrRendererId = GetDefaultAudioRenderId(AudioDeviceRole::Communications);\r\n//\r\n//    if (NULL == pwstrRendererId)\r\n//    {\r\n//        hr = E_FAIL;\r\n//    }\r\n//\r\n//    hr = ActivateAudioInterface(pwstrRendererId, __uuidof(IAudioClient2), (void**)&m_pDefaultRenderDevice);\r\n//\r\n//        // Set the category through SetClientProperties\r\n//    AudioClientProperties properties = {};\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        properties.cbSize = sizeof AudioClientProperties;\r\n//        properties.eCategory = AudioCategory_Communications;\r\n//        hr = m_pDefaultRenderDevice->SetClientProperties(&properties);\r\n//    }\r\n//\r\n//    WAVEFORMATEX* pwfx = nullptr;\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hr = m_pDefaultRenderDevice->GetMixFormat(&pwfx);\r\n//    }\r\n//\r\n//    WAVEFORMATEX format = {};\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        FillPcmFormat(format, pwfx->nChannels, pwfx->nSamplesPerSec, pwfx->wBitsPerSample); \r\n//        hr = m_pDefaultRenderDevice->Initialize(AUDCLNT_SHAREMODE_SHARED,\r\n//            0,\r\n//            2000 * 10000,  // Seconds in hns\r\n//            0, // periodicity\r\n//            &format, \r\n//            NULL);\r\n//    }\r\n//\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hr = m_pDefaultRenderDevice->GetService(__uuidof(IAudioRenderClient), (void**)&m_pRenderClient);\r\n//    }\r\n//    \r\n//    // Check for other supported GetService interfaces as well\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hr = m_pDefaultRenderDevice->GetService(__uuidof(IAudioClock), (void**)&m_pClock);\r\n//    }\r\n//\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hr = m_pDefaultRenderDevice->GetService(__uuidof(ISimpleAudioVolume), (void**)&m_pVolume);\r\n//    }\r\n//\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hr = m_pDefaultRenderDevice->GetBufferSize(&m_nMaxFrameCount);\r\n//    }\r\n//\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hr = m_pDefaultRenderDevice->Start();\r\n//    }\r\n//\r\n//    if (pwstrRendererId)\r\n//    {\r\n//        CoTaskMemFree((LPVOID)pwstrRendererId);\r\n//    }\r\n//\r\n//    return hr;\r\n//}\r\n//\r\n//HRESULT BackEndAudio::InitCapture()\r\n//{\r\n//    HRESULT hr = E_FAIL;\r\n//\r\n//    LPCWSTR pwstrCaptureId = GetDefaultAudioCaptureId(AudioDeviceRole::Communications);\r\n//\r\n//    if (NULL == pwstrCaptureId)\r\n//    {\r\n//        hr = E_FAIL;\r\n//    }\r\n//\r\n//    hr = ActivateAudioInterface(pwstrCaptureId, __uuidof(IAudioClient2), (void**)&m_pDefaultCaptureDevice);\r\n//\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hr = m_pDefaultCaptureDevice->GetMixFormat(&m_pwfx);\r\n//    }\r\n//\r\n//    // Set the category through SetClientProperties\r\n//    AudioClientProperties properties = {};\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        properties.cbSize = sizeof AudioClientProperties;\r\n//        properties.eCategory = AudioCategory_Communications;\r\n//        hr = m_pDefaultCaptureDevice->SetClientProperties(&properties);\r\n//    }\r\n//\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//\t\tWAVEFORMATEX format = {};\r\n//\t\tif (SUCCEEDED(hr))\r\n//\t\t{\r\n//\r\n//\t\t\tFillPcmFormat(format, m_pwfx->nChannels, m_pwfx->nSamplesPerSec, m_pwfx->wBitsPerSample);\r\n//\r\n//\t\t\tm_sourceFrameSizeInBytes = (format.wBitsPerSample / 8) * format.nChannels;\r\n//\t\t\thr = m_pDefaultCaptureDevice->Initialize(AUDCLNT_SHAREMODE_SHARED, 0x88140000, 1000 * 10000, 0, &format, NULL);\r\n//\t\t}\r\n//    }\r\n//\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hCaptureEvent = CreateEventEx(NULL, NULL, 0, EVENT_ALL_ACCESS);\r\n//        if (NULL == hCaptureEvent)\r\n//        {\r\n//            hr = HRESULT_FROM_WIN32(GetLastError());\r\n//        }\r\n//    }\r\n//\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hr = m_pDefaultCaptureDevice->SetEventHandle(hCaptureEvent);\r\n//    }\r\n//\r\n//    if (SUCCEEDED(hr))\r\n//    {\r\n//        hr = m_pDefaultCaptureDevice->GetService(__uuidof(IAudioCaptureClient), (void**)&m_pCaptureClient);\r\n//    }\r\n//    \r\n//    if (pwstrCaptureId)\r\n//    {\r\n//        CoTaskMemFree((LPVOID)pwstrCaptureId);\r\n//    }\r\n//    return hr;\r\n//}\r\n//\r\n//void BackEndAudio::SetTransport(BackEndTransport^ transport)\r\n//{\r\n//    transportController = transport;\r\n//    if (transportController != nullptr)\r\n//    {\r\n//        onTransportMessageReceivedHandlerToken = transportController->AudioMessageReceived += onTransportMessageReceivedHandler;\r\n//    }\r\n//}\r\n"
  },
  {
    "path": "BackEnd/BackEndAudio.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n#include \"windows.h\"\r\n\r\n#define MAX_RAW_BUFFER_SIZE 1024*128\r\n\r\n#include <synchapi.h>\r\n#include <audioclient.h>\r\n#include <phoneaudioclient.h>\r\n\r\n#include \"BackEndTransport.h\"\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n    namespace BackEnd\r\n    {\r\n        //public ref class BackEndAudio sealed\r\n        //{\r\n        //public:\r\n        //    // Constructor\r\n        //    BackEndAudio();\r\n\r\n        //    // Destructor\r\n        //    virtual ~BackEndAudio();\r\n\r\n        //    void SetTransport(BackEndTransport^ transport);\r\n        //    \r\n        //    void Start();\r\n        //    void Stop();\r\n\r\n        //private:\r\n        //    HRESULT InitRender();\r\n        //    HRESULT InitCapture();\r\n        //    HRESULT StartAudioThreads();\r\n        //    void CaptureThread(Windows::Foundation::IAsyncAction^ operation);\r\n        //    void OnTransportMessageReceived(Windows::Storage::Streams::IBuffer^ stream, UINT64, UINT64);\r\n        //    \r\n        //    BackEndTransport^ transportController;\r\n\r\n        //    PhoneVoIPApp::BackEnd::MessageReceivedEventHandler^ onTransportMessageReceivedHandler;\r\n        //    Windows::Foundation::EventRegistrationToken onTransportMessageReceivedHandlerToken;\r\n\r\n        //    int m_sourceFrameSizeInBytes;\r\n\r\n        //    WAVEFORMATEX* m_pwfx;\r\n\r\n        //    // Devices\r\n        //    IAudioClient2* m_pDefaultRenderDevice;\r\n        //    IAudioClient2* m_pDefaultCaptureDevice;\r\n\r\n        //    // Actual render and capture objects\r\n        //    IAudioRenderClient* m_pRenderClient;\r\n        //    IAudioCaptureClient* m_pCaptureClient;\r\n\r\n        //    // Misc interfaces\r\n        //    IAudioClock* m_pClock; \r\n        //    ISimpleAudioVolume* m_pVolume;\r\n\r\n        //    // Audio buffer size\r\n        //    UINT32 m_nMaxFrameCount;\r\n        //    HANDLE hCaptureEvent;\r\n\r\n        //    // Event for stopping audio capture/render\r\n        //    HANDLE hShutdownEvent;\r\n\r\n        //    Windows::Foundation::IAsyncAction^ m_CaptureThread;\r\n\r\n        //    // Has audio started?\r\n        //    bool started;\r\n        //};\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/BackEndCapture.cpp",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"BackEndCapture.h\"\r\n#include \"ApiLock.h\"\r\n#include <ppltasks.h>\r\n\r\nusing namespace PhoneVoIPApp::BackEnd;\r\nusing namespace Windows::System::Threading;\r\nusing namespace Microsoft::WRL;\r\nusing namespace Windows::Foundation;\r\nusing namespace Platform;\r\nusing namespace Windows::Phone::Media::Capture;\r\nusing namespace Windows::Storage::Streams;\r\nusing namespace Concurrency;\r\n\r\nBackEndCapture::BackEndCapture() :\r\n    started(false),\r\n    videoOnlyDevice(nullptr),\r\n    pVideoSink(NULL),\r\n    pVideoDevice(NULL),\r\n    cameraLocation(CameraSensorLocation::Front)\r\n{\r\n    hStopCompleted = CreateEventEx(NULL, NULL, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);\r\n    if (!hStopCompleted)\r\n    {\r\n        throw ref new Platform::Exception(HRESULT_FROM_WIN32(GetLastError()), L\"Could not create shutdown event\");\r\n    }\r\n\r\n    hStartCompleted = CreateEventEx(NULL, NULL, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);\r\n    if (!hStartCompleted)\r\n    {\r\n        throw ref new Platform::Exception(HRESULT_FROM_WIN32(GetLastError()), L\"Could not create start event\");\r\n    }\r\n}\r\n\r\nvoid BackEndCapture::Start(CameraLocation newCameraLocation)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if (started)\r\n        return;\r\n    if(newCameraLocation == CameraLocation::Front)\r\n    {\r\n        cameraLocation = Windows::Phone::Media::Capture::CameraSensorLocation::Front;\r\n    }\r\n    else if(newCameraLocation == CameraLocation::Back)\r\n    {\r\n        cameraLocation = Windows::Phone::Media::Capture::CameraSensorLocation::Back;\r\n    }\r\n\r\n    InitCapture();\r\n\r\n    started = true;\r\n}\r\n\r\nvoid BackEndCapture::Stop()\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n    ::OutputDebugString(L\"+[BackendCapture::Stop] => Trying to stop capture\\n\");\r\n    if (!started)\r\n    {\r\n        ::OutputDebugString(L\"-[BackendCapture::Stop] => finished stopping capture\\n\");\r\n        return;\r\n    }\r\n    if (videoOnlyDevice)\r\n    {\r\n        OutputDebugString(L\"Destroying VideoCaptureDevice\\n\");\r\n\r\n        try\r\n        {\r\n            videoOnlyDevice->StopRecordingAsync()->Completed = ref new AsyncActionCompletedHandler([this] (IAsyncAction ^action, Windows::Foundation::AsyncStatus status){\r\n                if(status == Windows::Foundation::AsyncStatus::Completed)\r\n                {\r\n                    OutputDebugString(L\"[BackendCapture::StopRecordingAsync]  Video successfully stopped.\\n\");\r\n                }\r\n                else\r\n                {\r\n                    OutputDebugString(L\"[BackEndCapture::StopRecordingAsync] Error occurred while stopping recording.\\n\");\r\n                }\r\n                this->videoCaptureAction = nullptr;\r\n                this->videoOnlyDevice = nullptr;\r\n                started = false;\r\n                SetEvent(hStopCompleted);\r\n            });\r\n        }\r\n        catch(...)\r\n        {\r\n            // A Platform::ObjectDisposedException can be raised if the app has had its access\r\n            // to video revoked (most commonly when the app is going out of the foreground)\r\n            OutputDebugString(L\"Exception caught while destroying video capture\\n\");\r\n            this->videoCaptureAction = nullptr;\r\n            this->videoOnlyDevice = nullptr;\r\n            started = false;\r\n            SetEvent(hStopCompleted);\r\n        }\r\n\r\n        if (pVideoDevice)\r\n        {\r\n            pVideoDevice->Release();\r\n            pVideoDevice = NULL;\r\n        }\r\n\r\n        if (pVideoSink)\r\n        {\r\n            pVideoSink->Release();\r\n            pVideoSink = NULL;\r\n        }\r\n    }\r\n    ::OutputDebugString(L\"-[BackendCapture::Stop] => finished stopping capture\\n\");\r\n}\r\n\r\nBackEndCapture::~BackEndCapture()\r\n{\r\n    if(m_ToggleThread)\r\n    {\r\n        m_ToggleThread->Cancel();\r\n        m_ToggleThread->Close();\r\n        m_ToggleThread = nullptr;\r\n    }\r\n}\r\n\r\nvoid BackEndCapture::InitCapture()\r\n{\r\n    ::OutputDebugString(L\"+[BackendCapture::InitCapture] => Initializing Capture\\n\");\r\n    Windows::Foundation::Size dimensions;\r\n    dimensions.Width = 640;\r\n    dimensions.Height = 480;\r\n    Collections::IVectorView<Size> ^availableSizes = AudioVideoCaptureDevice::GetAvailableCaptureResolutions(this->cameraLocation);\r\n    Collections::IIterator<Windows::Foundation::Size> ^availableSizesIterator = availableSizes->First();\r\n\r\n    IAsyncOperation<AudioVideoCaptureDevice^> ^openOperation = nullptr;\r\n    while(!openOperation && availableSizesIterator->HasCurrent)\r\n    {\r\n        // TODO: You should select the appropriate resolution that's supported here,\r\n        // TODO: and then setup your renderer with that selected res.\r\n        // TODO: This shows how to iterate through all supported resolutions.  We're assuming 640x480 support\r\n        if(availableSizesIterator->Current.Height == 480 && availableSizesIterator->Current.Width == 640)\r\n        {\r\n            openOperation = AudioVideoCaptureDevice::OpenForVideoOnlyAsync(this->cameraLocation, dimensions);\r\n        }\r\n        availableSizesIterator->MoveNext();\r\n    }\r\n\r\n    openOperation->Completed = ref new AsyncOperationCompletedHandler<AudioVideoCaptureDevice^>([this] (IAsyncOperation<AudioVideoCaptureDevice^> ^operation, Windows::Foundation::AsyncStatus status)\r\n    {\r\n        if(status == Windows::Foundation::AsyncStatus::Completed)\r\n        {\r\n            std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n            \r\n            ::OutputDebugString(L\"+[BackendCapture::InitCapture] => OpenAsyncOperation started\\n\");\r\n            \r\n            auto videoDevice = operation->GetResults();\r\n\r\n            this->videoOnlyDevice = videoDevice;\r\n            IAudioVideoCaptureDeviceNative *pNativeDevice = NULL; \r\n            HRESULT hr = reinterpret_cast<IUnknown*>(videoDevice)->QueryInterface(__uuidof(IAudioVideoCaptureDeviceNative), (void**) &pNativeDevice);\r\n            \r\n            if (NULL == pNativeDevice || FAILED(hr))\r\n            {\r\n                throw ref new FailureException(\"Unable to QI IAudioVideoCaptureDeviceNative\");\r\n            }\r\n\r\n            // Save off the native device\r\n            this->pVideoDevice = pNativeDevice;\r\n\r\n            // Create the sink\r\n            MakeAndInitialize<CaptureSampleSink>(&(this->pVideoSink), transportController);\r\n            this->pVideoSink->SetTransport(this->transportController);\r\n            pNativeDevice->SetVideoSampleSink(this->pVideoSink);\r\n\r\n            // Use the same encoding format as in VideoMediaStreamSource.cs\r\n            videoDevice->VideoEncodingFormat = CameraCaptureVideoFormat::H264;\r\n\r\n            SetEvent(hStartCompleted);\r\n\r\n            // Start recording to our sink\r\n            this->videoCaptureAction = videoDevice->StartRecordingToSinkAsync();\r\n            videoCaptureAction->Completed = ref new AsyncActionCompletedHandler([this] (IAsyncAction ^asyncInfo, Windows::Foundation::AsyncStatus status)\r\n            {\r\n                if(status == Windows::Foundation::AsyncStatus::Completed)\r\n                {\r\n                    ::OutputDebugString(L\"[BackendCapture::InitCapture] => StartRecordingToSinkAsync completed\\n\");\r\n                }\r\n                else if(status == Windows::Foundation::AsyncStatus::Error || status == Windows::Foundation::AsyncStatus::Canceled)\r\n                {\r\n                    ::OutputDebugString(L\"[BackendCapture::InitCapture] => StartRecordingToSinkAsync did not complete\\n\");\r\n                } \r\n            });\r\n\r\n            ::OutputDebugString(L\"-[BackendCapture::InitCapture] => OpenAsyncOperation Completed\\n\");\r\n        }\r\n        else if(status == Windows::Foundation::AsyncStatus::Canceled)\r\n        {\r\n            ::OutputDebugString(L\"[BackendCapture::InitCapture] => OpenAsyncOperation Canceled\\n\");\r\n        }\r\n        else if(status == Windows::Foundation::AsyncStatus::Error)\r\n        {\r\n            ::OutputDebugString(L\"[BackendCapture::InitCapture] => OpenAsyncOperation encountered an error.\\n\");\r\n        }\r\n    });\r\n    ::OutputDebugString(L\"-[BackendCapture::InitCapture] => Initializing Capture\\n\");\r\n}\r\n\r\nvoid BackEndCapture::ToggleCamera()\r\n{\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if(m_ToggleThread)\r\n    {\r\n        m_ToggleThread->Cancel();\r\n        m_ToggleThread->Close();\r\n        m_ToggleThread = nullptr;\r\n    }\r\n\r\n    m_ToggleThread = ThreadPool::RunAsync(ref new WorkItemHandler(this, &BackEndCapture::ToggleCameraThread), WorkItemPriority::High, WorkItemOptions::TimeSliced);\r\n}\r\n\r\n\r\nvoid BackEndCapture::ToggleCameraThread(Windows::Foundation::IAsyncAction^ operation)\r\n{\r\n    ::OutputDebugString(L\"+[BackendCapture::ToggleCamera] => Toggling camera \\n\");\r\n    CameraLocation newCameraLocation;\r\n    ResetEvent(hStopCompleted);\r\n    Stop();\r\n    DWORD waitResult = WaitForSingleObjectEx(hStopCompleted, INFINITE, FALSE);\r\n    if(waitResult == WAIT_OBJECT_0)\r\n    {\r\n        ResetEvent(hStartCompleted);\r\n        if(cameraLocation == Windows::Phone::Media::Capture::CameraSensorLocation::Back)\r\n        {\r\n            newCameraLocation = CameraLocation::Front;\r\n        }\r\n        else\r\n        {\r\n            newCameraLocation = CameraLocation::Back;\r\n        }\r\n        Start(newCameraLocation);\r\n    }\r\n    else\r\n    {\r\n        throw ref new Platform::Exception(HRESULT_FROM_WIN32(waitResult), L\"Error waiting for capture to stop when toggling cameras\");\r\n    }\r\n\r\n    waitResult = WaitForSingleObjectEx(hStartCompleted, INFINITE, FALSE);\r\n    if(waitResult == WAIT_OBJECT_0)\r\n    {\r\n        CameraLocationChanged(newCameraLocation);\r\n    }\r\n    else\r\n    {\r\n        throw ref new Platform::Exception(HRESULT_FROM_WIN32(waitResult), L\"Error waiting for capture to start when toggling cameras\");\r\n    }\r\n    ::OutputDebugString(L\"-[BackendCapture::ToggleCamera] => Toggling camera \\n\");\r\n}\r\n\r\nvoid BackEndCapture::SetTransport(BackEndTransport^ transport)\r\n{\r\n    transportController = transport;\r\n}\r\n"
  },
  {
    "path": "BackEnd/BackEndCapture.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n#include \"windows.h\"\r\n#include \"implements.h\"\r\n#include \"ICallControllerStatusListener.h\"\r\n#include \"BackEndTransport.h\"\r\n#include <Windows.Phone.Media.Capture.h>\r\n#include <Windows.Phone.Media.Capture.Native.h>\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n    namespace BackEnd\r\n    {\r\n        public delegate void CameraLocationChangedEventHandler(PhoneVoIPApp::BackEnd::CameraLocation);\r\n\r\n        class CaptureSampleSink :\r\n            public Microsoft::WRL::RuntimeClass<\r\n            Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::RuntimeClassType::ClassicCom>, \r\n            ICameraCaptureSampleSink>\r\n        {\r\n            DWORD m_dwSampleCount;\r\n            BackEndTransport ^m_transport;\r\n\r\n        public:\r\n\r\n            STDMETHODIMP RuntimeClassInitialize(BackEndTransport ^transportController)\r\n            {\r\n                m_dwSampleCount = 0;\r\n                m_transport = transportController;\r\n                return S_OK;\r\n            }\r\n\r\n            DWORD GetSampleCount()\r\n            {\r\n                return m_dwSampleCount;\r\n            }\r\n\r\n            IFACEMETHODIMP_(void)\r\n                OnSampleAvailable(\r\n                ULONGLONG hnsPresentationTime,\r\n                ULONGLONG hnsSampleDuration,\r\n                DWORD cbSample,\r\n                BYTE* pSample)\r\n            {\r\n                m_dwSampleCount++;\r\n                if (m_transport)\r\n                {\r\n                    m_transport->WriteVideo(pSample, cbSample, hnsPresentationTime, hnsSampleDuration);\r\n                }\r\n            }\r\n\r\n            void SetTransport(BackEndTransport ^transport)\r\n            {\r\n                m_transport = transport;\r\n            }\r\n        };\r\n\r\n        public ref class BackEndCapture sealed\r\n        {\r\n        public:\r\n            // Constructor\r\n            BackEndCapture();\r\n\r\n            void SetTransport(BackEndTransport^ transport);\r\n\r\n            void Start(CameraLocation cameraLocation);\r\n            void Stop();\r\n\r\n            void ToggleCamera();\r\n\r\n            event CameraLocationChangedEventHandler^ CameraLocationChanged;\r\n\r\n        private:\r\n            // Destructor\r\n            ~BackEndCapture();\r\n\r\n            void InitCapture();\r\n\r\n            void ToggleCameraThread(Windows::Foundation::IAsyncAction^ operation);\r\n\r\n            // Has capture started?\r\n            bool started;\r\n\r\n            // Events to signal whether capture has stopped/started\r\n            HANDLE hStopCompleted;\r\n            HANDLE hStartCompleted;\r\n\r\n            Windows::Foundation::IAsyncAction^ m_ToggleThread;\r\n\r\n            // Transport\r\n            BackEndTransport^ transportController;\r\n\r\n            // Native sink and video device\r\n            CaptureSampleSink *pVideoSink;\r\n            IAudioVideoCaptureDeviceNative *pVideoDevice;\r\n\r\n            Windows::Phone::Media::Capture::CameraSensorLocation cameraLocation;\r\n\r\n            Windows::Phone::Media::Capture::AudioVideoCaptureDevice ^videoOnlyDevice;\r\n            Windows::Foundation::IAsyncAction ^videoCaptureAction;\r\n\r\n        };\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/BackEndNativeBuffer.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n#include \"windows.h\"\r\n#include <robuffer.h>\r\n#include <wrl.h>\r\n#include <wrl/implements.h>\r\n#include <wrl\\client.h>\r\n#include <windows.storage.streams.h>\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n    namespace BackEnd\r\n    {\r\n\r\n        /// <summary>\r\n        /// The purpose of this class is to transform byte buffers into an IBuffer\r\n        /// </summary>\r\n        class NativeBuffer : public Microsoft::WRL::RuntimeClass<\r\n                           Microsoft::WRL::RuntimeClassFlags< Microsoft::WRL::RuntimeClassType::WinRtClassicComMix >,\r\n                           ABI::Windows::Storage::Streams::IBuffer,\r\n                           Windows::Storage::Streams::IBufferByteAccess,\r\n                           Microsoft::WRL::FtmBase>\r\n        {\r\n\r\n        public:\r\n            virtual ~NativeBuffer()\r\n            {\r\n                if (m_pBuffer && m_bIsOwner)\r\n                {\r\n                    delete[] m_pBuffer;\r\n                    m_pBuffer = NULL;\r\n                }\r\n            }\r\n\r\n            STDMETHODIMP RuntimeClassInitialize(UINT totalSize)\r\n            {\r\n                m_uLength = totalSize;\r\n                m_uFullSize = totalSize;\r\n                m_pBuffer = new BYTE[totalSize];\r\n                m_bIsOwner = TRUE;\r\n                return S_OK;\r\n            }\r\n\r\n            STDMETHODIMP RuntimeClassInitialize(BYTE* pBuffer, UINT totalSize, BOOL fTakeOwnershipOfPassedInBuffer)\r\n            {\r\n                m_uLength = totalSize;\r\n                m_uFullSize = totalSize;\r\n                m_pBuffer = pBuffer;\r\n                m_bIsOwner = fTakeOwnershipOfPassedInBuffer;\r\n                return S_OK;\r\n            }\r\n\r\n            STDMETHODIMP Buffer( BYTE **value)\r\n            {\r\n                *value = m_pBuffer;\r\n                return S_OK;\r\n            }\r\n\r\n             STDMETHODIMP get_Capacity(UINT32 *value)\r\n             {\r\n                 *value = m_uFullSize;\r\n                 return S_OK;\r\n             }\r\n                        \r\n            STDMETHODIMP get_Length(UINT32 *value)\r\n            {\r\n                *value = m_uLength;\r\n                return S_OK;\r\n            }\r\n                        \r\n            STDMETHODIMP put_Length(UINT32 value)\r\n            {\r\n                if(value > m_uFullSize)\r\n                {\r\n                    return E_INVALIDARG;\r\n                }\r\n                m_uLength = value;\r\n                return S_OK;\r\n            }\r\n\r\n            static Windows::Storage::Streams::IBuffer^ GetIBufferFromNativeBuffer(Microsoft::WRL::ComPtr<NativeBuffer> spNativeBuffer)\r\n            {\r\n                auto iinspectable = reinterpret_cast<IInspectable*>(spNativeBuffer.Get());\r\n                return reinterpret_cast<Windows::Storage::Streams::IBuffer^>(iinspectable);\r\n            }\r\n            static BYTE* GetBytesFromIBuffer(Windows::Storage::Streams::IBuffer^ buffer)\r\n            {\r\n                auto iinspectable = (IInspectable*)reinterpret_cast<IInspectable*>(buffer);\r\n                Microsoft::WRL::ComPtr<Windows::Storage::Streams::IBufferByteAccess> spBuffAccess;\r\n                HRESULT hr = iinspectable->QueryInterface(__uuidof(Windows::Storage::Streams::IBufferByteAccess), (void **)&spBuffAccess);\r\n                UCHAR * pReadBuffer;\r\n                spBuffAccess->Buffer(&pReadBuffer);\r\n                return pReadBuffer;\r\n            }\r\n        private:\r\n            UINT32 m_uLength;\r\n            UINT32 m_uFullSize;\r\n            BYTE* m_pBuffer;\r\n            BOOL m_bIsOwner;\r\n        };\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/BackEndTransport.cpp",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"BackEndTransport.h\"\r\n#include \"BackEndNativeBuffer.h\"\r\n#include <ppltasks.h>\r\n\r\nusing namespace PhoneVoIPApp::BackEnd;\r\nusing namespace Platform;\r\nusing namespace Windows::Foundation;\r\nusing namespace Windows::Storage::Streams;\r\nusing namespace Windows::System::Threading;\r\nusing namespace Microsoft::WRL;\r\nusing namespace Microsoft::WRL::Details;\r\n\r\nBackEndTransport::BackEndTransport()\r\n{\r\n}\r\n\r\n\r\nvoid BackEndTransport::WriteAudio(BYTE* bytes, int byteCount)\r\n{\r\n    Write(bytes, byteCount, TransportMessageType::Audio, 0, 0);\r\n}\r\n\r\nvoid BackEndTransport::WriteVideo(BYTE* bytes, int byteCount, UINT64 hnsPresenationTime, UINT64 hnsSampleDuration)\r\n\r\n{\r\n    Write(bytes, byteCount, TransportMessageType::Video, hnsPresenationTime, hnsSampleDuration);\r\n}\r\n\r\nvoid BackEndTransport::Write(BYTE* bytes, int byteCount, TransportMessageType::Value dataType, UINT64 hnsPresenationTime, UINT64 hnsSampleDuration)\r\n{\r\n\r\n    static const int MaxPacketSize = 10*1024*1024;\r\n\r\n    int bytesToSend = byteCount;\r\n\r\n    while (bytesToSend)\r\n    {\r\n        int chunkSize = bytesToSend > MaxPacketSize ? MaxPacketSize : bytesToSend;\r\n        ComPtr<NativeBuffer> spNativeBuffer = NULL;\r\n        if (dataType == TransportMessageType::Audio)\r\n        {\r\n            MakeAndInitialize<NativeBuffer>(&spNativeBuffer, bytes, chunkSize, FALSE);\r\n            AudioMessageReceived(NativeBuffer::GetIBufferFromNativeBuffer(spNativeBuffer), hnsPresenationTime, hnsSampleDuration);\r\n        }\r\n        else\r\n        {\r\n            // Temporarily duplicating this for sample so that MSS can own this\r\n            // buffer, and will be released when the stream itself is released\r\n            BYTE* pMem = new BYTE[chunkSize];\r\n                \r\n            memcpy((void*) pMem, (void*) bytes, chunkSize);\r\n\r\n            MakeAndInitialize<NativeBuffer>(&spNativeBuffer, pMem, chunkSize, TRUE);\r\n            VideoMessageReceived(NativeBuffer::GetIBufferFromNativeBuffer(spNativeBuffer), hnsPresenationTime, hnsSampleDuration);\r\n        }\r\n\r\n        // Increment byte position\r\n        bytes += chunkSize;\r\n        bytesToSend -= chunkSize;            \r\n    }\r\n    return;\r\n\r\n}\r\n\r\nBackEndTransport::~BackEndTransport()\r\n{\r\n}\r\n"
  },
  {
    "path": "BackEnd/BackEndTransport.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n#include \"windows.h\"\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n    namespace BackEnd\r\n    {\r\n        namespace TransportMessageType\r\n        {\r\n            enum Value\r\n            {\r\n                Audio = 0,\r\n                Video = 1\r\n            };\r\n        }\r\n\r\n        public delegate void MessageReceivedEventHandler(Windows::Storage::Streams::IBuffer ^pBuffer, UINT64 hnsPresentationTime, UINT64 hnsSampleDuration);\r\n\r\n        /// <summary>\r\n        /// This is an abstraction of a network transport class\r\n        /// which does not actually send data over the network.\r\n        /// </summary>\r\n        public ref class BackEndTransport sealed\r\n        {\r\n        public:\r\n            // Constructor\r\n            BackEndTransport();\r\n\r\n            // Destructor\r\n            virtual ~BackEndTransport();\r\n\r\n            void WriteAudio(BYTE* bytes, int byteCount);\r\n            void WriteVideo(BYTE* bytes, int byteCount, UINT64 hnsPresentationTime, UINT64 hnsSampleDuration);\r\n\r\n            event MessageReceivedEventHandler^ AudioMessageReceived;\r\n            event MessageReceivedEventHandler^ VideoMessageReceived;\r\n\r\n        private:\r\n            void Write(BYTE* bytes, int byteCount, TransportMessageType::Value dataType, UINT64 hnsPresentationTime, UINT64 hnsSampleDurationTime);\r\n        };\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/BackgroundTask.cpp",
    "content": "#include \"BackgroundTask.h\"\r\n#include \"Globals.h\"\r\n#include \"CallController.h\"\r\n\r\nusing namespace PhoneVoIPApp::BackEnd;\r\nusing namespace Windows::ApplicationModel::Background;\r\nusing namespace Windows::Phone::Networking::Voip;\r\nusing namespace Windows::Foundation;\r\nusing namespace Platform;\r\nusing namespace Windows::Phone::Media::Devices;\r\n\r\nBackgroundTask::BackgroundTask()\r\n{\r\n\r\n}\r\n\r\nvoid BackgroundTask::Run(IBackgroundTaskInstance^ taskInstance){\r\n\r\n\treturn;\r\n\r\n\tVoipCallCoordinator^ callCoordinator = Windows::Phone::Networking::Voip::VoipCallCoordinator::GetDefault();\r\n\r\n\tWindows::Phone::Networking::Voip::VoipPhoneCall^ incomingCall;\r\n\r\n\tString^ installFolder = String::Concat(Windows::ApplicationModel::Package::Current->InstalledLocation->Path, \"\\\\\");\r\n\tTimeSpan timeout;\r\n\ttimeout.Duration = 90 * 10 * 1000 * 1000; // in 100ns units\r\n\tcallCoordinator->RequestNewIncomingCall(\r\n\t\tref new String(L\"/Views/ShellView.xaml\"),\r\n\t\tref new String(L\"test contact\"),\r\n\t\tref new String(L\"test number\"),\r\n\t\tref new Uri(installFolder, \"Assets\\\\DefaultContactImage.png\"),\r\n\t\tref new String(L\"PhoneVoIPApp\"),\r\n\t\tref new Uri(installFolder, \"Assets\\\\ApplicationIcon.png\"),\r\n\t\tref new String(L\"call details\"),                      // Was this call forwarded/delegated to this user on behalf of someone else? At this time, we won't use this field\r\n\t\tref new Uri(installFolder, \"Assets\\\\Ringtone.wma\"),\r\n\t\tVoipCallMedia::Audio,\r\n\t\ttimeout,                // Maximum amount of time to ring for\r\n\t\t&incomingCall);\r\n}\r\n\r\nvoid BackgroundTask::IncomingCallDissmissed(){\r\n\r\n}\r\n"
  },
  {
    "path": "BackEnd/BackgroundTask.h",
    "content": "#pragma once\r\n\r\nusing namespace Windows::ApplicationModel::Background;\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n\tnamespace BackEnd\r\n\t{\r\n\t\t[Windows::Foundation::Metadata::WebHostHidden]\r\n\t\tpublic ref class BackgroundTask sealed : public IBackgroundTask\r\n\t\t{\r\n\t\tpublic:\r\n\t\t\tBackgroundTask();\r\n\t\t\tvirtual void Run(IBackgroundTaskInstance^ taskInstance);\r\n\r\n\t\tprivate:\r\n\t\t\tvoid IncomingCallDissmissed();\r\n\t\t};\r\n\t}\r\n}\r\n\r\n"
  },
  {
    "path": "BackEnd/CallController.cpp",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"CallController.h\"\r\n#include \"BackEndAudio.h\"\r\n#include \"BackEndCapture.h\"\r\n#include \"Server.h\"\r\n\r\nusing namespace PhoneVoIPApp::BackEnd;\r\nusing namespace Platform;\r\nusing namespace Windows::Foundation;\r\nusing namespace Windows::Phone::Media::Devices;\r\nusing namespace Windows::Phone::Networking::Voip;\r\n\r\nLibTgVoipStateListener::LibTgVoipStateListener(){\r\n\r\n}\r\n\r\nvoid LibTgVoipStateListener::OnCallStateChanged(libtgvoip::VoIPControllerWrapper^ sender, libtgvoip::CallState newState)\r\n{\r\n\tif (this->statusListener != nullptr){\r\n\t\tthis->statusListener->OnCallStateChanged((CallState)newState);\r\n\t}\r\n}\r\n\r\nvoid LibTgVoipStateListener::OnSignalBarsChanged(libtgvoip::VoIPControllerWrapper^ sender, int newSignal)\r\n{\r\n\tif (this->statusListener != nullptr){\r\n\t\tthis->statusListener->OnSignalBarsChanged(newSignal);\r\n\t}\r\n}\r\n\r\nvoid LibTgVoipStateListener::SetStatusCallback(ICallControllerStatusListener^ statusListener)\r\n{\r\n\tthis->statusListener = statusListener;\r\n}\r\n\r\nvoid CallController::StartMTProtoUpdater()\r\n{\r\n\tif (Globals::Instance->MTProtoUpdater != nullptr)\r\n\t{\r\n\t\tGlobals::Instance->MTProtoUpdater->Start(0, 0, 0);\r\n\t}\r\n}\r\n\r\nvoid CallController::StopMTProtoUpdater()\r\n{\r\n\tif (Globals::Instance->MTProtoUpdater != nullptr)\r\n\t{\r\n\t\tGlobals::Instance->MTProtoUpdater->Stop();\r\n\t}\r\n}\r\n\r\nvoid CallController::HandleUpdatePhoneCall()\r\n{\r\n\r\n\t::OutputDebugString(L\"[CallController::HandleUpdatePhoneCall]\\n\");\r\n}\r\n\r\nvoid CallController::CreateVoIPControllerWrapper()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\twrapper = ref new libtgvoip::VoIPControllerWrapper();\r\n\t\r\n\t//wrapper->SetStateCallback(stateListener);\r\n\twrapper->CallStateChanged += ref new libtgvoip::CallStateChangedEventHandler(\r\n\t\tstateListener,\r\n\t\t&LibTgVoipStateListener::OnCallStateChanged\r\n\t);\r\n\twrapper->SignalBarsChanged += ref new libtgvoip::SignalBarsChangedEventHandler(\r\n\t\tstateListener,\r\n\t\t&LibTgVoipStateListener::OnSignalBarsChanged\r\n\t);\r\n}\r\n\r\nvoid CallController::DeleteVoIPControllerWrapper()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr){\r\n\t\tdelete wrapper;\r\n\t\twrapper = nullptr;\r\n\t}\r\n}\r\n\r\nvoid CallController::SetConfig(Config config)\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr)\r\n\t{\r\n\t\twrapper->SetConfig(config.InitTimeout, config.RecvTimeout, (libtgvoip::DataSavingMode)config.DataSavingMode, config.EnableAEC, config.EnableNS, config.EnableAGC, config.LogFilePath, config.StatsDumpFilePath);\r\n\t}\r\n}\r\n\r\nvoid CallController::SetEncryptionKey(const Platform::Array<uint8>^ key, bool isOutgoing)\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr)\r\n\t{\r\n\t\twrapper->SetEncryptionKey(key, isOutgoing);\r\n\t}\r\n}\r\n\r\nvoid CallController::SetPublicEndpoints(const Platform::Array<EndpointStruct>^ endpoints, bool allowP2P, int connectionMaxLayer)\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr)\r\n\t{\r\n\t\tauto points = ref new Platform::Array<libtgvoip::Endpoint^>(endpoints->Length);\r\n\r\n\t\tfor (int i = 0; i < endpoints->Length; i++)\r\n\t\t{\r\n\t\t\tauto point = ref new libtgvoip::Endpoint();\r\n\t\t\tpoint->id = endpoints[i].id;\r\n\t\t\tpoint->port = endpoints[i].port;\r\n\t\t\tpoint->ipv4 = endpoints[i].ipv4;\r\n\t\t\tpoint->ipv6 = endpoints[i].ipv6;\r\n\r\n\t\t\tauto length = endpoints[i].peerTag->Length();\r\n\t\t\tauto it = endpoints[i].peerTag->Begin();\r\n\t\t\tauto peerTag = ref new Platform::Array<byte>(length);\r\n\t\t\tfor (size_t i = 0; i < length; i++)\r\n\t\t\t{\r\n\t\t\t\tpeerTag[i] = (byte)it[i];\r\n\t\t\t}\r\n\t\t\tpoint->peerTag = peerTag;\r\n\r\n\t\t\tpoints[i] = point;\r\n\t\t}\r\n\r\n\t\twrapper->SetPublicEndpoints(points, allowP2P, connectionMaxLayer);\r\n\t}\r\n}\r\n\r\nvoid CallController::SetProxy(ProxyStruct proxy)\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr)\r\n\t{\r\n\t\twrapper->SetProxy((libtgvoip::ProxyProtocol)proxy.protocol, proxy.address, proxy.port, proxy.username, proxy.password);\r\n\t}\r\n}\r\n\r\nvoid CallController::Start()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr)\r\n\t{\r\n\t\twrapper->Start();\r\n\t}\r\n}\r\n\r\nvoid Handler(Windows::System::Threading::ThreadPoolTimer^ timer){\r\n\t::OutputDebugString(L\"PeriodicTimer.Handler\");\r\n}\r\n\r\nvoid CallController::Connect()\r\n{\r\n\t::OutputDebugString(L\"[CallController::Connect]\\n\");\r\n\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr)\r\n\t{\r\n\t\twrapper->Connect();\r\n\t}\r\n}\r\n\r\nvoid CallController::SetMicMute(bool mute)\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr){\r\n\t\twrapper->SetMicMute(mute);\r\n\t}\r\n}\r\nvoid CallController::SwitchSpeaker(bool external)\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tlibtgvoip::VoIPControllerWrapper::SwitchSpeaker(external);\r\n}\r\n\r\nvoid CallController::SetStatusCallback(ICallControllerStatusListener^ statusListener)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    this->statusListener = statusListener;\r\n\tthis->stateListener->SetStatusCallback(statusListener);\r\n}\r\n\r\nvoid CallController::UpdateServerConfig(Platform::String^ json)\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tlibtgvoip::VoIPControllerWrapper::UpdateServerConfig(json);\r\n}\r\n\r\nint64 CallController::GetPreferredRelayID()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr){\r\n\t\treturn wrapper->GetPreferredRelayID();\r\n\t}\r\n\r\n\treturn 0;\r\n}\r\n\r\nError CallController::GetLastError()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr){\r\n\t\treturn (Error)wrapper->GetLastError();\r\n\t}\r\n\r\n\treturn Error::Unknown;\r\n}\r\n\r\nPlatform::String^ CallController::GetVersion()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\treturn libtgvoip::VoIPControllerWrapper::GetVersion();\r\n}\r\n\r\nint CallController::GetSignalBarsCount()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr){\r\n\t\treturn wrapper->GetSignalBarsCount();\r\n\t}\r\n\r\n\treturn 0;\r\n}\r\n\r\nPlatform::String^ CallController::GetDebugLog()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr){\r\n\t\treturn wrapper->GetDebugLog();\r\n\t}\r\n\r\n\treturn nullptr;\r\n}\r\n\r\nPlatform::String^ CallController::GetDebugString()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tif (wrapper != nullptr){\r\n\t\treturn wrapper->GetDebugString();\r\n\t}\r\n\r\n\treturn nullptr;\r\n}\r\n\r\nbool CallController::InitiateOutgoingCall(Platform::String^ recepientName, int64 recepientId, int64 id, int64 accessHash, \r\n\tConfig config, const Platform::Array<uint8>^ key, bool outgoing, const Platform::Array<Platform::String^>^ emojis, \r\n\tconst Platform::Array<EndpointStruct>^ endpoints, bool allowP2P, int connectionMaxLayer,\r\n\tProxyStruct proxy)\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tVoipPhoneCall^ outgoingCall = nullptr;\r\n\r\n\t// In this sample, we allow only one call at a time.\r\n\tif (this->activeCall != nullptr)\r\n\t{\r\n\t\t::OutputDebugString(L\"[CallController::InitiateOutgoingCall] => Only one active call allowed in this sample at a time\\n\");\r\n\r\n\t\tthis->activeCall->NotifyCallEnded();\r\n\r\n\t\t// If we receive a request to initiate an outgoing call when another call is in progress,\r\n\t\t// we just ignore it. \r\n\t\t//return false;\r\n\t}\r\n\r\n\t::OutputDebugString(L\"[CallController::InitiateOutgoingCall] => Starting outgoing call\\n\");\r\n\r\n\t// Start a new outgoing call.\r\n\tthis->callCoordinator->RequestNewOutgoingCall(this->callInProgressPageUri, recepientName, \"Telegram\", VoipCallMedia::Audio\r\n\t\t//| VoipCallMedia::Video\r\n\t\t, &outgoingCall);\r\n\r\n\t// Tell the phone service that this call is active.\r\n\t// Normally, we do this only when the remote party has accepted the call.\r\n\toutgoingCall->NotifyCallActive();\r\n\r\n\t// Store it as the active call - assume we support both audio and video\r\n\tthis->SetActiveCall(outgoingCall, recepientId, id, accessHash, key, outgoing, emojis, VoipCallMedia::Audio\r\n\t\t//| VoipCallMedia::Video\r\n\t\t);\r\n\r\n\tthis->DeleteVoIPControllerWrapper();\r\n\tthis->CreateVoIPControllerWrapper();\r\n\tthis->SetConfig(config);\r\n\tthis->SetEncryptionKey(key, outgoing);\r\n\tthis->SetPublicEndpoints(endpoints, allowP2P, connectionMaxLayer);\r\n\tthis->SetProxy(proxy);\r\n\tthis->Start();\r\n\t//UpdateNetworkType(null);\r\n\tthis->Connect();\r\n\r\n\r\n\treturn true;\r\n}\r\n\r\nbool CallController::InitiateOutgoingCall(Platform::String^ recepientName, int64 recepientId, int64 callId, int64 callAccessHash)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    VoipPhoneCall^ outgoingCall = nullptr;\r\n\r\n    // In this sample, we allow only one call at a time.\r\n    if (this->activeCall != nullptr)\r\n    {\r\n        ::OutputDebugString(L\"[CallController::InitiateOutgoingCall] => Only one active call allowed in this sample at a time\\n\");\r\n\r\n        // If we receive a request to initiate an outgoing call when another call is in progress,\r\n        // we just ignore it. \r\n        return false;\r\n    }\r\n\r\n    ::OutputDebugString(L\"[CallController::InitiateOutgoingCall] => Starting outgoing call\\n\");\r\n\r\n    // Start a new outgoing call.\r\n    this->callCoordinator->RequestNewOutgoingCall(this->callInProgressPageUri, recepientName, \"Telegram\", VoipCallMedia::Audio\r\n\t\t//| VoipCallMedia::Video\r\n\t\t, &outgoingCall);\r\n\r\n    // Tell the phone service that this call is active.\r\n    // Normally, we do this only when the remote party has accepted the call.\r\n    outgoingCall->NotifyCallActive();\r\n\r\n    // Store it as the active call - assume we support both audio and video\r\n\tthis->SetActiveCall(outgoingCall, recepientId, callId, callAccessHash, nullptr, true, nullptr, VoipCallMedia::Audio\r\n\t\t//| VoipCallMedia::Video\r\n\t\t);\r\n\r\n    return true;\r\n}\r\n\r\nbool CallController::OnIncomingCallReceived(Platform::String^ contactName, int64 contactId, Platform::String^ contactImage, int64 callId, int64 callAccessHash, IncomingCallDialogDismissedCallback^ incomingCallDialogDismissedCallback)\r\n{\r\n    VoipPhoneCall^ incomingCall = nullptr;\r\n\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    // TODO: If required, contact your cloud service here for more information about the incoming call.\r\n\r\n    try\r\n    {\r\n        TimeSpan timeout;\r\n        timeout.Duration = 25 * 10 * 1000 * 1000; // in 100ns units\r\n\r\n        ::OutputDebugString(L\"[CallController::OnIncomingCallReceived] => Will time out in 90 seconds\\n\");\r\n\r\n        // Store the caller number of this incoming call\r\n        this->incomingId = contactId;\r\n\t\tthis->incomingCallId = callId;\r\n\t\tthis->incomingCallAccessHash = callAccessHash;\r\n\r\n        // Store the callback that needs to be called when the incoming call dialog has been dismissed,\r\n        // either because the call was accepted or rejected by the user.\r\n        this->onIncomingCallDialogDismissed = incomingCallDialogDismissedCallback;\r\n\t\t//Windows::ApplicationModel::Package::Current->InstalledLocation->Path\r\n\t\tUri^ contactImageUri = nullptr;\r\n\t\tif (contactImage != nullptr)\r\n\t\t{\r\n\t\t\tString^ localFolder = String::Concat(Windows::Storage::ApplicationData::Current->LocalFolder->Path, \"\\\\\");\r\n\t\t\tcontactImageUri = ref new Uri(localFolder, contactImage);\r\n\t\t}\r\n\r\n        // Ask the Phone Service to start a new incoming call\r\n        this->callCoordinator->RequestNewIncomingCall(\r\n            this->callInProgressPageUri,\r\n            contactName,\r\n            \"Telegram Call\",\r\n            contactImageUri,\r\n            this->voipServiceName,\r\n            this->brandingImageUri,\r\n            \"\",                      // Was this call forwarded/delegated to this user on behalf of someone else? At this time, we won't use this field\r\n            this->ringtoneUri,\r\n            VoipCallMedia::Audio,\t// | VoipCallMedia::Video,\r\n            timeout,                // Maximum amount of time to ring for\r\n            &incomingCall);\r\n    }\r\n    catch(...)\r\n    {\r\n        // Requesting an incoming call can fail if there is already an incoming call in progress.\r\n        // This is rare, but possible. Treat this case like a missed call.\r\n        ::OutputDebugString(L\"[CallController::OnIncomingCallReceived] => An exception has occurred\\n\");\r\n        return false;\r\n    }\r\n\r\n    // Register for events about this incoming call.\r\n    incomingCall->AnswerRequested += this->acceptCallRequestedHandler;\r\n    incomingCall->RejectRequested += this->rejectCallRequestedHandler;\r\n\r\n    return true;\r\n}\r\n\r\nbool CallController::HoldCall()\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if (this->activeCall == nullptr)\r\n    {\r\n        // Nothing to do - there is no call to put on hold\r\n        return false;\r\n    }\r\n\r\n    ::OutputDebugString(L\"[CallController::HoldCall] => Trying to put call on hold\\n\");\r\n\r\n    // Change the call status before notifying that the call is held because\r\n    // access to the camera will be removed once NotifyCallHeld is called\r\n    this->SetCallStatus(PhoneVoIPApp::BackEnd::CallStatus::Held);\r\n\r\n    // Hold the active call\r\n    this->activeCall->NotifyCallHeld();\r\n\r\n    // TODO: Contact your cloud service and let it know that the active call has been put on hold.\r\n\r\n    return true;\r\n}\r\n\r\nbool CallController::ResumeCall()\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if (this->activeCall == nullptr)\r\n    {\r\n        // Nothing to do - there is no call to resume\r\n        return false;\r\n    }\r\n\r\n    ::OutputDebugString(L\"[CallController::ResumeCall] => Trying to resume a call\\n\");\r\n\r\n    // Resume the active call\r\n    this->activeCall->NotifyCallActive();\r\n\r\n    // TODO: Contact your cloud service and let it know that the active call has been resumed.\r\n\r\n    // Change the call status after notifying that the call is active\r\n    // if it is done before access to the camera will not have been granted yet\r\n    this->SetCallStatus(PhoneVoIPApp::BackEnd::CallStatus::InProgress);\r\n\r\n    return true;\r\n}\r\n\r\nbool CallController::EndCall()\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if (this->activeCall == nullptr)\r\n    {\r\n        // Nothing to do - there is no call to end\r\n        return false;\r\n    }\r\n\r\n    ::OutputDebugString(L\"[CallController::EndCall] => Trying to end a call\\n\");\r\n\r\n    // Unregister from audio endpoint changes\r\n    this->audioRoutingManager->AudioEndpointChanged -= this->audioEndpointChangedHandlercookie;\r\n\r\n    // TODO: Contact your cloud service and let it know that the active call has ended.\r\n\r\n    // End the active call.\r\n    this->activeCall->NotifyCallEnded();\r\n    this->activeCall = nullptr;\r\n\r\n\t// Reset libtgvoip call params\r\n\tthis->key = nullptr;\r\n\tthis->callId = -1;\r\n\tthis->callAccessHash = 0;\r\n\tthis->otherPartyId = 0;\r\n\tthis->emojis = nullptr;\r\n    \r\n    // Reset camera choice to front facing for next call\r\n    this->cameraLocation = PhoneVoIPApp::BackEnd::CameraLocation::Front;\r\n\r\n\t// Change the call status\r\n\tthis->SetCallStatus(PhoneVoIPApp::BackEnd::CallStatus::None);\r\n\r\n    return true;\r\n}\r\n\r\nbool CallController::ToggleCamera()\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if (this->activeCall == nullptr)\r\n    {\r\n        // Nothing to do - there is no call to end\r\n        return false;\r\n    }\r\n    ::OutputDebugString(L\"[CallController::ToggleCamera] => Trying to toggle the camera\\n\");\r\n\r\n    Globals::Instance->CaptureController->ToggleCamera();\r\n\r\n    return true;\r\n}\r\n\r\nPhoneVoIPApp::BackEnd::CallStatus CallController::CallStatus::get()\r\n{\r\n    // No need to lock - this get is idempotent\r\n    return this->callStatus;\r\n}\r\n\r\nPhoneVoIPApp::BackEnd::CameraLocation CallController::CameraLocation::get()\r\n{\r\n    // No need to lock - this get is idempotent\r\n    return this->cameraLocation;\r\n}\r\n\r\nPhoneVoIPApp::BackEnd::MediaOperations CallController::MediaOperations::get()\r\n{\r\n    // No need to lock - this get is idempotent\r\n    return this->mediaOperations;\r\n}\r\n\r\nbool CallController::IsShowingVideo::get()\r\n{\r\n    // No need to lock - this get is idempotent\r\n    return this->isShowingVideo;\r\n}\r\n\r\nvoid CallController::IsShowingVideo::set(bool value)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    // Has anything changed?\r\n    if (this->isShowingVideo == value)\r\n        return; // No\r\n\r\n    // Update the value\r\n    this->isShowingVideo = value;\r\n\r\n    // Start/stop video capture/render based on this change\r\n    this->UpdateMediaOperations();\r\n}\r\n\r\nbool CallController::IsRenderingVideo::get()\r\n{\r\n    // No need to lock - this get is idempotent\r\n    return this->isRenderingVideo;\r\n}\r\n\r\nvoid CallController::IsRenderingVideo::set(bool value)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    // Has anything changed?\r\n    if (this->isRenderingVideo == value)\r\n        return; // No\r\n\r\n    // Update the value\r\n    this->isRenderingVideo = value;\r\n\r\n    // Start/stop video capture/render based on this change\r\n    this->UpdateMediaOperations();\r\n}\r\n\r\nCallAudioRoute CallController::AvailableAudioRoutes::get()\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if (this->activeCall == nullptr)\r\n    {\r\n        // There is no call in progress\r\n        return CallAudioRoute::None;\r\n    }\r\n\r\n    return (CallAudioRoute)(this->audioRoutingManager->AvailableAudioEndpoints);\r\n}\r\n\r\nCallAudioRoute CallController::AudioRoute::get()\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if (this->activeCall == nullptr)\r\n    {\r\n        // There is no call in progress\r\n        return CallAudioRoute::None;\r\n    }\r\n\r\n    auto audioEndpoint = this->audioRoutingManager->GetAudioEndpoint();\r\n    switch(audioEndpoint)\r\n    {\r\n    case AudioRoutingEndpoint::Earpiece:\r\n    case AudioRoutingEndpoint::WiredHeadset:\r\n    case AudioRoutingEndpoint::WiredHeadsetSpeakerOnly:\r\n        return CallAudioRoute::Earpiece;\r\n\r\n    case AudioRoutingEndpoint::Default:\r\n    case AudioRoutingEndpoint::Speakerphone:\r\n        return CallAudioRoute::Speakerphone;\r\n\r\n    case AudioRoutingEndpoint::Bluetooth:\r\n    case AudioRoutingEndpoint::BluetoothWithNoiseAndEchoCancellation:\r\n        return CallAudioRoute::Bluetooth;\r\n\r\n    default:\r\n        throw ref new FailureException(\"Unexpected audio routing endpoint\");\r\n    }\r\n\r\n}\r\n\r\nvoid CallController::AudioRoute::set(CallAudioRoute newRoute)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if (this->callStatus != PhoneVoIPApp::BackEnd::CallStatus::InProgress)\r\n    {\r\n        // There is no call in progress - do nothing\r\n        return;\r\n    }\r\n\r\n    switch(newRoute)\r\n    {\r\n    case CallAudioRoute::Earpiece:\r\n        this->audioRoutingManager->SetAudioEndpoint(AudioRoutingEndpoint::Earpiece);\r\n        break;\r\n\r\n    case CallAudioRoute::Speakerphone:\r\n        this->audioRoutingManager->SetAudioEndpoint(AudioRoutingEndpoint::Speakerphone);\r\n        break;\r\n\r\n    case CallAudioRoute::Bluetooth:\r\n        this->audioRoutingManager->SetAudioEndpoint(AudioRoutingEndpoint::Bluetooth);\r\n        break;\r\n\r\n    case CallAudioRoute::None:\r\n    default:\r\n        throw ref new FailureException(\"Cannot set audio route to CallAudioRoute::None\");\r\n    }\r\n}\r\n\r\nPlatform::String^ CallController::OtherPartyName::get()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\treturn this->otherPartyName;\r\n}\r\n\r\nint64 CallController::OtherPartyId::get()\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n    return this->otherPartyId;\r\n}\r\n\r\nWindows::Foundation::DateTime CallController::CallStartTime::get()\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if (this->activeCall != nullptr)\r\n    {\r\n        // There is a call in progress\r\n        return this->activeCall->StartTime;\r\n    }\r\n    else\r\n    {\r\n        // There is no call in progress\r\n        Windows::Foundation::DateTime minValue;\r\n        minValue.UniversalTime = 0;\r\n        return minValue;\r\n    }\r\n}\r\n\r\nint64 CallController::CallId::get()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\treturn this->callId;\r\n}\r\n\r\nint64 CallController::CallAccessHash::get()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\treturn this->callAccessHash;\r\n}\r\n\r\nint64 CallController::AcceptedCallId::get()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\treturn this->acceptedCallId;\r\n}\r\n\r\nvoid CallController::AcceptedCallId::set(int64 value)\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tthis->acceptedCallId = value;\r\n}\r\n\r\nPlatform::Array<uint8>^ CallController::Key::get()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\treturn this->key;\r\n}\r\n\r\nbool CallController::Outgoing::get()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\treturn this->outgoing;\r\n}\r\n\r\nPlatform::Array<Platform::String^>^ CallController::Emojis::get()\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\treturn this->emojis;\r\n}\r\n\r\nCallController::CallController() :\r\n\twrapper(nullptr),\r\n    callInProgressPageUri(L\"/Views/ShellView.xaml\"),\r\n    voipServiceName(nullptr),\r\n    defaultContactImageUri(nullptr),\r\n    brandingImageUri(nullptr),\r\n    ringtoneUri(nullptr),\r\n    statusListener(nullptr),\r\n    callStatus(PhoneVoIPApp::BackEnd::CallStatus::None),\r\n    otherPartyName(nullptr),\r\n    otherPartyId(-1),\r\n    incomingId(-1),\r\n\tacceptedCallId(-1),\r\n\tkey(nullptr),\r\n\temojis(nullptr),\r\n    mediaOperations(PhoneVoIPApp::BackEnd::MediaOperations::None),\r\n    onIncomingCallDialogDismissed(nullptr),\r\n    activeCall(nullptr),\r\n    cameraLocation(PhoneVoIPApp::BackEnd::CameraLocation::Front)\r\n{\r\n\tthis->stateListener = ref new LibTgVoipStateListener();\r\n    this->callCoordinator = VoipCallCoordinator::GetDefault();\r\n    this->audioRoutingManager = AudioRoutingManager::GetDefault();\r\n\r\n    // URIs required for interactions with the VoipCallCoordinator\r\n    String^ installFolder = String::Concat(Windows::ApplicationModel::Package::Current->InstalledLocation->Path, \"\\\\\");\r\n    //this->defaultContactImageUri = ref new Uri(installFolder, \"Assets\\\\DefaultContactImage.png\");\r\n    this->voipServiceName = ref new String(L\"Telegram\");\r\n    this->brandingImageUri = ref new Uri(installFolder, \"SquareTile150x150.png\");\r\n    //this->ringtoneUri = ref new Uri(installFolder, \"Assets\\\\Ringtone.wma\");\r\n\r\n    // Event handler delegates - creating them once and storing them as member variables\r\n    // avoids having to create new delegate objects for each phone call.\r\n    this->acceptCallRequestedHandler = ref new TypedEventHandler<VoipPhoneCall^, CallAnswerEventArgs^>(this, &CallController::OnAcceptCallRequested);\r\n    this->rejectCallRequestedHandler = ref new TypedEventHandler<VoipPhoneCall^, CallRejectEventArgs^>(this, &CallController::OnRejectCallRequested);\r\n    this->holdCallRequestedHandler = ref new TypedEventHandler<VoipPhoneCall^, CallStateChangeEventArgs^>(this, &CallController::OnHoldCallRequested);\r\n    this->resumeCallRequestedHandler = ref new TypedEventHandler<VoipPhoneCall^, CallStateChangeEventArgs^>(this, &CallController::OnResumeCallRequested);\r\n    this->endCallRequestedHandler = ref new TypedEventHandler<VoipPhoneCall^, CallStateChangeEventArgs^>(this, &CallController::OnEndCallRequested);\r\n    this->audioEndpointChangedHandler = ref new TypedEventHandler<AudioRoutingManager^, Object^>(this, &CallController::OnAudioEndpointChanged);\r\n    this->cameraLocationChangedHandler = ref new CameraLocationChangedEventHandler(this, &CallController::OnCameraLocationChanged);\r\n}\r\n\r\nCallController::~CallController()\r\n{\r\n}\r\n\r\nvoid CallController::SetCallStatus(PhoneVoIPApp::BackEnd::CallStatus newStatus)\r\n{\r\n    // No need to lock - private method\r\n\r\n    if (newStatus == this->callStatus)\r\n        return; // Nothing more to do\r\n\r\n    // Change the call status\r\n    this->callStatus = newStatus;\r\n\r\n    // Update audio/video capture/render status, if required.\r\n    this->UpdateMediaOperations();\r\n\r\n    // If required, let the UI know.\r\n    if (this->statusListener != nullptr)\r\n    {\r\n        this->statusListener->OnCallStatusChanged(this->callStatus);\r\n    }\r\n}\r\n\r\nvoid CallController::SetActiveCall(VoipPhoneCall^ call, int64 contactId, int64 callId, int64 callAccessHash, const Platform::Array<uint8_t>^ key, bool outgoing, const Platform::Array<Platform::String^>^ emojis, VoipCallMedia callMedia)\r\n{\r\n    // No need to lock - private method\r\n\r\n    // The specified call is now active.\r\n    // For an incoming call, this means that the local party has accepted the call.\r\n    // For an outoing call, this means that the remote party has accepted the call.\r\n    this->activeCall = call;\r\n\r\n    // Listen to state changes of the active call.\r\n    call->HoldRequested += this->holdCallRequestedHandler;\r\n    call->ResumeRequested += this->resumeCallRequestedHandler;\r\n    call->EndRequested += this->endCallRequestedHandler;\r\n\r\n    // Register for audio endpoint changes\r\n    this->audioEndpointChangedHandlercookie = this->audioRoutingManager->AudioEndpointChanged += this->audioEndpointChangedHandler;\r\n\r\n    // Store information about the other party in the call\r\n    this->otherPartyName = this->activeCall->ContactName;\r\n\tthis->otherPartyId = contactId;\r\n\tthis->callId = callId;\r\n\tthis->callAccessHash = callAccessHash;\r\n\r\n\tif (key != nullptr)\r\n\t{\r\n\t\tthis->key = ref new Platform::Array<uint8_t>(key->Data, key->Length);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tthis->key = nullptr;\r\n\t}\r\n\tif (emojis != nullptr)\r\n\t{\r\n\t\tthis->emojis = ref new Platform::Array<Platform::String^>(emojis->Data, emojis->Length);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tthis->emojis = nullptr;\r\n\t}\r\n\r\n\tthis->outgoing = outgoing;\r\n\r\n    // Change the call status\r\n    this->SetCallStatus(PhoneVoIPApp::BackEnd::CallStatus::InProgress);\r\n\r\n    // Figure out if video/audio capture/render are all allowed\r\n    PhoneVoIPApp::BackEnd::MediaOperations newOperations = PhoneVoIPApp::BackEnd::MediaOperations::None;\r\n    if ((callMedia & VoipCallMedia::Audio) != VoipCallMedia::None)\r\n    {\r\n        // Enable both audio capture and render by default\r\n        newOperations = PhoneVoIPApp::BackEnd::MediaOperations::AudioCapture | PhoneVoIPApp::BackEnd::MediaOperations::AudioRender;\r\n    }\r\n    if ((callMedia & VoipCallMedia::Video) != VoipCallMedia::None)\r\n    {\r\n        // Enable both video capture and render by default\r\n        newOperations = newOperations | PhoneVoIPApp::BackEnd::MediaOperations::VideoCapture | PhoneVoIPApp::BackEnd::MediaOperations::VideoRender;\r\n\r\n    }\r\n    this->SetMediaOperations(newOperations);\r\n}\r\n\r\nvoid CallController::OnAcceptCallRequested(VoipPhoneCall^ sender, CallAnswerEventArgs^ args)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    ::OutputDebugString(L\"[CallController::OnAcceptCallRequested] => Incoming call accepted\\n\");\r\n\r\n    // The local user has accepted an incoming call.\r\n    VoipPhoneCall^ incomingCall = (VoipPhoneCall^)sender;\r\n\r\n    // If there is was a call already in progress, end it\r\n    // As of now, we support only one call at a time in this application\r\n    this->EndCall();\r\n\r\n    // Reset camera choice to front facing for next call\r\n    this->cameraLocation = PhoneVoIPApp::BackEnd::CameraLocation::Front;\r\n\r\n    // The incoming call is the new active call.\r\n    incomingCall->NotifyCallActive();\r\n\r\n\tthis->acceptedCallId = this->incomingCallId;\r\n\r\n    // Let the incoming call agent know that incoming call processing is now complete\r\n    if (this->onIncomingCallDialogDismissed != nullptr)\r\n        this->onIncomingCallDialogDismissed(this->incomingCallId, this->incomingCallAccessHash, false);\r\n\r\n    // Store it as the active call.\r\n    this->SetActiveCall(incomingCall, this->incomingId, this->incomingCallId, this->incomingCallAccessHash, nullptr, false, nullptr, args->AcceptedMedia);\r\n}\r\n\r\nvoid CallController::OnRejectCallRequested(VoipPhoneCall^ sender, CallRejectEventArgs^ args)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    ::OutputDebugString(L\"[CallController::OnRejectCallRequested] => Incoming call rejected\\n\");\r\n\r\n    // The local user has rejected an incoming call.\r\n    VoipPhoneCall^ incomingCall = (VoipPhoneCall^)sender;\r\n\r\n    // End it.\r\n    incomingCall->NotifyCallEnded();\r\n\r\n    // TODO: Contact your cloud service and let it know that the incoming call was rejected.\r\n\t\r\n    // Finally, let the incoming call agent know that incoming call processing is now complete\r\n\tthis->onIncomingCallDialogDismissed(this->incomingCallId, this->incomingCallAccessHash, true);\r\n}\r\n\r\nvoid CallController::OnHoldCallRequested(VoipPhoneCall^ sender, CallStateChangeEventArgs^ args)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    // A request to put the active call on hold has been received.\r\n    VoipPhoneCall^ callToPutOnHold = (VoipPhoneCall^)sender;\r\n\r\n    // Sanity test.\r\n    if (callToPutOnHold != this->activeCall)\r\n    {\r\n        throw ref new Platform::FailureException(L\"Something is wrong. The call to put on hold is not the active call\");\r\n    }\r\n\r\n    // Put the active call on hold.\r\n    this->HoldCall();\r\n}\r\n\r\nvoid CallController::OnResumeCallRequested(VoipPhoneCall^ sender, CallStateChangeEventArgs^ args)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    // A request to resumed the active call has been received.\r\n    VoipPhoneCall^ callToResume = (VoipPhoneCall^)sender;\r\n\r\n    // Sanity test.\r\n    if (callToResume != this->activeCall)\r\n    {\r\n        throw ref new Platform::FailureException(L\"Something is wrong. The call to resume is not the active call\");\r\n    }\r\n\r\n    // Resume the active call\r\n    this->ResumeCall();\r\n}\r\n\r\nvoid CallController::OnEndCallRequested(VoipPhoneCall^ sender, CallStateChangeEventArgs^ args)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    // A request to end the active call has been received.\r\n    VoipPhoneCall^ callToEnd = (VoipPhoneCall^)sender;\r\n\r\n    // Sanity test.\r\n    if (callToEnd != this->activeCall)\r\n    {\r\n        throw ref new Platform::FailureException(L\"Something is wrong. The call to end is not the active call\");\r\n    }\r\n\r\n    // End the active call\r\n    this->EndCall();\r\n}\r\n\r\nvoid CallController::OnAudioEndpointChanged(AudioRoutingManager^ sender, Object^ args)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    // If required, let the UI know.\r\n    if ((this->activeCall != nullptr) && (this->statusListener != nullptr))\r\n    {\r\n        this->statusListener->OnCallAudioRouteChanged(this->AudioRoute);\r\n    }\r\n}\r\n\r\nvoid CallController::OnCameraLocationChanged(PhoneVoIPApp::BackEnd::CameraLocation newCameraLocation)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if(this->cameraLocation == newCameraLocation || this->activeCall == nullptr)\r\n    {\r\n        // nothing to do\r\n        return;\r\n    }\r\n\r\n    this->cameraLocation = newCameraLocation;\r\n\r\n    // If required, let the UI know.\r\n    if ((this->statusListener != nullptr))\r\n    {\r\n        this->statusListener->OnCameraLocationChanged(this->cameraLocation);\r\n    }\r\n\r\n}\r\n\r\nvoid CallController::SetMediaOperations(PhoneVoIPApp::BackEnd::MediaOperations value)\r\n{\r\n    // No need to lock - private method\r\n\r\n    // Has anything changed?\r\n    if (this->mediaOperations == value)\r\n        return; // No\r\n\r\n    // Update the value\r\n    this->mediaOperations = value;\r\n\r\n    // Start/stop video/audio capture based on this change\r\n    this->UpdateMediaOperations();\r\n}\r\n\r\nvoid CallController::UpdateMediaOperations()\r\n{\r\n    // No need to lock - private method\r\n\r\n    bool captureAudio = false, captureVideo = false, renderAudio = false, renderVideo = false;\r\n\r\n    if (this->callStatus == PhoneVoIPApp::BackEnd::CallStatus::InProgress)\r\n    {\r\n        // A call is in progress\r\n\r\n        // Start audio capture/render, if enabled\r\n        captureAudio = ((this->mediaOperations & PhoneVoIPApp::BackEnd::MediaOperations::AudioCapture) != PhoneVoIPApp::BackEnd::MediaOperations::None);\r\n        renderAudio = ((this->mediaOperations & PhoneVoIPApp::BackEnd::MediaOperations::AudioRender) != PhoneVoIPApp::BackEnd::MediaOperations::None);\r\n\r\n        // Start video capture/render if enabled *and* the UI is showing video.\r\n        if (this->isShowingVideo)\r\n        {\r\n            if(isRenderingVideo)\r\n            {\r\n                renderVideo = ((this->mediaOperations & PhoneVoIPApp::BackEnd::MediaOperations::VideoRender) != PhoneVoIPApp::BackEnd::MediaOperations::None);\r\n            }\r\n\r\n            // Does this phone have a camera?\r\n            auto availableCameras = Windows::Phone::Media::Capture::AudioVideoCaptureDevice::AvailableSensorLocations;\r\n            bool isCameraPresent = ((availableCameras != nullptr) && (availableCameras->Size > 0));\r\n\r\n            // Start capture only if there is a camera present\r\n            if (isCameraPresent)\r\n            {\r\n                captureVideo = ((this->mediaOperations & PhoneVoIPApp::BackEnd::MediaOperations::VideoCapture) != PhoneVoIPApp::BackEnd::MediaOperations::None);\r\n            }\r\n        }\r\n    }\r\n    // else: call is not in progress - all capture/rendering should stop\r\n\r\n    // What are the new media operations?\r\n    PhoneVoIPApp::BackEnd::MediaOperations newOperations = PhoneVoIPApp::BackEnd::MediaOperations::None;\r\n\r\n    // Start/stop audio capture and render\r\n    if (captureAudio || renderAudio)\r\n    {\r\n        ::OutputDebugString(L\"[CallController::UpdateMediaOperations] => Starting audio\\n\");\r\n        newOperations = newOperations | (PhoneVoIPApp::BackEnd::MediaOperations::AudioCapture | PhoneVoIPApp::BackEnd::MediaOperations::AudioRender);\r\n        //Globals::Instance->AudioController->Start();\r\n    }\r\n    else\r\n    {\r\n        ::OutputDebugString(L\"[CallController::UpdateMediaOperations] => Stopping audio\\n\");\r\n        //Globals::Instance->AudioController->Stop();\r\n    }\r\n\r\n    // Start/stop video render\r\n    if (Globals::Instance->VideoRenderer != nullptr)\r\n    {\r\n        if (renderVideo)\r\n        {\r\n            ::OutputDebugString(L\"[CallController::UpdateMediaOperations] => Starting video render\\n\");\r\n            newOperations = newOperations | PhoneVoIPApp::BackEnd::MediaOperations::VideoRender;\r\n            Globals::Instance->VideoRenderer->Start();\r\n        }\r\n        else\r\n        {\r\n            ::OutputDebugString(L\"[CallController::UpdateMediaOperations] => Stopping video render\\n\");\r\n            Globals::Instance->VideoRenderer->Stop();\r\n        }\r\n\r\n        if (captureVideo)\r\n        {\r\n            ::OutputDebugString(L\"[CallController::UpdateMediaOperations] => Starting video capture\\n\");\r\n            newOperations = newOperations | PhoneVoIPApp::BackEnd::MediaOperations::VideoCapture;\r\n            Globals::Instance->CaptureController->Start(cameraLocation);\r\n            Globals::Instance->CaptureController->CameraLocationChanged += cameraLocationChangedHandler;\r\n        }\r\n        else\r\n        {\r\n            ::OutputDebugString(L\"[CallController::UpdateMediaOperations] => Stopping video capture\\n\");\r\n            Globals::Instance->CaptureController->Stop();\r\n        }\r\n    }\r\n\r\n    // Let the listener know that the allowed media operation state has changed\r\n    if (this->statusListener != nullptr)\r\n    {\r\n        this->statusListener->OnMediaOperationsChanged(newOperations);\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/CallController.h",
    "content": "/*\r\nCopyright (c) 2012 Microsoft Corporation.  All rights reserved.\r\nUse of this sample source code is subject to the terms of the Microsoft license\r\nagreement under which you licensed this sample source code and is provided AS-IS.\r\nIf you did not accept the terms of the license agreement, you are not authorized\r\nto use this sample source code.  For the terms of the license, please see the\r\nlicense agreement between you and Microsoft.\r\n\r\nTo see all Code Samples for Windows Phone, visit http://go.microsoft.com/fwlink/?LinkID=219604\r\n\r\n*/\r\n#pragma once\r\n#include \"BackEndCapture.h\"\r\n#include <windows.phone.networking.voip.h>\r\n#include \"ICallControllerStatusListener.h\"\r\n#include \"IConfig.h\"\r\n#include \"ApiLock.h\"\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n\tnamespace BackEnd\r\n\t{\r\n\t\t// Forward declaration\r\n\t\tref class Globals;\r\n\r\n\t\t// A method that is called back when the incoming call dialog has been dismissed.\r\n\t\t// This callback is used to complete the incoming call agent.\r\n\t\tpublic delegate void IncomingCallDialogDismissedCallback(int64 callId, int64 callAccessHash, bool rejected);\r\n\r\n\t\tref class LibTgVoipStateListener sealed {\r\n\t\tprivate:\r\n\t\t\tICallControllerStatusListener^ statusListener;\r\n\r\n\t\tpublic:\r\n\t\t\tLibTgVoipStateListener();\r\n\t\t\tvoid SetStatusCallback(ICallControllerStatusListener^ statusListener);\r\n\t\t\tvirtual void OnCallStateChanged(libtgvoip::VoIPControllerWrapper^ sender, libtgvoip::CallState newState);\r\n\t\t\tvirtual void OnSignalBarsChanged(libtgvoip::VoIPControllerWrapper^ sender, int signal);\r\n\t\t};\r\n\r\n\t\tpublic value struct Config{\r\n\t\t\tdouble InitTimeout;\r\n\t\t\tdouble RecvTimeout;\r\n\t\t\tDataSavingMode DataSavingMode;\r\n\t\t\tbool EnableAEC;\r\n\t\t\tbool EnableNS;\r\n\t\t\tbool EnableAGC;\r\n\t\t\tPlatform::String^ LogFilePath;\r\n\t\t\tPlatform::String^ StatsDumpFilePath;\r\n\t\t};\r\n\r\n\t\t// A class that provides methods and properties related to VoIP calls.\r\n\t\t// It wraps Windows.Phone.Networking.Voip.VoipCallCoordinator, and provides app-specific call functionality.\r\n\t\tpublic ref class CallController sealed\r\n\t\t{\r\n\t\tpublic:\r\n\r\n\t\t\t// The public methods below are just for illustration purposes - add your own methods here\r\n\t\t\t// mtproto\r\n\t\t\tvoid HandleUpdatePhoneCall();\r\n\t\t\tvoid StartMTProtoUpdater();\r\n\t\t\tvoid StopMTProtoUpdater();\r\n\r\n\t\t\t// libtgvoip\r\n\t\t\tvoid CreateVoIPControllerWrapper();\r\n\t\t\tvoid DeleteVoIPControllerWrapper();\r\n\t\t\tvoid SetConfig(Config config);\r\n\t\t\tvoid SetEncryptionKey(const Platform::Array<uint8>^ key, bool isOutgoing);\r\n\t\t\tvoid SetPublicEndpoints(const Platform::Array<EndpointStruct>^ endpoints, bool allowP2P, int connectionMaxLayer);\r\n\t\t\tvoid SetProxy(ProxyStruct proxy);\r\n\t\t\tvoid Start();\r\n\t\t\tvoid Connect();\r\n\r\n\t\t\tvoid SetMicMute(bool mute);\r\n\t\t\tvoid SwitchSpeaker(bool external);\r\n\t\t\tvoid UpdateServerConfig(Platform::String^ json);\r\n\t\t\tint64 GetPreferredRelayID();\r\n\t\t\tError GetLastError();\r\n\t\t\tPlatform::String^ GetDebugLog();\r\n\t\t\tPlatform::String^ GetDebugString();\r\n\t\t\tPlatform::String^ GetVersion();\r\n\t\t\tint GetSignalBarsCount();\r\n\r\n\t\t\t// Provide an inteface that can be used to get call controller status change notifications\r\n\t\t\tvoid SetStatusCallback(ICallControllerStatusListener^ statusListener);\r\n\r\n\t\t\t// Initiate an outgoing call. Called by the UI process.\r\n\t\t\t// Returns true if the outgoing call processing was started, false otherwise.\r\n\t\t\tbool InitiateOutgoingCall(Platform::String^ recepientName, int64 recepientId, int64 callId, int64 callAccessHash);\r\n\t\t\tbool InitiateOutgoingCall(Platform::String^ recepientName, int64 recepientId, int64 callId, int64 callAccessHash, \r\n\t\t\t\tConfig config, const Platform::Array<uint8>^ key, bool outgoing, \r\n\t\t\t\tconst Platform::Array<Platform::String^>^ emojis, const Platform::Array<EndpointStruct>^ endpoints, \r\n\t\t\t\tbool allowP2P, int connectionMaxLayer,\r\n\t\t\t\tProxyStruct proxy);\r\n\r\n\t\t\t// Start processing an incoming call. Called by managed code in this process (the VoIP agent host process).\r\n\t\t\t// Returns true if the incoming call processing was started, false otherwise.\r\n\t\t\tbool OnIncomingCallReceived(Platform::String^ contactName, int64 contactId, Platform::String^ contactImage, int64 callId, int64 callAccessHash, IncomingCallDialogDismissedCallback^ incomingCallDialogDismissedCallback);\r\n\r\n\t\t\t// Hold a call. Called by the UI process.\r\n\t\t\tbool HoldCall();\r\n\r\n\t\t\t// Resume a call. Called by the UI process.\r\n\t\t\tbool ResumeCall();\r\n\r\n\t\t\t// End a call. Called by the UI process.\r\n\t\t\tbool EndCall();\r\n\r\n\t\t\t// Toggle the camera location. Called by the UI process.\r\n\t\t\tbool ToggleCamera();\r\n\r\n\t\t\t// Get the call state\r\n\t\t\tproperty PhoneVoIPApp::BackEnd::CallStatus CallStatus\r\n\t\t\t{\r\n\t\t\t\tPhoneVoIPApp::BackEnd::CallStatus get();\r\n\t\t\t};\r\n\r\n\t\t\t// Get or set the media operations that are allowed for a call.\r\n\t\t\tproperty PhoneVoIPApp::BackEnd::MediaOperations MediaOperations\r\n\t\t\t{\r\n\t\t\t\tPhoneVoIPApp::BackEnd::MediaOperations get();\r\n\t\t\t}\r\n\r\n\t\t\t// Indicates if video is currently being displayed or not\r\n\t\t\tproperty bool IsShowingVideo\r\n\t\t\t{\r\n\t\t\t\tbool get();\r\n\t\t\t\tvoid set(bool value);\r\n\t\t\t}\r\n\r\n\t\t\t// Indicates whether the video is being rendered or not.\r\n\t\t\tproperty bool IsRenderingVideo\r\n\t\t\t{\r\n\t\t\t\tbool get();\r\n\t\t\t\tvoid set(bool value);\r\n\t\t\t}\r\n\r\n\t\t\t// Get the current camera location\r\n\t\t\tproperty PhoneVoIPApp::BackEnd::CameraLocation CameraLocation\r\n\t\t\t{\r\n\t\t\t\tPhoneVoIPApp::BackEnd::CameraLocation get();\r\n\t\t\t}\r\n\r\n\t\t\t// Get the possible routes for audio\r\n\t\t\tproperty CallAudioRoute AvailableAudioRoutes\r\n\t\t\t{\r\n\t\t\t\tCallAudioRoute get();\r\n\t\t\t}\r\n\r\n\t\t\t// Get or set the current route for audio\r\n\t\t\tproperty CallAudioRoute AudioRoute\r\n\t\t\t{\r\n\t\t\t\tCallAudioRoute get();\r\n\t\t\t\tvoid set(CallAudioRoute newRoute);\r\n\t\t\t}\r\n\r\n\t\t\t// Get the name of the other party in the most recent call.\r\n\t\t\t// Can return nullptr if there hasn't been a call yet.\r\n\t\t\tproperty Platform::String^ OtherPartyName\r\n\t\t\t{\r\n\t\t\t\tPlatform::String^ get();\r\n\t\t\t}\r\n\r\n\t\t\t// Get the name of the other party in the most recent call.\r\n\t\t\t// Can return nullptr if there hasn't been a call yet.\r\n\t\t\tproperty int64 OtherPartyId\r\n\t\t\t{\r\n\t\t\t\tint64 get();\r\n\t\t\t}\r\n\r\n\t\t\t// Get call start time\r\n\t\t\tproperty Windows::Foundation::DateTime CallStartTime\r\n\t\t\t{\r\n\t\t\t\tWindows::Foundation::DateTime get();\r\n\t\t\t}\r\n\r\n\t\t\tproperty int64 CallId\r\n\t\t\t{\r\n\t\t\t\tint64 get();\r\n\t\t\t}\r\n\r\n\t\t\tproperty int64 CallAccessHash\r\n\t\t\t{\r\n\t\t\t\tint64 get();\r\n\t\t\t}\r\n\r\n\t\t\tproperty int64 AcceptedCallId\r\n\t\t\t{\r\n\t\t\t\tint64 get();\r\n\t\t\t\tvoid set(int64 value);\r\n\t\t\t}\r\n\r\n\t\t\tproperty Platform::Array<uint8>^ Key\r\n\t\t\t{\r\n\t\t\t\tPlatform::Array<uint8>^ get();\r\n\t\t\t}\r\n\r\n\t\t\tproperty bool Outgoing\r\n\t\t\t{\r\n\t\t\t\tbool get();\r\n\t\t\t}\r\n\r\n\t\t\tproperty Platform::Array<Platform::String^>^ Emojis\r\n\t\t\t{\r\n\t\t\t\tPlatform::Array<Platform::String^>^ get();\r\n\t\t\t}\r\n\r\n\t\tprivate:\r\n\t\t\tlibtgvoip::VoIPControllerWrapper^ wrapper;\r\n\t\t\tLibTgVoipStateListener^ stateListener;\r\n\r\n\t\t\t// Only the server can create an instance of this object\r\n\t\t\tfriend ref class PhoneVoIPApp::BackEnd::Globals;\r\n\r\n\t\t\t// Constructor and destructor\r\n\t\t\tCallController();\r\n\t\t\t~CallController();\r\n\r\n\t\t\t// Set the call status\r\n\t\t\tvoid SetCallStatus(PhoneVoIPApp::BackEnd::CallStatus newStatus);\r\n\r\n\t\t\t// Indicates that a call is now active \r\n\t\t\tvoid SetActiveCall(Windows::Phone::Networking::Voip::VoipPhoneCall^ call, int64 contactId, int64 callId, int64 callAccessHash, const Platform::Array<uint8_t>^ key, bool outgoing, const Platform::Array<Platform::String^>^ emojis, Windows::Phone::Networking::Voip::VoipCallMedia callMedia);\r\n\r\n\t\t\t// Called by the VoipCallCoordinator when the user accepts an incoming call.\r\n\t\t\tvoid OnAcceptCallRequested(Windows::Phone::Networking::Voip::VoipPhoneCall^ sender, Windows::Phone::Networking::Voip::CallAnswerEventArgs^ args);\r\n\r\n\t\t\t// Called by the VoipCallCoordinator when the user rejects an incoming call.\r\n\t\t\tvoid OnRejectCallRequested(Windows::Phone::Networking::Voip::VoipPhoneCall^ sender, Windows::Phone::Networking::Voip::CallRejectEventArgs^ args);\r\n\r\n\t\t\t// Called by the VoipCallCoordinator when a call is to be put on hold.\r\n\t\t\tvoid OnHoldCallRequested(Windows::Phone::Networking::Voip::VoipPhoneCall^ sender, Windows::Phone::Networking::Voip::CallStateChangeEventArgs^ args);\r\n\r\n\t\t\t// Called by the VoipCallCoordinator when a call that was previously put on hold is to be resumed.\r\n\t\t\tvoid OnResumeCallRequested(Windows::Phone::Networking::Voip::VoipPhoneCall^ sender, Windows::Phone::Networking::Voip::CallStateChangeEventArgs^ args);\r\n\r\n\t\t\t// Called by the VoipCallCoordinator when a call is to be ended.\r\n\t\t\tvoid OnEndCallRequested(Windows::Phone::Networking::Voip::VoipPhoneCall^ sender, Windows::Phone::Networking::Voip::CallStateChangeEventArgs^ args);\r\n\r\n\t\t\t// Called by the AudioRoutingManager when call audio routing changes.\r\n\t\t\tvoid OnAudioEndpointChanged(Windows::Phone::Media::Devices::AudioRoutingManager^ sender, Platform::Object^ args);\r\n\r\n\t\t\t// Called by the BackEndCapture when the camera is toggled\r\n\t\t\tvoid OnCameraLocationChanged(PhoneVoIPApp::BackEnd::CameraLocation newCameraLocation);\r\n\r\n\t\t\t// Set a value that indicates if video/audio capture/render is enabled for a call or not.\r\n\t\t\tvoid SetMediaOperations(PhoneVoIPApp::BackEnd::MediaOperations value);\r\n\r\n\t\t\t// Start/stop video/audio capture/playback based on the current state.\r\n\t\t\tvoid UpdateMediaOperations();\r\n\r\n\t\t\t// The relative URI to the call-in-progress page\r\n\t\t\tPlatform::String ^callInProgressPageUri;\r\n\r\n\t\t\t// The name of this service provider\r\n\t\t\tPlatform::String^ voipServiceName;\r\n\r\n\t\t\t// The URI to the default contact image\r\n\t\t\tWindows::Foundation::Uri^ defaultContactImageUri;\r\n\r\n\t\t\t// The URI to the branding image\r\n\t\t\tWindows::Foundation::Uri^ brandingImageUri;\r\n\r\n\t\t\t// The URI to the ringtone file\r\n\t\t\tWindows::Foundation::Uri^ ringtoneUri;\r\n\r\n\t\t\t// Interface used to deliver status callbacks\r\n\t\t\tICallControllerStatusListener^ statusListener;\r\n\r\n\t\t\t// A VoIP call that is in progress\r\n\t\t\tWindows::Phone::Networking::Voip::VoipPhoneCall^ activeCall;\r\n\r\n\t\t\t// The status of a call, if any\r\n\t\t\tPhoneVoIPApp::BackEnd::CallStatus callStatus;\r\n\r\n\t\t\t// The name of the other party, if any\r\n\t\t\tPlatform::String^ otherPartyName;\r\n\r\n\t\t\t// The id of the other party, if any\r\n\t\t\tint64 otherPartyId;\r\n\r\n\t\t\tint64 callId;\r\n\r\n\t\t\tint64 callAccessHash;\r\n\r\n\t\t\t// The id of the caller for the latest incoming call\r\n\t\t\tint64 incomingId;\r\n\r\n\t\t\tint64 incomingCallId;\r\n\r\n\t\t\tint64 incomingCallAccessHash;\r\n\r\n\t\t\tint64 acceptedCallId;\r\n\r\n\t\t\tPlatform::Array<uint8>^ key;\r\n\r\n\t\t\tbool outgoing;\r\n\r\n\t\t\tPlatform::Array<Platform::String^>^ emojis;\r\n\r\n\t\t\t// Indicates if video/audio capture/render is enabled for a call or not.\r\n\t\t\tPhoneVoIPApp::BackEnd::MediaOperations mediaOperations;\r\n\r\n\t\t\tPhoneVoIPApp::BackEnd::CameraLocation cameraLocation;\r\n\r\n\t\t\t// Indicates if video is currently being displayed or not.\r\n\t\t\tbool isShowingVideo;\r\n\r\n\t\t\tbool isRenderingVideo;\r\n\r\n\t\t\t// The method to be called when the incoming call dialog box is dismissed\r\n\t\t\tIncomingCallDialogDismissedCallback^ onIncomingCallDialogDismissed;\r\n\r\n\t\t\t// The VoIP call coordinator\r\n\t\t\tWindows::Phone::Networking::Voip::VoipCallCoordinator^ callCoordinator;\r\n\r\n\t\t\t// The phone audio routing manager\r\n\t\t\tWindows::Phone::Media::Devices::AudioRoutingManager^ audioRoutingManager;\r\n\r\n\t\t\t// Phone call related event handlers\r\n\t\t\tWindows::Foundation::TypedEventHandler<Windows::Phone::Networking::Voip::VoipPhoneCall^, Windows::Phone::Networking::Voip::CallAnswerEventArgs^>^ acceptCallRequestedHandler;\r\n\t\t\tWindows::Foundation::TypedEventHandler<Windows::Phone::Networking::Voip::VoipPhoneCall^, Windows::Phone::Networking::Voip::CallRejectEventArgs^>^ rejectCallRequestedHandler;\r\n\t\t\tWindows::Foundation::TypedEventHandler<Windows::Phone::Networking::Voip::VoipPhoneCall^, Windows::Phone::Networking::Voip::CallStateChangeEventArgs^>^ holdCallRequestedHandler;\r\n\t\t\tWindows::Foundation::TypedEventHandler<Windows::Phone::Networking::Voip::VoipPhoneCall^, Windows::Phone::Networking::Voip::CallStateChangeEventArgs^>^ resumeCallRequestedHandler;\r\n\t\t\tWindows::Foundation::TypedEventHandler<Windows::Phone::Networking::Voip::VoipPhoneCall^, Windows::Phone::Networking::Voip::CallStateChangeEventArgs^>^ endCallRequestedHandler;\r\n\r\n\t\t\t// Audio related event handlers\r\n\t\t\tWindows::Foundation::TypedEventHandler<Windows::Phone::Media::Devices::AudioRoutingManager^, Platform::Object^>^ audioEndpointChangedHandler;\r\n\r\n\t\t\t// A cookie used to un-register the audio endpoint changed handler\r\n\t\t\tWindows::Foundation::EventRegistrationToken audioEndpointChangedHandlercookie;\r\n\r\n\t\t\t// Camera location related event handlers\r\n\t\t\tCameraLocationChangedEventHandler^ cameraLocationChangedHandler;\r\n\t\t};\r\n\t}\r\n}\r\n"
  },
  {
    "path": "BackEnd/Globals.cpp",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include <hstring.h>\r\n#include <memory>\r\n#include <activation.h>\r\n#include <wrl\\module.h>\r\n#include <crtdbg.h>\r\n#include \"Globals.h\"\r\n#include \"ApiLock.h\"\r\n#include \"CallController.h\"\r\n#include \"BackEndAudio.h\"\r\n#include \"BackEndCapture.h\"\r\n\r\nusing namespace PhoneVoIPApp::BackEnd;\r\nusing namespace Windows::Foundation;\r\nusing namespace Windows::Phone::Media::Capture;\r\n\r\nHRESULT __declspec(dllexport) MyGetActivationFactory(_In_ HSTRING activatableClassId, _COM_Outptr_ IInspectable **factory)\r\n{\r\n    *factory = nullptr;\r\n\r\n    Microsoft::WRL::ComPtr<IActivationFactory> activationFactory;\r\n    auto &module = Microsoft::WRL::Module<Microsoft::WRL::InProcDisableCaching>::GetModule();\r\n\r\n    HRESULT hr = module.GetActivationFactory(activatableClassId, &activationFactory);\r\n    if (SUCCEEDED(hr))\r\n    {\r\n        *factory = activationFactory.Detach();\r\n\r\n        if (*factory == nullptr)\r\n        {\r\n            return E_OUTOFMEMORY;\r\n        }\r\n    }\r\n\r\n    return hr;\r\n}\r\n\r\n// Maximum number of characters required to contain the string version of an unsigned integer\r\n#define MAX_CHARS_IN_UINT_AS_STRING ((sizeof(unsigned int) * 4) + 1)\r\n\r\nconst LPCWSTR Globals::noOtherBackgroundProcessEventName = L\"PhoneVoIPApp.noOtherBackgroundProcess\";\r\nconst LPCWSTR Globals::uiDisconnectedEventName = L\"PhoneVoIPApp.uiDisconnected.\";\r\nconst LPCWSTR Globals::backgroundProcessReadyEventName = L\"PhoneVoIPApp.backgroundProcessReady.\";\r\nGlobals^ Globals::singleton = nullptr;\r\n\r\nvoid Globals::StartServer(const Platform::Array<Platform::String^>^ outOfProcServerClassNames)\r\n{\r\n    HRESULT hr = S_OK;\r\n\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    if (outOfProcServerClassNames == nullptr)\r\n    {\r\n        throw ref new Platform::InvalidArgumentException(L\"outOfProcServerClassNames cannot be null\");\r\n    }\r\n\r\n    if (this->started)\r\n    {\r\n        return; // Nothing more to be done\r\n    }\r\n\r\n    // Set an event that indicates that the background process is ready.\r\n    this->backgroundReadyEvent = ::CreateEventEx(\r\n        NULL,\r\n        Globals::GetBackgroundProcessReadyEventName(Globals::GetCurrentProcessId())->Data(),\r\n        CREATE_EVENT_INITIAL_SET | CREATE_EVENT_MANUAL_RESET,\r\n        EVENT_ALL_ACCESS);\r\n    if (this->backgroundReadyEvent == NULL)\r\n    {\r\n        // Something went wrong\r\n        DWORD dwErr = ::GetLastError();\r\n        hr = HRESULT_FROM_WIN32(dwErr);\r\n        throw ref new Platform::COMException(hr, L\"An error occurred trying to create an event that indicates that the background process is ready\");\r\n    }\r\n\r\n    // Set the event\r\n    BOOL success = ::SetEvent(this->backgroundReadyEvent);\r\n    if (success == FALSE)\r\n    {\r\n        DWORD dwErr = ::GetLastError();\r\n        hr = HRESULT_FROM_WIN32(dwErr);\r\n        throw ref new Platform::COMException(hr, L\"An error occurred trying to set an event that indicates that the background process is ready\");\r\n    }\r\n\r\n    this->started = true;\r\n}\r\n\r\nvoid Globals::DoPeriodicKeepAlive()\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    // TODO: Do stuff here - refresh tokens, get new certs from server, etc.\r\n}\r\n\r\nunsigned int Globals::GetCurrentProcessId()\r\n{\r\n    return ::GetCurrentProcessId();\r\n}\r\n\r\nPlatform::String^ Globals::GetUiDisconnectedEventName(unsigned int backgroundProcessId)\r\n{\r\n    WCHAR backgroundProcessIdString[MAX_CHARS_IN_UINT_AS_STRING];\r\n    if (swprintf_s<_countof(backgroundProcessIdString)>(backgroundProcessIdString, L\"%u\", backgroundProcessId) < 0)\r\n        throw ref new Platform::FailureException(L\"Could not create string version of background process id\");\r\n\r\n    auto eventName = ref new Platform::String(Globals::uiDisconnectedEventName) + ref new Platform::String(backgroundProcessIdString);\r\n    return eventName;\r\n}\r\n\r\nPlatform::String^ Globals::GetBackgroundProcessReadyEventName(unsigned int backgroundProcessId)\r\n{\r\n    WCHAR backgroundProcessIdString[MAX_CHARS_IN_UINT_AS_STRING];\r\n    if (swprintf_s<_countof(backgroundProcessIdString)>(backgroundProcessIdString, L\"%u\", backgroundProcessId) < 0)\r\n        throw ref new Platform::FailureException(L\"Could not create string version of background process id\");\r\n\r\n    auto eventName = ref new Platform::String(Globals::backgroundProcessReadyEventName) + ref new Platform::String(backgroundProcessIdString);\r\n    return eventName;\r\n}\r\n\r\nGlobals^ Globals::Instance::get()\r\n{\r\n    if (Globals::singleton == nullptr)\r\n    {\r\n        // Make sure only one API call is in progress at a time\r\n        std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n        if (Globals::singleton == nullptr)\r\n        {\r\n            Globals::singleton = ref new Globals();\r\n        }\r\n        // else: some other thread has created an instance of the call controller\r\n    }\r\n\r\n    return Globals::singleton;\r\n}\r\n\r\nCallController^ Globals::CallController::get()\r\n{\r\n    if (this->callController == nullptr)\r\n    {\r\n        // Make sure only one API call is in progress at a time\r\n        std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n        if (this->callController == nullptr)\r\n        {\r\n            this->callController = ref new PhoneVoIPApp::BackEnd::CallController();\r\n        }\r\n        // else: some other thread has created an instance of the call controller\r\n    }\r\n\r\n    return this->callController;\r\n}\r\n\r\nIVideoRenderer^ Globals::VideoRenderer::get()\r\n{\r\n    // No need to lock - this get is idempotent\r\n    return this->videoRenderer;\r\n}\r\n\r\nvoid Globals::VideoRenderer::set(IVideoRenderer^ value)\r\n{\r\n    // Make sure only one API call is in progress at a time\r\n    std::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n    this->videoRenderer = value;\r\n}\r\n\r\nIMTProtoUpdater^ Globals::MTProtoUpdater::get()\r\n{\r\n\t// No need to lock - this get is idempotent\r\n\treturn this->mtProtoUpdater;\r\n}\r\n\r\nvoid Globals::MTProtoUpdater::set(IMTProtoUpdater^ value)\r\n{\r\n\t// Make sure only one API call is in progress at a time\r\n\tstd::lock_guard<std::recursive_mutex> lock(g_apiLock);\r\n\r\n\tthis->mtProtoUpdater = value;\r\n}\r\n\r\n//BackEndAudio^ Globals::AudioController::get()\r\n//{\r\n//    // No need to lock - this get is idempotent\r\n//    return this->audioController;\r\n//}\r\n\r\nBackEndCapture^ Globals::CaptureController::get()\r\n{\r\n    // No need to lock - this get is idempotent\r\n    return this->captureController;\r\n}\r\n\r\nBackEndTransport^ Globals::TransportController::get()\r\n{\r\n    // No need to lock - this get is idempotent\r\n    return this->transportController;\r\n}\r\n\r\nGlobals::Globals() :\r\n    started(false),\r\n    serverRegistrationCookie(NULL),\r\n    callController(nullptr),\r\n    videoRenderer(nullptr),\r\n    noOtherBackgroundProcessEvent(NULL),\r\n    backgroundReadyEvent(NULL),\r\n    //audioController(nullptr),\r\n    transportController(nullptr),\r\n    captureController(nullptr)\r\n{\r\n    {\r\n        WCHAR szBuffer[256];\r\n        swprintf_s<ARRAYSIZE(szBuffer)>(szBuffer, L\"[Globals::Globals] => VoIP background process with id %d starting up\\n\", this->GetCurrentProcessId());\r\n        ::OutputDebugString(szBuffer);\r\n    }\r\n\r\n    // Create an event that indicates if any other VoIP background exits or not\r\n    this->noOtherBackgroundProcessEvent = ::CreateEventEx(NULL, Globals::noOtherBackgroundProcessEventName, CREATE_EVENT_INITIAL_SET | CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);\r\n    if (this->noOtherBackgroundProcessEvent == NULL)\r\n    {\r\n        // Something went wrong\r\n        DWORD dwErr = ::GetLastError();\r\n        HRESULT hr = HRESULT_FROM_WIN32(dwErr);\r\n        throw ref new Platform::COMException(hr, L\"An error occurred trying to create an event that indicates if the background process exists or not\");\r\n    }\r\n\r\n    // Wait for up to 30 seconds for the event to become set - if another instance of this process exists, this event would be in the reset state\r\n    DWORD reason = ::WaitForSingleObjectEx(this->noOtherBackgroundProcessEvent, 30 * 1000, FALSE);\r\n    _ASSERT(reason != WAIT_FAILED); // We don't care about any of the other reasons why WaitForSingleObjectEx returned\r\n    if (reason == WAIT_TIMEOUT)\r\n    {\r\n        throw ref new Platform::FailureException(L\"Another instance of the VoIP background process exists and that process did not exit within 30 seconds. Cannot continue.\");\r\n    }\r\n\r\n    // Reset the event to indicate that there is a VoIP background process\r\n    BOOL success = ::ResetEvent(this->noOtherBackgroundProcessEvent);\r\n    if (success == FALSE)\r\n    {\r\n        // Something went wrong\r\n        DWORD dwErr = ::GetLastError();\r\n        HRESULT hr = HRESULT_FROM_WIN32(dwErr);\r\n        throw ref new Platform::COMException(hr, L\"An error occurred trying to reset the event that indicates if the background process exists or not\");\r\n    }\r\n    \r\n    // Initialize transport\r\n    this->transportController = ref new BackEndTransport(); // local\r\n\r\n    // Initialize audio controller\r\n    //this->audioController = ref new BackEndAudio();\r\n\r\n    // Set the transport for audio\r\n    //this->audioController->SetTransport(this->transportController);\r\n\r\n    // Initialize capture controller\r\n    this->captureController = ref new BackEndCapture();\r\n\r\n    // Set the transport on the controller\r\n    this->captureController->SetTransport(this->transportController);\r\n    \r\n    // Initialize the call controller\r\n    this->callController = ref new PhoneVoIPApp::BackEnd::CallController();    \r\n}\r\n\r\nGlobals::~Globals()\r\n{\r\n    // The destructor of this singleton object is called when the process is shutting down.\r\n\r\n    // Before shutting down, make sure the UI process is not connected\r\n    HANDLE uiDisconnectedEvent = ::OpenEvent(EVENT_ALL_ACCESS, FALSE, Globals::GetUiDisconnectedEventName(Globals::GetCurrentProcessId())->Data());\r\n    if (uiDisconnectedEvent != NULL)\r\n    {\r\n        // The event exists - wait for it to get signaled (for a maximum of 30 seconds)\r\n        DWORD reason = ::WaitForSingleObjectEx(uiDisconnectedEvent, 30 * 1000, FALSE);\r\n        _ASSERT(reason != WAIT_FAILED); // We don't care about any of the other reasons why WaitForSingleObjectEx returned\r\n    }\r\n\r\n    // At this point, the UI is no longer connected to the background process.\r\n    // It is possible that the UI now reconnects to the background process - this would be a bug,\r\n    // and we should exit the background process anyway.\r\n\r\n    // Unset the event that indicates that the background process is ready\r\n    BOOL success;\r\n    if (this->backgroundReadyEvent != NULL)\r\n    {\r\n        success = ::ResetEvent(this->backgroundReadyEvent);\r\n        _ASSERT(success);\r\n\r\n        ::CloseHandle(this->backgroundReadyEvent);\r\n        this->backgroundReadyEvent = NULL;\r\n    }\r\n\r\n    // Unregister the activation factories for out-of-process objects hosted in this process\r\n    if (this->started)\r\n    {\r\n        RoRevokeActivationFactories(this->serverRegistrationCookie);\r\n    }\r\n\r\n    // Set the event that indicates that no instance of the VoIP background process exists\r\n    if (this->noOtherBackgroundProcessEvent != NULL)\r\n    {\r\n        success = ::SetEvent(this->noOtherBackgroundProcessEvent);\r\n        _ASSERT(success);\r\n\r\n        ::CloseHandle(this->noOtherBackgroundProcessEvent);\r\n        this->noOtherBackgroundProcessEvent = NULL;\r\n    }\r\n\r\n    {\r\n        WCHAR szBuffer[256];\r\n        swprintf_s<ARRAYSIZE(szBuffer)>(szBuffer, L\"[Globals::~Globals] => VoIP background process with id %d shutting down\\n\", this->GetCurrentProcessId());\r\n        ::OutputDebugString(szBuffer);\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/Globals.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n\r\n#include <roapi.h>\r\n#include \"IVideoRenderer.h\"\r\n#include \"IMTProtoUpdater.h\"\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n    namespace BackEnd\r\n    {\r\n        // Forward declarations\r\n        ref class CallController;\r\n        //ref class BackEndAudio;\r\n        ref class BackEndTransport;\r\n        ref class BackEndCapture;\r\n        \r\n        // A singleton container that is used to hold other global singletons and background process-wide static state.\r\n        // Another purpose of this class is to start the out-of-process WinRT server, so that the UI process\r\n        // managed code can instantiate WinRT objects in this process.\r\n        public ref class Globals sealed\r\n        {\r\n        public:\r\n            // Start the out-of-process WinRT server, so that the UI process can instantiate WinRT objects in this process.\r\n            void StartServer(const Platform::Array<Platform::String^>^ outOfProcServerClassNames);\r\n\r\n            // Do some app-specific periodic tasks, to let the remote server know that this endpoint is still alive.\r\n            void DoPeriodicKeepAlive();\r\n\r\n            // Get the process id of the current process\r\n            static unsigned int GetCurrentProcessId();\r\n\r\n            // Get the name of the event that indicates if the UI is connected to the background process or not\r\n            static Platform::String^ GetUiDisconnectedEventName(unsigned int backgroundProcessId);\r\n\r\n            // Get the name of the event that indicates if the background process is ready or not\r\n            static Platform::String^ GetBackgroundProcessReadyEventName(unsigned int backgroundProcessId);\r\n\r\n            // Get the single instance of this class\r\n            static property Globals^ Instance\r\n            {\r\n                Globals^ get();\r\n            }\r\n\r\n            // Get the call controller singleton object\r\n            property PhoneVoIPApp::BackEnd::CallController^ CallController\r\n            {\r\n                PhoneVoIPApp::BackEnd::CallController^ get();\r\n            }\r\n\r\n            // The singleton video renderer object.\r\n            property IVideoRenderer^ VideoRenderer\r\n            {\r\n                IVideoRenderer^ get();\r\n                void set(IVideoRenderer^ value);\r\n\t\t\t}\r\n\r\n\t\t\tproperty IMTProtoUpdater^ MTProtoUpdater\r\n\t\t\t{\r\n\t\t\t\tIMTProtoUpdater^ get();\r\n\t\t\t\tvoid set(IMTProtoUpdater^ value);\r\n\t\t\t}\r\n\r\n            // The singleton audio controller object.\r\n            /*property BackEndAudio^ AudioController\r\n            {\r\n                BackEndAudio^ get();\r\n            }*/\r\n\r\n            // The singleton audio controller object.\r\n            property BackEndCapture^ CaptureController\r\n            {\r\n                BackEndCapture^ get();\r\n            }\r\n\r\n            // The singleton transport object.\r\n            property BackEndTransport^ TransportController\r\n            {\r\n                BackEndTransport^ get();\r\n            }\r\n\r\n        private:\r\n            // Default constructor\r\n            Globals();\r\n\r\n            // Destructor\r\n            ~Globals();\r\n\r\n            // Name of the event that indicates if another instance of the VoIP background process exists or not\r\n            static const LPCWSTR noOtherBackgroundProcessEventName;\r\n\r\n            // Name of the event that indicates if the UI is connected to the background process or not\r\n            static const LPCWSTR uiDisconnectedEventName;\r\n\r\n            // Name of the event that indicates if the background process is ready or not\r\n            static const LPCWSTR backgroundProcessReadyEventName;\r\n\r\n            // The single instance of this class\r\n            static Globals^ singleton;\r\n\r\n            // Indicates if the out-of-process server has started or not\r\n            bool started;\r\n\r\n            // A cookie that is used to unregister remotely activatable objects in this process\r\n            RO_REGISTRATION_COOKIE serverRegistrationCookie;\r\n\r\n            // An event that indicates if another instance of the background process exists or not\r\n            HANDLE noOtherBackgroundProcessEvent;\r\n\r\n            // An event that indicates that the background process is ready\r\n            HANDLE backgroundReadyEvent;\r\n\r\n            // The call controller object\r\n            PhoneVoIPApp::BackEnd::CallController^ callController;\r\n\r\n            // The video renderer object\r\n            PhoneVoIPApp::BackEnd::IVideoRenderer^ videoRenderer;\r\n\r\n\t\t\tPhoneVoIPApp::BackEnd::IMTProtoUpdater^ mtProtoUpdater;\r\n\r\n            // The audio capture/render controller\r\n            //BackEndAudio^ audioController;\r\n\r\n            // The audio capture/render controller\r\n            BackEndCapture^ captureController;\r\n\r\n            // The data transport\r\n            BackEndTransport^ transportController;\r\n        };\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/ICallControllerStatusListener.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n\r\n#include <windows.phone.networking.voip.h>\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n    namespace BackEnd\r\n\t{\r\n\t\t// libtgvoip Endpoint\r\n\t\tpublic ref class Endpoint sealed{\r\n\t\tpublic:\r\n\t\t\tproperty int64 id;\r\n\t\t\tproperty uint16 port;\r\n\t\t\tproperty Platform::String^ ipv4;\r\n\t\t\tproperty Platform::String^ ipv6;\r\n\t\t\tproperty Platform::Array<uint8>^ peerTag;\r\n\t\t};\r\n\r\n\t\tpublic value struct EndpointStruct{\r\n\t\t\tint64 id;\r\n\t\t\tuint16 port;\r\n\t\t\tPlatform::String^ ipv4;\r\n\t\t\tPlatform::String^ ipv6;\r\n\t\t\tPlatform::String^ peerTag;\r\n\t\t};\r\n\r\n\t\t// libtgvoip ProxyProtocol\r\n\t\tpublic enum class ProxyProtocol : int{\r\n\t\t\tNone = (int)libtgvoip::ProxyProtocol::None,\r\n\t\t\tSOCKS5 = (int)libtgvoip::ProxyProtocol::SOCKS5\r\n\t\t};\r\n\r\n\t\tpublic value struct ProxyStruct{\r\n\t\t\tProxyProtocol protocol;\r\n\t\t\tPlatform::String^ address;\r\n\t\t\tuint16 port;\r\n\t\t\tPlatform::String^ username;\r\n\t\t\tPlatform::String^ password;\r\n\t\t};\r\n\r\n\t\t// libtgvoip CallState\r\n\t\tpublic enum class CallState : int{\r\n\t\t\tWaitInit\t\t= (int)libtgvoip::CallState::WaitInit,\r\n\t\t\tWaitInitAck\t\t= (int)libtgvoip::CallState::WaitInitAck,\r\n\t\t\tEstablished\t\t= (int)libtgvoip::CallState::Established,\r\n\t\t\tFailed\t\t\t= (int)libtgvoip::CallState::Failed\r\n\t\t};\r\n\r\n\t\t// libtgvoip Error\r\n\t\tpublic enum class Error : int{\r\n\t\t\tUnknown\t\t\t= (int)libtgvoip::Error::Unknown,\r\n\t\t\tIncompatible\t= (int)libtgvoip::Error::Incompatible,\r\n\t\t\tTimeout\t\t\t= (int)libtgvoip::Error::Timeout,\r\n\t\t\tAudioIO\t\t\t= (int)libtgvoip::Error::AudioIO\r\n\t\t};\r\n\r\n\t\t// libtgvoip NetworkType\r\n\t\tpublic enum class NetworkType : int{\r\n\t\t\tUnknown\t\t\t= (int)libtgvoip::NetworkType::Unknown,\r\n\t\t\tGPRS\t\t\t= (int)libtgvoip::NetworkType::GPRS,\r\n\t\t\tEDGE\t\t\t= (int)libtgvoip::NetworkType::EDGE,\r\n\t\t\tUMTS\t\t\t= (int)libtgvoip::NetworkType::UMTS,\r\n\t\t\tHSPA\t\t\t= (int)libtgvoip::NetworkType::HSPA,\r\n\t\t\tLTE\t\t\t\t= (int)libtgvoip::NetworkType::LTE,\r\n\t\t\tWiFi\t\t\t= (int)libtgvoip::NetworkType::WiFi,\r\n\t\t\tEthernet\t\t= (int)libtgvoip::NetworkType::Ethernet,\r\n\t\t\tOtherHighSpeed\t= (int)libtgvoip::NetworkType::OtherHighSpeed,\r\n\t\t\tOtherLowSpeed\t= (int)libtgvoip::NetworkType::OtherLowSpeed,\r\n\t\t\tDialup\t\t\t= (int)libtgvoip::NetworkType::Dialup,\r\n\t\t\tOtherMobile\t\t= (int)libtgvoip::NetworkType::OtherMobile,\r\n\t\t};\r\n\r\n\t\t// libtgvoip DataSavingMode\r\n\t\tpublic enum class DataSavingMode{\r\n\t\t\tNever\t\t\t= (int)libtgvoip::DataSavingMode::Never,\r\n\t\t\tMobileOnly\t\t= (int)libtgvoip::DataSavingMode::MobileOnly,\r\n\t\t\tAlways\t\t\t= (int)libtgvoip::DataSavingMode::Always\r\n\t\t};\r\n\r\n        // The status of a call\r\n        public enum class CallStatus\r\n        {\r\n            None = 0x00,\r\n            InProgress,\r\n            Held\r\n        };\r\n\r\n        // Where is the call audio going?\r\n        public enum class CallAudioRoute\r\n        {\r\n            None            = (int)Windows::Phone::Media::Devices::AvailableAudioRoutingEndpoints::None,\r\n            Earpiece        = (int)Windows::Phone::Media::Devices::AvailableAudioRoutingEndpoints::Earpiece,\r\n            Speakerphone    = (int)Windows::Phone::Media::Devices::AvailableAudioRoutingEndpoints::Speakerphone,\r\n            Bluetooth       = (int)Windows::Phone::Media::Devices::AvailableAudioRoutingEndpoints::Bluetooth\r\n        };\r\n\r\n        // Which camera are we using?\r\n        public enum class CameraLocation\r\n        {\r\n            Front = (int)Windows::Phone::Media::Capture::CameraSensorLocation::Front,\r\n            Back = (int)Windows::Phone::Media::Capture::CameraSensorLocation::Back\r\n        };\r\n\r\n        // Used to indicate the status of video/audio capture/render\r\n        public enum class MediaOperations\r\n        {\r\n            None                = 0x00,\r\n            VideoCapture        = 0x01,\r\n            VideoRender         = 0x02,\r\n            AudioCapture        = 0x04,\r\n            AudioRender         = 0x08\r\n        };\r\n\r\n        // An interface that is used by the call controller to deliver status change notifications.\r\n        // This interface is meant to be implemented in the UI process, and will be called back by\r\n        // the agent host process using out-of-process WinRT.\r\n\t\tpublic interface class ICallControllerStatusListener\r\n        {\r\n\t\t\tvoid OnSignalBarsChanged(int newSignal);\r\n\r\n\t\t\tvoid OnCallStateChanged(CallState newState);\r\n\r\n            // The status of a call has changed.\r\n            void OnCallStatusChanged(CallStatus newStatus);\r\n\r\n            // The call audio route has changed. Also called when the available audio routes have changed.\r\n            void OnCallAudioRouteChanged(CallAudioRoute newRoute);\r\n\r\n            // Video/audio capture/render has started/stopped\r\n            void OnMediaOperationsChanged(MediaOperations newOperations);\r\n\r\n            // Camera location has changed\r\n            void OnCameraLocationChanged(CameraLocation newCameraLocation);\r\n        };\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/IConfig.h",
    "content": "#pragma once\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n\tnamespace BackEnd\r\n\t{\r\n\t\tpublic interface class IConfig\r\n\t\t{\r\n\t\t\tproperty double InitTimeout;\r\n\t\t\tproperty double RecvTimeout;\r\n\t\t};\r\n\t}\r\n}"
  },
  {
    "path": "BackEnd/IMTProtoUpdater.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n\tnamespace BackEnd\r\n\t{\r\n\t\t// An interface that is used by the call controller to start and stop mtproto communication.\r\n\t\tpublic interface class IMTProtoUpdater\r\n\t\t{\r\n\t\t\t// Start handle background updates.\r\n\t\t\tvoid Start(int pts, int date, int qts);\r\n\r\n\t\t\t// Stop handle background updates.\r\n\t\t\tvoid Stop();\r\n\r\n\t\t\t// Discard incoming call\r\n\t\t\tvoid DiscardCall(int64 id, int64 accessHash);\r\n\r\n\t\t\t// Received incoming call\r\n\t\t\tvoid ReceivedCall(int64 id, int64 accessHash);\r\n\t\t};\r\n\t}\r\n}"
  },
  {
    "path": "BackEnd/IVideoRenderer.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n    namespace BackEnd\r\n    {\r\n        // An interface that is used by the call controller to start and stop video rendering.\r\n        public interface class IVideoRenderer\r\n        {\r\n            // Start rendering video.\r\n            void Start();\r\n\r\n            // Stop rendering video.\r\n            void Stop();\r\n        };\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEnd/Server.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n#include <windows.h>\r\n#include \"Globals.h\"\r\n\r\nnamespace PhoneVoIPApp\r\n{\r\n    namespace BackEnd\r\n    {\r\n        namespace OutOfProcess\r\n        {\r\n            // A remotely activatable class that is used by the UI process and managed code within\r\n            // the VoIP background process to get access to native objects that exist in the VoIP background process.\r\n            public ref class Server sealed\r\n            {\r\n            public:\r\n                // Constructor\r\n                Server()\r\n                {\r\n                }\r\n\r\n                // Destructor\r\n                virtual ~Server()\r\n                {\r\n                }\r\n\r\n                // Called by the UI process to get the call controller object\r\n                property CallController^ CallController\r\n                {\r\n                    PhoneVoIPApp::BackEnd::CallController^ get()\r\n                    {\r\n                        return Globals::Instance->CallController;\r\n                    };\r\n                }\r\n\r\n                // Add methods and properties to get other objects here, as required.\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "BackEndProxyStub/BackEndProxyStub.def",
    "content": "EXPORTS\r\n    DllGetClassObject    PRIVATE\r\n    DllCanUnloadNow      PRIVATE\r\n    DllRegisterServer    PRIVATE\r\n    DllUnregisterServer  PRIVATE"
  },
  {
    "path": "BackEndProxyStub/BackEndProxyStub.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|ARM\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{bbabeea1-494c-4618-96e3-399873a5558b}</ProjectGuid>\r\n    <RootNamespace>BackEndProxyStub</RootNamespace>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and '$(VisualStudioVersion)' == ''\">$(VCTargetsPath11)</VCTargetsPath>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n    <TargetPlatformIdentifier>Windows Phone</TargetPlatformIdentifier>\r\n    <TargetPlatformVersion>8.0</TargetPlatformVersion>\r\n    <ApplicationType>Windows Phone Silverlight</ApplicationType>\r\n    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <IgnoreImportLibrary>false</IgnoreImportLibrary>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <IgnoreImportLibrary>false</IgnoreImportLibrary>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <IgnoreImportLibrary>false</IgnoreImportLibrary>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <IgnoreImportLibrary>false</IgnoreImportLibrary>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup>\r\n    <GenerateManifest>false</GenerateManifest>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <TargetName>PhoneVoIPApp.$(ProjectName)</TargetName>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <TargetName>PhoneVoIPApp.$(ProjectName)</TargetName>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <TargetName>PhoneVoIPApp.$(ProjectName)</TargetName>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <TargetName>PhoneVoIPApp.$(ProjectName)</TargetName>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;WIN32;REGISTER_PROXY_DLL;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;WIN32;REGISTER_PROXY_DLL;_USRDLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;_ARM_;WIN32;REGISTER_PROXY_DLL;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;_ARM_;WIN32;REGISTER_PROXY_DLL;_USRDLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup>\r\n    <ClCompile>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <AdditionalDependencies>windowsphonecore.lib;runtimeobject.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\r\n      <ModuleDefinitionFile Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">$(ProjectName).def</ModuleDefinitionFile>\r\n      <ModuleDefinitionFile Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">$(ProjectName).def</ModuleDefinitionFile>\r\n      <ModuleDefinitionFile Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$(ProjectName).def</ModuleDefinitionFile>\r\n      <ModuleDefinitionFile Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$(ProjectName).def</ModuleDefinitionFile>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Windows\">\r\n      <IsWinMDFile>true</IsWinMDFile>\r\n    </Reference>\r\n    <Reference Include=\"platform.winmd\">\r\n      <IsWinMDFile>true</IsWinMDFile>\r\n      <Private>false</Private>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"dlldata.c\" />\r\n    <ClCompile Include=\"PhoneVoIPApp.BackEnd.OutOfProcess_i.c\" />\r\n    <ClCompile Include=\"PhoneVoIPApp.BackEnd.OutOfProcess_p.c\" />\r\n    <ClCompile Include=\"PhoneVoIPApp.BackEnd_i.c\" />\r\n    <ClCompile Include=\"PhoneVoIPApp.BackEnd_p.c\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"PhoneVoIPApp.BackEnd.h\" />\r\n    <ClInclude Include=\"PhoneVoIPApp.BackEnd.OutOfProcess.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"BackEndProxyStub.def\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\WindowsPhone\\v$(TargetPlatformVersion)\\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "BackEndProxyStub/PhoneVoIPApp.BackEnd.OutOfProcess.h",
    "content": "\r\n\r\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r\n\r\n\r\n /* File created by MIDL compiler version 8.00.0603 */\r\n/* at Tue Jan 29 08:48:52 2019\r\n */\r\n/* Compiler settings for C:\\Users\\evgeny\\AppData\\Local\\Temp\\PhoneVoIPApp.BackEnd.OutOfProcess.idl-5b92719d:\r\n    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=ARM 8.00.0603 \r\n    protocol : dce , ms_ext, c_ext, robust\r\n    error checks: allocation ref bounds_check enum stub_data \r\n    VC __declspec() decoration level: \r\n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r\n         DECLSPEC_UUID(), MIDL_INTERFACE()\r\n*/\r\n/* @@MIDL_FILE_HEADING(  ) */\r\n\r\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\r\n\r\n\r\n/* verify that the <rpcndr.h> version is high enough to compile this file*/\r\n#ifndef __REQUIRED_RPCNDR_H_VERSION__\r\n#define __REQUIRED_RPCNDR_H_VERSION__ 475\r\n#endif\r\n\r\n#include \"rpc.h\"\r\n#include \"rpcndr.h\"\r\n\r\n#ifndef __RPCNDR_H_VERSION__\r\n#error this stub requires an updated version of <rpcndr.h>\r\n#endif // __RPCNDR_H_VERSION__\r\n\r\n#ifndef COM_NO_WINDOWS_H\r\n#include \"windows.h\"\r\n#include \"ole2.h\"\r\n#endif /*COM_NO_WINDOWS_H*/\r\n\r\n#ifndef __PhoneVoIPApp2EBackEnd2EOutOfProcess_h__\r\n#define __PhoneVoIPApp2EBackEnd2EOutOfProcess_h__\r\n\r\n#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r\n#pragma once\r\n#endif\r\n\r\n/* Forward Declarations */ \r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            namespace OutOfProcess {\r\n                interface __IServerPublicNonVirtuals;\r\n            } /* end namespace */\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_FWD_DEFINED__ */\r\n\r\n\r\n/* header files for imported files */\r\n#include \"inspectable.h\"\r\n#include \"AsyncInfo.h\"\r\n#include \"EventToken.h\"\r\n#include \"Windows.Foundation.h\"\r\n#include \"PhoneVoIPApp.BackEnd.h\"\r\n\r\n#ifdef __cplusplus\r\nextern \"C\"{\r\n#endif \r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd2EOutOfProcess_0000_0000 */\r\n/* [local] */ \r\n\r\n#if defined(__cplusplus)\r\n}\r\n#endif // defined(__cplusplus)\r\n#include <Windows.Foundation.h>\r\n#if !defined(__phonevoipapp2Ebackend_h__)\r\n#include <PhoneVoIPApp.BackEnd.h>\r\n#endif // !defined(__phonevoipapp2Ebackend_h__)\r\n#if defined(__cplusplus)\r\nextern \"C\" {\r\n#endif // defined(__cplusplus)\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\nnamespace PhoneVoIPApp {\r\nnamespace BackEnd {\r\nclass CallController;\r\n} /*BackEnd*/\r\n} /*PhoneVoIPApp*/\r\n}\r\n#endif\r\n\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\nnamespace PhoneVoIPApp {\r\nnamespace BackEnd {\r\nnamespace OutOfProcess {\r\nclass Server;\r\n} /*OutOfProcess*/\r\n} /*BackEnd*/\r\n} /*PhoneVoIPApp*/\r\n}\r\n#endif\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd_OutOfProcess___IServerPublicNonVirtuals[] = L\"PhoneVoIPApp.BackEnd.OutOfProcess.__IServerPublicNonVirtuals\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd2EOutOfProcess_0000_0000 */\r\n/* [local] */ \r\n\r\n\r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd2EOutOfProcess_0000_0000_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd2EOutOfProcess_0000_0000_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::OutOfProcess::__IServerPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                namespace OutOfProcess {\r\n                    \r\n                    MIDL_INTERFACE(\"7BF79491-56BE-375A-BC22-0058B158F01F\")\r\n                    __IServerPublicNonVirtuals : public IInspectable\r\n                    {\r\n                    public:\r\n                        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CallController( \r\n                            /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::__ICallControllerPublicNonVirtuals **__returnValue) = 0;\r\n                        \r\n                    };\r\n\r\n                    extern const __declspec(selectany) IID & IID___IServerPublicNonVirtuals = __uuidof(__IServerPublicNonVirtuals);\r\n\r\n                    \r\n                }  /* end namespace */\r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtualsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CallController )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals **__returnValue);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtualsVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtualsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_get_CallController(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_CallController(This,__returnValue) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd2EOutOfProcess_0000_0001 */\r\n/* [local] */ \r\n\r\n#ifndef RUNTIMECLASS_PhoneVoIPApp_BackEnd_OutOfProcess_Server_DEFINED\r\n#define RUNTIMECLASS_PhoneVoIPApp_BackEnd_OutOfProcess_Server_DEFINED\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_PhoneVoIPApp_BackEnd_OutOfProcess_Server[] = L\"PhoneVoIPApp.BackEnd.OutOfProcess.Server\";\r\n#endif\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd2EOutOfProcess_0000_0001 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd2EOutOfProcess_0000_0001_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd2EOutOfProcess_0000_0001_v0_0_s_ifspec;\r\n\r\n/* Additional Prototypes for ALL interfaces */\r\n\r\n/* end of Additional Prototypes */\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif\r\n\r\n\r\n"
  },
  {
    "path": "BackEndProxyStub/PhoneVoIPApp.BackEnd.OutOfProcess_i.c",
    "content": "\r\n\r\n/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */\r\n\r\n/* link this file in with the server and any clients */\r\n\r\n\r\n /* File created by MIDL compiler version 8.00.0603 */\r\n/* at Tue Jan 29 08:48:52 2019\r\n */\r\n/* Compiler settings for C:\\Users\\evgeny\\AppData\\Local\\Temp\\PhoneVoIPApp.BackEnd.OutOfProcess.idl-5b92719d:\r\n    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=ARM 8.00.0603 \r\n    protocol : dce , ms_ext, c_ext, robust\r\n    error checks: allocation ref bounds_check enum stub_data \r\n    VC __declspec() decoration level: \r\n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r\n         DECLSPEC_UUID(), MIDL_INTERFACE()\r\n*/\r\n/* @@MIDL_FILE_HEADING(  ) */\r\n\r\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\r\n\r\n\r\n#ifdef __cplusplus\r\nextern \"C\"{\r\n#endif \r\n\r\n\r\n#include <rpc.h>\r\n#include <rpcndr.h>\r\n\r\n#ifdef _MIDL_USE_GUIDDEF_\r\n\r\n#ifndef INITGUID\r\n#define INITGUID\r\n#include <guiddef.h>\r\n#undef INITGUID\r\n#else\r\n#include <guiddef.h>\r\n#endif\r\n\r\n#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\r\n        DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)\r\n\r\n#else // !_MIDL_USE_GUIDDEF_\r\n\r\n#ifndef __IID_DEFINED__\r\n#define __IID_DEFINED__\r\n\r\ntypedef struct _IID\r\n{\r\n    unsigned long x;\r\n    unsigned short s1;\r\n    unsigned short s2;\r\n    unsigned char  c[8];\r\n} IID;\r\n\r\n#endif // __IID_DEFINED__\r\n\r\n#ifndef CLSID_DEFINED\r\n#define CLSID_DEFINED\r\ntypedef IID CLSID;\r\n#endif // CLSID_DEFINED\r\n\r\n#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\r\n        const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\r\n\r\n#endif !_MIDL_USE_GUIDDEF_\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals,0x7BF79491,0x56BE,0x375A,0xBC,0x22,0x00,0x58,0xB1,0x58,0xF0,0x1F);\r\n\r\n#undef MIDL_DEFINE_GUID\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n\r\n\r\n"
  },
  {
    "path": "BackEndProxyStub/PhoneVoIPApp.BackEnd.OutOfProcess_p.c",
    "content": "\r\n\r\n/* this ALWAYS GENERATED file contains the proxy stub code */\r\n\r\n\r\n /* File created by MIDL compiler version 8.00.0603 */\r\n/* at Tue Jan 29 08:48:52 2019\r\n */\r\n/* Compiler settings for C:\\Users\\evgeny\\AppData\\Local\\Temp\\PhoneVoIPApp.BackEnd.OutOfProcess.idl-5b92719d:\r\n    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=ARM 8.00.0603 \r\n    protocol : dce , ms_ext, c_ext, robust\r\n    error checks: allocation ref bounds_check enum stub_data \r\n    VC __declspec() decoration level: \r\n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r\n         DECLSPEC_UUID(), MIDL_INTERFACE()\r\n*/\r\n/* @@MIDL_FILE_HEADING(  ) */\r\n\r\n#if defined(_ARM_)\r\n\r\n\r\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\r\n#if _MSC_VER >= 1200\r\n#pragma warning(push)\r\n#endif\r\n\r\n#pragma warning( disable: 4211 )  /* redefine extern to static */\r\n#pragma warning( disable: 4232 )  /* dllimport identity*/\r\n#pragma warning( disable: 4024 )  /* array to pointer mapping*/\r\n#pragma warning( disable: 4152 )  /* function/data pointer conversion in expression */\r\n\r\n#define USE_STUBLESS_PROXY\r\n\r\n\r\n/* verify that the <rpcproxy.h> version is high enough to compile this file*/\r\n#ifndef __REDQ_RPCPROXY_H_VERSION__\r\n#define __REQUIRED_RPCPROXY_H_VERSION__ 475\r\n#endif\r\n\r\n\r\n#include \"rpcproxy.h\"\r\n#ifndef __RPCPROXY_H_VERSION__\r\n#error this stub requires an updated version of <rpcproxy.h>\r\n#endif /* __RPCPROXY_H_VERSION__ */\r\n\r\n\r\n#include \"PhoneVoIPApp.BackEnd.OutOfProcess.h\"\r\n\r\n#define TYPE_FORMAT_STRING_SIZE   25                                \r\n#define PROC_FORMAT_STRING_SIZE   43                                \r\n#define EXPR_FORMAT_STRING_SIZE   1                                 \r\n#define TRANSMIT_AS_TABLE_SIZE    0            \r\n#define WIRE_MARSHAL_TABLE_SIZE   0            \r\n\r\ntypedef struct _PhoneVoIPApp2EBackEnd2EOutOfProcess_MIDL_TYPE_FORMAT_STRING\r\n    {\r\n    short          Pad;\r\n    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];\r\n    } PhoneVoIPApp2EBackEnd2EOutOfProcess_MIDL_TYPE_FORMAT_STRING;\r\n\r\ntypedef struct _PhoneVoIPApp2EBackEnd2EOutOfProcess_MIDL_PROC_FORMAT_STRING\r\n    {\r\n    short          Pad;\r\n    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];\r\n    } PhoneVoIPApp2EBackEnd2EOutOfProcess_MIDL_PROC_FORMAT_STRING;\r\n\r\ntypedef struct _PhoneVoIPApp2EBackEnd2EOutOfProcess_MIDL_EXPR_FORMAT_STRING\r\n    {\r\n    long          Pad;\r\n    unsigned char  Format[ EXPR_FORMAT_STRING_SIZE ];\r\n    } PhoneVoIPApp2EBackEnd2EOutOfProcess_MIDL_EXPR_FORMAT_STRING;\r\n\r\n\r\nstatic const RPC_SYNTAX_IDENTIFIER  _RpcTransferSyntax = \r\n{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};\r\n\r\n\r\nextern const PhoneVoIPApp2EBackEnd2EOutOfProcess_MIDL_TYPE_FORMAT_STRING PhoneVoIPApp2EBackEnd2EOutOfProcess__MIDL_TypeFormatString;\r\nextern const PhoneVoIPApp2EBackEnd2EOutOfProcess_MIDL_PROC_FORMAT_STRING PhoneVoIPApp2EBackEnd2EOutOfProcess__MIDL_ProcFormatString;\r\nextern const PhoneVoIPApp2EBackEnd2EOutOfProcess_MIDL_EXPR_FORMAT_STRING PhoneVoIPApp2EBackEnd2EOutOfProcess__MIDL_ExprFormatString;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_ProxyInfo;\r\n\r\n\r\n\r\n#if !defined(__RPC_ARM32__)\r\n#error  Invalid build platform for this stub.\r\n#endif\r\n\r\n#if !(TARGET_IS_NT50_OR_LATER)\r\n#error You need Windows 2000 or later to run this stub because it uses these features:\r\n#error   /robust command line switch.\r\n#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.\r\n#error This app will fail with the RPC_X_WRONG_STUB_VERSION error.\r\n#endif\r\n\r\n\r\nstatic const PhoneVoIPApp2EBackEnd2EOutOfProcess_MIDL_PROC_FORMAT_STRING PhoneVoIPApp2EBackEnd2EOutOfProcess__MIDL_ProcFormatString =\r\n    {\r\n        0,\r\n        {\r\n\r\n\t/* Procedure get_CallController */\r\n\r\n\t\t\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/*  2 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/*  6 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/*  8 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 10 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 12 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 14 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 16 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 18 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 20 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 22 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 24 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 26 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 28 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 30 */\tNdrFcShort( 0x13 ),\t/* Flags:  must size, must free, out, */\r\n/* 32 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 34 */\tNdrFcShort( 0x2 ),\t/* Type Offset=2 */\r\n\r\n\t/* Return value */\r\n\r\n/* 36 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 38 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 40 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t\t\t0x0\r\n        }\r\n    };\r\n\r\nstatic const PhoneVoIPApp2EBackEnd2EOutOfProcess_MIDL_TYPE_FORMAT_STRING PhoneVoIPApp2EBackEnd2EOutOfProcess__MIDL_TypeFormatString =\r\n    {\r\n        0,\r\n        {\r\n\t\t\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/*  2 */\t\r\n\t\t\t0x11, 0x10,\t/* FC_RP [pointer_deref] */\r\n/*  4 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (6) */\r\n/*  6 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/*  8 */\tNdrFcLong( 0x6b50718 ),\t/* 112527128 */\r\n/* 12 */\tNdrFcShort( 0x3528 ),\t/* 13608 */\r\n/* 14 */\tNdrFcShort( 0x3b66 ),\t/* 15206 */\r\n/* 16 */\t0xbe,\t\t/* 190 */\r\n\t\t\t0x76,\t\t/* 118 */\r\n/* 18 */\t0xe1,\t\t/* 225 */\r\n\t\t\t0x83,\t\t/* 131 */\r\n/* 20 */\t0xaa,\t\t/* 170 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 22 */\t0xd4,\t\t/* 212 */\r\n\t\t\t0xa5,\t\t/* 165 */\r\n\r\n\t\t\t0x0\r\n        }\r\n    };\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd2EOutOfProcess_0000_0000, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: IUnknown, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */\r\n\r\n\r\n/* Object interface: IInspectable, ver. 0.0,\r\n   GUID={0xAF86E2E0,0xB12D,0x4c6a,{0x9C,0x5A,0xD7,0xAA,0x65,0x10,0x1E,0x90}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals, ver. 0.0,\r\n   GUID={0x7BF79491,0x56BE,0x375A,{0xBC,0x22,0x00,0x58,0xB1,0x58,0xF0,0x1F}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    0\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd2EOutOfProcess__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd2EOutOfProcess__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(7) ___x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtualsProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals::get_CallController */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtualsStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_ServerInfo,\r\n    7,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd2EOutOfProcess_0000_0001, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\nstatic const MIDL_STUB_DESC Object_StubDesc = \r\n    {\r\n    0,\r\n    NdrOleAllocate,\r\n    NdrOleFree,\r\n    0,\r\n    0,\r\n    0,\r\n    0,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd2EOutOfProcess__MIDL_TypeFormatString.Format,\r\n    1, /* -error bounds_check flag */\r\n    0x50002, /* Ndr library version */\r\n    0,\r\n    0x800025b, /* MIDL Version 8.0.603 */\r\n    0,\r\n    0,\r\n    0,  /* notify & notify_flag routine table */\r\n    0x1, /* MIDL flag */\r\n    0, /* cs routines */\r\n    0,   /* proxy/server info */\r\n    0\r\n    };\r\n\r\nconst CInterfaceProxyVtbl * const _PhoneVoIPApp2EBackEnd2EOutOfProcess_ProxyVtblList[] = \r\n{\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtualsProxyVtbl,\r\n    0\r\n};\r\n\r\nconst CInterfaceStubVtbl * const _PhoneVoIPApp2EBackEnd2EOutOfProcess_StubVtblList[] = \r\n{\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtualsStubVtbl,\r\n    0\r\n};\r\n\r\nPCInterfaceName const _PhoneVoIPApp2EBackEnd2EOutOfProcess_InterfaceNamesList[] = \r\n{\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_COutOfProcess_C____IServerPublicNonVirtuals\",\r\n    0\r\n};\r\n\r\nconst IID *  const _PhoneVoIPApp2EBackEnd2EOutOfProcess_BaseIIDList[] = \r\n{\r\n    &IID_IInspectable,\r\n    0\r\n};\r\n\r\n\r\n#define _PhoneVoIPApp2EBackEnd2EOutOfProcess_CHECK_IID(n)\tIID_GENERIC_CHECK_IID( _PhoneVoIPApp2EBackEnd2EOutOfProcess, pIID, n)\r\n\r\nint __stdcall _PhoneVoIPApp2EBackEnd2EOutOfProcess_IID_Lookup( const IID * pIID, int * pIndex )\r\n{\r\n    \r\n    if(!_PhoneVoIPApp2EBackEnd2EOutOfProcess_CHECK_IID(0))\r\n        {\r\n        *pIndex = 0;\r\n        return 1;\r\n        }\r\n\r\n    return 0;\r\n}\r\n\r\nconst ExtendedProxyFileInfo PhoneVoIPApp2EBackEnd2EOutOfProcess_ProxyFileInfo = \r\n{\r\n    (PCInterfaceProxyVtblList *) & _PhoneVoIPApp2EBackEnd2EOutOfProcess_ProxyVtblList,\r\n    (PCInterfaceStubVtblList *) & _PhoneVoIPApp2EBackEnd2EOutOfProcess_StubVtblList,\r\n    (const PCInterfaceName * ) & _PhoneVoIPApp2EBackEnd2EOutOfProcess_InterfaceNamesList,\r\n    (const IID ** ) & _PhoneVoIPApp2EBackEnd2EOutOfProcess_BaseIIDList,\r\n    & _PhoneVoIPApp2EBackEnd2EOutOfProcess_IID_Lookup, \r\n    1,\r\n    2,\r\n    0, /* table of [async_uuid] interfaces */\r\n    0, /* Filler1 */\r\n    0, /* Filler2 */\r\n    0  /* Filler3 */\r\n};\r\n#if _MSC_VER >= 1200\r\n#pragma warning(pop)\r\n#endif\r\n\r\n\r\n#endif /* if defined(_ARM_) */\r\n\r\n"
  },
  {
    "path": "BackEndProxyStub/PhoneVoIPApp.BackEnd.h",
    "content": "\r\n\r\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r\n\r\n\r\n /* File created by MIDL compiler version 8.00.0603 */\r\n/* at Tue Jan 29 08:48:50 2019\r\n */\r\n/* Compiler settings for C:\\Users\\evgeny\\AppData\\Local\\Temp\\PhoneVoIPApp.BackEnd.idl-35395493:\r\n    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=ARM 8.00.0603 \r\n    protocol : dce , ms_ext, c_ext, robust\r\n    error checks: allocation ref bounds_check enum stub_data \r\n    VC __declspec() decoration level: \r\n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r\n         DECLSPEC_UUID(), MIDL_INTERFACE()\r\n*/\r\n/* @@MIDL_FILE_HEADING(  ) */\r\n\r\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\r\n\r\n\r\n/* verify that the <rpcndr.h> version is high enough to compile this file*/\r\n#ifndef __REQUIRED_RPCNDR_H_VERSION__\r\n#define __REQUIRED_RPCNDR_H_VERSION__ 475\r\n#endif\r\n\r\n#include \"rpc.h\"\r\n#include \"rpcndr.h\"\r\n\r\n#ifndef __RPCNDR_H_VERSION__\r\n#error this stub requires an updated version of <rpcndr.h>\r\n#endif // __RPCNDR_H_VERSION__\r\n\r\n#ifndef COM_NO_WINDOWS_H\r\n#include \"windows.h\"\r\n#include \"ole2.h\"\r\n#endif /*COM_NO_WINDOWS_H*/\r\n\r\n#ifndef __PhoneVoIPApp2EBackEnd_h__\r\n#define __PhoneVoIPApp2EBackEnd_h__\r\n\r\n#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r\n#pragma once\r\n#endif\r\n\r\n/* Forward Declarations */ \r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface IMessageReceivedEventHandler;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface ICameraLocationChangedEventHandler;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface IIncomingCallDialogDismissedCallback;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface __IBackEndTransportPublicNonVirtuals;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface __IBackEndTransportProtectedNonVirtuals;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface __IEndpointPublicNonVirtuals;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface ICallControllerStatusListener;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface __IBackEndCapturePublicNonVirtuals;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface __IBackEndCaptureProtectedNonVirtuals;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface IConfig;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface __ICallControllerPublicNonVirtuals;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface IVideoRenderer;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface IMTProtoUpdater;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface __IGlobalsPublicNonVirtuals;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_FWD_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_FWD_DEFINED__\r\ntypedef interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            interface __IGlobalsStatics;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_FWD_DEFINED__ */\r\n\r\n\r\n/* header files for imported files */\r\n#include \"inspectable.h\"\r\n#include \"AsyncInfo.h\"\r\n#include \"EventToken.h\"\r\n#include \"Windows.Foundation.h\"\r\n#include \"Windows.Storage.Streams.h\"\r\n\r\n#ifdef __cplusplus\r\nextern \"C\"{\r\n#endif \r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0000 */\r\n/* [local] */ \r\n\r\n#if defined(__cplusplus)\r\n}\r\n#endif // defined(__cplusplus)\r\n#include <Windows.Foundation.h>\r\n#if !defined(__windows2Estorage2Estreams_h__)\r\n#include <Windows.Storage.Streams.h>\r\n#endif // !defined(__windows2Estorage2Estreams_h__)\r\n#if defined(__cplusplus)\r\nextern \"C\" {\r\n#endif // defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_CPhoneVoIPApp_CBackEnd_CProxyProtocol __x_ABI_CPhoneVoIPApp_CBackEnd_CProxyProtocol;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_CPhoneVoIPApp_CBackEnd_CCallState __x_ABI_CPhoneVoIPApp_CBackEnd_CCallState;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_CPhoneVoIPApp_CBackEnd_CError __x_ABI_CPhoneVoIPApp_CBackEnd_CError;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_CPhoneVoIPApp_CBackEnd_CNetworkType __x_ABI_CPhoneVoIPApp_CBackEnd_CNetworkType;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_CPhoneVoIPApp_CBackEnd_CDataSavingMode __x_ABI_CPhoneVoIPApp_CBackEnd_CDataSavingMode;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_CPhoneVoIPApp_CBackEnd_CCallStatus __x_ABI_CPhoneVoIPApp_CBackEnd_CCallStatus;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_CPhoneVoIPApp_CBackEnd_CCallAudioRoute __x_ABI_CPhoneVoIPApp_CBackEnd_CCallAudioRoute;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_CPhoneVoIPApp_CBackEnd_CCameraLocation __x_ABI_CPhoneVoIPApp_CBackEnd_CCameraLocation;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_CPhoneVoIPApp_CBackEnd_CMediaOperations __x_ABI_CPhoneVoIPApp_CBackEnd_CMediaOperations;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\ntypedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_CEndpointStruct __x_ABI_CPhoneVoIPApp_CBackEnd_CEndpointStruct;\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\ntypedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_CProxyStruct __x_ABI_CPhoneVoIPApp_CBackEnd_CProxyStruct;\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\ntypedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_CConfig __x_ABI_CPhoneVoIPApp_CBackEnd_CConfig;\r\n\r\n#endif\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\nnamespace PhoneVoIPApp {\r\nnamespace BackEnd {\r\nclass BackEndTransport;\r\n} /*BackEnd*/\r\n} /*PhoneVoIPApp*/\r\n}\r\n#endif\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\nnamespace PhoneVoIPApp {\r\nnamespace BackEnd {\r\nclass Endpoint;\r\n} /*BackEnd*/\r\n} /*PhoneVoIPApp*/\r\n}\r\n#endif\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\nnamespace PhoneVoIPApp {\r\nnamespace BackEnd {\r\nclass BackEndCapture;\r\n} /*BackEnd*/\r\n} /*PhoneVoIPApp*/\r\n}\r\n#endif\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\nnamespace PhoneVoIPApp {\r\nnamespace BackEnd {\r\nclass CallController;\r\n} /*BackEnd*/\r\n} /*PhoneVoIPApp*/\r\n}\r\n#endif\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\nnamespace PhoneVoIPApp {\r\nnamespace BackEnd {\r\nclass Globals;\r\n} /*BackEnd*/\r\n} /*PhoneVoIPApp*/\r\n}\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_CPhoneVoIPApp_CBackEnd_CProxyProtocol\r\n    {\r\n        ProxyProtocol_None\t= 0,\r\n        ProxyProtocol_SOCKS5\t= 1\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_CPhoneVoIPApp_CBackEnd_CCallState\r\n    {\r\n        CallState_WaitInit\t= 1,\r\n        CallState_WaitInitAck\t= 2,\r\n        CallState_Established\t= 3,\r\n        CallState_Failed\t= 4\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_CPhoneVoIPApp_CBackEnd_CError\r\n    {\r\n        Error_Unknown\t= 0,\r\n        Error_Incompatible\t= 1,\r\n        Error_Timeout\t= 2,\r\n        Error_AudioIO\t= 3\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_CPhoneVoIPApp_CBackEnd_CNetworkType\r\n    {\r\n        NetworkType_Unknown\t= 0,\r\n        NetworkType_GPRS\t= 1,\r\n        NetworkType_EDGE\t= 2,\r\n        NetworkType_UMTS\t= 3,\r\n        NetworkType_HSPA\t= 4,\r\n        NetworkType_LTE\t= 5,\r\n        NetworkType_WiFi\t= 6,\r\n        NetworkType_Ethernet\t= 7,\r\n        NetworkType_OtherHighSpeed\t= 8,\r\n        NetworkType_OtherLowSpeed\t= 9,\r\n        NetworkType_Dialup\t= 10,\r\n        NetworkType_OtherMobile\t= 11\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_CPhoneVoIPApp_CBackEnd_CDataSavingMode\r\n    {\r\n        DataSavingMode_Never\t= 0,\r\n        DataSavingMode_MobileOnly\t= 1,\r\n        DataSavingMode_Always\t= 2\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_CPhoneVoIPApp_CBackEnd_CCallStatus\r\n    {\r\n        CallStatus_None\t= 0,\r\n        CallStatus_InProgress\t= 1,\r\n        CallStatus_Held\t= 2\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_CPhoneVoIPApp_CBackEnd_CCallAudioRoute\r\n    {\r\n        CallAudioRoute_None\t= 0,\r\n        CallAudioRoute_Earpiece\t= 1,\r\n        CallAudioRoute_Speakerphone\t= 2,\r\n        CallAudioRoute_Bluetooth\t= 4\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_CPhoneVoIPApp_CBackEnd_CCameraLocation\r\n    {\r\n        CameraLocation_Front\t= 1,\r\n        CameraLocation_Back\t= 0\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_CPhoneVoIPApp_CBackEnd_CMediaOperations\r\n    {\r\n        MediaOperations_None\t= 0,\r\n        MediaOperations_VideoCapture\t= 1,\r\n        MediaOperations_VideoRender\t= 2,\r\n        MediaOperations_AudioCapture\t= 4,\r\n        MediaOperations_AudioRender\t= 8\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\nstruct __x_ABI_CPhoneVoIPApp_CBackEnd_CEndpointStruct\r\n    {\r\n    INT64 id;\r\n    UINT16 port;\r\n    HSTRING ipv4;\r\n    HSTRING ipv6;\r\n    HSTRING peerTag;\r\n    } ;\r\n#endif\r\n#if !defined(__cplusplus)\r\nstruct __x_ABI_CPhoneVoIPApp_CBackEnd_CProxyStruct\r\n    {\r\n    __x_ABI_CPhoneVoIPApp_CBackEnd_CProxyProtocol protocol;\r\n    HSTRING address;\r\n    UINT16 port;\r\n    HSTRING username;\r\n    HSTRING password;\r\n    } ;\r\n#endif\r\n#if !defined(__cplusplus)\r\nstruct __x_ABI_CPhoneVoIPApp_CBackEnd_CConfig\r\n    {\r\n    DOUBLE InitTimeout;\r\n    DOUBLE RecvTimeout;\r\n    __x_ABI_CPhoneVoIPApp_CBackEnd_CDataSavingMode DataSavingMode;\r\n    boolean EnableAEC;\r\n    boolean EnableNS;\r\n    boolean EnableAGC;\r\n    HSTRING LogFilePath;\r\n    HSTRING StatsDumpFilePath;\r\n    } ;\r\n#endif\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0000 */\r\n/* [local] */ \r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef enum ProxyProtocol ProxyProtocol;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef enum CallState CallState;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef enum Error Error;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef enum NetworkType NetworkType;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef enum DataSavingMode DataSavingMode;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef enum CallStatus CallStatus;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef enum CallAudioRoute CallAudioRoute;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef enum CameraLocation CameraLocation;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef enum MediaOperations MediaOperations;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef struct EndpointStruct EndpointStruct;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef struct ProxyStruct ProxyStruct;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            typedef struct Config Config;\r\n            \r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            /* [v1_enum] */ \r\n            enum ProxyProtocol\r\n                {\r\n                    ProxyProtocol_None\t= 0,\r\n                    ProxyProtocol_SOCKS5\t= 1\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            /* [v1_enum] */ \r\n            enum CallState\r\n                {\r\n                    CallState_WaitInit\t= 1,\r\n                    CallState_WaitInitAck\t= 2,\r\n                    CallState_Established\t= 3,\r\n                    CallState_Failed\t= 4\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            /* [v1_enum] */ \r\n            enum Error\r\n                {\r\n                    Error_Unknown\t= 0,\r\n                    Error_Incompatible\t= 1,\r\n                    Error_Timeout\t= 2,\r\n                    Error_AudioIO\t= 3\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            /* [v1_enum] */ \r\n            enum NetworkType\r\n                {\r\n                    NetworkType_Unknown\t= 0,\r\n                    NetworkType_GPRS\t= 1,\r\n                    NetworkType_EDGE\t= 2,\r\n                    NetworkType_UMTS\t= 3,\r\n                    NetworkType_HSPA\t= 4,\r\n                    NetworkType_LTE\t= 5,\r\n                    NetworkType_WiFi\t= 6,\r\n                    NetworkType_Ethernet\t= 7,\r\n                    NetworkType_OtherHighSpeed\t= 8,\r\n                    NetworkType_OtherLowSpeed\t= 9,\r\n                    NetworkType_Dialup\t= 10,\r\n                    NetworkType_OtherMobile\t= 11\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            /* [v1_enum] */ \r\n            enum DataSavingMode\r\n                {\r\n                    DataSavingMode_Never\t= 0,\r\n                    DataSavingMode_MobileOnly\t= 1,\r\n                    DataSavingMode_Always\t= 2\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            /* [v1_enum] */ \r\n            enum CallStatus\r\n                {\r\n                    CallStatus_None\t= 0,\r\n                    CallStatus_InProgress\t= 1,\r\n                    CallStatus_Held\t= 2\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            /* [v1_enum] */ \r\n            enum CallAudioRoute\r\n                {\r\n                    CallAudioRoute_None\t= 0,\r\n                    CallAudioRoute_Earpiece\t= 1,\r\n                    CallAudioRoute_Speakerphone\t= 2,\r\n                    CallAudioRoute_Bluetooth\t= 4\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            /* [v1_enum] */ \r\n            enum CameraLocation\r\n                {\r\n                    CameraLocation_Front\t= 1,\r\n                    CameraLocation_Back\t= 0\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            /* [v1_enum] */ \r\n            enum MediaOperations\r\n                {\r\n                    MediaOperations_None\t= 0,\r\n                    MediaOperations_VideoCapture\t= 1,\r\n                    MediaOperations_VideoRender\t= 2,\r\n                    MediaOperations_AudioCapture\t= 4,\r\n                    MediaOperations_AudioRender\t= 8\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            struct EndpointStruct\r\n                {\r\n                INT64 id;\r\n                UINT16 port;\r\n                HSTRING ipv4;\r\n                HSTRING ipv6;\r\n                HSTRING peerTag;\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            struct ProxyStruct\r\n                {\r\n                ProxyProtocol protocol;\r\n                HSTRING address;\r\n                UINT16 port;\r\n                HSTRING username;\r\n                HSTRING password;\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace PhoneVoIPApp {\r\n        namespace BackEnd {\r\n            \r\n            struct Config\r\n                {\r\n                DOUBLE InitTimeout;\r\n                DOUBLE RecvTimeout;\r\n                DataSavingMode DataSavingMode;\r\n                boolean EnableAEC;\r\n                boolean EnableNS;\r\n                boolean EnableAGC;\r\n                HSTRING LogFilePath;\r\n                HSTRING StatsDumpFilePath;\r\n                } ;\r\n        } /* end namespace */\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0000_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0000_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::IMessageReceivedEventHandler */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"F2035E6A-8067-3ABB-A795-7B334C67A2ED\")\r\n                IMessageReceivedEventHandler : public IUnknown\r\n                {\r\n                public:\r\n                    virtual HRESULT STDMETHODCALLTYPE Invoke( \r\n                        /* [in] */ ABI::Windows::Storage::Streams::IBuffer *pBuffer,\r\n                        /* [in] */ UINT64 hnsPresentationTime,\r\n                        /* [in] */ UINT64 hnsSampleDuration) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID_IMessageReceivedEventHandler = __uuidof(IMessageReceivedEventHandler);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandlerVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Invoke )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler * This,\r\n            /* [in] */ __x_ABI_CWindows_CStorage_CStreams_CIBuffer *pBuffer,\r\n            /* [in] */ UINT64 hnsPresentationTime,\r\n            /* [in] */ UINT64 hnsSampleDuration);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandlerVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandlerVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_Invoke(This,pBuffer,hnsPresentationTime,hnsSampleDuration)\t\\\r\n    ( (This)->lpVtbl -> Invoke(This,pBuffer,hnsPresentationTime,hnsSampleDuration) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_INTERFACE_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::ICameraLocationChangedEventHandler */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"1698B961-F90E-30D0-80FF-22E94CF66D7B\")\r\n                ICameraLocationChangedEventHandler : public IUnknown\r\n                {\r\n                public:\r\n                    virtual HRESULT STDMETHODCALLTYPE Invoke( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::CameraLocation __param0) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID_ICameraLocationChangedEventHandler = __uuidof(ICameraLocationChangedEventHandler);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandlerVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Invoke )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CCameraLocation __param0);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandlerVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandlerVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_Invoke(This,__param0)\t\\\r\n    ( (This)->lpVtbl -> Invoke(This,__param0) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_INTERFACE_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::IIncomingCallDialogDismissedCallback */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"91DDEE70-AA90-38E7-B4E5-F7959569CB5C\")\r\n                IIncomingCallDialogDismissedCallback : public IUnknown\r\n                {\r\n                public:\r\n                    virtual HRESULT STDMETHODCALLTYPE Invoke( \r\n                        /* [in] */ INT64 callId,\r\n                        /* [in] */ INT64 callAccessHash,\r\n                        /* [in] */ boolean rejected) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID_IIncomingCallDialogDismissedCallback = __uuidof(IIncomingCallDialogDismissedCallback);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallbackVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Invoke )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback * This,\r\n            /* [in] */ INT64 callId,\r\n            /* [in] */ INT64 callAccessHash,\r\n            /* [in] */ boolean rejected);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallbackVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallbackVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_Invoke(This,callId,callAccessHash,rejected)\t\\\r\n    ( (This)->lpVtbl -> Invoke(This,callId,callAccessHash,rejected) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0003 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd___IBackEndTransportPublicNonVirtuals[] = L\"PhoneVoIPApp.BackEnd.__IBackEndTransportPublicNonVirtuals\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0003 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0003_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0003_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::__IBackEndTransportPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"F5A3C2AE-EF7B-3DE2-8B0E-8E8B3CD20D9D\")\r\n                __IBackEndTransportPublicNonVirtuals : public IInspectable\r\n                {\r\n                public:\r\n                    virtual HRESULT STDMETHODCALLTYPE WriteAudio( \r\n                        /* [out] */ BYTE *bytes,\r\n                        /* [in] */ INT32 byteCount) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE WriteVideo( \r\n                        /* [out] */ BYTE *bytes,\r\n                        /* [in] */ INT32 byteCount,\r\n                        /* [in] */ UINT64 hnsPresentationTime,\r\n                        /* [in] */ UINT64 hnsSampleDuration) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE add_AudioMessageReceived( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::IMessageReceivedEventHandler *__param0,\r\n                        /* [out][retval] */ EventRegistrationToken *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE remove_AudioMessageReceived( \r\n                        /* [in] */ EventRegistrationToken __param0) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE add_VideoMessageReceived( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::IMessageReceivedEventHandler *__param0,\r\n                        /* [out][retval] */ EventRegistrationToken *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE remove_VideoMessageReceived( \r\n                        /* [in] */ EventRegistrationToken __param0) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID___IBackEndTransportPublicNonVirtuals = __uuidof(__IBackEndTransportPublicNonVirtuals);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtualsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *WriteAudio )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This,\r\n            /* [out] */ BYTE *bytes,\r\n            /* [in] */ INT32 byteCount);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *WriteVideo )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This,\r\n            /* [out] */ BYTE *bytes,\r\n            /* [in] */ INT32 byteCount,\r\n            /* [in] */ UINT64 hnsPresentationTime,\r\n            /* [in] */ UINT64 hnsSampleDuration);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *add_AudioMessageReceived )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler *__param0,\r\n            /* [out][retval] */ EventRegistrationToken *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *remove_AudioMessageReceived )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This,\r\n            /* [in] */ EventRegistrationToken __param0);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *add_VideoMessageReceived )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler *__param0,\r\n            /* [out][retval] */ EventRegistrationToken *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *remove_VideoMessageReceived )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals * This,\r\n            /* [in] */ EventRegistrationToken __param0);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtualsVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtualsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_WriteAudio(This,bytes,byteCount)\t\\\r\n    ( (This)->lpVtbl -> WriteAudio(This,bytes,byteCount) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_WriteVideo(This,bytes,byteCount,hnsPresentationTime,hnsSampleDuration)\t\\\r\n    ( (This)->lpVtbl -> WriteVideo(This,bytes,byteCount,hnsPresentationTime,hnsSampleDuration) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_add_AudioMessageReceived(This,__param0,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> add_AudioMessageReceived(This,__param0,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_remove_AudioMessageReceived(This,__param0)\t\\\r\n    ( (This)->lpVtbl -> remove_AudioMessageReceived(This,__param0) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_add_VideoMessageReceived(This,__param0,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> add_VideoMessageReceived(This,__param0,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_remove_VideoMessageReceived(This,__param0)\t\\\r\n    ( (This)->lpVtbl -> remove_VideoMessageReceived(This,__param0) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0004 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd___IBackEndTransportProtectedNonVirtuals[] = L\"PhoneVoIPApp.BackEnd.__IBackEndTransportProtectedNonVirtuals\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0004 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0004_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0004_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::__IBackEndTransportProtectedNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"044DEA28-0E8D-3A16-A2C1-BE95C0BED5E5\")\r\n                __IBackEndTransportProtectedNonVirtuals : public IInspectable\r\n                {\r\n                public:\r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID___IBackEndTransportProtectedNonVirtuals = __uuidof(__IBackEndTransportProtectedNonVirtuals);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtualsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtualsVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtualsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0005 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd___IEndpointPublicNonVirtuals[] = L\"PhoneVoIPApp.BackEnd.__IEndpointPublicNonVirtuals\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0005 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0005_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0005_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::__IEndpointPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"0CC88A54-89AF-3CC6-9B95-F8F22428ABED\")\r\n                __IEndpointPublicNonVirtuals : public IInspectable\r\n                {\r\n                public:\r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_id( \r\n                        /* [out][retval] */ INT64 *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_id( \r\n                        /* [in] */ INT64 __set_formal) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_port( \r\n                        /* [out][retval] */ UINT16 *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_port( \r\n                        /* [in] */ UINT16 __set_formal) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ipv4( \r\n                        /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ipv4( \r\n                        /* [in] */ HSTRING __set_formal) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ipv6( \r\n                        /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ipv6( \r\n                        /* [in] */ HSTRING __set_formal) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_peerTag( \r\n                        /* [out] */ UINT32 *____returnValueSize,\r\n                        /* [out][retval][size_is][size_is] */ BYTE **__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_peerTag( \r\n                        /* [in] */ UINT32 ____set_formalSize,\r\n                        /* [in][size_is] */ BYTE *__set_formal) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID___IEndpointPublicNonVirtuals = __uuidof(__IEndpointPublicNonVirtuals);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtualsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_id )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out][retval] */ INT64 *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_id )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ INT64 __set_formal);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_port )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out][retval] */ UINT16 *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_port )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ UINT16 __set_formal);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ipv4 )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ipv4 )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ HSTRING __set_formal);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ipv6 )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ipv6 )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ HSTRING __set_formal);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_peerTag )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out] */ UINT32 *____returnValueSize,\r\n            /* [out][retval][size_is][size_is] */ BYTE **__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_peerTag )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ UINT32 ____set_formalSize,\r\n            /* [in][size_is] */ BYTE *__set_formal);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtualsVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtualsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_get_id(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_id(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_put_id(This,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_id(This,__set_formal) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_get_port(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_port(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_put_port(This,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_port(This,__set_formal) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_get_ipv4(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_ipv4(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_put_ipv4(This,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_ipv4(This,__set_formal) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_get_ipv6(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_ipv6(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_put_ipv6(This,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_ipv6(This,__set_formal) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_get_peerTag(This,____returnValueSize,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_peerTag(This,____returnValueSize,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_put_peerTag(This,____set_formalSize,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_peerTag(This,____set_formalSize,__set_formal) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0006 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd_ICallControllerStatusListener[] = L\"PhoneVoIPApp.BackEnd.ICallControllerStatusListener\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0006 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0006_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0006_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::ICallControllerStatusListener */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"39126060-0292-36D6-B3F8-9AC4156C651D\")\r\n                ICallControllerStatusListener : public IInspectable\r\n                {\r\n                public:\r\n                    virtual HRESULT STDMETHODCALLTYPE OnSignalBarsChanged( \r\n                        /* [in] */ INT32 newSignal) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE OnCallStateChanged( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::CallState newState) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE OnCallStatusChanged( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::CallStatus newStatus) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE OnCallAudioRouteChanged( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::CallAudioRoute newRoute) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE OnMediaOperationsChanged( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::MediaOperations newOperations) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE OnCameraLocationChanged( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::CameraLocation newCameraLocation) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID_ICallControllerStatusListener = __uuidof(ICallControllerStatusListener);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListenerVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *OnSignalBarsChanged )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This,\r\n            /* [in] */ INT32 newSignal);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *OnCallStateChanged )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CCallState newState);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *OnCallStatusChanged )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CCallStatus newStatus);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *OnCallAudioRouteChanged )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CCallAudioRoute newRoute);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *OnMediaOperationsChanged )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CMediaOperations newOperations);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *OnCameraLocationChanged )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CCameraLocation newCameraLocation);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListenerVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListenerVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_OnSignalBarsChanged(This,newSignal)\t\\\r\n    ( (This)->lpVtbl -> OnSignalBarsChanged(This,newSignal) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_OnCallStateChanged(This,newState)\t\\\r\n    ( (This)->lpVtbl -> OnCallStateChanged(This,newState) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_OnCallStatusChanged(This,newStatus)\t\\\r\n    ( (This)->lpVtbl -> OnCallStatusChanged(This,newStatus) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_OnCallAudioRouteChanged(This,newRoute)\t\\\r\n    ( (This)->lpVtbl -> OnCallAudioRouteChanged(This,newRoute) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_OnMediaOperationsChanged(This,newOperations)\t\\\r\n    ( (This)->lpVtbl -> OnMediaOperationsChanged(This,newOperations) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_OnCameraLocationChanged(This,newCameraLocation)\t\\\r\n    ( (This)->lpVtbl -> OnCameraLocationChanged(This,newCameraLocation) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0007 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd___IBackEndCapturePublicNonVirtuals[] = L\"PhoneVoIPApp.BackEnd.__IBackEndCapturePublicNonVirtuals\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0007 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0007_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0007_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::__IBackEndCapturePublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"8313DBEA-FD3B-3071-8035-7B611658DAD8\")\r\n                __IBackEndCapturePublicNonVirtuals : public IInspectable\r\n                {\r\n                public:\r\n                    virtual HRESULT STDMETHODCALLTYPE SetTransport( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::__IBackEndTransportPublicNonVirtuals *transport) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE Start( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::CameraLocation cameraLocation) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE ToggleCamera( void) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE add_CameraLocationChanged( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::ICameraLocationChangedEventHandler *__param0,\r\n                        /* [out][retval] */ EventRegistrationToken *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE remove_CameraLocationChanged( \r\n                        /* [in] */ EventRegistrationToken __param0) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID___IBackEndCapturePublicNonVirtuals = __uuidof(__IBackEndCapturePublicNonVirtuals);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtualsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetTransport )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals *transport);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Start )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CCameraLocation cameraLocation);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Stop )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *ToggleCamera )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *add_CameraLocationChanged )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler *__param0,\r\n            /* [out][retval] */ EventRegistrationToken *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *remove_CameraLocationChanged )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals * This,\r\n            /* [in] */ EventRegistrationToken __param0);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtualsVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtualsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_SetTransport(This,transport)\t\\\r\n    ( (This)->lpVtbl -> SetTransport(This,transport) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_Start(This,cameraLocation)\t\\\r\n    ( (This)->lpVtbl -> Start(This,cameraLocation) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_Stop(This)\t\\\r\n    ( (This)->lpVtbl -> Stop(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_ToggleCamera(This)\t\\\r\n    ( (This)->lpVtbl -> ToggleCamera(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_add_CameraLocationChanged(This,__param0,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> add_CameraLocationChanged(This,__param0,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_remove_CameraLocationChanged(This,__param0)\t\\\r\n    ( (This)->lpVtbl -> remove_CameraLocationChanged(This,__param0) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0008 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd___IBackEndCaptureProtectedNonVirtuals[] = L\"PhoneVoIPApp.BackEnd.__IBackEndCaptureProtectedNonVirtuals\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0008 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0008_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0008_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::__IBackEndCaptureProtectedNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"64B31D5B-1A27-37A8-BCBC-C0BBD5314C79\")\r\n                __IBackEndCaptureProtectedNonVirtuals : public IInspectable\r\n                {\r\n                public:\r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID___IBackEndCaptureProtectedNonVirtuals = __uuidof(__IBackEndCaptureProtectedNonVirtuals);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtualsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtualsVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtualsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0009 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd_IConfig[] = L\"PhoneVoIPApp.BackEnd.IConfig\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0009 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0009_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0009_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::IConfig */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"A9F22E31-D4E1-3940-BA20-DCB20973B09F\")\r\n                IConfig : public IInspectable\r\n                {\r\n                public:\r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_InitTimeout( \r\n                        /* [out][retval] */ DOUBLE *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_InitTimeout( \r\n                        /* [in] */ DOUBLE __set_formal) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_RecvTimeout( \r\n                        /* [out][retval] */ DOUBLE *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_RecvTimeout( \r\n                        /* [in] */ DOUBLE __set_formal) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID_IConfig = __uuidof(IConfig);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfigVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_InitTimeout )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig * This,\r\n            /* [out][retval] */ DOUBLE *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_InitTimeout )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig * This,\r\n            /* [in] */ DOUBLE __set_formal);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_RecvTimeout )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig * This,\r\n            /* [out][retval] */ DOUBLE *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_RecvTimeout )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig * This,\r\n            /* [in] */ DOUBLE __set_formal);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfigVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfigVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_get_InitTimeout(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_InitTimeout(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_put_InitTimeout(This,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_InitTimeout(This,__set_formal) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_get_RecvTimeout(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_RecvTimeout(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_put_RecvTimeout(This,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_RecvTimeout(This,__set_formal) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0010 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd___ICallControllerPublicNonVirtuals[] = L\"PhoneVoIPApp.BackEnd.__ICallControllerPublicNonVirtuals\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0010 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0010_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0010_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::__ICallControllerPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"06B50718-3528-3B66-BE76-E183AA80D4A5\")\r\n                __ICallControllerPublicNonVirtuals : public IInspectable\r\n                {\r\n                public:\r\n                    virtual HRESULT STDMETHODCALLTYPE HandleUpdatePhoneCall( void) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE StartMTProtoUpdater( void) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE StopMTProtoUpdater( void) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE CreateVoIPControllerWrapper( void) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE DeleteVoIPControllerWrapper( void) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE SetConfig( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::Config config) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE SetEncryptionKey( \r\n                        /* [in] */ UINT32 __keySize,\r\n                        /* [in][size_is] */ BYTE *key,\r\n                        /* [in] */ boolean isOutgoing) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE SetPublicEndpoints( \r\n                        /* [in] */ UINT32 __endpointsSize,\r\n                        /* [in][size_is] */ ABI::PhoneVoIPApp::BackEnd::EndpointStruct *endpoints,\r\n                        /* [in] */ boolean allowP2P,\r\n                        /* [in] */ INT32 connectionMaxLayer) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE SetProxy( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::ProxyStruct proxy) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE Start( void) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE Connect( void) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE SetMicMute( \r\n                        /* [in] */ boolean mute) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE SwitchSpeaker( \r\n                        /* [in] */ boolean external) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE UpdateServerConfig( \r\n                        /* [in] */ HSTRING json) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE GetPreferredRelayID( \r\n                        /* [out][retval] */ INT64 *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE GetLastError( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::Error *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE GetDebugLog( \r\n                        /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE GetDebugString( \r\n                        /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE GetVersion( \r\n                        /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE GetSignalBarsCount( \r\n                        /* [out][retval] */ INT32 *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE SetStatusCallback( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::ICallControllerStatusListener *statusListener) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE InitiateOutgoingCall2( \r\n                        /* [in] */ HSTRING recepientName,\r\n                        /* [in] */ INT64 recepientId,\r\n                        /* [in] */ INT64 callId,\r\n                        /* [in] */ INT64 callAccessHash,\r\n                        /* [out][retval] */ boolean *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE InitiateOutgoingCall1( \r\n                        /* [in] */ HSTRING recepientName,\r\n                        /* [in] */ INT64 recepientId,\r\n                        /* [in] */ INT64 callId,\r\n                        /* [in] */ INT64 callAccessHash,\r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::Config config,\r\n                        /* [in] */ UINT32 __keySize,\r\n                        /* [in][size_is] */ BYTE *key,\r\n                        /* [in] */ boolean outgoing,\r\n                        /* [in] */ UINT32 __emojisSize,\r\n                        /* [in][size_is] */ HSTRING *emojis,\r\n                        /* [in] */ UINT32 __endpointsSize,\r\n                        /* [in][size_is] */ ABI::PhoneVoIPApp::BackEnd::EndpointStruct *endpoints,\r\n                        /* [in] */ boolean allowP2P,\r\n                        /* [in] */ INT32 connectionMaxLayer,\r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::ProxyStruct proxy,\r\n                        /* [out][retval] */ boolean *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE OnIncomingCallReceived( \r\n                        /* [in] */ HSTRING contactName,\r\n                        /* [in] */ INT64 contactId,\r\n                        /* [in] */ HSTRING contactImage,\r\n                        /* [in] */ INT64 callId,\r\n                        /* [in] */ INT64 callAccessHash,\r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::IIncomingCallDialogDismissedCallback *incomingCallDialogDismissedCallback,\r\n                        /* [out][retval] */ boolean *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE HoldCall( \r\n                        /* [out][retval] */ boolean *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE ResumeCall( \r\n                        /* [out][retval] */ boolean *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE EndCall( \r\n                        /* [out][retval] */ boolean *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE ToggleCamera( \r\n                        /* [out][retval] */ boolean *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CallStatus( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::CallStatus *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_MediaOperations( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::MediaOperations *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsShowingVideo( \r\n                        /* [out][retval] */ boolean *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_IsShowingVideo( \r\n                        /* [in] */ boolean value) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsRenderingVideo( \r\n                        /* [out][retval] */ boolean *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_IsRenderingVideo( \r\n                        /* [in] */ boolean value) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CameraLocation( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::CameraLocation *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AvailableAudioRoutes( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::CallAudioRoute *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AudioRoute( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::CallAudioRoute *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_AudioRoute( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::CallAudioRoute newRoute) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_OtherPartyName( \r\n                        /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_OtherPartyId( \r\n                        /* [out][retval] */ INT64 *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CallStartTime( \r\n                        /* [out][retval] */ ABI::Windows::Foundation::DateTime *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CallId( \r\n                        /* [out][retval] */ INT64 *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CallAccessHash( \r\n                        /* [out][retval] */ INT64 *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AcceptedCallId( \r\n                        /* [out][retval] */ INT64 *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_AcceptedCallId( \r\n                        /* [in] */ INT64 value) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Key( \r\n                        /* [out] */ UINT32 *____returnValueSize,\r\n                        /* [out][retval][size_is][size_is] */ BYTE **__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Outgoing( \r\n                        /* [out][retval] */ boolean *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Emojis( \r\n                        /* [out] */ UINT32 *____returnValueSize,\r\n                        /* [out][retval][size_is][size_is] */ HSTRING **__returnValue) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID___ICallControllerPublicNonVirtuals = __uuidof(__ICallControllerPublicNonVirtuals);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtualsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *HandleUpdatePhoneCall )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *StartMTProtoUpdater )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *StopMTProtoUpdater )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *CreateVoIPControllerWrapper )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *DeleteVoIPControllerWrapper )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetConfig )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CConfig config);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetEncryptionKey )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ UINT32 __keySize,\r\n            /* [in][size_is] */ BYTE *key,\r\n            /* [in] */ boolean isOutgoing);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetPublicEndpoints )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ UINT32 __endpointsSize,\r\n            /* [in][size_is] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CEndpointStruct *endpoints,\r\n            /* [in] */ boolean allowP2P,\r\n            /* [in] */ INT32 connectionMaxLayer);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetProxy )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CProxyStruct proxy);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Start )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Connect )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetMicMute )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ boolean mute);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SwitchSpeaker )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ boolean external);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *UpdateServerConfig )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ HSTRING json);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetPreferredRelayID )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ INT64 *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetLastError )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CError *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetDebugLog )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetDebugString )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetVersion )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetSignalBarsCount )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ INT32 *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetStatusCallback )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener *statusListener);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *InitiateOutgoingCall2 )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ HSTRING recepientName,\r\n            /* [in] */ INT64 recepientId,\r\n            /* [in] */ INT64 callId,\r\n            /* [in] */ INT64 callAccessHash,\r\n            /* [out][retval] */ boolean *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *InitiateOutgoingCall1 )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ HSTRING recepientName,\r\n            /* [in] */ INT64 recepientId,\r\n            /* [in] */ INT64 callId,\r\n            /* [in] */ INT64 callAccessHash,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CConfig config,\r\n            /* [in] */ UINT32 __keySize,\r\n            /* [in][size_is] */ BYTE *key,\r\n            /* [in] */ boolean outgoing,\r\n            /* [in] */ UINT32 __emojisSize,\r\n            /* [in][size_is] */ HSTRING *emojis,\r\n            /* [in] */ UINT32 __endpointsSize,\r\n            /* [in][size_is] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CEndpointStruct *endpoints,\r\n            /* [in] */ boolean allowP2P,\r\n            /* [in] */ INT32 connectionMaxLayer,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CProxyStruct proxy,\r\n            /* [out][retval] */ boolean *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *OnIncomingCallReceived )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ HSTRING contactName,\r\n            /* [in] */ INT64 contactId,\r\n            /* [in] */ HSTRING contactImage,\r\n            /* [in] */ INT64 callId,\r\n            /* [in] */ INT64 callAccessHash,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback *incomingCallDialogDismissedCallback,\r\n            /* [out][retval] */ boolean *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *HoldCall )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ boolean *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *ResumeCall )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ boolean *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *EndCall )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ boolean *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *ToggleCamera )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ boolean *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CallStatus )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CCallStatus *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaOperations )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CMediaOperations *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsShowingVideo )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ boolean *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsShowingVideo )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ boolean value);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsRenderingVideo )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ boolean *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsRenderingVideo )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ boolean value);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CameraLocation )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CCameraLocation *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AvailableAudioRoutes )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CCallAudioRoute *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioRoute )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CCallAudioRoute *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AudioRoute )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CCallAudioRoute newRoute);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_OtherPartyName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_OtherPartyId )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ INT64 *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CallStartTime )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CWindows_CFoundation_CDateTime *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CallId )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ INT64 *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CallAccessHash )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ INT64 *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AcceptedCallId )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ INT64 *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AcceptedCallId )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [in] */ INT64 value);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Key )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out] */ UINT32 *____returnValueSize,\r\n            /* [out][retval][size_is][size_is] */ BYTE **__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Outgoing )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out][retval] */ boolean *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Emojis )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals * This,\r\n            /* [out] */ UINT32 *____returnValueSize,\r\n            /* [out][retval][size_is][size_is] */ HSTRING **__returnValue);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtualsVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtualsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_HandleUpdatePhoneCall(This)\t\\\r\n    ( (This)->lpVtbl -> HandleUpdatePhoneCall(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_StartMTProtoUpdater(This)\t\\\r\n    ( (This)->lpVtbl -> StartMTProtoUpdater(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_StopMTProtoUpdater(This)\t\\\r\n    ( (This)->lpVtbl -> StopMTProtoUpdater(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_CreateVoIPControllerWrapper(This)\t\\\r\n    ( (This)->lpVtbl -> CreateVoIPControllerWrapper(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_DeleteVoIPControllerWrapper(This)\t\\\r\n    ( (This)->lpVtbl -> DeleteVoIPControllerWrapper(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_SetConfig(This,config)\t\\\r\n    ( (This)->lpVtbl -> SetConfig(This,config) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_SetEncryptionKey(This,__keySize,key,isOutgoing)\t\\\r\n    ( (This)->lpVtbl -> SetEncryptionKey(This,__keySize,key,isOutgoing) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_SetPublicEndpoints(This,__endpointsSize,endpoints,allowP2P,connectionMaxLayer)\t\\\r\n    ( (This)->lpVtbl -> SetPublicEndpoints(This,__endpointsSize,endpoints,allowP2P,connectionMaxLayer) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_SetProxy(This,proxy)\t\\\r\n    ( (This)->lpVtbl -> SetProxy(This,proxy) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_Start(This)\t\\\r\n    ( (This)->lpVtbl -> Start(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_Connect(This)\t\\\r\n    ( (This)->lpVtbl -> Connect(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_SetMicMute(This,mute)\t\\\r\n    ( (This)->lpVtbl -> SetMicMute(This,mute) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_SwitchSpeaker(This,external)\t\\\r\n    ( (This)->lpVtbl -> SwitchSpeaker(This,external) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_UpdateServerConfig(This,json)\t\\\r\n    ( (This)->lpVtbl -> UpdateServerConfig(This,json) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_GetPreferredRelayID(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetPreferredRelayID(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_GetLastError(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetLastError(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_GetDebugLog(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetDebugLog(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_GetDebugString(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetDebugString(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_GetVersion(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetVersion(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_GetSignalBarsCount(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetSignalBarsCount(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_SetStatusCallback(This,statusListener)\t\\\r\n    ( (This)->lpVtbl -> SetStatusCallback(This,statusListener) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_InitiateOutgoingCall2(This,recepientName,recepientId,callId,callAccessHash,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> InitiateOutgoingCall2(This,recepientName,recepientId,callId,callAccessHash,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_InitiateOutgoingCall1(This,recepientName,recepientId,callId,callAccessHash,config,__keySize,key,outgoing,__emojisSize,emojis,__endpointsSize,endpoints,allowP2P,connectionMaxLayer,proxy,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> InitiateOutgoingCall1(This,recepientName,recepientId,callId,callAccessHash,config,__keySize,key,outgoing,__emojisSize,emojis,__endpointsSize,endpoints,allowP2P,connectionMaxLayer,proxy,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_OnIncomingCallReceived(This,contactName,contactId,contactImage,callId,callAccessHash,incomingCallDialogDismissedCallback,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> OnIncomingCallReceived(This,contactName,contactId,contactImage,callId,callAccessHash,incomingCallDialogDismissedCallback,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_HoldCall(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> HoldCall(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_ResumeCall(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> ResumeCall(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_EndCall(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> EndCall(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_ToggleCamera(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> ToggleCamera(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_CallStatus(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_CallStatus(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_MediaOperations(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_MediaOperations(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_IsShowingVideo(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_IsShowingVideo(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_put_IsShowingVideo(This,value)\t\\\r\n    ( (This)->lpVtbl -> put_IsShowingVideo(This,value) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_IsRenderingVideo(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_IsRenderingVideo(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_put_IsRenderingVideo(This,value)\t\\\r\n    ( (This)->lpVtbl -> put_IsRenderingVideo(This,value) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_CameraLocation(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_CameraLocation(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_AvailableAudioRoutes(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_AvailableAudioRoutes(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_AudioRoute(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_AudioRoute(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_put_AudioRoute(This,newRoute)\t\\\r\n    ( (This)->lpVtbl -> put_AudioRoute(This,newRoute) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_OtherPartyName(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_OtherPartyName(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_OtherPartyId(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_OtherPartyId(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_CallStartTime(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_CallStartTime(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_CallId(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_CallId(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_CallAccessHash(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_CallAccessHash(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_AcceptedCallId(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_AcceptedCallId(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_put_AcceptedCallId(This,value)\t\\\r\n    ( (This)->lpVtbl -> put_AcceptedCallId(This,value) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_Key(This,____returnValueSize,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_Key(This,____returnValueSize,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_Outgoing(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_Outgoing(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_get_Emojis(This,____returnValueSize,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_Emojis(This,____returnValueSize,__returnValue) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0011 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd_IVideoRenderer[] = L\"PhoneVoIPApp.BackEnd.IVideoRenderer\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0011 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0011_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0011_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::IVideoRenderer */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"6928CA7B-166D-3B37-9010-FBAB2C7E92B0\")\r\n                IVideoRenderer : public IInspectable\r\n                {\r\n                public:\r\n                    virtual HRESULT STDMETHODCALLTYPE Start( void) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID_IVideoRenderer = __uuidof(IVideoRenderer);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRendererVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Start )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Stop )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer * This);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRendererVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRendererVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_Start(This)\t\\\r\n    ( (This)->lpVtbl -> Start(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_Stop(This)\t\\\r\n    ( (This)->lpVtbl -> Stop(This) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0012 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd_IMTProtoUpdater[] = L\"PhoneVoIPApp.BackEnd.IMTProtoUpdater\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0012 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0012_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0012_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::IMTProtoUpdater */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"4FA5F2C4-8612-35C9-BFAA-967C2C819FA7\")\r\n                IMTProtoUpdater : public IInspectable\r\n                {\r\n                public:\r\n                    virtual HRESULT STDMETHODCALLTYPE Start( \r\n                        /* [in] */ INT32 pts,\r\n                        /* [in] */ INT32 date,\r\n                        /* [in] */ INT32 qts) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE DiscardCall( \r\n                        /* [in] */ INT64 id,\r\n                        /* [in] */ INT64 accessHash) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE ReceivedCall( \r\n                        /* [in] */ INT64 id,\r\n                        /* [in] */ INT64 accessHash) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID_IMTProtoUpdater = __uuidof(IMTProtoUpdater);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdaterVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Start )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater * This,\r\n            /* [in] */ INT32 pts,\r\n            /* [in] */ INT32 date,\r\n            /* [in] */ INT32 qts);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Stop )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *DiscardCall )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater * This,\r\n            /* [in] */ INT64 id,\r\n            /* [in] */ INT64 accessHash);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *ReceivedCall )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater * This,\r\n            /* [in] */ INT64 id,\r\n            /* [in] */ INT64 accessHash);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdaterVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdaterVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_Start(This,pts,date,qts)\t\\\r\n    ( (This)->lpVtbl -> Start(This,pts,date,qts) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_Stop(This)\t\\\r\n    ( (This)->lpVtbl -> Stop(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_DiscardCall(This,id,accessHash)\t\\\r\n    ( (This)->lpVtbl -> DiscardCall(This,id,accessHash) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_ReceivedCall(This,id,accessHash)\t\\\r\n    ( (This)->lpVtbl -> ReceivedCall(This,id,accessHash) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0013 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd___IGlobalsPublicNonVirtuals[] = L\"PhoneVoIPApp.BackEnd.__IGlobalsPublicNonVirtuals\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0013 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0013_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0013_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::__IGlobalsPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"C8AFE1A8-92FC-3783-9520-D6BBC507B24A\")\r\n                __IGlobalsPublicNonVirtuals : public IInspectable\r\n                {\r\n                public:\r\n                    virtual HRESULT STDMETHODCALLTYPE StartServer( \r\n                        /* [in] */ UINT32 __outOfProcServerClassNamesSize,\r\n                        /* [in][size_is] */ HSTRING *outOfProcServerClassNames) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE DoPeriodicKeepAlive( void) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CallController( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::__ICallControllerPublicNonVirtuals **__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_VideoRenderer( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::IVideoRenderer **__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_VideoRenderer( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::IVideoRenderer *value) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_MTProtoUpdater( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::IMTProtoUpdater **__returnValue) = 0;\r\n                    \r\n                    virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_MTProtoUpdater( \r\n                        /* [in] */ ABI::PhoneVoIPApp::BackEnd::IMTProtoUpdater *value) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CaptureController( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::__IBackEndCapturePublicNonVirtuals **__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_TransportController( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::__IBackEndTransportPublicNonVirtuals **__returnValue) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID___IGlobalsPublicNonVirtuals = __uuidof(__IGlobalsPublicNonVirtuals);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtualsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *StartServer )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [in] */ UINT32 __outOfProcServerClassNamesSize,\r\n            /* [in][size_is] */ HSTRING *outOfProcServerClassNames);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *DoPeriodicKeepAlive )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CallController )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals **__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_VideoRenderer )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer **__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_VideoRenderer )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer *value);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_MTProtoUpdater )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater **__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_MTProtoUpdater )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater *value);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CaptureController )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals **__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_TransportController )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals **__returnValue);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtualsVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtualsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_StartServer(This,__outOfProcServerClassNamesSize,outOfProcServerClassNames)\t\\\r\n    ( (This)->lpVtbl -> StartServer(This,__outOfProcServerClassNamesSize,outOfProcServerClassNames) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_DoPeriodicKeepAlive(This)\t\\\r\n    ( (This)->lpVtbl -> DoPeriodicKeepAlive(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_get_CallController(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_CallController(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_get_VideoRenderer(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_VideoRenderer(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_put_VideoRenderer(This,value)\t\\\r\n    ( (This)->lpVtbl -> put_VideoRenderer(This,value) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_get_MTProtoUpdater(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_MTProtoUpdater(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_put_MTProtoUpdater(This,value)\t\\\r\n    ( (This)->lpVtbl -> put_MTProtoUpdater(This,value) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_get_CaptureController(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_CaptureController(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_get_TransportController(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_TransportController(This,__returnValue) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0014 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_PhoneVoIPApp_BackEnd___IGlobalsStatics[] = L\"PhoneVoIPApp.BackEnd.__IGlobalsStatics\";\r\n#endif /* !defined(____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0014 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0014_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0014_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_INTERFACE_DEFINED__\r\n#define ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::PhoneVoIPApp::BackEnd::__IGlobalsStatics */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace PhoneVoIPApp {\r\n            namespace BackEnd {\r\n                \r\n                MIDL_INTERFACE(\"2C1E9C37-6827-38F7-857C-021642CA428B\")\r\n                __IGlobalsStatics : public IInspectable\r\n                {\r\n                public:\r\n                    virtual HRESULT STDMETHODCALLTYPE GetCurrentProcessId( \r\n                        /* [out][retval] */ UINT32 *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE GetUiDisconnectedEventName( \r\n                        /* [in] */ UINT32 backgroundProcessId,\r\n                        /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                    \r\n                    virtual HRESULT STDMETHODCALLTYPE GetBackgroundProcessReadyEventName( \r\n                        /* [in] */ UINT32 backgroundProcessId,\r\n                        /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                    \r\n                    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Instance( \r\n                        /* [out][retval] */ ABI::PhoneVoIPApp::BackEnd::__IGlobalsPublicNonVirtuals **__returnValue) = 0;\r\n                    \r\n                };\r\n\r\n                extern const __declspec(selectany) IID & IID___IGlobalsStatics = __uuidof(__IGlobalsStatics);\r\n\r\n                \r\n            }  /* end namespace */\r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStaticsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetCurrentProcessId )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics * This,\r\n            /* [out][retval] */ UINT32 *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetUiDisconnectedEventName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics * This,\r\n            /* [in] */ UINT32 backgroundProcessId,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetBackgroundProcessReadyEventName )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics * This,\r\n            /* [in] */ UINT32 backgroundProcessId,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Instance )( \r\n            __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics * This,\r\n            /* [out][retval] */ __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals **__returnValue);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStaticsVtbl;\r\n\r\n    interface __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics\r\n    {\r\n        CONST_VTBL struct __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStaticsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_GetCurrentProcessId(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetCurrentProcessId(This,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_GetUiDisconnectedEventName(This,backgroundProcessId,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetUiDisconnectedEventName(This,backgroundProcessId,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_GetBackgroundProcessReadyEventName(This,backgroundProcessId,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetBackgroundProcessReadyEventName(This,backgroundProcessId,__returnValue) ) \r\n\r\n#define __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_get_Instance(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_Instance(This,__returnValue) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0015 */\r\n/* [local] */ \r\n\r\n#ifndef RUNTIMECLASS_PhoneVoIPApp_BackEnd_BackEndTransport_DEFINED\r\n#define RUNTIMECLASS_PhoneVoIPApp_BackEnd_BackEndTransport_DEFINED\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_PhoneVoIPApp_BackEnd_BackEndTransport[] = L\"PhoneVoIPApp.BackEnd.BackEndTransport\";\r\n#endif\r\n#ifndef RUNTIMECLASS_PhoneVoIPApp_BackEnd_Endpoint_DEFINED\r\n#define RUNTIMECLASS_PhoneVoIPApp_BackEnd_Endpoint_DEFINED\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_PhoneVoIPApp_BackEnd_Endpoint[] = L\"PhoneVoIPApp.BackEnd.Endpoint\";\r\n#endif\r\n#ifndef RUNTIMECLASS_PhoneVoIPApp_BackEnd_BackEndCapture_DEFINED\r\n#define RUNTIMECLASS_PhoneVoIPApp_BackEnd_BackEndCapture_DEFINED\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_PhoneVoIPApp_BackEnd_BackEndCapture[] = L\"PhoneVoIPApp.BackEnd.BackEndCapture\";\r\n#endif\r\n#ifndef RUNTIMECLASS_PhoneVoIPApp_BackEnd_CallController_DEFINED\r\n#define RUNTIMECLASS_PhoneVoIPApp_BackEnd_CallController_DEFINED\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_PhoneVoIPApp_BackEnd_CallController[] = L\"PhoneVoIPApp.BackEnd.CallController\";\r\n#endif\r\n#ifndef RUNTIMECLASS_PhoneVoIPApp_BackEnd_Globals_DEFINED\r\n#define RUNTIMECLASS_PhoneVoIPApp_BackEnd_Globals_DEFINED\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_PhoneVoIPApp_BackEnd_Globals[] = L\"PhoneVoIPApp.BackEnd.Globals\";\r\n#endif\r\n\r\n\r\n/* interface __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0015 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0015_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0015_v0_0_s_ifspec;\r\n\r\n/* Additional Prototypes for ALL interfaces */\r\n\r\nunsigned long             __RPC_USER  HSTRING_UserSize(     unsigned long *, unsigned long            , HSTRING * ); \r\nunsigned char * __RPC_USER  HSTRING_UserMarshal(  unsigned long *, unsigned char *, HSTRING * ); \r\nunsigned char * __RPC_USER  HSTRING_UserUnmarshal(unsigned long *, unsigned char *, HSTRING * ); \r\nvoid                      __RPC_USER  HSTRING_UserFree(     unsigned long *, HSTRING * ); \r\n\r\n/* end of Additional Prototypes */\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif\r\n\r\n\r\n"
  },
  {
    "path": "BackEndProxyStub/PhoneVoIPApp.BackEnd_i.c",
    "content": "\r\n\r\n/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */\r\n\r\n/* link this file in with the server and any clients */\r\n\r\n\r\n /* File created by MIDL compiler version 8.00.0603 */\r\n/* at Tue Jan 29 08:48:50 2019\r\n */\r\n/* Compiler settings for C:\\Users\\evgeny\\AppData\\Local\\Temp\\PhoneVoIPApp.BackEnd.idl-35395493:\r\n    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=ARM 8.00.0603 \r\n    protocol : dce , ms_ext, c_ext, robust\r\n    error checks: allocation ref bounds_check enum stub_data \r\n    VC __declspec() decoration level: \r\n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r\n         DECLSPEC_UUID(), MIDL_INTERFACE()\r\n*/\r\n/* @@MIDL_FILE_HEADING(  ) */\r\n\r\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\r\n\r\n\r\n#ifdef __cplusplus\r\nextern \"C\"{\r\n#endif \r\n\r\n\r\n#include <rpc.h>\r\n#include <rpcndr.h>\r\n\r\n#ifdef _MIDL_USE_GUIDDEF_\r\n\r\n#ifndef INITGUID\r\n#define INITGUID\r\n#include <guiddef.h>\r\n#undef INITGUID\r\n#else\r\n#include <guiddef.h>\r\n#endif\r\n\r\n#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\r\n        DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)\r\n\r\n#else // !_MIDL_USE_GUIDDEF_\r\n\r\n#ifndef __IID_DEFINED__\r\n#define __IID_DEFINED__\r\n\r\ntypedef struct _IID\r\n{\r\n    unsigned long x;\r\n    unsigned short s1;\r\n    unsigned short s2;\r\n    unsigned char  c[8];\r\n} IID;\r\n\r\n#endif // __IID_DEFINED__\r\n\r\n#ifndef CLSID_DEFINED\r\n#define CLSID_DEFINED\r\ntypedef IID CLSID;\r\n#endif // CLSID_DEFINED\r\n\r\n#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\r\n        const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\r\n\r\n#endif !_MIDL_USE_GUIDDEF_\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler,0xF2035E6A,0x8067,0x3ABB,0xA7,0x95,0x7B,0x33,0x4C,0x67,0xA2,0xED);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler,0x1698B961,0xF90E,0x30D0,0x80,0xFF,0x22,0xE9,0x4C,0xF6,0x6D,0x7B);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback,0x91DDEE70,0xAA90,0x38E7,0xB4,0xE5,0xF7,0x95,0x95,0x69,0xCB,0x5C);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals,0xF5A3C2AE,0xEF7B,0x3DE2,0x8B,0x0E,0x8E,0x8B,0x3C,0xD2,0x0D,0x9D);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals,0x044DEA28,0x0E8D,0x3A16,0xA2,0xC1,0xBE,0x95,0xC0,0xBE,0xD5,0xE5);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals,0x0CC88A54,0x89AF,0x3CC6,0x9B,0x95,0xF8,0xF2,0x24,0x28,0xAB,0xED);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener,0x39126060,0x0292,0x36D6,0xB3,0xF8,0x9A,0xC4,0x15,0x6C,0x65,0x1D);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals,0x8313DBEA,0xFD3B,0x3071,0x80,0x35,0x7B,0x61,0x16,0x58,0xDA,0xD8);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals,0x64B31D5B,0x1A27,0x37A8,0xBC,0xBC,0xC0,0xBB,0xD5,0x31,0x4C,0x79);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig,0xA9F22E31,0xD4E1,0x3940,0xBA,0x20,0xDC,0xB2,0x09,0x73,0xB0,0x9F);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals,0x06B50718,0x3528,0x3B66,0xBE,0x76,0xE1,0x83,0xAA,0x80,0xD4,0xA5);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer,0x6928CA7B,0x166D,0x3B37,0x90,0x10,0xFB,0xAB,0x2C,0x7E,0x92,0xB0);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater,0x4FA5F2C4,0x8612,0x35C9,0xBF,0xAA,0x96,0x7C,0x2C,0x81,0x9F,0xA7);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals,0xC8AFE1A8,0x92FC,0x3783,0x95,0x20,0xD6,0xBB,0xC5,0x07,0xB2,0x4A);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics,0x2C1E9C37,0x6827,0x38F7,0x85,0x7C,0x02,0x16,0x42,0xCA,0x42,0x8B);\r\n\r\n#undef MIDL_DEFINE_GUID\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n\r\n\r\n"
  },
  {
    "path": "BackEndProxyStub/PhoneVoIPApp.BackEnd_p.c",
    "content": "\r\n\r\n/* this ALWAYS GENERATED file contains the proxy stub code */\r\n\r\n\r\n /* File created by MIDL compiler version 8.00.0603 */\r\n/* at Tue Jan 29 08:48:50 2019\r\n */\r\n/* Compiler settings for C:\\Users\\evgeny\\AppData\\Local\\Temp\\PhoneVoIPApp.BackEnd.idl-35395493:\r\n    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=ARM 8.00.0603 \r\n    protocol : dce , ms_ext, c_ext, robust\r\n    error checks: allocation ref bounds_check enum stub_data \r\n    VC __declspec() decoration level: \r\n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r\n         DECLSPEC_UUID(), MIDL_INTERFACE()\r\n*/\r\n/* @@MIDL_FILE_HEADING(  ) */\r\n\r\n#if defined(_ARM_)\r\n\r\n\r\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\r\n#if _MSC_VER >= 1200\r\n#pragma warning(push)\r\n#endif\r\n\r\n#pragma warning( disable: 4211 )  /* redefine extern to static */\r\n#pragma warning( disable: 4232 )  /* dllimport identity*/\r\n#pragma warning( disable: 4024 )  /* array to pointer mapping*/\r\n#pragma warning( disable: 4152 )  /* function/data pointer conversion in expression */\r\n\r\n#define USE_STUBLESS_PROXY\r\n\r\n\r\n/* verify that the <rpcproxy.h> version is high enough to compile this file*/\r\n#ifndef __REDQ_RPCPROXY_H_VERSION__\r\n#define __REQUIRED_RPCPROXY_H_VERSION__ 475\r\n#endif\r\n\r\n\r\n#include \"rpcproxy.h\"\r\n#ifndef __RPCPROXY_H_VERSION__\r\n#error this stub requires an updated version of <rpcproxy.h>\r\n#endif /* __RPCPROXY_H_VERSION__ */\r\n\r\n\r\n#include \"PhoneVoIPApp.BackEnd.h\"\r\n\r\n#define TYPE_FORMAT_STRING_SIZE   575                               \r\n#define PROC_FORMAT_STRING_SIZE   4275                              \r\n#define EXPR_FORMAT_STRING_SIZE   1                                 \r\n#define TRANSMIT_AS_TABLE_SIZE    0            \r\n#define WIRE_MARSHAL_TABLE_SIZE   1            \r\n\r\ntypedef struct _PhoneVoIPApp2EBackEnd_MIDL_TYPE_FORMAT_STRING\r\n    {\r\n    short          Pad;\r\n    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];\r\n    } PhoneVoIPApp2EBackEnd_MIDL_TYPE_FORMAT_STRING;\r\n\r\ntypedef struct _PhoneVoIPApp2EBackEnd_MIDL_PROC_FORMAT_STRING\r\n    {\r\n    short          Pad;\r\n    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];\r\n    } PhoneVoIPApp2EBackEnd_MIDL_PROC_FORMAT_STRING;\r\n\r\ntypedef struct _PhoneVoIPApp2EBackEnd_MIDL_EXPR_FORMAT_STRING\r\n    {\r\n    long          Pad;\r\n    unsigned char  Format[ EXPR_FORMAT_STRING_SIZE ];\r\n    } PhoneVoIPApp2EBackEnd_MIDL_EXPR_FORMAT_STRING;\r\n\r\n\r\nstatic const RPC_SYNTAX_IDENTIFIER  _RpcTransferSyntax = \r\n{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};\r\n\r\n\r\nextern const PhoneVoIPApp2EBackEnd_MIDL_TYPE_FORMAT_STRING PhoneVoIPApp2EBackEnd__MIDL_TypeFormatString;\r\nextern const PhoneVoIPApp2EBackEnd_MIDL_PROC_FORMAT_STRING PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString;\r\nextern const PhoneVoIPApp2EBackEnd_MIDL_EXPR_FORMAT_STRING PhoneVoIPApp2EBackEnd__MIDL_ExprFormatString;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_ProxyInfo;\r\n\r\n\r\nextern const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[ WIRE_MARSHAL_TABLE_SIZE ];\r\n\r\n#if !defined(__RPC_ARM32__)\r\n#error  Invalid build platform for this stub.\r\n#endif\r\n\r\n#if !(TARGET_IS_NT50_OR_LATER)\r\n#error You need Windows 2000 or later to run this stub because it uses these features:\r\n#error   /robust command line switch.\r\n#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.\r\n#error This app will fail with the RPC_X_WRONG_STUB_VERSION error.\r\n#endif\r\n\r\n\r\nstatic const PhoneVoIPApp2EBackEnd_MIDL_PROC_FORMAT_STRING PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString =\r\n    {\r\n        0,\r\n        {\r\n\r\n\t/* Procedure Invoke */\r\n\r\n\t\t\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/*  2 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/*  6 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/*  8 */\tNdrFcShort( 0x1c ),\t/* ARM Stack size/offset = 28 */\r\n/* 10 */\tNdrFcShort( 0x20 ),\t/* 32 */\r\n/* 12 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 14 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x4,\t\t/* 4 */\r\n/* 16 */\t0x12,\t\t/* 18 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 18 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 20 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 22 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 24 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 26 */\t0x6,\t\t/* 6 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 28 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 30 */\t0x83,\t\t/* 131 */\r\n\t\t\t0xfc,\t\t/* 252 */\r\n/* 32 */\t0xfc,\t\t/* 252 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter pBuffer */\r\n\r\n/* 34 */\tNdrFcShort( 0xb ),\t/* Flags:  must size, must free, in, */\r\n/* 36 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 38 */\tNdrFcShort( 0x2 ),\t/* Type Offset=2 */\r\n\r\n\t/* Parameter hnsPresentationTime */\r\n\r\n/* 40 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 42 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 44 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter hnsSampleDuration */\r\n\r\n/* 46 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 48 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 50 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 52 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 54 */\tNdrFcShort( 0x18 ),\t/* ARM Stack size/offset = 24 */\r\n/* 56 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure Invoke */\r\n\r\n/* 58 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 60 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 64 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 66 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 68 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 70 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 72 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 74 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 76 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 78 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 80 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 82 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 84 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 86 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __param0 */\r\n\r\n/* 88 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 90 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 92 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 94 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 96 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 98 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure Invoke */\r\n\r\n/* 100 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 102 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 106 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 108 */\tNdrFcShort( 0x20 ),\t/* ARM Stack size/offset = 32 */\r\n/* 110 */\tNdrFcShort( 0x25 ),\t/* 37 */\r\n/* 112 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 114 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x4,\t\t/* 4 */\r\n/* 116 */\t0x12,\t\t/* 18 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 118 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 120 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 122 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 124 */\tNdrFcShort( 0x7 ),\t/* 7 */\r\n/* 126 */\t0x7,\t\t/* 7 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 128 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 130 */\t0x83,\t\t/* 131 */\r\n\t\t\t0xfc,\t\t/* 252 */\r\n/* 132 */\t0xfc,\t\t/* 252 */\r\n\t\t\t0xfc,\t\t/* 252 */\r\n\r\n\t/* Parameter callId */\r\n\r\n/* 134 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 136 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 138 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter callAccessHash */\r\n\r\n/* 140 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 142 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 144 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter rejected */\r\n\r\n/* 146 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 148 */\tNdrFcShort( 0x18 ),\t/* ARM Stack size/offset = 24 */\r\n/* 150 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 152 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 154 */\tNdrFcShort( 0x1c ),\t/* ARM Stack size/offset = 28 */\r\n/* 156 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure WriteAudio */\r\n\r\n/* 158 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 160 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 164 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 166 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 168 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 170 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 172 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 174 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 176 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 178 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 180 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 182 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 184 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 186 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter bytes */\r\n\r\n/* 188 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 190 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 192 */\t0x1,\t\t/* FC_BYTE */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter byteCount */\r\n\r\n/* 194 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 196 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 198 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 200 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 202 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 204 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure WriteVideo */\r\n\r\n/* 206 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 208 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 212 */\tNdrFcShort( 0x7 ),\t/* 7 */\r\n/* 214 */\tNdrFcShort( 0x24 ),\t/* ARM Stack size/offset = 36 */\r\n/* 216 */\tNdrFcShort( 0x28 ),\t/* 40 */\r\n/* 218 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 220 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x5,\t\t/* 5 */\r\n/* 222 */\t0x14,\t\t/* 20 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 224 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 226 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 228 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 230 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 232 */\t0x8,\t\t/* 8 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 234 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 236 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x9d,\t\t/* 157 */\r\n/* 238 */\t0xfc,\t\t/* 252 */\r\n\t\t\t0x4,\t\t/* 4 */\r\n/* 240 */\t0x0,\t\t/* 0 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter bytes */\r\n\r\n/* 242 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 244 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 246 */\t0x1,\t\t/* FC_BYTE */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter byteCount */\r\n\r\n/* 248 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 250 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 252 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter hnsPresentationTime */\r\n\r\n/* 254 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 256 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 258 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter hnsSampleDuration */\r\n\r\n/* 260 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 262 */\tNdrFcShort( 0x18 ),\t/* ARM Stack size/offset = 24 */\r\n/* 264 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 266 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 268 */\tNdrFcShort( 0x20 ),\t/* ARM Stack size/offset = 32 */\r\n/* 270 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure add_AudioMessageReceived */\r\n\r\n/* 272 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 274 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 278 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 280 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 282 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 284 */\tNdrFcShort( 0x34 ),\t/* 52 */\r\n/* 286 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 288 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 290 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 292 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 294 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 296 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 298 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 300 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter __param0 */\r\n\r\n/* 302 */\tNdrFcShort( 0xb ),\t/* Flags:  must size, must free, in, */\r\n/* 304 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 306 */\tNdrFcShort( 0x18 ),\t/* Type Offset=24 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 308 */\tNdrFcShort( 0x2112 ),\t/* Flags:  must free, out, simple ref, srv alloc size=8 */\r\n/* 310 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 312 */\tNdrFcShort( 0x2e ),\t/* Type Offset=46 */\r\n\r\n\t/* Return value */\r\n\r\n/* 314 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 316 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 318 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure remove_AudioMessageReceived */\r\n\r\n/* 320 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 322 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 326 */\tNdrFcShort( 0x9 ),\t/* 9 */\r\n/* 328 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 330 */\tNdrFcShort( 0x18 ),\t/* 24 */\r\n/* 332 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 334 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 336 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 338 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 340 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 342 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 344 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 346 */\t0x4,\t\t/* 4 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 348 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 350 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __param0 */\r\n\r\n/* 352 */\tNdrFcShort( 0x8a ),\t/* Flags:  must free, in, by val, */\r\n/* 354 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 356 */\tNdrFcShort( 0x2e ),\t/* Type Offset=46 */\r\n\r\n\t/* Return value */\r\n\r\n/* 358 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 360 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 362 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure add_VideoMessageReceived */\r\n\r\n/* 364 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 366 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 370 */\tNdrFcShort( 0xa ),\t/* 10 */\r\n/* 372 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 374 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 376 */\tNdrFcShort( 0x34 ),\t/* 52 */\r\n/* 378 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 380 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 382 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 384 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 386 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 388 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 390 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 392 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter __param0 */\r\n\r\n/* 394 */\tNdrFcShort( 0xb ),\t/* Flags:  must size, must free, in, */\r\n/* 396 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 398 */\tNdrFcShort( 0x18 ),\t/* Type Offset=24 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 400 */\tNdrFcShort( 0x2112 ),\t/* Flags:  must free, out, simple ref, srv alloc size=8 */\r\n/* 402 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 404 */\tNdrFcShort( 0x2e ),\t/* Type Offset=46 */\r\n\r\n\t/* Return value */\r\n\r\n/* 406 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 408 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 410 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure remove_CameraLocationChanged */\r\n\r\n\r\n\t/* Procedure remove_VideoMessageReceived */\r\n\r\n/* 412 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 414 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 418 */\tNdrFcShort( 0xb ),\t/* 11 */\r\n/* 420 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 422 */\tNdrFcShort( 0x18 ),\t/* 24 */\r\n/* 424 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 426 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 428 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 430 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 432 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 434 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 436 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 438 */\t0x4,\t\t/* 4 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 440 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 442 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __param0 */\r\n\r\n\r\n\t/* Parameter __param0 */\r\n\r\n/* 444 */\tNdrFcShort( 0x8a ),\t/* Flags:  must free, in, by val, */\r\n/* 446 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 448 */\tNdrFcShort( 0x2e ),\t/* Type Offset=46 */\r\n\r\n\t/* Return value */\r\n\r\n\r\n\t/* Return value */\r\n\r\n/* 450 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 452 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 454 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_id */\r\n\r\n/* 456 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 458 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 462 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 464 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 466 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 468 */\tNdrFcShort( 0x2c ),\t/* 44 */\r\n/* 470 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 472 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 474 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 476 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 478 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 480 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 482 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 484 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 486 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 488 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 490 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 492 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 494 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 496 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_id */\r\n\r\n/* 498 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 500 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 504 */\tNdrFcShort( 0x7 ),\t/* 7 */\r\n/* 506 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 508 */\tNdrFcShort( 0x10 ),\t/* 16 */\r\n/* 510 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 512 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 514 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 516 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 518 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 520 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 522 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 524 */\t0x4,\t\t/* 4 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 526 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 528 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 530 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 532 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 534 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 536 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 538 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 540 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_port */\r\n\r\n/* 542 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 544 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 548 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 550 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 552 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 554 */\tNdrFcShort( 0x22 ),\t/* 34 */\r\n/* 556 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 558 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 560 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 562 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 564 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 566 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 568 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 570 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 572 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 574 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 576 */\t0x6,\t\t/* FC_SHORT */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 578 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 580 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 582 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_port */\r\n\r\n/* 584 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 586 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 590 */\tNdrFcShort( 0x9 ),\t/* 9 */\r\n/* 592 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 594 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 596 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 598 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 600 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 602 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 604 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 606 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 608 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 610 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 612 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 614 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 616 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 618 */\t0x6,\t\t/* FC_SHORT */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 620 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 622 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 624 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_ipv4 */\r\n\r\n/* 626 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 628 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 632 */\tNdrFcShort( 0xa ),\t/* 10 */\r\n/* 634 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 636 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 638 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 640 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 642 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 644 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 646 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 648 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 650 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 652 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 654 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 656 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 658 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 660 */\tNdrFcShort( 0x5a ),\t/* Type Offset=90 */\r\n\r\n\t/* Return value */\r\n\r\n/* 662 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 664 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 666 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_ipv4 */\r\n\r\n/* 668 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 670 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 674 */\tNdrFcShort( 0xb ),\t/* 11 */\r\n/* 676 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 678 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 680 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 682 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 684 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 686 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 688 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 690 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 692 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 694 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 696 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 698 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 700 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 702 */\tNdrFcShort( 0x68 ),\t/* Type Offset=104 */\r\n\r\n\t/* Return value */\r\n\r\n/* 704 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 706 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 708 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_ipv6 */\r\n\r\n/* 710 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 712 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 716 */\tNdrFcShort( 0xc ),\t/* 12 */\r\n/* 718 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 720 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 722 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 724 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 726 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 728 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 730 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 732 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 734 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 736 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 738 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 740 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 742 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 744 */\tNdrFcShort( 0x5a ),\t/* Type Offset=90 */\r\n\r\n\t/* Return value */\r\n\r\n/* 746 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 748 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 750 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_ipv6 */\r\n\r\n/* 752 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 754 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 758 */\tNdrFcShort( 0xd ),\t/* 13 */\r\n/* 760 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 762 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 764 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 766 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 768 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 770 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 772 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 774 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 776 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 778 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 780 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 782 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 784 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 786 */\tNdrFcShort( 0x68 ),\t/* Type Offset=104 */\r\n\r\n\t/* Return value */\r\n\r\n/* 788 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 790 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 792 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_peerTag */\r\n\r\n/* 794 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 796 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 800 */\tNdrFcShort( 0xe ),\t/* 14 */\r\n/* 802 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 804 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 806 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 808 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 810 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 812 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 814 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 816 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 818 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 820 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 822 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter ____returnValueSize */\r\n\r\n/* 824 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 826 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 828 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 830 */\tNdrFcShort( 0x2013 ),\t/* Flags:  must size, must free, out, srv alloc size=8 */\r\n/* 832 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 834 */\tNdrFcShort( 0x76 ),\t/* Type Offset=118 */\r\n\r\n\t/* Return value */\r\n\r\n/* 836 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 838 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 840 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_peerTag */\r\n\r\n/* 842 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 844 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 848 */\tNdrFcShort( 0xf ),\t/* 15 */\r\n/* 850 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 852 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 854 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 856 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 858 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 860 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 862 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 864 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 866 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 868 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 870 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter ____set_formalSize */\r\n\r\n/* 872 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 874 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 876 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 878 */\tNdrFcShort( 0x10b ),\t/* Flags:  must size, must free, in, simple ref, */\r\n/* 880 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 882 */\tNdrFcShort( 0x8e ),\t/* Type Offset=142 */\r\n\r\n\t/* Return value */\r\n\r\n/* 884 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 886 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 888 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure OnSignalBarsChanged */\r\n\r\n/* 890 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 892 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 896 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 898 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 900 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 902 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 904 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 906 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 908 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 910 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 912 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 914 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 916 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 918 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter newSignal */\r\n\r\n/* 920 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 922 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 924 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 926 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 928 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 930 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure Start */\r\n\r\n\r\n\t/* Procedure OnCallStateChanged */\r\n\r\n/* 932 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 934 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 938 */\tNdrFcShort( 0x7 ),\t/* 7 */\r\n/* 940 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 942 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 944 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 946 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 948 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 950 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 952 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 954 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 956 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 958 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 960 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter cameraLocation */\r\n\r\n\r\n\t/* Parameter newState */\r\n\r\n/* 962 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 964 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 966 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n\r\n\t/* Return value */\r\n\r\n/* 968 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 970 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 972 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure OnCallStatusChanged */\r\n\r\n/* 974 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 976 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 980 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 982 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 984 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 986 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 988 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 990 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 992 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 994 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 996 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 998 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1000 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1002 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter newStatus */\r\n\r\n/* 1004 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1006 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1008 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1010 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1012 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1014 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure OnCallAudioRouteChanged */\r\n\r\n/* 1016 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1018 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1022 */\tNdrFcShort( 0x9 ),\t/* 9 */\r\n/* 1024 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1026 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1028 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1030 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1032 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1034 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1036 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1038 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1040 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1042 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1044 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter newRoute */\r\n\r\n/* 1046 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1048 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1050 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1052 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1054 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1056 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure OnMediaOperationsChanged */\r\n\r\n/* 1058 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1060 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1064 */\tNdrFcShort( 0xa ),\t/* 10 */\r\n/* 1066 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1068 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1070 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1072 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1074 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1076 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1078 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1080 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1082 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1084 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1086 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter newOperations */\r\n\r\n/* 1088 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1090 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1092 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1094 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1096 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1098 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure OnCameraLocationChanged */\r\n\r\n/* 1100 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1102 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1106 */\tNdrFcShort( 0xb ),\t/* 11 */\r\n/* 1108 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1110 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1112 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1114 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1116 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1118 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1120 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1122 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1124 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1126 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1128 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter newCameraLocation */\r\n\r\n/* 1130 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1132 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1134 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1136 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1138 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1140 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetTransport */\r\n\r\n/* 1142 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1144 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1148 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 1150 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1152 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1154 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1156 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1158 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1160 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1162 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1164 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1166 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1168 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1170 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter transport */\r\n\r\n/* 1172 */\tNdrFcShort( 0xb ),\t/* Flags:  must size, must free, in, */\r\n/* 1174 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1176 */\tNdrFcShort( 0x9a ),\t/* Type Offset=154 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1178 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1180 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1182 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure StopMTProtoUpdater */\r\n\r\n\r\n\t/* Procedure Stop */\r\n\r\n/* 1184 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1186 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1190 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1192 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1194 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1196 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1198 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x1,\t\t/* 1 */\r\n/* 1200 */\t0xc,\t\t/* 12 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1202 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1204 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1206 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1208 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1210 */\t0x1,\t\t/* 1 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n\r\n\t/* Return value */\r\n\r\n\r\n\t/* Return value */\r\n\r\n/* 1212 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1214 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1216 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure CreateVoIPControllerWrapper */\r\n\r\n\r\n\t/* Procedure ToggleCamera */\r\n\r\n/* 1218 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1220 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1224 */\tNdrFcShort( 0x9 ),\t/* 9 */\r\n/* 1226 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1228 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1230 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1232 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x1,\t\t/* 1 */\r\n/* 1234 */\t0xc,\t\t/* 12 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1236 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1238 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1240 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1242 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1244 */\t0x1,\t\t/* 1 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n\r\n\t/* Return value */\r\n\r\n\r\n\t/* Return value */\r\n\r\n/* 1246 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1248 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1250 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure add_CameraLocationChanged */\r\n\r\n/* 1252 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1254 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1258 */\tNdrFcShort( 0xa ),\t/* 10 */\r\n/* 1260 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 1262 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1264 */\tNdrFcShort( 0x34 ),\t/* 52 */\r\n/* 1266 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 1268 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1270 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1272 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1274 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1276 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 1278 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1280 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter __param0 */\r\n\r\n/* 1282 */\tNdrFcShort( 0xb ),\t/* Flags:  must size, must free, in, */\r\n/* 1284 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1286 */\tNdrFcShort( 0xac ),\t/* Type Offset=172 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 1288 */\tNdrFcShort( 0x2112 ),\t/* Flags:  must free, out, simple ref, srv alloc size=8 */\r\n/* 1290 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1292 */\tNdrFcShort( 0x2e ),\t/* Type Offset=46 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1294 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1296 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1298 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_InitTimeout */\r\n\r\n/* 1300 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1302 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1306 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 1308 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1310 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1312 */\tNdrFcShort( 0x2c ),\t/* 44 */\r\n/* 1314 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1316 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1318 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1320 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1322 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1324 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1326 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1328 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 1330 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 1332 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1334 */\t0xc,\t\t/* FC_DOUBLE */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1336 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1338 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1340 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_InitTimeout */\r\n\r\n/* 1342 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1344 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1348 */\tNdrFcShort( 0x7 ),\t/* 7 */\r\n/* 1350 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 1352 */\tNdrFcShort( 0x10 ),\t/* 16 */\r\n/* 1354 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1356 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1358 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1360 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1362 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1364 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1366 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 1368 */\t0x4,\t\t/* 4 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1370 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x84,\t\t/* 132 */\r\n/* 1372 */\t0x85,\t\t/* 133 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 1374 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1376 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1378 */\t0xc,\t\t/* FC_DOUBLE */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1380 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1382 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 1384 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_RecvTimeout */\r\n\r\n/* 1386 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1388 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1392 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1394 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1396 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1398 */\tNdrFcShort( 0x2c ),\t/* 44 */\r\n/* 1400 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1402 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1404 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1406 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1408 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1410 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1412 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1414 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 1416 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 1418 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1420 */\t0xc,\t\t/* FC_DOUBLE */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1422 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1424 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1426 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_RecvTimeout */\r\n\r\n/* 1428 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1430 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1434 */\tNdrFcShort( 0x9 ),\t/* 9 */\r\n/* 1436 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 1438 */\tNdrFcShort( 0x10 ),\t/* 16 */\r\n/* 1440 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1442 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1444 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1446 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1448 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1450 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1452 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 1454 */\t0x4,\t\t/* 4 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1456 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x84,\t\t/* 132 */\r\n/* 1458 */\t0x85,\t\t/* 133 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 1460 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1462 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1464 */\t0xc,\t\t/* FC_DOUBLE */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1466 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1468 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 1470 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure Start */\r\n\r\n\r\n\t/* Procedure HandleUpdatePhoneCall */\r\n\r\n/* 1472 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1474 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1478 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 1480 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1482 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1484 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1486 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x1,\t\t/* 1 */\r\n/* 1488 */\t0xc,\t\t/* 12 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1490 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1492 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1494 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1496 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1498 */\t0x1,\t\t/* 1 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n\r\n\t/* Return value */\r\n\r\n\r\n\t/* Return value */\r\n\r\n/* 1500 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1502 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1504 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure DoPeriodicKeepAlive */\r\n\r\n\r\n\t/* Procedure Stop */\r\n\r\n\r\n\t/* Procedure Stop */\r\n\r\n\r\n\t/* Procedure StartMTProtoUpdater */\r\n\r\n/* 1506 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1508 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1512 */\tNdrFcShort( 0x7 ),\t/* 7 */\r\n/* 1514 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1516 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1518 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1520 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x1,\t\t/* 1 */\r\n/* 1522 */\t0xc,\t\t/* 12 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1524 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1526 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1528 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1530 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1532 */\t0x1,\t\t/* 1 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n\r\n\t/* Return value */\r\n\r\n\r\n\t/* Return value */\r\n\r\n\r\n\t/* Return value */\r\n\r\n\r\n\t/* Return value */\r\n\r\n/* 1534 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1536 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1538 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure DeleteVoIPControllerWrapper */\r\n\r\n/* 1540 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1542 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1546 */\tNdrFcShort( 0xa ),\t/* 10 */\r\n/* 1548 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1550 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1552 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1554 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x1,\t\t/* 1 */\r\n/* 1556 */\t0xc,\t\t/* 12 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1558 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1560 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1562 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1564 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1566 */\t0x1,\t\t/* 1 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1568 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1570 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1572 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetConfig */\r\n\r\n/* 1574 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1576 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1580 */\tNdrFcShort( 0xb ),\t/* 11 */\r\n/* 1582 */\tNdrFcShort( 0x2c ),\t/* ARM Stack size/offset = 44 */\r\n/* 1584 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1586 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1588 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1590 */\t0x14,\t\t/* 20 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 1592 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1594 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1596 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1598 */\tNdrFcShort( 0xa ),\t/* 10 */\r\n/* 1600 */\t0x8,\t\t/* 8 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1602 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 1604 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x9d,\t\t/* 157 */\r\n/* 1606 */\t0xfc,\t\t/* 252 */\r\n\t\t\t0x6,\t\t/* 6 */\r\n/* 1608 */\t0x0,\t\t/* 0 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter config */\r\n\r\n/* 1610 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 1612 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1614 */\tNdrFcShort( 0xc2 ),\t/* Type Offset=194 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1616 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1618 */\tNdrFcShort( 0x28 ),\t/* ARM Stack size/offset = 40 */\r\n/* 1620 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetEncryptionKey */\r\n\r\n/* 1622 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1624 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1628 */\tNdrFcShort( 0xc ),\t/* 12 */\r\n/* 1630 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 1632 */\tNdrFcShort( 0xd ),\t/* 13 */\r\n/* 1634 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1636 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x4,\t\t/* 4 */\r\n/* 1638 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 1640 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1642 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1644 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1646 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 1648 */\t0x4,\t\t/* 4 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1650 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 1652 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __keySize */\r\n\r\n/* 1654 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1656 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1658 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter key */\r\n\r\n/* 1660 */\tNdrFcShort( 0x10b ),\t/* Flags:  must size, must free, in, simple ref, */\r\n/* 1662 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1664 */\tNdrFcShort( 0x8e ),\t/* Type Offset=142 */\r\n\r\n\t/* Parameter isOutgoing */\r\n\r\n/* 1666 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1668 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1670 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1672 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1674 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 1676 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetPublicEndpoints */\r\n\r\n/* 1678 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1680 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1684 */\tNdrFcShort( 0xd ),\t/* 13 */\r\n/* 1686 */\tNdrFcShort( 0x18 ),\t/* ARM Stack size/offset = 24 */\r\n/* 1688 */\tNdrFcShort( 0x15 ),\t/* 21 */\r\n/* 1690 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1692 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x5,\t\t/* 5 */\r\n/* 1694 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 1696 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1698 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1700 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1702 */\tNdrFcShort( 0x5 ),\t/* 5 */\r\n/* 1704 */\t0x5,\t\t/* 5 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1706 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 1708 */\t0x83,\t\t/* 131 */\r\n\t\t\t0xfc,\t\t/* 252 */\r\n\r\n\t/* Parameter __endpointsSize */\r\n\r\n/* 1710 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1712 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1714 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter endpoints */\r\n\r\n/* 1716 */\tNdrFcShort( 0x10b ),\t/* Flags:  must size, must free, in, simple ref, */\r\n/* 1718 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1720 */\tNdrFcShort( 0xf6 ),\t/* Type Offset=246 */\r\n\r\n\t/* Parameter allowP2P */\r\n\r\n/* 1722 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1724 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1726 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter connectionMaxLayer */\r\n\r\n/* 1728 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1730 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 1732 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1734 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1736 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 1738 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetProxy */\r\n\r\n/* 1740 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1742 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1746 */\tNdrFcShort( 0xe ),\t/* 14 */\r\n/* 1748 */\tNdrFcShort( 0x1c ),\t/* ARM Stack size/offset = 28 */\r\n/* 1750 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1752 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1754 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1756 */\t0x12,\t\t/* 18 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 1758 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1760 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1762 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1764 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 1766 */\t0x6,\t\t/* 6 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1768 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 1770 */\t0x83,\t\t/* 131 */\r\n\t\t\t0xfc,\t\t/* 252 */\r\n/* 1772 */\t0xfc,\t\t/* 252 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter proxy */\r\n\r\n/* 1774 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 1776 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1778 */\tNdrFcShort( 0x10c ),\t/* Type Offset=268 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1780 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1782 */\tNdrFcShort( 0x18 ),\t/* ARM Stack size/offset = 24 */\r\n/* 1784 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure Start */\r\n\r\n/* 1786 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1788 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1792 */\tNdrFcShort( 0xf ),\t/* 15 */\r\n/* 1794 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1796 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1798 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1800 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x1,\t\t/* 1 */\r\n/* 1802 */\t0xc,\t\t/* 12 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1804 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1806 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1808 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1810 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1812 */\t0x1,\t\t/* 1 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1814 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1816 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1818 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure Connect */\r\n\r\n/* 1820 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1822 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1826 */\tNdrFcShort( 0x10 ),\t/* 16 */\r\n/* 1828 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1830 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1832 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1834 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x1,\t\t/* 1 */\r\n/* 1836 */\t0xc,\t\t/* 12 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1838 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1840 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1842 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1844 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1846 */\t0x1,\t\t/* 1 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1848 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1850 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1852 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetMicMute */\r\n\r\n/* 1854 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1856 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1860 */\tNdrFcShort( 0x11 ),\t/* 17 */\r\n/* 1862 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1864 */\tNdrFcShort( 0x5 ),\t/* 5 */\r\n/* 1866 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1868 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1870 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1872 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1874 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1876 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1878 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1880 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1882 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter mute */\r\n\r\n/* 1884 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1886 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1888 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1890 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1892 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1894 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SwitchSpeaker */\r\n\r\n/* 1896 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1898 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1902 */\tNdrFcShort( 0x12 ),\t/* 18 */\r\n/* 1904 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1906 */\tNdrFcShort( 0x5 ),\t/* 5 */\r\n/* 1908 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1910 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1912 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1914 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1916 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1918 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1920 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1922 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1924 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter external */\r\n\r\n/* 1926 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1928 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1930 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1932 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1934 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1936 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure UpdateServerConfig */\r\n\r\n/* 1938 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1940 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1944 */\tNdrFcShort( 0x13 ),\t/* 19 */\r\n/* 1946 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1948 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1950 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1952 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1954 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 1956 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1958 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1960 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1962 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1964 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1966 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter json */\r\n\r\n/* 1968 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 1970 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1972 */\tNdrFcShort( 0x68 ),\t/* Type Offset=104 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1974 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1976 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1978 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetPreferredRelayID */\r\n\r\n/* 1980 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1982 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1986 */\tNdrFcShort( 0x14 ),\t/* 20 */\r\n/* 1988 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1990 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1992 */\tNdrFcShort( 0x2c ),\t/* 44 */\r\n/* 1994 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1996 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1998 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2000 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2002 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2004 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2006 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2008 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2010 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2012 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2014 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2016 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2018 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2020 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetLastError */\r\n\r\n/* 2022 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2024 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2028 */\tNdrFcShort( 0x15 ),\t/* 21 */\r\n/* 2030 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2032 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2034 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 2036 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2038 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2040 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2042 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2044 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2046 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2048 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2050 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2052 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2054 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2056 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2058 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2060 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2062 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetDebugLog */\r\n\r\n/* 2064 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2066 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2070 */\tNdrFcShort( 0x16 ),\t/* 22 */\r\n/* 2072 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2074 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2076 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 2078 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2080 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 2082 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 2084 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2086 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2088 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2090 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2092 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2094 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 2096 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2098 */\tNdrFcShort( 0x5a ),\t/* Type Offset=90 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2100 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2102 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2104 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetDebugString */\r\n\r\n/* 2106 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2108 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2112 */\tNdrFcShort( 0x17 ),\t/* 23 */\r\n/* 2114 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2116 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2118 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 2120 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2122 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 2124 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 2126 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2128 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2130 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2132 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2134 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2136 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 2138 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2140 */\tNdrFcShort( 0x5a ),\t/* Type Offset=90 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2142 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2144 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2146 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetVersion */\r\n\r\n/* 2148 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2150 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2154 */\tNdrFcShort( 0x18 ),\t/* 24 */\r\n/* 2156 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2158 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2160 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 2162 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2164 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 2166 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 2168 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2170 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2172 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2174 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2176 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2178 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 2180 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2182 */\tNdrFcShort( 0x5a ),\t/* Type Offset=90 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2184 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2186 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2188 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetSignalBarsCount */\r\n\r\n/* 2190 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2192 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2196 */\tNdrFcShort( 0x19 ),\t/* 25 */\r\n/* 2198 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2200 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2202 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 2204 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2206 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2208 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2210 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2212 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2214 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2216 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2218 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2220 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2222 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2224 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2226 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2228 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2230 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetStatusCallback */\r\n\r\n/* 2232 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2234 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2238 */\tNdrFcShort( 0x1a ),\t/* 26 */\r\n/* 2240 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2242 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2244 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 2246 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2248 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2250 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2252 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2254 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2256 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2258 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2260 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter statusListener */\r\n\r\n/* 2262 */\tNdrFcShort( 0xb ),\t/* Flags:  must size, must free, in, */\r\n/* 2264 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2266 */\tNdrFcShort( 0x128 ),\t/* Type Offset=296 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2268 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2270 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2272 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure InitiateOutgoingCall2 */\r\n\r\n/* 2274 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2276 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2280 */\tNdrFcShort( 0x1b ),\t/* 27 */\r\n/* 2282 */\tNdrFcShort( 0x28 ),\t/* ARM Stack size/offset = 40 */\r\n/* 2284 */\tNdrFcShort( 0x30 ),\t/* 48 */\r\n/* 2286 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 2288 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x6,\t\t/* 6 */\r\n/* 2290 */\t0x14,\t\t/* 20 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 2292 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2294 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 2296 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2298 */\tNdrFcShort( 0x9 ),\t/* 9 */\r\n/* 2300 */\t0x8,\t\t/* 8 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2302 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 2304 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x9d,\t\t/* 157 */\r\n/* 2306 */\t0xfc,\t\t/* 252 */\r\n\t\t\t0x5,\t\t/* 5 */\r\n/* 2308 */\t0x0,\t\t/* 0 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter recepientName */\r\n\r\n/* 2310 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 2312 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2314 */\tNdrFcShort( 0x68 ),\t/* Type Offset=104 */\r\n\r\n\t/* Parameter recepientId */\r\n\r\n/* 2316 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2318 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2320 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter callId */\r\n\r\n/* 2322 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2324 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 2326 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter callAccessHash */\r\n\r\n/* 2328 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2330 */\tNdrFcShort( 0x18 ),\t/* ARM Stack size/offset = 24 */\r\n/* 2332 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2334 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2336 */\tNdrFcShort( 0x20 ),\t/* ARM Stack size/offset = 32 */\r\n/* 2338 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2340 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2342 */\tNdrFcShort( 0x24 ),\t/* ARM Stack size/offset = 36 */\r\n/* 2344 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure InitiateOutgoingCall1 */\r\n\r\n/* 2346 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2348 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2352 */\tNdrFcShort( 0x1c ),\t/* 28 */\r\n/* 2354 */\tNdrFcShort( 0x80 ),\t/* ARM Stack size/offset = 128 */\r\n/* 2356 */\tNdrFcShort( 0x5a ),\t/* 90 */\r\n/* 2358 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 2360 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x11,\t\t/* 17 */\r\n/* 2362 */\t0x14,\t\t/* 20 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 2364 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2366 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 2368 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2370 */\tNdrFcShort( 0x1f ),\t/* 31 */\r\n/* 2372 */\t0x8,\t\t/* 8 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2374 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 2376 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x9d,\t\t/* 157 */\r\n/* 2378 */\t0xfc,\t\t/* 252 */\r\n\t\t\t0x1b,\t\t/* 27 */\r\n/* 2380 */\t0x0,\t\t/* 0 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter recepientName */\r\n\r\n/* 2382 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 2384 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2386 */\tNdrFcShort( 0x68 ),\t/* Type Offset=104 */\r\n\r\n\t/* Parameter recepientId */\r\n\r\n/* 2388 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2390 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2392 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter callId */\r\n\r\n/* 2394 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2396 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 2398 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter callAccessHash */\r\n\r\n/* 2400 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2402 */\tNdrFcShort( 0x18 ),\t/* ARM Stack size/offset = 24 */\r\n/* 2404 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter config */\r\n\r\n/* 2406 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 2408 */\tNdrFcShort( 0x20 ),\t/* ARM Stack size/offset = 32 */\r\n/* 2410 */\tNdrFcShort( 0xc2 ),\t/* Type Offset=194 */\r\n\r\n\t/* Parameter __keySize */\r\n\r\n/* 2412 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2414 */\tNdrFcShort( 0x40 ),\t/* ARM Stack size/offset = 64 */\r\n/* 2416 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter key */\r\n\r\n/* 2418 */\tNdrFcShort( 0x10b ),\t/* Flags:  must size, must free, in, simple ref, */\r\n/* 2420 */\tNdrFcShort( 0x44 ),\t/* ARM Stack size/offset = 68 */\r\n/* 2422 */\tNdrFcShort( 0x142 ),\t/* Type Offset=322 */\r\n\r\n\t/* Parameter outgoing */\r\n\r\n/* 2424 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2426 */\tNdrFcShort( 0x48 ),\t/* ARM Stack size/offset = 72 */\r\n/* 2428 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __emojisSize */\r\n\r\n/* 2430 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2432 */\tNdrFcShort( 0x4c ),\t/* ARM Stack size/offset = 76 */\r\n/* 2434 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter emojis */\r\n\r\n/* 2436 */\tNdrFcShort( 0x10b ),\t/* Flags:  must size, must free, in, simple ref, */\r\n/* 2438 */\tNdrFcShort( 0x50 ),\t/* ARM Stack size/offset = 80 */\r\n/* 2440 */\tNdrFcShort( 0x152 ),\t/* Type Offset=338 */\r\n\r\n\t/* Parameter __endpointsSize */\r\n\r\n/* 2442 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2444 */\tNdrFcShort( 0x54 ),\t/* ARM Stack size/offset = 84 */\r\n/* 2446 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter endpoints */\r\n\r\n/* 2448 */\tNdrFcShort( 0x10b ),\t/* Flags:  must size, must free, in, simple ref, */\r\n/* 2450 */\tNdrFcShort( 0x58 ),\t/* ARM Stack size/offset = 88 */\r\n/* 2452 */\tNdrFcShort( 0x16c ),\t/* Type Offset=364 */\r\n\r\n\t/* Parameter allowP2P */\r\n\r\n/* 2454 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2456 */\tNdrFcShort( 0x5c ),\t/* ARM Stack size/offset = 92 */\r\n/* 2458 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter connectionMaxLayer */\r\n\r\n/* 2460 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2462 */\tNdrFcShort( 0x60 ),\t/* ARM Stack size/offset = 96 */\r\n/* 2464 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter proxy */\r\n\r\n/* 2466 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 2468 */\tNdrFcShort( 0x64 ),\t/* ARM Stack size/offset = 100 */\r\n/* 2470 */\tNdrFcShort( 0x10c ),\t/* Type Offset=268 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2472 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2474 */\tNdrFcShort( 0x78 ),\t/* ARM Stack size/offset = 120 */\r\n/* 2476 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2478 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2480 */\tNdrFcShort( 0x7c ),\t/* ARM Stack size/offset = 124 */\r\n/* 2482 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure OnIncomingCallReceived */\r\n\r\n/* 2484 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2486 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2490 */\tNdrFcShort( 0x1d ),\t/* 29 */\r\n/* 2492 */\tNdrFcShort( 0x34 ),\t/* ARM Stack size/offset = 52 */\r\n/* 2494 */\tNdrFcShort( 0x30 ),\t/* 48 */\r\n/* 2496 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 2498 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x8,\t\t/* 8 */\r\n/* 2500 */\t0x16,\t\t/* 22 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 2502 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2504 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 2506 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2508 */\tNdrFcShort( 0xc ),\t/* 12 */\r\n/* 2510 */\t0xa,\t\t/* 10 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2512 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 2514 */\t0x83,\t\t/* 131 */\r\n\t\t\t0xfc,\t\t/* 252 */\r\n/* 2516 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x9d,\t\t/* 157 */\r\n/* 2518 */\t0xfc,\t\t/* 252 */\r\n\t\t\t0x6,\t\t/* 6 */\r\n/* 2520 */\t0x0,\t\t/* 0 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter contactName */\r\n\r\n/* 2522 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 2524 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2526 */\tNdrFcShort( 0x68 ),\t/* Type Offset=104 */\r\n\r\n\t/* Parameter contactId */\r\n\r\n/* 2528 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2530 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2532 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter contactImage */\r\n\r\n/* 2534 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 2536 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 2538 */\tNdrFcShort( 0x68 ),\t/* Type Offset=104 */\r\n\r\n\t/* Parameter callId */\r\n\r\n/* 2540 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2542 */\tNdrFcShort( 0x18 ),\t/* ARM Stack size/offset = 24 */\r\n/* 2544 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter callAccessHash */\r\n\r\n/* 2546 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2548 */\tNdrFcShort( 0x20 ),\t/* ARM Stack size/offset = 32 */\r\n/* 2550 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter incomingCallDialogDismissedCallback */\r\n\r\n/* 2552 */\tNdrFcShort( 0xb ),\t/* Flags:  must size, must free, in, */\r\n/* 2554 */\tNdrFcShort( 0x28 ),\t/* ARM Stack size/offset = 40 */\r\n/* 2556 */\tNdrFcShort( 0x182 ),\t/* Type Offset=386 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2558 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2560 */\tNdrFcShort( 0x2c ),\t/* ARM Stack size/offset = 44 */\r\n/* 2562 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2564 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2566 */\tNdrFcShort( 0x30 ),\t/* ARM Stack size/offset = 48 */\r\n/* 2568 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure HoldCall */\r\n\r\n/* 2570 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2572 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2576 */\tNdrFcShort( 0x1e ),\t/* 30 */\r\n/* 2578 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2580 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2582 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 2584 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2586 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2588 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2590 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2592 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2594 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2596 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2598 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2600 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2602 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2604 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2606 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2608 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2610 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure ResumeCall */\r\n\r\n/* 2612 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2614 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2618 */\tNdrFcShort( 0x1f ),\t/* 31 */\r\n/* 2620 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2622 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2624 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 2626 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2628 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2630 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2632 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2634 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2636 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2638 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2640 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2642 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2644 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2646 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2648 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2650 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2652 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure EndCall */\r\n\r\n/* 2654 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2656 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2660 */\tNdrFcShort( 0x20 ),\t/* 32 */\r\n/* 2662 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2664 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2666 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 2668 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2670 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2672 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2674 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2676 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2678 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2680 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2682 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2684 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2686 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2688 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2690 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2692 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2694 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure ToggleCamera */\r\n\r\n/* 2696 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2698 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2702 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 2704 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2706 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2708 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 2710 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2712 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2714 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2716 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2718 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2720 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2722 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2724 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2726 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2728 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2730 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2732 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2734 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2736 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_CallStatus */\r\n\r\n/* 2738 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2740 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2744 */\tNdrFcShort( 0x22 ),\t/* 34 */\r\n/* 2746 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2748 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2750 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 2752 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2754 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2756 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2758 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2760 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2762 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2764 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2766 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2768 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2770 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2772 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2774 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2776 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2778 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_MediaOperations */\r\n\r\n/* 2780 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2782 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2786 */\tNdrFcShort( 0x23 ),\t/* 35 */\r\n/* 2788 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2790 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2792 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 2794 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2796 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2798 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2800 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2802 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2804 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2806 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2808 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2810 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2812 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2814 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2816 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2818 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2820 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_IsShowingVideo */\r\n\r\n/* 2822 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2824 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2828 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 2830 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2832 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2834 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 2836 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2838 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2840 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2842 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2844 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2846 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2848 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2850 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2852 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2854 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2856 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2858 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2860 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2862 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_IsShowingVideo */\r\n\r\n/* 2864 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2866 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2870 */\tNdrFcShort( 0x25 ),\t/* 37 */\r\n/* 2872 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2874 */\tNdrFcShort( 0x5 ),\t/* 5 */\r\n/* 2876 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 2878 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2880 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2882 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2884 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2886 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2888 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2890 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2892 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter value */\r\n\r\n/* 2894 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2896 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2898 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2900 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2902 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2904 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_IsRenderingVideo */\r\n\r\n/* 2906 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2908 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2912 */\tNdrFcShort( 0x26 ),\t/* 38 */\r\n/* 2914 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2916 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2918 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 2920 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2922 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2924 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2926 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2928 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2930 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2932 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2934 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 2936 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 2938 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2940 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2942 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2944 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2946 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_IsRenderingVideo */\r\n\r\n/* 2948 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2950 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2954 */\tNdrFcShort( 0x27 ),\t/* 39 */\r\n/* 2956 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 2958 */\tNdrFcShort( 0x5 ),\t/* 5 */\r\n/* 2960 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 2962 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 2964 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 2966 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2968 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2970 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 2972 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 2974 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 2976 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter value */\r\n\r\n/* 2978 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 2980 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 2982 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 2984 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 2986 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 2988 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_CameraLocation */\r\n\r\n/* 2990 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 2992 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 2996 */\tNdrFcShort( 0x28 ),\t/* 40 */\r\n/* 2998 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3000 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3002 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 3004 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3006 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3008 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3010 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3012 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3014 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3016 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3018 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3020 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 3022 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3024 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3026 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3028 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3030 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_AvailableAudioRoutes */\r\n\r\n/* 3032 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3034 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3038 */\tNdrFcShort( 0x29 ),\t/* 41 */\r\n/* 3040 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3042 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3044 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 3046 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3048 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3050 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3052 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3054 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3056 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3058 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3060 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3062 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 3064 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3066 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3068 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3070 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3072 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_AudioRoute */\r\n\r\n/* 3074 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3076 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3080 */\tNdrFcShort( 0x2a ),\t/* 42 */\r\n/* 3082 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3084 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3086 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 3088 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3090 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3092 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3094 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3096 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3098 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3100 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3102 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3104 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 3106 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3108 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3110 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3112 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3114 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_AudioRoute */\r\n\r\n/* 3116 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3118 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3122 */\tNdrFcShort( 0x2b ),\t/* 43 */\r\n/* 3124 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3126 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3128 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3130 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3132 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3134 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3136 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3138 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3140 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3142 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3144 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter newRoute */\r\n\r\n/* 3146 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 3148 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3150 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3152 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3154 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3156 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_OtherPartyName */\r\n\r\n/* 3158 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3160 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3164 */\tNdrFcShort( 0x2c ),\t/* 44 */\r\n/* 3166 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3168 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3170 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3172 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3174 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 3176 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 3178 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3180 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3182 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3184 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3186 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3188 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 3190 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3192 */\tNdrFcShort( 0x5a ),\t/* Type Offset=90 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3194 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3196 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3198 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_OtherPartyId */\r\n\r\n/* 3200 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3202 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3206 */\tNdrFcShort( 0x2d ),\t/* 45 */\r\n/* 3208 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3210 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3212 */\tNdrFcShort( 0x2c ),\t/* 44 */\r\n/* 3214 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3216 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3218 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3220 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3222 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3224 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3226 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3228 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3230 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 3232 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3234 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3236 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3238 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3240 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_CallStartTime */\r\n\r\n/* 3242 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3244 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3248 */\tNdrFcShort( 0x2e ),\t/* 46 */\r\n/* 3250 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3252 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3254 */\tNdrFcShort( 0x34 ),\t/* 52 */\r\n/* 3256 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3258 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3260 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3262 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3264 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3266 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3268 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3270 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3272 */\tNdrFcShort( 0x2112 ),\t/* Flags:  must free, out, simple ref, srv alloc size=8 */\r\n/* 3274 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3276 */\tNdrFcShort( 0x2e ),\t/* Type Offset=46 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3278 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3280 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3282 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_CallId */\r\n\r\n/* 3284 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3286 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3290 */\tNdrFcShort( 0x2f ),\t/* 47 */\r\n/* 3292 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3294 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3296 */\tNdrFcShort( 0x2c ),\t/* 44 */\r\n/* 3298 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3300 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3302 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3304 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3306 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3308 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3310 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3312 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3314 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 3316 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3318 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3320 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3322 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3324 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_CallAccessHash */\r\n\r\n/* 3326 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3328 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3332 */\tNdrFcShort( 0x30 ),\t/* 48 */\r\n/* 3334 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3336 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3338 */\tNdrFcShort( 0x2c ),\t/* 44 */\r\n/* 3340 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3342 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3344 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3346 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3348 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3350 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3352 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3354 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3356 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 3358 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3360 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3362 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3364 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3366 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_AcceptedCallId */\r\n\r\n/* 3368 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3370 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3374 */\tNdrFcShort( 0x31 ),\t/* 49 */\r\n/* 3376 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3378 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3380 */\tNdrFcShort( 0x2c ),\t/* 44 */\r\n/* 3382 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3384 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3386 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3388 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3390 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3392 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3394 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3396 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3398 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 3400 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3402 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3404 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3406 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3408 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_AcceptedCallId */\r\n\r\n/* 3410 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3412 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3416 */\tNdrFcShort( 0x32 ),\t/* 50 */\r\n/* 3418 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 3420 */\tNdrFcShort( 0x10 ),\t/* 16 */\r\n/* 3422 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3424 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3426 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3428 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3430 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3432 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3434 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 3436 */\t0x4,\t\t/* 4 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3438 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 3440 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter value */\r\n\r\n/* 3442 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 3444 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3446 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3448 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3450 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 3452 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_Key */\r\n\r\n/* 3454 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3456 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3460 */\tNdrFcShort( 0x33 ),\t/* 51 */\r\n/* 3462 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 3464 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3466 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 3468 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 3470 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 3472 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 3474 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3476 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3478 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 3480 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3482 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter ____returnValueSize */\r\n\r\n/* 3484 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 3486 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3488 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3490 */\tNdrFcShort( 0x2013 ),\t/* Flags:  must size, must free, out, srv alloc size=8 */\r\n/* 3492 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3494 */\tNdrFcShort( 0x76 ),\t/* Type Offset=118 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3496 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3498 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3500 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_Outgoing */\r\n\r\n/* 3502 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3504 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3508 */\tNdrFcShort( 0x34 ),\t/* 52 */\r\n/* 3510 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3512 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3514 */\tNdrFcShort( 0x21 ),\t/* 33 */\r\n/* 3516 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3518 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3520 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3522 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3524 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3526 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3528 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3530 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3532 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 3534 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3536 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3538 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3540 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3542 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_Emojis */\r\n\r\n/* 3544 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3546 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3550 */\tNdrFcShort( 0x35 ),\t/* 53 */\r\n/* 3552 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 3554 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3556 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 3558 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 3560 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 3562 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 3564 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3566 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3568 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 3570 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3572 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter ____returnValueSize */\r\n\r\n/* 3574 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 3576 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3578 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3580 */\tNdrFcShort( 0x2013 ),\t/* Flags:  must size, must free, out, srv alloc size=8 */\r\n/* 3582 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3584 */\tNdrFcShort( 0x194 ),\t/* Type Offset=404 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3586 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3588 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3590 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure Start */\r\n\r\n/* 3592 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3594 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3598 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 3600 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 3602 */\tNdrFcShort( 0x18 ),\t/* 24 */\r\n/* 3604 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3606 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x4,\t\t/* 4 */\r\n/* 3608 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3610 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3612 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3614 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3616 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 3618 */\t0x4,\t\t/* 4 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3620 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 3622 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter pts */\r\n\r\n/* 3624 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 3626 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3628 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter date */\r\n\r\n/* 3630 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 3632 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3634 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter qts */\r\n\r\n/* 3636 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 3638 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3640 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3642 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3644 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 3646 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure DiscardCall */\r\n\r\n/* 3648 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3650 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3654 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3656 */\tNdrFcShort( 0x1c ),\t/* ARM Stack size/offset = 28 */\r\n/* 3658 */\tNdrFcShort( 0x20 ),\t/* 32 */\r\n/* 3660 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3662 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 3664 */\t0x12,\t\t/* 18 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3666 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3668 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3670 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3672 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 3674 */\t0x6,\t\t/* 6 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3676 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 3678 */\t0x83,\t\t/* 131 */\r\n\t\t\t0xfc,\t\t/* 252 */\r\n/* 3680 */\t0xfc,\t\t/* 252 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter id */\r\n\r\n/* 3682 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 3684 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3686 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter accessHash */\r\n\r\n/* 3688 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 3690 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 3692 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3694 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3696 */\tNdrFcShort( 0x18 ),\t/* ARM Stack size/offset = 24 */\r\n/* 3698 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure ReceivedCall */\r\n\r\n/* 3700 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3702 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3706 */\tNdrFcShort( 0x9 ),\t/* 9 */\r\n/* 3708 */\tNdrFcShort( 0x1c ),\t/* ARM Stack size/offset = 28 */\r\n/* 3710 */\tNdrFcShort( 0x20 ),\t/* 32 */\r\n/* 3712 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3714 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 3716 */\t0x12,\t\t/* 18 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3718 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3720 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3722 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3724 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 3726 */\t0x6,\t\t/* 6 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3728 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 3730 */\t0x83,\t\t/* 131 */\r\n\t\t\t0xfc,\t\t/* 252 */\r\n/* 3732 */\t0xfc,\t\t/* 252 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter id */\r\n\r\n/* 3734 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 3736 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3738 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter accessHash */\r\n\r\n/* 3740 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 3742 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 3744 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3746 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3748 */\tNdrFcShort( 0x18 ),\t/* ARM Stack size/offset = 24 */\r\n/* 3750 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure StartServer */\r\n\r\n/* 3752 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3754 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3758 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 3760 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 3762 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3764 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3766 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 3768 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 3770 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3772 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 3774 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3776 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 3778 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3780 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter __outOfProcServerClassNamesSize */\r\n\r\n/* 3782 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 3784 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3786 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter outOfProcServerClassNames */\r\n\r\n/* 3788 */\tNdrFcShort( 0x10b ),\t/* Flags:  must size, must free, in, simple ref, */\r\n/* 3790 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3792 */\tNdrFcShort( 0x1b6 ),\t/* Type Offset=438 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3794 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3796 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3798 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_CallController */\r\n\r\n/* 3800 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3802 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3806 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3808 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3810 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3812 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3814 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3816 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3818 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3820 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3822 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3824 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3826 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3828 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3830 */\tNdrFcShort( 0x13 ),\t/* Flags:  must size, must free, out, */\r\n/* 3832 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3834 */\tNdrFcShort( 0x1cc ),\t/* Type Offset=460 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3836 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3838 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3840 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_VideoRenderer */\r\n\r\n/* 3842 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3844 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3848 */\tNdrFcShort( 0x9 ),\t/* 9 */\r\n/* 3850 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3852 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3854 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3856 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3858 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3860 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3862 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3864 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3866 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3868 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3870 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3872 */\tNdrFcShort( 0x13 ),\t/* Flags:  must size, must free, out, */\r\n/* 3874 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3876 */\tNdrFcShort( 0x1e2 ),\t/* Type Offset=482 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3878 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3880 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3882 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_VideoRenderer */\r\n\r\n/* 3884 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3886 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3890 */\tNdrFcShort( 0xa ),\t/* 10 */\r\n/* 3892 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3894 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3896 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3898 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3900 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3902 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3904 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3906 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3908 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3910 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3912 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter value */\r\n\r\n/* 3914 */\tNdrFcShort( 0xb ),\t/* Flags:  must size, must free, in, */\r\n/* 3916 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3918 */\tNdrFcShort( 0x1e6 ),\t/* Type Offset=486 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3920 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3922 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3924 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_MTProtoUpdater */\r\n\r\n/* 3926 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3928 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3932 */\tNdrFcShort( 0xb ),\t/* 11 */\r\n/* 3934 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3936 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3938 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3940 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3942 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3944 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3946 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3948 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3950 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3952 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3954 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 3956 */\tNdrFcShort( 0x13 ),\t/* Flags:  must size, must free, out, */\r\n/* 3958 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 3960 */\tNdrFcShort( 0x1f8 ),\t/* Type Offset=504 */\r\n\r\n\t/* Return value */\r\n\r\n/* 3962 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 3964 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 3966 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_MTProtoUpdater */\r\n\r\n/* 3968 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 3970 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 3974 */\tNdrFcShort( 0xc ),\t/* 12 */\r\n/* 3976 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 3978 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3980 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 3982 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 3984 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 3986 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3988 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3990 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 3992 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 3994 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 3996 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter value */\r\n\r\n/* 3998 */\tNdrFcShort( 0xb ),\t/* Flags:  must size, must free, in, */\r\n/* 4000 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 4002 */\tNdrFcShort( 0x1fc ),\t/* Type Offset=508 */\r\n\r\n\t/* Return value */\r\n\r\n/* 4004 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 4006 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 4008 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_CaptureController */\r\n\r\n/* 4010 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 4012 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 4016 */\tNdrFcShort( 0xd ),\t/* 13 */\r\n/* 4018 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 4020 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4022 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 4024 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 4026 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 4028 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4030 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4032 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4034 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 4036 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 4038 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 4040 */\tNdrFcShort( 0x13 ),\t/* Flags:  must size, must free, out, */\r\n/* 4042 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 4044 */\tNdrFcShort( 0x20e ),\t/* Type Offset=526 */\r\n\r\n\t/* Return value */\r\n\r\n/* 4046 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 4048 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 4050 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_TransportController */\r\n\r\n/* 4052 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 4054 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 4058 */\tNdrFcShort( 0xe ),\t/* 14 */\r\n/* 4060 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 4062 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4064 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 4066 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 4068 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 4070 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4072 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4074 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4076 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 4078 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 4080 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 4082 */\tNdrFcShort( 0x13 ),\t/* Flags:  must size, must free, out, */\r\n/* 4084 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 4086 */\tNdrFcShort( 0x224 ),\t/* Type Offset=548 */\r\n\r\n\t/* Return value */\r\n\r\n/* 4088 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 4090 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 4092 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetCurrentProcessId */\r\n\r\n/* 4094 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 4096 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 4100 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 4102 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 4104 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4106 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 4108 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 4110 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 4112 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4114 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4116 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4118 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 4120 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 4122 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 4124 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 4126 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 4128 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 4130 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 4132 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 4134 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetUiDisconnectedEventName */\r\n\r\n/* 4136 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 4138 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 4142 */\tNdrFcShort( 0x7 ),\t/* 7 */\r\n/* 4144 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 4146 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 4148 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 4150 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 4152 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 4154 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 4156 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4158 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4160 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 4162 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 4164 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter backgroundProcessId */\r\n\r\n/* 4166 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 4168 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 4170 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 4172 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 4174 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 4176 */\tNdrFcShort( 0x5a ),\t/* Type Offset=90 */\r\n\r\n\t/* Return value */\r\n\r\n/* 4178 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 4180 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 4182 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetBackgroundProcessReadyEventName */\r\n\r\n/* 4184 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 4186 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 4190 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 4192 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 4194 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 4196 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 4198 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 4200 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 4202 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 4204 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4206 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4208 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 4210 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 4212 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter backgroundProcessId */\r\n\r\n/* 4214 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 4216 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 4218 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 4220 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 4222 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 4224 */\tNdrFcShort( 0x5a ),\t/* Type Offset=90 */\r\n\r\n\t/* Return value */\r\n\r\n/* 4226 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 4228 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 4230 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_Instance */\r\n\r\n/* 4232 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 4234 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 4238 */\tNdrFcShort( 0x9 ),\t/* 9 */\r\n/* 4240 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 4242 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4244 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 4246 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 4248 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 4250 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4252 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4254 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 4256 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 4258 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 4260 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 4262 */\tNdrFcShort( 0x13 ),\t/* Flags:  must size, must free, out, */\r\n/* 4264 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 4266 */\tNdrFcShort( 0x228 ),\t/* Type Offset=552 */\r\n\r\n\t/* Return value */\r\n\r\n/* 4268 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 4270 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 4272 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t\t\t0x0\r\n        }\r\n    };\r\n\r\nstatic const PhoneVoIPApp2EBackEnd_MIDL_TYPE_FORMAT_STRING PhoneVoIPApp2EBackEnd__MIDL_TypeFormatString =\r\n    {\r\n        0,\r\n        {\r\n\t\t\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/*  2 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/*  4 */\tNdrFcLong( 0x905a0fe0 ),\t/* -1873145888 */\r\n/*  8 */\tNdrFcShort( 0xbc53 ),\t/* -17325 */\r\n/* 10 */\tNdrFcShort( 0x11df ),\t/* 4575 */\r\n/* 12 */\t0x8c,\t\t/* 140 */\r\n\t\t\t0x49,\t\t/* 73 */\r\n/* 14 */\t0x0,\t\t/* 0 */\r\n\t\t\t0x1e,\t\t/* 30 */\r\n/* 16 */\t0x4f,\t\t/* 79 */\r\n\t\t\t0xc6,\t\t/* 198 */\r\n/* 18 */\t0x86,\t\t/* 134 */\r\n\t\t\t0xda,\t\t/* 218 */\r\n/* 20 */\t\r\n\t\t\t0x11, 0xc,\t/* FC_RP [alloced_on_stack] [simple_pointer] */\r\n/* 22 */\t0x1,\t\t/* FC_BYTE */\r\n\t\t\t0x5c,\t\t/* FC_PAD */\r\n/* 24 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 26 */\tNdrFcLong( 0xf2035e6a ),\t/* -234660246 */\r\n/* 30 */\tNdrFcShort( 0x8067 ),\t/* -32665 */\r\n/* 32 */\tNdrFcShort( 0x3abb ),\t/* 15035 */\r\n/* 34 */\t0xa7,\t\t/* 167 */\r\n\t\t\t0x95,\t\t/* 149 */\r\n/* 36 */\t0x7b,\t\t/* 123 */\r\n\t\t\t0x33,\t\t/* 51 */\r\n/* 38 */\t0x4c,\t\t/* 76 */\r\n\t\t\t0x67,\t\t/* 103 */\r\n/* 40 */\t0xa2,\t\t/* 162 */\r\n\t\t\t0xed,\t\t/* 237 */\r\n/* 42 */\t\r\n\t\t\t0x11, 0x4,\t/* FC_RP [alloced_on_stack] */\r\n/* 44 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (46) */\r\n/* 46 */\t\r\n\t\t\t0x15,\t\t/* FC_STRUCT */\r\n\t\t\t0x7,\t\t/* 7 */\r\n/* 48 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 50 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 52 */\t\r\n\t\t\t0x11, 0xc,\t/* FC_RP [alloced_on_stack] [simple_pointer] */\r\n/* 54 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x5c,\t\t/* FC_PAD */\r\n/* 56 */\t\r\n\t\t\t0x11, 0xc,\t/* FC_RP [alloced_on_stack] [simple_pointer] */\r\n/* 58 */\t0x6,\t\t/* FC_SHORT */\r\n\t\t\t0x5c,\t\t/* FC_PAD */\r\n/* 60 */\t\r\n\t\t\t0x11, 0x4,\t/* FC_RP [alloced_on_stack] */\r\n/* 62 */\tNdrFcShort( 0x1c ),\t/* Offset= 28 (90) */\r\n/* 64 */\t\r\n\t\t\t0x13, 0x0,\t/* FC_OP */\r\n/* 66 */\tNdrFcShort( 0xe ),\t/* Offset= 14 (80) */\r\n/* 68 */\t\r\n\t\t\t0x1b,\t\t/* FC_CARRAY */\r\n\t\t\t0x1,\t\t/* 1 */\r\n/* 70 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 72 */\t0x9,\t\t/* Corr desc: FC_ULONG */\r\n\t\t\t0x0,\t\t/*  */\r\n/* 74 */\tNdrFcShort( 0xfffc ),\t/* -4 */\r\n/* 76 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 78 */\t0x6,\t\t/* FC_SHORT */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 80 */\t\r\n\t\t\t0x17,\t\t/* FC_CSTRUCT */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 82 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 84 */\tNdrFcShort( 0xfff0 ),\t/* Offset= -16 (68) */\r\n/* 86 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x8,\t\t/* FC_LONG */\r\n/* 88 */\t0x5c,\t\t/* FC_PAD */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 90 */\t0xb4,\t\t/* FC_USER_MARSHAL */\r\n\t\t\t0x83,\t\t/* 131 */\r\n/* 92 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 94 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 96 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 98 */\tNdrFcShort( 0xffde ),\t/* Offset= -34 (64) */\r\n/* 100 */\t\r\n\t\t\t0x12, 0x0,\t/* FC_UP */\r\n/* 102 */\tNdrFcShort( 0xffea ),\t/* Offset= -22 (80) */\r\n/* 104 */\t0xb4,\t\t/* FC_USER_MARSHAL */\r\n\t\t\t0x83,\t\t/* 131 */\r\n/* 106 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 108 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 110 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 112 */\tNdrFcShort( 0xfff4 ),\t/* Offset= -12 (100) */\r\n/* 114 */\t\r\n\t\t\t0x11, 0xc,\t/* FC_RP [alloced_on_stack] [simple_pointer] */\r\n/* 116 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x5c,\t\t/* FC_PAD */\r\n/* 118 */\t\r\n\t\t\t0x11, 0x14,\t/* FC_RP [alloced_on_stack] [pointer_deref] */\r\n/* 120 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (122) */\r\n/* 122 */\t\r\n\t\t\t0x13, 0x0,\t/* FC_OP */\r\n/* 124 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (126) */\r\n/* 126 */\t\r\n\t\t\t0x1b,\t\t/* FC_CARRAY */\r\n\t\t\t0x0,\t\t/* 0 */\r\n/* 128 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 130 */\t0x29,\t\t/* Corr desc:  parameter, FC_ULONG */\r\n\t\t\t0x54,\t\t/* FC_DEREFERENCE */\r\n/* 132 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 134 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 136 */\t0x1,\t\t/* FC_BYTE */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 138 */\t\r\n\t\t\t0x11, 0x0,\t/* FC_RP */\r\n/* 140 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (142) */\r\n/* 142 */\t\r\n\t\t\t0x1b,\t\t/* FC_CARRAY */\r\n\t\t\t0x0,\t\t/* 0 */\r\n/* 144 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 146 */\t0x29,\t\t/* Corr desc:  parameter, FC_ULONG */\r\n\t\t\t0x0,\t\t/*  */\r\n/* 148 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 150 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 152 */\t0x1,\t\t/* FC_BYTE */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 154 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 156 */\tNdrFcLong( 0xf5a3c2ae ),\t/* -173817170 */\r\n/* 160 */\tNdrFcShort( 0xef7b ),\t/* -4229 */\r\n/* 162 */\tNdrFcShort( 0x3de2 ),\t/* 15842 */\r\n/* 164 */\t0x8b,\t\t/* 139 */\r\n\t\t\t0xe,\t\t/* 14 */\r\n/* 166 */\t0x8e,\t\t/* 142 */\r\n\t\t\t0x8b,\t\t/* 139 */\r\n/* 168 */\t0x3c,\t\t/* 60 */\r\n\t\t\t0xd2,\t\t/* 210 */\r\n/* 170 */\t0xd,\t\t/* 13 */\r\n\t\t\t0x9d,\t\t/* 157 */\r\n/* 172 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 174 */\tNdrFcLong( 0x1698b961 ),\t/* 379107681 */\r\n/* 178 */\tNdrFcShort( 0xf90e ),\t/* -1778 */\r\n/* 180 */\tNdrFcShort( 0x30d0 ),\t/* 12496 */\r\n/* 182 */\t0x80,\t\t/* 128 */\r\n\t\t\t0xff,\t\t/* 255 */\r\n/* 184 */\t0x22,\t\t/* 34 */\r\n\t\t\t0xe9,\t\t/* 233 */\r\n/* 186 */\t0x4c,\t\t/* 76 */\r\n\t\t\t0xf6,\t\t/* 246 */\r\n/* 188 */\t0x6d,\t\t/* 109 */\r\n\t\t\t0x7b,\t\t/* 123 */\r\n/* 190 */\t\r\n\t\t\t0x11, 0xc,\t/* FC_RP [alloced_on_stack] [simple_pointer] */\r\n/* 192 */\t0xc,\t\t/* FC_DOUBLE */\r\n\t\t\t0x5c,\t\t/* FC_PAD */\r\n/* 194 */\t\r\n\t\t\t0x1a,\t\t/* FC_BOGUS_STRUCT */\r\n\t\t\t0x7,\t\t/* 7 */\r\n/* 196 */\tNdrFcShort( 0x20 ),\t/* 32 */\r\n/* 198 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 200 */\tNdrFcShort( 0x0 ),\t/* Offset= 0 (200) */\r\n/* 202 */\t0xc,\t\t/* FC_DOUBLE */\r\n\t\t\t0xc,\t\t/* FC_DOUBLE */\r\n/* 204 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x3,\t\t/* FC_SMALL */\r\n/* 206 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x3,\t\t/* FC_SMALL */\r\n/* 208 */\t0x3d,\t\t/* FC_STRUCTPAD1 */\r\n\t\t\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n/* 210 */\t0x0,\t\t/* 0 */\r\n\t\t\tNdrFcShort( 0xff95 ),\t/* Offset= -107 (104) */\r\n\t\t\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n/* 214 */\t0x0,\t\t/* 0 */\r\n\t\t\tNdrFcShort( 0xff91 ),\t/* Offset= -111 (104) */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 218 */\t\r\n\t\t\t0x11, 0x0,\t/* FC_RP */\r\n/* 220 */\tNdrFcShort( 0x1a ),\t/* Offset= 26 (246) */\r\n/* 222 */\t\r\n\t\t\t0x1a,\t\t/* FC_BOGUS_STRUCT */\r\n\t\t\t0x7,\t\t/* 7 */\r\n/* 224 */\tNdrFcShort( 0x18 ),\t/* 24 */\r\n/* 226 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 228 */\tNdrFcShort( 0x0 ),\t/* Offset= 0 (228) */\r\n/* 230 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x6,\t\t/* FC_SHORT */\r\n/* 232 */\t0x3e,\t\t/* FC_STRUCTPAD2 */\r\n\t\t\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n/* 234 */\t0x0,\t\t/* 0 */\r\n\t\t\tNdrFcShort( 0xff7d ),\t/* Offset= -131 (104) */\r\n\t\t\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n/* 238 */\t0x0,\t\t/* 0 */\r\n\t\t\tNdrFcShort( 0xff79 ),\t/* Offset= -135 (104) */\r\n\t\t\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n/* 242 */\t0x0,\t\t/* 0 */\r\n\t\t\tNdrFcShort( 0xff75 ),\t/* Offset= -139 (104) */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 246 */\t\r\n\t\t\t0x21,\t\t/* FC_BOGUS_ARRAY */\r\n\t\t\t0x7,\t\t/* 7 */\r\n/* 248 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 250 */\t0x29,\t\t/* Corr desc:  parameter, FC_ULONG */\r\n\t\t\t0x0,\t\t/*  */\r\n/* 252 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 254 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 256 */\tNdrFcLong( 0xffffffff ),\t/* -1 */\r\n/* 260 */\tNdrFcShort( 0x0 ),\t/* Corr flags:  */\r\n/* 262 */\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n\t\t\t0x0,\t\t/* 0 */\r\n/* 264 */\tNdrFcShort( 0xffd6 ),\t/* Offset= -42 (222) */\r\n/* 266 */\t0x5c,\t\t/* FC_PAD */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 268 */\t\r\n\t\t\t0x1a,\t\t/* FC_BOGUS_STRUCT */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 270 */\tNdrFcShort( 0x14 ),\t/* 20 */\r\n/* 272 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 274 */\tNdrFcShort( 0x0 ),\t/* Offset= 0 (274) */\r\n/* 276 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n/* 278 */\t0x0,\t\t/* 0 */\r\n\t\t\tNdrFcShort( 0xff51 ),\t/* Offset= -175 (104) */\r\n\t\t\t0x6,\t\t/* FC_SHORT */\r\n/* 282 */\t0x3e,\t\t/* FC_STRUCTPAD2 */\r\n\t\t\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n/* 284 */\t0x0,\t\t/* 0 */\r\n\t\t\tNdrFcShort( 0xff4b ),\t/* Offset= -181 (104) */\r\n\t\t\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n/* 288 */\t0x0,\t\t/* 0 */\r\n\t\t\tNdrFcShort( 0xff47 ),\t/* Offset= -185 (104) */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 292 */\t\r\n\t\t\t0x11, 0xc,\t/* FC_RP [alloced_on_stack] [simple_pointer] */\r\n/* 294 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x5c,\t\t/* FC_PAD */\r\n/* 296 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 298 */\tNdrFcLong( 0x39126060 ),\t/* 957505632 */\r\n/* 302 */\tNdrFcShort( 0x292 ),\t/* 658 */\r\n/* 304 */\tNdrFcShort( 0x36d6 ),\t/* 14038 */\r\n/* 306 */\t0xb3,\t\t/* 179 */\r\n\t\t\t0xf8,\t\t/* 248 */\r\n/* 308 */\t0x9a,\t\t/* 154 */\r\n\t\t\t0xc4,\t\t/* 196 */\r\n/* 310 */\t0x15,\t\t/* 21 */\r\n\t\t\t0x6c,\t\t/* 108 */\r\n/* 312 */\t0x65,\t\t/* 101 */\r\n\t\t\t0x1d,\t\t/* 29 */\r\n/* 314 */\t\r\n\t\t\t0x11, 0xc,\t/* FC_RP [alloced_on_stack] [simple_pointer] */\r\n/* 316 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x5c,\t\t/* FC_PAD */\r\n/* 318 */\t\r\n\t\t\t0x11, 0x0,\t/* FC_RP */\r\n/* 320 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (322) */\r\n/* 322 */\t\r\n\t\t\t0x1b,\t\t/* FC_CARRAY */\r\n\t\t\t0x0,\t\t/* 0 */\r\n/* 324 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 326 */\t0x29,\t\t/* Corr desc:  parameter, FC_ULONG */\r\n\t\t\t0x0,\t\t/*  */\r\n/* 328 */\tNdrFcShort( 0x40 ),\t/* ARM Stack size/offset = 64 */\r\n/* 330 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 332 */\t0x1,\t\t/* FC_BYTE */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 334 */\t\r\n\t\t\t0x11, 0x0,\t/* FC_RP */\r\n/* 336 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (338) */\r\n/* 338 */\t\r\n\t\t\t0x21,\t\t/* FC_BOGUS_ARRAY */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 340 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 342 */\t0x29,\t\t/* Corr desc:  parameter, FC_ULONG */\r\n\t\t\t0x0,\t\t/*  */\r\n/* 344 */\tNdrFcShort( 0x4c ),\t/* ARM Stack size/offset = 76 */\r\n/* 346 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 348 */\tNdrFcLong( 0xffffffff ),\t/* -1 */\r\n/* 352 */\tNdrFcShort( 0x0 ),\t/* Corr flags:  */\r\n/* 354 */\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n\t\t\t0x0,\t\t/* 0 */\r\n/* 356 */\tNdrFcShort( 0xff04 ),\t/* Offset= -252 (104) */\r\n/* 358 */\t0x5c,\t\t/* FC_PAD */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 360 */\t\r\n\t\t\t0x11, 0x0,\t/* FC_RP */\r\n/* 362 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (364) */\r\n/* 364 */\t\r\n\t\t\t0x21,\t\t/* FC_BOGUS_ARRAY */\r\n\t\t\t0x7,\t\t/* 7 */\r\n/* 366 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 368 */\t0x29,\t\t/* Corr desc:  parameter, FC_ULONG */\r\n\t\t\t0x0,\t\t/*  */\r\n/* 370 */\tNdrFcShort( 0x54 ),\t/* ARM Stack size/offset = 84 */\r\n/* 372 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 374 */\tNdrFcLong( 0xffffffff ),\t/* -1 */\r\n/* 378 */\tNdrFcShort( 0x0 ),\t/* Corr flags:  */\r\n/* 380 */\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n\t\t\t0x0,\t\t/* 0 */\r\n/* 382 */\tNdrFcShort( 0xff60 ),\t/* Offset= -160 (222) */\r\n/* 384 */\t0x5c,\t\t/* FC_PAD */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 386 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 388 */\tNdrFcLong( 0x91ddee70 ),\t/* -1847726480 */\r\n/* 392 */\tNdrFcShort( 0xaa90 ),\t/* -21872 */\r\n/* 394 */\tNdrFcShort( 0x38e7 ),\t/* 14567 */\r\n/* 396 */\t0xb4,\t\t/* 180 */\r\n\t\t\t0xe5,\t\t/* 229 */\r\n/* 398 */\t0xf7,\t\t/* 247 */\r\n\t\t\t0x95,\t\t/* 149 */\r\n/* 400 */\t0x95,\t\t/* 149 */\r\n\t\t\t0x69,\t\t/* 105 */\r\n/* 402 */\t0xcb,\t\t/* 203 */\r\n\t\t\t0x5c,\t\t/* 92 */\r\n/* 404 */\t\r\n\t\t\t0x11, 0x14,\t/* FC_RP [alloced_on_stack] [pointer_deref] */\r\n/* 406 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (408) */\r\n/* 408 */\t\r\n\t\t\t0x13, 0x0,\t/* FC_OP */\r\n/* 410 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (412) */\r\n/* 412 */\t\r\n\t\t\t0x21,\t\t/* FC_BOGUS_ARRAY */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 414 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 416 */\t0x29,\t\t/* Corr desc:  parameter, FC_ULONG */\r\n\t\t\t0x54,\t\t/* FC_DEREFERENCE */\r\n/* 418 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 420 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 422 */\tNdrFcLong( 0xffffffff ),\t/* -1 */\r\n/* 426 */\tNdrFcShort( 0x0 ),\t/* Corr flags:  */\r\n/* 428 */\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n\t\t\t0x0,\t\t/* 0 */\r\n/* 430 */\tNdrFcShort( 0xfeac ),\t/* Offset= -340 (90) */\r\n/* 432 */\t0x5c,\t\t/* FC_PAD */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 434 */\t\r\n\t\t\t0x11, 0x0,\t/* FC_RP */\r\n/* 436 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (438) */\r\n/* 438 */\t\r\n\t\t\t0x21,\t\t/* FC_BOGUS_ARRAY */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 440 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 442 */\t0x29,\t\t/* Corr desc:  parameter, FC_ULONG */\r\n\t\t\t0x0,\t\t/*  */\r\n/* 444 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 446 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 448 */\tNdrFcLong( 0xffffffff ),\t/* -1 */\r\n/* 452 */\tNdrFcShort( 0x0 ),\t/* Corr flags:  */\r\n/* 454 */\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n\t\t\t0x0,\t\t/* 0 */\r\n/* 456 */\tNdrFcShort( 0xfea0 ),\t/* Offset= -352 (104) */\r\n/* 458 */\t0x5c,\t\t/* FC_PAD */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 460 */\t\r\n\t\t\t0x11, 0x10,\t/* FC_RP [pointer_deref] */\r\n/* 462 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (464) */\r\n/* 464 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 466 */\tNdrFcLong( 0x6b50718 ),\t/* 112527128 */\r\n/* 470 */\tNdrFcShort( 0x3528 ),\t/* 13608 */\r\n/* 472 */\tNdrFcShort( 0x3b66 ),\t/* 15206 */\r\n/* 474 */\t0xbe,\t\t/* 190 */\r\n\t\t\t0x76,\t\t/* 118 */\r\n/* 476 */\t0xe1,\t\t/* 225 */\r\n\t\t\t0x83,\t\t/* 131 */\r\n/* 478 */\t0xaa,\t\t/* 170 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 480 */\t0xd4,\t\t/* 212 */\r\n\t\t\t0xa5,\t\t/* 165 */\r\n/* 482 */\t\r\n\t\t\t0x11, 0x10,\t/* FC_RP [pointer_deref] */\r\n/* 484 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (486) */\r\n/* 486 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 488 */\tNdrFcLong( 0x6928ca7b ),\t/* 1764280955 */\r\n/* 492 */\tNdrFcShort( 0x166d ),\t/* 5741 */\r\n/* 494 */\tNdrFcShort( 0x3b37 ),\t/* 15159 */\r\n/* 496 */\t0x90,\t\t/* 144 */\r\n\t\t\t0x10,\t\t/* 16 */\r\n/* 498 */\t0xfb,\t\t/* 251 */\r\n\t\t\t0xab,\t\t/* 171 */\r\n/* 500 */\t0x2c,\t\t/* 44 */\r\n\t\t\t0x7e,\t\t/* 126 */\r\n/* 502 */\t0x92,\t\t/* 146 */\r\n\t\t\t0xb0,\t\t/* 176 */\r\n/* 504 */\t\r\n\t\t\t0x11, 0x10,\t/* FC_RP [pointer_deref] */\r\n/* 506 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (508) */\r\n/* 508 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 510 */\tNdrFcLong( 0x4fa5f2c4 ),\t/* 1336275652 */\r\n/* 514 */\tNdrFcShort( 0x8612 ),\t/* -31214 */\r\n/* 516 */\tNdrFcShort( 0x35c9 ),\t/* 13769 */\r\n/* 518 */\t0xbf,\t\t/* 191 */\r\n\t\t\t0xaa,\t\t/* 170 */\r\n/* 520 */\t0x96,\t\t/* 150 */\r\n\t\t\t0x7c,\t\t/* 124 */\r\n/* 522 */\t0x2c,\t\t/* 44 */\r\n\t\t\t0x81,\t\t/* 129 */\r\n/* 524 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0xa7,\t\t/* 167 */\r\n/* 526 */\t\r\n\t\t\t0x11, 0x10,\t/* FC_RP [pointer_deref] */\r\n/* 528 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (530) */\r\n/* 530 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 532 */\tNdrFcLong( 0x8313dbea ),\t/* -2095850518 */\r\n/* 536 */\tNdrFcShort( 0xfd3b ),\t/* -709 */\r\n/* 538 */\tNdrFcShort( 0x3071 ),\t/* 12401 */\r\n/* 540 */\t0x80,\t\t/* 128 */\r\n\t\t\t0x35,\t\t/* 53 */\r\n/* 542 */\t0x7b,\t\t/* 123 */\r\n\t\t\t0x61,\t\t/* 97 */\r\n/* 544 */\t0x16,\t\t/* 22 */\r\n\t\t\t0x58,\t\t/* 88 */\r\n/* 546 */\t0xda,\t\t/* 218 */\r\n\t\t\t0xd8,\t\t/* 216 */\r\n/* 548 */\t\r\n\t\t\t0x11, 0x10,\t/* FC_RP [pointer_deref] */\r\n/* 550 */\tNdrFcShort( 0xfe74 ),\t/* Offset= -396 (154) */\r\n/* 552 */\t\r\n\t\t\t0x11, 0x10,\t/* FC_RP [pointer_deref] */\r\n/* 554 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (556) */\r\n/* 556 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 558 */\tNdrFcLong( 0xc8afe1a8 ),\t/* -927997528 */\r\n/* 562 */\tNdrFcShort( 0x92fc ),\t/* -27908 */\r\n/* 564 */\tNdrFcShort( 0x3783 ),\t/* 14211 */\r\n/* 566 */\t0x95,\t\t/* 149 */\r\n\t\t\t0x20,\t\t/* 32 */\r\n/* 568 */\t0xd6,\t\t/* 214 */\r\n\t\t\t0xbb,\t\t/* 187 */\r\n/* 570 */\t0xc5,\t\t/* 197 */\r\n\t\t\t0x7,\t\t/* 7 */\r\n/* 572 */\t0xb2,\t\t/* 178 */\r\n\t\t\t0x4a,\t\t/* 74 */\r\n\r\n\t\t\t0x0\r\n        }\r\n    };\r\n\r\nstatic const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[ WIRE_MARSHAL_TABLE_SIZE ] = \r\n        {\r\n            \r\n            {\r\n            HSTRING_UserSize\r\n            ,HSTRING_UserMarshal\r\n            ,HSTRING_UserUnmarshal\r\n            ,HSTRING_UserFree\r\n            }\r\n\r\n        };\r\n\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0000, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: IUnknown, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler, ver. 0.0,\r\n   GUID={0xF2035E6A,0x8067,0x3ABB,{0xA7,0x95,0x7B,0x33,0x4C,0x67,0xA2,0xED}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_FormatStringOffsetTable[] =\r\n    {\r\n    0\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(4) ___x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandlerProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler::Invoke */\r\n};\r\n\r\nconst CInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandlerStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler_ServerInfo,\r\n    4,\r\n    0, /* pure interpreted */\r\n    CStdStubBuffer_METHODS\r\n};\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler, ver. 0.0,\r\n   GUID={0x1698B961,0xF90E,0x30D0,{0x80,0xFF,0x22,0xE9,0x4C,0xF6,0x6D,0x7B}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_FormatStringOffsetTable[] =\r\n    {\r\n    58\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(4) ___x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandlerProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler::Invoke */\r\n};\r\n\r\nconst CInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandlerStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler_ServerInfo,\r\n    4,\r\n    0, /* pure interpreted */\r\n    CStdStubBuffer_METHODS\r\n};\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback, ver. 0.0,\r\n   GUID={0x91DDEE70,0xAA90,0x38E7,{0xB4,0xE5,0xF7,0x95,0x95,0x69,0xCB,0x5C}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_FormatStringOffsetTable[] =\r\n    {\r\n    100\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(4) ___x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallbackProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback::Invoke */\r\n};\r\n\r\nconst CInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallbackStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback_ServerInfo,\r\n    4,\r\n    0, /* pure interpreted */\r\n    CStdStubBuffer_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0003, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: IInspectable, ver. 0.0,\r\n   GUID={0xAF86E2E0,0xB12D,0x4c6a,{0x9C,0x5A,0xD7,0xAA,0x65,0x10,0x1E,0x90}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals, ver. 0.0,\r\n   GUID={0xF5A3C2AE,0xEF7B,0x3DE2,{0x8B,0x0E,0x8E,0x8B,0x3C,0xD2,0x0D,0x9D}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    158,\r\n    206,\r\n    272,\r\n    320,\r\n    364,\r\n    412\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(12) ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtualsProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals::WriteAudio */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals::WriteVideo */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals::add_AudioMessageReceived */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals::remove_AudioMessageReceived */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals::add_VideoMessageReceived */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals::remove_VideoMessageReceived */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtualsStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_ServerInfo,\r\n    12,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0004, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals, ver. 0.0,\r\n   GUID={0x044DEA28,0x0E8D,0x3A16,{0xA2,0xC1,0xBE,0x95,0xC0,0xBE,0xD5,0xE5}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    0\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(6) ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtualsProxyVtbl = \r\n{\r\n    0,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtualsStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_ServerInfo,\r\n    6,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0005, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals, ver. 0.0,\r\n   GUID={0x0CC88A54,0x89AF,0x3CC6,{0x9B,0x95,0xF8,0xF2,0x24,0x28,0xAB,0xED}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    456,\r\n    498,\r\n    542,\r\n    584,\r\n    626,\r\n    668,\r\n    710,\r\n    752,\r\n    794,\r\n    842\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(16) ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtualsProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals::get_id */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals::put_id */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals::get_port */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals::put_port */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals::get_ipv4 */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals::put_ipv4 */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals::get_ipv6 */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals::put_ipv6 */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals::get_peerTag */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals::put_peerTag */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtualsStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_ServerInfo,\r\n    16,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0006, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener, ver. 0.0,\r\n   GUID={0x39126060,0x0292,0x36D6,{0xB3,0xF8,0x9A,0xC4,0x15,0x6C,0x65,0x1D}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    890,\r\n    932,\r\n    974,\r\n    1016,\r\n    1058,\r\n    1100\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(12) ___x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListenerProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener::OnSignalBarsChanged */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener::OnCallStateChanged */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener::OnCallStatusChanged */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener::OnCallAudioRouteChanged */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener::OnMediaOperationsChanged */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener::OnCameraLocationChanged */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListenerStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_ServerInfo,\r\n    12,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0007, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals, ver. 0.0,\r\n   GUID={0x8313DBEA,0xFD3B,0x3071,{0x80,0x35,0x7B,0x61,0x16,0x58,0xDA,0xD8}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    1142,\r\n    932,\r\n    1184,\r\n    1218,\r\n    1252,\r\n    412\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(12) ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtualsProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals::SetTransport */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals::Start */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals::Stop */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals::ToggleCamera */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals::add_CameraLocationChanged */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals::remove_CameraLocationChanged */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtualsStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_ServerInfo,\r\n    12,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0008, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals, ver. 0.0,\r\n   GUID={0x64B31D5B,0x1A27,0x37A8,{0xBC,0xBC,0xC0,0xBB,0xD5,0x31,0x4C,0x79}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    0\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(6) ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtualsProxyVtbl = \r\n{\r\n    0,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtualsStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_ServerInfo,\r\n    6,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0009, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig, ver. 0.0,\r\n   GUID={0xA9F22E31,0xD4E1,0x3940,{0xBA,0x20,0xDC,0xB2,0x09,0x73,0xB0,0x9F}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    1300,\r\n    1342,\r\n    1386,\r\n    1428\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(10) ___x_ABI_CPhoneVoIPApp_CBackEnd_CIConfigProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig::get_InitTimeout */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig::put_InitTimeout */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig::get_RecvTimeout */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig::put_RecvTimeout */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_CIConfigStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_ServerInfo,\r\n    10,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0010, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals, ver. 0.0,\r\n   GUID={0x06B50718,0x3528,0x3B66,{0xBE,0x76,0xE1,0x83,0xAA,0x80,0xD4,0xA5}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    1472,\r\n    1506,\r\n    1184,\r\n    1218,\r\n    1540,\r\n    1574,\r\n    1622,\r\n    1678,\r\n    1740,\r\n    1786,\r\n    1820,\r\n    1854,\r\n    1896,\r\n    1938,\r\n    1980,\r\n    2022,\r\n    2064,\r\n    2106,\r\n    2148,\r\n    2190,\r\n    2232,\r\n    2274,\r\n    2346,\r\n    2484,\r\n    2570,\r\n    2612,\r\n    2654,\r\n    2696,\r\n    2738,\r\n    2780,\r\n    2822,\r\n    2864,\r\n    2906,\r\n    2948,\r\n    2990,\r\n    3032,\r\n    3074,\r\n    3116,\r\n    3158,\r\n    3200,\r\n    3242,\r\n    3284,\r\n    3326,\r\n    3368,\r\n    3410,\r\n    3454,\r\n    3502,\r\n    3544\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(54) ___x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtualsProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::HandleUpdatePhoneCall */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::StartMTProtoUpdater */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::StopMTProtoUpdater */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::CreateVoIPControllerWrapper */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::DeleteVoIPControllerWrapper */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::SetConfig */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::SetEncryptionKey */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::SetPublicEndpoints */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::SetProxy */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::Start */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::Connect */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::SetMicMute */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::SwitchSpeaker */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::UpdateServerConfig */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::GetPreferredRelayID */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::GetLastError */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::GetDebugLog */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::GetDebugString */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::GetVersion */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::GetSignalBarsCount */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::SetStatusCallback */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::InitiateOutgoingCall2 */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::InitiateOutgoingCall1 */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::OnIncomingCallReceived */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::HoldCall */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::ResumeCall */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::EndCall */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::ToggleCamera */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_CallStatus */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_MediaOperations */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_IsShowingVideo */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::put_IsShowingVideo */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_IsRenderingVideo */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::put_IsRenderingVideo */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_CameraLocation */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_AvailableAudioRoutes */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_AudioRoute */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::put_AudioRoute */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_OtherPartyName */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_OtherPartyId */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_CallStartTime */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_CallId */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_CallAccessHash */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_AcceptedCallId */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::put_AcceptedCallId */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_Key */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_Outgoing */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals::get_Emojis */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtualsStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_ServerInfo,\r\n    54,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0011, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer, ver. 0.0,\r\n   GUID={0x6928CA7B,0x166D,0x3B37,{0x90,0x10,0xFB,0xAB,0x2C,0x7E,0x92,0xB0}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    1472,\r\n    1506\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(8) ___x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRendererProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer::Start */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer::Stop */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRendererStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_ServerInfo,\r\n    8,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0012, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater, ver. 0.0,\r\n   GUID={0x4FA5F2C4,0x8612,0x35C9,{0xBF,0xAA,0x96,0x7C,0x2C,0x81,0x9F,0xA7}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    3592,\r\n    1506,\r\n    3648,\r\n    3700\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(10) ___x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdaterProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater::Start */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater::Stop */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater::DiscardCall */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater::ReceivedCall */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdaterStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_ServerInfo,\r\n    10,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0013, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals, ver. 0.0,\r\n   GUID={0xC8AFE1A8,0x92FC,0x3783,{0x95,0x20,0xD6,0xBB,0xC5,0x07,0xB2,0x4A}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    3752,\r\n    1506,\r\n    3800,\r\n    3842,\r\n    3884,\r\n    3926,\r\n    3968,\r\n    4010,\r\n    4052\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(15) ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtualsProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals::StartServer */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals::DoPeriodicKeepAlive */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals::get_CallController */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals::get_VideoRenderer */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals::put_VideoRenderer */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals::get_MTProtoUpdater */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals::put_MTProtoUpdater */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals::get_CaptureController */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals::get_TransportController */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtualsStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_ServerInfo,\r\n    15,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0014, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics, ver. 0.0,\r\n   GUID={0x2C1E9C37,0x6827,0x38F7,{0x85,0x7C,0x02,0x16,0x42,0xCA,0x42,0x8B}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    4094,\r\n    4136,\r\n    4184,\r\n    4232\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(10) ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStaticsProxyVtbl = \r\n{\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_ProxyInfo,\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics::GetCurrentProcessId */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics::GetUiDisconnectedEventName */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics::GetBackgroundProcessReadyEventName */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics::get_Instance */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStaticsStubVtbl =\r\n{\r\n    &IID___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_ServerInfo,\r\n    10,\r\n    &__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_PhoneVoIPApp2EBackEnd_0000_0015, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\nstatic const MIDL_STUB_DESC Object_StubDesc = \r\n    {\r\n    0,\r\n    NdrOleAllocate,\r\n    NdrOleFree,\r\n    0,\r\n    0,\r\n    0,\r\n    0,\r\n    0,\r\n    PhoneVoIPApp2EBackEnd__MIDL_TypeFormatString.Format,\r\n    1, /* -error bounds_check flag */\r\n    0x50002, /* Ndr library version */\r\n    0,\r\n    0x800025b, /* MIDL Version 8.0.603 */\r\n    0,\r\n    UserMarshalRoutines,\r\n    0,  /* notify & notify_flag routine table */\r\n    0x1, /* MIDL flag */\r\n    0, /* cs routines */\r\n    0,   /* proxy/server info */\r\n    0\r\n    };\r\n\r\nconst CInterfaceProxyVtbl * const _PhoneVoIPApp2EBackEnd_ProxyVtblList[] = \r\n{\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtualsProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtualsProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CIConfigProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStaticsProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtualsProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtualsProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListenerProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandlerProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandlerProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallbackProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRendererProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtualsProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtualsProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdaterProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtualsProxyVtbl,\r\n    0\r\n};\r\n\r\nconst CInterfaceStubVtbl * const _PhoneVoIPApp2EBackEnd_StubVtblList[] = \r\n{\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtualsStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtualsStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CIConfigStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStaticsStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtualsStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtualsStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListenerStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandlerStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandlerStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallbackStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRendererStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtualsStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtualsStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdaterStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtualsStubVtbl,\r\n    0\r\n};\r\n\r\nPCInterfaceName const _PhoneVoIPApp2EBackEnd_InterfaceNamesList[] = \r\n{\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_C____ICallControllerPublicNonVirtuals\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportProtectedNonVirtuals\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_CIConfig\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsStatics\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_C____IEndpointPublicNonVirtuals\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCaptureProtectedNonVirtuals\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_CICallControllerStatusListener\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_CICameraLocationChangedEventHandler\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_CIMessageReceivedEventHandler\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_CIIncomingCallDialogDismissedCallback\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_CIVideoRenderer\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_C____IGlobalsPublicNonVirtuals\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndTransportPublicNonVirtuals\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_CIMTProtoUpdater\",\r\n    \"__x_ABI_CPhoneVoIPApp_CBackEnd_C____IBackEndCapturePublicNonVirtuals\",\r\n    0\r\n};\r\n\r\nconst IID *  const _PhoneVoIPApp2EBackEnd_BaseIIDList[] = \r\n{\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    0,\r\n    0,\r\n    0,\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    0\r\n};\r\n\r\n\r\n#define _PhoneVoIPApp2EBackEnd_CHECK_IID(n)\tIID_GENERIC_CHECK_IID( _PhoneVoIPApp2EBackEnd, pIID, n)\r\n\r\nint __stdcall _PhoneVoIPApp2EBackEnd_IID_Lookup( const IID * pIID, int * pIndex )\r\n{\r\n    IID_BS_LOOKUP_SETUP\r\n\r\n    IID_BS_LOOKUP_INITIAL_TEST( _PhoneVoIPApp2EBackEnd, 15, 8 )\r\n    IID_BS_LOOKUP_NEXT_TEST( _PhoneVoIPApp2EBackEnd, 4 )\r\n    IID_BS_LOOKUP_NEXT_TEST( _PhoneVoIPApp2EBackEnd, 2 )\r\n    IID_BS_LOOKUP_NEXT_TEST( _PhoneVoIPApp2EBackEnd, 1 )\r\n    IID_BS_LOOKUP_RETURN_RESULT( _PhoneVoIPApp2EBackEnd, 15, *pIndex )\r\n    \r\n}\r\n\r\nconst ExtendedProxyFileInfo PhoneVoIPApp2EBackEnd_ProxyFileInfo = \r\n{\r\n    (PCInterfaceProxyVtblList *) & _PhoneVoIPApp2EBackEnd_ProxyVtblList,\r\n    (PCInterfaceStubVtblList *) & _PhoneVoIPApp2EBackEnd_StubVtblList,\r\n    (const PCInterfaceName * ) & _PhoneVoIPApp2EBackEnd_InterfaceNamesList,\r\n    (const IID ** ) & _PhoneVoIPApp2EBackEnd_BaseIIDList,\r\n    & _PhoneVoIPApp2EBackEnd_IID_Lookup, \r\n    15,\r\n    2,\r\n    0, /* table of [async_uuid] interfaces */\r\n    0, /* Filler1 */\r\n    0, /* Filler2 */\r\n    0  /* Filler3 */\r\n};\r\n#if _MSC_VER >= 1200\r\n#pragma warning(pop)\r\n#endif\r\n\r\n\r\n#endif /* if defined(_ARM_) */\r\n\r\n"
  },
  {
    "path": "BackEndProxyStub/dlldata.c",
    "content": "/*********************************************************\r\n   DllData file -- generated by MIDL compiler \r\n\r\n        DO NOT ALTER THIS FILE\r\n\r\n   This file is regenerated by MIDL on every IDL file compile.\r\n\r\n   To completely reconstruct this file, delete it and rerun MIDL\r\n   on all the IDL files in this DLL, specifying this file for the\r\n   /dlldata command line option\r\n\r\n*********************************************************/\r\n\r\n#define PROXY_DELEGATION\r\n\r\n#include <rpcproxy.h>\r\n\r\n#ifdef __cplusplus\r\nextern \"C\"   {\r\n#endif\r\n\r\nEXTERN_PROXY_FILE( PhoneVoIPApp2EBackEnd )\r\nEXTERN_PROXY_FILE( PhoneVoIPApp2EBackEnd2EOutOfProcess )\r\n\r\n\r\nPROXYFILE_LIST_START\r\n/* Start of list */\r\n  REFERENCE_PROXY_FILE( PhoneVoIPApp2EBackEnd ),\r\n  REFERENCE_PROXY_FILE( PhoneVoIPApp2EBackEnd2EOutOfProcess ),\r\n/* End of list */\r\nPROXYFILE_LIST_END\r\n\r\n\r\nDLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )\r\n\r\n#ifdef __cplusplus\r\n}  /*extern \"C\" */\r\n#endif\r\n\r\n/* end of generated dlldata file */\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/App.xaml",
    "content": "﻿<Application \r\n    x:Class=\"EmojiPanel.App\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"       \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\">\r\n\r\n    <!--Application Resources-->\r\n    <Application.Resources>\r\n    </Application.Resources>\r\n\r\n    <Application.ApplicationLifetimeObjects>\r\n        <!--Required object that handles lifetime events for the application-->\r\n        <shell:PhoneApplicationService \r\n            Launching=\"Application_Launching\" Closing=\"Application_Closing\" \r\n            Activated=\"Application_Activated\" Deactivated=\"Application_Deactivated\"/>\r\n    </Application.ApplicationLifetimeObjects>\r\n\r\n</Application>"
  },
  {
    "path": "EmojiPanel/EmojiPanel/App.xaml.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing System.Windows.Shapes;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace EmojiPanel\r\n{\r\n    public partial class App : Application\r\n    {\r\n        /// <summary>\r\n        /// Provides easy access to the root frame of the Phone Application.\r\n        /// </summary>\r\n        /// <returns>The root frame of the Phone Application.</returns>\r\n        public PhoneApplicationFrame RootFrame { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Constructor for the Application object.\r\n        /// </summary>\r\n        public App()\r\n        {\r\n            // Global handler for uncaught exceptions. \r\n            UnhandledException += Application_UnhandledException;\r\n\r\n            // Standard Silverlight initialization\r\n            InitializeComponent();\r\n\r\n            // Phone-specific initialization\r\n            InitializePhoneApplication();\r\n\r\n            // Show graphics profiling information while debugging.\r\n            if (Debugger.IsAttached)\r\n            {\r\n                // Display the current frame rate counters.\r\n                Current.Host.Settings.EnableFrameRateCounter = true;\r\n\r\n                // Show the areas of the app that are being redrawn in each frame.\r\n                //Application.Current.Host.Settings.EnableRedrawRegions = true;\r\n\r\n                // Enable non-production analysis visualization mode, \r\n                // which shows areas of a page that are handed off to GPU with a colored overlay.\r\n                //Application.Current.Host.Settings.EnableCacheVisualization = true;\r\n\r\n                // Disable the application idle detection by setting the UserIdleDetectionMode property of the\r\n                // application's PhoneApplicationService object to Disabled.\r\n                // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run\r\n                // and consume battery power when the user is not using the phone.\r\n                PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;\r\n            }\r\n\r\n        }\r\n\r\n        // Code to execute when the application is launching (eg, from Start)\r\n        // This code will not execute when the application is reactivated\r\n        private void Application_Launching(object sender, LaunchingEventArgs e)\r\n        {\r\n        }\r\n\r\n        // Code to execute when the application is activated (brought to foreground)\r\n        // This code will not execute when the application is first launched\r\n        private void Application_Activated(object sender, ActivatedEventArgs e)\r\n        {\r\n        }\r\n\r\n        // Code to execute when the application is deactivated (sent to background)\r\n        // This code will not execute when the application is closing\r\n        private void Application_Deactivated(object sender, DeactivatedEventArgs e)\r\n        {\r\n        }\r\n\r\n        // Code to execute when the application is closing (eg, user hit Back)\r\n        // This code will not execute when the application is deactivated\r\n        private void Application_Closing(object sender, ClosingEventArgs e)\r\n        {\r\n        }\r\n\r\n        // Code to execute if a navigation fails\r\n        private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)\r\n        {\r\n            if (Debugger.IsAttached)\r\n            {\r\n                // A navigation has failed; break into the debugger\r\n                Debugger.Break();\r\n            }\r\n        }\r\n\r\n        // Code to execute on Unhandled Exceptions\r\n        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)\r\n        {\r\n            if (Debugger.IsAttached)\r\n            {\r\n                // An unhandled exception has occurred; break into the debugger\r\n                Debugger.Break();\r\n            }\r\n        }\r\n\r\n        #region Phone application initialization\r\n\r\n        // Avoid double-initialization\r\n        private bool phoneApplicationInitialized = false;\r\n\r\n        // Do not add any additional code to this method\r\n        private void InitializePhoneApplication()\r\n        {\r\n            if (phoneApplicationInitialized)\r\n                return;\r\n\r\n            // Create the frame but don't set it as RootVisual yet; this allows the splash\r\n            // screen to remain active until the application is ready to render.\r\n            RootFrame = new PhoneApplicationFrame();\r\n            RootFrame.Navigated += CompleteInitializePhoneApplication;\r\n\r\n            // Handle navigation failures\r\n            RootFrame.NavigationFailed += RootFrame_NavigationFailed;\r\n\r\n            // Ensure we don't initialize again\r\n            phoneApplicationInitialized = true;\r\n        }\r\n\r\n        // Do not add any additional code to this method\r\n        private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)\r\n        {\r\n            // Set the root visual to allow the application to render\r\n            if (RootVisual != RootFrame)\r\n                RootVisual = RootFrame;\r\n\r\n            // Remove this handler since it is no longer needed\r\n            RootFrame.Navigated -= CompleteInitializePhoneApplication;\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Controls/Emoji/EmojiControl.xaml",
    "content": "﻿<UserControl x:Class=\"EmojiPanel.Controls.Emoji.EmojiControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:virtualizedView=\"clr-namespace:Telegram.Controls.VirtualizedView\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\" \r\n    VerticalAlignment=\"Bottom\">\r\n    <UserControl.Resources>\r\n        <Style x:Key=\"CategoryButtonStyle\" TargetType=\"Button\">\r\n            <Setter Property=\"Background\" Value=\"#474747\"></Setter>\r\n            <Setter Property=\"Margin\" Value=\"3 0 3 0\"></Setter>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid x:Name=\"ContentGrid\" Background=\"{TemplateBinding Background}\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ContentGrid\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n\r\n                            <ContentControl x:Name=\"ContentContainer\"\r\n                                            ContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n                                            Content=\"{TemplateBinding Content}\" />\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"RepeatButtonStyle\" TargetType=\"RepeatButton\">\r\n            <Setter Property=\"Background\" Value=\"#474747\"></Setter>\r\n            <Setter Property=\"Margin\" Value=\"3 0 3 0\"></Setter>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"RepeatButton\">\r\n                        <Grid x:Name=\"ContentGrid\" Background=\"{TemplateBinding Background}\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ContentGrid\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n\r\n                            <ContentControl x:Name=\"ContentContainer\"\r\n                                            ContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n                                            Content=\"{TemplateBinding Content}\" />\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"EmojiContainer\"\r\n          Visibility=\"Visible\">\r\n        <Grid Background=\"{StaticResource PhoneChromeBrush}\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"*\" />\r\n                <RowDefinition Height=\"Auto\" />\r\n            </Grid.RowDefinitions>\r\n            \r\n            <ProgressBar x:Name=\"LoadingProgressBar\" IsIndeterminate=\"True\"/>\r\n\r\n            <ScrollViewer Grid.Row=\"0\" Margin=\"0\" Padding=\"0\" x:Name=\"CSV\">\r\n                <virtualizedView:MyVirtualizingPanel x:Name=\"VirtPanel\" Margin=\"0 3 0 0\" />\r\n            </ScrollViewer>\r\n\r\n            <Grid x:Name=\"ButtonsGrid\"\r\n                  Grid.Row=\"1\" \r\n                  Height=\"78\"\r\n                  Margin=\"0 6 0 0\"\r\n                  Background=\"{StaticResource PhoneChromeBrush}\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                </Grid.ColumnDefinitions>\r\n                \r\n                <!-- Buttons created code behind -->\r\n            </Grid>\r\n        </Grid>\r\n\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Controls/Emoji/EmojiControl.xaml.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Reflection;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Shapes;\r\nusing EmojiPanel.Controls.Utilites;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Controls.VirtualizedView;\r\n\r\nnamespace EmojiPanel.Controls.Emoji\r\n{\r\n    public partial class EmojiControl\r\n    {\r\n        private List<VListItemBase> _category1Sprites;\r\n        private List<VListItemBase> _category2Sprites;\r\n        private List<VListItemBase> _category3Sprites;\r\n        private List<VListItemBase> _category4Sprites;\r\n        private List<VListItemBase> _category5Sprites;\r\n\r\n        public EventHandler<bool> IsOpenedChanged = delegate { };\r\n\r\n        public TextBox TextBoxTarget { get; set; }\r\n\r\n        private const int AlbumOrientationHeight = 328;\r\n        private const int PortraitOrientationHeight = 408;\r\n\r\n        private bool _isOpen;\r\n        private bool _isPortrait = true;\r\n        private bool _isTextBoxTargetFocused;\r\n        private bool _isBlocked; // Block IsOpen during animation\r\n        private int _currentCategory;\r\n        private bool _wasRendered;\r\n        private readonly TranslateTransform _frameTransform;\r\n        private static EmojiControl _instance;\r\n\r\n        public static EmojiControl GetInstance()\r\n        {\r\n            return _instance ?? (_instance = new EmojiControl());\r\n        }\r\n\r\n        public static readonly DependencyProperty RootFrameTransformProperty = DependencyProperty.Register(\r\n                \"RootFrameTransform\",\r\n                typeof(double),\r\n                typeof(EmojiControl),\r\n                new PropertyMetadata(OnRootFrameTransformChanged));\r\n\r\n        public EmojiControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var frame = (Frame)Application.Current.RootVisual;\r\n            _frameTransform = ((TranslateTransform)((TransformGroup)frame.RenderTransform).Children[0]);\r\n            var binding = new Binding(\"Y\")\r\n            {\r\n                Source = _frameTransform\r\n            };\r\n            SetBinding(RootFrameTransformProperty, binding);\r\n\r\n            VirtPanel.InitializeWithScrollViewer(CSV);\r\n            VirtPanel.ScrollPositionChanged += VirtPanelOnScrollPositionChanged;\r\n            SizeChanged += OnSizeChanged;\r\n            OnSizeChanged(null, null);\r\n\r\n            LoadButtons();\r\n            CurrentCategory = 0;\r\n\r\n\r\n        }\r\n\r\n        public void BindTextBox(TextBox textBox)\r\n        {\r\n            TextBoxTarget = textBox;\r\n            textBox.GotFocus += TextBoxOnGotFocus;\r\n            textBox.LostFocus += TextBoxOnLostFocus;\r\n        }\r\n\r\n        public void UnbindTextBox()\r\n        {\r\n            TextBoxTarget.GotFocus -= TextBoxOnGotFocus;\r\n            TextBoxTarget.LostFocus -= TextBoxOnLostFocus;\r\n            TextBoxTarget = null;\r\n        }\r\n\r\n        public bool IsOpen\r\n        {\r\n            get\r\n            {\r\n                return !_isTextBoxTargetFocused && _isOpen;\r\n            }\r\n            set\r\n            {\r\n                // Dont hide EmojiControl when keyboard is shown (or to be shown)\r\n                if (!_isTextBoxTargetFocused && _isOpen == value || _isBlocked) return;\r\n\r\n                if (value) Open();\r\n                else Hide();\r\n                IsOpenedChanged(null, value);\r\n            }\r\n        }\r\n\r\n        private void Open()\r\n        {\r\n            _isOpen = true;\r\n\r\n            VisualStateManager.GoToState(TextBoxTarget, \"Focused\", false);\r\n\r\n            var frame = (PhoneApplicationFrame)Application.Current.RootVisual;\r\n            EmojiContainer.Visibility = Visibility.Visible;\r\n            frame.BackKeyPress += OnBackKeyPress;\r\n\r\n            if (!(EmojiContainer.RenderTransform is TranslateTransform))\r\n                EmojiContainer.RenderTransform = new TranslateTransform();\r\n            var transform = (TranslateTransform)EmojiContainer.RenderTransform;\r\n\r\n            var offset = _isPortrait ? PortraitOrientationHeight : AlbumOrientationHeight;\r\n            EmojiContainer.Height = offset;\r\n\r\n            var from = 0;\r\n\r\n            if (_frameTransform.Y < 0) // Keyboard is in view\r\n            {\r\n                from = (int)_frameTransform.Y;\r\n                //_frameTransform.Y = -offset;\r\n                //transform.Y = offset;// -72;\r\n            }\r\n            transform.Y = offset;// -72\r\n\r\n            if (from == offset) return;\r\n\r\n            frame.IsHitTestVisible = false;\r\n            _isBlocked = true;\r\n\r\n            var storyboard = new Storyboard();\r\n            var doubleTransformFrame = new DoubleAnimation\r\n            {\r\n                From = from,\r\n                To = -offset,\r\n                Duration = TimeSpan.FromMilliseconds(440),\r\n                EasingFunction = new ExponentialEase\r\n                {\r\n                    EasingMode = EasingMode.EaseOut,\r\n                    Exponent = 6\r\n                }\r\n            };\r\n            storyboard.Children.Add(doubleTransformFrame);\r\n            Storyboard.SetTarget(doubleTransformFrame, _frameTransform);\r\n            Storyboard.SetTargetProperty(doubleTransformFrame, new PropertyPath(\"Y\"));\r\n\r\n            EmojiContainer.Dispatcher.BeginInvoke(async () =>\r\n            {\r\n                storyboard.Begin();\r\n\r\n                if (_frameTransform.Y < 0) // Keyboard is in view\r\n                {\r\n                    Focus();\r\n                    TextBoxTarget.Dispatcher.BeginInvoke(() // no effect without dispatcher\r\n                        => VisualStateManager.GoToState(TextBoxTarget, \"Focused\", false));\r\n                }\r\n\r\n                if (_wasRendered) return;\r\n                await Task.Delay(50);\r\n                LoadCategory(0);\r\n            });\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                frame.IsHitTestVisible = true;\r\n                _isBlocked = false;\r\n            };\r\n        }\r\n\r\n        private void Hide()\r\n        {\r\n            _isOpen = false;\r\n\r\n            var frame = (PhoneApplicationFrame)Application.Current.RootVisual;\r\n            frame.BackKeyPress -= OnBackKeyPress;\r\n\r\n            if (_isTextBoxTargetFocused)\r\n            {\r\n                _frameTransform.Y = 0;\r\n\r\n                EmojiContainer.Visibility = Visibility.Collapsed;\r\n\r\n                return;\r\n            }\r\n\r\n            VisualStateManager.GoToState(TextBoxTarget, \"Unfocused\", false);\r\n\r\n            frame.IsHitTestVisible = false;\r\n            _isBlocked = true;\r\n\r\n            var transform = (TranslateTransform)EmojiContainer.RenderTransform;\r\n\r\n            var storyboard = new Storyboard();\r\n            var doubleTransformFrame = new DoubleAnimation\r\n            {\r\n                From = -transform.Y,\r\n                To = 0,\r\n                Duration = TimeSpan.FromMilliseconds(440),\r\n                EasingFunction = new ExponentialEase\r\n                {\r\n                    EasingMode = EasingMode.EaseOut,\r\n                    Exponent = 6\r\n                }\r\n            };\r\n            storyboard.Children.Add(doubleTransformFrame);\r\n            Storyboard.SetTarget(doubleTransformFrame, _frameTransform);\r\n            Storyboard.SetTargetProperty(doubleTransformFrame, new PropertyPath(\"Y\"));\r\n            storyboard.Begin();\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                EmojiContainer.Visibility = Visibility.Collapsed;\r\n\r\n                frame.IsHitTestVisible = true;\r\n                _isBlocked = false;\r\n                transform.Y = 0;\r\n            };\r\n\r\n        }\r\n\r\n        #region _isTextBoxTargetFocused listeners\r\n        private void TextBoxOnGotFocus(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            _isTextBoxTargetFocused = true;\r\n        }\r\n        private void TextBoxOnLostFocus(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            _isTextBoxTargetFocused = false;\r\n        }\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Hide instance on pressing hardware Back button. Fires only when instance is opened.\r\n        /// </summary>\r\n        private void OnBackKeyPress(object sender, CancelEventArgs cancelEventArgs)\r\n        {\r\n            IsOpen = false;\r\n            cancelEventArgs.Cancel = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Clear current highlight on scroll\r\n        /// </summary>\r\n        private static void VirtPanelOnScrollPositionChanged(object sender, MyVirtualizingPanel.ScrollPositionChangedEventAgrs scrollPositionChangedEventAgrs)\r\n        {\r\n            EmojiSpriteItem.ClearCurrentHighlight();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Changes tabs in UI and _currentCategory property\r\n        /// </summary>\r\n        public int CurrentCategory\r\n        {\r\n            get { return _currentCategory; }\r\n            set\r\n            {\r\n                var previousCategory = GetCategoryButtonByIndex(_currentCategory);\r\n                var nextCategory = GetCategoryButtonByIndex(value);\r\n\r\n                if (previousCategory != null)\r\n                    previousCategory.Background = new SolidColorBrush(Color.FromArgb(255, 71, 71, 71));\r\n\r\n                nextCategory.Background = (Brush)Application.Current.Resources[\"PhoneAccentBrush\"];\r\n                _currentCategory = value;\r\n            }\r\n        }\r\n\r\n        public async void LoadCategory(int index)\r\n        {\r\n            VirtPanel.ClearItems();\r\n\r\n            if (_currentCategory == RecentsCategoryIndex)\r\n                UnloadRecents();\r\n\r\n            if (index == RecentsCategoryIndex)\r\n            {\r\n                LoadRecents();\r\n                return;\r\n            }\r\n\r\n            List<VListItemBase> sprites = null;\r\n\r\n            switch (index)\r\n            {\r\n                case 0:\r\n                    sprites = _category1Sprites;\r\n                    break;\r\n                case 1:\r\n                    sprites = _category2Sprites;\r\n                    break;\r\n                case 2:\r\n                    sprites = _category3Sprites;\r\n                    break;\r\n                case 3:\r\n                    sprites = _category4Sprites;\r\n                    break;\r\n                case 4:\r\n                    sprites = _category5Sprites;\r\n                    break;\r\n            }\r\n\r\n            if (sprites == null)\r\n            {\r\n                sprites = new List<VListItemBase>();\r\n\r\n                for (var i = 0; i < EmojiData.SpritesByCategory[index].Length; i++)\r\n                {\r\n                    //var item = new EmojiSpriteItem(index, i);\r\n                    var item = new EmojiSpriteItem(EmojiData.SpritesByCategory[index][i], index, i);\r\n                    item.EmojiSelected += OnEmojiSelected;\r\n                    sprites.Add(item);\r\n                }\r\n\r\n                switch (index)\r\n                {\r\n                    case 0:\r\n                        _category1Sprites = sprites;\r\n                        break;\r\n                    case 1:\r\n                        _category2Sprites = sprites;\r\n                        break;\r\n                    case 2:\r\n                        _category3Sprites = sprites;\r\n                        break;\r\n                    case 3:\r\n                        _category4Sprites = sprites;\r\n                        break;\r\n                    case 4:\r\n                        _category5Sprites = sprites;\r\n                        break;\r\n                }\r\n            }\r\n\r\n            CurrentCategory = index;\r\n\r\n            VirtPanel.AddItems(new List<VListItemBase> { sprites[0] });\r\n            CreateButtonsBackgrounds(index);\r\n\r\n            if (!_wasRendered)\r\n            {\r\n                // Display LoadingProgressBar only once\r\n                LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                _wasRendered = true;\r\n            }\r\n\r\n            // Delayed rendering of the rest parts - speeds up initial load\r\n            await Task.Delay(100);\r\n            if (_currentCategory != index)\r\n                return;\r\n\r\n            var listList = sprites.ToList();\r\n            listList.RemoveAt(0);\r\n            VirtPanel.AddItems(listList);\r\n        }\r\n\r\n        public static void OnRootFrameTransformChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((EmojiControl)source).OnRootFrameTransformChanged();\r\n        }\r\n\r\n        public void OnRootFrameTransformChanged()\r\n        {\r\n            if (!_isOpen) return;\r\n\r\n            var offset = _isPortrait ? -PortraitOrientationHeight : -AlbumOrientationHeight;\r\n            _frameTransform.Y = offset;\r\n        }\r\n\r\n        #region Recents\r\n        public void LoadRecents()\r\n        {\r\n            CurrentCategory = RecentsCategoryIndex;\r\n\r\n            var recents = EmojiData.Recents;\r\n            //recents = recents.ToList();\r\n        }\r\n\r\n        public void UnloadRecents()\r\n        {\r\n\r\n        }\r\n\r\n\r\n        #endregion Recents\r\n\r\n        private void OnEmojiSelected(object sender, EmojiDataItem emojiDataItem)\r\n        {\r\n            TextBoxTarget.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                var selectionStart = TextBoxTarget.SelectionStart;\r\n                TextBoxTarget.Text = TextBoxTarget.Text.Insert(selectionStart, emojiDataItem.String);\r\n                TextBoxTarget.Select(selectionStart + emojiDataItem.String.Length, 0);\r\n            });\r\n\r\n            if (_currentCategory == RecentsCategoryIndex) return;\r\n\r\n            var that = emojiDataItem;\r\n            ThreadPool.QueueUserWorkItem(state => EmojiData.AddToRecents(that));\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Emoji control backspace button logic\r\n        /// </summary>\r\n        private void BackspaceButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            var text = TextBoxTarget.Text;\r\n            var selectionStart = TextBoxTarget.SelectionStart;\r\n\r\n            if (text.Length <= 0) return;\r\n            if (selectionStart == 0) return;\r\n\r\n            int toSubstring;\r\n\r\n            if (text.Length > 1)\r\n            {\r\n                var prevSymbol = text[selectionStart - 2];\r\n                var prevBytes = BitConverter.GetBytes(prevSymbol);\r\n\r\n                var curSymbol = text[selectionStart - 1];\r\n                var curBytes = BitConverter.GetBytes(curSymbol);\r\n\r\n                if (prevBytes[1] == 0xD8 && (prevBytes[0] == 0x3D || prevBytes[0] == 0x3C))\r\n                    toSubstring = 2;\r\n                else if (curBytes[1] == 0x20 && curBytes[0] == 0xE3)\r\n                    toSubstring = 2;\r\n                else\r\n                    toSubstring = 1;\r\n            }\r\n            else\r\n            {\r\n                toSubstring = 1;\r\n            }\r\n\r\n            TextBoxTarget.Text = text.Remove(selectionStart - toSubstring, toSubstring);\r\n            TextBoxTarget.SelectionStart = selectionStart - toSubstring;\r\n        }\r\n\r\n        #region User Interface\r\n\r\n        private readonly Button _abcButton = new Button { ClickMode = ClickMode.Release };\r\n        private readonly Button _recentsButton = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat0Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat1Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat2Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat3Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat4Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly RepeatButton _backspaceButton = new RepeatButton { ClickMode = ClickMode.Release, Interval = 100 };\r\n        public const int RecentsCategoryIndex = 5;\r\n\r\n        private Button GetCategoryButtonByIndex(int index)\r\n        {\r\n            switch (index)\r\n            {\r\n                case 0:\r\n                    return _cat0Button;\r\n                case 1:\r\n                    return _cat1Button;\r\n                case 2:\r\n                    return _cat2Button;\r\n                case 3:\r\n                    return _cat3Button;\r\n                case 4:\r\n                    return _cat4Button;\r\n                case RecentsCategoryIndex:\r\n                    return _recentsButton;\r\n                default:\r\n                    return null;\r\n            }\r\n        }\r\n        public void LoadButtons()\r\n        {\r\n            var buttonStyle = (Style)Resources[\"CategoryButtonStyle\"];\r\n            _abcButton.Style = buttonStyle;\r\n            _recentsButton.Style = buttonStyle;\r\n            _cat0Button.Style = buttonStyle;\r\n            _cat1Button.Style = buttonStyle;\r\n            _cat2Button.Style = buttonStyle;\r\n            _cat3Button.Style = buttonStyle;\r\n            _cat4Button.Style = buttonStyle;\r\n            _backspaceButton.Style = (Style)Resources[\"RepeatButtonStyle\"];\r\n\r\n            _abcButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(\"emoji.abc\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _recentsButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(\"emoji.recent\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat0Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(\"emoji.category.1\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat1Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(\"emoji.category.2\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat2Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(\"emoji.category.3\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat3Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(\"emoji.category.4\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat4Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(\"emoji.category.5\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _backspaceButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(\"emoji.backspace\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n\r\n            Grid.SetColumn(_abcButton, 0);\r\n            Grid.SetColumn(_recentsButton, 1);\r\n            Grid.SetColumn(_cat0Button, 2);\r\n            Grid.SetColumn(_cat1Button, 3);\r\n            Grid.SetColumn(_cat2Button, 4);\r\n            Grid.SetColumn(_cat3Button, 5);\r\n            Grid.SetColumn(_cat4Button, 6);\r\n            Grid.SetColumn(_backspaceButton, 7);\r\n\r\n            ButtonsGrid.Children.Add(_abcButton);\r\n            ButtonsGrid.Children.Add(_recentsButton);\r\n            ButtonsGrid.Children.Add(_cat0Button);\r\n            ButtonsGrid.Children.Add(_cat1Button);\r\n            ButtonsGrid.Children.Add(_cat2Button);\r\n            ButtonsGrid.Children.Add(_cat3Button);\r\n            ButtonsGrid.Children.Add(_cat4Button);\r\n            ButtonsGrid.Children.Add(_backspaceButton);\r\n\r\n            _abcButton.Click += AbcButtonOnClick;\r\n            _cat0Button.Click += CategoryButtonClick;\r\n            _cat1Button.Click += CategoryButtonClick;\r\n            _cat2Button.Click += CategoryButtonClick;\r\n            _cat3Button.Click += CategoryButtonClick;\r\n            _cat4Button.Click += CategoryButtonClick;\r\n            _recentsButton.Click += CategoryButtonClick;\r\n            _backspaceButton.Click += BackspaceButtonOnClick;\r\n        }\r\n\r\n        private void AbcButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            TextBoxTarget.Focus();\r\n        }\r\n\r\n        private void CategoryButtonClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            if (sender == _cat0Button)\r\n                LoadCategory(0);\r\n            else if (sender == _cat1Button)\r\n                LoadCategory(1);\r\n            else if (sender == _cat2Button)\r\n                LoadCategory(2);\r\n            else if (sender == _cat3Button)\r\n                LoadCategory(3);\r\n            else if (sender == _cat4Button)\r\n                LoadCategory(4);\r\n            else if (sender == _recentsButton)\r\n                LoadCategory(RecentsCategoryIndex);\r\n        }\r\n\r\n        private void CreateButtonsBackgrounds(int categoryIndex)\r\n        {\r\n            var sprites = EmojiData.SpriteRowsCountByCategory[categoryIndex];\r\n\r\n            for (var i = 0; i < sprites.Length; i++)\r\n            {\r\n                var rowsCount = sprites[i];\r\n\r\n                var block = new Rectangle\r\n                {\r\n                    Width = EmojiSpriteItem.SpriteWidth,\r\n                    Height = EmojiSpriteItem.RowHeight * rowsCount,\r\n                    Fill = new SolidColorBrush(Color.FromArgb(255, 71, 71, 71)),\r\n                    Margin = new Thickness(4, 0, 4, 0)\r\n                };\r\n                Canvas.SetTop(block, (EmojiSpriteItem.SpriteHeight) * i);\r\n                VirtPanel.Children.Insert(0, block);\r\n            }\r\n        }\r\n\r\n        private void InitializeOrientation(Orientation orientation)\r\n        {\r\n            switch (orientation)\r\n            {\r\n                case Orientation.Vertical:\r\n                    ButtonsGrid.Height = 78;\r\n                    ButtonsGrid.Margin = new Thickness(0, 6, 0, 0);\r\n                    EmojiContainer.Height = PortraitOrientationHeight;\r\n                    _frameTransform.Y = -PortraitOrientationHeight;\r\n                    break;\r\n\r\n                case Orientation.Horizontal:\r\n                    ButtonsGrid.Height = 58;\r\n                    ButtonsGrid.Margin = new Thickness(0, 6, 0, 3);\r\n                    EmojiContainer.Height = AlbumOrientationHeight;\r\n                    _frameTransform.Y = -AlbumOrientationHeight;\r\n                    break;\r\n            }\r\n        }\r\n\r\n        #endregion User Interface\r\n\r\n\r\n        /// <summary>\r\n        /// Orientation change handler\r\n        /// </summary>\r\n        private void OnSizeChanged(object sender, SizeChangedEventArgs sizeChangedEventArgs)\r\n        {\r\n            var currentOrientation = ((PhoneApplicationFrame)Application.Current.RootVisual).Orientation;\r\n            var isPortrait = currentOrientation == PageOrientation.PortraitUp ||\r\n                             currentOrientation == PageOrientation.PortraitDown ||\r\n                             currentOrientation == PageOrientation.Portrait;\r\n\r\n            if (_isPortrait == isPortrait && _wasRendered) return;\r\n\r\n            _isPortrait = isPortrait;\r\n            InitializeOrientation(isPortrait ? Orientation.Vertical : Orientation.Horizontal);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Controls/Emoji/EmojiData.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace EmojiPanel.Controls.Emoji\r\n{\r\n    public class EmojiDataItem\r\n    {\r\n        public EmojiDataItem() { }\r\n\r\n        public EmojiDataItem(string string2, ulong code)\r\n        {\r\n            String = string2;\r\n            Code = code;\r\n        }\r\n\r\n        public string String { get; set; }\r\n        public ulong Code { get; set; }\r\n        public Uri Uri { get; set; }\r\n\r\n        public static string BuildString(ulong code)\r\n        {\r\n            var bytes = BitConverter.GetBytes(code);\r\n\r\n            var char1 = BitConverter.ToChar(bytes, 6);\r\n            var char2 = BitConverter.ToChar(bytes, 4);\r\n            var char3 = BitConverter.ToChar(bytes, 2);\r\n            var char4 = BitConverter.ToChar(bytes, 0);\r\n\r\n            string text;\r\n\r\n            if (char1 != 0)\r\n            {\r\n                text = new string(new [] { char1, char2, char3, char4 });\r\n            }\r\n            else if (char3 != 0)\r\n            {\r\n                text = new string(new [] { char3, char4 });\r\n            }\r\n            else\r\n            {\r\n                text = char4.ToString();\r\n            }\r\n\r\n            return text;\r\n        }\r\n\r\n        public static Uri BuildUri(string string2)\r\n        {\r\n            //var string3 = BitConverter.ToString(bytes.Take(4).Reverse().ToArray())\r\n            var string3 = string.Format(\"{0:X}\", (Int16) string2[0]);\r\n\r\n            switch (string2.Length)\r\n            {\r\n                case 2:\r\n                    {\r\n                        uint emoji = 0;\r\n                        emoji |= (uint) string2[0] << 16;\r\n                        emoji |= (uint) string2[1];\r\n\r\n                        return new Uri(string.Format(\"/Assets/Emoji/Separated/{0:X}.png\", emoji), UriKind.Relative);\r\n                    }\r\n                case 4:\r\n                    {\r\n                        uint emoji1 = 0;\r\n                        emoji1 |= (uint) string2[0] << 16;\r\n                        emoji1 |= (uint) string2[1];\r\n\r\n                        ulong emoji2 = 0;\r\n                        emoji2 |= (uint) string2[2] << 16;\r\n                        emoji2 |= (uint) string2[3];\r\n\r\n                        return new Uri(string.Format(\"/Assets/Emoji/Separated/{0:X}-{1:X}.png\", emoji1, emoji2), UriKind.Relative);\r\n                    }\r\n                default:\r\n                    return new Uri(string.Format(\"/Assets/Emoji/Separated/{0:X}.png\", (Int16) string2[0]), UriKind.Relative);\r\n            }\r\n        }\r\n\r\n        public static EmojiDataItem GetByIndex(int categoryIndex, int spriteIndex, int itemIndex)\r\n        {\r\n\r\n            var category = EmojiData.CodesByCategory[categoryIndex];\r\n            var emojiIndex = spriteIndex * EmojiData.ItemsInSprite + itemIndex;\r\n\r\n            if (category.Length <= emojiIndex) return null; // out of bounds\r\n\r\n            ulong code = category[emojiIndex];\r\n\r\n            var result = new EmojiDataItem\r\n            {\r\n                Code = code,\r\n                String = BuildString(code)\r\n            };\r\n            result.Uri = BuildUri(result.String);\r\n\r\n            return result;\r\n        }\r\n    }\r\n\r\n    public static class EmojiData\r\n    {\r\n        public static List<EmojiDataItem> Recents;\r\n\r\n        public static void AddToRecents(EmojiDataItem emojiDataItem)\r\n        {\r\n            if (Recents == null)\r\n            {\r\n                LoadRecents();\r\n                if (Recents == null) return;\r\n            }\r\n\r\n            var prevItem = Recents.FirstOrDefault(x => x.Code == emojiDataItem.Code);\r\n            if (prevItem != null)\r\n            {\r\n                Recents.Remove(prevItem);\r\n                Recents.Insert(0, prevItem);\r\n            }\r\n            else\r\n            {\r\n                Recents.Insert(0, emojiDataItem);\r\n                Recents = Recents.Take(30).ToList();\r\n            }\r\n\r\n            SaveRecents();\r\n        }\r\n\r\n        public static void LoadRecents()\r\n        {\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(\"EmojiRecents\")) return;\r\n                using (var stream = new IsolatedStorageFileStream(\"EmojiRecents\", FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite, store))\r\n                {\r\n                    if (stream.Length <= 0) return;\r\n\r\n                    using (var br = new BinaryReader(stream))\r\n                    {\r\n                        var count = br.ReadInt32();\r\n\r\n                        Recents = new List<EmojiDataItem>();\r\n\r\n                        for (var i = 0; i < count; i++)\r\n                        {\r\n                            var emoji = new EmojiDataItem(br.ReadString(), br.ReadUInt64());\r\n                            Recents.Add(emoji);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void SaveRecents()\r\n        {\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var stream = new IsolatedStorageFileStream(\"EmojiRecents\", FileMode.Create, FileAccess.Write, FileShare.ReadWrite, store))\r\n                {\r\n                    using (var bw = new BinaryWriter(stream))\r\n                    {\r\n                        var emojies = Recents.ToList();\r\n\r\n                        bw.Write(emojies.Count);\r\n\r\n                        foreach (var item in emojies)\r\n                        {\r\n                            bw.Write(item.String);\r\n                            bw.Write(item.Code);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public const int ItemsInRow = 6;\r\n        public const int ItemsInSprite = 36;\r\n\r\n        /// <summary>\r\n        /// Custom spaced sprites by category\r\n        /// </summary>\r\n        public static Uri[][] SpritesByCategory =\r\n        {\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part3.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part4.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part5.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part3.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part3.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part4.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part5.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part6.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat3_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat3_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat3_part2.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part3.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part4.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part5.png\", UriKind.Relative),\r\n            },\r\n        };\r\n\r\n        /// <summary>\r\n        /// Config of rows count for sprites in categories\r\n        /// </summary>\r\n        public static int[][] SpriteRowsCountByCategory = \r\n        {\r\n            new [] { 6, 6, 6, 6, 6, 2 },\r\n            new [] { 6, 6, 6, 2 },\r\n            new [] { 6, 6, 6, 6, 6, 6, 3 },\r\n            new [] { 6, 6, 5 }, \r\n            new [] { 6, 6, 6, 6, 6, 5 }\r\n        };\r\n\r\n        /// <summary>\r\n        /// Config of missing cells in last row for each last category's sprite\r\n        /// </summary>\r\n        public static int[] SpriteMissingCellsByCategory =\r\n        {\r\n            3, 4, 4, 1, 1\r\n        };\r\n\r\n        /// <summary>\r\n        /// Emoji codes combined into the groups corresponding to the categories in the interface\r\n        /// </summary>\r\n        public static ulong[][] CodesByCategory = {\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83DDE04L, 0x00000000D83DDE03L, 0x00000000D83DDE00L, 0x00000000D83DDE0AL, 0x000000000000263AL, 0x00000000D83DDE09L, 0x00000000D83DDE0DL,\r\n\t\t\t0x00000000D83DDE18L, 0x00000000D83DDE1AL, 0x00000000D83DDE17L, 0x00000000D83DDE19L, 0x00000000D83DDE1CL, 0x00000000D83DDE1DL, 0x00000000D83DDE1BL,\r\n\t\t\t0x00000000D83DDE33L, 0x00000000D83DDE01L, 0x00000000D83DDE14L, 0x00000000D83DDE0CL, 0x00000000D83DDE12L, 0x00000000D83DDE1EL, 0x00000000D83DDE23L,\r\n\t\t\t0x00000000D83DDE22L, 0x00000000D83DDE02L, 0x00000000D83DDE2DL, 0x00000000D83DDE2AL, 0x00000000D83DDE25L, 0x00000000D83DDE30L, 0x00000000D83DDE05L,\r\n\t\t\t0x00000000D83DDE13L, 0x00000000D83DDE29L, 0x00000000D83DDE2BL, 0x00000000D83DDE28L, 0x00000000D83DDE31L, 0x00000000D83DDE20L, 0x00000000D83DDE21L,\r\n\t\t\t0x00000000D83DDE24L, 0x00000000D83DDE16L, 0x00000000D83DDE06L, 0x00000000D83DDE0BL, 0x00000000D83DDE37L, 0x00000000D83DDE0EL, 0x00000000D83DDE34L,\r\n\t\t\t0x00000000D83DDE35L, 0x00000000D83DDE32L, 0x00000000D83DDE1FL, 0x00000000D83DDE26L, 0x00000000D83DDE27L, 0x00000000D83DDE08L, 0x00000000D83DDC7FL,\r\n\t\t\t0x00000000D83DDE2EL, 0x00000000D83DDE2CL, 0x00000000D83DDE10L, 0x00000000D83DDE15L, 0x00000000D83DDE2FL, 0x00000000D83DDE36L, 0x00000000D83DDE07L,\r\n\t\t\t0x00000000D83DDE0FL, 0x00000000D83DDE11L, 0x00000000D83DDC72L, 0x00000000D83DDC73L, 0x00000000D83DDC6EL, 0x00000000D83DDC77L, 0x00000000D83DDC82L,\r\n\t\t\t0x00000000D83DDC76L, 0x00000000D83DDC66L, 0x00000000D83DDC67L, 0x00000000D83DDC68L, 0x00000000D83DDC69L, 0x00000000D83DDC74L, 0x00000000D83DDC75L,\r\n\t\t\t0x00000000D83DDC71L, 0x00000000D83DDC7CL, 0x00000000D83DDC78L, 0x00000000D83DDE3AL, 0x00000000D83DDE38L, 0x00000000D83DDE3BL, 0x00000000D83DDE3DL,\r\n\t\t\t0x00000000D83DDE3CL, 0x00000000D83DDE40L, 0x00000000D83DDE3FL, 0x00000000D83DDE39L, 0x00000000D83DDE3EL, 0x00000000D83DDC79L, 0x00000000D83DDC7AL,\r\n\t\t\t0x00000000D83DDE48L, 0x00000000D83DDE49L, 0x00000000D83DDE4AL, 0x00000000D83DDC80L, 0x00000000D83DDC7DL, 0x00000000D83DDCA9L, 0x00000000D83DDD25L,\r\n\t\t\t0x0000000000002728L, 0x00000000D83CDF1FL, 0x00000000D83DDCABL, 0x00000000D83DDCA5L, 0x00000000D83DDCA2L, 0x00000000D83DDCA6L, 0x00000000D83DDCA7L,\r\n\t\t\t0x00000000D83DDCA4L, 0x00000000D83DDCA8L, 0x00000000D83DDC42L, 0x00000000D83DDC40L, 0x00000000D83DDC43L, 0x00000000D83DDC45L, 0x00000000D83DDC44L,\r\n\t\t\t0x00000000D83DDC4DL, 0x00000000D83DDC4EL, 0x00000000D83DDC4CL, 0x00000000D83DDC4AL, 0x000000000000270AL, 0x000000000000270CL, 0x00000000D83DDC4BL,\r\n\t\t\t0x000000000000270BL, 0x00000000D83DDC50L, 0x00000000D83DDC46L, 0x00000000D83DDC47L, 0x00000000D83DDC49L, 0x00000000D83DDC48L, 0x00000000D83DDE4CL,\r\n\t\t\t0x00000000D83DDE4FL, 0x000000000000261DL, 0x00000000D83DDC4FL, 0x00000000D83DDCAAL, 0x00000000D83DDEB6L, 0x00000000D83CDFC3L, 0x00000000D83DDC83L,\r\n\t\t\t0x00000000D83DDC6BL, 0x00000000D83DDC6AL, 0x00000000D83DDC6CL, 0x00000000D83DDC6DL, 0x00000000D83DDC8FL, 0x00000000D83DDC91L, 0x00000000D83DDC6FL,\r\n\t\t\t0x00000000D83DDE46L, 0x00000000D83DDE45L, 0x00000000D83DDC81L, 0x00000000D83DDE4BL, 0x00000000D83DDC86L, 0x00000000D83DDC87L, 0x00000000D83DDC85L,\r\n\t\t\t0x00000000D83DDC70L, 0x00000000D83DDE4EL, 0x00000000D83DDE4DL, 0x00000000D83DDE47L, 0x00000000D83CDFA9L, 0x00000000D83DDC51L, 0x00000000D83DDC52L,\r\n\t\t\t0x00000000D83DDC5FL, 0x00000000D83DDC5EL, 0x00000000D83DDC61L, 0x00000000D83DDC60L, 0x00000000D83DDC62L, 0x00000000D83DDC55L, 0x00000000D83DDC54L,\r\n\t\t\t0x00000000D83DDC5AL, 0x00000000D83DDC57L, 0x00000000D83CDFBDL, 0x00000000D83DDC56L, 0x00000000D83DDC58L, 0x00000000D83DDC59L, 0x00000000D83DDCBCL,\r\n\t\t\t0x00000000D83DDC5CL, 0x00000000D83DDC5DL, 0x00000000D83DDC5BL, 0x00000000D83DDC53L, 0x00000000D83CDF80L, 0x00000000D83CDF02L, 0x00000000D83DDC84L,\r\n\t\t\t0x00000000D83DDC9BL, 0x00000000D83DDC99L, 0x00000000D83DDC9CL, 0x00000000D83DDC9AL, 0x0000000000002764L, 0x00000000D83DDC94L, 0x00000000D83DDC97L,\r\n\t\t\t0x00000000D83DDC93L, 0x00000000D83DDC95L, 0x00000000D83DDC96L, 0x00000000D83DDC9EL, 0x00000000D83DDC98L, 0x00000000D83DDC8CL, 0x00000000D83DDC8BL,\r\n\t\t\t0x00000000D83DDC8DL, 0x00000000D83DDC8EL, 0x00000000D83DDC64L, 0x00000000D83DDC65L, 0x00000000D83DDCACL, 0x00000000D83DDC63L, 0x00000000D83DDCADL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83DDC36L, 0x00000000D83DDC3AL, 0x00000000D83DDC31L, 0x00000000D83DDC2DL, 0x00000000D83DDC39L, 0x00000000D83DDC30L, 0x00000000D83DDC38L, 0x00000000D83DDC2FL,\r\n\t\t\t0x00000000D83DDC28L, 0x00000000D83DDC3BL, 0x00000000D83DDC37L, 0x00000000D83DDC3DL, 0x00000000D83DDC2EL, 0x00000000D83DDC17L, 0x00000000D83DDC35L,\r\n\t\t\t0x00000000D83DDC12L, 0x00000000D83DDC34L, 0x00000000D83DDC11L, 0x00000000D83DDC18L, 0x00000000D83DDC3CL, 0x00000000D83DDC27L, 0x00000000D83DDC26L,\r\n\t\t\t0x00000000D83DDC24L, 0x00000000D83DDC25L, 0x00000000D83DDC23L, 0x00000000D83DDC14L, 0x00000000D83DDC0DL, 0x00000000D83DDC22L, 0x00000000D83DDC1BL,\r\n\t\t\t0x00000000D83DDC1DL, 0x00000000D83DDC1CL, 0x00000000D83DDC1EL, 0x00000000D83DDC0CL, 0x00000000D83DDC19L, 0x00000000D83DDC1AL, 0x00000000D83DDC20L,\r\n\t\t\t0x00000000D83DDC1FL, 0x00000000D83DDC2CL, 0x00000000D83DDC33L, 0x00000000D83DDC0BL, 0x00000000D83DDC04L, 0x00000000D83DDC0FL, 0x00000000D83DDC00L,\r\n\t\t\t0x00000000D83DDC03L, 0x00000000D83DDC05L, 0x00000000D83DDC07L, 0x00000000D83DDC09L, 0x00000000D83DDC0EL, 0x00000000D83DDC10L, 0x00000000D83DDC13L,\r\n\t\t\t0x00000000D83DDC15L, 0x00000000D83DDC16L, 0x00000000D83DDC01L, 0x00000000D83DDC02L, 0x00000000D83DDC32L, 0x00000000D83DDC21L, 0x00000000D83DDC0AL,\r\n\t\t\t0x00000000D83DDC2BL, 0x00000000D83DDC2AL, 0x00000000D83DDC06L, 0x00000000D83DDC08L, 0x00000000D83DDC29L, 0x00000000D83DDC3EL, 0x00000000D83DDC90L,\r\n\t\t\t0x00000000D83CDF38L, 0x00000000D83CDF37L, 0x00000000D83CDF40L, 0x00000000D83CDF39L, 0x00000000D83CDF3BL, 0x00000000D83CDF3AL, 0x00000000D83CDF41L,\r\n\t\t\t0x00000000D83CDF43L, 0x00000000D83CDF42L, 0x00000000D83CDF3FL, 0x00000000D83CDF3EL, 0x00000000D83CDF44L, 0x00000000D83CDF35L, 0x00000000D83CDF34L,\r\n\t\t\t0x00000000D83CDF32L, 0x00000000D83CDF33L, 0x00000000D83CDF30L, 0x00000000D83CDF31L, 0x00000000D83CDF3CL, 0x00000000D83CDF10L, 0x00000000D83CDF1EL,\r\n\t\t\t0x00000000D83CDF1DL, 0x00000000D83CDF1AL, 0x00000000D83CDF11L, 0x00000000D83CDF12L, 0x00000000D83CDF13L, 0x00000000D83CDF14L, 0x00000000D83CDF15L,\r\n\t\t\t0x00000000D83CDF16L, 0x00000000D83CDF17L, 0x00000000D83CDF18L, 0x00000000D83CDF1CL, 0x00000000D83CDF1BL, 0x00000000D83CDF19L, 0x00000000D83CDF0DL,\r\n\t\t\t0x00000000D83CDF0EL, 0x00000000D83CDF0FL, 0x00000000D83CDF0BL, 0x00000000D83CDF0CL, 0x00000000D83CDF20L, 0x0000000000002B50L, 0x0000000000002600L,\r\n\t\t\t0x00000000000026C5L, 0x0000000000002601L, 0x00000000000026A1L, 0x0000000000002614L, 0x0000000000002744L, 0x00000000000026C4L, 0x00000000D83CDF00L,\r\n\t\t\t0x00000000D83CDF01L, 0x00000000D83CDF08L, 0x00000000D83CDF0AL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83CDF8DL, 0x00000000D83DDC9DL, 0x00000000D83CDF8EL, 0x00000000D83CDF92L, 0x00000000D83CDF93L, 0x00000000D83CDF8FL, 0x00000000D83CDF86L, 0x00000000D83CDF87L,\r\n\t\t\t0x00000000D83CDF90L, 0x00000000D83CDF91L, 0x00000000D83CDF83L, 0x00000000D83DDC7BL, 0x00000000D83CDF85L, 0x00000000D83CDF84L, 0x00000000D83CDF81L,\r\n\t\t\t0x00000000D83CDF8BL, 0x00000000D83CDF89L, 0x00000000D83CDF8AL, 0x00000000D83CDF88L, 0x00000000D83CDF8CL, 0x00000000D83DDD2EL, 0x00000000D83CDFA5L,\r\n\t\t\t0x00000000D83DDCF7L, 0x00000000D83DDCF9L, 0x00000000D83DDCFCL, 0x00000000D83DDCBFL, 0x00000000D83DDCC0L, 0x00000000D83DDCBDL, 0x00000000D83DDCBEL,\r\n\t\t\t0x00000000D83DDCBBL, 0x00000000D83DDCF1L, 0x000000000000260EL, 0x00000000D83DDCDEL, 0x00000000D83DDCDFL, 0x00000000D83DDCE0L, 0x00000000D83DDCE1L,\r\n\t\t\t0x00000000D83DDCFAL, 0x00000000D83DDCFBL, 0x00000000D83DDD0AL, 0x00000000D83DDD09L, 0x00000000D83DDD08L, 0x00000000D83DDD07L, 0x00000000D83DDD14L,\r\n\t\t\t0x00000000D83DDD14L, 0x00000000D83DDCE2L, 0x00000000D83DDCE3L, 0x00000000000023F3L, 0x000000000000231BL, 0x00000000000023F0L, 0x000000000000231AL,\r\n\t\t\t0x00000000D83DDD13L, 0x00000000D83DDD12L, 0x00000000D83DDD0FL, 0x00000000D83DDD10L, 0x00000000D83DDD11L, 0x00000000D83DDD0EL, 0x00000000D83DDCA1L,\r\n\t\t\t0x00000000D83DDD26L, 0x00000000D83DDD06L, 0x00000000D83DDD05L, 0x00000000D83DDD0CL, 0x00000000D83DDD0BL, 0x00000000D83DDD0DL, 0x00000000D83DDEC1L /* was missing */, 0x00000000D83DDEC0L,\r\n\t\t\t0x00000000D83DDEBFL, 0x00000000D83DDEBDL, 0x00000000D83DDD27L, 0x00000000D83DDD29L, 0x00000000D83DDD28L, 0x00000000D83DDEAAL, 0x00000000D83DDEACL,\r\n\t\t\t0x00000000D83DDCA3L, 0x00000000D83DDD2BL, 0x00000000D83DDD2AL, 0x00000000D83DDC8AL, 0x00000000D83DDC89L, 0x00000000D83DDCB0L, 0x00000000D83DDCB4L,\r\n\t\t\t0x00000000D83DDCB5L, 0x00000000D83DDCB7L, 0x00000000D83DDCB6L, 0x00000000D83DDCB3L, 0x00000000D83DDCB8L, 0x00000000D83DDCF2L, 0x00000000D83DDCE7L,\r\n\t\t\t0x00000000D83DDCE5L, 0x00000000D83DDCE4L, 0x0000000000002709L, 0x00000000D83DDCE9L, 0x00000000D83DDCE8L, 0x00000000D83DDCEFL, 0x00000000D83DDCEBL,\r\n\t\t\t0x00000000D83DDCEAL, 0x00000000D83DDCECL, 0x00000000D83DDCEDL, 0x00000000D83DDCEEL, 0x00000000D83DDCE6L, 0x00000000D83DDCDDL, 0x00000000D83DDCC4L,\r\n\t\t\t0x00000000D83DDCC3L, 0x00000000D83DDCD1L, 0x00000000D83DDCCAL, 0x00000000D83DDCC8L, 0x00000000D83DDCC9L, 0x00000000D83DDCDCL, 0x00000000D83DDCCBL,\r\n\t\t\t0x00000000D83DDCC5L, 0x00000000D83DDCC6L, 0x00000000D83DDCC7L, 0x00000000D83DDCC1L, 0x00000000D83DDCC2L, 0x0000000000002702L, 0x00000000D83DDCCCL,\r\n\t\t\t0x00000000D83DDCCEL, 0x0000000000002712L, 0x000000000000270FL, 0x00000000D83DDCCFL, 0x00000000D83DDCD0L, 0x00000000D83DDCD5L, 0x00000000D83DDCD7L,\r\n\t\t\t0x00000000D83DDCD8L, 0x00000000D83DDCD9L, 0x00000000D83DDCD3L, 0x00000000D83DDCD4L, 0x00000000D83DDCD2L, 0x00000000D83DDCDAL, 0x00000000D83DDCD6L,\r\n\t\t\t0x00000000D83DDD16L, 0x00000000D83DDCDBL, 0x00000000D83DDD2CL, 0x00000000D83DDD2DL, 0x00000000D83DDCF0L, 0x00000000D83CDFA8L, 0x00000000D83CDFACL,\r\n\t\t\t0x00000000D83CDFA4L, 0x00000000D83CDFA7L, 0x00000000D83CDFBCL, 0x00000000D83CDFB5L, 0x00000000D83CDFB6L, 0x00000000D83CDFB9L, 0x00000000D83CDFBBL,\r\n\t\t\t0x00000000D83CDFBAL, 0x00000000D83CDFB7L, 0x00000000D83CDFB8L, 0x00000000D83DDC7EL, 0x00000000D83CDFAEL, 0x00000000D83CDCCFL, 0x00000000D83CDFB4L,\r\n\t\t\t0x00000000D83CDC04L, 0x00000000D83CDFB2L, 0x00000000D83CDFAFL, 0x00000000D83CDFC8L, 0x00000000D83CDFC0L, 0x00000000000026BDL, 0x00000000000026BEL,\r\n\t\t\t0x00000000D83CDFBEL, 0x00000000D83CDFB1L, 0x00000000D83CDFC9L, 0x00000000D83CDFB3L, 0x00000000000026F3L, 0x00000000D83DDEB5L, 0x00000000D83DDEB4L,\r\n\t\t\t0x00000000D83CDFC1L, 0x00000000D83CDFC7L, 0x00000000D83CDFC6L, 0x00000000D83CDFBFL, 0x00000000D83CDFC2L, 0x00000000D83CDFCAL, 0x00000000D83CDFC4L,\r\n\t\t\t0x00000000D83CDFA3L, 0x0000000000002615L, 0x00000000D83CDF75L, 0x00000000D83CDF76L, 0x00000000D83CDF7CL, 0x00000000D83CDF7AL, 0x00000000D83CDF7BL,\r\n\t\t\t0x00000000D83CDF78L, 0x00000000D83CDF79L, 0x00000000D83CDF77L, 0x00000000D83CDF74L, 0x00000000D83CDF55L, 0x00000000D83CDF54L, 0x00000000D83CDF5FL,\r\n\t\t\t0x00000000D83CDF57L, 0x00000000D83CDF56L, 0x00000000D83CDF5DL, 0x00000000D83CDF5BL, 0x00000000D83CDF64L, 0x00000000D83CDF71L, 0x00000000D83CDF63L,\r\n\t\t\t0x00000000D83CDF65L, 0x00000000D83CDF59L, 0x00000000D83CDF58L, 0x00000000D83CDF5AL, 0x00000000D83CDF5CL, 0x00000000D83CDF72L, 0x00000000D83CDF62L,\r\n\t\t\t0x00000000D83CDF61L, 0x00000000D83CDF73L, 0x00000000D83CDF5EL, 0x00000000D83CDF69L, 0x00000000D83CDF6EL, 0x00000000D83CDF66L, 0x00000000D83CDF68L,\r\n\t\t\t0x00000000D83CDF67L, 0x00000000D83CDF82L, 0x00000000D83CDF70L, 0x00000000D83CDF6AL, 0x00000000D83CDF6BL, 0x00000000D83CDF6CL, 0x00000000D83CDF6DL,\r\n\t\t\t0x00000000D83CDF6FL, 0x00000000D83CDF4EL, 0x00000000D83CDF4FL, 0x00000000D83CDF4AL, 0x00000000D83CDF4BL, 0x00000000D83CDF52L, 0x00000000D83CDF47L,\r\n\t\t\t0x00000000D83CDF49L, 0x00000000D83CDF53L, 0x00000000D83CDF51L, 0x00000000D83CDF48L, 0x00000000D83CDF4CL, 0x00000000D83CDF50L, 0x00000000D83CDF4DL,\r\n\t\t\t0x00000000D83CDF60L, 0x00000000D83CDF46L, 0x00000000D83CDF45L, 0x00000000D83CDF3DL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83CDFE0L, 0x00000000D83CDFE1L, 0x00000000D83CDFEBL, 0x00000000D83CDFE2L, 0x00000000D83CDFE3L, 0x00000000D83CDFE5L, 0x00000000D83CDFE6L, 0x00000000D83CDFEAL,\r\n\t\t\t0x00000000D83CDFE9L, 0x00000000D83CDFE8L, 0x00000000D83DDC92L, 0x00000000000026EAL, 0x00000000D83CDFECL, 0x00000000D83CDFE4L, 0x00000000D83CDF07L,\r\n\t\t\t0x00000000D83CDF06L, 0x00000000D83CDFEFL, 0x00000000D83CDFF0L, 0x00000000000026FAL, 0x00000000D83CDFEDL, 0x00000000D83DDDFCL, 0x00000000D83DDDFEL,\r\n\t\t\t0x00000000D83DDDFBL, 0x00000000D83CDF04L, 0x00000000D83CDF05L, 0x00000000D83CDF03L, 0x00000000D83DDDFDL, 0x00000000D83CDF09L, 0x00000000D83CDFA0L,\r\n\t\t\t0x00000000D83CDFA1L, 0x00000000000026F2L, 0x00000000D83CDFA2L, 0x00000000D83DDEA2L, 0x00000000000026F5L, 0x00000000D83DDEA4L, 0x00000000D83DDEA3L,\r\n\t\t\t0x0000000000002693L, 0x00000000D83DDE80L, 0x0000000000002708L, 0x00000000D83DDCBAL, 0x00000000D83DDE81L, 0x00000000D83DDE82L, 0x00000000D83DDE8AL,\r\n\t\t\t0x00000000D83DDE89L, 0x00000000D83DDE9EL, 0x00000000D83DDE86L, 0x00000000D83DDE84L, 0x00000000D83DDE85L, 0x00000000D83DDE88L, 0x00000000D83DDE87L,\r\n\t\t\t0x00000000D83DDE9DL, 0x00000000D83DDE8BL, 0x00000000D83DDE83L, 0x00000000D83DDE8EL, 0x00000000D83DDE8CL, 0x00000000D83DDE8DL, 0x00000000D83DDE99L,\r\n\t\t\t0x00000000D83DDE98L, 0x00000000D83DDE97L, 0x00000000D83DDE95L, 0x00000000D83DDE96L, 0x00000000D83DDE9BL, 0x00000000D83DDE9AL, 0x00000000D83DDEA8L,\r\n\t\t\t0x00000000D83DDE93L, 0x00000000D83DDE94L, 0x00000000D83DDE92L, 0x00000000D83DDE91L, 0x00000000D83DDE90L, 0x00000000D83DDEB2L, 0x00000000D83DDEA1L,\r\n\t\t\t0x00000000D83DDE9FL, 0x00000000D83DDEA0L, 0x00000000D83DDE9CL, 0x00000000D83DDC88L, 0x00000000D83DDE8FL, 0x00000000D83CDFABL, 0x00000000D83DDEA6L,\r\n\t\t\t0x00000000D83DDEA5L, 0x00000000000026A0L, 0x00000000D83DDEA7L, 0x00000000D83DDD30L, 0x00000000000026FDL, 0x00000000D83CDFEEL, 0x00000000D83CDFB0L,\r\n\t\t\t0x0000000000002668L, 0x00000000D83DDDFFL, 0x00000000D83CDFAAL, 0x00000000D83CDFADL, 0x00000000D83DDCCDL, 0x00000000D83DDEA9L, 0xD83CDDEFD83CDDF5L,\r\n\t\t\t0xD83CDDF0D83CDDF7L, 0xD83CDDE9D83CDDEAL, 0xD83CDDE8D83CDDF3L, 0xD83CDDFAD83CDDF8L, 0xD83CDDEBD83CDDF7L, 0xD83CDDEAD83CDDF8L, 0xD83CDDEED83CDDF9L,\r\n\t\t\t0xD83CDDF7D83CDDFAL, 0xD83CDDECD83CDDE7L},\r\n\t\t\tnew ulong[]{\r\n            0x00000000003120E3L, 0x00000000003220E3L, 0x00000000003320E3L, 0x00000000003420E3L, 0x00000000003520E3L, 0x00000000003620E3L, 0x00000000003720E3L, 0x00000000003820E3L,\r\n\t\t\t0x00000000003920E3L, 0x00000000003020E3L, 0x00000000D83DDD1FL, 0x00000000D83DDD22L, 0x00000000002320E3L, 0x00000000D83DDD23L, 0x0000000000002B06L,\r\n\t\t\t0x0000000000002B07L, 0x0000000000002B05L, 0x00000000000027A1L, 0x00000000D83DDD20L, 0x00000000D83DDD21L, 0x00000000D83DDD24L, 0x0000000000002197L,\r\n\t\t\t0x0000000000002196L, 0x0000000000002198L, 0x0000000000002199L, 0x0000000000002194L, 0x0000000000002195L, 0x00000000D83DDD04L, 0x00000000000025C0L,\r\n\t\t\t0x00000000000025B6L, 0x00000000D83DDD3CL, 0x00000000D83DDD3DL, 0x00000000000021A9L, 0x00000000000021AAL, 0x0000000000002139L, 0x00000000000023EAL,\r\n\t\t\t0x00000000000023E9L, 0x00000000000023EBL, 0x00000000000023ECL, 0x0000000000002935L, 0x0000000000002934L, 0x00000000D83CDD97L, 0x00000000D83DDD00L,\r\n\t\t\t0x00000000D83DDD01L, 0x00000000D83DDD02L, 0x00000000D83CDD95L, 0x00000000D83CDD99L, 0x00000000D83CDD92L, 0x00000000D83CDD93L, 0x00000000D83CDD96L,\r\n\t\t\t0x00000000D83DDCF6L, 0x00000000D83CDFA6L, 0x00000000D83CDE01L, 0x00000000D83CDE2FL, 0x00000000D83CDE33L, 0x00000000D83CDE35L, 0x00000000D83CDE34L /* was missing */, 0x00000000D83CDE32L,\r\n\t\t\t0x00000000D83CDE50L /* //34 was wrong */, 0x00000000D83CDE39L /* //32 was duplicate */, /* removed 3 */  0x00000000D83CDE3AL, 0x00000000D83CDE36L, 0x00000000D83CDE1AL,\r\n\t\t\t0x00000000D83DDEBBL, 0x00000000D83DDEB9L, 0x00000000D83DDEBAL, 0x00000000D83DDEBCL, 0x00000000D83DDEBEL, 0x00000000D83DDEB0L, 0x00000000D83DDEAEL,\r\n\t\t\t0x00000000D83CDD7FL, 0x000000000000267FL, 0x00000000D83DDEADL, 0x00000000D83CDE37L, 0x00000000D83CDE38L, 0x00000000D83CDE02L, 0x00000000000024C2L,\r\n            /* missing 4 unicodes */\r\n            0x00000000D83DDEC2L, 0x00000000D83DDEC4L, 0x00000000D83DDEC5L, 0x00000000D83DDEC3L,\r\n\t\t\t0x00000000D83CDE51L, 0x0000000000003299L, 0x0000000000003297L, 0x00000000D83CDD91L, 0x00000000D83CDD98L, 0x00000000D83CDD94L, 0x00000000D83DDEABL,\r\n\t\t\t0x00000000D83DDD1EL, 0x00000000D83DDCF5L, 0x00000000D83DDEAFL, 0x00000000D83DDEB1L, 0x00000000D83DDEB3L, 0x00000000D83DDEB7L, 0x00000000D83DDEB8L,\r\n\t\t\t0x00000000000026D4L, 0x0000000000002733L, 0x0000000000002747L, 0x000000000000274EL, 0x0000000000002705L, 0x0000000000002734L, 0x00000000D83DDC9FL,\r\n\t\t\t0x00000000D83CDD9AL, 0x00000000D83DDCF3L, 0x00000000D83DDCF4L, 0x00000000D83CDD70L, 0x00000000D83CDD71L, 0x00000000D83CDD8EL, 0x00000000D83CDD7EL,\r\n\t\t\t0x00000000D83DDCA0L, 0x00000000000027BFL, 0x000000000000267BL, 0x0000000000002648L, 0x0000000000002649L, 0x000000000000264AL, 0x000000000000264BL,\r\n\t\t\t0x000000000000264CL, 0x000000000000264DL, 0x000000000000264EL, 0x000000000000264FL, 0x0000000000002650L, 0x0000000000002651L, 0x0000000000002652L,\r\n\t\t\t0x0000000000002653L, 0x00000000000026CEL, 0x00000000D83DDD2FL, 0x00000000D83CDFE7L, 0x00000000D83DDCB9L, 0x00000000D83DDCB2L, 0x00000000D83DDCB1L,\r\n\t\t\t0x00000000000000A9L, 0x00000000000000AEL, 0x0000000000002122L /* TM */, \r\n            /* was mixed, missing 2-3 */\r\n            0x000000000000274CL, 0x000000000000203CL, 0x0000000000002049L, 0x0000000000002757L, 0x0000000000002753L, 0x0000000000002755L, 0x0000000000002754L, 0x0000000000002B55L,\r\n            0x00000000D83DDD1DL, 0x00000000D83DDD1AL,\r\n\t\t\t0x00000000D83DDD19L, 0x00000000D83DDD1BL, 0x00000000D83DDD1CL,\r\n            0x00000000D83DDD03L, 0x00000000D83DDD5BL, 0x00000000D83DDD67L, 0x00000000D83DDD50L, 0x00000000D83DDD5CL,\r\n\t\t\t0x00000000D83DDD51L, 0x00000000D83DDD5DL, 0x00000000D83DDD52L, 0x00000000D83DDD5EL, 0x00000000D83DDD53L, 0x00000000D83DDD5FL, 0x00000000D83DDD54L,\r\n\t\t\t0x00000000D83DDD60L, 0x00000000D83DDD55L, 0x00000000D83DDD56L, 0x00000000D83DDD57L, 0x00000000D83DDD58L, 0x00000000D83DDD59L, 0x00000000D83DDD5AL,\r\n\t\t\t0x00000000D83DDD61L, 0x00000000D83DDD62L, 0x00000000D83DDD63L, 0x00000000D83DDD64L, 0x00000000D83DDD65L, 0x00000000D83DDD66L, 0x0000000000002716L,\r\n\t\t\t0x0000000000002795L, 0x0000000000002796L, 0x0000000000002797L, 0x0000000000002660L, 0x0000000000002665L, 0x0000000000002663L, 0x0000000000002666L,\r\n\t\t\t0x00000000D83DDCAEL, 0x00000000D83DDCAFL, 0x0000000000002714L, 0x0000000000002611L, 0x00000000D83DDD18L, 0x00000000D83DDD17L, 0x00000000000027B0L,\r\n            0x0000000000003030L, 0x000000000000303DL, 0x00000000D83DDD31L, \r\n            0x00000000000025FCL, 0x00000000000025FBL, 0x00000000000025FEL, 0x00000000000025FDL,\r\n\t\t\t0x00000000000025AAL, 0x00000000000025ABL,\r\n            0x00000000D83DDD3AL, 0x00000000D83DDD32L, 0x00000000D83DDD33L, 0x00000000000026ABL, 0x00000000000026AAL,\r\n\t\t\t0x00000000D83DDD34L, 0x00000000D83DDD35L, 0x00000000D83DDD3BL, 0x0000000000002B1CL, 0x0000000000002B1BL, 0x00000000D83DDD36L, 0x00000000D83DDD37L, 0x00000000D83DDD38L, 0x00000000D83DDD39L}};\r\n    }\r\n}\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Controls/Emoji/EmojiSpriteItem.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Shapes;\r\nusing Telegram.Controls.VirtualizedView;\r\n\r\nnamespace EmojiPanel.Controls.Emoji\r\n{\r\n    public class EmojiSpriteItem : VListItemBase\r\n    {\r\n        public int CategoryIndex;\r\n        public int SpriteOffset;\r\n        public int Rows;\r\n\r\n        public EventHandler<EmojiDataItem> EmojiSelected = delegate { };\r\n\r\n        public EmojiSpriteItem(int categoryIndex, int spriteOffset)\r\n        {\r\n            CategoryIndex = categoryIndex;\r\n            SpriteOffset = spriteOffset;\r\n            Rows = EmojiData.SpriteRowsCountByCategory[categoryIndex][spriteOffset];\r\n\r\n            var emojiInCategory = EmojiData.CodesByCategory[categoryIndex];\r\n            ulong[] emojis = null;\r\n            emojis = spriteOffset != 0 ? \r\n                emojiInCategory.Skip(spriteOffset*EmojiData.ItemsInSprite).Take(EmojiData.ItemsInSprite).ToArray() : \r\n                emojiInCategory.Take(EmojiData.ItemsInSprite).ToArray();\r\n\r\n            View.Width = SpriteWidth + 8;\r\n            var decodePixelWidth = SpriteWidth;\r\n            switch (Application.Current.Host.Content.ScaleFactor)\r\n            {\r\n                case 100:\r\n                    break;\r\n                case 150:\r\n                    decodePixelWidth = 711;\r\n                    break;\r\n                case 160:\r\n                    decodePixelWidth = 758;\r\n                    break;\r\n            }\r\n\r\n            var image = new Image\r\n            {\r\n                Width = SpriteWidth,\r\n                Source = new BitmapImage\r\n                {\r\n                    DecodePixelWidth = decodePixelWidth,\r\n                    DecodePixelType = DecodePixelType.Physical\r\n                    //UriSource = spriteUri\r\n                },\r\n                Margin = new Thickness(4, 1, 4, 1),\r\n                VerticalAlignment = VerticalAlignment.Top\r\n            };\r\n            Children.Add(image);\r\n\r\n            View.MouseLeftButtonDown += ViewOnMouseLeftButtonDown;\r\n            View.LostMouseCapture += ViewOnLostMouseCapture;\r\n            View.MouseLeftButtonUp += ViewOnLostMouseCapture;\r\n            View.MouseLeave += ViewOnLostMouseCapture;\r\n            View.Tap += ViewOnTap;\r\n\r\n            CreateBorders();\r\n        }\r\n\r\n        public EmojiSpriteItem(Uri spriteUri, int categoryIndex, int spriteOffset)\r\n        {\r\n            CategoryIndex = categoryIndex;\r\n            SpriteOffset = spriteOffset;\r\n            Rows = EmojiData.SpriteRowsCountByCategory[categoryIndex][spriteOffset];\r\n\r\n            View.Width = SpriteWidth + 8;\r\n            var decodePixelWidth = SpriteWidth;\r\n            switch (Application.Current.Host.Content.ScaleFactor)\r\n            {\r\n                case 100:\r\n                    break;\r\n                case 150:\r\n                    decodePixelWidth = 711;\r\n                    break;\r\n                case 160:\r\n                    decodePixelWidth = 758;\r\n                    break;\r\n            }\r\n\r\n            var image = new Image\r\n            {\r\n                Width = SpriteWidth,\r\n                Source = new BitmapImage\r\n                {\r\n                    DecodePixelWidth = decodePixelWidth,\r\n                    DecodePixelType = DecodePixelType.Physical,\r\n                    UriSource = spriteUri\r\n                },\r\n                Margin = new Thickness(4, 1, 4, 1),\r\n                VerticalAlignment = VerticalAlignment.Top\r\n            };\r\n            Children.Add(image);\r\n\r\n            View.MouseLeftButtonDown += ViewOnMouseLeftButtonDown;\r\n            View.LostMouseCapture += ViewOnLostMouseCapture;\r\n            View.MouseLeftButtonUp += ViewOnLostMouseCapture;\r\n            View.MouseLeave += ViewOnLostMouseCapture;\r\n            View.Tap += ViewOnTap;\r\n\r\n            CreateBorders();\r\n        }\r\n\r\n        private static void ViewOnLostMouseCapture(object sender, MouseEventArgs mouseEventArgs)\r\n        {\r\n            ClearCurrentHighlight();\r\n        }\r\n\r\n        public static void ClearCurrentHighlight()\r\n        {\r\n            if (_currentHighlight == null) return;\r\n\r\n            var parent = _currentHighlight.Parent as Grid;\r\n            if (parent != null)\r\n                parent.Children.Remove(_currentHighlight);\r\n\r\n            _currentHighlight = null;\r\n        }\r\n\r\n        private void ViewOnMouseLeftButtonDown(object sender, MouseButtonEventArgs args)\r\n        {\r\n            var point = args.GetPosition(View);\r\n            var column = (int) Math.Ceiling(point.X / ColumnWidth);\r\n            var row = (int) Math.Ceiling(point.Y / RowHeight);\r\n\r\n            if (column <= 0 || row <= 0) return;\r\n            if (Rows < MaxRowsInSprite && row == Rows)\r\n            {\r\n                if (EmojiData.ItemsInRow - EmojiData.SpriteMissingCellsByCategory[CategoryIndex] < column)\r\n                    return;\r\n            }\r\n\r\n            var emojiHoverBackground = new Rectangle\r\n            {\r\n                Width = ColumnWidth - 2, //width without 2px border\r\n                Height = RowHeight,\r\n                Fill = (Brush) Application.Current.Resources[\"PhoneAccentBrush\"],\r\n                Margin = new Thickness((column - 1) * 79 + 4, (row - 1) * 70 + 2, 0, 0),\r\n                HorizontalAlignment = HorizontalAlignment.Left,\r\n                VerticalAlignment = VerticalAlignment.Top\r\n            };\r\n            View.Children.Insert(0, emojiHoverBackground);\r\n\r\n            ClearCurrentHighlight();\r\n            _currentHighlight = emojiHoverBackground;\r\n        }\r\n\r\n        private void ViewOnTap(object sender, GestureEventArgs args)\r\n        {\r\n            var point = args.GetPosition(View);\r\n            var column = (int) Math.Ceiling(point.X / 79);\r\n            var row = (int) Math.Ceiling(point.Y / 70);\r\n\r\n            if (column <= 0 || row <= 0) return;\r\n\r\n            //Debug.WriteLine(\"{0}-{1}\", column, row);\r\n\r\n            var itemIndex = (row - 1) * EmojiData.ItemsInRow + (column - 1);\r\n\r\n            var emoji = EmojiDataItem.GetByIndex(CategoryIndex, SpriteOffset, itemIndex);\r\n            if (emoji != null)\r\n                EmojiSelected(null, emoji);\r\n        }\r\n\r\n        private static Rectangle _currentHighlight;\r\n\r\n        private void CreateBorders()\r\n        {\r\n            for (int i = 0; i < Rows + 1; i++)\r\n            {\r\n                var line = new Rectangle\r\n                {\r\n                    Width = SpriteWidth + 4,\r\n                    Height = 2,\r\n                    Fill = (Brush) Application.Current.Resources[\"PhoneChromeBrush\"],\r\n                    Margin = new Thickness(0, i * RowHeight, 0, 0),\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top\r\n                };\r\n                Children.Add(line);\r\n            }\r\n\r\n            for (int i = 0; i < 5; i++)\r\n            {\r\n                var line = new Rectangle\r\n                {\r\n                    Width = 2,\r\n                    Height = RowHeight * Rows,\r\n                    Fill = (Brush) Application.Current.Resources[\"PhoneChromeBrush\"],\r\n                    Margin = new Thickness((i + 1) * ColumnWidth + 2, 0, 0, 0),\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top\r\n                };\r\n                Children.Add(line);\r\n            }\r\n\r\n            if (Rows < MaxRowsInSprite)\r\n            {\r\n                var missingRows = EmojiData.SpriteMissingCellsByCategory[CategoryIndex];\r\n                var startIndex = EmojiData.ItemsInRow - missingRows;\r\n\r\n                var width = missingRows * ColumnWidth;\r\n                var horizontalOffset = startIndex * ColumnWidth + 4;\r\n\r\n                var rect = new Rectangle\r\n                {\r\n                    Fill = (Brush) Application.Current.Resources[\"PhoneChromeBrush\"],\r\n                    Width = width,\r\n                    Height = RowHeight,\r\n                    Margin = new Thickness(horizontalOffset, (Rows - 1) * RowHeight, 0, 0),\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top\r\n                };\r\n                Children.Add(rect);\r\n            }\r\n        }\r\n\r\n        public const int SpriteWidth = 472;\r\n        public const int SpriteHeight = 420;\r\n        public const int ColumnWidth = 79;\r\n        public const int RowHeight = 70; // 105 in pixel logic\r\n\r\n        public const int MaxRowsInSprite = 6;\r\n\r\n        public override double FixedHeight\r\n        {\r\n            get { return RowHeight * Rows; }\r\n            set { }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Controls/Utilites/DelayedExecutor.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing Microsoft.Phone.Logging;\r\n\r\nnamespace Telegram.Controls.Utilities\r\n{\r\n    public class DelayedExecutor\r\n    {\r\n        class ExecutionInfo\r\n        {\r\n            public Action Action { get; set; }\r\n            public DateTime Timestamp { get; set; }\r\n        }\r\n\r\n        ExecutionInfo m_executionInfo;\r\n        Timer m_timer;\r\n        int m_delay;\r\n        bool m_timerIsActive;\r\n        object m_lockObj = new object();\r\n\r\n        public DelayedExecutor(int delay) // TO DO : add IDateTimeProvider dependency to remove dependency on DateTime\r\n        {\r\n            m_delay = delay;\r\n            m_timer = new Timer(TimerCallback);\r\n        }\r\n\r\n        public void AddToDelayedExecution(Action action)\r\n        {\r\n            lock (m_lockObj)\r\n            {\r\n                m_executionInfo = new ExecutionInfo() { Action = action, Timestamp = DateTime.Now };\r\n            }\r\n\r\n            ChangeTimer(true);\r\n        }\r\n\r\n        private void TimerCallback(object state)\r\n        {\r\n            Action executeAction = null;\r\n\r\n            lock (m_lockObj)\r\n            {\r\n                if (m_executionInfo != null)\r\n                {\r\n                    if (DateTime.Now - m_executionInfo.Timestamp >= TimeSpan.FromMilliseconds(m_delay))\r\n                    {\r\n                        Debug.WriteLine(\"Action is set to be executed.\");\r\n                        executeAction = m_executionInfo.Action;\r\n                        m_executionInfo = null;\r\n                        ChangeTimer(false);\r\n                    }\r\n                }\r\n            }\r\n            if (executeAction != null)\r\n            {\r\n                try\r\n                {\r\n                    executeAction();\r\n                }\r\n                catch (Exception exc)\r\n                {\r\n                    //Logger.Instance.Error(\"Exeption during delayed execution\", exc);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ChangeTimer(bool activate)\r\n        {\r\n            if (activate && !m_timerIsActive)\r\n            {\r\n                lock (m_timer)\r\n                {\r\n                    m_timerIsActive = true;\r\n                    m_timer.Change(m_delay, m_delay);\r\n                }\r\n            }\r\n            else if (!activate && m_timerIsActive)\r\n            {\r\n                lock (m_timer)\r\n                {\r\n                    m_timerIsActive = false;\r\n                    m_timer.Change(Timeout.Infinite, 0);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Controls/Utilites/Helpers.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\n\r\nnamespace EmojiPanel.Controls.Utilites\r\n{\r\n    public static class Helpers\r\n    {\r\n        public static Uri GetAssetUri(string assetName)\r\n        {\r\n            switch (Application.Current.Host.Content.ScaleFactor)\r\n            {\r\n                case 100:\r\n                    return new Uri(String.Format(\"/Assets/{0}-WVGA.png\", assetName), UriKind.Relative);\r\n                case 160:\r\n                    return new Uri(String.Format(\"/Assets/{0}-WXGA.png\", assetName), UriKind.Relative);\r\n                case 150:\r\n                    return new Uri(String.Format(\"/Assets/{0}-720p.png\", assetName), UriKind.Relative);\r\n                default:\r\n                    return new Uri(String.Format(\"/Assets/{0}-WVGA.png\", assetName), UriKind.Relative);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Controls/Utilites/MyListItemBase.cs",
    "content": "﻿using System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing Telegram.Controls.VirtualizedView;\r\n\r\nnamespace Telegram.Controls.VirtualizedView\r\n{\r\n    public class MyListItemBase : Grid\r\n    {\r\n        //private Panel _contentPanel;\r\n        //public Panel ContentPanel\r\n        //{\r\n        //    get\r\n        //    {\r\n        //        return _contentPanel;\r\n        //    }\r\n        //    set\r\n        //    {\r\n        //        _contentPanel = value;\r\n        //        Content = _contentPanel;\r\n        //    }\r\n        //}\r\n\r\n        public VListItemBase VirtSource { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Controls/Utilites/MyVirtualizingPanel.cs",
    "content": "﻿using System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing Telegram.Controls.Utilities;\r\n\r\nnamespace Telegram.Controls.VirtualizedView\r\n{\r\n    public class MyVirtualizingPanel : Canvas\r\n    {\r\n        private const bool IsLogEnabled = false;\r\n\r\n        private static void Log(string str)\r\n        {\r\n            if (IsLogEnabled)\r\n            {\r\n                Debug.WriteLine(str);\r\n            }\r\n        }\r\n\r\n\r\n        private const double LoadUnloadThreshold = 500;\r\n        private const double LoadedHeightUpwards = 300;\r\n        private const double LoadedHeightDownwards = 900;\r\n        private const double LoadedHeightDownwardsNotScrolling = 800;\r\n\r\n        private bool _changingVerticalOffset = false;\r\n\r\n        readonly DependencyProperty _listVerticalOffsetProperty = DependencyProperty.Register(\r\n             \"ListVerticalOffset\",\r\n             typeof(double),\r\n             typeof(MyVirtualizingPanel),\r\n             new PropertyMetadata(new PropertyChangedCallback(OnListVerticalOffsetChanged)));\r\n\r\n        public double ListVerticalOffset\r\n        {\r\n            get { return (double) this.GetValue(_listVerticalOffsetProperty); }\r\n            set { this.SetValue(_listVerticalOffsetProperty, value); }\r\n        }\r\n\r\n        private static void OnListVerticalOffsetChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = (MyVirtualizingPanel) obj;\r\n            control.OnListVerticalOffsetChanged();\r\n        }\r\n\r\n        private ScrollViewer _scrollViewer;\r\n        bool _isScrolling = false;\r\n\r\n        public ScrollViewer ScrollViewer\r\n        {\r\n            get { return _scrollViewer; }\r\n        }\r\n\r\n        public void InitializeWithScrollViewer(ScrollViewer scrollViewer)\r\n        {\r\n            _scrollViewer = scrollViewer;\r\n            EnsureBoundToScrollViewer();\r\n        }\r\n\r\n        protected void EnsureBoundToScrollViewer()\r\n        {\r\n            Binding binding = new Binding\r\n            {\r\n                Source = _scrollViewer,\r\n                Path = new PropertyPath(\"VerticalOffset\"),\r\n                Mode = BindingMode.OneWay\r\n            };\r\n            this.SetBinding(_listVerticalOffsetProperty, binding);\r\n\r\n\r\n        }\r\n\r\n        bool _notReactToScroll = false;\r\n        private double _savedDelta;\r\n        //private DelayedExecutor _de = new DelayedExecutor(300);\r\n        //internal void PrepareForScrollToBottom()\r\n        //{\r\n        //    _notReactToScroll = true;\r\n        //    _savedDelta = DeltaOffset;\r\n        //    // load in the end\r\n        //    DeltaOffset = _scrollViewer.ExtentHeight - _scrollViewer.ViewportHeight - _scrollViewer.VerticalOffset;\r\n        //    Debug.WriteLine(\"PrepareForScrollToBottom\");\r\n        //    PerformLoadUnload2(VirtualizableState.LoadedPartially, false);\r\n        //    _de.AddToDelayedExecution(() =>\r\n        //        {\r\n        //            Execute.ExecuteOnUIThread(() => ScrollToBottomCompleted());\r\n        //        });\r\n        //}\r\n\r\n        //internal void ScrollToBottomCompleted()\r\n        //{\r\n        //    _notReactToScroll = false;\r\n        //    DeltaOffset = _savedDelta;\r\n        //    PerformLoadUnload(VirtualizableState.LoadedFully);\r\n        //    Debug.WriteLine(\"ScrolltoBottomCompleted\");\r\n        //}\r\n\r\n        private void group_CurrentStateChanging(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            if (e.NewState.Name == \"Scrolling\")\r\n            {\r\n                _isScrolling = true;\r\n            }\r\n            else\r\n            {\r\n                _isScrolling = false;\r\n                PerformLoadUnload(true);\r\n            }\r\n        }\r\n\r\n        private static VisualStateGroup FindVisualState(FrameworkElement element, string name)\r\n        {\r\n            if (element == null)\r\n                return null;\r\n\r\n            IList groups = VisualStateManager.GetVisualStateGroups(element);\r\n            foreach (VisualStateGroup group in groups)\r\n                if (group.Name == name)\r\n                    return group;\r\n\r\n            return null;\r\n        }\r\n\r\n        public class ScrollPositionChangedEventAgrs : EventArgs\r\n        {\r\n            public double CurrentPosition { get; private set; }\r\n            public double ScrollHeight { get; private set; }\r\n\r\n            public ScrollPositionChangedEventAgrs(double currentPosition,\r\n                double scrollHeight)\r\n            {\r\n                CurrentPosition = currentPosition;\r\n                ScrollHeight = scrollHeight;\r\n            }\r\n        }\r\n\r\n        public event EventHandler<ScrollPositionChangedEventAgrs> ScrollPositionChanged;\r\n\r\n        private double _previousScrollOffset = 0;\r\n        private DateTime _previousScrollOffsetChangedTime = DateTime.MinValue;\r\n        private const double PixelsPerSecondThreshold = 200;\r\n\r\n        private void OnListVerticalOffsetChanged()\r\n        {\r\n            if (_notReactToScroll) return;\r\n\r\n            if (!_changingVerticalOffset)\r\n            {\r\n\r\n                var w = new Stopwatch();\r\n                w.Start();\r\n                PerformLoadUnload(true);\r\n                w.Stop();\r\n\r\n                Log(\"LOADUNLOAD performed in \" + w.ElapsedMilliseconds);\r\n\r\n                if (ScrollPositionChanged != null)\r\n                {\r\n                    ScrollPositionChanged(this, new ScrollPositionChangedEventAgrs(\r\n                        _scrollViewer.VerticalOffset,\r\n                        Height));\r\n                }\r\n\r\n                Log(\"Reported Offset: \" + _scrollViewer.VerticalOffset);\r\n            }\r\n        }\r\n\r\n        private bool DetermineIfScrollingIsFast()\r\n        {\r\n            var now = DateTime.Now;\r\n            var result = false;\r\n            if (_previousScrollOffsetChangedTime != DateTime.Now)\r\n            {\r\n                var scrolledPixels = Math.Abs(_scrollViewer.VerticalOffset - _previousScrollOffset);\r\n                var timeInSeconds = (now - _previousScrollOffsetChangedTime).TotalSeconds;\r\n\r\n                if (scrolledPixels != 0)\r\n                {\r\n                    var speedPixelsPerSecond = scrolledPixels / timeInSeconds;\r\n                    Log(String.Format(\"Speed of scroll {0} \", speedPixelsPerSecond));\r\n\r\n                    if (speedPixelsPerSecond > PixelsPerSecondThreshold)\r\n                    {\r\n                        result = true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            _previousScrollOffsetChangedTime = now;\r\n            _previousScrollOffset = _scrollViewer.VerticalOffset;\r\n            return result;\r\n        }\r\n\r\n        private readonly List<VListItemBase> _virtItems = new List<VListItemBase>();\r\n\r\n        // indexes of loaded items\r\n        private Segment _loadedSegment = new Segment();\r\n\r\n        // maps a point to its index in _virtItems\r\n        // covers only points 0, LoadUnloadThreshold, 2*LoadUnloadThreshold, etc\r\n        private readonly Dictionary<int, int> _thresholdPointIndexes = new Dictionary<int, int>();\r\n\r\n\r\n        // do not change through this property\r\n        public List<VListItemBase> VirtItems\r\n        {\r\n            get { return _virtItems; }\r\n        }\r\n\r\n        public MyVirtualizingPanel()\r\n        {\r\n            Loaded += MyVirtualizingPanel_Loaded;\r\n        }\r\n\r\n        void MyVirtualizingPanel_Loaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!DesignerProperties.GetIsInDesignMode(this))\r\n            {\r\n                // Visual States are always on the first child of the control template \r\n                FrameworkElement element = VisualTreeHelper.GetChild(_scrollViewer, 0) as FrameworkElement;\r\n                if (element != null)\r\n                {\r\n                    VisualStateGroup group = FindVisualState(element, \"ScrollStates\");\r\n                    if (group != null)\r\n                    {\r\n                        group.CurrentStateChanging += group_CurrentStateChanging;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void AddItems(IEnumerable<VListItemBase> _itemsToBeAdded)\r\n        {\r\n            var sw = new Stopwatch();\r\n            sw.Start();\r\n\r\n            double topMargin = 0;\r\n\r\n            if (_virtItems.Count > 0)\r\n            {\r\n                topMargin = _virtItems.Sum(vi => vi.FixedHeight);\r\n            }\r\n\r\n            foreach (var itemToBeAdded in _itemsToBeAdded)\r\n            {\r\n                itemToBeAdded.View.Margin = new Thickness(itemToBeAdded.Margin.Left, itemToBeAdded.Margin.Top + topMargin, itemToBeAdded.Margin.Right, itemToBeAdded.Margin.Bottom);\r\n\r\n                _virtItems.Add(itemToBeAdded);\r\n\r\n                var itemHeightIncludingMargin = itemToBeAdded.FixedHeight;\r\n\r\n                List<int> coveredPoints = GetCoveredPoints(topMargin, topMargin + itemHeightIncludingMargin);\r\n\r\n                foreach (var coveredPoint in coveredPoints)\r\n                {\r\n                    _thresholdPointIndexes[coveredPoint] = _virtItems.Count - 1; // index of the last\r\n                }\r\n\r\n                topMargin += itemHeightIncludingMargin;\r\n            }\r\n\r\n            PerformLoadUnload(true);\r\n\r\n            Height = topMargin;\r\n\r\n            sw.Stop();\r\n\r\n            Log(String.Format(\"MyVirtualizingPanel.AddItems {0}\", sw.ElapsedMilliseconds));\r\n        }\r\n\r\n\r\n        public void InsertRemoveItems(int index, List<VListItemBase> itemsToInsert, bool keepItemsBelowIndexFixed = false, VListItemBase itemToRemove = null)\r\n        {\r\n            bool needToAdjustScrollPositionAfterInsertion = false;\r\n\r\n            if (keepItemsBelowIndexFixed)\r\n            {\r\n                double totalHeightOfAllItemsBeforeIndex = 0;\r\n\r\n                for (int i = 0; i < index; i++)\r\n                {\r\n                    totalHeightOfAllItemsBeforeIndex += VirtItems[i].FixedHeight + VirtItems[i].Margin.Top + VirtItems[i].Margin.Bottom;\r\n                }\r\n\r\n                if (totalHeightOfAllItemsBeforeIndex < _scrollViewer.VerticalOffset + _scrollViewer.ViewportHeight)\r\n                {\r\n                    needToAdjustScrollPositionAfterInsertion = true;\r\n                }\r\n            }\r\n\r\n            //  UnloadItemsInSegment(_loadedSegment);\r\n            _loadedSegment = new Segment();\r\n\r\n            var totalHeight = itemsToInsert.Sum(i => i.FixedHeight + i.Margin.Top + i.Margin.Bottom);\r\n\r\n            _virtItems.InsertRange(index, itemsToInsert);\r\n\r\n            if (itemToRemove != null)\r\n            {\r\n                itemToRemove.IsVLoaded = false;\r\n                totalHeight -= itemToRemove.FixedHeight + itemToRemove.Margin.Top + itemToRemove.Margin.Bottom;\r\n                _virtItems.Remove(itemToRemove);\r\n            }\r\n\r\n\r\n            RearrangeAllItems();\r\n\r\n\r\n            if (needToAdjustScrollPositionAfterInsertion)\r\n            {\r\n                _changingVerticalOffset = true;\r\n                //Debug.WriteLine(\"SCROLLING TO \" + _scrollViewer.VerticalOffset + totalHeight + \" scroll height : \" + _scrollViewer.ExtentHeight);\r\n                _scrollViewer.ScrollToVerticalOffset(_scrollViewer.VerticalOffset + totalHeight);\r\n                _changingVerticalOffset = false;\r\n            }\r\n\r\n            PerformLoadUnload(false);\r\n        }\r\n\r\n        public void RemoveItem(VListItemBase itemToBeRemoved)\r\n        {\r\n            itemToBeRemoved.IsVLoaded = false;\r\n\r\n\r\n            _virtItems.Remove(itemToBeRemoved);\r\n            _loadedSegment = new Segment();\r\n            RearrangeAllItems();\r\n\r\n            PerformLoadUnload(true);\r\n        }\r\n\r\n        private void RearrangeAllItems()\r\n        {\r\n            double topMargin = 0;\r\n            _thresholdPointIndexes.Clear();\r\n            int ind = 0;\r\n            foreach (var item in _virtItems)\r\n            {\r\n                item.View.Margin = new Thickness(item.Margin.Left, item.Margin.Top + topMargin, item.Margin.Right, item.Margin.Bottom);\r\n\r\n                var itemHeightIncludingMargin = item.FixedHeight + item.Margin.Top + item.Margin.Bottom;\r\n\r\n                List<int> coveredPoints = GetCoveredPoints(topMargin, topMargin + itemHeightIncludingMargin);\r\n\r\n                foreach (var coveredPoint in coveredPoints)\r\n                {\r\n                    _thresholdPointIndexes[coveredPoint] = ind; // index of the last\r\n                }\r\n\r\n                topMargin += itemHeightIncludingMargin;\r\n                ind++;\r\n            }\r\n\r\n            Height = topMargin;\r\n            _scrollViewer.UpdateLayout();\r\n        }\r\n\r\n        private void PerformLoadUnload2(bool isToLoad, bool bypassUnload = false)\r\n        {\r\n            if (_virtItems.Count == 0)\r\n                return;\r\n\r\n            double currentOffset = GetRealOffset();\r\n\r\n            int lowestLoadedInd = 0;\r\n            int upperInd = 0;\r\n\r\n            bool triggerLoading = false;\r\n\r\n            if (isToLoad || _loadedSegment.IsEmpty)\r\n            {\r\n                triggerLoading = true;\r\n            }\r\n            else\r\n            {\r\n                lowestLoadedInd = _loadedSegment.LowerBound;\r\n                upperInd = _loadedSegment.UpperBound;\r\n\r\n                double topPoint = _virtItems[lowestLoadedInd].View.Margin.Top;\r\n                double bottomPoint = _virtItems[upperInd].View.Margin.Top + _virtItems[upperInd].FixedHeight;\r\n\r\n                if (currentOffset - topPoint < 500 ||\r\n                    bottomPoint - currentOffset < 1500)\r\n                {\r\n                    triggerLoading = true;\r\n                }\r\n            }\r\n\r\n            if (triggerLoading)\r\n            {\r\n                if (_scrollViewer.ExtentHeight < 3000 && _isScrolling)\r\n                {\r\n                    //Debug.WriteLine(\"Detected short scroll; loading all items\");\r\n                    // otherwise there are glitches in scrolling\r\n                    lowestLoadedInd = 0;\r\n                    upperInd = VirtItems.Count - 1;\r\n                    isToLoad = true;\r\n                }\r\n                else\r\n                {\r\n                    var threshold = (int) Math.Floor((currentOffset - (currentOffset % LoadUnloadThreshold)));\r\n\r\n                    int indexOfBaseItem = _thresholdPointIndexes.ContainsKey(threshold) ? _thresholdPointIndexes[threshold] : -1;\r\n\r\n                    lowestLoadedInd = upperInd = indexOfBaseItem < 0 ? 0 : indexOfBaseItem;\r\n\r\n                    double loadUpwards = LoadedHeightUpwards;\r\n                    double loadDownwards = _isScrolling ? LoadedHeightDownwards : LoadedHeightDownwardsNotScrolling;\r\n\r\n                    //if (_isScrolling)\r\n                    //{\r\n                    //    loadUpwards = LoadUpwardsWhenScrolling;\r\n                    //    loadDownwards = LoadDownwardsWhenScrolling;\r\n                    //}\r\n\r\n                    // count up from the lower point on view\r\n                    while (lowestLoadedInd > 0 && currentOffset - _virtItems[lowestLoadedInd].View.Margin.Top < loadUpwards)\r\n                    {\r\n                        lowestLoadedInd--;\r\n                    }\r\n\r\n                    while (upperInd < _virtItems.Count - 1 && _virtItems[upperInd].View.Margin.Top - currentOffset < loadDownwards)\r\n                    {\r\n                        upperInd++;\r\n                    }\r\n\r\n                }\r\n\r\n                SetLoadedBounds(lowestLoadedInd, upperInd, isToLoad, bypassUnload);\r\n\r\n\r\n                if (IsLogEnabled)\r\n                {\r\n                    string loadedIndexes = \"Loaded indexes : \";\r\n                    for (int i = 0; i < _virtItems.Count; i++)\r\n                    {\r\n                        if (_virtItems[i].IsVLoaded)\r\n                        {\r\n                            loadedIndexes += i + \",\";\r\n                        }\r\n                    }\r\n\r\n                    Log(loadedIndexes);\r\n                }\r\n            }\r\n\r\n        }\r\n\r\n        public double DeltaOffset\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        private double GetRealOffset()\r\n        {\r\n            //// it might throw exception\r\n            //try\r\n            //{\r\n            //    GeneralTransform childTransform = this.TransformToVisual(_listScrollViewer);\r\n\r\n            //    var p = childTransform.Transform(new Point(0, 0));\r\n\r\n            //    var delta = p.Y;\r\n            //    Debug.WriteLine(\"DELTA offset =\" + delta + \"; VerticalOffset=\" + _listScrollViewer.VerticalOffset);\r\n\r\n            //    return -delta;\r\n            //}\r\n            //catch (Exception exc)\r\n            //{\r\n            //    return _listScrollViewer.VerticalOffset;\r\n            //}\r\n\r\n            return _scrollViewer.VerticalOffset + DeltaOffset;\r\n        }\r\n\r\n        private void PerformLoadUnload(bool isToLoad)\r\n        {\r\n            PerformLoadUnload2(isToLoad);\r\n        }\r\n\r\n        private void SetLoadedBounds(int lowerBoundInd, int upperBoundInd, bool isToLoad, bool bypassUnload = false)\r\n        {\r\n            var newLoadedSegment = new Segment(lowerBoundInd, upperBoundInd);\r\n\r\n            Segment newMinusLoaded1;\r\n            Segment newMinusLoaded2;\r\n            Segment intersection;\r\n            Segment loadedMinusNew1;\r\n            Segment loadedMinusNew2;\r\n\r\n            newLoadedSegment.CompareToSegment(_loadedSegment,\r\n                out newMinusLoaded1,\r\n                out newMinusLoaded2,\r\n                out intersection,\r\n                out loadedMinusNew1,\r\n                out loadedMinusNew2);\r\n\r\n\r\n            Log(String.Format(\"LoadedSegment:{0}, NewSegment:{1}, NewMinusLoaded1:{2}, NewMinusLoaded2:{3}, loadedMinusNew1:{4}, loadedMinusNew2:{5}\",\r\n                _loadedSegment,\r\n                newLoadedSegment,\r\n                newMinusLoaded1,\r\n                newMinusLoaded2,\r\n                loadedMinusNew1,\r\n                loadedMinusNew2));\r\n\r\n            if (isToLoad)\r\n            {\r\n                // ensure items are loaded fully for the whole segment\r\n                LoadItemsInSegment(newLoadedSegment);\r\n            }\r\n\r\n            if (!bypassUnload)\r\n            {\r\n                UnloadItemsInSegment(loadedMinusNew1);\r\n                UnloadItemsInSegment(loadedMinusNew2);\r\n            }\r\n            _loadedSegment = newLoadedSegment;\r\n\r\n        }\r\n\r\n        private void UnloadItemsInSegment(Segment segment)\r\n        {\r\n            for (int i = segment.LowerBound; i <= segment.UpperBound; i++)\r\n            {\r\n                var item = _virtItems[i];\r\n\r\n                Children.Remove(item.View);\r\n\r\n                item.IsVLoaded = false;\r\n            }\r\n        }\r\n\r\n        private void LoadItemsInSegment(Segment segment)\r\n        {\r\n            for (int i = segment.LowerBound; i <= segment.UpperBound; i++)\r\n            {\r\n                var item = _virtItems[i];\r\n\r\n                item.IsVLoaded = true;\r\n\r\n                if (!Children.Contains(item.View))\r\n                {\r\n                    Children.Add(item.View);\r\n                }\r\n            }\r\n        }\r\n\r\n        private List<int> GetCoveredPoints(double from, double to)\r\n        {\r\n\r\n            var result = new List<int>();\r\n\r\n            var candidate = from - (from % LoadUnloadThreshold);\r\n\r\n            while (candidate <= to)\r\n            {\r\n                if (candidate >= from)\r\n                {\r\n                    result.Add((int) Math.Floor(candidate));\r\n                }\r\n                candidate += LoadUnloadThreshold;\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public void ClearItems()\r\n        {\r\n            _virtItems.Clear();\r\n            Children.Clear();\r\n            _loadedSegment = new Segment();\r\n            _thresholdPointIndexes.Clear();\r\n            _scrollViewer.ScrollToVerticalOffset(0);\r\n            Height = 0;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Controls/Utilites/VListItemBase.cs",
    "content": "﻿using System.Collections.Generic;\r\nusing System.Windows;\r\nusing Rectangle = System.Windows.Shapes.Rectangle;\r\n\r\nnamespace Telegram.Controls.VirtualizedView\r\n{\r\n    public abstract class VListItemBase\r\n    {\r\n        private readonly List<FrameworkElement> _children = new List<FrameworkElement>();\r\n\r\n        public MyListItemBase View { get; private set; }\r\n\r\n        public List<FrameworkElement> Children\r\n        {\r\n            get { return _children; }\r\n        }\r\n\r\n        protected VListItemBase()\r\n        {\r\n            View = new MyListItemBase\r\n            {\r\n                VirtSource = this,\r\n                Width = 440\r\n            };\r\n        }\r\n        public abstract double FixedHeight { get; set; }\r\n\r\n        public Thickness Margin = new Thickness();\r\n\r\n        public virtual object ItemSource { get; set; }\r\n\r\n        private bool _isVLoaded;\r\n\r\n        public bool IsVLoaded\r\n        {\r\n            get { return _isVLoaded; }\r\n            set\r\n            {\r\n                if (value != IsVLoaded)\r\n                {\r\n                    if (value) Load();\r\n                    else Unload();\r\n                }\r\n                _isVLoaded = value;\r\n            }\r\n        }\r\n\r\n        public virtual void Load()\r\n        {\r\n            if (View.Children.Count == 0)\r\n                foreach (var child in _children)\r\n                    View.Children.Add(child);\r\n        }\r\n\r\n        public virtual void Unload()\r\n        {\r\n            View.Children.Clear();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Controls/Utilites/VirtSegment.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace Telegram.Controls.Utilities\r\n{\r\n    public class Segment\r\n    {\r\n        public int LowerBound { get; private set; }\r\n        public int UpperBound { get; private set; }\r\n\r\n        public bool IsEmpty { get { return UpperBound < LowerBound; } }\r\n\r\n        public Segment(int lowerBound, int upperBound)\r\n        {\r\n            LowerBound = lowerBound;\r\n            UpperBound = upperBound;\r\n        }\r\n\r\n        public Segment()\r\n            : this(0, -1)\r\n        {\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            if (IsEmpty) return \"[]\";\r\n            return String.Format(\"[{0},{1}]\", LowerBound, UpperBound);\r\n        }\r\n\r\n        public void CompareToSegment(\r\n            Segment otherSegment,\r\n            out Segment thisMinusOther1,\r\n            out Segment thisMinusOther2,\r\n            out Segment intersection,\r\n            out Segment otherMinusThis1,\r\n            out Segment otherMinusThis2)\r\n        {\r\n\r\n            thisMinusOther1 = new Segment();\r\n            thisMinusOther2 = new Segment();\r\n            intersection = new Segment();\r\n            otherMinusThis1 = new Segment();\r\n            otherMinusThis2 = new Segment();\r\n\r\n\r\n            if (this.IsEmpty)\r\n            {\r\n                otherMinusThis1 = otherSegment;\r\n                return;\r\n            }\r\n\r\n            if (otherSegment.IsEmpty)\r\n            {\r\n                thisMinusOther1 = this;\r\n                return;\r\n            }\r\n\r\n            if (this.UpperBound < otherSegment.LowerBound)\r\n            {\r\n\r\n                // do not intersect\r\n\r\n                thisMinusOther1 = this;\r\n\r\n                otherMinusThis1 = otherSegment;\r\n\r\n                return;\r\n            }\r\n\r\n\r\n            if (this.LowerBound < otherSegment.LowerBound &&\r\n                this.UpperBound >= otherSegment.LowerBound &&\r\n                this.UpperBound <= otherSegment.UpperBound)\r\n            {\r\n                thisMinusOther1 = new Segment(this.LowerBound, otherSegment.LowerBound - 1);\r\n                intersection = new Segment(otherSegment.LowerBound, this.UpperBound);\r\n                otherMinusThis1 = new Segment(this.UpperBound + 1, otherSegment.UpperBound);\r\n                return;\r\n            }\r\n\r\n            if (this.LowerBound >= otherSegment.LowerBound &&\r\n                this.UpperBound <= otherSegment.UpperBound)\r\n            {\r\n                intersection = this;\r\n                otherMinusThis1 = new Segment(otherSegment.LowerBound, this.LowerBound - 1);\r\n                otherMinusThis2 = new Segment(this.UpperBound + 1, otherSegment.UpperBound);\r\n                return;\r\n            }\r\n\r\n            otherSegment.CompareToSegment(this,\r\n                out otherMinusThis1,\r\n                out otherMinusThis2,\r\n                out intersection,\r\n                out thisMinusOther1,\r\n                out thisMinusOther2);\r\n\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/EmojiPanel.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{2FCB4C15-FE40-496F-87D6-84220F3F07F8}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>EmojiPanel</RootNamespace>\r\n    <AssemblyName>EmojiPanel</AssemblyName>\r\n    <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>\r\n    </SilverlightVersion>\r\n    <TargetFrameworkProfile>\r\n    </TargetFrameworkProfile>\r\n    <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>\r\n    <SilverlightApplication>true</SilverlightApplication>\r\n    <SupportedCultures>\r\n    </SupportedCultures>\r\n    <XapOutputs>true</XapOutputs>\r\n    <GenerateSilverlightManifest>true</GenerateSilverlightManifest>\r\n    <XapFilename>EmojiPanel_$(Configuration)_$(Platform).xap</XapFilename>\r\n    <SilverlightManifestTemplate>Properties\\AppManifest.xml</SilverlightManifestTemplate>\r\n    <SilverlightAppEntry>EmojiPanel.App</SilverlightAppEntry>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <FileUpgradeFlags>\r\n    </FileUpgradeFlags>\r\n    <UpgradeBackupLocation>\r\n    </UpgradeBackupLocation>\r\n    <OldToolsVersion>4.0</OldToolsVersion>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n    <PublishUrl>publish\\</PublishUrl>\r\n    <Install>true</Install>\r\n    <InstallFrom>Disk</InstallFrom>\r\n    <UpdateEnabled>false</UpdateEnabled>\r\n    <UpdateMode>Foreground</UpdateMode>\r\n    <UpdateInterval>7</UpdateInterval>\r\n    <UpdateIntervalUnits>Days</UpdateIntervalUnits>\r\n    <UpdatePeriodically>false</UpdatePeriodically>\r\n    <UpdateRequired>false</UpdateRequired>\r\n    <MapFileExtensions>true</MapFileExtensions>\r\n    <ApplicationRevision>0</ApplicationRevision>\r\n    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>\r\n    <IsWebBootstrapper>false</IsWebBootstrapper>\r\n    <UseApplicationTrust>false</UseApplicationTrust>\r\n    <BootstrapperEnabled>true</BootstrapperEnabled>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x86'\">\r\n    <PlatformTarget />\r\n    <OutputPath>Bin\\x86\\Debug</OutputPath>\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x86'\">\r\n    <PlatformTarget />\r\n    <OutputPath>Bin\\x86\\Release</OutputPath>\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|ARM'\">\r\n    <PlatformTarget />\r\n    <OutputPath>Bin\\ARM\\Debug</OutputPath>\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|ARM'\">\r\n    <PlatformTarget />\r\n    <OutputPath>Bin\\ARM\\Release</OutputPath>\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"App.xaml.cs\">\r\n      <DependentUpon>App.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Controls\\Emoji\\EmojiControl.xaml.cs\">\r\n      <DependentUpon>EmojiControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Controls\\Emoji\\EmojiData.cs\" />\r\n    <Compile Include=\"Controls\\Emoji\\EmojiSpriteItem.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\Helpers.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\MyListItemBase.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\DelayedExecutor.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\VirtSegment.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\MyVirtualizingPanel.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\VListItemBase.cs\" />\r\n    <Compile Include=\"MainPage.xaml.cs\">\r\n      <DependentUpon>MainPage.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ApplicationDefinition Include=\"App.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </ApplicationDefinition>\r\n    <Page Include=\"Controls\\Emoji\\EmojiControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"MainPage.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"Properties\\AppManifest.xml\" />\r\n    <None Include=\"Properties\\WMAppManifest.xml\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"ApplicationIcon.png\">\r\n      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\AppBarIcons\\appbar.smile.png\" />\r\n    <Content Include=\"Assets\\emoji.abc-720p.png\" />\r\n    <Content Include=\"Assets\\emoji.abc-WVGA.png\" />\r\n    <Content Include=\"Assets\\emoji.abc-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.backspace-720p.png\" />\r\n    <Content Include=\"Assets\\emoji.backspace-WVGA.png\" />\r\n    <Content Include=\"Assets\\emoji.backspace-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.1-720p.png\" />\r\n    <Content Include=\"Assets\\emoji.category.1-WVGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.1-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.2-720p.png\" />\r\n    <Content Include=\"Assets\\emoji.category.2-WVGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.2-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.3-720p.png\" />\r\n    <Content Include=\"Assets\\emoji.category.3-WVGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.3-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.4-720p.png\" />\r\n    <Content Include=\"Assets\\emoji.category.4-WVGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.4-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.5-720p.png\" />\r\n    <Content Include=\"Assets\\emoji.category.5-WVGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.5-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.recent-720p.png\" />\r\n    <Content Include=\"Assets\\emoji.recent-WVGA.png\" />\r\n    <Content Include=\"Assets\\emoji.recent-WXGA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\0023-fe0f-20e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\0030-fe0f-20e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\0031-fe0f-20e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\0032-fe0f-20e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\0033-fe0f-20e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\0034-fe0f-20e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\0035-fe0f-20e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\0036-fe0f-20e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\0037-fe0f-20e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\0038-fe0f-20e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\0039-fe0f-20e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\00a9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\00ae.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f004-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f0cf.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f170.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f171.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f17e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f17f-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f18e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f191.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f192.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f193.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f194.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f195.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f196.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f197.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f198.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f199.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f19a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f1e8-1f1f3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f1e9-1f1ea.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f1ea-1f1f8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f1eb-1f1f7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f1ec-1f1e7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f1ee-1f1f9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f1ef-1f1f5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f1f0-1f1f7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f1f7-1f1fa.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f1fa-1f1f8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f201.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f202.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f21a-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f22f-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f232.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f233.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f234.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f235.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f236.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f237.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f238.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f239.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f23a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f250.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f251.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f300.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f301.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f302.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f303.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f304.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f305.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f306.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f307.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f308.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f309.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f30a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f30b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f30c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f30d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f30e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f30f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f310.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f311.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f312.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f313.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f314.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f315.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f316.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f317.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f318.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f319.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f31a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f31b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f31c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f31d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f31e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f31f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f320.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f330.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f331.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f332.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f333.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f334.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f335.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f337.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f338.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f339.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f33a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f33b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f33c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f33d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f33e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f33f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f340.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f341.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f342.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f343.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f344.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f345.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f346.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f347.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f348.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f349.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f34a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f34b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f34c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f34d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f34e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f34f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f350.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f351.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f352.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f353.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f354.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f355.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f356.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f357.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f358.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f359.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f35a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f35b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f35c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f35d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f35e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f35f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f360.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f361.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f362.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f363.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f364.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f365.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f366.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f367.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f368.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f369.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f36a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f36b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f36c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f36d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f36e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f36f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f370.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f371.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f372.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f373.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f374.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f375.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f376.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f377.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f378.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f379.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f37a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f37b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f37c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f380.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f381.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f382.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f383.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f384.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f385.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f386.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f387.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f388.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f389.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f38a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f38b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f38c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f38d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f38e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f38f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f390.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f391.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f392.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f393.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3a0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3a1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3a2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3a3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3a4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3a5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3a6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3a7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3a8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3a9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3aa.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3ab.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3ac.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3ad.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3ae.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3af.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3b0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3b1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3b2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3b3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3b4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3b5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3b6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3b7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3b8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3b9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3ba.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3bb.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3bc.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3bd.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3be.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3bf.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3c0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3c1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3c2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3c3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3c4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3c6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3c7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3c8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3c9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3ca.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3e0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3e1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3e2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3e4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3e5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3e6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3e7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3e8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3e9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3ea.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3eb.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3ec.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3ed.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3ee.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3ef.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f3f0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f400.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f401.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f402.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f403.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f404.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f405.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f406.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f407.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f408.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f409.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f40a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f40b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f40c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f40d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f40e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f40f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f410.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f411.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f412.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f413.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f414.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f415.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f416.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f417.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f418.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f419.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f41a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f41b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f41c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f41d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f41e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f41f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f420.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f421.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f422.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f423.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f424.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f425.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f426.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f427.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f428.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f429.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f42a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f42b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f42c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f42d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f42e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f42f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f430.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f431.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f432.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f433.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f434.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f435.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f436.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f437.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f438.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f439.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f43a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f43b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f43c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f43d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f43e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f440.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f442.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f443.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f444.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f445.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f446.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f447.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f448.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f449.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f44a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f44b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f44c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f44d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f44e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f44f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f450.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f451.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f452.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f453.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f454.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f455.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f456.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f457.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f458.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f459.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f45a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f45b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f45c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f45d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f45e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f45f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f460.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f461.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f462.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f463.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f464.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f465.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f466.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f467.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f468.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f469.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f46a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f46b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f46c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f46d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f46e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f46f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f470.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f471.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f472.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f473.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f474.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f475.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f476.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f477.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f478.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f479.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f47a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f47b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f47c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f47d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f47e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f47f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f480.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f481.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f482.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f483.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f484.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f485.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f486.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f487.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f488.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f489.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f48a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f48b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f48c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f48d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f48e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f48f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f490.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f491.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f492.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f493.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f494.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f495.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f496.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f497.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f498.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f499.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f49a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f49b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f49c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f49d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f49e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f49f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4a0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4a1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4a2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4a3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4a4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4a5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4a6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4a7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4a8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4a9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4aa.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ab.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ac.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ad.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ae.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4af.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4b0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4b1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4b2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4b3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4b4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4b5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4b6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4b7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4b8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4b9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ba.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4bb.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4bc.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4bd.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4be.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4bf.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4c0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4c1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4c2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4c3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4c4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4c5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4c6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4c7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4c8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4c9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ca.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4cb.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4cc.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4cd.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ce.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4cf.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4d0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4d1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4d2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4d3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4d4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4d5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4d6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4d7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4d8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4d9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4da.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4db.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4dc.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4dd.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4de.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4df.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4e0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4e1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4e2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4e3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4e4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4e5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4e6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4e7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4e8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4e9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ea.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4eb.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ec.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ed.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ee.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4ef.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4f0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4f1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4f2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4f3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4f4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4f5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4f6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4f7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4f9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4fa.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4fb.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f4fc.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f500.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f501.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f502.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f503.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f504.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f505.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f506.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f507.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f508.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f509.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f50a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f50b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f50c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f50d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f50e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f50f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f510.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f511.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f512.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f513.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f514.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f515.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f516.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f517.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f518.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f519.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f51a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f51b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f51c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f51d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f51e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f51f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f520.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f521.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f522.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f523.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f524.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f525.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f526.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f527.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f528.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f529.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f52a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f52b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f52c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f52d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f52e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f52f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f530.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f531.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f532.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f533.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f534.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f535.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f536.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f537.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f538.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f539.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f53a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f53b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f53c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f53d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f550.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f551.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f552.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f553.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f554.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f555.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f556.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f557.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f558.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f559.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f55a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f55b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f55c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f55d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f55e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f55f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f560.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f561.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f562.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f563.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f564.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f565.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f566.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f567.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f5fb.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f5fc.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f5fd.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f5fe.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f5ff.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f600.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f601.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f602.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f603.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f604.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f605.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f606.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f607.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f608.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f609.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f60a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f60b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f60c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f60d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f60e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f60f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f610.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f611.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f612.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f613.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f614.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f615.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f616.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f617.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f618.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f619.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f61a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f61b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f61c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f61d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f61e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f61f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f620.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f621.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f622.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f623.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f624.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f625.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f626.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f627.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f628.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f629.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f62a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f62b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f62c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f62d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f62e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f62f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f630.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f631.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f632.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f633.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f634.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f635.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f636.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f637.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f638.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f639.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f63a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f63b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f63c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f63d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f63e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f63f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f640.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f645.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f646.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f647.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f648.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f649.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f64a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f64b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f64c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f64d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f64e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f64f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f680.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f681.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f682.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f683.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f684.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f685.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f686.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f687.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f688.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f689.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f68a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f68b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f68c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f68d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f68e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f68f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f690.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f691.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f692.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f693.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f694.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f695.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f696.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f697.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f698.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f699.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f69a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f69b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f69c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f69d.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f69e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f69f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6a0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6a1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6a2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6a3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6a4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6a5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6a6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6a7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6a8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6a9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6aa.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6ab.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6ac.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6ad.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6ae.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6af.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6b0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6b1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6b2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6b3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6b4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6b5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6b6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6b7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6b8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6b9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6ba.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6bb.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6bc.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6bd.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6be.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6bf.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6c0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6c1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6c2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6c3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6c4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\1f6c5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\203c-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2049-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2122.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2139-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2194-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2195-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2196-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2197-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2198-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2199-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\21a9-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\21aa-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\231a-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\231b-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23e9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23ea.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23eb.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23ec.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23f0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23f3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\24c2-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25aa-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25ab-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25b6-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25c0-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25fb-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25fc-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25fd-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25fe-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2600-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2601-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\260e-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2611-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2614-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2615-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\261d-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\263a-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2648-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2649-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264a-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264b-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264c-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264d-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264e-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264f-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2650-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2651-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2652-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2653-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2660-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2663-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2665-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2666-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2668-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\267b-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\267f-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2693-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26a0-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26a1-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26aa-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26ab-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26bd-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26be-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26c4-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26c5-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26ce.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26d4-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26ea-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26f2-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26f3-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26f5-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26fa-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26fd-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2702-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2705.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2708-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2709-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270c-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270f-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2712-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2714-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2716-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2728.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2733-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2734-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2744-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2747-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\274c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\274e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2753.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2754.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2755.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2757-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2764-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2795.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2796.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2797.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\27a1-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\27b0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\27bf.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2934-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2935-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2b05-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2b06-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2b07-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2b1b-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2b1c-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2b50-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2b55-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\3030.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\303d-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\3297-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\3299-fe0f.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part5.png\" />\r\n    <Content Include=\"Assets\\Sounds\\KbdFunction.wav\" />\r\n    <Content Include=\"Assets\\Sounds\\KbdKeyTap.wav\" />\r\n    <Content Include=\"Background.png\">\r\n      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r\n    </Content>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <BootstrapperPackage Include=\"Microsoft.Net.Client.3.5\">\r\n      <Visible>False</Visible>\r\n      <ProductName>Клиентский профиль .NET Framework 3.5 с пакетом обновления 1 %28SP1%29</ProductName>\r\n      <Install>false</Install>\r\n    </BootstrapperPackage>\r\n    <BootstrapperPackage Include=\"Microsoft.Net.Framework.3.5.SP1\">\r\n      <Visible>False</Visible>\r\n      <ProductName>.NET Framework 3.5 SP1</ProductName>\r\n      <Install>false</Install>\r\n    </BootstrapperPackage>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"Controls\\VirtualizedView\\\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n  <ProjectExtensions />\r\n</Project>"
  },
  {
    "path": "EmojiPanel/EmojiPanel/MainPage.xaml",
    "content": "﻿<phone:PhoneApplicationPage \r\n    x:Class=\"EmojiPanel.MainPage\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:EmojiPanel.Controls\"\r\n    xmlns:emoji=\"clr-namespace:EmojiPanel.Controls.Emoji\"\r\n    mc:Ignorable=\"d\" d:DesignWidth=\"480\" d:DesignHeight=\"768\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"PortraitOrLandscape\" Orientation=\"Portrait\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--<StackPanel x:Name=\"TitlePanel\" Grid.Row=\"0\" Margin=\"12,17,0,28\">\r\n            <TextBlock x:Name=\"ApplicationTitle\" Text=\"MY APPLICATION\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n        </StackPanel>-->\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" >\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"*\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            \r\n            <TextBox x:Name=\"InputTextBox\" VerticalAlignment=\"Bottom\" InputScope=\"Text\"/>\r\n            \r\n            <!--<emoji:EmojiControl x:Name=\"EmojiInstance\" Grid.Row=\"1\"></emoji:EmojiControl>-->\r\n        </Grid>\r\n    </Grid>\r\n\r\n    <phone:PhoneApplicationPage.ApplicationBar>\r\n        <shell:ApplicationBar>\r\n            <shell:ApplicationBar.Buttons>\r\n                <!--<shell:ApplicationBarIconButton Click=\"ClearAllButtonClick\"  Text=\"clear\" IconUri=\"/Assets/AppBarIcons/appbar.smile.png\"/>-->\r\n                <shell:ApplicationBarIconButton Click=\"OnSmileIconClick\" Text=\"smile\" IconUri=\"/Assets/AppBarIcons/appbar.smile.png\"/>\r\n            </shell:ApplicationBar.Buttons>\r\n        </shell:ApplicationBar>\r\n    </phone:PhoneApplicationPage.ApplicationBar>\r\n\r\n</phone:PhoneApplicationPage>"
  },
  {
    "path": "EmojiPanel/EmojiPanel/MainPage.xaml.cs",
    "content": "﻿using System;\r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing EmojiPanel.Controls.Emoji;\r\nusing Microsoft.Phone.Controls;\r\n\r\nnamespace EmojiPanel\r\n{\r\n    public partial class MainPage\r\n    {\r\n        public EmojiControl EmojiInstance;\r\n\r\n        public MainPage()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void OnSmileIconClick(object sender, EventArgs e)\r\n        {\r\n            if (EmojiInstance == null)\r\n            {\r\n                // Initialize EmojiControl\r\n                EmojiInstance = EmojiControl.GetInstance();\r\n                EmojiInstance.BindTextBox(InputTextBox);\r\n\r\n                ContentPanel.Children.Add(EmojiInstance); // Add to view\r\n            }\r\n\r\n            EmojiInstance.IsOpen = !EmojiInstance.IsOpen;\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            base.OnNavigatingFrom(e);\r\n\r\n            if (EmojiInstance == null) return;\r\n\r\n            // Destroy EmojiControl\r\n            EmojiInstance.IsOpen = false;\r\n            EmojiInstance.UnbindTextBox();\r\n            ContentPanel.Children.Remove(EmojiInstance); // Remove from view\r\n            EmojiInstance = null;\r\n        }\r\n\r\n        private void ClearAllButtonClick(object sender, EventArgs e)\r\n        {\r\n            InputTextBox.Text = \"\";\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Properties/AppManifest.xml",
    "content": "﻿<Deployment xmlns=\"http://schemas.microsoft.com/client/2007/deployment\"\r\n        xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n>\r\n    <Deployment.Parts>\r\n    </Deployment.Parts>\r\n</Deployment>\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"EmojiPanel\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"EmojiPanel\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"d6cfdaad-1212-43b4-9539-203b0c855191\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguage(\"en-US\")]\r\n"
  },
  {
    "path": "EmojiPanel/EmojiPanel/Properties/WMAppManifest.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2012/deployment\" AppPlatformVersion=\"8.0\">\r\n  <DefaultLanguage xmlns=\"\" code=\"\" />\r\n  <App xmlns=\"\" ProductID=\"{2fcb4c15-fe40-496f-87d6-84220f3f07f8}\" Title=\"EmojiPanel\" RuntimeType=\"Silverlight\" Version=\"1.0.0.0\" Genre=\"apps.normal\" Author=\"EmojiPanel author\" Description=\"Sample description\" Publisher=\"EmojiPanel\" PublisherID=\"{e05454e4-fcde-476d-9be4-3a5fd230ae85}\">\r\n    <IconPath IsRelative=\"true\" IsResource=\"false\">ApplicationIcon.png</IconPath>\r\n    <Capabilities>\r\n      <Capability Name=\"ID_CAP_GAMERSERVICES\" />\r\n      <Capability Name=\"ID_CAP_IDENTITY_DEVICE\" />\r\n      <Capability Name=\"ID_CAP_IDENTITY_USER\" />\r\n      <Capability Name=\"ID_CAP_LOCATION\" />\r\n      <Capability Name=\"ID_CAP_MICROPHONE\" />\r\n      <Capability Name=\"ID_CAP_NETWORKING\" />\r\n      <Capability Name=\"ID_CAP_PHONEDIALER\" />\r\n      <Capability Name=\"ID_CAP_PUSH_NOTIFICATION\" />\r\n      <Capability Name=\"ID_CAP_SENSORS\" />\r\n      <Capability Name=\"ID_CAP_WEBBROWSERCOMPONENT\" />\r\n      <Capability Name=\"ID_CAP_ISV_CAMERA\" />\r\n      <Capability Name=\"ID_CAP_CONTACTS\" />\r\n      <Capability Name=\"ID_CAP_APPOINTMENTS\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_AUDIO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PLAYBACK\" />\r\n    </Capabilities>\r\n    <Tasks>\r\n      <DefaultTask Name=\"_default\" NavigationPage=\"MainPage.xaml\" />\r\n    </Tasks>\r\n    <Tokens>\r\n      <PrimaryToken TokenID=\"EmojiPanelToken\" TaskName=\"_default\">\r\n        <TemplateFlip>\r\n          <SmallImageURI IsResource=\"false\" IsRelative=\"true\">Background.png</SmallImageURI>\r\n          <Count>0</Count>\r\n          <BackgroundImageURI IsResource=\"false\" IsRelative=\"true\">Background.png</BackgroundImageURI>\r\n          <Title>EmojiPanel</Title>\r\n          <BackContent>\r\n          </BackContent>\r\n          <BackBackgroundImageURI>\r\n          </BackBackgroundImageURI>\r\n          <BackTitle>\r\n          </BackTitle>\r\n          <DeviceLockImageURI>\r\n          </DeviceLockImageURI>\r\n          <HasLarge>False</HasLarge>\r\n        </TemplateFlip>\r\n      </PrimaryToken>\r\n    </Tokens>\r\n    <ScreenResolutions>\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WVGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WXGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_HD720P\" />\r\n    </ScreenResolutions>\r\n  </App>\r\n</Deployment>"
  },
  {
    "path": "ExifLib/ExifIO.cs",
    "content": "﻿using System;\r\n\r\nnamespace ExifLib\r\n{\r\n    /// <summary>\r\n    /// Utility to handle multi-byte primitives in both big and little endian.\r\n    /// http://msdn.microsoft.com/en-us/library/system.bitconverter.islittleendian.aspx\r\n    /// http://en.wikipedia.org/wiki/Endianness\r\n    /// </summary>\r\n    public static class ExifIO\r\n    {\r\n        public static short ReadShort(byte[] Data, int offset, bool littleEndian)\r\n        {\r\n            if ((littleEndian && BitConverter.IsLittleEndian) ||\r\n                (!littleEndian && !BitConverter.IsLittleEndian))\r\n            {\r\n                return BitConverter.ToInt16(Data, offset);\r\n            }\r\n            else\r\n            {\r\n                byte[] beBytes = new byte[2] { Data[offset + 1], Data[offset] };\r\n                return BitConverter.ToInt16(beBytes, 0);\r\n            }\r\n        }\r\n\r\n        public static ushort ReadUShort(byte[] Data, int offset, bool littleEndian)\r\n        {\r\n            if ((littleEndian && BitConverter.IsLittleEndian) ||\r\n                (!littleEndian && !BitConverter.IsLittleEndian))\r\n            {\r\n                return BitConverter.ToUInt16(Data, offset);\r\n            }\r\n            else\r\n            {\r\n                byte[] beBytes = new byte[2] { Data[offset + 1], Data[offset] };\r\n                return BitConverter.ToUInt16(beBytes, 0);\r\n            }\r\n        }\r\n\r\n        public static int ReadInt(byte[] Data, int offset, bool littleEndian)\r\n        {\r\n            if ((littleEndian && BitConverter.IsLittleEndian) ||\r\n                (!littleEndian && !BitConverter.IsLittleEndian))\r\n            {\r\n                return BitConverter.ToInt32(Data, offset);\r\n            }\r\n            else\r\n            {\r\n                byte[] beBytes = new byte[4] { Data[offset + 3], Data[offset + 2], Data[offset + 1], Data[offset] };\r\n                return BitConverter.ToInt32(beBytes, 0);\r\n            }\r\n        }\r\n\r\n        public static uint ReadUInt(byte[] Data, int offset, bool littleEndian)\r\n        {\r\n            if ((littleEndian && BitConverter.IsLittleEndian) ||\r\n                (!littleEndian && !BitConverter.IsLittleEndian))\r\n            {\r\n                return BitConverter.ToUInt32(Data, offset);\r\n            }\r\n            else\r\n            {\r\n                byte[] beBytes = new byte[4] { Data[offset + 3], Data[offset + 2], Data[offset + 1], Data[offset] };\r\n                return BitConverter.ToUInt32(beBytes, 0);\r\n            }\r\n        }\r\n\r\n        public static float ReadSingle(byte[] Data, int offset, bool littleEndian)\r\n        {\r\n            if ((littleEndian && BitConverter.IsLittleEndian) ||\r\n                (!littleEndian && !BitConverter.IsLittleEndian))\r\n            {\r\n                return BitConverter.ToSingle(Data, offset);\r\n            }\r\n            else\r\n            {\r\n                // need to swap the data first\r\n                byte[] beBytes = new byte[4] { Data[offset + 3], Data[offset + 2], Data[offset + 1], Data[offset] };\r\n                return BitConverter.ToSingle(beBytes, 0);\r\n            }\r\n        }\r\n\r\n        public static double ReadDouble(byte[] Data, int offset, bool littleEndian)\r\n        {\r\n            if ((littleEndian && BitConverter.IsLittleEndian) ||\r\n                (!littleEndian && !BitConverter.IsLittleEndian))\r\n            {\r\n                return BitConverter.ToDouble(Data, offset);\r\n            }\r\n            else\r\n            {\r\n                // need to swap the data first\r\n                byte[] beBytes = new byte[8] {\r\n                    Data[offset + 7], Data[offset + 6], Data[offset + 5], Data[offset + 4],\r\n                    Data[offset + 3], Data[offset + 2], Data[offset + 1], Data[offset]};\r\n                return BitConverter.ToDouble(beBytes, 0);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "ExifLib/ExifIds.cs",
    "content": "﻿using System;\r\n\r\nnamespace ExifLib\r\n{\r\n    public static class JpegId\r\n    {\r\n        public const int START = 0xFF;\r\n        public const int SOI = 0xD8;\r\n        public const int SOS = 0xDA;\r\n        public const int EOI = 0xD9;\r\n        public const int COM = 0xFE;\r\n        public const int JFIF = 0xE0;\r\n        public const int EXIF = 0xE1;\r\n        public const int IPTC = 0xED;\r\n    }\r\n    \r\n    public enum ExifIFD\r\n    {\r\n        Exif = 0x8769,\r\n        Gps = 0x8825\r\n    }\r\n\r\n    public enum ExifId\r\n    {\r\n        Unknown = -1,\r\n\r\n        ImageWidth = 0x100,\r\n        ImageHeight = 0x101,\r\n        Orientation = 0x112,\r\n        XResolution = 0x11A,\r\n        YResolution = 0x11B,\r\n        ResolutionUnit = 0x128,\r\n        DateTime = 0x132,\r\n        Description = 0x10E,\r\n        Make = 0x10F,\r\n        Model = 0x110,\r\n        Software = 0x131,\r\n        Artist = 0x13B,\r\n        ThumbnailOffset = 0x201,\r\n        ThumbnailLength = 0x202,\r\n        ExposureTime = 0x829A,\r\n        FNumber = 0x829D,\r\n        Copyright = 0x8298,\r\n        FlashUsed = 0x9209,\r\n        UserComment = 0x9286\r\n    }\r\n\r\n    public enum ExifGps\r\n    {\r\n        Version = 0x0,\r\n        LatitudeRef = 0x1,\r\n        Latitude = 0x2,\r\n        LongitudeRef = 0x3,\r\n        Longitude = 0x4,\r\n        AltitudeRef = 0x5,\r\n        Altitude = 0x6,\r\n        TimeStamp = 0x7,\r\n        Satellites = 0x8,\r\n        Status = 0x9,\r\n        MeasureMode = 0xA,\r\n        DOP = 0xB,\r\n        SpeedRef = 0xC,\r\n        Speed = 0xD,\r\n        TrackRef = 0xE,\r\n        Track = 0xF,\r\n        ImgDirectionRef = 0x10,\r\n        ImgDirection = 0x11,\r\n        MapDatum = 0x12,\r\n        DestLatitudeRef = 0x13,\r\n        DestLatitude = 0x14,\r\n        DestLongitudeRef = 0x15,\r\n        DestLongitude = 0x16,\r\n        DestBearingRef = 0x17,\r\n        DestBearing = 0x18,\r\n        DestDistanceRef = 0x19,\r\n        DestDistance = 0x1A,\r\n        ProcessingMethod = 0x1B,\r\n        AreaInformation = 0x1C,\r\n        DateStamp = 0x1D,\r\n        Differential = 0x1E\r\n    }\r\n\r\n    public enum ExifOrientation\r\n    {\r\n        TopLeft = 1,\r\n        BottomRight = 3,\r\n        TopRight = 6,\r\n        BottomLeft = 8,\r\n        Undefined = 9\r\n    }\r\n\r\n    public enum ExifUnit\r\n    {\r\n        Undefined = 1,\r\n        Inch = 2,\r\n        Centimeter = 3\r\n    }\r\n\r\n    /// <summary>\r\n    /// As per http://www.exif.org/Exif2-2.PDF\r\n    /// </summary>\r\n    [Flags]\r\n    public enum ExifFlash\r\n    {\r\n        No = 0x0,\r\n        Fired = 0x1,\r\n        StrobeReturnLightDetected = 0x6,\r\n        On = 0x8,\r\n        Off = 0x10,\r\n        Auto = 0x18,\r\n        FlashFunctionPresent = 0x20,\r\n        RedEyeReduction = 0x40\r\n    }\r\n\r\n    public enum ExifGpsLatitudeRef\r\n    {\r\n        Unknown = 0,\r\n        North,\r\n        South\r\n    }\r\n\r\n    public enum ExifGpsLongitudeRef\r\n    {\r\n        Unknown = 0,\r\n        East,\r\n        West\r\n    }\r\n}\r\n"
  },
  {
    "path": "ExifLib/ExifLib.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>ExifLib</RootNamespace>\r\n    <AssemblyName>ExifLib</AssemblyName>\r\n    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>\r\n    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"System.Windows\" />\r\n    <Reference Include=\"system\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Net\" />\r\n    <Reference Include=\"mscorlib.extensions\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"ExifIds.cs\" />\r\n    <Compile Include=\"ExifIO.cs\" />\r\n    <Compile Include=\"ExifReader.cs\" />\r\n    <Compile Include=\"ExifTag.cs\" />\r\n    <Compile Include=\"JpegInfo.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "ExifLib/ExifReader.cs",
    "content": "﻿using System;\r\nusing System.IO;\r\n\r\nnamespace ExifLib\r\n{\r\n    /// <summary>\r\n    /// Based on http://www.media.mit.edu/pia/Research/deepview/exif.html\r\n    /// http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html\r\n    /// </summary>\r\n    public class ExifReader\r\n    {\r\n        public JpegInfo info { get; private set; }\r\n        private bool littleEndian = false;\r\n\r\n        public static JpegInfo ReadJpeg(FileInfo fi)\r\n        {\r\n            DateTime then = DateTime.Now;\r\n            using (FileStream fs = fi.OpenRead())\r\n            {\r\n                ExifReader reader = new ExifReader(fs);\r\n                reader.info.FileSize = (int)fi.Length;\r\n                reader.info.FileName = fi.Name;\r\n                reader.info.LoadTime = (DateTime.Now - then);\r\n                return reader.info;\r\n            }\r\n        }\r\n\r\n        public static JpegInfo ReadJpeg(Stream stream)\r\n        {\r\n            var reader = new ExifReader(stream);\r\n            return reader.info;\r\n        }\r\n\r\n        protected ExifReader(Stream stream)\r\n        {\r\n            info = new JpegInfo();\r\n            int a = stream.ReadByte();\r\n\r\n            // ensure SOI marker\r\n            if (a != JpegId.START || stream.ReadByte() != JpegId.SOI)\r\n                return;\r\n\r\n            info.IsValid = true;\r\n\r\n            for (; ; )\r\n            {\r\n                int marker = 0, prev = 0;\r\n\r\n                // find next marker\r\n                for (a = 0; ; ++a)\r\n                {\r\n                    marker = stream.ReadByte();\r\n                    if (marker != JpegId.START && prev == JpegId.START) break;\r\n                    prev = marker;\r\n                }\r\n\r\n                // read section length\r\n                int lenHigh = stream.ReadByte();\r\n                int lenLow = stream.ReadByte();\r\n                int itemlen = (lenHigh << 8) | lenLow;\r\n\r\n                // read the section\r\n                byte[] section = new byte[itemlen];\r\n                section[0] = (byte)lenHigh;\r\n                section[1] = (byte)lenLow;\r\n                int bytesRead = stream.Read(section, 2, itemlen - 2);\r\n                if (bytesRead != itemlen - 2)\r\n                    return;\r\n\r\n                switch (marker)\r\n                {\r\n                    case JpegId.SOS:\r\n                        // start of stream: and we're done\r\n                        return;\r\n                    case JpegId.EOI:\r\n                        // no data? no good.\r\n                        return;\r\n                    case JpegId.EXIF:\r\n                        {\r\n                            if (section[2] == 'E' &&\r\n                                section[3] == 'x' &&\r\n                                section[4] == 'i' &&\r\n                                section[5] == 'f')\r\n                            {\r\n                                ProcessExif(section);\r\n                            }\r\n                        } break;\r\n                    case JpegId.IPTC:\r\n                        {\r\n                            // don't care.\r\n                        } break;\r\n                    case 0xC0:\r\n                    case 0xC1:\r\n                    case 0xC2:\r\n                    case 0xC3:\r\n                    // case 0xC4: // not SOF\r\n                    case 0xC5:\r\n                    case 0xC6:\r\n                    case 0xC7:\r\n                    // case 0xC8: // not SOF\r\n                    case 0xC9:\r\n                    case 0xCA:\r\n                    case 0xCB:\r\n                    // case 0xCC: // not SOF\r\n                    case 0xCD:\r\n                    case 0xCE:\r\n                    case 0xCF:\r\n                        {\r\n                            ProcessSOF(section, marker);\r\n                        } break;\r\n                    default:\r\n                        {\r\n                            // don't care.\r\n                        } break;\r\n                }\r\n\r\n                section = null;\r\n                GC.Collect();\r\n            }\r\n        }\r\n\r\n        private void ProcessExif(byte[] section)\r\n        {\r\n            int idx = 6;\r\n            if (section[idx++] != 0 ||\r\n                section[idx++] != 0)\r\n            {\r\n                // \"Exif\" is not followed by 2 null bytes.\r\n                return;\r\n            }\r\n\r\n            if (section[idx] == 'I' && section[idx + 1] == 'I')\r\n            {\r\n                // intel order\r\n                littleEndian = true;\r\n            }\r\n            else\r\n            {\r\n                if (section[idx] == 'M' && section[idx + 1] == 'M')\r\n                    littleEndian = false;\r\n                else\r\n                {\r\n                    // unknown order...\r\n                    return;\r\n                }\r\n            }\r\n            idx += 2;\r\n\r\n            int a = ExifIO.ReadUShort(section, idx, littleEndian);\r\n            idx += 2;\r\n\r\n            if (a != 0x002A)\r\n            {\r\n                // bad start...\r\n                return;\r\n            }\r\n\r\n            a = ExifIO.ReadInt(section, idx, littleEndian);\r\n            idx += 4;\r\n\r\n            if (a < 8 || a > 16)\r\n            {\r\n                if (a < 16 || a > section.Length - 16)\r\n                {\r\n                    // invalid offset\r\n                    return;\r\n                }\r\n            }\r\n\r\n            ProcessExifDir(section, a + 8, 8, section.Length - 8, 0, ExifIFD.Exif);\r\n        }\r\n\r\n        private int DirOffset(int start, int num)\r\n        {\r\n            return start + 2 + 12 * num;\r\n        }\r\n\r\n        private void ProcessExifDir(byte[] section, int offsetDir, int offsetBase, int length, int depth, ExifIFD ifd)\r\n        {\r\n            if (depth > 4)\r\n            {\r\n                // corrupted Exif header...\r\n                return;\r\n            }\r\n\r\n            ushort numEntries = ExifIO.ReadUShort(section, offsetDir, littleEndian);\r\n            if (offsetDir + 2 + 12 * numEntries >= offsetDir + length)\r\n            {\r\n                // too long\r\n                return;\r\n            }\r\n\r\n            int offset = 0;\r\n\r\n            for (int de = 0; de < numEntries; ++de)\r\n            {\r\n                offset = DirOffset(offsetDir, de);\r\n                ExifTag exifTag = new ExifTag(section, offset, offsetBase, length, littleEndian);\r\n\r\n                if (!exifTag.IsValid)\r\n                    continue;\r\n\r\n                switch (exifTag.Tag)\r\n                {\r\n                    case (int)ExifIFD.Exif:\r\n                        {\r\n                            int dirStart = offsetBase + exifTag.GetInt(0);\r\n                            if (dirStart <= offsetBase + length)\r\n                            {\r\n                                ProcessExifDir(section, dirStart, offsetBase, length, depth + 1, ExifIFD.Exif);\r\n                            }\r\n                        } break;\r\n                    case (int)ExifIFD.Gps:\r\n                        {\r\n                            int dirStart = offsetBase + exifTag.GetInt(0);\r\n                            if (dirStart <= offsetBase + length)\r\n                            {\r\n                                ProcessExifDir(section, dirStart, offsetBase, length, depth + 1, ExifIFD.Gps);\r\n                            }\r\n                        } break;\r\n                    default:\r\n                        {\r\n                            exifTag.Populate(info, ifd);\r\n                        } break;\r\n                }\r\n            }\r\n\r\n            // final link defined?\r\n            offset = DirOffset(offsetDir, numEntries) + 4;\r\n            if (offset <= offsetBase + length)\r\n            {\r\n                offset = ExifIO.ReadInt(section, offsetDir + 2 + 12 * numEntries, littleEndian);\r\n                if (offset > 0)\r\n                {\r\n                    int subDirStart = offsetBase + offset;\r\n                    if (subDirStart <= offsetBase + length && subDirStart >= offsetBase)\r\n                    {\r\n                        ProcessExifDir(section, subDirStart, offsetBase, length, depth + 1, ifd);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (info.ThumbnailData == null && info.ThumbnailOffset > 0 && info.ThumbnailSize > 0)\r\n            {\r\n                // store it.\r\n                info.ThumbnailData = new byte[info.ThumbnailSize];\r\n                Array.Copy(section, offsetBase + info.ThumbnailOffset, info.ThumbnailData, 0, info.ThumbnailSize);\r\n            }\r\n        }\r\n\r\n        private void ProcessSOF(byte[] section, int marker)\r\n        {\r\n            // bytes 1,2 is section len\r\n            // byte 3 is precision (bytes per sample)\r\n            info.Height = ((int)section[3] << 8) | (int)section[4];\r\n            info.Width = ((int)section[5] << 8) | (int)section[6];\r\n            int components = (int)section[7];\r\n\r\n            info.IsColor = (components == 3);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "ExifLib/ExifTag.cs",
    "content": "﻿using System;\r\nusing System.Text;\r\n\r\nnamespace ExifLib\r\n{\r\n    /// <summary>\r\n    /// As per: http://www.media.mit.edu/pia/Research/deepview/exif.html\r\n    /// </summary>\r\n    public enum ExifTagFormat\r\n    {\r\n        BYTE       = 1, \r\n        STRING     = 2,\r\n        USHORT     = 3,\r\n        ULONG      = 4,\r\n        URATIONAL  = 5,\r\n        SBYTE      = 6,\r\n        UNDEFINED  = 7,\r\n        SSHORT     = 8,\r\n        SLONG      = 9,\r\n        SRATIONAL  = 10,\r\n        SINGLE     = 11,\r\n        DOUBLE     = 12,\r\n\r\n        NUM_FORMATS = 12\r\n    }\r\n\r\n    public class ExifTag\r\n    {\r\n        public int Tag { get; private set; }\r\n        public ExifTagFormat Format { get; private set; }\r\n        public int Components { get; private set; }\r\n        public byte[] Data { get; private set; }\r\n        public bool LittleEndian { get; private set; }\r\n\r\n        private static int[] BytesPerFormat = new int[] { 0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8 };\r\n\r\n        public ExifTag(byte[] section, int sectionOffset, int offsetBase, int length, bool littleEndian)\r\n        {\r\n            this.IsValid = false;\r\n            this.Tag = ExifIO.ReadUShort(section, sectionOffset, littleEndian);\r\n            int format = ExifIO.ReadUShort(section, sectionOffset + 2, littleEndian);\r\n            if (format < 1 || format > 12)\r\n                return;\r\n            this.Format = (ExifTagFormat)format;\r\n            this.Components = ExifIO.ReadInt(section, sectionOffset + 4, littleEndian);\r\n            if (this.Components > 0x10000)\r\n                return;\r\n            this.LittleEndian = littleEndian;\r\n\r\n            int byteCount = this.Components * BytesPerFormat[format];\r\n            int valueOffset = 0;\r\n\r\n            if (byteCount > 4)\r\n            {\r\n                int offsetVal = ExifIO.ReadInt(section, sectionOffset + 8, littleEndian);\r\n                if (offsetVal + byteCount > length)\r\n                {\r\n                    // bad offset...\r\n                    return;\r\n                }\r\n                valueOffset = offsetBase + offsetVal;\r\n            }\r\n            else\r\n            {\r\n                valueOffset = sectionOffset + 8;\r\n            }\r\n            this.Data = new byte[byteCount];\r\n            Array.Copy(section, valueOffset, this.Data, 0, byteCount);\r\n            this.IsValid = true;\r\n        }\r\n\r\n        public bool IsValid { get; private set; }\r\n\r\n        private short ReadShort(int offset)\r\n        {\r\n            return ExifIO.ReadShort(Data, offset, LittleEndian);\r\n        }\r\n\r\n        private ushort ReadUShort(int offset)\r\n        {\r\n            return ExifIO.ReadUShort(Data, offset, LittleEndian);\r\n        }\r\n\r\n        private int ReadInt(int offset)\r\n        {\r\n            return ExifIO.ReadInt(Data, offset, LittleEndian);\r\n        }\r\n\r\n        private uint ReadUInt(int offset)\r\n        {\r\n            return ExifIO.ReadUInt(Data, offset, LittleEndian);\r\n        }\r\n\r\n        private float ReadSingle(int offset)\r\n        {\r\n            return ExifIO.ReadSingle(Data, offset, LittleEndian);\r\n        }\r\n\r\n        private double ReadDouble(int offset)\r\n        {\r\n            return ExifIO.ReadDouble(Data, offset, LittleEndian);\r\n        }\r\n\r\n        public bool IsNumeric\r\n        {\r\n            get\r\n            {\r\n                switch (Format)\r\n                {\r\n                    case ExifTagFormat.STRING:\r\n                    case ExifTagFormat.UNDEFINED:\r\n                        return false;\r\n                    default:\r\n                        return true;\r\n                }\r\n            }\r\n        }\r\n\r\n        public int GetInt(int componentIndex)\r\n        {\r\n            return (int)GetNumericValue(componentIndex);\r\n        }\r\n\r\n        public double GetNumericValue(int componentIndex)\r\n        {\r\n            switch (Format)\r\n            {\r\n                case ExifTagFormat.BYTE: return (double)this.Data[componentIndex];\r\n                case ExifTagFormat.USHORT: return (double)ReadUShort(componentIndex * 2);\r\n                case ExifTagFormat.ULONG: return (double)ReadUInt(componentIndex * 4);\r\n                case ExifTagFormat.URATIONAL: return (double)ReadUInt(componentIndex * 8) / (double)ReadUInt((componentIndex * 8) + 4);\r\n                case ExifTagFormat.SBYTE:\r\n                    {\r\n                        unchecked\r\n                        {\r\n                            return (double)(sbyte)this.Data[componentIndex];\r\n                        }\r\n                    }\r\n                case ExifTagFormat.SSHORT: return (double)ReadShort(componentIndex * 2);\r\n                case ExifTagFormat.SLONG: return (double)ReadInt(componentIndex * 4);\r\n                case ExifTagFormat.SRATIONAL: return (double)ReadInt(componentIndex * 8) / (double)ReadInt((componentIndex * 8) + 4);\r\n                case ExifTagFormat.SINGLE: return (double)ReadSingle(componentIndex * 4);\r\n                case ExifTagFormat.DOUBLE: return ReadDouble(componentIndex * 8);\r\n                default: return 0.0;\r\n            }\r\n        }\r\n\r\n        public string GetStringValue()\r\n        {\r\n            return GetStringValue(0);\r\n        }\r\n\r\n        public string GetStringValue(int componentIndex)\r\n        {\r\n            switch (Format)\r\n            {\r\n                case ExifTagFormat.STRING:\r\n                case ExifTagFormat.UNDEFINED:\r\n                    return Encoding.UTF8.GetString(this.Data, 0, this.Data.Length).Trim(' ', '\\t', '\\r', '\\n', '\\0');\r\n                case ExifTagFormat.URATIONAL:\r\n                    return ReadUInt(componentIndex * 8).ToString() + \"/\" + ReadUInt((componentIndex * 8) + 4).ToString();\r\n                case ExifTagFormat.SRATIONAL:\r\n                    return ReadInt(componentIndex * 8).ToString() + \"/\" + ReadInt((componentIndex * 8) + 4).ToString();\r\n                default:\r\n                    return GetNumericValue(componentIndex).ToString();\r\n            }\r\n        }\r\n\r\n        public virtual void Populate(JpegInfo info, ExifIFD ifd)\r\n        {\r\n            if (ifd == ExifIFD.Exif)\r\n            {\r\n                switch ((ExifId)this.Tag)\r\n                {\r\n                    case ExifId.ImageWidth: info.Width = GetInt(0); break;\r\n                    case ExifId.ImageHeight: info.Height = GetInt(0); break;\r\n                    case ExifId.Orientation: info.Orientation = (ExifOrientation)GetInt(0); break;\r\n                    case ExifId.XResolution: info.XResolution = GetNumericValue(0); break;\r\n                    case ExifId.YResolution: info.YResolution = GetNumericValue(0); break;\r\n                    case ExifId.ResolutionUnit: info.ResolutionUnit = (ExifUnit)GetInt(0); break;\r\n                    case ExifId.DateTime: info.DateTime = GetStringValue(); break;\r\n                    case ExifId.Description: info.Description = GetStringValue(); break;\r\n                    case ExifId.Make: info.Make = GetStringValue(); break;\r\n                    case ExifId.Model: info.Model = GetStringValue(); break;\r\n                    case ExifId.Software: info.Software = GetStringValue(); break;\r\n                    case ExifId.Artist: info.Artist = GetStringValue(); break;\r\n                    case ExifId.ThumbnailOffset: info.ThumbnailOffset = GetInt(0); break;\r\n                    case ExifId.ThumbnailLength: info.ThumbnailSize = GetInt(0); break;\r\n                    case ExifId.Copyright: info.Copyright = GetStringValue(); break;\r\n                    case ExifId.UserComment: info.UserComment = GetStringValue(); break;\r\n                    case ExifId.ExposureTime: info.ExposureTime = GetNumericValue(0); break;\r\n                    case ExifId.FNumber: info.FNumber = GetNumericValue(0); break;\r\n                    case ExifId.FlashUsed: info.Flash = (ExifFlash)GetInt(0); break;\r\n                    default: break;\r\n                }\r\n            }\r\n            else if (ifd == ExifIFD.Gps)\r\n            {\r\n                switch ((ExifGps)this.Tag)\r\n                {\r\n                    case ExifGps.LatitudeRef:\r\n                        {\r\n                            if (GetStringValue() == \"N\") info.GpsLatitudeRef = ExifGpsLatitudeRef.North;\r\n                            else if (GetStringValue() == \"S\") info.GpsLatitudeRef = ExifGpsLatitudeRef.South;\r\n                        } break;\r\n                    case ExifGps.LongitudeRef:\r\n                        {\r\n                            if (GetStringValue() == \"E\") info.GpsLongitudeRef = ExifGpsLongitudeRef.East;\r\n                            else if (GetStringValue() == \"W\") info.GpsLongitudeRef = ExifGpsLongitudeRef.West;\r\n                        } break;\r\n                    case ExifGps.Latitude:\r\n                        {\r\n                            if (Components == 3)\r\n                            {\r\n                                info.GpsLatitude[0] = GetNumericValue(0);\r\n                                info.GpsLatitude[1] = GetNumericValue(1);\r\n                                info.GpsLatitude[2] = GetNumericValue(2);\r\n                            }\r\n                        } break;\r\n                    case ExifGps.Longitude:\r\n                        {\r\n                            if (Components == 3)\r\n                            {\r\n                                info.GpsLongitude[0] = GetNumericValue(0);\r\n                                info.GpsLongitude[1] = GetNumericValue(1);\r\n                                info.GpsLongitude[2] = GetNumericValue(2);\r\n                            }\r\n                        } break;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            StringBuilder sb = new StringBuilder(64);\r\n            sb.Append(\"0x\");\r\n            sb.Append(this.Tag.ToString(\"X4\"));\r\n            sb.Append(\"-\");\r\n            sb.Append(((ExifId)this.Tag).ToString());\r\n            if (this.Components > 0)\r\n            {\r\n                sb.Append(\": (\");\r\n                sb.Append(GetStringValue(0));\r\n                if (Format != ExifTagFormat.UNDEFINED && Format != ExifTagFormat.STRING)\r\n                {\r\n                    for (int i = 1; i < Components; ++i)\r\n                        sb.Append(\", \" + GetStringValue(i));\r\n                }\r\n                sb.Append(\")\");\r\n            }\r\n            return sb.ToString();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "ExifLib/JpegInfo.cs",
    "content": "﻿using System;\r\n\r\nnamespace ExifLib\r\n{\r\n    public class JpegInfo\r\n    {\r\n        /// <summary>\r\n        /// The Jpeg file name (excluding path).\r\n        /// </summary>\r\n        public string FileName;\r\n        /// <summary>\r\n        /// The Jpeg file size, in bytes.\r\n        /// </summary>\r\n        public int FileSize;\r\n        /// <summary>\r\n        /// True if the provided Stream was detected to be a Jpeg image, False otherwise.\r\n        /// </summary>\r\n        public bool IsValid;\r\n\r\n        /// <summary>\r\n        /// Image dimensions, in pixels.\r\n        /// </summary>\r\n        public int Width, Height;\r\n        /// <summary>\r\n        /// True if the image data is expressed in 3 components (RGB), False otherwise.\r\n        /// </summary>\r\n        public bool IsColor;\r\n\r\n        /// <summary>\r\n        /// Orientation of the image.\r\n        /// </summary>\r\n        public ExifOrientation Orientation;\r\n        /// <summary>\r\n        /// The X and Y resolutions of the image, expressed in ResolutionUnit.\r\n        /// </summary>\r\n        public double XResolution, YResolution;\r\n        /// <summary>\r\n        /// Resolution unit of the image.\r\n        /// </summary>\r\n        public ExifUnit ResolutionUnit;\r\n\r\n        /// <summary>\r\n        /// Date at which the image was taken.\r\n        /// </summary>\r\n        public string DateTime;\r\n        /// <summary>\r\n        /// Description of the image.\r\n        /// </summary>\r\n        public string Description;\r\n        /// <summary>\r\n        /// Camera manufacturer.\r\n        /// </summary>\r\n        public string Make;\r\n        /// <summary>\r\n        /// Camera model.\r\n        /// </summary>\r\n        public string Model;\r\n        /// <summary>\r\n        /// Software used to create the image.\r\n        /// </summary>\r\n        public string Software;\r\n        /// <summary>\r\n        /// Image artist.\r\n        /// </summary>\r\n        public string Artist;\r\n        /// <summary>\r\n        /// Image copyright.\r\n        /// </summary>\r\n        public string Copyright;\r\n        /// <summary>\r\n        /// Image user comments.\r\n        /// </summary>\r\n        public string UserComment;\r\n        /// <summary>\r\n        /// Exposure time, in seconds.\r\n        /// </summary>\r\n        public double ExposureTime;\r\n        /// <summary>\r\n        /// F-number (F-stop) of the camera lens when the image was taken.\r\n        /// </summary>\r\n        public double FNumber;\r\n        /// <summary>\r\n        /// Flash settings of the camera when the image was taken.\r\n        /// </summary>\r\n        public ExifFlash Flash;\r\n\r\n        /// <summary>\r\n        /// GPS latitude reference (North, South).\r\n        /// </summary>\r\n        public ExifGpsLatitudeRef GpsLatitudeRef;\r\n        /// <summary>\r\n        /// GPS latitude (degrees, minutes, seconds).\r\n        /// </summary>\r\n        public double[] GpsLatitude = new double[3];\r\n        /// <summary>\r\n        /// GPS longitude reference (East, West).\r\n        /// </summary>\r\n        public ExifGpsLongitudeRef GpsLongitudeRef;\r\n        /// <summary>\r\n        /// GPS longitude (degrees, minutes, seconds).\r\n        /// </summary>\r\n        public double[] GpsLongitude = new double[3];\r\n\r\n        /// <summary>\r\n        /// Byte offset and size of the thumbnail data within the Exif section of the image file.\r\n        /// Used internally.\r\n        /// </summary>\r\n        public int ThumbnailOffset, ThumbnailSize;\r\n        /// <summary>\r\n        /// Thumbnail data found in the Exif section.\r\n        /// </summary>\r\n        public byte[] ThumbnailData;\r\n        \r\n        /// <summary>\r\n        /// Time taken to load the image information.\r\n        /// </summary>\r\n        public TimeSpan LoadTime;\r\n    }\r\n}\r\n"
  },
  {
    "path": "ExifLib/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"ExifLib\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"ExifLib\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2015\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"1e7f202b-8830-42f6-bcda-2a6c590a7e10\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "ExifLib.WP8/ExifLib.WP8.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{ED7BD6FE-8929-490A-81BE-521BB2C6D6F5}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>ExifLib.WP8</RootNamespace>\r\n    <AssemblyName>ExifLib.WP8</AssemblyName>\r\n    <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>\r\n    <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|x86' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\x86\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|x86' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\x86\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|ARM' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\ARM\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|ARM' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\ARM\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"..\\ExifLib\\ExifIds.cs\">\r\n      <Link>ExifIds.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\ExifLib\\ExifIO.cs\">\r\n      <Link>ExifIO.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\ExifLib\\ExifReader.cs\">\r\n      <Link>ExifReader.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\ExifLib\\ExifTag.cs\">\r\n      <Link>ExifTag.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\ExifLib\\JpegInfo.cs\">\r\n      <Link>JpegInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "ExifLib.WP8/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"ExifLib.WP8\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"ExifLib.WP8\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2015\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"ed7bd6fe-8929-490a-81be-521bb2c6d6f5\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "FFmpegInterop/Source/FFmpegInteropMSS.cpp",
    "content": "﻿//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#include \"pch.h\"\n#include \"FFmpegInteropMSS.h\"\n#include \"MediaSampleProvider.h\"\n#include \"H264AVCSampleProvider.h\"\n#include \"H264SampleProvider.h\"\n#include \"UncompressedAudioSampleProvider.h\"\n#include \"UncompressedVideoSampleProvider.h\"\n#include \"shcore.h\"\n\nextern \"C\"\n{\n#include <libavutil/imgutils.h>\n}\n\nusing namespace concurrency;\nusing namespace FFmpegInterop;\nusing namespace Platform;\nusing namespace Windows::Storage::Streams;\nusing namespace Windows::Media::MediaProperties;\n\n// Size of the buffer when reading a stream\nconst int FILESTREAMBUFFERSZ = 16384;\n\n// Static functions passed to FFmpeg for stream interop\nstatic int FileStreamRead(void* ptr, uint8_t* buf, int bufSize);\nstatic int64_t FileStreamSeek(void* ptr, int64_t pos, int whence);\n\n// Initialize an FFmpegInteropObject\nFFmpegInteropMSS::FFmpegInteropMSS()\n\t: avDict(nullptr)\n\t, avIOCtx(nullptr)\n\t, avFormatCtx(nullptr)\n\t, avAudioCodecCtx(nullptr)\n\t, avVideoCodecCtx(nullptr)\n\t, audioStreamIndex(AVERROR_STREAM_NOT_FOUND)\n\t, videoStreamIndex(AVERROR_STREAM_NOT_FOUND)\n\t, fileStreamData(nullptr)\n\t, fileStreamBuffer(nullptr)\n{\n\tav_register_all();\n}\n\nFFmpegInteropMSS::~FFmpegInteropMSS()\n{\n\tif (mss)\n\t{\n\t\tmss->Starting -= startingRequestedToken;\n\t\tmss->SampleRequested -= sampleRequestedToken;\n\t\tmss = nullptr;\n\t}\n\n\t// Clear our data\n\taudioSampleProvider = nullptr;\n\tvideoSampleProvider = nullptr;\n\n\tif (m_pReader != nullptr)\n\t{\n\t\tm_pReader->SetAudioStream(AVERROR_STREAM_NOT_FOUND, nullptr);\n\t\tm_pReader->SetVideoStream(AVERROR_STREAM_NOT_FOUND, nullptr);\n\t\tm_pReader = nullptr;\n\t}\n\n\tavcodec_close(avVideoCodecCtx);\n\tavcodec_close(avAudioCodecCtx);\n\tavformat_close_input(&avFormatCtx);\n\tav_free(avIOCtx);\n\tav_dict_free(&avDict);\n}\n\nFFmpegInteropMSS^ FFmpegInteropMSS::CreateFFmpegInteropMSSFromStream(IRandomAccessStream^ stream, bool forceAudioDecode, bool forceVideoDecode, PropertySet^ ffmpegOptions)\n{\n\tauto interopMSS = ref new FFmpegInteropMSS();\n\tif (FAILED(interopMSS->CreateMediaStreamSource(stream, forceAudioDecode, forceVideoDecode, ffmpegOptions)))\n\t{\n\t\t// We failed to initialize, clear the variable to return failure\n\t\tinteropMSS = nullptr;\n\t}\n\n\treturn interopMSS;\n}\n\n\nFFmpegInteropMSS^ FFmpegInteropMSS::CreateFFmpegInteropMSSFromStream(IRandomAccessStream^ stream, bool forceAudioDecode, bool forceVideoDecode)\n{\n\treturn CreateFFmpegInteropMSSFromStream(stream, forceAudioDecode, forceVideoDecode, nullptr);\n}\n\nFFmpegInteropMSS^ FFmpegInteropMSS::CreateFFmpegInteropMSSFromUri(String^ uri, bool forceAudioDecode, bool forceVideoDecode, PropertySet^ ffmpegOptions)\n{\n\tauto interopMSS = ref new FFmpegInteropMSS();\n\tif (FAILED(interopMSS->CreateMediaStreamSource(uri, forceAudioDecode, forceVideoDecode, ffmpegOptions)))\n\t{\n\t\t// We failed to initialize, clear the variable to return failure\n\t\tinteropMSS = nullptr;\n\t}\n\n\treturn interopMSS;\n}\n\nFFmpegInteropMSS^ FFmpegInteropMSS::CreateFFmpegInteropMSSFromUri(String^ uri, bool forceAudioDecode, bool forceVideoDecode)\n{\n\treturn CreateFFmpegInteropMSSFromUri(uri, forceAudioDecode, forceVideoDecode, nullptr);\n}\n\nMediaStreamSource^ FFmpegInteropMSS::GetMediaStreamSource()\n{\n\treturn mss;\n}\n\nHRESULT FFmpegInteropMSS::CreateMediaStreamSource(String^ uri, bool forceAudioDecode, bool forceVideoDecode, PropertySet^ ffmpegOptions)\n{\n\tHRESULT hr = S_OK;\n\tconst char* charStr = nullptr;\n\tif (!uri)\n\t{\n\t\thr = E_INVALIDARG;\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tavFormatCtx = avformat_alloc_context();\n\t\tif (avFormatCtx == nullptr)\n\t\t{\n\t\t\thr = E_OUTOFMEMORY;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Populate AVDictionary avDict based on PropertySet ffmpegOptions. List of options can be found in https://www.ffmpeg.org/ffmpeg-protocols.html\n\t\thr = ParseOptions(ffmpegOptions);\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tstd::wstring uriW(uri->Begin());\n\t\tstd::string uriA(uriW.begin(), uriW.end());\n\t\tcharStr = uriA.c_str();\n\n\t\t// Open media in the given URI using the specified options\n\t\tif (avformat_open_input(&avFormatCtx, charStr, NULL, &avDict) < 0)\n\t\t{\n\t\t\thr = E_FAIL; // Error opening file\n\t\t}\n\n\t\t// avDict is not NULL only when there is an issue with the given ffmpegOptions such as invalid key, value type etc. Iterate through it to see which one is causing the issue.\n\t\tif (avDict != nullptr)\n\t\t{\n\t\t\tDebugMessage(L\"Invalid FFmpeg option(s)\");\n\t\t\tav_dict_free(&avDict);\n\t\t\tavDict = nullptr;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\thr = InitFFmpegContext(forceAudioDecode, forceVideoDecode);\n\t}\n\n\treturn hr;\n}\n\nHRESULT FFmpegInteropMSS::CreateMediaStreamSource(IRandomAccessStream^ stream, bool forceAudioDecode, bool forceVideoDecode, PropertySet^ ffmpegOptions)\n{\n\tHRESULT hr = S_OK;\n\tif (!stream)\n\t{\n\t\thr = E_INVALIDARG;\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Convert asynchronous IRandomAccessStream to synchronous IStream. This API requires shcore.h and shcore.lib\n\t\thr = CreateStreamOverRandomAccessStream(reinterpret_cast<IUnknown*>(stream), IID_PPV_ARGS(&fileStreamData));\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Setup FFmpeg custom IO to access file as stream. This is necessary when accessing any file outside of app installation directory and appdata folder.\n\t\t// Credit to Philipp Sch http://www.codeproject.com/Tips/489450/Creating-Custom-FFmpeg-IO-Context\n\t\tfileStreamBuffer = (unsigned char*)av_malloc(FILESTREAMBUFFERSZ);\n\t\tif (fileStreamBuffer == nullptr)\n\t\t{\n\t\t\thr = E_OUTOFMEMORY;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tavIOCtx = avio_alloc_context(fileStreamBuffer, FILESTREAMBUFFERSZ, 0, fileStreamData, FileStreamRead, 0, FileStreamSeek);\n\t\tif (avIOCtx == nullptr)\n\t\t{\n\t\t\thr = E_OUTOFMEMORY;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tavFormatCtx = avformat_alloc_context();\n\t\tif (avFormatCtx == nullptr)\n\t\t{\n\t\t\thr = E_OUTOFMEMORY;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Populate AVDictionary avDict based on PropertySet ffmpegOptions. List of options can be found in https://www.ffmpeg.org/ffmpeg-protocols.html\n\t\thr = ParseOptions(ffmpegOptions);\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tavFormatCtx->pb = avIOCtx;\n\t\tavFormatCtx->flags |= AVFMT_FLAG_CUSTOM_IO;\n\n\t\t// Open media file using custom IO setup above instead of using file name. Opening a file using file name will invoke fopen C API call that only have\n\t\t// access within the app installation directory and appdata folder. Custom IO allows access to file selected using FilePicker dialog.\n\t\tif (avformat_open_input(&avFormatCtx, \"\", NULL, &avDict) < 0)\n\t\t{\n\t\t\thr = E_FAIL; // Error opening file\n\t\t}\n\n\t\t// avDict is not NULL only when there is an issue with the given ffmpegOptions such as invalid key, value type etc. Iterate through it to see which one is causing the issue.\n\t\tif (avDict != nullptr)\n\t\t{\n\t\t\tDebugMessage(L\"Invalid FFmpeg option(s)\");\n\t\t\tav_dict_free(&avDict);\n\t\t\tavDict = nullptr;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\thr = InitFFmpegContext(forceAudioDecode, forceVideoDecode);\n\t}\n\n\treturn hr;\n}\n\nHRESULT FFmpegInteropMSS::InitFFmpegContext(bool forceAudioDecode, bool forceVideoDecode)\n{\n\tHRESULT hr = S_OK;\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tif (avformat_find_stream_info(avFormatCtx, NULL) < 0)\n\t\t{\n\t\t\thr = E_FAIL; // Error finding info\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tm_pReader = ref new FFmpegReader(avFormatCtx);\n\t\tif (m_pReader == nullptr)\n\t\t{\n\t\t\thr = E_OUTOFMEMORY;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Find the audio stream and its decoder\n\t\tAVCodec* avAudioCodec = nullptr;\n\t\taudioStreamIndex = av_find_best_stream(avFormatCtx, AVMEDIA_TYPE_AUDIO, -1, -1, &avAudioCodec, 0);\n\t\tif (audioStreamIndex != AVERROR_STREAM_NOT_FOUND && avAudioCodec)\n\t\t{\n\t\t\tavAudioCodecCtx = avFormatCtx->streams[audioStreamIndex]->codec;\n\t\t\tif (avcodec_open2(avAudioCodecCtx, avAudioCodec, NULL) < 0)\n\t\t\t{\n\t\t\t\tavAudioCodecCtx = nullptr;\n\t\t\t\thr = E_FAIL;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Detect audio format and create audio stream descriptor accordingly\n\t\t\t\thr = CreateAudioStreamDescriptor(forceAudioDecode);\n\t\t\t\tif (SUCCEEDED(hr))\n\t\t\t\t{\n\t\t\t\t\thr = audioSampleProvider->AllocateResources();\n\t\t\t\t\tif (SUCCEEDED(hr))\n\t\t\t\t\t{\n\t\t\t\t\t\tm_pReader->SetAudioStream(audioStreamIndex, audioSampleProvider);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Find the video stream and its decoder\n\t\tAVCodec* avVideoCodec = nullptr;\n\t\tvideoStreamIndex = av_find_best_stream(avFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, &avVideoCodec, 0);\n\t\tif (videoStreamIndex != AVERROR_STREAM_NOT_FOUND && avVideoCodec)\n\t\t{\n\t\t\t// FFmpeg identifies album/cover art from a music file as a video stream\n\t\t\t// Avoid creating unnecessarily video stream from this album/cover art\n\t\t\tif (avFormatCtx->streams[videoStreamIndex]->disposition == AV_DISPOSITION_ATTACHED_PIC)\n\t\t\t{\n\t\t\t\tvideoStreamIndex = AVERROR_STREAM_NOT_FOUND;\n\t\t\t\tavVideoCodec = nullptr;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tavVideoCodecCtx = avFormatCtx->streams[videoStreamIndex]->codec;\n\t\t\t\tif (avcodec_open2(avVideoCodecCtx, avVideoCodec, NULL) < 0)\n\t\t\t\t{\n\t\t\t\t\tavVideoCodecCtx = nullptr;\n\t\t\t\t\thr = E_FAIL; // Cannot open the video codec\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Detect video format and create video stream descriptor accordingly\n\t\t\t\t\thr = CreateVideoStreamDescriptor(forceVideoDecode);\n\t\t\t\t\tif (SUCCEEDED(hr))\n\t\t\t\t\t{\n\t\t\t\t\t\thr = videoSampleProvider->AllocateResources();\n\t\t\t\t\t\tif (SUCCEEDED(hr))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tm_pReader->SetVideoStream(videoStreamIndex, videoSampleProvider);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Convert media duration from AV_TIME_BASE to TimeSpan unit\n\t\tmediaDuration = { LONGLONG(avFormatCtx->duration * 10000000 / double(AV_TIME_BASE)) };\n\n\t\tif (audioStreamDescriptor)\n\t\t{\n\t\t\tif (videoStreamDescriptor)\n\t\t\t{\n\t\t\t\tmss = ref new MediaStreamSource(videoStreamDescriptor, audioStreamDescriptor);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmss = ref new MediaStreamSource(audioStreamDescriptor);\n\t\t\t}\n\t\t}\n\t\telse if (videoStreamDescriptor)\n\t\t{\n\t\t\tmss = ref new MediaStreamSource(videoStreamDescriptor);\n\t\t}\n\t\tif (mss)\n\t\t{\n\t\t\tif (mediaDuration.Duration > 0)\n\t\t\t{\n\t\t\t\tmss->Duration = mediaDuration;\n\t\t\t\tmss->CanSeek = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Set buffer time to 0 for realtime streaming to reduce latency\n\t\t\t\tmss->BufferTime = { 0 };\n\t\t\t}\n\n\t\t\tstartingRequestedToken = mss->Starting += ref new TypedEventHandler<MediaStreamSource ^, MediaStreamSourceStartingEventArgs ^>(this, &FFmpegInteropMSS::OnStarting);\n\t\t\tsampleRequestedToken = mss->SampleRequested += ref new TypedEventHandler<MediaStreamSource ^, MediaStreamSourceSampleRequestedEventArgs ^>(this, &FFmpegInteropMSS::OnSampleRequested);\n\t\t}\n\t\telse\n\t\t{\n\t\t\thr = E_OUTOFMEMORY;\n\t\t}\n\t}\n\n\treturn hr;\n}\n\nHRESULT FFmpegInteropMSS::CreateAudioStreamDescriptor(bool forceAudioDecode)\n{\n\tif (avAudioCodecCtx->codec_id == AV_CODEC_ID_AAC && !forceAudioDecode)\n\t{\n\t\tif (avAudioCodecCtx->extradata_size == 0)\n\t\t{\n\t\t\taudioStreamDescriptor = ref new AudioStreamDescriptor(AudioEncodingProperties::CreateAacAdts(avAudioCodecCtx->sample_rate, avAudioCodecCtx->channels, avAudioCodecCtx->bit_rate));\n\t\t}\n\t\telse\n\t\t{\n\t\t\taudioStreamDescriptor = ref new AudioStreamDescriptor(AudioEncodingProperties::CreateAac(avAudioCodecCtx->sample_rate, avAudioCodecCtx->channels, avAudioCodecCtx->bit_rate));\n\t\t}\n\t\taudioSampleProvider = ref new MediaSampleProvider(m_pReader, avFormatCtx, avAudioCodecCtx);\n\t}\n\telse if (avAudioCodecCtx->codec_id == AV_CODEC_ID_MP3 && !forceAudioDecode)\n\t{\n\t\taudioStreamDescriptor = ref new AudioStreamDescriptor(AudioEncodingProperties::CreateMp3(avAudioCodecCtx->sample_rate, avAudioCodecCtx->channels, avAudioCodecCtx->bit_rate));\n\t\taudioSampleProvider = ref new MediaSampleProvider(m_pReader, avFormatCtx, avAudioCodecCtx);\n\t}\n\telse\n\t{\n\t\t// Set default 16 bits when bits per sample value is unknown (0)\n\t\tunsigned int bitsPerSample = avAudioCodecCtx->bits_per_coded_sample ? avAudioCodecCtx->bits_per_coded_sample : 16;\n\t\taudioStreamDescriptor = ref new AudioStreamDescriptor(AudioEncodingProperties::CreatePcm(avAudioCodecCtx->sample_rate, avAudioCodecCtx->channels, bitsPerSample));\n\t\taudioSampleProvider = ref new UncompressedAudioSampleProvider(m_pReader, avFormatCtx, avAudioCodecCtx);\n\t}\n\n\treturn (audioStreamDescriptor != nullptr && audioSampleProvider != nullptr) ? S_OK : E_OUTOFMEMORY;\n}\n\nHRESULT FFmpegInteropMSS::CreateVideoStreamDescriptor(bool forceVideoDecode)\n{\n\tVideoEncodingProperties^ videoProperties;\n\n\tif (avVideoCodecCtx->codec_id == AV_CODEC_ID_H264 && !forceVideoDecode)\n\t{\n\t\tvideoProperties = VideoEncodingProperties::CreateH264();\n\t\tvideoProperties->ProfileId = avVideoCodecCtx->profile;\n\t\tvideoProperties->Height = avVideoCodecCtx->height;\n\t\tvideoProperties->Width = avVideoCodecCtx->width;\n\n\t\t// Check for H264 bitstream flavor. H.264 AVC extradata starts with 1 while non AVC one starts with 0\n\t\tif (avVideoCodecCtx->extradata != nullptr && avVideoCodecCtx->extradata_size > 0 && avVideoCodecCtx->extradata[0] == 1)\n\t\t{\n\t\t\tvideoSampleProvider = ref new H264AVCSampleProvider(m_pReader, avFormatCtx, avVideoCodecCtx);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvideoSampleProvider = ref new H264SampleProvider(m_pReader, avFormatCtx, avVideoCodecCtx);\n\t\t}\n\t}\n\telse\n\t{\n\t\tvideoProperties = VideoEncodingProperties::CreateUncompressed(MediaEncodingSubtypes::Nv12, avVideoCodecCtx->width, avVideoCodecCtx->height);\n\t\tvideoSampleProvider = ref new UncompressedVideoSampleProvider(m_pReader, avFormatCtx, avVideoCodecCtx);\n\n\t\tif (avVideoCodecCtx->sample_aspect_ratio.num > 0 && avVideoCodecCtx->sample_aspect_ratio.den != 0)\n\t\t{\n\t\t\tvideoProperties->PixelAspectRatio->Numerator = avVideoCodecCtx->sample_aspect_ratio.num;\n\t\t\tvideoProperties->PixelAspectRatio->Denominator = avVideoCodecCtx->sample_aspect_ratio.den;\n\t\t}\n\t}\n\n\t// Detect the correct framerate\n\tif (avVideoCodecCtx->framerate.num != 0 || avVideoCodecCtx->framerate.den != 1)\n\t{\n\t\tvideoProperties->FrameRate->Numerator = avVideoCodecCtx->framerate.num;\n\t\tvideoProperties->FrameRate->Denominator = avVideoCodecCtx->framerate.den;\n\t}\n\telse if (avFormatCtx->streams[videoStreamIndex]->avg_frame_rate.num != 0 || avFormatCtx->streams[videoStreamIndex]->avg_frame_rate.den != 0)\n\t{\n\t\tvideoProperties->FrameRate->Numerator = avFormatCtx->streams[videoStreamIndex]->avg_frame_rate.num;\n\t\tvideoProperties->FrameRate->Denominator = avFormatCtx->streams[videoStreamIndex]->avg_frame_rate.den;\n\t}\n\n\tvideoProperties->Bitrate = avVideoCodecCtx->bit_rate;\n\tvideoStreamDescriptor = ref new VideoStreamDescriptor(videoProperties);\n\n\treturn (videoStreamDescriptor != nullptr && videoSampleProvider != nullptr) ? S_OK : E_OUTOFMEMORY;\n}\n\nHRESULT FFmpegInteropMSS::ParseOptions(PropertySet^ ffmpegOptions)\n{\n\tHRESULT hr = S_OK;\n\n\t// Convert FFmpeg options given in PropertySet to AVDictionary. List of options can be found in https://www.ffmpeg.org/ffmpeg-protocols.html\n\tif (ffmpegOptions != nullptr)\n\t{\n\t\tauto options = ffmpegOptions->First();\n\n\t\twhile (options->HasCurrent)\n\t\t{\n\t\t\tString^ key = options->Current->Key;\n\t\t\tstd::wstring keyW(key->Begin());\n\t\t\tstd::string keyA(keyW.begin(), keyW.end());\n\t\t\tconst char* keyChar = keyA.c_str();\n\n\t\t\t// Convert value from Object^ to const char*. avformat_open_input will internally convert value from const char* to the correct type\n\t\t\tString^ value = options->Current->Value->ToString();\n\t\t\tstd::wstring valueW(value->Begin());\n\t\t\tstd::string valueA(valueW.begin(), valueW.end());\n\t\t\tconst char* valueChar = valueA.c_str();\n\n\t\t\t// Add key and value pair entry\n\t\t\tif (av_dict_set(&avDict, keyChar, valueChar, 0) < 0)\n\t\t\t{\n\t\t\t\thr = E_INVALIDARG;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\toptions->MoveNext();\n\t\t}\n\t}\n\n\treturn hr;\n}\n\nvoid FFmpegInteropMSS::OnStarting(MediaStreamSource ^sender, MediaStreamSourceStartingEventArgs ^args)\n{\n\tMediaStreamSourceStartingRequest^ request = args->Request;\n\n\t// Perform seek operation when MediaStreamSource received seek event from MediaElement\n\tif (request->StartPosition && request->StartPosition->Value.Duration <= mediaDuration.Duration)\n\t{\n\t\t// Select the first valid stream either from video or audio\n\t\tint streamIndex = videoStreamIndex >= 0 ? videoStreamIndex : audioStreamIndex >= 0 ? audioStreamIndex : -1;\n\n\t\tif (streamIndex >= 0)\n\t\t{\n\t\t\t// Convert TimeSpan unit to AV_TIME_BASE\n\t\t\tint64_t seekTarget = static_cast<int64_t>(request->StartPosition->Value.Duration / (av_q2d(avFormatCtx->streams[streamIndex]->time_base) * 10000000));\n\n\t\t\tif (av_seek_frame(avFormatCtx, streamIndex, seekTarget, 0) < 0)\n\t\t\t{\n\t\t\t\tDebugMessage(L\" - ### Error while seeking\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Add deferral\n\n\t\t\t\t// Flush the AudioSampleProvider\n\t\t\t\tif (audioSampleProvider != nullptr)\n\t\t\t\t{\n\t\t\t\t\taudioSampleProvider->Flush();\n\t\t\t\t\tavcodec_flush_buffers(avAudioCodecCtx);\n\t\t\t\t}\n\n\t\t\t\t// Flush the VideoSampleProvider\n\t\t\t\tif (videoSampleProvider != nullptr)\n\t\t\t\t{\n\t\t\t\t\tvideoSampleProvider->Flush();\n\t\t\t\t\tavcodec_flush_buffers(avVideoCodecCtx);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\trequest->SetActualStartPosition(request->StartPosition->Value);\n\t}\n}\n\nvoid FFmpegInteropMSS::OnSampleRequested(Windows::Media::Core::MediaStreamSource ^sender, MediaStreamSourceSampleRequestedEventArgs ^args)\n{\n\tif (args->Request->StreamDescriptor == audioStreamDescriptor && audioSampleProvider != nullptr)\n\t{\n\t\targs->Request->Sample = audioSampleProvider->GetNextSample();\n\t}\n\telse if (args->Request->StreamDescriptor == videoStreamDescriptor && videoSampleProvider != nullptr)\n\t{\n\t\targs->Request->Sample = videoSampleProvider->GetNextSample();\n\t}\n\telse\n\t{\n\t\targs->Request->Sample = nullptr;\n\t}\n}\n\n// Static function to read file stream and pass data to FFmpeg. Credit to Philipp Sch http://www.codeproject.com/Tips/489450/Creating-Custom-FFmpeg-IO-Context\nstatic int FileStreamRead(void* ptr, uint8_t* buf, int bufSize)\n{\n\tIStream* pStream = reinterpret_cast<IStream*>(ptr);\n\tULONG bytesRead = 0;\n\tHRESULT hr = pStream->Read(buf, bufSize, &bytesRead);\n\n\tif (FAILED(hr))\n\t{\n\t\treturn -1;\n\t}\n\n\t// If we succeed but don't have any bytes, assume end of file\n\tif (bytesRead == 0)\n\t{\n\t\treturn AVERROR_EOF;  // Let FFmpeg know that we have reached eof\n\t}\n\n\treturn bytesRead;\n}\n\n// Static function to seek in file stream. Credit to Philipp Sch http://www.codeproject.com/Tips/489450/Creating-Custom-FFmpeg-IO-Context\nstatic int64_t FileStreamSeek(void* ptr, int64_t pos, int whence)\n{\n\tIStream* pStream = reinterpret_cast<IStream*>(ptr);\n\tLARGE_INTEGER in;\n\tin.QuadPart = pos;\n\tULARGE_INTEGER out = { 0 };\n\n\tif (FAILED(pStream->Seek(in, whence, &out)))\n\t{\n\t\treturn -1;\n\t}\n\n\treturn out.QuadPart; // Return the new position:\n}\n"
  },
  {
    "path": "FFmpegInterop/Source/FFmpegInteropMSS.h",
    "content": "﻿//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#pragma once\n#include <queue>\n#include \"MediaSampleProvider.h\"\n#include \"FFmpegReader.h\"\n\nusing namespace Platform;\nusing namespace Windows::Foundation;\nusing namespace Windows::Foundation::Collections;\nusing namespace Windows::Media::Core;\n\nextern \"C\"\n{\n#include <libavformat/avformat.h>\n}\n\nnamespace FFmpegInterop\n{\n\tpublic ref class FFmpegInteropMSS sealed\n\t{\n\tpublic:\n\t\tstatic FFmpegInteropMSS^ CreateFFmpegInteropMSSFromStream(IRandomAccessStream^ stream, bool forceAudioDecode, bool forceVideoDecode, PropertySet^ ffmpegOptions);\n\t\tstatic FFmpegInteropMSS^ CreateFFmpegInteropMSSFromStream(IRandomAccessStream^ stream, bool forceAudioDecode, bool forceVideoDecode);\n\t\tstatic FFmpegInteropMSS^ CreateFFmpegInteropMSSFromUri(String^ uri, bool forceAudioDecode, bool forceVideoDecode, PropertySet^ ffmpegOptions);\n\t\tstatic FFmpegInteropMSS^ CreateFFmpegInteropMSSFromUri(String^ uri, bool forceAudioDecode, bool forceVideoDecode);\n\n\t\t// Contructor\n\t\tMediaStreamSource^ GetMediaStreamSource();\n\t\tvirtual ~FFmpegInteropMSS();\n\n\tinternal:\n\t\tint ReadPacket();\n\n\tprivate:\n\t\tFFmpegInteropMSS();\n\n\t\tHRESULT CreateMediaStreamSource(IRandomAccessStream^ stream, bool forceAudioDecode, bool forceVideoDecode, PropertySet^ ffmpegOptions);\n\t\tHRESULT CreateMediaStreamSource(String^ uri, bool forceAudioDecode, bool forceVideoDecode, PropertySet^ ffmpegOptions);\n\t\tHRESULT InitFFmpegContext(bool forceAudioDecode, bool forceVideoDecode);\n\t\tHRESULT CreateAudioStreamDescriptor(bool forceAudioDecode);\n\t\tHRESULT CreateVideoStreamDescriptor(bool forceVideoDecode);\n\t\tHRESULT ParseOptions(PropertySet^ ffmpegOptions);\n\t\tvoid OnStarting(MediaStreamSource ^sender, MediaStreamSourceStartingEventArgs ^args);\n\t\tvoid OnSampleRequested(MediaStreamSource ^sender, MediaStreamSourceSampleRequestedEventArgs ^args);\n\n\t\tMediaStreamSource^ mss;\n\t\tEventRegistrationToken startingRequestedToken;\n\t\tEventRegistrationToken sampleRequestedToken;\n\n\t\tinternal:\n\t\tAVDictionary* avDict;\n\t\tAVIOContext* avIOCtx;\n\t\tAVFormatContext* avFormatCtx;\n\t\tAVCodecContext* avAudioCodecCtx;\n\t\tAVCodecContext* avVideoCodecCtx;\n\n\t\tprivate:\n\t\tAudioStreamDescriptor^ audioStreamDescriptor;\n\t\tVideoStreamDescriptor^ videoStreamDescriptor;\n\t\tint audioStreamIndex;\n\t\tint videoStreamIndex;\n\n\t\tMediaSampleProvider^ audioSampleProvider;\n\t\tMediaSampleProvider^ videoSampleProvider;\n\n\t\tTimeSpan mediaDuration;\n\t\tIStream* fileStreamData;\n\t\tunsigned char* fileStreamBuffer;\n\t\tFFmpegReader^ m_pReader;\n\t};\n}\n"
  },
  {
    "path": "FFmpegInterop/Source/FFmpegReader.cpp",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#include \"pch.h\"\n#include \"FFmpegReader.h\"\n\nusing namespace FFmpegInterop;\n\nFFmpegReader::FFmpegReader(AVFormatContext* avFormatCtx)\n\t: m_pAvFormatCtx(avFormatCtx)\n\t, m_audioStreamIndex(AVERROR_STREAM_NOT_FOUND)\n\t, m_videoStreamIndex(AVERROR_STREAM_NOT_FOUND)\n{\n}\n\nFFmpegReader::~FFmpegReader()\n{\n}\n\n// Read the next packet from the stream and push it into the appropriate\n// sample provider\nint FFmpegReader::ReadPacket()\n{\n\tint ret;\n\tAVPacket avPacket;\n\tav_init_packet(&avPacket);\n\tavPacket.data = NULL;\n\tavPacket.size = 0;\n\n\tret = av_read_frame(m_pAvFormatCtx, &avPacket);\n\tif (ret < 0)\n\t{\n\t\treturn ret;\n\t}\n\n\t// Push the packet to the appropriate\n\tif (avPacket.stream_index == m_audioStreamIndex && m_audioSampleProvider != nullptr)\n\t{\n\t\tm_audioSampleProvider->PushPacket(avPacket);\n\t}\n\telse if (avPacket.stream_index == m_videoStreamIndex && m_videoSampleProvider != nullptr)\n\t{\n\t\tm_videoSampleProvider->PushPacket(avPacket);\n\t}\n\telse\n\t{\n\t\tDebugMessage(L\"Ignoring unused stream\\n\");\n\t\t//av_free_packet(&avPacket);\n\t}\n\n\treturn ret;\n}\n\nvoid FFmpegReader::SetAudioStream(int audioStreamIndex, MediaSampleProvider^ audioSampleProvider)\n{\n\tm_audioStreamIndex = audioStreamIndex;\n\tm_audioSampleProvider = audioSampleProvider;\n\tif (audioSampleProvider != nullptr)\n\t{\n\t\taudioSampleProvider->SetCurrentStreamIndex(m_audioStreamIndex);\n\t}\n}\n\nvoid FFmpegReader::SetVideoStream(int videoStreamIndex, MediaSampleProvider^ videoSampleProvider)\n{\n\tm_videoStreamIndex = videoStreamIndex;\n\tm_videoSampleProvider = videoSampleProvider;\n\tif (videoSampleProvider != nullptr)\n\t{\n\t\tvideoSampleProvider->SetCurrentStreamIndex(m_videoStreamIndex);\n\t}\n}\n\n"
  },
  {
    "path": "FFmpegInterop/Source/FFmpegReader.h",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#pragma once\n\n#include \"MediaSampleProvider.h\"\n\nnamespace FFmpegInterop\n{\n\n\tref class FFmpegReader\n\t{\n\tpublic:\n\t\tvirtual ~FFmpegReader();\n\t\tint ReadPacket();\n\t\tvoid SetAudioStream(int audioStreamIndex, MediaSampleProvider^ audioSampleProvider);\n\t\tvoid SetVideoStream(int videoStreamIndex, MediaSampleProvider^ videoSampleProvider);\n\n\tinternal:\n\t\tFFmpegReader(AVFormatContext* avFormatCtx);\n\n\tprivate:\n\t\tAVFormatContext* m_pAvFormatCtx;\n\t\tMediaSampleProvider^ m_audioSampleProvider;\n\t\tint m_audioStreamIndex;\n\t\tMediaSampleProvider^ m_videoSampleProvider;\n\t\tint m_videoStreamIndex;\n\t};\n}\n"
  },
  {
    "path": "FFmpegInterop/Source/H264AVCSampleProvider.cpp",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#include \"pch.h\"\n#include \"H264AVCSampleProvider.h\"\n\nusing namespace FFmpegInterop;\n\nH264AVCSampleProvider::H264AVCSampleProvider(\n\tFFmpegReader^ reader,\n\tAVFormatContext* avFormatCtx,\n\tAVCodecContext* avCodecCtx)\n\t: MediaSampleProvider(reader, avFormatCtx, avCodecCtx)\n{\n}\n\nH264AVCSampleProvider::~H264AVCSampleProvider()\n{\n}\n\nHRESULT H264AVCSampleProvider::WriteAVPacketToStream(DataWriter^ dataWriter, AVPacket* avPacket)\n{\n\tHRESULT hr = S_OK;\n\t// On a KeyFrame, write the SPS and PPS\n\tif (avPacket->flags & AV_PKT_FLAG_KEY)\n\t{\n\t\thr = GetSPSAndPPSBuffer(dataWriter);\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Convert the packet to NAL format\n\t\thr = WriteNALPacket(dataWriter, avPacket);\n\t}\n\n\t// We have a complete frame\n\treturn hr;\n}\n\nHRESULT H264AVCSampleProvider::GetSPSAndPPSBuffer(DataWriter^ dataWriter)\n{\n\tHRESULT hr = S_OK;\n\tint spsLength = 0;\n\tint ppsLength = 0;\n\n\t// Get the position of the SPS\n\tif (m_pAvCodecCtx->extradata == nullptr && m_pAvCodecCtx->extradata_size < 8)\n\t{\n\t\t// The data isn't present\n\t\thr = E_FAIL;\n\t}\n\tif (SUCCEEDED(hr))\n\t{\n\t\tbyte* spsPos = m_pAvCodecCtx->extradata + 8;\n\t\tspsLength = spsPos[-1];\n\n\t\tif (m_pAvCodecCtx->extradata_size < (8 + spsLength))\n\t\t{\n\t\t\t// We don't have a complete SPS\n\t\t\thr = E_FAIL;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tauto vSPS = ref new Platform::Array<uint8_t>(spsPos, spsLength);\n\n\t\t\t// Write the NAL unit for the SPS\n\t\t\tdataWriter->WriteByte(0);\n\t\t\tdataWriter->WriteByte(0);\n\t\t\tdataWriter->WriteByte(0);\n\t\t\tdataWriter->WriteByte(1);\n\n\t\t\t// Write the SPS\n\t\t\tdataWriter->WriteBytes(vSPS);\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tif (m_pAvCodecCtx->extradata_size < (8 + spsLength + 3))\n\t\t{\n\t\t\thr = E_FAIL;\n\t\t}\n\n\t\tif (SUCCEEDED(hr))\n\t\t{\n\t\t\tbyte* ppsPos = m_pAvCodecCtx->extradata + 8 + spsLength + 3;\n\t\t\tppsLength = ppsPos[-1];\n\n\t\t\tif (m_pAvCodecCtx->extradata_size < (8 + spsLength + 3 + ppsLength))\n\t\t\t{\n\t\t\t\thr = E_FAIL;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tauto vPPS = ref new Platform::Array<uint8_t>(ppsPos, ppsLength);\n\n\t\t\t\t// Write the NAL unit for the PPS\n\t\t\t\tdataWriter->WriteByte(0);\n\t\t\t\tdataWriter->WriteByte(0);\n\t\t\t\tdataWriter->WriteByte(0);\n\t\t\t\tdataWriter->WriteByte(1);\n\n\t\t\t\t// Write the PPS\n\t\t\t\tdataWriter->WriteBytes(vPPS);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn hr;\n}\n\n// Write out an H.264 packet converting stream offsets to start-codes\nHRESULT H264AVCSampleProvider::WriteNALPacket(DataWriter^ dataWriter, AVPacket* avPacket)\n{\n\tHRESULT hr = S_OK;\n\tuint32 index = 0;\n\tuint32 size = 0;\n\tuint32 packetSize = (uint32)avPacket->size;\n\n\tdo\n\t{\n\t\t// Make sure we have enough data\n\t\tif (packetSize < (index + 4))\n\t\t{\n\t\t\thr = E_FAIL;\n\t\t\tbreak;\n\t\t}\n\n\t\t// Grab the size of the blob\n\t\tsize = (avPacket->data[index] << 24) + (avPacket->data[index + 1] << 16) + (avPacket->data[index + 2] << 8) + avPacket->data[index + 3];\n\n\t\t// Write the NAL unit to the stream\n\t\tdataWriter->WriteByte(0);\n\t\tdataWriter->WriteByte(0);\n\t\tdataWriter->WriteByte(0);\n\t\tdataWriter->WriteByte(1);\n\t\tindex += 4;\n\n\t\t// Stop if index and size goes beyond packet size or overflow\n\t\tif (packetSize < (index + size) || (UINT32_MAX - index) < size)\n\t\t{\n\t\t\thr = E_FAIL;\n\t\t\tbreak;\n\t\t}\n\n\t\t// Write the rest of the packet to the stream\n\t\tauto vBuffer = ref new Platform::Array<uint8_t>(&(avPacket->data[index]), size);\n\t\tdataWriter->WriteBytes(vBuffer);\n\t\tindex += size;\n\t} while (index < packetSize);\n\n\treturn hr;\n}\n\n"
  },
  {
    "path": "FFmpegInterop/Source/H264AVCSampleProvider.h",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#pragma once\n#include \"MediaSampleProvider.h\"\n\nnamespace FFmpegInterop\n{\n\tref class H264AVCSampleProvider :\n\t\tpublic MediaSampleProvider\n\t{\n\tpublic:\n\t\tvirtual ~H264AVCSampleProvider();\n\n\tprivate:\n\t\tHRESULT WriteNALPacket(DataWriter^ dataWriter, AVPacket* avPacket);\n\t\tHRESULT GetSPSAndPPSBuffer(DataWriter^ dataWriter);\n\n\tinternal:\n\t\tH264AVCSampleProvider(\n\t\t\tFFmpegReader^ reader,\n\t\t\tAVFormatContext* avFormatCtx,\n\t\t\tAVCodecContext* avCodecCtx);\n\t\tvirtual HRESULT WriteAVPacketToStream(DataWriter^ writer, AVPacket* avPacket) override;\n\t};\n}\n"
  },
  {
    "path": "FFmpegInterop/Source/H264SampleProvider.cpp",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#include \"pch.h\"\n#include \"H264SampleProvider.h\"\n\nusing namespace FFmpegInterop;\n\nH264SampleProvider::H264SampleProvider(\n\tFFmpegReader^ reader,\n\tAVFormatContext* avFormatCtx,\n\tAVCodecContext* avCodecCtx)\n\t: MediaSampleProvider(reader, avFormatCtx, avCodecCtx)\n{\n}\n\nH264SampleProvider::~H264SampleProvider()\n{\n}\n\nHRESULT H264SampleProvider::WriteAVPacketToStream(DataWriter^ dataWriter, AVPacket* avPacket)\n{\n\tHRESULT hr = S_OK;\n\t// On a KeyFrame, write the SPS and PPS\n\tif (avPacket->flags & AV_PKT_FLAG_KEY)\n\t{\n\t\thr = GetSPSAndPPSBuffer(dataWriter);\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Call base class method that simply write the packet to stream as is\n\t\thr = MediaSampleProvider::WriteAVPacketToStream(dataWriter, avPacket);\n\t}\n\n\t// We have a complete frame\n\treturn hr;\n}\n\nHRESULT H264SampleProvider::GetSPSAndPPSBuffer(DataWriter^ dataWriter)\n{\n\tHRESULT hr = S_OK;\n\n\tif (m_pAvCodecCtx->extradata == nullptr && m_pAvCodecCtx->extradata_size < 8)\n\t{\n\t\t// The data isn't present\n\t\thr = E_FAIL;\n\t}\n\telse\n\t{\n\t\t// Write both SPS and PPS sequence as is from extradata\n\t\tauto vSPSPPS = ref new Platform::Array<uint8_t>(m_pAvCodecCtx->extradata, m_pAvCodecCtx->extradata_size);\n\t\tdataWriter->WriteBytes(vSPSPPS);\n\t}\n\n\treturn hr;\n}"
  },
  {
    "path": "FFmpegInterop/Source/H264SampleProvider.h",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#pragma once\n#include \"MediaSampleProvider.h\"\n\nnamespace FFmpegInterop\n{\n\tref class H264SampleProvider :\n\t\tpublic MediaSampleProvider\n\t{\n\tpublic:\n\t\tvirtual ~H264SampleProvider();\n\n\tprivate:\n\t\tHRESULT GetSPSAndPPSBuffer(DataWriter^ dataWriter);\n\n\tinternal:\n\t\tH264SampleProvider(\n\t\t\tFFmpegReader^ reader,\n\t\t\tAVFormatContext* avFormatCtx,\n\t\t\tAVCodecContext* avCodecCtx);\n\t\tvirtual HRESULT WriteAVPacketToStream(DataWriter^ writer, AVPacket* avPacket) override;\n\t};\n}\n"
  },
  {
    "path": "FFmpegInterop/Source/MediaSampleProvider.cpp",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#include \"pch.h\"\n#include \"MediaSampleProvider.h\"\n#include \"FFmpegInteropMSS.h\"\n#include \"FFmpegReader.h\"\n\nusing namespace FFmpegInterop;\n\nMediaSampleProvider::MediaSampleProvider(\n\tFFmpegReader^ reader,\n\tAVFormatContext* avFormatCtx,\n\tAVCodecContext* avCodecCtx)\n\t: m_pReader(reader)\n\t, m_pAvFormatCtx(avFormatCtx)\n\t, m_pAvCodecCtx(avCodecCtx)\n\t, m_streamIndex(AVERROR_STREAM_NOT_FOUND)\n{\n}\n\nHRESULT MediaSampleProvider::AllocateResources()\n{\n\treturn S_OK;\n}\n\nMediaSampleProvider::~MediaSampleProvider()\n{\n}\n\nvoid MediaSampleProvider::SetCurrentStreamIndex(int streamIndex)\n{\n\tif (m_pAvCodecCtx != nullptr && m_pAvFormatCtx->nb_streams > (unsigned int)streamIndex)\n\t{\n\t\tm_streamIndex = streamIndex;\n\t}\n\telse\n\t{\n\t\tm_streamIndex = AVERROR_STREAM_NOT_FOUND;\n\t}\n}\n\nMediaStreamSample^ MediaSampleProvider::GetNextSample()\n{\n\tDebugMessage(L\"GetNextSample\\n\");\n\n\tHRESULT hr = S_OK;\n\n\tMediaStreamSample^ sample;\n\tAVPacket avPacket;\n\tav_init_packet(&avPacket);\n\tavPacket.data = NULL;\n\tavPacket.size = 0;\n\tDataWriter^ dataWriter = ref new DataWriter();\n\n\tbool frameComplete = false;\n\tbool decodeSuccess = true;\n\n\twhile (SUCCEEDED(hr) && !frameComplete)\n\t{\n\t\t// Continue reading until there is an appropriate packet in the stream\n\t\twhile (m_packetQueue.empty())\n\t\t{\n\t\t\tif (m_pReader->ReadPacket() < 0)\n\t\t\t{\n\t\t\t\tDebugMessage(L\"GetNextSample reaching EOF\\n\");\n\t\t\t\thr = E_FAIL;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!m_packetQueue.empty())\n\t\t{\n\t\t\t// Pick the packets from the queue one at a time\n\t\t\tavPacket = PopPacket();\n\n\t\t\t// Decode the packet if necessary\n\t\t\thr = DecodeAVPacket(dataWriter, &avPacket);\n\t\t\tframeComplete = (hr == S_OK);\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Write the packet out\n\t\thr = WriteAVPacketToStream(dataWriter, &avPacket);\n\n\t\tWindows::Foundation::TimeSpan pts = { LONGLONG(av_q2d(m_pAvFormatCtx->streams[m_streamIndex]->time_base) * 10000000 * avPacket.pts) };\n\t\tWindows::Foundation::TimeSpan dur = { LONGLONG(av_q2d(m_pAvFormatCtx->streams[m_streamIndex]->time_base) * 10000000 * avPacket.duration) };\n\n\t\tsample = MediaStreamSample::CreateFromBuffer(dataWriter->DetachBuffer(), pts);\n\t\tsample->Duration = dur;\n\t}\n\n\t//av_free_packet(&avPacket);\n\n\treturn sample;\n}\n\nHRESULT MediaSampleProvider::WriteAVPacketToStream(DataWriter^ dataWriter, AVPacket* avPacket)\n{\n\t// This is the simplest form of transfer. Copy the packet directly to the stream\n\t// This works for most compressed formats\n\tauto aBuffer = ref new Platform::Array<uint8_t>(avPacket->data, avPacket->size);\n\tdataWriter->WriteBytes(aBuffer);\n\treturn S_OK;\n}\n\nHRESULT MediaSampleProvider::DecodeAVPacket(DataWriter^ dataWriter, AVPacket *avPacket)\n{\n\t// For the simple case of compressed samples, each packet is a sample\n\treturn S_OK;\n}\n\nvoid MediaSampleProvider::PushPacket(AVPacket packet)\n{\n\tDebugMessage(L\" - PushPacket\\n\");\n\n\tm_packetQueue.push(packet);\n}\n\nAVPacket MediaSampleProvider::PopPacket()\n{\n\tDebugMessage(L\" - PopPacket\\n\");\n\n\tAVPacket avPacket;\n\tav_init_packet(&avPacket);\n\tavPacket.data = NULL;\n\tavPacket.size = 0;\n\n\tif (!m_packetQueue.empty())\n\t{\n\t\tavPacket = m_packetQueue.front();\n\t\tm_packetQueue.pop();\n\t}\n\n\treturn avPacket;\n}\n\nvoid MediaSampleProvider::Flush()\n{\n\t/*while (!m_packetQueue.empty())\n\t{\n\t\tav_free_packet(&PopPacket());\n\t}*/\n}\n\n\n\n"
  },
  {
    "path": "FFmpegInterop/Source/MediaSampleProvider.h",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#pragma once\n#include <queue>\n\nextern \"C\"\n{\n#include <libavformat/avformat.h>\n}\n\nusing namespace Windows::Storage::Streams;\nusing namespace Windows::Media::Core;\n\nnamespace FFmpegInterop\n{\n\tref class FFmpegInteropMSS;\n\tref class FFmpegReader;\n\n\tref class MediaSampleProvider\n\t{\n\tpublic:\n\t\tvirtual ~MediaSampleProvider();\n\t\tvirtual MediaStreamSample^ GetNextSample();\n\t\tvirtual void Flush();\n\t\tvirtual void SetCurrentStreamIndex(int streamIndex);\n\n\tinternal:\n\t\tvoid PushPacket(AVPacket packet);\n\t\tAVPacket PopPacket();\n\n\tprivate:\n\t\tstd::queue<AVPacket> m_packetQueue;\n\t\tint m_streamIndex;\n\n\tinternal:\n\t\t// The FFmpeg context. Because they are complex types\n\t\t// we declare them as internal so they don't get exposed\n\t\t// externally\n\t\tFFmpegReader^ m_pReader;\n\t\tAVFormatContext* m_pAvFormatCtx;\n\t\tAVCodecContext* m_pAvCodecCtx;\n\n\tinternal:\n\t\tMediaSampleProvider(\n\t\t\tFFmpegReader^ reader,\n\t\t\tAVFormatContext* avFormatCtx,\n\t\t\tAVCodecContext* avCodecCtx);\n\t\tvirtual HRESULT AllocateResources();\n\t\tvirtual HRESULT WriteAVPacketToStream(DataWriter^ writer, AVPacket* avPacket);\n\t\tvirtual HRESULT DecodeAVPacket(DataWriter^ dataWriter, AVPacket* avPacket);\n\t};\n}"
  },
  {
    "path": "FFmpegInterop/Source/UncompressedAudioSampleProvider.cpp",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#include \"pch.h\"\n#include \"UncompressedAudioSampleProvider.h\"\n\nusing namespace FFmpegInterop;\n\nUncompressedAudioSampleProvider::UncompressedAudioSampleProvider(\n\tFFmpegReader^ reader,\n\tAVFormatContext* avFormatCtx,\n\tAVCodecContext* avCodecCtx)\n\t: MediaSampleProvider(reader, avFormatCtx, avCodecCtx)\n\t, m_pAvFrame(nullptr)\n\t, m_pSwrCtx(nullptr)\n{\n}\n\nHRESULT UncompressedAudioSampleProvider::AllocateResources()\n{\n\tHRESULT hr = S_OK;\n\thr = MediaSampleProvider::AllocateResources();\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Set default channel layout when the value is unknown (0)\n\t\tint64 inChannelLayout = m_pAvCodecCtx->channel_layout ? m_pAvCodecCtx->channel_layout : av_get_default_channel_layout(m_pAvCodecCtx->channels);\n\t\tint64 outChannelLayout = av_get_default_channel_layout(m_pAvCodecCtx->channels);\n\n\t\t// Set up resampler to convert any PCM format (e.g. AV_SAMPLE_FMT_FLTP) to AV_SAMPLE_FMT_S16 PCM format that is expected by Media Element.\n\t\t// Additional logic can be added to avoid resampling PCM data that is already in AV_SAMPLE_FMT_S16_PCM.\n\t\tm_pSwrCtx = swr_alloc_set_opts(\n\t\t\tNULL,\n\t\t\toutChannelLayout,\n\t\t\tAV_SAMPLE_FMT_S16,\n\t\t\tm_pAvCodecCtx->sample_rate,\n\t\t\tinChannelLayout,\n\t\t\tm_pAvCodecCtx->sample_fmt,\n\t\t\tm_pAvCodecCtx->sample_rate,\n\t\t\t0,\n\t\t\tNULL);\n\n\t\tif (!m_pSwrCtx)\n\t\t{\n\t\t\thr = E_OUTOFMEMORY;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tif (swr_init(m_pSwrCtx) < 0)\n\t\t{\n\t\t\thr = E_FAIL;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tm_pAvFrame = av_frame_alloc();\n\t\tif (!m_pAvFrame)\n\t\t{\n\t\t\thr = E_OUTOFMEMORY;\n\t\t}\n\t}\n\n\treturn hr;\n}\n\nUncompressedAudioSampleProvider::~UncompressedAudioSampleProvider()\n{\n\tif (m_pAvFrame)\n\t{\n\t\tav_freep(m_pAvFrame);\n\t}\n\n\t// Free \n\tswr_free(&m_pSwrCtx);\n}\n\nHRESULT UncompressedAudioSampleProvider::WriteAVPacketToStream(DataWriter^ dataWriter, AVPacket* avPacket)\n{\n\t// Because each packet can contain multiple frames, we have already written the packet to the stream\n\t// during the decode stage.\n\treturn S_OK;\n}\n\nHRESULT UncompressedAudioSampleProvider::DecodeAVPacket(DataWriter^ dataWriter, AVPacket* avPacket)\n{\n\tHRESULT hr = S_OK;\n\tint frameComplete = 0;\n\t// Each audio packet may contain multiple frames which requires calling avcodec_decode_audio4 for each frame. Loop through the entire packet data\n\twhile (avPacket->size > 0)\n\t{\n\t\tframeComplete = 0;\n\t\tint decodedBytes = avcodec_decode_audio4(m_pAvCodecCtx, m_pAvFrame, &frameComplete, avPacket);\n\n\t\tif (decodedBytes < 0)\n\t\t{\n\t\t\tDebugMessage(L\"Fail To Decode!\\n\");\n\t\t\thr = E_FAIL;\n\t\t\tbreak; // Skip broken frame\n\t\t}\n\n\t\tif (SUCCEEDED(hr) && frameComplete)\n\t\t{\n\t\t\t// Resample uncompressed frame to AV_SAMPLE_FMT_S16 PCM format that is expected by Media Element\n\t\t\tuint8_t *resampledData = nullptr;\n\t\t\tunsigned int aBufferSize = av_samples_alloc(&resampledData, NULL, m_pAvFrame->channels, m_pAvFrame->nb_samples, AV_SAMPLE_FMT_S16, 0);\n\t\t\tint resampledDataSize = swr_convert(m_pSwrCtx, &resampledData, aBufferSize, (const uint8_t **)m_pAvFrame->extended_data, m_pAvFrame->nb_samples);\n\t\t\tauto aBuffer = ref new Platform::Array<uint8_t>(resampledData, min(aBufferSize, (unsigned int)(resampledDataSize * m_pAvFrame->channels * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16))));\n\t\t\tdataWriter->WriteBytes(aBuffer);\n\t\t\tav_freep(&resampledData);\n\t\t\tav_frame_unref(m_pAvFrame);\n\t\t}\n\n\t\tif (SUCCEEDED(hr))\n\t\t{\n\t\t\t// Advance to the next frame data that have not been decoded if any\n\t\t\tavPacket->size -= decodedBytes;\n\t\t\tavPacket->data += decodedBytes;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// We've completed the packet. Return S_FALSE to indicate an incomplete frame\n\t\thr = (frameComplete != 0) ? S_OK : S_FALSE;\n\t}\n\n\treturn hr;\n}\n"
  },
  {
    "path": "FFmpegInterop/Source/UncompressedAudioSampleProvider.h",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#pragma once\n#include \"MediaSampleProvider.h\"\n\nextern \"C\"\n{\n#include <libswresample/swresample.h>\n}\n\nnamespace FFmpegInterop\n{\n\tref class UncompressedAudioSampleProvider: MediaSampleProvider\n\t{\n\tpublic:\n\t\tvirtual ~UncompressedAudioSampleProvider();\n\n\tinternal:\n\t\tUncompressedAudioSampleProvider(\n\t\t\tFFmpegReader^ reader,\n\t\t\tAVFormatContext* avFormatCtx,\n\t\t\tAVCodecContext* avCodecCtx);\n\t\tvirtual HRESULT WriteAVPacketToStream(DataWriter^ writer, AVPacket* avPacket) override;\n\t\tvirtual HRESULT DecodeAVPacket(DataWriter^ dataWriter, AVPacket* avPacket) override;\n\t\tvirtual HRESULT AllocateResources() override;\n\n\tprivate:\n\t\tAVFrame* m_pAvFrame;\n\t\tSwrContext* m_pSwrCtx;\n\t};\n}\n\n"
  },
  {
    "path": "FFmpegInterop/Source/UncompressedVideoSampleProvider.cpp",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#include \"pch.h\"\n#include \"UncompressedVideoSampleProvider.h\"\n\nextern \"C\"\n{\n#include <libavutil/imgutils.h>\n}\n\n\nusing namespace FFmpegInterop;\n\nUncompressedVideoSampleProvider::UncompressedVideoSampleProvider(\n\tFFmpegReader^ reader,\n\tAVFormatContext* avFormatCtx,\n\tAVCodecContext* avCodecCtx)\n\t: MediaSampleProvider(reader, avFormatCtx, avCodecCtx)\n\t, m_pAvFrame(nullptr)\n\t, m_pSwsCtx(nullptr)\n{\n\tfor (int i = 0; i < 4; i++)\n\t{\n\t\tm_rgVideoBufferLineSize[i] = 0;\n\t\tm_rgVideoBufferData[i] = nullptr;\n\t}\n}\n\nHRESULT UncompressedVideoSampleProvider::AllocateResources()\n{\n\tHRESULT hr = S_OK;\n\thr = MediaSampleProvider::AllocateResources();\n\tif (SUCCEEDED(hr))\n\t{\n\t\t// Setup software scaler to convert any decoder pixel format (e.g. YUV420P) to NV12 that is supported in Windows & Windows Phone MediaElement\n\t\tm_pSwsCtx = sws_getContext(\n\t\t\tm_pAvCodecCtx->width,\n\t\t\tm_pAvCodecCtx->height,\n\t\t\tm_pAvCodecCtx->pix_fmt,\n\t\t\tm_pAvCodecCtx->width,\n\t\t\tm_pAvCodecCtx->height,\n\t\t\tAV_PIX_FMT_NV12,\n\t\t\tSWS_BICUBIC,\n\t\t\tNULL,\n\t\t\tNULL,\n\t\t\tNULL);\n\n\t\tif (m_pSwsCtx == nullptr)\n\t\t{\n\t\t\thr = E_OUTOFMEMORY;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tm_pAvFrame = av_frame_alloc();\n\t\tif (m_pAvFrame == nullptr)\n\t\t{\n\t\t\thr = E_OUTOFMEMORY;\n\t\t}\n\t}\n\n\tif (SUCCEEDED(hr))\n\t{\n\t\tif (av_image_alloc(m_rgVideoBufferData, m_rgVideoBufferLineSize, m_pAvCodecCtx->width, m_pAvCodecCtx->height, AV_PIX_FMT_NV12, 1) < 0)\n\t\t{\n\t\t\thr = E_FAIL;\n\t\t}\n\t}\n\n\treturn hr;\n}\n\nUncompressedVideoSampleProvider::~UncompressedVideoSampleProvider()\n{\n\tif (m_pAvFrame)\n\t{\n\t\tav_freep(m_pAvFrame);\n\t}\n\n\tif (m_rgVideoBufferData)\n\t{\n\t\tav_freep(m_rgVideoBufferData);\n\t}\n}\n\nHRESULT UncompressedVideoSampleProvider::WriteAVPacketToStream(DataWriter^ dataWriter, AVPacket* avPacket)\n{\n\t// Convert decoded video pixel format to NV12 using FFmpeg software scaler\n\tif (sws_scale(m_pSwsCtx, (const uint8_t **)(m_pAvFrame->data), m_pAvFrame->linesize, 0, m_pAvCodecCtx->height, m_rgVideoBufferData, m_rgVideoBufferLineSize) < 0)\n\t{\n\t\treturn E_FAIL;\n\t}\n\n\tauto YBuffer = ref new Platform::Array<uint8_t>(m_rgVideoBufferData[0], m_rgVideoBufferLineSize[0] * m_pAvCodecCtx->height);\n\tauto UVBuffer = ref new Platform::Array<uint8_t>(m_rgVideoBufferData[1], m_rgVideoBufferLineSize[1] * m_pAvCodecCtx->height / 2);\n\tdataWriter->WriteBytes(YBuffer);\n\tdataWriter->WriteBytes(UVBuffer);\n\tav_frame_unref(m_pAvFrame);\n\n\treturn S_OK;\n}\n\nHRESULT UncompressedVideoSampleProvider::DecodeAVPacket(DataWriter^ dataWriter, AVPacket* avPacket)\n{\n\tint frameComplete = 0;\n\tif (avcodec_decode_video2(m_pAvCodecCtx, m_pAvFrame, &frameComplete, avPacket) < 0)\n\t{\n\t\tDebugMessage(L\"DecodeAVPacket Failed\\n\");\n\t\tframeComplete = 1;\n\t}\n\telse\n\t{\n\t\tif (frameComplete)\n\t\t{\n\t\t\tavPacket->pts = av_frame_get_best_effort_timestamp(m_pAvFrame);\n\t\t}\n\t}\n\n\treturn frameComplete ? S_OK : S_FALSE;\n}\n"
  },
  {
    "path": "FFmpegInterop/Source/UncompressedVideoSampleProvider.h",
    "content": "//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#pragma once\n#include \"MediaSampleProvider.h\"\n\nextern \"C\"\n{\n#include <libswscale/swscale.h>\n}\n\n\nnamespace FFmpegInterop\n{\n\tref class UncompressedVideoSampleProvider: MediaSampleProvider\n\t{\n\tpublic:\n\t\tvirtual ~UncompressedVideoSampleProvider();\n\n\tinternal:\n\t\tUncompressedVideoSampleProvider(\n\t\t\tFFmpegReader^ reader,\n\t\t\tAVFormatContext* avFormatCtx,\n\t\t\tAVCodecContext* avCodecCtx);\n\t\tvirtual HRESULT WriteAVPacketToStream(DataWriter^ writer, AVPacket* avPacket) override;\n\t\tvirtual HRESULT DecodeAVPacket(DataWriter^ dataWriter, AVPacket* avPacket) override;\n\t\tvirtual HRESULT AllocateResources() override;\n\n\tprivate:\n\t\tAVFrame* m_pAvFrame;\n\t\tSwsContext* m_pSwsCtx;\n\t\tint m_rgVideoBufferLineSize[4];\n\t\tuint8_t* m_rgVideoBufferData[4];\n\t};\n}\n\n"
  },
  {
    "path": "FFmpegInterop/Win8.1/FFmpegInterop.Shared/FFmpegGifDecoder.cpp",
    "content": "#include \"pch.h\"\r\n#include \"FFmpegGifDecoder.h\"\r\n#include <cstdint>\n#include <limits>\r\n#include <ctime>\r\n\r\n#ifndef NOMINMAX\r\n#undef min\r\n#undef max\r\n#endif\r\n\r\nextern \"C\"\n{\n#include <libavformat/avformat.h>\n}\nusing namespace FFmpegInterop;\r\n\r\ntypedef struct VideoInfo {\n\n\t~VideoInfo() {\n\t\tif (video_dec_ctx) {\n\t\t\tavcodec_close(video_dec_ctx);\n\t\t\tvideo_dec_ctx = nullptr;\n\t\t}\n\t\tif (fmt_ctx) {\n\t\t\tavformat_close_input(&fmt_ctx);\n\t\t\tfmt_ctx = nullptr;\n\t\t}\n\t\tif (frame) {\n\t\t\tav_frame_free(&frame);\n\t\t\tframe = nullptr;\n\t\t}\n\t\tif (src) {\n\t\t\tdelete[] src;\n\t\t\tsrc = nullptr;\n\t\t}\n\t\tif (free_orig_pkt)\n\t\t{\n\t\t\tav_free_packet(&orig_pkt);\n\t\t\tfree_orig_pkt = false;\n\t\t}\n\t\t//av_packet_unref(&orig_pkt);\n\n\t\tvideo_stream_idx = -1;\n\t\tvideo_stream = nullptr;\n\t}\n\n\tAVFormatContext *fmt_ctx = nullptr;\n\tchar *src = nullptr;\n\tint video_stream_idx = -1;\n\tAVStream *video_stream = nullptr;\n\tAVCodecContext *video_dec_ctx = nullptr;\n\tAVFrame *frame = nullptr;\n\tbool has_decoded_frames = false;\n\tbool free_orig_pkt = false;\n\tAVPacket pkt;\n\tAVPacket orig_pkt;\n};\r\n\nvoid Log(Platform::String^ message, Platform::Object^ parameter1, Platform::Object^ parameter2){\n\tauto para1String = parameter1->ToString();\n\tauto para2String = parameter2->ToString();\n\tauto msg = std::wstring(message->Data());\n\tauto para1 = std::wstring(safe_cast<Platform::String^>(para1String)->Data());\n\tauto para2 = std::wstring(safe_cast<Platform::String^>(para2String)->Data());\n\n\tauto offset1 = msg.find(L\"{0}\");\n\n\tauto formattedText = msg.replace(offset1, 3, para1);// .append(L\"\\r\\n\");\n\n\tauto offset2 = formattedText.find(L\"{1}\");\n\n\tformattedText = formattedText.replace(offset2, 3, para2).append(L\"\\r\\n\");\n\n\t::OutputDebugString(formattedText.c_str());\n}\r\n\nvoid Log(Platform::String^ message, Platform::Object^ parameter){\n\tauto paraString = parameter->ToString();\n\tauto msg = std::wstring(message->Data());\n\tauto para = std::wstring(safe_cast<Platform::String^>(paraString)->Data());\n\n\tauto offset = msg.find(L\"{0}\");\n\n\tauto formattedText = msg.replace(offset, 3, para).append(L\"\\r\\n\");\n\n\t::OutputDebugString(formattedText.c_str());\n}\n\nint open_codec_context(int *stream_idx, AVFormatContext *fmt_ctx, enum AVMediaType type) {\n\tint ret;\n\tAVStream *st;\n\tAVCodecContext *dec_ctx = NULL;\n\tAVCodec *dec = NULL;\n\tAVDictionary *opts = NULL;\n\n\tret = av_find_best_stream(fmt_ctx, type, -1, -1, NULL, 0);\n\tif (ret < 0) {\n\t\t//LOGE(\"can't find %s stream in input file\\n\", av_get_media_type_string(type));\n\t\treturn ret;\n\t}\n\telse {\n\t\t*stream_idx = ret;\n\t\tst = fmt_ctx->streams[*stream_idx];\n\n\t\tdec_ctx = st->codec;\n\t\tdec = avcodec_find_decoder(dec_ctx->codec_id);\n\t\tif (!dec) {\n\t\t\t//LOGE(\"failed to find %s codec\\n\", av_get_media_type_string(type));\n\t\t\treturn ret;\n\t\t}\n\n\t\tav_dict_set(&opts, \"refcounted_frames\", \"1\", 0);\n\t\tif ((ret = avcodec_open2(dec_ctx, dec, &opts)) < 0) {\n\t\t\t//LOGE(\"failed to open %s codec\\n\", av_get_media_type_string(type));\n\t\t\treturn ret;\n\t\t}\n\t}\n\n\treturn 0;\n}\n\nint decode_packet(VideoInfo *info, int *got_frame) {\n\ttry{\n\n\t\tint ret = 0;\n\t\tint decoded = info->pkt.size;\n\n\t\t*got_frame = 0;\n\t\tif (info->pkt.stream_index == info->video_stream_idx) {\n\t\t\tret = avcodec_decode_video2(info->video_dec_ctx, info->frame, got_frame, &info->pkt);\n\t\t\tif (ret != 0) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t}\n\n\t\treturn decoded;\n\t}\n\tcatch (Platform::Exception^ e)\n\t{\n\n\t}\n\n\treturn -1;\n}\r\n\r\nstatic bool _once;\r\n\r\nint FFmpegGifDecoder::CreateDecoder(Platform::String^ src, Platform::WriteOnlyArray<int>^ data)\n{\n\t//if (!_once)\n\t{\n\t\t_once = true;\n\t\tav_register_all();\n\t}\n\n\tVideoInfo *info = new VideoInfo();\n\n\tPlatform::String^ fooRT = src;\r\n\tstd::wstring fooW(fooRT->Begin());\r\n\tstd::string fooA(fooW.begin(), fooW.end());\r\n\tconst char* srcString = fooA.c_str();\n\n\tint len = strlen(srcString);\n\tinfo->src = new char[len + 1];\n\tmemcpy(info->src, srcString, len);\n\tinfo->src[len] = '\\0';\n\tif (srcString != 0) {\n\t\t//delete[] srcString;\n\t\t//env->ReleaseStringUTFChars(src, srcString);\n\t}\n\n\tint ret;\n\tif ((ret = avformat_open_input(&info->fmt_ctx, info->src, NULL, NULL)) < 0) {\n\t\t//LOGE(\"can't open source file %s, %s\", info->src, av_err2str(ret));\n\t\tchar* error = new char[256];\n\t\tauto str = av_strerror(ret, error, 256);\n\t\tdelete info;\n\t\treturn 0;\n\t}\n\n\tif ((ret = avformat_find_stream_info(info->fmt_ctx, NULL)) < 0) {\n\t\t//LOGE(\"can't find stream information %s, %s\", info->src, av_err2str(ret));\n\t\tdelete info;\n\t\treturn 0;\n\t}\n\n\tif (open_codec_context(&info->video_stream_idx, info->fmt_ctx, AVMEDIA_TYPE_VIDEO) >= 0) {\n\t\tinfo->video_stream = info->fmt_ctx->streams[info->video_stream_idx];\n\t\tinfo->video_dec_ctx = info->video_stream->codec;\n\t}\n\n\tif (info->video_stream <= 0) {\n\t\t//LOGE(\"can't find video stream in the input, aborting %s\", info->src);\n\t\tdelete info;\n\t\treturn 0;\n\t}\n\n\tinfo->frame = av_frame_alloc();\n\tif (info->frame == nullptr) {\n\t\t//LOGE(\"can't allocate frame %s\", info->src);\n\t\tdelete info;\n\t\treturn 0;\n\t}\n\n\tav_init_packet(&info->pkt);\n\tinfo->pkt.data = NULL;\n\tinfo->pkt.size = 0;\n\tinfo->orig_pkt = info->pkt;\n\n\t//jint *dataArr = env->GetIntArrayElements(data, 0);\n\tif (data != nullptr && data->Length >= 2) {\n\t\tdata[0] = info->video_dec_ctx->width;\n\t\tdata[1] = info->video_dec_ctx->height;\n\t\t//env->ReleaseIntArrayElements(data, dataArr, 0);\n\t}\n\n\t//LOGD(\"successfully opened file %s\", info->src);\n\n\treturn (int)info;\n}\n\nvoid FFmpegGifDecoder::DestroyDecoder(int ptr) \n{\n\tif (ptr == NULL) {\n\t\treturn;\n\t}\n\t\n\tVideoInfo *info = (VideoInfo *)ptr;\n\tdelete info;\n}\r\n\r\n#define USE_BRANCHLESS 0\r\n#if USE_BRANCHLESS\r\nstatic __inline int32 clamp0(int32 v) {\r\n\treturn ((-(v) >> 31) & (v));\r\n}\r\n\r\nstatic __inline int32 clamp255(int32 v) {\r\n\treturn (((255 - (v)) >> 31) | (v)) & 255;\r\n}\r\n\r\nstatic __inline uint32 Clamp(int32 val) {\r\n\tint v = clamp0(val);\r\n\treturn (uint32)(clamp255(v));\r\n}\r\n\r\nstatic __inline uint32 Abs(int32 v) {\r\n\tint m = v >> 31;\r\n\treturn (v + m) ^ m;\r\n}\r\n#else  // USE_BRANCHLESS\r\nstatic __inline int32 clamp0(int32 v) {\r\n\treturn (v < 0) ? 0 : v;\r\n}\r\n\r\nstatic __inline int32 clamp255(int32 v) {\r\n\treturn (v > 255) ? 255 : v;\r\n}\r\n\r\nstatic __inline uint32 Clamp(int32 val) {\r\n\tint v = clamp0(val);\r\n\treturn (uint32)(clamp255(v));\r\n}\r\n\r\nstatic __inline uint32 Abs(int32 v) {\r\n\treturn (v < 0) ? -v : v;\r\n}\r\n#endif  // USE_BRANCHLESS\r\n\r\n#define YG 74 /* (int8)(1.164 * 64 + 0.5) */\r\n\r\n#define UB 127 /* min(63,(int8)(2.018 * 64)) */\r\n#define UG -25 /* (int8)(-0.391 * 64 - 0.5) */\r\n#define UR 0\r\n\r\n#define VB 0\r\n#define VG -52 /* (int8)(-0.813 * 64 - 0.5) */\r\n#define VR 102 /* (int8)(1.596 * 64 + 0.5) */\r\n\r\n// Bias\r\n#define BB UB * 128 + VB * 128\r\n#define BG UG * 128 + VG * 128\r\n#define BR UR * 128 + VR * 128\r\n\r\nstatic __inline void YuvPixel(uint8 y, uint8 u, uint8 v,\r\n\tuint8* b, uint8* g, uint8* r) {\r\n\tint32 y1 = ((int32)(y)-16) * YG;\r\n\t*b = Clamp((int32)((u * UB + v * VB) - (BB)+y1) >> 6);\r\n\t*g = Clamp((int32)((u * UG + v * VG) - (BG)+y1) >> 6);\r\n\t*r = Clamp((int32)((u * UR + v * VR) - (BR)+y1) >> 6);\r\n}\r\n\r\n// Also used for 420\r\nvoid I422ToARGBRow_C(const uint8* src_y,\r\n\tconst uint8* src_u,\r\n\tconst uint8* src_v,\r\n\tuint8* rgb_buf,\r\n\tint width) {\r\n\tint x;\r\n\tfor (x = 0; x < width - 1; x += 2) {\r\n\t\tYuvPixel(src_y[0], src_u[0], src_v[0],\r\n\t\t\trgb_buf + 0, rgb_buf + 1, rgb_buf + 2);\r\n\t\trgb_buf[3] = 255;\r\n\t\tYuvPixel(src_y[1], src_u[0], src_v[0],\r\n\t\t\trgb_buf + 4, rgb_buf + 5, rgb_buf + 6);\r\n\t\trgb_buf[7] = 255;\r\n\t\tsrc_y += 2;\r\n\t\tsrc_u += 1;\r\n\t\tsrc_v += 1;\r\n\t\trgb_buf += 8;  // Advance 2 pixels.\r\n\t}\r\n\tif (width & 1) {\r\n\t\tYuvPixel(src_y[0], src_u[0], src_v[0],\r\n\t\t\trgb_buf + 0, rgb_buf + 1, rgb_buf + 2);\r\n\t\trgb_buf[3] = 255;\r\n\t}\r\n}\r\n\r\n// Convert I420 to ARGB.\r\n// LIBYUV_API\r\nint I420ToARGB(const uint8* src_y, int src_stride_y,\r\n\tconst uint8* src_u, int src_stride_u,\r\n\tconst uint8* src_v, int src_stride_v,\r\n\tuint8* dst_argb, int dst_stride_argb,\r\n\tint width, int height) {\r\n\tif (!src_y || !src_u || !src_v || !dst_argb ||\r\n\t\twidth <= 0 || height == 0) {\r\n\t\treturn -1;\r\n\t}\r\n\t// Negative height means invert the image.\r\n\tif (height < 0) {\r\n\t\theight = -height;\r\n\t\tdst_argb = dst_argb + (height - 1) * dst_stride_argb;\r\n\t\tdst_stride_argb = -dst_stride_argb;\r\n\t}\r\n\tvoid(*I422ToARGBRow)(const uint8* y_buf,\r\n\t\tconst uint8* u_buf,\r\n\t\tconst uint8* v_buf,\r\n\t\tuint8* rgb_buf,\r\n\t\tint width) = I422ToARGBRow_C;\r\n#if defined(HAS_I422TOARGBROW_SSSE3)\r\n\tif (TestCpuFlag(kCpuHasSSSE3) && width >= 8) {\r\n\t\tI422ToARGBRow = I422ToARGBRow_Any_SSSE3;\r\n\t\tif (IS_ALIGNED(width, 8)) {\r\n\t\t\tI422ToARGBRow = I422ToARGBRow_Unaligned_SSSE3;\r\n\t\t\tif (IS_ALIGNED(dst_argb, 16) && IS_ALIGNED(dst_stride_argb, 16)) {\r\n\t\t\t\tI422ToARGBRow = I422ToARGBRow_SSSE3;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n#endif\r\n#if defined(HAS_I422TOARGBROW_AVX2)\r\n\tif (TestCpuFlag(kCpuHasAVX2) && width >= 16) {\r\n\t\tI422ToARGBRow = I422ToARGBRow_Any_AVX2;\r\n\t\tif (IS_ALIGNED(width, 16)) {\r\n\t\t\tI422ToARGBRow = I422ToARGBRow_AVX2;\r\n\t\t}\r\n\t}\r\n#endif\r\n#if defined(HAS_I422TOARGBROW_NEON)\r\n\tif (TestCpuFlag(kCpuHasNEON) && width >= 8) {\r\n\t\tI422ToARGBRow = I422ToARGBRow_Any_NEON;\r\n\t\tif (IS_ALIGNED(width, 8)) {\r\n\t\t\tI422ToARGBRow = I422ToARGBRow_NEON;\r\n\t\t}\r\n\t}\r\n#endif\r\n#if defined(HAS_I422TOARGBROW_MIPS_DSPR2)\r\n\tif (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) &&\r\n\t\tIS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&\r\n\t\tIS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&\r\n\t\tIS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&\r\n\t\tIS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) {\r\n\t\tI422ToARGBRow = I422ToARGBRow_MIPS_DSPR2;\r\n\t}\r\n#endif\r\n\r\n\tfor (int y = 0; y < height; ++y) {\r\n\t\tI422ToARGBRow(src_y, src_u, src_v, dst_argb, width);\r\n\t\tdst_argb += dst_stride_argb;\r\n\t\tsrc_y += src_stride_y;\r\n\t\tif (y & 1) {\r\n\t\t\tsrc_u += src_stride_u;\r\n\t\t\tsrc_v += src_stride_v;\r\n\t\t}\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\n\r\n// Use first 4 shuffler values to reorder ARGB channels.\r\nvoid ARGBShuffleRow_C(const uint8* src_argb, uint8* dst_argb,\r\n\tconst uint8* shuffler, int pix) {\r\n\tint index0 = shuffler[0];\r\n\tint index1 = shuffler[1];\r\n\tint index2 = shuffler[2];\r\n\tint index3 = shuffler[3];\r\n\t// Shuffle a row of ARGB.\r\n\tint x;\r\n\tfor (x = 0; x < pix; ++x) {\r\n\t\t// To support in-place conversion.\r\n\t\tuint8 b = src_argb[index0];\r\n\t\tuint8 g = src_argb[index1];\r\n\t\tuint8 r = src_argb[index2];\r\n\t\tuint8 a = src_argb[index3];\r\n\t\tdst_argb[0] = b;\r\n\t\tdst_argb[1] = g;\r\n\t\tdst_argb[2] = r;\r\n\t\tdst_argb[3] = a;\r\n\t\tsrc_argb += 4;\r\n\t\tdst_argb += 4;\r\n\t}\r\n}\r\n\r\nint ARGBShuffle(const uint8* src_bgra, int src_stride_bgra,\r\n\tuint8* dst_argb, int dst_stride_argb,\r\n\tconst uint8* shuffler, int width, int height) {\r\n\tint y;\r\n\tvoid(*ARGBShuffleRow)(const uint8* src_bgra, uint8* dst_argb,\r\n\t\tconst uint8* shuffler, int pix) = ARGBShuffleRow_C;\r\n\tif (!src_bgra || !dst_argb ||\r\n\t\twidth <= 0 || height == 0) {\r\n\t\treturn -1;\r\n\t}\r\n\t// Negative height means invert the image.\r\n\tif (height < 0) {\r\n\t\theight = -height;\r\n\t\tsrc_bgra = src_bgra + (height - 1) * src_stride_bgra;\r\n\t\tsrc_stride_bgra = -src_stride_bgra;\r\n\t}\r\n\t// Coalesce rows.\r\n\tif (src_stride_bgra == width * 4 &&\r\n\t\tdst_stride_argb == width * 4) {\r\n\t\twidth *= height;\r\n\t\theight = 1;\r\n\t\tsrc_stride_bgra = dst_stride_argb = 0;\r\n\t}\r\n\r\n\tfor (y = 0; y < height; ++y) {\r\n\t\tARGBShuffleRow(src_bgra, dst_argb, shuffler, width);\r\n\t\tsrc_bgra += src_stride_bgra;\r\n\t\tdst_argb += dst_stride_argb;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\n\r\n// Shuffle table for converting ABGR to ARGB.\r\nstatic uint8 kShuffleMaskABGRToARGB[16] = {\r\n\t2u, 1u, 0u, 3u, 6u, 5u, 4u, 7u, 10u, 9u, 8u, 11u, 14u, 13u, 12u, 15u\r\n};\r\n\r\n// Convert ABGR to ARGB.\r\nint ABGRToARGB(const uint8* src_abgr, int src_stride_abgr,\r\nuint8* dst_argb, int dst_stride_argb,\r\nint width, int height) {\r\n\treturn ARGBShuffle(src_abgr, src_stride_abgr,\r\n\t\tdst_argb, dst_stride_argb,\r\n\t\t(const uint8*)(&kShuffleMaskABGRToARGB),\r\n\t\twidth, height);\r\n}\r\n\nPlatform::Array<uint8_t>^ FFmpegGifDecoder::GetVideoFrame(int ptr, Platform::WriteOnlyArray<int>^ data) {\n\tauto emptyArray = ref new Platform::Array<uint8_t>(0);\n\tunsigned int start = clock();\n\n\t//Log(\"start={0}\", start);\n\tif (ptr == NULL) {\n\t\treturn emptyArray;\n\t}\n\tVideoInfo *info = (VideoInfo *)ptr;\n\tint ret = 0;\n\tint got_frame = 0;\n\n\twhile (true) {\n\t\tif (info->pkt.size == 0) {\n\t\t\tret = av_read_frame(info->fmt_ctx, &info->pkt);\n\t\t\t//LOGD(\"got packet with size %d\", info->pkt.size);\n\t\t\tif (ret >= 0) {\n\t\t\t\tinfo->orig_pkt = info->pkt;\n\t\t\t\tinfo->free_orig_pkt = true;\n\t\t\t}\n\t\t}\n\n\t\tif (info->pkt.size > 0) {\n\t\t\tret = decode_packet(info, &got_frame);\n\t\t\tif (ret < 0) {\n\t\t\t\tif (info->has_decoded_frames) {\n\t\t\t\t\tret = 0;\n\t\t\t\t}\n\t\t\t\tinfo->pkt.size = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//LOGD(\"read size %d from packet\", ret);\n\t\t\t\tinfo->pkt.data += ret;\n\t\t\t\tinfo->pkt.size -= ret;\n\t\t\t}\n\n\t\t\tif (info->pkt.size == 0) {\n\t\t\t\tif (info->free_orig_pkt){\n\t\t\t\t\tinfo->free_orig_pkt = false;\n\t\t\t\t\tav_free_packet(&info->orig_pkt);\n\t\t\t\t}\n\t\t\t\t//av_packet_unref(&info->orig_pkt);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tinfo->pkt.data = NULL;\n\t\t\tinfo->pkt.size = 0;\n\t\t\tret = decode_packet(info, &got_frame);\n\t\t\tif (ret < 0) {\n\t\t\t\t//LOGE(\"can't decode packet flushed %s\", info->src);\n\t\t\t\treturn emptyArray;\n\t\t\t}\n\t\t\tif (got_frame == 0) {\n\t\t\t\tif (info->has_decoded_frames) {\n\t\t\t\t\t//LOGD(\"file end reached %s\", info->src);\n\t\t\t\t\tif ((ret = avformat_seek_file(info->fmt_ctx, -1, std::numeric_limits<int64_t>::min(), 0, std::numeric_limits<int64_t>::max(), 0)) < 0) {\n\t\t\t\t\t\t//LOGE(\"can't seek to begin of file %s, %s\", info->src, av_err2str(ret));\n\t\t\t\t\t\treturn emptyArray;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tavcodec_flush_buffers(info->video_dec_ctx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (ret < 0) {\n\t\t\treturn emptyArray;\n\t\t}\n\n\t\tif (got_frame) {\n\n\t\t\tauto prevStop = start;\n\t\t\tauto stop = (clock() - start);\n\t\t\tLog(\"elapsed1={0} {1}\", (double)stop, (double)(stop - prevStop));\n\n\t\t\t//LOGD(\"decoded frame with w = %d, h = %d, format = %d\", info->frame->width, info->frame->height, info->frame->format);\n\t\t\tauto pixelsLength = info->frame->width * info->frame->height * 4;\n\t\t\tauto pixels = ref new Platform::Array<uint8_t>(pixelsLength);\n\n\t\t\tif (info->frame->format == AV_PIX_FMT_YUV420P || info->frame->format == AV_PIX_FMT_BGRA) {\n\t\t\t\t//jint *dataArr = env->GetIntArrayElements(data, 0);\n\t\t\t\tif (data != nullptr && data->Length >= 3) {\n\t\t\t\t\tdata[2] = (int)(1000 * info->frame->pkt_pts * av_q2d(info->video_stream->time_base));\n\t\t\t\t\t//env->ReleaseIntArrayElements(data, dataArr, 0);\n\t\t\t\t}\n\n\t\t\t\tif (info->frame->format == AV_PIX_FMT_YUV420P) {\n\t\t\t\t\tI420ToARGB(info->frame->data[0], info->frame->linesize[0], info->frame->data[2], info->frame->linesize[2], info->frame->data[1], info->frame->linesize[1], pixels->Data, info->frame->width * 4, info->frame->width, info->frame->height);\n\t\t\t\t}\n\t\t\t\telse if (info->frame->format == AV_PIX_FMT_BGRA) {\n\t\t\t\t\tABGRToARGB(info->frame->data[0], info->frame->linesize[0], pixels->Data, info->frame->width * 4, info->frame->width, info->frame->height);\n\t\t\t\t}\n\t\t\t}\n\t\t\tprevStop = stop;\n\t\t\tstop = (clock() - start);\n\t\t\tLog(\"elapsed2={0} {1}\", (double)stop, (double)(stop - prevStop));\n\t\t\tinfo->has_decoded_frames = true;\n\t\t\tav_frame_unref(info->frame);\n\n\t\t\t//prevStop = stop;\n\t\t\t//stop = (clock() - start);\n\t\t\t//Log(\"elapsed3={0} {1}\", (double)stop, (double)(stop - prevStop));\n\t\t\t//auto returnBitmap = ref new Platform::Array<int>(pixelsLength / 4);\n\t\t\t//for (int j = 0; j < pixelsLength / 4; j++){\n\t\t\t//\treturnBitmap[j] =\r\n\t\t\t//\t\t(pixels[j * 4 + 3] << 24) +     //b\r\n\t\t\t//\t\t(pixels[j * 4 + 2] << 0) +      //g\r\n\t\t\t//\t\t(pixels[j * 4 + 1] << 8) +      //r\r\n\t\t\t//\t\t(pixels[j * 4] << 16);          //a \n\t\t\t//\t//returnBitmap[i] = pixels[i];\n\t\t\t//}\n\n\t\t\t//delete[] pixels;\n\n\t\t\tprevStop = stop;\n\t\t\tstop = (clock() - start);// / (double)CLOCKS_PER_SEC;\n\t\t\tLog(\"elapsed4={0} {1}\", (double)stop, (double)(stop - prevStop));\n\t\t\treturn pixels;\n\t\t}\n\t}\n\treturn emptyArray;\n}"
  },
  {
    "path": "FFmpegInterop/Win8.1/FFmpegInterop.Shared/FFmpegGifDecoder.h",
    "content": "#pragma once\r\n\r\nnamespace FFmpegInterop\n{\r\n\tpublic ref class FFmpegGifDecoder sealed\r\n\t{\r\n\tpublic:\r\n\t\tstatic int FFmpegGifDecoder::CreateDecoder(Platform::String^ src, Platform::WriteOnlyArray<int>^ data);\r\n\t\tstatic void FFmpegGifDecoder::DestroyDecoder(int ptr);\r\n\t\tstatic Platform::Array<uint8_t>^ FFmpegGifDecoder::GetVideoFrame(int ptr, Platform::WriteOnlyArray<int>^ data);\r\n\t};\r\n}\r\n\r\n"
  },
  {
    "path": "FFmpegInterop/Win8.1/FFmpegInterop.Shared/FFmpegInterop.Shared.vcxitems",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup Label=\"Globals\">\r\n    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>\r\n    <HasSharedItems>true</HasSharedItems>\r\n    <ItemsProjectGuid>{b290d2ce-e857-4ace-8541-d80a3b9ab04e}</ItemsProjectGuid>\r\n    <ItemsRootNamespace>FFmpeg</ItemsRootNamespace>\r\n    <ItemsProjectName>FFmpegInterop.Shared</ItemsProjectName>\r\n    <CodeSharingProject>248F659F-DAC5-46E8-AC09-60EC9FC95053</CodeSharingProject>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup>\r\n    <ClCompile>\r\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\FFmpegInteropMSS.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\FFmpegReader.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\H264AVCSampleProvider.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\H264SampleProvider.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\MediaSampleProvider.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\UncompressedAudioSampleProvider.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\UncompressedVideoSampleProvider.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)FFmpegGifDecoder.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)pch.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\FFmpegInteropMSS.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\FFmpegReader.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\H264AVCSampleProvider.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\H264SampleProvider.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\MediaSampleProvider.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\UncompressedAudioSampleProvider.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\UncompressedVideoSampleProvider.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)FFmpegGifDecoder.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)pch.cpp\">\r\n      <PrecompiledHeader>Create</PrecompiledHeader>\r\n    </ClCompile>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectCapability Include=\"SourceItemsFromImports\" />\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "FFmpegInterop/Win8.1/FFmpegInterop.Shared/FFmpegInterop.Shared.vcxitems.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup>\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)pch.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\FFmpegInteropMSS.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\FFmpegReader.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\H264SampleProvider.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\MediaSampleProvider.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\UncompressedAudioSampleProvider.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\UncompressedVideoSampleProvider.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\H264AVCSampleProvider.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)FFmpegGifDecoder.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)pch.cpp\">\r\n      <PrecompiledHeader>Create</PrecompiledHeader>\r\n    </ClCompile>\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\FFmpegInteropMSS.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\FFmpegReader.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\H264SampleProvider.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\MediaSampleProvider.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\UncompressedAudioSampleProvider.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\UncompressedVideoSampleProvider.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)..\\..\\Source\\H264AVCSampleProvider.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)FFmpegGifDecoder.cpp\" />\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "FFmpegInterop/Win8.1/FFmpegInterop.Shared/pch.cpp",
    "content": "﻿//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#include \"pch.h\"\n"
  },
  {
    "path": "FFmpegInterop/Win8.1/FFmpegInterop.Shared/pch.h",
    "content": "﻿//*****************************************************************************\n//\n//\tCopyright 2015 Microsoft Corporation\n//\n//\tLicensed under the Apache License, Version 2.0 (the \"License\");\n//\tyou may not use this file except in compliance with the License.\n//\tYou may obtain a copy of the License at\n//\n//\thttp ://www.apache.org/licenses/LICENSE-2.0\n//\n//\tUnless required by applicable law or agreed to in writing, software\n//\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n//\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\tSee the License for the specific language governing permissions and\n//\tlimitations under the License.\n//\n//*****************************************************************************\n\n#pragma once\n\n#include <collection.h>\n#include <ppltasks.h>\n\n// Disable debug string output on non-debug build\n#if !_DEBUG\n#define DebugMessage(x)\n#else\n#define DebugMessage(x) OutputDebugString(x)\n#endif"
  },
  {
    "path": "FFmpegInterop/Win8.1/FFmpegInterop.WindowsPhone/FFmpegInterop.WindowsPhone.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|ARM\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Text Include=\"..\\..\\..\\TelegramClient.WP81\\FFMpegBuild.txt\">\r\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">true</ExcludedFromBuild>\r\n      <DeploymentContent>false</DeploymentContent>\r\n    </Text>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{ebc5ca98-87f1-4a01-a48d-69659c103e72}</ProjectGuid>\r\n    <RootNamespace>FFmpegInterop</RootNamespace>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\r\n    <AppContainerApplication>true</AppContainerApplication>\r\n    <ApplicationType>Windows Phone</ApplicationType>\r\n    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>\r\n    <ConvergedProjectType>CodeSharingWindowsRuntimeComponent</ConvergedProjectType>\r\n    <ProjectName>FFmpegInterop.WindowsPhone</ProjectName>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <Import Project=\"..\\FFmpegInterop.Shared\\FFmpegInterop.Shared.vcxitems\" Label=\"Shared\" />\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n      <AdditionalIncludeDirectories>$(SolutionDir)ffmpeg\\Build\\WindowsPhone8.1\\$(PlatformTarget)\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <AdditionalDependencies>avcodec.lib;avdevice.lib;avfilter.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;shcore.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>$(SolutionDir)ffmpeg\\Build\\WindowsPhone8.1\\$(PlatformTarget)\\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n      <AdditionalIncludeDirectories>$(SolutionDir)ffmpeg\\Build\\WindowsPhone8.1\\$(PlatformTarget)\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <AdditionalDependencies>avcodec.lib;avdevice.lib;avfilter.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;shcore.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>$(SolutionDir)ffmpeg\\Build\\WindowsPhone8.1\\$(PlatformTarget)\\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>false</SDLCheck>\r\n      <AdditionalIncludeDirectories>$(SolutionDir)ffmpeg\\Build\\WindowsPhone8.1\\$(PlatformTarget)\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <AdditionalDependencies>avcodec.lib;avdevice.lib;avfilter.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;shcore.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>$(SolutionDir)ffmpeg\\Build\\WindowsPhone8.1\\$(PlatformTarget)\\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>false</SDLCheck>\r\n      <AdditionalIncludeDirectories>$(SolutionDir)ffmpeg\\Build\\WindowsPhone8.1\\$(PlatformTarget)\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <AdditionalDependencies>avcodec.lib;avdevice.lib;avfilter.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;shcore.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>$(SolutionDir)ffmpeg\\Build\\WindowsPhone8.1\\$(PlatformTarget)\\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "FFmpegInterop/Win8.1/FFmpegInterop.WindowsPhone/FFmpegInterop.WindowsPhone.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup>\r\n    <Text Include=\"..\\..\\..\\TelegramClient.WP81\\FFMpegBuild.txt\" />\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "LICENSE",
    "content": "\t\t    GNU GENERAL PUBLIC LICENSE\r\n\t\t       Version 2, June 1991\r\n\r\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\r\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n\t\t\t    Preamble\r\n\r\n  The licenses for most software are designed to take away your\r\nfreedom to share and change it.  By contrast, the GNU General Public\r\nLicense is intended to guarantee your freedom to share and change free\r\nsoftware--to make sure the software is free for all its users.  This\r\nGeneral Public License applies to most of the Free Software\r\nFoundation's software and to any other program whose authors commit to\r\nusing it.  (Some other Free Software Foundation software is covered by\r\nthe GNU Lesser General Public License instead.)  You can apply it to\r\nyour programs, too.\r\n\r\n  When we speak of free software, we are referring to freedom, not\r\nprice.  Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthis service if you wish), that you receive source code or can get it\r\nif you want it, that you can change the software or use pieces of it\r\nin new free programs; and that you know you can do these things.\r\n\r\n  To protect your rights, we need to make restrictions that forbid\r\nanyone to deny you these rights or to ask you to surrender the rights.\r\nThese restrictions translate to certain responsibilities for you if you\r\ndistribute copies of the software, or if you modify it.\r\n\r\n  For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must give the recipients all the rights that\r\nyou have.  You must make sure that they, too, receive or can get the\r\nsource code.  And you must show them these terms so they know their\r\nrights.\r\n\r\n  We protect your rights with two steps: (1) copyright the software, and\r\n(2) offer you this license which gives you legal permission to copy,\r\ndistribute and/or modify the software.\r\n\r\n  Also, for each author's protection and ours, we want to make certain\r\nthat everyone understands that there is no warranty for this free\r\nsoftware.  If the software is modified by someone else and passed on, we\r\nwant its recipients to know that what they have is not the original, so\r\nthat any problems introduced by others will not reflect on the original\r\nauthors' reputations.\r\n\r\n  Finally, any free program is threatened constantly by software\r\npatents.  We wish to avoid the danger that redistributors of a free\r\nprogram will individually obtain patent licenses, in effect making the\r\nprogram proprietary.  To prevent this, we have made it clear that any\r\npatent must be licensed for everyone's free use or not licensed at all.\r\n\r\n  The precise terms and conditions for copying, distribution and\r\nmodification follow.\r\n\r\n\t\t    GNU GENERAL PUBLIC LICENSE\r\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r\n\r\n  0. This License applies to any program or other work which contains\r\na notice placed by the copyright holder saying it may be distributed\r\nunder the terms of this General Public License.  The \"Program\", below,\r\nrefers to any such program or work, and a \"work based on the Program\"\r\nmeans either the Program or any derivative work under copyright law:\r\nthat is to say, a work containing the Program or a portion of it,\r\neither verbatim or with modifications and/or translated into another\r\nlanguage.  (Hereinafter, translation is included without limitation in\r\nthe term \"modification\".)  Each licensee is addressed as \"you\".\r\n\r\nActivities other than copying, distribution and modification are not\r\ncovered by this License; they are outside its scope.  The act of\r\nrunning the Program is not restricted, and the output from the Program\r\nis covered only if its contents constitute a work based on the\r\nProgram (independent of having been made by running the Program).\r\nWhether that is true depends on what the Program does.\r\n\r\n  1. You may copy and distribute verbatim copies of the Program's\r\nsource code as you receive it, in any medium, provided that you\r\nconspicuously and appropriately publish on each copy an appropriate\r\ncopyright notice and disclaimer of warranty; keep intact all the\r\nnotices that refer to this License and to the absence of any warranty;\r\nand give any other recipients of the Program a copy of this License\r\nalong with the Program.\r\n\r\nYou may charge a fee for the physical act of transferring a copy, and\r\nyou may at your option offer warranty protection in exchange for a fee.\r\n\r\n  2. You may modify your copy or copies of the Program or any portion\r\nof it, thus forming a work based on the Program, and copy and\r\ndistribute such modifications or work under the terms of Section 1\r\nabove, provided that you also meet all of these conditions:\r\n\r\n    a) You must cause the modified files to carry prominent notices\r\n    stating that you changed the files and the date of any change.\r\n\r\n    b) You must cause any work that you distribute or publish, that in\r\n    whole or in part contains or is derived from the Program or any\r\n    part thereof, to be licensed as a whole at no charge to all third\r\n    parties under the terms of this License.\r\n\r\n    c) If the modified program normally reads commands interactively\r\n    when run, you must cause it, when started running for such\r\n    interactive use in the most ordinary way, to print or display an\r\n    announcement including an appropriate copyright notice and a\r\n    notice that there is no warranty (or else, saying that you provide\r\n    a warranty) and that users may redistribute the program under\r\n    these conditions, and telling the user how to view a copy of this\r\n    License.  (Exception: if the Program itself is interactive but\r\n    does not normally print such an announcement, your work based on\r\n    the Program is not required to print an announcement.)\r\n\r\nThese requirements apply to the modified work as a whole.  If\r\nidentifiable sections of that work are not derived from the Program,\r\nand can be reasonably considered independent and separate works in\r\nthemselves, then this License, and its terms, do not apply to those\r\nsections when you distribute them as separate works.  But when you\r\ndistribute the same sections as part of a whole which is a work based\r\non the Program, the distribution of the whole must be on the terms of\r\nthis License, whose permissions for other licensees extend to the\r\nentire whole, and thus to each and every part regardless of who wrote it.\r\n\r\nThus, it is not the intent of this section to claim rights or contest\r\nyour rights to work written entirely by you; rather, the intent is to\r\nexercise the right to control the distribution of derivative or\r\ncollective works based on the Program.\r\n\r\nIn addition, mere aggregation of another work not based on the Program\r\nwith the Program (or with a work based on the Program) on a volume of\r\na storage or distribution medium does not bring the other work under\r\nthe scope of this License.\r\n\r\n  3. You may copy and distribute the Program (or a work based on it,\r\nunder Section 2) in object code or executable form under the terms of\r\nSections 1 and 2 above provided that you also do one of the following:\r\n\r\n    a) Accompany it with the complete corresponding machine-readable\r\n    source code, which must be distributed under the terms of Sections\r\n    1 and 2 above on a medium customarily used for software interchange; or,\r\n\r\n    b) Accompany it with a written offer, valid for at least three\r\n    years, to give any third party, for a charge no more than your\r\n    cost of physically performing source distribution, a complete\r\n    machine-readable copy of the corresponding source code, to be\r\n    distributed under the terms of Sections 1 and 2 above on a medium\r\n    customarily used for software interchange; or,\r\n\r\n    c) Accompany it with the information you received as to the offer\r\n    to distribute corresponding source code.  (This alternative is\r\n    allowed only for noncommercial distribution and only if you\r\n    received the program in object code or executable form with such\r\n    an offer, in accord with Subsection b above.)\r\n\r\nThe source code for a work means the preferred form of the work for\r\nmaking modifications to it.  For an executable work, complete source\r\ncode means all the source code for all modules it contains, plus any\r\nassociated interface definition files, plus the scripts used to\r\ncontrol compilation and installation of the executable.  However, as a\r\nspecial exception, the source code distributed need not include\r\nanything that is normally distributed (in either source or binary\r\nform) with the major components (compiler, kernel, and so on) of the\r\noperating system on which the executable runs, unless that component\r\nitself accompanies the executable.\r\n\r\nIf distribution of executable or object code is made by offering\r\naccess to copy from a designated place, then offering equivalent\r\naccess to copy the source code from the same place counts as\r\ndistribution of the source code, even though third parties are not\r\ncompelled to copy the source along with the object code.\r\n\r\n  4. You may not copy, modify, sublicense, or distribute the Program\r\nexcept as expressly provided under this License.  Any attempt\r\notherwise to copy, modify, sublicense or distribute the Program is\r\nvoid, and will automatically terminate your rights under this License.\r\nHowever, parties who have received copies, or rights, from you under\r\nthis License will not have their licenses terminated so long as such\r\nparties remain in full compliance.\r\n\r\n  5. You are not required to accept this License, since you have not\r\nsigned it.  However, nothing else grants you permission to modify or\r\ndistribute the Program or its derivative works.  These actions are\r\nprohibited by law if you do not accept this License.  Therefore, by\r\nmodifying or distributing the Program (or any work based on the\r\nProgram), you indicate your acceptance of this License to do so, and\r\nall its terms and conditions for copying, distributing or modifying\r\nthe Program or works based on it.\r\n\r\n  6. Each time you redistribute the Program (or any work based on the\r\nProgram), the recipient automatically receives a license from the\r\noriginal licensor to copy, distribute or modify the Program subject to\r\nthese terms and conditions.  You may not impose any further\r\nrestrictions on the recipients' exercise of the rights granted herein.\r\nYou are not responsible for enforcing compliance by third parties to\r\nthis License.\r\n\r\n  7. If, as a consequence of a court judgment or allegation of patent\r\ninfringement or for any other reason (not limited to patent issues),\r\nconditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License.  If you cannot\r\ndistribute so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you\r\nmay not distribute the Program at all.  For example, if a patent\r\nlicense would not permit royalty-free redistribution of the Program by\r\nall those who receive copies directly or indirectly through you, then\r\nthe only way you could satisfy both it and this License would be to\r\nrefrain entirely from distribution of the Program.\r\n\r\nIf any portion of this section is held invalid or unenforceable under\r\nany particular circumstance, the balance of the section is intended to\r\napply and the section as a whole is intended to apply in other\r\ncircumstances.\r\n\r\nIt is not the purpose of this section to induce you to infringe any\r\npatents or other property right claims or to contest validity of any\r\nsuch claims; this section has the sole purpose of protecting the\r\nintegrity of the free software distribution system, which is\r\nimplemented by public license practices.  Many people have made\r\ngenerous contributions to the wide range of software distributed\r\nthrough that system in reliance on consistent application of that\r\nsystem; it is up to the author/donor to decide if he or she is willing\r\nto distribute software through any other system and a licensee cannot\r\nimpose that choice.\r\n\r\nThis section is intended to make thoroughly clear what is believed to\r\nbe a consequence of the rest of this License.\r\n\r\n  8. If the distribution and/or use of the Program is restricted in\r\ncertain countries either by patents or by copyrighted interfaces, the\r\noriginal copyright holder who places the Program under this License\r\nmay add an explicit geographical distribution limitation excluding\r\nthose countries, so that distribution is permitted only in or among\r\ncountries not thus excluded.  In such case, this License incorporates\r\nthe limitation as if written in the body of this License.\r\n\r\n  9. The Free Software Foundation may publish revised and/or new versions\r\nof the General Public License from time to time.  Such new versions will\r\nbe similar in spirit to the present version, but may differ in detail to\r\naddress new problems or concerns.\r\n\r\nEach version is given a distinguishing version number.  If the Program\r\nspecifies a version number of this License which applies to it and \"any\r\nlater version\", you have the option of following the terms and conditions\r\neither of that version or of any later version published by the Free\r\nSoftware Foundation.  If the Program does not specify a version number of\r\nthis License, you may choose any version ever published by the Free Software\r\nFoundation.\r\n\r\n  10. If you wish to incorporate parts of the Program into other free\r\nprograms whose distribution conditions are different, write to the author\r\nto ask for permission.  For software which is copyrighted by the Free\r\nSoftware Foundation, write to the Free Software Foundation; we sometimes\r\nmake exceptions for this.  Our decision will be guided by the two goals\r\nof preserving the free status of all derivatives of our free software and\r\nof promoting the sharing and reuse of software generally.\r\n\r\n\t\t\t    NO WARRANTY\r\n\r\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\r\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\r\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\r\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r\nREPAIR OR CORRECTION.\r\n\r\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r\nPOSSIBILITY OF SUCH DAMAGES.\r\n\r\n\t\t     END OF TERMS AND CONDITIONS\r\n\r\n\t    How to Apply These Terms to Your New Programs\r\n\r\n  If you develop a new program, and you want it to be of the greatest\r\npossible use to the public, the best way to achieve this is to make it\r\nfree software which everyone can redistribute and change under these terms.\r\n\r\n  To do so, attach the following notices to the program.  It is safest\r\nto attach them to the start of each source file to most effectively\r\nconvey the exclusion of warranty; and each file should have at least\r\nthe \"copyright\" line and a pointer to where the full notice is found.\r\n\r\n    <one line to give the program's name and a brief idea of what it does.>\r\n    Copyright (C) <year>  <name of author>\r\n\r\n    This program is free software; you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation; either version 2 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program 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\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License along\r\n    with this program; if not, write to the Free Software Foundation, Inc.,\r\n    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\nIf the program is interactive, make it output a short notice like this\r\nwhen it starts in an interactive mode:\r\n\r\n    Gnomovision version 69, Copyright (C) year name of author\r\n    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r\n    This is free software, and you are welcome to redistribute it\r\n    under certain conditions; type `show c' for details.\r\n\r\nThe hypothetical commands `show w' and `show c' should show the appropriate\r\nparts of the General Public License.  Of course, the commands you use may\r\nbe called something other than `show w' and `show c'; they could even be\r\nmouse-clicks or menu items--whatever suits your program.\r\n\r\nYou should also get your employer (if you work as a programmer) or your\r\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\r\nnecessary.  Here is a sample; alter the names:\r\n\r\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\r\n  `Gnomovision' (which makes passes at compilers) written by James Hacker.\r\n\r\n  <signature of Ty Coon>, 1 April 1989\r\n  Ty Coon, President of Vice\r\n\r\nThis General Public License does not permit incorporating your program into\r\nproprietary programs.  If your program is a subroutine library, you may\r\nconsider it more useful to permit linking proprietary applications with the\r\nlibrary.  If this is what you want to do, use the GNU Lesser General\r\nPublic License instead of this License."
  },
  {
    "path": "OpenCVComponent/Assets/haarcascade_eye.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    Stump-based 20x20 frontal eye detector.\n    Created by Shameem Hameed (http://umich.edu/~shameem)\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's 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   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>20</height>\n  <width>20</width>\n  <stageParams>\n    <maxWeakCount>93</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>24</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>6</maxWeakCount>\n      <stageThreshold>-1.4562760591506958e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 1.2963959574699402e-01</internalNodes>\n          <leafValues>\n            -7.7304208278656006e-01 6.8350148200988770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 -4.6326808631420135e-02</internalNodes>\n          <leafValues>\n            5.7352751493453979e-01 -4.9097689986228943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 -1.6173090785741806e-02</internalNodes>\n          <leafValues>\n            6.0254341363906860e-01 -3.1610709428787231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3 -4.5828841626644135e-02</internalNodes>\n          <leafValues>\n            6.4177548885345459e-01 -1.5545040369033813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 -5.3759619593620300e-02</internalNodes>\n          <leafValues>\n            5.4219317436218262e-01 -2.0480829477310181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 3.4171190112829208e-02</internalNodes>\n          <leafValues>\n            -2.3388190567493439e-01 4.8410901427268982e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>12</maxWeakCount>\n      <stageThreshold>-1.2550230026245117e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 6 -2.1727620065212250e-01</internalNodes>\n          <leafValues>\n            7.1098899841308594e-01 -5.9360730648040771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 1.2071969918906689e-02</internalNodes>\n          <leafValues>\n            -2.8240481019020081e-01 5.9013551473617554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 -1.7854139208793640e-02</internalNodes>\n          <leafValues>\n            5.3137522935867310e-01 -2.2758960723876953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 2.2333610802888870e-02</internalNodes>\n          <leafValues>\n            -1.7556099593639374e-01 6.3356137275695801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 -9.1420017182826996e-02</internalNodes>\n          <leafValues>\n            6.1563092470169067e-01 -1.6899530589580536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 2.8973650187253952e-02</internalNodes>\n          <leafValues>\n            -1.2250079959630966e-01 7.4401170015335083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 7.8203463926911354e-03</internalNodes>\n          <leafValues>\n            1.6974370181560516e-01 -6.5441650152206421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 2.0340489223599434e-02</internalNodes>\n          <leafValues>\n            -1.2556649744510651e-01 8.2710450887680054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -1.1926149949431419e-02</internalNodes>\n          <leafValues>\n            3.8605681061744690e-01 -2.0992340147495270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 -9.7281101625412703e-04</internalNodes>\n          <leafValues>\n            -6.3761192560195923e-01 1.2952390313148499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 1.8322050891583785e-05</internalNodes>\n          <leafValues>\n            -3.4631478786468506e-01 2.2924269735813141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 -8.0854417756199837e-03</internalNodes>\n          <leafValues>\n            -6.3665801286697388e-01 1.3078659772872925e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-1.3728189468383789e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 18 -1.1812269687652588e-01</internalNodes>\n          <leafValues>\n            6.7844521999359131e-01 -5.0045782327651978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 -3.4332759678363800e-02</internalNodes>\n          <leafValues>\n            6.7186361551284790e-01 -3.5744878649711609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 -2.1530799567699432e-02</internalNodes>\n          <leafValues>\n            7.2220700979232788e-01 -1.8192419409751892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 -2.1909970790147781e-02</internalNodes>\n          <leafValues>\n            6.6529387235641479e-01 -2.7510228753089905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 -2.8713539242744446e-02</internalNodes>\n          <leafValues>\n            6.9955700635910034e-01 -1.9615580141544342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 -1.1467480100691319e-02</internalNodes>\n          <leafValues>\n            5.9267348051071167e-01 -2.2097350656986237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 -2.2611169144511223e-02</internalNodes>\n          <leafValues>\n            3.4483069181442261e-01 -3.8379558920860291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 -1.9308089977130294e-03</internalNodes>\n          <leafValues>\n            -7.9445719718933105e-01 1.5628659725189209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 5.6419910833938047e-05</internalNodes>\n          <leafValues>\n            -3.0896010994911194e-01 3.5431089997291565e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>16</maxWeakCount>\n      <stageThreshold>-1.2879480123519897e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 27 1.9886520504951477e-01</internalNodes>\n          <leafValues>\n            -5.2860701084136963e-01 3.5536721348762512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -3.6008939146995544e-02</internalNodes>\n          <leafValues>\n            4.2109689116477966e-01 -3.9348980784416199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 -7.7569849789142609e-02</internalNodes>\n          <leafValues>\n            4.7991541028022766e-01 -2.5122168660163879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 8.2630853285081685e-05</internalNodes>\n          <leafValues>\n            -3.8475489616394043e-01 3.1849220395088196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 3.2773229759186506e-04</internalNodes>\n          <leafValues>\n            -2.6427319645881653e-01 3.2547241449356079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 -1.8574850633740425e-02</internalNodes>\n          <leafValues>\n            4.6736589074134827e-01 -1.5067270398139954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -7.0008762122597545e-05</internalNodes>\n          <leafValues>\n            2.9313150048255920e-01 -2.5365099310874939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -1.8552130088210106e-02</internalNodes>\n          <leafValues>\n            4.6273660659790039e-01 -1.3148050010204315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 -1.3030420057475567e-02</internalNodes>\n          <leafValues>\n            4.1627219319343567e-01 -1.7751489579677582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 6.5694141085259616e-05</internalNodes>\n          <leafValues>\n            -2.8035101294517517e-01 2.6680740714073181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 1.7005260451696813e-04</internalNodes>\n          <leafValues>\n            -2.7027249336242676e-01 2.3981650173664093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 -3.3129199873656034e-03</internalNodes>\n          <leafValues>\n            4.4411438703536987e-01 -1.4428889751434326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 1.7583490116521716e-03</internalNodes>\n          <leafValues>\n            -1.6126190125942230e-01 4.2940768599510193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 -2.5194749236106873e-02</internalNodes>\n          <leafValues>\n            4.0687298774719238e-01 -1.8202580511569977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 1.4031709870323539e-03</internalNodes>\n          <leafValues>\n            8.4759786725044250e-02 -8.0018568038940430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 -7.3991729877889156e-03</internalNodes>\n          <leafValues>\n            5.5766099691390991e-01 -1.1843159794807434e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>23</maxWeakCount>\n      <stageThreshold>-1.2179850339889526e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 43 -2.9943080618977547e-02</internalNodes>\n          <leafValues>\n            3.5810810327529907e-01 -3.8487631082534790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 -1.2567380070686340e-01</internalNodes>\n          <leafValues>\n            3.9316931366920471e-01 -3.0012258887290955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 5.3635272197425365e-03</internalNodes>\n          <leafValues>\n            -4.3908619880676270e-01 1.9257010519504547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 -8.0971820279955864e-03</internalNodes>\n          <leafValues>\n            3.9906668663024902e-01 -2.3407870531082153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 -1.6597909852862358e-02</internalNodes>\n          <leafValues>\n            4.2095288634300232e-01 -2.2674840688705444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 -2.0199299324303865e-03</internalNodes>\n          <leafValues>\n            -7.4156731367111206e-01 1.2601189315319061e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 -1.5202340437099338e-03</internalNodes>\n          <leafValues>\n            -7.6154601573944092e-01 8.6373612284660339e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 -4.9663940444588661e-03</internalNodes>\n          <leafValues>\n            4.2182239890098572e-01 -1.7904919385910034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 -1.9207600504159927e-02</internalNodes>\n          <leafValues>\n            4.6894899010658264e-01 -1.4378750324249268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 -1.2222680263221264e-02</internalNodes>\n          <leafValues>\n            3.2842078804969788e-01 -2.1802149713039398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 5.7548668235540390e-02</internalNodes>\n          <leafValues>\n            -3.6768808960914612e-01 2.4357110261917114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 -9.5794079825282097e-03</internalNodes>\n          <leafValues>\n            -7.2245067358016968e-01 6.3664563000202179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 -2.9545740690082312e-03</internalNodes>\n          <leafValues>\n            3.5846439003944397e-01 -1.6696329414844513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 -4.2017991654574871e-03</internalNodes>\n          <leafValues>\n            3.9094808697700500e-01 -1.2041790038347244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 -1.3624990358948708e-02</internalNodes>\n          <leafValues>\n            -5.8767718076705933e-01 8.8404729962348938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 6.2853112467564642e-05</internalNodes>\n          <leafValues>\n            -2.6348459720611572e-01 2.1419279277324677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 -2.6782939676195383e-03</internalNodes>\n          <leafValues>\n            -7.8390169143676758e-01 8.0526962876319885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 -7.0597179234027863e-02</internalNodes>\n          <leafValues>\n            4.1469261050224304e-01 -1.3989959657192230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 9.2093646526336670e-02</internalNodes>\n          <leafValues>\n            -1.3055180013179779e-01 5.0435781478881836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 -8.8004386052489281e-03</internalNodes>\n          <leafValues>\n            3.6609750986099243e-01 -1.4036649465560913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 7.5080977694597095e-05</internalNodes>\n          <leafValues>\n            -2.9704439640045166e-01 2.0702940225601196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 -2.9870450962334871e-03</internalNodes>\n          <leafValues>\n            3.5615700483322144e-01 -1.5445969998836517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 -2.6441509835422039e-03</internalNodes>\n          <leafValues>\n            -5.4353517293930054e-01 1.0295110195875168e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>27</maxWeakCount>\n      <stageThreshold>-1.2905240058898926e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 66 -4.7862470149993896e-02</internalNodes>\n          <leafValues>\n            4.1528239846229553e-01 -3.4185820817947388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 8.7350532412528992e-02</internalNodes>\n          <leafValues>\n            -3.8749781250953674e-01 2.4204200506210327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -1.6849499195814133e-02</internalNodes>\n          <leafValues>\n            5.3082478046417236e-01 -1.7282910645008087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 -2.8870029374957085e-02</internalNodes>\n          <leafValues>\n            3.5843509435653687e-01 -2.2402590513229370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 2.5679389946162701e-03</internalNodes>\n          <leafValues>\n            1.4990499615669250e-01 -6.5609407424926758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 -2.4116659536957741e-02</internalNodes>\n          <leafValues>\n            5.5889678001403809e-01 -1.4810280501842499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 -3.2826658338308334e-02</internalNodes>\n          <leafValues>\n            4.6468681097030640e-01 -1.0785529762506485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 -1.5233060345053673e-02</internalNodes>\n          <leafValues>\n            -7.3954427242279053e-01 5.6236881762742996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 -3.0209511169232428e-04</internalNodes>\n          <leafValues>\n            -4.5548820495605469e-01 9.7069837152957916e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 7.5365108205005527e-04</internalNodes>\n          <leafValues>\n            9.5147296786308289e-02 -5.4895019531250000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 -1.0638950392603874e-02</internalNodes>\n          <leafValues>\n            4.0912970900535583e-01 -1.2308409810066223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 -7.5217830017209053e-03</internalNodes>\n          <leafValues>\n            4.0289148688316345e-01 -1.6048780083656311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 -1.0677099972963333e-01</internalNodes>\n          <leafValues>\n            6.1759322881698608e-01 -7.3091186583042145e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 1.6256919130682945e-02</internalNodes>\n          <leafValues>\n            -1.3103680312633514e-01 3.7453651428222656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 -2.0679360255599022e-02</internalNodes>\n          <leafValues>\n            -7.1402907371520996e-01 5.2390009164810181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 1.7052369192242622e-02</internalNodes>\n          <leafValues>\n            1.2822860479354858e-01 -3.1080681085586548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 -5.7122060097754002e-03</internalNodes>\n          <leafValues>\n            -6.0556507110595703e-01 8.1884756684303284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 2.0851430235779844e-05</internalNodes>\n          <leafValues>\n            -2.6812988519668579e-01 1.4453840255737305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 7.9284431412816048e-03</internalNodes>\n          <leafValues>\n            -7.8795351088047028e-02 5.6762582063674927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 -2.5217379443347454e-03</internalNodes>\n          <leafValues>\n            3.7068629264831543e-01 -1.3620570302009583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 -2.2426199167966843e-02</internalNodes>\n          <leafValues>\n            -6.8704998493194580e-01 5.1062859594821930e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 -7.6451441273093224e-03</internalNodes>\n          <leafValues>\n            2.3492220044136047e-01 -1.7905959486961365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 -1.1175329564139247e-03</internalNodes>\n          <leafValues>\n            -5.9869050979614258e-01 7.4324436485767365e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 1.9212789833545685e-02</internalNodes>\n          <leafValues>\n            -1.5702550113201141e-01 2.9737469553947449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 5.6293429806828499e-03</internalNodes>\n          <leafValues>\n            -9.9769018590450287e-02 4.2130270600318909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 -9.5671862363815308e-03</internalNodes>\n          <leafValues>\n            -6.0858798027038574e-01 7.3506258428096771e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 1.1217960156500340e-02</internalNodes>\n          <leafValues>\n            -1.0320810228586197e-01 4.1909849643707275e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>28</maxWeakCount>\n      <stageThreshold>-1.1600480079650879e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 93 -1.7486440017819405e-02</internalNodes>\n          <leafValues>\n            3.1307280063629150e-01 -3.3681181073188782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 3.0714649707078934e-02</internalNodes>\n          <leafValues>\n            -1.8766190111637115e-01 5.3780800104141235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 -2.2188719362020493e-02</internalNodes>\n          <leafValues>\n            3.6637881398200989e-01 -1.6124810278415680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 -5.0700771680567414e-05</internalNodes>\n          <leafValues>\n            2.1245710551738739e-01 -2.8444620966911316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -7.0170420221984386e-03</internalNodes>\n          <leafValues>\n            3.9543110132217407e-01 -1.3173590600490570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -6.8563609384000301e-03</internalNodes>\n          <leafValues>\n            3.0373859405517578e-01 -2.0657819509506226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 -1.4129259623587132e-02</internalNodes>\n          <leafValues>\n            -7.6503008604049683e-01 9.8213188350200653e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 -4.7915481030941010e-02</internalNodes>\n          <leafValues>\n            4.8307389020919800e-01 -1.3006809353828430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 4.7032979637151584e-05</internalNodes>\n          <leafValues>\n            -2.5216570496559143e-01 2.4386680126190186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 1.0221180273219943e-03</internalNodes>\n          <leafValues>\n            6.8857602775096893e-02 -6.5861141681671143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 -2.6056109927594662e-03</internalNodes>\n          <leafValues>\n            4.2942029237747192e-01 -1.3022460043430328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 5.4505340813193470e-05</internalNodes>\n          <leafValues>\n            -1.9288620352745056e-01 2.8958499431610107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 -6.6721157054416835e-05</internalNodes>\n          <leafValues>\n            3.0290710926055908e-01 -1.9854369759559631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 2.6281431317329407e-01</internalNodes>\n          <leafValues>\n            -2.3293940722942352e-01 2.3692460358142853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 -2.3569669574499130e-02</internalNodes>\n          <leafValues>\n            1.9401040673255920e-01 -2.8484618663787842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 -3.9120172150433064e-03</internalNodes>\n          <leafValues>\n            5.5378979444503784e-01 -9.5665678381919861e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 5.0788799853762612e-05</internalNodes>\n          <leafValues>\n            -2.3912659287452698e-01 2.1799489855766296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 -7.8732017427682877e-03</internalNodes>\n          <leafValues>\n            4.0697428584098816e-01 -1.2768040597438812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 -1.6778609715402126e-03</internalNodes>\n          <leafValues>\n            -5.7744657993316650e-01 9.7324788570404053e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 -2.6832430739887059e-04</internalNodes>\n          <leafValues>\n            2.9021880030632019e-01 -1.6831269860267639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 7.8687182394787669e-05</internalNodes>\n          <leafValues>\n            -1.9551570713520050e-01 2.7720969915390015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 1.2953500263392925e-02</internalNodes>\n          <leafValues>\n            -9.6838317811489105e-02 4.0323871374130249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -1.3043959625065327e-02</internalNodes>\n          <leafValues>\n            4.7198569774627686e-01 -8.9287549257278442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 3.0261781066656113e-03</internalNodes>\n          <leafValues>\n            -1.3623380661010742e-01 3.0686271190643311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 -6.0438038781285286e-03</internalNodes>\n          <leafValues>\n            -7.7954101562500000e-01 5.7316310703754425e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 -2.2507249377667904e-03</internalNodes>\n          <leafValues>\n            3.0877059698104858e-01 -1.5006309747695923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 1.5826810151338577e-02</internalNodes>\n          <leafValues>\n            6.4551889896392822e-02 -7.2455567121505737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 6.5864507632795721e-05</internalNodes>\n          <leafValues>\n            -1.7598840594291687e-01 2.3210389912128448e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>36</maxWeakCount>\n      <stageThreshold>-1.2257250547409058e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 121 -2.7854869142174721e-02</internalNodes>\n          <leafValues>\n            4.5518448948860168e-01 -1.8099910020828247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 1.2895040214061737e-01</internalNodes>\n          <leafValues>\n            -5.2565532922744751e-01 1.6188900172710419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 2.4403180927038193e-02</internalNodes>\n          <leafValues>\n            -1.4974960684776306e-01 4.2357379198074341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 -2.4458570405840874e-03</internalNodes>\n          <leafValues>\n            3.2948669791221619e-01 -1.7447690665721893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 -3.5336529836058617e-03</internalNodes>\n          <leafValues>\n            4.7426640987396240e-01 -7.3618359863758087e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 5.1358150813030079e-05</internalNodes>\n          <leafValues>\n            -3.0421930551528931e-01 1.5633270144462585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -1.6225680708885193e-02</internalNodes>\n          <leafValues>\n            2.3002180457115173e-01 -2.0359820127487183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 -4.6007009223103523e-03</internalNodes>\n          <leafValues>\n            4.0459269285202026e-01 -1.3485440611839294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 -2.1928999572992325e-02</internalNodes>\n          <leafValues>\n            -6.8724489212036133e-01 8.0684266984462738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 -2.8971210122108459e-03</internalNodes>\n          <leafValues>\n            -6.9619607925415039e-01 4.8545219004154205e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 -4.4074649922549725e-03</internalNodes>\n          <leafValues>\n            2.5166261196136475e-01 -1.6236649453639984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 2.8437169268727303e-02</internalNodes>\n          <leafValues>\n            6.0394261032342911e-02 -6.6744458675384521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 8.3212882280349731e-02</internalNodes>\n          <leafValues>\n            6.4357921481132507e-02 -5.3626042604446411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 -1.2419329956173897e-02</internalNodes>\n          <leafValues>\n            -7.0816862583160400e-01 5.7526610791683197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 -4.6992599964141846e-03</internalNodes>\n          <leafValues>\n            5.1254332065582275e-01 -8.7350800633430481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 -7.8025809489190578e-04</internalNodes>\n          <leafValues>\n            2.6687660813331604e-01 -1.7961509525775909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 -1.9724339246749878e-02</internalNodes>\n          <leafValues>\n            -6.7563730478286743e-01 7.2941906750202179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 1.0269250487908721e-03</internalNodes>\n          <leafValues>\n            5.3919319063425064e-02 -5.5540180206298828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -2.5957189500331879e-02</internalNodes>\n          <leafValues>\n            5.6362527608871460e-01 -7.1898393332958221e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 -1.2552699772641063e-03</internalNodes>\n          <leafValues>\n            -5.0346630811691284e-01 8.9691452682018280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 -4.9970578402280807e-02</internalNodes>\n          <leafValues>\n            1.7685119807720184e-01 -2.2301959991455078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 -2.9899610672146082e-03</internalNodes>\n          <leafValues>\n            3.9122420549392700e-01 -1.0149750113487244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 4.8546842299401760e-03</internalNodes>\n          <leafValues>\n            -1.1770179867744446e-01 4.2190939188003540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 1.0448860120959580e-04</internalNodes>\n          <leafValues>\n            -1.7333979904651642e-01 2.2344440221786499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 5.9689260524464771e-05</internalNodes>\n          <leafValues>\n            -2.3409630358219147e-01 1.6558240354061127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -1.3423919677734375e-02</internalNodes>\n          <leafValues>\n            4.3023818731307983e-01 -9.9723652005195618e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 2.2581999655812979e-03</internalNodes>\n          <leafValues>\n            7.2720989584922791e-02 -5.7501018047332764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 -1.2546280398964882e-02</internalNodes>\n          <leafValues>\n            3.6184579133987427e-01 -1.1457010358572006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 -2.8705769218504429e-03</internalNodes>\n          <leafValues>\n            2.8210538625717163e-01 -1.2367550283670425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 1.9785640761256218e-02</internalNodes>\n          <leafValues>\n            4.7876749187707901e-02 -8.0666238069534302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 4.7588930465281010e-03</internalNodes>\n          <leafValues>\n            -1.0925389826297760e-01 3.3746978640556335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 -6.9974269717931747e-03</internalNodes>\n          <leafValues>\n            -8.0295938253402710e-01 4.5706700533628464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 -1.3033480383455753e-02</internalNodes>\n          <leafValues>\n            1.8680439889431000e-01 -1.7688910663127899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 -1.3742579612880945e-03</internalNodes>\n          <leafValues>\n            2.7725479006767273e-01 -1.2809009850025177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 2.7657810132950544e-03</internalNodes>\n          <leafValues>\n            9.0758942067623138e-02 -4.2594739794731140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 2.8941841446794569e-04</internalNodes>\n          <leafValues>\n            -3.8816329836845398e-01 8.9267797768115997e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>47</maxWeakCount>\n      <stageThreshold>-1.2863140106201172e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 157 -1.4469229616224766e-02</internalNodes>\n          <leafValues>\n            3.7507829070091248e-01 -2.4928289651870728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 -1.3317629694938660e-01</internalNodes>\n          <leafValues>\n            3.0166378617286682e-01 -2.2414070367813110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 -1.0132160037755966e-02</internalNodes>\n          <leafValues>\n            3.6985591053962708e-01 -1.7850010097026825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 -7.8511182218790054e-03</internalNodes>\n          <leafValues>\n            4.6086761355400085e-01 -1.2931390106678009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 -1.4295839704573154e-02</internalNodes>\n          <leafValues>\n            4.4841429591178894e-01 -1.0226240009069443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -5.9606940485537052e-03</internalNodes>\n          <leafValues>\n            2.7927988767623901e-01 -1.5323829650878906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 1.0932769626379013e-02</internalNodes>\n          <leafValues>\n            -1.5141740441322327e-01 3.9889648556709290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 5.0430990086169913e-05</internalNodes>\n          <leafValues>\n            -2.2681570053100586e-01 2.1644389629364014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 -5.8431681245565414e-03</internalNodes>\n          <leafValues>\n            4.5420148968696594e-01 -1.2587159872055054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 -2.2346209734678268e-02</internalNodes>\n          <leafValues>\n            -6.2690192461013794e-01 8.2403123378753662e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 -4.8836669884622097e-03</internalNodes>\n          <leafValues>\n            2.6359251141548157e-01 -1.4686630666255951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 7.5506002758629620e-05</internalNodes>\n          <leafValues>\n            -2.4507020413875580e-01 1.6678880155086517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 -4.9026997294276953e-04</internalNodes>\n          <leafValues>\n            -4.2649960517883301e-01 8.9973561465740204e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 1.4861579984426498e-03</internalNodes>\n          <leafValues>\n            -1.2040250003337860e-01 3.0097651481628418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 -1.1988339945673943e-02</internalNodes>\n          <leafValues>\n            2.7852478623390198e-01 -1.2244340032339096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 1.0502239689230919e-02</internalNodes>\n          <leafValues>\n            4.0452759712934494e-02 -7.4050408601760864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 -3.0963009223341942e-02</internalNodes>\n          <leafValues>\n            -6.2842690944671631e-01 4.8013761639595032e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 1.1414520442485809e-02</internalNodes>\n          <leafValues>\n            3.9405211806297302e-02 -7.1674120426177979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 -1.2337000109255314e-02</internalNodes>\n          <leafValues>\n            1.9941329956054688e-01 -1.9274300336837769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 -5.9942267835140228e-03</internalNodes>\n          <leafValues>\n            5.1318162679672241e-01 -6.1658058315515518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 -1.1923230485990644e-03</internalNodes>\n          <leafValues>\n            -7.2605299949645996e-01 5.0652720034122467e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 -7.4582789093255997e-03</internalNodes>\n          <leafValues>\n            2.9603078961372375e-01 -1.1754789948463440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 2.7877509128302336e-03</internalNodes>\n          <leafValues>\n            4.5068711042404175e-02 -6.9535410404205322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 -2.2503209766000509e-04</internalNodes>\n          <leafValues>\n            2.0047250390052795e-01 -1.5775249898433685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 -5.0367889925837517e-03</internalNodes>\n          <leafValues>\n            2.9299819469451904e-01 -1.1700499802827835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 7.4742160737514496e-02</internalNodes>\n          <leafValues>\n            -1.1392319947481155e-01 3.0256620049476624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 2.0255519077181816e-02</internalNodes>\n          <leafValues>\n            -1.0515890270471573e-01 4.0670460462570190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 4.4214509427547455e-02</internalNodes>\n          <leafValues>\n            -2.7631640434265137e-01 1.2363869696855545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 -8.7259558495134115e-04</internalNodes>\n          <leafValues>\n            2.4355030059814453e-01 -1.3300949335098267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 -2.4453739169985056e-03</internalNodes>\n          <leafValues>\n            -5.3866171836853027e-01 6.2510646879673004e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 8.2725353422574699e-05</internalNodes>\n          <leafValues>\n            -2.0772209763526917e-01 1.6270439326763153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -3.6627110093832016e-02</internalNodes>\n          <leafValues>\n            3.6568409204483032e-01 -9.0330280363559723e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 3.0996399000287056e-03</internalNodes>\n          <leafValues>\n            -1.3183020055294037e-01 2.5354298949241638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 -2.4709280114620924e-03</internalNodes>\n          <leafValues>\n            -5.6853497028350830e-01 5.3505431860685349e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 -1.4114670455455780e-02</internalNodes>\n          <leafValues>\n            -4.8599010705947876e-01 5.8485250920057297e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 8.4537261864170432e-04</internalNodes>\n          <leafValues>\n            -8.0093637108802795e-02 4.0265649557113647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 -7.1098632179200649e-03</internalNodes>\n          <leafValues>\n            4.4703239202499390e-01 -6.2947437167167664e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 -1.9125960767269135e-02</internalNodes>\n          <leafValues>\n            -6.6422867774963379e-01 4.9822770059108734e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 -5.0773010589182377e-03</internalNodes>\n          <leafValues>\n            1.7379400134086609e-01 -1.6850599646568298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 -2.9198289848864079e-03</internalNodes>\n          <leafValues>\n            -6.0110282897949219e-01 5.7427939027547836e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 -2.4902150034904480e-02</internalNodes>\n          <leafValues>\n            2.3397980630397797e-01 -1.1818459630012512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 2.0147779956459999e-02</internalNodes>\n          <leafValues>\n            -8.9459821581840515e-02 3.6024400591850281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 1.7597640398889780e-03</internalNodes>\n          <leafValues>\n            4.9458440393209457e-02 -6.3102620840072632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 1.3812039978802204e-03</internalNodes>\n          <leafValues>\n            -1.5218059718608856e-01 1.8971739709377289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 -1.0904540307819843e-02</internalNodes>\n          <leafValues>\n            -5.8097380399703979e-01 4.4862728565931320e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 7.5157178798690438e-05</internalNodes>\n          <leafValues>\n            -1.3777349889278412e-01 1.9543160498142242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 3.8649770431220531e-03</internalNodes>\n          <leafValues>\n            -1.0302229970693588e-01 2.5374969840049744e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>48</maxWeakCount>\n      <stageThreshold>-1.1189440488815308e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 204 -1.0215889662504196e-01</internalNodes>\n          <leafValues>\n            4.1681259870529175e-01 -1.6655629873275757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 -5.1939819008111954e-02</internalNodes>\n          <leafValues>\n            3.3023950457572937e-01 -2.0715710520744324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 -4.2717780917882919e-02</internalNodes>\n          <leafValues>\n            2.6093730330467224e-01 -1.6013890504837036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 4.3890418601222336e-04</internalNodes>\n          <leafValues>\n            -3.4750530123710632e-01 1.3918919861316681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 2.4264389649033546e-02</internalNodes>\n          <leafValues>\n            -4.2552059888839722e-01 1.3578380644321442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 -2.3820599541068077e-02</internalNodes>\n          <leafValues>\n            3.1749808788299561e-01 -1.6652040183544159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -7.0518180727958679e-03</internalNodes>\n          <leafValues>\n            3.0947178602218628e-01 -1.3338300585746765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 -6.8517157342284918e-04</internalNodes>\n          <leafValues>\n            -6.0082262754440308e-01 8.7747000157833099e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 5.3705149330198765e-03</internalNodes>\n          <leafValues>\n            -1.2311449646949768e-01 3.8333550095558167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 -1.3403539545834064e-02</internalNodes>\n          <leafValues>\n            3.3877369761466980e-01 -1.0140489786863327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 -6.6856360062956810e-03</internalNodes>\n          <leafValues>\n            -6.1193597316741943e-01 4.7740221023559570e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 -4.2887418530881405e-03</internalNodes>\n          <leafValues>\n            2.5275790691375732e-01 -1.4434510469436646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 -1.0876749642193317e-02</internalNodes>\n          <leafValues>\n            5.4775732755661011e-01 -5.9455480426549911e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 3.7882640026509762e-04</internalNodes>\n          <leafValues>\n            8.3410300314426422e-02 -4.4226369261741638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 -2.4550149682909250e-03</internalNodes>\n          <leafValues>\n            2.3330999910831451e-01 -1.3964480161666870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 1.2721839593723416e-03</internalNodes>\n          <leafValues>\n            6.0480289161205292e-02 -4.9456089735031128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 -4.8933159559965134e-03</internalNodes>\n          <leafValues>\n            -6.6833269596099854e-01 4.6218499541282654e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 2.6449989527463913e-02</internalNodes>\n          <leafValues>\n            -7.3235362768173218e-02 4.4425961375236511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 -3.3706070389598608e-03</internalNodes>\n          <leafValues>\n            -4.2464339733123779e-01 6.8676561117172241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 -2.9559480026364326e-03</internalNodes>\n          <leafValues>\n            1.6218039393424988e-01 -1.8222999572753906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 3.0619909986853600e-02</internalNodes>\n          <leafValues>\n            -5.8643341064453125e-02 5.3263628482818604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 -9.5765907317399979e-03</internalNodes>\n          <leafValues>\n            -6.0562682151794434e-01 5.3345989435911179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 6.6372493165545166e-05</internalNodes>\n          <leafValues>\n            -1.6680839657783508e-01 1.9284160435199738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 5.0975950434803963e-03</internalNodes>\n          <leafValues>\n            4.4119510799646378e-02 -5.7458841800689697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 3.7112718564458191e-04</internalNodes>\n          <leafValues>\n            -1.1086399853229523e-01 2.3105390369892120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 -8.6607588455080986e-03</internalNodes>\n          <leafValues>\n            4.0456289052963257e-01 -6.2446091324090958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 8.7489158613607287e-04</internalNodes>\n          <leafValues>\n            6.4875148236751556e-02 -4.4871041178703308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 1.1120870476588607e-03</internalNodes>\n          <leafValues>\n            -9.3861460685729980e-02 3.0453911423683167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 -2.3837819695472717e-02</internalNodes>\n          <leafValues>\n            -5.8887428045272827e-01 4.6659421175718307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 2.2272899514064193e-04</internalNodes>\n          <leafValues>\n            -1.4898599684238434e-01 1.7701950669288635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 2.4467470124363899e-02</internalNodes>\n          <leafValues>\n            -5.5789601057767868e-02 4.9208301305770874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 -1.4239320158958435e-01</internalNodes>\n          <leafValues>\n            1.5192000567913055e-01 -1.8778899312019348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -2.0123120397329330e-02</internalNodes>\n          <leafValues>\n            2.1780100464820862e-01 -1.2081900238990784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 1.1513679783092812e-04</internalNodes>\n          <leafValues>\n            -1.6856589913368225e-01 1.6451929509639740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 -2.7556740678846836e-03</internalNodes>\n          <leafValues>\n            -6.9442039728164673e-01 3.9449468255043030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 -7.5843912782147527e-05</internalNodes>\n          <leafValues>\n            1.8941369652748108e-01 -1.5183840692043304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 -7.0697711780667305e-03</internalNodes>\n          <leafValues>\n            4.7064599394798279e-01 -5.7927619665861130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -3.7393178790807724e-02</internalNodes>\n          <leafValues>\n            -7.5892448425292969e-01 3.4116048365831375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 -1.5995610505342484e-02</internalNodes>\n          <leafValues>\n            3.0670469999313354e-01 -8.7525576353073120e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 -3.1183990649878979e-03</internalNodes>\n          <leafValues>\n            2.6195371150970459e-01 -9.1214887797832489e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 1.0651360498741269e-03</internalNodes>\n          <leafValues>\n            -1.7427560687065125e-01 1.5277640521526337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 -1.6029420075938106e-03</internalNodes>\n          <leafValues>\n            3.5612630844116211e-01 -7.6629996299743652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 4.3619908392429352e-03</internalNodes>\n          <leafValues>\n            4.9356970936059952e-02 -5.9228771924972534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 -1.0779909789562225e-02</internalNodes>\n          <leafValues>\n            -6.3922178745269775e-01 3.3204540610313416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 -4.3590869754552841e-03</internalNodes>\n          <leafValues>\n            1.6107389330863953e-01 -1.5221320092678070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 7.4596069753170013e-03</internalNodes>\n          <leafValues>\n            3.3172961324453354e-02 -7.5007742643356323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 8.1385448575019836e-03</internalNodes>\n          <leafValues>\n            2.6325279846787453e-02 -7.1731162071228027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 -3.3338490873575211e-02</internalNodes>\n          <leafValues>\n            3.3536610007286072e-01 -7.0803590118885040e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>55</maxWeakCount>\n      <stageThreshold>-1.1418989896774292e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 252 1.9553979858756065e-02</internalNodes>\n          <leafValues>\n            -1.0439720004796982e-01 5.3128951787948608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 2.2122919559478760e-02</internalNodes>\n          <leafValues>\n            -2.4747270345687866e-01 2.0847250521183014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 -4.1829389519989491e-03</internalNodes>\n          <leafValues>\n            3.8289439678192139e-01 -1.4711579680442810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 -8.6381728760898113e-04</internalNodes>\n          <leafValues>\n            -6.2632888555526733e-01 1.1993259936571121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 7.9958612332120538e-04</internalNodes>\n          <leafValues>\n            9.2573471367359161e-02 -5.5168831348419189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 9.1527570039033890e-03</internalNodes>\n          <leafValues>\n            -7.2929807007312775e-02 5.5512511730194092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 -3.9388681761920452e-03</internalNodes>\n          <leafValues>\n            2.0196039974689484e-01 -2.0912039279937744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 1.4613410166930407e-04</internalNodes>\n          <leafValues>\n            -2.7861818671226501e-01 1.3817410171031952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 -3.1691689509898424e-03</internalNodes>\n          <leafValues>\n            3.6685898900032043e-01 -7.6308242976665497e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 -2.2189389914274216e-02</internalNodes>\n          <leafValues>\n            3.9096599817276001e-01 -1.0971540212631226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 -7.4523608200252056e-03</internalNodes>\n          <leafValues>\n            1.2838590145111084e-01 -2.4159869551658630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 7.7997002517804503e-04</internalNodes>\n          <leafValues>\n            7.1978069841861725e-02 -4.3976500630378723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 -4.6783639118075371e-03</internalNodes>\n          <leafValues>\n            2.1569849550724030e-01 -1.4205920696258545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 -1.5188639983534813e-02</internalNodes>\n          <leafValues>\n            3.6458781361579895e-01 -8.2675926387310028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 5.0619798712432384e-03</internalNodes>\n          <leafValues>\n            -3.4380409121513367e-01 9.2068232595920563e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 -1.7351920250803232e-03</internalNodes>\n          <leafValues>\n            -6.1725497245788574e-01 4.9214478582143784e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 -1.2423450127243996e-02</internalNodes>\n          <leafValues>\n            -5.8558952808380127e-01 4.6112600713968277e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 -1.3031429611146450e-02</internalNodes>\n          <leafValues>\n            -5.9710788726806641e-01 4.0672458708286285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 -1.2369629694148898e-03</internalNodes>\n          <leafValues>\n            -6.8334168195724487e-01 3.3156178891658783e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 6.1022108420729637e-03</internalNodes>\n          <leafValues>\n            -9.4729237258434296e-02 3.0102241039276123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 6.6952849738299847e-04</internalNodes>\n          <leafValues>\n            8.1816866993904114e-02 -3.5196030139923096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 -1.7970580374822021e-03</internalNodes>\n          <leafValues>\n            2.3718979954719543e-01 -1.1768709868192673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 -7.1074528386816382e-04</internalNodes>\n          <leafValues>\n            -4.4763788580894470e-01 5.7682480663061142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 -5.9126471169292927e-03</internalNodes>\n          <leafValues>\n            4.3425410985946655e-01 -6.6868573427200317e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 -3.3132149837911129e-03</internalNodes>\n          <leafValues>\n            1.8150010704994202e-01 -1.4180320501327515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 -6.0814660042524338e-02</internalNodes>\n          <leafValues>\n            4.7221711277961731e-01 -6.1410639435052872e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 -9.6714183688163757e-02</internalNodes>\n          <leafValues>\n            2.7683168649673462e-01 -9.4490036368370056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 3.9073550142347813e-03</internalNodes>\n          <leafValues>\n            -1.2278530001640320e-01 2.1057400107383728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 -9.0431869029998779e-03</internalNodes>\n          <leafValues>\n            3.5641568899154663e-01 -7.7806226909160614e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 -4.8800031654536724e-03</internalNodes>\n          <leafValues>\n            -4.1034790873527527e-01 6.9694377481937408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 -4.3547428213059902e-03</internalNodes>\n          <leafValues>\n            -7.3017889261245728e-01 3.6655150353908539e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 -9.6500627696514130e-03</internalNodes>\n          <leafValues>\n            5.5181127786636353e-01 -5.3168080747127533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 -1.7397310584783554e-02</internalNodes>\n          <leafValues>\n            -5.7084232568740845e-01 5.0214089453220367e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 -6.8304329179227352e-03</internalNodes>\n          <leafValues>\n            -4.6180281043052673e-01 5.0202690064907074e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 3.3255619928240776e-04</internalNodes>\n          <leafValues>\n            -9.5362730324268341e-02 2.5983759760856628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -2.3100529797375202e-03</internalNodes>\n          <leafValues>\n            2.2872470319271088e-01 -1.0533530265092850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 -7.5426651164889336e-03</internalNodes>\n          <leafValues>\n            -5.6990510225296021e-01 4.8863459378480911e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -5.2723060362040997e-03</internalNodes>\n          <leafValues>\n            3.5145181417465210e-01 -8.2390107214450836e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 -4.8578968271613121e-03</internalNodes>\n          <leafValues>\n            -6.0417622327804565e-01 4.4539440423250198e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 1.5867310576140881e-03</internalNodes>\n          <leafValues>\n            -1.0340909659862518e-01 2.3282019793987274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 -4.7427811659872532e-03</internalNodes>\n          <leafValues>\n            2.8490281105041504e-01 -9.8090499639511108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 -1.3515240279957652e-03</internalNodes>\n          <leafValues>\n            2.3096430301666260e-01 -1.1361840367317200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 2.2526069078594446e-03</internalNodes>\n          <leafValues>\n            6.4478322863578796e-02 -4.2205891013145447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 -3.8038659840822220e-04</internalNodes>\n          <leafValues>\n            -3.8076201081275940e-01 6.0043290257453918e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 4.9043921753764153e-03</internalNodes>\n          <leafValues>\n            -7.6104998588562012e-02 3.3232170343399048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 -9.0969670563936234e-03</internalNodes>\n          <leafValues>\n            1.4287790656089783e-01 -1.6887800395488739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 -6.9317929446697235e-03</internalNodes>\n          <leafValues>\n            2.7255409955978394e-01 -9.2879563570022583e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 1.1471060570329428e-03</internalNodes>\n          <leafValues>\n            -1.5273059904575348e-01 1.9702400267124176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -3.7662889808416367e-02</internalNodes>\n          <leafValues>\n            -5.9320437908172607e-01 4.0738601237535477e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 -6.8165571428835392e-03</internalNodes>\n          <leafValues>\n            2.5494089722633362e-01 -9.4081960618495941e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 6.6205562325194478e-04</internalNodes>\n          <leafValues>\n            4.6795718371868134e-02 -4.8454371094703674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 -4.2202551849186420e-03</internalNodes>\n          <leafValues>\n            2.4682149291038513e-01 -9.4673976302146912e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 -6.8986512720584869e-02</internalNodes>\n          <leafValues>\n            -6.6514801979064941e-01 3.5926390439271927e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 6.1707608401775360e-03</internalNodes>\n          <leafValues>\n            2.5833319872617722e-02 -7.2686272859573364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 1.0536249727010727e-02</internalNodes>\n          <leafValues>\n            -8.1828996539115906e-02 2.9760798811912537e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>32</maxWeakCount>\n      <stageThreshold>-1.1255199909210205e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 307 -6.2758728861808777e-02</internalNodes>\n          <leafValues>\n            2.7899080514907837e-01 -2.9656109213829041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 3.4516479354351759e-03</internalNodes>\n          <leafValues>\n            -3.4635880589485168e-01 2.0903840661048889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 -7.8699486330151558e-03</internalNodes>\n          <leafValues>\n            2.4144889414310455e-01 -1.9205570220947266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 -3.4624869003891945e-03</internalNodes>\n          <leafValues>\n            -5.9151780605316162e-01 1.2486449629068375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 -9.4818761572241783e-03</internalNodes>\n          <leafValues>\n            1.8391540646553040e-01 -2.4858260154724121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 2.3226840130519122e-04</internalNodes>\n          <leafValues>\n            -3.3047258853912354e-01 1.0999260097742081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 1.8101120367646217e-03</internalNodes>\n          <leafValues>\n            9.8744012415409088e-02 -4.9634781479835510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -5.4422430694103241e-03</internalNodes>\n          <leafValues>\n            2.9344418644905090e-01 -1.3094750046730042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 7.4148122221231461e-03</internalNodes>\n          <leafValues>\n            -1.4762699604034424e-01 3.3277168869972229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 -1.5565140172839165e-02</internalNodes>\n          <leafValues>\n            -6.8404901027679443e-01 9.9872693419456482e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 2.8720520436763763e-02</internalNodes>\n          <leafValues>\n            -1.4833280444145203e-01 3.0902579426765442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 9.6687392215244472e-05</internalNodes>\n          <leafValues>\n            -1.7431040108203888e-01 2.1402959525585175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 5.2371058613061905e-02</internalNodes>\n          <leafValues>\n            -7.0156857371330261e-02 4.9222990870475769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 -8.6485691368579865e-02</internalNodes>\n          <leafValues>\n            5.0757247209548950e-01 -7.5294211506843567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 -4.2169868946075439e-02</internalNodes>\n          <leafValues>\n            4.5680961012840271e-01 -9.0219900012016296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 4.5369830331765115e-05</internalNodes>\n          <leafValues>\n            -2.6538279652595520e-01 1.6189539432525635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 5.2918000146746635e-03</internalNodes>\n          <leafValues>\n            7.4890151619911194e-02 -5.4054671525955200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 -7.5511651812121272e-04</internalNodes>\n          <leafValues>\n            -4.9261990189552307e-01 5.8723948895931244e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 7.5108138844370842e-05</internalNodes>\n          <leafValues>\n            -2.1432100236415863e-01 1.4077760279178619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 4.9981209449470043e-03</internalNodes>\n          <leafValues>\n            -9.0547338128089905e-02 3.5716068744659424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 -1.4929979806765914e-03</internalNodes>\n          <leafValues>\n            2.5623458623886108e-01 -1.4229069650173187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 2.7239411137998104e-03</internalNodes>\n          <leafValues>\n            -1.5649250149726868e-01 2.1088710427284241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 2.2218320518732071e-03</internalNodes>\n          <leafValues>\n            -1.5072989463806152e-01 2.6801869273185730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 -7.3993072146549821e-04</internalNodes>\n          <leafValues>\n            2.9546990990638733e-01 -1.0692390054464340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 2.0113459322601557e-03</internalNodes>\n          <leafValues>\n            5.0614349544048309e-02 -7.1683371067047119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 1.1452870443463326e-02</internalNodes>\n          <leafValues>\n            -1.2719069421291351e-01 2.4152779579162598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 -1.0782170575112104e-03</internalNodes>\n          <leafValues>\n            2.4813009798526764e-01 -1.3461199402809143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 3.3417691010981798e-03</internalNodes>\n          <leafValues>\n            5.3578309714794159e-02 -5.2274167537689209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 6.9398651248775423e-05</internalNodes>\n          <leafValues>\n            -2.1698740124702454e-01 1.2812179327011108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 -4.0982551872730255e-03</internalNodes>\n          <leafValues>\n            2.4401889741420746e-01 -1.1570589989423752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 -1.6289720078930259e-03</internalNodes>\n          <leafValues>\n            2.8261470794677734e-01 -1.0659469664096832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 1.3984859921038151e-02</internalNodes>\n          <leafValues>\n            4.2715899646282196e-02 -7.3646312952041626e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>30</maxWeakCount>\n      <stageThreshold>-1.1729990243911743e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 339 1.6416519880294800e-01</internalNodes>\n          <leafValues>\n            -4.8960301280021667e-01 1.7607709765434265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 8.3413062384352088e-04</internalNodes>\n          <leafValues>\n            -2.8220430016517639e-01 2.4199579656124115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 -1.7193210078403354e-03</internalNodes>\n          <leafValues>\n            -7.1485888957977295e-01 8.6162216961383820e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 -1.5654950402677059e-03</internalNodes>\n          <leafValues>\n            -7.2972381114959717e-01 9.4070672988891602e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 1.9124479731544852e-03</internalNodes>\n          <leafValues>\n            -3.1187158823013306e-01 1.8143390119075775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 -1.3512369990348816e-01</internalNodes>\n          <leafValues>\n            2.9577299952507019e-01 -2.2179250419139862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 -4.0300549007952213e-03</internalNodes>\n          <leafValues>\n            -6.6595137119293213e-01 8.5431016981601715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 -2.8640460222959518e-03</internalNodes>\n          <leafValues>\n            -6.2086361646652222e-01 5.3106021136045456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 -1.4065420255064964e-03</internalNodes>\n          <leafValues>\n            2.2346289455890656e-01 -2.0211009681224823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 -3.5820449702441692e-03</internalNodes>\n          <leafValues>\n            -5.4030400514602661e-01 6.8213619291782379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 4.1544470936059952e-02</internalNodes>\n          <leafValues>\n            -6.5215840935707092e-02 6.2109231948852539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 -9.1709550470113754e-03</internalNodes>\n          <leafValues>\n            -7.5553297996520996e-01 5.2640449255704880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 6.1552738770842552e-03</internalNodes>\n          <leafValues>\n            9.0939402580261230e-02 -4.4246131181716919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 -1.0043520014733076e-03</internalNodes>\n          <leafValues>\n            2.4292330443859100e-01 -1.8669790029525757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 1.1519829742610455e-02</internalNodes>\n          <leafValues>\n            -1.1763150244951248e-01 3.6723458766937256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 -8.9040733873844147e-03</internalNodes>\n          <leafValues>\n            -4.8931330442428589e-01 1.0897020250558853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 5.3973670583218336e-04</internalNodes>\n          <leafValues>\n            -2.1850399672985077e-01 1.8489989638328552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 1.3727260520681739e-03</internalNodes>\n          <leafValues>\n            -1.5072910487651825e-01 2.9173129796981812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 -1.0807390324771404e-02</internalNodes>\n          <leafValues>\n            4.2897450923919678e-01 -1.0280139744281769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 1.2670770520344377e-03</internalNodes>\n          <leafValues>\n            7.4192158877849579e-02 -6.4208251237869263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 2.2991129662841558e-03</internalNodes>\n          <leafValues>\n            4.7100279480218887e-02 -7.2335231304168701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 2.7187510859221220e-03</internalNodes>\n          <leafValues>\n            -1.7086869478225708e-01 2.3513509333133698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 -6.6619180142879486e-03</internalNodes>\n          <leafValues>\n            -7.8975427150726318e-01 4.5084670186042786e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 -4.8266649246215820e-02</internalNodes>\n          <leafValues>\n            -6.9579917192459106e-01 4.1976079344749451e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 1.5214690007269382e-02</internalNodes>\n          <leafValues>\n            -1.0818280279636383e-01 3.6460620164871216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 -6.0080131515860558e-03</internalNodes>\n          <leafValues>\n            3.0970990657806396e-01 -1.1359210312366486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 6.6127157770097256e-03</internalNodes>\n          <leafValues>\n            8.0665342509746552e-02 -4.6658530831336975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 -7.9607013612985611e-03</internalNodes>\n          <leafValues>\n            -8.7201941013336182e-01 3.6774590611457825e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 3.8847199175506830e-03</internalNodes>\n          <leafValues>\n            -1.1666289716959000e-01 3.3070269227027893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -1.0988810099661350e-03</internalNodes>\n          <leafValues>\n            2.3872570693492889e-01 -1.7656759917736053e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>-1.0368299484252930e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 369 3.5903379321098328e-03</internalNodes>\n          <leafValues>\n            -2.3688079416751862e-01 2.4631640315055847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 6.4815930090844631e-03</internalNodes>\n          <leafValues>\n            -3.1373620033264160e-01 1.8675759434700012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 7.3048402555286884e-05</internalNodes>\n          <leafValues>\n            -2.7644351124763489e-01 1.6496239602565765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 -3.8514640182256699e-03</internalNodes>\n          <leafValues>\n            -5.6014508008956909e-01 1.1294739693403244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 3.8588210009038448e-03</internalNodes>\n          <leafValues>\n            3.9848998188972473e-02 -5.8071857690811157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 -2.4651220068335533e-02</internalNodes>\n          <leafValues>\n            1.6755010187625885e-01 -2.5343671441078186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 4.7245521098375320e-02</internalNodes>\n          <leafValues>\n            -1.0662080347537994e-01 3.9451980590820312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 6.5964651294052601e-03</internalNodes>\n          <leafValues>\n            -1.7744250595569611e-01 2.7280190587043762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -1.3177490327507257e-03</internalNodes>\n          <leafValues>\n            -5.4272651672363281e-01 4.8606589436531067e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 -5.0261709839105606e-03</internalNodes>\n          <leafValues>\n            2.4394249916076660e-01 -1.3143649697303772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 3.4632768947631121e-03</internalNodes>\n          <leafValues>\n            6.9049343466758728e-02 -7.0336240530014038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 2.1692588925361633e-03</internalNodes>\n          <leafValues>\n            -1.3289460539817810e-01 2.2098529338836670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 2.9395870864391327e-02</internalNodes>\n          <leafValues>\n            -2.8530520200729370e-01 1.3543990254402161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 -9.6181448316201568e-04</internalNodes>\n          <leafValues>\n            -5.8041381835937500e-01 3.7450648844242096e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 -1.0820999741554260e-01</internalNodes>\n          <leafValues>\n            3.9467281103134155e-01 -7.8655943274497986e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 -1.8024869263172150e-02</internalNodes>\n          <leafValues>\n            2.7355629205703735e-01 -1.3415299355983734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 6.2509840354323387e-03</internalNodes>\n          <leafValues>\n            2.3388059809803963e-02 -8.0088591575622559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 -1.6088379779830575e-03</internalNodes>\n          <leafValues>\n            -5.6762522459030151e-01 4.1215669363737106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 7.7564752427861094e-04</internalNodes>\n          <leafValues>\n            -1.4891269803047180e-01 1.9086180627346039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 8.7122338300105184e-05</internalNodes>\n          <leafValues>\n            -1.5557530522346497e-01 1.9428220391273499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 -2.0755320787429810e-02</internalNodes>\n          <leafValues>\n            -6.3006532192230225e-01 3.6134380847215652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 -6.2931738793849945e-03</internalNodes>\n          <leafValues>\n            2.5609248876571655e-01 -1.0588269680738449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 1.0844149626791477e-02</internalNodes>\n          <leafValues>\n            -1.0124850273132324e-01 3.0322128534317017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 -6.3752777350600809e-05</internalNodes>\n          <leafValues>\n            1.9111579656600952e-01 -1.3849230110645294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 6.6480963141657412e-05</internalNodes>\n          <leafValues>\n            -1.5205250680446625e-01 2.1706309914588928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 1.3560829684138298e-03</internalNodes>\n          <leafValues>\n            4.9431789666414261e-02 -6.4279842376708984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 -9.0662558795884252e-04</internalNodes>\n          <leafValues>\n            1.7982010543346405e-01 -1.4044609665870667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 1.0473709553480148e-03</internalNodes>\n          <leafValues>\n            -1.0933549702167511e-01 2.4265940487384796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 -1.0243969736620784e-03</internalNodes>\n          <leafValues>\n            2.7162680029869080e-01 -1.1820919811725616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 -1.2024149764329195e-03</internalNodes>\n          <leafValues>\n            -7.0151102542877197e-01 3.9489898830652237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 7.6911649666726589e-03</internalNodes>\n          <leafValues>\n            -9.2218913137912750e-02 3.1046289205551147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 -1.3966549932956696e-01</internalNodes>\n          <leafValues>\n            6.8979388475418091e-01 -3.9706118404865265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 2.1276050247251987e-03</internalNodes>\n          <leafValues>\n            9.7277611494064331e-02 -2.8841799497604370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 -2.7594310231506824e-03</internalNodes>\n          <leafValues>\n            2.4168670177459717e-01 -1.1277820169925690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 5.2236132323741913e-03</internalNodes>\n          <leafValues>\n            -1.1430279910564423e-01 2.4256780743598938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 -1.2590440455824137e-03</internalNodes>\n          <leafValues>\n            -5.9679388999938965e-01 4.7663960605859756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 -3.7192099262028933e-03</internalNodes>\n          <leafValues>\n            -4.6414130926132202e-01 5.2847690880298615e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 5.9696151874959469e-03</internalNodes>\n          <leafValues>\n            -7.3244288563728333e-02 3.8743090629577637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 -5.1776720210909843e-03</internalNodes>\n          <leafValues>\n            -7.4193227291107178e-01 4.0496710687875748e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 5.0035100430250168e-03</internalNodes>\n          <leafValues>\n            -1.3888800144195557e-01 1.8767620623111725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 -5.2013457752764225e-04</internalNodes>\n          <leafValues>\n            -5.4940617084503174e-01 4.9417849630117416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 5.3168768063187599e-03</internalNodes>\n          <leafValues>\n            -8.2482978701591492e-02 3.1740561127662659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 -1.4774589799344540e-02</internalNodes>\n          <leafValues>\n            2.0816099643707275e-01 -1.2115559726953506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 -4.1416451334953308e-02</internalNodes>\n          <leafValues>\n            -8.2437807321548462e-01 3.3329188823699951e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>53</maxWeakCount>\n      <stageThreshold>-1.0492420196533203e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 413 9.0962520334869623e-04</internalNodes>\n          <leafValues>\n            8.4579966962337494e-02 -5.6118410825729370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 -5.6139789521694183e-02</internalNodes>\n          <leafValues>\n            1.5341749787330627e-01 -2.6967319846153259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 1.0292009683325887e-03</internalNodes>\n          <leafValues>\n            -2.0489980280399323e-01 2.0153179764747620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 2.8783010784536600e-03</internalNodes>\n          <leafValues>\n            -1.7351140081882477e-01 2.1297949552536011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 -7.4144392274320126e-03</internalNodes>\n          <leafValues>\n            -5.9624868631362915e-01 4.7077950090169907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 -1.4831849839538336e-03</internalNodes>\n          <leafValues>\n            1.9024610519409180e-01 -1.5986390411853790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 4.5968941412866116e-03</internalNodes>\n          <leafValues>\n            3.1447131186723709e-02 -6.8694341182708740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 2.4255330208688974e-03</internalNodes>\n          <leafValues>\n            -2.3609359562397003e-01 1.1036109924316406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 -8.4950566291809082e-02</internalNodes>\n          <leafValues>\n            2.3107160627841949e-01 -1.3776530325412750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 -5.0145681016147137e-03</internalNodes>\n          <leafValues>\n            3.8676109910011292e-01 -5.6217379868030548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 -2.1482061129063368e-03</internalNodes>\n          <leafValues>\n            1.8191599845886230e-01 -1.7615699768066406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 -1.0396770201623440e-02</internalNodes>\n          <leafValues>\n            -7.5351381301879883e-01 2.4091970175504684e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 -1.3466750271618366e-02</internalNodes>\n          <leafValues>\n            -7.2118860483169556e-01 3.4949369728565216e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 -8.4435477852821350e-02</internalNodes>\n          <leafValues>\n            -3.3792638778686523e-01 7.1113817393779755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 2.4771490134298801e-03</internalNodes>\n          <leafValues>\n            -1.1765109747648239e-01 2.2541989386081696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 1.5828050673007965e-02</internalNodes>\n          <leafValues>\n            -6.9536216557025909e-02 3.1395369768142700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 6.4916983246803284e-02</internalNodes>\n          <leafValues>\n            -7.5043588876724243e-02 4.0677338838577271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 2.9652469675056636e-04</internalNodes>\n          <leafValues>\n            7.3953360319137573e-02 -3.4544008970260620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 1.3129520229995251e-03</internalNodes>\n          <leafValues>\n            -1.6909439861774445e-01 1.5258370339870453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 -5.8032129891216755e-03</internalNodes>\n          <leafValues>\n            3.5260149836540222e-01 -8.3444066345691681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -1.4791679382324219e-01</internalNodes>\n          <leafValues>\n            4.3004658818244934e-01 -5.7309929281473160e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 -1.6584150493144989e-02</internalNodes>\n          <leafValues>\n            2.3432689905166626e-01 -1.0907640308141708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 3.0183270573616028e-03</internalNodes>\n          <leafValues>\n            -1.3600939512252808e-01 2.6409289240837097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 -3.6471918225288391e-02</internalNodes>\n          <leafValues>\n            -6.2809741497039795e-01 4.3545108288526535e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 -7.3119226726703346e-05</internalNodes>\n          <leafValues>\n            1.6470630466938019e-01 -1.6463780403137207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 -3.6719450727105141e-03</internalNodes>\n          <leafValues>\n            -4.7421360015869141e-01 4.8586919903755188e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 -4.0151178836822510e-03</internalNodes>\n          <leafValues>\n            1.8222180008888245e-01 -1.4097510278224945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 1.9948020577430725e-02</internalNodes>\n          <leafValues>\n            -6.9787658751010895e-02 3.6707460880279541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 7.6699437340721488e-04</internalNodes>\n          <leafValues>\n            5.5729299783706665e-02 -4.4585430622100830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 -1.1806039838120341e-03</internalNodes>\n          <leafValues>\n            -4.6876621246337891e-01 4.8902221024036407e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 1.5847349539399147e-02</internalNodes>\n          <leafValues>\n            -1.2120209634304047e-01 2.0566530525684357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 -1.1985700111836195e-03</internalNodes>\n          <leafValues>\n            2.0262099802494049e-01 -1.2823820114135742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 -1.0964959859848022e-01</internalNodes>\n          <leafValues>\n            -8.6619192361831665e-01 3.0351849272847176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 -9.2532606795430183e-03</internalNodes>\n          <leafValues>\n            2.9343119263648987e-01 -8.5361950099468231e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 1.4686530455946922e-02</internalNodes>\n          <leafValues>\n            3.2798621803522110e-02 -7.7556562423706055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 -1.3514430029317737e-03</internalNodes>\n          <leafValues>\n            2.4426999688148499e-01 -1.1503250151872635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 -4.3728090822696686e-03</internalNodes>\n          <leafValues>\n            2.1687670052051544e-01 -1.3984480500221252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 3.4263390116393566e-03</internalNodes>\n          <leafValues>\n            4.5614220201969147e-02 -5.4567712545394897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 -3.8404068909585476e-03</internalNodes>\n          <leafValues>\n            1.4949500560760498e-01 -1.5062509477138519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 3.7988980766385794e-03</internalNodes>\n          <leafValues>\n            -8.7301626801490784e-02 2.5481531023979187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 -2.0094281062483788e-03</internalNodes>\n          <leafValues>\n            1.7259070277214050e-01 -1.4288470149040222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -2.4370709434151649e-03</internalNodes>\n          <leafValues>\n            2.6848098635673523e-01 -8.1898219883441925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 1.0485399980098009e-03</internalNodes>\n          <leafValues>\n            4.6113260090351105e-02 -4.7243279218673706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 1.7460780218243599e-03</internalNodes>\n          <leafValues>\n            -1.1030430346727371e-01 2.0379729568958282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 5.8608627878129482e-03</internalNodes>\n          <leafValues>\n            -1.5619659423828125e-01 1.5927439928054810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 -2.7724979445338249e-02</internalNodes>\n          <leafValues>\n            1.1349119991064072e-01 -2.1885140240192413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 4.7080639749765396e-02</internalNodes>\n          <leafValues>\n            -4.1688729077577591e-02 5.3630048036575317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 -7.9283770173788071e-03</internalNodes>\n          <leafValues>\n            -5.3595131635665894e-01 4.4237509369850159e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 -1.2880540452897549e-02</internalNodes>\n          <leafValues>\n            2.3237949609756470e-01 -1.0246250033378601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 2.3604769259691238e-02</internalNodes>\n          <leafValues>\n            -8.8291436433792114e-02 3.0561059713363647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 1.5902200713753700e-02</internalNodes>\n          <leafValues>\n            -1.2238109856843948e-01 1.7849120497703552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 7.9939495772123337e-03</internalNodes>\n          <leafValues>\n            -8.3729006350040436e-02 3.2319590449333191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 5.7100867852568626e-03</internalNodes>\n          <leafValues>\n            3.8479208946228027e-02 -6.8138152360916138e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>51</maxWeakCount>\n      <stageThreshold>-1.1122100353240967e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 466 2.2480720654129982e-03</internalNodes>\n          <leafValues>\n            -1.6416870057582855e-01 4.1648530960083008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 4.5813550241291523e-03</internalNodes>\n          <leafValues>\n            -1.2465959787368774e-01 4.0385121107101440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 -1.6073239967226982e-03</internalNodes>\n          <leafValues>\n            2.6082459092140198e-01 -2.0282520353794098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 2.5205370038747787e-03</internalNodes>\n          <leafValues>\n            -1.0557229816913605e-01 3.6669111251831055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 2.4119189474731684e-03</internalNodes>\n          <leafValues>\n            -1.3877600431442261e-01 2.9959911108016968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 5.7156179100275040e-03</internalNodes>\n          <leafValues>\n            -7.7683463692665100e-02 4.8481920361518860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 3.1093840952962637e-03</internalNodes>\n          <leafValues>\n            -1.1229000240564346e-01 2.9215508699417114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 -8.6836628615856171e-02</internalNodes>\n          <leafValues>\n            -3.6779600381851196e-01 7.2597242891788483e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 5.2652182057499886e-03</internalNodes>\n          <leafValues>\n            -1.0890290141105652e-01 3.1791260838508606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 -1.9913529977202415e-02</internalNodes>\n          <leafValues>\n            -5.3373438119888306e-01 7.0585712790489197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 3.8297839928418398e-03</internalNodes>\n          <leafValues>\n            -1.3575910031795502e-01 2.2788879275321960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 1.0431859642267227e-02</internalNodes>\n          <leafValues>\n            8.8797912001609802e-02 -4.7958970069885254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 -2.0040439441800117e-02</internalNodes>\n          <leafValues>\n            1.5745539963245392e-01 -1.7771570384502411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 -5.2967290394008160e-03</internalNodes>\n          <leafValues>\n            -6.8434917926788330e-01 3.5671461373567581e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 -2.1624139044433832e-03</internalNodes>\n          <leafValues>\n            2.8318038582801819e-01 -9.8511278629302979e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 -3.5464888787828386e-04</internalNodes>\n          <leafValues>\n            -3.7077340483665466e-01 8.0932952463626862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -1.8152060511056334e-04</internalNodes>\n          <leafValues>\n            -3.2207030057907104e-01 7.7551059424877167e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 -2.7563021285459399e-04</internalNodes>\n          <leafValues>\n            -3.2441279292106628e-01 8.7949477136135101e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 6.3823810778558254e-03</internalNodes>\n          <leafValues>\n            -8.8924713432788849e-02 3.1727218627929688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 1.1150909587740898e-02</internalNodes>\n          <leafValues>\n            7.1019843220710754e-02 -4.0494039654731750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 -1.0593760525807738e-03</internalNodes>\n          <leafValues>\n            2.6050668954849243e-01 -1.1765640228986740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 2.3906480055302382e-03</internalNodes>\n          <leafValues>\n            -8.4388621151447296e-02 3.1230551004409790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 -1.1000749655067921e-02</internalNodes>\n          <leafValues>\n            1.9152249395847321e-01 -1.5210020542144775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 -2.4643228971399367e-04</internalNodes>\n          <leafValues>\n            -3.1765159964561462e-01 8.6582258343696594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 2.3053269833326340e-02</internalNodes>\n          <leafValues>\n            -1.0089760273694992e-01 2.5769290328025818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 -2.2135660983622074e-03</internalNodes>\n          <leafValues>\n            4.5689210295677185e-01 -5.2404791116714478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 -9.7139709396287799e-04</internalNodes>\n          <leafValues>\n            -3.5518380999565125e-01 8.0094382166862488e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 1.5676229959353805e-03</internalNodes>\n          <leafValues>\n            1.0091420263051987e-01 -2.1603040397167206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 7.5460801599547267e-04</internalNodes>\n          <leafValues>\n            5.7896178215742111e-02 -4.0461111068725586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 -2.0698970183730125e-02</internalNodes>\n          <leafValues>\n            3.1543630361557007e-01 -8.0713048577308655e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 -2.0619940012693405e-02</internalNodes>\n          <leafValues>\n            2.7181661128997803e-01 -7.6358616352081299e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 2.1611129865050316e-02</internalNodes>\n          <leafValues>\n            3.9493449032306671e-02 -5.9429651498794556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 6.5676742233335972e-03</internalNodes>\n          <leafValues>\n            -9.8353669047355652e-02 2.3649279773235321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 -8.8434796780347824e-03</internalNodes>\n          <leafValues>\n            -5.2523428201675415e-01 4.3099921196699142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 -9.4260741025209427e-03</internalNodes>\n          <leafValues>\n            2.4665130674839020e-01 -9.4130717217922211e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 -1.9830230157822371e-03</internalNodes>\n          <leafValues>\n            2.6743701100349426e-01 -9.0069316327571869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 -1.7358399927616119e-03</internalNodes>\n          <leafValues>\n            1.5940019488334656e-01 -1.5789410471916199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -1.3513869605958462e-02</internalNodes>\n          <leafValues>\n            4.0792331099510193e-01 -6.4223118126392365e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 -1.9394010305404663e-02</internalNodes>\n          <leafValues>\n            1.8015649914741516e-01 -1.3731400668621063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 -3.2684770412743092e-03</internalNodes>\n          <leafValues>\n            2.9080390930175781e-01 -8.0161906778812408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 4.1773589327931404e-04</internalNodes>\n          <leafValues>\n            -2.1412980556488037e-01 1.1273439973592758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 -7.6351119205355644e-03</internalNodes>\n          <leafValues>\n            -4.5365959405899048e-01 5.4625060409307480e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 -8.3652976900339127e-03</internalNodes>\n          <leafValues>\n            2.6472920179367065e-01 -9.4334110617637634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 2.7768449857831001e-02</internalNodes>\n          <leafValues>\n            -1.0136710107326508e-01 2.0743979513645172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 -5.4891228675842285e-02</internalNodes>\n          <leafValues>\n            2.8840309381484985e-01 -7.5312040746212006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 2.5793339591473341e-03</internalNodes>\n          <leafValues>\n            -1.1088529974222183e-01 2.1724960207939148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 6.6196516854688525e-05</internalNodes>\n          <leafValues>\n            -1.8872100114822388e-01 1.4440689980983734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 5.0907251425087452e-03</internalNodes>\n          <leafValues>\n            -7.7601231634616852e-02 2.9398378729820251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 -1.0444259643554688e-01</internalNodes>\n          <leafValues>\n            2.0133109390735626e-01 -1.0903970152139664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 -6.7273090826347470e-04</internalNodes>\n          <leafValues>\n            1.7945900559425354e-01 -1.2023670226335526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 3.2412849832326174e-03</internalNodes>\n          <leafValues>\n            4.0688131004571915e-02 -5.4600572586059570e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>-1.2529590129852295e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 517 5.2965320646762848e-03</internalNodes>\n          <leafValues>\n            -1.2154529988765717e-01 6.4420372247695923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 -2.5326260365545750e-03</internalNodes>\n          <leafValues>\n            5.1233220100402832e-01 -1.1108259856700897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 -2.9183230362832546e-03</internalNodes>\n          <leafValues>\n            -5.0615429878234863e-01 1.1501979827880859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 -2.3692339658737183e-02</internalNodes>\n          <leafValues>\n            3.7167280912399292e-01 -1.4672680199146271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 2.0177470520138741e-02</internalNodes>\n          <leafValues>\n            -1.7388840019702911e-01 4.7759491205215454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 -2.1723210811614990e-02</internalNodes>\n          <leafValues>\n            -4.3880090117454529e-01 1.3576899468898773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 2.8369780629873276e-03</internalNodes>\n          <leafValues>\n            -1.2512069940567017e-01 4.6789029240608215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 2.7148420922458172e-03</internalNodes>\n          <leafValues>\n            -8.8018856942653656e-02 3.6866518855094910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 3.2625689636915922e-03</internalNodes>\n          <leafValues>\n            -8.5335306823253632e-02 5.1644730567932129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 -3.5618850961327553e-03</internalNodes>\n          <leafValues>\n            -4.4503930211067200e-01 9.1738171875476837e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 1.9227749435231090e-03</internalNodes>\n          <leafValues>\n            -1.1077310144901276e-01 3.9416998624801636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 -3.5111969918943942e-04</internalNodes>\n          <leafValues>\n            -3.7775701284408569e-01 1.2166170030832291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 1.9121779769193381e-04</internalNodes>\n          <leafValues>\n            7.4816018342971802e-02 -4.0767100453376770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 -2.6525629800744355e-04</internalNodes>\n          <leafValues>\n            -3.3151718974113464e-01 1.1291120201349258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 2.0086700096726418e-02</internalNodes>\n          <leafValues>\n            -6.1598118394613266e-02 5.6128817796707153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 3.6783248186111450e-02</internalNodes>\n          <leafValues>\n            -6.0251388698816299e-02 5.2192491292953491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 1.3941619545221329e-03</internalNodes>\n          <leafValues>\n            -3.5503050684928894e-01 1.0863020271062851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 -1.5181669965386391e-02</internalNodes>\n          <leafValues>\n            2.2739650309085846e-01 -1.6252990067005157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 4.6796840615570545e-03</internalNodes>\n          <leafValues>\n            -5.7535041123628616e-02 4.8124238848686218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 -1.7988319450523704e-04</internalNodes>\n          <leafValues>\n            -3.0587670207023621e-01 1.0868159681558609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 -3.5850999411195517e-03</internalNodes>\n          <leafValues>\n            3.8596940040588379e-01 -9.2194072902202606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 1.0793360415846109e-03</internalNodes>\n          <leafValues>\n            -1.1190389841794968e-01 3.1125208735466003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 7.3285802500322461e-05</internalNodes>\n          <leafValues>\n            -2.0239910483360291e-01 1.5586680173873901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 1.3678739964962006e-01</internalNodes>\n          <leafValues>\n            -2.1672859787940979e-01 1.4420390129089355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 -1.1729259975254536e-02</internalNodes>\n          <leafValues>\n            4.3503770232200623e-01 -7.4886530637741089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 3.9230841211974621e-03</internalNodes>\n          <leafValues>\n            -5.0289329141378403e-02 5.8831161260604858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 -2.9819121118634939e-04</internalNodes>\n          <leafValues>\n            -3.8232401013374329e-01 9.2451132833957672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 -4.7992770560085773e-03</internalNodes>\n          <leafValues>\n            4.8488789796829224e-01 -7.3136523365974426e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 -3.0155890271998942e-04</internalNodes>\n          <leafValues>\n            -3.5757359862327576e-01 1.0581880062818527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 1.0390769690275192e-02</internalNodes>\n          <leafValues>\n            5.2920468151569366e-02 -5.7249659299850464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 -9.4488041941076517e-04</internalNodes>\n          <leafValues>\n            4.4966828823089600e-01 -8.3075523376464844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 1.2651870492845774e-03</internalNodes>\n          <leafValues>\n            -9.6695438027381897e-02 3.1302270293235779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 1.7094539478421211e-02</internalNodes>\n          <leafValues>\n            -8.1248976290225983e-02 3.6113831400871277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 2.5973359588533640e-03</internalNodes>\n          <leafValues>\n            -1.1338350176811218e-01 2.2233949601650238e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 1.4527440071105957e-03</internalNodes>\n          <leafValues>\n            6.9750443100929260e-02 -3.6720710992813110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 4.7638658434152603e-03</internalNodes>\n          <leafValues>\n            -6.5788961946964264e-02 3.8328540325164795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 -6.2501081265509129e-03</internalNodes>\n          <leafValues>\n            -7.0754468441009521e-01 3.8350198417901993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 -3.1765329185873270e-03</internalNodes>\n          <leafValues>\n            1.3755400478839874e-01 -2.3240029811859131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 3.2191169448196888e-03</internalNodes>\n          <leafValues>\n            -1.2935450673103333e-01 2.2737880051136017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -5.6365579366683960e-03</internalNodes>\n          <leafValues>\n            3.8067150115966797e-01 -6.7246839404106140e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 -2.3844049428589642e-04</internalNodes>\n          <leafValues>\n            -3.1122380495071411e-01 8.3838358521461487e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 -4.1017560288310051e-03</internalNodes>\n          <leafValues>\n            2.6067280769348145e-01 -1.0449740290641785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 1.3336989795789123e-03</internalNodes>\n          <leafValues>\n            -5.8250140398740768e-02 4.7682440280914307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 -1.2090239906683564e-03</internalNodes>\n          <leafValues>\n            1.4834509789943695e-01 -1.7329469323158264e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>72</maxWeakCount>\n      <stageThreshold>-1.1188739538192749e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 561 -3.1760931015014648e-03</internalNodes>\n          <leafValues>\n            3.3333331346511841e-01 -1.6642349958419800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 2.4858079850673676e-02</internalNodes>\n          <leafValues>\n            -7.2728872299194336e-02 5.6674581766128540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 -7.7597280032932758e-03</internalNodes>\n          <leafValues>\n            4.6258568763732910e-01 -9.3112178146839142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 7.8239021822810173e-03</internalNodes>\n          <leafValues>\n            -2.7414610981941223e-01 1.3243049383163452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 -1.0948839597404003e-02</internalNodes>\n          <leafValues>\n            2.2345480322837830e-01 -1.4965449273586273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 -3.4349008928984404e-03</internalNodes>\n          <leafValues>\n            3.8724988698959351e-01 -6.6121727228164673e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 -3.1156290322542191e-02</internalNodes>\n          <leafValues>\n            2.4078279733657837e-01 -1.1406909674406052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 1.1100519914180040e-03</internalNodes>\n          <leafValues>\n            -2.8207978606224060e-01 1.3275429606437683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 3.1762740109115839e-03</internalNodes>\n          <leafValues>\n            3.4585930407047272e-02 -5.1374310255050659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 -2.7977459132671356e-02</internalNodes>\n          <leafValues>\n            2.3926779627799988e-01 -1.3255919516086578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 -2.3097939789295197e-02</internalNodes>\n          <leafValues>\n            3.9019620418548584e-01 -7.8478008508682251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 -3.9731930010020733e-03</internalNodes>\n          <leafValues>\n            3.0691069364547729e-01 -7.0601403713226318e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 3.0335749033838511e-03</internalNodes>\n          <leafValues>\n            -1.4002190530300140e-01 1.9134859740734100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 -1.0844370350241661e-02</internalNodes>\n          <leafValues>\n            1.6548730432987213e-01 -1.5657779574394226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 -1.8150510266423225e-02</internalNodes>\n          <leafValues>\n            -6.3243591785430908e-01 3.9561819285154343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 7.1052298881113529e-04</internalNodes>\n          <leafValues>\n            -1.8515570461750031e-01 1.3408809900283813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 1.0893340222537518e-02</internalNodes>\n          <leafValues>\n            -2.6730230078101158e-02 6.0971802473068237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 -2.8780900174751878e-04</internalNodes>\n          <leafValues>\n            -3.0065140128135681e-01 7.3171459138393402e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 -3.5855069290846586e-03</internalNodes>\n          <leafValues>\n            2.6217609643936157e-01 -7.9714097082614899e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 -1.9759280607104301e-02</internalNodes>\n          <leafValues>\n            -5.9039229154586792e-01 4.0698971599340439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 -1.0845210403203964e-02</internalNodes>\n          <leafValues>\n            1.6364559531211853e-01 -1.2586060166358948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 -4.3183090165257454e-03</internalNodes>\n          <leafValues>\n            -5.7474881410598755e-01 3.7644311785697937e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 1.4913700288161635e-03</internalNodes>\n          <leafValues>\n            6.0913469642400742e-02 -3.0222928524017334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 1.5675699338316917e-02</internalNodes>\n          <leafValues>\n            -7.3145911097526550e-02 2.9379451274871826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 -1.1033560149371624e-02</internalNodes>\n          <leafValues>\n            3.9318808913230896e-01 -4.7084320336580276e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 8.8555756956338882e-03</internalNodes>\n          <leafValues>\n            3.7601381540298462e-02 -4.9108490347862244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 -8.9665671112015843e-04</internalNodes>\n          <leafValues>\n            1.7952020466327667e-01 -1.1086239665746689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 -3.0592409893870354e-03</internalNodes>\n          <leafValues>\n            -4.4429460167884827e-01 5.1005430519580841e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 6.3201179727911949e-03</internalNodes>\n          <leafValues>\n            -5.2841089665889740e-02 3.7197101116180420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 2.0682830363512039e-02</internalNodes>\n          <leafValues>\n            5.7667169719934464e-02 -3.6901599168777466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 9.9822662770748138e-02</internalNodes>\n          <leafValues>\n            -3.7377018481492996e-02 5.8165591955184937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 -6.5854229032993317e-03</internalNodes>\n          <leafValues>\n            2.8509441018104553e-01 -6.0978069901466370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 -6.0900300741195679e-02</internalNodes>\n          <leafValues>\n            -5.1031768321990967e-01 3.7787400186061859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 -2.9991709161549807e-03</internalNodes>\n          <leafValues>\n            -4.7943010926246643e-01 3.8833890110254288e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 -9.8906438797712326e-03</internalNodes>\n          <leafValues>\n            4.0609079599380493e-01 -4.7869648784399033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 596 -8.2688927650451660e-02</internalNodes>\n          <leafValues>\n            -7.0671182870864868e-01 2.7487749233841896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 5.0060399807989597e-03</internalNodes>\n          <leafValues>\n            2.8208440169692039e-02 -5.2909690141677856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 6.1695030890405178e-03</internalNodes>\n          <leafValues>\n            -5.4554861038923264e-02 3.2837980985641479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 -3.3914761152118444e-03</internalNodes>\n          <leafValues>\n            9.2117667198181152e-02 -2.1637110412120819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 -2.6131230406463146e-03</internalNodes>\n          <leafValues>\n            1.3651019334793091e-01 -1.3781130313873291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 8.0490659456700087e-04</internalNodes>\n          <leafValues>\n            -6.8637110292911530e-02 3.3581069111824036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 -3.8106508553028107e-02</internalNodes>\n          <leafValues>\n            2.9445430636405945e-01 -6.8239226937294006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 7.2450799052603543e-05</internalNodes>\n          <leafValues>\n            -1.6750130057334900e-01 1.2178230285644531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 1.5837959945201874e-03</internalNodes>\n          <leafValues>\n            -9.2042848467826843e-02 2.1348990499973297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 1.2924340553581715e-03</internalNodes>\n          <leafValues>\n            6.2917232513427734e-02 -3.6174508929252625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 9.9146775901317596e-03</internalNodes>\n          <leafValues>\n            1.9534060731530190e-02 -8.1015038490295410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 -1.7086310544982553e-03</internalNodes>\n          <leafValues>\n            2.5525239109992981e-01 -6.8229459226131439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 2.1844399161636829e-03</internalNodes>\n          <leafValues>\n            2.3314049467444420e-02 -8.4296780824661255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 -3.4244330599904060e-03</internalNodes>\n          <leafValues>\n            2.7213689684867859e-01 -7.6395228505134583e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 2.7591470279730856e-04</internalNodes>\n          <leafValues>\n            -1.0742840170860291e-01 2.2888970375061035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 -6.0005177510902286e-04</internalNodes>\n          <leafValues>\n            -2.9854211211204529e-01 6.3479736447334290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 -2.5001438916660845e-04</internalNodes>\n          <leafValues>\n            -2.7178969979286194e-01 6.9615006446838379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 6.8751391954720020e-03</internalNodes>\n          <leafValues>\n            -5.7185899466276169e-02 3.6695951223373413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 1.2761900201439857e-02</internalNodes>\n          <leafValues>\n            6.7955687642097473e-02 -2.8534150123596191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 -1.4752789866179228e-03</internalNodes>\n          <leafValues>\n            2.0680660009384155e-01 -1.0059390217065811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 1.2138819694519043e-01</internalNodes>\n          <leafValues>\n            -9.7126796841621399e-02 1.9789619743824005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 -5.0081279128789902e-02</internalNodes>\n          <leafValues>\n            2.8417178988456726e-01 -6.7879997193813324e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 3.1454950571060181e-02</internalNodes>\n          <leafValues>\n            -8.9468672871589661e-02 2.1298420429229736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 1.8878319533541799e-03</internalNodes>\n          <leafValues>\n            -1.1656440049409866e-01 1.6663520038127899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 -5.7211960665881634e-03</internalNodes>\n          <leafValues>\n            2.3702140152454376e-01 -9.0776607394218445e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 -1.8076719425152987e-04</internalNodes>\n          <leafValues>\n            1.7951929569244385e-01 -1.0793480277061462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 -1.9761849939823151e-01</internalNodes>\n          <leafValues>\n            4.5674291253089905e-01 -4.0480159223079681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 -2.3846809926908463e-04</internalNodes>\n          <leafValues>\n            -2.3733009397983551e-01 7.5922161340713501e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 2.1540730085689574e-04</internalNodes>\n          <leafValues>\n            8.1688016653060913e-02 -2.8685030341148376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 1.0163090191781521e-02</internalNodes>\n          <leafValues>\n            -4.1250020265579224e-02 4.8038348555564880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 -7.2184870950877666e-03</internalNodes>\n          <leafValues>\n            1.7458580434322357e-01 -1.0146500170230865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 2.4263170361518860e-01</internalNodes>\n          <leafValues>\n            5.3426481783390045e-02 -3.2318529486656189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 6.9304101634770632e-04</internalNodes>\n          <leafValues>\n            -1.1499179899692535e-01 1.4793939888477325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 3.5475199110805988e-03</internalNodes>\n          <leafValues>\n            -3.9424978196620941e-02 5.3126180171966553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 2.1403690334409475e-04</internalNodes>\n          <leafValues>\n            6.9753833115100861e-02 -2.7319580316543579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 -5.7119462871924043e-04</internalNodes>\n          <leafValues>\n            3.4369900822639465e-01 -5.7699009776115417e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 -6.6290069371461868e-03</internalNodes>\n          <leafValues>\n            1.1758489906787872e-01 -1.5020139515399933e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>66</maxWeakCount>\n      <stageThreshold>-1.0888810157775879e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 633 -2.6513449847698212e-02</internalNodes>\n          <leafValues>\n            2.0568640530109406e-01 -2.6473900675773621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 9.7727458924055099e-03</internalNodes>\n          <leafValues>\n            -1.1192840337753296e-01 3.2570549845695496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 3.2290350645780563e-02</internalNodes>\n          <leafValues>\n            -9.8574757575988770e-02 3.1779170036315918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 -2.8103240765631199e-03</internalNodes>\n          <leafValues>\n            1.5213899314403534e-01 -1.9686409831047058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 -1.0991429910063744e-02</internalNodes>\n          <leafValues>\n            5.1407659053802490e-01 -4.3707210570573807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 6.3133831135928631e-03</internalNodes>\n          <leafValues>\n            -9.2781022191047668e-02 3.4702470898628235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 8.7105982005596161e-02</internalNodes>\n          <leafValues>\n            3.0053649097681046e-02 -8.2814818620681763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 1.1799359926953912e-03</internalNodes>\n          <leafValues>\n            -1.2928420305252075e-01 2.0646120607852936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 -9.3056890182197094e-04</internalNodes>\n          <leafValues>\n            -5.0021439790725708e-01 9.3666993081569672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 -1.3687170110642910e-02</internalNodes>\n          <leafValues>\n            -7.9358148574829102e-01 -6.6733639687299728e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 -7.5917452573776245e-02</internalNodes>\n          <leafValues>\n            3.0469641089439392e-01 -7.9655893146991730e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 -2.8559709899127483e-03</internalNodes>\n          <leafValues>\n            2.0961460471153259e-01 -1.2732550501823425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 -4.0231510065495968e-03</internalNodes>\n          <leafValues>\n            -6.5817278623580933e-01 5.0683639943599701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 1.7558040097355843e-02</internalNodes>\n          <leafValues>\n            -8.5382692515850067e-02 3.6174559593200684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 2.1988239139318466e-02</internalNodes>\n          <leafValues>\n            6.2943696975708008e-02 -7.0896339416503906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 -2.8599589131772518e-03</internalNodes>\n          <leafValues>\n            1.4683780074119568e-01 -1.6465979814529419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 -1.0030849836766720e-02</internalNodes>\n          <leafValues>\n            4.9579939246177673e-01 -2.7188340201973915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 -6.9560329429805279e-03</internalNodes>\n          <leafValues>\n            2.7977779507637024e-01 -7.7953331172466278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 -3.8356808945536613e-03</internalNodes>\n          <leafValues>\n            -5.8163982629776001e-01 3.5739939659833908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 -3.2647319603711367e-03</internalNodes>\n          <leafValues>\n            -4.9945080280303955e-01 4.6986490488052368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 -7.8412350267171860e-03</internalNodes>\n          <leafValues>\n            3.4532830119132996e-01 -6.8810403347015381e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 -8.1718113506212831e-05</internalNodes>\n          <leafValues>\n            1.5041710436344147e-01 -1.4146679639816284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 -3.2448628917336464e-03</internalNodes>\n          <leafValues>\n            2.2724510729312897e-01 -9.2860206961631775e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 -7.8561151167377830e-04</internalNodes>\n          <leafValues>\n            -4.4319018721580505e-01 5.7812441140413284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 -6.2474247533828020e-04</internalNodes>\n          <leafValues>\n            1.3952389359474182e-01 -1.4668719470500946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 -3.2942948746494949e-04</internalNodes>\n          <leafValues>\n            -2.9901570081710815e-01 7.6066739857196808e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 1.2605739757418633e-03</internalNodes>\n          <leafValues>\n            -1.6125600039958954e-01 1.3953800499439240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 -5.1667019724845886e-02</internalNodes>\n          <leafValues>\n            -5.3142839670181274e-01 4.0719520300626755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 -1.5285619534552097e-02</internalNodes>\n          <leafValues>\n            -7.8206378221511841e-01 2.7183769270777702e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 6.9029822945594788e-02</internalNodes>\n          <leafValues>\n            -3.6427021026611328e-02 7.1102517843246460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 1.4522749697789550e-03</internalNodes>\n          <leafValues>\n            -9.6890516579151154e-02 2.1668420732021332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 -2.4765590205788612e-03</internalNodes>\n          <leafValues>\n            1.1645310372114182e-01 -1.8227979540824890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 -1.5134819550439715e-03</internalNodes>\n          <leafValues>\n            1.7863979935646057e-01 -1.2214969843626022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 -1.5099470037966967e-03</internalNodes>\n          <leafValues>\n            1.8086239695549011e-01 -1.1446069926023483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 -6.7054620012640953e-03</internalNodes>\n          <leafValues>\n            2.5106599926948547e-01 -9.1871462762355804e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 -1.4075200073421001e-02</internalNodes>\n          <leafValues>\n            1.3707509636878967e-01 -1.7333500087261200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 -2.2400720044970512e-03</internalNodes>\n          <leafValues>\n            4.0092980861663818e-01 -4.7576878219842911e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 1.9782369956374168e-02</internalNodes>\n          <leafValues>\n            -1.9040350615978241e-01 1.4923410117626190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 2.6002870872616768e-03</internalNodes>\n          <leafValues>\n            4.6971768140792847e-02 -4.3307659029960632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 -5.3445628145709634e-04</internalNodes>\n          <leafValues>\n            -4.3744230270385742e-01 4.1520189493894577e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 -1.7466509714722633e-02</internalNodes>\n          <leafValues>\n            6.5818172693252563e-01 -3.4447491168975830e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 -2.0425589755177498e-03</internalNodes>\n          <leafValues>\n            3.9657929539680481e-01 -4.4052429497241974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 2.6661779265850782e-03</internalNodes>\n          <leafValues>\n            5.8770958334207535e-02 -3.2806369662284851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 -5.5982369929552078e-02</internalNodes>\n          <leafValues>\n            -5.1735472679138184e-01 3.5791840404272079e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 -1.5066330088302493e-03</internalNodes>\n          <leafValues>\n            1.5123869478702545e-01 -1.2520180642604828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 678 -1.1472369544208050e-02</internalNodes>\n          <leafValues>\n            -6.2930530309677124e-01 3.4704331308603287e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 2.3409629240632057e-02</internalNodes>\n          <leafValues>\n            -5.8063350617885590e-02 3.8668221235275269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 -2.3243729956448078e-03</internalNodes>\n          <leafValues>\n            1.8754099309444427e-01 -9.8394669592380524e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 -2.9039299115538597e-02</internalNodes>\n          <leafValues>\n            -5.4486900568008423e-01 4.0926340967416763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 -1.4474649913609028e-02</internalNodes>\n          <leafValues>\n            -6.7248392105102539e-01 2.3128850385546684e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 -5.2086091600358486e-03</internalNodes>\n          <leafValues>\n            -4.3271440267562866e-01 4.3780650943517685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 4.9382899887859821e-03</internalNodes>\n          <leafValues>\n            -1.0878620296716690e-01 1.9342589378356934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 -4.3193930760025978e-03</internalNodes>\n          <leafValues>\n            2.4080930650234222e-01 -1.0380800068378448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 2.3705669445917010e-04</internalNodes>\n          <leafValues>\n            -8.7349072098731995e-02 2.0466239750385284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 4.7858079778961837e-04</internalNodes>\n          <leafValues>\n            4.5624580234289169e-02 -3.8854670524597168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 -8.5342838428914547e-04</internalNodes>\n          <leafValues>\n            -5.5077940225601196e-01 3.5825889557600021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 5.4772121075075120e-05</internalNodes>\n          <leafValues>\n            -1.1225239932537079e-01 1.7503519356250763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 -3.8445889949798584e-03</internalNodes>\n          <leafValues>\n            2.4526700377464294e-01 -8.1132568418979645e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 -4.0128458291292191e-02</internalNodes>\n          <leafValues>\n            -6.3122707605361938e-01 2.6972670108079910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 -1.7886360001284629e-04</internalNodes>\n          <leafValues>\n            1.9855099916458130e-01 -1.0333680361509323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 1.7668239888735116e-04</internalNodes>\n          <leafValues>\n            -9.1359011828899384e-02 1.9848720729351044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 7.2763383388519287e-02</internalNodes>\n          <leafValues>\n            5.0075579434633255e-02 -3.3852630853652954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 1.0181630030274391e-02</internalNodes>\n          <leafValues>\n            -9.3229979276657104e-02 2.0059590041637421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 2.4409969337284565e-03</internalNodes>\n          <leafValues>\n            6.4636632800102234e-02 -2.6921740174293518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 -3.6227488890290260e-03</internalNodes>\n          <leafValues>\n            1.3169890642166138e-01 -1.2514840066432953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 -1.3635610230267048e-03</internalNodes>\n          <leafValues>\n            1.6350460052490234e-01 -1.0665939748287201e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>69</maxWeakCount>\n      <stageThreshold>-1.0408929586410522e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 699 -9.6991164609789848e-03</internalNodes>\n          <leafValues>\n            6.1125320196151733e-01 -6.6225312650203705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 -9.6426531672477722e-03</internalNodes>\n          <leafValues>\n            -1. 2.7699959464371204e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 -9.6381865441799164e-03</internalNodes>\n          <leafValues>\n            1. -2.9904270195402205e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 -4.2553939856588840e-03</internalNodes>\n          <leafValues>\n            2.8464388847351074e-01 -1.5540120005607605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 -9.6223521977663040e-03</internalNodes>\n          <leafValues>\n            -1. 4.3999180197715759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 -9.1231241822242737e-03</internalNodes>\n          <leafValues>\n            8.6869341135025024e-01 -2.7267890982329845e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 -8.6240433156490326e-03</internalNodes>\n          <leafValues>\n            4.5352488756179810e-01 -8.6071379482746124e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 -8.9324144646525383e-03</internalNodes>\n          <leafValues>\n            1.3375559449195862e-01 -2.6012519001960754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 -1.4207810163497925e-02</internalNodes>\n          <leafValues>\n            3.2077640295028687e-01 -9.7226411104202271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 2.5911010801792145e-02</internalNodes>\n          <leafValues>\n            -1.2964080274105072e-01 2.6218649744987488e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 2.0531509653665125e-04</internalNodes>\n          <leafValues>\n            -1.2404280155897141e-01 2.1062959730625153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 -5.4795680625829846e-05</internalNodes>\n          <leafValues>\n            1.1974299699068069e-01 -2.3201279342174530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 711 6.8555199541151524e-03</internalNodes>\n          <leafValues>\n            -6.3276126980781555e-02 4.1044250130653381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 -1.2253040447831154e-02</internalNodes>\n          <leafValues>\n            5.4883331060409546e-01 -3.9731100201606750e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 -3.9058770053088665e-03</internalNodes>\n          <leafValues>\n            2.4190980195999146e-01 -9.7096011042594910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 2.7560980524867773e-03</internalNodes>\n          <leafValues>\n            -1.2569679319858551e-01 1.9456650316715240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 -7.7662160620093346e-03</internalNodes>\n          <leafValues>\n            2.9765701293945312e-01 -9.6818156540393829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 3.8997188676148653e-04</internalNodes>\n          <leafValues>\n            6.2188401818275452e-02 -4.2040899395942688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 3.3579880837351084e-03</internalNodes>\n          <leafValues>\n            4.7498140484094620e-02 -6.3216882944107056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 -1.6745539382100105e-02</internalNodes>\n          <leafValues>\n            7.1098130941390991e-01 -3.9157349616289139e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 -6.5409899689257145e-03</internalNodes>\n          <leafValues>\n            -3.5043171048164368e-01 7.0616953074932098e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 3.0016340315341949e-04</internalNodes>\n          <leafValues>\n            9.1902457177639008e-02 -2.4618670344352722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 1.4918990433216095e-02</internalNodes>\n          <leafValues>\n            -5.1909450441598892e-02 5.6636041402816772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 4.8153079114854336e-04</internalNodes>\n          <leafValues>\n            6.4659558236598969e-02 -3.6590608954429626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 -3.0211321427486837e-04</internalNodes>\n          <leafValues>\n            1.7926569283008575e-01 -1.1410660296678543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 3.8521419628523290e-04</internalNodes>\n          <leafValues>\n            1.0345619916915894e-01 -2.0072460174560547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 8.0837132409214973e-03</internalNodes>\n          <leafValues>\n            -6.6073462367057800e-02 3.0284249782562256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 -2.2804969921708107e-02</internalNodes>\n          <leafValues>\n            5.2962350845336914e-01 -4.0118999779224396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 1.9440450705587864e-04</internalNodes>\n          <leafValues>\n            8.1854820251464844e-02 -2.4663360416889191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 -1.2848090380430222e-02</internalNodes>\n          <leafValues>\n            -3.4973311424255371e-01 5.6916229426860809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 -1.0937290498986840e-03</internalNodes>\n          <leafValues>\n            2.3368680477142334e-01 -9.1604806482791901e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 1.0032650316134095e-03</internalNodes>\n          <leafValues>\n            1.1852180212736130e-01 -1.8469190597534180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -4.4688429683446884e-02</internalNodes>\n          <leafValues>\n            -6.4362460374832153e-01 3.0363269150257111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 8.1657543778419495e-03</internalNodes>\n          <leafValues>\n            4.3674658983945847e-02 -4.3002089858055115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 -1.1717810295522213e-02</internalNodes>\n          <leafValues>\n            4.1781479120254517e-01 -4.8233699053525925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 8.4277130663394928e-02</internalNodes>\n          <leafValues>\n            5.3461279720067978e-02 -3.7952190637588501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 1.4211839996278286e-02</internalNodes>\n          <leafValues>\n            4.4900938868522644e-02 -4.2981499433517456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 1.5028340276330709e-03</internalNodes>\n          <leafValues>\n            8.2227639853954315e-02 -2.4706399440765381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 1.0003579780459404e-02</internalNodes>\n          <leafValues>\n            -5.7221669703722000e-02 3.4609371423721313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 -9.0706320479512215e-03</internalNodes>\n          <leafValues>\n            4.5058089494705200e-01 -4.2795319110155106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 -3.3141620224341750e-04</internalNodes>\n          <leafValues>\n            1.8336910009384155e-01 -1.0759949684143066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 1.9723279774188995e-01</internalNodes>\n          <leafValues>\n            -3.0363829806447029e-02 6.6423428058624268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 -7.1258801035583019e-03</internalNodes>\n          <leafValues>\n            -8.9225047826766968e-01 2.5669990107417107e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 8.6921341717243195e-03</internalNodes>\n          <leafValues>\n            -7.0764370262622833e-02 2.8210529685020447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 8.9262127876281738e-03</internalNodes>\n          <leafValues>\n            7.1078233420848846e-02 -3.0232560634613037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 5.7286009192466736e-02</internalNodes>\n          <leafValues>\n            5.0974130630493164e-02 -3.9196950197219849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 745 3.7920880131423473e-03</internalNodes>\n          <leafValues>\n            3.3841941505670547e-02 -5.1016288995742798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 -1.4508679741993546e-03</internalNodes>\n          <leafValues>\n            3.0879148840904236e-01 -6.3845083117485046e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 9.8390132188796997e-04</internalNodes>\n          <leafValues>\n            -1.3029569387435913e-01 1.4604410529136658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 -1.7221809830516577e-03</internalNodes>\n          <leafValues>\n            2.9157009720802307e-01 -6.8549558520317078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 1.0948250070214272e-02</internalNodes>\n          <leafValues>\n            3.4351408481597900e-02 -4.7702258825302124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 -1.7176309484057128e-05</internalNodes>\n          <leafValues>\n            1.6055269539356232e-01 -1.1690840125083923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 -5.4884208366274834e-03</internalNodes>\n          <leafValues>\n            -4.3415889143943787e-01 4.6106241643428802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 -3.0975250992923975e-03</internalNodes>\n          <leafValues>\n            3.7943339347839355e-01 -5.6860551238059998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 6.4182081259787083e-03</internalNodes>\n          <leafValues>\n            -1.5858210623264313e-01 1.2335419654846191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 1.1831239797174931e-02</internalNodes>\n          <leafValues>\n            -4.0929291397333145e-02 4.5878958702087402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 1.3540499843657017e-02</internalNodes>\n          <leafValues>\n            -5.3725559264421463e-02 3.5056120157241821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 -2.5932150892913342e-03</internalNodes>\n          <leafValues>\n            1.1010520160198212e-01 -1.6752210259437561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 1.6856270376592875e-03</internalNodes>\n          <leafValues>\n            6.6574357450008392e-02 -3.0835020542144775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 2.6524690911173820e-03</internalNodes>\n          <leafValues>\n            6.6318482160568237e-02 -2.7861338853836060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 -7.7341729775071144e-03</internalNodes>\n          <leafValues>\n            1.9718359410762787e-01 -1.0782919824123383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 5.0944271497428417e-03</internalNodes>\n          <leafValues>\n            8.5337489843368530e-02 -2.4847009778022766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 -2.9162371065467596e-03</internalNodes>\n          <leafValues>\n            -4.7476351261138916e-01 3.3566489815711975e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 3.0121419113129377e-03</internalNodes>\n          <leafValues>\n            -4.7575380653142929e-02 4.2586800456047058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 3.1694869976490736e-03</internalNodes>\n          <leafValues>\n            -1.0519450157880783e-01 1.7163459956645966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 2.2327560186386108e-01</internalNodes>\n          <leafValues>\n            -1.4370209537446499e-02 9.2483651638031006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 -9.5585048198699951e-02</internalNodes>\n          <leafValues>\n            -7.4206638336181641e-01 2.7818970382213593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 3.4773729566950351e-05</internalNodes>\n          <leafValues>\n            -1.2765780091285706e-01 1.2926669418811798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 7.2459770308341831e-05</internalNodes>\n          <leafValues>\n            -1.6518579423427582e-01 1.0036809742450714e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>59</maxWeakCount>\n      <stageThreshold>-1.0566600561141968e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 768 -6.5778270363807678e-03</internalNodes>\n          <leafValues>\n            3.3815258741378784e-01 -1.5281909704208374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 -1.0922809597104788e-03</internalNodes>\n          <leafValues>\n            2.2282369434833527e-01 -1.9308499991893768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 -2.9759589582681656e-02</internalNodes>\n          <leafValues>\n            2.5959870219230652e-01 -1.5409409999847412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 -1.3147540390491486e-02</internalNodes>\n          <leafValues>\n            1.9033810496330261e-01 -1.6543999314308167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 -1.4396329643204808e-03</internalNodes>\n          <leafValues>\n            2.0071710646152496e-01 -1.2338940054178238e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 -3.5928250290453434e-03</internalNodes>\n          <leafValues>\n            2.3985520005226135e-01 -1.2922149896621704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 -1.5314699849113822e-03</internalNodes>\n          <leafValues>\n            -4.9014899134635925e-01 1.0275030136108398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 -6.2372139655053616e-03</internalNodes>\n          <leafValues>\n            3.1214639544487000e-01 -1.1405629664659500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 -3.3364649862051010e-02</internalNodes>\n          <leafValues>\n            -4.9520879983901978e-01 5.1328450441360474e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 -2.2827699780464172e-02</internalNodes>\n          <leafValues>\n            3.2558828592300415e-01 -6.5089307725429535e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 -8.6199097335338593e-02</internalNodes>\n          <leafValues>\n            -6.7646330595016479e-01 2.6985699310898781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 -2.1065981127321720e-03</internalNodes>\n          <leafValues>\n            2.2452430427074432e-01 -1.2610229849815369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 780 3.9120148867368698e-02</internalNodes>\n          <leafValues>\n            1.1329399794340134e-01 -2.6860630512237549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 3.5082739777863026e-03</internalNodes>\n          <leafValues>\n            -1.1359959840774536e-01 2.5649771094322205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 5.9289898490533233e-04</internalNodes>\n          <leafValues>\n            -1.4942969381809235e-01 1.6409839689731598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 7.1766850305721164e-04</internalNodes>\n          <leafValues>\n            9.9905692040920258e-02 -2.1967969834804535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 -2.1803600713610649e-02</internalNodes>\n          <leafValues>\n            -3.1711721420288086e-01 8.2889586687088013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 -3.2962779514491558e-03</internalNodes>\n          <leafValues>\n            -3.8048729300498962e-01 6.0819379985332489e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 2.4196270387619734e-03</internalNodes>\n          <leafValues>\n            -9.6013016998767853e-02 2.8540581464767456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 -4.4187481398694217e-04</internalNodes>\n          <leafValues>\n            2.2127939760684967e-01 -9.7434908151626587e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 3.4523929934948683e-03</internalNodes>\n          <leafValues>\n            3.7553120404481888e-02 -5.7969051599502563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 -2.1834600716829300e-02</internalNodes>\n          <leafValues>\n            2.9562139511108398e-01 -8.0048300325870514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 -2.1309500152710825e-04</internalNodes>\n          <leafValues>\n            2.2814509272575378e-01 -1.0114189982414246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 -1.6166249988600612e-03</internalNodes>\n          <leafValues>\n            -5.0541198253631592e-01 4.4764541089534760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 7.5959609821438789e-03</internalNodes>\n          <leafValues>\n            4.5986540615558624e-02 -4.1197681427001953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 3.8601809646934271e-03</internalNodes>\n          <leafValues>\n            -8.6563169956207275e-02 2.4809999763965607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 6.0622231103479862e-03</internalNodes>\n          <leafValues>\n            -7.5557373464107513e-02 2.8433260321617126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 -1.7097420059144497e-03</internalNodes>\n          <leafValues>\n            -3.5295820236206055e-01 5.8410499244928360e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 1.6515579074621201e-02</internalNodes>\n          <leafValues>\n            -8.0486953258514404e-02 2.3537430167198181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 4.8465100117027760e-03</internalNodes>\n          <leafValues>\n            4.1895218193531036e-02 -4.8443049192428589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 -3.1167170032858849e-02</internalNodes>\n          <leafValues>\n            1.9192309677600861e-01 -1.0268159955739975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 6.1892281519249082e-04</internalNodes>\n          <leafValues>\n            -2.1085770428180695e-01 9.3886926770210266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 1.1946310289204121e-02</internalNodes>\n          <leafValues>\n            3.9096169173717499e-02 -6.2248629331588745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 -7.5677200220525265e-03</internalNodes>\n          <leafValues>\n            1.5936839580535889e-01 -1.2250780314207077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 -5.3747411817312241e-02</internalNodes>\n          <leafValues>\n            -5.5622178316116333e-01 4.1190009564161301e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 1.5513530001044273e-02</internalNodes>\n          <leafValues>\n            -3.9826881140470505e-02 6.2400728464126587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 1.5246650436893106e-03</internalNodes>\n          <leafValues>\n            7.0138677954673767e-02 -3.0789071321487427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 -4.8315100139006972e-04</internalNodes>\n          <leafValues>\n            1.7887659370899200e-01 -1.0958620160818100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 2.7374739293009043e-03</internalNodes>\n          <leafValues>\n            2.7478590607643127e-02 -8.8489568233489990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 -6.5787717700004578e-02</internalNodes>\n          <leafValues>\n            -4.6432140469551086e-01 3.5037148743867874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 1.2409730115905404e-03</internalNodes>\n          <leafValues>\n            -9.6479237079620361e-02 2.8779220581054688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 8.1398809561505914e-04</internalNodes>\n          <leafValues>\n            1.1511719971895218e-01 -1.6766160726547241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 2.3901820182800293e-02</internalNodes>\n          <leafValues>\n            -3.2603189349174500e-02 6.0017347335815430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 2.7556600049138069e-02</internalNodes>\n          <leafValues>\n            -6.6137343645095825e-02 2.9994478821754456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 -3.8070970913395286e-04</internalNodes>\n          <leafValues>\n            -3.3881181478500366e-01 6.4450770616531372e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 -1.3335429830476642e-03</internalNodes>\n          <leafValues>\n            1.4588660001754761e-01 -1.3217620551586151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 -9.3507990241050720e-03</internalNodes>\n          <leafValues>\n            -5.1177829504013062e-01 3.4969471395015717e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 7.6215229928493500e-03</internalNodes>\n          <leafValues>\n            2.3249529302120209e-02 -6.9619411230087280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 -5.3407860832521692e-05</internalNodes>\n          <leafValues>\n            2.3727379739284515e-01 -8.6910709738731384e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 -1.5332329785451293e-03</internalNodes>\n          <leafValues>\n            1.9228410720825195e-01 -1.0422399640083313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 4.3135890737175941e-03</internalNodes>\n          <leafValues>\n            -9.6219547092914581e-02 2.5601211190223694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -2.3042880638968199e-04</internalNodes>\n          <leafValues>\n            -3.1564751267433167e-01 5.8838598430156708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 -7.8411828726530075e-03</internalNodes>\n          <leafValues>\n            -6.6340929269790649e-01 2.4500999599695206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 1.7103740572929382e-01</internalNodes>\n          <leafValues>\n            3.3831499516963959e-02 -4.5615941286087036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 -1.6011140542104840e-03</internalNodes>\n          <leafValues>\n            2.1574890613555908e-01 -8.3622530102729797e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 -1.0535780340433121e-02</internalNodes>\n          <leafValues>\n            2.4552319943904877e-01 -8.2384489476680756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 -5.8351638726890087e-03</internalNodes>\n          <leafValues>\n            -4.7807329893112183e-01 4.4086221605539322e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 -1.8706109374761581e-02</internalNodes>\n          <leafValues>\n            -6.0024029016494751e-01 2.1410040557384491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 -9.3307439237833023e-04</internalNodes>\n          <leafValues>\n            2.4323590099811554e-01 -7.4165716767311096e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>88</maxWeakCount>\n      <stageThreshold>-9.7693431377410889e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 827 1.0646229609847069e-02</internalNodes>\n          <leafValues>\n            -1.3861389458179474e-01 2.6494070887565613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 3.5298269242048264e-02</internalNodes>\n          <leafValues>\n            -7.5821727514266968e-02 3.9021068811416626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 7.5638387352228165e-04</internalNodes>\n          <leafValues>\n            -9.5521442592144012e-02 2.9061999917030334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 9.2497706413269043e-02</internalNodes>\n          <leafValues>\n            -2.7704238891601562e-01 7.9474702477455139e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 -2.9340879991650581e-03</internalNodes>\n          <leafValues>\n            2.2989539802074432e-01 -7.8550010919570923e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 -8.6535848677158356e-02</internalNodes>\n          <leafValues>\n            4.7744810581207275e-01 -6.8231220357120037e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 5.4699288739357144e-05</internalNodes>\n          <leafValues>\n            -2.2642609477043152e-01 8.8192112743854523e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 -3.6592520773410797e-02</internalNodes>\n          <leafValues>\n            2.7353870868682861e-01 -9.8606742918491364e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 2.6469118893146515e-03</internalNodes>\n          <leafValues>\n            -4.4083978980779648e-02 3.1445288658142090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 -4.4271810911595821e-03</internalNodes>\n          <leafValues>\n            2.3822729289531708e-01 -8.6784273386001587e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -5.1882481202483177e-03</internalNodes>\n          <leafValues>\n            1.5042769908905029e-01 -1.2672109901905060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 838 4.5530400238931179e-03</internalNodes>\n          <leafValues>\n            -5.5945020169019699e-02 3.6501631140708923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 1.4562410302460194e-02</internalNodes>\n          <leafValues>\n            3.6397770047187805e-02 -5.3559190034866333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 6.8677567469421774e-05</internalNodes>\n          <leafValues>\n            -1.7479629814624786e-01 1.1068709939718246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 -5.9744901955127716e-03</internalNodes>\n          <leafValues>\n            3.1077870726585388e-01 -6.6530227661132812e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 -5.8691250160336494e-03</internalNodes>\n          <leafValues>\n            -3.1901490688323975e-01 6.3931830227375031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 -1.1140310205519199e-02</internalNodes>\n          <leafValues>\n            2.4364790320396423e-01 -8.0935180187225342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 -5.8643531054258347e-02</internalNodes>\n          <leafValues>\n            -7.6083260774612427e-01 3.0809629708528519e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 -4.6097282320261002e-03</internalNodes>\n          <leafValues>\n            -4.5315021276473999e-01 2.9879059642553329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 -9.3032103031873703e-03</internalNodes>\n          <leafValues>\n            1.4513379335403442e-01 -1.1033169925212860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 1.3253629440441728e-03</internalNodes>\n          <leafValues>\n            -9.7698956727981567e-02 1.9646440446376801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 4.9800761044025421e-03</internalNodes>\n          <leafValues>\n            3.3648081123828888e-02 -3.9792209863662720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 -7.6542161405086517e-03</internalNodes>\n          <leafValues>\n            9.0841993689537048e-02 -1.5967549383640289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 -3.8920590281486511e-01</internalNodes>\n          <leafValues>\n            -6.6571092605590820e-01 1.9028829410672188e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 -1.0019669681787491e-01</internalNodes>\n          <leafValues>\n            -5.7559269666671753e-01 2.4282779544591904e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 7.3541211895644665e-04</internalNodes>\n          <leafValues>\n            8.7919801473617554e-02 -1.6195340454578400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 -3.4802639856934547e-03</internalNodes>\n          <leafValues>\n            2.6064491271972656e-01 -6.0200810432434082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 8.4000425413250923e-03</internalNodes>\n          <leafValues>\n            -1.0979729890823364e-01 1.5707309544086456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 2.3786011151969433e-03</internalNodes>\n          <leafValues>\n            3.6058239638805389e-02 -4.7277191281318665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 7.3831682093441486e-03</internalNodes>\n          <leafValues>\n            -3.5756360739469528e-02 4.9498590826988220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 3.2115620560944080e-03</internalNodes>\n          <leafValues>\n            -1.0125560313463211e-01 1.5747989714145660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 -7.8209668397903442e-02</internalNodes>\n          <leafValues>\n            -7.6627081632614136e-01 2.2965829819440842e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 5.3303989261621609e-05</internalNodes>\n          <leafValues>\n            -1.3414350152015686e-01 1.1114919930696487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 -9.6419155597686768e-03</internalNodes>\n          <leafValues>\n            2.5068029761314392e-01 -6.6608138382434845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 -7.1092672646045685e-02</internalNodes>\n          <leafValues>\n            -4.0056818723678589e-01 4.0297791361808777e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 3.5171560011804104e-04</internalNodes>\n          <leafValues>\n            4.1861180216073990e-02 -3.2961198687553406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 -3.3458150574006140e-04</internalNodes>\n          <leafValues>\n            -2.6029831171035767e-01 6.7892737686634064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 -4.1451421566307545e-03</internalNodes>\n          <leafValues>\n            2.3967699706554413e-01 -7.2093337774276733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 3.1754500232636929e-03</internalNodes>\n          <leafValues>\n            -7.1235269308090210e-02 2.4128450453281403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 -5.5184490047395229e-03</internalNodes>\n          <leafValues>\n            5.0320237874984741e-01 -2.9686680063605309e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 -3.0242869979701936e-04</internalNodes>\n          <leafValues>\n            2.4879050254821777e-01 -5.6758578866720200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 -1.3125919504091144e-03</internalNodes>\n          <leafValues>\n            3.1747800111770630e-01 -4.1845861822366714e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 -2.7123570907860994e-04</internalNodes>\n          <leafValues>\n            -2.7042070031166077e-01 5.6828990578651428e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 -7.3241777718067169e-03</internalNodes>\n          <leafValues>\n            2.7556678652763367e-01 -5.4252970963716507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 -1.6851710155606270e-02</internalNodes>\n          <leafValues>\n            -3.4852910041809082e-01 4.5368999242782593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 2.9902100563049316e-02</internalNodes>\n          <leafValues>\n            3.1621079891920090e-02 -4.3114370107650757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 2.8902660124003887e-03</internalNodes>\n          <leafValues>\n            3.8029961287975311e-02 -3.7027099728584290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 -1.9242949783802032e-03</internalNodes>\n          <leafValues>\n            2.4800279736518860e-01 -5.9333298355340958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 4.9354149959981441e-03</internalNodes>\n          <leafValues>\n            -8.3068400621414185e-02 2.2043809294700623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 8.2075603306293488e-02</internalNodes>\n          <leafValues>\n            -1.9413439556956291e-02 6.9089287519454956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 -2.4699489586055279e-04</internalNodes>\n          <leafValues>\n            -2.4660569429397583e-01 6.4776450395584106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 -1.8365769647061825e-03</internalNodes>\n          <leafValues>\n            2.8836160898208618e-01 -5.3390458226203918e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 -4.9553811550140381e-03</internalNodes>\n          <leafValues>\n            1.2740829586982727e-01 -1.2559419870376587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 -8.3086621016263962e-03</internalNodes>\n          <leafValues>\n            2.3478110134601593e-01 -7.1676492691040039e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 -1.0879919677972794e-01</internalNodes>\n          <leafValues>\n            -2.5992238521575928e-01 5.8689739555120468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 -9.6786450594663620e-03</internalNodes>\n          <leafValues>\n            -7.0720428228378296e-01 1.8749259412288666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 -2.7136830613017082e-02</internalNodes>\n          <leafValues>\n            -5.8384227752685547e-01 2.1684130653738976e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 -6.5389778465032578e-03</internalNodes>\n          <leafValues>\n            -5.9748911857604980e-01 2.1480310708284378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 -1.2095630168914795e-02</internalNodes>\n          <leafValues>\n            1.3269039988517761e-01 -9.9722720682621002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 -1.6776099801063538e-01</internalNodes>\n          <leafValues>\n            -5.6655067205429077e-01 3.2123088836669922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 -1.3262550346553326e-02</internalNodes>\n          <leafValues>\n            1.1495590209960938e-01 -1.1738389730453491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 7.6744519174098969e-02</internalNodes>\n          <leafValues>\n            -3.1413231045007706e-02 5.9935492277145386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 5.0785229541361332e-03</internalNodes>\n          <leafValues>\n            -5.2911940962076187e-02 2.3342399299144745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 3.1800279393792152e-03</internalNodes>\n          <leafValues>\n            -7.7734388411045074e-02 1.7652909457683563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 -1.7729829996824265e-03</internalNodes>\n          <leafValues>\n            1.9591629505157471e-01 -7.9752199351787567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 -4.8560940194875002e-04</internalNodes>\n          <leafValues>\n            -2.8800371289253235e-01 4.9047119915485382e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 3.6554320831783116e-04</internalNodes>\n          <leafValues>\n            6.7922897636890411e-02 -2.2499430179595947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 -2.6938671362586319e-04</internalNodes>\n          <leafValues>\n            1.6582170128822327e-01 -8.9744098484516144e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 7.8684233129024506e-02</internalNodes>\n          <leafValues>\n            2.6081679388880730e-02 -5.5693739652633667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 -7.3774810880422592e-04</internalNodes>\n          <leafValues>\n            1.4036870002746582e-01 -1.1800300329923630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 2.3957829922437668e-02</internalNodes>\n          <leafValues>\n            3.0470740050077438e-02 -4.6159979701042175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 -1.6239080578088760e-03</internalNodes>\n          <leafValues>\n            2.6327079534530640e-01 -5.6765370070934296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 -9.0819748584181070e-04</internalNodes>\n          <leafValues>\n            1.5462459623813629e-01 -1.1087069660425186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 3.9806248969398439e-04</internalNodes>\n          <leafValues>\n            5.5630370974540710e-02 -2.8331959247589111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 2.0506449509412050e-03</internalNodes>\n          <leafValues>\n            -9.1604836285114288e-02 1.7585539817810059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 2.6742549613118172e-02</internalNodes>\n          <leafValues>\n            6.2003031373023987e-02 -2.4487000703811646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 -2.1497008856385946e-03</internalNodes>\n          <leafValues>\n            2.9449298977851868e-01 -5.3218148648738861e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 5.6671658530831337e-03</internalNodes>\n          <leafValues>\n            -6.4298242330551147e-02 2.4905680119991302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 6.8317902332637459e-05</internalNodes>\n          <leafValues>\n            -1.6819630563259125e-01 9.6548579633235931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 1.7600439605303109e-04</internalNodes>\n          <leafValues>\n            6.5308012068271637e-02 -2.4267880618572235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 4.1861608624458313e-03</internalNodes>\n          <leafValues>\n            -9.7988583147525787e-02 1.8052889406681061e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 -2.1808340679854155e-03</internalNodes>\n          <leafValues>\n            1.9231270253658295e-01 -9.4123929738998413e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 2.1730400621891022e-02</internalNodes>\n          <leafValues>\n            3.5578511655330658e-02 -4.5088538527488708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 -1.4780269935727119e-02</internalNodes>\n          <leafValues>\n            -4.3927010893821716e-01 3.1735591590404510e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 -3.6145891062915325e-03</internalNodes>\n          <leafValues>\n            1.9811479747295380e-01 -7.7701419591903687e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 1.8892709631472826e-03</internalNodes>\n          <leafValues>\n            1.9962439313530922e-02 -7.2041720151901245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 -1.3822480104863644e-03</internalNodes>\n          <leafValues>\n            9.8466947674751282e-02 -1.4881080389022827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 -3.9505911991000175e-03</internalNodes>\n          <leafValues>\n            1.1593230068683624e-01 -1.2791970372200012e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>58</maxWeakCount>\n      <stageThreshold>-1.0129359960556030e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 915 -1.9395539537072182e-02</internalNodes>\n          <leafValues>\n            4.7474750876426697e-01 -1.1721090227365494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 1.3118919916450977e-02</internalNodes>\n          <leafValues>\n            -2.5552129745483398e-01 1.6378800570964813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 -5.1606801571324468e-04</internalNodes>\n          <leafValues>\n            1.9452619552612305e-01 -1.7448890209197998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 -1.3184159994125366e-02</internalNodes>\n          <leafValues>\n            4.4181451201438904e-01 -9.0048752725124359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 3.4657081123441458e-03</internalNodes>\n          <leafValues>\n            -1.3477090001106262e-01 1.8056340515613556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 6.2980200164020061e-03</internalNodes>\n          <leafValues>\n            -5.4164979606866837e-02 3.6033380031585693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 1.6879989998415112e-03</internalNodes>\n          <leafValues>\n            -1.9997949898242950e-01 1.2021599709987640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 3.6039709812030196e-04</internalNodes>\n          <leafValues>\n            1.0524140298366547e-01 -2.4116060137748718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 -1.5276849735528231e-03</internalNodes>\n          <leafValues>\n            2.8135529160499573e-01 -6.8964816629886627e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 3.5033570602536201e-03</internalNodes>\n          <leafValues>\n            -8.2519583404064178e-02 4.0713590383529663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -4.7337161377072334e-03</internalNodes>\n          <leafValues>\n            1.9727009534835815e-01 -1.1710140109062195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 -1.1557149700820446e-02</internalNodes>\n          <leafValues>\n            -5.6061112880706787e-01 6.8170957267284393e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 -2.7445720508694649e-02</internalNodes>\n          <leafValues>\n            4.9718621373176575e-01 -6.2380149960517883e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 -5.2825778722763062e-02</internalNodes>\n          <leafValues>\n            1.6921220719814301e-01 -1.3093550503253937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 -2.9849699139595032e-01</internalNodes>\n          <leafValues>\n            -6.4649671316146851e-01 4.0076818317174911e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 -2.6307269581593573e-04</internalNodes>\n          <leafValues>\n            2.5127941370010376e-01 -8.9494839310646057e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 2.3261709429789335e-04</internalNodes>\n          <leafValues>\n            -8.6843989789485931e-02 2.3831979930400848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 2.3631360090803355e-04</internalNodes>\n          <leafValues>\n            1.1554460227489471e-01 -1.8936349451541901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 2.0742209162563086e-03</internalNodes>\n          <leafValues>\n            -4.8594851046800613e-02 5.7485991716384888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 -7.0308889262378216e-03</internalNodes>\n          <leafValues>\n            -5.4120808839797974e-01 4.8743750900030136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 8.2652270793914795e-03</internalNodes>\n          <leafValues>\n            2.6494519785046577e-02 -6.1728459596633911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 2.0042760297656059e-04</internalNodes>\n          <leafValues>\n            -1.1768630146980286e-01 1.6333860158920288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 1.6470040427520871e-03</internalNodes>\n          <leafValues>\n            -5.9954918920993805e-02 3.5179701447486877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 -3.5642538568936288e-04</internalNodes>\n          <leafValues>\n            -3.4420299530029297e-01 6.4948253333568573e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 -3.0935870483517647e-02</internalNodes>\n          <leafValues>\n            1.9979700446128845e-01 -9.7693696618080139e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 -6.3578772824257612e-04</internalNodes>\n          <leafValues>\n            -3.1481391191482544e-01 5.9425041079521179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 -1.1862180195748806e-02</internalNodes>\n          <leafValues>\n            2.0043690502643585e-01 -8.9447543025016785e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 7.1508930996060371e-03</internalNodes>\n          <leafValues>\n            -3.9006061851978302e-02 5.3327161073684692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 -2.0059191156178713e-03</internalNodes>\n          <leafValues>\n            -2.8469720482826233e-01 7.0723608136177063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 3.6412389017641544e-03</internalNodes>\n          <leafValues>\n            -1.0660319775342941e-01 2.4944800138473511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 -1.3467429578304291e-01</internalNodes>\n          <leafValues>\n            4.9910080432891846e-01 -4.0332220494747162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 -2.2547659464180470e-03</internalNodes>\n          <leafValues>\n            1.6851690411567688e-01 -1.1119280010461807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 4.3842289596796036e-03</internalNodes>\n          <leafValues>\n            8.6139492690563202e-02 -2.7431771159172058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 -7.3361168615520000e-03</internalNodes>\n          <leafValues>\n            2.4875210225582123e-01 -9.5919162034988403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 6.4666912658140063e-04</internalNodes>\n          <leafValues>\n            6.7431576550006866e-02 -3.3754080533981323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 2.2983769304119051e-04</internalNodes>\n          <leafValues>\n            -8.3903051912784576e-02 2.4584099650382996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 6.7039071582257748e-03</internalNodes>\n          <leafValues>\n            2.9079329222440720e-02 -6.9055938720703125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 5.0734888645820320e-05</internalNodes>\n          <leafValues>\n            -1.5696719288825989e-01 1.1965429782867432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 -2.0335559546947479e-01</internalNodes>\n          <leafValues>\n            -6.9506347179412842e-01 2.7507519349455833e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 9.4939414411783218e-03</internalNodes>\n          <leafValues>\n            -8.7449371814727783e-02 2.3968330025672913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 -2.4055240210145712e-03</internalNodes>\n          <leafValues>\n            2.1150960028171539e-01 -1.3148930668830872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 -1.1342419747961685e-04</internalNodes>\n          <leafValues>\n            1.5233789384365082e-01 -1.2725900113582611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 1.4992210082709789e-02</internalNodes>\n          <leafValues>\n            -3.4127969294786453e-02 5.0624072551727295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 7.4068200774490833e-04</internalNodes>\n          <leafValues>\n            4.8764750361442566e-02 -4.0225321054458618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 -4.2459447868168354e-03</internalNodes>\n          <leafValues>\n            2.1554760634899139e-01 -8.7126992642879486e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 6.8655109498649836e-04</internalNodes>\n          <leafValues>\n            -7.5418718159198761e-02 2.6405909657478333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 -1.6751460731029510e-02</internalNodes>\n          <leafValues>\n            -6.7729032039642334e-01 3.2918728888034821e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 -2.6301678735762835e-04</internalNodes>\n          <leafValues>\n            2.2725869715213776e-01 -9.0534873306751251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 4.3398610432632267e-04</internalNodes>\n          <leafValues>\n            5.5894378572702408e-02 -3.5592669248580933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 -2.0150149241089821e-02</internalNodes>\n          <leafValues>\n            1.9162760674953461e-01 -9.4929970800876617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 -1.4452129602432251e-02</internalNodes>\n          <leafValues>\n            -6.8510341644287109e-01 2.5422170758247375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 -2.1149739623069763e-02</internalNodes>\n          <leafValues>\n            3.7533190846443176e-01 -5.1496580243110657e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 2.1137770265340805e-02</internalNodes>\n          <leafValues>\n            2.9083080589771271e-02 -8.9430367946624756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 1.1524349683895707e-03</internalNodes>\n          <leafValues>\n            -6.9694936275482178e-02 2.7299800515174866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 -1.9070580310653895e-04</internalNodes>\n          <leafValues>\n            1.8228119611740112e-01 -9.8367072641849518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 -3.6349631845951080e-02</internalNodes>\n          <leafValues>\n            -8.3693099021911621e-01 2.5055760517716408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 -9.0632075443863869e-03</internalNodes>\n          <leafValues>\n            4.1463500261306763e-01 -5.4413449019193649e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 -2.0535490475594997e-03</internalNodes>\n          <leafValues>\n            -1.9750310480594635e-01 1.0506899654865265e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>93</maxWeakCount>\n      <stageThreshold>-9.7747492790222168e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 973 -2.2717019543051720e-02</internalNodes>\n          <leafValues>\n            2.4288550019264221e-01 -1.4745520055294037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 2.5505950674414635e-02</internalNodes>\n          <leafValues>\n            -2.8551739454269409e-01 1.0837209969758987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 -2.6640091091394424e-03</internalNodes>\n          <leafValues>\n            2.9275730252265930e-01 -1.0372710227966309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 -3.8115289062261581e-03</internalNodes>\n          <leafValues>\n            2.1426899731159210e-01 -1.3811139762401581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 977 -1.6732690855860710e-02</internalNodes>\n          <leafValues>\n            2.6550260186195374e-01 -4.3911330401897430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 4.9277010839432478e-04</internalNodes>\n          <leafValues>\n            2.1104559302330017e-02 -4.2971360683441162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 -3.6691110581159592e-02</internalNodes>\n          <leafValues>\n            5.3992420434951782e-01 -4.3648801743984222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 1.2615970335900784e-03</internalNodes>\n          <leafValues>\n            -1.2933869659900665e-01 1.6638770699501038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 -8.4106856957077980e-03</internalNodes>\n          <leafValues>\n            -9.4698411226272583e-01 2.1465849131345749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 6.4902722835540771e-02</internalNodes>\n          <leafValues>\n            -7.1727760136127472e-02 2.6613479852676392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 3.0305000022053719e-02</internalNodes>\n          <leafValues>\n            -8.2782492041587830e-02 2.7694320678710938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 2.5875340215861797e-03</internalNodes>\n          <leafValues>\n            -1.2966169416904449e-01 1.7756630480289459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 -7.0240451022982597e-03</internalNodes>\n          <leafValues>\n            -6.4243179559707642e-01 3.9943210780620575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 -1.0099769569933414e-03</internalNodes>\n          <leafValues>\n            1.4176610112190247e-01 -1.1659970134496689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 -4.1179071558872238e-05</internalNodes>\n          <leafValues>\n            1.5687669813632965e-01 -1.1127340048551559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 -4.7293151146732271e-04</internalNodes>\n          <leafValues>\n            -3.3554559946060181e-01 4.5977730304002762e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 -1.7178079579025507e-03</internalNodes>\n          <leafValues>\n            1.6952909529209137e-01 -1.0578069835901260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 990 -1.3333169743418694e-02</internalNodes>\n          <leafValues>\n            -5.8257812261581421e-01 3.0978430062532425e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 991 -1.8783430568873882e-03</internalNodes>\n          <leafValues>\n            1.4266879856586456e-01 -1.1131259799003601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 992 -6.5765981562435627e-03</internalNodes>\n          <leafValues>\n            2.7561360597610474e-01 -5.3100328892469406e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 993 -7.7210381277836859e-05</internalNodes>\n          <leafValues>\n            1.3240240514278412e-01 -1.1167799681425095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 994 2.1968539804220200e-02</internalNodes>\n          <leafValues>\n            -2.6968160644173622e-02 5.0067168474197388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 995 -2.7445750311017036e-02</internalNodes>\n          <leafValues>\n            -2.4086740612983704e-01 6.0478270053863525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 996 7.8305849456228316e-05</internalNodes>\n          <leafValues>\n            -1.3334889709949493e-01 1.0123469680547714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 997 7.0190683007240295e-02</internalNodes>\n          <leafValues>\n            -5.4863780736923218e-02 2.4809940159320831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 998 -7.1902133524417877e-02</internalNodes>\n          <leafValues>\n            -3.7846690416336060e-01 4.2210999876260757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 999 -1.0780979692935944e-01</internalNodes>\n          <leafValues>\n            -3.7486588954925537e-01 4.2833440005779266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1000 1.4364200178533792e-03</internalNodes>\n          <leafValues>\n            8.0476358532905579e-02 -1.7263789474964142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1001 6.8289190530776978e-02</internalNodes>\n          <leafValues>\n            -3.5595789551734924e-02 4.0761318802833557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1002 -6.8037179298698902e-03</internalNodes>\n          <leafValues>\n            1.9233790040016174e-01 -8.2368023693561554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1003 -5.6193489581346512e-04</internalNodes>\n          <leafValues>\n            1.3057120144367218e-01 -1.4355149865150452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1004 -5.8276649564504623e-02</internalNodes>\n          <leafValues>\n            -3.0125439167022705e-01 5.2819650620222092e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1005 -6.1205718666315079e-03</internalNodes>\n          <leafValues>\n            2.2043900191783905e-01 -7.5691752135753632e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1006 -1.3594309799373150e-02</internalNodes>\n          <leafValues>\n            -3.9049360156059265e-01 4.1857108473777771e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1007 1.3626200379803777e-03</internalNodes>\n          <leafValues>\n            -9.5363423228263855e-02 1.4970320463180542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1008 -1.5074219845701009e-04</internalNodes>\n          <leafValues>\n            -2.3945580422878265e-01 6.4798332750797272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1009 -7.7414259314537048e-02</internalNodes>\n          <leafValues>\n            5.5941981077194214e-01 -2.4516880512237549e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1010 9.2117872554808855e-04</internalNodes>\n          <leafValues>\n            5.4928861558437347e-02 -2.7934810519218445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1011 1.0250780032947659e-03</internalNodes>\n          <leafValues>\n            -6.2167309224605560e-02 2.4976369738578796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1012 -8.1174750812351704e-04</internalNodes>\n          <leafValues>\n            2.3437939584255219e-01 -6.5725810825824738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1013 8.3431020379066467e-02</internalNodes>\n          <leafValues>\n            5.0954800099134445e-02 -3.1020981073379517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1014 -9.2014456167817116e-03</internalNodes>\n          <leafValues>\n            -3.9242538809776306e-01 3.2926950603723526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1015 -2.9086650465615094e-04</internalNodes>\n          <leafValues>\n            -3.1039750576019287e-01 4.9711819738149643e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1016 7.7576898038387299e-03</internalNodes>\n          <leafValues>\n            -4.4040750712156296e-02 3.6431351304054260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1017 -1.2466090172529221e-01</internalNodes>\n          <leafValues>\n            -8.1957077980041504e-01 1.9150640815496445e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1018 1.3242550194263458e-02</internalNodes>\n          <leafValues>\n            3.8988839834928513e-02 -3.3230680227279663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1019 -6.6770128905773163e-03</internalNodes>\n          <leafValues>\n            -3.5790139436721802e-01 4.0460210293531418e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1020 -2.7479929849505424e-03</internalNodes>\n          <leafValues>\n            2.5253900885581970e-01 -5.6427821516990662e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1021 8.2659651525318623e-04</internalNodes>\n          <leafValues>\n            -7.1988657116889954e-02 2.2780479490756989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1022 -5.0153400748968124e-02</internalNodes>\n          <leafValues>\n            -6.3036471605300903e-01 2.7462050318717957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1023 7.4203149415552616e-03</internalNodes>\n          <leafValues>\n            -6.6610716283321381e-02 2.7787339687347412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1024 -6.7951780511066318e-04</internalNodes>\n          <leafValues>\n            -3.6327061057090759e-01 4.2795430868864059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1025 -1.9305750029161572e-03</internalNodes>\n          <leafValues>\n            1.4196230471134186e-01 -1.0759980231523514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1026 -3.8132671033963561e-04</internalNodes>\n          <leafValues>\n            2.1591760218143463e-01 -7.0202663540840149e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1027 -7.0990346372127533e-02</internalNodes>\n          <leafValues>\n            4.5266601443290710e-01 -4.0750481188297272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1028 -5.3368080407381058e-02</internalNodes>\n          <leafValues>\n            -6.7674058675765991e-01 1.9288340583443642e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1029 -2.0064849406480789e-02</internalNodes>\n          <leafValues>\n            -4.3365430831909180e-01 3.1853288412094116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1030 1.1976360110566020e-03</internalNodes>\n          <leafValues>\n            -2.6559870690107346e-02 5.0797182321548462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1031 -2.2697300300933421e-04</internalNodes>\n          <leafValues>\n            1.8012599647045135e-01 -8.3606548607349396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1032 1.5262699685990810e-02</internalNodes>\n          <leafValues>\n            -2.0238929986953735e-01 6.7422017455101013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1033 -2.0811769366264343e-01</internalNodes>\n          <leafValues>\n            6.6943860054016113e-01 -2.2452110424637794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1034 1.5514369588345289e-03</internalNodes>\n          <leafValues>\n            -7.5121842324733734e-02 1.7326919734477997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1035 -5.2924010902643204e-02</internalNodes>\n          <leafValues>\n            2.4992519617080688e-01 -6.2879167497158051e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1036 -2.1648850291967392e-02</internalNodes>\n          <leafValues>\n            -2.9194280505180359e-01 5.2614491432905197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1037 -2.2905069636180997e-04</internalNodes>\n          <leafValues>\n            -2.2117300331592560e-01 6.3168339431285858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1038 5.0170070608146489e-05</internalNodes>\n          <leafValues>\n            -1.1510709673166275e-01 1.1611440032720566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1039 -1.6416069411206990e-04</internalNodes>\n          <leafValues>\n            1.5871520340442657e-01 -8.2600601017475128e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1040 -1.2003289535641670e-02</internalNodes>\n          <leafValues>\n            1.2218090146780014e-01 -1.1229699850082397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1041 -1.7784100025892258e-02</internalNodes>\n          <leafValues>\n            -3.5072788596153259e-01 3.1341921538114548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1042 -6.3457582145929337e-03</internalNodes>\n          <leafValues>\n            1.3078069686889648e-01 -1.0574410110712051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1043 -7.9523242311552167e-04</internalNodes>\n          <leafValues>\n            1.7204670608043671e-01 -8.6001992225646973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1044 -3.1029590172693133e-04</internalNodes>\n          <leafValues>\n            -2.8433170914649963e-01 5.1817119121551514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1045 -1.7053710296750069e-02</internalNodes>\n          <leafValues>\n            3.9242428541183472e-01 -4.0143270045518875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1046 4.6504959464073181e-03</internalNodes>\n          <leafValues>\n            -3.1837560236454010e-02 4.1237699985504150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1047 -1.0358760133385658e-02</internalNodes>\n          <leafValues>\n            -5.6993198394775391e-01 2.9248379170894623e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1048 -2.2196240723133087e-02</internalNodes>\n          <leafValues>\n            -4.5605289936065674e-01 2.6285989210009575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1049 -7.0536029525101185e-03</internalNodes>\n          <leafValues>\n            1.5998320281505585e-01 -9.1594859957695007e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1050 -5.7094299700111151e-04</internalNodes>\n          <leafValues>\n            -1.4076329767704010e-01 1.0287419706583023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1051 -2.2152599412947893e-03</internalNodes>\n          <leafValues>\n            1.6593599319458008e-01 -8.5273988544940948e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1052 -2.8084890916943550e-02</internalNodes>\n          <leafValues>\n            2.7022340893745422e-01 -5.5873811244964600e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1053 2.1515151020139456e-03</internalNodes>\n          <leafValues>\n            4.2472891509532928e-02 -3.2005849480628967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1054 -2.9733829433098435e-04</internalNodes>\n          <leafValues>\n            1.6177169978618622e-01 -8.5115589201450348e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1055 -1.6694780439138412e-02</internalNodes>\n          <leafValues>\n            -4.2858770489692688e-01 3.0541609972715378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1056 1.1982990056276321e-01</internalNodes>\n          <leafValues>\n            -1.6277290880680084e-02 7.9846781492233276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1057 -3.5499420482665300e-04</internalNodes>\n          <leafValues>\n            1.5935939550399780e-01 -8.3272881805896759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1058 -1.8226269632577896e-02</internalNodes>\n          <leafValues>\n            1.9527280330657959e-01 -7.3939889669418335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1059 -4.0238600922748446e-04</internalNodes>\n          <leafValues>\n            7.9101808369159698e-02 -2.0806129276752472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1060 4.0892060496844351e-04</internalNodes>\n          <leafValues>\n            1.0036630183458328e-01 -1.5128210186958313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1061 9.5368112670257688e-04</internalNodes>\n          <leafValues>\n            -7.3011666536331177e-02 2.1752020716667175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1062 4.3081799149513245e-01</internalNodes>\n          <leafValues>\n            -2.7450699359178543e-02 5.7061582803726196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1063 5.3564831614494324e-04</internalNodes>\n          <leafValues>\n            1.1587540060281754e-01 -1.2790560722351074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1064 2.4430730263702571e-05</internalNodes>\n          <leafValues>\n            -1.6816629469394684e-01 8.0449983477592468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1065 -5.5345650762319565e-02</internalNodes>\n          <leafValues>\n            4.5338949561119080e-01 -3.1222779303789139e-02</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          0 8 20 12 -1.</_>\n        <_>\n          0 14 20 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 15 -1.</_>\n        <_>\n          9 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 2 -1.</_>\n        <_>\n          9 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 9 -1.</_>\n        <_>\n          7 3 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 2 18 -1.</_>\n        <_>\n          12 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 6 -1.</_>\n        <_>\n          8 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 17 18 -1.</_>\n        <_>\n          2 6 17 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 1 8 -1.</_>\n        <_>\n          10 14 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 9 2 -1.</_>\n        <_>\n          10 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 6 -1.</_>\n        <_>\n          5 3 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 15 9 -1.</_>\n        <_>\n          3 4 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 9 6 -1.</_>\n        <_>\n          6 5 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 6 3 -1.</_>\n        <_>\n          10 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 9 1 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 11 -1.</_>\n        <_>\n          3 7 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 1 -1.</_>\n        <_>\n          10 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 2 -1.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 3 -1.</_>\n        <_>\n          11 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 5 18 -1.</_>\n        <_>\n          8 6 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 7 -1.</_>\n        <_>\n          9 7 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 10 -1.</_>\n        <_>\n          16 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 9 5 -1.</_>\n        <_>\n          12 8 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 9 6 -1.</_>\n        <_>\n          6 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 6 -1.</_>\n        <_>\n          3 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 18 -1.</_>\n        <_>\n          16 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 3 3 -1.</_>\n        <_>\n          0 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 1 -1.</_>\n        <_>\n          17 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 12 -1.</_>\n        <_>\n          0 14 20 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 8 -1.</_>\n        <_>\n          9 6 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 9 -1.</_>\n        <_>\n          5 6 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 1 2 -1.</_>\n        <_>\n          4 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 1 -1.</_>\n        <_>\n          19 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 5 -1.</_>\n        <_>\n          11 8 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 6 -1.</_>\n        <_>\n          8 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 7 -1.</_>\n        <_>\n          13 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 14 1 2 -1.</_>\n        <_>\n          19 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 1 2 -1.</_>\n        <_>\n          6 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 2 7 -1.</_>\n        <_>\n          15 7 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 4 -1.</_>\n        <_>\n          7 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 6 -1.</_>\n        <_>\n          5 10 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 1 3 -1.</_>\n        <_>\n          2 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 6 -1.</_>\n        <_>\n          7 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 12 -1.</_>\n        <_>\n          9 7 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 11 12 -1.</_>\n        <_>\n          6 6 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 5 8 -1.</_>\n        <_>\n          1 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 7 -1.</_>\n        <_>\n          16 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 6 -1.</_>\n        <_>\n          12 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 4 2 -1.</_>\n        <_>\n          16 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 3 -1.</_>\n        <_>\n          18 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 7 -1.</_>\n        <_>\n          10 7 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 8 -1.</_>\n        <_>\n          7 6 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 6 11 -1.</_>\n        <_>\n          4 6 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 12 8 -1.</_>\n        <_>\n          8 14 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 6 3 -1.</_>\n        <_>\n          9 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 3 3 -1.</_>\n        <_>\n          11 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 6 -1.</_>\n        <_>\n          9 8 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 5 -1.</_>\n        <_>\n          9 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 1 3 -1.</_>\n        <_>\n          6 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          0 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 11 9 -1.</_>\n        <_>\n          4 4 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 9 -1.</_>\n        <_>\n          3 4 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 4 -1.</_>\n        <_>\n          2 9 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 13 1 2 -1.</_>\n        <_>\n          18 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 3 11 -1.</_>\n        <_>\n          14 5 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 8 2 -1.</_>\n        <_>\n          0 18 4 1 2.</_>\n        <_>\n          4 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 5 -1.</_>\n        <_>\n          9 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 11 10 -1.</_>\n        <_>\n          4 12 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 4 -1.</_>\n        <_>\n          16 9 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 8 -1.</_>\n        <_>\n          3 7 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 3 3 -1.</_>\n        <_>\n          0 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 12 1 -1.</_>\n        <_>\n          11 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 9 4 -1.</_>\n        <_>\n          7 8 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 6 4 -1.</_>\n        <_>\n          7 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 10 -1.</_>\n        <_>\n          4 9 2 5 2.</_>\n        <_>\n          6 14 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 4 -1.</_>\n        <_>\n          6 8 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 2 18 -1.</_>\n        <_>\n          10 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 6 -1.</_>\n        <_>\n          0 5 4 3 2.</_>\n        <_>\n          4 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 5 -1.</_>\n        <_>\n          8 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 14 -1.</_>\n        <_>\n          18 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 4 2 -1.</_>\n        <_>\n          10 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 6 3 -1.</_>\n        <_>\n          1 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 5 -1.</_>\n        <_>\n          12 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 4 -1.</_>\n        <_>\n          12 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 5 -1.</_>\n        <_>\n          13 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 7 -1.</_>\n        <_>\n          3 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 1 3 -1.</_>\n        <_>\n          0 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 9 6 -1.</_>\n        <_>\n          3 4 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 9 2 -1.</_>\n        <_>\n          8 7 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 3 6 -1.</_>\n        <_>\n          0 16 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 4 -1.</_>\n        <_>\n          3 11 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 3 -1.</_>\n        <_>\n          9 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 6 -1.</_>\n        <_>\n          6 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 6 -1.</_>\n        <_>\n          8 7 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 2 1 -1.</_>\n        <_>\n          2 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 2 -1.</_>\n        <_>\n          12 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 6 -1.</_>\n        <_>\n          15 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 6 4 -1.</_>\n        <_>\n          8 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 9 -1.</_>\n        <_>\n          8 3 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 3 -1.</_>\n        <_>\n          8 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 2 -1.</_>\n        <_>\n          9 14 1 1 2.</_>\n        <_>\n          10 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 2 -1.</_>\n        <_>\n          9 14 1 1 2.</_>\n        <_>\n          10 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 19 12 -1.</_>\n        <_>\n          0 14 19 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 14 -1.</_>\n        <_>\n          10 6 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 4 -1.</_>\n        <_>\n          14 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 1 3 -1.</_>\n        <_>\n          4 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 3 -1.</_>\n        <_>\n          6 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 5 2 -1.</_>\n        <_>\n          2 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 2 -1.</_>\n        <_>\n          7 8 1 1 2.</_>\n        <_>\n          8 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 2 -1.</_>\n        <_>\n          7 8 1 1 2.</_>\n        <_>\n          8 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 13 2 -1.</_>\n        <_>\n          5 11 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 1 9 -1.</_>\n        <_>\n          10 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 2 12 -1.</_>\n        <_>\n          15 8 1 6 2.</_>\n        <_>\n          16 14 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 5 -1.</_>\n        <_>\n          5 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 7 -1.</_>\n        <_>\n          13 6 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 4 -1.</_>\n        <_>\n          9 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 1 -1.</_>\n        <_>\n          10 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 2 -1.</_>\n        <_>\n          9 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 15 14 -1.</_>\n        <_>\n          0 13 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 5 6 -1.</_>\n        <_>\n          9 3 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 3 4 -1.</_>\n        <_>\n          4 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 6 -1.</_>\n        <_>\n          6 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 1 2 -1.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 12 -1.</_>\n        <_>\n          11 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 1 -1.</_>\n        <_>\n          8 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 9 3 -1.</_>\n        <_>\n          10 17 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 6 2 -1.</_>\n        <_>\n          14 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 14 -1.</_>\n        <_>\n          10 5 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 9 4 -1.</_>\n        <_>\n          11 16 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 14 -1.</_>\n        <_>\n          0 7 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 3 -1.</_>\n        <_>\n          10 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 4 -1.</_>\n        <_>\n          7 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 4 -1.</_>\n        <_>\n          5 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 5 -1.</_>\n        <_>\n          7 1 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 1 2 -1.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 6 -1.</_>\n        <_>\n          7 2 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          0 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 8 12 -1.</_>\n        <_>\n          12 7 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 4 -1.</_>\n        <_>\n          13 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 5 -1.</_>\n        <_>\n          13 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 1 -1.</_>\n        <_>\n          17 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 1 3 -1.</_>\n        <_>\n          5 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 6 -1.</_>\n        <_>\n          10 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 2 3 -1.</_>\n        <_>\n          4 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 1 9 -1.</_>\n        <_>\n          12 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 9 -1.</_>\n        <_>\n          8 6 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 13 3 6 -1.</_>\n        <_>\n          17 15 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 8 -1.</_>\n        <_>\n          8 7 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 5 -1.</_>\n        <_>\n          6 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 8 -1.</_>\n        <_>\n          7 6 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 3 3 -1.</_>\n        <_>\n          3 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 4 2 -1.</_>\n        <_>\n          16 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 10 3 10 -1.</_>\n        <_>\n          17 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 4 -1.</_>\n        <_>\n          10 9 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 12 -1.</_>\n        <_>\n          5 6 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 3 -1.</_>\n        <_>\n          8 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 7 -1.</_>\n        <_>\n          12 7 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 4 -1.</_>\n        <_>\n          14 8 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 5 -1.</_>\n        <_>\n          16 8 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 4 -1.</_>\n        <_>\n          12 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 1 2 -1.</_>\n        <_>\n          3 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 4 -1.</_>\n        <_>\n          13 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 6 -1.</_>\n        <_>\n          12 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 3 8 -1.</_>\n        <_>\n          11 6 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 3 -1.</_>\n        <_>\n          16 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 1 2 -1.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 9 -1.</_>\n        <_>\n          5 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 9 1 -1.</_>\n        <_>\n          7 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 4 9 -1.</_>\n        <_>\n          0 14 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 3 -1.</_>\n        <_>\n          11 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 12 -1.</_>\n        <_>\n          9 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 4 -1.</_>\n        <_>\n          7 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 1 3 -1.</_>\n        <_>\n          3 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 4 -1.</_>\n        <_>\n          13 9 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 2 -1.</_>\n        <_>\n          7 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 1 -1.</_>\n        <_>\n          2 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 14 -1.</_>\n        <_>\n          1 0 1 7 2.</_>\n        <_>\n          2 7 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 11 8 -1.</_>\n        <_>\n          5 9 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 6 -1.</_>\n        <_>\n          9 5 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 5 10 -1.</_>\n        <_>\n          7 14 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 2 -1.</_>\n        <_>\n          16 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 8 2 -1.</_>\n        <_>\n          0 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 1 3 -1.</_>\n        <_>\n          7 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 11 6 -1.</_>\n        <_>\n          7 4 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 9 3 -1.</_>\n        <_>\n          8 4 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 2 2 -1.</_>\n        <_>\n          0 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 6 -1.</_>\n        <_>\n          0 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 2 -1.</_>\n        <_>\n          6 7 1 1 2.</_>\n        <_>\n          7 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 6 -1.</_>\n        <_>\n          8 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 4 -1.</_>\n        <_>\n          14 1 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 8 -1.</_>\n        <_>\n          11 11 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 15 3 3 -1.</_>\n        <_>\n          17 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 3 9 -1.</_>\n        <_>\n          6 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 6 -1.</_>\n        <_>\n          0 5 4 3 2.</_>\n        <_>\n          4 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 1 3 -1.</_>\n        <_>\n          0 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 6 -1.</_>\n        <_>\n          18 0 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 6 3 -1.</_>\n        <_>\n          12 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 2 2 -1.</_>\n        <_>\n          13 15 1 1 2.</_>\n        <_>\n          14 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 3 -1.</_>\n        <_>\n          4 1 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 9 -1.</_>\n        <_>\n          5 6 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 7 -1.</_>\n        <_>\n          10 7 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 9 6 -1.</_>\n        <_>\n          8 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 6 2 -1.</_>\n        <_>\n          0 17 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 7 14 -1.</_>\n        <_>\n          12 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 8 -1.</_>\n        <_>\n          15 7 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 3 -1.</_>\n        <_>\n          4 10 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 2 -1.</_>\n        <_>\n          7 2 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 4 -1.</_>\n        <_>\n          6 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 6 2 -1.</_>\n        <_>\n          10 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 5 2 -1.</_>\n        <_>\n          7 7 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 6 -1.</_>\n        <_>\n          7 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 1 2.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 7 -1.</_>\n        <_>\n          17 8 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 3 -1.</_>\n        <_>\n          0 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 19 6 1 -1.</_>\n        <_>\n          7 19 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          9 7 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 2 4 -1.</_>\n        <_>\n          0 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 3 -1.</_>\n        <_>\n          2 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 9 -1.</_>\n        <_>\n          3 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 2 -1.</_>\n        <_>\n          11 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 1 -1.</_>\n        <_>\n          15 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 1 4 -1.</_>\n        <_>\n          0 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 2 -1.</_>\n        <_>\n          15 6 1 1 2.</_>\n        <_>\n          16 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 6 -1.</_>\n        <_>\n          8 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 17 1 3 -1.</_>\n        <_>\n          19 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 1 -1.</_>\n        <_>\n          8 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 6 -1.</_>\n        <_>\n          14 1 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 2 1 -1.</_>\n        <_>\n          16 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 7 4 -1.</_>\n        <_>\n          8 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 15 -1.</_>\n        <_>\n          4 5 14 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 6 -1.</_>\n        <_>\n          9 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 1 3 -1.</_>\n        <_>\n          11 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 2 4 -1.</_>\n        <_>\n          12 16 1 2 2.</_>\n        <_>\n          13 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 1 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 3 -1.</_>\n        <_>\n          12 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 8 -1.</_>\n        <_>\n          4 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 6 -1.</_>\n        <_>\n          3 5 3 3 2.</_>\n        <_>\n          6 8 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 3 -1.</_>\n        <_>\n          11 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 4 2 -1.</_>\n        <_>\n          5 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 5 2 -1.</_>\n        <_>\n          8 17 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 3 -1.</_>\n        <_>\n          0 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 2 -1.</_>\n        <_>\n          8 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 9 3 -1.</_>\n        <_>\n          7 4 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 1 4 -1.</_>\n        <_>\n          0 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 8 3 -1.</_>\n        <_>\n          0 18 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 11 6 -1.</_>\n        <_>\n          6 3 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 2 -1.</_>\n        <_>\n          6 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 1 12 -1.</_>\n        <_>\n          10 14 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 4 -1.</_>\n        <_>\n          6 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 1 3 -1.</_>\n        <_>\n          0 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 1 3 -1.</_>\n        <_>\n          0 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 4 -1.</_>\n        <_>\n          14 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 5 4 -1.</_>\n        <_>\n          1 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 1 2 -1.</_>\n        <_>\n          18 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 2 4 -1.</_>\n        <_>\n          14 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 8 -1.</_>\n        <_>\n          12 6 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 10 -1.</_>\n        <_>\n          10 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 1 3 -1.</_>\n        <_>\n          17 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 2 10 -1.</_>\n        <_>\n          2 7 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 3 -1.</_>\n        <_>\n          7 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 12 -1.</_>\n        <_>\n          0 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 1 3 -1.</_>\n        <_>\n          0 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 6 4 -1.</_>\n        <_>\n          8 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 6 -1.</_>\n        <_>\n          0 8 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 2 1 -1.</_>\n        <_>\n          12 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 9 2 -1.</_>\n        <_>\n          5 2 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 2 -1.</_>\n        <_>\n          0 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 3 -1.</_>\n        <_>\n          16 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 1 3 -1.</_>\n        <_>\n          18 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 1 -1.</_>\n        <_>\n          13 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 4 -1.</_>\n        <_>\n          3 3 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 1 18 -1.</_>\n        <_>\n          11 8 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 5 12 -1.</_>\n        <_>\n          9 5 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 1 -1.</_>\n        <_>\n          16 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 10 -1.</_>\n        <_>\n          9 6 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 1 6 -1.</_>\n        <_>\n          19 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 2 -1.</_>\n        <_>\n          18 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 4 -1.</_>\n        <_>\n          8 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 5 -1.</_>\n        <_>\n          7 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 7 3 -1.</_>\n        <_>\n          0 4 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 1 -1.</_>\n        <_>\n          2 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 10 -1.</_>\n        <_>\n          4 8 1 5 2.</_>\n        <_>\n          5 13 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 18 2 -1.</_>\n        <_>\n          2 18 9 1 2.</_>\n        <_>\n          11 19 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 4 4 -1.</_>\n        <_>\n          2 7 2 2 2.</_>\n        <_>\n          4 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 4 -1.</_>\n        <_>\n          18 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 2 8 -1.</_>\n        <_>\n          16 9 1 4 2.</_>\n        <_>\n          17 13 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 1 6 -1.</_>\n        <_>\n          15 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 2 -1.</_>\n        <_>\n          14 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 3 -1.</_>\n        <_>\n          17 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 3 -1.</_>\n        <_>\n          10 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 6 -1.</_>\n        <_>\n          4 2 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 6 -1.</_>\n        <_>\n          7 16 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 2 -1.</_>\n        <_>\n          11 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 4 -1.</_>\n        <_>\n          10 1 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 7 -1.</_>\n        <_>\n          10 7 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 2 2 -1.</_>\n        <_>\n          6 17 1 1 2.</_>\n        <_>\n          7 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 9 -1.</_>\n        <_>\n          5 6 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 19 10 -1.</_>\n        <_>\n          0 15 19 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 6 1 -1.</_>\n        <_>\n          7 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 3 -1.</_>\n        <_>\n          3 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 5 -1.</_>\n        <_>\n          8 5 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 6 4 -1.</_>\n        <_>\n          1 17 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 6 -1.</_>\n        <_>\n          16 10 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 4 3 -1.</_>\n        <_>\n          0 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 11 -1.</_>\n        <_>\n          3 7 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 7 2 -1.</_>\n        <_>\n          13 18 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 2 3 -1.</_>\n        <_>\n          0 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 2 -1.</_>\n        <_>\n          3 0 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 3 -1.</_>\n        <_>\n          3 1 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 6 -1.</_>\n        <_>\n          0 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 14 -1.</_>\n        <_>\n          1 2 3 7 2.</_>\n        <_>\n          4 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 2 2 -1.</_>\n        <_>\n          17 5 1 1 2.</_>\n        <_>\n          18 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 9 4 -1.</_>\n        <_>\n          14 10 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 4 -1.</_>\n        <_>\n          6 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 12 2 -1.</_>\n        <_>\n          11 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 1 2 -1.</_>\n        <_>\n          2 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 3 -1.</_>\n        <_>\n          16 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 16 1 3 -1.</_>\n        <_>\n          19 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 11 1 2 -1.</_>\n        <_>\n          18 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 8 2 -1.</_>\n        <_>\n          12 7 4 1 2.</_>\n        <_>\n          16 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 2 4 -1.</_>\n        <_>\n          15 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 4 -1.</_>\n        <_>\n          14 2 3 2 2.</_>\n        <_>\n          17 4 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 1 -1.</_>\n        <_>\n          17 0 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 1 -1.</_>\n        <_>\n          4 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 1 -1.</_>\n        <_>\n          18 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 2 -1.</_>\n        <_>\n          7 16 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 8 1 -1.</_>\n        <_>\n          6 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 4 3 -1.</_>\n        <_>\n          1 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 13 1 2 -1.</_>\n        <_>\n          19 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 10 4 -1.</_>\n        <_>\n          9 16 5 2 2.</_>\n        <_>\n          14 18 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 2 4 -1.</_>\n        <_>\n          12 9 1 2 2.</_>\n        <_>\n          13 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 11 1 9 -1.</_>\n        <_>\n          19 14 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 14 -1.</_>\n        <_>\n          6 13 14 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 4 2 -1.</_>\n        <_>\n          2 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 3 -1.</_>\n        <_>\n          0 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 1 3 -1.</_>\n        <_>\n          0 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 4 4 -1.</_>\n        <_>\n          15 17 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 7 -1.</_>\n        <_>\n          8 5 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 5 3 -1.</_>\n        <_>\n          1 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 3 -1.</_>\n        <_>\n          0 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 6 -1.</_>\n        <_>\n          1 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 4 3 -1.</_>\n        <_>\n          16 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 0 5 3 2.</_>\n        <_>\n          5 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 3 6 -1.</_>\n        <_>\n          3 2 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 10 -1.</_>\n        <_>\n          3 0 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 2 -1.</_>\n        <_>\n          5 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 4 4 -1.</_>\n        <_>\n          12 8 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 7 3 -1.</_>\n        <_>\n          13 6 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 1 2 -1.</_>\n        <_>\n          10 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 4 2 -1.</_>\n        <_>\n          18 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 7 -1.</_>\n        <_>\n          18 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 3 -1.</_>\n        <_>\n          16 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 9 1 3 -1.</_>\n        <_>\n          19 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 6 -1.</_>\n        <_>\n          19 7 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 4 -1.</_>\n        <_>\n          9 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 10 2 -1.</_>\n        <_>\n          9 2 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 8 4 -1.</_>\n        <_>\n          2 12 4 2 2.</_>\n        <_>\n          6 14 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 3 -1.</_>\n        <_>\n          0 5 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 3 3 -1.</_>\n        <_>\n          15 14 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 3 -1.</_>\n        <_>\n          2 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 7 -1.</_>\n        <_>\n          2 0 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 4 4 -1.</_>\n        <_>\n          15 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 4 -1.</_>\n        <_>\n          5 10 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 1 2 -1.</_>\n        <_>\n          3 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 4 -1.</_>\n        <_>\n          7 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 4 -1.</_>\n        <_>\n          7 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 9 12 -1.</_>\n        <_>\n          9 8 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 6 -1.</_>\n        <_>\n          8 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 3 -1.</_>\n        <_>\n          17 2 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 1 3 -1.</_>\n        <_>\n          0 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 2 -1.</_>\n        <_>\n          15 0 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 2 -1.</_>\n        <_>\n          12 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 10 1 -1.</_>\n        <_>\n          8 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 16 -1.</_>\n        <_>\n          0 12 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 1 3 -1.</_>\n        <_>\n          2 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 12 6 -1.</_>\n        <_>\n          11 8 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 7 -1.</_>\n        <_>\n          16 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 6 1 -1.</_>\n        <_>\n          14 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 1 -1.</_>\n        <_>\n          17 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 8 2 -1.</_>\n        <_>\n          0 17 4 1 2.</_>\n        <_>\n          4 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 1 -1.</_>\n        <_>\n          18 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 5 -1.</_>\n        <_>\n          6 15 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 2 -1.</_>\n        <_>\n          7 3 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 8 4 -1.</_>\n        <_>\n          4 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 19 2 1 -1.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 19 2 1 -1.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 3 -1.</_>\n        <_>\n          16 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 2 3 -1.</_>\n        <_>\n          1 11 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 4 1 -1.</_>\n        <_>\n          2 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          2 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 1 3 -1.</_>\n        <_>\n          2 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 11 2 -1.</_>\n        <_>\n          5 8 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 10 -1.</_>\n        <_>\n          9 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 3 -1.</_>\n        <_>\n          0 3 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 19 10 1 -1.</_>\n        <_>\n          15 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 8 3 -1.</_>\n        <_>\n          15 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 19 3 1 -1.</_>\n        <_>\n          9 19 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 4 -1.</_>\n        <_>\n          15 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 3 -1.</_>\n        <_>\n          10 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 3 2 -1.</_>\n        <_>\n          0 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 3 6 -1.</_>\n        <_>\n          7 14 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 1 2 -1.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 4 4 -1.</_>\n        <_>\n          2 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 7 -1.</_>\n        <_>\n          3 8 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 5 -1.</_>\n        <_>\n          2 8 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 16 1 3 -1.</_>\n        <_>\n          19 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 6 -1.</_>\n        <_>\n          7 5 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 4 2 -1.</_>\n        <_>\n          2 16 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 11 -1.</_>\n        <_>\n          19 6 1 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 2 6 -1.</_>\n        <_>\n          0 14 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 2 -1.</_>\n        <_>\n          12 6 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 2 3 -1.</_>\n        <_>\n          1 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 4 4 -1.</_>\n        <_>\n          16 16 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 5 -1.</_>\n        <_>\n          10 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 7 -1.</_>\n        <_>\n          14 7 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 2 6 -1.</_>\n        <_>\n          2 8 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 7 -1.</_>\n        <_>\n          16 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 2 -1.</_>\n        <_>\n          6 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 9 -1.</_>\n        <_>\n          0 12 20 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 2 -1.</_>\n        <_>\n          10 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 10 4 -1.</_>\n        <_>\n          6 7 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 5 9 -1.</_>\n        <_>\n          6 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 2 4 -1.</_>\n        <_>\n          0 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 5 -1.</_>\n        <_>\n          11 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 7 -1.</_>\n        <_>\n          7 7 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 4 -1.</_>\n        <_>\n          3 0 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 8 -1.</_>\n        <_>\n          2 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 3 -1.</_>\n        <_>\n          0 1 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 4 -1.</_>\n        <_>\n          5 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 9 1 -1.</_>\n        <_>\n          5 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 1 3 -1.</_>\n        <_>\n          1 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 2 3 -1.</_>\n        <_>\n          0 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 16 3 -1.</_>\n        <_>\n          8 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 1 -1.</_>\n        <_>\n          2 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 20 -1.</_>\n        <_>\n          3 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 4 6 -1.</_>\n        <_>\n          2 5 2 3 2.</_>\n        <_>\n          4 8 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 3 -1.</_>\n        <_>\n          11 16 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 6 1 -1.</_>\n        <_>\n          14 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 15 2 -1.</_>\n        <_>\n          8 17 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 3 -1.</_>\n        <_>\n          18 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 4 -1.</_>\n        <_>\n          13 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 4 4 -1.</_>\n        <_>\n          13 6 2 2 2.</_>\n        <_>\n          15 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 4 -1.</_>\n        <_>\n          17 8 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 2 2 -1.</_>\n        <_>\n          15 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 3 -1.</_>\n        <_>\n          17 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 8 1 -1.</_>\n        <_>\n          7 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 3 6 -1.</_>\n        <_>\n          0 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 5 -1.</_>\n        <_>\n          9 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 5 -1.</_>\n        <_>\n          9 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 2 -1.</_>\n        <_>\n          10 1 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 2 -1.</_>\n        <_>\n          10 0 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 3 -1.</_>\n        <_>\n          12 0 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 6 -1.</_>\n        <_>\n          5 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 4 -1.</_>\n        <_>\n          8 5 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 2 3 -1.</_>\n        <_>\n          17 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 3 -1.</_>\n        <_>\n          5 3 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 6 -1.</_>\n        <_>\n          6 9 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 6 -1.</_>\n        <_>\n          15 10 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 3 -1.</_>\n        <_>\n          7 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 8 2 -1.</_>\n        <_>\n          12 4 4 1 2.</_>\n        <_>\n          16 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 1 6 -1.</_>\n        <_>\n          15 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 11 3 -1.</_>\n        <_>\n          4 18 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 20 -1.</_>\n        <_>\n          3 10 16 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 6 -1.</_>\n        <_>\n          12 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 6 -1.</_>\n        <_>\n          13 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 4 -1.</_>\n        <_>\n          13 1 3 2 2.</_>\n        <_>\n          16 3 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 4 -1.</_>\n        <_>\n          13 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 4 -1.</_>\n        <_>\n          8 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 14 2 -1.</_>\n        <_>\n          0 17 7 1 2.</_>\n        <_>\n          7 18 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 2 2 -1.</_>\n        <_>\n          6 18 1 1 2.</_>\n        <_>\n          7 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 2 2 -1.</_>\n        <_>\n          17 18 1 1 2.</_>\n        <_>\n          18 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 1 9 -1.</_>\n        <_>\n          5 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 4 -1.</_>\n        <_>\n          7 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 2 -1.</_>\n        <_>\n          1 9 3 1 2.</_>\n        <_>\n          4 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 3 -1.</_>\n        <_>\n          7 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 12 -1.</_>\n        <_>\n          8 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 2 2 -1.</_>\n        <_>\n          4 18 1 1 2.</_>\n        <_>\n          5 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 6 -1.</_>\n        <_>\n          9 3 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 6 2 -1.</_>\n        <_>\n          6 18 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 16 2 -1.</_>\n        <_>\n          3 19 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 11 -1.</_>\n        <_>\n          4 0 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 3 1 -1.</_>\n        <_>\n          14 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 6 -1.</_>\n        <_>\n          6 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 4 -1.</_>\n        <_>\n          1 2 6 2 2.</_>\n        <_>\n          7 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 4 -1.</_>\n        <_>\n          5 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 1 -1.</_>\n        <_>\n          16 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 2 -1.</_>\n        <_>\n          11 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 1 -1.</_>\n        <_>\n          9 3 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 2 -1.</_>\n        <_>\n          2 7 3 1 2.</_>\n        <_>\n          5 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 6 -1.</_>\n        <_>\n          0 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 7 -1.</_>\n        <_>\n          10 6 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 13 -1.</_>\n        <_>\n          11 6 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 6 1 -1.</_>\n        <_>\n          13 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 6 -1.</_>\n        <_>\n          18 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 9 -1.</_>\n        <_>\n          18 2 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 4 6 -1.</_>\n        <_>\n          13 8 2 3 2.</_>\n        <_>\n          15 11 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 6 -1.</_>\n        <_>\n          10 2 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 16 6 -1.</_>\n        <_>\n          12 14 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 19 10 1 -1.</_>\n        <_>\n          11 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 1 3 -1.</_>\n        <_>\n          6 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 10 3 -1.</_>\n        <_>\n          4 15 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 12 -1.</_>\n        <_>\n          6 4 12 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 2 -1.</_>\n        <_>\n          5 7 2 1 2.</_>\n        <_>\n          7 8 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 2 -1.</_>\n        <_>\n          18 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 6 3 -1.</_>\n        <_>\n          8 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 5 3 -1.</_>\n        <_>\n          8 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 1 18 -1.</_>\n        <_>\n          13 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 2 -1.</_>\n        <_>\n          9 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 7 4 -1.</_>\n        <_>\n          11 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 8 -1.</_>\n        <_>\n          3 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 3 -1.</_>\n        <_>\n          9 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 9 3 -1.</_>\n        <_>\n          9 18 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 3 3 -1.</_>\n        <_>\n          12 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 5 -1.</_>\n        <_>\n          5 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 3 -1.</_>\n        <_>\n          10 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 2 -1.</_>\n        <_>\n          18 17 1 1 2.</_>\n        <_>\n          19 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 1 2.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 1 2.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 9 1 -1.</_>\n        <_>\n          7 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 5 -1.</_>\n        <_>\n          5 9 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 1 12 -1.</_>\n        <_>\n          18 14 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 6 -1.</_>\n        <_>\n          0 2 4 3 2.</_>\n        <_>\n          4 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 3 -1.</_>\n        <_>\n          9 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 2 2 -1.</_>\n        <_>\n          3 18 1 1 2.</_>\n        <_>\n          4 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 3 -1.</_>\n        <_>\n          6 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 2 -1.</_>\n        <_>\n          16 7 2 1 2.</_>\n        <_>\n          18 8 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 1 3 -1.</_>\n        <_>\n          5 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 20 -1.</_>\n        <_>\n          2 10 15 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 4 -1.</_>\n        <_>\n          8 11 3 2 2.</_>\n        <_>\n          11 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 4 3 -1.</_>\n        <_>\n          8 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 2 2 -1.</_>\n        <_>\n          8 18 1 1 2.</_>\n        <_>\n          9 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 13 3 -1.</_>\n        <_>\n          2 17 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          16 16 1 1 2.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 3 -1.</_>\n        <_>\n          10 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 1 1 2.</_>\n        <_>\n          17 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 4 2 -1.</_>\n        <_>\n          14 7 2 1 2.</_>\n        <_>\n          16 8 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 1 -1.</_>\n        <_>\n          11 0 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 2 -1.</_>\n        <_>\n          10 4 4 1 2.</_>\n        <_>\n          14 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 2 -1.</_>\n        <_>\n          9 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 3 -1.</_>\n        <_>\n          12 12 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 1 4 -1.</_>\n        <_>\n          1 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 1 18 -1.</_>\n        <_>\n          1 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 3 2 -1.</_>\n        <_>\n          11 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 2 -1.</_>\n        <_>\n          0 1 6 1 2.</_>\n        <_>\n          6 2 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 2 2 -1.</_>\n        <_>\n          10 18 1 1 2.</_>\n        <_>\n          11 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 4 -1.</_>\n        <_>\n          4 5 2 2 2.</_>\n        <_>\n          6 7 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 1 3 -1.</_>\n        <_>\n          6 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 2 -1.</_>\n        <_>\n          16 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 6 -1.</_>\n        <_>\n          17 8 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 2 -1.</_>\n        <_>\n          6 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 7 -1.</_>\n        <_>\n          7 5 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 6 -1.</_>\n        <_>\n          0 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 1 9 -1.</_>\n        <_>\n          12 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 3 -1.</_>\n        <_>\n          6 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 13 -1.</_>\n        <_>\n          9 5 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 8 1 10 -1.</_>\n        <_>\n          19 13 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 6 1 -1.</_>\n        <_>\n          13 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 12 -1.</_>\n        <_>\n          11 7 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 6 6 -1.</_>\n        <_>\n          14 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 4 -1.</_>\n        <_>\n          16 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 4 2 -1.</_>\n        <_>\n          6 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 6 8 -1.</_>\n        <_>\n          3 6 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 6 5 -1.</_>\n        <_>\n          13 15 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 4 2 -1.</_>\n        <_>\n          15 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 1 -1.</_>\n        <_>\n          15 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 2 2 -1.</_>\n        <_>\n          5 18 1 1 2.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 4 4 -1.</_>\n        <_>\n          4 8 2 2 2.</_>\n        <_>\n          6 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 9 3 -1.</_>\n        <_>\n          11 8 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 10 4 -1.</_>\n        <_>\n          0 3 5 2 2.</_>\n        <_>\n          5 5 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 6 1 -1.</_>\n        <_>\n          9 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 3 3 -1.</_>\n        <_>\n          0 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 8 -1.</_>\n        <_>\n          0 0 3 4 2.</_>\n        <_>\n          3 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 8 -1.</_>\n        <_>\n          8 6 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 7 3 -1.</_>\n        <_>\n          13 8 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 2 2 -1.</_>\n        <_>\n          3 4 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 3 -1.</_>\n        <_>\n          0 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 2 -1.</_>\n        <_>\n          9 4 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 4 -1.</_>\n        <_>\n          9 5 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 12 3 -1.</_>\n        <_>\n          7 10 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 6 -1.</_>\n        <_>\n          9 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 5 -1.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 2 3 -1.</_>\n        <_>\n          0 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 4 -1.</_>\n        <_>\n          10 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 15 -1.</_>\n        <_>\n          3 0 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 5 -1.</_>\n        <_>\n          16 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 10 -1.</_>\n        <_>\n          10 2 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 12 -1.</_>\n        <_>\n          10 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 3 4 -1.</_>\n        <_>\n          16 6 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 1 1 2.</_>\n        <_>\n          17 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          13 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 1 3 -1.</_>\n        <_>\n          7 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 2 -1.</_>\n        <_>\n          12 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 1 3 -1.</_>\n        <_>\n          17 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 3 -1.</_>\n        <_>\n          0 17 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 4 -1.</_>\n        <_>\n          3 6 1 2 2.</_>\n        <_>\n          4 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 3 1 -1.</_>\n        <_>\n          14 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          2 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 2 1 -1.</_>\n        <_>\n          2 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          0 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 1 3 -1.</_>\n        <_>\n          2 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 5 -1.</_>\n        <_>\n          5 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 7 -1.</_>\n        <_>\n          4 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 8 -1.</_>\n        <_>\n          3 6 1 4 2.</_>\n        <_>\n          4 10 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 11 10 -1.</_>\n        <_>\n          4 10 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 2 -1.</_>\n        <_>\n          10 13 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 16 3 -1.</_>\n        <_>\n          9 13 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 4 -1.</_>\n        <_>\n          16 4 2 2 2.</_>\n        <_>\n          18 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 12 -1.</_>\n        <_>\n          16 0 2 6 2.</_>\n        <_>\n          18 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 3 1 -1.</_>\n        <_>\n          15 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 12 10 -1.</_>\n        <_>\n          3 9 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 2 2 -1.</_>\n        <_>\n          9 18 1 1 2.</_>\n        <_>\n          10 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 2 2 -1.</_>\n        <_>\n          9 18 1 1 2.</_>\n        <_>\n          10 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 14 -1.</_>\n        <_>\n          13 4 1 7 2.</_>\n        <_>\n          14 11 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 4 -1.</_>\n        <_>\n          7 2 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 20 -1.</_>\n        <_>\n          0 0 9 10 2.</_>\n        <_>\n          9 10 9 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 2 -1.</_>\n        <_>\n          15 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 2 4 -1.</_>\n        <_>\n          16 10 1 2 2.</_>\n        <_>\n          17 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 2 -1.</_>\n        <_>\n          18 17 1 1 2.</_>\n        <_>\n          19 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 1 2 -1.</_>\n        <_>\n          9 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 9 6 -1.</_>\n        <_>\n          11 4 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 10 -1.</_>\n        <_>\n          9 9 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 5 4 -1.</_>\n        <_>\n          5 2 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 11 4 -1.</_>\n        <_>\n          5 9 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 2 14 -1.</_>\n        <_>\n          3 4 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 5 -1.</_>\n        <_>\n          9 6 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 9 -1.</_>\n        <_>\n          9 4 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 6 -1.</_>\n        <_>\n          0 10 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 6 1 -1.</_>\n        <_>\n          17 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 2 2 -1.</_>\n        <_>\n          17 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 6 3 -1.</_>\n        <_>\n          10 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 9 15 -1.</_>\n        <_>\n          7 1 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 12 -1.</_>\n        <_>\n          12 5 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 4 3 -1.</_>\n        <_>\n          0 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 1 -1.</_>\n        <_>\n          5 0 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 4 -1.</_>\n        <_>\n          8 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 3 -1.</_>\n        <_>\n          5 0 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 3 7 -1.</_>\n        <_>\n          14 6 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 2 -1.</_>\n        <_>\n          7 7 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 6 1 -1.</_>\n        <_>\n          8 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 2 -1.</_>\n        <_>\n          18 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 7 3 -1.</_>\n        <_>\n          6 5 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 1 -1.</_>\n        <_>\n          13 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 2 10 -1.</_>\n        <_>\n          15 1 1 5 2.</_>\n        <_>\n          16 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 2 2 -1.</_>\n        <_>\n          0 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 1 8 -1.</_>\n        <_>\n          19 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 1 3 -1.</_>\n        <_>\n          1 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 6 4 -1.</_>\n        <_>\n          0 15 3 2 2.</_>\n        <_>\n          3 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 18 -1.</_>\n        <_>\n          19 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 2 -1.</_>\n        <_>\n          12 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 2 -1.</_>\n        <_>\n          6 8 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 1 -1.</_>\n        <_>\n          18 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 2 6 -1.</_>\n        <_>\n          8 7 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 2 10 -1.</_>\n        <_>\n          15 5 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 2 -1.</_>\n        <_>\n          13 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 6 -1.</_>\n        <_>\n          11 3 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 2 -1.</_>\n        <_>\n          10 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 4 2 -1.</_>\n        <_>\n          9 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 15 4 -1.</_>\n        <_>\n          5 16 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 8 -1.</_>\n        <_>\n          7 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 1 -1.</_>\n        <_>\n          6 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 1 6 -1.</_>\n        <_>\n          0 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 9 6 -1.</_>\n        <_>\n          14 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 4 -1.</_>\n        <_>\n          14 2 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 2 4 -1.</_>\n        <_>\n          1 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 4 -1.</_>\n        <_>\n          13 3 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 10 -1.</_>\n        <_>\n          4 10 1 5 2.</_>\n        <_>\n          5 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 9 3 -1.</_>\n        <_>\n          5 16 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 3 9 -1.</_>\n        <_>\n          2 2 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 7 1 4 -1.</_>\n        <_>\n          19 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 6 8 -1.</_>\n        <_>\n          14 11 3 4 2.</_>\n        <_>\n          17 15 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 4 6 -1.</_>\n        <_>\n          15 12 2 3 2.</_>\n        <_>\n          17 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 1 1 2.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 1 1 2.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 2 2 -1.</_>\n        <_>\n          2 3 1 1 2.</_>\n        <_>\n          3 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 3 -1.</_>\n        <_>\n          11 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 7 8 -1.</_>\n        <_>\n          5 13 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 2 -1.</_>\n        <_>\n          7 16 1 1 2.</_>\n        <_>\n          8 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 2 -1.</_>\n        <_>\n          7 16 1 1 2.</_>\n        <_>\n          8 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 3 -1.</_>\n        <_>\n          14 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 4 8 -1.</_>\n        <_>\n          6 7 2 4 2.</_>\n        <_>\n          8 11 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 3 -1.</_>\n        <_>\n          1 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 10 -1.</_>\n        <_>\n          8 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 6 -1.</_>\n        <_>\n          5 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 4 -1.</_>\n        <_>\n          3 10 2 2 2.</_>\n        <_>\n          5 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 4 -1.</_>\n        <_>\n          3 10 2 2 2.</_>\n        <_>\n          5 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 4 -1.</_>\n        <_>\n          3 10 2 2 2.</_>\n        <_>\n          5 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 2 6 -1.</_>\n        <_>\n          15 8 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 4 -1.</_>\n        <_>\n          3 10 2 2 2.</_>\n        <_>\n          5 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 4 -1.</_>\n        <_>\n          3 10 2 2 2.</_>\n        <_>\n          5 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 9 -1.</_>\n        <_>\n          13 4 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 1 12 -1.</_>\n        <_>\n          12 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 1 -1.</_>\n        <_>\n          8 0 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 6 -1.</_>\n        <_>\n          10 0 5 3 2.</_>\n        <_>\n          15 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 2 -1.</_>\n        <_>\n          3 5 2 1 2.</_>\n        <_>\n          5 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 3 -1.</_>\n        <_>\n          12 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 5 -1.</_>\n        <_>\n          12 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 15 1 -1.</_>\n        <_>\n          8 19 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 2 -1.</_>\n        <_>\n          8 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 8 4 -1.</_>\n        <_>\n          2 12 4 2 2.</_>\n        <_>\n          6 14 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          16 16 1 1 2.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 2 -1.</_>\n        <_>\n          8 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 5 -1.</_>\n        <_>\n          7 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 17 -1.</_>\n        <_>\n          19 0 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 3 -1.</_>\n        <_>\n          16 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 3 7 -1.</_>\n        <_>\n          15 8 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 2 2 -1.</_>\n        <_>\n          10 17 1 1 2.</_>\n        <_>\n          11 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 1 3 -1.</_>\n        <_>\n          4 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 3 -1.</_>\n        <_>\n          18 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 10 -1.</_>\n        <_>\n          13 1 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 9 1 -1.</_>\n        <_>\n          11 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 2 2 -1.</_>\n        <_>\n          5 18 1 1 2.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 6 1 9 -1.</_>\n        <_>\n          19 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 4 -1.</_>\n        <_>\n          4 7 1 2 2.</_>\n        <_>\n          5 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 14 -1.</_>\n        <_>\n          3 4 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 9 3 -1.</_>\n        <_>\n          13 5 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 6 -1.</_>\n        <_>\n          18 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 7 -1.</_>\n        <_>\n          6 6 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 8 -1.</_>\n        <_>\n          13 4 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 9 -1.</_>\n        <_>\n          0 11 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 5 3 -1.</_>\n        <_>\n          0 8 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 7 2 -1.</_>\n        <_>\n          8 2 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 5 -1.</_>\n        <_>\n          8 5 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 1 2 -1.</_>\n        <_>\n          19 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 11 -1.</_>\n        <_>\n          11 7 5 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 6 1 -1.</_>\n        <_>\n          11 19 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 1 -1.</_>\n        <_>\n          7 0 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 5 -1.</_>\n        <_>\n          6 1 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 12 6 -1.</_>\n        <_>\n          10 12 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 2 3 -1.</_>\n        <_>\n          16 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 4 2 -1.</_>\n        <_>\n          7 15 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 2 2 -1.</_>\n        <_>\n          7 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 2 4 -1.</_>\n        <_>\n          3 10 1 2 2.</_>\n        <_>\n          4 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 6 -1.</_>\n        <_>\n          0 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 2 2 -1.</_>\n        <_>\n          1 10 1 1 2.</_>\n        <_>\n          2 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 3 -1.</_>\n        <_>\n          16 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 4 -1.</_>\n        <_>\n          5 10 1 2 2.</_>\n        <_>\n          6 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 13 2 -1.</_>\n        <_>\n          5 12 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 11 -1.</_>\n        <_>\n          11 2 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 4 -1.</_>\n        <_>\n          10 4 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 2 -1.</_>\n        <_>\n          10 8 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 3 -1.</_>\n        <_>\n          12 2 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 14 2 -1.</_>\n        <_>\n          6 18 7 1 2.</_>\n        <_>\n          13 19 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 1 12 -1.</_>\n        <_>\n          17 11 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 10 3 -1.</_>\n        <_>\n          10 6 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 3 -1.</_>\n        <_>\n          7 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 1 -1.</_>\n        <_>\n          14 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 6 -1.</_>\n        <_>\n          10 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 14 -1.</_>\n        <_>\n          8 1 4 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 14 -1.</_>\n        <_>\n          16 1 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 2 -1.</_>\n        <_>\n          3 16 1 1 2.</_>\n        <_>\n          4 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 2 -1.</_>\n        <_>\n          0 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 6 -1.</_>\n        <_>\n          15 6 2 3 2.</_>\n        <_>\n          17 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 2 2 -1.</_>\n        <_>\n          12 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 13 -1.</_>\n        <_>\n          9 6 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 5 -1.</_>\n        <_>\n          3 9 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 4 -1.</_>\n        <_>\n          0 7 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 2 -1.</_>\n        <_>\n          4 1 8 1 2.</_>\n        <_>\n          12 2 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 4 2 -1.</_>\n        <_>\n          1 18 2 1 2.</_>\n        <_>\n          3 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 4 -1.</_>\n        <_>\n          8 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 9 3 -1.</_>\n        <_>\n          6 4 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 10 -1.</_>\n        <_>\n          6 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 10 -1.</_>\n        <_>\n          13 0 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 1 -1.</_>\n        <_>\n          12 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 16 -1.</_>\n        <_>\n          6 2 4 8 2.</_>\n        <_>\n          10 10 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 10 -1.</_>\n        <_>\n          14 10 1 5 2.</_>\n        <_>\n          15 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 2 -1.</_>\n        <_>\n          12 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 8 -1.</_>\n        <_>\n          17 0 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 5 -1.</_>\n        <_>\n          17 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 11 2 -1.</_>\n        <_>\n          4 6 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 1 -1.</_>\n        <_>\n          2 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 3 -1.</_>\n        <_>\n          0 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 11 -1.</_>\n        <_>\n          13 6 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 1 -1.</_>\n        <_>\n          15 0 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 7 1 2 -1.</_>\n        <_>\n          19 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 9 -1.</_>\n        <_>\n          18 0 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 4 -1.</_>\n        <_>\n          13 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 14 2 -1.</_>\n        <_>\n          0 1 7 1 2.</_>\n        <_>\n          7 2 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 3 2 -1.</_>\n        <_>\n          4 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 2 -1.</_>\n        <_>\n          9 0 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 1 -1.</_>\n        <_>\n          12 2 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 11 -1.</_>\n        <_>\n          11 4 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 2 4 -1.</_>\n        <_>\n          2 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 6 3 -1.</_>\n        <_>\n          8 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 2 -1.</_>\n        <_>\n          9 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 9 2 -1.</_>\n        <_>\n          9 8 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 10 -1.</_>\n        <_>\n          6 6 1 5 2.</_>\n        <_>\n          7 11 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 2 3 -1.</_>\n        <_>\n          0 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 4 1 -1.</_>\n        <_>\n          13 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 1 2 -1.</_>\n        <_>\n          6 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 20 -1.</_>\n        <_>\n          2 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 2 2 -1.</_>\n        <_>\n          4 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 5 -1.</_>\n        <_>\n          5 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 2 -1.</_>\n        <_>\n          5 12 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 1 1 2.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 16 -1.</_>\n        <_>\n          16 1 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 6 3 -1.</_>\n        <_>\n          8 16 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 3 2 -1.</_>\n        <_>\n          15 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 1 2 -1.</_>\n        <_>\n          12 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 4 -1.</_>\n        <_>\n          0 2 2 2 2.</_>\n        <_>\n          2 4 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 4 -1.</_>\n        <_>\n          1 1 3 2 2.</_>\n        <_>\n          4 3 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 1 2 -1.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 3 -1.</_>\n        <_>\n          4 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 9 14 -1.</_>\n        <_>\n          1 7 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 6 -1.</_>\n        <_>\n          4 9 1 3 2.</_>\n        <_>\n          5 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 4 3 -1.</_>\n        <_>\n          5 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 2 4 -1.</_>\n        <_>\n          0 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 3 10 -1.</_>\n        <_>\n          17 6 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 2 1 -1.</_>\n        <_>\n          17 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 4 -1.</_>\n        <_>\n          5 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 9 2 -1.</_>\n        <_>\n          13 11 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 2 -1.</_>\n        <_>\n          15 10 1 1 2.</_>\n        <_>\n          16 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 14 -1.</_>\n        <_>\n          10 13 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 5 -1.</_>\n        <_>\n          15 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 3 -1.</_>\n        <_>\n          10 11 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 1 2 -1.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 5 4 -1.</_>\n        <_>\n          8 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 2 -1.</_>\n        <_>\n          11 7 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 8 2 -1.</_>\n        <_>\n          3 4 4 1 2.</_>\n        <_>\n          7 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 6 -1.</_>\n        <_>\n          2 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 2 -1.</_>\n        <_>\n          7 5 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 3 -1.</_>\n        <_>\n          9 3 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 3 3 -1.</_>\n        <_>\n          2 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 1 -1.</_>\n        <_>\n          5 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 2 -1.</_>\n        <_>\n          9 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 9 1 -1.</_>\n        <_>\n          7 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 11 12 -1.</_>\n        <_>\n          7 13 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 4 -1.</_>\n        <_>\n          4 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 9 3 -1.</_>\n        <_>\n          12 7 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 6 -1.</_>\n        <_>\n          15 11 1 3 2.</_>\n        <_>\n          16 14 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 5 3 -1.</_>\n        <_>\n          0 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 12 -1.</_>\n        <_>\n          10 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 15 13 -1.</_>\n        <_>\n          8 7 5 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 9 9 -1.</_>\n        <_>\n          0 12 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 8 -1.</_>\n        <_>\n          17 0 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 2 -1.</_>\n        <_>\n          18 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 5 -1.</_>\n        <_>\n          16 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 2 -1.</_>\n        <_>\n          16 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 2 -1.</_>\n        <_>\n          12 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 2 12 -1.</_>\n        <_>\n          1 8 1 6 2.</_>\n        <_>\n          2 14 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 12 -1.</_>\n        <_>\n          2 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 17 1 3 -1.</_>\n        <_>\n          19 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 10 -1.</_>\n        <_>\n          12 3 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 8 -1.</_>\n        <_>\n          11 1 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 16 1 1 2.</_>\n        <_>\n          19 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 16 1 1 2.</_>\n        <_>\n          19 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 6 -1.</_>\n        <_>\n          6 15 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 2 -1.</_>\n        <_>\n          9 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 4 -1.</_>\n        <_>\n          14 10 1 2 2.</_>\n        <_>\n          15 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 2 2 -1.</_>\n        <_>\n          0 15 1 1 2.</_>\n        <_>\n          1 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 2 -1.</_>\n        <_>\n          6 7 1 1 2.</_>\n        <_>\n          7 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 2 2 -1.</_>\n        <_>\n          11 18 1 1 2.</_>\n        <_>\n          12 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 4 -1.</_>\n        <_>\n          0 0 3 2 2.</_>\n        <_>\n          3 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 6 -1.</_>\n        <_>\n          6 1 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 5 4 -1.</_>\n        <_>\n          15 15 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 6 1 -1.</_>\n        <_>\n          9 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 19 4 1 -1.</_>\n        <_>\n          18 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 4 4 -1.</_>\n        <_>\n          18 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 4 -1.</_>\n        <_>\n          10 8 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 2 4 -1.</_>\n        <_>\n          2 9 1 2 2.</_>\n        <_>\n          3 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 8 4 -1.</_>\n        <_>\n          0 3 4 2 2.</_>\n        <_>\n          4 5 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 1 -1.</_>\n        <_>\n          4 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 9 -1.</_>\n        <_>\n          4 5 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 6 2 -1.</_>\n        <_>\n          9 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 1 12 -1.</_>\n        <_>\n          0 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 13 1 6 -1.</_>\n        <_>\n          19 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 8 -1.</_>\n        <_>\n          4 8 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 17 -1.</_>\n        <_>\n          3 0 3 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 8 -1.</_>\n        <_>\n          9 9 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 9 4 -1.</_>\n        <_>\n          8 10 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 3 -1.</_>\n        <_>\n          5 1 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 4 -1.</_>\n        <_>\n          16 6 2 2 2.</_>\n        <_>\n          18 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 2 8 -1.</_>\n        <_>\n          17 4 1 4 2.</_>\n        <_>\n          18 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 1 3 -1.</_>\n        <_>\n          2 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 1 3 -1.</_>\n        <_>\n          2 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 1 3 -1.</_>\n        <_>\n          11 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 9 7 -1.</_>\n        <_>\n          14 2 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 6 -1.</_>\n        <_>\n          11 2 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 15 2 -1.</_>\n        <_>\n          5 10 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 6 2 -1.</_>\n        <_>\n          8 17 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 10 2 -1.</_>\n        <_>\n          9 16 5 1 2.</_>\n        <_>\n          14 17 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 2 2 -1.</_>\n        <_>\n          9 17 1 1 2.</_>\n        <_>\n          10 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 4 -1.</_>\n        <_>\n          10 15 3 2 2.</_>\n        <_>\n          13 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 15 12 -1.</_>\n        <_>\n          9 5 5 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 2 3 -1.</_>\n        <_>\n          11 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 7 3 -1.</_>\n        <_>\n          8 14 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 1 2 -1.</_>\n        <_>\n          1 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 18 1 -1.</_>\n        <_>\n          7 19 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 6 1 -1.</_>\n        <_>\n          4 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 1 12 -1.</_>\n        <_>\n          1 9 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 3 6 -1.</_>\n        <_>\n          0 11 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 10 -1.</_>\n        <_>\n          6 4 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 2 1 -1.</_>\n        <_>\n          7 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 12 -1.</_>\n        <_>\n          3 0 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 9 2 -1.</_>\n        <_>\n          7 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 9 1 -1.</_>\n        <_>\n          9 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 10 2 10 -1.</_>\n        <_>\n          17 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 10 -1.</_>\n        <_>\n          4 10 1 5 2.</_>\n        <_>\n          5 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 12 -1.</_>\n        <_>\n          13 3 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 4 6 -1.</_>\n        <_>\n          15 3 2 3 2.</_>\n        <_>\n          17 6 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 3 -1.</_>\n        <_>\n          13 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 2 4 -1.</_>\n        <_>\n          4 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 1 3 -1.</_>\n        <_>\n          6 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 2 3 -1.</_>\n        <_>\n          2 1 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 1 -1.</_>\n        <_>\n          2 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 12 3 -1.</_>\n        <_>\n          12 17 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 4 -1.</_>\n        <_>\n          11 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 6 -1.</_>\n        <_>\n          4 9 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 9 -1.</_>\n        <_>\n          6 5 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 20 -1.</_>\n        <_>\n          6 0 7 10 2.</_>\n        <_>\n          13 10 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 8 1 3 -1.</_>\n        <_>\n          19 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 2 -1.</_>\n        <_>\n          13 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 2 -1.</_>\n        <_>\n          0 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 6 -1.</_>\n        <_>\n          19 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 1 -1.</_>\n        <_>\n          17 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 1 3 -1.</_>\n        <_>\n          13 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 3 -1.</_>\n        <_>\n          17 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 8 8 -1.</_>\n        <_>\n          5 4 4 4 2.</_>\n        <_>\n          9 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 2 2 -1.</_>\n        <_>\n          1 2 1 1 2.</_>\n        <_>\n          2 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 6 -1.</_>\n        <_>\n          0 0 4 3 2.</_>\n        <_>\n          4 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 2 -1.</_>\n        <_>\n          6 4 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 3 -1.</_>\n        <_>\n          1 1 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 2 -1.</_>\n        <_>\n          6 2 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 12 6 -1.</_>\n        <_>\n          6 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 9 2 -1.</_>\n        <_>\n          4 16 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 4 -1.</_>\n        <_>\n          9 15 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 12 1 -1.</_>\n        <_>\n          12 15 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 3 -1.</_>\n        <_>\n          17 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 15 2 2 -1.</_>\n        <_>\n          17 15 1 1 2.</_>\n        <_>\n          18 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 3 -1.</_>\n        <_>\n          3 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 1 3 -1.</_>\n        <_>\n          10 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 8 -1.</_>\n        <_>\n          11 0 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 12 2 -1.</_>\n        <_>\n          6 0 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 3 -1.</_>\n        <_>\n          4 0 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 1 2 -1.</_>\n        <_>\n          13 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 6 -1.</_>\n        <_>\n          8 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 2 -1.</_>\n        <_>\n          18 2 1 1 2.</_>\n        <_>\n          19 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 2 14 -1.</_>\n        <_>\n          16 1 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 2 -1.</_>\n        <_>\n          15 6 1 1 2.</_>\n        <_>\n          16 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 3 -1.</_>\n        <_>\n          5 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 2 -1.</_>\n        <_>\n          7 16 1 1 2.</_>\n        <_>\n          8 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 2 2 -1.</_>\n        <_>\n          5 17 1 1 2.</_>\n        <_>\n          6 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 10 -1.</_>\n        <_>\n          11 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 6 3 -1.</_>\n        <_>\n          12 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 2 10 -1.</_>\n        <_>\n          14 10 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 6 2 -1.</_>\n        <_>\n          11 13 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 1 3 -1.</_>\n        <_>\n          8 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 2 2 -1.</_>\n        <_>\n          12 15 1 1 2.</_>\n        <_>\n          13 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 4 -1.</_>\n        <_>\n          6 8 3 2 2.</_>\n        <_>\n          9 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 5 -1.</_>\n        <_>\n          8 5 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 7 3 -1.</_>\n        <_>\n          0 6 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 6 -1.</_>\n        <_>\n          9 9 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 8 -1.</_>\n        <_>\n          5 11 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 6 -1.</_>\n        <_>\n          4 9 1 3 2.</_>\n        <_>\n          5 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 6 1 -1.</_>\n        <_>\n          12 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 6 11 -1.</_>\n        <_>\n          15 6 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 2 2 -1.</_>\n        <_>\n          8 17 1 1 2.</_>\n        <_>\n          9 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 1 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 3 2 -1.</_>\n        <_>\n          11 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 6 1 -1.</_>\n        <_>\n          10 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 6 -1.</_>\n        <_>\n          4 3 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 12 -1.</_>\n        <_>\n          14 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 3 2 -1.</_>\n        <_>\n          12 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 1 -1.</_>\n        <_>\n          8 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 1 -1.</_>\n        <_>\n          12 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 2 1 -1.</_>\n        <_>\n          4 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 16 1 1 2.</_>\n        <_>\n          19 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 7 -1.</_>\n        <_>\n          17 11 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 6 -1.</_>\n        <_>\n          19 8 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 3 -1.</_>\n        <_>\n          9 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 4 -1.</_>\n        <_>\n          16 8 2 2 2.</_>\n        <_>\n          18 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 2 2 -1.</_>\n        <_>\n          2 8 1 1 2.</_>\n        <_>\n          3 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 4 -1.</_>\n        <_>\n          3 5 3 2 2.</_>\n        <_>\n          6 7 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 8 16 -1.</_>\n        <_>\n          2 3 4 8 2.</_>\n        <_>\n          6 11 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 3 -1.</_>\n        <_>\n          17 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 11 -1.</_>\n        <_>\n          11 2 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 6 14 -1.</_>\n        <_>\n          16 3 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 2 -1.</_>\n        <_>\n          6 9 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 14 3 -1.</_>\n        <_>\n          6 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 9 3 -1.</_>\n        <_>\n          13 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 6 -1.</_>\n        <_>\n          3 5 2 3 2.</_>\n        <_>\n          5 8 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 7 -1.</_>\n        <_>\n          4 7 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 11 6 -1.</_>\n        <_>\n          2 10 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 3 -1.</_>\n        <_>\n          8 10 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 3 11 -1.</_>\n        <_>\n          4 3 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 6 1 -1.</_>\n        <_>\n          3 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 1 2 -1.</_>\n        <_>\n          18 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 6 -1.</_>\n        <_>\n          8 0 6 3 2.</_>\n        <_>\n          14 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 3 -1.</_>\n        <_>\n          19 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 1 -1.</_>\n        <_>\n          6 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 1 -1.</_>\n        <_>\n          14 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 15 13 -1.</_>\n        <_>\n          8 6 5 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 2 -1.</_>\n        <_>\n          6 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 1 2 -1.</_>\n        <_>\n          0 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 6 -1.</_>\n        <_>\n          8 8 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 19 -1.</_>\n        <_>\n          5 0 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 5 -1.</_>\n        <_>\n          5 1 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 14 3 6 -1.</_>\n        <_>\n          17 16 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 13 2 6 -1.</_>\n        <_>\n          18 13 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 2 2 -1.</_>\n        <_>\n          18 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 9 4 -1.</_>\n        <_>\n          14 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 4 6 -1.</_>\n        <_>\n          15 8 2 3 2.</_>\n        <_>\n          17 11 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 1 3 -1.</_>\n        <_>\n          1 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 14 -1.</_>\n        <_>\n          8 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 1 -1.</_>\n        <_>\n          13 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 5 -1.</_>\n        <_>\n          10 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 9 -1.</_>\n        <_>\n          17 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 6 -1.</_>\n        <_>\n          13 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 18 -1.</_>\n        <_>\n          13 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 10 -1.</_>\n        <_>\n          8 9 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 2 3 -1.</_>\n        <_>\n          8 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 9 -1.</_>\n        <_>\n          11 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 6 -1.</_>\n        <_>\n          15 6 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 2 2 -1.</_>\n        <_>\n          12 18 1 1 2.</_>\n        <_>\n          13 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 1 3 -1.</_>\n        <_>\n          1 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 19 2 1 -1.</_>\n        <_>\n          13 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 6 -1.</_>\n        <_>\n          10 10 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 5 -1.</_>\n        <_>\n          16 2 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          9 7 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 2 2 -1.</_>\n        <_>\n          2 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 6 -1.</_>\n        <_>\n          10 16 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 2 -1.</_>\n        <_>\n          10 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 2 -1.</_>\n        <_>\n          6 9 3 1 2.</_>\n        <_>\n          9 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 12 -1.</_>\n        <_>\n          0 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 1 -1.</_>\n        <_>\n          9 0 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 2 -1.</_>\n        <_>\n          9 0 4 1 2.</_>\n        <_>\n          13 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 8 1 -1.</_>\n        <_>\n          16 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 6 -1.</_>\n        <_>\n          7 3 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 3 -1.</_>\n        <_>\n          18 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 2 -1.</_>\n        <_>\n          4 12 1 1 2.</_>\n        <_>\n          5 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 2 -1.</_>\n        <_>\n          8 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 9 6 -1.</_>\n        <_>\n          3 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 2 2 -1.</_>\n        <_>\n          18 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 16 -1.</_>\n        <_>\n          13 2 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 15 13 -1.</_>\n        <_>\n          7 4 5 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 3 10 -1.</_>\n        <_>\n          17 2 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 1 -1.</_>\n        <_>\n          7 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 16 -1.</_>\n        <_>\n          10 1 9 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 3 15 -1.</_>\n        <_>\n          15 4 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 13 1 2 -1.</_>\n        <_>\n          19 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 5 8 -1.</_>\n        <_>\n          2 10 5 4 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "OpenCVComponent/Assets/haarcascade_frontalface_alt.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    Stump-based 20x20 gentle adaboost frontal face detector.\n    Created by Rainer Lienhart.\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's 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   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>20</height>\n  <width>20</width>\n  <stageParams>\n    <maxWeakCount>213</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>22</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>3</maxWeakCount>\n      <stageThreshold>8.2268941402435303e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 4.0141958743333817e-03</internalNodes>\n          <leafValues>\n            3.3794190734624863e-02 8.3781069517135620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 1.5151339583098888e-02</internalNodes>\n          <leafValues>\n            1.5141320228576660e-01 7.4888122081756592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 4.2109931819140911e-03</internalNodes>\n          <leafValues>\n            9.0049281716346741e-02 6.3748198747634888e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>16</maxWeakCount>\n      <stageThreshold>6.9566087722778320e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 3 1.6227109590545297e-03</internalNodes>\n          <leafValues>\n            6.9308586418628693e-02 7.1109461784362793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 2.2906649392098188e-03</internalNodes>\n          <leafValues>\n            1.7958030104637146e-01 6.6686922311782837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 5.0025708042085171e-03</internalNodes>\n          <leafValues>\n            1.6936729848384857e-01 6.5540069341659546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 7.9659894108772278e-03</internalNodes>\n          <leafValues>\n            5.8663320541381836e-01 9.1414518654346466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 -3.5227010957896709e-03</internalNodes>\n          <leafValues>\n            1.4131669700145721e-01 6.0318958759307861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 3.6667689681053162e-02</internalNodes>\n          <leafValues>\n            3.6756721138954163e-01 7.9203182458877563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 9.3361474573612213e-03</internalNodes>\n          <leafValues>\n            6.1613857746124268e-01 2.0885099470615387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 8.6961314082145691e-03</internalNodes>\n          <leafValues>\n            2.8362309932708740e-01 6.3602739572525024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 1.1488880263641477e-03</internalNodes>\n          <leafValues>\n            2.2235809266567230e-01 5.8007007837295532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 -2.1484689787030220e-03</internalNodes>\n          <leafValues>\n            2.4064640700817108e-01 5.7870548963546753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 2.1219060290604830e-03</internalNodes>\n          <leafValues>\n            5.5596548318862915e-01 1.3622370362281799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -9.3949146568775177e-02</internalNodes>\n          <leafValues>\n            8.5027372837066650e-01 4.7177401185035706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 1.3777789426967502e-03</internalNodes>\n          <leafValues>\n            5.9936738014221191e-01 2.8345298767089844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 7.3063157498836517e-02</internalNodes>\n          <leafValues>\n            4.3418860435485840e-01 7.0600342750549316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 3.6767389974556863e-04</internalNodes>\n          <leafValues>\n            3.0278879404067993e-01 6.0515749454498291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 -6.0479710809886456e-03</internalNodes>\n          <leafValues>\n            1.7984339594841003e-01 5.6752568483352661e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>21</maxWeakCount>\n      <stageThreshold>9.4985427856445312e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 19 -1.6510689631104469e-02</internalNodes>\n          <leafValues>\n            6.6442251205444336e-01 1.4248579740524292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 2.7052499353885651e-03</internalNodes>\n          <leafValues>\n            6.3253521919250488e-01 1.2884770333766937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 2.8069869149476290e-03</internalNodes>\n          <leafValues>\n            1.2402880191802979e-01 6.1931931972503662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 -1.5402400167658925e-03</internalNodes>\n          <leafValues>\n            1.4321430027484894e-01 5.6700158119201660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 -5.6386279175058007e-04</internalNodes>\n          <leafValues>\n            1.6574330627918243e-01 5.9052079916000366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 1.9253729842603207e-03</internalNodes>\n          <leafValues>\n            2.6955071091651917e-01 5.7388240098953247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 -5.0214841030538082e-03</internalNodes>\n          <leafValues>\n            1.8935389816761017e-01 5.7827740907669067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 2.6365420781075954e-03</internalNodes>\n          <leafValues>\n            2.3093290627002716e-01 5.6954258680343628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 -1.5127769438549876e-03</internalNodes>\n          <leafValues>\n            2.7596020698547363e-01 5.9566420316696167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -1.0157439857721329e-02</internalNodes>\n          <leafValues>\n            1.7325380444526672e-01 5.5220472812652588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 -1.1953660286962986e-02</internalNodes>\n          <leafValues>\n            1.3394099473953247e-01 5.5590140819549561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 4.8859491944313049e-03</internalNodes>\n          <leafValues>\n            3.6287039518356323e-01 6.1888492107391357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 -8.0132916569709778e-02</internalNodes>\n          <leafValues>\n            9.1211050748825073e-02 5.4759448766708374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 1.0643280111253262e-03</internalNodes>\n          <leafValues>\n            3.7151429057121277e-01 5.7113999128341675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -1.3419450260698795e-03</internalNodes>\n          <leafValues>\n            5.9533137083053589e-01 3.3180978894233704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -5.4601140320301056e-02</internalNodes>\n          <leafValues>\n            1.8440659344196320e-01 5.6028461456298828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 2.9071690514683723e-03</internalNodes>\n          <leafValues>\n            3.5942441225051880e-01 6.1317151784896851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 7.4718717951327562e-04</internalNodes>\n          <leafValues>\n            5.9943532943725586e-01 3.4595629572868347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 4.3013808317482471e-03</internalNodes>\n          <leafValues>\n            4.1726520657539368e-01 6.9908452033996582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 4.5017572119832039e-03</internalNodes>\n          <leafValues>\n            4.5097151398658752e-01 7.8014570474624634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 2.4138500913977623e-02</internalNodes>\n          <leafValues>\n            5.4382127523422241e-01 1.3198269903659821e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>39</maxWeakCount>\n      <stageThreshold>1.8412969589233398e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 40 1.9212230108678341e-03</internalNodes>\n          <leafValues>\n            1.4152669906616211e-01 6.1998707056045532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 -1.2748669541906565e-04</internalNodes>\n          <leafValues>\n            6.1910742521286011e-01 1.8849289417266846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 5.1409931620582938e-04</internalNodes>\n          <leafValues>\n            1.4873969554901123e-01 5.8579277992248535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 4.1878609918057919e-03</internalNodes>\n          <leafValues>\n            2.7469098567962646e-01 6.3592398166656494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 5.1015717908740044e-03</internalNodes>\n          <leafValues>\n            5.8708512783050537e-01 2.1756289899349213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 -2.1448440384119749e-03</internalNodes>\n          <leafValues>\n            5.8809447288513184e-01 2.9795908927917480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 -2.8977119363844395e-03</internalNodes>\n          <leafValues>\n            2.3733270168304443e-01 5.8766472339630127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 -2.1610679104924202e-02</internalNodes>\n          <leafValues>\n            1.2206549942493439e-01 5.1942020654678345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 -4.6299318782985210e-03</internalNodes>\n          <leafValues>\n            2.6312309503555298e-01 5.8174091577529907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 5.9393711853772402e-04</internalNodes>\n          <leafValues>\n            3.6386200785636902e-01 5.6985449790954590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 5.3878661245107651e-02</internalNodes>\n          <leafValues>\n            4.3035310506820679e-01 7.5593662261962891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 1.8887349870055914e-03</internalNodes>\n          <leafValues>\n            2.1226030588150024e-01 5.6134271621704102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 -2.3635339457541704e-03</internalNodes>\n          <leafValues>\n            5.6318491697311401e-01 2.6427671313285828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 2.4017799645662308e-02</internalNodes>\n          <leafValues>\n            5.7971078157424927e-01 2.7517059445381165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 2.0543030404951423e-04</internalNodes>\n          <leafValues>\n            2.7052420377731323e-01 5.7525688409805298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 8.4790197433903813e-04</internalNodes>\n          <leafValues>\n            5.4356247186660767e-01 2.3348769545555115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 1.4091329649090767e-03</internalNodes>\n          <leafValues>\n            5.3194248676300049e-01 2.0631550252437592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 1.4642629539594054e-03</internalNodes>\n          <leafValues>\n            5.4189807176589966e-01 3.0688610672950745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 1.6352549428120255e-03</internalNodes>\n          <leafValues>\n            3.6953729391098022e-01 6.1128681898117065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 8.3172752056270838e-04</internalNodes>\n          <leafValues>\n            3.5650369524955750e-01 6.0252362489700317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 -2.0998890977352858e-03</internalNodes>\n          <leafValues>\n            1.9139820337295532e-01 5.3628271818161011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 -7.4213981861248612e-04</internalNodes>\n          <leafValues>\n            3.8355550169944763e-01 5.5293101072311401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 3.2655049581080675e-03</internalNodes>\n          <leafValues>\n            4.3128961324691772e-01 7.1018958091735840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 8.9134991867467761e-04</internalNodes>\n          <leafValues>\n            3.9848309755325317e-01 6.3919639587402344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 -1.5284179709851742e-02</internalNodes>\n          <leafValues>\n            2.3667329549789429e-01 5.4337137937545776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 4.8381411470472813e-03</internalNodes>\n          <leafValues>\n            5.8175009489059448e-01 3.2391890883445740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 -9.1093179071322083e-04</internalNodes>\n          <leafValues>\n            5.5405938625335693e-01 2.9118689894676208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 -6.1275060288608074e-03</internalNodes>\n          <leafValues>\n            1.7752550542354584e-01 5.1966291666030884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -4.4576259097084403e-04</internalNodes>\n          <leafValues>\n            3.0241701006889343e-01 5.5335938930511475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 2.2646540775895119e-02</internalNodes>\n          <leafValues>\n            4.4149309396743774e-01 6.9753772020339966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 -1.8804960418492556e-03</internalNodes>\n          <leafValues>\n            2.7913948893547058e-01 5.4979521036148071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 7.0889107882976532e-03</internalNodes>\n          <leafValues>\n            5.2631992101669312e-01 2.3855470120906830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 1.7318050377070904e-03</internalNodes>\n          <leafValues>\n            4.3193790316581726e-01 6.9836008548736572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 -6.8482700735330582e-03</internalNodes>\n          <leafValues>\n            3.0820429325103760e-01 5.3909200429916382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 -1.5062530110299122e-05</internalNodes>\n          <leafValues>\n            5.5219221115112305e-01 3.1203660368919373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 2.9475569725036621e-02</internalNodes>\n          <leafValues>\n            5.4013228416442871e-01 1.7706030607223511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 8.1387329846620560e-03</internalNodes>\n          <leafValues>\n            5.1786178350448608e-01 1.2110190093517303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 2.0942950621247292e-02</internalNodes>\n          <leafValues>\n            5.2902942895889282e-01 3.3112218976020813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 -9.5665529370307922e-03</internalNodes>\n          <leafValues>\n            7.4719941616058350e-01 4.4519689679145813e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>33</maxWeakCount>\n      <stageThreshold>1.5324139595031738e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 79 -2.8206960996612906e-04</internalNodes>\n          <leafValues>\n            2.0640860497951508e-01 6.0767322778701782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 1.6790600493550301e-03</internalNodes>\n          <leafValues>\n            5.8519971370697021e-01 1.2553839385509491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 6.9827912375330925e-04</internalNodes>\n          <leafValues>\n            9.4018429517745972e-02 5.7289612293243408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 7.8959012171253562e-04</internalNodes>\n          <leafValues>\n            1.7819879949092865e-01 5.6943088769912720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 -2.8560499195009470e-03</internalNodes>\n          <leafValues>\n            1.6383990645408630e-01 5.7886648178100586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 -3.8122469559311867e-03</internalNodes>\n          <leafValues>\n            2.0854400098323822e-01 5.5085647106170654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 1.5896620461717248e-03</internalNodes>\n          <leafValues>\n            5.7027608156204224e-01 1.8572150170803070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 1.0078339837491512e-02</internalNodes>\n          <leafValues>\n            5.1169431209564209e-01 2.1897700428962708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 -6.3526302576065063e-02</internalNodes>\n          <leafValues>\n            7.1313798427581787e-01 4.0438130497932434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 -9.1031491756439209e-03</internalNodes>\n          <leafValues>\n            2.5671818852424622e-01 5.4639732837677002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 -2.4035000242292881e-03</internalNodes>\n          <leafValues>\n            1.7006659507751465e-01 5.5909740924835205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 1.5226360410451889e-03</internalNodes>\n          <leafValues>\n            5.4105567932128906e-01 2.6190540194511414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 1.7997439950704575e-02</internalNodes>\n          <leafValues>\n            3.7324368953704834e-01 6.5352207422256470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 -6.4538191072642803e-03</internalNodes>\n          <leafValues>\n            2.6264819502830505e-01 5.5374461412429810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 -1.1880760081112385e-02</internalNodes>\n          <leafValues>\n            2.0037539303302765e-01 5.5447459220886230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 1.2713660253211856e-03</internalNodes>\n          <leafValues>\n            5.5919027328491211e-01 3.0319759249687195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 1.1376109905540943e-03</internalNodes>\n          <leafValues>\n            2.7304071187973022e-01 5.6465089321136475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 -4.2651998810470104e-03</internalNodes>\n          <leafValues>\n            1.4059090614318848e-01 5.4618209600448608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -2.9602861031889915e-03</internalNodes>\n          <leafValues>\n            1.7950350046157837e-01 5.4592901468276978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -8.8448226451873779e-03</internalNodes>\n          <leafValues>\n            5.7367831468582153e-01 2.8092199563980103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 -6.6430689767003059e-03</internalNodes>\n          <leafValues>\n            2.3706759512424469e-01 5.5038261413574219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 3.9997808635234833e-03</internalNodes>\n          <leafValues>\n            5.6081998348236084e-01 3.3042821288108826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 -4.1221720166504383e-03</internalNodes>\n          <leafValues>\n            1.6401059925556183e-01 5.3789931535720825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 1.5624909661710262e-02</internalNodes>\n          <leafValues>\n            5.2276492118835449e-01 2.2886039316654205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 -1.0356419719755650e-02</internalNodes>\n          <leafValues>\n            7.0161938667297363e-01 4.2529278993606567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 -8.7960809469223022e-03</internalNodes>\n          <leafValues>\n            2.7673470973968506e-01 5.3558301925659180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 1.6226939857006073e-01</internalNodes>\n          <leafValues>\n            4.3422400951385498e-01 7.4425792694091797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 4.5542530715465546e-03</internalNodes>\n          <leafValues>\n            5.7264858484268188e-01 2.5821250677108765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 -2.1309209987521172e-03</internalNodes>\n          <leafValues>\n            2.1068480610847473e-01 5.3610187768936157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 -1.3208420015871525e-02</internalNodes>\n          <leafValues>\n            7.5937908887863159e-01 4.5524680614471436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 -6.5996676683425903e-02</internalNodes>\n          <leafValues>\n            1.2524759769439697e-01 5.3440397977828979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 7.9142656177282333e-03</internalNodes>\n          <leafValues>\n            3.3153840899467468e-01 5.6010431051254272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 2.0894279703497887e-02</internalNodes>\n          <leafValues>\n            5.5060499906539917e-01 2.7688381075859070e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>2.1010639190673828e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 112 1.1961159761995077e-03</internalNodes>\n          <leafValues>\n            1.7626909911632538e-01 6.1562412977218628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 -1.8679830245673656e-03</internalNodes>\n          <leafValues>\n            6.1181068420410156e-01 1.8323999643325806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 -1.9579799845814705e-04</internalNodes>\n          <leafValues>\n            9.9044263362884521e-02 5.7238161563873291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -8.0255657667294145e-04</internalNodes>\n          <leafValues>\n            5.5798798799514771e-01 2.3772829771041870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 -2.4510810617357492e-03</internalNodes>\n          <leafValues>\n            2.2314579784870148e-01 5.8589351177215576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 5.0361850298941135e-04</internalNodes>\n          <leafValues>\n            2.6539939641952515e-01 5.7941037416458130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 4.0293349884450436e-03</internalNodes>\n          <leafValues>\n            5.8038270473480225e-01 2.4848650395870209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 -1.4451709575951099e-02</internalNodes>\n          <leafValues>\n            1.8303519487380981e-01 5.4842048883438110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 2.0380979403853416e-03</internalNodes>\n          <leafValues>\n            3.3635589480400085e-01 6.0510927438735962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 -1.6155190533027053e-03</internalNodes>\n          <leafValues>\n            2.2866420447826385e-01 5.4412460327148438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 3.3458340913057327e-03</internalNodes>\n          <leafValues>\n            5.6259131431579590e-01 2.3923380672931671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 1.6379579901695251e-03</internalNodes>\n          <leafValues>\n            3.9069938659667969e-01 5.9646219015121460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 3.0251210555434227e-02</internalNodes>\n          <leafValues>\n            5.2484822273254395e-01 1.5757469832897186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 3.7251990288496017e-02</internalNodes>\n          <leafValues>\n            4.1943109035491943e-01 6.7484188079833984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 -2.5109790265560150e-02</internalNodes>\n          <leafValues>\n            1.8825499713420868e-01 5.4734510183334351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -5.3099058568477631e-03</internalNodes>\n          <leafValues>\n            1.3399730622768402e-01 5.2271109819412231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 1.2086479691788554e-03</internalNodes>\n          <leafValues>\n            3.7620881199836731e-01 6.1096358299255371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 -2.1907679736614227e-02</internalNodes>\n          <leafValues>\n            2.6631429791450500e-01 5.4040068387985229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 5.4116579703986645e-03</internalNodes>\n          <leafValues>\n            5.3635787963867188e-01 2.2322730720043182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 6.9946326315402985e-02</internalNodes>\n          <leafValues>\n            5.3582328557968140e-01 2.4536980688571930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 3.4520021290518343e-04</internalNodes>\n          <leafValues>\n            2.4096719920635223e-01 5.3769302368164062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 1.2627709656953812e-03</internalNodes>\n          <leafValues>\n            5.4258567094802856e-01 3.1556931138038635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 2.2719509899616241e-02</internalNodes>\n          <leafValues>\n            4.1584059596061707e-01 6.5978652238845825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 -1.8111000536009669e-03</internalNodes>\n          <leafValues>\n            2.8112530708312988e-01 5.5052447319030762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 3.3469670452177525e-03</internalNodes>\n          <leafValues>\n            5.2600282430648804e-01 1.8914650380611420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 4.0791751234792173e-04</internalNodes>\n          <leafValues>\n            5.6735092401504517e-01 3.3442100882530212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 1.2734799645841122e-02</internalNodes>\n          <leafValues>\n            5.3435921669006348e-01 2.3956120014190674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -7.3119727894663811e-03</internalNodes>\n          <leafValues>\n            6.0108900070190430e-01 4.0222078561782837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 -5.6948751211166382e-02</internalNodes>\n          <leafValues>\n            8.1991511583328247e-01 4.5431908965110779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 -5.0116591155529022e-03</internalNodes>\n          <leafValues>\n            2.2002810239791870e-01 5.3577107191085815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 6.0334368608891964e-03</internalNodes>\n          <leafValues>\n            4.4130811095237732e-01 7.1817511320114136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 3.9437441155314445e-03</internalNodes>\n          <leafValues>\n            5.4788607358932495e-01 2.7917331457138062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 -3.6591119132936001e-03</internalNodes>\n          <leafValues>\n            6.3578677177429199e-01 3.9897239208221436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 -3.8456181064248085e-03</internalNodes>\n          <leafValues>\n            3.4936860203742981e-01 5.3006649017333984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -7.1926261298358440e-03</internalNodes>\n          <leafValues>\n            1.1196149885654449e-01 5.2296727895736694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 -5.2798941731452942e-02</internalNodes>\n          <leafValues>\n            2.3871029913425446e-01 5.4534512758255005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 -7.9537667334079742e-03</internalNodes>\n          <leafValues>\n            7.5869178771972656e-01 4.4393768906593323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 -2.7344180271029472e-03</internalNodes>\n          <leafValues>\n            2.5654768943786621e-01 5.4893219470977783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 -1.8507939530536532e-03</internalNodes>\n          <leafValues>\n            6.7343479394912720e-01 4.2524749040603638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 1.5918919816613197e-02</internalNodes>\n          <leafValues>\n            5.4883527755737305e-01 2.2926619648933411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 -1.2687679845839739e-03</internalNodes>\n          <leafValues>\n            6.1043310165405273e-01 4.0223899483680725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 6.2883910723030567e-03</internalNodes>\n          <leafValues>\n            5.3108531236648560e-01 1.5361930429935455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 -6.2259892001748085e-03</internalNodes>\n          <leafValues>\n            1.7291119694709778e-01 5.2416062355041504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 -1.2132599949836731e-02</internalNodes>\n          <leafValues>\n            6.5977597236633301e-01 4.3251821398735046e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>50</maxWeakCount>\n      <stageThreshold>2.3918790817260742e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 156 -3.9184908382594585e-03</internalNodes>\n          <leafValues>\n            6.1034351587295532e-01 1.4693309366703033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 1.5971299726516008e-03</internalNodes>\n          <leafValues>\n            2.6323631405830383e-01 5.8964669704437256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 1.7780110239982605e-02</internalNodes>\n          <leafValues>\n            5.8728742599487305e-01 1.7603619396686554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 6.5334769897162914e-04</internalNodes>\n          <leafValues>\n            1.5678019821643829e-01 5.5960661172866821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 -2.8353091329336166e-04</internalNodes>\n          <leafValues>\n            1.9131539762020111e-01 5.7320362329483032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 1.6104689566418529e-03</internalNodes>\n          <leafValues>\n            2.9149138927459717e-01 5.6230807304382324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -9.7750619053840637e-02</internalNodes>\n          <leafValues>\n            1.9434769451618195e-01 5.6482332944869995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 5.5182358482852578e-04</internalNodes>\n          <leafValues>\n            3.1346169114112854e-01 5.5046397447586060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 -1.2858220376074314e-02</internalNodes>\n          <leafValues>\n            2.5364819169044495e-01 5.7601428031921387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 4.1530239395797253e-03</internalNodes>\n          <leafValues>\n            5.7677221298217773e-01 3.6597740650177002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 1.7092459602281451e-03</internalNodes>\n          <leafValues>\n            2.8431910276412964e-01 5.9189391136169434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 7.5217359699308872e-03</internalNodes>\n          <leafValues>\n            4.0524271130561829e-01 6.1831092834472656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 2.2479810286313295e-03</internalNodes>\n          <leafValues>\n            5.7837551832199097e-01 3.1354010105133057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 5.2006211131811142e-02</internalNodes>\n          <leafValues>\n            5.5413120985031128e-01 1.9166369736194611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 1.2085529975593090e-02</internalNodes>\n          <leafValues>\n            4.0326559543609619e-01 6.6445910930633545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 1.4687820112158079e-05</internalNodes>\n          <leafValues>\n            3.5359779000282288e-01 5.7093828916549683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 7.1395188570022583e-06</internalNodes>\n          <leafValues>\n            3.0374449491500854e-01 5.6102699041366577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 -4.6001640148460865e-03</internalNodes>\n          <leafValues>\n            7.1810871362686157e-01 4.5803260803222656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 2.0058949012309313e-03</internalNodes>\n          <leafValues>\n            5.6219518184661865e-01 2.9536840319633484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 4.5050270855426788e-03</internalNodes>\n          <leafValues>\n            4.6153879165649414e-01 7.6190179586410522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 1.1746830306947231e-02</internalNodes>\n          <leafValues>\n            5.3438371419906616e-01 1.7725290358066559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 -5.8316338807344437e-02</internalNodes>\n          <leafValues>\n            1.6862459480762482e-01 5.3407722711563110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 2.3629379575140774e-04</internalNodes>\n          <leafValues>\n            3.7920561432838440e-01 6.0268038511276245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 -7.8156180679798126e-03</internalNodes>\n          <leafValues>\n            1.5128670632839203e-01 5.3243237733840942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 -1.0876160115003586e-02</internalNodes>\n          <leafValues>\n            2.0818220078945160e-01 5.3199452161788940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 -2.7745519764721394e-03</internalNodes>\n          <leafValues>\n            4.0982469916343689e-01 5.2103281021118164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 -7.8276381827890873e-04</internalNodes>\n          <leafValues>\n            5.6932741403579712e-01 3.4788420796394348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 1.3870409689843655e-02</internalNodes>\n          <leafValues>\n            5.3267508745193481e-01 2.2576980292797089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 -2.3674910888075829e-02</internalNodes>\n          <leafValues>\n            1.5513050556182861e-01 5.2007079124450684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 -1.4879409718560055e-05</internalNodes>\n          <leafValues>\n            5.5005669593811035e-01 3.8201761245727539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 3.6190641112625599e-03</internalNodes>\n          <leafValues>\n            4.2386838793754578e-01 6.6397482156753540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 -1.9817110151052475e-02</internalNodes>\n          <leafValues>\n            2.1500380337238312e-01 5.3823578357696533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -3.8154039066284895e-03</internalNodes>\n          <leafValues>\n            6.6757112741470337e-01 4.2152971029281616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 -4.9775829538702965e-03</internalNodes>\n          <leafValues>\n            2.2672890126705170e-01 5.3863281011581421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 2.2441020701080561e-03</internalNodes>\n          <leafValues>\n            4.3086910247802734e-01 6.8557357788085938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 1.2282459996640682e-02</internalNodes>\n          <leafValues>\n            5.8366149663925171e-01 3.4674790501594543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 -2.8548699337989092e-03</internalNodes>\n          <leafValues>\n            7.0169448852539062e-01 4.3114539980888367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 -3.7875669077038765e-03</internalNodes>\n          <leafValues>\n            2.8953450918197632e-01 5.2249461412429810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 -1.2201230274513364e-03</internalNodes>\n          <leafValues>\n            2.9755708575248718e-01 5.4816448688507080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 1.0160599835216999e-02</internalNodes>\n          <leafValues>\n            4.8888179659843445e-01 8.1826978921890259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 -1.6174569725990295e-02</internalNodes>\n          <leafValues>\n            1.4814929664134979e-01 5.2399927377700806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 1.9292460754513741e-02</internalNodes>\n          <leafValues>\n            4.7863098978996277e-01 7.3781907558441162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 -3.2479539513587952e-03</internalNodes>\n          <leafValues>\n            7.3742228746414185e-01 4.4706439971923828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 -9.3803480267524719e-03</internalNodes>\n          <leafValues>\n            3.4891548752784729e-01 5.5379962921142578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 -1.2606129981577396e-02</internalNodes>\n          <leafValues>\n            2.3796869814395905e-01 5.3154432773590088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 -2.5621930137276649e-02</internalNodes>\n          <leafValues>\n            1.9646880030632019e-01 5.1387697458267212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 -7.5741496402770281e-05</internalNodes>\n          <leafValues>\n            5.5905228853225708e-01 3.3658531308174133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 -8.9210882782936096e-02</internalNodes>\n          <leafValues>\n            6.3404656946659088e-02 5.1626348495483398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 -2.7670480776578188e-03</internalNodes>\n          <leafValues>\n            7.3234677314758301e-01 4.4907060265541077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 2.7152578695677221e-04</internalNodes>\n          <leafValues>\n            4.1148349642753601e-01 5.9855180978775024e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>51</maxWeakCount>\n      <stageThreshold>2.4527879714965820e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 206 1.4786219689995050e-03</internalNodes>\n          <leafValues>\n            2.6635450124740601e-01 6.6433167457580566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 -1.8741659587249160e-03</internalNodes>\n          <leafValues>\n            6.1438488960266113e-01 2.5185129046440125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 -1.7151009524241090e-03</internalNodes>\n          <leafValues>\n            5.7663410902023315e-01 2.3974630236625671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 -1.8939269939437509e-03</internalNodes>\n          <leafValues>\n            5.6820458173751831e-01 2.5291448831558228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -5.3006052039563656e-03</internalNodes>\n          <leafValues>\n            1.6406759619712830e-01 5.5560797452926636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 -4.6662531793117523e-02</internalNodes>\n          <leafValues>\n            6.1231541633605957e-01 4.7628301382064819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 -7.9431332414969802e-04</internalNodes>\n          <leafValues>\n            5.7078588008880615e-01 2.8394040465354919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 1.4891670085489750e-02</internalNodes>\n          <leafValues>\n            4.0896728634834290e-01 6.0063672065734863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 -1.2046529445797205e-03</internalNodes>\n          <leafValues>\n            5.7124507427215576e-01 2.7052891254425049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 6.0619381256401539e-03</internalNodes>\n          <leafValues>\n            5.2625042200088501e-01 3.2622259855270386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 -2.5286648888140917e-03</internalNodes>\n          <leafValues>\n            6.8538308143615723e-01 4.1992568969726562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 -5.9010218828916550e-03</internalNodes>\n          <leafValues>\n            3.2662820816040039e-01 5.4348129034042358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 5.6702760048210621e-03</internalNodes>\n          <leafValues>\n            5.4684108495712280e-01 2.3190039396286011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 -3.0304100364446640e-03</internalNodes>\n          <leafValues>\n            5.5706679821014404e-01 2.7082380652427673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 2.9803649522364140e-03</internalNodes>\n          <leafValues>\n            3.7005689740180969e-01 5.8906257152557373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 -7.5840510427951813e-02</internalNodes>\n          <leafValues>\n            2.1400700509548187e-01 5.4199481010437012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 1.9262539222836494e-02</internalNodes>\n          <leafValues>\n            5.5267721414566040e-01 2.7265900373458862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 1.8888259364757687e-04</internalNodes>\n          <leafValues>\n            3.9580118656158447e-01 6.0172098875045776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 2.9369549825787544e-02</internalNodes>\n          <leafValues>\n            5.2413737773895264e-01 1.4357580244541168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 1.0417619487270713e-03</internalNodes>\n          <leafValues>\n            3.3854091167449951e-01 5.9299832582473755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 2.6125640142709017e-03</internalNodes>\n          <leafValues>\n            5.4853779077529907e-01 3.0215978622436523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 9.6977467183023691e-04</internalNodes>\n          <leafValues>\n            3.3752760291099548e-01 5.5320328474044800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 5.9512659208849072e-04</internalNodes>\n          <leafValues>\n            5.6317430734634399e-01 3.3593991398811340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 -1.0156559944152832e-01</internalNodes>\n          <leafValues>\n            6.3735038042068481e-02 5.2304250001907349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 3.6156699061393738e-02</internalNodes>\n          <leafValues>\n            5.1369631290435791e-01 1.0295289754867554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 3.4624140243977308e-03</internalNodes>\n          <leafValues>\n            3.8793200254440308e-01 5.5582892894744873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 1.9554980099201202e-02</internalNodes>\n          <leafValues>\n            5.2500867843627930e-01 1.8758599460124969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 -2.3121440317481756e-03</internalNodes>\n          <leafValues>\n            6.6720288991928101e-01 4.6796411275863647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 -1.8605289515107870e-03</internalNodes>\n          <leafValues>\n            7.1633791923522949e-01 4.3346709012985229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 -9.4026362057775259e-04</internalNodes>\n          <leafValues>\n            3.0213609337806702e-01 5.6502032279968262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -5.2418331615626812e-03</internalNodes>\n          <leafValues>\n            1.8200090527534485e-01 5.2502560615539551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 1.1729019752237946e-04</internalNodes>\n          <leafValues>\n            3.3891880512237549e-01 5.4459732770919800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 1.1878840159624815e-03</internalNodes>\n          <leafValues>\n            4.0853491425514221e-01 6.2535631656646729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 -1.0881359688937664e-02</internalNodes>\n          <leafValues>\n            3.3783990144729614e-01 5.7000827789306641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 1.7354859737679362e-03</internalNodes>\n          <leafValues>\n            4.2046359181404114e-01 6.5230387449264526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -6.5119052305817604e-03</internalNodes>\n          <leafValues>\n            2.5952160358428955e-01 5.4281437397003174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 -1.2136430013924837e-03</internalNodes>\n          <leafValues>\n            6.1651438474655151e-01 3.9778938889503479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 -1.0354240424931049e-02</internalNodes>\n          <leafValues>\n            1.6280280053615570e-01 5.2195048332214355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 5.5858830455690622e-04</internalNodes>\n          <leafValues>\n            3.1996509432792664e-01 5.5035740137100220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 1.5299649909138680e-02</internalNodes>\n          <leafValues>\n            4.1039940714836121e-01 6.1223882436752319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 -2.1588210016489029e-02</internalNodes>\n          <leafValues>\n            1.0349129885435104e-01 5.1973849534988403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 -1.2834629416465759e-01</internalNodes>\n          <leafValues>\n            8.4938651323318481e-01 4.8931029438972473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 -2.2927189711481333e-03</internalNodes>\n          <leafValues>\n            3.1301578879356384e-01 5.4715752601623535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 7.9915106296539307e-02</internalNodes>\n          <leafValues>\n            4.8563209176063538e-01 6.0739892721176147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 -7.9441092908382416e-02</internalNodes>\n          <leafValues>\n            8.3946740627288818e-01 4.6245330572128296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 -5.2800010889768600e-03</internalNodes>\n          <leafValues>\n            1.8816959857940674e-01 5.3066980838775635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 1.0463109938427806e-03</internalNodes>\n          <leafValues>\n            5.2712291479110718e-01 2.5830659270286560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 2.6317298761568964e-04</internalNodes>\n          <leafValues>\n            4.2353048920631409e-01 5.7354408502578735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 -3.6173160187900066e-03</internalNodes>\n          <leafValues>\n            6.9343960285186768e-01 4.4954448938369751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 1.1421879753470421e-02</internalNodes>\n          <leafValues>\n            5.9009212255477905e-01 4.1381931304931641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 -1.9963278900831938e-03</internalNodes>\n          <leafValues>\n            6.4663827419281006e-01 4.3272399902343750e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>56</maxWeakCount>\n      <stageThreshold>2.7153350830078125e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 257 -9.9691245704889297e-03</internalNodes>\n          <leafValues>\n            6.1423242092132568e-01 2.4822120368480682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 7.3073059320449829e-04</internalNodes>\n          <leafValues>\n            5.7049518823623657e-01 2.3219659924507141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 6.4045301405712962e-04</internalNodes>\n          <leafValues>\n            2.1122519671916962e-01 5.8149331808090210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 4.5424019917845726e-03</internalNodes>\n          <leafValues>\n            2.9504820704460144e-01 5.8663117885589600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 9.2477443104144186e-05</internalNodes>\n          <leafValues>\n            2.9909908771514893e-01 5.7913267612457275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 -8.6603146046400070e-03</internalNodes>\n          <leafValues>\n            2.8130298852920532e-01 5.6355422735214233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 8.0515816807746887e-03</internalNodes>\n          <leafValues>\n            3.5353690385818481e-01 6.0547572374343872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 4.3835240649059415e-04</internalNodes>\n          <leafValues>\n            5.5965322256088257e-01 2.7315109968185425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 -9.8168973636347800e-05</internalNodes>\n          <leafValues>\n            5.9780317544937134e-01 3.6385610699653625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 -1.1298790341243148e-03</internalNodes>\n          <leafValues>\n            2.7552521228790283e-01 5.4327291250228882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 6.4356150105595589e-03</internalNodes>\n          <leafValues>\n            4.3056419491767883e-01 7.0698332786560059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 -5.6829329580068588e-02</internalNodes>\n          <leafValues>\n            2.4952429533004761e-01 5.2949970960617065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 4.0668169967830181e-03</internalNodes>\n          <leafValues>\n            5.4785531759262085e-01 2.4977239966392517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 4.8164798499783501e-05</internalNodes>\n          <leafValues>\n            3.9386010169982910e-01 5.7063561677932739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 6.1795017682015896e-03</internalNodes>\n          <leafValues>\n            4.4076061248779297e-01 7.3947668075561523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 6.4985752105712891e-03</internalNodes>\n          <leafValues>\n            5.4452431201934814e-01 2.4791529774665833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 -1.0211090557277203e-03</internalNodes>\n          <leafValues>\n            2.5447669625282288e-01 5.3389710187911987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 -5.4247528314590454e-03</internalNodes>\n          <leafValues>\n            2.7188581228256226e-01 5.3240692615509033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 -1.0559899965301156e-03</internalNodes>\n          <leafValues>\n            3.1782880425453186e-01 5.5345088243484497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 6.6465808777138591e-04</internalNodes>\n          <leafValues>\n            4.2842191457748413e-01 6.5581941604614258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 -2.7524109464138746e-04</internalNodes>\n          <leafValues>\n            5.9028607606887817e-01 3.8102629780769348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 4.2293202131986618e-03</internalNodes>\n          <leafValues>\n            3.8164898753166199e-01 5.7093858718872070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 -3.2868210691958666e-03</internalNodes>\n          <leafValues>\n            1.7477439343929291e-01 5.2595442533493042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 1.5611879643984139e-04</internalNodes>\n          <leafValues>\n            3.6017221212387085e-01 5.7256120443344116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 -7.3621381488919724e-06</internalNodes>\n          <leafValues>\n            5.4018580913543701e-01 3.0444970726966858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 -1.4767250046133995e-02</internalNodes>\n          <leafValues>\n            3.2207700610160828e-01 5.5734348297119141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 2.4489590898156166e-02</internalNodes>\n          <leafValues>\n            4.3015280365943909e-01 6.5188127756118774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 -3.7652091123163700e-04</internalNodes>\n          <leafValues>\n            3.5645830631256104e-01 5.5982369184494019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 7.3657688517414499e-06</internalNodes>\n          <leafValues>\n            3.4907829761505127e-01 5.5618977546691895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 -1.5099939890205860e-02</internalNodes>\n          <leafValues>\n            1.7762720584869385e-01 5.3352999687194824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -3.8316650316119194e-03</internalNodes>\n          <leafValues>\n            6.1496877670288086e-01 4.2213940620422363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 1.6925400123000145e-02</internalNodes>\n          <leafValues>\n            5.4130148887634277e-01 2.1665850281715393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -3.0477850232273340e-03</internalNodes>\n          <leafValues>\n            6.4494907855987549e-01 4.3546178936958313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 3.2140589319169521e-03</internalNodes>\n          <leafValues>\n            5.4001551866531372e-01 3.5232171416282654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 -4.0023201145231724e-03</internalNodes>\n          <leafValues>\n            2.7745240926742554e-01 5.3384172916412354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 7.4182129465043545e-03</internalNodes>\n          <leafValues>\n            5.6767392158508301e-01 3.7028178572654724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 -8.8764587417244911e-03</internalNodes>\n          <leafValues>\n            7.7492219209671021e-01 4.5836889743804932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 2.7311739977449179e-03</internalNodes>\n          <leafValues>\n            5.3387218713760376e-01 3.9966610074043274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 -2.5082379579544067e-03</internalNodes>\n          <leafValues>\n            5.6119632720947266e-01 3.7774989008903503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 -8.0541074275970459e-03</internalNodes>\n          <leafValues>\n            2.9152289032936096e-01 5.1791828870773315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 -9.7938813269138336e-04</internalNodes>\n          <leafValues>\n            5.5364328622817993e-01 3.7001928687095642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 -5.8745909482240677e-03</internalNodes>\n          <leafValues>\n            3.7543910741806030e-01 5.6793761253356934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 -4.4936719350516796e-03</internalNodes>\n          <leafValues>\n            7.0196992158889771e-01 4.4809499382972717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -5.4389229044318199e-03</internalNodes>\n          <leafValues>\n            2.3103649914264679e-01 5.3133869171142578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 -7.5094640487805009e-04</internalNodes>\n          <leafValues>\n            5.8648687601089478e-01 4.1293430328369141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 1.4528800420521293e-05</internalNodes>\n          <leafValues>\n            3.7324070930480957e-01 5.6196212768554688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 4.0758069604635239e-02</internalNodes>\n          <leafValues>\n            5.3120911121368408e-01 2.7205219864845276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 6.6505931317806244e-03</internalNodes>\n          <leafValues>\n            4.7100159525871277e-01 6.6934937238693237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 4.5759351924061775e-03</internalNodes>\n          <leafValues>\n            5.1678192615509033e-01 1.6372759640216827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 6.5269311890006065e-03</internalNodes>\n          <leafValues>\n            5.3976088762283325e-01 2.9385319352149963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 -1.3660379685461521e-02</internalNodes>\n          <leafValues>\n            7.0864880084991455e-01 4.5322000980377197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 2.7358869090676308e-02</internalNodes>\n          <leafValues>\n            5.2064812183380127e-01 3.5892319679260254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 6.2197551596909761e-04</internalNodes>\n          <leafValues>\n            3.5070759057998657e-01 5.4411232471466064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 -3.3077080734074116e-03</internalNodes>\n          <leafValues>\n            5.8595228195190430e-01 4.0248918533325195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 -1.0631109587848186e-02</internalNodes>\n          <leafValues>\n            6.7432671785354614e-01 4.4226029515266418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 1.9441649317741394e-02</internalNodes>\n          <leafValues>\n            5.2827161550521851e-01 1.7979049682617188e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>71</maxWeakCount>\n      <stageThreshold>3.4554111480712891e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 313 -5.5052167735993862e-03</internalNodes>\n          <leafValues>\n            5.9147310256958008e-01 2.6265591382980347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 1.9562279339879751e-03</internalNodes>\n          <leafValues>\n            2.3125819861888885e-01 5.7416272163391113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 -8.8924784213304520e-03</internalNodes>\n          <leafValues>\n            1.6565300524234772e-01 5.6266540288925171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 8.3638377487659454e-02</internalNodes>\n          <leafValues>\n            5.4234498739242554e-01 1.9572949409484863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 1.2282270472496748e-03</internalNodes>\n          <leafValues>\n            3.4179040789604187e-01 5.9925037622451782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 5.7629169896245003e-03</internalNodes>\n          <leafValues>\n            3.7195819616317749e-01 6.0799038410186768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 -1.6417410224676132e-03</internalNodes>\n          <leafValues>\n            2.5774860382080078e-01 5.5769157409667969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 3.4113149158656597e-03</internalNodes>\n          <leafValues>\n            2.9507490992546082e-01 5.5141717195510864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 -1.1069320142269135e-02</internalNodes>\n          <leafValues>\n            7.5693589448928833e-01 4.4770789146423340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 3.4865971654653549e-02</internalNodes>\n          <leafValues>\n            5.5837088823318481e-01 2.6696211099624634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 6.5701099811121821e-04</internalNodes>\n          <leafValues>\n            5.6273132562637329e-01 2.9888901114463806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 -2.4339130148291588e-02</internalNodes>\n          <leafValues>\n            2.7711850404739380e-01 5.1088631153106689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 5.9435202274471521e-04</internalNodes>\n          <leafValues>\n            5.5806517601013184e-01 3.1203418970108032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 2.2971509024500847e-03</internalNodes>\n          <leafValues>\n            3.3302500844001770e-01 5.6790757179260254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 -3.7801829166710377e-03</internalNodes>\n          <leafValues>\n            2.9905349016189575e-01 5.3448081016540527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 -1.3420669734477997e-01</internalNodes>\n          <leafValues>\n            1.4638589322566986e-01 5.3925681114196777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 7.5224548345431685e-04</internalNodes>\n          <leafValues>\n            3.7469539046287537e-01 5.6927347183227539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 -4.0545541793107986e-02</internalNodes>\n          <leafValues>\n            2.7547478675842285e-01 5.4842978715896606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 1.2572970008477569e-03</internalNodes>\n          <leafValues>\n            3.7445840239524841e-01 5.7560759782791138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 -7.4249948374927044e-03</internalNodes>\n          <leafValues>\n            7.5138592720031738e-01 4.7282311320304871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 5.0908129196614027e-04</internalNodes>\n          <leafValues>\n            5.4048967361450195e-01 2.9323211312294006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 -1.2808450264856219e-03</internalNodes>\n          <leafValues>\n            6.1697798967361450e-01 4.2733490467071533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 -1.8348860321566463e-03</internalNodes>\n          <leafValues>\n            2.0484960079193115e-01 5.2064722776412964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 2.7484869584441185e-02</internalNodes>\n          <leafValues>\n            5.2529847621917725e-01 1.6755220293998718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 2.2372419480234385e-03</internalNodes>\n          <leafValues>\n            5.2677828073501587e-01 2.7776581048965454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 -8.8635291904211044e-03</internalNodes>\n          <leafValues>\n            6.9545578956604004e-01 4.8120489716529846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 4.1753971017897129e-03</internalNodes>\n          <leafValues>\n            4.2918878793716431e-01 6.3491958379745483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 -1.7098189564421773e-03</internalNodes>\n          <leafValues>\n            2.9305368661880493e-01 5.3612488508224487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 6.5328548662364483e-03</internalNodes>\n          <leafValues>\n            4.4953250885009766e-01 7.4096941947937012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 -9.5372907817363739e-03</internalNodes>\n          <leafValues>\n            3.1491199135780334e-01 5.4165017604827881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 2.5310989469289780e-02</internalNodes>\n          <leafValues>\n            5.1218920946121216e-01 1.3117079436779022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 3.6460969597101212e-02</internalNodes>\n          <leafValues>\n            5.1759117841720581e-01 2.5913399457931519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 2.0854329690337181e-02</internalNodes>\n          <leafValues>\n            5.1371401548385620e-01 1.5823160111904144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 -8.7207747856155038e-04</internalNodes>\n          <leafValues>\n            5.5743098258972168e-01 4.3989789485931396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 -1.5227000403683633e-05</internalNodes>\n          <leafValues>\n            5.5489408969879150e-01 3.7080699205398560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 -8.4316509310156107e-04</internalNodes>\n          <leafValues>\n            3.3874198794364929e-01 5.5542111396789551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 3.6037859972566366e-03</internalNodes>\n          <leafValues>\n            5.3580617904663086e-01 3.4111711382865906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 -6.8057891912758350e-03</internalNodes>\n          <leafValues>\n            6.1252027750015259e-01 4.3458628654479980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 -4.7021660953760147e-02</internalNodes>\n          <leafValues>\n            2.3581659793853760e-01 5.1937389373779297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 -3.6954108625650406e-02</internalNodes>\n          <leafValues>\n            7.3231112957000732e-01 4.7609439492225647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 1.0439479956403375e-03</internalNodes>\n          <leafValues>\n            5.4194551706314087e-01 3.4113308787345886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 -2.1050689974799752e-04</internalNodes>\n          <leafValues>\n            2.8216940164566040e-01 5.5549472570419312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 -8.0831587314605713e-02</internalNodes>\n          <leafValues>\n            9.1299301385879517e-01 4.6974349021911621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 -3.6579059087671340e-04</internalNodes>\n          <leafValues>\n            6.0226702690124512e-01 3.9782929420471191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 -1.2545920617412776e-04</internalNodes>\n          <leafValues>\n            5.6132131814956665e-01 3.8455399870872498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 -6.8786486983299255e-02</internalNodes>\n          <leafValues>\n            2.2616119682788849e-01 5.3004968166351318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 1.2415789999067783e-02</internalNodes>\n          <leafValues>\n            4.0756919980049133e-01 5.8288121223449707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 -4.7174817882478237e-03</internalNodes>\n          <leafValues>\n            2.8272539377212524e-01 5.2677577733993530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 3.8136858493089676e-02</internalNodes>\n          <leafValues>\n            5.0747412443161011e-01 1.0236159712076187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 -2.8168049175292253e-03</internalNodes>\n          <leafValues>\n            6.1690068244934082e-01 4.3596929311752319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 8.1303603947162628e-03</internalNodes>\n          <leafValues>\n            4.5244330167770386e-01 7.6060950756072998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 6.0056019574403763e-03</internalNodes>\n          <leafValues>\n            5.2404087781906128e-01 1.8597120046615601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 1.9139319658279419e-02</internalNodes>\n          <leafValues>\n            5.2093791961669922e-01 2.3320719599723816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 1.6445759683847427e-02</internalNodes>\n          <leafValues>\n            5.4507029056549072e-01 3.2642349600791931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 -3.7356890738010406e-02</internalNodes>\n          <leafValues>\n            6.9990468025207520e-01 4.5332419872283936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -1.9727900624275208e-02</internalNodes>\n          <leafValues>\n            2.6536649465560913e-01 5.4128098487854004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 6.6972579807043076e-03</internalNodes>\n          <leafValues>\n            4.4805660843849182e-01 7.1386522054672241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 7.4457528535276651e-04</internalNodes>\n          <leafValues>\n            4.2313501238822937e-01 5.4713201522827148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 1.1790640419349074e-03</internalNodes>\n          <leafValues>\n            5.3417021036148071e-01 3.1304550170898438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 3.4980610013008118e-02</internalNodes>\n          <leafValues>\n            5.1186597347259521e-01 3.4305301308631897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 5.6859792675822973e-04</internalNodes>\n          <leafValues>\n            3.5321870446205139e-01 5.4686397314071655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 -1.1340649798512459e-02</internalNodes>\n          <leafValues>\n            2.8423538804054260e-01 5.3487008810043335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 -6.6228108480572701e-03</internalNodes>\n          <leafValues>\n            6.8836402893066406e-01 4.4926649332046509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 -8.0160330981016159e-03</internalNodes>\n          <leafValues>\n            1.7098939418792725e-01 5.2243089675903320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 1.4206819469109178e-03</internalNodes>\n          <leafValues>\n            5.2908462285995483e-01 2.9933831095695496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 -2.7801711112260818e-03</internalNodes>\n          <leafValues>\n            6.4988541603088379e-01 4.4604998826980591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 -1.4747589593753219e-03</internalNodes>\n          <leafValues>\n            3.2604381442070007e-01 5.3881132602691650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 -2.3830339312553406e-02</internalNodes>\n          <leafValues>\n            7.5289410352706909e-01 4.8012199997901917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 6.9369790144264698e-03</internalNodes>\n          <leafValues>\n            5.3351658582687378e-01 3.2614278793334961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 8.2806255668401718e-03</internalNodes>\n          <leafValues>\n            4.5803940296173096e-01 5.7378298044204712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 -1.0439500212669373e-02</internalNodes>\n          <leafValues>\n            2.5923201441764832e-01 5.2338278293609619e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>80</maxWeakCount>\n      <stageThreshold>3.9107288360595703e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 384 7.2006587870419025e-03</internalNodes>\n          <leafValues>\n            3.2588860392570496e-01 6.8498080968856812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 -2.8593589086085558e-03</internalNodes>\n          <leafValues>\n            5.8388811349868774e-01 2.5378298759460449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 6.8580528022721410e-04</internalNodes>\n          <leafValues>\n            5.7080817222595215e-01 2.8124240040779114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 7.9580191522836685e-03</internalNodes>\n          <leafValues>\n            2.5010511279106140e-01 5.5442607402801514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 -1.2124150525778532e-03</internalNodes>\n          <leafValues>\n            2.3853680491447449e-01 5.4333502054214478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 7.9426132142543793e-03</internalNodes>\n          <leafValues>\n            3.9550709724426270e-01 6.2207579612731934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 2.4630590341985226e-03</internalNodes>\n          <leafValues>\n            5.6397080421447754e-01 2.9923579096794128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 -6.0396599583327770e-03</internalNodes>\n          <leafValues>\n            2.1865129470825195e-01 5.4116767644882202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 -1.2988339876756072e-03</internalNodes>\n          <leafValues>\n            2.3507060110569000e-01 5.3645849227905273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 2.2299369447864592e-04</internalNodes>\n          <leafValues>\n            3.8041129708290100e-01 5.7296061515808105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 1.4654280385002494e-03</internalNodes>\n          <leafValues>\n            2.5101679563522339e-01 5.2582687139511108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 -8.1210042117163539e-04</internalNodes>\n          <leafValues>\n            5.9928238391876221e-01 3.8511589169502258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 -1.3836020370945334e-03</internalNodes>\n          <leafValues>\n            5.6813961267471313e-01 3.6365869641304016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 -2.7936449274420738e-02</internalNodes>\n          <leafValues>\n            1.4913170039653778e-01 5.3775602579116821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 -4.6919551095925272e-04</internalNodes>\n          <leafValues>\n            3.6924299597740173e-01 5.5724847316741943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 -4.9829659983515739e-03</internalNodes>\n          <leafValues>\n            6.7585092782974243e-01 4.5325040817260742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 1.8815309740602970e-03</internalNodes>\n          <leafValues>\n            5.3680229187011719e-01 2.9325398802757263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 -1.9067550078034401e-02</internalNodes>\n          <leafValues>\n            1.6493770480155945e-01 5.3300672769546509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 -4.6906559728085995e-03</internalNodes>\n          <leafValues>\n            1.9639259576797485e-01 5.1193618774414062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 5.9777139686048031e-03</internalNodes>\n          <leafValues>\n            4.6711719036102295e-01 7.0083981752395630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 -3.3303130418062210e-02</internalNodes>\n          <leafValues>\n            1.1554169654846191e-01 5.1041620969772339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 9.0744107961654663e-02</internalNodes>\n          <leafValues>\n            5.1496601104736328e-01 1.3061730563640594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 9.3555898638442159e-04</internalNodes>\n          <leafValues>\n            3.6054810881614685e-01 5.4398590326309204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 1.4901650138199329e-02</internalNodes>\n          <leafValues>\n            4.8862120509147644e-01 7.6875698566436768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 6.1594118596985936e-04</internalNodes>\n          <leafValues>\n            5.3568130731582642e-01 3.2409390807151794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 -5.0670988857746124e-02</internalNodes>\n          <leafValues>\n            1.8486219644546509e-01 5.2304041385650635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 6.8665749859064817e-04</internalNodes>\n          <leafValues>\n            3.8405799865722656e-01 5.5179458856582642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 8.3712432533502579e-03</internalNodes>\n          <leafValues>\n            4.2885640263557434e-01 6.1317539215087891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 -1.2953069526702166e-03</internalNodes>\n          <leafValues>\n            2.9136741161346436e-01 5.2807378768920898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 -4.1941680014133453e-02</internalNodes>\n          <leafValues>\n            7.5547999143600464e-01 4.8560309410095215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 -2.3529380559921265e-02</internalNodes>\n          <leafValues>\n            2.8382799029350281e-01 5.2560812234878540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 4.0857449173927307e-02</internalNodes>\n          <leafValues>\n            4.8709350824356079e-01 6.2772971391677856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 -2.5406869128346443e-02</internalNodes>\n          <leafValues>\n            7.0997077226638794e-01 4.5750290155410767e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 -4.1415440500713885e-04</internalNodes>\n          <leafValues>\n            4.0308868885040283e-01 5.4694122076034546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 2.1824119612574577e-02</internalNodes>\n          <leafValues>\n            4.5020240545272827e-01 6.7687010765075684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 1.4114039950072765e-02</internalNodes>\n          <leafValues>\n            5.4428607225418091e-01 3.7917000055313110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 6.7214590671937913e-05</internalNodes>\n          <leafValues>\n            4.2004638910293579e-01 5.8734762668609619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 -7.9417638480663300e-03</internalNodes>\n          <leafValues>\n            3.7925618886947632e-01 5.5852657556533813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 -7.2144409641623497e-03</internalNodes>\n          <leafValues>\n            7.2531038522720337e-01 4.6035489439964294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 2.5817339774221182e-03</internalNodes>\n          <leafValues>\n            4.6933019161224365e-01 5.9002387523651123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 1.3409319519996643e-01</internalNodes>\n          <leafValues>\n            5.1492130756378174e-01 1.8088449537754059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 2.2962710354477167e-03</internalNodes>\n          <leafValues>\n            5.3997439146041870e-01 3.7178671360015869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 -2.1575849968940020e-03</internalNodes>\n          <leafValues>\n            2.4084959924221039e-01 5.1488637924194336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 -4.9196188338100910e-03</internalNodes>\n          <leafValues>\n            6.5735882520675659e-01 4.7387400269508362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 1.6267469618469477e-03</internalNodes>\n          <leafValues>\n            4.1928219795227051e-01 6.3031142950057983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 3.3413388882763684e-04</internalNodes>\n          <leafValues>\n            5.5402982234954834e-01 3.7021011114120483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 -2.6698080822825432e-02</internalNodes>\n          <leafValues>\n            1.7109179496765137e-01 5.1014107465744019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 -3.0561879277229309e-02</internalNodes>\n          <leafValues>\n            1.9042180478572845e-01 5.1687937974929810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 2.8511548880487680e-03</internalNodes>\n          <leafValues>\n            4.4475069642066956e-01 6.3138538599014282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -3.6211479455232620e-02</internalNodes>\n          <leafValues>\n            2.4907270073890686e-01 5.3773492574691772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 -2.4115189444273710e-03</internalNodes>\n          <leafValues>\n            5.3812432289123535e-01 3.6642369627952576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 -7.7253201743587852e-04</internalNodes>\n          <leafValues>\n            5.5302321910858154e-01 3.5415500402450562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 2.9481729143299162e-04</internalNodes>\n          <leafValues>\n            4.1326990723609924e-01 5.6672430038452148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 -6.2334560789167881e-03</internalNodes>\n          <leafValues>\n            9.8787233233451843e-02 5.1986688375473022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 -2.6274729520082474e-02</internalNodes>\n          <leafValues>\n            9.1127492487430573e-02 5.0281071662902832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 5.3212260827422142e-03</internalNodes>\n          <leafValues>\n            4.7266489267349243e-01 6.2227207422256470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 -4.1129058226943016e-03</internalNodes>\n          <leafValues>\n            2.1574570238590240e-01 5.1378047466278076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 3.2457809429615736e-03</internalNodes>\n          <leafValues>\n            5.4107707738876343e-01 3.7217769026756287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 -1.6359709203243256e-02</internalNodes>\n          <leafValues>\n            7.7878749370574951e-01 4.6852919459342957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 3.2166109303943813e-04</internalNodes>\n          <leafValues>\n            5.4789870977401733e-01 4.2403739690780640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 6.4452440710738301e-04</internalNodes>\n          <leafValues>\n            5.3305608034133911e-01 3.5013249516487122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 -7.8909732401371002e-03</internalNodes>\n          <leafValues>\n            6.9235211610794067e-01 4.7265690565109253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 4.8336211591959000e-02</internalNodes>\n          <leafValues>\n            5.0559002161026001e-01 7.5749203562736511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 -7.5178127735853195e-04</internalNodes>\n          <leafValues>\n            3.7837418913841248e-01 5.5385738611221313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 -2.4953910615295172e-03</internalNodes>\n          <leafValues>\n            3.0816510319709778e-01 5.3596121072769165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 -2.2385010961443186e-03</internalNodes>\n          <leafValues>\n            6.6339588165283203e-01 4.6493428945541382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -1.7988430336117744e-03</internalNodes>\n          <leafValues>\n            6.5968447923660278e-01 4.3471878767013550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 8.7860915809869766e-03</internalNodes>\n          <leafValues>\n            5.2318328619003296e-01 2.3155799508094788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 3.6715380847454071e-03</internalNodes>\n          <leafValues>\n            5.2042502164840698e-01 2.9773768782615662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 -3.5336449742317200e-02</internalNodes>\n          <leafValues>\n            7.2388780117034912e-01 4.8615050315856934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -6.9189240457490087e-04</internalNodes>\n          <leafValues>\n            3.1050220131874084e-01 5.2298247814178467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 -3.3946109469980001e-03</internalNodes>\n          <leafValues>\n            3.1389680504798889e-01 5.2101737260818481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 9.8569283727556467e-04</internalNodes>\n          <leafValues>\n            4.5365801453590393e-01 6.5850979089736938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 -5.0163101404905319e-02</internalNodes>\n          <leafValues>\n            1.8044540286064148e-01 5.1989167928695679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 -2.2367259953171015e-03</internalNodes>\n          <leafValues>\n            7.2557020187377930e-01 4.6513590216636658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 7.4326287722215056e-04</internalNodes>\n          <leafValues>\n            4.4129210710525513e-01 5.8985459804534912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 -9.3485182151198387e-04</internalNodes>\n          <leafValues>\n            3.5000529885292053e-01 5.3660178184509277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 1.7497939988970757e-02</internalNodes>\n          <leafValues>\n            4.9121949076652527e-01 8.3152848482131958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 -1.5200000489130616e-03</internalNodes>\n          <leafValues>\n            3.5702759027481079e-01 5.3705602884292603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 7.8003940870985389e-04</internalNodes>\n          <leafValues>\n            4.3537721037864685e-01 5.9673351049423218e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>103</maxWeakCount>\n      <stageThreshold>5.0610481262207031e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 464 -9.9945552647113800e-03</internalNodes>\n          <leafValues>\n            6.1625832319259644e-01 3.0545330047607422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 -1.1085229925811291e-03</internalNodes>\n          <leafValues>\n            5.8182948827743530e-01 3.1555780768394470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 1.0364380432292819e-03</internalNodes>\n          <leafValues>\n            2.5520521402359009e-01 5.6929117441177368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 6.8211311008781195e-04</internalNodes>\n          <leafValues>\n            3.6850899457931519e-01 5.9349310398101807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 -6.8057340104132891e-04</internalNodes>\n          <leafValues>\n            2.3323920369148254e-01 5.4747921228408813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 2.6068789884448051e-04</internalNodes>\n          <leafValues>\n            3.2574570178985596e-01 5.6675457954406738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 5.1607372006401420e-04</internalNodes>\n          <leafValues>\n            3.7447169423103333e-01 5.8454728126525879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 8.5007521556690335e-04</internalNodes>\n          <leafValues>\n            3.4203711152076721e-01 5.5228072404861450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 -1.8607829697430134e-03</internalNodes>\n          <leafValues>\n            2.8044199943542480e-01 5.3754240274429321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 -1.5033970121294260e-03</internalNodes>\n          <leafValues>\n            2.5790509581565857e-01 5.4989522695541382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 2.3478909861296415e-03</internalNodes>\n          <leafValues>\n            4.1751560568809509e-01 6.3137108087539673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 -2.8880240279249847e-04</internalNodes>\n          <leafValues>\n            5.8651697635650635e-01 4.0526661276817322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 8.9405477046966553e-03</internalNodes>\n          <leafValues>\n            5.2111411094665527e-01 2.3186540603637695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 -1.9327739253640175e-02</internalNodes>\n          <leafValues>\n            2.7534329891204834e-01 5.2415257692337036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 -2.0202060113660991e-04</internalNodes>\n          <leafValues>\n            5.7229787111282349e-01 3.6771959066390991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 2.1179069299250841e-03</internalNodes>\n          <leafValues>\n            4.4661080837249756e-01 5.5424308776855469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 -1.7743760254234076e-03</internalNodes>\n          <leafValues>\n            2.8132531046867371e-01 5.3009599447250366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 4.2234458960592747e-03</internalNodes>\n          <leafValues>\n            4.3997099995613098e-01 5.7954281568527222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -1.4375220052897930e-02</internalNodes>\n          <leafValues>\n            2.9811179637908936e-01 5.2920591831207275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 -1.5349180437624454e-02</internalNodes>\n          <leafValues>\n            7.7052152156829834e-01 4.7481718659400940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 1.5152279956964776e-05</internalNodes>\n          <leafValues>\n            3.7188440561294556e-01 5.5768972635269165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 -9.1293919831514359e-03</internalNodes>\n          <leafValues>\n            3.6151960492134094e-01 5.2867668867111206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 2.2512159775942564e-03</internalNodes>\n          <leafValues>\n            5.3647047281265259e-01 3.4862980246543884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 -4.9696918576955795e-03</internalNodes>\n          <leafValues>\n            6.9276517629623413e-01 4.6768361330032349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 -1.2829010374844074e-02</internalNodes>\n          <leafValues>\n            7.7121537923812866e-01 4.6607351303100586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 -9.3660065904259682e-03</internalNodes>\n          <leafValues>\n            3.3749839663505554e-01 5.3512877225875854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 3.2452319283038378e-03</internalNodes>\n          <leafValues>\n            5.3251898288726807e-01 3.2896101474761963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 -1.1723560281097889e-02</internalNodes>\n          <leafValues>\n            6.8376529216766357e-01 4.7543001174926758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 2.9257940695970319e-05</internalNodes>\n          <leafValues>\n            3.5720878839492798e-01 5.3605020046234131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 -2.2244219508138485e-05</internalNodes>\n          <leafValues>\n            5.5414271354675293e-01 3.5520640015602112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 5.0881509669125080e-03</internalNodes>\n          <leafValues>\n            5.0708442926406860e-01 1.2564620375633240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 2.7429679408669472e-02</internalNodes>\n          <leafValues>\n            5.2695602178573608e-01 1.6258180141448975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 -6.4142867922782898e-03</internalNodes>\n          <leafValues>\n            7.1455889940261841e-01 4.5841971039772034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 3.3479959238320589e-03</internalNodes>\n          <leafValues>\n            5.3986120223999023e-01 3.4946969151496887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 -8.2635492086410522e-02</internalNodes>\n          <leafValues>\n            2.4391929805278778e-01 5.1602262258529663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 1.0261740535497665e-03</internalNodes>\n          <leafValues>\n            3.8868919014930725e-01 5.7679080963134766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 -1.6307090409100056e-03</internalNodes>\n          <leafValues>\n            3.3894580602645874e-01 5.3477007150650024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 2.4546680506318808e-03</internalNodes>\n          <leafValues>\n            4.6014139056205750e-01 6.3872468471527100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 -9.9476519972085953e-04</internalNodes>\n          <leafValues>\n            5.7698792219161987e-01 4.1203960776329041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 1.5409190207719803e-02</internalNodes>\n          <leafValues>\n            4.8787090182304382e-01 7.0898222923278809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 1.1784400558099151e-03</internalNodes>\n          <leafValues>\n            5.2635532617568970e-01 2.8952449560165405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 -2.7701919898390770e-02</internalNodes>\n          <leafValues>\n            1.4988289773464203e-01 5.2196067571640015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 -2.9505399987101555e-02</internalNodes>\n          <leafValues>\n            2.4893319234251976e-02 4.9998161196708679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 4.5159430010244250e-04</internalNodes>\n          <leafValues>\n            5.4646229743957520e-01 4.0296629071235657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 7.1772639639675617e-03</internalNodes>\n          <leafValues>\n            4.2710569500923157e-01 5.8662968873977661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 -7.4182048439979553e-02</internalNodes>\n          <leafValues>\n            6.8741792440414429e-01 4.9190279841423035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 -1.7254160717129707e-02</internalNodes>\n          <leafValues>\n            3.3706760406494141e-01 5.3487390279769897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 1.4851559884846210e-02</internalNodes>\n          <leafValues>\n            4.6267929673194885e-01 6.1299049854278564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 1.0002000257372856e-02</internalNodes>\n          <leafValues>\n            5.3461229801177979e-01 3.4234538674354553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 2.0138120744377375e-03</internalNodes>\n          <leafValues>\n            4.6438300609588623e-01 5.8243042230606079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 1.5135470312088728e-03</internalNodes>\n          <leafValues>\n            5.1963961124420166e-01 2.8561499714851379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 3.1381431035697460e-03</internalNodes>\n          <leafValues>\n            4.8381629586219788e-01 5.9585297107696533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 -5.1450440660119057e-03</internalNodes>\n          <leafValues>\n            8.9203029870986938e-01 4.7414121031761169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 -4.4736708514392376e-03</internalNodes>\n          <leafValues>\n            2.0339429378509521e-01 5.3372788429260254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 1.9628470763564110e-03</internalNodes>\n          <leafValues>\n            4.5716339349746704e-01 6.7258632183074951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 5.4260450415313244e-03</internalNodes>\n          <leafValues>\n            5.2711081504821777e-01 2.8456708788871765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 4.9611460417509079e-04</internalNodes>\n          <leafValues>\n            4.1383129358291626e-01 5.7185977697372437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 9.3728788197040558e-03</internalNodes>\n          <leafValues>\n            5.2251511812210083e-01 2.8048470616340637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 6.0500897234305739e-04</internalNodes>\n          <leafValues>\n            5.2367687225341797e-01 3.3145239949226379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 5.6792551185935736e-04</internalNodes>\n          <leafValues>\n            4.5310598611831665e-01 6.2769711017608643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 2.4644339457154274e-02</internalNodes>\n          <leafValues>\n            5.1308518648147583e-01 2.0171439647674561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 -1.0290450416505337e-02</internalNodes>\n          <leafValues>\n            7.7865952253341675e-01 4.8766410350799561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 2.0629419013857841e-03</internalNodes>\n          <leafValues>\n            4.2885988950729370e-01 5.8812642097473145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 -5.0519481301307678e-03</internalNodes>\n          <leafValues>\n            3.5239779949188232e-01 5.2860087156295776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 -5.7692620903253555e-03</internalNodes>\n          <leafValues>\n            6.8410861492156982e-01 4.5880940556526184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 -4.5789941214025021e-04</internalNodes>\n          <leafValues>\n            3.5655200481414795e-01 5.4859781265258789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 -7.5918837683275342e-04</internalNodes>\n          <leafValues>\n            3.3687931299209595e-01 5.2541971206665039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 -1.7737259622663260e-03</internalNodes>\n          <leafValues>\n            3.4221610426902771e-01 5.4540151357650757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 -8.5610467940568924e-03</internalNodes>\n          <leafValues>\n            6.5336120128631592e-01 4.4858568906784058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 1.7277270089834929e-03</internalNodes>\n          <leafValues>\n            5.3075802326202393e-01 3.9253529906272888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 -2.8199609369039536e-02</internalNodes>\n          <leafValues>\n            6.8574589490890503e-01 4.5885840058326721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 -1.7781109781935811e-03</internalNodes>\n          <leafValues>\n            4.0378510951995850e-01 5.3698569536209106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 3.3177141449414194e-04</internalNodes>\n          <leafValues>\n            5.3997987508773804e-01 3.7057501077651978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 2.6385399978607893e-03</internalNodes>\n          <leafValues>\n            4.6654370427131653e-01 6.4527308940887451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 -2.1183069329708815e-03</internalNodes>\n          <leafValues>\n            5.9147810935974121e-01 4.0646770596504211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 -1.4773289673030376e-02</internalNodes>\n          <leafValues>\n            3.6420381069183350e-01 5.2947628498077393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 -1.6815440729260445e-02</internalNodes>\n          <leafValues>\n            2.6642319560050964e-01 5.1449728012084961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 -6.3370140269398689e-03</internalNodes>\n          <leafValues>\n            6.7795312404632568e-01 4.8520979285240173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 -4.4560048991115764e-05</internalNodes>\n          <leafValues>\n            5.6139647960662842e-01 4.1530540585517883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 -1.0240620467811823e-03</internalNodes>\n          <leafValues>\n            5.9644782543182373e-01 4.5663040876388550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 -2.3161689750850201e-03</internalNodes>\n          <leafValues>\n            2.9761150479316711e-01 5.1881599426269531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 5.3217571973800659e-01</internalNodes>\n          <leafValues>\n            5.1878392696380615e-01 2.2026319801807404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 -1.6643050312995911e-01</internalNodes>\n          <leafValues>\n            1.8660229444503784e-01 5.0603431463241577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 1.1253529787063599e-01</internalNodes>\n          <leafValues>\n            5.2121251821517944e-01 1.1850229650735855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 9.3046864494681358e-03</internalNodes>\n          <leafValues>\n            4.5899370312690735e-01 6.8261492252349854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 -4.6255099587142467e-03</internalNodes>\n          <leafValues>\n            3.0799409747123718e-01 5.2250087261199951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 -1.1116469651460648e-01</internalNodes>\n          <leafValues>\n            2.1010440587997437e-01 5.0808018445968628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 -1.0888439603149891e-02</internalNodes>\n          <leafValues>\n            5.7653552293777466e-01 4.7904640436172485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 5.8564301580190659e-03</internalNodes>\n          <leafValues>\n            5.0651001930236816e-01 1.5635989606380463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 5.4854389280080795e-02</internalNodes>\n          <leafValues>\n            4.9669149518013000e-01 7.2305107116699219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 -1.1197339743375778e-02</internalNodes>\n          <leafValues>\n            2.1949790418148041e-01 5.0987982749938965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 4.4069071300327778e-03</internalNodes>\n          <leafValues>\n            4.7784018516540527e-01 6.7709028720855713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -6.3665293157100677e-02</internalNodes>\n          <leafValues>\n            1.9363629817962646e-01 5.0810241699218750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 -9.8081491887569427e-03</internalNodes>\n          <leafValues>\n            5.9990632534027100e-01 4.8103410005569458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 -2.1717099007219076e-03</internalNodes>\n          <leafValues>\n            3.3383339643478394e-01 5.2354729175567627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 -1.3315520249307156e-02</internalNodes>\n          <leafValues>\n            6.6170698404312134e-01 4.9192130565643311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 2.5442079640924931e-03</internalNodes>\n          <leafValues>\n            4.4887441396713257e-01 6.0821849107742310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 561 1.2037839740514755e-02</internalNodes>\n          <leafValues>\n            5.4093921184539795e-01 3.2924321293830872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 -2.0701050758361816e-02</internalNodes>\n          <leafValues>\n            6.8191200494766235e-01 4.5949959754943848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 2.7608279138803482e-02</internalNodes>\n          <leafValues>\n            4.6307921409606934e-01 5.7672828435897827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 1.2370620388537645e-03</internalNodes>\n          <leafValues>\n            5.1653790473937988e-01 2.6350161433219910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 -3.7669338285923004e-02</internalNodes>\n          <leafValues>\n            2.5363931059837341e-01 5.2789801359176636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 -1.8057259730994701e-03</internalNodes>\n          <leafValues>\n            3.9851561188697815e-01 5.5175000429153442e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>111</maxWeakCount>\n      <stageThreshold>5.4620071411132812e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 567 4.4299028813838959e-03</internalNodes>\n          <leafValues>\n            2.8910180926322937e-01 6.3352262973785400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 -2.3813319858163595e-03</internalNodes>\n          <leafValues>\n            6.2117892503738403e-01 3.4774878621101379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 2.2915711160749197e-03</internalNodes>\n          <leafValues>\n            2.2544120252132416e-01 5.5821180343627930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 9.9457940086722374e-04</internalNodes>\n          <leafValues>\n            3.7117108702659607e-01 5.9300708770751953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 7.7164667891338468e-04</internalNodes>\n          <leafValues>\n            5.6517201662063599e-01 3.3479958772659302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 -1.1386410333216190e-03</internalNodes>\n          <leafValues>\n            3.0691260099411011e-01 5.5086308717727661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 -1.6403039626311511e-04</internalNodes>\n          <leafValues>\n            5.7628279924392700e-01 3.6990478634834290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 2.9793529392918572e-05</internalNodes>\n          <leafValues>\n            2.6442441344261169e-01 5.4379111528396606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 8.5774902254343033e-03</internalNodes>\n          <leafValues>\n            5.0511389970779419e-01 1.7957249283790588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 -2.6032689493149519e-04</internalNodes>\n          <leafValues>\n            5.8269691467285156e-01 4.4468268752098083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 -6.1404630541801453e-03</internalNodes>\n          <leafValues>\n            3.1138521432876587e-01 5.3469717502593994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 -2.3086950182914734e-02</internalNodes>\n          <leafValues>\n            3.2779461145401001e-01 5.3311979770660400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 -1.4243650250136852e-02</internalNodes>\n          <leafValues>\n            7.3817098140716553e-01 4.5880630612373352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 1.9487129524350166e-02</internalNodes>\n          <leafValues>\n            5.2566307783126831e-01 2.2744719684123993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 -9.6681108698248863e-04</internalNodes>\n          <leafValues>\n            5.5112308263778687e-01 3.8150069117546082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 3.1474709976464510e-03</internalNodes>\n          <leafValues>\n            5.4256367683410645e-01 2.5437268614768982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 -1.8026070029009134e-04</internalNodes>\n          <leafValues>\n            5.3801918029785156e-01 3.4063041210174561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 -6.0266260989010334e-03</internalNodes>\n          <leafValues>\n            3.0358019471168518e-01 5.4205721616744995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 4.4462960795499384e-04</internalNodes>\n          <leafValues>\n            3.9909970760345459e-01 5.6601101160049438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 2.2609760053455830e-03</internalNodes>\n          <leafValues>\n            5.5628067255020142e-01 3.9406880736351013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 5.1133058965206146e-02</internalNodes>\n          <leafValues>\n            4.6096539497375488e-01 7.1185618638992310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 -1.7786309123039246e-02</internalNodes>\n          <leafValues>\n            2.3161660134792328e-01 5.3221440315246582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 -4.9679628573358059e-03</internalNodes>\n          <leafValues>\n            2.3307719826698303e-01 5.1220291852951050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 2.0667689386755228e-03</internalNodes>\n          <leafValues>\n            4.6574440598487854e-01 6.4554882049560547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 7.4413768015801907e-03</internalNodes>\n          <leafValues>\n            5.1543921232223511e-01 2.3616339266300201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 -3.6277279723435640e-03</internalNodes>\n          <leafValues>\n            6.2197732925415039e-01 4.4766610860824585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 -5.3530759178102016e-03</internalNodes>\n          <leafValues>\n            1.8373550474643707e-01 5.1022082567214966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 1.4530919492244720e-01</internalNodes>\n          <leafValues>\n            5.1459872722625732e-01 1.5359309315681458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 2.4394490756094456e-03</internalNodes>\n          <leafValues>\n            5.3436601161956787e-01 3.6246618628501892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 596 -3.1283390708267689e-03</internalNodes>\n          <leafValues>\n            6.2150079011917114e-01 4.8455920815467834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 1.7940260004252195e-03</internalNodes>\n          <leafValues>\n            4.2992618680000305e-01 5.8241981267929077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 3.6253821104764938e-02</internalNodes>\n          <leafValues>\n            5.2603340148925781e-01 1.4394679665565491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 -5.1746722310781479e-03</internalNodes>\n          <leafValues>\n            3.5065388679504395e-01 5.2870452404022217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 6.5383297624066472e-04</internalNodes>\n          <leafValues>\n            4.8096409440040588e-01 6.1220401525497437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 -2.6480229571461678e-02</internalNodes>\n          <leafValues>\n            1.1393620073795319e-01 5.0455862283706665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 -3.0440660193562508e-03</internalNodes>\n          <leafValues>\n            6.3520950078964233e-01 4.7947341203689575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 3.6993520334362984e-03</internalNodes>\n          <leafValues>\n            5.1311182975769043e-01 2.4985109269618988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 -3.6762931267730892e-04</internalNodes>\n          <leafValues>\n            5.4213947057723999e-01 3.7095320224761963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 -4.1382260620594025e-02</internalNodes>\n          <leafValues>\n            1.8949599564075470e-01 5.0816917419433594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 -1.0532729793339968e-03</internalNodes>\n          <leafValues>\n            6.4543670415878296e-01 4.7836089134216309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 -2.1648600231856108e-03</internalNodes>\n          <leafValues>\n            6.2150311470031738e-01 4.4998261332511902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 -5.6747748749330640e-04</internalNodes>\n          <leafValues>\n            3.7126109004020691e-01 5.4193347692489624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 1.7375840246677399e-01</internalNodes>\n          <leafValues>\n            5.0236439704895020e-01 1.2157420068979263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 -2.9049699660390615e-03</internalNodes>\n          <leafValues>\n            3.2402679324150085e-01 5.3818839788436890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 1.2299539521336555e-03</internalNodes>\n          <leafValues>\n            4.1655078530311584e-01 5.7034862041473389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 -5.4329237900674343e-04</internalNodes>\n          <leafValues>\n            3.8540428876876831e-01 5.5475491285324097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 -8.3297258242964745e-03</internalNodes>\n          <leafValues>\n            2.2044940292835236e-01 5.0970828533172607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 -1.0417630255687982e-04</internalNodes>\n          <leafValues>\n            5.6070661544799805e-01 4.3030360341072083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 3.1204700469970703e-02</internalNodes>\n          <leafValues>\n            4.6216571331024170e-01 6.9820040464401245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 7.8943502157926559e-03</internalNodes>\n          <leafValues>\n            5.2695941925048828e-01 2.2690680623054504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 -4.3645310215651989e-03</internalNodes>\n          <leafValues>\n            6.3592231273651123e-01 4.5379561185836792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 7.6793059706687927e-03</internalNodes>\n          <leafValues>\n            5.2747678756713867e-01 2.7404838800430298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 -2.5431139394640923e-02</internalNodes>\n          <leafValues>\n            2.0385199785232544e-01 5.0717329978942871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 8.2000601105391979e-04</internalNodes>\n          <leafValues>\n            4.5874550938606262e-01 6.1198681592941284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 2.9284600168466568e-03</internalNodes>\n          <leafValues>\n            5.0712740421295166e-01 2.0282049477100372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 4.5256470912136137e-05</internalNodes>\n          <leafValues>\n            4.8121041059494019e-01 5.4308217763900757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 1.3158309739083052e-03</internalNodes>\n          <leafValues>\n            4.6258139610290527e-01 6.7793232202529907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 1.5870389761403203e-03</internalNodes>\n          <leafValues>\n            5.3862917423248291e-01 3.4314650297164917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 -2.1539660170674324e-02</internalNodes>\n          <leafValues>\n            2.5942500680685043e-02 5.0032228231430054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 1.4334480278193951e-02</internalNodes>\n          <leafValues>\n            5.2028447389602661e-01 1.5906329452991486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 -8.3881383761763573e-03</internalNodes>\n          <leafValues>\n            7.2824811935424805e-01 4.6480441093444824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 9.1906841844320297e-03</internalNodes>\n          <leafValues>\n            5.5623567104339600e-01 3.9231911301612854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 -5.8453059755265713e-03</internalNodes>\n          <leafValues>\n            6.8033927679061890e-01 4.6291279792785645e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 -5.4707799106836319e-02</internalNodes>\n          <leafValues>\n            2.5616711378097534e-01 5.2061259746551514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 9.1142775490880013e-03</internalNodes>\n          <leafValues>\n            5.1896202564239502e-01 3.0538770556449890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 -1.5575000084936619e-02</internalNodes>\n          <leafValues>\n            1.2950749695301056e-01 5.1690948009490967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 -1.2050600344082341e-04</internalNodes>\n          <leafValues>\n            5.7350981235504150e-01 4.2308250069618225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 1.2273970060050488e-03</internalNodes>\n          <leafValues>\n            5.2898782491683960e-01 4.0797919034957886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 -1.2186600361019373e-03</internalNodes>\n          <leafValues>\n            6.5756398439407349e-01 4.5744091272354126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 -3.3256649039685726e-03</internalNodes>\n          <leafValues>\n            3.6280471086502075e-01 5.1950198411941528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 -1.3288309797644615e-02</internalNodes>\n          <leafValues>\n            1.2842659652233124e-01 5.0434887409210205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 -3.3839771058410406e-03</internalNodes>\n          <leafValues>\n            6.2922400236129761e-01 4.7575059533119202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 -2.1954220533370972e-01</internalNodes>\n          <leafValues>\n            1.4877319335937500e-01 5.0650137662887573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 4.9111708067357540e-03</internalNodes>\n          <leafValues>\n            4.2561021447181702e-01 5.6658387184143066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 -1.8744950648397207e-04</internalNodes>\n          <leafValues>\n            4.0041440725326538e-01 5.5868571996688843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 -5.2178641781210899e-03</internalNodes>\n          <leafValues>\n            6.0091161727905273e-01 4.8127061128616333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 -1.1111519997939467e-03</internalNodes>\n          <leafValues>\n            3.5149338841438293e-01 5.2870899438858032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 4.4036400504410267e-03</internalNodes>\n          <leafValues>\n            4.6422758698463440e-01 5.9240859746932983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 1.2299499660730362e-01</internalNodes>\n          <leafValues>\n            5.0255292654037476e-01 6.9152481853961945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 -1.2313510291278362e-02</internalNodes>\n          <leafValues>\n            5.8845919370651245e-01 4.9340128898620605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 4.1471039876341820e-03</internalNodes>\n          <leafValues>\n            4.3722391128540039e-01 5.8934777975082397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 -3.5502649843692780e-03</internalNodes>\n          <leafValues>\n            4.3275511264801025e-01 5.3962701559066772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 -1.9224269315600395e-02</internalNodes>\n          <leafValues>\n            1.9131340086460114e-01 5.0683307647705078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 1.4395059552043676e-03</internalNodes>\n          <leafValues>\n            5.3081780672073364e-01 4.2435330152511597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 -6.7751999013125896e-03</internalNodes>\n          <leafValues>\n            6.3653957843780518e-01 4.5400860905647278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 7.0119630545377731e-03</internalNodes>\n          <leafValues>\n            5.1898342370986938e-01 3.0261999368667603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 5.4014651104807854e-03</internalNodes>\n          <leafValues>\n            5.1050621271133423e-01 2.5576829910278320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 9.0274988906458020e-04</internalNodes>\n          <leafValues>\n            4.6969148516654968e-01 5.8618277311325073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 1.1474450118839741e-02</internalNodes>\n          <leafValues>\n            5.0536459684371948e-01 1.5271779894828796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 -6.7023430019617081e-03</internalNodes>\n          <leafValues>\n            6.5089809894561768e-01 4.8906040191650391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 -2.0462959073483944e-03</internalNodes>\n          <leafValues>\n            6.2418168783187866e-01 4.5146000385284424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 -9.9951568990945816e-03</internalNodes>\n          <leafValues>\n            3.4327811002731323e-01 5.4009538888931274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 -3.5700708627700806e-02</internalNodes>\n          <leafValues>\n            1.8780590593814850e-01 5.0740778446197510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 4.5584561303257942e-04</internalNodes>\n          <leafValues>\n            3.8052770495414734e-01 5.4025697708129883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 -5.4260600358247757e-02</internalNodes>\n          <leafValues>\n            6.8437147140502930e-01 4.5950970053672791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 6.0600461438298225e-03</internalNodes>\n          <leafValues>\n            5.5029052495956421e-01 4.5005279779434204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 -6.4791832119226456e-03</internalNodes>\n          <leafValues>\n            3.3688580989837646e-01 5.3107571601867676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 -1.4939469983801246e-03</internalNodes>\n          <leafValues>\n            6.4876401424407959e-01 4.7561758756637573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 1.4610530342906713e-05</internalNodes>\n          <leafValues>\n            4.0345790982246399e-01 5.4510641098022461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 -7.2321938350796700e-03</internalNodes>\n          <leafValues>\n            6.3868737220764160e-01 4.8247399926185608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 -4.0645818226039410e-03</internalNodes>\n          <leafValues>\n            2.9864218831062317e-01 5.1573359966278076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 3.0463080853223801e-02</internalNodes>\n          <leafValues>\n            5.0221997499465942e-01 7.1599560976028442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 -8.0544911324977875e-03</internalNodes>\n          <leafValues>\n            6.4924520254135132e-01 4.6192750334739685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 3.9505138993263245e-02</internalNodes>\n          <leafValues>\n            5.1505708694458008e-01 2.4506139755249023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 8.4530208259820938e-03</internalNodes>\n          <leafValues>\n            4.5736691355705261e-01 6.3940370082855225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 -1.1688120430335402e-03</internalNodes>\n          <leafValues>\n            3.8655120134353638e-01 5.4836612939834595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 2.8070670086890459e-03</internalNodes>\n          <leafValues>\n            5.1285791397094727e-01 2.7014800906181335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 4.7365209320560098e-04</internalNodes>\n          <leafValues>\n            4.0515819191932678e-01 5.3874611854553223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 1.1741080321371555e-02</internalNodes>\n          <leafValues>\n            5.2959501743316650e-01 3.7194138765335083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 3.1833238899707794e-03</internalNodes>\n          <leafValues>\n            4.7894069552421570e-01 6.8951261043548584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 7.0241501089185476e-04</internalNodes>\n          <leafValues>\n            5.3844892978668213e-01 3.9180809259414673e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>102</maxWeakCount>\n      <stageThreshold>5.0169731140136719e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 678 1.7059929668903351e-02</internalNodes>\n          <leafValues>\n            3.9485278725624084e-01 7.1425348520278931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 2.1840840578079224e-02</internalNodes>\n          <leafValues>\n            3.3703160285949707e-01 6.0900169610977173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 2.4520049919374287e-04</internalNodes>\n          <leafValues>\n            3.5005760192871094e-01 5.9879022836685181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 8.3272606134414673e-03</internalNodes>\n          <leafValues>\n            3.2675281167030334e-01 5.6972408294677734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 5.7148298947140574e-04</internalNodes>\n          <leafValues>\n            3.0445998907089233e-01 5.5316567420959473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 6.7373987985774875e-04</internalNodes>\n          <leafValues>\n            3.6500120162963867e-01 5.6726312637329102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 3.4681590477703139e-05</internalNodes>\n          <leafValues>\n            3.3135411143302917e-01 5.3887271881103516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 -5.8563398197293282e-03</internalNodes>\n          <leafValues>\n            2.6979428529739380e-01 5.4987788200378418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 8.5102273151278496e-03</internalNodes>\n          <leafValues>\n            5.2693581581115723e-01 2.7628791332244873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 -6.9817207753658295e-02</internalNodes>\n          <leafValues>\n            2.9096031188964844e-01 5.2592468261718750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 -8.6113670840859413e-04</internalNodes>\n          <leafValues>\n            5.8925771713256836e-01 4.0736979246139526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 9.7149249631911516e-04</internalNodes>\n          <leafValues>\n            3.5235640406608582e-01 5.4158622026443481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 -1.4727490452060010e-05</internalNodes>\n          <leafValues>\n            5.4230177402496338e-01 3.5031560063362122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 4.8420291393995285e-02</internalNodes>\n          <leafValues>\n            5.1939457654953003e-01 3.4111958742141724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 1.3257140526548028e-03</internalNodes>\n          <leafValues>\n            3.1577691435813904e-01 5.3353762626647949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 1.4922149603080470e-05</internalNodes>\n          <leafValues>\n            4.4512999057769775e-01 5.5365538597106934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 -2.7173398993909359e-03</internalNodes>\n          <leafValues>\n            3.0317419767379761e-01 5.2480888366699219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 2.9219500720500946e-03</internalNodes>\n          <leafValues>\n            4.7814530134201050e-01 6.6060417890548706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 -1.9804988987743855e-03</internalNodes>\n          <leafValues>\n            3.1863081455230713e-01 5.2876251935958862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 -4.0012109093368053e-03</internalNodes>\n          <leafValues>\n            6.4135968685150146e-01 4.7499281167984009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 -4.3491991236805916e-03</internalNodes>\n          <leafValues>\n            1.5074980258941650e-01 5.0989967584609985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 699 1.3490889687091112e-03</internalNodes>\n          <leafValues>\n            4.3161588907241821e-01 5.8811670541763306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 1.8597070127725601e-02</internalNodes>\n          <leafValues>\n            4.7355538606643677e-01 9.0897941589355469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 -1.8562379991635680e-03</internalNodes>\n          <leafValues>\n            3.5531890392303467e-01 5.5778372287750244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 2.2940430790185928e-03</internalNodes>\n          <leafValues>\n            4.5000949501991272e-01 6.5808779001235962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 2.9982850537635386e-04</internalNodes>\n          <leafValues>\n            5.6292420625686646e-01 3.9758789539337158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 3.5455459728837013e-03</internalNodes>\n          <leafValues>\n            5.3815472126007080e-01 3.6054858565330505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 9.6104722470045090e-03</internalNodes>\n          <leafValues>\n            5.2559971809387207e-01 1.7967459559440613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 -6.2783220782876015e-03</internalNodes>\n          <leafValues>\n            2.2728569805622101e-01 5.1140302419662476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 3.4598479978740215e-03</internalNodes>\n          <leafValues>\n            4.6263080835342407e-01 6.6082191467285156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 -1.3112019514665008e-03</internalNodes>\n          <leafValues>\n            6.3175398111343384e-01 4.4368579983711243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 2.6876179035753012e-03</internalNodes>\n          <leafValues>\n            5.4211097955703735e-01 4.0540221333503723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 3.9118169806897640e-03</internalNodes>\n          <leafValues>\n            5.3584778308868408e-01 3.2734549045562744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 711 -1.4206450432538986e-02</internalNodes>\n          <leafValues>\n            7.7935767173767090e-01 4.9757811427116394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 7.1705528534948826e-04</internalNodes>\n          <leafValues>\n            5.2973198890686035e-01 3.5609039664268494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 1.6635019565001130e-03</internalNodes>\n          <leafValues>\n            4.6780940890312195e-01 5.8164817094802856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 3.3686188980937004e-03</internalNodes>\n          <leafValues>\n            5.2767342329025269e-01 3.4464201331138611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 1.2799530290067196e-02</internalNodes>\n          <leafValues>\n            4.8346799612045288e-01 7.4721592664718628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 3.3901201095432043e-03</internalNodes>\n          <leafValues>\n            4.5118591189384460e-01 6.4017212390899658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 4.7070779837667942e-03</internalNodes>\n          <leafValues>\n            5.3356587886810303e-01 3.5552209615707397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 1.4819339849054813e-03</internalNodes>\n          <leafValues>\n            4.2507070302963257e-01 5.7727241516113281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 -6.9995759986341000e-03</internalNodes>\n          <leafValues>\n            3.0033200979232788e-01 5.2929002046585083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 1.5939010307192802e-02</internalNodes>\n          <leafValues>\n            5.0673192739486694e-01 1.6755819320678711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 7.6377349905669689e-03</internalNodes>\n          <leafValues>\n            4.7950699925422668e-01 7.0856010913848877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 6.7334040068089962e-03</internalNodes>\n          <leafValues>\n            5.1331132650375366e-01 2.1624700725078583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 -1.2858809903264046e-02</internalNodes>\n          <leafValues>\n            1.9388419389724731e-01 5.2513718605041504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 -6.2270800117403269e-04</internalNodes>\n          <leafValues>\n            5.6865382194519043e-01 4.1978681087493896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 -5.2651681471616030e-04</internalNodes>\n          <leafValues>\n            4.2241689562797546e-01 5.4296958446502686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 1.1075099930167198e-02</internalNodes>\n          <leafValues>\n            5.1137751340866089e-01 2.5145179033279419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 -3.6728251725435257e-02</internalNodes>\n          <leafValues>\n            7.1946620941162109e-01 4.8496189713478088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 -2.8207109426148236e-04</internalNodes>\n          <leafValues>\n            3.8402619957923889e-01 5.3944462537765503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 -2.7489690110087395e-03</internalNodes>\n          <leafValues>\n            5.9370887279510498e-01 4.5691820979118347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 1.0047519579529762e-02</internalNodes>\n          <leafValues>\n            5.1385760307312012e-01 2.8022980690002441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -8.1497840583324432e-03</internalNodes>\n          <leafValues>\n            6.0900372266769409e-01 4.6361210942268372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 -6.8833888508379459e-03</internalNodes>\n          <leafValues>\n            3.4586110711097717e-01 5.2546602487564087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 -1.4039360394235700e-05</internalNodes>\n          <leafValues>\n            5.6931042671203613e-01 4.0820831060409546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 1.5498419525101781e-03</internalNodes>\n          <leafValues>\n            4.3505370616912842e-01 5.8065170049667358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 -6.7841499112546444e-03</internalNodes>\n          <leafValues>\n            1.4688730239868164e-01 5.1827752590179443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 2.1705629478674382e-04</internalNodes>\n          <leafValues>\n            5.2935242652893066e-01 3.4561741352081299e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 3.1198898795992136e-04</internalNodes>\n          <leafValues>\n            4.6524509787559509e-01 5.9424138069152832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 5.4507530294358730e-03</internalNodes>\n          <leafValues>\n            4.6535089612007141e-01 7.0248460769653320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 -2.5818689027801156e-04</internalNodes>\n          <leafValues>\n            5.4972952604293823e-01 3.7689670920372009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 -1.7442539334297180e-02</internalNodes>\n          <leafValues>\n            3.9190879464149475e-01 5.4574978351593018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 -4.5343529433012009e-02</internalNodes>\n          <leafValues>\n            1.6313570737838745e-01 5.1549088954925537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 1.9190689781680703e-03</internalNodes>\n          <leafValues>\n            5.1458978652954102e-01 2.7918958663940430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 -6.0177869163453579e-03</internalNodes>\n          <leafValues>\n            6.5176361799240112e-01 4.7563329339027405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 -4.0720738470554352e-03</internalNodes>\n          <leafValues>\n            5.5146527290344238e-01 4.0926858782768250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 745 3.9855059003457427e-04</internalNodes>\n          <leafValues>\n            3.1652408838272095e-01 5.2855509519577026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 -6.5418570302426815e-03</internalNodes>\n          <leafValues>\n            6.8533778190612793e-01 4.6528089046478271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 3.4845089539885521e-03</internalNodes>\n          <leafValues>\n            5.4845881462097168e-01 4.5027598738670349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 -1.3696780428290367e-02</internalNodes>\n          <leafValues>\n            6.3957798480987549e-01 4.5725551247596741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 -1.7347140237689018e-02</internalNodes>\n          <leafValues>\n            2.7510729432106018e-01 5.1816147565841675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 -4.0885428898036480e-03</internalNodes>\n          <leafValues>\n            3.3256360888481140e-01 5.1949840784072876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 -9.4687901437282562e-03</internalNodes>\n          <leafValues>\n            5.9422808885574341e-01 4.8518198728561401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 1.7084840219467878e-03</internalNodes>\n          <leafValues>\n            4.1671109199523926e-01 5.5198061466217041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 9.4809094443917274e-03</internalNodes>\n          <leafValues>\n            5.4338949918746948e-01 4.2085149884223938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 -4.7389650717377663e-03</internalNodes>\n          <leafValues>\n            6.4071899652481079e-01 4.5606550574302673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 6.5761050209403038e-03</internalNodes>\n          <leafValues>\n            5.2145552635192871e-01 2.2582270205020905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 -2.1690549328923225e-03</internalNodes>\n          <leafValues>\n            3.1515279412269592e-01 5.1567047834396362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 1.4660170301795006e-02</internalNodes>\n          <leafValues>\n            4.8708370327949524e-01 6.6899412870407104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 1.7231999663636088e-04</internalNodes>\n          <leafValues>\n            3.5697489976882935e-01 5.2510780096054077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 -2.1803760901093483e-02</internalNodes>\n          <leafValues>\n            8.8259208202362061e-01 4.9663299322128296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 -9.4736106693744659e-02</internalNodes>\n          <leafValues>\n            1.4461620151996613e-01 5.0611138343811035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 5.5825551971793175e-03</internalNodes>\n          <leafValues>\n            5.3964787721633911e-01 4.2380660772323608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 1.9517090404406190e-03</internalNodes>\n          <leafValues>\n            4.1704109311103821e-01 5.4977869987487793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 1.2149900197982788e-02</internalNodes>\n          <leafValues>\n            4.6983671188354492e-01 5.6642740964889526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 -7.5169620104134083e-03</internalNodes>\n          <leafValues>\n            6.2677729129791260e-01 4.4631358981132507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 -7.1667909622192383e-02</internalNodes>\n          <leafValues>\n            3.0970111489295959e-01 5.2210032939910889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 -8.8292419910430908e-02</internalNodes>\n          <leafValues>\n            8.1123888492584229e-02 5.0063651800155640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 3.1063079833984375e-02</internalNodes>\n          <leafValues>\n            5.1555037498474121e-01 1.2822559475898743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 4.6621840447187424e-02</internalNodes>\n          <leafValues>\n            4.6997779607772827e-01 7.3639607429504395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 -1.2189489789307117e-02</internalNodes>\n          <leafValues>\n            3.9205300807952881e-01 5.5189967155456543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 1.3016110286116600e-02</internalNodes>\n          <leafValues>\n            5.2606582641601562e-01 3.6851361393928528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 -3.4952899441123009e-03</internalNodes>\n          <leafValues>\n            6.3392949104309082e-01 4.7162809967994690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 -4.4015039748046547e-05</internalNodes>\n          <leafValues>\n            5.3330272436141968e-01 3.7761849164962769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 -1.0966490209102631e-01</internalNodes>\n          <leafValues>\n            1.7653420567512512e-01 5.1983469724655151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 -9.0279558207839727e-04</internalNodes>\n          <leafValues>\n            5.3241598606109619e-01 3.8389080762863159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 7.1126641705632210e-04</internalNodes>\n          <leafValues>\n            4.6479299664497375e-01 5.7552242279052734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 -3.1250279862433672e-03</internalNodes>\n          <leafValues>\n            3.2367089390754700e-01 5.1667708158493042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 2.4144679773598909e-03</internalNodes>\n          <leafValues>\n            4.7874391078948975e-01 6.4597177505493164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 4.4391240226104856e-04</internalNodes>\n          <leafValues>\n            4.4093081355094910e-01 6.0102558135986328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 -2.2611189342569560e-04</internalNodes>\n          <leafValues>\n            4.0381139516830444e-01 5.4932558536529541e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>135</maxWeakCount>\n      <stageThreshold>6.6669120788574219e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 780 -4.6901289373636246e-02</internalNodes>\n          <leafValues>\n            6.6001719236373901e-01 3.7438011169433594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 -1.4568349579349160e-03</internalNodes>\n          <leafValues>\n            5.7839912176132202e-01 3.4377971291542053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 5.5598369799554348e-03</internalNodes>\n          <leafValues>\n            3.6222669482231140e-01 5.9082162380218506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 7.3170487303286791e-04</internalNodes>\n          <leafValues>\n            5.5004191398620605e-01 2.8735581040382385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 1.3318009441718459e-03</internalNodes>\n          <leafValues>\n            2.6731699705123901e-01 5.4310190677642822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 2.4347059661522508e-04</internalNodes>\n          <leafValues>\n            3.8550278544425964e-01 5.7413887977600098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 -3.0512469820678234e-03</internalNodes>\n          <leafValues>\n            5.5032098293304443e-01 3.4628450870513916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 -6.8657199153676629e-04</internalNodes>\n          <leafValues>\n            3.2912218570709229e-01 5.4295092821121216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 1.4668200165033340e-03</internalNodes>\n          <leafValues>\n            3.5883820056915283e-01 5.3518110513687134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 3.2021870720200241e-04</internalNodes>\n          <leafValues>\n            4.2968419194221497e-01 5.7002341747283936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 7.4122188379988074e-04</internalNodes>\n          <leafValues>\n            5.2821648120880127e-01 3.3668708801269531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 3.8330298848450184e-03</internalNodes>\n          <leafValues>\n            4.5595678687095642e-01 6.2573361396789551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 -1.5456439927220345e-02</internalNodes>\n          <leafValues>\n            2.3501169681549072e-01 5.1294529438018799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 2.6796779129654169e-03</internalNodes>\n          <leafValues>\n            5.3294152021408081e-01 4.1550621390342712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 2.8296569362282753e-03</internalNodes>\n          <leafValues>\n            4.2730879783630371e-01 5.8045381307601929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 -3.9444249123334885e-03</internalNodes>\n          <leafValues>\n            2.9126119613647461e-01 5.2026861906051636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 2.7179559692740440e-03</internalNodes>\n          <leafValues>\n            5.3076881170272827e-01 3.5856771469116211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 5.9077627956867218e-03</internalNodes>\n          <leafValues>\n            4.7037750482559204e-01 5.9415858983993530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 -4.2240349575877190e-03</internalNodes>\n          <leafValues>\n            2.1415670216083527e-01 5.0887960195541382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 4.0725888684391975e-03</internalNodes>\n          <leafValues>\n            4.7664138674736023e-01 6.8410611152648926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 1.0149530135095119e-02</internalNodes>\n          <leafValues>\n            5.3607988357543945e-01 3.7484970688819885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 -1.8864999583456665e-04</internalNodes>\n          <leafValues>\n            5.7201302051544189e-01 3.8538050651550293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 -4.8864358104765415e-03</internalNodes>\n          <leafValues>\n            3.6931228637695312e-01 5.3409588336944580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 2.6158479973673820e-02</internalNodes>\n          <leafValues>\n            4.9623748660087585e-01 6.0599899291992188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 4.8560759751126170e-04</internalNodes>\n          <leafValues>\n            4.4389459490776062e-01 6.0124689340591431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 1.1268709786236286e-02</internalNodes>\n          <leafValues>\n            5.2442502975463867e-01 1.8403880298137665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 -2.8114619199186563e-03</internalNodes>\n          <leafValues>\n            6.0602837800979614e-01 4.4098970293998718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 -5.6112729944288731e-03</internalNodes>\n          <leafValues>\n            3.8911709189414978e-01 5.5892372131347656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 8.5680093616247177e-03</internalNodes>\n          <leafValues>\n            5.0693458318710327e-01 2.0626190304756165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 -3.8172779022715986e-04</internalNodes>\n          <leafValues>\n            5.8822017908096313e-01 4.1926109790802002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 -1.7680290329735726e-04</internalNodes>\n          <leafValues>\n            5.5336058139801025e-01 4.0033689141273499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 6.5112537704408169e-03</internalNodes>\n          <leafValues>\n            3.3101469278335571e-01 5.4441910982131958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 -6.5948683186434209e-05</internalNodes>\n          <leafValues>\n            5.4338318109512329e-01 3.9449059963226318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 6.9939051754772663e-03</internalNodes>\n          <leafValues>\n            5.6003582477569580e-01 4.1927140951156616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 -4.6744439750909805e-03</internalNodes>\n          <leafValues>\n            6.6854667663574219e-01 4.6049609780311584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 1.1589850299060345e-02</internalNodes>\n          <leafValues>\n            5.3571212291717529e-01 2.9268300533294678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 1.3007840141654015e-02</internalNodes>\n          <leafValues>\n            4.6798178553581238e-01 7.3074632883071899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 -1.1008579749614000e-03</internalNodes>\n          <leafValues>\n            3.9375010132789612e-01 5.4150652885437012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 6.0472649056464434e-04</internalNodes>\n          <leafValues>\n            4.2423760890960693e-01 5.6040412187576294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -1.4494840055704117e-02</internalNodes>\n          <leafValues>\n            3.6312100291252136e-01 5.2931827306747437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 -5.3056948818266392e-03</internalNodes>\n          <leafValues>\n            6.8604522943496704e-01 4.6218210458755493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 -8.1829127157106996e-04</internalNodes>\n          <leafValues>\n            3.9440968632698059e-01 5.4204392433166504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 -1.9077520817518234e-02</internalNodes>\n          <leafValues>\n            1.9626219570636749e-01 5.0378918647766113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 3.5549470339901745e-04</internalNodes>\n          <leafValues>\n            4.0862590074539185e-01 5.6139731407165527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 1.9679730758070946e-03</internalNodes>\n          <leafValues>\n            4.4891211390495300e-01 5.9261232614517212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 6.9189141504466534e-03</internalNodes>\n          <leafValues>\n            5.3359258174896240e-01 3.7283858656883240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 2.9872779268771410e-03</internalNodes>\n          <leafValues>\n            5.1113212108612061e-01 2.9756438732147217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 827 -6.2264618463814259e-03</internalNodes>\n          <leafValues>\n            5.5414897203445435e-01 4.8245379328727722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 1.3353300280869007e-02</internalNodes>\n          <leafValues>\n            4.5864239335060120e-01 6.4147979021072388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 3.3505238592624664e-02</internalNodes>\n          <leafValues>\n            5.3924250602722168e-01 3.4299948811531067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 -2.5294460356235504e-03</internalNodes>\n          <leafValues>\n            1.7037139832973480e-01 5.0133150815963745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 -1.2801629491150379e-03</internalNodes>\n          <leafValues>\n            5.3054618835449219e-01 4.6974050998687744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 7.0687388069927692e-03</internalNodes>\n          <leafValues>\n            4.6155458688735962e-01 6.4365047216415405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 9.6880499040707946e-04</internalNodes>\n          <leafValues>\n            4.8335990309715271e-01 6.0438942909240723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 3.9647659286856651e-03</internalNodes>\n          <leafValues>\n            5.1876372098922729e-01 3.2318168878555298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 -2.2057730704545975e-02</internalNodes>\n          <leafValues>\n            4.0792569518089294e-01 5.2009809017181396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 -6.6906312713399529e-04</internalNodes>\n          <leafValues>\n            5.3316092491149902e-01 3.8156008720397949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -6.7009328631684184e-04</internalNodes>\n          <leafValues>\n            5.6554222106933594e-01 4.6889019012451172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 838 7.4284552829340100e-04</internalNodes>\n          <leafValues>\n            4.5343810319900513e-01 6.2874001264572144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 2.2227810695767403e-03</internalNodes>\n          <leafValues>\n            5.3506332635879517e-01 3.3036559820175171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 -5.4130521602928638e-03</internalNodes>\n          <leafValues>\n            1.1136870086193085e-01 5.0054347515106201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 -1.4520040167553816e-05</internalNodes>\n          <leafValues>\n            5.6287378072738647e-01 4.3251338601112366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 2.3369169502984732e-04</internalNodes>\n          <leafValues>\n            4.1658350825309753e-01 5.4477912187576294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 4.2894547805190086e-03</internalNodes>\n          <leafValues>\n            4.8603910207748413e-01 6.7786490917205811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 5.9103150852024555e-03</internalNodes>\n          <leafValues>\n            5.2623051404953003e-01 3.6121138930320740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 1.2900539673864841e-02</internalNodes>\n          <leafValues>\n            5.3193771839141846e-01 3.2502880692481995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 4.6982979401946068e-03</internalNodes>\n          <leafValues>\n            4.6182450652122498e-01 6.6659259796142578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 1.0439859703183174e-02</internalNodes>\n          <leafValues>\n            5.5056709051132202e-01 3.8836041092872620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 3.0443191062659025e-03</internalNodes>\n          <leafValues>\n            4.6978530287742615e-01 7.3018449544906616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 -6.1593751888722181e-04</internalNodes>\n          <leafValues>\n            3.8308390974998474e-01 5.4649841785430908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 -3.4247159492224455e-03</internalNodes>\n          <leafValues>\n            2.5663000345230103e-01 5.0895309448242188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 -9.3538565561175346e-03</internalNodes>\n          <leafValues>\n            6.4699661731719971e-01 4.9407958984375000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 5.2338998764753342e-02</internalNodes>\n          <leafValues>\n            4.7459828853607178e-01 7.8787708282470703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 3.5765620414167643e-03</internalNodes>\n          <leafValues>\n            5.3066647052764893e-01 2.7484980225563049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 7.1555317845195532e-04</internalNodes>\n          <leafValues>\n            5.4131257534027100e-01 4.0419089794158936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 -1.0516679845750332e-02</internalNodes>\n          <leafValues>\n            6.1585122346878052e-01 4.8152831196784973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 7.7347927726805210e-03</internalNodes>\n          <leafValues>\n            4.6958059072494507e-01 7.0289808511734009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 -4.3226778507232666e-03</internalNodes>\n          <leafValues>\n            2.8495660424232483e-01 5.3046840429306030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 -2.5534399319440126e-03</internalNodes>\n          <leafValues>\n            7.0569849014282227e-01 4.6888920664787292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 1.0268510231981054e-04</internalNodes>\n          <leafValues>\n            3.9029321074485779e-01 5.5734640359878540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 7.1395188570022583e-06</internalNodes>\n          <leafValues>\n            3.6842319369316101e-01 5.2639877796173096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 -1.6711989883333445e-03</internalNodes>\n          <leafValues>\n            3.8491758704185486e-01 5.3872710466384888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 4.9260449595749378e-03</internalNodes>\n          <leafValues>\n            4.7297719120979309e-01 7.4472510814666748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 4.3908702209591866e-03</internalNodes>\n          <leafValues>\n            4.8091810941696167e-01 5.5919218063354492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 -1.7793629318475723e-02</internalNodes>\n          <leafValues>\n            6.9036781787872314e-01 4.6769270300865173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 2.0469669252634048e-03</internalNodes>\n          <leafValues>\n            5.3706902265548706e-01 3.3081620931625366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 2.9891489073634148e-02</internalNodes>\n          <leafValues>\n            5.1398652791976929e-01 3.3090591430664062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 1.5494900289922953e-03</internalNodes>\n          <leafValues>\n            4.6602371335029602e-01 6.0783427953720093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 1.4956969534978271e-03</internalNodes>\n          <leafValues>\n            4.4048359990119934e-01 5.8639198541641235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 9.5885928021743894e-04</internalNodes>\n          <leafValues>\n            5.4359710216522217e-01 4.2085230350494385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 4.9643701640889049e-04</internalNodes>\n          <leafValues>\n            5.3705781698226929e-01 4.0006220340728760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 -2.7280810754746199e-03</internalNodes>\n          <leafValues>\n            5.6594127416610718e-01 4.2596429586410522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 2.3026480339467525e-03</internalNodes>\n          <leafValues>\n            5.1616579294204712e-01 3.3508691191673279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 2.5151631236076355e-01</internalNodes>\n          <leafValues>\n            4.8696619272232056e-01 7.1473097801208496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 -4.6328022144734859e-03</internalNodes>\n          <leafValues>\n            2.7274489402770996e-01 5.0837898254394531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 -4.0434490889310837e-02</internalNodes>\n          <leafValues>\n            6.8514388799667358e-01 5.0217670202255249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 1.4972220014897175e-05</internalNodes>\n          <leafValues>\n            4.2844650149345398e-01 5.5225551128387451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 -2.4050309730228037e-04</internalNodes>\n          <leafValues>\n            4.2261189222335815e-01 5.3900748491287231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 2.3657839745283127e-02</internalNodes>\n          <leafValues>\n            4.7446319460868835e-01 7.5043660402297974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 -8.1449104472994804e-03</internalNodes>\n          <leafValues>\n            4.2450588941574097e-01 5.5383628606796265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 -3.6992130335420370e-03</internalNodes>\n          <leafValues>\n            5.9523570537567139e-01 4.5297130942344666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 -6.7718601785600185e-03</internalNodes>\n          <leafValues>\n            4.1377940773963928e-01 5.4733997583389282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 4.2669530957937241e-03</internalNodes>\n          <leafValues>\n            4.4841149449348450e-01 5.7979941368103027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 1.7791989957913756e-03</internalNodes>\n          <leafValues>\n            5.6248587369918823e-01 4.4324448704719543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 1.6774770338088274e-03</internalNodes>\n          <leafValues>\n            4.6377518773078918e-01 6.3642418384552002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 1.1732629500329494e-03</internalNodes>\n          <leafValues>\n            4.5445030927658081e-01 5.9144157171249390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 8.6998171173036098e-04</internalNodes>\n          <leafValues>\n            5.3347527980804443e-01 3.8859179615974426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 7.6378340600058436e-04</internalNodes>\n          <leafValues>\n            5.3985852003097534e-01 3.7449419498443604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 1.5684569370932877e-04</internalNodes>\n          <leafValues>\n            4.3178731203079224e-01 5.6146162748336792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 -2.1511370316147804e-02</internalNodes>\n          <leafValues>\n            1.7859250307083130e-01 5.1855427026748657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 1.3081369979772717e-04</internalNodes>\n          <leafValues>\n            4.3424990773200989e-01 5.6828498840332031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 2.1992040798068047e-02</internalNodes>\n          <leafValues>\n            5.1617169380187988e-01 2.3793940246105194e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 -8.0136500764638186e-04</internalNodes>\n          <leafValues>\n            5.9867632389068604e-01 4.4664269685745239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 -8.2736099138855934e-03</internalNodes>\n          <leafValues>\n            4.1082179546356201e-01 5.2510571479797363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 3.6831789184361696e-03</internalNodes>\n          <leafValues>\n            5.1738142967224121e-01 3.3975180983543396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 -7.9525681212544441e-03</internalNodes>\n          <leafValues>\n            6.8889832496643066e-01 4.8459240794181824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 1.5382299898192286e-03</internalNodes>\n          <leafValues>\n            5.1785671710968018e-01 3.4541139006614685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 -1.4043530449271202e-02</internalNodes>\n          <leafValues>\n            1.6784210503101349e-01 5.1886677742004395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 1.4315890148282051e-03</internalNodes>\n          <leafValues>\n            4.3682569265365601e-01 5.6557738780975342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 -3.4014228731393814e-02</internalNodes>\n          <leafValues>\n            7.8022962808609009e-01 4.9592170119285583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 -1.2027299962937832e-02</internalNodes>\n          <leafValues>\n            1.5851010382175446e-01 5.0322318077087402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 1.3316619396209717e-01</internalNodes>\n          <leafValues>\n            5.1633048057556152e-01 2.7551281452178955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 -1.5221949433907866e-03</internalNodes>\n          <leafValues>\n            3.7283179163932800e-01 5.2145522832870483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 -9.3929271679371595e-04</internalNodes>\n          <leafValues>\n            5.8383792638778687e-01 4.5111650228500366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 2.7719739824533463e-02</internalNodes>\n          <leafValues>\n            4.7282868623733521e-01 7.3315447568893433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 3.1030150130391121e-03</internalNodes>\n          <leafValues>\n            5.3022021055221558e-01 4.1015630960464478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 7.7861219644546509e-02</internalNodes>\n          <leafValues>\n            4.9983340501785278e-01 1.2729619443416595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 -1.5854939818382263e-02</internalNodes>\n          <leafValues>\n            5.0833359360694885e-02 5.1656562089920044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 -4.9725300632417202e-03</internalNodes>\n          <leafValues>\n            6.7981338500976562e-01 4.6842318773269653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 -9.7676506265997887e-04</internalNodes>\n          <leafValues>\n            6.0107719898223877e-01 4.7889319062232971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 -2.4647710379213095e-03</internalNodes>\n          <leafValues>\n            3.3933979272842407e-01 5.2205038070678711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 -6.7937700077891350e-03</internalNodes>\n          <leafValues>\n            4.3651369214057922e-01 5.2396631240844727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 3.2608021050691605e-02</internalNodes>\n          <leafValues>\n            5.0527238845825195e-01 2.4252149462699890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 -5.8514421107247472e-04</internalNodes>\n          <leafValues>\n            5.7339739799499512e-01 4.7585740685462952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 -2.9632600024342537e-02</internalNodes>\n          <leafValues>\n            3.8922891020774841e-01 5.2635979652404785e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>137</maxWeakCount>\n      <stageThreshold>6.7698921203613281e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 915 4.6550851315259933e-02</internalNodes>\n          <leafValues>\n            3.2769501209259033e-01 6.2405228614807129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 7.9537127166986465e-03</internalNodes>\n          <leafValues>\n            4.2564851045608521e-01 6.9429391622543335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 6.8221561377868056e-04</internalNodes>\n          <leafValues>\n            3.7114870548248291e-01 5.9007328748703003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 -1.9348249770700932e-04</internalNodes>\n          <leafValues>\n            2.0411339402198792e-01 5.3005450963973999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 -2.6710508973337710e-04</internalNodes>\n          <leafValues>\n            5.4161262512207031e-01 3.1031790375709534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 2.7818060480058193e-03</internalNodes>\n          <leafValues>\n            5.2778327465057373e-01 3.4670698642730713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 -4.6779078547842801e-04</internalNodes>\n          <leafValues>\n            5.3082311153411865e-01 3.2944920659065247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 -3.0335160772665404e-05</internalNodes>\n          <leafValues>\n            5.7738727331161499e-01 3.8520970940589905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 7.8038009814918041e-04</internalNodes>\n          <leafValues>\n            4.3174389004707336e-01 6.1500579118728638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 -4.2553851380944252e-03</internalNodes>\n          <leafValues>\n            2.9339039325714111e-01 5.3242927789688110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -2.4735610350035131e-04</internalNodes>\n          <leafValues>\n            5.4688447713851929e-01 3.8430300354957581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 -1.4724259381182492e-04</internalNodes>\n          <leafValues>\n            4.2815428972244263e-01 5.7555872201919556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 1.1864770203828812e-03</internalNodes>\n          <leafValues>\n            3.7473011016845703e-01 5.4714661836624146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 2.3936580400913954e-03</internalNodes>\n          <leafValues>\n            4.5377838611602783e-01 6.1115288734436035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 -1.5390539774671197e-03</internalNodes>\n          <leafValues>\n            2.9713419079780579e-01 5.1895380020141602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 -7.1968790143728256e-03</internalNodes>\n          <leafValues>\n            6.6990667581558228e-01 4.7264769673347473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 -4.1499789222143590e-04</internalNodes>\n          <leafValues>\n            3.3849540352821350e-01 5.2603179216384888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 4.4359830208122730e-03</internalNodes>\n          <leafValues>\n            5.3991222381591797e-01 3.9201408624649048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 2.6606200262904167e-03</internalNodes>\n          <leafValues>\n            4.4825780391693115e-01 6.1196178197860718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 -1.5287200221791863e-03</internalNodes>\n          <leafValues>\n            3.7112379074096680e-01 5.3402662277221680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 -4.7397250309586525e-03</internalNodes>\n          <leafValues>\n            6.0310882329940796e-01 4.4551450014114380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 -1.4829129911959171e-02</internalNodes>\n          <leafValues>\n            2.8387540578842163e-01 5.3418618440628052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 9.2275557108223438e-04</internalNodes>\n          <leafValues>\n            5.2095472812652588e-01 3.3616539835929871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 8.3529807627201080e-02</internalNodes>\n          <leafValues>\n            5.1199698448181152e-01 8.1164449453353882e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 -7.5633148662745953e-04</internalNodes>\n          <leafValues>\n            3.3171200752258301e-01 5.1898312568664551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 9.8403859883546829e-03</internalNodes>\n          <leafValues>\n            5.2475982904434204e-01 2.3349590599536896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 -1.5953830443322659e-03</internalNodes>\n          <leafValues>\n            5.7500940561294556e-01 4.2956221103668213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 3.4766020689858124e-05</internalNodes>\n          <leafValues>\n            4.3424451351165771e-01 5.5640292167663574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 2.9862910509109497e-02</internalNodes>\n          <leafValues>\n            4.5791471004486084e-01 6.5791881084442139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 1.1325590312480927e-02</internalNodes>\n          <leafValues>\n            5.2743119001388550e-01 3.6738881468772888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 -8.7828645482659340e-03</internalNodes>\n          <leafValues>\n            7.1003687381744385e-01 4.6421670913696289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 4.3639959767460823e-03</internalNodes>\n          <leafValues>\n            5.2792161703109741e-01 2.7058771252632141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 4.1804728098213673e-03</internalNodes>\n          <leafValues>\n            5.0725251436233521e-01 2.4490830302238464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 -4.5668511302210391e-04</internalNodes>\n          <leafValues>\n            4.2831051349639893e-01 5.5486911535263062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 -3.7140368949621916e-03</internalNodes>\n          <leafValues>\n            5.5193877220153809e-01 4.1036531329154968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 -2.5304289534687996e-02</internalNodes>\n          <leafValues>\n            6.8670022487640381e-01 4.8698890209197998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 -3.4454080741852522e-04</internalNodes>\n          <leafValues>\n            3.7288740277290344e-01 5.2876931428909302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 -8.3935231668874621e-04</internalNodes>\n          <leafValues>\n            6.0601520538330078e-01 4.6160620450973511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 1.7280049622058868e-02</internalNodes>\n          <leafValues>\n            5.0496357679367065e-01 1.8198239803314209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 -6.3595077954232693e-03</internalNodes>\n          <leafValues>\n            1.6312399506568909e-01 5.2327787876129150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 1.0298109846189618e-03</internalNodes>\n          <leafValues>\n            4.4632780551910400e-01 6.1765491962432861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 1.0117109632119536e-03</internalNodes>\n          <leafValues>\n            5.4733848571777344e-01 4.3006989359855652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 -1.0308800265192986e-02</internalNodes>\n          <leafValues>\n            1.1669850349426270e-01 5.0008672475814819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 5.4682018235325813e-03</internalNodes>\n          <leafValues>\n            4.7692871093750000e-01 6.7192137241363525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 -9.1696460731327534e-04</internalNodes>\n          <leafValues>\n            3.4710898995399475e-01 5.1781648397445679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 2.3922820109874010e-03</internalNodes>\n          <leafValues>\n            4.7852361202239990e-01 6.2163108587265015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 -7.5573818758130074e-03</internalNodes>\n          <leafValues>\n            5.8147960901260376e-01 4.4100850820541382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 -7.7024032361805439e-04</internalNodes>\n          <leafValues>\n            3.8780000805854797e-01 5.4657220840454102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 -8.7125990539789200e-03</internalNodes>\n          <leafValues>\n            1.6600510478019714e-01 4.9958360195159912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 -1.0306320153176785e-02</internalNodes>\n          <leafValues>\n            4.0933910012245178e-01 5.2742338180541992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 -2.0940979011356831e-03</internalNodes>\n          <leafValues>\n            6.2061947584152222e-01 4.5722800493240356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 6.8099051713943481e-03</internalNodes>\n          <leafValues>\n            5.5677592754364014e-01 4.1556000709533691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 -1.0746059706434608e-03</internalNodes>\n          <leafValues>\n            5.6389278173446655e-01 4.3530249595642090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 2.1550289820879698e-03</internalNodes>\n          <leafValues>\n            4.8262658715248108e-01 6.7497581243515015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 3.1742319464683533e-02</internalNodes>\n          <leafValues>\n            5.0483798980712891e-01 1.8832489848136902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 -7.8382723033428192e-02</internalNodes>\n          <leafValues>\n            2.3695489764213562e-01 5.2601581811904907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 5.7415119372308254e-03</internalNodes>\n          <leafValues>\n            5.0488287210464478e-01 2.7764698863029480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 -2.9014600440859795e-03</internalNodes>\n          <leafValues>\n            6.2386047840118408e-01 4.6933171153068542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 973 -2.6427931152284145e-03</internalNodes>\n          <leafValues>\n            3.3141419291496277e-01 5.1697772741317749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 -1.0949660092592239e-01</internalNodes>\n          <leafValues>\n            2.3800450563430786e-01 5.1834410429000854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 7.4075913289561868e-05</internalNodes>\n          <leafValues>\n            4.0696358680725098e-01 5.3621500730514526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 -5.0593802006915212e-04</internalNodes>\n          <leafValues>\n            5.5067062377929688e-01 4.3745940923690796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 977 -8.2131777890026569e-04</internalNodes>\n          <leafValues>\n            5.5257099866867065e-01 4.2093759775161743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 -6.0276539443293586e-05</internalNodes>\n          <leafValues>\n            5.4554748535156250e-01 4.7482660412788391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 6.8065142259001732e-03</internalNodes>\n          <leafValues>\n            5.1579958200454712e-01 3.4245771169662476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 1.7202789895236492e-03</internalNodes>\n          <leafValues>\n            5.0132077932357788e-01 6.3312637805938721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 -1.3016929733566940e-04</internalNodes>\n          <leafValues>\n            5.5397182703018188e-01 4.2268699407577515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 -4.8016388900578022e-03</internalNodes>\n          <leafValues>\n            4.4250950217247009e-01 5.4307800531387329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 -2.5399310979992151e-03</internalNodes>\n          <leafValues>\n            7.1457821130752563e-01 4.6976050734519958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 -1.4278929447755218e-03</internalNodes>\n          <leafValues>\n            4.0704450011253357e-01 5.3996050357818604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 -2.5142550468444824e-02</internalNodes>\n          <leafValues>\n            7.8846907615661621e-01 4.7473520040512085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 -3.8899609353393316e-03</internalNodes>\n          <leafValues>\n            4.2961919307708740e-01 5.5771100521087646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 4.3947459198534489e-03</internalNodes>\n          <leafValues>\n            4.6931621432304382e-01 7.0239442586898804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 2.4678420275449753e-02</internalNodes>\n          <leafValues>\n            5.2423220872879028e-01 3.8125100731849670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 3.8047678768634796e-02</internalNodes>\n          <leafValues>\n            5.0117397308349609e-01 1.6878280043601990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 990 7.9424865543842316e-03</internalNodes>\n          <leafValues>\n            4.8285821080207825e-01 6.3695681095123291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 991 -1.5110049862414598e-03</internalNodes>\n          <leafValues>\n            5.9064859151840210e-01 4.4876679778099060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 992 6.4201741479337215e-03</internalNodes>\n          <leafValues>\n            5.2410978078842163e-01 2.9905700683593750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 993 -2.9802159406244755e-03</internalNodes>\n          <leafValues>\n            3.0414658784866333e-01 5.0784897804260254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 994 -7.4580078944563866e-04</internalNodes>\n          <leafValues>\n            4.1281390190124512e-01 5.2568262815475464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 995 -1.0470950044691563e-02</internalNodes>\n          <leafValues>\n            5.8083951473236084e-01 4.4942960143089294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 996 9.3369204550981522e-03</internalNodes>\n          <leafValues>\n            5.2465528249740601e-01 2.6589488983154297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 997 2.7936900034546852e-02</internalNodes>\n          <leafValues>\n            4.6749550104141235e-01 7.0872569084167480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 998 7.4277678504586220e-03</internalNodes>\n          <leafValues>\n            5.4094868898391724e-01 3.7585180997848511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 999 -2.3584509268403053e-02</internalNodes>\n          <leafValues>\n            3.7586399912834167e-01 5.2385509014129639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1000 1.1452640173956752e-03</internalNodes>\n          <leafValues>\n            4.3295788764953613e-01 5.8042472600936890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1001 -4.3468660442158580e-04</internalNodes>\n          <leafValues>\n            5.2806180715560913e-01 3.8730698823928833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1002 1.0648540221154690e-02</internalNodes>\n          <leafValues>\n            4.9021130800247192e-01 5.6812518835067749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1003 -3.9418050437234342e-04</internalNodes>\n          <leafValues>\n            5.5708801746368408e-01 4.3182510137557983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1004 -1.3270479394122958e-04</internalNodes>\n          <leafValues>\n            5.6584399938583374e-01 4.3435549736022949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1005 -2.0125510636717081e-03</internalNodes>\n          <leafValues>\n            6.0567390918731689e-01 4.5375239849090576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1006 2.4854319635778666e-03</internalNodes>\n          <leafValues>\n            5.3904771804809570e-01 4.1380101442337036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1007 1.8237880431115627e-03</internalNodes>\n          <leafValues>\n            4.3548288941383362e-01 5.7171887159347534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1008 -1.6656659543514252e-02</internalNodes>\n          <leafValues>\n            3.0109131336212158e-01 5.2161228656768799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1009 8.0349558265879750e-04</internalNodes>\n          <leafValues>\n            5.3001511096954346e-01 3.8183969259262085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1010 3.4170378930866718e-03</internalNodes>\n          <leafValues>\n            5.3280287981033325e-01 4.2414000630378723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1011 -3.6222729249857366e-04</internalNodes>\n          <leafValues>\n            5.4917281866073608e-01 4.1869771480560303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1012 -1.1630020290613174e-01</internalNodes>\n          <leafValues>\n            1.4407220482826233e-01 5.2264511585235596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1013 -1.4695010147988796e-02</internalNodes>\n          <leafValues>\n            7.7477252483367920e-01 4.7157171368598938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1014 2.1972130052745342e-03</internalNodes>\n          <leafValues>\n            5.3554338216781616e-01 3.3156448602676392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1015 -4.6965209185145795e-04</internalNodes>\n          <leafValues>\n            5.7672351598739624e-01 4.4581368565559387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1016 6.5144998952746391e-03</internalNodes>\n          <leafValues>\n            5.2156740427017212e-01 3.6478888988494873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1017 2.1300060674548149e-02</internalNodes>\n          <leafValues>\n            4.9942049384117126e-01 1.5679509937763214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1018 3.1881409231573343e-03</internalNodes>\n          <leafValues>\n            4.7422000765800476e-01 6.2872701883316040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1019 9.0019777417182922e-04</internalNodes>\n          <leafValues>\n            5.3479540348052979e-01 3.9437520503997803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1020 -5.1772277802228928e-03</internalNodes>\n          <leafValues>\n            6.7271918058395386e-01 5.0131380558013916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1021 -4.3764649890363216e-03</internalNodes>\n          <leafValues>\n            3.1066751480102539e-01 5.1287931203842163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1022 2.6299960445612669e-03</internalNodes>\n          <leafValues>\n            4.8863101005554199e-01 5.7552158832550049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1023 -2.0458688959479332e-03</internalNodes>\n          <leafValues>\n            6.0257941484451294e-01 4.5580768585205078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1024 6.9482706487178802e-02</internalNodes>\n          <leafValues>\n            5.2407479286193848e-01 2.1852590143680573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1025 2.4048939347267151e-02</internalNodes>\n          <leafValues>\n            5.0118672847747803e-01 2.0906220376491547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1026 3.1095340382307768e-03</internalNodes>\n          <leafValues>\n            4.8667120933532715e-01 7.1085482835769653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1027 -1.2503260513767600e-03</internalNodes>\n          <leafValues>\n            3.4078910946846008e-01 5.1561951637268066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1028 -1.0281190043315291e-03</internalNodes>\n          <leafValues>\n            5.5755722522735596e-01 4.4394320249557495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1029 -8.8893622159957886e-03</internalNodes>\n          <leafValues>\n            6.4020007848739624e-01 4.6204420924186707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1030 -6.1094801640138030e-04</internalNodes>\n          <leafValues>\n            3.7664419412612915e-01 5.4488998651504517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1031 -5.7686357758939266e-03</internalNodes>\n          <leafValues>\n            3.3186489343643188e-01 5.1336771249771118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1032 1.8506490159779787e-03</internalNodes>\n          <leafValues>\n            4.9035701155662537e-01 6.4069348573684692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1033 -9.9799469113349915e-02</internalNodes>\n          <leafValues>\n            1.5360510349273682e-01 5.0155621767044067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1034 -3.5128349065780640e-01</internalNodes>\n          <leafValues>\n            5.8823131024837494e-02 5.1743787527084351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1035 -4.5244570821523666e-02</internalNodes>\n          <leafValues>\n            6.9614887237548828e-01 4.6778729557991028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1036 7.1481578052043915e-02</internalNodes>\n          <leafValues>\n            5.1679861545562744e-01 1.0380929708480835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1037 2.1895780228078365e-03</internalNodes>\n          <leafValues>\n            4.2730781435966492e-01 5.5320608615875244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1038 -5.9242651332169771e-04</internalNodes>\n          <leafValues>\n            4.6389439702033997e-01 5.2763891220092773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1039 1.6788389766588807e-03</internalNodes>\n          <leafValues>\n            5.3016489744186401e-01 3.9320349693298340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1040 -2.2163488902151585e-03</internalNodes>\n          <leafValues>\n            5.6306940317153931e-01 4.7570338845252991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1041 1.1568699846975505e-04</internalNodes>\n          <leafValues>\n            4.3075358867645264e-01 5.5357027053833008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1042 -7.2017288766801357e-03</internalNodes>\n          <leafValues>\n            1.4448820054531097e-01 5.1930642127990723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1043 8.9081272017210722e-04</internalNodes>\n          <leafValues>\n            4.3844321370124817e-01 5.5936211347579956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1044 1.9605009583756328e-04</internalNodes>\n          <leafValues>\n            5.3404158353805542e-01 4.7059568762779236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1045 5.2022142335772514e-04</internalNodes>\n          <leafValues>\n            5.2138561010360718e-01 3.8100790977478027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1046 9.4588572392240167e-04</internalNodes>\n          <leafValues>\n            4.7694149613380432e-01 6.1307388544082642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1047 9.1698471806012094e-05</internalNodes>\n          <leafValues>\n            4.2450091242790222e-01 5.4293632507324219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1048 2.1833200007677078e-03</internalNodes>\n          <leafValues>\n            5.4577308893203735e-01 4.1910758614540100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1049 -8.6039671441540122e-04</internalNodes>\n          <leafValues>\n            5.7645887136459351e-01 4.4716599583625793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1050 -1.3236239552497864e-02</internalNodes>\n          <leafValues>\n            6.3728231191635132e-01 4.6950098872184753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1051 4.3376701069064438e-04</internalNodes>\n          <leafValues>\n            5.3178739547729492e-01 3.9458298683166504e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>140</maxWeakCount>\n      <stageThreshold>6.9229873657226562e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1052 -2.4847149848937988e-02</internalNodes>\n          <leafValues>\n            6.5555167198181152e-01 3.8733118772506714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1053 6.1348611488938332e-03</internalNodes>\n          <leafValues>\n            3.7480720877647400e-01 5.9739977121353149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1054 6.4498498104512691e-03</internalNodes>\n          <leafValues>\n            5.4254919290542603e-01 2.5488111376762390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1055 6.3491211039945483e-04</internalNodes>\n          <leafValues>\n            2.4624420702457428e-01 5.3872537612915039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1056 1.4023890253156424e-03</internalNodes>\n          <leafValues>\n            5.5943220853805542e-01 3.5286578536033630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1057 3.0044000595808029e-04</internalNodes>\n          <leafValues>\n            3.9585039019584656e-01 5.7659381628036499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1058 1.0042409849120304e-04</internalNodes>\n          <leafValues>\n            3.6989969015121460e-01 5.5349981784820557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1059 -5.0841490738093853e-03</internalNodes>\n          <leafValues>\n            3.7110909819602966e-01 5.5478000640869141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1060 -1.9537260755896568e-02</internalNodes>\n          <leafValues>\n            7.4927550554275513e-01 4.5792970061302185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1061 -7.4532740654831287e-06</internalNodes>\n          <leafValues>\n            5.6497871875762939e-01 3.9040699601173401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1062 -3.6079459823668003e-03</internalNodes>\n          <leafValues>\n            3.3810880780220032e-01 5.2678012847900391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1063 2.0697501022368670e-03</internalNodes>\n          <leafValues>\n            5.5192911624908447e-01 3.7143889069557190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1064 -4.6463840408250690e-04</internalNodes>\n          <leafValues>\n            5.6082147359848022e-01 4.1135668754577637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1065 7.5490452582016587e-04</internalNodes>\n          <leafValues>\n            3.5592061281204224e-01 5.3293561935424805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1066 -9.8322238773107529e-04</internalNodes>\n          <leafValues>\n            5.4147958755493164e-01 3.7632051110267639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1067 -1.9940640777349472e-02</internalNodes>\n          <leafValues>\n            6.3479030132293701e-01 4.7052991390228271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1068 3.7680300883948803e-03</internalNodes>\n          <leafValues>\n            3.9134898781776428e-01 5.5637162923812866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1069 -9.4528505578637123e-03</internalNodes>\n          <leafValues>\n            2.5548928976058960e-01 5.2151167392730713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1070 2.9560849070549011e-03</internalNodes>\n          <leafValues>\n            5.1746791601181030e-01 3.0639201402664185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1071 9.1078737750649452e-03</internalNodes>\n          <leafValues>\n            5.3884482383728027e-01 2.8859630227088928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1072 1.8219229532405734e-03</internalNodes>\n          <leafValues>\n            4.3360430002212524e-01 5.8521968126296997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1073 1.4688739553093910e-02</internalNodes>\n          <leafValues>\n            5.2873617410659790e-01 2.8700059652328491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1074 -1.4387990348041058e-02</internalNodes>\n          <leafValues>\n            7.0194488763809204e-01 4.6473708748817444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1075 -1.8986649811267853e-02</internalNodes>\n          <leafValues>\n            2.9865521192550659e-01 5.2470117807388306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1076 1.1527639580890536e-03</internalNodes>\n          <leafValues>\n            4.3234738707542419e-01 5.9316617250442505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1077 1.0933670215308666e-02</internalNodes>\n          <leafValues>\n            5.2868640422821045e-01 3.1303191184997559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1078 -1.4932730235159397e-02</internalNodes>\n          <leafValues>\n            2.6584190130233765e-01 5.0840771198272705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1079 -2.9970539617352188e-04</internalNodes>\n          <leafValues>\n            5.4635268449783325e-01 3.7407240271568298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1080 4.1677621193230152e-03</internalNodes>\n          <leafValues>\n            4.7034969925880432e-01 7.4357217550277710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1081 -6.3905320130288601e-03</internalNodes>\n          <leafValues>\n            2.0692589879035950e-01 5.2805382013320923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1082 4.5029609464108944e-03</internalNodes>\n          <leafValues>\n            5.1826488971710205e-01 3.4835430979728699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1083 -9.2040365561842918e-03</internalNodes>\n          <leafValues>\n            6.8037772178649902e-01 4.9323600530624390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1084 8.1327259540557861e-02</internalNodes>\n          <leafValues>\n            5.0583988428115845e-01 2.2530519962310791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1085 -1.5079280734062195e-01</internalNodes>\n          <leafValues>\n            2.9634249210357666e-01 5.2646797895431519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1086 3.3179009333252907e-03</internalNodes>\n          <leafValues>\n            4.6554958820343018e-01 7.0729321241378784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1087 7.7402801252901554e-04</internalNodes>\n          <leafValues>\n            4.7803479433059692e-01 5.6682378053665161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1088 6.8199541419744492e-04</internalNodes>\n          <leafValues>\n            4.2869961261749268e-01 5.7221567630767822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1089 5.3671570494771004e-03</internalNodes>\n          <leafValues>\n            5.2993071079254150e-01 3.1146219372749329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1090 9.7018666565418243e-05</internalNodes>\n          <leafValues>\n            3.6746388673782349e-01 5.2694618701934814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1091 -1.2534089386463165e-01</internalNodes>\n          <leafValues>\n            2.3514920473098755e-01 5.2457910776138306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1092 -5.2516269497573376e-03</internalNodes>\n          <leafValues>\n            7.1159368753433228e-01 4.6937671303749084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1093 -7.8342109918594360e-03</internalNodes>\n          <leafValues>\n            4.4626510143280029e-01 5.4090857505798340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1094 -1.1310069821774960e-03</internalNodes>\n          <leafValues>\n            5.9456187486648560e-01 4.4176620244979858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1095 1.7601120052859187e-03</internalNodes>\n          <leafValues>\n            5.3532499074935913e-01 3.9734530448913574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1096 -8.1581249833106995e-04</internalNodes>\n          <leafValues>\n            3.7602680921554565e-01 5.2647268772125244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1097 -3.8687589112669230e-03</internalNodes>\n          <leafValues>\n            6.3099128007888794e-01 4.7498199343681335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1098 1.5207129763439298e-03</internalNodes>\n          <leafValues>\n            5.2301818132400513e-01 3.3612239360809326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1099 5.4586738348007202e-01</internalNodes>\n          <leafValues>\n            5.1671397686004639e-01 1.1726350337266922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1100 1.5650190412998199e-02</internalNodes>\n          <leafValues>\n            4.9794390797615051e-01 1.3932949304580688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1101 -1.1731860227882862e-02</internalNodes>\n          <leafValues>\n            7.1296507120132446e-01 4.9211961030960083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1102 -6.1765122227370739e-03</internalNodes>\n          <leafValues>\n            2.2881029546260834e-01 5.0497019290924072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1103 2.2457661107182503e-03</internalNodes>\n          <leafValues>\n            4.6324339509010315e-01 6.0487258434295654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1104 -5.1915869116783142e-03</internalNodes>\n          <leafValues>\n            6.4674210548400879e-01 4.6021929383277893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1105 -2.3827880620956421e-02</internalNodes>\n          <leafValues>\n            1.4820009469985962e-01 5.2260792255401611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1106 1.0284580057486892e-03</internalNodes>\n          <leafValues>\n            5.1354891061782837e-01 3.3759570121765137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1107 -1.0078850202262402e-02</internalNodes>\n          <leafValues>\n            2.7405610680580139e-01 5.3035670518875122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1108 2.6168930344283581e-03</internalNodes>\n          <leafValues>\n            5.3326708078384399e-01 3.9724540710449219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1109 5.4385367548093200e-04</internalNodes>\n          <leafValues>\n            5.3656041622161865e-01 4.0634119510650635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1110 5.3510512225329876e-03</internalNodes>\n          <leafValues>\n            4.6537590026855469e-01 6.8890458345413208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1111 -1.5274790348485112e-03</internalNodes>\n          <leafValues>\n            5.4495012760162354e-01 3.6247238516807556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1112 -8.0624416470527649e-02</internalNodes>\n          <leafValues>\n            1.6560870409011841e-01 5.0002872943878174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1113 2.2192029282450676e-02</internalNodes>\n          <leafValues>\n            5.1327311992645264e-01 2.0028080046176910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1114 7.3100631125271320e-03</internalNodes>\n          <leafValues>\n            4.6179479360580444e-01 6.3665360212326050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1115 -6.4063072204589844e-03</internalNodes>\n          <leafValues>\n            5.9162509441375732e-01 4.8678609728813171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1116 -7.6415040530264378e-04</internalNodes>\n          <leafValues>\n            3.8884091377258301e-01 5.3157979249954224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1117 7.6734489994123578e-04</internalNodes>\n          <leafValues>\n            4.1590648889541626e-01 5.6052798032760620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1118 6.1474501853808761e-04</internalNodes>\n          <leafValues>\n            3.0890220403671265e-01 5.1201480627059937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1119 -5.0105270929634571e-03</internalNodes>\n          <leafValues>\n            3.9721998572349548e-01 5.2073061466217041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1120 -8.6909132078289986e-03</internalNodes>\n          <leafValues>\n            6.2574082612991333e-01 4.6085759997367859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1121 -1.6391459852457047e-02</internalNodes>\n          <leafValues>\n            2.0852099359035492e-01 5.2422660589218140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1122 4.0973909199237823e-04</internalNodes>\n          <leafValues>\n            5.2224272489547729e-01 3.7803208827972412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1123 -2.5242289993911982e-03</internalNodes>\n          <leafValues>\n            5.8039271831512451e-01 4.6118900179862976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1124 5.0945312250405550e-04</internalNodes>\n          <leafValues>\n            4.4012719392776489e-01 5.8460158109664917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1125 1.9656419754028320e-03</internalNodes>\n          <leafValues>\n            5.3223252296447754e-01 4.1845908761024475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1126 5.6298897834494710e-04</internalNodes>\n          <leafValues>\n            3.7418448925018311e-01 5.2345657348632812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1127 -6.7946797935292125e-04</internalNodes>\n          <leafValues>\n            4.6310418844223022e-01 5.3564780950546265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1128 7.2856349870562553e-03</internalNodes>\n          <leafValues>\n            5.0446701049804688e-01 2.3775640130043030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1129 -1.7459489405155182e-02</internalNodes>\n          <leafValues>\n            7.2891211509704590e-01 5.0504350662231445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1130 -2.5421749800443649e-02</internalNodes>\n          <leafValues>\n            6.6671347618103027e-01 4.6781000494956970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1131 -1.5647639520466328e-03</internalNodes>\n          <leafValues>\n            4.3917590379714966e-01 5.3236269950866699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1132 1.1444360017776489e-02</internalNodes>\n          <leafValues>\n            4.3464401364326477e-01 5.6800121068954468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1133 -6.7352550104260445e-04</internalNodes>\n          <leafValues>\n            4.4771409034729004e-01 5.2968120574951172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1134 9.3194209039211273e-03</internalNodes>\n          <leafValues>\n            4.7402000427246094e-01 7.4626070261001587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1135 1.3328490604180843e-04</internalNodes>\n          <leafValues>\n            5.3650617599487305e-01 4.7521349787712097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1136 -7.8815799206495285e-03</internalNodes>\n          <leafValues>\n            1.7522190511226654e-01 5.0152552127838135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1137 -5.7985680177807808e-03</internalNodes>\n          <leafValues>\n            7.2712367773056030e-01 4.8962008953094482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1138 -3.8922499516047537e-04</internalNodes>\n          <leafValues>\n            4.0039089322090149e-01 5.3449410200119019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1139 -1.9288610201328993e-03</internalNodes>\n          <leafValues>\n            5.6056129932403564e-01 4.8039558529853821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1140 8.4214154630899429e-03</internalNodes>\n          <leafValues>\n            4.7532469034194946e-01 7.6236087083816528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1141 8.1655876711010933e-03</internalNodes>\n          <leafValues>\n            5.3932619094848633e-01 4.1916438937187195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1142 4.8280550981871784e-04</internalNodes>\n          <leafValues>\n            4.2408001422882080e-01 5.3998219966888428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1143 -2.7186630759388208e-03</internalNodes>\n          <leafValues>\n            4.2445999383926392e-01 5.4249238967895508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1144 -1.2507230043411255e-02</internalNodes>\n          <leafValues>\n            5.8958417177200317e-01 4.5504111051559448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1145 -2.4286519736051559e-02</internalNodes>\n          <leafValues>\n            2.6471349596977234e-01 5.1891797780990601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1146 -2.9676330741494894e-03</internalNodes>\n          <leafValues>\n            7.3476827144622803e-01 4.7497498989105225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1147 -1.2528999708592892e-02</internalNodes>\n          <leafValues>\n            2.7560499310493469e-01 5.1775997877120972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1148 -1.0104000102728605e-03</internalNodes>\n          <leafValues>\n            3.5105609893798828e-01 5.1447242498397827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1149 -2.1348530426621437e-03</internalNodes>\n          <leafValues>\n            5.6379258632659912e-01 4.6673199534416199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1150 1.9564259797334671e-02</internalNodes>\n          <leafValues>\n            4.6145731210708618e-01 6.1376398801803589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1151 -9.7146347165107727e-02</internalNodes>\n          <leafValues>\n            2.9983788728713989e-01 5.1935559511184692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1152 4.5014568604528904e-03</internalNodes>\n          <leafValues>\n            5.0778847932815552e-01 3.0457559227943420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1153 6.3706971704959869e-03</internalNodes>\n          <leafValues>\n            4.8610189557075500e-01 6.8875008821487427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1154 -9.0721528977155685e-03</internalNodes>\n          <leafValues>\n            1.6733959317207336e-01 5.0175631046295166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1155 -5.3537208586931229e-03</internalNodes>\n          <leafValues>\n            2.6927569508552551e-01 5.2426332235336304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1156 -1.0932840406894684e-02</internalNodes>\n          <leafValues>\n            7.1838641166687012e-01 4.7360289096832275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1157 8.2356072962284088e-03</internalNodes>\n          <leafValues>\n            5.2239668369293213e-01 2.3898629844188690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1158 -1.0038160253316164e-03</internalNodes>\n          <leafValues>\n            5.7193559408187866e-01 4.4339430332183838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1159 4.0859128348529339e-03</internalNodes>\n          <leafValues>\n            5.4728418588638306e-01 4.1488361358642578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1160 1.5485419332981110e-01</internalNodes>\n          <leafValues>\n            4.9738121032714844e-01 6.1061598360538483e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1161 2.0897459762636572e-04</internalNodes>\n          <leafValues>\n            4.7091740369796753e-01 5.4238891601562500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1162 3.3316991175524890e-04</internalNodes>\n          <leafValues>\n            4.0896269679069519e-01 5.3009921312332153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1163 -1.0813400149345398e-02</internalNodes>\n          <leafValues>\n            6.1043697595596313e-01 4.9573341012001038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1164 4.5656010508537292e-02</internalNodes>\n          <leafValues>\n            5.0696891546249390e-01 2.8666600584983826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1165 1.2569549726322293e-03</internalNodes>\n          <leafValues>\n            4.8469170928001404e-01 6.3181710243225098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1166 -1.2015070021152496e-01</internalNodes>\n          <leafValues>\n            6.0526140034198761e-02 4.9809598922729492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1167 -1.0533799650147557e-04</internalNodes>\n          <leafValues>\n            5.3631097078323364e-01 4.7080421447753906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1168 -2.0703190565109253e-01</internalNodes>\n          <leafValues>\n            5.9660330414772034e-02 4.9790981411933899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1169 1.2909180077258497e-04</internalNodes>\n          <leafValues>\n            4.7129771113395691e-01 5.3779977560043335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1170 3.8818528992123902e-04</internalNodes>\n          <leafValues>\n            4.3635380268096924e-01 5.5341911315917969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1171 -2.9243610333651304e-03</internalNodes>\n          <leafValues>\n            5.8111858367919922e-01 4.8252159357070923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1172 8.3882332546636462e-04</internalNodes>\n          <leafValues>\n            5.3117001056671143e-01 4.0381389856338501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1173 -1.9061550265178084e-03</internalNodes>\n          <leafValues>\n            3.7707018852233887e-01 5.2600151300430298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1174 8.9514348655939102e-03</internalNodes>\n          <leafValues>\n            4.7661679983139038e-01 7.6821839809417725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1175 1.3083459809422493e-02</internalNodes>\n          <leafValues>\n            5.2644628286361694e-01 3.0622220039367676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1176 -2.1159330010414124e-01</internalNodes>\n          <leafValues>\n            6.7371982336044312e-01 4.6958100795745850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1177 3.1493250280618668e-03</internalNodes>\n          <leafValues>\n            5.6448352336883545e-01 4.3869531154632568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1178 3.9754100725986063e-04</internalNodes>\n          <leafValues>\n            4.5260611176490784e-01 5.8956301212310791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1179 -1.3814480043947697e-03</internalNodes>\n          <leafValues>\n            6.0705822706222534e-01 4.9424138665199280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1180 -5.8122188784182072e-04</internalNodes>\n          <leafValues>\n            5.9982132911682129e-01 4.5082521438598633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1181 -2.3905329871922731e-03</internalNodes>\n          <leafValues>\n            4.2055889964103699e-01 5.2238482236862183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1182 2.7268929407000542e-02</internalNodes>\n          <leafValues>\n            5.2064472436904907e-01 3.5633018612861633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1183 -3.7658358924090862e-03</internalNodes>\n          <leafValues>\n            3.1447041034698486e-01 5.2188140153884888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1184 -1.4903489500284195e-03</internalNodes>\n          <leafValues>\n            3.3801960945129395e-01 5.1244372129440308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1185 -1.7428230494260788e-02</internalNodes>\n          <leafValues>\n            5.8299607038497925e-01 4.9197259545326233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1186 -1.5278030186891556e-02</internalNodes>\n          <leafValues>\n            6.1631447076797485e-01 4.6178871393203735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1187 3.1995609402656555e-02</internalNodes>\n          <leafValues>\n            5.1663571596145630e-01 1.7127640545368195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1188 -3.8256710395216942e-03</internalNodes>\n          <leafValues>\n            3.4080120921134949e-01 5.1313877105712891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1189 -8.5186436772346497e-03</internalNodes>\n          <leafValues>\n            6.1055189371109009e-01 4.9979418516159058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1190 9.0641621500253677e-04</internalNodes>\n          <leafValues>\n            4.3272709846496582e-01 5.5823111534118652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1191 1.0344849899411201e-02</internalNodes>\n          <leafValues>\n            4.8556530475616455e-01 5.4524201154708862e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>160</maxWeakCount>\n      <stageThreshold>7.9249076843261719e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1192 7.8981826081871986e-03</internalNodes>\n          <leafValues>\n            3.3325248956680298e-01 5.9464621543884277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1193 1.6170160379260778e-03</internalNodes>\n          <leafValues>\n            3.4906411170959473e-01 5.5778688192367554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1194 -5.5449741194024682e-04</internalNodes>\n          <leafValues>\n            5.5425661802291870e-01 3.2915300130844116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1195 1.5428980113938451e-03</internalNodes>\n          <leafValues>\n            3.6125791072845459e-01 5.5459791421890259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1196 -1.0329450014978647e-03</internalNodes>\n          <leafValues>\n            3.5301390290260315e-01 5.5761402845382690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1197 7.7698158565908670e-04</internalNodes>\n          <leafValues>\n            3.9167788624763489e-01 5.6453210115432739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1198 1.4320300519466400e-01</internalNodes>\n          <leafValues>\n            4.6674820780754089e-01 7.0236331224441528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1199 -7.3866490274667740e-03</internalNodes>\n          <leafValues>\n            3.0736848711967468e-01 5.2892577648162842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1200 -6.2936742324382067e-04</internalNodes>\n          <leafValues>\n            5.6221181154251099e-01 4.0370491147041321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1201 7.8893528552725911e-04</internalNodes>\n          <leafValues>\n            5.2676612138748169e-01 3.5578748583793640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1202 -1.2228050269186497e-02</internalNodes>\n          <leafValues>\n            6.6683208942413330e-01 4.6255499124526978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1203 3.5420239437371492e-03</internalNodes>\n          <leafValues>\n            5.5214381217956543e-01 3.8696730136871338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1204 -1.0585320414975286e-03</internalNodes>\n          <leafValues>\n            3.6286780238151550e-01 5.3209269046783447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1205 1.4935660146875307e-05</internalNodes>\n          <leafValues>\n            4.6324449777603149e-01 5.3633230924606323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1206 5.2537708543241024e-03</internalNodes>\n          <leafValues>\n            5.1322317123413086e-01 3.2657089829444885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1207 -8.2338023930788040e-03</internalNodes>\n          <leafValues>\n            6.6936898231506348e-01 4.7741401195526123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1208 2.1866810129722580e-05</internalNodes>\n          <leafValues>\n            4.0538620948791504e-01 5.4579311609268188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1209 -3.8150229956954718e-03</internalNodes>\n          <leafValues>\n            6.4549958705902100e-01 4.7931781411170959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1210 1.1105879675596952e-03</internalNodes>\n          <leafValues>\n            5.2704071998596191e-01 3.5296788811683655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1211 -5.7707689702510834e-03</internalNodes>\n          <leafValues>\n            3.8035470247268677e-01 5.3529578447341919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1212 -3.0158339068293571e-03</internalNodes>\n          <leafValues>\n            5.3394031524658203e-01 3.8871330022811890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1213 -8.5453689098358154e-04</internalNodes>\n          <leafValues>\n            3.5646161437034607e-01 5.2736037969589233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1214 1.1050510220229626e-02</internalNodes>\n          <leafValues>\n            4.6719071269035339e-01 6.8497377634048462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1215 4.2605839669704437e-02</internalNodes>\n          <leafValues>\n            5.1514732837677002e-01 7.0220090448856354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1216 -3.0781750101596117e-03</internalNodes>\n          <leafValues>\n            3.0416610836982727e-01 5.1526021957397461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1217 -5.4815728217363358e-03</internalNodes>\n          <leafValues>\n            6.4302957057952881e-01 4.8972299695014954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1218 3.1881860923022032e-03</internalNodes>\n          <leafValues>\n            5.3074932098388672e-01 3.8262099027633667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1219 3.5947180003859103e-04</internalNodes>\n          <leafValues>\n            4.6500471234321594e-01 5.4219049215316772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1220 -4.0705031715333462e-03</internalNodes>\n          <leafValues>\n            2.8496798872947693e-01 5.0791162252426147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1221 -1.4594170264899731e-02</internalNodes>\n          <leafValues>\n            2.9716458916664124e-01 5.1284617185592651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1222 -1.1947689927183092e-04</internalNodes>\n          <leafValues>\n            5.6310981512069702e-01 4.3430820107460022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1223 -6.9344649091362953e-04</internalNodes>\n          <leafValues>\n            4.4035780429840088e-01 5.3599590063095093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1224 1.4834799912932795e-05</internalNodes>\n          <leafValues>\n            3.4210088849067688e-01 5.1646977663040161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1225 9.0296985581517220e-03</internalNodes>\n          <leafValues>\n            4.6393430233001709e-01 6.1140751838684082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1226 -8.0640818923711777e-03</internalNodes>\n          <leafValues>\n            2.8201588988304138e-01 5.0754940509796143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1227 2.6062119752168655e-02</internalNodes>\n          <leafValues>\n            5.2089059352874756e-01 2.6887780427932739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1228 1.7314659431576729e-02</internalNodes>\n          <leafValues>\n            4.6637138724327087e-01 6.7385399341583252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1229 2.2666640579700470e-02</internalNodes>\n          <leafValues>\n            5.2093499898910522e-01 2.2127239406108856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1230 -2.1965929772704840e-03</internalNodes>\n          <leafValues>\n            6.0631012916564941e-01 4.5381900668144226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1231 -9.5282476395368576e-03</internalNodes>\n          <leafValues>\n            4.6352049708366394e-01 5.2474308013916016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1232 8.0943619832396507e-03</internalNodes>\n          <leafValues>\n            5.2894401550292969e-01 3.9138820767402649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1233 -7.2877332568168640e-02</internalNodes>\n          <leafValues>\n            7.7520018815994263e-01 4.9902349710464478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1234 -6.9009521976113319e-03</internalNodes>\n          <leafValues>\n            2.4280390143394470e-01 5.0480902194976807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1235 -1.1308239772915840e-02</internalNodes>\n          <leafValues>\n            5.7343649864196777e-01 4.8423761129379272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1236 5.9613201767206192e-02</internalNodes>\n          <leafValues>\n            5.0298362970352173e-01 2.5249770283699036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1237 -2.8624620754271746e-03</internalNodes>\n          <leafValues>\n            6.0730451345443726e-01 4.8984599113464355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1238 4.4781449250876904e-03</internalNodes>\n          <leafValues>\n            5.0152891874313354e-01 2.2203169763088226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1239 -1.7513240454718471e-03</internalNodes>\n          <leafValues>\n            6.6144287586212158e-01 4.9338689446449280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1240 4.0163420140743256e-02</internalNodes>\n          <leafValues>\n            5.1808780431747437e-01 3.7410449981689453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1241 3.4768949262797832e-04</internalNodes>\n          <leafValues>\n            4.7204169631004333e-01 5.8180320262908936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1242 2.6551650371402502e-03</internalNodes>\n          <leafValues>\n            3.8050109148025513e-01 5.2213358879089355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1243 -8.7706279009580612e-03</internalNodes>\n          <leafValues>\n            2.9441660642623901e-01 5.2312952280044556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1244 -5.5122091434895992e-03</internalNodes>\n          <leafValues>\n            7.3461771011352539e-01 4.7228169441223145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1245 6.8672042107209563e-04</internalNodes>\n          <leafValues>\n            5.4528760910034180e-01 4.2424130439758301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1246 5.6019669864326715e-04</internalNodes>\n          <leafValues>\n            4.3988621234893799e-01 5.6012850999832153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1247 2.4143769405782223e-03</internalNodes>\n          <leafValues>\n            4.7416868805885315e-01 6.1366218328475952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1248 -1.5680900542065501e-03</internalNodes>\n          <leafValues>\n            6.0445529222488403e-01 4.5164099335670471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1249 -3.6827491130679846e-03</internalNodes>\n          <leafValues>\n            2.4524590373039246e-01 5.2949821949005127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1250 -2.9409190756268799e-04</internalNodes>\n          <leafValues>\n            3.7328380346298218e-01 5.2514511346817017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1251 4.2847759323194623e-04</internalNodes>\n          <leafValues>\n            5.4988098144531250e-01 4.0655350685119629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1252 -4.8817070201039314e-03</internalNodes>\n          <leafValues>\n            2.1399089694023132e-01 4.9999570846557617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1253 2.7272020815871656e-04</internalNodes>\n          <leafValues>\n            4.6502870321273804e-01 5.8134287595748901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1254 2.0947199664078653e-04</internalNodes>\n          <leafValues>\n            4.3874868750572205e-01 5.5727928876876831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1255 4.8501189798116684e-02</internalNodes>\n          <leafValues>\n            5.2449727058410645e-01 3.2128891348838806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1256 -4.5166411437094212e-03</internalNodes>\n          <leafValues>\n            6.0568130016326904e-01 4.5458820462226868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1257 -1.2291680090129375e-02</internalNodes>\n          <leafValues>\n            2.0409290492534637e-01 5.1522141695022583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1258 4.8549679922871292e-04</internalNodes>\n          <leafValues>\n            5.2376049757003784e-01 3.7395030260086060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1259 3.0556049197912216e-02</internalNodes>\n          <leafValues>\n            4.9605339765548706e-01 5.9382462501525879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1260 -1.5105320198927075e-04</internalNodes>\n          <leafValues>\n            5.3513038158416748e-01 4.1452041268348694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1261 2.4937440175563097e-03</internalNodes>\n          <leafValues>\n            4.6933668851852417e-01 5.5149412155151367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1262 -1.2382130138576031e-02</internalNodes>\n          <leafValues>\n            6.7913967370986938e-01 4.6816679835319519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1263 -5.1333461888134480e-03</internalNodes>\n          <leafValues>\n            3.6087390780448914e-01 5.2291601896286011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1264 5.1919277757406235e-04</internalNodes>\n          <leafValues>\n            5.3000730276107788e-01 3.6336138844490051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1265 1.5060420334339142e-01</internalNodes>\n          <leafValues>\n            5.1573169231414795e-01 2.2117820382118225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1266 7.7144149690866470e-03</internalNodes>\n          <leafValues>\n            4.4104969501495361e-01 5.7766091823577881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1267 9.4443522393703461e-03</internalNodes>\n          <leafValues>\n            5.4018551111221313e-01 3.7566500902175903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1268 2.5006249779835343e-04</internalNodes>\n          <leafValues>\n            4.3682709336280823e-01 5.6073749065399170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1269 -3.3077150583267212e-03</internalNodes>\n          <leafValues>\n            4.2447990179061890e-01 5.5182307958602905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1270 7.4048910755664110e-04</internalNodes>\n          <leafValues>\n            4.4969621300697327e-01 5.9005767107009888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1271 4.4092051684856415e-02</internalNodes>\n          <leafValues>\n            5.2934932708740234e-01 3.1563550233840942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1272 3.3639909233897924e-03</internalNodes>\n          <leafValues>\n            4.4832968711853027e-01 5.8486622571945190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1273 -3.9760079234838486e-03</internalNodes>\n          <leafValues>\n            4.5595070719718933e-01 5.4836392402648926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1274 2.7716930489987135e-03</internalNodes>\n          <leafValues>\n            5.3417861461639404e-01 3.7924841046333313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1275 -2.4123019829858094e-04</internalNodes>\n          <leafValues>\n            5.6671887636184692e-01 4.5769730210304260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1276 4.9425667384639382e-04</internalNodes>\n          <leafValues>\n            4.4212448596954346e-01 5.6287872791290283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1277 -3.8876468897797167e-04</internalNodes>\n          <leafValues>\n            4.2883709073066711e-01 5.3910630941390991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1278 -5.0048898905515671e-02</internalNodes>\n          <leafValues>\n            6.8995130062103271e-01 4.7037428617477417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1279 -3.6635480821132660e-02</internalNodes>\n          <leafValues>\n            2.2177790105342865e-01 5.1918262243270874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1280 2.4273579474538565e-03</internalNodes>\n          <leafValues>\n            5.1362240314483643e-01 3.4973978996276855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1281 1.9558030180633068e-03</internalNodes>\n          <leafValues>\n            4.8261928558349609e-01 6.4083808660507202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1282 -1.7494610510766506e-03</internalNodes>\n          <leafValues>\n            3.9228358864784241e-01 5.2726852893829346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1283 1.3955079950392246e-02</internalNodes>\n          <leafValues>\n            5.0782018899917603e-01 8.4165048599243164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1284 -2.1896739781368524e-04</internalNodes>\n          <leafValues>\n            5.5204898118972778e-01 4.3142348527908325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1285 -1.5131309628486633e-03</internalNodes>\n          <leafValues>\n            3.9346051216125488e-01 5.3825712203979492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1286 -4.3622800149023533e-03</internalNodes>\n          <leafValues>\n            7.3706287145614624e-01 4.7364759445190430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1287 6.5160587430000305e-02</internalNodes>\n          <leafValues>\n            5.1592797040939331e-01 3.2815951108932495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1288 -2.3567399475723505e-03</internalNodes>\n          <leafValues>\n            3.6728268861770630e-01 5.1728862524032593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1289 1.5146659687161446e-02</internalNodes>\n          <leafValues>\n            5.0314939022064209e-01 6.6876041889190674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1290 -2.2850960493087769e-02</internalNodes>\n          <leafValues>\n            6.7675197124481201e-01 4.7095969319343567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1291 4.8867650330066681e-03</internalNodes>\n          <leafValues>\n            5.2579981088638306e-01 4.0598788857460022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1292 1.7619599821045995e-03</internalNodes>\n          <leafValues>\n            4.6962729096412659e-01 6.6882789134979248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1293 -1.2942519970238209e-03</internalNodes>\n          <leafValues>\n            4.3207129836082458e-01 5.3442817926406860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1294 1.0929949581623077e-02</internalNodes>\n          <leafValues>\n            4.9977061152458191e-01 1.6374860703945160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1295 2.9958489903947338e-05</internalNodes>\n          <leafValues>\n            4.2824178934097290e-01 5.6332242488861084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1296 -6.5884361974895000e-03</internalNodes>\n          <leafValues>\n            6.7721211910247803e-01 4.7005268931388855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1297 3.2527779694646597e-03</internalNodes>\n          <leafValues>\n            5.3133970499038696e-01 4.5361489057540894e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1298 -4.0435739792883396e-03</internalNodes>\n          <leafValues>\n            5.6600618362426758e-01 4.4133889675140381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1299 -1.2523540062829852e-03</internalNodes>\n          <leafValues>\n            3.7319138646125793e-01 5.3564518690109253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1300 1.9246719602961093e-04</internalNodes>\n          <leafValues>\n            5.1899862289428711e-01 3.7388110160827637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1301 -3.8589671254158020e-02</internalNodes>\n          <leafValues>\n            2.9563739895820618e-01 5.1888108253479004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1302 1.5489870565943420e-04</internalNodes>\n          <leafValues>\n            4.3471351265907288e-01 5.5095332860946655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1303 -3.3763848245143890e-02</internalNodes>\n          <leafValues>\n            3.2303300499916077e-01 5.1954758167266846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1304 -8.2657067105174065e-03</internalNodes>\n          <leafValues>\n            5.9754890203475952e-01 4.5521140098571777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1305 1.4481440302915871e-05</internalNodes>\n          <leafValues>\n            4.7456780076026917e-01 5.4974269866943359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1306 1.4951299817766994e-05</internalNodes>\n          <leafValues>\n            4.3244731426239014e-01 5.4806441068649292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1307 -1.8741799518465996e-02</internalNodes>\n          <leafValues>\n            1.5800529718399048e-01 5.1785331964492798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1308 1.7572239739820361e-03</internalNodes>\n          <leafValues>\n            4.5176368951797485e-01 5.7737642526626587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1309 -3.1391119118779898e-03</internalNodes>\n          <leafValues>\n            4.1496479511260986e-01 5.4608422517776489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1310 6.6656779381446540e-05</internalNodes>\n          <leafValues>\n            4.0390908718109131e-01 5.2930849790573120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1311 6.7743421532213688e-03</internalNodes>\n          <leafValues>\n            4.7676518559455872e-01 6.1219561100006104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1312 -7.3868161998689175e-03</internalNodes>\n          <leafValues>\n            3.5862588882446289e-01 5.1872807741165161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1313 1.4040930196642876e-02</internalNodes>\n          <leafValues>\n            4.7121399641036987e-01 5.5761557817459106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1314 -5.5258329957723618e-03</internalNodes>\n          <leafValues>\n            2.6610270142555237e-01 5.0392812490463257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1315 3.8684239983558655e-01</internalNodes>\n          <leafValues>\n            5.1443397998809814e-01 2.5258991122245789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1316 1.1459240340627730e-04</internalNodes>\n          <leafValues>\n            4.2849949002265930e-01 5.4233711957931519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1317 -1.8467569723725319e-02</internalNodes>\n          <leafValues>\n            3.8858351111412048e-01 5.2130621671676636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1318 -4.5907011372037232e-04</internalNodes>\n          <leafValues>\n            5.4125630855560303e-01 4.2359098792076111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1319 1.2527540093287826e-03</internalNodes>\n          <leafValues>\n            4.8993051052093506e-01 6.6240912675857544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1320 1.4910609461367130e-03</internalNodes>\n          <leafValues>\n            5.2867782115936279e-01 4.0400519967079163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1321 -7.5435562757775187e-04</internalNodes>\n          <leafValues>\n            6.0329902172088623e-01 4.7951200604438782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1322 -6.9478838704526424e-03</internalNodes>\n          <leafValues>\n            4.0844011306762695e-01 5.3735041618347168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1323 2.8092920547351241e-04</internalNodes>\n          <leafValues>\n            4.8460629582405090e-01 5.7593822479248047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1324 9.6073717577382922e-04</internalNodes>\n          <leafValues>\n            5.1647412776947021e-01 3.5549798607826233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1325 -2.6883929967880249e-04</internalNodes>\n          <leafValues>\n            5.6775820255279541e-01 4.7317659854888916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1326 2.1599370520561934e-03</internalNodes>\n          <leafValues>\n            4.7314870357513428e-01 7.0705670118331909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1327 5.6235301308333874e-03</internalNodes>\n          <leafValues>\n            5.2402430772781372e-01 2.7817919850349426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1328 -5.0243991427123547e-03</internalNodes>\n          <leafValues>\n            2.8370139002799988e-01 5.0623041391372681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1329 -9.7611639648675919e-03</internalNodes>\n          <leafValues>\n            7.4007177352905273e-01 4.9345690011978149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1330 4.1515100747346878e-03</internalNodes>\n          <leafValues>\n            5.1191312074661255e-01 3.4070080518722534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1331 6.2465080991387367e-03</internalNodes>\n          <leafValues>\n            4.9237880110740662e-01 6.5790587663650513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1332 -7.0597478188574314e-03</internalNodes>\n          <leafValues>\n            2.4347110092639923e-01 5.0328421592712402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1333 -2.0587709732353687e-03</internalNodes>\n          <leafValues>\n            5.9003108739852905e-01 4.6950870752334595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1334 -2.4146060459315777e-03</internalNodes>\n          <leafValues>\n            3.6473178863525391e-01 5.1892018318176270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1335 -1.4817609917372465e-03</internalNodes>\n          <leafValues>\n            6.0349482297897339e-01 4.9401280283927917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1336 -6.3016400672495365e-03</internalNodes>\n          <leafValues>\n            5.8189898729324341e-01 4.5604279637336731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1337 3.4763428848236799e-03</internalNodes>\n          <leafValues>\n            5.2174758911132812e-01 3.4839931130409241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1338 -2.2250870242714882e-02</internalNodes>\n          <leafValues>\n            2.3607000708580017e-01 5.0320827960968018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1339 -3.0612550675868988e-02</internalNodes>\n          <leafValues>\n            6.4991867542266846e-01 4.9149191379547119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1340 1.3057479634881020e-02</internalNodes>\n          <leafValues>\n            4.4133231043815613e-01 5.6837642192840576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1341 -6.0095742810517550e-04</internalNodes>\n          <leafValues>\n            4.3597310781478882e-01 5.3334832191467285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1342 -4.1514250915497541e-04</internalNodes>\n          <leafValues>\n            5.5040627717971802e-01 4.3260601162910461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1343 -1.3776290230453014e-02</internalNodes>\n          <leafValues>\n            4.0641129016876221e-01 5.2015489339828491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1344 -3.2296508550643921e-02</internalNodes>\n          <leafValues>\n            4.7351971268653870e-02 4.9771949648857117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1345 5.3556978702545166e-02</internalNodes>\n          <leafValues>\n            4.8817330598831177e-01 6.6669392585754395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1346 8.1889545544981956e-03</internalNodes>\n          <leafValues>\n            5.4000371694564819e-01 4.2408201098442078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1347 2.1055320394225419e-04</internalNodes>\n          <leafValues>\n            4.8020479083061218e-01 5.5638527870178223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1348 -2.4382730480283499e-03</internalNodes>\n          <leafValues>\n            7.3877930641174316e-01 4.7736850380897522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1349 3.2835570164024830e-03</internalNodes>\n          <leafValues>\n            5.2885460853576660e-01 3.1712919473648071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1350 2.3729570675641298e-03</internalNodes>\n          <leafValues>\n            4.7508129477500916e-01 7.0601707696914673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1351 -1.4541699783876538e-03</internalNodes>\n          <leafValues>\n            3.8117301464080811e-01 5.3307390213012695e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>177</maxWeakCount>\n      <stageThreshold>8.7696029663085938e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1352 5.5755238980054855e-02</internalNodes>\n          <leafValues>\n            4.0191569924354553e-01 6.8060368299484253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1353 2.4730248842388391e-03</internalNodes>\n          <leafValues>\n            3.3511489629745483e-01 5.9657198190689087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1354 -3.5031698644161224e-04</internalNodes>\n          <leafValues>\n            5.5577081441879272e-01 3.4822869300842285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1355 5.4167630150914192e-04</internalNodes>\n          <leafValues>\n            4.2608588933944702e-01 5.6933808326721191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1356 7.7193678589537740e-04</internalNodes>\n          <leafValues>\n            3.4942400455474854e-01 5.4336887598037720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1357 -1.5999219613149762e-03</internalNodes>\n          <leafValues>\n            4.0284991264343262e-01 5.4843592643737793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1358 -1.1832080053864047e-04</internalNodes>\n          <leafValues>\n            3.8069018721580505e-01 5.4254651069641113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1359 3.2909031142480671e-04</internalNodes>\n          <leafValues>\n            2.6201000809669495e-01 5.4295217990875244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1360 2.9518108931370080e-04</internalNodes>\n          <leafValues>\n            3.7997689843177795e-01 5.3992640972137451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1361 9.0466710389591753e-05</internalNodes>\n          <leafValues>\n            4.4336450099945068e-01 5.4402261972427368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1362 1.5007190086180344e-05</internalNodes>\n          <leafValues>\n            3.7196549773216248e-01 5.4091197252273560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1363 1.3935610651969910e-01</internalNodes>\n          <leafValues>\n            5.5253958702087402e-01 4.4790428876876831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1364 1.6461990308016539e-03</internalNodes>\n          <leafValues>\n            4.2645010352134705e-01 5.7721698284149170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1365 4.9984431825578213e-04</internalNodes>\n          <leafValues>\n            4.3595260381698608e-01 5.6858712434768677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1366 -1.0971280280500650e-03</internalNodes>\n          <leafValues>\n            3.3901369571685791e-01 5.2054089307785034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1367 6.6919892560690641e-04</internalNodes>\n          <leafValues>\n            4.5574560761451721e-01 5.9806597232818604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1368 8.6471042595803738e-04</internalNodes>\n          <leafValues>\n            5.1348412036895752e-01 2.9440331459045410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1369 -2.7182599296793342e-04</internalNodes>\n          <leafValues>\n            3.9065781235694885e-01 5.3771811723709106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1370 3.0249499104684219e-05</internalNodes>\n          <leafValues>\n            3.6796098947525024e-01 5.2256888151168823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1371 -8.5225896909832954e-03</internalNodes>\n          <leafValues>\n            7.2931021451950073e-01 4.8923650383949280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1372 1.6705560265108943e-03</internalNodes>\n          <leafValues>\n            4.3453249335289001e-01 5.6961381435394287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1373 -7.1433838456869125e-03</internalNodes>\n          <leafValues>\n            2.5912800431251526e-01 5.2256238460540771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1374 -1.6319369897246361e-02</internalNodes>\n          <leafValues>\n            6.9222790002822876e-01 4.6515759825706482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1375 4.8034260980784893e-03</internalNodes>\n          <leafValues>\n            5.3522628545761108e-01 3.2863029837608337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1376 -7.5421929359436035e-03</internalNodes>\n          <leafValues>\n            2.0405440032482147e-01 5.0345462560653687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1377 -1.4363110065460205e-02</internalNodes>\n          <leafValues>\n            6.8048888444900513e-01 4.8890590667724609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1378 8.9063588529825211e-04</internalNodes>\n          <leafValues>\n            5.3106957674026489e-01 3.8954809308052063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1379 -4.4060191139578819e-03</internalNodes>\n          <leafValues>\n            5.7415628433227539e-01 4.3724268674850464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1380 -1.8862540309783071e-04</internalNodes>\n          <leafValues>\n            2.8317859768867493e-01 5.0982052087783813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1381 -3.7979281041771173e-03</internalNodes>\n          <leafValues>\n            3.3725079894065857e-01 5.2465802431106567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1382 1.4627049677073956e-04</internalNodes>\n          <leafValues>\n            5.3066742420196533e-01 3.9117100834846497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1383 -4.9164638767251745e-05</internalNodes>\n          <leafValues>\n            5.4624962806701660e-01 3.9427208900451660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1384 -3.3582501113414764e-02</internalNodes>\n          <leafValues>\n            2.1578240394592285e-01 5.0482118129730225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1385 -3.5339309833943844e-03</internalNodes>\n          <leafValues>\n            6.4653122425079346e-01 4.8726969957351685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1386 5.0144111737608910e-03</internalNodes>\n          <leafValues>\n            4.6176680922508240e-01 6.2480747699737549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1387 1.8817370757460594e-02</internalNodes>\n          <leafValues>\n            5.2206891775131226e-01 2.0000520348548889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1388 -1.3434339780360460e-03</internalNodes>\n          <leafValues>\n            4.0145379304885864e-01 5.3016197681427002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1389 1.7557960236445069e-03</internalNodes>\n          <leafValues>\n            4.7940391302108765e-01 5.6531697511672974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1390 -9.5637463033199310e-02</internalNodes>\n          <leafValues>\n            2.0341950654983521e-01 5.0067067146301270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1391 -2.2241229191422462e-02</internalNodes>\n          <leafValues>\n            7.6724731922149658e-01 5.0463402271270752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1392 -1.5575819648802280e-02</internalNodes>\n          <leafValues>\n            7.4903422594070435e-01 4.7558510303497314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1393 5.3599118255078793e-03</internalNodes>\n          <leafValues>\n            5.3653037548065186e-01 4.0046709775924683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1394 -2.1763499826192856e-02</internalNodes>\n          <leafValues>\n            7.4015498161315918e-02 4.9641749262809753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1395 -1.6561590135097504e-01</internalNodes>\n          <leafValues>\n            2.8591030836105347e-01 5.2180862426757812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1396 1.6461320046801120e-04</internalNodes>\n          <leafValues>\n            4.1916158795356750e-01 5.3807932138442993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1397 -8.9077502489089966e-03</internalNodes>\n          <leafValues>\n            6.2731927633285522e-01 4.8774048686027527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1398 8.6346449097618461e-04</internalNodes>\n          <leafValues>\n            5.1599407196044922e-01 3.6710259318351746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1399 -1.3751760125160217e-03</internalNodes>\n          <leafValues>\n            5.8843767642974854e-01 4.5790839195251465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1400 -1.4081239933148026e-03</internalNodes>\n          <leafValues>\n            3.5605099797248840e-01 5.1399451494216919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1401 -3.9342888630926609e-03</internalNodes>\n          <leafValues>\n            5.9942889213562012e-01 4.6642720699310303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1402 -3.1966928392648697e-02</internalNodes>\n          <leafValues>\n            3.3454620838165283e-01 5.1441830396652222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1403 -1.5089280168467667e-05</internalNodes>\n          <leafValues>\n            5.5826562643051147e-01 4.4140571355819702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1404 5.1994470413774252e-04</internalNodes>\n          <leafValues>\n            4.6236801147460938e-01 6.1689937114715576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1405 -3.4220460802316666e-03</internalNodes>\n          <leafValues>\n            6.5570747852325439e-01 4.9748051166534424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1406 1.7723299970384687e-04</internalNodes>\n          <leafValues>\n            5.2695018053054810e-01 3.9019080996513367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1407 1.5716759953647852e-03</internalNodes>\n          <leafValues>\n            4.6333730220794678e-01 5.7904577255249023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1408 -8.9041329920291901e-03</internalNodes>\n          <leafValues>\n            2.6896080374717712e-01 5.0535911321640015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1409 4.0677518700249493e-04</internalNodes>\n          <leafValues>\n            5.4566031694412231e-01 4.3298989534378052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1410 6.7604780197143555e-03</internalNodes>\n          <leafValues>\n            4.6489939093589783e-01 6.6897618770599365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1411 2.9100088868290186e-03</internalNodes>\n          <leafValues>\n            5.3097039461135864e-01 3.3778399229049683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1412 1.3885459629818797e-03</internalNodes>\n          <leafValues>\n            4.0747389197349548e-01 5.3491330146789551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1413 -7.6764263212680817e-02</internalNodes>\n          <leafValues>\n            1.9921760261058807e-01 5.2282422780990601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1414 -2.2688310127705336e-04</internalNodes>\n          <leafValues>\n            5.4385018348693848e-01 4.2530721426010132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1415 -6.3094152137637138e-03</internalNodes>\n          <leafValues>\n            4.2591789364814758e-01 5.3789097070693970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1416 -1.1007279902696609e-01</internalNodes>\n          <leafValues>\n            6.9041568040847778e-01 4.7217491269111633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1417 2.8619659133255482e-04</internalNodes>\n          <leafValues>\n            4.5249149203300476e-01 5.5483061075210571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1418 2.9425329557852820e-05</internalNodes>\n          <leafValues>\n            5.3703737258911133e-01 4.2364639043807983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1419 -2.4886570870876312e-02</internalNodes>\n          <leafValues>\n            6.4235579967498779e-01 4.9693039059638977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1420 3.3148851245641708e-02</internalNodes>\n          <leafValues>\n            4.9884751439094543e-01 1.6138119995594025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1421 7.8491691965609789e-04</internalNodes>\n          <leafValues>\n            5.4160261154174805e-01 4.2230090498924255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1422 4.7087189741432667e-03</internalNodes>\n          <leafValues>\n            4.5763289928436279e-01 6.0275578498840332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1423 2.4144479539245367e-03</internalNodes>\n          <leafValues>\n            5.3089731931686401e-01 4.4224989414215088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1424 1.9523180089890957e-03</internalNodes>\n          <leafValues>\n            4.7056341171264648e-01 6.6633248329162598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1425 1.3031980488449335e-03</internalNodes>\n          <leafValues>\n            4.4061261415481567e-01 5.5269622802734375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1426 4.4735497795045376e-03</internalNodes>\n          <leafValues>\n            5.1290237903594971e-01 3.3014988899230957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1427 -2.6652868837118149e-03</internalNodes>\n          <leafValues>\n            3.1354710459709167e-01 5.1750361919403076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1428 1.3666770246345550e-04</internalNodes>\n          <leafValues>\n            4.1193708777427673e-01 5.3068768978118896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1429 -1.7126450315117836e-02</internalNodes>\n          <leafValues>\n            6.1778062582015991e-01 4.8365789651870728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1430 -2.6601430727168918e-04</internalNodes>\n          <leafValues>\n            3.6543309688568115e-01 5.1697367429733276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1431 -2.2932380437850952e-02</internalNodes>\n          <leafValues>\n            3.4909150004386902e-01 5.1639920473098755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1432 2.3316550068557262e-03</internalNodes>\n          <leafValues>\n            5.1662999391555786e-01 3.7093898653984070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1433 1.6925660893321037e-02</internalNodes>\n          <leafValues>\n            5.0147360563278198e-01 8.0539882183074951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1434 -8.9858826249837875e-03</internalNodes>\n          <leafValues>\n            6.4707887172698975e-01 4.6570208668708801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1435 -1.1874699965119362e-02</internalNodes>\n          <leafValues>\n            3.2463788986206055e-01 5.2587550878524780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1436 1.9350569345988333e-04</internalNodes>\n          <leafValues>\n            5.1919418573379517e-01 3.8396438956260681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1437 5.8713490143418312e-03</internalNodes>\n          <leafValues>\n            4.9181339144706726e-01 6.1870431900024414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1438 -2.4838790297508240e-01</internalNodes>\n          <leafValues>\n            1.8368029594421387e-01 4.9881500005722046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1439 1.2256000190973282e-02</internalNodes>\n          <leafValues>\n            5.2270537614822388e-01 3.6320298910140991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1440 8.3990179700776935e-04</internalNodes>\n          <leafValues>\n            4.4902500510215759e-01 5.7741481065750122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1441 2.5407369248569012e-03</internalNodes>\n          <leafValues>\n            4.8047870397567749e-01 5.8582991361618042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1442 -1.4822429977357388e-02</internalNodes>\n          <leafValues>\n            2.5210499763488770e-01 5.0235372781753540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1443 -5.7973959483206272e-03</internalNodes>\n          <leafValues>\n            5.9966957569122314e-01 4.8537150025367737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1444 7.2662148158997297e-04</internalNodes>\n          <leafValues>\n            5.1537168025970459e-01 3.6717799305915833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1445 -1.7232580110430717e-02</internalNodes>\n          <leafValues>\n            6.6217190027236938e-01 4.9946561455726624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1446 7.8624086454510689e-03</internalNodes>\n          <leafValues>\n            4.6333950757980347e-01 6.2561017274856567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1447 -4.7343620099127293e-03</internalNodes>\n          <leafValues>\n            3.6155730485916138e-01 5.2818852663040161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1448 8.3048478700220585e-04</internalNodes>\n          <leafValues>\n            4.4428890943527222e-01 5.5509579181671143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1449 7.6602199114859104e-03</internalNodes>\n          <leafValues>\n            5.1629352569580078e-01 2.6133549213409424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1450 -4.1048377752304077e-03</internalNodes>\n          <leafValues>\n            2.7896320819854736e-01 5.0190317630767822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1451 4.8512578941881657e-03</internalNodes>\n          <leafValues>\n            4.9689841270446777e-01 5.6616681814193726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1452 9.9896453320980072e-04</internalNodes>\n          <leafValues>\n            4.4456079602241516e-01 5.5518132448196411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1453 -2.7023631334304810e-01</internalNodes>\n          <leafValues>\n            2.9388209804892540e-02 5.1513141393661499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1454 -1.3090680353343487e-02</internalNodes>\n          <leafValues>\n            5.6993997097015381e-01 4.4474598765373230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1455 -9.4342790544033051e-03</internalNodes>\n          <leafValues>\n            4.3054661154747009e-01 5.4878950119018555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1456 -1.5482039889320731e-03</internalNodes>\n          <leafValues>\n            3.6803171038627625e-01 5.1280808448791504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1457 5.3746132180094719e-03</internalNodes>\n          <leafValues>\n            4.8389169573783875e-01 6.1015558242797852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1458 1.5786769799888134e-03</internalNodes>\n          <leafValues>\n            5.3252232074737549e-01 4.1185480356216431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1459 3.6856050137430429e-03</internalNodes>\n          <leafValues>\n            4.8109480738639832e-01 6.2523031234741211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1460 9.3887019902467728e-03</internalNodes>\n          <leafValues>\n            5.2002298831939697e-01 3.6294108629226685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1461 1.2792630121111870e-02</internalNodes>\n          <leafValues>\n            4.9617099761962891e-01 6.7380160093307495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1462 -3.3661040943115950e-03</internalNodes>\n          <leafValues>\n            4.0602791309356689e-01 5.2835988998413086e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1463 3.9771420415490866e-04</internalNodes>\n          <leafValues>\n            4.6741139888763428e-01 5.9007751941680908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1464 1.4868030557408929e-03</internalNodes>\n          <leafValues>\n            4.5191168785095215e-01 6.0820537805557251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1465 -8.8686749339103699e-02</internalNodes>\n          <leafValues>\n            2.8078991174697876e-01 5.1809918880462646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1466 -7.4296112870797515e-05</internalNodes>\n          <leafValues>\n            5.2955842018127441e-01 4.0876251459121704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1467 -1.4932939848222304e-05</internalNodes>\n          <leafValues>\n            5.4614001512527466e-01 4.5385429263114929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1468 5.9162238612771034e-03</internalNodes>\n          <leafValues>\n            5.3291612863540649e-01 4.1921341419219971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1469 1.1141640134155750e-03</internalNodes>\n          <leafValues>\n            4.5120179653167725e-01 5.7062172889709473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1470 8.9249362645205110e-05</internalNodes>\n          <leafValues>\n            4.5778059959411621e-01 5.8976382017135620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1471 2.5319510605186224e-03</internalNodes>\n          <leafValues>\n            5.2996039390563965e-01 3.3576390147209167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1472 1.2426200322806835e-02</internalNodes>\n          <leafValues>\n            4.9590590596199036e-01 1.3466019928455353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1473 2.8335750102996826e-02</internalNodes>\n          <leafValues>\n            5.1170790195465088e-01 6.1043637106195092e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1474 6.6165882162749767e-03</internalNodes>\n          <leafValues>\n            4.7363498806953430e-01 7.0116281509399414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1475 8.0468766391277313e-03</internalNodes>\n          <leafValues>\n            5.2164179086685181e-01 3.2828199863433838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1476 -1.1193980462849140e-03</internalNodes>\n          <leafValues>\n            5.8098608255386353e-01 4.5637390017509460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1477 1.3277590274810791e-02</internalNodes>\n          <leafValues>\n            5.3983622789382935e-01 4.1039010882377625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1478 4.8794739996083081e-04</internalNodes>\n          <leafValues>\n            4.2492860555648804e-01 5.4105907678604126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1479 1.1243170127272606e-02</internalNodes>\n          <leafValues>\n            5.2699637413024902e-01 3.4382158517837524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1480 -8.9896668214350939e-04</internalNodes>\n          <leafValues>\n            5.6330758333206177e-01 4.4566130638122559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1481 6.6677159629762173e-03</internalNodes>\n          <leafValues>\n            5.3128892183303833e-01 4.3626791238784790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1482 2.8947299346327782e-02</internalNodes>\n          <leafValues>\n            4.7017949819564819e-01 6.5757977962493896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1483 -2.3400049656629562e-02</internalNodes>\n          <leafValues>\n            0. 5.1373988389968872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1484 -8.9117050170898438e-02</internalNodes>\n          <leafValues>\n            2.3745279759168625e-02 4.9424308538436890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1485 -1.4054600149393082e-02</internalNodes>\n          <leafValues>\n            3.1273230910301208e-01 5.1175111532211304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1486 8.1239398568868637e-03</internalNodes>\n          <leafValues>\n            5.0090491771697998e-01 2.5200259685516357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1487 -4.9964650534093380e-03</internalNodes>\n          <leafValues>\n            6.3871437311172485e-01 4.9278119206428528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1488 3.1253970228135586e-03</internalNodes>\n          <leafValues>\n            5.1368498802185059e-01 3.6804521083831787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1489 6.7669642157852650e-03</internalNodes>\n          <leafValues>\n            5.5098438262939453e-01 4.3636319041252136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1490 -2.3711440153419971e-03</internalNodes>\n          <leafValues>\n            6.1623352766036987e-01 4.5869469642639160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1491 -5.3522791713476181e-03</internalNodes>\n          <leafValues>\n            6.1854577064514160e-01 4.9204909801483154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1492 -1.5968859195709229e-02</internalNodes>\n          <leafValues>\n            1.3826179504394531e-01 4.9832528829574585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1493 4.7676060348749161e-03</internalNodes>\n          <leafValues>\n            4.6880578994750977e-01 5.4900461435317993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1494 -2.4714691098779440e-03</internalNodes>\n          <leafValues>\n            2.3685149848461151e-01 5.0039529800415039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1495 -7.1033788844943047e-04</internalNodes>\n          <leafValues>\n            5.8563941717147827e-01 4.7215330600738525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1496 -1.4117559790611267e-01</internalNodes>\n          <leafValues>\n            8.6900062859058380e-02 4.9615910649299622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1497 1.0651809722185135e-01</internalNodes>\n          <leafValues>\n            5.1388370990753174e-01 1.7410050332546234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1498 -5.2744749933481216e-02</internalNodes>\n          <leafValues>\n            7.3536360263824463e-01 4.7728818655014038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1499 -4.7431760467588902e-03</internalNodes>\n          <leafValues>\n            3.8844060897827148e-01 5.2927017211914062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1500 9.9676765967160463e-04</internalNodes>\n          <leafValues>\n            5.2234929800033569e-01 4.0034240484237671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1501 8.0284131690859795e-03</internalNodes>\n          <leafValues>\n            4.9591061472892761e-01 7.2129642963409424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1502 8.6025858763605356e-04</internalNodes>\n          <leafValues>\n            4.4448840618133545e-01 5.5384761095046997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1503 9.3191501218825579e-04</internalNodes>\n          <leafValues>\n            5.3983712196350098e-01 4.1632440686225891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1504 -2.5082060601562262e-03</internalNodes>\n          <leafValues>\n            5.8542650938034058e-01 4.5625001192092896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1505 -2.1378761157393456e-03</internalNodes>\n          <leafValues>\n            4.6080690622329712e-01 5.2802592515945435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1506 -2.1546049974858761e-03</internalNodes>\n          <leafValues>\n            3.7911269068717957e-01 5.2559971809387207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1507 -7.6214009895920753e-03</internalNodes>\n          <leafValues>\n            5.9986090660095215e-01 4.9520739912986755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1508 2.2055360022932291e-03</internalNodes>\n          <leafValues>\n            4.4842061400413513e-01 5.5885308980941772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1509 1.2586950324475765e-03</internalNodes>\n          <leafValues>\n            5.4507470130920410e-01 4.4238409399986267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1510 -5.0926720723509789e-03</internalNodes>\n          <leafValues>\n            4.1182750463485718e-01 5.2630358934402466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1511 -2.5095739401876926e-03</internalNodes>\n          <leafValues>\n            5.7879078388214111e-01 4.9984949827194214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1512 -7.7327556908130646e-02</internalNodes>\n          <leafValues>\n            8.3978658914566040e-01 4.8111200332641602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1513 -4.1485819965600967e-02</internalNodes>\n          <leafValues>\n            2.4086110293865204e-01 5.1769930124282837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1514 1.0355669655837119e-04</internalNodes>\n          <leafValues>\n            4.3553608655929565e-01 5.4170542955398560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1515 1.3255809899419546e-03</internalNodes>\n          <leafValues>\n            5.4539710283279419e-01 4.8940950632095337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1516 -8.0598732456564903e-03</internalNodes>\n          <leafValues>\n            5.7710242271423340e-01 4.5779189467430115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1517 1.9058620557188988e-02</internalNodes>\n          <leafValues>\n            5.1698678731918335e-01 3.4004750847816467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1518 -3.5057891160249710e-02</internalNodes>\n          <leafValues>\n            2.2032439708709717e-01 5.0005030632019043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1519 5.7296059094369411e-03</internalNodes>\n          <leafValues>\n            5.0434082746505737e-01 6.5975707769393921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1520 -1.1648329906165600e-02</internalNodes>\n          <leafValues>\n            2.1862849593162537e-01 4.9966529011726379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1521 1.4544479781761765e-03</internalNodes>\n          <leafValues>\n            5.0076818466186523e-01 5.5037277936935425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1522 -2.5030909455381334e-04</internalNodes>\n          <leafValues>\n            4.1298410296440125e-01 5.2416700124740601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1523 -8.2907272735610604e-04</internalNodes>\n          <leafValues>\n            5.4128682613372803e-01 4.9744960665702820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1524 1.0862209601327777e-03</internalNodes>\n          <leafValues>\n            4.6055299043655396e-01 5.8792287111282349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1525 2.0000500080641359e-04</internalNodes>\n          <leafValues>\n            5.2788549661636353e-01 4.7052091360092163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1526 2.9212920926511288e-03</internalNodes>\n          <leafValues>\n            5.1296097040176392e-01 3.7555369734764099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1527 2.5387400761246681e-02</internalNodes>\n          <leafValues>\n            4.8226919770240784e-01 5.7907682657241821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1528 -3.1968469265848398e-03</internalNodes>\n          <leafValues>\n            5.2483952045440674e-01 3.9628401398658752e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>182</maxWeakCount>\n      <stageThreshold>9.0253349304199219e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1529 5.8031738735735416e-03</internalNodes>\n          <leafValues>\n            3.4989839792251587e-01 5.9619832038879395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1530 -9.0003069490194321e-03</internalNodes>\n          <leafValues>\n            6.8166369199752808e-01 4.4785520434379578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1531 -1.1549659539014101e-03</internalNodes>\n          <leafValues>\n            5.5857062339782715e-01 3.5782510042190552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1532 -1.1069850297644734e-03</internalNodes>\n          <leafValues>\n            5.3650361299514771e-01 3.0504280328750610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1533 1.0308309720130637e-04</internalNodes>\n          <leafValues>\n            3.6390951275825500e-01 5.3446358442306519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1534 -5.0984839908778667e-03</internalNodes>\n          <leafValues>\n            2.8591570258140564e-01 5.5042648315429688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1535 8.2572200335562229e-04</internalNodes>\n          <leafValues>\n            5.2365237474441528e-01 3.4760418534278870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1536 9.9783325567841530e-03</internalNodes>\n          <leafValues>\n            4.7503221035003662e-01 6.2196469306945801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1537 -3.7402529269456863e-02</internalNodes>\n          <leafValues>\n            3.3433759212493896e-01 5.2780628204345703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1538 4.8548257909715176e-03</internalNodes>\n          <leafValues>\n            5.1921808719635010e-01 3.7004441022872925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1539 -1.8664470408111811e-03</internalNodes>\n          <leafValues>\n            2.9298439621925354e-01 5.0919449329376221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1540 1.6888890415430069e-02</internalNodes>\n          <leafValues>\n            3.6868458986282349e-01 5.4312258958816528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1541 -5.8372621424496174e-03</internalNodes>\n          <leafValues>\n            3.6321839690208435e-01 5.2213358879089355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1542 -1.4713739510625601e-03</internalNodes>\n          <leafValues>\n            5.8706837892532349e-01 4.7006508708000183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1543 -1.1522950371727347e-03</internalNodes>\n          <leafValues>\n            3.1958949565887451e-01 5.1409542560577393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1544 -4.2560300789773464e-03</internalNodes>\n          <leafValues>\n            6.3018590211868286e-01 4.8149210214614868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1545 -6.7378291860222816e-03</internalNodes>\n          <leafValues>\n            1.9770480692386627e-01 5.0258082151412964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1546 1.1382670141756535e-02</internalNodes>\n          <leafValues>\n            4.9541321396827698e-01 6.8670457601547241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1547 5.1794708706438541e-03</internalNodes>\n          <leafValues>\n            5.1644277572631836e-01 3.3506479859352112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1548 -1.1743789911270142e-01</internalNodes>\n          <leafValues>\n            2.3152460157871246e-01 5.2344137430191040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1549 2.8703449293971062e-02</internalNodes>\n          <leafValues>\n            4.6642971038818359e-01 6.7225211858749390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1550 4.8231030814349651e-03</internalNodes>\n          <leafValues>\n            5.2208751440048218e-01 2.7235329151153564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1551 2.6798530016094446e-03</internalNodes>\n          <leafValues>\n            5.0792771577835083e-01 2.9069489240646362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1552 8.0504082143306732e-03</internalNodes>\n          <leafValues>\n            4.8859509825706482e-01 6.3950210809707642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1553 4.8054959625005722e-03</internalNodes>\n          <leafValues>\n            5.1972568035125732e-01 3.6566638946533203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1554 -2.2420159075409174e-03</internalNodes>\n          <leafValues>\n            6.1534678936004639e-01 4.7637018561363220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1555 -1.3757710345089436e-02</internalNodes>\n          <leafValues>\n            2.6373448967933655e-01 5.0309032201766968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1556 -1.0338299721479416e-01</internalNodes>\n          <leafValues>\n            2.2875219583511353e-01 5.1824611425399780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1557 -9.4432085752487183e-03</internalNodes>\n          <leafValues>\n            6.9533038139343262e-01 4.6949490904808044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1558 8.0271181650459766e-04</internalNodes>\n          <leafValues>\n            5.4506552219390869e-01 4.2687839269638062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1559 -4.1945669800043106e-03</internalNodes>\n          <leafValues>\n            6.0913878679275513e-01 4.5716428756713867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1560 1.0942210443317890e-02</internalNodes>\n          <leafValues>\n            5.2410632371902466e-01 3.2845470309257507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1561 -5.7841069065034389e-04</internalNodes>\n          <leafValues>\n            5.3879290819168091e-01 4.1793689131736755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1562 -2.0888620056211948e-03</internalNodes>\n          <leafValues>\n            4.2926910519599915e-01 5.3017157316207886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1563 3.2383969519287348e-03</internalNodes>\n          <leafValues>\n            3.7923479080200195e-01 5.2207440137863159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1564 4.9075027927756310e-03</internalNodes>\n          <leafValues>\n            5.2372831106185913e-01 4.1267579793930054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1565 -3.2277941703796387e-02</internalNodes>\n          <leafValues>\n            1.9476559758186340e-01 4.9945020675659180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1566 -8.9711230248212814e-03</internalNodes>\n          <leafValues>\n            6.0112851858139038e-01 4.9290320277214050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1567 1.5321089886128902e-02</internalNodes>\n          <leafValues>\n            5.0097537040710449e-01 2.0398220419883728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1568 2.0855569746345282e-03</internalNodes>\n          <leafValues>\n            4.8621898889541626e-01 5.7216948270797729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1569 5.0615021027624607e-03</internalNodes>\n          <leafValues>\n            5.0002187490463257e-01 1.8018059432506561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1570 -3.7174751050770283e-03</internalNodes>\n          <leafValues>\n            5.5301171541213989e-01 4.8975929617881775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1571 -1.2170500122010708e-02</internalNodes>\n          <leafValues>\n            4.1786059737205505e-01 5.3837239742279053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1572 4.6248398721218109e-03</internalNodes>\n          <leafValues>\n            4.9971699714660645e-01 5.7613271474838257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1573 -2.1040429419372231e-04</internalNodes>\n          <leafValues>\n            5.3318071365356445e-01 4.0976810455322266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1574 -1.4641780406236649e-02</internalNodes>\n          <leafValues>\n            5.7559251785278320e-01 5.0517761707305908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1575 3.3199489116668701e-03</internalNodes>\n          <leafValues>\n            4.5769768953323364e-01 6.0318058729171753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1576 3.7236879579722881e-03</internalNodes>\n          <leafValues>\n            4.3803969025611877e-01 5.4158830642700195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1577 8.2951161311939359e-04</internalNodes>\n          <leafValues>\n            5.1630318164825439e-01 3.7022191286087036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1578 -1.1408490128815174e-02</internalNodes>\n          <leafValues>\n            6.0729467868804932e-01 4.8625651001930237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1579 -4.5320121571421623e-03</internalNodes>\n          <leafValues>\n            3.2924759387969971e-01 5.0889629125595093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1580 5.1276017911732197e-03</internalNodes>\n          <leafValues>\n            4.8297679424285889e-01 6.1227089166641235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1581 9.8583158105611801e-03</internalNodes>\n          <leafValues>\n            4.6606799960136414e-01 6.5561771392822266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1582 3.6985918879508972e-02</internalNodes>\n          <leafValues>\n            5.2048492431640625e-01 1.6904720664024353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1583 4.6491161920130253e-03</internalNodes>\n          <leafValues>\n            5.1673221588134766e-01 3.7252250313758850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1584 -4.2664702050387859e-03</internalNodes>\n          <leafValues>\n            6.4064931869506836e-01 4.9873429536819458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1585 -4.7956590424291790e-04</internalNodes>\n          <leafValues>\n            5.8972930908203125e-01 4.4648739695549011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1586 3.6827160511165857e-03</internalNodes>\n          <leafValues>\n            5.4415607452392578e-01 3.4726628661155701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1587 -1.0059880092740059e-02</internalNodes>\n          <leafValues>\n            2.1431629359722137e-01 5.0048297643661499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1588 -3.0361840617842972e-04</internalNodes>\n          <leafValues>\n            5.3864240646362305e-01 4.5903238654136658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1589 -1.4545479789376259e-03</internalNodes>\n          <leafValues>\n            5.7511842250823975e-01 4.4970950484275818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1590 1.6515209572389722e-03</internalNodes>\n          <leafValues>\n            5.4219377040863037e-01 4.2385208606719971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1591 -7.8468639403581619e-03</internalNodes>\n          <leafValues>\n            4.0779209136962891e-01 5.2581572532653809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1592 -5.1259850151836872e-03</internalNodes>\n          <leafValues>\n            4.2292758822441101e-01 5.4794532060623169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1593 -3.6890961229801178e-02</internalNodes>\n          <leafValues>\n            6.5963757038116455e-01 4.6746781468391418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1594 2.4035639944486320e-04</internalNodes>\n          <leafValues>\n            4.2511358857154846e-01 5.5732029676437378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1595 -1.5150169929256663e-05</internalNodes>\n          <leafValues>\n            5.2592468261718750e-01 4.0741148591041565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1596 2.2108471021056175e-03</internalNodes>\n          <leafValues>\n            4.6717229485511780e-01 5.8863520622253418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1597 -1.1568620102480054e-03</internalNodes>\n          <leafValues>\n            5.7110661268234253e-01 4.4871619343757629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1598 4.9996292218565941e-03</internalNodes>\n          <leafValues>\n            5.2641981840133667e-01 2.8983271121978760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1599 -1.4656189596280456e-03</internalNodes>\n          <leafValues>\n            3.8917380571365356e-01 5.1978719234466553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1600 -1.1975039960816503e-03</internalNodes>\n          <leafValues>\n            5.7958728075027466e-01 4.9279558658599854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1601 -4.4954330660402775e-03</internalNodes>\n          <leafValues>\n            2.3776030540466309e-01 5.0125551223754883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1602 1.4997160178609192e-04</internalNodes>\n          <leafValues>\n            4.8766261339187622e-01 5.6176078319549561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1603 2.6391509454697371e-03</internalNodes>\n          <leafValues>\n            5.1680880784988403e-01 3.7655091285705566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1604 -2.9368131072260439e-04</internalNodes>\n          <leafValues>\n            5.4466491937637329e-01 4.8746308684349060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1605 1.4211760135367513e-03</internalNodes>\n          <leafValues>\n            4.6878978610038757e-01 6.6913318634033203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1606 7.9427637159824371e-02</internalNodes>\n          <leafValues>\n            5.1934438943862915e-01 2.7329459786415100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1607 7.9937502741813660e-02</internalNodes>\n          <leafValues>\n            4.9717310070991516e-01 1.7820839583873749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1608 1.1089259758591652e-02</internalNodes>\n          <leafValues>\n            5.1659947633743286e-01 3.2094758749008179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1609 1.6560709627810866e-04</internalNodes>\n          <leafValues>\n            4.0584719181060791e-01 5.3072762489318848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1610 -5.3354292176663876e-03</internalNodes>\n          <leafValues>\n            3.4450569748878479e-01 5.1581299304962158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1611 1.1287260567769408e-03</internalNodes>\n          <leafValues>\n            4.5948630571365356e-01 6.0755330324172974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1612 -2.1969219669699669e-02</internalNodes>\n          <leafValues>\n            1.6804009675979614e-01 5.2285957336425781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1613 -2.1775320055894554e-04</internalNodes>\n          <leafValues>\n            3.8615968823432922e-01 5.2156728506088257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1614 2.0200149447191507e-04</internalNodes>\n          <leafValues>\n            5.5179792642593384e-01 4.3630391359329224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1615 -2.1733149886131287e-02</internalNodes>\n          <leafValues>\n            7.9994601011276245e-01 4.7898510098457336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1616 -8.4399932529777288e-04</internalNodes>\n          <leafValues>\n            4.0859758853912354e-01 5.3747731447219849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1617 -4.3895249837078154e-04</internalNodes>\n          <leafValues>\n            5.4704052209854126e-01 4.3661430478096008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1618 1.5092400135472417e-03</internalNodes>\n          <leafValues>\n            4.9889969825744629e-01 5.8421492576599121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1619 -3.5547839943319559e-03</internalNodes>\n          <leafValues>\n            6.7536902427673340e-01 4.7210058569908142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1620 4.8191400128416717e-04</internalNodes>\n          <leafValues>\n            5.4158538579940796e-01 4.3571090698242188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1621 -6.0264398343861103e-03</internalNodes>\n          <leafValues>\n            2.2585099935531616e-01 4.9918809533119202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1622 -1.1668140068650246e-02</internalNodes>\n          <leafValues>\n            6.2565547227859497e-01 4.9274989962577820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1623 -2.8718370012938976e-03</internalNodes>\n          <leafValues>\n            3.9477849006652832e-01 5.2458018064498901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1624 1.7051169648766518e-02</internalNodes>\n          <leafValues>\n            4.7525110840797424e-01 5.7942241430282593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1625 -1.3352080248296261e-02</internalNodes>\n          <leafValues>\n            6.0411047935485840e-01 4.5445358753204346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1626 -3.9301801007241011e-04</internalNodes>\n          <leafValues>\n            4.2582759261131287e-01 5.5449050664901733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1627 3.0483349692076445e-03</internalNodes>\n          <leafValues>\n            5.2334201335906982e-01 3.7802729010581970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1628 -4.3579288758337498e-03</internalNodes>\n          <leafValues>\n            6.3718891143798828e-01 4.8386740684509277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1629 5.6661018170416355e-03</internalNodes>\n          <leafValues>\n            5.3747057914733887e-01 4.1636660695075989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1630 6.0677339206449687e-05</internalNodes>\n          <leafValues>\n            4.6387958526611328e-01 5.3116250038146973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1631 3.6738160997629166e-02</internalNodes>\n          <leafValues>\n            4.6886560320854187e-01 6.4665240049362183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1632 8.6528137326240540e-03</internalNodes>\n          <leafValues>\n            5.2043187618255615e-01 2.1886579692363739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1633 -1.5371359884738922e-01</internalNodes>\n          <leafValues>\n            1.6303719580173492e-01 4.9588400125503540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1634 -4.1560421232134104e-04</internalNodes>\n          <leafValues>\n            5.7744592428207397e-01 4.6964588761329651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1635 -1.2640169588848948e-03</internalNodes>\n          <leafValues>\n            3.9771759510040283e-01 5.2171981334686279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1636 -3.5473341122269630e-03</internalNodes>\n          <leafValues>\n            6.0465282201766968e-01 4.8083150386810303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1637 3.0019069527043030e-05</internalNodes>\n          <leafValues>\n            3.9967238903045654e-01 5.2282011508941650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1638 1.3113019522279501e-03</internalNodes>\n          <leafValues>\n            4.7121581435203552e-01 5.7659977674484253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1639 -1.3374709524214268e-03</internalNodes>\n          <leafValues>\n            4.1095849871635437e-01 5.2531701326370239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1640 2.0876709371805191e-02</internalNodes>\n          <leafValues>\n            5.2029937505722046e-01 1.7579819262027740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1641 -7.5497948564589024e-03</internalNodes>\n          <leafValues>\n            6.5666097402572632e-01 4.6949750185012817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1642 2.4188550189137459e-02</internalNodes>\n          <leafValues>\n            5.1286739110946655e-01 3.3702209591865540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1643 -2.9358828905969858e-03</internalNodes>\n          <leafValues>\n            6.5807867050170898e-01 4.6945410966873169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1644 5.7557929307222366e-02</internalNodes>\n          <leafValues>\n            5.1464450359344482e-01 2.7752599120140076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1645 -1.1343370424583554e-03</internalNodes>\n          <leafValues>\n            3.8366019725799561e-01 5.1926672458648682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1646 1.6816999763250351e-02</internalNodes>\n          <leafValues>\n            5.0855928659439087e-01 6.1772608757019043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1647 5.0535178743302822e-03</internalNodes>\n          <leafValues>\n            5.1387631893157959e-01 3.6847919225692749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1648 -4.5874710194766521e-03</internalNodes>\n          <leafValues>\n            5.9896552562713623e-01 4.8352020978927612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1649 1.6882460331544280e-03</internalNodes>\n          <leafValues>\n            4.5094868540763855e-01 5.7230567932128906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1650 -1.6554000321775675e-03</internalNodes>\n          <leafValues>\n            3.4967708587646484e-01 5.2433192729949951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1651 -1.9373800605535507e-02</internalNodes>\n          <leafValues>\n            1.1205369979143143e-01 4.9687129259109497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1652 1.0374450124800205e-02</internalNodes>\n          <leafValues>\n            5.1481968164443970e-01 4.3952131271362305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1653 1.4973050565458834e-04</internalNodes>\n          <leafValues>\n            4.0849998593330383e-01 5.2698868513107300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1654 -4.2981930077075958e-02</internalNodes>\n          <leafValues>\n            6.3941049575805664e-01 5.0185042619705200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1655 8.3065936341881752e-03</internalNodes>\n          <leafValues>\n            4.7075539827346802e-01 6.6983532905578613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1656 -4.1285790503025055e-03</internalNodes>\n          <leafValues>\n            4.5413690805435181e-01 5.3236472606658936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1657 1.7399420030415058e-03</internalNodes>\n          <leafValues>\n            4.3339619040489197e-01 5.4398661851882935e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1658 1.1739750334527344e-04</internalNodes>\n          <leafValues>\n            4.5796871185302734e-01 5.5434262752532959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1659 1.8585780344437808e-04</internalNodes>\n          <leafValues>\n            4.3246439099311829e-01 5.4267549514770508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1660 5.5587692186236382e-03</internalNodes>\n          <leafValues>\n            5.2572208642959595e-01 3.5506111383438110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1661 -7.9851560294628143e-03</internalNodes>\n          <leafValues>\n            6.0430181026458740e-01 4.6306359767913818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1662 6.0594122624024749e-04</internalNodes>\n          <leafValues>\n            4.5982548594474792e-01 5.5331951379776001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1663 -2.2983040253166109e-04</internalNodes>\n          <leafValues>\n            4.1307520866394043e-01 5.3224611282348633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1664 4.3740210821852088e-04</internalNodes>\n          <leafValues>\n            4.0430399775505066e-01 5.4092890024185181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1665 2.9482020181603730e-04</internalNodes>\n          <leafValues>\n            4.4949638843536377e-01 5.6288522481918335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1666 1.0312659665942192e-02</internalNodes>\n          <leafValues>\n            5.1775109767913818e-01 2.7043169736862183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1667 -7.7241109684109688e-03</internalNodes>\n          <leafValues>\n            1.9880190491676331e-01 4.9805539846420288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1668 -4.6797208487987518e-03</internalNodes>\n          <leafValues>\n            6.6447502374649048e-01 5.0182962417602539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1669 -5.0755459815263748e-03</internalNodes>\n          <leafValues>\n            3.8983049988746643e-01 5.1852691173553467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1670 2.2479740437120199e-03</internalNodes>\n          <leafValues>\n            4.8018088936805725e-01 5.6603360176086426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1671 8.3327008178457618e-04</internalNodes>\n          <leafValues>\n            5.2109199762344360e-01 3.9571881294250488e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1672 -4.1279330849647522e-02</internalNodes>\n          <leafValues>\n            6.1545419692993164e-01 5.0070542097091675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1673 -5.0930189900100231e-04</internalNodes>\n          <leafValues>\n            3.9759421348571777e-01 5.2284038066864014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1674 1.2568780221045017e-03</internalNodes>\n          <leafValues>\n            4.9791380763053894e-01 5.9391832351684570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1675 8.0048497766256332e-03</internalNodes>\n          <leafValues>\n            4.9844971299171448e-01 1.6333660483360291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1676 -1.1879300000146031e-03</internalNodes>\n          <leafValues>\n            5.9049648046493530e-01 4.9426248669624329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1677 6.1948952497914433e-04</internalNodes>\n          <leafValues>\n            4.1995579004287720e-01 5.3287261724472046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1678 6.6829859279096127e-03</internalNodes>\n          <leafValues>\n            5.4186028242111206e-01 4.9058890342712402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1679 -3.7062340416014194e-03</internalNodes>\n          <leafValues>\n            3.7259390950202942e-01 5.1380002498626709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1680 -3.9739411324262619e-02</internalNodes>\n          <leafValues>\n            6.4789611101150513e-01 5.0503468513488770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1681 1.4085009461268783e-03</internalNodes>\n          <leafValues>\n            4.6823391318321228e-01 6.3778841495513916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1682 3.9322688826359808e-04</internalNodes>\n          <leafValues>\n            5.4585301876068115e-01 4.1504821181297302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1683 -1.8979819724336267e-03</internalNodes>\n          <leafValues>\n            3.6901599168777466e-01 5.1497042179107666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1684 -1.3970440253615379e-02</internalNodes>\n          <leafValues>\n            6.0505628585815430e-01 4.8113578557968140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1685 -1.0100819915533066e-01</internalNodes>\n          <leafValues>\n            2.0170800387859344e-01 4.9923619627952576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1686 -1.7346920445561409e-02</internalNodes>\n          <leafValues>\n            5.7131487131118774e-01 4.8994860053062439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1687 1.5619759506080300e-04</internalNodes>\n          <leafValues>\n            4.2153888940811157e-01 5.3926420211791992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1688 1.3438929617404938e-01</internalNodes>\n          <leafValues>\n            5.1361519098281860e-01 3.7676128745079041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1689 -2.4582240730524063e-02</internalNodes>\n          <leafValues>\n            7.0273578166961670e-01 4.7479069232940674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1690 -3.8553720805794001e-03</internalNodes>\n          <leafValues>\n            4.3174090981483459e-01 5.4277169704437256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1691 -2.3165249731391668e-03</internalNodes>\n          <leafValues>\n            5.9426987171173096e-01 4.6186479926109314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1692 -4.8518120311200619e-03</internalNodes>\n          <leafValues>\n            6.1915689706802368e-01 4.8848950862884521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1693 2.4699938949197531e-03</internalNodes>\n          <leafValues>\n            5.2566647529602051e-01 4.0171998739242554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1694 4.5496959239244461e-02</internalNodes>\n          <leafValues>\n            5.2378678321838379e-01 2.6857739686965942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1695 -2.0319599658250809e-02</internalNodes>\n          <leafValues>\n            2.1304459869861603e-01 4.9797388911247253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1696 2.6994998916052282e-04</internalNodes>\n          <leafValues>\n            4.8140418529510498e-01 5.5431222915649414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1697 -1.8232699949294329e-03</internalNodes>\n          <leafValues>\n            6.4825797080993652e-01 4.7099891304969788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1698 -6.3015790656208992e-03</internalNodes>\n          <leafValues>\n            4.5819279551506042e-01 5.3062361478805542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1699 -2.4139499873854220e-04</internalNodes>\n          <leafValues>\n            5.2320867776870728e-01 4.0517631173133850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1700 -1.0330369696021080e-03</internalNodes>\n          <leafValues>\n            5.5562019348144531e-01 4.7891938686370850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1701 1.8041160365100950e-04</internalNodes>\n          <leafValues>\n            5.2294427156448364e-01 4.0118101239204407e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1702 -6.1407860368490219e-02</internalNodes>\n          <leafValues>\n            6.2986820936203003e-01 5.0107032060623169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1703 -6.9543913006782532e-02</internalNodes>\n          <leafValues>\n            7.2282809019088745e-01 4.7731840610504150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1704 -7.0542663335800171e-02</internalNodes>\n          <leafValues>\n            2.2695130109786987e-01 5.1825290918350220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1705 2.4423799477517605e-03</internalNodes>\n          <leafValues>\n            5.2370971441268921e-01 4.0981510281562805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1706 1.5494349645450711e-03</internalNodes>\n          <leafValues>\n            4.7737509012222290e-01 5.4680430889129639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1707 -2.3914219811558723e-02</internalNodes>\n          <leafValues>\n            7.1469759941101074e-01 4.7838249802589417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1708 -1.2453690171241760e-02</internalNodes>\n          <leafValues>\n            2.6352968811988831e-01 5.2411228418350220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1709 -2.0760179904755205e-04</internalNodes>\n          <leafValues>\n            3.6237570643424988e-01 5.1136088371276855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1710 2.9781080229440704e-05</internalNodes>\n          <leafValues>\n            4.7059321403503418e-01 5.4328018426895142e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>211</maxWeakCount>\n      <stageThreshold>1.0474919891357422e+02</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1711 1.1772749945521355e-02</internalNodes>\n          <leafValues>\n            3.8605189323425293e-01 6.4211672544479370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1712 2.7037570253014565e-02</internalNodes>\n          <leafValues>\n            4.3856549263000488e-01 6.7540389299392700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1713 -3.6419500247575343e-05</internalNodes>\n          <leafValues>\n            5.4871010780334473e-01 3.4233158826828003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1714 1.9995409529656172e-03</internalNodes>\n          <leafValues>\n            3.2305321097373962e-01 5.4003179073333740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1715 4.5278300531208515e-03</internalNodes>\n          <leafValues>\n            5.0916397571563721e-01 2.9350438714027405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1716 4.7890920541249216e-04</internalNodes>\n          <leafValues>\n            4.1781538724899292e-01 5.3440642356872559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1717 1.1720920447260141e-03</internalNodes>\n          <leafValues>\n            2.8991821408271790e-01 5.1320707798004150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1718 9.5305702416226268e-04</internalNodes>\n          <leafValues>\n            4.2801249027252197e-01 5.5608451366424561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1719 1.5099150004971307e-05</internalNodes>\n          <leafValues>\n            4.0448719263076782e-01 5.4047602415084839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1720 -6.0817901976406574e-04</internalNodes>\n          <leafValues>\n            4.2717689275741577e-01 5.5034661293029785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1721 3.3224520739167929e-03</internalNodes>\n          <leafValues>\n            3.9627239108085632e-01 5.3697347640991211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1722 -1.1037490330636501e-03</internalNodes>\n          <leafValues>\n            4.7271779179573059e-01 5.2377498149871826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1723 -1.4350269921123981e-03</internalNodes>\n          <leafValues>\n            5.6030082702636719e-01 4.2235091328620911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1724 2.0767399109899998e-03</internalNodes>\n          <leafValues>\n            5.2259171009063721e-01 4.7327259182929993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1725 -1.6412809782195836e-04</internalNodes>\n          <leafValues>\n            3.9990758895874023e-01 5.4327398538589478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1726 8.8302437216043472e-03</internalNodes>\n          <leafValues>\n            4.6783858537673950e-01 6.0273271799087524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1727 -1.0552070103585720e-02</internalNodes>\n          <leafValues>\n            3.4939670562744141e-01 5.2139747142791748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1728 -2.2731600329279900e-03</internalNodes>\n          <leafValues>\n            6.1858189105987549e-01 4.7490629553794861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1729 -8.4786332445219159e-04</internalNodes>\n          <leafValues>\n            5.2853411436080933e-01 3.8434821367263794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1730 1.2081359745934606e-03</internalNodes>\n          <leafValues>\n            5.3606408834457397e-01 3.4473359584808350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1731 2.6512730401009321e-03</internalNodes>\n          <leafValues>\n            4.5582920312881470e-01 6.1939620971679688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1732 -1.1012479662895203e-03</internalNodes>\n          <leafValues>\n            3.6802300810813904e-01 5.3276282548904419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1733 4.9561518244445324e-04</internalNodes>\n          <leafValues>\n            3.9605951309204102e-01 5.2749407291412354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1734 -4.3901771306991577e-02</internalNodes>\n          <leafValues>\n            7.0204448699951172e-01 4.9928390979766846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1735 3.4690350294113159e-02</internalNodes>\n          <leafValues>\n            5.0491642951965332e-01 2.7666029334068298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1736 -2.7442190330475569e-03</internalNodes>\n          <leafValues>\n            2.6726329326629639e-01 5.2749711275100708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1737 3.3316588960587978e-03</internalNodes>\n          <leafValues>\n            4.5794829726219177e-01 6.0011017322540283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1738 -2.0044570788741112e-02</internalNodes>\n          <leafValues>\n            3.1715941429138184e-01 5.2357178926467896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1739 1.3492030557245016e-03</internalNodes>\n          <leafValues>\n            5.2653628587722778e-01 4.0343248844146729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1740 2.9702018946409225e-03</internalNodes>\n          <leafValues>\n            5.3324568271636963e-01 4.5719841122627258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1741 6.3039981760084629e-03</internalNodes>\n          <leafValues>\n            4.5933109521865845e-01 6.0346359014511108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1742 -1.2936590239405632e-02</internalNodes>\n          <leafValues>\n            4.4379639625549316e-01 5.3729712963104248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1743 4.0148729458451271e-03</internalNodes>\n          <leafValues>\n            4.6803238987922668e-01 6.4378339052200317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1744 -2.6401679497212172e-03</internalNodes>\n          <leafValues>\n            3.7096318602561951e-01 5.3143328428268433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1745 1.3918439857661724e-02</internalNodes>\n          <leafValues>\n            4.7235551476478577e-01 7.1308088302612305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1746 -4.5087869511917233e-04</internalNodes>\n          <leafValues>\n            4.4923940300941467e-01 5.3704041242599487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1747 2.5384349282830954e-04</internalNodes>\n          <leafValues>\n            4.4068640470504761e-01 5.5144029855728149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1748 2.2710000630468130e-03</internalNodes>\n          <leafValues>\n            4.6824169158935547e-01 5.9679841995239258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1749 2.4120779708027840e-03</internalNodes>\n          <leafValues>\n            5.0793921947479248e-01 3.0185988545417786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1750 -3.6025670851813629e-05</internalNodes>\n          <leafValues>\n            5.6010371446609497e-01 4.4710969924926758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1751 -7.4905529618263245e-03</internalNodes>\n          <leafValues>\n            2.2075350582599640e-01 4.9899441003799438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1752 -1.7513120546936989e-02</internalNodes>\n          <leafValues>\n            6.5312159061431885e-01 5.0176489353179932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1753 1.4281630516052246e-01</internalNodes>\n          <leafValues>\n            4.9679630994796753e-01 1.4820620417594910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1754 5.5345268920063972e-03</internalNodes>\n          <leafValues>\n            4.8989468812942505e-01 5.9542238712310791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1755 -9.6323591424152255e-04</internalNodes>\n          <leafValues>\n            3.9271169900894165e-01 5.1960742473602295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1756 -2.0370010752230883e-03</internalNodes>\n          <leafValues>\n            5.6133252382278442e-01 4.8848581314086914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1757 1.6614829655736685e-03</internalNodes>\n          <leafValues>\n            4.4728800654411316e-01 5.5788809061050415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1758 -3.1188090797513723e-03</internalNodes>\n          <leafValues>\n            3.8405328989028931e-01 5.3974777460098267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1759 -6.4000617712736130e-03</internalNodes>\n          <leafValues>\n            5.8439838886260986e-01 4.5332181453704834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1760 3.1319601112045348e-04</internalNodes>\n          <leafValues>\n            5.4392218589782715e-01 4.2347279191017151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1761 -1.8222099170088768e-02</internalNodes>\n          <leafValues>\n            1.2884649634361267e-01 4.9584048986434937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1762 8.7969247251749039e-03</internalNodes>\n          <leafValues>\n            4.9512979388237000e-01 7.1534800529479980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1763 -4.2395070195198059e-03</internalNodes>\n          <leafValues>\n            3.9465999603271484e-01 5.1949369907379150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1764 9.7086271271109581e-03</internalNodes>\n          <leafValues>\n            4.8975038528442383e-01 6.0649001598358154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1765 -3.9934171363711357e-03</internalNodes>\n          <leafValues>\n            3.2454401254653931e-01 5.0608289241790771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1766 -1.6785059124231339e-02</internalNodes>\n          <leafValues>\n            1.5819530189037323e-01 5.2037787437438965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1767 1.8272090703248978e-02</internalNodes>\n          <leafValues>\n            4.6809351444244385e-01 6.6269791126251221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1768 5.6872838176786900e-03</internalNodes>\n          <leafValues>\n            5.2116978168487549e-01 3.5121849179267883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1769 -1.0739039862528443e-03</internalNodes>\n          <leafValues>\n            5.7683861255645752e-01 4.5298451185226440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1770 -3.7093870341777802e-03</internalNodes>\n          <leafValues>\n            4.5077630877494812e-01 5.3135812282562256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1771 -2.1110709349159151e-04</internalNodes>\n          <leafValues>\n            5.4608201980590820e-01 4.3333768844604492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1772 1.0670139454305172e-03</internalNodes>\n          <leafValues>\n            5.3718560934066772e-01 4.0783908963203430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1773 3.5943021066486835e-03</internalNodes>\n          <leafValues>\n            4.4712871313095093e-01 5.6438362598419189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1774 -5.1776031032204628e-03</internalNodes>\n          <leafValues>\n            4.4993931055068970e-01 5.2803301811218262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1775 -2.5414369883947074e-04</internalNodes>\n          <leafValues>\n            5.5161732435226440e-01 4.4077080488204956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1776 6.3522560521960258e-03</internalNodes>\n          <leafValues>\n            5.1941901445388794e-01 2.4652279913425446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1777 -4.4205080484971404e-04</internalNodes>\n          <leafValues>\n            3.8307058811187744e-01 5.1396822929382324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1778 7.4488727841526270e-04</internalNodes>\n          <leafValues>\n            4.8910909891128540e-01 5.9747868776321411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1779 -3.5116379149258137e-03</internalNodes>\n          <leafValues>\n            7.4136817455291748e-01 4.7687649726867676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1780 -1.2540910392999649e-02</internalNodes>\n          <leafValues>\n            3.6488190293312073e-01 5.2528268098831177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1781 9.4931852072477341e-03</internalNodes>\n          <leafValues>\n            5.1004928350448608e-01 3.6295869946479797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1782 1.2961150147020817e-02</internalNodes>\n          <leafValues>\n            5.2324420213699341e-01 4.3335610628128052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1783 4.7209449112415314e-03</internalNodes>\n          <leafValues>\n            4.6481490135192871e-01 6.3310527801513672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1784 -2.3119079414755106e-03</internalNodes>\n          <leafValues>\n            5.9303098917007446e-01 4.5310580730438232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1785 -2.8262299019843340e-03</internalNodes>\n          <leafValues>\n            3.8704779744148254e-01 5.2571010589599609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1786 -1.4311339473351836e-03</internalNodes>\n          <leafValues>\n            5.5225032567977905e-01 4.5618548989295959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1787 1.9378310535103083e-03</internalNodes>\n          <leafValues>\n            4.5462208986282349e-01 5.7369667291641235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1788 2.6343559147790074e-04</internalNodes>\n          <leafValues>\n            5.3457391262054443e-01 4.5718750357627869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1789 7.8257522545754910e-04</internalNodes>\n          <leafValues>\n            3.9678159356117249e-01 5.2201879024505615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1790 -1.9550440832972527e-02</internalNodes>\n          <leafValues>\n            2.8296428918838501e-01 5.2435082197189331e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1791 4.3914958951063454e-04</internalNodes>\n          <leafValues>\n            4.5900669693946838e-01 5.8990901708602905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1792 2.1452000364661217e-02</internalNodes>\n          <leafValues>\n            5.2314108610153198e-01 2.8553789854049683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1793 5.8973580598831177e-04</internalNodes>\n          <leafValues>\n            4.3972569704055786e-01 5.5064219236373901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1794 -2.6157610118389130e-02</internalNodes>\n          <leafValues>\n            3.1350791454315186e-01 5.1891750097274780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1795 -1.3959860429167747e-02</internalNodes>\n          <leafValues>\n            3.2132729887962341e-01 5.0407177209854126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1796 -6.3699018210172653e-03</internalNodes>\n          <leafValues>\n            6.3875448703765869e-01 4.8495069146156311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1797 -8.5613820701837540e-03</internalNodes>\n          <leafValues>\n            2.7591320872306824e-01 5.0320190191268921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1798 9.6622901037335396e-04</internalNodes>\n          <leafValues>\n            4.6856409311294556e-01 5.8348792791366577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1799 7.6550268568098545e-04</internalNodes>\n          <leafValues>\n            5.1752072572708130e-01 3.8964220881462097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1800 -8.1833340227603912e-03</internalNodes>\n          <leafValues>\n            2.0691369473934174e-01 5.2081221342086792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1801 -9.3976939097046852e-03</internalNodes>\n          <leafValues>\n            6.1340910196304321e-01 4.6412229537963867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1802 4.8028980381786823e-03</internalNodes>\n          <leafValues>\n            5.4541081190109253e-01 4.3952199816703796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1803 -3.5680569708347321e-03</internalNodes>\n          <leafValues>\n            6.3444852828979492e-01 4.6810939908027649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1804 4.0733120404183865e-03</internalNodes>\n          <leafValues>\n            5.2926832437515259e-01 4.0156200528144836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1805 1.2568129459396005e-03</internalNodes>\n          <leafValues>\n            4.3929880857467651e-01 5.4528248310089111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1806 -2.9065010603517294e-03</internalNodes>\n          <leafValues>\n            5.8988320827484131e-01 4.8633798956871033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1807 -2.4409340694546700e-03</internalNodes>\n          <leafValues>\n            4.0693649649620056e-01 5.2474218606948853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1808 2.4830700829625130e-02</internalNodes>\n          <leafValues>\n            5.1827257871627808e-01 3.6825248599052429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1809 -4.8854008316993713e-02</internalNodes>\n          <leafValues>\n            1.3075779378414154e-01 4.9612811207771301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1810 -1.6110379947349429e-03</internalNodes>\n          <leafValues>\n            6.4210057258605957e-01 4.8726621270179749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1811 -9.7009479999542236e-02</internalNodes>\n          <leafValues>\n            4.7769349068403244e-02 4.9509888887405396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1812 1.1209240183234215e-03</internalNodes>\n          <leafValues>\n            4.6162670850753784e-01 5.3547459840774536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1813 -1.3064090162515640e-03</internalNodes>\n          <leafValues>\n            6.2618541717529297e-01 4.6388059854507446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1814 4.5771620352752507e-04</internalNodes>\n          <leafValues>\n            5.3844177722930908e-01 4.6466401219367981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1815 -6.3149951165542006e-04</internalNodes>\n          <leafValues>\n            3.8040471076965332e-01 5.1302570104598999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1816 1.4505970466416329e-04</internalNodes>\n          <leafValues>\n            4.5543101429939270e-01 5.6644618511199951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1817 -1.6474550589919090e-02</internalNodes>\n          <leafValues>\n            6.5969580411911011e-01 4.7158598899841309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1818 1.3369579799473286e-02</internalNodes>\n          <leafValues>\n            5.1954662799835205e-01 3.0359649658203125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1819 1.0271780047332868e-04</internalNodes>\n          <leafValues>\n            5.2291762828826904e-01 4.1070660948753357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1820 -5.5311559699475765e-03</internalNodes>\n          <leafValues>\n            6.3528877496719360e-01 4.9609071016311646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1821 -2.6187049224972725e-03</internalNodes>\n          <leafValues>\n            3.8245460391044617e-01 5.1409840583801270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1822 5.0834268331527710e-03</internalNodes>\n          <leafValues>\n            4.9504399299621582e-01 6.2208187580108643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1823 7.9818159341812134e-02</internalNodes>\n          <leafValues>\n            4.9523359537124634e-01 1.3224759697914124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1824 -9.9226586520671844e-02</internalNodes>\n          <leafValues>\n            7.5427287817001343e-01 5.0084167718887329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1825 -6.5174017800018191e-04</internalNodes>\n          <leafValues>\n            3.6993029713630676e-01 5.1301211118698120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1826 -1.8996849656105042e-02</internalNodes>\n          <leafValues>\n            6.6891789436340332e-01 4.9212029576301575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1827 1.7346899956464767e-02</internalNodes>\n          <leafValues>\n            4.9833008646965027e-01 1.8591980636119843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1828 5.5082101607695222e-04</internalNodes>\n          <leafValues>\n            4.5744240283966064e-01 5.5221217870712280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1829 2.0056050270795822e-03</internalNodes>\n          <leafValues>\n            5.1317447423934937e-01 3.8564699888229370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1830 -7.7688191086053848e-03</internalNodes>\n          <leafValues>\n            4.3617001175880432e-01 5.4343092441558838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1831 5.0878278911113739e-02</internalNodes>\n          <leafValues>\n            4.6827208995819092e-01 6.8406397104263306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1832 -2.2901780903339386e-03</internalNodes>\n          <leafValues>\n            4.3292450904846191e-01 5.3060990571975708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1833 -1.5715380141045898e-04</internalNodes>\n          <leafValues>\n            5.3700572252273560e-01 4.3781641125679016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1834 1.0519240051507950e-01</internalNodes>\n          <leafValues>\n            5.1372742652893066e-01 6.7361466586589813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1835 2.7198919560760260e-03</internalNodes>\n          <leafValues>\n            4.1120609641075134e-01 5.2556651830673218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1836 4.8337779939174652e-02</internalNodes>\n          <leafValues>\n            5.4046237468719482e-01 4.4389671087265015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1837 9.5703761326149106e-04</internalNodes>\n          <leafValues>\n            4.3559691309928894e-01 5.3995108604431152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1838 -2.5371259078383446e-02</internalNodes>\n          <leafValues>\n            5.9951752424240112e-01 5.0310248136520386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1839 5.2457951009273529e-02</internalNodes>\n          <leafValues>\n            4.9502879381179810e-01 1.3983510434627533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1840 -1.2365629896521568e-02</internalNodes>\n          <leafValues>\n            6.3972991704940796e-01 4.9641060829162598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1841 -1.4589719474315643e-01</internalNodes>\n          <leafValues>\n            1.0016699880361557e-01 4.9463221430778503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1842 -1.5908600762486458e-02</internalNodes>\n          <leafValues>\n            3.3123299479484558e-01 5.2083408832550049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1843 3.9486068999394774e-04</internalNodes>\n          <leafValues>\n            4.4063639640808105e-01 5.4261028766632080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1844 -5.2454001270234585e-03</internalNodes>\n          <leafValues>\n            2.7995899319648743e-01 5.1899671554565430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1845 -5.0421799533069134e-03</internalNodes>\n          <leafValues>\n            6.9875800609588623e-01 4.7521421313285828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1846 2.9812189750373363e-03</internalNodes>\n          <leafValues>\n            4.9832889437675476e-01 6.3074797391891479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1847 -7.2884308174252510e-03</internalNodes>\n          <leafValues>\n            2.9823330044746399e-01 5.0268697738647461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1848 1.5094350092113018e-03</internalNodes>\n          <leafValues>\n            5.3084421157836914e-01 3.8329708576202393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1849 -9.3340799212455750e-03</internalNodes>\n          <leafValues>\n            2.0379640161991119e-01 4.9698171019554138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1850 2.8667140752077103e-02</internalNodes>\n          <leafValues>\n            5.0256967544555664e-01 6.9280272722244263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1851 1.7019680142402649e-01</internalNodes>\n          <leafValues>\n            4.9600529670715332e-01 1.4764429628849030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1852 -3.2614478841423988e-03</internalNodes>\n          <leafValues>\n            5.6030637025833130e-01 4.8260560631752014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1853 5.5769277969375253e-04</internalNodes>\n          <leafValues>\n            5.2055621147155762e-01 4.1296330094337463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1854 3.6258339881896973e-01</internalNodes>\n          <leafValues>\n            5.2216529846191406e-01 3.7686121463775635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1855 -1.1615130119025707e-02</internalNodes>\n          <leafValues>\n            6.0226827859878540e-01 4.6374899148941040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1856 -4.0795197710394859e-03</internalNodes>\n          <leafValues>\n            4.0704470872879028e-01 5.3374791145324707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1857 5.7204300537705421e-04</internalNodes>\n          <leafValues>\n            4.6018350124359131e-01 5.9003931283950806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1858 6.7543348995968699e-04</internalNodes>\n          <leafValues>\n            5.3982520103454590e-01 4.3454289436340332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1859 6.3295697327703238e-04</internalNodes>\n          <leafValues>\n            5.2015632390975952e-01 4.0513589978218079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1860 1.2435320531949401e-03</internalNodes>\n          <leafValues>\n            4.6423879265785217e-01 5.5474412441253662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1861 -4.7363857738673687e-03</internalNodes>\n          <leafValues>\n            6.1985671520233154e-01 4.6725520491600037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1862 -6.4658462069928646e-03</internalNodes>\n          <leafValues>\n            6.8373328447341919e-01 5.0190007686614990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1863 3.5017321351915598e-04</internalNodes>\n          <leafValues>\n            4.3448030948638916e-01 5.3636229038238525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1864 1.5754920605104417e-04</internalNodes>\n          <leafValues>\n            4.7600790858268738e-01 5.7320207357406616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1865 9.9774366244673729e-03</internalNodes>\n          <leafValues>\n            5.0909858942031860e-01 3.6350399255752563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1866 -4.1464529931545258e-04</internalNodes>\n          <leafValues>\n            5.5700647830963135e-01 4.5938020944595337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1867 -3.5888899583369493e-04</internalNodes>\n          <leafValues>\n            5.3568458557128906e-01 4.3391349911689758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1868 4.0463250479660928e-04</internalNodes>\n          <leafValues>\n            4.4398030638694763e-01 5.4367768764495850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1869 -8.2184787606820464e-04</internalNodes>\n          <leafValues>\n            4.0422949194908142e-01 5.1762992143630981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1870 5.9467419050633907e-03</internalNodes>\n          <leafValues>\n            4.9276518821716309e-01 5.6337797641754150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1871 -2.1753389388322830e-02</internalNodes>\n          <leafValues>\n            8.0062937736511230e-01 4.8008409142494202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1872 -1.4540379866957664e-02</internalNodes>\n          <leafValues>\n            3.9460548758506775e-01 5.1822227239608765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1873 -4.0510769933462143e-02</internalNodes>\n          <leafValues>\n            2.1324990317225456e-02 4.9357929825782776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1874 -5.8458268176764250e-04</internalNodes>\n          <leafValues>\n            4.0127959847450256e-01 5.3140252828598022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1875 5.5151800625026226e-03</internalNodes>\n          <leafValues>\n            4.6424189209938049e-01 5.8962607383728027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1876 -6.0626221820712090e-03</internalNodes>\n          <leafValues>\n            6.5021592378616333e-01 5.0164777040481567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1877 9.4535842537879944e-02</internalNodes>\n          <leafValues>\n            5.2647089958190918e-01 4.1268271207809448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1878 4.7315051779150963e-03</internalNodes>\n          <leafValues>\n            4.8791998624801636e-01 5.8924478292465210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1879 -5.2571471314877272e-04</internalNodes>\n          <leafValues>\n            3.9172801375389099e-01 5.1894128322601318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1880 -2.5464049540460110e-03</internalNodes>\n          <leafValues>\n            5.8375990390777588e-01 4.9857059121131897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1881 -2.6075689122080803e-02</internalNodes>\n          <leafValues>\n            1.2619839608669281e-01 4.9558219313621521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1882 -5.4779709316790104e-03</internalNodes>\n          <leafValues>\n            5.7225137948989868e-01 5.0102657079696655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1883 5.1337741315364838e-03</internalNodes>\n          <leafValues>\n            5.2732622623443604e-01 4.2263761162757874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1884 4.7944980906322598e-04</internalNodes>\n          <leafValues>\n            4.4500669836997986e-01 5.8195871114730835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1885 -2.1114079281687737e-03</internalNodes>\n          <leafValues>\n            5.7576531171798706e-01 4.5117148756980896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1886 -1.3179990462958813e-02</internalNodes>\n          <leafValues>\n            1.8843810260295868e-01 5.1607340574264526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1887 -4.7968099825084209e-03</internalNodes>\n          <leafValues>\n            6.5897899866104126e-01 4.7361189126968384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1888 6.7483168095350266e-03</internalNodes>\n          <leafValues>\n            5.2594298124313354e-01 3.3563950657844543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1889 1.4623369788751006e-03</internalNodes>\n          <leafValues>\n            5.3552711009979248e-01 4.2640921473503113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1890 4.7645159065723419e-03</internalNodes>\n          <leafValues>\n            5.0344067811965942e-01 5.7868278026580811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1891 6.8066660314798355e-03</internalNodes>\n          <leafValues>\n            4.7566050291061401e-01 6.6778290271759033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1892 3.6608621012419462e-03</internalNodes>\n          <leafValues>\n            5.3696119785308838e-01 4.3115469813346863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1893 2.1449640393257141e-02</internalNodes>\n          <leafValues>\n            4.9686419963836670e-01 1.8888160586357117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1894 4.1678901761770248e-03</internalNodes>\n          <leafValues>\n            4.9307331442832947e-01 5.8153688907623291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1895 8.6467564105987549e-03</internalNodes>\n          <leafValues>\n            5.2052050828933716e-01 4.1325950622558594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1896 -3.6114078829996288e-04</internalNodes>\n          <leafValues>\n            5.4835551977157593e-01 4.8009279370307922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1897 1.0808729566633701e-03</internalNodes>\n          <leafValues>\n            4.6899020671844482e-01 6.0414212942123413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1898 5.7719959877431393e-03</internalNodes>\n          <leafValues>\n            5.1711422204971313e-01 3.0532771348953247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1899 1.5720770461484790e-03</internalNodes>\n          <leafValues>\n            5.2199780941009521e-01 4.1788038611412048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1900 -1.9307859474793077e-03</internalNodes>\n          <leafValues>\n            5.8603698015213013e-01 4.8129200935363770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1901 -7.8926272690296173e-03</internalNodes>\n          <leafValues>\n            1.7492769658565521e-01 4.9717339873313904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1902 -2.2224679123610258e-03</internalNodes>\n          <leafValues>\n            4.3425890803337097e-01 5.2128481864929199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1903 1.9011989934369922e-03</internalNodes>\n          <leafValues>\n            4.7651869058609009e-01 6.8920552730560303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1904 2.7576119173318148e-03</internalNodes>\n          <leafValues>\n            5.2621912956237793e-01 4.3374860286712646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1905 5.1787449046969414e-03</internalNodes>\n          <leafValues>\n            4.8040691018104553e-01 7.8437292575836182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1906 -9.0273341629654169e-04</internalNodes>\n          <leafValues>\n            4.1208469867706299e-01 5.3534239530563354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1907 5.1797959022223949e-03</internalNodes>\n          <leafValues>\n            4.7403728961944580e-01 6.4259600639343262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1908 -1.0114000178873539e-02</internalNodes>\n          <leafValues>\n            2.4687920510768890e-01 5.1750177145004272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1909 -1.8617060035467148e-02</internalNodes>\n          <leafValues>\n            5.7562941312789917e-01 4.6289789676666260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1910 5.9225959703326225e-03</internalNodes>\n          <leafValues>\n            5.1696258783340454e-01 3.2142710685729980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1911 -6.2945079989731312e-03</internalNodes>\n          <leafValues>\n            3.8720148801803589e-01 5.1416367292404175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1912 6.5353019163012505e-03</internalNodes>\n          <leafValues>\n            4.8530489206314087e-01 6.3104897737503052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1913 1.0878399480134249e-03</internalNodes>\n          <leafValues>\n            5.1173150539398193e-01 3.7232589721679688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1914 -2.2542240098118782e-02</internalNodes>\n          <leafValues>\n            5.6927400827407837e-01 4.8871129751205444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1915 -3.0065660830587149e-03</internalNodes>\n          <leafValues>\n            2.5560128688812256e-01 5.0039929151535034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1916 7.4741272255778313e-03</internalNodes>\n          <leafValues>\n            4.8108729720115662e-01 5.6759268045425415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1917 2.6162320747971535e-02</internalNodes>\n          <leafValues>\n            4.9711948633193970e-01 1.7772370576858521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1918 9.4352738233283162e-04</internalNodes>\n          <leafValues>\n            4.9400109052658081e-01 5.4912507534027100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1919 3.3363241702318192e-02</internalNodes>\n          <leafValues>\n            5.0076121091842651e-01 2.7907240390777588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1920 -1.5118650160729885e-02</internalNodes>\n          <leafValues>\n            7.0595788955688477e-01 4.9730318784713745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1921 9.8648946732282639e-04</internalNodes>\n          <leafValues>\n            5.1286202669143677e-01 3.7767618894577026e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>213</maxWeakCount>\n      <stageThreshold>1.0576110076904297e+02</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1922 -9.5150798559188843e-02</internalNodes>\n          <leafValues>\n            6.4707571268081665e-01 4.0172868967056274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1923 6.2702340073883533e-03</internalNodes>\n          <leafValues>\n            3.9998221397399902e-01 5.7464492321014404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1924 3.0018089455552399e-04</internalNodes>\n          <leafValues>\n            3.5587701201438904e-01 5.5388098955154419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1925 1.1757409665733576e-03</internalNodes>\n          <leafValues>\n            4.2565348744392395e-01 5.3826177120208740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1926 4.4235268433112651e-05</internalNodes>\n          <leafValues>\n            3.6829081177711487e-01 5.5899268388748169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1927 -2.9936920327600092e-05</internalNodes>\n          <leafValues>\n            5.4524701833724976e-01 4.0203678607940674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1928 3.0073199886828661e-03</internalNodes>\n          <leafValues>\n            5.2390581369400024e-01 3.3178439736366272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1929 -1.0513889603316784e-02</internalNodes>\n          <leafValues>\n            4.3206891417503357e-01 5.3079837560653687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1930 8.3476826548576355e-03</internalNodes>\n          <leafValues>\n            4.5046371221542358e-01 6.4532989263534546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1931 -3.1492270063608885e-03</internalNodes>\n          <leafValues>\n            4.3134251236915588e-01 5.3705251216888428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1932 -1.4435649973165710e-05</internalNodes>\n          <leafValues>\n            5.3266030550003052e-01 3.8179719448089600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1933 -4.2855090578086674e-04</internalNodes>\n          <leafValues>\n            4.3051639199256897e-01 5.3820097446441650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1934 1.5062429883982986e-04</internalNodes>\n          <leafValues>\n            4.2359709739685059e-01 5.5449652671813965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1935 7.1559831500053406e-02</internalNodes>\n          <leafValues>\n            5.3030598163604736e-01 2.6788029074668884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1936 8.4095180500298738e-04</internalNodes>\n          <leafValues>\n            3.5571089386940002e-01 5.2054339647293091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1937 6.2986500561237335e-02</internalNodes>\n          <leafValues>\n            5.2253627777099609e-01 2.8613761067390442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1938 -3.3798629883676767e-03</internalNodes>\n          <leafValues>\n            3.6241859197616577e-01 5.2016979455947876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1939 -1.1810739670181647e-04</internalNodes>\n          <leafValues>\n            5.4744768142700195e-01 3.9598938822746277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1940 -5.4505601292476058e-04</internalNodes>\n          <leafValues>\n            3.7404221296310425e-01 5.2157157659530640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1941 -1.8454910023137927e-03</internalNodes>\n          <leafValues>\n            5.8930522203445435e-01 4.5844489336013794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1942 -4.3832371011376381e-04</internalNodes>\n          <leafValues>\n            4.0845820307731628e-01 5.3853511810302734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1943 -2.4000830017030239e-03</internalNodes>\n          <leafValues>\n            3.7774550914764404e-01 5.2935802936553955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1944 -9.8795741796493530e-02</internalNodes>\n          <leafValues>\n            2.9636120796203613e-01 5.0700891017913818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1945 3.1798239797353745e-03</internalNodes>\n          <leafValues>\n            4.8776328563690186e-01 6.7264437675476074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1946 3.2406419632025063e-04</internalNodes>\n          <leafValues>\n            4.3669110536575317e-01 5.5611097812652588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1947 -3.2547250390052795e-02</internalNodes>\n          <leafValues>\n            3.1281578540802002e-01 5.3086161613464355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1948 -7.7561130747199059e-03</internalNodes>\n          <leafValues>\n            6.5602248907089233e-01 4.6398720145225525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1949 1.6027249395847321e-02</internalNodes>\n          <leafValues>\n            5.1726800203323364e-01 3.1418979167938232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1950 7.1002350523485802e-06</internalNodes>\n          <leafValues>\n            4.0844461321830750e-01 5.3362947702407837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1951 7.3422808200120926e-03</internalNodes>\n          <leafValues>\n            4.9669221043586731e-01 6.6034650802612305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1952 -1.6970280557870865e-03</internalNodes>\n          <leafValues>\n            5.9082370996475220e-01 4.5001828670501709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1953 2.4118260480463505e-03</internalNodes>\n          <leafValues>\n            5.3151607513427734e-01 3.5997208952903748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1954 -5.5300937965512276e-03</internalNodes>\n          <leafValues>\n            2.3340409994125366e-01 4.9968141317367554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1955 -2.6478730142116547e-03</internalNodes>\n          <leafValues>\n            5.8809357881546021e-01 4.6847340464591980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1956 1.1295629665255547e-02</internalNodes>\n          <leafValues>\n            4.9837771058082581e-01 1.8845909833908081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1957 -6.6952878842130303e-04</internalNodes>\n          <leafValues>\n            5.8721381425857544e-01 4.7990199923515320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1958 1.4410680159926414e-03</internalNodes>\n          <leafValues>\n            5.1311892271041870e-01 3.5010111331939697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1959 2.4637870956212282e-03</internalNodes>\n          <leafValues>\n            5.3393721580505371e-01 4.1176390647888184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1960 3.3114518737420440e-04</internalNodes>\n          <leafValues>\n            4.3133831024169922e-01 5.3982460498809814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1961 -3.3557269722223282e-02</internalNodes>\n          <leafValues>\n            2.6753368973731995e-01 5.1791548728942871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1962 1.8539419397711754e-02</internalNodes>\n          <leafValues>\n            4.9738699197769165e-01 2.3171770572662354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1963 -2.9698139405809343e-04</internalNodes>\n          <leafValues>\n            5.5297082662582397e-01 4.6436640620231628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1964 -4.5577259152196348e-04</internalNodes>\n          <leafValues>\n            5.6295841932296753e-01 4.4691911339759827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1965 -1.0158980265259743e-02</internalNodes>\n          <leafValues>\n            6.7062127590179443e-01 4.9259188771247864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1966 -2.2413829356082715e-05</internalNodes>\n          <leafValues>\n            5.2394217252731323e-01 3.9129018783569336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1967 7.2034963523037732e-05</internalNodes>\n          <leafValues>\n            4.7994381189346313e-01 5.5017888545989990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1968 -6.9267209619283676e-03</internalNodes>\n          <leafValues>\n            6.9300097227096558e-01 4.6980848908424377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1969 -7.6997838914394379e-03</internalNodes>\n          <leafValues>\n            4.0996238589286804e-01 5.4808831214904785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1970 -7.3130549862980843e-03</internalNodes>\n          <leafValues>\n            3.2834759354591370e-01 5.0578862428665161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1971 1.9650589674711227e-03</internalNodes>\n          <leafValues>\n            4.9780470132827759e-01 6.3982498645782471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1972 7.1647600270807743e-03</internalNodes>\n          <leafValues>\n            4.6611601114273071e-01 6.2221372127532959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1973 -2.4078639224171638e-02</internalNodes>\n          <leafValues>\n            2.3346449434757233e-01 5.2221620082855225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1974 -2.1027969196438789e-02</internalNodes>\n          <leafValues>\n            1.1836539953947067e-01 4.9382260441780090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1975 3.6017020465806127e-04</internalNodes>\n          <leafValues>\n            5.3250199556350708e-01 4.1167110204696655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1976 -1.7219729721546173e-02</internalNodes>\n          <leafValues>\n            6.2787622213363647e-01 4.6642690896987915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1977 -7.8672142699360847e-03</internalNodes>\n          <leafValues>\n            3.4034150838851929e-01 5.2497369050979614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1978 -4.4777389848604798e-04</internalNodes>\n          <leafValues>\n            3.6104118824005127e-01 5.0862592458724976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1979 5.5486010387539864e-03</internalNodes>\n          <leafValues>\n            4.8842659592628479e-01 6.2034982442855835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1980 -6.9461148232221603e-03</internalNodes>\n          <leafValues>\n            2.6259300112724304e-01 5.0110971927642822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1981 1.3569870498031378e-04</internalNodes>\n          <leafValues>\n            4.3407949805259705e-01 5.6283122301101685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1982 -4.5880250632762909e-02</internalNodes>\n          <leafValues>\n            6.5079987049102783e-01 4.6962749958038330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1983 -2.1582560613751411e-02</internalNodes>\n          <leafValues>\n            3.8265028595924377e-01 5.2876168489456177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1984 -2.0209539681673050e-02</internalNodes>\n          <leafValues>\n            3.2333680987358093e-01 5.0744771957397461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1985 5.8496710844337940e-03</internalNodes>\n          <leafValues>\n            5.1776039600372314e-01 4.4896709918975830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1986 -5.7476379879517481e-05</internalNodes>\n          <leafValues>\n            4.0208509564399719e-01 5.2463638782501221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1987 -1.1513100471347570e-03</internalNodes>\n          <leafValues>\n            6.3150721788406372e-01 4.9051541090011597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1988 1.9862831104546785e-03</internalNodes>\n          <leafValues>\n            4.7024598717689514e-01 6.4971512556076050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1989 -5.2719512023031712e-03</internalNodes>\n          <leafValues>\n            3.6503839492797852e-01 5.2276527881622314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1990 1.2662699446082115e-03</internalNodes>\n          <leafValues>\n            5.1661008596420288e-01 3.8776180148124695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1991 -6.2919440679252148e-03</internalNodes>\n          <leafValues>\n            7.3758941888809204e-01 5.0238478183746338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1992 6.7360111279413104e-04</internalNodes>\n          <leafValues>\n            4.4232261180877686e-01 5.4955857992172241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1993 -1.0523450328037143e-03</internalNodes>\n          <leafValues>\n            5.9763962030410767e-01 4.8595830798149109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1994 -4.4216238893568516e-04</internalNodes>\n          <leafValues>\n            5.9559392929077148e-01 4.3989309668540955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1995 1.1747940443456173e-03</internalNodes>\n          <leafValues>\n            5.3498882055282593e-01 4.6050581336021423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1996 5.2457437850534916e-03</internalNodes>\n          <leafValues>\n            5.0491911172866821e-01 2.9415771365165710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1997 -2.4539720267057419e-02</internalNodes>\n          <leafValues>\n            2.5501778721809387e-01 5.2185869216918945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1998 7.3793041519820690e-04</internalNodes>\n          <leafValues>\n            4.4248610734939575e-01 5.4908162355422974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1999 1.4233799884095788e-03</internalNodes>\n          <leafValues>\n            5.3195142745971680e-01 4.0813559293746948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2000 -2.4149110540747643e-03</internalNodes>\n          <leafValues>\n            4.0876591205596924e-01 5.2389502525329590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2001 -1.2165299849584699e-03</internalNodes>\n          <leafValues>\n            5.6745791435241699e-01 4.9080529808998108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2002 -1.2438809499144554e-03</internalNodes>\n          <leafValues>\n            4.1294258832931519e-01 5.2561181783676147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2003 6.1942739412188530e-03</internalNodes>\n          <leafValues>\n            5.0601941347122192e-01 7.3136532306671143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2004 -1.6607169527560472e-03</internalNodes>\n          <leafValues>\n            5.9796321392059326e-01 4.5963698625564575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2005 -2.7316259220242500e-02</internalNodes>\n          <leafValues>\n            4.1743651032447815e-01 5.3088420629501343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2006 -1.5845570014789701e-03</internalNodes>\n          <leafValues>\n            5.6158047914505005e-01 4.5194861292839050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2007 -1.5514739789068699e-03</internalNodes>\n          <leafValues>\n            4.0761870145797729e-01 5.3607851266860962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2008 3.8446558755822480e-04</internalNodes>\n          <leafValues>\n            4.3472939729690552e-01 5.4304420948028564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2009 -1.4672259800136089e-02</internalNodes>\n          <leafValues>\n            1.6593049466609955e-01 5.1460939645767212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2010 8.1608882173895836e-03</internalNodes>\n          <leafValues>\n            4.9618190526962280e-01 1.8847459554672241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2011 1.1121659772470593e-03</internalNodes>\n          <leafValues>\n            4.8682639002799988e-01 6.0938161611557007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2012 -7.2603770531713963e-03</internalNodes>\n          <leafValues>\n            6.2843251228332520e-01 4.6903759241104126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2013 -2.4046430189628154e-04</internalNodes>\n          <leafValues>\n            5.5750000476837158e-01 4.0460440516471863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2014 -2.3348190006799996e-04</internalNodes>\n          <leafValues>\n            4.1157621145248413e-01 5.2528482675552368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2015 5.5736480280756950e-03</internalNodes>\n          <leafValues>\n            4.7300729155540466e-01 5.6901007890701294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2016 3.0623769387602806e-02</internalNodes>\n          <leafValues>\n            4.9718868732452393e-01 1.7400950193405151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2017 9.2074798885732889e-04</internalNodes>\n          <leafValues>\n            5.3721177577972412e-01 4.3548721075057983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2018 -4.3550739064812660e-05</internalNodes>\n          <leafValues>\n            5.3668838739395142e-01 4.3473169207572937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2019 -6.6452710889279842e-03</internalNodes>\n          <leafValues>\n            3.4355181455612183e-01 5.1605331897735596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2020 4.3221998959779739e-02</internalNodes>\n          <leafValues>\n            4.7667920589447021e-01 7.2936528921127319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2021 2.2331769578158855e-03</internalNodes>\n          <leafValues>\n            5.0293159484863281e-01 5.6331712007522583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2022 3.1829739455133677e-03</internalNodes>\n          <leafValues>\n            4.0160921216011047e-01 5.1921367645263672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2023 -1.8027749320026487e-04</internalNodes>\n          <leafValues>\n            4.0883159637451172e-01 5.4179197549819946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2024 -5.2934689447283745e-03</internalNodes>\n          <leafValues>\n            4.0756770968437195e-01 5.2435618638992310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2025 1.2750959722325206e-03</internalNodes>\n          <leafValues>\n            4.9132829904556274e-01 6.3870108127593994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2026 4.3385322205722332e-03</internalNodes>\n          <leafValues>\n            5.0316721200942993e-01 2.9473468661308289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2027 8.5250744596123695e-03</internalNodes>\n          <leafValues>\n            4.9497890472412109e-01 6.3088691234588623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2028 -9.4266352243721485e-04</internalNodes>\n          <leafValues>\n            5.3283667564392090e-01 4.2856499552726746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2029 1.3609660090878606e-03</internalNodes>\n          <leafValues>\n            4.9915251135826111e-01 5.9415012598037720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2030 4.4782509212382138e-04</internalNodes>\n          <leafValues>\n            4.5735040307044983e-01 5.8544808626174927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2031 1.3360050506889820e-03</internalNodes>\n          <leafValues>\n            4.6043589711189270e-01 5.8490520715713501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2032 -6.0967548051849008e-04</internalNodes>\n          <leafValues>\n            3.9693889021873474e-01 5.2294230461120605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2033 -2.3656780831515789e-03</internalNodes>\n          <leafValues>\n            5.8083200454711914e-01 4.8983570933341980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2034 1.0734340175986290e-03</internalNodes>\n          <leafValues>\n            4.3512108922004700e-01 5.4700392484664917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2035 2.1923359017819166e-03</internalNodes>\n          <leafValues>\n            5.3550601005554199e-01 3.8429039716720581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2036 5.4968618787825108e-03</internalNodes>\n          <leafValues>\n            5.0181388854980469e-01 2.8271919488906860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2037 -7.5368821620941162e-02</internalNodes>\n          <leafValues>\n            1.2250760197639465e-01 5.1488268375396729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2038 2.5134470313787460e-02</internalNodes>\n          <leafValues>\n            4.7317668795585632e-01 7.0254462957382202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2039 -2.9358599931583740e-05</internalNodes>\n          <leafValues>\n            5.4305320978164673e-01 4.6560868620872498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2040 -5.8355910005047917e-04</internalNodes>\n          <leafValues>\n            4.0310400724411011e-01 5.1901197433471680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2041 -2.6639450807124376e-03</internalNodes>\n          <leafValues>\n            4.3081268668174744e-01 5.1617711782455444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2042 -1.3804089976474643e-03</internalNodes>\n          <leafValues>\n            6.2198299169540405e-01 4.6955159306526184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2043 1.2313219485804439e-03</internalNodes>\n          <leafValues>\n            5.3793638944625854e-01 4.4258311390876770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2044 -1.4644179827882908e-05</internalNodes>\n          <leafValues>\n            5.2816402912139893e-01 4.2225030064582825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2045 -1.2818809598684311e-02</internalNodes>\n          <leafValues>\n            2.5820928812026978e-01 5.1799327135086060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2046 2.2852189838886261e-02</internalNodes>\n          <leafValues>\n            4.7786930203437805e-01 7.6092642545700073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2047 8.2305970136076212e-04</internalNodes>\n          <leafValues>\n            5.3409922122955322e-01 4.6717241406440735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2048 1.2770120054483414e-02</internalNodes>\n          <leafValues>\n            4.9657610058784485e-01 1.4723660051822662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2049 -5.0051510334014893e-02</internalNodes>\n          <leafValues>\n            6.4149940013885498e-01 5.0165921449661255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2050 1.5775270760059357e-02</internalNodes>\n          <leafValues>\n            4.5223200321197510e-01 5.6853622198104858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2051 -1.8501620739698410e-02</internalNodes>\n          <leafValues>\n            2.7647489309310913e-01 5.1379591226577759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2052 2.4626250378787518e-03</internalNodes>\n          <leafValues>\n            5.1419419050216675e-01 3.7954080104827881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2053 6.2916167080402374e-02</internalNodes>\n          <leafValues>\n            5.0606489181518555e-01 6.5804338455200195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2054 -2.1648500478477217e-05</internalNodes>\n          <leafValues>\n            5.1953881978988647e-01 4.0198868513107300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2055 2.1180990152060986e-03</internalNodes>\n          <leafValues>\n            4.9623650312423706e-01 5.9544587135314941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2056 -1.6634890809655190e-02</internalNodes>\n          <leafValues>\n            3.7579330801963806e-01 5.1754468679428101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2057 -2.8899470344185829e-03</internalNodes>\n          <leafValues>\n            6.6240137815475464e-01 5.0571787357330322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2058 7.6783262193202972e-02</internalNodes>\n          <leafValues>\n            4.7957968711853027e-01 8.0477148294448853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2059 3.9170677773654461e-03</internalNodes>\n          <leafValues>\n            4.9378821253776550e-01 5.7199418544769287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2060 -7.2670601308345795e-02</internalNodes>\n          <leafValues>\n            5.3894560784101486e-02 4.9439039826393127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2061 5.4039502143859863e-01</internalNodes>\n          <leafValues>\n            5.1297742128372192e-01 1.1433389782905579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2062 2.9510019812732935e-03</internalNodes>\n          <leafValues>\n            4.5283439755439758e-01 5.6985741853713989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2063 3.4508369863033295e-03</internalNodes>\n          <leafValues>\n            5.3577268123626709e-01 4.2187309265136719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2064 -4.2077939724549651e-04</internalNodes>\n          <leafValues>\n            5.9161728620529175e-01 4.6379259228706360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2065 3.3051050268113613e-03</internalNodes>\n          <leafValues>\n            5.2733850479125977e-01 4.3820428848266602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2066 4.7735060798004270e-04</internalNodes>\n          <leafValues>\n            4.0465280413627625e-01 5.1818847656250000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2067 -2.5928510352969170e-02</internalNodes>\n          <leafValues>\n            7.4522358179092407e-01 5.0893861055374146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2068 -2.9729790985584259e-03</internalNodes>\n          <leafValues>\n            3.2954359054565430e-01 5.0587952136993408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2069 5.8508329093456268e-03</internalNodes>\n          <leafValues>\n            4.8571440577507019e-01 5.7930248975753784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2070 -4.5967519283294678e-02</internalNodes>\n          <leafValues>\n            4.3127310276031494e-01 5.3806531429290771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2071 1.5585960447788239e-01</internalNodes>\n          <leafValues>\n            5.1961702108383179e-01 1.6847139596939087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2072 1.5164829790592194e-02</internalNodes>\n          <leafValues>\n            4.7357571125030518e-01 6.7350268363952637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2073 -1.0604249546304345e-03</internalNodes>\n          <leafValues>\n            5.8229267597198486e-01 4.7757029533386230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2074 6.6476291976869106e-03</internalNodes>\n          <leafValues>\n            4.9991989135742188e-01 2.3195350170135498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2075 -1.2231130152940750e-02</internalNodes>\n          <leafValues>\n            4.7508931159973145e-01 5.2629822492599487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2076 5.6528882123529911e-03</internalNodes>\n          <leafValues>\n            5.0697678327560425e-01 3.5618188977241516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2077 1.2977829901501536e-03</internalNodes>\n          <leafValues>\n            4.8756939172744751e-01 5.6190627813339233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2078 1.0781589895486832e-02</internalNodes>\n          <leafValues>\n            4.7507700324058533e-01 6.7823082208633423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2079 2.8654779307544231e-03</internalNodes>\n          <leafValues>\n            5.3054618835449219e-01 4.2907360196113586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2080 2.8663428965955973e-03</internalNodes>\n          <leafValues>\n            4.5184791088104248e-01 5.5393511056900024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2081 -5.1983320154249668e-03</internalNodes>\n          <leafValues>\n            4.1491198539733887e-01 5.4341888427734375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2082 5.3739990107715130e-03</internalNodes>\n          <leafValues>\n            4.7178968787193298e-01 6.5076571702957153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2083 -1.4641529880464077e-02</internalNodes>\n          <leafValues>\n            2.1721640229225159e-01 5.1617771387100220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2084 -1.5042580344015732e-05</internalNodes>\n          <leafValues>\n            5.3373837471008301e-01 4.2988368868827820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2085 -1.1875660129589960e-04</internalNodes>\n          <leafValues>\n            4.6045941114425659e-01 5.5824470520019531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2086 1.6995530575513840e-02</internalNodes>\n          <leafValues>\n            4.9458950757980347e-01 7.3880076408386230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2087 -3.5095941275358200e-02</internalNodes>\n          <leafValues>\n            7.0055091381072998e-01 4.9775910377502441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2088 2.4217350874096155e-03</internalNodes>\n          <leafValues>\n            4.4662651419639587e-01 5.4776942729949951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2089 -9.6340337768197060e-04</internalNodes>\n          <leafValues>\n            4.7140988707542419e-01 5.3133380413055420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2090 1.6391130338888615e-04</internalNodes>\n          <leafValues>\n            4.3315461277961731e-01 5.3422421216964722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2091 -2.1141460165381432e-02</internalNodes>\n          <leafValues>\n            2.6447001099586487e-01 5.2044987678527832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2092 8.7775202700868249e-04</internalNodes>\n          <leafValues>\n            5.2083498239517212e-01 4.1527429223060608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2093 -2.7943920344114304e-02</internalNodes>\n          <leafValues>\n            6.3441252708435059e-01 5.0188118219375610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2094 6.7297378554940224e-03</internalNodes>\n          <leafValues>\n            5.0504380464553833e-01 3.5008639097213745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2095 2.3281039670109749e-02</internalNodes>\n          <leafValues>\n            4.9663180112838745e-01 6.9686770439147949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2096 -1.1644979938864708e-02</internalNodes>\n          <leafValues>\n            3.3002600073814392e-01 5.0496298074722290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2097 1.5764309093356133e-02</internalNodes>\n          <leafValues>\n            4.9915981292724609e-01 7.3211538791656494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2098 -1.3611479662358761e-03</internalNodes>\n          <leafValues>\n            3.9117351174354553e-01 5.1606708765029907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2099 -8.1522337859496474e-04</internalNodes>\n          <leafValues>\n            5.6289112567901611e-01 4.9497190117835999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2100 -6.0066272271797061e-04</internalNodes>\n          <leafValues>\n            5.8535951375961304e-01 4.5505958795547485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2101 4.9715518252924085e-04</internalNodes>\n          <leafValues>\n            4.2714700102806091e-01 5.4435992240905762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2102 2.3475370835512877e-03</internalNodes>\n          <leafValues>\n            5.1431107521057129e-01 3.8876569271087646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2103 -8.9261569082736969e-03</internalNodes>\n          <leafValues>\n            6.0445022583007812e-01 4.9717208743095398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2104 -1.3919910416007042e-02</internalNodes>\n          <leafValues>\n            2.5831609964370728e-01 5.0003677606582642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2105 1.0209949687123299e-03</internalNodes>\n          <leafValues>\n            4.8573741316795349e-01 5.5603581666946411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2106 -2.7441629208624363e-03</internalNodes>\n          <leafValues>\n            5.9368848800659180e-01 4.6457770466804504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2107 -1.6200130805373192e-02</internalNodes>\n          <leafValues>\n            3.1630149483680725e-01 5.1934951543807983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2108 4.3331980705261230e-03</internalNodes>\n          <leafValues>\n            5.0612241029739380e-01 3.4588789939880371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2109 5.8497930876910686e-04</internalNodes>\n          <leafValues>\n            4.7790178656578064e-01 5.8701777458190918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2110 -2.2466450463980436e-03</internalNodes>\n          <leafValues>\n            4.2978510260581970e-01 5.3747731447219849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2111 2.3146099410951138e-03</internalNodes>\n          <leafValues>\n            5.4386717081069946e-01 4.6409699320793152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2112 8.7679121643304825e-03</internalNodes>\n          <leafValues>\n            4.7268930077552795e-01 6.7717897891998291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2113 -2.2448020172305405e-04</internalNodes>\n          <leafValues>\n            4.2291730642318726e-01 5.4280489683151245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2114 -7.4336021207273006e-03</internalNodes>\n          <leafValues>\n            6.0988807678222656e-01 4.6836739778518677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2115 -2.3189240600913763e-03</internalNodes>\n          <leafValues>\n            5.6894367933273315e-01 4.4242420792579651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2116 -2.1042178850620985e-03</internalNodes>\n          <leafValues>\n            3.7622210383415222e-01 5.1870870590209961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2117 4.6034841216169298e-04</internalNodes>\n          <leafValues>\n            4.6994051337242126e-01 5.7712072134017944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2118 1.0547629790380597e-03</internalNodes>\n          <leafValues>\n            4.4652169942855835e-01 5.6017017364501953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2119 8.7148818420246243e-04</internalNodes>\n          <leafValues>\n            5.4498052597045898e-01 3.9147090911865234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2120 3.3364820410497487e-04</internalNodes>\n          <leafValues>\n            4.5640090107917786e-01 5.6457388401031494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2121 -1.4853250468149781e-03</internalNodes>\n          <leafValues>\n            5.7473778724670410e-01 4.6927788853645325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2122 3.0251620337367058e-03</internalNodes>\n          <leafValues>\n            5.1661968231201172e-01 3.7628141045570374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2123 5.0280741415917873e-03</internalNodes>\n          <leafValues>\n            5.0021117925643921e-01 6.1515271663665771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2124 -5.8164511574432254e-04</internalNodes>\n          <leafValues>\n            5.3945982456207275e-01 4.3907511234283447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2125 4.5141529291868210e-02</internalNodes>\n          <leafValues>\n            5.1883268356323242e-01 2.0630359649658203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2126 -1.0795620037242770e-03</internalNodes>\n          <leafValues>\n            3.9046850800514221e-01 5.1379072666168213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2127 1.5995999274309725e-04</internalNodes>\n          <leafValues>\n            4.8953229188919067e-01 5.4275041818618774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2128 -1.9359270110726357e-02</internalNodes>\n          <leafValues>\n            6.9752287864685059e-01 4.7735071182250977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2129 2.0725509524345398e-01</internalNodes>\n          <leafValues>\n            5.2336359024047852e-01 3.0349919199943542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2130 -4.1953290929086506e-04</internalNodes>\n          <leafValues>\n            5.4193967580795288e-01 4.4601860642433167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2131 2.2582069505006075e-03</internalNodes>\n          <leafValues>\n            4.8157641291618347e-01 6.0274088382720947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2132 -6.7811207845807076e-03</internalNodes>\n          <leafValues>\n            3.9802789688110352e-01 5.1833057403564453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2133 1.1154309846460819e-02</internalNodes>\n          <leafValues>\n            5.4312318563461304e-01 4.1887599229812622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2134 4.3162431567907333e-02</internalNodes>\n          <leafValues>\n            4.7382280230522156e-01 6.5229612588882446e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          3 7 14 4 -1.</_>\n        <_>\n          3 9 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 4 -1.</_>\n        <_>\n          7 2 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 15 9 -1.</_>\n        <_>\n          1 10 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 6 -1.</_>\n        <_>\n          5 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 3 -1.</_>\n        <_>\n          9 5 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 9 -1.</_>\n        <_>\n          4 3 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 10 8 -1.</_>\n        <_>\n          6 13 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 8 -1.</_>\n        <_>\n          3 10 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 10 -1.</_>\n        <_>\n          14 1 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 5 12 -1.</_>\n        <_>\n          7 12 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 3 -1.</_>\n        <_>\n          7 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 17 2 -1.</_>\n        <_>\n          1 9 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 2 -1.</_>\n        <_>\n          16 7 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 2 2 -1.</_>\n        <_>\n          5 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 12 -1.</_>\n        <_>\n          14 2 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 12 -1.</_>\n        <_>\n          4 0 2 6 2.</_>\n        <_>\n          6 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 8 -1.</_>\n        <_>\n          8 11 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 2 -1.</_>\n        <_>\n          5 8 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 5 3 -1.</_>\n        <_>\n          15 12 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 9 -1.</_>\n        <_>\n          5 6 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 14 -1.</_>\n        <_>\n          9 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 12 -1.</_>\n        <_>\n          3 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 5 -1.</_>\n        <_>\n          8 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 8 -1.</_>\n        <_>\n          5 10 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          8 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 1 8 -1.</_>\n        <_>\n          9 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 6 -1.</_>\n        <_>\n          0 9 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 17 -1.</_>\n        <_>\n          9 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 4 -1.</_>\n        <_>\n          11 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 4 -1.</_>\n        <_>\n          7 1 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 16 -1.</_>\n        <_>\n          14 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 8 -1.</_>\n        <_>\n          0 5 9 4 2.</_>\n        <_>\n          9 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 10 4 -1.</_>\n        <_>\n          13 15 5 2 2.</_>\n        <_>\n          8 17 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 4 8 -1.</_>\n        <_>\n          3 1 2 4 2.</_>\n        <_>\n          5 5 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 10 -1.</_>\n        <_>\n          10 6 7 5 2.</_>\n        <_>\n          3 11 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 16 -1.</_>\n        <_>\n          4 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 20 2 -1.</_>\n        <_>\n          0 19 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 9 6 -1.</_>\n        <_>\n          0 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 4 -1.</_>\n        <_>\n          5 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 16 -1.</_>\n        <_>\n          9 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 13 8 -1.</_>\n        <_>\n          3 10 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 8 2 -1.</_>\n        <_>\n          12 3 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 12 -1.</_>\n        <_>\n          8 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 6 -1.</_>\n        <_>\n          15 3 4 3 2.</_>\n        <_>\n          11 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 19 -1.</_>\n        <_>\n          9 1 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 4 -1.</_>\n        <_>\n          11 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 9 3 -1.</_>\n        <_>\n          6 1 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 10 4 -1.</_>\n        <_>\n          13 15 5 2 2.</_>\n        <_>\n          8 17 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 10 -1.</_>\n        <_>\n          3 3 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 15 15 -1.</_>\n        <_>\n          3 9 15 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 6 -1.</_>\n        <_>\n          6 7 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 10 -1.</_>\n        <_>\n          10 4 6 5 2.</_>\n        <_>\n          4 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 4 -1.</_>\n        <_>\n          8 4 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 2 -1.</_>\n        <_>\n          15 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 2 2 -1.</_>\n        <_>\n          3 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 1 3 -1.</_>\n        <_>\n          16 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 4 -1.</_>\n        <_>\n          3 15 3 2 2.</_>\n        <_>\n          6 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 2 -1.</_>\n        <_>\n          6 8 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 1 3 -1.</_>\n        <_>\n          3 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 2 -1.</_>\n        <_>\n          6 1 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 2 -1.</_>\n        <_>\n          7 16 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 6 -1.</_>\n        <_>\n          0 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 2 -1.</_>\n        <_>\n          8 12 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 1 9 -1.</_>\n        <_>\n          6 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 3 2 -1.</_>\n        <_>\n          11 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 4 -1.</_>\n        <_>\n          9 6 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 3 2 -1.</_>\n        <_>\n          8 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 3 3 -1.</_>\n        <_>\n          11 17 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 2 -1.</_>\n        <_>\n          8 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 2 -1.</_>\n        <_>\n          11 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 4 -1.</_>\n        <_>\n          3 13 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 4 -1.</_>\n        <_>\n          10 10 9 2 2.</_>\n        <_>\n          1 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 3 3 -1.</_>\n        <_>\n          0 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 6 -1.</_>\n        <_>\n          11 1 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 6 -1.</_>\n        <_>\n          9 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 9 -1.</_>\n        <_>\n          1 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 2 6 -1.</_>\n        <_>\n          12 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 19 8 -1.</_>\n        <_>\n          0 9 19 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 1 -1.</_>\n        <_>\n          7 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 1 -1.</_>\n        <_>\n          13 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 6 -1.</_>\n        <_>\n          5 13 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 1 -1.</_>\n        <_>\n          13 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 6 -1.</_>\n        <_>\n          4 6 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 6 -1.</_>\n        <_>\n          15 14 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 2 -1.</_>\n        <_>\n          10 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 3 1 -1.</_>\n        <_>\n          10 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 4 14 -1.</_>\n        <_>\n          3 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 4 -1.</_>\n        <_>\n          11 0 2 2 2.</_>\n        <_>\n          9 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 1 14 -1.</_>\n        <_>\n          7 12 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 4 -1.</_>\n        <_>\n          19 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 4 -1.</_>\n        <_>\n          8 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 2 -1.</_>\n        <_>\n          10 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          9 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          4 7 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 6 -1.</_>\n        <_>\n          3 14 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 12 -1.</_>\n        <_>\n          10 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 3 2 -1.</_>\n        <_>\n          8 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 2 -1.</_>\n        <_>\n          11 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 9 3 -1.</_>\n        <_>\n          5 12 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 2 -1.</_>\n        <_>\n          11 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 5 -1.</_>\n        <_>\n          7 1 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 4 -1.</_>\n        <_>\n          10 0 2 2 2.</_>\n        <_>\n          8 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 1 3 -1.</_>\n        <_>\n          3 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 5 3 -1.</_>\n        <_>\n          8 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 12 -1.</_>\n        <_>\n          5 4 5 6 2.</_>\n        <_>\n          10 10 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 12 -1.</_>\n        <_>\n          9 10 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 12 14 -1.</_>\n        <_>\n          2 2 6 7 2.</_>\n        <_>\n          8 9 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 4 -1.</_>\n        <_>\n          7 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 11 8 -1.</_>\n        <_>\n          4 9 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 4 -1.</_>\n        <_>\n          3 12 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 2 -1.</_>\n        <_>\n          0 1 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 2 -1.</_>\n        <_>\n          9 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 15 -1.</_>\n        <_>\n          10 10 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 8 6 -1.</_>\n        <_>\n          3 14 4 3 2.</_>\n        <_>\n          7 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 2 -1.</_>\n        <_>\n          14 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 7 6 -1.</_>\n        <_>\n          1 13 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 3 -1.</_>\n        <_>\n          15 4 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 14 6 -1.</_>\n        <_>\n          2 9 7 3 2.</_>\n        <_>\n          9 12 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 4 -1.</_>\n        <_>\n          5 9 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          6 9 4 4 2.</_>\n        <_>\n          10 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 2 -1.</_>\n        <_>\n          14 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 4 2 -1.</_>\n        <_>\n          3 4 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 8 -1.</_>\n        <_>\n          11 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 3 -1.</_>\n        <_>\n          0 1 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 8 -1.</_>\n        <_>\n          11 5 9 4 2.</_>\n        <_>\n          2 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 6 -1.</_>\n        <_>\n          6 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 1 3 -1.</_>\n        <_>\n          19 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 6 -1.</_>\n        <_>\n          9 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 1 3 -1.</_>\n        <_>\n          19 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 3 -1.</_>\n        <_>\n          3 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 12 -1.</_>\n        <_>\n          12 4 4 6 2.</_>\n        <_>\n          8 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 3 -1.</_>\n        <_>\n          7 2 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 9 10 -1.</_>\n        <_>\n          6 6 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 12 -1.</_>\n        <_>\n          2 4 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 3 -1.</_>\n        <_>\n          15 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 5 3 -1.</_>\n        <_>\n          7 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 3 3 -1.</_>\n        <_>\n          15 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 8 3 -1.</_>\n        <_>\n          6 15 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 3 3 -1.</_>\n        <_>\n          15 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 3 3 -1.</_>\n        <_>\n          2 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 12 -1.</_>\n        <_>\n          10 7 6 6 2.</_>\n        <_>\n          4 13 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 6 -1.</_>\n        <_>\n          10 7 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 5 2 -1.</_>\n        <_>\n          8 10 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 4 -1.</_>\n        <_>\n          9 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 8 -1.</_>\n        <_>\n          9 10 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 6 -1.</_>\n        <_>\n          8 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 3 -1.</_>\n        <_>\n          12 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 1 -1.</_>\n        <_>\n          7 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 7 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 9 -1.</_>\n        <_>\n          7 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 1 -1.</_>\n        <_>\n          9 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 16 8 -1.</_>\n        <_>\n          2 12 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 2 6 -1.</_>\n        <_>\n          14 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 15 -1.</_>\n        <_>\n          1 10 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          10 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 7 14 -1.</_>\n        <_>\n          6 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 3 6 -1.</_>\n        <_>\n          13 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 4 -1.</_>\n        <_>\n          6 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 10 -1.</_>\n        <_>\n          11 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 4 6 -1.</_>\n        <_>\n          3 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 6 10 -1.</_>\n        <_>\n          15 3 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 10 -1.</_>\n        <_>\n          5 7 4 5 2.</_>\n        <_>\n          9 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 12 -1.</_>\n        <_>\n          10 4 6 6 2.</_>\n        <_>\n          4 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 9 -1.</_>\n        <_>\n          3 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 2 5 -1.</_>\n        <_>\n          11 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 2 5 -1.</_>\n        <_>\n          8 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 3 -1.</_>\n        <_>\n          10 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 2 -1.</_>\n        <_>\n          8 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 12 6 -1.</_>\n        <_>\n          4 14 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 5 9 -1.</_>\n        <_>\n          11 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 2 -1.</_>\n        <_>\n          6 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 5 -1.</_>\n        <_>\n          12 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          8 5 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 1 9 -1.</_>\n        <_>\n          13 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 8 -1.</_>\n        <_>\n          3 2 2 4 2.</_>\n        <_>\n          5 6 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 4 6 -1.</_>\n        <_>\n          13 14 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 4 6 -1.</_>\n        <_>\n          3 14 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 4 -1.</_>\n        <_>\n          13 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 4 3 -1.</_>\n        <_>\n          4 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 11 8 -1.</_>\n        <_>\n          7 9 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 4 -1.</_>\n        <_>\n          8 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 1 -1.</_>\n        <_>\n          11 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 3 -1.</_>\n        <_>\n          5 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 6 -1.</_>\n        <_>\n          10 9 10 3 2.</_>\n        <_>\n          0 12 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 5 -1.</_>\n        <_>\n          9 6 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 1 3 -1.</_>\n        <_>\n          11 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 2 -1.</_>\n        <_>\n          4 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 4 3 -1.</_>\n        <_>\n          12 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 4 -1.</_>\n        <_>\n          7 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 8 -1.</_>\n        <_>\n          10 7 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 4 -1.</_>\n        <_>\n          13 7 7 2 2.</_>\n        <_>\n          6 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 6 -1.</_>\n        <_>\n          0 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 4 -1.</_>\n        <_>\n          13 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 4 -1.</_>\n        <_>\n          4 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 8 -1.</_>\n        <_>\n          11 9 6 4 2.</_>\n        <_>\n          5 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 1 3 -1.</_>\n        <_>\n          9 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 2 4 -1.</_>\n        <_>\n          10 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 1 -1.</_>\n        <_>\n          9 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 6 6 -1.</_>\n        <_>\n          15 3 3 3 2.</_>\n        <_>\n          12 6 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 10 6 -1.</_>\n        <_>\n          0 6 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 8 14 -1.</_>\n        <_>\n          12 3 4 7 2.</_>\n        <_>\n          8 10 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 7 15 -1.</_>\n        <_>\n          4 9 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 8 -1.</_>\n        <_>\n          15 2 3 4 2.</_>\n        <_>\n          12 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 8 -1.</_>\n        <_>\n          2 2 3 4 2.</_>\n        <_>\n          5 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 7 -1.</_>\n        <_>\n          8 13 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 8 14 -1.</_>\n        <_>\n          4 3 4 7 2.</_>\n        <_>\n          8 10 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 6 -1.</_>\n        <_>\n          18 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 6 -1.</_>\n        <_>\n          18 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 6 -1.</_>\n        <_>\n          0 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 6 -1.</_>\n        <_>\n          1 7 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 7 -1.</_>\n        <_>\n          3 2 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 14 -1.</_>\n        <_>\n          7 10 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 13 10 -1.</_>\n        <_>\n          3 12 13 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 2 -1.</_>\n        <_>\n          11 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 4 -1.</_>\n        <_>\n          2 11 8 2 2.</_>\n        <_>\n          10 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 9 -1.</_>\n        <_>\n          6 13 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 1 6 -1.</_>\n        <_>\n          14 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 1 -1.</_>\n        <_>\n          7 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 15 5 -1.</_>\n        <_>\n          8 8 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 5 4 -1.</_>\n        <_>\n          1 8 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 17 6 -1.</_>\n        <_>\n          3 3 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 2 -1.</_>\n        <_>\n          10 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 2 -1.</_>\n        <_>\n          10 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 2 -1.</_>\n        <_>\n          9 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 2 -1.</_>\n        <_>\n          8 10 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 4 -1.</_>\n        <_>\n          9 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 6 -1.</_>\n        <_>\n          10 7 6 3 2.</_>\n        <_>\n          4 10 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          9 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 8 -1.</_>\n        <_>\n          8 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 6 -1.</_>\n        <_>\n          11 0 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 8 -1.</_>\n        <_>\n          8 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 13 -1.</_>\n        <_>\n          14 3 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 6 -1.</_>\n        <_>\n          8 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 13 -1.</_>\n        <_>\n          14 3 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 10 4 -1.</_>\n        <_>\n          0 7 5 2 2.</_>\n        <_>\n          5 9 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 13 -1.</_>\n        <_>\n          14 3 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 13 -1.</_>\n        <_>\n          3 3 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 1 -1.</_>\n        <_>\n          9 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 1 -1.</_>\n        <_>\n          9 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 4 4 -1.</_>\n        <_>\n          12 16 2 2 2.</_>\n        <_>\n          10 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 3 -1.</_>\n        <_>\n          10 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 2 -1.</_>\n        <_>\n          8 5 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 6 -1.</_>\n        <_>\n          6 6 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 12 -1.</_>\n        <_>\n          9 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 8 -1.</_>\n        <_>\n          4 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 8 5 -1.</_>\n        <_>\n          12 2 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 3 -1.</_>\n        <_>\n          0 9 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 5 -1.</_>\n        <_>\n          4 2 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 4 -1.</_>\n        <_>\n          13 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 1 -1.</_>\n        <_>\n          12 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 5 3 -1.</_>\n        <_>\n          7 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 7 6 -1.</_>\n        <_>\n          11 14 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 7 6 -1.</_>\n        <_>\n          2 14 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 2 6 -1.</_>\n        <_>\n          12 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 3 3 -1.</_>\n        <_>\n          8 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 5 -1.</_>\n        <_>\n          12 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 9 -1.</_>\n        <_>\n          8 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 1 -1.</_>\n        <_>\n          12 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 4 -1.</_>\n        <_>\n          8 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 4 2 -1.</_>\n        <_>\n          5 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 6 -1.</_>\n        <_>\n          2 3 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 2 -1.</_>\n        <_>\n          7 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 2 -1.</_>\n        <_>\n          16 8 3 1 2.</_>\n        <_>\n          13 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 6 -1.</_>\n        <_>\n          6 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 4 -1.</_>\n        <_>\n          10 13 10 2 2.</_>\n        <_>\n          0 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 5 -1.</_>\n        <_>\n          9 7 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 2 -1.</_>\n        <_>\n          11 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 2 -1.</_>\n        <_>\n          1 8 3 1 2.</_>\n        <_>\n          4 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 2 -1.</_>\n        <_>\n          10 2 10 1 2.</_>\n        <_>\n          0 3 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 5 3 -1.</_>\n        <_>\n          7 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 6 -1.</_>\n        <_>\n          10 13 3 3 2.</_>\n        <_>\n          7 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 1 6 -1.</_>\n        <_>\n          16 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 1 6 -1.</_>\n        <_>\n          3 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 14 12 -1.</_>\n        <_>\n          11 4 7 6 2.</_>\n        <_>\n          4 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 3 -1.</_>\n        <_>\n          13 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 7 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 3 -1.</_>\n        <_>\n          13 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 4 10 -1.</_>\n        <_>\n          3 1 2 5 2.</_>\n        <_>\n          5 6 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 2 -1.</_>\n        <_>\n          5 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 3 -1.</_>\n        <_>\n          15 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 4 -1.</_>\n        <_>\n          8 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 12 -1.</_>\n        <_>\n          13 10 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 12 -1.</_>\n        <_>\n          4 5 6 6 2.</_>\n        <_>\n          10 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 7 3 -1.</_>\n        <_>\n          7 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 3 -1.</_>\n        <_>\n          3 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 2 -1.</_>\n        <_>\n          10 2 7 1 2.</_>\n        <_>\n          3 3 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 3 10 -1.</_>\n        <_>\n          1 1 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 5 -1.</_>\n        <_>\n          11 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 2 -1.</_>\n        <_>\n          8 7 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 10 -1.</_>\n        <_>\n          7 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 3 -1.</_>\n        <_>\n          7 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 6 -1.</_>\n        <_>\n          16 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 7 6 -1.</_>\n        <_>\n          6 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 17 10 -1.</_>\n        <_>\n          0 9 17 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 15 16 -1.</_>\n        <_>\n          3 12 15 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 4 -1.</_>\n        <_>\n          7 17 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 9 -1.</_>\n        <_>\n          15 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 3 2 -1.</_>\n        <_>\n          2 4 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 7 9 -1.</_>\n        <_>\n          13 9 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 3 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 6 -1.</_>\n        <_>\n          10 2 10 3 2.</_>\n        <_>\n          0 5 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 3 4 -1.</_>\n        <_>\n          13 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 3 4 -1.</_>\n        <_>\n          4 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 3 -1.</_>\n        <_>\n          9 5 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 8 -1.</_>\n        <_>\n          7 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 6 -1.</_>\n        <_>\n          0 14 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 4 6 -1.</_>\n        <_>\n          4 13 2 3 2.</_>\n        <_>\n          6 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          10 0 4 6 2.</_>\n        <_>\n          6 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 2 -1.</_>\n        <_>\n          2 1 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 1 2 -1.</_>\n        <_>\n          3 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 1 -1.</_>\n        <_>\n          8 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 6 -1.</_>\n        <_>\n          17 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 2 -1.</_>\n        <_>\n          8 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 5 3 -1.</_>\n        <_>\n          11 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 5 3 -1.</_>\n        <_>\n          4 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 1 2 -1.</_>\n        <_>\n          19 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 3 -1.</_>\n        <_>\n          5 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 6 -1.</_>\n        <_>\n          17 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 3 6 -1.</_>\n        <_>\n          0 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 5 6 -1.</_>\n        <_>\n          0 6 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 2 -1.</_>\n        <_>\n          12 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 2 -1.</_>\n        <_>\n          6 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 6 -1.</_>\n        <_>\n          8 3 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 6 -1.</_>\n        <_>\n          0 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 7 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 15 -1.</_>\n        <_>\n          16 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 3 2 -1.</_>\n        <_>\n          1 11 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 1 10 -1.</_>\n        <_>\n          14 9 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 12 -1.</_>\n        <_>\n          2 1 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 2 -1.</_>\n        <_>\n          11 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 2 -1.</_>\n        <_>\n          7 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 15 5 -1.</_>\n        <_>\n          8 8 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 10 -1.</_>\n        <_>\n          3 0 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 2 -1.</_>\n        <_>\n          12 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 8 -1.</_>\n        <_>\n          8 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 5 3 -1.</_>\n        <_>\n          8 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 4 3 -1.</_>\n        <_>\n          7 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 2 -1.</_>\n        <_>\n          12 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 4 -1.</_>\n        <_>\n          3 15 7 2 2.</_>\n        <_>\n          10 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 4 -1.</_>\n        <_>\n          10 2 8 2 2.</_>\n        <_>\n          2 4 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 12 -1.</_>\n        <_>\n          3 8 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 2 -1.</_>\n        <_>\n          5 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 5 -1.</_>\n        <_>\n          10 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 2 -1.</_>\n        <_>\n          0 14 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 4 -1.</_>\n        <_>\n          1 7 3 2 2.</_>\n        <_>\n          4 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 1 12 -1.</_>\n        <_>\n          12 12 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          10 5 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 3 -1.</_>\n        <_>\n          14 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 3 -1.</_>\n        <_>\n          4 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 3 -1.</_>\n        <_>\n          8 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 2 4 -1.</_>\n        <_>\n          5 2 1 2 2.</_>\n        <_>\n          6 4 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 11 3 -1.</_>\n        <_>\n          5 6 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 12 -1.</_>\n        <_>\n          7 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 8 5 -1.</_>\n        <_>\n          12 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 1 12 -1.</_>\n        <_>\n          7 12 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 3 -1.</_>\n        <_>\n          4 2 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 10 -1.</_>\n        <_>\n          12 5 3 5 2.</_>\n        <_>\n          9 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 12 -1.</_>\n        <_>\n          5 5 4 6 2.</_>\n        <_>\n          9 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 6 -1.</_>\n        <_>\n          0 9 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 2 -1.</_>\n        <_>\n          4 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 12 2 -1.</_>\n        <_>\n          8 18 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 16 -1.</_>\n        <_>\n          7 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 7 8 -1.</_>\n        <_>\n          7 10 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 1 -1.</_>\n        <_>\n          7 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 4 -1.</_>\n        <_>\n          11 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 8 -1.</_>\n        <_>\n          3 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 12 -1.</_>\n        <_>\n          7 7 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 2 -1.</_>\n        <_>\n          6 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 6 -1.</_>\n        <_>\n          16 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 5 2 -1.</_>\n        <_>\n          3 4 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 4 2 -1.</_>\n        <_>\n          2 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 6 -1.</_>\n        <_>\n          10 13 3 3 2.</_>\n        <_>\n          7 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 4 -1.</_>\n        <_>\n          8 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 6 -1.</_>\n        <_>\n          0 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 3 -1.</_>\n        <_>\n          9 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 14 -1.</_>\n        <_>\n          9 6 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 4 -1.</_>\n        <_>\n          6 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 7 6 -1.</_>\n        <_>\n          10 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 2 -1.</_>\n        <_>\n          1 1 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 1 -1.</_>\n        <_>\n          6 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 10 -1.</_>\n        <_>\n          0 8 20 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 15 1 2 -1.</_>\n        <_>\n          19 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 8 -1.</_>\n        <_>\n          2 2 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 4 -1.</_>\n        <_>\n          11 1 9 2 2.</_>\n        <_>\n          2 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 1 2 -1.</_>\n        <_>\n          8 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 6 -1.</_>\n        <_>\n          10 2 5 3 2.</_>\n        <_>\n          5 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 4 -1.</_>\n        <_>\n          10 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 8 -1.</_>\n        <_>\n          8 5 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 4 3 -1.</_>\n        <_>\n          15 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 1 -1.</_>\n        <_>\n          9 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 4 3 -1.</_>\n        <_>\n          9 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 4 3 -1.</_>\n        <_>\n          7 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 15 1 2 -1.</_>\n        <_>\n          19 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 8 4 -1.</_>\n        <_>\n          0 17 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 4 -1.</_>\n        <_>\n          11 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 6 -1.</_>\n        <_>\n          3 16 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 6 -1.</_>\n        <_>\n          6 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 6 -1.</_>\n        <_>\n          5 14 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 3 4 -1.</_>\n        <_>\n          4 10 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 2 -1.</_>\n        <_>\n          13 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 4 -1.</_>\n        <_>\n          7 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 2 3 -1.</_>\n        <_>\n          2 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 12 -1.</_>\n        <_>\n          9 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 4 6 -1.</_>\n        <_>\n          3 14 2 3 2.</_>\n        <_>\n          5 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 2 2 -1.</_>\n        <_>\n          2 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 3 -1.</_>\n        <_>\n          8 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 1 -1.</_>\n        <_>\n          10 7 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 3 -1.</_>\n        <_>\n          7 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 2 -1.</_>\n        <_>\n          9 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 5 -1.</_>\n        <_>\n          10 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 5 -1.</_>\n        <_>\n          12 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 6 -1.</_>\n        <_>\n          7 2 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 6 5 -1.</_>\n        <_>\n          14 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 2 -1.</_>\n        <_>\n          9 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 1 3 -1.</_>\n        <_>\n          10 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 2 -1.</_>\n        <_>\n          6 6 1 1 2.</_>\n        <_>\n          7 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 4 -1.</_>\n        <_>\n          11 11 9 2 2.</_>\n        <_>\n          2 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 2 -1.</_>\n        <_>\n          6 6 1 1 2.</_>\n        <_>\n          7 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 2 -1.</_>\n        <_>\n          0 16 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 2 3 -1.</_>\n        <_>\n          4 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 3 -1.</_>\n        <_>\n          8 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 3 -1.</_>\n        <_>\n          9 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 4 -1.</_>\n        <_>\n          5 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 4 -1.</_>\n        <_>\n          12 7 3 2 2.</_>\n        <_>\n          9 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 6 -1.</_>\n        <_>\n          4 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 4 4 -1.</_>\n        <_>\n          13 15 2 2 2.</_>\n        <_>\n          11 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 2 -1.</_>\n        <_>\n          7 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 3 -1.</_>\n        <_>\n          13 1 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 4 4 -1.</_>\n        <_>\n          5 15 2 2 2.</_>\n        <_>\n          7 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 7 -1.</_>\n        <_>\n          9 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 3 -1.</_>\n        <_>\n          9 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 5 3 -1.</_>\n        <_>\n          7 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 3 -1.</_>\n        <_>\n          11 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 10 -1.</_>\n        <_>\n          6 14 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 6 2 -1.</_>\n        <_>\n          10 11 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 6 2 -1.</_>\n        <_>\n          7 11 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 1 -1.</_>\n        <_>\n          11 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 2 -1.</_>\n        <_>\n          7 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 5 -1.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 2 12 -1.</_>\n        <_>\n          7 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 3 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 3 -1.</_>\n        <_>\n          5 1 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 6 -1.</_>\n        <_>\n          18 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 6 -1.</_>\n        <_>\n          0 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 4 3 -1.</_>\n        <_>\n          7 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 6 -1.</_>\n        <_>\n          18 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 6 -1.</_>\n        <_>\n          0 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 3 -1.</_>\n        <_>\n          8 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 4 -1.</_>\n        <_>\n          8 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 6 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 2 -1.</_>\n        <_>\n          7 4 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 4 -1.</_>\n        <_>\n          10 14 7 2 2.</_>\n        <_>\n          3 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 6 2 -1.</_>\n        <_>\n          6 15 3 1 2.</_>\n        <_>\n          9 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 2 -1.</_>\n        <_>\n          14 16 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 12 8 -1.</_>\n        <_>\n          2 16 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 7 2 -1.</_>\n        <_>\n          7 8 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 2 -1.</_>\n        <_>\n          0 3 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 5 -1.</_>\n        <_>\n          9 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 8 -1.</_>\n        <_>\n          8 5 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 4 -1.</_>\n        <_>\n          10 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 3 2 -1.</_>\n        <_>\n          4 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 3 -1.</_>\n        <_>\n          11 4 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 3 -1.</_>\n        <_>\n          7 4 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 5 2 -1.</_>\n        <_>\n          14 12 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 9 -1.</_>\n        <_>\n          3 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 13 -1.</_>\n        <_>\n          14 6 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 8 -1.</_>\n        <_>\n          3 6 7 4 2.</_>\n        <_>\n          10 10 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 11 -1.</_>\n        <_>\n          16 0 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 12 12 -1.</_>\n        <_>\n          3 4 6 6 2.</_>\n        <_>\n          9 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 5 3 -1.</_>\n        <_>\n          11 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 4 2 -1.</_>\n        <_>\n          4 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 2 -1.</_>\n        <_>\n          9 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 3 -1.</_>\n        <_>\n          5 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 3 -1.</_>\n        <_>\n          11 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 2 -1.</_>\n        <_>\n          5 6 3 1 2.</_>\n        <_>\n          8 7 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 4 3 -1.</_>\n        <_>\n          12 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 2 -1.</_>\n        <_>\n          3 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 2 -1.</_>\n        <_>\n          9 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 16 4 -1.</_>\n        <_>\n          1 11 8 2 2.</_>\n        <_>\n          9 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 5 3 -1.</_>\n        <_>\n          4 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 4 3 -1.</_>\n        <_>\n          12 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 2 -1.</_>\n        <_>\n          9 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 2 -1.</_>\n        <_>\n          8 10 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 3 -1.</_>\n        <_>\n          2 13 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 3 2 -1.</_>\n        <_>\n          16 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 18 2 -1.</_>\n        <_>\n          7 18 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 3 2 -1.</_>\n        <_>\n          16 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 3 2 -1.</_>\n        <_>\n          1 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          7 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 8 3 -1.</_>\n        <_>\n          5 15 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 14 -1.</_>\n        <_>\n          10 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 14 -1.</_>\n        <_>\n          8 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 3 -1.</_>\n        <_>\n          13 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 1 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          9 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 3 -1.</_>\n        <_>\n          8 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 18 -1.</_>\n        <_>\n          4 9 16 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 14 -1.</_>\n        <_>\n          1 8 16 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 15 4 -1.</_>\n        <_>\n          8 9 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 7 3 -1.</_>\n        <_>\n          6 13 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 2 3 -1.</_>\n        <_>\n          14 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 16 14 -1.</_>\n        <_>\n          2 3 8 7 2.</_>\n        <_>\n          10 10 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 18 -1.</_>\n        <_>\n          18 2 2 9 2.</_>\n        <_>\n          16 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 2 3 -1.</_>\n        <_>\n          4 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 18 -1.</_>\n        <_>\n          18 2 2 9 2.</_>\n        <_>\n          16 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 3 -1.</_>\n        <_>\n          1 2 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 3 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 5 9 -1.</_>\n        <_>\n          5 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 11 -1.</_>\n        <_>\n          16 0 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 1 -1.</_>\n        <_>\n          9 0 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 7 -1.</_>\n        <_>\n          17 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 3 7 -1.</_>\n        <_>\n          2 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 12 -1.</_>\n        <_>\n          7 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 11 -1.</_>\n        <_>\n          2 0 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 20 -1.</_>\n        <_>\n          14 0 3 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 2 -1.</_>\n        <_>\n          0 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 8 -1.</_>\n        <_>\n          10 5 5 4 2.</_>\n        <_>\n          5 9 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 4 -1.</_>\n        <_>\n          4 7 6 2 2.</_>\n        <_>\n          10 9 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 4 -1.</_>\n        <_>\n          5 1 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 4 -1.</_>\n        <_>\n          12 7 3 2 2.</_>\n        <_>\n          9 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 6 -1.</_>\n        <_>\n          5 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 4 -1.</_>\n        <_>\n          12 16 3 2 2.</_>\n        <_>\n          9 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 12 -1.</_>\n        <_>\n          9 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 18 -1.</_>\n        <_>\n          9 1 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 2 -1.</_>\n        <_>\n          8 12 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 2 -1.</_>\n        <_>\n          8 9 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 6 -1.</_>\n        <_>\n          9 0 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 3 2 -1.</_>\n        <_>\n          11 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 17 4 -1.</_>\n        <_>\n          1 3 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 12 -1.</_>\n        <_>\n          11 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 2 17 -1.</_>\n        <_>\n          12 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 1 -1.</_>\n        <_>\n          6 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 3 -1.</_>\n        <_>\n          18 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 4 -1.</_>\n        <_>\n          8 6 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 10 -1.</_>\n        <_>\n          4 10 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 4 2 -1.</_>\n        <_>\n          7 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 6 -1.</_>\n        <_>\n          17 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 6 -1.</_>\n        <_>\n          9 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 6 -1.</_>\n        <_>\n          17 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 4 -1.</_>\n        <_>\n          9 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 3 -1.</_>\n        <_>\n          0 13 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 3 -1.</_>\n        <_>\n          3 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 7 -1.</_>\n        <_>\n          9 6 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 6 -1.</_>\n        <_>\n          0 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 1 3 -1.</_>\n        <_>\n          14 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 14 -1.</_>\n        <_>\n          3 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 5 6 -1.</_>\n        <_>\n          12 16 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 5 6 -1.</_>\n        <_>\n          4 16 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 2 -1.</_>\n        <_>\n          12 10 1 1 2.</_>\n        <_>\n          11 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 14 -1.</_>\n        <_>\n          6 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 2 3 -1.</_>\n        <_>\n          10 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 3 -1.</_>\n        <_>\n          0 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 6 -1.</_>\n        <_>\n          5 14 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 9 -1.</_>\n        <_>\n          6 14 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 2 -1.</_>\n        <_>\n          12 10 1 1 2.</_>\n        <_>\n          11 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 1 3 -1.</_>\n        <_>\n          5 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 13 3 -1.</_>\n        <_>\n          4 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 15 6 -1.</_>\n        <_>\n          6 7 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          8 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 3 -1.</_>\n        <_>\n          8 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 1 3 -1.</_>\n        <_>\n          15 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 5 3 -1.</_>\n        <_>\n          1 12 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 7 12 -1.</_>\n        <_>\n          7 7 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 10 -1.</_>\n        <_>\n          0 1 3 5 2.</_>\n        <_>\n          3 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 3 -1.</_>\n        <_>\n          16 2 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          5 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 3 5 -1.</_>\n        <_>\n          13 2 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 6 -1.</_>\n        <_>\n          0 5 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 1 -1.</_>\n        <_>\n          9 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 2 -1.</_>\n        <_>\n          12 10 1 1 2.</_>\n        <_>\n          11 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 2 -1.</_>\n        <_>\n          7 10 1 1 2.</_>\n        <_>\n          8 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 4 -1.</_>\n        <_>\n          11 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 8 -1.</_>\n        <_>\n          9 12 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 3 -1.</_>\n        <_>\n          13 1 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 4 -1.</_>\n        <_>\n          9 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 10 -1.</_>\n        <_>\n          10 7 5 5 2.</_>\n        <_>\n          5 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 8 2 -1.</_>\n        <_>\n          3 18 4 1 2.</_>\n        <_>\n          7 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 8 -1.</_>\n        <_>\n          12 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 8 -1.</_>\n        <_>\n          6 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 7 -1.</_>\n        <_>\n          12 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 1 -1.</_>\n        <_>\n          8 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 1 3 -1.</_>\n        <_>\n          15 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 2 -1.</_>\n        <_>\n          7 15 1 1 2.</_>\n        <_>\n          8 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 1 3 -1.</_>\n        <_>\n          15 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 7 -1.</_>\n        <_>\n          7 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 7 -1.</_>\n        <_>\n          18 1 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 8 20 -1.</_>\n        <_>\n          2 10 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 6 -1.</_>\n        <_>\n          3 2 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 2 -1.</_>\n        <_>\n          4 4 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 5 -1.</_>\n        <_>\n          16 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 4 -1.</_>\n        <_>\n          8 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 5 -1.</_>\n        <_>\n          16 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 13 -1.</_>\n        <_>\n          3 7 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 5 -1.</_>\n        <_>\n          16 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 5 -1.</_>\n        <_>\n          2 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 3 6 -1.</_>\n        <_>\n          14 14 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 6 -1.</_>\n        <_>\n          3 14 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 3 -1.</_>\n        <_>\n          16 2 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 10 -1.</_>\n        <_>\n          8 7 1 5 2.</_>\n        <_>\n          9 12 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 4 -1.</_>\n        <_>\n          11 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 3 -1.</_>\n        <_>\n          0 2 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 3 -1.</_>\n        <_>\n          13 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 3 5 -1.</_>\n        <_>\n          8 15 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 5 -1.</_>\n        <_>\n          10 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 14 -1.</_>\n        <_>\n          10 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 5 6 -1.</_>\n        <_>\n          0 7 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 4 -1.</_>\n        <_>\n          9 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 10 -1.</_>\n        <_>\n          6 0 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 14 -1.</_>\n        <_>\n          10 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 14 -1.</_>\n        <_>\n          8 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 3 -1.</_>\n        <_>\n          13 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 2 3 -1.</_>\n        <_>\n          6 1 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 18 -1.</_>\n        <_>\n          19 1 1 9 2.</_>\n        <_>\n          18 10 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 3 -1.</_>\n        <_>\n          2 2 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 18 -1.</_>\n        <_>\n          19 1 1 9 2.</_>\n        <_>\n          18 10 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 4 6 -1.</_>\n        <_>\n          1 14 2 3 2.</_>\n        <_>\n          3 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 7 6 -1.</_>\n        <_>\n          10 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          0 10 3 5 2.</_>\n        <_>\n          3 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 4 -1.</_>\n        <_>\n          12 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 5 6 -1.</_>\n        <_>\n          5 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 1 8 -1.</_>\n        <_>\n          14 10 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 6 -1.</_>\n        <_>\n          1 7 9 3 2.</_>\n        <_>\n          10 10 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          9 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 5 -1.</_>\n        <_>\n          7 9 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 3 -1.</_>\n        <_>\n          9 6 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 4 -1.</_>\n        <_>\n          7 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 19 9 -1.</_>\n        <_>\n          1 3 19 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 6 -1.</_>\n        <_>\n          3 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 4 4 -1.</_>\n        <_>\n          15 7 2 2 2.</_>\n        <_>\n          13 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 4 4 -1.</_>\n        <_>\n          3 7 2 2 2.</_>\n        <_>\n          5 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 10 8 -1.</_>\n        <_>\n          9 10 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 12 -1.</_>\n        <_>\n          3 14 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 10 12 -1.</_>\n        <_>\n          11 5 5 6 2.</_>\n        <_>\n          6 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 5 -1.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 4 -1.</_>\n        <_>\n          9 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 5 -1.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 5 -1.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 1 -1.</_>\n        <_>\n          13 2 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 1 -1.</_>\n        <_>\n          5 2 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 3 -1.</_>\n        <_>\n          13 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 1 4 -1.</_>\n        <_>\n          0 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 3 -1.</_>\n        <_>\n          13 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          9 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 9 2 -1.</_>\n        <_>\n          6 16 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 4 -1.</_>\n        <_>\n          18 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          5 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 3 2 -1.</_>\n        <_>\n          15 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 9 -1.</_>\n        <_>\n          0 3 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          9 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          8 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          9 5 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 4 -1.</_>\n        <_>\n          9 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 12 -1.</_>\n        <_>\n          11 6 4 6 2.</_>\n        <_>\n          7 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 12 -1.</_>\n        <_>\n          5 6 4 6 2.</_>\n        <_>\n          9 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 3 2 -1.</_>\n        <_>\n          2 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 6 -1.</_>\n        <_>\n          2 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 6 3 -1.</_>\n        <_>\n          6 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 5 3 -1.</_>\n        <_>\n          14 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 5 3 -1.</_>\n        <_>\n          14 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 2 -1.</_>\n        <_>\n          7 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 5 3 -1.</_>\n        <_>\n          1 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          10 13 2 3 2.</_>\n        <_>\n          8 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 3 -1.</_>\n        <_>\n          8 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 5 4 -1.</_>\n        <_>\n          12 2 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 2 -1.</_>\n        <_>\n          0 2 10 1 2.</_>\n        <_>\n          10 3 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 1 -1.</_>\n        <_>\n          6 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 13 2 -1.</_>\n        <_>\n          4 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 6 -1.</_>\n        <_>\n          2 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 8 -1.</_>\n        <_>\n          17 12 3 4 2.</_>\n        <_>\n          14 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 10 6 -1.</_>\n        <_>\n          4 13 5 3 2.</_>\n        <_>\n          9 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 1 2 -1.</_>\n        <_>\n          14 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 2 -1.</_>\n        <_>\n          14 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 2 -1.</_>\n        <_>\n          4 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 9 2 -1.</_>\n        <_>\n          8 13 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 6 -1.</_>\n        <_>\n          11 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 12 -1.</_>\n        <_>\n          5 12 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 6 -1.</_>\n        <_>\n          11 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 6 -1.</_>\n        <_>\n          6 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 11 3 -1.</_>\n        <_>\n          5 5 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 5 10 -1.</_>\n        <_>\n          7 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 18 2 -1.</_>\n        <_>\n          2 9 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 5 3 -1.</_>\n        <_>\n          7 18 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 1 -1.</_>\n        <_>\n          9 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 6 6 -1.</_>\n        <_>\n          0 14 3 3 2.</_>\n        <_>\n          3 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 1 -1.</_>\n        <_>\n          9 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 12 1 -1.</_>\n        <_>\n          7 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 7 -1.</_>\n        <_>\n          14 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 2 -1.</_>\n        <_>\n          1 1 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 10 9 -1.</_>\n        <_>\n          10 12 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 2 -1.</_>\n        <_>\n          5 1 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 2 3 -1.</_>\n        <_>\n          17 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 2 3 -1.</_>\n        <_>\n          1 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 6 -1.</_>\n        <_>\n          10 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 3 -1.</_>\n        <_>\n          8 5 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 6 -1.</_>\n        <_>\n          9 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 12 12 -1.</_>\n        <_>\n          3 4 6 6 2.</_>\n        <_>\n          9 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 15 -1.</_>\n        <_>\n          11 2 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 17 -1.</_>\n        <_>\n          4 2 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 7 -1.</_>\n        <_>\n          14 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 7 -1.</_>\n        <_>\n          3 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 15 -1.</_>\n        <_>\n          11 2 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 15 -1.</_>\n        <_>\n          7 2 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 3 6 -1.</_>\n        <_>\n          17 11 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 6 -1.</_>\n        <_>\n          8 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 6 -1.</_>\n        <_>\n          10 10 9 3 2.</_>\n        <_>\n          1 13 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 9 -1.</_>\n        <_>\n          0 12 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 4 -1.</_>\n        <_>\n          5 14 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 16 12 -1.</_>\n        <_>\n          3 9 16 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 12 -1.</_>\n        <_>\n          1 1 6 6 2.</_>\n        <_>\n          7 7 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 2 4 -1.</_>\n        <_>\n          11 4 1 2 2.</_>\n        <_>\n          10 6 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 2 -1.</_>\n        <_>\n          0 9 5 1 2.</_>\n        <_>\n          5 10 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 3 -1.</_>\n        <_>\n          9 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 9 2 -1.</_>\n        <_>\n          3 13 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 13 6 -1.</_>\n        <_>\n          3 6 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 4 -1.</_>\n        <_>\n          12 7 3 2 2.</_>\n        <_>\n          9 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 8 -1.</_>\n        <_>\n          4 0 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 12 -1.</_>\n        <_>\n          9 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 10 -1.</_>\n        <_>\n          4 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 8 3 -1.</_>\n        <_>\n          6 18 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 6 -1.</_>\n        <_>\n          0 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 3 2 -1.</_>\n        <_>\n          13 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 5 -1.</_>\n        <_>\n          9 5 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 3 6 -1.</_>\n        <_>\n          12 16 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 8 2 -1.</_>\n        <_>\n          1 12 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 6 -1.</_>\n        <_>\n          0 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 3 2 -1.</_>\n        <_>\n          13 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 4 6 -1.</_>\n        <_>\n          4 14 2 3 2.</_>\n        <_>\n          6 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 3 2 -1.</_>\n        <_>\n          13 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 8 -1.</_>\n        <_>\n          17 0 3 4 2.</_>\n        <_>\n          14 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 3 2 -1.</_>\n        <_>\n          8 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          6 0 4 6 2.</_>\n        <_>\n          10 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 10 -1.</_>\n        <_>\n          15 0 1 5 2.</_>\n        <_>\n          14 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 8 6 -1.</_>\n        <_>\n          5 3 4 3 2.</_>\n        <_>\n          9 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 1 2 -1.</_>\n        <_>\n          9 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 4 3 -1.</_>\n        <_>\n          15 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 2 3 -1.</_>\n        <_>\n          8 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 4 -1.</_>\n        <_>\n          10 13 7 2 2.</_>\n        <_>\n          3 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 4 3 -1.</_>\n        <_>\n          1 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 1 -1.</_>\n        <_>\n          11 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 16 15 -1.</_>\n        <_>\n          3 10 16 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 2 -1.</_>\n        <_>\n          8 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 10 -1.</_>\n        <_>\n          10 4 6 5 2.</_>\n        <_>\n          4 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 4 -1.</_>\n        <_>\n          9 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          10 12 2 4 2.</_>\n        <_>\n          8 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 3 2 -1.</_>\n        <_>\n          13 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 3 2 -1.</_>\n        <_>\n          8 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 14 -1.</_>\n        <_>\n          9 0 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 3 -1.</_>\n        <_>\n          10 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 3 -1.</_>\n        <_>\n          10 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 6 -1.</_>\n        <_>\n          0 11 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 2 -1.</_>\n        <_>\n          6 1 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 7 3 -1.</_>\n        <_>\n          6 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 8 9 -1.</_>\n        <_>\n          8 13 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 2 -1.</_>\n        <_>\n          6 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 8 -1.</_>\n        <_>\n          17 1 3 4 2.</_>\n        <_>\n          14 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 8 -1.</_>\n        <_>\n          0 1 3 4 2.</_>\n        <_>\n          3 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 6 -1.</_>\n        <_>\n          10 2 9 3 2.</_>\n        <_>\n          1 5 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 1 -1.</_>\n        <_>\n          10 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 6 -1.</_>\n        <_>\n          15 2 2 3 2.</_>\n        <_>\n          13 5 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 1 3 -1.</_>\n        <_>\n          13 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 5 3 -1.</_>\n        <_>\n          2 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 6 -1.</_>\n        <_>\n          15 2 2 3 2.</_>\n        <_>\n          13 5 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 6 -1.</_>\n        <_>\n          3 2 2 3 2.</_>\n        <_>\n          5 5 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 1 2 -1.</_>\n        <_>\n          13 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 2 -1.</_>\n        <_>\n          5 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 2 -1.</_>\n        <_>\n          13 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 2 -1.</_>\n        <_>\n          6 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 3 2 -1.</_>\n        <_>\n          13 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 4 4 -1.</_>\n        <_>\n          6 16 2 2 2.</_>\n        <_>\n          8 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 3 -1.</_>\n        <_>\n          9 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 9 6 -1.</_>\n        <_>\n          0 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 6 -1.</_>\n        <_>\n          9 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 2 3 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 6 -1.</_>\n        <_>\n          1 12 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 2 -1.</_>\n        <_>\n          8 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 2 -1.</_>\n        <_>\n          7 10 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 2 3 -1.</_>\n        <_>\n          8 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 4 -1.</_>\n        <_>\n          18 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 18 1 -1.</_>\n        <_>\n          7 19 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 2 -1.</_>\n        <_>\n          10 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 1 6 -1.</_>\n        <_>\n          1 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 8 3 -1.</_>\n        <_>\n          12 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 4 -1.</_>\n        <_>\n          1 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 2 -1.</_>\n        <_>\n          7 11 1 1 2.</_>\n        <_>\n          8 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 2 5 -1.</_>\n        <_>\n          11 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 2 5 -1.</_>\n        <_>\n          8 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 3 -1.</_>\n        <_>\n          15 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 3 -1.</_>\n        <_>\n          5 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 15 1 -1.</_>\n        <_>\n          9 19 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 15 1 -1.</_>\n        <_>\n          6 19 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 3 -1.</_>\n        <_>\n          15 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 15 -1.</_>\n        <_>\n          7 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 5 -1.</_>\n        <_>\n          9 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 7 -1.</_>\n        <_>\n          10 5 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 3 -1.</_>\n        <_>\n          16 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 3 3 -1.</_>\n        <_>\n          1 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 7 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 6 2 -1.</_>\n        <_>\n          0 16 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 6 -1.</_>\n        <_>\n          7 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 4 -1.</_>\n        <_>\n          7 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 4 10 -1.</_>\n        <_>\n          16 10 2 5 2.</_>\n        <_>\n          14 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 2 -1.</_>\n        <_>\n          4 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 2 -1.</_>\n        <_>\n          11 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 4 10 -1.</_>\n        <_>\n          2 10 2 5 2.</_>\n        <_>\n          4 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 6 -1.</_>\n        <_>\n          10 13 10 3 2.</_>\n        <_>\n          0 16 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 2 15 -1.</_>\n        <_>\n          1 5 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 4 -1.</_>\n        <_>\n          10 7 9 2 2.</_>\n        <_>\n          1 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 17 -1.</_>\n        <_>\n          1 0 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 6 -1.</_>\n        <_>\n          10 6 8 3 2.</_>\n        <_>\n          2 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 1 3 -1.</_>\n        <_>\n          8 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 2 -1.</_>\n        <_>\n          8 16 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 2 -1.</_>\n        <_>\n          5 2 4 1 2.</_>\n        <_>\n          9 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 6 -1.</_>\n        <_>\n          6 14 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 2 -1.</_>\n        <_>\n          9 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 6 -1.</_>\n        <_>\n          18 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 2 -1.</_>\n        <_>\n          9 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 6 -1.</_>\n        <_>\n          18 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 1 3 -1.</_>\n        <_>\n          9 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 6 -1.</_>\n        <_>\n          18 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 6 -1.</_>\n        <_>\n          0 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          9 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 3 -1.</_>\n        <_>\n          3 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 4 3 -1.</_>\n        <_>\n          13 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 6 -1.</_>\n        <_>\n          5 4 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 3 -1.</_>\n        <_>\n          3 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 15 5 -1.</_>\n        <_>\n          8 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 2 -1.</_>\n        <_>\n          7 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 3 9 -1.</_>\n        <_>\n          11 3 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 6 -1.</_>\n        <_>\n          10 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 3 -1.</_>\n        <_>\n          9 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 9 -1.</_>\n        <_>\n          2 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 3 5 -1.</_>\n        <_>\n          10 13 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 3 -1.</_>\n        <_>\n          9 7 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 5 -1.</_>\n        <_>\n          10 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 2 -1.</_>\n        <_>\n          9 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 2 -1.</_>\n        <_>\n          9 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          10 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 1 -1.</_>\n        <_>\n          11 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 11 15 -1.</_>\n        <_>\n          0 6 11 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 6 -1.</_>\n        <_>\n          7 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 1 -1.</_>\n        <_>\n          9 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 6 4 -1.</_>\n        <_>\n          5 16 3 2 2.</_>\n        <_>\n          8 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 8 -1.</_>\n        <_>\n          6 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 6 -1.</_>\n        <_>\n          5 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 10 -1.</_>\n        <_>\n          11 6 4 5 2.</_>\n        <_>\n          7 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 10 -1.</_>\n        <_>\n          5 6 4 5 2.</_>\n        <_>\n          9 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 2 -1.</_>\n        <_>\n          9 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 8 2 -1.</_>\n        <_>\n          5 13 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 8 2 -1.</_>\n        <_>\n          10 3 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 10 -1.</_>\n        <_>\n          4 0 1 5 2.</_>\n        <_>\n          5 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 2 -1.</_>\n        <_>\n          9 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 15 3 -1.</_>\n        <_>\n          2 9 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 2 -1.</_>\n        <_>\n          8 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 6 -1.</_>\n        <_>\n          17 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 3 4 -1.</_>\n        <_>\n          2 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 4 6 -1.</_>\n        <_>\n          14 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 3 8 -1.</_>\n        <_>\n          2 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          8 16 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 2 2 -1.</_>\n        <_>\n          3 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 4 6 -1.</_>\n        <_>\n          14 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 4 6 -1.</_>\n        <_>\n          2 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 6 -1.</_>\n        <_>\n          10 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 6 -1.</_>\n        <_>\n          8 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 6 -1.</_>\n        <_>\n          12 2 1 3 2.</_>\n        <_>\n          11 5 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 5 -1.</_>\n        <_>\n          8 6 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 3 6 -1.</_>\n        <_>\n          17 3 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 2 -1.</_>\n        <_>\n          10 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          9 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 5 2 -1.</_>\n        <_>\n          12 4 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 5 12 -1.</_>\n        <_>\n          7 7 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 2 -1.</_>\n        <_>\n          4 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 2 -1.</_>\n        <_>\n          13 14 2 1 2.</_>\n        <_>\n          11 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 6 -1.</_>\n        <_>\n          0 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 1 3 -1.</_>\n        <_>\n          5 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 1 -1.</_>\n        <_>\n          10 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 1 -1.</_>\n        <_>\n          7 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 3 -1.</_>\n        <_>\n          9 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 1 3 -1.</_>\n        <_>\n          4 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 3 -1.</_>\n        <_>\n          12 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 3 -1.</_>\n        <_>\n          4 6 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 3 -1.</_>\n        <_>\n          9 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 3 -1.</_>\n        <_>\n          5 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 17 -1.</_>\n        <_>\n          9 0 3 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 1 3 -1.</_>\n        <_>\n          9 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 15 -1.</_>\n        <_>\n          9 10 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 2 3 -1.</_>\n        <_>\n          8 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 3 -1.</_>\n        <_>\n          10 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 5 -1.</_>\n        <_>\n          9 1 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 2 -1.</_>\n        <_>\n          0 0 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 5 3 -1.</_>\n        <_>\n          2 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 9 15 -1.</_>\n        <_>\n          2 10 9 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 10 -1.</_>\n        <_>\n          11 0 6 5 2.</_>\n        <_>\n          5 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 2 3 -1.</_>\n        <_>\n          6 1 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 1 -1.</_>\n        <_>\n          12 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 2 10 -1.</_>\n        <_>\n          3 1 1 5 2.</_>\n        <_>\n          4 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 1 -1.</_>\n        <_>\n          13 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 4 6 -1.</_>\n        <_>\n          4 15 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 1 -1.</_>\n        <_>\n          13 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 1 -1.</_>\n        <_>\n          6 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 4 -1.</_>\n        <_>\n          11 12 9 2 2.</_>\n        <_>\n          2 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 2 -1.</_>\n        <_>\n          5 7 1 1 2.</_>\n        <_>\n          6 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 2 -1.</_>\n        <_>\n          16 4 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 18 -1.</_>\n        <_>\n          0 2 1 9 2.</_>\n        <_>\n          1 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 4 -1.</_>\n        <_>\n          10 2 9 2 2.</_>\n        <_>\n          1 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 1 3 -1.</_>\n        <_>\n          9 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 4 -1.</_>\n        <_>\n          11 12 9 2 2.</_>\n        <_>\n          2 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 18 4 -1.</_>\n        <_>\n          0 12 9 2 2.</_>\n        <_>\n          9 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 5 3 -1.</_>\n        <_>\n          11 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 7 3 -1.</_>\n        <_>\n          6 5 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 3 3 -1.</_>\n        <_>\n          13 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 4 -1.</_>\n        <_>\n          9 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 2 4 -1.</_>\n        <_>\n          11 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 9 3 -1.</_>\n        <_>\n          3 17 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 8 -1.</_>\n        <_>\n          12 0 1 4 2.</_>\n        <_>\n          11 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 12 -1.</_>\n        <_>\n          0 8 3 6 2.</_>\n        <_>\n          3 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 12 -1.</_>\n        <_>\n          10 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 8 14 -1.</_>\n        <_>\n          5 10 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 1 -1.</_>\n        <_>\n          14 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 10 4 -1.</_>\n        <_>\n          0 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 5 8 -1.</_>\n        <_>\n          10 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 8 -1.</_>\n        <_>\n          8 1 2 4 2.</_>\n        <_>\n          10 5 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 1 -1.</_>\n        <_>\n          11 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 4 -1.</_>\n        <_>\n          9 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 6 -1.</_>\n        <_>\n          18 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 4 -1.</_>\n        <_>\n          9 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 1 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 3 6 -1.</_>\n        <_>\n          12 13 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 10 -1.</_>\n        <_>\n          10 4 9 5 2.</_>\n        <_>\n          1 9 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 9 -1.</_>\n        <_>\n          8 9 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 3 -1.</_>\n        <_>\n          8 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 4 3 -1.</_>\n        <_>\n          14 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 3 10 -1.</_>\n        <_>\n          6 10 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 1 6 -1.</_>\n        <_>\n          0 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 1 3 -1.</_>\n        <_>\n          10 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 4 3 -1.</_>\n        <_>\n          2 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 8 -1.</_>\n        <_>\n          19 3 1 4 2.</_>\n        <_>\n          18 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 8 -1.</_>\n        <_>\n          0 3 1 4 2.</_>\n        <_>\n          1 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 10 -1.</_>\n        <_>\n          10 7 7 5 2.</_>\n        <_>\n          3 12 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 19 3 -1.</_>\n        <_>\n          0 8 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 3 -1.</_>\n        <_>\n          12 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 1 3 -1.</_>\n        <_>\n          0 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 3 -1.</_>\n        <_>\n          12 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 3 -1.</_>\n        <_>\n          5 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 2 -1.</_>\n        <_>\n          8 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 12 -1.</_>\n        <_>\n          8 3 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 3 -1.</_>\n        <_>\n          13 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 4 -1.</_>\n        <_>\n          0 12 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 17 14 -1.</_>\n        <_>\n          2 7 17 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 10 -1.</_>\n        <_>\n          0 0 3 5 2.</_>\n        <_>\n          3 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 4 -1.</_>\n        <_>\n          14 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 4 -1.</_>\n        <_>\n          3 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 7 2 -1.</_>\n        <_>\n          13 3 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 7 2 -1.</_>\n        <_>\n          0 3 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 14 2 -1.</_>\n        <_>\n          13 11 7 1 2.</_>\n        <_>\n          6 12 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 2 -1.</_>\n        <_>\n          8 5 1 1 2.</_>\n        <_>\n          9 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 3 -1.</_>\n        <_>\n          13 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 3 12 -1.</_>\n        <_>\n          2 1 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 1 3 -1.</_>\n        <_>\n          17 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 1 3 -1.</_>\n        <_>\n          2 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 1 3 -1.</_>\n        <_>\n          14 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 3 -1.</_>\n        <_>\n          7 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          10 13 2 3 2.</_>\n        <_>\n          8 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 1 3 -1.</_>\n        <_>\n          5 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 20 -1.</_>\n        <_>\n          16 0 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 2 6 -1.</_>\n        <_>\n          5 1 1 3 2.</_>\n        <_>\n          6 4 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 4 -1.</_>\n        <_>\n          5 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 12 -1.</_>\n        <_>\n          15 2 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 12 -1.</_>\n        <_>\n          7 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 1 8 -1.</_>\n        <_>\n          14 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 14 10 -1.</_>\n        <_>\n          1 4 7 5 2.</_>\n        <_>\n          8 9 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 14 -1.</_>\n        <_>\n          14 6 3 7 2.</_>\n        <_>\n          11 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 14 -1.</_>\n        <_>\n          3 6 3 7 2.</_>\n        <_>\n          6 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 15 2 -1.</_>\n        <_>\n          9 9 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          7 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 14 4 -1.</_>\n        <_>\n          13 3 7 2 2.</_>\n        <_>\n          6 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 15 2 -1.</_>\n        <_>\n          6 9 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 9 -1.</_>\n        <_>\n          6 14 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 8 -1.</_>\n        <_>\n          8 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 2 6 -1.</_>\n        <_>\n          14 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 4 -1.</_>\n        <_>\n          5 7 3 2 2.</_>\n        <_>\n          8 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 19 -1.</_>\n        <_>\n          7 1 6 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 5 -1.</_>\n        <_>\n          4 2 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 6 2 -1.</_>\n        <_>\n          12 18 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 6 2 -1.</_>\n        <_>\n          2 18 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 6 -1.</_>\n        <_>\n          17 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 3 -1.</_>\n        <_>\n          8 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 6 -1.</_>\n        <_>\n          10 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 6 -1.</_>\n        <_>\n          17 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 2 3 -1.</_>\n        <_>\n          8 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 2 -1.</_>\n        <_>\n          11 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 6 -1.</_>\n        <_>\n          0 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 6 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 2 -1.</_>\n        <_>\n          5 6 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 4 -1.</_>\n        <_>\n          11 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 5 9 -1.</_>\n        <_>\n          1 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 3 -1.</_>\n        <_>\n          13 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 14 3 -1.</_>\n        <_>\n          7 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 8 -1.</_>\n        <_>\n          2 15 18 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 3 -1.</_>\n        <_>\n          5 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 2 -1.</_>\n        <_>\n          12 6 2 1 2.</_>\n        <_>\n          10 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 2 -1.</_>\n        <_>\n          6 6 2 1 2.</_>\n        <_>\n          8 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 4 -1.</_>\n        <_>\n          11 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 2 7 -1.</_>\n        <_>\n          8 1 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 15 14 -1.</_>\n        <_>\n          4 9 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 2 -1.</_>\n        <_>\n          9 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 18 4 -1.</_>\n        <_>\n          11 3 9 2 2.</_>\n        <_>\n          2 5 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 3 -1.</_>\n        <_>\n          13 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 2 -1.</_>\n        <_>\n          7 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 7 -1.</_>\n        <_>\n          9 5 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 3 -1.</_>\n        <_>\n          6 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 18 -1.</_>\n        <_>\n          6 9 14 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 6 3 -1.</_>\n        <_>\n          2 17 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 6 -1.</_>\n        <_>\n          10 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 3 -1.</_>\n        <_>\n          7 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 3 -1.</_>\n        <_>\n          7 13 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 2 -1.</_>\n        <_>\n          9 12 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 6 -1.</_>\n        <_>\n          5 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 7 2 -1.</_>\n        <_>\n          11 13 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 6 -1.</_>\n        <_>\n          6 10 4 3 2.</_>\n        <_>\n          10 13 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 4 -1.</_>\n        <_>\n          11 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 3 -1.</_>\n        <_>\n          9 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 1 9 -1.</_>\n        <_>\n          13 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 14 6 -1.</_>\n        <_>\n          1 15 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 1 6 -1.</_>\n        <_>\n          13 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 8 -1.</_>\n        <_>\n          1 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 18 -1.</_>\n        <_>\n          18 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 6 2 -1.</_>\n        <_>\n          2 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 6 -1.</_>\n        <_>\n          9 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 6 -1.</_>\n        <_>\n          6 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 3 -1.</_>\n        <_>\n          14 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 18 -1.</_>\n        <_>\n          1 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 18 2 -1.</_>\n        <_>\n          10 18 9 1 2.</_>\n        <_>\n          1 19 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 2 2 -1.</_>\n        <_>\n          3 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 5 3 -1.</_>\n        <_>\n          8 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 2 3 -1.</_>\n        <_>\n          8 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 3 -1.</_>\n        <_>\n          13 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 2 -1.</_>\n        <_>\n          9 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 5 2 -1.</_>\n        <_>\n          15 6 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 5 2 -1.</_>\n        <_>\n          0 6 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 14 1 6 -1.</_>\n        <_>\n          17 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 9 3 -1.</_>\n        <_>\n          5 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 3 -1.</_>\n        <_>\n          13 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 18 -1.</_>\n        <_>\n          2 0 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 1 3 -1.</_>\n        <_>\n          17 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 1 6 -1.</_>\n        <_>\n          2 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 8 1 2 -1.</_>\n        <_>\n          19 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 3 -1.</_>\n        <_>\n          6 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 3 -1.</_>\n        <_>\n          9 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 1 3 -1.</_>\n        <_>\n          2 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 8 2 -1.</_>\n        <_>\n          16 4 4 1 2.</_>\n        <_>\n          12 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 8 2 -1.</_>\n        <_>\n          0 4 4 1 2.</_>\n        <_>\n          4 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 18 4 -1.</_>\n        <_>\n          2 18 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 4 -1.</_>\n        <_>\n          7 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 3 -1.</_>\n        <_>\n          4 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 20 -1.</_>\n        <_>\n          2 0 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 8 -1.</_>\n        <_>\n          14 4 2 4 2.</_>\n        <_>\n          12 8 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 2 -1.</_>\n        <_>\n          6 7 1 1 2.</_>\n        <_>\n          7 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 2 3 -1.</_>\n        <_>\n          10 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 2 -1.</_>\n        <_>\n          8 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 12 -1.</_>\n        <_>\n          8 8 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 11 12 -1.</_>\n        <_>\n          4 4 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 11 -1.</_>\n        <_>\n          16 9 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 4 3 -1.</_>\n        <_>\n          0 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 3 -1.</_>\n        <_>\n          9 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 2 -1.</_>\n        <_>\n          5 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 3 -1.</_>\n        <_>\n          10 15 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 4 -1.</_>\n        <_>\n          9 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 3 -1.</_>\n        <_>\n          10 15 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 2 -1.</_>\n        <_>\n          8 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 4 -1.</_>\n        <_>\n          10 10 8 2 2.</_>\n        <_>\n          2 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 4 17 -1.</_>\n        <_>\n          4 3 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 7 -1.</_>\n        <_>\n          15 13 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 1 -1.</_>\n        <_>\n          5 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 4 -1.</_>\n        <_>\n          9 2 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          6 0 4 6 2.</_>\n        <_>\n          10 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 2 -1.</_>\n        <_>\n          14 7 1 1 2.</_>\n        <_>\n          13 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 6 -1.</_>\n        <_>\n          0 14 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 2 3 -1.</_>\n        <_>\n          14 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 12 -1.</_>\n        <_>\n          3 8 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 2 -1.</_>\n        <_>\n          3 0 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 3 -1.</_>\n        <_>\n          6 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 3 -1.</_>\n        <_>\n          8 16 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 1 6 -1.</_>\n        <_>\n          0 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 3 -1.</_>\n        <_>\n          10 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 2 3 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 1 -1.</_>\n        <_>\n          5 7 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 19 -1.</_>\n        <_>\n          10 0 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 6 -1.</_>\n        <_>\n          10 6 10 3 2.</_>\n        <_>\n          0 9 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 2 -1.</_>\n        <_>\n          3 6 1 1 2.</_>\n        <_>\n          4 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 2 -1.</_>\n        <_>\n          16 6 1 1 2.</_>\n        <_>\n          15 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 2 -1.</_>\n        <_>\n          3 6 1 1 2.</_>\n        <_>\n          4 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 1 12 -1.</_>\n        <_>\n          14 10 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 10 -1.</_>\n        <_>\n          2 5 8 5 2.</_>\n        <_>\n          10 10 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 2 2 -1.</_>\n        <_>\n          1 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 5 -1.</_>\n        <_>\n          10 0 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 5 -1.</_>\n        <_>\n          5 0 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 17 -1.</_>\n        <_>\n          11 2 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 17 -1.</_>\n        <_>\n          8 2 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 9 -1.</_>\n        <_>\n          15 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 2 9 -1.</_>\n        <_>\n          4 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 14 4 -1.</_>\n        <_>\n          5 16 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 1 -1.</_>\n        <_>\n          7 4 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 12 -1.</_>\n        <_>\n          9 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 6 -1.</_>\n        <_>\n          12 3 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 6 -1.</_>\n        <_>\n          5 2 3 3 2.</_>\n        <_>\n          8 5 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 4 -1.</_>\n        <_>\n          12 16 3 2 2.</_>\n        <_>\n          9 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 3 -1.</_>\n        <_>\n          7 2 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 9 10 -1.</_>\n        <_>\n          7 9 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 4 -1.</_>\n        <_>\n          7 9 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 6 -1.</_>\n        <_>\n          11 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 5 3 -1.</_>\n        <_>\n          7 12 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 6 6 -1.</_>\n        <_>\n          10 11 3 3 2.</_>\n        <_>\n          7 14 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 9 -1.</_>\n        <_>\n          0 3 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 1 6 -1.</_>\n        <_>\n          13 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 6 -1.</_>\n        <_>\n          0 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 1 6 -1.</_>\n        <_>\n          6 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 2 3 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 3 -1.</_>\n        <_>\n          7 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 11 3 -1.</_>\n        <_>\n          9 1 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 3 -1.</_>\n        <_>\n          0 7 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 1 2 -1.</_>\n        <_>\n          10 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 6 -1.</_>\n        <_>\n          10 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 1 -1.</_>\n        <_>\n          9 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 12 1 -1.</_>\n        <_>\n          7 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 5 -1.</_>\n        <_>\n          10 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 2 -1.</_>\n        <_>\n          6 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 1 -1.</_>\n        <_>\n          9 0 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 1 -1.</_>\n        <_>\n          8 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 9 13 -1.</_>\n        <_>\n          9 4 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 4 2 -1.</_>\n        <_>\n          6 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 6 -1.</_>\n        <_>\n          16 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 3 -1.</_>\n        <_>\n          0 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 10 -1.</_>\n        <_>\n          10 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 3 -1.</_>\n        <_>\n          10 4 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 8 -1.</_>\n        <_>\n          9 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 13 -1.</_>\n        <_>\n          9 6 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          6 0 4 6 2.</_>\n        <_>\n          10 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 8 -1.</_>\n        <_>\n          16 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 6 -1.</_>\n        <_>\n          7 0 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 8 -1.</_>\n        <_>\n          16 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 2 -1.</_>\n        <_>\n          12 12 3 1 2.</_>\n        <_>\n          9 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 2 -1.</_>\n        <_>\n          9 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 2 -1.</_>\n        <_>\n          12 6 1 1 2.</_>\n        <_>\n          11 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 2 -1.</_>\n        <_>\n          7 9 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 2 -1.</_>\n        <_>\n          12 6 1 1 2.</_>\n        <_>\n          11 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 12 8 -1.</_>\n        <_>\n          7 4 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 5 3 -1.</_>\n        <_>\n          13 12 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 3 -1.</_>\n        <_>\n          9 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 2 3 -1.</_>\n        <_>\n          14 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 1 3 -1.</_>\n        <_>\n          5 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 3 -1.</_>\n        <_>\n          13 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 3 -1.</_>\n        <_>\n          5 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 3 -1.</_>\n        <_>\n          9 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 2 2 -1.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 1 4 -1.</_>\n        <_>\n          15 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 2 -1.</_>\n        <_>\n          3 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 2 2 -1.</_>\n        <_>\n          13 15 1 1 2.</_>\n        <_>\n          12 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 2 -1.</_>\n        <_>\n          9 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 14 9 -1.</_>\n        <_>\n          4 14 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 4 3 -1.</_>\n        <_>\n          7 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 1 4 -1.</_>\n        <_>\n          15 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 1 4 -1.</_>\n        <_>\n          4 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 13 -1.</_>\n        <_>\n          16 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 12 -1.</_>\n        <_>\n          4 1 1 6 2.</_>\n        <_>\n          5 7 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 6 -1.</_>\n        <_>\n          14 14 3 3 2.</_>\n        <_>\n          11 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 6 6 -1.</_>\n        <_>\n          3 14 3 3 2.</_>\n        <_>\n          6 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 3 2 -1.</_>\n        <_>\n          14 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 3 2 -1.</_>\n        <_>\n          3 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 13 -1.</_>\n        <_>\n          16 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 13 -1.</_>\n        <_>\n          2 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 7 6 -1.</_>\n        <_>\n          10 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 2 2 -1.</_>\n        <_>\n          6 15 1 1 2.</_>\n        <_>\n          7 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 6 -1.</_>\n        <_>\n          10 11 4 3 2.</_>\n        <_>\n          6 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 2 2 -1.</_>\n        <_>\n          7 6 1 1 2.</_>\n        <_>\n          8 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 6 -1.</_>\n        <_>\n          10 2 8 3 2.</_>\n        <_>\n          2 5 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 10 -1.</_>\n        <_>\n          11 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 10 -1.</_>\n        <_>\n          6 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 2 -1.</_>\n        <_>\n          11 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 1 3 -1.</_>\n        <_>\n          10 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 4 18 -1.</_>\n        <_>\n          1 2 2 9 2.</_>\n        <_>\n          3 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 12 -1.</_>\n        <_>\n          12 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 6 -1.</_>\n        <_>\n          0 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 3 -1.</_>\n        <_>\n          8 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 2 -1.</_>\n        <_>\n          11 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 2 -1.</_>\n        <_>\n          8 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 1 -1.</_>\n        <_>\n          11 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 3 -1.</_>\n        <_>\n          9 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 8 6 -1.</_>\n        <_>\n          16 7 4 3 2.</_>\n        <_>\n          12 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 6 -1.</_>\n        <_>\n          0 7 4 3 2.</_>\n        <_>\n          4 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 10 -1.</_>\n        <_>\n          19 2 1 5 2.</_>\n        <_>\n          18 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 4 -1.</_>\n        <_>\n          3 2 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 1 -1.</_>\n        <_>\n          11 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 2 -1.</_>\n        <_>\n          7 15 1 1 2.</_>\n        <_>\n          8 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 1 6 -1.</_>\n        <_>\n          11 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 1 6 -1.</_>\n        <_>\n          8 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 2 1 -1.</_>\n        <_>\n          14 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 2 3 -1.</_>\n        <_>\n          8 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 7 4 -1.</_>\n        <_>\n          12 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 3 -1.</_>\n        <_>\n          4 15 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 3 2 -1.</_>\n        <_>\n          11 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 2 -1.</_>\n        <_>\n          4 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 4 6 -1.</_>\n        <_>\n          10 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 2 -1.</_>\n        <_>\n          7 13 1 1 2.</_>\n        <_>\n          8 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 14 4 -1.</_>\n        <_>\n          11 11 7 2 2.</_>\n        <_>\n          4 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 18 2 -1.</_>\n        <_>\n          7 18 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 2 2 -1.</_>\n        <_>\n          12 18 1 1 2.</_>\n        <_>\n          11 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 2 2 -1.</_>\n        <_>\n          7 18 1 1 2.</_>\n        <_>\n          8 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 8 2 -1.</_>\n        <_>\n          12 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 2 -1.</_>\n        <_>\n          7 15 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          10 12 2 4 2.</_>\n        <_>\n          8 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 3 -1.</_>\n        <_>\n          4 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 2 -1.</_>\n        <_>\n          9 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 15 -1.</_>\n        <_>\n          7 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 12 14 -1.</_>\n        <_>\n          12 6 4 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 3 -1.</_>\n        <_>\n          5 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 19 -1.</_>\n        <_>\n          12 1 4 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 2 -1.</_>\n        <_>\n          3 1 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 4 5 -1.</_>\n        <_>\n          10 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 5 -1.</_>\n        <_>\n          8 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 6 -1.</_>\n        <_>\n          0 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 10 -1.</_>\n        <_>\n          7 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 5 2 -1.</_>\n        <_>\n          2 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 2 -1.</_>\n        <_>\n          7 11 1 1 2.</_>\n        <_>\n          8 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 3 3 -1.</_>\n        <_>\n          14 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 3 -1.</_>\n        <_>\n          3 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          8 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 3 3 -1.</_>\n        <_>\n          13 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 3 -1.</_>\n        <_>\n          0 10 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 3 3 -1.</_>\n        <_>\n          13 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 8 -1.</_>\n        <_>\n          9 12 1 4 2.</_>\n        <_>\n          10 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 2 2 -1.</_>\n        <_>\n          12 7 1 1 2.</_>\n        <_>\n          11 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 6 4 -1.</_>\n        <_>\n          3 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 2 3 -1.</_>\n        <_>\n          10 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          9 7 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 8 4 -1.</_>\n        <_>\n          12 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          4 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 2 -1.</_>\n        <_>\n          10 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 4 2 -1.</_>\n        <_>\n          6 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 13 -1.</_>\n        <_>\n          13 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 13 -1.</_>\n        <_>\n          6 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 9 -1.</_>\n        <_>\n          9 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 7 12 -1.</_>\n        <_>\n          4 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 2 -1.</_>\n        <_>\n          13 12 1 1 2.</_>\n        <_>\n          12 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 2 -1.</_>\n        <_>\n          6 12 1 1 2.</_>\n        <_>\n          7 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 2 -1.</_>\n        <_>\n          10 9 2 1 2.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 2 -1.</_>\n        <_>\n          3 6 1 1 2.</_>\n        <_>\n          4 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 3 2 -1.</_>\n        <_>\n          16 7 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 19 4 -1.</_>\n        <_>\n          0 9 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 10 1 -1.</_>\n        <_>\n          10 2 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 12 -1.</_>\n        <_>\n          9 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 4 1 -1.</_>\n        <_>\n          12 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 4 -1.</_>\n        <_>\n          1 7 3 2 2.</_>\n        <_>\n          4 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 13 -1.</_>\n        <_>\n          14 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 13 -1.</_>\n        <_>\n          4 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 8 -1.</_>\n        <_>\n          10 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 2 5 -1.</_>\n        <_>\n          9 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 9 1 -1.</_>\n        <_>\n          11 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 9 1 -1.</_>\n        <_>\n          6 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 10 -1.</_>\n        <_>\n          7 0 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 5 3 -1.</_>\n        <_>\n          7 18 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 6 1 -1.</_>\n        <_>\n          9 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 3 2 -1.</_>\n        <_>\n          2 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 6 -1.</_>\n        <_>\n          6 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 2 4 -1.</_>\n        <_>\n          11 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 4 -1.</_>\n        <_>\n          8 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 4 -1.</_>\n        <_>\n          9 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 8 3 -1.</_>\n        <_>\n          6 14 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 4 -1.</_>\n        <_>\n          10 15 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 17 -1.</_>\n        <_>\n          10 2 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 1 -1.</_>\n        <_>\n          9 0 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 3 4 -1.</_>\n        <_>\n          9 15 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 7 3 -1.</_>\n        <_>\n          7 14 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 3 3 -1.</_>\n        <_>\n          9 16 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 10 -1.</_>\n        <_>\n          6 7 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 8 8 -1.</_>\n        <_>\n          2 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 2 2 -1.</_>\n        <_>\n          14 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 2 2 -1.</_>\n        <_>\n          4 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 4 6 -1.</_>\n        <_>\n          10 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 4 6 -1.</_>\n        <_>\n          6 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 3 -1.</_>\n        <_>\n          10 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 6 -1.</_>\n        <_>\n          12 0 2 3 2.</_>\n        <_>\n          10 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 2 -1.</_>\n        <_>\n          0 4 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 2 -1.</_>\n        <_>\n          16 0 4 1 2.</_>\n        <_>\n          12 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 10 8 -1.</_>\n        <_>\n          2 16 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 2 10 -1.</_>\n        <_>\n          18 7 1 5 2.</_>\n        <_>\n          17 12 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 2 10 -1.</_>\n        <_>\n          1 7 1 5 2.</_>\n        <_>\n          2 12 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 3 6 -1.</_>\n        <_>\n          15 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 2 -1.</_>\n        <_>\n          6 4 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 6 -1.</_>\n        <_>\n          0 7 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 2 -1.</_>\n        <_>\n          0 0 4 1 2.</_>\n        <_>\n          4 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 6 2 -1.</_>\n        <_>\n          1 14 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 4 -1.</_>\n        <_>\n          11 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 1 -1.</_>\n        <_>\n          8 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 2 -1.</_>\n        <_>\n          10 6 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 2 -1.</_>\n        <_>\n          15 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 1 2 -1.</_>\n        <_>\n          6 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 3 -1.</_>\n        <_>\n          13 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 1 2 -1.</_>\n        <_>\n          2 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 3 -1.</_>\n        <_>\n          12 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 3 -1.</_>\n        <_>\n          0 1 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 2 -1.</_>\n        <_>\n          9 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 3 -1.</_>\n        <_>\n          5 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 3 -1.</_>\n        <_>\n          18 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 6 -1.</_>\n        <_>\n          3 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 6 -1.</_>\n        <_>\n          10 2 10 3 2.</_>\n        <_>\n          0 5 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 4 -1.</_>\n        <_>\n          5 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 15 2 -1.</_>\n        <_>\n          8 10 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 11 -1.</_>\n        <_>\n          9 0 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 6 -1.</_>\n        <_>\n          13 0 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 2 1 -1.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 10 -1.</_>\n        <_>\n          18 10 2 5 2.</_>\n        <_>\n          16 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 10 3 -1.</_>\n        <_>\n          4 9 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 3 3 -1.</_>\n        <_>\n          14 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 4 10 -1.</_>\n        <_>\n          0 10 2 5 2.</_>\n        <_>\n          2 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 6 -1.</_>\n        <_>\n          18 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 3 -1.</_>\n        <_>\n          6 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 7 2 -1.</_>\n        <_>\n          7 8 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 6 -1.</_>\n        <_>\n          0 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 1 -1.</_>\n        <_>\n          12 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 6 -1.</_>\n        <_>\n          6 0 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 14 -1.</_>\n        <_>\n          7 1 6 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 8 3 -1.</_>\n        <_>\n          8 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 2 -1.</_>\n        <_>\n          9 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 2 -1.</_>\n        <_>\n          8 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 5 -1.</_>\n        <_>\n          11 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 5 -1.</_>\n        <_>\n          8 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 10 -1.</_>\n        <_>\n          14 0 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 2 -1.</_>\n        <_>\n          4 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 6 -1.</_>\n        <_>\n          18 3 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 10 -1.</_>\n        <_>\n          1 13 18 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 10 -1.</_>\n        <_>\n          14 0 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 7 -1.</_>\n        <_>\n          17 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 10 -1.</_>\n        <_>\n          5 0 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 7 -1.</_>\n        <_>\n          17 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 1 2 -1.</_>\n        <_>\n          0 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 10 -1.</_>\n        <_>\n          18 1 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 10 -1.</_>\n        <_>\n          1 1 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 3 4 -1.</_>\n        <_>\n          11 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 3 3 -1.</_>\n        <_>\n          3 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 6 -1.</_>\n        <_>\n          12 0 1 3 2.</_>\n        <_>\n          11 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 6 -1.</_>\n        <_>\n          7 0 1 3 2.</_>\n        <_>\n          8 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 7 -1.</_>\n        <_>\n          17 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 3 7 -1.</_>\n        <_>\n          2 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 16 -1.</_>\n        <_>\n          16 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 16 -1.</_>\n        <_>\n          2 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 8 -1.</_>\n        <_>\n          10 0 8 4 2.</_>\n        <_>\n          2 4 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 5 3 -1.</_>\n        <_>\n          6 9 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 4 -1.</_>\n        <_>\n          9 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 15 1 -1.</_>\n        <_>\n          5 7 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 7 9 -1.</_>\n        <_>\n          8 5 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 16 4 -1.</_>\n        <_>\n          1 7 8 2 2.</_>\n        <_>\n          9 9 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 8 2 -1.</_>\n        <_>\n          6 13 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 3 -1.</_>\n        <_>\n          8 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 14 10 -1.</_>\n        <_>\n          11 5 7 5 2.</_>\n        <_>\n          4 10 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 3 2 -1.</_>\n        <_>\n          4 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 1 -1.</_>\n        <_>\n          11 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 7 6 -1.</_>\n        <_>\n          4 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 3 -1.</_>\n        <_>\n          7 11 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 2 -1.</_>\n        <_>\n          9 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 6 -1.</_>\n        <_>\n          0 7 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 1 -1.</_>\n        <_>\n          8 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 1 -1.</_>\n        <_>\n          11 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 3 4 -1.</_>\n        <_>\n          11 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 8 -1.</_>\n        <_>\n          2 16 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 15 2 -1.</_>\n        <_>\n          0 16 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 6 -1.</_>\n        <_>\n          15 6 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 4 -1.</_>\n        <_>\n          10 5 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 9 6 -1.</_>\n        <_>\n          8 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 15 1 -1.</_>\n        <_>\n          7 19 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 3 4 -1.</_>\n        <_>\n          11 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 4 -1.</_>\n        <_>\n          0 17 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 3 4 -1.</_>\n        <_>\n          11 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 3 4 -1.</_>\n        <_>\n          8 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 3 -1.</_>\n        <_>\n          9 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 6 -1.</_>\n        <_>\n          8 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 12 -1.</_>\n        <_>\n          9 10 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 4 3 -1.</_>\n        <_>\n          8 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 8 2 -1.</_>\n        <_>\n          13 18 4 1 2.</_>\n        <_>\n          9 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 8 2 -1.</_>\n        <_>\n          1 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 15 -1.</_>\n        <_>\n          15 5 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 2 -1.</_>\n        <_>\n          9 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 3 -1.</_>\n        <_>\n          9 5 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 15 -1.</_>\n        <_>\n          3 5 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 8 -1.</_>\n        <_>\n          11 1 7 4 2.</_>\n        <_>\n          4 5 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 4 16 -1.</_>\n        <_>\n          2 4 2 8 2.</_>\n        <_>\n          4 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 12 -1.</_>\n        <_>\n          12 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 12 -1.</_>\n        <_>\n          4 5 5 6 2.</_>\n        <_>\n          9 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 3 -1.</_>\n        <_>\n          5 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 10 -1.</_>\n        <_>\n          14 2 2 5 2.</_>\n        <_>\n          12 7 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 7 3 -1.</_>\n        <_>\n          6 5 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 2 -1.</_>\n        <_>\n          11 0 9 1 2.</_>\n        <_>\n          2 1 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 2 -1.</_>\n        <_>\n          0 0 9 1 2.</_>\n        <_>\n          9 1 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 4 6 -1.</_>\n        <_>\n          15 13 2 3 2.</_>\n        <_>\n          13 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 6 -1.</_>\n        <_>\n          3 13 2 3 2.</_>\n        <_>\n          5 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 6 -1.</_>\n        <_>\n          10 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 10 -1.</_>\n        <_>\n          5 9 5 5 2.</_>\n        <_>\n          10 14 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 2 -1.</_>\n        <_>\n          13 4 2 1 2.</_>\n        <_>\n          11 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 8 -1.</_>\n        <_>\n          10 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 10 -1.</_>\n        <_>\n          14 2 2 5 2.</_>\n        <_>\n          12 7 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 2 1 -1.</_>\n        <_>\n          9 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 1 12 -1.</_>\n        <_>\n          10 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 9 -1.</_>\n        <_>\n          3 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 10 -1.</_>\n        <_>\n          14 2 2 5 2.</_>\n        <_>\n          12 7 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 10 -1.</_>\n        <_>\n          4 2 2 5 2.</_>\n        <_>\n          6 7 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 2 -1.</_>\n        <_>\n          13 4 2 1 2.</_>\n        <_>\n          11 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 6 3 -1.</_>\n        <_>\n          0 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 2 -1.</_>\n        <_>\n          13 4 2 1 2.</_>\n        <_>\n          11 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 2 -1.</_>\n        <_>\n          7 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 2 -1.</_>\n        <_>\n          13 4 2 1 2.</_>\n        <_>\n          11 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 2 -1.</_>\n        <_>\n          5 4 2 1 2.</_>\n        <_>\n          7 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 12 -1.</_>\n        <_>\n          14 0 1 6 2.</_>\n        <_>\n          13 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 10 -1.</_>\n        <_>\n          7 0 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 8 -1.</_>\n        <_>\n          3 4 17 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 4 -1.</_>\n        <_>\n          0 6 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 8 2 -1.</_>\n        <_>\n          4 3 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 3 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 4 -1.</_>\n        <_>\n          5 7 3 2 2.</_>\n        <_>\n          8 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 9 -1.</_>\n        <_>\n          8 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 1 4 -1.</_>\n        <_>\n          8 17 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 7 -1.</_>\n        <_>\n          8 5 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 10 -1.</_>\n        <_>\n          4 2 2 5 2.</_>\n        <_>\n          6 7 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 2 -1.</_>\n        <_>\n          3 1 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 15 -1.</_>\n        <_>\n          2 7 16 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 2 -1.</_>\n        <_>\n          15 3 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 2 -1.</_>\n        <_>\n          10 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 15 -1.</_>\n        <_>\n          4 10 16 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 5 6 -1.</_>\n        <_>\n          7 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 2 -1.</_>\n        <_>\n          11 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 1 -1.</_>\n        <_>\n          9 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 3 -1.</_>\n        <_>\n          9 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 2 -1.</_>\n        <_>\n          0 3 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 1 -1.</_>\n        <_>\n          5 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 14 -1.</_>\n        <_>\n          7 12 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 10 -1.</_>\n        <_>\n          0 0 4 5 2.</_>\n        <_>\n          4 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 2 -1.</_>\n        <_>\n          10 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 2 -1.</_>\n        <_>\n          9 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 16 -1.</_>\n        <_>\n          7 12 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 2 6 -1.</_>\n        <_>\n          2 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          5 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 6 -1.</_>\n        <_>\n          13 13 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 2 6 -1.</_>\n        <_>\n          3 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 2 -1.</_>\n        <_>\n          14 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 16 2 -1.</_>\n        <_>\n          0 9 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 2 -1.</_>\n        <_>\n          14 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 6 -1.</_>\n        <_>\n          0 2 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 6 -1.</_>\n        <_>\n          4 13 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 1 3 -1.</_>\n        <_>\n          9 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 12 -1.</_>\n        <_>\n          6 12 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 9 2 -1.</_>\n        <_>\n          8 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 3 -1.</_>\n        <_>\n          4 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 2 -1.</_>\n        <_>\n          9 6 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 1 3 -1.</_>\n        <_>\n          4 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 6 -1.</_>\n        <_>\n          14 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 7 -1.</_>\n        <_>\n          8 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 3 -1.</_>\n        <_>\n          10 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 3 -1.</_>\n        <_>\n          9 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 11 3 -1.</_>\n        <_>\n          5 11 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 1 -1.</_>\n        <_>\n          10 7 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 2 -1.</_>\n        <_>\n          10 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 2 -1.</_>\n        <_>\n          9 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 2 -1.</_>\n        <_>\n          11 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 2 -1.</_>\n        <_>\n          7 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 4 -1.</_>\n        <_>\n          14 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 2 -1.</_>\n        <_>\n          8 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 6 3 -1.</_>\n        <_>\n          14 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 12 -1.</_>\n        <_>\n          4 5 6 6 2.</_>\n        <_>\n          10 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          10 9 4 4 2.</_>\n        <_>\n          6 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 15 4 -1.</_>\n        <_>\n          5 4 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 1 -1.</_>\n        <_>\n          13 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 2 -1.</_>\n        <_>\n          4 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 3 -1.</_>\n        <_>\n          9 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 3 -1.</_>\n        <_>\n          13 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 4 -1.</_>\n        <_>\n          7 12 2 2 2.</_>\n        <_>\n          9 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 2 2 -1.</_>\n        <_>\n          11 11 1 1 2.</_>\n        <_>\n          10 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 2 -1.</_>\n        <_>\n          9 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 2 2 -1.</_>\n        <_>\n          11 11 1 1 2.</_>\n        <_>\n          10 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 3 -1.</_>\n        <_>\n          0 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 2 2 -1.</_>\n        <_>\n          11 11 1 1 2.</_>\n        <_>\n          10 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 2 2 -1.</_>\n        <_>\n          8 11 1 1 2.</_>\n        <_>\n          9 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 8 4 -1.</_>\n        <_>\n          12 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 4 -1.</_>\n        <_>\n          4 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 1 -1.</_>\n        <_>\n          13 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 1 -1.</_>\n        <_>\n          5 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 2 -1.</_>\n        <_>\n          12 0 2 1 2.</_>\n        <_>\n          10 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 3 1 -1.</_>\n        <_>\n          8 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 8 -1.</_>\n        <_>\n          10 11 2 4 2.</_>\n        <_>\n          8 15 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 15 2 -1.</_>\n        <_>\n          3 19 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 2 12 -1.</_>\n        <_>\n          2 6 1 6 2.</_>\n        <_>\n          3 12 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 3 -1.</_>\n        <_>\n          9 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 2 -1.</_>\n        <_>\n          8 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 3 1 -1.</_>\n        <_>\n          12 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 1 -1.</_>\n        <_>\n          7 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 2 -1.</_>\n        <_>\n          11 2 2 1 2.</_>\n        <_>\n          9 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 3 -1.</_>\n        <_>\n          4 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 3 -1.</_>\n        <_>\n          8 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 14 -1.</_>\n        <_>\n          7 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 12 3 -1.</_>\n        <_>\n          8 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          7 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 6 -1.</_>\n        <_>\n          9 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 1 8 -1.</_>\n        <_>\n          9 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 12 -1.</_>\n        <_>\n          9 10 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 8 -1.</_>\n        <_>\n          2 1 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 2 -1.</_>\n        <_>\n          12 1 3 1 2.</_>\n        <_>\n          9 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 14 -1.</_>\n        <_>\n          1 10 12 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          10 12 2 1 2.</_>\n        <_>\n          8 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 10 2 -1.</_>\n        <_>\n          1 9 5 1 2.</_>\n        <_>\n          6 10 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 3 -1.</_>\n        <_>\n          6 9 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 5 3 -1.</_>\n        <_>\n          9 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 3 -1.</_>\n        <_>\n          8 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 2 -1.</_>\n        <_>\n          7 8 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 2 -1.</_>\n        <_>\n          5 7 4 1 2.</_>\n        <_>\n          9 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 2 -1.</_>\n        <_>\n          4 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 3 -1.</_>\n        <_>\n          5 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 6 -1.</_>\n        <_>\n          18 3 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 6 -1.</_>\n        <_>\n          1 3 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 14 1 2 -1.</_>\n        <_>\n          17 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 3 -1.</_>\n        <_>\n          6 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 3 -1.</_>\n        <_>\n          5 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 8 -1.</_>\n        <_>\n          12 5 3 4 2.</_>\n        <_>\n          9 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 8 -1.</_>\n        <_>\n          5 5 3 4 2.</_>\n        <_>\n          8 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 6 -1.</_>\n        <_>\n          16 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 20 -1.</_>\n        <_>\n          3 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 3 2 -1.</_>\n        <_>\n          13 11 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 2 -1.</_>\n        <_>\n          6 11 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 1 -1.</_>\n        <_>\n          11 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 3 -1.</_>\n        <_>\n          4 0 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 5 -1.</_>\n        <_>\n          15 0 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 2 -1.</_>\n        <_>\n          5 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 15 -1.</_>\n        <_>\n          9 0 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 1 -1.</_>\n        <_>\n          7 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 4 -1.</_>\n        <_>\n          13 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 1 -1.</_>\n        <_>\n          7 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 2 -1.</_>\n        <_>\n          12 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 6 -1.</_>\n        <_>\n          0 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 2 -1.</_>\n        <_>\n          12 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 3 3 -1.</_>\n        <_>\n          2 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 10 -1.</_>\n        <_>\n          16 8 3 5 2.</_>\n        <_>\n          13 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 2 -1.</_>\n        <_>\n          0 10 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 2 -1.</_>\n        <_>\n          13 11 1 1 2.</_>\n        <_>\n          12 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 3 3 -1.</_>\n        <_>\n          3 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 2 -1.</_>\n        <_>\n          12 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 2 -1.</_>\n        <_>\n          5 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 9 -1.</_>\n        <_>\n          9 8 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 7 -1.</_>\n        <_>\n          6 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 5 -1.</_>\n        <_>\n          9 2 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 2 -1.</_>\n        <_>\n          6 11 1 1 2.</_>\n        <_>\n          7 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 3 2 -1.</_>\n        <_>\n          15 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 3 2 -1.</_>\n        <_>\n          2 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 8 -1.</_>\n        <_>\n          17 12 3 4 2.</_>\n        <_>\n          14 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 15 6 -1.</_>\n        <_>\n          7 8 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 17 -1.</_>\n        <_>\n          8 2 6 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 1 -1.</_>\n        <_>\n          7 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 5 -1.</_>\n        <_>\n          9 2 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 5 -1.</_>\n        <_>\n          7 2 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 4 -1.</_>\n        <_>\n          10 9 6 2 2.</_>\n        <_>\n          4 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 6 2 -1.</_>\n        <_>\n          5 15 3 1 2.</_>\n        <_>\n          8 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 3 -1.</_>\n        <_>\n          10 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 2 -1.</_>\n        <_>\n          0 13 10 1 2.</_>\n        <_>\n          10 14 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 8 -1.</_>\n        <_>\n          10 9 6 4 2.</_>\n        <_>\n          4 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 6 -1.</_>\n        <_>\n          8 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 2 -1.</_>\n        <_>\n          10 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 2 -1.</_>\n        <_>\n          9 12 1 1 2.</_>\n        <_>\n          10 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 14 4 -1.</_>\n        <_>\n          11 11 7 2 2.</_>\n        <_>\n          4 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 2 -1.</_>\n        <_>\n          8 6 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 3 -1.</_>\n        <_>\n          12 10 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 1 2 -1.</_>\n        <_>\n          2 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 12 -1.</_>\n        <_>\n          16 8 3 6 2.</_>\n        <_>\n          13 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 12 -1.</_>\n        <_>\n          1 8 3 6 2.</_>\n        <_>\n          4 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 10 -1.</_>\n        <_>\n          12 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 8 4 -1.</_>\n        <_>\n          5 11 4 2 2.</_>\n        <_>\n          9 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 8 4 -1.</_>\n        <_>\n          14 16 4 2 2.</_>\n        <_>\n          10 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 6 -1.</_>\n        <_>\n          9 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 10 -1.</_>\n        <_>\n          10 2 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 9 -1.</_>\n        <_>\n          8 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 19 2 1 -1.</_>\n        <_>\n          12 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 4 9 -1.</_>\n        <_>\n          3 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 4 -1.</_>\n        <_>\n          9 5 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 4 -1.</_>\n        <_>\n          9 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 2 8 -1.</_>\n        <_>\n          14 9 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 5 12 -1.</_>\n        <_>\n          7 12 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 2 6 -1.</_>\n        <_>\n          14 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 6 -1.</_>\n        <_>\n          4 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 10 4 -1.</_>\n        <_>\n          13 15 5 2 2.</_>\n        <_>\n          8 17 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 2 2 -1.</_>\n        <_>\n          7 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 2 -1.</_>\n        <_>\n          11 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 6 -1.</_>\n        <_>\n          2 2 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 2 -1.</_>\n        <_>\n          11 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 10 3 -1.</_>\n        <_>\n          4 12 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 2 -1.</_>\n        <_>\n          11 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 2 -1.</_>\n        <_>\n          3 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          16 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 3 -1.</_>\n        <_>\n          9 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 2 -1.</_>\n        <_>\n          6 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 3 -1.</_>\n        <_>\n          15 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          5 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 2 2 -1.</_>\n        <_>\n          10 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 4 3 -1.</_>\n        <_>\n          5 1 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          16 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 1 -1.</_>\n        <_>\n          10 0 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 3 -1.</_>\n        <_>\n          15 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 4 -1.</_>\n        <_>\n          1 4 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 6 -1.</_>\n        <_>\n          16 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 3 6 -1.</_>\n        <_>\n          1 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 6 -1.</_>\n        <_>\n          12 2 6 3 2.</_>\n        <_>\n          6 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 3 -1.</_>\n        <_>\n          8 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 14 6 -1.</_>\n        <_>\n          11 2 7 3 2.</_>\n        <_>\n          4 5 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 3 -1.</_>\n        <_>\n          15 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 3 -1.</_>\n        <_>\n          8 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 3 -1.</_>\n        <_>\n          15 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 5 2 -1.</_>\n        <_>\n          7 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 3 -1.</_>\n        <_>\n          7 13 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 4 -1.</_>\n        <_>\n          5 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 3 -1.</_>\n        <_>\n          12 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 3 -1.</_>\n        <_>\n          7 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 6 -1.</_>\n        <_>\n          17 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 7 -1.</_>\n        <_>\n          7 6 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 6 -1.</_>\n        <_>\n          17 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 3 -1.</_>\n        <_>\n          3 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 6 -1.</_>\n        <_>\n          17 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 3 6 -1.</_>\n        <_>\n          2 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 1 -1.</_>\n        <_>\n          7 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 8 7 -1.</_>\n        <_>\n          4 9 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 2 -1.</_>\n        <_>\n          12 12 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 2 -1.</_>\n        <_>\n          0 12 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 3 -1.</_>\n        <_>\n          9 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 4 -1.</_>\n        <_>\n          4 10 6 2 2.</_>\n        <_>\n          10 12 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 3 7 -1.</_>\n        <_>\n          10 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 5 -1.</_>\n        <_>\n          8 2 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 4 6 -1.</_>\n        <_>\n          11 12 2 3 2.</_>\n        <_>\n          9 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 6 -1.</_>\n        <_>\n          9 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 2 -1.</_>\n        <_>\n          15 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 4 -1.</_>\n        <_>\n          14 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 1 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 3 -1.</_>\n        <_>\n          15 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 10 -1.</_>\n        <_>\n          9 7 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 6 -1.</_>\n        <_>\n          11 12 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 1 -1.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 2 2 -1.</_>\n        <_>\n          10 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 2 2 -1.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 2 -1.</_>\n        <_>\n          13 7 1 1 2.</_>\n        <_>\n          12 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 2 -1.</_>\n        <_>\n          5 7 1 1 2.</_>\n        <_>\n          6 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 14 -1.</_>\n        <_>\n          14 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 14 -1.</_>\n        <_>\n          5 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 14 -1.</_>\n        <_>\n          14 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 3 16 -1.</_>\n        <_>\n          5 2 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 10 -1.</_>\n        <_>\n          7 7 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 7 3 -1.</_>\n        <_>\n          6 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 10 12 -1.</_>\n        <_>\n          14 2 5 6 2.</_>\n        <_>\n          9 8 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 2 -1.</_>\n        <_>\n          6 8 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          8 16 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 3 -1.</_>\n        <_>\n          6 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 6 -1.</_>\n        <_>\n          16 4 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 2 -1.</_>\n        <_>\n          6 6 2 1 2.</_>\n        <_>\n          8 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 6 -1.</_>\n        <_>\n          16 4 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 6 -1.</_>\n        <_>\n          0 4 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 6 -1.</_>\n        <_>\n          9 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 10 -1.</_>\n        <_>\n          3 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          9 5 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 3 -1.</_>\n        <_>\n          3 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 3 2 -1.</_>\n        <_>\n          13 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 10 4 -1.</_>\n        <_>\n          2 16 5 2 2.</_>\n        <_>\n          7 18 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 6 -1.</_>\n        <_>\n          10 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 1 3 -1.</_>\n        <_>\n          7 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 6 3 -1.</_>\n        <_>\n          14 17 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 10 3 -1.</_>\n        <_>\n          7 5 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 5 4 -1.</_>\n        <_>\n          0 6 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 9 -1.</_>\n        <_>\n          13 14 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 9 -1.</_>\n        <_>\n          4 14 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 1 -1.</_>\n        <_>\n          9 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 17 -1.</_>\n        <_>\n          7 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 3 -1.</_>\n        <_>\n          10 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 4 -1.</_>\n        <_>\n          7 2 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 2 -1.</_>\n        <_>\n          12 2 4 1 2.</_>\n        <_>\n          8 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 6 -1.</_>\n        <_>\n          8 3 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 2 2 -1.</_>\n        <_>\n          9 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 14 -1.</_>\n        <_>\n          1 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 7 3 -1.</_>\n        <_>\n          12 1 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 1 2 -1.</_>\n        <_>\n          1 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 8 -1.</_>\n        <_>\n          15 12 1 4 2.</_>\n        <_>\n          14 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 7 3 -1.</_>\n        <_>\n          1 1 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 8 -1.</_>\n        <_>\n          15 12 1 4 2.</_>\n        <_>\n          14 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          6 0 4 6 2.</_>\n        <_>\n          10 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 9 -1.</_>\n        <_>\n          6 4 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 2 2 -1.</_>\n        <_>\n          5 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 6 6 -1.</_>\n        <_>\n          16 14 3 3 2.</_>\n        <_>\n          13 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 20 2 -1.</_>\n        <_>\n          0 17 10 1 2.</_>\n        <_>\n          10 18 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 2 6 -1.</_>\n        <_>\n          11 3 1 3 2.</_>\n        <_>\n          10 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 2 -1.</_>\n        <_>\n          8 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 13 -1.</_>\n        <_>\n          10 7 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 10 5 -1.</_>\n        <_>\n          10 15 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 10 -1.</_>\n        <_>\n          10 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 1 -1.</_>\n        <_>\n          6 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 7 -1.</_>\n        <_>\n          10 3 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 7 -1.</_>\n        <_>\n          7 3 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 5 -1.</_>\n        <_>\n          7 7 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 4 3 -1.</_>\n        <_>\n          5 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 12 6 -1.</_>\n        <_>\n          14 14 6 3 2.</_>\n        <_>\n          8 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 4 -1.</_>\n        <_>\n          0 13 10 2 2.</_>\n        <_>\n          10 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 14 2 -1.</_>\n        <_>\n          11 5 7 1 2.</_>\n        <_>\n          4 6 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 10 12 -1.</_>\n        <_>\n          1 2 5 6 2.</_>\n        <_>\n          6 8 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 14 3 -1.</_>\n        <_>\n          6 2 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 2 3 -1.</_>\n        <_>\n          8 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 4 2 -1.</_>\n        <_>\n          5 15 2 1 2.</_>\n        <_>\n          7 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 1 3 -1.</_>\n        <_>\n          10 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 4 4 -1.</_>\n        <_>\n          8 16 2 2 2.</_>\n        <_>\n          10 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 6 -1.</_>\n        <_>\n          6 14 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 5 2 -1.</_>\n        <_>\n          2 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 6 6 -1.</_>\n        <_>\n          16 14 3 3 2.</_>\n        <_>\n          13 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 4 -1.</_>\n        <_>\n          7 9 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 6 6 -1.</_>\n        <_>\n          16 14 3 3 2.</_>\n        <_>\n          13 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 6 -1.</_>\n        <_>\n          0 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 20 -1.</_>\n        <_>\n          5 10 15 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 6 -1.</_>\n        <_>\n          1 14 3 3 2.</_>\n        <_>\n          4 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 6 -1.</_>\n        <_>\n          10 14 2 3 2.</_>\n        <_>\n          8 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 1 -1.</_>\n        <_>\n          8 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 2 -1.</_>\n        <_>\n          9 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 4 6 -1.</_>\n        <_>\n          14 14 2 3 2.</_>\n        <_>\n          12 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 4 6 -1.</_>\n        <_>\n          4 14 2 3 2.</_>\n        <_>\n          6 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 2 6 -1.</_>\n        <_>\n          14 14 1 3 2.</_>\n        <_>\n          13 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 2 6 -1.</_>\n        <_>\n          5 14 1 3 2.</_>\n        <_>\n          6 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 12 -1.</_>\n        <_>\n          7 4 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 2 -1.</_>\n        <_>\n          4 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 3 13 -1.</_>\n        <_>\n          11 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 13 -1.</_>\n        <_>\n          8 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 3 -1.</_>\n        <_>\n          10 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 2 -1.</_>\n        <_>\n          4 11 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 8 -1.</_>\n        <_>\n          16 12 3 4 2.</_>\n        <_>\n          13 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 5 -1.</_>\n        <_>\n          9 6 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 2 7 -1.</_>\n        <_>\n          17 11 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 8 2 -1.</_>\n        <_>\n          7 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 3 -1.</_>\n        <_>\n          6 10 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 4 3 -1.</_>\n        <_>\n          4 4 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 4 3 -1.</_>\n        <_>\n          11 4 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 17 12 -1.</_>\n        <_>\n          1 8 17 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 4 3 -1.</_>\n        <_>\n          11 4 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 3 -1.</_>\n        <_>\n          4 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 5 3 -1.</_>\n        <_>\n          12 4 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 2 7 -1.</_>\n        <_>\n          2 11 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 8 -1.</_>\n        <_>\n          16 12 1 4 2.</_>\n        <_>\n          15 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 11 3 -1.</_>\n        <_>\n          4 9 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 2 -1.</_>\n        <_>\n          12 13 3 1 2.</_>\n        <_>\n          9 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 4 3 -1.</_>\n        <_>\n          6 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          10 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 3 -1.</_>\n        <_>\n          5 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 3 -1.</_>\n        <_>\n          9 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 16 3 -1.</_>\n        <_>\n          0 3 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 8 -1.</_>\n        <_>\n          16 12 1 4 2.</_>\n        <_>\n          15 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 8 -1.</_>\n        <_>\n          3 12 1 4 2.</_>\n        <_>\n          4 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 3 6 -1.</_>\n        <_>\n          14 15 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 6 -1.</_>\n        <_>\n          3 15 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 10 2 -1.</_>\n        <_>\n          11 5 5 1 2.</_>\n        <_>\n          6 6 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 14 6 -1.</_>\n        <_>\n          2 17 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 3 -1.</_>\n        <_>\n          10 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 2 2 -1.</_>\n        <_>\n          4 16 1 1 2.</_>\n        <_>\n          5 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 2 3 -1.</_>\n        <_>\n          10 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 20 2 -1.</_>\n        <_>\n          0 17 10 1 2.</_>\n        <_>\n          10 18 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 1 3 -1.</_>\n        <_>\n          13 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 2 -1.</_>\n        <_>\n          9 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 3 3 -1.</_>\n        <_>\n          13 2 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 2 2 -1.</_>\n        <_>\n          3 18 1 1 2.</_>\n        <_>\n          4 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 4 -1.</_>\n        <_>\n          10 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 3 -1.</_>\n        <_>\n          6 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 5 2 -1.</_>\n        <_>\n          13 2 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 2 -1.</_>\n        <_>\n          7 14 3 1 2.</_>\n        <_>\n          10 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 4 -1.</_>\n        <_>\n          12 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 12 6 -1.</_>\n        <_>\n          5 13 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 5 2 -1.</_>\n        <_>\n          14 12 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 14 4 -1.</_>\n        <_>\n          2 15 7 2 2.</_>\n        <_>\n          9 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 2 -1.</_>\n        <_>\n          10 7 7 1 2.</_>\n        <_>\n          3 8 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 4 2 -1.</_>\n        <_>\n          1 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 14 -1.</_>\n        <_>\n          16 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 1 3 -1.</_>\n        <_>\n          4 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 14 -1.</_>\n        <_>\n          16 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 3 7 -1.</_>\n        <_>\n          2 10 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 9 2 -1.</_>\n        <_>\n          8 13 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 1 -1.</_>\n        <_>\n          10 6 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 4 -1.</_>\n        <_>\n          8 4 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 2 -1.</_>\n        <_>\n          0 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 9 -1.</_>\n        <_>\n          5 6 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 10 -1.</_>\n        <_>\n          15 2 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 2 7 -1.</_>\n        <_>\n          9 2 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 12 1 -1.</_>\n        <_>\n          11 4 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 9 1 -1.</_>\n        <_>\n          6 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 1 4 -1.</_>\n        <_>\n          15 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 4 -1.</_>\n        <_>\n          7 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 1 6 -1.</_>\n        <_>\n          15 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 6 3 -1.</_>\n        <_>\n          7 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 2 16 -1.</_>\n        <_>\n          15 3 1 8 2.</_>\n        <_>\n          14 11 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 1 6 -1.</_>\n        <_>\n          4 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 5 2 -1.</_>\n        <_>\n          12 2 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 4 2 -1.</_>\n        <_>\n          6 18 2 1 2.</_>\n        <_>\n          8 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 16 10 -1.</_>\n        <_>\n          10 4 8 5 2.</_>\n        <_>\n          2 9 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 1 10 -1.</_>\n        <_>\n          6 10 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 15 2 -1.</_>\n        <_>\n          9 8 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 2 -1.</_>\n        <_>\n          6 8 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 6 -1.</_>\n        <_>\n          9 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 2 -1.</_>\n        <_>\n          9 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 3 -1.</_>\n        <_>\n          1 1 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 7 2 -1.</_>\n        <_>\n          11 3 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 18 -1.</_>\n        <_>\n          5 7 10 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 2 -1.</_>\n        <_>\n          18 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 1 3 -1.</_>\n        <_>\n          8 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 6 -1.</_>\n        <_>\n          3 16 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 4 -1.</_>\n        <_>\n          1 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 5 2 -1.</_>\n        <_>\n          12 2 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 5 2 -1.</_>\n        <_>\n          3 2 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 3 -1.</_>\n        <_>\n          10 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 2 3 -1.</_>\n        <_>\n          8 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 3 -1.</_>\n        <_>\n          14 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 3 -1.</_>\n        <_>\n          7 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 4 -1.</_>\n        <_>\n          10 6 5 2 2.</_>\n        <_>\n          5 8 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 1 6 -1.</_>\n        <_>\n          9 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 2 -1.</_>\n        <_>\n          11 12 1 1 2.</_>\n        <_>\n          10 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 3 -1.</_>\n        <_>\n          4 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 6 -1.</_>\n        <_>\n          14 6 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 2 3 -1.</_>\n        <_>\n          8 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 6 -1.</_>\n        <_>\n          16 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 6 -1.</_>\n        <_>\n          0 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 2 3 -1.</_>\n        <_>\n          14 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 8 1 -1.</_>\n        <_>\n          8 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 3 -1.</_>\n        <_>\n          8 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 10 6 -1.</_>\n        <_>\n          5 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 2 -1.</_>\n        <_>\n          8 16 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          10 9 4 4 2.</_>\n        <_>\n          6 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 6 -1.</_>\n        <_>\n          7 12 2 3 2.</_>\n        <_>\n          9 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 3 1 -1.</_>\n        <_>\n          11 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 10 -1.</_>\n        <_>\n          9 7 1 5 2.</_>\n        <_>\n          10 12 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 6 -1.</_>\n        <_>\n          10 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 2 6 -1.</_>\n        <_>\n          3 13 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 1 2 -1.</_>\n        <_>\n          16 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 6 -1.</_>\n        <_>\n          1 14 3 3 2.</_>\n        <_>\n          4 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 6 -1.</_>\n        <_>\n          14 1 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 2 2 -1.</_>\n        <_>\n          8 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 3 -1.</_>\n        <_>\n          10 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          8 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 3 -1.</_>\n        <_>\n          14 0 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 9 -1.</_>\n        <_>\n          7 0 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 15 -1.</_>\n        <_>\n          11 5 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 15 -1.</_>\n        <_>\n          7 5 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 3 -1.</_>\n        <_>\n          14 0 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 3 -1.</_>\n        <_>\n          5 0 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 2 -1.</_>\n        <_>\n          12 12 1 1 2.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 2 2 -1.</_>\n        <_>\n          7 12 1 1 2.</_>\n        <_>\n          8 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 4 -1.</_>\n        <_>\n          13 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 3 -1.</_>\n        <_>\n          4 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 2 -1.</_>\n        <_>\n          12 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 2 -1.</_>\n        <_>\n          9 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 2 -1.</_>\n        <_>\n          10 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 2 -1.</_>\n        <_>\n          9 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 4 -1.</_>\n        <_>\n          13 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 4 -1.</_>\n        <_>\n          6 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 4 -1.</_>\n        <_>\n          10 14 6 2 2.</_>\n        <_>\n          4 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 2 3 -1.</_>\n        <_>\n          8 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 8 -1.</_>\n        <_>\n          10 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 8 -1.</_>\n        <_>\n          8 10 2 4 2.</_>\n        <_>\n          10 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 1 -1.</_>\n        <_>\n          11 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 1 6 -1.</_>\n        <_>\n          9 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 1 -1.</_>\n        <_>\n          11 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 1 -1.</_>\n        <_>\n          8 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 15 14 -1.</_>\n        <_>\n          5 9 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 2 10 -1.</_>\n        <_>\n          2 1 1 5 2.</_>\n        <_>\n          3 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 2 3 -1.</_>\n        <_>\n          14 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 3 3 -1.</_>\n        <_>\n          3 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 3 -1.</_>\n        <_>\n          17 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 3 -1.</_>\n        <_>\n          0 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 2 -1.</_>\n        <_>\n          16 5 3 1 2.</_>\n        <_>\n          13 6 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 12 1 -1.</_>\n        <_>\n          8 19 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 4 -1.</_>\n        <_>\n          12 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 1 3 -1.</_>\n        <_>\n          3 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 6 4 -1.</_>\n        <_>\n          11 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 10 -1.</_>\n        <_>\n          3 10 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 2 4 -1.</_>\n        <_>\n          12 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 4 -1.</_>\n        <_>\n          7 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 3 -1.</_>\n        <_>\n          10 14 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 3 -1.</_>\n        <_>\n          10 1 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 2 -1.</_>\n        <_>\n          11 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 2 -1.</_>\n        <_>\n          8 6 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 2 -1.</_>\n        <_>\n          9 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 6 -1.</_>\n        <_>\n          2 11 8 3 2.</_>\n        <_>\n          10 14 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 2 -1.</_>\n        <_>\n          13 7 1 1 2.</_>\n        <_>\n          12 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 3 -1.</_>\n        <_>\n          9 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 2 -1.</_>\n        <_>\n          10 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 12 -1.</_>\n        <_>\n          5 7 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 2 -1.</_>\n        <_>\n          13 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 2 -1.</_>\n        <_>\n          5 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 2 3 -1.</_>\n        <_>\n          4 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 6 -1.</_>\n        <_>\n          10 14 1 3 2.</_>\n        <_>\n          9 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 3 2 -1.</_>\n        <_>\n          9 14 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          11 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 6 -1.</_>\n        <_>\n          7 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 1 2 -1.</_>\n        <_>\n          13 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 10 2 -1.</_>\n        <_>\n          0 3 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 1 2 -1.</_>\n        <_>\n          13 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 2 -1.</_>\n        <_>\n          5 7 1 1 2.</_>\n        <_>\n          6 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 7 -1.</_>\n        <_>\n          13 5 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 1 2 -1.</_>\n        <_>\n          6 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 7 -1.</_>\n        <_>\n          12 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 16 -1.</_>\n        <_>\n          0 3 1 8 2.</_>\n        <_>\n          1 11 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 7 -1.</_>\n        <_>\n          12 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 7 -1.</_>\n        <_>\n          7 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 8 4 -1.</_>\n        <_>\n          11 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 8 4 -1.</_>\n        <_>\n          5 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 7 -1.</_>\n        <_>\n          13 5 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 7 -1.</_>\n        <_>\n          6 5 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 14 -1.</_>\n        <_>\n          18 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 4 -1.</_>\n        <_>\n          6 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 1 2 -1.</_>\n        <_>\n          14 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 6 -1.</_>\n        <_>\n          0 1 9 3 2.</_>\n        <_>\n          9 4 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 1 2 -1.</_>\n        <_>\n          14 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 14 -1.</_>\n        <_>\n          0 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 12 -1.</_>\n        <_>\n          18 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 3 -1.</_>\n        <_>\n          0 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 16 -1.</_>\n        <_>\n          6 8 14 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 12 -1.</_>\n        <_>\n          1 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 7 -1.</_>\n        <_>\n          14 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 1 2 -1.</_>\n        <_>\n          5 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 6 -1.</_>\n        <_>\n          14 6 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 7 2 -1.</_>\n        <_>\n          5 8 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          8 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 1 -1.</_>\n        <_>\n          7 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 4 -1.</_>\n        <_>\n          16 0 3 2 2.</_>\n        <_>\n          13 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 12 -1.</_>\n        <_>\n          1 6 18 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 17 12 -1.</_>\n        <_>\n          3 6 17 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 7 3 -1.</_>\n        <_>\n          5 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 3 -1.</_>\n        <_>\n          10 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 3 3 -1.</_>\n        <_>\n          3 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 6 -1.</_>\n        <_>\n          14 6 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 6 -1.</_>\n        <_>\n          0 6 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 3 -1.</_>\n        <_>\n          4 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 6 -1.</_>\n        <_>\n          18 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 9 -1.</_>\n        <_>\n          10 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 2 -1.</_>\n        <_>\n          6 6 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 2 -1.</_>\n        <_>\n          6 5 2 1 2.</_>\n        <_>\n          8 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 2 3 -1.</_>\n        <_>\n          10 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 1 3 -1.</_>\n        <_>\n          9 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 2 -1.</_>\n        <_>\n          9 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 3 -1.</_>\n        <_>\n          0 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 6 -1.</_>\n        <_>\n          6 3 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 4 -1.</_>\n        <_>\n          1 0 3 2 2.</_>\n        <_>\n          4 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 7 -1.</_>\n        <_>\n          14 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 2 -1.</_>\n        <_>\n          9 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 10 -1.</_>\n        <_>\n          11 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 19 2 -1.</_>\n        <_>\n          0 11 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 8 9 -1.</_>\n        <_>\n          9 8 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 7 -1.</_>\n        <_>\n          5 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 12 -1.</_>\n        <_>\n          10 6 2 6 2.</_>\n        <_>\n          8 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 4 -1.</_>\n        <_>\n          0 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 7 -1.</_>\n        <_>\n          9 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 4 -1.</_>\n        <_>\n          10 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 4 -1.</_>\n        <_>\n          9 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 1 -1.</_>\n        <_>\n          9 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 4 4 -1.</_>\n        <_>\n          7 14 2 2 2.</_>\n        <_>\n          9 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 4 6 -1.</_>\n        <_>\n          15 14 2 3 2.</_>\n        <_>\n          13 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 1 8 -1.</_>\n        <_>\n          7 12 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 8 -1.</_>\n        <_>\n          17 0 1 4 2.</_>\n        <_>\n          16 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 8 -1.</_>\n        <_>\n          2 0 1 4 2.</_>\n        <_>\n          3 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 14 3 -1.</_>\n        <_>\n          6 2 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 10 -1.</_>\n        <_>\n          7 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 2 -1.</_>\n        <_>\n          9 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 8 -1.</_>\n        <_>\n          7 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 6 -1.</_>\n        <_>\n          9 10 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 3 3 -1.</_>\n        <_>\n          7 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 2 -1.</_>\n        <_>\n          6 1 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 14 -1.</_>\n        <_>\n          7 8 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 1 -1.</_>\n        <_>\n          7 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          9 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 9 -1.</_>\n        <_>\n          10 3 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 2 3 -1.</_>\n        <_>\n          18 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 3 1 -1.</_>\n        <_>\n          8 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 4 -1.</_>\n        <_>\n          11 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 3 6 -1.</_>\n        <_>\n          8 14 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 4 -1.</_>\n        <_>\n          11 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 4 -1.</_>\n        <_>\n          8 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 9 -1.</_>\n        <_>\n          7 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 2 3 -1.</_>\n        <_>\n          0 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 8 3 -1.</_>\n        <_>\n          8 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 6 -1.</_>\n        <_>\n          0 4 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 1 3 -1.</_>\n        <_>\n          9 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 14 4 -1.</_>\n        <_>\n          0 17 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 6 -1.</_>\n        <_>\n          1 17 18 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 0 5 3 2.</_>\n        <_>\n          5 3 5 3 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "OpenCVComponent/Assets/haarcascade_mouth.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<!----------------------------------------------------------------------------\r\n  25x15 Mouth detector computed with 7000 positive samples\r\n\r\n//////////////////////////////////////////////////////////////////////////\r\n| Contributors License Agreement\r\n| IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\r\n|   By downloading, copying, installing or using the software you agree \r\n|   to this license.\r\n|   If you do not agree to this license, do not download, install,\r\n|   copy or use the software.\r\n|\r\n| Copyright (c) 2006, Modesto Castrillon-Santana (IUSIANI, University of\r\n| Las Palmas de Gran Canaria, Spain).\r\n|  All rights reserved.\r\n|\r\n| Redistribution and use in source and binary forms, with or without\r\n| modification, are permitted provided that the following conditions are\r\n| met:\r\n|\r\n|    * Redistributions of source code must retain the above copyright\r\n|       notice, this list of conditions and the following disclaimer.\r\n|    * Redistributions in binary form must reproduce the above\r\n|      copyright notice, this list of conditions and the following\r\n|      disclaimer in the documentation and/or other materials provided\r\n|      with the distribution.  \r\n|    * The name of Contributor may not used to endorse or promote products \r\n|      derived from this software without specific prior written permission.\r\n|\r\n| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n| \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\r\n| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r\n| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n| PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r\n| PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r\n| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r\n| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\n| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  Back to\r\n| Top\r\n//////////////////////////////////////////////////////////////////////////\r\n\r\nRESEARCH USE:\r\nIf you are using any of the detectors or involved ideas please cite one of these papers:\r\n\r\n@ARTICLE{Castrillon07-jvci,\r\n  author =       \"Castrill\\'on Santana, M. and D\\'eniz Su\\'arez, O. and Hern\\'andez Tejera, M. and Guerra Artal, C.\",\r\n  title =        \"ENCARA2: Real-time Detection of Multiple Faces at Different Resolutions in Video Streams\",\r\n  journal =      \"Journal of Visual Communication and Image Representation\",\r\n  year =         \"2007\",\r\n  vol =          \"18\",\r\n  issue =        \"2\",\r\n  month =        \"April\",\r\n  pages =        \"130-140\"\r\n}\r\n\r\n@INPROCEEDINGS{Castrillon07-swb,\r\n  author =       \"Castrill\\'on Santana, M. and D\\'eniz Su\\'arez, O. and Hern\\'andez Sosa, D. and Lorenzo Navarro, J. \",\r\n  title =        \"Using Incremental Principal Component Analysis to Learn a Gender Classifier Automatically\",\r\n  booktitle =    \"1st Spanish Workshop on Biometrics\",\r\n  year =         \"2007\",\r\n  month =        \"June\",\r\n  address =      \"Girona, Spain\",\r\n  file = F\r\n}\r\n\r\nA comparison of this and other face related classifiers can be found in:\r\n\r\n@InProceedings{Castrillon08a-visapp,\r\n 'athor =       \"Modesto Castrill\\'on-Santana and O. D\\'eniz-Su\\'arez, L. Ant\\'on-Canal\\'{\\i}s and J. Lorenzo-Navarro\",\r\n  title =        \"Face and Facial Feature Detection Evaluation\"\r\n  booktitle =    \"Third International Conference on Computer Vision Theory and Applications, VISAPP08\"\r\n  year =         \"2008\",\r\n  month =        \"January\"\r\n}\r\n\r\nMore information can be found at http://mozart.dis.ulpgc.es/Gias/modesto_eng.html or in the papers.\r\n\r\nCOMMERCIAL USE:\r\nIf you have any commercial interest in this work please contact \r\nmcastrillon@iusiani.ulpgc.es\r\n------------------------------------------------------------------------>\r\n<opencv_storage>\r\n<Boca_17stages type_id=\"opencv-haar-classifier\">\r\n  <size>\r\n    25 15</size>\r\n  <stages>\r\n    <_>\r\n      <!-- stage 0 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 14 9 -1.</_>\r\n                <_>\r\n                  0 3 14 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1192855015397072</threshold>\r\n            <left_val>0.7854182124137878</left_val>\r\n            <right_val>-0.4541360139846802</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 1 8 14 -1.</_>\r\n                <_>\r\n                  17 8 8 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0641647726297379</threshold>\r\n            <left_val>-0.7407680749893189</left_val>\r\n            <right_val>0.2652035951614380</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 3 11 6 -1.</_>\r\n                <_>\r\n                  7 5 11 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0910761803388596</threshold>\r\n            <left_val>-0.2063370943069458</left_val>\r\n            <right_val>0.8400946259498596</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 15 6 -1.</_>\r\n                <_>\r\n                  5 4 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1129330024123192</threshold>\r\n            <left_val>0.8284121751785278</left_val>\r\n            <right_val>-0.1866362988948822</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 4 11 6 -1.</_>\r\n                <_>\r\n                  6 6 11 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0741933435201645</threshold>\r\n            <left_val>0.8354660272598267</left_val>\r\n            <right_val>-0.1527701020240784</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 1 6 3 -1.</_>\r\n                <_>\r\n                  19 1 2 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.1404659491963685e-005</threshold>\r\n            <left_val>-0.0716945603489876</left_val>\r\n            <right_val>0.1858334988355637</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 15 6 -1.</_>\r\n                <_>\r\n                  5 2 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0996975302696228</threshold>\r\n            <left_val>0.6870458126068115</left_val>\r\n            <right_val>-0.1721730977296829</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 3 13 6 -1.</_>\r\n                <_>\r\n                  7 5 13 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0900413617491722</threshold>\r\n            <left_val>0.7310237884521484</left_val>\r\n            <right_val>-0.1368771940469742</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 6 5 -1.</_>\r\n                <_>\r\n                  8 3 3 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.5138311320915818e-004</threshold>\r\n            <left_val>-0.3469826877117157</left_val>\r\n            <right_val>0.3647777140140533</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 14 4 1 -1.</_>\r\n                <_>\r\n                  21 14 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.6144449546118267e-005</threshold>\r\n            <left_val>-0.3085466027259827</left_val>\r\n            <right_val>0.2320024073123932</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 3 12 -1.</_>\r\n                <_>\r\n                  0 7 3 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.9363909814273939e-005</threshold>\r\n            <left_val>-0.3819856047630310</left_val>\r\n            <right_val>0.2404107004404068</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 10 3 4 -1.</_>\r\n                <_>\r\n                  22 11 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.9673648104071617e-003</threshold>\r\n            <left_val>0.0545878112316132</left_val>\r\n            <right_val>-0.7487065792083740</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 10 3 4 -1.</_>\r\n                <_>\r\n                  0 11 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.7189309261739254e-003</threshold>\r\n            <left_val>-0.7476686835289002</left_val>\r\n            <right_val>0.1205869019031525</right_val></_></_></trees>\r\n      <stage_threshold>-1.4372119903564453</stage_threshold>\r\n      <parent>-1</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 1 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 15 8 -1.</_>\r\n                <_>\r\n                  5 2 15 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1006335020065308</threshold>\r\n            <left_val>0.7848083972930908</left_val>\r\n            <right_val>-0.3866829872131348</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 0 5 9 -1.</_>\r\n                <_>\r\n                  20 3 5 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0366767607629299</threshold>\r\n            <left_val>0.5453233718872070</left_val>\r\n            <right_val>-0.4012677967548370</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 2 13 4 -1.</_>\r\n                <_>\r\n                  6 4 13 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0815562233328819</threshold>\r\n            <left_val>-0.1315398067235947</left_val>\r\n            <right_val>0.8084958195686340</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 2 15 6 -1.</_>\r\n                <_>\r\n                  7 4 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1064186021685600</threshold>\r\n            <left_val>0.6782389879226685</left_val>\r\n            <right_val>-0.2083356976509094</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 3 4 12 -1.</_>\r\n                <_>\r\n                  2 9 4 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0156307406723499</threshold>\r\n            <left_val>-0.3749788105487824</left_val>\r\n            <right_val>0.3150509893894196</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 1 14 6 -1.</_>\r\n                <_>\r\n                  6 3 14 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0711290463805199</threshold>\r\n            <left_val>-0.1557385027408600</left_val>\r\n            <right_val>0.7050542831420898</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 3 9 6 -1.</_>\r\n                <_>\r\n                  8 5 9 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0736639127135277</threshold>\r\n            <left_val>-0.1547683030366898</left_val>\r\n            <right_val>0.6715884804725647</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 0 4 6 -1.</_>\r\n                <_>\r\n                  21 3 4 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.0592950275167823e-004</threshold>\r\n            <left_val>0.1365388035774231</left_val>\r\n            <right_val>-0.2670182883739471</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 12 1 3 -1.</_>\r\n                <_>\r\n                  1 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.9239520188421011e-003</threshold>\r\n            <left_val>-0.7261438965797424</left_val>\r\n            <right_val>0.1364576965570450</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 12 1 3 -1.</_>\r\n                <_>\r\n                  23 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.3057300131767988e-003</threshold>\r\n            <left_val>0.0706136971712112</left_val>\r\n            <right_val>-0.6423184275627136</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 12 1 3 -1.</_>\r\n                <_>\r\n                  1 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.8073299434036016e-003</threshold>\r\n            <left_val>0.1355642974376679</left_val>\r\n            <right_val>-0.7050786018371582</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 7 11 8 -1.</_>\r\n                <_>\r\n                  7 9 11 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0664333626627922</threshold>\r\n            <left_val>0.6158788204193115</left_val>\r\n            <right_val>-0.1400263011455536</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 4 9 6 -1.</_>\r\n                <_>\r\n                  8 6 9 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0689277201890945</threshold>\r\n            <left_val>0.6765924096107483</left_val>\r\n            <right_val>-0.1224988028407097</right_val></_></_></trees>\r\n      <stage_threshold>-1.5416599512100220</stage_threshold>\r\n      <parent>0</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 2 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 15 9 -1.</_>\r\n                <_>\r\n                  1 3 15 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1822655051946640</threshold>\r\n            <left_val>0.5961514711380005</left_val>\r\n            <right_val>-0.3195483088493347</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 0 11 15 -1.</_>\r\n                <_>\r\n                  9 5 11 5 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2893281877040863</threshold>\r\n            <left_val>-0.0240151602774858</left_val>\r\n            <right_val>0.3762707114219666</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 3 4 -1.</_>\r\n                <_>\r\n                  0 9 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.2456621304154396e-003</threshold>\r\n            <left_val>-0.7117397785186768</left_val>\r\n            <right_val>0.1214720010757446</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 9 12 6 -1.</_>\r\n                <_>\r\n                  7 12 12 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0545681491494179</threshold>\r\n            <left_val>-0.1822118014097214</left_val>\r\n            <right_val>0.4597271978855133</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 2 6 -1.</_>\r\n                <_>\r\n                  0 7 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.4434829615056515e-003</threshold>\r\n            <left_val>-0.5354676842689514</left_val>\r\n            <right_val>0.1655835956335068</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 0 2 11 -1.</_>\r\n                <_>\r\n                  14 0 1 11 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0204923897981644</threshold>\r\n            <left_val>-0.8770608901977539</left_val>\r\n            <right_val>-0.0151639897376299</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 2 6 -1.</_>\r\n                <_>\r\n                  0 11 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.8007471486926079e-003</threshold>\r\n            <left_val>-0.5431423187255859</left_val>\r\n            <right_val>0.1356130987405777</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 12 -1.</_>\r\n                <_>\r\n                  13 0 12 6 2.</_>\r\n                <_>\r\n                  1 6 12 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1226660013198853</threshold>\r\n            <left_val>0.1124472022056580</left_val>\r\n            <right_val>-0.6574401855468750</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 3 4 -1.</_>\r\n                <_>\r\n                  0 2 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.5254979088203982e-005</threshold>\r\n            <left_val>0.1536739021539688</left_val>\r\n            <right_val>-0.3841981887817383</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 3 14 6 -1.</_>\r\n                <_>\r\n                  7 5 14 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1131860986351967</threshold>\r\n            <left_val>0.4927195906639099</left_val>\r\n            <right_val>-0.1094276010990143</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 4 -1.</_>\r\n                <_>\r\n                  5 5 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0792956873774529</threshold>\r\n            <left_val>-0.1647461056709290</left_val>\r\n            <right_val>0.4720517992973328</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 13 12 1 -1.</_>\r\n                <_>\r\n                  12 13 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0148729300126433</threshold>\r\n            <left_val>0.0740143731236458</left_val>\r\n            <right_val>-0.5926275849342346</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 3 12 6 -1.</_>\r\n                <_>\r\n                  8 3 6 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0538397915661335</threshold>\r\n            <left_val>-0.2111544013023377</left_val>\r\n            <right_val>0.3537890911102295</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 2 4 9 -1.</_>\r\n                <_>\r\n                  21 2 2 9 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0759592726826668</threshold>\r\n            <left_val>0.5931801795959473</left_val>\r\n            <right_val>-0.1090068966150284</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 2 13 6 -1.</_>\r\n                <_>\r\n                  6 4 13 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1158166006207466</threshold>\r\n            <left_val>-0.0984905213117599</left_val>\r\n            <right_val>0.5940334796905518</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 2 -1.</_>\r\n                <_>\r\n                  5 4 15 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0160826407372952</threshold>\r\n            <left_val>0.3794195055961609</left_val>\r\n            <right_val>-0.1654051989316940</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 5 3 -1.</_>\r\n                <_>\r\n                  0 12 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.7254770547151566e-003</threshold>\r\n            <left_val>0.0937571078538895</left_val>\r\n            <right_val>-0.7060937881469727</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 0 11 14 -1.</_>\r\n                <_>\r\n                  14 7 11 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0611884109675884</threshold>\r\n            <left_val>-0.4381029903888702</left_val>\r\n            <right_val>0.0796229690313339</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 10 4 1 -1.</_>\r\n                <_>\r\n                  3 11 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-5.5152038112282753e-003</threshold>\r\n            <left_val>-0.7019357085227966</left_val>\r\n            <right_val>0.0781789273023605</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 12 -1.</_>\r\n                <_>\r\n                  13 0 12 6 2.</_>\r\n                <_>\r\n                  1 6 12 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1988534033298492</threshold>\r\n            <left_val>-0.6726130843162537</left_val>\r\n            <right_val>0.0560497716069222</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 6 6 -1.</_>\r\n                <_>\r\n                  0 4 3 3 2.</_>\r\n                <_>\r\n                  3 7 3 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0194473192095757</threshold>\r\n            <left_val>-0.1165110021829605</left_val>\r\n            <right_val>0.4151527881622315</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 9 1 4 -1.</_>\r\n                <_>\r\n                  22 10 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-4.6706218272447586e-003</threshold>\r\n            <left_val>-0.6090158820152283</left_val>\r\n            <right_val>0.1049979999661446</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 9 4 1 -1.</_>\r\n                <_>\r\n                  3 10 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>4.0827528573572636e-003</threshold>\r\n            <left_val>0.0689968466758728</left_val>\r\n            <right_val>-0.5490871071815491</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 4 8 10 -1.</_>\r\n                <_>\r\n                  20 4 4 5 2.</_>\r\n                <_>\r\n                  16 9 4 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0201979596167803</threshold>\r\n            <left_val>0.2884930074214935</left_val>\r\n            <right_val>-0.1804888993501663</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 7 9 6 -1.</_>\r\n                <_>\r\n                  8 9 9 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0504430681467056</threshold>\r\n            <left_val>-0.0897706300020218</left_val>\r\n            <right_val>0.4609920978546143</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 12 4 3 -1.</_>\r\n                <_>\r\n                  12 12 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.0139562226831913e-003</threshold>\r\n            <left_val>-0.4820869863033295</left_val>\r\n            <right_val>0.0588099807500839</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 3 3 -1.</_>\r\n                <_>\r\n                  0 1 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.5741933435201645e-003</threshold>\r\n            <left_val>0.0568646714091301</left_val>\r\n            <right_val>-0.5979083180427551</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 9 14 2 -1.</_>\r\n                <_>\r\n                  11 9 7 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0121624497696757</threshold>\r\n            <left_val>0.1446305960416794</left_val>\r\n            <right_val>-0.1168325990438461</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 13 4 1 -1.</_>\r\n                <_>\r\n                  10 13 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.9329390488564968e-003</threshold>\r\n            <left_val>-0.5450860857963562</left_val>\r\n            <right_val>0.0609783902764320</right_val></_></_></trees>\r\n      <stage_threshold>-1.5324319601058960</stage_threshold>\r\n      <parent>1</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 3 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 8 6 -1.</_>\r\n                <_>\r\n                  0 3 8 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0320550985634327</threshold>\r\n            <left_val>0.4280030131340027</left_val>\r\n            <right_val>-0.4258942902088165</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 15 6 -1.</_>\r\n                <_>\r\n                  5 3 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1231034025549889</threshold>\r\n            <left_val>0.5121241807937622</left_val>\r\n            <right_val>-0.2055584937334061</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 4 3 -1.</_>\r\n                <_>\r\n                  0 8 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.8588259853422642e-003</threshold>\r\n            <left_val>-0.7101820707321167</left_val>\r\n            <right_val>0.1075906008481979</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 3 20 6 -1.</_>\r\n                <_>\r\n                  8 3 10 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0977141335606575</threshold>\r\n            <left_val>-0.1477957963943481</left_val>\r\n            <right_val>0.4571174979209900</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 24 5 -1.</_>\r\n                <_>\r\n                  6 6 12 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0527394600212574</threshold>\r\n            <left_val>0.3743767142295837</left_val>\r\n            <right_val>-0.2183827012777329</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 5 9 6 -1.</_>\r\n                <_>\r\n                  8 7 9 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0584189109504223</threshold>\r\n            <left_val>-0.1386294066905975</left_val>\r\n            <right_val>0.4993282854557037</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 14 4 -1.</_>\r\n                <_>\r\n                  5 4 14 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0887569189071655</threshold>\r\n            <left_val>-0.1315895020961762</left_val>\r\n            <right_val>0.6216561794281006</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 8 3 6 -1.</_>\r\n                <_>\r\n                  22 10 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0145876696333289</threshold>\r\n            <left_val>0.0915696695446968</left_val>\r\n            <right_val>-0.5815675258636475</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 9 18 2 -1.</_>\r\n                <_>\r\n                  3 9 9 1 2.</_>\r\n                <_>\r\n                  12 10 9 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1044600009918213</threshold>\r\n            <left_val>5.2740359678864479e-003</left_val>\r\n            <right_val>-5.6644519531250000e+004</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 8 3 6 -1.</_>\r\n                <_>\r\n                  22 10 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.4322784096002579e-003</threshold>\r\n            <left_val>-0.4866046011447907</left_val>\r\n            <right_val>0.0979617610573769</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 6 -1.</_>\r\n                <_>\r\n                  0 0 12 3 2.</_>\r\n                <_>\r\n                  12 3 12 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0406559295952320</threshold>\r\n            <left_val>0.1391579061746597</left_val>\r\n            <right_val>-0.3656015992164612</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 11 4 4 -1.</_>\r\n                <_>\r\n                  15 11 2 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.3366899266839027e-003</threshold>\r\n            <left_val>0.0641745477914810</left_val>\r\n            <right_val>-0.6245471239089966</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 5 15 2 -1.</_>\r\n                <_>\r\n                  5 6 15 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0158455893397331</threshold>\r\n            <left_val>-0.1791914999485016</left_val>\r\n            <right_val>0.2889905869960785</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 4 15 6 -1.</_>\r\n                <_>\r\n                  5 6 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0746863335371017</threshold>\r\n            <left_val>0.5424023270606995</left_val>\r\n            <right_val>-0.1314727962017059</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 2 3 -1.</_>\r\n                <_>\r\n                  0 8 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.7695250250399113e-003</threshold>\r\n            <left_val>0.0965340435504913</left_val>\r\n            <right_val>-0.6561154723167419</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 6 13 6 -1.</_>\r\n                <_>\r\n                  6 8 13 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0535226687788963</threshold>\r\n            <left_val>0.4636800885200501</left_val>\r\n            <right_val>-0.1353430002927780</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 6 3 -1.</_>\r\n                <_>\r\n                  0 12 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.3648750074207783e-003</threshold>\r\n            <left_val>-0.6624563932418823</left_val>\r\n            <right_val>0.0684857368469238</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 0 14 14 -1.</_>\r\n                <_>\r\n                  11 7 14 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.2447337061166763</threshold>\r\n            <left_val>-0.8181337118148804</left_val>\r\n            <right_val>0.0450799688696861</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 13 4 1 -1.</_>\r\n                <_>\r\n                  8 13 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.4634969886392355e-003</threshold>\r\n            <left_val>-0.7681804895401001</left_val>\r\n            <right_val>0.0495845898985863</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 9 13 6 -1.</_>\r\n                <_>\r\n                  6 11 13 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0358034893870354</threshold>\r\n            <left_val>0.3749603927135468</left_val>\r\n            <right_val>-0.1447928994894028</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 4 4 -1.</_>\r\n                <_>\r\n                  0 10 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.6720529682934284e-003</threshold>\r\n            <left_val>-0.6127536296844482</left_val>\r\n            <right_val>0.0935847163200378</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 0 4 6 -1.</_>\r\n                <_>\r\n                  21 3 4 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0132687101140618</threshold>\r\n            <left_val>0.2863784134387970</left_val>\r\n            <right_val>-0.2551889121532440</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 12 6 3 -1.</_>\r\n                <_>\r\n                  0 13 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.2518939375877380e-003</threshold>\r\n            <left_val>-0.5896773934364319</left_val>\r\n            <right_val>0.0677111670374870</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 11 4 3 -1.</_>\r\n                <_>\r\n                  17 11 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.3092570528388023e-003</threshold>\r\n            <left_val>0.0272198095917702</left_val>\r\n            <right_val>-0.5714861154556274</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 10 8 -1.</_>\r\n                <_>\r\n                  0 7 5 4 2.</_>\r\n                <_>\r\n                  5 11 5 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0258194394409657</threshold>\r\n            <left_val>-0.1326007992029190</left_val>\r\n            <right_val>0.3050251901149750</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 2 3 8 -1.</_>\r\n                <_>\r\n                  22 2 3 4 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0211078803986311</threshold>\r\n            <left_val>0.1200629025697708</left_val>\r\n            <right_val>-0.1475265026092529</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 3 16 4 -1.</_>\r\n                <_>\r\n                  9 3 8 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0408483408391476</threshold>\r\n            <left_val>-0.1736883074045181</left_val>\r\n            <right_val>0.2530446052551270</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 13 24 2 -1.</_>\r\n                <_>\r\n                  13 13 12 1 2.</_>\r\n                <_>\r\n                  1 14 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0179475992918015</threshold>\r\n            <left_val>-0.7117617130279541</left_val>\r\n            <right_val>0.0583698004484177</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 5 4 10 -1.</_>\r\n                <_>\r\n                  6 5 2 10 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0138895902782679</threshold>\r\n            <left_val>-0.6778132915496826</left_val>\r\n            <right_val>0.0435630008578300</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 7 2 6 -1.</_>\r\n                <_>\r\n                  11 9 2 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-9.8488982766866684e-003</threshold>\r\n            <left_val>0.1479212939739227</left_val>\r\n            <right_val>-0.0897465273737907</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 9 8 6 -1.</_>\r\n                <_>\r\n                  8 12 8 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0659847036004066</threshold>\r\n            <left_val>0.5683801770210266</left_val>\r\n            <right_val>-0.0681742578744888</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 7 1 4 -1.</_>\r\n                <_>\r\n                  24 8 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.8370660254731774e-003</threshold>\r\n            <left_val>-0.4986937940120697</left_val>\r\n            <right_val>0.0779643580317497</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 7 15 6 -1.</_>\r\n                <_>\r\n                  5 9 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0277651809155941</threshold>\r\n            <left_val>0.2679949104785919</left_val>\r\n            <right_val>-0.1382624953985214</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 8 4 3 -1.</_>\r\n                <_>\r\n                  21 9 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.9889356642961502e-003</threshold>\r\n            <left_val>0.0445619411766529</left_val>\r\n            <right_val>-0.7317379117012024</right_val></_></_></trees>\r\n      <stage_threshold>-1.4849940538406372</stage_threshold>\r\n      <parent>2</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 4 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 15 4 -1.</_>\r\n                <_>\r\n                  5 3 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0456383489072323</threshold>\r\n            <left_val>0.6275423169136047</left_val>\r\n            <right_val>-0.2494937032461166</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 4 15 3 -1.</_>\r\n                <_>\r\n                  6 5 15 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0310676805675030</threshold>\r\n            <left_val>0.6427816152572632</left_val>\r\n            <right_val>-0.1671900004148483</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 2 12 -1.</_>\r\n                <_>\r\n                  0 3 1 6 2.</_>\r\n                <_>\r\n                  1 9 1 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.0193419661372900e-003</threshold>\r\n            <left_val>-0.2399346977472305</left_val>\r\n            <right_val>0.3676818013191223</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 3 11 4 -1.</_>\r\n                <_>\r\n                  7 4 11 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0315676406025887</threshold>\r\n            <left_val>-0.1147691980004311</left_val>\r\n            <right_val>0.5750172734260559</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 6 6 -1.</_>\r\n                <_>\r\n                  0 3 6 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.4146341755986214e-003</threshold>\r\n            <left_val>0.2154625058174133</left_val>\r\n            <right_val>-0.3768770098686218</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 3 1 12 -1.</_>\r\n                <_>\r\n                  24 7 1 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.7010860182344913e-003</threshold>\r\n            <left_val>-0.4533824026584625</left_val>\r\n            <right_val>0.0946888476610184</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 12 -1.</_>\r\n                <_>\r\n                  0 0 12 6 2.</_>\r\n                <_>\r\n                  12 6 12 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1890300065279007</threshold>\r\n            <left_val>0.0801155269145966</left_val>\r\n            <right_val>-0.7184885144233704</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 1 24 14 -1.</_>\r\n                <_>\r\n                  13 1 12 7 2.</_>\r\n                <_>\r\n                  1 8 12 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1293978989124298</threshold>\r\n            <left_val>0.1093719005584717</left_val>\r\n            <right_val>-0.5197048783302307</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 8 4 -1.</_>\r\n                <_>\r\n                  5 3 8 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0657683908939362</threshold>\r\n            <left_val>0.5003104209899902</left_val>\r\n            <right_val>-0.1238735020160675</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 9 1 4 -1.</_>\r\n                <_>\r\n                  23 10 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-4.0884059853851795e-003</threshold>\r\n            <left_val>-0.5118011236190796</left_val>\r\n            <right_val>0.0594223700463772</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 7 11 8 -1.</_>\r\n                <_>\r\n                  7 9 11 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0306642707437277</threshold>\r\n            <left_val>0.2964648902416229</left_val>\r\n            <right_val>-0.1741248071193695</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 9 1 4 -1.</_>\r\n                <_>\r\n                  23 10 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>2.7700960636138916e-003</threshold>\r\n            <left_val>0.0846907272934914</left_val>\r\n            <right_val>-0.4009515047073364</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 1 9 -1.</_>\r\n                <_>\r\n                  0 9 1 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.2402039766311646e-003</threshold>\r\n            <left_val>-0.5560923218727112</left_val>\r\n            <right_val>0.0800850465893745</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 2 9 3 -1.</_>\r\n                <_>\r\n                  8 3 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0105152595788240</threshold>\r\n            <left_val>-0.1309404969215393</left_val>\r\n            <right_val>0.3612711131572723</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 4 7 4 -1.</_>\r\n                <_>\r\n                  9 5 7 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0181792695075274</threshold>\r\n            <left_val>-0.1245180964469910</left_val>\r\n            <right_val>0.3556562960147858</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 0 3 2 -1.</_>\r\n                <_>\r\n                  22 1 3 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3037698380649090e-003</threshold>\r\n            <left_val>0.0638220235705376</left_val>\r\n            <right_val>-0.6178466081619263</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 13 14 -1.</_>\r\n                <_>\r\n                  0 7 13 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1947806030511856</threshold>\r\n            <left_val>-0.7228901982307434</left_val>\r\n            <right_val>0.0475768186151981</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 9 4 4 -1.</_>\r\n                <_>\r\n                  21 10 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.2230421938002110e-003</threshold>\r\n            <left_val>0.0453382283449173</left_val>\r\n            <right_val>-0.5460836291313171</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 4 4 -1.</_>\r\n                <_>\r\n                  0 10 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.0375838764011860e-003</threshold>\r\n            <left_val>0.0804468318820000</left_val>\r\n            <right_val>-0.4817472100257874</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 9 1 4 -1.</_>\r\n                <_>\r\n                  21 10 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-7.1934829466044903e-003</threshold>\r\n            <left_val>-0.5018991827964783</left_val>\r\n            <right_val>0.0128700295463204</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 9 4 1 -1.</_>\r\n                <_>\r\n                  4 10 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-4.4941599480807781e-003</threshold>\r\n            <left_val>-0.5862709879875183</left_val>\r\n            <right_val>0.0634675025939941</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 3 10 12 -1.</_>\r\n                <_>\r\n                  20 3 5 6 2.</_>\r\n                <_>\r\n                  15 9 5 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0874131396412849</threshold>\r\n            <left_val>-0.0676202401518822</left_val>\r\n            <right_val>0.4797031879425049</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 14 6 -1.</_>\r\n                <_>\r\n                  0 8 7 3 2.</_>\r\n                <_>\r\n                  7 11 7 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0377015694975853</threshold>\r\n            <left_val>0.3913342952728272</left_val>\r\n            <right_val>-0.0978809297084808</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 10 1 4 -1.</_>\r\n                <_>\r\n                  22 11 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>3.0070370994508266e-003</threshold>\r\n            <left_val>0.0484924912452698</left_val>\r\n            <right_val>-0.2472224980592728</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 10 12 -1.</_>\r\n                <_>\r\n                  0 3 5 6 2.</_>\r\n                <_>\r\n                  5 9 5 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0974098667502403</threshold>\r\n            <left_val>-0.0669010728597641</left_val>\r\n            <right_val>0.5813519954681397</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 0 2 1 -1.</_>\r\n                <_>\r\n                  23 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-4.0166568942368031e-003</threshold>\r\n            <left_val>-0.5456554293632507</left_val>\r\n            <right_val>0.0363924615085125</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 3 9 3 -1.</_>\r\n                <_>\r\n                  8 4 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0104924896731973</threshold>\r\n            <left_val>-0.1087466031312943</left_val>\r\n            <right_val>0.3253425061702728</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 5 11 4 -1.</_>\r\n                <_>\r\n                  7 6 11 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0249659996479750</threshold>\r\n            <left_val>-0.1137896031141281</left_val>\r\n            <right_val>0.3056510984897614</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 7 20 8 -1.</_>\r\n                <_>\r\n                  12 7 10 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1301030069589615</threshold>\r\n            <left_val>-0.1220476999878883</left_val>\r\n            <right_val>0.3035365939140320</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 5 9 8 -1.</_>\r\n                <_>\r\n                  15 5 3 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0843720883131027</threshold>\r\n            <left_val>-0.6943122148513794</left_val>\r\n            <right_val>0.0178856607526541</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 1 2 -1.</_>\r\n                <_>\r\n                  2 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-2.9267850331962109e-003</threshold>\r\n            <left_val>-0.5401834845542908</left_val>\r\n            <right_val>0.0564073212444782</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 3 4 4 -1.</_>\r\n                <_>\r\n                  22 4 2 4 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0206745099276304</threshold>\r\n            <left_val>0.4180921018123627</left_val>\r\n            <right_val>-0.0685340464115143</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 5 9 8 -1.</_>\r\n                <_>\r\n                  7 5 3 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0514506399631500</threshold>\r\n            <left_val>-0.6289098262786865</left_val>\r\n            <right_val>0.0529876984655857</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 10 3 2 -1.</_>\r\n                <_>\r\n                  22 10 3 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-8.9261196553707123e-003</threshold>\r\n            <left_val>-0.4644356071949005</left_val>\r\n            <right_val>0.0236550793051720</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 24 5 -1.</_>\r\n                <_>\r\n                  6 5 12 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0830484703183174</threshold>\r\n            <left_val>0.3304196894168854</left_val>\r\n            <right_val>-0.0938697606325150</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 7 7 3 -1.</_>\r\n                <_>\r\n                  9 8 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0113369999453425</threshold>\r\n            <left_val>-0.0979600325226784</left_val>\r\n            <right_val>0.3484053015708923</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 20 9 -1.</_>\r\n                <_>\r\n                  7 0 10 9 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0827779024839401</threshold>\r\n            <left_val>-0.1159391030669212</left_val>\r\n            <right_val>0.2680957913398743</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 2 8 9 -1.</_>\r\n                <_>\r\n                  13 2 4 9 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0478848814964294</threshold>\r\n            <left_val>-0.6079211235046387</left_val>\r\n            <right_val>0.0222362894564867</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 8 4 1 -1.</_>\r\n                <_>\r\n                  2 9 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-3.8582698907703161e-003</threshold>\r\n            <left_val>-0.4688901007175446</left_val>\r\n            <right_val>0.0554540418088436</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 5 6 10 -1.</_>\r\n                <_>\r\n                  22 5 3 5 2.</_>\r\n                <_>\r\n                  19 10 3 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0334531292319298</threshold>\r\n            <left_val>0.4192667901515961</left_val>\r\n            <right_val>-0.0631088465452194</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 6 10 -1.</_>\r\n                <_>\r\n                  0 5 3 5 2.</_>\r\n                <_>\r\n                  3 10 3 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0126036396250129</threshold>\r\n            <left_val>-0.1227632984519005</left_val>\r\n            <right_val>0.2175220996141434</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 10 9 2 -1.</_>\r\n                <_>\r\n                  13 10 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0262600891292095</threshold>\r\n            <left_val>0.0162896700203419</left_val>\r\n            <right_val>-0.5688759088516235</right_val></_></_></trees>\r\n      <stage_threshold>-1.5437099933624268</stage_threshold>\r\n      <parent>3</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 5 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 15 2 -1.</_>\r\n                <_>\r\n                  5 3 15 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0197793096303940</threshold>\r\n            <left_val>0.4472095072269440</left_val>\r\n            <right_val>-0.2573797106742859</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 4 4 3 -1.</_>\r\n                <_>\r\n                  21 4 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.1997236013412476e-003</threshold>\r\n            <left_val>0.4397894144058228</left_val>\r\n            <right_val>-0.1382309943437576</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 5 15 4 -1.</_>\r\n                <_>\r\n                  1 6 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0222425796091557</threshold>\r\n            <left_val>-0.1761150062084198</left_val>\r\n            <right_val>0.3406811952590942</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 5 4 10 -1.</_>\r\n                <_>\r\n                  23 5 2 5 2.</_>\r\n                <_>\r\n                  21 10 2 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3650550544261932e-003</threshold>\r\n            <left_val>-0.1087490990757942</left_val>\r\n            <right_val>0.1631094068288803</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 21 8 -1.</_>\r\n                <_>\r\n                  7 0 7 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.7425013780593872</threshold>\r\n            <left_val>4.6233131433837116e-004</left_val>\r\n            <right_val>-1.4172740478515625e+003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 15 6 -1.</_>\r\n                <_>\r\n                  5 2 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1289999037981033</threshold>\r\n            <left_val>0.4220936894416809</left_val>\r\n            <right_val>-0.1264209002256393</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 2 21 3 -1.</_>\r\n                <_>\r\n                  9 2 7 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.4214023947715759</threshold>\r\n            <left_val>3.0299068894237280e-003</left_val>\r\n            <right_val>1.2071870117187500e+003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 3 15 6 -1.</_>\r\n                <_>\r\n                  6 5 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1431712061166763</threshold>\r\n            <left_val>0.5070012211799622</left_val>\r\n            <right_val>-0.1091170981526375</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 4 10 -1.</_>\r\n                <_>\r\n                  0 5 2 5 2.</_>\r\n                <_>\r\n                  2 10 2 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.4366121292114258e-003</threshold>\r\n            <left_val>-0.2218814045190811</left_val>\r\n            <right_val>0.2446105927228928</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 10 1 4 -1.</_>\r\n                <_>\r\n                  21 11 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>3.0177310109138489e-003</threshold>\r\n            <left_val>0.1072233989834786</left_val>\r\n            <right_val>-0.3470205068588257</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 3 4 -1.</_>\r\n                <_>\r\n                  0 8 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.8220949247479439e-003</threshold>\r\n            <left_val>-0.6534119248390198</left_val>\r\n            <right_val>0.0803434476256371</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 3 24 3 -1.</_>\r\n                <_>\r\n                  7 3 12 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0362788289785385</threshold>\r\n            <left_val>-0.2207075059413910</left_val>\r\n            <right_val>0.2242490947246552</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 13 -1.</_>\r\n                <_>\r\n                  6 0 12 13 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1675994992256165</threshold>\r\n            <left_val>0.4059072136878967</left_val>\r\n            <right_val>-0.1054169982671738</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 4 -1.</_>\r\n                <_>\r\n                  5 4 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0509919412434101</threshold>\r\n            <left_val>0.3452283143997192</left_val>\r\n            <right_val>-0.1206474006175995</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 4 14 3 -1.</_>\r\n                <_>\r\n                  5 5 14 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0161635298281908</threshold>\r\n            <left_val>-0.1465175002813339</left_val>\r\n            <right_val>0.3696750998497009</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 8 2 4 -1.</_>\r\n                <_>\r\n                  22 9 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>8.3268675953149796e-003</threshold>\r\n            <left_val>0.0642398297786713</left_val>\r\n            <right_val>-0.5490669012069702</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 8 4 2 -1.</_>\r\n                <_>\r\n                  3 9 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-7.2614871896803379e-003</threshold>\r\n            <left_val>-0.6105815768241882</left_val>\r\n            <right_val>0.0538330897688866</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 8 9 6 -1.</_>\r\n                <_>\r\n                  9 10 9 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0427855290472507</threshold>\r\n            <left_val>0.3435507118701935</left_val>\r\n            <right_val>-0.1058441996574402</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 11 14 -1.</_>\r\n                <_>\r\n                  0 7 11 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0558885596692562</threshold>\r\n            <left_val>-0.4213463068008423</left_val>\r\n            <right_val>0.0855342373251915</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 12 -1.</_>\r\n                <_>\r\n                  13 0 12 6 2.</_>\r\n                <_>\r\n                  1 6 12 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1077039018273354</threshold>\r\n            <left_val>0.0796676799654961</left_val>\r\n            <right_val>-0.5105268955230713</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 3 4 -1.</_>\r\n                <_>\r\n                  0 2 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.8622798203723505e-005</threshold>\r\n            <left_val>0.1164970993995667</left_val>\r\n            <right_val>-0.3022361099720001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 2 15 4 -1.</_>\r\n                <_>\r\n                  7 3 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0272718109190464</threshold>\r\n            <left_val>-0.0831976532936096</left_val>\r\n            <right_val>0.3410704135894775</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 10 4 1 -1.</_>\r\n                <_>\r\n                  3 11 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>2.7942128945142031e-003</threshold>\r\n            <left_val>0.0836139172315598</left_val>\r\n            <right_val>-0.4521746933460236</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 11 4 4 -1.</_>\r\n                <_>\r\n                  21 12 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.9649557806551456e-003</threshold>\r\n            <left_val>-0.5814967751502991</left_val>\r\n            <right_val>0.0588471181690693</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 7 12 8 -1.</_>\r\n                <_>\r\n                  1 7 6 4 2.</_>\r\n                <_>\r\n                  7 11 6 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0364551208913326</threshold>\r\n            <left_val>0.2987614870071411</left_val>\r\n            <right_val>-0.1163965016603470</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 8 11 6 -1.</_>\r\n                <_>\r\n                  7 11 11 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0560359284281731</threshold>\r\n            <left_val>-0.1189749017357826</left_val>\r\n            <right_val>0.3490499854087830</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 13 2 2 -1.</_>\r\n                <_>\r\n                  0 14 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.9068910041823983e-003</threshold>\r\n            <left_val>0.0623399801552296</left_val>\r\n            <right_val>-0.5222734212875366</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 3 8 6 -1.</_>\r\n                <_>\r\n                  12 3 4 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0314803011715412</threshold>\r\n            <left_val>-0.5988280177116394</left_val>\r\n            <right_val>0.0221100505441427</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 3 8 6 -1.</_>\r\n                <_>\r\n                  9 3 4 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0291779898107052</threshold>\r\n            <left_val>-0.7628328204154968</left_val>\r\n            <right_val>0.0378519818186760</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 6 3 3 -1.</_>\r\n                <_>\r\n                  22 7 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.3441819772124290e-003</threshold>\r\n            <left_val>0.0293787997215986</left_val>\r\n            <right_val>-0.5464184880256653</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 5 6 -1.</_>\r\n                <_>\r\n                  0 7 5 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.2941689928993583e-003</threshold>\r\n            <left_val>-0.2152619063854218</left_val>\r\n            <right_val>0.1293071061372757</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 7 9 6 -1.</_>\r\n                <_>\r\n                  8 9 9 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0399527512490749</threshold>\r\n            <left_val>-0.0815632417798042</left_val>\r\n            <right_val>0.3440327942371368</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 20 13 -1.</_>\r\n                <_>\r\n                  12 0 10 13 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2579689919948578</threshold>\r\n            <left_val>-0.0829713121056557</left_val>\r\n            <right_val>0.2971759140491486</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 3 6 4 -1.</_>\r\n                <_>\r\n                  22 3 3 2 2.</_>\r\n                <_>\r\n                  19 5 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.3975978195667267e-003</threshold>\r\n            <left_val>-0.1235759034752846</left_val>\r\n            <right_val>0.3130742907524109</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 8 12 3 -1.</_>\r\n                <_>\r\n                  9 8 6 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0210481006652117</threshold>\r\n            <left_val>0.2553890943527222</left_val>\r\n            <right_val>-0.1077592000365257</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 3 2 5 -1.</_>\r\n                <_>\r\n                  22 3 1 5 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0184192396700382</threshold>\r\n            <left_val>-0.0348858311772347</left_val>\r\n            <right_val>0.4613004922866821</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 8 8 -1.</_>\r\n                <_>\r\n                  8 7 4 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0335993207991123</threshold>\r\n            <left_val>-0.6385626196861267</left_val>\r\n            <right_val>0.0432357601821423</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 0 3 1 -1.</_>\r\n                <_>\r\n                  21 1 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-5.9369178488850594e-003</threshold>\r\n            <left_val>-0.3381235003471375</left_val>\r\n            <right_val>0.0261388104408979</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 1 3 -1.</_>\r\n                <_>\r\n                  4 1 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>7.4244509451091290e-003</threshold>\r\n            <left_val>0.0416494794189930</left_val>\r\n            <right_val>-0.6013135910034180</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 11 1 3 -1.</_>\r\n                <_>\r\n                  21 12 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-3.8341500330716372e-003</threshold>\r\n            <left_val>-0.3147934973239899</left_val>\r\n            <right_val>0.0227260906249285</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 4 4 3 -1.</_>\r\n                <_>\r\n                  3 4 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.9263929724693298e-003</threshold>\r\n            <left_val>-0.0845179632306099</left_val>\r\n            <right_val>0.2986125946044922</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 4 6 8 -1.</_>\r\n                <_>\r\n                  22 4 3 4 2.</_>\r\n                <_>\r\n                  19 8 3 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0194444190710783</threshold>\r\n            <left_val>0.2213757932186127</left_val>\r\n            <right_val>-0.0513583682477474</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 8 8 -1.</_>\r\n                <_>\r\n                  0 4 4 4 2.</_>\r\n                <_>\r\n                  4 8 4 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0187752693891525</threshold>\r\n            <left_val>-0.1223364025354385</left_val>\r\n            <right_val>0.2647691071033478</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 11 1 3 -1.</_>\r\n                <_>\r\n                  21 12 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>6.4857508987188339e-003</threshold>\r\n            <left_val>0.0205634497106075</left_val>\r\n            <right_val>-0.5246906280517578</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 24 14 -1.</_>\r\n                <_>\r\n                  0 1 12 7 2.</_>\r\n                <_>\r\n                  12 8 12 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.2598725855350494</threshold>\r\n            <left_val>-0.6570193767547607</left_val>\r\n            <right_val>0.0345496907830238</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 8 2 4 -1.</_>\r\n                <_>\r\n                  23 9 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.8150831609964371e-003</threshold>\r\n            <left_val>-0.6595460772514343</left_val>\r\n            <right_val>0.0302442405372858</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 4 -1.</_>\r\n                <_>\r\n                  5 4 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0261219404637814</threshold>\r\n            <left_val>0.1870407015085220</left_val>\r\n            <right_val>-0.1252924054861069</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 1 9 3 -1.</_>\r\n                <_>\r\n                  8 2 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.7821800000965595e-003</threshold>\r\n            <left_val>0.2328509986400604</left_val>\r\n            <right_val>-0.1182496026158333</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 2 4 -1.</_>\r\n                <_>\r\n                  0 9 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.9595640953630209e-003</threshold>\r\n            <left_val>-0.4579938054084778</left_val>\r\n            <right_val>0.0564655400812626</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 10 7 2 -1.</_>\r\n                <_>\r\n                  18 11 7 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0120882000774145</threshold>\r\n            <left_val>-0.5189349055290222</left_val>\r\n            <right_val>0.0244996603578329</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 11 12 4 -1.</_>\r\n                <_>\r\n                  6 12 12 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.8109169155359268e-003</threshold>\r\n            <left_val>0.2570025026798248</left_val>\r\n            <right_val>-0.0927671566605568</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 0 6 15 -1.</_>\r\n                <_>\r\n                  16 0 2 15 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0459428504109383</threshold>\r\n            <left_val>-0.4479719102382660</left_val>\r\n            <right_val>0.0299462303519249</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 10 7 2 -1.</_>\r\n                <_>\r\n                  0 11 7 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0100041404366493</threshold>\r\n            <left_val>-0.6149634122848511</left_val>\r\n            <right_val>0.0364212691783905</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 5 6 6 -1.</_>\r\n                <_>\r\n                  18 5 3 3 2.</_>\r\n                <_>\r\n                  15 8 3 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0116753997281194</threshold>\r\n            <left_val>0.1172877028584480</left_val>\r\n            <right_val>-0.0613474808633327</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 6 15 -1.</_>\r\n                <_>\r\n                  7 0 2 15 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0524668507277966</threshold>\r\n            <left_val>-0.7613652944564819</left_val>\r\n            <right_val>0.0306894704699516</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 7 9 4 -1.</_>\r\n                <_>\r\n                  8 8 9 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0182263404130936</threshold>\r\n            <left_val>-0.0854801833629608</left_val>\r\n            <right_val>0.2695373892784119</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 6 10 6 -1.</_>\r\n                <_>\r\n                  7 8 10 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0452684201300144</threshold>\r\n            <left_val>0.3264470100402832</left_val>\r\n            <right_val>-0.0773756429553032</right_val></_></_>\r\n        <_>\r\n          <!-- tree 57 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 11 1 3 -1.</_>\r\n                <_>\r\n                  18 12 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-8.1426883116364479e-003</threshold>\r\n            <left_val>-0.4582937955856323</left_val>\r\n            <right_val>9.3973511829972267e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 58 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 11 3 1 -1.</_>\r\n                <_>\r\n                  7 12 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-5.3349281661212444e-003</threshold>\r\n            <left_val>-0.5775498151779175</left_val>\r\n            <right_val>0.0352523885667324</right_val></_></_>\r\n        <_>\r\n          <!-- tree 59 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 10 4 1 -1.</_>\r\n                <_>\r\n                  16 10 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.0754769900813699e-003</threshold>\r\n            <left_val>0.1434753984212875</left_val>\r\n            <right_val>-0.1015762984752655</right_val></_></_>\r\n        <_>\r\n          <!-- tree 60 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 1 2 -1.</_>\r\n                <_>\r\n                  0 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.5198600962758064e-003</threshold>\r\n            <left_val>-0.6082041263580322</left_val>\r\n            <right_val>0.0328880697488785</right_val></_></_>\r\n        <_>\r\n          <!-- tree 61 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 1 9 3 -1.</_>\r\n                <_>\r\n                  8 2 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0112483501434326</threshold>\r\n            <left_val>-0.0905500426888466</left_val>\r\n            <right_val>0.2323783040046692</right_val></_></_>\r\n        <_>\r\n          <!-- tree 62 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 5 3 -1.</_>\r\n                <_>\r\n                  0 7 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0119920196011662</threshold>\r\n            <left_val>-0.5705332159996033</left_val>\r\n            <right_val>0.0367036312818527</right_val></_></_>\r\n        <_>\r\n          <!-- tree 63 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 8 1 4 -1.</_>\r\n                <_>\r\n                  20 9 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0121055301278830</threshold>\r\n            <left_val>-0.7086269259452820</left_val>\r\n            <right_val>4.4598700478672981e-003</right_val></_></_></trees>\r\n      <stage_threshold>-1.5637760162353516</stage_threshold>\r\n      <parent>4</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 6 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 15 6 -1.</_>\r\n                <_>\r\n                  5 3 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1112890988588333</threshold>\r\n            <left_val>0.5214446783065796</left_val>\r\n            <right_val>-0.2762526869773865</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 0 2 2 -1.</_>\r\n                <_>\r\n                  24 0 1 1 2.</_>\r\n                <_>\r\n                  23 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.1310080084949732e-003</threshold>\r\n            <left_val>-0.6073393225669861</left_val>\r\n            <right_val>0.0243980996310711</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 3 15 6 -1.</_>\r\n                <_>\r\n                  3 5 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0975013524293900</threshold>\r\n            <left_val>0.5489286780357361</left_val>\r\n            <right_val>-0.1652427017688751</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 0 6 9 -1.</_>\r\n                <_>\r\n                  19 3 6 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0652247071266174</threshold>\r\n            <left_val>0.3402006924152374</left_val>\r\n            <right_val>-0.2693930864334106</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 15 6 -1.</_>\r\n                <_>\r\n                  5 4 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1191802993416786</threshold>\r\n            <left_val>-0.1123576015233994</left_val>\r\n            <right_val>0.6395980119705200</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 3 8 3 -1.</_>\r\n                <_>\r\n                  17 4 8 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0140629801899195</threshold>\r\n            <left_val>0.3342761993408203</left_val>\r\n            <right_val>-0.1284538954496384</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 3 8 4 -1.</_>\r\n                <_>\r\n                  4 3 8 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0564025007188320</threshold>\r\n            <left_val>0.3790628910064697</left_val>\r\n            <right_val>-0.1554156988859177</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 4 6 2 -1.</_>\r\n                <_>\r\n                  16 5 6 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.1742408908903599e-003</threshold>\r\n            <left_val>-0.1133088991045952</left_val>\r\n            <right_val>0.1825089007616043</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 12 -1.</_>\r\n                <_>\r\n                  0 0 12 6 2.</_>\r\n                <_>\r\n                  12 6 12 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1259752959012985</threshold>\r\n            <left_val>0.0945485532283783</left_val>\r\n            <right_val>-0.4853444099426270</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 10 3 2 -1.</_>\r\n                <_>\r\n                  22 10 3 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.9177991934120655e-003</threshold>\r\n            <left_val>0.0701321363449097</left_val>\r\n            <right_val>-0.5377039909362793</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 3 6 6 -1.</_>\r\n                <_>\r\n                  4 5 6 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0439277403056622</threshold>\r\n            <left_val>0.3950741887092590</left_val>\r\n            <right_val>-0.1080185994505882</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 4 9 1 -1.</_>\r\n                <_>\r\n                  17 7 3 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-9.8314704373478889e-003</threshold>\r\n            <left_val>0.0959606170654297</left_val>\r\n            <right_val>-0.0468075983226299</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 10 2 3 -1.</_>\r\n                <_>\r\n                  3 10 1 3 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.6353402324020863e-003</threshold>\r\n            <left_val>0.0943416282534599</left_val>\r\n            <right_val>-0.5247716903686523</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 8 5 2 -1.</_>\r\n                <_>\r\n                  20 8 5 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0115382801741362</threshold>\r\n            <left_val>-0.5154880285263062</left_val>\r\n            <right_val>0.0138055300340056</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 16 6 -1.</_>\r\n                <_>\r\n                  0 9 8 3 2.</_>\r\n                <_>\r\n                  8 12 8 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0286462493240833</threshold>\r\n            <left_val>-0.1382701992988586</left_val>\r\n            <right_val>0.2750437855720520</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 2 13 3 -1.</_>\r\n                <_>\r\n                  6 3 13 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0138679798692465</threshold>\r\n            <left_val>-0.1203586980700493</left_val>\r\n            <right_val>0.3521435856819153</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 3 4 -1.</_>\r\n                <_>\r\n                  0 3 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.0469371015205979e-004</threshold>\r\n            <left_val>0.1522637009620667</left_val>\r\n            <right_val>-0.2590084075927734</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 0 9 12 -1.</_>\r\n                <_>\r\n                  8 6 9 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1594581007957459</threshold>\r\n            <left_val>-0.6391854882240295</left_val>\r\n            <right_val>0.0514649897813797</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 1 2 -1.</_>\r\n                <_>\r\n                  4 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-2.7928699273616076e-003</threshold>\r\n            <left_val>-0.5840150713920593</left_val>\r\n            <right_val>0.0542793795466423</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 3 -1.</_>\r\n                <_>\r\n                  5 4 15 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0183532107621431</threshold>\r\n            <left_val>-0.1051151007413864</left_val>\r\n            <right_val>0.3529815971851349</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 10 2 3 -1.</_>\r\n                <_>\r\n                  3 10 1 3 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-5.1810559816658497e-003</threshold>\r\n            <left_val>-0.4741767942905426</left_val>\r\n            <right_val>0.0798512324690819</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 4 6 4 -1.</_>\r\n                <_>\r\n                  22 4 3 2 2.</_>\r\n                <_>\r\n                  19 6 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.2321299016475677e-003</threshold>\r\n            <left_val>-0.0759327188134193</left_val>\r\n            <right_val>0.1852813959121704</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 8 4 -1.</_>\r\n                <_>\r\n                  0 3 4 2 2.</_>\r\n                <_>\r\n                  4 5 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0121171101927757</threshold>\r\n            <left_val>-0.1117528975009918</left_val>\r\n            <right_val>0.2853634953498840</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 10 5 3 -1.</_>\r\n                <_>\r\n                  19 11 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.2612818330526352e-003</threshold>\r\n            <left_val>-0.5885108709335327</left_val>\r\n            <right_val>0.0526883192360401</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 10 5 3 -1.</_>\r\n                <_>\r\n                  1 11 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.6134900078177452e-003</threshold>\r\n            <left_val>0.0474684908986092</left_val>\r\n            <right_val>-0.5394589900970459</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 1 13 14 -1.</_>\r\n                <_>\r\n                  12 8 13 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1945167928934097</threshold>\r\n            <left_val>-0.5634222030639648</left_val>\r\n            <right_val>0.0302108898758888</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 13 14 -1.</_>\r\n                <_>\r\n                  0 8 13 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.3550943136215210</threshold>\r\n            <left_val>0.0630894526839256</left_val>\r\n            <right_val>-0.4980587959289551</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 3 6 12 -1.</_>\r\n                <_>\r\n                  14 3 3 6 2.</_>\r\n                <_>\r\n                  11 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0331119708716869</threshold>\r\n            <left_val>0.0346324704587460</left_val>\r\n            <right_val>-0.5246484875679016</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 5 6 10 -1.</_>\r\n                <_>\r\n                  9 5 3 5 2.</_>\r\n                <_>\r\n                  12 10 3 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0342818088829517</threshold>\r\n            <left_val>0.0431439802050591</left_val>\r\n            <right_val>-0.6470713019371033</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 8 5 4 -1.</_>\r\n                <_>\r\n                  20 9 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.8256614506244659e-003</threshold>\r\n            <left_val>-0.4688000977039337</left_val>\r\n            <right_val>0.0402393713593483</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 5 4 -1.</_>\r\n                <_>\r\n                  0 9 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0111560495570302</threshold>\r\n            <left_val>0.0401505008339882</left_val>\r\n            <right_val>-0.6095538735389710</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 9 9 3 -1.</_>\r\n                <_>\r\n                  8 10 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0113630602136254</threshold>\r\n            <left_val>-0.0827489867806435</left_val>\r\n            <right_val>0.3811689019203186</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 10 6 4 -1.</_>\r\n                <_>\r\n                  9 10 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0204051006585360</threshold>\r\n            <left_val>0.0425756387412548</left_val>\r\n            <right_val>-0.7467774152755737</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 6 14 4 -1.</_>\r\n                <_>\r\n                  6 7 14 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0191116295754910</threshold>\r\n            <left_val>-0.1239197030663490</left_val>\r\n            <right_val>0.2226520031690598</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 6 5 4 -1.</_>\r\n                <_>\r\n                  9 7 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.3364898562431335e-003</threshold>\r\n            <left_val>0.3034206926822662</left_val>\r\n            <right_val>-0.0926956906914711</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 5 3 6 -1.</_>\r\n                <_>\r\n                  22 7 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.6538922041654587e-003</threshold>\r\n            <left_val>-0.3351745009422302</left_val>\r\n            <right_val>0.0585405789315701</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 3 6 -1.</_>\r\n                <_>\r\n                  0 7 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0347895994782448</threshold>\r\n            <left_val>0.0337578095495701</left_val>\r\n            <right_val>-0.7483453154563904</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 1 5 4 -1.</_>\r\n                <_>\r\n                  17 2 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0174188297241926</threshold>\r\n            <left_val>0.2445363998413086</left_val>\r\n            <right_val>-0.0698786973953247</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 1 6 4 -1.</_>\r\n                <_>\r\n                  3 2 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.5119079984724522e-003</threshold>\r\n            <left_val>-0.1277886927127838</left_val>\r\n            <right_val>0.2403315007686615</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 14 4 1 -1.</_>\r\n                <_>\r\n                  21 14 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.0669797929003835e-004</threshold>\r\n            <left_val>-0.1169779002666473</left_val>\r\n            <right_val>0.1439380049705505</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 8 3 2 -1.</_>\r\n                <_>\r\n                  5 9 1 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-5.9512741863727570e-003</threshold>\r\n            <left_val>-0.5078160762786865</left_val>\r\n            <right_val>0.0478522293269634</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 2 4 7 -1.</_>\r\n                <_>\r\n                  14 2 2 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0503778010606766</threshold>\r\n            <left_val>2.9282520990818739e-003</left_val>\r\n            <right_val>-0.7751696109771729</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 2 4 7 -1.</_>\r\n                <_>\r\n                  9 2 2 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.8862510118633509e-003</threshold>\r\n            <left_val>-0.1550420969724655</left_val>\r\n            <right_val>0.1570920050144196</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 3 8 5 -1.</_>\r\n                <_>\r\n                  11 3 4 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0385116301476955</threshold>\r\n            <left_val>0.0230970401316881</left_val>\r\n            <right_val>-0.6291617155075073</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 10 15 1 -1.</_>\r\n                <_>\r\n                  10 10 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.5746049620211124e-003</threshold>\r\n            <left_val>0.1807070970535278</left_val>\r\n            <right_val>-0.1298052966594696</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 6 21 9 -1.</_>\r\n                <_>\r\n                  9 6 7 9 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1266476064920425</threshold>\r\n            <left_val>-0.0865593999624252</left_val>\r\n            <right_val>0.2957325875759125</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 6 6 -1.</_>\r\n                <_>\r\n                  0 6 6 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.4126111790537834e-003</threshold>\r\n            <left_val>-0.1528324931859970</left_val>\r\n            <right_val>0.1662916988134384</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 12 24 3 -1.</_>\r\n                <_>\r\n                  7 12 12 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0361530818045139</threshold>\r\n            <left_val>0.2797313034534454</left_val>\r\n            <right_val>-0.1039886027574539</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 6 2 -1.</_>\r\n                <_>\r\n                  6 8 6 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.1673998609185219e-003</threshold>\r\n            <left_val>-0.0945642217993736</left_val>\r\n            <right_val>0.2778528034687042</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 8 2 4 -1.</_>\r\n                <_>\r\n                  13 8 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-6.7790350876748562e-003</threshold>\r\n            <left_val>0.1679068058729172</left_val>\r\n            <right_val>-0.0839543119072914</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 6 8 5 -1.</_>\r\n                <_>\r\n                  10 6 4 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0298676099628210</threshold>\r\n            <left_val>-0.7236117124557495</left_val>\r\n            <right_val>0.0346310697495937</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 5 6 4 -1.</_>\r\n                <_>\r\n                  11 6 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.5265512093901634e-003</threshold>\r\n            <left_val>-0.1173760965466499</left_val>\r\n            <right_val>0.1346033960580826</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 14 4 1 -1.</_>\r\n                <_>\r\n                  2 14 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.4080960176652297e-005</threshold>\r\n            <left_val>-0.1753176003694534</left_val>\r\n            <right_val>0.1322204023599625</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 2 4 13 -1.</_>\r\n                <_>\r\n                  17 2 2 13 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0176294595003128</threshold>\r\n            <left_val>-0.5160853862762451</left_val>\r\n            <right_val>0.0253861900418997</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 1 4 -1.</_>\r\n                <_>\r\n                  0 8 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.5446309698745608e-003</threshold>\r\n            <left_val>-0.4142186045646668</left_val>\r\n            <right_val>0.0513300895690918</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 0 1 2 -1.</_>\r\n                <_>\r\n                  24 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.1520429980009794e-003</threshold>\r\n            <left_val>0.0366159491240978</left_val>\r\n            <right_val>-0.3692800998687744</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 2 4 -1.</_>\r\n                <_>\r\n                  1 5 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.9612779617309570e-003</threshold>\r\n            <left_val>0.2446188032627106</left_val>\r\n            <right_val>-0.0842714235186577</right_val></_></_></trees>\r\n      <stage_threshold>-1.5267670154571533</stage_threshold>\r\n      <parent>5</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 7 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 8 4 -1.</_>\r\n                <_>\r\n                  0 3 8 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0141031695529819</threshold>\r\n            <left_val>0.2699790894985199</left_val>\r\n            <right_val>-0.3928318023681641</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 11 10 4 -1.</_>\r\n                <_>\r\n                  20 11 5 2 2.</_>\r\n                <_>\r\n                  15 13 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.4714400321245193e-003</threshold>\r\n            <left_val>-0.2269169986248016</left_val>\r\n            <right_val>0.2749052047729492</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 5 11 3 -1.</_>\r\n                <_>\r\n                  7 6 11 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0166354794055223</threshold>\r\n            <left_val>-0.1547908037900925</left_val>\r\n            <right_val>0.3224202096462250</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 4 4 3 -1.</_>\r\n                <_>\r\n                  21 4 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.4477178752422333e-003</threshold>\r\n            <left_val>0.3320780992507935</left_val>\r\n            <right_val>-0.1249654963612557</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 4 1 -1.</_>\r\n                <_>\r\n                  2 5 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.4904569145292044e-003</threshold>\r\n            <left_val>0.2900204956531525</left_val>\r\n            <right_val>-0.1460298001766205</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 3 12 4 -1.</_>\r\n                <_>\r\n                  7 4 12 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0282104406505823</threshold>\r\n            <left_val>-0.0831937119364738</left_val>\r\n            <right_val>0.4805397987365723</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 6 7 3 -1.</_>\r\n                <_>\r\n                  8 7 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.3179903924465179e-003</threshold>\r\n            <left_val>-0.1692426949739456</left_val>\r\n            <right_val>0.3482030928134918</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 0 9 14 -1.</_>\r\n                <_>\r\n                  16 7 9 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0579102896153927</threshold>\r\n            <left_val>-0.5040398836135864</left_val>\r\n            <right_val>0.0840934887528419</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 6 -1.</_>\r\n                <_>\r\n                  0 0 12 3 2.</_>\r\n                <_>\r\n                  12 3 12 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0882126465439796</threshold>\r\n            <left_val>0.0733099877834320</left_val>\r\n            <right_val>-0.4883395135402679</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 13 2 1 -1.</_>\r\n                <_>\r\n                  23 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.0974380176048726e-005</threshold>\r\n            <left_val>-0.1594507992267609</left_val>\r\n            <right_val>0.1473277956247330</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 13 24 2 -1.</_>\r\n                <_>\r\n                  0 13 12 1 2.</_>\r\n                <_>\r\n                  12 14 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0142063600942492</threshold>\r\n            <left_val>-0.6365684866905212</left_val>\r\n            <right_val>0.0507153607904911</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 12 5 3 -1.</_>\r\n                <_>\r\n                  19 13 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.7181900851428509e-003</threshold>\r\n            <left_val>-0.6330028772354126</left_val>\r\n            <right_val>0.0328688994050026</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 7 7 4 -1.</_>\r\n                <_>\r\n                  9 8 7 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0120071703568101</threshold>\r\n            <left_val>-0.1254525035619736</left_val>\r\n            <right_val>0.2893699109554291</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 0 4 7 -1.</_>\r\n                <_>\r\n                  14 0 2 7 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0707826167345047</threshold>\r\n            <left_val>0.0305656604468822</left_val>\r\n            <right_val>-0.5666698217391968</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 0 7 4 -1.</_>\r\n                <_>\r\n                  11 0 7 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0504123307764530</threshold>\r\n            <left_val>-0.5089793801307678</left_val>\r\n            <right_val>0.0710048824548721</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 4 14 2 -1.</_>\r\n                <_>\r\n                  9 5 14 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0220727995038033</threshold>\r\n            <left_val>-0.1444841027259827</left_val>\r\n            <right_val>0.2781184911727905</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 2 15 4 -1.</_>\r\n                <_>\r\n                  3 3 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0147649403661489</threshold>\r\n            <left_val>-0.1283989995718002</left_val>\r\n            <right_val>0.3290185928344727</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 12 5 3 -1.</_>\r\n                <_>\r\n                  19 13 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.8206568248569965e-003</threshold>\r\n            <left_val>0.0654795467853546</left_val>\r\n            <right_val>-0.5463265776634216</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 8 4 -1.</_>\r\n                <_>\r\n                  0 11 4 2 2.</_>\r\n                <_>\r\n                  4 13 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.0179790444672108e-003</threshold>\r\n            <left_val>-0.2028342932462692</left_val>\r\n            <right_val>0.1679659038782120</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 9 11 6 -1.</_>\r\n                <_>\r\n                  7 11 11 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0250812191516161</threshold>\r\n            <left_val>-0.1104943975806236</left_val>\r\n            <right_val>0.3191860020160675</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 7 4 -1.</_>\r\n                <_>\r\n                  0 12 7 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.9391358196735382e-003</threshold>\r\n            <left_val>0.0734132081270218</left_val>\r\n            <right_val>-0.5538399219512940</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 0 5 2 -1.</_>\r\n                <_>\r\n                  20 1 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.6396959805861115e-004</threshold>\r\n            <left_val>0.1123031005263329</left_val>\r\n            <right_val>-0.1697127074003220</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 10 3 2 -1.</_>\r\n                <_>\r\n                  6 11 1 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-8.5602197796106339e-003</threshold>\r\n            <left_val>-0.7347347736358643</left_val>\r\n            <right_val>0.0417169481515884</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 4 8 10 -1.</_>\r\n                <_>\r\n                  21 4 4 5 2.</_>\r\n                <_>\r\n                  17 9 4 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0389347188174725</threshold>\r\n            <left_val>0.2292626947164536</left_val>\r\n            <right_val>-0.0792299434542656</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 2 -1.</_>\r\n                <_>\r\n                  5 4 15 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0215415991842747</threshold>\r\n            <left_val>0.3007172048091888</left_val>\r\n            <right_val>-0.1152340024709702</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 4 5 2 -1.</_>\r\n                <_>\r\n                  16 5 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.9337721429765224e-003</threshold>\r\n            <left_val>-0.1002838015556335</left_val>\r\n            <right_val>0.1348572969436646</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 22 10 -1.</_>\r\n                <_>\r\n                  1 0 11 5 2.</_>\r\n                <_>\r\n                  12 5 11 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1615066975355148</threshold>\r\n            <left_val>0.0588171891868114</left_val>\r\n            <right_val>-0.5656744837760925</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 0 5 2 -1.</_>\r\n                <_>\r\n                  20 1 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0123260198161006</threshold>\r\n            <left_val>-0.2823328077793121</left_val>\r\n            <right_val>0.0187596306204796</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 5 2 -1.</_>\r\n                <_>\r\n                  0 1 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.2987951785326004e-003</threshold>\r\n            <left_val>0.0524063482880592</left_val>\r\n            <right_val>-0.5719032287597656</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 1 6 12 -1.</_>\r\n                <_>\r\n                  13 1 3 6 2.</_>\r\n                <_>\r\n                  10 7 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0289043206721544</threshold>\r\n            <left_val>0.0477108694612980</left_val>\r\n            <right_val>-0.4854584038257599</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 1 8 -1.</_>\r\n                <_>\r\n                  0 4 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0155697297304869</threshold>\r\n            <left_val>0.0493178516626358</left_val>\r\n            <right_val>-0.5100051760673523</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 13 6 -1.</_>\r\n                <_>\r\n                  6 2 13 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0938120707869530</threshold>\r\n            <left_val>0.2564809024333954</left_val>\r\n            <right_val>-0.1057069003582001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 3 4 4 -1.</_>\r\n                <_>\r\n                  3 4 4 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0286933295428753</threshold>\r\n            <left_val>0.5247043967247009</left_val>\r\n            <right_val>-0.0509502515196800</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 8 5 3 -1.</_>\r\n                <_>\r\n                  20 9 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.2301640175282955e-003</threshold>\r\n            <left_val>0.0583653002977371</left_val>\r\n            <right_val>-0.4894312024116516</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 13 2 2 -1.</_>\r\n                <_>\r\n                  7 13 1 1 2.</_>\r\n                <_>\r\n                  8 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.2664839283097535e-005</threshold>\r\n            <left_val>-0.1437218040227890</left_val>\r\n            <right_val>0.1820268929004669</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 13 2 2 -1.</_>\r\n                <_>\r\n                  17 13 1 1 2.</_>\r\n                <_>\r\n                  16 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.5241750515997410e-003</threshold>\r\n            <left_val>0.0201267991214991</left_val>\r\n            <right_val>-0.3884589970111847</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 13 2 2 -1.</_>\r\n                <_>\r\n                  7 13 1 1 2.</_>\r\n                <_>\r\n                  8 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.5512307628523558e-005</threshold>\r\n            <left_val>0.2280354052782059</left_val>\r\n            <right_val>-0.1581206023693085</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 5 6 1 -1.</_>\r\n                <_>\r\n                  21 5 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.4175599683076143e-003</threshold>\r\n            <left_val>-0.0890450775623322</left_val>\r\n            <right_val>0.2839250862598419</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 6 6 -1.</_>\r\n                <_>\r\n                  0 10 6 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0343084894120693</threshold>\r\n            <left_val>0.0391304790973663</left_val>\r\n            <right_val>-0.6263393163681030</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 8 13 4 -1.</_>\r\n                <_>\r\n                  6 9 13 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0127667998895049</threshold>\r\n            <left_val>-0.0984294191002846</left_val>\r\n            <right_val>0.2857427895069122</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 10 8 1 -1.</_>\r\n                <_>\r\n                  7 10 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.7450299821794033e-003</threshold>\r\n            <left_val>0.2090786993503571</left_val>\r\n            <right_val>-0.1267945021390915</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 11 4 4 -1.</_>\r\n                <_>\r\n                  17 11 2 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.0629850961267948e-003</threshold>\r\n            <left_val>-0.4784719944000244</left_val>\r\n            <right_val>0.0229746792465448</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 6 15 2 -1.</_>\r\n                <_>\r\n                  5 7 15 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0109674101695418</threshold>\r\n            <left_val>-0.1310741007328033</left_val>\r\n            <right_val>0.1712857037782669</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 1 20 10 -1.</_>\r\n                <_>\r\n                  3 1 10 10 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1530689001083374</threshold>\r\n            <left_val>0.2361073046922684</left_val>\r\n            <right_val>-0.0965401679277420</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 4 3 3 -1.</_>\r\n                <_>\r\n                  2 5 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.1676090545952320e-003</threshold>\r\n            <left_val>-0.1028804033994675</left_val>\r\n            <right_val>0.2537584006786346</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 11 4 4 -1.</_>\r\n                <_>\r\n                  17 11 2 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0107051497325301</threshold>\r\n            <left_val>0.0160892698913813</left_val>\r\n            <right_val>-0.5868526101112366</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 11 4 4 -1.</_>\r\n                <_>\r\n                  6 11 2 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.1142919585108757e-003</threshold>\r\n            <left_val>-0.6146798133850098</left_val>\r\n            <right_val>0.0344046317040920</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 4 8 10 -1.</_>\r\n                <_>\r\n                  21 4 4 5 2.</_>\r\n                <_>\r\n                  17 9 4 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0160057693719864</threshold>\r\n            <left_val>0.0954133197665215</left_val>\r\n            <right_val>-0.0657811686396599</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 5 3 -1.</_>\r\n                <_>\r\n                  0 9 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.5541699081659317e-003</threshold>\r\n            <left_val>0.0425793603062630</left_val>\r\n            <right_val>-0.5490341186523438</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 13 2 1 -1.</_>\r\n                <_>\r\n                  23 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.5742941185599193e-005</threshold>\r\n            <left_val>0.1505846977233887</left_val>\r\n            <right_val>-0.0978325977921486</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 13 2 1 -1.</_>\r\n                <_>\r\n                  1 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.9888480134541169e-005</threshold>\r\n            <left_val>-0.1522217988967896</left_val>\r\n            <right_val>0.1464709937572479</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 1 7 3 -1.</_>\r\n                <_>\r\n                  10 2 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.3986131250858307e-003</threshold>\r\n            <left_val>-0.0793018564581871</left_val>\r\n            <right_val>0.2222844958305359</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 8 12 -1.</_>\r\n                <_>\r\n                  0 3 4 6 2.</_>\r\n                <_>\r\n                  4 9 4 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0445945896208286</threshold>\r\n            <left_val>0.3217073082923889</left_val>\r\n            <right_val>-0.0712599530816078</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 16 11 -1.</_>\r\n                <_>\r\n                  6 0 8 11 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2763071060180664</threshold>\r\n            <left_val>-0.0312894396483898</left_val>\r\n            <right_val>0.4636780917644501</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 21 3 -1.</_>\r\n                <_>\r\n                  9 0 7 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0459242798388004</threshold>\r\n            <left_val>0.2685551047325134</left_val>\r\n            <right_val>-0.0946981832385063</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 1 2 12 -1.</_>\r\n                <_>\r\n                  23 1 2 6 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0328284502029419</threshold>\r\n            <left_val>0.0420088581740856</left_val>\r\n            <right_val>-0.1909179985523224</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 1 2 -1.</_>\r\n                <_>\r\n                  2 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.8416211977601051e-003</threshold>\r\n            <left_val>0.0443820804357529</left_val>\r\n            <right_val>-0.5017232894897461</right_val></_></_>\r\n        <_>\r\n          <!-- tree 57 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 0 6 3 -1.</_>\r\n                <_>\r\n                  17 0 2 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0253127701580524</threshold>\r\n            <left_val>7.6768198050558567e-003</left_val>\r\n            <right_val>-0.4524691104888916</right_val></_></_>\r\n        <_>\r\n          <!-- tree 58 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 9 6 4 -1.</_>\r\n                <_>\r\n                  10 9 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0206803791224957</threshold>\r\n            <left_val>-0.7082331180572510</left_val>\r\n            <right_val>0.0277527105063200</right_val></_></_>\r\n        <_>\r\n          <!-- tree 59 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 5 5 6 -1.</_>\r\n                <_>\r\n                  20 7 5 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.9456259906291962e-003</threshold>\r\n            <left_val>-0.1725641041994095</left_val>\r\n            <right_val>0.0885240733623505</right_val></_></_>\r\n        <_>\r\n          <!-- tree 60 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 24 8 -1.</_>\r\n                <_>\r\n                  0 4 12 4 2.</_>\r\n                <_>\r\n                  12 8 12 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1318278014659882</threshold>\r\n            <left_val>0.0378756709396839</left_val>\r\n            <right_val>-0.5236573815345764</right_val></_></_>\r\n        <_>\r\n          <!-- tree 61 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 10 1 4 -1.</_>\r\n                <_>\r\n                  21 11 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-4.8449821770191193e-003</threshold>\r\n            <left_val>-0.3831801116466522</left_val>\r\n            <right_val>0.0295521095395088</right_val></_></_>\r\n        <_>\r\n          <!-- tree 62 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 0 11 3 -1.</_>\r\n                <_>\r\n                  7 1 11 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3295581601560116e-003</threshold>\r\n            <left_val>-0.1172816008329392</left_val>\r\n            <right_val>0.1712217032909393</right_val></_></_>\r\n        <_>\r\n          <!-- tree 63 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 13 4 -1.</_>\r\n                <_>\r\n                  6 1 13 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0353284589946270</threshold>\r\n            <left_val>0.3731549978256226</left_val>\r\n            <right_val>-0.0650273412466049</right_val></_></_></trees>\r\n      <stage_threshold>-1.4507639408111572</stage_threshold>\r\n      <parent>6</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 8 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 11 11 4 -1.</_>\r\n                <_>\r\n                  7 13 11 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0136478496715426</threshold>\r\n            <left_val>-0.2802368998527527</left_val>\r\n            <right_val>0.3575335144996643</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 3 4 12 -1.</_>\r\n                <_>\r\n                  23 3 2 6 2.</_>\r\n                <_>\r\n                  21 9 2 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0123078199103475</threshold>\r\n            <left_val>-0.1484645009040833</left_val>\r\n            <right_val>0.2714886069297791</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 4 21 6 -1.</_>\r\n                <_>\r\n                  9 6 7 2 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.4659403860569000</threshold>\r\n            <left_val>-0.0705008506774902</left_val>\r\n            <right_val>0.5868018865585327</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 3 2 10 -1.</_>\r\n                <_>\r\n                  24 3 1 5 2.</_>\r\n                <_>\r\n                  23 8 1 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.5693339519202709e-003</threshold>\r\n            <left_val>-0.1150237023830414</left_val>\r\n            <right_val>0.1375536024570465</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 2 10 -1.</_>\r\n                <_>\r\n                  0 3 1 5 2.</_>\r\n                <_>\r\n                  1 8 1 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.5176738854497671e-003</threshold>\r\n            <left_val>-0.1778890937566757</left_val>\r\n            <right_val>0.2172407060861588</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 10 1 4 -1.</_>\r\n                <_>\r\n                  23 11 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>4.5299702323973179e-003</threshold>\r\n            <left_val>0.0458603501319885</left_val>\r\n            <right_val>-0.5376703143119812</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 10 4 1 -1.</_>\r\n                <_>\r\n                  2 11 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>4.0295510552823544e-003</threshold>\r\n            <left_val>0.0599071383476257</left_val>\r\n            <right_val>-0.5803095102310181</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 10 9 4 -1.</_>\r\n                <_>\r\n                  8 11 9 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.0281656011939049e-003</threshold>\r\n            <left_val>-0.0889611616730690</left_val>\r\n            <right_val>0.3474006950855255</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 8 13 6 -1.</_>\r\n                <_>\r\n                  5 11 13 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0710994601249695</threshold>\r\n            <left_val>0.4003205001354218</left_val>\r\n            <right_val>-0.0876752585172653</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 15 4 -1.</_>\r\n                <_>\r\n                  5 2 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0905078798532486</threshold>\r\n            <left_val>0.3202385008335114</left_val>\r\n            <right_val>-0.1107280030846596</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 22 15 -1.</_>\r\n                <_>\r\n                  12 0 11 15 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.3949914872646332</threshold>\r\n            <left_val>-0.0544822700321674</left_val>\r\n            <right_val>0.4376561045646668</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 14 8 1 -1.</_>\r\n                <_>\r\n                  12 14 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.0021281242370605e-003</threshold>\r\n            <left_val>0.0412968583405018</left_val>\r\n            <right_val>-0.6277515888214111</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 3 8 4 -1.</_>\r\n                <_>\r\n                  1 4 8 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0126753300428391</threshold>\r\n            <left_val>0.1864306032657623</left_val>\r\n            <right_val>-0.1586595028638840</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 13 1 2 -1.</_>\r\n                <_>\r\n                  15 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.2523188060149550e-004</threshold>\r\n            <left_val>-0.0737809464335442</left_val>\r\n            <right_val>0.1131825000047684</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 15 6 -1.</_>\r\n                <_>\r\n                  5 4 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1519853025674820</threshold>\r\n            <left_val>-0.0698502063751221</left_val>\r\n            <right_val>0.5526459217071533</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 12 2 1 -1.</_>\r\n                <_>\r\n                  23 12 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-5.9174448251724243e-003</threshold>\r\n            <left_val>-0.4224376976490021</left_val>\r\n            <right_val>0.0234292708337307</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 12 1 2 -1.</_>\r\n                <_>\r\n                  2 12 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.1085697486996651e-004</threshold>\r\n            <left_val>-0.1782114058732987</left_val>\r\n            <right_val>0.1747542023658752</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 13 9 2 -1.</_>\r\n                <_>\r\n                  11 13 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0286266505718231</threshold>\r\n            <left_val>-0.7806789875030518</left_val>\r\n            <right_val>0.0430335216224194</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 0 8 2 -1.</_>\r\n                <_>\r\n                  8 1 8 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.2388539984822273e-003</threshold>\r\n            <left_val>-0.1174874976277351</left_val>\r\n            <right_val>0.2301342934370041</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 12 4 3 -1.</_>\r\n                <_>\r\n                  20 13 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.8310899659991264e-003</threshold>\r\n            <left_val>-0.5170273780822754</left_val>\r\n            <right_val>0.0224770605564117</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 18 10 -1.</_>\r\n                <_>\r\n                  3 0 9 5 2.</_>\r\n                <_>\r\n                  12 5 9 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1381812989711762</threshold>\r\n            <left_val>-0.6718307137489319</left_val>\r\n            <right_val>0.0339458398520947</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 12 6 3 -1.</_>\r\n                <_>\r\n                  12 12 2 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0129029303789139</threshold>\r\n            <left_val>0.0190411508083344</left_val>\r\n            <right_val>-0.4739249050617218</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 1 8 -1.</_>\r\n                <_>\r\n                  0 2 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.3398052006959915e-003</threshold>\r\n            <left_val>0.0412811301648617</left_val>\r\n            <right_val>-0.5821130871772766</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 5 3 4 -1.</_>\r\n                <_>\r\n                  22 6 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.4067512943875045e-005</threshold>\r\n            <left_val>-0.2301639020442963</left_val>\r\n            <right_val>0.1240853965282440</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 4 4 -1.</_>\r\n                <_>\r\n                  0 6 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0172388590872288</threshold>\r\n            <left_val>0.0539665818214417</left_val>\r\n            <right_val>-0.5818564891815186</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 14 10 -1.</_>\r\n                <_>\r\n                  13 0 7 5 2.</_>\r\n                <_>\r\n                  6 5 7 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0786773264408112</threshold>\r\n            <left_val>-0.4061115086078644</left_val>\r\n            <right_val>0.0569235086441040</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 12 4 3 -1.</_>\r\n                <_>\r\n                  1 13 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.5859591811895370e-003</threshold>\r\n            <left_val>0.0368424393236637</left_val>\r\n            <right_val>-0.5646867752075195</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 7 2 2 -1.</_>\r\n                <_>\r\n                  21 7 1 1 2.</_>\r\n                <_>\r\n                  20 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.1322399415075779e-004</threshold>\r\n            <left_val>0.1785047054290772</left_val>\r\n            <right_val>-0.0668883100152016</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 7 2 2 -1.</_>\r\n                <_>\r\n                  3 7 1 1 2.</_>\r\n                <_>\r\n                  4 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.9400849062949419e-004</threshold>\r\n            <left_val>-0.0783978328108788</left_val>\r\n            <right_val>0.3054557144641876</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 6 3 4 -1.</_>\r\n                <_>\r\n                  22 7 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0128271998837590</threshold>\r\n            <left_val>0.0404374599456787</left_val>\r\n            <right_val>-0.6479570865631104</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 6 7 3 -1.</_>\r\n                <_>\r\n                  9 7 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0119779799133539</threshold>\r\n            <left_val>-0.0993791595101357</left_val>\r\n            <right_val>0.2267276048660278</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 6 4 2 -1.</_>\r\n                <_>\r\n                  11 7 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.9378769472241402e-003</threshold>\r\n            <left_val>0.2706328034400940</left_val>\r\n            <right_val>-0.0839221030473709</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 5 4 -1.</_>\r\n                <_>\r\n                  0 7 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0203377306461334</threshold>\r\n            <left_val>0.0400571115314960</left_val>\r\n            <right_val>-0.6170961260795593</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 6 -1.</_>\r\n                <_>\r\n                  5 5 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1582631021738052</threshold>\r\n            <left_val>0.3718011081218720</left_val>\r\n            <right_val>-0.0776448771357536</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 4 5 2 -1.</_>\r\n                <_>\r\n                  4 5 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.5150578953325748e-003</threshold>\r\n            <left_val>-0.1424572020769119</left_val>\r\n            <right_val>0.1946897059679031</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 12 6 3 -1.</_>\r\n                <_>\r\n                  13 12 2 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0179421696811914</threshold>\r\n            <left_val>-0.7258480787277222</left_val>\r\n            <right_val>0.0292347799986601</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 1 3 -1.</_>\r\n                <_>\r\n                  2 1 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.2153151482343674e-003</threshold>\r\n            <left_val>0.0460041500627995</left_val>\r\n            <right_val>-0.4536756873130798</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 11 12 2 -1.</_>\r\n                <_>\r\n                  11 11 4 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.7863838523626328e-003</threshold>\r\n            <left_val>0.1746426969766617</left_val>\r\n            <right_val>-0.1098980978131294</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 4 4 -1.</_>\r\n                <_>\r\n                  0 9 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.4133447855710983e-003</threshold>\r\n            <left_val>0.0346476286649704</left_val>\r\n            <right_val>-0.5983666181564331</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 7 9 3 -1.</_>\r\n                <_>\r\n                  8 8 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.6218741014599800e-003</threshold>\r\n            <left_val>-0.1057026013731957</left_val>\r\n            <right_val>0.2037336975336075</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 8 9 6 -1.</_>\r\n                <_>\r\n                  8 10 9 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0216018799692392</threshold>\r\n            <left_val>-0.0909303426742554</left_val>\r\n            <right_val>0.2887038886547089</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 11 5 4 -1.</_>\r\n                <_>\r\n                  20 12 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0118230897933245</threshold>\r\n            <left_val>-0.6303614974021912</left_val>\r\n            <right_val>0.0240826196968555</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 5 8 3 -1.</_>\r\n                <_>\r\n                  9 5 4 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0202329792082310</threshold>\r\n            <left_val>-0.7420278787612915</left_val>\r\n            <right_val>0.0235212203115225</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 0 2 2 -1.</_>\r\n                <_>\r\n                  17 0 1 1 2.</_>\r\n                <_>\r\n                  16 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.4510147785767913e-004</threshold>\r\n            <left_val>-0.0552557893097401</left_val>\r\n            <right_val>0.1650166064500809</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 5 4 -1.</_>\r\n                <_>\r\n                  0 12 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.1876022741198540e-003</threshold>\r\n            <left_val>-0.5770931839942932</left_val>\r\n            <right_val>0.0352346412837505</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 0 2 2 -1.</_>\r\n                <_>\r\n                  17 0 1 1 2.</_>\r\n                <_>\r\n                  16 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.5044958824291825e-004</threshold>\r\n            <left_val>0.1859780997037888</left_val>\r\n            <right_val>-0.0824367776513100</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 9 6 6 -1.</_>\r\n                <_>\r\n                  7 9 2 6 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0273097790777683</threshold>\r\n            <left_val>-0.7204548716545105</left_val>\r\n            <right_val>0.0276838503777981</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 10 10 4 -1.</_>\r\n                <_>\r\n                  19 10 5 2 2.</_>\r\n                <_>\r\n                  14 12 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.3051019571721554e-003</threshold>\r\n            <left_val>-0.0758159905672073</left_val>\r\n            <right_val>0.1228180006146431</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 6 3 1 -1.</_>\r\n                <_>\r\n                  7 6 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.2118180105462670e-004</threshold>\r\n            <left_val>-0.0847066268324852</left_val>\r\n            <right_val>0.2212305068969727</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 6 3 2 -1.</_>\r\n                <_>\r\n                  17 6 1 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.5794708896428347e-004</threshold>\r\n            <left_val>0.0922004431486130</left_val>\r\n            <right_val>-0.0512673109769821</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 6 3 2 -1.</_>\r\n                <_>\r\n                  7 6 1 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.2906070332974195e-003</threshold>\r\n            <left_val>0.2364850938320160</left_val>\r\n            <right_val>-0.0856367424130440</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 3 8 4 -1.</_>\r\n                <_>\r\n                  12 4 8 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0234409496188164</threshold>\r\n            <left_val>-0.3417592048645020</left_val>\r\n            <right_val>0.0303556900471449</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 1 2 -1.</_>\r\n                <_>\r\n                  2 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>6.7003733420278877e-005</threshold>\r\n            <left_val>-0.1778312027454376</left_val>\r\n            <right_val>0.1098366007208824</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 0 2 1 -1.</_>\r\n                <_>\r\n                  21 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-2.0913260523229837e-003</threshold>\r\n            <left_val>-0.3296548128128052</left_val>\r\n            <right_val>0.0488219298422337</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 1 2 -1.</_>\r\n                <_>\r\n                  4 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.2883368916809559e-003</threshold>\r\n            <left_val>0.0476020798087120</left_val>\r\n            <right_val>-0.4229690134525299</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 1 8 6 -1.</_>\r\n                <_>\r\n                  11 3 8 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.1046722009778023</threshold>\r\n            <left_val>0.0145577099174261</left_val>\r\n            <right_val>-0.5163959860801697</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 3 4 8 -1.</_>\r\n                <_>\r\n                  13 4 2 8 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0410936884582043</threshold>\r\n            <left_val>0.0255694594234228</left_val>\r\n            <right_val>-0.6734575033187866</right_val></_></_>\r\n        <_>\r\n          <!-- tree 57 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 20 15 -1.</_>\r\n                <_>\r\n                  3 0 10 15 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.4545299112796783</threshold>\r\n            <left_val>-0.0473212711513042</left_val>\r\n            <right_val>0.4647259116172791</right_val></_></_>\r\n        <_>\r\n          <!-- tree 58 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 0 7 3 -1.</_>\r\n                <_>\r\n                  9 1 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.4200271368026733e-003</threshold>\r\n            <left_val>0.2172905951738358</left_val>\r\n            <right_val>-0.0805237367749214</right_val></_></_>\r\n        <_>\r\n          <!-- tree 59 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 1 5 2 -1.</_>\r\n                <_>\r\n                  12 2 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.3253689762204885e-003</threshold>\r\n            <left_val>0.1196364015340805</left_val>\r\n            <right_val>-0.0847371667623520</right_val></_></_>\r\n        <_>\r\n          <!-- tree 60 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 1 13 3 -1.</_>\r\n                <_>\r\n                  6 2 13 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0152236903086305</threshold>\r\n            <left_val>-0.0892436280846596</left_val>\r\n            <right_val>0.2284111976623535</right_val></_></_>\r\n        <_>\r\n          <!-- tree 61 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 3 10 12 -1.</_>\r\n                <_>\r\n                  19 3 5 6 2.</_>\r\n                <_>\r\n                  14 9 5 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0312239099293947</threshold>\r\n            <left_val>0.1464260965585709</left_val>\r\n            <right_val>-0.1012998968362808</right_val></_></_>\r\n        <_>\r\n          <!-- tree 62 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 6 21 6 -1.</_>\r\n                <_>\r\n                  8 6 7 6 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0729675367474556</threshold>\r\n            <left_val>0.1977909952402115</left_val>\r\n            <right_val>-0.0998045280575752</right_val></_></_>\r\n        <_>\r\n          <!-- tree 63 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 0 10 12 -1.</_>\r\n                <_>\r\n                  12 0 5 12 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0434687100350857</threshold>\r\n            <left_val>-0.0738932862877846</left_val>\r\n            <right_val>0.1571179032325745</right_val></_></_>\r\n        <_>\r\n          <!-- tree 64 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 8 11 3 -1.</_>\r\n                <_>\r\n                  7 9 11 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.7427257783710957e-003</threshold>\r\n            <left_val>-0.0907922536134720</left_val>\r\n            <right_val>0.2449675947427750</right_val></_></_>\r\n        <_>\r\n          <!-- tree 65 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 5 22 10 -1.</_>\r\n                <_>\r\n                  2 5 11 10 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0834884494543076</threshold>\r\n            <left_val>0.1732859015464783</left_val>\r\n            <right_val>-0.1288128942251205</right_val></_></_>\r\n        <_>\r\n          <!-- tree 66 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 4 15 4 -1.</_>\r\n                <_>\r\n                  5 6 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0421115085482597</threshold>\r\n            <left_val>-0.1475321054458618</left_val>\r\n            <right_val>0.1373448967933655</right_val></_></_>\r\n        <_>\r\n          <!-- tree 67 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 1 15 6 -1.</_>\r\n                <_>\r\n                  7 3 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0966737270355225</threshold>\r\n            <left_val>-0.0551961399614811</left_val>\r\n            <right_val>0.3563303947448731</right_val></_></_>\r\n        <_>\r\n          <!-- tree 68 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 2 6 -1.</_>\r\n                <_>\r\n                  0 10 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.8993981480598450e-003</threshold>\r\n            <left_val>-0.5261930823326111</left_val>\r\n            <right_val>0.0388906002044678</right_val></_></_>\r\n        <_>\r\n          <!-- tree 69 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 15 4 -1.</_>\r\n                <_>\r\n                  5 2 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0238508302718401</threshold>\r\n            <left_val>0.1924559026956558</left_val>\r\n            <right_val>-0.1050153970718384</right_val></_></_>\r\n        <_>\r\n          <!-- tree 70 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 8 2 2 -1.</_>\r\n                <_>\r\n                  7 8 1 1 2.</_>\r\n                <_>\r\n                  8 9 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.4902130290865898e-004</threshold>\r\n            <left_val>0.2476740926504135</left_val>\r\n            <right_val>-0.0738597288727760</right_val></_></_>\r\n        <_>\r\n          <!-- tree 71 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 9 9 2 -1.</_>\r\n                <_>\r\n                  14 9 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0230488497763872</threshold>\r\n            <left_val>-0.5220348238945007</left_val>\r\n            <right_val>0.0295383799821138</right_val></_></_>\r\n        <_>\r\n          <!-- tree 72 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 8 2 2 -1.</_>\r\n                <_>\r\n                  7 8 1 1 2.</_>\r\n                <_>\r\n                  8 9 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.7920900871977210e-004</threshold>\r\n            <left_val>-0.0807055011391640</left_val>\r\n            <right_val>0.2493984997272492</right_val></_></_>\r\n        <_>\r\n          <!-- tree 73 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 10 8 4 -1.</_>\r\n                <_>\r\n                  17 11 8 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0254354309290648</threshold>\r\n            <left_val>-0.6520490050315857</left_val>\r\n            <right_val>0.0163280703127384</right_val></_></_>\r\n        <_>\r\n          <!-- tree 74 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 10 8 4 -1.</_>\r\n                <_>\r\n                  0 11 8 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0176391601562500</threshold>\r\n            <left_val>0.0246949195861816</left_val>\r\n            <right_val>-0.6850522756576538</right_val></_></_>\r\n        <_>\r\n          <!-- tree 75 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 11 6 4 -1.</_>\r\n                <_>\r\n                  18 11 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0205357391387224</threshold>\r\n            <left_val>0.0165182203054428</left_val>\r\n            <right_val>-0.4285225868225098</right_val></_></_>\r\n        <_>\r\n          <!-- tree 76 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 13 24 1 -1.</_>\r\n                <_>\r\n                  6 13 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0111132804304361</threshold>\r\n            <left_val>-0.0871591791510582</left_val>\r\n            <right_val>0.2062001973390579</right_val></_></_></trees>\r\n      <stage_threshold>-1.3936280012130737</stage_threshold>\r\n      <parent>7</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 9 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 10 6 -1.</_>\r\n                <_>\r\n                  0 9 5 3 2.</_>\r\n                <_>\r\n                  5 12 5 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0140618495643139</threshold>\r\n            <left_val>-0.2737283110618591</left_val>\r\n            <right_val>0.4017829895019531</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 5 10 10 -1.</_>\r\n                <_>\r\n                  18 5 5 5 2.</_>\r\n                <_>\r\n                  13 10 5 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0334245301783085</threshold>\r\n            <left_val>0.3433864116668701</left_val>\r\n            <right_val>-0.1524070948362351</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 4 2 -1.</_>\r\n                <_>\r\n                  2 4 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.3982729073613882e-003</threshold>\r\n            <left_val>0.3046114146709442</left_val>\r\n            <right_val>-0.2162856012582779</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 5 12 10 -1.</_>\r\n                <_>\r\n                  19 5 6 5 2.</_>\r\n                <_>\r\n                  13 10 6 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0673939511179924</threshold>\r\n            <left_val>-0.0539562106132507</left_val>\r\n            <right_val>0.3304964005947113</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 12 10 -1.</_>\r\n                <_>\r\n                  0 5 6 5 2.</_>\r\n                <_>\r\n                  6 10 6 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0515447482466698</threshold>\r\n            <left_val>0.3804036974906921</left_val>\r\n            <right_val>-0.1334261000156403</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 11 3 4 -1.</_>\r\n                <_>\r\n                  11 13 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.6630779504776001e-003</threshold>\r\n            <left_val>-0.1760202944278717</left_val>\r\n            <right_val>0.2139966934919357</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 8 2 5 -1.</_>\r\n                <_>\r\n                  5 8 1 5 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>7.8836623579263687e-003</threshold>\r\n            <left_val>0.0570616200566292</left_val>\r\n            <right_val>-0.5150743126869202</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 14 18 1 -1.</_>\r\n                <_>\r\n                  4 14 9 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.9480048045516014e-003</threshold>\r\n            <left_val>0.2230996936559677</left_val>\r\n            <right_val>-0.1190536990761757</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 1 6 -1.</_>\r\n                <_>\r\n                  1 3 1 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.5760587565600872e-004</threshold>\r\n            <left_val>0.0999659672379494</left_val>\r\n            <right_val>-0.2558285892009735</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 9 9 4 -1.</_>\r\n                <_>\r\n                  8 10 9 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.5389392226934433e-003</threshold>\r\n            <left_val>-0.0655315071344376</left_val>\r\n            <right_val>0.3246265947818756</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 5 4 -1.</_>\r\n                <_>\r\n                  0 10 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.7904132194817066e-003</threshold>\r\n            <left_val>0.0450260303914547</left_val>\r\n            <right_val>-0.6068859100341797</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 5 6 2 -1.</_>\r\n                <_>\r\n                  21 5 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.0692770853638649e-003</threshold>\r\n            <left_val>-0.0624743513762951</left_val>\r\n            <right_val>0.1570695042610169</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 6 2 -1.</_>\r\n                <_>\r\n                  2 5 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.1110940035432577e-003</threshold>\r\n            <left_val>-0.0744680091738701</left_val>\r\n            <right_val>0.2600801885128021</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 9 6 3 -1.</_>\r\n                <_>\r\n                  15 9 2 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0156514495611191</threshold>\r\n            <left_val>0.0255663506686687</left_val>\r\n            <right_val>-0.5172523260116577</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 3 21 9 -1.</_>\r\n                <_>\r\n                  9 3 7 9 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2044613063335419</threshold>\r\n            <left_val>-0.0763430967926979</left_val>\r\n            <right_val>0.3323906958103180</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 9 10 2 -1.</_>\r\n                <_>\r\n                  11 9 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0101691596210003</threshold>\r\n            <left_val>0.1606681048870087</left_val>\r\n            <right_val>-0.1091597974300385</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 14 -1.</_>\r\n                <_>\r\n                  0 0 12 7 2.</_>\r\n                <_>\r\n                  12 7 12 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1894780993461609</threshold>\r\n            <left_val>0.0538599416613579</left_val>\r\n            <right_val>-0.5398759841918945</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 15 6 -1.</_>\r\n                <_>\r\n                  5 4 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1479240059852600</threshold>\r\n            <left_val>0.2385465949773789</left_val>\r\n            <right_val>-0.1132820993661881</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 16 11 -1.</_>\r\n                <_>\r\n                  10 0 8 11 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1483031064271927</threshold>\r\n            <left_val>0.3646511137485504</left_val>\r\n            <right_val>-0.0753156766295433</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 15 6 -1.</_>\r\n                <_>\r\n                  5 2 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1325532943010330</threshold>\r\n            <left_val>0.2919555902481079</left_val>\r\n            <right_val>-0.0949441567063332</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 5 5 4 -1.</_>\r\n                <_>\r\n                  10 6 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0163901709020138</threshold>\r\n            <left_val>0.3920511901378632</left_val>\r\n            <right_val>-0.0685021281242371</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 0 2 3 -1.</_>\r\n                <_>\r\n                  23 1 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.3240979798138142e-003</threshold>\r\n            <left_val>-0.6633772253990173</left_val>\r\n            <right_val>0.0337768010795116</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 6 3 -1.</_>\r\n                <_>\r\n                  0 1 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0147409504279494</threshold>\r\n            <left_val>0.0431423708796501</left_val>\r\n            <right_val>-0.5016931891441345</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 5 15 2 -1.</_>\r\n                <_>\r\n                  10 6 15 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0171020403504372</threshold>\r\n            <left_val>-0.1739968061447144</left_val>\r\n            <right_val>0.2036074995994568</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 6 4 -1.</_>\r\n                <_>\r\n                  0 4 3 2 2.</_>\r\n                <_>\r\n                  3 6 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.5232060626149178e-003</threshold>\r\n            <left_val>0.2614240050315857</left_val>\r\n            <right_val>-0.0894730314612389</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 7 2 4 -1.</_>\r\n                <_>\r\n                  20 8 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>8.0899456515908241e-003</threshold>\r\n            <left_val>0.0491316393017769</left_val>\r\n            <right_val>-0.3869245946407318</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 7 4 2 -1.</_>\r\n                <_>\r\n                  5 8 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0111914901062846</threshold>\r\n            <left_val>-0.7151393890380859</left_val>\r\n            <right_val>0.0292793400585651</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 13 1 2 -1.</_>\r\n                <_>\r\n                  24 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.4855492382775992e-005</threshold>\r\n            <left_val>0.1147895976901054</left_val>\r\n            <right_val>-0.1195824965834618</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 4 15 -1.</_>\r\n                <_>\r\n                  3 0 2 15 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0263162907212973</threshold>\r\n            <left_val>0.0260859299451113</left_val>\r\n            <right_val>-0.8071029186248779</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 0 4 1 -1.</_>\r\n                <_>\r\n                  22 1 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0132494196295738</threshold>\r\n            <left_val>-0.3211443126201630</left_val>\r\n            <right_val>7.5486088171601295e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 1 4 -1.</_>\r\n                <_>\r\n                  3 1 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>6.2180599197745323e-003</threshold>\r\n            <left_val>0.0555592402815819</left_val>\r\n            <right_val>-0.4065248966217041</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 1 24 14 -1.</_>\r\n                <_>\r\n                  13 1 12 7 2.</_>\r\n                <_>\r\n                  1 8 12 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1724980026483536</threshold>\r\n            <left_val>0.0407503582537174</left_val>\r\n            <right_val>-0.5056337714195252</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 9 6 6 -1.</_>\r\n                <_>\r\n                  8 9 2 6 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0216798391193151</threshold>\r\n            <left_val>-0.6235452890396118</left_val>\r\n            <right_val>0.0264780297875404</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 4 -1.</_>\r\n                <_>\r\n                  10 3 5 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0167031493037939</threshold>\r\n            <left_val>-0.1379484981298447</left_val>\r\n            <right_val>0.1374935954809189</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 20 10 -1.</_>\r\n                <_>\r\n                  5 0 10 10 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0904578119516373</threshold>\r\n            <left_val>0.2364515066146851</left_val>\r\n            <right_val>-0.0822857320308685</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 3 6 12 -1.</_>\r\n                <_>\r\n                  22 3 3 6 2.</_>\r\n                <_>\r\n                  19 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0319220200181007</threshold>\r\n            <left_val>0.2578540146350861</left_val>\r\n            <right_val>-0.0472433306276798</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 2 7 2 -1.</_>\r\n                <_>\r\n                  3 3 7 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0107858600094914</threshold>\r\n            <left_val>0.1915684044361115</left_val>\r\n            <right_val>-0.1092626005411148</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 3 6 12 -1.</_>\r\n                <_>\r\n                  22 3 3 6 2.</_>\r\n                <_>\r\n                  19 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0153568601235747</threshold>\r\n            <left_val>-0.0915980264544487</left_val>\r\n            <right_val>0.1492947041988373</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 6 12 -1.</_>\r\n                <_>\r\n                  0 3 3 6 2.</_>\r\n                <_>\r\n                  3 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0298386197537184</threshold>\r\n            <left_val>0.3693186044692993</left_val>\r\n            <right_val>-0.0698615685105324</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 14 6 1 -1.</_>\r\n                <_>\r\n                  19 14 3 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.5088700456544757e-003</threshold>\r\n            <left_val>-0.0684053674340248</left_val>\r\n            <right_val>0.1167493984103203</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 2 6 13 -1.</_>\r\n                <_>\r\n                  6 2 2 13 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0391593612730503</threshold>\r\n            <left_val>-0.5139203071594238</left_val>\r\n            <right_val>0.0376962982118130</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 14 8 1 -1.</_>\r\n                <_>\r\n                  19 14 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.6957627683877945e-003</threshold>\r\n            <left_val>0.0178152993321419</left_val>\r\n            <right_val>-0.4685910940170288</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 14 8 1 -1.</_>\r\n                <_>\r\n                  2 14 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.2683161124587059e-004</threshold>\r\n            <left_val>-0.1310783028602600</left_val>\r\n            <right_val>0.1574900001287460</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 11 2 2 -1.</_>\r\n                <_>\r\n                  23 11 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>3.9894571527838707e-003</threshold>\r\n            <left_val>0.0452235005795956</left_val>\r\n            <right_val>-0.4237715899944305</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 11 2 2 -1.</_>\r\n                <_>\r\n                  2 11 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-5.1600970327854156e-003</threshold>\r\n            <left_val>-0.5150998830795288</left_val>\r\n            <right_val>0.0348056405782700</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 4 9 4 -1.</_>\r\n                <_>\r\n                  8 5 9 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0237389300018549</threshold>\r\n            <left_val>0.2213699966669083</left_val>\r\n            <right_val>-0.0842292308807373</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 4 9 3 -1.</_>\r\n                <_>\r\n                  8 5 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0145637700334191</threshold>\r\n            <left_val>-0.0898087024688721</left_val>\r\n            <right_val>0.2186468988656998</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 6 2 4 -1.</_>\r\n                <_>\r\n                  23 6 1 2 2.</_>\r\n                <_>\r\n                  22 8 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.2849658317863941e-004</threshold>\r\n            <left_val>-0.0709035396575928</left_val>\r\n            <right_val>0.1204996034502983</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 3 6 8 -1.</_>\r\n                <_>\r\n                  9 3 2 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0311498604714870</threshold>\r\n            <left_val>-0.6067348122596741</left_val>\r\n            <right_val>0.0294798705726862</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 4 3 4 -1.</_>\r\n                <_>\r\n                  22 5 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0167685598134995</threshold>\r\n            <left_val>0.0236525908112526</left_val>\r\n            <right_val>-0.4164066910743713</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 9 4 2 -1.</_>\r\n                <_>\r\n                  4 10 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-8.9033348485827446e-003</threshold>\r\n            <left_val>-0.5536022186279297</left_val>\r\n            <right_val>0.0302125699818134</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 7 2 2 -1.</_>\r\n                <_>\r\n                  18 7 1 1 2.</_>\r\n                <_>\r\n                  17 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3961132653057575e-004</threshold>\r\n            <left_val>-0.0588473901152611</left_val>\r\n            <right_val>0.1531303972005844</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 11 6 1 -1.</_>\r\n                <_>\r\n                  11 11 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.3886012434959412e-003</threshold>\r\n            <left_val>-0.7052780985832214</left_val>\r\n            <right_val>0.0250979401171207</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 7 2 2 -1.</_>\r\n                <_>\r\n                  18 7 1 1 2.</_>\r\n                <_>\r\n                  17 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.4085000515915453e-004</threshold>\r\n            <left_val>0.1771869063377380</left_val>\r\n            <right_val>-0.1048467978835106</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 2 4 -1.</_>\r\n                <_>\r\n                  0 8 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.1828009784221649e-003</threshold>\r\n            <left_val>0.0330388285219669</left_val>\r\n            <right_val>-0.4948574900627136</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 5 5 6 -1.</_>\r\n                <_>\r\n                  20 7 5 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.2702568033710122e-004</threshold>\r\n            <left_val>-0.1844830960035324</left_val>\r\n            <right_val>0.0777885988354683</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 2 2 -1.</_>\r\n                <_>\r\n                  6 7 1 1 2.</_>\r\n                <_>\r\n                  7 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.0980831040069461e-004</threshold>\r\n            <left_val>0.1959578990936279</left_val>\r\n            <right_val>-0.0837520435452461</right_val></_></_>\r\n        <_>\r\n          <!-- tree 57 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 7 2 2 -1.</_>\r\n                <_>\r\n                  18 7 1 1 2.</_>\r\n                <_>\r\n                  17 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.2273030006326735e-004</threshold>\r\n            <left_val>-0.0814708098769188</left_val>\r\n            <right_val>0.1209300011396408</right_val></_></_>\r\n        <_>\r\n          <!-- tree 58 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 2 2 -1.</_>\r\n                <_>\r\n                  6 7 1 1 2.</_>\r\n                <_>\r\n                  7 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.6565610682591796e-004</threshold>\r\n            <left_val>-0.0953319519758224</left_val>\r\n            <right_val>0.2288299947977066</right_val></_></_>\r\n        <_>\r\n          <!-- tree 59 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 0 4 9 -1.</_>\r\n                <_>\r\n                  16 0 2 9 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0216477997601032</threshold>\r\n            <left_val>-0.6933805942535400</left_val>\r\n            <right_val>0.0170615408569574</right_val></_></_>\r\n        <_>\r\n          <!-- tree 60 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 14 14 -1.</_>\r\n                <_>\r\n                  5 1 7 7 2.</_>\r\n                <_>\r\n                  12 8 7 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0595006607472897</threshold>\r\n            <left_val>0.0526031702756882</left_val>\r\n            <right_val>-0.2782197892665863</right_val></_></_>\r\n        <_>\r\n          <!-- tree 61 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 0 4 9 -1.</_>\r\n                <_>\r\n                  16 0 2 9 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0253651998937130</threshold>\r\n            <left_val>8.9954538270831108e-003</left_val>\r\n            <right_val>-0.6383489966392517</right_val></_></_>\r\n        <_>\r\n          <!-- tree 62 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 5 3 -1.</_>\r\n                <_>\r\n                  0 8 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.9667091332376003e-003</threshold>\r\n            <left_val>-0.3175272047519684</left_val>\r\n            <right_val>0.0470112897455692</right_val></_></_>\r\n        <_>\r\n          <!-- tree 63 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 2 3 4 -1.</_>\r\n                <_>\r\n                  22 3 1 4 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>8.2784779369831085e-003</threshold>\r\n            <left_val>-0.0544440597295761</left_val>\r\n            <right_val>0.2219938933849335</right_val></_></_>\r\n        <_>\r\n          <!-- tree 64 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 4 15 -1.</_>\r\n                <_>\r\n                  7 0 2 15 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0221254508942366</threshold>\r\n            <left_val>-0.6738150715827942</left_val>\r\n            <right_val>0.0225456394255161</right_val></_></_>\r\n        <_>\r\n          <!-- tree 65 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 2 3 4 -1.</_>\r\n                <_>\r\n                  22 3 1 4 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0180159192532301</threshold>\r\n            <left_val>0.1972057968378067</left_val>\r\n            <right_val>-0.0419279783964157</right_val></_></_>\r\n        <_>\r\n          <!-- tree 66 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 2 4 3 -1.</_>\r\n                <_>\r\n                  3 3 4 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>8.4426235407590866e-003</threshold>\r\n            <left_val>-0.0605471916496754</left_val>\r\n            <right_val>0.2649214863777161</right_val></_></_>\r\n        <_>\r\n          <!-- tree 67 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 5 3 7 -1.</_>\r\n                <_>\r\n                  14 6 1 7 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0325668416917324</threshold>\r\n            <left_val>-0.7107285857200623</left_val>\r\n            <right_val>0.0118406098335981</right_val></_></_>\r\n        <_>\r\n          <!-- tree 68 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 10 15 1 -1.</_>\r\n                <_>\r\n                  9 10 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.7655492089688778e-003</threshold>\r\n            <left_val>0.1384397000074387</left_val>\r\n            <right_val>-0.1150531992316246</right_val></_></_>\r\n        <_>\r\n          <!-- tree 69 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 6 10 9 -1.</_>\r\n                <_>\r\n                  12 6 5 9 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0569362901151180</threshold>\r\n            <left_val>-0.0613397099077702</left_val>\r\n            <right_val>0.2665694057941437</right_val></_></_>\r\n        <_>\r\n          <!-- tree 70 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 1 22 14 -1.</_>\r\n                <_>\r\n                  12 1 11 14 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1374146044254303</threshold>\r\n            <left_val>-0.1139679029583931</left_val>\r\n            <right_val>0.1789363026618958</right_val></_></_>\r\n        <_>\r\n          <!-- tree 71 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 8 3 2 -1.</_>\r\n                <_>\r\n                  11 9 3 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.4123009536415339e-003</threshold>\r\n            <left_val>-0.0668940767645836</left_val>\r\n            <right_val>0.2595616877079010</right_val></_></_>\r\n        <_>\r\n          <!-- tree 72 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 5 11 2 -1.</_>\r\n                <_>\r\n                  2 6 11 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0116290198639035</threshold>\r\n            <left_val>-0.1346206963062286</left_val>\r\n            <right_val>0.1518495976924896</right_val></_></_></trees>\r\n      <stage_threshold>-1.3217060565948486</stage_threshold>\r\n      <parent>8</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 10 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 1 10 4 -1.</_>\r\n                <_>\r\n                  3 2 10 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0302658006548882</threshold>\r\n            <left_val>0.3809668123722076</left_val>\r\n            <right_val>-0.1337769925594330</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 15 6 -1.</_>\r\n                <_>\r\n                  5 3 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1888993978500366</threshold>\r\n            <left_val>0.3472220003604889</left_val>\r\n            <right_val>-0.1143490970134735</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 6 6 -1.</_>\r\n                <_>\r\n                  0 9 3 3 2.</_>\r\n                <_>\r\n                  3 12 3 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.4756601564586163e-003</threshold>\r\n            <left_val>-0.1779001951217651</left_val>\r\n            <right_val>0.1983720064163208</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 3 5 2 -1.</_>\r\n                <_>\r\n                  19 4 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.2559102922677994e-003</threshold>\r\n            <left_val>0.2553296089172363</left_val>\r\n            <right_val>-0.0956856831908226</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 10 14 4 -1.</_>\r\n                <_>\r\n                  2 10 7 2 2.</_>\r\n                <_>\r\n                  9 12 7 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0103751895949245</threshold>\r\n            <left_val>-0.1290100961923599</left_val>\r\n            <right_val>0.2047273963689804</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 3 24 8 -1.</_>\r\n                <_>\r\n                  9 3 8 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2527360022068024</threshold>\r\n            <left_val>-0.0779134780168533</left_val>\r\n            <right_val>0.3413710892200470</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 2 6 -1.</_>\r\n                <_>\r\n                  0 10 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.9952310770750046e-003</threshold>\r\n            <left_val>0.1191667988896370</left_val>\r\n            <right_val>-0.4138369858264923</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 14 2 1 -1.</_>\r\n                <_>\r\n                  23 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.6510503529570997e-005</threshold>\r\n            <left_val>-0.2305306047201157</left_val>\r\n            <right_val>0.1328932046890259</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 6 4 -1.</_>\r\n                <_>\r\n                  0 4 3 2 2.</_>\r\n                <_>\r\n                  3 6 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0104297399520874</threshold>\r\n            <left_val>-0.0622061118483543</left_val>\r\n            <right_val>0.2935121059417725</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 13 21 1 -1.</_>\r\n                <_>\r\n                  10 13 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.4513092190027237e-003</threshold>\r\n            <left_val>0.1671503931283951</left_val>\r\n            <right_val>-0.1161310002207756</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 14 -1.</_>\r\n                <_>\r\n                  0 0 12 7 2.</_>\r\n                <_>\r\n                  12 7 12 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1386305987834930</threshold>\r\n            <left_val>-0.4514685869216919</left_val>\r\n            <right_val>0.0725729763507843</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 0 1 10 -1.</_>\r\n                <_>\r\n                  24 5 1 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0154232997447252</threshold>\r\n            <left_val>-0.4277118146419525</left_val>\r\n            <right_val>0.0248409193009138</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 11 2 2 -1.</_>\r\n                <_>\r\n                  4 11 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-6.5782992169260979e-003</threshold>\r\n            <left_val>-0.6540787816047669</left_val>\r\n            <right_val>0.0402618311345577</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 14 2 1 -1.</_>\r\n                <_>\r\n                  23 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.8917557655368000e-005</threshold>\r\n            <left_val>0.2068260014057159</left_val>\r\n            <right_val>-0.1195247992873192</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 14 2 1 -1.</_>\r\n                <_>\r\n                  1 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.1416288847103715e-005</threshold>\r\n            <left_val>-0.1625899970531464</left_val>\r\n            <right_val>0.1518989056348801</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 2 11 6 -1.</_>\r\n                <_>\r\n                  7 4 11 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1354866027832031</threshold>\r\n            <left_val>-0.0504554286599159</left_val>\r\n            <right_val>0.4712490141391754</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 2 2 2 -1.</_>\r\n                <_>\r\n                  2 2 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>1.1286230292171240e-003</threshold>\r\n            <left_val>-0.1934940963983536</left_val>\r\n            <right_val>0.1492028981447220</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 0 1 10 -1.</_>\r\n                <_>\r\n                  24 5 1 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0376871302723885</threshold>\r\n            <left_val>-6.5130472648888826e-004</left_val>\r\n            <right_val>-0.5566216707229614</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 1 10 -1.</_>\r\n                <_>\r\n                  0 5 1 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0177724994719028</threshold>\r\n            <left_val>-0.5733047127723694</left_val>\r\n            <right_val>0.0462512709200382</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 11 6 2 -1.</_>\r\n                <_>\r\n                  14 11 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0141524598002434</threshold>\r\n            <left_val>-0.7905998826026917</left_val>\r\n            <right_val>0.0153570203110576</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 20 2 -1.</_>\r\n                <_>\r\n                  7 0 10 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0194474104791880</threshold>\r\n            <left_val>0.2123239040374756</left_val>\r\n            <right_val>-0.1021943986415863</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 0 10 4 -1.</_>\r\n                <_>\r\n                  10 0 5 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0129150198772550</threshold>\r\n            <left_val>-0.0788644626736641</left_val>\r\n            <right_val>0.1457864940166473</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 20 1 -1.</_>\r\n                <_>\r\n                  10 0 10 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.7283121645450592e-003</threshold>\r\n            <left_val>-0.1338106989860535</left_val>\r\n            <right_val>0.2055318057537079</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 4 10 3 -1.</_>\r\n                <_>\r\n                  8 5 10 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0264210291206837</threshold>\r\n            <left_val>0.2729040980339050</left_val>\r\n            <right_val>-0.0841038301587105</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 6 7 6 -1.</_>\r\n                <_>\r\n                  9 8 7 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0216425806283951</threshold>\r\n            <left_val>0.2165616005659103</left_val>\r\n            <right_val>-0.0997976064682007</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 5 9 3 -1.</_>\r\n                <_>\r\n                  8 6 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0186041705310345</threshold>\r\n            <left_val>0.3167817890644074</left_val>\r\n            <right_val>-0.0684646219015121</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 1 3 -1.</_>\r\n                <_>\r\n                  5 1 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>7.9184472560882568e-003</threshold>\r\n            <left_val>0.0389325916767120</left_val>\r\n            <right_val>-0.5849621891975403</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 0 1 4 -1.</_>\r\n                <_>\r\n                  24 2 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.0868779807351530e-005</threshold>\r\n            <left_val>0.1183537989854813</left_val>\r\n            <right_val>-0.2693997025489807</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 10 2 1 -1.</_>\r\n                <_>\r\n                  10 10 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.3271610997617245e-005</threshold>\r\n            <left_val>0.1483621001243591</left_val>\r\n            <right_val>-0.1414014995098114</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 10 1 4 -1.</_>\r\n                <_>\r\n                  21 11 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>3.0123859178274870e-003</threshold>\r\n            <left_val>0.0475597009062767</left_val>\r\n            <right_val>-0.3168076872825623</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 6 5 -1.</_>\r\n                <_>\r\n                  6 0 2 5 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0202028602361679</threshold>\r\n            <left_val>0.0363369397819042</left_val>\r\n            <right_val>-0.4958786964416504</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 3 8 12 -1.</_>\r\n                <_>\r\n                  21 3 4 6 2.</_>\r\n                <_>\r\n                  17 9 4 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0681129470467567</threshold>\r\n            <left_val>-0.0636018067598343</left_val>\r\n            <right_val>0.3745648860931397</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 8 12 -1.</_>\r\n                <_>\r\n                  0 3 4 6 2.</_>\r\n                <_>\r\n                  4 9 4 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0613449215888977</threshold>\r\n            <left_val>0.3703984022140503</left_val>\r\n            <right_val>-0.0626903176307678</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 3 6 10 -1.</_>\r\n                <_>\r\n                  13 3 3 5 2.</_>\r\n                <_>\r\n                  10 8 3 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0239223092794418</threshold>\r\n            <left_val>-0.3475331962108612</left_val>\r\n            <right_val>0.0568292401731014</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 10 4 1 -1.</_>\r\n                <_>\r\n                  4 11 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>4.4279401190578938e-003</threshold>\r\n            <left_val>0.0318974405527115</left_val>\r\n            <right_val>-0.5085908770561218</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 2 9 4 -1.</_>\r\n                <_>\r\n                  16 2 9 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0923664569854736</threshold>\r\n            <left_val>-0.4889659881591797</left_val>\r\n            <right_val>9.9938698112964630e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 2 4 9 -1.</_>\r\n                <_>\r\n                  9 2 2 9 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-3.1878310255706310e-003</threshold>\r\n            <left_val>0.0857494324445724</left_val>\r\n            <right_val>-0.2382344007492065</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 9 3 3 -1.</_>\r\n                <_>\r\n                  20 10 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.2605291604995728e-003</threshold>\r\n            <left_val>0.0244128108024597</left_val>\r\n            <right_val>-0.5500137209892273</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 1 13 4 -1.</_>\r\n                <_>\r\n                  6 2 13 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0217170491814613</threshold>\r\n            <left_val>-0.0847987011075020</left_val>\r\n            <right_val>0.2182479947805405</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 4 5 4 -1.</_>\r\n                <_>\r\n                  10 5 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0102959601208568</threshold>\r\n            <left_val>-0.1032914966344833</left_val>\r\n            <right_val>0.1945870965719223</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 3 3 -1.</_>\r\n                <_>\r\n                  0 6 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0121496301144362</threshold>\r\n            <left_val>0.0322238989174366</left_val>\r\n            <right_val>-0.5932865738868713</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 5 4 4 -1.</_>\r\n                <_>\r\n                  21 6 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0191168300807476</threshold>\r\n            <left_val>0.0309407506138086</left_val>\r\n            <right_val>-0.4538871943950653</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 4 4 -1.</_>\r\n                <_>\r\n                  0 6 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.1067700628191233e-004</threshold>\r\n            <left_val>-0.1545806974172592</left_val>\r\n            <right_val>0.1262297928333283</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 9 9 6 -1.</_>\r\n                <_>\r\n                  8 11 9 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0294274203479290</threshold>\r\n            <left_val>0.2070481926202774</left_val>\r\n            <right_val>-0.0861818864941597</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 11 3 1 -1.</_>\r\n                <_>\r\n                  5 12 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-3.7067469675093889e-003</threshold>\r\n            <left_val>-0.5155926942825317</left_val>\r\n            <right_val>0.0383589081466198</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 14 2 1 -1.</_>\r\n                <_>\r\n                  23 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.0146670875838026e-005</threshold>\r\n            <left_val>-0.1023617982864380</left_val>\r\n            <right_val>0.0884054377675056</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 14 2 1 -1.</_>\r\n                <_>\r\n                  1 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.8713612563442439e-005</threshold>\r\n            <left_val>0.1984436959028244</left_val>\r\n            <right_val>-0.0994443595409393</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 1 4 14 -1.</_>\r\n                <_>\r\n                  11 8 4 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0848333984613419</threshold>\r\n            <left_val>-0.3900933861732483</left_val>\r\n            <right_val>0.0397581607103348</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 2 3 -1.</_>\r\n                <_>\r\n                  3 1 2 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0115453395992517</threshold>\r\n            <left_val>0.0299104899168015</left_val>\r\n            <right_val>-0.5021548867225647</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 12 1 2 -1.</_>\r\n                <_>\r\n                  24 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.2721769744530320e-003</threshold>\r\n            <left_val>0.0357883498072624</left_val>\r\n            <right_val>-0.3856284022331238</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 14 14 -1.</_>\r\n                <_>\r\n                  0 8 14 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.3789406120777130</threshold>\r\n            <left_val>0.0429151207208633</left_val>\r\n            <right_val>-0.3726823925971985</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 0 6 15 -1.</_>\r\n                <_>\r\n                  15 0 2 15 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0587286688387394</threshold>\r\n            <left_val>0.0175066608935595</left_val>\r\n            <right_val>-0.7129334807395935</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 1 4 -1.</_>\r\n                <_>\r\n                  0 3 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.2667418862693012e-005</threshold>\r\n            <left_val>0.0852374136447906</left_val>\r\n            <right_val>-0.1796067953109741</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 13 1 2 -1.</_>\r\n                <_>\r\n                  24 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.5661939289420843e-003</threshold>\r\n            <left_val>-0.4941900074481964</left_val>\r\n            <right_val>0.0211067497730255</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 13 1 2 -1.</_>\r\n                <_>\r\n                  0 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.2544771935790777e-005</threshold>\r\n            <left_val>0.1260727941989899</left_val>\r\n            <right_val>-0.1358107030391693</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 11 2 4 -1.</_>\r\n                <_>\r\n                  23 12 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.3382088877260685e-003</threshold>\r\n            <left_val>-0.3425475955009460</left_val>\r\n            <right_val>0.0313290804624558</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 2 4 -1.</_>\r\n                <_>\r\n                  0 12 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.0032588876783848e-003</threshold>\r\n            <left_val>0.0353341810405254</left_val>\r\n            <right_val>-0.4785414040088654</right_val></_></_>\r\n        <_>\r\n          <!-- tree 57 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 10 2 2 -1.</_>\r\n                <_>\r\n                  17 10 1 1 2.</_>\r\n                <_>\r\n                  16 11 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.8725446655880660e-005</threshold>\r\n            <left_val>-0.0865093916654587</left_val>\r\n            <right_val>0.1098069027066231</right_val></_></_>\r\n        <_>\r\n          <!-- tree 58 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 10 2 2 -1.</_>\r\n                <_>\r\n                  7 10 1 1 2.</_>\r\n                <_>\r\n                  8 11 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.5411381395533681e-004</threshold>\r\n            <left_val>-0.0866223275661469</left_val>\r\n            <right_val>0.1815810948610306</right_val></_></_>\r\n        <_>\r\n          <!-- tree 59 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 6 -1.</_>\r\n                <_>\r\n                  13 0 12 3 2.</_>\r\n                <_>\r\n                  1 3 12 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1003293022513390</threshold>\r\n            <left_val>-0.4118100106716156</left_val>\r\n            <right_val>0.0407990105450153</right_val></_></_>\r\n        <_>\r\n          <!-- tree 60 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 1 6 12 -1.</_>\r\n                <_>\r\n                  8 1 2 12 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0457341782748699</threshold>\r\n            <left_val>0.0250630006194115</left_val>\r\n            <right_val>-0.5801063179969788</right_val></_></_>\r\n        <_>\r\n          <!-- tree 61 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 6 6 3 -1.</_>\r\n                <_>\r\n                  19 7 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0143571095541120</threshold>\r\n            <left_val>0.0273739993572235</left_val>\r\n            <right_val>-0.3111906945705414</right_val></_></_>\r\n        <_>\r\n          <!-- tree 62 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 6 7 2 -1.</_>\r\n                <_>\r\n                  5 7 7 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.2823958210647106e-003</threshold>\r\n            <left_val>-0.1212206035852432</left_val>\r\n            <right_val>0.1300680041313171</right_val></_></_>\r\n        <_>\r\n          <!-- tree 63 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 6 7 4 -1.</_>\r\n                <_>\r\n                  9 7 7 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0191692691296339</threshold>\r\n            <left_val>0.3547115027904511</left_val>\r\n            <right_val>-0.0586979016661644</right_val></_></_>\r\n        <_>\r\n          <!-- tree 64 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 6 3 -1.</_>\r\n                <_>\r\n                  0 7 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0203719399869442</threshold>\r\n            <left_val>0.0270470399409533</left_val>\r\n            <right_val>-0.6216102838516235</right_val></_></_>\r\n        <_>\r\n          <!-- tree 65 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 8 13 4 -1.</_>\r\n                <_>\r\n                  6 9 13 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0119816595688462</threshold>\r\n            <left_val>0.1762886941432953</left_val>\r\n            <right_val>-0.0943156927824020</right_val></_></_>\r\n        <_>\r\n          <!-- tree 66 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 10 2 2 -1.</_>\r\n                <_>\r\n                  7 10 1 1 2.</_>\r\n                <_>\r\n                  8 11 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.4278322649188340e-005</threshold>\r\n            <left_val>0.1507049947977066</left_val>\r\n            <right_val>-0.1071290969848633</right_val></_></_>\r\n        <_>\r\n          <!-- tree 67 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 11 6 2 -1.</_>\r\n                <_>\r\n                  14 11 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0101822800934315</threshold>\r\n            <left_val>0.0161433499306440</left_val>\r\n            <right_val>-0.3503915071487427</right_val></_></_>\r\n        <_>\r\n          <!-- tree 68 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 12 10 -1.</_>\r\n                <_>\r\n                  6 0 6 5 2.</_>\r\n                <_>\r\n                  12 5 6 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0520590804517269</threshold>\r\n            <left_val>-0.3121460080146790</left_val>\r\n            <right_val>0.0477841906249523</right_val></_></_>\r\n        <_>\r\n          <!-- tree 69 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 11 6 2 -1.</_>\r\n                <_>\r\n                  14 11 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0249434690922499</threshold>\r\n            <left_val>-0.7933396100997925</left_val>\r\n            <right_val>-4.0430951048620045e-004</right_val></_></_>\r\n        <_>\r\n          <!-- tree 70 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 0 2 2 -1.</_>\r\n                <_>\r\n                  7 0 1 1 2.</_>\r\n                <_>\r\n                  8 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.2259827973321080e-004</threshold>\r\n            <left_val>0.2043831050395966</left_val>\r\n            <right_val>-0.0712744519114494</right_val></_></_>\r\n        <_>\r\n          <!-- tree 71 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 0 2 2 -1.</_>\r\n                <_>\r\n                  17 0 1 1 2.</_>\r\n                <_>\r\n                  16 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.6859298638300970e-005</threshold>\r\n            <left_val>0.0861500576138496</left_val>\r\n            <right_val>-0.0658712089061737</right_val></_></_>\r\n        <_>\r\n          <!-- tree 72 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 0 2 2 -1.</_>\r\n                <_>\r\n                  7 0 1 1 2.</_>\r\n                <_>\r\n                  8 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.0834350511431694e-004</threshold>\r\n            <left_val>-0.1051706001162529</left_val>\r\n            <right_val>0.2224697023630142</right_val></_></_>\r\n        <_>\r\n          <!-- tree 73 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 11 6 2 -1.</_>\r\n                <_>\r\n                  14 11 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.1075460352003574e-003</threshold>\r\n            <left_val>0.0464305393397808</left_val>\r\n            <right_val>-0.0319086797535419</right_val></_></_>\r\n        <_>\r\n          <!-- tree 74 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 11 6 2 -1.</_>\r\n                <_>\r\n                  9 11 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0123662399128079</threshold>\r\n            <left_val>-0.6207143068313599</left_val>\r\n            <right_val>0.0261646900326014</right_val></_></_>\r\n        <_>\r\n          <!-- tree 75 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 12 18 3 -1.</_>\r\n                <_>\r\n                  11 12 6 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0354762189090252</threshold>\r\n            <left_val>0.1230582967400551</left_val>\r\n            <right_val>-0.0519298203289509</right_val></_></_>\r\n        <_>\r\n          <!-- tree 76 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 1 2 -1.</_>\r\n                <_>\r\n                  2 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-2.3794448934495449e-003</threshold>\r\n            <left_val>-0.3795419931411743</left_val>\r\n            <right_val>0.0417488515377045</right_val></_></_>\r\n        <_>\r\n          <!-- tree 77 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 4 4 2 -1.</_>\r\n                <_>\r\n                  23 4 2 1 2.</_>\r\n                <_>\r\n                  21 5 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.3966970145702362e-003</threshold>\r\n            <left_val>-0.0851486772298813</left_val>\r\n            <right_val>0.1512037962675095</right_val></_></_>\r\n        <_>\r\n          <!-- tree 78 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 3 7 3 -1.</_>\r\n                <_>\r\n                  9 4 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.1437891088426113e-003</threshold>\r\n            <left_val>-0.0816644281148911</left_val>\r\n            <right_val>0.1789588034152985</right_val></_></_>\r\n        <_>\r\n          <!-- tree 79 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 2 8 5 -1.</_>\r\n                <_>\r\n                  15 4 4 5 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.1239939033985138</threshold>\r\n            <left_val>-0.6658980846405029</left_val>\r\n            <right_val>9.5204189419746399e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 80 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 1 6 4 -1.</_>\r\n                <_>\r\n                  11 2 6 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0393908508121967</threshold>\r\n            <left_val>0.0182536505162716</left_val>\r\n            <right_val>-0.7637290954589844</right_val></_></_>\r\n        <_>\r\n          <!-- tree 81 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 0 2 2 -1.</_>\r\n                <_>\r\n                  22 1 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.9372270219027996e-003</threshold>\r\n            <left_val>0.0226261299103498</left_val>\r\n            <right_val>-0.3233875036239624</right_val></_></_>\r\n        <_>\r\n          <!-- tree 82 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 1 16 12 -1.</_>\r\n                <_>\r\n                  12 1 8 12 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1816650927066803</threshold>\r\n            <left_val>-0.0618673898279667</left_val>\r\n            <right_val>0.2298932969570160</right_val></_></_>\r\n        <_>\r\n          <!-- tree 83 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 20 10 -1.</_>\r\n                <_>\r\n                  3 0 10 10 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0892752110958099</threshold>\r\n            <left_val>-0.0848015919327736</left_val>\r\n            <right_val>0.2109096944332123</right_val></_></_>\r\n        <_>\r\n          <!-- tree 84 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 6 6 -1.</_>\r\n                <_>\r\n                  0 4 3 3 2.</_>\r\n                <_>\r\n                  3 7 3 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0179201308637857</threshold>\r\n            <left_val>-0.0663900971412659</left_val>\r\n            <right_val>0.2243462055921555</right_val></_></_>\r\n        <_>\r\n          <!-- tree 85 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 4 3 3 -1.</_>\r\n                <_>\r\n                  23 5 1 3 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.5024111643433571e-003</threshold>\r\n            <left_val>-0.0559136196970940</left_val>\r\n            <right_val>0.1079157963395119</right_val></_></_>\r\n        <_>\r\n          <!-- tree 86 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 4 3 3 -1.</_>\r\n                <_>\r\n                  2 5 3 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0126318400725722</threshold>\r\n            <left_val>0.3352184891700745</left_val>\r\n            <right_val>-0.0470694787800312</right_val></_></_>\r\n        <_>\r\n          <!-- tree 87 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 7 3 4 -1.</_>\r\n                <_>\r\n                  22 8 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.2040186971426010e-003</threshold>\r\n            <left_val>0.0521674789488316</left_val>\r\n            <right_val>-0.5830680727958679</right_val></_></_>\r\n        <_>\r\n          <!-- tree 88 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 1 4 7 -1.</_>\r\n                <_>\r\n                  4 1 2 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0215438604354858</threshold>\r\n            <left_val>0.0103719802573323</left_val>\r\n            <right_val>-0.8169081807136536</right_val></_></_>\r\n        <_>\r\n          <!-- tree 89 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 7 3 4 -1.</_>\r\n                <_>\r\n                  22 8 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.2779878713190556e-003</threshold>\r\n            <left_val>-0.3437061011791229</left_val>\r\n            <right_val>0.0348356589674950</right_val></_></_>\r\n        <_>\r\n          <!-- tree 90 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 1 2 -1.</_>\r\n                <_>\r\n                  2 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>9.5721762627363205e-003</threshold>\r\n            <left_val>0.0160374492406845</left_val>\r\n            <right_val>-0.7592146992683411</right_val></_></_>\r\n        <_>\r\n          <!-- tree 91 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 4 6 2 -1.</_>\r\n                <_>\r\n                  18 5 6 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.9499992057681084e-003</threshold>\r\n            <left_val>-0.0835138633847237</left_val>\r\n            <right_val>0.0937561765313149</right_val></_></_>\r\n        <_>\r\n          <!-- tree 92 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 6 -1.</_>\r\n                <_>\r\n                  5 5 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0868803784251213</threshold>\r\n            <left_val>0.1977919936180115</left_val>\r\n            <right_val>-0.0735685229301453</right_val></_></_>\r\n        <_>\r\n          <!-- tree 93 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 4 8 4 -1.</_>\r\n                <_>\r\n                  16 5 8 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.7690730318427086e-003</threshold>\r\n            <left_val>-0.0611343309283257</left_val>\r\n            <right_val>0.0826714411377907</right_val></_></_>\r\n        <_>\r\n          <!-- tree 94 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 24 10 -1.</_>\r\n                <_>\r\n                  0 1 12 5 2.</_>\r\n                <_>\r\n                  12 6 12 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1480645984411240</threshold>\r\n            <left_val>0.0396532900631428</left_val>\r\n            <right_val>-0.4085262119770050</right_val></_></_>\r\n        <_>\r\n          <!-- tree 95 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 0 4 7 -1.</_>\r\n                <_>\r\n                  15 0 2 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0186682697385550</threshold>\r\n            <left_val>-0.6671301126480103</left_val>\r\n            <right_val>0.0156445093452930</right_val></_></_>\r\n        <_>\r\n          <!-- tree 96 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 3 4 -1.</_>\r\n                <_>\r\n                  0 8 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0101426700130105</threshold>\r\n            <left_val>0.0211487896740437</left_val>\r\n            <right_val>-0.5610821843147278</right_val></_></_>\r\n        <_>\r\n          <!-- tree 97 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 5 4 4 -1.</_>\r\n                <_>\r\n                  20 5 2 2 2.</_>\r\n                <_>\r\n                  18 7 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.6263110339641571e-003</threshold>\r\n            <left_val>0.0881423130631447</left_val>\r\n            <right_val>-0.0586008317768574</right_val></_></_>\r\n        <_>\r\n          <!-- tree 98 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 5 6 2 -1.</_>\r\n                <_>\r\n                  5 5 3 1 2.</_>\r\n                <_>\r\n                  8 6 3 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.0406240839511156e-003</threshold>\r\n            <left_val>-0.0699731782078743</left_val>\r\n            <right_val>0.1942113041877747</right_val></_></_>\r\n        <_>\r\n          <!-- tree 99 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 9 2 3 -1.</_>\r\n                <_>\r\n                  21 10 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.0523111820220947e-003</threshold>\r\n            <left_val>-0.3989843130111694</left_val>\r\n            <right_val>0.0284519009292126</right_val></_></_>\r\n        <_>\r\n          <!-- tree 100 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 1 2 2 -1.</_>\r\n                <_>\r\n                  7 1 1 1 2.</_>\r\n                <_>\r\n                  8 2 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.3293411252088845e-004</threshold>\r\n            <left_val>-0.0920187085866928</left_val>\r\n            <right_val>0.1521372944116592</right_val></_></_>\r\n        <_>\r\n          <!-- tree 101 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 1 2 2 -1.</_>\r\n                <_>\r\n                  17 1 1 1 2.</_>\r\n                <_>\r\n                  16 2 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.4471479516942054e-004</threshold>\r\n            <left_val>0.1328881978988648</left_val>\r\n            <right_val>-0.0869787335395813</right_val></_></_></trees>\r\n      <stage_threshold>-1.4393190145492554</stage_threshold>\r\n      <parent>9</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 11 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 7 7 6 -1.</_>\r\n                <_>\r\n                  9 9 7 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0305288899689913</threshold>\r\n            <left_val>0.3361127972602844</left_val>\r\n            <right_val>-0.1605879068374634</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 2 7 2 -1.</_>\r\n                <_>\r\n                  17 3 7 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.8238358944654465e-003</threshold>\r\n            <left_val>0.2510839104652405</left_val>\r\n            <right_val>-0.2578383982181549</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 2 9 4 -1.</_>\r\n                <_>\r\n                  3 3 9 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0260700508952141</threshold>\r\n            <left_val>0.3176701068878174</left_val>\r\n            <right_val>-0.1111562028527260</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 14 6 1 -1.</_>\r\n                <_>\r\n                  19 14 3 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.6021650517359376e-003</threshold>\r\n            <left_val>-0.1096177026629448</left_val>\r\n            <right_val>0.1561331003904343</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 9 11 6 -1.</_>\r\n                <_>\r\n                  6 11 11 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0346175394952297</threshold>\r\n            <left_val>0.2614395916461945</left_val>\r\n            <right_val>-0.0955564379692078</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 3 8 12 -1.</_>\r\n                <_>\r\n                  21 3 4 6 2.</_>\r\n                <_>\r\n                  17 9 4 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0825498923659325</threshold>\r\n            <left_val>-0.0359772108495235</left_val>\r\n            <right_val>0.3189736902713776</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 24 8 -1.</_>\r\n                <_>\r\n                  0 7 12 4 2.</_>\r\n                <_>\r\n                  12 11 12 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1079908013343811</threshold>\r\n            <left_val>-0.4661987125873566</left_val>\r\n            <right_val>0.0965379774570465</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 16 12 -1.</_>\r\n                <_>\r\n                  13 3 8 6 2.</_>\r\n                <_>\r\n                  5 9 8 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0710962936282158</threshold>\r\n            <left_val>-0.3290941119194031</left_val>\r\n            <right_val>0.0201707594096661</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 24 6 -1.</_>\r\n                <_>\r\n                  8 5 8 2 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.6102272272109985</threshold>\r\n            <left_val>-0.0410851910710335</left_val>\r\n            <right_val>0.5919780731201172</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 8 24 1 -1.</_>\r\n                <_>\r\n                  7 8 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.6180485561490059e-003</threshold>\r\n            <left_val>0.1845327019691467</left_val>\r\n            <right_val>-0.1256957054138184</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 9 14 6 -1.</_>\r\n                <_>\r\n                  1 9 7 3 2.</_>\r\n                <_>\r\n                  8 12 7 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0216567497700453</threshold>\r\n            <left_val>0.3558863103389740</left_val>\r\n            <right_val>-0.0654195472598076</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 5 3 2 -1.</_>\r\n                <_>\r\n                  19 6 3 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.2288730144500732e-003</threshold>\r\n            <left_val>-0.1597114056348801</left_val>\r\n            <right_val>0.1442176997661591</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 14 10 1 -1.</_>\r\n                <_>\r\n                  5 14 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.6023850552737713e-003</threshold>\r\n            <left_val>-0.1301265954971314</left_val>\r\n            <right_val>0.1848530024290085</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 15 6 -1.</_>\r\n                <_>\r\n                  5 3 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1224254965782166</threshold>\r\n            <left_val>-0.0509620085358620</left_val>\r\n            <right_val>0.4787274003028870</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 1 7 6 -1.</_>\r\n                <_>\r\n                  1 3 7 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0398168414831162</threshold>\r\n            <left_val>0.1911015063524246</left_val>\r\n            <right_val>-0.1490415036678314</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 12 6 3 -1.</_>\r\n                <_>\r\n                  17 13 2 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0165654607117176</threshold>\r\n            <left_val>0.0250385701656342</left_val>\r\n            <right_val>-0.2660810947418213</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 1 3 -1.</_>\r\n                <_>\r\n                  3 1 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>6.7314971238374710e-003</threshold>\r\n            <left_val>0.0361662209033966</left_val>\r\n            <right_val>-0.5751237273216248</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 12 24 3 -1.</_>\r\n                <_>\r\n                  7 12 12 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0238826293498278</threshold>\r\n            <left_val>0.1817242056131363</left_val>\r\n            <right_val>-0.1013408973813057</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 12 6 3 -1.</_>\r\n                <_>\r\n                  5 13 2 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0168766304850578</threshold>\r\n            <left_val>0.0499957092106342</left_val>\r\n            <right_val>-0.4964488148689270</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 12 -1.</_>\r\n                <_>\r\n                  13 0 12 6 2.</_>\r\n                <_>\r\n                  1 6 12 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0814632922410965</threshold>\r\n            <left_val>0.0508196912705898</left_val>\r\n            <right_val>-0.3092927038669586</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 21 15 -1.</_>\r\n                <_>\r\n                  9 0 7 15 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1567866057157517</threshold>\r\n            <left_val>-0.0846417918801308</left_val>\r\n            <right_val>0.2097589969635010</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 3 6 2 -1.</_>\r\n                <_>\r\n                  17 4 6 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0107369897887111</threshold>\r\n            <left_val>-0.0588766187429428</left_val>\r\n            <right_val>0.2673564851284027</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 3 14 2 -1.</_>\r\n                <_>\r\n                  3 4 14 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0162507798522711</threshold>\r\n            <left_val>0.2185824960470200</left_val>\r\n            <right_val>-0.1275278925895691</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 21 4 -1.</_>\r\n                <_>\r\n                  11 0 7 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0513998307287693</threshold>\r\n            <left_val>0.1707165986299515</left_val>\r\n            <right_val>-0.0564976185560226</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 13 4 1 -1.</_>\r\n                <_>\r\n                  7 13 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.8661050125956535e-003</threshold>\r\n            <left_val>0.0403385981917381</left_val>\r\n            <right_val>-0.4740450084209442</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 3 8 12 -1.</_>\r\n                <_>\r\n                  21 3 4 6 2.</_>\r\n                <_>\r\n                  17 9 4 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0494354106485844</threshold>\r\n            <left_val>0.1537600010633469</left_val>\r\n            <right_val>-0.0417859293520451</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 8 12 -1.</_>\r\n                <_>\r\n                  0 3 4 6 2.</_>\r\n                <_>\r\n                  4 9 4 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0696671828627586</threshold>\r\n            <left_val>-0.0588539093732834</left_val>\r\n            <right_val>0.3099964857101440</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 16 8 -1.</_>\r\n                <_>\r\n                  13 0 8 4 2.</_>\r\n                <_>\r\n                  5 4 8 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0781185403466225</threshold>\r\n            <left_val>-0.4109517037868500</left_val>\r\n            <right_val>0.0523068793118000</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 7 4 2 -1.</_>\r\n                <_>\r\n                  4 8 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-8.6161941289901733e-003</threshold>\r\n            <left_val>-0.5668942928314209</left_val>\r\n            <right_val>0.0286804605275393</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 11 15 4 -1.</_>\r\n                <_>\r\n                  5 12 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.8916371092200279e-003</threshold>\r\n            <left_val>-0.0957784205675125</left_val>\r\n            <right_val>0.1680631041526794</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 13 1 2 -1.</_>\r\n                <_>\r\n                  10 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.4734419942833483e-005</threshold>\r\n            <left_val>-0.1476065963506699</left_val>\r\n            <right_val>0.1278074979782105</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 14 6 1 -1.</_>\r\n                <_>\r\n                  14 14 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.5460228361189365e-003</threshold>\r\n            <left_val>-0.5353912711143494</left_val>\r\n            <right_val>0.0211423803120852</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 5 6 4 -1.</_>\r\n                <_>\r\n                  9 6 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0119369700551033</threshold>\r\n            <left_val>0.2489618957042694</left_val>\r\n            <right_val>-0.0659059137105942</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 5 13 2 -1.</_>\r\n                <_>\r\n                  12 6 13 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0160134993493557</threshold>\r\n            <left_val>-0.0751639306545258</left_val>\r\n            <right_val>0.0920000970363617</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 15 6 -1.</_>\r\n                <_>\r\n                  5 2 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1797882020473480</threshold>\r\n            <left_val>0.3122220933437347</left_val>\r\n            <right_val>-0.0546800307929516</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 20 15 -1.</_>\r\n                <_>\r\n                  3 0 10 15 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.4293603003025055</threshold>\r\n            <left_val>-0.0467442497611046</left_val>\r\n            <right_val>0.4671711027622223</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 1 22 14 -1.</_>\r\n                <_>\r\n                  12 1 11 14 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1762980967760086</threshold>\r\n            <left_val>-0.1196762025356293</left_val>\r\n            <right_val>0.2303612977266312</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 5 10 2 -1.</_>\r\n                <_>\r\n                  15 6 10 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0434980615973473</threshold>\r\n            <left_val>0.0213767793029547</left_val>\r\n            <right_val>-0.3402695953845978</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 13 2 -1.</_>\r\n                <_>\r\n                  0 6 13 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0168955195695162</threshold>\r\n            <left_val>-0.1305568963289261</left_val>\r\n            <right_val>0.1834042966365814</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 15 4 -1.</_>\r\n                <_>\r\n                  5 3 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0185353793203831</threshold>\r\n            <left_val>-0.0754243135452271</left_val>\r\n            <right_val>0.2354936003684998</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 4 15 3 -1.</_>\r\n                <_>\r\n                  5 5 15 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0173294302076101</threshold>\r\n            <left_val>-0.0853839814662933</left_val>\r\n            <right_val>0.2036404013633728</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 11 4 4 -1.</_>\r\n                <_>\r\n                  21 12 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.6630741134285927e-003</threshold>\r\n            <left_val>0.0385910011827946</left_val>\r\n            <right_val>-0.6201460957527161</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 1 2 -1.</_>\r\n                <_>\r\n                  5 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.7052681222558022e-003</threshold>\r\n            <left_val>0.0312472805380821</left_val>\r\n            <right_val>-0.4070529043674469</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 3 2 4 -1.</_>\r\n                <_>\r\n                  23 3 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.8030379433184862e-003</threshold>\r\n            <left_val>0.1957851052284241</left_val>\r\n            <right_val>-0.1433366984128952</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 1 4 6 -1.</_>\r\n                <_>\r\n                  8 1 2 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0187879204750061</threshold>\r\n            <left_val>-0.8691418766975403</left_val>\r\n            <right_val>0.0169819705188274</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 6 11 3 -1.</_>\r\n                <_>\r\n                  8 7 11 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0186009202152491</threshold>\r\n            <left_val>-0.0818153098225594</left_val>\r\n            <right_val>0.1891387999057770</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 13 2 1 -1.</_>\r\n                <_>\r\n                  1 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.4120598330628127e-005</threshold>\r\n            <left_val>-0.1289912015199661</left_val>\r\n            <right_val>0.1211050972342491</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 12 3 3 -1.</_>\r\n                <_>\r\n                  21 13 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.6057129986584187e-003</threshold>\r\n            <left_val>-0.4698300957679749</left_val>\r\n            <right_val>0.0159890707582235</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 12 3 3 -1.</_>\r\n                <_>\r\n                  1 13 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.5192570649087429e-003</threshold>\r\n            <left_val>0.0361930206418037</left_val>\r\n            <right_val>-0.4484112858772278</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 3 2 4 -1.</_>\r\n                <_>\r\n                  23 3 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.7741440096870065e-003</threshold>\r\n            <left_val>-0.0433034710586071</left_val>\r\n            <right_val>0.1395574957132340</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 2 4 -1.</_>\r\n                <_>\r\n                  1 3 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.6350420191884041e-003</threshold>\r\n            <left_val>0.1395068019628525</left_val>\r\n            <right_val>-0.1124152988195419</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 3 4 10 -1.</_>\r\n                <_>\r\n                  23 3 2 5 2.</_>\r\n                <_>\r\n                  21 8 2 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.4794770441949368e-003</threshold>\r\n            <left_val>-0.0600515604019165</left_val>\r\n            <right_val>0.0728941932320595</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 4 10 -1.</_>\r\n                <_>\r\n                  0 3 2 5 2.</_>\r\n                <_>\r\n                  2 8 2 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0203247498720884</threshold>\r\n            <left_val>0.4297815859317780</left_val>\r\n            <right_val>-0.0396846085786819</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 1 1 4 -1.</_>\r\n                <_>\r\n                  24 2 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.3453041948378086e-003</threshold>\r\n            <left_val>-0.2533842921257019</left_val>\r\n            <right_val>0.0242939405143261</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 1 6 -1.</_>\r\n                <_>\r\n                  0 2 1 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.0959975495934486e-003</threshold>\r\n            <left_val>0.0340887792408466</left_val>\r\n            <right_val>-0.4518730044364929</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 1 4 4 -1.</_>\r\n                <_>\r\n                  17 1 2 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0161635801196098</threshold>\r\n            <left_val>6.8225921131670475e-003</left_val>\r\n            <right_val>-0.7205737829208374</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 4 4 -1.</_>\r\n                <_>\r\n                  6 1 2 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0112293101847172</threshold>\r\n            <left_val>-0.6191986203193665</left_val>\r\n            <right_val>0.0222914796322584</right_val></_></_>\r\n        <_>\r\n          <!-- tree 57 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 2 10 12 -1.</_>\r\n                <_>\r\n                  15 8 10 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1763328015804291</threshold>\r\n            <left_val>-0.6819115877151489</left_val>\r\n            <right_val>8.8407555595040321e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 58 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 5 9 3 -1.</_>\r\n                <_>\r\n                  8 6 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0192962400615215</threshold>\r\n            <left_val>-0.0796290487051010</left_val>\r\n            <right_val>0.2013067007064819</right_val></_></_>\r\n        <_>\r\n          <!-- tree 59 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 14 2 -1.</_>\r\n                <_>\r\n                  6 8 14 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0105654401704669</threshold>\r\n            <left_val>-0.0832984521985054</left_val>\r\n            <right_val>0.1872760951519013</right_val></_></_>\r\n        <_>\r\n          <!-- tree 60 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 7 5 4 -1.</_>\r\n                <_>\r\n                  10 8 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.7616738379001617e-003</threshold>\r\n            <left_val>0.2069583982229233</left_val>\r\n            <right_val>-0.0813189968466759</right_val></_></_>\r\n        <_>\r\n          <!-- tree 61 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 12 2 3 -1.</_>\r\n                <_>\r\n                  23 13 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.3086878936737776e-003</threshold>\r\n            <left_val>-0.2798121869564056</left_val>\r\n            <right_val>0.0293897707015276</right_val></_></_>\r\n        <_>\r\n          <!-- tree 62 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 4 4 -1.</_>\r\n                <_>\r\n                  0 8 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.9189318455755711e-003</threshold>\r\n            <left_val>-0.5095586180686951</left_val>\r\n            <right_val>0.0291001908481121</right_val></_></_>\r\n        <_>\r\n          <!-- tree 63 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 13 21 2 -1.</_>\r\n                <_>\r\n                  10 13 7 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0195926092565060</threshold>\r\n            <left_val>0.1248695999383926</left_val>\r\n            <right_val>-0.0666698589920998</right_val></_></_>\r\n        <_>\r\n          <!-- tree 64 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 1 3 1 -1.</_>\r\n                <_>\r\n                  7 1 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.6698801927268505e-004</threshold>\r\n            <left_val>0.1772525012493134</left_val>\r\n            <right_val>-0.0755556300282478</right_val></_></_>\r\n        <_>\r\n          <!-- tree 65 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 0 2 2 -1.</_>\r\n                <_>\r\n                  17 0 1 1 2.</_>\r\n                <_>\r\n                  16 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.5187108702957630e-004</threshold>\r\n            <left_val>-0.0468317084014416</left_val>\r\n            <right_val>0.1377387940883637</right_val></_></_>\r\n        <_>\r\n          <!-- tree 66 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 0 2 2 -1.</_>\r\n                <_>\r\n                  7 0 1 1 2.</_>\r\n                <_>\r\n                  8 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.3244438711553812e-004</threshold>\r\n            <left_val>0.1750548034906387</left_val>\r\n            <right_val>-0.0822173282504082</right_val></_></_>\r\n        <_>\r\n          <!-- tree 67 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 12 2 3 -1.</_>\r\n                <_>\r\n                  23 13 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.2091289758682251e-003</threshold>\r\n            <left_val>0.0258904304355383</left_val>\r\n            <right_val>-0.3546032905578613</right_val></_></_>\r\n        <_>\r\n          <!-- tree 68 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 8 9 2 -1.</_>\r\n                <_>\r\n                  11 8 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0288993604481220</threshold>\r\n            <left_val>-0.7315214276313782</left_val>\r\n            <right_val>0.0180548094213009</right_val></_></_>\r\n        <_>\r\n          <!-- tree 69 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 12 2 3 -1.</_>\r\n                <_>\r\n                  23 13 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.8803699074778706e-005</threshold>\r\n            <left_val>-0.0383186303079128</left_val>\r\n            <right_val>0.0343451388180256</right_val></_></_>\r\n        <_>\r\n          <!-- tree 70 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 12 2 3 -1.</_>\r\n                <_>\r\n                  0 13 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.2848090156912804e-003</threshold>\r\n            <left_val>-0.3603490889072418</left_val>\r\n            <right_val>0.0380517281591892</right_val></_></_>\r\n        <_>\r\n          <!-- tree 71 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 4 9 9 -1.</_>\r\n                <_>\r\n                  8 7 9 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2230083048343658</threshold>\r\n            <left_val>-0.0353877097368240</left_val>\r\n            <right_val>0.4118692874908447</right_val></_></_>\r\n        <_>\r\n          <!-- tree 72 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 11 12 4 -1.</_>\r\n                <_>\r\n                  3 11 6 2 2.</_>\r\n                <_>\r\n                  9 13 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.8663020823150873e-003</threshold>\r\n            <left_val>-0.1147940978407860</left_val>\r\n            <right_val>0.1196625977754593</right_val></_></_>\r\n        <_>\r\n          <!-- tree 73 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 10 5 4 -1.</_>\r\n                <_>\r\n                  10 11 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.6781090311706066e-003</threshold>\r\n            <left_val>-0.0887862071394920</left_val>\r\n            <right_val>0.2093122005462647</right_val></_></_>\r\n        <_>\r\n          <!-- tree 74 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 14 6 1 -1.</_>\r\n                <_>\r\n                  9 14 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.6886930465698242e-003</threshold>\r\n            <left_val>0.0420652516186237</left_val>\r\n            <right_val>-0.3311671912670136</right_val></_></_>\r\n        <_>\r\n          <!-- tree 75 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 18 15 -1.</_>\r\n                <_>\r\n                  4 0 9 15 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.5000842809677124</threshold>\r\n            <left_val>0.4582319855690002</left_val>\r\n            <right_val>-0.0300164502114058</right_val></_></_>\r\n        <_>\r\n          <!-- tree 76 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 4 4 -1.</_>\r\n                <_>\r\n                  1 3 2 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.2457590568810701e-003</threshold>\r\n            <left_val>-0.0581394806504250</left_val>\r\n            <right_val>0.2244455963373184</right_val></_></_>\r\n        <_>\r\n          <!-- tree 77 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 0 3 4 -1.</_>\r\n                <_>\r\n                  22 2 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.2515371721237898e-004</threshold>\r\n            <left_val>0.0857456997036934</left_val>\r\n            <right_val>-0.2164471000432968</right_val></_></_>\r\n        <_>\r\n          <!-- tree 78 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 20 8 -1.</_>\r\n                <_>\r\n                  5 0 10 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0756241232156754</threshold>\r\n            <left_val>-0.0728698670864105</left_val>\r\n            <right_val>0.1809341013431549</right_val></_></_>\r\n        <_>\r\n          <!-- tree 79 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 5 24 10 -1.</_>\r\n                <_>\r\n                  13 5 12 5 2.</_>\r\n                <_>\r\n                  1 10 12 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1401147991418839</threshold>\r\n            <left_val>-0.3049497008323669</left_val>\r\n            <right_val>0.0322263389825821</right_val></_></_>\r\n        <_>\r\n          <!-- tree 80 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 5 6 -1.</_>\r\n                <_>\r\n                  0 7 5 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.2914249673485756e-003</threshold>\r\n            <left_val>-0.1651930958032608</left_val>\r\n            <right_val>0.0796989724040031</right_val></_></_>\r\n        <_>\r\n          <!-- tree 81 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 3 4 2 -1.</_>\r\n                <_>\r\n                  18 4 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.8063062131404877e-003</threshold>\r\n            <left_val>-0.0511631406843662</left_val>\r\n            <right_val>0.1528493016958237</right_val></_></_>\r\n        <_>\r\n          <!-- tree 82 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 3 4 2 -1.</_>\r\n                <_>\r\n                  2 3 4 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0197005104273558</threshold>\r\n            <left_val>-0.0214679203927517</left_val>\r\n            <right_val>0.5898631215095520</right_val></_></_>\r\n        <_>\r\n          <!-- tree 83 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 1 6 6 -1.</_>\r\n                <_>\r\n                  16 1 2 6 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0282465498894453</threshold>\r\n            <left_val>-0.3611007034778595</left_val>\r\n            <right_val>0.0215946007519960</right_val></_></_>\r\n        <_>\r\n          <!-- tree 84 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 6 6 -1.</_>\r\n                <_>\r\n                  7 1 2 6 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0318388007581234</threshold>\r\n            <left_val>0.0213881190866232</left_val>\r\n            <right_val>-0.5591915845870972</right_val></_></_>\r\n        <_>\r\n          <!-- tree 85 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 10 6 1 -1.</_>\r\n                <_>\r\n                  13 10 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.2926959469914436e-003</threshold>\r\n            <left_val>0.0171414706856012</left_val>\r\n            <right_val>-0.3245368003845215</right_val></_></_>\r\n        <_>\r\n          <!-- tree 86 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 8 11 4 -1.</_>\r\n                <_>\r\n                  6 9 11 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.3176206573843956e-003</threshold>\r\n            <left_val>-0.0691479519009590</left_val>\r\n            <right_val>0.1877806931734085</right_val></_></_>\r\n        <_>\r\n          <!-- tree 87 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 13 2 2 -1.</_>\r\n                <_>\r\n                  24 13 1 1 2.</_>\r\n                <_>\r\n                  23 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.9812679965980351e-004</threshold>\r\n            <left_val>-0.0710251703858376</left_val>\r\n            <right_val>0.1166272014379501</right_val></_></_>\r\n        <_>\r\n          <!-- tree 88 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 13 4 -1.</_>\r\n                <_>\r\n                  6 1 13 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0172033403068781</threshold>\r\n            <left_val>-0.0834768265485764</left_val>\r\n            <right_val>0.1448491960763931</right_val></_></_>\r\n        <_>\r\n          <!-- tree 89 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 0 3 1 -1.</_>\r\n                <_>\r\n                  18 1 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>8.0548562109470367e-003</threshold>\r\n            <left_val>0.0214444492012262</left_val>\r\n            <right_val>-0.2763100862503052</right_val></_></_>\r\n        <_>\r\n          <!-- tree 90 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 0 1 3 -1.</_>\r\n                <_>\r\n                  7 1 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>6.7419088445603848e-003</threshold>\r\n            <left_val>0.0341341383755207</left_val>\r\n            <right_val>-0.3555370867252350</right_val></_></_>\r\n        <_>\r\n          <!-- tree 91 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 12 2 2 -1.</_>\r\n                <_>\r\n                  23 12 1 1 2.</_>\r\n                <_>\r\n                  22 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.7136920077027753e-005</threshold>\r\n            <left_val>-0.0699329003691673</left_val>\r\n            <right_val>0.0822271332144737</right_val></_></_>\r\n        <_>\r\n          <!-- tree 92 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 13 2 1 -1.</_>\r\n                <_>\r\n                  1 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.0014430346200243e-005</threshold>\r\n            <left_val>0.1533315926790237</left_val>\r\n            <right_val>-0.0801942795515060</right_val></_></_>\r\n        <_>\r\n          <!-- tree 93 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 13 2 1 -1.</_>\r\n                <_>\r\n                  22 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.6377622715663165e-005</threshold>\r\n            <left_val>0.0740585327148438</left_val>\r\n            <right_val>-0.0435769110918045</right_val></_></_>\r\n        <_>\r\n          <!-- tree 94 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 13 2 1 -1.</_>\r\n                <_>\r\n                  2 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.0605492510367185e-005</threshold>\r\n            <left_val>-0.1192411035299301</left_val>\r\n            <right_val>0.1157367005944252</right_val></_></_>\r\n        <_>\r\n          <!-- tree 95 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 13 3 1 -1.</_>\r\n                <_>\r\n                  23 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.2301438194699585e-005</threshold>\r\n            <left_val>-0.0702318474650383</left_val>\r\n            <right_val>0.0793638303875923</right_val></_></_>\r\n        <_>\r\n          <!-- tree 96 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 2 2 12 -1.</_>\r\n                <_>\r\n                  2 2 1 12 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.4867830323055387e-003</threshold>\r\n            <left_val>0.1245760992169380</left_val>\r\n            <right_val>-0.1076287999749184</right_val></_></_>\r\n        <_>\r\n          <!-- tree 97 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 3 4 2 -1.</_>\r\n                <_>\r\n                  18 4 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.2434820681810379e-003</threshold>\r\n            <left_val>0.1116774976253510</left_val>\r\n            <right_val>-0.0614912398159504</right_val></_></_>\r\n        <_>\r\n          <!-- tree 98 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 3 4 2 -1.</_>\r\n                <_>\r\n                  3 4 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.8055239282548428e-003</threshold>\r\n            <left_val>-0.0496800504624844</left_val>\r\n            <right_val>0.3046393096446991</right_val></_></_>\r\n        <_>\r\n          <!-- tree 99 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 0 1 12 -1.</_>\r\n                <_>\r\n                  24 3 1 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0167157892137766</threshold>\r\n            <left_val>0.0242684707045555</left_val>\r\n            <right_val>-0.5641499757766724</right_val></_></_>\r\n        <_>\r\n          <!-- tree 100 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 8 15 6 -1.</_>\r\n                <_>\r\n                  5 10 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0197794307023287</threshold>\r\n            <left_val>0.1293102055788040</left_val>\r\n            <right_val>-0.1014008000493050</right_val></_></_>\r\n        <_>\r\n          <!-- tree 101 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 7 6 2 -1.</_>\r\n                <_>\r\n                  19 7 6 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-6.7752218456007540e-005</threshold>\r\n            <left_val>0.0773630663752556</left_val>\r\n            <right_val>-0.0876037329435349</right_val></_></_>\r\n        <_>\r\n          <!-- tree 102 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 10 5 3 -1.</_>\r\n                <_>\r\n                  1 11 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0129433302208781</threshold>\r\n            <left_val>-0.8692914843559265</left_val>\r\n            <right_val>0.0158042199909687</right_val></_></_>\r\n        <_>\r\n          <!-- tree 103 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 0 1 12 -1.</_>\r\n                <_>\r\n                  24 3 1 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0125468103215098</threshold>\r\n            <left_val>-0.1350758969783783</left_val>\r\n            <right_val>0.0456306189298630</right_val></_></_>\r\n        <_>\r\n          <!-- tree 104 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 1 12 -1.</_>\r\n                <_>\r\n                  0 3 1 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.9727862030267715e-003</threshold>\r\n            <left_val>0.0405779294669628</left_val>\r\n            <right_val>-0.3409133851528168</right_val></_></_>\r\n        <_>\r\n          <!-- tree 105 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 0 12 1 -1.</_>\r\n                <_>\r\n                  13 0 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.3152899965643883e-003</threshold>\r\n            <left_val>0.1372991949319840</left_val>\r\n            <right_val>-0.0561671592295170</right_val></_></_>\r\n        <_>\r\n          <!-- tree 106 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 12 1 -1.</_>\r\n                <_>\r\n                  8 0 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.6897659301757813e-003</threshold>\r\n            <left_val>0.1639326065778732</left_val>\r\n            <right_val>-0.0914164036512375</right_val></_></_>\r\n        <_>\r\n          <!-- tree 107 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 20 1 -1.</_>\r\n                <_>\r\n                  8 0 10 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.0578881055116653e-003</threshold>\r\n            <left_val>-0.0800797268748283</left_val>\r\n            <right_val>0.1433712989091873</right_val></_></_>\r\n        <_>\r\n          <!-- tree 108 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 9 2 -1.</_>\r\n                <_>\r\n                  4 0 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0299335699528456</threshold>\r\n            <left_val>-0.5326762199401856</left_val>\r\n            <right_val>0.0227312203496695</right_val></_></_>\r\n        <_>\r\n          <!-- tree 109 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 6 8 2 -1.</_>\r\n                <_>\r\n                  11 7 8 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.0810988545417786e-003</threshold>\r\n            <left_val>-0.0732182189822197</left_val>\r\n            <right_val>0.1027508974075317</right_val></_></_>\r\n        <_>\r\n          <!-- tree 110 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 3 3 8 -1.</_>\r\n                <_>\r\n                  11 7 3 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0508137904107571</threshold>\r\n            <left_val>0.0516868904232979</left_val>\r\n            <right_val>-0.2544622123241425</right_val></_></_>\r\n        <_>\r\n          <!-- tree 111 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 4 4 2 -1.</_>\r\n                <_>\r\n                  21 5 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>4.7044758684933186e-003</threshold>\r\n            <left_val>-0.0572907589375973</left_val>\r\n            <right_val>0.0760648325085640</right_val></_></_>\r\n        <_>\r\n          <!-- tree 112 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 2 6 -1.</_>\r\n                <_>\r\n                  6 7 1 6 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>4.6408819034695625e-003</threshold>\r\n            <left_val>0.0559986904263496</left_val>\r\n            <right_val>-0.2172269970178604</right_val></_></_>\r\n        <_>\r\n          <!-- tree 113 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 4 4 2 -1.</_>\r\n                <_>\r\n                  21 5 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-9.5121748745441437e-003</threshold>\r\n            <left_val>0.1812860071659088</left_val>\r\n            <right_val>-0.0377242304384708</right_val></_></_>\r\n        <_>\r\n          <!-- tree 114 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 4 2 4 -1.</_>\r\n                <_>\r\n                  4 5 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>2.5726249441504478e-003</threshold>\r\n            <left_val>-0.1238458007574081</left_val>\r\n            <right_val>0.1421934068202972</right_val></_></_></trees>\r\n      <stage_threshold>-1.3500690460205078</stage_threshold>\r\n      <parent>10</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 12 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 5 11 3 -1.</_>\r\n                <_>\r\n                  7 6 11 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0184330195188522</threshold>\r\n            <left_val>-0.1618741005659103</left_val>\r\n            <right_val>0.3351263999938965</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 1 3 4 -1.</_>\r\n                <_>\r\n                  20 2 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.8202150501310825e-003</threshold>\r\n            <left_val>-0.0972008332610130</left_val>\r\n            <right_val>0.2755692005157471</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 4 9 3 -1.</_>\r\n                <_>\r\n                  8 5 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0214508101344109</threshold>\r\n            <left_val>-0.1013654991984367</left_val>\r\n            <right_val>0.3922119140625000</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 6 9 3 -1.</_>\r\n                <_>\r\n                  9 7 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0201995000243187</threshold>\r\n            <left_val>-0.1041551977396011</left_val>\r\n            <right_val>0.3485709130764008</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 8 8 -1.</_>\r\n                <_>\r\n                  0 7 4 4 2.</_>\r\n                <_>\r\n                  4 11 4 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0154604399576783</threshold>\r\n            <left_val>-0.1814713031053543</left_val>\r\n            <right_val>0.2296576052904129</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 7 7 3 -1.</_>\r\n                <_>\r\n                  9 8 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0121146701276302</threshold>\r\n            <left_val>-0.0955794528126717</left_val>\r\n            <right_val>0.3321264982223511</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 3 9 3 -1.</_>\r\n                <_>\r\n                  8 4 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0166161693632603</threshold>\r\n            <left_val>-0.0751067474484444</left_val>\r\n            <right_val>0.3475660085678101</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 1 1 6 -1.</_>\r\n                <_>\r\n                  19 3 1 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0151290399953723</threshold>\r\n            <left_val>0.1396238952875137</left_val>\r\n            <right_val>-0.1150512024760246</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 24 5 -1.</_>\r\n                <_>\r\n                  6 7 12 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0707296282052994</threshold>\r\n            <left_val>0.2683610916137695</left_val>\r\n            <right_val>-0.1016533970832825</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 11 1 2 -1.</_>\r\n                <_>\r\n                  24 11 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>2.2831759415566921e-003</threshold>\r\n            <left_val>0.0443518795073032</left_val>\r\n            <right_val>-0.4632245898246765</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 8 5 -1.</_>\r\n                <_>\r\n                  5 2 4 5 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.5853649973869324e-003</threshold>\r\n            <left_val>0.0919516831636429</left_val>\r\n            <right_val>-0.3147256970405579</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 3 8 12 -1.</_>\r\n                <_>\r\n                  20 3 4 6 2.</_>\r\n                <_>\r\n                  16 9 4 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0406785085797310</threshold>\r\n            <left_val>0.1471066027879715</left_val>\r\n            <right_val>-0.0726505890488625</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 12 -1.</_>\r\n                <_>\r\n                  0 0 12 6 2.</_>\r\n                <_>\r\n                  12 6 12 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1358978003263474</threshold>\r\n            <left_val>-0.5053529739379883</left_val>\r\n            <right_val>0.0469954796135426</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 2 10 8 -1.</_>\r\n                <_>\r\n                  13 2 5 4 2.</_>\r\n                <_>\r\n                  8 6 5 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0384974703192711</threshold>\r\n            <left_val>-0.3717043101787567</left_val>\r\n            <right_val>0.0552083589136600</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 2 8 -1.</_>\r\n                <_>\r\n                  0 3 1 4 2.</_>\r\n                <_>\r\n                  1 7 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.7928350027650595e-003</threshold>\r\n            <left_val>-0.1162076964974403</left_val>\r\n            <right_val>0.1937797069549561</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 11 2 4 -1.</_>\r\n                <_>\r\n                  22 12 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3412551060318947e-003</threshold>\r\n            <left_val>0.0129640102386475</left_val>\r\n            <right_val>-0.4924449026584625</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 11 2 4 -1.</_>\r\n                <_>\r\n                  1 12 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.6604509912431240e-003</threshold>\r\n            <left_val>-0.4564127027988434</left_val>\r\n            <right_val>0.0437755398452282</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 2 13 12 -1.</_>\r\n                <_>\r\n                  12 8 13 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.3209887146949768</threshold>\r\n            <left_val>0.0484563298523426</left_val>\r\n            <right_val>-0.3930096924304962</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 8 2 4 -1.</_>\r\n                <_>\r\n                  5 8 1 4 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-7.2495201602578163e-003</threshold>\r\n            <left_val>-0.4188942015171051</left_val>\r\n            <right_val>0.0410884395241737</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 6 6 7 -1.</_>\r\n                <_>\r\n                  17 6 2 7 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0233532395213842</threshold>\r\n            <left_val>0.0302080996334553</left_val>\r\n            <right_val>-0.3757928013801575</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 6 6 6 -1.</_>\r\n                <_>\r\n                  6 6 2 6 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0224980209022760</threshold>\r\n            <left_val>-0.4524075090885162</left_val>\r\n            <right_val>0.0389229394495487</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 13 9 2 -1.</_>\r\n                <_>\r\n                  16 13 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0238666702061892</threshold>\r\n            <left_val>-0.5288146734237671</left_val>\r\n            <right_val>0.0138155296444893</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 4 7 4 -1.</_>\r\n                <_>\r\n                  3 5 7 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0336419306695461</threshold>\r\n            <left_val>0.4436714053153992</left_val>\r\n            <right_val>-0.0403416194021702</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 4 6 8 -1.</_>\r\n                <_>\r\n                  21 4 3 4 2.</_>\r\n                <_>\r\n                  18 8 3 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0221408791840076</threshold>\r\n            <left_val>-0.0495454296469688</left_val>\r\n            <right_val>0.2051838934421539</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 14 9 1 -1.</_>\r\n                <_>\r\n                  6 14 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0106034297496080</threshold>\r\n            <left_val>0.0319968499243259</left_val>\r\n            <right_val>-0.5148760080337524</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 11 14 4 -1.</_>\r\n                <_>\r\n                  18 11 7 2 2.</_>\r\n                <_>\r\n                  11 13 7 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.6357148140668869e-003</threshold>\r\n            <left_val>-0.1237379983067513</left_val>\r\n            <right_val>0.1527843028306961</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 4 6 8 -1.</_>\r\n                <_>\r\n                  1 4 3 4 2.</_>\r\n                <_>\r\n                  4 8 3 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0297187492251396</threshold>\r\n            <left_val>-0.0567854084074497</left_val>\r\n            <right_val>0.2904588878154755</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 0 2 2 -1.</_>\r\n                <_>\r\n                  23 0 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>2.0548420434352010e-004</threshold>\r\n            <left_val>-0.2718465924263001</left_val>\r\n            <right_val>0.1070784032344818</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 13 4 -1.</_>\r\n                <_>\r\n                  6 1 13 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0486726500093937</threshold>\r\n            <left_val>0.4235774874687195</left_val>\r\n            <right_val>-0.0456859990954399</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 0 4 2 -1.</_>\r\n                <_>\r\n                  11 1 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.5377809070050716e-003</threshold>\r\n            <left_val>-0.0727348327636719</left_val>\r\n            <right_val>0.2103600949048996</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 2 2 -1.</_>\r\n                <_>\r\n                  2 0 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-3.3941529691219330e-003</threshold>\r\n            <left_val>-0.3815236985683441</left_val>\r\n            <right_val>0.0445483289659023</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 9 5 6 -1.</_>\r\n                <_>\r\n                  20 11 5 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0237451493740082</threshold>\r\n            <left_val>-0.4413619935512543</left_val>\r\n            <right_val>0.0249414704740047</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 15 3 -1.</_>\r\n                <_>\r\n                  5 3 15 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0200922992080450</threshold>\r\n            <left_val>0.1694606989622116</left_val>\r\n            <right_val>-0.0953345969319344</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 2 7 3 -1.</_>\r\n                <_>\r\n                  9 3 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0110265100374818</threshold>\r\n            <left_val>-0.0721762925386429</left_val>\r\n            <right_val>0.2484644949436188</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 14 21 1 -1.</_>\r\n                <_>\r\n                  9 14 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0158068798482418</threshold>\r\n            <left_val>0.2241718024015427</left_val>\r\n            <right_val>-0.0724460408091545</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 11 16 4 -1.</_>\r\n                <_>\r\n                  8 11 8 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0490073598921299</threshold>\r\n            <left_val>-0.0551217384636402</left_val>\r\n            <right_val>0.2583925127983093</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 12 24 2 -1.</_>\r\n                <_>\r\n                  12 12 12 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0288716107606888</threshold>\r\n            <left_val>-0.1153011992573738</left_val>\r\n            <right_val>0.1924846023321152</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 9 3 6 -1.</_>\r\n                <_>\r\n                  22 11 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.3990179225802422e-003</threshold>\r\n            <left_val>0.0522995889186859</left_val>\r\n            <right_val>-0.2191856950521469</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 12 2 -1.</_>\r\n                <_>\r\n                  0 1 6 1 2.</_>\r\n                <_>\r\n                  6 2 6 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.1737848445773125e-003</threshold>\r\n            <left_val>0.2038096934556961</left_val>\r\n            <right_val>-0.0696693286299706</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 9 9 3 -1.</_>\r\n                <_>\r\n                  8 10 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.4332564622163773e-003</threshold>\r\n            <left_val>-0.0534071698784828</left_val>\r\n            <right_val>0.2586283981800079</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 3 6 -1.</_>\r\n                <_>\r\n                  0 11 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0143210804089904</threshold>\r\n            <left_val>0.0336425192654133</left_val>\r\n            <right_val>-0.4679594039916992</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 11 14 4 -1.</_>\r\n                <_>\r\n                  18 11 7 2 2.</_>\r\n                <_>\r\n                  11 13 7 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0224872808903456</threshold>\r\n            <left_val>-0.0431007482111454</left_val>\r\n            <right_val>0.1123055964708328</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 9 4 6 -1.</_>\r\n                <_>\r\n                  8 9 2 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.8018830865621567e-003</threshold>\r\n            <left_val>-0.5997744798660278</left_val>\r\n            <right_val>0.0238500293344259</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 12 6 2 -1.</_>\r\n                <_>\r\n                  12 12 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.2824921011924744e-003</threshold>\r\n            <left_val>-0.3792850077152252</left_val>\r\n            <right_val>0.0247395392507315</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 12 1 2 -1.</_>\r\n                <_>\r\n                  0 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.8288799260044470e-005</threshold>\r\n            <left_val>0.1094501987099648</left_val>\r\n            <right_val>-0.1270592063665390</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 3 10 12 -1.</_>\r\n                <_>\r\n                  20 3 5 6 2.</_>\r\n                <_>\r\n                  15 9 5 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1060767024755478</threshold>\r\n            <left_val>0.1223917007446289</left_val>\r\n            <right_val>-0.0179706607013941</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 9 4 6 -1.</_>\r\n                <_>\r\n                  10 9 2 3 2.</_>\r\n                <_>\r\n                  12 12 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0145011199638247</threshold>\r\n            <left_val>0.0254385806620121</left_val>\r\n            <right_val>-0.5499516725540161</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 3 6 4 -1.</_>\r\n                <_>\r\n                  11 3 3 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0294254906475544</threshold>\r\n            <left_val>-0.4407989084720612</left_val>\r\n            <right_val>0.0163295306265354</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 14 14 -1.</_>\r\n                <_>\r\n                  0 7 14 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.2141247987747192</threshold>\r\n            <left_val>-0.5817149281501770</left_val>\r\n            <right_val>0.0224080495536327</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 2 10 12 -1.</_>\r\n                <_>\r\n                  20 2 5 6 2.</_>\r\n                <_>\r\n                  15 8 5 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0159379299730062</threshold>\r\n            <left_val>0.0447719283401966</left_val>\r\n            <right_val>-0.0470217689871788</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 3 6 4 -1.</_>\r\n                <_>\r\n                  11 3 3 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0358322896063328</threshold>\r\n            <left_val>0.0257156305015087</left_val>\r\n            <right_val>-0.5430511236190796</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 5 2 6 -1.</_>\r\n                <_>\r\n                  23 7 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0114978998899460</threshold>\r\n            <left_val>-0.4132392108440399</left_val>\r\n            <right_val>0.0246592592447996</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 8 5 3 -1.</_>\r\n                <_>\r\n                  10 9 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.6680490747094154e-003</threshold>\r\n            <left_val>-0.0596144981682301</left_val>\r\n            <right_val>0.2419749945402145</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 7 5 4 -1.</_>\r\n                <_>\r\n                  20 8 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0123357502743602</threshold>\r\n            <left_val>0.0375008806586266</left_val>\r\n            <right_val>-0.4776956140995026</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 10 11 4 -1.</_>\r\n                <_>\r\n                  7 11 11 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0130474697798491</threshold>\r\n            <left_val>-0.0609255395829678</left_val>\r\n            <right_val>0.2419895976781845</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 13 1 2 -1.</_>\r\n                <_>\r\n                  16 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.2074559789616615e-005</threshold>\r\n            <left_val>-0.0981822684407234</left_val>\r\n            <right_val>0.0891881734132767</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 1 5 4 -1.</_>\r\n                <_>\r\n                  3 2 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.2866070978343487e-003</threshold>\r\n            <left_val>-0.0941056609153748</left_val>\r\n            <right_val>0.1441165059804916</right_val></_></_>\r\n        <_>\r\n          <!-- tree 57 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 3 8 2 -1.</_>\r\n                <_>\r\n                  17 4 8 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0417326614260674</threshold>\r\n            <left_val>-0.6405817270278931</left_val>\r\n            <right_val>0.0221338905394077</right_val></_></_>\r\n        <_>\r\n          <!-- tree 58 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 5 4 -1.</_>\r\n                <_>\r\n                  0 8 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.7638191655278206e-003</threshold>\r\n            <left_val>0.0412781611084938</left_val>\r\n            <right_val>-0.3354279994964600</right_val></_></_>\r\n        <_>\r\n          <!-- tree 59 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 4 12 6 -1.</_>\r\n                <_>\r\n                  13 4 4 6 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1077456995844841</threshold>\r\n            <left_val>8.1762494519352913e-003</left_val>\r\n            <right_val>-0.4347884058952332</right_val></_></_>\r\n        <_>\r\n          <!-- tree 60 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 4 12 6 -1.</_>\r\n                <_>\r\n                  8 4 4 6 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1119699031114578</threshold>\r\n            <left_val>0.0199715103954077</left_val>\r\n            <right_val>-0.6503595113754273</right_val></_></_>\r\n        <_>\r\n          <!-- tree 61 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 0 12 9 -1.</_>\r\n                <_>\r\n                  11 0 6 9 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0680430680513382</threshold>\r\n            <left_val>-0.0602735094726086</left_val>\r\n            <right_val>0.1384491026401520</right_val></_></_>\r\n        <_>\r\n          <!-- tree 62 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 5 16 8 -1.</_>\r\n                <_>\r\n                  12 5 8 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1206192970275879</threshold>\r\n            <left_val>-0.0666261836886406</left_val>\r\n            <right_val>0.2128939926624298</right_val></_></_>\r\n        <_>\r\n          <!-- tree 63 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 12 2 1 -1.</_>\r\n                <_>\r\n                  16 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.7089789509773254e-003</threshold>\r\n            <left_val>-0.4214768111705780</left_val>\r\n            <right_val>7.0062931627035141e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 64 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 12 2 1 -1.</_>\r\n                <_>\r\n                  8 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.8798991530202329e-005</threshold>\r\n            <left_val>0.1287330985069275</left_val>\r\n            <right_val>-0.1178120002150536</right_val></_></_>\r\n        <_>\r\n          <!-- tree 65 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 3 6 4 -1.</_>\r\n                <_>\r\n                  22 3 3 2 2.</_>\r\n                <_>\r\n                  19 5 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0177976898849010</threshold>\r\n            <left_val>-0.0398075394332409</left_val>\r\n            <right_val>0.2582241892814636</right_val></_></_>\r\n        <_>\r\n          <!-- tree 66 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 10 6 3 -1.</_>\r\n                <_>\r\n                  10 10 2 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0155267501249909</threshold>\r\n            <left_val>-0.5375617146492004</left_val>\r\n            <right_val>0.0254285801202059</right_val></_></_>\r\n        <_>\r\n          <!-- tree 67 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 6 2 2 -1.</_>\r\n                <_>\r\n                  17 6 1 1 2.</_>\r\n                <_>\r\n                  16 7 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.1374800233170390e-003</threshold>\r\n            <left_val>0.1497129052877426</left_val>\r\n            <right_val>-0.0317900516092777</right_val></_></_>\r\n        <_>\r\n          <!-- tree 68 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 2 -1.</_>\r\n                <_>\r\n                  0 0 12 1 2.</_>\r\n                <_>\r\n                  12 1 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0219873897731304</threshold>\r\n            <left_val>0.0302675794810057</left_val>\r\n            <right_val>-0.4156928062438965</right_val></_></_>\r\n        <_>\r\n          <!-- tree 69 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 6 2 2 -1.</_>\r\n                <_>\r\n                  17 6 1 1 2.</_>\r\n                <_>\r\n                  16 7 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.9880971093662083e-005</threshold>\r\n            <left_val>-0.0641673132777214</left_val>\r\n            <right_val>0.0799537077546120</right_val></_></_>\r\n        <_>\r\n          <!-- tree 70 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 6 4 -1.</_>\r\n                <_>\r\n                  0 3 3 2 2.</_>\r\n                <_>\r\n                  3 5 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.6966080814599991e-003</threshold>\r\n            <left_val>-0.0727465227246284</left_val>\r\n            <right_val>0.1708455979824066</right_val></_></_>\r\n        <_>\r\n          <!-- tree 71 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 0 3 4 -1.</_>\r\n                <_>\r\n                  22 2 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.2799488659948111e-004</threshold>\r\n            <left_val>0.0341552086174488</left_val>\r\n            <right_val>-0.1379152983427048</right_val></_></_>\r\n        <_>\r\n          <!-- tree 72 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 0 2 3 -1.</_>\r\n                <_>\r\n                  11 1 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.2622140347957611e-003</threshold>\r\n            <left_val>0.1615235060453415</left_val>\r\n            <right_val>-0.0755578279495239</right_val></_></_>\r\n        <_>\r\n          <!-- tree 73 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 7 2 4 -1.</_>\r\n                <_>\r\n                  20 8 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0110059296712279</threshold>\r\n            <left_val>-0.4823004007339478</left_val>\r\n            <right_val>0.0268340297043324</right_val></_></_>\r\n        <_>\r\n          <!-- tree 74 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 9 10 1 -1.</_>\r\n                <_>\r\n                  9 9 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.5793791115283966e-003</threshold>\r\n            <left_val>0.1946887969970703</left_val>\r\n            <right_val>-0.0669640377163887</right_val></_></_>\r\n        <_>\r\n          <!-- tree 75 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 6 2 2 -1.</_>\r\n                <_>\r\n                  17 6 1 1 2.</_>\r\n                <_>\r\n                  16 7 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.1821959358640015e-005</threshold>\r\n            <left_val>0.0793757066130638</left_val>\r\n            <right_val>-0.0674495473504066</right_val></_></_>\r\n        <_>\r\n          <!-- tree 76 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 6 2 2 -1.</_>\r\n                <_>\r\n                  7 6 1 1 2.</_>\r\n                <_>\r\n                  8 7 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.2134959688410163e-003</threshold>\r\n            <left_val>-0.0511140711605549</left_val>\r\n            <right_val>0.2775780856609345</right_val></_></_>\r\n        <_>\r\n          <!-- tree 77 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 6 2 2 -1.</_>\r\n                <_>\r\n                  17 6 1 1 2.</_>\r\n                <_>\r\n                  16 7 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.9206802183762193e-004</threshold>\r\n            <left_val>-0.0284809302538633</left_val>\r\n            <right_val>0.1130611971020699</right_val></_></_>\r\n        <_>\r\n          <!-- tree 78 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 1 4 -1.</_>\r\n                <_>\r\n                  0 2 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.7196949813514948e-003</threshold>\r\n            <left_val>0.0362051688134670</left_val>\r\n            <right_val>-0.3822895884513855</right_val></_></_>\r\n        <_>\r\n          <!-- tree 79 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 6 2 2 -1.</_>\r\n                <_>\r\n                  17 6 1 1 2.</_>\r\n                <_>\r\n                  16 7 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.0203691720962524e-003</threshold>\r\n            <left_val>-0.7084425091743469</left_val>\r\n            <right_val>9.6215400844812393e-005</right_val></_></_>\r\n        <_>\r\n          <!-- tree 80 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 6 2 2 -1.</_>\r\n                <_>\r\n                  7 6 1 1 2.</_>\r\n                <_>\r\n                  8 7 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.4910762486979365e-004</threshold>\r\n            <left_val>0.1899659931659699</left_val>\r\n            <right_val>-0.0707588419318199</right_val></_></_>\r\n        <_>\r\n          <!-- tree 81 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 9 9 6 -1.</_>\r\n                <_>\r\n                  11 11 3 2 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0300100892782211</threshold>\r\n            <left_val>0.1409595012664795</left_val>\r\n            <right_val>-0.0833628922700882</right_val></_></_>\r\n        <_>\r\n          <!-- tree 82 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 2 6 -1.</_>\r\n                <_>\r\n                  0 7 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0211524497717619</threshold>\r\n            <left_val>0.0258801300078630</left_val>\r\n            <right_val>-0.4697616100311279</right_val></_></_>\r\n        <_>\r\n          <!-- tree 83 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 4 4 7 -1.</_>\r\n                <_>\r\n                  15 5 2 7 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0319705903530121</threshold>\r\n            <left_val>-0.5124071240425110</left_val>\r\n            <right_val>0.0121158296242356</right_val></_></_>\r\n        <_>\r\n          <!-- tree 84 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 13 20 2 -1.</_>\r\n                <_>\r\n                  2 13 10 1 2.</_>\r\n                <_>\r\n                  12 14 10 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0105077195912600</threshold>\r\n            <left_val>0.0386607907712460</left_val>\r\n            <right_val>-0.3098644018173218</right_val></_></_>\r\n        <_>\r\n          <!-- tree 85 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 7 2 2 -1.</_>\r\n                <_>\r\n                  24 7 1 1 2.</_>\r\n                <_>\r\n                  23 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.8152811359614134e-005</threshold>\r\n            <left_val>-0.0616559796035290</left_val>\r\n            <right_val>0.0678063929080963</right_val></_></_>\r\n        <_>\r\n          <!-- tree 86 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 2 1 4 -1.</_>\r\n                <_>\r\n                  3 3 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.6495117759332061e-004</threshold>\r\n            <left_val>-0.0613585598766804</left_val>\r\n            <right_val>0.1991685926914215</right_val></_></_>\r\n        <_>\r\n          <!-- tree 87 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 2 14 4 -1.</_>\r\n                <_>\r\n                  11 3 14 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0404121391475201</threshold>\r\n            <left_val>0.1341411024332047</left_val>\r\n            <right_val>-0.0717744380235672</right_val></_></_>\r\n        <_>\r\n          <!-- tree 88 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 7 4 5 -1.</_>\r\n                <_>\r\n                  6 7 2 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.8856019750237465e-003</threshold>\r\n            <left_val>0.0359793491661549</left_val>\r\n            <right_val>-0.3332307040691376</right_val></_></_>\r\n        <_>\r\n          <!-- tree 89 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 8 1 4 -1.</_>\r\n                <_>\r\n                  22 9 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.3272489458322525e-003</threshold>\r\n            <left_val>0.0328989103436470</left_val>\r\n            <right_val>-0.5153871178627014</right_val></_></_>\r\n        <_>\r\n          <!-- tree 90 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 10 8 -1.</_>\r\n                <_>\r\n                  7 0 5 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0532727986574173</threshold>\r\n            <left_val>-0.0784574225544930</left_val>\r\n            <right_val>0.1582656949758530</right_val></_></_>\r\n        <_>\r\n          <!-- tree 91 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 5 24 3 -1.</_>\r\n                <_>\r\n                  9 6 8 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0174429006874561</threshold>\r\n            <left_val>0.1339583992958069</left_val>\r\n            <right_val>-0.1186174973845482</right_val></_></_>\r\n        <_>\r\n          <!-- tree 92 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 0 4 10 -1.</_>\r\n                <_>\r\n                  10 5 4 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0433590598404408</threshold>\r\n            <left_val>-0.2269790023565292</left_val>\r\n            <right_val>0.0467031300067902</right_val></_></_>\r\n        <_>\r\n          <!-- tree 93 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 4 15 3 -1.</_>\r\n                <_>\r\n                  5 5 15 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0231206398457289</threshold>\r\n            <left_val>0.1634031981229782</left_val>\r\n            <right_val>-0.0685165524482727</right_val></_></_>\r\n        <_>\r\n          <!-- tree 94 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 6 3 6 -1.</_>\r\n                <_>\r\n                  11 8 3 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.3796178698539734e-003</threshold>\r\n            <left_val>0.1582739949226379</left_val>\r\n            <right_val>-0.0771108269691467</right_val></_></_>\r\n        <_>\r\n          <!-- tree 95 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 8 7 3 -1.</_>\r\n                <_>\r\n                  18 9 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0141222495585680</threshold>\r\n            <left_val>-0.5691561102867127</left_val>\r\n            <right_val>0.0232016704976559</right_val></_></_>\r\n        <_>\r\n          <!-- tree 96 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 4 2 -1.</_>\r\n                <_>\r\n                  0 1 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0155957797542214</threshold>\r\n            <left_val>-0.7199953794479370</left_val>\r\n            <right_val>0.0111829601228237</right_val></_></_>\r\n        <_>\r\n          <!-- tree 97 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 0 2 1 -1.</_>\r\n                <_>\r\n                  20 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>7.4529898120090365e-004</threshold>\r\n            <left_val>-0.0766925588250160</left_val>\r\n            <right_val>0.0582969412207603</right_val></_></_>\r\n        <_>\r\n          <!-- tree 98 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 1 8 -1.</_>\r\n                <_>\r\n                  0 8 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.1220599561929703e-003</threshold>\r\n            <left_val>-0.4147517085075378</left_val>\r\n            <right_val>0.0252124201506376</right_val></_></_>\r\n        <_>\r\n          <!-- tree 99 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 7 2 2 -1.</_>\r\n                <_>\r\n                  24 7 1 1 2.</_>\r\n                <_>\r\n                  23 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.7267909141955897e-005</threshold>\r\n            <left_val>0.0905847102403641</left_val>\r\n            <right_val>-0.0668906867504120</right_val></_></_>\r\n        <_>\r\n          <!-- tree 100 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 2 2 -1.</_>\r\n                <_>\r\n                  0 7 1 1 2.</_>\r\n                <_>\r\n                  1 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.8431767653673887e-004</threshold>\r\n            <left_val>-0.0570513382554054</left_val>\r\n            <right_val>0.2420555055141449</right_val></_></_>\r\n        <_>\r\n          <!-- tree 101 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 8 1 4 -1.</_>\r\n                <_>\r\n                  23 9 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-6.3992529176175594e-003</threshold>\r\n            <left_val>-0.4766991138458252</left_val>\r\n            <right_val>0.0172231607139111</right_val></_></_>\r\n        <_>\r\n          <!-- tree 102 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 8 3 1 -1.</_>\r\n                <_>\r\n                  2 9 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>3.4215620253235102e-003</threshold>\r\n            <left_val>0.0330659411847591</left_val>\r\n            <right_val>-0.3505514860153198</right_val></_></_>\r\n        <_>\r\n          <!-- tree 103 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 7 2 2 -1.</_>\r\n                <_>\r\n                  22 7 1 1 2.</_>\r\n                <_>\r\n                  21 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.0761801432818174e-004</threshold>\r\n            <left_val>-0.0633307918906212</left_val>\r\n            <right_val>0.1801937073469162</right_val></_></_>\r\n        <_>\r\n          <!-- tree 104 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 8 15 6 -1.</_>\r\n                <_>\r\n                  5 10 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0271245595067739</threshold>\r\n            <left_val>0.1347420066595078</left_val>\r\n            <right_val>-0.0843034014105797</right_val></_></_>\r\n        <_>\r\n          <!-- tree 105 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 14 8 -1.</_>\r\n                <_>\r\n                  6 9 14 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0320383384823799</threshold>\r\n            <left_val>-0.0676692426204681</left_val>\r\n            <right_val>0.1796665936708450</right_val></_></_>\r\n        <_>\r\n          <!-- tree 106 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 4 10 2 -1.</_>\r\n                <_>\r\n                  1 5 10 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.2583961300551891e-003</threshold>\r\n            <left_val>-0.0986167713999748</left_val>\r\n            <right_val>0.1166217997670174</right_val></_></_>\r\n        <_>\r\n          <!-- tree 107 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 5 3 3 -1.</_>\r\n                <_>\r\n                  13 6 1 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.7803640589118004e-003</threshold>\r\n            <left_val>0.1233021020889282</left_val>\r\n            <right_val>-0.0477618910372257</right_val></_></_>\r\n        <_>\r\n          <!-- tree 108 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 7 3 -1.</_>\r\n                <_>\r\n                  0 5 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0392416305840015</threshold>\r\n            <left_val>0.0167705602943897</left_val>\r\n            <right_val>-0.7329750061035156</right_val></_></_>\r\n        <_>\r\n          <!-- tree 109 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 7 2 2 -1.</_>\r\n                <_>\r\n                  22 7 1 1 2.</_>\r\n                <_>\r\n                  21 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.3865249356022105e-005</threshold>\r\n            <left_val>0.0850126668810844</left_val>\r\n            <right_val>-0.0751027390360832</right_val></_></_>\r\n        <_>\r\n          <!-- tree 110 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 7 2 2 -1.</_>\r\n                <_>\r\n                  2 7 1 1 2.</_>\r\n                <_>\r\n                  3 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.2592968828976154e-004</threshold>\r\n            <left_val>-0.0551505312323570</left_val>\r\n            <right_val>0.2059426009654999</right_val></_></_>\r\n        <_>\r\n          <!-- tree 111 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 9 1 3 -1.</_>\r\n                <_>\r\n                  21 10 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-5.6403529015369713e-005</threshold>\r\n            <left_val>0.0762555226683617</left_val>\r\n            <right_val>-0.0699946209788322</right_val></_></_>\r\n        <_>\r\n          <!-- tree 112 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 13 2 2 -1.</_>\r\n                <_>\r\n                  11 13 1 1 2.</_>\r\n                <_>\r\n                  12 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.6928332196548581e-004</threshold>\r\n            <left_val>-0.2483194023370743</left_val>\r\n            <right_val>0.0468857996165752</right_val></_></_>\r\n        <_>\r\n          <!-- tree 113 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 3 6 12 -1.</_>\r\n                <_>\r\n                  22 3 3 6 2.</_>\r\n                <_>\r\n                  19 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0424826890230179</threshold>\r\n            <left_val>-0.0344216786324978</left_val>\r\n            <right_val>0.1484764963388443</right_val></_></_>\r\n        <_>\r\n          <!-- tree 114 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 6 12 -1.</_>\r\n                <_>\r\n                  0 3 3 6 2.</_>\r\n                <_>\r\n                  3 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0339534096419811</threshold>\r\n            <left_val>0.2843470871448517</left_val>\r\n            <right_val>-0.0431083589792252</right_val></_></_>\r\n        <_>\r\n          <!-- tree 115 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 1 4 11 -1.</_>\r\n                <_>\r\n                  18 1 2 11 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0188998207449913</threshold>\r\n            <left_val>0.0142998602241278</left_val>\r\n            <right_val>-0.4192070066928864</right_val></_></_>\r\n        <_>\r\n          <!-- tree 116 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 10 6 3 -1.</_>\r\n                <_>\r\n                  0 11 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.9765710458159447e-003</threshold>\r\n            <left_val>0.0621932409703732</left_val>\r\n            <right_val>-0.1786025017499924</right_val></_></_>\r\n        <_>\r\n          <!-- tree 117 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 11 2 1 -1.</_>\r\n                <_>\r\n                  23 11 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.0894439482362941e-005</threshold>\r\n            <left_val>0.0948854833841324</left_val>\r\n            <right_val>-0.0689786225557327</right_val></_></_>\r\n        <_>\r\n          <!-- tree 118 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 1 4 11 -1.</_>\r\n                <_>\r\n                  5 1 2 11 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0114915501326323</threshold>\r\n            <left_val>0.0331886112689972</left_val>\r\n            <right_val>-0.3628959059715271</right_val></_></_>\r\n        <_>\r\n          <!-- tree 119 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 3 4 12 -1.</_>\r\n                <_>\r\n                  23 3 2 6 2.</_>\r\n                <_>\r\n                  21 9 2 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0215106792747974</threshold>\r\n            <left_val>0.2759737968444824</left_val>\r\n            <right_val>-0.0317491404712200</right_val></_></_>\r\n        <_>\r\n          <!-- tree 120 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 4 12 -1.</_>\r\n                <_>\r\n                  0 3 2 6 2.</_>\r\n                <_>\r\n                  2 9 2 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0130551997572184</threshold>\r\n            <left_val>-0.0830815583467484</left_val>\r\n            <right_val>0.1449849009513855</right_val></_></_>\r\n        <_>\r\n          <!-- tree 121 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 11 6 4 -1.</_>\r\n                <_>\r\n                  11 12 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.6747581586241722e-003</threshold>\r\n            <left_val>-0.0461902506649494</left_val>\r\n            <right_val>0.1383360028266907</right_val></_></_>\r\n        <_>\r\n          <!-- tree 122 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 11 13 4 -1.</_>\r\n                <_>\r\n                  6 12 13 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.0616300217807293e-003</threshold>\r\n            <left_val>0.1968749016523361</left_val>\r\n            <right_val>-0.0837985798716545</right_val></_></_>\r\n        <_>\r\n          <!-- tree 123 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 10 3 1 -1.</_>\r\n                <_>\r\n                  12 10 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.1481661396101117e-004</threshold>\r\n            <left_val>0.0542011298239231</left_val>\r\n            <right_val>-0.1981233954429627</right_val></_></_>\r\n        <_>\r\n          <!-- tree 124 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 13 8 -1.</_>\r\n                <_>\r\n                  5 6 13 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2860183119773865</threshold>\r\n            <left_val>0.0232954602688551</left_val>\r\n            <right_val>-0.4173370003700256</right_val></_></_>\r\n        <_>\r\n          <!-- tree 125 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 2 10 6 -1.</_>\r\n                <_>\r\n                  15 4 10 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0463717207312584</threshold>\r\n            <left_val>-0.0290123391896486</left_val>\r\n            <right_val>0.1808013021945953</right_val></_></_>\r\n        <_>\r\n          <!-- tree 126 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 2 10 6 -1.</_>\r\n                <_>\r\n                  0 4 10 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0557247512042522</threshold>\r\n            <left_val>0.1358146965503693</left_val>\r\n            <right_val>-0.1061223000288010</right_val></_></_>\r\n        <_>\r\n          <!-- tree 127 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 1 13 8 -1.</_>\r\n                <_>\r\n                  12 3 13 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.2584396898746491</threshold>\r\n            <left_val>-0.4910731911659241</left_val>\r\n            <right_val>0.0151501996442676</right_val></_></_></trees>\r\n      <stage_threshold>-1.3960490226745605</stage_threshold>\r\n      <parent>11</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 13 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 3 -1.</_>\r\n                <_>\r\n                  5 4 15 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0417404398322105</threshold>\r\n            <left_val>0.4202992916107178</left_val>\r\n            <right_val>-0.1386588066816330</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 3 9 3 -1.</_>\r\n                <_>\r\n                  9 4 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0274386107921600</threshold>\r\n            <left_val>-0.0691855624318123</left_val>\r\n            <right_val>0.6378138065338135</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 2 7 3 -1.</_>\r\n                <_>\r\n                  2 3 7 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0319233611226082</threshold>\r\n            <left_val>0.5562999844551086</left_val>\r\n            <right_val>-0.0588022507727146</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 15 3 -1.</_>\r\n                <_>\r\n                  5 3 15 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0426339097321033</threshold>\r\n            <left_val>0.3957036137580872</left_val>\r\n            <right_val>-0.0923223569989204</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 4 15 3 -1.</_>\r\n                <_>\r\n                  5 5 15 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0453329794108868</threshold>\r\n            <left_val>0.4831672012805939</left_val>\r\n            <right_val>-0.0990284606814384</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 6 2 2 -1.</_>\r\n                <_>\r\n                  18 6 1 1 2.</_>\r\n                <_>\r\n                  17 7 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.4149550115689635e-003</threshold>\r\n            <left_val>-0.0383210293948650</left_val>\r\n            <right_val>0.3782787919044495</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 10 2 3 -1.</_>\r\n                <_>\r\n                  5 10 1 3 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>3.1844570767134428e-003</threshold>\r\n            <left_val>0.0845874175429344</left_val>\r\n            <right_val>-0.3629348874092102</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 11 2 4 -1.</_>\r\n                <_>\r\n                  23 13 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.9865548759698868e-003</threshold>\r\n            <left_val>0.0660245269536972</left_val>\r\n            <right_val>-0.4990949034690857</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 14 4 -1.</_>\r\n                <_>\r\n                  0 11 7 2 2.</_>\r\n                <_>\r\n                  7 13 7 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.3637079223990440e-003</threshold>\r\n            <left_val>-0.1568834036588669</left_val>\r\n            <right_val>0.1732781976461411</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 4 6 3 -1.</_>\r\n                <_>\r\n                  10 5 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0166161693632603</threshold>\r\n            <left_val>-0.1092156991362572</left_val>\r\n            <right_val>0.3208172023296356</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 24 14 -1.</_>\r\n                <_>\r\n                  0 1 12 7 2.</_>\r\n                <_>\r\n                  12 8 12 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1083723008632660</threshold>\r\n            <left_val>-0.3144314885139465</left_val>\r\n            <right_val>0.0960887372493744</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 5 24 8 -1.</_>\r\n                <_>\r\n                  13 5 12 4 2.</_>\r\n                <_>\r\n                  1 9 12 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0552641600370407</threshold>\r\n            <left_val>-0.3238588869571686</left_val>\r\n            <right_val>0.0760045275092125</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 12 -1.</_>\r\n                <_>\r\n                  0 0 12 6 2.</_>\r\n                <_>\r\n                  12 6 12 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1263256967067719</threshold>\r\n            <left_val>0.0652572736144066</left_val>\r\n            <right_val>-0.4011892974376679</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 0 15 14 -1.</_>\r\n                <_>\r\n                  10 7 15 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.3880456089973450</threshold>\r\n            <left_val>0.0290472805500031</left_val>\r\n            <right_val>-0.2850419878959656</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 11 2 1 -1.</_>\r\n                <_>\r\n                  1 11 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>2.1647498942911625e-003</threshold>\r\n            <left_val>0.0566388815641403</left_val>\r\n            <right_val>-0.4483107030391693</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 11 24 4 -1.</_>\r\n                <_>\r\n                  1 11 12 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0850358307361603</threshold>\r\n            <left_val>0.2374248951673508</left_val>\r\n            <right_val>-0.1127642020583153</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 7 10 3 -1.</_>\r\n                <_>\r\n                  7 8 10 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0297137200832367</threshold>\r\n            <left_val>-0.0403699316084385</left_val>\r\n            <right_val>0.4747174084186554</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 5 7 3 -1.</_>\r\n                <_>\r\n                  9 6 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0189488306641579</threshold>\r\n            <left_val>-0.0794471576809883</left_val>\r\n            <right_val>0.2721098959445953</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 2 6 -1.</_>\r\n                <_>\r\n                  0 11 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.4433820769190788e-003</threshold>\r\n            <left_val>-0.4018659889698029</left_val>\r\n            <right_val>0.0573576912283897</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 8 3 2 -1.</_>\r\n                <_>\r\n                  22 8 3 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-7.4416291899979115e-003</threshold>\r\n            <left_val>-0.4642170965671539</left_val>\r\n            <right_val>0.0343283303081989</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 6 1 3 -1.</_>\r\n                <_>\r\n                  12 7 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.1745829619467258e-003</threshold>\r\n            <left_val>-0.0719946026802063</left_val>\r\n            <right_val>0.2899833023548126</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 6 1 6 -1.</_>\r\n                <_>\r\n                  24 8 1 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.6435040421783924e-003</threshold>\r\n            <left_val>-0.4219543039798737</left_val>\r\n            <right_val>0.0394870713353157</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 3 7 2 -1.</_>\r\n                <_>\r\n                  3 3 7 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0225970800966024</threshold>\r\n            <left_val>0.2745698094367981</left_val>\r\n            <right_val>-0.0772427767515183</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 4 6 10 -1.</_>\r\n                <_>\r\n                  13 4 3 5 2.</_>\r\n                <_>\r\n                  10 9 3 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0175681803375483</threshold>\r\n            <left_val>0.0604698508977890</left_val>\r\n            <right_val>-0.2755838930606842</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 14 6 -1.</_>\r\n                <_>\r\n                  0 6 14 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2285360991954804</threshold>\r\n            <left_val>0.0372774116694927</left_val>\r\n            <right_val>-0.5375431180000305</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 0 8 8 -1.</_>\r\n                <_>\r\n                  13 0 4 4 2.</_>\r\n                <_>\r\n                  9 4 4 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0323306396603584</threshold>\r\n            <left_val>0.0458961501717567</left_val>\r\n            <right_val>-0.3844825029373169</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 4 5 3 -1.</_>\r\n                <_>\r\n                  2 5 5 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0285396501421928</threshold>\r\n            <left_val>0.5891790986061096</left_val>\r\n            <right_val>-0.0340728089213371</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 9 7 6 -1.</_>\r\n                <_>\r\n                  18 11 7 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0286119598895311</threshold>\r\n            <left_val>0.0241741407662630</left_val>\r\n            <right_val>-0.2325512021780014</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 7 6 -1.</_>\r\n                <_>\r\n                  0 11 7 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0190214607864618</threshold>\r\n            <left_val>0.0562911406159401</left_val>\r\n            <right_val>-0.3404670059680939</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 1 3 3 -1.</_>\r\n                <_>\r\n                  12 2 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.7942080311477184e-003</threshold>\r\n            <left_val>0.2392093986272812</left_val>\r\n            <right_val>-0.0638626366853714</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 2 6 8 -1.</_>\r\n                <_>\r\n                  9 2 3 4 2.</_>\r\n                <_>\r\n                  12 6 3 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0198575407266617</threshold>\r\n            <left_val>0.0513716302812099</left_val>\r\n            <right_val>-0.3405377864837647</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 14 24 1 -1.</_>\r\n                <_>\r\n                  7 14 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0227794591337442</threshold>\r\n            <left_val>0.2922581136226654</left_val>\r\n            <right_val>-0.0604945607483387</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 12 12 -1.</_>\r\n                <_>\r\n                  0 3 6 6 2.</_>\r\n                <_>\r\n                  6 9 6 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1480142027139664</threshold>\r\n            <left_val>-0.0343834199011326</left_val>\r\n            <right_val>0.4667116999626160</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 3 9 4 -1.</_>\r\n                <_>\r\n                  14 3 3 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0337039716541767</threshold>\r\n            <left_val>-0.3770483136177063</left_val>\r\n            <right_val>0.0263036508113146</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 4 6 6 -1.</_>\r\n                <_>\r\n                  9 4 3 3 2.</_>\r\n                <_>\r\n                  12 7 3 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0162283908575773</threshold>\r\n            <left_val>-0.3382456898689270</left_val>\r\n            <right_val>0.0570861399173737</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 0 4 1 -1.</_>\r\n                <_>\r\n                  20 0 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-4.2941919527947903e-003</threshold>\r\n            <left_val>-0.3295148909091950</left_val>\r\n            <right_val>0.0434178002178669</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 3 9 4 -1.</_>\r\n                <_>\r\n                  11 3 3 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0235741101205349</threshold>\r\n            <left_val>-0.3945200145244598</left_val>\r\n            <right_val>0.0398236103355885</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 4 6 9 -1.</_>\r\n                <_>\r\n                  16 4 2 9 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0218487493693829</threshold>\r\n            <left_val>0.0268086697906256</left_val>\r\n            <right_val>-0.2596569955348969</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 4 6 9 -1.</_>\r\n                <_>\r\n                  7 4 2 9 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0209309905767441</threshold>\r\n            <left_val>-0.3641955852508545</left_val>\r\n            <right_val>0.0437827892601490</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 5 2 2 -1.</_>\r\n                <_>\r\n                  17 5 1 1 2.</_>\r\n                <_>\r\n                  16 6 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.6019339673221111e-003</threshold>\r\n            <left_val>-0.0240206904709339</left_val>\r\n            <right_val>0.2182880043983460</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 15 12 -1.</_>\r\n                <_>\r\n                  0 4 15 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.5489655733108521</threshold>\r\n            <left_val>-0.5673372149467468</left_val>\r\n            <right_val>0.0286840796470642</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 1 11 3 -1.</_>\r\n                <_>\r\n                  8 2 11 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0151870902627707</threshold>\r\n            <left_val>-0.0816961303353310</left_val>\r\n            <right_val>0.2107073962688446</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 1 6 -1.</_>\r\n                <_>\r\n                  0 8 1 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.0653451103717089e-003</threshold>\r\n            <left_val>-0.3701387047767639</left_val>\r\n            <right_val>0.0471426397562027</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 5 1 3 -1.</_>\r\n                <_>\r\n                  14 6 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.2847671061754227e-003</threshold>\r\n            <left_val>0.1813296973705292</left_val>\r\n            <right_val>-0.0419041812419891</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 2 2 2 -1.</_>\r\n                <_>\r\n                  7 2 1 1 2.</_>\r\n                <_>\r\n                  8 3 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.3886080123484135e-003</threshold>\r\n            <left_val>-0.0477169714868069</left_val>\r\n            <right_val>0.3120515942573547</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 9 1 4 -1.</_>\r\n                <_>\r\n                  21 10 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-4.2354268953204155e-003</threshold>\r\n            <left_val>-0.3120726943016052</left_val>\r\n            <right_val>0.0365724302828312</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 5 5 3 -1.</_>\r\n                <_>\r\n                  10 6 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.9234707839787006e-003</threshold>\r\n            <left_val>-0.1105178967118263</left_val>\r\n            <right_val>0.1364745944738388</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 5 1 3 -1.</_>\r\n                <_>\r\n                  14 6 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.7824353724718094e-004</threshold>\r\n            <left_val>0.1019112989306450</left_val>\r\n            <right_val>-0.0396985597908497</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 2 2 -1.</_>\r\n                <_>\r\n                  0 1 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.3952899500727654e-003</threshold>\r\n            <left_val>0.0345855616033077</left_val>\r\n            <right_val>-0.4620797038078308</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 9 1 4 -1.</_>\r\n                <_>\r\n                  21 10 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-2.7391599360271357e-005</threshold>\r\n            <left_val>0.0470036789774895</left_val>\r\n            <right_val>-0.0576489008963108</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 9 4 1 -1.</_>\r\n                <_>\r\n                  4 10 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-3.7895010318607092e-003</threshold>\r\n            <left_val>-0.3904446959495544</left_val>\r\n            <right_val>0.0392708182334900</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 8 9 3 -1.</_>\r\n                <_>\r\n                  8 9 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0251507405191660</threshold>\r\n            <left_val>-0.0313480608165264</left_val>\r\n            <right_val>0.4742729067802429</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 8 21 3 -1.</_>\r\n                <_>\r\n                  9 9 7 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0545641481876373</threshold>\r\n            <left_val>0.1494560986757278</left_val>\r\n            <right_val>-0.0982013270258904</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 6 8 8 -1.</_>\r\n                <_>\r\n                  12 6 4 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0416621901094913</threshold>\r\n            <left_val>-0.4245094060897827</left_val>\r\n            <right_val>0.0152987902984023</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 3 6 12 -1.</_>\r\n                <_>\r\n                  9 3 2 12 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0207394007593393</threshold>\r\n            <left_val>-0.3218981921672821</left_val>\r\n            <right_val>0.0479229800403118</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 0 3 1 -1.</_>\r\n                <_>\r\n                  12 0 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.7902817651629448e-004</threshold>\r\n            <left_val>0.2330693006515503</left_val>\r\n            <right_val>-0.0597994215786457</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 10 4 4 -1.</_>\r\n                <_>\r\n                  11 10 2 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.1547799482941628e-003</threshold>\r\n            <left_val>-0.3040251135826111</left_val>\r\n            <right_val>0.0456931404769421</right_val></_></_>\r\n        <_>\r\n          <!-- tree 57 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 5 2 2 -1.</_>\r\n                <_>\r\n                  17 5 1 1 2.</_>\r\n                <_>\r\n                  16 6 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.6045470804092474e-005</threshold>\r\n            <left_val>0.0553880184888840</left_val>\r\n            <right_val>-0.0540977194905281</right_val></_></_>\r\n        <_>\r\n          <!-- tree 58 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 5 2 2 -1.</_>\r\n                <_>\r\n                  7 5 1 1 2.</_>\r\n                <_>\r\n                  8 6 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.0567409917712212e-003</threshold>\r\n            <left_val>-0.0526767596602440</left_val>\r\n            <right_val>0.2473292946815491</right_val></_></_>\r\n        <_>\r\n          <!-- tree 59 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 8 -1.</_>\r\n                <_>\r\n                  13 0 12 4 2.</_>\r\n                <_>\r\n                  1 4 12 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1842923015356064</threshold>\r\n            <left_val>0.0165581107139587</left_val>\r\n            <right_val>-0.5789644718170166</right_val></_></_>\r\n        <_>\r\n          <!-- tree 60 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 6 3 1 -1.</_>\r\n                <_>\r\n                  7 6 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.4177090488374233e-003</threshold>\r\n            <left_val>-0.0524071305990219</left_val>\r\n            <right_val>0.2524789869785309</right_val></_></_>\r\n        <_>\r\n          <!-- tree 61 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 12 4 3 -1.</_>\r\n                <_>\r\n                  21 13 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.0882350876927376e-003</threshold>\r\n            <left_val>-0.3066633939743042</left_val>\r\n            <right_val>0.0269502196460962</right_val></_></_>\r\n        <_>\r\n          <!-- tree 62 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 4 4 -1.</_>\r\n                <_>\r\n                  0 3 2 2 2.</_>\r\n                <_>\r\n                  2 5 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.5421912372112274e-003</threshold>\r\n            <left_val>-0.0481166206300259</left_val>\r\n            <right_val>0.2716326117515564</right_val></_></_>\r\n        <_>\r\n          <!-- tree 63 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 0 2 3 -1.</_>\r\n                <_>\r\n                  19 0 1 3 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0195690393447876</threshold>\r\n            <left_val>0.0251199807971716</left_val>\r\n            <right_val>-0.3371602892875671</right_val></_></_>\r\n        <_>\r\n          <!-- tree 64 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 2 15 6 -1.</_>\r\n                <_>\r\n                  2 5 15 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2677350938320160</threshold>\r\n            <left_val>0.0231193397194147</left_val>\r\n            <right_val>-0.5075724124908447</right_val></_></_>\r\n        <_>\r\n          <!-- tree 65 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 15 2 -1.</_>\r\n                <_>\r\n                  5 1 15 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0326806083321571</threshold>\r\n            <left_val>0.2773688137531281</left_val>\r\n            <right_val>-0.0481392890214920</right_val></_></_>\r\n        <_>\r\n          <!-- tree 66 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 2 4 -1.</_>\r\n                <_>\r\n                  0 1 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.0574508495628834e-003</threshold>\r\n            <left_val>-0.3639586865901947</left_val>\r\n            <right_val>0.0363070890307426</right_val></_></_>\r\n        <_>\r\n          <!-- tree 67 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 1 2 12 -1.</_>\r\n                <_>\r\n                  20 4 2 6 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0791702270507813</threshold>\r\n            <left_val>-0.0295530706644058</left_val>\r\n            <right_val>0.1632819026708603</right_val></_></_>\r\n        <_>\r\n          <!-- tree 68 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 2 2 3 -1.</_>\r\n                <_>\r\n                  4 3 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.2955629974603653e-003</threshold>\r\n            <left_val>-0.0644191280007362</left_val>\r\n            <right_val>0.1921634972095490</right_val></_></_>\r\n        <_>\r\n          <!-- tree 69 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 0 2 2 -1.</_>\r\n                <_>\r\n                  20 0 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>2.1744619880337268e-004</threshold>\r\n            <left_val>-0.1248127967119217</left_val>\r\n            <right_val>0.0513428300619125</right_val></_></_>\r\n        <_>\r\n          <!-- tree 70 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 12 4 3 -1.</_>\r\n                <_>\r\n                  0 13 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.9793200343847275e-003</threshold>\r\n            <left_val>-0.5400406122207642</left_val>\r\n            <right_val>0.0236572697758675</right_val></_></_>\r\n        <_>\r\n          <!-- tree 71 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 1 12 8 -1.</_>\r\n                <_>\r\n                  13 3 12 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.2183004021644592</threshold>\r\n            <left_val>-0.3002713024616242</left_val>\r\n            <right_val>0.0188296400010586</right_val></_></_>\r\n        <_>\r\n          <!-- tree 72 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 2 2 -1.</_>\r\n                <_>\r\n                  5 0 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-2.5782659649848938e-003</threshold>\r\n            <left_val>-0.2936800122261047</left_val>\r\n            <right_val>0.0437353104352951</right_val></_></_>\r\n        <_>\r\n          <!-- tree 73 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 2 14 12 -1.</_>\r\n                <_>\r\n                  11 8 14 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1344317942857742</threshold>\r\n            <left_val>-0.2982031106948853</left_val>\r\n            <right_val>0.0219516493380070</right_val></_></_>\r\n        <_>\r\n          <!-- tree 74 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 2 14 12 -1.</_>\r\n                <_>\r\n                  0 8 14 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.3329834043979645</threshold>\r\n            <left_val>0.0417996607720852</left_val>\r\n            <right_val>-0.3464672863483429</right_val></_></_>\r\n        <_>\r\n          <!-- tree 75 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 7 6 8 -1.</_>\r\n                <_>\r\n                  18 7 2 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0276046600192785</threshold>\r\n            <left_val>-0.3169625997543335</left_val>\r\n            <right_val>0.0150398099794984</right_val></_></_>\r\n        <_>\r\n          <!-- tree 76 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 0 13 2 -1.</_>\r\n                <_>\r\n                  7 0 13 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0284599401056767</threshold>\r\n            <left_val>0.0311327595263720</left_val>\r\n            <right_val>-0.4115855097770691</right_val></_></_>\r\n        <_>\r\n          <!-- tree 77 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 7 6 8 -1.</_>\r\n                <_>\r\n                  18 7 2 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0568751804530621</threshold>\r\n            <left_val>3.1998890917748213e-003</left_val>\r\n            <right_val>-0.8496329784393311</right_val></_></_>\r\n        <_>\r\n          <!-- tree 78 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 7 6 8 -1.</_>\r\n                <_>\r\n                  5 7 2 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0264140591025352</threshold>\r\n            <left_val>-0.4030340015888214</left_val>\r\n            <right_val>0.0285327993333340</right_val></_></_>\r\n        <_>\r\n          <!-- tree 79 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 7 2 2 -1.</_>\r\n                <_>\r\n                  18 7 1 1 2.</_>\r\n                <_>\r\n                  17 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.2670920528471470e-004</threshold>\r\n            <left_val>-0.0478886701166630</left_val>\r\n            <right_val>0.2083473950624466</right_val></_></_>\r\n        <_>\r\n          <!-- tree 80 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 5 3 6 -1.</_>\r\n                <_>\r\n                  13 6 1 6 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0174812003970146</threshold>\r\n            <left_val>-0.4784274101257324</left_val>\r\n            <right_val>0.0261973403394222</right_val></_></_>\r\n        <_>\r\n          <!-- tree 81 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 2 1 6 -1.</_>\r\n                <_>\r\n                  20 4 1 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0102093704044819</threshold>\r\n            <left_val>-0.0323491990566254</left_val>\r\n            <right_val>0.3333239853382111</right_val></_></_>\r\n        <_>\r\n          <!-- tree 82 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 2 2 2 -1.</_>\r\n                <_>\r\n                  7 2 1 1 2.</_>\r\n                <_>\r\n                  8 3 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.0442842338234186e-004</threshold>\r\n            <left_val>0.2252988964319229</left_val>\r\n            <right_val>-0.0502184815704823</right_val></_></_>\r\n        <_>\r\n          <!-- tree 83 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 10 2 1 -1.</_>\r\n                <_>\r\n                  19 10 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.5155509471660480e-005</threshold>\r\n            <left_val>0.0854163095355034</left_val>\r\n            <right_val>-0.0922556668519974</right_val></_></_>\r\n        <_>\r\n          <!-- tree 84 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 4 8 2 -1.</_>\r\n                <_>\r\n                  8 4 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.5864349491894245e-003</threshold>\r\n            <left_val>-0.2745333909988403</left_val>\r\n            <right_val>0.0428331792354584</right_val></_></_>\r\n        <_>\r\n          <!-- tree 85 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 5 16 7 -1.</_>\r\n                <_>\r\n                  13 5 8 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0689363330602646</threshold>\r\n            <left_val>-0.0362212397158146</left_val>\r\n            <right_val>0.2202139943838120</right_val></_></_>\r\n        <_>\r\n          <!-- tree 86 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 2 2 -1.</_>\r\n                <_>\r\n                  6 7 1 1 2.</_>\r\n                <_>\r\n                  7 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.0017789900302887e-003</threshold>\r\n            <left_val>-0.0464680194854736</left_val>\r\n            <right_val>0.2603206038475037</right_val></_></_>\r\n        <_>\r\n          <!-- tree 87 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 7 2 2 -1.</_>\r\n                <_>\r\n                  18 7 1 1 2.</_>\r\n                <_>\r\n                  17 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.5333900228142738e-003</threshold>\r\n            <left_val>0.2831267118453980</left_val>\r\n            <right_val>-0.0321949794888496</right_val></_></_>\r\n        <_>\r\n          <!-- tree 88 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 13 2 2 -1.</_>\r\n                <_>\r\n                  11 13 1 1 2.</_>\r\n                <_>\r\n                  12 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.0275481771677732e-004</threshold>\r\n            <left_val>0.0547226108610630</left_val>\r\n            <right_val>-0.2383649945259094</right_val></_></_>\r\n        <_>\r\n          <!-- tree 89 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 7 2 2 -1.</_>\r\n                <_>\r\n                  18 7 1 1 2.</_>\r\n                <_>\r\n                  17 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.7827408201992512e-005</threshold>\r\n            <left_val>-0.0391390211880207</left_val>\r\n            <right_val>0.0501381084322929</right_val></_></_>\r\n        <_>\r\n          <!-- tree 90 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 2 2 -1.</_>\r\n                <_>\r\n                  6 7 1 1 2.</_>\r\n                <_>\r\n                  7 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.6863682847470045e-004</threshold>\r\n            <left_val>0.2108709067106247</left_val>\r\n            <right_val>-0.0608406700193882</right_val></_></_>\r\n        <_>\r\n          <!-- tree 91 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 8 5 3 -1.</_>\r\n                <_>\r\n                  20 9 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0157267302274704</threshold>\r\n            <left_val>0.0115508204326034</left_val>\r\n            <right_val>-0.8977199196815491</right_val></_></_>\r\n        <_>\r\n          <!-- tree 92 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 13 2 2 -1.</_>\r\n                <_>\r\n                  11 13 1 1 2.</_>\r\n                <_>\r\n                  12 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.1983527848497033e-004</threshold>\r\n            <left_val>-0.2865422964096069</left_val>\r\n            <right_val>0.0380632318556309</right_val></_></_>\r\n        <_>\r\n          <!-- tree 93 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 11 15 4 -1.</_>\r\n                <_>\r\n                  5 12 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0148898903280497</threshold>\r\n            <left_val>0.2188885957002640</left_val>\r\n            <right_val>-0.0534253492951393</right_val></_></_>\r\n        <_>\r\n          <!-- tree 94 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 6 3 -1.</_>\r\n                <_>\r\n                  0 9 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.1423774138092995e-003</threshold>\r\n            <left_val>0.0289719104766846</left_val>\r\n            <right_val>-0.4331383109092712</right_val></_></_>\r\n        <_>\r\n          <!-- tree 95 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 10 2 1 -1.</_>\r\n                <_>\r\n                  19 10 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.4567110307980329e-005</threshold>\r\n            <left_val>-0.0493506006896496</left_val>\r\n            <right_val>0.0829902365803719</right_val></_></_>\r\n        <_>\r\n          <!-- tree 96 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 10 2 1 -1.</_>\r\n                <_>\r\n                  5 10 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.6295441279653460e-005</threshold>\r\n            <left_val>0.1145173981785774</left_val>\r\n            <right_val>-0.1154157966375351</right_val></_></_>\r\n        <_>\r\n          <!-- tree 97 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 6 -1.</_>\r\n                <_>\r\n                  13 0 12 3 2.</_>\r\n                <_>\r\n                  1 3 12 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0951543077826500</threshold>\r\n            <left_val>-0.3621807992458344</left_val>\r\n            <right_val>0.0389639586210251</right_val></_></_>\r\n        <_>\r\n          <!-- tree 98 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 2 5 -1.</_>\r\n                <_>\r\n                  5 1 1 5 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0114479204639792</threshold>\r\n            <left_val>-0.0633771494030952</left_val>\r\n            <right_val>0.1799890995025635</right_val></_></_>\r\n        <_>\r\n          <!-- tree 99 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 3 4 12 -1.</_>\r\n                <_>\r\n                  23 3 2 6 2.</_>\r\n                <_>\r\n                  21 9 2 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0168469492346048</threshold>\r\n            <left_val>-0.0795559063553810</left_val>\r\n            <right_val>0.2080432027578354</right_val></_></_>\r\n        <_>\r\n          <!-- tree 100 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 4 12 -1.</_>\r\n                <_>\r\n                  0 3 2 6 2.</_>\r\n                <_>\r\n                  2 9 2 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0195328295230865</threshold>\r\n            <left_val>0.3306660056114197</left_val>\r\n            <right_val>-0.0368879809975624</right_val></_></_>\r\n        <_>\r\n          <!-- tree 101 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 2 1 6 -1.</_>\r\n                <_>\r\n                  24 5 1 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.9951513111591339e-003</threshold>\r\n            <left_val>-0.2601873874664307</left_val>\r\n            <right_val>0.0200320500880480</right_val></_></_>\r\n        <_>\r\n          <!-- tree 102 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 9 8 -1.</_>\r\n                <_>\r\n                  8 2 3 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0559661500155926</threshold>\r\n            <left_val>0.0298731103539467</left_val>\r\n            <right_val>-0.3797968029975891</right_val></_></_>\r\n        <_>\r\n          <!-- tree 103 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 2 1 6 -1.</_>\r\n                <_>\r\n                  24 5 1 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0223989300429821</threshold>\r\n            <left_val>9.4442693516612053e-003</left_val>\r\n            <right_val>-0.3070712089538574</right_val></_></_>\r\n        <_>\r\n          <!-- tree 104 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 2 1 6 -1.</_>\r\n                <_>\r\n                  0 5 1 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0111306598410010</threshold>\r\n            <left_val>-0.4547461867332459</left_val>\r\n            <right_val>0.0237820893526077</right_val></_></_>\r\n        <_>\r\n          <!-- tree 105 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 6 9 4 -1.</_>\r\n                <_>\r\n                  9 7 9 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0103914495557547</threshold>\r\n            <left_val>-0.0801509991288185</left_val>\r\n            <right_val>0.1017400026321411</right_val></_></_>\r\n        <_>\r\n          <!-- tree 106 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 6 3 4 -1.</_>\r\n                <_>\r\n                  11 7 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.7076389938592911e-003</threshold>\r\n            <left_val>0.3220044970512390</left_val>\r\n            <right_val>-0.0475250408053398</right_val></_></_>\r\n        <_>\r\n          <!-- tree 107 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 14 2 1 -1.</_>\r\n                <_>\r\n                  20 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.9170529412804171e-005</threshold>\r\n            <left_val>-0.0619046017527580</left_val>\r\n            <right_val>0.0758714973926544</right_val></_></_>\r\n        <_>\r\n          <!-- tree 108 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 6 4 -1.</_>\r\n                <_>\r\n                  0 9 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.7660471647977829e-003</threshold>\r\n            <left_val>-0.2893261909484863</left_val>\r\n            <right_val>0.0357113592326641</right_val></_></_>\r\n        <_>\r\n          <!-- tree 109 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 0 2 2 -1.</_>\r\n                <_>\r\n                  17 0 1 1 2.</_>\r\n                <_>\r\n                  16 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.0189562868326902e-004</threshold>\r\n            <left_val>0.1487676948308945</left_val>\r\n            <right_val>-0.0337995104491711</right_val></_></_>\r\n        <_>\r\n          <!-- tree 110 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 0 9 15 -1.</_>\r\n                <_>\r\n                  11 5 3 5 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.4516898989677429</threshold>\r\n            <left_val>-0.5800644755363464</left_val>\r\n            <right_val>0.0182942803949118</right_val></_></_>\r\n        <_>\r\n          <!-- tree 111 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 9 4 6 -1.</_>\r\n                <_>\r\n                  14 9 2 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.1167000569403172e-003</threshold>\r\n            <left_val>0.0221952199935913</left_val>\r\n            <right_val>-0.4342006146907806</right_val></_></_>\r\n        <_>\r\n          <!-- tree 112 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 2 9 3 -1.</_>\r\n                <_>\r\n                  8 3 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0214324798434973</threshold>\r\n            <left_val>-0.0425198413431644</left_val>\r\n            <right_val>0.2711758911609650</right_val></_></_></trees>\r\n      <stage_threshold>-1.3937480449676514</stage_threshold>\r\n      <parent>12</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 14 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 8 6 -1.</_>\r\n                <_>\r\n                  0 9 4 3 2.</_>\r\n                <_>\r\n                  4 12 4 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.8465185835957527e-003</threshold>\r\n            <left_val>-0.2059727013111115</left_val>\r\n            <right_val>0.2158975005149841</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 1 5 4 -1.</_>\r\n                <_>\r\n                  20 3 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0114869000390172</threshold>\r\n            <left_val>0.1450283974409103</left_val>\r\n            <right_val>-0.2512278854846954</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 3 16 7 -1.</_>\r\n                <_>\r\n                  8 3 8 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0613779015839100</threshold>\r\n            <left_val>-0.1210888996720314</left_val>\r\n            <right_val>0.2893109023571014</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 0 10 8 -1.</_>\r\n                <_>\r\n                  15 2 10 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0514667406678200</threshold>\r\n            <left_val>0.0770430117845535</left_val>\r\n            <right_val>-0.1447598934173584</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 2 24 10 -1.</_>\r\n                <_>\r\n                  0 2 12 5 2.</_>\r\n                <_>\r\n                  12 7 12 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0990432873368263</threshold>\r\n            <left_val>0.0879464074969292</left_val>\r\n            <right_val>-0.3668490052223206</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 9 5 4 -1.</_>\r\n                <_>\r\n                  20 10 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.0240789316594601e-003</threshold>\r\n            <left_val>0.0559716187417507</left_val>\r\n            <right_val>-0.4230535030364990</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 14 22 1 -1.</_>\r\n                <_>\r\n                  11 14 11 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.3228947371244431e-003</threshold>\r\n            <left_val>-0.1488721966743469</left_val>\r\n            <right_val>0.1423504054546356</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 0 3 12 -1.</_>\r\n                <_>\r\n                  22 0 3 6 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0837828367948532</threshold>\r\n            <left_val>-0.0506230294704437</left_val>\r\n            <right_val>0.0671857669949532</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 2 2 -1.</_>\r\n                <_>\r\n                  1 4 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.4369570417329669e-003</threshold>\r\n            <left_val>0.1669974029064179</left_val>\r\n            <right_val>-0.1184794977307320</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 9 5 4 -1.</_>\r\n                <_>\r\n                  20 10 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.4923747926950455e-003</threshold>\r\n            <left_val>-0.5746508240699768</left_val>\r\n            <right_val>0.0469529181718826</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 5 4 -1.</_>\r\n                <_>\r\n                  0 10 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.1581619083881378e-003</threshold>\r\n            <left_val>0.0387838594615459</left_val>\r\n            <right_val>-0.4179377853870392</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 3 18 6 -1.</_>\r\n                <_>\r\n                  13 5 6 2 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.3882668018341065</threshold>\r\n            <left_val>-0.0341588892042637</left_val>\r\n            <right_val>0.3883490860462189</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 10 10 1 -1.</_>\r\n                <_>\r\n                  9 10 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.2880381010472775e-003</threshold>\r\n            <left_val>0.1877942979335785</left_val>\r\n            <right_val>-0.1096756979823113</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 1 4 10 -1.</_>\r\n                <_>\r\n                  21 1 2 10 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0886473506689072</threshold>\r\n            <left_val>0.2961074113845825</left_val>\r\n            <right_val>-0.0496502704918385</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 1 10 4 -1.</_>\r\n                <_>\r\n                  4 1 10 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0573849491775036</threshold>\r\n            <left_val>-0.0621429793536663</left_val>\r\n            <right_val>0.4039953947067261</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 8 4 7 -1.</_>\r\n                <_>\r\n                  17 8 2 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.3049891032278538e-003</threshold>\r\n            <left_val>0.0302408598363400</left_val>\r\n            <right_val>-0.2553277909755707</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 8 4 7 -1.</_>\r\n                <_>\r\n                  6 8 2 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0128176100552082</threshold>\r\n            <left_val>-0.7491502761840820</left_val>\r\n            <right_val>0.0188356805592775</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 13 2 -1.</_>\r\n                <_>\r\n                  6 1 13 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.5159690566360950e-003</threshold>\r\n            <left_val>-0.0749715119600296</left_val>\r\n            <right_val>0.1975888013839722</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 12 8 3 -1.</_>\r\n                <_>\r\n                  0 13 8 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.2992920652031898e-003</threshold>\r\n            <left_val>0.0329895503818989</left_val>\r\n            <right_val>-0.4346657097339630</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 0 2 1 -1.</_>\r\n                <_>\r\n                  22 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>6.3911718316376209e-003</threshold>\r\n            <left_val>0.0297571904957294</left_val>\r\n            <right_val>-0.3072845935821533</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 1 2 -1.</_>\r\n                <_>\r\n                  3 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>6.8949637352488935e-005</threshold>\r\n            <left_val>-0.1729405969381332</left_val>\r\n            <right_val>0.0927027910947800</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 3 8 8 -1.</_>\r\n                <_>\r\n                  21 3 4 4 2.</_>\r\n                <_>\r\n                  17 7 4 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0413548089563847</threshold>\r\n            <left_val>-0.0279047600924969</left_val>\r\n            <right_val>0.1629645973443985</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 2 13 6 -1.</_>\r\n                <_>\r\n                  6 4 13 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1899937987327576</threshold>\r\n            <left_val>-0.0312954708933830</left_val>\r\n            <right_val>0.4835174977779388</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 0 15 14 -1.</_>\r\n                <_>\r\n                  10 7 15 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1273290067911148</threshold>\r\n            <left_val>-0.4309565126895905</left_val>\r\n            <right_val>0.0414485186338425</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 1 12 1 -1.</_>\r\n                <_>\r\n                  1 1 6 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0356059707701206</threshold>\r\n            <left_val>-0.2009662985801697</left_val>\r\n            <right_val>0.0775555819272995</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 3 4 2 -1.</_>\r\n                <_>\r\n                  18 4 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.2760661132633686e-003</threshold>\r\n            <left_val>0.1169442981481552</left_val>\r\n            <right_val>-0.0564889013767242</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 11 6 4 -1.</_>\r\n                <_>\r\n                  9 11 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0167282801121473</threshold>\r\n            <left_val>-0.5582438707351685</left_val>\r\n            <right_val>0.0246787108480930</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 4 5 6 -1.</_>\r\n                <_>\r\n                  20 6 5 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.5163350403308868e-003</threshold>\r\n            <left_val>-0.1312393993139267</left_val>\r\n            <right_val>0.0638676136732101</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 12 5 3 -1.</_>\r\n                <_>\r\n                  1 13 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.7709469906985760e-003</threshold>\r\n            <left_val>-0.3320902884006500</left_val>\r\n            <right_val>0.0413776598870754</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 2 -1.</_>\r\n                <_>\r\n                  13 0 12 1 2.</_>\r\n                <_>\r\n                  1 1 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0138869602233171</threshold>\r\n            <left_val>-0.3127424120903015</left_val>\r\n            <right_val>0.0425702482461929</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 3 5 3 -1.</_>\r\n                <_>\r\n                  2 4 5 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>9.3537326902151108e-003</threshold>\r\n            <left_val>-0.0667856708168983</left_val>\r\n            <right_val>0.1907455027103424</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 6 8 4 -1.</_>\r\n                <_>\r\n                  19 6 4 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0194346699863672</threshold>\r\n            <left_val>0.3152694106101990</left_val>\r\n            <right_val>-0.0473581515252590</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 1 3 -1.</_>\r\n                <_>\r\n                  4 1 1 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>6.2511018477380276e-003</threshold>\r\n            <left_val>0.0309588797390461</left_val>\r\n            <right_val>-0.3830946981906891</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 0 2 4 -1.</_>\r\n                <_>\r\n                  23 2 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0252969004213810</threshold>\r\n            <left_val>-0.2962245941162109</left_val>\r\n            <right_val>0.0151915997266769</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 3 6 -1.</_>\r\n                <_>\r\n                  0 3 3 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.0754129402339458e-003</threshold>\r\n            <left_val>0.0729133188724518</left_val>\r\n            <right_val>-0.1764045059680939</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 1 14 2 -1.</_>\r\n                <_>\r\n                  18 1 7 1 2.</_>\r\n                <_>\r\n                  11 2 7 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.8001008369028568e-003</threshold>\r\n            <left_val>-0.0501575507223606</left_val>\r\n            <right_val>0.1162889003753662</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 14 2 -1.</_>\r\n                <_>\r\n                  0 1 7 1 2.</_>\r\n                <_>\r\n                  7 2 7 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.7680540271103382e-003</threshold>\r\n            <left_val>0.2415755987167358</left_val>\r\n            <right_val>-0.0778944417834282</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 4 15 6 -1.</_>\r\n                <_>\r\n                  5 6 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0880923122167587</threshold>\r\n            <left_val>0.2515082955360413</left_val>\r\n            <right_val>-0.0482993088662624</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 7 2 2 -1.</_>\r\n                <_>\r\n                  10 8 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.7023129621520638e-003</threshold>\r\n            <left_val>0.1797576993703842</left_val>\r\n            <right_val>-0.0970716699957848</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 2 8 5 -1.</_>\r\n                <_>\r\n                  15 4 4 5 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0997034236788750</threshold>\r\n            <left_val>-0.4700092971324921</left_val>\r\n            <right_val>0.0155829498544335</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 9 2 2 -1.</_>\r\n                <_>\r\n                  2 9 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>4.6657170169055462e-003</threshold>\r\n            <left_val>0.0295135807245970</left_val>\r\n            <right_val>-0.4018146991729736</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 8 6 3 -1.</_>\r\n                <_>\r\n                  14 8 2 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0176613796502352</threshold>\r\n            <left_val>-0.5449513792991638</left_val>\r\n            <right_val>0.0168585199862719</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 24 6 -1.</_>\r\n                <_>\r\n                  8 11 8 2 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.2230933010578156</threshold>\r\n            <left_val>0.1843273043632507</left_val>\r\n            <right_val>-0.0632233396172524</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 12 24 3 -1.</_>\r\n                <_>\r\n                  9 13 8 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0528507791459560</threshold>\r\n            <left_val>-0.0734771713614464</left_val>\r\n            <right_val>0.1994421929121018</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 11 15 4 -1.</_>\r\n                <_>\r\n                  5 13 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0246656592935324</threshold>\r\n            <left_val>0.2699545025825501</left_val>\r\n            <right_val>-0.0523515492677689</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 10 1 4 -1.</_>\r\n                <_>\r\n                  23 11 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-4.9799769185483456e-003</threshold>\r\n            <left_val>-0.4495851993560791</left_val>\r\n            <right_val>0.0269833803176880</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 10 4 1 -1.</_>\r\n                <_>\r\n                  2 11 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>3.0535869300365448e-003</threshold>\r\n            <left_val>0.0375075116753578</left_val>\r\n            <right_val>-0.3464896082878113</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 1 10 14 -1.</_>\r\n                <_>\r\n                  15 8 10 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0263100396841764</threshold>\r\n            <left_val>-0.1766241043806076</left_val>\r\n            <right_val>0.0256136003881693</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 4 2 -1.</_>\r\n                <_>\r\n                  2 7 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.8684021458029747e-003</threshold>\r\n            <left_val>0.1877097040414810</left_val>\r\n            <right_val>-0.0605575516819954</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 4 5 6 -1.</_>\r\n                <_>\r\n                  20 6 5 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0458405800163746</threshold>\r\n            <left_val>0.0330421291291714</left_val>\r\n            <right_val>-0.2026686072349548</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 7 6 -1.</_>\r\n                <_>\r\n                  0 6 7 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.7487969063222408e-003</threshold>\r\n            <left_val>-0.1384654939174652</left_val>\r\n            <right_val>0.1144922971725464</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 7 6 3 -1.</_>\r\n                <_>\r\n                  11 8 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0107938302680850</threshold>\r\n            <left_val>-0.0550474487245083</left_val>\r\n            <right_val>0.1810662001371384</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 10 9 1 -1.</_>\r\n                <_>\r\n                  11 10 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0132016502320766</threshold>\r\n            <left_val>-0.4654887914657593</left_val>\r\n            <right_val>0.0258085392415524</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 10 15 1 -1.</_>\r\n                <_>\r\n                  10 10 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.9963342025876045e-003</threshold>\r\n            <left_val>0.1138966009020805</left_val>\r\n            <right_val>-0.1140139997005463</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 8 6 3 -1.</_>\r\n                <_>\r\n                  9 8 2 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0158193595707417</threshold>\r\n            <left_val>-0.4853562116622925</left_val>\r\n            <right_val>0.0220876205712557</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 12 2 1 -1.</_>\r\n                <_>\r\n                  23 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.8264620495028794e-005</threshold>\r\n            <left_val>-0.0819193720817566</left_val>\r\n            <right_val>0.0840993970632553</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 13 24 2 -1.</_>\r\n                <_>\r\n                  0 13 12 1 2.</_>\r\n                <_>\r\n                  12 14 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0156373791396618</threshold>\r\n            <left_val>-0.4515635073184967</left_val>\r\n            <right_val>0.0227358005940914</right_val></_></_>\r\n        <_>\r\n          <!-- tree 57 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 9 7 3 -1.</_>\r\n                <_>\r\n                  9 10 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.3005577325820923e-003</threshold>\r\n            <left_val>-0.0514142103493214</left_val>\r\n            <right_val>0.2212347984313965</right_val></_></_>\r\n        <_>\r\n          <!-- tree 58 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 2 4 -1.</_>\r\n                <_>\r\n                  0 7 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.6999751143157482e-003</threshold>\r\n            <left_val>0.0297896005213261</left_val>\r\n            <right_val>-0.3543488979339600</right_val></_></_>\r\n        <_>\r\n          <!-- tree 59 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 2 5 4 -1.</_>\r\n                <_>\r\n                  18 3 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.1744161173701286e-003</threshold>\r\n            <left_val>-0.0496886894106865</left_val>\r\n            <right_val>0.2202914059162140</right_val></_></_>\r\n        <_>\r\n          <!-- tree 60 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 4 8 2 -1.</_>\r\n                <_>\r\n                  1 4 4 1 2.</_>\r\n                <_>\r\n                  5 5 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.1278040520846844e-003</threshold>\r\n            <left_val>-0.0630758926272392</left_val>\r\n            <right_val>0.1783366054296494</right_val></_></_>\r\n        <_>\r\n          <!-- tree 61 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 8 4 4 -1.</_>\r\n                <_>\r\n                  21 9 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.8791587837040424e-003</threshold>\r\n            <left_val>0.0284415297210217</left_val>\r\n            <right_val>-0.2993854880332947</right_val></_></_>\r\n        <_>\r\n          <!-- tree 62 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 4 8 4 -1.</_>\r\n                <_>\r\n                  4 5 8 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0217361003160477</threshold>\r\n            <left_val>0.1791318953037262</left_val>\r\n            <right_val>-0.0602877512574196</right_val></_></_>\r\n        <_>\r\n          <!-- tree 63 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 4 14 4 -1.</_>\r\n                <_>\r\n                  11 5 14 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0140090202912688</threshold>\r\n            <left_val>-0.1060196980834007</left_val>\r\n            <right_val>0.1548174023628235</right_val></_></_>\r\n        <_>\r\n          <!-- tree 64 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 18 9 -1.</_>\r\n                <_>\r\n                  12 0 9 9 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2186813950538635</threshold>\r\n            <left_val>-0.0483517609536648</left_val>\r\n            <right_val>0.2573468983173370</right_val></_></_>\r\n        <_>\r\n          <!-- tree 65 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 20 15 -1.</_>\r\n                <_>\r\n                  3 0 10 15 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2838009893894196</threshold>\r\n            <left_val>-0.0509055890142918</left_val>\r\n            <right_val>0.2936053872108460</right_val></_></_>\r\n        <_>\r\n          <!-- tree 66 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 1 6 8 -1.</_>\r\n                <_>\r\n                  14 3 2 8 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.1209316030144692</threshold>\r\n            <left_val>0.0173095706850290</left_val>\r\n            <right_val>-0.6926872134208679</right_val></_></_>\r\n        <_>\r\n          <!-- tree 67 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 4 1 9 -1.</_>\r\n                <_>\r\n                  14 7 1 3 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0569618307054043</threshold>\r\n            <left_val>-0.0186788197606802</left_val>\r\n            <right_val>0.3227567970752716</right_val></_></_>\r\n        <_>\r\n          <!-- tree 68 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 4 8 -1.</_>\r\n                <_>\r\n                  7 7 2 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.0500963851809502e-003</threshold>\r\n            <left_val>-0.4240661859512329</left_val>\r\n            <right_val>0.0268415194004774</right_val></_></_>\r\n        <_>\r\n          <!-- tree 69 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 5 4 3 -1.</_>\r\n                <_>\r\n                  21 6 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0231182798743248</threshold>\r\n            <left_val>0.0105462800711393</left_val>\r\n            <right_val>-0.5228689908981323</right_val></_></_>\r\n        <_>\r\n          <!-- tree 70 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 0 2 2 -1.</_>\r\n                <_>\r\n                  7 0 1 1 2.</_>\r\n                <_>\r\n                  8 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.1480690445750952e-003</threshold>\r\n            <left_val>-0.0459857396781445</left_val>\r\n            <right_val>0.2319914996623993</right_val></_></_>\r\n        <_>\r\n          <!-- tree 71 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 8 4 3 -1.</_>\r\n                <_>\r\n                  21 9 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.8909307271242142e-003</threshold>\r\n            <left_val>-0.5407552123069763</left_val>\r\n            <right_val>0.0142617002129555</right_val></_></_>\r\n        <_>\r\n          <!-- tree 72 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 1 2 2 -1.</_>\r\n                <_>\r\n                  7 1 1 1 2.</_>\r\n                <_>\r\n                  8 2 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.0599978789687157e-004</threshold>\r\n            <left_val>-0.0649549588561058</left_val>\r\n            <right_val>0.1677557975053787</right_val></_></_>\r\n        <_>\r\n          <!-- tree 73 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 1 2 2 -1.</_>\r\n                <_>\r\n                  17 1 1 1 2.</_>\r\n                <_>\r\n                  16 2 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.2311293226666749e-005</threshold>\r\n            <left_val>0.0727679133415222</left_val>\r\n            <right_val>-0.0542482398450375</right_val></_></_>\r\n        <_>\r\n          <!-- tree 74 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 4 3 -1.</_>\r\n                <_>\r\n                  0 9 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3380471654236317e-003</threshold>\r\n            <left_val>0.0320924408733845</left_val>\r\n            <right_val>-0.3186857998371124</right_val></_></_>\r\n        <_>\r\n          <!-- tree 75 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 9 2 2 -1.</_>\r\n                <_>\r\n                  21 9 1 1 2.</_>\r\n                <_>\r\n                  20 10 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.9835889260284603e-005</threshold>\r\n            <left_val>-0.0492977797985077</left_val>\r\n            <right_val>0.0571143105626106</right_val></_></_>\r\n        <_>\r\n          <!-- tree 76 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 9 2 2 -1.</_>\r\n                <_>\r\n                  3 9 1 1 2.</_>\r\n                <_>\r\n                  4 10 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.0741640987107530e-005</threshold>\r\n            <left_val>-0.0992263928055763</left_val>\r\n            <right_val>0.1105673015117645</right_val></_></_>\r\n        <_>\r\n          <!-- tree 77 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 3 6 12 -1.</_>\r\n                <_>\r\n                  22 3 3 6 2.</_>\r\n                <_>\r\n                  19 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0271146595478058</threshold>\r\n            <left_val>0.2459900975227356</left_val>\r\n            <right_val>-0.0621489509940147</right_val></_></_>\r\n        <_>\r\n          <!-- tree 78 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 1 2 2 -1.</_>\r\n                <_>\r\n                  7 1 1 1 2.</_>\r\n                <_>\r\n                  8 2 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.8477227836847305e-004</threshold>\r\n            <left_val>0.2023449987173080</left_val>\r\n            <right_val>-0.0529261194169521</right_val></_></_>\r\n        <_>\r\n          <!-- tree 79 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 4 12 3 -1.</_>\r\n                <_>\r\n                  7 5 12 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0192636791616678</threshold>\r\n            <left_val>0.1516259014606476</left_val>\r\n            <right_val>-0.0715369805693626</right_val></_></_>\r\n        <_>\r\n          <!-- tree 80 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 11 2 -1.</_>\r\n                <_>\r\n                  0 1 11 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.6891522407531738e-003</threshold>\r\n            <left_val>0.0357108712196350</left_val>\r\n            <right_val>-0.3255082964897156</right_val></_></_>\r\n        <_>\r\n          <!-- tree 81 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 2 6 5 -1.</_>\r\n                <_>\r\n                  15 2 2 5 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0228419005870819</threshold>\r\n            <left_val>-0.3499914109706879</left_val>\r\n            <right_val>0.0171892996877432</right_val></_></_>\r\n        <_>\r\n          <!-- tree 82 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 10 -1.</_>\r\n                <_>\r\n                  0 0 12 5 2.</_>\r\n                <_>\r\n                  12 5 12 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1477797031402588</threshold>\r\n            <left_val>-0.4319078028202057</left_val>\r\n            <right_val>0.0216299500316381</right_val></_></_>\r\n        <_>\r\n          <!-- tree 83 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 4 2 3 -1.</_>\r\n                <_>\r\n                  20 5 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.3399880155920982e-003</threshold>\r\n            <left_val>-0.0442668199539185</left_val>\r\n            <right_val>0.0963377729058266</right_val></_></_>\r\n        <_>\r\n          <!-- tree 84 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 7 4 -1.</_>\r\n                <_>\r\n                  0 4 7 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0728321895003319</threshold>\r\n            <left_val>-0.8186188936233521</left_val>\r\n            <right_val>0.0117990002036095</right_val></_></_>\r\n        <_>\r\n          <!-- tree 85 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 1 14 14 -1.</_>\r\n                <_>\r\n                  11 8 14 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.3072721064090729</threshold>\r\n            <left_val>-0.7007309198379517</left_val>\r\n            <right_val>3.5564110148698092e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 86 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 2 6 5 -1.</_>\r\n                <_>\r\n                  8 2 2 5 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0207666493952274</threshold>\r\n            <left_val>-0.3913905024528503</left_val>\r\n            <right_val>0.0246222894638777</right_val></_></_>\r\n        <_>\r\n          <!-- tree 87 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 0 2 2 -1.</_>\r\n                <_>\r\n                  17 0 1 1 2.</_>\r\n                <_>\r\n                  16 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.6341920495033264e-003</threshold>\r\n            <left_val>-0.4501088857650757</left_val>\r\n            <right_val>5.5562350898981094e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 88 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 0 2 2 -1.</_>\r\n                <_>\r\n                  7 0 1 1 2.</_>\r\n                <_>\r\n                  8 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.0794070779811591e-005</threshold>\r\n            <left_val>0.1087834984064102</left_val>\r\n            <right_val>-0.0905004590749741</right_val></_></_>\r\n        <_>\r\n          <!-- tree 89 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 0 2 2 -1.</_>\r\n                <_>\r\n                  17 0 1 1 2.</_>\r\n                <_>\r\n                  16 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.8314860477112234e-005</threshold>\r\n            <left_val>0.0641764104366302</left_val>\r\n            <right_val>-0.0494646318256855</right_val></_></_>\r\n        <_>\r\n          <!-- tree 90 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 20 1 -1.</_>\r\n                <_>\r\n                  7 0 10 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0110706500709057</threshold>\r\n            <left_val>0.1473083049058914</left_val>\r\n            <right_val>-0.0670493170619011</right_val></_></_>\r\n        <_>\r\n          <!-- tree 91 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 0 14 1 -1.</_>\r\n                <_>\r\n                  11 0 7 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.3626351766288280e-003</threshold>\r\n            <left_val>-0.0400333292782307</left_val>\r\n            <right_val>0.0926633775234222</right_val></_></_>\r\n        <_>\r\n          <!-- tree 92 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 3 6 2 -1.</_>\r\n                <_>\r\n                  9 4 6 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.7499519102275372e-003</threshold>\r\n            <left_val>0.1392461061477661</left_val>\r\n            <right_val>-0.0774780735373497</right_val></_></_>\r\n        <_>\r\n          <!-- tree 93 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 3 3 4 -1.</_>\r\n                <_>\r\n                  11 4 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.7532729804515839e-003</threshold>\r\n            <left_val>-0.0729171708226204</left_val>\r\n            <right_val>0.1706562042236328</right_val></_></_>\r\n        <_>\r\n          <!-- tree 94 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 18 3 -1.</_>\r\n                <_>\r\n                  6 12 6 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0168079808354378</threshold>\r\n            <left_val>0.1308007985353470</left_val>\r\n            <right_val>-0.0801806673407555</right_val></_></_>\r\n        <_>\r\n          <!-- tree 95 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 3 10 12 -1.</_>\r\n                <_>\r\n                  20 3 5 6 2.</_>\r\n                <_>\r\n                  15 9 5 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1279494017362595</threshold>\r\n            <left_val>-0.0199226494878531</left_val>\r\n            <right_val>0.3711799085140228</right_val></_></_>\r\n        <_>\r\n          <!-- tree 96 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 14 3 -1.</_>\r\n                <_>\r\n                  0 4 14 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0181895997375250</threshold>\r\n            <left_val>0.1235873028635979</left_val>\r\n            <right_val>-0.0830406174063683</right_val></_></_>\r\n        <_>\r\n          <!-- tree 97 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 4 8 3 -1.</_>\r\n                <_>\r\n                  11 4 4 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0161725897341967</threshold>\r\n            <left_val>-0.4490650892257690</left_val>\r\n            <right_val>0.0227566491812468</right_val></_></_>\r\n        <_>\r\n          <!-- tree 98 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 12 2 1 -1.</_>\r\n                <_>\r\n                  1 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.8046152591705322e-005</threshold>\r\n            <left_val>-0.1011824011802673</left_val>\r\n            <right_val>0.0935735777020454</right_val></_></_>\r\n        <_>\r\n          <!-- tree 99 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 13 2 2 -1.</_>\r\n                <_>\r\n                  24 13 1 1 2.</_>\r\n                <_>\r\n                  23 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.1714019638020545e-004</threshold>\r\n            <left_val>-0.0810816064476967</left_val>\r\n            <right_val>0.1062628999352455</right_val></_></_>\r\n        <_>\r\n          <!-- tree 100 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 13 2 2 -1.</_>\r\n                <_>\r\n                  0 13 1 1 2.</_>\r\n                <_>\r\n                  1 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.4521678976016119e-005</threshold>\r\n            <left_val>-0.0932891815900803</left_val>\r\n            <right_val>0.1159989982843399</right_val></_></_>\r\n        <_>\r\n          <!-- tree 101 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 12 8 1 -1.</_>\r\n                <_>\r\n                  11 12 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.5095802098512650e-003</threshold>\r\n            <left_val>-0.5051903724670410</left_val>\r\n            <right_val>0.0141592798754573</right_val></_></_>\r\n        <_>\r\n          <!-- tree 102 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 6 4 -1.</_>\r\n                <_>\r\n                  0 8 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.8461390174925327e-003</threshold>\r\n            <left_val>-0.1991575956344605</left_val>\r\n            <right_val>0.0473652109503746</right_val></_></_>\r\n        <_>\r\n          <!-- tree 103 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 3 6 12 -1.</_>\r\n                <_>\r\n                  22 3 3 6 2.</_>\r\n                <_>\r\n                  19 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0232862401753664</threshold>\r\n            <left_val>-0.0403292290866375</left_val>\r\n            <right_val>0.0805157274007797</right_val></_></_>\r\n        <_>\r\n          <!-- tree 104 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 6 12 -1.</_>\r\n                <_>\r\n                  0 3 3 6 2.</_>\r\n                <_>\r\n                  3 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0426056496798992</threshold>\r\n            <left_val>0.3344807922840118</left_val>\r\n            <right_val>-0.0383727103471756</right_val></_></_>\r\n        <_>\r\n          <!-- tree 105 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 7 2 4 -1.</_>\r\n                <_>\r\n                  23 8 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.5101181603968143e-003</threshold>\r\n            <left_val>0.0263549294322729</left_val>\r\n            <right_val>-0.2349215000867844</right_val></_></_>\r\n        <_>\r\n          <!-- tree 106 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 2 4 -1.</_>\r\n                <_>\r\n                  0 8 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.1817811802029610e-003</threshold>\r\n            <left_val>0.0211725104600191</left_val>\r\n            <right_val>-0.4420514106750488</right_val></_></_>\r\n        <_>\r\n          <!-- tree 107 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 7 8 4 -1.</_>\r\n                <_>\r\n                  17 7 4 2 2.</_>\r\n                <_>\r\n                  13 9 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0106069697067142</threshold>\r\n            <left_val>0.0654574930667877</left_val>\r\n            <right_val>-0.0324725992977619</right_val></_></_>\r\n        <_>\r\n          <!-- tree 108 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 10 14 -1.</_>\r\n                <_>\r\n                  0 8 10 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0858135819435120</threshold>\r\n            <left_val>-0.3406231105327606</left_val>\r\n            <right_val>0.0301514994353056</right_val></_></_>\r\n        <_>\r\n          <!-- tree 109 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 8 7 3 -1.</_>\r\n                <_>\r\n                  9 9 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.2758061103522778e-003</threshold>\r\n            <left_val>-0.0619911886751652</left_val>\r\n            <right_val>0.1503033936023712</right_val></_></_>\r\n        <_>\r\n          <!-- tree 110 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 8 3 4 -1.</_>\r\n                <_>\r\n                  9 9 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.0965260230004787e-003</threshold>\r\n            <left_val>0.1481299996376038</left_val>\r\n            <right_val>-0.0813362672924995</right_val></_></_>\r\n        <_>\r\n          <!-- tree 111 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 10 2 3 -1.</_>\r\n                <_>\r\n                  17 11 2 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0111239803954959</threshold>\r\n            <left_val>-0.4638158082962036</left_val>\r\n            <right_val>0.0152134699746966</right_val></_></_>\r\n        <_>\r\n          <!-- tree 112 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 10 3 2 -1.</_>\r\n                <_>\r\n                  8 11 1 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0111039802432060</threshold>\r\n            <left_val>-0.6005380153656006</left_val>\r\n            <right_val>0.0135854296386242</right_val></_></_>\r\n        <_>\r\n          <!-- tree 113 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 0 2 1 -1.</_>\r\n                <_>\r\n                  23 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-3.2944830600172281e-003</threshold>\r\n            <left_val>-0.4641366004943848</left_val>\r\n            <right_val>0.0262269694358110</right_val></_></_>\r\n        <_>\r\n          <!-- tree 114 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 8 4 3 -1.</_>\r\n                <_>\r\n                  12 8 2 3 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0113766100257635</threshold>\r\n            <left_val>-0.0565435998141766</left_val>\r\n            <right_val>0.1575082987546921</right_val></_></_>\r\n        <_>\r\n          <!-- tree 115 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 7 15 3 -1.</_>\r\n                <_>\r\n                  10 8 5 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0294652003794909</threshold>\r\n            <left_val>0.1486423015594482</left_val>\r\n            <right_val>-0.0651882514357567</right_val></_></_>\r\n        <_>\r\n          <!-- tree 116 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 20 8 -1.</_>\r\n                <_>\r\n                  10 0 10 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0491673015058041</threshold>\r\n            <left_val>-0.0922251716256142</left_val>\r\n            <right_val>0.1015425994992256</right_val></_></_>\r\n        <_>\r\n          <!-- tree 117 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 0 4 3 -1.</_>\r\n                <_>\r\n                  20 1 4 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0209590997546911</threshold>\r\n            <left_val>0.1749638020992279</left_val>\r\n            <right_val>-0.0255501996725798</right_val></_></_>\r\n        <_>\r\n          <!-- tree 118 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 3 4 -1.</_>\r\n                <_>\r\n                  5 1 1 4 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.4627470672130585e-003</threshold>\r\n            <left_val>-0.0626592189073563</left_val>\r\n            <right_val>0.1695216000080109</right_val></_></_>\r\n        <_>\r\n          <!-- tree 119 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 3 5 2 -1.</_>\r\n                <_>\r\n                  18 4 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.3515427969396114e-003</threshold>\r\n            <left_val>0.0822615697979927</left_val>\r\n            <right_val>-0.0598390214145184</right_val></_></_>\r\n        <_>\r\n          <!-- tree 120 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 3 5 2 -1.</_>\r\n                <_>\r\n                  2 4 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.4772499501705170e-003</threshold>\r\n            <left_val>-0.0495455190539360</left_val>\r\n            <right_val>0.2469687014818192</right_val></_></_>\r\n        <_>\r\n          <!-- tree 121 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 0 2 5 -1.</_>\r\n                <_>\r\n                  13 0 1 5 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0374278612434864</threshold>\r\n            <left_val>-0.9178332090377808</left_val>\r\n            <right_val>3.5620180424302816e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 122 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 12 6 3 -1.</_>\r\n                <_>\r\n                  7 13 2 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0248439908027649</threshold>\r\n            <left_val>-0.4893918037414551</left_val>\r\n            <right_val>0.0171825792640448</right_val></_></_>\r\n        <_>\r\n          <!-- tree 123 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 0 2 5 -1.</_>\r\n                <_>\r\n                  13 0 1 5 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>8.0120442435145378e-003</threshold>\r\n            <left_val>0.0217423699796200</left_val>\r\n            <right_val>-0.0648176670074463</right_val></_></_>\r\n        <_>\r\n          <!-- tree 124 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 6 4 2 -1.</_>\r\n                <_>\r\n                  9 7 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.7306028902530670e-003</threshold>\r\n            <left_val>-0.0707883909344673</left_val>\r\n            <right_val>0.1390995979309082</right_val></_></_>\r\n        <_>\r\n          <!-- tree 125 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 9 4 3 -1.</_>\r\n                <_>\r\n                  18 10 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0109893204644322</threshold>\r\n            <left_val>7.0361187681555748e-003</left_val>\r\n            <right_val>-0.3556833863258362</right_val></_></_>\r\n        <_>\r\n          <!-- tree 126 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 9 4 3 -1.</_>\r\n                <_>\r\n                  3 10 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.5342550836503506e-003</threshold>\r\n            <left_val>-0.2303902953863144</left_val>\r\n            <right_val>0.0395394414663315</right_val></_></_>\r\n        <_>\r\n          <!-- tree 127 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 9 15 6 -1.</_>\r\n                <_>\r\n                  7 12 15 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0326121784746647</threshold>\r\n            <left_val>-0.0834509506821632</left_val>\r\n            <right_val>0.0961622893810272</right_val></_></_>\r\n        <_>\r\n          <!-- tree 128 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 1 12 6 -1.</_>\r\n                <_>\r\n                  4 1 6 3 2.</_>\r\n                <_>\r\n                  10 4 6 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0519190989434719</threshold>\r\n            <left_val>-0.3597438931465149</left_val>\r\n            <right_val>0.0235583093017340</right_val></_></_>\r\n        <_>\r\n          <!-- tree 129 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 5 14 10 -1.</_>\r\n                <_>\r\n                  10 10 14 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2802706062793732</threshold>\r\n            <left_val>0.0191025994718075</left_val>\r\n            <right_val>-0.2738722860813141</right_val></_></_>\r\n        <_>\r\n          <!-- tree 130 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 6 2 3 -1.</_>\r\n                <_>\r\n                  10 7 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.8680640496313572e-003</threshold>\r\n            <left_val>0.1557087004184723</left_val>\r\n            <right_val>-0.0592420399188995</right_val></_></_>\r\n        <_>\r\n          <!-- tree 131 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 4 4 6 -1.</_>\r\n                <_>\r\n                  14 5 2 6 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0412711799144745</threshold>\r\n            <left_val>9.2102894559502602e-003</left_val>\r\n            <right_val>-0.6225361824035645</right_val></_></_>\r\n        <_>\r\n          <!-- tree 132 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 4 6 4 -1.</_>\r\n                <_>\r\n                  11 5 6 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0341574586927891</threshold>\r\n            <left_val>-0.6910676956176758</left_val>\r\n            <right_val>0.0140588199719787</right_val></_></_>\r\n        <_>\r\n          <!-- tree 133 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 0 5 3 -1.</_>\r\n                <_>\r\n                  19 1 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0281112492084503</threshold>\r\n            <left_val>6.3892039470374584e-003</left_val>\r\n            <right_val>-0.6016489267349243</right_val></_></_>\r\n        <_>\r\n          <!-- tree 134 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 3 1 -1.</_>\r\n                <_>\r\n                  7 7 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.7675784491002560e-004</threshold>\r\n            <left_val>0.1663821935653687</left_val>\r\n            <right_val>-0.0533109381794930</right_val></_></_>\r\n        <_>\r\n          <!-- tree 135 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 0 5 3 -1.</_>\r\n                <_>\r\n                  19 1 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0284041091799736</threshold>\r\n            <left_val>-0.8431190848350525</left_val>\r\n            <right_val>4.9202498048543930e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 136 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 3 1 -1.</_>\r\n                <_>\r\n                  7 7 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.7658135928213596e-004</threshold>\r\n            <left_val>-0.0524366609752178</left_val>\r\n            <right_val>0.1696853935718536</right_val></_></_>\r\n        <_>\r\n          <!-- tree 137 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 0 6 15 -1.</_>\r\n                <_>\r\n                  13 0 2 15 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0793864428997040</threshold>\r\n            <left_val>-0.7418122291564941</left_val>\r\n            <right_val>4.5842900872230530e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 138 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 2 2 6 -1.</_>\r\n                <_>\r\n                  0 2 1 3 2.</_>\r\n                <_>\r\n                  1 5 1 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.9205000028014183e-003</threshold>\r\n            <left_val>-0.0499707907438278</left_val>\r\n            <right_val>0.1705241948366165</right_val></_></_>\r\n        <_>\r\n          <!-- tree 139 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 0 2 1 -1.</_>\r\n                <_>\r\n                  21 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-4.9792099744081497e-003</threshold>\r\n            <left_val>-0.4247047007083893</left_val>\r\n            <right_val>0.0113332699984312</right_val></_></_>\r\n        <_>\r\n          <!-- tree 140 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 1 2 -1.</_>\r\n                <_>\r\n                  4 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>7.5309360399842262e-003</threshold>\r\n            <left_val>0.0200634505599737</left_val>\r\n            <right_val>-0.4817556142807007</right_val></_></_>\r\n        <_>\r\n          <!-- tree 141 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 0 14 8 -1.</_>\r\n                <_>\r\n                  9 0 7 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1206317022442818</threshold>\r\n            <left_val>0.1783839017152786</left_val>\r\n            <right_val>-0.0404023304581642</right_val></_></_>\r\n        <_>\r\n          <!-- tree 142 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 0 2 2 -1.</_>\r\n                <_>\r\n                  7 0 1 1 2.</_>\r\n                <_>\r\n                  8 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.4506952185183764e-005</threshold>\r\n            <left_val>-0.0858542472124100</left_val>\r\n            <right_val>0.1069532036781311</right_val></_></_>\r\n        <_>\r\n          <!-- tree 143 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 6 18 4 -1.</_>\r\n                <_>\r\n                  4 6 9 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1407386958599091</threshold>\r\n            <left_val>-0.0227742493152618</left_val>\r\n            <right_val>0.4258378148078919</right_val></_></_>\r\n        <_>\r\n          <!-- tree 144 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 2 2 -1.</_>\r\n                <_>\r\n                  0 7 1 1 2.</_>\r\n                <_>\r\n                  1 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.8708712458610535e-004</threshold>\r\n            <left_val>-0.0585701502859592</left_val>\r\n            <right_val>0.1556326001882553</right_val></_></_>\r\n        <_>\r\n          <!-- tree 145 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 7 2 2 -1.</_>\r\n                <_>\r\n                  24 7 1 1 2.</_>\r\n                <_>\r\n                  23 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.2137140553677455e-005</threshold>\r\n            <left_val>-0.0576708205044270</left_val>\r\n            <right_val>0.0648988783359528</right_val></_></_>\r\n        <_>\r\n          <!-- tree 146 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 2 2 -1.</_>\r\n                <_>\r\n                  0 7 1 1 2.</_>\r\n                <_>\r\n                  1 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.4859159718034789e-005</threshold>\r\n            <left_val>0.1383187025785446</left_val>\r\n            <right_val>-0.0935516208410263</right_val></_></_>\r\n        <_>\r\n          <!-- tree 147 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 7 2 2 -1.</_>\r\n                <_>\r\n                  24 7 1 1 2.</_>\r\n                <_>\r\n                  23 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.1318263255525380e-005</threshold>\r\n            <left_val>0.0786737129092216</left_val>\r\n            <right_val>-0.0584529899060726</right_val></_></_>\r\n        <_>\r\n          <!-- tree 148 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 2 2 -1.</_>\r\n                <_>\r\n                  0 7 1 1 2.</_>\r\n                <_>\r\n                  1 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.0710170317906886e-004</threshold>\r\n            <left_val>-0.1036069020628929</left_val>\r\n            <right_val>0.1105291023850441</right_val></_></_>\r\n        <_>\r\n          <!-- tree 149 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 6 1 4 -1.</_>\r\n                <_>\r\n                  24 7 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.9485197998583317e-003</threshold>\r\n            <left_val>0.0124739902094007</left_val>\r\n            <right_val>-0.6046726703643799</right_val></_></_>\r\n        <_>\r\n          <!-- tree 150 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 1 4 -1.</_>\r\n                <_>\r\n                  0 7 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.8341151084750891e-003</threshold>\r\n            <left_val>-0.5651066899299622</left_val>\r\n            <right_val>0.0139579800888896</right_val></_></_>\r\n        <_>\r\n          <!-- tree 151 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 0 6 15 -1.</_>\r\n                <_>\r\n                  13 0 2 15 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0481832996010780</threshold>\r\n            <left_val>6.8787620402872562e-003</left_val>\r\n            <right_val>-0.2265198975801468</right_val></_></_>\r\n        <_>\r\n          <!-- tree 152 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 2 3 -1.</_>\r\n                <_>\r\n                  0 2 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.8468521609902382e-003</threshold>\r\n            <left_val>0.0149204200133681</left_val>\r\n            <right_val>-0.5408421754837036</right_val></_></_>\r\n        <_>\r\n          <!-- tree 153 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 1 9 3 -1.</_>\r\n                <_>\r\n                  8 2 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.0795980282127857e-003</threshold>\r\n            <left_val>-0.0740584135055542</left_val>\r\n            <right_val>0.1212510019540787</right_val></_></_>\r\n        <_>\r\n          <!-- tree 154 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 1 3 3 -1.</_>\r\n                <_>\r\n                  9 2 1 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.7187669873237610e-003</threshold>\r\n            <left_val>0.1150275021791458</left_val>\r\n            <right_val>-0.0767944231629372</right_val></_></_>\r\n        <_>\r\n          <!-- tree 155 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 7 5 3 -1.</_>\r\n                <_>\r\n                  18 8 5 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0141321197152138</threshold>\r\n            <left_val>0.0222348105162382</left_val>\r\n            <right_val>-0.3713991045951843</right_val></_></_>\r\n        <_>\r\n          <!-- tree 156 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 3 5 -1.</_>\r\n                <_>\r\n                  7 8 1 5 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-8.0704037100076675e-003</threshold>\r\n            <left_val>-0.2536310851573944</left_val>\r\n            <right_val>0.0307344105094671</right_val></_></_>\r\n        <_>\r\n          <!-- tree 157 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 14 -1.</_>\r\n                <_>\r\n                  13 0 12 7 2.</_>\r\n                <_>\r\n                  1 7 12 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2283755987882614</threshold>\r\n            <left_val>0.0168569702655077</left_val>\r\n            <right_val>-0.5456647872924805</right_val></_></_>\r\n        <_>\r\n          <!-- tree 158 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 11 9 4 -1.</_>\r\n                <_>\r\n                  8 12 9 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0106975501403213</threshold>\r\n            <left_val>0.1705504059791565</left_val>\r\n            <right_val>-0.0482324399054050</right_val></_></_>\r\n        <_>\r\n          <!-- tree 159 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 11 14 4 -1.</_>\r\n                <_>\r\n                  6 12 14 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.1057992279529572e-003</threshold>\r\n            <left_val>-0.0747807994484901</left_val>\r\n            <right_val>0.1244964972138405</right_val></_></_>\r\n        <_>\r\n          <!-- tree 160 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 3 4 -1.</_>\r\n                <_>\r\n                  0 12 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.5825320519506931e-003</threshold>\r\n            <left_val>0.0343106091022491</left_val>\r\n            <right_val>-0.2529211938381195</right_val></_></_>\r\n        <_>\r\n          <!-- tree 161 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 11 8 2 -1.</_>\r\n                <_>\r\n                  17 12 8 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.7969396263360977e-003</threshold>\r\n            <left_val>0.0227318406105042</left_val>\r\n            <right_val>-0.2092120051383972</right_val></_></_>\r\n        <_>\r\n          <!-- tree 162 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 8 2 -1.</_>\r\n                <_>\r\n                  0 12 8 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0117600196972489</threshold>\r\n            <left_val>-0.5789325237274170</left_val>\r\n            <right_val>0.0150208799168468</right_val></_></_>\r\n        <_>\r\n          <!-- tree 163 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 13 1 2 -1.</_>\r\n                <_>\r\n                  23 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.4420140068978071e-003</threshold>\r\n            <left_val>0.0108067002147436</left_val>\r\n            <right_val>-0.1743503063917160</right_val></_></_>\r\n        <_>\r\n          <!-- tree 164 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 13 1 2 -1.</_>\r\n                <_>\r\n                  1 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.9062469770433381e-005</threshold>\r\n            <left_val>0.0891510024666786</left_val>\r\n            <right_val>-0.0946391522884369</right_val></_></_>\r\n        <_>\r\n          <!-- tree 165 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 0 14 8 -1.</_>\r\n                <_>\r\n                  9 0 7 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0330546088516712</threshold>\r\n            <left_val>-0.0502973310649395</left_val>\r\n            <right_val>0.0724259391427040</right_val></_></_>\r\n        <_>\r\n          <!-- tree 166 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 14 8 -1.</_>\r\n                <_>\r\n                  0 3 14 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0449321903288364</threshold>\r\n            <left_val>0.0714013203978539</left_val>\r\n            <right_val>-0.1246540024876595</right_val></_></_>\r\n        <_>\r\n          <!-- tree 167 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 4 2 3 -1.</_>\r\n                <_>\r\n                  20 5 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0123274503275752</threshold>\r\n            <left_val>0.2216438055038452</left_val>\r\n            <right_val>-0.0160399992018938</right_val></_></_>\r\n        <_>\r\n          <!-- tree 168 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 14 9 -1.</_>\r\n                <_>\r\n                  0 4 14 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.3724926114082336</threshold>\r\n            <left_val>-0.3693152964115143</left_val>\r\n            <right_val>0.0260022208094597</right_val></_></_>\r\n        <_>\r\n          <!-- tree 169 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 13 9 1 -1.</_>\r\n                <_>\r\n                  12 13 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0152763100340962</threshold>\r\n            <left_val>5.3399899043142796e-003</left_val>\r\n            <right_val>-0.5456783771514893</right_val></_></_>\r\n        <_>\r\n          <!-- tree 170 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 13 9 1 -1.</_>\r\n                <_>\r\n                  10 13 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0145687395706773</threshold>\r\n            <left_val>-0.5883231163024902</left_val>\r\n            <right_val>0.0139877004548907</right_val></_></_>\r\n        <_>\r\n          <!-- tree 171 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 7 2 2 -1.</_>\r\n                <_>\r\n                  21 7 1 1 2.</_>\r\n                <_>\r\n                  20 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.9890248384326696e-004</threshold>\r\n            <left_val>-0.0358810797333717</left_val>\r\n            <right_val>0.1743257045745850</right_val></_></_></trees>\r\n      <stage_threshold>-1.3605639934539795</stage_threshold>\r\n      <parent>13</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 15 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 9 15 6 -1.</_>\r\n                <_>\r\n                  5 12 15 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0572950802743435</threshold>\r\n            <left_val>-0.1768665015697479</left_val>\r\n            <right_val>0.2448291033506393</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 0 2 6 -1.</_>\r\n                <_>\r\n                  21 3 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0100825401023030</threshold>\r\n            <left_val>0.1378919035196304</left_val>\r\n            <right_val>-0.2031147032976151</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 4 8 10 -1.</_>\r\n                <_>\r\n                  4 4 4 5 2.</_>\r\n                <_>\r\n                  8 9 4 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0185250397771597</threshold>\r\n            <left_val>0.1623972952365875</left_val>\r\n            <right_val>-0.1676190942525864</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 1 8 6 -1.</_>\r\n                <_>\r\n                  16 3 8 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0527544915676117</threshold>\r\n            <left_val>0.1347105056047440</left_val>\r\n            <right_val>-0.1428814977407455</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 1 11 2 -1.</_>\r\n                <_>\r\n                  2 1 11 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0243547502905130</threshold>\r\n            <left_val>-0.0266546793282032</left_val>\r\n            <right_val>0.4326488971710205</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 4 5 6 -1.</_>\r\n                <_>\r\n                  20 6 5 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0634179636836052</threshold>\r\n            <left_val>0.0422610901296139</left_val>\r\n            <right_val>-0.4013176858425140</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 5 6 -1.</_>\r\n                <_>\r\n                  0 6 5 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.8921029772609472e-003</threshold>\r\n            <left_val>-0.1906750947237015</left_val>\r\n            <right_val>0.1267316043376923</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 11 6 4 -1.</_>\r\n                <_>\r\n                  22 11 3 2 2.</_>\r\n                <_>\r\n                  19 13 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.5238909982144833e-003</threshold>\r\n            <left_val>-0.1371546983718872</left_val>\r\n            <right_val>0.1246439963579178</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 4 5 2 -1.</_>\r\n                <_>\r\n                  10 5 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.7657418549060822e-003</threshold>\r\n            <left_val>0.2558242976665497</left_val>\r\n            <right_val>-0.0607152618467808</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 6 11 4 -1.</_>\r\n                <_>\r\n                  7 7 11 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0241763703525066</threshold>\r\n            <left_val>0.2859889864921570</left_val>\r\n            <right_val>-0.0642128363251686</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 2 4 4 -1.</_>\r\n                <_>\r\n                  9 2 2 4 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-9.1761918738484383e-003</threshold>\r\n            <left_val>0.1021848022937775</left_val>\r\n            <right_val>-0.1999447047710419</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 11 -1.</_>\r\n                <_>\r\n                  7 0 12 11 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1578399986028671</threshold>\r\n            <left_val>0.2398308068513870</left_val>\r\n            <right_val>-0.0785783529281616</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 10 10 -1.</_>\r\n                <_>\r\n                  9 0 5 10 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0487401895225048</threshold>\r\n            <left_val>-0.1100914031267166</left_val>\r\n            <right_val>0.1558353006839752</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 8 2 4 -1.</_>\r\n                <_>\r\n                  23 8 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0191179793328047</threshold>\r\n            <left_val>0.0197066999971867</left_val>\r\n            <right_val>-0.3720233142375946</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 8 4 2 -1.</_>\r\n                <_>\r\n                  2 8 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0127781601622701</threshold>\r\n            <left_val>-0.4160012900829315</left_val>\r\n            <right_val>0.0353787206113338</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 3 2 12 -1.</_>\r\n                <_>\r\n                  24 3 1 6 2.</_>\r\n                <_>\r\n                  23 9 1 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.6996301021426916e-003</threshold>\r\n            <left_val>-0.0985597372055054</left_val>\r\n            <right_val>0.1149144023656845</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 3 6 12 -1.</_>\r\n                <_>\r\n                  9 3 3 6 2.</_>\r\n                <_>\r\n                  12 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0245021991431713</threshold>\r\n            <left_val>0.0430920794606209</left_val>\r\n            <right_val>-0.3663294017314911</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 12 -1.</_>\r\n                <_>\r\n                  13 0 12 6 2.</_>\r\n                <_>\r\n                  1 6 12 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0850031301379204</threshold>\r\n            <left_val>0.0430114008486271</left_val>\r\n            <right_val>-0.2886289954185486</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 2 12 -1.</_>\r\n                <_>\r\n                  0 3 1 6 2.</_>\r\n                <_>\r\n                  1 9 1 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.1647530850023031e-003</threshold>\r\n            <left_val>-0.1142930984497070</left_val>\r\n            <right_val>0.1279425024986267</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 8 3 4 -1.</_>\r\n                <_>\r\n                  14 8 3 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0116577902808785</threshold>\r\n            <left_val>-0.0515255816280842</left_val>\r\n            <right_val>0.1422376930713654</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 6 1 -1.</_>\r\n                <_>\r\n                  2 0 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.6801449283957481e-003</threshold>\r\n            <left_val>-0.4743103981018066</left_val>\r\n            <right_val>0.0287305805832148</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 2 16 7 -1.</_>\r\n                <_>\r\n                  13 2 8 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0388207696378231</threshold>\r\n            <left_val>0.0953134000301361</left_val>\r\n            <right_val>-0.0473909191787243</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 7 1 6 -1.</_>\r\n                <_>\r\n                  8 7 1 3 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0254217702895403</threshold>\r\n            <left_val>-0.4219881892204285</left_val>\r\n            <right_val>0.0284377895295620</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 7 9 4 -1.</_>\r\n                <_>\r\n                  8 8 9 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0121460696682334</threshold>\r\n            <left_val>0.1830082982778549</left_val>\r\n            <right_val>-0.0762820765376091</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 5 10 4 -1.</_>\r\n                <_>\r\n                  7 6 10 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0267872195690870</threshold>\r\n            <left_val>0.2859373092651367</left_val>\r\n            <right_val>-0.0522297993302345</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 2 1 6 -1.</_>\r\n                <_>\r\n                  12 4 1 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0116149904206395</threshold>\r\n            <left_val>0.1138594970107079</left_val>\r\n            <right_val>-0.0663506835699081</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 8 12 -1.</_>\r\n                <_>\r\n                  0 3 4 6 2.</_>\r\n                <_>\r\n                  4 9 4 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0599568895995617</threshold>\r\n            <left_val>0.2777940034866333</left_val>\r\n            <right_val>-0.0470041483640671</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 13 6 2 -1.</_>\r\n                <_>\r\n                  19 13 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.6737014353275299e-003</threshold>\r\n            <left_val>0.2129196971654892</left_val>\r\n            <right_val>-0.0287764091044664</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 13 6 2 -1.</_>\r\n                <_>\r\n                  3 13 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.8543549124151468e-003</threshold>\r\n            <left_val>-0.1221636980772018</left_val>\r\n            <right_val>0.1421594023704529</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 12 1 3 -1.</_>\r\n                <_>\r\n                  23 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.2713060025125742e-003</threshold>\r\n            <left_val>0.0182375106960535</left_val>\r\n            <right_val>-0.4104354083538055</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 12 1 3 -1.</_>\r\n                <_>\r\n                  1 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.2334890197962523e-003</threshold>\r\n            <left_val>-0.3772745132446289</left_val>\r\n            <right_val>0.0350435785949230</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 12 1 3 -1.</_>\r\n                <_>\r\n                  23 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.6904400438070297e-003</threshold>\r\n            <left_val>-0.4196098148822784</left_val>\r\n            <right_val>0.0100445803254843</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 10 10 1 -1.</_>\r\n                <_>\r\n                  9 10 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.6551370974630117e-003</threshold>\r\n            <left_val>0.1150795966386795</left_val>\r\n            <right_val>-0.1072231009602547</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 12 1 3 -1.</_>\r\n                <_>\r\n                  23 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.6895318266469985e-005</threshold>\r\n            <left_val>0.0416303612291813</left_val>\r\n            <right_val>-0.0317232310771942</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 12 1 3 -1.</_>\r\n                <_>\r\n                  1 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.8731368780136108e-004</threshold>\r\n            <left_val>0.0429715514183044</left_val>\r\n            <right_val>-0.2815021872520447</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 2 12 4 -1.</_>\r\n                <_>\r\n                  11 3 12 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0182135794311762</threshold>\r\n            <left_val>-0.0451830588281155</left_val>\r\n            <right_val>0.1914888024330139</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 1 12 6 -1.</_>\r\n                <_>\r\n                  3 3 12 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0872772708535194</threshold>\r\n            <left_val>0.1718962937593460</left_val>\r\n            <right_val>-0.1219599992036820</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 0 2 2 -1.</_>\r\n                <_>\r\n                  23 0 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-5.3898650221526623e-003</threshold>\r\n            <left_val>-0.3866654038429260</left_val>\r\n            <right_val>0.0155352503061295</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 2 2 -1.</_>\r\n                <_>\r\n                  2 0 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0108539797365665</threshold>\r\n            <left_val>0.0364841781556606</left_val>\r\n            <right_val>-0.3959751129150391</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 13 4 2 -1.</_>\r\n                <_>\r\n                  15 13 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.1801291517913342e-003</threshold>\r\n            <left_val>-0.4820233881473541</left_val>\r\n            <right_val>0.0170424394309521</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 6 6 3 -1.</_>\r\n                <_>\r\n                  2 7 6 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0234517697244883</threshold>\r\n            <left_val>0.4986476898193359</left_val>\r\n            <right_val>-0.0220960807055235</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 13 4 2 -1.</_>\r\n                <_>\r\n                  15 13 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.9061511158943176e-003</threshold>\r\n            <left_val>0.0269486699253321</left_val>\r\n            <right_val>-0.3256624042987824</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 24 4 -1.</_>\r\n                <_>\r\n                  0 7 12 2 2.</_>\r\n                <_>\r\n                  12 9 12 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0463646091520786</threshold>\r\n            <left_val>0.0268820300698280</left_val>\r\n            <right_val>-0.3762974143028259</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 0 2 2 -1.</_>\r\n                <_>\r\n                  23 1 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.1972910326439887e-004</threshold>\r\n            <left_val>0.0705367177724838</left_val>\r\n            <right_val>-0.1089593023061752</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 13 4 2 -1.</_>\r\n                <_>\r\n                  8 13 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.7804399617016315e-003</threshold>\r\n            <left_val>-0.4887917041778565</left_val>\r\n            <right_val>0.0199932008981705</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 11 2 2 -1.</_>\r\n                <_>\r\n                  17 11 1 1 2.</_>\r\n                <_>\r\n                  16 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.0642170865321532e-005</threshold>\r\n            <left_val>-0.0753576681017876</left_val>\r\n            <right_val>0.0811428874731064</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 11 9 4 -1.</_>\r\n                <_>\r\n                  8 12 9 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0106888897716999</threshold>\r\n            <left_val>0.2206722944974899</left_val>\r\n            <right_val>-0.0562041401863098</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 12 21 3 -1.</_>\r\n                <_>\r\n                  9 13 7 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0436831787228584</threshold>\r\n            <left_val>-0.0610822103917599</left_val>\r\n            <right_val>0.1712581962347031</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 13 21 2 -1.</_>\r\n                <_>\r\n                  8 13 7 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0202471297234297</threshold>\r\n            <left_val>0.1565587073564529</left_val>\r\n            <right_val>-0.0770068317651749</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 10 1 4 -1.</_>\r\n                <_>\r\n                  21 11 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-5.9285280294716358e-003</threshold>\r\n            <left_val>-0.4369310140609741</left_val>\r\n            <right_val>0.0202764291316271</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 5 6 3 -1.</_>\r\n                <_>\r\n                  2 6 6 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0113492002710700</threshold>\r\n            <left_val>-0.0597750283777714</left_val>\r\n            <right_val>0.1651744991540909</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 2 8 5 -1.</_>\r\n                <_>\r\n                  15 4 4 5 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.1365716010332108</threshold>\r\n            <left_val>-0.8707361817359924</left_val>\r\n            <right_val>4.2868419550359249e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 2 8 6 -1.</_>\r\n                <_>\r\n                  4 4 8 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0663046464323998</threshold>\r\n            <left_val>-0.0388697795569897</left_val>\r\n            <right_val>0.2649452090263367</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 15 4 -1.</_>\r\n                <_>\r\n                  5 2 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0195911191403866</threshold>\r\n            <left_val>-0.0803443267941475</left_val>\r\n            <right_val>0.1665123999118805</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 8 4 -1.</_>\r\n                <_>\r\n                  0 2 8 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0340932197868824</threshold>\r\n            <left_val>0.0261821094900370</left_val>\r\n            <right_val>-0.4526833891868591</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 0 15 14 -1.</_>\r\n                <_>\r\n                  10 7 15 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.2061661928892136</threshold>\r\n            <left_val>-0.4254589080810547</left_val>\r\n            <right_val>0.0156788490712643</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 13 6 2 -1.</_>\r\n                <_>\r\n                  11 13 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.6675140298902988e-003</threshold>\r\n            <left_val>-0.3513334095478058</left_val>\r\n            <right_val>0.0274340193718672</right_val></_></_>\r\n        <_>\r\n          <!-- tree 57 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 9 11 4 -1.</_>\r\n                <_>\r\n                  8 10 11 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0129145104438066</threshold>\r\n            <left_val>0.1359857022762299</left_val>\r\n            <right_val>-0.0633687376976013</right_val></_></_>\r\n        <_>\r\n          <!-- tree 58 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 6 3 3 -1.</_>\r\n                <_>\r\n                  9 7 1 3 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0160742308944464</threshold>\r\n            <left_val>0.0215212907642126</left_val>\r\n            <right_val>-0.4643712937831879</right_val></_></_>\r\n        <_>\r\n          <!-- tree 59 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 5 4 6 -1.</_>\r\n                <_>\r\n                  21 7 4 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0369430296123028</threshold>\r\n            <left_val>0.0274755004793406</left_val>\r\n            <right_val>-0.3073608875274658</right_val></_></_>\r\n        <_>\r\n          <!-- tree 60 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 3 6 6 -1.</_>\r\n                <_>\r\n                  10 5 6 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0755213573575020</threshold>\r\n            <left_val>-0.4241931140422821</left_val>\r\n            <right_val>0.0237817000597715</right_val></_></_>\r\n        <_>\r\n          <!-- tree 61 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 9 10 6 -1.</_>\r\n                <_>\r\n                  12 9 5 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0243982393294573</threshold>\r\n            <left_val>-0.0493879318237305</left_val>\r\n            <right_val>0.1672402024269104</right_val></_></_>\r\n        <_>\r\n          <!-- tree 62 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 9 10 6 -1.</_>\r\n                <_>\r\n                  8 9 5 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1157704964280129</threshold>\r\n            <left_val>0.0166440103203058</left_val>\r\n            <right_val>-0.6928011178970337</right_val></_></_>\r\n        <_>\r\n          <!-- tree 63 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 0 4 1 -1.</_>\r\n                <_>\r\n                  13 0 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.1529998462647200e-004</threshold>\r\n            <left_val>-0.0502800084650517</left_val>\r\n            <right_val>0.1328525990247726</right_val></_></_>\r\n        <_>\r\n          <!-- tree 64 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 10 4 1 -1.</_>\r\n                <_>\r\n                  4 11 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-3.6248450633138418e-003</threshold>\r\n            <left_val>-0.3066833913326263</left_val>\r\n            <right_val>0.0284923594444990</right_val></_></_>\r\n        <_>\r\n          <!-- tree 65 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 12 1 2 -1.</_>\r\n                <_>\r\n                  18 12 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-7.3581631295382977e-004</threshold>\r\n            <left_val>0.0559885688126087</left_val>\r\n            <right_val>-0.0392797887325287</right_val></_></_>\r\n        <_>\r\n          <!-- tree 66 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 20 10 -1.</_>\r\n                <_>\r\n                  12 0 10 10 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2000436931848526</threshold>\r\n            <left_val>-0.0568408109247684</left_val>\r\n            <right_val>0.1685038954019547</right_val></_></_>\r\n        <_>\r\n          <!-- tree 67 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 2 3 6 -1.</_>\r\n                <_>\r\n                  23 3 1 6 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0178776904940605</threshold>\r\n            <left_val>0.1931751966476440</left_val>\r\n            <right_val>-0.0514639392495155</right_val></_></_>\r\n        <_>\r\n          <!-- tree 68 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 2 6 3 -1.</_>\r\n                <_>\r\n                  2 3 6 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0113503802567720</threshold>\r\n            <left_val>-0.0489644110202789</left_val>\r\n            <right_val>0.2181939035654068</right_val></_></_>\r\n        <_>\r\n          <!-- tree 69 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 1 4 6 -1.</_>\r\n                <_>\r\n                  23 1 2 3 2.</_>\r\n                <_>\r\n                  21 4 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0125029096379876</threshold>\r\n            <left_val>-0.0419848784804344</left_val>\r\n            <right_val>0.2713862061500549</right_val></_></_>\r\n        <_>\r\n          <!-- tree 70 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 4 6 -1.</_>\r\n                <_>\r\n                  0 1 2 3 2.</_>\r\n                <_>\r\n                  2 4 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.3033276498317719e-003</threshold>\r\n            <left_val>0.1590452045202255</left_val>\r\n            <right_val>-0.0626974031329155</right_val></_></_>\r\n        <_>\r\n          <!-- tree 71 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 0 1 6 -1.</_>\r\n                <_>\r\n                  24 3 1 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.8205171525478363e-003</threshold>\r\n            <left_val>0.0155331101268530</left_val>\r\n            <right_val>-0.3304075896739960</right_val></_></_>\r\n        <_>\r\n          <!-- tree 72 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 1 6 -1.</_>\r\n                <_>\r\n                  0 3 1 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.4993069022893906e-003</threshold>\r\n            <left_val>0.0376702398061752</left_val>\r\n            <right_val>-0.3112137019634247</right_val></_></_>\r\n        <_>\r\n          <!-- tree 73 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 0 6 6 -1.</_>\r\n                <_>\r\n                  18 2 6 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0140464501455426</threshold>\r\n            <left_val>-0.0434262491762638</left_val>\r\n            <right_val>0.1032719984650612</right_val></_></_>\r\n        <_>\r\n          <!-- tree 74 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 15 4 -1.</_>\r\n                <_>\r\n                  5 2 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0411175191402435</threshold>\r\n            <left_val>0.1867991983890533</left_val>\r\n            <right_val>-0.0664343684911728</right_val></_></_>\r\n        <_>\r\n          <!-- tree 75 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 8 18 1 -1.</_>\r\n                <_>\r\n                  10 8 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0107145197689533</threshold>\r\n            <left_val>0.1244383975863457</left_val>\r\n            <right_val>-0.0663585364818573</right_val></_></_>\r\n        <_>\r\n          <!-- tree 76 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 6 6 4 -1.</_>\r\n                <_>\r\n                  8 7 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.2895422130823135e-003</threshold>\r\n            <left_val>-0.0821698531508446</left_val>\r\n            <right_val>0.1224353983998299</right_val></_></_>\r\n        <_>\r\n          <!-- tree 77 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 5 8 2 -1.</_>\r\n                <_>\r\n                  11 5 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0130508001893759</threshold>\r\n            <left_val>-0.4003388881683350</left_val>\r\n            <right_val>0.0166369099169970</right_val></_></_>\r\n        <_>\r\n          <!-- tree 78 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 6 6 -1.</_>\r\n                <_>\r\n                  7 0 2 6 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0364681892096996</threshold>\r\n            <left_val>-0.5473737716674805</left_val>\r\n            <right_val>0.0148177295923233</right_val></_></_>\r\n        <_>\r\n          <!-- tree 79 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 8 2 1 -1.</_>\r\n                <_>\r\n                  21 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.5372940045781434e-005</threshold>\r\n            <left_val>0.0594716407358646</left_val>\r\n            <right_val>-0.0578790009021759</right_val></_></_>\r\n        <_>\r\n          <!-- tree 80 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 1 2 2 -1.</_>\r\n                <_>\r\n                  7 1 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0142522901296616</threshold>\r\n            <left_val>0.0252972692251205</left_val>\r\n            <right_val>-0.3336473107337952</right_val></_></_>\r\n        <_>\r\n          <!-- tree 81 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 4 8 4 -1.</_>\r\n                <_>\r\n                  17 5 8 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.3469200134277344e-003</threshold>\r\n            <left_val>-0.0707368031144142</left_val>\r\n            <right_val>0.0745013207197189</right_val></_></_>\r\n        <_>\r\n          <!-- tree 82 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 13 2 -1.</_>\r\n                <_>\r\n                  6 1 13 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.4445958919823170e-003</threshold>\r\n            <left_val>-0.0672459527850151</left_val>\r\n            <right_val>0.1451885998249054</right_val></_></_>\r\n        <_>\r\n          <!-- tree 83 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 5 4 6 -1.</_>\r\n                <_>\r\n                  21 7 4 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.7205823510885239e-003</threshold>\r\n            <left_val>-0.2021352946758270</left_val>\r\n            <right_val>0.0275202393531799</right_val></_></_>\r\n        <_>\r\n          <!-- tree 84 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 4 6 -1.</_>\r\n                <_>\r\n                  0 7 4 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0469216890633106</threshold>\r\n            <left_val>0.0161568503826857</left_val>\r\n            <right_val>-0.5311927795410156</right_val></_></_>\r\n        <_>\r\n          <!-- tree 85 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 8 2 1 -1.</_>\r\n                <_>\r\n                  21 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.8387980971019715e-005</threshold>\r\n            <left_val>-0.0557161718606949</left_val>\r\n            <right_val>0.0720106214284897</right_val></_></_>\r\n        <_>\r\n          <!-- tree 86 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 8 2 1 -1.</_>\r\n                <_>\r\n                  3 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.6103101340122521e-005</threshold>\r\n            <left_val>0.0959030091762543</left_val>\r\n            <right_val>-0.0971473827958107</right_val></_></_>\r\n        <_>\r\n          <!-- tree 87 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 0 2 1 -1.</_>\r\n                <_>\r\n                  23 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>6.0657761059701443e-003</threshold>\r\n            <left_val>0.0240712091326714</left_val>\r\n            <right_val>-0.2376091033220291</right_val></_></_>\r\n        <_>\r\n          <!-- tree 88 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 15 4 -1.</_>\r\n                <_>\r\n                  4 1 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0555203706026077</threshold>\r\n            <left_val>0.3074511885643005</left_val>\r\n            <right_val>-0.0299711804836988</right_val></_></_>\r\n        <_>\r\n          <!-- tree 89 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 1 10 8 -1.</_>\r\n                <_>\r\n                  15 3 10 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0365539006888866</threshold>\r\n            <left_val>0.0328120291233063</left_val>\r\n            <right_val>-0.0570152215659618</right_val></_></_>\r\n        <_>\r\n          <!-- tree 90 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 4 2 -1.</_>\r\n                <_>\r\n                  0 5 2 1 2.</_>\r\n                <_>\r\n                  2 6 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.8784699495881796e-003</threshold>\r\n            <left_val>-0.0653261989355087</left_val>\r\n            <right_val>0.1390983015298843</right_val></_></_>\r\n        <_>\r\n          <!-- tree 91 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 0 2 1 -1.</_>\r\n                <_>\r\n                  23 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-7.4822120368480682e-003</threshold>\r\n            <left_val>-0.7748216986656189</left_val>\r\n            <right_val>5.9286328032612801e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 92 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 1 4 -1.</_>\r\n                <_>\r\n                  0 6 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.3365150447934866e-003</threshold>\r\n            <left_val>-0.3616085052490234</left_val>\r\n            <right_val>0.0226737502962351</right_val></_></_>\r\n        <_>\r\n          <!-- tree 93 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 13 4 2 -1.</_>\r\n                <_>\r\n                  19 14 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0122549999505281</threshold>\r\n            <left_val>-0.6580218076705933</left_val>\r\n            <right_val>4.3241591192781925e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 94 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 12 2 2 -1.</_>\r\n                <_>\r\n                  7 12 1 1 2.</_>\r\n                <_>\r\n                  8 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.5022740010172129e-004</threshold>\r\n            <left_val>0.1368491053581238</left_val>\r\n            <right_val>-0.0613101907074451</right_val></_></_>\r\n        <_>\r\n          <!-- tree 95 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 8 -1.</_>\r\n                <_>\r\n                  13 0 12 4 2.</_>\r\n                <_>\r\n                  1 4 12 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1189583986997604</threshold>\r\n            <left_val>0.0244670100510120</left_val>\r\n            <right_val>-0.3081929087638855</right_val></_></_>\r\n        <_>\r\n          <!-- tree 96 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 4 3 3 -1.</_>\r\n                <_>\r\n                  2 5 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.8534749979153275e-003</threshold>\r\n            <left_val>-0.0657177790999413</left_val>\r\n            <right_val>0.1380506008863449</right_val></_></_>\r\n        <_>\r\n          <!-- tree 97 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 6 4 3 -1.</_>\r\n                <_>\r\n                  19 7 4 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0139663796871901</threshold>\r\n            <left_val>-0.4281671941280365</left_val>\r\n            <right_val>0.0166652500629425</right_val></_></_>\r\n        <_>\r\n          <!-- tree 98 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 6 3 4 -1.</_>\r\n                <_>\r\n                  6 7 1 4 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0120118902996182</threshold>\r\n            <left_val>-0.4546675086021423</left_val>\r\n            <right_val>0.0174813903868198</right_val></_></_>\r\n        <_>\r\n          <!-- tree 99 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 11 2 2 -1.</_>\r\n                <_>\r\n                  17 11 1 1 2.</_>\r\n                <_>\r\n                  16 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.6380320135504007e-004</threshold>\r\n            <left_val>0.0268306396901608</left_val>\r\n            <right_val>-0.1949577033519745</right_val></_></_>\r\n        <_>\r\n          <!-- tree 100 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 11 2 2 -1.</_>\r\n                <_>\r\n                  7 11 1 1 2.</_>\r\n                <_>\r\n                  8 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.4863549303263426e-004</threshold>\r\n            <left_val>0.1728172004222870</left_val>\r\n            <right_val>-0.0519250482320786</right_val></_></_>\r\n        <_>\r\n          <!-- tree 101 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 5 9 3 -1.</_>\r\n                <_>\r\n                  12 5 3 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0356420204043388</threshold>\r\n            <left_val>0.0119973402470350</left_val>\r\n            <right_val>-0.2636224925518036</right_val></_></_>\r\n        <_>\r\n          <!-- tree 102 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 6 1 -1.</_>\r\n                <_>\r\n                  2 0 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.2830741778016090e-003</threshold>\r\n            <left_val>0.0153813296929002</left_val>\r\n            <right_val>-0.5276867151260376</right_val></_></_>\r\n        <_>\r\n          <!-- tree 103 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 4 8 1 -1.</_>\r\n                <_>\r\n                  19 4 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.3444799482822418e-003</threshold>\r\n            <left_val>-0.0448165088891983</left_val>\r\n            <right_val>0.1556369960308075</right_val></_></_>\r\n        <_>\r\n          <!-- tree 104 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 5 9 3 -1.</_>\r\n                <_>\r\n                  10 5 3 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0348524898290634</threshold>\r\n            <left_val>-0.6144651770591736</left_val>\r\n            <right_val>0.0147144095972180</right_val></_></_>\r\n        <_>\r\n          <!-- tree 105 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 4 8 1 -1.</_>\r\n                <_>\r\n                  19 4 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.6836538929492235e-003</threshold>\r\n            <left_val>0.0679996237158775</left_val>\r\n            <right_val>-0.0403181910514832</right_val></_></_>\r\n        <_>\r\n          <!-- tree 106 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 8 1 -1.</_>\r\n                <_>\r\n                  2 4 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.6370671112090349e-003</threshold>\r\n            <left_val>-0.0527165904641151</left_val>\r\n            <right_val>0.1650273054838181</right_val></_></_>\r\n        <_>\r\n          <!-- tree 107 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 11 2 2 -1.</_>\r\n                <_>\r\n                  17 11 1 1 2.</_>\r\n                <_>\r\n                  16 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.1408380232751369e-003</threshold>\r\n            <left_val>-0.1495666950941086</left_val>\r\n            <right_val>0.0155292097479105</right_val></_></_>\r\n        <_>\r\n          <!-- tree 108 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 11 12 2 -1.</_>\r\n                <_>\r\n                  9 11 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.5604642257094383e-003</threshold>\r\n            <left_val>0.1015162020921707</left_val>\r\n            <right_val>-0.0783084183931351</right_val></_></_>\r\n        <_>\r\n          <!-- tree 109 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 6 20 9 -1.</_>\r\n                <_>\r\n                  9 6 10 9 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0313040204346180</threshold>\r\n            <left_val>-0.0519621782004833</left_val>\r\n            <right_val>0.1036399006843567</right_val></_></_>\r\n        <_>\r\n          <!-- tree 110 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 8 12 2 -1.</_>\r\n                <_>\r\n                  6 9 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.2903850600123405e-003</threshold>\r\n            <left_val>-0.0539887212216854</left_val>\r\n            <right_val>0.1653061956167221</right_val></_></_>\r\n        <_>\r\n          <!-- tree 111 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 8 13 4 -1.</_>\r\n                <_>\r\n                  6 9 13 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0108930300921202</threshold>\r\n            <left_val>0.1281013935804367</left_val>\r\n            <right_val>-0.0734129622578621</right_val></_></_>\r\n        <_>\r\n          <!-- tree 112 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 13 4 2 -1.</_>\r\n                <_>\r\n                  2 14 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.9190609715878963e-003</threshold>\r\n            <left_val>-0.3507530987262726</left_val>\r\n            <right_val>0.0244891606271267</right_val></_></_>\r\n        <_>\r\n          <!-- tree 113 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 1 3 12 -1.</_>\r\n                <_>\r\n                  11 4 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0811754167079926</threshold>\r\n            <left_val>0.0209406390786171</left_val>\r\n            <right_val>-0.3776533007621765</right_val></_></_>\r\n        <_>\r\n          <!-- tree 114 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 10 11 4 -1.</_>\r\n                <_>\r\n                  7 11 11 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.1189319714903831e-003</threshold>\r\n            <left_val>0.1320966929197311</left_val>\r\n            <right_val>-0.0743796005845070</right_val></_></_>\r\n        <_>\r\n          <!-- tree 115 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 9 15 6 -1.</_>\r\n                <_>\r\n                  5 11 15 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0290335901081562</threshold>\r\n            <left_val>-0.0601534284651279</left_val>\r\n            <right_val>0.1686525046825409</right_val></_></_>\r\n        <_>\r\n          <!-- tree 116 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 5 14 10 -1.</_>\r\n                <_>\r\n                  1 10 14 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2666859030723572</threshold>\r\n            <left_val>0.0302151106297970</left_val>\r\n            <right_val>-0.3336375057697296</right_val></_></_>\r\n        <_>\r\n          <!-- tree 117 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 10 2 2 -1.</_>\r\n                <_>\r\n                  14 10 1 1 2.</_>\r\n                <_>\r\n                  13 11 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.3437710003927350e-003</threshold>\r\n            <left_val>0.0244619604200125</left_val>\r\n            <right_val>-0.3497652113437653</right_val></_></_>\r\n        <_>\r\n          <!-- tree 118 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 4 2 -1.</_>\r\n                <_>\r\n                  0 1 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.4065970946103334e-005</threshold>\r\n            <left_val>0.0681859701871872</left_val>\r\n            <right_val>-0.1218236982822418</right_val></_></_>\r\n        <_>\r\n          <!-- tree 119 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 3 4 2 -1.</_>\r\n                <_>\r\n                  18 4 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.2273659706115723e-003</threshold>\r\n            <left_val>0.0591664388775826</left_val>\r\n            <right_val>-0.0569609887897968</right_val></_></_>\r\n        <_>\r\n          <!-- tree 120 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 4 4 -1.</_>\r\n                <_>\r\n                  0 8 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.0822839976754040e-004</threshold>\r\n            <left_val>-0.1183675006031990</left_val>\r\n            <right_val>0.0699028074741364</right_val></_></_>\r\n        <_>\r\n          <!-- tree 121 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 12 6 2 -1.</_>\r\n                <_>\r\n                  14 12 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.7762501314282417e-003</threshold>\r\n            <left_val>0.0182663407176733</left_val>\r\n            <right_val>-0.3238837122917175</right_val></_></_>\r\n        <_>\r\n          <!-- tree 122 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 0 3 1 -1.</_>\r\n                <_>\r\n                  8 0 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.5627898806706071e-004</threshold>\r\n            <left_val>0.1596496999263763</left_val>\r\n            <right_val>-0.0523401089012623</right_val></_></_>\r\n        <_>\r\n          <!-- tree 123 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 0 2 1 -1.</_>\r\n                <_>\r\n                  15 0 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.9805951528251171e-003</threshold>\r\n            <left_val>5.6993248872458935e-003</left_val>\r\n            <right_val>-0.6384922862052918</right_val></_></_>\r\n        <_>\r\n          <!-- tree 124 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 0 2 1 -1.</_>\r\n                <_>\r\n                  9 0 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.9052381655201316e-004</threshold>\r\n            <left_val>0.1629474014043808</left_val>\r\n            <right_val>-0.0742301419377327</right_val></_></_>\r\n        <_>\r\n          <!-- tree 125 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 3 2 10 -1.</_>\r\n                <_>\r\n                  18 3 1 10 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0184035003185272</threshold>\r\n            <left_val>-0.6773443222045898</left_val>\r\n            <right_val>0.0107059404253960</right_val></_></_>\r\n        <_>\r\n          <!-- tree 126 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 1 2 2 -1.</_>\r\n                <_>\r\n                  7 1 1 1 2.</_>\r\n                <_>\r\n                  8 2 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.9714571367949247e-004</threshold>\r\n            <left_val>0.1691973060369492</left_val>\r\n            <right_val>-0.0477185398340225</right_val></_></_>\r\n        <_>\r\n          <!-- tree 127 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 0 7 3 -1.</_>\r\n                <_>\r\n                  18 1 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0167341101914644</threshold>\r\n            <left_val>-0.3151237964630127</left_val>\r\n            <right_val>0.0124420495703816</right_val></_></_>\r\n        <_>\r\n          <!-- tree 128 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 12 6 2 -1.</_>\r\n                <_>\r\n                  9 12 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0119769899174571</threshold>\r\n            <left_val>-0.5293223857879639</left_val>\r\n            <right_val>0.0144362701103091</right_val></_></_>\r\n        <_>\r\n          <!-- tree 129 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 7 4 3 -1.</_>\r\n                <_>\r\n                  20 8 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.0368088781833649e-003</threshold>\r\n            <left_val>0.0264915898442268</left_val>\r\n            <right_val>-0.2470992058515549</right_val></_></_>\r\n        <_>\r\n          <!-- tree 130 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 2 10 -1.</_>\r\n                <_>\r\n                  6 3 1 10 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0105798998847604</threshold>\r\n            <left_val>-0.4092808067798615</left_val>\r\n            <right_val>0.0187591798603535</right_val></_></_>\r\n        <_>\r\n          <!-- tree 131 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 0 2 2 -1.</_>\r\n                <_>\r\n                  17 0 1 1 2.</_>\r\n                <_>\r\n                  16 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.0849997680634260e-004</threshold>\r\n            <left_val>-0.0334094502031803</left_val>\r\n            <right_val>0.0843884497880936</right_val></_></_>\r\n        <_>\r\n          <!-- tree 132 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 0 2 2 -1.</_>\r\n                <_>\r\n                  7 0 1 1 2.</_>\r\n                <_>\r\n                  8 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.9445307124406099e-004</threshold>\r\n            <left_val>0.1412419974803925</left_val>\r\n            <right_val>-0.0555582903325558</right_val></_></_>\r\n        <_>\r\n          <!-- tree 133 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 0 6 2 -1.</_>\r\n                <_>\r\n                  17 0 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0157594103366137</threshold>\r\n            <left_val>-0.3833500146865845</left_val>\r\n            <right_val>0.0156633593142033</right_val></_></_>\r\n        <_>\r\n          <!-- tree 134 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 1 4 -1.</_>\r\n                <_>\r\n                  0 2 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0101080304011703</threshold>\r\n            <left_val>-0.3391439020633698</left_val>\r\n            <right_val>0.0209970101714134</right_val></_></_>\r\n        <_>\r\n          <!-- tree 135 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 1 2 12 -1.</_>\r\n                <_>\r\n                  18 5 2 4 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>8.8242385536432266e-003</threshold>\r\n            <left_val>0.0468829013407230</left_val>\r\n            <right_val>-0.0345581099390984</right_val></_></_>\r\n        <_>\r\n          <!-- tree 136 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 12 3 -1.</_>\r\n                <_>\r\n                  8 4 4 3 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.1695280969142914</threshold>\r\n            <left_val>-0.0297883804887533</left_val>\r\n            <right_val>0.2978200018405914</right_val></_></_>\r\n        <_>\r\n          <!-- tree 137 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 13 2 2 -1.</_>\r\n                <_>\r\n                  15 13 1 1 2.</_>\r\n                <_>\r\n                  14 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.4175090473145247e-003</threshold>\r\n            <left_val>0.0145506802946329</left_val>\r\n            <right_val>-0.2557711899280548</right_val></_></_>\r\n        <_>\r\n          <!-- tree 138 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 6 3 3 -1.</_>\r\n                <_>\r\n                  12 7 1 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.2455357983708382e-003</threshold>\r\n            <left_val>0.1703144013881683</left_val>\r\n            <right_val>-0.0457185097038746</right_val></_></_>\r\n        <_>\r\n          <!-- tree 139 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 1 10 8 -1.</_>\r\n                <_>\r\n                  15 3 10 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0829719901084900</threshold>\r\n            <left_val>-0.0108856502920389</left_val>\r\n            <right_val>0.2358570992946625</right_val></_></_>\r\n        <_>\r\n          <!-- tree 140 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 10 8 -1.</_>\r\n                <_>\r\n                  0 3 10 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0363879613578320</threshold>\r\n            <left_val>0.0720635578036308</left_val>\r\n            <right_val>-0.1351491957902908</right_val></_></_>\r\n        <_>\r\n          <!-- tree 141 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 3 14 10 -1.</_>\r\n                <_>\r\n                  11 8 14 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2605817019939423</threshold>\r\n            <left_val>0.0307604894042015</left_val>\r\n            <right_val>-0.2081860005855560</right_val></_></_>\r\n        <_>\r\n          <!-- tree 142 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 24 12 -1.</_>\r\n                <_>\r\n                  0 0 12 6 2.</_>\r\n                <_>\r\n                  12 6 12 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1837086975574493</threshold>\r\n            <left_val>-0.4619984030723572</left_val>\r\n            <right_val>0.0176900699734688</right_val></_></_>\r\n        <_>\r\n          <!-- tree 143 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 7 4 3 -1.</_>\r\n                <_>\r\n                  20 8 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.9726989343762398e-003</threshold>\r\n            <left_val>-0.1660892963409424</left_val>\r\n            <right_val>0.0209467206150293</right_val></_></_>\r\n        <_>\r\n          <!-- tree 144 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 7 3 -1.</_>\r\n                <_>\r\n                  0 2 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0214559100568295</threshold>\r\n            <left_val>0.0231478307396173</left_val>\r\n            <right_val>-0.3625465929508209</right_val></_></_>\r\n        <_>\r\n          <!-- tree 145 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 7 4 3 -1.</_>\r\n                <_>\r\n                  20 8 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0144318202510476</threshold>\r\n            <left_val>4.4689280912280083e-003</left_val>\r\n            <right_val>-0.2445929050445557</right_val></_></_>\r\n        <_>\r\n          <!-- tree 146 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 1 8 -1.</_>\r\n                <_>\r\n                  0 9 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.3524229656904936e-003</threshold>\r\n            <left_val>-0.2480840981006622</left_val>\r\n            <right_val>0.0316352993249893</right_val></_></_>\r\n        <_>\r\n          <!-- tree 147 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 4 3 4 -1.</_>\r\n                <_>\r\n                  23 5 1 4 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0156694706529379</threshold>\r\n            <left_val>0.3172483146190643</left_val>\r\n            <right_val>-0.0374899208545685</right_val></_></_>\r\n        <_>\r\n          <!-- tree 148 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 2 12 1 -1.</_>\r\n                <_>\r\n                  15 6 4 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0400774292647839</threshold>\r\n            <left_val>-0.2589775919914246</left_val>\r\n            <right_val>0.0327349714934826</right_val></_></_>\r\n        <_>\r\n          <!-- tree 149 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 4 3 4 -1.</_>\r\n                <_>\r\n                  23 5 1 4 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0123612098395824</threshold>\r\n            <left_val>-0.0450748614966869</left_val>\r\n            <right_val>0.1690649986267090</right_val></_></_>\r\n        <_>\r\n          <!-- tree 150 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 7 4 3 -1.</_>\r\n                <_>\r\n                  1 8 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0109678898006678</threshold>\r\n            <left_val>0.0187921095639467</left_val>\r\n            <right_val>-0.4384852945804596</right_val></_></_>\r\n        <_>\r\n          <!-- tree 151 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 9 6 2 -1.</_>\r\n                <_>\r\n                  15 9 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0137434704229236</threshold>\r\n            <left_val>-0.4609765112400055</left_val>\r\n            <right_val>0.0122369602322578</right_val></_></_>\r\n        <_>\r\n          <!-- tree 152 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 2 2 -1.</_>\r\n                <_>\r\n                  6 7 1 1 2.</_>\r\n                <_>\r\n                  7 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.0322439484298229e-003</threshold>\r\n            <left_val>0.1648599952459335</left_val>\r\n            <right_val>-0.0516587682068348</right_val></_></_>\r\n        <_>\r\n          <!-- tree 153 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 9 6 2 -1.</_>\r\n                <_>\r\n                  15 9 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.8313361629843712e-003</threshold>\r\n            <left_val>0.0159355308860540</left_val>\r\n            <right_val>-0.2015953958034515</right_val></_></_>\r\n        <_>\r\n          <!-- tree 154 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 6 2 -1.</_>\r\n                <_>\r\n                  6 0 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0144206797704101</threshold>\r\n            <left_val>0.0160773508250713</left_val>\r\n            <right_val>-0.4641633033752441</right_val></_></_>\r\n        <_>\r\n          <!-- tree 155 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 9 6 2 -1.</_>\r\n                <_>\r\n                  15 9 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.8205989617854357e-003</threshold>\r\n            <left_val>0.0433134213089943</left_val>\r\n            <right_val>-0.0280837193131447</right_val></_></_>\r\n        <_>\r\n          <!-- tree 156 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 7 2 6 -1.</_>\r\n                <_>\r\n                  7 7 1 6 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>3.9304671809077263e-003</threshold>\r\n            <left_val>0.0497011989355087</left_val>\r\n            <right_val>-0.1514773964881897</right_val></_></_>\r\n        <_>\r\n          <!-- tree 157 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 0 1 10 -1.</_>\r\n                <_>\r\n                  24 5 1 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.3210691809654236e-003</threshold>\r\n            <left_val>-0.1029928028583527</left_val>\r\n            <right_val>0.0179813895374537</right_val></_></_>\r\n        <_>\r\n          <!-- tree 158 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 3 1 -1.</_>\r\n                <_>\r\n                  7 7 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.1277500307187438e-003</threshold>\r\n            <left_val>0.1659521013498306</left_val>\r\n            <right_val>-0.0483443103730679</right_val></_></_>\r\n        <_>\r\n          <!-- tree 159 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 13 2 2 -1.</_>\r\n                <_>\r\n                  15 13 1 1 2.</_>\r\n                <_>\r\n                  14 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.8385067172348499e-004</threshold>\r\n            <left_val>-0.1946461051702499</left_val>\r\n            <right_val>0.0250845197588205</right_val></_></_>\r\n        <_>\r\n          <!-- tree 160 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 7 4 1 -1.</_>\r\n                <_>\r\n                  9 7 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.5464341100305319e-004</threshold>\r\n            <left_val>0.1473073959350586</left_val>\r\n            <right_val>-0.0529893897473812</right_val></_></_>\r\n        <_>\r\n          <!-- tree 161 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 4 1 9 -1.</_>\r\n                <_>\r\n                  21 7 1 3 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-6.1449417844414711e-003</threshold>\r\n            <left_val>0.0951583385467529</left_val>\r\n            <right_val>-0.0323545187711716</right_val></_></_>\r\n        <_>\r\n          <!-- tree 162 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 4 9 1 -1.</_>\r\n                <_>\r\n                  4 7 3 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0537422299385071</threshold>\r\n            <left_val>-0.0160139091312885</left_val>\r\n            <right_val>0.5178387761116028</right_val></_></_>\r\n        <_>\r\n          <!-- tree 163 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 1 6 13 -1.</_>\r\n                <_>\r\n                  13 1 2 13 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.1773690655827522e-003</threshold>\r\n            <left_val>0.0658730715513229</left_val>\r\n            <right_val>-0.0286986008286476</right_val></_></_>\r\n        <_>\r\n          <!-- tree 164 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 2 4 7 -1.</_>\r\n                <_>\r\n                  11 2 2 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.6262140125036240e-003</threshold>\r\n            <left_val>0.1165013015270233</left_val>\r\n            <right_val>-0.0662005692720413</right_val></_></_>\r\n        <_>\r\n          <!-- tree 165 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 1 6 13 -1.</_>\r\n                <_>\r\n                  13 1 2 13 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0702467709779739</threshold>\r\n            <left_val>-0.5561671257019043</left_val>\r\n            <right_val>3.3650770783424377e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 166 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 1 6 13 -1.</_>\r\n                <_>\r\n                  10 1 2 13 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0457130484282970</threshold>\r\n            <left_val>-0.5554363131523132</left_val>\r\n            <right_val>0.0145238302648067</right_val></_></_>\r\n        <_>\r\n          <!-- tree 167 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 9 4 1 -1.</_>\r\n                <_>\r\n                  16 9 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.6252630157396197e-003</threshold>\r\n            <left_val>0.0774459466338158</left_val>\r\n            <right_val>-0.0477535910904408</right_val></_></_>\r\n        <_>\r\n          <!-- tree 168 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 9 4 1 -1.</_>\r\n                <_>\r\n                  7 9 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.7784547358751297e-003</threshold>\r\n            <left_val>-0.6660557985305786</left_val>\r\n            <right_val>0.0114997997879982</right_val></_></_>\r\n        <_>\r\n          <!-- tree 169 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 4 1 9 -1.</_>\r\n                <_>\r\n                  14 7 1 3 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0581780597567558</threshold>\r\n            <left_val>-0.0126901902258396</left_val>\r\n            <right_val>0.2431164979934692</right_val></_></_>\r\n        <_>\r\n          <!-- tree 170 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 4 2 2 -1.</_>\r\n                <_>\r\n                  7 4 1 1 2.</_>\r\n                <_>\r\n                  8 5 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.0166700230911374e-003</threshold>\r\n            <left_val>0.1701835989952087</left_val>\r\n            <right_val>-0.0434626787900925</right_val></_></_>\r\n        <_>\r\n          <!-- tree 171 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 9 2 2 -1.</_>\r\n                <_>\r\n                  14 9 1 1 2.</_>\r\n                <_>\r\n                  13 10 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.3186908159404993e-004</threshold>\r\n            <left_val>-0.1554417014122009</left_val>\r\n            <right_val>0.0277679692953825</right_val></_></_>\r\n        <_>\r\n          <!-- tree 172 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 11 2 2 -1.</_>\r\n                <_>\r\n                  7 11 1 1 2.</_>\r\n                <_>\r\n                  8 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.0635660146363080e-004</threshold>\r\n            <left_val>-0.0799610763788223</left_val>\r\n            <right_val>0.0975525230169296</right_val></_></_>\r\n        <_>\r\n          <!-- tree 173 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 9 2 2 -1.</_>\r\n                <_>\r\n                  14 9 1 1 2.</_>\r\n                <_>\r\n                  13 10 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.7358598355203867e-004</threshold>\r\n            <left_val>0.0280197393149138</left_val>\r\n            <right_val>-0.1640979051589966</right_val></_></_>\r\n        <_>\r\n          <!-- tree 174 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 13 10 1 -1.</_>\r\n                <_>\r\n                  11 13 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.1288288086652756e-003</threshold>\r\n            <left_val>0.1435500979423523</left_val>\r\n            <right_val>-0.0521811507642269</right_val></_></_>\r\n        <_>\r\n          <!-- tree 175 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 8 10 7 -1.</_>\r\n                <_>\r\n                  9 8 5 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0296237897127867</threshold>\r\n            <left_val>0.1256711930036545</left_val>\r\n            <right_val>-0.0727018266916275</right_val></_></_>\r\n        <_>\r\n          <!-- tree 176 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 5 15 10 -1.</_>\r\n                <_>\r\n                  9 5 5 10 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0479203201830387</threshold>\r\n            <left_val>-0.0627507865428925</left_val>\r\n            <right_val>0.1496749967336655</right_val></_></_>\r\n        <_>\r\n          <!-- tree 177 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 6 5 4 -1.</_>\r\n                <_>\r\n                  20 7 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0299077890813351</threshold>\r\n            <left_val>3.3279890194535255e-003</left_val>\r\n            <right_val>-0.5352283716201782</right_val></_></_>\r\n        <_>\r\n          <!-- tree 178 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 5 4 -1.</_>\r\n                <_>\r\n                  0 7 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.1103161163628101e-003</threshold>\r\n            <left_val>-0.1846338063478470</left_val>\r\n            <right_val>0.0402609407901764</right_val></_></_>\r\n        <_>\r\n          <!-- tree 179 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 7 3 1 -1.</_>\r\n                <_>\r\n                  12 7 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.1777599574998021e-003</threshold>\r\n            <left_val>-0.0421488806605339</left_val>\r\n            <right_val>0.1833201944828033</right_val></_></_>\r\n        <_>\r\n          <!-- tree 180 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 4 7 3 -1.</_>\r\n                <_>\r\n                  9 5 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0149721698835492</threshold>\r\n            <left_val>-0.0501780100166798</left_val>\r\n            <right_val>0.1479559987783432</right_val></_></_>\r\n        <_>\r\n          <!-- tree 181 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 4 4 3 -1.</_>\r\n                <_>\r\n                  15 4 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0226974897086620</threshold>\r\n            <left_val>8.8858045637607574e-003</left_val>\r\n            <right_val>-0.3510260879993439</right_val></_></_>\r\n        <_>\r\n          <!-- tree 182 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 4 4 3 -1.</_>\r\n                <_>\r\n                  8 4 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0128841297701001</threshold>\r\n            <left_val>0.0346549116075039</left_val>\r\n            <right_val>-0.2406193017959595</right_val></_></_>\r\n        <_>\r\n          <!-- tree 183 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 6 2 2 -1.</_>\r\n                <_>\r\n                  17 6 1 1 2.</_>\r\n                <_>\r\n                  16 7 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.1240700259804726e-003</threshold>\r\n            <left_val>0.1314530968666077</left_val>\r\n            <right_val>-0.0288430396467447</right_val></_></_>\r\n        <_>\r\n          <!-- tree 184 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 6 2 2 -1.</_>\r\n                <_>\r\n                  7 6 1 1 2.</_>\r\n                <_>\r\n                  8 7 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.3627869775518775e-003</threshold>\r\n            <left_val>0.2013843953609467</left_val>\r\n            <right_val>-0.0379555486142635</right_val></_></_>\r\n        <_>\r\n          <!-- tree 185 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 13 2 2 -1.</_>\r\n                <_>\r\n                  15 13 1 1 2.</_>\r\n                <_>\r\n                  14 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3557957289740443e-004</threshold>\r\n            <left_val>0.0279592797160149</left_val>\r\n            <right_val>-0.1196514964103699</right_val></_></_>\r\n        <_>\r\n          <!-- tree 186 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 4 2 -1.</_>\r\n                <_>\r\n                  6 0 4 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0152801796793938</threshold>\r\n            <left_val>-0.4851869940757752</left_val>\r\n            <right_val>0.0156223699450493</right_val></_></_>\r\n        <_>\r\n          <!-- tree 187 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 14 2 1 -1.</_>\r\n                <_>\r\n                  20 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.6412500523729250e-005</threshold>\r\n            <left_val>-0.0589389093220234</left_val>\r\n            <right_val>0.0601089298725128</right_val></_></_>\r\n        <_>\r\n          <!-- tree 188 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 13 6 2 -1.</_>\r\n                <_>\r\n                  1 13 3 1 2.</_>\r\n                <_>\r\n                  4 14 3 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.6553878393024206e-005</threshold>\r\n            <left_val>-0.0965948700904846</left_val>\r\n            <right_val>0.0779175236821175</right_val></_></_>\r\n        <_>\r\n          <!-- tree 189 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 1 2 2 -1.</_>\r\n                <_>\r\n                  12 2 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.8991239853203297e-003</threshold>\r\n            <left_val>-0.0261822007596493</left_val>\r\n            <right_val>0.1902385950088501</right_val></_></_>\r\n        <_>\r\n          <!-- tree 190 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 0 8 8 -1.</_>\r\n                <_>\r\n                  8 0 4 4 2.</_>\r\n                <_>\r\n                  12 4 4 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0237854700535536</threshold>\r\n            <left_val>0.0403596796095371</left_val>\r\n            <right_val>-0.1793317049741745</right_val></_></_>\r\n        <_>\r\n          <!-- tree 191 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 12 2 2 -1.</_>\r\n                <_>\r\n                  17 12 1 1 2.</_>\r\n                <_>\r\n                  16 13 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.9117228374816477e-005</threshold>\r\n            <left_val>-0.0676945373415947</left_val>\r\n            <right_val>0.0789666101336479</right_val></_></_>\r\n        <_>\r\n          <!-- tree 192 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 8 8 -1.</_>\r\n                <_>\r\n                  0 4 4 4 2.</_>\r\n                <_>\r\n                  4 8 4 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0585355199873447</threshold>\r\n            <left_val>-0.0279133208096027</left_val>\r\n            <right_val>0.2635962069034576</right_val></_></_>\r\n        <_>\r\n          <!-- tree 193 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 4 2 1 -1.</_>\r\n                <_>\r\n                  19 4 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.7125670611858368e-003</threshold>\r\n            <left_val>-0.8246011137962341</left_val>\r\n            <right_val>3.6960430443286896e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 194 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 4 2 1 -1.</_>\r\n                <_>\r\n                  5 4 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.6747662127017975e-003</threshold>\r\n            <left_val>-0.7625464797019959</left_val>\r\n            <right_val>9.2743840068578720e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 195 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 0 2 2 -1.</_>\r\n                <_>\r\n                  21 0 1 1 2.</_>\r\n                <_>\r\n                  20 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3981528617441654e-003</threshold>\r\n            <left_val>1.9147379789501429e-003</left_val>\r\n            <right_val>-0.8057739734649658</right_val></_></_>\r\n        <_>\r\n          <!-- tree 196 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 15 3 -1.</_>\r\n                <_>\r\n                  0 6 15 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.7252141200006008e-003</threshold>\r\n            <left_val>-0.0822006091475487</left_val>\r\n            <right_val>0.0925986021757126</right_val></_></_>\r\n        <_>\r\n          <!-- tree 197 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 5 1 3 -1.</_>\r\n                <_>\r\n                  13 6 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.1672140099108219e-003</threshold>\r\n            <left_val>0.1147938966751099</left_val>\r\n            <right_val>-0.0459650196135044</right_val></_></_>\r\n        <_>\r\n          <!-- tree 198 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 9 3 2 -1.</_>\r\n                <_>\r\n                  5 10 1 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-7.4022258631885052e-003</threshold>\r\n            <left_val>-0.4262216091156006</left_val>\r\n            <right_val>0.0174518898129463</right_val></_></_>\r\n        <_>\r\n          <!-- tree 199 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 0 2 2 -1.</_>\r\n                <_>\r\n                  21 0 1 1 2.</_>\r\n                <_>\r\n                  20 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.5430802351329476e-005</threshold>\r\n            <left_val>-0.0445476993918419</left_val>\r\n            <right_val>0.0498182512819767</right_val></_></_>\r\n        <_>\r\n          <!-- tree 200 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 2 2 -1.</_>\r\n                <_>\r\n                  3 0 1 1 2.</_>\r\n                <_>\r\n                  4 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.6353430661838502e-005</threshold>\r\n            <left_val>-0.0820099934935570</left_val>\r\n            <right_val>0.0922331288456917</right_val></_></_></trees>\r\n      <stage_threshold>-1.2964390516281128</stage_threshold>\r\n      <parent>14</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 16 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 12 4 -1.</_>\r\n                <_>\r\n                  0 11 6 2 2.</_>\r\n                <_>\r\n                  6 13 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0105607798323035</threshold>\r\n            <left_val>-0.1728546023368835</left_val>\r\n            <right_val>0.2072951048612595</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 1 8 4 -1.</_>\r\n                <_>\r\n                  17 3 8 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0382373891770840</threshold>\r\n            <left_val>0.1771112978458405</left_val>\r\n            <right_val>-0.1585303992033005</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 6 13 6 -1.</_>\r\n                <_>\r\n                  6 8 13 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0541206710040569</threshold>\r\n            <left_val>0.2564443051815033</left_val>\r\n            <right_val>-0.0884335711598396</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 4 2 3 -1.</_>\r\n                <_>\r\n                  23 4 1 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.2004460915923119e-003</threshold>\r\n            <left_val>0.2010346055030823</left_val>\r\n            <right_val>-0.1101640984416008</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 13 10 2 -1.</_>\r\n                <_>\r\n                  2 14 10 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0654388666152954</threshold>\r\n            <left_val>7.8213139204308391e-004</left_val>\r\n            <right_val>-4.3508232421875000e+003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 4 2 3 -1.</_>\r\n                <_>\r\n                  23 4 1 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0135645801201463</threshold>\r\n            <left_val>-0.5407810807228088</left_val>\r\n            <right_val>4.8653590492904186e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 2 3 -1.</_>\r\n                <_>\r\n                  1 4 1 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.8708320567384362e-003</threshold>\r\n            <left_val>0.1633561998605728</left_val>\r\n            <right_val>-0.1228590980172157</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 7 21 3 -1.</_>\r\n                <_>\r\n                  9 8 7 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1699268966913223</threshold>\r\n            <left_val>-4.5410599559545517e-003</left_val>\r\n            <right_val>0.4810850024223328</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 11 2 2 -1.</_>\r\n                <_>\r\n                  2 11 1 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>3.5981500986963511e-003</threshold>\r\n            <left_val>0.0356757305562496</left_val>\r\n            <right_val>-0.4236158132553101</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 2 21 6 -1.</_>\r\n                <_>\r\n                  9 4 7 2 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.5448976159095764</threshold>\r\n            <left_val>-0.0198735594749451</left_val>\r\n            <right_val>0.5460472106933594</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 1 8 6 -1.</_>\r\n                <_>\r\n                  1 3 8 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0627753064036369</threshold>\r\n            <left_val>0.1722137033939362</left_val>\r\n            <right_val>-0.1143800020217896</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 4 15 4 -1.</_>\r\n                <_>\r\n                  6 5 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0459444113075733</threshold>\r\n            <left_val>0.2595784068107605</left_val>\r\n            <right_val>-0.0732216089963913</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 10 4 1 -1.</_>\r\n                <_>\r\n                  3 11 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>2.1809421014040709e-003</threshold>\r\n            <left_val>0.0495434813201427</left_val>\r\n            <right_val>-0.3175086975097656</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 14 18 1 -1.</_>\r\n                <_>\r\n                  4 14 9 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.6566081047058105e-003</threshold>\r\n            <left_val>0.1581763029098511</left_val>\r\n            <right_val>-0.0890468433499336</right_val></_></_>\r\n        <_>\r\n          <!-- tree 14 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 24 10 -1.</_>\r\n                <_>\r\n                  0 3 12 5 2.</_>\r\n                <_>\r\n                  12 8 12 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0808042436838150</threshold>\r\n            <left_val>0.0503276288509369</left_val>\r\n            <right_val>-0.2887117862701416</right_val></_></_>\r\n        <_>\r\n          <!-- tree 15 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 3 10 12 -1.</_>\r\n                <_>\r\n                  20 3 5 6 2.</_>\r\n                <_>\r\n                  15 9 5 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0987789332866669</threshold>\r\n            <left_val>-0.0381883382797241</left_val>\r\n            <right_val>0.3119831085205078</right_val></_></_>\r\n        <_>\r\n          <!-- tree 16 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 5 6 3 -1.</_>\r\n                <_>\r\n                  9 6 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.4114018827676773e-003</threshold>\r\n            <left_val>-0.0949936509132385</left_val>\r\n            <right_val>0.1344850063323975</right_val></_></_>\r\n        <_>\r\n          <!-- tree 17 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 13 21 1 -1.</_>\r\n                <_>\r\n                  9 13 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0147700998932123</threshold>\r\n            <left_val>0.1715719997882843</left_val>\r\n            <right_val>-0.0750405564904213</right_val></_></_>\r\n        <_>\r\n          <!-- tree 18 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 10 12 -1.</_>\r\n                <_>\r\n                  0 3 5 6 2.</_>\r\n                <_>\r\n                  5 9 5 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1057564020156860</threshold>\r\n            <left_val>-0.0440231785178185</left_val>\r\n            <right_val>0.3495194017887116</right_val></_></_>\r\n        <_>\r\n          <!-- tree 19 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 4 -1.</_>\r\n                <_>\r\n                  5 4 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0401043891906738</threshold>\r\n            <left_val>-0.0572791509330273</left_val>\r\n            <right_val>0.2763915061950684</right_val></_></_>\r\n        <_>\r\n          <!-- tree 20 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 6 9 3 -1.</_>\r\n                <_>\r\n                  8 7 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0135993398725986</threshold>\r\n            <left_val>-0.0886402428150177</left_val>\r\n            <right_val>0.1596630066633225</right_val></_></_>\r\n        <_>\r\n          <!-- tree 21 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 13 3 1 -1.</_>\r\n                <_>\r\n                  15 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.3378789667040110e-003</threshold>\r\n            <left_val>-0.4990870058536530</left_val>\r\n            <right_val>7.1760369464755058e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 22 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 1 10 2 -1.</_>\r\n                <_>\r\n                  7 2 10 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.5490198321640491e-003</threshold>\r\n            <left_val>-0.0597806982696056</left_val>\r\n            <right_val>0.2110590040683746</right_val></_></_>\r\n        <_>\r\n          <!-- tree 23 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 13 3 1 -1.</_>\r\n                <_>\r\n                  15 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.2758670537732542e-005</threshold>\r\n            <left_val>0.0655476525425911</left_val>\r\n            <right_val>-0.0541992485523224</right_val></_></_>\r\n        <_>\r\n          <!-- tree 24 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 13 3 1 -1.</_>\r\n                <_>\r\n                  9 13 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.0889551211148500e-004</threshold>\r\n            <left_val>0.0425700992345810</left_val>\r\n            <right_val>-0.2828716039657593</right_val></_></_>\r\n        <_>\r\n          <!-- tree 25 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 0 24 12 -1.</_>\r\n                <_>\r\n                  13 0 12 6 2.</_>\r\n                <_>\r\n                  1 6 12 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0881031826138496</threshold>\r\n            <left_val>0.0406627096235752</left_val>\r\n            <right_val>-0.2983728945255280</right_val></_></_>\r\n        <_>\r\n          <!-- tree 26 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 13 14 -1.</_>\r\n                <_>\r\n                  0 7 13 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1351538002490997</threshold>\r\n            <left_val>-0.4011076092720032</left_val>\r\n            <right_val>0.0259989295154810</right_val></_></_>\r\n        <_>\r\n          <!-- tree 27 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 6 3 3 -1.</_>\r\n                <_>\r\n                  20 7 3 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0105496803298593</threshold>\r\n            <left_val>0.0265602301806211</left_val>\r\n            <right_val>-0.3554666042327881</right_val></_></_>\r\n        <_>\r\n          <!-- tree 28 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 9 8 4 -1.</_>\r\n                <_>\r\n                  8 10 8 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0109745198860765</threshold>\r\n            <left_val>0.1540209054946899</left_val>\r\n            <right_val>-0.0715849623084068</right_val></_></_>\r\n        <_>\r\n          <!-- tree 29 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 10 6 4 -1.</_>\r\n                <_>\r\n                  15 10 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0128105496987700</threshold>\r\n            <left_val>-0.2680475115776062</left_val>\r\n            <right_val>0.0205432493239641</right_val></_></_>\r\n        <_>\r\n          <!-- tree 30 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 3 4 4 -1.</_>\r\n                <_>\r\n                  11 3 2 4 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0673751235008240</threshold>\r\n            <left_val>-0.5299177169799805</left_val>\r\n            <right_val>0.0192500203847885</right_val></_></_>\r\n        <_>\r\n          <!-- tree 31 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 10 6 4 -1.</_>\r\n                <_>\r\n                  15 10 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0133285904303193</threshold>\r\n            <left_val>0.0141924796625972</left_val>\r\n            <right_val>-0.2692896127700806</right_val></_></_>\r\n        <_>\r\n          <!-- tree 32 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 10 10 4 -1.</_>\r\n                <_>\r\n                  7 12 10 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0349247902631760</threshold>\r\n            <left_val>0.2877762019634247</left_val>\r\n            <right_val>-0.0366922505199909</right_val></_></_>\r\n        <_>\r\n          <!-- tree 33 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 10 6 4 -1.</_>\r\n                <_>\r\n                  15 10 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0259607005864382</threshold>\r\n            <left_val>-0.5250588059425354</left_val>\r\n            <right_val>4.2013241909444332e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 34 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 10 6 4 -1.</_>\r\n                <_>\r\n                  8 10 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0144326100125909</threshold>\r\n            <left_val>-0.4404621124267578</left_val>\r\n            <right_val>0.0239412691444159</right_val></_></_>\r\n        <_>\r\n          <!-- tree 35 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 14 4 1 -1.</_>\r\n                <_>\r\n                  21 14 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.0242980206385255e-003</threshold>\r\n            <left_val>-0.0813294127583504</left_val>\r\n            <right_val>0.1090075969696045</right_val></_></_>\r\n        <_>\r\n          <!-- tree 36 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 4 4 -1.</_>\r\n                <_>\r\n                  0 8 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.3913699444383383e-003</threshold>\r\n            <left_val>-0.2744260132312775</left_val>\r\n            <right_val>0.0353980511426926</right_val></_></_>\r\n        <_>\r\n          <!-- tree 37 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 3 6 12 -1.</_>\r\n                <_>\r\n                  22 3 3 6 2.</_>\r\n                <_>\r\n                  19 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0254591107368469</threshold>\r\n            <left_val>0.1884281933307648</left_val>\r\n            <right_val>-0.0505212917923927</right_val></_></_>\r\n        <_>\r\n          <!-- tree 38 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 15 2 -1.</_>\r\n                <_>\r\n                  5 2 15 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0250639300793409</threshold>\r\n            <left_val>0.1583306044340134</left_val>\r\n            <right_val>-0.0679820179939270</right_val></_></_>\r\n        <_>\r\n          <!-- tree 39 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 1 3 4 -1.</_>\r\n                <_>\r\n                  19 2 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.5757358893752098e-003</threshold>\r\n            <left_val>-0.0512838996946812</left_val>\r\n            <right_val>0.1146584972739220</right_val></_></_>\r\n        <_>\r\n          <!-- tree 40 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 5 20 4 -1.</_>\r\n                <_>\r\n                  12 5 10 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.1538352966308594</threshold>\r\n            <left_val>0.4274145960807800</left_val>\r\n            <right_val>-0.0233538504689932</right_val></_></_>\r\n        <_>\r\n          <!-- tree 41 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 14 4 1 -1.</_>\r\n                <_>\r\n                  21 14 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.7441980354487896e-003</threshold>\r\n            <left_val>0.0116364201530814</left_val>\r\n            <right_val>-0.1990616023540497</right_val></_></_>\r\n        <_>\r\n          <!-- tree 42 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 14 4 1 -1.</_>\r\n                <_>\r\n                  2 14 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.9857632257044315e-004</threshold>\r\n            <left_val>-0.1112217977643013</left_val>\r\n            <right_val>0.0913273170590401</right_val></_></_>\r\n        <_>\r\n          <!-- tree 43 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 3 6 12 -1.</_>\r\n                <_>\r\n                  22 3 3 6 2.</_>\r\n                <_>\r\n                  19 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0416502095758915</threshold>\r\n            <left_val>-0.0342307090759277</left_val>\r\n            <right_val>0.1340909004211426</right_val></_></_>\r\n        <_>\r\n          <!-- tree 44 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 6 12 -1.</_>\r\n                <_>\r\n                  0 3 3 6 2.</_>\r\n                <_>\r\n                  3 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0486865788698196</threshold>\r\n            <left_val>0.3840608894824982</left_val>\r\n            <right_val>-0.0367092713713646</right_val></_></_>\r\n        <_>\r\n          <!-- tree 45 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 1 3 4 -1.</_>\r\n                <_>\r\n                  19 2 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0142661100253463</threshold>\r\n            <left_val>0.1904101967811585</left_val>\r\n            <right_val>-0.0373262614011765</right_val></_></_>\r\n        <_>\r\n          <!-- tree 46 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 1 3 4 -1.</_>\r\n                <_>\r\n                  3 2 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.0738251041620970e-003</threshold>\r\n            <left_val>-0.0940800234675407</left_val>\r\n            <right_val>0.1367546021938324</right_val></_></_>\r\n        <_>\r\n          <!-- tree 47 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 1 10 2 -1.</_>\r\n                <_>\r\n                  10 1 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0127805396914482</threshold>\r\n            <left_val>0.0790209397673607</left_val>\r\n            <right_val>-0.0321417711675167</right_val></_></_>\r\n        <_>\r\n          <!-- tree 48 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 8 3 -1.</_>\r\n                <_>\r\n                  9 0 4 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.7420884519815445e-003</threshold>\r\n            <left_val>-0.0805833786725998</left_val>\r\n            <right_val>0.1433219015598297</right_val></_></_>\r\n        <_>\r\n          <!-- tree 49 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 0 2 1 -1.</_>\r\n                <_>\r\n                  21 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>6.9780537160113454e-005</threshold>\r\n            <left_val>-0.1539752036333084</left_val>\r\n            <right_val>0.0694082602858543</right_val></_></_>\r\n        <_>\r\n          <!-- tree 50 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 8 4 2 -1.</_>\r\n                <_>\r\n                  3 9 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-7.9981610178947449e-003</threshold>\r\n            <left_val>-0.4497911930084229</left_val>\r\n            <right_val>0.0232297703623772</right_val></_></_>\r\n        <_>\r\n          <!-- tree 51 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 0 2 1 -1.</_>\r\n                <_>\r\n                  21 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>5.3804512135684490e-003</threshold>\r\n            <left_val>0.0246548391878605</left_val>\r\n            <right_val>-0.1725358963012695</right_val></_></_>\r\n        <_>\r\n          <!-- tree 52 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 21 1 -1.</_>\r\n                <_>\r\n                  9 0 7 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0200069397687912</threshold>\r\n            <left_val>0.1652639061212540</left_val>\r\n            <right_val>-0.0625987574458122</right_val></_></_>\r\n        <_>\r\n          <!-- tree 53 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 0 2 1 -1.</_>\r\n                <_>\r\n                  21 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-4.4656409882009029e-003</threshold>\r\n            <left_val>-0.3730463087558746</left_val>\r\n            <right_val>0.0105512700974941</right_val></_></_>\r\n        <_>\r\n          <!-- tree 54 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 1 2 -1.</_>\r\n                <_>\r\n                  4 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-3.1919090542942286e-003</threshold>\r\n            <left_val>-0.4411549866199493</left_val>\r\n            <right_val>0.0209588091820478</right_val></_></_>\r\n        <_>\r\n          <!-- tree 55 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 11 24 4 -1.</_>\r\n                <_>\r\n                  13 11 12 2 2.</_>\r\n                <_>\r\n                  1 13 12 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0622704289853573</threshold>\r\n            <left_val>-0.5413467884063721</left_val>\r\n            <right_val>0.0132205402478576</right_val></_></_>\r\n        <_>\r\n          <!-- tree 56 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 24 4 -1.</_>\r\n                <_>\r\n                  0 11 12 2 2.</_>\r\n                <_>\r\n                  12 13 12 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0449563488364220</threshold>\r\n            <left_val>-0.4331294000148773</left_val>\r\n            <right_val>0.0206683203577995</right_val></_></_>\r\n        <_>\r\n          <!-- tree 57 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 5 2 2 -1.</_>\r\n                <_>\r\n                  17 5 1 1 2.</_>\r\n                <_>\r\n                  16 6 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.1595709947869182e-003</threshold>\r\n            <left_val>-0.0236924402415752</left_val>\r\n            <right_val>0.1087998002767563</right_val></_></_>\r\n        <_>\r\n          <!-- tree 58 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 5 2 2 -1.</_>\r\n                <_>\r\n                  7 5 1 1 2.</_>\r\n                <_>\r\n                  8 6 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.8405620772391558e-004</threshold>\r\n            <left_val>0.1649617999792099</left_val>\r\n            <right_val>-0.0524947308003902</right_val></_></_>\r\n        <_>\r\n          <!-- tree 59 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 1 6 2 -1.</_>\r\n                <_>\r\n                  18 1 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0266917701810598</threshold>\r\n            <left_val>0.0148458201438189</left_val>\r\n            <right_val>-0.5571644902229309</right_val></_></_>\r\n        <_>\r\n          <!-- tree 60 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 21 2 -1.</_>\r\n                <_>\r\n                  9 0 7 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0182767305523157</threshold>\r\n            <left_val>-0.0662862136960030</left_val>\r\n            <right_val>0.1257701069116592</right_val></_></_>\r\n        <_>\r\n          <!-- tree 61 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 0 10 15 -1.</_>\r\n                <_>\r\n                  13 0 5 15 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0809113383293152</threshold>\r\n            <left_val>0.1131376996636391</left_val>\r\n            <right_val>-0.0498078204691410</right_val></_></_>\r\n        <_>\r\n          <!-- tree 62 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 0 13 4 -1.</_>\r\n                <_>\r\n                  6 1 13 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0364037007093430</threshold>\r\n            <left_val>0.2336605936288834</left_val>\r\n            <right_val>-0.0383339710533619</right_val></_></_>\r\n        <_>\r\n          <!-- tree 63 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 3 9 3 -1.</_>\r\n                <_>\r\n                  11 4 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0139478798955679</threshold>\r\n            <left_val>0.0991646125912666</left_val>\r\n            <right_val>-0.0678260922431946</right_val></_></_>\r\n        <_>\r\n          <!-- tree 64 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 2 10 3 -1.</_>\r\n                <_>\r\n                  2 3 10 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0224205106496811</threshold>\r\n            <left_val>0.1904506981372833</left_val>\r\n            <right_val>-0.0484246909618378</right_val></_></_>\r\n        <_>\r\n          <!-- tree 65 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 6 16 8 -1.</_>\r\n                <_>\r\n                  6 6 8 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0995163321495056</threshold>\r\n            <left_val>-0.0482200607657433</left_val>\r\n            <right_val>0.2056124061346054</right_val></_></_>\r\n        <_>\r\n          <!-- tree 66 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 0 12 15 -1.</_>\r\n                <_>\r\n                  8 0 6 15 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1495629996061325</threshold>\r\n            <left_val>0.0141723398119211</left_val>\r\n            <right_val>-0.6450886726379395</right_val></_></_>\r\n        <_>\r\n          <!-- tree 67 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 8 2 4 -1.</_>\r\n                <_>\r\n                  23 8 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.6693442901596427e-004</threshold>\r\n            <left_val>-0.0378436110913754</left_val>\r\n            <right_val>0.0635498985648155</right_val></_></_>\r\n        <_>\r\n          <!-- tree 68 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 3 3 -1.</_>\r\n                <_>\r\n                  0 6 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0120417503640056</threshold>\r\n            <left_val>0.0180350895971060</left_val>\r\n            <right_val>-0.4774137139320374</right_val></_></_>\r\n        <_>\r\n          <!-- tree 69 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 5 4 2 -1.</_>\r\n                <_>\r\n                  22 5 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.3097700905054808e-003</threshold>\r\n            <left_val>-0.0415334291756153</left_val>\r\n            <right_val>0.1302794069051743</right_val></_></_>\r\n        <_>\r\n          <!-- tree 70 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 4 2 -1.</_>\r\n                <_>\r\n                  1 5 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.2019869647920132e-003</threshold>\r\n            <left_val>-0.0514689311385155</left_val>\r\n            <right_val>0.1736146062612534</right_val></_></_>\r\n        <_>\r\n          <!-- tree 71 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 2 3 4 -1.</_>\r\n                <_>\r\n                  22 3 1 4 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0272558908909559</threshold>\r\n            <left_val>-0.0153390001505613</left_val>\r\n            <right_val>0.3625235855579376</right_val></_></_>\r\n        <_>\r\n          <!-- tree 72 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 2 4 3 -1.</_>\r\n                <_>\r\n                  3 3 4 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>8.8747506961226463e-003</threshold>\r\n            <left_val>-0.0426916293799877</left_val>\r\n            <right_val>0.2076780050992966</right_val></_></_>\r\n        <_>\r\n          <!-- tree 73 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 2 2 2 -1.</_>\r\n                <_>\r\n                  23 2 2 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>4.7241621650755405e-003</threshold>\r\n            <left_val>-0.0500567816197872</left_val>\r\n            <right_val>0.0873611792922020</right_val></_></_>\r\n        <_>\r\n          <!-- tree 74 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 4 4 -1.</_>\r\n                <_>\r\n                  0 6 4 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.3167313530575484e-005</threshold>\r\n            <left_val>-0.1244131028652191</left_val>\r\n            <right_val>0.0726777836680412</right_val></_></_>\r\n        <_>\r\n          <!-- tree 75 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 7 2 5 -1.</_>\r\n                <_>\r\n                  23 7 1 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.2639940250664949e-003</threshold>\r\n            <left_val>0.0776199027895927</left_val>\r\n            <right_val>-0.0404986217617989</right_val></_></_>\r\n        <_>\r\n          <!-- tree 76 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 1 4 -1.</_>\r\n                <_>\r\n                  0 1 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.6909559275954962e-003</threshold>\r\n            <left_val>0.0311388503760099</left_val>\r\n            <right_val>-0.3086219131946564</right_val></_></_>\r\n        <_>\r\n          <!-- tree 77 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 1 2 4 -1.</_>\r\n                <_>\r\n                  23 3 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0283522401005030</threshold>\r\n            <left_val>-0.3550184071063995</left_val>\r\n            <right_val>0.0135328602045774</right_val></_></_>\r\n        <_>\r\n          <!-- tree 78 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 1 2 4 -1.</_>\r\n                <_>\r\n                  0 3 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.6667202888056636e-004</threshold>\r\n            <left_val>0.0676028430461884</left_val>\r\n            <right_val>-0.1432974934577942</right_val></_></_>\r\n        <_>\r\n          <!-- tree 79 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 3 5 4 -1.</_>\r\n                <_>\r\n                  19 4 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0587403103709221</threshold>\r\n            <left_val>-0.5506312847137451</left_val>\r\n            <right_val>4.2741261422634125e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 80 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 1 6 2 -1.</_>\r\n                <_>\r\n                  12 1 6 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0272757392376661</threshold>\r\n            <left_val>-0.6493160724639893</left_val>\r\n            <right_val>0.0125345299020410</right_val></_></_>\r\n        <_>\r\n          <!-- tree 81 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 11 6 4 -1.</_>\r\n                <_>\r\n                  19 12 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0117558799684048</threshold>\r\n            <left_val>-0.5648565292358398</left_val>\r\n            <right_val>0.0137637602165341</right_val></_></_>\r\n        <_>\r\n          <!-- tree 82 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 3 6 4 -1.</_>\r\n                <_>\r\n                  1 4 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.5923758558928967e-003</threshold>\r\n            <left_val>-0.0431140698492527</left_val>\r\n            <right_val>0.2005586028099060</right_val></_></_>\r\n        <_>\r\n          <!-- tree 83 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 0 2 1 -1.</_>\r\n                <_>\r\n                  23 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-7.1979401400312781e-004</threshold>\r\n            <left_val>-0.1374174952507019</left_val>\r\n            <right_val>0.0340671092271805</right_val></_></_>\r\n        <_>\r\n          <!-- tree 84 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 1 2 -1.</_>\r\n                <_>\r\n                  2 0 1 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>4.1190441697835922e-003</threshold>\r\n            <left_val>0.0367105789482594</left_val>\r\n            <right_val>-0.2477497011423111</right_val></_></_>\r\n        <_>\r\n          <!-- tree 85 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 0 4 2 -1.</_>\r\n                <_>\r\n                  20 0 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.5443051755428314e-003</threshold>\r\n            <left_val>7.2344779036939144e-003</left_val>\r\n            <right_val>-0.4473736882209778</right_val></_></_>\r\n        <_>\r\n          <!-- tree 86 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 2 12 -1.</_>\r\n                <_>\r\n                  0 0 1 6 2.</_>\r\n                <_>\r\n                  1 6 1 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.2358289249241352e-003</threshold>\r\n            <left_val>0.2173164039850235</left_val>\r\n            <right_val>-0.0386803299188614</right_val></_></_>\r\n        <_>\r\n          <!-- tree 87 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 4 2 8 -1.</_>\r\n                <_>\r\n                  23 4 1 4 2.</_>\r\n                <_>\r\n                  22 8 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.4686598964035511e-004</threshold>\r\n            <left_val>-0.0371707193553448</left_val>\r\n            <right_val>0.0385193713009357</right_val></_></_>\r\n        <_>\r\n          <!-- tree 88 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 4 2 8 -1.</_>\r\n                <_>\r\n                  1 4 1 4 2.</_>\r\n                <_>\r\n                  2 8 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.8468490866944194e-004</threshold>\r\n            <left_val>-0.1020980030298233</left_val>\r\n            <right_val>0.0926149412989616</right_val></_></_>\r\n        <_>\r\n          <!-- tree 89 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 9 4 1 -1.</_>\r\n                <_>\r\n                  17 9 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.1738609755411744e-003</threshold>\r\n            <left_val>0.1108791977167130</left_val>\r\n            <right_val>-0.0856960415840149</right_val></_></_>\r\n        <_>\r\n          <!-- tree 90 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 2 5 8 -1.</_>\r\n                <_>\r\n                  10 4 5 4 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0989599674940109</threshold>\r\n            <left_val>-0.4499149918556213</left_val>\r\n            <right_val>0.0212421305477619</right_val></_></_>\r\n        <_>\r\n          <!-- tree 91 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  18 13 2 2 -1.</_>\r\n                <_>\r\n                  19 13 1 1 2.</_>\r\n                <_>\r\n                  18 14 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.8248471729457378e-004</threshold>\r\n            <left_val>0.0228975899517536</left_val>\r\n            <right_val>-0.1995048969984055</right_val></_></_>\r\n        <_>\r\n          <!-- tree 92 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 9 13 6 -1.</_>\r\n                <_>\r\n                  6 11 13 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0413776896893978</threshold>\r\n            <left_val>0.1549389958381653</left_val>\r\n            <right_val>-0.0591393709182739</right_val></_></_>\r\n        <_>\r\n          <!-- tree 93 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 10 13 4 -1.</_>\r\n                <_>\r\n                  6 11 13 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.7946789786219597e-003</threshold>\r\n            <left_val>-0.0783610120415688</left_val>\r\n            <right_val>0.1739570051431656</right_val></_></_>\r\n        <_>\r\n          <!-- tree 94 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 24 4 -1.</_>\r\n                <_>\r\n                  0 8 12 2 2.</_>\r\n                <_>\r\n                  12 10 12 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0447585098445416</threshold>\r\n            <left_val>0.0260890107601881</left_val>\r\n            <right_val>-0.3311159014701843</right_val></_></_>\r\n        <_>\r\n          <!-- tree 95 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 10 8 3 -1.</_>\r\n                <_>\r\n                  17 11 8 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.9978479724377394e-003</threshold>\r\n            <left_val>0.0459281504154205</left_val>\r\n            <right_val>-0.1491470038890839</right_val></_></_>\r\n        <_>\r\n          <!-- tree 96 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 16 8 -1.</_>\r\n                <_>\r\n                  4 0 8 4 2.</_>\r\n                <_>\r\n                  12 4 8 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0595893599092960</threshold>\r\n            <left_val>-0.2485350966453552</left_val>\r\n            <right_val>0.0325236506760120</right_val></_></_>\r\n        <_>\r\n          <!-- tree 97 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 0 1 2 -1.</_>\r\n                <_>\r\n                  14 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.4199320301413536e-004</threshold>\r\n            <left_val>-0.0425546802580357</left_val>\r\n            <right_val>0.1344856023788452</right_val></_></_>\r\n        <_>\r\n          <!-- tree 98 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 9 6 6 -1.</_>\r\n                <_>\r\n                  5 9 2 6 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0239475108683109</threshold>\r\n            <left_val>-0.4583190977573395</left_val>\r\n            <right_val>0.0178181305527687</right_val></_></_>\r\n        <_>\r\n          <!-- tree 99 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 10 12 3 -1.</_>\r\n                <_>\r\n                  16 10 6 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.4462359771132469e-003</threshold>\r\n            <left_val>-0.0423585288226604</left_val>\r\n            <right_val>0.0580310709774494</right_val></_></_>\r\n        <_>\r\n          <!-- tree 100 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 10 12 3 -1.</_>\r\n                <_>\r\n                  3 10 6 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0129095697775483</threshold>\r\n            <left_val>0.1973039060831070</left_val>\r\n            <right_val>-0.0445232689380646</right_val></_></_>\r\n        <_>\r\n          <!-- tree 101 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 8 5 3 -1.</_>\r\n                <_>\r\n                  19 9 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.8930921107530594e-003</threshold>\r\n            <left_val>0.0428810603916645</left_val>\r\n            <right_val>-0.1371746063232422</right_val></_></_>\r\n        <_>\r\n          <!-- tree 102 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 1 3 1 -1.</_>\r\n                <_>\r\n                  8 1 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.8186258431524038e-004</threshold>\r\n            <left_val>0.1337869018316269</left_val>\r\n            <right_val>-0.0565496906638145</right_val></_></_>\r\n        <_>\r\n          <!-- tree 103 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 1 3 1 -1.</_>\r\n                <_>\r\n                  16 1 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.0884382370859385e-004</threshold>\r\n            <left_val>-0.0361675098538399</left_val>\r\n            <right_val>0.1220118999481201</right_val></_></_>\r\n        <_>\r\n          <!-- tree 104 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 1 3 1 -1.</_>\r\n                <_>\r\n                  8 1 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.2305429815314710e-004</threshold>\r\n            <left_val>-0.0695094764232636</left_val>\r\n            <right_val>0.1302513927221298</right_val></_></_>\r\n        <_>\r\n          <!-- tree 105 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 8 2 3 -1.</_>\r\n                <_>\r\n                  20 9 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.6460029873996973e-003</threshold>\r\n            <left_val>-0.1300535947084427</left_val>\r\n            <right_val>0.0327382087707520</right_val></_></_>\r\n        <_>\r\n          <!-- tree 106 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 0 4 2 -1.</_>\r\n                <_>\r\n                  3 0 2 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.2493818588554859e-003</threshold>\r\n            <left_val>0.0122888395562768</left_val>\r\n            <right_val>-0.6227869987487793</right_val></_></_>\r\n        <_>\r\n          <!-- tree 107 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 8 5 3 -1.</_>\r\n                <_>\r\n                  19 9 5 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.8207803890109062e-003</threshold>\r\n            <left_val>7.4369488283991814e-003</left_val>\r\n            <right_val>-0.1486981958150864</right_val></_></_>\r\n        <_>\r\n          <!-- tree 108 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 1 6 11 -1.</_>\r\n                <_>\r\n                  6 1 2 11 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0359272807836533</threshold>\r\n            <left_val>0.0188675802201033</left_val>\r\n            <right_val>-0.3921496868133545</right_val></_></_>\r\n        <_>\r\n          <!-- tree 109 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 9 2 1 -1.</_>\r\n                <_>\r\n                  16 9 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.1618811741936952e-005</threshold>\r\n            <left_val>0.0568877793848515</left_val>\r\n            <right_val>-0.0677392184734344</right_val></_></_>\r\n        <_>\r\n          <!-- tree 110 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 2 15 4 -1.</_>\r\n                <_>\r\n                  5 3 15 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0374080687761307</threshold>\r\n            <left_val>-0.0385471209883690</left_val>\r\n            <right_val>0.2218790054321289</right_val></_></_>\r\n        <_>\r\n          <!-- tree 111 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 2 3 3 -1.</_>\r\n                <_>\r\n                  11 3 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.2155661396682262e-003</threshold>\r\n            <left_val>0.1363334953784943</left_val>\r\n            <right_val>-0.0673948600888252</right_val></_></_>\r\n        <_>\r\n          <!-- tree 112 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 7 18 6 -1.</_>\r\n                <_>\r\n                  11 7 9 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0935681909322739</threshold>\r\n            <left_val>0.1743745058774948</left_val>\r\n            <right_val>-0.0487747117877007</right_val></_></_>\r\n        <_>\r\n          <!-- tree 113 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 6 24 9 -1.</_>\r\n                <_>\r\n                  7 6 12 9 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0762281417846680</threshold>\r\n            <left_val>-0.0574758499860764</left_val>\r\n            <right_val>0.1471180021762848</right_val></_></_>\r\n        <_>\r\n          <!-- tree 114 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 1 10 -1.</_>\r\n                <_>\r\n                  0 5 1 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0200377702713013</threshold>\r\n            <left_val>-0.4157789945602417</left_val>\r\n            <right_val>0.0179230198264122</right_val></_></_>\r\n        <_>\r\n          <!-- tree 115 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 3 10 2 -1.</_>\r\n                <_>\r\n                  9 4 10 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0118243796750903</threshold>\r\n            <left_val>0.1144623011350632</left_val>\r\n            <right_val>-0.0700482204556465</right_val></_></_>\r\n        <_>\r\n          <!-- tree 116 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 6 1 3 -1.</_>\r\n                <_>\r\n                  12 7 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.6057320171967149e-003</threshold>\r\n            <left_val>0.1678820997476578</left_val>\r\n            <right_val>-0.0499466583132744</right_val></_></_>\r\n        <_>\r\n          <!-- tree 117 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 9 2 1 -1.</_>\r\n                <_>\r\n                  16 9 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.5517439935356379e-003</threshold>\r\n            <left_val>-0.3828516900539398</left_val>\r\n            <right_val>0.0113612702116370</right_val></_></_>\r\n        <_>\r\n          <!-- tree 118 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 9 2 1 -1.</_>\r\n                <_>\r\n                  8 9 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.9515629699453712e-005</threshold>\r\n            <left_val>0.0925496816635132</left_val>\r\n            <right_val>-0.0903496667742729</right_val></_></_>\r\n        <_>\r\n          <!-- tree 119 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 7 6 6 -1.</_>\r\n                <_>\r\n                  19 7 3 3 2.</_>\r\n                <_>\r\n                  16 10 3 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0167104993015528</threshold>\r\n            <left_val>0.1787143051624298</left_val>\r\n            <right_val>-0.0413177497684956</right_val></_></_>\r\n        <_>\r\n          <!-- tree 120 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 10 2 2 -1.</_>\r\n                <_>\r\n                  10 10 1 1 2.</_>\r\n                <_>\r\n                  11 11 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.6687301993370056e-004</threshold>\r\n            <left_val>-0.2522006928920746</left_val>\r\n            <right_val>0.0305528100579977</right_val></_></_>\r\n        <_>\r\n          <!-- tree 121 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 9 2 2 -1.</_>\r\n                <_>\r\n                  17 9 1 1 2.</_>\r\n                <_>\r\n                  16 10 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.0828930145362392e-005</threshold>\r\n            <left_val>0.0542593784630299</left_val>\r\n            <right_val>-0.0474381409585476</right_val></_></_>\r\n        <_>\r\n          <!-- tree 122 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 9 2 2 -1.</_>\r\n                <_>\r\n                  7 9 1 1 2.</_>\r\n                <_>\r\n                  8 10 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.6335372179746628e-004</threshold>\r\n            <left_val>0.1779994070529938</left_val>\r\n            <right_val>-0.0423120781779289</right_val></_></_>\r\n        <_>\r\n          <!-- tree 123 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 10 2 2 -1.</_>\r\n                <_>\r\n                  14 10 1 1 2.</_>\r\n                <_>\r\n                  13 11 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.9218461653217673e-004</threshold>\r\n            <left_val>-0.1845878958702087</left_val>\r\n            <right_val>0.0251416098326445</right_val></_></_>\r\n        <_>\r\n          <!-- tree 124 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 7 2 3 -1.</_>\r\n                <_>\r\n                  11 8 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.4870179370045662e-003</threshold>\r\n            <left_val>0.1677664965391159</left_val>\r\n            <right_val>-0.0460440590977669</right_val></_></_>\r\n        <_>\r\n          <!-- tree 125 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 0 6 3 -1.</_>\r\n                <_>\r\n                  19 1 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0195988900959492</threshold>\r\n            <left_val>0.0180558506399393</left_val>\r\n            <right_val>-0.3022567927837372</right_val></_></_>\r\n        <_>\r\n          <!-- tree 126 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 6 3 -1.</_>\r\n                <_>\r\n                  0 1 6 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0109872100874782</threshold>\r\n            <left_val>-0.3727653026580811</left_val>\r\n            <right_val>0.0197681505233049</right_val></_></_>\r\n        <_>\r\n          <!-- tree 127 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 0 1 2 -1.</_>\r\n                <_>\r\n                  24 1 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.6390639403834939e-005</threshold>\r\n            <left_val>0.0768569633364677</left_val>\r\n            <right_val>-0.1268360018730164</right_val></_></_>\r\n        <_>\r\n          <!-- tree 128 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 16 1 -1.</_>\r\n                <_>\r\n                  4 0 8 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.2606238275766373e-003</threshold>\r\n            <left_val>0.1132820025086403</left_val>\r\n            <right_val>-0.0696604028344154</right_val></_></_>\r\n        <_>\r\n          <!-- tree 129 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 11 6 4 -1.</_>\r\n                <_>\r\n                  19 12 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.3147160001099110e-003</threshold>\r\n            <left_val>0.0329976715147495</left_val>\r\n            <right_val>-0.2646273076534271</right_val></_></_>\r\n        <_>\r\n          <!-- tree 130 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 11 6 4 -1.</_>\r\n                <_>\r\n                  0 12 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0101194800809026</threshold>\r\n            <left_val>-0.4706184864044190</left_val>\r\n            <right_val>0.0138464700430632</right_val></_></_>\r\n        <_>\r\n          <!-- tree 131 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 3 15 6 -1.</_>\r\n                <_>\r\n                  5 6 15 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0921443328261375</threshold>\r\n            <left_val>-0.0886306688189507</left_val>\r\n            <right_val>0.0808285027742386</right_val></_></_>\r\n        <_>\r\n          <!-- tree 132 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 3 9 3 -1.</_>\r\n                <_>\r\n                  8 4 9 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0118425898253918</threshold>\r\n            <left_val>-0.0542713403701782</left_val>\r\n            <right_val>0.1590622961521149</right_val></_></_>\r\n        <_>\r\n          <!-- tree 133 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 0 1 12 -1.</_>\r\n                <_>\r\n                  12 3 1 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0260604508221149</threshold>\r\n            <left_val>0.0202190801501274</left_val>\r\n            <right_val>-0.3709642887115479</right_val></_></_>\r\n        <_>\r\n          <!-- tree 134 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 3 14 8 -1.</_>\r\n                <_>\r\n                  1 7 14 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2863250076770783</threshold>\r\n            <left_val>0.0171639006584883</left_val>\r\n            <right_val>-0.3946934938430786</right_val></_></_>\r\n        <_>\r\n          <!-- tree 135 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  15 0 6 4 -1.</_>\r\n                <_>\r\n                  17 0 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0193374603986740</threshold>\r\n            <left_val>-0.2173891961574554</left_val>\r\n            <right_val>0.0148878796026111</right_val></_></_>\r\n        <_>\r\n          <!-- tree 136 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 7 4 2 -1.</_>\r\n                <_>\r\n                  3 7 2 1 2.</_>\r\n                <_>\r\n                  5 8 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.8996037589386106e-004</threshold>\r\n            <left_val>-0.0642509534955025</left_val>\r\n            <right_val>0.1074123978614807</right_val></_></_>\r\n        <_>\r\n          <!-- tree 137 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 5 1 8 -1.</_>\r\n                <_>\r\n                  14 9 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0273154806345701</threshold>\r\n            <left_val>5.0893737934529781e-003</left_val>\r\n            <right_val>-0.5541477799415588</right_val></_></_>\r\n        <_>\r\n          <!-- tree 138 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 3 3 -1.</_>\r\n                <_>\r\n                  0 8 3 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.3149320669472218e-003</threshold>\r\n            <left_val>-0.5788456201553345</left_val>\r\n            <right_val>0.0114226602017879</right_val></_></_>\r\n        <_>\r\n          <!-- tree 139 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 12 6 3 -1.</_>\r\n                <_>\r\n                  13 12 2 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0134929800406098</threshold>\r\n            <left_val>6.9531891494989395e-003</left_val>\r\n            <right_val>-0.3359794020652771</right_val></_></_>\r\n        <_>\r\n          <!-- tree 140 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 12 6 3 -1.</_>\r\n                <_>\r\n                  10 12 2 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0170349292457104</threshold>\r\n            <left_val>9.6587073057889938e-003</left_val>\r\n            <right_val>-0.6638085842132568</right_val></_></_>\r\n        <_>\r\n          <!-- tree 141 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 5 6 10 -1.</_>\r\n                <_>\r\n                  19 5 3 5 2.</_>\r\n                <_>\r\n                  16 10 3 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0495363213121891</threshold>\r\n            <left_val>-0.1099594011902809</left_val>\r\n            <right_val>7.1444557979702950e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 142 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 5 6 10 -1.</_>\r\n                <_>\r\n                  3 5 3 5 2.</_>\r\n                <_>\r\n                  6 10 3 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0326232202351093</threshold>\r\n            <left_val>0.1888170987367630</left_val>\r\n            <right_val>-0.0416569598019123</right_val></_></_>\r\n        <_>\r\n          <!-- tree 143 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 8 8 1 -1.</_>\r\n                <_>\r\n                  19 8 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.5752598885446787e-003</threshold>\r\n            <left_val>-0.0510260090231895</left_val>\r\n            <right_val>0.1057118028402329</right_val></_></_>\r\n        <_>\r\n          <!-- tree 144 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 8 1 -1.</_>\r\n                <_>\r\n                  2 8 4 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.4968909565359354e-003</threshold>\r\n            <left_val>-0.0559858083724976</left_val>\r\n            <right_val>0.1347001940011978</right_val></_></_>\r\n        <_>\r\n          <!-- tree 145 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 13 14 2 -1.</_>\r\n                <_>\r\n                  9 13 7 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0116916997358203</threshold>\r\n            <left_val>0.0694792568683624</left_val>\r\n            <right_val>-0.0498108491301537</right_val></_></_>\r\n        <_>\r\n          <!-- tree 146 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 14 20 1 -1.</_>\r\n                <_>\r\n                  6 14 10 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.0966278649866581e-003</threshold>\r\n            <left_val>-0.0719841867685318</left_val>\r\n            <right_val>0.1201341003179550</right_val></_></_>\r\n        <_>\r\n          <!-- tree 147 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 7 2 2 -1.</_>\r\n                <_>\r\n                  18 7 1 1 2.</_>\r\n                <_>\r\n                  17 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.6429098155349493e-004</threshold>\r\n            <left_val>-0.0280915908515453</left_val>\r\n            <right_val>0.1105908975005150</right_val></_></_>\r\n        <_>\r\n          <!-- tree 148 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 2 2 -1.</_>\r\n                <_>\r\n                  0 9 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.0658349860459566e-003</threshold>\r\n            <left_val>-0.4070394039154053</left_val>\r\n            <right_val>0.0187105592340231</right_val></_></_>\r\n        <_>\r\n          <!-- tree 149 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 7 2 2 -1.</_>\r\n                <_>\r\n                  18 7 1 1 2.</_>\r\n                <_>\r\n                  17 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.5272910685744137e-005</threshold>\r\n            <left_val>0.0707912817597389</left_val>\r\n            <right_val>-0.0700317397713661</right_val></_></_>\r\n        <_>\r\n          <!-- tree 150 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 7 2 2 -1.</_>\r\n                <_>\r\n                  6 7 1 1 2.</_>\r\n                <_>\r\n                  7 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.5698497928678989e-004</threshold>\r\n            <left_val>-0.0492957085371017</left_val>\r\n            <right_val>0.1548248976469040</right_val></_></_>\r\n        <_>\r\n          <!-- tree 151 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 10 2 2 -1.</_>\r\n                <_>\r\n                  14 10 1 1 2.</_>\r\n                <_>\r\n                  13 11 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3707341430708766e-004</threshold>\r\n            <left_val>0.0302961803972721</left_val>\r\n            <right_val>-0.1238510981202126</right_val></_></_>\r\n        <_>\r\n          <!-- tree 152 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 6 4 -1.</_>\r\n                <_>\r\n                  6 0 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0272689107805490</threshold>\r\n            <left_val>-0.4674024879932404</left_val>\r\n            <right_val>0.0149874398484826</right_val></_></_>\r\n        <_>\r\n          <!-- tree 153 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 0 6 2 -1.</_>\r\n                <_>\r\n                  12 0 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.6138951070606709e-003</threshold>\r\n            <left_val>0.1166682019829750</left_val>\r\n            <right_val>-0.0615368783473969</right_val></_></_>\r\n        <_>\r\n          <!-- tree 154 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 1 8 3 -1.</_>\r\n                <_>\r\n                  10 1 4 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0277075897902250</threshold>\r\n            <left_val>-0.6434546709060669</left_val>\r\n            <right_val>0.0120052499696612</right_val></_></_>\r\n        <_>\r\n          <!-- tree 155 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 6 7 2 -1.</_>\r\n                <_>\r\n                  14 6 7 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0200542695820332</threshold>\r\n            <left_val>-0.3493579030036926</left_val>\r\n            <right_val>0.0109763201326132</right_val></_></_>\r\n        <_>\r\n          <!-- tree 156 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 10 4 1 -1.</_>\r\n                <_>\r\n                  9 10 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.9170317146927118e-004</threshold>\r\n            <left_val>0.0442647784948349</left_val>\r\n            <right_val>-0.1491888016462326</right_val></_></_>\r\n        <_>\r\n          <!-- tree 157 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 11 2 2 -1.</_>\r\n                <_>\r\n                  17 11 1 1 2.</_>\r\n                <_>\r\n                  16 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.4560663304291666e-005</threshold>\r\n            <left_val>-0.0422041602432728</left_val>\r\n            <right_val>0.0473436005413532</right_val></_></_>\r\n        <_>\r\n          <!-- tree 158 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 11 2 2 -1.</_>\r\n                <_>\r\n                  7 11 1 1 2.</_>\r\n                <_>\r\n                  8 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.8378103100694716e-005</threshold>\r\n            <left_val>0.1016054973006249</left_val>\r\n            <right_val>-0.0740641728043556</right_val></_></_>\r\n        <_>\r\n          <!-- tree 159 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 11 2 2 -1.</_>\r\n                <_>\r\n                  17 11 1 1 2.</_>\r\n                <_>\r\n                  16 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.6106527810916305e-005</threshold>\r\n            <left_val>0.0759406536817551</left_val>\r\n            <right_val>-0.0495208092033863</right_val></_></_>\r\n        <_>\r\n          <!-- tree 160 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 11 2 2 -1.</_>\r\n                <_>\r\n                  7 11 1 1 2.</_>\r\n                <_>\r\n                  8 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.2288508848287165e-004</threshold>\r\n            <left_val>-0.0588600113987923</left_val>\r\n            <right_val>0.1385688036680222</right_val></_></_>\r\n        <_>\r\n          <!-- tree 161 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 9 4 1 -1.</_>\r\n                <_>\r\n                  17 9 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.5251980405300856e-003</threshold>\r\n            <left_val>-0.0302844792604446</left_val>\r\n            <right_val>0.1643659025430679</right_val></_></_>\r\n        <_>\r\n          <!-- tree 162 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 9 4 1 -1.</_>\r\n                <_>\r\n                  6 9 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.0347938239574432e-003</threshold>\r\n            <left_val>-0.6502289175987244</left_val>\r\n            <right_val>0.0117079298943281</right_val></_></_>\r\n        <_>\r\n          <!-- tree 163 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 8 3 4 -1.</_>\r\n                <_>\r\n                  11 9 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.2698681354522705e-003</threshold>\r\n            <left_val>0.1213309019804001</left_val>\r\n            <right_val>-0.0608336813747883</right_val></_></_>\r\n        <_>\r\n          <!-- tree 164 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 6 3 2 -1.</_>\r\n                <_>\r\n                  10 7 1 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>0.0166539791971445</threshold>\r\n            <left_val>0.0145571101456881</left_val>\r\n            <right_val>-0.5031678080558777</right_val></_></_>\r\n        <_>\r\n          <!-- tree 165 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 0 4 8 -1.</_>\r\n                <_>\r\n                  19 2 4 4 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.1178558021783829</threshold>\r\n            <left_val>-0.3486539125442505</left_val>\r\n            <right_val>5.8299610391259193e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 166 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 0 8 4 -1.</_>\r\n                <_>\r\n                  6 2 4 4 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0389890410006046</threshold>\r\n            <left_val>0.1082129999995232</left_val>\r\n            <right_val>-0.0824354067444801</right_val></_></_>\r\n        <_>\r\n          <!-- tree 167 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 1 5 2 -1.</_>\r\n                <_>\r\n                  20 1 5 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-6.9744870997965336e-003</threshold>\r\n            <left_val>0.0920993909239769</left_val>\r\n            <right_val>-0.0447417609393597</right_val></_></_>\r\n        <_>\r\n          <!-- tree 168 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 6 4 -1.</_>\r\n                <_>\r\n                  0 7 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0154374102130532</threshold>\r\n            <left_val>0.0294817406684160</left_val>\r\n            <right_val>-0.2408691942691803</right_val></_></_>\r\n        <_>\r\n          <!-- tree 169 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 6 5 4 -1.</_>\r\n                <_>\r\n                  20 7 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.9599988162517548e-003</threshold>\r\n            <left_val>-0.2254153043031693</left_val>\r\n            <right_val>0.0256420802325010</right_val></_></_>\r\n        <_>\r\n          <!-- tree 170 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 8 3 1 -1.</_>\r\n                <_>\r\n                  7 8 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.3358142031356692e-004</threshold>\r\n            <left_val>0.1183808967471123</left_val>\r\n            <right_val>-0.0571242086589336</right_val></_></_>\r\n        <_>\r\n          <!-- tree 171 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 8 24 2 -1.</_>\r\n                <_>\r\n                  13 8 12 1 2.</_>\r\n                <_>\r\n                  1 9 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0176937691867352</threshold>\r\n            <left_val>0.0266077890992165</left_val>\r\n            <right_val>-0.3055857121944428</right_val></_></_>\r\n        <_>\r\n          <!-- tree 172 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 8 8 3 -1.</_>\r\n                <_>\r\n                  8 9 8 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3599448874592781e-003</threshold>\r\n            <left_val>-0.0569497905671597</left_val>\r\n            <right_val>0.1210888996720314</right_val></_></_>\r\n        <_>\r\n          <!-- tree 173 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 11 6 4 -1.</_>\r\n                <_>\r\n                  19 11 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0158548094332218</threshold>\r\n            <left_val>0.0215572193264961</left_val>\r\n            <right_val>-0.2521420121192932</right_val></_></_>\r\n        <_>\r\n          <!-- tree 174 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 18 1 -1.</_>\r\n                <_>\r\n                  9 0 9 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0549633502960205</threshold>\r\n            <left_val>0.0106362197548151</left_val>\r\n            <right_val>-0.5730599761009216</right_val></_></_>\r\n        <_>\r\n          <!-- tree 175 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 6 3 2 -1.</_>\r\n                <_>\r\n                  15 7 1 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-3.7383600138127804e-003</threshold>\r\n            <left_val>0.0774415433406830</left_val>\r\n            <right_val>-0.0306048095226288</right_val></_></_>\r\n        <_>\r\n          <!-- tree 176 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 6 13 2 -1.</_>\r\n                <_>\r\n                  5 7 13 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0182623900473118</threshold>\r\n            <left_val>-0.0549028292298317</left_val>\r\n            <right_val>0.1176588013768196</right_val></_></_>\r\n        <_>\r\n          <!-- tree 177 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 6 3 2 -1.</_>\r\n                <_>\r\n                  15 7 1 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0318278707563877</threshold>\r\n            <left_val>-0.9110031723976135</left_val>\r\n            <right_val>1.3938200427219272e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 178 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 6 2 6 -1.</_>\r\n                <_>\r\n                  10 8 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.6466179881244898e-003</threshold>\r\n            <left_val>0.1085240989923477</left_val>\r\n            <right_val>-0.0722526162862778</right_val></_></_>\r\n        <_>\r\n          <!-- tree 179 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  20 1 5 2 -1.</_>\r\n                <_>\r\n                  20 1 5 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0517431795597076</threshold>\r\n            <left_val>-0.9186943173408508</left_val>\r\n            <right_val>1.8797840457409620e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 180 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  5 1 2 5 -1.</_>\r\n                <_>\r\n                  5 1 1 5 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-9.0449545532464981e-003</threshold>\r\n            <left_val>0.1787680983543396</left_val>\r\n            <right_val>-0.0388442091643810</right_val></_></_>\r\n        <_>\r\n          <!-- tree 181 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 7 1 8 -1.</_>\r\n                <_>\r\n                  24 9 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.5340228825807571e-003</threshold>\r\n            <left_val>-0.2472573071718216</left_val>\r\n            <right_val>0.0297267790883780</right_val></_></_>\r\n        <_>\r\n          <!-- tree 182 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  7 7 11 3 -1.</_>\r\n                <_>\r\n                  7 8 11 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.8734101951122284e-003</threshold>\r\n            <left_val>-0.0675214827060699</left_val>\r\n            <right_val>0.1065412983298302</right_val></_></_>\r\n        <_>\r\n          <!-- tree 183 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 11 2 2 -1.</_>\r\n                <_>\r\n                  14 11 1 1 2.</_>\r\n                <_>\r\n                  13 12 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.7327789040282369e-004</threshold>\r\n            <left_val>0.0221925694495440</left_val>\r\n            <right_val>-0.1398307979106903</right_val></_></_>\r\n        <_>\r\n          <!-- tree 184 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 11 3 1 -1.</_>\r\n                <_>\r\n                  11 11 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.5252941062208265e-005</threshold>\r\n            <left_val>0.0903024971485138</left_val>\r\n            <right_val>-0.0786189734935761</right_val></_></_>\r\n        <_>\r\n          <!-- tree 185 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 7 1 8 -1.</_>\r\n                <_>\r\n                  24 9 1 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.8931739293038845e-003</threshold>\r\n            <left_val>0.0311242006719112</left_val>\r\n            <right_val>-0.1617130041122437</right_val></_></_>\r\n        <_>\r\n          <!-- tree 186 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 5 2 4 -1.</_>\r\n                <_>\r\n                  10 5 2 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0357618294656277</threshold>\r\n            <left_val>-0.3406237065792084</left_val>\r\n            <right_val>0.0201859101653099</right_val></_></_>\r\n        <_>\r\n          <!-- tree 187 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 1 2 3 -1.</_>\r\n                <_>\r\n                  21 2 2 1 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0110698901116848</threshold>\r\n            <left_val>0.1165141984820366</left_val>\r\n            <right_val>-0.0340334698557854</right_val></_></_>\r\n        <_>\r\n          <!-- tree 188 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 1 3 2 -1.</_>\r\n                <_>\r\n                  4 2 1 2 3.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>3.4201510716229677e-003</threshold>\r\n            <left_val>-0.0530161187052727</left_val>\r\n            <right_val>0.1339436024427414</right_val></_></_>\r\n        <_>\r\n          <!-- tree 189 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  16 4 3 3 -1.</_>\r\n                <_>\r\n                  17 5 1 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0499692708253860</threshold>\r\n            <left_val>-0.8493295907974243</left_val>\r\n            <right_val>2.7547380886971951e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 190 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 3 2 -1.</_>\r\n                <_>\r\n                  3 0 3 1 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-1.1221430031582713e-003</threshold>\r\n            <left_val>-0.1629413068294525</left_val>\r\n            <right_val>0.0413381010293961</right_val></_></_>\r\n        <_>\r\n          <!-- tree 191 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 0 8 3 -1.</_>\r\n                <_>\r\n                  17 0 4 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0371481291949749</threshold>\r\n            <left_val>0.0171750299632549</left_val>\r\n            <right_val>-0.2840433120727539</right_val></_></_>\r\n        <_>\r\n          <!-- tree 192 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 12 4 3 -1.</_>\r\n                <_>\r\n                  0 13 4 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.3847341071814299e-003</threshold>\r\n            <left_val>0.0348382107913494</left_val>\r\n            <right_val>-0.1844726949930191</right_val></_></_>\r\n        <_>\r\n          <!-- tree 193 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 3 21 3 -1.</_>\r\n                <_>\r\n                  9 3 7 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.1431124955415726</threshold>\r\n            <left_val>0.0252217296510935</left_val>\r\n            <right_val>-0.2543725967407227</right_val></_></_>\r\n        <_>\r\n          <!-- tree 194 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 1 2 5 -1.</_>\r\n                <_>\r\n                  8 1 1 5 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0119188595563173</threshold>\r\n            <left_val>0.1655784994363785</left_val>\r\n            <right_val>-0.0447442717850208</right_val></_></_>\r\n        <_>\r\n          <!-- tree 195 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 7 6 4 -1.</_>\r\n                <_>\r\n                  22 7 3 2 2.</_>\r\n                <_>\r\n                  19 9 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.4779450185596943e-003</threshold>\r\n            <left_val>-0.0250237993896008</left_val>\r\n            <right_val>0.0799132883548737</right_val></_></_>\r\n        <_>\r\n          <!-- tree 196 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 7 6 4 -1.</_>\r\n                <_>\r\n                  0 7 3 2 2.</_>\r\n                <_>\r\n                  3 9 3 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.4581739669665694e-003</threshold>\r\n            <left_val>-0.0797923728823662</left_val>\r\n            <right_val>0.0829188674688339</right_val></_></_>\r\n        <_>\r\n          <!-- tree 197 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 4 1 4 -1.</_>\r\n                <_>\r\n                  24 5 1 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.2418850138783455e-003</threshold>\r\n            <left_val>0.0132909296080470</left_val>\r\n            <right_val>-0.2995111048221588</right_val></_></_>\r\n        <_>\r\n          <!-- tree 198 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 7 3 4 -1.</_>\r\n                <_>\r\n                  3 8 3 2 2.</_></rects>\r\n              <tilted>1</tilted></feature>\r\n            <threshold>-0.0227145906537771</threshold>\r\n            <left_val>0.4398984909057617</left_val>\r\n            <right_val>-0.0150371296331286</right_val></_></_>\r\n        <_>\r\n          <!-- tree 199 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 9 4 1 -1.</_>\r\n                <_>\r\n                  18 9 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.3001482263207436e-003</threshold>\r\n            <left_val>-0.3546585142612457</left_val>\r\n            <right_val>7.9521266743540764e-003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 200 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 9 4 1 -1.</_>\r\n                <_>\r\n                  5 9 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.0604769922792912e-003</threshold>\r\n            <left_val>0.0385937690734863</left_val>\r\n            <right_val>-0.1762923002243042</right_val></_></_>\r\n        <_>\r\n          <!-- tree 201 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  23 6 2 2 -1.</_>\r\n                <_>\r\n                  23 7 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.3205441907048225e-003</threshold>\r\n            <left_val>0.0171245392411947</left_val>\r\n            <right_val>-0.1075016036629677</right_val></_></_>\r\n        <_>\r\n          <!-- tree 202 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 6 2 2 -1.</_>\r\n                <_>\r\n                  0 7 2 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.8217399269342422e-003</threshold>\r\n            <left_val>-0.4589209854602814</left_val>\r\n            <right_val>0.0141258295625448</right_val></_></_>\r\n        <_>\r\n          <!-- tree 203 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  12 0 3 1 -1.</_>\r\n                <_>\r\n                  13 0 1 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.7336847102269530e-004</threshold>\r\n            <left_val>-0.0361551195383072</left_val>\r\n            <right_val>0.1268056929111481</right_val></_></_>\r\n        <_>\r\n          <!-- tree 204 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 7 2 2 -1.</_>\r\n                <_>\r\n                  1 7 1 1 2.</_>\r\n                <_>\r\n                  2 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.9081847798079252e-004</threshold>\r\n            <left_val>0.1707147061824799</left_val>\r\n            <right_val>-0.0376146212220192</right_val></_></_>\r\n        <_>\r\n          <!-- tree 205 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 7 2 2 -1.</_>\r\n                <_>\r\n                  23 7 1 1 2.</_>\r\n                <_>\r\n                  22 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.6159887248650193e-004</threshold>\r\n            <left_val>0.2311398983001709</left_val>\r\n            <right_val>-0.0603629797697067</right_val></_></_>\r\n        <_>\r\n          <!-- tree 206 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 11 6 4 -1.</_>\r\n                <_>\r\n                  4 11 2 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0210315398871899</threshold>\r\n            <left_val>-0.4918564856052399</left_val>\r\n            <right_val>0.0156012997031212</right_val></_></_>\r\n        <_>\r\n          <!-- tree 207 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 1 10 4 -1.</_>\r\n                <_>\r\n                  19 1 5 2 2.</_>\r\n                <_>\r\n                  14 3 5 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.0180973205715418</threshold>\r\n            <left_val>-0.0467358492314816</left_val>\r\n            <right_val>0.1050693020224571</right_val></_></_>\r\n        <_>\r\n          <!-- tree 208 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 2 12 2 -1.</_>\r\n                <_>\r\n                  6 3 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-0.0131208598613739</threshold>\r\n            <left_val>0.1018344014883041</left_val>\r\n            <right_val>-0.0857265591621399</right_val></_></_>\r\n        <_>\r\n          <!-- tree 209 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 6 8 9 -1.</_>\r\n                <_>\r\n                  9 9 8 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.2012819051742554</threshold>\r\n            <left_val>-9.4874696806073189e-003</left_val>\r\n            <right_val>0.5418189764022827</right_val></_></_>\r\n        <_>\r\n          <!-- tree 210 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 8 3 3 -1.</_>\r\n                <_>\r\n                  4 9 1 1 9.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.3326090350747108e-003</threshold>\r\n            <left_val>0.0282447207719088</left_val>\r\n            <right_val>-0.2452981024980545</right_val></_></_>\r\n        <_>\r\n          <!-- tree 211 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 7 2 2 -1.</_>\r\n                <_>\r\n                  23 7 1 1 2.</_>\r\n                <_>\r\n                  22 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.0540642850100994e-004</threshold>\r\n            <left_val>-0.0559650883078575</left_val>\r\n            <right_val>0.2322594970464706</right_val></_></_>\r\n        <_>\r\n          <!-- tree 212 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  11 10 2 2 -1.</_>\r\n                <_>\r\n                  11 10 1 1 2.</_>\r\n                <_>\r\n                  12 11 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3532002493739128e-004</threshold>\r\n            <left_val>0.0432194508612156</left_val>\r\n            <right_val>-0.1652047038078308</right_val></_></_>\r\n        <_>\r\n          <!-- tree 213 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 7 2 2 -1.</_>\r\n                <_>\r\n                  23 7 1 1 2.</_>\r\n                <_>\r\n                  22 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.0239711678586900e-005</threshold>\r\n            <left_val>0.0588538907468319</left_val>\r\n            <right_val>-0.0475415214896202</right_val></_></_>\r\n        <_>\r\n          <!-- tree 214 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 13 10 1 -1.</_>\r\n                <_>\r\n                  9 13 5 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.8403399996459484e-003</threshold>\r\n            <left_val>-0.0541158504784107</left_val>\r\n            <right_val>0.1303326934576035</right_val></_></_>\r\n        <_>\r\n          <!-- tree 215 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 0 20 15 -1.</_>\r\n                <_>\r\n                  3 0 10 15 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.6619219779968262</threshold>\r\n            <left_val>-0.0147952698171139</left_val>\r\n            <right_val>0.5785722732543945</right_val></_></_>\r\n        <_>\r\n          <!-- tree 216 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 13 24 1 -1.</_>\r\n                <_>\r\n                  6 13 12 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.5441237315535545e-003</threshold>\r\n            <left_val>0.1165743991732597</left_val>\r\n            <right_val>-0.0628988370299339</right_val></_></_>\r\n        <_>\r\n          <!-- tree 217 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 7 2 2 -1.</_>\r\n                <_>\r\n                  23 7 1 1 2.</_>\r\n                <_>\r\n                  22 8 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.4021849791752174e-005</threshold>\r\n            <left_val>-0.0602008998394012</left_val>\r\n            <right_val>0.0699716731905937</right_val></_></_></trees>\r\n      <stage_threshold>-1.2540320158004761</stage_threshold>\r\n      <parent>15</parent>\r\n      <next>-1</next></_></stages></Boca_17stages>\r\n</opencv_storage>\r\n"
  },
  {
    "path": "OpenCVComponent/OpenCVComponent.cpp",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \n#include \"pch.h\"\n#include \"OpenCVComponent.h\"\n\n#include <opencv2\\core\\core.hpp>\n#include <opencv2\\objdetect.hpp>\r\n#include <opencv2\\imgproc\\types_c.h>\n#include <opencv2\\imgcodecs\\imgcodecs.hpp>\n#include <opencv2\\imgproc\\imgproc.hpp>\n#include <vector>\n#include <algorithm>\n#include <string>\n\nusing namespace OpenCVComponent;\nusing namespace Platform;\nusing namespace concurrency;\nusing namespace Windows::Foundation;\nusing namespace Windows::Foundation::Collections;\n\n// Name of the resource classifier used to detect human faces (frontal)\ncv::String face_cascade_name = \"haarcascade_frontalface_alt.xml\";\n\n// Name of the resource classifier used to detect human eyes (frontal)\ncv::String eye_cascade_name = \"haarcascade_eye.xml\";\n\n// Name of the resource classifier used to detect human mouth (frontal)\ncv::String mouth_cascade_name = \"haarcascade_mouth.xml\";\r\n\n\nvoid CopyIVectorToMatrix(IVector<int>^ input, cv::Mat& mat, int size);\nvoid CopyMatrixToVector(const cv::Mat& mat, std::vector<int>& vector, int size);\n\n\nOpenCVLib::OpenCVLib()\n{\n\t\n}\n\nvoid OpenCVLib::Load()\n{\n\tif (face_cascade.empty())\n\t{\n\t\tif (!face_cascade.load(face_cascade_name))\n\t\t{\n\t\t\tauto e = ref new Exception(-100, \"Couldn't load face detector\");\n\n\t\t\tthrow e;\n\t\t\t//Windows::UI::Popups::MessageDialog(\"Couldn't load face detector \\n\").ShowAsync();\n\t\t}\n\t}\n\n\tif (eye_cascade.empty())\n\t{\n\t\tif (!eye_cascade.load(eye_cascade_name))\n\t\t{\n\t\t\tauto e = ref new Exception(-100, \"Couldn't load eye detector\");\n\n\t\t\tthrow e;\n\t\t\t//Windows::UI::Popups::MessageDialog(\"Couldn't load eye detector \\n\").ShowAsync();\n\t\t}\n\t}\n\n\tif (mouth_cascade.empty())\n\t{\n\t\tif (!mouth_cascade.load(mouth_cascade_name))\n\t\t{\n\t\t\tauto e = ref new Exception(-100, \"Couldn't load mouth detector\");\n\n\t\t\tthrow e;\n\t\t\t//Windows::UI::Popups::MessageDialog(\"Couldn't load mouth detector \\n\").ShowAsync();\n\t\t}\n\t}\n}\n\nvoid OutputDebugString(std::string output, LARGE_INTEGER start, LARGE_INTEGER frequency)\n{\n#ifdef DEBUG\r\n\tLARGE_INTEGER end;\r\n\tif (::QueryPerformanceCounter(&end) == FALSE)\r\n\t\tthrow \"foo\";\r\n\r\n\tdouble interval = static_cast<double>(end.QuadPart - start.QuadPart) / frequency.QuadPart;\r\n\r\n\tOutputDebugStringA((output + \" \" + std::to_string(interval) + \"\\n\").c_str());\n#endif\n}\n\nIAsyncOperation<FacesImage^>^ OpenCVLib::ProcessImageAsync(String^ fileName)\r\n{\r\n\treturn concurrency::create_async([=]() -> FacesImage^\n\t{\r\n\t\tLARGE_INTEGER frequency;\r\n\t\tif (::QueryPerformanceFrequency(&frequency) == FALSE)\r\n\t\t\tthrow \"foo\";\r\n\r\n\t\tLARGE_INTEGER start;\r\n\t\tif (::QueryPerformanceCounter(&start) == FALSE)\r\n\t\t\tthrow \"foo\";\r\n\r\n\t\tLoad();\r\n\r\n\t\tOutputDebugString(\"load\", start, frequency);\r\n\r\n\t\tIVector<Face^>^ fs = ref new Platform::Collections::Vector<Face^>();\r\n\r\n\t\tstd::wstring fooW(fileName->Begin());\r\n\t\tstd::string fooA(fooW.begin(), fooW.end());\r\n\r\n\t\tcv::String fileNameCV(fooA);\r\n\t\tcv::Mat image = cv::imread(fileNameCV.c_str());\r\n\r\n\t\tOutputDebugString(\"cv::imread \" + std::to_string(image.cols) + \"x\" + std::to_string(image.rows), start, frequency);\n\n\t\tgroupFaces = cv::Mat(image.rows, image.cols, CV_8UC4);\n\t\tcv::cvtColor(image, groupFaces, CV_BGR2BGRA);\r\n\r\n\t\tif (!groupFaces.empty())\n\t\t{\n\t\t\tstd::vector<cv::Rect> facesColl;\n\t\t\tcv::Mat frame_gray;\n\r\n\t\t\tOutputDebugString(\"start\", start, frequency);\n\n\t\t\tcvtColor(groupFaces, frame_gray, CV_BGR2GRAY);\n\t\t\t//UpdateImage(img2, frame_gray);\n\r\n\t\t\tOutputDebugString(\"cvtColor\", start, frequency);\n\n\t\t\tcv::equalizeHist(frame_gray, frame_gray);\n\r\n\t\t\tOutputDebugString(\"cv::equalizeHist\", start, frequency);\n\n\t\t\t//UpdateImage(img2, frame_gray);\n\t\t\t// Detect faces\n\t\t\tface_cascade.detectMultiScale(frame_gray, facesColl, 1.2, 3, 0 | CV_HAAR_SCALE_IMAGE, cv::Size(30, 30));\n\r\n\t\t\tOutputDebugString(\"face_cascade.detectMultiScale\", start, frequency);\n\n\t\t\tfor (unsigned int i = 0; i < facesColl.size(); i++)\n\t\t\t{\n\t\t\t\tauto face = facesColl[i];\n\t\t\t\tauto f = ref new Face(Rect(face.x, face.y, face.width, face.height));\n\t\t\t\tfs->Append(f);\n\t\t\t\t\n\t\t\t\tcv::rectangle(groupFaces, face, cv::Scalar(255, 0, 0), 1);\n\n\t\t\t\tfacesColl[i].height = facesColl[i].height / 2;\r\n\t\t\t\tcv::Mat faceROI = frame_gray(facesColl[i]);\r\n\t\t\t\tstd::vector<cv::Rect> eyesColl;\r\n\t\t\t\tstd::vector<cv::Point> eyesCenterColl;\r\n\r\n\t\t\t\tint eyeWidth = face.width / 6;\r\n\t\t\t\teye_cascade.detectMultiScale(faceROI, eyesColl, 1.1, 3, 0 | CV_HAAR_SCALE_IMAGE, cv::Size(eyeWidth, eyeWidth));\r\n\t\t\t\tOutputDebugString(\"eye_cascade.detectMultiScale\", start, frequency);\n\t\t\t\tfor (unsigned int j = 0; j < eyesColl.size(); j++)\n\t\t\t\t{\n\t\t\t\t\tauto eye = eyesColl[j];\n\t\t\t\t\teye.x += face.x;\n\t\t\t\t\teye.y += face.y;\n\t\t\t\t\tcv::rectangle(groupFaces, eye, cv::Scalar(255, 0, 0), 1);\n\n\t\t\t\t\tauto eyeRect = Rect(eye.x, eye.y, eye.width, eye.height);\n\t\t\t\t\tf->Eye->Append(eyeRect);\n\n\t\t\t\t\t// eye center\n\t\t\t\t\tauto eyeCenter = cv::Point(eye.x + eye.width / 2, eye.y + eye.height / 2);\n\t\t\t\t\teyesCenterColl.push_back(eyeCenter);\n\t\t\t\t\tcv::circle(groupFaces, eyeCenter, 3, cv::Scalar(0, 255, 0), -1);\n\t\t\t\t}\n\r\n\t\t\t\tstd::vector<cv::Rect> mouthsColl;\r\n\t\t\t\tstd::vector<cv::Point> mouthsCenterColl;\n\r\n\t\t\t\tfacesColl[i].height = facesColl[i].height / 2;\r\n\t\t\t\tfacesColl[i].y += facesColl[i].height * 3;\r\n\t\t\t\tfaceROI = frame_gray(facesColl[i]);\r\n\r\n\t\t\t\tint mouthWidth = 30;\r\n\t\t\t\tmouth_cascade.detectMultiScale(faceROI, mouthsColl, 1.1, 2, 0 | CV_HAAR_SCALE_IMAGE, cv::Size(mouthWidth, mouthWidth));\r\n\t\t\t\tOutputDebugString(\"mouth_cascade.detectMultiScale\", start, frequency);\n\t\t\t\tfor (unsigned int j = 0; j < mouthsColl.size() && j < 10; j++)\n\t\t\t\t{\n\t\t\t\t\tauto mouth = mouthsColl[j];\n\t\t\t\t\tmouth.x += facesColl[i].x;\n\t\t\t\t\tmouth.y += facesColl[i].y;\n\t\t\t\t\tcv::rectangle(groupFaces, mouth, cv::Scalar(255, 0, 0), 1);\n\n\t\t\t\t\tauto mouthRect = Rect(mouth.x, mouth.y, mouth.width, mouth.height);\n\t\t\t\t\tf->Mouth->Append(mouthRect);\n\n\t\t\t\t\tauto mouthCenter = cv::Point(mouth.x + mouth.width / 2, mouth.y + mouth.height / 4);\n\t\t\t\t\tmouthsCenterColl.push_back(mouthCenter);\n\t\t\t\t\tcv::circle(groupFaces, mouthCenter, 3, cv::Scalar(0, 255, 0), -1);\n\t\t\t\t}\n\n\t\t\t\t// forehead, chin\n\t\t\t\tif (eyesCenterColl.size() >= 2)\n\t\t\t\t{\n\t\t\t\t\tauto eyesDistanceX = abs(eyesCenterColl[1].x - eyesCenterColl[0].x);\n\t\t\t\t\tauto eyesDistanceY = abs(eyesCenterColl[1].y - eyesCenterColl[0].y);\n\t\t\t\t\tauto leftEye = eyesCenterColl[0];\n\t\t\t\t\tif (leftEye.x > eyesCenterColl[1].x)\n\t\t\t\t\t{\n\t\t\t\t\t\tleftEye = eyesCenterColl[1];\n\t\t\t\t\t}\n\n\t\t\t\t\tauto eyesCenter = cv::Point(leftEye.x + eyesDistanceX / 2, leftEye.y + eyesDistanceY / 2);\n\t\t\t\t\tcv::circle(groupFaces, eyesCenter, 3, cv::Scalar(0, 255, 0), -1);\n\n\t\t\t\t\tauto foreheadCenter = cv::Point(eyesCenter.x, eyesCenter.y - 0.7 * eyesDistanceX);\n\t\t\t\t\tcv::circle(groupFaces, foreheadCenter, 3, cv::Scalar(0, 255, 0), -1);\n\n\t\t\t\t\tif (mouthsCenterColl.size() >= 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tauto chinCenter = cv::Point(eyesCenter.x, mouthsCenterColl[0].y + 0.55 * eyesDistanceX);\n\t\t\t\t\t\tcv::circle(groupFaces, chinCenter, 3, cv::Scalar(0, 255, 0), -1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//UpdateImage(img1, groupFaces);\n\t\t}\r\n\r\n\t\tstd::vector<int> output;\n\t\tCopyMatrixToVector(groupFaces, output, image.rows * image.cols);\n\n\t\t//Return the outputs as a VectorView<float>\n\t\t//return ref new Platform::Collections::VectorView<int>(output);\n\n\t\tauto facesImage = ref new FacesImage();\n\t\tfacesImage->Width = image.cols;\n\t\tfacesImage->Height = image.rows;\n\t\tfacesImage->Faces = fs;\n\t\tfacesImage->Image = ref new Platform::Collections::VectorView<int>(output);\n\n\r\n\t\tOutputDebugString(\"stop\", start, frequency);\n\t\treturn facesImage;\n\t});\r\n}\n\nIAsyncOperation<IVectorView<int>^>^ OpenCVLib::ProcessAsync(IVector<int>^ input, int width, int height)\n{\n    return create_async([=]() -> IVectorView<int>^\n\t{\n\t\tint size = input->Size;\n\t\tcv::Mat mat(width, height, CV_8UC4);\n\t\tCopyIVectorToMatrix(input, mat, size);\n\n        // convert to grayscale\n        cv::Mat intermediateMat;\n        cv::cvtColor(mat, intermediateMat, CV_RGB2GRAY);\n\n        // convert to BGRA\n        cv::cvtColor(intermediateMat, mat, CV_GRAY2BGRA);\n\n        std::vector<int> output;\n        CopyMatrixToVector(mat, output, size);\n\n        // Return the outputs as a VectorView<float>\n        return ref new Platform::Collections::VectorView<int>(output);\n    });\n}\n\n\nvoid CopyIVectorToMatrix(IVector<int>^ input, cv::Mat& mat, int size)\n{\n    unsigned char* data = mat.data;\n    for (int i = 0; i < size; i++)\n    {\n        int value = input->GetAt(i);\n        memcpy(data, (void*) &value, 4);\n        data += 4;\n    }\n}\n\nvoid CopyMatrixToVector(const cv::Mat& mat, std::vector<int>& vector, int size)\n{\n    int* data = (int*) mat.data;\n    for (int i = 0; i < size; i++)\n    {\n        vector.push_back(data[i]);\n    }\n\n}"
  },
  {
    "path": "OpenCVComponent/OpenCVComponent.h",
    "content": "﻿// \n// This is the source code of Telegram for Windows Phone v. 3.x.x.\n// It is licensed under GNU GPL v. 2 or later.\n// You should have received a copy of the license in this archive (see LICENSE).\n// \n// Copyright Evgeny Nadymov, 2013-present.\n// \n#pragma once\n\n#include <ppltasks.h>\n#include <collection.h>\n\n#include <opencv2\\objdetect.hpp>\n#include <opencv2\\core\\core.hpp>\n\nnamespace OpenCVComponent\n{\n\tusing namespace Windows::Foundation;\n\tusing namespace Windows::Foundation::Collections;\n\tusing namespace Platform;\n\n\tpublic ref class Face sealed\n\t{\n\tprivate:\n\tpublic:\n\t\tproperty IVector<Rect>^ Eye;\n\t\tproperty IVector<Rect>^ Mouth;\n\t\tproperty Rect Position;\n\n\t\tFace(Rect position)\n\t\t{\n\t\t\tEye = ref new Platform::Collections::Vector<Rect>();\n\t\t\tMouth = ref new Platform::Collections::Vector<Rect>();\n\t\t\tPosition = position;\n\t\t}\n\t};\n\n\tpublic ref class FacesImage sealed\n\t{\n\tpublic:\n\t\tproperty int Width;\n\t\tproperty int Height;\n\t\tproperty IVectorView<int>^ Image;\n\t\tproperty IVector<Face^>^ Faces;\n\t};\n\n    public ref class OpenCVLib sealed\n    {\n\tprivate:\n\t\tcv::Mat groupFaces;\n\t\tcv::CascadeClassifier face_cascade;\n\t\tcv::CascadeClassifier eye_cascade;\n\t\tcv::CascadeClassifier mouth_cascade;\n\t\tvoid Load();\n    public:\n        OpenCVLib();\n\t\tIAsyncOperation<FacesImage^>^ ProcessImageAsync(String^ fileName);\n        IAsyncOperation<IVectorView<int>^>^ ProcessAsync(IVector<int>^ input, int width, int height);\n    };\n}"
  },
  {
    "path": "OpenCVComponent/OpenCVComponent.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|ARM\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{eadff7b8-e6c3-4f34-9b33-014b3035c595}</ProjectGuid>\r\n    <RootNamespace>OpenCVComponent</RootNamespace>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n    <WinMDAssembly>true</WinMDAssembly>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v110_wp80</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v110_wp80</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v110_wp80</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v110_wp80</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Import Project=\"opencv.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <Import Project=\"opencv.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Import Project=\"opencv.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <Import Project=\"opencv.props\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup>\r\n    <GenerateManifest>false</GenerateManifest>\r\n    <IgnoreImportLibrary>false</IgnoreImportLibrary>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>true</CompileAsWinRT>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>true</CompileAsWinRT>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>true</CompileAsWinRT>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>true</CompileAsWinRT>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"platform.winmd\">\r\n      <IsWinMDFile>true</IsWinMDFile>\r\n      <Private>false</Private>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"OpenCVComponent.h\" />\r\n    <ClInclude Include=\"pch.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"OpenCVComponent.cpp\" />\r\n    <ClCompile Include=\"pch.cpp\">\r\n      <PrecompiledHeader>Create</PrecompiledHeader>\r\n    </ClCompile>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Xml Include=\"Assets\\haarcascade_eye.xml\" />\r\n    <Xml Include=\"Assets\\haarcascade_frontalface_alt.xml\" />\r\n    <Xml Include=\"Assets\\haarcascade_mouth.xml\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\WindowsPhone\\v$(TargetPlatformVersion)\\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "OpenCVComponent/OpenCVComponent.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup>\r\n    <Filter Include=\"Resources\">\r\n      <UniqueIdentifier>5fd0e509-b6ae-4f29-bd2a-4d2cc10f3aa0</UniqueIdentifier>\r\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r\n    </Filter>\r\n    <Filter Include=\"Cascades\">\r\n      <UniqueIdentifier>{9c92a94c-8b61-4fe3-9856-7d35d5216ed6}</UniqueIdentifier>\r\n    </Filter>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"OpenCVComponent.cpp\" />\r\n    <ClCompile Include=\"pch.cpp\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"OpenCVComponent.h\" />\r\n    <ClInclude Include=\"pch.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"$(OpenCV_Bin)opencv_core300$(DebugSuffix).dll\" />\r\n    <None Include=\"$(OpenCV_Bin)opencv_features2d300$(DebugSuffix).dll\" />\r\n    <None Include=\"$(OpenCV_Bin)opencv_flann300$(DebugSuffix).dll\" />\r\n    <None Include=\"$(OpenCV_Bin)opencv_imgcodecs300$(DebugSuffix).dll\" />\r\n    <None Include=\"$(OpenCV_Bin)opencv_imgproc300$(DebugSuffix).dll\" />\r\n    <None Include=\"$(OpenCV_Bin)opencv_ml300$(DebugSuffix).dll\" />\r\n    <None Include=\"$(OpenCV_Bin)opencv_objdetect300$(DebugSuffix).dll\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Xml Include=\"Assets\\haarcascade_mouth.xml\">\r\n      <Filter>Cascades</Filter>\r\n    </Xml>\r\n    <Xml Include=\"Assets\\haarcascade_eye.xml\">\r\n      <Filter>Cascades</Filter>\r\n    </Xml>\r\n    <Xml Include=\"Assets\\haarcascade_frontalface_alt.xml\">\r\n      <Filter>Cascades</Filter>\r\n    </Xml>\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "OpenCVComponent/opencv.props",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ImportGroup Label=\"PropertySheets\" />\n  <PropertyGroup Label=\"UserMacros\">\n    <OpenCV_Bin>$(OPENCV_WINRT_INSTALL_DIR)\\WP\\8.0\\$(PlatformTarget)\\$(PlatformTarget)\\vc11\\bin\\</OpenCV_Bin>\n    <OpenCV_Lib>$(OPENCV_WINRT_INSTALL_DIR)\\WP\\8.0\\$(PlatformTarget)\\$(PlatformTarget)\\vc11\\lib\\</OpenCV_Lib>\n    <OpenCV_Include>$(OPENCV_WINRT_INSTALL_DIR)\\WP\\8.0\\$(PlatformTarget)\\include\\</OpenCV_Include>\n    <!--debug suffix for OpenCV dlls and libs -->\n    <DebugSuffix Condition=\"'$(Configuration)'=='Debug'\">d</DebugSuffix>\n    <DebugSuffix Condition=\"'$(Configuration)'!='Debug'\"></DebugSuffix>\n  </PropertyGroup>\n  <PropertyGroup>\n    <IgnoreImportLibrary>true</IgnoreImportLibrary>\n  </PropertyGroup>\n  <ItemGroup>\n    <!--Add required OpenCV dlls here-->\n    <None Include=\"$(OpenCV_Bin)opencv_core300$(DebugSuffix).dll\">\n      <DeploymentContent>true</DeploymentContent>\n    </None>\n\t<None Include=\"$(OpenCV_Bin)opencv_features2d300$(DebugSuffix).dll\">\n      <DeploymentContent>true</DeploymentContent>\n    </None>\n\t<None Include=\"$(OpenCV_Bin)opencv_flann300$(DebugSuffix).dll\">\n      <DeploymentContent>true</DeploymentContent>\n    </None>\n\t<None Include=\"$(OpenCV_Bin)opencv_imgcodecs300$(DebugSuffix).dll\">\n      <DeploymentContent>true</DeploymentContent>\n    </None>\n    <None Include=\"$(OpenCV_Bin)opencv_imgproc300$(DebugSuffix).dll\">\n      <DeploymentContent>true</DeploymentContent>\n    </None>\n\t<None Include=\"$(OpenCV_Bin)opencv_ml300$(DebugSuffix).dll\">\n      <DeploymentContent>true</DeploymentContent>\n    </None>\n\t<None Include=\"$(OpenCV_Bin)opencv_objdetect300$(DebugSuffix).dll\">\n      <DeploymentContent>true</DeploymentContent>\n    </None>\n  </ItemGroup>\n  <ItemDefinitionGroup>\n    <ClCompile>\n      <AdditionalIncludeDirectories>$(OpenCV_Include);%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>\n    </ClCompile>\n    <Link>\n      <!--Add required OpenCV libs here-->\n      <AdditionalDependencies>opencv_core300$(DebugSuffix).lib;opencv_features2d300$(DebugSuffix).lib;opencv_flann300$(DebugSuffix).lib;opencv_imgcodecs300$(DebugSuffix).lib;opencv_imgproc300$(DebugSuffix).lib;opencv_ml300$(DebugSuffix).lib;opencv_objdetect300$(DebugSuffix).lib;WindowsPhoneCore.lib;RuntimeObject.lib;PhoneAppModelHost.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>$(OpenCV_Lib);%(AdditionalLibraryDirectories);</AdditionalLibraryDirectories>\n    </Link>\n  </ItemDefinitionGroup>\n</Project>"
  },
  {
    "path": "OpenCVComponent/pch.cpp",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"pch.h\"\r\n"
  },
  {
    "path": "OpenCVComponent/pch.h",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n"
  },
  {
    "path": "README.md",
    "content": "# telegram-wp"
  },
  {
    "path": "Telegram.Api/Aggregator/EventAggregator.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Reflection;\r\n\r\nnamespace Telegram.Api.Aggregator {\r\n    /// <summary>\r\n    ///   A marker interface for classes that subscribe to messages.\r\n    /// </summary>\r\n    public interface IHandle { }\r\n\r\n    /// <summary>\r\n    ///   Denotes a class which can handle a particular type of message.\r\n    /// </summary>\r\n    /// <typeparam name = \"TMessage\">The type of message to handle.</typeparam>\r\n    public interface IHandle<TMessage> : IHandle {  //don't use contravariance here\r\n        /// <summary>\r\n        ///   Handles the message.\r\n        /// </summary>\r\n        /// <param name = \"message\">The message.</param>\r\n        void Handle(TMessage message);\r\n    }\r\n\r\n    /// <summary>\r\n    ///   Enables loosely-coupled publication of and subscription to events.\r\n    /// </summary>\r\n    public interface ITelegramEventAggregator {\r\n        /// <summary>\r\n        ///   Gets or sets the default publication thread marshaller.\r\n        /// </summary>\r\n        /// <value>\r\n        ///   The default publication thread marshaller.\r\n        /// </value>\r\n        Action<System.Action> PublicationThreadMarshaller { get; set; }\r\n\r\n        /// <summary>\r\n        /// Searches the subscribed handlers to check if we have a handler for\r\n        /// the message type supplied.\r\n        /// </summary>\r\n        /// <param name=\"messageType\">The message type to check with</param>\r\n        /// <returns>True if any handler is found, false if not.</returns>\r\n        bool HandlerExistsFor(Type messageType);\r\n\r\n        /// <summary>\r\n        ///   Subscribes an instance to all events declared through implementations of <see cref = \"IHandle{T}\" />\r\n        /// </summary>\r\n        /// <param name = \"subscriber\">The instance to subscribe for event publication.</param>\r\n        void Subscribe(object subscriber);\r\n\r\n        /// <summary>\r\n        ///   Unsubscribes the instance from all events.\r\n        /// </summary>\r\n        /// <param name = \"subscriber\">The instance to unsubscribe.</param>\r\n        void Unsubscribe(object subscriber);\r\n\r\n        /// <summary>\r\n        ///   Publishes a message.\r\n        /// </summary>\r\n        /// <param name = \"message\">The message instance.</param>\r\n        /// <remarks>\r\n        ///   Uses the default thread marshaller during publication.\r\n        /// </remarks>\r\n        void Publish(object message);\r\n\r\n        /// <summary>\r\n        ///   Publishes a message.\r\n        /// </summary>\r\n        /// <param name = \"message\">The message instance.</param>\r\n        /// <param name = \"marshal\">Allows the publisher to provide a custom thread marshaller for the message publication.</param>\r\n        void Publish(object message, Action<System.Action> marshal);\r\n    }\r\n\r\n    /// <summary>\r\n    ///   Enables loosely-coupled publication of and subscription to events.\r\n    /// </summary>\r\n    public class TelegramEventAggregator : ITelegramEventAggregator {\r\n        readonly List<Handler> handlers = new List<Handler>();\r\n\r\n        /// <summary>\r\n        ///   The default thread marshaller used for publication;\r\n        /// </summary>\r\n        public static Action<System.Action> DefaultPublicationThreadMarshaller = action => action();\r\n\r\n        /// <summary>\r\n        /// Processing of handler results on publication thread.\r\n        /// </summary>\r\n        public static Action<object, object> HandlerResultProcessing = (target, result) => { };\r\n\r\n        public static ITelegramEventAggregator Instance { get; protected set; }\r\n\r\n        /// <summary>\r\n        ///   Initializes a new instance of the <see cref = \"EventAggregator\" /> class.\r\n        /// </summary>\r\n        public TelegramEventAggregator() {\r\n            PublicationThreadMarshaller = DefaultPublicationThreadMarshaller;\r\n\r\n            Instance = this;\r\n        }\r\n\r\n        /// <summary>\r\n        ///   Gets or sets the default publication thread marshaller.\r\n        /// </summary>\r\n        /// <value>\r\n        ///   The default publication thread marshaller.\r\n        /// </value>\r\n        public Action<System.Action> PublicationThreadMarshaller { get; set; }\r\n\r\n        /// <summary>\r\n        /// Searches the subscribed handlers to check if we have a handler for\r\n        /// the message type supplied.\r\n        /// </summary>\r\n        /// <param name=\"messageType\">The message type to check with</param>\r\n        /// <returns>True if any handler is found, false if not.</returns>\r\n        public bool HandlerExistsFor(Type messageType) {\r\n                return handlers.Any(handler => handler.Handles(messageType) & !handler.IsDead);\r\n        }\r\n\r\n        /// <summary>\r\n        ///   Subscribes an instance to all events declared through implementations of <see cref = \"IHandle{T}\" />\r\n        /// </summary>\r\n        /// <param name = \"subscriber\">The instance to subscribe for event publication.</param>\r\n        public virtual void Subscribe(object subscriber) {\r\n            if (subscriber == null) {\r\n                throw new ArgumentNullException(\"subscriber\");\r\n            }\r\n            lock(handlers) {\r\n                if (handlers.Any(x => x.Matches(subscriber))) {\r\n                    return;\r\n                }\r\n\r\n                handlers.Add(new Handler(subscriber));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        ///   Unsubscribes the instance from all events.\r\n        /// </summary>\r\n        /// <param name = \"subscriber\">The instance to unsubscribe.</param>\r\n        public virtual void Unsubscribe(object subscriber) {\r\n            if (subscriber == null) {\r\n                throw new ArgumentNullException(\"subscriber\");\r\n            }\r\n            lock(handlers) {\r\n                var found = handlers.FirstOrDefault(x => x.Matches(subscriber));\r\n\r\n                if (found != null) {\r\n                    handlers.Remove(found);\r\n                }\r\n            }\r\n        }\r\n\r\n        public static bool LogPublish { get; set; }\r\n\r\n        /// <summary>\r\n        ///   Publishes a message.\r\n        /// </summary>\r\n        /// <param name = \"message\">The message instance.</param>\r\n        /// <remarks>\r\n        ///   Does not marshall the the publication to any special thread by default.\r\n        /// </remarks>\r\n        public virtual void Publish(object message) {\r\n            if (message == null) {\r\n                throw new ArgumentNullException(\"message\");\r\n            }\r\n\r\n#if DEBUG\r\n            if (LogPublish)\r\n            {\r\n                Debug.WriteLine(\"Publish \" + message.GetType());\r\n            }\r\n#endif\r\n\r\n            Publish(message, PublicationThreadMarshaller);\r\n        }\r\n\r\n        /// <summary>\r\n        ///   Publishes a message.\r\n        /// </summary>\r\n        /// <param name = \"message\">The message instance.</param>\r\n        /// <param name = \"marshal\">Allows the publisher to provide a custom thread marshaller for the message publication.</param>\r\n        public virtual void Publish(object message, Action<System.Action> marshal) {\r\n            if (message == null){\r\n                throw new ArgumentNullException(\"message\");\r\n            }\r\n            if (marshal == null) {\r\n                throw new ArgumentNullException(\"marshal\");\r\n            }\r\n\r\n            Handler[] toNotify;\r\n            lock (handlers) {\r\n                toNotify = handlers.ToArray();\r\n            }\r\n\r\n            marshal(() => {\r\n                var messageType = message.GetType();\r\n\r\n                var dead = toNotify\r\n                    .Where(handler => !handler.Handle(messageType, message))\r\n                    .ToList();\r\n\r\n                if(dead.Any()) {\r\n                    lock(handlers) {\r\n                        dead.Apply(x => handlers.Remove(x));\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        class Handler {\r\n            readonly WeakReference reference;\r\n            readonly Dictionary<Type, MethodInfo> supportedHandlers = new Dictionary<Type, MethodInfo>();\r\n\r\n            public bool IsDead {\r\n                get { return reference.Target == null; }\r\n            }\r\n\r\n            public Handler(object handler) {\r\n                reference = new WeakReference(handler);\r\n\r\n#if WIN_RT\r\n                var handlerInfo = typeof(IHandle).GetTypeInfo();\r\n                var interfaces = handler.GetType().GetTypeInfo().ImplementedInterfaces\r\n                    .Where(x => handlerInfo.IsAssignableFrom(x.GetTypeInfo()) && x.GetTypeInfo().IsGenericType);\r\n\r\n                foreach (var @interface in interfaces) {\r\n                    var type = @interface.GenericTypeArguments[0];\r\n                    var method = @interface.GetTypeInfo().DeclaredMethods.First(x => x.Name == \"Handle\");\r\n                    supportedHandlers[type] = method;\r\n                }\r\n#else\r\n                var interfaces = handler.GetType().GetInterfaces()\r\n                    .Where(x => typeof(IHandle).IsAssignableFrom(x) && x.IsGenericType);\r\n\r\n                foreach(var @interface in interfaces) {\r\n                    var type = @interface.GetGenericArguments()[0];\r\n                    var method = @interface.GetMethod(\"Handle\");\r\n                    supportedHandlers[type] = method;\r\n                }\r\n#endif\r\n            }\r\n\r\n            public bool Matches(object instance) {\r\n                return reference.Target == instance;\r\n            }\r\n\r\n            public bool Handle(Type messageType, object message) {\r\n                var target = reference.Target;\r\n                if (target == null) {\r\n                    return false;\r\n                }\r\n\r\n                foreach(var pair in supportedHandlers) {\r\n                    if(pair.Key.IsAssignableFrom(messageType)) {\r\n                        var result = pair.Value.Invoke(target, new[] { message });\r\n                        if (result != null) {\r\n                            HandlerResultProcessing(target, result);\r\n                        }\r\n                    }\r\n                }\r\n                \r\n                return true;\r\n            }\r\n\r\n            public bool Handles(Type messageType) {\r\n                return supportedHandlers.Any(pair => pair.Key.IsAssignableFrom(messageType));\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Aggregator/ExtensionMethods.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Linq.Expressions;\r\nusing System.Reflection;\r\n\r\nnamespace Telegram.Api.Aggregator {\r\n    /// <summary>\r\n    /// Generic extension methods used by the framework.\r\n    /// </summary>\r\n    public static class ExtensionMethods {\r\n        /// <summary>\r\n        /// Get's the name of the assembly.\r\n        /// </summary>\r\n        /// <param name=\"assembly\">The assembly.</param>\r\n        /// <returns>The assembly's name.</returns>\r\n        public static string GetAssemblyName(this Assembly assembly) {\r\n            return assembly.FullName.Remove(assembly.FullName.IndexOf(','));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets all the attributes of a particular type.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of attributes to get.</typeparam>\r\n        /// <param name=\"member\">The member to inspect for attributes.</param>\r\n        /// <param name=\"inherit\">Whether or not to search for inherited attributes.</param>\r\n        /// <returns>The list of attributes found.</returns>\r\n        public static IEnumerable<T> GetAttributes<T>(this MemberInfo member, bool inherit) {\r\n#if WIN_RT\r\n            return member.GetCustomAttributes(inherit).OfType<T>();\r\n#else\r\n            return Attribute.GetCustomAttributes(member, inherit).OfType<T>();\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Applies the action to each element in the list.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The enumerable item's type.</typeparam>\r\n        /// <param name=\"enumerable\">The elements to enumerate.</param>\r\n        /// <param name=\"action\">The action to apply to each item in the list.</param>\r\n        public static void Apply<T>(this IEnumerable<T> enumerable, Action<T> action) {\r\n            foreach(var item in enumerable) {\r\n                action(item);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts an expression into a <see cref=\"MemberInfo\"/>.\r\n        /// </summary>\r\n        /// <param name=\"expression\">The expression to convert.</param>\r\n        /// <returns>The member info.</returns>\r\n        public static MemberInfo GetMemberInfo(this Expression expression) {\r\n            var lambda = (LambdaExpression)expression;\r\n\r\n            MemberExpression memberExpression;\r\n            if (lambda.Body is UnaryExpression) {\r\n                var unaryExpression = (UnaryExpression)lambda.Body;\r\n                memberExpression = (MemberExpression)unaryExpression.Operand;\r\n            }\r\n            else {\r\n                memberExpression = (MemberExpression)lambda.Body;\r\n            }\r\n\r\n            return memberExpression.Member;\r\n        }\r\n\r\n#if WINDOWS_PHONE && !WP8\r\n\t\t//Method missing in WP7.1 Linq\r\n\r\n\t\t/// <summary>\r\n\t\t/// Merges two sequences by using the specified predicate function.\r\n\t\t/// </summary>\r\n\t\t/// <typeparam name=\"TFirst\">The type of the elements of the first input sequence.</typeparam>\r\n\t\t/// <typeparam name=\"TSecond\">The type of the elements of the second input sequence.</typeparam>\r\n\t\t/// <typeparam name=\"TResult\">The type of the elements of the result sequence.</typeparam>\r\n\t\t/// <param name=\"first\">The first sequence to merge.</param>\r\n\t\t/// <param name=\"second\">The second sequence to merge.</param>\r\n\t\t/// <param name=\"resultSelector\"> A function that specifies how to merge the elements from the two sequences.</param>\r\n\t\t/// <returns>An System.Collections.Generic.IEnumerable&lt;T&gt; that contains merged elements of two input sequences.</returns>\r\n\t\tpublic static IEnumerable<TResult> Zip<TFirst, TSecond, TResult>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector) {\r\n\t\t\tif (first == null) {\r\n\t\t\t\tthrow new ArgumentNullException(\"first\");\r\n            }\r\n\r\n\t\t\tif (second == null) {\r\n\t\t\t\tthrow new ArgumentNullException(\"second\");\r\n            }\r\n\r\n\t\t\tif (resultSelector == null) {\r\n\t\t\t\tthrow new ArgumentNullException(\"resultSelector\");\r\n            }\r\n\r\n\t\t\tvar enumFirst = first.GetEnumerator();\r\n\t\t\tvar enumSecond = second.GetEnumerator();\r\n\r\n\t\t\twhile (enumFirst.MoveNext() && enumSecond.MoveNext()) {\r\n\t\t\t\tyield return resultSelector(enumFirst.Current, enumSecond.Current);\r\n\t\t\t}\r\n\t\t}\r\n#endif\r\n\r\n#if WIN_RT\r\n        /// <summary>\r\n        /// Gets a collection of the public types defined in this assembly that are visible outside the assembly.\r\n        /// </summary>\r\n        /// <param name=\"assembly\">The assembly.</param>\r\n        /// <returns>A collection of the public types defined in this assembly that are visible outside the assembly.</returns>\r\n        /// <exception cref=\"ArgumentNullException\"></exception>\r\n        public static IEnumerable<Type> GetExportedTypes(this Assembly assembly) {\r\n            if (assembly == null)\r\n                throw new ArgumentNullException(\"assembly\");\r\n\r\n            return assembly.ExportedTypes;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a value that indicates whether the specified type can be assigned to the current type.\r\n        /// </summary>\r\n        /// <param name=\"target\">The target type</param>\r\n        /// <param name=\"type\">The type to check.</param>\r\n        /// <returns>true if the specified type can be assigned to this type; otherwise, false.</returns>\r\n        public static bool IsAssignableFrom(this Type target, Type type) {\r\n            return target.GetTypeInfo().IsAssignableFrom(type.GetTypeInfo());\r\n        }\r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Compression/GZipDeflateStream.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#if WINDOWS_PHONE\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Windows;\r\nusing System.Windows.Resources;\r\n\r\nnamespace SharpGIS\r\n{\r\n    internal sealed class GZipInflateStream : Stream\r\n    {\r\n        private readonly Stream _deflatedStream;\r\n        private Stream _inflatedStream;\r\n\r\n        public GZipInflateStream(System.IO.Stream deflatedStream)\r\n        {\r\n            _deflatedStream = deflatedStream;\r\n            ProcessStream();\r\n        }\r\n\r\n        private void ProcessStream()\r\n        {\r\n            int firstByte = _deflatedStream.ReadByte();\r\n\r\n            if (firstByte == -1)\r\n            {\r\n                _inflatedStream = new MemoryStream();\r\n                return;\r\n            }\r\n\r\n            if ((0x1f != firstByte) || // ID1\r\n                (0x8b != _deflatedStream.ReadByte()) || // ID2\r\n                (8 != _deflatedStream.ReadByte())) // CM (8 == deflate)\r\n            {\r\n                throw new NotSupportedException(\"Compressed data not in the expected format.\");\r\n            }\r\n\r\n            // Read flags\r\n            var flg = _deflatedStream.ReadByte(); // FLG\r\n            var fhcrc = 0 != (0x2 & flg); // CRC16 present before compressed data\r\n            var fextra = 0 != (0x4 & flg); // extra fields present\r\n            var fname = 0 != (0x8 & flg); // original file name present\r\n            var fcomment = 0 != (0x10 & flg); // file comment present\r\n\r\n            // Skip unsupported fields\r\n            if (_deflatedStream.CanSeek)\r\n                _deflatedStream.Seek(6, SeekOrigin.Current);\r\n            else\r\n            {\r\n                _deflatedStream.ReadByte();\r\n                _deflatedStream.ReadByte();\r\n                _deflatedStream.ReadByte();\r\n                _deflatedStream.ReadByte(); // MTIME\r\n                _deflatedStream.ReadByte(); // XFL\r\n                _deflatedStream.ReadByte(); // OS\r\n            }\r\n\r\n            if (fextra)\r\n            {\r\n                // Skip XLEN bytes of data\r\n                var xlen = _deflatedStream.ReadByte() | (_deflatedStream.ReadByte() << 8);\r\n                while (0 < xlen)\r\n                {\r\n                    _deflatedStream.ReadByte();\r\n                    xlen--;\r\n                }\r\n            }\r\n            if (fname)\r\n            {\r\n                // Skip 0-terminated file name\r\n                while (0 != _deflatedStream.ReadByte())\r\n                {\r\n                }\r\n            }\r\n            if (fcomment)\r\n            {\r\n                // Skip 0-terminated file comment\r\n                while (0 != _deflatedStream.ReadByte())\r\n                {\r\n                }\r\n            }\r\n            if (fhcrc)\r\n            {\r\n                _deflatedStream.ReadByte(); _deflatedStream.ReadByte(); // CRC16\r\n            }\r\n\r\n            // Read compressed data\r\n            const int zipHeaderSize = 30 + 1; // 30 bytes + 1 character for file name\r\n            const int zipFooterSize = 68 + 1; // 68 bytes + 1 character for file name\r\n\r\n            // Download unknown amount of compressed data efficiently (note: Content-Length header is not always reliable)\r\n            var buffers = new List<byte[]>();\r\n            var buffer = new byte[4096];\r\n            var bytesInBuffer = 0;\r\n            var totalBytes = 0;\r\n            var bytesRead = 0;\r\n            do\r\n            {\r\n                if (buffer.Length == bytesInBuffer)\r\n                {\r\n                    // Full, allocate another\r\n                    buffers.Add(buffer);\r\n                    buffer = new byte[buffer.Length];\r\n                    bytesInBuffer = 0;\r\n                }\r\n                Debug.Assert(bytesInBuffer < buffer.Length);\r\n                bytesRead = _deflatedStream.Read(buffer, bytesInBuffer, buffer.Length - bytesInBuffer);\r\n                bytesInBuffer += bytesRead;\r\n                totalBytes += bytesRead;\r\n            } while (0 < bytesRead);\r\n            buffers.Add(buffer);\r\n\r\n            // \"Trim\" crc32 and isize fields off the end\r\n            var compressedSize = totalBytes - 4 - 4;\r\n            if (compressedSize < 0)\r\n            {\r\n                throw new NotSupportedException(\"Compressed data not in the expected format.\");\r\n            }\r\n\r\n            // Create contiguous buffer\r\n            var compressedBytes = new byte[zipHeaderSize + compressedSize + zipFooterSize];\r\n            var offset = zipHeaderSize;\r\n            var remainingBytes = totalBytes;\r\n            foreach (var b in buffers)\r\n            {\r\n                var length = Math.Min(b.Length, remainingBytes);\r\n                Array.Copy(b, 0, compressedBytes, offset, length);\r\n                offset += length;\r\n                remainingBytes -= length;\r\n            }\r\n            Debug.Assert(0 == remainingBytes);\r\n\r\n            // Read footer from end of compressed bytes (note: footer is within zipFooterSize; will be overwritten below)\r\n            Debug.Assert(totalBytes <= compressedSize + zipFooterSize);\r\n            offset = zipHeaderSize + compressedSize;\r\n            var crc32 = compressedBytes[offset + 0] | (compressedBytes[offset + 1] << 8) | (compressedBytes[offset + 2] << 16) | (compressedBytes[offset + 3] << 24);\r\n            var isize = compressedBytes[offset + 4] | (compressedBytes[offset + 5] << 8) | (compressedBytes[offset + 6] << 16) | (compressedBytes[offset + 7] << 24);\r\n\r\n            if (0 == isize) // HACK to handle compressed 0-byte streams without figuring out what's really going wrong\r\n            {\r\n                _inflatedStream = new MemoryStream();\r\n                return;\r\n            }\r\n\r\n            // Create ZIP file stream\r\n            const string fileName = \"f\"; // MUST be 1 character (offsets below assume this)\r\n            Debug.Assert(1 == fileName.Length);\r\n            var zipFileMemoryStream = new MemoryStream(compressedBytes);\r\n            var writer = new BinaryWriter(zipFileMemoryStream);\r\n\r\n            // Local file header\r\n            writer.Write((uint)0x04034b50); // local file header signature\r\n            writer.Write((ushort)20); // version needed to extract (2.0 == compressed using deflate)\r\n            writer.Write((ushort)0); // general purpose bit flag\r\n            writer.Write((ushort)8); // compression method (8: deflate)\r\n            writer.Write((ushort)0); // last mod file time\r\n            writer.Write((ushort)0); // last mod file date\r\n            writer.Write(crc32); // crc-32\r\n            writer.Write(compressedSize); // compressed size\r\n            writer.Write(isize); // uncompressed size\r\n            writer.Write((ushort)1); // file name length\r\n            writer.Write((ushort)0); // extra field length\r\n            writer.Write((byte)fileName[0]); // file name\r\n\r\n            // File data (already present)\r\n            zipFileMemoryStream.Seek(compressedSize, SeekOrigin.Current);\r\n\r\n            // Central directory structure\r\n            writer.Write((uint)0x02014b50); // central file header signature\r\n            writer.Write((ushort)20); // version made by\r\n            writer.Write((ushort)20); // version needed to extract (2.0 == compressed using deflate)\r\n            writer.Write((ushort)0); // general purpose bit flag\r\n            writer.Write((ushort)8); // compression method\r\n            writer.Write((ushort)0); // last mod file time\r\n            writer.Write((ushort)0); // last mod file date\r\n            writer.Write(crc32); // crc-32\r\n            writer.Write(compressedSize); // compressed size\r\n            writer.Write(isize); // uncompressed size\r\n            writer.Write((ushort)1); // file name length\r\n            writer.Write((ushort)0); // extra field length\r\n            writer.Write((ushort)0); // file comment length\r\n            writer.Write((ushort)0); // disk number start\r\n            writer.Write((ushort)0); // internal file attributes\r\n            writer.Write((uint)0); // external file attributes\r\n            writer.Write((uint)0); // relative offset of local header\r\n            writer.Write((byte)fileName[0]); // file name\r\n            // End of central directory record\r\n            writer.Write((uint)0x06054b50); // end of central dir signature\r\n            writer.Write((ushort)0); // number of this disk\r\n            writer.Write((ushort)0); // number of the disk with the start of the central directory\r\n            writer.Write((ushort)1); // total number of entries in the central directory on this disk\r\n            writer.Write((ushort)1); // total number of entries in the central directory\r\n            writer.Write((uint)(46 + 1)); // size of the central directory (46 bytes + 1 character for file name)\r\n            writer.Write((uint)(zipHeaderSize + compressedSize)); // offset of start of central directory with respect to the starting disk number\r\n            writer.Write((ushort)0); // .ZIP file comment length\r\n\r\n            // Reset ZIP file stream to beginning\r\n            zipFileMemoryStream.Seek(0, SeekOrigin.Begin);\r\n\r\n            // Return the decompressed stream\r\n            _inflatedStream = Application.GetResourceStream(\r\n                new StreamResourceInfo(zipFileMemoryStream, null),\r\n                new Uri(fileName, UriKind.Relative))\r\n                .Stream;\r\n        }\r\n\r\n        public override bool CanRead\r\n        {\r\n            get { return _inflatedStream.CanRead; }\r\n        }\r\n\r\n        public override bool CanSeek\r\n        {\r\n            get { return _inflatedStream.CanSeek; }\r\n        }\r\n\r\n        public override bool CanWrite\r\n        {\r\n            get { return _inflatedStream.CanWrite; }\r\n        }\r\n\r\n        public override void Flush()\r\n        {\r\n            _inflatedStream.Flush();\r\n        }\r\n\r\n        public override long Length\r\n        {\r\n            get { return _inflatedStream.Length; }\r\n        }\r\n\r\n        public override long Position\r\n        {\r\n            get { return _inflatedStream.Position; }\r\n            set { _inflatedStream.Position = value; }\r\n        }\r\n\r\n        public override int Read(byte[] buffer, int offset, int count)\r\n        {\r\n            return _inflatedStream.Read(buffer, offset, count);\r\n        }\r\n\r\n        public override long Seek(long offset, SeekOrigin origin)\r\n        {\r\n            return _inflatedStream.Seek(offset, origin);\r\n        }\r\n\r\n        public override void SetLength(long value)\r\n        {\r\n            _inflatedStream.SetLength(value);\r\n        }\r\n\r\n        public override void Write(byte[] buffer, int offset, int count)\r\n        {\r\n            throw new NotSupportedException();\r\n        }\r\n\r\n        public override void Close()\r\n        {\r\n            _deflatedStream.Close();\r\n            _inflatedStream.Close();\r\n        }\r\n        protected override void Dispose(bool disposing)\r\n        {\r\n            _deflatedStream.Dispose();\r\n            _inflatedStream.Dispose();\r\n        }\r\n        public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)\r\n        {\r\n            return _inflatedStream.BeginRead(buffer, offset, count, callback, state);\r\n        }\r\n        public override int ReadByte()\r\n        {\r\n            return _inflatedStream.ReadByte();\r\n        }\r\n        public override int EndRead(IAsyncResult asyncResult)\r\n        {\r\n            return _inflatedStream.EndRead(asyncResult);\r\n        }\r\n        public override int ReadTimeout\r\n        {\r\n            get { return _inflatedStream.ReadTimeout; }\r\n            set { _inflatedStream.ReadTimeout = value; }\r\n        }\r\n        public override bool CanTimeout\r\n        {\r\n            get { return _inflatedStream.CanTimeout; }\r\n        }\r\n    }\r\n}\r\n#endif"
  },
  {
    "path": "Telegram.Api/Compression/GZipWebClient.cs",
    "content": "﻿// (c) Copyright Morten Nielsen.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n#if SILVERLIGHT\r\nusing System;\r\nusing System.Net;\r\nusing System.Security;\r\nusing System.IO;\r\nusing System.Linq;\r\n\r\nnamespace SharpGIS\r\n{\r\n    /// <summary>\r\n    /// This is an explicit web client class for doing webrequests.\r\n    /// If you want to opt in for gzip support on all existing WebClients, consider\r\n    /// using the <see cref=\"WebRequestCreator\"/>\r\n    /// </summary>\r\n    public class GZipWebClient : WebClient\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the <see cref=\"GZipWebClient\"/> class.\r\n        /// </summary>\r\n        [SecuritySafeCritical]\r\n        public GZipWebClient()\r\n        {\r\n        }\r\n        /// <summary>\r\n        /// Returns a <see cref=\"T:System.Net.WebRequest\"/> object for the specified resource.\r\n        /// </summary>\r\n        /// <param name=\"address\">A <see cref=\"T:System.Uri\"/> that identifies the resource to request.</param>\r\n        /// <returns>\r\n        /// A new <see cref=\"T:System.Net.WebRequest\"/> object for the specified resource.\r\n        /// </returns>\r\n        protected override WebRequest GetWebRequest(Uri address)\r\n        {\r\n            var req = base.GetWebRequest(address);\r\n            req.Headers[HttpRequestHeader.AcceptEncoding] = \"gzip\"; //Set GZIP header\r\n            return req;\r\n        }\r\n        /// <summary>\r\n        /// Returns the <see cref=\"T:System.Net.WebResponse\"/> for the specified <see cref=\"T:System.Net.WebRequest\"/> using the specified <see cref=\"T:System.IAsyncResult\"/>.\r\n        /// </summary>\r\n        /// <param name=\"request\">A <see cref=\"T:System.Net.WebRequest\"/> that is used to obtain the response.</param>\r\n        /// <param name=\"result\">An <see cref=\"T:System.IAsyncResult\"/> object obtained from a previous call to <see cref=\"M:System.Net.WebRequest.BeginGetResponse(System.AsyncCallback,System.Object)\"/> .</param>\r\n        /// <returns>\r\n        /// A <see cref=\"T:System.Net.WebResponse\"/> containing the response for the specified <see cref=\"T:System.Net.WebRequest\"/>.\r\n        /// </returns>\r\n        protected override WebResponse GetWebResponse(WebRequest request, IAsyncResult result)\r\n        {\r\n            try\r\n            {\r\n                WebResponse response = base.GetWebResponse(request, result);\r\n                if (!(response is GZipWebResponse) && //this would be the case if WebRequestCreator was also used\r\n                 (response.Headers[HttpRequestHeader.ContentEncoding] == \"gzip\") && response is HttpWebResponse)\r\n                    return new GZipWebResponse(response as HttpWebResponse); //If gzipped response, uncompress\r\n                else\r\n                    return response;\r\n            }\r\n            catch\r\n            {\r\n                return null;\r\n            }\r\n        }\r\n        internal sealed class GZipWebResponse : HttpWebResponse\r\n        {\r\n            private readonly HttpWebResponse _response;\r\n            private readonly SharpGIS.GZipInflateStream _stream;\r\n\r\n            internal GZipWebResponse(HttpWebResponse resp)\r\n            {\r\n                _response = resp;\r\n                _stream = new GZipInflateStream(_response.GetResponseStream());\r\n            }\r\n            public override System.IO.Stream GetResponseStream()\r\n            {\r\n                return _stream;\r\n            }\r\n            public override void Close()\r\n            {\r\n                _response.Close();\r\n                _stream.Close();\r\n            }\r\n            public override long ContentLength\r\n            {\r\n                get\r\n                {\r\n                    return _stream.Length;\r\n                }\r\n            }\r\n            public override string ContentType\r\n            {\r\n                get { return _response.ContentType; }\r\n            }\r\n            public override WebHeaderCollection Headers\r\n            {\r\n                get { return _response.Headers; }\r\n            }\r\n            public override Uri ResponseUri\r\n            {\r\n                get { return _response.ResponseUri; }\r\n            }\r\n            public override bool SupportsHeaders\r\n            {\r\n                get { return _response.SupportsHeaders; }\r\n            }\r\n            public override string Method\r\n            {\r\n                get\r\n                {\r\n                    return _response.Method;\r\n                }\r\n            }\r\n            public override HttpStatusCode StatusCode\r\n            {\r\n                get\r\n                {\r\n                    return _response.StatusCode;\r\n                }\r\n            }\r\n            public override string StatusDescription\r\n            {\r\n                get\r\n                {\r\n                    return _response.StatusDescription;\r\n                }\r\n            }\r\n            public override CookieCollection Cookies\r\n            {\r\n                get\r\n                {\r\n                    return _response.Cookies;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n#endif"
  },
  {
    "path": "Telegram.Api/Constants.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n//#define TEST_SERVER\r\n\r\nnamespace Telegram.Api\r\n{\r\n    public static class Constants\r\n    {\r\n        public const int ApiId = https://core.telegram.org/api/obtaining_api_id\r\n        public const string ApiHash = https://core.telegram.org/api/obtaining_api_id\r\n\r\n#if TEST_SERVER\r\n        public const int FirstServerDCId = 1;\r\n        public const int FirstServerPort = 443;\r\n        public const string FirstServerIpAddress =\r\n            \"149.154.175.40\";       // dc1\r\n            //\"149.154.167.40\";     // dc2\r\n            //\"149.154.175.117\";    // dc3\r\n        public const bool IsTestServer = true;\r\n#else\r\n        public const int FirstServerDCId = 2;   // [1, 2, 3, 4, 5]\r\n        public const int FirstServerPort = 443;\r\n        public const string FirstServerIpAddress =\r\n            //\"149.154.175.50\";     // dc1\r\n            \"149.154.167.51\";       // dc2\r\n            //\"174.140.142.6\";      // dc3\r\n            //\"149.154.167.90\";     // dc4\r\n            //\"149.154.171.5\";      // dc5\r\n        public const bool IsTestServer = false;\r\n#endif\r\n\r\n        public const int SupportedLayer = 85;\r\n        public const int MinSecretSupportedLayer = 46;\r\n        public const int SecretSupportedLayer = 73;\r\n\r\n        public const int LongPollReattemptDelay = 5000;     //ms\r\n        public const double MessageSendingInterval =\r\n#if DEBUG\r\n            300;   //seconds (5 minutes - 30 seconds(max delay: 25))\r\n#else\r\n            180;   //seconds (5 minutes - 30 seconds(max delay: 25))\r\n#endif\r\n        public const double ResendMessageInterval = 5.0;        //seconds\r\n        public const int CommitDBInterval = 3;                  //seconds\r\n        public const int GetConfigInterval = 60 * 60;           //seconds\r\n        public const int TimeoutInterval = 25;                  //seconds \r\n        public const double DelayedTimeoutInterval = 45.0;      //seconds \r\n        public const double NonEncryptedTimeoutInterval = 15.0; //seconds   \r\n\r\n        public const bool IsLongPollEnabled = false;\r\n        public const int CachedDialogsCount = 20;\r\n        public const int CachedMessagesCount = 25;\r\n\r\n        public const int WorkersNumber = 4;\r\n        public static int BigFileWorkersNumber = 4;\r\n\r\n        public const string ConfigKey = \"Config\";\r\n        public const string ConfigFileName = \"config.xml\";\r\n        public static double CheckSendingMesagesInterval = 5.0; //seconds\r\n\r\n        public static double CheckGetConfigInterval =\r\n#if DEBUG\r\n            10.0;\r\n#else\r\n            1 * 60.0;     //seconds (1 min)\r\n#endif\r\n        public static double CheckPingInterval = 20.0;          //seconds\r\n        public static double UpdateStatusInterval = 2.0;\r\n        public static int VideoUploadersCount = 3;\r\n        public static int DocumentUploadersCount = 3;\r\n        public static int AudioDownloadersCount = 3;\r\n        public static int MaximumChunksCount = 3000;\r\n        public static int DownloadedChunkSize = 32 * 1024;                  // 1MB % DownloadedChunkSize = 0 && DownloadedChunkSize % 1KB = 0\r\n        public static int DownloadedBigChunkSize = 128 * 1024;              // 1MB % DownloadedChunkSize = 0 && DownloadedChunkSize % 1KB = 0\r\n        public static ulong MaximumUploadedFileSize = 512 * 1024 * 3000;    // 1,5GB\r\n\r\n        public static string StateFileName = \"state.dat\";\r\n        public static string TempStateFileName = \"temp_state.dat\";\r\n        public static string ActionQueueFileName = \"action_queue.dat\";\r\n        public static string SentQueueIdFileName = \"sent_queue_id.dat\";\r\n\r\n        public const string IsAuthorizedKey = \"IsAuthorized\";\r\n        public const int StickerMaxSize = 256 * 1024;               // 256 KB\r\n        public const int GifMaxSize = 10 * 1014 * 1024;             // 10 MB\r\n        public const int AutoDownloadGifMaxSize = 2 * 1014 * 1024;  // 1 MB\r\n        public const int SmallFileMaxSize = 32 * 1024;              //10 * 1024 * 1024;   // 10 MB\r\n\r\n        public const string BackgroundTaskSettingsFileName = \"background_task_settings.dat\";\r\n        public const string DifferenceFileName = \"difference.dat\";\r\n        public const string TempDifferenceFileName = \"temp_difference.dat\";\r\n        public const string DifferenceTimeFileName = \"difference_time.dat\";\r\n\r\n        public const string TelegramMessengerMutexName = \"TelegramMessenger\";\r\n        public const double DifferenceMinInterval = 10.0;       //seconds\r\n\r\n        public const string InitConnectionFileName = \"init_connection.dat\";\r\n        public const string DisableNotificationsFileName = \"disable_notifications.dat\";\r\n\r\n        public const int MinRandomBytesLength = 15;\r\n\r\n        public static int MinSecretChatWithExtendedKeyVisualizationLayer = 46;\r\n        public static int MinSecretChatWithMTProto2Layer = 46;\r\n\r\n        public const string ProxyConfigFileName = \"proxy_config.dat\";\r\n        public const string CdnConfigFileName = \"cdn_config.dat\";\r\n\r\n        public const string LiveLocationsFileName = \"live_locations.dat\";\r\n\r\n        public const int CheckConfigTimeout =\r\n#if DEBUG\r\n            10;\r\n#else\r\n            7;\r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Extensions/ActionExtensions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.Extensions\r\n{\r\n    public static class ActionExtensions\r\n    {\r\n        public static void SafeInvoke(this Action action)\r\n        {\r\n            if (action != null)\r\n            {\r\n                action.Invoke();\r\n            }\r\n        }\r\n\r\n        public static void SafeInvoke<T>(this Action<T> action, T param)\r\n        {\r\n            if (action != null)\r\n            {\r\n                action.Invoke(param);\r\n            }\r\n        }\r\n\r\n        public static void SafeInvoke<T1, T2>(this Action<T1, T2> action, T1 param1, T2 param2)\r\n        {\r\n            if (action != null)\r\n            {\r\n                action.Invoke(param1, param2);\r\n            }\r\n        }\r\n\r\n        public static void SafeInvoke<T1, T2, T3>(this Action<T1, T2, T3> action, T1 param1, T2 param2, T3 param3)\r\n        {\r\n            if (action != null)\r\n            {\r\n                action.Invoke(param1, param2, param3);\r\n            }\r\n        }\r\n\r\n        public static void SafeInvoke<T1, T2, T3, T4>(this Action<T1, T2, T3, T4> action, T1 param1, T2 param2, T3 param3, T4 param4)\r\n        {\r\n            if (action != null)\r\n            {\r\n                action.Invoke(param1, param2, param3, param4);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Extensions/HttpWebRequestExtensions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Net;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Extensions\r\n{\r\n    public static class HttpWebRequestExtensions\r\n    {\r\n        public static void BeginAsync(this HttpWebRequest request, byte[] data, Action<byte[]> callback, Action faultCallback)\r\n        {\r\n            request.BeginGetRequestStream(ar => GetRequestStreamCallback(data, ar, ar2 => EndAsync(ar2, callback, faultCallback)), request);\r\n        }\r\n\r\n        public static void BeginAsync(this HttpWebRequest request, byte[] data, Action<IAsyncResult> onCompleted)\r\n        {\r\n            request.BeginGetRequestStream(ar => GetRequestStreamCallback(data, ar, onCompleted), request);\r\n        }\r\n\r\n        private static void GetRequestStreamCallback(byte[] data, IAsyncResult asynchronousResult, Action<IAsyncResult> onCompleted)\r\n        {\r\n            var request = (HttpWebRequest)asynchronousResult.AsyncState;\r\n\r\n            // End the operation\r\n            var postStream = request.EndGetRequestStream(asynchronousResult);\r\n\r\n            // Convert the string into a byte array.\r\n            var byteArray = data;\r\n\r\n            // Write to the request stream.\r\n            postStream.Write(byteArray, 0, data.Length);\r\n            postStream.Dispose();\r\n\r\n            // Start the asynchronous operation to get the response\r\n            request.BeginGetResponse(x => onCompleted(x), request);\r\n        }\r\n\r\n        private static void EndAsync(IAsyncResult asynchronousResult, Action<byte[]> callback, Action faultCallback)\r\n        {\r\n            //try\r\n            {\r\n                try\r\n                {\r\n                    var request = (HttpWebRequest)asynchronousResult.AsyncState;\r\n                    HttpWebResponse response;\r\n                \r\n                    using (response = (HttpWebResponse)request.EndGetResponse(asynchronousResult))\r\n                    {\r\n                        using (var dataStream = response.GetResponseStream())\r\n                        {\r\n\r\n                            var buffer = new byte[Int32.Parse(response.Headers[\"Content-Length\"])];\r\n                            var bytesRead = 0;\r\n                            var totalBytesRead = bytesRead;\r\n                            while (totalBytesRead < buffer.Length)\r\n                            {\r\n                                bytesRead = dataStream.Read(buffer, bytesRead, buffer.Length - bytesRead);\r\n                                totalBytesRead += bytesRead;\r\n                            }\r\n\r\n                            callback(buffer);\r\n                        }\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n                    faultCallback();            \r\n                    \r\n                    //response = (HttpWebResponse)ex.Response;\r\n                    //if (response == null)\r\n                    //{\r\n                    //    if (faultCallback != null) faultCallback();\r\n                    //    return;\r\n                    //}\r\n\r\n                    //if (response.StatusCode == HttpStatusCode.BadGateway\r\n                    //    || response.StatusCode == HttpStatusCode.NotFound)\r\n                    //{\r\n                    //    if (faultCallback != null) faultCallback();\r\n                    //    return;\r\n                    //}\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Extensions/StreamExtensions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\n\r\nnamespace Telegram.Api.Extensions\r\n{\r\n    public static class StreamExtensions\r\n    {\r\n        public static void Write(this Stream output, byte[] buffer)\r\n        {\r\n            output.Write(buffer, 0, buffer.Length);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Extensions/TLObjectExtensions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Extensions\r\n{\r\n    public static class TLObjectExtensions\r\n    {\r\n        public static void NullableToStream(this TLObject obj, Stream output)\r\n        {\r\n            if (obj == null)\r\n            {\r\n                output.Write(new TLNull().ToBytes());\r\n            }\r\n            else\r\n            {\r\n                obj.ToStream(output);\r\n            }\r\n        }\r\n\r\n        public static T NullableFromStream<T>(Stream input) where T : TLObject\r\n        {\r\n            var obj = TLObjectGenerator.GetNullableObject<T>(input);\r\n            \r\n            if (obj == null) return null;\r\n\r\n            return (T)obj.FromStream(input);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Hash/CRC32/CRC.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#if WINDOWS_PHONE\r\nusing System;\r\nusing System.Security.Cryptography;\r\n\r\nnamespace Telegram.Api\r\n{\r\n    /// <summary>\r\n    /// HashAlgorithm implementation for CRC-32.\r\n    /// </summary>\r\n    [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\",\r\n        \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"CRC\",\r\n        Justification = \"Matching algorithm acronym.\")]\r\n    public class CRC32 : HashAlgorithm\r\n    {\r\n        // Shared, pre-computed lookup table for efficiency\r\n        private static readonly uint[] _crc32Table;\r\n\r\n        /// <summary>\r\n        /// Initializes the shared lookup table.\r\n        /// </summary>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\",\r\n            \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification =\r\n            \"Table values must be computed; not possible to remove the static constructor.\")]\r\n        static CRC32()\r\n        {\r\n            // Allocate table\r\n            _crc32Table = new uint[256];\r\n\r\n            // For each byte\r\n            for (uint n = 0; n < 256; n++)\r\n            {\r\n                // For each bit\r\n                uint c = n;\r\n                for (int k = 0; k < 8; k++)\r\n                {\r\n                    // Compute value\r\n                    if (0 != (c & 1))\r\n                    {\r\n                        c = 0xedb88320 ^ (c >> 1);\r\n                    }\r\n                    else\r\n                    {\r\n                        c = c >> 1;\r\n                    }\r\n                }\r\n\r\n                // Store result in table\r\n                _crc32Table[n] = c;\r\n            }\r\n        }\r\n\r\n        // Current hash value\r\n        private uint _crc32Value;\r\n\r\n        // True if HashCore has been called\r\n        private bool _hashCoreCalled;\r\n\r\n        // True if HashFinal has been called\r\n        private bool _hashFinalCalled;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance.\r\n        /// </summary>\r\n        public CRC32()\r\n        {\r\n            InitializeVariables();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes internal state.\r\n        /// </summary>\r\n        public override void Initialize()\r\n        {\r\n            InitializeVariables();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes variables.\r\n        /// </summary>\r\n        private void InitializeVariables()\r\n        {\r\n            _crc32Value = uint.MaxValue;\r\n            _hashCoreCalled = false;\r\n            _hashFinalCalled = false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the hash code for the provided data.\r\n        /// </summary>\r\n        /// <param name=\"array\">Data.</param>\r\n        /// <param name=\"ibStart\">Start position.</param>\r\n        /// <param name=\"cbSize\">Number of bytes.</param>\r\n        protected override void HashCore(byte[] array, int ibStart, int cbSize)\r\n        {\r\n            if (null == array)\r\n            {\r\n                throw new ArgumentNullException(\"array\");\r\n            }\r\n\r\n            if (_hashFinalCalled)\r\n            {\r\n                throw new CryptographicException(\r\n                    \"Hash not valid for use in specified state.\");\r\n            }\r\n            _hashCoreCalled = true;\r\n\r\n            for (int i = ibStart; i < ibStart + cbSize; i++)\r\n            {\r\n                byte index = (byte)(_crc32Value ^ array[i]);\r\n                _crc32Value = _crc32Table[index] ^ ((_crc32Value >> 8) & 0xffffff);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Finalizes the hash code and returns it.\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override byte[] HashFinal()\r\n        {\r\n            _hashFinalCalled = true;\r\n            return Hash;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the hash as an array of bytes.\r\n        /// </summary>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\",\r\n            \"CA1065:DoNotRaiseExceptionsInUnexpectedLocations\", Justification =\r\n            \"Matching .NET behavior by throwing here.\")]\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Usage\",\r\n            \"CA2201:DoNotRaiseReservedExceptionTypes\", Justification =\r\n            \"Matching .NET behavior by throwing NullReferenceException.\")]\r\n        public override byte[] Hash\r\n        {\r\n            get\r\n            {\r\n                if (!_hashCoreCalled)\r\n                {\r\n                    throw new NullReferenceException();\r\n                }\r\n                if (!_hashFinalCalled)\r\n                {\r\n                    // Note: Not CryptographicUnexpectedOperationException because\r\n                    // that can't be instantiated on Silverlight 4\r\n                    throw new CryptographicException(\r\n                        \"Hash must be finalized before the hash value is retrieved.\");\r\n                }\r\n\r\n                // Convert complement of hash code to byte array\r\n                byte[] bytes = BitConverter.GetBytes(~_crc32Value);\r\n\r\n                // Reverse for proper endianness, and return\r\n                Array.Reverse(bytes);\r\n                return bytes;\r\n            }\r\n        }\r\n\r\n        // Return size of hash in bits.\r\n        public override int HashSize\r\n        {\r\n            get\r\n            {\r\n                return 4 * 8;\r\n            }\r\n        }\r\n    }\r\n}\r\n#endif\r\n"
  },
  {
    "path": "Telegram.Api/Hash/MD5/MD5.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Text;\r\n\r\n// Simple struct for the (a,b,c,d) which is used to compute the mesage digest.    \r\nstruct ABCDStruct \r\n{\r\n    public uint A;\r\n    public uint B;\r\n    public uint C;\r\n    public uint D;\r\n}\r\n\r\npublic sealed class MD5Core\r\n{    \r\n    //Prevent CSC from adding a default public constructor\r\n    private MD5Core() {}\r\n\r\n    public static byte[] GetHash(string input, Encoding encoding)\r\n    {\r\n        if (null == input)\r\n            throw new System.ArgumentNullException(\"input\", \"Unable to calculate hash over null input data\");\r\n        if (null == encoding)\r\n            throw new System.ArgumentNullException(\"encoding\", \"Unable to calculate hash over a string without a default encoding. Consider using the GetHash(string) overload to use UTF8 Encoding\");\r\n\r\n        byte[] target = encoding.GetBytes(input);\r\n\r\n        return GetHash(target);\r\n    }\r\n\r\n    public static byte[] GetHash(string input)\r\n    {\r\n        return GetHash(input, new UTF8Encoding());\r\n    }\r\n\r\n    public static string GetHashString(byte[] input)\r\n    {\r\n        if (null == input)\r\n            throw new System.ArgumentNullException(\"input\", \"Unable to calculate hash over null input data\");\r\n\r\n        string retval = BitConverter.ToString(GetHash(input));\r\n        retval = retval.Replace(\"-\", \"\");\r\n\r\n        return retval;\r\n    }\r\n\r\n    public static string GetHashString(string input, Encoding encoding)\r\n    {\r\n        if (null == input)\r\n            throw new System.ArgumentNullException(\"input\", \"Unable to calculate hash over null input data\");\r\n        if (null == encoding)\r\n            throw new System.ArgumentNullException(\"encoding\", \"Unable to calculate hash over a string without a default encoding. Consider using the GetHashString(string) overload to use UTF8 Encoding\");\r\n        \r\n        byte[] target = encoding.GetBytes(input);\r\n\r\n        return GetHashString(target);\r\n    }\r\n\r\n    public static string GetHashString(string input)\r\n    {\r\n        return GetHashString(input, new UTF8Encoding());\r\n    }\r\n\r\n    public static byte[] GetHash(byte[] input)\r\n    {\r\n        if (null == input)\r\n            throw new System.ArgumentNullException(\"input\", \"Unable to calculate hash over null input data\");\r\n\r\n        //Intitial values defined in RFC 1321\r\n        ABCDStruct abcd = new ABCDStruct();\r\n        abcd.A = 0x67452301;\r\n        abcd.B = 0xefcdab89;\r\n        abcd.C = 0x98badcfe;\r\n        abcd.D = 0x10325476;\r\n\r\n        //We pass in the input array by block, the final block of data must be handled specialy for padding & length embeding\r\n        int startIndex = 0;\r\n        while (startIndex <= input.Length - 64)\r\n        {\r\n            MD5Core.GetHashBlock(input, ref abcd, startIndex);\r\n            startIndex += 64;\r\n        }\r\n        // The final data block. \r\n        return MD5Core.GetHashFinalBlock(input, startIndex, input.Length - startIndex, abcd, (Int64)input.Length * 8);\r\n    }\r\n\r\n    internal static byte[] GetHashFinalBlock(byte[] input, int ibStart, int cbSize, ABCDStruct ABCD, Int64 len)\r\n    {\r\n        byte[] working = new byte[64];  \r\n        byte[] length = BitConverter.GetBytes(len);\r\n\r\n        //Padding is a single bit 1, followed by the number of 0s required to make size congruent to 448 modulo 512. Step 1 of RFC 1321  \r\n        //The CLR ensures that our buffer is 0-assigned, we don't need to explicitly set it. This is why it ends up being quicker to just\r\n        //use a temporary array rather then doing in-place assignment (5% for small inputs)\r\n        Array.Copy(input, ibStart, working, 0, cbSize);\r\n        working[cbSize] = 0x80;\r\n\r\n        //We have enough room to store the length in this chunk\r\n        if (cbSize < 56) \r\n        {\r\n            Array.Copy(length, 0, working, 56, 8);\r\n            GetHashBlock(working, ref ABCD, 0);\r\n        }\r\n        else  //We need an aditional chunk to store the length\r\n        {\r\n            GetHashBlock(working, ref ABCD, 0);\r\n            //Create an entirely new chunk due to the 0-assigned trick mentioned above, to avoid an extra function call clearing the array\r\n            working = new byte[64];\r\n            Array.Copy(length, 0, working, 56, 8);\r\n            GetHashBlock(working, ref ABCD, 0);\r\n        }\r\n        byte[] output = new byte[16];\r\n        Array.Copy(BitConverter.GetBytes(ABCD.A), 0, output, 0, 4);\r\n        Array.Copy(BitConverter.GetBytes(ABCD.B), 0, output, 4, 4);\r\n        Array.Copy(BitConverter.GetBytes(ABCD.C), 0, output, 8, 4);\r\n        Array.Copy(BitConverter.GetBytes(ABCD.D), 0, output, 12, 4);\r\n        return output;\r\n    }\r\n\r\n    // Performs a single block transform of MD5 for a given set of ABCD inputs\r\n    /* If implementing your own hashing framework, be sure to set the initial ABCD correctly according to RFC 1321:\r\n    //    A = 0x67452301;\r\n    //    B = 0xefcdab89;\r\n    //    C = 0x98badcfe;\r\n    //    D = 0x10325476;\r\n    */\r\n    internal static void GetHashBlock(byte[] input, ref ABCDStruct ABCDValue, int ibStart)\r\n    {\r\n        uint[] temp = Converter(input, ibStart);\r\n        uint a = ABCDValue.A; \r\n        uint b = ABCDValue.B;\r\n        uint c = ABCDValue.C;\r\n        uint d = ABCDValue.D;\r\n\r\n        a = r1(a, b, c, d, temp[0 ], 7,  0xd76aa478);\r\n        d = r1(d, a, b, c, temp[1 ], 12, 0xe8c7b756);\r\n        c = r1(c, d, a, b, temp[2 ], 17, 0x242070db);\r\n        b = r1(b, c, d, a, temp[3 ], 22, 0xc1bdceee);\r\n        a = r1(a, b, c, d, temp[4 ], 7,  0xf57c0faf);\r\n        d = r1(d, a, b, c, temp[5 ], 12, 0x4787c62a);\r\n        c = r1(c, d, a, b, temp[6 ], 17, 0xa8304613);\r\n        b = r1(b, c, d, a, temp[7 ], 22, 0xfd469501);\r\n        a = r1(a, b, c, d, temp[8 ], 7,  0x698098d8);\r\n        d = r1(d, a, b, c, temp[9 ], 12, 0x8b44f7af);\r\n        c = r1(c, d, a, b, temp[10], 17, 0xffff5bb1);\r\n        b = r1(b, c, d, a, temp[11], 22, 0x895cd7be);\r\n        a = r1(a, b, c, d, temp[12], 7,  0x6b901122);\r\n        d = r1(d, a, b, c, temp[13], 12, 0xfd987193);\r\n        c = r1(c, d, a, b, temp[14], 17, 0xa679438e);\r\n        b = r1(b, c, d, a, temp[15], 22, 0x49b40821);\r\n\r\n        a = r2(a, b, c, d, temp[1 ], 5,  0xf61e2562);\r\n        d = r2(d, a, b, c, temp[6 ], 9,  0xc040b340);\r\n        c = r2(c, d, a, b, temp[11], 14, 0x265e5a51);\r\n        b = r2(b, c, d, a, temp[0 ], 20, 0xe9b6c7aa);\r\n        a = r2(a, b, c, d, temp[5 ], 5,  0xd62f105d);\r\n        d = r2(d, a, b, c, temp[10], 9,  0x02441453);\r\n        c = r2(c, d, a, b, temp[15], 14, 0xd8a1e681);\r\n        b = r2(b, c, d, a, temp[4 ], 20, 0xe7d3fbc8);\r\n        a = r2(a, b, c, d, temp[9 ], 5,  0x21e1cde6);\r\n        d = r2(d, a, b, c, temp[14], 9,  0xc33707d6);\r\n        c = r2(c, d, a, b, temp[3 ], 14, 0xf4d50d87);\r\n        b = r2(b, c, d, a, temp[8 ], 20, 0x455a14ed);\r\n        a = r2(a, b, c, d, temp[13], 5,  0xa9e3e905);\r\n        d = r2(d, a, b, c, temp[2 ], 9,  0xfcefa3f8);\r\n        c = r2(c, d, a, b, temp[7 ], 14, 0x676f02d9);\r\n        b = r2(b, c, d, a, temp[12], 20, 0x8d2a4c8a);\r\n\r\n        a = r3(a, b, c, d, temp[5 ], 4,  0xfffa3942);\r\n        d = r3(d, a, b, c, temp[8 ], 11, 0x8771f681);\r\n        c = r3(c, d, a, b, temp[11], 16, 0x6d9d6122);\r\n        b = r3(b, c, d, a, temp[14], 23, 0xfde5380c);\r\n        a = r3(a, b, c, d, temp[1 ], 4,  0xa4beea44);\r\n        d = r3(d, a, b, c, temp[4 ], 11, 0x4bdecfa9);\r\n        c = r3(c, d, a, b, temp[7 ], 16, 0xf6bb4b60);\r\n        b = r3(b, c, d, a, temp[10], 23, 0xbebfbc70);\r\n        a = r3(a, b, c, d, temp[13], 4,  0x289b7ec6);\r\n        d = r3(d, a, b, c, temp[0 ], 11, 0xeaa127fa);\r\n        c = r3(c, d, a, b, temp[3 ], 16, 0xd4ef3085);\r\n        b = r3(b, c, d, a, temp[6 ], 23, 0x04881d05);\r\n        a = r3(a, b, c, d, temp[9 ], 4,  0xd9d4d039);\r\n        d = r3(d, a, b, c, temp[12], 11, 0xe6db99e5);\r\n        c = r3(c, d, a, b, temp[15], 16, 0x1fa27cf8);\r\n        b = r3(b, c, d, a, temp[2 ], 23, 0xc4ac5665);\r\n\r\n        a = r4(a, b, c, d, temp[0 ], 6,  0xf4292244);\r\n        d = r4(d, a, b, c, temp[7 ], 10, 0x432aff97);\r\n        c = r4(c, d, a, b, temp[14], 15, 0xab9423a7);\r\n        b = r4(b, c, d, a, temp[5 ], 21, 0xfc93a039);\r\n        a = r4(a, b, c, d, temp[12], 6,  0x655b59c3);\r\n        d = r4(d, a, b, c, temp[3 ], 10, 0x8f0ccc92);\r\n        c = r4(c, d, a, b, temp[10], 15, 0xffeff47d);\r\n        b = r4(b, c, d, a, temp[1 ], 21, 0x85845dd1);\r\n        a = r4(a, b, c, d, temp[8 ], 6,  0x6fa87e4f);\r\n        d = r4(d, a, b, c, temp[15], 10, 0xfe2ce6e0);\r\n        c = r4(c, d, a, b, temp[6 ], 15, 0xa3014314);\r\n        b = r4(b, c, d, a, temp[13], 21, 0x4e0811a1);\r\n        a = r4(a, b, c, d, temp[4 ], 6,  0xf7537e82);\r\n        d = r4(d, a, b, c, temp[11], 10, 0xbd3af235);\r\n        c = r4(c, d, a, b, temp[2 ], 15, 0x2ad7d2bb);\r\n        b = r4(b, c, d, a, temp[9 ], 21, 0xeb86d391);\r\n\r\n        ABCDValue.A = unchecked(a + ABCDValue.A);\r\n        ABCDValue.B = unchecked(b + ABCDValue.B);\r\n        ABCDValue.C = unchecked(c + ABCDValue.C);\r\n        ABCDValue.D = unchecked(d + ABCDValue.D);\r\n        return; \r\n    }\r\n\r\n    //Manually unrolling these equations nets us a 20% performance improvement\r\n    private static uint r1(uint a, uint b, uint c, uint d, uint x, int s, uint t)\r\n    {\r\n        //                  (b + LSR((a + F(b, c, d) + x + t), s))\r\n        //F(x, y, z)        ((x & y) | ((x ^ 0xFFFFFFFF) & z))\r\n        return unchecked(b + LSR((a + ((b & c) | ((b ^ 0xFFFFFFFF) & d)) + x + t), s));\r\n    }\r\n\r\n    private static uint r2(uint a, uint b, uint c, uint d, uint x, int s, uint t)\r\n    {\r\n        //                  (b + LSR((a + G(b, c, d) + x + t), s))\r\n        //G(x, y, z)        ((x & z) | (y & (z ^ 0xFFFFFFFF)))\r\n        return unchecked(b + LSR((a + ((b & d) | (c & (d ^ 0xFFFFFFFF))) + x + t), s));\r\n    }\r\n\r\n    private static uint r3(uint a, uint b, uint c, uint d, uint x, int s, uint t)\r\n    {\r\n        //                  (b + LSR((a + H(b, c, d) + k + i), s))\r\n        //H(x, y, z)        (x ^ y ^ z)\r\n        return unchecked(b + LSR((a + (b ^ c ^ d) + x + t), s));\r\n    }\r\n\r\n    private static uint r4(uint a, uint b, uint c, uint d, uint x, int s, uint t)\r\n    {\r\n        //                  (b + LSR((a + I(b, c, d) + k + i), s))\r\n        //I(x, y, z)        (y ^ (x | (z ^ 0xFFFFFFFF)))\r\n        return unchecked(b + LSR((a + (c ^ (b | (d ^ 0xFFFFFFFF))) + x + t), s));\r\n    }\r\n\r\n    // Implementation of left rotate\r\n    // s is an int instead of a uint becuase the CLR requires the argument passed to >>/<< is of \r\n    // type int. Doing the demoting inside this function would add overhead.\r\n    private static uint LSR(uint i, int s)\r\n    {\r\n        return ((i << s) | (i >> (32-s)));\r\n    }\r\n\r\n    //Convert input array into array of UInts\r\n    private static uint[] Converter(byte[] input, int ibStart)\r\n    {\r\n        if(null == input)\r\n            throw new System.ArgumentNullException(\"input\", \"Unable convert null array to array of uInts\");\r\n        \r\n        uint[] result = new uint[16];\r\n        \r\n        for (int i = 0; i < 16; i++)\r\n        {\r\n            result[i] = (uint)input[ibStart + i * 4];\r\n            result[i] += (uint)input[ibStart + i * 4 + 1] << 8;\r\n            result[i] += (uint)input[ibStart + i * 4 + 2] << 16;\r\n            result[i] += (uint)input[ibStart + i * 4 + 3] << 24;\r\n        }\r\n       \r\n        return result;\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Hash/MD5/MD5CryptoServiceProvider.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Text;\r\n \r\nnamespace Telegram.Api.MD5\r\n{\r\n    public class MD5CryptoServiceProvider : MD5\r\n    {\r\n        public MD5CryptoServiceProvider()\r\n            : base()\r\n        {\r\n        }\r\n    }\r\n \r\n    public class MD5 : IDisposable\r\n    {\r\n        static public MD5 Create(string hashName)\r\n        {\r\n            if (hashName == \"MD5\")\r\n                return new MD5();\r\n            else\r\n                throw new NotSupportedException();\r\n        }\r\n \r\n        static public string GetMd5String(String source)\r\n        {\r\n            MD5 md = MD5CryptoServiceProvider.Create();\r\n            byte[] hash;\r\n \r\n            //Create a new instance of ASCIIEncoding to\r\n            //convert the string into an array of Unicode bytes.\r\n            UTF8Encoding enc = new UTF8Encoding();\r\n            //            ASCIIEncoding enc = new ASCIIEncoding();\r\n \r\n            //Convert the string into an array of bytes.\r\n            byte[] buffer = enc.GetBytes(source);\r\n \r\n            //Create the hash value from the array of bytes.\r\n            hash = md.ComputeHash(buffer);\r\n \r\n            StringBuilder sb = new StringBuilder();\r\n            foreach (byte b in hash)\r\n                sb.Append(b.ToString(\"x2\"));\r\n            return sb.ToString();\r\n        }\r\n \r\n        static public MD5 Create()\r\n        {\r\n            return new MD5();\r\n        }\r\n \r\n        #region base implementation of the MD5\r\n        #region constants\r\n        private const byte S11 = 7;\r\n        private const byte S12 = 12;\r\n        private const byte S13 = 17;\r\n        private const byte S14 = 22;\r\n        private const byte S21 = 5;\r\n        private const byte S22 = 9;\r\n        private const byte S23 = 14;\r\n        private const byte S24 = 20;\r\n        private const byte S31 = 4;\r\n        private const byte S32 = 11;\r\n        private const byte S33 = 16;\r\n        private const byte S34 = 23;\r\n        private const byte S41 = 6;\r\n        private const byte S42 = 10;\r\n        private const byte S43 = 15;\r\n        private const byte S44 = 21;\r\n        static private byte[] PADDING = new byte[] {\r\n              0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\r\n             };\r\n        #endregion\r\n \r\n        #region F, G, H and I are basic MD5 functions.\r\n        static private uint F(uint x, uint y, uint z)\r\n        {\r\n            return (((x) & (y)) | ((~x) & (z)));\r\n        }\r\n        static private uint G(uint x, uint y, uint z)\r\n        {\r\n            return (((x) & (z)) | ((y) & (~z)));\r\n        }\r\n        static private uint H(uint x, uint y, uint z)\r\n        {\r\n            return ((x) ^ (y) ^ (z));\r\n        }\r\n        static private uint I(uint x, uint y, uint z)\r\n        {\r\n            return ((y) ^ ((x) | (~z)));\r\n        }\r\n        #endregion\r\n \r\n        #region rotates x left n bits.\r\n        ///\r\n        /// rotates x left n bits.\r\n        ///\r\n        ///\r\n        ///\r\n        ///\r\n        static private uint ROTATE_LEFT(uint x, byte n)\r\n        {\r\n            return (((x) << (n)) | ((x) >> (32 - (n))));\r\n        }\r\n        #endregion\r\n \r\n        #region FF, GG, HH, and II transformations\r\n        /// FF, GG, HH, and II transformations\r\n        /// for rounds 1, 2, 3, and 4.\r\n        /// Rotation is separate from addition to prevent recomputation.\r\n        static private void FF(ref uint a, uint b, uint c, uint d, uint x, byte s, uint ac)\r\n        {\r\n            (a) += F((b), (c), (d)) + (x) + (uint)(ac);\r\n            (a) = ROTATE_LEFT((a), (s));\r\n            (a) += (b);\r\n        }\r\n        static private void GG(ref uint a, uint b, uint c, uint d, uint x, byte s, uint ac)\r\n        {\r\n            (a) += G((b), (c), (d)) + (x) + (uint)(ac);\r\n            (a) = ROTATE_LEFT((a), (s));\r\n            (a) += (b);\r\n        }\r\n        static private void HH(ref uint a, uint b, uint c, uint d, uint x, byte s, uint ac)\r\n        {\r\n            (a) += H((b), (c), (d)) + (x) + (uint)(ac);\r\n            (a) = ROTATE_LEFT((a), (s));\r\n            (a) += (b);\r\n        }\r\n        static private void II(ref uint a, uint b, uint c, uint d, uint x, byte s, uint ac)\r\n        {\r\n            (a) += I((b), (c), (d)) + (x) + (uint)(ac);\r\n            (a) = ROTATE_LEFT((a), (s));\r\n            (a) += (b);\r\n        }\r\n        #endregion\r\n \r\n        #region context info\r\n        ///\r\n        /// state (ABCD)\r\n        ///\r\n        uint[] state = new uint[4];\r\n \r\n        ///\r\n        /// number of bits, modulo 2^64 (lsb first)\r\n        ///\r\n        uint[] count = new uint[2];\r\n \r\n        ///\r\n        /// input buffer\r\n        ///\r\n        byte[] buffer = new byte[64];\r\n        #endregion\r\n \r\n        internal MD5()\r\n        {\r\n            Initialize();\r\n        }\r\n \r\n        ///\r\n        /// MD5 initialization. Begins an MD5 operation, writing a new context.\r\n        ///\r\n        ///\r\n        /// The RFC named it \"MD5Init\"\r\n        ///\r\n        public virtual void Initialize()\r\n        {\r\n            count[0] = count[1] = 0;\r\n \r\n            // Load magic initialization constants.\r\n            state[0] = 0x67452301;\r\n            state[1] = 0xefcdab89;\r\n            state[2] = 0x98badcfe;\r\n            state[3] = 0x10325476;\r\n        }\r\n \r\n        ///\r\n        /// MD5 block update operation. Continues an MD5 message-digest\r\n        /// operation, processing another message block, and updating the\r\n        /// context.\r\n        ///\r\n        ///\r\n        ///\r\n        ///\r\n        /// The RFC Named it MD5Update\r\n        protected virtual void HashCore(byte[] input, int offset, int count)\r\n        {\r\n            int i;\r\n            int index;\r\n            int partLen;\r\n \r\n            // Compute number of bytes mod 64\r\n            index = (int)((this.count[0] >> 3) & 0x3F);\r\n \r\n            // Update number of bits\r\n            if ((this.count[0] += (uint)((uint)count << 3)) < ((uint)count << 3))\r\n                this.count[1]++;\r\n            this.count[1] += ((uint)count >> 29);\r\n \r\n            partLen = 64 - index;\r\n \r\n            // Transform as many times as possible.\r\n            if (count >= partLen)\r\n            {\r\n                Buffer.BlockCopy(input, offset, this.buffer, index, partLen);\r\n                Transform(this.buffer, 0);\r\n \r\n                for (i = partLen; i + 63 < count; i += 64)\r\n                    Transform(input, offset + i);\r\n \r\n                index = 0;\r\n            }\r\n            else\r\n                i = 0;\r\n \r\n            // Buffer remaining input\r\n            Buffer.BlockCopy(input, offset + i, this.buffer, index, count - i);\r\n        }\r\n \r\n        ///\r\n        /// MD5 finalization. Ends an MD5 message-digest operation, writing the\r\n        /// the message digest and zeroizing the context.\r\n        ///\r\n        /// message digest\r\n        /// The RFC named it MD5Final\r\n        protected virtual byte[] HashFinal()\r\n        {\r\n            byte[] digest = new byte[16];\r\n            byte[] bits = new byte[8];\r\n            int index, padLen;\r\n \r\n            // Save number of bits\r\n            Encode(bits, 0, this.count, 0, 8);\r\n \r\n            // Pad out to 56 mod 64.\r\n            index = (int)((uint)(this.count[0] >> 3) & 0x3f);\r\n            padLen = (index < 56) ? (56 - index) : (120 - index);\r\n            HashCore(PADDING, 0, padLen);\r\n \r\n            // Append length (before padding)\r\n            HashCore(bits, 0, 8);\r\n \r\n            // Store state in digest\r\n            Encode(digest, 0, state, 0, 16);\r\n \r\n            // Zeroize sensitive information.\r\n            count[0] = count[1] = 0;\r\n            state[0] = 0;\r\n            state[1] = 0;\r\n            state[2] = 0;\r\n            state[3] = 0;\r\n \r\n            // initialize again, to be ready to use\r\n            Initialize();\r\n \r\n            return digest;\r\n        }\r\n \r\n        ///\r\n        /// MD5 basic transformation. Transforms state based on 64 bytes block.\r\n        ///\r\n        ///\r\n        ///\r\n        private void Transform(byte[] block, int offset)\r\n        {\r\n            uint a = state[0], b = state[1], c = state[2], d = state[3];\r\n            uint[] x = new uint[16];\r\n            Decode(x, 0, block, offset, 64);\r\n \r\n            // Round 1\r\n            FF(ref a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */\r\n            FF(ref d, a, b, c, x[1], S12, 0xe8c7b756); /* 2 */\r\n            FF(ref c, d, a, b, x[2], S13, 0x242070db); /* 3 */\r\n            FF(ref b, c, d, a, x[3], S14, 0xc1bdceee); /* 4 */\r\n            FF(ref a, b, c, d, x[4], S11, 0xf57c0faf); /* 5 */\r\n            FF(ref d, a, b, c, x[5], S12, 0x4787c62a); /* 6 */\r\n            FF(ref c, d, a, b, x[6], S13, 0xa8304613); /* 7 */\r\n            FF(ref b, c, d, a, x[7], S14, 0xfd469501); /* 8 */\r\n            FF(ref a, b, c, d, x[8], S11, 0x698098d8); /* 9 */\r\n            FF(ref d, a, b, c, x[9], S12, 0x8b44f7af); /* 10 */\r\n            FF(ref c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */\r\n            FF(ref b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */\r\n            FF(ref a, b, c, d, x[12], S11, 0x6b901122); /* 13 */\r\n            FF(ref d, a, b, c, x[13], S12, 0xfd987193); /* 14 */\r\n            FF(ref c, d, a, b, x[14], S13, 0xa679438e); /* 15 */\r\n            FF(ref b, c, d, a, x[15], S14, 0x49b40821); /* 16 */\r\n \r\n            // Round 2\r\n            GG(ref a, b, c, d, x[1], S21, 0xf61e2562); /* 17 */\r\n            GG(ref d, a, b, c, x[6], S22, 0xc040b340); /* 18 */\r\n            GG(ref c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */\r\n            GG(ref b, c, d, a, x[0], S24, 0xe9b6c7aa); /* 20 */\r\n            GG(ref a, b, c, d, x[5], S21, 0xd62f105d); /* 21 */\r\n            GG(ref d, a, b, c, x[10], S22, 0x2441453); /* 22 */\r\n            GG(ref c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */\r\n            GG(ref b, c, d, a, x[4], S24, 0xe7d3fbc8); /* 24 */\r\n            GG(ref a, b, c, d, x[9], S21, 0x21e1cde6); /* 25 */\r\n            GG(ref d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */\r\n            GG(ref c, d, a, b, x[3], S23, 0xf4d50d87); /* 27 */\r\n            GG(ref b, c, d, a, x[8], S24, 0x455a14ed); /* 28 */\r\n            GG(ref a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */\r\n            GG(ref d, a, b, c, x[2], S22, 0xfcefa3f8); /* 30 */\r\n            GG(ref c, d, a, b, x[7], S23, 0x676f02d9); /* 31 */\r\n            GG(ref b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */\r\n \r\n            // Round 3\r\n            HH(ref a, b, c, d, x[5], S31, 0xfffa3942); /* 33 */\r\n            HH(ref d, a, b, c, x[8], S32, 0x8771f681); /* 34 */\r\n            HH(ref c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */\r\n            HH(ref b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */\r\n            HH(ref a, b, c, d, x[1], S31, 0xa4beea44); /* 37 */\r\n            HH(ref d, a, b, c, x[4], S32, 0x4bdecfa9); /* 38 */\r\n            HH(ref c, d, a, b, x[7], S33, 0xf6bb4b60); /* 39 */\r\n            HH(ref b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */\r\n            HH(ref a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */\r\n            HH(ref d, a, b, c, x[0], S32, 0xeaa127fa); /* 42 */\r\n            HH(ref c, d, a, b, x[3], S33, 0xd4ef3085); /* 43 */\r\n            HH(ref b, c, d, a, x[6], S34, 0x4881d05); /* 44 */\r\n            HH(ref a, b, c, d, x[9], S31, 0xd9d4d039); /* 45 */\r\n            HH(ref d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */\r\n            HH(ref c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */\r\n            HH(ref b, c, d, a, x[2], S34, 0xc4ac5665); /* 48 */\r\n \r\n            // Round 4\r\n            II(ref a, b, c, d, x[0], S41, 0xf4292244); /* 49 */\r\n            II(ref d, a, b, c, x[7], S42, 0x432aff97); /* 50 */\r\n            II(ref c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */\r\n            II(ref b, c, d, a, x[5], S44, 0xfc93a039); /* 52 */\r\n            II(ref a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */\r\n            II(ref d, a, b, c, x[3], S42, 0x8f0ccc92); /* 54 */\r\n            II(ref c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */\r\n            II(ref b, c, d, a, x[1], S44, 0x85845dd1); /* 56 */\r\n            II(ref a, b, c, d, x[8], S41, 0x6fa87e4f); /* 57 */\r\n            II(ref d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */\r\n            II(ref c, d, a, b, x[6], S43, 0xa3014314); /* 59 */\r\n            II(ref b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */\r\n            II(ref a, b, c, d, x[4], S41, 0xf7537e82); /* 61 */\r\n            II(ref d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */\r\n            II(ref c, d, a, b, x[2], S43, 0x2ad7d2bb); /* 63 */\r\n            II(ref b, c, d, a, x[9], S44, 0xeb86d391); /* 64 */\r\n \r\n            state[0] += a;\r\n            state[1] += b;\r\n            state[2] += c;\r\n            state[3] += d;\r\n \r\n            // Zeroize sensitive information.\r\n            for (int i = 0; i < x.Length; i++)\r\n                x[i] = 0;\r\n        }\r\n \r\n        ///\r\n        /// Encodes input (uint) into output (byte). Assumes len is\r\n        ///  multiple of 4.\r\n        ///\r\n        ///\r\n        ///\r\n        ///\r\n        ///\r\n        ///\r\n        private static void Encode(byte[] output, int outputOffset, uint[] input, int inputOffset, int count)\r\n        {\r\n            int i, j;\r\n            int end = outputOffset + count;\r\n            for (i = inputOffset, j = outputOffset; j < end; i++, j += 4)\r\n            {\r\n                output[j] = (byte)(input[i] & 0xff);\r\n                output[j + 1] = (byte)((input[i] >> 8) & 0xff);\r\n                output[j + 2] = (byte)((input[i] >> 16) & 0xff);\r\n                output[j + 3] = (byte)((input[i] >> 24) & 0xff);\r\n            }\r\n        }\r\n \r\n        ///\r\n        /// Decodes input (byte) into output (uint). Assumes len is\r\n        /// a multiple of 4.\r\n        ///\r\n        ///\r\n        ///\r\n        ///\r\n        ///\r\n        ///\r\n        static private void Decode(uint[] output, int outputOffset, byte[] input, int inputOffset, int count)\r\n        {\r\n            int i, j;\r\n            int end = inputOffset + count;\r\n            for (i = outputOffset, j = inputOffset; j < end; i++, j += 4)\r\n                output[i] = ((uint)input[j]) | (((uint)input[j + 1]) << 8) | (((uint)input[j + 2]) << 16) | (((uint)input[j + 3]) << 24);\r\n        }\r\n        #endregion\r\n \r\n        #region expose the same interface as the regular MD5 object\r\n \r\n        protected byte[] HashValue;\r\n        protected int State;\r\n        public virtual bool CanReuseTransform\r\n        {\r\n            get\r\n            {\r\n                return true;\r\n            }\r\n        }\r\n \r\n        public virtual bool CanTransformMultipleBlocks\r\n        {\r\n            get\r\n            {\r\n                return true;\r\n            }\r\n        }\r\n        public virtual byte[] Hash\r\n        {\r\n            get\r\n            {\r\n                if (this.State != 0)\r\n                    throw new InvalidOperationException();\r\n                return (byte[])HashValue.Clone();\r\n            }\r\n        }\r\n        public virtual int HashSize\r\n        {\r\n            get\r\n            {\r\n                return HashSizeValue;\r\n            }\r\n        }\r\n        protected int HashSizeValue = 128;\r\n \r\n        public virtual int InputBlockSize\r\n        {\r\n            get\r\n            {\r\n                return 1;\r\n            }\r\n        }\r\n        public virtual int OutputBlockSize\r\n        {\r\n            get\r\n            {\r\n                return 1;\r\n            }\r\n        }\r\n \r\n        public void Clear()\r\n        {\r\n            Dispose(true);\r\n        }\r\n \r\n        public byte[] ComputeHash(byte[] buffer)\r\n        {\r\n            return ComputeHash(buffer, 0, buffer.Length);\r\n        }\r\n        public byte[] ComputeHash(byte[] buffer, int offset, int count)\r\n        {\r\n            Initialize();\r\n            HashCore(buffer, offset, count);\r\n            HashValue = HashFinal();\r\n            return (byte[])HashValue.Clone();\r\n        }\r\n \r\n        public byte[] ComputeHash(Stream inputStream)\r\n        {\r\n            Initialize();\r\n            int count;\r\n            byte[] buffer = new byte[4096];\r\n            while (0 < (count = inputStream.Read(buffer, 0, 4096)))\r\n            {\r\n                HashCore(buffer, 0, count);\r\n            }\r\n            HashValue = HashFinal();\r\n            return (byte[])HashValue.Clone();\r\n        }\r\n \r\n        public int TransformBlock(\r\n            byte[] inputBuffer,\r\n            int inputOffset,\r\n            int inputCount,\r\n            byte[] outputBuffer,\r\n            int outputOffset\r\n            )\r\n        {\r\n            if (inputBuffer == null)\r\n            {\r\n                throw new ArgumentNullException(\"inputBuffer\");\r\n            }\r\n            if (inputOffset < 0)\r\n            {\r\n                throw new ArgumentOutOfRangeException(\"inputOffset\");\r\n            }\r\n            if ((inputCount < 0) || (inputCount > inputBuffer.Length))\r\n            {\r\n                throw new ArgumentException(\"inputCount\");\r\n            }\r\n            if ((inputBuffer.Length - inputCount) < inputOffset)\r\n            {\r\n                throw new ArgumentOutOfRangeException(\"inputOffset\");\r\n            }\r\n            if (this.State == 0)\r\n            {\r\n                Initialize();\r\n                this.State = 1;\r\n            }\r\n \r\n            HashCore(inputBuffer, inputOffset, inputCount);\r\n            if ((inputBuffer != outputBuffer) || (inputOffset != outputOffset))\r\n            {\r\n                Buffer.BlockCopy(inputBuffer, inputOffset, outputBuffer, outputOffset, inputCount);\r\n            }\r\n            return inputCount;\r\n        }\r\n        public byte[] TransformFinalBlock(\r\n            byte[] inputBuffer,\r\n            int inputOffset,\r\n            int inputCount\r\n            )\r\n        {\r\n            if (inputBuffer == null)\r\n            {\r\n                throw new ArgumentNullException(\"inputBuffer\");\r\n            }\r\n            if (inputOffset < 0)\r\n            {\r\n                throw new ArgumentOutOfRangeException(\"inputOffset\");\r\n            }\r\n            if ((inputCount < 0) || (inputCount > inputBuffer.Length))\r\n            {\r\n                throw new ArgumentException(\"inputCount\");\r\n            }\r\n            if ((inputBuffer.Length - inputCount) < inputOffset)\r\n            {\r\n                throw new ArgumentOutOfRangeException(\"inputOffset\");\r\n            }\r\n            if (this.State == 0)\r\n            {\r\n                Initialize();\r\n            }\r\n            HashCore(inputBuffer, inputOffset, inputCount);\r\n            HashValue = HashFinal();\r\n            byte[] buffer = new byte[inputCount];\r\n            Buffer.BlockCopy(inputBuffer, inputOffset, buffer, 0, inputCount);\r\n            this.State = 0;\r\n            return buffer;\r\n        }\r\n        #endregion\r\n \r\n        protected virtual void Dispose(bool disposing)\r\n        {\r\n            if (!disposing)\r\n                Initialize();\r\n        }\r\n        public void Dispose()\r\n        {\r\n            Dispose(true);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Hash/MD5/MD5Managed.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#if !WIN_RT\r\nusing System;\r\nusing System.Security.Cryptography;\r\n#if WINDOWS_PHONE\r\npublic class MD5Managed : HashAlgorithm\r\n#else\r\npublic class MD5Managed : MD5\r\n#endif\r\n{\r\n    private byte[] _data;\r\n    private ABCDStruct _abcd;\r\n    private Int64 _totalLength;\r\n    private int _dataSize;\r\n    \r\n    public MD5Managed()\r\n    {\r\n        base.HashSizeValue = 0x80;\r\n        this.Initialize();       \r\n    }\r\n\r\n    public override void Initialize()\r\n    {\r\n        _data = new byte[64];\r\n        _dataSize = 0;\r\n        _totalLength = 0;\r\n        _abcd = new ABCDStruct(); \r\n        //Intitial values as defined in RFC 1321\r\n        _abcd.A = 0x67452301;\r\n        _abcd.B = 0xefcdab89;\r\n        _abcd.C = 0x98badcfe;\r\n        _abcd.D = 0x10325476;\r\n    }\r\n     \r\n    protected override void HashCore(byte[] array, int ibStart, int cbSize)\r\n    {\r\n        int startIndex = ibStart;\r\n        int totalArrayLength = _dataSize + cbSize; \r\n        if (totalArrayLength >= 64)\r\n        {\r\n            Array.Copy(array, startIndex, _data, _dataSize, 64 - _dataSize);\r\n            // Process message of 64 bytes (512 bits)\r\n            MD5Core.GetHashBlock(_data, ref _abcd, 0); \r\n            startIndex += 64 - _dataSize;\r\n            totalArrayLength -= 64;\r\n            while (totalArrayLength >= 64) \r\n            {\r\n                Array.Copy(array, startIndex, _data, 0, 64);\r\n                MD5Core.GetHashBlock(array, ref _abcd, startIndex); \r\n                totalArrayLength -= 64;\r\n                startIndex += 64;\r\n            }\r\n            _dataSize = totalArrayLength;\r\n            Array.Copy(array, startIndex, _data, 0, totalArrayLength); \r\n        }\r\n        else \r\n        {\r\n            Array.Copy(array, startIndex, _data, _dataSize, cbSize);\r\n            _dataSize = totalArrayLength;\r\n        }\r\n        _totalLength += cbSize; \r\n    }\r\n\r\n    protected override byte[] HashFinal()\r\n    {\r\n        base.HashValue = MD5Core.GetHashFinalBlock(_data, 0, _dataSize, _abcd, _totalLength * 8);\r\n        return base.HashValue;\r\n    }\r\n}\r\n#endif"
  },
  {
    "path": "Telegram.Api/Helpers/AuthorizationHelper.cs",
    "content": "﻿using System;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Numerics;\r\nusing System.Security.Cryptography;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace Telegram.Api.Helpers\r\n{\r\n    /*public class AuthorizationHelper : IAuthorizationHelper\r\n    {\r\n        public static byte[] AuthKey { get; set; }\r\n        public static TLLong Salt { get; set; }\r\n        public static TLLong SessionId { get; set; }\r\n\r\n        private readonly ITransport _transport;\r\n\r\n        public AuthorizationHelper(ITransport transport)\r\n        {\r\n            _transport = transport;\r\n        }\r\n\r\n        public void InitAsync(Action<Tuple<byte[], byte[], byte[]>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var authTime = Stopwatch.StartNew();\r\n            // 1 stage\r\n            var authRequest = ComposeBeginAuthRequest();\r\n            var message = CreatePlainMessageBody(authRequest);\r\n            var guid = 1;\r\n            _transport.SendBytesAsync(\"resPQ \" + guid, message,\r\n            x1 =>\r\n            {\r\n                var buffer = x1;\r\n                // 2 stage\r\n                var authResponse = AuthResponse.Parse(buffer);\r\n\r\n                // 3 stage\r\n                TLUtils.WriteLine(\"pq: \" + authResponse.pq);\r\n                var pqCalcTime = Stopwatch.StartNew();\r\n                var tuple = Utils.GetPQPollard(authResponse.pq);\r\n                pqCalcTime.Stop();\r\n                TLUtils.WriteLineAtBegin(\"pqCalc time: \" + pqCalcTime.Elapsed);\r\n                var p = tuple.Item1;\r\n                var q = tuple.Item2;\r\n                TLUtils.WriteLine(\"p: \" + tuple.Item1);\r\n                var pStr = TLString.FromUInt64(tuple.Item1);\r\n                //TLUtils.WriteLine(\"p bytes: \" + BitConverter.ToString(pStr.ToBytes(8)));\r\n\r\n                var qStr = TLString.FromUInt64(tuple.Item2);\r\n                TLUtils.WriteLine(\"q: \" + tuple.Item2);\r\n                //TLUtils.WriteLine(\"q bytes: \" + BitConverter.ToString(qStr.ToBytes(8)));\r\n\r\n\r\n\r\n\r\n\r\n\r\n                // 4 stage\r\n                var random1 = new Random();\r\n                var newNonce = new byte[32];\r\n                random1.NextBytes(newNonce);\r\n\r\n                var data = ComposeData(authResponse, p, q, newNonce); //newNonce 32\r\n                //TLUtils.WriteLine(\"-----------------------------------------\");\r\n                //TLUtils.WriteLine(string.Format(\"data [{1}]: {0}\", BitConverter.ToString(data), data.Length));\r\n                //TLUtils.WriteLine(\"-----------------------------------------\");\r\n\r\n\r\n\r\n                SHA1 sha = new SHA1Managed();\r\n                var sha1 = sha.ComputeHash(data); // data 96\r\n                //TLUtils.WriteLine(\"-----------------------------------------\");\r\n                //TLUtils.WriteLine(string.Format(\"SHA1 data [{1}]: {0}\", BitConverter.ToString(sha1), sha1.Length));\r\n                //TLUtils.WriteLine(\"-----------------------------------------\");\r\n\r\n                var dataWithHash = sha1.Concat(data).ToArray(); //116\r\n                var data255 = new byte[255];\r\n                var random = new Random();\r\n                random.NextBytes(data255);\r\n                Array.Copy(dataWithHash, data255, dataWithHash.Length);\r\n                //TLUtils.WriteLine(\"-----------------------------------------\");\r\n                //TLUtils.WriteLine(string.Format(\"data with hash [{1}]: {0}\", BitConverter.ToString(data255), data255.Length));\r\n                //TLUtils.WriteLine(\"-----------------------------------------\");\r\n\r\n                var rsa = GetRSABytes(data255); //data255 255 bytes\r\n\r\n                var dhRequest = ComposeBeginDHRequest(authResponse, p, q, rsa); //rsa 256 bytes\r\n                var dhMessage = CreatePlainMessageBody(dhRequest); //dhRequest 320 bytes\r\n                guid = 2;\r\n                _transport.SendBytesAsync(\"req_DH_params \" + guid, dhMessage,\r\n                    dhResponseBuffer =>\r\n                    {\r\n                        var dhResponse = BeginDHResponse.Parse(dhResponseBuffer);\r\n\r\n                        var aesParams = GetAesKeyIV(authResponse.ServerNonce, newNonce);\r\n\r\n                        var decryptedAnswerWithHash = Utils.AesIge(dhResponse.EncryptedAnswer, aesParams.Item1, aesParams.Item2, false);\r\n                        TLUtils.WriteLine(\"---Decrypted answer with hash----------------\");\r\n                        TLUtils.WriteLine(BitConverter.ToString(decryptedAnswerWithHash));\r\n                        //var encryptedAnswerWithHash = Utils.AesIge(dhResponse.EncryptedAnswer, aesParams.Item1, aesParams.Item2, true);\r\n\r\n                        var answer = Answer.Parse(decryptedAnswerWithHash.Skip(20).ToArray());\r\n                        var bBytes = new byte[256]; //big endian B\r\n                        random.NextBytes(bBytes);\r\n                        //TLUtils.WriteLine(\"B bytes: \" + BitConverter.ToString(bBytes));\r\n\r\n                        var g_bBytes = GetG_B(bBytes, answer.G, answer.DHPrime); // big-endian g_b\r\n\r\n                        //TLUtils.WriteLine(\"--G_B big endian bytes----------------------\");\r\n                        //TLUtils.WriteLine(BitConverter.ToString(g_bBytes));\r\n\r\n                        var client_DH_inner_data = ComposeClientDHInnerData(g_bBytes, authResponse);\r\n\r\n                        var client_DH_inner_dataWithHash = sha.ComputeHash(client_DH_inner_data).Concat(client_DH_inner_data).ToArray();\r\n                        var addedBytesLength = 16 - (client_DH_inner_dataWithHash.Length % 16);\r\n                        if (addedBytesLength > 0 && addedBytesLength < 16)\r\n                        {\r\n                            var addedBytes = new byte[addedBytesLength];\r\n                            random.NextBytes(addedBytes);\r\n                            client_DH_inner_dataWithHash = client_DH_inner_dataWithHash.Concat(addedBytes).ToArray();\r\n                            //TLUtils.WriteLine(string.Format(\"Added {0} bytes\", addedBytesLength));\r\n                        }\r\n\r\n                        var aesEncryptClientDHInnerDataWithHash = Utils.AesIge(client_DH_inner_dataWithHash, aesParams.Item1, aesParams.Item2, true);\r\n                        //TLUtils.WriteLine(\"--Last encrypted data------------------\");\r\n                        //TLUtils.WriteLine(BitConverter.ToString(aesEncryptClientDHInnerDataWithHash));\r\n\r\n\r\n                        var requestSetClientDHParams = ComposeRequestSetClientDHParams(authResponse, aesEncryptClientDHInnerDataWithHash);\r\n                        var requestSetClientDHParamsMessage = CreatePlainMessageBody(requestSetClientDHParams);\r\n                        guid = 3;\r\n                        _transport.SendBytesAsync(\"set_client_DH_params \" + guid, requestSetClientDHParamsMessage,\r\n                            x2 =>\r\n                            {\r\n                                authTime.Stop();\r\n                                TLUtils.WriteLineAtBegin(\"pqCalc time: \" + pqCalcTime.Elapsed);\r\n                                TLUtils.WriteLineAtBegin(\"Auth time: \" + authTime.Elapsed);\r\n                                TLUtils.WriteLineAtBegin(\"Auth - pqCalc time: \" + (authTime.Elapsed - pqCalcTime.Elapsed)); \r\n                                buffer = x2;\r\n                                var endAuthResponse = EndAuthResponse.Parse(buffer);\r\n\r\n                                var authKey = GetAuthKey(bBytes, answer.G_A, answer.DHPrime);\r\n                                TLUtils.WriteLine(\"-Big endian auth key----------------------------------\");\r\n                                TLUtils.WriteLine(BitConverter.ToString(authKey));\r\n                                TLUtils.WriteLine(\"-Big endian auth key----------------------------------\");\r\n\r\n#if !SILVERLIGHT\r\n                                using (StreamWriter w = File.AppendText(\"log.txt\"))\r\n                                {\r\n                                    w.WriteLine(DateTime.Now);\r\n                                    w.WriteLine(BitConverter.ToString(authKey));\r\n                                }\r\n#endif\r\n                                //newNonce - little endian\r\n                                //authResponse.ServerNonce - little endian\r\n                                var salt = GetSalt(newNonce, authResponse.ServerNonce);\r\n                                var sessionId = new byte[8];\r\n                                random.NextBytes(sessionId);\r\n\r\n                                AuthKey = authKey;\r\n                                Salt = new TLLong(BitConverter.ToInt64(salt, 0));\r\n                                SessionId = new TLLong(BitConverter.ToInt64(sessionId, 0));\r\n                                TLUtils.WriteLine(\"Salt \" + Salt + \" (\" + BitConverter.ToString(salt) + \")\");\r\n                                TLUtils.WriteLine(\"Session id \" +SessionId + \" (\" + BitConverter.ToString(sessionId) + \")\");\r\n\r\n                                callback(new Tuple<byte[], byte[], byte[]>(authKey, salt, sessionId));\r\n                            },\r\n                            () => { if (faultCallback != null) faultCallback(null); });\r\n                    },\r\n                    () => { if (faultCallback != null) faultCallback(null); }); // dhMessage340bytes 404 here\r\n            },\r\n            () => { if (faultCallback != null) faultCallback(null); });\r\n        }\r\n\r\n        public Tuple<byte[], byte[], byte[]> Init()\r\n        {\r\n            // 1 stage\r\n            var authRequest = ComposeBeginAuthRequest();\r\n            var message = CreatePlainMessageBody(authRequest);\r\n            var buffer = _transport.SendBytes(message);\r\n\r\n            // 2 stage\r\n            var authResponse = AuthResponse.Parse(buffer);\r\n\r\n            // 3 stage\r\n            TLUtils.WriteLine(\"pq: \", authResponse.pq);\r\n            var time = Stopwatch.StartNew();\r\n            var tuple = Utils.GetPQ(authResponse.pq);\r\n            var p = tuple.Item1;\r\n            var q = tuple.Item2;\r\n            TLUtils.WriteLine(\"p: \" + tuple.Item1);\r\n            var pStr = TLString.FromUInt64(tuple.Item1);\r\n            //TLUtils.WriteLine(\"p bytes: \" + BitConverter.ToString(pStr.ToBytes(8)));\r\n\r\n            var qStr = TLString.FromUInt64(tuple.Item2);\r\n            TLUtils.WriteLine(\"q: \" + tuple.Item2);\r\n            //TLUtils.WriteLine(\"q bytes: \" + BitConverter.ToString(qStr.ToBytes(8)));\r\n            TLUtils.WriteLine(\"Calculation time: \" + time.ElapsedMilliseconds);\r\n\r\n            // 4 stage\r\n            var random1 = new Random();\r\n            var newNonce = new byte[32];\r\n            random1.NextBytes(newNonce);\r\n\r\n            var data = ComposeData(authResponse, p, q, newNonce); //newNonce 32\r\n            //TLUtils.WriteLine(\"-----------------------------------------\");\r\n            //TLUtils.WriteLine(string.Format(\"data [{1}]: {0}\", BitConverter.ToString(data), data.Length));\r\n            //TLUtils.WriteLine(\"-----------------------------------------\");\r\n\r\n\r\n\r\n            SHA1 sha = new SHA1Managed();\r\n            var sha1 = sha.ComputeHash(data); // data 96\r\n            //TLUtils.WriteLine(\"-----------------------------------------\");\r\n            //TLUtils.WriteLine(string.Format(\"SHA1 data [{1}]: {0}\", BitConverter.ToString(sha1), sha1.Length));\r\n            //TLUtils.WriteLine(\"-----------------------------------------\");\r\n\r\n            var dataWithHash = sha1.Concat(data).ToArray(); //116\r\n            var data255 = new byte[255];\r\n            var random = new Random();\r\n            random.NextBytes(data255);\r\n            Array.Copy(dataWithHash, data255, dataWithHash.Length);\r\n            //TLUtils.WriteLine(\"-----------------------------------------\");\r\n            //TLUtils.WriteLine(string.Format(\"data with hash [{1}]: {0}\", BitConverter.ToString(data255), data255.Length));\r\n            //TLUtils.WriteLine(\"-----------------------------------------\");\r\n\r\n            var rsa = GetRSABytes(data255); //data255 255 bytes\r\n\r\n            var dhRequest = ComposeBeginDHRequest(authResponse, p, q, rsa); //rsa 256 bytes\r\n            var dhMessage = CreatePlainMessageBody(dhRequest); //dhRequest 320 bytes\r\n            var stamp = Stopwatch.StartNew();\r\n            var dhResponseBuffer = _transport.SendBytes(dhMessage); // dhMessage340bytes 404 here\r\n\r\n            var dhResponse = BeginDHResponse.Parse(dhResponseBuffer);\r\n\r\n            var aesParams = GetAesKeyIV(authResponse.ServerNonce, newNonce);\r\n\r\n            var decryptedAnswerWithHash = Utils.AesIge(dhResponse.EncryptedAnswer, aesParams.Item1, aesParams.Item2, false);\r\n            //TLUtils.WriteLine(\"---Decrypted answer with hash----------------\");\r\n            //TLUtils.WriteLine(BitConverter.ToString(decryptedAnswerWithHash));\r\n            //var encryptedAnswerWithHash = Utils.AesIge(dhResponse.EncryptedAnswer, aesParams.Item1, aesParams.Item2, true);\r\n\r\n            var answer = Answer.Parse(decryptedAnswerWithHash.Skip(20).ToArray());\r\n            var bBytes = new byte[256]; //big endian B\r\n            random.NextBytes(bBytes);\r\n            //TLUtils.WriteLine(\"B bytes: \" + BitConverter.ToString(bBytes));\r\n\r\n            var g_bBytes = GetG_B(bBytes, answer.G, answer.DHPrime); // big-endian g_b\r\n\r\n            //TLUtils.WriteLine(\"--G_B big endian bytes----------------------\");\r\n            //TLUtils.WriteLine(BitConverter.ToString(g_bBytes));\r\n\r\n            var client_DH_inner_data = ComposeClientDHInnerData(g_bBytes, authResponse);\r\n\r\n            var client_DH_inner_dataWithHash = sha.ComputeHash(client_DH_inner_data).Concat(client_DH_inner_data).ToArray();\r\n            var addedBytesLength = 16 - (client_DH_inner_dataWithHash.Length % 16);\r\n            if (addedBytesLength > 0 && addedBytesLength < 16)\r\n            {\r\n                var addedBytes = new byte[addedBytesLength];\r\n                random.NextBytes(addedBytes);\r\n                client_DH_inner_dataWithHash = client_DH_inner_dataWithHash.Concat(addedBytes).ToArray();\r\n                //TLUtils.WriteLine(string.Format(\"Added {0} bytes\", addedBytesLength));\r\n            }\r\n\r\n            var aesEncryptClientDHInnerDataWithHash = Utils.AesIge(client_DH_inner_dataWithHash, aesParams.Item1, aesParams.Item2, true);\r\n            //TLUtils.WriteLine(\"--Last encrypted data------------------\");\r\n            //TLUtils.WriteLine(BitConverter.ToString(aesEncryptClientDHInnerDataWithHash));\r\n\r\n\r\n            var requestSetClientDHParams = ComposeRequestSetClientDHParams(authResponse, aesEncryptClientDHInnerDataWithHash);\r\n            var requestSetClientDHParamsMessage = CreatePlainMessageBody(requestSetClientDHParams);\r\n            buffer = _transport.SendBytes(requestSetClientDHParamsMessage);\r\n            //TLUtils.WriteLine(\"--RESPONSE--------------\");\r\n            //TLUtils.WriteLine(BitConverter.ToString(buffer));\r\n            var endAuthResponse = EndAuthResponse.Parse(buffer);\r\n\r\n            var authKey = GetAuthKey(bBytes, answer.G_A, answer.DHPrime);\r\n            TLUtils.WriteLine(\"-Big endian auth key----------------------------------\");\r\n            TLUtils.WriteLine(BitConverter.ToString(authKey));\r\n            TLUtils.WriteLine(\"-Big endian auth key----------------------------------\");\r\n\r\n            using (StreamWriter w = File.AppendText(\"log.txt\"))\r\n            {\r\n                w.WriteLine(DateTime.Now);\r\n                w.WriteLine(BitConverter.ToString(authKey));\r\n            }\r\n\r\n            // II saveDeveloperInfo\r\n\r\n            //var saveDeveloperInfoRequest = ComposeSaveDeveloperInfoRequest();\r\n            //newNonce - little endian\r\n            //authResponse.ServerNonce - little endian\r\n            var salt = GetSalt(newNonce, authResponse.ServerNonce);\r\n            TLUtils.WriteLine(\"Salt \" + BitConverter.ToString(salt));\r\n            var sessionId = new byte[8];\r\n            random.NextBytes(sessionId);\r\n            TLUtils.WriteLine(\"Session id \" + BitConverter.ToString(sessionId));\r\n\r\n            AuthKey = authKey;\r\n            Salt = new TLLong(BitConverter.ToInt64(salt, 0));\r\n            SessionId = new TLLong(BitConverter.ToInt64(sessionId, 0));\r\n\r\n            return new Tuple<byte[], byte[], byte[]>(authKey, salt, sessionId);\r\n        }\r\n\r\n\r\n        public static byte[] GetSalt(byte[] newNonce, byte[] serverNonce)\r\n        {\r\n            var newNonceBytes = newNonce.Take(8).ToArray();\r\n            var serverNonceBytes = serverNonce.Take(8).ToArray();\r\n\r\n            //TLUtils.WriteLine(\"--Generate salt--\");\r\n            //TLUtils.WriteLine(\"NewNonce little endian   \" + BitConverter.ToString(newNonce));\r\n            //TLUtils.WriteLine(\"ServerNonce little endian \" + BitConverter.ToString(serverNonce));\r\n\r\n            //TLUtils.WriteLine(\"Getted 8 first bytes\");\r\n            //TLUtils.WriteLine(\"NewNonce    \" + BitConverter.ToString(newNonceBytes));\r\n            //TLUtils.WriteLine(\"ServerNonce \" + BitConverter.ToString(serverNonceBytes));\r\n            var returnBytes = new byte[8];\r\n            for (int i = 0; i < returnBytes.Length; i++)\r\n            {\r\n                returnBytes[i] = (byte)(newNonceBytes[i] ^ serverNonceBytes[i]);\r\n            }\r\n\r\n            return returnBytes;\r\n        }\r\n\r\n        private static byte[] ComposeBeginAuthRequest()\r\n        {\r\n            byte[] res_pq = { 0x60, 0x46, 0x97, 0x78 };\r\n\r\n            var randomNumber = new byte[16];\r\n            var random = new Random();\r\n            random.NextBytes(randomNumber);\r\n\r\n            return res_pq.Reverse()\r\n                .Concat(randomNumber).ToArray();\r\n        }\r\n\r\n        static byte[] CreatePlainMessageBody(byte[] data)\r\n        {\r\n            byte[] authKeyId = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\r\n            var now = DateTime.Now;\r\n            var fullTimeBytes = BitConverter.GetBytes((long)Utils.DateTimeToUnixTimestamp(now));\r\n            var unixTime = (long)Utils.DateTimeToUnixTimestamp(now) << 32;\r\n            byte[] date = //{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\r\n            BitConverter.GetBytes(unixTime);\r\n            var messageBodyLength = BitConverter.GetBytes(data.Length);\r\n\r\n            return authKeyId\r\n                .Concat(date)\r\n                .Concat(messageBodyLength)\r\n                .Concat(data).ToArray();\r\n        }\r\n\r\n        // return big-endian authKey\r\n        public static byte[] GetAuthKey(byte[] bBytes, byte[] g_aData, byte[] dhPrimeData)\r\n        {\r\n            int position = 0;\r\n            var b = new BigInteger(bBytes.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n            var dhPrime = TLObject.GetObject<TLString>(dhPrimeData, ref position).ToBigInteger();\r\n            position = 0;\r\n            var g_a = TLObject.GetObject<TLString>(g_aData, ref position).ToBigInteger();\r\n\r\n            var authKey = BigInteger.ModPow(g_a, b, dhPrime).ToByteArray(); // little endian + (may be) zero last byte\r\n\r\n            //remove last zero byte\r\n            if (authKey[authKey.Length - 1] == 0x00)\r\n            {\r\n                authKey = authKey.SubArray(0, authKey.Length - 1);\r\n            }\r\n\r\n            return authKey.Reverse().ToArray();\r\n        }\r\n\r\n        // b - big endian bytes\r\n        // g - serialized data\r\n        // dhPrime - serialized data\r\n        // returns big-endian G_B\r\n        public static byte[] GetG_B(byte[] bBytes, byte[] gData, byte[] dhPrimeData)\r\n        {\r\n            //var bBytes = new byte[256]; // big endian bytes\r\n            //var random = new Random();\r\n            //random.NextBytes(bBytes);\r\n            int position = 0;\r\n            var g = new BigInteger(gData);\r\n            var dhPrime = TLObject.GetObject<TLString>(dhPrimeData, ref position).ToBigInteger();\r\n\r\n            var b = new BigInteger(bBytes.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n\r\n            var g_b = BigInteger.ModPow(g, b, dhPrime).ToByteArray(); // little endian + (may be) zero last byte\r\n\r\n            //remove last zero byte\r\n            if (g_b[g_b.Length - 1] == 0x00)\r\n            {\r\n                g_b = g_b.SubArray(0, g_b.Length - 1);\r\n            }\r\n\r\n            return g_b.Reverse().ToArray();\r\n        }\r\n\r\n        public static Tuple<byte[], byte[]> GetAesKeyIV(byte[] serverNonce, byte[] newNonce)\r\n        {\r\n            SHA1 sha = new SHA1Managed();\r\n\r\n            var newNonceServerNonce = newNonce.Concat(serverNonce).ToArray();\r\n            var serverNonceNewNonce = serverNonce.Concat(newNonce).ToArray();\r\n            var key = sha.ComputeHash(newNonceServerNonce)\r\n                .Concat(sha.ComputeHash(serverNonceNewNonce).SubArray(0, 12));\r\n            var im = sha.ComputeHash(serverNonceNewNonce).SubArray(12, 8)\r\n                .Concat(sha.ComputeHash(newNonce.Concat(newNonce).ToArray()))\r\n                .Concat(newNonce.SubArray(0, 4));\r\n\r\n            return new Tuple<byte[], byte[]>(key.ToArray(), im.ToArray());\r\n        }\r\n\r\n        // encryptedData - big-endian number\r\n        private static byte[] ComposeBeginDHRequest(AuthResponse response, UInt64 p, UInt64 q, byte[] encryptedData)\r\n        {\r\n            //TLUtils.WriteLine(\"---------------------------------\");\r\n            //TLUtils.WriteLine(\"Begin DH\");\r\n            //TLUtils.WriteLine(\"---------------------------------\");\r\n            var req_DH_params = new byte[] { 0xd7, 0x12, 0xe4, 0xbe };\r\n            var nonce = response.Nonce;\r\n            //TLUtils.WriteLine(\"ServerNonce: \" + BitConverter.ToString(response.Nonce));\r\n            var serverNonce = response.ServerNonce;\r\n            //TLUtils.WriteLine(\"ServerNonce: \" + BitConverter.ToString(response.ServerNonce));\r\n            var pBytes = TLString.FromUInt64(p).ToBytes(); // 8\r\n            //TLUtils.WriteLine(\"p: \" + BitConverter.ToString(pBytes));\r\n            var qBytes = TLString.FromUInt64(q).ToBytes(); // 8\r\n            //TLUtils.WriteLine(\"q: \" + BitConverter.ToString(qBytes));\r\n            var fingerPrints = response.FingerPrints;\r\n            //TLUtils.WriteLine(\"FingerPrints: \" + BitConverter.ToString(response.FingerPrints));\r\n            var encryptedDataBytes = new byte[] { 0xFE, 0x00, 0x01, 0x00 }.Concat(encryptedData).ToArray();\r\n            //TLUtils.WriteLine(\"encryptedDataBytes: \" + BitConverter.ToString(encryptedDataBytes));\r\n\r\n            return req_DH_params.Reverse()\r\n                .Concat(nonce)\r\n                .Concat(serverNonce)\r\n                .Concat(pBytes)\r\n                .Concat(qBytes)\r\n                .Concat(fingerPrints)\r\n                .Concat(encryptedDataBytes).ToArray();\r\n        }\r\n\r\n        \r\n\r\n        private static byte[] ComposeRequestSetClientDHParams(AuthResponse response, byte[] encryptedData)\r\n        {\r\n            //TLUtils.WriteLine(\"----Compose SetClientDHParams-------------\");\r\n            var set_client_DH_params = new byte[] { 0x1f, 0x5f, 0x04, 0xf5 };\r\n            //TLUtils.WriteLine(\"set_client_DH_params \" + BitConverter.ToString(set_client_DH_params));\r\n\r\n            var nonce = response.Nonce;\r\n            //TLUtils.WriteLine(\"Nonce \" + BitConverter.ToString(nonce));\r\n\r\n            var serverNonce = response.ServerNonce;\r\n            //TLUtils.WriteLine(\"Server nonce \" + BitConverter.ToString(serverNonce));\r\n\r\n            var encryptedDataStr = TLString.FromBigEndianData(encryptedData);\r\n            //TLUtils.WriteLine(\"encrypted data serialized\");\r\n            //TLUtils.WriteLine(BitConverter.ToString(encryptedDataStr.ToBytes(340)));\r\n\r\n            return set_client_DH_params\r\n                .Concat(nonce)\r\n                .Concat(serverNonce)\r\n                .Concat(encryptedDataStr.ToBytes()) // 340\r\n                .ToArray();\r\n        }\r\n\r\n        public static byte[] ComposeClientDHInnerData(byte[] g_bBigEndianBytes, AuthResponse response)\r\n        {\r\n            //TLUtils.WriteLine(\"----Compose ClientDHInnerData-------------\");\r\n            var client_DH_inner_data = new byte[] { 0x54, 0xb6, 0x43, 0x66 };\r\n            //TLUtils.WriteLine(\"client_DH_inner_data \" + BitConverter.ToString(client_DH_inner_data));\r\n\r\n            var nonce = response.Nonce;\r\n            //TLUtils.WriteLine(\"Nonce \" + BitConverter.ToString(nonce));\r\n\r\n            var serverNonce = response.ServerNonce;\r\n            //TLUtils.WriteLine(\"Server nonce \" + BitConverter.ToString(serverNonce));\r\n\r\n            Int64 retryId = 0;\r\n            var retryIdBytes = BitConverter.GetBytes(retryId);\r\n            //TLUtils.WriteLine(\"Retry id \" + BitConverter.ToString(retryIdBytes));\r\n\r\n            var strG_b = TLString.FromBigEndianData(g_bBigEndianBytes);\r\n            //TLUtils.WriteLine(\"g_b serialized\");\r\n            //TLUtils.WriteLine(BitConverter.ToString(strG_b.ToBytes(260)));\r\n\r\n            return client_DH_inner_data\r\n                .Concat(nonce)\r\n                .Concat(serverNonce)\r\n                .Concat(retryIdBytes)\r\n                .Concat(strG_b.ToBytes()).ToArray(); // 260\r\n\r\n        }\r\n\r\n        private static byte[] GetRSABytes(byte[] bytes)\r\n        {\r\n            // big-endian exponent and modulus\r\n            const string exponentString = \"010001\";\r\n            const string modulusString = \"C150023E2F70DB7985DED064759CFECF\" +\r\n                                     \"0AF328E69A41DAF4D6F01B538135A6F91F8F8B2A0EC9BA9720CE352EFCF6C5680FFC424BD6348649\" +\r\n                                     \"02DE0B4BD6D49F4E580230E3AE97D95C8B19442B3C0A10D8F5633FECEDD6926A7F6DAB0DDB7D457F\" +\r\n                                     \"9EA81B8465FCD6FFFEED114011DF91C059CAEDAF97625F6C96ECC74725556934EF781D866B34F011\" +\r\n                                     \"FCE4D835A090196E9A5F0E4449AF7EB697DDB9076494CA5F81104A305B6DD27665722C46B60E5DF6\" +\r\n                                     \"80FB16B210607EF217652E60236C255F6A28315F4083A96791D7214BF64C1DF4FD0DB1944FB26A2A\" +\r\n                                     \"57031B32EEE64AD15A8BA68885CDE74A5BFC920F6ABF59BA5C75506373E7130F9042DA922179251F\";\r\n            var modulusBytes = Utils.StringToByteArray(modulusString);\r\n            var exponentBytes = Utils.StringToByteArray(exponentString);\r\n            var modulus = new BigInteger(modulusBytes.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n            var exponent = new BigInteger(exponentBytes.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n            var num = new BigInteger(bytes.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n\r\n            var rsa = BigInteger.ModPow(num, exponent, modulus).ToByteArray().Reverse().ToArray();\r\n            if (rsa.Length == 257)\r\n            {\r\n                if (rsa[0] != 0x00) throw new Exception(\"rsa last byte is \" + rsa[0]);\r\n\r\n                TLUtils.WriteLine(\"First RSA byte removes: byte value is \" + rsa[0]);\r\n                rsa = rsa.SubArray(1, 256);\r\n            }\r\n            return rsa;\r\n        }\r\n\r\n        public static byte[] ComposeData(AuthResponse response, UInt64 p, UInt64 q, byte[] newNonce)\r\n        {\r\n            var pqInnerData = new byte[] { 0x83, 0xc9, 0x5a, 0xec };\r\n\r\n            var pq = response.pqString.ToBytes(); //12\r\n            var pBytes = TLString.FromUInt64(p).ToBytes(); //8\r\n            var qBytes = TLString.FromUInt64(q).ToBytes(); //8\r\n\r\n            var nonce = response.Nonce;\r\n            var serverNonce = response.ServerNonce;\r\n\r\n            return pqInnerData.Reverse().ToArray()\r\n                .Concat(pq).ToArray()\r\n                .Concat(pBytes).ToArray()\r\n                .Concat(qBytes).ToArray()\r\n                .Concat(nonce).ToArray()\r\n                .Concat(serverNonce).ToArray()\r\n                .Concat(newNonce).ToArray();\r\n        }\r\n    }\r\n\r\n\r\n\r\n    public class AuthResponse\r\n    {\r\n        public byte[] AuthKeyId { get; set; }\r\n\r\n        public byte[] MessageId { get; set; }\r\n\r\n        public Int32 MessageLength { get; set; }\r\n\r\n        public byte[] Nonce { get; set; }\r\n\r\n        public byte[] ServerNonce { get; set; }\r\n\r\n        public byte[] FingerPrints { get; set; }\r\n\r\n        public UInt64 pq { get; set; }\r\n\r\n        public TLString pqString { get; set; }\r\n\r\n        public static AuthResponse Parse(byte[] bytes)\r\n        {\r\n            var response = new AuthResponse();\r\n            response.AuthKeyId = bytes.SubArray(0, 8);\r\n            //TLUtils.WriteLine(\"AuthKeyId: \" + BitConverter.ToString(response.AuthKeyId));\r\n\r\n            response.MessageId = bytes.SubArray(8, 8);\r\n            var unixTime = BitConverter.ToInt64(response.MessageId, 0) >> 32;\r\n            //var serverDate = Utils.UnixTimestampToDateTime(unixTime);\r\n            //TLUtils.WriteLine(\"Server time: \" + serverDate);\r\n            //TLUtils.WriteLine(\"MessageId: \" + BitConverter.ToString(response.MessageId));\r\n\r\n            response.MessageLength = BitConverter.ToInt32(bytes.SubArray(16, 4), 0);\r\n            //TLUtils.WriteLine(\"MessageLength: \" + response.MessageLength);\r\n\r\n            response.Nonce = bytes.SubArray(24, 16);\r\n            //TLUtils.WriteLine(\"Nonce: \" + BitConverter.ToString(response.Nonce));\r\n\r\n            response.ServerNonce = bytes.SubArray(40, 16);\r\n            //TLUtils.WriteLine(\"ServerNonce: \" + BitConverter.ToString(response.ServerNonce));\r\n\r\n            var pqBytes = //new byte[] { 0x08, 0x17, 0xED, 0x48, 0x94, 0x1A, 0x08, 0xF9, 0x81, 0x00, 0x00, 0x00 }; \r\n            bytes.SubArray(56, 12);\r\n            //TLUtils.WriteLine(\"pq bytes: \" + BitConverter.ToString(pqBytes));\r\n            int position = 0;\r\n            response.pqString = TLObject.GetObject<TLString>(pqBytes, ref position);\r\n            response.pq = BitConverter.ToUInt64(response.pqString.Data, 0);\r\n            //TLUtils.WriteLine(\"pq: \" + response.pq);\r\n\r\n            response.FingerPrints = bytes.SubArray(76, 8);\r\n            //TLUtils.WriteLine(\"FingerPrints: \" + BitConverter.ToString(response.FingerPrints));\r\n\r\n            return response;\r\n        }\r\n    }\r\n\r\n    internal class EndAuthResponse\r\n    {\r\n        public byte[] AuthKeyId { get; set; }\r\n\r\n        public byte[] MessageId { get; set; }\r\n\r\n        public Int32 MessageLength { get; set; }\r\n\r\n        public byte[] Status { get; set; }\r\n\r\n        public byte[] Nonce { get; set; }\r\n\r\n        public byte[] ServerNonce { get; set; }\r\n\r\n        public byte[] NewNonceSHA1 { get; set; }\r\n\r\n        public static EndAuthResponse Parse(byte[] bytes)\r\n        {\r\n            TLUtils.WriteLine(\"----------------------------\");\r\n            TLUtils.WriteLine(\"--Parse end auth response---\");\r\n            TLUtils.WriteLine(\"----------------------------\");\r\n\r\n            var response = new EndAuthResponse();\r\n\r\n\r\n            response.AuthKeyId = bytes.SubArray(0, 8);\r\n            TLUtils.WriteLine(\"AuthKeyId: \" + BitConverter.ToString(response.AuthKeyId));\r\n\r\n            response.MessageId = bytes.SubArray(8, 8);\r\n            var unixTime = BitConverter.ToInt64(response.MessageId, 0) >> 32;\r\n            var serverDate = Utils.UnixTimestampToDateTime(unixTime);\r\n            TLUtils.WriteLine(\"Server time: \" + serverDate);\r\n            TLUtils.WriteLine(\"  MESSAGEID: \" + BitConverter.ToString(response.MessageId));\r\n\r\n            response.MessageLength = BitConverter.ToInt32(bytes.SubArray(16, 4), 0);\r\n            TLUtils.WriteLine(\"MessageLength: \" + response.MessageLength);\r\n\r\n            response.Status = bytes.SubArray(20, 4);\r\n            TLUtils.WriteLine(\"Status \" + BitConverter.ToString(response.Status));\r\n            TLUtils.WriteLine(string.Equals(BitConverter.ToString(response.Status), \"34-f7-cb-3b\",\r\n                                            StringComparison.OrdinalIgnoreCase)\r\n                                  ? \"Auth OK\"\r\n                                  : \"Auth Fail\");\r\n\r\n            response.Nonce = bytes.SubArray(24, 16);\r\n            TLUtils.WriteLine(\"Nonce: \" + BitConverter.ToString(response.Nonce));\r\n\r\n            response.ServerNonce = bytes.SubArray(40, 16);\r\n            TLUtils.WriteLine(\"ServerNonce: \" + BitConverter.ToString(response.ServerNonce));\r\n\r\n            response.NewNonceSHA1 = bytes.SubArray(56, 16);\r\n            TLUtils.WriteLine(\"NewNonceSHA1: \" + BitConverter.ToString(response.NewNonceSHA1));\r\n\r\n            return response;\r\n        }\r\n    }\r\n\r\n    internal class Answer\r\n    {\r\n\r\n        public byte[] Status { get; set; }\r\n\r\n        public byte[] Nonce { get; set; }\r\n\r\n        public byte[] ServerNonce { get; set; }\r\n\r\n        public byte[] G { get; set; }\r\n\r\n        public byte[] DHPrime { get; set; }\r\n\r\n        public byte[] G_A { get; set; }\r\n\r\n        public byte[] ServerTime { get; set; }\r\n\r\n        public static Answer Parse(byte[] bytes)\r\n        {\r\n            //TLUtils.WriteLine(\"----------------------------\");\r\n            //TLUtils.WriteLine(\"--Server_DH_inner_dat-------\");\r\n            //TLUtils.WriteLine(\"----------------------------\");\r\n\r\n            var answer = new Answer();\r\n\r\n            answer.Status = bytes.SubArray(0, 4);\r\n            //TLUtils.WriteLine(string.Equals(BitConverter.ToString(answer.Status), \"BA-0D-89-B5\",\r\n            //                                StringComparison.OrdinalIgnoreCase)\r\n            //                      ? \"Server_DH_inner_dat OK\"\r\n            //                      : \"Server_DH_inner_dat Fail\");\r\n\r\n            answer.Nonce = bytes.SubArray(4, 16);\r\n            TLUtils.WriteLine(\"Nonce: \" + BitConverter.ToString(answer.Nonce));\r\n\r\n            answer.ServerNonce = bytes.SubArray(20, 16);\r\n            TLUtils.WriteLine(\"ServerNonce: \" + BitConverter.ToString(answer.ServerNonce));\r\n\r\n            answer.G = bytes.SubArray(36, 4);\r\n            //TLUtils.WriteLine(\"G: \" + BitConverter.ToString(answer.G));\r\n\r\n            answer.DHPrime = bytes.SubArray(40, 260);\r\n            //TLUtils.WriteLine(\"DHPrime: \" + BitConverter.ToString(answer.DHPrime));\r\n            //TLUtils.WriteLine();\r\n            answer.G_A = bytes.SubArray(300, 260);\r\n            //TLUtils.WriteLine(\"G_A: \" + BitConverter.ToString(answer.DHPrime));\r\n\r\n            answer.ServerTime = bytes.SubArray(560, 4);\r\n            var unixTime = BitConverter.ToInt32(answer.ServerTime, 0);\r\n            var serverDate = Utils.UnixTimestampToDateTime(unixTime);\r\n            //TLUtils.WriteLine(\"Server time: \" + serverDate);\r\n\r\n\r\n            return answer;\r\n        }\r\n    }\r\n\r\n\r\n    internal class BeginDHResponse\r\n    {\r\n        public byte[] AuthKeyId { get; set; }\r\n\r\n        public byte[] MessageId { get; set; }\r\n\r\n        public Int32 MessageLength { get; set; }\r\n\r\n        public byte[] Status { get; set; }\r\n\r\n        public byte[] Nonce { get; set; }\r\n\r\n        public byte[] ServerNonce { get; set; }\r\n\r\n        public byte[] EncryptedAnswer { get; set; }\r\n\r\n        public static BeginDHResponse Parse(byte[] bytes)\r\n        {\r\n            //TLUtils.WriteLine(\"----------------------------\");\r\n            //TLUtils.WriteLine(\"--server_DH_params----------\");\r\n            //TLUtils.WriteLine(\"----------------------------\");\r\n\r\n            var response = new BeginDHResponse();\r\n            response.AuthKeyId = bytes.SubArray(0, 8);\r\n            //TLUtils.WriteLine(\"AuthKeyId: \" + BitConverter.ToString(response.AuthKeyId));\r\n\r\n            response.MessageId = bytes.SubArray(8, 8);\r\n            var unixTime = BitConverter.ToInt64(response.MessageId, 0) >> 32;\r\n            var serverDate = Utils.UnixTimestampToDateTime(unixTime);\r\n            //TLUtils.WriteLine(\"Server time: \" + serverDate);\r\n            //TLUtils.WriteLine(\"MessageId: \" + BitConverter.ToString(response.MessageId));\r\n\r\n            response.MessageLength = BitConverter.ToInt32(bytes.SubArray(16, 4), 0);\r\n            //TLUtils.WriteLine(\"MessageLength: \" + response.MessageLength);\r\n\r\n            response.Status = bytes.SubArray(20, 4);\r\n            //TLUtils.WriteLine(string.Equals(BitConverter.ToString(response.Status), \"5c-07-e8-d0\",\r\n            //                                StringComparison.OrdinalIgnoreCase)\r\n            //                      ? \"DH Params OK\"\r\n            //                      : \"DH Params Fail\");\r\n\r\n            response.Nonce = bytes.SubArray(24, 16);\r\n            //TLUtils.WriteLine(\"Nonce: \" + BitConverter.ToString(response.Nonce));\r\n\r\n            response.ServerNonce = bytes.SubArray(40, 16);\r\n            //TLUtils.WriteLine(\"ServerNonce: \" + BitConverter.ToString(response.ServerNonce));\r\n\r\n            response.EncryptedAnswer = bytes.SubArray(60, 592);\r\n            //TLUtils.WriteLine(\"EncryptedAnswer: \");\r\n            //TLUtils.WriteLine(BitConverter.ToString(response.EncryptedAnswer));\r\n\r\n            return response;\r\n        }\r\n    }*/\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Helpers/Execute.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Threading;\r\n#if WIN_RT\r\nusing Windows.UI.Core;\r\nusing Windows.UI.Popups;\r\nusing System.Threading.Tasks;\r\nusing Windows.System.Threading;\r\n#else\r\nusing System.Windows;\r\n#endif\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Helpers\r\n{\r\n    public static class Execute\r\n    {\r\n        public static void BeginOnThreadPool(TimeSpan delay, Action action)\r\n        {\r\n#if WIN_RT\r\n            Task.Run(async () =>\r\n            {\r\n                await Task.Delay(delay);\r\n                try\r\n                {\r\n                    action.SafeInvoke();\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n                }\r\n            });\r\n#else\r\n            ThreadPool.QueueUserWorkItem(state =>\r\n            {\r\n                Thread.Sleep(delay);\r\n                try\r\n                {\r\n                    action.SafeInvoke();\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n                }\r\n            });\r\n#endif\r\n        }\r\n\r\n        public static void BeginOnThreadPool(Action action)\r\n        {\r\n#if WIN_RT\r\n            Task.Run(() =>\r\n            {\r\n                try\r\n                {\r\n                    action.SafeInvoke();\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n                }\r\n            });\r\n#else\r\n            ThreadPool.QueueUserWorkItem(state =>\r\n            {\r\n                try\r\n                {\r\n                    action.SafeInvoke();\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n                }\r\n            });\r\n#endif\r\n        }\r\n\r\n        public static void BeginOnUIThread(Action action)\r\n        {\r\n#if WIN_RT\r\n            var coreWindow = CoreWindow.GetForCurrentThread();\r\n            if (coreWindow == null) return;\r\n\r\n            var dispatcher = coreWindow.Dispatcher;\r\n            if (dispatcher == null) return;\r\n\r\n            dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>\r\n            {\r\n                try\r\n                {\r\n                    action.SafeInvoke();\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n                }\r\n            });\r\n#else\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                try\r\n                {\r\n                    action.SafeInvoke();\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n                }\r\n            });\r\n#endif\r\n        }\r\n\r\n        public static void BeginOnUIThread(TimeSpan delay, Action action)\r\n        {\r\n            BeginOnThreadPool(delay, () =>\r\n            {\r\n                BeginOnUIThread(action);\r\n            });\r\n        }\r\n\r\n        public static bool CheckAccess()\r\n        {\r\n#if WIN_RT\r\n            var coreWindow = CoreWindow.GetForCurrentThread();\r\n            if (coreWindow == null) return true;\r\n\r\n            var dispatcher = coreWindow.Dispatcher;\r\n            if (dispatcher == null) return true;\r\n\r\n            return dispatcher.HasThreadAccess;\r\n#else\r\n            return Deployment.Current.Dispatcher.CheckAccess();\r\n#endif\r\n        }\r\n\r\n        public static void OnUIThread(Action action)\r\n        {\r\n            if (CheckAccess())\r\n            {\r\n                action();\r\n            }\r\n            else\r\n            {\r\n                var waitHandle = new ManualResetEvent(false);\r\n                BeginOnUIThread((() =>\r\n                {\r\n                    action();\r\n                    waitHandle.Set();\r\n                }));\r\n                waitHandle.WaitOne();\r\n            }\r\n        }\r\n\r\n        public static void ShowMessageBox(string message)\r\n        {\r\n#if SILVERLIGHT\r\n            MessageBox.Show(message);\r\n#elif WIN_RT\r\n            new MessageDialog(message).ShowAsync();\r\n#else\r\n            Console.WriteLine(message);\r\n#endif\r\n        }\r\n\r\n        public static bool IsForegroundApp { get; set; }\r\n\r\n        public static void ShowDebugMessage(string message)\r\n        {\r\n#if DEBUG\r\n            if (!IsForegroundApp) return;\r\n\r\n            BeginOnUIThread(() => ShowMessageBox(message));\r\n#endif\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Helpers/FileUtils.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing Windows.Storage;\r\nusing Windows.Storage.Search;\r\nusing Windows.Storage.Streams;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services.FileManager;\r\n#if WIN_RT\r\nusing Windows.Storage.Streams;\r\nusing Windows.Storage;\r\n#else\r\nusing Microsoft.Phone.Shell;\r\nusing System.IO.IsolatedStorage;\r\nusing System.IO;\r\n#endif\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Helpers\r\n{\r\n    public static class FileUtils\r\n    {\r\n        public static async Task MergePartsToFileAsync(Func<DownloadablePart, string> getPartName, IEnumerable<DownloadablePart> parts, string fileName)\r\n        {\r\n            using (var stream = await ApplicationData.Current.LocalFolder.OpenStreamForWriteAsync(fileName, CreationCollisionOption.ReplaceExisting))\r\n            {\r\n                foreach (var part in parts)\r\n                {\r\n                    var partFileName = getPartName(part);\r\n                    var partFile = await ApplicationData.Current.LocalFolder.GetFileAsync(partFileName);\r\n                    using (var partStream = await partFile.OpenStreamForReadAsync())\r\n                    {\r\n                        // append\r\n                        var buffer = new byte[partStream.Length];\r\n                        stream.Seek(0, SeekOrigin.End);\r\n                        await stream.WriteAsync(buffer, 0, buffer.Length);\r\n                    }\r\n                    await partFile.DeleteAsync(StorageDeleteOption.PermanentDelete);\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void MergePartsToFile(Func<DownloadablePart, string> getPartName, IEnumerable<DownloadablePart> parts, string fileName)\r\n        {\r\n#if WINDOWS_PHONE\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(fileName))\r\n                {\r\n                    using (var stream = new IsolatedStorageFileStream(fileName, FileMode.OpenOrCreate, FileAccess.Write, store))\r\n                    {\r\n                        foreach (var part in parts)\r\n                        {\r\n                            var partFileName = getPartName(part);\r\n                            using (var partStream = new IsolatedStorageFileStream(partFileName, FileMode.OpenOrCreate, FileAccess.Read, store))\r\n                            {\r\n                                var bytes = new byte[partStream.Length];\r\n                                partStream.Read(bytes, 0, bytes.Length);\r\n                                stream.Position = stream.Length;\r\n                                stream.Write(bytes, 0, bytes.Length);\r\n                            }\r\n\r\n                            store.DeleteFile(partFileName);\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    foreach (var part in parts)\r\n                    {\r\n                        var partFileName = getPartName(part);\r\n                        if (store.FileExists(partFileName))\r\n                        {\r\n                            store.DeleteFile(partFileName);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n#else\r\n            MergePartsToFileAsync(getPartName, parts, fileName).RunSynchronously();\r\n#endif       \r\n        }\r\n\r\n        public static bool Delete(object syncRoot, string fileName)\r\n        {\r\n            try\r\n            {\r\n                lock (syncRoot)\r\n                {\r\n#if WIN_RT\r\n                    var getFileOperation = ApplicationData.Current.LocalFolder.GetFileAsync(fileName);\r\n\r\n                    getFileOperation.AsTask().Wait();\r\n\r\n                    var file = getFileOperation.GetResults();\r\n\r\n                    Delete(file);\r\n#elif WINDOWS_PHONE\r\n                    var storage = IsolatedStorageFile.GetUserStoreForApplication();\r\n\r\n                    if (storage.FileExists(fileName))\r\n                    {\r\n                        storage.DeleteFile(fileName);\r\n                    }\r\n#endif\r\n                }\r\n\r\n                return true;\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"FILE ERROR: cannot delete \" + fileName, LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public static void Copy(object syncRoot, string fileName, string destinationFileName)\r\n        {\r\n            try\r\n            {\r\n                lock (syncRoot)\r\n                {\r\n#if WIN_RT\r\n                    var getFileOperation = ApplicationData.Current.LocalFolder.GetFileAsync(fileName);\r\n                    getFileOperation.AsTask().Wait();\r\n                    var file = getFileOperation.GetResults();\r\n\r\n                    var copyFileOperation = file.CopyAsync(ApplicationData.Current.LocalFolder, destinationFileName, NameCollisionOption.ReplaceExisting);\r\n                    copyFileOperation.AsTask().Wait();\r\n                    var destinationFile = copyFileOperation.GetResults();\r\n#elif WINDOWS_PHONE\r\n                    var file = IsolatedStorageFile.GetUserStoreForApplication();\r\n\r\n                    file.CopyFile(fileName, destinationFileName, true);\r\n\r\n#endif\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR: cannot copy \" + fileName, LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n        }\r\n\r\n\r\n        public static void NotifyProgress(object itemsSyncRoot, IList<UploadableItem> items, UploadablePart part, ITelegramEventAggregator eventAggregator)\r\n        {\r\n            bool isComplete = false;\r\n            bool isCanceled;\r\n            var progress = 0.0;\r\n            lock (itemsSyncRoot)\r\n            {\r\n                part.Status = PartStatus.Processed;\r\n                isCanceled = part.ParentItem.Canceled;\r\n                if (!isCanceled)\r\n                {\r\n                    isComplete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                    if (!isComplete)\r\n                    {\r\n                        double uploadedCount = part.ParentItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n                        double totalCount = part.ParentItem.Parts.Count;\r\n                        progress = uploadedCount / totalCount;\r\n                    }\r\n                    else\r\n                    {\r\n                        items.Remove(part.ParentItem);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (!isCanceled)\r\n            {\r\n                if (isComplete)\r\n                {\r\n                    SwitchIdleDetectionMode(true);\r\n                    Execute.BeginOnThreadPool(() => eventAggregator.Publish(part.ParentItem));\r\n                }\r\n                else\r\n                {\r\n                    if (part.ParentItem.FileNotFound)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    var args = new UploadProgressChangedEventArgs(part.ParentItem, progress);\r\n                    Execute.BeginOnThreadPool(() => eventAggregator.Publish(args));\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void SwitchIdleDetectionMode(bool enabled)\r\n        {\r\n#if WINDOWS_PHONE\r\n            var mode = enabled ? IdleDetectionMode.Enabled : IdleDetectionMode.Disabled;\r\n            try\r\n            {\r\n                PhoneApplicationService.Current.UserIdleDetectionMode = mode;\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\"UploadVideoFileManager UserIdleDetectionMode=\" + mode + Environment.NewLine + ex);\r\n            }\r\n#endif\r\n        }\r\n\r\n        public static int GetChunkSize(long totalSize)\r\n        {\r\n            int chunkSize = 32 * 1024; // 32Kb\r\n            if (totalSize > 256 * 1024 * Constants.MaximumChunksCount)\r\n            {\r\n                chunkSize = 512 * 1024;\r\n            }\r\n            else if (totalSize > 128 * 1024 * Constants.MaximumChunksCount)\r\n            {\r\n                chunkSize = 256 * 1024;\r\n            }\r\n            else if (totalSize > 64 * 1024 * Constants.MaximumChunksCount)\r\n            {\r\n                chunkSize = 128 * 1024;\r\n            }\r\n            else if (totalSize > 32 * 1024 * Constants.MaximumChunksCount)\r\n            {\r\n                chunkSize = 64 * 1024;\r\n            }\r\n\r\n            return chunkSize;\r\n        }\r\n\r\n        public static int GetPartsCount(long totalSize, int chunkSize)\r\n        {\r\n            return (int)(totalSize / chunkSize + (totalSize % chunkSize > 0 ? 1 : 0));\r\n        }\r\n\r\n        public static int GetLocalFileLength(string fileName)\r\n        {\r\n#if WINDOWS_PHONE\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (store.FileExists(fileName))\r\n                {\r\n                    using (var file = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                    {\r\n                        return (int)file.Length;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return -1;\r\n#else\r\n            var file = GetLocalFile(fileName);\r\n\r\n            if (file != null)\r\n            {\r\n                var getBasicPropertiesOperation = file.GetBasicPropertiesAsync();\r\n                getBasicPropertiesOperation.AsTask().Wait();\r\n\r\n                var basicProperties = getBasicPropertiesOperation.GetResults();\r\n\r\n                return (int)basicProperties.Size;\r\n            }\r\n\r\n            return -1;\r\n#endif\r\n        }\r\n\r\n        public static StorageFile GetLocalFile(string fileName)\r\n        {\r\n            StorageFile file = null;\r\n            try\r\n            {\r\n                var getFileOperation = ApplicationData.Current.LocalFolder.GetFileAsync(fileName);\r\n                getFileOperation.AsTask().Wait();\r\n                file = getFileOperation.GetResults();\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n            return file;\r\n        }\r\n\r\n        private static StorageFile CreateLocalFile(string fileName)\r\n        {\r\n            var createFileOperation = ApplicationData.Current.LocalFolder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting);\r\n            createFileOperation.AsTask().Wait();\r\n            var file = createFileOperation.GetResults();\r\n\r\n            return file;\r\n        }\r\n\r\n        private static void Delete(StorageFile file)\r\n        {\r\n            if (file != null)\r\n            {\r\n                var deleteFileOperation = file.DeleteAsync();\r\n                deleteFileOperation.AsTask().Wait();\r\n                deleteFileOperation.GetResults();\r\n            }\r\n        }\r\n\r\n        public static void CheckMissingPart(object syncRoot, DownloadablePart part, string partName)\r\n        {\r\n#if WINDOWS_PHONE\r\n\r\n            if (part.Offset.Value == 0)\r\n            {\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (store.FileExists(partName))\r\n                    {\r\n                        store.DeleteFile(partName);\r\n                    }\r\n                }\r\n            }\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (store.FileExists(partName))\r\n                {\r\n                    store.DeleteFile(partName);\r\n                }\r\n\r\n                using (var stream = new IsolatedStorageFileStream(partName, FileMode.OpenOrCreate, FileAccess.Write, store))\r\n                {\r\n                    var data = part.File.Bytes.Data;\r\n                    part.File.Bytes = new TLString();\r\n                    stream.Position = stream.Length;\r\n                    stream.Write(data, 0, data.Length);\r\n\r\n                    if (data.Length < part.Limit.Value && (part.Number + 1) != part.ParentItem.Parts.Count)\r\n                    {\r\n                        lock (syncRoot)\r\n                        {\r\n                            var complete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                            if (!complete)\r\n                            {\r\n                                var emptyBufferSize = part.Limit.Value - data.Length;\r\n                                var position = stream.Position;\r\n\r\n                                var missingPart = new DownloadablePart(part.ParentItem, new TLInt((int)position),\r\n                                    new TLInt(emptyBufferSize), -part.Number);\r\n\r\n                                var currentItemIndex = part.ParentItem.Parts.IndexOf(part);\r\n                                part.ParentItem.Parts.Insert(currentItemIndex + 1, missingPart);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n#else\r\n            CheckMissingPartAsync(syncRoot, part, partName).RunSynchronously();\r\n#endif\r\n        }\r\n\r\n        private static async Task CheckMissingPartAsync(object syncRoot, DownloadablePart part, string partName)\r\n        {\r\n            try\r\n            {\r\n                var file = await ApplicationData.Current.LocalFolder.GetFileAsync(partName);\r\n                await file.DeleteAsync(StorageDeleteOption.PermanentDelete);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n            using (var stream = await ApplicationData.Current.LocalFolder.OpenStreamForWriteAsync(partName, CreationCollisionOption.ReplaceExisting))\r\n            {\r\n                var data = part.File.Bytes.Data;\r\n                part.File.Bytes = new TLString();\r\n                stream.Position = stream.Length;\r\n                stream.Write(data, 0, data.Length);\r\n\r\n                if (data.Length < part.Limit.Value && (part.Number + 1) != part.ParentItem.Parts.Count)\r\n                {\r\n                    lock (syncRoot)\r\n                    {\r\n                        var complete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                        if (!complete)\r\n                        {\r\n                            var emptyBufferSize = part.Limit.Value - data.Length;\r\n                            var position = stream.Position;\r\n\r\n                            var missingPart = new DownloadablePart(part.ParentItem, new TLInt((int)position),\r\n                                new TLInt(emptyBufferSize), -part.Number);\r\n\r\n                            var currentItemIndex = part.ParentItem.Parts.IndexOf(part);\r\n                            part.ParentItem.Parts.Insert(currentItemIndex + 1, missingPart);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void WriteBytes(string fileName, byte[] bytes)\r\n        {\r\n#if WINDOWS_PHONE\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var fileStream = store.OpenFile(fileName, FileMode.Create, FileAccess.Write))\r\n                {\r\n                    fileStream.Write(bytes, 0, bytes.Length);\r\n                }\r\n            }\r\n#else\r\n            var file = CreateLocalFile(fileName);\r\n            WriteBytes(file, bytes);\r\n#endif\r\n        }\r\n\r\n#if WIN_RT\r\n        private static void WriteBytes(StorageFile file, byte[] data)\r\n        {\r\n            var writeBytesOperation = FileIO.WriteBytesAsync(file, data);\r\n            writeBytesOperation.AsTask().Wait();\r\n            writeBytesOperation.GetResults();\r\n        }\r\n#endif\r\n\r\n        public static byte[] ReadBytes(string fileName, long position, long length)\r\n        {\r\n#if WINDOWS_PHONE\r\n            byte[] bytes = null;\r\n            using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var stream = storage.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                {\r\n                    stream.Position = position;\r\n                    bytes = new byte[length];\r\n                    stream.Read(bytes, 0, (int)length);\r\n                }\r\n            }\r\n\r\n            return bytes;\r\n#else\r\n            var file = GetLocalFile(fileName);\r\n            return file != null? ReadBytesAsync(file, position, length).Result : null;\r\n#endif\r\n        }\r\n\r\n        private static async Task<byte[]> ReadBytesAsync(StorageFile file, long position, long length)\r\n        {\r\n            using (var fs = await file.OpenAsync(FileAccessMode.Read))\r\n            {\r\n                using (var inStream = fs.GetInputStreamAt((ulong)position))\r\n                {\r\n                    using (var reader = new DataReader(inStream))\r\n                    {\r\n                        await reader.LoadAsync((uint)length);\r\n                        var data = new byte[length];\r\n                        reader.ReadBytes(data);\r\n                        reader.DetachStream();\r\n                        return data;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n#if WP8\r\n        public static async Task<Tuple<bool, byte[]>> FillBuffer(IStorageFile file, UploadablePart part)\r\n        {\r\n            try\r\n            {\r\n                if (part.ParentItem.FileNotFound)\r\n                {\r\n                    return new Tuple<bool, byte[]>(false, null);\r\n                }\r\n\r\n                System.Diagnostics.Debug.WriteLine(\"FillBuffer part=\" + part.FilePart);\r\n                using (var inStream = await file.OpenSequentialReadAsync())\r\n                {\r\n                    using (var stream = inStream.AsStreamForRead())\r\n                    //using (var inStream = stream.GetInputStreamAt((ulong) part.Position))\r\n                    {\r\n                        stream.Seek(part.Position, SeekOrigin.Begin);\r\n                        var bytes = new byte[part.Count];\r\n\r\n                        stream.Read(bytes, 0, bytes.Length);\r\n                        //using (var reader = new DataReader(inStream))\r\n                        //{\r\n                        //    await reader.LoadAsync((uint) bytes.Length);\r\n                        //    reader.ReadBytes(bytes);\r\n                        //}\r\n\r\n                        // encrypting part\r\n                        if (part.ParentItem.Key != null\r\n                            && part.ParentItem.IV != null)\r\n                        {\r\n                            var key = part.ParentItem.Key;\r\n                            var iv = part.FilePart.Value == 0 ? part.ParentItem.IV : part.IV;\r\n\r\n                            if (iv == null)\r\n                            {\r\n                                return new Tuple<bool, byte[]>(true, null);\r\n                            }\r\n\r\n                            byte[] nextIV;\r\n\r\n                            var encryptedBytes = Utils.AesIge(bytes, key.Data, iv.Data, true, out nextIV);\r\n                            bytes = encryptedBytes;\r\n\r\n                            var nextPartId = part.FilePart.Value + 1;\r\n                            if (part.ParentItem.Parts.Count > nextPartId)\r\n                            {\r\n                                part.ParentItem.Parts[nextPartId].IV = TLString.FromBigEndianData(nextIV);\r\n                            }\r\n                        }\r\n\r\n                        return new Tuple<bool, byte[]>(true, bytes);\r\n                    }\r\n                }\r\n            }\r\n            catch (FileNotFoundException ex)\r\n            {\r\n                Logs.Log.Write(string.Format(\"FileUtils.FillBuffer bytes=null position={0} count={1} ex={2}\", part.Position, part.Count, ex));\r\n                Execute.ShowDebugMessage(\"FillBuffer FileNotFoundException\\n\" + ex);\r\n                return new Tuple<bool, byte[]>(false, null);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(\"FillBuffer ex part=\" + part.FilePart);\r\n                Logs.Log.Write(string.Format(\"FileUtils.FillBuffer bytes=null position={0} count={1} ex={2}\", part.Position, part.Count, ex));\r\n                Execute.ShowDebugMessage(\"FillBuffer Exception\\n\" + ex);\r\n                return new Tuple<bool, byte[]>(true, null);\r\n            }\r\n        }\r\n\r\n        public static UploadableItem GetUploadableItem(TLLong fileId, TLObject owner, StorageFile file)\r\n        {\r\n            return GetUploadableItem(fileId, owner, file, null, null);\r\n        }\r\n\r\n        public static UploadableItem GetUploadableItem(TLLong fileId, TLObject owner, StorageFile file, TLString key, TLString iv)\r\n        {\r\n            var item = new UploadableItem(fileId, owner, file, key, iv);\r\n\r\n            var task = file.GetBasicPropertiesAsync().AsTask();\r\n            task.Wait();\r\n            var propertie = task.Result;\r\n            var size = propertie.Size;\r\n            item.Parts = GetItemParts(item, (int)size);\r\n            return item;\r\n        }\r\n\r\n        private static List<UploadablePart> GetItemParts(UploadableItem item, int size)\r\n        {\r\n            var chunkSize = GetChunkSize(size);\r\n            var partsCount = GetPartsCount(size, chunkSize);\r\n            var parts = new List<UploadablePart>(partsCount);\r\n\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var part = new UploadablePart(item, new TLInt(i), i * chunkSize, Math.Min(chunkSize, (long)size - i * chunkSize));\r\n                parts.Add(part);\r\n            }\r\n\r\n            item.IsSmallFile = size < Constants.SmallFileMaxSize; // size < chunkSize;\r\n\r\n            return parts;\r\n        }\r\n#endif\r\n\r\n        public static void Write(object syncRoot, string directoryName, string fileName, string str)\r\n        {\r\n#if WINDOWS_PHONE\r\n            lock (syncRoot)\r\n            {\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (!store.DirectoryExists(directoryName))\r\n                    {\r\n                        store.CreateDirectory(directoryName);\r\n                    }\r\n\r\n                    using (var file = store.OpenFile(Path.Combine(directoryName, fileName), FileMode.Append))\r\n                    {\r\n                        var bytes = Encoding.UTF8.GetBytes(str);\r\n                        file.Write(bytes, 0, bytes.Length);\r\n                    }\r\n                }\r\n            }\r\n#else\r\n            lock (syncRoot)\r\n            {\r\n                var task = Task.Run(async () => await WriteAsync(directoryName, fileName, str));\r\n                task.Wait();\r\n            }\r\n#endif\r\n        }\r\n\r\n        private static async Task WriteAsync(string directoryName, string fileName, string str)\r\n        {\r\n            var logFolder = await ApplicationData.Current.LocalFolder.CreateFolderAsync(directoryName, CreationCollisionOption.OpenIfExists);\r\n\r\n            var logFile = await logFolder.CreateFileAsync(fileName, CreationCollisionOption.OpenIfExists);\r\n            using (var stream = await logFile.OpenStreamForWriteAsync())\r\n            {\r\n                // append\r\n                var buffer = Encoding.UTF8.GetBytes(str);\r\n                stream.Seek(0, SeekOrigin.End);\r\n                await stream.WriteAsync(buffer, 0, buffer.Length);\r\n            }\r\n        }\r\n\r\n        public static void Clear(object syncRoot, string directoryName)\r\n        {\r\n#if WINDOWS_PHONE\r\n                lock (syncRoot)\r\n                {\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        var fileNames = store.GetFileNames(Path.Combine(directoryName, \"*.txt\"));\r\n                        foreach (var fileName in fileNames)\r\n                        {\r\n                            try\r\n                            {\r\n                                store.DeleteFile(Path.Combine(directoryName, fileName));\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                TLUtils.WriteException(ex);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n#else\r\n            lock (syncRoot)\r\n            {\r\n                ClearAsync(directoryName).RunSynchronously();\r\n            }\r\n#endif\r\n        }\r\n\r\n        private static async Task ClearAsync(string directoryName)\r\n        {\r\n            var folder = await ApplicationData.Current.LocalFolder.CreateFolderAsync(directoryName, CreationCollisionOption.OpenIfExists);\r\n\r\n            var files = await folder.GetFilesAsync();\r\n            foreach (var file in files)\r\n            {\r\n                try\r\n                {\r\n                    await file.DeleteAsync(StorageDeleteOption.PermanentDelete);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void CopyLog(object syncRoot, string fromDirectoryName, string fromFileName, string toFileName, bool isEnabled)\r\n        {\r\n#if WINDOWS_PHONE\r\n                lock (syncRoot)\r\n                {\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (store.FileExists(Path.Combine(fromDirectoryName, fromFileName)))\r\n                        {\r\n                            store.CopyFile(Path.Combine(fromDirectoryName, fromFileName), toFileName);\r\n                        }\r\n                        else\r\n                        {\r\n                            using (var file = store.OpenFile(toFileName, FileMode.Append))\r\n                            {\r\n                                var timestamp = DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture);\r\n                                var bytes = Encoding.UTF8.GetBytes(string.Format(\"{0} {1}{2}\", timestamp, \"Log.IsEnabled=\" + isEnabled, Environment.NewLine));\r\n                                file.Write(bytes, 0, bytes.Length);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n#else\r\n            lock (syncRoot)\r\n            {\r\n                CopyLogAsync(syncRoot, fromDirectoryName, fromFileName, toFileName, isEnabled).RunSynchronously();\r\n            }\r\n#endif\r\n        }\r\n\r\n        private static async Task CopyLogAsync(object syncRoot, string fromDirectoryName, string fromFileName, string toFileName, bool isEnabled)\r\n        {\r\n            var folder = await ApplicationData.Current.LocalFolder.CreateFolderAsync(fromDirectoryName, CreationCollisionOption.OpenIfExists);\r\n            StorageFile logFile = null;\r\n            try\r\n            {\r\n                logFile = await folder.GetFileAsync(fromFileName);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                \r\n            }\r\n\r\n            if (logFile != null)\r\n            {\r\n                await logFile.CopyAsync(ApplicationData.Current.LocalFolder, toFileName);\r\n            }\r\n            else\r\n            {\r\n                var logFolder = ApplicationData.Current.LocalFolder;\r\n\r\n                logFile = await logFolder.CreateFileAsync(toFileName);\r\n                using (var stream = await logFile.OpenStreamForReadAsync())\r\n                {\r\n                    // append\r\n                    var timestamp = DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture);\r\n                    var buffer = Encoding.UTF8.GetBytes(string.Format(\"{0} {1}{2}\", timestamp, \"Log.IsEnabled=\" + isEnabled, Environment.NewLine));\r\n                    stream.Seek(0, SeekOrigin.End);\r\n                    await stream.WriteAsync(buffer, 0, buffer.Length);\r\n                }\r\n            }\r\n        }\r\n\r\n        public static Stream GetLocalFileStreamForRead(string fileName)\r\n        {\r\n#if WINDOWS_PHONE\r\n            var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n\r\n            return new IsolatedStorageFileStream(fileName, FileMode.OpenOrCreate, store);\r\n#else\r\n            var openFileOperation = ApplicationData.Current.LocalFolder.CreateFileAsync(fileName, CreationCollisionOption.OpenIfExists);\r\n            openFileOperation.AsTask().Wait();\r\n            var file = openFileOperation.GetResults();\r\n\r\n            return file.OpenStreamForReadAsync().Result;\r\n#endif\r\n        }\r\n\r\n        public static Stream GetLocalFileStreamForWrite(string fileName)\r\n        {\r\n#if WINDOWS_PHONE\r\n            var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n\r\n            return new IsolatedStorageFileStream(fileName, FileMode.Create, store);\r\n#else\r\n            var openFileOperation = ApplicationData.Current.LocalFolder.CreateFileAsync(fileName, CreationCollisionOption.OpenIfExists);\r\n            openFileOperation.AsTask().Wait();\r\n            var file = openFileOperation.GetResults();\r\n\r\n            return file.OpenStreamForWriteAsync().Result;\r\n#endif\r\n        }\r\n\r\n        public static void SaveWithTempFile<T>(string fileName, T data) where T : TLObject\r\n        {\r\n#if WINDOWS_PHONE\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                var tempFileName = fileName + \".temp\";\r\n                using (var fileStream = new IsolatedStorageFileStream(tempFileName, FileMode.Create, store))\r\n                {\r\n                    data.ToStream(fileStream);\r\n                }\r\n                //var stopwatch = Stopwatch.StartNew();\r\n                store.CopyFile(tempFileName, fileName, true);\r\n                //store.DeleteFile(fileName);\r\n                //store.MoveFile(tempFileName, fileName);\r\n                //store.DeleteFile(tempFileName);\r\n                //WritePerformance(\"MoveFile time: \" + stopwatch.Elapsed);\r\n            }\r\n#else\r\n\r\n\r\n            var tempFileName = fileName + \".temp\";\r\n            var openFileOperation = ApplicationData.Current.LocalFolder.CreateFileAsync(tempFileName, CreationCollisionOption.OpenIfExists);\r\n            openFileOperation.AsTask().Wait();\r\n            var tempFile = openFileOperation.GetResults();\r\n\r\n            using (var fileStream = tempFile.OpenStreamForWriteAsync().Result)\r\n            {\r\n                data.ToStream(fileStream);\r\n            }\r\n\r\n            var copyOperation = tempFile.CopyAsync(ApplicationData.Current.LocalFolder, fileName, NameCollisionOption.ReplaceExisting);\r\n            copyOperation.AsTask().Wait();\r\n            copyOperation.GetResults();\r\n#endif\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Helpers/IAuthorizationHelper.cs",
    "content": "﻿using System;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Helpers\r\n{\r\n    //public interface IAuthorizationHelper\r\n    //{\r\n    //    /// <summary>\r\n    //    /// Initializes and return authKey, salt and sessionId\r\n    //    /// </summary>\r\n    //    /// <returns></returns>\r\n    //    Tuple<byte[], byte[], byte[]> Init();\r\n\r\n    //    void InitAsync(Action<Tuple<byte[], byte[], byte[]>> callback, Action<TLRPCError> faultCallback = null);\r\n    //}\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Helpers/Notifications.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Helpers\r\n{\r\n    public static class Notifications\r\n    {\r\n        private static readonly object _notificatonsSyncRoot = new object();\r\n\r\n        public static bool IsDisabled\r\n        {\r\n            get\r\n            {\r\n                var result = TLUtils.OpenObjectFromMTProtoFile<TLBool>(_notificatonsSyncRoot, Constants.DisableNotificationsFileName);\r\n\r\n                return result != null;\r\n            }\r\n        }\r\n\r\n        public static void Disable()\r\n        {\r\n            TLUtils.SaveObjectToMTProtoFile(_notificatonsSyncRoot, Constants.DisableNotificationsFileName, TLBool.True);\r\n        }\r\n\r\n        public static void Enable()\r\n        {\r\n            FileUtils.Delete(_notificatonsSyncRoot, Constants.DisableNotificationsFileName);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Helpers/PhoneHelper.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Xml;\r\n#if WINDOWS_PHONE\r\nusing Microsoft.Phone.Info;\r\n#endif\r\n\r\nnamespace Telegram.Api.Helpers\r\n{\r\n    public class PhoneHelper\r\n    {\r\n        const string AppManifestName = \"WMAppManifest.xml\";\r\n        const string AppNodeName = \"App\";\r\n        public const string AppVersion = \"Version\";\r\n\r\n        public static bool IsLowMemoryDevice()\r\n        {\r\n#if WINDOWS_PHONE\r\n            try\r\n            {\r\n                var result = (long)DeviceExtendedProperties.GetValue(\"ApplicationWorkingSetLimit\");\r\n\r\n                if (result < 94371840L)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n\r\n            catch (ArgumentOutOfRangeException)\r\n            {\r\n                // The device does not support querying for this value. This occurs\r\n                // on Windows Phone OS 7.1 and older phones without OS updates.\r\n\r\n                return true;\r\n            }\r\n#else\r\n            return false;\r\n#endif\r\n        }\r\n\r\n        public static string GetOSVersion()\r\n        {\r\n#if WINDOWS_PHONE\r\n\r\n            return Environment.OSVersion.Version.ToString();\r\n#else\r\n            return \"TestWinRT\";\r\n#endif\r\n        }\r\n\r\n        public static string GetAppVersion()\r\n        {\r\n            return GetAppAttribute(AppVersion);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the value from the WMAppManifest in runtime\r\n        /// Example: PhoneHelper.GetAppAttribute(\"Title\");\r\n        /// \r\n        /// http://stackoverflow.com/questions/3411377/get-the-windows-phone-7-application-title-from-code\r\n        /// </summary>\r\n        /// <param name=\"attributeName\"></param>\r\n        /// <returns></returns>\r\n        public static string GetAppAttribute(string attributeName)\r\n        {\r\n#if WINDOWS_PHONE\r\n            try\r\n            {\r\n                var settings = new XmlReaderSettings { XmlResolver = new XmlXapResolver() };\r\n\r\n                using (var rdr = XmlReader.Create(AppManifestName, settings))\r\n                {\r\n                    rdr.ReadToDescendant(AppNodeName);\r\n                    if (!rdr.IsStartElement())\r\n                    {\r\n                        throw new FormatException(AppManifestName + \" is missing \" + AppNodeName);\r\n                    }\r\n\r\n                    return rdr.GetAttribute(attributeName);\r\n                }\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return \"\";\r\n            }\r\n#else\r\n            return \"TestWinRT\";\r\n#endif\r\n        }\r\n\r\n        public static string GetDeviceFullName()\r\n        {\r\n#if WINDOWS_PHONE\r\n            return (string)DeviceExtendedProperties.GetValue(\"DeviceName\");\r\n#else\r\n            return \"TestWinRT\";\r\n#endif\r\n        }\r\n        \r\n        public static bool IsWiFiEnabled()\r\n        {\r\n#if WINDOWS_PHONE\r\n            return Microsoft.Phone.Net.NetworkInformation.DeviceNetworkInformation.IsWiFiEnabled;\r\n#else\r\n            return true;\r\n#endif\r\n        }\r\n\r\n        public static bool IsCellularDataEnabled()\r\n        {\r\n#if WINDOWS_PHONE\r\n            return Microsoft.Phone.Net.NetworkInformation.DeviceNetworkInformation.IsCellularDataEnabled;\r\n#else\r\n            return true;\r\n#endif\r\n        }\r\n\r\n        public static string GetShortPhoneModel(string phoneCode)\r\n        {\r\n            var cleanCode = phoneCode.Replace(\"-\", string.Empty).ToLowerInvariant();\r\n\r\n            foreach (var model in _models)\r\n            {\r\n                if (cleanCode.StartsWith(model.Key))\r\n                {\r\n                    return model.Value;\r\n                }\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n       \r\n        private static Dictionary<string, string> _models = new Dictionary<string, string>\r\n        {\r\n            {\"rm923\", \"Lumia505\"},\r\n            {\"rm898\", \"Lumia510\"},\r\n            {\"rm889\", \"Lumia510\"},\r\n            {\"rm915\", \"Lumia520\"},\r\n            {\"rm917\", \"Lumia521\"},\r\n            {\"rm998\", \"Lumia525\"},\r\n            {\"rm997\", \"Lumia526\"},\r\n            {\"rm1017\", \"Lumia530\"},\r\n            {\"rm1018\", \"Lumia530\"},\r\n            {\"rm1019\", \"Lumia530\"},\r\n            {\"rm1020\", \"Lumia530\"},\r\n            {\"rm1090\", \"Lumia535\"},\r\n            {\"rm836\", \"Lumia610\"},\r\n            {\"rm849\", \"Lumia610\"},\r\n            {\"rm846\", \"Lumia620\"},\r\n            {\"rm941\", \"Lumia625\"},\r\n            {\"rm942\", \"Lumia625\"},\r\n            {\"rm943\", \"Lumia625\"},\r\n            {\"rm974\", \"Lumia630\"},\r\n            {\"rm976\", \"Lumia630\"},\r\n            {\"rm977\", \"Lumia630\"},\r\n            {\"rm978\", \"Lumia630\"},\r\n            {\"rm975\", \"Lumia635\"},\r\n            {\"rm803\", \"Lumia710\"},\r\n            {\"rm809\", \"Lumia710\"},\r\n            {\"rm885\", \"Lumia720\"},\r\n            {\"rm887\", \"Lumia720\"},\r\n            {\"rm1038\", \"Lumia730\"},\r\n            {\"rm801\", \"Lumia800\"},\r\n            {\"rm802\", \"Lumia800\"},\r\n            {\"rm819\", \"Lumia800\"},\r\n            {\"rm878\", \"Lumia810\"},\r\n            {\"rm824\", \"Lumia820\"},\r\n            {\"rm825\", \"Lumia820\"},\r\n            {\"rm826\", \"Lumia820\"},\r\n            {\"rm845\", \"Lumia822\"},\r\n            {\"rm983\", \"Lumia830\"},\r\n            {\"rm984\", \"Lumia830\"},\r\n            {\"rm985\", \"Lumia830\"},\r\n            {\"rm808\", \"Lumia900\"},\r\n            {\"rm823\", \"Lumia900\"},\r\n            {\"rm820\", \"Lumia920\"},\r\n            {\"rm821\", \"Lumia920\"},\r\n            {\"rm822\", \"Lumia920\"},\r\n            {\"rm867\", \"Lumia920\"},\r\n            {\"rm892\", \"Lumia925\"},\r\n            {\"rm893\", \"Lumia925\"},\r\n            {\"rm910\", \"Lumia925\"},\r\n            {\"rm955\", \"Lumia925\"},\r\n            {\"rm860\", \"Lumia928\"},\r\n            {\"rm1045\", \"Lumia930\"},\r\n            {\"rm875\", \"Lumia1020\"},\r\n            {\"rm876\", \"Lumia1020\"},\r\n            {\"rm877\", \"Lumia1020\"},\r\n            {\"rm994\", \"Lumia1320\"},\r\n            {\"rm995\", \"Lumia1320\"},\r\n            {\"rm996\", \"Lumia1320\"},\r\n            {\"rm937\", \"Lumia1520\"},\r\n            {\"rm938\", \"Lumia1520\"},\r\n            {\"rm939\", \"Lumia1520\"},\r\n            {\"rm940\", \"Lumia1520\"},\r\n            {\"rm927\", \"LumiaIcon\"},\r\n\r\n        };\r\n        \r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Helpers/RequestHelper.cs",
    "content": "﻿using System;\r\nusing System.Linq;\r\nusing System.Security.Cryptography;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace Telegram.Api.Helpers\r\n{\r\n    class RequestHelper\r\n    {\r\n        private readonly ITransport _transport;\r\n\r\n        public RequestHelper(ITransport transport)\r\n        {\r\n            _transport = transport;\r\n        }\r\n\r\n        public TLResponse Send(string caption, int seqNo, Func<byte[]> getData)\r\n        {\r\n            var authKey = MTProtoService.AuthKey;\r\n            var salt = MTProtoService.Salt;\r\n            var sessionId = MTProtoService.SessionId;\r\n\r\n            TLUtils.WriteLine();\r\n            TLUtils.WriteLine(\"------------------------\");\r\n            TLUtils.WriteLine(String.Format(\"--{0}--\", caption));\r\n            TLUtils.WriteLine(\"------------------------\");\r\n\r\n            SHA1 sha = new SHA1Managed();\r\n            var random = new Random();\r\n            var request = getData();\r\n\r\n            TLUtils.WriteLine(\"Salt: \" + salt);\r\n            TLUtils.WriteLine(\"SessionId: \" + sessionId);\r\n            var messageId = TLUtils.GenerateMessageId();\r\n            TLUtils.WriteLine(\"->MESSAGEID: \" + TLUtils.MessageIdString(messageId));\r\n            TLUtils.WriteLine(\"  SEQUENCENUMBER: \" + seqNo);\r\n            //var seqNo = BitConverter.GetBytes(3);\r\n            var data = salt.ToBytes()\r\n                .Concat(sessionId.ToBytes())\r\n                .Concat(messageId.ToBytes())\r\n                .Concat(BitConverter.GetBytes(seqNo))\r\n                .Concat(BitConverter.GetBytes(request.Length))\r\n                .Concat(request)\r\n                .ToArray();\r\n\r\n            var length = data.Length;\r\n            var padding = 16 - (length % 16);\r\n            byte[] paddingBytes = null;\r\n            if (padding > 0 && padding < 16)\r\n            {\r\n                paddingBytes = new byte[padding];\r\n                random.NextBytes(paddingBytes);\r\n            }\r\n\r\n            byte[] dataWithPadding = data;\r\n            if (paddingBytes != null)\r\n            {\r\n                dataWithPadding = data.Concat(paddingBytes).ToArray();\r\n            }\r\n\r\n\r\n            var msgKey = TLUtils.GetMsgKey(data);\r\n            var keyIV = Utils.GetEncryptKeyIV(authKey, msgKey);\r\n            var encryptedData = Utils.AesIge(dataWithPadding, keyIV.Item1, keyIV.Item2, true);\r\n\r\n            //TLUtils.WriteLine(\"--Compute auth key sha1--\");\r\n            var authKeyHash = sha.ComputeHash(authKey);\r\n            var authKeyId = authKeyHash.SubArray(12, 8);\r\n            //TLUtils.WriteLine(\"Auth key sha1:           \" + BitConverter.ToString(authKeyHash));\r\n            //TLUtils.WriteLine(\"Auth key little 8 bytes: \" + BitConverter.ToString(authKeyId));\r\n\r\n            //TLUtils.WriteLine(\"--Check phone request--\");\r\n            var reqBytes = authKeyId.Concat(msgKey).Concat(encryptedData).ToArray();\r\n\r\n            return null;\r\n           // var buffer = _transport.SendBytes(reqBytes);\r\n\r\n            //TLUtils.WriteLine(\"Buffer:\");\r\n            //TLUtils.WriteLine(BitConverter.ToString(buffer));\r\n\r\n            //Console.ReadKey();\r\n            //return TLResponse.Parse(buffer, authKey);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Helpers/SettingsHelper.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Runtime.Serialization;\r\nusing System.Xml;\r\nusing Telegram.Api;\r\nusing Telegram.Api.TL;\r\n#if WINDOWS_PHONE\r\nusing System.Windows;\r\nusing System.IO.IsolatedStorage;\r\n#else\r\nusing System.Threading.Tasks;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing Windows.UI.Xaml;\r\nusing Windows.Storage;\r\n#endif\r\n\r\nnamespace Telegram.Api.Helpers\r\n{\r\n#if WINDOWS_PHONE\r\n    public static class SettingsHelper\r\n    {\r\n        private static readonly object SyncLock = new object();\r\n\r\n        public static void CrossThreadAccess(Action<IsolatedStorageSettings> action)\r\n        {\r\n            lock (SyncLock)\r\n            {\r\n                try\r\n                {\r\n                    action(IsolatedStorageSettings.ApplicationSettings);\r\n                }\r\n                catch (Exception e)\r\n                {\r\n                    Execute.ShowDebugMessage(\"SettingsHelper.CrossThreadAccess\" + e);\r\n                }\r\n            }\r\n        }\r\n\r\n        public static T GetValue<T>(string key)\r\n        {\r\n            T result;\r\n            lock (SyncLock) // critical for wp7 devices\r\n            {\r\n                try\r\n                {\r\n                    if (IsolatedStorageSettings.ApplicationSettings.TryGetValue(key, out result))\r\n                    {\r\n                        return result;\r\n                    }\r\n\r\n                    result = default(T);\r\n                }\r\n                catch (Exception e)\r\n                {\r\n                    Logs.Log.Write(\"SettingsHelper.GetValue \" + e);\r\n                    result = default(T);\r\n                }\r\n            }\r\n            return result;\r\n        }\r\n\r\n        public static object GetValue(string key)\r\n        {\r\n            object result;\r\n            lock (SyncLock) //critical for wp7 devices\r\n            {\r\n                try\r\n                {\r\n                    if (IsolatedStorageSettings.ApplicationSettings.TryGetValue(key, out result))\r\n                    {\r\n                        return result;\r\n                    }\r\n\r\n                    result = null;\r\n                }\r\n                catch (Exception e)\r\n                {\r\n                    Logs.Log.Write(\"SettingsHelper.GetValue \" + e);\r\n                    result = null;\r\n                }\r\n\r\n            }\r\n            return result;\r\n        }\r\n\r\n        private static readonly object _backgroundTaskSettingsSyncRoot = new object();\r\n\r\n        public static void SetValue(string key, object value)\r\n        {\r\n            lock (SyncLock)\r\n            {\r\n                IsolatedStorageSettings.ApplicationSettings[key] = value;\r\n                IsolatedStorageSettings.ApplicationSettings.Save();\r\n\r\n                //var backgroundSettings = new Dictionary<string, object>();\r\n                //foreach (var settings in IsolatedStorageSettings.ApplicationSettings)\r\n                //{\r\n                //    if (settings.Value.GetType().Assembly.GetName().Name != \"Telegram.Api\")\r\n                //    {\r\n                //        continue;\r\n                //    }\r\n\r\n                //    backgroundSettings[settings.Key] = settings.Value;\r\n                //}\r\n                //SaveBackgroundSettingsAsync(_backgroundTaskSettingsSyncRoot, Constants.BackgroundTaskSettingsFileName, backgroundSettings);\r\n            }\r\n        }\r\n\r\n        private static void SaveBackgroundSettingsAsync(object syncRoot, string fileName, Dictionary<string, object> settings)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                TLUtils.SaveObjectToFile(syncRoot, fileName, settings);\r\n            });\r\n        }\r\n\r\n        public static void RemoveValue(string key)\r\n        {\r\n            lock (SyncLock)\r\n            {\r\n                IsolatedStorageSettings.ApplicationSettings.Remove(key);\r\n            }\r\n        }\r\n    }\r\n#elif WIN_RT\r\n    public static class SettingsHelper\r\n    {\r\n        private static readonly object SyncLock = new object();\r\n\r\n        public static void CrossThreadAccess(Action<Dictionary<string, object>> action)\r\n        {\r\n            lock (SyncLock)\r\n            {\r\n                try\r\n                {\r\n                    action(LocalSettings);\r\n                }\r\n                catch (Exception e)\r\n                {\r\n                    Execute.ShowDebugMessage(\"SettingsHelper.CrossThreadAccess\" + e);\r\n                }\r\n            }\r\n        }\r\n\r\n        public static T GetValue<T>(string key)\r\n        {\r\n            object result;\r\n            lock (SyncLock) // critical for wp7 devices\r\n            {\r\n                try\r\n                {\r\n                    if (LocalSettings.TryGetValue(key, out result))\r\n                    {\r\n                        return (T)result;\r\n                    }\r\n\r\n                    result = default(T);\r\n                }\r\n                catch (Exception e)\r\n                {\r\n                    Logs.Log.Write(\"SettingsHelper.GetValue \" + e);\r\n                    result = default(T);\r\n                }\r\n            }\r\n            return (T)result;\r\n        }\r\n\r\n        public static object GetValue(string key)\r\n        {\r\n            object result;\r\n            lock (SyncLock) //critical for wp7 devices\r\n            {\r\n                try\r\n                {\r\n                    if (LocalSettings.TryGetValue(key, out result))\r\n                    {\r\n                        return result;\r\n                    }\r\n\r\n                    result = null;\r\n                }\r\n                catch (Exception e)\r\n                {\r\n                    Logs.Log.Write(\"SettingsHelper.GetValue \" + e);\r\n                    result = null;\r\n                }\r\n\r\n            }\r\n            return result;\r\n        }\r\n\r\n        public static void SetValue(string key, object value)\r\n        {\r\n            lock (SyncLock)\r\n            {\r\n                LocalSettings[key] = value;\r\n            }\r\n        }\r\n\r\n        public static void RemoveValue(string key)\r\n        {\r\n            lock (SyncLock)\r\n            {\r\n                LocalSettings.Remove(key);\r\n            }\r\n        }\r\n\r\n        private static Dictionary<string, object> _settings;\r\n\r\n        public static Dictionary<string, object> LocalSettings\r\n        {\r\n            get\r\n            {\r\n                if (_settings == null)\r\n                {\r\n                    _settings = GetValuesAsync().Result;\r\n                }\r\n\r\n                return _settings;\r\n            }\r\n        }\r\n\r\n        public static async Task<Dictionary<string, object>> GetValuesAsync()\r\n        {\r\n            try\r\n            {\r\n                using (var fileStream = await ApplicationData.Current.LocalFolder.OpenStreamForReadAsync(\"__ApplicationSettings\"))\r\n                {\r\n                    //var stringReader = new StreamReader(fileStream);\r\n                    //var str = stringReader.ReadToEnd();\r\n\r\n                    using (var streamReader = new StreamReader(fileStream))\r\n                    {\r\n                        var line = streamReader.ReadLine() ?? string.Empty;\r\n\r\n                        var knownTypes = line.Split('\\0')\r\n                            .Where(x => !string.IsNullOrEmpty(x))\r\n                            .Select(Type.GetType)\r\n                            .ToList();\r\n\r\n                        ReplaceNonPclTypes(knownTypes);\r\n\r\n                        fileStream.Position = line.Length + Environment.NewLine.Length;\r\n\r\n                        var serializer = new DataContractSerializer(typeof(Dictionary<string, object>), knownTypes);\r\n                        return (Dictionary<string, object>)serializer.ReadObject(fileStream);\r\n                    }\r\n                }\r\n            }\r\n            catch(Exception ex)\r\n            {\r\n                Logs.Log.Write(\"SettingsHelper.GetValuesAsync exception \" + ex);\r\n\r\n                return new Dictionary<string, object>();\r\n            }\r\n        }\r\n\r\n        private static void ReplaceNonPclTypes(List<Type> knownTypes)\r\n        {\r\n            for (var i = 0; i < knownTypes.Count; i++)\r\n            {\r\n                if (knownTypes[i].Name == typeof(TLConfig82).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig82);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig78).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig78);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig76).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig76);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig72).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig72);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig71).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig71);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig67).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig67);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig63).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig63);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig61).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig61);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig60).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig60);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig55).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig55);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig54).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig54);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig52).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig52);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig48).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig48);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig44).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig44);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig41).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig41);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(TLConfig28).Name)\r\n                {\r\n                    knownTypes[i] = typeof(TLConfig28);\r\n                }\r\n                else if (knownTypes[i].Name == typeof(BackgroundItem).Name)\r\n                {\r\n                    knownTypes[i] = typeof(BackgroundItem);\r\n                }\r\n            }\r\n        }\r\n    }\r\n#endif\r\n}\r\n\r\n#if WIN_RT\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class BackgroundItem { }\r\n}\r\n#endif"
  },
  {
    "path": "Telegram.Api/Helpers/Utils.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Runtime.InteropServices.WindowsRuntime;\r\nusing Windows.Storage.Streams;\r\nusing Org.BouncyCastle.OpenSsl;\r\n#if WINDOWS_PHONE\r\nusing System.Threading;\r\nusing System.Security.Cryptography;\r\nusing System.Windows;\r\n#elif WIN_RT\r\nusing Windows.Security.Cryptography;\r\nusing System.Runtime.InteropServices.WindowsRuntime;\r\n#endif\r\nusing System.Text;\r\nusing Windows.Security.Cryptography.Core;\r\nusing Org.BouncyCastle.Crypto.Parameters;\r\nusing Org.BouncyCastle.Math;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.TL;\r\nusing Buffer = System.Buffer;\r\n\r\nnamespace Telegram.Api.Helpers\r\n{\r\n    public class PollardRhoLong\r\n    {\r\n        public static long Gcd(long ths, long val)\r\n        {\r\n            if (val == 0)\r\n                return Math.Abs(ths);\r\n            if (ths == 0)\r\n                return Math.Abs(val);\r\n\r\n            long r;\r\n            long u = ths;\r\n            long v = val;\r\n\r\n            while (v != 0)\r\n            {\r\n                r = u % v;\r\n                u = v;\r\n                v = r;\r\n            }\r\n\r\n            return u;\r\n        }\r\n\r\n        public static long Rho(long N)\r\n        {\r\n            var random = new Random();\r\n\r\n            long divisor;\r\n            var bytes = new byte[8];\r\n            random.NextBytes(bytes);\r\n            var c = BitConverter.ToInt64(bytes, 0);\r\n            random.NextBytes(bytes);\r\n            var x = BitConverter.ToInt64(bytes, 0);\r\n            var xx = x;\r\n\r\n            // check divisibility by 2\r\n            if (N % 2 == 0) return 2;\r\n\r\n            do\r\n            {\r\n                x = (x * x % N + c) % N;\r\n                xx = (xx * xx % N + c) % N;\r\n                xx = (xx * xx % N + c) % N;\r\n                divisor = Gcd(x - xx, N);\r\n            } while (divisor == 1);\r\n\r\n            return divisor;\r\n        }\r\n    }\r\n\r\n    public class PollardRho\r\n    {\r\n        private static readonly BigInteger ZERO = new BigInteger(\"0\");\r\n        private static readonly BigInteger ONE = new BigInteger(\"1\");\r\n        private static readonly BigInteger TWO = new BigInteger(\"2\");\r\n        private static readonly SecureRandom random = new SecureRandom();\r\n\r\n        public static BigInteger Rho(BigInteger N)\r\n        {\r\n            BigInteger divisor;\r\n            var c = new BigInteger(N.BitLength, random);\r\n            var x = new BigInteger(N.BitLength, random);\r\n            var xx = x;\r\n\r\n            // check divisibility by 2\r\n            if (N.Mod(TWO).CompareTo(ZERO) == 0) return TWO;\r\n\r\n            do\r\n            {\r\n                x = x.Multiply(x).Mod(N).Add(c).Mod(N);\r\n                xx = xx.Multiply(xx).Mod(N).Add(c).Mod(N);\r\n                xx = xx.Multiply(xx).Mod(N).Add(c).Mod(N);\r\n                divisor = x.Subtract(xx).Gcd(N);\r\n            } while ((divisor.CompareTo(ONE)) == 0);\r\n\r\n            return divisor;\r\n        }\r\n\r\n        public static WindowsPhone.Tuple<BigInteger, BigInteger> Factor(BigInteger N)\r\n        {\r\n            var divisor = Rho(N);\r\n\r\n            var divisor2 = N.Divide(divisor);\r\n\r\n            return divisor.CompareTo(divisor2) > 0\r\n                ? new WindowsPhone.Tuple<BigInteger, BigInteger>(divisor2, divisor)\r\n                : new WindowsPhone.Tuple<BigInteger, BigInteger>(divisor, divisor2);\r\n        }\r\n    }\r\n\r\n    public static class Utils\r\n    {\r\n#if !WIN_RT\r\n        public static bool XapContentFileExists(string relativePath)\r\n        {\r\n            return Application.GetResourceStream(new Uri(relativePath, UriKind.Relative)) != null;\r\n        }\r\n#endif\r\n\r\n        public static long GetRSAFingerprint(string key)\r\n        {\r\n            using (var text = new StringReader(key))\r\n            {\r\n                var reader = new PemReader(text);\r\n                var parameter = reader.ReadObject() as RsaKeyParameters;\r\n                if (parameter != null)\r\n                {\r\n                    var modulus = parameter.Modulus.ToByteArray();\r\n                    var exponent = parameter.Exponent.ToByteArray();\r\n\r\n                    if (modulus.Length > 256)\r\n                    {\r\n                        var corrected = new byte[256];\r\n                        Buffer.BlockCopy(modulus, modulus.Length - 256, corrected, 0, 256);\r\n\r\n                        modulus = corrected;\r\n                    }\r\n                    else if (modulus.Length < 256)\r\n                    {\r\n                        var corrected = new byte[256];\r\n                        Buffer.BlockCopy(modulus, 0, corrected, 256 - modulus.Length, modulus.Length);\r\n\r\n                        for (int a = 0; a < 256 - modulus.Length; a++)\r\n                        {\r\n                            modulus[a] = 0;\r\n                        }\r\n\r\n                        modulus = corrected;\r\n                    }\r\n\r\n                    using (var stream = new MemoryStream())\r\n                    {\r\n                        var modulusString = TLString.FromBigEndianData(modulus);\r\n                        var exponentString = TLString.FromBigEndianData(exponent);\r\n\r\n                        modulusString.ToStream(stream);\r\n                        exponentString.ToStream(stream);\r\n\r\n                        var hash = ComputeSHA1(stream.ToArray());\r\n\r\n                        var fingerprint = (((ulong)hash[19]) << 56) |\r\n                                          (((ulong)hash[18]) << 48) |\r\n                                          (((ulong)hash[17]) << 40) |\r\n                                          (((ulong)hash[16]) << 32) |\r\n                                          (((ulong)hash[15]) << 24) |\r\n                                          (((ulong)hash[14]) << 16) |\r\n                                          (((ulong)hash[13]) << 8) |\r\n                                          ((ulong)hash[12]);\r\n\r\n                        return (long)fingerprint;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return -1;\r\n        }\r\n\r\n        public static byte[] GetRSABytes(byte[] bytes, string key)\r\n        {\r\n            using (var text = new StringReader(key))\r\n            {\r\n                var reader = new PemReader(text);\r\n                var parameter = reader.ReadObject() as RsaKeyParameters;\r\n                if (parameter != null)\r\n                {\r\n                    var modulus = parameter.Modulus;\r\n                    var exponent = parameter.Exponent;\r\n\r\n                    var num = new BigInteger(TLUtils.Combine(new byte[] { 0x00 }, bytes));\r\n                    var rsa = num.ModPow(exponent, modulus).ToByteArray();\r\n\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\"RSA bytes length \" + rsa.Length);\r\n#endif\r\n                    if (rsa.Length == 257)\r\n                    {\r\n                        if (rsa[0] != 0x00) throw new Exception(\"rsa last byte is \" + rsa[0]);\r\n\r\n#if LOG_REGISTRATION\r\n                        TLUtils.WriteLog(\"First RSA byte removes: byte value is \" + rsa[0]);\r\n#endif\r\n\r\n                        rsa = rsa.SubArray(1, 256);\r\n                    }\r\n                    else if (rsa.Length < 256)\r\n                    {\r\n                        var correctedRsa = new byte[256];\r\n                        Array.Copy(rsa, 0, correctedRsa, 256 - rsa.Length, rsa.Length);\r\n                        for (var i = 0; i < 256 - rsa.Length; i++)\r\n                        {\r\n                            correctedRsa[i] = 0;\r\n#if LOG_REGISTRATION\r\n                            TLUtils.WriteLog(\"First RSA bytes added i=\" + i + \" \" + correctedRsa[i]);\r\n#endif\r\n                        }\r\n                        rsa = correctedRsa;\r\n                    }\r\n\r\n                    return rsa;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static UInt64 GetP(UInt64 data)\r\n        {\r\n            var sqrt = (UInt64)Math.Sqrt(data);\r\n            if (sqrt % 2 == 0) sqrt++;\r\n\r\n\r\n            for (UInt64 i = sqrt; i >= 1; i = i - 2)\r\n            {\r\n                if (data % i == 0) return i;\r\n            }\r\n\r\n            return data;\r\n        }\r\n\r\n        public static WindowsPhone.Tuple<UInt64, UInt64> GetPQ(UInt64 pq)\r\n        {\r\n            var p = GetP(pq);\r\n            var q = pq / p;\r\n\r\n            if (p > q)\r\n            {\r\n                var temp = p;\r\n                p = q;\r\n                q = temp;\r\n            }\r\n\r\n            return new WindowsPhone.Tuple<UInt64, UInt64>(p, q);\r\n        }\r\n\r\n        public static WindowsPhone.Tuple<UInt64, UInt64> GetPQPollard(UInt64 pq)\r\n        {\r\n            var n = new BigInteger(BitConverter.GetBytes(pq).Reverse().ToArray());\r\n            var result = PollardRho.Factor(n);\r\n            return new WindowsPhone.Tuple<UInt64, UInt64>((UInt64)result.Item1.LongValue, (UInt64)result.Item2.LongValue);\r\n        }\r\n\r\n        public static WindowsPhone.Tuple<UInt64, UInt64> GetFastPQ(UInt64 pq)\r\n        {\r\n            var first = FastFactor((long)pq);\r\n            var second = (long)pq / first;\r\n\r\n            return first < second ?\r\n                new WindowsPhone.Tuple<UInt64, UInt64>((UInt64)first, (UInt64)second) :\r\n                new WindowsPhone.Tuple<UInt64, UInt64>((UInt64)second, (UInt64)first);\r\n        }\r\n\r\n        public static long GCD(long a, long b)\r\n        {\r\n            while (a != 0 && b != 0)\r\n            {\r\n                while ((b & 1) == 0)\r\n                {\r\n                    b >>= 1;\r\n                }\r\n                while ((a & 1) == 0)\r\n                {\r\n                    a >>= 1;\r\n                }\r\n                if (a > b)\r\n                {\r\n                    a -= b;\r\n                }\r\n                else\r\n                {\r\n                    b -= a;\r\n                }\r\n            }\r\n            return b == 0 ? a : b;\r\n        }\r\n\r\n        public static long FastFactor(long what)\r\n        {\r\n            Random r = new Random();\r\n            long g = 0;\r\n            int it = 0;\r\n            for (int i = 0; i < 3; i++)\r\n            {\r\n                int q = (r.Next(128) & 15) + 17;\r\n                long x = r.Next(1000000000) + 1, y = x;\r\n                int lim = 1 << (i + 18);\r\n                for (int j = 1; j < lim; j++)\r\n                {\r\n                    ++it;\r\n                    long a = x, b = x, c = q;\r\n                    while (b != 0)\r\n                    {\r\n                        if ((b & 1) != 0)\r\n                        {\r\n                            c += a;\r\n                            if (c >= what)\r\n                            {\r\n                                c -= what;\r\n                            }\r\n                        }\r\n                        a += a;\r\n                        if (a >= what)\r\n                        {\r\n                            a -= what;\r\n                        }\r\n                        b >>= 1;\r\n                    }\r\n                    x = c;\r\n                    long z = x < y ? y - x : x - y;\r\n                    g = GCD(z, what);\r\n                    if (g != 1)\r\n                    {\r\n                        break;\r\n                    }\r\n                    if ((j & (j - 1)) == 0)\r\n                    {\r\n                        y = x;\r\n                    }\r\n                }\r\n                if (g > 1)\r\n                {\r\n                    break;\r\n                }\r\n            }\r\n\r\n            long p = what / g;\r\n            return Math.Min(p, g);\r\n        }\r\n\r\n\r\n\r\n\r\n        private static byte[] XorArrays(byte[] first, byte[] second)\r\n        {\r\n            var bytes = new byte[16];\r\n            for (int i = 0; i < bytes.Length; i++)\r\n            {\r\n                bytes[i] = (byte)(first[i] ^ second[i]);\r\n            }\r\n\r\n            return bytes;\r\n        }\r\n#if WINDOWS_PHONE || WIN_RT\r\n        public static Stream AesIge(Stream data, byte[] key, byte[] iv, bool encrypt)\r\n        {\r\n            var cipher = CipherUtilities.GetCipher(\"AES/ECB/NOPADDING\");\r\n            var param = new KeyParameter(key);\r\n            cipher.Init(encrypt, param);\r\n\r\n            var inData = data;\r\n            var outStream = new MemoryStream();\r\n            var position = 0;\r\n\r\n            byte[] xOld = new byte[16], yOld = new byte[16], x = new byte[16];\r\n\r\n            Array.Copy(iv, 0, encrypt ? yOld : xOld, 0, 16);\r\n            Array.Copy(iv, 16, encrypt ? xOld : yOld, 0, 16);\r\n\r\n            while (position < inData.Length)\r\n            {\r\n                long length;\r\n                if ((position + 16) < inData.Length)\r\n                {\r\n                    length = 16;\r\n                }\r\n                else\r\n                {\r\n                    length = inData.Length - position;\r\n                }\r\n\r\n                inData.Read(x, 0, (int)length);\r\n                //Array.Copy(inData, position, x, 0, length);\r\n\r\n\r\n                var processedBytes = cipher.ProcessBytes(XorArrays(x, yOld));\r\n                byte[] y = XorArrays(processedBytes, xOld);\r\n\r\n                xOld = (byte[])x.Clone();\r\n                //xOld = new byte[x.Length];\r\n                //Array.Copy(x, xOld, x.Length);\r\n                yOld = y;\r\n\r\n                outStream.Write(y, 0, y.Length);\r\n                //outData = TLUtils.Combine(outData, y);\r\n\r\n                position += 16;\r\n            }\r\n            return outStream;\r\n            //return outData;\r\n        }\r\n\r\n        public static byte[] AesIge(byte[] data, byte[] key, byte[] iv, bool encrypt)\r\n        {\r\n            byte[] nextIV;\r\n            return AesIge(data, key, iv, encrypt, out nextIV);\r\n        }\r\n\r\n#if WIN_RT\r\n        public static byte[] AesIgeWinRT(byte[] data, byte[] key, byte[] iv, bool encrypt)\r\n        {\r\n            byte[] nextIV;\r\n            return AesIge2(data, key, iv, encrypt, out nextIV);\r\n        }\r\n\r\n        public static byte[] AesIge2(byte[] data, byte[] key, byte[] iv, bool encrypt, out byte[] nextIV)\r\n        {\r\n            var cipher = SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithmNames.AesEcb);\r\n            var keyMaterial = CryptographicBuffer.CreateFromByteArray(key);\r\n            var param = cipher.CreateSymmetricKey(keyMaterial);\r\n\r\n            var inData = data;\r\n            //var outData = new byte[]{};\r\n            var outStream = new MemoryStream();\r\n            var position = 0;\r\n\r\n            byte[] xOld = new byte[16], yOld = new byte[16], x = new byte[16], y = new byte[16];\r\n\r\n            Array.Copy(iv, 0, encrypt ? yOld : xOld, 0, 16);\r\n            Array.Copy(iv, 16, encrypt ? xOld : yOld, 0, 16);\r\n\r\n            while (position < inData.Length)\r\n            {\r\n                int length;\r\n                if ((position + 16) < inData.Length)\r\n                {\r\n                    length = 16;\r\n                }\r\n                else\r\n                {\r\n                    length = inData.Length - position;\r\n                }\r\n\r\n                Array.Copy(inData, position, x, 0, length);\r\n\r\n                y = XorArrays(x, yOld);\r\n                var processedBytes = encrypt ? CryptographicEngine.Encrypt(param, CryptographicBuffer.CreateFromByteArray(y), null) : CryptographicEngine.Decrypt(param, CryptographicBuffer.CreateFromByteArray(y), null);\r\n                y = XorArrays(processedBytes.ToArray(), xOld);\r\n\r\n                xOld = (byte[])x.Clone();\r\n                //xOld = new byte[x.Length];\r\n                //Array.Copy(x, xOld, x.Length);\r\n                yOld = y;\r\n\r\n                outStream.Write(y, 0, y.Length);\r\n                //outData = TLUtils.Combine(outData, y);\r\n\r\n                position += 16;\r\n            }\r\n\r\n            nextIV = encrypt ? TLUtils.Combine(yOld, xOld) : TLUtils.Combine(xOld, yOld);\r\n\r\n            return outStream.ToArray();\r\n            //return outData;\r\n        }\r\n#endif\r\n\r\n        public static byte[] AesIge(byte[] data, byte[] key, byte[] iv, bool encrypt, out byte[] nextIV)\r\n        {\r\n            var cipher = CipherUtilities.GetCipher(\"AES/ECB/NOPADDING\");\r\n            var param = new KeyParameter(key);\r\n            cipher.Init(encrypt, param);\r\n\r\n            var inData = data;\r\n            //var outData = new byte[]{};\r\n            var outStream = new MemoryStream();\r\n            var position = 0;\r\n\r\n            byte[] xOld = new byte[16], yOld = new byte[16], x = new byte[16];\r\n\r\n            Array.Copy(iv, 0, encrypt ? yOld : xOld, 0, 16);\r\n            Array.Copy(iv, 16, encrypt ? xOld : yOld, 0, 16);\r\n\r\n            while (position < inData.Length)\r\n            {\r\n                int length;\r\n                if ((position + 16) < inData.Length)\r\n                {\r\n                    length = 16;\r\n                }\r\n                else\r\n                {\r\n                    length = inData.Length - position;\r\n                }\r\n\r\n                Array.Copy(inData, position, x, 0, length);\r\n\r\n\r\n                var processedBytes = cipher.ProcessBytes(XorArrays(x, yOld));\r\n                byte[] y = XorArrays(processedBytes, xOld);\r\n\r\n                xOld = (byte[])x.Clone();\r\n                //xOld = new byte[x.Length];\r\n                //Array.Copy(x, xOld, x.Length);\r\n                yOld = y;\r\n\r\n                outStream.Write(y, 0, y.Length);\r\n                //outData = TLUtils.Combine(outData, y);\r\n\r\n                position += 16;\r\n            }\r\n\r\n            nextIV = encrypt ? TLUtils.Combine(yOld, xOld) : TLUtils.Combine(xOld, yOld);\r\n\r\n            return outStream.ToArray();\r\n            //return outData;\r\n        }\r\n\r\n        private static System.Numerics.BigInteger MaxIvec = new System.Numerics.BigInteger(new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF });\r\n\r\n        // Note: ivec - big-endian, but BigInterger.ctor and BigInteger.ToByteArray return little-endian\r\n        public static byte[] AES_ctr128_encrypt(byte[] input, byte[] key, ref byte[] ivec, ref byte[] ecount_buf, ref uint num)\r\n        {\r\n            uint n;\r\n            var output = new byte[input.Length];\r\n            n = num;\r\n\r\n            var cipher = CipherUtilities.GetCipher(\"AES/ECB/NOPADDING\");\r\n            var param = new KeyParameter(key);\r\n            cipher.Init(true, param);\r\n\r\n            for (uint i = 0; i < input.Length; i++)\r\n            {\r\n                if (n == 0)\r\n                {\r\n                    ecount_buf = cipher.DoFinal(ivec);\r\n                    Array.Reverse(ivec);\r\n                    var bi = new System.Numerics.BigInteger(TLUtils.Combine(ivec, new byte[] { 0x00 }));\r\n                    bi = (bi + 1);\r\n                    var biArray = bi.ToByteArray();\r\n                    var b = new byte[16];\r\n                    Buffer.BlockCopy(biArray, 0, b, 0, Math.Min(b.Length, biArray.Length));\r\n\r\n                    //System.Diagnostics.Debug.WriteLine(bi);\r\n                    Array.Reverse(b);\r\n                    ivec = b;\r\n                }\r\n\r\n                output[i] = (byte)(input[i] ^ ecount_buf[n]);\r\n                n = (n + 1) % 16;\r\n            }\r\n\r\n            num = n;\r\n            return output;\r\n        }\r\n\r\n        public static byte[] AES_ctr128_encrypt2(byte[] input, byte[] key, ref byte[] ivec, ref byte[] ecount_buf, ref uint num)\r\n        {\r\n            uint n;\r\n            var output = new byte[input.Length];\r\n            n = num;\r\n\r\n            var cipher = CipherUtilities.GetCipher(\"AES/ECB/NOPADDING\");\r\n            var param = new KeyParameter(key);\r\n            cipher.Init(true, param);\r\n\r\n            for (uint i = 0; i < input.Length; i++)\r\n            {\r\n                if (n == 0)\r\n                {\r\n                    ecount_buf = cipher.DoFinal(ivec);\r\n                    Array.Reverse(ivec);\r\n                    var bi = new System.Numerics.BigInteger(TLUtils.Combine(ivec, new byte[] { 0x00 }));\r\n                    bi = (bi + 1);\r\n                    var biArray = bi.ToByteArray();\r\n                    var b = new byte[16];\r\n                    Buffer.BlockCopy(biArray, 0, b, 0, Math.Min(b.Length, biArray.Length));\r\n\r\n                    //System.Diagnostics.Debug.WriteLine(bi);\r\n                    Array.Reverse(b);\r\n                    ivec = b;\r\n                }\r\n\r\n                output[i] = (byte)(input[i] ^ ecount_buf[n]);\r\n                n = (n + 1) % 16;\r\n            }\r\n\r\n            num = n;\r\n            return output;\r\n        }\r\n\r\n        //public static byte[] AesCtr(byte[] data, byte[] key, byte[] iv, bool encrypt)\r\n        //{\r\n        //    var cipher = CipherUtilities.GetCipher(\"AES/CTR/NOPADDING\");\r\n        //    var keyIv = new ParametersWithIV(new KeyParameter(key), iv);\r\n        //    cipher.Init(encrypt, keyIv);\r\n        //    //cipher.Init(encrypt, new ParametersWithIV(ParameterUtilities.CreateKeyParameter(\"AES\", key), iv));\r\n\r\n        //    var outData = cipher.DoFinal(data);\r\n        //    if (outData.Length != data.Length)\r\n        //    {\r\n        //        Execute.ShowDebugMessage(string.Format(\"Utils.AesCtr outData.Length!=data.Length outData={0} data={1}\", outData.Length, data.Length));\r\n        //    }\r\n\r\n        //    return outData;\r\n        //}\r\n#else\r\n        public static byte[] AesIge(byte[] data, byte[] key, byte[] iv, bool encrypt)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public static byte[] AesCtr(byte[] data, byte[] key, byte[] iv, bool encrypt)\r\n        {\r\n            var cipher = CipherUtilities.GetCipher(\"AES/CTR/NOPADDING\");\r\n            cipher.Init(encrypt, new ParametersWithIV(ParameterUtilities.CreateKeyParameter(\"AES\", key), iv));\r\n\r\n            var outData = cipher.DoFinal(data);\r\n            if (outData.Length != data.Length)\r\n            {\r\n                Execute.ShowDebugMessage(string.Format(\"Utils.AesCtr outData.Length!=data.Length outData={0} data={1}\", outData.Length, data.Length));\r\n            }\r\n\r\n            return outData;\r\n        }\r\n#endif\r\n\r\n        public static byte[] StringToByteArray(String hex)\r\n        {\r\n            int NumberChars = hex.Length / 2;\r\n            byte[] bytes = new byte[NumberChars];\r\n            StringReader sr = new StringReader(hex);\r\n            for (int i = 0; i < NumberChars; i++)\r\n                bytes[i] = Convert.ToByte(new string(new char[2] { (char)sr.Read(), (char)sr.Read() }), 16);\r\n            sr.Dispose();\r\n            return bytes;\r\n        }\r\n\r\n        public static T[] SubArray<T>(this T[] data, int index, int length)\r\n        {\r\n            if (index == 0 && length == data.Length)\r\n            {\r\n                return data;\r\n            }\r\n\r\n            var result = new T[length];\r\n            Array.Copy(data, index, result, 0, length);\r\n            return result;\r\n        }\r\n\r\n        public static double DateTimeToUnixTimestamp(DateTime dateTime)\r\n        {\r\n            // From local DateTime to UTC0 UnixTime\r\n\r\n            var dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0);\r\n            DateTime.SpecifyKind(dtDateTime, DateTimeKind.Utc);\r\n\r\n            return (dateTime.ToUniversalTime() - dtDateTime).TotalSeconds;\r\n        }\r\n\r\n        public static DateTime UnixTimestampToDateTime(double unixTimeStamp)\r\n        {\r\n            // From UTC0 UnixTime to local DateTime\r\n\r\n            var dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0);\r\n            DateTime.SpecifyKind(dtDateTime, DateTimeKind.Utc);\r\n\r\n            dtDateTime = dtDateTime.AddSeconds(unixTimeStamp).ToLocalTime();\r\n            return dtDateTime;\r\n        }\r\n\r\n        public static byte[] ComputeSHA1(byte[] data)\r\n        {\r\n#if WINDOWS_PHONE\r\n            //var sha1 = new SHA1Managed(); // to avoid thread sync problems http://stackoverflow.com/questions/12644257/sha1managed-computehash-occasionally-different-on-different-servers\r\n            //return sha1.ComputeHash(data);\r\n            var sha1 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha1);\r\n            return sha1.HashData(data.AsBuffer()).ToArray();\r\n#elif WIN_RT\r\n            var sha1 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha1);\r\n            return sha1.HashData(data.AsBuffer()).ToArray();\r\n#endif\r\n        }\r\n\r\n        public static byte[] ComputeSHA256(byte[] data)\r\n        {\r\n#if WINDOWS_PHONE\r\n            //var sha256 = new SHA256Managed(); // to avoid thread sync problems http://stackoverflow.com/questions/12644257/sha1managed-computehash-occasionally-different-on-different-servers\r\n            //return sha256.ComputeHash(data);\r\n            var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);\r\n            return sha256.HashData(data.AsBuffer()).ToArray();\r\n#elif WIN_RT\r\n            var sha1 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);\r\n            return sha1.HashData(data.AsBuffer()).ToArray();\r\n#endif\r\n        }\r\n\r\n        public static byte[] ComputeMD5(byte[] data)\r\n        {\r\n#if WINDOWS_PHONE\r\n            //var md5 = new MD5Managed();\r\n            //return md5.ComputeHash(data);\r\n            var md5 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Md5);\r\n            return md5.HashData(data.AsBuffer()).ToArray();\r\n#elif WIN_RT\r\n            var md5 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Md5);\r\n            return md5.HashData(data.AsBuffer()).ToArray();\r\n#endif\r\n        }\r\n\r\n        public static byte[] ComputeCRC32(string data)\r\n        {\r\n            byte[] utf16Bytes = Encoding.Unicode.GetBytes(data);\r\n            byte[] utf8Bytes = Encoding.Convert(Encoding.Unicode, Encoding.UTF8, utf16Bytes);\r\n\r\n            return ComputeCRC32(utf8Bytes);\r\n        }\r\n\r\n        public static byte[] ComputeCRC32(byte[] data)\r\n        {\r\n            var crc = new CRC32();\r\n            var hash = crc.ComputeHash(data);\r\n\r\n            return hash;\r\n        }\r\n\r\n        public static string CurrentUICulture()\r\n        {\r\n#if WIN_RT\r\n            return Windows.Globalization.Language.CurrentInputMethodLanguageTag;\r\n#elif WINDOWS_PHONE\r\n            return Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName;\r\n#endif\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Logs/Log.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Execute = Telegram.Api.Helpers.Execute; \r\n\r\nnamespace Telegram.Logs\r\n{\r\n    public class Log\r\n    {\r\n        public static bool IsPrivateBeta\r\n        {\r\n            get\r\n            {\r\n#if DEBUG\r\n                return true;\r\n#endif\r\n#if WP81\r\n                return Windows.ApplicationModel.Package.Current.Id.Name == \"TelegramMessengerLLP.TelegramMessengerPreview\";\r\n#endif\r\n                return true;\r\n            }\r\n        }\r\n\r\n        public static bool WriteSync { get; set; }\r\n\r\n        public static bool IsEnabled\r\n        {\r\n            get { return IsPrivateBeta; }\r\n        }\r\n\r\n        public static void Write(string str, Action callback = null)\r\n        {\r\n            if (!IsEnabled)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (WriteSync)\r\n            {\r\n                WriteInternal(str, callback);\r\n            }\r\n            else\r\n            {\r\n                Execute.BeginOnThreadPool(() =>\r\n                {\r\n                    WriteInternal(str, callback);\r\n                });\r\n            }\r\n        }\r\n\r\n        public static void SyncWrite(string str, Action callback = null)\r\n        {\r\n            if (!IsEnabled)\r\n            {\r\n                return;\r\n            }\r\n\r\n            //if (WriteSync)\r\n            {\r\n                WriteInternal(str, callback);\r\n            }\r\n        }\r\n\r\n        private static readonly object _fileSyncRoot = new object();\r\n\r\n        private static void WriteInternal(string str, Action callback = null)\r\n        {\r\n            var timestamp = DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture);\r\n\r\n            str = string.Format(\"{0} {1}{2}\", timestamp, str, Environment.NewLine);\r\n            using (var mutex = new Mutex(false, \"Telegram.Log\"))\r\n            {\r\n                mutex.WaitOne();\r\n                FileUtils.Write(_fileSyncRoot, DirectoryName, FileName, str);\r\n                mutex.ReleaseMutex();\r\n            }\r\n            callback.SafeInvoke();\r\n        }\r\n\r\n        private const string DirectoryName = \"Logs\";\r\n\r\n        public static string FileName\r\n        {\r\n            get { return DateTime.Now.ToString(\"yyyy-MM-dd\", CultureInfo.InvariantCulture) + \".txt\"; }\r\n        }\r\n\r\n        public static void CopyTo(string fileName, Action<string> callback)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                using (var mutex = new Mutex(false, \"Telegram.Log\"))\r\n                {\r\n                    mutex.WaitOne();\r\n                    FileUtils.CopyLog(_fileSyncRoot, DirectoryName, FileName, fileName, IsEnabled);\r\n                    mutex.ReleaseMutex();\r\n                }\r\n\r\n                callback.SafeInvoke(fileName);\r\n            });\r\n        }\r\n\r\n        public static void Clear(Action callback)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                using (var mutex = new Mutex(false, \"Telegram.Log\"))\r\n                {\r\n                    mutex.WaitOne();\r\n                    FileUtils.Clear(_fileSyncRoot, DirectoryName);\r\n                    mutex.ReleaseMutex();\r\n                }\r\n\r\n                callback.SafeInvoke();\r\n            });\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Telegram.Api\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Telegram.Api\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"0c2f1b61-a8fe-45fb-8538-aa6925a415b6\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en\")]\r\n"
  },
  {
    "path": "Telegram.Api/Services/Cache/Context.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace Telegram.Api.Services.Cache\r\n{\r\n    public class Context<T> : Dictionary<long, T>\r\n    {\r\n        public Context()\r\n        {\r\n            \r\n        }\r\n\r\n        public Context(IEnumerable<T> items, Func<T, long> keyFunc)\r\n        {\r\n            foreach (var item in items)\r\n            {\r\n                this[keyFunc(item)] = item;\r\n            }\r\n        }\r\n\r\n        public new T this[long index]\r\n        {\r\n            get\r\n            {\r\n                T val;\r\n                return TryGetValue(index, out val) ? val : default(T);\r\n            }\r\n\r\n            set\r\n            {\r\n                base[index] = value;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/Cache/EventArgs/DialogAddedEventArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Cache.EventArgs\r\n{\r\n    public class MessagesRemovedEventArgs\r\n    {\r\n        public TLDialogBase Dialog { get; protected set; }\r\n\r\n        public IList<TLMessageBase> Messages { get; protected set; }\r\n\r\n        public TLDecryptedMessageBase DecryptedMessage { get; protected set; }\r\n\r\n        public MessagesRemovedEventArgs(TLDialogBase dialog, TLMessageBase message)\r\n        {\r\n            Dialog = dialog;\r\n            Messages = new List<TLMessageBase> {message};\r\n        }\r\n\r\n        public MessagesRemovedEventArgs(TLDialogBase dialog, IList<TLMessageBase> messages)\r\n        {\r\n            Dialog = dialog;\r\n            Messages = messages;\r\n        }\r\n\r\n        public MessagesRemovedEventArgs(TLDialogBase dialog, TLDecryptedMessageBase message)\r\n        {\r\n            Dialog = dialog;\r\n            DecryptedMessage = message;\r\n        }\r\n    }\r\n\r\n    public class DialogAddedEventArgs\r\n    {\r\n        public TLDialogBase Dialog { get; protected set; }\r\n\r\n        public DialogAddedEventArgs(TLDialogBase dialog)\r\n        {\r\n            Dialog = dialog;\r\n        }\r\n    }\r\n\r\n    public class DialogRemovedEventArgs\r\n    {\r\n        public TLDialogBase Dialog { get; protected set; }\r\n\r\n        public DialogRemovedEventArgs(TLDialogBase dialog)\r\n        {\r\n            Dialog = dialog;\r\n        }\r\n    }\r\n\r\n    public class ChannelAvailableMessagesEventArgs\r\n    {\r\n        public TLDialogBase Dialog { get; protected set; }\r\n\r\n        public TLInt AvailableMinId { get; set; }\r\n\r\n        public ChannelAvailableMessagesEventArgs(TLDialogBase dialog, TLInt availableMinId)\r\n        {\r\n            Dialog = dialog;\r\n            AvailableMinId = availableMinId;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/Cache/EventArgs/TopMessageUpdatedEventArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Cache.EventArgs\r\n{\r\n    public class TopMessageUpdatedEventArgs : System.EventArgs\r\n    {\r\n        public TLPeerBase Peer { get; protected set; }\r\n\r\n        public TLDialogBase Dialog { get; protected set; }\r\n\r\n        public TLMessageBase Message { get; protected set; }\r\n\r\n        public TLDecryptedMessageBase DecryptedMessage { get; protected set; }\r\n\r\n        public bool NotifyPinned { get; set; }\r\n\r\n        public TopMessageUpdatedEventArgs(TLPeerBase peer)\r\n        {\r\n            Peer = peer;\r\n        }\r\n\r\n        public TopMessageUpdatedEventArgs(TLDialogBase dialog, TLMessageBase message)\r\n        {\r\n            Dialog = dialog;\r\n            Message = message;\r\n        }\r\n\r\n        public TopMessageUpdatedEventArgs(TLDialogBase dialog, TLDecryptedMessageBase message)\r\n        {\r\n            Dialog = dialog;\r\n            DecryptedMessage = message;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/Cache/ICacheService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Cache\r\n{\r\n    public interface ICacheService\r\n    {\r\n        ExceptionInfo LastSyncMessageException { get; }\r\n\r\n        void ClearLocalFileNames();\r\n        void CompressAsync(Action callback);\r\n        void Commit();\r\n        bool TryCommit();\r\n        void SaveSnapshot(string toDirectoryName);\r\n        void SaveTempSnapshot(string toDirectoryName);\r\n        void LoadSnapshot(string fromDirectoryName);\r\n        //event EventHandler<DialogAddedEventArgs> DialogAdded;\r\n        //event EventHandler<TopMessageUpdatedEventArgs> TopMessageUpdated;\r\n\r\n        TLUserBase GetUser(TLInt id);\r\n        TLUserBase GetUser(string username);\r\n        TLUserBase GetUser(TLUserProfilePhoto photo);\r\n        TLMessageBase GetMessage(TLInt id, TLInt channelId = null);\r\n        TLMessageBase GetMessage(TLLong randomId);\r\n        TLMessageBase GetMessage(TLWebPageBase webPage);\r\n        TLDecryptedMessageBase GetDecryptedMessage(TLInt chatId, TLLong randomId);\r\n        TLDialog GetDialog(TLMessageCommon message);\r\n        TLDialog GetDialog(TLPeerBase peer);\r\n        TLDialogBase GetEncryptedDialog(TLInt chatId);\r\n\r\n        TLChat GetChat(TLChatPhoto chatPhoto);\r\n        TLChannel GetChannel(string username);\r\n        TLChannel GetChannel(TLChatPhoto channelPhoto);\r\n        TLChatBase GetChat(TLInt id);\r\n        TLBroadcastChat GetBroadcast(TLInt id);\r\n\r\n        IList<TLMessageBase> GetMessages();\r\n        IList<TLMessageBase> GetSendingMessages();\r\n        IList<TLMessageBase> GetResendingMessages();\r\n\r\n        void GetHistoryAsync(TLPeerBase peer, Action<IList<TLMessageBase>> callback, int limit = Constants.CachedMessagesCount);\r\n        IList<TLMessageBase> GetHistory(TLPeerBase peer, int limit = Constants.CachedMessagesCount);\r\n        IList<TLMessageBase> GetHistory(TLPeerBase peer, int maxId, int limit = Constants.CachedMessagesCount);\r\n        //IList<TLMessageBase> GetUnreadHistory(TLInt currentUserId, TLPeerBase peer, int limit = Constants.CachedMessagesCount);\r\n        IList<TLMessageBase> GetHistory(int dialogId);\r\n        IList<TLDecryptedMessageBase> GetDecryptedHistory(int dialogId, int limit = Constants.CachedMessagesCount);\r\n        IList<TLDecryptedMessageBase> GetDecryptedHistory(int dialogId, long randomId, int limit = Constants.CachedMessagesCount);\r\n        IList<TLDecryptedMessageBase> GetUnreadDecryptedHistory(int dialogId);\r\n        void GetDialogsAsync(Action<IList<TLDialogBase>> callback);\r\n        IList<TLDialogBase> GetDialogs();\r\n        void GetContactsAsync(Action<IList<TLUserBase>> callback);\r\n\r\n        List<TLUserBase> GetContacts();\r\n        List<TLUserBase> GetUsersForSearch(IList<TLDialogBase> nonCachedDialogs);\r\n        List<TLUserBase> GetUsers();\r\n        List<TLChatBase> GetChats();\r\n        void GetChatsAsync(Action<IList<TLChatBase>> callback);\r\n\r\n\r\n        void ClearAsync(Action callback = null);\r\n        void SyncMessage(TLMessageBase message, Action<TLMessageBase> callback);\r\n        void SyncMessage(TLMessageBase message, bool notifyNewDialog, bool notifyTopMessageUpdated, Action<TLMessageBase> callback);\r\n        void SyncEditedMessage(TLMessageBase message, bool notifyNewDialog, bool notifyTopMessageUpdated, Action<TLMessageBase> callback);\r\n        void SyncSendingMessage(TLMessageCommon message, TLMessageBase previousMessage, Action<TLMessageCommon> callback);\r\n        void SyncSendingMessages(IList<TLMessage> messages, TLMessageBase previousMessage, Action<IList<TLMessage>> callback);\r\n        void SyncSendingMessageId(TLLong randomId, TLInt id, Action<TLMessageCommon> callback);\r\n        void SyncPeerMessages(TLPeerBase peer, TLMessagesBase messages, bool notifyNewDialog, bool notifyTopMessageUpdated, Action<TLMessagesBase> callback);\r\n        void AddMessagesToContext(TLMessagesBase messages, Action<TLMessagesBase> callback);\r\n        void SyncDialogs(Stopwatch stopwatch, TLDialogsBase dialogs, Action<TLDialogsBase> callback);\r\n        void SyncProxyData(TLProxyDataBase proxyData, Action<TLProxyDataBase> callback);\r\n        void SyncChannelDialogs(TLDialogsBase dialogs, Action<TLDialogsBase> callback);\r\n        void MergeMessagesAndChannels(TLDialogsBase dialogs);\r\n        void SyncUser(TLUserBase user, Action<TLUserBase> callback);\r\n        void SyncUser(TLUserFull userFull, Action<TLUserFull> callback);\r\n        void SyncUsers(TLVector<TLUserBase> users, Action<TLVector<TLUserBase>> callback);\r\n        void AddUsers(TLVector<TLUserBase> users, Action<TLVector<TLUserBase>> callback);\r\n        void SyncUsersAndChats(TLVector<TLUserBase> users, TLVector<TLChatBase> chats, Action<WindowsPhone.Tuple<TLVector<TLUserBase>, TLVector<TLChatBase>>> callback);\r\n        void SyncUserLink(TLLinkBase link, Action<TLLinkBase> callback);\r\n        void SyncContacts(TLContactsBase contacts, Action<TLContactsBase> callback);\r\n        void SyncContacts(TLImportedContacts contacts, Action<TLImportedContacts> callback);\r\n\r\n        void ClearDialog(TLPeerBase peer);\r\n        void DeleteDialog(TLDialogBase dialog);\r\n        void DeleteMessages(TLVector<TLInt> ids);\r\n        void DeleteChannelMessages(TLInt channelId, TLVector<TLInt> ids);\r\n        void DeleteMessages(TLPeerBase peer, TLMessageBase lastItem, TLVector<TLInt> messages);\r\n        void DeleteMessages(TLVector<TLLong> ids);\r\n        void DeleteDecryptedMessages(TLVector<TLLong> ids);\r\n        void ClearDecryptedHistoryAsync(TLInt chatId);\r\n        void ClearBroadcastHistoryAsync(TLInt chatId);\r\n\r\n        void SyncStatedMessage(TLStatedMessageBase statedMessage, Action<TLStatedMessageBase> callback);\r\n        void SyncStatedMessages(TLStatedMessagesBase statedMessages, Action<TLStatedMessagesBase> callback);\r\n\r\n        void GetConfigAsync(Action<TLConfig> config);\r\n        TLConfig GetConfig();\r\n        void SetConfig(TLConfig config);\r\n\r\n        void GetCdnConfigAsync(Action<TLCdnConfig> cdnConfig);\r\n        TLCdnConfig GetCdnConfig();\r\n        void SetCdnCofig(TLCdnConfig cdnConfig);\r\n\r\n        void ClearConfigImportAsync();\r\n        void SyncChat(TLMessagesChatFull messagesChatFull, Action<TLMessagesChatFull> callback);\r\n        void AddChats(TLVector<TLChatBase> chats, Action<TLVector<TLChatBase>> callback);\r\n        void SyncBroadcast(TLBroadcastChat broadcast, Action<TLBroadcastChat> callback);\r\n\r\n        TLEncryptedChatBase GetEncryptedChat(TLInt id);\r\n        void SyncEncryptedChat(TLEncryptedChatBase encryptedChat, Action<TLEncryptedChatBase> callback);\r\n        void SyncDecryptedMessage(TLDecryptedMessageBase message, TLEncryptedChatBase peer, Action<TLDecryptedMessageBase> callback);\r\n        void SyncDecryptedMessages(IList<WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>> tuples, TLEncryptedChatBase peer, Action<IList<WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>>> callback);\r\n        void SyncSendingDecryptedMessage(TLInt chatId, TLInt date, TLLong randomId, Action<TLDecryptedMessageBase> callback);\r\n\r\n        void Init();\r\n\r\n        void SyncDifference(TLDifference difference, Action<TLDifference> result, IList<ExceptionInfo> exceptions);\r\n        void SyncDifferenceWithoutUsersAndChats(TLDifference difference, Action<TLDifference> result, IList<ExceptionInfo> exceptions);\r\n        void SyncStatuses(TLVector<TLContactStatusBase> contacts, Action<TLVector<TLContactStatusBase>> callback);\r\n        void DeleteUser(TLInt id);\r\n        void DeleteChat(TLInt id);\r\n        void DeleteUserHistory(TLPeerChannel channel, TLPeerUser peer);\r\n\r\n        void UpdateDialogPinned(TLPeerBase peer, bool pinned);\r\n        void UpdatePinnedDialogs(TLVector<TLPeerBase> order);\r\n        void UpdateChannelAvailableMessages(TLInt channelId, TLInt availableMinId);\r\n        void UpdateDialogPromo(TLDialogBase dialogBase, bool promo);\r\n        TLProxyDataBase GetProxyData();\r\n        void UpdateProxyData(TLProxyDataBase proxyData);\r\n    }\r\n\r\n    public class ExceptionInfo\r\n    {\r\n        public Exception Exception { get; set; }\r\n\r\n        public DateTime Timestamp { get; set; }\r\n\r\n        public string Caption { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"Caption={2}\\nTimestamp={0}\\nException={1}\", Timestamp, Exception, Caption);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/Cache/InMemoryCacheService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Action = System.Action;\r\n\r\n\r\nnamespace Telegram.Api.Services.Cache\r\n{\r\n    public class MockupCacheService : ICacheService\r\n    {\r\n        public ExceptionInfo LastSyncMessageException { get; private set; }\r\n\r\n        public void SyncProxyData(TLProxyDataBase proxyData, Action<TLProxyDataBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void ClearLocalFileNames()\r\n        {\r\n\r\n        }\r\n\r\n        public void CompressAsync(Action callback)\r\n        {\r\n            callback.SafeInvoke();\r\n        }\r\n\r\n        public void Commit()\r\n        {\r\n\r\n        }\r\n\r\n        public bool TryCommit()\r\n        {\r\n            return true;\r\n        }\r\n\r\n        public void SaveSnapshot(string toDirectoryName)\r\n        {\r\n\r\n        }\r\n\r\n        public void SaveTempSnapshot(string toDirectoryName)\r\n        {\r\n\r\n        }\r\n\r\n        public void LoadSnapshot(string fromDirectoryName)\r\n        {\r\n\r\n        }\r\n\r\n        public TLUserBase GetUser(TLInt id)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLUserBase GetUser(string username)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLUserBase GetUser(TLUserProfilePhoto photo)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLMessageBase GetMessage(TLInt id, TLInt channelId = null)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLMessageBase GetMessage(TLLong randomId)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLMessageBase GetMessage(TLWebPageBase webPage)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLDecryptedMessageBase GetDecryptedMessage(TLInt chatId, TLLong randomId)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLDialog GetDialog(TLMessageCommon message)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLDialog GetDialog(TLPeerBase peer)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLDialogBase GetEncryptedDialog(TLInt chatId)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLChat GetChat(TLChatPhoto chatPhoto)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLChannel GetChannel(string username)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLChannel GetChannel(TLChatPhoto channelPhoto)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLChatBase GetChat(TLInt id)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLBroadcastChat GetBroadcast(TLInt id)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public IList<TLMessageBase> GetMessages()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public IList<TLMessageBase> GetSendingMessages()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public IList<TLMessageBase> GetResendingMessages()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void GetHistoryAsync(TLPeerBase peer, Action<IList<TLMessageBase>> callback, int limit = Constants.CachedMessagesCount)\r\n        {\r\n            callback.SafeInvoke(null);\r\n        }\r\n\r\n        public IList<TLMessageBase> GetHistory(TLPeerBase peer, int limit = Constants.CachedMessagesCount)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public IList<TLMessageBase> GetHistory(TLPeerBase peer, int maxId, int limit = Constants.CachedMessagesCount)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public IList<TLMessageBase> GetHistory(int dialogId)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public IList<TLDecryptedMessageBase> GetDecryptedHistory(int dialogId, int limit = Constants.CachedMessagesCount)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public IList<TLDecryptedMessageBase> GetDecryptedHistory(int dialogId, long randomId, int limit = Constants.CachedMessagesCount)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public IList<TLDecryptedMessageBase> GetUnreadDecryptedHistory(int dialogId)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void GetDialogsAsync(Action<IList<TLDialogBase>> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public IList<TLDialogBase> GetDialogs()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void GetContactsAsync(Action<IList<TLUserBase>> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public List<TLUserBase> GetContacts()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public List<TLUserBase> GetUsersForSearch(IList<TLDialogBase> nonCachedDialogs)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public List<TLUserBase> GetUsers()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public List<TLChatBase> GetChats()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void GetChatsAsync(Action<IList<TLChatBase>> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void ClearAsync(Action callback = null)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncMessage(TLMessageBase message, Action<TLMessageBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncMessage(TLMessageBase message, bool notifyNewDialog, bool notifyTopMessageUpdated, Action<TLMessageBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncEditedMessage(TLMessageBase message, bool notifyNewDialog, bool notifyTopMessageUpdated, Action<TLMessageBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncSendingMessage(TLMessageCommon message, TLMessageBase previousMessage, Action<TLMessageCommon> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncSendingMessages(IList<TLMessage> messages, TLMessageBase previousMessage, Action<IList<TLMessage>> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncSendingMessageId(TLLong randomId, TLInt id, Action<TLMessageCommon> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncPeerMessages(TLPeerBase peer, TLMessagesBase messages, bool notifyNewDialog, bool notifyTopMessageUpdated,\r\n            Action<TLMessagesBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void AddMessagesToContext(TLMessagesBase messages, Action<TLMessagesBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncDialogs(Stopwatch stopwatch, TLDialogsBase dialogs, Action<TLDialogsBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncChannelDialogs(TLDialogsBase dialogs, Action<TLDialogsBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void MergeMessagesAndChannels(TLDialogsBase dialogs)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncUser(TLUserBase user, Action<TLUserBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncUser(TLUserFull userFull, Action<TLUserFull> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncUsers(TLVector<TLUserBase> users, Action<TLVector<TLUserBase>> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void AddUsers(TLVector<TLUserBase> users, Action<TLVector<TLUserBase>> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncUsersAndChats(TLVector<TLUserBase> users, TLVector<TLChatBase> chats, Action<WindowsPhone.Tuple<TLVector<TLUserBase>, TLVector<TLChatBase>>> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncUserLink(TLLinkBase link, Action<TLLinkBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncContacts(TLContactsBase contacts, Action<TLContactsBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncContacts(TLImportedContacts contacts, Action<TLImportedContacts> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void ClearDialog(TLPeerBase peer)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void DeleteDialog(TLDialogBase dialog)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void DeleteMessages(TLVector<TLInt> ids)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void DeleteChannelMessages(TLInt channelId, TLVector<TLInt> ids)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void DeleteMessages(TLPeerBase peer, TLMessageBase lastItem, TLVector<TLInt> messages)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void DeleteMessages(TLVector<TLLong> ids)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void DeleteDecryptedMessages(TLVector<TLLong> ids)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void ClearDecryptedHistoryAsync(TLInt chatId)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void ClearBroadcastHistoryAsync(TLInt chatId)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncStatedMessage(TLStatedMessageBase statedMessage, Action<TLStatedMessageBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncStatedMessages(TLStatedMessagesBase statedMessages, Action<TLStatedMessagesBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        private TLCdnConfig _cdnConfig;\r\n\r\n        private readonly object _cdnConfigSyncRoot = new object();\r\n\r\n        public void GetCdnConfigAsync(Action<TLCdnConfig> callback)\r\n        {\r\n            if (_cdnConfig == null)\r\n            {\r\n                _cdnConfig = TLUtils.OpenObjectFromMTProtoFile<TLCdnConfig>(_cdnConfigSyncRoot, Constants.CdnConfigFileName);\r\n            }\r\n\r\n            callback.SafeInvoke(_cdnConfig);\r\n        }\r\n\r\n        public TLCdnConfig GetCdnConfig()\r\n        {\r\n            if (_cdnConfig == null)\r\n            {\r\n                _cdnConfig = TLUtils.OpenObjectFromMTProtoFile<TLCdnConfig>(_cdnConfigSyncRoot, Constants.CdnConfigFileName);\r\n            }\r\n\r\n            return _cdnConfig;\r\n        }\r\n\r\n        public void SetCdnCofig(TLCdnConfig cdnConfig)\r\n        {\r\n            _cdnConfig = cdnConfig;\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_cdnConfigSyncRoot, Constants.CdnConfigFileName, _cdnConfig);\r\n        }\r\n\r\n        private TLConfig _config;\r\n\r\n        public TLConfig GetConfig()\r\n        {\r\n#if SILVERLIGHT || WIN_RT\r\n            if (_config == null)\r\n            {\r\n                _config = SettingsHelper.GetValue(Constants.ConfigKey) as TLConfig;\r\n            }\r\n#endif\r\n            return _config;\r\n        }\r\n\r\n\r\n        public void GetConfigAsync(Action<TLConfig> callback)\r\n        {\r\n#if SILVERLIGHT || WIN_RT\r\n            if (_config == null)\r\n            {\r\n                _config = SettingsHelper.GetValue(Constants.ConfigKey) as TLConfig;\r\n            }\r\n#endif\r\n            callback.SafeInvoke(_config);\r\n        }\r\n\r\n        public void SetConfig(TLConfig config)\r\n        {\r\n            _config = config;\r\n#if SILVERLIGHT || WIN_RT\r\n            SettingsHelper.SetValue(Constants.ConfigKey, config);\r\n#endif\r\n        }\r\n\r\n        public void ClearConfigImportAsync()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncChat(TLMessagesChatFull messagesChatFull, Action<TLMessagesChatFull> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void AddChats(TLVector<TLChatBase> chats, Action<TLVector<TLChatBase>> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncBroadcast(TLBroadcastChat broadcast, Action<TLBroadcastChat> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLEncryptedChatBase GetEncryptedChat(TLInt id)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncEncryptedChat(TLEncryptedChatBase encryptedChat, Action<TLEncryptedChatBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncDecryptedMessage(TLDecryptedMessageBase message, TLEncryptedChatBase peer, Action<TLDecryptedMessageBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncDecryptedMessages(IList<WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>> tuples, TLEncryptedChatBase peer, Action<IList<WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>>> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncSendingDecryptedMessage(TLInt chatId, TLInt date, TLLong randomId, Action<TLDecryptedMessageBase> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void Init()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncDifference(TLDifference difference, Action<TLDifference> result, IList<ExceptionInfo> exceptions)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncDifferenceWithoutUsersAndChats(TLDifference difference, Action<TLDifference> result, IList<ExceptionInfo> exceptions)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void SyncStatuses(TLVector<TLContactStatusBase> contacts, Action<TLVector<TLContactStatusBase>> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void DeleteUser(TLInt id)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void DeleteChat(TLInt id)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void DeleteUserHistory(TLPeerChannel channel, TLPeerUser peer)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void UpdateDialogPinned(TLPeerBase peer, bool pinned)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void UpdatePinnedDialogs(TLVector<TLPeerBase> order)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void UpdateChannelAvailableMessages(TLInt channelId, TLInt availableMinId)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void UpdateDialogPromo(TLDialogBase dialogBase, bool promo)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public TLProxyDataBase GetProxyData()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void UpdateProxyData(TLProxyDataBase proxyData)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class InMemoryCacheService : ICacheService\r\n    {\r\n        private readonly object _databaseSyncRoot = new object();\r\n\r\n        private InMemoryDatabase _database;\r\n\r\n        private Context<TLUserBase> UsersContext\r\n        {\r\n            get { return _database != null ? _database.UsersContext : null; }\r\n        }\r\n\r\n        private Context<TLChatBase> ChatsContext\r\n        {\r\n            get { return _database != null ? _database.ChatsContext : null; }\r\n        }\r\n\r\n        private Context<TLBroadcastChat> BroadcastsContext\r\n        {\r\n            get { return _database != null ? _database.BroadcastsContext : null; }\r\n        }\r\n\r\n        private Context<TLEncryptedChatBase> EncryptedChatsContext\r\n        {\r\n            get { return _database != null ? _database.EncryptedChatsContext : null; }\r\n        }\r\n\r\n        private Context<TLMessageBase> MessagesContext\r\n        {\r\n            get { return _database != null ? _database.MessagesContext : null; }\r\n        }\r\n\r\n        private Context<Context<TLMessageBase>> ChannelsContext\r\n        {\r\n            get { return _database != null ? _database.ChannelsContext : null; }\r\n        }\r\n\r\n        private Context<TLDecryptedMessageBase> DecryptedMessagesContext\r\n        {\r\n            get { return _database != null ? _database.DecryptedMessagesContext : null; }\r\n        }\r\n\r\n        private Context<TLMessageBase> RandomMessagesContext\r\n        {\r\n            get { return _database != null ? _database.RandomMessagesContext : null; }\r\n        }\r\n\r\n        private Context<TLDialogBase> DialogsContext\r\n        {\r\n            get { return _database != null ? _database.DialogsContext : null; }\r\n        }\r\n\r\n        public void Init()\r\n        {\r\n            var stopwatch = Stopwatch.StartNew();\r\n\r\n            _database = new InMemoryDatabase(_eventAggregator);\r\n            _database.Open();\r\n\r\n            Debug.WriteLine(\"{0} {1}\", stopwatch.Elapsed, \"open database time\");\r\n        }\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        public static ICacheService Instance { get; protected set; }\r\n\r\n        public InMemoryCacheService(ITelegramEventAggregator eventAggregator)\r\n        {\r\n            _eventAggregator = eventAggregator;\r\n\r\n            Instance = this;\r\n        }\r\n\r\n        public IList<TLDialogBase> GetDialogs()\r\n        {\r\n            var result = new List<TLDialogBase>();\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (DialogsContext == null)\r\n            {\r\n\r\n                return result;\r\n            }\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            IList<TLDialogBase> dialogs = new List<TLDialogBase>();\r\n\r\n            try\r\n            {\r\n                dialogs = new List<TLDialogBase>(_database.Dialogs);\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteLine(e.ToString(), LogSeverity.Error);\r\n            }\r\n\r\n            TLUtils.WritePerformance(string.Format(\"GetCachedDialogs time ({0} from {1}): {2}\", dialogs.Count, _database.CountRecords<TLDialog>(), timer.Elapsed));\r\n            return dialogs.OrderByDescending(x => x.GetDateIndex()).ToList();\r\n        }\r\n\r\n\r\n        public void GetDialogsAsync(Action<IList<TLDialogBase>> callback)\r\n        {\r\n            Execute.BeginOnThreadPool(\r\n                () =>\r\n                {\r\n                    var result = new List<TLDialogBase>();\r\n\r\n                    if (_database == null) Init();\r\n\r\n                    if (DialogsContext == null)\r\n                    {\r\n                        callback(result);\r\n                        return;\r\n                    }\r\n                    var timer = Stopwatch.StartNew();\r\n\r\n                    IList<TLDialogBase> dialogs = new List<TLDialogBase>();\r\n\r\n                    try\r\n                    {\r\n                        dialogs = new List<TLDialogBase>(_database.Dialogs);\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                        TLUtils.WriteLine(e.ToString(), LogSeverity.Error);\r\n                    }\r\n\r\n                    TLUtils.WritePerformance(string.Format(\"GetCachedDialogs time ({0} from {1}): {2}\", dialogs.Count, _database.CountRecords<TLDialog>(), timer.Elapsed));\r\n                    callback(dialogs.OrderByDescending(x => x.GetDateIndex()).ToList());\r\n                });\r\n        }\r\n\r\n        public List<TLUserBase> GetUsers()\r\n        {\r\n            var result = new List<TLUserBase>();\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (UsersContext == null)\r\n            {\r\n                return result;\r\n            }\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var contacts = new List<TLUserBase>();\r\n\r\n            try\r\n            {\r\n                contacts = _database.UsersContext.Values.ToList();\r\n\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            TLUtils.WritePerformance(string.Format(\"GetCachedContacts time ({0} from {1}): {2}\", contacts.Count, _database.CountRecords<TLUserBase>(), timer.Elapsed));\r\n            return contacts;\r\n        }\r\n\r\n        public List<TLUserBase> GetContacts()\r\n        {\r\n            var result = new List<TLUserBase>();\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (UsersContext == null)\r\n            {\r\n                return result;\r\n            }\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var contacts = new List<TLUserBase>();\r\n\r\n            try\r\n            {\r\n                contacts = _database.UsersContext.Values.Where(x => x != null && (x.IsContact || x.IsSelf)).ToList();\r\n                //contacts = _database.UsersContext.Values.Where(x => x.Contact != null).ToList();\r\n\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            TLUtils.WritePerformance(string.Format(\"GetCachedContacts time ({0} from {1}): {2}\", contacts.Count, _database.CountRecords<TLUserBase>(), timer.Elapsed));\r\n            return contacts;\r\n        }\r\n\r\n        public List<TLUserBase> GetUsersForSearch(IList<TLDialogBase> nonCachedDialogs)\r\n        {\r\n            var result = new List<TLUserBase>();\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (UsersContext == null)\r\n            {\r\n                return result;\r\n            }\r\n\r\n            var contacts = new List<TLUserBase>();\r\n            try\r\n            {\r\n                var usersCache = new Dictionary<long, long>();\r\n\r\n                if (nonCachedDialogs != null)\r\n                {\r\n                    for (var i = 0; i < nonCachedDialogs.Count; i++)\r\n                    {\r\n                        var dialog = nonCachedDialogs[i] as TLDialog;\r\n                        if (dialog != null)\r\n                        {\r\n                            var user = nonCachedDialogs[i].With as TLUserBase;\r\n                            if (user != null)\r\n                            {\r\n                                if (!usersCache.ContainsKey(user.Index))\r\n                                {\r\n                                    usersCache[user.Index] = user.Index;\r\n                                    contacts.Add(user);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var dialogs = new List<TLDialogBase>(_database.Dialogs);\r\n\r\n                for (var i = 0; i < dialogs.Count; i++)\r\n                {\r\n                    var dialog = dialogs[i] as TLDialog;\r\n                    if (dialog != null)\r\n                    {\r\n                        var user = dialogs[i].With as TLUserBase;\r\n                        if (user != null)\r\n                        {\r\n                            if (!usersCache.ContainsKey(user.Index))\r\n                            {\r\n                                usersCache[user.Index] = user.Index;\r\n                                contacts.Add(user);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var unsortedContacts = _database.UsersContext.Values.Where(x => x != null && x.IsContact).ToList();\r\n                for (var i = 0; i < unsortedContacts.Count; i++)\r\n                {\r\n                    var user = unsortedContacts[i];\r\n                    if (!usersCache.ContainsKey(user.Index))\r\n                    {\r\n                        usersCache[user.Index] = user.Index;\r\n                        contacts.Add(user);\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            return contacts;\r\n        }\r\n\r\n        public void GetContactsAsync(Action<IList<TLUserBase>> callback)\r\n        {\r\n            Execute.BeginOnThreadPool(\r\n                () =>\r\n                {\r\n                    var result = new List<TLUserBase>();\r\n\r\n                    if (_database == null) Init();\r\n\r\n                    if (UsersContext == null)\r\n                    {\r\n                        callback(result);\r\n                        return;\r\n                    }\r\n                    var timer = Stopwatch.StartNew();\r\n\r\n                    IList<TLUserBase> contacts = new List<TLUserBase>();\r\n\r\n                    try\r\n                    {\r\n                        contacts = _database.UsersContext.Values.Where(x => x != null && x.IsContact).ToList();\r\n                        //contacts = _database.UsersContext.Values.Where(x => x.Contact != null).ToList();\r\n\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                        TLUtils.WriteException(e);\r\n                    }\r\n\r\n                    TLUtils.WritePerformance(string.Format(\"GetCachedContacts time ({0} from {1}): {2}\", contacts.Count, _database.CountRecords<TLUserBase>(), timer.Elapsed));\r\n                    callback(contacts);\r\n                });\r\n        }\r\n\r\n        public List<TLChatBase> GetChats()\r\n        {\r\n            var result = new List<TLChatBase>();\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (ChatsContext == null)\r\n            {\r\n                return result;\r\n            }\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            IList<TLChatBase> chats = new List<TLChatBase>();\r\n\r\n            try\r\n            {\r\n                result = _database.ChatsContext.Values.ToList();\r\n\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            TLUtils.WritePerformance(string.Format(\"GetCachedChats time ({0} from {1}): {2}\", chats.Count, _database.CountRecords<TLChatBase>(), timer.Elapsed));\r\n\r\n            return result;\r\n        }\r\n\r\n        public void GetChatsAsync(Action<IList<TLChatBase>> callback)\r\n        {\r\n            Execute.BeginOnThreadPool(\r\n                () =>\r\n                {\r\n                    var result = new List<TLChatBase>();\r\n\r\n                    if (_database == null) Init();\r\n\r\n                    if (ChatsContext == null)\r\n                    {\r\n                        callback(result);\r\n                        return;\r\n                    }\r\n                    var timer = Stopwatch.StartNew();\r\n\r\n                    IList<TLChatBase> chats = new List<TLChatBase>();\r\n\r\n                    try\r\n                    {\r\n                        chats = _database.ChatsContext.Values.ToList();\r\n\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                        TLUtils.WriteException(e);\r\n                    }\r\n\r\n                    TLUtils.WritePerformance(string.Format(\"GetCachedChats time ({0} from {1}): {2}\", chats.Count, _database.CountRecords<TLChatBase>(), timer.Elapsed));\r\n                    callback(chats);\r\n                });\r\n        }\r\n\r\n        public TLChatBase GetChat(TLInt id)\r\n        {\r\n            if (_database == null)\r\n            {\r\n                Init();\r\n            }\r\n\r\n            return ChatsContext[id.Value];\r\n        }\r\n\r\n        public TLBroadcastChat GetBroadcast(TLInt id)\r\n        {\r\n            if (_database == null)\r\n            {\r\n                Init();\r\n            }\r\n\r\n            return BroadcastsContext[id.Value];\r\n        }\r\n\r\n        public TLEncryptedChatBase GetEncryptedChat(TLInt id)\r\n        {\r\n            if (_database == null)\r\n            {\r\n                Init();\r\n            }\r\n\r\n            return EncryptedChatsContext[id.Value];\r\n        }\r\n\r\n        public TLUserBase GetUser(TLInt id)\r\n        {\r\n            if (_database == null)\r\n            {\r\n                Init();\r\n            }\r\n\r\n            return UsersContext[id.Value];\r\n        }\r\n\r\n        public TLUserBase GetUser(TLUserProfilePhoto photo)\r\n        {\r\n            var usersShapshort = new List<TLUserBase>(UsersContext.Values);\r\n\r\n            return usersShapshort.FirstOrDefault(x => x.Photo == photo);\r\n        }\r\n\r\n        public TLUserBase GetUser(string username)\r\n        {\r\n            var usersShapshort = new List<TLUserBase>(UsersContext.Values);\r\n\r\n            return usersShapshort.FirstOrDefault(x => x is IUserName && ((IUserName)x).UserName != null && string.Equals(((IUserName)x).UserName.ToString(), username, StringComparison.OrdinalIgnoreCase));\r\n        }\r\n\r\n        public TLMessageBase GetMessage(TLInt id, TLInt channelId = null)\r\n        {\r\n            if (channelId != null)\r\n            {\r\n                var channelContext = ChannelsContext[channelId.Value];\r\n                if (channelContext != null)\r\n                {\r\n                    return channelContext[id.Value];\r\n                }\r\n\r\n                return null;\r\n            }\r\n\r\n            return MessagesContext[id.Value];\r\n        }\r\n\r\n        public TLMessageBase GetMessage(TLLong randomId)\r\n        {\r\n            return RandomMessagesContext[randomId.Value];\r\n        }\r\n\r\n        public TLMessageBase GetMessage(TLWebPageBase webPageBase)\r\n        {\r\n            var m = MessagesContext.Values.FirstOrDefault(x =>\r\n            {\r\n                var message = x as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    var webPageMedia = message.Media as TLMessageMediaWebPage;\r\n                    if (webPageMedia != null)\r\n                    {\r\n                        var currentWebPage = webPageMedia.WebPage;\r\n                        if (currentWebPage != null\r\n                            && currentWebPage.Id.Value == webPageBase.Id.Value)\r\n                        {\r\n                            return true;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            });\r\n\r\n            if (m != null) return m;\r\n\r\n            foreach (var channelContext in ChannelsContext.Values)\r\n            {\r\n                foreach (var x in channelContext.Values)\r\n                {\r\n                    var message = x as TLMessage;\r\n                    if (message != null)\r\n                    {\r\n                        var webPageMedia = message.Media as TLMessageMediaWebPage;\r\n                        if (webPageMedia != null)\r\n                        {\r\n                            var currentWebPage = webPageMedia.WebPage;\r\n                            if (currentWebPage != null\r\n                                && currentWebPage.Id.Value == webPageBase.Id.Value)\r\n                            {\r\n                                m = message;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (m != null) return m;\r\n\r\n            m = RandomMessagesContext.Values.FirstOrDefault(x =>\r\n            {\r\n                var message = x as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    var webPageMedia = message.Media as TLMessageMediaWebPage;\r\n                    if (webPageMedia != null)\r\n                    {\r\n                        var currentWebPage = webPageMedia.WebPage;\r\n                        if (currentWebPage != null\r\n                            && currentWebPage.Id.Value == webPageBase.Id.Value)\r\n                        {\r\n                            return true;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            });\r\n\r\n            return m;\r\n        }\r\n\r\n        public TLDialog GetDialog(TLMessageCommon message)\r\n        {\r\n            TLPeerBase peer;\r\n            if (message.ToId is TLPeerChat)\r\n            {\r\n                peer = message.ToId;\r\n            }\r\n            else\r\n            {\r\n                peer = message.Out.Value ? message.ToId : new TLPeerUser { Id = message.FromId };\r\n            }\r\n            return GetDialog(peer);\r\n        }\r\n\r\n        public TLDialog GetDialog(TLPeerBase peer)\r\n        {\r\n            return _database.GetDialog(peer) as TLDialog;\r\n\r\n            //return _database.Dialogs.OfType<TLDialog>().FirstOrDefault(x => x.WithId == peer.Id.Value && x.IsChat == peer is TLPeerChat);\r\n        }\r\n\r\n        public TLDialogBase GetEncryptedDialog(TLInt chatId)\r\n        {\r\n            return _database.Dialogs.OfType<TLEncryptedDialog>().FirstOrDefault(x => x.Index == chatId.Value);\r\n        }\r\n\r\n        public TLChat GetChat(TLChatPhoto chatPhoto)\r\n        {\r\n            return _database.ChatsContext.Values.FirstOrDefault(x => x is TLChat && ((TLChat)x).Photo == chatPhoto) as TLChat;\r\n        }\r\n\r\n        public TLChannel GetChannel(string username)\r\n        {\r\n            var chatsSnapshort = new List<TLChatBase>(_database.ChatsContext.Values);\r\n\r\n            return chatsSnapshort.FirstOrDefault(x => x is TLChannel && ((TLChannel)x).UserName != null && string.Equals(((TLChannel)x).UserName.ToString(), username, StringComparison.OrdinalIgnoreCase)) as TLChannel;\r\n        }\r\n\r\n        public TLChannel GetChannel(TLChatPhoto chatPhoto)\r\n        {\r\n            var chatsSnapshort = new List<TLChatBase>(_database.ChatsContext.Values);\r\n\r\n            return chatsSnapshort.FirstOrDefault(x => x is TLChannel && ((TLChannel)x).Photo == chatPhoto) as TLChannel;\r\n        }\r\n\r\n        public IList<TLMessageBase> GetHistory(int dialogIndex)\r\n        {\r\n            var result = new List<TLMessageBase>();\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (DecryptedMessagesContext == null || DialogsContext == null)\r\n            {\r\n                return result;\r\n            }\r\n            var timer = Stopwatch.StartNew();\r\n\r\n\r\n            IList<TLMessageBase> msgs = new List<TLMessageBase>();\r\n            try\r\n            {\r\n                var dialog = DialogsContext[dialogIndex] as TLDialog;\r\n\r\n                if (dialog != null)\r\n                {\r\n                    msgs = dialog.Messages\r\n                        .OfType<TLMessageCommon>()\r\n                        //.Where(x =>\r\n\r\n                            //x.FromId.Value == currentUserId.Value && x.ToId.Id.Value == peer.Id.Value           // to peer from current\r\n                        //|| x.FromId.Value == peer.Id.Value && x.ToId.Id.Value == currentUserId.Value) // from peer to current\r\n\r\n                            .Cast<TLMessageBase>()\r\n                            .ToList();\r\n                }\r\n\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            //TLUtils.WritePerformance(string.Format(\"GetCachedHistory time ({0}): {1}\", _database.CountRecords<TLMessageBase>(), timer.Elapsed));\r\n            return msgs.Take(Constants.CachedMessagesCount).ToList();\r\n        }\r\n\r\n        public TLDecryptedMessageBase GetDecryptedMessage(TLInt chatId, TLLong randomId)\r\n        {\r\n            TLDecryptedMessageBase result = null;\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (MessagesContext == null || DialogsContext == null)\r\n            {\r\n                return result;\r\n            }\r\n\r\n            IList<TLDecryptedMessageBase> msgs = new List<TLDecryptedMessageBase>();\r\n            try\r\n            {\r\n                var dialog = DialogsContext[chatId.Value] as TLEncryptedDialog;\r\n\r\n                if (dialog != null)\r\n                {\r\n                    msgs = dialog.Messages.ToList();\r\n                    foreach (var message in msgs)\r\n                    {\r\n                        if (message.RandomIndex == randomId.Value)\r\n                        {\r\n                            return message;\r\n                        }\r\n                    }\r\n                }\r\n\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public IList<TLDecryptedMessageBase> GetDecryptedHistory(int dialogIndex, int limit = Constants.CachedMessagesCount)\r\n        {\r\n            var result = new List<TLDecryptedMessageBase>();\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (MessagesContext == null || DialogsContext == null)\r\n            {\r\n                return result;\r\n            }\r\n\r\n            IList<TLDecryptedMessageBase> msgs = new List<TLDecryptedMessageBase>();\r\n            try\r\n            {\r\n                var dialog = DialogsContext[dialogIndex] as TLEncryptedDialog;\r\n\r\n                if (dialog != null)\r\n                {\r\n                    msgs = dialog.Messages.ToList();\r\n                }\r\n\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            var returnedMessages = new List<TLDecryptedMessageBase>();\r\n            var count = 0;\r\n            for (var i = 0; i < msgs.Count && count < limit; i++)\r\n            {\r\n                returnedMessages.Add(msgs[i]);\r\n                if (TLUtils.IsDisplayedDecryptedMessage(msgs[i]))\r\n                {\r\n                    count++;\r\n                }\r\n            }\r\n\r\n            return returnedMessages;\r\n        }\r\n\r\n        public IList<TLDecryptedMessageBase> GetUnreadDecryptedHistory(int dialogIndex)\r\n        {\r\n            var result = new List<TLDecryptedMessageBase>();\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (MessagesContext == null || DialogsContext == null)\r\n            {\r\n                return result;\r\n            }\r\n\r\n            IList<TLDecryptedMessageBase> msgs = new List<TLDecryptedMessageBase>();\r\n            try\r\n            {\r\n                var dialog = DialogsContext[dialogIndex] as TLEncryptedDialog;\r\n\r\n                if (dialog != null)\r\n                {\r\n                    msgs = dialog.Messages.ToList();\r\n                }\r\n\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            var returnedMessages = new List<TLDecryptedMessageBase>();\r\n            for (var i = 0; i < msgs.Count; i++)\r\n            {\r\n                if (!msgs[i].Out.Value && msgs[i].Unread.Value)\r\n                {\r\n                    returnedMessages.Add(msgs[i]);\r\n                }\r\n            }\r\n\r\n            return returnedMessages;\r\n        }\r\n\r\n        public IList<TLDecryptedMessageBase> GetDecryptedHistory(int dialogIndex, long randomId, int limit = Constants.CachedMessagesCount)\r\n        {\r\n            var result = new List<TLDecryptedMessageBase>();\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (MessagesContext == null || DialogsContext == null)\r\n            {\r\n                return result;\r\n            }\r\n\r\n            IList<TLDecryptedMessageBase> msgs = new List<TLDecryptedMessageBase>();\r\n            try\r\n            {\r\n                var dialog = DialogsContext[dialogIndex] as TLEncryptedDialog;\r\n\r\n                if (dialog != null)\r\n                {\r\n                    msgs = dialog.Messages.ToList();\r\n                }\r\n\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            var skipCount = 0;\r\n            if (randomId != 0)\r\n            {\r\n                skipCount = 1;\r\n                for (var i = 0; i < msgs.Count; i++)\r\n                {\r\n                    if (msgs[i].RandomIndex != randomId)\r\n                    {\r\n                        skipCount++;\r\n                    }\r\n                    else\r\n                    {\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var returnedMessages = new List<TLDecryptedMessageBase>();\r\n            var count = 0;\r\n            for (var i = skipCount; i < msgs.Count && count < limit; i++)\r\n            {\r\n                returnedMessages.Add(msgs[i]);\r\n                if (TLUtils.IsDisplayedDecryptedMessage(msgs[i]))\r\n                {\r\n                    count++;\r\n                }\r\n            }\r\n\r\n            return returnedMessages;\r\n        }\r\n\r\n        public IList<TLMessageBase> GetHistory(TLPeerBase peer, int maxId, int limit = Constants.CachedMessagesCount)\r\n        {\r\n            var result = new List<TLMessageBase>();\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (MessagesContext == null)\r\n            {\r\n                return result;\r\n            }\r\n\r\n            IList<TLMessageBase> msgs = new List<TLMessageBase>();\r\n            try\r\n            {\r\n                var withId = peer.Id.Value;\r\n                var dialogBase = _database.Dialogs.FirstOrDefault(x => x.WithId == withId && peer.GetType() == x.Peer.GetType());\r\n\r\n                var dialog = dialogBase as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    msgs = dialog.Messages\r\n                        .OfType<TLMessageCommon>()\r\n                        .Cast<TLMessageBase>()\r\n                        .ToList();\r\n                }\r\n\r\n                var broadcast = dialogBase as TLBroadcastDialog;\r\n                if (broadcast != null)\r\n                {\r\n                    msgs = broadcast.Messages\r\n                        .OfType<TLMessageCommon>()\r\n                        .Cast<TLMessageBase>()\r\n                        .ToList();\r\n                }\r\n\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            var count = 0;\r\n            var startPosition = -1;\r\n            var resultMsgs = new List<TLMessageBase>();\r\n            for (var i = 0; i < msgs.Count && count < limit; i++)\r\n            {\r\n                var msg = msgs[i];\r\n                if (startPosition == -1)\r\n                {\r\n                    if (msg.Index == 0 || msg.Index > maxId)\r\n                    {\r\n                        continue;\r\n                    }\r\n\r\n                    if (msg.Index == maxId)\r\n                    {\r\n                        startPosition = i;\r\n                    }\r\n\r\n                    if (msg.Index < maxId)\r\n                    {\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                resultMsgs.Add(msg);\r\n                count++;\r\n            }\r\n\r\n            return resultMsgs;\r\n        }\r\n\r\n        public IList<TLMessageBase> GetHistory(TLPeerBase peer, int limit = Constants.CachedMessagesCount)\r\n        {\r\n            var result = new List<TLMessageBase>();\r\n\r\n            if (_database == null) Init();\r\n\r\n            if (MessagesContext == null)\r\n            {\r\n                return result;\r\n            }\r\n            var timer = Stopwatch.StartNew();\r\n\r\n\r\n            IList<TLMessageBase> msgs = new List<TLMessageBase>();\r\n            try\r\n            {\r\n                var withId = peer.Id.Value;\r\n                var dialogBase = _database.Dialogs.FirstOrDefault(x => x.WithId == withId && peer.GetType() == x.Peer.GetType());\r\n\r\n                var dialog = dialogBase as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    msgs = dialog.Messages\r\n                        .OfType<TLMessageCommon>()\r\n                        //.Where(x =>\r\n\r\n                            //x.FromId.Value == currentUserId.Value && x.ToId.Id.Value == peer.Id.Value           // to peer from current\r\n                        //|| x.FromId.Value == peer.Id.Value && x.ToId.Id.Value == currentUserId.Value) // from peer to current\r\n\r\n                            .Cast<TLMessageBase>()\r\n                            .ToList();\r\n                }\r\n\r\n                var broadcast = dialogBase as TLBroadcastDialog;\r\n                if (broadcast != null)\r\n                {\r\n                    msgs = broadcast.Messages\r\n                        .OfType<TLMessageCommon>()\r\n                        //.Where(x =>\r\n\r\n                            //x.FromId.Value == currentUserId.Value && x.ToId.Id.Value == peer.Id.Value           // to peer from current\r\n                        //|| x.FromId.Value == peer.Id.Value && x.ToId.Id.Value == currentUserId.Value) // from peer to current\r\n\r\n                            .Cast<TLMessageBase>()\r\n                            .ToList();\r\n                }\r\n\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR:\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            // TLUtils.WritePerformance(string.Format(\"GetCachedHistory time ({0}): {1}\", _database.CountRecords<TLMessageBase>(), timer.Elapsed));\r\n            return msgs.Take(limit).ToList();\r\n        }\r\n\r\n        public void GetHistoryAsync(TLPeerBase peer, Action<IList<TLMessageBase>> callback, int limit = Constants.CachedMessagesCount)\r\n        {\r\n            Execute.BeginOnThreadPool(\r\n                () =>\r\n                {\r\n                    var history = GetHistory(peer, limit);\r\n                    callback.SafeInvoke(history);\r\n                });\r\n        }\r\n\r\n        public void ClearAsync(Action callback = null)\r\n        {\r\n            Execute.BeginOnThreadPool(\r\n                () =>\r\n                {\r\n                    lock (_databaseSyncRoot)\r\n                    {\r\n                        if (_database != null) _database.Clear();\r\n                    }\r\n                    callback.SafeInvoke();\r\n                });\r\n        }\r\n\r\n        #region Messages\r\n\r\n        private TLMessageBase GetCachedMessage(TLMessageBase message)\r\n        {\r\n            TLPeerChannel peerChannel;\r\n            var isChannelMessage = TLUtils.IsChannelMessage(message, out peerChannel);\r\n            if (isChannelMessage)\r\n            {\r\n                if (message.Index != 0 && ChannelsContext != null && ChannelsContext.ContainsKey(peerChannel.Id.Value))\r\n                {\r\n                    var channelContext = ChannelsContext[peerChannel.Id.Value];\r\n                    if (channelContext != null)\r\n                    {\r\n                        return channelContext[message.Index];\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n\r\n            if (message.Index != 0 && MessagesContext != null && MessagesContext.ContainsKey(message.Index))\r\n            {\r\n                return MessagesContext[message.Index];\r\n            }\r\n\r\n            if (message.RandomIndex != 0 && RandomMessagesContext != null && RandomMessagesContext.ContainsKey(message.RandomIndex))\r\n            {\r\n                return RandomMessagesContext[message.RandomIndex];\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private TLDecryptedMessageBase GetCachedDecryptedMessage(TLLong randomId)\r\n        {\r\n            if (randomId != null && DecryptedMessagesContext != null && DecryptedMessagesContext.ContainsKey(randomId.Value))\r\n            {\r\n                return DecryptedMessagesContext[randomId.Value];\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private TLDecryptedMessageBase GetCachedDecryptedMessage(TLDecryptedMessageBase message)\r\n        {\r\n            if (message.RandomId != null && DecryptedMessagesContext != null && DecryptedMessagesContext.ContainsKey(message.RandomIndex))\r\n            {\r\n                return DecryptedMessagesContext[message.RandomIndex];\r\n            }\r\n\r\n            //if (message.RandomIndex != 0 && RandomMessagesContext != null && RandomMessagesContext.ContainsKey(message.RandomIndex))\r\n            //{\r\n            //    return RandomMessagesContext[message.RandomIndex];\r\n            //}\r\n\r\n\r\n            return null;\r\n        }\r\n\r\n        public void SyncSendingMessages(IList<TLMessage> messages, TLMessageBase previousMessage, Action<IList<TLMessage>> callback)\r\n        {\r\n            if (messages == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            var message73 = previousMessage as TLMessage73;\r\n            if (message73 != null)\r\n            {\r\n                var mediaGroup = message73.Media as TLMessageMediaGroup;\r\n                if (mediaGroup != null)\r\n                {\r\n                    previousMessage = mediaGroup.Group.LastOrDefault();\r\n                }\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = new List<TLMessage>();\r\n            if (_database == null) Init();\r\n\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                var message = messages[i];\r\n                var cachedMessage = GetCachedMessage(message) as TLMessage;\r\n\r\n                if (cachedMessage != null)\r\n                {\r\n                    _database.UpdateSendingMessage(message, cachedMessage);\r\n                    result.Add(cachedMessage);\r\n                }\r\n                else\r\n                {\r\n                    var previousMsg = i == 0 ? previousMessage : messages[i - 1];\r\n                    var isLastMsg = i == messages.Count - 1;\r\n                    _database.AddSendingMessage(message, previousMsg, isLastMsg, isLastMsg);\r\n                    result.Add(message);\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncSendingMessages time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncSendingMessageId(TLLong randomId, TLInt id, Action<TLMessageCommon> callback)\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            TLMessage result = null;\r\n            if (_database == null) Init();\r\n\r\n            var cachedMessage = GetMessage(randomId) as TLMessage;\r\n            if (cachedMessage != null)\r\n            {\r\n                cachedMessage.Id = id;\r\n                _database.UpdateSendingMessageContext(cachedMessage);\r\n                result = cachedMessage;\r\n\r\n                // send at background task and GetDialogs was invoked before getDifference\r\n                // remove duplicates\r\n                var dialog = GetDialog(cachedMessage);\r\n                if (dialog != null)\r\n                {\r\n                    lock (dialog.MessagesSyncRoot)\r\n                    {\r\n                        var count = 0;\r\n                        for (int i = 0; i < dialog.Messages.Count; i++)\r\n                        {\r\n                            if (dialog.Messages[i].Index == id.Value)\r\n                            {\r\n                                count++;\r\n\r\n                                if (count > 1)\r\n                                {\r\n                                    dialog.Messages.RemoveAt(i--);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncSendingMessageId time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncSendingMessage(TLMessageCommon message, TLMessageBase previousMessage, Action<TLMessageCommon> callback)\r\n        {\r\n            if (message == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            var message73 = previousMessage as TLMessage73;\r\n            if (message73 != null)\r\n            {\r\n                var mediaGroup = message73.Media as TLMessageMediaGroup;\r\n                if (mediaGroup != null)\r\n                {\r\n                    previousMessage = mediaGroup.Group.LastOrDefault();\r\n                }\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = message;\r\n            if (_database == null) Init();\r\n\r\n            var cachedMessage = GetCachedMessage(message);\r\n\r\n            if (cachedMessage != null)\r\n            {\r\n                _database.UpdateSendingMessage(message, cachedMessage);\r\n                result = (TLMessage)cachedMessage;\r\n            }\r\n            else\r\n            {\r\n                _database.AddSendingMessage(message, previousMessage);\r\n\r\n                // forwarding\r\n                var messagesContainer = message.Reply as TLMessagesContainter;\r\n                if (messagesContainer != null)\r\n                {\r\n                    var messages = messagesContainer.FwdMessages;\r\n                    if (messages != null)\r\n                    {\r\n                        for (var i = 0; i < messages.Count; i++)\r\n                        {\r\n                            var fwdMessage = messages[i];\r\n                            var previousMsg = i == 0 ? message : messages[i - 1];\r\n                            var isLastMsg = i == messages.Count - 1;\r\n                            _database.AddSendingMessage(fwdMessage, previousMsg, isLastMsg, isLastMsg);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncSendingMessage time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncSendingDecryptedMessage(TLInt chatId, TLInt date, TLLong randomId, Action<TLDecryptedMessageBase> callback)\r\n        {\r\n            TLDecryptedMessageBase result = null;\r\n            if (_database == null) Init();\r\n\r\n            if (DecryptedMessagesContext != null)\r\n            {\r\n                result = GetCachedDecryptedMessage(randomId);\r\n            }\r\n\r\n            if (result == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            _database.UpdateSendingDecryptedMessage(chatId, date, result);\r\n\r\n            _database.Commit();\r\n\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncDecryptedMessages(IList<WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>> tuples, TLEncryptedChatBase peer, Action<IList<WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>>> callback)\r\n        {\r\n            if (tuples == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = tuples;\r\n            if (_database == null) Init();\r\n\r\n            foreach (var tuple in tuples)\r\n            {\r\n                TLDecryptedMessageBase cachedMessage = null;\r\n\r\n                if (DecryptedMessagesContext != null)\r\n                {\r\n                    cachedMessage = GetCachedDecryptedMessage(tuple.Item1);\r\n                }\r\n\r\n                if (cachedMessage != null)\r\n                {\r\n                    // update fields\r\n                    if (tuple.Item1.GetType() == cachedMessage.GetType())\r\n                    {\r\n                        cachedMessage.Update(tuple.Item1);\r\n                    }\r\n\r\n                    tuple.Item1 = cachedMessage;\r\n                }\r\n                else\r\n                {\r\n                    // add object to cache\r\n                    _database.AddDecryptedMessage(tuple.Item1, peer);\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"Sync DecryptedMessage time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncDecryptedMessage(TLDecryptedMessageBase message, TLEncryptedChatBase peer, Action<TLDecryptedMessageBase> callback)\r\n        {\r\n            if (message == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = message;\r\n            if (_database == null) Init();\r\n\r\n            TLDecryptedMessageBase cachedMessage = null;\r\n\r\n            if (DecryptedMessagesContext != null)\r\n            {\r\n                cachedMessage = GetCachedDecryptedMessage(message);\r\n            }\r\n\r\n            if (cachedMessage != null)\r\n            {\r\n                // update fields\r\n                if (message.GetType() == cachedMessage.GetType())\r\n                {\r\n                    cachedMessage.Update(message);\r\n                }\r\n\r\n                result = cachedMessage;\r\n            }\r\n            else\r\n            {\r\n                // add object to cache\r\n                _database.AddDecryptedMessage(message, peer);\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"Sync DecryptedMessage time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public ExceptionInfo LastSyncMessageException { get; set; }\r\n\r\n        public void SyncMessage(TLMessageBase message, Action<TLMessageBase> callback)\r\n        {\r\n            SyncMessage(message, true, true, callback);\r\n        }\r\n\r\n        public void SyncEditedMessage(TLMessageBase message, bool notifyNewDialog, bool notifyTopMessageUpdated, Action<TLMessageBase> callback)\r\n        {\r\n            try\r\n            {\r\n                if (message == null)\r\n                {\r\n                    callback(null);\r\n                    return;\r\n                }\r\n\r\n                var result = message;\r\n                if (_database == null) Init();\r\n\r\n                var cachedMessage = GetCachedMessage(message);\r\n\r\n                if (cachedMessage != null)\r\n                {\r\n                    if (cachedMessage.RandomId != null)\r\n                    {\r\n                        _database.RemoveMessageFromContext(cachedMessage);\r\n\r\n                        if (cachedMessage.Index != 0)\r\n                        {\r\n                            cachedMessage.RandomId = null;\r\n                        }\r\n\r\n                        _database.AddMessageToContext(cachedMessage);\r\n                    }\r\n\r\n                    if (message.GetType() == cachedMessage.GetType())\r\n                    {\r\n                        cachedMessage.Edit(message);\r\n                    }\r\n                    else\r\n                    {\r\n                        _database.RemoveMessageFromContext(cachedMessage);\r\n                        _database.AddMessage(message, notifyNewDialog, notifyTopMessageUpdated);\r\n                    }\r\n                    result = cachedMessage;\r\n                }\r\n\r\n                _database.Commit();\r\n                callback(result);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                LastSyncMessageException = new ExceptionInfo\r\n                {\r\n                    Caption = \"CacheService.SyncMessage\",\r\n                    Exception = ex,\r\n                    Timestamp = DateTime.Now\r\n                };\r\n\r\n                TLUtils.WriteException(\"CacheService.SyncMessage\", ex);\r\n            }\r\n        }\r\n\r\n        public void SyncMessage(TLMessageBase message, bool notifyNewDialog, bool notifyTopMessageUpdated, Action<TLMessageBase> callback)\r\n        {\r\n            try\r\n            {\r\n                if (message == null)\r\n                {\r\n                    callback(null);\r\n                    return;\r\n                }\r\n\r\n                var result = message;\r\n                if (_database == null) Init();\r\n\r\n                var cachedMessage = GetCachedMessage(message);\r\n\r\n                if (cachedMessage != null)\r\n                {\r\n                    if (cachedMessage.RandomId != null)\r\n                    {\r\n                        _database.RemoveMessageFromContext(cachedMessage);\r\n\r\n                        if (cachedMessage.Index != 0)\r\n                        {\r\n                            cachedMessage.RandomId = null;\r\n                        }\r\n\r\n                        _database.AddMessageToContext(cachedMessage);\r\n                    }\r\n\r\n                    if (message.GetType() == cachedMessage.GetType())\r\n                    {\r\n                        cachedMessage.Update(message);\r\n                    }\r\n                    else\r\n                    {\r\n                        _database.DeleteMessage(cachedMessage);\r\n                        _database.AddMessage(message, notifyNewDialog, notifyTopMessageUpdated);\r\n                    }\r\n                    result = cachedMessage;\r\n                }\r\n                else\r\n                {\r\n                    try\r\n                    {\r\n                        _database.AddMessage(message, notifyNewDialog, notifyTopMessageUpdated);\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        LastSyncMessageException = new ExceptionInfo { Exception = ex, Timestamp = DateTime.Now };\r\n                        Helpers.Execute.ShowDebugMessage(\"SyncMessage ex:\\n\" + ex);\r\n                    }\r\n                }\r\n\r\n                _database.Commit();\r\n                callback(result);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                LastSyncMessageException = new ExceptionInfo\r\n                {\r\n                    Caption = \"CacheService.SyncMessage\",\r\n                    Exception = ex,\r\n                    Timestamp = DateTime.Now\r\n                };\r\n\r\n                TLUtils.WriteException(\"CacheService.SyncMessage\", ex);\r\n            }\r\n        }\r\n\r\n        public void SyncPeerMessages(TLPeerBase peer, TLMessagesBase messages, bool notifyNewDialog, bool notifyTopMessageUpdated, Action<TLMessagesBase> callback)\r\n        {\r\n            if (messages == null)\r\n            {\r\n                callback(new TLMessages());\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = messages.GetEmptyObject();\r\n            if (_database == null) Init();\r\n\r\n            ProcessPeerReading(peer, messages);\r\n\r\n            SyncChatsInternal(messages.Chats, result.Chats);\r\n            SyncUsersInternal(messages.Users, result.Users);\r\n            SyncMessagesInternal(peer, messages.Messages, result.Messages, notifyNewDialog, notifyTopMessageUpdated);\r\n\r\n            _database.Commit();\r\n\r\n            //TLUtils.WritePerformance(\"SyncPeerMessages time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        private void ProcessPeerReading(TLPeerBase peer, TLMessagesBase messages)\r\n        {\r\n            IReadMaxId readMaxId = null;\r\n            if (peer is TLPeerUser)\r\n            {\r\n                readMaxId = GetUser(peer.Id) as IReadMaxId;\r\n            }\r\n            else if (peer is TLPeerChat)\r\n            {\r\n                readMaxId = GetChat(peer.Id) as IReadMaxId;\r\n            }\r\n            else if (peer is TLPeerChannel)\r\n            {\r\n                readMaxId = GetChat(peer.Id) as IReadMaxId;\r\n            }\r\n\r\n            if (readMaxId != null)\r\n            {\r\n                foreach (var message in messages.Messages)\r\n                {\r\n                    var messageCommon = message as TLMessageCommon;\r\n                    if (messageCommon != null)\r\n                    {\r\n                        if (messageCommon.Out.Value\r\n                            && readMaxId.ReadOutboxMaxId != null\r\n                            && readMaxId.ReadOutboxMaxId.Value >= 0\r\n                            && readMaxId.ReadOutboxMaxId.Value < messageCommon.Index)\r\n                        {\r\n                            messageCommon.SetUnreadSilent(TLBool.True);\r\n                        }\r\n                        else if (!messageCommon.Out.Value\r\n                            && readMaxId.ReadInboxMaxId != null\r\n                            && readMaxId.ReadInboxMaxId.Value >= 0\r\n                            && readMaxId.ReadInboxMaxId.Value < messageCommon.Index)\r\n                        {\r\n                            messageCommon.SetUnreadSilent(TLBool.True);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void AddMessagesToContext(TLMessagesBase messages, Action<TLMessagesBase> callback)\r\n        {\r\n            if (messages == null)\r\n            {\r\n                callback(new TLMessages());\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = messages.GetEmptyObject();\r\n            if (_database == null) Init();\r\n\r\n            SyncChatsInternal(messages.Chats, result.Chats);\r\n            SyncUsersInternal(messages.Users, result.Users);\r\n            foreach (var message in messages.Messages)\r\n            {\r\n                if (GetCachedMessage(message) == null)\r\n                {\r\n                    _database.AddMessageToContext(message);\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n            //TLUtils.WritePerformance(\"SyncPeerMessages time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncStatuses(TLVector<TLContactStatusBase> contactStatuses, Action<TLVector<TLContactStatusBase>> callback)\r\n        {\r\n            if (contactStatuses == null)\r\n            {\r\n                callback(new TLVector<TLContactStatusBase>());\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = contactStatuses;\r\n            if (_database == null) Init();\r\n\r\n            foreach (var contactStatus in contactStatuses)\r\n            {\r\n                var contactStatus19 = contactStatus as TLContactStatus19;\r\n                if (contactStatus19 != null)\r\n                {\r\n                    var userId = contactStatus.UserId;\r\n                    var user = GetUser(userId);\r\n                    if (user != null)\r\n                    {\r\n                        user._status = contactStatus19.Status;\r\n                    }\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n            //TLUtils.WritePerformance(\"SyncPeerMessages time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncDifference(TLDifference difference, Action<TLDifference> callback, IList<ExceptionInfo> exceptions)\r\n        {\r\n            if (difference == null)\r\n            {\r\n                callback(new TLDifference());\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = (TLDifference)difference.GetEmptyObject();\r\n            if (_database == null) Init();\r\n\r\n            SyncChatsInternal(difference.Chats, result.Chats, exceptions);\r\n            SyncUsersInternal(difference.Users, result.Users, exceptions);\r\n            SyncMessagesInternal(null, difference.NewMessages, result.NewMessages, false, false, exceptions);\r\n            SyncEncryptedMessagesInternal(difference.State.Qts, difference.NewEncryptedMessages, result.NewEncryptedMessages, exceptions);\r\n\r\n            _database.Commit();\r\n\r\n            //TLUtils.WritePerformance(\"Sync difference time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncDifferenceWithoutUsersAndChats(TLDifference difference, Action<TLDifference> callback, IList<ExceptionInfo> exceptions)\r\n        {\r\n            if (difference == null)\r\n            {\r\n                callback(new TLDifference());\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = (TLDifference)difference.GetEmptyObject();\r\n            if (_database == null) Init();\r\n\r\n            //SyncChatsInternal(difference.Chats, result.Chats, exceptions);\r\n            //SyncUsersInternal(difference.Users, result.Users, exceptions);\r\n\r\n            foreach (var messageBase in difference.NewMessages)\r\n            {\r\n                MTProtoService.ProcessSelfMessage(messageBase);\r\n            }\r\n\r\n            SyncMessagesInternal(null, difference.NewMessages, result.NewMessages, false, false, exceptions);\r\n            SyncEncryptedMessagesInternal(difference.State.Qts, difference.NewEncryptedMessages, result.NewEncryptedMessages, exceptions);\r\n\r\n            _database.Commit();\r\n\r\n            //TLUtils.WritePerformance(\"Sync difference time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        private void SyncMessageInternal(TLPeerBase peer, TLMessageBase message, out TLMessageBase result)\r\n        {\r\n            TLMessageCommon cachedMessage = null;\r\n            //if (MessagesContext != null)\r\n            {\r\n                cachedMessage = (TLMessageCommon)GetCachedMessage(message);\r\n                //cachedMessage = (TLMessageCommon)MessagesContext[message.Index];\r\n            }\r\n\r\n            if (cachedMessage != null)\r\n            {\r\n                if (cachedMessage.RandomId != null)\r\n                {\r\n                    _database.RemoveMessageFromContext(cachedMessage);\r\n\r\n                    cachedMessage.RandomId = null;\r\n\r\n                    _database.AddMessageToContext(cachedMessage);\r\n\r\n                }\r\n\r\n                // update fields\r\n                if (message.GetType() == cachedMessage.GetType())\r\n                {\r\n                    cachedMessage.Update(message);\r\n                    //_database.Storage.Modify(cachedMessage);\r\n                }\r\n                // or replace object\r\n                else\r\n                {\r\n                    _database.DeleteMessage(cachedMessage);\r\n                    _database.AddMessage(message);\r\n                }\r\n                result = cachedMessage;\r\n            }\r\n            else\r\n            {\r\n                // add object to cache\r\n                result = message;\r\n                _database.AddMessage(message);\r\n            }\r\n        }\r\n\r\n        private void SyncMessagesInternal(TLPeerBase peer, IEnumerable<TLMessageBase> messages, TLVector<TLMessageBase> result, bool notifyNewDialogs, bool notifyTopMessageUpdated, IList<ExceptionInfo> exceptions = null)\r\n        {\r\n            TLChannel channel = null;\r\n            TLInt readInboxMaxId;\r\n            if (peer is TLPeerChannel)\r\n            {\r\n                channel = GetChat(peer.Id) as TLChannel;\r\n            }\r\n\r\n            foreach (var message in messages)\r\n            {\r\n                try\r\n                {\r\n                    // for updates we have input message only and set peer to null by default\r\n                    if (peer == null)\r\n                    {\r\n                        peer = TLUtils.GetPeerFromMessage(message);\r\n\r\n                        if (peer is TLPeerChannel)\r\n                        {\r\n                            channel = GetChat(peer.Id) as TLChannel;\r\n                            if (channel != null)\r\n                            {\r\n                                readInboxMaxId = channel.ReadInboxMaxId;\r\n                                if (readInboxMaxId != null)\r\n                                {\r\n                                    var messageCommon = message as TLMessageCommon;\r\n                                    if (messageCommon != null && !messageCommon.Out.Value &&\r\n                                        messageCommon.Index > readInboxMaxId.Value)\r\n                                    {\r\n                                        messageCommon.SetUnreadSilent(TLBool.True);\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var cachedMessage = (TLMessageCommon)GetCachedMessage(message);\r\n\r\n                    if (cachedMessage != null)\r\n                    {\r\n                        if (message.GetType() == cachedMessage.GetType())\r\n                        {\r\n                            cachedMessage.Update(message);\r\n                        }\r\n                        else\r\n                        {\r\n                            _database.DeleteMessage(cachedMessage);\r\n                            _database.AddMessage(message);\r\n                        }\r\n                        result.Add(cachedMessage);\r\n                    }\r\n                    else\r\n                    {\r\n                        if (peer != null)\r\n                        {\r\n                            if (channel != null)\r\n                            {\r\n                                readInboxMaxId = channel.ReadInboxMaxId;\r\n                                if (readInboxMaxId != null)\r\n                                {\r\n                                    var messageCommon = message as TLMessageCommon;\r\n                                    if (messageCommon != null && !messageCommon.Out.Value &&\r\n                                        messageCommon.Index > readInboxMaxId.Value)\r\n                                    {\r\n                                        messageCommon.SetUnreadSilent(TLBool.True);\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        result.Add(message);\r\n                        _database.AddMessage(message, notifyNewDialogs, notifyTopMessageUpdated);\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    if (exceptions != null)\r\n                    {\r\n                        exceptions.Add(new ExceptionInfo\r\n                        {\r\n                            Caption = \"UpdatesService.ProcessDifference Messages\",\r\n                            Exception = ex,\r\n                            Timestamp = DateTime.Now\r\n                        });\r\n                    }\r\n\r\n                    TLUtils.WriteException(\"UpdatesService.ProcessDifference Messages\", ex);\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Dialogs\r\n\r\n        private void SyncDialogsInternal(Stopwatch stopwatch2, TLDialogsBase dialogs, TLDialogsBase result)\r\n        {\r\n            MergeMessagesAndChannels(dialogs);\r\n\r\n            //Debug.WriteLine(\"messages.getDialogs sync dialogs merge messages and channels elapsed=\" + stopwatch.Elapsed);\r\n\r\n            foreach (TLDialog dialog in dialogs.Dialogs)\r\n            {\r\n                //Debug.WriteLine(\"messages.getDialogs sync dialogs start get cached elapsed=\" + stopwatch.Elapsed);\r\n                TLDialog cachedDialog = null;\r\n                if (DialogsContext != null)\r\n                {\r\n                    cachedDialog = DialogsContext[dialog.Index] as TLDialog;\r\n                }\r\n                //Debug.WriteLine(\"messages.getDialogs sync dialogs stop get cached elapsed=\" + stopwatch.Elapsed);\r\n\r\n                if (cachedDialog != null)\r\n                {\r\n                    //Debug.WriteLine(\"messages.getDialogs sync dialogs start update cached elapsed=\" + stopwatch.Elapsed);\r\n                    var raiseTopMessageUpdated = cachedDialog.TopMessageId == null || cachedDialog.TopMessageId.Value != dialog.TopMessageId.Value;\r\n                    cachedDialog.Update(dialog);\r\n                    //Debug.WriteLine(\"messages.getDialogs sync dialogs stop update cached elapsed=\" + stopwatch.Elapsed);\r\n                    if (raiseTopMessageUpdated)\r\n                    {\r\n                        if (_eventAggregator != null)\r\n                        {\r\n                            _eventAggregator.Publish(new TopMessageUpdatedEventArgs(cachedDialog, cachedDialog.TopMessage));\r\n                        }\r\n                    }\r\n                    result.Dialogs.Add(cachedDialog);\r\n                }\r\n                else\r\n                {\r\n                    result.Dialogs.Add(dialog);\r\n\r\n                    // skip left and not promo dialogs\r\n                    var peerChannel = dialog.Peer as TLPeerChannel;\r\n                    if (peerChannel != null)\r\n                    {\r\n                        var channel = GetChat(peerChannel.Id) as TLChannel;\r\n                        var dialog71 = dialog as TLDialog71;\r\n                        if (channel != null && channel.Left.Value && dialog71 != null && !dialog71.IsPromo)\r\n                        {\r\n                            continue;\r\n                        }\r\n                    }\r\n\r\n                    //Debug.WriteLine(\"messages.getDialogs sync dialogs start add none cached elapsed=\" + stopwatch.Elapsed);\r\n                    // add object to cache\r\n                    _database.AddDialog(dialog);\r\n\r\n                    //Debug.WriteLine(\"messages.getDialogs sync dialogs stop add none cached elapsed=\" + stopwatch.Elapsed);\r\n                }\r\n            }\r\n\r\n            //Debug.WriteLine(\"messages.getDialogs sync dialogs foreach elapsed=\" + stopwatch.Elapsed);\r\n\r\n\r\n\r\n            result.Messages = dialogs.Messages;\r\n        }\r\n\r\n        private void SyncChannelDialogsInternal(TLDialogsBase dialogs, TLDialogsBase result)\r\n        {\r\n            // set TopMessage properties\r\n            var timer = Stopwatch.StartNew();\r\n            MergeMessagesAndChannels(dialogs);\r\n            //TLUtils.WritePerformance(\"Dialogs:: merge dialogs and messages \" + timer.Elapsed);\r\n\r\n            timer = Stopwatch.StartNew();\r\n            foreach (TLDialog dialog in dialogs.Dialogs)\r\n            {\r\n                TLDialog cachedDialog = null;\r\n                if (DialogsContext != null)\r\n                {\r\n                    cachedDialog = DialogsContext[dialog.Index] as TLDialog;\r\n                }\r\n\r\n                if (cachedDialog != null)\r\n                {\r\n                    var raiseTopMessageUpdated = cachedDialog.TopMessageId == null || cachedDialog.TopMessageId.Value != dialog.TopMessageId.Value;\r\n                    cachedDialog.Update(dialog);\r\n                    if (raiseTopMessageUpdated)\r\n                    {\r\n                        if (_eventAggregator != null)\r\n                        {\r\n                            _eventAggregator.Publish(new TopMessageUpdatedEventArgs(cachedDialog, cachedDialog.TopMessage));\r\n                        }\r\n                    }\r\n                    result.Dialogs.Add(cachedDialog);\r\n                }\r\n                else\r\n                {\r\n                    // add object to cache\r\n                    result.Dialogs.Add(dialog);\r\n                    _database.AddDialog(dialog);\r\n                }\r\n            }\r\n            //TLUtils.WritePerformance(\"Dialogs:: foreach dialogs \" + timer.Elapsed);\r\n\r\n\r\n\r\n            result.Messages = dialogs.Messages;\r\n        }\r\n\r\n        public void SyncDialogs(Stopwatch stopwatch, TLDialogsBase dialogs, Action<TLDialogsBase> callback)\r\n        {\r\n            if (dialogs == null)\r\n            {\r\n                callback(new TLDialogs());\r\n                return;\r\n            }\r\n\r\n\r\n            var result = dialogs.GetEmptyObject();\r\n            if (_database == null) Init();\r\n\r\n            //Debug.WriteLine(\"messages.getDialogs after init elapsed=\" + stopwatch.Elapsed);\r\n\r\n            MergeReadMaxIdAndNotifySettings(dialogs);\r\n\r\n            //Debug.WriteLine(\"messages.getDialogs merge notify settings elapsed=\" + stopwatch.Elapsed);\r\n\r\n            SyncChatsInternal(dialogs.Chats, result.Chats);\r\n\r\n            //Debug.WriteLine(\"messages.getDialogs sync chats elapsed=\" + stopwatch.Elapsed);\r\n\r\n            SyncUsersInternal(dialogs.Users, result.Users);\r\n\r\n            //Debug.WriteLine(\"messages.getDialogs sync users elapsed=\" + stopwatch.Elapsed);\r\n\r\n            SyncDialogsInternal(stopwatch, dialogs, result);\r\n\r\n            //Debug.WriteLine(\"messages.getDialogs end sync dialogs elapsed=\" + stopwatch.Elapsed);\r\n\r\n            _database.Commit();\r\n\r\n            //Debug.WriteLine(\"messages.getDialogs after commit elapsed=\" + stopwatch.Elapsed);\r\n\r\n            callback.SafeInvoke(result);\r\n        }\r\n\r\n        public void SyncProxyData(TLProxyDataBase proxyData, Action<TLProxyDataBase> callback)\r\n        {\r\n            var result = proxyData != null ? proxyData.GetEmptyObject() : null;\r\n\r\n            var proxyDataPromo = proxyData as TLProxyDataPromo;\r\n            if (proxyDataPromo != null)\r\n            {\r\n                SyncChatsInternal(proxyDataPromo.Chats, ((TLProxyDataPromo)result).Chats);\r\n                SyncUsersInternal(proxyDataPromo.Users, ((TLProxyDataPromo)result).Users);\r\n            }\r\n\r\n            _database.UpdateProxyData(proxyData);\r\n\r\n            _database.Commit();\r\n\r\n            callback.SafeInvoke(result);\r\n        }\r\n\r\n        public void SyncChannelDialogs(TLDialogsBase dialogs, Action<TLDialogsBase> callback)\r\n        {\r\n            if (dialogs == null)\r\n            {\r\n                callback(new TLDialogs());\r\n                return;\r\n            }\r\n\r\n            var result = dialogs.GetEmptyObject();\r\n            if (_database == null) Init();\r\n\r\n            MergeReadMaxIdAndNotifySettings(dialogs);\r\n\r\n            // add or update chats, users and messages\r\n            var timer = Stopwatch.StartNew();\r\n            SyncChatsInternal(dialogs.Chats, result.Chats);\r\n            //TLUtils.WritePerformance(\"Dialogs:: sync chats \" + timer.Elapsed);\r\n\r\n            timer = Stopwatch.StartNew();\r\n            SyncUsersInternal(dialogs.Users, result.Users);\r\n            //TLUtils.WritePerformance(\"Dialogs:: sync users \" + timer.Elapsed);\r\n\r\n            //SyncMessagesInternal(dialogs.Messages, result.Messages);\r\n            timer = Stopwatch.StartNew();\r\n            SyncChannelDialogsInternal(dialogs, result);\r\n            //TLUtils.WritePerformance(\"Dialogs:: sync dialogs \" + timer.Elapsed);\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncDialogs time: \" + timer.Elapsed);\r\n            callback.SafeInvoke(result);\r\n        }\r\n\r\n        private void MergeReadMaxIdAndNotifySettings(TLDialogsBase dialogs)\r\n        {\r\n            var chatsIndex = new Dictionary<int, TLChatBase>();\r\n            foreach (var chat in dialogs.Chats)\r\n            {\r\n                chatsIndex[chat.Index] = chat;\r\n            }\r\n\r\n            var usersIndex = new Dictionary<int, TLUserBase>();\r\n            foreach (var user in dialogs.Users)\r\n            {\r\n                usersIndex[user.Index] = user;\r\n            }\r\n\r\n            foreach (var dialog in dialogs.Dialogs)\r\n            {\r\n                if (dialog.NotifySettings != null)\r\n                {\r\n                    if (dialog.Peer is TLPeerChannel)\r\n                    {\r\n                        TLChatBase chat;\r\n                        if (chatsIndex.TryGetValue(dialog.Index, out chat))\r\n                        {\r\n                            chat.NotifySettings = dialog.NotifySettings;\r\n                        }\r\n                    }\r\n                    else if (dialog.Peer is TLPeerChat)\r\n                    {\r\n                        TLChatBase chat;\r\n                        if (chatsIndex.TryGetValue(dialog.Index, out chat))\r\n                        {\r\n                            chat.NotifySettings = dialog.NotifySettings;\r\n                        }\r\n                    }\r\n                    else if (dialog.Peer is TLPeerUser)\r\n                    {\r\n                        TLUserBase user;\r\n                        if (usersIndex.TryGetValue(dialog.Index, out user))\r\n                        {\r\n                            user.NotifySettings = dialog.NotifySettings;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var dialog53 = dialog as IReadMaxId;\r\n                if (dialog53 != null)\r\n                {\r\n                    if (dialog.Peer is TLPeerChannel)\r\n                    {\r\n                        TLChatBase chatBase;\r\n                        if (chatsIndex.TryGetValue(dialog.Index, out chatBase))\r\n                        {\r\n                            var chat = chatBase as IReadMaxId;\r\n                            if (chat != null)\r\n                            {\r\n                                chat.ReadInboxMaxId = dialog53.ReadInboxMaxId;\r\n                                chat.ReadOutboxMaxId = dialog53.ReadOutboxMaxId;\r\n                            }\r\n                        }\r\n                    }\r\n                    else if (dialog.Peer is TLPeerChat)\r\n                    {\r\n                        TLChatBase chatBase;\r\n                        if (chatsIndex.TryGetValue(dialog.Index, out chatBase))\r\n                        {\r\n                            var chat = chatBase as IReadMaxId;\r\n                            if (chat != null)\r\n                            {\r\n                                chat.ReadInboxMaxId = dialog53.ReadInboxMaxId;\r\n                                chat.ReadOutboxMaxId = dialog53.ReadOutboxMaxId;\r\n                            }\r\n                        }\r\n                    }\r\n                    else if (dialog.Peer is TLPeerUser)\r\n                    {\r\n                        TLUserBase userBase;\r\n                        if (usersIndex.TryGetValue(dialog.Index, out userBase))\r\n                        {\r\n                            var user = userBase as IReadMaxId;\r\n                            if (user != null)\r\n                            {\r\n                                user.ReadInboxMaxId = dialog53.ReadInboxMaxId;\r\n                                user.ReadOutboxMaxId = dialog53.ReadOutboxMaxId;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void MergeMessagesAndChannels(TLDialogsBase dialogs)\r\n        {\r\n            var dialogsCache = new Context<TLDialog>();\r\n            var messagesCache = new Context<Context<TLMessageBase>>();\r\n\r\n            try\r\n            {\r\n                foreach (var dialogBase in dialogs.Dialogs)\r\n                {\r\n                    var dialog = dialogBase as TLDialog;\r\n                    if (dialog != null)\r\n                    {\r\n                        var peerId = dialog.Peer.Id.Value;\r\n                        dialogsCache[peerId] = dialog;\r\n                    }\r\n                }\r\n\r\n                foreach (var messageBase in dialogs.Messages)\r\n                {\r\n                    var message = messageBase as TLMessageCommon;\r\n                    if (message != null)\r\n                    {\r\n                        var peerId = message.ToId is TLPeerUser && !message.Out.Value ? message.FromId.Value : message.ToId.Id.Value;\r\n                        if (!message.Out.Value)\r\n                        {\r\n                            TLDialog dialog;\r\n                            if (dialogsCache.TryGetValue(peerId, out dialog))\r\n                            {\r\n                                var dialogChannel = dialog as TLDialogChannel;\r\n                                if (dialogChannel != null\r\n                                    && dialogChannel.ReadInboxMaxId.Value < message.Index)\r\n                                {\r\n                                    message.SetUnreadSilent(TLBool.True);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        Context<TLMessageBase> dialogContext;\r\n                        if (!messagesCache.TryGetValue(peerId, out dialogContext))\r\n                        {\r\n                            dialogContext = new Context<TLMessageBase>();\r\n                            messagesCache[peerId] = dialogContext;\r\n                        }\r\n                        dialogContext[message.Index] = message;\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n            try\r\n            {\r\n\r\n                foreach (var dialogCache in messagesCache.Values)\r\n                {\r\n\r\n                    foreach (var message in dialogCache.Values)\r\n                    {\r\n                        TLMessageCommon cachedMessage = null;\r\n                        //if (MessagesContext != null)\r\n                        {\r\n                            cachedMessage = (TLMessageCommon)GetCachedMessage(message);\r\n                            //cachedMessage = (TLMessageCommon)MessagesContext[message.Index];\r\n                        }\r\n\r\n                        if (cachedMessage != null)\r\n                        {\r\n                            // update fields\r\n                            if (message.GetType() == cachedMessage.GetType())\r\n                            {\r\n                                cachedMessage.Update(message);\r\n                                //_database.Storage.Modify(cachedMessage);\r\n                            }\r\n                            // or replace object\r\n                            else\r\n                            {\r\n                                _database.AddMessageToContext(message);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            // add object to cache\r\n                            _database.AddMessageToContext(message);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n            try\r\n            {\r\n\r\n                foreach (var dialogBase in dialogs.Dialogs)\r\n                {\r\n                    var peer = dialogBase.Peer;\r\n                    if (peer is TLPeerUser)\r\n                    {\r\n                        dialogBase._with = UsersContext[peer.Id.Value];\r\n                    }\r\n                    else if (peer is TLPeerChat)\r\n                    {\r\n                        dialogBase._with = ChatsContext[peer.Id.Value];\r\n                    }\r\n                    else if (peer is TLPeerChannel)\r\n                    {\r\n                        dialogBase._with = ChatsContext[peer.Id.Value];\r\n                    }\r\n\r\n                    var dialogFeed = dialogBase as TLDialogFeed;\r\n                    if (dialogFeed != null)\r\n                    {\r\n                        var channels = new TLVector<TLChatBase>();\r\n                        foreach (var channelId in dialogFeed.FeedOtherChannels)\r\n                        {\r\n                            var ch = ChatsContext[channelId.Value];\r\n                            if (ch != null)\r\n                            {\r\n                                channels.Add(ch);\r\n                            }\r\n                        }\r\n                        dialogFeed._with = channels;\r\n                    }\r\n\r\n                    var dialog = dialogBase as TLDialog;\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog._topMessage = messagesCache[peer.Id.Value][dialogBase.TopMessageId.Value];\r\n                        dialog.Messages = new ObservableCollection<TLMessageBase> { dialog.TopMessage };\r\n                    }\r\n\r\n                    //var dialogChannel = dialogBase as TLDialogChannel;\r\n                    //if (dialog != null)\r\n                    //{\r\n                    //    dialog._topMessage = messagesCache[peer.Id.Value][dialogBase.TopMessageId.Value];\r\n                    //    dialog.Messages = new ObservableCollection<TLMessageBase> { dialog.TopMessage };\r\n                    //}\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n\r\n\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Users\r\n\r\n        public void SyncUserLink(TLLinkBase link, Action<TLLinkBase> callback)\r\n        {\r\n            if (link == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            TLUserBase result;\r\n            if (_database == null) Init();\r\n\r\n            SyncUserInternal(link.User, out result);\r\n            link.User = result;\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncUser time: \" + timer.Elapsed);\r\n            callback(link);\r\n        }\r\n\r\n        public void SyncUser(TLUserFull userFull, Action<TLUserFull> callback)\r\n        {\r\n            if (userFull == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            TLUserBase result;\r\n            if (_database == null) Init();\r\n\r\n            SyncUserInternal(userFull.ToUser(), out result);\r\n            userFull.User = result;\r\n\r\n            var dialog = GetDialog(new TLPeerUser { Id = userFull.User.Id });\r\n            if (dialog != null)\r\n            {\r\n                dialog.NotifySettings = userFull.NotifySettings;\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n            //TLUtils.WritePerformance(\"SyncUserFull time: \" + timer.Elapsed);\r\n\r\n            callback.SafeInvoke(userFull);\r\n        }\r\n\r\n\r\n        public void SyncUser(TLUserBase user, Action<TLUserBase> callback)\r\n        {\r\n            if (user == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            TLUserBase result;\r\n            if (_database == null) Init();\r\n\r\n            SyncUserInternal(user, out result);\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncUser time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncUsers(TLVector<TLUserBase> users, Action<TLVector<TLUserBase>> callback)\r\n        {\r\n            if (users == null)\r\n            {\r\n                callback(new TLVector<TLUserBase>());\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = new TLVector<TLUserBase>();\r\n            if (_database == null) Init();\r\n\r\n            SyncUsersInternal(users, result);\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncUsers time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncUsersAndChats(TLVector<TLUserBase> users, TLVector<TLChatBase> chats, Action<WindowsPhone.Tuple<TLVector<TLUserBase>, TLVector<TLChatBase>>> callback)\r\n        {\r\n            if (users == null && chats == null)\r\n            {\r\n                callback(new WindowsPhone.Tuple<TLVector<TLUserBase>, TLVector<TLChatBase>>(null, null));\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var usersResult = new TLVector<TLUserBase>();\r\n            var chatsResult = new TLVector<TLChatBase>();\r\n            if (_database == null) Init();\r\n\r\n            SyncUsersInternal(users, usersResult);\r\n            SyncChatsInternal(chats, chatsResult);\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncUsersAndChats time: \" + timer.Elapsed);\r\n            callback(new WindowsPhone.Tuple<TLVector<TLUserBase>, TLVector<TLChatBase>>(usersResult, chatsResult));\r\n        }\r\n\r\n        private void SyncUserInternal(TLUserBase user, out TLUserBase result)\r\n        {\r\n            TLUserBase cachedUser = null;\r\n            if (UsersContext != null)\r\n            {\r\n                cachedUser = UsersContext[user.Index];\r\n            }\r\n\r\n            if (cachedUser != null)\r\n            {\r\n                var user45 = user as TLUser45;\r\n                var isMinUser = user45 != null && user45.Min;\r\n\r\n                // update fields\r\n                if (user.GetType() == cachedUser.GetType())\r\n                {\r\n                    cachedUser.Update(user);\r\n                    result = cachedUser;\r\n                }\r\n                else if (isMinUser)\r\n                {\r\n                    result = cachedUser;\r\n                }\r\n                // or replace object\r\n                else\r\n                {\r\n                    _database.ReplaceUser(user.Index, user);\r\n                    result = user;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                // add object to cache\r\n                result = user;\r\n                _database.AddUser(user);\r\n            }\r\n        }\r\n\r\n        private void SyncUsersInternal(TLVector<TLUserBase> users, TLVector<TLUserBase> result, IList<ExceptionInfo> exceptions = null)\r\n        {\r\n            foreach (var user in users)\r\n            {\r\n                try\r\n                {\r\n                    TLUserBase cachedUser = null;\r\n                    if (UsersContext != null)\r\n                    {\r\n                        cachedUser = UsersContext[user.Index];\r\n                    }\r\n\r\n                    if (cachedUser != null)\r\n                    {\r\n                        var user45 = user as TLUser45;\r\n                        var isMinUser = user45 != null && user45.Min;\r\n\r\n                        // update fields\r\n                        if (user.GetType() == cachedUser.GetType())\r\n                        {\r\n                            cachedUser.Update(user);\r\n                            result.Add(cachedUser);\r\n                        }\r\n                        else if (isMinUser)\r\n                        {\r\n                            result.Add(cachedUser);\r\n                        }\r\n                        // or replace object\r\n                        else\r\n                        {\r\n                            _database.ReplaceUser(user.Index, user);\r\n                            result.Add(user);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        // add object to cache\r\n                        result.Add(user);\r\n                        _database.AddUser(user);\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    if (exceptions != null)\r\n                    {\r\n                        exceptions.Add(new ExceptionInfo\r\n                        {\r\n                            Caption = \"UpdatesService.ProcessDifference Users\",\r\n                            Exception = ex,\r\n                            Timestamp = DateTime.Now\r\n                        });\r\n                    }\r\n\r\n                    TLUtils.WriteException(\"UpdatesService.ProcessDifference Users\", ex);\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region SecretChats\r\n\r\n        private void SyncEncryptedChatInternal(TLEncryptedChatBase chat, out TLEncryptedChatBase result)\r\n        {\r\n            try\r\n            {\r\n                TLEncryptedChatBase cachedChat = null;\r\n                if (EncryptedChatsContext != null)\r\n                {\r\n                    cachedChat = EncryptedChatsContext[chat.Index];\r\n                }\r\n\r\n                if (cachedChat != null)\r\n                {\r\n                    // update fields\r\n                    if (chat.GetType() == cachedChat.GetType())\r\n                    {\r\n                        cachedChat.Update(chat);\r\n                        result = cachedChat;\r\n                    }\r\n                    // or replace object\r\n                    else\r\n                    {\r\n                        var chatWaiting = cachedChat as TLEncryptedChatWaiting;\r\n                        if (chatWaiting != null)\r\n                        {\r\n                            var encryptedChat = chat as TLEncryptedChat;\r\n                            if (encryptedChat != null)\r\n                            {\r\n                                chat.A = cachedChat.A;\r\n                                chat.P = cachedChat.P;\r\n                                chat.G = cachedChat.G;\r\n\r\n                                if (!TLUtils.CheckGaAndGb(encryptedChat.GAorB.Data, chat.P.Data))\r\n                                {\r\n                                    result = chat;\r\n                                    return;\r\n                                }\r\n\r\n                                var gbBytes = encryptedChat.GAorB.ToBytes();\r\n                                var authKey = MTProtoService.GetAuthKey(chat.A.Data, gbBytes, chat.P.ToBytes());\r\n                                chat.Key = TLString.FromBigEndianData(authKey);\r\n\r\n                                var authKeyFingerprint = Utils.ComputeSHA1(authKey);\r\n                                chat.KeyFingerprint = new TLLong(BitConverter.ToInt64(authKeyFingerprint, 12));\r\n                            }\r\n                            else\r\n                            {\r\n                                if (cachedChat.Key != null) chat.Key = cachedChat.Key;\r\n                                if (cachedChat.KeyFingerprint != null) chat.KeyFingerprint = cachedChat.KeyFingerprint;\r\n                            }\r\n                        }\r\n                        //chat.A = cachedChat.A;\r\n                        //chat.P = cachedChat.P;\r\n                        //chat.G = cachedChat.G;\r\n\r\n                        //var encryptedChat = chat as TLEncryptedChat;\r\n                        //if (encryptedChat != null)\r\n                        //{\r\n                        //    var gbBytes = encryptedChat.GAorB.ToBytes();\r\n                        //    var authKey = MTProtoService.GetAuthKey(chat.A.Data, gbBytes, chat.P.ToBytes());\r\n                        //    chat.Key = TLString.FromBigEndianData(authKey);\r\n\r\n                        //    var authKeyFingerprint = Utils.ComputeSHA1(authKey);\r\n                        //    chat.KeyFingerprint = new TLLong(BitConverter.ToInt64(authKeyFingerprint, 12));\r\n                        //}\r\n                        //else\r\n                        //{\r\n                        //    if (cachedChat.Key != null) chat.Key = cachedChat.Key;\r\n                        //    if (cachedChat.KeyFingerprint != null) chat.KeyFingerprint = cachedChat.KeyFingerprint;\r\n                        //}\r\n\r\n                        //Helpers.Execute.ShowDebugMessage(string.Format(\"InMemoryCacheService.SyncEncryptedChatInternal {0}!={1}\", cachedChat.GetType(), chat.GetType()));\r\n\r\n                        _database.ReplaceEncryptedChat(chat.Index, chat);\r\n\r\n                        result = chat;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    // add object to cache\r\n                    result = chat;\r\n                    _database.AddEncryptedChat(chat);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                result = null;\r\n            }\r\n        }\r\n\r\n        public void SyncEncryptedChat(TLEncryptedChatBase encryptedChat, Action<TLEncryptedChatBase> callback)\r\n        {\r\n            if (encryptedChat == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            TLEncryptedChatBase chatResult;\r\n            if (_database == null) Init();\r\n\r\n            SyncEncryptedChatInternal(encryptedChat, out chatResult);\r\n\r\n            _database.Commit();\r\n\r\n            callback.SafeInvoke(chatResult);\r\n        }\r\n\r\n        public void SyncEncryptedMessagesInternal(TLInt qts, TLVector<TLEncryptedMessageBase> messages, TLVector<TLEncryptedMessageBase> result, IList<ExceptionInfo> exceptions = null)\r\n        {\r\n            foreach (var message in messages)\r\n            {\r\n                try\r\n                {\r\n                    var encryptedChatBase = GetEncryptedChat(message.ChatId);\r\n                    var encryptedChat = encryptedChatBase as TLEncryptedChat;\r\n                    if (encryptedChat == null)\r\n                    {\r\n                        result.Add(message);\r\n                        Execute.ShowDebugMessage(string.Format(\"SyncEncryptedMessagesInternal skip decrypted message chatId={0} chat_type={1}\", encryptedChatBase != null ? encryptedChatBase.Id.ToString() : \"null\", encryptedChatBase != null ? encryptedChatBase.GetType().ToString() : \"null\"));\r\n\r\n                        continue;\r\n                    }\r\n\r\n                    bool commitChat;\r\n                    var decryptedMessage = UpdatesService.GetDecryptedMessage(MTProtoService.Instance.CurrentUserId, encryptedChat, message, qts, out commitChat);\r\n                    if (commitChat)\r\n                    {\r\n                        Commit();\r\n                    }\r\n                    if (decryptedMessage == null)\r\n                    {\r\n                        continue;\r\n                    }\r\n\r\n                    var seqNoMessage = decryptedMessage as ISeqNo;\r\n                    var encryptedChat17 = encryptedChat as TLEncryptedChat17;\r\n                    if (seqNoMessage != null\r\n                        && encryptedChat17 != null)\r\n                    {\r\n                        var chatRawInSeqNo = encryptedChat17.RawInSeqNo.Value;\r\n                        var messageRawInSeqNo = UpdatesService.GetRawInFromReceivedMessage(MTProtoService.Instance.CurrentUserId, encryptedChat17, seqNoMessage);\r\n\r\n                        if (chatRawInSeqNo <= messageRawInSeqNo)\r\n                        {\r\n                            if (messageRawInSeqNo > chatRawInSeqNo)\r\n                            {\r\n                                Execute.ShowDebugMessage(string.Format(\"SyncEncryptedMessagesInternal decrypted message gap chatId={0} chatRawInSeqNo={1} messageRawInSeqNo={2}\", encryptedChat17.Id, chatRawInSeqNo, messageRawInSeqNo));\r\n                            }\r\n                            encryptedChat17.RawInSeqNo = new TLInt(chatRawInSeqNo + 1);\r\n                            SyncEncryptedChat(encryptedChat17, r => { });\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(string.Format(\"SyncEncryptedMessagesInternal skip old decrypted message chatId={0} chatRawInSeqNo={1} messageRawInSeqNo={2}\", encryptedChat17.Id, chatRawInSeqNo, messageRawInSeqNo));\r\n                            continue;\r\n                        }\r\n                    }\r\n\r\n                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(decryptedMessage));\r\n\r\n                    SyncDecryptedMessage(decryptedMessage, encryptedChat, cachedMessage =>\r\n                    {\r\n                        var decryptedMessageService = decryptedMessage as TLDecryptedMessageService;\r\n                        if (decryptedMessageService != null)\r\n                        {\r\n                            var readMessagesAction = decryptedMessageService.Action as TLDecryptedMessageActionReadMessages;\r\n                            if (readMessagesAction != null)\r\n                            {\r\n                                var items = GetDecryptedHistory(encryptedChat.Id.Value, 100);\r\n                                foreach (var randomId in readMessagesAction.RandomIds)\r\n                                {\r\n                                    foreach (var item in items)\r\n                                    {\r\n                                        if (item.RandomId.Value == randomId.Value)\r\n                                        {\r\n                                            item.Status = MessageStatus.Read;\r\n                                            if (item.TTL != null && item.TTL.Value > 0)\r\n                                            {\r\n                                                item.DeleteDate = new TLLong(DateTime.Now.Ticks + encryptedChat.MessageTTL.Value * TimeSpan.TicksPerSecond);\r\n                                            }\r\n\r\n                                            var m = item as TLDecryptedMessage17;\r\n                                            if (m != null)\r\n                                            {\r\n                                                var decryptedMediaPhoto = m.Media as TLDecryptedMessageMediaPhoto;\r\n                                                if (decryptedMediaPhoto != null)\r\n                                                {\r\n                                                    if (decryptedMediaPhoto.TTLParams == null)\r\n                                                    {\r\n                                                        var ttlParams = new TTLParams();\r\n                                                        ttlParams.IsStarted = true;\r\n                                                        ttlParams.Total = m.TTL.Value;\r\n                                                        ttlParams.StartTime = DateTime.Now;\r\n                                                        ttlParams.Out = m.Out.Value;\r\n\r\n                                                        decryptedMediaPhoto._ttlParams = ttlParams;\r\n                                                    }\r\n                                                }\r\n\r\n                                                var decryptedMediaVideo17 = m.Media as TLDecryptedMessageMediaVideo17;\r\n                                                if (decryptedMediaVideo17 != null)\r\n                                                {\r\n                                                    if (decryptedMediaVideo17.TTLParams == null)\r\n                                                    {\r\n                                                        var ttlParams = new TTLParams();\r\n                                                        ttlParams.IsStarted = true;\r\n                                                        ttlParams.Total = m.TTL.Value;\r\n                                                        ttlParams.StartTime = DateTime.Now;\r\n                                                        ttlParams.Out = m.Out.Value;\r\n\r\n                                                        decryptedMediaVideo17._ttlParams = ttlParams;\r\n                                                    }\r\n                                                }\r\n\r\n                                                var decryptedMediaAudio17 = m.Media as TLDecryptedMessageMediaAudio17;\r\n                                                if (decryptedMediaAudio17 != null)\r\n                                                {\r\n                                                    if (decryptedMediaAudio17.TTLParams == null)\r\n                                                    {\r\n                                                        var ttlParams = new TTLParams();\r\n                                                        ttlParams.IsStarted = true;\r\n                                                        ttlParams.Total = m.TTL.Value;\r\n                                                        ttlParams.StartTime = DateTime.Now;\r\n                                                        ttlParams.Out = m.Out.Value;\r\n\r\n                                                        decryptedMediaAudio17._ttlParams = ttlParams;\r\n                                                    }\r\n                                                }\r\n\r\n                                                var decryptedMediaDocument45 = m.Media as TLDecryptedMessageMediaDocument45;\r\n                                                if (decryptedMediaDocument45 != null && (m.IsVoice() || m.IsVideo()))\r\n                                                {\r\n                                                    if (decryptedMediaDocument45.TTLParams == null)\r\n                                                    {\r\n                                                        var ttlParams = new TTLParams();\r\n                                                        ttlParams.IsStarted = true;\r\n                                                        ttlParams.Total = m.TTL.Value;\r\n                                                        ttlParams.StartTime = DateTime.Now;\r\n                                                        ttlParams.Out = m.Out.Value;\r\n\r\n                                                        decryptedMediaDocument45._ttlParams = ttlParams;\r\n                                                    }\r\n\r\n                                                    var message45 = m as TLDecryptedMessage45;\r\n                                                    if (message45 != null)\r\n                                                    {\r\n                                                        message45.SetListened();\r\n                                                    }\r\n                                                    decryptedMediaDocument45.NotListened = false;\r\n                                                }\r\n                                            }\r\n                                            break;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var isDisplayedMessage = TLUtils.IsDisplayedDecryptedMessageInternal(decryptedMessage);\r\n                        if (!isDisplayedMessage)\r\n                        {\r\n                            decryptedMessage.Unread = TLBool.False;\r\n                        }\r\n\r\n                        UpdatesService.ProcessPFS(MTProtoService.Instance.SendEncryptedServiceAsync, this, _eventAggregator, encryptedChat, decryptedMessageService);\r\n\r\n                        UpdatesService.ProcessNewLayer(MTProtoService.Instance.SendEncryptedServiceAsync, this, _eventAggregator, encryptedChat, decryptedMessage);\r\n\r\n                        if (decryptedMessageService != null)\r\n                        {\r\n                            var resendAction = decryptedMessageService.Action as TLDecryptedMessageActionResend;\r\n                            if (resendAction != null)\r\n                            {\r\n                                Execute.ShowDebugMessage(string.Format(\"SyncEncryptedMessagesInternal TLDecryptedMessageActionResend start_seq_no={0} end_seq_no={1}\", resendAction.StartSeqNo, resendAction.EndSeqNo));\r\n                            }\r\n                        }\r\n                    });\r\n\r\n                    result.Add(message);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    if (exceptions != null)\r\n                    {\r\n                        exceptions.Add(new ExceptionInfo\r\n                        {\r\n                            Caption = \"UpdatesService.ProcessDifference EncryptedMessages\",\r\n                            Exception = ex,\r\n                            Timestamp = DateTime.Now\r\n                        });\r\n                    }\r\n\r\n                    TLUtils.WriteException(\"UpdatesService.ProcessDifference EncryptedMessages\", ex);\r\n                }\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region Chats\r\n\r\n        public void AddChats(TLVector<TLChatBase> chats, Action<TLVector<TLChatBase>> callback)\r\n        {\r\n            if (chats == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            if (_database == null) Init();\r\n\r\n            foreach (var chat in chats)\r\n            {\r\n                TLChatBase cachedChat = null;\r\n                if (ChatsContext != null)\r\n                {\r\n                    cachedChat = ChatsContext[chat.Index];\r\n                }\r\n\r\n                if (cachedChat == null)\r\n                {\r\n                    _database.AddChat(chat);\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n            callback.SafeInvoke(chats);\r\n        }\r\n\r\n        public void SyncChat(TLMessagesChatFull messagesChatFull, Action<TLMessagesChatFull> callback)\r\n        {\r\n            if (messagesChatFull == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            var usersResult = new TLVector<TLUserBase>(messagesChatFull.Users.Count);\r\n            var chatsResult = new TLVector<TLChatBase>(messagesChatFull.Chats.Count);\r\n            var currentChat = messagesChatFull.Chats.First(x => x.Index == messagesChatFull.FullChat.Id.Value);\r\n            TLChatBase chatResult;\r\n            if (_database == null) Init();\r\n\r\n            SyncUsersInternal(messagesChatFull.Users, usersResult);\r\n            messagesChatFull.Users = usersResult;\r\n\r\n            SyncChatsInternal(messagesChatFull.Chats, chatsResult);\r\n            messagesChatFull.Chats = chatsResult;\r\n\r\n            SyncChatInternal(messagesChatFull.FullChat.ToChat(currentChat), out chatResult);\r\n\r\n            var channel = currentChat as TLChannel;\r\n            var dialog = GetDialog(channel != null ? (TLPeerBase)new TLPeerChannel { Id = messagesChatFull.FullChat.Id } : new TLPeerChat { Id = messagesChatFull.FullChat.Id });\r\n            if (dialog != null)\r\n            {\r\n                dialog.NotifySettings = messagesChatFull.FullChat.NotifySettings;\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n            //TLUtils.WritePerformance(\"SyncChatFull time: \" + timer.Elapsed);\r\n\r\n            callback.SafeInvoke(messagesChatFull);\r\n        }\r\n\r\n        public void SyncChats(TLVector<TLChatBase> chats, Action<TLVector<TLChatBase>> callback)\r\n        {\r\n            if (chats == null)\r\n            {\r\n                callback(new TLVector<TLChatBase>());\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = new TLVector<TLChatBase>();\r\n            if (_database == null) Init();\r\n\r\n            SyncChatsInternal(chats, result);\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncChats time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        private void SyncChatsInternal(TLVector<TLChatBase> chats, TLVector<TLChatBase> result, IList<ExceptionInfo> exceptions = null)\r\n        {\r\n            foreach (var chat in chats)\r\n            {\r\n                try\r\n                {\r\n                    TLChatBase cachedChat = null;\r\n                    if (ChatsContext != null)\r\n                    {\r\n                        cachedChat = ChatsContext[chat.Index];\r\n                    }\r\n\r\n                    if (cachedChat != null)\r\n                    {\r\n                        var channel49 = chat as TLChannel49;\r\n                        var isMinChannel = channel49 != null && channel49.Min;\r\n\r\n                        // update fields\r\n                        if (chat.GetType() == cachedChat.GetType())\r\n                        {\r\n                            cachedChat.Update(chat);\r\n                        }\r\n                        else if (isMinChannel)\r\n                        {\r\n\r\n                        }\r\n                        // or replace object\r\n                        else\r\n                        {\r\n                            _database.ReplaceChat(chat.Index, chat);\r\n                        }\r\n                        result.Add(cachedChat);\r\n                    }\r\n                    else\r\n                    {\r\n                        // add object to cache\r\n                        result.Add(chat);\r\n                        _database.AddChat(chat);\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    if (exceptions != null)\r\n                    {\r\n                        exceptions.Add(new ExceptionInfo\r\n                        {\r\n                            Caption = \"UpdatesService.ProcessDifference Chats\",\r\n                            Exception = ex,\r\n                            Timestamp = DateTime.Now\r\n                        });\r\n                    }\r\n\r\n                    TLUtils.WriteException(\"UpdatesService.ProcessDifference Chats\", ex);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SyncChatInternal(TLChatBase chat, out TLChatBase result)\r\n        {\r\n            TLChatBase cachedChat = null;\r\n            if (ChatsContext != null)\r\n            {\r\n                cachedChat = ChatsContext[chat.Index];\r\n            }\r\n\r\n            if (cachedChat != null)\r\n            {\r\n                var channel49 = chat as TLChannel49;\r\n                var isMinChannel = channel49 != null && channel49.Min;\r\n\r\n                // update fields\r\n                if (chat.GetType() == cachedChat.GetType())\r\n                {\r\n                    cachedChat.Update(chat);\r\n                }\r\n                else if (isMinChannel)\r\n                {\r\n\r\n                }\r\n                // or replace object\r\n                else\r\n                {\r\n                    _database.ReplaceChat(chat.Index, chat);\r\n                }\r\n                result = cachedChat;\r\n            }\r\n            else\r\n            {\r\n                // add object to cache\r\n                result = chat;\r\n                _database.AddChat(chat);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region Broadcasts\r\n\r\n        public void SyncBroadcast(TLBroadcastChat broadcast, Action<TLBroadcastChat> callback)\r\n        {\r\n            if (broadcast == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            TLBroadcastChat result;\r\n            if (_database == null) Init();\r\n\r\n            SyncBroadcastInternal(broadcast, out result);\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncBroadcast time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        private void SyncBroadcastInternal(TLBroadcastChat chat, out TLBroadcastChat result)\r\n        {\r\n            TLBroadcastChat cachedBroadcast = null;\r\n            if (BroadcastsContext != null)\r\n            {\r\n                cachedBroadcast = BroadcastsContext[chat.Index];\r\n            }\r\n\r\n            if (cachedBroadcast != null)\r\n            {\r\n                // update fields\r\n                if (chat.GetType() == cachedBroadcast.GetType())\r\n                {\r\n                    cachedBroadcast.Update(chat);\r\n                }\r\n                // or replace object\r\n                else\r\n                {\r\n                    _database.ReplaceBroadcast(chat.Index, chat);\r\n                }\r\n                result = cachedBroadcast;\r\n            }\r\n            else\r\n            {\r\n                // add object to cache\r\n                result = chat;\r\n                _database.AddBroadcast(chat);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region Contacts\r\n\r\n        public void AddUsers(TLVector<TLUserBase> users, Action<TLVector<TLUserBase>> callback)\r\n        {\r\n            if (users == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            if (_database == null) Init();\r\n\r\n            foreach (var user in users)\r\n            {\r\n                TLUserBase cachedUser = null;\r\n                if (UsersContext != null)\r\n                {\r\n                    cachedUser = UsersContext[user.Index];\r\n                }\r\n\r\n                if (cachedUser == null)\r\n                {\r\n                    _database.AddUser(user);\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n            callback.SafeInvoke(users);\r\n        }\r\n\r\n        public void SyncContacts(TLImportedContacts contacts, Action<TLImportedContacts> callback)\r\n        {\r\n            if (contacts == null)\r\n            {\r\n                callback(new TLImportedContacts69());\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = contacts.GetEmptyObject();\r\n            if (_database == null) Init();\r\n\r\n            SyncContactsInternal(contacts, result);\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncImportedContacts time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncStatedMessage(TLStatedMessageBase statedMessage, Action<TLStatedMessageBase> callback)\r\n        {\r\n            if (statedMessage == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = statedMessage.GetEmptyObject();\r\n            if (_database == null) Init();\r\n\r\n            SyncChatsInternal(statedMessage.Chats, result.Chats);\r\n            SyncUsersInternal(statedMessage.Users, result.Users);\r\n            TLMessageBase message;\r\n            SyncMessageInternal(TLUtils.GetPeerFromMessage(statedMessage.Message), statedMessage.Message, out message);\r\n            result.Message = message;\r\n\r\n            var messageCommon = message as TLMessageCommon;\r\n            if (messageCommon != null)\r\n            {\r\n                var dialog = GetDialog(messageCommon);\r\n                if (dialog != null)\r\n                {\r\n                    var oldMessage = dialog.Messages.FirstOrDefault(x => x.Index == message.Index);\r\n                    if (oldMessage != null)\r\n                    {\r\n                        dialog.Messages.Remove(oldMessage);\r\n                        dialog.Messages.Insert(0, message);\r\n                        dialog._topMessage = message;\r\n                        dialog.TopMessageId = message.Id;\r\n                        dialog.TopMessageRandomId = message.RandomId;\r\n                        _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialog, message));\r\n                    }\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n\r\n\r\n            TLUtils.WritePerformance(\"SyncStatedMessage time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void SyncStatedMessages(TLStatedMessagesBase statedMessages, Action<TLStatedMessagesBase> callback)\r\n        {\r\n            if (statedMessages == null)\r\n            {\r\n                callback(null);\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = statedMessages.GetEmptyObject();\r\n            if (_database == null) Init();\r\n\r\n            SyncChatsInternal(statedMessages.Chats, result.Chats);\r\n            SyncUsersInternal(statedMessages.Users, result.Users);\r\n\r\n            foreach (var m in statedMessages.Messages)\r\n            {\r\n                TLMessageBase message;\r\n                SyncMessageInternal(TLUtils.GetPeerFromMessage(m), m, out message);\r\n                result.Messages.Add(message);\r\n            }\r\n\r\n\r\n            _database.Commit();\r\n\r\n\r\n            TLUtils.WritePerformance(\"SyncStatedMessages time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        public void UpdateDialogPinned(TLPeerBase peer, bool pinned)\r\n        {\r\n            if (_database == null) Init();\r\n\r\n            _database.UpdateDialogPinned(peer, pinned);\r\n            _database.Commit();\r\n        }\r\n\r\n        public void UpdatePinnedDialogs(TLVector<TLPeerBase> order)\r\n        {\r\n            if (_database == null) Init();\r\n\r\n\r\n            _database.Commit();\r\n        }\r\n\r\n        public TLProxyDataBase GetProxyData()\r\n        {\r\n            if (_database == null) Init();\r\n\r\n            return _database.ProxyData;\r\n        }\r\n\r\n        public void UpdateProxyData(TLProxyDataBase proxyData)\r\n        {\r\n            if (_database == null) Init();\r\n\r\n            _database.UpdateProxyData(proxyData);\r\n            _database.Commit();\r\n        }\r\n\r\n        public void UpdateChannelAvailableMessages(TLInt channelId, TLInt availableMinId)\r\n        {\r\n            if (_database == null) Init();\r\n\r\n            _database.UpdateChannelAvailableMessages(new TLPeerChannel { Id = channelId }, availableMinId);\r\n\r\n            _database.Commit();\r\n        }\r\n\r\n        public void UpdateDialogPromo(TLDialogBase dialogBase, bool promo)\r\n        {\r\n            if (_database == null) Init();\r\n\r\n            _database.UpdateDialogPromo(dialogBase, promo);\r\n            _database.Commit();\r\n        }\r\n\r\n        public void DeleteDialog(TLDialogBase dialog)\r\n        {\r\n            if (dialog != null)\r\n            {\r\n                _database.DeleteDialog(dialog);\r\n\r\n                _database.Commit();\r\n            }\r\n        }\r\n\r\n        public void ClearDialog(TLPeerBase peer)\r\n        {\r\n            if (peer != null)\r\n            {\r\n                _database.ClearDialog(peer);\r\n\r\n                _database.Commit();\r\n            }\r\n        }\r\n\r\n        public void DeleteUser(TLInt id)\r\n        {\r\n            _database.DeleteUser(id);\r\n            _database.Commit();\r\n        }\r\n\r\n        public void DeleteChat(TLInt id)\r\n        {\r\n            _database.DeleteChat(id);\r\n            _database.Commit();\r\n        }\r\n\r\n        public void DeleteMessages(TLVector<TLLong> randomIds)\r\n        {\r\n            if (randomIds == null || randomIds.Count == 0) return;\r\n\r\n            foreach (var id in randomIds)\r\n            {\r\n                var message = _database.RandomMessagesContext[id.Value];\r\n                if (message != null)\r\n                {\r\n                    var peer = TLUtils.GetPeerFromMessage(message);\r\n\r\n                    if (peer != null)\r\n                    {\r\n                        _database.DeleteMessage(message);\r\n                    }\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n        }\r\n\r\n        public void DeleteDecryptedMessages(TLVector<TLLong> randomIds)\r\n        {\r\n            foreach (var id in randomIds)\r\n            {\r\n                var message = _database.DecryptedMessagesContext[id.Value];\r\n                if (message != null)\r\n                {\r\n                    var peer = TLUtils.GetPeerFromMessage(message);\r\n\r\n                    if (peer != null)\r\n                    {\r\n                        _database.DeleteDecryptedMessage(message, peer);\r\n                    }\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n        }\r\n\r\n        public void ClearDecryptedHistoryAsync(TLInt chatId)\r\n        {\r\n            _database.ClearDecryptedHistory(chatId);\r\n\r\n            _database.Commit();\r\n        }\r\n\r\n        public void ClearBroadcastHistoryAsync(TLInt chatId)\r\n        {\r\n            _database.ClearBroadcastHistory(chatId);\r\n\r\n            _database.Commit();\r\n        }\r\n\r\n        public void DeleteMessages(TLPeerBase peer, TLMessageBase lastItem, TLVector<TLInt> messages)\r\n        {\r\n            if (messages == null || messages.Count == 0) return;\r\n\r\n            _database.DeleteMessages(peer, lastItem, messages);\r\n\r\n            _database.Commit();\r\n        }\r\n\r\n        public void DeleteMessages(TLVector<TLInt> ids)\r\n        {\r\n            if (ids == null || ids.Count == 0) return;\r\n\r\n            foreach (var id in ids)\r\n            {\r\n                var message = _database.MessagesContext[id.Value];\r\n                if (message != null)\r\n                {\r\n                    _database.DeleteMessage(message);\r\n                }\r\n            }\r\n\r\n            _database.Commit();\r\n        }\r\n\r\n        public void DeleteUserHistory(TLPeerChannel channel, TLPeerUser user)\r\n        {\r\n            if (channel == null || user == null) return;\r\n\r\n            _database.DeleteUserHistory(channel, user);\r\n\r\n            _database.Commit();\r\n        }\r\n\r\n        public void DeleteChannelMessages(TLInt channelId, TLVector<TLInt> ids)\r\n        {\r\n            if (ids == null || ids.Count == 0) return;\r\n\r\n            var channelContext = _database.ChannelsContext[channelId.Value];\r\n            if (channelContext != null)\r\n            {\r\n                var peer = new TLPeerChannel { Id = channelId };\r\n\r\n                var messages = new List<TLMessageBase>();\r\n                foreach (var id in ids)\r\n                {\r\n                    var message = channelContext[id.Value];\r\n                    if (message != null)\r\n                    {\r\n                        messages.Add(message);\r\n                    }\r\n                }\r\n\r\n                _database.DeleteMessages(messages, peer);\r\n            }\r\n\r\n            _database.Commit();\r\n        }\r\n\r\n        private void SyncContactsInternal(TLImportedContacts contacts, TLImportedContacts result)\r\n        {\r\n            var cache = contacts.Users.ToDictionary(x => x.Index);\r\n            foreach (var importedContact in contacts.Imported)\r\n            {\r\n                if (cache.ContainsKey(importedContact.UserId.Value))\r\n                {\r\n                    cache[importedContact.UserId.Value].ClientId = importedContact.ClientId;\r\n                }\r\n            }\r\n\r\n\r\n            foreach (var user in contacts.Users)\r\n            {\r\n                TLUserBase cachedUser = null;\r\n                if (UsersContext != null)\r\n                {\r\n                    cachedUser = UsersContext[user.Index];\r\n                }\r\n\r\n                if (cachedUser != null)\r\n                {\r\n                    var user45 = user as TLUser45;\r\n                    var isMinUser = user45 != null && user45.Min;\r\n\r\n                    // update fields\r\n                    if (user.GetType() == cachedUser.GetType())\r\n                    {\r\n                        cachedUser.Update(user);\r\n                        result.Users.Add(cachedUser);\r\n                    }\r\n                    else if (isMinUser)\r\n                    {\r\n                        result.Users.Add(cachedUser);\r\n                    }\r\n                    // or replace object\r\n                    else\r\n                    {\r\n                        _database.ReplaceUser(user.Index, user);\r\n                        result.Users.Add(user);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    // add object to cache\r\n                    result.Users.Add(user);\r\n                    _database.AddUser(user);\r\n                }\r\n\r\n            }\r\n\r\n            result.Imported = contacts.Imported;\r\n        }\r\n\r\n        public void SyncContacts(TLContactsBase contacts, Action<TLContactsBase> callback)\r\n        {\r\n            if (contacts == null)\r\n            {\r\n                callback(new TLContacts());\r\n                return;\r\n            }\r\n\r\n            if (contacts is TLContactsNotModified)\r\n            {\r\n                callback(contacts);\r\n                return;\r\n            }\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var result = contacts.GetEmptyObject();\r\n            if (_database == null) Init();\r\n\r\n            SyncContactsInternal((TLContacts)contacts, (TLContacts)result);\r\n\r\n            _database.Commit();\r\n\r\n            TLUtils.WritePerformance(\"SyncContacts time: \" + timer.Elapsed);\r\n            callback(result);\r\n        }\r\n\r\n        private void SyncContactsInternal(TLContacts contacts, TLContacts result)\r\n        {\r\n            var contactsCache = new Dictionary<int, TLContact>();\r\n            foreach (var contact in contacts.Contacts)\r\n            {\r\n                contactsCache[contact.UserId.Value] = contact;\r\n            }\r\n\r\n            foreach (var user in contacts.Users)\r\n            {\r\n                user.Contact = contactsCache[user.Index];\r\n\r\n                TLUserBase cachedUser = null;\r\n                if (UsersContext != null)\r\n                {\r\n                    cachedUser = UsersContext[user.Index];\r\n                }\r\n\r\n                if (cachedUser != null)\r\n                {\r\n                    var user45 = user as TLUser45;\r\n                    var isMinUser = user45 != null && user45.Min;\r\n\r\n                    // update fields\r\n                    if (user.GetType() == cachedUser.GetType())\r\n                    {\r\n                        cachedUser.Update(user);\r\n                        result.Users.Add(cachedUser);\r\n                    }\r\n                    else if (isMinUser)\r\n                    {\r\n                        result.Users.Add(cachedUser);\r\n                    }\r\n                    // or replace object\r\n                    else\r\n                    {\r\n                        _database.ReplaceUser(user.Index, user);\r\n                        result.Users.Add(user);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    // add object to cache\r\n                    result.Users.Add(user);\r\n                    _database.AddUser(user);\r\n                }\r\n\r\n            }\r\n\r\n            result.Contacts = contacts.Contacts;\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Config\r\n\r\n        private TLCdnConfig _cdnConfig;\r\n\r\n        private readonly object _cdnConfigSyncRoot = new object();\r\n\r\n        public void GetCdnConfigAsync(Action<TLCdnConfig> callback)\r\n        {\r\n            if (_cdnConfig == null)\r\n            {\r\n                _cdnConfig = TLUtils.OpenObjectFromMTProtoFile<TLCdnConfig>(_cdnConfigSyncRoot, Constants.CdnConfigFileName);\r\n            }\r\n\r\n            callback.SafeInvoke(_cdnConfig);\r\n        }\r\n\r\n        public TLCdnConfig GetCdnConfig()\r\n        {\r\n            if (_cdnConfig == null)\r\n            {\r\n                _cdnConfig = TLUtils.OpenObjectFromMTProtoFile<TLCdnConfig>(_cdnConfigSyncRoot, Constants.CdnConfigFileName);\r\n            }\r\n\r\n            return _cdnConfig;\r\n        }\r\n\r\n        public void SetCdnCofig(TLCdnConfig cdnConfig)\r\n        {\r\n            _cdnConfig = cdnConfig;\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_cdnConfigSyncRoot, Constants.CdnConfigFileName, _cdnConfig);\r\n        }\r\n\r\n        private TLConfig _config;\r\n\r\n        public TLConfig GetConfig()\r\n        {\r\n#if SILVERLIGHT || WIN_RT\r\n            if (_config == null)\r\n            {\r\n                _config = SettingsHelper.GetValue(Constants.ConfigKey) as TLConfig;\r\n            }\r\n#endif\r\n            return _config;\r\n        }\r\n\r\n\r\n        public void GetConfigAsync(Action<TLConfig> callback)\r\n        {\r\n            GetConfig();\r\n\r\n            callback.SafeInvoke(_config);\r\n        }\r\n\r\n        public void SetConfig(TLConfig config)\r\n        {\r\n            _config = config;\r\n#if SILVERLIGHT || WIN_RT\r\n            SettingsHelper.SetValue(Constants.ConfigKey, config);\r\n#endif\r\n        }\r\n\r\n        public void ClearConfigImportAsync()\r\n        {\r\n            GetConfigAsync(config =>\r\n            {\r\n                foreach (var option in config.DCOptions)\r\n                {\r\n                    option.IsAuthorized = false;\r\n                    //if (config.ThisDC.Value != option.Id.Value)\r\n                    //{\r\n                    //    option.IsAuthorized = false;\r\n                    //}\r\n                    //else\r\n                    //{\r\n                    //    option.IsAuthorized = true;\r\n                    //}\r\n                }\r\n\r\n                SetConfig(config);\r\n            });\r\n        }\r\n\r\n        #endregion\r\n\r\n        public IList<TLMessageBase> GetSendingMessages()\r\n        {\r\n            return RandomMessagesContext.Values.ToList();\r\n        }\r\n\r\n        public IList<TLMessageBase> GetResendingMessages()\r\n        {\r\n            return _database.ResendingMessages;\r\n        }\r\n\r\n        public IList<TLMessageBase> GetMessages()\r\n        {\r\n            var result = new List<TLMessageBase>();\r\n            foreach (var d in _database.Dialogs)\r\n            {\r\n                var dialog = d as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    foreach (var message in dialog.Messages)\r\n                    {\r\n                        result.Add(message);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n\r\n                    //var encryptedDialog = d as TLEncryptedDialog;\r\n                    //if (encryptedDialog != null)\r\n                    //{\r\n                    //    foreach (var message in encryptedDialog.Messages)\r\n                    //    {\r\n                    //        result.Add(message);\r\n                    //    }\r\n                    //}\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public void Commit()\r\n        {\r\n            if (_database != null)\r\n            {\r\n                _database.Commit();\r\n            }\r\n        }\r\n\r\n        public void CompressAsync(Action callback)\r\n        {\r\n            if (_database != null)\r\n            {\r\n                Execute.BeginOnThreadPool(() =>\r\n                {\r\n                    _database.Compress();\r\n\r\n                    callback.SafeInvoke();\r\n                });\r\n            }\r\n        }\r\n\r\n        public void ClearLocalFileNames()\r\n        {\r\n            if (_database != null)\r\n            {\r\n                _database.ClearLocalFileNames();\r\n            }\r\n        }\r\n\r\n        public bool TryCommit()\r\n        {\r\n            if (_database != null && _database.HasChanges)\r\n            {\r\n                _database.CommitInternal();\r\n                //Helpers.Execute.ShowDebugMessage(\"TryCommit result=true\");\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public void SaveSnapshot(string toDirectoryName)\r\n        {\r\n            if (_database != null)\r\n            {\r\n                _database.SaveSnapshot(toDirectoryName);\r\n            }\r\n        }\r\n\r\n        public void SaveTempSnapshot(string toDirectoryName)\r\n        {\r\n            if (_database != null)\r\n            {\r\n                _database.SaveTempSnapshot(toDirectoryName);\r\n            }\r\n        }\r\n\r\n        public void LoadSnapshot(string fromDirectoryName)\r\n        {\r\n            if (_database != null)\r\n            {\r\n                _database.LoadSnapshot(fromDirectoryName);\r\n                _database.Open();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/Cache/InMemoryDatabase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Reactive.Linq;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.TL;\r\n\r\n\r\nnamespace Telegram.Api.Services.Cache\r\n{\r\n    public class InMemoryDatabase : IDisposable\r\n    {\r\n        private volatile bool _isOpened;\r\n\r\n        public const string ProxyDataMTProtoFileName = \"proxy_data.dat\";\r\n\r\n        public const string DialogsMTProtoFileName = \"dialogs.dat\";\r\n\r\n        public const string UsersMTProtoFileName = \"users.dat\";\r\n\r\n        public const string ChatsMTProtoFileName = \"chats.dat\";\r\n\r\n        public const string BroadcastsMTProtoFileName = \"broadcasts.dat\";\r\n\r\n        public const string EncryptedChatsMTProtoFileName = \"encryptedChats.dat\";\r\n\r\n        public const string TempProxyDataMTProtoFileName = \"temp_proxy_data.dat\";\r\n\r\n        public const string TempDialogsMTProtoFileName = \"temp_dialogs.dat\";\r\n\r\n        public const string TempUsersMTProtoFileName = \"temp_users.dat\";\r\n\r\n        public const string TempChatsMTProtoFileName = \"temp_chats.dat\";\r\n\r\n        public const string TempBroadcastsMTProtoFileName = \"temp_broadcasts.dat\";\r\n\r\n        public const string TempEncryptedChatsMTProtoFileName = \"temp_encryptedChats.dat\";\r\n\r\n        private readonly object _proxyDataSyncRoot = new object();\r\n\r\n        private readonly object _dialogsFileSyncRoot = new object();\r\n\r\n        private readonly object _usersSyncRoot = new object();\r\n\r\n        private readonly object _chatsSyncRoot = new object();\r\n\r\n        private readonly object _broadcastsSyncRoot = new object();\r\n\r\n        private readonly object _encryptedChatsSyncRoot = new object();\r\n\r\n        public Context<TLMessageBase> MessagesContext = new Context<TLMessageBase>();\r\n\r\n        public Context<Context<TLMessageBase>> ChannelsContext = new Context<Context<TLMessageBase>>();\r\n\r\n        public Context<TLDecryptedMessageBase> DecryptedMessagesContext = new Context<TLDecryptedMessageBase>();\r\n\r\n        public Context<TLMessageBase> RandomMessagesContext = new Context<TLMessageBase>();\r\n\r\n        public Context<TLDialogBase> DialogsContext = new Context<TLDialogBase>();\r\n\r\n        public Context<TLUserBase> UsersContext = new Context<TLUserBase>();\r\n\r\n        public Context<TLChatBase> ChatsContext = new Context<TLChatBase>();\r\n\r\n        public Context<TLBroadcastChat> BroadcastsContext = new Context<TLBroadcastChat>();\r\n\r\n        public Context<TLEncryptedChatBase> EncryptedChatsContext = new Context<TLEncryptedChatBase>();\r\n\r\n        public TLProxyDataBase ProxyData { get; set; }\r\n\r\n        private readonly object _dialogsSyncRoot = new object();\r\n\r\n        public ObservableCollection<TLDialogBase> Dialogs { get; set; }\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        private readonly IDisposable _commitSubscription;\r\n\r\n        public volatile bool HasChanges;\r\n\r\n        public InMemoryDatabase(ITelegramEventAggregator eventAggregator)\r\n        {\r\n            var commitEvents = Observable.FromEventPattern<EventHandler, System.EventArgs>(\r\n                keh => { CommitInvoked += keh; },\r\n                keh => { CommitInvoked -= keh; });\r\n\r\n            _commitSubscription = commitEvents\r\n                .Throttle(TimeSpan.FromSeconds(Constants.CommitDBInterval))\r\n                .Subscribe(e => CommitInternal());\r\n\r\n            //commitEvents.Publish()\r\n\r\n            Dialogs = new ObservableCollection<TLDialogBase>();\r\n            _eventAggregator = eventAggregator;\r\n        }\r\n\r\n        public void AddDialog(TLDialog dialog)\r\n        {\r\n            if (dialog != null)\r\n            {\r\n                DialogsContext[dialog.Index] = dialog;\r\n\r\n                var topMessage = (TLMessageCommon)dialog.TopMessage;\r\n\r\n                // add in desc order by Date\r\n                var isAdded = false;\r\n\r\n                lock (_dialogsSyncRoot)\r\n                {\r\n                    for (var i = 0; i < Dialogs.Count; i++)\r\n                    {\r\n                        var d = Dialogs[i] as TLDialog;\r\n                        var ed = Dialogs[i] as TLEncryptedDialog;\r\n                        if (d != null)\r\n                        {\r\n                            var currentDateIndex = d.GetDateIndex();\r\n\r\n                            if (currentDateIndex != 0\r\n                                && currentDateIndex < dialog.GetDateIndex())\r\n                            {\r\n                                isAdded = true;\r\n                                Dialogs.Insert(i, dialog);\r\n                                break;\r\n                            }\r\n                        }\r\n                        else if (ed != null)\r\n                        {\r\n                            var currentDateIndex = ed.GetDateIndex();\r\n                            if (currentDateIndex != 0\r\n                                && currentDateIndex < dialog.GetDateIndex())\r\n                            {\r\n                                isAdded = true;\r\n                                Dialogs.Insert(i, dialog);\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                    if (!isAdded)\r\n                    {\r\n                        Dialogs.Add(dialog);\r\n                    }\r\n                }\r\n\r\n                //sync topMessage\r\n                AddMessageToContext(topMessage);\r\n                //MessagesContext[topMessage.Index] = topMessage;\r\n\r\n            }\r\n        }\r\n\r\n        //private TLMessageBase GetMessageFromContext(long commonId)\r\n        //{\r\n        //    if (RandomMessagesContext.ContainsKey(commonId))\r\n        //    {\r\n        //        return RandomMessagesContext[commonId];\r\n        //    }\r\n\r\n        //    if (MessagesContext.ContainsKey(commonId))\r\n        //    {\r\n        //        return MessagesContext[commonId];\r\n        //    }\r\n\r\n        //    return null;\r\n        //}\r\n\r\n        public void RemoveMessageFromContext(TLMessageBase message)\r\n        {\r\n            if (message.Index != 0)\r\n            {\r\n                TLPeerChannel peerChannel;\r\n                if (TLUtils.IsChannelMessage(message, out peerChannel))\r\n                {\r\n                    var channelContext = ChannelsContext[peerChannel.Id.Value];\r\n                    if (channelContext != null)\r\n                    {\r\n                        channelContext.Remove(message.Index);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    MessagesContext.Remove(message.Index);\r\n                }\r\n            }\r\n            if (message.RandomIndex != 0)\r\n            {\r\n                RandomMessagesContext.Remove(message.RandomIndex);\r\n            }\r\n        }\r\n\r\n        public void RemoveDecryptedMessageFromContext(TLDecryptedMessageBase message)\r\n        {\r\n            if (message.RandomIndex != 0)\r\n            {\r\n                DecryptedMessagesContext.Remove(message.RandomIndex);\r\n            }\r\n            //if (message.RandomIndex != 0)\r\n            //{\r\n            //    RandomMessagesContext.Remove(message.RandomIndex);\r\n            //}\r\n        }\r\n\r\n        public void AddMessageToContext(TLMessageBase message)\r\n        {\r\n            if (message.Index != 0)\r\n            {\r\n                TLPeerChannel peerChannel;\r\n                if (TLUtils.IsChannelMessage(message, out peerChannel))\r\n                {\r\n                    var channelContext = ChannelsContext[peerChannel.Id.Value];\r\n                    if (channelContext == null)\r\n                    {\r\n                        channelContext = new Context<TLMessageBase>();\r\n                        ChannelsContext[peerChannel.Id.Value] = channelContext;\r\n                    }\r\n\r\n                    channelContext[message.Index] = message;\r\n                }\r\n                else\r\n                {\r\n                    MessagesContext[message.Index] = message;\r\n                }\r\n            }\r\n            else if (message.RandomIndex != 0)\r\n            {\r\n                RandomMessagesContext[message.RandomIndex] = message;\r\n            }\r\n            else\r\n            {\r\n                Execute.ShowDebugMessage(\"MsgId and RandomMsgId are zero\");\r\n                //throw new Exception(\"MsgId and RandomMsgId are zero\");\r\n            }\r\n        }\r\n\r\n        public void AddDecryptedMessageToContext(TLDecryptedMessageBase message)\r\n        {\r\n            if (message.RandomIndex != 0)\r\n            {\r\n                DecryptedMessagesContext[message.RandomIndex] = message;\r\n            }\r\n            else\r\n            {\r\n                throw new Exception(\"RandomId is zero for DecryptedMessage\");\r\n            }\r\n        }\r\n\r\n        public void AddUser(TLUserBase user)\r\n        {\r\n            if (user != null)\r\n            {\r\n                UsersContext[user.Index] = user;\r\n            }\r\n        }\r\n\r\n        public void AddChat(TLChatBase chat)\r\n        {\r\n            if (chat != null)\r\n            {\r\n                ChatsContext[chat.Index] = chat;\r\n            }\r\n        }\r\n\r\n        public void AddEncryptedChat(TLEncryptedChatBase chat)\r\n        {\r\n            if (chat != null)\r\n            {\r\n                EncryptedChatsContext[chat.Index] = chat;\r\n            }\r\n        }\r\n\r\n        public void AddBroadcast(TLBroadcastChat broadcast)\r\n        {\r\n            if (broadcast != null)\r\n            {\r\n                BroadcastsContext[broadcast.Index] = broadcast;\r\n            }\r\n        }\r\n\r\n        public void SaveSnapshot(string toDirectoryName)\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            CopyInternal(_usersSyncRoot, UsersMTProtoFileName, Path.Combine(toDirectoryName, UsersMTProtoFileName));\r\n            CopyInternal(_chatsSyncRoot, ChatsMTProtoFileName, Path.Combine(toDirectoryName, ChatsMTProtoFileName));\r\n            CopyInternal(_broadcastsSyncRoot, BroadcastsMTProtoFileName, Path.Combine(toDirectoryName, BroadcastsMTProtoFileName));\r\n            CopyInternal(_encryptedChatsSyncRoot, EncryptedChatsMTProtoFileName, Path.Combine(toDirectoryName, EncryptedChatsMTProtoFileName));\r\n            CopyInternal(_dialogsFileSyncRoot, DialogsMTProtoFileName, Path.Combine(toDirectoryName, DialogsMTProtoFileName));\r\n            CopyInternal(_proxyDataSyncRoot, ProxyDataMTProtoFileName, Path.Combine(toDirectoryName, ProxyDataMTProtoFileName));\r\n\r\n            TLUtils.WritePerformance(\"Save DB snapshot time: \" + timer.Elapsed);\r\n        }\r\n\r\n        public void SaveTempSnapshot(string toDirectoryName)\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            CopyInternal(_usersSyncRoot, TempUsersMTProtoFileName, Path.Combine(toDirectoryName, UsersMTProtoFileName));\r\n            CopyInternal(_chatsSyncRoot, TempChatsMTProtoFileName, Path.Combine(toDirectoryName, ChatsMTProtoFileName));\r\n            CopyInternal(_broadcastsSyncRoot, TempBroadcastsMTProtoFileName, Path.Combine(toDirectoryName, BroadcastsMTProtoFileName));\r\n            CopyInternal(_encryptedChatsSyncRoot, TempEncryptedChatsMTProtoFileName, Path.Combine(toDirectoryName, EncryptedChatsMTProtoFileName));\r\n            CopyInternal(_dialogsFileSyncRoot, TempDialogsMTProtoFileName, Path.Combine(toDirectoryName, DialogsMTProtoFileName));\r\n            CopyInternal(_proxyDataSyncRoot, TempProxyDataMTProtoFileName, Path.Combine(toDirectoryName, ProxyDataMTProtoFileName));\r\n\r\n            TLUtils.WritePerformance(\"Save DB snapshot time: \" + timer.Elapsed);\r\n        }\r\n\r\n        private void CopyInternal(object syncRoot, string fileName, string destinationFileName)\r\n        {\r\n            FileUtils.Copy(syncRoot, fileName, destinationFileName);\r\n        }\r\n\r\n        public void LoadSnapshot(string fromDirectoryName)\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            CopyInternal(_usersSyncRoot, Path.Combine(fromDirectoryName, UsersMTProtoFileName), UsersMTProtoFileName);\r\n            CopyInternal(_chatsSyncRoot, Path.Combine(fromDirectoryName, ChatsMTProtoFileName), ChatsMTProtoFileName);\r\n            CopyInternal(_broadcastsSyncRoot, Path.Combine(fromDirectoryName, BroadcastsMTProtoFileName), BroadcastsMTProtoFileName);\r\n            CopyInternal(_encryptedChatsSyncRoot, Path.Combine(fromDirectoryName, EncryptedChatsMTProtoFileName), EncryptedChatsMTProtoFileName);\r\n            CopyInternal(_dialogsFileSyncRoot, Path.Combine(fromDirectoryName, DialogsMTProtoFileName), DialogsMTProtoFileName);\r\n            CopyInternal(_proxyDataSyncRoot, Path.Combine(fromDirectoryName, ProxyDataMTProtoFileName), ProxyDataMTProtoFileName);\r\n\r\n            TLUtils.WritePerformance(\"Load DB snapshot time: \" + timer.Elapsed);\r\n        }\r\n\r\n        public void Clear()\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            Dialogs.Clear();\r\n            UsersContext.Clear();\r\n            ChatsContext.Clear();\r\n            BroadcastsContext.Clear();\r\n            EncryptedChatsContext.Clear();\r\n            DialogsContext.Clear();\r\n            ProxyData = null;\r\n\r\n            ClearInternal(_usersSyncRoot, UsersMTProtoFileName);\r\n            ClearInternal(_chatsSyncRoot, ChatsMTProtoFileName);\r\n            ClearInternal(_broadcastsSyncRoot, BroadcastsMTProtoFileName);\r\n            ClearInternal(_encryptedChatsSyncRoot, EncryptedChatsMTProtoFileName);\r\n            ClearInternal(_dialogsFileSyncRoot, DialogsMTProtoFileName);\r\n            ClearInternal(_proxyDataSyncRoot, ProxyDataMTProtoFileName);\r\n\r\n            TLUtils.WritePerformance(\"Clear DB time: \" + timer.Elapsed);\r\n        }\r\n\r\n        private void ClearInternal(object syncRoot, string fileName)\r\n        {\r\n            FileUtils.Delete(syncRoot, fileName);\r\n        }\r\n\r\n        private void AddDecryptedMessageCommon(TLDecryptedMessageBase message, TLEncryptedChatBase p, bool notifyNewDialogs, Func<IList<TLDecryptedMessageBase>, bool> insertAction)\r\n        {\r\n            if (message != null)\r\n            {\r\n                AddDecryptedMessageToContext(message);\r\n\r\n                var isUnread = !message.Out.Value && message.Unread.Value;\r\n\r\n                var dialog = GetEncryptedDialog(message);\r\n\r\n                if (dialog != null)\r\n                {\r\n                    if (dialog.Messages.Count > 0)\r\n                    {\r\n                        var isAdded = insertAction(dialog.Messages);\r\n\r\n                        if (!isAdded)\r\n                        {\r\n                            dialog.Messages.Add(message);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        dialog.Messages.Add(message);\r\n                    }\r\n\r\n                    if (isUnread)\r\n                    {\r\n                        var isDisplayedMessage = TLUtils.IsDisplayedDecryptedMessage(message);\r\n\r\n                        if (isDisplayedMessage)\r\n                        {\r\n                            dialog.UnreadCount = new TLInt(dialog.UnreadCount.Value + 1);\r\n                        }\r\n                    }\r\n\r\n                    CorrectDialogOrder(dialog, dialog.GetDateIndex(), 0);\r\n\r\n                    if (dialog.Messages[0] == message)\r\n                    {\r\n                        dialog.TopMessage = message;\r\n                        dialog.TopDecryptedMessageRandomId = message.RandomId;\r\n                        if (_eventAggregator != null)\r\n                        {\r\n                            _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialog, message));\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    var currentUserId = MTProtoService.Instance.CurrentUserId;\r\n                    TLInt withId;\r\n                    TLObject with = null;\r\n\r\n                    var encryptedChatCommmon = p as TLEncryptedChatCommon;\r\n                    if (encryptedChatCommmon != null)\r\n                    {\r\n                        withId = encryptedChatCommmon.AdminId.Value == currentUserId.Value\r\n                            ? encryptedChatCommmon.ParticipantId\r\n                            : encryptedChatCommmon.AdminId;\r\n\r\n                        with = UsersContext[withId.Value];\r\n                    }\r\n\r\n\r\n                    TLPeerBase peer = new TLPeerEncryptedChat { Id = message.ChatId };\r\n                    int index = 0;\r\n\r\n                    var addingDialog = new TLEncryptedDialog\r\n                    {\r\n                        Peer = peer,\r\n                        With = with,\r\n                        Messages = new ObservableCollection<TLDecryptedMessageBase> { message },\r\n                        TopDecryptedMessageRandomId = message.RandomId,\r\n                        TopMessage = message,\r\n                        UnreadCount = isUnread ? new TLInt(1) : new TLInt(0)\r\n                    };\r\n\r\n                    lock (_dialogsSyncRoot)\r\n                    {\r\n                        for (var i = 0; i < Dialogs.Count; i++)\r\n                        {\r\n                            if (Dialogs[i].GetDateIndex() < message.DateIndex)\r\n                            {\r\n                                index = i;\r\n                                break;\r\n                            }\r\n                        }\r\n\r\n                        Dialogs.Insert(index, addingDialog);\r\n                        DialogsContext[addingDialog.Index] = addingDialog;\r\n                    }\r\n                    if (_eventAggregator != null && notifyNewDialogs)\r\n                    {\r\n                        _eventAggregator.Publish(new DialogAddedEventArgs(addingDialog));\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                throw new NotImplementedException();\r\n            }\r\n        }\r\n\r\n        private void CorrectDialogOrder(TLDialogBase dialog, int dateIndex, int messageId)\r\n        {\r\n            var isInserted = false;\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                Dialogs.Remove(dialog);\r\n                for (var i = 0; i < Dialogs.Count; i++)\r\n                {\r\n                    if (Dialogs[i].GetDateIndex() < dateIndex)\r\n                    {\r\n                        Dialogs.Insert(i, dialog);\r\n                        isInserted = true;\r\n                        break;\r\n                    }\r\n\r\n                    // в бродкастах дата у всех сообщений совпадает: правильный порядок можно определить по индексу сообщения\r\n                    if (Dialogs[i].GetDateIndex() == dateIndex)\r\n                    {\r\n                        var currentMessageId = Dialogs[i].TopMessageId != null ? Dialogs[i].TopMessageId.Value : 0;\r\n\r\n                        if (currentMessageId != 0 && messageId != 0)\r\n                        {\r\n                            if (currentMessageId < messageId)\r\n                            {\r\n                                Dialogs.Insert(i, dialog);\r\n                                isInserted = true;\r\n                                break;\r\n                            }\r\n\r\n                            Dialogs.Insert(i + 1, dialog);\r\n                            isInserted = true;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (!isInserted)\r\n                {\r\n                    Dialogs.Add(dialog);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void AddMessageCommon(TLMessageBase message, bool notifyNewDialogs, bool notifyTopMessageUpdated, Func<IList<TLMessageBase>, bool> insertAction)\r\n        {\r\n            if (message != null)\r\n            {\r\n                AddMessageToContext(message);\r\n\r\n                var commonMessage = message as TLMessageCommon;\r\n                if (commonMessage != null)\r\n                {\r\n                    var message70 = commonMessage as TLMessage70;\r\n                    var isUnread = !commonMessage.Out.Value && commonMessage.Unread.Value;\r\n                    var isUnreadMention = isUnread && message70 != null && message70.IsMention && message70.FwdHeader == null;\r\n\r\n                    var dialogBase = GetDialog(commonMessage);\r\n                    if (dialogBase != null)\r\n                    {\r\n                        var dialog = dialogBase as TLDialog;\r\n                        if (dialog != null)\r\n                        {\r\n                            if (dialog.Messages.Count > 0)\r\n                            {\r\n                                var isAdded = insertAction(dialog.Messages);\r\n\r\n                                if (!isAdded)\r\n                                {\r\n                                    dialog.Messages.Add(commonMessage);\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                dialog.Messages.Add(commonMessage);\r\n                            }\r\n\r\n                            if (isUnread && dialog.TopMessage != null && dialog.TopMessage.Index < commonMessage.Index)\r\n                            {\r\n                                dialogBase.UnreadCount = new TLInt(dialogBase.UnreadCount.Value + 1);\r\n                                if (isUnreadMention)\r\n                                {\r\n                                    var dialog71 = dialogBase as TLDialog71;\r\n                                    if (dialog71 != null)\r\n                                    {\r\n                                        dialog71.UnreadMentionsCount = new TLInt(dialog71.UnreadMentionsCount.Value + 1);\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            if (dialog.TopMessage != null)\r\n                            {\r\n                                CorrectDialogOrder(dialogBase, dialog.GetDateIndex(), dialog.TopMessage.Index);\r\n                            }\r\n\r\n                            if (dialog.Messages[0] == commonMessage)\r\n                            {\r\n                                if (notifyTopMessageUpdated)\r\n                                {\r\n                                    dialog._topMessage = commonMessage;\r\n                                    Helpers.Execute.BeginOnUIThread(() => dialog.NotifyOfPropertyChange(() => dialog.TopMessage));\r\n                                }\r\n                                else\r\n                                {\r\n                                    dialog._topMessage = commonMessage;\r\n                                }\r\n                                dialog.TopMessageId = commonMessage.Id;\r\n                                dialog.TopMessageRandomId = commonMessage.RandomId;\r\n                                if (_eventAggregator != null && notifyTopMessageUpdated)\r\n                                {\r\n                                    Helpers.Execute.BeginOnThreadPool(() => _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialogBase, commonMessage)));\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var broadcast = dialogBase as TLBroadcastDialog;\r\n                        if (broadcast != null)\r\n                        {\r\n                            if (broadcast.Messages.Count > 0)\r\n                            {\r\n                                var isAdded = insertAction(broadcast.Messages);\r\n\r\n                                if (!isAdded)\r\n                                {\r\n                                    broadcast.Messages.Add(commonMessage);\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                broadcast.Messages.Add(commonMessage);\r\n                            }\r\n\r\n                            if (isUnread && broadcast.TopMessage != null && broadcast.TopMessage.Index < commonMessage.Index)\r\n                            {\r\n                                dialogBase.UnreadCount = new TLInt(dialogBase.UnreadCount.Value + 1);\r\n                            }\r\n\r\n                            if (broadcast.TopMessage != null)\r\n                            {\r\n                                CorrectDialogOrder(dialogBase, broadcast.GetDateIndex(), broadcast.TopMessage.Index);\r\n                            }\r\n\r\n                            if (broadcast.Messages[0] == commonMessage)\r\n                            {\r\n                                if (notifyTopMessageUpdated)\r\n                                {\r\n                                    broadcast._topMessage = commonMessage;\r\n                                    Helpers.Execute.BeginOnUIThread(() => broadcast.NotifyOfPropertyChange(() => broadcast.TopMessage));\r\n                                }\r\n                                else\r\n                                {\r\n                                    broadcast._topMessage = commonMessage;\r\n                                }\r\n                                broadcast.TopMessageId = commonMessage.Id;\r\n                                broadcast.TopMessageRandomId = commonMessage.RandomId;\r\n                                if (_eventAggregator != null && notifyTopMessageUpdated)\r\n                                {\r\n                                    _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialogBase, commonMessage));\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        TLObject with;\r\n\r\n                        TLPeerBase peer;\r\n\r\n                        if (commonMessage.ToId is TLPeerChannel)\r\n                        {\r\n                            peer = commonMessage.ToId;\r\n                        }\r\n                        else if (commonMessage.ToId is TLPeerBroadcast)\r\n                        {\r\n                            peer = commonMessage.ToId;\r\n                        }\r\n                        else if (commonMessage.ToId is TLPeerChat)\r\n                        {\r\n                            peer = commonMessage.ToId;\r\n                        }\r\n                        else\r\n                        {\r\n                            if (commonMessage.Out.Value)\r\n                            {\r\n                                peer = commonMessage.ToId;\r\n                            }\r\n                            else\r\n                            {\r\n                                peer = new TLPeerUser { Id = commonMessage.FromId };\r\n                            }\r\n                        }\r\n\r\n                        if (peer is TLPeerChannel)\r\n                        {\r\n                            with = ChatsContext[peer.Id.Value];\r\n                        }\r\n                        else if (peer is TLPeerBroadcast)\r\n                        {\r\n                            with = BroadcastsContext[peer.Id.Value];\r\n                        }\r\n                        else if (peer is TLPeerChat)\r\n                        {\r\n                            with = ChatsContext[peer.Id.Value];\r\n                        }\r\n                        else\r\n                        {\r\n                            with = UsersContext[peer.Id.Value];\r\n                        }\r\n                        int index = 0;\r\n\r\n\r\n                        TLDialogBase addingDialog;\r\n\r\n                        if (peer is TLPeerBroadcast)\r\n                        {\r\n                            addingDialog = new TLBroadcastDialog\r\n                            {\r\n                                Peer = peer,\r\n                                With = with,\r\n                                Messages = new ObservableCollection<TLMessageBase> { commonMessage },\r\n                                TopMessageId = commonMessage.Id,\r\n                                TopMessageRandomId = commonMessage.RandomId,\r\n                                TopMessage = commonMessage,\r\n                                UnreadCount = isUnread ? new TLInt(1) : new TLInt(0)\r\n                            };\r\n                        }\r\n                        else if (peer is TLPeerChannel)\r\n                        {\r\n                            addingDialog = new TLDialog71\r\n                            {\r\n                                Flags = new TLInt(0),\r\n                                Peer = peer,\r\n                                With = with,\r\n                                Messages = new ObservableCollection<TLMessageBase> { commonMessage },\r\n                                TopMessageId = commonMessage.Id,\r\n                                TopMessageRandomId = commonMessage.RandomId,\r\n                                TopMessage = commonMessage,\r\n                                UnreadCount = isUnread ? new TLInt(1) : new TLInt(0),\r\n                                UnreadMentionsCount = isUnreadMention ? new TLInt(1) : new TLInt(0),\r\n                                ReadInboxMaxId = new TLInt(0),\r\n                                ReadOutboxMaxId = new TLInt(0),\r\n\r\n                                Pts = new TLInt(0)\r\n                            };\r\n                        }\r\n                        else\r\n                        {\r\n                            addingDialog = new TLDialog71\r\n                            {\r\n                                Flags = new TLInt(0),\r\n                                Peer = peer,\r\n                                With = with,\r\n                                Messages = new ObservableCollection<TLMessageBase> { commonMessage },\r\n                                TopMessageId = commonMessage.Id,\r\n                                TopMessageRandomId = commonMessage.RandomId,\r\n                                TopMessage = commonMessage,\r\n                                UnreadCount = isUnread ? new TLInt(1) : new TLInt(0),\r\n                                UnreadMentionsCount = isUnreadMention ? new TLInt(1) : new TLInt(0),\r\n                                ReadInboxMaxId = new TLInt(0),\r\n                                ReadOutboxMaxId = new TLInt(0)\r\n                            };\r\n                        }\r\n\r\n\r\n                        lock (_dialogsSyncRoot)\r\n                        {\r\n                            for (var i = 0; i < Dialogs.Count; i++)\r\n                            {\r\n                                if (Dialogs[i].GetDateIndex() < message.DateIndex)\r\n                                {\r\n                                    index = i;\r\n                                    break;\r\n                                }\r\n                            }\r\n\r\n                            Dialogs.Insert(index, addingDialog);\r\n                            DialogsContext[addingDialog.Index] = addingDialog;\r\n                        }\r\n                        if (_eventAggregator != null && notifyNewDialogs)\r\n                        {\r\n                            _eventAggregator.Publish(new DialogAddedEventArgs(addingDialog));\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n\r\n            }\r\n        }\r\n\r\n        private TLEncryptedDialog GetEncryptedDialog(TLInt id)\r\n        {\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                foreach (var d in Dialogs)\r\n                {\r\n                    if (d.Peer is TLPeerEncryptedChat\r\n                        && d.Peer.Id.Value == id.Value)\r\n                    {\r\n                        return d as TLEncryptedDialog;\r\n                    }\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n\r\n        private TLEncryptedDialog GetEncryptedDialog(TLEncryptedChatBase peer)\r\n        {\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                foreach (var d in Dialogs)\r\n                {\r\n                    if (d.Peer is TLPeerEncryptedChat\r\n                        && d.Peer.Id.Value == peer.Id.Value)\r\n                    {\r\n                        return d as TLEncryptedDialog;\r\n                    }\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n\r\n        private TLEncryptedDialog GetEncryptedDialog(TLDecryptedMessageBase commonMessage)\r\n        {\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                foreach (var d in Dialogs)\r\n                {\r\n                    if (d.Peer is TLPeerEncryptedChat\r\n                        //&& message.ToId is TLPeerChat\r\n                        && d.Peer.Id.Value == commonMessage.ChatId.Value)\r\n                    {\r\n                        return d as TLEncryptedDialog;\r\n                    }\r\n                }\r\n\r\n                //dialog = Dialogs.FirstOrDefault(x => x.WithId == peer.Id.Value && x.IsChat == peer is TLPeerChat);\r\n            }\r\n            return null;\r\n        }\r\n\r\n        public TLDialogBase GetDialog(TLPeerBase peer)\r\n        {\r\n            TLDialogBase result = null;\r\n\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                foreach (var d in Dialogs)\r\n                {\r\n                    if (d.Peer.Id.Value == peer.Id.Value)\r\n                    {\r\n                        if (d.Peer is TLPeerChannel\r\n                            && peer is TLPeerChannel)\r\n                        {\r\n                            result = d as TLDialog;\r\n                            if (result != null) break;\r\n                        }\r\n\r\n                        if (d.Peer is TLPeerChat\r\n                            && peer is TLPeerChat)\r\n                        {\r\n                            result = d as TLDialog;\r\n                            if (result != null) break;\r\n                        }\r\n\r\n                        if (d.Peer is TLPeerUser\r\n                            && peer is TLPeerUser)\r\n                        {\r\n                            result = d as TLDialog;\r\n                            if (result != null) break;\r\n                        }\r\n\r\n                        if (d.Peer is TLPeerBroadcast\r\n                            && peer is TLPeerBroadcast)\r\n                        {\r\n                            result = d as TLBroadcastDialog;\r\n                            if (result != null) break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        private TLDialogBase GetDialog(TLMessageCommon commonMessage)\r\n        {\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                foreach (var d in Dialogs)\r\n                {\r\n                    if (d.Peer is TLPeerChat\r\n                        && commonMessage.ToId is TLPeerChat\r\n                        && d.Peer.Id.Value == commonMessage.ToId.Id.Value)\r\n                    {\r\n                        return d as TLDialog;\r\n                    }\r\n\r\n                    if (d.Peer is TLPeerUser\r\n                        && commonMessage.ToId is TLPeerUser\r\n                        && commonMessage.Out.Value\r\n                        && d.Peer.Id.Value == commonMessage.ToId.Id.Value)\r\n                    {\r\n                        return d as TLDialog;\r\n                    }\r\n\r\n                    if (d.Peer is TLPeerUser\r\n                        && commonMessage.ToId is TLPeerUser\r\n                        && !commonMessage.Out.Value\r\n                        && d.Peer.Id.Value == commonMessage.FromId.Value)\r\n                    {\r\n                        return d as TLDialog;\r\n                    }\r\n\r\n                    if (d.Peer is TLPeerBroadcast\r\n                        && commonMessage.ToId is TLPeerBroadcast\r\n                        && d.Peer.Id.Value == commonMessage.ToId.Id.Value)\r\n                    {\r\n                        return d as TLBroadcastDialog;\r\n                    }\r\n\r\n                    if (d.Peer is TLPeerChannel\r\n                        && commonMessage.ToId is TLPeerChannel\r\n                        && d.Peer.Id.Value == commonMessage.ToId.Id.Value)\r\n                    {\r\n                        return d as TLDialogBase;\r\n                    }\r\n                }\r\n\r\n                //dialog = Dialogs.FirstOrDefault(x => x.WithId == peer.Id.Value && x.IsChat == peer is TLPeerChat);\r\n            }\r\n            return null;\r\n        }\r\n\r\n        public void UpdateSendingMessageContext(TLMessageBase message)\r\n        {\r\n            RemoveMessageFromContext(message);\r\n\r\n            message.RandomId = null;\r\n\r\n            AddMessageToContext(message);\r\n        }\r\n\r\n        public void UpdateSendingMessage(TLMessageBase message, TLMessageBase cachedMessage)\r\n        {\r\n            RemoveMessageFromContext(cachedMessage);\r\n\r\n            cachedMessage.Update(message);\r\n            cachedMessage.RandomId = null;\r\n\r\n            AddMessageToContext(cachedMessage);\r\n\r\n            var commonMessage = message as TLMessageCommon;\r\n            if (commonMessage == null)\r\n            {\r\n                return;\r\n            }\r\n            var dialog = GetDialog(commonMessage) as TLDialog;\r\n\r\n            if (dialog != null)\r\n            {\r\n                bool notify = false;\r\n                lock (dialog.MessagesSyncRoot)\r\n                {\r\n                    var oldMessage = dialog.Messages.FirstOrDefault(x => x.Index == cachedMessage.Index);\r\n                    if (oldMessage != null)\r\n                    {\r\n                        dialog.Messages.Remove(oldMessage);\r\n                        TLDialog.InsertMessageInOrder(dialog.Messages, cachedMessage);\r\n                        if (dialog.TopMessageId == null || dialog.TopMessageId.Value < cachedMessage.Index)\r\n                        {\r\n                            dialog._topMessage = cachedMessage;\r\n                            dialog.TopMessageId = cachedMessage.Id;\r\n                            dialog.TopMessageRandomId = cachedMessage.RandomId;\r\n                            notify = true;\r\n                        }\r\n                    }\r\n                }\r\n                if (notify)\r\n                {\r\n                    _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialog, cachedMessage));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void UpdateSendingDecryptedMessage(TLInt chatId, TLInt date, TLDecryptedMessageBase cachedMessage)\r\n        {\r\n            RemoveDecryptedMessageFromContext(cachedMessage);\r\n\r\n            cachedMessage.Date = date;\r\n\r\n            AddDecryptedMessageToContext(cachedMessage);\r\n\r\n            var dialog = GetEncryptedDialog(chatId);\r\n\r\n            if (dialog != null)\r\n            {\r\n                var oldMessage = dialog.Messages.FirstOrDefault(x => x.RandomIndex == cachedMessage.RandomIndex);\r\n                if (oldMessage != null)\r\n                {\r\n                    dialog.Messages.Remove(oldMessage);\r\n                    TLEncryptedDialog.InsertMessageInOrder(dialog.Messages, cachedMessage);\r\n                    if (dialog.TopDecryptedMessageRandomId == null || dialog.TopDecryptedMessageRandomId.Value != cachedMessage.RandomIndex)\r\n                    {\r\n                        dialog._topMessage = cachedMessage;\r\n                        dialog.TopDecryptedMessageRandomId = cachedMessage.RandomId;\r\n                        _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialog, cachedMessage));\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void AddSendingMessage(TLMessageBase message, TLMessageBase previousMessage)\r\n        {\r\n            AddMessageCommon(\r\n                message, true, true,\r\n                messages =>\r\n                {\r\n                    if (previousMessage == null)\r\n                    {\r\n                        messages.Insert(0, message);\r\n                        return true;\r\n                    }\r\n\r\n                    for (var i = 0; i < messages.Count; i++)\r\n                    {\r\n                        if (messages[i] == previousMessage)\r\n                        {\r\n                            messages.Insert(i, message);\r\n                            return true;\r\n                        }\r\n                    }\r\n\r\n                    if (previousMessage.Index > 0)\r\n                    {\r\n                        for (var i = 0; i < messages.Count; i++)\r\n                        {\r\n                            if (messages[i].Index > 0 && previousMessage.Index > messages[i].Index)\r\n                            {\r\n                                messages.Insert(i, message);\r\n                                return true;\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        for (var i = 0; i < messages.Count; i++)\r\n                        {\r\n                            if (messages[i].DateIndex > 0 && previousMessage.DateIndex > messages[i].DateIndex)\r\n                            {\r\n                                messages.Insert(i, message);\r\n                                return true;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    return false;\r\n                });\r\n        }\r\n\r\n        public void AddSendingMessage(TLMessageBase message, TLMessageBase previousMessage, bool notifyNewDialog, bool notifyTopMessageUpdated)\r\n        {\r\n            AddMessageCommon(\r\n                message, notifyNewDialog, notifyTopMessageUpdated,\r\n                messages =>\r\n                {\r\n                    if (previousMessage == null)\r\n                    {\r\n                        messages.Insert(0, message);\r\n                        return true;\r\n                    }\r\n\r\n                    for (var i = 0; i < messages.Count; i++)\r\n                    {\r\n                        if (messages[i] == previousMessage)\r\n                        {\r\n                            messages.Insert(i, message);\r\n                            return true;\r\n                        }\r\n                    }\r\n\r\n                    return false;\r\n                });\r\n        }\r\n\r\n\r\n        public void AddDecryptedMessage(TLDecryptedMessageBase message, TLEncryptedChatBase peer, bool notifyNewDialogs = true)\r\n        {\r\n            AddDecryptedMessageCommon(\r\n                message, peer, notifyNewDialogs,\r\n                messages =>\r\n                {\r\n                    for (var i = 0; i < messages.Count; i++)\r\n                    {\r\n                        if (messages[i].DateIndex < message.DateIndex)\r\n                        {\r\n                            messages.Insert(i, message);\r\n                            return true;\r\n                        }\r\n\r\n                        if (messages[i].DateIndex == message.DateIndex)\r\n                        {\r\n                            // TODO: fix for randomId and id (messages[i] has only randomId)\r\n                            //if (messages[i].RandomIndex == 0)\r\n                            //{\r\n                            //    messages.Insert(i, message);\r\n                            //    return true;\r\n                            //}\r\n\r\n                            //if (messages[i].RandomIndex < message.RandomIndex)\r\n                            //{\r\n                            //    messages.Insert(i, message);\r\n                            //    return true;\r\n                            //}\r\n\r\n                            if (messages[i].RandomIndex == message.RandomIndex)\r\n                            {\r\n                                return true;\r\n                            }\r\n\r\n                            messages.Insert(i, message);\r\n\r\n                            return true;\r\n                        }\r\n                    }\r\n\r\n                    return false;\r\n                });\r\n        }\r\n\r\n        public void AddMessage(TLMessageBase message, bool notifyNewDialogs = true, bool notifyNewMessageUpdated = true)\r\n        {\r\n            AddMessageCommon(\r\n                message, notifyNewDialogs, notifyNewMessageUpdated,\r\n                messages =>\r\n                {\r\n                    for (var i = 0; i < messages.Count; i++)\r\n                    {\r\n                        if (messages[i].DateIndex < message.DateIndex)\r\n                        {\r\n                            messages.Insert(i, message);\r\n                            return true;\r\n                        }\r\n\r\n                        if (messages[i].DateIndex == message.DateIndex)\r\n                        {\r\n                            // TODO: fix for randomId and id (messages[i] can has only randomId)\r\n                            if (messages[i].Index == 0)\r\n                            {\r\n                                messages.Insert(i, message);\r\n                                return true;\r\n                            }\r\n\r\n                            if (messages[i].Index < message.Index)\r\n                            {\r\n                                messages.Insert(i, message);\r\n                                return true;\r\n                            }\r\n\r\n                            if (messages[i].Index == message.Index)\r\n                            {\r\n                                if (messages[i].GetType() != message.GetType())\r\n                                {\r\n                                    messages[i] = message;\r\n                                }\r\n\r\n                                return true;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    return false;\r\n                });\r\n        }\r\n\r\n        public void ClearDecryptedHistory(TLInt chatId)\r\n        {\r\n            var dialog = DialogsContext[chatId.Value] as TLEncryptedDialog;\r\n            if (dialog != null)\r\n            {\r\n\r\n                lock (_dialogsSyncRoot)\r\n                {\r\n                    foreach (var message in dialog.Messages)\r\n                    {\r\n                        RemoveDecryptedMessageFromContext(message);\r\n                    }\r\n\r\n                    dialog.Messages.Clear();\r\n\r\n                    var chat = (TLEncryptedChatCommon)InMemoryCacheService.Instance.GetEncryptedChat(chatId);\r\n                    var lastMessage = new TLDecryptedMessageService\r\n                    {\r\n                        RandomId = TLLong.Random(),\r\n                        RandomBytes = TLString.Random(Constants.MinRandomBytesLength),\r\n                        ChatId = chat.Id,\r\n                        Action = new TLDecryptedMessageActionEmpty(),\r\n                        FromId = MTProtoService.Instance.CurrentUserId,\r\n                        Date = chat.Date,\r\n                        Out = new TLBool(false),\r\n                        Unread = new TLBool(false),\r\n                        Status = MessageStatus.Read\r\n                    };\r\n\r\n                    dialog.UnreadCount = new TLInt(0);\r\n                    dialog.Messages.Add(lastMessage);\r\n                    AddDecryptedMessageToContext(lastMessage);\r\n\r\n                    dialog.TopMessage = lastMessage;\r\n                    dialog.TopDecryptedMessageRandomId = lastMessage.RandomId;\r\n\r\n                    CorrectDialogOrder(dialog, dialog.GetDateIndex(), 0);\r\n                }\r\n\r\n                if (_eventAggregator != null)\r\n                {\r\n                    _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialog, dialog.TopMessage));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ClearBroadcastHistory(TLInt chatId)\r\n        {\r\n            var dialog = DialogsContext[chatId.Value] as TLBroadcastDialog;\r\n            if (dialog != null)\r\n            {\r\n\r\n                lock (_dialogsSyncRoot)\r\n                {\r\n                    foreach (var message in dialog.Messages)\r\n                    {\r\n                        RemoveMessageFromContext(message);\r\n                    }\r\n\r\n                    dialog.Messages.Clear();\r\n\r\n                    var topMessage = dialog.TopMessage as TLMessageCommon;\r\n                    if (topMessage == null) return;\r\n\r\n                    var broadcastChat = InMemoryCacheService.Instance.GetBroadcast(chatId);\r\n                    if (broadcastChat == null) return;\r\n\r\n                    var serviceMessage = new TLMessageService17\r\n                    {\r\n                        FromId = topMessage.FromId,\r\n                        ToId = topMessage.ToId,\r\n                        Status = MessageStatus.Confirmed,\r\n                        Out = new TLBool { Value = true },\r\n                        Date = topMessage.Date,\r\n                        //IsAnimated = true,\r\n                        RandomId = TLLong.Random(),\r\n                        Action = new TLMessageActionChatCreate\r\n                        {\r\n                            Title = broadcastChat.Title,\r\n                            Users = broadcastChat.ParticipantIds\r\n                        }\r\n                    };\r\n                    serviceMessage.SetUnread(new TLBool(false));\r\n\r\n                    dialog.Messages.Add(serviceMessage);\r\n                    AddMessageToContext(serviceMessage);\r\n\r\n                    dialog.TopMessage = serviceMessage;\r\n                    dialog.TopMessageRandomId = serviceMessage.RandomId;\r\n\r\n                    CorrectDialogOrder(dialog, dialog.GetDateIndex(), dialog.TopMessage.Index);\r\n                }\r\n\r\n                if (_eventAggregator != null)\r\n                {\r\n                    _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialog, dialog.TopMessage));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void DeleteDecryptedMessage(TLDecryptedMessageBase message, TLPeerBase peer)\r\n        {\r\n            if (message != null)\r\n            {\r\n                RemoveDecryptedMessageFromContext(message);\r\n                //MessagesContext.Remove(message.Index);\r\n\r\n                var commonMessage = message;\r\n                if (commonMessage != null)\r\n                {\r\n                    //TLDialog dialog;\r\n                    var isMessageRemoved = false;\r\n                    var isDialogRemoved = false;\r\n                    var isTopMessageUpdated = false;\r\n\r\n                    var dialog = DialogsContext[peer.Id.Value] as TLEncryptedDialog;\r\n                    if (dialog != null)\r\n                    {\r\n                        lock (_dialogsSyncRoot)\r\n                        {\r\n                            dialog.Messages.Remove(commonMessage);\r\n                            isMessageRemoved = true;\r\n\r\n                            if (dialog.Messages.Count == 0)\r\n                            {\r\n                                DialogsContext.Remove(dialog.Index);\r\n                                Dialogs.Remove(dialog);\r\n                                isDialogRemoved = true;\r\n                            }\r\n                            else\r\n                            {\r\n                                dialog.TopMessage = dialog.Messages[0];\r\n                                dialog.TopDecryptedMessageRandomId = dialog.Messages[0].RandomId;\r\n                                isTopMessageUpdated = true;\r\n                            }\r\n\r\n                            CorrectDialogOrder(dialog, dialog.GetDateIndex(), 0);\r\n                        }\r\n                    }\r\n\r\n\r\n                    if (isDialogRemoved && _eventAggregator != null)\r\n                    {\r\n                        _eventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                    }\r\n                    if (isTopMessageUpdated && _eventAggregator != null)\r\n                    {\r\n                        _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialog, dialog.TopMessage));\r\n                    }\r\n                    if (isMessageRemoved && _eventAggregator != null)\r\n                    {\r\n                        _eventAggregator.Publish(new MessagesRemovedEventArgs(dialog, commonMessage));\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                throw new NotImplementedException();\r\n            }\r\n        }\r\n\r\n        public TLMessageBase GetMessage(TLPeerBase peer, TLInt messageId)\r\n        {\r\n            if (peer is TLPeerChannel)\r\n            {\r\n                var channelContext = ChannelsContext[peer.Id.Value];\r\n                if (channelContext != null)\r\n                {\r\n                    return channelContext[messageId.Value];\r\n                }\r\n\r\n                return null;\r\n            }\r\n\r\n            return MessagesContext[messageId.Value];\r\n        }\r\n\r\n        public void DeleteMessages(TLPeerBase peer, TLMessageBase lastMessage, IList<TLInt> messageIds)\r\n        {\r\n            if (messageIds != null)\r\n            {\r\n                var messages = new List<TLMessageBase>();\r\n                for (var i = 0; i < messageIds.Count; i++)\r\n                {\r\n                    var message = GetMessage(peer, messageIds[i]);\r\n                    if (message != null)\r\n                    {\r\n                        RemoveMessageFromContext(message);\r\n                        messages.Add(message);\r\n                    }\r\n                }\r\n\r\n                var isDialogRemoved = false;\r\n                var isTopMessageUpdated = false;\r\n\r\n                var dialogBase = GetDialog(peer);\r\n                TLMessageBase topMessage = null;\r\n                lock (_dialogsSyncRoot)\r\n                {\r\n                    var broadcast = dialogBase as TLBroadcastDialog;\r\n                    if (broadcast != null)\r\n                    {\r\n                        for (var i = 0; i < messageIds.Count; i++)\r\n                        {\r\n                            for (var j = 0; j < broadcast.Messages.Count; j++)\r\n                            {\r\n                                if (messageIds[i].Value == broadcast.Messages[j].Index)\r\n                                {\r\n                                    broadcast.Messages.RemoveAt(j);\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        if (broadcast.Messages.Count == 0)\r\n                        {\r\n                            if (lastMessage == null)\r\n                            {\r\n                                DialogsContext.Remove(dialogBase.Index);\r\n                                Dialogs.Remove(dialogBase);\r\n                                isDialogRemoved = true;\r\n                            }\r\n                            else\r\n                            {\r\n                                broadcast.Messages.Add(lastMessage);\r\n                                broadcast._topMessage = broadcast.Messages[0];\r\n                                broadcast.TopMessageId = broadcast.Messages[0].Id;\r\n                                broadcast.TopMessageRandomId = broadcast.Messages[0].RandomId;\r\n                                isTopMessageUpdated = true;\r\n                                topMessage = broadcast.TopMessage;\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            broadcast._topMessage = broadcast.Messages[0];\r\n                            broadcast.TopMessageId = broadcast.Messages[0].Id;\r\n                            broadcast.TopMessageRandomId = broadcast.Messages[0].RandomId;\r\n                            isTopMessageUpdated = true;\r\n                            topMessage = broadcast.TopMessage;\r\n                        }\r\n\r\n                        CorrectDialogOrder(broadcast, broadcast.GetDateIndex(), broadcast.TopMessage.Index);\r\n                    }\r\n\r\n                    var dialog = dialogBase as TLDialog;\r\n                    if (dialog != null)\r\n                    {\r\n                        for (var i = 0; i < messageIds.Count; i++)\r\n                        {\r\n                            for (var j = 0; j < dialog.Messages.Count; j++)\r\n                            {\r\n                                if (messageIds[i].Value == dialog.Messages[j].Index)\r\n                                {\r\n                                    dialog.Messages.RemoveAt(j);\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        if (dialog.Messages.Count == 0)\r\n                        {\r\n                            if (lastMessage == null)\r\n                            {\r\n                                DialogsContext.Remove(dialogBase.Index);\r\n                                Dialogs.Remove(dialogBase);\r\n                                isDialogRemoved = true;\r\n                            }\r\n                            else\r\n                            {\r\n                                dialog.Messages.Add(lastMessage);\r\n                                dialog._topMessage = dialog.Messages[0];\r\n                                dialog.TopMessageId = dialog.Messages[0].Id;\r\n                                dialog.TopMessageRandomId = dialog.Messages[0].RandomId;\r\n                                isTopMessageUpdated = true;\r\n                                topMessage = dialog.TopMessage;\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            dialog._topMessage = dialog.Messages[0];\r\n                            dialog.TopMessageId = dialog.Messages[0].Id;\r\n                            dialog.TopMessageRandomId = dialog.Messages[0].RandomId;\r\n                            isTopMessageUpdated = true;\r\n                            topMessage = dialog.TopMessage;\r\n                        }\r\n\r\n                        CorrectDialogOrder(dialog, dialog.GetDateIndex(), dialog.TopMessage.Index);\r\n                    }\r\n                }\r\n\r\n                if (isDialogRemoved && _eventAggregator != null)\r\n                {\r\n                    _eventAggregator.Publish(new DialogRemovedEventArgs(dialogBase));\r\n                }\r\n                if (isTopMessageUpdated && _eventAggregator != null)\r\n                {\r\n                    _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialogBase, topMessage));\r\n                }\r\n                if (_eventAggregator != null)\r\n                {\r\n                    _eventAggregator.Publish(new MessagesRemovedEventArgs(dialogBase, messages));\r\n                }\r\n            }\r\n            else\r\n            {\r\n                throw new NotImplementedException();\r\n            }\r\n        }\r\n\r\n        public void DeleteUserHistory(TLPeerBase channel, TLPeerBase user)\r\n        {\r\n            var isMessageRemoved = false;\r\n            var isDialogRemoved = false;\r\n            var isTopMessageUpdated = false;\r\n            TLMessageBase topMessage = null;\r\n\r\n            var dialogBase = GetDialog(channel);\r\n\r\n            var messages = new List<TLMessageBase>();\r\n\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                var broadcast = dialogBase as TLBroadcastDialog;\r\n                if (broadcast != null)\r\n                {\r\n                    for (var j = 0; j < broadcast.Messages.Count; j++)\r\n                    {\r\n                        var messageCommon = broadcast.Messages[j] as TLMessageCommon;\r\n                        if (messageCommon != null\r\n                            && messageCommon.FromId.Value == user.Id.Value)\r\n                        {\r\n                            messages.Add(messageCommon);\r\n                            broadcast.Messages.RemoveAt(j--);\r\n                        }\r\n                    }\r\n\r\n                    isMessageRemoved = true;\r\n\r\n                    if (broadcast.Messages.Count == 0)\r\n                    {\r\n                        DialogsContext.Remove(dialogBase.Index);\r\n                        Dialogs.Remove(dialogBase);\r\n                        isDialogRemoved = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        broadcast._topMessage = broadcast.Messages[0];\r\n                        broadcast.TopMessageId = broadcast.Messages[0].Id;\r\n                        broadcast.TopMessageRandomId = broadcast.Messages[0].RandomId;\r\n                        isTopMessageUpdated = true;\r\n                        topMessage = broadcast.TopMessage;\r\n                    }\r\n                }\r\n\r\n                var dialog = dialogBase as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    for (var j = 0; j < dialog.Messages.Count; j++)\r\n                    {\r\n                        var messageCommon = dialog.Messages[j] as TLMessageCommon;\r\n                        if (messageCommon != null\r\n                            && messageCommon.FromId.Value == user.Id.Value)\r\n                        {\r\n                            if (messageCommon.Index == 1)\r\n                            {\r\n                                var message = messageCommon as TLMessageService;\r\n                                if (message != null)\r\n                                {\r\n                                    var channelMigrateFrom = message.Action as TLMessageActionChannelMigrateFrom;\r\n                                    if (channelMigrateFrom != null)\r\n                                    {\r\n                                        continue;\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            messages.Add(messageCommon);\r\n                            dialog.Messages.RemoveAt(j--);\r\n                        }\r\n                    }\r\n\r\n                    isMessageRemoved = true;\r\n\r\n                    if (dialog.Messages.Count == 0)\r\n                    {\r\n                        DialogsContext.Remove(dialogBase.Index);\r\n                        Dialogs.Remove(dialogBase);\r\n                        isDialogRemoved = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        var dialog71 = dialog as TLDialog71;\r\n                        for (var i = 0; i < messages.Count; i++)\r\n                        {\r\n                            var commonMessage = messages[i] as TLMessageCommon;\r\n                            var message70 = messages[i] as TLMessage70;\r\n                            if (commonMessage != null && !commonMessage.Out.Value && commonMessage.Unread.Value)\r\n                            {\r\n                                dialog.UnreadCount = new TLInt(Math.Max(0, dialog.UnreadCount.Value - 1));\r\n\r\n                                if (dialog71 != null && message70 != null && message70.FwdHeader == null && message70.IsMention)\r\n                                {\r\n                                    dialog71.UnreadMentionsCount = new TLInt(Math.Max(0, dialog71.UnreadMentionsCount.Value - 1));\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        dialog._topMessage = dialog.Messages[0];\r\n                        dialog.TopMessageId = dialog.Messages[0].Id;\r\n                        dialog.TopMessageRandomId = dialog.Messages[0].RandomId;\r\n                        isTopMessageUpdated = true;\r\n                        topMessage = dialog.TopMessage;\r\n                    }\r\n                }\r\n            }\r\n\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                var message = messages[i];\r\n                if (message != null)\r\n                {\r\n                    RemoveMessageFromContext(message);\r\n                }\r\n            }\r\n\r\n            if (topMessage != null)\r\n            {\r\n                CorrectDialogOrder(dialogBase, dialogBase.GetDateIndex(), topMessage.Index);\r\n            }\r\n\r\n            if (isDialogRemoved && _eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new DialogRemovedEventArgs(dialogBase));\r\n            }\r\n            if (isTopMessageUpdated && _eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialogBase, topMessage));\r\n            }\r\n            if (isMessageRemoved && _eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new MessagesRemovedEventArgs(dialogBase, messages));\r\n            }\r\n        }\r\n\r\n        public void DeleteMessages(IList<TLMessageBase> messages, TLPeerBase peer)\r\n        {\r\n            var isMessageRemoved = false;\r\n            var isDialogRemoved = false;\r\n            var isTopMessageUpdated = false;\r\n            TLMessageBase topMessage = null;\r\n\r\n            var dialogBase = GetDialog(peer);\r\n\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                var message = messages[i];\r\n                if (message != null)\r\n                {\r\n                    RemoveMessageFromContext(message);\r\n                }\r\n            }\r\n\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                var broadcast = dialogBase as TLBroadcastDialog;\r\n                if (broadcast != null)\r\n                {\r\n                    for (var i = 0; i < messages.Count; i++)\r\n                    {\r\n                        for (var j = 0; j < broadcast.Messages.Count; j++)\r\n                        {\r\n                            if (messages[i].Id.Value == broadcast.Messages[j].Index)\r\n                            {\r\n                                broadcast.Messages.RemoveAt(j);\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    isMessageRemoved = true;\r\n\r\n                    if (broadcast.Messages.Count == 0)\r\n                    {\r\n                        DialogsContext.Remove(dialogBase.Index);\r\n                        Dialogs.Remove(dialogBase);\r\n                        isDialogRemoved = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        broadcast._topMessage = broadcast.Messages[0];\r\n                        broadcast.TopMessageId = broadcast.Messages[0].Id;\r\n                        broadcast.TopMessageRandomId = broadcast.Messages[0].RandomId;\r\n                        isTopMessageUpdated = true;\r\n                        topMessage = broadcast.TopMessage;\r\n                    }\r\n                }\r\n\r\n                var dialog = dialogBase as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    for (var i = 0; i < messages.Count; i++)\r\n                    {\r\n                        for (var j = 0; j < dialog.Messages.Count; j++)\r\n                        {\r\n                            if (messages[i].Id.Value == dialog.Messages[j].Index)\r\n                            {\r\n                                dialog.Messages.RemoveAt(j);\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    isMessageRemoved = true;\r\n\r\n                    if (dialog.Messages.Count == 0)\r\n                    {\r\n                        DialogsContext.Remove(dialogBase.Index);\r\n                        Dialogs.Remove(dialogBase);\r\n                        isDialogRemoved = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        var dialog71 = dialog as TLDialog71;\r\n                        for (var i = 0; i < messages.Count; i++)\r\n                        {\r\n                            var commonMessage = messages[i] as TLMessageCommon;\r\n                            var message70 = messages[i] as TLMessage70;\r\n                            if (commonMessage != null && !commonMessage.Out.Value && commonMessage.Unread.Value)\r\n                            {\r\n                                dialog.UnreadCount = new TLInt(Math.Max(0, dialog.UnreadCount.Value - 1));\r\n\r\n                                if (dialog71 != null && message70 != null && message70.FwdHeader == null && message70.IsMention)\r\n                                {\r\n                                    dialog71.UnreadMentionsCount = new TLInt(Math.Max(0, dialog71.UnreadMentionsCount.Value - 1));\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        dialog._topMessage = dialog.Messages[0];\r\n                        dialog.TopMessageId = dialog.Messages[0].Id;\r\n                        dialog.TopMessageRandomId = dialog.Messages[0].RandomId;\r\n                        isTopMessageUpdated = true;\r\n                        topMessage = dialog.TopMessage;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (topMessage != null)\r\n            {\r\n                CorrectDialogOrder(dialogBase, dialogBase.GetDateIndex(), topMessage.Index);\r\n            }\r\n\r\n            if (isDialogRemoved && _eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new DialogRemovedEventArgs(dialogBase));\r\n            }\r\n            if (isTopMessageUpdated && _eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialogBase, topMessage));\r\n            }\r\n            if (isMessageRemoved && _eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new MessagesRemovedEventArgs(dialogBase, messages));\r\n            }\r\n        }\r\n\r\n        public void DeleteMessage(TLMessageBase message)\r\n        {\r\n            if (message != null)\r\n            {\r\n                RemoveMessageFromContext(message);\r\n                //MessagesContext.Remove(message.Index);\r\n\r\n                var commonMessage = message as TLMessageCommon;\r\n                var message70 = message as TLMessage70;\r\n                if (commonMessage != null)\r\n                {\r\n                    //TLDialog dialog;\r\n                    var isMessageRemoved = false;\r\n                    var isDialogRemoved = false;\r\n                    var isTopMessageUpdated = false;\r\n\r\n                    var dialogBase = GetDialog(commonMessage);\r\n                    TLMessageBase topMessage = null;\r\n                    lock (_dialogsSyncRoot)\r\n                    {\r\n                        //dialog = Dialogs.FirstOrDefault(x => x.WithId == peer.Id.Value && x.IsChat == peer is TLPeerChat);\r\n                        var broadcast = dialogBase as TLBroadcastDialog;\r\n                        if (broadcast != null)\r\n                        {\r\n                            broadcast.Messages.Remove(commonMessage);\r\n                            isMessageRemoved = true;\r\n\r\n                            if (broadcast.Messages.Count == 0)\r\n                            {\r\n                                DialogsContext.Remove(dialogBase.Index);\r\n                                Dialogs.Remove(dialogBase);\r\n                                isDialogRemoved = true;\r\n                            }\r\n                            else\r\n                            {\r\n                                broadcast.TopMessage = broadcast.Messages[0];\r\n                                broadcast.TopMessageId = broadcast.Messages[0].Id;\r\n                                broadcast.TopMessageRandomId = broadcast.Messages[0].RandomId;\r\n                                isTopMessageUpdated = true;\r\n                                topMessage = broadcast.TopMessage;\r\n                            }\r\n\r\n                            CorrectDialogOrder(broadcast, broadcast.GetDateIndex(), broadcast.TopMessage.Index);\r\n                        }\r\n\r\n                        var dialog = dialogBase as TLDialog;\r\n                        if (dialog != null)\r\n                        {\r\n                            dialog.Messages.Remove(commonMessage);\r\n                            isMessageRemoved = true;\r\n\r\n                            if (dialog.Messages.Count == 0)\r\n                            {\r\n                                DialogsContext.Remove(dialogBase.Index);\r\n                                Dialogs.Remove(dialogBase);\r\n                                isDialogRemoved = true;\r\n                            }\r\n                            else\r\n                            {\r\n                                var dialog71 = dialog as TLDialog71;\r\n                                if (!commonMessage.Out.Value && commonMessage.Unread.Value)\r\n                                {\r\n                                    dialog.UnreadCount = new TLInt(Math.Max(0, dialog.UnreadCount.Value - 1));\r\n                                    if (dialog71 != null && message70 != null && message70.FwdHeader == null && message70.IsMention)\r\n                                    {\r\n                                        dialog71.UnreadMentionsCount = new TLInt(Math.Max(0, dialog71.UnreadMentionsCount.Value - 1));\r\n                                    }\r\n                                }\r\n                                dialog.TopMessage = dialog.Messages[0];\r\n                                dialog.TopMessageId = dialog.Messages[0].Id;\r\n                                dialog.TopMessageRandomId = dialog.Messages[0].RandomId;\r\n                                isTopMessageUpdated = true;\r\n                                topMessage = dialog.TopMessage;\r\n                            }\r\n\r\n                            CorrectDialogOrder(dialog, dialog.GetDateIndex(), dialog.TopMessage.Index);\r\n                        }\r\n                    }\r\n\r\n                    if (isDialogRemoved && _eventAggregator != null)\r\n                    {\r\n                        _eventAggregator.Publish(new DialogRemovedEventArgs(dialogBase));\r\n                    }\r\n                    if (isTopMessageUpdated && _eventAggregator != null)\r\n                    {\r\n                        _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialogBase, topMessage));\r\n                    }\r\n                    if (isMessageRemoved && _eventAggregator != null)\r\n                    {\r\n                        _eventAggregator.Publish(new MessagesRemovedEventArgs(dialogBase, commonMessage));\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                throw new NotImplementedException();\r\n            }\r\n        }\r\n\r\n        public void ReplaceUser(int index, TLUserBase user)\r\n        {\r\n            var cachedUser = UsersContext[index];\r\n            if (cachedUser == null)\r\n            {\r\n                UsersContext[index] = user;\r\n            }\r\n            else\r\n            {\r\n                UsersContext[index] = user;\r\n\r\n                lock (_dialogsSyncRoot)\r\n                {\r\n                    foreach (var dialog in Dialogs)\r\n                    {\r\n                        if (!dialog.IsChat\r\n                            && dialog.WithId == index)\r\n                        {\r\n                            dialog.With = user;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void DeleteUser(TLInt id)\r\n        {\r\n            UsersContext.Remove(id.Value);\r\n        }\r\n\r\n        public void DeleteUser(TLUserBase user)\r\n        {\r\n            UsersContext.Remove(user.Index);\r\n        }\r\n\r\n        public void ReplaceChat(int index, TLChatBase chat)\r\n        {\r\n            var cachedChat = ChatsContext[index];\r\n            if (cachedChat == null)\r\n            {\r\n                ChatsContext[index] = chat;\r\n            }\r\n            else\r\n            {\r\n                ChatsContext[index] = chat;\r\n\r\n                lock (_dialogsSyncRoot)\r\n                {\r\n                    foreach (var dialog in Dialogs)\r\n                    {\r\n                        if (dialog.IsChat\r\n                            && dialog.WithId == index)\r\n                        {\r\n                            dialog.With = chat;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ReplaceBroadcast(int index, TLBroadcastChat chat)\r\n        {\r\n            var cachedChat = BroadcastsContext[index];\r\n            if (cachedChat == null)\r\n            {\r\n                BroadcastsContext[index] = chat;\r\n            }\r\n            else\r\n            {\r\n                BroadcastsContext[index] = chat;\r\n\r\n                lock (_dialogsSyncRoot)\r\n                {\r\n                    foreach (var dialog in Dialogs)\r\n                    {\r\n                        if (dialog.IsChat\r\n                            && dialog.WithId == index)\r\n                        {\r\n                            dialog._with = chat;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ReplaceEncryptedChat(int index, TLEncryptedChatBase chat)\r\n        {\r\n            var cachedChat = EncryptedChatsContext[index];\r\n            if (cachedChat == null)\r\n            {\r\n                EncryptedChatsContext[index] = chat;\r\n            }\r\n            else\r\n            {\r\n                EncryptedChatsContext[index] = chat;\r\n\r\n                //lock (_encryptedDialogsSyncRoot)\r\n                //{\r\n                //    foreach (var dialog in EncryptedDialogs)\r\n                //    {\r\n                //        if (dialog.IsChat\r\n                //            && dialog.WithId == index)\r\n                //        {\r\n                //            dialog.With = chat;\r\n                //        }\r\n                //    }\r\n                //}\r\n            }\r\n        }\r\n\r\n        public void DeleteChat(TLInt id)\r\n        {\r\n            ChatsContext.Remove(id.Value);\r\n        }\r\n\r\n        public void DeleteChat(TLChatBase chat)\r\n        {\r\n            ChatsContext.Remove(chat.Index);\r\n        }\r\n\r\n        public void DeleteDialog(TLDialogBase dialogBase)\r\n        {\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                var dialog = Dialogs.FirstOrDefault(x => x.Index == dialogBase.Index);\r\n\r\n                if (dialog != null)\r\n                {\r\n                    Dialogs.Remove(dialog);\r\n                    DialogsContext.Remove(dialog.Index);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void UpdatePinnedDialogs(TLPeerDialogs peerDialogs)\r\n        {\r\n\r\n        }\r\n\r\n        public void UpdateProxyData(TLProxyDataBase proxyDaya)\r\n        {\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                ProxyData = proxyDaya;\r\n            }\r\n        }\r\n\r\n        public void UpdateDialogPinned(TLPeerBase peer, bool pinned)\r\n        {\r\n            var dialog = GetDialog(peer) as TLDialog53;\r\n            if (dialog != null)\r\n            {\r\n                lock (_dialogsSyncRoot)\r\n                {\r\n                    if (pinned)\r\n                    {\r\n                        dialog.IsPinned = true;\r\n                        Dialogs.Remove(dialog);\r\n                        Dialogs.Insert(0, dialog);\r\n\r\n                    }\r\n                    else\r\n                    {\r\n                        dialog.IsPinned = false;\r\n                        CorrectDialogOrder(dialog, dialog.GetDateIndex(), 0);\r\n                    }\r\n\r\n                    var pinnedId = 0;\r\n                    foreach (var d in Dialogs)\r\n                    {\r\n                        var d53 = d as TLDialog53;\r\n                        if (d53 != null)\r\n                        {\r\n                            if (d53.IsPinned)\r\n                            {\r\n                                d53.PinnedId = new TLInt(pinnedId++);\r\n                            }\r\n                            else\r\n                            {\r\n                                d.PinnedId = null;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void UpdateDialogPromo(TLDialogBase dialogBase, bool promo)\r\n        {\r\n            var dialog = dialogBase as TLDialog71;\r\n            if (dialog != null)\r\n            {\r\n                lock (_dialogsSyncRoot)\r\n                {\r\n                    if (promo)\r\n                    {\r\n                        dialog.IsPromo = true;\r\n                        if (dialogBase.Peer is TLPeerChannel)\r\n                        {\r\n                            var channel = ChatsContext[dialogBase.Peer.Id.Value] as TLChannel73;\r\n                            if (channel != null && !channel.Left.Value)\r\n                            {\r\n                                CorrectDialogOrder(dialog, dialog.GetDateIndex(), 0);\r\n                                _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialog, dialog.TopMessage));\r\n                            }\r\n                            else\r\n                            {\r\n                                Dialogs.Remove(dialog);\r\n                                Dialogs.Insert(0, dialog);\r\n                                _eventAggregator.Publish(new DialogAddedEventArgs(dialog));\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Dialogs.Remove(dialog);\r\n                            Dialogs.Insert(0, dialog);\r\n                            _eventAggregator.Publish(new DialogAddedEventArgs(dialog));\r\n                        }\r\n\r\n                    }\r\n                    else\r\n                    {\r\n                        dialog.IsPromo = false;\r\n                        if (dialogBase.Peer is TLPeerChannel)\r\n                        {\r\n                            var channel = ChatsContext[dialogBase.Peer.Id.Value] as TLChannel73;\r\n                            if (channel != null && !channel.Left.Value)\r\n                            {\r\n                                CorrectDialogOrder(dialog, dialog.GetDateIndex(), 0);\r\n                                _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialog, dialog.TopMessage));\r\n                            }\r\n                            else\r\n                            {\r\n                                Dialogs.Remove(dialog);\r\n                                _eventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Dialogs.Remove(dialog);\r\n                            _eventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                        }\r\n                    }\r\n\r\n                    var pinnedId = 0;\r\n                    foreach (var d in Dialogs)\r\n                    {\r\n                        var d53 = d as TLDialog53;\r\n                        if (d53 != null)\r\n                        {\r\n                            if (d53.IsPinned)\r\n                            {\r\n                                d53.PinnedId = new TLInt(pinnedId++);\r\n                            }\r\n                            else\r\n                            {\r\n                                d.PinnedId = null;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void UpdateChannelAvailableMessages(TLPeerBase peer, TLInt availableMinId)\r\n        {\r\n            var channel = ChatsContext[peer.Id.Value] as TLChannel68;\r\n            if (channel != null)\r\n            {\r\n                channel.AvailableMinId = availableMinId;\r\n            }\r\n\r\n            var messages = new List<TLMessageBase>();\r\n\r\n            var isDialogRemoved = false;\r\n            var isTopMessageUpdated = false;\r\n\r\n            var dialogBase = GetDialog(peer);\r\n            TLMessageBase topMessage = null;\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                var dialog = dialogBase as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    var updatedIndex = -1;\r\n                    for (var i = 0; i < dialog.Messages.Count; i++)\r\n                    {\r\n                        if (dialog.Messages[i].Index > 0 && dialog.Messages[i].Index <= availableMinId.Value)\r\n                        {\r\n                            if (updatedIndex == -1)\r\n                            {\r\n                                updatedIndex = i;\r\n                            }\r\n                            else\r\n                            {\r\n                                messages.Add(dialog.Messages[i]);\r\n                                dialog.Messages.RemoveAt(i--);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (updatedIndex >= 0 && updatedIndex < dialog.Messages.Count)\r\n                    {\r\n                        var messageCommon = dialog.Messages[updatedIndex] as TLMessageCommon;\r\n                        if (messageCommon != null)\r\n                        {\r\n                            var clearHistoryMessage = new TLMessageService49();\r\n                            clearHistoryMessage.Flags = new TLInt(0);\r\n                            clearHistoryMessage.Id = messageCommon.Id;\r\n                            clearHistoryMessage.FromId = messageCommon.FromId ?? new TLInt(-1);\r\n                            clearHistoryMessage.ToId = messageCommon.ToId;\r\n                            clearHistoryMessage.Date = messageCommon.Date;\r\n                            clearHistoryMessage.Out = messageCommon.Out;\r\n                            clearHistoryMessage.Action = new TLMessageActionClearHistory();\r\n\r\n                            dialog.Messages[updatedIndex] = clearHistoryMessage;\r\n                        }\r\n                    }\r\n\r\n                    dialog.UnreadCount = new TLInt(0);\r\n                    var dialog71 = dialog as TLDialog71;\r\n                    if (dialog71 != null)\r\n                    {\r\n                        dialog71.UnreadMentionsCount = new TLInt(0);\r\n                    }\r\n\r\n                    if (dialog.Messages.Count == 0)\r\n                    {\r\n                        DialogsContext.Remove(dialogBase.Index);\r\n                        Dialogs.Remove(dialogBase);\r\n                        isDialogRemoved = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        dialog._topMessage = dialog.Messages[0];\r\n                        dialog.TopMessageId = dialog.Messages[0].Id;\r\n                        dialog.TopMessageRandomId = dialog.Messages[0].RandomId;\r\n                        isTopMessageUpdated = true;\r\n                        topMessage = dialog.TopMessage;\r\n                    }\r\n                }\r\n            }\r\n\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                RemoveMessageFromContext(messages[i]);\r\n            }\r\n\r\n            if (isDialogRemoved && _eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new DialogRemovedEventArgs(dialogBase));\r\n            }\r\n            if (isTopMessageUpdated && _eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialogBase, topMessage));\r\n            }\r\n            if (_eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new ChannelAvailableMessagesEventArgs(dialogBase, availableMinId));\r\n            }\r\n        }\r\n\r\n        public void ClearDialog(TLPeerBase peer)\r\n        {\r\n            var messages = new List<TLMessageBase>();\r\n\r\n            var isDialogRemoved = false;\r\n            var isTopMessageUpdated = false;\r\n\r\n            var dialogBase = GetDialog(peer);\r\n            TLMessageBase topMessage = null;\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                var broadcast = dialogBase as TLBroadcastDialog;\r\n                if (broadcast != null)\r\n                {\r\n                    for (var i = 1; i < broadcast.Messages.Count; i++)\r\n                    {\r\n                        broadcast.Messages.RemoveAt(i--);\r\n                    }\r\n\r\n                    if (broadcast.Messages.Count == 0)\r\n                    {\r\n                        DialogsContext.Remove(dialogBase.Index);\r\n                        Dialogs.Remove(dialogBase);\r\n                        isDialogRemoved = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        broadcast._topMessage = broadcast.Messages[0];\r\n                        broadcast.TopMessageId = broadcast.Messages[0].Id;\r\n                        broadcast.TopMessageRandomId = broadcast.Messages[0].RandomId;\r\n                        isTopMessageUpdated = true;\r\n                        topMessage = broadcast.TopMessage;\r\n                    }\r\n\r\n                    //CorrectDialogOrder(broadcast, broadcast.TopMessage.DateIndex, broadcast.TopMessage.Index);\r\n                }\r\n\r\n                var dialog = dialogBase as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    var updatedIndex = -1;\r\n                    for (var i = 0; i < dialog.Messages.Count; i++)\r\n                    {\r\n                        if (dialog.Messages[i].Index > 0)\r\n                        {\r\n                            if (updatedIndex == -1)\r\n                            {\r\n                                updatedIndex = i;\r\n                            }\r\n                            else\r\n                            {\r\n                                messages.Add(dialog.Messages[i]);\r\n                                dialog.Messages.RemoveAt(i--);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (updatedIndex >= 0 && updatedIndex < dialog.Messages.Count)\r\n                    {\r\n                        var messageCommon = dialog.Messages[updatedIndex] as TLMessageCommon;\r\n                        if (messageCommon != null)\r\n                        {\r\n                            var clearHistoryMessage = new TLMessageService49();\r\n                            clearHistoryMessage.Flags = new TLInt(0);\r\n                            clearHistoryMessage.Id = messageCommon.Id;\r\n                            clearHistoryMessage.FromId = messageCommon.FromId ?? new TLInt(-1);\r\n                            clearHistoryMessage.ToId = messageCommon.ToId;\r\n                            clearHistoryMessage.Date = messageCommon.Date;\r\n                            clearHistoryMessage.Out = messageCommon.Out;\r\n                            clearHistoryMessage.Action = new TLMessageActionClearHistory();\r\n\r\n                            dialog.Messages[updatedIndex] = clearHistoryMessage;\r\n\r\n                            RemoveMessageFromContext(messageCommon);\r\n                            AddMessageToContext(clearHistoryMessage);\r\n                        }\r\n                    }\r\n\r\n                    dialog.UnreadCount = new TLInt(0);\r\n                    var dialog71 = dialog as TLDialog71;\r\n                    if (dialog71 != null)\r\n                    {\r\n                        dialog71.UnreadMentionsCount = new TLInt(0);\r\n                    }\r\n\r\n                    if (dialog.Messages.Count == 0)\r\n                    {\r\n                        DialogsContext.Remove(dialogBase.Index);\r\n                        Dialogs.Remove(dialogBase);\r\n                        isDialogRemoved = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        dialog._topMessage = dialog.Messages[0];\r\n                        dialog.TopMessageId = dialog.Messages[0].Id;\r\n                        dialog.TopMessageRandomId = dialog.Messages[0].RandomId;\r\n                        isTopMessageUpdated = true;\r\n                        topMessage = dialog.TopMessage;\r\n                    }\r\n\r\n                    //CorrectDialogOrder(dialog, dialog.TopMessage.DateIndex, dialog.TopMessage.Index);\r\n                }\r\n            }\r\n\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                RemoveMessageFromContext(messages[i]);\r\n            }\r\n\r\n            if (isDialogRemoved && _eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new DialogRemovedEventArgs(dialogBase));\r\n            }\r\n            if (isTopMessageUpdated && _eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new TopMessageUpdatedEventArgs(dialogBase, topMessage));\r\n            }\r\n            if (_eventAggregator != null)\r\n            {\r\n                _eventAggregator.Publish(new MessagesRemovedEventArgs(dialogBase, messages));\r\n            }\r\n        }\r\n\r\n        private static bool _logEnabled = true;\r\n\r\n        private static void Log(string str)\r\n        {\r\n            if (!_logEnabled) return;\r\n\r\n            Debug.WriteLine(str);\r\n        }\r\n\r\n        public void Open()\r\n        {\r\n            try\r\n            {\r\n\r\n                Log(\"InMemoryDatabase.Open\");\r\n                //TLObject.LogNotify = true;\r\n                var timer = Stopwatch.StartNew();\r\n\r\n                var t1 = Task.Factory.StartNew(() =>\r\n                {\r\n                    var usersTimer = Stopwatch.StartNew();\r\n                    var users = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLUserBase>>(_usersSyncRoot, UsersMTProtoFileName) ?? new TLVector<TLUserBase>();\r\n                    Log(string.Format(\"Open users time ({0}) : {1}\", users.Count, usersTimer.Elapsed));\r\n\r\n                    foreach (var user in users)\r\n                    {\r\n                        UsersContext[user.Index] = user;\r\n                    }\r\n                });\r\n\r\n                var t2 = Task.Factory.StartNew(() =>\r\n                {\r\n                    var chatsTimer = Stopwatch.StartNew();\r\n                    var chats = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLChatBase>>(_chatsSyncRoot, ChatsMTProtoFileName) ?? new TLVector<TLChatBase>();\r\n                    Log(string.Format(\"Open chats time ({0}) : {1}\", chats.Count, chatsTimer.Elapsed));\r\n\r\n                    foreach (var chat in chats)\r\n                    {\r\n                        ChatsContext[chat.Index] = chat;\r\n                    }\r\n                });\r\n\r\n                var t3 = Task.Factory.StartNew(() =>\r\n                {\r\n                    var broadcastsTimer = Stopwatch.StartNew();\r\n                    var broadcasts = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLBroadcastChat>>(_broadcastsSyncRoot, BroadcastsMTProtoFileName) ?? new TLVector<TLBroadcastChat>();\r\n                    Log(string.Format(\"Open broadcasts time ({0}) : {1}\", broadcasts.Count, broadcastsTimer.Elapsed));\r\n\r\n                    foreach (var broadcast in broadcasts)\r\n                    {\r\n                        BroadcastsContext[broadcast.Index] = broadcast;\r\n                    }\r\n                });\r\n\r\n                var t4 = Task.Factory.StartNew(() =>\r\n                {\r\n                    var encryptedChatsTimer = Stopwatch.StartNew();\r\n                    var encryptedChats = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLEncryptedChatBase>>(_encryptedChatsSyncRoot, EncryptedChatsMTProtoFileName) ?? new TLVector<TLEncryptedChatBase>();\r\n                    Log(string.Format(\"Open encrypted chats time ({0}) : {1}\", encryptedChats.Count, encryptedChatsTimer.Elapsed));\r\n\r\n                    foreach (var encryptedChat in encryptedChats)\r\n                    {\r\n                        EncryptedChatsContext[encryptedChat.Index] = encryptedChat;\r\n                    }\r\n                });\r\n\r\n                var t5 = Task.Factory.StartNew(() =>\r\n                {\r\n                    var dialogsTimer = Stopwatch.StartNew();\r\n                    var dialogs = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLDialogBase>>(_dialogsFileSyncRoot, DialogsMTProtoFileName) ?? new TLVector<TLDialogBase>();\r\n                    Dialogs = new ObservableCollection<TLDialogBase>(dialogs.Items);\r\n                    Log(string.Format(\"Open dialogs time ({0}) : {1}\", dialogs.Count, dialogsTimer.Elapsed));\r\n\r\n                    foreach (var dialog in dialogs)\r\n                    {\r\n                        DialogsContext[dialog.Index] = dialog;\r\n                    }\r\n                });\r\n\r\n                var t6 = Task.Factory.StartNew(() =>\r\n                {\r\n                    var proxyDataTimer = Stopwatch.StartNew();\r\n                    var proxyData = TLUtils.OpenObjectFromMTProtoFile<TLProxyDataBase>(_proxyDataSyncRoot, ProxyDataMTProtoFileName);\r\n                    ProxyData = proxyData;\r\n                    Log(string.Format(\"Open proxy data time : {0}\", proxyDataTimer.Elapsed));\r\n                });\r\n\r\n                Task.WaitAll(t1, t2, t3, t4, t5, t6);\r\n                //TelegramPropertyChangedBase.IsNotifyingGlobal = true;\r\n                //WaitHandle.WaitAll(handles.ToArray());\r\n\r\n                Log(\"Open DB files time: \" + timer.Elapsed);\r\n                MessagesContext.Clear();\r\n                ChannelsContext.Clear();\r\n                lock (_dialogsSyncRoot)\r\n                {\r\n                    ResendingMessages = new List<TLMessageBase>();\r\n                    ResendingDecryptedMessages = new List<TLDecryptedMessageBase>();\r\n                    foreach (var d in Dialogs)\r\n                    {\r\n                        var encryptedDialog = d as TLEncryptedDialog;\r\n                        var broadcastDialog = d as TLBroadcastDialog;\r\n                        if (encryptedDialog != null)\r\n                        {\r\n                            //var peer = encryptedDialog.Peer;\r\n                            //if (peer is TLPeerEncryptedChat)\r\n                            //{\r\n                            //    var encryptedChat = EncryptedChatsContext[peer.Id.Value] as TLEncryptedChatCommon;\r\n                            //    if (encryptedChat != null)\r\n                            //    {\r\n                            //        encryptedDialog._with = UsersContext[encryptedChat.ParticipantId.Value];\r\n                            //    }\r\n                            //}\r\n\r\n                            encryptedDialog._topMessage = encryptedDialog.Messages.FirstOrDefault();\r\n                            encryptedDialog.TopDecryptedMessageRandomId = encryptedDialog.TopMessage != null ? encryptedDialog.TopMessage.RandomId : null;\r\n                            if (encryptedDialog.TopMessageId == null)\r\n                            {\r\n                                encryptedDialog.TopMessageRandomId = encryptedDialog.TopMessage != null ? encryptedDialog.TopMessage.RandomId : null;\r\n                            }\r\n                            foreach (var message in encryptedDialog.Messages)\r\n                            {\r\n                                if (message.Status == MessageStatus.Sending\r\n                                    || message.Status == MessageStatus.Compressing)\r\n                                {\r\n                                    message.Status = MessageStatus.Failed;\r\n                                    ResendingDecryptedMessages.Add(message);\r\n                                }\r\n\r\n                                if (message.RandomIndex != 0)\r\n                                {\r\n                                    DecryptedMessagesContext[message.RandomIndex] = message;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (broadcastDialog != null)\r\n                        {\r\n                            var dialog = broadcastDialog;\r\n                            var peer = dialog.Peer;\r\n                            var broadcastChat = ChatsContext[peer.Id.Value];\r\n                            if (broadcastChat != null)\r\n                            {\r\n                                dialog._with = broadcastChat;\r\n                            }\r\n                            else\r\n                            {\r\n                                broadcastChat = dialog.With as TLBroadcastChat;\r\n                                if (broadcastChat != null)\r\n                                {\r\n                                    ChatsContext[broadcastChat.Index] = broadcastChat;\r\n                                }\r\n                            }\r\n\r\n                            dialog._topMessage = dialog.Messages.FirstOrDefault();\r\n                            dialog.TopMessageId = dialog.TopMessage != null ? dialog.TopMessage.Id : null;\r\n                            if (dialog.TopMessageId == null)\r\n                            {\r\n                                dialog.TopMessageRandomId = dialog.TopMessage != null ? dialog.TopMessage.RandomId : null;\r\n                            }\r\n                            foreach (var message in dialog.Messages)\r\n                            {\r\n                                if (message.Status == MessageStatus.Sending\r\n                                    || message.Status == MessageStatus.Compressing)\r\n                                {\r\n                                    message._status = message.Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                                    ResendingMessages.Add(message);\r\n                                }\r\n\r\n                                AddMessageToContext(message);\r\n                                if (message.RandomIndex != 0)\r\n                                {\r\n                                    RandomMessagesContext[message.RandomIndex] = message;\r\n                                }\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            var dialog = (TLDialog)d;\r\n                            var peer = dialog.Peer;\r\n                            if (peer is TLPeerUser)\r\n                            {\r\n                                var user = UsersContext[peer.Id.Value];\r\n                                if (user != null)\r\n                                {\r\n                                    dialog._with = user;\r\n                                }\r\n                                else\r\n                                {\r\n                                    var userBase = dialog.With as TLUserBase;\r\n                                    if (userBase != null)\r\n                                    {\r\n                                        UsersContext[userBase.Index] = userBase;\r\n                                    }\r\n                                }\r\n                            }\r\n                            else if (peer is TLPeerChat)\r\n                            {\r\n                                var chat = ChatsContext[peer.Id.Value];\r\n                                if (chat != null)\r\n                                {\r\n                                    dialog._with = chat;\r\n                                }\r\n                                else\r\n                                {\r\n                                    var chatBase = dialog.With as TLChatBase;\r\n                                    if (chatBase != null)\r\n                                    {\r\n                                        ChatsContext[chatBase.Index] = chatBase;\r\n                                    }\r\n                                }\r\n                            }\r\n                            else if (peer is TLPeerBroadcast)\r\n                            {\r\n                                var broadcastChat = ChatsContext[peer.Id.Value];\r\n                                if (broadcastChat != null)\r\n                                {\r\n                                    dialog._with = broadcastChat;\r\n                                }\r\n                                else\r\n                                {\r\n                                    broadcastChat = dialog.With as TLBroadcastChat;\r\n                                    if (broadcastChat != null)\r\n                                    {\r\n                                        ChatsContext[broadcastChat.Index] = broadcastChat;\r\n                                    }\r\n                                }\r\n                            }\r\n                            else if (peer is TLPeerChannel)\r\n                            {\r\n                                var channel = ChatsContext[peer.Id.Value];\r\n                                if (channel != null)\r\n                                {\r\n                                    dialog._with = channel;\r\n                                }\r\n                                else\r\n                                {\r\n                                    channel = dialog.With as TLChannel;\r\n                                    if (channel != null)\r\n                                    {\r\n                                        ChatsContext[channel.Index] = channel;\r\n                                    }\r\n                                }\r\n\r\n                                var dialogFeed = dialog as TLDialogFeed;\r\n                                if (dialogFeed != null)\r\n                                {\r\n                                    var channels = new TLVector<TLChatBase>();\r\n                                    foreach (var channelId in dialogFeed.FeedOtherChannels)\r\n                                    {\r\n                                        var ch = ChatsContext[channelId.Value];\r\n                                        if (ch != null)\r\n                                        {\r\n                                            channels.Add(ch);\r\n                                        }\r\n                                    }\r\n                                    dialogFeed._with = channels;\r\n                                }\r\n                            }\r\n\r\n                            dialog._topMessage = dialog.Messages.FirstOrDefault();\r\n                            dialog.TopMessageId = dialog.TopMessage != null ? dialog.TopMessage.Id : null;\r\n                            if (dialog.TopMessageId == null)\r\n                            {\r\n                                dialog.TopMessageRandomId = dialog.TopMessage != null ? dialog.TopMessage.RandomId : null;\r\n                            }\r\n                            foreach (var message in dialog.Messages)\r\n                            {\r\n                                if (message.Status == MessageStatus.Sending\r\n                                    || message.Status == MessageStatus.Compressing)\r\n                                {\r\n                                    message._status = message.Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                                    ResendingMessages.Add(message);\r\n                                }\r\n\r\n                                AddMessageToContext(message);\r\n                                if (message.RandomIndex != 0)\r\n                                {\r\n                                    RandomMessagesContext[message.RandomIndex] = message;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                    }\r\n                }\r\n                _isOpened = true;\r\n\r\n                //#if DEBUG\r\n                Execute.BeginOnThreadPool(() =>\r\n                {\r\n                    FileUtils.Copy(_usersSyncRoot, UsersMTProtoFileName, TempUsersMTProtoFileName);\r\n                    FileUtils.Copy(_chatsSyncRoot, ChatsMTProtoFileName, TempChatsMTProtoFileName);\r\n                    FileUtils.Copy(_broadcastsSyncRoot, BroadcastsMTProtoFileName, TempBroadcastsMTProtoFileName);\r\n                    FileUtils.Copy(_encryptedChatsSyncRoot, EncryptedChatsMTProtoFileName, TempEncryptedChatsMTProtoFileName);\r\n                    FileUtils.Copy(_dialogsSyncRoot, DialogsMTProtoFileName, TempDialogsMTProtoFileName);\r\n                });\r\n                //#endif\r\n\r\n                //TLObject.LogNotify = false;\r\n                Log(\"Open DB time: \" + timer.Elapsed);\r\n                //TLUtils.WritePerformance(\"Open DB time: \" + timer.Elapsed);\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"DB ERROR: open DB error\", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n        }\r\n\r\n        public IList<TLMessageBase> ResendingMessages { get; protected set; }\r\n        public IList<TLDecryptedMessageBase> ResendingDecryptedMessages { get; protected set; }\r\n\r\n        public event EventHandler CommitInvoked;\r\n\r\n        protected virtual void RaiseCommitInvoked()\r\n        {\r\n            var handler = CommitInvoked;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public void Commit()\r\n        {\r\n            RaiseCommitInvoked();\r\n            HasChanges = true;\r\n        }\r\n\r\n        public void CommitInternal()\r\n        {\r\n            //return;\r\n            //return;\r\n            if (!_isOpened) return;\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            //truncate commiting DB\r\n            var dialogs = new List<TLDialogBase>();\r\n            var messagesCount = 0;\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                var importantCount = 0;\r\n                for (var i = 0; i < Dialogs.Count && importantCount < Constants.CachedDialogsCount; i++)\r\n                {\r\n                    dialogs.Add(Dialogs[i]);\r\n\r\n                    var chat = Dialogs[i].With as TLChat41;\r\n                    if (chat == null || !chat.IsMigrated)\r\n                    {\r\n                        importantCount++;\r\n                    }\r\n                }\r\n                foreach (var d in dialogs)\r\n                {\r\n                    var dialog = d as TLDialog;\r\n                    if (dialog != null)\r\n                    {\r\n                        var chat = dialog.With as TLChat41;\r\n                        if (chat != null && chat.IsMigrated)\r\n                        {\r\n                            //dialog.Messages = new ObservableCollection<TLMessageBase>(dialog.Messages.Take(Constants.CachedMessagesCount));\r\n                            dialog.CommitMessages = dialog.Messages.Take(Constants.CachedMessagesCount).ToList();\r\n                        }\r\n                        else\r\n                        {\r\n                            //dialog.Messages = new ObservableCollection<TLMessageBase>(dialog.Messages.Take(Constants.CachedMessagesCount));\r\n                            dialog.CommitMessages = dialog.Messages.Take(Constants.CachedMessagesCount).ToList();\r\n                        }\r\n                        messagesCount += dialog.Messages.Count;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var mtProtoDialogs = new TLVector<TLDialogBase> { Items = dialogs };\r\n            if (ProxyData != null) { TLUtils.SaveObjectToMTProtoFile(_proxyDataSyncRoot, ProxyDataMTProtoFileName, ProxyData); }\r\n            else { FileUtils.Delete(_proxyDataSyncRoot, ProxyDataMTProtoFileName); }\r\n            TLUtils.SaveObjectToMTProtoFile(_dialogsFileSyncRoot, DialogsMTProtoFileName, mtProtoDialogs);\r\n            TLUtils.SaveObjectToMTProtoFile(_usersSyncRoot, UsersMTProtoFileName, new TLVector<TLUserBase> { Items = UsersContext.Values.ToList() });\r\n            TLUtils.SaveObjectToMTProtoFile(_chatsSyncRoot, ChatsMTProtoFileName, new TLVector<TLChatBase> { Items = ChatsContext.Values.ToList() });\r\n            TLUtils.SaveObjectToMTProtoFile(_broadcastsSyncRoot, BroadcastsMTProtoFileName, new TLVector<TLBroadcastChat> { Items = BroadcastsContext.Values.ToList() });\r\n            TLUtils.SaveObjectToMTProtoFile(_encryptedChatsSyncRoot, EncryptedChatsMTProtoFileName, new TLVector<TLEncryptedChatBase> { Items = EncryptedChatsContext.Values.ToList() });\r\n\r\n            HasChanges = false;\r\n\r\n            TLUtils.WritePerformance(string.Format(\"Commit DB time ({0}d, {1}u, {2}c, {6}b, {5}ec, {4}m): {3}\", dialogs.Count, UsersContext.Count, ChatsContext.Count, timer.Elapsed, messagesCount, EncryptedChatsContext.Count, BroadcastsContext.Count));\r\n        }\r\n\r\n        public int CountRecords<T>() where T : TLObject\r\n        {\r\n            var result = 0;\r\n            if (typeof(T) == typeof(TLMessageBase))\r\n            {\r\n                lock (_dialogsSyncRoot)\r\n                {\r\n                    foreach (var dialog in Dialogs)\r\n                    {\r\n                        result += dialog.CountMessages();\r\n                    }\r\n                }\r\n\r\n            }\r\n            else if (typeof(T) == typeof(TLDialog))\r\n            {\r\n                result += Dialogs.Count;\r\n            }\r\n            else if (typeof(T) == typeof(TLUserBase))\r\n            {\r\n                result += UsersContext.Count;\r\n            }\r\n            else if (typeof(T) == typeof(TLBroadcastChat))\r\n            {\r\n                result += BroadcastsContext.Count;\r\n            }\r\n            else if (typeof(T) == typeof(TLChatBase))\r\n            {\r\n                result += ChatsContext.Count;\r\n            }\r\n            else\r\n            {\r\n                throw new NotImplementedException();\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _commitSubscription.Dispose();\r\n        }\r\n\r\n        public void Compress()\r\n        {\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                MessagesContext.Clear();\r\n                for (var i = 0; i < Dialogs.Count; i++)\r\n                {\r\n                    var dialog = Dialogs[i] as TLDialog;\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog.Messages = new ObservableCollection<TLMessageBase>(dialog.Messages.Take(1));\r\n\r\n                        var message = dialog.Messages.FirstOrDefault();\r\n                        if (message != null)\r\n                        {\r\n                            AddMessageToContext(message);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            CommitInternal();\r\n        }\r\n\r\n        public void ClearLocalFileNames()\r\n        {\r\n            lock (_dialogsSyncRoot)\r\n            {\r\n                MessagesContext.Clear();\r\n                for (var i = 0; i < Dialogs.Count; i++)\r\n                {\r\n                    var dialog = Dialogs[i] as TLDialog;\r\n                    if (dialog != null)\r\n                    {\r\n                        for (var j = 0; j < dialog.Messages.Count; j++)\r\n                        {\r\n                            var message = dialog.Messages[j] as TLMessage;\r\n                            if (message != null)\r\n                            {\r\n                                var media = message.Media as TLMessageMediaDocument;\r\n                                if (media != null)\r\n                                {\r\n                                    media.IsoFileName = null;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            CommitInternal();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/Connection/ConnectionService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing Telegram.Api.Services.DeviceInfo;\r\n#if WP8 || WIN_RT\r\nusing Windows.Networking.Connectivity;\r\n#endif\r\n#if WINDOWS_PHONE\r\nusing Microsoft.Phone.Net.NetworkInformation;\r\n#endif\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Connection\r\n{\r\n    public interface IConnectionService\r\n    {\r\n        void Initialize(IMTProtoService mtProtoService);\r\n        event EventHandler ConnectionLost;\r\n    }\r\n\r\n    public class ConnectionService : IConnectionService\r\n    {\r\n        public event EventHandler ConnectionLost;\r\n\r\n        protected virtual void RaiseConnectionFailed()\r\n        {\r\n            var handler = ConnectionLost;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        private IMTProtoService _mtProtoService;\r\n\r\n        public void Initialize(IMTProtoService mtProtoService)\r\n        {\r\n            _mtProtoService = mtProtoService;\r\n        }\r\n\r\n        private Timer _connectionScheduler;\r\n\r\n        private bool _isNetworkAwailable;\r\n\r\n#if WP8 || WIN_RT\r\n        private ConnectionProfile _profile;\r\n        private NetworkConnectivityLevel? _connectivityLevel;\r\n#endif\r\n\r\n        public ConnectionService(IDeviceInfoService deviceInfoService)\r\n        {\r\n            if (deviceInfoService != null && deviceInfoService.IsBackground)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _connectionScheduler = new Timer(CheckConnectionState, this, TimeSpan.FromSeconds(0.0), TimeSpan.FromSeconds(5.0));\r\n\r\n#if WINDOWS_PHONE\r\n            _isNetworkAwailable = DeviceNetworkInformation.IsNetworkAvailable;\r\n#endif\r\n\r\n#if WP8 || WIN_RT\r\n            _profile = NetworkInformation.GetInternetConnectionProfile();\r\n            _connectivityLevel = _profile != null ? _profile.GetNetworkConnectivityLevel() : (NetworkConnectivityLevel?)null;\r\n\r\n            //var connectivityLevel = _profile.GetNetworkConnectivityLevel();\r\n            //_profile.NetworkAdapter.IanaInterfaceType != 71 // mobile data\r\n            //_profile.GetConnectionCost().Roaming;\r\n\r\n            //Helpers.Execute.ShowDebugMessage(string.Format(\"InternetConnectionProfile={0}\", _profile != null ? _profile.GetNetworkConnectivityLevel().ToString() : \"null\"));\r\n            \r\n            // new solution\r\n            NetworkInformation.NetworkStatusChanged += sender =>\r\n            {\r\n                var previousProfile = _profile;\r\n                var previousConnectivityLevel = _connectivityLevel;\r\n\r\n                _profile = NetworkInformation.GetInternetConnectionProfile();\r\n                _connectivityLevel = _profile != null ? _profile.GetNetworkConnectivityLevel() : (NetworkConnectivityLevel?)null;\r\n\r\n                if (_profile != null)\r\n                {\r\n                    if (_mtProtoService == null) return;\r\n\r\n                    var activeTransport = _mtProtoService.GetActiveTransport();\r\n                    if (activeTransport == null) return;\r\n                    if (activeTransport.AuthKey == null) return;\r\n\r\n                    var transportId = activeTransport.Id;\r\n\r\n                    var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                    if (!isAuthorized)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    var errorDebugString = string.Format(\"{0} internet connected\", DateTime.Now.ToString(\"HH:mm:ss.fff\"));\r\n                    TLUtils.WriteLine(errorDebugString, LogSeverity.Error);\r\n\r\n                    var reconnect = _connectivityLevel == NetworkConnectivityLevel.InternetAccess && previousConnectivityLevel != NetworkConnectivityLevel.InternetAccess;\r\n                    if (reconnect)\r\n                    {\r\n                        TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" reconnect t\" + transportId, LogSeverity.Error);\r\n\r\n                        Logs.Log.Write(string.Format(\"  Reconnect reason=NetworkStatusChanged profile={0} internet_access={1} previous_profile={2} previous_internet_access={3}\",\r\n                            _profile != null ? _profile.ProfileName : \"none\",\r\n                            _profile != null ? _connectivityLevel.ToString() : \"none\",\r\n                            previousProfile != null ? previousProfile.ProfileName : \"none\",\r\n                            previousProfile != null ? previousConnectivityLevel.ToString() : \"none\"));\r\n\r\n                        RaiseConnectionFailed();\r\n\r\n                        return;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    var errorDebugString = string.Format(\"{0} internet disconnected\", DateTime.Now.ToString(\"HH:mm:ss.fff\"));\r\n                    TLUtils.WriteLine(errorDebugString, LogSeverity.Error);\r\n\r\n                    _mtProtoService.SetMessageOnTime(60.0 * 60, \"Waiting for network...\");\r\n                    //Helpers.Execute.ShowDebugMessage(string.Format(\"NetworkStatusChanged Internet disconnected Profile={0}\", _profile));\r\n                }\r\n            };\r\n#endif\r\n\r\n#if WINDOWS_PHONE\r\n            // old solution\r\n            DeviceNetworkInformation.NetworkAvailabilityChanged += (sender, args) =>\r\n            {\r\n                return;\r\n\r\n                var isNetworkAvailable = _isNetworkAwailable;\r\n                \r\n                _isNetworkAwailable = DeviceNetworkInformation.IsNetworkAvailable;\r\n                //if (isNetworkAvailable != _isNetworkAwailable)\r\n                {\r\n                    var info = new StringBuilder();\r\n                    info.AppendLine();\r\n                    foreach (var networkInterface in new NetworkInterfaceList())\r\n                    {\r\n                        info.AppendLine(string.Format(\" {0} {1} {2}\", \r\n                            networkInterface.InterfaceName,\r\n                            networkInterface.InterfaceState,\r\n                            networkInterface.InterfaceType));\r\n                    }\r\n\r\n                    var current = new NetworkInterfaceList();\r\n                    var ni = NetworkInterface.NetworkInterfaceType;\r\n                    Helpers.Execute.ShowDebugMessage(string.Format(\"NetworkAwailabilityChanged Interface={0}\\n{1}\", ni, info.ToString()));\r\n                }\r\n\r\n                var networkString = string.Format(\"{0}, {1}, \", args.NotificationType,\r\n                    args.NetworkInterface != null ? args.NetworkInterface.InterfaceState.ToString() : \"none\");\r\n\r\n                var mtProtoService = MTProtoService.Instance;\r\n                if (mtProtoService != null)\r\n                {\r\n                    if (args.NotificationType == NetworkNotificationType.InterfaceDisconnected)\r\n                    {\r\n#if DEBUG\r\n                        var interfaceSubtype = args.NetworkInterface != null\r\n                            ? args.NetworkInterface.InterfaceSubtype.ToString()\r\n                            : \"Interface\";\r\n                        mtProtoService.SetMessageOnTime(2.0, DateTime.Now.ToString(\"HH:mm:ss.fff \", CultureInfo.InvariantCulture) + interfaceSubtype + \" disconnected...\");\r\n                        TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff \", CultureInfo.InvariantCulture) + interfaceSubtype + \" disconnected\", LogSeverity.Error);\r\n#else\r\n                        //mtProtoService.SetMessageOnTime(2.0, \"No Internet connection\");\r\n#endif\r\n                    }\r\n                    else if (args.NotificationType == NetworkNotificationType.InterfaceConnected)\r\n                    {\r\n#if DEBUG\r\n                        var interfaceSubtype = args.NetworkInterface != null\r\n                            ? args.NetworkInterface.InterfaceSubtype.ToString()\r\n                            : \"Interface\";\r\n                        mtProtoService.SetMessageOnTime(2.0, DateTime.Now.ToString(\"HH:mm:ss.fff \", CultureInfo.InvariantCulture) + interfaceSubtype + \" connected...\");\r\n                        TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff \", CultureInfo.InvariantCulture) + interfaceSubtype + \" connected\", LogSeverity.Error);\r\n#else\r\n                        mtProtoService.SetMessageOnTime(0.0, string.Empty);\r\n#endif\r\n                    }\r\n                    else if (args.NotificationType == NetworkNotificationType.CharacteristicUpdate)\r\n                    {\r\n                        //#if DEBUG\r\n\r\n                        //                        mtProtoService.SetMessageOnTime(2.0, \"Characteristic update...\");\r\n                        //                        var networkInterface = args.NetworkInterface;\r\n                        //                        if (networkInterface != null)\r\n                        //                        {\r\n                        //                            var characteristics = new StringBuilder();\r\n                        //                            characteristics.AppendLine();\r\n                        //                            //characteristics.AppendLine(\"Description=\" + networkInterface.Description);\r\n                        //                            characteristics.AppendLine(\"InterfaceName=\" + networkInterface.InterfaceName);\r\n                        //                            characteristics.AppendLine(\"InterfaceState=\" + networkInterface.InterfaceState);\r\n                        //                            characteristics.AppendLine(\"InterfaceType=\" + networkInterface.InterfaceType);\r\n                        //                            characteristics.AppendLine(\"InterfaceSubtype=\" + networkInterface.InterfaceSubtype);\r\n                        //                            characteristics.AppendLine(\"Bandwidth=\" + networkInterface.Bandwidth);\r\n                        //                            //characteristics.AppendLine(\"Characteristics=\" + networkInterface.Characteristics);\r\n                        //                            TLUtils.WriteLine(characteristics.ToString(), LogSeverity.Error);\r\n                        //                        }\r\n                        //#endif\r\n                    }\r\n                }\r\n\r\n            };\r\n#endif\r\n\r\n\r\n        }\r\n\r\n        private void CheckConnectionState(object state)\r\n        {\r\n//#if !WIN_RT && DEBUG\r\n//            Microsoft.Devices.VibrateController.Default.Start(TimeSpan.FromMilliseconds(50));\r\n//#endif\r\n\r\n            if (Debugger.IsAttached) return;\r\n//#if DEBUG\r\n//            return;\r\n//#endif\r\n\r\n            if (_mtProtoService == null) return;\r\n            \r\n            var activeTransport = _mtProtoService.GetActiveTransport();\r\n            if (activeTransport == null) return;\r\n            if (activeTransport.AuthKey == null) return;\r\n\r\n            var transportId = activeTransport.Id;\r\n\r\n            var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n            if (!isAuthorized)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var connectionFailed = false;\r\n            var now = DateTime.Now;\r\n            if (activeTransport.LastReceiveTime.HasValue)\r\n            {\r\n                connectionFailed = Math.Abs((now - activeTransport.LastReceiveTime.Value).TotalSeconds) > Constants.TimeoutInterval;\r\n                if (connectionFailed)\r\n                {\r\n                    Logs.Log.Write(string.Format(\"  Reconnect reason=ConnectionFailed transport={3} now={0} - last_receive_time={1} > timeout={2}\", now.ToString(\"dd-MM-yyyy HH:mm:ss.fff\"), activeTransport.LastReceiveTime.Value.ToString(\"dd-MM-yyyy HH:mm:ss.fff\"), Constants.TimeoutInterval, activeTransport.Id));\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (activeTransport.FirstSendTime.HasValue)\r\n                {\r\n                    connectionFailed = Math.Abs((now - activeTransport.FirstSendTime.Value).TotalSeconds) > Constants.TimeoutInterval;\r\n                    if (connectionFailed)\r\n                    {\r\n                        Logs.Log.Write(string.Format(\"  Reconnect reason=ConnectionFailed transport={3} now={0} - first_send_time={1} > timeout={2}\", now.ToString(\"dd-MM-yyyy HH:mm:ss.fff\"), activeTransport.FirstSendTime.Value.ToString(\"dd-MM-yyyy HH:mm:ss.fff\"), Constants.TimeoutInterval, activeTransport.Id));\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (connectionFailed)\r\n            {\r\n                RaiseConnectionFailed();\r\n                TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" reconnect t\" + transportId, LogSeverity.Error);\r\n                return;\r\n            }\r\n\r\n            var pingRequired = false;\r\n            var timeFromLastReceive = 0.0;\r\n            var timeFromFirstSend = 0.0;\r\n            var pingTimeout = Math.Max(Constants.TimeoutInterval - 10.0, 10.0);\r\n            if (activeTransport.LastReceiveTime.HasValue)\r\n            {\r\n                // что-то уже получали по соединению\r\n                var lastReceiveTime = activeTransport.LastReceiveTime.Value;\r\n                timeFromLastReceive = Math.Abs((now - lastReceiveTime).TotalSeconds);\r\n\r\n                pingRequired = timeFromLastReceive > pingTimeout;\r\n                if (pingRequired)\r\n                {\r\n                    Logs.Log.Write(string.Format(\"  CheckReconnect reason=PingRequired transport={3} now={0} - last_receive_time={1} > ping_timeout={2}\", now.ToString(\"HH:mm:ss.fff\"), lastReceiveTime.ToString(\"HH:mm:ss.fff\"), pingTimeout, activeTransport.Id));\r\n                }\r\n            }\r\n            else\r\n            {\r\n                // ничего не получали, но что-то отправляли\r\n                if (activeTransport.FirstSendTime.HasValue)\r\n                {\r\n                    var firstSendTime = activeTransport.FirstSendTime.Value;\r\n                    timeFromFirstSend = Math.Abs((now - firstSendTime).TotalSeconds);\r\n\r\n                    pingRequired = timeFromFirstSend > pingTimeout;\r\n                    if (pingRequired)\r\n                    {\r\n                        Logs.Log.Write(string.Format(\"  CheckReconnect reason=PingRequired transport={3} now={0} - first_send_time={1} > ping_timeout={2}\", now.ToString(\"HH:mm:ss.fff\"), firstSendTime.ToString(\"HH:mm:ss.fff\"), pingTimeout, activeTransport.Id));\r\n                    }\r\n                }\r\n                // хотя бы пинганем для начала\r\n                else\r\n                {\r\n                    pingRequired = true;\r\n                }\r\n            }\r\n\r\n            if (pingRequired)\r\n            {\r\n                var pingId = TLLong.Random();\r\n                var pingIdHash = pingId.Value % 1000;\r\n\r\n                var debugString = string.Format(\"{0} ping t{1} ({2}, {3}) [{4}]\", \r\n                    DateTime.Now.ToString(\"HH:mm:ss.fff\"),\r\n                    transportId, \r\n                    timeFromFirstSend.ToString(\"N\"), \r\n                    timeFromLastReceive.ToString(\"N\"), \r\n                    pingIdHash);\r\n\r\n                TLUtils.WriteLine(debugString, LogSeverity.Error);\r\n                _mtProtoService.PingAsync(pingId, //new TLInt(35),\r\n                    result =>\r\n                    {\r\n                        var resultDebugString = string.Format(\"{0} pong t{1} ({2}, {3}) [{4}]\",\r\n                            DateTime.Now.ToString(\"HH:mm:ss.fff\"),\r\n                            transportId,\r\n                            timeFromFirstSend.ToString(\"N\"),\r\n                            timeFromLastReceive.ToString(\"N\"),\r\n                            pingIdHash);\r\n\r\n                        TLUtils.WriteLine(resultDebugString, LogSeverity.Error);\r\n                    },\r\n                    error =>\r\n                    {\r\n                        var errorDebugString = string.Format(\"{0} pong error t{1} ({2}, {3}) [{4}] \\nSocketError={5}\",\r\n                            DateTime.Now.ToString(\"HH:mm:ss.fff\"),\r\n                            transportId,\r\n                            timeFromFirstSend.ToString(\"N\"),\r\n                            timeFromLastReceive.ToString(\"N\"),\r\n                            pingIdHash,\r\n#if WINDOWS_PHONE\r\n                            error.SocketError\r\n#else\r\n                            string.Empty\r\n#endif\r\n                            );\r\n\r\n                        TLUtils.WriteLine(errorDebugString, LogSeverity.Error);\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                var checkDebugString = string.Format(\"{0} check t{1} ({2}, {3})\",\r\n                    DateTime.Now.ToString(\"HH:mm:ss.fff\"),\r\n                    transportId,\r\n                    timeFromFirstSend.ToString(\"N\"),\r\n                    timeFromLastReceive.ToString(\"N\"));\r\n\r\n                //TLUtils.WriteLine(checkDebugString, LogSeverity.Error);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/Connection/PublicConfigService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Numerics;\r\nusing System.Runtime.Serialization.Json;\r\n#if !WIN_RT\r\nusing System.Security.Cryptography;\r\n#endif\r\nusing System.Text;\r\nusing Org.BouncyCastle.Crypto.Parameters;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Connection\r\n{\r\n    public class MockupPublicConfigService : IPublicConfigService\r\n    {\r\n        public void GetAsync(Action<TLConfigSimple> callback, Action<Exception> faultCallback = null)\r\n        {\r\n\r\n        }\r\n    }\r\n\r\n    public class PublicConfigService : IPublicConfigService\r\n    {\r\n        private static void Log(string str)\r\n        {\r\n            Logs.Log.Write(string.Format(\"  PublicConfigService {0}\", str));\r\n        }\r\n\r\n        public bool Test { get; set; }\r\n\r\n        private int _counter;\r\n\r\n        private void PerformAppRequestAsync(Action<TLConfigSimple> callback, Action<int, Exception> faultCallback)\r\n        {\r\n            Execute.ShowDebugMessage(\"GetPublicConfig start counter=\" + _counter);\r\n\r\n            var counter = _counter;\r\n\r\n            WebRequest request;\r\n            if (_counter == 0)\r\n            {\r\n                request = Test\r\n                    ? WebRequest.Create(\"https://www.google.pt/resolve?name=tap.stel.com&type=16\")\r\n                    : WebRequest.Create(\"https://www.google.pt/resolve?name=ap.stel.com&type=16\");\r\n                request.Headers[\"Host\"] = \"dns.google.com\";\r\n\r\n                _counter = 1;\r\n            }\r\n            else if (_counter == 1)\r\n            {\r\n                request = Test\r\n                    ? WebRequest.Create(\"https://www.google.com/resolve?name=tap.stel.com&type=16\")\r\n                    : WebRequest.Create(\"https://www.google.com/resolve?name=ap.stel.com&type=16\");\r\n                request.Headers[\"Host\"] = \"dns.google.com\";\r\n\r\n                _counter = 2;\r\n            }\r\n            else if (_counter == 2)\r\n            {\r\n                request = Test\r\n                    ? WebRequest.Create(\"https://google.pt/resolve?name=tap.stel.com&type=16\")\r\n                    : WebRequest.Create(\"https://google.pt/resolve?name=ap.stel.com&type=16\");\r\n                request.Headers[\"Host\"] = \"dns.google.com\";\r\n\r\n                _counter = 3;\r\n            }\r\n            else\r\n            {\r\n                request = Test\r\n                    ? WebRequest.Create(\"https://google.com/resolve?name=tap.stel.com&type=16\")\r\n                    : WebRequest.Create(\"https://google.com/resolve?name=ap.stel.com&type=16\");\r\n                request.Headers[\"Host\"] = \"dns.google.com\";\r\n\r\n                _counter = 0;\r\n            }\r\n\r\n            /*else if (_counter == 1)\r\n            {\r\n                request = Test\r\n                    ? WebRequest.Create(\"https://google.com/test/\")\r\n                    : WebRequest.Create(\"https://google.com/\");\r\n                request.Headers[\"Host\"] = \"dns-telegram.appspot.com\";\r\n\r\n                _counter = 2;\r\n            }\r\n            else\r\n            {\r\n                request = Test\r\n                    ? WebRequest.Create(\"https://software-download.microsoft.com/test/config.txt\")\r\n                    : WebRequest.Create(\"https://software-download.microsoft.com/prod/config.txt\");\r\n                request.Headers[\"Host\"] = \"tcdnb.azureedge.net\";\r\n\r\n                _counter = 0;\r\n            }*/\r\n\r\n\r\n            Log(\"Start app request\");\r\n\r\n            request.BeginGetResponse(\r\n                result =>\r\n                {\r\n                    Log(\"Stop app request\");\r\n                    try\r\n                    {\r\n                        var response = request.EndGetResponse(result);\r\n\r\n                        string dataString;\r\n                        using (var s = response.GetResponseStream())\r\n                        {\r\n                            using (var readStream = new StreamReader(s))\r\n                            {\r\n                                dataString = readStream.ReadToEnd();\r\n                            }\r\n                        }\r\n\r\n                        //if (counter == 0)\r\n                        {\r\n                            dataString = ParseDataString(dataString);\r\n                        }\r\n\r\n                        var configSimple = DecryptSimpleConfig(dataString);\r\n\r\n                        callback.SafeInvoke(configSimple);\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        Log(\"App request exception\\n\" + ex);\r\n\r\n                        faultCallback.SafeInvoke(counter, ex);\r\n                    }\r\n                },\r\n                request);\r\n        }\r\n\r\n        private void PerformDnsRequestAsync(Action<TLConfigSimple> callback, Action<Exception> faultCallback)\r\n        {\r\n            var request = Test\r\n                ? WebRequest.Create(\"https://google.com/resolve?name=tap.stel.com&type=16\")\r\n                : WebRequest.Create(\"https://google.com/resolve?name=ap.stel.com&type=16\");\r\n            request.Headers[\"Host\"] = \"dns.google.com\";\r\n\r\n            Log(\"Start dns request\");\r\n\r\n            request.BeginGetResponse(\r\n                result =>\r\n                {\r\n                    Log(\"Stop dns request\");\r\n                    try\r\n                    {\r\n                        var response = request.EndGetResponse(result);\r\n\r\n                        string dataString;\r\n                        using (var s = response.GetResponseStream())\r\n                        {\r\n                            using (var readStream = new StreamReader(s))\r\n                            {\r\n                                dataString = readStream.ReadToEnd();\r\n                            }\r\n                        }\r\n\r\n                        dataString = ParseDataString(dataString);\r\n\r\n                        var configSimple = DecryptSimpleConfig(dataString);\r\n\r\n                        callback.SafeInvoke(configSimple);\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        Log(\"Dns request exception\\n\" + ex);\r\n\r\n                        faultCallback.SafeInvoke(ex);\r\n                    }\r\n                },\r\n                request);\r\n        }\r\n\r\n        private static TLConfigSimple DecryptSimpleConfig(string dataString)\r\n        {\r\n            TLConfigSimple result = null;\r\n\r\n#if !WIN_RT\r\n            var base64Chars = dataString.Where(ch =>\r\n            {\r\n                var isGoodBase64 =\r\n                    (ch == '+') || (ch == '=') || (ch == '/')\r\n                    || (ch >= 'a' && ch <= 'z')\r\n                    || (ch >= 'A' && ch <= 'Z')\r\n                    || (ch >= '0' && ch <= '9');\r\n\r\n                return isGoodBase64;\r\n            }).ToArray();\r\n\r\n            var cleanDataString = new string(base64Chars);\r\n            const int kGoodSizeBase64 = 344;\r\n            if (cleanDataString.Length != kGoodSizeBase64)\r\n            {\r\n                Log(string.Format(\"Bad base64 size {0} required {1}\", cleanDataString.Length, kGoodSizeBase64));\r\n                return null;\r\n            }\r\n            byte[] data = null;\r\n            try\r\n            {\r\n                data = Convert.FromBase64String(cleanDataString);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Log(\"Bad base64 bytes\");\r\n\r\n                return null;\r\n            }\r\n            const int kGoodSizeData = 256;\r\n            if (data.Length != kGoodSizeData)\r\n            {\r\n                Log(string.Format(\"Bad data size {0} required {1}\", data.Length, kGoodSizeData));\r\n\r\n                return null;\r\n            }\r\n\r\n            var xml = \"<RSAKeyValue><Modulus>yr+18Rex2ohtVy8sroGPBwXD3DOoKCSpjDqYoXgCqB7ioln4eDCFfOBUlfXUEvM/fnKCpF46VkAftlb4VuPDeQSS/ZxZYEGqHaywlroVnXHIjgqoxiAd192xRGreuXIaUKmkwlM9JID9WS2jUsTpzQ91L8MEPLJ/4zrBwZua8W5fECwCCh2c9G5IzzBm+otMS/YKwmR1olzRCyEkyAEjXWqBI9Ftv5eG8m0VkBzOG655WIYdyV0HfDK/NWcvGqa0w/nriMD6mDjKOryamw0OP9QuYgMN0C9xMW9y8SmP4h92OAWodTYgY1hZCxdv6cs5UnW9+PWvS+WIbkh+GaWYxw==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>\";\r\n\r\n            var provider = new RSACryptoServiceProvider();\r\n            provider.FromXmlString(xml);\r\n            var parameters = provider.ExportParameters(false);\r\n            var modulus = parameters.Modulus;\r\n            var exponent = parameters.Exponent;\r\n\r\n            var dataBI = new BigInteger(data.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n            var exponentBI = new BigInteger(exponent.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n            var modulusBI = new BigInteger(modulus.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n\r\n            var authKey = BigInteger.ModPow(dataBI, exponentBI, modulusBI).ToByteArray();\r\n            if (authKey[authKey.Length - 1] == 0x00)\r\n            {\r\n                authKey = authKey.SubArray(0, authKey.Length - 1);\r\n            }\r\n\r\n            authKey = authKey.Reverse().ToArray();\r\n            if (authKey.Length > 256)\r\n            {\r\n                var correctedAuth = new byte[256];\r\n                Array.Copy(authKey, authKey.Length - 256, correctedAuth, 0, 256);\r\n                authKey = correctedAuth;\r\n            }\r\n            else if (authKey.Length < 256)\r\n            {\r\n                var correctedAuth = new byte[256];\r\n                Array.Copy(authKey, 0, correctedAuth, 256 - authKey.Length, authKey.Length);\r\n                for (var i = 0; i < 256 - authKey.Length; i++)\r\n                {\r\n                    authKey[i] = 0;\r\n                }\r\n                authKey = correctedAuth;\r\n            }\r\n\r\n            var key = authKey.SubArray(0, 32);\r\n            var iv = authKey.SubArray(16, 16);\r\n            var encryptedData = authKey.SubArray(32, authKey.Length - 32);\r\n\r\n            var cipher = CipherUtilities.GetCipher(\"AES/CBC/NOPADDING\");\r\n            var param = new KeyParameter(key);\r\n            cipher.Init(false, new ParametersWithIV(param, iv));\r\n            var decryptedData = cipher.DoFinal(encryptedData);\r\n\r\n            const int kDigestSize = 16;\r\n            var hash = Utils.ComputeSHA256(decryptedData.SubArray(0, 208));\r\n            for (var i = 0; i < kDigestSize; i++)\r\n            {\r\n                if (hash[i] != decryptedData[208 + i])\r\n                {\r\n                    Log(\"Bad digest\");\r\n                    return null;\r\n                }\r\n            }\r\n\r\n            var position = 4;\r\n            var length = BitConverter.ToInt32(decryptedData, 0);\r\n            if (length <= 0 || length > 208 || length % 4 != 0)\r\n            {\r\n                Log(string.Format(\"Bad length {0}\", length));\r\n                return null;\r\n            }\r\n            try\r\n            {\r\n                result = TLObject.GetObject<TLConfigSimple>(decryptedData, ref position);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Log(\"Could not read configSimple\");\r\n                return null;\r\n            }\r\n\r\n            if (position != length)\r\n            {\r\n                Log(string.Format(\"Bad read length {0} shoud be {1}\", position, length));\r\n                return null;\r\n            }\r\n#endif\r\n\r\n            return result;\r\n        }\r\n\r\n        public void GetAsync(Action<TLConfigSimple> callback, Action<Exception> faultCallback = null)\r\n        {\r\n//#if DEBUG\r\n//            return;\r\n//#endif\r\n\r\n            if (Debugger.IsAttached)\r\n            {\r\n                return;\r\n            }\r\n\r\n#if !WIN_RT\r\n            PerformAppRequestAsync(\r\n                result =>\r\n                {\r\n                    Execute.ShowDebugMessage(result != null ? result.ToString() : \"null\");\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                (counter, error) =>\r\n                {\r\n                    Execute.ShowDebugMessage(string.Format(\"GetPublicConfig counter={0} error={1}\", counter, error));\r\n\r\n                    faultCallback.SafeInvoke(error);\r\n                });\r\n#endif\r\n        }\r\n\r\n        private static string ParseDataString(string dataString)\r\n        {\r\n            var serializer = new DataContractJsonSerializer(typeof(RootObject));\r\n            RootObject rootObject;\r\n            try\r\n            {\r\n                using (var stream = new MemoryStream(Encoding.Unicode.GetBytes(dataString)))\r\n                {\r\n                    rootObject = serializer.ReadObject(stream) as RootObject;\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Log(\"Failed to parse dns response JSON, ex\\n\" + ex);\r\n                return null;\r\n            }\r\n\r\n            if (rootObject == null)\r\n            {\r\n                Log(\"Not an object received in dns response JSON\");\r\n                return null;\r\n            }\r\n\r\n            if (rootObject.Answer == null)\r\n            {\r\n                Log(\"Could not find Answer in dns response JSON\");\r\n                return null;\r\n            }\r\n\r\n            var result = new StringBuilder();\r\n            for (int i = rootObject.Answer.Count - 1; i >= 0; i--)\r\n            {\r\n                result.Append(rootObject.Answer[i].data);\r\n            }\r\n\r\n            return result.ToString();\r\n        }\r\n    }\r\n\r\n    public interface IPublicConfigService\r\n    {\r\n        void GetAsync(Action<TLConfigSimple> callback, Action<Exception> faultCallback = null);\r\n    }\r\n\r\n    public class Question\r\n    {\r\n        public string name { get; set; }\r\n        public int type { get; set; }\r\n    }\r\n\r\n    public class Answer\r\n    {\r\n        public string name { get; set; }\r\n        public int type { get; set; }\r\n        public int TTL { get; set; }\r\n        public string data { get; set; }\r\n    }\r\n\r\n    public class RootObject\r\n    {\r\n        public int Status { get; set; }\r\n        public bool TC { get; set; }\r\n        public bool RD { get; set; }\r\n        public bool RA { get; set; }\r\n        public bool AD { get; set; }\r\n        public bool CD { get; set; }\r\n        public List<Question> Question { get; set; }\r\n        public List<Answer> Answer { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/DCOptionItem.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.Services\r\n{\r\n    public class ConnectionParams\r\n    {\r\n        public byte[] Salt { get; set; }\r\n\r\n        public byte[] SessionId { get; set; }\r\n\r\n        public byte[] AuthKey { get; set; }\r\n    }\r\n\r\n    public class DCOptionItem\r\n    {\r\n        public ConnectionParams Params { get; set; }\r\n\r\n        public int Id { get; set; }\r\n\r\n        public string Hostname { get; set; }\r\n\r\n        public string IpAddress { get; set; }\r\n\r\n        public int Port { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/DelayedItem.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Text;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    class DelayedItem\r\n    {\r\n        public string Caption { get; set; }\r\n        public DateTime SendTime { get; set; }\r\n        //public DateTime? SendBeforeTime { get; set; }\r\n        public TLObject Object { get; set; }\r\n        public Action<TLObject> Callback { get; set; }\r\n        public Action<TLRPCError> FaultCallback { get; set; }\r\n        public Action<int> AttemptFailed { get; set; }\r\n        public int? MaxAttempt { get; set; }\r\n        public int CurrentAttempt { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(\"DelayedItem\");\r\n            sb.AppendLine(\"Caption \" + Caption);\r\n            sb.AppendLine(\"MaxAttempt \" + MaxAttempt);\r\n            sb.AppendLine(\"CurrentAttempt \" + CurrentAttempt);\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/DeviceInfo/EmptyDeviceInfoService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.DeviceInfo\r\n{\r\n    public class DeviceInfoService : IDeviceInfoService\r\n    {\r\n        public string Model { get; protected set; }\r\n        public string AppVersion { get; protected set; }\r\n        public string SystemVersion { get; protected set; }\r\n        public bool IsBackground { get; protected set; }\r\n        public string BackgroundTaskName { get; protected set; }\r\n        public int BackgroundTaskId { get; protected set; }\r\n\r\n        public DeviceInfoService(string model, string appVersion, string systemVersion, bool isBackground, string backgroundTaskName, int backgroundTaskId)\r\n        {\r\n            Model = model;\r\n            AppVersion = appVersion;\r\n            SystemVersion = systemVersion;\r\n            IsBackground = isBackground;\r\n            BackgroundTaskName = backgroundTaskName;\r\n            BackgroundTaskId = backgroundTaskId;\r\n        }\r\n\r\n        public DeviceInfoService(TLInitConnection initConnection, bool isBackground, string backgroundTaskName, int backgroundTaskId)\r\n        {\r\n            Model = initConnection.DeviceModel.ToString();\r\n            AppVersion = initConnection.AppVersion.ToString();\r\n            SystemVersion = initConnection.SystemVersion.ToString();\r\n            IsBackground = isBackground;\r\n            BackgroundTaskName = backgroundTaskName;\r\n            BackgroundTaskId = backgroundTaskId;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/DeviceInfo/IDeviceInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.Services.DeviceInfo\r\n{\r\n    public interface IDeviceInfoService\r\n    {\r\n        string Model { get; }\r\n        string AppVersion { get; }\r\n        string SystemVersion { get; }\r\n        bool IsBackground { get; }\r\n        string BackgroundTaskName { get; }\r\n        int BackgroundTaskId { get; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/AudioFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class AudioFileManager : FileManagerBase, IAudioFileManager\r\n    {\r\n        public AudioFileManager(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService) : base(eventAggregator, mtProtoService)\r\n        {\r\n            for (var i = 0; i < Constants.AudioDownloadersCount; i++)\r\n            {\r\n                var worker = new Worker(OnDownloading, \"audioDownloader\" + i);\r\n                _workers.Add(worker);\r\n            }\r\n        }\r\n\r\n        private void OnDownloading(object state)\r\n        {\r\n            DownloadablePart part = null;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Canceled)\r\n                    {\r\n                        _items.RemoveAt(i--);\r\n                        try\r\n                        {\r\n                            //_eventAggregator.Publish(new UploadingCanceledEventArgs(item));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                foreach (var item in _items)\r\n                {\r\n                    part = item.Parts.FirstOrDefault(x => x.Status == PartStatus.Ready);\r\n                    if (part != null)\r\n                    {\r\n                        part.Status = PartStatus.Processing;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (part == null)\r\n            {\r\n                var currentWorker = (Worker)state;\r\n                currentWorker.Stop();\r\n                return;\r\n            }\r\n\r\n            var partName = part.ParentItem.InputLocation.GetPartFileName(part.Number, \"audio\");\r\n            var isLastPart = part.Number + 1 == part.ParentItem.Parts.Count;\r\n            var partLength = FileUtils.GetLocalFileLength(partName);\r\n            var partExists = partLength > 0;\r\n            var isCorrectPartLength = isLastPart || partLength == part.Limit.Value;\r\n\r\n            if (!partExists || !isCorrectPartLength)\r\n            {\r\n                bool canceled;\r\n                ProcessFilePart(part, part.ParentItem.DCId, part.ParentItem.InputLocation, out canceled);\r\n                if (canceled)\r\n                {\r\n                    lock (_itemsSyncRoot)\r\n                    {\r\n                        part.ParentItem.Canceled = true;\r\n                        part.Status = PartStatus.Processed;\r\n                        _items.Remove(part.ParentItem);\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                //part.File = GetFile(part.ParentItem.DCId, (TLInputFileLocationBase) part.ParentItem.InputAudioLocation, part.Offset, part.Limit, out error, out canceled);\r\n                //while (part.File == null)\r\n                //{\r\n                //    part.File = GetFile(part.ParentItem.DCId, (TLInputFileLocationBase) part.ParentItem.InputAudioLocation, part.Offset, part.Limit, out error, out canceled);\r\n                //}\r\n            }\r\n\r\n            // indicate progress\r\n            // indicate complete\r\n            bool isComplete;\r\n            bool isCanceled;\r\n            var progress = 0.0;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                part.Status = PartStatus.Processed;\r\n\r\n                FileUtils.CheckMissingPart(_itemsSyncRoot, part, partName);\r\n\r\n                isCanceled = part.ParentItem.Canceled;\r\n\r\n                isComplete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                if (!isComplete)\r\n                {\r\n                    var downloadedCount = part.ParentItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n                    var count = part.ParentItem.Parts.Count;\r\n                    progress = downloadedCount / (double)count;\r\n                }\r\n                else\r\n                {\r\n                    _items.Remove(part.ParentItem);\r\n                }\r\n            }\r\n\r\n            if (!isCanceled)\r\n            {\r\n                if (isComplete)\r\n                {\r\n                    var fileName = part.ParentItem.InputLocation.GetFileName(\"audio\", \".mp3\");\r\n                    var getPartName = new Func<DownloadablePart, string>(x => x.ParentItem.InputLocation.GetPartFileName(x.Number, \"audio\"));\r\n\r\n                    FileUtils.MergePartsToFile(getPartName, part.ParentItem.Parts, fileName);\r\n\r\n                    part.ParentItem.IsoFileName = fileName;\r\n                    if (part.ParentItem.Callback != null)\r\n                    {\r\n                        Execute.BeginOnThreadPool(() => part.ParentItem.Callback(part.ParentItem));\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(part.ParentItem));\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    //Execute.BeginOnThreadPool(() => _eventAggregator.Publish(new ProgressChangedEventArgs(part.ParentItem, progress)));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void DownloadFile(TLInt dcId, TLInputFileLocationBase fileLocation, TLObject owner, TLInt fileSize, Action<DownloadableItem> callback)\r\n        {\r\n            var downloadableItem = GetDownloadableItem(dcId, fileLocation, owner, fileSize, callback);\r\n\r\n            var downloadedCount = downloadableItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n            var count = downloadableItem.Parts.Count;\r\n            var isComplete = downloadedCount == count;\r\n\r\n            if (isComplete)\r\n            {\r\n                var fileName = downloadableItem.InputLocation.GetFileName(\"audio\", \".mp3\");\r\n                var getPartName = new Func<DownloadablePart, string>(x => x.ParentItem.InputLocation.GetPartFileName(x.Number, \"audio\"));\r\n\r\n                FileUtils.MergePartsToFile(getPartName, downloadableItem.Parts, fileName);\r\n\r\n                downloadableItem.IsoFileName = fileName;\r\n                _eventAggregator.Publish(downloadableItem);\r\n            }\r\n            else\r\n            {\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    bool addFile = true;\r\n                    foreach (var item in _items)\r\n                    {\r\n                        if (item.InputLocation.LocationEquals(fileLocation)\r\n                            && item.Owner == owner)\r\n                        {\r\n                            addFile = false;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (addFile)\r\n                    {\r\n                        _items.Add(downloadableItem);\r\n                    }\r\n                }\r\n\r\n                StartAwaitingWorkers();\r\n            }\r\n        }\r\n\r\n        private DownloadableItem GetDownloadableItem(TLInt dcId, TLInputFileLocationBase location, TLObject owner, TLInt fileSize, Action<DownloadableItem> callback)\r\n        {\r\n            var item = new DownloadableItem\r\n            {\r\n                Owner = owner,\r\n                DCId = dcId,\r\n                InputLocation = location,\r\n                Callback = callback,\r\n            };\r\n            item.Parts = GetItemParts(fileSize, item);\r\n\r\n            return item;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/DocumentFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class DocumentFileManager : FileManagerBase, IDocumentFileManager\r\n    {\r\n        public DocumentFileManager(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService) : base(eventAggregator, mtProtoService)\r\n        {\r\n            for (var i = 0; i < Constants.BigFileWorkersNumber; i++)\r\n            {\r\n                var worker = new Worker(OnDownloading, \"documentDownloader\" + i);\r\n                _workers.Add(worker);\r\n            }\r\n        }\r\n\r\n        private void OnDownloading(object state)\r\n        {\r\n            DownloadablePart part = null;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Canceled)\r\n                    {\r\n                        _items.RemoveAt(i--);\r\n                        try\r\n                        {\r\n                            //_eventAggregator.Publish(new UploadingCanceledEventArgs(item));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                foreach (var item in _items)\r\n                {\r\n                    part = item.Parts.FirstOrDefault(x => x.Status == PartStatus.Ready);\r\n                    if (part != null)\r\n                    {\r\n                        part.Status = PartStatus.Processing;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (part == null)\r\n            {\r\n                var currentWorker = (Worker)state;\r\n                currentWorker.Stop();\r\n                return;\r\n            }\r\n\r\n            var partName = part.ParentItem.InputLocation.GetPartFileName(part.Number, \"document\");\r\n            bool canceled;\r\n            ProcessFilePart(part, part.ParentItem.DCId, part.ParentItem.InputLocation, out canceled);\r\n            if (canceled)\r\n            {\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    part.ParentItem.Canceled = true;\r\n                    part.Status = PartStatus.Processed;\r\n                    _items.Remove(part.ParentItem);\r\n                }\r\n\r\n                return;\r\n            }\r\n            //part.File = GetFile(part.ParentItem.DCId, part.ParentItem.InputDocumentLocation, part.Offset, part.Limit);\r\n            //while (part.File == null)\r\n            //{\r\n            //    part.File = GetFile(part.ParentItem.DCId, part.ParentItem.InputDocumentLocation, part.Offset, part.Limit);\r\n            //}\r\n\r\n            // indicate progress\r\n            // indicate complete\r\n            bool isComplete;\r\n            bool isCanceled;\r\n            var progress = 0.0;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                part.Status = PartStatus.Processed;\r\n\r\n                if (!part.ParentItem.SuppressMerge)\r\n                {\r\n                    FileUtils.CheckMissingPart(_itemsSyncRoot, part, partName);\r\n                }\r\n\r\n                isCanceled = part.ParentItem.Canceled;\r\n\r\n                isComplete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                if (!isComplete)\r\n                {\r\n                    var downloadedCount = part.ParentItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n                    var count = part.ParentItem.Parts.Count;\r\n                    progress = downloadedCount / (double)count;\r\n                }\r\n                else\r\n                {\r\n                    //var id = part.ParentItem.InputDocumentLocation.Id;\r\n                    //var accessHash = part.ParentItem.InputDocumentLocation.AccessHash;\r\n                    //var fileExtension = Path.GetExtension(part.ParentItem.FileName.ToString());\r\n                    //var fileName = string.Format(\"document{0}_{1}{2}\", id, accessHash, fileExtension);\r\n\r\n                    //if (fileName.EndsWith(\".mp4\"))\r\n                    //{\r\n                    //    Logs.Log.SyncWrite(\"FileManager.IsComplete \" + fileName + \" hash=\" + part.ParentItem.GetHashCode());\r\n                    //}\r\n\r\n                    _items.Remove(part.ParentItem);\r\n                }\r\n            }\r\n\r\n            if (!isCanceled)\r\n            {\r\n                if (isComplete)\r\n                {\r\n                    //var id = part.ParentItem.InputDocumentLocation.Id;\r\n                    //var accessHash = part.ParentItem.InputDocumentLocation.AccessHash;\r\n                    //var version = part.ParentItem.InputDocumentLocation.Version;\r\n                    var fileExtension = Path.GetExtension(part.ParentItem.FileName.ToString());\r\n                    var fileName = part.ParentItem.InputLocation.GetFileName(\"document\", fileExtension);\r\n                    Func<DownloadablePart, string> getPartName = x => part.ParentItem.InputLocation.GetPartFileName(x.Number, \"document\");\r\n\r\n                    if (!part.ParentItem.SuppressMerge)\r\n                    {\r\n                        FileUtils.MergePartsToFile(getPartName, part.ParentItem.Parts, fileName);\r\n                    }\r\n\r\n                    part.ParentItem.IsoFileName = fileName;\r\n                    if (part.ParentItem.Callback != null)\r\n                    {\r\n                        Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            part.ParentItem.Callback(part.ParentItem);\r\n                            if (part.ParentItem.Callbacks != null)\r\n                            {\r\n                                foreach (var callback in part.ParentItem.Callbacks)\r\n                                {\r\n                                    callback.SafeInvoke(part.ParentItem);\r\n                                }\r\n                            }\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(part.ParentItem));\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    if (part.NotifyProgress)\r\n                    {\r\n                        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(new ProgressChangedEventArgs(part.ParentItem, progress)));\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void DownloadFileAsync(TLString originalFileName, TLInt dcId, TLInputFileLocationBase fileLocation, TLObject owner, TLInt fileSize, Action<double> startCallback, Action<DownloadableItem> callback = null)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var downloadableItem = GetDownloadableItem(originalFileName, dcId, fileLocation, owner, fileSize, callback);\r\n\r\n                var downloadedCount = downloadableItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n                var count = downloadableItem.Parts.Count;\r\n                var isComplete = downloadedCount == count;\r\n\r\n                if (isComplete)\r\n                {\r\n                    var fileExtension = Path.GetExtension(downloadableItem.FileName.ToString());\r\n                    var fileName = downloadableItem.InputLocation.GetFileName(\"document\", fileExtension);\r\n                    Func<DownloadablePart, string> getPartName = x => downloadableItem.InputLocation.GetPartFileName(x.Number, \"document\");\r\n\r\n                    FileUtils.MergePartsToFile(getPartName, downloadableItem.Parts, fileName);\r\n\r\n                    downloadableItem.IsoFileName = fileName;\r\n                    _eventAggregator.Publish(downloadableItem);\r\n                }\r\n                else\r\n                {\r\n                    var progress = downloadedCount/(double) count;\r\n                    startCallback.SafeInvoke(progress);\r\n\r\n                    lock (_itemsSyncRoot)\r\n                    {\r\n                        bool addFile = true;\r\n                        foreach (var item in _items)\r\n                        {\r\n                            if (item.InputLocation.LocationEquals(fileLocation))\r\n                            {\r\n\r\n                                //item.SuppressMerge = true;\r\n\r\n                                if (callback != null)\r\n                                {\r\n                                    if (item.Callbacks == null)\r\n                                    {\r\n                                        item.Callbacks = new List<Action<DownloadableItem>>();\r\n                                    }\r\n                                    item.Callbacks.Add(callback);\r\n                                    addFile = false;\r\n                                    break;\r\n                                }\r\n                                //item.\r\n                                if (item.Owner == owner)\r\n                                {\r\n                                    addFile = false;\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        if (addFile)\r\n                        {\r\n                            _items.Add(downloadableItem);\r\n                        }\r\n                    }\r\n\r\n                    StartAwaitingWorkers();\r\n                }\r\n            });\r\n        }\r\n\r\n        private DownloadableItem GetDownloadableItem(TLString fileName, TLInt dcId, TLInputFileLocationBase location, TLObject owner, TLInt fileSize, Action<DownloadableItem> callback)\r\n        {\r\n            var item = new DownloadableItem\r\n            {\r\n                DCId = dcId,\r\n                FileName = fileName,\r\n                Owner = owner,\r\n                InputLocation = location,\r\n                Callback = callback\r\n            };\r\n            item.Parts = GetItemParts(fileSize, item);\r\n\r\n            return item;\r\n        }\r\n\r\n        protected override List<DownloadablePart> GetItemParts(TLInt size, DownloadableItem item)\r\n        {\r\n            var chunkSize = size.Value > 1024*1024 ? Constants.DownloadedBigChunkSize : Constants.DownloadedChunkSize;\r\n            var parts = new List<DownloadablePart>();\r\n            var partsCount = size.Value / chunkSize + (size.Value % chunkSize > 0 ? 1 : 0);\r\n\r\n            var step = partsCount / 25;\r\n\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var part = new DownloadablePart(item, new TLInt(i * chunkSize), size.Value == 0 ? new TLInt(1024 * 1024) : new TLInt(chunkSize), i);\r\n                var partName = item.InputLocation.GetPartFileName(part.Number, \"document\");\r\n                var partLength = FileUtils.GetLocalFileLength(partName);\r\n\r\n                if (partLength >= 0)\r\n                {\r\n                    var isCompletePart = (part.Number + 1 == partsCount) || partLength == part.Limit.Value;\r\n                    part.Status = isCompletePart ? PartStatus.Processed : PartStatus.Ready;\r\n                }\r\n\r\n                part.NotifyProgress = part.Status == PartStatus.Ready && (step == 0 || i % step == 0);\r\n\r\n                parts.Add(part);\r\n            }\r\n\r\n            return parts;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/DownloadableItem.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class DownloadableItem\r\n    {\r\n        public TLInt DCId { get; set; }\r\n\r\n        public TLString FileName { get; set; }\r\n\r\n        public TLObject Owner { get; set; }\r\n\r\n        public System.Action<DownloadableItem> Callback { get; set; }\r\n\r\n        public IList<System.Action<DownloadableItem>> Callbacks { get; set; }\r\n\r\n        public TLInputFileLocationBase InputLocation { get; set; }\r\n\r\n        public List<DownloadablePart> Parts { get; set; }\r\n\r\n        public string IsoFileName { get; set; }\r\n\r\n        public bool Canceled { get; set; }\r\n\r\n        public bool SuppressMerge { get; set; }\r\n\r\n        public TLFileCdnRedirect CdnRedirect { get; set; }\r\n\r\n        #region Http\r\n\r\n        public string SourceUri { get; set; }\r\n\r\n        public string DestFileName { get; set; }\r\n\r\n        public System.Action<DownloadableItem> FaultCallback { get; set; }\r\n\r\n        public IList<System.Action<DownloadableItem>> FaultCallbacks { get; set; }\r\n\r\n        public double Timeout { get; set; }\r\n\r\n        public void IncreaseTimeout()\r\n        {\r\n            Timeout = Timeout * 2.0;\r\n            if (Timeout == 0.0)\r\n            {\r\n                Timeout = 4.0;\r\n            }\r\n            if (Timeout >= 32.0)\r\n            {\r\n                Timeout = 4.0;\r\n            }\r\n        }\r\n        #endregion\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/FileManager/DownloadablePart.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public enum PartStatus\r\n    {\r\n        Ready,\r\n        Processing,\r\n        Processed,\r\n    }\r\n\r\n    public class DownloadablePart\r\n    {\r\n        public int Number { get; protected set; }\r\n\r\n        public DownloadableItem ParentItem { get; protected set; }\r\n\r\n        public TLInt Offset { get; protected set; }\r\n\r\n        public TLInt Limit { get; protected set; }\r\n\r\n        public PartStatus Status { get; set; }\r\n\r\n        public TLFile File { get; set; }\r\n\r\n        public int HttpErrorsCount { get; set; }\r\n\r\n        public bool NotifyProgress { get; set; }\r\n\r\n        public DownloadablePart(DownloadableItem item, TLInt offset, TLInt limit, int number)\r\n        {\r\n            ParentItem = item;\r\n            Offset = offset;\r\n            Limit = limit;\r\n            Number = number;\r\n            NotifyProgress = true;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} {1} {2}\", Number, Offset, Limit);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/FileManager/DownloadingCanceledEventArgs.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class DownloadingCanceledEventArgs\r\n    {\r\n        public DownloadableItem Item { get; protected set; }\r\n\r\n        public DownloadingCanceledEventArgs(DownloadableItem item)\r\n        {\r\n            Item = item;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/FileManager/EncryptedFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class EncryptedFileManager : FileManagerBase, IEncryptedFileManager\r\n    {\r\n        public EncryptedFileManager(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService) : base(eventAggregator, mtProtoService)\r\n        {\r\n            for (var i = 0; i < Constants.BigFileWorkersNumber; i++)\r\n            {\r\n                var worker = new Worker(OnDownloading, \"encryptedDownloader\"+i);\r\n                _workers.Add(worker);\r\n            }\r\n        }\r\n\r\n        private void OnDownloading(object state)\r\n        {\r\n            DownloadablePart part = null;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Canceled)\r\n                    {\r\n                        _items.RemoveAt(i--);\r\n                        try\r\n                        {\r\n                            //_eventAggregator.Publish(new UploadingCanceledEventArgs(item));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                foreach (var item in _items)\r\n                {\r\n                    part = item.Parts.FirstOrDefault(x => x.Status == PartStatus.Ready);\r\n                    if (part != null)\r\n                    {\r\n                        part.Status = PartStatus.Processing;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (part == null)\r\n            {\r\n                var currentWorker = (Worker)state;\r\n                currentWorker.Stop();\r\n                return;\r\n            }\r\n\r\n            var partName = part.ParentItem.InputLocation.GetPartFileName(part.Number, \"encrypted\");\r\n            bool canceled;\r\n            ProcessFilePart(part, part.ParentItem.DCId, part.ParentItem.InputLocation, out canceled);\r\n            if (canceled)\r\n            {\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    part.ParentItem.Canceled = true;\r\n                    part.Status = PartStatus.Processed;\r\n                    _items.Remove(part.ParentItem);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            // indicate progress\r\n            // indicate complete\r\n            bool isComplete;\r\n            bool isCanceled;\r\n            var progress = 0.0;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                part.Status = PartStatus.Processed;\r\n\r\n                FileUtils.CheckMissingPart(_itemsSyncRoot, part, partName);\r\n\r\n                isCanceled = part.ParentItem.Canceled;\r\n\r\n                isComplete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                if (!isComplete)\r\n                {\r\n                    var downloadedCount = part.ParentItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n                    var count = part.ParentItem.Parts.Count;\r\n                    progress = downloadedCount / (double)count;\r\n                }\r\n                else\r\n                {\r\n                    _items.Remove(part.ParentItem);    \r\n                }\r\n            }\r\n\r\n            if (!isCanceled)\r\n            {\r\n                if (isComplete)\r\n                {\r\n                    var fileName = part.ParentItem.InputLocation.GetFileName(\"encrypted\");\r\n                    var getPartFileName = new Func<DownloadablePart, string>(p => p.ParentItem.InputLocation.GetPartFileName(p.Number, \"encrypted\"));\r\n\r\n                    FileUtils.MergePartsToFile(getPartFileName, part.ParentItem.Parts, fileName);\r\n\r\n                    part.ParentItem.IsoFileName = fileName;\r\n                    if (part.ParentItem.Callback != null)\r\n                    {\r\n                        part.ParentItem.Callback(part.ParentItem);\r\n                    }\r\n                    else\r\n                    {\r\n                        _eventAggregator.Publish(part.ParentItem);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    _eventAggregator.Publish(new ProgressChangedEventArgs(part.ParentItem, progress));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void DownloadFile(TLEncryptedFile file, TLObject owner, Action<DownloadableItem> callback)\r\n        {\r\n            var inputFile = new TLInputEncryptedFileLocation { Id = file.Id, AccessHash = file.AccessHash };\r\n            var downloadableItem = GetDownloadableItem(file.DCId, inputFile, owner, file.Size, callback);\r\n\r\n            var downloadedCount = downloadableItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n            var count = downloadableItem.Parts.Count;\r\n            var isComplete = downloadedCount == count;\r\n\r\n            if (isComplete)\r\n            {\r\n                var fileName = downloadableItem.InputLocation.GetFileName(\"encrypted\");\r\n                Func<DownloadablePart, string> getPartName = x => downloadableItem.InputLocation.GetPartFileName(x.Number, \"encrypted\");\r\n\r\n                FileUtils.MergePartsToFile(getPartName, downloadableItem.Parts, fileName);\r\n\r\n                downloadableItem.IsoFileName = fileName;\r\n                if (downloadableItem.Callback != null)\r\n                {\r\n                    downloadableItem.Callback(downloadableItem);\r\n                }\r\n                else\r\n                {\r\n                    _eventAggregator.Publish(downloadableItem);\r\n                }\r\n            }\r\n            else\r\n            { \r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    bool addFile = true;\r\n                    foreach (var item in _items)\r\n                    {\r\n                        if (item.InputLocation.LocationEquals(inputFile))\r\n                        {\r\n                            addFile = false;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (addFile)\r\n                    {\r\n                        _items.Add(downloadableItem);\r\n                    }\r\n                }\r\n\r\n                StartAwaitingWorkers();\r\n            }\r\n        }\r\n\r\n        private DownloadableItem GetDownloadableItem(TLInt dcId, TLInputFileLocationBase location, TLObject owner, TLInt fileSize, Action<DownloadableItem> callback)\r\n        {\r\n            var item = new DownloadableItem\r\n            {\r\n                Owner = owner,\r\n                DCId = dcId,\r\n                InputLocation = location,\r\n                Callback = callback\r\n            };\r\n            item.Parts = GetItemParts(fileSize, item);\r\n\r\n            return item;\r\n        }\r\n\r\n        protected override List<DownloadablePart> GetItemParts(TLInt size, DownloadableItem item)\r\n        {\r\n            var chunkSize = size.Value > 1024 * 1024 ? Constants.DownloadedBigChunkSize : Constants.DownloadedChunkSize;\r\n            var parts = new List<DownloadablePart>();\r\n            var partsCount = size.Value / chunkSize + (size.Value % chunkSize > 0 ? 1 : 0);\r\n\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var part = new DownloadablePart(item, new TLInt(i * chunkSize), size.Value == 0 ? new TLInt(1024 * 1024) : new TLInt(chunkSize), i);\r\n                var partName = item.InputLocation.GetPartFileName(part.Number, \"encrypted\");\r\n                var partLength = FileUtils.GetLocalFileLength(partName);\r\n\r\n                if (partLength >= 0)\r\n                {\r\n                    var isCompletePart = (part.Number + 1 == partsCount) || partLength == part.Limit.Value;\r\n                    part.Status = isCompletePart ? PartStatus.Processed : PartStatus.Ready;\r\n                }\r\n\r\n                parts.Add(part);\r\n            }\r\n\r\n            return parts;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/FileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class FileManager : FileManagerBase, IFileManager\r\n    {\r\n        public FileManager(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService) : base(eventAggregator, mtProtoService)\r\n        {\r\n            for (var i = 0; i < Constants.WorkersNumber; i++)\r\n            {\r\n                var worker = new Worker(OnDownloading, \"downloader\"+i);\r\n                _workers.Add(worker);\r\n            }\r\n        }\r\n\r\n        private void OnDownloading(object state)\r\n        {\r\n            DownloadablePart part = null;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Canceled)\r\n                    {\r\n\r\n                        _items.RemoveAt(i--);\r\n\r\n                        try\r\n                        {\r\n                            _eventAggregator.Publish(new DownloadingCanceledEventArgs(item));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                foreach (var item in _items)\r\n                {\r\n                    part = item.Parts.FirstOrDefault(x => x.Status == PartStatus.Ready);\r\n                    if (part != null)\r\n                    {\r\n                        part.Status = PartStatus.Processing;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (part == null)\r\n            {\r\n                var currentWorker = (Worker)state;\r\n                currentWorker.Stop();\r\n                return;\r\n            }\r\n\r\n            bool canceled;\r\n            ProcessFilePart(part, part.ParentItem.DCId, part.ParentItem.InputLocation, out canceled);\r\n            if (canceled)\r\n            {\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    part.ParentItem.Canceled = true;\r\n                    part.Status = PartStatus.Processed;\r\n                    _items.Remove(part.ParentItem);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            // indicate progress\r\n            // indicate complete\r\n            bool isComplete;\r\n            bool isCanceled;\r\n            var progress = 0.0;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                part.Status = PartStatus.Processed;\r\n\r\n                var data = part.File.Bytes.Data;\r\n                if (data.Length < part.Limit.Value && (part.Number + 1) != part.ParentItem.Parts.Count)\r\n                {\r\n                    var complete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                    if (!complete)\r\n                    {\r\n                        var emptyBufferSize = part.Limit.Value - data.Length;\r\n                        var position = data.Length;\r\n\r\n                        var missingPart = new DownloadablePart(part.ParentItem, new TLInt(position), new TLInt(emptyBufferSize), -part.Number);\r\n\r\n                        var currentItemIndex = part.ParentItem.Parts.IndexOf(part);\r\n                        part.ParentItem.Parts.Insert(currentItemIndex + 1, missingPart);\r\n                    }\r\n                }\r\n\r\n                isCanceled = part.ParentItem.Canceled;\r\n\r\n                isComplete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                if (!isComplete)\r\n                {\r\n                    var downloadedCount = part.ParentItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n                    var count = part.ParentItem.Parts.Count;\r\n                    progress = (double)downloadedCount / count;\r\n                }\r\n                else\r\n                {\r\n                    _items.Remove(part.ParentItem);\r\n                }\r\n            }\r\n\r\n            if (!isCanceled)\r\n            {\r\n                if (isComplete)\r\n                {\r\n                    byte[] bytes = { };\r\n                    foreach (var p in part.ParentItem.Parts)\r\n                    {\r\n                        bytes = TLUtils.Combine(bytes, p.File.Bytes.Data);\r\n                    }\r\n                    //part.ParentItem.Location.Buffer = bytes;\r\n\r\n                    var fileName = part.ParentItem.InputLocation.GetFileName(\"\", \".jpg\");\r\n\r\n                    StringLocker.Lock(fileName, () => FileUtils.WriteBytes(fileName, bytes));\r\n\r\n                    if (part.ParentItem.Callback != null)\r\n                    {\r\n                        Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            part.ParentItem.Callback.SafeInvoke(part.ParentItem);\r\n                            if (part.ParentItem.Callbacks != null)\r\n                            {\r\n                                foreach (var callback in part.ParentItem.Callbacks)\r\n                                {\r\n                                    callback.SafeInvoke(part.ParentItem);\r\n                                }\r\n                            }\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(part.ParentItem));\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    //Execute.BeginOnThreadPool(() => _eventAggregator.Publish(new ProgressChangedEventArgs(part.ParentItem, progress)));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void DownloadFile(TLFileLocation file, TLObject owner, TLInt fileSize)\r\n        {\r\n            var downloadableItem = GetDownloadableItem(file, owner, fileSize, null);\r\n\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                bool addFile = true;\r\n                var inputFileLocation = file.ToInputFileLocation();\r\n                foreach (var item in _items)\r\n                {\r\n                    if (item.InputLocation.LocationEquals(inputFileLocation)\r\n                        && item.Owner == owner)\r\n                    {\r\n                        addFile = false;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (addFile)\r\n                {\r\n                    _items.Add(downloadableItem);\r\n                }\r\n            }\r\n\r\n            StartAwaitingWorkers();\r\n        }\r\n\r\n        public void DownloadFile(TLFileLocation file, TLObject owner, TLInt fileSize, Action<DownloadableItem> callback)\r\n        {\r\n            var downloadableItem = GetDownloadableItem(file, owner, fileSize, callback);\r\n\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                bool addFile = true;\r\n                var inputFileLocation = file.ToInputFileLocation();\r\n                foreach (var item in _items)\r\n                {\r\n                    if (item.InputLocation.LocationEquals(inputFileLocation))\r\n                    {\r\n                        if (callback != null)\r\n                        {\r\n                            if (item.Callbacks == null)\r\n                            {\r\n                                item.Callbacks = new List<Action<DownloadableItem>>();\r\n                            }\r\n                            item.Callbacks.Add(callback);\r\n\r\n                            addFile = false;\r\n                            break;\r\n                        }\r\n\r\n                        if (item.Owner == owner)\r\n                        {\r\n                            addFile = false;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (addFile)\r\n                {\r\n                    _items.Add(downloadableItem);\r\n                }\r\n            }\r\n\r\n            StartAwaitingWorkers();\r\n        }\r\n\r\n        protected DownloadableItem GetDownloadableItem(TLFileLocation location, TLObject owner, TLInt fileSize, Action<DownloadableItem> callback)\r\n        {\r\n            var item = new DownloadableItem\r\n            {\r\n                Owner = owner,\r\n                DCId = location.DCId,\r\n                Callback = callback,\r\n                InputLocation = location.ToInputFileLocation()\r\n            };\r\n            item.Parts = GetItemParts(fileSize, item);\r\n\r\n            return item;\r\n        }\r\n    }\r\n\r\n    public class StringLocker\r\n    {\r\n        private static readonly object _syncRoot = new Object();\r\n\r\n        private static readonly Dictionary<string, object> _syncRoots = new Dictionary<string, object>();\r\n\r\n        public static void Lock(string key, Action action)\r\n        {\r\n            object keySyncRoot;\r\n            lock (_syncRoot)\r\n            {\r\n\r\n                if (!_syncRoots.TryGetValue(key, out keySyncRoot))\r\n                {\r\n                    keySyncRoot = new object();\r\n                    _syncRoots[key] = keySyncRoot;\r\n                }\r\n            }\r\n\r\n            lock (keySyncRoot)\r\n            {\r\n                action();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/FileManagerBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public abstract class FileManagerBase\r\n    {\r\n        private readonly object _randomRoot = new object();\r\n\r\n        private readonly Random _random = new Random();\r\n\r\n        protected readonly object _itemsSyncRoot = new object();\r\n\r\n        protected readonly List<Worker> _workers = new List<Worker>(Constants.WorkersNumber);\r\n\r\n        protected readonly List<DownloadableItem> _items = new List<DownloadableItem>();\r\n\r\n        protected readonly IMTProtoService _mtProtoService;\r\n\r\n        protected readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        protected FileManagerBase(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService)\r\n        {\r\n            _mtProtoService = mtProtoService;\r\n            _eventAggregator = eventAggregator;\r\n        }\r\n\r\n        protected void ProcessFilePart(DownloadablePart part, TLInt dcId, TLInputFileLocationBase location, out bool canceled)\r\n        {\r\n            do\r\n            {\r\n                TLRPCError error;\r\n\r\n                TLFileBase result;\r\n                if (part.ParentItem.CdnRedirect != null)\r\n                {\r\n                    TLCdnFileReuploadNeeded cdnFileReuploadNeeded;\r\n                    bool tokenInvalid;\r\n                    result = GetCdnFile(part.ParentItem.CdnRedirect, part.Offset, part.Limit, out cdnFileReuploadNeeded, out error, out canceled, out tokenInvalid);\r\n                    if (cdnFileReuploadNeeded != null)\r\n                    {\r\n                        ReuploadFile(part.ParentItem.CdnRedirect, dcId, cdnFileReuploadNeeded.RequestToken, out error, out canceled, out tokenInvalid);\r\n                    }\r\n\r\n                    if (tokenInvalid)\r\n                    {\r\n                        lock (_itemsSyncRoot)\r\n                        {\r\n                            part.ParentItem.CdnRedirect = null;\r\n                        }\r\n                        continue;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    result = GetFile(dcId, location, part.Offset, part.Limit, out error, out canceled);\r\n                    var fileCdnRedirect = result as TLFileCdnRedirect;\r\n                    if (fileCdnRedirect != null)\r\n                    {\r\n                        lock (_itemsSyncRoot)\r\n                        {\r\n                            part.ParentItem.CdnRedirect = fileCdnRedirect;\r\n                        }\r\n                        continue;\r\n                    }\r\n                }\r\n\r\n                part.File = result as TLFile;\r\n\r\n                if (canceled)\r\n                {\r\n                    return;\r\n                }\r\n            } while (part.File == null);\r\n        }\r\n\r\n        protected TLFileBase GetFile(TLInt dcId, TLInputFileLocationBase location, TLInt offset, TLInt limit, out TLRPCError er, out bool isCanceled)\r\n        {\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            TLFileBase result = null;\r\n            TLRPCError outError = null;\r\n            var outIsCanceled = false;\r\n            _mtProtoService.GetFileAsync(dcId, location, offset, limit,\r\n                file =>\r\n                {\r\n                    result = file;\r\n                    manualResetEvent.Set();\r\n                },\r\n                error =>\r\n                {\r\n                    outError = error;\r\n\r\n                    if (error.CodeEquals(ErrorCode.INTERNAL)\r\n                        || (error.CodeEquals(ErrorCode.BAD_REQUEST) && (error.TypeEquals(ErrorType.LOCATION_INVALID) || error.TypeEquals(ErrorType.VOLUME_LOC_NOT_FOUND)))\r\n                        || (error.CodeEquals(ErrorCode.NOT_FOUND) && error.Message != null && error.Message.ToString().StartsWith(\"Incorrect dhGen\")))\r\n                    {\r\n                        outIsCanceled = true;\r\n\r\n                        manualResetEvent.Set();\r\n                        return;\r\n                    }\r\n\r\n                    int delay;\r\n                    lock (_randomRoot)\r\n                    {\r\n                        delay = _random.Next(1000, 3000);\r\n                    }\r\n\r\n                    Execute.BeginOnThreadPool(TimeSpan.FromMilliseconds(delay), () => manualResetEvent.Set());\r\n                });\r\n\r\n            manualResetEvent.WaitOne();\r\n            er = outError;\r\n            isCanceled = outIsCanceled;\r\n\r\n            return result;\r\n        }\r\n\r\n        protected TLVector<TLFileHash> ReuploadFile(TLFileCdnRedirect redirect, TLInt dcId, TLString requestToken, out TLRPCError er, out bool isCanceled, out bool isTokenInvalid)\r\n        {\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            TLVector<TLFileHash> result = null;\r\n            TLRPCError outError = null;\r\n            var outIsCanceled = false;\r\n            var outIsTokenInvalid = false;\r\n\r\n            _mtProtoService.ReuploadCdnFileAsync(dcId, redirect.FileToken, requestToken,\r\n                callback =>\r\n                {\r\n                    result = callback;\r\n\r\n                    manualResetEvent.Set();\r\n                },\r\n                error =>\r\n                {\r\n                    outError = error;\r\n\r\n                    if (error.CodeEquals(ErrorCode.INTERNAL)\r\n                        || (error.CodeEquals(ErrorCode.BAD_REQUEST) && (error.TypeEquals(ErrorType.LOCATION_INVALID) || error.TypeEquals(ErrorType.VOLUME_LOC_NOT_FOUND)))\r\n                        || (error.CodeEquals(ErrorCode.NOT_FOUND) && error.Message != null && error.Message.ToString().StartsWith(\"Incorrect dhGen\")))\r\n                    {\r\n                        outIsCanceled = true;\r\n\r\n                        manualResetEvent.Set();\r\n                        return;\r\n                    }\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST) && (error.TypeEquals(ErrorType.FILE_TOKEN_INVALID) || error.TypeEquals(ErrorType.REQUEST_TOKEN_INVALID)))\r\n                    {\r\n                        outIsTokenInvalid = true;\r\n\r\n                        manualResetEvent.Set();\r\n                        return;\r\n                    }\r\n\r\n                    int delay;\r\n                    lock (_randomRoot)\r\n                    {\r\n                        delay = _random.Next(1000, 3000);\r\n                    }\r\n\r\n                    Execute.BeginOnThreadPool(TimeSpan.FromMilliseconds(delay), () => manualResetEvent.Set());\r\n                });\r\n\r\n            manualResetEvent.WaitOne();\r\n            er = outError;\r\n            isCanceled = outIsCanceled;\r\n            isTokenInvalid = outIsTokenInvalid;\r\n\r\n            return result;\r\n        }\r\n\r\n        protected byte[] GetIV(byte[] ivec, TLInt offset)\r\n        {\r\n            var iv = new byte[ivec.Length];\r\n            Buffer.BlockCopy(ivec, 0, iv, 0, ivec.Length);\r\n\r\n            Array.Reverse(iv);\r\n            var bi = new System.Numerics.BigInteger(TLUtils.Combine(iv, new byte[] { 0x00 }));\r\n            bi = (bi + offset.Value/16);\r\n            var biArray = bi.ToByteArray();\r\n            var b = new byte[16];\r\n            Buffer.BlockCopy(biArray, 0, b, 0, Math.Min(b.Length, biArray.Length));\r\n\r\n            Array.Reverse(b);\r\n\r\n            return b;\r\n        }\r\n\r\n        protected TLFileBase GetCdnFile(TLFileCdnRedirect redirect, TLInt offset, TLInt limit, out TLCdnFileReuploadNeeded reuploadNeeded, out TLRPCError er, out bool isCanceled, out bool isTokenInvalid)\r\n        {\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            TLFileBase result = null;\r\n            TLCdnFileReuploadNeeded outReuploadNeeded = null;\r\n            TLRPCError outError = null;\r\n            var outIsCanceled = false;\r\n            var outIsTokenInvalid = false;\r\n\r\n            _mtProtoService.GetCdnFileAsync(redirect.DCId, redirect.FileToken, offset, limit,\r\n                cdnFileBase =>\r\n                {\r\n                    var cdnFile = cdnFileBase as TLCdnFile;\r\n                    if (cdnFile != null)\r\n                    {\r\n                        var iv = GetIV(redirect.EncryptionIV.Data, offset);\r\n                        var counter = offset.Value / 16;\r\n                        iv[15] = (byte)(counter & 0xFF);\r\n                        iv[14] = (byte)((counter >> 8) & 0xFF);\r\n                        iv[13] = (byte)((counter >> 16) & 0xFF);\r\n                        iv[12] = (byte)((counter >> 24) & 0xFF);\r\n\r\n                        var key = redirect.EncryptionKey.Data;\r\n\r\n                        var ecount_buf = new byte[0];\r\n                        var num = 0u;\r\n                        var bytes = Utils.AES_ctr128_encrypt(cdnFile.Bytes.Data, key, ref iv, ref ecount_buf, ref num);\r\n\r\n                        result = new TLFile { Bytes = TLString.FromBigEndianData(bytes) };\r\n                    }\r\n\r\n                    var cdnFileReuploadNeeded = cdnFileBase as TLCdnFileReuploadNeeded;\r\n                    if (cdnFileReuploadNeeded != null)\r\n                    {\r\n                        outReuploadNeeded = cdnFileReuploadNeeded;\r\n                    }\r\n\r\n                    manualResetEvent.Set();\r\n                },\r\n                error =>\r\n                {\r\n                    outError = error;\r\n\r\n                    if (error.CodeEquals(ErrorCode.INTERNAL)\r\n                        || (error.CodeEquals(ErrorCode.BAD_REQUEST) && (error.TypeEquals(ErrorType.LOCATION_INVALID) || error.TypeEquals(ErrorType.VOLUME_LOC_NOT_FOUND)))\r\n                        || (error.CodeEquals(ErrorCode.NOT_FOUND) && error.Message != null && error.Message.ToString().StartsWith(\"Incorrect dhGen\")))\r\n                    {\r\n                        outIsCanceled = true;\r\n\r\n                        manualResetEvent.Set();\r\n                        return;\r\n                    }\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST) && error.TypeEquals(ErrorType.FILE_TOKEN_INVALID))\r\n                    {\r\n                        outIsTokenInvalid = true;\r\n\r\n                        manualResetEvent.Set();\r\n                        return;\r\n                    }\r\n\r\n                    int delay;\r\n                    lock (_randomRoot)\r\n                    {\r\n                        delay = _random.Next(1000, 3000);\r\n                    }\r\n\r\n                    Execute.BeginOnThreadPool(TimeSpan.FromMilliseconds(delay), () => manualResetEvent.Set());\r\n                });\r\n\r\n            manualResetEvent.WaitOne();\r\n            reuploadNeeded = outReuploadNeeded;\r\n            er = outError;\r\n            isCanceled = outIsCanceled;\r\n            isTokenInvalid = outIsTokenInvalid;\r\n\r\n            return result;\r\n        }\r\n\r\n        protected virtual List<DownloadablePart> GetItemParts(TLInt size, DownloadableItem item)\r\n        {\r\n            var chunkSize = size.Value > 1024 * 1024? Constants.DownloadedBigChunkSize : Constants.DownloadedChunkSize;\r\n            var parts = new List<DownloadablePart>();\r\n            var partsCount = size.Value / chunkSize + ((size.Value % chunkSize > 0 || size.Value == 0) ? 1 : 0);\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var part = new DownloadablePart(item, new TLInt(i * chunkSize), size.Value == 0 ? new TLInt(1024 * 1024) : new TLInt(chunkSize), i);\r\n                parts.Add(part);\r\n            }\r\n\r\n            return parts;\r\n        }\r\n\r\n        public void CancelDownloadFile(TLObject owner)\r\n        {\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                var items = _items.Where(x => x.Owner == owner);\r\n\r\n                foreach (var item in items)\r\n                {\r\n                    item.Canceled = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void CancelDownloadFileAsync(TLObject owner)\r\n        {\r\n            Execute.BeginOnThreadPool(() => CancelDownloadFile(owner));\r\n        }\r\n\r\n        protected void StartAwaitingWorkers()\r\n        {\r\n            var awaitingWorkers = _workers.Where(x => x.IsWaiting);\r\n\r\n            foreach (var awaitingWorker in awaitingWorkers)\r\n            {\r\n                awaitingWorker.Start();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/IAudioFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public interface IAudioFileManager\r\n    {\r\n        void DownloadFile(TLInt dcId, TLInputFileLocationBase file, TLObject owner, TLInt fileSize, System.Action<DownloadableItem> callback = null);\r\n        void CancelDownloadFile(TLObject owner);\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/FileManager/IDocumentFileManager.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public interface IDocumentFileManager\r\n    {\r\n        void DownloadFileAsync(TLString fileName, TLInt dcId, TLInputFileLocationBase file, TLObject owner, TLInt fileSize, Action<double> startCallback, Action<DownloadableItem> callback = null);\r\n        void CancelDownloadFileAsync(TLObject owner);\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/FileManager/IEncryptedFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public interface IEncryptedFileManager\r\n    {\r\n        void DownloadFile(TLEncryptedFile file, TLObject owner, Action<DownloadableItem> callback = null);\r\n        void CancelDownloadFile(TLObject owner);\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/IFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public interface IFileManager\r\n    {\r\n        void DownloadFile(TLFileLocation file, TLObject owner, TLInt fileSize);\r\n        void DownloadFile(TLFileLocation file, TLObject owner, TLInt fileSize, System.Action<DownloadableItem> callback);\r\n        void CancelDownloadFile(TLObject owner);\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/IUploadAudioFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public interface IUploadAudioFileManager\r\n    {\r\n        void UploadFile(TLLong fileId, TLObject owner, string fileName);\r\n        void UploadFile(TLLong fileId, TLObject owner, string fileName, IList<UploadablePart> parts);\r\n        void CancelUploadFile(TLLong fileId);\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/FileManager/IUploadFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public interface IUploadFileManager\r\n    {\r\n        void UploadFile(TLLong fileId, TLObject owner, byte[] bytes);\r\n#if WP8\r\n        void UploadFile(TLLong fileId, TLObject owner, StorageFile file);\r\n#endif\r\n        void CancelUploadFile(TLLong fileId);\r\n    }\r\n\r\n    public interface IUploadDocumentFileManager\r\n    {\r\n        void UploadFile(TLLong fileId, TLObject owner, byte[] bytes);\r\n#if WP8\r\n        void UploadFile(TLLong fileId, TLObject owner, StorageFile file);\r\n        void UploadFile(TLLong fileId, TLObject owner, StorageFile file, TLString key, TLString iv);\r\n#endif\r\n        void CancelUploadFile(TLLong fileId);\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/IUploadVideoFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public interface IUploadVideoFileManager\r\n    {\r\n        void UploadFile(TLLong fileId, TLObject owner, string fileName);\r\n        void UploadFile(TLLong fileId, TLObject owner, string fileName, IList<UploadablePart> parts);\r\n\r\n#if WP8\r\n        void UploadFile(TLLong fileId, bool isGif, TLObject owner, StorageFile file);\r\n#endif\r\n\r\n        void CancelUploadFile(TLLong fileId);\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/FileManager/IVideoFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public interface IVideoFileManager\r\n    {\r\n        void DownloadFileAsync(TLInt dcId, TLInputFileLocationBase file, TLObject owner, TLInt fileSize, Action<double> callback);\r\n        void CancelDownloadFileAsync(TLObject owner);\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/ProgressChangedEventArgs.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class ProgressChangedEventArgs\r\n    {\r\n        public double Progress { get; protected set; }\r\n\r\n        public DownloadableItem Item { get; protected set; }\r\n\r\n        public ProgressChangedEventArgs(DownloadableItem item, double progress)\r\n        {\r\n            Item = item;\r\n            Progress = progress;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/FileManager/UploadAudioFileManager.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class UploadAudioFileManager : IUploadAudioFileManager\r\n    {\r\n        private readonly object _itemsSyncRoot = new object();\r\n\r\n        private readonly List<UploadableItem> _items = new List<UploadableItem>();\r\n\r\n        private readonly List<Worker> _workers = new List<Worker>(Constants.WorkersNumber);\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        public UploadAudioFileManager(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService)\r\n        {\r\n            _eventAggregator = eventAggregator;\r\n            _mtProtoService = mtProtoService;\r\n\r\n\r\n            var timer = Stopwatch.StartNew();\r\n            for (int i = 0; i < Constants.VideoUploadersCount; i++)\r\n            {\r\n                var worker = new Worker(OnUploading, \"audioUploader\" + i);\r\n                _workers.Add(worker);\r\n            }\r\n\r\n            TLUtils.WritePerformance(\"Start workers timer: \" + timer.Elapsed);\r\n\r\n        }\r\n\r\n        private void OnUploading(object state)\r\n        {\r\n            UploadablePart part = null;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Canceled)\r\n                    {\r\n                        _items.RemoveAt(i--);\r\n                        try\r\n                        {\r\n                            _eventAggregator.Publish(new UploadingCanceledEventArgs(item));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                foreach (var item in _items)\r\n                {\r\n                    part = item.Parts.FirstOrDefault(x => x.Status == PartStatus.Ready);\r\n                    if (part != null)\r\n                    {\r\n                        part.Status = PartStatus.Processing;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (part != null)\r\n            {\r\n                var bytes = FileUtils.ReadBytes(part.ParentItem.IsoFileName, part.Position, part.Count);\r\n                part.SetBuffer(bytes);\r\n\r\n                bool result = PutFile(part.ParentItem.FileId, part.FilePart, part.Bytes);\r\n                while (!result)\r\n                {\r\n                    if (part.ParentItem.Canceled)\r\n                    {\r\n                        return;\r\n                    }\r\n                    result = PutFile(part.ParentItem.FileId, part.FilePart, part.Bytes);\r\n                }\r\n\r\n                part.ClearBuffer();\r\n\r\n\r\n                // indicate progress\r\n                // indicate complete\r\n                bool isComplete = false;\r\n                bool isCanceled;\r\n                var progress = 0.0;\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    part.Status = PartStatus.Processed;\r\n                    isCanceled = part.ParentItem.Canceled;\r\n                    if (!isCanceled)\r\n                    {\r\n                        isComplete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                        if (!isComplete)\r\n                        {\r\n                            double uploadedCount = part.ParentItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n                            double totalCount = part.ParentItem.Parts.Count;\r\n                            progress = uploadedCount / totalCount;\r\n                        }\r\n                        else\r\n                        {\r\n                            _items.Remove(part.ParentItem);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (!isCanceled)\r\n                {\r\n                    if (isComplete)\r\n                    {\r\n                        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(part.ParentItem));\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(new UploadProgressChangedEventArgs(part.ParentItem, progress)));\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                var currentWorker = (Worker)state;\r\n                currentWorker.Stop();\r\n            }\r\n        }\r\n\r\n        private bool PutFile(TLLong fileId, TLInt filePart, byte[] bytes)\r\n        {\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            var result = false;\r\n\r\n            _mtProtoService.SaveFilePartAsync(fileId, filePart, TLString.FromBigEndianData(bytes),\r\n                savingResult =>\r\n                {\r\n                    result = true;\r\n                    manualResetEvent.Set();\r\n                },\r\n                error =>\r\n                {\r\n\r\n                    Execute.BeginOnThreadPool(TimeSpan.FromMilliseconds(1000), () => manualResetEvent.Set());\r\n                });\r\n\r\n            manualResetEvent.WaitOne();\r\n            return result;\r\n        }\r\n\r\n        public void UploadFile(TLLong fileId, TLObject owner, string fileName)\r\n        {\r\n            long fileLength = FileUtils.GetLocalFileLength(fileName);\r\n            if (fileLength <= 0) return;\r\n\r\n            var item = GetUploadableItem(fileId, owner, fileName, fileLength);\r\n\r\n            var uploadedCount = item.Parts.Count(x => x.Status == PartStatus.Processed);\r\n            var count = item.Parts.Count;\r\n            var isComplete = uploadedCount == count;\r\n\r\n            if (isComplete)\r\n            {\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(item));\r\n            }\r\n            else\r\n            {\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    _items.Add(item);\r\n                }\r\n\r\n                StartAwaitingWorkers();\r\n            }\r\n        }\r\n\r\n        public void UploadFile(TLLong fileId, TLObject owner, string fileName, IList<UploadablePart> parts)\r\n        {\r\n            long fileLength = FileUtils.GetLocalFileLength(fileName);\r\n            if (fileLength <= 0) return;\r\n\r\n            var item = GetUploadableItem(fileId, owner, fileName, fileLength, parts);\r\n\r\n            var uploadedCount = item.Parts.Count(x => x.Status == PartStatus.Processed);\r\n            var count = item.Parts.Count;\r\n            var isComplete = uploadedCount == count;\r\n\r\n            //if (isComplete)\r\n            //{\r\n            //    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(item));\r\n            //}\r\n            //else\r\n            {\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    _items.Add(item);\r\n                }\r\n\r\n                StartAwaitingWorkers();\r\n            }\r\n        }\r\n\r\n        private UploadableItem GetUploadableItem(TLLong fileId, TLObject owner, string isoFileName, long isoFileLength, IList<UploadablePart> parts)\r\n        {\r\n            var item = new UploadableItem(fileId, owner, isoFileName, isoFileLength);\r\n            item.Parts = GetItemParts(item, isoFileLength, parts);\r\n            return item;\r\n        }\r\n\r\n        private UploadableItem GetUploadableItem(TLLong fileId, TLObject owner, string isoFileName, long isoFileLength)\r\n        {\r\n            var item = new UploadableItem(fileId, owner, isoFileName, isoFileLength);\r\n            item.Parts = GetItemParts(item, isoFileLength);\r\n            return item;\r\n        }\r\n\r\n        private List<UploadablePart> GetItemParts(UploadableItem item, long isoFileLength)\r\n        {\r\n            const int partSize = 32 * 1024; // 32 Kb:  1 Kb    1024 Kb\r\n            var parts = new List<UploadablePart>();\r\n            var partsCount = item.IsoFileLength / partSize + (item.IsoFileLength % partSize > 0 ? 1 : 0);\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var part = new UploadablePart(item, new TLInt(i), i * partSize, Math.Min(partSize, isoFileLength - i * partSize));\r\n                parts.Add(part);\r\n            }\r\n\r\n            return parts;\r\n        }\r\n\r\n        private List<UploadablePart> GetItemParts(UploadableItem item, long isoFileLength, IList<UploadablePart> uploadedParts)\r\n        {\r\n            const int partSize = 32 * 1024;\r\n            foreach (var uploadedPart in uploadedParts)\r\n            {\r\n                uploadedPart.SetParentItem(item);\r\n            }\r\n            var parts = new List<UploadablePart>(uploadedParts);\r\n\r\n            var uploadedLength = uploadedParts.Sum(x => x.Count);\r\n\r\n            var uploadingLength = item.IsoFileLength - uploadedLength;\r\n            if (uploadingLength == 0)\r\n            {\r\n                return parts;\r\n            }\r\n            var partsCount = uploadingLength / partSize + 1;\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var partId = i + uploadedParts.Count;\r\n                var part = new UploadablePart(item, new TLInt(partId), uploadedLength + i * partSize, Math.Min(partSize, isoFileLength - (uploadedLength + i * partSize)));\r\n                parts.Add(part);\r\n            }\r\n\r\n            return parts;\r\n        }\r\n\r\n        private void StartAwaitingWorkers()\r\n        {\r\n            var awaitingWorkers = _workers.Where(x => x.IsWaiting);\r\n\r\n            foreach (var awaitingWorker in awaitingWorkers)\r\n            {\r\n                awaitingWorker.Start();\r\n            }\r\n        }\r\n\r\n        public void CancelUploadFile(TLLong fileId)\r\n        {\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                var item = _items.FirstOrDefault(x => x.FileId.Value == fileId.Value);\r\n\r\n                if (item != null)\r\n                {\r\n                    item.Canceled = true;\r\n                    //_items.Remove(item);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/FileManager/UploadFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows.Input;\r\n#if WINDOWS_PHONE\r\nusing Microsoft.Phone.Shell;\r\n#endif\r\n#if WP8\r\nusing System.Threading.Tasks;\r\nusing Windows.Storage;\r\nusing Windows.Storage.Streams;\r\n#endif\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class UploadProgressChangedEventArgs\r\n    {\r\n        public double Progress { get; protected set; }\r\n\r\n        public UploadableItem Item { get; protected set; }\r\n\r\n        public UploadProgressChangedEventArgs(UploadableItem item, double progress)\r\n        {\r\n            Item = item;\r\n            Progress = progress;\r\n        }\r\n    }\r\n\r\n    public class UploadablePart\r\n    {\r\n        public UploadableItem ParentItem { get; protected set; }\r\n\r\n        public TLInt FilePart { get; protected set; }\r\n\r\n        public PartStatus Status { get; set; }\r\n\r\n        public byte[] Bytes { get; protected set; }\r\n\r\n        public long Position { get; protected set; }\r\n\r\n        public long Count { get; protected set; }\r\n\r\n        public TLString IV { get; set; }\r\n\r\n        public void ClearBuffer()\r\n        {\r\n            Bytes = null;\r\n        }\r\n\r\n        public UploadablePart(UploadableItem item, TLInt filePart, byte[] bytes)\r\n        {\r\n            ParentItem = item;\r\n            FilePart = filePart;\r\n            Bytes = bytes;\r\n        }\r\n\r\n        public UploadablePart(UploadableItem item, TLInt filePart, long position, long count)\r\n        {\r\n            ParentItem = item;\r\n            FilePart = filePart;\r\n            Position = position;\r\n            Count = count;\r\n        }\r\n\r\n        public UploadablePart(UploadableItem item, TLInt filePart, byte[] bytes, long position, long count)\r\n        {\r\n            ParentItem = item;\r\n            FilePart = filePart;\r\n            Bytes = bytes;\r\n            Position = position;\r\n            Count = count;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"Part={0}, Status={1}, Position={2}, Count={3}\", FilePart, Status, Position, Count);\r\n        }\r\n\r\n        public void SetBuffer(byte[] bytes)\r\n        {\r\n            Bytes = bytes;\r\n        }\r\n\r\n        public void SetParentItem(UploadableItem item)\r\n        {\r\n            ParentItem = item;\r\n        }\r\n    }\r\n\r\n    public class UploadableItem\r\n    {\r\n        public bool FileNotFound { get; set; }\r\n\r\n        public bool IsSmallFile { get; set; }\r\n\r\n        public TLLong FileId { get; protected set; }\r\n\r\n        public string IsoFileName { get; protected set; }\r\n\r\n        public long IsoFileLength { get; protected set; }\r\n\r\n        public TLObject Owner { get; protected set; }\r\n\r\n#if WP8\r\n        public StorageFile File { get; protected set; }\r\n\r\n        public TLString Key { get; protected set; }\r\n\r\n        public TLString IV { get; protected set; }\r\n#endif\r\n\r\n        public byte[] Bytes { get; protected set; }\r\n\r\n        public List<UploadablePart> Parts { get; set; }\r\n\r\n        public bool Canceled { get; set; }\r\n\r\n        public UploadableItem(TLLong fileId, TLObject owner, byte[] bytes)\r\n        {\r\n            FileId = fileId;\r\n            Owner = owner;\r\n            Bytes = bytes;\r\n        }\r\n\r\n#if WP8\r\n        public UploadableItem(TLLong fileId, TLObject owner, StorageFile file)\r\n        {\r\n            FileId = fileId;\r\n            Owner = owner;\r\n            File = file;\r\n        }\r\n\r\n        public UploadableItem(TLLong fileId, TLObject owner, StorageFile file, TLString key, TLString iv)\r\n        {\r\n            FileId = fileId;\r\n            Owner = owner;\r\n            File = file;\r\n\r\n            Key = key;\r\n            IV = iv;\r\n        }\r\n#endif\r\n\r\n        public UploadableItem(TLLong fileId, TLObject owner, string isoFileName, long isoFileLength)\r\n        {\r\n            FileId = fileId;\r\n            Owner = owner;\r\n            IsoFileName = isoFileName;\r\n            IsoFileLength = isoFileLength;\r\n        }\r\n    }\r\n\r\n    public class UploadFileManager : IUploadFileManager\r\n    {\r\n        private readonly object _itemsSyncRoot = new object();\r\n\r\n        private readonly List<UploadableItem> _items = new List<UploadableItem>();\r\n\r\n        private readonly List<Worker> _workers = new List<Worker>(Constants.WorkersNumber); \r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        public UploadFileManager(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService)\r\n        {\r\n            _eventAggregator = eventAggregator;\r\n            _mtProtoService = mtProtoService;\r\n\r\n\r\n            var timer = Stopwatch.StartNew();\r\n            for (int i = 0; i < Constants.WorkersNumber; i++)\r\n            {\r\n                var worker = new Worker(OnUploading, \"uploader\"+i);\r\n                _workers.Add(worker);\r\n            }\r\n\r\n            TLUtils.WritePerformance(\"Start workers timer: \" + timer.Elapsed);\r\n            \r\n        }\r\n\r\n        private void OnUploading(object state)\r\n        {\r\n            UploadablePart part = null;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Canceled)\r\n                    {\r\n                        _items.RemoveAt(i--);\r\n                        try\r\n                        {\r\n                            _eventAggregator.Publish(new UploadingCanceledEventArgs(item));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n\r\n\r\n                foreach (var item in _items)\r\n                {\r\n                    part = item.Parts.FirstOrDefault(x => x.Status == PartStatus.Ready);\r\n                    if (part != null)\r\n                    {\r\n                        part.Status = PartStatus.Processing;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (part != null)\r\n            {\r\n                var bytes = part.Bytes;\r\n#if WP8\r\n                if (bytes == null)\r\n                {\r\n                    var file = part.ParentItem.File;\r\n                    if (file != null)\r\n                    {\r\n                        var task = FileUtils.FillBuffer(file, part);\r\n                        task.Wait();\r\n                        \r\n                        bytes = task.Result.Item2;\r\n                    }\r\n\r\n                    if (bytes == null)\r\n                    {\r\n                        part.Status = PartStatus.Ready;\r\n                        return;\r\n                    }\r\n                }\r\n#endif\r\n\r\n                var result = PutFile(part.ParentItem.FileId, part.FilePart, new TLInt(part.ParentItem.Parts.Count), bytes);\r\n                while (!result)\r\n                {\r\n                    if (part.ParentItem.Canceled)\r\n                    {\r\n                        return;\r\n                    }\r\n                    result = PutFile(part.ParentItem.FileId, part.FilePart, new TLInt(part.ParentItem.Parts.Count), bytes);\r\n                }\r\n\r\n                // indicate progress\r\n                // indicate complete\r\n                bool isComplete = false;\r\n                bool isCanceled;\r\n                var progress = 0.0;\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    part.Status = PartStatus.Processed;\r\n                    isCanceled = part.ParentItem.Canceled;\r\n                    if (!isCanceled)\r\n                    {\r\n                        isComplete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                        if (!isComplete)\r\n                        {\r\n                            double uploadedCount = part.ParentItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n                            double totalCount = part.ParentItem.Parts.Count;\r\n                            progress = uploadedCount / totalCount;\r\n                        }\r\n                        else\r\n                        {\r\n                            _items.Remove(part.ParentItem);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (!isCanceled)\r\n                {\r\n                    if (isComplete)\r\n                    {\r\n                        try\r\n                        {\r\n                            Execute.BeginOnThreadPool(() => _eventAggregator.Publish(part.ParentItem));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteLine(e.ToString(), LogSeverity.Error);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        try\r\n                        {\r\n                            Execute.BeginOnThreadPool(() => _eventAggregator.Publish(new UploadProgressChangedEventArgs(part.ParentItem, progress)));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteLine(e.ToString(), LogSeverity.Error);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n\r\n                var currentWorker = (Worker)state;\r\n                currentWorker.Stop();\r\n            }\r\n        }\r\n\r\n        private bool PutFile(TLLong fileId, TLInt filePart, TLInt fileTotalPars, byte[] bytes)\r\n        {\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            var result = false;\r\n\r\n            _mtProtoService.SaveFilePartAsync(fileId, filePart, TLString.FromBigEndianData(bytes),\r\n                savingResult =>\r\n                {\r\n                    result = true;\r\n                    manualResetEvent.Set();\r\n                },\r\n                error => Execute.BeginOnThreadPool(TimeSpan.FromSeconds(1.0), () =>\r\n                {\r\n                    Execute.ShowDebugMessage(string.Format(\"upload.saveFilePart part={0}, bytesCount={1} error\\n\", filePart.Value, bytes.Length) + error);\r\n\r\n                    manualResetEvent.Set();\r\n                }));\r\n\r\n            manualResetEvent.WaitOne();\r\n            return result;\r\n        }\r\n\r\n        public void UploadFile(TLLong fileId, TLObject owner, byte[] bytes)\r\n        {\r\n            var item = GetUploadableItem(fileId, owner, bytes);\r\n\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                _items.Add(item);\r\n            }\r\n\r\n            StartAwaitingWorkers();\r\n        }\r\n\r\n#if WP8\r\n        public void UploadFile(TLLong fileId, TLObject owner, StorageFile file)\r\n        {\r\n            var item = GetUploadableItem(fileId, owner, file);\r\n\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                _items.Add(item);\r\n            }\r\n\r\n            StartAwaitingWorkers();\r\n        }\r\n\r\n        private UploadableItem GetUploadableItem(TLLong fileId, TLObject owner, StorageFile file)\r\n        {\r\n            var item = new UploadableItem(fileId, owner, file);\r\n\r\n            var task = file.GetBasicPropertiesAsync().AsTask();\r\n            task.Wait();\r\n            var propertie = task.Result;\r\n            var size = propertie.Size;\r\n            item.Parts = GetItemParts(item, (int)size);\r\n            return item;\r\n        }\r\n\r\n        private static List<UploadablePart> GetItemParts(UploadableItem item, int size)\r\n        {\r\n            var chunkSize = FileUtils.GetChunkSize(size);\r\n            var partsCount = FileUtils.GetPartsCount(size, chunkSize);\r\n            var parts = new List<UploadablePart>(partsCount);\r\n\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var part = new UploadablePart(item, new TLInt(i), i * chunkSize, Math.Min(chunkSize, (long)size - i * chunkSize));\r\n                parts.Add(part);\r\n            }\r\n\r\n            return parts;\r\n        }\r\n#endif\r\n\r\n        private UploadableItem GetUploadableItem(TLLong fileId, TLObject owner, byte[] bytes)\r\n        {\r\n            var item = new UploadableItem(fileId, owner, bytes);\r\n            item.Parts = GetItemParts(item);\r\n            return item;\r\n        }\r\n\r\n        private static List<UploadablePart> GetItemParts(UploadableItem item)\r\n        {\r\n            var size = item.Bytes.Length;\r\n            var chunkSize = FileUtils.GetChunkSize(size);\r\n            var partsCount = FileUtils.GetPartsCount(size, chunkSize);\r\n            var parts = new List<UploadablePart>(partsCount);\r\n\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var part = new UploadablePart(item, new TLInt(i), item.Bytes.SubArray(i * chunkSize, Math.Min(chunkSize, item.Bytes.Length - i * chunkSize)));\r\n                parts.Add(part);\r\n            }\r\n\r\n            return parts;\r\n        }\r\n\r\n        private void StartAwaitingWorkers()\r\n        {\r\n            var awaitingWorkers = _workers.Where(x => x.IsWaiting);\r\n\r\n            foreach (var awaitingWorker in awaitingWorkers)\r\n            {\r\n                awaitingWorker.Start();\r\n            }\r\n        }\r\n\r\n        public void CancelUploadFile(TLLong fileId)\r\n        {\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                var item = _items.FirstOrDefault(x => x.FileId.Value == fileId.Value);\r\n                \r\n                if (item != null)\r\n                {\r\n                    item.Canceled = true;\r\n                    //_items.Remove(item);\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class UploadingCanceledEventArgs\r\n    {\r\n        public UploadableItem Item { get; protected set; }\r\n\r\n        public UploadingCanceledEventArgs(UploadableItem item)\r\n        {\r\n            Item = item;\r\n        }\r\n    }\r\n\r\n    public class UploadDocumentFileManager : IUploadDocumentFileManager\r\n    {\r\n        private readonly object _itemsSyncRoot = new object();\r\n\r\n        private readonly List<UploadableItem> _items = new List<UploadableItem>();\r\n\r\n        private readonly List<Worker> _workers = new List<Worker>(Constants.WorkersNumber);\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        public UploadDocumentFileManager(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService)\r\n        {\r\n            _eventAggregator = eventAggregator;\r\n            _mtProtoService = mtProtoService;\r\n\r\n\r\n            var timer = Stopwatch.StartNew();\r\n            for (var i = 0; i < Constants.DocumentUploadersCount; i++)\r\n            {\r\n                var worker = new Worker(OnUploading, \"documentUploader\" + i);\r\n                _workers.Add(worker);\r\n            }\r\n\r\n            TLUtils.WritePerformance(\"Start workers timer: \" + timer.Elapsed);\r\n\r\n        }\r\n\r\n        private void OnUploading(object state)\r\n        {\r\n            UploadablePart part = null;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Canceled)\r\n                    {\r\n                        _items.RemoveAt(i--);\r\n                        try\r\n                        {\r\n                            _eventAggregator.Publish(new UploadingCanceledEventArgs(item));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                foreach (var item in _items)\r\n                {\r\n                    part = item.Parts.FirstOrDefault(x => x.Status == PartStatus.Ready);\r\n                    if (part != null)\r\n                    {\r\n                        part.Status = PartStatus.Processing;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (part != null)\r\n            {\r\n                var bytes = part.Bytes;\r\n#if WP8\r\n                if (bytes == null)\r\n                {\r\n                    var file = part.ParentItem.File;\r\n                    Tuple<bool, byte[]> result = null;\r\n                    if (file != null)\r\n                    {\r\n                        var task = FileUtils.FillBuffer(file, part);\r\n                        task.Wait();\r\n                        result = task.Result;\r\n                    }\r\n\r\n                    if (result == null)\r\n                    {\r\n                        part.Status = PartStatus.Ready;\r\n                        return;\r\n                    }\r\n\r\n                    if (result.Item1 && result.Item2 == null)\r\n                    {\r\n                        part.Status = PartStatus.Ready;\r\n                        return;\r\n                    }\r\n\r\n                    if (!result.Item1)\r\n                    {\r\n                        part.ParentItem.FileNotFound = true;\r\n                        part.Status = PartStatus.Processed;\r\n                        FileUtils.NotifyProgress(_itemsSyncRoot, _items, part, _eventAggregator);\r\n                        return;\r\n                    }\r\n\r\n                    bytes = result.Item2;\r\n\r\n                    if (bytes == null)\r\n                    {\r\n                        part.Status = PartStatus.Ready;\r\n                        return;\r\n                    }\r\n                }\r\n#endif\r\n                if (part.ParentItem.IsSmallFile)\r\n                {\r\n                    bool result = PutFile(part.ParentItem.FileId, part.FilePart, bytes);\r\n                    while (!result)\r\n                    {\r\n                        if (part.ParentItem.Canceled)\r\n                        {\r\n                            return;\r\n                        }\r\n                        result = PutFile(part.ParentItem.FileId, part.FilePart, bytes);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    bool result = PutBigFile(part.ParentItem.FileId, part.FilePart, new TLInt(part.ParentItem.Parts.Count), bytes);\r\n                    while (!result)\r\n                    {\r\n                        if (part.ParentItem.Canceled)\r\n                        {\r\n                            return;\r\n                        }\r\n                        result = PutBigFile(part.ParentItem.FileId, part.FilePart, new TLInt(part.ParentItem.Parts.Count), bytes);\r\n                    }\r\n                }\r\n\r\n                FileUtils.NotifyProgress(_itemsSyncRoot, _items, part, _eventAggregator);\r\n            }\r\n            else\r\n            {\r\n\r\n                var currentWorker = (Worker)state;\r\n                currentWorker.Stop();\r\n            }\r\n        }\r\n\r\n\r\n        private bool PutBigFile(TLLong fileId, TLInt filePart, TLInt fileTotalPars, byte[] bytes)\r\n        {\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            var result = false;\r\n\r\n            _mtProtoService.SaveBigFilePartAsync(fileId, filePart, fileTotalPars, TLString.FromBigEndianData(bytes),\r\n                savingResult =>\r\n                {\r\n                    result = true;\r\n                    manualResetEvent.Set();\r\n                },\r\n                error => Execute.BeginOnThreadPool(TimeSpan.FromSeconds(1.0), () =>\r\n                {\r\n                    Execute.ShowDebugMessage(string.Format(\"upload.saveBigFilePart part={0}, count={1} error\\n\", filePart.Value, bytes.Length) + error);\r\n\r\n                    manualResetEvent.Set();\r\n                }));\r\n\r\n            manualResetEvent.WaitOne();\r\n            return result;\r\n        }\r\n\r\n        private bool PutFile(TLLong fileId, TLInt filePart, byte[] bytes)\r\n        {\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            var result = false;\r\n\r\n            _mtProtoService.SaveFilePartAsync(fileId, filePart, TLString.FromBigEndianData(bytes),\r\n                savingResult =>\r\n                {\r\n                    result = true;\r\n                    manualResetEvent.Set();\r\n                },\r\n                error => Execute.BeginOnThreadPool(TimeSpan.FromSeconds(1.0), () =>\r\n                {\r\n                    Execute.ShowDebugMessage(string.Format(\"upload.saveBigFilePart part={0}, count={1} error\\n\", filePart.Value, bytes.Length) + error);\r\n\r\n                    manualResetEvent.Set();\r\n                }));\r\n\r\n            manualResetEvent.WaitOne();\r\n            return result;\r\n        }\r\n\r\n        public void UploadFile(TLLong fileId, TLObject owner, byte[] bytes)\r\n        {\r\n            FileUtils.SwitchIdleDetectionMode(false);\r\n            var item = GetUploadableItem(fileId, owner, bytes);\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                _items.Add(item);\r\n            }\r\n\r\n            StartAwaitingWorkers();\r\n        }\r\n\r\n#if WP8\r\n        public void UploadFile(TLLong fileId, TLObject owner, StorageFile file)\r\n        {\r\n            UploadFile(fileId, owner, file, null, null);\r\n        }\r\n\r\n        public void UploadFile(TLLong fileId, TLObject owner, StorageFile file, TLString key, TLString iv)\r\n        {\r\n            FileUtils.SwitchIdleDetectionMode(false);\r\n            var item = FileUtils.GetUploadableItem(fileId, owner, file, key, iv);\r\n            //if (item)\r\n            //{\r\n            //    item.IsSmallFile = false;   // to void auto convert small video documents to videos on server side\r\n            //}\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                _items.Add(item);\r\n            }\r\n\r\n            StartAwaitingWorkers();\r\n        }\r\n#endif\r\n\r\n        private UploadableItem GetUploadableItem(TLLong fileId, TLObject owner, byte[] bytes)\r\n        {\r\n            var item = new UploadableItem(fileId, owner, bytes);\r\n            item.Parts = GetItemParts(item);\r\n            return item;\r\n        }\r\n\r\n        private static List<UploadablePart> GetItemParts(UploadableItem item)\r\n        {\r\n            var size = item.Bytes.Length;\r\n            var chunkSize = FileUtils.GetChunkSize(size);\r\n            var partsCount = FileUtils.GetPartsCount(size, chunkSize);\r\n            var parts = new List<UploadablePart>(partsCount);\r\n            \r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var part = new UploadablePart(item, new TLInt(i), item.Bytes.SubArray(i * chunkSize, Math.Min(chunkSize, item.Bytes.Length - i * chunkSize)));\r\n                parts.Add(part);\r\n            }\r\n\r\n            item.IsSmallFile = size < Constants.SmallFileMaxSize;// size < chunkSize;\r\n\r\n            return parts;\r\n        }\r\n\r\n        private void StartAwaitingWorkers()\r\n        {\r\n            var awaitingWorkers = _workers.Where(x => x.IsWaiting);\r\n\r\n            foreach (var awaitingWorker in awaitingWorkers)\r\n            {\r\n                awaitingWorker.Start();\r\n            }\r\n        }\r\n\r\n        public void CancelUploadFile(TLLong fileId)\r\n        {\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                var item = _items.FirstOrDefault(x => x.FileId.Value == fileId.Value);\r\n\r\n                if (item != null)\r\n                {\r\n                    item.Canceled = true;\r\n                    //_items.Remove(item);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/UploadVideoFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing Telegram.Api.Helpers;\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.TL;\r\n\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class UploadVideoFileManager : IUploadVideoFileManager\r\n    {\r\n        private readonly object _itemsSyncRoot = new object();\r\n\r\n        private readonly List<UploadableItem> _items = new List<UploadableItem>();\r\n\r\n        private readonly List<Worker> _workers = new List<Worker>(Constants.WorkersNumber); \r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        public UploadVideoFileManager(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService)\r\n        {\r\n            _eventAggregator = eventAggregator;\r\n            _mtProtoService = mtProtoService;\r\n\r\n\r\n            var timer = Stopwatch.StartNew();\r\n            for (int i = 0; i < Constants.VideoUploadersCount; i++)\r\n            {\r\n                var worker = new Worker(OnUploading, \"videoUploader\"+i);\r\n                _workers.Add(worker);\r\n            }\r\n\r\n            TLUtils.WritePerformance(\"Start workers timer: \" + timer.Elapsed);\r\n            \r\n        }\r\n\r\n        private void OnUploading(object state)\r\n        {\r\n            UploadablePart part = null;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Canceled)\r\n                    {\r\n                        _items.RemoveAt(i--);\r\n                        try\r\n                        {\r\n                            _eventAggregator.Publish(new UploadingCanceledEventArgs(item));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                foreach (var item in _items)\r\n                {\r\n                    part = item.Parts.FirstOrDefault(x => x.Status == PartStatus.Ready);\r\n                    if (part != null)\r\n                    {\r\n                        part.Status = PartStatus.Processing;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (part != null)\r\n            {\r\n                var bytes = part.Bytes;\r\n\r\n                var fileName = part.ParentItem.IsoFileName;\r\n                if (!string.IsNullOrEmpty(fileName))\r\n                {\r\n                    bytes = FileUtils.ReadBytes(fileName, part.Position, part.Count);\r\n                }\r\n#if WP8\r\n                if (bytes == null)\r\n                {\r\n                    var file = part.ParentItem.File;\r\n                    Tuple<bool, byte[]> result = null;\r\n                    if (file != null)\r\n                    {\r\n                        var task = FileUtils.FillBuffer(file, part);\r\n                        task.Wait();\r\n                        result = task.Result;\r\n                    }\r\n\r\n                    if (result == null)\r\n                    {\r\n                        part.Status = PartStatus.Ready;\r\n                        return;\r\n                    }\r\n\r\n                    if (!result.Item1)\r\n                    {\r\n                        part.ParentItem.FileNotFound = true;\r\n                        part.Status = PartStatus.Processed;\r\n                        FileUtils.NotifyProgress(_itemsSyncRoot, _items, part, _eventAggregator);\r\n                        return;\r\n                    }\r\n\r\n                    bytes = result.Item2;\r\n\r\n                    if (bytes == null)\r\n                    {\r\n                        part.Status = PartStatus.Ready;\r\n                        return;\r\n                    }\r\n                }\r\n#endif\r\n                if (bytes == null)\r\n                {\r\n                    Logs.Log.Write(string.Format(\"UploadVideoFileManager.OnUploading bytes=null position={0} count={1} fileName={2}\", part.Position, part.Count, fileName));\r\n                    //Execute.ShowDebugMessage(string.Format(\"UploadVideoFileManager.OnUploading bytes=null position={0} count={1} fileName={2}\", part.Position, part.Count, fileName));\r\n                }\r\n\r\n                if (part.ParentItem.IsSmallFile)\r\n                {\r\n                    var result = PutFile(part.ParentItem.FileId, part.FilePart, bytes);\r\n                    while (!result)\r\n                    {\r\n                        if (part.ParentItem.Canceled)\r\n                        {\r\n                            return;\r\n                        }\r\n                        result = PutFile(part.ParentItem.FileId, part.FilePart, bytes);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    var result = PutBigFile(part.ParentItem.FileId, part.FilePart, new TLInt(part.ParentItem.Parts.Count), bytes);\r\n                    while (!result)\r\n                    {\r\n                        if (part.ParentItem.Canceled)\r\n                        {\r\n                            return;\r\n                        }\r\n                        result = PutBigFile(part.ParentItem.FileId, part.FilePart, new TLInt(part.ParentItem.Parts.Count), bytes);\r\n                    }\r\n                }\r\n                part.ClearBuffer();\r\n\r\n                FileUtils.NotifyProgress(_itemsSyncRoot, _items, part, _eventAggregator);\r\n            }\r\n            else\r\n            {\r\n                var currentWorker = (Worker)state;\r\n                currentWorker.Stop();\r\n            }\r\n        }\r\n\r\n        private bool PutFile(TLLong fileId, TLInt filePart, byte[] bytes)\r\n        {\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            var result = false;\r\n            \r\n            _mtProtoService.SaveFilePartAsync(fileId, filePart, TLString.FromBigEndianData(bytes),\r\n                savingResult =>\r\n                {\r\n                    result = true;\r\n                    manualResetEvent.Set();\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.BeginOnThreadPool(TimeSpan.FromMilliseconds(1000), () => manualResetEvent.Set());\r\n                });\r\n            \r\n            manualResetEvent.WaitOne();\r\n            return result;\r\n        }\r\n\r\n        private bool PutBigFile(TLLong fileId, TLInt filePart, TLInt fileTotalParts, byte[] bytes)\r\n        {\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            var result = false;\r\n\r\n            _mtProtoService.SaveBigFilePartAsync(fileId, filePart, fileTotalParts, TLString.FromBigEndianData(bytes),\r\n                savingResult =>\r\n                {\r\n                    result = true;\r\n                    manualResetEvent.Set();\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.BeginOnThreadPool(TimeSpan.FromMilliseconds(1000), () => manualResetEvent.Set());\r\n                });\r\n\r\n            manualResetEvent.WaitOne();\r\n            return result;\r\n        }\r\n\r\n        public void UploadFile(TLLong fileId, TLObject owner, string fileName)\r\n        {\r\n            var fileLength = FileUtils.GetLocalFileLength(fileName);\r\n            if (fileLength <= 0) return;\r\n\r\n            var item = GetUploadableItem(fileId, owner, fileName, fileLength);\r\n\r\n            var uploadedCount = item.Parts.Count(x => x.Status == PartStatus.Processed);\r\n            var count = item.Parts.Count;\r\n            var isComplete = uploadedCount == count;\r\n\r\n            if (isComplete)\r\n            {\r\n                Helpers.Execute.BeginOnThreadPool(() => _eventAggregator.Publish(item));\r\n            }\r\n            else\r\n            {\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    _items.Add(item);\r\n                }\r\n\r\n                StartAwaitingWorkers();\r\n            }\r\n        }\r\n\r\n#if WP8\r\n        public void UploadFile(TLLong fileId, bool isGif, TLObject owner, StorageFile file)\r\n        {\r\n            FileUtils.SwitchIdleDetectionMode(false);\r\n                       \r\n            var item = FileUtils.GetUploadableItem(fileId, owner, file);\r\n            item.IsSmallFile = isGif && item.Parts.Sum(part => part.Count) < Constants.GifMaxSize;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                _items.Add(item);\r\n            }\r\n\r\n            StartAwaitingWorkers();\r\n        }\r\n#endif\r\n\r\n        public void UploadFile(TLLong fileId, TLObject owner, string fileName, IList<UploadablePart> parts)\r\n        {\r\n            FileUtils.SwitchIdleDetectionMode(false);\r\n\r\n            long fileLength = FileUtils.GetLocalFileLength(fileName);\r\n            if (fileLength <= 0) return;\r\n\r\n            var item = GetUploadableItem(fileId, owner, fileName, fileLength, parts);\r\n\r\n            var uploadedCount = item.Parts.Count(x => x.Status == PartStatus.Processed);\r\n            var count = item.Parts.Count;\r\n            var isComplete = uploadedCount == count;\r\n\r\n            if (isComplete)\r\n            {\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(item));\r\n            }\r\n            else\r\n            {\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    _items.Add(item);\r\n                }\r\n\r\n                StartAwaitingWorkers();\r\n            }\r\n        }\r\n\r\n        private UploadableItem GetUploadableItem(TLLong fileId, TLObject owner, string fileName, long fileLength)\r\n        {\r\n            FileUtils.SwitchIdleDetectionMode(false);\r\n\r\n            var item = new UploadableItem(fileId, owner, fileName, fileLength);\r\n            item.Parts = GetItemParts(item, fileLength);\r\n            return item;\r\n        }\r\n\r\n        private UploadableItem GetUploadableItem(TLLong fileId, TLObject owner, string fileName, long fileLength, IList<UploadablePart> parts)\r\n        {\r\n            var item = new UploadableItem(fileId, owner, fileName, fileLength);\r\n            item.Parts = GetItemParts(item, fileLength, parts);\r\n            return item;\r\n        }\r\n\r\n        private List<UploadablePart> GetItemParts(UploadableItem item, long fileLength)\r\n        {\r\n            var chunkSize = FileUtils.GetChunkSize(fileLength);\r\n            var partsCount = FileUtils.GetPartsCount(fileLength, chunkSize);\r\n            var parts = new List<UploadablePart>();\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var part = new UploadablePart(item, new TLInt(i), i * chunkSize, Math.Min(chunkSize, fileLength - i * chunkSize));\r\n                parts.Add(part);\r\n            }\r\n\r\n            item.IsSmallFile = fileLength < chunkSize;\r\n\r\n            return parts;\r\n        }\r\n\r\n        private List<UploadablePart> GetItemParts(UploadableItem item, long fileLength, IList<UploadablePart> uploadedParts)\r\n        {\r\n            var chunkSize = FileUtils.GetChunkSize(fileLength);\r\n            var parts = new List<UploadablePart>(uploadedParts);\r\n            foreach (var uploadedPart in uploadedParts)\r\n            {\r\n                uploadedPart.SetParentItem(item);\r\n            }\r\n            var uploadedLength = uploadedParts.Sum(x => x.Count);\r\n\r\n            var partsCount = FileUtils.GetPartsCount(item.IsoFileLength - uploadedLength, chunkSize);\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var partId = i + uploadedParts.Count;\r\n                var part = new UploadablePart(item, new TLInt(partId), uploadedLength + i * chunkSize, Math.Min(chunkSize, fileLength - (uploadedLength + i * chunkSize)));\r\n                parts.Add(part);\r\n            }\r\n\r\n            item.IsSmallFile = fileLength < chunkSize;\r\n\r\n            return parts;\r\n        }\r\n\r\n        private void StartAwaitingWorkers()\r\n        {\r\n            var awaitingWorkers = _workers.Where(x => x.IsWaiting);\r\n\r\n            foreach (var awaitingWorker in awaitingWorkers)\r\n            {\r\n                awaitingWorker.Start();\r\n            }\r\n        }\r\n\r\n        public void CancelUploadFile(TLLong fileId)\r\n        {\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                var item = _items.FirstOrDefault(x => x.FileId.Value == fileId.Value);\r\n                \r\n                if (item != null)\r\n                {\r\n                    item.Canceled = true;\r\n                    //_items.Remove(item);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/VideoFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class VideoFileManager : FileManagerBase, IVideoFileManager\r\n    {\r\n        public VideoFileManager(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService) : base(eventAggregator, mtProtoService)\r\n        {\r\n            for (var i = 0; i < Constants.BigFileWorkersNumber; i++)\r\n            {\r\n                var worker = new Worker(OnDownloading, \"videoDownloader\"+i);\r\n                _workers.Add(worker);\r\n            }\r\n        }\r\n\r\n        private void OnDownloading(object state)\r\n        {\r\n            DownloadablePart part = null;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Canceled)\r\n                    {\r\n                        _items.RemoveAt(i--);\r\n                        try\r\n                        {\r\n                            //_eventAggregator.Publish(new UploadingCanceledEventArgs(item));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                foreach (var item in _items)\r\n                {\r\n                    part = item.Parts.FirstOrDefault(x => x.Status == PartStatus.Ready);\r\n                    if (part != null)\r\n                    {\r\n                        part.Status = PartStatus.Processing;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (part == null)\r\n            {\r\n                var currentWorker = (Worker)state;\r\n                currentWorker.Stop();\r\n                return;\r\n            }\r\n\r\n            var partName = part.ParentItem.InputLocation.GetPartFileName(part.Number, \"video\");\r\n            bool canceled;\r\n            ProcessFilePart(part, part.ParentItem.DCId, part.ParentItem.InputLocation, out canceled);\r\n            if (canceled)\r\n            {\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    part.ParentItem.Canceled = true;\r\n                    part.Status = PartStatus.Processed;\r\n                    _items.Remove(part.ParentItem);\r\n                }\r\n\r\n                return;\r\n            }\r\n            //part.File = GetFile(part.ParentItem.DCId, (TLInputFileLocationBase)part.ParentItem.InputVideoLocation, part.Offset, part.Limit);\r\n            //while (part.File == null)\r\n            //{\r\n            //    part.File = GetFile(part.ParentItem.DCId, (TLInputFileLocationBase)part.ParentItem.InputVideoLocation, part.Offset, part.Limit);\r\n            //}\r\n\r\n            // indicate progress\r\n            // indicate complete\r\n            bool isComplete;\r\n            bool isCanceled;\r\n            var progress = 0.0;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                part.Status = PartStatus.Processed;\r\n\r\n                FileUtils.CheckMissingPart(_itemsSyncRoot, part, partName);\r\n\r\n                isCanceled = part.ParentItem.Canceled;\r\n\r\n                isComplete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                if (!isComplete)\r\n                {\r\n                    var downloadedCount = part.ParentItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n                    var count = part.ParentItem.Parts.Count;\r\n                    progress = downloadedCount / (double)count;\r\n                }\r\n                else\r\n                {\r\n                    _items.Remove(part.ParentItem);    \r\n                }\r\n            }\r\n\r\n            if (!isCanceled)\r\n            {\r\n                if (isComplete)\r\n                {\r\n                    var fileName = part.ParentItem.InputLocation.GetFileName(\"video\", \".mp4\");\r\n                    var getPartName = new Func<DownloadablePart, string>(x => x.ParentItem.InputLocation.GetPartFileName(x.Number, \"video\"));  \r\n         \r\n                    FileUtils.MergePartsToFile(getPartName, part.ParentItem.Parts, fileName);\r\n\r\n                    part.ParentItem.IsoFileName = fileName;\r\n                    _eventAggregator.Publish(part.ParentItem);\r\n                }\r\n                else\r\n                {\r\n                    _eventAggregator.Publish(new ProgressChangedEventArgs(part.ParentItem, progress));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void DownloadFileAsync(TLInt dcId, TLInputFileLocationBase fileLocation, TLObject owner, TLInt fileSize, Action<double> callback)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var downloadableItem = GetDownloadableItem(dcId, fileLocation, owner, fileSize);\r\n\r\n                var downloadedCount = downloadableItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n                var count = downloadableItem.Parts.Count;\r\n                var isComplete = downloadedCount == count;\r\n\r\n                if (isComplete)\r\n                {\r\n                    var fileName = downloadableItem.InputLocation.GetFileName(\"video\", \".mp4\");\r\n                    var getPartName = new Func<DownloadablePart, string>(x => x.ParentItem.InputLocation.GetPartFileName(x.Number, \"video\")); \r\n                    FileUtils.MergePartsToFile(getPartName, downloadableItem.Parts, fileName);\r\n\r\n                    downloadableItem.IsoFileName = fileName;\r\n                    _eventAggregator.Publish(downloadableItem);\r\n                }\r\n                else\r\n                {\r\n                    var progress = downloadedCount / (double)count;\r\n                    callback.SafeInvoke(progress);\r\n\r\n                    lock (_itemsSyncRoot)\r\n                    {\r\n                        bool addFile = true;\r\n                        foreach (var item in _items)\r\n                        {\r\n                            if (item.InputLocation.LocationEquals(fileLocation)\r\n                                && item.Owner == owner)\r\n                            {\r\n                                addFile = false;\r\n                                break;\r\n                            }\r\n                        }\r\n\r\n                        if (addFile)\r\n                        {\r\n                            _items.Add(downloadableItem);\r\n                        }\r\n                    }\r\n\r\n                    StartAwaitingWorkers();\r\n                }\r\n            });        \r\n        }\r\n\r\n        private DownloadableItem GetDownloadableItem(TLInt dcId, TLInputFileLocationBase location, TLObject owner, TLInt fileSize)\r\n        {\r\n            var item = new DownloadableItem\r\n            {\r\n                Owner = owner,\r\n                DCId = dcId,\r\n                InputLocation = location\r\n            };\r\n            item.Parts = GetItemParts(fileSize, item);\r\n\r\n            return item;\r\n        }\r\n\r\n        protected override List<DownloadablePart> GetItemParts(TLInt size, DownloadableItem item)\r\n        {\r\n            var chunkSize = size.Value > 1024 * 1024 ? Constants.DownloadedBigChunkSize : Constants.DownloadedChunkSize;\r\n            var parts = new List<DownloadablePart>();\r\n            var partsCount = size.Value/chunkSize + (size.Value % chunkSize > 0 ? 1 : 0);\r\n\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var part = new DownloadablePart(item, new TLInt(i * chunkSize), size.Value == 0 ? new TLInt(1024 * 1024) : new TLInt(chunkSize), i);\r\n                var partName = item.InputLocation.GetPartFileName(part.Number, \"video\");\r\n\r\n                var partLength = FileUtils.GetLocalFileLength(partName);\r\n                if (partLength >= 0)\r\n                {\r\n                    var isCompletePart = (part.Number + 1 == partsCount) || partLength == part.Limit.Value;\r\n                    part.Status = isCompletePart ? PartStatus.Processed : PartStatus.Ready;\r\n                }\r\n\r\n                parts.Add(part);\r\n            }\r\n\r\n            return parts;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/FileManager/Worker.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Threading;\r\n#if !WINDOWS_PHONE\r\nusing System.Threading.Tasks;\r\n#endif\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n#if WINDOWS_PHONE\r\n    public class Worker\r\n    {\r\n        private readonly Thread _thread;\r\n\r\n        private readonly ManualResetEvent _resetEvent = new ManualResetEvent(true);\r\n\r\n        public ThreadState ThreadState\r\n        {\r\n            get { return _thread.ThreadState; }\r\n        }\r\n\r\n        public string Name { get { return _thread.Name; } }\r\n\r\n        public Worker(ParameterizedThreadStart start, string name)\r\n        {\r\n            _thread = new Thread(state => OnThreadStartInternal(start));\r\n            _thread.Name = name;\r\n            //_thread.IsBackground = true;\r\n            _thread.Start(this);\r\n        }\r\n\r\n        private void OnThreadStartInternal(ParameterizedThreadStart start)\r\n        {\r\n            while (true)\r\n            {\r\n\r\n                try\r\n                {\r\n                    start(this);\r\n                }\r\n                catch (Exception e)\r\n                {\r\n                    TLUtils.WriteException(e);\r\n                }\r\n\r\n                _resetEvent.WaitOne();\r\n            }\r\n        }\r\n\r\n        public bool IsWaiting\r\n        {\r\n            get{ return ThreadState == ThreadState.WaitSleepJoin; }\r\n        }\r\n\r\n        public void Start()\r\n        {\r\n            _resetEvent.Set();\r\n        }\r\n\r\n        public void Stop()\r\n        {\r\n            _resetEvent.Reset();\r\n        }\r\n    }\r\n#else\r\n    public class Worker\r\n    {\r\n        private readonly Task _thread;\r\n\r\n        private readonly ManualResetEvent _resetEvent = new ManualResetEvent(true);\r\n\r\n        public TaskStatus ThreadState\r\n        {\r\n            get { return _thread.Status; }\r\n        }\r\n\r\n        public Worker(Action<object> start, string name)\r\n        {\r\n            _thread = new Task(state => OnThreadStartInternal(start, state), this, TaskCreationOptions.LongRunning);\r\n            //_thread.Name = name;\r\n            //_thread.IsBackground = true;\r\n            _thread.Start();\r\n        }\r\n\r\n        private bool _isWorking;\r\n\r\n        private void OnThreadStartInternal(Action<object> start, object state)\r\n        {\r\n            while (true)\r\n            {\r\n                try\r\n                {\r\n                    start(state);\r\n                }\r\n                catch (Exception e)\r\n                {\r\n                    TLUtils.WriteException(e);\r\n                }\r\n                _isWorking = false;\r\n                _isWorking = _resetEvent.WaitOne();\r\n            }\r\n        }\r\n\r\n        public bool IsWaiting\r\n        {\r\n            get\r\n            {\r\n                return true;\r\n                return !_isWorking;\r\n            }\r\n        }\r\n\r\n        public void Start()\r\n        {\r\n            _resetEvent.Set();\r\n        }\r\n\r\n        public void Stop()\r\n        {\r\n            _resetEvent.Reset();\r\n        }\r\n    }\r\n#endif\r\n}"
  },
  {
    "path": "Telegram.Api/Services/HistoryItem.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public enum RequestStatus\r\n    {\r\n        Sent,\r\n        Confirmed,\r\n        Failed,\r\n        ReadyToSend\r\n    }\r\n\r\n    public class HistoryItem\r\n    {\r\n        public long Hash { get { return Message != null ? Message.MessageId.Value : 0; } }\r\n        public TLTransportMessageWithIdBase Message { get; set; }\r\n        public TLObject Object { get; set; }\r\n        public string Caption { get; set; }\r\n        public DateTime SendTime { get; set; }\r\n        public int TimeToResend { get; set; }\r\n        public DateTime? SendBeforeTime { get; set; }\r\n        public RequestStatus Status { get; set; }\r\n        public Action<TLObject> Callback { get; set; }\r\n        public Action FastCallback { get; set; }\r\n        public Action<int> AttemptFailed { get; set; }\r\n        public Action<TLRPCError> FaultCallback { get; set; }\r\n        public Action<TLRPCError> FaultQueueCallback { get; set; }\r\n        public long ClientTicksDelta { get; set; }\r\n        public HistoryItem InvokeAfter { get; set; }\r\n        public TLRPCError LastError { get; set; }\r\n\r\n        public int DCId { get; set; }\r\n\r\n        //public volatile bool IsSending;\r\n\r\n        public override string ToString()\r\n        {\r\n\r\n            return string.Format(\"{0:HH:mm:ss.fff} dc_id={1} {2} hash={3}\", SendTime, DCId, Caption, GetHashCode());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/IMTProtoService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Contacts;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public interface IMTProtoService\r\n    {\r\n        TLEncryptedTransportMessage GetEncryptedTransportMessage(byte[] authKey, TLLong salt, TLObject obj);\r\n\r\n#if DEBUG\r\n        void CheckPublicConfig();\r\n#endif\r\n\r\n        TLInputPeerBase PeerToInputPeer(TLPeerBase peer);\r\n\r\n        void Stop();\r\n\r\n        void StartInitialize();\r\n\r\n        void RemoveFromQueue(TLLong id);\r\n\r\n        event EventHandler<TransportCheckedEventArgs> TransportChecked;\r\n\r\n        string Message { get; }\r\n        void SetMessageOnTime(double seconds, string message);\r\n\r\n        ITransport GetActiveTransport();\r\n        WindowsPhone.Tuple<int, int, int> GetCurrentPacketInfo();\r\n        string GetTransportInfo();\r\n\r\n        string Country { get; }\r\n        event EventHandler<CountryEventArgs> GotUserCountry;\r\n\r\n        // To remove multiple UpdateStatusAsync calls, it's prefer to invoke this method instead\r\n        void RaiseSendStatus(SendStatusEventArgs e);\r\n\r\n        TLInt CurrentUserId { get; set; }\r\n\r\n        IList<HistoryItem> History { get; }\r\n\r\n        void ClearHistory(string caption, bool createNewSession, bool syncFaultCallbacks = false, Exception e = null);\r\n\r\n        long ClientTicksDelta { get; }\r\n\r\n        /// <summary>\r\n        /// Indicates that service has authKey\r\n        /// </summary>\r\n        //bool IsInitialized { get; }\r\n        event EventHandler Initialized;\r\n        event EventHandler<AuthorizationRequiredEventArgs> AuthorizationRequired;\r\n        event EventHandler CheckDeviceLocked;\r\n        event EventHandler ProxyDisabled;\r\n\r\n        void SaveConfig();\r\n        TLConfig LoadConfig();\r\n\r\n        void GetStateAsync(Action<TLState> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetDifferenceAsync(TLInt pts, TLInt date, TLInt qts, Action<TLDifferenceBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetDifferenceWithoutUpdatesAsync(TLInt pts, TLInt date, TLInt qts, Action<TLDifferenceBase> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void RegisterDeviceAsync(TLInt tokenType, TLString token, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void UnregisterDeviceAsync(TLInt tokenType, TLString token, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        \r\n\r\n        void MessageAcknowledgments(TLVector<TLLong> ids);\r\n\r\n        // auth\r\n        void BindTempAuthKeyAsync(TLLong permAuthKeyId, TLLong nonce, TLInt expiresAt, TLString encryptedMessage, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendCodeAsync(TLString phoneNumber, TLString currentNumber, Action<TLSentCodeBase> callback, Action<int> attemptFailed = null, Action<TLRPCError> faultCallback = null);\r\n        void ResendCodeAsync(TLString phoneNumber, TLString phoneCodeHash, Action<TLSentCodeBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void CancelCodeAsync(TLString phoneNumber, TLString phoneCodeHash, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SignInAsync(TLString phoneNumber, TLString phoneCodeHash, TLString phoneCode, Action<TLAuthorization> callback, Action<TLRPCError> faultCallback = null);\r\n        void CancelSignInAsync();\r\n        void LogOutAsync(Action callback);\r\n        void LogOutAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void LogOutTransportsAsync(Action callback, Action<List<TLRPCError>> faultCallback = null);\r\n        void SignUpAsync(TLString phoneNumber, TLString phoneCodeHash, TLString phoneCode, TLString firstName, TLString lastName, Action<TLAuthorization> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendCallAsync(TLString phoneNumber, TLString phoneCodeHash, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n       \r\n        void SearchAsync(TLInputPeerBase peer, TLString query, TLInputUserBase fromId, TLInputMessagesFilterBase filter, TLInt minDate, TLInt maxDate, TLInt addOffset, TLInt offsetId, TLInt limit, TLInt hash, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetDialogsAsync(Stopwatch timer, TLInt offsetDate, TLInt offsetId, TLInputPeerBase offsetPeer, TLInt limit, TLInt hash, Action<TLDialogsBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetHistoryAsync(Stopwatch timer, TLInputPeerBase inputPeer, TLPeerBase peer, bool sync, TLInt offsetDate, TLInt offset, TLInt maxId, TLInt limit, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeleteMessagesAsync(bool revoke, TLVector<TLInt> id, Action<TLAffectedMessages> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeleteHistoryAsync(bool justClear, TLInputPeerBase peer, TLInt offset, Action<TLAffectedHistory> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReadHistoryAsync(TLInputPeerBase peer, TLInt maxId, TLInt offset, Action<TLAffectedMessages> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReadMentionsAsync(TLInputPeerBase peer, Action<TLAffectedHistory24> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReadMessageContentsAsync(TLVector<TLInt> id, Action<TLAffectedMessages> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetFullChatAsync(TLInt chatId, Action<TLMessagesChatFull> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void SetTypingAsync(TLInputPeerBase peer, TLBool typing, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SetTypingAsync(TLInputPeerBase peer, TLSendMessageActionBase action, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void GetContactsAsync(TLInt hash, Action<TLContactsBase> callback, Action<TLRPCError> faultCallback = null);     \r\n        void ImportContactsAsync(TLVector<TLInputContactBase> contacts, Action<TLImportedContacts> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void BlockAsync(TLInputUserBase id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void UnblockAsync(TLInputUserBase id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null); \r\n        void GetBlockedAsync(TLInt offset, TLInt limit, Action<TLContactsBlockedBase> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void UpdateProfileAsync(TLString firstName, TLString lastName, TLString about, Action<TLUserBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void UpdateStatusAsync(TLBool offline, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void GetFileAsync(TLInt dcId, TLInputFileLocationBase location, TLInt offset, TLInt limit, Action<TLFileBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetFileAsync(TLInputFileLocationBase location, TLInt offset, TLInt limit, Action<TLFileBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void SaveFilePartAsync(TLLong fileId, TLInt filePart, TLString bytes, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SaveBigFilePartAsync(TLLong fileId, TLInt filePart, TLInt fileTotalParts, TLString bytes, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void GetNotifySettingsAsync(TLInputNotifyPeerBase peer, Action<TLPeerNotifySettingsBase> settings, Action<TLRPCError> faultCallback = null);\r\n        void UpdateNotifySettingsAsync(TLInputNotifyPeerBase peer, TLInputPeerNotifySettings settings, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void ResetNotifySettingsAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void UploadProfilePhotoAsync(TLInputFile file, Action<TLPhotosPhoto> callback, Action<TLRPCError> faultCallback = null);\r\n        void UpdateProfilePhotoAsync(TLInputPhotoBase id, Action<TLPhotoBase> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void GetDHConfigAsync(TLInt version, TLInt randomLength, Action<TLDHConfigBase> result, Action<TLRPCError> faultCallback = null);\r\n        void RequestEncryptionAsync(TLInputUserBase userId, TLInt randomId, TLString g_a, Action<TLEncryptedChatBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void AcceptEncryptionAsync(TLInputEncryptedChat peer, TLString gb, TLLong keyFingerprint, Action<TLEncryptedChatBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendEncryptedAsync(TLInputEncryptedChat peer, TLLong randomId, TLString data, Action<TLSentEncryptedMessage> callback, Action fastCallback, Action<TLRPCError> faultCallback = null);\r\n        void SendEncryptedFileAsync(TLInputEncryptedChat peer, TLLong randomId, TLString data, TLInputEncryptedFileBase file, Action<TLSentEncryptedFile> callback, Action fastCallback, Action<TLRPCError> faultCallback = null);\r\n        void SendEncryptedMultiMediaAsync(TLInputEncryptedChat peer, TLVector<TLLong> randomId, TLVector<TLString> data, TLVector<TLInputEncryptedFileBase> file, Action<TLVector<TLSentEncryptedFile>> callback, Action fastCallback, Action<TLRPCError> faultCallback = null);\r\n        void ReadEncryptedHistoryAsync(TLInputEncryptedChat peer, TLInt maxDate, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendEncryptedServiceAsync(TLInputEncryptedChat peer, TLLong randomId, TLString data, Action<TLSentEncryptedMessage> callback, Action<TLRPCError> faultCallback = null);\r\n        void DiscardEncryptionAsync(TLInt chatId, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SetEncryptedTypingAsync(TLInputEncryptedChat peer, TLBool typing, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void GetConfigInformationAsync(Action<string> callback);\r\n        void GetTransportInformationAsync(Action<string> callback);\r\n        void GetUserPhotosAsync(TLInputUserBase userId, TLInt offset, TLLong maxId, TLInt limit, Action<TLPhotosBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetNearestDCAsync(Action<TLNearestDC> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetSupportAsync(Action<TLSupport> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void ResetAuthorizationsAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SetInitState();\r\n\r\n        void PingAsync(TLLong pingId, Action<TLPong> callback, Action<TLRPCError> faultCallback = null); \r\n        void PingDelayDisconnectAsync(TLLong pingId, TLInt disconnectDelay, Action<TLPong> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void SearchAsync(TLString q, TLInt limit, Action<TLContactsFoundBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void CheckUsernameAsync(TLString username, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void UpdateUsernameAsync(TLString username, Action<TLUserBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetAccountTTLAsync(Action<TLAccountDaysTTL> callback, Action<TLRPCError> faultCallback = null);\r\n        void SetAccountTTLAsync(TLAccountDaysTTL ttl, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeleteAccountTTLAsync(TLString reason, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetPrivacyAsync(TLInputPrivacyKeyBase key, Action<TLPrivacyRules> callback, Action<TLRPCError> faultCallback = null);\r\n        void SetPrivacyAsync(TLInputPrivacyKeyBase key, TLVector<TLInputPrivacyRuleBase> rules, Action<TLPrivacyRules> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetStatusesAsync(Action<TLVector<TLContactStatusBase>> callback, Action<TLRPCError> faultCallback = null);\r\n        void UpdateTransportInfoAsync(TLDCOption78 dcOption, TLString ipAddress, TLInt port, Action<bool> callback);\r\n        void CheckAndUpdateTransportInfoAsync(TLInt dcId, TLString host, TLInt port, Action callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void ResolveUsernameAsync(TLString username, Action<TLResolvedPeer> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendChangePhoneCodeAsync(TLString phoneNumber, TLString currentNumber, Action<TLSentCodeBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ChangePhoneAsync(TLString phoneNumber, TLString phoneCodeHash, TLString phoneCode, Action<TLUserBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetWallpapersAsync(Action<TLVector<TLWallPaperBase>> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetAllStickersAsync(TLString hash, Action<TLAllStickersBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetMaskStickersAsync(TLString hash, Action<TLAllStickersBase> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void UpdateDeviceLockedAsync(TLInt period, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        void GetSendingQueueInfoAsync(Action<string> callback);\r\n        void GetSyncErrorsAsync(Action<ExceptionInfo, IList<ExceptionInfo>> callback);\r\n        void GetMessagesAsync(TLVector<TLInputMessageBase> id, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        // users\r\n        void GetFullUserAsync(TLInputUserBase id, Action<TLUserFull> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetUsersAsync(TLVector<TLInputUserBase> id, Action<TLVector<TLUserBase>> callback, Action<TLRPCError> faultCallback = null);\r\n        void SetSecureValueErrorsAsync(TLInputUserBase id, TLVector<TLSecureValueErrorBase> errors, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        // messages\r\n        void GetRecentLocationsAsync(TLInputPeerBase peer, TLInt limit, TLInt hash, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetFeaturedStickersAsync(bool full, TLInt hash, Action<TLFeaturedStickersBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetArchivedStickersAsync(bool full, TLLong offsetId, TLInt limit, Action<TLArchivedStickers> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReadFeaturedStickersAsync(TLVector<TLLong> id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetAllDraftsAsync(Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void SaveDraftAsync(TLInputPeerBase peer, TLDraftMessageBase draft, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetInlineBotResultsAsync(TLInputUserBase bot, TLInputPeerBase peer, TLInputGeoPointBase geoPoint, TLString query, TLString offset, Action<TLBotResults> callback, Action<TLRPCError> faultCallback = null);\r\n        void SetInlineBotResultsAsync(TLBool gallery, TLBool pr, TLLong queryId, TLVector<TLInputBotInlineResult> results, TLInt cacheTime, TLString nextOffset, TLInlineBotSwitchPM switchPM, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendInlineBotResultAsync(TLMessage45 message, Action<TLMessageCommon> callback, Action fastCallback, Action<TLRPCError> faultCallback = null);\r\n        void GetDocumentByHashAsync(TLString sha256, TLInt size, TLString mimeType, Action<TLDocumentBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void SearchGifsAsync(TLString q, TLInt offset, Action<TLFoundGifs> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetSavedGifsAsync(TLInt hash, Action<TLSavedGifsBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void SaveGifAsync(TLInputDocumentBase id, TLBool unsave, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReorderStickerSetsAsync(bool masks, TLVector<TLLong> order, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SearchGlobalAsync(TLString query, TLInt offsetDate, TLInputPeerBase offsetPeer, TLInt offsetId, TLInt limit, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReportSpamAsync(TLInputPeerBase peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendMessageAsync(TLMessage36 message, Action<TLMessageCommon> callback, Action fastCallback, Action<TLRPCError> faultCallback = null);\r\n        void SendMediaAsync(TLInputPeerBase inputPeer, TLInputMediaBase inputMedia, TLMessage34 message, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void StartBotAsync(TLInputUserBase bot, TLString startParam, TLMessage25 message, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendBroadcastAsync(TLVector<TLInputUserBase> contacts, TLInputMediaBase inputMedia, TLMessage25 message, Action<TLUpdatesBase> callback, Action fastCallback, Action<TLRPCError> faultCallback = null);\r\n        void ForwardMessageAsync(TLInputPeerBase peer, TLInt fwdMessageId, TLMessage25 message, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ForwardMessagesAsync(TLInputPeerBase toPeer, TLVector<TLInt> id, IList<TLMessage25> messages, bool withMyScore, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ForwardMessagesAsync(TLMessage25 commentMessage, TLInputPeerBase toPeer, TLVector<TLInt> id, IList<TLMessage25> messages, bool withMyScore, Action<TLUpdatesBase[]> callback, Action<TLRPCError> faultCallback = null);\r\n        void CreateChatAsync(TLVector<TLInputUserBase> users, TLString title, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void EditChatTitleAsync(TLInt chatId, TLString title, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void EditChatPhotoAsync(TLInt chatId, TLInputChatPhotoBase photo, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void AddChatUserAsync(TLInt chatId, TLInputUserBase userId, TLInt fwdLimit, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeleteChatUserAsync(TLInt chatId, TLInputUserBase userId, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetWebPagePreviewAsync(TLString message, Action<TLMessageMediaBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ExportChatInviteAsync(TLInt chatId, Action<TLExportedChatInvite> callback, Action<TLRPCError> faultCallback = null);\r\n        void CheckChatInviteAsync(TLString hash, Action<TLChatInviteBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ImportChatInviteAsync(TLString hash, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetStickerSetAsync(TLInputStickerSetBase stickerset, Action<TLMessagesStickerSet> callback, Action<TLRPCError> faultCallback = null);\r\n        void InstallStickerSetAsync(TLInputStickerSetBase stickerset, TLBool archived, Action<TLStickerSetInstallResultBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void UninstallStickerSetAsync(TLInputStickerSetBase stickerset, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void HideReportSpamAsync(TLInputPeerBase peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetPeerSettingsAsync(TLInputPeerBase peer, Action<TLPeerSettings> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetBotCallbackAnswerAsync(TLInputPeerBase peer, TLInt messageId, TLString data, TLBool game, Action<TLBotCallbackAnswer> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetPromoDialogAsync(TLInputPeerBase peer, Action<TLPeerDialogs> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetRecentStickersAsync(bool attached, TLInt hash, Action<TLRecentStickersBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ClearRecentStickersAsync(bool attached, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetUnusedStickersAsync(TLInt limit, Action<TLVector<TLStickerSetCoveredBase>> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetAttachedStickersAsync(bool full, TLInputStickeredMediaBase media, Action<TLArchivedStickers> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetCommonChatsAsync(TLInputUserBase user, TLInt maxId, TLInt limit, Action<TLChatsBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetWebPageAsync(TLString url, TLInt hash, Action<TLWebPageBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetPinnedDialogsAsync(Action<TLPeerDialogs> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReorderPinnedDialogsAsync(bool force, TLVector<TLInputDialogPeerBase> order, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void ToggleDialogPinAsync(bool pinned, TLPeerBase peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);  \r\n        void GetFavedStickersAsync(TLInt hash, Action<TLFavedStickersBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void FaveStickerAsync(TLInputDocumentBase id, TLBool unfave, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetUnreadMentionsAsync(TLInputPeerBase peer, TLInt offsetId, TLInt addOffset, TLInt limit, TLInt maxId, TLInt minId, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void UploadMediaAsync(TLInputPeerBase inputPeer, TLInputMediaBase inputMedia, Action<TLMessageMediaBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendMultiMediaAsync(TLInputPeerBase inputPeer, TLVector<TLInputSingleMedia> inputMedia, TLMessage25 message, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetStickersAsync(TLString emoticon, TLInt hash, Action<TLStickersBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReportAsync(TLInputPeerBase peer, TLVector<TLInt> id, TLInputReportReasonBase reason, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SearchStickerSetsAsync(bool full, bool excludeFeatured, TLString q, TLInt hash, Action<TLFoundStickerSetsBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetPeerDialogsAsync(TLInputPeerBase peer, Action<TLPeerDialogs> callback, Action<TLRPCError> faultCallback = null);\r\n        void MarkDialogUnreadAsync(bool unread, TLInputDialogPeer peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetDialogUnreadMarksAsync(Action<TLVector<TLDialogPeerBase>> callback, Action<TLRPCError> faultCallback = null);\r\n        void ToggleTopPeersAsync(TLBool enabled, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void ClearAllDraftsAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        // contacts\r\n        void DeleteContactAsync(TLInputUserBase id, Action<TLLinkBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeleteContactsAsync(TLVector<TLInputUserBase> id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetTopPeersAsync(GetTopPeersFlags flags, TLInt offset, TLInt limit, TLInt hash, Action<TLTopPeersBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ResetTopPeerRatingAsync(TLTopPeerCategoryBase category, TLInputPeerBase peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void ResetSavedAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetSavedAsync(Action<TLVector<TLSavedPhoneContact>> callback, Action<TLRPCError> faultCallback = null);\r\n        \r\n        // channels\r\n        void GetChannelHistoryAsync(string debugInfo, TLInputPeerBase inputPeer, TLPeerBase peer, bool sync, TLInt offset, TLInt maxId, TLInt limit, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null);   \r\n        void GetMessagesAsync(TLInputChannelBase inputChannel, TLVector<TLInputMessageBase> id, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void UpdateChannelAsync(TLInt channelId, Action<TLMessagesChatFull> callback, Action<TLRPCError> faultCallback = null);\r\n        void EditAdminAsync(TLChannel channel, TLInputUserBase userId, TLChannelAdminRights adminRights, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void KickFromChannelAsync(TLChannel channel, TLInputUserBase userId, TLBool kicked, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetParticipantAsync(TLInputChannelBase inputChannel, TLInputUserBase userId, Action<TLChannelsChannelParticipant> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetParticipantsAsync(TLInputChannelBase inputChannel, TLChannelParticipantsFilterBase filter, TLInt offset, TLInt limit, TLInt hash, Action<TLChannelParticipantsBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void EditTitleAsync(TLChannel channel, TLString title, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void EditAboutAsync(TLChannel channel, TLString about, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void EditPhotoAsync(TLChannel channel, TLInputChatPhotoBase photo, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void JoinChannelAsync(TLChannel channel, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void LeaveChannelAsync(TLChannel channel, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeleteChannelAsync(TLChannel channel, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void InviteToChannelAsync(TLInputChannelBase channel, TLVector<TLInputUserBase> users, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetFullChannelAsync(TLInputChannelBase channel, Action<TLMessagesChatFull> callback, Action<TLRPCError> faultCallback = null);\r\n        void CreateChannelAsync(TLInt flags, TLString title, TLString about, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ExportInviteAsync(TLInputChannelBase channel, Action<TLExportedChatInvite> callback, Action<TLRPCError> faultCallback = null);\r\n        void CheckUsernameAsync(TLInputChannelBase channel, TLString username, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void UpdateUsernameAsync(TLInputChannelBase channel, TLString username, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetChannelDialogsAsync(TLInt offset, TLInt limit, Action<TLDialogsBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetImportantHistoryAsync(TLInputChannelBase channel, TLPeerBase peer, bool sync, TLInt offsetId, TLInt addOffset, TLInt limit, TLInt maxId, TLInt minId, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReadHistoryAsync(TLChannel channel, TLInt maxId, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeleteMessagesAsync(TLInputChannelBase channel, TLVector<TLInt> id, Action<TLAffectedMessages> callback, Action<TLRPCError> faultCallback = null);\r\n        void ToggleInvitesAsync(TLInputChannelBase channel, TLBool enabled, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ExportMessageLinkAsync(TLInputChannelBase channel, TLInt id, Action<TLExportedMessageLink> callback, Action<TLRPCError> faultCallback = null);\r\n        void ToggleSignaturesAsync(TLInputChannelBase channel, TLBool enabled, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetMessageEditDataAsync(TLInputPeerBase peer, TLInt id, Action<TLMessageEditData> callback, Action<TLRPCError> faultCallback = null);\r\n        void EditMessageAsync(TLInputPeerBase peer, TLInt id, TLString message, TLVector<TLMessageEntityBase> entities, TLInputMediaBase media, TLReplyKeyboardBase replyMarkup, bool noWebPage, bool stopGeoLive, TLInputGeoPointBase geoPoint, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void UpdatePinnedMessageAsync(bool silent, TLInputChannelBase channel, TLInt id, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReportSpamAsync(TLInputChannelBase channel, TLInt userId, TLVector<TLInt> id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeleteUserHistoryAsync(TLChannel channel, TLInputUserBase userId, Action<TLAffectedHistory> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetAdminedPublicChannelsAsync(Action<TLChatsBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReadMessageContentsAsync(TLInputChannelBase channel, TLVector<TLInt> id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SetStickersAsync(TLInputChannelBase channel, TLInputStickerSetBase stickerset, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void TogglePreHistoryHiddenAsync(TLInputChannelBase channel, TLBool enabled, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeleteHistoryAsync(TLInputChannelBase channel, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SetFeedBroadcastsAsync(TLInt feedId, TLVector<TLInputChannelBase> channels, TLBool alsoNewlyJoined, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ChangeFeedBroadcastAsync(TLInputChannelBase channel, TLInt feedId, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetFeedAsync(bool offsetToMaxReed, TLInt feedId, TLFeedPosition offsetPosition, TLInt addOffset, TLInt limit, TLFeedPosition maxPosition, TLFeedPosition minPosition, TLInt hash, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReadFeedAsync(TLInt feedId, TLFeedPosition maxPosition, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        // updates\r\n        void GetChannelDifferenceAsync(bool force, TLInputChannelBase inputChannel, TLChannelMessagesFilerBase filter, TLInt pts, TLInt limit, Action<TLChannelDifferenceBase> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        // admins\r\n        void ToggleChatAdminsAsync(TLInt chatId, TLBool enabled, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void EditChatAdminAsync(TLInt chatId, TLInputUserBase userId, TLBool isAdmin, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeactivateChatAsync(TLInt chatId, TLBool enabled, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void MigrateChatAsync(TLInt chatId, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        // account\r\n        void ReportPeerAsync(TLInputPeerBase peer, TLInputReportReasonBase reason, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeleteAccountAsync(TLString reason, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetAuthorizationsAsync(Action<TLAccountAuthorizations> callback, Action<TLRPCError> faultCallback = null);\r\n        void ResetAuthorizationAsync(TLLong hash, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetPasswordAsync(Action<TLPasswordBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetPasswordSettingsAsync(TLInputCheckPasswordBase password, Action<TLPasswordSettings> callback, Action<TLRPCError> faultCallback = null);\r\n        void UpdatePasswordSettingsAsync(TLInputCheckPasswordBase password, TLPasswordInputSettings newSettings, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void CheckPasswordAsync(TLInputCheckPasswordBase password, Action<TLAuthorization> callback, Action<TLRPCError> faultCallback = null);\r\n        void RequestPasswordRecoveryAsync(Action<TLPasswordRecovery> callback, Action<TLRPCError> faultCallback = null);\r\n        void RecoverPasswordAsync(TLString code, Action<TLAuthorization> callback, Action<TLRPCError> faultCallback = null);\r\n        void ConfirmPhoneAsync(TLString phoneCodeHash, TLString phoneCode, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendConfirmPhoneCodeAsync(TLString hash, TLBool currentNumber, Action<TLSentCodeBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetTmpPasswordAsync(TLInputCheckPasswordBase password, TLInt period, Action<TLTmpPassword> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetWebAuthorizationsAsync(Action<TLWebAuthorizations> callback, Action<TLRPCError> faultCallback = null);\r\n        void ResetWebAuthorizationAsync(TLLong hash, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void ResetWebAuthorizationsAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetAllSecureValuesAsync(Action<TLVector<TLSecureValue>> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetSecureValueAsync(TLVector<TLSecureValueTypeBase> types, Action<TLVector<TLSecureValue>> callback, Action<TLRPCError> faultCallback = null);\r\n        void SaveSecureValueAsync(TLInputSecureValue value, TLLong secureSecretId, Action<TLSecureValue> callback, Action<TLRPCError> faultCallback = null);\r\n        void DeleteSecureValueAsync(TLVector<TLSecureValueTypeBase> types, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetAuthorizationFormAsync(TLInt botId, TLString scope, TLString publicKey, Action<TLAuthorizationForm> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetAuthorizationFormAndPassportConfigAsync(TLInt botId, TLString scope, TLString publicKey, TLInt passportSettingsHash, Action<TLAuthorizationForm, TLPassportConfigBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void AcceptAuthorizationAsync(TLInt botId, TLString scope, TLString publicKey, TLVector<TLSecureValueHash> valueHashes, TLSecureCredentialsEncrypted credentials, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendVerifyPhoneCodeAsync(TLString phoneNumber, TLBool currentNumber, Action<TLSentCodeBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void VerifyPhoneAsync(TLString phoneNumber, TLString phoneCodeHash, TLString phoneCode, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendVerifyEmailCodeAsync(TLString email, Action<TLSentEmailCode> callback, Action<TLRPCError> faultCallback = null);\r\n        void VerifyEmailAsync(TLString email, TLString code, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void InitTakeoutSessionAsync(bool contacts, bool messageUsers, bool messageChats, bool messageMegagroups, bool messageChannels, bool files, TLInt fileMaxSize, TLLong takeoutId, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetPassportDataAsync(Action<TLPasswordBase, IList<TLSecureValue>> callback, Action<TLRPCError> faultCallback = null); \r\n\r\n        // help\r\n        void GetAppChangelogAsync(TLString deviceModel, TLString systemVersion, TLString appVersion, TLString langCode, Action<TLAppChangelogBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetTermsOfServiceAsync(TLString countryISO2, Action<TLTermsOfService> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetCdnConfigAsync(Action<TLCdnConfig> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetProxyDataAsync(Action<TLProxyDataBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetDeepLinkInfoAsync(TLString path, Action<TLDeepLinkInfoBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetPassportConfigAsync(TLInt hash, Action<TLPassportConfigBase> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        // upload\r\n        void GetCdnFileAsync(TLInt dcId, TLString fileToken, TLInt offset, TLInt limit, Action<TLCdnFileBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReuploadCdnFileAsync(TLInt dcId, TLString fileToken, TLString requestToken, Action<TLVector<TLFileHash>> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        // encrypted chats\r\n        void RekeyAsync(TLEncryptedChatBase chat, Action<TLLong> callback);\r\n\r\n        // phone\r\n        void GetCallConfigAsync(Action<TLDataJSON> callback, Action<TLRPCError> faultCallback = null);\r\n        void RequestCallAsync(TLInputUserBase userId, TLInt randomId, TLString gaHash, TLPhoneCallProtocol protocol, Action<TLPhonePhoneCall> callback, Action<TLRPCError> faultCallback = null);\r\n        void AcceptCallAsync(TLInputPhoneCall peer, TLString gb, TLPhoneCallProtocol protocol, Action<TLPhonePhoneCall> callback, Action<TLRPCError> faultCallback = null);\r\n        void ConfirmCallAsync(TLInputPhoneCall peer, TLString ga, TLLong keyFingerprint, TLPhoneCallProtocol protocol, Action<TLPhonePhoneCall> callback, Action<TLRPCError> faultCallback = null);\r\n        void ReceivedCallAsync(TLInputPhoneCall peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        void DiscardCallAsync(TLInputPhoneCall peer, TLInt duration, TLPhoneCallDiscardReasonBase reason, TLLong connectionId, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void SetCallRatingAsync(TLInputPhoneCall peer, TLInt rating, TLString comment, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void SaveCallDebugAsync(TLInputPhoneCall peer, TLDataJSON debug, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n        \r\n        // payments\r\n        void GetPaymentReceiptAsync(TLInt msgId, Action<TLPaymentReceipt> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetPaymentFormAsync(TLInt msgId, Action<TLPaymentForm> callback, Action<TLRPCError> faultCallback = null);\r\n        void SendPaymentFormAsync(TLInt msgId, TLString requestedInfoId, TLString shippingOptionId, TLInputPaymentCredentialsBase credentials, Action<TLPaymentResultBase> callback, Action<TLRPCError> faultCallback = null);\r\n        void ValidateRequestedInfoAsync(bool save, TLInt msgId, TLPaymentRequestedInfo info, Action<TLValidatedRequestedInfo> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetSavedInfoAsync(Action<TLSavedInfo> callback, Action<TLRPCError> faultCallback = null);\r\n        void ClearSavedInfoAsync(bool credentials, bool info, Action<TLBool> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        // langpack\r\n        void GetLangPackAsync(TLString langCode, Action<TLLangPackDifference> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetStringsAsync(TLString langCode, TLVector<TLString> keys, Action<TLVector<TLLangPackStringBase>> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetDifferenceAsync(TLInt fromVersion, Action<TLLangPackDifference> callback, Action<TLRPCError> faultCallback = null);\r\n        void GetLanguagesAsync(Action<TLVector<TLLangPackLanguage>> callback, Action<TLRPCError> faultCallback = null);\r\n        \r\n        // proxy\r\n        void PingProxyAsync(TLProxyBase proxy, Action<TLInt> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        // background task\r\n        void SendActionsAsync(List<TLObject> actions, Action<TLObject, TLObject> callback, Action<TLRPCError> faultCallback = null);\r\n        void ClearQueue();\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Account.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Threading;\r\n#if WIN_RT\r\nusing Windows.Data.Xml.Dom;\r\n#if WNS_PUSH_SERVICE\r\nusing Windows.UI.Notifications;\r\n#endif\r\n#endif\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Account;\r\nusing Telegram.Api.TL.Functions.Account;\r\nusing Telegram.Api.TL.Functions.Help;\r\nusing TLUpdateUserName = Telegram.Api.TL.Account.TLUpdateUserName;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n\tpublic partial class MTProtoService\r\n\t{\r\n\t    public event EventHandler CheckDeviceLocked;\r\n\r\n\t    protected virtual void RaiseCheckDeviceLocked()\r\n\t    {\r\n\t        var handler = CheckDeviceLocked;\r\n\t        if (handler != null) handler(this, EventArgs.Empty);\r\n\t    }\r\n\r\n\t    private void CheckDeviceLockedInternal(object state)\r\n        {\r\n            RaiseCheckDeviceLocked();\r\n        }\r\n\r\n        public void ReportPeerAsync(TLInputPeerBase peer, TLInputReportReasonBase reason, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReportPeer { Peer = peer, Reason = reason };\r\n\r\n            SendInformativeMessage(\"account.reportPeer\", obj, callback, faultCallback);\r\n        }\r\n\r\n\t    public void DeleteAccountAsync(TLString reason, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLDeleteAccount { Reason = reason };\r\n\r\n            SendInformativeMessage(\"account.deleteAccount\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n        public void UpdateDeviceLockedAsync(TLInt period, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLUpdateDeviceLocked{ Period = period };\r\n\r\n            SendInformativeMessage(\"account.updateDeviceLocked\", obj, callback, faultCallback);\r\n        }\r\n\r\n\t    public void GetWallpapersAsync(Action<TLVector<TLWallPaperBase>> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLGetWallPapers();\r\n\r\n            SendInformativeMessage(\"account.getWallpapers\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n        public void SendChangePhoneCodeAsync(TLString phoneNumber, TLString currentNumber, Action<TLSentCodeBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSendChangePhoneCode { Flags = new TLInt(0), PhoneNumber = phoneNumber, CurrentNumber = currentNumber };\r\n\r\n            SendInformativeMessage(\"account.sendChangePhoneCode\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ChangePhoneAsync(TLString phoneNumber, TLString phoneCodeHash, TLString phoneCode, Action<TLUserBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLChangePhone { PhoneNumber = phoneNumber, PhoneCodeHash = phoneCodeHash, PhoneCode = phoneCode };\r\n\r\n            SendInformativeMessage<TLUserBase>(\"account.changePhone\", obj, user => _cacheService.SyncUser(user, callback.SafeInvoke), faultCallback);\r\n        }\r\n\r\n        public void RegisterDeviceAsync(TLInt tokenType, TLString token, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            if (_activeTransport.AuthKey == null)\r\n            {\r\n                faultCallback.SafeInvoke(new TLRPCError\r\n                {\r\n                    Code = new TLInt(404),\r\n                    Message = new TLString(\"Service is not initialized to register device\")\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            var obj = new TLRegisterDevice\r\n            {\r\n                //TokenType = new TLInt(3),   // MPNS\r\n                //TokenType = new TLInt(8),   // WNS\r\n                //TokenType = new TLInt(11),  // MPNS raw\r\n                TokenType = tokenType,\r\n                Token = token,\r\n                AppSandbox = TLBool.False,\r\n                Secret = TLString.Empty,\r\n                OtherUids = new TLVector<TLInt>()\r\n            };\r\n\r\n            const string methodName = \"account.registerDevice\";\r\n            Logs.Log.Write(string.Format(\"{0} {1}\", methodName, obj));\r\n            SendInformativeMessage<TLBool>(methodName, obj,\r\n                result =>\r\n                {\r\n                    Logs.Log.Write(string.Format(\"{0} result={1}\", methodName, result));\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                error =>\r\n                {\r\n                    Logs.Log.Write(string.Format(\"{0} error={1}\", methodName, error));\r\n\r\n                    faultCallback.SafeInvoke(error);\r\n                });\r\n        }\r\n\r\n        public void UnregisterDeviceAsync(TLInt tokenType, TLString token, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLUnregisterDevice\r\n            {\r\n                //TokenType = new TLInt(3),   // MPNS\r\n                //TokenType = new TLInt(8),   // WNS\r\n                TokenType = tokenType,\r\n                Token = token\r\n            };\r\n\r\n            const string methodName = \"account.unregisterDevice\";\r\n            Logs.Log.Write(string.Format(\"{0} {1}\", methodName, obj));\r\n            SendInformativeMessage<TLBool>(\"account.unregisterDevice\", obj,\r\n                result =>\r\n                {\r\n                    Logs.Log.Write(string.Format(\"{0} result={1}\", methodName, result));\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                error =>\r\n                {\r\n                    Logs.Log.Write(string.Format(\"{0} error={1}\", methodName, error));\r\n\r\n                    faultCallback.SafeInvoke(error);\r\n                });\r\n        }\r\n\r\n        public void GetNotifySettingsAsync(TLInputNotifyPeerBase peer, Action<TLPeerNotifySettingsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetNotifySettings{ Peer = peer };\r\n\r\n            SendInformativeMessage(\"account.getNotifySettings\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ResetNotifySettingsAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            Execute.ShowDebugMessage(string.Format(\"account.resetNotifySettings\"));\r\n\r\n            var obj = new TLResetNotifySettings();\r\n\r\n            SendInformativeMessage(\"account.resetNotifySettings\", obj, callback, faultCallback);\r\n        }\r\n\r\n\t    public void UpdateNotifySettingsAsync(TLInputNotifyPeerBase peer, TLInputPeerNotifySettings settings, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            //Execute.ShowDebugMessage(string.Format(\"account.updateNotifySettings peer=[{0}] settings=[{1}]\", peer, settings));\r\n\r\n            var obj = new TL.Functions.Account.TLUpdateNotifySettings { Peer = peer, Settings = settings };\r\n\r\n            SendInformativeMessage(\"account.updateNotifySettings\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void UpdateProfileAsync(TLString firstName, TLString lastName, TLString about, Action<TLUserBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLUpdateProfile { FirstName = firstName, LastName = lastName, About = about };\r\n\r\n            SendInformativeMessage<TLUserBase>(\"account.updateProfile\", obj, result => _cacheService.SyncUser(result, callback), faultCallback);\r\n        }\r\n\r\n        public void UpdateStatusAsync(TLBool offline, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            if (_activeTransport.AuthKey == null) return;\r\n\r\n#if WIN_RT\r\n            if (_deviceInfo != null && _deviceInfo.IsBackground)\r\n            {\r\n                var message = string.Format(\"::{0} {1} account.updateStatus {2}\", _deviceInfo.BackgroundTaskName, _deviceInfo.BackgroundTaskId, offline);\r\n                Logs.Log.Write(message);\r\n#if DEBUG && WNS_PUSH_SERVICE\r\n                AddToast(\"task\", message);\r\n#endif\r\n            }\r\n#endif\r\n            \r\n            TLObject obj = null;\r\n            if (_deviceInfo != null && _deviceInfo.IsBackground)\r\n            {\r\n                obj = new TLInvokeWithoutUpdates {Object = new TLUpdateStatus {Offline = offline}};\r\n            }\r\n            else\r\n            {\r\n                obj = new TLUpdateStatus { Offline = offline };\r\n            }\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"account.updateStatus offline=\" + offline.Value);\r\n            SendInformativeMessage(\"account.updateStatus\", obj, callback, faultCallback);\r\n        }\r\n#if WIN_RT && WNS_PUSH_SERVICE\r\n        public static void AddToast(string caption, string message)\r\n        {\r\n            var toastNotifier = ToastNotificationManager.CreateToastNotifier();\r\n\r\n            var toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);\r\n            SetText(toastXml, caption, message);\r\n\r\n            try\r\n            {\r\n                var toast = new ToastNotification(toastXml);\r\n                //RemoveToastGroup(group);\r\n                toastNotifier.Show(toast);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Logs.Log.Write(ex.ToString());\r\n            }\r\n        }\r\n\r\n        private static void SetText(XmlDocument document, string caption, string message)\r\n        {\r\n            var toastTextElements = document.GetElementsByTagName(\"text\");\r\n            toastTextElements[0].InnerText = caption ?? string.Empty;\r\n            toastTextElements[1].InnerText = message ?? string.Empty;\r\n        }\r\n#endif\r\n\r\n\t    public void CheckUsernameAsync(TLString username, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLCheckUsername { Username = username };\r\n\r\n            SendInformativeMessage(\"account.checkUsername\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n\t    public void UpdateUsernameAsync(TLString username, Action<TLUserBase> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLUpdateUserName { Username = username };\r\n\r\n            SendInformativeMessage(\"account.updateUsername\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n\t    public void GetAccountTTLAsync(Action<TLAccountDaysTTL> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLGetAccountTTL();\r\n\r\n            SendInformativeMessage(\"account.getAccountTTL\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n        public void SetAccountTTLAsync(TLAccountDaysTTL ttl, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSetAccountTTL{TTL = ttl};\r\n\r\n            SendInformativeMessage(\"account.setAccountTTL\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void DeleteAccountTTLAsync(TLString reason, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteAccount { Reason = reason };\r\n\r\n            SendInformativeMessage(\"account.deleteAccount\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetPrivacyAsync(TLInputPrivacyKeyBase key, Action<TLPrivacyRules> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetPrivacy { Key = key };\r\n\r\n            SendInformativeMessage(\"account.getPrivacy\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SetPrivacyAsync(TLInputPrivacyKeyBase key, TLVector<TLInputPrivacyRuleBase> rules, Action<TLPrivacyRules> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSetPrivacy { Key = key, Rules = rules };\r\n\r\n            SendInformativeMessage(\"account.setPrivacy\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetAuthorizationsAsync(Action<TLAccountAuthorizations> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetAuthorizations();\r\n\r\n            SendInformativeMessage(\"account.getAuthorizations\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ResetAuthorizationAsync(TLLong hash, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLResetAuthorization { Hash = hash };\r\n\r\n            SendInformativeMessage(\"account.resetAuthorization\", obj, callback, faultCallback);\r\n        }\r\n\r\n\t    public void GetPasswordAsync(Action<TLPasswordBase> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLGetPassword();\r\n\r\n            SendInformativeMessage(\"account.getPassword\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n        public void GetTmpPasswordAsync(TLInputCheckPasswordBase password, TLInt period, Action<TLTmpPassword> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetTmpPassword{ Password = password, Period = period };\r\n\r\n            SendInformativeMessage(\"account.getTmpPassword\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetPasswordSettingsAsync(TLInputCheckPasswordBase password, Action<TLPasswordSettings> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetPasswordSettings { Password = password };\r\n\r\n            SendInformativeMessage(\"account.getPasswordSettings\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void UpdatePasswordSettingsAsync(TLInputCheckPasswordBase password, TLPasswordInputSettings newSettings, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLUpdatePasswordSettings { Password = password, NewSettings = newSettings };\r\n\r\n            SendInformativeMessage(\"account.updatePasswordSettings\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n\t    public void CheckPasswordAsync(TLInputCheckPasswordBase password, Action<TLAuthorization> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLCheckPassword { Password = password };\r\n\r\n            SendInformativeMessage(\"account.checkPassword\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n\t    public void RequestPasswordRecoveryAsync(Action<TLPasswordRecovery> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLRequestPasswordRecovery();\r\n\r\n            SendInformativeMessage(\"account.requestPasswordRecovery\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n\t    public void RecoverPasswordAsync(TLString code, Action<TLAuthorization> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n\t        var obj = new TLRecoverPassword {Code = code};\r\n\r\n            SendInformativeMessage(\"account.recoverPassword\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n\t    public void ConfirmPhoneAsync(TLString phoneCodeHash, TLString phoneCode, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLConfirmPhone { PhoneCodeHash = phoneCodeHash, PhoneCode = phoneCode };\r\n\r\n            SendInformativeMessage(\"account.confirmPhone\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n\t    public void SendConfirmPhoneCodeAsync(TLString hash, TLBool currentNumber, Action<TLSentCodeBase> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLSendConfirmPhoneCode { Flags = new TLInt(0), Hash = hash, CurrentNumber = currentNumber };\r\n\r\n            SendInformativeMessage(\"account.sendConfirmPhoneCode\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetWebAuthorizationsAsync(Action<TLWebAuthorizations> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetWebAuthorizations();\r\n\r\n            SendInformativeMessage(\"account.getWebAuthorizations\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ResetWebAuthorizationAsync(TLLong hash, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLResetWebAuthorization { Hash = hash };\r\n\r\n            SendInformativeMessage(\"account.resetWebAuthorization\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ResetWebAuthorizationsAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLResetWebAuthorizations();\r\n\r\n            SendInformativeMessage(\"account.resetWebAuthorizations\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetAllSecureValuesAsync(Action<TLVector<TLSecureValue>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetAllSecureValues();\r\n\r\n            SendInformativeMessage<TLObject>(\"account.getAllSecureValues\", obj,\r\n                result =>\r\n                {\r\n                    var vector = result as TLVector<TLSecureValue>;\r\n                    if (vector != null)\r\n                    {\r\n                        callback.SafeInvoke(vector);\r\n                    }\r\n                    else\r\n                    {\r\n                        callback.SafeInvoke(new TLVector<TLSecureValue>());\r\n                    }\r\n                }, \r\n                faultCallback);\r\n        }\r\n\r\n\t    public void GetPassportDataAsync(Action<TLPasswordBase, IList<TLSecureValue>> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n\t        var requests = new TLObject[]\r\n\t        {\r\n\t            new TLGetPassword(), \r\n                new TLGetAllSecureValues()\r\n\t        };\r\n            var returnValue = new TLObject[2];\r\n\t        GetPassportRequestsInternal(\r\n                requests,\r\n\t            result =>\r\n\t            {\r\n\t                bool completed;\r\n                    lock (returnValue)\r\n                    {\r\n                        if (result is TLPasswordBase) returnValue[0] = result;\r\n                        if (result is IList<TLSecureValue>) returnValue[1] = result;\r\n                        else if (result is IList<TLInt>) returnValue[1] = new TLVector<TLSecureValue>();\r\n                        completed = returnValue[0] != null && returnValue[1] != null;\r\n                    }\r\n\r\n                    if (completed)\r\n                    {\r\n                        callback.SafeInvoke(returnValue[0] as TLPasswordBase, returnValue[1] as IList<TLSecureValue>);\r\n                    }\r\n\t            },\r\n\t            faultCallback.SafeInvoke);\r\n\t    }\r\n\r\n        private void GetPassportRequestsInternal(TLObject[] requests, Action<TLObject> getResultCallback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var container = new TLContainer { Messages = new List<TLContainerTransportMessage>() };\r\n            var historyItems = new List<HistoryItem>();\r\n\r\n            for (var i = 0; i < requests.Length; i++)\r\n            {\r\n                var obj = requests[i];\r\n                int sequenceNumber;\r\n                TLLong messageId;\r\n                lock (_activeTransportRoot)\r\n                {\r\n                    sequenceNumber = _activeTransport.SequenceNumber * 2 + 1;\r\n                    _activeTransport.SequenceNumber++;\r\n                    messageId = _activeTransport.GenerateMessageId(true);\r\n                }\r\n\r\n                var data = i > 0 ? new TLInvokeAfterMsg { MsgId = container.Messages[i - 1].MessageId, Object = obj } : obj;\r\n\r\n                var transportMessage = new TLContainerTransportMessage\r\n                {\r\n                    MessageId = messageId,\r\n                    SeqNo = new TLInt(sequenceNumber),\r\n                    MessageData = data\r\n                };\r\n\r\n                var historyItem = new HistoryItem\r\n                {\r\n                    SendTime = DateTime.Now,\r\n                    Caption = \"passport.item\" + i,\r\n                    Object = obj,\r\n                    Message = transportMessage,\r\n                    Callback = getResultCallback,\r\n                    AttemptFailed = null,\r\n                    FaultCallback = faultCallback,\r\n                    ClientTicksDelta = ClientTicksDelta,\r\n                    Status = RequestStatus.Sent,\r\n                };\r\n                historyItems.Add(historyItem);\r\n\r\n                container.Messages.Add(transportMessage);\r\n            }\r\n\r\n            lock (_historyRoot)\r\n            {\r\n                foreach (var item in historyItems)\r\n                {\r\n                    _history[item.Hash] = item;\r\n                }\r\n            }\r\n#if DEBUG\r\n            NotifyOfPropertyChange(() => History);\r\n#endif\r\n            \r\n            SendNonInformativeMessage<TLObject>(\"passport.container\", container,\r\n                result =>\r\n                {\r\n                    \r\n                },\r\n                faultCallback);\r\n\t    }\r\n\r\n        public void GetSecureValueAsync(TLVector<TLSecureValueTypeBase> types, Action<TLVector<TLSecureValue>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetSecureValue { Types = types };\r\n\r\n            SendInformativeMessage(\"account.getSecureValue\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SaveSecureValueAsync(TLInputSecureValue value, TLLong secureSecretHash, Action<TLSecureValue> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSaveSecureValue { Value = value, SecureSecretId = secureSecretHash };\r\n\r\n            SendInformativeMessage(\"account.saveSecureValue\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void DeleteSecureValueAsync(TLVector<TLSecureValueTypeBase> types, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteSecureValue { Types = types };\r\n\r\n            SendInformativeMessage(\"account.deleteSecureValue\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetAuthorizationFormAsync(TLInt botId, TLString scope, TLString publicKey, Action<TLAuthorizationForm> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetAuthorizationForm { BotId = botId, Scope = scope, PublicKey = publicKey };\r\n\r\n            SendInformativeMessage<TLAuthorizationForm>(\"account.getAuthorizationForm\", obj,\r\n                result =>\r\n                {\r\n                    _cacheService.SyncUsers(result.Users, users =>\r\n                    {\r\n                        result.Users = users;\r\n                        callback.SafeInvoke(result);\r\n                    });\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetAuthorizationFormAndPassportConfigAsync(TLInt botId, TLString scope, TLString publicKey, TLInt passportConfigHash, Action<TLAuthorizationForm, TLPassportConfigBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var requests = new TLObject[]\r\n            {\r\n                new TLGetAuthorizationForm\r\n                {\r\n                    BotId = botId,\r\n                    Scope = scope,\r\n                    PublicKey = publicKey\r\n                },\r\n                new TLGetPassportConfig\r\n                {\r\n                    Hash = passportConfigHash\r\n                }\r\n            };\r\n\r\n            var returnValue = new TLObject[2];\r\n            GetPassportRequestsInternal(\r\n                requests,\r\n                result =>\r\n                {\r\n                    bool completed;\r\n                    lock (returnValue)\r\n                    {\r\n                        if (result is TLAuthorizationForm) returnValue[0] = result;\r\n                        if (result is TLPassportConfigBase) returnValue[1] = result;\r\n                        completed = returnValue[0] != null && returnValue[1] != null;\r\n                    }\r\n\r\n                    if (completed)\r\n                    {\r\n                        callback.SafeInvoke(returnValue[0] as TLAuthorizationForm, returnValue[1] as TLPassportConfigBase);\r\n                    }\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void AcceptAuthorizationAsync(TLInt botId, TLString scope, TLString publicKey, TLVector<TLSecureValueHash> valueHashes, TLSecureCredentialsEncrypted credentials, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLAcceptAuthorization { BotId = botId, Scope = scope, PublicKey = publicKey, ValueHashes = valueHashes, Credentials = credentials };\r\n\r\n            SendInformativeMessage(\"account.acceptAuthorization\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SendVerifyPhoneCodeAsync(TLString phoneNumber, TLBool currentNumber, Action<TLSentCodeBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSendVerifyPhoneCode { Flags = new TLInt(0), PhoneNumber = phoneNumber, CurrentNumber = currentNumber };\r\n\r\n            SendInformativeMessage(\"account.sendVerifyPhoneCode\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void VerifyPhoneAsync(TLString phoneNumber, TLString phoneCodeHash, TLString phoneCode, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLVerifyPhone { PhoneNumber = phoneNumber, PhoneCodeHash = phoneCodeHash, PhoneCode = phoneCode };\r\n\r\n            SendInformativeMessage(\"account.verifyPhone\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SendVerifyEmailCodeAsync(TLString email, Action<TLSentEmailCode> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSendVerifyEmailCode { Email = email };\r\n\r\n            SendInformativeMessage(\"account.sendVerifyEmailCode\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void VerifyEmailAsync(TLString email, TLString code, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLVerifyEmail { Email = email, Code = code };\r\n\r\n            SendInformativeMessage(\"account.verifyEmail\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void InitTakeoutSessionAsync(bool contacts, bool messageUsers, bool messageChats, bool messageMegagroups, bool messageChannels, bool files, TLInt fileMaxSize, TLLong takeoutId, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLInitTakeoutSession\r\n            {\r\n                Flags = new TLInt(0),\r\n                Contacts = contacts,\r\n                MessageUsers = messageUsers,\r\n                MessageChats = messageChats,\r\n                MessageMegagroups = messageMegagroups,\r\n                MessageChannels = messageChannels,\r\n                Files = files,\r\n                FileMaxSize = fileMaxSize,\r\n                TakeoutId = takeoutId\r\n            };\r\n\r\n            SendInformativeMessage(\"account.initTakeoutSession\", obj, callback, faultCallback);\r\n        }\r\n\t}\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Auth.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Auth;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n\tpublic partial class MTProtoService\r\n    {\r\n        public void BindTempAuthKeyAsync(TLLong permAuthKeyId, TLLong nonce, TLInt expiresAt, TLString encryptedMessage, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLBindTempAuthKey { PermAuthKeyId = permAuthKeyId, Nonce = nonce, ExpiresAt = expiresAt, EncryptedMessage = encryptedMessage };\r\n\r\n            SendInformativeMessage(\"auth.bindTempAuthKey\", obj, callback, faultCallback);\r\n        }\r\n\r\n\t    public void LogOutAsync(Action callback)\r\n\t    {\r\n\t        _cacheService.ClearAsync(callback);\r\n\r\n            //try to close session\r\n            LogOutAsync(null, null);\r\n\t    }\r\n\r\n        public void CheckPhoneAsync(TLString phoneNumber, Action<TLCheckedPhoneBase> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLCheckPhone { PhoneNumber = phoneNumber };\r\n\r\n            SendInformativeMessage(\"auth.checkPhone\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n        public void SendCodeAsync(TLString phoneNumber, TLString currentNumber, Action<TLSentCodeBase> callback, Action<int> attemptFailed = null, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSendCode\r\n            {\r\n                Flags = new TLInt(0),\r\n                PhoneNumber = phoneNumber,\r\n                CurrentNumber = currentNumber,\r\n                ApiId = new TLInt(Constants.ApiId),\r\n                ApiHash = new TLString(Constants.ApiHash)\r\n            };\r\n\r\n            SendInformativeMessage(\"auth.sendCode\", obj, callback, faultCallback, 3);\r\n        }\r\n\r\n        public void ResendCodeAsync(TLString phoneNumber, TLString phoneCodeHash, Action<TLSentCodeBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLResendCode { PhoneNumber = phoneNumber, PhoneCodeHash = phoneCodeHash };\r\n\r\n            SendInformativeMessage(\"auth.resendCode\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void CancelCodeAsync(TLString phoneNumber, TLString phoneCodeHash, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLCancelCode { PhoneNumber = phoneNumber, PhoneCodeHash = phoneCodeHash };\r\n\r\n            SendInformativeMessage(\"auth.cancelCode\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SendCallAsync(TLString phoneNumber, TLString phoneCodeHash, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSendCall { PhoneNumber = phoneNumber, PhoneCodeHash = phoneCodeHash };\r\n\r\n            SendInformativeMessage(\"auth.sendCall\", obj, callback, faultCallback);\r\n        }\r\n\r\n\t    public void SignUpAsync(TLString phoneNumber, TLString phoneCodeHash, TLString phoneCode, TLString firstName, TLString lastName, Action<TLAuthorization> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLSignUp { PhoneNumber = phoneNumber, PhoneCodeHash = phoneCodeHash, PhoneCode = phoneCode, FirstName = firstName, LastName = lastName };\r\n\r\n            SendInformativeMessage<TLAuthorization>(\"auth.signUp\", obj,\r\n                auth =>\r\n                {\r\n                    _cacheService.SyncUser(auth.User, result => { });\r\n                    callback(auth);\r\n                },\r\n                faultCallback);\r\n\t    }\r\n\r\n        public void SignInAsync(TLString phoneNumber, TLString phoneCodeHash, TLString phoneCode, Action<TLAuthorization> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSignIn{ PhoneNumber = phoneNumber, PhoneCodeHash = phoneCodeHash, PhoneCode = phoneCode};\r\n\r\n            SendInformativeMessage<TLAuthorization>(\"auth.signIn\", obj,\r\n                auth =>\r\n                {\r\n                    _cacheService.SyncUser(auth.User, result => { }); \r\n                    callback(auth);\r\n                }, \r\n                faultCallback);\r\n        }\r\n\r\n\t    public void CancelSignInAsync()\r\n\t    {\r\n\t        CancelDelayedItemsAsync(true);\r\n\t    }\r\n\r\n        public void LogOutAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLLogOut();\r\n\r\n            const string methodName = \"auth.logOut\";\r\n            Logs.Log.Write(methodName);\r\n            SendInformativeMessage<TLBool>(methodName, obj,\r\n                result =>\r\n                {\r\n                    Logs.Log.Write(string.Format(\"{0} result={1}\", methodName, result));\r\n                    callback.SafeInvoke(result);\r\n                }, \r\n                error =>\r\n                {\r\n                    Logs.Log.Write(string.Format(\"{0} error={1}\", methodName, error));\r\n                    faultCallback.SafeInvoke(error);\r\n                });\r\n        }\r\n\r\n        public void SendInvitesAsync(TLVector<TLString> phoneNumbers, TLString message, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLSendInvites{ PhoneNumbers = phoneNumbers, Message = message };\r\n\r\n            SendInformativeMessage(\"auth.sendInvites\", obj, callback, faultCallback);\r\n\t    }\r\n\r\n\t    public void ExportAuthorizationAsync(TLInt dcId, Action<TLExportedAuthorization> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLExportAuthorization { DCId = dcId };\r\n\r\n            SendInformativeMessage(\"auth.exportAuthorization dc_id=\" + dcId, obj, callback, faultCallback);\r\n\t    }\r\n\r\n\t    public void ImportAuthorizationAsync(TLInt id, TLString bytes, Action<TLAuthorization> callback, Action<TLRPCError> faultCallback = null)\r\n\t    {\r\n            var obj = new TLImportAuthorization { Id = id, Bytes = bytes };\r\n\r\n            SendInformativeMessage(\"auth.importAuthorization id=\" + id, obj, callback, faultCallback);\r\n\t    }\r\n\r\n        public void ImportAuthorizationByTransportAsync(ITransport transport, TLInt id, TLString bytes, Action<TLAuthorization> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLImportAuthorization { Id = id, Bytes = bytes };\r\n\r\n            SendInformativeMessageByTransport(transport, \"auth.importAuthorization dc_id=\" + transport.DCId, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ResetAuthorizationsAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLResetAuthorizations();\r\n\r\n            SendInformativeMessage(\"auth.resetAuthorizations\", obj, callback, faultCallback);\r\n        }\r\n\t}\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.ByTransport.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define MTPROTO\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Auth;\r\nusing Telegram.Api.TL.Functions.Channels;\r\nusing Telegram.Api.TL.Functions.DHKeyExchange;\r\nusing Telegram.Api.TL.Functions.Help;\r\nusing Telegram.Api.TL.Functions.Messages;\r\nusing Telegram.Api.TL.Functions.Stuff;\r\nusing Telegram.Api.TL.Functions.Upload;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        public void PingByTransportAsync(ITransport transport, TLLong pingId, Action<TLPong> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLPing { PingId = pingId };\r\n\r\n            SendNonInformativeMessageByTransport<TLPong>(transport, \"ping\", obj,\r\n                result =>\r\n                {\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void GetConfigByTransportAsync(ITransport transport, Action<TLConfig> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetConfig();\r\n\r\n            Logs.Log.Write(\"help.getConfig\");\r\n\r\n            SendInformativeMessageByTransport<TLConfig>(transport, \"help.getConfig\", obj,\r\n                result =>\r\n                {\r\n                    callback(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        private void ReqPQByTransportAsync(ITransport transport, TLInt128 nonce, Action<TLResPQ> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReqPQ { Nonce = nonce };\r\n\r\n            SendNonEncryptedMessageByTransport(transport, \"req_pq\", obj, callback, faultCallback);\r\n        }\r\n\r\n        private void ReqDHParamsByTransportAsync(ITransport transport, TLInt128 nonce, TLInt128 serverNonce, TLString p, TLString q, TLLong publicKeyFingerprint, TLString encryptedData, Action<TLServerDHParamsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReqDHParams { Nonce = nonce, ServerNonce = serverNonce, P = p, Q = q, PublicKeyFingerprint = publicKeyFingerprint, EncryptedData = encryptedData };\r\n\r\n            SendNonEncryptedMessageByTransport(transport, \"req_DH_params\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SetClientDHParamsByTransportAsync(ITransport transport, TLInt128 nonce, TLInt128 serverNonce, TLString encryptedData, Action<TLDHGenBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSetClientDHParams { Nonce = nonce, ServerNonce = serverNonce, EncryptedData = encryptedData };\r\n\r\n            SendNonEncryptedMessageByTransport(transport, \"set_client_DH_params\", obj, callback, faultCallback);\r\n        }\r\n\r\n        private static Dictionary<long, string> _serverPublicKeys = new Dictionary<long, string>();\r\n\r\n        public void GetServerPublicKeyAsync(int dcId, TLVector<TLLong> fingerprints, Action<int, string> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            if (_serverPublicKeys.Count == 0)\r\n            {\r\n                _serverPublicKeys[unchecked((long)0xc3b42b026ce86b21L)] =\r\n                    \"-----BEGIN RSA PUBLIC KEY-----\\n\" +\r\n                    \"MIIBCgKCAQEAwVACPi9w23mF3tBkdZz+zwrzKOaaQdr01vAbU4E1pvkfj4sqDsm6\\n\" +\r\n                    \"lyDONS789sVoD/xCS9Y0hkkC3gtL1tSfTlgCMOOul9lcixlEKzwKENj1Yz/s7daS\\n\" +\r\n                    \"an9tqw3bfUV/nqgbhGX81v/+7RFAEd+RwFnK7a+XYl9sluzHRyVVaTTveB2GazTw\\n\" +\r\n                    \"Efzk2DWgkBluml8OREmvfraX3bkHZJTKX4EQSjBbbdJ2ZXIsRrYOXfaA+xayEGB+\\n\" +\r\n                    \"8hdlLmAjbCVfaigxX0CDqWeR1yFL9kwd9P0NsZRPsmoqVwMbMu7mStFai6aIhc3n\\n\" +\r\n                    \"Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB\\n\" +\r\n                    \"-----END RSA PUBLIC KEY-----\";\r\n\r\n                _serverPublicKeys[unchecked((long)0x9a996a1db11c729bL)] =\r\n                    \"-----BEGIN RSA PUBLIC KEY-----\\n\" +\r\n                    \"MIIBCgKCAQEAxq7aeLAqJR20tkQQMfRn+ocfrtMlJsQ2Uksfs7Xcoo77jAid0bRt\\n\" +\r\n                    \"ksiVmT2HEIJUlRxfABoPBV8wY9zRTUMaMA654pUX41mhyVN+XoerGxFvrs9dF1Ru\\n\" +\r\n                    \"vCHbI02dM2ppPvyytvvMoefRoL5BTcpAihFgm5xCaakgsJ/tH5oVl74CdhQw8J5L\\n\" +\r\n                    \"xI/K++KJBUyZ26Uba1632cOiq05JBUW0Z2vWIOk4BLysk7+U9z+SxynKiZR3/xdi\\n\" +\r\n                    \"XvFKk01R3BHV+GUKM2RYazpS/P8v7eyKhAbKxOdRcFpHLlVwfjyM1VlDQrEZxsMp\\n\" +\r\n                    \"NTLYXb6Sce1Uov0YtNx5wEowlREH1WOTlwIDAQAB\\n\" +\r\n                    \"-----END RSA PUBLIC KEY-----\";\r\n\r\n                _serverPublicKeys[unchecked((long)0xb05b2a6f70cdea78L)] =\r\n                    \"-----BEGIN RSA PUBLIC KEY-----\\n\" +\r\n                    \"MIIBCgKCAQEAsQZnSWVZNfClk29RcDTJQ76n8zZaiTGuUsi8sUhW8AS4PSbPKDm+\\n\" +\r\n                    \"DyJgdHDWdIF3HBzl7DHeFrILuqTs0vfS7Pa2NW8nUBwiaYQmPtwEa4n7bTmBVGsB\\n\" +\r\n                    \"1700/tz8wQWOLUlL2nMv+BPlDhxq4kmJCyJfgrIrHlX8sGPcPA4Y6Rwo0MSqYn3s\\n\" +\r\n                    \"g1Pu5gOKlaT9HKmE6wn5Sut6IiBjWozrRQ6n5h2RXNtO7O2qCDqjgB2vBxhV7B+z\\n\" +\r\n                    \"hRbLbCmW0tYMDsvPpX5M8fsO05svN+lKtCAuz1leFns8piZpptpSCFn7bWxiA9/f\\n\" +\r\n                    \"x5x17D7pfah3Sy2pA+NDXyzSlGcKdaUmwQIDAQAB\\n\" +\r\n                    \"-----END RSA PUBLIC KEY-----\";\r\n\r\n                _serverPublicKeys[unchecked((long)0x71e025b6c76033e3L)] =\r\n                    \"-----BEGIN RSA PUBLIC KEY-----\\n\" +\r\n                    \"MIIBCgKCAQEAwqjFW0pi4reKGbkc9pK83Eunwj/k0G8ZTioMMPbZmW99GivMibwa\\n\" +\r\n                    \"xDM9RDWabEMyUtGoQC2ZcDeLWRK3W8jMP6dnEKAlvLkDLfC4fXYHzFO5KHEqF06i\\n\" +\r\n                    \"qAqBdmI1iBGdQv/OQCBcbXIWCGDY2AsiqLhlGQfPOI7/vvKc188rTriocgUtoTUc\\n\" +\r\n                    \"/n/sIUzkgwTqRyvWYynWARWzQg0I9olLBBC2q5RQJJlnYXZwyTL3y9tdb7zOHkks\\n\" +\r\n                    \"WV9IMQmZmyZh/N7sMbGWQpt4NMchGpPGeJ2e5gHBjDnlIf2p1yZOYeUYrdbwcS0t\\n\" +\r\n                    \"UiggS4UeE8TzIuXFQxw7fzEIlmhIaq3FnwIDAQAB\\n\" +\r\n                    \"-----END RSA PUBLIC KEY-----\";\r\n\r\n                _serverPublicKeys[unchecked((long)0xbc35f3509f7b7a5L)] =\r\n                    \"-----BEGIN RSA PUBLIC KEY-----\\n\" +\r\n                    \"MIIBCgKCAQEAruw2yP/BCcsJliRoW5eBVBVle9dtjJw+OYED160Wybum9SXtBBLX\\n\" +\r\n                    \"riwt4rROd9csv0t0OHCaTmRqBcQ0J8fxhN6/cpR1GWgOZRUAiQxoMnlt0R93LCX/\\n\" +\r\n                    \"j1dnVa/gVbCjdSxpbrfY2g2L4frzjJvdl84Kd9ORYjDEAyFnEA7dD556OptgLQQ2\\n\" +\r\n                    \"e2iVNq8NZLYTzLp5YpOdO1doK+ttrltggTCy5SrKeLoCPPbOgGsdxJxyz5KKcZnS\\n\" +\r\n                    \"Lj16yE5HvJQn0CNpRdENvRUXe6tBP78O39oJ8BTHp9oIjd6XWXAsp2CvK45Ol8wF\\n\" +\r\n                    \"XGF710w9lwCGNbmNxNYhtIkdqfsEcwR5JwIDAQAB\\n\" +\r\n                    \"-----END RSA PUBLIC KEY-----\";\r\n\r\n                _serverPublicKeys[unchecked((long)0x15ae5fa8b5529542L)] =\r\n                    \"-----BEGIN RSA PUBLIC KEY-----\\n\" +\r\n                    \"MIIBCgKCAQEAvfLHfYH2r9R70w8prHblWt/nDkh+XkgpflqQVcnAfSuTtO05lNPs\\n\" +\r\n                    \"pQmL8Y2XjVT4t8cT6xAkdgfmmvnvRPOOKPi0OfJXoRVylFzAQG/j83u5K3kRLbae\\n\" +\r\n                    \"7fLccVhKZhY46lvsueI1hQdLgNV9n1cQ3TDS2pQOCtovG4eDl9wacrXOJTG2990V\\n\" +\r\n                    \"jgnIKNA0UMoP+KF03qzryqIt3oTvZq03DyWdGK+AZjgBLaDKSnC6qD2cFY81UryR\\n\" +\r\n                    \"WOab8zKkWAnhw2kFpcqhI0jdV5QaSCExvnsjVaX0Y1N0870931/5Jb9ICe4nweZ9\\n\" +\r\n                    \"kSDF/gip3kWLG0o8XQpChDfyvsqB9OLV/wIDAQAB\\n\" +\r\n                    \"-----END RSA PUBLIC KEY-----\";\r\n\r\n                _serverPublicKeys[unchecked((long)0xaeae98e13cd7f94fL)] =\r\n                    \"-----BEGIN RSA PUBLIC KEY-----\\n\" +\r\n                    \"MIIBCgKCAQEAs/ditzm+mPND6xkhzwFIz6J/968CtkcSE/7Z2qAJiXbmZ3UDJPGr\\n\" +\r\n                    \"zqTDHkO30R8VeRM/Kz2f4nR05GIFiITl4bEjvpy7xqRDspJcCFIOcyXm8abVDhF+\\n\" +\r\n                    \"th6knSU0yLtNKuQVP6voMrnt9MV1X92LGZQLgdHZbPQz0Z5qIpaKhdyA8DEvWWvS\\n\" +\r\n                    \"Uwwc+yi1/gGaybwlzZwqXYoPOhwMebzKUk0xW14htcJrRrq+PXXQbRzTMynseCoP\\n\" +\r\n                    \"Ioke0dtCodbA3qQxQovE16q9zz4Otv2k4j63cz53J+mhkVWAeWxVGI0lltJmWtEY\\n\" +\r\n                    \"K6er8VqqWot3nqmWMXogrgRLggv/NbbooQIDAQAB\\n\" +\r\n                    \"-----END RSA PUBLIC KEY-----\";\r\n\r\n                _serverPublicKeys[unchecked((long)0x5a181b2235057d98L)] =\r\n                    \"-----BEGIN RSA PUBLIC KEY-----\\n\" +\r\n                    \"MIIBCgKCAQEAvmpxVY7ld/8DAjz6F6q05shjg8/4p6047bn6/m8yPy1RBsvIyvuD\\n\" +\r\n                    \"uGnP/RzPEhzXQ9UJ5Ynmh2XJZgHoE9xbnfxL5BXHplJhMtADXKM9bWB11PU1Eioc\\n\" +\r\n                    \"3+AXBB8QiNFBn2XI5UkO5hPhbb9mJpjA9Uhw8EdfqJP8QetVsI/xrCEbwEXe0xvi\\n\" +\r\n                    \"fRLJbY08/Gp66KpQvy7g8w7VB8wlgePexW3pT13Ap6vuC+mQuJPyiHvSxjEKHgqe\\n\" +\r\n                    \"Pji9NP3tJUFQjcECqcm0yV7/2d0t/pbCm+ZH1sadZspQCEPPrtbkQBlvHb4OLiIW\\n\" +\r\n                    \"PGHKSMeRFvp3IWcmdJqXahxLCUS1Eh6MAQIDAQAB\\n\" +\r\n                    \"-----END RSA PUBLIC KEY-----\";\r\n            }\r\n\r\n            var dcOption = _config != null ? _config.DCOptions.FirstOrDefault(x => x.Id.Value == dcId) : null;\r\n            if (dcOption == null || !dcOption.CDN.Value)\r\n            {\r\n                for (var i = 0; i < fingerprints.Count; i++)\r\n                {\r\n                    string key;\r\n                    if (_serverPublicKeys.TryGetValue(fingerprints[i].Value, out key))\r\n                    {\r\n                        callback.SafeInvoke(i, key);\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                callback.SafeInvoke(-1, null);\r\n                return;\r\n            }\r\n\r\n            var cdnConfig = _cacheService.GetCdnConfig();\r\n            if (cdnConfig != null)\r\n            {\r\n                var pairs = cdnConfig.PublicKeys.Where(x => x.DCId.Value == dcId).ToDictionary(x => x.PublicKeyFingerprint.Value);\r\n                for (var i = 0; i < fingerprints.Count; i++)\r\n                {\r\n                    if (pairs.ContainsKey(fingerprints[i].Value))\r\n                    {\r\n                        callback.SafeInvoke(i, pairs[fingerprints[i].Value].PublicKey.ToString());\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n\r\n            GetCdnConfigAsync(\r\n                result =>\r\n                {\r\n                    cdnConfig = result;\r\n\r\n                    _cacheService.SetCdnCofig(cdnConfig);\r\n\r\n                    GetServerPublicKeyAsync(dcId, fingerprints, callback, faultCallback);\r\n                },\r\n                error =>\r\n                {\r\n                    faultCallback.SafeInvoke(error);\r\n                });\r\n        }\r\n\r\n        public void InitTransportAsync(ITransport transport, Action<WindowsPhone.Tuple<byte[], TLLong, TLLong>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var authTime = Stopwatch.StartNew();\r\n            var newNonce = TLInt256.Random();\r\n\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"Start ReqPQ\");\r\n#endif\r\n            var nonce = TLInt128.Random();\r\n            ReqPQByTransportAsync(\r\n                transport,\r\n                nonce,\r\n                resPQ =>\r\n                {\r\n                    GetServerPublicKeyAsync(transport.DCId, resPQ.ServerPublicKeyFingerprints,\r\n                        (index, publicKey) =>\r\n                        {\r\n                            if (index < 0 || string.IsNullOrEmpty(publicKey))\r\n                            {\r\n                                var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"unknown public key\") };\r\n#if LOG_REGISTRATION\r\n                                TLUtils.WriteLog(\"Stop ReqPQ with error \" + error);\r\n#endif\r\n\r\n                                if (faultCallback != null) faultCallback(error);\r\n                                TLUtils.WriteLine(error.ToString());\r\n                            }\r\n\r\n                            var serverNonce = resPQ.ServerNonce;\r\n                            if (!TLUtils.ByteArraysEqual(nonce.Value, resPQ.Nonce.Value))\r\n                            {\r\n                                var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect nonce\") };\r\n#if LOG_REGISTRATION\r\n                                TLUtils.WriteLog(\"Stop ReqPQ with error \" + error);\r\n#endif\r\n\r\n                                if (faultCallback != null) faultCallback(error);\r\n                                TLUtils.WriteLine(error.ToString());\r\n                            }\r\n\r\n#if LOG_REGISTRATION\r\n                            TLUtils.WriteLog(\"Stop ReqPQ\");\r\n#endif\r\n                            TimeSpan calcTime;\r\n                            WindowsPhone.Tuple<ulong, ulong> pqPair;\r\n                            var innerData = GetInnerData(new TLInt(TLUtils.GetProtocolDCId(transport.DCId, false, Constants.IsTestServer)), resPQ, newNonce, out calcTime, out pqPair);\r\n                            var encryptedInnerData = GetEncryptedInnerData(innerData, publicKey);\r\n\r\n#if LOG_REGISTRATION\r\n                            TLUtils.WriteLog(\"Start ReqDHParams\");\r\n#endif\r\n                            ReqDHParamsByTransportAsync(\r\n                                transport,\r\n                                resPQ.Nonce,\r\n                                resPQ.ServerNonce,\r\n                                innerData.P,\r\n                                innerData.Q,\r\n                                resPQ.ServerPublicKeyFingerprints[index],\r\n                                encryptedInnerData,\r\n                                serverDHParams =>\r\n                                {\r\n                                    if (!TLUtils.ByteArraysEqual(nonce.Value, serverDHParams.Nonce.Value))\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect nonce\") };\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error);\r\n#endif\r\n\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n                                    }\r\n                                    if (!TLUtils.ByteArraysEqual(serverNonce.Value, serverDHParams.ServerNonce.Value))\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect server_nonce\") };\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error);\r\n#endif\r\n\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n                                    }\r\n\r\n#if LOG_REGISTRATION\r\n                                    TLUtils.WriteLog(\"Stop ReqDHParams\");\r\n#endif\r\n                                    var random = new SecureRandom();\r\n\r\n                                    var serverDHParamsOk = serverDHParams as TLServerDHParamsOk;\r\n                                    if (serverDHParamsOk == null)\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"Incorrect serverDHParams\") };\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n#if LOG_REGISTRATION\r\n\r\n                                        TLUtils.WriteLog(\"ServerDHParams \" + serverDHParams);\r\n#endif\r\n                                        return;\r\n                                    }\r\n\r\n                                    var aesParams = GetAesKeyIV(resPQ.ServerNonce.ToBytes(), newNonce.ToBytes());\r\n\r\n                                    var decryptedAnswerWithHash = Utils.AesIge(serverDHParamsOk.EncryptedAnswer.Data, aesParams.Item1, aesParams.Item2, false);     //NOTE: Remove reverse here\r\n\r\n                                    var position = 0;\r\n                                    var serverDHInnerData = (TLServerDHInnerData)new TLServerDHInnerData().FromBytes(decryptedAnswerWithHash.Skip(20).ToArray(), ref position);\r\n\r\n                                    var sha1 = Utils.ComputeSHA1(serverDHInnerData.ToBytes());\r\n                                    if (!TLUtils.ByteArraysEqual(sha1, decryptedAnswerWithHash.Take(20).ToArray()))\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect sha1 TLServerDHInnerData\") };\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error);\r\n#endif\r\n\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n                                    }\r\n\r\n                                    if (!TLUtils.CheckPrime(serverDHInnerData.DHPrime.Data, serverDHInnerData.G.Value))\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect (p, q) pair\") };\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error);\r\n#endif\r\n\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n                                    }\r\n\r\n                                    if (!TLUtils.CheckGaAndGb(serverDHInnerData.GA.Data, serverDHInnerData.DHPrime.Data))\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect g_a\") };\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error);\r\n#endif\r\n\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n                                    }\r\n\r\n                                    var bBytes = new byte[256]; //big endian B\r\n                                    random.NextBytes(bBytes);\r\n\r\n                                    var gbBytes = GetGB(bBytes, serverDHInnerData.G, serverDHInnerData.DHPrime);\r\n\r\n                                    var clientDHInnerData = new TLClientDHInnerData\r\n                                    {\r\n                                        Nonce = resPQ.Nonce,\r\n                                        ServerNonce = resPQ.ServerNonce,\r\n                                        RetryId = new TLLong(0),\r\n                                        GB = TLString.FromBigEndianData(gbBytes)\r\n                                    };\r\n\r\n                                    var encryptedClientDHInnerData = GetEncryptedClientDHInnerData(clientDHInnerData, aesParams);\r\n#if LOG_REGISTRATION\r\n                                    TLUtils.WriteLog(\"Start SetClientDHParams\");\r\n#endif\r\n                                    SetClientDHParamsByTransportAsync(\r\n                                        transport,\r\n                                        resPQ.Nonce,\r\n                                        resPQ.ServerNonce,\r\n                                        encryptedClientDHInnerData,\r\n                                        dhGen =>\r\n                                        {\r\n                                            if (!TLUtils.ByteArraysEqual(nonce.Value, dhGen.Nonce.Value))\r\n                                            {\r\n                                                var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect nonce\") };\r\n#if LOG_REGISTRATION\r\n                                                TLUtils.WriteLog(\"Stop SetClientDHParams with error \" + error);\r\n#endif\r\n\r\n                                                if (faultCallback != null) faultCallback(error);\r\n                                                TLUtils.WriteLine(error.ToString());\r\n                                            }\r\n                                            if (!TLUtils.ByteArraysEqual(serverNonce.Value, dhGen.ServerNonce.Value))\r\n                                            {\r\n                                                var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect server_nonce\") };\r\n#if LOG_REGISTRATION\r\n                                                TLUtils.WriteLog(\"Stop SetClientDHParams with error \" + error);\r\n#endif\r\n\r\n                                                if (faultCallback != null) faultCallback(error);\r\n                                                TLUtils.WriteLine(error.ToString());\r\n                                            }\r\n\r\n                                            var dhGenOk = dhGen as TLDHGenOk;\r\n                                            if (dhGenOk == null)\r\n                                            {\r\n                                                var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"Incorrect dhGen \" + dhGen.GetType()) };\r\n                                                if (faultCallback != null) faultCallback(error);\r\n                                                TLUtils.WriteLine(error.ToString());\r\n#if LOG_REGISTRATION\r\n                                                TLUtils.WriteLog(\"DHGen result \" + serverDHParams);\r\n#endif\r\n                                                return;\r\n                                            }\r\n\r\n#if LOG_REGISTRATION\r\n                                            TLUtils.WriteLog(\"Stop SetClientDHParams\");\r\n#endif\r\n                                            var getKeyTimer = Stopwatch.StartNew();\r\n                                            var authKey = GetAuthKey(bBytes, serverDHInnerData.GA.ToBytes(), serverDHInnerData.DHPrime.ToBytes());\r\n\r\n#if LOG_REGISTRATION\r\n                                            var logCountersString = new StringBuilder();\r\n\r\n                                            logCountersString.AppendLine(\"Auth Counters\");\r\n                                            logCountersString.AppendLine();\r\n                                            logCountersString.AppendLine(\"pq factorization time: \" + calcTime);\r\n                                            logCountersString.AppendLine(\"calc auth key time: \" + getKeyTimer.Elapsed);\r\n                                            logCountersString.AppendLine(\"auth time: \" + authTime.Elapsed);\r\n\r\n                                            TLUtils.WriteLog(logCountersString.ToString());\r\n#endif\r\n                                            //newNonce - little endian\r\n                                            //authResponse.ServerNonce - little endian\r\n                                            var salt = GetSalt(newNonce.ToBytes(), resPQ.ServerNonce.ToBytes());\r\n                                            var sessionId = new byte[8];\r\n                                            random.NextBytes(sessionId);\r\n\r\n                                            // authKey, salt, sessionId\r\n                                            callback(new WindowsPhone.Tuple<byte[], TLLong, TLLong>(authKey, new TLLong(BitConverter.ToInt64(salt, 0)), new TLLong(BitConverter.ToInt64(sessionId, 0))));\r\n                                        },\r\n                                        error =>\r\n                                        {\r\n#if LOG_REGISTRATION\r\n                                            TLUtils.WriteLog(\"Stop SetClientDHParams with error \" + error.ToString());\r\n#endif\r\n                                            if (faultCallback != null) faultCallback(error);\r\n                                            TLUtils.WriteLine(error.ToString());\r\n                                        });\r\n                                },\r\n                                error =>\r\n                                {\r\n#if LOG_REGISTRATION\r\n                                    TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error.ToString());\r\n#endif\r\n                                    if (faultCallback != null) faultCallback(error);\r\n                                    TLUtils.WriteLine(error.ToString());\r\n                                });\r\n                        },\r\n                        error =>\r\n                        {\r\n#if LOG_REGISTRATION\r\n                            TLUtils.WriteLog(\"Stop ServerPublicKey with error \" + error.ToString());\r\n#endif\r\n                            if (faultCallback != null) faultCallback(error);\r\n                            TLUtils.WriteLine(error.ToString());\r\n                        });\r\n                },\r\n                error =>\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\"Stop ReqPQ with error \" + error.ToString());\r\n#endif\r\n                    if (faultCallback != null) faultCallback(error);\r\n                    TLUtils.WriteLine(error.ToString());\r\n                });\r\n        }\r\n\r\n        public void LogOutTransportsAsync(Action callback, Action<List<TLRPCError>> faultCallback = null)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var dcOptions = _config.DCOptions;\r\n                var activeDCOptionIndex = _config.ActiveDCOptionIndex;\r\n\r\n                if (dcOptions.Count > 1)\r\n                {\r\n                    var waitHandles = new List<WaitHandle>();\r\n                    var errors = new List<TLRPCError>();\r\n                    for (var i = 0; i < dcOptions.Count; i++)\r\n                    {\r\n                        if (activeDCOptionIndex == i)\r\n                        {\r\n                            continue;\r\n                        }\r\n\r\n                        var local = i;\r\n                        var handle = new ManualResetEvent(false);\r\n                        waitHandles.Add(handle);\r\n                        Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            var dcOption = dcOptions[local];\r\n                            LogOutAsync(dcOption.Id,\r\n                                result =>\r\n                                {\r\n                                    handle.Set();\r\n                                },\r\n                                error =>\r\n                                {\r\n                                    errors.Add(error);\r\n                                    handle.Set();\r\n                                });\r\n                        });\r\n                    }\r\n\r\n                    var waitingResult = WaitHandle.WaitAll(waitHandles.ToArray(), TimeSpan.FromSeconds(25.0));\r\n                    if (waitingResult)\r\n                    {\r\n                        if (errors.Count > 0)\r\n                        {\r\n                            faultCallback.SafeInvoke(errors);\r\n                        }\r\n                        else\r\n                        {\r\n                            callback.SafeInvoke();\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        faultCallback.SafeInvoke(errors);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    callback.SafeInvoke();\r\n                }\r\n            });\r\n        }\r\n\r\n        public void LogOutAsync(TLInt dcId, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            lock (_activeTransportRoot)\r\n            {\r\n                if (_activeTransport.DCId == dcId.Value)\r\n                {\r\n                    if (_activeTransport.DCId == 0)\r\n                    {\r\n                        TLUtils.WriteException(new Exception(\"_activeTransport.DCId==0\"));\r\n                    }\r\n\r\n                    LogOutAsync(callback, faultCallback);\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var transport = GetMediaTransportByDCId(dcId);\r\n\r\n            if (transport == null)\r\n            {\r\n                faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"LogOutAsync: Empty transport for dc id \" + dcId) });\r\n\r\n                return;\r\n            }\r\n\r\n            if (transport.AuthKey == null)\r\n            {\r\n                faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"LogOutAsync: Empty authKey for dc id \" + dcId) });\r\n\r\n                return;\r\n            }\r\n\r\n            var obj = new TLLogOut();\r\n\r\n            SendInformativeMessageByTransport<TLBool>(transport, \"auth.logOut\", obj,\r\n                result =>\r\n                {\r\n                    lock (transport.SyncRoot)\r\n                    {\r\n                        transport.IsInitializing = false;\r\n                        transport.IsAuthorizing = false;\r\n                        transport.IsAuthorized = false;\r\n                    }\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void ReuploadCdnFileAsync(TLInt dcId, TLString fileToken, TLString requestToken, Action<TLVector<TLFileHash>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReuploadCdnFile { FileToken = fileToken, RequestToken = requestToken };\r\n\r\n            var transport = GetMediaTransportByDCId(dcId);\r\n            if (transport == null)\r\n            {\r\n                faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"ReuploadCdnFileAsync: Empty transport for dc id \" + dcId) });\r\n            }\r\n            else\r\n            {\r\n                SendInformativeMessageByTransport(transport, string.Format(\"upload.reuploadCdnFile dc_id={0} file_token={1} request_token={2}\", dcId, fileToken, requestToken), obj, callback, faultCallback);\r\n            }\r\n        }\r\n\r\n        public void GetCdnFileAsync(TLInt dcId, TLString fileToken, TLInt offset, TLInt limit, Action<TLCdnFileBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetCdnFile { FileToken = fileToken, Offset = offset, Limit = limit };\r\n\r\n            var transport = GetMediaTransportByDCId(dcId);\r\n            if (transport == null)\r\n            {\r\n                GetConfigAsync(\r\n                    result =>\r\n                    {\r\n                        _config = TLConfig.Merge(_config, result);\r\n                        _cacheService.SetConfig(_config);\r\n\r\n                        GetCdnFileAsync(dcId, fileToken, offset, limit, callback, faultCallback);\r\n                    },\r\n                    error =>\r\n                    {\r\n                        faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"GetCdnFileAsync: Empty transport for dc id \" + dcId) });\r\n                    });\r\n\r\n                return;\r\n            }\r\n\r\n            if (transport.AuthKey == null)\r\n            {\r\n                var cancelInitializing = false;\r\n                lock (transport.SyncRoot)\r\n                {\r\n                    if (transport.IsInitializing)\r\n                    {\r\n                        cancelInitializing = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        transport.IsInitializing = true;\r\n                    }\r\n                }\r\n\r\n                if (cancelInitializing)\r\n                {\r\n                    faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"DC \" + dcId + \" is already initializing\") });\r\n                    return;\r\n                }\r\n\r\n                InitTransportAsync(\r\n                    transport,\r\n                    tuple =>\r\n                    {\r\n                        lock (transport.SyncRoot)\r\n                        {\r\n                            transport.AuthKey = tuple.Item1;\r\n                            transport.Salt = tuple.Item2;\r\n                            transport.SessionId = tuple.Item3;\r\n\r\n                            transport.IsInitializing = false;\r\n                        }\r\n                        var authKeyId = TLUtils.GenerateLongAuthKeyId(tuple.Item1);\r\n\r\n                        lock (_authKeysRoot)\r\n                        {\r\n                            if (!_authKeys.ContainsKey(authKeyId))\r\n                            {\r\n                                _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = tuple.Item1, AutkKeyId = authKeyId });\r\n                            }\r\n                        }\r\n\r\n                        foreach (var dcOption in _config.DCOptions)\r\n                        {\r\n                            if (dcOption.Id.Value == transport.DCId)\r\n                            {\r\n                                dcOption.AuthKey = tuple.Item1;\r\n                                dcOption.Salt = tuple.Item2;\r\n                                dcOption.SessionId = tuple.Item3;\r\n                            }\r\n                        }\r\n\r\n                        _cacheService.SetConfig(_config);\r\n\r\n                        SendInformativeMessageByTransport(transport, string.Format(\"upload.getCdnFile dc_id={0} file_token={3} o={1} l={2}\", dcId, offset, limit, fileToken), obj, callback, faultCallback);\r\n                    },\r\n                    error =>\r\n                    {\r\n                        lock (transport.SyncRoot)\r\n                        {\r\n                            transport.IsInitializing = false;\r\n                        }\r\n\r\n                        faultCallback.SafeInvoke(error);\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                SendInformativeMessageByTransport(transport, string.Format(\"upload.getCdnFile dc_id={0} file_token={3} o={1} l={2}\", dcId, offset, limit, fileToken), obj, callback, faultCallback);\r\n            }\r\n        }\r\n\r\n        private void GetFileAsyncInternal<T>(TLObject obj, TLInt dcId, TLInputFileLocationBase location, TLInt offset, TLInt limit, Action<T> callback, Action<TLRPCError> faultCallback = null) where T : TLObject\r\n        {\r\n            var transport = GetMediaTransportByDCId(dcId);\r\n\r\n            lock (_activeTransportRoot)\r\n            {\r\n                if (_activeTransport.DCId == dcId.Value)\r\n                {\r\n                    if (_activeTransport.DCId == 0)\r\n                    {\r\n                        TLUtils.WriteException(new Exception(\"_activeTransport.DCId==0\"));\r\n                    }\r\n\r\n                    SendInformativeMessageByTransport(transport, string.Format(\"upload.getFile main dc_id={0} loc=[{5}] o={1} l={2}\\ntransport_id={3} session_id={4}\", dcId, offset, limit, transport.Id, transport.SessionId, location.GetLocationString()), obj, callback, faultCallback);\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (transport == null)\r\n            {\r\n                faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"GetFileAsync: Empty transport for dc id \" + dcId) });\r\n\r\n                return;\r\n            }\r\n\r\n            if (transport.AuthKey == null)\r\n            {\r\n                var cancelInitializing = false;\r\n                lock (transport.SyncRoot)\r\n                {\r\n                    if (transport.IsInitializing)\r\n                    {\r\n                        cancelInitializing = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        transport.IsInitializing = true;\r\n                    }\r\n                }\r\n\r\n                if (cancelInitializing)\r\n                {\r\n                    faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"DC \" + dcId + \" is already initializing\") });\r\n                    return;\r\n                }\r\n\r\n                InitTransportAsync(\r\n                    transport,\r\n                    tuple =>\r\n                    {\r\n                        lock (transport.SyncRoot)\r\n                        {\r\n                            transport.AuthKey = tuple.Item1;\r\n                            transport.Salt = tuple.Item2;\r\n                            transport.SessionId = tuple.Item3;\r\n\r\n                            transport.IsInitializing = false;\r\n                        }\r\n                        var authKeyId = TLUtils.GenerateLongAuthKeyId(tuple.Item1);\r\n\r\n                        lock (_authKeysRoot)\r\n                        {\r\n                            if (!_authKeys.ContainsKey(authKeyId))\r\n                            {\r\n                                _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = tuple.Item1, AutkKeyId = authKeyId });\r\n                            }\r\n                        }\r\n\r\n                        ExportImportAuthorizationAsync(\r\n                            transport,\r\n                            () =>\r\n                            {\r\n                                foreach (var dcOption in _config.DCOptions)\r\n                                {\r\n                                    if (dcOption.Id.Value == transport.DCId)\r\n                                    {\r\n                                        dcOption.AuthKey = tuple.Item1;\r\n                                        dcOption.Salt = tuple.Item2;\r\n                                        dcOption.SessionId = tuple.Item3;\r\n                                    }\r\n                                }\r\n\r\n                                _cacheService.SetConfig(_config);\r\n\r\n                                SendInformativeMessageByTransport(transport, string.Format(\"upload.getFile dc_id={0} loc=[{3}] o={1} l={2}\", dcId, offset, limit, location.GetLocationString()), obj, callback, faultCallback);\r\n                            },\r\n                            error =>\r\n                            {\r\n                                if (!error.CodeEquals(ErrorCode.NOT_FOUND) &&\r\n                                    !error.Message.ToString().Contains(\"is already authorizing\"))\r\n                                {\r\n                                    Execute.ShowDebugMessage(\"ExportImportAuthorization error \" + error);\r\n                                }\r\n\r\n                                faultCallback.SafeInvoke(error);\r\n                            });\r\n                    },\r\n                    error =>\r\n                    {\r\n                        lock (transport.SyncRoot)\r\n                        {\r\n                            transport.IsInitializing = false;\r\n                        }\r\n\r\n                        faultCallback.SafeInvoke(error);\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                ExportImportAuthorizationAsync(\r\n                    transport,\r\n                    () =>\r\n                    {\r\n                        SendInformativeMessageByTransport(transport, string.Format(\"upload.getFile dc_id={0} loc=[{3}] o={1} l={2}\", dcId, offset, limit, location.GetLocationString()), obj, callback, faultCallback);\r\n                    },\r\n                    error =>\r\n                    {\r\n                        if (!error.CodeEquals(ErrorCode.NOT_FOUND)\r\n                            && !error.Message.ToString().Contains(\"is already authorizing\"))\r\n                        {\r\n                            Execute.ShowDebugMessage(\"ExportImportAuthorization error \" + error);\r\n                        }\r\n\r\n                        faultCallback.SafeInvoke(error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        public void GetFileAsync(TLInt dcId, TLInputFileLocationBase location, TLInt offset, TLInt limit, Action<TLFileBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = location is TLInputWebFileLocationBase\r\n                ? (TLObject)new TLGetWebFile { Location = location, Offset = offset, Limit = limit }\r\n                : new TLGetFile { Location = location, Offset = offset, Limit = limit };\r\n\r\n            GetFileAsyncInternal(obj, dcId, location, offset, limit, callback, faultCallback);\r\n        }\r\n\r\n        private void ExportImportAuthorizationAsync(ITransport toTransport, Action callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            if (!toTransport.IsAuthorized)\r\n            {\r\n                bool authorizing = false;\r\n                lock (toTransport.SyncRoot)\r\n                {\r\n                    if (toTransport.IsAuthorizing)\r\n                    {\r\n                        authorizing = true;\r\n                    }\r\n\r\n                    toTransport.IsAuthorizing = true;\r\n                }\r\n\r\n                if (authorizing)\r\n                {\r\n                    faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"DC \" + toTransport.DCId + \" is already authorizing\") });\r\n                    return;\r\n                }\r\n\r\n                ExportAuthorizationAsync(\r\n                    new TLInt(toTransport.DCId),\r\n                    exportedAuthorization =>\r\n                    {\r\n                        ImportAuthorizationByTransportAsync(\r\n                            toTransport,\r\n                            exportedAuthorization.Id,\r\n                            exportedAuthorization.Bytes,\r\n                            authorization =>\r\n                            {\r\n                                lock (toTransport.SyncRoot)\r\n                                {\r\n                                    toTransport.IsAuthorized = true;\r\n                                    toTransport.IsAuthorizing = false;\r\n                                }\r\n\r\n                                foreach (var dcOption in _config.DCOptions)\r\n                                {\r\n                                    if (dcOption.Id.Value == toTransport.DCId)\r\n                                    {\r\n                                        dcOption.IsAuthorized = true;\r\n                                    }\r\n                                }\r\n\r\n                                _cacheService.SetConfig(_config);\r\n\r\n                                callback.SafeInvoke();\r\n                            },\r\n                            error =>\r\n                            {\r\n                                lock (toTransport.SyncRoot)\r\n                                {\r\n                                    toTransport.IsAuthorizing = false;\r\n                                }\r\n                                faultCallback.SafeInvoke(error);\r\n                            });\r\n                        ;\r\n                    },\r\n                    error =>\r\n                    {\r\n                        lock (toTransport.SyncRoot)\r\n                        {\r\n                            toTransport.IsAuthorizing = false;\r\n                        }\r\n                        faultCallback.SafeInvoke(error);\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                callback.SafeInvoke();\r\n            }\r\n        }\r\n\r\n        private ITransport GetMediaTransportByDCId(TLInt dcId)\r\n        {\r\n            ITransport transport;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                var dcOption = TLUtils.GetDCOption(_config, dcId);// && x.Media.Value);\r\n\r\n                if (dcOption == null) return null;\r\n\r\n                transport = GetFileTransport(dcOption.IpAddress.Value, dcOption.Port.Value, Type,\r\n                    new TransportSettings\r\n                    {\r\n                        DcId = dcOption.Id.Value,\r\n                        Secret = TLUtils.ParseSecret(dcOption),\r\n                        AuthKey = dcOption.AuthKey,\r\n                        Salt = dcOption.Salt,\r\n                        SessionId = TLLong.Random(),\r\n                        MessageIdDict = new Dictionary<long, long>(),\r\n                        SequenceNumber = 0,\r\n                        ClientTicksDelta = dcOption.ClientTicksDelta,\r\n                        PacketReceivedHandler = OnPacketReceivedByTransport\r\n                    });\r\n            }\r\n\r\n            return transport;\r\n        }\r\n\r\n\r\n        private void SendNonInformativeMessageByTransport<T>(ITransport transport, string caption, TLObject obj, Action<T> callback, Action<TLRPCError> faultCallback = null) where T : TLObject\r\n        {\r\n            bool isInitialized;\r\n            lock (transport.SyncRoot)\r\n            {\r\n                isInitialized = transport.AuthKey != null;\r\n            }\r\n\r\n            if (!isInitialized)\r\n            {\r\n                faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"transport \" + transport.DCId + \" \" + caption + \" delayed send is not supported\") });\r\n\r\n                return;\r\n            }\r\n\r\n            int sequenceNumber;\r\n            TLLong messageId;\r\n            lock (transport.SyncRoot)\r\n            {\r\n                sequenceNumber = transport.SequenceNumber * 2;\r\n                messageId = transport.GenerateMessageId(true);\r\n            }\r\n            var authKey = transport.AuthKey;\r\n            var salt = transport.Salt;\r\n            var sessionId = transport.SessionId;\r\n            var clientsTicksDelta = transport.ClientTicksDelta;\r\n            var transportMessage = CreateTLTransportMessage(salt, sessionId, new TLInt(sequenceNumber), messageId, obj);\r\n            var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n            lock (transport.SyncRoot)\r\n            {\r\n                if (transport.Closed)\r\n                {\r\n                    var transportSettings = new TransportSettings\r\n                    {\r\n                        DcId = transport.DCId,\r\n                        Secret = transport.Secret,\r\n                        AuthKey = transport.AuthKey,\r\n                        Salt = transport.Salt,\r\n                        SessionId = transport.SessionId,\r\n                        MessageIdDict = transport.MessageIdDict,\r\n                        SequenceNumber = transport.SequenceNumber,\r\n                        ClientTicksDelta = transport.ClientTicksDelta,\r\n                        PacketReceivedHandler = OnPacketReceivedByTransport\r\n                    };\r\n\r\n                    transport = transport.MTProtoType == MTProtoTransportType.Special\r\n                        ? GetSpecialTransport(transport.Host, transport.Port, Type, transportSettings)\r\n                        : GetFileTransport(transport.Host, transport.Port, Type, transportSettings);\r\n                }\r\n            }\r\n\r\n            PrintCaption(caption);\r\n\r\n            HistoryItem historyItem = null;\r\n            if (string.Equals(caption, \"ping\", StringComparison.OrdinalIgnoreCase)\r\n                || string.Equals(caption, \"ping_delay_disconnect\", StringComparison.OrdinalIgnoreCase)\r\n                || string.Equals(caption, \"messages.container\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                //save items to history\r\n                historyItem = new HistoryItem\r\n                {\r\n                    SendTime = DateTime.Now,\r\n                    //SendBeforeTime = sendBeforeTime,\r\n                    Caption = caption,\r\n                    Object = obj,\r\n                    Message = transportMessage,\r\n                    Callback = t => callback((T)t),\r\n                    AttemptFailed = null,\r\n                    FaultCallback = faultCallback,\r\n                    ClientTicksDelta = clientsTicksDelta,\r\n                    Status = RequestStatus.Sent,\r\n                };\r\n\r\n                lock (_historyRoot)\r\n                {\r\n                    _history[historyItem.Hash] = historyItem;\r\n                }\r\n#if DEBUG\r\n                NotifyOfPropertyChange(() => History);\r\n#endif\r\n            }\r\n\r\n            //Debug.WriteLine(\">>{0, -30} MsgId {1} SeqNo {2, -4} SessionId {3}\", caption, transportMessage.MessageId.Value, transportMessage.SeqNo.Value, transportMessage.SessionId.Value);\r\n\r\n            var captionString = string.Format(\"{0} {1}\", caption, transportMessage.MessageId);\r\n\r\n            SendPacketAsync(transport, captionString, encryptedMessage,\r\n                result =>\r\n                {\r\n                    if (!result)\r\n                    {\r\n                        if (historyItem != null)\r\n                        {\r\n                            lock (_historyRoot)\r\n                            {\r\n                                _history.Remove(historyItem.Hash);\r\n                            }\r\n#if DEBUG\r\n                            NotifyOfPropertyChange(() => History);\r\n#endif\r\n                        }\r\n                        faultCallback.SafeInvoke(new TLRPCError(404) { Message = new TLString(\"FastCallback SocketError=\" + result) });\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n                    if (historyItem != null)\r\n                    {\r\n                        lock (_historyRoot)\r\n                        {\r\n                            _history.Remove(historyItem.Hash);\r\n                        }\r\n#if DEBUG\r\n                        NotifyOfPropertyChange(() => History);\r\n#endif\r\n                    }\r\n                    faultCallback.SafeInvoke(new TLRPCError(404)\r\n                    {\r\n#if WINDOWS_PHONE\r\n                        SocketError = error.Error,\r\n#endif\r\n                        Exception = error.Exception\r\n                    });\r\n                });\r\n        }\r\n\r\n        private readonly object _initConnectionSyncRoot = new object();\r\n\r\n        private void SendInformativeMessageByTransport<T>(ITransport transport, string caption, TLObject obj, Action<T> callback, Action<TLRPCError> faultCallback = null,\r\n            int? maxAttempt = null,                 // to send delayed items\r\n            Action<int> attemptFailed = null)       // to send delayed items\r\n            where T : TLObject\r\n        {\r\n            bool isInitialized;\r\n            lock (transport.SyncRoot)\r\n            {\r\n                isInitialized = transport.AuthKey != null;\r\n            }\r\n\r\n            if (!isInitialized)\r\n            {\r\n                faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"transport \" + transport.DCId + \" \" + caption + \" delayed send is not supported\") });\r\n\r\n                //                var delayedItem = new DelayedItem\r\n                //                {\r\n                //                    SendTime = DateTime.Now,\r\n                //                    Caption = caption,\r\n                //                    Object = obj,\r\n                //                    Callback = t => callback((T)t),\r\n                //                    AttemptFailed = attemptFailed,\r\n                //                    FaultCallback = faultCallback,\r\n                //                    MaxAttempt = maxAttempt\r\n                //                };\r\n                //#if LOG_REGISTRATION\r\n                //                    TLUtils.WriteLog(DateTime.Now.ToLocalTime() + \": Enqueue delayed item\\n \" + delayedItem); \r\n                //#endif\r\n                //                lock (_delayedItemsRoot)\r\n                //                {\r\n                //                    _delayedItems.Add(delayedItem);\r\n                //                }\r\n\r\n                return;\r\n            }\r\n\r\n            lock (transport.SyncRoot)\r\n            {\r\n                if (transport.Closed)\r\n                {\r\n                    var transportSettings = new TransportSettings\r\n                    {\r\n                        DcId = transport.DCId,\r\n                        Secret = transport.Secret,\r\n                        AuthKey = transport.AuthKey,\r\n                        Salt = transport.Salt,\r\n                        SessionId = transport.SessionId,\r\n                        MessageIdDict = transport.MessageIdDict,\r\n                        SequenceNumber = transport.SequenceNumber,\r\n                        ClientTicksDelta = transport.ClientTicksDelta,\r\n                        PacketReceivedHandler = OnPacketReceivedByTransport\r\n                    };\r\n\r\n                    transport = transport.MTProtoType == MTProtoTransportType.Special\r\n                        ? GetSpecialTransport(transport.Host, transport.Port, Type, transportSettings)\r\n                        : GetFileTransport(transport.Host, transport.Port, Type, transportSettings);\r\n                }\r\n            }\r\n\r\n            PrintCaption(caption);\r\n\r\n            TLObject data;\r\n            int sequenceNumber;\r\n            TLLong messageId;\r\n            lock (transport.SyncRoot)\r\n            {\r\n                if (!transport.Initiated || caption == \"auth.sendCode\")\r\n                {\r\n                    var initConnection = new TLInitConnection78\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        AppId = new TLInt(Constants.ApiId),\r\n                        AppVersion = new TLString(_deviceInfo.AppVersion),\r\n                        Data = obj,\r\n                        DeviceModel = new TLString(_deviceInfo.Model),\r\n                        SystemLangCode = new TLString(Utils.CurrentUICulture()),\r\n                        LangPack = TLString.Empty,\r\n                        LangCode = new TLString(Utils.CurrentUICulture()),\r\n                        SystemVersion = new TLString(_deviceInfo.SystemVersion),\r\n                        Proxy = TLUtils.GetInputProxy(_transportService.GetProxyConfig())\r\n                    };\r\n\r\n                    var withLayerN = new TLInvokeWithLayerN { Data = initConnection };\r\n                    data = withLayerN;\r\n                    transport.Initiated = true;\r\n                }\r\n                else\r\n                {\r\n                    data = obj;\r\n                }\r\n\r\n                sequenceNumber = transport.SequenceNumber * 2 + 1;\r\n                transport.SequenceNumber++;\r\n                messageId = transport.GenerateMessageId(true);\r\n            }\r\n\r\n            var authKey = transport.AuthKey;\r\n            var salt = transport.Salt;\r\n            var sessionId = transport.SessionId;\r\n            var clientsTicksDelta = transport.ClientTicksDelta;\r\n            var dcId = transport.DCId;\r\n            var transportMessage = CreateTLTransportMessage(salt, sessionId, new TLInt(sequenceNumber), messageId, data);\r\n            var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n            var historyItem = new HistoryItem\r\n            {\r\n                SendTime = DateTime.Now,\r\n                Caption = caption,\r\n                Object = obj,\r\n                Message = transportMessage,\r\n                Callback = t => callback((T)t),\r\n                FaultCallback = faultCallback,\r\n                ClientTicksDelta = clientsTicksDelta,\r\n                Status = RequestStatus.Sent,\r\n\r\n                DCId = dcId\r\n            };\r\n\r\n            lock (_historyRoot)\r\n            {\r\n                _history[historyItem.Hash] = historyItem;\r\n            }\r\n#if DEBUG\r\n            NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n            //Debug.WriteLine(\">> {4} {0, -30} MsgId {1} SeqNo {2, -4} SessionId {3}\", caption, transportMessage.MessageId, transportMessage.SeqNo, transportMessage.SessionId, historyItem.DCId);\r\n            var captionString = string.Format(\"{0} {1} {2}\", caption, transportMessage.SessionId, transportMessage.MessageId);\r\n            SendPacketAsync(transport, captionString,\r\n                encryptedMessage,\r\n                result =>\r\n                {\r\n                    if (!result)\r\n                    {\r\n                        lock (_historyRoot)\r\n                        {\r\n                            _history.Remove(historyItem.Hash);\r\n                        }\r\n#if DEBUG\r\n                        NotifyOfPropertyChange(() => History);\r\n#endif\r\n                        faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"FastCallback SocketError=\" + result) });\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n                    lock (_historyRoot)\r\n                    {\r\n                        _history.Remove(historyItem.Hash);\r\n                    }\r\n#if DEBUG\r\n                    NotifyOfPropertyChange(() => History);\r\n#endif\r\n                    faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404) });\r\n                });\r\n        }\r\n\r\n        private void SaveInitConnectionAsync(TLInitConnection initConnection)\r\n        {\r\n            Execute.BeginOnThreadPool(() => TLUtils.SaveObjectToMTProtoFile(_initConnectionSyncRoot, Constants.InitConnectionFileName, initConnection));\r\n        }\r\n\r\n        private void SendNonEncryptedMessageByTransport<T>(ITransport transport, string caption, TLObject obj, Action<T> callback, Action<TLRPCError> faultCallback = null) where T : TLObject\r\n        {\r\n            PrintCaption(caption);\r\n\r\n            TLLong messageId;\r\n            lock (transport.SyncRoot)\r\n            {\r\n                messageId = transport.GenerateMessageId();\r\n            }\r\n            var message = CreateTLNonEncryptedMessage(messageId, obj);\r\n\r\n            var historyItem = new HistoryItem\r\n            {\r\n                Caption = caption,\r\n                Message = message,\r\n                Callback = t => callback((T)t),\r\n                FaultCallback = faultCallback,\r\n                SendTime = DateTime.Now,\r\n                Status = RequestStatus.Sent\r\n            };\r\n\r\n            var guid = message.MessageId;\r\n            lock (transport.SyncRoot)\r\n            {\r\n                if (transport.Closed)\r\n                {\r\n                    var transportSettings = new TransportSettings\r\n                    {\r\n                        DcId = transport.DCId,\r\n                        Secret = transport.Secret,\r\n                        AuthKey = transport.AuthKey,\r\n                        Salt = transport.Salt,\r\n                        SessionId = transport.SessionId,\r\n                        MessageIdDict = transport.MessageIdDict,\r\n                        SequenceNumber = transport.SequenceNumber,\r\n                        ClientTicksDelta = transport.ClientTicksDelta,\r\n                        PacketReceivedHandler = OnPacketReceivedByTransport\r\n                    };\r\n\r\n                    transport = transport.MTProtoType == MTProtoTransportType.Special\r\n                        ? GetSpecialTransport(transport.Host, transport.Port, Type, transportSettings)\r\n                        : GetFileTransport(transport.Host, transport.Port, Type, transportSettings);\r\n                }\r\n            }\r\n\r\n            transport.EnqueueNonEncryptedItem(historyItem);\r\n\r\n            var captionString = string.Format(\"{0} {1}\", caption, guid);\r\n            SendPacketAsync(transport, captionString, message,\r\n                socketError =>\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(caption + \" SocketError=\" + socketError);\r\n#endif\r\n                    if (!socketError)\r\n                    {\r\n                        transport.RemoveNonEncryptedItem(historyItem);\r\n\r\n                        // connection is unsuccessfully\r\n                        faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"FastCallback SocketError=\" + socketError) });\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n                    transport.RemoveNonEncryptedItem(historyItem);\r\n\r\n                    faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404) });\r\n                });\r\n        }\r\n\r\n        public void MessageAcknowledgmentsByTransport(ITransport transport, TLVector<TLLong> ids)\r\n        {\r\n            PrintCaption(\"msgs_ack\");\r\n            TLUtils.WriteLine(\"ids\");\r\n            foreach (var id in ids)\r\n            {\r\n                TLUtils.WriteLine(TLUtils.MessageIdString(id));\r\n            }\r\n            var obj = new TLMessageAcknowledgments { MsgIds = ids };\r\n\r\n            var authKey = transport.AuthKey;\r\n            var sesseionId = transport.SessionId;\r\n            var salt = transport.Salt;\r\n\r\n            int sequenceNumber;\r\n            TLLong messageId;\r\n            lock (transport.SyncRoot)\r\n            {\r\n                sequenceNumber = transport.SequenceNumber * 2;\r\n                messageId = transport.GenerateMessageId(true);\r\n            }\r\n            var transportMessage = CreateTLTransportMessage(salt, sesseionId, new TLInt(sequenceNumber), messageId, obj);\r\n            var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n            lock (transport.SyncRoot)\r\n            {\r\n                if (transport.Closed)\r\n                {\r\n                    transport = GetTransport(transport.Host, transport.Port, Type,\r\n                        new TransportSettings\r\n                        {\r\n                            DcId = transport.DCId,\r\n                            Secret = transport.Secret,\r\n                            AuthKey = transport.AuthKey,\r\n                            Salt = transport.Salt,\r\n                            SessionId = transport.SessionId,\r\n                            MessageIdDict = _activeTransport.MessageIdDict,\r\n                            SequenceNumber = transport.SequenceNumber,\r\n                            ClientTicksDelta = transport.ClientTicksDelta,\r\n                            PacketReceivedHandler = OnPacketReceivedByTransport\r\n                        });\r\n                }\r\n            }\r\n\r\n            lock (_debugRoot)\r\n            {\r\n                //Debug.WriteLine(\">>{0, -30} MsgId {1} SeqNo {2, -4} SessionId {3}\\nids:\", \"msgs_ack\", transportMessage.MessageId.Value, transportMessage.SeqNo.Value, transportMessage.SessionId.Value);\r\n                foreach (var id in ids)\r\n                {\r\n                    Debug.WriteLine(id.Value);\r\n                }\r\n            }\r\n\r\n            var captionString = string.Format(\"msgs_ack {0}\", transportMessage.MessageId);\r\n            SendPacketAsync(transport, captionString, encryptedMessage,\r\n                result =>\r\n                {\r\n                    //Debug.WriteLine(\"@msgs_ack {0} result {1}\", transportMessage.MessageId, result);\r\n                    //ReceiveBytesAsync(result, authKey);\r\n                },\r\n                error =>\r\n                {\r\n                    //Debug.WriteLine(\"<<msgs_ack failed \" + transportMessage.MessageId);\r\n                });\r\n        }\r\n\r\n        private void ProcessBadMessageByTransport(ITransport transport, TLTransportMessage message, TLBadMessageNotification badMessage, HistoryItem historyItem)\r\n        {\r\n            if (historyItem == null) return;\r\n\r\n            switch (badMessage.ErrorCode.Value)\r\n            {\r\n                case 16:\r\n                case 17:\r\n                    var errorInfo = new StringBuilder();\r\n                    errorInfo.AppendLine(\"0. CORRECT TIME DELTA by Transport \" + transport.DCId);\r\n                    errorInfo.AppendLine(historyItem.Caption);\r\n\r\n                    lock (_historyRoot)\r\n                    {\r\n                        _history.Remove(historyItem.Hash);\r\n                    }\r\n#if DEBUG\r\n                    NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n                    var saveConfig = false;\r\n                    lock (transport.SyncRoot)\r\n                    {\r\n                        var serverTime = message.MessageId.Value;\r\n                        var clientTime = transport.GenerateMessageId().Value;\r\n\r\n                        var serverDateTime = Utils.UnixTimestampToDateTime(serverTime >> 32);\r\n                        var clientDateTime = Utils.UnixTimestampToDateTime(clientTime >> 32);\r\n\r\n                        errorInfo.AppendLine(\"Server time: \" + serverDateTime);\r\n                        errorInfo.AppendLine(\"Client time: \" + clientDateTime);\r\n\r\n                        if (historyItem.ClientTicksDelta == transport.ClientTicksDelta)\r\n                        {\r\n                            transport.ClientTicksDelta += serverTime - clientTime;\r\n                            saveConfig = true;\r\n                            errorInfo.AppendLine(\"Set ticks delta: \" + transport.ClientTicksDelta + \"(\" + (serverDateTime - clientDateTime).TotalSeconds + \" seconds)\");\r\n                        }\r\n                    }\r\n\r\n                    if (saveConfig && _config != null)\r\n                    {\r\n                        var dcOption = _config.DCOptions.FirstOrDefault(x => string.Equals(x.IpAddress.ToString(), transport.Host, StringComparison.OrdinalIgnoreCase));\r\n                        if (dcOption != null)\r\n                        {\r\n                            dcOption.ClientTicksDelta = transport.ClientTicksDelta;\r\n                            _cacheService.SetConfig(_config);\r\n                        }\r\n                    }\r\n\r\n                    TLUtils.WriteLine(errorInfo.ToString(), LogSeverity.Error);\r\n\r\n\r\n                    // TODO: replace with SendInformativeMessage\r\n                    var transportMessage = (TLContainerTransportMessage)historyItem.Message;\r\n                    int sequenceNumber;\r\n                    lock (transport.SyncRoot)\r\n                    {\r\n                        if (transportMessage.SeqNo.Value % 2 == 0)\r\n                        {\r\n                            sequenceNumber = 2 * transport.SequenceNumber;\r\n                        }\r\n                        else\r\n                        {\r\n                            sequenceNumber = 2 * transport.SequenceNumber + 1;\r\n                            transport.SequenceNumber++;\r\n                        }\r\n\r\n                        transportMessage.SeqNo = new TLInt(sequenceNumber);\r\n                        transportMessage.MessageId = transport.GenerateMessageId(true);\r\n                    }\r\n                    TLUtils.WriteLine(\"Corrected client time: \" + TLUtils.MessageIdString(transportMessage.MessageId));\r\n                    var authKey = transport.AuthKey;\r\n                    var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n                    lock (_historyRoot)\r\n                    {\r\n                        _history[historyItem.Hash] = historyItem;\r\n                    }\r\n\r\n                    var faultCallback = historyItem.FaultCallback;\r\n\r\n                    lock (transport.SyncRoot)\r\n                    {\r\n                        if (transport.Closed)\r\n                        {\r\n                            var transportSettings = new TransportSettings\r\n                            {\r\n                                DcId = transport.DCId,\r\n                                Secret = transport.Secret,\r\n                                AuthKey = transport.AuthKey,\r\n                                Salt = transport.Salt,\r\n                                SessionId = transport.SessionId,\r\n                                MessageIdDict = _activeTransport.MessageIdDict,\r\n                                SequenceNumber = transport.SequenceNumber,\r\n                                ClientTicksDelta = transport.ClientTicksDelta,\r\n                                PacketReceivedHandler = OnPacketReceivedByTransport\r\n                            };\r\n\r\n                            transport = transport.MTProtoType == MTProtoTransportType.Special\r\n                                ? GetSpecialTransport(transport.Host, transport.Port, Type, transportSettings)\r\n                                : GetFileTransport(transport.Host, transport.Port, Type, transportSettings);\r\n                        }\r\n                    }\r\n                    //Debug.WriteLine(\">>{0, -30} MsgId {1} SeqNo {2,-4} SessionId {3} BadMsgId {4}\", string.Format(\"{0}: {1}\", historyItem.Caption, \"time\"), transportMessage.MessageId.Value, transportMessage.SeqNo.Value, message.SessionId.Value, badMessage.BadMessageId.Value);\r\n                    var captionString = string.Format(\"{0} {1} {2}\", historyItem.Caption, message.SessionId, transportMessage.MessageId);\r\n                    SendPacketAsync(transport, captionString,\r\n                        encryptedMessage,\r\n                        result =>\r\n                        {\r\n                            Debug.WriteLine(\"@{0} {1} result {2}\", string.Format(\"{0}: {1}\", historyItem.Caption, \"time\"), transportMessage.MessageId.Value, result);\r\n\r\n                        },//ReceiveBytesAsync(result, authKey),\r\n                    error =>\r\n                    {\r\n                        lock (_historyRoot)\r\n                        {\r\n                            _history.Remove(historyItem.Hash);\r\n                        }\r\n#if DEBUG\r\n                        NotifyOfPropertyChange(() => History);\r\n#endif\r\n                        faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404) });\r\n                    });\r\n\r\n                    //_activeTransport.SendPacketAsync(historyItem.Caption + \" \" + transportMessage.MessageId, \r\n                    //    encryptedMessage.ToBytes(), result => ReceiveBytesAsync(result, authKey), \r\n                    //    () => { if (faultCallback != null) faultCallback(null); });\r\n\r\n                    break;\r\n\r\n                case 32:\r\n                case 33:\r\n                    TLUtils.WriteLine(string.Format(\"ErrorCode={0} INCORRECT MSGSEQNO BY TRANSPORT TO DCID={2}, CREATE NEW SESSION {1}\", badMessage.ErrorCode.Value, historyItem.Caption, transport.DCId), LogSeverity.Error);\r\n                    Execute.ShowDebugMessage(string.Format(\"ErrorCode={0} INCORRECT MSGSEQNO BY TRANSPORT TO DCID={2}, CREATE NEW SESSION {1}\", badMessage.ErrorCode.Value, historyItem.Caption, transport.DCId));\r\n\r\n                    var previousMessageId = historyItem.Hash;\r\n\r\n                    // fix seqNo with creating new Session\r\n                    lock (transport.SyncRoot)\r\n                    {\r\n                        transport.SessionId = TLLong.Random();\r\n                        transport.SequenceNumber = 0;\r\n                        transportMessage = (TLTransportMessage)historyItem.Message;\r\n                        if (transportMessage.SeqNo.Value % 2 == 0)\r\n                        {\r\n                            sequenceNumber = 2 * transport.SequenceNumber;\r\n                        }\r\n                        else\r\n                        {\r\n                            sequenceNumber = 2 * transport.SequenceNumber + 1;\r\n                            transport.SequenceNumber++;\r\n                        }\r\n\r\n                        transportMessage.SeqNo = new TLInt(sequenceNumber);\r\n                        transportMessage.MessageId = transport.GenerateMessageId(true);\r\n                    }\r\n                    ((TLTransportMessage)transportMessage).SessionId = transport.SessionId;\r\n\r\n\r\n                    // TODO: replace with SendInformativeMessage\r\n                    TLUtils.WriteLine(\"Corrected client time: \" + TLUtils.MessageIdString(transportMessage.MessageId));\r\n                    authKey = transport.AuthKey;\r\n                    encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n                    lock (_historyRoot)\r\n                    {\r\n                        _history.Remove(previousMessageId);\r\n                        _history[historyItem.Hash] = historyItem;\r\n                    }\r\n\r\n                    faultCallback = historyItem.FaultCallback;\r\n\r\n                    lock (transport.SyncRoot)\r\n                    {\r\n                        if (transport.Closed)\r\n                        {\r\n                            var transportSettings = new TransportSettings\r\n                            {\r\n                                DcId = transport.DCId,\r\n                                Secret = transport.Secret,\r\n                                AuthKey = transport.AuthKey,\r\n                                Salt = transport.Salt,\r\n                                SessionId = transport.SessionId,\r\n                                MessageIdDict = _activeTransport.MessageIdDict,\r\n                                SequenceNumber = transport.SequenceNumber,\r\n                                ClientTicksDelta = transport.ClientTicksDelta,\r\n                                PacketReceivedHandler = OnPacketReceivedByTransport\r\n                            };\r\n\r\n                            transport = transport.MTProtoType == MTProtoTransportType.Special\r\n                                ? GetSpecialTransport(transport.Host, transport.Port, Type, transportSettings)\r\n                                : GetFileTransport(transport.Host, transport.Port, Type, transportSettings);\r\n                        }\r\n                    }\r\n                    //Debug.WriteLine(\">>{0, -30} MsgId {1} SeqNo {2,-4} SessionId {3} BadMsgId {4}\", string.Format(\"{0}: {1}\", historyItem.Caption, \"seqNo\"), transportMessage.MessageId.Value, transportMessage.SeqNo.Value, message.SessionId.Value, badMessage.BadMessageId.Value);\r\n                    captionString = string.Format(\"{0} {1} {2}\", historyItem.Caption, message.SessionId, transportMessage.MessageId);\r\n                    SendPacketAsync(transport, captionString,\r\n                        encryptedMessage,\r\n                        result =>\r\n                        {\r\n                            Debug.WriteLine(\"@{0} {1} result {2}\", string.Format(\"{0}: {1}\", historyItem.Caption, \"seqNo\"), transportMessage.MessageId.Value, result);\r\n\r\n                        },//ReceiveBytesAsync(result, authKey)}, \r\n                        error => { if (faultCallback != null) faultCallback(null); });\r\n\r\n                    break;\r\n            }\r\n        }\r\n\r\n        private void ProcessBadServerSaltByTransport(ITransport transport, TLTransportMessage message, TLBadServerSalt badServerSalt, HistoryItem historyItem)\r\n        {\r\n            if (historyItem == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var transportMessage = (TLContainerTransportMessage)historyItem.Message;\r\n            lock (_historyRoot)\r\n            {\r\n                _history.Remove(historyItem.Hash);\r\n            }\r\n#if DEBUG\r\n            NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n            TLUtils.WriteLine(\"CORRECT SERVER SALT:\");\r\n            ((TLTransportMessage)transportMessage).Salt = badServerSalt.NewServerSalt;\r\n            //Salt = badServerSalt.NewServerSalt;\r\n            TLUtils.WriteLine(\"New salt: \" + transport.Salt);\r\n\r\n            switch (badServerSalt.ErrorCode.Value)\r\n            {\r\n                case 16:\r\n                case 17:\r\n                    TLUtils.WriteLine(\"1. CORRECT TIME DELTA with salt by transport \" + transport.DCId);\r\n\r\n                    var saveConfig = false;\r\n                    long serverTime;\r\n                    long clientTime;\r\n                    lock (transport.SyncRoot)\r\n                    {\r\n                        serverTime = message.MessageId.Value;\r\n                        clientTime = transport.GenerateMessageId().Value;\r\n\r\n                        TLUtils.WriteLine(\"Server time: \" + TLUtils.MessageIdString(BitConverter.GetBytes(serverTime)));\r\n                        TLUtils.WriteLine(\"Client time: \" + TLUtils.MessageIdString(BitConverter.GetBytes(clientTime)));\r\n\r\n                        if (historyItem.ClientTicksDelta == transport.ClientTicksDelta)\r\n                        {\r\n                            saveConfig = true;\r\n                            transport.ClientTicksDelta += serverTime - clientTime;\r\n                        }\r\n\r\n                        transportMessage.MessageId = transport.GenerateMessageId(true);\r\n                        TLUtils.WriteLine(\"Corrected client time: \" + TLUtils.MessageIdString(transportMessage.MessageId));\r\n                    }\r\n\r\n                    if (saveConfig && _config != null)\r\n                    {\r\n                        var dcOption = _config.DCOptions.FirstOrDefault(x => string.Equals(x.IpAddress.ToString(), transport.Host, StringComparison.OrdinalIgnoreCase));\r\n                        if (dcOption != null)\r\n                        {\r\n                            dcOption.ClientTicksDelta += serverTime - clientTime;\r\n                            _cacheService.SetConfig(_config);\r\n                        }\r\n                    }\r\n\r\n                    break;\r\n                case 48:\r\n                    break;\r\n            }\r\n\r\n            if (transportMessage == null) return;\r\n\r\n            var authKey = transport.AuthKey;\r\n            var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n            lock (_historyRoot)\r\n            {\r\n                _history[historyItem.Hash] = historyItem;\r\n            }\r\n            var faultCallback = historyItem.FaultCallback;\r\n\r\n            lock (transport.SyncRoot)\r\n            {\r\n                if (transport.Closed)\r\n                {\r\n                    transport = GetTransport(transport.Host, transport.Port, Type,\r\n                        new TransportSettings\r\n                        {\r\n                            DcId = transport.DCId,\r\n                            Secret = transport.Secret,\r\n                            AuthKey = transport.AuthKey,\r\n                            Salt = transport.Salt,\r\n                            SessionId = transport.SessionId,\r\n                            MessageIdDict = _activeTransport.MessageIdDict,\r\n                            SequenceNumber = transport.SequenceNumber,\r\n                            ClientTicksDelta = transport.ClientTicksDelta,\r\n                            PacketReceivedHandler = OnPacketReceivedByTransport\r\n                        });\r\n                }\r\n            }\r\n\r\n            var captionString = string.Format(\"{0} {1}\", historyItem.Caption, transportMessage.MessageId);\r\n            SendPacketAsync(transport, captionString,\r\n                encryptedMessage,\r\n                result =>\r\n                {\r\n                    Debug.WriteLine(\"@{0} {1} result {2}\", historyItem.Caption, transportMessage.MessageId.Value, result);\r\n\r\n                },//ReceiveBytesAsync(result, authKey)}, \r\n                error => { if (faultCallback != null) faultCallback(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"TCPTransport error\") }); });\r\n        }\r\n\r\n        private void ProcessRPCErrorByTransport(ITransport transport, TLRPCError error, HistoryItem historyItem, long keyId)\r\n        {\r\n            if (error.CodeEquals(ErrorCode.UNAUTHORIZED))\r\n            {\r\n                Execute.ShowDebugMessage(string.Format(\"RPCError ByTransport {2} {0} {1}\", historyItem.Caption, error, transport.DCId));\r\n\r\n                if (historyItem != null\r\n                    && historyItem.Caption != \"account.updateStatus\"\r\n                    && historyItem.Caption != \"account.registerDevice\"\r\n                    && historyItem.Caption != \"auth.signIn\")\r\n                {\r\n                    if (error.TypeEquals(ErrorType.SESSION_REVOKED))\r\n                    {\r\n\r\n                    }\r\n                    else\r\n                    {\r\n                        // Note! no reauthorization by transport to additional dc\r\n                        //RaiseAuthorizationRequired(new AuthorizationRequiredEventArgs{MethodName = \"ByTransport \" + transport.DCId + \" \" + historyItem.Caption, Error = error, AuthKeyId = keyId});\r\n                        historyItem.FaultCallback.SafeInvoke(error);\r\n                    }\r\n                }\r\n                else if (historyItem != null && historyItem.FaultCallback != null)\r\n                {\r\n                    historyItem.FaultCallback(error);\r\n                }\r\n            }\r\n            else if (error.CodeEquals(ErrorCode.ERROR_SEE_OTHER)\r\n                && (error.TypeStarsWith(ErrorType.NETWORK_MIGRATE)\r\n                    || error.TypeStarsWith(ErrorType.PHONE_MIGRATE)\r\n                //|| error.TypeStarsWith(ErrorType.FILE_MIGRATE)\r\n                    ))\r\n            {\r\n                var serverNumber = Convert.ToInt32(\r\n                    error.GetErrorTypeString()\r\n                    .Replace(ErrorType.NETWORK_MIGRATE.ToString(), string.Empty)\r\n                    .Replace(ErrorType.PHONE_MIGRATE.ToString(), string.Empty)\r\n                    //.Replace(ErrorType.FILE_MIGRATE.ToString(), string.Empty)\r\n                    .Replace(\"_\", string.Empty));\r\n\r\n                if (_config == null\r\n                    || TLUtils.GetDCOption(_config, new TLInt(serverNumber)) == null)\r\n                {\r\n                    GetConfigAsync(config =>\r\n                    {\r\n                        _config = TLConfig.Merge(_config, config);\r\n                        SaveConfig();\r\n                        if (historyItem.Object.GetType() == typeof(TLSendCode))\r\n                        {\r\n                            var dcOption = TLUtils.GetDCOption(_config, new TLInt(serverNumber));\r\n\r\n                            lock (transport.SyncRoot)\r\n                            {\r\n                                transport = GetTransport(dcOption.IpAddress.ToString(), dcOption.Port.Value, Type,\r\n                                    new TransportSettings\r\n                                    {\r\n                                        DcId = dcOption.Id.Value,\r\n                                        AuthKey = dcOption.AuthKey,\r\n                                        Secret = TLUtils.ParseSecret(dcOption),\r\n                                        Salt = dcOption.Salt,\r\n                                        SessionId = TLLong.Random(),\r\n                                        MessageIdDict = new Dictionary<long, long>(),\r\n                                        SequenceNumber = 0,\r\n                                        ClientTicksDelta = dcOption.ClientTicksDelta,\r\n                                        PacketReceivedHandler = OnPacketReceivedByTransport\r\n                                    });\r\n                            }\r\n                            lock (transport.SyncRoot)\r\n                            {\r\n                                transport.Initialized = false;\r\n                            }\r\n                            InitTransportAsync(transport, tuple =>\r\n                            {\r\n                                lock (transport.SyncRoot)\r\n                                {\r\n                                    transport.DCId = serverNumber;\r\n                                    transport.AuthKey = tuple.Item1;\r\n                                    transport.Salt = tuple.Item2;\r\n                                    transport.SessionId = tuple.Item3;\r\n                                }\r\n                                var authKeyId = TLUtils.GenerateLongAuthKeyId(tuple.Item1);\r\n\r\n                                lock (_authKeysRoot)\r\n                                {\r\n                                    if (!_authKeys.ContainsKey(authKeyId))\r\n                                    {\r\n                                        _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = tuple.Item1, AutkKeyId = authKeyId });\r\n                                    }\r\n                                }\r\n\r\n                                dcOption.AuthKey = tuple.Item1;\r\n                                dcOption.Salt = tuple.Item2;\r\n                                dcOption.SessionId = tuple.Item3;\r\n\r\n                                _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(dcOption);\r\n                                _cacheService.SetConfig(_config);\r\n\r\n                                lock (transport.SyncRoot)\r\n                                {\r\n                                    transport.Initialized = true;\r\n                                }\r\n                                RaiseInitialized();\r\n\r\n                                SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback);\r\n                            },\r\n                            er =>\r\n                            {\r\n                                lock (transport.SyncRoot)\r\n                                {\r\n                                    transport.Initialized = false;\r\n                                }\r\n                                historyItem.FaultCallback.SafeInvoke(er);\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            MigrateAsync(serverNumber, auth => SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback));\r\n                        }\r\n                    });\r\n\r\n                }\r\n                else\r\n                {\r\n                    if (historyItem.Object.GetType() == typeof(TLSendCode)\r\n                        || historyItem.Object.GetType() == typeof(TLGetFile))\r\n                    {\r\n                        var activeDCOption = TLUtils.GetDCOption(_config, new TLInt(serverNumber));\r\n\r\n                        lock (transport.SyncRoot)\r\n                        {\r\n                            transport = GetTransport(activeDCOption.IpAddress.ToString(), activeDCOption.Port.Value, Type,\r\n                                new TransportSettings\r\n                                {\r\n                                    DcId = activeDCOption.Id.Value,\r\n                                    Secret = TLUtils.ParseSecret(activeDCOption),\r\n                                    AuthKey = activeDCOption.AuthKey,\r\n                                    Salt = activeDCOption.Salt,\r\n                                    SessionId = TLLong.Random(),\r\n                                    MessageIdDict = new Dictionary<long, long>(),\r\n                                    SequenceNumber = 0,\r\n                                    ClientTicksDelta = activeDCOption.ClientTicksDelta,\r\n                                    PacketReceivedHandler = OnPacketReceivedByTransport\r\n                                });\r\n                        }\r\n\r\n                        if (activeDCOption.AuthKey == null)\r\n                        {\r\n                            lock (transport.SyncRoot)\r\n                            {\r\n                                transport.Initialized = false;\r\n                            }\r\n                            InitTransportAsync(transport, tuple =>\r\n                            {\r\n                                lock (transport.SyncRoot)\r\n                                {\r\n                                    transport.DCId = serverNumber;\r\n                                    transport.AuthKey = tuple.Item1;\r\n                                    transport.Salt = tuple.Item2;\r\n                                    transport.SessionId = tuple.Item3;\r\n                                }\r\n\r\n                                var authKeyId = TLUtils.GenerateLongAuthKeyId(tuple.Item1);\r\n\r\n                                lock (_authKeysRoot)\r\n                                {\r\n                                    if (!_authKeys.ContainsKey(authKeyId))\r\n                                    {\r\n                                        _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = tuple.Item1, AutkKeyId = authKeyId });\r\n                                    }\r\n                                }\r\n\r\n                                activeDCOption.AuthKey = tuple.Item1;\r\n                                activeDCOption.Salt = tuple.Item2;\r\n                                activeDCOption.SessionId = tuple.Item3;\r\n\r\n                                _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(activeDCOption);\r\n                                _cacheService.SetConfig(_config);\r\n\r\n                                lock (transport.SyncRoot)\r\n                                {\r\n                                    transport.Initialized = true;\r\n                                }\r\n\r\n                                RaiseInitialized();\r\n                                SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback);\r\n                            },\r\n                            er =>\r\n                            {\r\n                                lock (transport.SyncRoot)\r\n                                {\r\n                                    transport.Initialized = false;\r\n                                }\r\n                                historyItem.FaultCallback.SafeInvoke(er);\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            lock (transport.SyncRoot)\r\n                            {\r\n                                transport.AuthKey = activeDCOption.AuthKey;\r\n                                transport.Salt = activeDCOption.Salt;\r\n                                transport.SessionId = TLLong.Random();\r\n                            }\r\n                            var authKeyId = TLUtils.GenerateLongAuthKeyId(activeDCOption.AuthKey);\r\n\r\n                            lock (_authKeysRoot)\r\n                            {\r\n                                if (!_authKeys.ContainsKey(authKeyId))\r\n                                {\r\n                                    _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = activeDCOption.AuthKey, AutkKeyId = authKeyId });\r\n                                }\r\n                            }\r\n\r\n\r\n                            _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(activeDCOption);\r\n                            _cacheService.SetConfig(_config);\r\n\r\n                            lock (transport.SyncRoot)\r\n                            {\r\n                                transport.Initialized = true;\r\n                            }\r\n                            RaiseInitialized();\r\n\r\n                            SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        MigrateAsync(serverNumber, auth => SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback));\r\n                    }\r\n                }\r\n            }\r\n            else if (historyItem.FaultCallback != null)\r\n            {\r\n                historyItem.FaultCallback(error);\r\n            }\r\n        }\r\n\r\n        private void OnPacketReceivedByTransport(object sender, DataEventArgs e)\r\n        {\r\n            var transport = (ITransport)sender;\r\n            bool isInitialized;\r\n            lock (transport.SyncRoot)\r\n            {\r\n                isInitialized = transport.AuthKey != null;\r\n            }\r\n\r\n            var position = 0;\r\n            var handled = false;\r\n\r\n            if (!isInitialized)\r\n            {\r\n                try\r\n                {\r\n                    var message = TLObject.GetObject<TLNonEncryptedMessage>(e.Data, ref position);\r\n\r\n                    var item = transport.DequeueFirstNonEncryptedItem();\r\n                    if (item != null)\r\n                    {\r\n#if LOG_REGISTRATION\r\n                        TLUtils.WriteLog(\"OnReceivedBytes !IsInitialized try historyItem \" + item.Caption);\r\n#endif\r\n                        item.Callback.SafeInvoke(message.Data);\r\n                    }\r\n                    else\r\n                    {\r\n#if LOG_REGISTRATION\r\n                        TLUtils.WriteLog(\"OnReceivedBytes !IsInitialized cannot try historyItem \");\r\n#endif\r\n                    }\r\n\r\n                    handled = true;\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n#if LOG_REGISTRATION\r\n\r\n                    var sb = new StringBuilder();\r\n                    sb.AppendLine(\"OnPacketReceived !IsInitialized catch Exception: \\n\" + ex);\r\n                    sb.AppendLine(transport.PrintNonEncryptedHistory());\r\n                    TLUtils.WriteLog(sb.ToString());\r\n#endif\r\n                }\r\n\r\n                if (!handled)\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\"OnPacketReceived !IsInitialized !handled invoke ReceiveBytesAsync\");\r\n#endif\r\n                    ReceiveBytesByTransportAsync(transport, e.Data);\r\n                }\r\n            }\r\n            else\r\n            {\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(\"OnPacketReceived IsInitialized invoke ReceiveBytesAsync\");\r\n#endif\r\n                ReceiveBytesByTransportAsync(transport, e.Data);\r\n            }\r\n        }\r\n\r\n        private void DisableMTProtoProxy()\r\n        {\r\n            var proxyConfig = _transportService.GetProxyConfig();\r\n            if (proxyConfig != null && !proxyConfig.IsEmpty && !proxyConfig.IsEnabled.Value)\r\n            {\r\n                var mtProtoProxy = proxyConfig.GetProxy() as TLMTProtoProxy;\r\n                if (mtProtoProxy != null)\r\n                {\r\n                    proxyConfig.IsEnabled = TLBool.False;\r\n                    _transportService.SetProxyConfig(proxyConfig);\r\n\r\n                    var instance = TelegramEventAggregator.Instance;\r\n                    if (instance != null)\r\n                    {\r\n                        instance.Publish(new MTProtoProxyDisabledEventArgs());\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ReceiveBytesByTransportAsync(ITransport transport, byte[] bytes)\r\n        {\r\n            try\r\n            {\r\n                if (bytes.Length == 4)\r\n                {\r\n                    var error = BitConverter.ToInt32(bytes, 0);\r\n                    if (error == -404 || error == -444)\r\n                    {\r\n                        if (error == -444)\r\n                        {\r\n                            DisableMTProtoProxy();\r\n\r\n                            RaiseProxyDisabled();\r\n                        }\r\n\r\n                        var message = string.Format(\"ByTransport dc_id={0} error={1}\", transport.DCId, error);\r\n                        TLUtils.WriteException(new Exception(message));\r\n\r\n                        ResetConnectionByTransport(transport, new Exception(message));\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var position = 0;\r\n                var encryptedMessage = (TLEncryptedTransportMessage)new TLEncryptedTransportMessage().FromBytes(bytes, ref position);\r\n\r\n                encryptedMessage.Decrypt(transport.AuthKey);\r\n\r\n                if (encryptedMessage.Data == null)\r\n                {\r\n                    var message = string.Format(\"ByTransport msgKey mismatch transport_dc_id={0}\", transport.DCId);\r\n\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n\r\n                if (encryptedMessage.Data.Length < 32)\r\n                {\r\n                    var message = string.Format(\"ByTransport padding extension data={0} < 32 transport_dc_id={1}\", encryptedMessage.Data.Length, transport.DCId);\r\n\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n                var messageDataLength = BitConverter.ToInt32(encryptedMessage.Data, 28);\r\n                if (messageDataLength < 0 || messageDataLength % 4 != 0)\r\n                {\r\n                    var message = string.Format(\"ByTransport incorrect length data={0} length={1} transport_dc_id={2}\", encryptedMessage.Data.Length, messageDataLength, transport.DCId);\r\n\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n\r\n                if (32 + messageDataLength > encryptedMessage.Data.Length)\r\n                {\r\n                    var message = string.Format(\"ByTransport padding extension data={0} length={1} transport_dc_id={2}\", encryptedMessage.Data.Length, messageDataLength, transport.DCId);\r\n\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n\r\n                position = 0;\r\n                var transportMessage = TLObject.GetObject<TLTransportMessage>(encryptedMessage.Data, ref position);\r\n\r\n#if MTPROTO\r\n                if (encryptedMessage.Data.Length - position < 12\r\n                    || encryptedMessage.Data.Length - position > 1024)\r\n                {\r\n                    var message = string.Format(\"ByTransport padding extension data={0} position={1} object={2} transport_dc_id={3}\", encryptedMessage.Data.Length, position, transportMessage.MessageData, transport.DCId);\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n#else\r\n                if ((encryptedMessage.Data.Length - position) > 15)\r\n                {\r\n                    var message = string.Format(\"ByTransport padding extension data={0} position={1} object={2}\", encryptedMessage.Data.Length, position, transportMessage.MessageData, transport.DCId);\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n#endif\r\n\r\n                if (transportMessage.SessionId.Value != transport.SessionId.Value)\r\n                {\r\n                    var message = string.Format(\"ByTransport session_id={0} is not equal to transport.session_id={1} transport_dc_id={2}\", transportMessage.SessionId, transport.SessionId, transport.DCId);\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n\r\n                if (transport.MinMessageId != 0)\r\n                {\r\n                    if (transport.MinMessageId > transportMessage.MessageId.Value)\r\n                    {\r\n                        var message = string.Format(\"ByTransport message_id={0} seq_no={1} is higher than transport.min_message_id={2} transport_dc_id={3}\", transportMessage.MessageId, transportMessage.SeqNo, transport.MinMessageId, transport.DCId);\r\n                        TLUtils.WriteException(new Exception(message));\r\n                    }\r\n                }\r\n\r\n                if (transport.MessageIdDict.ContainsKey(transportMessage.MessageId.Value))\r\n                {\r\n                    var message = string.Format(\"ByTransport message_id={0} seq_no={1} already exists transport_dc_id={2}\", transportMessage.MessageId, transportMessage.SeqNo, transport.MinMessageId);\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n\r\n                lock (transport.SyncRoot)\r\n                {\r\n                    transport.MessageIdDict[transportMessage.MessageId.Value] = transportMessage.MessageId.Value;\r\n                }\r\n\r\n                if ((transportMessage.MessageId.Value % 2) == 0)\r\n                {\r\n                    TLUtils.WriteException(new Exception(string.Format(\"ByTransport incorrect message_id transport_dc_id={0}\", transport.MinMessageId)));\r\n                }\r\n\r\n                // get acknowledgments\r\n                foreach (var acknowledgment in TLUtils.FindInnerObjects<TLMessagesAcknowledgment>(transportMessage))\r\n                {\r\n                    var ids = acknowledgment.MessageIds.Items;\r\n                    lock (_historyRoot)\r\n                    {\r\n                        foreach (var id in ids)\r\n                        {\r\n                            if (_history.ContainsKey(id.Value))\r\n                            {\r\n                                _history[id.Value].Status = RequestStatus.Confirmed;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                }\r\n\r\n                // send acknowledgments\r\n                SendAcknowledgmentsByTransport(transport, transportMessage);\r\n\r\n                // updates\r\n                _updatesService.ProcessTransportMessage(transportMessage);\r\n\r\n                // bad messages\r\n                foreach (var badMessage in TLUtils.FindInnerObjects<TLBadMessageNotification>(transportMessage))\r\n                {\r\n\r\n                    HistoryItem item = null;\r\n                    lock (_historyRoot)\r\n                    {\r\n                        if (_history.ContainsKey(badMessage.BadMessageId.Value))\r\n                        {\r\n                            item = _history[badMessage.BadMessageId.Value];\r\n                        }\r\n                    }\r\n                    Logs.Log.Write(string.Format(\"{0} {1} transport={2}\", badMessage, item, transport.DCId));\r\n\r\n                    ProcessBadMessageByTransport(transport, transportMessage, badMessage, item);\r\n                }\r\n\r\n                // bad server salts\r\n                foreach (var badServerSalt in TLUtils.FindInnerObjects<TLBadServerSalt>(transportMessage))\r\n                {\r\n\r\n                    lock (transport.SyncRoot)\r\n                    {\r\n                        transport.Salt = badServerSalt.NewServerSalt;\r\n                    }\r\n                    HistoryItem item = null;\r\n                    lock (_historyRoot)\r\n                    {\r\n                        if (_history.ContainsKey(badServerSalt.BadMessageId.Value))\r\n                        {\r\n                            item = _history[badServerSalt.BadMessageId.Value];\r\n                        }\r\n                    }\r\n                    Logs.Log.Write(string.Format(\"{0} {1} transport={2}\", badServerSalt, item, transport.DCId));\r\n\r\n                    ProcessBadServerSaltByTransport(transport, transportMessage, badServerSalt, item);\r\n                }\r\n\r\n                // new session created\r\n                foreach (var newSessionCreated in TLUtils.FindInnerObjects<TLNewSessionCreated>(transportMessage))\r\n                {\r\n                    TLUtils.WritePerformance(string.Format(\"NEW SESSION CREATED: {0} (old {1})\", transportMessage.SessionId, _activeTransport.SessionId));\r\n                    lock (transport.SyncRoot)\r\n                    {\r\n                        transport.SessionId = transportMessage.SessionId;\r\n                        transport.Salt = newSessionCreated.ServerSalt;\r\n                    }\r\n                }\r\n\r\n                foreach (var pong in TLUtils.FindInnerObjects<TLPong>(transportMessage))\r\n                {\r\n                    HistoryItem item;\r\n                    lock (_historyRoot)\r\n                    {\r\n                        if (_history.ContainsKey(pong.MessageId.Value))\r\n                        {\r\n                            item = _history[pong.MessageId.Value];\r\n                            _history.Remove(pong.MessageId.Value);\r\n                        }\r\n                        else\r\n                        {\r\n                            //Execute.ShowDebugMessage(\"TLPong lost item id=\" + pong.MessageId);\r\n                            continue;\r\n                        }\r\n                    }\r\n#if DEBUG\r\n                    NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n                    if (item != null)\r\n                    {\r\n                        item.Callback.SafeInvoke(pong);\r\n                    }\r\n                }\r\n\r\n                // rpcresults\r\n                foreach (var result in TLUtils.FindInnerObjects<TLRPCResult>(transportMessage))\r\n                {\r\n                    HistoryItem historyItem = null;\r\n\r\n                    lock (_historyRoot)\r\n                    {\r\n                        if (_history.ContainsKey(result.RequestMessageId.Value))\r\n                        {\r\n                            historyItem = _history[result.RequestMessageId.Value];\r\n                            _history.Remove(result.RequestMessageId.Value);\r\n                        }\r\n                        else\r\n                        {\r\n                            continue;\r\n                        }\r\n                    }\r\n#if DEBUG\r\n                    NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n                    //RemoveItemFromSendingQueue(result.RequestMessageId.Value);\r\n\r\n                    var error = result.Object as TLRPCError;\r\n                    if (error != null)\r\n                    {\r\n                        Debug.WriteLine(\"RPCError: \" + error.Code + \" \" + error.Message + \" MsgId \" + result.RequestMessageId.Value);\r\n                        TLUtils.WriteLine(\"RPCError: \" + error.Code + \" \" + error.Message);\r\n\r\n                        string errorString;\r\n                        var reqError = error as TLRPCReqError;\r\n                        if (reqError != null)\r\n                        {\r\n                            errorString = string.Format(\"RPCReqError {1} {2} (query_id={0}) transport=[dc_id={3}]\", reqError.QueryId, reqError.Code, reqError.Message, transport.DCId);\r\n                        }\r\n                        else\r\n                        {\r\n                            errorString = string.Format(\"RPCError {0} {1} transport=[dc_id={2}]\", error.Code, error.Message, transport.DCId);\r\n                        }\r\n\r\n                        Execute.ShowDebugMessage(historyItem + Environment.NewLine + errorString);\r\n                        ProcessRPCErrorByTransport(transport, error, historyItem, encryptedMessage.AuthKeyId.Value);\r\n                        Debug.WriteLine(errorString + \" msg_id=\" + result.RequestMessageId.Value);\r\n                        TLUtils.WriteLine(errorString);\r\n                    }\r\n                    else\r\n                    {\r\n                        var messageData = result.Object;\r\n                        if (messageData is TLGzipPacked)\r\n                        {\r\n                            messageData = ((TLGzipPacked)messageData).Data;\r\n                        }\r\n\r\n                        if (messageData is TLSentMessageBase\r\n                            || messageData is TLStatedMessageBase\r\n                            || messageData is TLUpdatesBase\r\n                            || messageData is TLSentEncryptedMessage\r\n                            || messageData is TLSentEncryptedFile\r\n                            || messageData is TLAffectedHistory\r\n                            || messageData is TLAffectedMessages\r\n                            || historyItem.Object is TLReadChannelHistory\r\n                            || historyItem.Object is TLReadEncryptedHistory)\r\n                        {\r\n                            RemoveFromQueue(historyItem);\r\n                        }\r\n\r\n                        try\r\n                        {\r\n                            historyItem.Callback(messageData);\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n#if LOG_REGISTRATION\r\n                            TLUtils.WriteLog(e.ToString());\r\n#endif\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteException(\"ReceiveBytesByTransportAsync\", e);\r\n\r\n                ResetConnectionByTransport(transport, e);\r\n            }\r\n        }\r\n\r\n        public void ClearHistoryByTransport(ITransport transport)\r\n        {\r\n            _transportService.CloseTransport(transport);\r\n\r\n            lock (_historyRoot)\r\n            {\r\n                var keysToRemove = new List<long>();\r\n                foreach (var keyValue in _history)\r\n                {\r\n                    if (keyValue.Value.Caption.StartsWith(\"msgs_ack\"))\r\n                    {\r\n                        TLUtils.WriteLine(\"!!!!!!MSGS_ACK FAULT!!!!!!!\", LogSeverity.Error);\r\n                        Debug.WriteLine(\"!!!!!!MSGS_ACK FAULT!!!!!!!\");\r\n                    }\r\n                    if (transport.DCId == keyValue.Value.DCId)\r\n                    {\r\n                        keyValue.Value.FaultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"Clear History\") });\r\n                        keysToRemove.Add(keyValue.Key);\r\n                    }\r\n                }\r\n                foreach (var key in keysToRemove)\r\n                {\r\n                    _history.Remove(key);\r\n                }\r\n            }\r\n\r\n            transport.ClearNonEncryptedHistory();\r\n        }\r\n    }\r\n\r\n    public class MTProtoProxyDisabledEventArgs\r\n    {\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Channel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Channels;\r\nusing Telegram.Api.TL.Functions.Updates;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        public void ReadFeedAsync(TLInt feedId, TLFeedPosition maxPosition, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReadFeed { FeedId = feedId, MaxPosition = maxPosition };\r\n\r\n            const string caption = \"channels.readFeed\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    callback(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetFeedAsync(bool offsetToMaxReed, TLInt feedId, TLFeedPosition offsetPosition, TLInt addOffset, TLInt limit, TLFeedPosition maxPosition, TLFeedPosition minPosition, TLInt hash, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetFeed { Flags = new TLInt(0), OffsetToMaxRead = offsetToMaxReed, FeedId = feedId, OffsetPosition = offsetPosition, AddOffset = addOffset, Limit = limit, MaxPosition = maxPosition, MinPosition = minPosition, Hash = hash };\r\n\r\n            const string caption = \"channels.getFeed\";\r\n            SendInformativeMessage<TLMessagesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    callback(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void SetFeedBroadcastsAsync(TLInt feedId, TLVector<TLInputChannelBase> channels, TLBool alsoNewlyJoined, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSetFeedBroadcasts { FeedId = feedId, Channels = channels, AlsoNewlyJoined = alsoNewlyJoined };\r\n\r\n            const string caption = \"channels.setFeedBroadcasts\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    callback(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void ChangeFeedBroadcastAsync(TLInputChannelBase channel, TLInt feedId, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLChangeFeedBroadcast { Flags = new TLInt(0), Channel = channel, FeedId = feedId };\r\n\r\n            const string caption = \"channels.changeFeedBroadcast\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    callback(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void DeleteHistoryAsync(TLInputChannelBase channel, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteHistory { Channel = channel, MaxId = new TLInt(int.MaxValue) };\r\n\r\n            const string caption = \"channels.deleteHistory\";\r\n            SendInformativeMessage<TLBool>(caption, obj,\r\n                result =>\r\n                {\r\n                    callback(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void TogglePreHistoryHiddenAsync(TLInputChannelBase channel, TLBool enabled, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLTogglePreHistoryHidden { Channel = channel, Enabled = enabled };\r\n\r\n            const string caption = \"channels.togglePreHistoryHidden\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void SetStickersAsync(TLInputChannelBase channel, TLInputStickerSetBase stickerset, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSetStickers { Channel = channel, StickerSet = stickerset };\r\n\r\n            SendInformativeMessage<TLBool>(\"channels.setStickers\", obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void ReadMessageContentsAsync(TLInputChannelBase channel, TLVector<TLInt> id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReadMessageContents { Channel = channel, Id = id };\r\n\r\n            const string caption = \"channels.readMessageContents\";\r\n            ReadMessageContentsAsyncInternal(obj,\r\n                result =>\r\n                {\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                () => { },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void GetAdminedPublicChannelsAsync(Action<TLChatsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetAdminedPublicChannels();\r\n\r\n            SendInformativeMessage<TLChatsBase>(\"updates.getAdminedPublicChannels\", obj,\r\n                result =>\r\n                {\r\n                    var chats = result as TLChats24;\r\n                    if (chats != null)\r\n                    {\r\n                        _cacheService.SyncUsersAndChats(new TLVector<TLUserBase>(), chats.Chats, tuple => callback.SafeInvoke(result));\r\n                    }\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetChannelDifferenceAsync(bool force, TLInputChannelBase inputChannel, TLChannelMessagesFilerBase filter, TLInt pts, TLInt limit, Action<TLChannelDifferenceBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetChannelDifference { Flags = new TLInt(0), Channel = inputChannel, Filter = filter, Pts = pts, Limit = limit };\r\n\r\n            if (force)\r\n            {\r\n                obj.SetForce();\r\n            }\r\n\r\n            SendInformativeMessage(\"updates.getChannelDifference\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetMessagesAsync(TLInputChannelBase inputChannel, TLVector<TLInputMessageBase> id, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetMessages { Channel = inputChannel, Id = id };\r\n\r\n            SendInformativeMessage(\"channels.getMessages\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void EditAdminAsync(TLChannel channel, TLInputUserBase userId, TLChannelAdminRights adminRights, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLEditAdmin { Channel = channel.ToInputChannel(), UserId = userId, AdminRights = adminRights };\r\n\r\n            const string caption = \"channels.editAdmin\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    GetFullChannelAsync(channel.ToInputChannel(),\r\n                        messagesChatFull => callback.SafeInvoke(result),\r\n                        faultCallback.SafeInvoke);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n\r\n        public void GetParticipantAsync(TLInputChannelBase inputChannel, TLInputUserBase userId, Action<TLChannelsChannelParticipant> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetParticipant { Channel = inputChannel, UserId = userId };\r\n\r\n            const string caption = \"channels.getParticipant\";\r\n            SendInformativeMessage<TLChannelsChannelParticipant>(caption, obj, result =>\r\n            {\r\n                _cacheService.SyncUsers(result.Users, r => { });\r\n\r\n                callback.SafeInvoke(result);\r\n            },\r\n            faultCallback);\r\n        }\r\n\r\n        public void GetParticipantsAsync(TLInputChannelBase inputChannel, TLChannelParticipantsFilterBase filter, TLInt offset, TLInt limit, TLInt hash, Action<TLChannelParticipantsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetParticipants { Channel = inputChannel, Filter = filter, Offset = offset, Limit = limit, Hash = hash };\r\n\r\n            const string caption = \"channels.getParticipants\";\r\n            SendInformativeMessage<TLChannelParticipantsBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var channelParticipants = result as TLChannelParticipants;\r\n                    if (channelParticipants != null)\r\n                    {\r\n                        for (var i = 0; i < channelParticipants.Users.Count; i++)\r\n                        {\r\n                            var cachedUser = _cacheService.GetUser(channelParticipants.Users[i].Id);\r\n                            if (cachedUser != null)\r\n                            {\r\n                                cachedUser._status = channelParticipants.Users[i].Status;\r\n                                channelParticipants.Users[i] = cachedUser;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void EditTitleAsync(TLChannel channel, TLString title, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLEditTitle { Channel = channel.ToInputChannel(), Title = title };\r\n\r\n            const string caption = \"channels.editTitle\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void EditAboutAsync(TLChannel channel, TLString about, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLEditAbout { Channel = channel.ToInputChannel(), About = about };\r\n\r\n            const string caption = \"channels.editAbout\";\r\n            SendInformativeMessage<TLBool>(caption, obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void JoinChannelAsync(TLChannel channel, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLJoinChannel { Channel = channel.ToInputChannel() };\r\n\r\n            const string caption = \"channels.joinChannel\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    channel.Left = TLBool.False;\r\n                    if (channel.ParticipantsCount != null)\r\n                    {\r\n                        channel.ParticipantsCount = new TLInt(channel.ParticipantsCount.Value + 1);\r\n                    }\r\n                    _cacheService.Commit();\r\n\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void LeaveChannelAsync(TLChannel channel, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLLeaveChannel { Channel = channel.ToInputChannel() };\r\n\r\n            const string caption = \"channels.leaveChannel\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    channel.Left = TLBool.True;\r\n                    if (channel.ParticipantsCount != null)\r\n                    {\r\n                        channel.ParticipantsCount = new TLInt(channel.ParticipantsCount.Value - 1);\r\n                    }\r\n                    _cacheService.Commit();\r\n\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void KickFromChannelAsync(TLChannel channel, TLInputUserBase userId, TLBool kicked, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLKickFromChannel { Channel = channel.ToInputChannel(), UserId = userId, Kicked = kicked };\r\n\r\n            const string caption = \"channels.kickFromChannel\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    GetFullChannelAsync(channel.ToInputChannel(),\r\n                        messagesChatFull => callback.SafeInvoke(result),\r\n                        faultCallback.SafeInvoke);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void DeleteChannelAsync(TLChannel channel, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteChannel { Channel = channel.ToInputChannel() };\r\n\r\n            const string caption = \"channels.deleteChannel\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void InviteToChannelAsync(TLInputChannelBase channel, TLVector<TLInputUserBase> users, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLInviteToChannel { Channel = channel, Users = users };\r\n\r\n            const string caption = \"channels.inviteToChannel\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n\r\n\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void DeleteMessagesAsync(TLInputChannelBase channel, TLVector<TLInt> id, Action<TLAffectedMessages> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteChannelMessages { Channel = channel, Id = id };\r\n\r\n            const string caption = \"channels.deleteMessages\";\r\n            SendInformativeMessage<TLAffectedMessages>(caption, obj,\r\n                result =>\r\n                {\r\n                    //var multiPts = result as IMultiPts;\r\n                    //if (multiPts != null)\r\n                    //{\r\n                    //    _updatesService.SetState(multiPts, caption);\r\n                    //}\r\n                    //else\r\n                    //{\r\n                    //    _updatesService.SetState(null, result.Pts, null, null, null, caption);\r\n                    //}\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void UpdateChannelAsync(TLInt channelId, Action<TLMessagesChatFull> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var channel = _cacheService.GetChat(channelId) as TL.Interfaces.IInputChannel;\r\n            if (channel != null)\r\n            {\r\n                GetFullChannelAsync(channel.ToInputChannel(), callback, faultCallback);\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void GetFullChannelAsync(TLInputChannelBase channel, Action<TLMessagesChatFull> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetFullChannel { Channel = channel };\r\n\r\n            SendInformativeMessage<TLMessagesChatFull>(\r\n                \"cnannels.getFullChannel\", obj,\r\n                messagesChatFull =>\r\n                {\r\n                    _cacheService.SyncChat(messagesChatFull, result => callback.SafeInvoke(messagesChatFull));\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetImportantHistoryAsync(TLInputChannelBase channel, TLPeerBase peer, bool sync, TLInt offsetId, TLInt addOffset, TLInt limit, TLInt maxId, TLInt minId, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetImportantHistory { Channel = channel, OffsetId = offsetId, OffsetDate = new TLInt(0), AddOffset = addOffset, Limit = limit, MaxId = maxId, MinId = minId };\r\n\r\n            SendInformativeMessage(\"channels.getImportantHistory\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ReadHistoryAsync(TLChannel channel, TLInt maxId, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReadChannelHistory { Channel = channel.ToInputChannel(), MaxId = maxId };\r\n\r\n            ReadChannelHistoryAsyncInternal(obj,\r\n                result =>\r\n                {\r\n                    channel.ReadInboxMaxId = maxId;\r\n\r\n                    _cacheService.Commit();\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                () => { },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void CreateChannelAsync(TLInt flags, TLString title, TLString about, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLCreateChannel { Flags = flags, Title = title, About = about };\r\n\r\n            var caption = \"channels.createChannel\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void ExportInviteAsync(TLInputChannelBase channel, Action<TLExportedChatInvite> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLExportInvite { Channel = channel };\r\n\r\n            SendInformativeMessage(\"channels.exportInvite\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void CheckUsernameAsync(TLInputChannelBase channel, TLString username, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLCheckUsername { Channel = channel, Username = username };\r\n\r\n            SendInformativeMessage(\"channels.checkUsername\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void UpdateUsernameAsync(TLInputChannelBase channel, TLString username, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLUpdateUsername { Channel = channel, Username = username };\r\n\r\n            SendInformativeMessage(\"channels.updateUsername\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void EditPhotoAsync(TLChannel channel, TLInputChatPhotoBase photo, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLEditPhoto { Channel = channel.ToInputChannel(), Photo = photo };\r\n\r\n            const string caption = \"channels.editPhoto\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null, true);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void DeleteChannelMessagesAsync(TLInputChannelBase channel, TLVector<TLInt> id, Action<TLAffectedMessages> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteChannelMessages { Channel = channel, Id = id };\r\n\r\n            SendInformativeMessage(\"channels.deleteMessages\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ToggleInvitesAsync(TLInputChannelBase channel, TLBool enabled, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLToggleInvites { Channel = channel, Enabled = enabled };\r\n\r\n            const string caption = \"channels.toggleInvites\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void ExportMessageLinkAsync(TLInputChannelBase channel, TLInt id, Action<TLExportedMessageLink> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLExportMessageLink { Channel = channel, Id = id };\r\n\r\n            SendInformativeMessage(\"channels.exportMessageLink\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void UpdatePinnedMessageAsync(bool silent, TLInputChannelBase channel, TLInt id, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLUpdatePinnedMessage { Flags = new TLInt(0), Channel = channel, Id = id };\r\n            if (silent)\r\n            {\r\n                obj.SetSilent();\r\n            }\r\n\r\n            const string caption = \"channels.updatePinnedMessage\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void ToggleSignaturesAsync(TLInputChannelBase channel, TLBool enabled, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLToggleSignatures { Channel = channel, Enabled = enabled };\r\n\r\n            const string caption = \"channels.toggleSignatures\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetMessageEditDataAsync(TLInputPeerBase peer, TLInt id, Action<TLMessageEditData> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetMessageEditData { Peer = peer, Id = id };\r\n\r\n            SendInformativeMessage(\"messages.getMessageEditData\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void EditMessageAsync(TLInputPeerBase peer, TLInt id, TLString message, TLVector<TLMessageEntityBase> entities, TLInputMediaBase media, TLReplyKeyboardBase replyMarkup, bool noWebPage, bool stopGeoLive, TLInputGeoPointBase geoPoint, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLEditMessage { Flags = new TLInt(0), Peer = peer, Id = id, Message = message, NoWebPage = noWebPage, Entities = entities, Media = media, ReplyMarkup = replyMarkup, StopGeoLive = stopGeoLive, GeoPoint = geoPoint };\r\n\r\n            const string caption = \"messages.editMessage\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null, true);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void ReportSpamAsync(TLInputChannelBase channel, TLInt userId, TLVector<TLInt> id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReportSpam { Channel = channel, UserId = userId, Id = id };\r\n\r\n            const string caption = \"channels.reportSpam\";\r\n            SendInformativeMessage<TLBool>(caption, obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void DeleteUserHistoryAsync(TLChannel channel, TLInputUserBase userId, Action<TLAffectedHistory> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteUserHistory { Channel = channel.ToInputChannel(), UserId = userId };\r\n\r\n            const string caption = \"channels.deleteUserHistory\";\r\n            SendInformativeMessage<TLAffectedHistory>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiChannelPts = result as IMultiChannelPts;\r\n                    if (multiChannelPts != null)\r\n                    {\r\n                        if (channel.Pts == null\r\n                            || channel.Pts.Value + multiChannelPts.ChannelPtsCount.Value != multiChannelPts.ChannelPts.Value)\r\n                        {\r\n                            Execute.ShowDebugMessage(string.Format(\"channel_id={0} channel_pts={1} affectedHistory24[channel_pts={2} channel_pts_count={3}]\", channel.Id, channel.Pts, multiChannelPts.ChannelPts, multiChannelPts.ChannelPtsCount));\r\n                        }\r\n                        channel.Pts = new TLInt(multiChannelPts.ChannelPts.Value);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Config.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Connection;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        public void SaveConfig()\r\n        {\r\n            _cacheService.SetConfig(_config);\r\n        }\r\n\r\n        public TLConfig LoadConfig()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n#if DEBUG\r\n        public void CheckPublicConfig()\r\n        {\r\n            OnCheckConfig(null, null);\r\n        }\r\n#endif\r\n\r\n        public void PingProxyAsync(TLProxyBase proxy, Action<TLInt> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            if (_activeTransport == null)\r\n            {\r\n                faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"ActiveTransport is null\") });\r\n                return;\r\n            }\r\n\r\n            var transport = GetSpecialTransportWithProxy(_activeTransport.Host, _activeTransport.Port, _activeTransport.Type, proxy, new TransportSettings\r\n            {\r\n                DcId = _activeTransport.DCId,\r\n                Secret = _activeTransport.Secret,\r\n                AuthKey = _activeTransport.AuthKey,\r\n                Salt = TLLong.Random(),\r\n                SessionId = TLLong.Random(),\r\n                MessageIdDict = new Dictionary<long, long>(),\r\n                SequenceNumber = 0,\r\n                ClientTicksDelta = _activeTransport.ClientTicksDelta,\r\n                PacketReceivedHandler = OnPacketReceivedByTransport\r\n            });\r\n\r\n            if (transport.AuthKey == null)\r\n            {\r\n                InitTransportAsync(transport,\r\n                    tuple =>\r\n                    {\r\n                        lock (transport.SyncRoot)\r\n                        {\r\n                            transport.AuthKey = tuple.Item1;\r\n                            transport.Salt = tuple.Item2;\r\n                            transport.SessionId = tuple.Item3;\r\n\r\n                            transport.IsInitializing = false;\r\n                        }\r\n                        var authKeyId = TLUtils.GenerateLongAuthKeyId(tuple.Item1);\r\n\r\n                        lock (_authKeysRoot)\r\n                        {\r\n                            if (!_authKeys.ContainsKey(authKeyId))\r\n                            {\r\n                                _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = tuple.Item1, AutkKeyId = authKeyId });\r\n                            }\r\n                        }\r\n\r\n                        PingSpecialTransportAsync(transport, callback, faultCallback);\r\n                    },\r\n                    error =>\r\n                    {\r\n                        faultCallback.SafeInvoke(error);\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                PingSpecialTransportAsync(transport, callback, faultCallback);\r\n            }\r\n        }\r\n\r\n        private void PingSpecialTransportAsync(ITransport transport, Action<TLInt> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            // connect and ping\r\n            var stopwatch = Stopwatch.StartNew();\r\n            PingByTransportAsync(transport, TLLong.Random(),\r\n                pong =>\r\n                {\r\n                    // ping and measure\r\n                    var ping = transport.Ping > 0 ? transport.Ping : stopwatch.Elapsed.TotalMilliseconds;\r\n                    _transportService.CloseSpecialTransport(transport);\r\n                    callback.SafeInvoke(new TLInt((int)ping));\r\n                },\r\n                error =>\r\n                {\r\n                    _transportService.CloseSpecialTransport(transport);\r\n                    faultCallback.SafeInvoke(error);\r\n                });\r\n        }\r\n\r\n        private readonly IPublicConfigService _publicConfigService;\r\n\r\n        private static void LogPublicConfig(string str)\r\n        {\r\n            Logs.Log.Write(string.Format(\"  MTProtoService.CheckConfig {0}\", str));\r\n            Debug.WriteLine(\"  MTProtoService.CheckConfig {0}\", str);\r\n        }\r\n\r\n        private void PingAndUpdateTransportInfoAsync(TLDCOption78 dcOption, ITransport transport, Action callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            LogPublicConfig(string.Format(\"Ping id={0} dc_id={1} ip={2} port={3} secret={4} proxy=[{5}]\", transport.Id, transport.DCId, transport.Host, transport.Port, transport.Secret != null, transport.ProxyConfig));\r\n\r\n            PingByTransportAsync(transport, TLLong.Random(),\r\n                pong =>\r\n                {\r\n                    LogPublicConfig(string.Format(\"Ping completed id={0}\", transport.Id));\r\n\r\n                    LogPublicConfig(\"Close transport id=\" + transport.Id);\r\n                    _transportService.CloseSpecialTransport(transport);\r\n\r\n                    LogPublicConfig(string.Format(\"Update info dc_id={0} ip={1} port={2} secret={3}\", transport.DCId, transport.Host, transport.Port, transport.Secret != null));\r\n                    UpdateTransportInfoAsync(dcOption, new TLString(transport.Host), new TLInt(transport.Port),\r\n                        result =>\r\n                        {\r\n                            LogPublicConfig(\"Update info completed\");\r\n                            callback.SafeInvoke();\r\n                        });\r\n                },\r\n                error =>\r\n                {\r\n                    LogPublicConfig(string.Format(\"Ping error id={0} error={1}\", transport.Id, error));\r\n                    _transportService.CloseSpecialTransport(transport);\r\n                    faultCallback.SafeInvoke(error);\r\n                });\r\n        }\r\n\r\n        private void CheckAndUpdateTransportInfoInternalAsync(TLDCOption78 dcOption, ITransport transport, Action callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            if (transport.AuthKey == null)\r\n            {\r\n                InitTransportAsync(transport,\r\n                    tuple =>\r\n                    {\r\n                        LogPublicConfig(string.Format(\"Init transport completed id={0}\", transport.Id));\r\n                        lock (transport.SyncRoot)\r\n                        {\r\n                            transport.AuthKey = tuple.Item1;\r\n                            transport.Salt = tuple.Item2;\r\n                            transport.SessionId = tuple.Item3;\r\n\r\n                            transport.IsInitializing = false;\r\n                        }\r\n                        var authKeyId = TLUtils.GenerateLongAuthKeyId(tuple.Item1);\r\n\r\n                        lock (_authKeysRoot)\r\n                        {\r\n                            if (!_authKeys.ContainsKey(authKeyId))\r\n                            {\r\n                                _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = tuple.Item1, AutkKeyId = authKeyId });\r\n                            }\r\n                        }\r\n\r\n                        PingAndUpdateTransportInfoAsync(dcOption, transport, callback, faultCallback);\r\n                    },\r\n                    error =>\r\n                    {\r\n                        LogPublicConfig(string.Format(\"Init transport error id={0} error={1}\", transport.Id, error));\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                PingAndUpdateTransportInfoAsync(dcOption, transport, callback, faultCallback);\r\n            }\r\n        }\r\n\r\n        public void CheckAndUpdateTransportInfoAsync(TLInt dcId, TLString host, TLInt port, Action callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            LogPublicConfig(string.Format(\"CheckTransport dc_id={0} host={1} port={2}\", dcId, host, port));\r\n\r\n            if (dcId == null) return;\r\n            if (TLString.IsNullOrEmpty(host)) return;\r\n            if (port == null) return;\r\n\r\n            var dcOption = TLUtils.GetDCOption(_config, dcId);\r\n\r\n            var transport = GetSpecialTransport(host.ToString(), port.Value, Type, new TransportSettings\r\n            {\r\n                DcId = dcId.Value,\r\n                Secret = TLUtils.ParseSecret(dcOption),\r\n                AuthKey = dcOption != null ? dcOption.AuthKey : null,\r\n                Salt = dcOption != null ? dcOption.Salt : TLLong.Random(),\r\n                SessionId = TLLong.Random(),\r\n                MessageIdDict = new Dictionary<long, long>(),\r\n                SequenceNumber = 0,\r\n                ClientTicksDelta = dcOption != null ? dcOption.ClientTicksDelta : 0,\r\n                PacketReceivedHandler = OnPacketReceivedByTransport\r\n            });\r\n\r\n            CheckAndUpdateTransportInfoInternalAsync(dcOption as TLDCOption78, transport, callback, faultCallback);\r\n        }\r\n\r\n        private void OnCheckConfig(object sender, EventArgs e)\r\n        {\r\n            _publicConfigService.GetAsync(\r\n                configSimple =>\r\n                {\r\n                    if (configSimple != null)\r\n                    {\r\n                        var now = TLUtils.DateToUniversalTimeTLInt(ClientTicksDelta, DateTime.Now);\r\n                        if (configSimple.Expires.Value < now.Value || now.Value < configSimple.Date.Value)\r\n                        {\r\n                            LogPublicConfig(string.Format(\"Config expired date={0} expires={1} now={2}\", configSimple.Date, configSimple.Expires, now));\r\n                            return;\r\n                        }\r\n\r\n                        var dcId = configSimple.DCId;\r\n                        var ipPort = configSimple.IpPortList.FirstOrDefault();\r\n                        if (ipPort == null)\r\n                        {\r\n                            LogPublicConfig(\"ipPort is null\");\r\n                            return;\r\n                        }\r\n\r\n                        var dcOption = TLUtils.GetDCOption(_config, dcId);\r\n\r\n                        var transport = GetSpecialTransport(ipPort.GetIpString(), ipPort.Port.Value, Type, new TransportSettings\r\n                        {\r\n                            DcId = dcId.Value,\r\n                            Secret = null,  //ipPort.Secret\r\n                            AuthKey = dcOption != null ? dcOption.AuthKey : null,\r\n                            Salt = dcOption != null ? dcOption.Salt : TLLong.Random(),\r\n                            SessionId = TLLong.Random(),\r\n                            MessageIdDict = new Dictionary<long, long>(),\r\n                            SequenceNumber = 0,\r\n                            ClientTicksDelta = dcOption != null ? dcOption.ClientTicksDelta : 0,\r\n                            PacketReceivedHandler = OnPacketReceivedByTransport\r\n                        });\r\n\r\n                        if (transport.AuthKey == null)\r\n                        {\r\n                            LogPublicConfig(string.Format(\"Init transport id={0} dc_id={1} ip={2} port={3} proxy=[{4}]\", transport.Id, transport.DCId, transport.Host, transport.Port, transport.ProxyConfig));\r\n                            InitTransportAsync(transport,\r\n                                tuple =>\r\n                                {\r\n                                    LogPublicConfig(string.Format(\"Init transport completed id={0}\", transport.Id));\r\n                                    lock (transport.SyncRoot)\r\n                                    {\r\n                                        transport.AuthKey = tuple.Item1;\r\n                                        transport.Salt = tuple.Item2;\r\n                                        transport.SessionId = tuple.Item3;\r\n\r\n                                        transport.IsInitializing = false;\r\n                                    }\r\n                                    var authKeyId = TLUtils.GenerateLongAuthKeyId(tuple.Item1);\r\n\r\n                                    lock (_authKeysRoot)\r\n                                    {\r\n                                        if (!_authKeys.ContainsKey(authKeyId))\r\n                                        {\r\n                                            _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = tuple.Item1, AutkKeyId = authKeyId });\r\n                                        }\r\n                                    }\r\n\r\n                                    CheckAndUpdateMainTransportAsync(transport);\r\n                                },\r\n                                error =>\r\n                                {\r\n                                    LogPublicConfig(string.Format(\"Init transport error id={0} error={1}\", transport.Id, error));\r\n                                });\r\n                        }\r\n                        else\r\n                        {\r\n                            CheckAndUpdateMainTransportAsync(transport);\r\n                        }\r\n                    }\r\n                }\r\n                ,\r\n                error =>\r\n                {\r\n                    LogPublicConfig(string.Format(\"PublicConfigService.GetAsync error {0}\", error));\r\n                });\r\n        }\r\n\r\n        private void CheckAndUpdateMainTransportAsync(ITransport transport)\r\n        {\r\n            LogPublicConfig(string.Format(\"Get config from id={0} dc_id={1} ip={2} port={3} proxy=[{4}]\", transport.Id, transport.DCId, transport.Host, transport.Port, transport.ProxyConfig));\r\n            GetConfigByTransportAsync(transport,\r\n                config =>\r\n                {\r\n                    LogPublicConfig(string.Format(\"Get config completed id={0}\", transport.Id));\r\n\r\n                    var dcId = new TLInt(_activeTransport.DCId);\r\n                    var dcOption = TLUtils.GetDCOption(config, dcId) as TLDCOption78;\r\n                    if (dcOption == null)\r\n                    {\r\n                        LogPublicConfig(string.Format(\"dcOption is null id={0}\", transport.Id));\r\n                        return;\r\n                    }\r\n                    if (string.Equals(_activeTransport.Host, dcOption.IpAddress.ToString(), StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        LogPublicConfig(string.Format(\"dcOption ip equals ip={0}\", dcOption.IpAddress.ToString()));\r\n                        return;\r\n                    }\r\n                    LogPublicConfig(\"Close transport id=\" + transport.Id);\r\n                    _transportService.CloseSpecialTransport(transport);\r\n\r\n                    // replace main dc ip and port\r\n                    transport = GetSpecialTransport(dcOption.IpAddress.ToString(), dcOption.Port.Value, Type, new TransportSettings\r\n                    {\r\n                        DcId = dcOption.Id.Value,\r\n                        Secret = TLUtils.ParseSecret(dcOption),\r\n                        AuthKey = _activeTransport.AuthKey,\r\n                        Salt = _activeTransport.Salt,\r\n                        SessionId = TLLong.Random(),\r\n                        MessageIdDict = new Dictionary<long, long>(),\r\n                        SequenceNumber = 0,\r\n                        ClientTicksDelta = _activeTransport.ClientTicksDelta,\r\n                        PacketReceivedHandler = OnPacketReceivedByTransport\r\n                    });\r\n\r\n                    CheckAndUpdateTransportInfoInternalAsync(dcOption, transport, null);\r\n                    // reconnect\r\n                },\r\n                error2 =>\r\n                {\r\n                    LogPublicConfig(string.Format(\"Get config error id={0} error={1}\", transport.Id, error2));\r\n\r\n                    LogPublicConfig(\"Close transport id=\" + transport.Id);\r\n                    _transportService.CloseSpecialTransport(transport);\r\n                });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Contacts.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Contacts;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        public void ResetSavedAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLResetSaved();\r\n\r\n            SendInformativeMessage<TLBool>(\"contacts.resetSaved\", obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void ResetTopPeerRatingAsync(TLTopPeerCategoryBase category, TLInputPeerBase peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLResetTopPeerRating { Category = category, Peer = peer };\r\n\r\n            SendInformativeMessage<TLBool>(\"contacts.resetTopPeerRating\", obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void GetTopPeersAsync(GetTopPeersFlags flags, TLInt offset, TLInt limit, TLInt hash, Action<TLTopPeersBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetTopPeers { Flags = new TLInt((int) flags), Offset  = offset, Limit = limit, Hash = hash };\r\n\r\n            SendInformativeMessage<TLTopPeersBase>(\"contacts.getTopPeers\", obj, result =>\r\n            {\r\n                var topPeers = result as TLTopPeers;\r\n                if (topPeers != null)\r\n                {\r\n                    _cacheService.SyncUsersAndChats(topPeers.Users, topPeers.Chats,\r\n                        tuple =>\r\n                        {\r\n                            topPeers.Users = tuple.Item1;\r\n                            topPeers.Chats = tuple.Item2;\r\n                            callback.SafeInvoke(result);\r\n                        });\r\n                }\r\n                else\r\n                {\r\n                    callback.SafeInvoke(result);\r\n                }\r\n            }, faultCallback);\r\n        }\r\n\r\n        public void ResolveUsernameAsync(TLString username, Action<TLResolvedPeer> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLResolveUsername{ Username = username };\r\n\r\n            SendInformativeMessage<TLResolvedPeer>(\"contacts.resolveUsername\", obj,\r\n                result =>\r\n                {\r\n                    _cacheService.SyncUsersAndChats(result.Users, result.Chats, \r\n                        tuple =>\r\n                        {\r\n                            result.Users = tuple.Item1;\r\n                            result.Chats = tuple.Item2;\r\n                            callback.SafeInvoke(result);\r\n                        });\r\n                }, \r\n                faultCallback);\r\n        }\r\n\r\n        public void GetStatusesAsync(Action<TLVector<TLContactStatusBase>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetStatuses();\r\n\r\n            SendInformativeMessage<TLVector<TLContactStatusBase>>(\"contacts.getStatuses\", obj, \r\n                contacts =>\r\n                {\r\n                    _cacheService.SyncStatuses(contacts, callback);\r\n                }, \r\n                faultCallback);\r\n        }\r\n\r\n        public void GetContactsAsync(TLInt hash, Action<TLContactsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetContacts { Hash = hash };\r\n\r\n            SendInformativeMessage<TLContactsBase>(\"contacts.getContacts\", obj, result => _cacheService.SyncContacts(result, callback), faultCallback);\r\n        }\r\n\r\n        public void ImportContactsAsync(TLVector<TLInputContactBase> contacts, Action<TLImportedContacts> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLImportContacts { Contacts = contacts };\r\n\r\n            SendInformativeMessage<TLImportedContacts>(\"contacts.importContacts\", obj, result => _cacheService.SyncContacts(result, callback), faultCallback);\r\n        }\r\n\r\n        public void DeleteContactAsync(TLInputUserBase id, Action<TLLinkBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteContact { Id = id };\r\n\r\n            SendInformativeMessage<TLLinkBase>(\"contacts.deleteContact\", obj, result => _cacheService.SyncUserLink(result, callback), faultCallback);\r\n        }\r\n\r\n        public void DeleteContactsAsync(TLVector<TLInputUserBase> id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteContacts { Id = id };\r\n\r\n            SendInformativeMessage<TLBool>(\"contacts.deleteContacts\", obj,\r\n                result =>\r\n                {\r\n                    foreach (var inputUser in id.OfType<IInputUserId>())\r\n                    {\r\n                        var user = _cacheService.GetUser(inputUser.UserId);\r\n                        if (user != null && user.IsContact)\r\n                        {\r\n                            user.IsContact = false;\r\n                            user.IsContactMutual = false;\r\n                        }\r\n                    }\r\n\r\n                    _cacheService.Commit();\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void BlockAsync(TLInputUserBase id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLBlock { Id = id };\r\n\r\n            SendInformativeMessage(\"contacts.block\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void UnblockAsync(TLInputUserBase id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLUnblock { Id = id };\r\n\r\n            SendInformativeMessage(\"contacts.unblock\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetBlockedAsync(TLInt offset, TLInt limit, Action<TLContactsBlockedBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetBlocked { Offset = offset, Limit = limit };\r\n\r\n            SendInformativeMessage(\"contacts.getBlocked\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SearchAsync(TLString q, TLInt limit, Action<TLContactsFoundBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSearch { Q = q, Limit = limit };\r\n\r\n            SendInformativeMessage(\"contacts.search\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetSavedAsync(Action<TLVector<TLSavedPhoneContact>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetSaved();\r\n\r\n            SendInformativeMessage(\"contacts.getSaved\", obj, callback, faultCallback);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.DHKeyExchange.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Numerics;\r\nusing System.Text;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.DHKeyExchange;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public class AuthKeyItem\r\n    {\r\n        public long AutkKeyId { get; set; }\r\n        public byte[] AuthKey { get; set; }\r\n    }\r\n\r\n    public partial class MTProtoService\r\n    {\r\n        /// <summary>\r\n        /// Список имеющихся ключей авторизации\r\n        /// </summary>\r\n        private static readonly Dictionary<long, AuthKeyItem> _authKeys = new Dictionary<long, AuthKeyItem>();\r\n\r\n        private static readonly object _authKeysRoot = new object();\r\n\r\n        private void ReqPQAsync(TLInt128 nonce, Action<TLResPQ> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReqPQ { Nonce = nonce };\r\n\r\n            SendNonEncryptedMessage(\"req_pq\", obj, callback, faultCallback);\r\n        }\r\n\r\n        private void ReqDHParamsAsync(TLInt128 nonce, TLInt128 serverNonce, TLString p, TLString q, TLLong publicKeyFingerprint, TLString encryptedData, Action<TLServerDHParamsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReqDHParams { Nonce = nonce, ServerNonce = serverNonce, P = p, Q = q, PublicKeyFingerprint = publicKeyFingerprint, EncryptedData = encryptedData };\r\n\r\n            SendNonEncryptedMessage(\"req_DH_params\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SetClientDHParamsAsync(TLInt128 nonce, TLInt128 serverNonce, TLString encryptedData, Action<TLDHGenBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSetClientDHParams { Nonce = nonce, ServerNonce = serverNonce, EncryptedData = encryptedData };\r\n\r\n            SendNonEncryptedMessage(\"set_client_DH_params\", obj, callback, faultCallback);\r\n        }\r\n\r\n        private TimeSpan _authTimeElapsed;\r\n\r\n        public void InitAsync(Action<WindowsPhone.Tuple<byte[], TLLong, TLLong>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var authTime = Stopwatch.StartNew();\r\n            var newNonce = TLInt256.Random();\r\n\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"Start ReqPQ\");\r\n#endif\r\n            var nonce = TLInt128.Random();\r\n            ReqPQAsync(nonce,\r\n                resPQ =>\r\n                {\r\n                    GetServerPublicKeyAsync(_activeTransport.DCId, resPQ.ServerPublicKeyFingerprints,\r\n                        (index, publicKey) =>\r\n                        {\r\n                            if (index < 0 || string.IsNullOrEmpty(publicKey))\r\n                            {\r\n                                var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"unknown public key\") };\r\n#if LOG_REGISTRATION\r\n                                TLUtils.WriteLog(\"Stop ReqPQ with error \" + error);\r\n#endif\r\n\r\n                                if (faultCallback != null) faultCallback(error);\r\n                                TLUtils.WriteLine(error.ToString());\r\n                            }\r\n\r\n                            var serverNonce = resPQ.ServerNonce;\r\n                            if (!TLUtils.ByteArraysEqual(nonce.Value, resPQ.Nonce.Value))\r\n                            {\r\n                                var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect nonce\") };\r\n#if LOG_REGISTRATION\r\n                                TLUtils.WriteLog(\"Stop ReqPQ with error \" + error);\r\n#endif\r\n\r\n                                if (faultCallback != null) faultCallback(error);\r\n                                TLUtils.WriteLine(error.ToString());\r\n                            }\r\n\r\n#if LOG_REGISTRATION\r\n                            TLUtils.WriteLog(\"Stop ReqPQ\");\r\n#endif\r\n                            TimeSpan calcTime;\r\n                            WindowsPhone.Tuple<ulong, ulong> pqPair;\r\n                            var innerData = GetInnerData(new TLInt(TLUtils.GetProtocolDCId(_activeTransport.DCId, false, Constants.IsTestServer)), resPQ, newNonce, out calcTime, out pqPair);\r\n                            var encryptedInnerData = GetEncryptedInnerData(innerData, publicKey);\r\n\r\n#if LOG_REGISTRATION\r\n                            var pq = BitConverter.ToUInt64(resPQ.PQ.Data.Reverse().ToArray(), 0);\r\n                            var logPQString = new StringBuilder();\r\n                            logPQString.AppendLine(\"PQ Counters\");\r\n                            logPQString.AppendLine();\r\n                            logPQString.AppendLine(\"pq: \" + pq);\r\n                            logPQString.AppendLine(\"p: \" + pqPair.Item1);\r\n                            logPQString.AppendLine(\"q: \" + pqPair.Item2);\r\n                            logPQString.AppendLine(\"encrypted_data length: \" + encryptedInnerData.Data.Length);\r\n                            TLUtils.WriteLog(logPQString.ToString());\r\n                            TLUtils.WriteLog(\"Start ReqDHParams\");\r\n#endif\r\n                            ReqDHParamsAsync(\r\n                                resPQ.Nonce,\r\n                                resPQ.ServerNonce,\r\n                                innerData.P,\r\n                                innerData.Q,\r\n                                resPQ.ServerPublicKeyFingerprints[0],\r\n                                encryptedInnerData,\r\n                                serverDHParams =>\r\n                                {\r\n                                    if (!TLUtils.ByteArraysEqual(nonce.Value, serverDHParams.Nonce.Value))\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect nonce\") };\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error);\r\n#endif\r\n\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n                                    }\r\n                                    if (!TLUtils.ByteArraysEqual(serverNonce.Value, serverDHParams.ServerNonce.Value))\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect server_nonce\") };\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error);\r\n#endif\r\n\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n                                    }\r\n\r\n#if LOG_REGISTRATION\r\n                                    TLUtils.WriteLog(\"Stop ReqDHParams\");\r\n#endif\r\n                                    var random = new SecureRandom();\r\n\r\n                                    var serverDHParamsOk = serverDHParams as TLServerDHParamsOk;\r\n                                    if (serverDHParamsOk == null)\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"Incorrect serverDHParams \" + serverDHParams.GetType()) };\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"ServerDHParams \" + serverDHParams);\r\n#endif\r\n                                        return;\r\n                                    }\r\n\r\n                                    var aesParams = GetAesKeyIV(resPQ.ServerNonce.ToBytes(), newNonce.ToBytes());\r\n\r\n                                    var decryptedAnswerWithHash = Utils.AesIge(serverDHParamsOk.EncryptedAnswer.Data, aesParams.Item1, aesParams.Item2, false);\r\n\r\n                                    var position = 0;\r\n                                    var serverDHInnerData = (TLServerDHInnerData)new TLServerDHInnerData().FromBytes(decryptedAnswerWithHash.Skip(20).ToArray(), ref position);\r\n\r\n                                    var sha1 = Utils.ComputeSHA1(serverDHInnerData.ToBytes());\r\n                                    if (!TLUtils.ByteArraysEqual(sha1, decryptedAnswerWithHash.Take(20).ToArray()))\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect sha1 TLServerDHInnerData\") };\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error);\r\n#endif\r\n\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n                                    }\r\n\r\n                                    if (!TLUtils.CheckPrime(serverDHInnerData.DHPrime.Data, serverDHInnerData.G.Value))\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect (p, q) pair\") };\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error);\r\n#endif\r\n\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n                                    }\r\n\r\n                                    if (!TLUtils.CheckGaAndGb(serverDHInnerData.GA.Data, serverDHInnerData.DHPrime.Data))\r\n                                    {\r\n                                        var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect g_a\") };\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error);\r\n#endif\r\n\r\n                                        if (faultCallback != null) faultCallback(error);\r\n                                        TLUtils.WriteLine(error.ToString());\r\n                                    }\r\n\r\n                                    var bBytes = new byte[256]; //big endian B\r\n                                    random.NextBytes(bBytes);\r\n\r\n                                    var gbBytes = GetGB(bBytes, serverDHInnerData.G, serverDHInnerData.DHPrime);\r\n\r\n                                    var clientDHInnerData = new TLClientDHInnerData\r\n                                    {\r\n                                        Nonce = resPQ.Nonce,\r\n                                        ServerNonce = resPQ.ServerNonce,\r\n                                        RetryId = new TLLong(0),\r\n                                        GB = TLString.FromBigEndianData(gbBytes)\r\n                                    };\r\n\r\n                                    var encryptedClientDHInnerData = GetEncryptedClientDHInnerData(clientDHInnerData, aesParams);\r\n#if LOG_REGISTRATION\r\n                                    TLUtils.WriteLog(\"Start SetClientDHParams\");\r\n#endif\r\n                                    SetClientDHParamsAsync(resPQ.Nonce, resPQ.ServerNonce, encryptedClientDHInnerData,\r\n                                        dhGen =>\r\n                                        {\r\n                                            if (!TLUtils.ByteArraysEqual(nonce.Value, dhGen.Nonce.Value))\r\n                                            {\r\n                                                var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect nonce\") };\r\n#if LOG_REGISTRATION\r\n                                                TLUtils.WriteLog(\"Stop SetClientDHParams with error \" + error);\r\n#endif\r\n\r\n                                                if (faultCallback != null) faultCallback(error);\r\n                                                TLUtils.WriteLine(error.ToString());\r\n                                            }\r\n                                            if (!TLUtils.ByteArraysEqual(serverNonce.Value, dhGen.ServerNonce.Value))\r\n                                            {\r\n                                                var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"incorrect server_nonce\") };\r\n#if LOG_REGISTRATION\r\n                                                TLUtils.WriteLog(\"Stop SetClientDHParams with error \" + error);\r\n#endif\r\n\r\n                                                if (faultCallback != null) faultCallback(error);\r\n                                                TLUtils.WriteLine(error.ToString());\r\n                                            }\r\n\r\n                                            var dhGenOk = dhGen as TLDHGenOk;\r\n                                            if (dhGenOk == null)\r\n                                            {\r\n                                                var error = new TLRPCError { Code = new TLInt(404), Message = new TLString(\"Incorrect dhGen \" + dhGen.GetType()) };\r\n                                                if (faultCallback != null) faultCallback(error);\r\n                                                TLUtils.WriteLine(error.ToString());\r\n#if LOG_REGISTRATION\r\n                                                TLUtils.WriteLog(\"DHGen result \" + serverDHParams);\r\n#endif\r\n                                                return;\r\n                                            }\r\n\r\n\r\n                                            _authTimeElapsed = authTime.Elapsed;\r\n#if LOG_REGISTRATION\r\n                                            TLUtils.WriteLog(\"Stop SetClientDHParams\");\r\n#endif\r\n                                            var getKeyTimer = Stopwatch.StartNew();\r\n                                            var authKey = GetAuthKey(bBytes, serverDHInnerData.GA.ToBytes(), serverDHInnerData.DHPrime.ToBytes());\r\n\r\n                                            var logCountersString = new StringBuilder();\r\n\r\n                                            logCountersString.AppendLine(\"Auth Counters\");\r\n                                            logCountersString.AppendLine();\r\n                                            logCountersString.AppendLine(\"pq factorization time: \" + calcTime);\r\n                                            logCountersString.AppendLine(\"calc auth key time: \" + getKeyTimer.Elapsed);\r\n                                            logCountersString.AppendLine(\"auth time: \" + _authTimeElapsed);\r\n#if LOG_REGISTRATION\r\n                                            TLUtils.WriteLog(logCountersString.ToString());\r\n#endif\r\n                                            //newNonce - little endian\r\n                                            //authResponse.ServerNonce - little endian\r\n                                            var salt = GetSalt(newNonce.ToBytes(), resPQ.ServerNonce.ToBytes());\r\n                                            var sessionId = new byte[8];\r\n                                            random.NextBytes(sessionId);\r\n\r\n                                            TLUtils.WriteLine(\"Salt \" + BitConverter.ToInt64(salt, 0) + \" (\" + BitConverter.ToString(salt) + \")\");\r\n                                            TLUtils.WriteLine(\"Session id \" + BitConverter.ToInt64(sessionId, 0) + \" (\" + BitConverter.ToString(sessionId) + \")\");\r\n\r\n                                            callback(new WindowsPhone.Tuple<byte[], TLLong, TLLong>(authKey, new TLLong(BitConverter.ToInt64(salt, 0)), new TLLong(BitConverter.ToInt64(sessionId, 0))));\r\n                                        },\r\n                                        error =>\r\n                                        {\r\n#if LOG_REGISTRATION\r\n                                            TLUtils.WriteLog(\"Stop SetClientDHParams with error \" + error.ToString());\r\n#endif\r\n                                            if (faultCallback != null) faultCallback(error);\r\n                                            TLUtils.WriteLine(error.ToString());\r\n                                        });\r\n                                },\r\n                                error =>\r\n                                {\r\n#if LOG_REGISTRATION\r\n                                    TLUtils.WriteLog(\"Stop ReqDHParams with error \" + error.ToString());\r\n#endif\r\n                                    if (faultCallback != null) faultCallback(error);\r\n                                    TLUtils.WriteLine(error.ToString());\r\n                                });\r\n                        });\r\n                },\r\n                error =>\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\"Stop ReqPQ with error \" + error.ToString());\r\n#endif\r\n                    if (faultCallback != null) faultCallback(error);\r\n                    TLUtils.WriteLine(error.ToString());\r\n                });\r\n        }\r\n\r\n        private static TLPQInnerData GetInnerData(TLInt dcId, TLResPQ resPQ, TLInt256 newNonce, out TimeSpan calcTime, out WindowsPhone.Tuple<ulong, ulong> pqPair)\r\n        {\r\n            var pq = BitConverter.ToUInt64(resPQ.PQ.Data.Reverse().ToArray(), 0);\r\n            TLUtils.WriteLine(\"pq: \" + pq);\r\n\r\n            var pqCalcTime = Stopwatch.StartNew();\r\n            try\r\n            {\r\n                pqPair = Utils.GetFastPQ(pq);\r\n                pqCalcTime.Stop();\r\n                calcTime = pqCalcTime.Elapsed;\r\n                TLUtils.WriteLineAtBegin(\"Pq Fast calculation time: \" + pqCalcTime.Elapsed);\r\n                TLUtils.WriteLine(\"p: \" + pqPair.Item1);\r\n                TLUtils.WriteLine(\"q: \" + pqPair.Item2);\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                pqCalcTime = Stopwatch.StartNew();\r\n                pqPair = Utils.GetPQPollard(pq);\r\n                pqCalcTime.Stop();\r\n                calcTime = pqCalcTime.Elapsed;\r\n                TLUtils.WriteLineAtBegin(\"Pq Pollard calculation time: \" + pqCalcTime.Elapsed);\r\n                TLUtils.WriteLine(\"p: \" + pqPair.Item1);\r\n                TLUtils.WriteLine(\"q: \" + pqPair.Item2);\r\n            }\r\n\r\n            var p = TLString.FromUInt64(pqPair.Item1);\r\n            var q = TLString.FromUInt64(pqPair.Item2);\r\n\r\n            var innerData1 = new TLPQInnerDataDC\r\n            {\r\n                NewNonce = newNonce,\r\n                Nonce = resPQ.Nonce,\r\n                P = p,\r\n                Q = q,\r\n                PQ = resPQ.PQ,\r\n                ServerNonce = resPQ.ServerNonce,\r\n                DCId = dcId\r\n            };\r\n\r\n            return innerData1;\r\n        }\r\n\r\n        private static TLString GetEncryptedClientDHInnerData(TLClientDHInnerData clientDHInnerData, WindowsPhone.Tuple<byte[], byte[]> aesParams)\r\n        {\r\n            var random = new Random();\r\n            var client_DH_inner_data = clientDHInnerData.ToBytes();\r\n\r\n            var client_DH_inner_dataWithHash = TLUtils.Combine(Utils.ComputeSHA1(client_DH_inner_data), client_DH_inner_data);\r\n            var addedBytesLength = 16 - (client_DH_inner_dataWithHash.Length % 16);\r\n            if (addedBytesLength > 0 && addedBytesLength < 16)\r\n            {\r\n                var addedBytes = new byte[addedBytesLength];\r\n                random.NextBytes(addedBytes);\r\n                client_DH_inner_dataWithHash = TLUtils.Combine(client_DH_inner_dataWithHash, addedBytes);\r\n                //TLUtils.WriteLine(string.Format(\"Added {0} bytes\", addedBytesLength));\r\n            }\r\n\r\n            var aesEncryptClientDHInnerDataWithHash = Utils.AesIge(client_DH_inner_dataWithHash, aesParams.Item1, aesParams.Item2, true);\r\n\r\n            return TLString.FromBigEndianData(aesEncryptClientDHInnerDataWithHash);\r\n        }\r\n\r\n        public static TLString GetEncryptedInnerData(TLPQInnerData innerData, string publicKey)\r\n        {\r\n            var innerDataBytes = innerData.ToBytes();\r\n#if LOG_REGISTRATION\r\n            var sb = new StringBuilder();\r\n            sb.AppendLine();\r\n            sb.AppendLine(\"pq \" + innerData.PQ.ToBytes().Length);\r\n            sb.AppendLine(\"p \" + innerData.P.ToBytes().Length);\r\n            sb.AppendLine(\"q \" + innerData.Q.ToBytes().Length);\r\n            sb.AppendLine(\"nonce \" + innerData.Nonce.ToBytes().Length);\r\n            sb.AppendLine(\"serverNonce \" + innerData.ServerNonce.ToBytes().Length);\r\n            sb.AppendLine(\"newNonce \" + innerData.NewNonce.ToBytes().Length);\r\n            sb.AppendLine(\"innerData length \" + innerDataBytes.Length);\r\n\r\n            TLUtils.WriteLog(sb.ToString());\r\n#endif\r\n\r\n            var sha1 = Utils.ComputeSHA1(innerDataBytes);\r\n            var dataWithHash = TLUtils.Combine(sha1, innerDataBytes); //116\r\n\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"innerData+hash length \" + dataWithHash.Length);\r\n#endif\r\n\r\n            var data255 = new byte[255];\r\n            var random = new Random();\r\n            random.NextBytes(data255);\r\n            Array.Copy(dataWithHash, data255, dataWithHash.Length);\r\n\r\n\r\n            var reverseRSABytes = Utils.GetRSABytes(data255, publicKey);               // NOTE: remove Reverse here\r\n\r\n            var encryptedData = new TLString { Data = reverseRSABytes };\r\n\r\n            return encryptedData;\r\n        }\r\n\r\n        public static byte[] GetSalt(byte[] newNonce, byte[] serverNonce)\r\n        {\r\n            var newNonceBytes = newNonce.Take(8).ToArray();\r\n            var serverNonceBytes = serverNonce.Take(8).ToArray();\r\n\r\n            var returnBytes = new byte[8];\r\n            for (int i = 0; i < returnBytes.Length; i++)\r\n            {\r\n                returnBytes[i] = (byte)(newNonceBytes[i] ^ serverNonceBytes[i]);\r\n            }\r\n\r\n            return returnBytes;\r\n        }\r\n\r\n\r\n        // return big-endian authKey\r\n        public static byte[] GetAuthKey(byte[] bBytes, byte[] g_aData, byte[] dhPrimeData)\r\n        {\r\n            int position = 0;\r\n            var b = new BigInteger(bBytes.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n            var dhPrime = TLObject.GetObject<TLString>(dhPrimeData, ref position).ToBigInteger();\r\n            position = 0;\r\n            var g_a = TLObject.GetObject<TLString>(g_aData, ref position).ToBigInteger();\r\n\r\n            var authKey = BigInteger.ModPow(g_a, b, dhPrime).ToByteArray(); // little endian + (may be) zero last byte\r\n\r\n            //remove last zero byte\r\n            if (authKey[authKey.Length - 1] == 0x00)\r\n            {\r\n                authKey = authKey.SubArray(0, authKey.Length - 1);\r\n            }\r\n\r\n            authKey = authKey.Reverse().ToArray();\r\n\r\n            if (authKey.Length > 256)\r\n            {\r\n#if DEBUG\r\n                var authKeyInfo = new StringBuilder();\r\n                authKeyInfo.AppendLine(\"auth_key length > 256: \" + authKey.Length);\r\n                authKeyInfo.AppendLine(\"g_a=\" + g_a);\r\n                authKeyInfo.AppendLine(\"b=\" + b);\r\n                authKeyInfo.AppendLine(\"dhPrime=\" + dhPrime);\r\n                Execute.ShowDebugMessage(authKeyInfo.ToString());\r\n#endif\r\n\r\n                var correctedAuth = new byte[256];\r\n                Array.Copy(authKey, authKey.Length - 256, correctedAuth, 0, 256);\r\n                authKey = correctedAuth;\r\n            }\r\n            else if (authKey.Length < 256)\r\n            {\r\n#if DEBUG\r\n                var authKeyInfo = new StringBuilder();\r\n                authKeyInfo.AppendLine(\"auth_key length < 256: \" + authKey.Length);\r\n                authKeyInfo.AppendLine(\"g_a=\" + g_a);\r\n                authKeyInfo.AppendLine(\"b=\" + b);\r\n                authKeyInfo.AppendLine(\"dhPrime=\" + dhPrime);\r\n                Execute.ShowDebugMessage(authKeyInfo.ToString());\r\n#endif\r\n\r\n                var correctedAuth = new byte[256];\r\n                Array.Copy(authKey, 0, correctedAuth, 256 - authKey.Length, authKey.Length);\r\n                for (var i = 0; i < 256 - authKey.Length; i++)\r\n                {\r\n                    authKey[i] = 0;\r\n                }\r\n                authKey = correctedAuth;\r\n            }\r\n\r\n            return authKey;\r\n        }\r\n\r\n        // b - big endian bytes\r\n        // g - serialized data\r\n        // dhPrime - serialized data\r\n        // returns big-endian G_B\r\n        public static byte[] GetGB(byte[] bData, TLInt gData, TLString pString)\r\n        {\r\n            //var bBytes = new byte[256]; // big endian bytes\r\n            //var random = new Random();\r\n            //random.NextBytes(bBytes);\r\n\r\n            var g = new BigInteger(gData.Value);\r\n            var p = pString.ToBigInteger();\r\n            var b = new BigInteger(bData.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n\r\n            var gb = BigInteger.ModPow(g, b, p).ToByteArray(); // little endian + (may be) zero last byte\r\n            //remove last zero byte\r\n            if (gb[gb.Length - 1] == 0x00)\r\n            {\r\n                gb = gb.SubArray(0, gb.Length - 1);\r\n            }\r\n\r\n            var length = gb.Length;\r\n            var result = new byte[length];\r\n            for (int i = 0; i < length; i++)\r\n            {\r\n                result[length - i - 1] = gb[i];\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        //public BigInteger ToBigInteger()\r\n        //{\r\n        //    var data = new List<byte>(Data);\r\n        //    while (data[0] == 0x00)\r\n        //    {\r\n        //        data.RemoveAt(0);\r\n        //    }\r\n\r\n        //    return new BigInteger(Data.Reverse().Concat(new byte[] { 0x00 }).ToArray());  //NOTE: add reverse here\r\n        //}\r\n\r\n        public static WindowsPhone.Tuple<byte[], byte[]> GetAesKeyIV(byte[] serverNonce, byte[] newNonce)\r\n        {\r\n            var newNonceServerNonce = TLUtils.Combine(newNonce, serverNonce);\r\n            var serverNonceNewNonce = TLUtils.Combine(serverNonce, newNonce);\r\n\r\n            var key = TLUtils.Combine(\r\n                Utils.ComputeSHA1(newNonceServerNonce),\r\n                Utils.ComputeSHA1(serverNonceNewNonce).SubArray(0, 12));\r\n\r\n            var iv = TLUtils.Combine(\r\n                Utils.ComputeSHA1(serverNonceNewNonce).SubArray(12, 8),\r\n                Utils.ComputeSHA1(TLUtils.Combine(newNonce, newNonce)),\r\n                newNonce.SubArray(0, 4));\r\n\r\n            return new WindowsPhone.Tuple<byte[], byte[]>(key, iv);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Help.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Threading;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Help;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        private TLConfig __config = new TLConfig\r\n        {\r\n            DCOptions = new TLVector<TLDCOption>\r\n            {\r\n                new TLDCOption \r\n                { \r\n                    Id = new TLInt(Constants.FirstServerDCId),\r\n                    IpAddress = new TLString(Constants.FirstServerIpAddress), \r\n                    Port = new TLInt(Constants.FirstServerPort) \r\n                }\r\n            }\r\n        };\r\n\r\n        private TLConfig _config\r\n        {\r\n            get { return __config; }\r\n            set\r\n            {\r\n                __config = value;\r\n            }\r\n        }\r\n\r\n        public void GetConfigAsync(Action<TLConfig> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetConfig();\r\n\r\n            Logs.Log.Write(\"help.getConfig\");\r\n\r\n            SendInformativeMessage<TLConfig>(\"help.getConfig\", obj,\r\n                result =>\r\n                {\r\n                    callback(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        private Timer _getConfigTimer;\r\n\r\n        private volatile bool _isGettingConfig;\r\n\r\n        private void CheckGetConfig(object state)\r\n        {\r\n            //TLUtils.WriteLine(DateTime.Now.ToLongTimeString() + \": Check Config on Thread \" + Thread.CurrentThread.ManagedThreadId, LogSeverity.Error);\r\n\r\n            if (_deviceInfo != null && _deviceInfo.IsBackground)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_isGettingConfig)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_activeTransport == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_activeTransport.AuthKey == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n            if (!isAuthorized)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var currentTime = TLUtils.DateToUniversalTimeTLInt(ClientTicksDelta, DateTime.Now);\r\n\r\n\r\n            var config23 = _config as TLConfig23;\r\n            if (config23 != null && config23.Expires != null && (config23.Expires.Value > currentTime.Value))\r\n            {\r\n                return;\r\n            }\r\n\r\n            //if (_config != null && _config.Date != null && Math.Abs(_config.Date.Value - currentTime.Value) < Constants.GetConfigInterval)\r\n            //{\r\n            //    return;\r\n            //}\r\n\r\n            //Execute.ShowDebugMessage(\"MTProtoService.CheckGetConfig GetConfig\");\r\n\r\n            _isGettingConfig = true;\r\n            GetConfigAsync(\r\n                result =>\r\n                {\r\n                    //TLUtils.WriteLine(DateTime.Now.ToLongTimeString() + \": help.getConfig\", LogSeverity.Error);\r\n                    _config = TLConfig.Merge(_config, result);\r\n                    SaveConfig();\r\n                    _isGettingConfig = false;\r\n                },\r\n                error =>\r\n                {\r\n                    _isGettingConfig = false;\r\n                    //Execute.ShowDebugMessage(\"help.getConfig error: \" + error);\r\n                });\r\n        }\r\n\r\n        public void GetPassportConfigAsync(TLInt hash, Action<TLPassportConfigBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetPassportConfig { Hash = hash };\r\n\r\n            SendInformativeMessage(\"help.getPassportConfig\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetTermsOfServiceAsync(TLString countryISO2, Action<TLTermsOfService> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetTermsOfService { CountryISO2 = countryISO2 };\r\n\r\n            SendInformativeMessage(\"help.getTermsOfService\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetNearestDCAsync(Action<TLNearestDC> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetNearestDC();\r\n\r\n            SendInformativeMessage(\"help.getNearestDc\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetInviteTextAsync(TLString langCode, Action<TLInviteText> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetInviteText();\r\n\r\n            SendInformativeMessage(\"help.getInviteText\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetSupportAsync(Action<TLSupport> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetSupport();\r\n\r\n            SendInformativeMessage(\"help.getSupport\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetAppChangelogAsync(TLString deviceModel, TLString systemVersion, TLString appVersion, TLString langCode, Action<TLAppChangelogBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetAppChangelog();\r\n\r\n            SendInformativeMessage(\"help.getAppChangelog\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetCdnConfigAsync(Action<TLCdnConfig> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetCdnConfig();\r\n\r\n            SendInformativeMessage<TLCdnConfig>(\"help.getCdnConfig\", obj,\r\n                result =>\r\n                {\r\n                    foreach (var publicKey in result.PublicKeys)\r\n                    {\r\n                        var fingerprint = Utils.GetRSAFingerprint(publicKey.PublicKey.ToString());\r\n                        publicKey.PublicKeyFingerprint = new TLLong(fingerprint);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetDeepLinkInfoAsync(TLString path, Action<TLDeepLinkInfoBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetDeepLinkInfo{ Path = path };\r\n\r\n            SendInformativeMessage(\"help.getDeepLinkInfo\", obj, callback, faultCallback);\r\n        }\r\n\t}\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Helpers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing Telegram.Logs;\r\n#if WINDOWS_PHONE\r\nusing System.Globalization;\r\n#endif\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Help;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        private void PrintCaption(string caption)\r\n        {\r\n            TLUtils.WriteLine(\" \");\r\n            //TLUtils.WriteLine(\"------------------------\");\r\n            TLUtils.WriteLine(String.Format(\"-->>{0}\", caption));\r\n            TLUtils.WriteLine(\"------------------------\");\r\n        }\r\n\r\n        public TLEncryptedTransportMessage GetEncryptedTransportMessage(byte[] authKey, TLLong salt, TLObject obj)\r\n        {\r\n            int sequenceNumber;\r\n            TLLong messageId;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                sequenceNumber = 0;\r\n                messageId = _activeTransport.GenerateMessageId(true);\r\n            }\r\n            var sessionId = TLLong.Random();\r\n            var transportMessage = CreateTLTransportMessage(salt, sessionId, new TLInt(sequenceNumber), messageId, obj);\r\n            var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n            return encryptedMessage;\r\n        }\r\n\r\n        private readonly object _delayedNonInformativeItemsRoot = new object();\r\n\r\n        private readonly List<DelayedItem> _delayedNonInformativeItems = new List<DelayedItem>();\r\n\r\n        private void SendNonInformativeMessage<T>(string caption, TLObject obj, Action<T> callback, Action<TLRPCError> faultCallback = null) where T : TLObject\r\n        {\r\n            PrintCaption(caption);\r\n\r\n            if (_activeTransport.AuthKey == null)\r\n            {\r\n                var delayedItem = new DelayedItem\r\n                {\r\n                    SendTime = DateTime.Now,\r\n                    //SendBeforeTime = sendBeforeTime,\r\n                    Caption = caption,\r\n                    Object = obj,\r\n                    Callback = t => callback((T)t),\r\n                    AttemptFailed = null,\r\n                    FaultCallback = faultCallback,\r\n                };\r\n                lock (_delayedNonInformativeItemsRoot)\r\n                {\r\n                    _delayedNonInformativeItems.Add(delayedItem);\r\n                }\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(string.Format(\"Add delayed item {0} sendTime={1}\", delayedItem.Caption, delayedItem.SendTime.ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture)));\r\n#endif\r\n\r\n                return;\r\n            }\r\n\r\n            int sequenceNumber;\r\n            TLLong messageId;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                sequenceNumber = _activeTransport.SequenceNumber * 2;\r\n                messageId = _activeTransport.GenerateMessageId(true);\r\n            }\r\n            var authKey = _activeTransport.AuthKey;\r\n            var salt = _activeTransport.Salt;\r\n            var sessionId = _activeTransport.SessionId;\r\n            var clientsTicksDelta = _activeTransport.ClientTicksDelta;\r\n            var transportMessage = CreateTLTransportMessage(salt, sessionId, new TLInt(sequenceNumber), messageId, obj);\r\n            var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n            lock (_activeTransportRoot)\r\n            {\r\n                if (_activeTransport.Closed)\r\n                {\r\n                    _activeTransport = GetTransport(_activeTransport.Host, _activeTransport.Port, Type,\r\n                        new TransportSettings\r\n                        {\r\n                            DcId = _activeTransport.DCId,\r\n                            Secret = _activeTransport.Secret,\r\n                            AuthKey = _activeTransport.AuthKey,\r\n                            Salt = _activeTransport.Salt,\r\n                            SessionId = _activeTransport.SessionId,\r\n                            MessageIdDict = _activeTransport.MessageIdDict,\r\n                            SequenceNumber = _activeTransport.SequenceNumber,\r\n                            ClientTicksDelta = _activeTransport.ClientTicksDelta,\r\n                            PacketReceivedHandler = OnPacketReceived\r\n                        });\r\n                }\r\n            }\r\n\r\n            HistoryItem historyItem = null;\r\n            if (string.Equals(caption, \"ping\", StringComparison.OrdinalIgnoreCase)\r\n                || string.Equals(caption, \"ping_delay_disconnect\", StringComparison.OrdinalIgnoreCase)\r\n                || string.Equals(caption, \"messages.container\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                //save items to history\r\n                historyItem = new HistoryItem\r\n                {\r\n                    SendTime = DateTime.Now,\r\n                    //SendBeforeTime = sendBeforeTime,\r\n                    Caption = caption,\r\n                    Object = obj,\r\n                    Message = transportMessage,\r\n                    Callback = t => callback((T)t),\r\n                    AttemptFailed = null,\r\n                    FaultCallback = faultCallback,\r\n                    ClientTicksDelta = clientsTicksDelta,\r\n                    Status = RequestStatus.Sent,\r\n                };\r\n\r\n                lock (_historyRoot)\r\n                {\r\n                    _history[historyItem.Hash] = historyItem;\r\n                }\r\n#if DEBUG\r\n                NotifyOfPropertyChange(() => History);\r\n#endif\r\n            }\r\n\r\n            //Debug.WriteLine(\">>{0, -30} MsgId {1} SeqNo {2, -4} SessionId {3}\", caption, transportMessage.MessageId.Value, transportMessage.SeqNo.Value, transportMessage.SessionId.Value);\r\n\r\n            var captionString = string.Format(\"{0} {1}\", caption, transportMessage.MessageId);\r\n\r\n            SendPacketAsync(_activeTransport, captionString, encryptedMessage,\r\n                result =>\r\n                {\r\n                    if (!result)\r\n                    {\r\n                        if (historyItem != null)\r\n                        {\r\n                            lock (_historyRoot)\r\n                            {\r\n                                _history.Remove(historyItem.Hash);\r\n                            }\r\n#if DEBUG\r\n                            NotifyOfPropertyChange(() => History);\r\n#endif\r\n                        }\r\n                        faultCallback.SafeInvoke(new TLRPCError(404) { Message = new TLString(\"FastCallback SocketError=\" + result) });\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n                    if (historyItem != null)\r\n                    {\r\n                        lock (_historyRoot)\r\n                        {\r\n                            _history.Remove(historyItem.Hash);\r\n                        }\r\n#if DEBUG\r\n                        NotifyOfPropertyChange(() => History);\r\n#endif\r\n                    }\r\n                    faultCallback.SafeInvoke(new TLRPCError(404)\r\n                    {\r\n#if WINDOWS_PHONE\r\n                        SocketError = error.Error,\r\n#endif\r\n                        Exception = error.Exception\r\n                    });\r\n                });\r\n        }\r\n\r\n        private void SendPacketAsync(ITransport transport, string caption, TLObject data, Action<bool> callback, Action<TcpTransportResult> faultCallback = null)\r\n        {\r\n            if (_deviceInfo != null && _deviceInfo.IsBackground)\r\n            {\r\n                if (caption.Contains(\"account.updateStatus\"))\r\n                {\r\n\r\n                }\r\n                Log.SyncWrite(\"Background MTProto send \" + caption);\r\n            }\r\n\r\n            transport.SendPacketAsync(\r\n                caption,\r\n                data.ToBytes(),\r\n                callback,\r\n                faultCallback);\r\n        }\r\n\r\n        private readonly object _historyRoot = new object();\r\n\r\n        public void SendInformativeMessageInternal<T>(string caption, TLObject obj, Action<T> callback, Action<TLRPCError> faultCallback = null,\r\n            int? maxAttempt = null, // to send delayed items\r\n            Action<int> attemptFailed = null,\r\n            Action fastCallback = null) // to send delayed items\r\n            where T : TLObject\r\n        {\r\n            if (_activeTransport.AuthKey == null)\r\n            {\r\n                var delayedItem = new DelayedItem\r\n                {\r\n                    SendTime = DateTime.Now,\r\n                    //SendBeforeTime = sendBeforeTime,\r\n                    Caption = caption,\r\n                    Object = obj,\r\n                    Callback = t => callback((T)t),\r\n                    AttemptFailed = attemptFailed,\r\n                    FaultCallback = faultCallback,\r\n                    MaxAttempt = maxAttempt\r\n                };\r\n                lock (_delayedItemsRoot)\r\n                {\r\n                    _delayedItems.Add(delayedItem);\r\n                }\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(string.Format(\"Add delayed item {0} sendTime={1}\", delayedItem.Caption, delayedItem.SendTime.ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture)));\r\n#endif\r\n\r\n                return;\r\n            }\r\n\r\n            lock (_activeTransportRoot)\r\n            {\r\n                if (_activeTransport.Closed)\r\n                {\r\n                    _activeTransport = GetTransport(_activeTransport.Host, _activeTransport.Port, Type,\r\n                        new TransportSettings\r\n                        {\r\n                            DcId = _activeTransport.DCId,\r\n                            Secret = _activeTransport.Secret,\r\n                            AuthKey = _activeTransport.AuthKey,\r\n                            Salt = _activeTransport.Salt,\r\n                            SessionId = _activeTransport.SessionId,\r\n                            MessageIdDict = _activeTransport.MessageIdDict,\r\n                            SequenceNumber = _activeTransport.SequenceNumber,\r\n                            ClientTicksDelta = _activeTransport.ClientTicksDelta,\r\n                            PacketReceivedHandler = OnPacketReceived\r\n                        });\r\n                }\r\n            }\r\n\r\n            PrintCaption(caption);\r\n\r\n            TLObject data;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                if (!_activeTransport.Initiated || caption == \"auth.sendCode\")\r\n                {\r\n                    var initConnection = new TLInitConnection78\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        AppId = new TLInt(Constants.ApiId),\r\n                        AppVersion = new TLString(_deviceInfo.AppVersion),\r\n                        Data = obj,\r\n                        DeviceModel = new TLString(_deviceInfo.Model),\r\n                        LangCode = new TLString(Utils.CurrentUICulture()),\r\n                        SystemLangCode = new TLString(Utils.CurrentUICulture()),\r\n                        LangPack = TLString.Empty,\r\n                        SystemVersion = new TLString(_deviceInfo.SystemVersion),\r\n                        Proxy = TLUtils.GetInputProxy(_transportService.GetProxyConfig())\r\n                    };\r\n\r\n                    //Execute.ShowDebugMessage(\"initConnection dc_id=\" + _activeTransport.DCId);\r\n\r\n                    SaveInitConnectionAsync(initConnection);\r\n\r\n                    var withLayerN = new TLInvokeWithLayerN { Data = initConnection };\r\n                    data = withLayerN;\r\n                    _activeTransport.Initiated = true;\r\n                }\r\n                else\r\n                {\r\n                    data = obj;\r\n                }\r\n            }\r\n\r\n            int sequenceNumber;\r\n            TLLong messageId;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                sequenceNumber = _activeTransport.SequenceNumber * 2 + 1;\r\n                _activeTransport.SequenceNumber++;\r\n                messageId = _activeTransport.GenerateMessageId(true);\r\n            }\r\n            var authKey = _activeTransport.AuthKey;\r\n            var salt = _activeTransport.Salt;\r\n            var sessionId = _activeTransport.SessionId;\r\n            var clientsTicksDelta = _activeTransport.ClientTicksDelta;\r\n            var transportMessage = CreateTLTransportMessage(salt, sessionId, new TLInt(sequenceNumber), messageId, data);\r\n            var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n            //save items to history\r\n            var historyItem = new HistoryItem\r\n            {\r\n                SendTime = DateTime.Now,\r\n                //SendBeforeTime = sendBeforeTime,\r\n                Caption = caption,\r\n                Object = obj,\r\n                Message = transportMessage,\r\n                Callback = t => callback((T)t),\r\n                AttemptFailed = attemptFailed,\r\n                FaultCallback = faultCallback,\r\n                ClientTicksDelta = clientsTicksDelta,\r\n                Status = RequestStatus.Sent,\r\n            };\r\n\r\n            lock (_historyRoot)\r\n            {\r\n#if DEBUG\r\n                HistoryItem existingItem;\r\n                if (_history.TryGetValue(historyItem.Hash, out existingItem))\r\n                {\r\n                    Execute.ShowDebugMessage(string.Format(\"Duplicated history item hash={0} existing={1} new={2}\", historyItem.Hash, existingItem.Caption, historyItem.Caption));\r\n                }\r\n                _history[historyItem.Hash] = historyItem;\r\n#else\r\n                _history[historyItem.Hash] = historyItem;\r\n#endif\r\n            }\r\n\r\n#if DEBUG\r\n            ITransport transport;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                transport = _activeTransport;\r\n            }\r\n            var transportId = transport.Id;\r\n            var lastReceiveTime = transport.LastReceiveTime;\r\n            int historyCount;\r\n            string historyDescription;\r\n            lock (_historyRoot)\r\n            {\r\n                historyCount = _history.Count;\r\n                historyDescription = string.Join(\"\\n\", _history.Values.Select(x => x.Caption + \" \" + x.Hash));\r\n            }\r\n            var currentPacketLength = transport.PacketLength;\r\n            var lastPacketLength = transport.LastPacketLength;\r\n\r\n            RaiseTransportChecked(new TransportCheckedEventArgs\r\n            {\r\n                TransportId = transportId,\r\n                SessionId = sessionId,\r\n                AuthKey = authKey,\r\n                LastReceiveTime = lastReceiveTime,\r\n                HistoryCount = historyCount,\r\n                HistoryDescription = historyDescription,\r\n                NextPacketLength = currentPacketLength,\r\n                LastPacketLength = lastPacketLength\r\n            });\r\n#endif\r\n\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(string.Format(\"Add history item {0} sendTime={1}\", historyItem.Caption, historyItem.SendTime.ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture)));\r\n#endif\r\n#if DEBUG\r\n            if (historyItem.Caption != \"account.updateStatus\") // to avoid deadlock on deactivation\r\n            {\r\n                NotifyOfPropertyChange(() => History);\r\n            }\r\n#endif\r\n\r\n            //Debug.WriteLine(\">>{0, -30} MsgId {1} SeqNo {2, -4} SessionId {3} ClientTicksDelta {4}\", caption, transportMessage.MessageId.Value, transportMessage.SeqNo.Value, transportMessage.SessionId.Value, clientsTicksDelta);\r\n\r\n\r\n            var captionString = string.Format(\"{0} {1} {2}\", caption, transportMessage.SessionId, transportMessage.MessageId);\r\n            SendPacketAsync(_activeTransport, captionString, encryptedMessage,\r\n                result =>\r\n                {\r\n                    if (!result)\r\n                    {\r\n                        if (historyItem != null)\r\n                        {\r\n                            lock (_historyRoot)\r\n                            {\r\n                                _history.Remove(historyItem.Hash);\r\n                            }\r\n#if DEBUG\r\n                            if (historyItem.Caption != \"account.updateStatus\") // to avoid deadlock on deactivation\r\n                            {\r\n                                NotifyOfPropertyChange(() => History);\r\n                            }\r\n#endif\r\n                        }\r\n                        faultCallback.SafeInvoke(new TLRPCError(404) { Message = new TLString(\"FastCallback SocketError=\" + result) });\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n                    if (historyItem != null)\r\n                    {\r\n                        lock (_historyRoot)\r\n                        {\r\n                            _history.Remove(historyItem.Hash);\r\n                        }\r\n#if DEBUG\r\n                        if (historyItem.Caption != \"account.updateStatus\") // to avoid deadlock on deactivation\r\n                        {\r\n                            NotifyOfPropertyChange(() => History);\r\n                        }\r\n#endif\r\n                    }\r\n                    faultCallback.SafeInvoke(new TLRPCError(404)\r\n                    {\r\n#if WINDOWS_PHONE\r\n                        SocketError = error.Error,\r\n#endif\r\n                        Exception = error.Exception\r\n                    });\r\n                });\r\n        }\r\n\r\n        private void SendInformativeMessage<T>(string caption, TLObject obj, Action<T> callback, Action<TLRPCError> faultCallback = null,\r\n            int? maxAttempt = null,                 // to send delayed items\r\n            Action<int> attemptFailed = null)       // to send delayed items\r\n            where T : TLObject\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                SendInformativeMessageInternal(caption, obj, callback, faultCallback, maxAttempt, attemptFailed);\r\n            });\r\n        }\r\n\r\n        private void SendNonEncryptedMessage<T>(string caption, TLObject obj, Action<T> callback, Action<TLRPCError> faultCallback = null)\r\n            where T : TLObject\r\n        {\r\n            PrintCaption(caption);\r\n            TLLong messageId;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                messageId = _activeTransport.GenerateMessageId();\r\n            }\r\n            var message = CreateTLNonEncryptedMessage(messageId, obj);\r\n\r\n            var historyItem = new HistoryItem\r\n            {\r\n                Caption = caption,\r\n                Message = message,\r\n                Callback = t => callback((T)t),\r\n                FaultCallback = faultCallback,\r\n                SendTime = DateTime.Now,\r\n                Status = RequestStatus.Sent\r\n            };\r\n\r\n            var guid = message.MessageId;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                if (_activeTransport.Closed)\r\n                {\r\n                    _activeTransport = GetTransport(_activeTransport.Host, _activeTransport.Port, Type,\r\n                        new TransportSettings\r\n                        {\r\n                            DcId = _activeTransport.DCId,\r\n                            Secret = _activeTransport.Secret,\r\n                            AuthKey = _activeTransport.AuthKey,\r\n                            Salt = _activeTransport.Salt,\r\n                            SessionId = _activeTransport.SessionId,\r\n                            MessageIdDict = _activeTransport.MessageIdDict,\r\n                            SequenceNumber = _activeTransport.SequenceNumber,\r\n                            ClientTicksDelta = _activeTransport.ClientTicksDelta,\r\n                            PacketReceivedHandler = OnPacketReceived\r\n                        });\r\n                }\r\n            }\r\n\r\n            var activeTransport = _activeTransport; // до вызова callback _activeTransport может уже поменяться\r\n\r\n            // Сначала создаем или получаем транспорт, а потом добавляем в его историю.\r\n            // Если сначала добавить в историю транспорта, то потом можем получить новый и не найдем запрос\r\n            _activeTransport.EnqueueNonEncryptedItem(historyItem);\r\n\r\n            var bytes = message.ToBytes();\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(string.Format(\"SendPacketAsync {0} [{1}](data length={2})\", _activeTransport.Id, caption, bytes.Length));\r\n#endif\r\n            var captionString = string.Format(\"{0} {1}\", caption, guid);\r\n            SendPacketAsync(_activeTransport, captionString, message,\r\n                socketError =>\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(string.Format(\"SendPacketAsync fastCallback {0} [{1}] socketError={2}\", activeTransport.Id, caption, socketError));\r\n#endif\r\n                    if (!socketError)\r\n                    {\r\n                        var result = activeTransport.RemoveNonEncryptedItem(historyItem);\r\n\r\n                        if (result)\r\n                        {\r\n                            faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"FastCallback SocketError=\" + socketError) });\r\n                        }\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(string.Format(\"SendPacketAsync error {0} [{1}] error={2}\", activeTransport.Id, caption, error));\r\n#endif\r\n                    var result = activeTransport.RemoveNonEncryptedItem(historyItem);\r\n\r\n                    // чтобы callback не вызвался два раза из CheckTimeouts и отсюда\r\n                    if (result)\r\n                    {\r\n                        faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"FaltCallback\") });\r\n                    }\r\n                });\r\n        }\r\n\r\n        private static TLEncryptedTransportMessage CreateTLEncryptedMessage(byte[] authKey, TLContainerTransportMessage containerTransportMessage)\r\n        {\r\n            var message = new TLEncryptedTransportMessage { Data = containerTransportMessage.ToBytes() };\r\n\r\n            return message.Encrypt(authKey);\r\n        }\r\n\r\n        private TLTransportMessage CreateTLTransportMessage(TLLong salt, TLLong sessionId, TLInt seqNo, TLLong messageId, TLObject obj)\r\n        {\r\n            var message = new TLTransportMessage();\r\n            message.Salt = salt;\r\n            message.SessionId = sessionId;\r\n            message.MessageId = messageId;\r\n            message.SeqNo = seqNo;\r\n            message.MessageData = obj;\r\n\r\n            return message;\r\n        }\r\n\r\n        public static TLNonEncryptedMessage CreateTLNonEncryptedMessage(TLLong messageId, TLObject obj)\r\n        {\r\n            var message = new TLNonEncryptedMessage();\r\n            message.AuthKeyId = new TLLong(0);\r\n            message.MessageId = messageId;\r\n            message.Data = obj;\r\n\r\n            return message;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.HttpLongPoll.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Threading;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public enum TransportType\r\n    {\r\n        Http,\r\n\t\tTcp\r\n    }\r\n\r\n    public partial class MTProtoService\r\n    {\r\n        private volatile bool _isLongPollStopped;\r\n\r\n        private const int ReattemptDelay = Constants.LongPollReattemptDelay;\r\n\r\n        public void StartLongPollRequestAsync()\r\n        {\r\n\t\t\tif (_isLongPollStopped || _type != TransportType.Http) return;\r\n            TLUtils.WriteLongPoll(\"Send \" + DateTime.Now);\r\n            try\r\n            {\r\n\t\t\t\tHttpWaitAsync(new TLInt(0), new TLInt(0), new TLInt(25000),\r\n\t\t\t\t    () =>\r\n\t\t\t\t    {\r\n                        TLUtils.WriteLongPoll(\"Receive \" + DateTime.Now);\r\n\t\t\t\t        StartLongPollRequestAsync();\r\n\t\t\t\t    },\r\n\t\t\t\t    () =>\r\n\t\t\t\t    {\r\n                        TLUtils.WriteLongPoll(\"Receive failed \" + DateTime.Now);\r\n\t\t\t\t        StartLongPollRequestAsync();\r\n\t\t\t\t    });\r\n            }\r\n            catch (Exception)\r\n            {\r\n                TLUtils.WriteLongPoll(\"Receive failed \" + DateTime.Now);\r\n                Execute.BeginOnThreadPool(TimeSpan.FromSeconds(5.0), StartLongPollRequestAsync);\r\n            }\r\n        }\r\n\r\n        public void StartLongPoll()\r\n        {\r\n            TLUtils.WriteLongPoll(\"Start long poll \" + DateTime.Now);\r\n            _isLongPollStopped = false;\r\n\t\t\tStartLongPollRequestAsync();\r\n        }\r\n\r\n        public void StopLongPoll()\r\n        {\r\n            TLUtils.WriteLongPoll(\"Stop long poll \" + DateTime.Now);\r\n            _isLongPollStopped = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Langpack.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Langpack;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        public void GetLangPackAsync(TLString langCode, Action<TLLangPackDifference> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetLangPack { LangCode = langCode };\r\n\r\n            SendInformativeMessage(\"langpack.getLangPack\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetStringsAsync(TLString langCode, TLVector<TLString> keys, Action<TLVector<TLLangPackStringBase>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetStrings { LangCode = langCode, Keys = keys };\r\n\r\n            SendInformativeMessage(\"langpack.getStrings\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetDifferenceAsync(TLInt fromVersion, Action<TLLangPackDifference> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetDifference { FromVersion = fromVersion };\r\n\r\n            SendInformativeMessage(\"langpack.getDifference\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetLanguagesAsync(Action<TLVector<TLLangPackLanguage>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetLanguages();\r\n\r\n            SendInformativeMessage(\"langpack.getLanguages\", obj, callback, faultCallback);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Messages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Help;\r\nusing Telegram.Api.TL.Functions.Messages;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        public void ToggleTopPeersAsync(TLBool enabled, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLToggleTopPeers{ Enabled = enabled };\r\n\r\n            const string caption = \"messages.toggleTopPeers\";\r\n            SendInformativeMessage<TLBool>(caption, obj,\r\n                callback.SafeInvoke,\r\n                faultCallback);\r\n        }\r\n\r\n        public void ClearAllDraftsAsync(Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLClearAllDrafts();\r\n\r\n            const string caption = \"messages.clearAllDrafts\";\r\n            SendInformativeMessage<TLBool>(caption, obj,\r\n                callback.SafeInvoke,\r\n                faultCallback);\r\n        }\r\n\r\n        public void MarkDialogUnreadAsync(bool unread, TLInputDialogPeer peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLMarkDialogUnread{ Flags = new TLInt(0), Unread = unread, Peer = peer };\r\n\r\n            const string caption = \"messages.markDialogUnread\";\r\n            SendInformativeMessage<TLBool>(caption, obj,\r\n                callback.SafeInvoke,\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetDialogUnreadMarksAsync(Action<TLVector<TLDialogPeerBase>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetDialogUnreadMarks();\r\n\r\n            const string caption = \"messages.getDialogUnreadMarks\";\r\n            SendInformativeMessage<TLVector<TLDialogPeerBase>>(caption, obj,\r\n                callback.SafeInvoke,\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetProxyDataAsync(Action<TLProxyDataBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetProxyData();\r\n\r\n            const string caption = \"messages.getProxyData\";\r\n            SendInformativeMessage<TLProxyDataBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    _cacheService.SyncProxyData(result, callback.SafeInvoke);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void SearchStickerSetsAsync(bool full, bool excludeFeatured, TLString q, TLInt hash, Action<TLFoundStickerSetsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSearchStickerSets { Flags = new TLInt(0), ExcludeFeatured = excludeFeatured, Q = q, Hash = hash };\r\n\r\n            var results = new List<TLMessagesStickerSet>();\r\n            var resultsSyncRoot = new object();\r\n\r\n            const string caption = \"messages.searchStickerSets\";\r\n            SendInformativeMessage<TLFoundStickerSetsBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var foundStickerSets = result as TLFoundStickerSets;\r\n                    if (foundStickerSets != null && full)\r\n                    {\r\n                        GetStickerSetsAsync(foundStickerSets, r => callback(r as TLFoundStickerSetsBase),\r\n                            stickerSetResult =>\r\n                            {\r\n                                var messagesStickerSet = stickerSetResult as TLMessagesStickerSet;\r\n                                if (messagesStickerSet != null)\r\n                                {\r\n                                    bool processStickerSets;\r\n                                    lock (resultsSyncRoot)\r\n                                    {\r\n                                        results.Add(messagesStickerSet);\r\n                                        processStickerSets = results.Count == foundStickerSets.Sets.Count;\r\n                                    }\r\n\r\n                                    if (processStickerSets)\r\n                                    {\r\n                                        ProcessStickerSets(foundStickerSets, results);\r\n                                        foundStickerSets.MessagesStickerSets = new TLVector<TLMessagesStickerSet>(results);\r\n                                        callback.SafeInvoke(foundStickerSets);\r\n                                    }\r\n                                }\r\n                            },\r\n                            faultCallback);\r\n                    }\r\n                    else\r\n                    {\r\n                        callback.SafeInvoke(result);\r\n                    }\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void ReportAsync(TLInputPeerBase peer, TLVector<TLInt> id, TLInputReportReasonBase reason, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReport { Peer = peer, Id = id, Reason = reason };\r\n\r\n            const string caption = \"messages.report\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetStickersAsync(TLString emoticon, TLInt hash, Action<TLStickersBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetStickers { Emoticon = emoticon, Hash = hash };\r\n\r\n            const string caption = \"messages.getStickers\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetRecentLocationsAsync(TLInputPeerBase peer, TLInt limit, TLInt hash, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetRecentLocations { Peer = peer, Limit = limit, Hash = hash };\r\n\r\n            const string caption = \"messages.getRecentLocations\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetFavedStickersAsync(TLInt hash, Action<TLFavedStickersBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetFavedStickers { Hash = hash };\r\n\r\n            const string caption = \"messages.getFavedStickers\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void FaveStickerAsync(TLInputDocumentBase id, TLBool unfave, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLFaveSticker { Id = id, Unfave = unfave };\r\n\r\n            const string caption = \"messages.faveSticker\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetUnreadMentionsAsync(TLInputPeerBase peer, TLInt offsetId, TLInt addOffset, TLInt limit, TLInt maxId, TLInt minId, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetUnreadMentions { Peer = peer, OffsetId = offsetId, AddOffset = addOffset, Limit = limit, MinId = minId, MaxId = maxId };\r\n\r\n            SendInformativeMessage<TLMessagesBase>(\"messages.getUnreadMentions\", obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void ToggleDialogPinAsync(bool pinned, TLPeerBase peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLToggleDialogPin { Flags = new TLInt(0), Peer = PeerToInputPeer(peer), Pinned = pinned };\r\n\r\n            const string caption = \"messages.toggleDialogPin\";\r\n            SendInformativeMessage<TLBool>(caption, obj,\r\n                result =>\r\n                {\r\n                    _cacheService.UpdateDialogPinned(peer, pinned);\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void ReorderPinnedDialogsAsync(bool force, TLVector<TLInputDialogPeerBase> order, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReorderPinnedDialogs { Flags = new TLInt(0), Order = order };\r\n            if (force)\r\n            {\r\n                obj.SetForce();\r\n            }\r\n\r\n            const string caption = \"messages.reorderPinnedDialogs\";\r\n            SendInformativeMessage<TLBool>(caption, obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void GetWebPageAsync(TLString url, TLInt hash, Action<TLWebPageBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetWebPage { Url = url, Hash = hash };\r\n\r\n            const string caption = \"messages.getWebPage\";\r\n            SendInformativeMessage<TLWebPageBase>(caption, obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void GetCommonChatsAsync(TLInputUserBase user, TLInt maxId, TLInt limit, Action<TLChatsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetCommonChats { User = user, MaxId = maxId, Limit = limit };\r\n\r\n            const string caption = \"messages.getCommonChats\";\r\n            SendInformativeMessage<TLChatsBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var chats = result as TLChats24;\r\n                    if (chats != null)\r\n                    {\r\n                        _cacheService.SyncUsersAndChats(new TLVector<TLUserBase>(), chats.Chats, tuple => callback.SafeInvoke(result));\r\n                    }\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        private readonly Dictionary<string, TLArchivedStickers> _cachedArchivedStickers = new Dictionary<string, TLArchivedStickers>();\r\n\r\n        public void GetAttachedStickersAsync(bool full, TLInputStickeredMediaBase media, Action<TLArchivedStickers> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            TLArchivedStickers cachedArchivedStickers;\r\n            var key = string.Format(\"{0} {1}\", media, full);\r\n            if (_cachedArchivedStickers.TryGetValue(key, out cachedArchivedStickers))\r\n            {\r\n                callback.SafeInvoke(cachedArchivedStickers);\r\n                return;\r\n            }\r\n\r\n\r\n            var obj = new TLGetAttachedStickers { Media = media };\r\n\r\n            const string caption = \"messages.getAttachedStickers\";\r\n            //SendInformativeMessage(caption, obj, callback, faultCallback);\r\n            var results = new List<TLMessagesStickerSet>();\r\n            var resultsSyncRoot = new object();\r\n            SendInformativeMessage<TLVector<TLStickerSetCoveredBase>>(caption, obj,\r\n                result =>\r\n                {\r\n                    var archivedStickers = new TLArchivedStickers();\r\n                    archivedStickers.Count = new TLInt(result.Count);\r\n                    archivedStickers.SetsCovered = result;\r\n\r\n                    archivedStickers.Packs = new TLVector<TLStickerPack>();\r\n                    archivedStickers.Documents = new TLVector<TLDocumentBase>();\r\n                    archivedStickers.MessagesStickerSets = new TLVector<TLMessagesStickerSet>();\r\n\r\n                    if (full)\r\n                    {\r\n                        GetStickerSetsAsync(archivedStickers, r => callback(r as TLArchivedStickers),\r\n                            stickerSetResult =>\r\n                            {\r\n                                var messagesStickerSet = stickerSetResult as TLMessagesStickerSet;\r\n                                if (messagesStickerSet != null)\r\n                                {\r\n                                    bool processStickerSets;\r\n                                    lock (resultsSyncRoot)\r\n                                    {\r\n                                        results.Add(messagesStickerSet);\r\n                                        processStickerSets = results.Count == archivedStickers.Sets.Count;\r\n                                    }\r\n\r\n                                    if (processStickerSets)\r\n                                    {\r\n                                        ProcessStickerSets(archivedStickers, results);\r\n                                        archivedStickers.MessagesStickerSets = new TLVector<TLMessagesStickerSet>(results);\r\n                                        _cachedArchivedStickers[key] = archivedStickers;\r\n                                        callback.SafeInvoke(archivedStickers);\r\n                                    }\r\n                                }\r\n                            },\r\n                            faultCallback);\r\n                    }\r\n                    else\r\n                    {\r\n                        _cachedArchivedStickers[key] = archivedStickers;\r\n                        callback.SafeInvoke(archivedStickers);\r\n                    }\r\n                });\r\n        }\r\n\r\n        public void GetRecentStickersAsync(bool attached, TLInt hash, Action<TLRecentStickersBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetRecentStickers { Flags = new TLInt(0), Hash = hash };\r\n            if (attached)\r\n            {\r\n                obj.SetAttached();\r\n            }\r\n\r\n            const string caption = \"messages.getRecentStickers\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ClearRecentStickersAsync(bool attached, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLClearRecentStickers { Flags = new TLInt(0) };\r\n            if (attached)\r\n            {\r\n                obj.SetAttached();\r\n            }\r\n\r\n            const string caption = \"messages.clearRecentStickers\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetUnusedStickersAsync(TLInt limit, Action<TLVector<TLStickerSetCoveredBase>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetUnusedStickers { Limit = limit };\r\n\r\n            const string caption = \"messages.getUnusedStickers\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ReadFeaturedStickersAsync(TLVector<TLLong> id, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n#if DEBUG\r\n            callback.SafeInvoke(TLBool.True);\r\n            return;\r\n#endif\r\n\r\n            var obj = new TLReadFeaturedStickers { Id = id };\r\n\r\n            const string caption = \"messages.readFeaturedStickers\";\r\n            SendInformativeMessage<TLBool>(caption, obj, callback.SafeInvoke, faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void GetAllDraftsAsync(Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetAllDrafts();\r\n\r\n            const string caption = \"messages.getAllDrafts\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        _updatesService.ProcessUpdates(result, true);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void SaveDraftAsync(TLInputPeerBase peer, TLDraftMessageBase draft, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = draft.ToSaveDraftObject(peer);\r\n\r\n            const string caption = \"messages.saveDraft\";\r\n            SendInformativeMessage<TLBool>(caption, obj,\r\n                result =>\r\n                {\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void GetInlineBotResultsAsync(TLInputUserBase bot, TLInputPeerBase peer, TLInputGeoPointBase geoPoint, TLString query, TLString offset, Action<TLBotResults> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var key = string.Format(\"{0}_{1}_{2}_{3}_{4}\", bot, peer, geoPoint, query, offset);\r\n\r\n            TLBotResults botResults;\r\n            if (TryGetCachedValue(_cache, key, out botResults, IsCacheTimeValid))\r\n            {\r\n                callback.SafeInvoke(botResults);\r\n                return;\r\n            }\r\n\r\n            var obj = new TLGetInlineBotResults { Flags = new TLInt(0), Bot = bot, Peer = peer, GeoPoint = geoPoint, Query = query, Offset = offset };\r\n\r\n            const string caption = \"messages.getInlineBotResults\";\r\n            SendInformativeMessage<TLBotResults>(caption, obj,\r\n                result =>\r\n                {\r\n                    SetCachedValue(ref _cache, key, result as ICachedObject, IsCacheTimeValid);\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void SetInlineBotResultsAsync(TLBool gallery, TLBool pr, TLLong queryId, TLVector<TLInputBotInlineResult> results, TLInt cacheTime, TLString nextOffset, TLInlineBotSwitchPM switchPM, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSetInlineBotResults { Flags = new TLInt(0), Gallery = gallery, Private = pr, QueryId = queryId, Results = results, CacheTime = cacheTime, NextOffset = nextOffset, SwitchPM = switchPM };\r\n\r\n            const string caption = \"messages.setInlineBotResults\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SendInlineBotResultAsync(TLMessage45 message, Action<TLMessageCommon> callback, Action fastCallback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var inputPeer = PeerToInputPeer(message.ToId);\r\n            var obj = new TLSendInlineBotResult { Flags = new TLInt(0), Peer = inputPeer, ReplyToMsgId = message.ReplyToMsgId, RandomId = message.RandomId, QueryId = message.InlineBotResultQueryId, Id = message.InlineBotResultId };\r\n\r\n            if (message.IsChannelMessage)\r\n            {\r\n                obj.SetChannelMessage();\r\n            }\r\n\r\n            var message48 = message as TLMessage48;\r\n            if (message48 != null && message48.Silent)\r\n            {\r\n                obj.SetSilent();\r\n            }\r\n\r\n            const string caption = \"messages.sendInlineBotResult\";\r\n            SendInlineBotResultAsyncInternal(obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    var shortSentMessage = result as TLUpdatesShortSentMessage;\r\n                    if (shortSentMessage != null)\r\n                    {\r\n                        message.Flags = shortSentMessage.Flags;\r\n                        if (shortSentMessage.HasMedia)\r\n                        {\r\n                            message._media = shortSentMessage.Media;\r\n                        }\r\n                        if (shortSentMessage.HasEntities)\r\n                        {\r\n                            message.Entities = shortSentMessage.Entities;\r\n                        }\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            message.Status = GetMessageStatus(_cacheService, message.ToId);\r\n                            message.Date = shortSentMessage.Date;\r\n                            if (shortSentMessage.Media is TLMessageMediaWebPage)\r\n                            {\r\n                                message.NotifyOfPropertyChange(() => message.Media);\r\n                            }\r\n\r\n#if DEBUG\r\n                            message.Id = shortSentMessage.Id;\r\n                            message.NotifyOfPropertyChange(() => message.Id);\r\n                            message.NotifyOfPropertyChange(() => message.Date);\r\n#endif\r\n                        });\r\n\r\n                        _updatesService.SetState(multiPts, caption);\r\n\r\n                        message.Id = shortSentMessage.Id;\r\n                        _cacheService.SyncSendingMessage(message, null, callback);\r\n                        return;\r\n                    }\r\n\r\n                    var updates = result as TLUpdates;\r\n                    if (updates != null)\r\n                    {\r\n                        foreach (var update in updates.Updates)\r\n                        {\r\n                            var updateNewMessage = update as TLUpdateNewMessage24;\r\n                            if (updateNewMessage != null)\r\n                            {\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    // faster update web page with inline bots @imdb, @vid, @wiki\r\n                                    var newMessage = updateNewMessage.Message as TLMessage45;\r\n                                    if (newMessage != null)\r\n                                    {\r\n                                        var mediaWebPage = newMessage.Media as TLMessageMediaWebPage;\r\n                                        if (mediaWebPage != null)\r\n                                        {\r\n                                            message.Media = newMessage.Media;\r\n                                        }\r\n\r\n                                        if (mediaWebPage == null)\r\n                                        {\r\n                                            //Execute.ShowDebugMessage(newMessage.Media.GetType().ToString());\r\n                                        }\r\n                                    }\r\n                                });\r\n\r\n                                var messageCommon = updateNewMessage.Message as TLMessageCommon;\r\n                                if (messageCommon != null)\r\n                                {\r\n                                    messageCommon.RandomId = message.RandomId;\r\n                                    message.Id = messageCommon.Id;\r\n                                    message.Date = messageCommon.Date;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            message.Status = GetMessageStatus(_cacheService, message.ToId);\r\n                        });\r\n\r\n                        if (multiPts != null)\r\n                        {\r\n                            _updatesService.SetState(multiPts, caption);\r\n                        }\r\n                        else\r\n                        {\r\n                            _updatesService.ProcessUpdates(updates);\r\n                        }\r\n\r\n                        callback.SafeInvoke(message);\r\n                    }\r\n                },\r\n                fastCallback,\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void GetDocumentByHashAsync(TLString sha256, TLInt size, TLString mimeType, Action<TLDocumentBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetDocumentByHash { Sha256 = sha256, Size = size, MimeType = mimeType };\r\n\r\n            const string caption = \"messages.getDocumentByHash\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SearchGifsAsync(TLString q, TLInt offset, Action<TLFoundGifs> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSearchGifs { Q = q, Offset = offset };\r\n\r\n            const string caption = \"messages.searchGifs\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetSavedGifsAsync(TLInt hash, Action<TLSavedGifsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetSavedGifs { Hash = hash };\r\n\r\n            const string caption = \"messages.getSavedGifs\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SaveGifAsync(TLInputDocumentBase id, TLBool unsave, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSaveGif { Id = id, Unsave = unsave };\r\n\r\n            const string caption = \"messages.saveGif\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ReorderStickerSetsAsync(bool masks, TLVector<TLLong> order, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReorderStickerSets { Flags = new TLInt(0), Order = order };\r\n            if (masks)\r\n            {\r\n                obj.SetMasks();\r\n            }\r\n\r\n            const string caption = \"messages.reorderStickerSets\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ReportSpamAsync(TLInputPeerBase peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n#if DEBUG\r\n            Execute.BeginOnThreadPool(() => callback.SafeInvoke(TLBool.True));\r\n            return;\r\n#endif\r\n\r\n            var obj = new TLReportSpam { Peer = peer };\r\n\r\n            const string caption = \"messages.reportSpam\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetWebPagePreviewAsync(TLString message, Action<TLMessageMediaBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetWebPagePreview { Flags = new TLInt(0), Message = message, Entities = null };\r\n\r\n            const string caption = \"messages.getWebPagePreview\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetFeaturedStickersAsync(bool full, TLInt hash, Action<TLFeaturedStickersBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetFeaturedStickers { Hash = hash };\r\n\r\n            const string caption = \"messages.getFeaturedStickers\";\r\n\r\n            var results = new List<TLMessagesStickerSet>();\r\n            var resultsSyncRoot = new object();\r\n            SendInformativeMessage<TLFeaturedStickersBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var featuredStickers = result as TLFeaturedStickers;\r\n                    if (featuredStickers != null && full)\r\n                    {\r\n                        GetStickerSetsAsync(featuredStickers, r => callback(r as TLFeaturedStickersBase),\r\n                            stickerSetResult =>\r\n                            {\r\n                                var messagesStickerSet = stickerSetResult as TLMessagesStickerSet;\r\n                                if (messagesStickerSet != null)\r\n                                {\r\n                                    bool processStickerSets;\r\n                                    lock (resultsSyncRoot)\r\n                                    {\r\n                                        results.Add(messagesStickerSet);\r\n                                        processStickerSets = results.Count == featuredStickers.Sets.Count;\r\n                                    }\r\n\r\n                                    if (processStickerSets)\r\n                                    {\r\n                                        ProcessStickerSets(featuredStickers, results);\r\n                                        featuredStickers.MessagesStickerSets = new TLVector<TLMessagesStickerSet>(results);\r\n                                        //Execute.ShowDebugMessage(caption + \" elapsed=\" + stopwatch.Elapsed);\r\n                                        callback.SafeInvoke(featuredStickers);\r\n                                    }\r\n                                }\r\n                            },\r\n                            faultCallback);\r\n                    }\r\n                    else\r\n                    {\r\n                        callback.SafeInvoke(result);\r\n                    }\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void GetArchivedStickersAsync(bool full, TLLong offsetId, TLInt limit, Action<TLArchivedStickers> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetArchivedStickers { Flags = new TLInt(0), OffsetId = offsetId, Limit = limit };\r\n            //obj.SetMasks();\r\n\r\n            const string caption = \"messages.getArchivedStickers\";\r\n\r\n            var results = new List<TLMessagesStickerSet>();\r\n            var resultsSyncRoot = new object();\r\n            SendInformativeMessage<TLArchivedStickers>(caption, obj,\r\n                result =>\r\n                {\r\n                    if (full)\r\n                    {\r\n                        GetStickerSetsAsync(result, r => callback(r as TLArchivedStickers),\r\n                            stickerSetResult =>\r\n                            {\r\n                                var messagesStickerSet = stickerSetResult as TLMessagesStickerSet;\r\n                                if (messagesStickerSet != null)\r\n                                {\r\n                                    bool processStickerSets;\r\n                                    lock (resultsSyncRoot)\r\n                                    {\r\n                                        results.Add(messagesStickerSet);\r\n                                        processStickerSets = results.Count == result.Sets.Count;\r\n                                    }\r\n\r\n                                    if (processStickerSets)\r\n                                    {\r\n                                        ProcessStickerSets(result, results);\r\n                                        result.MessagesStickerSets = new TLVector<TLMessagesStickerSet>(results);\r\n                                        callback.SafeInvoke(result);\r\n                                    }\r\n                                }\r\n                            },\r\n                            faultCallback);\r\n                    }\r\n                    else\r\n                    {\r\n                        callback.SafeInvoke(result);\r\n                    }\r\n                });\r\n        }\r\n\r\n        public void GetMaskStickersAsync(TLString hash, Action<TLAllStickersBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetMaskStickers { Hash = TLUtils.ToTLInt(hash) ?? new TLInt(0) };\r\n\r\n            const string caption = \"messages.getMaskStickers\";\r\n\r\n            var results = new List<TLMessagesStickerSet>();\r\n            var resultsSyncRoot = new object();\r\n            SendInformativeMessage<TLAllStickersBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var allStickers32 = result as TLAllStickers43;\r\n                    if (allStickers32 != null)\r\n                    {\r\n                        GetStickerSetsAsync(allStickers32, r => callback(r as TLAllStickersBase),\r\n                            stickerSetResult =>\r\n                            {\r\n                                var messagesStickerSet = stickerSetResult as TLMessagesStickerSet;\r\n                                if (messagesStickerSet != null)\r\n                                {\r\n                                    bool processStickerSets;\r\n                                    lock (resultsSyncRoot)\r\n                                    {\r\n                                        results.Add(messagesStickerSet);\r\n                                        processStickerSets = results.Count == allStickers32.Sets.Count;\r\n                                    }\r\n\r\n                                    if (processStickerSets)\r\n                                    {\r\n                                        ProcessStickerSets(allStickers32, results);\r\n\r\n                                        callback.SafeInvoke(allStickers32);\r\n                                    }\r\n                                }\r\n                            },\r\n                            faultCallback);\r\n                    }\r\n                    else\r\n                    {\r\n                        callback.SafeInvoke(result);\r\n                    }\r\n                });\r\n        }\r\n\r\n        public void GetAllStickersAsync(TLString hash, Action<TLAllStickersBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetAllStickers { Hash = TLUtils.ToTLInt(hash) ?? new TLInt(0) };\r\n\r\n            const string caption = \"messages.getAllStickers\";\r\n\r\n            var results = new List<TLMessagesStickerSet>();\r\n            var resultsSyncRoot = new object();\r\n            SendInformativeMessage<TLAllStickersBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var allStickers32 = result as TLAllStickers43;\r\n                    if (allStickers32 != null)\r\n                    {\r\n                        GetStickerSetsAsync(allStickers32, r => callback(r as TLAllStickersBase),\r\n                            stickerSetResult =>\r\n                            {\r\n                                var messagesStickerSet = stickerSetResult as TLMessagesStickerSet;\r\n                                if (messagesStickerSet != null)\r\n                                {\r\n                                    bool processStickerSets;\r\n                                    lock (resultsSyncRoot)\r\n                                    {\r\n                                        results.Add(messagesStickerSet);\r\n                                        processStickerSets = results.Count == allStickers32.Sets.Count;\r\n                                    }\r\n\r\n                                    if (processStickerSets)\r\n                                    {\r\n                                        ProcessStickerSets(allStickers32, results);\r\n\r\n                                        callback.SafeInvoke(allStickers32);\r\n                                    }\r\n                                }\r\n                            },\r\n                            faultCallback);\r\n                    }\r\n                    else\r\n                    {\r\n                        callback.SafeInvoke(result);\r\n                    }\r\n                });\r\n        }\r\n\r\n        private static void ProcessStickerSets(IStickers stickers, List<TLMessagesStickerSet> results)\r\n        {\r\n            var documentsDict = new Dictionary<long, TLDocumentBase>();\r\n            var packsDict = new Dictionary<string, TLStickerPack>();\r\n            foreach (var result in results)\r\n            {\r\n                foreach (var pack in result.Packs)\r\n                {\r\n                    var emoticon = pack.Emoticon.ToString();\r\n                    TLStickerPack currentPack;\r\n                    if (packsDict.TryGetValue(emoticon, out currentPack))\r\n                    {\r\n                        var docDict = new Dictionary<long, long>();\r\n                        foreach (var document in currentPack.Documents)\r\n                        {\r\n                            docDict[document.Value] = document.Value;\r\n                        }\r\n                        foreach (var document in pack.Documents)\r\n                        {\r\n                            if (!docDict.ContainsKey(document.Value))\r\n                            {\r\n                                docDict[document.Value] = document.Value;\r\n                                currentPack.Documents.Add(document);\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        packsDict[emoticon] = pack;\r\n                    }\r\n                }\r\n\r\n                foreach (var document in result.Documents)\r\n                {\r\n                    documentsDict[document.Id.Value] = document;\r\n                }\r\n            }\r\n            stickers.Packs = new TLVector<TLStickerPack>();\r\n            foreach (var pack in packsDict.Values)\r\n            {\r\n                stickers.Packs.Add(pack);\r\n            }\r\n            stickers.Documents = new TLVector<TLDocumentBase>();\r\n            foreach (var document in documentsDict.Values)\r\n            {\r\n                stickers.Documents.Add(document);\r\n            }\r\n        }\r\n\r\n        private void GetStickerSetsAsync(IStickers stickers, Action<IStickers> callback, Action<TLObject> getStickerSetCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            var sets = stickers.Sets;\r\n            if (sets.Count == 0)\r\n            {\r\n                callback.SafeInvoke(stickers);\r\n                return;\r\n            }\r\n\r\n            var container = new TLContainer { Messages = new List<TLContainerTransportMessage>() };\r\n            var historyItems = new List<HistoryItem>();\r\n            for (var i = 0; i < sets.Count; i++)\r\n            {\r\n                var set = sets[i];\r\n                var obj = new TLGetStickerSet { Stickerset = new TLInputStickerSetId { Id = set.Id, AccessHash = set.AccessHash } };\r\n                int sequenceNumber;\r\n                TLLong messageId;\r\n                lock (_activeTransportRoot)\r\n                {\r\n                    sequenceNumber = _activeTransport.SequenceNumber * 2 + 1;\r\n                    _activeTransport.SequenceNumber++;\r\n                    messageId = _activeTransport.GenerateMessageId(true);\r\n                }\r\n\r\n                var data = i > 0 ? (TLObject)new TLInvokeAfterMsg { MsgId = container.Messages[i - 1].MessageId, Object = obj } : obj;\r\n\r\n                var transportMessage = new TLContainerTransportMessage\r\n                {\r\n                    MessageId = messageId,\r\n                    SeqNo = new TLInt(sequenceNumber),\r\n                    MessageData = data\r\n                };\r\n\r\n                var historyItem = new HistoryItem\r\n                {\r\n                    SendTime = DateTime.Now,\r\n                    Caption = \"stickers.containerGetStickerSetPart\" + i,\r\n                    Object = obj,\r\n                    Message = transportMessage,\r\n                    Callback = getStickerSetCallback,\r\n                    AttemptFailed = null,\r\n                    FaultCallback = faultCallback,\r\n                    ClientTicksDelta = ClientTicksDelta,\r\n                    Status = RequestStatus.Sent,\r\n                };\r\n                historyItems.Add(historyItem);\r\n\r\n                container.Messages.Add(transportMessage);\r\n            }\r\n\r\n\r\n            lock (_historyRoot)\r\n            {\r\n                foreach (var historyItem in historyItems)\r\n                {\r\n                    _history[historyItem.Hash] = historyItem;\r\n                }\r\n            }\r\n#if DEBUG\r\n            NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n            SendNonInformativeMessage<TLObject>(\"stickers.container\", container, result => callback(null), faultCallback);\r\n        }\r\n\r\n        private Dictionary<string, TLMessagesStickerSet> _stickerSetCache;\r\n\r\n        public void GetStickerSetAsync(TLInputStickerSetBase stickerset, Action<TLMessagesStickerSet> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetStickerSet { Stickerset = stickerset };\r\n\r\n            var inputStickerSetShortName = stickerset as TLInputStickerSetShortName;\r\n            TLMessagesStickerSet cachedValue;\r\n            if (inputStickerSetShortName != null && _stickerSetCache != null && _stickerSetCache.TryGetValue(inputStickerSetShortName.ShortName.ToString(), out cachedValue))\r\n            {\r\n                callback.SafeInvoke(cachedValue);\r\n                return;\r\n            }\r\n\r\n            const string caption = \"messages.getStickerSet\";\r\n            SendInformativeMessage<TLMessagesStickerSet>(caption, obj,\r\n                result =>\r\n                {\r\n                    _stickerSetCache = _stickerSetCache ?? new Dictionary<string, TLMessagesStickerSet>();\r\n                    _stickerSetCache[result.Set.ShortName.ToString()] = result;\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void InstallStickerSetAsync(TLInputStickerSetBase stickerset, TLBool archived, Action<TLStickerSetInstallResultBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLInstallStickerSet { Stickerset = stickerset, Archived = archived };\r\n\r\n            const string caption = \"messages.installStickerSet\";\r\n\r\n            var results = new List<TLMessagesStickerSet>();\r\n            var resultsSyncRoot = new object();\r\n            SendInformativeMessage<TLStickerSetInstallResultBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var resultArchive = result as TLStickerSetInstallResultArchive;\r\n                    if (resultArchive != null)\r\n                    {\r\n                        GetStickerSetsAsync(resultArchive, r => callback(r as TLStickerSetInstallResultArchive),\r\n                            stickerSetResult =>\r\n                            {\r\n                                var messagesStickerSet = stickerSetResult as TLMessagesStickerSet;\r\n                                if (messagesStickerSet != null)\r\n                                {\r\n                                    var set32 = messagesStickerSet.Set as TLStickerSet32;\r\n                                    if (set32 != null)\r\n                                    {\r\n                                        set32.Installed = true;\r\n                                        set32.Archived = true;\r\n                                    }\r\n\r\n                                    var set76 = messagesStickerSet.Set as TLStickerSet76;\r\n                                    if (set76 != null)\r\n                                    {\r\n                                        set76.InstalledDate = TLUtils.DateToUniversalTimeTLInt(ClientTicksDelta, DateTime.Now);\r\n                                    }\r\n\r\n                                    bool processStickerSets;\r\n                                    lock (resultsSyncRoot)\r\n                                    {\r\n                                        results.Add(messagesStickerSet);\r\n                                        processStickerSets = results.Count == resultArchive.Sets.Count;\r\n                                    }\r\n\r\n                                    if (processStickerSets)\r\n                                    {\r\n                                        ProcessStickerSets(resultArchive, results);\r\n                                        resultArchive.MessagesStickerSets = new TLVector<TLMessagesStickerSet>(results);\r\n                                        callback.SafeInvoke(result);\r\n                                    }\r\n                                }\r\n                            },\r\n                            faultCallback);\r\n                    }\r\n                    else\r\n                    {\r\n                        callback.SafeInvoke(result);\r\n                    }\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void UninstallStickerSetAsync(TLInputStickerSetBase stickerset, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLUninstallStickerSet { Stickerset = stickerset };\r\n\r\n            const string caption = \"messages.uninstallStickerSet\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        private static MessageStatus GetMessageStatus(ICacheService cacheService, TLPeerBase peer)\r\n        {\r\n            var status = MessageStatus.Confirmed;\r\n            if (peer is TLPeerUser)\r\n            {\r\n                var user = cacheService.GetUser(peer.Id);\r\n                if (user != null)\r\n                {\r\n                    var botInfo = user.BotInfo as TLBotInfo;\r\n                    if (botInfo != null)\r\n                    {\r\n                        status = MessageStatus.Read;\r\n                    }\r\n                    else if (user.IsSelf)\r\n                    {\r\n                        status = MessageStatus.Read;\r\n                    }\r\n                }\r\n            }\r\n\r\n            //if (peer is TLPeerChannel)\r\n            //{\r\n            //    status = MessageStatus.Read;\r\n            //}\r\n\r\n            return status;\r\n        }\r\n\r\n        public TLInputPeerBase PeerToInputPeer(TLPeerBase peer)\r\n        {\r\n            if (peer is TLPeerUser)\r\n            {\r\n                var cachedUser = _cacheService.GetUser(peer.Id);\r\n                if (cachedUser != null)\r\n                {\r\n                    var userForeign = cachedUser as TLUserForeign;\r\n                    var userRequest = cachedUser as TLUserRequest;\r\n                    var user = cachedUser as TLUser;\r\n\r\n                    if (userForeign != null)\r\n                    {\r\n                        return new TLInputPeerUser { UserId = userForeign.Id, AccessHash = userForeign.AccessHash };\r\n                    }\r\n\r\n                    if (userRequest != null)\r\n                    {\r\n                        return new TLInputPeerUser { UserId = userRequest.Id, AccessHash = userRequest.AccessHash };\r\n                    }\r\n\r\n                    if (user != null)\r\n                    {\r\n                        return user.ToInputPeer();\r\n                    }\r\n\r\n                    return new TLInputPeerUser { UserId = peer.Id, AccessHash = new TLLong(0) };\r\n                }\r\n\r\n                return new TLInputPeerUser { UserId = peer.Id, AccessHash = new TLLong(0) };\r\n            }\r\n\r\n            if (peer is TLPeerChannel)\r\n            {\r\n                var channel = _cacheService.GetChat(peer.Id) as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    return new TLInputPeerChannel { ChatId = peer.Id, AccessHash = channel.AccessHash };\r\n                }\r\n            }\r\n\r\n            if (peer is TLPeerChat)\r\n            {\r\n                return new TLInputPeerChat { ChatId = peer.Id };\r\n            }\r\n\r\n            return new TLInputPeerBroadcast { ChatId = peer.Id };\r\n        }\r\n\r\n        public void SendMessageAsync(TLMessage36 message, Action<TLMessageCommon> callback, Action fastCallback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var inputPeer = PeerToInputPeer(message.ToId);\r\n            var obj = new TLSendMessage { Peer = inputPeer, ReplyToMsgId = message.ReplyToMsgId, Message = message.Message, RandomId = message.RandomId };\r\n\r\n            if (message.Entities != null)\r\n            {\r\n                obj.Entities = message.Entities;\r\n            }\r\n\r\n            if (message.NoWebpage)\r\n            {\r\n                obj.NoWebpage();\r\n            }\r\n\r\n            if (message.IsChannelMessage)\r\n            {\r\n                obj.SetChannelMessage();\r\n            }\r\n\r\n            var message48 = message as TLMessage48;\r\n            if (message48 != null && message48.Silent)\r\n            {\r\n                obj.SetSilent();\r\n            }\r\n\r\n            obj.ClearDraft();\r\n\r\n            const string caption = \"messages.sendMessage\";\r\n            SendMessageAsyncInternal(obj,\r\n                result =>\r\n                {\r\n#if DEBUG\r\n                    var builder = new StringBuilder();\r\n                    builder.Append(result.GetType());\r\n                    var updates = result as TLUpdates;\r\n                    var updatesShort = result as TLUpdatesShort;\r\n                    if (updates != null)\r\n                    {\r\n                        foreach (var update in updates.Updates)\r\n                        {\r\n                            builder.Append(update);\r\n                        }\r\n                    }\r\n                    else if (updatesShort != null)\r\n                    {\r\n                        builder.Append(updatesShort.Update);\r\n                    }\r\n\r\n                    Logs.Log.Write(string.Format(\"{0} result={1}\", caption, builder.ToString()));\r\n#endif\r\n\r\n                    var multiPts = result as IMultiPts;\r\n\r\n                    var shortSentMessage = result as TLUpdatesShortSentMessage;\r\n                    if (shortSentMessage != null)\r\n                    {\r\n                        message.Flags = shortSentMessage.Flags;\r\n                        if (shortSentMessage.HasMedia)\r\n                        {\r\n                            message._media = shortSentMessage.Media;\r\n                        }\r\n                        if (shortSentMessage.HasEntities)\r\n                        {\r\n                            message.Entities = shortSentMessage.Entities;\r\n                        }\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            message.Status = GetMessageStatus(_cacheService, message.ToId);\r\n                            message.Date = shortSentMessage.Date;\r\n                            if (shortSentMessage.Media is TLMessageMediaWebPage)\r\n                            {\r\n                                message.NotifyOfPropertyChange(() => message.Media);\r\n                            }\r\n\r\n#if DEBUG\r\n                            message.Id = shortSentMessage.Id;\r\n                            message.NotifyOfPropertyChange(() => message.Id);\r\n                            message.NotifyOfPropertyChange(() => message.Date);\r\n#endif\r\n                        });\r\n\r\n                        _updatesService.SetState(multiPts, caption);\r\n\r\n                        message.Id = shortSentMessage.Id;\r\n                        _cacheService.SyncSendingMessage(message, null, callback);\r\n                        return;\r\n                    }\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        message.Status = GetMessageStatus(_cacheService, message.ToId);\r\n                    });\r\n\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, new List<TLMessage25> { message });\r\n                    }\r\n\r\n                    callback.SafeInvoke(message);\r\n                },\r\n                fastCallback,\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        private void ProcessUpdates(TLUpdatesBase updatesBase, IList<TLMessage25> messages, bool notifyNewMessage = false)\r\n        {\r\n            var updates = updatesBase as TLUpdates;\r\n            if (updates != null)\r\n            {\r\n                var messagesRandomIndex = new Dictionary<long, TLMessage25>();\r\n                if (messages != null)\r\n                {\r\n                    for (var i = 0; i < messages.Count; i++)\r\n                    {\r\n                        if (messages[i].RandomIndex != 0)\r\n                        {\r\n                            messagesRandomIndex[messages[i].RandomIndex] = messages[i];\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var updateNewMessageIndex = new Dictionary<long, TLUpdateNewMessage>();\r\n                var updateNewChannelMessageIndex = new Dictionary<long, TLUpdateNewChannelMessage>();\r\n                var updateMessageIdList = new List<TLUpdateMessageId>();\r\n                for (var i = 0; i < updates.Updates.Count; i++)\r\n                {\r\n                    var updateNewMessage = updates.Updates[i] as TLUpdateNewMessage;\r\n                    if (updateNewMessage != null)\r\n                    {\r\n                        ProcessSelfMessage(updateNewMessage.Message);\r\n\r\n                        updateNewMessageIndex[updateNewMessage.Message.Index] = updateNewMessage;\r\n                        continue;\r\n                    }\r\n\r\n                    var updateNewChannelMessage = updates.Updates[i] as TLUpdateNewChannelMessage;\r\n                    if (updateNewChannelMessage != null)\r\n                    {\r\n                        //ProcessSelfMessage(updateNewChannelMessage.Message); // no need to channel messages\r\n\r\n                        updateNewChannelMessageIndex[updateNewChannelMessage.Message.Index] = updateNewChannelMessage;\r\n                        continue;\r\n                    }\r\n\r\n                    var updateMessageId = updates.Updates[i] as TLUpdateMessageId;\r\n                    if (updateMessageId != null)\r\n                    {\r\n                        updateMessageIdList.Add(updateMessageId);\r\n                        continue;\r\n                    }\r\n                }\r\n\r\n                foreach (var updateMessageId in updateMessageIdList)\r\n                {\r\n                    TLUpdateNewMessage updateNewMessage;\r\n                    if (updateNewMessageIndex.TryGetValue(updateMessageId.Id.Value, out updateNewMessage))\r\n                    {\r\n                        var cachedSendingMessage = _cacheService.GetMessage(updateMessageId.RandomId);\r\n                        if (cachedSendingMessage != null)\r\n                        {\r\n                            updateNewMessage.Message.RandomId = updateMessageId.RandomId;\r\n                        }\r\n                    }\r\n\r\n                    TLUpdateNewChannelMessage updateNewChannelMessage;\r\n                    if (updateNewChannelMessageIndex.TryGetValue(updateMessageId.Id.Value, out updateNewChannelMessage))\r\n                    {\r\n                        var cachedSendingMessage = _cacheService.GetMessage(updateMessageId.RandomId);\r\n                        if (cachedSendingMessage != null)\r\n                        {\r\n                            updateNewChannelMessage.Message.RandomId = updateMessageId.RandomId;\r\n                        }\r\n                    }\r\n\r\n                    TLMessage25 message;\r\n                    if (messagesRandomIndex.TryGetValue(updateMessageId.RandomId.Value, out message))\r\n                    {\r\n                        message.Id = updateMessageId.Id;\r\n                        if (updateNewMessage != null)\r\n                        {\r\n                            var messageCommon = updateNewMessage.Message as TLMessageCommon;\r\n                            if (messageCommon != null)\r\n                            {\r\n                                message.Date = messageCommon.Date;\r\n                            }\r\n                        }\r\n                        else if (updateNewChannelMessage != null)\r\n                        {\r\n                            var messageCommon = updateNewChannelMessage.Message as TLMessageCommon;\r\n                            if (messageCommon != null)\r\n                            {\r\n                                message.Date = messageCommon.Date;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            _updatesService.ProcessUpdates(updates, notifyNewMessage);\r\n        }\r\n\r\n        public static void ProcessSelfMessage(TLMessageBase messageBase)\r\n        {\r\n            var messageCommon = messageBase as TLMessageCommon;\r\n            if (messageCommon != null\r\n                && messageCommon.ToId is TLPeerUser\r\n                && messageCommon.FromId != null\r\n                && messageCommon.FromId.Value == messageCommon.ToId.Id.Value)\r\n            {\r\n                messageCommon.Out = TLBool.True;\r\n                messageCommon.SetUnreadSilent(TLBool.False);\r\n            }\r\n        }\r\n\r\n        public void GetBotCallbackAnswerAsync(TLInputPeerBase peer, TLInt messageId, TLString data, TLBool game, Action<TLBotCallbackAnswer> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var key = string.Format(\"{0}_{1}_{2}_{3}\", peer, messageId, data, game);\r\n\r\n            TLBotCallbackAnswer58 botCallbackAnswer;\r\n            if (TryGetCachedValue(_cache, key, out botCallbackAnswer, IsCacheTimeValid))\r\n            {\r\n                callback.SafeInvoke(botCallbackAnswer);\r\n                return;\r\n            }\r\n\r\n            var obj = new TLGetBotCallbackAnswer { Peer = peer, MessageId = messageId, Data = data };\r\n            if (game != null && game.Value)\r\n            {\r\n                obj.SetGame();\r\n            }\r\n\r\n            const string caption = \"messages.getBotCallbackAnswer\";\r\n            SendInformativeMessage<TLBotCallbackAnswer>(caption, obj,\r\n                result =>\r\n                {\r\n                    SetCachedValue(ref _cache, key, result as ICachedObject, IsCacheTimeValid);\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        private Dictionary<string, Tuple<DateTime, WeakReference<ICachedObject>>> _cache;\r\n\r\n        private static bool IsCacheTimeValid(DateTime cachedDate, ICachedObject cachedObject)\r\n        {\r\n            if (cachedObject != null && cachedDate.AddSeconds(cachedObject.CacheTime.Value) > DateTime.Now)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static void SetCachedValue<T>(ref Dictionary<string, Tuple<DateTime, WeakReference<T>>> dict, string key, T result, Func<DateTime, T, bool> predicate)\r\n            where T : class\r\n        {\r\n            var now = DateTime.Now;\r\n            if (!predicate(now, result)) return;\r\n\r\n            dict = dict ?? new Dictionary<string, Tuple<DateTime, WeakReference<T>>>();\r\n\r\n            dict[key] = new Tuple<DateTime, WeakReference<T>>(now, new WeakReference<T>(result));\r\n        }\r\n\r\n        private static bool TryGetCachedValue<T1, T>(Dictionary<string, Tuple<DateTime, WeakReference<T>>> dict, string key, out T1 cachedValue, Func<DateTime, T, bool> predicate)\r\n            where T : class\r\n            where T1 : class\r\n        {\r\n            Tuple<DateTime, WeakReference<T>> tuple;\r\n            cachedValue = null;\r\n\r\n            T target;\r\n            if (dict != null\r\n                && dict.TryGetValue(key, out tuple)\r\n                && tuple.Item2.TryGetTarget(out target)\r\n                && predicate(tuple.Item1, target))\r\n            {\r\n                if (target is T1)\r\n                {\r\n                    cachedValue = target as T1;\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public void StartBotAsync(TLInputUserBase bot, TLString startParam, TLMessage25 message, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLStartBot { Bot = bot, Peer = PeerToInputPeer(message.ToId), RandomId = message.RandomId, StartParam = startParam };\r\n\r\n            const string caption = \"messages.startBot\";\r\n            StartBotAsyncInternal(obj,\r\n                result =>\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        message.Status = GetMessageStatus(_cacheService, message.ToId);\r\n                        message.Media.LastProgress = 0.0;\r\n                        message.Media.DownloadingProgress = 0.0;\r\n                    });\r\n\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, new List<TLMessage25> { message });\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                () =>\r\n                {\r\n                    //TLUtils.WriteLine(caption + \" fast result \" + message.RandomIndex, LogSeverity.Error);\r\n                    //fastCallback();\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void UploadMediaAsync(TLInputPeerBase inputPeer, TLInputMediaBase inputMedia, Action<TLMessageMediaBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLUploadMedia { Peer = inputPeer, Media = inputMedia };\r\n\r\n            const string caption = \"messages.uploadMedia\";\r\n            SendInformativeMessage(caption, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SendMultiMediaAsync(TLInputPeerBase inputPeer, TLVector<TLInputSingleMedia> inputMedia, TLMessage25 message, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSendMultiMedia { Flags = new TLInt(0), Peer = inputPeer, ReplyToMsgId = message.ReplyToMsgId, MultiMedia = inputMedia };\r\n\r\n            var message48 = message as TLMessage48;\r\n            if (message48 != null && message48.Silent)\r\n            {\r\n                obj.SetSilent();\r\n            }\r\n\r\n            const string caption = \"messages.sendMultiMedia\";\r\n            SendMultiMediaAsyncInternal(obj,\r\n                result =>\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        message.Status = GetMessageStatus(_cacheService, message.ToId);\r\n                        message.Media.LastProgress = 0.0;\r\n                        message.Media.DownloadingProgress = 1.0;\r\n\r\n                        var mediaGroup = message.Media as TLMessageMediaGroup;\r\n                        if (mediaGroup != null)\r\n                        {\r\n                            foreach (var m in mediaGroup.Group.OfType<TLMessage>())\r\n                            {\r\n                                m.Status = GetMessageStatus(_cacheService, message.ToId);\r\n                                m.Media.LastProgress = 0.0;\r\n                                m.Media.DownloadingProgress = 1.0;\r\n                            }\r\n                        }\r\n                    });\r\n\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        var handled = false;\r\n                        var message73 = message as TLMessage73;\r\n                        if (message73 != null)\r\n                        {\r\n                            var mediaGroup = message73.Media as TLMessageMediaGroup;\r\n                            if (mediaGroup != null)\r\n                            {\r\n                                var messages = new List<TLMessage25>();\r\n                                foreach (var item in mediaGroup.Group)\r\n                                {\r\n                                    messages.Add((TLMessage25)item);\r\n                                }\r\n\r\n                                if (messages.Count > 0)\r\n                                {\r\n                                    handled = true;\r\n                                    ProcessUpdates(result, messages);\r\n                                    message.Id = messages[messages.Count - 1].Id;\r\n                                    message.Date = messages[messages.Count - 1].Date;\r\n                                    message.RandomId = new TLLong(0);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        if (!handled)\r\n                        {\r\n                            ProcessUpdates(result, new List<TLMessage25> { message });\r\n                        }\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                () =>\r\n                {\r\n\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void SendMediaAsync(TLInputPeerBase inputPeer, TLInputMediaBase inputMedia, TLMessage34 message, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSendMedia { Flags = new TLInt(0), Peer = inputPeer, ReplyToMsgId = message.ReplyToMsgId, Media = inputMedia, Message = message.Message, RandomId = message.RandomId, ReplyMarkup = null, Entities = message.Entities };\r\n\r\n            if (message.IsChannelMessage)\r\n            {\r\n                obj.SetChannelMessage();\r\n            }\r\n\r\n            var message48 = message as TLMessage48;\r\n            if (message48 != null && message48.Silent)\r\n            {\r\n                obj.SetSilent();\r\n            }\r\n\r\n            const string caption = \"messages.sendMedia\";\r\n            SendMediaAsyncInternal(obj,\r\n                result =>\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        message.Status = GetMessageStatus(_cacheService, message.ToId);\r\n                        message.Media.LastProgress = 0.0;\r\n                        message.Media.DownloadingProgress = 1.0;\r\n                    });\r\n\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, new List<TLMessage25> { message });\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                () =>\r\n                {\r\n\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void SendBroadcastAsync(TLVector<TLInputUserBase> contacts, TLInputMediaBase inputMedia, TLMessage25 message, Action<TLUpdatesBase> callback, Action fastCallback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var randomId = new TLVector<TLLong>();\r\n            for (var i = 0; i < contacts.Count; i++)\r\n            {\r\n                randomId.Add(TLLong.Random());\r\n            }\r\n\r\n            var obj = new TLSendBroadcast { Contacts = contacts, RandomId = randomId, Message = message.Message, Media = inputMedia };\r\n\r\n\r\n\r\n            const string caption = \"messages.sendBroadcast\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption,\r\n                obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, new List<TLMessage25> { message });\r\n                    }\r\n\r\n                    var updates = result as TLUpdates;\r\n                    if (updates != null)\r\n                    {\r\n                        var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                        if (updateNewMessage != null)\r\n                        {\r\n                            var messageCommon = updateNewMessage.Message as TLMessageCommon;\r\n                            if (messageCommon != null)\r\n                            {\r\n                                message.Date = new TLInt(messageCommon.DateIndex - 1); // Делаем бродкаст после всех чатов, в которые отправили, в списке диалогов\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    //message.Id = result.Id;\r\n                    message.Status = MessageStatus.Confirmed;\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n\r\n\r\n        public void SendEncryptedAsync(TLInputEncryptedChat peer, TLLong randomId, TLString data, Action<TLSentEncryptedMessage> callback, Action fastCallback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSendEncrypted { Peer = peer, RandomId = randomId, Data = data };\r\n\r\n            SendEncryptedAsyncInternal(\r\n                obj,\r\n                result =>\r\n                {\r\n                    callback(result);\r\n                },\r\n                () =>\r\n                {\r\n\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        private object _sendEncryptedFileSyncRoot;\r\n\r\n        public void SendEncryptedMultiMediaAsync(TLInputEncryptedChat peer, TLVector<TLLong> randomId, TLVector<TLString> data, TLVector<TLInputEncryptedFileBase> file, Action<TLVector<TLSentEncryptedFile>> callback, Action fastCallback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLVector<TLSendEncryptedFile>();\r\n            for (var i = 0; i < randomId.Count; i++)\r\n            {\r\n                obj.Add(new TLSendEncryptedFile { Peer = peer, RandomId = randomId[i], Data = data[i], File = file[i] });\r\n            }\r\n\r\n            _sendEncryptedFileSyncRoot = _sendEncryptedFileSyncRoot ?? new object();\r\n            var results = new TLVector<TLSentEncryptedFile>();\r\n\r\n            SendEncryptedFileAsyncInternal(\r\n                obj,\r\n                result =>\r\n                {\r\n                    lock (_sendEncryptedFileSyncRoot)\r\n                    {\r\n                        results.Add(result);\r\n                    }\r\n\r\n                    if (results.Count == randomId.Count)\r\n                    {\r\n                        callback.SafeInvoke(results);\r\n                    }\r\n                },\r\n                () =>\r\n                {\r\n\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void SendEncryptedFileAsync(TLInputEncryptedChat peer, TLLong randomId, TLString data, TLInputEncryptedFileBase file, Action<TLSentEncryptedFile> callback, Action fastCallback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSendEncryptedFile { Peer = peer, RandomId = randomId, Data = data, File = file };\r\n\r\n            SendEncryptedFileAsyncInternal(\r\n                obj,\r\n                callback,\r\n                () =>\r\n                {\r\n\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void SendEncryptedServiceAsync(TLInputEncryptedChat peer, TLLong randomId, TLString data, Action<TLSentEncryptedMessage> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSendEncryptedService { Peer = peer, RandomId = randomId, Data = data };\r\n\r\n            SendEncryptedServiceAsyncInternal(\r\n                obj,\r\n                callback,\r\n                () =>\r\n                {\r\n\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void ReadEncryptedHistoryAsync(TLInputEncryptedChat peer, TLInt maxDate, Action<TLBool> callback,\r\n            Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReadEncryptedHistory { Peer = peer, MaxDate = maxDate };\r\n\r\n            ReadEncryptedHistoryAsyncInternal(obj, callback, () => { }, faultCallback);\r\n        }\r\n\r\n        public void SetEncryptedTypingAsync(TLInputEncryptedChat peer, TLBool typing, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSetEncryptedTyping { Peer = peer, Typing = typing };\r\n\r\n            SendInformativeMessage(\"messages.setEncryptedTyping\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SetTypingAsync(TLInputPeerBase peer, TLBool typing, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var action = typing.Value ? (TLSendMessageActionBase)new TLSendMessageTypingAction() : new TLSendMessageCancelAction();\r\n            var obj = new TLSetTyping { Peer = peer, Action = action };\r\n\r\n            SendInformativeMessage(\"messages.setTyping\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SetTypingAsync(TLInputPeerBase peer, TLSendMessageActionBase action, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSetTyping { Peer = peer, Action = action ?? new TLSendMessageTypingAction() };\r\n\r\n            SendInformativeMessage(\"messages.setTyping\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetMessagesAsync(TLVector<TLInputMessageBase> id, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetMessages { Id = id };\r\n\r\n            SendInformativeMessage(\"messages.getMessages\", obj, callback, faultCallback);\r\n        }\r\n\r\n        private static void ProcessPinnedId(IList<TLDialogBase> result)\r\n        {\r\n            var pinnedIndex = 0;\r\n            foreach (var dialog in result)\r\n            {\r\n                var dialog53 = dialog as TLDialog53;\r\n                if (dialog53 != null && dialog53.IsPinned)\r\n                {\r\n                    dialog53.PinnedId = new TLInt(pinnedIndex++);\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void ProcessUnread(TLDialogsBase result)\r\n        {\r\n            var dialogsCache = new Dictionary<int, List<TLDialogBase>>();\r\n            foreach (var dialogBase in result.Dialogs)\r\n            {\r\n                List<TLDialogBase> dialogs;\r\n                if (dialogsCache.TryGetValue(dialogBase.TopMessageId.Value, out dialogs))\r\n                {\r\n                    dialogs.Add(dialogBase);\r\n                }\r\n                else\r\n                {\r\n                    dialogsCache[dialogBase.TopMessageId.Value] = new List<TLDialogBase> { dialogBase };\r\n                }\r\n            }\r\n\r\n            foreach (var messageBase in result.Messages)\r\n            {\r\n                ProcessSelfMessage(messageBase);\r\n\r\n                var messageCommon = messageBase as TLMessageCommon;\r\n                if (messageCommon != null)\r\n                {\r\n                    List<TLDialogBase> dialogs;\r\n                    if (dialogsCache.TryGetValue(messageBase.Index, out dialogs))\r\n                    {\r\n                        TLDialog53 dialog53 = null;\r\n                        if (messageCommon.ToId is TLPeerChannel)\r\n                        {\r\n                            dialog53 =\r\n                                dialogs.FirstOrDefault(\r\n                                        x => x.Peer is TLPeerChannel && x.Peer.Id.Value == messageCommon.ToId.Id.Value) as\r\n                                    TLDialog53;\r\n                        }\r\n                        else if (messageCommon.ToId is TLPeerChat)\r\n                        {\r\n                            dialog53 =\r\n                                dialogs.FirstOrDefault(\r\n                                    x => x.Peer is TLPeerChat && x.Peer.Id.Value == messageCommon.ToId.Id.Value) as TLDialog53;\r\n                        }\r\n                        else if (messageCommon.ToId is TLPeerUser)\r\n                        {\r\n                            var peer = messageCommon.Out.Value ? messageCommon.ToId : new TLPeerUser { Id = messageCommon.FromId };\r\n                            dialog53 =\r\n                                dialogs.FirstOrDefault(x => x.Peer is TLPeerUser && x.Peer.Id.Value == peer.Id.Value) as\r\n                                    TLDialog53;\r\n                        }\r\n                        if (dialog53 != null)\r\n                        {\r\n                            if (messageCommon.Out.Value)\r\n                            {\r\n                                if (messageCommon.Index > dialog53.ReadOutboxMaxId.Value)\r\n                                {\r\n                                    messageCommon.SetUnreadSilent(TLBool.True);\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                if (messageCommon.Index > dialog53.ReadInboxMaxId.Value)\r\n                                {\r\n                                    messageCommon.SetUnreadSilent(TLBool.True);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void GetPeerDialogsAsync(TLInputPeerBase peer, Action<TLPeerDialogs> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetPeerDialogs { Peers = new TLVector<TLInputPeerBase> { peer } };\r\n\r\n            SendInformativeMessage<TLPeerDialogs>(\"messages.getPeerDialogs\", obj,\r\n                result =>\r\n                {\r\n                    ProcessUnread(result.ToDialogs());\r\n\r\n                    _cacheService.SyncDialogs(Stopwatch.StartNew(),\r\n                        result.ToDialogs(),\r\n                        r =>\r\n                        {\r\n                            callback.SafeInvoke(r.ToPeerDialogs(result.State));\r\n                        });\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetPromoDialogAsync(TLInputPeerBase peer, Action<TLPeerDialogs> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetPeerDialogs { Peers = new TLVector<TLInputPeerBase> { peer } };\r\n\r\n            SendInformativeMessage<TLPeerDialogs>(\"messages.getPeerDialogs\", obj,\r\n                result =>\r\n                {\r\n                    var oldDialogs = _cacheService.GetDialogs();\r\n                    var oldPromoDialogs = new List<TLDialogBase>();\r\n                    foreach (var dialogBase in oldDialogs)\r\n                    {\r\n                        var dialog = dialogBase as TLDialog71;\r\n                        if (dialog != null && dialog.IsPromo)\r\n                        {\r\n                            oldPromoDialogs.Add(dialog);\r\n                        }\r\n                    }\r\n\r\n                    ProcessUnread(result.ToDialogs());\r\n\r\n                    foreach (var dialogBase in oldPromoDialogs)\r\n                    {\r\n                        _cacheService.UpdateDialogPromo(dialogBase, false);\r\n                    }\r\n\r\n                    foreach (var dialogBase in result.Dialogs)\r\n                    {\r\n                        var channel = _cacheService.GetChat(dialogBase.Peer.Id) as TLChannel;\r\n                        if (channel != null && channel.Left.Value)\r\n                        {\r\n                            _cacheService.UpdateDialogPromo(dialogBase, true);\r\n                        }\r\n                    }\r\n\r\n                    _cacheService.SyncDialogs(Stopwatch.StartNew(),\r\n                        result.ToDialogs(),\r\n                        r =>\r\n                        {\r\n                            callback.SafeInvoke(r.ToPeerDialogs(result.State));\r\n                        });\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetPinnedDialogsAsync(Action<TLPeerDialogs> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetPinnedDialogs();\r\n\r\n            const string caption = \"messages.getPinnedDialogs\";\r\n            SendInformativeMessage<TLPeerDialogs>(caption, obj,\r\n                result =>\r\n                {\r\n                    var oldDialogs = _cacheService.GetDialogs();\r\n                    var oldPinnedDialogs = new List<TLDialogBase>();\r\n                    foreach (var dialogBase in oldDialogs)\r\n                    {\r\n                        var dialog = dialogBase as TLDialog53;\r\n                        if (dialog != null\r\n                            && dialog.IsPinned\r\n                            && result.Dialogs.FirstOrDefault(x => x.Index == dialog.Index) == null)\r\n                        {\r\n                            oldPinnedDialogs.Add(dialog);\r\n                        }\r\n                    }\r\n\r\n                    ProcessPinnedId(result.Dialogs);\r\n\r\n                    ProcessUnread(result.ToDialogs());\r\n\r\n                    foreach (var dialogBase in oldPinnedDialogs)\r\n                    {\r\n                        _cacheService.UpdateDialogPinned(dialogBase.Peer, false);\r\n                    }\r\n\r\n                    _cacheService.SyncDialogs(Stopwatch.StartNew(),\r\n                        result.ToDialogs(), r =>\r\n                        {\r\n                            callback.SafeInvoke(r.ToPeerDialogs(result.State));\r\n                        });\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetDialogsAsync(Stopwatch stopwatch, TLInt offsetDate, TLInt offsetId, TLInputPeerBase offsetPeer, TLInt limit, TLInt hash, Action<TLDialogsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetDialogs { Flags = new TLInt(0), /*FeedId = null,*/ OffsetDate = offsetDate, OffsetId = offsetId, OffsetPeer = offsetPeer, Limit = limit, Hash = hash };\r\n\r\n            if (offsetDate.Value != 0\r\n                || offsetId.Value != 0\r\n                || !(offsetPeer is TLInputPeerEmpty))\r\n            {\r\n                obj.ExcludePinned = true;\r\n            }\r\n\r\n            SendInformativeMessage<TLDialogsBase>(\"messages.getDialogs\", obj,\r\n                result =>\r\n                {\r\n                    if (offsetDate.Value == 0 && !obj.ExcludePinned)\r\n                    {\r\n                        ProcessPinnedId(result.Dialogs);\r\n                    }\r\n\r\n                    ProcessUnread(result);\r\n\r\n                    _cacheService.SyncDialogs(stopwatch, result, callback);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void GetChannelDialogsAsync(TLInt offset, TLInt limit, Action<TLDialogsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TL.Functions.Channels.TLGetDialogs { Offset = offset, Limit = limit };\r\n\r\n            SendInformativeMessage<TLDialogsBase>(\"channels.getDialogs\", obj, result =>\r\n            {\r\n                //return;\r\n                var channelsCache = new Context<TLChannel>();\r\n                foreach (var chatBase in result.Chats)\r\n                {\r\n                    var channel = chatBase as TLChannel;\r\n                    if (channel != null)\r\n                    {\r\n                        channelsCache[channel.Index] = channel;\r\n                    }\r\n                }\r\n\r\n                var dialogsCache = new Context<TLDialogChannel>();\r\n                foreach (var dialogBase in result.Dialogs)\r\n                {\r\n                    var dialogChannel = dialogBase as TLDialogChannel;\r\n                    if (dialogChannel != null)\r\n                    {\r\n                        var channelId = dialogChannel.Peer.Id.Value;\r\n                        dialogsCache[channelId] = dialogChannel;\r\n                        TLChannel channel;\r\n                        if (channelsCache.TryGetValue(channelId, out channel))\r\n                        {\r\n                            channel.ReadInboxMaxId = dialogChannel.ReadInboxMaxId;\r\n                            //channel.UnreadCount = dialogChannel.UnreadCount;\r\n                            //channel.UnreadImportantCount = dialogChannel.UnreadImportantCount;\r\n                            channel.NotifySettings = dialogChannel.NotifySettings;\r\n                            //channel.Pts = dialogChannel.Pts;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                //_cacheService.SyncChannelDialogs(result, callback);\r\n                _cacheService.SyncUsersAndChats(result.Users, result.Chats, x =>\r\n                {\r\n                    _cacheService.MergeMessagesAndChannels(result);\r\n\r\n                    callback.SafeInvoke(result);\r\n                });\r\n            }, faultCallback);\r\n        }\r\n\r\n        private void GetChannelHistoryAsyncInternal(bool sync, TLPeerBase peer, TLMessagesBase result, Action<TLMessagesBase> callback)\r\n        {\r\n            if (sync)\r\n            {\r\n                _cacheService.SyncPeerMessages(peer, result, false, false, callback);\r\n            }\r\n            else\r\n            {\r\n                _cacheService.AddChats(result.Chats, results => { });\r\n                _cacheService.AddUsers(result.Users, results => { });\r\n                callback(result);\r\n            }\r\n        }\r\n\r\n        private void GetHistoryAsyncInternal(bool sync, TLPeerBase peer, TLMessagesBase result, Action<TLMessagesBase> callback)\r\n        {\r\n            if (sync)\r\n            {\r\n                _cacheService.SyncPeerMessages(peer, result, false, true, callback);\r\n            }\r\n            else\r\n            {\r\n                _cacheService.AddChats(result.Chats, results => { });\r\n                _cacheService.AddUsers(result.Users, results => { });\r\n                callback(result);\r\n            }\r\n        }\r\n\r\n        public void GetHistoryAsync(Stopwatch timer, TLInputPeerBase inputPeer, TLPeerBase peer, bool sync, TLInt offsetDate, TLInt offset, TLInt maxId, TLInt limit, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetHistory { Peer = inputPeer, AddOffset = offset, OffsetId = maxId, OffsetDate = offsetDate, Limit = limit, MaxId = new TLInt(int.MaxValue), MinId = new TLInt(0), Hash = new TLInt(0) };\r\n\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"messages.getHistory offset_date=[{0} {1}], offset={2} max_id={3} limit={4}\", offsetDate, TLUtils.ToDateTime(offsetDate).ToString(\"dd-MM-yyyy HH:mm:ss.f\"), offset, maxId, limit));\r\n            //Debug.WriteLine(\"UpdateItems start request elapsed=\" + (timer != null? timer.Elapsed.ToString() : null));\r\n\r\n            SendInformativeMessage<TLMessagesBase>(\"messages.getHistory\", obj,\r\n                result =>\r\n                {\r\n                    var peerChannel = inputPeer as TLInputPeerChannel;\r\n                    if (peerChannel != null)\r\n                    {\r\n                        var channel = result.Chats.FirstOrDefault(x => x.Index == peerChannel.ChatId.Value) as TLChannel;\r\n                        if (channel != null && channel.Left.Value)\r\n                        {\r\n                            sync = false;\r\n                        }\r\n                    }\r\n                    //Debug.WriteLine(\"UpdateItems stop request elapsed=\" + (timer != null ? timer.Elapsed.ToString() : null));\r\n\r\n                    foreach (var message in result.Messages)\r\n                    {\r\n                        ProcessSelfMessage(message);\r\n                    }\r\n                    var replyId = new TLVector<TLInputMessageBase>();\r\n                    var waitingList = new List<TLMessage25>();\r\n                    //for (var i = 0; i < result.Messages.Count; i++)\r\n                    //{\r\n                    //    var message25 = result.Messages[i] as TLMessage25;\r\n                    //    if (message25 != null \r\n                    //        && message25.ReplyToMsgId != null \r\n                    //        && message25.ReplyToMsgId.Value > 0)\r\n                    //    {\r\n                    //        var cachedReply = _cacheService.GetMessage(message25.ReplyToMsgId);\r\n                    //        if (cachedReply != null)\r\n                    //        {\r\n                    //            message25.Reply = cachedReply;\r\n                    //        }\r\n                    //        else\r\n                    //        {\r\n                    //            replyId.Add(message25.ReplyToMsgId);\r\n                    //            waitingList.Add(message25);\r\n                    //        }\r\n                    //    }\r\n                    //}\r\n\r\n                    if (replyId.Count > 0)\r\n                    {\r\n                        //Debug.WriteLine(\"UpdateItems start GetMessages elapsed=\" + (timer != null ? timer.Elapsed.ToString() : null));\r\n\r\n                        GetMessagesAsync(\r\n                            replyId,\r\n                            messagesResult =>\r\n                            {\r\n                                //Debug.WriteLine(\"UpdateItems stop GetMessages elapsed=\" + (timer != null ? timer.Elapsed.ToString() : null));\r\n\r\n                                _cacheService.AddChats(result.Chats, results => { });\r\n                                _cacheService.AddUsers(result.Users, results => { });\r\n\r\n                                for (var i = 0; i < messagesResult.Messages.Count; i++)\r\n                                {\r\n                                    for (var j = 0; j < waitingList.Count; j++)\r\n                                    {\r\n                                        var messageToReply = messagesResult.Messages[i] as TLMessageCommon;\r\n                                        if (messageToReply != null\r\n                                            && messageToReply.Index == waitingList[j].Index)\r\n                                        {\r\n                                            waitingList[j].Reply = messageToReply;\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                var inputChannelPeer = inputPeer as TLInputPeerChannel;\r\n                                if (inputChannelPeer != null)\r\n                                {\r\n                                    var channel = _cacheService.GetChat(inputChannelPeer.ChatId) as TLChannel;\r\n                                    if (channel != null)\r\n                                    {\r\n                                        var maxIndex = channel.ReadInboxMaxId != null ? channel.ReadInboxMaxId.Value : 0;\r\n                                        foreach (var messageBase in messagesResult.Messages)\r\n                                        {\r\n                                            var messageCommon = messageBase as TLMessageCommon;\r\n                                            if (messageCommon != null\r\n                                                && !messageCommon.Out.Value\r\n                                                && messageCommon.Index > maxIndex)\r\n                                            {\r\n                                                messageCommon.SetUnread(TLBool.True);\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                //Debug.WriteLine(\"UpdateItems stop GetMessages GetHistoryAsyncInternal elapsed=\" + (timer != null ? timer.Elapsed.ToString() : null));\r\n\r\n                                GetHistoryAsyncInternal(sync, peer, result, callback);\r\n                            },\r\n                            faultCallback);\r\n                    }\r\n                    else\r\n                    {\r\n                        //Debug.WriteLine(\"UpdateItems GetHistoryAsyncInternal elapsed=\" + (timer != null ? timer.Elapsed.ToString() : null));\r\n\r\n                        GetHistoryAsyncInternal(sync, peer, result, callback);\r\n                    }\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n\r\n        public void GetChannelHistoryAsync(string debugInfo, TLInputPeerBase inputPeer, TLPeerBase peer, bool sync, TLInt offset, TLInt maxId, TLInt limit, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetHistory { Peer = inputPeer, AddOffset = offset, OffsetId = maxId, OffsetDate = new TLInt(0), Limit = limit, MaxId = new TLInt(int.MaxValue), MinId = new TLInt(0), Hash = new TLInt(0) };\r\n\r\n            TLUtils.WriteLine(string.Format(\"{0} {1} messages.getHistory peer={2} offset={3} max_id={4} limit={5}\", string.Empty, debugInfo, inputPeer, offset, maxId, limit), LogSeverity.Error);\r\n            SendInformativeMessage<TLMessagesBase>(\"messages.getHistory\", obj,\r\n                result =>\r\n                {\r\n                    var peerChannel = inputPeer as TLInputPeerChannel;\r\n                    if (peerChannel != null)\r\n                    {\r\n                        var channel = result.Chats.FirstOrDefault(x => x.Index == peerChannel.ChatId.Value) as TLChannel;\r\n                        if (channel != null && channel.Left.Value)\r\n                        {\r\n                            sync = false;\r\n                        }\r\n                    }\r\n\r\n                    var replyId = new TLVector<TLInputMessageBase>();\r\n                    var waitingList = new List<TLMessage25>();\r\n                    //for (var i = 0; i < result.Messages.Count; i++)\r\n                    //{\r\n                    //    var message25 = result.Messages[i] as TLMessage25;\r\n                    //    if (message25 != null \r\n                    //        && message25.ReplyToMsgId != null \r\n                    //        && message25.ReplyToMsgId.Value > 0)\r\n                    //    {\r\n                    //        var cachedReply = _cacheService.GetMessage(message25.ReplyToMsgId);\r\n                    //        if (cachedReply != null)\r\n                    //        {\r\n                    //            message25.Reply = cachedReply;\r\n                    //        }\r\n                    //        else\r\n                    //        {\r\n                    //            replyId.Add(message25.ReplyToMsgId);\r\n                    //            waitingList.Add(message25);\r\n                    //        }\r\n                    //    }\r\n                    //}\r\n\r\n                    if (replyId.Count > 0)\r\n                    {\r\n                        GetMessagesAsync(\r\n                            replyId,\r\n                            messagesResult =>\r\n                            {\r\n                                _cacheService.AddChats(result.Chats, results => { });\r\n                                _cacheService.AddUsers(result.Users, results => { });\r\n\r\n                                for (var i = 0; i < messagesResult.Messages.Count; i++)\r\n                                {\r\n                                    for (var j = 0; j < waitingList.Count; j++)\r\n                                    {\r\n                                        var messageToReply = messagesResult.Messages[i] as TLMessageCommon;\r\n                                        if (messageToReply != null\r\n                                            && messageToReply.Index == waitingList[j].Index)\r\n                                        {\r\n                                            waitingList[j].Reply = messageToReply;\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                var inputChannelPeer = inputPeer as TLInputPeerChannel;\r\n                                if (inputChannelPeer != null)\r\n                                {\r\n                                    var channel = _cacheService.GetChat(inputChannelPeer.ChatId) as TLChannel;\r\n                                    if (channel != null)\r\n                                    {\r\n                                        var maxIndex = channel.ReadInboxMaxId != null ? channel.ReadInboxMaxId.Value : 0;\r\n                                        foreach (var messageBase in messagesResult.Messages)\r\n                                        {\r\n                                            var messageCommon = messageBase as TLMessageCommon;\r\n                                            if (messageCommon != null\r\n                                                && !messageCommon.Out.Value\r\n                                                && messageCommon.Index > maxIndex)\r\n                                            {\r\n                                                messageCommon.SetUnread(TLBool.True);\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                GetChannelHistoryAsyncInternal(sync, peer, result, callback);\r\n                            },\r\n                            faultCallback);\r\n                    }\r\n                    else\r\n                    {\r\n                        GetChannelHistoryAsyncInternal(sync, peer, result, callback);\r\n                    }\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void SearchAsync(TLInputPeerBase peer, TLString query, TLInputUserBase fromId, TLInputMessagesFilterBase filter, TLInt minDate, TLInt maxDate, TLInt addOffset, TLInt offsetId, TLInt limit, TLInt hash, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            Debug.WriteLine(\"messages.search query={0} from_id={7} filter={1} minDate={2} maxDate={3} offset={4} maxId={5} limit={6}\", query, filter, maxDate, maxDate, addOffset, offsetId, limit, fromId);\r\n\r\n            var obj = new TLSearch { Flags = new TLInt(0), Peer = peer, Query = query, FromId = fromId, Filter = filter, MinDate = minDate, MaxDate = maxDate, AddOffset = addOffset, OffsetId = offsetId, Limit = limit, MinId = new TLInt(0), MaxId = new TLInt(0), Hash = hash };\r\n\r\n            SendInformativeMessage<TLMessagesBase>(\"messages.search\", obj, result =>\r\n            {\r\n                callback.SafeInvoke(result);\r\n            }, faultCallback);\r\n        }\r\n\r\n        public void SearchGlobalAsync(TLString query, TLInt offsetDate, TLInputPeerBase offsetPeer, TLInt offsetId, TLInt limit, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            TLUtils.WriteLine(string.Format(\"{0} messages.searchGlobal query={1} offset_date={2} offset_peer={3} offset_id={4} limit={5}\", DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture), query, offsetDate, offsetPeer, offsetId, limit), LogSeverity.Error);\r\n\r\n            var obj = new TLSearchGlobal { Query = query, OffsetDate = offsetDate, OffsetPeer = offsetPeer, OffsetId = offsetId, Limit = limit };\r\n\r\n            SendInformativeMessage<TLMessagesBase>(\"messages.searchGlobal\", obj, result =>\r\n            {\r\n                TLUtils.WriteLine(string.Format(\"{0} messages.searchGlobal result={1}\", DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture), result.Messages.Count), LogSeverity.Error);\r\n                callback.SafeInvoke(result);\r\n            }, faultCallback);\r\n        }\r\n\r\n        public void ReadHistoryAsync(TLInputPeerBase peer, TLInt maxId, TLInt offset, Action<TLAffectedMessages> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReadHistory { Peer = peer, MaxId = maxId };\r\n\r\n            const string caption = \"messages.readHistory\";\r\n            ReadHistoryAsyncInternal(obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        _updatesService.SetState(null, result.Pts, null, null, null, caption);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                () => { },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void ReadMentionsAsync(TLInputPeerBase peer, Action<TLAffectedHistory24> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReadMentions { Peer = peer };\r\n\r\n            const string caption = \"messages.readMentions\";\r\n            ReadMentionsAsyncInternal(obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        _updatesService.SetState(null, result.Pts, null, null, null, caption);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                () => { },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void ReadMessageContentsAsync(TLVector<TLInt> id, Action<TLAffectedMessages> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReadMessageContents { Id = id };\r\n\r\n            const string caption = \"messages.readMessageContents\";\r\n            ReadMessageContentsAsyncInternal(obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        _updatesService.SetState(null, result.Pts, null, null, null, caption);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                () => { },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void DeleteHistoryAsync(bool justClear, TLInputPeerBase peer, TLInt offset, Action<TLAffectedHistory> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteHistory { Flags = new TLInt(0), Peer = peer, MaxId = new TLInt(int.MaxValue) };\r\n\r\n            if (justClear)\r\n            {\r\n                obj.SetJustClear();\r\n            }\r\n\r\n            const string caption = \"messages.deleteHistory\";\r\n            SendInformativeMessage<TLAffectedHistory>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        _updatesService.SetState(result.Seq, result.Pts, null, null, null, caption);\r\n                    }\r\n\r\n                    callback(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void DeleteMessagesAsync(bool revoke, TLVector<TLInt> id, Action<TLAffectedMessages> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteMessages { Id = id, Revoke = revoke };\r\n\r\n            const string caption = \"messages.deleteMessages\";\r\n            SendInformativeMessage<TLAffectedMessages>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        _updatesService.SetState(null, result.Pts, null, null, null, caption);\r\n                    }\r\n\r\n                    callback(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void RestoreMessagesAsync(TLVector<TLInt> id, Action<TLVector<TLInt>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLRestoreMessages { Id = id };\r\n\r\n            SendInformativeMessage(\"messages.restoreMessages\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ReceivedMessagesAsync(TLInt maxId, Action<TLVector<TLReceivedNotifyMessage>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReceivedMessages { MaxId = maxId };\r\n\r\n            SendInformativeMessage(\"messages.receivedMessages\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ForwardMessageAsync(TLInputPeerBase peer, TLInt fwdMessageId, TLMessage25 message, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLForwardMessage { Peer = peer, Id = fwdMessageId, RandomId = message.RandomId };\r\n\r\n            const string caption = \"messages.forwardMessage\";\r\n            ForwardMessageAsyncInternal(obj,\r\n                result =>\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        message.Status = MessageStatus.Confirmed;\r\n                        message.Media.LastProgress = 0.0;\r\n                        message.Media.DownloadingProgress = 0.0;\r\n                    });\r\n\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, new List<TLMessage25> { message });\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                () =>\r\n                {\r\n\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        private readonly object _forwardMessagesWithCommentSyncRoot = new object();\r\n\r\n        public void ForwardMessagesAsync(TLMessage25 commentMessage, TLInputPeerBase toPeer, TLVector<TLInt> id, IList<TLMessage25> messages, bool withMyScore, Action<TLUpdatesBase[]> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var randomId = new TLVector<TLLong>();\r\n            foreach (var message in messages)\r\n            {\r\n                randomId.Add(message.RandomId);\r\n            }\r\n\r\n            TLInputPeerBase fromPeer = null;\r\n            var message48 = messages.FirstOrDefault() as TLMessage48;\r\n            if (message48 != null)\r\n            {\r\n                fromPeer = message48.FwdFromChannelPeer;\r\n            }\r\n\r\n            if (fromPeer == null)\r\n            {\r\n                var message40 = messages.FirstOrDefault() as TLMessage40;\r\n                if (message40 != null)\r\n                {\r\n                    fromPeer = message40.FwdFromChannelPeer ?? PeerToInputPeer(message40.FwdFromPeer);\r\n                }\r\n            }\r\n\r\n            var obj1 = commentMessage != null && !TLString.IsNullOrEmpty(commentMessage.Message) ? new TLSendMessage { Flags = new TLInt(0), Peer = toPeer, Message = commentMessage.Message, RandomId = commentMessage.RandomId } : null;\r\n            var obj2 = new TLForwardMessages { ToPeer = toPeer, Id = id, RandomIds = randomId, FromPeer = fromPeer, Flags = new TLInt(0) };\r\n\r\n            if (message48 != null && message48.IsChannelMessage)\r\n            {\r\n                obj2.SetChannelMessage();\r\n            }\r\n\r\n            if (message48 != null && message48.Silent)\r\n            {\r\n                obj2.SetSilent();\r\n            }\r\n\r\n            if (withMyScore)\r\n            {\r\n                obj2.SetWithMyScore();\r\n            }\r\n\r\n            var grouped = messages.OfType<TLMessage73>().FirstOrDefault(x => x.GroupedId != null) != null;\r\n            if (grouped)\r\n            {\r\n                obj2.SetGrouped();\r\n            }\r\n\r\n            const string caption1 = \"messages.sendMessage\";\r\n            const string caption2 = \"messages.forwardMessages\";\r\n\r\n            var results = new TLUpdatesBase[2];\r\n\r\n            ForwardMessagesWithCommentAsyncInternal(obj1, obj2,\r\n                result =>\r\n                {\r\n                    bool invokeCallback;\r\n\r\n                    var multiPts = result as IMultiPts;\r\n                    var shortSentMessage = result as TLUpdatesShortSentMessage;\r\n                    if (shortSentMessage != null)\r\n                    {\r\n                        commentMessage.Flags = shortSentMessage.Flags;\r\n                        if (shortSentMessage.HasMedia)\r\n                        {\r\n                            commentMessage._media = shortSentMessage.Media;\r\n                        }\r\n                        if (shortSentMessage.HasEntities)\r\n                        {\r\n                            var commentMessage70 = commentMessage as TLMessage70;\r\n                            if (commentMessage70 != null)\r\n                            {\r\n                                commentMessage70.Entities = shortSentMessage.Entities;\r\n                            }\r\n                        }\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            commentMessage.Status = GetMessageStatus(_cacheService, commentMessage.ToId);\r\n                            commentMessage.Date = shortSentMessage.Date;\r\n                            if (shortSentMessage.Media is TLMessageMediaWebPage)\r\n                            {\r\n                                commentMessage.NotifyOfPropertyChange(() => commentMessage.Media);\r\n                            }\r\n\r\n#if DEBUG\r\n                            commentMessage.Id = shortSentMessage.Id;\r\n                            commentMessage.NotifyOfPropertyChange(() => commentMessage.Id);\r\n                            commentMessage.NotifyOfPropertyChange(() => commentMessage.Date);\r\n#endif\r\n                        });\r\n\r\n                        _updatesService.SetState(multiPts, caption1);\r\n\r\n                        commentMessage.Id = shortSentMessage.Id;\r\n                        _cacheService.SyncSendingMessage(commentMessage, null,\r\n                            cachedMessage =>\r\n                            {\r\n                                lock (_forwardMessagesWithCommentSyncRoot)\r\n                                {\r\n                                    results[0] = result;\r\n                                    invokeCallback = obj1 == null || (results[0] != null && results[1] != null);\r\n                                }\r\n\r\n                                if (invokeCallback)\r\n                                {\r\n                                    callback.SafeInvoke(results);\r\n                                }\r\n                            });\r\n                        return;\r\n                    }\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        commentMessage.Status = GetMessageStatus(_cacheService, commentMessage.ToId);\r\n                    });\r\n\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption1);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, new List<TLMessage25> { commentMessage });\r\n                    }\r\n\r\n                    lock (_forwardMessagesWithCommentSyncRoot)\r\n                    {\r\n                        results[0] = result;\r\n                        invokeCallback = obj1 == null || (results[0] != null && results[1] != null);\r\n                    }\r\n\r\n                    if (invokeCallback)\r\n                    {\r\n                        callback.SafeInvoke(results);\r\n                    }\r\n                },\r\n                result =>\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        for (var i = 0; i < messages.Count; i++)\r\n                        {\r\n                            messages[i].Status = MessageStatus.Confirmed;\r\n                            messages[i].Media.LastProgress = 0.0;\r\n                            messages[i].Media.DownloadingProgress = 0.0;\r\n                        }\r\n                    });\r\n\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption2);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, messages);\r\n                    }\r\n\r\n                    bool invokeCallback;\r\n                    lock (_forwardMessagesWithCommentSyncRoot)\r\n                    {\r\n                        results[1] = result;\r\n                        invokeCallback = obj1 == null || (results[0] != null && results[1] != null);\r\n                    }\r\n\r\n                    if (invokeCallback)\r\n                    {\r\n                        callback.SafeInvoke(results);\r\n                    }\r\n                },\r\n                () =>\r\n                {\r\n\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void ForwardMessagesAsync(TLInputPeerBase toPeer, TLVector<TLInt> id, IList<TLMessage25> messages, bool withMyScore, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var randomId = new TLVector<TLLong>();\r\n            foreach (var message in messages)\r\n            {\r\n                randomId.Add(message.RandomId);\r\n            }\r\n\r\n            TLInputPeerBase fromPeer = null;\r\n            var message48 = messages.FirstOrDefault() as TLMessage48;\r\n            if (message48 != null)\r\n            {\r\n                fromPeer = message48.FwdFromChannelPeer;\r\n            }\r\n\r\n            if (fromPeer == null)\r\n            {\r\n                var message40 = messages.FirstOrDefault() as TLMessage40;\r\n                if (message40 != null)\r\n                {\r\n                    fromPeer = message40.FwdFromChannelPeer ?? PeerToInputPeer(message40.FwdFromPeer);\r\n                }\r\n            }\r\n\r\n            var obj = new TLForwardMessages { ToPeer = toPeer, Id = id, RandomIds = randomId, FromPeer = fromPeer, Flags = new TLInt(0) };\r\n\r\n            if (message48 != null && message48.IsChannelMessage)\r\n            {\r\n                obj.SetChannelMessage();\r\n            }\r\n\r\n            if (message48 != null && message48.Silent)\r\n            {\r\n                obj.SetSilent();\r\n            }\r\n\r\n            if (withMyScore)\r\n            {\r\n                obj.SetWithMyScore();\r\n            }\r\n\r\n            const string caption = \"messages.forwardMessages\";\r\n\r\n            //Execute.ShowDebugMessage(string.Format(caption + \" to_peer={0} from_peer={1} id={2} flags={3}\", toPeer, fromPeer, string.Join(\",\", id), TLForwardMessages.ForwardMessagesFlagsString(obj.Flags)));\r\n            //Execute.ShowDebugMessage(caption + string.Format(\"id={0} random_id={1} from_peer={2} to_peer={3}\", obj.Id.FirstOrDefault(), obj.RandomIds.FirstOrDefault(), obj.FromPeer, obj.ToPeer));\r\n\r\n            ForwardMessagesAsyncInternal(obj,\r\n                result =>\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        for (var i = 0; i < messages.Count; i++)\r\n                        {\r\n                            messages[i].Status = MessageStatus.Confirmed;\r\n                            messages[i].Media.LastProgress = 0.0;\r\n                            messages[i].Media.DownloadingProgress = 0.0;\r\n                        }\r\n                    });\r\n\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, messages);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                () =>\r\n                {\r\n\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void GetChatsAsync(TLVector<TLInt> id, Action<TLChatsBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetChats { Id = id };\r\n\r\n            SendInformativeMessage(\"messages.getChats\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetFullChatAsync(TLInt chatId, Action<TLMessagesChatFull> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetFullChat { ChatId = chatId };\r\n\r\n            SendInformativeMessage<TLMessagesChatFull>(\r\n                \"messages.getFullChat\", obj,\r\n                messagesChatFull =>\r\n                {\r\n                    _cacheService.SyncChat(messagesChatFull, result => callback.SafeInvoke(messagesChatFull));\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void EditChatTitleAsync(TLInt chatId, TLString title, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLEditChatTitle { ChatId = chatId, Title = title };\r\n\r\n            const string caption = \"messages.editChatTitle\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption,\r\n                obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void EditChatPhotoAsync(TLInt chatId, TLInputChatPhotoBase photo, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLEditChatPhoto { ChatId = chatId, Photo = photo };\r\n\r\n            const string caption = \"messages.editChatPhoto\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption,\r\n                obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null, true);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void AddChatUserAsync(TLInt chatId, TLInputUserBase userId, TLInt fwdLimit, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLAddChatUser { ChatId = chatId, UserId = userId, FwdLimit = fwdLimit };\r\n\r\n            const string caption = \"messages.addChatUser\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption,\r\n                obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void DeleteChatUserAsync(TLInt chatId, TLInputUserBase userId, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeleteChatUser { ChatId = chatId, UserId = userId };\r\n\r\n            const string caption = \"messages.deleteChatUser\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption,\r\n                obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void CreateChatAsync(TLVector<TLInputUserBase> users, TLString title, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLCreateChat { Users = users, Title = title };\r\n\r\n            const string caption = \"messages.createChat\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption,\r\n                obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void ExportChatInviteAsync(TLInt chatId, Action<TLExportedChatInvite> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLExportChatInvite { ChatId = chatId };\r\n\r\n            SendInformativeMessage(\"messages.exportChatInvite\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void CheckChatInviteAsync(TLString hash, Action<TLChatInviteBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLCheckChatInvite { Hash = hash };\r\n\r\n            SendInformativeMessage<TLChatInviteBase>(\"messages.checkChatInvite\", obj,\r\n                result =>\r\n                {\r\n                    var chatInvite = result as TLChatInvite54;\r\n                    if (chatInvite != null)\r\n                    {\r\n                        _cacheService.SyncUsers(chatInvite.Participants, participants =>\r\n                        {\r\n                            chatInvite.Participants = participants;\r\n                            callback.SafeInvoke(result);\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        callback.SafeInvoke(result);\r\n                    }\r\n                }\r\n                , faultCallback);\r\n        }\r\n\r\n        public void ImportChatInviteAsync(TLString hash, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLImportChatInvite { Hash = hash };\r\n\r\n            const string caption = \"messages.importChatInvite\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption,\r\n                obj,\r\n                result =>\r\n                {\r\n                    var updates = result as TLUpdates;\r\n                    if (updates != null)\r\n                    {\r\n                        _cacheService.SyncUsersAndChats(updates.Users, updates.Chats, tuple => { });\r\n                    }\r\n\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void SendActionsAsync(List<TLObject> actions, Action<TLObject, TLObject> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var container = new TLContainer { Messages = new List<TLContainerTransportMessage>() };\r\n            var historyItems = new List<HistoryItem>();\r\n            for (var i = 0; i < actions.Count; i++)\r\n            {\r\n                var obj = actions[i];\r\n                int sequenceNumber;\r\n                TLLong messageId;\r\n                lock (_activeTransportRoot)\r\n                {\r\n                    sequenceNumber = _activeTransport.SequenceNumber * 2 + 1;\r\n                    _activeTransport.SequenceNumber++;\r\n                    messageId = _activeTransport.GenerateMessageId(true);\r\n                }\r\n\r\n                var data = i > 0 ? new TLInvokeAfterMsg { MsgId = container.Messages[i - 1].MessageId, Object = obj } : obj;\r\n                var invokeWithoutUpdates = new TLInvokeWithoutUpdates { Object = data };\r\n\r\n                var transportMessage = new TLContainerTransportMessage\r\n                {\r\n                    MessageId = messageId,\r\n                    SeqNo = new TLInt(sequenceNumber),\r\n                    MessageData = invokeWithoutUpdates\r\n                };\r\n\r\n                var historyItem = new HistoryItem\r\n                {\r\n                    SendTime = DateTime.Now,\r\n                    Caption = \"messages.containerPart\" + i,\r\n                    Object = obj,\r\n                    Message = transportMessage,\r\n                    Callback = result => callback(obj, result),\r\n                    AttemptFailed = null,\r\n                    FaultCallback = faultCallback,\r\n                    ClientTicksDelta = ClientTicksDelta,\r\n                    Status = RequestStatus.Sent,\r\n                };\r\n                historyItems.Add(historyItem);\r\n\r\n                container.Messages.Add(transportMessage);\r\n            }\r\n\r\n\r\n            lock (_historyRoot)\r\n            {\r\n                foreach (var historyItem in historyItems)\r\n                {\r\n                    _history[historyItem.Hash] = historyItem;\r\n                }\r\n            }\r\n#if DEBUG\r\n            NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n            SendNonInformativeMessage<TLObject>(\"messages.container\", container, result => callback(null, result), faultCallback);\r\n        }\r\n\r\n        public void ToggleChatAdminsAsync(TLInt chatId, TLBool enabled, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLToggleChatAdmins { ChatId = chatId, Enabled = enabled };\r\n\r\n            const string caption = \"messages.toggleChatAdmins\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void EditChatAdminAsync(TLInt chatId, TLInputUserBase userId, TLBool isAdmin, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLEditChatAdmin { ChatId = chatId, UserId = userId, IsAdmin = isAdmin };\r\n\r\n            SendInformativeMessage(\"messages.editChatAdmin\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void DeactivateChatAsync(TLInt chatId, TLBool enabled, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDeactivateChat { ChatId = chatId, Enabled = enabled };\r\n\r\n            const string caption = \"messages.deactivateChat\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void HideReportSpamAsync(TLInputPeerBase peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLHideReportSpam { Peer = peer };\r\n\r\n            const string caption = \"messages.hideReportSpam\";\r\n            SendInformativeMessage<TLBool>(caption, obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void GetPeerSettingsAsync(TLInputPeerBase peer, Action<TLPeerSettings> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetPeerSettings { Peer = peer };\r\n\r\n            const string caption = \"messages.getPeerSettings\";\r\n            SendInformativeMessage<TLPeerSettings>(caption, obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void MigrateChatAsync(TLInt chatId, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLMigrateChat { ChatId = chatId };\r\n\r\n            const string caption = \"messages.migrateChat\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public int SendingMessages\r\n        {\r\n            get\r\n            {\r\n                var result = 0;\r\n                lock (_historyRoot)\r\n                {\r\n                    foreach (var historyItem in _history.Values)\r\n                    {\r\n                        if (historyItem.Caption.StartsWith(\"messages.containerPart\"))\r\n                        {\r\n                            result++;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return result;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Payments.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Payments;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        public void GetPaymentFormAsync(TLInt msgId, Action<TLPaymentForm> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetPaymentForm { MsgId = msgId };\r\n\r\n            const string caption = \"payments.getPaymentForm\";\r\n            SendInformativeMessage<TLPaymentForm>(caption, obj,\r\n                result => _cacheService.SyncUsers(result.Users, users =>\r\n                {\r\n                    result.Users = users;\r\n                    callback.SafeInvoke(result);\r\n                }), \r\n                faultCallback);\r\n        }\r\n\r\n        public void SendPaymentFormAsync(TLInt msgId, TLString requestedInfoId, TLString shippingOptionId, TLInputPaymentCredentialsBase credentials, Action<TLPaymentResultBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSendPaymentForm\r\n            {\r\n                Flags = new TLInt(0),\r\n                MsgId = msgId,\r\n                RequestedInfoId = requestedInfoId,\r\n                ShippingOptionId = shippingOptionId,\r\n                Credentials = credentials\r\n            };\r\n\r\n            const string caption = \"payments.savePaymentForm\";\r\n            SendInformativeMessage<TLPaymentResultBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var paymentResult = result as TLPaymentResult;\r\n                    if (paymentResult != null)\r\n                    {\r\n                        var multiPts = paymentResult.Updates as IMultiPts;\r\n                        if (multiPts != null)\r\n                        {\r\n                            _updatesService.SetState(multiPts, caption);\r\n                        }\r\n                        else\r\n                        {\r\n                            ProcessUpdates(paymentResult.Updates, null, true);\r\n                        }\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void ValidateRequestedInfoAsync(bool save, TLInt msgId, TLPaymentRequestedInfo info, Action<TLValidatedRequestedInfo> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLValidateRequestedInfo\r\n            {\r\n                Flags = new TLInt(0),\r\n                Save = save,\r\n                MsgId = msgId,\r\n                Info = info\r\n            };\r\n\r\n            const string caption = \"payments.validateRequestedInfo\";\r\n            SendInformativeMessage<TLValidatedRequestedInfo>(caption, obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void GetSavedInfoAsync(Action<TLSavedInfo> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetSavedInfo();\r\n\r\n            const string caption = \"payments.getSavedInfo\";\r\n            SendInformativeMessage<TLSavedInfo>(caption, obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void ClearSavedInfoAsync(bool credentials, bool info, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLClearSavedInfo{ Flags = new TLInt(0), Credentials = credentials, Info = info };\r\n\r\n            const string caption = \"payments.clearSavedInfo\";\r\n            SendInformativeMessage<TLBool>(caption, obj, callback.SafeInvoke, faultCallback);\r\n        }\r\n\r\n        public void GetPaymentReceiptAsync(TLInt msgId, Action<TLPaymentReceipt> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetPaymentReceipt{ MsgId = msgId };\r\n\r\n            const string caption = \"payments.getGetReceipt\";\r\n            SendInformativeMessage<TLPaymentReceipt>(caption, obj,\r\n                result => _cacheService.SyncUsers(result.Users, users =>\r\n                {\r\n                    result.Users = users;\r\n                    callback.SafeInvoke(result);\r\n                }),\r\n                faultCallback);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Phone.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Phone;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        public void GetCallConfigAsync(Action<TLDataJSON> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetCallConfig();\r\n\r\n            SendInformativeMessage(\"phone.requestCall\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void RequestCallAsync(TLInputUserBase userId, TLInt randomId, TLString gaHash, TLPhoneCallProtocol protocol, Action<TLPhonePhoneCall> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLRequestCall { UserId = userId, RandomId = randomId, GAHash = gaHash, Protocol = protocol };\r\n\r\n            SendInformativeMessage(\"phone.requestCall\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void AcceptCallAsync(TLInputPhoneCall peer, TLString gb, TLPhoneCallProtocol protocol, Action<TLPhonePhoneCall> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLAcceptCall { Peer = peer, GB = gb, Protocol = protocol };\r\n\r\n            SendInformativeMessage(\"phone.acceptCall\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ConfirmCallAsync(TLInputPhoneCall peer, TLString ga, TLLong keyFingerprint, TLPhoneCallProtocol protocol, Action<TLPhonePhoneCall> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLConfirmCall { Peer = peer, GA = ga, KeyFingerprint = keyFingerprint, Protocol = protocol };\r\n\r\n            SendInformativeMessage(\"phone.confirmCall\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void ReceivedCallAsync(TLInputPhoneCall peer, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLReceivedCall { Peer = peer };\r\n\r\n            SendInformativeMessage(\"phone.receivedCall\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void DiscardCallAsync(TLInputPhoneCall peer, TLInt duration, TLPhoneCallDiscardReasonBase reason, TLLong connectionId, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDiscardCall { Peer = peer, Duration = duration, Reason = reason, ConnectionId = connectionId };\r\n\r\n            const string caption = \"phone.discardCall\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null, true);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void SetCallRatingAsync(TLInputPhoneCall peer, TLInt rating, TLString comment, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSetCallRating { Peer = peer, Rating = rating, Comment = comment };\r\n\r\n            const string caption = \"phone.setCallRating\";\r\n            SendInformativeMessage<TLUpdatesBase>(caption, obj,\r\n                result =>\r\n                {\r\n                    var multiPts = result as IMultiPts;\r\n                    if (multiPts != null)\r\n                    {\r\n                        _updatesService.SetState(multiPts, caption);\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessUpdates(result, null, true);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void SaveCallDebugAsync(TLInputPhoneCall peer, TLDataJSON debug, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSaveCallDebug { Peer = peer, Debug = debug };\r\n\r\n            SendInformativeMessage(\"phone.saveCallDebug\", obj, callback, faultCallback);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Photos.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Photos;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        public void UploadProfilePhotoAsync(TLInputFile file, Action<TLPhotosPhoto> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLUploadProfilePhoto { File = file };\r\n\r\n            SendInformativeMessage(\"photos.uploadProfilePhoto\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void UpdateProfilePhotoAsync(TLInputPhotoBase id, Action<TLPhotoBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLUpdateProfilePhoto{ Id = id };\r\n\r\n            SendInformativeMessage(\"photos.updateProfilePhoto\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetUserPhotosAsync(TLInputUserBase userId, TLInt offset, TLLong maxId, TLInt limit, Action<TLPhotosBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetUserPhotos { UserId = userId, Offset = offset, MaxId = maxId, Limit = limit };\r\n\r\n            SendInformativeMessage(\"photos.getUserPhotos\", obj, callback, faultCallback);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.SecretChats.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Messages;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        public void RekeyAsync(TLEncryptedChatBase chat, Action<TLLong> callback)\r\n        {\r\n            //GetGA()\r\n        }\r\n\r\n        public void GetDHConfigAsync(TLInt version, TLInt randomLength, Action<TLDHConfigBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetDHConfig { Version = version, RandomLength = randomLength };\r\n\r\n            SendInformativeMessage(\"messages.getDhConfig\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void RequestEncryptionAsync(TLInputUserBase userId, TLInt randomId, TLString ga, Action<TLEncryptedChatBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLRequestEncryption { UserId = userId, RandomId = randomId, G_A = ga };\r\n\r\n            SendInformativeMessage<TLEncryptedChatBase>(\"messages.requestEncryption\", obj,\r\n                encryptedChat =>\r\n                {\r\n                    _cacheService.SyncEncryptedChat(encryptedChat, callback.SafeInvoke);\r\n                }, \r\n                faultCallback);\r\n        }\r\n\r\n        public void AcceptEncryptionAsync(TLInputEncryptedChat peer, TLString gb, TLLong keyFingerprint, Action<TLEncryptedChatBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLAcceptEncryption { Peer = peer, GB = gb, KeyFingerprint = keyFingerprint };\r\n\r\n            SendInformativeMessage<TLEncryptedChatBase>(\"messages.acceptEncryption\", obj,\r\n                encryptedChat =>\r\n                {\r\n                    _cacheService.SyncEncryptedChat(encryptedChat, callback.SafeInvoke);\r\n                },\r\n                faultCallback);\r\n        }\r\n\r\n        public void DiscardEncryptionAsync(TLInt chatId, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLDiscardEncryption { ChatId = chatId };\r\n\r\n            SendInformativeMessage(\"messages.discardEncryption\", obj, callback, faultCallback);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.SendingQueue.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Channels;\r\nusing Telegram.Api.TL.Functions.Messages;\r\nusing Action = System.Action;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        private readonly object _sendingQueueSyncRoot = new object();\r\n\r\n        private readonly List<HistoryItem> _sendingQueue = new List<HistoryItem>();\r\n\r\n        private static Timer _sendingTimer;\r\n\r\n        private static void StartSendingTimer()\r\n        {\r\n            //Helpers.Execute.ShowDebugMessage(\"MTProtoService.StartSendingTimer\");\r\n            _sendingTimer.Change(TimeSpan.FromSeconds(Constants.ResendMessageInterval), TimeSpan.FromSeconds(Constants.ResendMessageInterval));\r\n        }\r\n\r\n        private static void StopSendingTimer()\r\n        {\r\n            //Helpers.Execute.ShowDebugMessage(\"MTProtoService.StoptSendingTimer\");\r\n            _sendingTimer.Change(Timeout.Infinite, Timeout.Infinite);\r\n        }\r\n\r\n        private static void CheckSendingMessages(object state)\r\n        {\r\n#if DEBUG\r\n            if (Debugger.IsAttached) return;\r\n#endif\r\n\r\n            var service = (MTProtoService)state;\r\n\r\n            service.ProcessQueue();\r\n        }\r\n\r\n        private void ReadEncryptedHistoryAsyncInternal(TLReadEncryptedHistory message, Action<TLBool> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.readEncryptedHistory\", int.MaxValue, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void ReadChannelHistoryAsyncInternal(TLReadChannelHistory message, Action<TLBool> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"channels.readHistory\", int.MaxValue, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void ReadMessageContentsAsyncInternal(TL.Functions.Channels.TLReadMessageContents message, Action<TLBool> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"channels.readMessageContents\", int.MaxValue, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void ReadHistoryAsyncInternal(TLReadHistory message, Action<TLAffectedMessages> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.readHistory\", int.MaxValue, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void ReadMentionsAsyncInternal(TLReadMentions message, Action<TLAffectedHistory24> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.readMentions\", int.MaxValue, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void ReadMessageContentsAsyncInternal(TL.Functions.Messages.TLReadMessageContents message, Action<TLAffectedMessages> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.readMessageContents\", int.MaxValue, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void SendEncryptedAsyncInternal(TLSendEncrypted message, Action<TLSentEncryptedMessage> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.sendEncrypted\", Constants.MessageSendingInterval, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void SendEncryptedFileAsyncInternal(TLSendEncryptedFile message, Action<TLSentEncryptedFile> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.sendEncryptedFile\", Constants.MessageSendingInterval, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void SendEncryptedFileAsyncInternal(TLVector<TLSendEncryptedFile> messages, Action<TLSentEncryptedFile> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            for (var i = 0; i < messages.Count - 1; i++)\r\n            {\r\n                AddAsyncInternal(\"messages.sendEncryptedFile\", Constants.MessageSendingInterval, messages[i], callback, fastCallback, faultCallback, 10);\r\n            }\r\n\r\n            SendAsyncInternal(\"messages.sendEncryptedFile\", Constants.MessageSendingInterval, messages[messages.Count - 1], callback, fastCallback, faultCallback, 10);\r\n        }\r\n\r\n        private void SendEncryptedServiceAsyncInternal(TLSendEncryptedService message, Action<TLSentEncryptedMessage> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.sendEncryptedService\", Constants.MessageSendingInterval, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void SendMessageAsyncInternal(TLSendMessage message, Action<TLUpdatesBase> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.sendMessage\", Constants.MessageSendingInterval, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void SendInlineBotResultAsyncInternal(TLSendInlineBotResult message, Action<TLUpdatesBase> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.sendInlineBotResult\", Constants.MessageSendingInterval, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void SendMediaAsyncInternal(TLSendMedia message, Action<TLUpdatesBase> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.sendMedia\", Constants.MessageSendingInterval, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void SendMultiMediaAsyncInternal(TLSendMultiMedia message, Action<TLUpdatesBase> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.sendMultiMedia\", Constants.MessageSendingInterval, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void StartBotAsyncInternal(TLStartBot message, Action<TLUpdatesBase> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.startBot\", Constants.MessageSendingInterval, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void ForwardMessageAsyncInternal(TLForwardMessage message, Action<TLUpdatesBase> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.forwardMessage\", Constants.MessageSendingInterval, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void ForwardMessagesAsyncInternal(TLForwardMessages message, Action<TLUpdatesBase> callback, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            SendAsyncInternal(\"messages.forwardMessages\", Constants.MessageSendingInterval, message, callback, fastCallback, faultCallback);\r\n        }\r\n\r\n        private void ForwardMessagesWithCommentAsyncInternal(TLSendMessage message1, TLForwardMessages message2, Action<TLUpdatesBase> callback1, Action<TLUpdatesBase> callback2, Action fastCallback, Action<TLRPCError> faultCallback)\r\n        {\r\n            if (message1 != null) AddAsyncInternal(\"messages.sendMessages\", Constants.MessageSendingInterval, message1, callback1, fastCallback, faultCallback, 10);\r\n            SendAsyncInternal(\"messages.forwardMessages\", Constants.MessageSendingInterval, message2, callback2, fastCallback, faultCallback, 10);\r\n        }\r\n\r\n        private HistoryItem AddAsyncInternal<T>(string caption, double timeout, TLObject obj, Action<T> callback, Action fastCallback, Action<TLRPCError> faultCallback, int timeoutToResend = 0) where T : TLObject\r\n        {\r\n            int sequenceNumber;\r\n            TLLong messageId;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                sequenceNumber = _activeTransport.SequenceNumber * 2 + 1;\r\n                _activeTransport.SequenceNumber++;\r\n                messageId = _activeTransport.GenerateMessageId(true);\r\n            }\r\n\r\n            Debug.WriteLine(\"AddAsyncInternal msg_id={0} caption={1}\", messageId, caption);\r\n\r\n            var transportMessage = new TLContainerTransportMessage\r\n            {\r\n                MessageId = messageId,\r\n                SeqNo = new TLInt(sequenceNumber),\r\n                MessageData = obj\r\n            };\r\n\r\n            var now = DateTime.Now;\r\n            var sendBeforeTime = now.AddSeconds(timeout);\r\n            var sendingItem = new HistoryItem\r\n            {\r\n                SendTime = DateTime.MinValue,\r\n                TimeToResend = timeoutToResend,\r\n                SendBeforeTime = sendBeforeTime,\r\n                Caption = caption,\r\n                Object = obj,\r\n                Message = transportMessage,\r\n                Callback = result => callback((T)result),\r\n                FastCallback = fastCallback,\r\n                FaultCallback = null, // чтобы не вылететь по таймауту не сохраняем сюда faultCallback, а просто запоминаем последнюю ошибку,\r\n                FaultQueueCallback = faultCallback, // для MTProto.CleanupQueue\r\n                InvokeAfter = null,   // устанвливаем в момент создания контейнера historyItems.LastOrDefault(),\r\n                Status = RequestStatus.ReadyToSend,\r\n            };\r\n\r\n            //обрабатываем ошибки\r\n            sendingItem.FaultCallback = error => ProcessFault(sendingItem, error);\r\n\r\n            AddActionInfoToFile(TLUtils.DateToUniversalTimeTLInt(ClientTicksDelta, sendBeforeTime), obj);\r\n\r\n            lock (_sendingQueueSyncRoot)\r\n            {\r\n                _sendingQueue.Add(sendingItem);\r\n            }\r\n            return sendingItem;\r\n        }\r\n\r\n        private void SendAsyncInternal<T>(string caption, double timeout, TLObject obj, Action<T> callback, Action fastCallback, Action<TLRPCError> faultCallback, int timeoutToResend = 0) where T : TLObject\r\n        {\r\n            var sendingItem = AddAsyncInternal(caption, timeout, obj, callback, fastCallback, faultCallback, timeoutToResend);\r\n\r\n            lock (_sendingQueueSyncRoot)\r\n            {\r\n                StartSendingTimer();\r\n            }\r\n\r\n            ProcessQueue();\r\n        }\r\n\r\n        private void ProcessFault(HistoryItem item, TLRPCError error)\r\n        {\r\n            item.LastError = error;\r\n            if (error != null\r\n                && (error.CodeEquals(ErrorCode.BAD_REQUEST)\r\n                    || error.CodeEquals(ErrorCode.FLOOD)\r\n                    || error.CodeEquals(ErrorCode.UNAUTHORIZED)\r\n                    || error.CodeEquals(ErrorCode.INTERNAL)))\r\n            {\r\n                RemoveFromQueue(item);\r\n                item.FaultQueueCallback.SafeInvoke(error);\r\n            }\r\n        }\r\n\r\n        private void ProcessQueue()\r\n        {\r\n            CleanupQueue();\r\n\r\n            SendQueue();\r\n        }\r\n\r\n        private void SendQueue()\r\n        {\r\n            List<HistoryItem> itemsSnapshort;\r\n            lock (_sendingQueueSyncRoot)\r\n            {\r\n                var now = DateTime.Now;\r\n                itemsSnapshort = _sendingQueue.Where(x => x.SendTime.AddSeconds(x.TimeToResend) < now).ToList();\r\n            }\r\n            if (itemsSnapshort.Count == 0) return;\r\n\r\n            var historyItems = new List<HistoryItem>();\r\n            for (var i = 0; i < itemsSnapshort.Count; i++)\r\n            {\r\n                itemsSnapshort[i].SendTime = DateTime.Now;\r\n                itemsSnapshort[i].InvokeAfter = historyItems.LastOrDefault();\r\n                historyItems.Add(itemsSnapshort[i]);\r\n            }\r\n\r\n#if DEBUG\r\n            NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n            lock (_historyRoot)\r\n            {\r\n                for (var i = 0; i < historyItems.Count; i++)\r\n                {\r\n                    _history[historyItems[i].Hash] = historyItems[i];\r\n                }\r\n            }\r\n\r\n            var container = CreateContainer(historyItems);\r\n\r\n            Debug.WriteLine(\"send container msg_count=\" + container.Messages.Count);\r\n\r\n            SendNonInformativeMessage<TLObject>(\r\n                \"container.sendMessages\",\r\n                container,\r\n                result =>\r\n                {\r\n                    // переотправка сейчас по таймеру раз в 5 сек\r\n                    // этот метод никогда не вызывается, т.к. не используется в SendNonInformativeMessage для container.sendMessages\r\n                    //lock (_queueSyncRoot)\r\n                    //{\r\n                    //    // fast aknowledgments\r\n                    //    _sendingQueue.Remove(item);\r\n                    //}\r\n\r\n\r\n                    //item.FastCallback.SafeInvoke();\r\n                },\r\n                error =>\r\n                {\r\n                    // переотправка сейчас по таймеру раз в 5 сек\r\n                    //FaultSending(error, item);\r\n                });\r\n        }\r\n\r\n        private void CleanupQueue()\r\n        {\r\n            var itemsToRemove = new List<HistoryItem>();\r\n\r\n            lock (_sendingQueueSyncRoot)\r\n            {\r\n                var now = DateTime.Now;\r\n                for (var i = 0; i < _sendingQueue.Count; i++)\r\n                {\r\n                    var historyItem = _sendingQueue[i];\r\n                    if (historyItem.SendBeforeTime > now) continue;\r\n\r\n                    itemsToRemove.Add(historyItem);\r\n                    _sendingQueue.RemoveAt(i--);\r\n                }\r\n\r\n                if (_sendingQueue.Count == 0)\r\n                {\r\n                    StopSendingTimer();\r\n                }\r\n            }\r\n\r\n            lock (_historyRoot)\r\n            {\r\n                for (var i = 0; i < itemsToRemove.Count; i++)\r\n                {\r\n                    _history.Remove(itemsToRemove[i].Hash);\r\n                }\r\n            }\r\n\r\n            var actions = new TLVector<TLObject>();\r\n            for (var i = 0; i < itemsToRemove.Count; i++)\r\n            {\r\n                actions.Add(itemsToRemove[i].Object);\r\n            }\r\n            RemoveActionInfoFromFile(actions);\r\n\r\n            Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                foreach (var item in itemsToRemove)\r\n                {\r\n                    item.FaultQueueCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"MTProtoService.CleanupQueue\") });\r\n                }\r\n            });\r\n        }\r\n\r\n        public void ClearQueue()\r\n        {\r\n            var itemsToRemove = new List<HistoryItem>();\r\n\r\n            lock (_sendingQueueSyncRoot)\r\n            {\r\n                var now = DateTime.Now;\r\n                for (var i = 0; i < _sendingQueue.Count; i++)\r\n                {\r\n                    var historyItem = _sendingQueue[i];\r\n\r\n                    itemsToRemove.Add(historyItem);\r\n                    _sendingQueue.RemoveAt(i--);\r\n                }\r\n\r\n                if (_sendingQueue.Count == 0)\r\n                {\r\n                    StopSendingTimer();\r\n                }\r\n            }\r\n\r\n            lock (_historyRoot)\r\n            {\r\n                for (var i = 0; i < itemsToRemove.Count; i++)\r\n                {\r\n                    _history.Remove(itemsToRemove[i].Hash);\r\n                }\r\n            }\r\n\r\n            var actions = new TLVector<TLObject>();\r\n            for (var i = 0; i < itemsToRemove.Count; i++)\r\n            {\r\n                actions.Add(itemsToRemove[i].Object);\r\n            }\r\n\r\n            ClearActionInfoFile();\r\n\r\n            Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                foreach (var item in itemsToRemove)\r\n                {\r\n                    item.FaultQueueCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"MTProtoService.CleanupQueue\") });\r\n                }\r\n            });\r\n        }\r\n\r\n        private void RemoveFromQueue(HistoryItem item)\r\n        {\r\n            if (item == null)\r\n            {\r\n                Helpers.Execute.ShowDebugMessage(\"MTProtoService.RemoveFromQueue item=null\");\r\n                return;\r\n            }\r\n\r\n            lock (_sendingQueueSyncRoot)\r\n            {\r\n                _sendingQueue.Remove(item);\r\n            }\r\n\r\n            RemoveActionInfoFromFile(item.Object);\r\n        }\r\n\r\n        public void RemoveFromQueue(TLLong id)\r\n        {\r\n            HistoryItem item = null;\r\n            lock (_sendingQueueSyncRoot)\r\n            {\r\n                foreach (var historyItem in _sendingQueue)\r\n                {\r\n                    var randomId = historyItem.Object as IRandomId;\r\n                    if (randomId != null && randomId.RandomId.Value == id.Value)\r\n                    {\r\n                        item = historyItem;\r\n                        break;\r\n                    }\r\n                }\r\n                if (item != null)\r\n                {\r\n                    _sendingQueue.Remove(item);\r\n                }\r\n            }\r\n\r\n            RemoveActionInfoFromFile(id);\r\n        }\r\n\r\n        private readonly object _actionsSyncRoot = new object();\r\n\r\n        private readonly object _actionInfoSyncRoot = new object();\r\n\r\n        private TLVector<TLActionInfo> _actionInfo;\r\n\r\n        public TLVector<TLActionInfo> GetActionInfoFromFile()\r\n        {\r\n            if (_actionInfo != null)\r\n            {\r\n                return _actionInfo;\r\n            }\r\n\r\n            _actionInfo = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLActionInfo>>(_actionsSyncRoot, Constants.ActionQueueFileName) ?? new TLVector<TLActionInfo>();\r\n\r\n            return _actionInfo;\r\n        }\r\n\r\n        private void SaveActionInfoToFile(TLVector<TLActionInfo> data)\r\n        {\r\n            TLUtils.SaveObjectToMTProtoFile(_actionsSyncRoot, Constants.ActionQueueFileName, data);\r\n        }\r\n\r\n        private void AddActionInfoToFile(TLInt sendBefore, TLObject obj)\r\n        {\r\n            if (!TLUtils.IsValidAction(obj))\r\n            {\r\n                return;\r\n            }\r\n\r\n            lock (_actionInfoSyncRoot)\r\n            {\r\n                var actions = GetActionInfoFromFile();\r\n\r\n                var actionInfo = new TLActionInfo\r\n                {\r\n                    Action = obj,\r\n                    SendBefore = sendBefore\r\n                };\r\n                actions.Add(actionInfo);\r\n\r\n                SaveActionInfoToFile(actions);\r\n            }\r\n        }\r\n\r\n        private void RemoveActionInfoFromFile(TLVector<TLObject> objects)\r\n        {\r\n            lock (_actionInfoSyncRoot)\r\n            {\r\n                var actions = GetActionInfoFromFile();\r\n\r\n                foreach (var obj in objects)\r\n                {\r\n                    RemoveActionInfoCommon(actions, obj);\r\n                }\r\n\r\n                SaveActionInfoToFile(actions);\r\n            }\r\n        }\r\n\r\n        public static void RemoveActionInfoCommon(TLVector<TLActionInfo> actions, TLObject obj)\r\n        {\r\n            for (var i = 0; i < actions.Count; i++)\r\n            {\r\n                if (actions[i].Action.GetType() == obj.GetType())\r\n                {\r\n                    if (actions[i].Action == obj)\r\n                    {\r\n                        actions.RemoveAt(i--);\r\n                        continue;\r\n                    }\r\n\r\n                    var randomId1 = actions[i].Action as IRandomId;\r\n                    var randomId2 = obj as IRandomId;\r\n                    if (randomId1 != null\r\n                        && randomId2 != null\r\n                        && randomId1.RandomId.Value == randomId2.RandomId.Value)\r\n                    {\r\n                        actions.RemoveAt(i--);\r\n                        continue;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void RemoveActionInfoFromFile(TLLong id)\r\n        {\r\n            lock (_actionInfoSyncRoot)\r\n            {\r\n                var actions = GetActionInfoFromFile();\r\n\r\n                for (var i = 0; i < actions.Count; i++)\r\n                {\r\n                    var randomId = actions[i].Action as IRandomId;\r\n                    if (randomId != null\r\n                        && randomId.RandomId.Value == id.Value)\r\n                    {\r\n                        actions.RemoveAt(i--);\r\n                    }\r\n                }\r\n\r\n                SaveActionInfoToFile(actions);\r\n            }\r\n        }\r\n\r\n        private void RemoveActionInfoFromFile(TLObject obj)\r\n        {\r\n            lock (_actionInfoSyncRoot)\r\n            {\r\n                var actions = GetActionInfoFromFile();\r\n\r\n                RemoveActionInfoCommon(actions, obj);\r\n\r\n                SaveActionInfoToFile(actions);\r\n            }\r\n        }\r\n\r\n        public void RemoveActionInfoFromFile(IEnumerable<TLObject> obj)\r\n        {\r\n            lock (_actionInfoSyncRoot)\r\n            {\r\n                var actions = GetActionInfoFromFile();\r\n\r\n                foreach (var o in obj)\r\n                {\r\n                    RemoveActionInfoCommon(actions, o);\r\n                }\r\n\r\n                SaveActionInfoToFile(actions);\r\n            }\r\n        }\r\n\r\n        public void ClearActionInfoFile()\r\n        {\r\n            lock (_actionInfoSyncRoot)\r\n            {\r\n                var actions = new TLVector<TLActionInfo>();\r\n                SaveActionInfoToFile(actions);\r\n            }\r\n        }\r\n\r\n        private static TLContainer CreateContainer(IList<HistoryItem> items)\r\n        {\r\n            var messages = new List<TLContainerTransportMessage>();\r\n\r\n            for (var i = 0; i < items.Count; i++)\r\n            {\r\n                var item = items[i];\r\n\r\n                var transportMessage = (TLContainerTransportMessage)item.Message;\r\n                if (item.InvokeAfter != null)\r\n                {\r\n                    transportMessage.MessageData = new TLInvokeAfterMsg\r\n                    {\r\n                        MsgId = item.InvokeAfter.Message.MessageId,\r\n                        Object = item.Object\r\n                    };\r\n                }\r\n\r\n                item.Status = RequestStatus.Sent;\r\n\r\n                messages.Add(transportMessage);\r\n            }\r\n\r\n            var container = new TLContainer\r\n            {\r\n                Messages = new List<TLContainerTransportMessage>(messages)\r\n            };\r\n\r\n            return container;\r\n        }\r\n\r\n\r\n        public void GetSyncErrorsAsync(Action<ExceptionInfo, IList<ExceptionInfo>> callback)\r\n        {\r\n            Helpers.Execute.BeginOnThreadPool(() => callback.SafeInvoke(_cacheService.LastSyncMessageException, _updatesService.SyncDifferenceExceptions));\r\n        }\r\n\r\n        public void GetSendingQueueInfoAsync(Action<string> callback)\r\n        {\r\n            Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var info = new StringBuilder();\r\n                lock (_sendingQueueSyncRoot)\r\n                {\r\n                    var count = 0;\r\n                    foreach (var item in _sendingQueue)\r\n                    {\r\n                        var sendBeforeTimeString = item.SendBeforeTime.HasValue\r\n                            ? item.SendBeforeTime.Value.ToString(\"H:mm:ss.fff\")\r\n                            : null;\r\n\r\n                        var message = string.Empty;\r\n                        try\r\n                        {\r\n                            var transportMessage = item.Message as TLContainerTransportMessage;\r\n                            if (transportMessage != null)\r\n                            {\r\n                                var sendMessage = transportMessage.MessageData as TLSendMessage;\r\n                                if (sendMessage != null)\r\n                                {\r\n                                    message = string.Format(\"{0} {1}\", sendMessage.Message, sendMessage.RandomId);\r\n                                }\r\n                                else\r\n                                {\r\n                                    var invokeAfterMsg = transportMessage.MessageData as TLInvokeAfterMsg;\r\n                                    if (invokeAfterMsg != null)\r\n                                    {\r\n                                        sendMessage = invokeAfterMsg.Object as TLSendMessage;\r\n                                        if (sendMessage != null)\r\n                                        {\r\n                                            message = string.Format(\"{0} {1}\", sendMessage.Message, sendMessage.RandomId);\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n\r\n                        }\r\n                        info.AppendLine(string.Format(\"{0} send={1} before={2} msg=[{3}] error=[{4}]\", count++, item.SendTime.ToString(\"H:mm:ss.fff\"), sendBeforeTimeString, message, item.LastError));\r\n                    }\r\n                }\r\n\r\n                callback.SafeInvoke(info.ToString());\r\n            });\r\n        }\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Stuff.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Stuff;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public partial class MTProtoService\r\n    {\r\n        private object _debugRoot = new object();\r\n\r\n        public void MessageAcknowledgments(TLVector<TLLong> ids)\r\n        {\r\n            PrintCaption(\"msgs_ack\");\r\n            TLUtils.WriteLine(\"ids\");\r\n            foreach (var id in ids)\r\n            {\r\n                TLUtils.WriteLine(TLUtils.MessageIdString(id));\r\n            }\r\n            var obj = new TLMessageAcknowledgments { MsgIds = ids };\r\n\r\n            var authKey = _activeTransport.AuthKey;\r\n            var sesseionId = _activeTransport.SessionId;\r\n            var salt = _activeTransport.Salt;\r\n\r\n            int sequenceNumber;\r\n            TLLong messageId;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                sequenceNumber = _activeTransport.SequenceNumber * 2;\r\n                messageId = _activeTransport.GenerateMessageId(true);\r\n            }\r\n            var transportMessage = CreateTLTransportMessage(salt, sesseionId, new TLInt(sequenceNumber), messageId, obj);\r\n            var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n            lock (_activeTransportRoot)\r\n            {\r\n                if (_activeTransport.Closed)\r\n                {\r\n                    _activeTransport = GetTransport(_activeTransport.Host, _activeTransport.Port, Type,\r\n                        new TransportSettings\r\n                        {\r\n                            DcId = _activeTransport.DCId,\r\n                            Secret = _activeTransport.Secret,\r\n                            AuthKey = _activeTransport.AuthKey,\r\n                            Salt = _activeTransport.Salt,\r\n                            SessionId = _activeTransport.SessionId,\r\n                            MessageIdDict = _activeTransport.MessageIdDict,\r\n                            SequenceNumber = _activeTransport.SequenceNumber,\r\n                            ClientTicksDelta = _activeTransport.ClientTicksDelta,\r\n                            PacketReceivedHandler = OnPacketReceived\r\n                        });\r\n                }\r\n            }\r\n\r\n            lock (_debugRoot)\r\n            {\r\n                //Debug.WriteLine(\">>{0, -30} MsgId {1} SeqNo {2, -4} SessionId {3}\\nids:\", \"msgs_ack\", transportMessage.MessageId.Value, transportMessage.SeqNo.Value, transportMessage.SessionId.Value);\r\n                foreach (var id in ids)\r\n                {\r\n                    //Debug.WriteLine(id.Value);\r\n                }\r\n            }\r\n\r\n            var captionString = string.Format(\"msgs_ack {0}\", transportMessage.MessageId);\r\n            SendPacketAsync(_activeTransport, captionString, encryptedMessage,\r\n                result =>\r\n                {\r\n                    //Debug.WriteLine(\"@msgs_ack {0} result {1}\", transportMessage.MessageId, result);\r\n                },\r\n                error =>\r\n                {\r\n                    //Debug.WriteLine(\"<<msgs_ack failed \" + transportMessage.MessageId);\r\n                });\r\n        }\r\n\r\n\r\n        public void PingAsync(TLLong pingId, Action<TLPong> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLPing { PingId = pingId };\r\n\r\n            SendNonInformativeMessage<TLPong>(\"ping\", obj,\r\n                result =>\r\n                {\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void PingDelayDisconnectAsync(TLLong pingId, TLInt disconnectDelay, Action<TLPong> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLPingDelayDisconnect { PingId = pingId, DisconnectDelay = disconnectDelay };\r\n\r\n            SendNonInformativeMessage<TLPong>(\"ping_delay_disconnect\", obj,\r\n                result =>\r\n                {\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void HttpWaitAsync(TLInt maxDelay, TLInt waitAfter, TLInt maxWait, Action callback, Action faultCallback)\r\n        {\r\n            PrintCaption(\"http_wait\");\r\n\r\n            var obj = new TLHttpWait { MaxDelay = maxDelay, WaitAfter = waitAfter, MaxWait = maxWait };\r\n\r\n            var authKey = _activeTransport.AuthKey;\r\n            var salt = _activeTransport.Salt;\r\n            var sessionId = _activeTransport.SessionId;\r\n\r\n            int sequenceNumber;\r\n            TLLong messageId;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                sequenceNumber = _activeTransport.SequenceNumber * 2;\r\n                messageId = _activeTransport.GenerateMessageId(true);\r\n            }\r\n            var transportMessage = CreateTLTransportMessage(salt, sessionId, new TLInt(sequenceNumber), messageId, obj);\r\n            var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n            lock (_activeTransportRoot)\r\n            {\r\n                if (_activeTransport.Closed)\r\n                {\r\n                    _activeTransport = GetTransport(_activeTransport.Host, _activeTransport.Port, Type,\r\n                        new TransportSettings\r\n                        {\r\n                            DcId = _activeTransport.DCId,\r\n                            Secret = _activeTransport.Secret,\r\n                            AuthKey = _activeTransport.AuthKey,\r\n                            Salt = _activeTransport.Salt,\r\n                            SessionId = _activeTransport.SessionId,\r\n                            MessageIdDict = _activeTransport.MessageIdDict,\r\n                            SequenceNumber = _activeTransport.SequenceNumber,\r\n                            ClientTicksDelta = _activeTransport.ClientTicksDelta,\r\n                            PacketReceivedHandler = OnPacketReceived\r\n                        });\r\n                }\r\n            }\r\n\r\n            SendPacketAsync(_activeTransport, \"http_wait \" + transportMessage.MessageId, encryptedMessage,\r\n                result =>\r\n                {\r\n                    //try\r\n                    //{\r\n                    //    ReceiveBytesAsync(result, authKey);\r\n                    //}\r\n                    //catch (Exception e)\r\n                    //{\r\n                    //    TLUtils.WriteException(e);\r\n                    //}\r\n                    //finally\r\n                    //{\r\n                    //    callback();\r\n                    //}\r\n                },\r\n                error => faultCallback.SafeInvoke());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Updates.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Help;\r\nusing Telegram.Api.TL.Functions.Updates;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n\tpublic partial class MTProtoService\r\n\t{\r\n        public void GetStateAsync(Action<TLState> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetState();\r\n\r\n            SendInformativeMessage(\"updates.getState\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetStateWithoutUpdatesAsync(Action<TLState> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLInvokeWithoutUpdates {Object = new TLGetState()};\r\n\r\n            SendInformativeMessage(\"updates.getState\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetDifferenceAsync(TLInt pts, TLInt date, TLInt qts, Action<TLDifferenceBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetDifference { Flags = new TLInt(0), Pts = pts, Date = date, Qts = qts };\r\n\r\n            SendInformativeMessage(\"updates.getDifference\", obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetDifferenceWithoutUpdatesAsync(TLInt pts, TLInt date, TLInt qts, Action<TLDifferenceBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetDifference { Flags = new TLInt(0), Pts = pts, Date = date, Qts = qts };\r\n\r\n            SendInformativeMessage(\"updates.getDifference\", new TLInvokeWithoutUpdates{Object = obj}, callback, faultCallback);\r\n        }\r\n\t}\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Upload.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Upload;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n\tpublic partial class MTProtoService\r\n\t{\r\n        public void SaveFilePartAsync(TLLong fileId, TLInt filePart, TLString bytes, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var filePartValue = filePart.Value;\r\n            var bytesLength = bytes.Data.Length;\r\n\r\n            var obj = new TLSaveFilePart{ FileId = fileId, FilePart = filePart, Bytes = bytes };\r\n\r\n            SendInformativeMessage(\"upload.saveFilePart\" + \" \" + filePart.Value, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void SaveBigFilePartAsync(TLLong fileId, TLInt filePart, TLInt fileTotalParts, TLString bytes, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSaveBigFilePart { FileId = fileId, FilePart = filePart, FileTotalParts = fileTotalParts, Bytes = bytes };\r\n            Debug.WriteLine(string.Format(\"upload.saveBigFilePart file_id={0} file_part={1} file_total_parts={2} bytes={3}\", fileId, filePart, fileTotalParts, bytes.Data.Length));\r\n            SendInformativeMessage(\"upload.saveBigFilePart \" + filePart + \" \" + fileTotalParts, obj, callback, faultCallback);\r\n        }\r\n\r\n        public void GetFileAsync(TLInputFileLocationBase location, TLInt offset, TLInt limit, Action<TLFileBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetFile { Location = location, Offset = offset, Limit = limit };\r\n\r\n            SendInformativeMessage(\"upload.getFile\", obj, callback, faultCallback);\r\n        }\r\n\t}\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.Users.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Users;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n\tpublic partial class MTProtoService\r\n\t{\r\n        public void GetUsersAsync(TLVector<TLInputUserBase> id, Action<TLVector<TLUserBase>> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetUsers { Id = id };\r\n\r\n            SendInformativeMessage<TLVector<TLUserBase>>(\"users.getUsers\", obj, result =>\r\n            {\r\n                _cacheService.SyncUsers(result, callback);\r\n            }, \r\n            faultCallback);\r\n        }\r\n\r\n        public void GetFullUserAsync(TLInputUserBase id, Action<TLUserFull> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLGetFullUser { Id = id };\r\n\r\n            SendInformativeMessage<TLUserFull>(\"users.getFullUser\", obj, userFull => _cacheService.SyncUser(userFull, callback.SafeInvoke), faultCallback);\r\n        }\r\n\r\n        public void SetSecureValueErrorsAsync(TLInputUserBase id, TLVector<TLSecureValueErrorBase> errors, Action<TLBool> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            var obj = new TLSetSecureValueErrors { Id = id, Errors = errors };\r\n\r\n            SendInformativeMessage(\"users.setSecureValueErrors\", obj, callback, faultCallback);\r\n        }\r\n\t}\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/MTProtoService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define MTPROTO\r\n//#define DEBUG_UPDATEDCOPTIONS\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Reactive.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing Org.BouncyCastle.Bcpg;\r\nusing Telegram.Api.Services.DeviceInfo;\r\nusing Telegram.Api.TL.Functions.Channels;\r\nusing Telegram.Api.TL.Functions.Messages;\r\n#if WIN_RT\r\nusing Windows.UI.Xaml;\r\n#elif WINDOWS_PHONE\r\nusing System.Windows.Threading;\r\nusing Microsoft.Devices;\r\n#endif\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Connection;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Auth;\r\nusing Telegram.Api.TL.Functions.Upload;\r\nusing Telegram.Api.Transport;\r\nusing Telegram.Logs;\r\nusing Environment = System.Environment;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    public class CountryEventArgs : EventArgs\r\n    {\r\n        public string Country { get; set; }\r\n    }\r\n\r\n    public partial class MTProtoService : ServiceBase, IMTProtoService, IDisposable\r\n    {\r\n        public event EventHandler ProxyDisabled;\r\n\r\n        protected void RaiseProxyDisabled()\r\n        {\r\n            var handler = ProxyDisabled;\r\n            if (handler != null)\r\n            {\r\n                handler(this, EventArgs.Empty);\r\n            }\r\n        }\r\n\r\n        public event EventHandler<CountryEventArgs> GotUserCountry;\r\n\r\n        protected void RaiseGotUserCountry(string country)\r\n        {\r\n            var handler = GotUserCountry;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new CountryEventArgs { Country = country });\r\n            }\r\n        }\r\n\r\n        public void SetInitState()\r\n        {\r\n            _updatesService.SetInitState();\r\n        }\r\n\r\n        public ITransport GetActiveTransport()\r\n        {\r\n            return _activeTransport;\r\n        }\r\n\r\n        public WindowsPhone.Tuple<int, int, int> GetCurrentPacketInfo()\r\n        {\r\n            return _activeTransport != null ? _activeTransport.GetCurrentPacketInfo() : null;\r\n        }\r\n\r\n        public string GetTransportInfo()\r\n        {\r\n            return _activeTransport != null ? _activeTransport.GetTransportInfo() : null;\r\n        }\r\n\r\n        public string Country\r\n        {\r\n            get { return _config != null ? _config.Country : null; }\r\n        }\r\n\r\n        private TLInt _currentUserId;\r\n\r\n        public TLInt CurrentUserId\r\n        {\r\n            get\r\n            {\r\n                return _currentUserId;\r\n            }\r\n            set\r\n            {\r\n                _currentUserId = value;\r\n\r\n            }\r\n        }\r\n\r\n        public long ClientTicksDelta { get { return _activeTransport.ClientTicksDelta; } }\r\n\r\n        //private bool _isInitialized;\r\n\r\n        /// <summary>\r\n        /// Получен ли ключ авторизации\r\n        /// </summary>\r\n        //public bool IsInitialized\r\n        //{\r\n        //    get { return _isInitialized; }\r\n        //    protected set\r\n        //    {\r\n        //        if (_isInitialized != value)\r\n        //        {\r\n        //            _isInitialized = value;\r\n        //            NotifyOfPropertyChange(() => IsInitialized);\r\n        //        }\r\n        //    }\r\n        //}\r\n\r\n        public event EventHandler Initialized;\r\n\r\n        protected virtual void RaiseInitialized()\r\n        {\r\n            var handler = Initialized;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler InitializationFailed;\r\n\r\n        protected virtual void RaiseInitializationFailed()\r\n        {\r\n            var handler = InitializationFailed;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        private readonly object _fileTransportRoot = new object();\r\n\r\n        private readonly object _activeTransportRoot = new object();\r\n\r\n        private ITransport _activeTransport;\r\n\r\n        private readonly ITransportService _transportService;\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        private readonly IUpdatesService _updatesService;\r\n\r\n        private readonly IConnectionService _connectionService;\r\n\r\n        private readonly IDeviceInfoService _deviceInfo;\r\n\r\n        private readonly Dictionary<long, HistoryItem> _history = new Dictionary<long, HistoryItem>();\r\n\r\n#if DEBUG\r\n        private readonly Dictionary<long, HistoryItem> _removedHistory = new Dictionary<long, HistoryItem>();\r\n#endif\r\n\r\n        public IList<HistoryItem> History\r\n        {\r\n            get { return _history.Values.ToList(); }\r\n        }\r\n\r\n        private TransportType _type = TransportType.Tcp;\r\n\r\n        public TransportType Type\r\n        {\r\n            get { return _type; }\r\n            set { _type = value; }\r\n        }\r\n\r\n        private readonly object _delayedItemsRoot = new object();\r\n\r\n        private readonly List<DelayedItem> _delayedItems = new List<DelayedItem>();\r\n\r\n        private Timer _timeoutsTimer;\r\n\r\n        private Timer _deviceLockedTimer;\r\n\r\n        private Timer _checkTransportTimer;\r\n\r\n        public MTProtoService(IDeviceInfoService deviceInfo, IUpdatesService updatesService, ICacheService cacheService, ITransportService transportService, IConnectionService connectionService, IPublicConfigService publicConfigService)\r\n        {\r\n            var isBackground = deviceInfo != null && deviceInfo.IsBackground;\r\n\r\n            _deviceInfo = deviceInfo;\r\n\r\n            _sendingTimer = new Timer(CheckSendingMessages, this, Timeout.Infinite, Timeout.Infinite);\r\n            _getConfigTimer = new Timer(CheckGetConfig, this, TimeSpan.FromSeconds(10.0), TimeSpan.FromSeconds(Constants.CheckGetConfigInterval));\r\n            _timeoutsTimer = new Timer(CheckTimeouts, this, TimeSpan.FromSeconds(10.0), TimeSpan.FromSeconds(10.0));\r\n            _deviceLockedTimer = new Timer(CheckDeviceLockedInternal, this, TimeSpan.FromSeconds(60.0), TimeSpan.FromSeconds(60.0));\r\n\r\n            _publicConfigService = publicConfigService;\r\n\r\n            _connectionService = connectionService;\r\n            _connectionService.Initialize(this);\r\n            _connectionService.ConnectionLost += OnConnectionLost;\r\n\r\n            var sendStatusEvents = Observable.FromEventPattern<EventHandler<SendStatusEventArgs>, SendStatusEventArgs>(\r\n                keh => { SendStatus += keh; },\r\n                keh => { SendStatus -= keh; });\r\n\r\n            _statusSubscription = sendStatusEvents\r\n                .Throttle(TimeSpan.FromSeconds(Constants.UpdateStatusInterval))\r\n                .Subscribe(e => UpdateStatusAsync(e.EventArgs.Offline, result => { }));\r\n\r\n            _updatesService = updatesService;\r\n            _updatesService.DCOptionsUpdated += OnDCOptionsUpdated;\r\n\r\n            _cacheService = cacheService;\r\n\r\n            if (_updatesService != null)\r\n            {\r\n                _updatesService.GetDifferenceAsync = GetDifferenceAsync;\r\n                _updatesService.GetStateAsync = GetStateAsync;\r\n                _updatesService.GetCurrentUserId = GetCurrentUserId;\r\n                _updatesService.GetDHConfigAsync = GetDHConfigAsync;\r\n                _updatesService.AcceptEncryptionAsync = AcceptEncryptionAsync;\r\n                _updatesService.SendEncryptedServiceAsync = SendEncryptedServiceAsync;\r\n                _updatesService.SetMessageOnTimeAsync = SetMessageOnTime;\r\n                _updatesService.RemoveFromQueue = RemoveFromQueue;\r\n                _updatesService.UpdateChannelAsync = UpdateChannelAsync;\r\n                _updatesService.GetFullChatAsync = GetFullChatAsync;\r\n                _updatesService.GetFullUserAsync = GetFullUserAsync;\r\n                _updatesService.GetChannelMessagesAsync = GetMessagesAsync;\r\n                _updatesService.GetPinnedDialogsAsync = GetPinnedDialogsAsync;\r\n                _updatesService.GetMessagesAsync = GetMessagesAsync;\r\n                _updatesService.GetPeerDialogsAsync = GetPeerDialogsAsync;\r\n                _updatesService.GetPromoDialogAsync = GetPromoDialogAsync;\r\n            }\r\n\r\n            _transportService = transportService;\r\n            _transportService.ConnectionLost += OnConnectionLost;\r\n            _transportService.FileConnectionLost += OnFileConnectionLost;\r\n            _transportService.SpecialConnectionLost += OnSpecialConnectionLost;\r\n            _transportService.CheckConfig += OnCheckConfig;\r\n\r\n            _activeTransport = GetTransport(Constants.FirstServerIpAddress, Constants.FirstServerPort, Type,\r\n                new TransportSettings\r\n                {\r\n                    DcId = _activeTransport != null ? _activeTransport.DCId : Constants.FirstServerDCId,\r\n                    Secret = _activeTransport != null ? _activeTransport.Secret : null,\r\n                    AuthKey = _activeTransport != null ? _activeTransport.AuthKey : null,\r\n                    Salt = _activeTransport != null ? _activeTransport.Salt : null,\r\n                    SessionId = _activeTransport != null ? _activeTransport.SessionId : null,\r\n                    MessageIdDict = _activeTransport != null ? _activeTransport.MessageIdDict : new Dictionary<long, long>(),\r\n                    SequenceNumber = _activeTransport != null ? _activeTransport.SequenceNumber : 0,\r\n                    ClientTicksDelta = _activeTransport != null ? _activeTransport.ClientTicksDelta : 0,\r\n                    PacketReceivedHandler = OnPacketReceived\r\n                });\r\n\r\n#if DEBUG\r\n            _checkTransportTimer = new Timer(CheckTransport, this, TimeSpan.FromSeconds(1.0), Timeout.InfiniteTimeSpan);\r\n#endif\r\n\r\n            Initialized += OnServiceInitialized;\r\n            InitializationFailed += OnServiceInitializationFailed;\r\n\r\n            //IsInitialized = true;\r\n            if (!isBackground)\r\n            {\r\n                //Initialize();\r\n            }\r\n\r\n            Instance = this;\r\n        }\r\n\r\n        public event EventHandler<TransportCheckedEventArgs> TransportChecked;\r\n\r\n        protected virtual void RaiseTransportChecked(TransportCheckedEventArgs e)\r\n        {\r\n            var handler = TransportChecked;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void CheckTransport(object state)\r\n        {\r\n            //return;\r\n            ITransport transport = null;\r\n\r\n            lock (_activeTransportRoot)\r\n            {\r\n                transport = _activeTransport;\r\n            }\r\n            var transportId = transport.Id;\r\n            var sessionId = transport.SessionId;\r\n            var authKey = transport.AuthKey;\r\n            var lastReceiveTime = transport.LastReceiveTime;\r\n            int historyCount;\r\n            string historyDescription;\r\n            lock (_historyRoot)\r\n            {\r\n                historyCount = _history.Count;\r\n                historyDescription = string.Join(\"\\n\", _history.Values.Select(x => x.Caption + \" \" + x.Hash));\r\n            }\r\n            var currentPacketLength = transport.PacketLength;\r\n            var lastPacketLength = transport.LastPacketLength;\r\n\r\n            RaiseTransportChecked(new TransportCheckedEventArgs\r\n            {\r\n                TransportId = transportId,\r\n                SessionId = sessionId,\r\n                AuthKey = authKey,\r\n                LastReceiveTime = lastReceiveTime,\r\n                HistoryCount = historyCount,\r\n                HistoryDescription = historyDescription,\r\n                NextPacketLength = currentPacketLength,\r\n                LastPacketLength = lastPacketLength\r\n            });\r\n\r\n            _checkTransportTimer.Change(TimeSpan.FromSeconds(1.0), Timeout.InfiniteTimeSpan);\r\n        }\r\n\r\n        public static IMTProtoService Instance { get; protected set; }\r\n\r\n        private void CheckTimeouts(object state)\r\n        {\r\n#if DEBUG\r\n            if (Debugger.IsAttached)\r\n            {\r\n                return;\r\n            }\r\n#endif\r\n\r\n            const double timeout = Constants.TimeoutInterval;\r\n            const double delayedTimeout = Constants.DelayedTimeoutInterval;\r\n            const double nonEncryptedTimeout = Constants.NonEncryptedTimeoutInterval;\r\n\r\n            var timedOutKeys = new List<long>();\r\n            var timedOutValues = new List<HistoryItem>();\r\n            var now = DateTime.Now;\r\n\r\n            // history\r\n            lock (_historyRoot)\r\n            {\r\n                foreach (var historyKeyValue in _history)\r\n                {\r\n                    var historyValue = historyKeyValue.Value;\r\n                    if (historyValue.SendTime != default(DateTime)\r\n                        && historyValue.SendTime.AddSeconds(timeout) < now)\r\n                    {\r\n                        timedOutKeys.Add(historyKeyValue.Key);\r\n                        timedOutValues.Add(historyKeyValue.Value);\r\n                    }\r\n                }\r\n\r\n                foreach (var key in timedOutKeys)\r\n                {\r\n                    _history.Remove(key);\r\n                }\r\n            }\r\n\r\n            if (timedOutValues.Count > 0)\r\n            {\r\n                Execute.BeginOnThreadPool(() =>\r\n                {\r\n                    foreach (var item in timedOutValues)\r\n                    {\r\n                        try\r\n                        {\r\n                            item.FaultCallback.SafeInvoke(\r\n                                new TLRPCError\r\n                                {\r\n                                    Code = new TLInt((int)ErrorCode.TIMEOUT),\r\n                                    Message = new TLString(\"MTProtoService: operation timed out (\" + timeout + \"s)\")\r\n                                });\r\n#if DEBUG\r\n                            TLUtils.WriteLine(item.Caption + \" time out\", LogSeverity.Error);\r\n#endif\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            TLUtils.WriteException(\"Timeout exception\", ex);\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n\r\n            // delayed history\r\n            var timedOutItems = new List<DelayedItem>();\r\n            lock (_delayedItemsRoot)\r\n            {\r\n                foreach (var item in _delayedItems)\r\n                {\r\n                    if (item.SendTime != default(DateTime)\r\n                        && item.SendTime.AddSeconds(delayedTimeout) < now)\r\n                    {\r\n                        timedOutItems.Add(item);\r\n                    }\r\n                }\r\n\r\n                foreach (var item in timedOutItems)\r\n                {\r\n                    _delayedItems.Remove(item);\r\n                }\r\n            }\r\n\r\n            if (timedOutItems.Count > 0)\r\n            {\r\n                Execute.BeginOnThreadPool(() =>\r\n                {\r\n                    foreach (var item in timedOutItems)\r\n                    {\r\n                        try\r\n                        {\r\n                            item.FaultCallback.SafeInvoke(\r\n                                new TLRPCError\r\n                                {\r\n                                    Code = new TLInt((int)ErrorCode.TIMEOUT),\r\n                                    Message = new TLString(\"MTProtoService: operation timed out (\" + delayedTimeout + \"s)\")\r\n                                });\r\n#if DEBUG\r\n                            TLUtils.WriteLine(item.Caption + \" time out\", LogSeverity.Error);\r\n#endif\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            TLUtils.WriteException(\"Timeout exception\", ex);\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n\r\n            // generating key\r\n            if (_activeTransport != null)\r\n            {\r\n                var requests = _activeTransport.RemoveTimeOutRequests(nonEncryptedTimeout);\r\n\r\n                if (requests.Count > 0)\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\"MTProtoService.CheckTimeouts clear history and replace transport\");\r\n#endif\r\n                    ClearHistory(\"CheckTimeouts\", false);\r\n\r\n                    Execute.BeginOnThreadPool(() =>\r\n                    {\r\n                        foreach (var item in requests)\r\n                        {\r\n                            try\r\n                            {\r\n                                item.FaultCallback.SafeInvoke(\r\n                                    new TLRPCError\r\n                                    {\r\n                                        Code = new TLInt((int)ErrorCode.TIMEOUT),\r\n                                        Message = new TLString(\"MTProtoService: operation timed out (\" + timeout + \"s)\")\r\n                                    });\r\n#if DEBUG\r\n                                TLUtils.WriteLine(item.Caption + \" time out\", LogSeverity.Error);\r\n#endif\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                TLUtils.WriteException(\"Timeout exception\", ex);\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnConnectionLost(object sender, EventArgs e)\r\n        {\r\n            ResetConnection(null);\r\n        }\r\n\r\n        private void OnFileConnectionLost(object sender, EventArgs e)\r\n        {\r\n            ResetConnection(null);\r\n        }\r\n\r\n        private void OnSpecialConnectionLost(object sender, TransportEventArgs e)\r\n        {\r\n            var transport = e.Transport;\r\n            if (transport != null)\r\n            {\r\n                var str = string.Format(\"Connection lost id={0} dc_id={1} ip={2} port={3}\", transport.Id, transport.DCId, transport.Host, transport.Port);\r\n                LogPublicConfig(str);\r\n                Execute.ShowDebugMessage(str);\r\n            }\r\n        }\r\n\r\n        public void GetConfigInformationAsync(Action<string> callback)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var now = DateTime.Now;\r\n                var currentTime = TLUtils.DateToUniversalTimeTLInt(ClientTicksDelta, now);\r\n\r\n                var activeTransportString = _activeTransport != null ? _activeTransport.ToString() : null;\r\n\r\n                var sb = new StringBuilder();\r\n                sb.AppendLine(\"current_time utc0:\");\r\n                sb.AppendLine(string.Format(\"{0} {1}\", currentTime, TLUtils.ToDateTime(currentTime).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n                sb.AppendLine(\"config:\");\r\n                sb.AppendLine(_config.ToString());\r\n                sb.AppendLine(\"active transport:\");\r\n                sb.AppendLine(activeTransportString);\r\n                sb.AppendLine(\"dc_options:\");\r\n                foreach (var option in _config.DCOptions)\r\n                {\r\n                    sb.AppendLine(option.ToString());\r\n                }\r\n\r\n                callback(sb.ToString());\r\n            });\r\n        }\r\n\r\n        public void GetTransportInformationAsync(Action<string> callback)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var activeTransportString = _activeTransport != null ? _activeTransport.ToString() : null;\r\n\r\n                var sb = new StringBuilder();\r\n                sb.AppendLine(\"active transport:\");\r\n                sb.AppendLine(activeTransportString);\r\n                sb.AppendLine(\"Date: \" + TLUtils.ToDateTime(_config.Date));\r\n                callback(sb.ToString());\r\n            });\r\n        }\r\n\r\n        public void UpdateTransportInfoAsync(TLDCOption78 dcOption, TLString ipAddress, TLInt port, Action<bool> callback)\r\n        {\r\n            var args = new DCOptionsUpdatedEventArgs\r\n            {\r\n                Update = new TLUpdateDCOptions { DCOptions = new TLVector<TLDCOption> { dcOption } }\r\n            };\r\n\r\n            OnDCOptionsUpdated(this, args);\r\n\r\n            ClearHistory(\"UpdateTransportInfoAsync\", false);\r\n\r\n            // continue listening on fault\r\n            _activeTransport = GetTransport(ipAddress.ToString(), port.Value, Type,\r\n                new TransportSettings\r\n                {\r\n                    DcId = dcOption.Id.Value,\r\n                    Secret = TLUtils.ParseSecret(dcOption),\r\n                    AuthKey = _activeTransport != null ? _activeTransport.AuthKey : null,\r\n                    Salt = _activeTransport != null ? _activeTransport.Salt : null,\r\n                    SessionId = _activeTransport != null ? _activeTransport.SessionId : null,\r\n                    MessageIdDict = _activeTransport != null ? _activeTransport.MessageIdDict : new Dictionary<long, long>(),\r\n                    SequenceNumber = _activeTransport != null ? _activeTransport.SequenceNumber : 0,\r\n                    ClientTicksDelta = _activeTransport != null ? _activeTransport.ClientTicksDelta : 0,\r\n                    PacketReceivedHandler = OnPacketReceived\r\n                });\r\n\r\n            callback.SafeInvoke(true);\r\n        }\r\n\r\n\r\n        private void OnDCOptionsUpdated(object sender, DCOptionsUpdatedEventArgs e)\r\n        {\r\n            var newOptions = e.Update.DCOptions;\r\n\r\n            var dcOptionsInfo = new StringBuilder();\r\n            dcOptionsInfo.AppendLine(\"TLUpdateDCOptions\");\r\n            foreach (var option in newOptions)\r\n            {\r\n                dcOptionsInfo.AppendLine(string.Format(\"DCId={0} {1}:{2}\", option.Id, option.IpAddress, option.Port));\r\n            }\r\n            Execute.ShowDebugMessage(dcOptionsInfo.ToString());\r\n\r\n            if (_config != null && _config.DCOptions != null)\r\n            {\r\n                var activeDCId = _config.DCOptions[_config.ActiveDCOptionIndex].Id.Value;\r\n\r\n                foreach (var newOption in newOptions)\r\n                {\r\n                    var updated = false;\r\n                    // 1) update ip address, port, hostname\r\n                    foreach (var oldOption in _config.DCOptions)\r\n                    {\r\n                        if (newOption.Id.Value == oldOption.Id.Value\r\n                            && newOption.IPv6.Value == oldOption.IPv6.Value\r\n                            && newOption.Media.Value == oldOption.Media.Value\r\n                            && newOption.TCPO.Value == oldOption.TCPO.Value\r\n                            && newOption.Static.Value == oldOption.Static.Value)\r\n                        {\r\n                            // keep AuthKey, SessionId and Salt\r\n                            var oldOption78 = oldOption as TLDCOption78;\r\n                            var newOption78 = newOption as TLDCOption78;\r\n                            if (oldOption78 != null\r\n                                && newOption78 != null)\r\n                            {\r\n                                if (oldOption78.Secret != null && newOption78.Secret != null\r\n                                    || oldOption78.Secret == null && newOption78.Secret == null)\r\n                                {\r\n                                    oldOption.Hostname = newOption.Hostname;\r\n                                    oldOption.IpAddress = newOption.IpAddress;\r\n                                    oldOption.Port = newOption.Port;\r\n                                    oldOption78.Secret = newOption78.Secret;\r\n                                    updated = true;\r\n\r\n                                    if (!newOption.Media.Value && activeDCId == newOption78.Id.Value)\r\n                                    {\r\n                                        _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(oldOption);\r\n                                    }\r\n                                    break;\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                oldOption.Hostname = newOption.Hostname;\r\n                                oldOption.IpAddress = newOption.IpAddress;\r\n                                oldOption.Port = newOption.Port;\r\n                                updated = true;\r\n\r\n                                if (!newOption.Media.Value && activeDCId == newOption.Id.Value)\r\n                                {\r\n                                    _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(oldOption);\r\n                                }\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    // 2) append new DCOption\r\n                    if (!updated)\r\n                    {\r\n                        // fix readonly array of dcOption\r\n                        var list = _config.DCOptions.ToList();\r\n                        list.Add(newOption);\r\n                        _config.DCOptions.Items = list;\r\n\r\n                        if (!newOption.Media.Value && activeDCId == newOption.Id.Value)\r\n                        {\r\n                            _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(newOption);\r\n                        }\r\n                    }\r\n                }\r\n                SaveConfig();\r\n            }\r\n        }\r\n\r\n        private TLInt GetCurrentUserId()\r\n        {\r\n            return CurrentUserId;\r\n        }\r\n\r\n        private void OnPacketReceived(object sender, DataEventArgs e)\r\n        {\r\n            var transport = (ITransport)sender;\r\n#if DEBUG\r\n            bool byActiveTransport;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                byActiveTransport = transport == _activeTransport;\r\n            }\r\n            if (byActiveTransport)\r\n            {\r\n                var transportId = transport.Id;\r\n                var sessionId = transport.SessionId;\r\n                var authKey = transport.AuthKey;\r\n                int historyCount;\r\n                string historyDescription;\r\n                lock (_historyRoot)\r\n                {\r\n                    historyCount = _history.Count;\r\n                    historyDescription = string.Join(\"\\n\", _history.Values.Select(x => x.Caption + \" \" + x.Hash));\r\n                }\r\n\r\n                RaiseTransportChecked(new TransportCheckedEventArgs\r\n                {\r\n                    HistoryCount = historyCount,\r\n                    HistoryDescription = historyDescription,\r\n\r\n                    TransportId = transportId,\r\n                    SessionId = sessionId,\r\n                    AuthKey = authKey,\r\n                    LastReceiveTime = e.LastReceiveTime,\r\n                    NextPacketLength = e.NextPacketLength,\r\n                    LastPacketLength = e.Data.Length\r\n                });\r\n            }\r\n#endif\r\n\r\n            var position = 0;\r\n            var handled = false;\r\n\r\n            if (transport.AuthKey == null)\r\n            {\r\n                try\r\n                {\r\n\r\n                    var message = TLObject.GetObject<TLNonEncryptedMessage>(e.Data, ref position);\r\n                    var historyItem = transport.DequeueFirstNonEncryptedItem();\r\n                    if (historyItem != null)\r\n                    {\r\n#if LOG_REGISTRATION\r\n                        TLUtils.WriteLog(\r\n                            string.Format(\"OnReceivedBytes by {0} AuthKey==null: invoke historyItem {1} with result {2} (data length={3})\",\r\n                                transport.Id, historyItem.Caption, message.Data.GetType(), e.Data.Length));\r\n#endif\r\n                        historyItem.Callback.SafeInvoke(message.Data);\r\n                    }\r\n                    else\r\n                    {\r\n#if LOG_REGISTRATION\r\n                        TLUtils.WriteLog(\r\n                            string.Format(\"OnReceivedBytes by {0} AuthKey==null: cannot find historyItem {1} with result {2} (data length={3})\",\r\n                                transport.Id, string.Empty, message.Data.GetType(), e.Data.Length));\r\n#endif\r\n                    }\r\n\r\n                    handled = true;\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n#if LOG_REGISTRATION\r\n\r\n                    TLUtils.WriteLog(\r\n                            string.Format(\"OnReceivedBytes by {0} AuthKey==null exception: cannot parse TLNonEncryptedMessage with History\\n {1} \\nand exception\\n{2} (data length={3})\",\r\n                                transport.Id, transport.PrintNonEncryptedHistory(), ex, e.Data.Length));\r\n#endif\r\n                }\r\n\r\n                if (!handled)\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\r\n                            string.Format(\"OnReceivedBytes by {0} AuthKey==null !handled: invoke ReceiveBytesAsync with data length {1}\",\r\n                                transport.Id, e.Data.Length));\r\n#endif\r\n                    ReceiveBytesAsync(transport, e.Data);\r\n                }\r\n            }\r\n            else\r\n            {\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(\r\n                            string.Format(\"OnReceivedBytes by {0} AuthKey!=null: invoke ReceiveBytesAsync with data length {1}\",\r\n                                transport.Id, e.Data.Length));\r\n#endif\r\n                ReceiveBytesAsync(transport, e.Data);\r\n            }\r\n        }\r\n\r\n        private void OnServiceInitializationFailed(object sender, EventArgs e)\r\n        {\r\n            Execute.BeginOnThreadPool(TimeSpan.FromSeconds(1.0), () =>\r\n            {\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(\"Service initialization failed\");\r\n#endif\r\n                CancelDelayedItemsAsync();\r\n\r\n                // если генерация ключа прошла успешно, но предыдущая попытка завершилась неудачно на методах help.getNearestDc, help.getConfig\r\n                // обнуляем ключ, т.к. в противном случае resPQ будем пытаться расшифровать ключем\r\n\r\n                lock (_activeTransportRoot)\r\n                {\r\n                    _activeTransport.AuthKey = null;\r\n                }\r\n\r\n                Initialize();\r\n            });\r\n        }\r\n\r\n        private void CancelDelayedItemsAsync(bool force = false)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(\"Cancel delayed items\");\r\n#endif\r\n                lock (_delayedItemsRoot)\r\n                {\r\n                    var canceledItems = new List<DelayedItem>();\r\n                    foreach (var item in _delayedItems)\r\n                    {\r\n                        if (force\r\n                            || (item.MaxAttempt.HasValue\r\n                                && item.MaxAttempt <= item.CurrentAttempt))\r\n                        {\r\n                            item.AttemptFailed.SafeInvoke(item.CurrentAttempt);\r\n                            canceledItems.Add(item);\r\n                        }\r\n                        item.CurrentAttempt++;\r\n                    }\r\n\r\n                    foreach (var canceledItem in canceledItems)\r\n                    {\r\n#if LOG_REGISTRATION\r\n                        TLUtils.WriteLog(\"Cancel delayed item\\n \" + canceledItem);\r\n#endif\r\n                        _delayedItems.Remove(canceledItem);\r\n\r\n                        if (canceledItem.FaultCallback != null)\r\n                        {\r\n                            canceledItem.FaultCallback(new TLRPCError { Code = new TLInt(404) });\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private void OnServiceInitialized(object sender, EventArgs e)\r\n        {\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"Service initialized\");\r\n#endif\r\n            if (Constants.IsLongPollEnabled)\r\n            {\r\n                StartLongPoll();\r\n            }\r\n\r\n            SendDelayedItemsAsync();\r\n        }\r\n\r\n        private void SendDelayedItemsAsync()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(\"Send delayed items (count=\" + _delayedItems.Count + \")\");\r\n#endif\r\n                lock (_delayedItemsRoot)\r\n                {\r\n                    if (_delayedItems.Count > 0)\r\n                    {\r\n                        foreach (var item in _delayedItems)\r\n                        {\r\n#if LOG_REGISTRATION\r\n                            TLUtils.WriteLog(\"Dequeue and send delayed item \\n\" + item);\r\n#endif\r\n                            SendInformativeMessage(item.Caption, item.Object, item.Callback, item.FaultCallback, item.MaxAttempt, item.AttemptFailed);\r\n                        }\r\n\r\n                        _delayedItems.Clear();\r\n                    }\r\n                }\r\n\r\n                lock (_delayedNonInformativeItemsRoot)\r\n                {\r\n                    if (_delayedNonInformativeItems.Count > 0)\r\n                    {\r\n                        foreach (var item in _delayedNonInformativeItems)\r\n                        {\r\n#if LOG_REGISTRATION\r\n                            TLUtils.WriteLog(\"Dequeue and send delayed item \\n\" + item);\r\n#endif\r\n                            SendNonInformativeMessage(item.Caption, item.Object, item.Callback, item.FaultCallback);\r\n                        }\r\n\r\n                        _delayedNonInformativeItems.Clear();\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private bool _initializeInvoked;\r\n\r\n        public void StartInitialize()\r\n        {\r\n            if (_initializeInvoked) return;\r\n\r\n            _initializeInvoked = true;\r\n\r\n            Initialize();\r\n        }\r\n\r\n        public void Initialize()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                try\r\n                {\r\n                    TryReadConfig(\r\n                        result =>\r\n                        {\r\n#if LOG_REGISTRATION\r\n                            TLUtils.WriteLog(\"Read config with result: \" + result);\r\n#endif\r\n                            if (!result)\r\n                            {\r\n#if LOG_REGISTRATION\r\n                                TLUtils.WriteLog(\"TLUtils.LogRegistration=true\");\r\n                                TLUtils.IsLogEnabled = true;\r\n#endif\r\n\r\n                                var host = _activeTransport != null ? _activeTransport.Host : Constants.FirstServerIpAddress;  // !IMPORTANT host can be obtained through publig config\r\n                                var port = _activeTransport != null ? _activeTransport.Port : Constants.FirstServerPort;       // !IMPORTANT port can be obtained through publig config\r\n                                var dcId = _activeTransport != null ? _activeTransport.DCId : Constants.FirstServerDCId;       // !IMPORTANT dcId can be obtained through publig config\r\n                                _activeTransport = GetTransport(host, port, Type,\r\n                                    new TransportSettings\r\n                                    {\r\n                                        DcId = dcId,\r\n                                        Secret = _activeTransport != null ? _activeTransport.Secret : null,\r\n                                        AuthKey = _activeTransport != null ? _activeTransport.AuthKey : null,\r\n                                        Salt = _activeTransport != null ? _activeTransport.Salt : null,\r\n                                        SessionId = _activeTransport != null ? _activeTransport.SessionId : null,\r\n                                        MessageIdDict = _activeTransport != null ? _activeTransport.MessageIdDict : new Dictionary<long, long>(),\r\n                                        SequenceNumber = _activeTransport != null ? _activeTransport.SequenceNumber : 0,\r\n                                        ClientTicksDelta = _activeTransport != null ? _activeTransport.ClientTicksDelta : 0,\r\n                                        PacketReceivedHandler = OnPacketReceived\r\n                                    });\r\n#if LOG_REGISTRATION\r\n                                TLUtils.WriteLog(\"Start generating auth key\");\r\n#endif\r\n                                InitAsync(tuple =>\r\n                                {\r\n#if LOG_REGISTRATION\r\n                                    TLUtils.WriteLog(\"Stop generating auth key\");\r\n                                    TLUtils.WriteLog(\"Start help.getNearestDc\");\r\n#endif\r\n                                    lock (_activeTransportRoot)\r\n                                    {\r\n                                        _activeTransport.DCId = Constants.FirstServerDCId;\r\n                                        _activeTransport.AuthKey = tuple.Item1;\r\n                                        _activeTransport.Salt = tuple.Item2;\r\n                                        _activeTransport.SessionId = tuple.Item3;\r\n                                    }\r\n                                    var authKeyId = TLUtils.GenerateLongAuthKeyId(tuple.Item1);\r\n\r\n                                    lock (_authKeysRoot)\r\n                                    {\r\n                                        if (!_authKeys.ContainsKey(authKeyId))\r\n                                        {\r\n                                            _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = tuple.Item1, AutkKeyId = authKeyId });\r\n                                        }\r\n                                    }\r\n                                    //IsInitialized = true;   // Важно, используется тут, чтобы OnPacketReceived не пытался рассматривать ответ как NonEncryptedMessage\r\n\r\n\r\n                                    var timer = Stopwatch.StartNew();\r\n                                    GetNearestDCAsync(nearestDC =>\r\n                                    {\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop help.getNearestDc\");\r\n                                        TLUtils.WriteLog(\"Start help.getConfig\");\r\n#endif\r\n                                        lock (_activeTransportRoot)\r\n                                        {\r\n                                            _activeTransport.DCId = nearestDC.ThisDC.Value;\r\n                                        }\r\n                                        var elapsed = timer.Elapsed;\r\n                                        var timer2 = Stopwatch.StartNew();\r\n                                        GetConfigAsync(\r\n                                            config =>\r\n                                            {\r\n                                                var elapsed2 = timer2.Elapsed;\r\n                                                var sb = new StringBuilder();\r\n                                                sb.AppendLine(\"help.getNearestDc \" + elapsed.ToString(\"g\"));\r\n                                                sb.AppendLine(\"help.getConfig \" + elapsed2.ToString(\"g\"));\r\n                                                sb.AppendLine(\"auth time \" + _authTimeElapsed.ToString(\"g\"));\r\n                                                Execute.ShowDebugMessage(sb.ToString());\r\n#if LOG_REGISTRATION\r\n                                                TLUtils.WriteLog(\"Stop help.getConfig\");\r\n#endif\r\n                                                config.Country = nearestDC.Country.ToString();\r\n\r\n                                                Execute.BeginOnThreadPool(() => RaiseGotUserCountry(config.Country));\r\n\r\n                                                _config = TLConfig.Merge(_config, config);\r\n                                                var dcOption = TLUtils.GetDCOption(config, new TLInt(_activeTransport.DCId));\r\n\r\n                                                dcOption.AuthKey = _activeTransport.AuthKey;\r\n                                                dcOption.Salt = _activeTransport.Salt;\r\n                                                dcOption.SessionId = _activeTransport.SessionId;\r\n\r\n                                                config.ActiveDCOptionIndex = config.DCOptions.IndexOf(dcOption);\r\n\r\n                                                _cacheService.SetConfig(config);\r\n                                                RaiseInitialized();\r\n                                            },\r\n                                            error => RaiseInitializationFailed());\r\n                                    },\r\n                                        error => RaiseInitializationFailed());\r\n                                },\r\n                                    error => RaiseInitializationFailed());\r\n                            }\r\n                            else\r\n                            {\r\n                                var configQ = _config;\r\n                                var activeDCOPtionIndex = _config.ActiveDCOptionIndex;\r\n\r\n\r\n                                var activeDCOption = configQ.DCOptions[activeDCOPtionIndex];\r\n                                var getConfigRequired = activeDCOption.Id == null;\r\n                                // fix to update from 0.1.2.1 to 0.1.2.4\r\n                                // previously Id is not saved for first DC\r\n                                _activeTransport = GetTransport(activeDCOption.IpAddress.ToString(), activeDCOption.Port.Value, Type,\r\n                                    new TransportSettings\r\n                                    {\r\n                                        DcId = getConfigRequired ? 0 : activeDCOption.Id.Value,\r\n                                        Secret = TLUtils.ParseSecret(activeDCOption),\r\n                                        AuthKey = activeDCOption.AuthKey,\r\n                                        Salt = activeDCOption.Salt,\r\n                                        SessionId = TLLong.Random(),\r\n                                        MessageIdDict = new Dictionary<long, long>(),\r\n                                        SequenceNumber = 0,\r\n                                        ClientTicksDelta = activeDCOption.ClientTicksDelta,\r\n                                        PacketReceivedHandler = OnPacketReceived\r\n                                    });\r\n\r\n                                lock (_activeTransportRoot)\r\n                                {\r\n                                    _activeTransport.DCId = getConfigRequired ? 0 : activeDCOption.Id.Value;\r\n                                    _activeTransport.AuthKey = activeDCOption.AuthKey;\r\n                                    _activeTransport.Salt = activeDCOption.Salt;\r\n                                    _activeTransport.SessionId = TLLong.Random();\r\n                                    _activeTransport.ClientTicksDelta = activeDCOption.ClientTicksDelta;\r\n                                }\r\n\r\n                                //fix for version 0.1.3.12\r\n                                if (activeDCOption.AuthKey == null)\r\n                                {\r\n                                    //clear config and try again \r\n                                    RaiseAuthorizationRequired(new AuthorizationRequiredEventArgs { MethodName = \"Initialize activeDCOption.AuthKey==null\", Error = null, AuthKeyId = 0 });\r\n                                    _config = null;\r\n                                    _cacheService.SetConfig(_config);\r\n\r\n                                    RaiseInitializationFailed();\r\n\r\n                                    return;\r\n                                }\r\n\r\n                                var authKeyId = TLUtils.GenerateLongAuthKeyId(activeDCOption.AuthKey);\r\n                                //Log.Write(\"Use authKey=\" + authKeyId);\r\n                                lock (_authKeysRoot)\r\n                                {\r\n                                    if (!_authKeys.ContainsKey(authKeyId))\r\n                                    {\r\n                                        _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = activeDCOption.AuthKey, AutkKeyId = authKeyId });\r\n                                    }\r\n                                }\r\n\r\n                                if (getConfigRequired)\r\n                                {\r\n                                    var timer = Stopwatch.StartNew();\r\n                                    GetNearestDCAsync(nearestDC =>\r\n                                    {\r\n#if LOG_REGISTRATION\r\n                                        TLUtils.WriteLog(\"Stop help.getNearestDc\");\r\n                                        TLUtils.WriteLog(\"Start help.getConfig\");\r\n#endif\r\n                                        lock (_activeTransportRoot)\r\n                                        {\r\n                                            _activeTransport.DCId = nearestDC.ThisDC.Value;\r\n                                        }\r\n                                        var elapsed = timer.Elapsed;\r\n                                        var timer2 = Stopwatch.StartNew();\r\n                                        GetConfigAsync(\r\n                                            config =>\r\n                                            {\r\n                                                var elapsed2 = timer2.Elapsed;\r\n                                                var sb = new StringBuilder();\r\n                                                sb.AppendLine(\"help.getNearestDc: \" + elapsed);\r\n                                                sb.AppendLine(\"help.getConfig: \" + elapsed2);\r\n\r\n                                                Execute.ShowDebugMessage(sb.ToString());\r\n#if LOG_REGISTRATION\r\n                                                TLUtils.WriteLog(\"Stop help.getConfig\");\r\n#endif\r\n                                                config.Country = nearestDC.Country.ToString();\r\n                                                _config = TLConfig.Merge(_config, config);\r\n                                                var dcOption = TLUtils.GetDCOption(config, new TLInt(_activeTransport.DCId));\r\n\r\n                                                dcOption.AuthKey = _activeTransport.AuthKey;\r\n                                                dcOption.Salt = _activeTransport.Salt;\r\n                                                dcOption.SessionId = _activeTransport.SessionId;\r\n\r\n                                                config.ActiveDCOptionIndex = config.DCOptions.IndexOf(dcOption);\r\n                                                _cacheService.SetConfig(config);\r\n                                                RaiseInitialized();\r\n                                            },\r\n                                            error => RaiseInitializationFailed());\r\n                                    },\r\n                                        error => RaiseInitializationFailed());\r\n                                }\r\n                                else\r\n                                {\r\n                                    RaiseInitialized();\r\n                                }\r\n\r\n                            }\r\n                        });\r\n                }\r\n                catch (Exception e)\r\n                {\r\n                    TLUtils.WriteException(e);\r\n                    RaiseInitializationFailed();\r\n                }\r\n            });\r\n        }\r\n\r\n        private void TryReadConfig(Action<bool> callback)\r\n        {\r\n            _cacheService.GetConfigAsync(\r\n                config =>\r\n                {\r\n                    _config = config;\r\n                    if (_config == null)\r\n                    {\r\n                        callback(false);\r\n                        return;\r\n                    }\r\n\r\n                    callback(true);\r\n                });\r\n        }\r\n\r\n        private void SendAcknowledgments(TLTransportMessage response)\r\n        {\r\n            var ids = new TLVector<TLLong>();\r\n\r\n            if (response.SeqNo.Value % 2 == 1)\r\n            {\r\n                ids.Items.Add(response.MessageId);\r\n            }\r\n            if (response.MessageData is TLContainer)\r\n            {\r\n                var container = (TLContainer)response.MessageData;\r\n                foreach (var message in container.Messages)\r\n                {\r\n                    if (message.SeqNo.Value % 2 == 1)\r\n                    {\r\n                        ids.Items.Add(message.MessageId);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (ids.Items.Count > 0)\r\n            {\r\n                MessageAcknowledgments(ids);\r\n            }\r\n        }\r\n\r\n        private void SendAcknowledgmentsByTransport(ITransport transport, TLTransportMessage response)\r\n        {\r\n            var ids = new TLVector<TLLong>();\r\n\r\n            if (response.SeqNo.Value % 2 == 1)\r\n            {\r\n                ids.Items.Add(response.MessageId);\r\n            }\r\n            if (response.MessageData is TLContainer)\r\n            {\r\n                var container = (TLContainer)response.MessageData;\r\n                foreach (var message in container.Messages)\r\n                {\r\n                    if (message.SeqNo.Value % 2 == 1)\r\n                    {\r\n                        ids.Items.Add(message.MessageId);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (ids.Items.Count > 0)\r\n            {\r\n                MessageAcknowledgmentsByTransport(transport, ids);\r\n            }\r\n        }\r\n\r\n        public event EventHandler<AuthorizationRequiredEventArgs> AuthorizationRequired;\r\n\r\n        public void RaiseAuthorizationRequired(AuthorizationRequiredEventArgs args)\r\n        {\r\n            var handler = AuthorizationRequired;\r\n            if (handler != null)\r\n            {\r\n                handler(this, args);\r\n            }\r\n        }\r\n\r\n        private void ReceiveBytesAsync(ITransport transport, byte[] bytes)\r\n        {\r\n            try\r\n            {\r\n                if (bytes.Length == 4)\r\n                {\r\n                    var error = BitConverter.ToInt32(bytes, 0);\r\n                    if (error == -404 || error == -444)\r\n                    {\r\n                        if (error == -444)\r\n                        {\r\n                            DisableMTProtoProxy();\r\n\r\n                            RaiseProxyDisabled();\r\n                        }\r\n\r\n                        var message = string.Format(\"dc_id={0} error={1}\", transport.DCId, error);\r\n                        TLUtils.WriteException(new Exception(message));\r\n\r\n                        ResetConnection(new Exception(message));\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var position = 0;\r\n                var encryptedMessage = (TLEncryptedTransportMessage)new TLEncryptedTransportMessage().FromBytes(bytes, ref position);\r\n\r\n                byte[] authKey2 = null;\r\n                lock (_authKeysRoot)\r\n                {\r\n                    try\r\n                    {\r\n                        authKey2 = _authKeys[encryptedMessage.AuthKeyId.Value].AuthKey;\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        var error = new StringBuilder();\r\n                        error.AppendLine(\"bytes_length=\" + bytes.Length);\r\n                        error.AppendLine(\"authKey=\" + encryptedMessage.AuthKeyId);\r\n                        error.AppendLine(\"authKeys\");\r\n                        foreach (var authKey in _authKeys)\r\n                        {\r\n                            error.AppendLine(string.Format(\"{0} {1}\", authKey.Key, authKey.Value.AutkKeyId));\r\n                        }\r\n\r\n                        TLUtils.WriteException(error.ToString(), e);\r\n                    }\r\n                }\r\n\r\n                encryptedMessage.Decrypt(authKey2);\r\n\r\n                #region Security checks\r\n\r\n                if (encryptedMessage.Data == null)\r\n                {\r\n                    var message = \"msgKey mismatch\";\r\n\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n\r\n                if (encryptedMessage.Data.Length < 32)\r\n                {\r\n                    var message = string.Format(\"padding extension data={0} < 32\", encryptedMessage.Data.Length);\r\n\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n                var messageDataLength = BitConverter.ToInt32(encryptedMessage.Data, 28);\r\n                if (messageDataLength < 0 || messageDataLength % 4 != 0)\r\n                {\r\n                    var message = string.Format(\"incorrect length data={0} length={1}\", encryptedMessage.Data.Length, messageDataLength);\r\n\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n\r\n                if (32 + messageDataLength > encryptedMessage.Data.Length)\r\n                {\r\n                    var message = string.Format(\"padding extension data={0} length={1}\", encryptedMessage.Data.Length, messageDataLength);\r\n\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n\r\n                position = 0;\r\n                var transportMessage = TLObject.GetObject<TLTransportMessage>(encryptedMessage.Data, ref position);\r\n#if MTPROTO\r\n                if (encryptedMessage.Data.Length - position < 12\r\n                    || encryptedMessage.Data.Length - position > 1024)\r\n                {\r\n                    var message = string.Format(\"padding extension data={0} position={1} object={2}\", encryptedMessage.Data.Length, position, transportMessage.MessageData);\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n#else\r\n                if ((encryptedMessage.Data.Length - position) > 15)\r\n                {\r\n                    var message = string.Format(\"padding extension data={0} position={1} object={2}\", encryptedMessage.Data.Length, position, transportMessage.MessageData);\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n#endif\r\n                if (transportMessage.SessionId.Value != transport.SessionId.Value)\r\n                {\r\n                    var message = string.Format(\"Transport Session_id={0} is not equal to transport.session_id={1} transport_dc_id={2}\", transportMessage.SessionId, transport.SessionId, transport.DCId);\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n\r\n                if (transport.MinMessageId != 0)\r\n                {\r\n                    if (transport.MinMessageId > transportMessage.MessageId.Value)\r\n                    {\r\n                        var message = string.Format(\"Message_id={0} seq_no={1} is higher than transport.min_message_id={2}\", transportMessage.MessageId, transportMessage.SeqNo, transport.MinMessageId);\r\n                        TLUtils.WriteException(new Exception(message));\r\n                    }\r\n                }\r\n\r\n                if (transport.MessageIdDict.ContainsKey(transportMessage.MessageId.Value))\r\n                {\r\n                    var message = string.Format(\"Message_id={0} already exists\", transportMessage.MessageId.Value);\r\n                    TLUtils.WriteException(new Exception(message));\r\n                }\r\n\r\n                lock (transport.SyncRoot)\r\n                {\r\n                    transport.MessageIdDict[transportMessage.MessageId.Value] = transportMessage.MessageId.Value;\r\n                }\r\n\r\n                if ((transportMessage.MessageId.Value % 2) == 0)\r\n                {\r\n                    TLUtils.WriteException(new Exception(\"Incorrect message_id\"));\r\n                }\r\n\r\n                #endregion\r\n\r\n                // get acknowledgments\r\n                foreach (var acknowledgment in TLUtils.FindInnerObjects<TLMessagesAcknowledgment>(transportMessage))\r\n                {\r\n                    var ids = acknowledgment.MessageIds.Items;\r\n                    lock (_historyRoot)\r\n                    {\r\n                        foreach (var id in ids)\r\n                        {\r\n                            if (_history.ContainsKey(id.Value))\r\n                            {\r\n                                _history[id.Value].Status = RequestStatus.Confirmed;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                // send acknowledgments\r\n                SendAcknowledgments(transportMessage);\r\n\r\n                // set client ticks delta\r\n                bool updated = false;\r\n                lock (_activeTransportRoot)\r\n                {\r\n                    if (transport.ClientTicksDelta == 0)\r\n                    {\r\n                        var serverTime = transportMessage.MessageId.Value;\r\n                        var clientTime = transport.GenerateMessageId().Value;\r\n\r\n                        var serverDateTime = Utils.UnixTimestampToDateTime(serverTime >> 32);\r\n                        var clientDateTime = Utils.UnixTimestampToDateTime(clientTime >> 32);\r\n\r\n                        var errorInfo = new StringBuilder();\r\n\r\n                        errorInfo.AppendLine(\"Server time: \" + serverDateTime);\r\n                        errorInfo.AppendLine(\"Client time: \" + clientDateTime);\r\n\r\n                        transport.ClientTicksDelta = serverTime - clientTime;\r\n\r\n                        if (transport.ClientTicksDelta == 0) transport.ClientTicksDelta = 1;\r\n                        updated = true;\r\n                    }\r\n                }\r\n\r\n                if (updated && _config != null)\r\n                {\r\n                    var dcOption = _config.DCOptions.FirstOrDefault(x => string.Equals(x.IpAddress.ToString(), transport.Host, StringComparison.OrdinalIgnoreCase));\r\n                    if (dcOption != null)\r\n                    {\r\n                        dcOption.ClientTicksDelta = transport.ClientTicksDelta;\r\n                        _cacheService.SetConfig(_config);\r\n                    }\r\n                }\r\n\r\n                // updates\r\n                _updatesService.ProcessTransportMessage(transportMessage);\r\n\r\n                // bad messages\r\n                foreach (var badMessage in TLUtils.FindInnerObjects<TLBadMessageNotification>(transportMessage))\r\n                {\r\n\r\n                    HistoryItem item = null;\r\n                    lock (_historyRoot)\r\n                    {\r\n                        if (_history.ContainsKey(badMessage.BadMessageId.Value))\r\n                        {\r\n                            item = _history[badMessage.BadMessageId.Value];\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"TLBadMessageNotificaiton lost item id=\" + badMessage.BadMessageId);\r\n                        }\r\n                    }\r\n\r\n                    Logs.Log.Write(string.Format(\"{0} {1}\", badMessage, item));\r\n\r\n                    ProcessBadMessage(transportMessage, badMessage, item);\r\n                }\r\n\r\n                // bad server salts\r\n                foreach (var badServerSalt in TLUtils.FindInnerObjects<TLBadServerSalt>(transportMessage))\r\n                {\r\n\r\n                    lock (_activeTransportRoot)\r\n                    {\r\n                        _activeTransport.Salt = badServerSalt.NewServerSalt;\r\n                    }\r\n\r\n                    // save config\r\n                    if (_config != null && _config.DCOptions != null)\r\n                    {\r\n                        var activeDCOption = _config.DCOptions[_config.ActiveDCOptionIndex];\r\n                        activeDCOption.Salt = badServerSalt.NewServerSalt;\r\n\r\n                        SaveConfig();\r\n                    }\r\n\r\n                    HistoryItem item = null;\r\n                    lock (_historyRoot)\r\n                    {\r\n                        if (_history.ContainsKey(badServerSalt.BadMessageId.Value))\r\n                        {\r\n                            item = _history[badServerSalt.BadMessageId.Value];\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"TLBadServerSalt lost item id=\" + badServerSalt.BadMessageId);\r\n                        }\r\n                    }\r\n\r\n                    Logs.Log.Write(string.Format(\"{0} {1}\", badServerSalt, item));\r\n\r\n                    ProcessBadServerSalt(transportMessage, badServerSalt, item);\r\n                }\r\n\r\n                // new session created\r\n                foreach (var newSessionCreated in TLUtils.FindInnerObjects<TLNewSessionCreated>(transportMessage))\r\n                {\r\n                    TLUtils.WritePerformance(string.Format(\"NEW SESSION CREATED: {0} (old {1})\", transportMessage.SessionId, _activeTransport.SessionId));\r\n                    lock (_activeTransportRoot)\r\n                    {\r\n                        _activeTransport.SessionId = transportMessage.SessionId;\r\n                        _activeTransport.Salt = newSessionCreated.ServerSalt;\r\n                    }\r\n                }\r\n\r\n                foreach (var pong in TLUtils.FindInnerObjects<TLPong>(transportMessage))\r\n                {\r\n                    HistoryItem item;\r\n                    lock (_historyRoot)\r\n                    {\r\n                        if (_history.ContainsKey(pong.MessageId.Value))\r\n                        {\r\n                            item = _history[pong.MessageId.Value];\r\n                            _history.Remove(pong.MessageId.Value);\r\n                        }\r\n                        else\r\n                        {\r\n                            //Execute.ShowDebugMessage(\"TLPong lost item id=\" + pong.MessageId);\r\n                            continue;\r\n                        }\r\n                    }\r\n#if DEBUG\r\n                    NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n                    if (item != null)\r\n                    {\r\n                        item.Callback.SafeInvoke(pong);\r\n                    }\r\n                }\r\n\r\n                // rpcresults\r\n                foreach (var result in TLUtils.FindInnerObjects<TLRPCResult>(transportMessage))\r\n                {\r\n                    HistoryItem historyItem = null;\r\n\r\n                    lock (_historyRoot)\r\n                    {\r\n                        if (_history.ContainsKey(result.RequestMessageId.Value))\r\n                        {\r\n                            historyItem = _history[result.RequestMessageId.Value];\r\n                            //#if !DEBUG\r\n                            _history.Remove(result.RequestMessageId.Value);\r\n                            //Debug.WriteLine(\"History remove msg_id={0} obj={1}\", result.RequestMessageId, result.Object);\r\n#if DEBUG\r\n                            _removedHistory[result.RequestMessageId.Value] = new HistoryItem { Caption = historyItem.Caption };\r\n#endif\r\n                            //#endif\r\n                        }\r\n                        else\r\n                        {\r\n#if DEBUG\r\n                            //Debug.WriteLine(\"History missing msg_id={0} obj={1}\", result.RequestMessageId, result.Object);\r\n                            if (_removedHistory.ContainsKey(result.RequestMessageId.Value))\r\n                            {\r\n                                var removedHistoryItem = _removedHistory[result.RequestMessageId.Value];\r\n\r\n                                Execute.ShowDebugMessage(string.Format(\"TLRPCResult LostItem msg_id={0} caption={1} result={2}\", result.RequestMessageId, removedHistoryItem != null ? removedHistoryItem.Caption : \"null\", result.Object));\r\n                            }\r\n                            else\r\n                            {\r\n                                HistoryItem removedHistoryItem = null;\r\n\r\n                                Execute.ShowDebugMessage(string.Format(\"TLRPCResult LostItem msg_id={0} caption={1} result={2}\", result.RequestMessageId, removedHistoryItem != null ? removedHistoryItem.Caption : \"null\", result.Object));\r\n                            }\r\n#endif\r\n                            continue;\r\n                        }\r\n                    }\r\n#if DEBUG\r\n                    NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n                    var error = result.Object as TLRPCError;\r\n                    if (error != null)\r\n                    {\r\n                        string errorString;\r\n                        var reqError = error as TLRPCReqError;\r\n                        if (reqError != null)\r\n                        {\r\n                            errorString = string.Format(\"RPCReqError {1} {2} (query_id={0})\", reqError.QueryId, reqError.Code, reqError.Message);\r\n                        }\r\n                        else\r\n                        {\r\n                            errorString = string.Format(\"RPCError {0} {1}\", error.Code, error.Message);\r\n                        }\r\n\r\n                        Execute.ShowDebugMessage(historyItem + Environment.NewLine + errorString);\r\n                        ProcessRPCError(error, historyItem, encryptedMessage.AuthKeyId.Value);\r\n                        Debug.WriteLine(errorString + \" msg_id=\" + result.RequestMessageId.Value);\r\n                        TLUtils.WriteLine(errorString);\r\n                    }\r\n                    else\r\n                    {\r\n                        var messageData = result.Object;\r\n                        if (messageData is TLGzipPacked)\r\n                        {\r\n                            messageData = ((TLGzipPacked)messageData).Data;\r\n                        }\r\n\r\n                        if (messageData is TLSentMessageBase\r\n                            || messageData is TLStatedMessageBase\r\n                            || messageData is TLUpdatesBase\r\n                            || messageData is TLSentEncryptedMessage\r\n                            || messageData is TLSentEncryptedFile\r\n                            || messageData is TLAffectedHistory\r\n                            || messageData is TLAffectedMessages\r\n                            || historyItem.Object is TLReadChannelHistory\r\n                            || historyItem.Object is TLReadEncryptedHistory)\r\n                        {\r\n                            RemoveFromQueue(historyItem);\r\n                        }\r\n\r\n                        if (historyItem.Caption == \"messages.getDialogs\")\r\n                        {\r\n#if DEBUG_UPDATEDCOPTIONS\r\n                            var dcOption = new TLDCOption\r\n                            {\r\n                                Hostname = new TLString(\"\"),\r\n                                Id = new TLInt(2),\r\n                                IpAddress = new TLString(\"109.239.131.193\"),\r\n                                Port = new TLInt(80)\r\n                            };\r\n                            var dcOptions = new TLVector<TLDCOption> {dcOption};\r\n                            var update = new TLUpdateDCOptions {DCOptions = dcOptions};\r\n                            var updateShort = new TLUpdatesShort {Date = new TLInt(0), Update = update};\r\n\r\n                            _updatesService.ProcessTransportMessage(new TLTransportMessage{MessageData = updateShort});\r\n#endif\r\n                        }\r\n                        try\r\n                        {\r\n                            historyItem.Callback(messageData);\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n#if LOG_REGISTRATION\r\n                            TLUtils.WriteLog(e.ToString());\r\n#endif\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteException(\"ReceiveBytesAsync\", e);\r\n\r\n                ResetConnection(e);\r\n            }\r\n        }\r\n\r\n        private void ResetConnectionByTransport(ITransport transport, Exception ex)\r\n        {\r\n            ClearHistoryByTransport(transport);\r\n\r\n            lock (transport.SyncRoot)\r\n            {\r\n                // continue listening on fault\r\n                transport = GetTransport(transport.Host, transport.Port, Type,\r\n                    new TransportSettings\r\n                    {\r\n                        DcId = transport.DCId,\r\n                        Secret = transport.Secret,\r\n                        AuthKey = transport.AuthKey,\r\n                        Salt = transport.Salt,\r\n                        SessionId = transport.SessionId,\r\n                        MessageIdDict = _activeTransport.MessageIdDict,\r\n                        SequenceNumber = transport.SequenceNumber,\r\n                        ClientTicksDelta = transport.ClientTicksDelta,\r\n                        PacketReceivedHandler = OnPacketReceivedByTransport\r\n                    });\r\n            }\r\n            // to bind authKey to current TCPTransport\r\n            PingByTransportAsync(transport, TLLong.Random(), result => { });\r\n        }\r\n\r\n        private void ResetConnection(Exception ex)\r\n        {\r\n            ClearHistory(\"ResetConnection\", false, false, ex);\r\n\r\n            // continue listening on fault\r\n            _activeTransport = GetTransport(_activeTransport.Host, _activeTransport.Port, Type,\r\n                new TransportSettings\r\n                {\r\n                    DcId = _activeTransport != null ? _activeTransport.DCId : 0,\r\n                    Secret = _activeTransport != null ? _activeTransport.Secret : null,\r\n                    AuthKey = _activeTransport != null ? _activeTransport.AuthKey : null,\r\n                    Salt = _activeTransport != null ? _activeTransport.Salt : null,\r\n                    SessionId = _activeTransport != null ? _activeTransport.SessionId : null,\r\n                    MessageIdDict = _activeTransport != null ? _activeTransport.MessageIdDict : new Dictionary<long, long>(),\r\n                    SequenceNumber = _activeTransport != null ? _activeTransport.SequenceNumber : 0,\r\n                    ClientTicksDelta = _activeTransport != null ? _activeTransport.ClientTicksDelta : 0,\r\n                    PacketReceivedHandler = OnPacketReceived\r\n                });\r\n\r\n            // to bind authKey to current TCPTransport, get changes, etc...\r\n            PingAsync(TLLong.Random(), pong => { });\r\n        }\r\n\r\n        public void Stop()\r\n        {\r\n            _transportService.CheckConfig -= OnCheckConfig;\r\n            _transportService.ConnectionLost -= OnConnectionLost;\r\n            _transportService.FileConnectionLost -= OnFileConnectionLost;\r\n            _transportService.SpecialConnectionLost -= OnSpecialConnectionLost;\r\n            _transportService.Close();\r\n\r\n            var history = new List<HistoryItem>();\r\n            lock (_historyRoot)\r\n            {\r\n                foreach (var keyValue in _history)\r\n                {\r\n                    history.Add(keyValue.Value);\r\n                }\r\n                _history.Clear();\r\n            }\r\n\r\n            foreach (var keyValue in history)\r\n            {\r\n                keyValue.FaultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"MTProtoService.Stop\") });\r\n            }\r\n        }\r\n\r\n        public void ClearHistory(string caption, bool createNewSession, bool syncFaultCallbacks = false, Exception e = null)\r\n        {\r\n            var errorDebugString = string.Format(\"{0} clear history start {1}\", DateTime.Now.ToString(\"HH:mm:ss.fff\"), _history.Count);\r\n            TLUtils.WriteLine(errorDebugString, LogSeverity.Error);\r\n\r\n            _transportService.Close();\r\n            if (createNewSession)\r\n            {\r\n                _activeTransport.SessionId = TLLong.Random();\r\n                _activeTransport.MessageIdDict = new Dictionary<long, long>();\r\n            }\r\n            // сначала очищаем reqPQ, reqDHParams и setClientDHParams\r\n            _activeTransport.ClearNonEncryptedHistory();\r\n\r\n            //затем очищаем help.getNearestDc, help.getConfig и любые другие методы\r\n            //иначе при вызове faultCallback для help.getNearestDc, help.getConfig и reqPQ снова бы завершился с ошибкой\r\n            // при вызове ClearNonEncryptedHistory\r\n            var history = new List<HistoryItem>();\r\n            lock (_historyRoot)\r\n            {\r\n                foreach (var keyValue in _history)\r\n                {\r\n                    history.Add(keyValue.Value);\r\n                }\r\n                _history.Clear();\r\n            }\r\n\r\n            if (syncFaultCallbacks)\r\n            {\r\n                foreach (var keyValue in history)\r\n                {\r\n                    keyValue.FaultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"MTProtoService.ClearHistory \" + caption), Exception = e });\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Execute.BeginOnThreadPool(() =>\r\n                {\r\n                    foreach (var keyValue in history)\r\n                    {\r\n                        keyValue.FaultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"MTProtoService.ClearHistory \" + caption), Exception = e });\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        private void ResetConnection(ITransport transport, Exception ex)\r\n        {\r\n            Execute.ShowDebugMessage(\"ResetConnection dc_id=\" + transport.DCId);\r\n\r\n            ClearHistory(\"ResetConnection dc_id=\" + transport.DCId, false, false, ex);\r\n        }\r\n\r\n        public void ClearHistory(string caption, ITransport transport, Exception e = null)\r\n        {\r\n            var errorDebugString = string.Format(\"{0} clear history start {1}\", DateTime.Now.ToString(\"HH:mm:ss.fff\"), _history.Count);\r\n            TLUtils.WriteLine(errorDebugString, LogSeverity.Error);\r\n\r\n            _transportService.CloseTransport(transport);\r\n            // сначала очищаем reqPQ, reqDHParams и setClientDHParams\r\n            transport.ClearNonEncryptedHistory();\r\n\r\n            //затем очищаем help.getNearestDc, help.getConfig и любые другие методы\r\n            //иначе при вызове faultCallback для help.getNearestDc, help.getConfig и reqPQ снова бы завершился с ошибкой\r\n            // при вызове ClearNonEncryptedHistory\r\n            var history = new List<HistoryItem>();\r\n            lock (_historyRoot)\r\n            {\r\n                foreach (var keyValue in _history)\r\n                {\r\n                    if (keyValue.Value.DCId == transport.DCId)\r\n                    {\r\n                        history.Add(keyValue.Value);\r\n                    }\r\n                }\r\n                foreach (var historyItem in history)\r\n                {\r\n                    _history.Remove(historyItem.Hash);\r\n                }\r\n            }\r\n\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                foreach (var keyValue in history)\r\n                {\r\n                    keyValue.FaultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"MTProtoService.ClearHistory \" + caption), Exception = e });\r\n                }\r\n            });\r\n        }\r\n\r\n        private void ProcessRPCError(TLRPCError error, HistoryItem historyItem, long keyId)\r\n        {\r\n            Log.Write(string.Format(\"RPCError {0} {1}\", historyItem.Caption, error));\r\n\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(string.Format(\"RPCError {0} {1}\", historyItem.Caption, error));\r\n#endif\r\n\r\n            if (error.CodeEquals(ErrorCode.UNAUTHORIZED))\r\n            {\r\n                Execute.ShowDebugMessage(string.Format(\"RPCError {0} {1}\", historyItem.Caption, error));\r\n\r\n                if (historyItem != null\r\n                    && historyItem.Caption != \"account.updateStatus\"\r\n                    && historyItem.Caption != \"account.registerDevice\"\r\n                    && historyItem.Caption != \"auth.signIn\")\r\n                {\r\n                    //Execute.ShowDebugMessage(string.Format(\"RPCError {0} {1} (auth required)\", historyItem.Caption, error));\r\n                    RaiseAuthorizationRequired(new AuthorizationRequiredEventArgs { Error = error, MethodName = historyItem.Caption, AuthKeyId = keyId });\r\n                }\r\n                else if (historyItem != null && historyItem.FaultCallback != null)\r\n                {\r\n                    historyItem.FaultCallback(error);\r\n                }\r\n            }\r\n            else if (error.CodeEquals(ErrorCode.ERROR_SEE_OTHER)\r\n                && (error.TypeStarsWith(ErrorType.NETWORK_MIGRATE)\r\n                    || error.TypeStarsWith(ErrorType.PHONE_MIGRATE)\r\n                //|| error.TypeStarsWith(ErrorType.FILE_MIGRATE)\r\n                    ))\r\n            {\r\n\r\n                var serverNumber = Convert.ToInt32(\r\n                    error.GetErrorTypeString()\r\n                    .Replace(ErrorType.NETWORK_MIGRATE.ToString(), string.Empty)\r\n                    .Replace(ErrorType.PHONE_MIGRATE.ToString(), string.Empty)\r\n                    //.Replace(ErrorType.FILE_MIGRATE.ToString(), string.Empty)\r\n                    .Replace(\"_\", string.Empty));\r\n\r\n                if (_config == null\r\n                    || TLUtils.GetDCOption(_config, new TLInt(serverNumber)) == null)\r\n                {\r\n                    GetConfigAsync(config =>\r\n                    {\r\n                        // параметры предыдущего подключения не сохраняются, поэтому когда ответ приходит после\r\n                        // подключения к следующему серверу, то не удается расшифровать старые сообщения, пришедшие с \r\n                        // задержкой с новой солью и authKey\r\n                        _config = TLConfig.Merge(_config, config);\r\n                        SaveConfig();\r\n                        if (historyItem.Object.GetType() == typeof(TLSendCode))\r\n                        {\r\n                            var dcOption = TLUtils.GetDCOption(_config, new TLInt(serverNumber));\r\n\r\n                            _activeTransport = GetTransport(dcOption.IpAddress.ToString(), dcOption.Port.Value, Type,\r\n                                new TransportSettings\r\n                                {\r\n                                    DcId = dcOption.Id.Value,\r\n                                    Secret = TLUtils.ParseSecret(dcOption),\r\n                                    AuthKey = dcOption.AuthKey,\r\n                                    Salt = dcOption.Salt,\r\n                                    SessionId = TLLong.Random(),\r\n                                    MessageIdDict = new Dictionary<long, long>(),\r\n                                    SequenceNumber = 0,\r\n                                    ClientTicksDelta = dcOption.ClientTicksDelta,\r\n                                    PacketReceivedHandler = OnPacketReceived\r\n                                });\r\n\r\n                            //IsInitialized = false;\r\n                            InitAsync(tuple =>\r\n                            {\r\n                                lock (_activeTransportRoot)\r\n                                {\r\n                                    _activeTransport.DCId = serverNumber;\r\n                                    _activeTransport.AuthKey = tuple.Item1;\r\n                                    _activeTransport.Salt = tuple.Item2;\r\n                                    _activeTransport.SessionId = tuple.Item3;\r\n                                }\r\n                                var authKeyId = TLUtils.GenerateLongAuthKeyId(tuple.Item1);\r\n\r\n                                lock (_authKeysRoot)\r\n                                {\r\n                                    if (!_authKeys.ContainsKey(authKeyId))\r\n                                    {\r\n                                        _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = tuple.Item1, AutkKeyId = authKeyId });\r\n                                    }\r\n                                }\r\n\r\n                                dcOption.AuthKey = tuple.Item1;\r\n                                dcOption.Salt = tuple.Item2;\r\n                                dcOption.SessionId = tuple.Item3;\r\n\r\n                                _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(dcOption);\r\n                                _cacheService.SetConfig(_config);\r\n\r\n                                //IsInitialized = true;\r\n                                RaiseInitialized();\r\n\r\n                                SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback);\r\n                            },\r\n                            er =>\r\n                            {\r\n                                //restore previous transport\r\n                                var activeDCOption = _config.DCOptions[_config.ActiveDCOptionIndex];\r\n                                _activeTransport = GetTransport(activeDCOption.IpAddress.ToString(), activeDCOption.Port.Value, Type,\r\n                                new TransportSettings\r\n                                {\r\n                                    DcId = activeDCOption.Id.Value,\r\n                                    Secret = TLUtils.ParseSecret(activeDCOption),\r\n                                    AuthKey = activeDCOption.AuthKey,\r\n                                    Salt = activeDCOption.Salt,\r\n                                    SessionId = TLLong.Random(),\r\n                                    MessageIdDict = new Dictionary<long, long>(),\r\n                                    SequenceNumber = 0,\r\n                                    ClientTicksDelta = activeDCOption.ClientTicksDelta,\r\n                                    PacketReceivedHandler = OnPacketReceived\r\n                                });\r\n#if LOG_REGISTRATION\r\n                                TLUtils.WriteLog(string.Format(\"RPCError restore transport {0} {1}:{2} item {3}\", _activeTransport.Id, _activeTransport.Host, _activeTransport.Port, historyItem.Caption));\r\n#endif\r\n\r\n                                historyItem.FaultCallback.SafeInvoke(er);\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            MigrateAsync(serverNumber, auth => SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback));\r\n                        }\r\n                    });\r\n                }\r\n                else\r\n                {\r\n                    if (historyItem.Object.GetType() == typeof(TLSendCode)\r\n                        || historyItem.Object.GetType() == typeof(TLGetFile))\r\n                    {\r\n                        var activeDCOption = TLUtils.GetDCOption(_config, new TLInt(serverNumber));\r\n\r\n                        _activeTransport = GetTransport(activeDCOption.IpAddress.ToString(), activeDCOption.Port.Value, Type,\r\n                            new TransportSettings\r\n                            {\r\n                                DcId = activeDCOption.Id.Value,\r\n                                Secret = TLUtils.ParseSecret(activeDCOption),\r\n                                AuthKey = activeDCOption.AuthKey,\r\n                                Salt = activeDCOption.Salt,\r\n                                SessionId = TLLong.Random(),\r\n                                MessageIdDict = new Dictionary<long, long>(),\r\n                                SequenceNumber = 0,\r\n                                ClientTicksDelta = activeDCOption.ClientTicksDelta,\r\n                                PacketReceivedHandler = OnPacketReceived\r\n                            });\r\n\r\n                        if (activeDCOption.AuthKey == null)\r\n                        {\r\n                            //IsInitialized = false;\r\n                            InitAsync(tuple =>\r\n                            {\r\n                                lock (_activeTransportRoot)\r\n                                {\r\n                                    _activeTransport.DCId = serverNumber;\r\n                                    _activeTransport.AuthKey = tuple.Item1;\r\n                                    _activeTransport.Salt = tuple.Item2;\r\n                                    _activeTransport.SessionId = tuple.Item3;\r\n                                }\r\n\r\n                                var authKeyId = TLUtils.GenerateLongAuthKeyId(tuple.Item1);\r\n\r\n                                lock (_authKeysRoot)\r\n                                {\r\n                                    if (!_authKeys.ContainsKey(authKeyId))\r\n                                    {\r\n                                        _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = tuple.Item1, AutkKeyId = authKeyId });\r\n                                    }\r\n                                }\r\n\r\n                                activeDCOption.AuthKey = tuple.Item1;\r\n                                activeDCOption.Salt = tuple.Item2;\r\n                                activeDCOption.SessionId = tuple.Item3;\r\n\r\n                                _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(activeDCOption);\r\n                                _cacheService.SetConfig(_config);\r\n\r\n                                //IsInitialized = true;\r\n                                RaiseInitialized();\r\n\r\n                                SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback);\r\n                            },\r\n                            er =>\r\n                            {\r\n                                //restore previous transport\r\n                                var activeDCOption2 = _config.DCOptions[_config.ActiveDCOptionIndex];\r\n                                _activeTransport = GetTransport(activeDCOption2.IpAddress.ToString(), activeDCOption2.Port.Value, Type,\r\n                                    new TransportSettings\r\n                                    {\r\n                                        DcId = activeDCOption2.Id.Value,\r\n                                        Secret = TLUtils.ParseSecret(activeDCOption2),\r\n                                        AuthKey = activeDCOption2.AuthKey,\r\n                                        Salt = activeDCOption2.Salt,\r\n                                        SessionId = TLLong.Random(),\r\n                                        MessageIdDict = new Dictionary<long, long>(),\r\n                                        SequenceNumber = 0,\r\n                                        ClientTicksDelta = activeDCOption2.ClientTicksDelta,\r\n                                        PacketReceivedHandler = OnPacketReceived\r\n                                    });\r\n#if LOG_REGISTRATION\r\n                                TLUtils.WriteLog(string.Format(\"RPCError restore transport {0} {1}:{2} item {3}\", _activeTransport.Id, _activeTransport.Host, _activeTransport.Port, historyItem.Caption));\r\n#endif\r\n\r\n                                historyItem.FaultCallback.SafeInvoke(er);\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            lock (_activeTransportRoot)\r\n                            {\r\n                                _activeTransport.AuthKey = activeDCOption.AuthKey;\r\n                                _activeTransport.Salt = activeDCOption.Salt;\r\n                                _activeTransport.SessionId = TLLong.Random();\r\n                            }\r\n                            var authKeyId = TLUtils.GenerateLongAuthKeyId(activeDCOption.AuthKey);\r\n\r\n                            lock (_authKeysRoot)\r\n                            {\r\n                                if (!_authKeys.ContainsKey(authKeyId))\r\n                                {\r\n                                    _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = activeDCOption.AuthKey, AutkKeyId = authKeyId });\r\n                                }\r\n                            }\r\n\r\n                            _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(activeDCOption);\r\n                            _cacheService.SetConfig(_config);\r\n\r\n                            //IsInitialized = true;\r\n                            RaiseInitialized();\r\n\r\n                            SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        MigrateAsync(serverNumber, auth => SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback));\r\n                    }\r\n                }\r\n            }\r\n            else if (error.CodeEquals(ErrorCode.ERROR_SEE_OTHER)\r\n                && error.TypeStarsWith(ErrorType.USER_MIGRATE))\r\n            {\r\n                //return;\r\n\r\n                var serverNumber = Convert.ToInt32(\r\n                    error.GetErrorTypeString()\r\n                    .Replace(ErrorType.USER_MIGRATE.ToString(), string.Empty)\r\n                    .Replace(\"_\", string.Empty));\r\n\r\n                // фикс версии 0.1.3.13 когда первый конфиг для dc2 отличался от стартового dc2\r\n                // можно убрать после\r\n                if (_config.ActiveDCOptionIndex == 0 && serverNumber == 2)\r\n                {\r\n                    var activeDCOption = TLUtils.GetDCOption(_config, new TLInt(serverNumber));\r\n\r\n                    _activeTransport = GetTransport(activeDCOption.IpAddress.ToString(), activeDCOption.Port.Value, Type,\r\n                        new TransportSettings\r\n                        {\r\n                            DcId = activeDCOption.Id.Value,\r\n                            Secret = TLUtils.ParseSecret(activeDCOption),\r\n                            AuthKey = activeDCOption.AuthKey,\r\n                            Salt = activeDCOption.Salt,\r\n                            SessionId = TLLong.Random(),\r\n                            MessageIdDict = new Dictionary<long, long>(),\r\n                            SequenceNumber = 0,\r\n                            ClientTicksDelta = activeDCOption.ClientTicksDelta,\r\n                            PacketReceivedHandler = OnPacketReceived\r\n                        });\r\n\r\n                    var authKeyId = TLUtils.GenerateLongAuthKeyId(activeDCOption.AuthKey);\r\n\r\n                    lock (_authKeysRoot)\r\n                    {\r\n                        if (!_authKeys.ContainsKey(authKeyId))\r\n                        {\r\n                            _authKeys.Add(authKeyId, new AuthKeyItem { AuthKey = activeDCOption.AuthKey, AutkKeyId = authKeyId });\r\n                        }\r\n                    }\r\n\r\n                    _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(activeDCOption);\r\n                    _cacheService.SetConfig(_config);\r\n\r\n                    SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback);\r\n                }\r\n                // конец фикса\r\n\r\n                //ITransport newTransport;\r\n                //TLDCOption newActiveDCOption;\r\n                //lock (_activeTransportRoot)\r\n                //{\r\n                //    newActiveDCOption = _config.DCOptions.First(x => x.IsValidIPv4Option(new TLInt(serverNumber)));\r\n\r\n                //    var transportClientsTicksDelta = newActiveDCOption.ClientTicksDelta;\r\n                //    bool isCreated;\r\n                //    newTransport = _transportService.GetTransport(newActiveDCOption.IpAddress.ToString(), newActiveDCOption.Port.Value, Type, out isCreated);\r\n                //    newTransport.ClientTicksDelta = transportClientsTicksDelta;\r\n                //    newTransport.PacketReceived += OnPacketReceived;\r\n                //}\r\n\r\n                //if (newTransport.AuthKey == null)\r\n                //{\r\n                //    InitTransportAsync(newTransport,\r\n                //        tuple =>\r\n                //        {\r\n                //            lock (newTransport.SyncRoot)\r\n                //            {\r\n                //                newTransport.AuthKey = tuple.Item1;\r\n                //                newTransport.Salt = tuple.Item2;\r\n                //                newTransport.SessionId = tuple.Item3;\r\n\r\n                //                newTransport.IsInitializing = false;\r\n                //            }\r\n                //            var authKeyId = TLUtils.GenerateLongAuthKeyId(tuple.Item1);\r\n\r\n                //            lock (_authKeysRoot)\r\n                //            {\r\n                //                if (!_authKeys.ContainsKey(authKeyId))\r\n                //                {\r\n                //                    _authKeys.Add(authKeyId, new AuthKeyItem {AuthKey = tuple.Item1, AutkKeyId = authKeyId});\r\n                //                }\r\n                //            }\r\n\r\n                //            foreach (var dcOption in _config.DCOptions)\r\n                //            {\r\n                //                if (dcOption.Id.Value == newTransport.Id)\r\n                //                {\r\n                //                    dcOption.AuthKey = tuple.Item1;\r\n                //                    dcOption.Salt = tuple.Item2;\r\n                //                    dcOption.SessionId = tuple.Item3;\r\n                //                }\r\n                //            }\r\n\r\n                //            _cacheService.SetConfig(_config);\r\n\r\n                //            ExportImportAuthorizationAsync(\r\n                //                newTransport,\r\n                //                () =>\r\n                //                {\r\n                //                    lock (_activeTransportRoot)\r\n                //                    {\r\n                //                        _activeTransport = newTransport;\r\n                //                    }\r\n\r\n                //                    _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(newActiveDCOption);\r\n                //                    SaveConfig();\r\n\r\n                //                    SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback);\r\n                //                },\r\n                //                err =>\r\n                //                {\r\n\r\n                //                });\r\n                //        },\r\n                //        er =>\r\n                //        {\r\n\r\n                //        });\r\n                //}\r\n                //else\r\n                //{\r\n                //    ExportImportAuthorizationAsync(\r\n                //        newTransport,\r\n                //        () =>\r\n                //        {\r\n                //            lock (_activeTransportRoot)\r\n                //            {\r\n                //                _activeTransport = newTransport;\r\n                //            }\r\n\r\n                //            _config.ActiveDCOptionIndex = _config.DCOptions.IndexOf(newActiveDCOption);\r\n                //            SaveConfig();\r\n\r\n                //            SendInformativeMessage(historyItem.Caption, historyItem.Object, historyItem.Callback, historyItem.FaultCallback);\r\n                //        },\r\n                //        err =>\r\n                //        {\r\n\r\n                //        });\r\n                //}\r\n\r\n            }\r\n            else if (historyItem.FaultCallback != null)\r\n            {\r\n                historyItem.FaultCallback(error);\r\n            }\r\n        }\r\n\r\n        private void MigrateAsync(int serverNumber, Action<TLAuthorization> callback)\r\n        {\r\n            throw new NotImplementedException();\r\n\r\n            //ExportAuthorizationAsync(new TLInt(serverNumber), \r\n            //    exportedAuthorization =>\r\n            //    {\r\n            //        var dcOption = _config.DCOptions.First(x => x.IsValidIPv4Option(new TLInt(serverNumber)));\r\n            //        _activeTransport.SetAddress(dcOption.IpAddress.ToString(), dcOption.Port.Value);\r\n\r\n            //        _isInitialized = false;\r\n            //        NotifyOfPropertyChange(() => IsInitialized);\r\n\r\n            //        _authHelper.InitAsync(tuple =>\r\n            //        {\r\n            //            ImportAuthorizationAsync(exportedAuthorization.Id, exportedAuthorization.Bytes, callback);\r\n            //            _isInitialized = true;\r\n            //            NotifyOfPropertyChange(() => IsInitialized);\r\n            //            RaiseInitialized();\r\n            //        });\r\n            //    });\r\n        }\r\n\r\n        private void ProcessBadMessage(TLTransportMessage message, TLBadMessageNotification badMessage, HistoryItem historyItem)\r\n        {\r\n            if (historyItem == null) return;\r\n\r\n            switch (badMessage.ErrorCode.Value)\r\n            {\r\n                case 16:    // слишком маленький msg_id\r\n                case 17:    // слишком большой msg_id\r\n                    var errorInfo = new StringBuilder();\r\n                    errorInfo.AppendLine(\"2. CORRECT TIME DELTA for active transport \" + _activeTransport.DCId);\r\n                    errorInfo.AppendLine(historyItem.Caption);\r\n\r\n                    lock (_historyRoot)\r\n                    {\r\n                        _history.Remove(historyItem.Hash);\r\n                    }\r\n#if DEBUG\r\n                    NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n                    var saveConfig = false;\r\n                    lock (_activeTransportRoot)\r\n                    {\r\n                        var serverTime = message.MessageId.Value;\r\n                        var clientTime = _activeTransport.GenerateMessageId().Value;\r\n\r\n                        var serverDateTime = Utils.UnixTimestampToDateTime(serverTime >> 32);\r\n                        var clientDateTime = Utils.UnixTimestampToDateTime(clientTime >> 32);\r\n\r\n                        errorInfo.AppendLine(\"Server time: \" + serverDateTime);\r\n                        errorInfo.AppendLine(\"Client time: \" + clientDateTime);\r\n\r\n                        if (historyItem.ClientTicksDelta == _activeTransport.ClientTicksDelta)\r\n                        {\r\n                            saveConfig = true;\r\n                            _activeTransport.ClientTicksDelta += serverTime - clientTime;\r\n                            errorInfo.AppendLine(\"Set ticks delta: \" + _activeTransport.ClientTicksDelta + \"(\" + (serverDateTime - clientDateTime).TotalSeconds + \" seconds)\");\r\n                        }\r\n                    }\r\n\r\n                    TLUtils.WriteLine(errorInfo.ToString(), LogSeverity.Error);\r\n\r\n                    if (saveConfig && _config != null)\r\n                    {\r\n                        var dcOption = _config.DCOptions.FirstOrDefault(x => string.Equals(x.IpAddress.ToString(), _activeTransport.Host, StringComparison.OrdinalIgnoreCase));\r\n                        if (dcOption != null)\r\n                        {\r\n                            dcOption.ClientTicksDelta = _activeTransport.ClientTicksDelta;\r\n                            _cacheService.SetConfig(_config);\r\n                        }\r\n                    }\r\n\r\n                    // TODO: replace with SendInformativeMessage\r\n\r\n\r\n                    var transportMessage = (TLContainerTransportMessage)historyItem.Message;\r\n                    int sequenceNumber;\r\n                    lock (_activeTransportRoot)\r\n                    {\r\n                        if (transportMessage.SeqNo.Value % 2 == 0)\r\n                        {\r\n                            sequenceNumber = 2 * _activeTransport.SequenceNumber;\r\n                        }\r\n                        else\r\n                        {\r\n                            sequenceNumber = 2 * _activeTransport.SequenceNumber + 1;\r\n                            _activeTransport.SequenceNumber++;\r\n                        }\r\n\r\n                        transportMessage.SeqNo = new TLInt(sequenceNumber);\r\n                        transportMessage.MessageId = _activeTransport.GenerateMessageId(false);\r\n                    }\r\n\r\n                    TLUtils.WriteLine(\"Corrected client time: \" + TLUtils.MessageIdString(transportMessage.MessageId));\r\n                    var authKey = _activeTransport.AuthKey;\r\n                    var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n                    lock (_historyRoot)\r\n                    {\r\n                        _history[historyItem.Hash] = historyItem;\r\n                    }\r\n                    var faultCallback = historyItem.FaultCallback;\r\n                    lock (_activeTransportRoot)\r\n                    {\r\n                        if (_activeTransport.Closed)\r\n                        {\r\n                            _activeTransport = GetTransport(_activeTransport.Host, _activeTransport.Port, Type,\r\n                                new TransportSettings\r\n                                {\r\n                                    DcId = _activeTransport.DCId,\r\n                                    Secret = _activeTransport.Secret,\r\n                                    AuthKey = _activeTransport.AuthKey,\r\n                                    Salt = _activeTransport.Salt,\r\n                                    SessionId = _activeTransport.SessionId,\r\n                                    MessageIdDict = _activeTransport.MessageIdDict,\r\n                                    SequenceNumber = _activeTransport.SequenceNumber,\r\n                                    ClientTicksDelta = _activeTransport.ClientTicksDelta,\r\n                                    PacketReceivedHandler = OnPacketReceived\r\n                                });\r\n                        }\r\n                    }\r\n                    //Debug.WriteLine(\">>{0, -30} MsgId {1} SeqNo {2,-4} SessionId {3} BadMsgId {4}\", string.Format(\"{0}: {1}\", historyItem.Caption, \"time\"), transportMessage.MessageId.Value, transportMessage.SeqNo.Value, message.SessionId.Value, badMessage.BadMessageId.Value);\r\n\r\n                    var captionString = string.Format(\"{0} {1} {2}\", historyItem.Caption, message.SessionId, transportMessage.MessageId);\r\n                    SendPacketAsync(_activeTransport, captionString, encryptedMessage,\r\n                        result =>\r\n                        {\r\n                            Debug.WriteLine(\"@{0} {1} result {2}\", string.Format(\"{0}: {1}\", historyItem.Caption, \"time\"), transportMessage.MessageId.Value, result);\r\n\r\n                        },//ReceiveBytesAsync(result, authKey),\r\n                        error =>\r\n                        {\r\n                            lock (_historyRoot)\r\n                            {\r\n                                _history.Remove(historyItem.Hash);\r\n                            }\r\n#if DEBUG\r\n                            NotifyOfPropertyChange(() => History);\r\n#endif\r\n                            faultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404) });\r\n                        });\r\n\r\n                    break;\r\n\r\n                case 32:\r\n                case 33:\r\n                    TLUtils.WriteLine(string.Format(\"ErrorCode={0} INCORRECT MSGSEQNO, CREATE NEW SESSION {1}\", badMessage.ErrorCode.Value, historyItem.Caption), LogSeverity.Error);\r\n                    Execute.ShowDebugMessage(string.Format(\"ErrorCode={0} INCORRECT MSGSEQNO, CREATE NEW SESSION {1}\", badMessage.ErrorCode.Value, historyItem.Caption));\r\n\r\n                    var previousMessageId = historyItem.Hash;\r\n\r\n                    // fix seqNo with creating new Session\r\n                    lock (_activeTransportRoot)\r\n                    {\r\n                        _activeTransport.SessionId = TLLong.Random();\r\n                        _activeTransport.SequenceNumber = 0;\r\n                        transportMessage = (TLTransportMessage)historyItem.Message;\r\n                        if (transportMessage.SeqNo.Value % 2 == 0)\r\n                        {\r\n                            sequenceNumber = 2 * _activeTransport.SequenceNumber;\r\n                        }\r\n                        else\r\n                        {\r\n                            sequenceNumber = 2 * _activeTransport.SequenceNumber + 1;\r\n                            _activeTransport.SequenceNumber++;\r\n                        }\r\n\r\n                        transportMessage.SeqNo = new TLInt(sequenceNumber);\r\n                        transportMessage.MessageId = _activeTransport.GenerateMessageId(true);\r\n                    }\r\n                    ((TLTransportMessage)transportMessage).SessionId = _activeTransport.SessionId;\r\n\r\n\r\n                    // TODO: replace with SendInformativeMessage\r\n                    TLUtils.WriteLine(\"Corrected client time: \" + TLUtils.MessageIdString(transportMessage.MessageId));\r\n                    authKey = _activeTransport.AuthKey;\r\n                    encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n\r\n                    lock (_historyRoot)\r\n                    {\r\n                        _history.Remove(previousMessageId);\r\n                        _history[historyItem.Hash] = historyItem;\r\n                    }\r\n                    faultCallback = historyItem.FaultCallback;\r\n                    lock (_activeTransportRoot)\r\n                    {\r\n                        if (_activeTransport.Closed)\r\n                        {\r\n                            _activeTransport = GetTransport(_activeTransport.Host, _activeTransport.Port, Type,\r\n                                new TransportSettings\r\n                                {\r\n                                    DcId = _activeTransport.DCId,\r\n                                    Secret = _activeTransport.Secret,\r\n                                    AuthKey = _activeTransport.AuthKey,\r\n                                    Salt = _activeTransport.Salt,\r\n                                    SessionId = _activeTransport.SessionId,\r\n                                    MessageIdDict = _activeTransport.MessageIdDict,\r\n                                    SequenceNumber = _activeTransport.SequenceNumber,\r\n                                    ClientTicksDelta = _activeTransport.ClientTicksDelta,\r\n                                    PacketReceivedHandler = OnPacketReceived\r\n                                });\r\n                        }\r\n                    }\r\n                    //Debug.WriteLine(\">>{0, -30} MsgId {1} SeqNo {2,-4} SessionId {3} BadMsgId {4}\", string.Format(\"{0}: {1}\", historyItem.Caption, \"seqNo\"), transportMessage.MessageId.Value, transportMessage.SeqNo.Value, message.SessionId.Value, badMessage.BadMessageId.Value);\r\n\r\n                    captionString = string.Format(\"{0} {1} {2}\", historyItem.Caption, message.SessionId, transportMessage.MessageId);\r\n                    SendPacketAsync(_activeTransport, captionString, encryptedMessage,\r\n                        result =>\r\n                        {\r\n                            Debug.WriteLine(\"@{0} {1} result {2}\", string.Format(\"{0}: {1}\", historyItem.Caption, \"seqNo\"), transportMessage.MessageId.Value, result);\r\n\r\n                        },//ReceiveBytesAsync(result, authKey)}, \r\n                        error => { if (faultCallback != null) faultCallback(null); });\r\n\r\n                    break;\r\n            }\r\n        }\r\n\r\n\r\n\r\n        private void ProcessBadServerSalt(TLTransportMessage message, TLBadServerSalt badServerSalt, HistoryItem historyItem)\r\n        {\r\n            if (historyItem == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var transportMessage = (TLContainerTransportMessage)historyItem.Message;\r\n            lock (_historyRoot)\r\n            {\r\n                _history.Remove(historyItem.Hash);\r\n            }\r\n#if DEBUG\r\n            NotifyOfPropertyChange(() => History);\r\n#endif\r\n\r\n            TLUtils.WriteLine(\"CORRECT SERVER SALT:\");\r\n            ((TLTransportMessage)transportMessage).Salt = badServerSalt.NewServerSalt;\r\n            //Salt = badServerSalt.NewServerSalt;\r\n            TLUtils.WriteLine(\"New salt: \" + _activeTransport.Salt);\r\n\r\n            switch (badServerSalt.ErrorCode.Value)\r\n            {\r\n                case 16:\r\n                case 17:\r\n                    TLUtils.WriteLine(\"3. CORRECT TIME DELTA with Salt by activeTransport \" + _activeTransport.DCId);\r\n\r\n                    var saveConfig = false;\r\n                    lock (_activeTransportRoot)\r\n                    {\r\n                        var serverTime = message.MessageId.Value;\r\n                        TLUtils.WriteLine(\"Server time: \" + TLUtils.MessageIdString(BitConverter.GetBytes(serverTime)));\r\n                        var clientTime = _activeTransport.GenerateMessageId().Value;\r\n                        TLUtils.WriteLine(\"Client time: \" + TLUtils.MessageIdString(BitConverter.GetBytes(clientTime)));\r\n\r\n                        if (historyItem.ClientTicksDelta == _activeTransport.ClientTicksDelta)\r\n                        {\r\n                            saveConfig = true;\r\n                            _activeTransport.ClientTicksDelta += serverTime - clientTime;\r\n                        }\r\n\r\n                        transportMessage.MessageId = _activeTransport.GenerateMessageId(true);\r\n                        TLUtils.WriteLine(\"Corrected client time: \" + TLUtils.MessageIdString(transportMessage.MessageId));\r\n                    }\r\n\r\n                    if (saveConfig && _config != null)\r\n                    {\r\n                        var dcOption = _config.DCOptions.FirstOrDefault(x => string.Equals(x.IpAddress.ToString(), _activeTransport.Host, StringComparison.OrdinalIgnoreCase));\r\n                        if (dcOption != null)\r\n                        {\r\n                            dcOption.ClientTicksDelta = _activeTransport.ClientTicksDelta;\r\n                            _cacheService.SetConfig(_config);\r\n                        }\r\n                    }\r\n\r\n                    break;\r\n                case 48:\r\n                    break;\r\n            }\r\n\r\n            if (transportMessage == null) return;\r\n\r\n            var authKey = _activeTransport.AuthKey;\r\n            var encryptedMessage = CreateTLEncryptedMessage(authKey, transportMessage);\r\n            lock (_historyRoot)\r\n            {\r\n                _history[historyItem.Hash] = historyItem;\r\n            }\r\n            var faultCallback = historyItem.FaultCallback;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                if (_activeTransport.Closed)\r\n                {\r\n                    _activeTransport = GetTransport(_activeTransport.Host, _activeTransport.Port, Type,\r\n                        new TransportSettings\r\n                        {\r\n                            DcId = _activeTransport.DCId,\r\n                            Secret = _activeTransport.Secret,\r\n                            AuthKey = _activeTransport.AuthKey,\r\n                            Salt = _activeTransport.Salt,\r\n                            SessionId = _activeTransport.SessionId,\r\n                            MessageIdDict = _activeTransport.MessageIdDict,\r\n                            SequenceNumber = _activeTransport.SequenceNumber,\r\n                            ClientTicksDelta = _activeTransport.ClientTicksDelta,\r\n                            PacketReceivedHandler = OnPacketReceived\r\n                        });\r\n                }\r\n            }\r\n\r\n            var captionString = string.Format(\"{0} {1} {2}\", historyItem.Caption, message.SessionId, transportMessage.MessageId);\r\n            SendPacketAsync(_activeTransport, captionString, encryptedMessage,\r\n                result =>\r\n                {\r\n                    Debug.WriteLine(\"@{0} {1} result {2}\", historyItem.Caption, transportMessage.MessageId.Value, result);\r\n\r\n                },//ReceiveBytesAsync(result, authKey)}, \r\n                error => { if (faultCallback != null) faultCallback(new TLRPCError { Code = new TLInt(404), Message = new TLString(\"TCPTransport error\") }); });\r\n        }\r\n\r\n\r\n        private readonly IDisposable _statusSubscription;\r\n\r\n        public event EventHandler<SendStatusEventArgs> SendStatus;\r\n\r\n        public void RaiseSendStatus(SendStatusEventArgs e)\r\n        {\r\n            var handler = SendStatus;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _statusSubscription.Dispose();\r\n        }\r\n\r\n        private string _message;\r\n\r\n        public string Message\r\n        {\r\n            get { return _message; }\r\n            set\r\n            {\r\n                if (_message != value)\r\n                {\r\n                    _message = value;\r\n                    NotifyOfPropertyChange(() => Message);\r\n                }\r\n            }\r\n        }\r\n\r\n        private DispatcherTimer _messageScheduler;\r\n\r\n        public void SetMessageOnTime(double seconds, string message)\r\n        {\r\n            //Logs.Log.Write(string.Format(\"MTProtoService.SetMessageOnTime sec={0}, message={1}\", seconds, message));\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (_messageScheduler == null)\r\n                {\r\n                    _messageScheduler = new DispatcherTimer();\r\n                    _messageScheduler.Tick += MessageScheduler_Tick;\r\n                }\r\n\r\n                _messageScheduler.Stop();\r\n                Message = message;\r\n                _messageScheduler.Interval = TimeSpan.FromSeconds(seconds);\r\n                _messageScheduler.Start();\r\n            });\r\n        }\r\n\r\n#if WINDOWS_PHONE\r\n        private void MessageScheduler_Tick(object sender, EventArgs e)\r\n#elif WIN_RT\r\n        private void MessageScheduler_Tick(object sender, object args)\r\n#endif\r\n        {\r\n            Message = string.Empty;\r\n            _messageScheduler.Stop();\r\n        }\r\n\r\n        private ITransport GetTransportWithProxyInternal(GetTransportWithProxyFunc getTransportAction, string host, int port, TransportType type, bool checkStatic, TransportSettings settings, TLProxyBase proxy)\r\n        {\r\n            bool isCreated;\r\n            var staticHost = host;\r\n            var staticPort = port;\r\n\r\n            // looking for static dcOption with none empty config\r\n            if (checkStatic)\r\n            {\r\n                var staticOption = GetStaticDCOption(settings.DcId);\r\n                if (staticOption != null)\r\n                {\r\n                    staticHost = staticOption.IpAddress.ToString();\r\n                    staticPort = staticOption.Port.Value;\r\n                }\r\n            }\r\n\r\n            ITransport transport;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                transport = getTransportAction(host, port, staticHost, staticPort, type, TLUtils.GetProtocolDCId(settings.DcId, false, Constants.IsTestServer), settings.Secret, proxy, out isCreated);\r\n            }\r\n            if (isCreated)\r\n            {\r\n                transport.DCId = settings.DcId;\r\n                transport.Secret = settings.Secret;\r\n                transport.AuthKey = settings.AuthKey;\r\n                transport.Salt = settings.Salt;\r\n                transport.SessionId = settings.SessionId;\r\n                transport.MessageIdDict = settings.MessageIdDict;\r\n                transport.SequenceNumber = settings.SequenceNumber;\r\n                transport.ClientTicksDelta = settings.ClientTicksDelta;\r\n                transport.PacketReceived += settings.PacketReceivedHandler;\r\n            }\r\n\r\n            return transport;\r\n        }\r\n\r\n        private TLDCOption GetStaticDCOption(int dcId)\r\n        {\r\n            if (_config == null) return null;\r\n\r\n            foreach (var item in _config.DCOptions.Items.Where(x => x.Static.Value))\r\n            {\r\n                if (item.Id.Value == dcId)\r\n                {\r\n                    return item;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private ITransport GetTransportInternal(GetTransportFunc getTransportAction, string host, int port, TransportType type, bool checkStatic, TransportSettings settings)\r\n        {\r\n            bool isCreated;\r\n            var staticHost = host;\r\n            var staticPort = port;\r\n\r\n            // looking for static dcOption with none empty config\r\n            if (checkStatic)\r\n            {\r\n                var staticOption = GetStaticDCOption(settings.DcId);\r\n                if (staticOption != null)\r\n                {\r\n                    staticHost = staticOption.IpAddress.ToString();\r\n                    staticPort = staticOption.Port.Value;\r\n                }\r\n            }\r\n\r\n            ITransport transport;\r\n            lock (_activeTransportRoot)\r\n            {\r\n                transport = getTransportAction(host, port, staticHost, staticPort, type, TLUtils.GetProtocolDCId(settings.DcId, false, Constants.IsTestServer), settings.Secret, out isCreated);\r\n            }\r\n            if (isCreated)\r\n            {\r\n                transport.DCId = settings.DcId;\r\n                transport.Secret = settings.Secret;\r\n                transport.AuthKey = settings.AuthKey;\r\n                transport.Salt = settings.Salt;\r\n                transport.SessionId = settings.SessionId;\r\n                transport.MessageIdDict = settings.MessageIdDict;\r\n                transport.SequenceNumber = settings.SequenceNumber;\r\n                transport.ClientTicksDelta = settings.ClientTicksDelta;\r\n                transport.PacketReceived += settings.PacketReceivedHandler;\r\n            }\r\n\r\n            return transport;\r\n        }\r\n\r\n        private ITransport GetTransport(string host, int port, TransportType type, TransportSettings settings)\r\n        {\r\n            return GetTransportInternal(_transportService.GetTransport, host, port, type, true, settings);\r\n        }\r\n\r\n        private ITransport GetFileTransport(string host, int port, TransportType type, TransportSettings settings)\r\n        {\r\n            return GetTransportInternal(_transportService.GetFileTransport, host, port, type, true, settings);\r\n        }\r\n\r\n        private ITransport GetFileTransport2(string host, int port, int dcId, TransportType type, TransportSettings settings)\r\n        {\r\n            return GetTransportInternal(_transportService.GetFileTransport2, host, port, type, true, settings);\r\n        }\r\n\r\n        private ITransport GetSpecialTransport(string host, int port, TransportType type, TransportSettings settings)\r\n        {\r\n            return GetTransportInternal(_transportService.GetSpecialTransport, host, port, type, false, settings);\r\n        }\r\n\r\n        private ITransport GetSpecialTransportWithProxy(string host, int port, TransportType type, TLProxyBase proxy, TransportSettings settings)\r\n        {\r\n            return GetTransportWithProxyInternal(_transportService.GetSpecialTransport, host, port, type, true, settings, proxy);\r\n        }\r\n    }\r\n\r\n    public class TransportSettings\r\n    {\r\n        public int DcId { get; set; }\r\n        public byte[] Secret { get; set; }\r\n        public byte[] AuthKey { get; set; }\r\n        public TLLong Salt { get; set; }\r\n        public TLLong SessionId { get; set; }\r\n        public Dictionary<long, long> MessageIdDict { get; set; }\r\n        public int SequenceNumber { get; set; }\r\n        public long ClientTicksDelta { get; set; }\r\n        public EventHandler<DataEventArgs> PacketReceivedHandler { get; set; }\r\n    }\r\n\r\n    public class AuthorizationRequiredEventArgs : EventArgs\r\n    {\r\n        public string MethodName { get; set; }\r\n\r\n        public long AuthKeyId { get; set; }\r\n\r\n        public TLRPCError Error { get; set; }\r\n    }\r\n\r\n    public class SendStatusEventArgs : EventArgs\r\n    {\r\n        public TLBool Offline { get; set; }\r\n\r\n        public SendStatusEventArgs(TLBool offline)\r\n        {\r\n            Offline = offline;\r\n        }\r\n    }\r\n\r\n    public class TransportCheckedEventArgs : EventArgs\r\n    {\r\n        public int TransportId { get; set; }\r\n        public TLLong SessionId { get; set; }\r\n        public byte[] AuthKey { get; set; }\r\n        public DateTime? LastReceiveTime { get; set; }\r\n        public int HistoryCount { get; set; }\r\n        public int NextPacketLength { get; set; }\r\n        public int LastPacketLength { get; set; }\r\n        public string HistoryDescription { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/Messages/ISenderService.cs",
    "content": "﻿using Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Messages\r\n{\r\n    public interface ISenderService\r\n    {\r\n        void Send(TLMessageBase message);\r\n        void ResendAll();\r\n\r\n        void Open();\r\n        void Close();\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/Messages/SenderService.cs",
    "content": "﻿using System.Collections.Generic;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Messages\r\n{\r\n    public class SenderService : ISenderService\r\n    {\r\n        private Queue<TLMessageBase> _sendingQueue = new Queue<TLMessageBase>();\r\n\r\n        private IMTProtoService _mtProtoService;\r\n\r\n        public SenderService(IMTProtoService mtProtoService)\r\n        {\r\n            _mtProtoService = mtProtoService;\r\n        }\r\n\r\n        public void Send(TLMessageBase message)\r\n        {\r\n            _sendingQueue.Enqueue(message);\r\n        }\r\n\r\n        public void ResendAll()\r\n        {\r\n            \r\n        }\r\n\r\n        public void Open()\r\n        {\r\n            \r\n        }\r\n\r\n        public void Close()\r\n        {\r\n            \r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/ServiceBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq.Expressions;\r\nusing System.Reflection;\r\nusing System.Runtime.Serialization;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.Services\r\n{\r\n    [DataContract]\r\n    public abstract class TelegramPropertyChangedBase : INotifyPropertyChanged\r\n    {\r\n        /// <summary>\r\n        /// Enables/Disables property change notification.\r\n        /// \r\n        /// </summary>\r\n        public bool IsNotifying { get; set; }\r\n        \r\n        private static bool _isNotifyingGlobal = true;\r\n\r\n        public static bool IsNotifyingGlobal\r\n        {\r\n            get { return _isNotifyingGlobal; }\r\n            set { _isNotifyingGlobal = false; }\r\n        }\r\n\r\n        private static bool _logNotify = false;\r\n\r\n        public static bool LogNotify\r\n        {\r\n            get { return _logNotify; }\r\n            set { _logNotify = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when a property value changes.\r\n        /// \r\n        /// </summary>\r\n        public event PropertyChangedEventHandler PropertyChanged = (param0, param1) => { };\r\n\r\n\r\n        public TelegramPropertyChangedBase()\r\n        {\r\n            IsNotifying = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises a change notification indicating that all bindings should be refreshed.\r\n        /// \r\n        /// </summary>\r\n        public void Refresh()\r\n        {\r\n            NotifyOfPropertyChange(String.Empty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Notifies subscribers of the property change.\r\n        /// \r\n        /// </summary>\r\n        /// <param name=\"propertyName\">Name of the property.</param>\r\n        public virtual void NotifyOfPropertyChange(string propertyName)\r\n        {\r\n            if (!IsNotifyingGlobal)\r\n                return;\r\n\r\n            if (!IsNotifying)\r\n                return;\r\n\r\n#if DEBUG\r\n            if (LogNotify)\r\n            {\r\n                Debug.WriteLine(\"Notify \" + propertyName + \" \" + GetType());\r\n            }\r\n#endif\r\n            if (Execute.CheckAccess())\r\n            {\r\n                OnPropertyChanged(new PropertyChangedEventArgs(propertyName));\r\n            }\r\n            else\r\n            {\r\n                Execute.BeginOnUIThread(() => OnPropertyChanged(new PropertyChangedEventArgs(propertyName)));\r\n            }\r\n            //Execute.OnUIThread(() => OnPropertyChanged(new PropertyChangedEventArgs(propertyName)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Notifies subscribers of the property change.\r\n        /// \r\n        /// </summary>\r\n        /// <typeparam name=\"TProperty\">The type of the property.</typeparam><param name=\"property\">The property expression.</param>\r\n        public void NotifyOfPropertyChange<TProperty>(Expression<Func<TProperty>> property)\r\n        {\r\n            this.NotifyOfPropertyChange(GetMemberInfo(property).Name);\r\n        }\r\n\r\n        public static MemberInfo GetMemberInfo(Expression expression)\r\n        {\r\n            var lambdaExpression = (LambdaExpression)expression;\r\n            return (!(lambdaExpression.Body is UnaryExpression) ? (MemberExpression)lambdaExpression.Body : (MemberExpression)((UnaryExpression)lambdaExpression.Body).Operand).Member;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the <see cref=\"E:PropertyChanged\"/> event directly.\r\n        /// \r\n        /// </summary>\r\n        /// <param name=\"e\">The <see cref=\"T:System.ComponentModel.PropertyChangedEventArgs\"/> instance containing the event data.</param>\r\n        [EditorBrowsable(EditorBrowsableState.Never)]\r\n        protected void OnPropertyChanged(PropertyChangedEventArgs e)\r\n        {\r\n            PropertyChangedEventHandler changedEventHandler = PropertyChanged;\r\n            if (changedEventHandler == null)\r\n                return;\r\n            changedEventHandler(this, e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the object is deserialized.\r\n        /// \r\n        /// </summary>\r\n        /// <param name=\"c\">The streaming context.</param>\r\n        [OnDeserialized]\r\n        public void OnDeserialized(StreamingContext c)\r\n        {\r\n            IsNotifying = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Used to indicate whether or not the IsNotifying property is serialized to Xml.\r\n        /// \r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Whether or not to serialize the IsNotifying property. The default is false.\r\n        /// </returns>\r\n        public virtual bool ShouldSerializeIsNotifying()\r\n        {\r\n            return false;\r\n        }\r\n    }\r\n\r\n    public abstract class ServiceBase : TelegramPropertyChangedBase\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/Updates/IUpdatesService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Updates\r\n{\r\n    public delegate void GetDifferenceAction(TLInt pts, TLInt date, TLInt qts, Action<TLDifferenceBase> callback, Action<TLRPCError> faultCallback);\r\n    public delegate void GetDHConfigAction(TLInt version, TLInt randomLength, Action<TLDHConfigBase> callback, Action<TLRPCError> faultCallback);\r\n    public delegate void AcceptEncryptionAction(TLInputEncryptedChat peer, TLString gb, TLLong keyFingerprint, Action<TLEncryptedChatBase> callback, Action<TLRPCError> faultCallback);\r\n    public delegate void SendEncryptedServiceAction(TLInputEncryptedChat peer, TLLong randomkId, TLString data, Action<TLSentEncryptedMessage> callback, Action<TLRPCError> faultCallback);\r\n    public delegate void UpdateChannelAction(TLInt channelId, Action<TLMessagesChatFull> callback, Action<TLRPCError> faultCallback);\r\n    public delegate void GetFullChatAction(TLInt chatId, Action<TLMessagesChatFull> callback, Action<TLRPCError> faultCallback);\r\n    public delegate void GetFullUserAction(TLInputUserBase userId, Action<TLUserFull> callback, Action<TLRPCError> faultCallback);\r\n    public delegate void GetPinnedDialogsAction(Action<TLPeerDialogs> callback, Action<TLRPCError> faultCallback = null);\r\n    public delegate void GetChannelMessagesAction(TLInputChannelBase channelId, TLVector<TLInputMessageBase> id, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback);\r\n    public delegate void GetMessagesAction(TLVector<TLInputMessageBase> id, Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null);\r\n    public delegate void GetPeerDialogsAction(TLInputPeerBase peer, Action<TLPeerDialogs> callback, Action<TLRPCError> faultCallback = null);\r\n    public delegate void GetPromoDialogAction(TLInputPeerBase peer, Action<TLPeerDialogs> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n    public delegate void SetMessageOnTimeAtion(double seconds, string message);\r\n\r\n    public interface IUpdatesService\r\n    {\r\n        bool ProcessUpdateInternal(TLUpdateBase update, bool notifyNewMessage = true);\r\n\r\n        void CancelUpdating();\r\n\r\n        IList<ExceptionInfo> SyncDifferenceExceptions { get; }\r\n        //void IncrementClientSeq();\r\n\r\n        Func<TLInt> GetCurrentUserId { get; set; }\r\n\r\n        Action<Action<TLState>, Action<TLRPCError>> GetStateAsync { get; set; }\r\n        GetDHConfigAction GetDHConfigAsync { get; set; }\r\n        GetDifferenceAction GetDifferenceAsync { get; set; }\r\n        AcceptEncryptionAction AcceptEncryptionAsync { get; set; }\r\n        SendEncryptedServiceAction SendEncryptedServiceAsync { get; set; }\r\n        SetMessageOnTimeAtion SetMessageOnTimeAsync { get; set; }\r\n        Action<TLLong> RemoveFromQueue { get; set; }\r\n        UpdateChannelAction UpdateChannelAsync { get; set; }\r\n        GetFullChatAction GetFullChatAsync { get; set; }\r\n        GetFullUserAction GetFullUserAsync { get; set; }\r\n        GetChannelMessagesAction GetChannelMessagesAsync { get; set; }\r\n        GetPinnedDialogsAction GetPinnedDialogsAsync { get; set; }\r\n        GetMessagesAction GetMessagesAsync { get; set; }\r\n        GetPeerDialogsAction GetPeerDialogsAsync { get; set; }\r\n        GetPromoDialogAction GetPromoDialogAsync { get; set; }\r\n\r\n        void SetInitState();\r\n\r\n        TLInt ClientSeq { get; }\r\n        void SetState(TLInt seq, TLInt pts, TLInt qts, TLInt date, TLInt unreadCount, string caption, bool cleanupMissingCounts = false);\r\n        void SetState(IMultiPts multiPts, string caption);\r\n        void ProcessTransportMessage(TLTransportMessage transportMessage);\r\n        void ProcessUpdates(TLUpdatesBase updates, bool notifyNewMessages = false);\r\n\r\n        void LoadStateAndUpdate(long acceptedCallId, Action callback);\r\n        void SaveState();\r\n        TLState GetState();\r\n        void ClearState();\r\n\r\n        void SaveStateSnapshot(string toDirectoryName);\r\n        void LoadStateSnapshot(string fromDirectoryName);\r\n\r\n        event EventHandler<DCOptionsUpdatedEventArgs> DCOptionsUpdated;\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/Updates/ReceiveUpdatesEventArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Updates\r\n{\r\n    public class ReceiveUpdatesEventArgs : EventArgs\r\n    {\r\n        public TLUpdates Updates { get; protected set; }\r\n\r\n        public ReceiveUpdatesEventArgs(TLUpdates updates)\r\n        {\r\n            Updates = updates;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Services/Updates/UpdatesBySeqComparer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Updates\r\n{\r\n    //public class UpdatesBySeqComparer : IComparer<TLUpdatesBase>\r\n    //{\r\n    //    private const int XIsLessThanY = -1;\r\n    //    private const int XEqualsY = 0;\r\n    //    private const int XIsGreaterThanY = 1;\r\n\r\n    //    public int Compare(TLUpdatesBase x, TLUpdatesBase y)\r\n    //    {\r\n    //        var xSeq = x.GetSeq();\r\n    //        var ySeq = y.GetSeq();\r\n\r\n    //        if (xSeq == null && ySeq == null)\r\n    //        {\r\n    //            return x is TLUpdatesShort ? XIsLessThanY : XIsGreaterThanY;\r\n    //        }\r\n\r\n    //        if (xSeq == null)\r\n    //        {\r\n    //            return XIsGreaterThanY;\r\n    //        }\r\n\r\n    //        if (ySeq == null)\r\n    //        {\r\n    //            return XIsLessThanY;\r\n    //        }\r\n\r\n    //        return xSeq.Value < ySeq.Value ? XIsLessThanY : (xSeq == ySeq ? XEqualsY : XIsGreaterThanY);\r\n    //    }\r\n    //}\r\n}"
  },
  {
    "path": "Telegram.Api/Services/Updates/UpdatesService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define LOG_CLIENTSEQ\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing Org.BouncyCastle.Bcpg;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Logs;\r\n#if DEBUG\r\nusing System.Windows;\r\n#endif\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Updates\r\n{\r\n    public class MockupUpdatesService : IUpdatesService\r\n    {\r\n        public void CancelUpdating()\r\n        {\r\n\r\n        }\r\n\r\n        public IList<ExceptionInfo> SyncDifferenceExceptions { get; private set; }\r\n        public Func<TLInt> GetCurrentUserId { get; set; }\r\n        public Action<Action<TLState>, Action<TLRPCError>> GetStateAsync { get; set; }\r\n        public GetDHConfigAction GetDHConfigAsync { get; set; }\r\n        public GetDifferenceAction GetDifferenceAsync { get; set; }\r\n        public AcceptEncryptionAction AcceptEncryptionAsync { get; set; }\r\n        public SendEncryptedServiceAction SendEncryptedServiceAsync { get; set; }\r\n        public SetMessageOnTimeAtion SetMessageOnTimeAsync { get; set; }\r\n        public Action<TLLong> RemoveFromQueue { get; set; }\r\n        public UpdateChannelAction UpdateChannelAsync { get; set; }\r\n        public GetFullChatAction GetFullChatAsync { get; set; }\r\n        public GetFullUserAction GetFullUserAsync { get; set; }\r\n        public GetChannelMessagesAction GetChannelMessagesAsync { get; set; }\r\n        public GetPinnedDialogsAction GetPinnedDialogsAsync { get; set; }\r\n        public GetMessagesAction GetMessagesAsync { get; set; }\r\n        public GetPeerDialogsAction GetPeerDialogsAsync { get; set; }\r\n        public GetPromoDialogAction GetPromoDialogAsync { get; set; }\r\n\r\n        public void SetInitState()\r\n        {\r\n\r\n        }\r\n\r\n        public TLInt ClientSeq { get; private set; }\r\n\r\n        public void SetState(TLInt seq, TLInt pts, TLInt qts, TLInt date, TLInt unreadCount, string caption, bool cleanupMissingCounts = false)\r\n        {\r\n\r\n        }\r\n\r\n        public void SetState(IMultiPts multiPts, string caption)\r\n        {\r\n\r\n        }\r\n\r\n        public void ProcessTransportMessage(TLTransportMessage transportMessage)\r\n        {\r\n\r\n        }\r\n\r\n        public void ProcessUpdates(TLUpdatesBase updates, bool notifyNewMessages = false)\r\n        {\r\n\r\n        }\r\n\r\n        public void LoadStateAndUpdate(long acceptedCallId, Action callback)\r\n        {\r\n\r\n        }\r\n\r\n        public void SaveState()\r\n        {\r\n\r\n        }\r\n\r\n        public TLState GetState()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public void ClearState()\r\n        {\r\n\r\n        }\r\n\r\n        public void SaveStateSnapshot(string toDirectoryName)\r\n        {\r\n\r\n        }\r\n\r\n        public void LoadStateSnapshot(string fromDirectoryName)\r\n        {\r\n\r\n        }\r\n\r\n        public event EventHandler<DCOptionsUpdatedEventArgs> DCOptionsUpdated;\r\n\r\n        public bool ProcessUpdateInternal(TLUpdateBase update, bool notifyNewMessage = true)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class UpdatesService : IUpdatesService\r\n    {\r\n        public TLUserBase CurrentUser { get; set; }\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        public Func<TLInt> GetCurrentUserId { get; set; }\r\n\r\n        public Action<Action<TLState>, Action<TLRPCError>> GetStateAsync { get; set; }\r\n        public GetDHConfigAction GetDHConfigAsync { get; set; }\r\n        public GetDifferenceAction GetDifferenceAsync { get; set; }\r\n        public AcceptEncryptionAction AcceptEncryptionAsync { get; set; }\r\n        public SendEncryptedServiceAction SendEncryptedServiceAsync { get; set; }\r\n        public SetMessageOnTimeAtion SetMessageOnTimeAsync { get; set; }\r\n        public Action<TLLong> RemoveFromQueue { get; set; }\r\n        public UpdateChannelAction UpdateChannelAsync { get; set; }\r\n        public GetFullChatAction GetFullChatAsync { get; set; }\r\n        public GetFullUserAction GetFullUserAsync { get; set; }\r\n        public GetChannelMessagesAction GetChannelMessagesAsync { get; set; }\r\n        public GetPinnedDialogsAction GetPinnedDialogsAsync { get; set; }\r\n        public GetMessagesAction GetMessagesAsync { get; set; }\r\n        public GetPeerDialogsAction GetPeerDialogsAsync { get; set; }\r\n        public GetPromoDialogAction GetPromoDialogAsync { get; set; }\r\n\r\n        private readonly Timer _lostSeqTimer;\r\n\r\n        private readonly Timer _lostPtsTimer;\r\n\r\n        public UpdatesService(ICacheService cacheService, ITelegramEventAggregator eventAggregator)\r\n        {\r\n            _lostSeqTimer = new Timer(OnCheckLostSeq, this, Timeout.Infinite, Timeout.Infinite);\r\n            _lostPtsTimer = new Timer(OnCheckLostPts, this, Timeout.Infinite, Timeout.Infinite);\r\n\r\n            _cacheService = cacheService;\r\n            _eventAggregator = eventAggregator;\r\n        }\r\n\r\n        private void StartLostSeqTimer()\r\n        {\r\n            _lostSeqTimer.Change(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0));\r\n            TLUtils.WriteLine(DateTime.Now.ToString(\"  HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" Start lostSeqTimer\", LogSeverity.Error);\r\n\r\n        }\r\n\r\n        private void StopLostSeqTimer()\r\n        {\r\n            _lostSeqTimer.Change(Timeout.Infinite, Timeout.Infinite);\r\n            TLUtils.WriteLine(DateTime.Now.ToString(\"  HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" Stop lostSeqTimer\", LogSeverity.Error);\r\n        }\r\n\r\n        private void StartLostPtsTimer()\r\n        {\r\n            _lostPtsTimer.Change(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0));\r\n            TLUtils.WriteLine(DateTime.Now.ToString(\"  HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" Start lostPtsTimer\", LogSeverity.Error);\r\n\r\n        }\r\n\r\n        private void StopLostPtsTimer()\r\n        {\r\n            _lostPtsTimer.Change(Timeout.Infinite, Timeout.Infinite);\r\n            TLUtils.WriteLine(DateTime.Now.ToString(\"  HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" Stop lostPtsTimer\", LogSeverity.Error);\r\n        }\r\n\r\n        private void OnCheckLostSeq(object state)\r\n        {\r\n            TLUtils.WriteLine(DateTime.Now.ToString(\"  HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" OnCheck lostSeqTimer\", LogSeverity.Error);\r\n            var getDifference = false;\r\n            var isLostSeqEmpty = true;\r\n            var keyValuePair = default(KeyValuePair<int, WindowsPhone.Tuple<DateTime, TLState>>);\r\n            lock (_clientSeqLock)\r\n            {\r\n                foreach (var keyValue in _lostSeq.OrderBy(x => x.Key))\r\n                {\r\n                    isLostSeqEmpty = false;\r\n                    if (DateTime.Now > keyValue.Value.Item1.AddSeconds(3.0))\r\n                    {\r\n                        getDifference = true;\r\n                        keyValuePair = keyValue;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (isLostSeqEmpty)\r\n            {\r\n                StopLostSeqTimer();\r\n            }\r\n\r\n            if (getDifference)\r\n            {\r\n                var seq = keyValuePair.Key;\r\n                var pts = keyValuePair.Value.Item2.Pts;\r\n                var date = keyValuePair.Value.Item2.Date;\r\n                var qts = keyValuePair.Value.Item2.Qts;\r\n\r\n                Helpers.Execute.ShowDebugMessage(string.Format(\"stub lostSeqTimer.getDifference(seq={0}, pts={1}, date={2}, qts={3}) localState=[seq={4}, pts={5}, date={6}, qts={7}]\", seq, pts, date, qts, ClientSeq, _pts, _date, _qts));\r\n                StopLostSeqTimer();\r\n\r\n                lock (_clientSeqLock)\r\n                {\r\n                    _lostSeq.Clear();\r\n                }\r\n                //GetDifference(() =>\r\n                //{\r\n\r\n                //});\r\n            }\r\n        }\r\n\r\n        private void OnCheckLostPts(object state)\r\n        {\r\n            TLUtils.WriteLine(DateTime.Now.ToString(\"  HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" OnCheck lostPtsTimer\", LogSeverity.Error);\r\n            var getDifference = false;\r\n            var isLostPtsEmpty = true;\r\n            var keyValuePair = default(KeyValuePair<int, WindowsPhone.Tuple<DateTime, TLState>>);\r\n            lock (_clientPtsLock)\r\n            {\r\n                foreach (var keyValue in _lostPts.OrderBy(x => x.Key))\r\n                {\r\n                    isLostPtsEmpty = false;\r\n                    if (DateTime.Now > keyValue.Value.Item1.AddSeconds(3.0))\r\n                    {\r\n                        getDifference = true;\r\n                        keyValuePair = keyValue;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (isLostPtsEmpty)\r\n            {\r\n                StopLostPtsTimer();\r\n            }\r\n\r\n            if (getDifference)\r\n            {\r\n                var seq = keyValuePair.Value.Item2.Seq;\r\n                var pts = keyValuePair.Key;\r\n                var date = keyValuePair.Value.Item2.Date;\r\n                var qts = keyValuePair.Value.Item2.Qts;\r\n\r\n                Helpers.Execute.ShowDebugMessage(string.Format(\"stub lostSeqTimer.getDifference(seq={0}, pts={1}, date={2}, qts={3}) localState=[seq={4}, pts={5}, date={6}, qts={7}]\", seq, pts, date, qts, ClientSeq, _pts, _date, _qts));\r\n                StopLostPtsTimer();\r\n\r\n                lock (_clientPtsLock)\r\n                {\r\n                    _lostPts.Clear();\r\n                }\r\n                //GetDifference(() =>\r\n                //{\r\n\r\n                //});\r\n            }\r\n        }\r\n\r\n        public void SetState(IMultiPts multiPts, string caption)\r\n        {\r\n            var ptsList = TLUtils.GetPtsRange(multiPts);\r\n\r\n            if (ptsList.Count == 0)\r\n            {\r\n                ptsList.Add(multiPts.Pts);\r\n            }\r\n#if LOG_CLIENTSEQ\r\n            TLUtils.WriteLine(string.Format(\"{0} {1}\\nclientSeq={2} newSeq={3}\\npts={4} ptsList={5}\\n\", DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture), caption, ClientSeq != null ? ClientSeq.ToString() : \"null\", \"null\", _pts != null ? _pts.ToString() : \"null\", ptsList.Count > 0 ? string.Join(\", \", ptsList) : \"null\"), LogSeverity.Error);\r\n#endif\r\n            UpdateLostPts(ptsList);\r\n        }\r\n\r\n        public TLInt ClientSeq { get; protected set; }\r\n\r\n        private TLInt _dateInternal;\r\n\r\n        private TLInt _date\r\n        {\r\n            get { return _dateInternal; }\r\n            set\r\n            {\r\n                _dateInternal = value;\r\n            }\r\n        }\r\n\r\n        private TLInt _pts;\r\n\r\n        private TLInt _qts = new TLInt(1);\r\n\r\n        private TLInt _unreadCount;\r\n\r\n        public void SetState(TLInt seq, TLInt pts, TLInt qts, TLInt date, TLInt unreadCount, string caption, bool cleanupMissingCounts = false)\r\n        {\r\n#if LOG_CLIENTSEQ\r\n            TLUtils.WriteLine(string.Format(\"{0} {1}\\nclientSeq={2} newSeq={3}\\npts={4} newPts={5}\\n\", DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture), caption, ClientSeq != null ? ClientSeq.ToString() : \"null\", seq, _pts != null ? _pts.ToString() : \"null\", pts), LogSeverity.Error);\r\n            //TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" \" + caption + \" clientSeq=\" + ClientSeq + \" newSeq=\" + seq + \" pts=\" + pts, LogSeverity.Error);\r\n#endif\r\n            if (seq != null)\r\n            {\r\n                UpdateLostSeq(new List<TLInt> { seq }, cleanupMissingCounts);\r\n            }\r\n\r\n            _date = date ?? _date;\r\n\r\n            if (pts != null)\r\n            {\r\n                UpdateLostPts(new List<TLInt> { pts }, cleanupMissingCounts);\r\n            }\r\n\r\n            _qts = qts ?? _qts;\r\n            _unreadCount = unreadCount ?? _unreadCount;\r\n        }\r\n\r\n        public void SetState(TLState state, string caption)\r\n        {\r\n            if (state == null) return;\r\n\r\n            Debug.WriteLine(\"SetState state={0}\", state);\r\n            SetState(state.Seq, state.Pts, state.Qts, state.Date, state.UnreadCount, caption, true);\r\n        }\r\n\r\n        public void SetInitState()\r\n        {\r\n            GetStateAsync.SafeInvoke(\r\n                result => SetState(result, \"setInitState\"),\r\n                error => Execute.BeginOnThreadPool(TimeSpan.FromSeconds(5.0), SetInitState));\r\n        }\r\n\r\n        private readonly object _getDifferenceRequestRoot = new object();\r\n\r\n        private readonly IList<int> _getDifferenceRequests = new List<int>();\r\n\r\n        private bool RequestExists(int id)\r\n        {\r\n            var result = false;\r\n            lock (_getDifferenceRequestRoot)\r\n            {\r\n                foreach (var differenceRequest in _getDifferenceRequests)\r\n                {\r\n                    if (differenceRequest == id)\r\n                    {\r\n                        result = true;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        private void AddRequest(int id)\r\n        {\r\n            lock (_getDifferenceRequestRoot)\r\n            {\r\n                _getDifferenceRequests.Add(id);\r\n            }\r\n        }\r\n\r\n        private void RemoveRequest(int id)\r\n        {\r\n            lock (_getDifferenceRequestRoot)\r\n            {\r\n                _getDifferenceRequests.Remove(id);\r\n            }\r\n        }\r\n\r\n        public void CancelUpdating()\r\n        {\r\n            lock (_getDifferenceRequestRoot)\r\n            {\r\n                _getDifferenceRequests.Clear();\r\n            }\r\n        }\r\n\r\n        private void GetDifference(int id, Action callback)\r\n        {\r\n            if (_pts != null && _date != null && _qts != null)\r\n            {\r\n                GetDifference(id, _pts, _date, _qts, callback);\r\n            }\r\n            else\r\n            {\r\n                SetInitState();\r\n                callback();\r\n            }\r\n        }\r\n\r\n        private void GetDifference(int id, TLInt pts, TLInt date, TLInt qts, Action callback)\r\n        {\r\n            Logs.Log.Write(string.Format(\"UpdatesService.GetDifference {0} state=[p={1} d={2} q={3}]\", id, _pts, _date, _qts));\r\n            TLUtils.WritePerformance(string.Format(\"UpdatesService.GetDifference pts={0} date={1} qts={2}\", _pts, _date, _qts));\r\n\r\n            GetDifferenceAsync(pts, date, qts,\r\n                diff =>\r\n                {\r\n                    //#if DEBUG\r\n                    //                    Execute.BeginOnThreadPool(TimeSpan.FromSeconds(5.0), () =>\r\n                    //                    {\r\n                    //#endif\r\n\r\n                    var processDiffStopwatch = Stopwatch.StartNew();\r\n\r\n                    var differenceEmpty = diff as TLDifferenceEmpty;\r\n                    if (differenceEmpty != null)\r\n                    {\r\n#if LOG_CLIENTSEQ\r\n                        TLUtils.WriteLine(\r\n                            string.Format(\"{0} {1} clientSeq={2} newSeq={3} pts={4}\",\r\n                                DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture),\r\n                                \"processDiff empty\", ClientSeq, differenceEmpty.Seq, _pts), LogSeverity.Error);\r\n#endif\r\n                        _date = differenceEmpty.Date;\r\n                        lock (_clientSeqLock)\r\n                        {\r\n                            ClientSeq = differenceEmpty.Seq;\r\n                        }\r\n\r\n                        Logs.Log.Write(string.Format(\"UpdatesService.GetDifference {0} result {1} elapsed={2}\", id,\r\n                            diff, processDiffStopwatch.Elapsed));\r\n\r\n                        TLUtils.WritePerformance(\"UpdateService.GetDifference empty result=\" + differenceEmpty.Seq);\r\n\r\n                        Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            var updateChannelTooLongList = new List<TLUpdateChannelTooLong>();\r\n\r\n                            lock (_updateChannelTooLongSyncRoot)\r\n                            {\r\n                                foreach (var keyValue in _updateChannelTooLongList)\r\n                                {\r\n                                    updateChannelTooLongList.Add(keyValue.Value);\r\n                                }\r\n                                _updateChannelTooLongList.Clear();\r\n                            }\r\n\r\n                            _eventAggregator.Publish(new UpdateChannelsEventArgs\r\n                            {\r\n                                UpdateChannelTooLongList = updateChannelTooLongList\r\n                            });\r\n                        });\r\n\r\n                        callback();\r\n                        return;\r\n                    }\r\n\r\n                    var difference = diff as TLDifference;\r\n                    if (difference != null)\r\n                    {\r\n                        //Logs.Log.Write(\"UpdatesService.Publish UpdatingEventArgs\");\r\n                        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(new UpdatingEventArgs()));\r\n\r\n                        var resetEvent = new ManualResetEvent(false);\r\n\r\n                        TLUtils.WritePerformance(\r\n                            string.Format(\"UpdateService.GetDifference result=[Pts={0} Date={1} Qts={2}]\",\r\n                                difference.State.Pts, difference.State.Date, difference.State.Qts));\r\n                        lock (_clientSeqLock)\r\n                        {\r\n                            SetState(difference.State, \"processDiff\");\r\n                        }\r\n                        ProcessDifference(difference, () => resetEvent.Set());\r\n\r\n#if DEBUG\r\n                        resetEvent.WaitOne();\r\n#else\r\n                        resetEvent.WaitOne(10000);\r\n#endif\r\n                    }\r\n\r\n                    var otherInfo = new StringBuilder();\r\n                    if (difference != null && difference.OtherUpdates.Count > 0)\r\n                    {\r\n                        otherInfo.AppendLine();\r\n                        for (var i = 0; i < difference.OtherUpdates.Count; i++)\r\n                        {\r\n                            otherInfo.AppendLine(difference.OtherUpdates[i].ToString());\r\n                        }\r\n                    }\r\n                    Logs.Log.Write(string.Format(\"UpdatesService.GetDifference {0} result {1} elapsed={2}{3}\", id,\r\n                        diff, processDiffStopwatch.Elapsed, otherInfo));\r\n\r\n                    var differenceSlice = diff as TLDifferenceSlice;\r\n                    if (differenceSlice != null)\r\n                    {\r\n                        GetDifference(id, callback);\r\n                        //GetDifference(differenceSlice.State.Pts, differenceSlice.State.Date, differenceSlice.State.Qts, callback);\r\n                    }\r\n                    else\r\n                    {\r\n                        Logs.Log.Write(\r\n                            string.Format(\"UpdatesService.GetDifference {0} publish UpdateCompletedEventArgs\", id));\r\n\r\n                        Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            var updateChannelTooLongList = new List<TLUpdateChannelTooLong>();\r\n\r\n                            lock (_updateChannelTooLongSyncRoot)\r\n                            {\r\n                                foreach (var keyValue in _updateChannelTooLongList)\r\n                                {\r\n                                    updateChannelTooLongList.Add(keyValue.Value);\r\n                                }\r\n                                _updateChannelTooLongList.Clear();\r\n                            }\r\n\r\n                            _eventAggregator.Publish(new UpdateCompletedEventArgs\r\n                            {\r\n                                UpdateChannelTooLongList = updateChannelTooLongList\r\n                            });\r\n                        });\r\n                        callback();\r\n                    }\r\n                    //#if DEBUG\r\n                    //                    });\r\n                    //#endif\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.BeginOnThreadPool(TimeSpan.FromSeconds(5.0), () =>\r\n                    {\r\n                        if (!RequestExists(id))\r\n                        {\r\n                            Logs.Log.Write(string.Format(\"UpdatesService.LoadStateAndUpdate {0} CancelGetDifference\", id));\r\n                            return;\r\n                        }\r\n\r\n                        GetDifference(id, callback);\r\n                    });\r\n                });\r\n        }\r\n\r\n        public bool IsCanceled { get; set; }\r\n\r\n        private readonly List<ExceptionInfo> _syncDifferenceExceptions = new List<ExceptionInfo>();\r\n\r\n        public IList<ExceptionInfo> SyncDifferenceExceptions\r\n        {\r\n            get { return _syncDifferenceExceptions; }\r\n        }\r\n\r\n        private void ProcessDifference(TLDifference difference, System.Action callback)\r\n        {\r\n            // в первую очередь синхронизируем пользователей и чаты (секретный чат может создать пользователь, которого у нас нет на клиенте)\r\n            _cacheService.SyncUsersAndChats(difference.Users, difference.Chats,\r\n                result =>\r\n                {\r\n\r\n                    // сначала получаем апдейты, а только потом синхронизируем новые сообщения\r\n                    // т.к. апдейт о создании секретного чата нада обрабатывать раньше, чем новые сообщения в нем\r\n                    foreach (var update in difference.OtherUpdates)\r\n                    {\r\n                        try\r\n                        {\r\n                            ProcessUpdateInternal(update, false);\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            _syncDifferenceExceptions.Add(new ExceptionInfo\r\n                            {\r\n                                Caption = \"UpdatesService.ProcessDifference OtherUpdates\",\r\n                                Exception = ex,\r\n                                Timestamp = DateTime.Now\r\n                            });\r\n\r\n                            TLUtils.WriteException(\"UpdatesService.ProcessDifference OtherUpdates ex \", ex);\r\n                        }\r\n                    }\r\n\r\n                    _cacheService.SyncDifferenceWithoutUsersAndChats(difference,\r\n                        result2 =>\r\n                        {\r\n                            callback.SafeInvoke();\r\n                        },\r\n                        _syncDifferenceExceptions);\r\n                });\r\n        }\r\n\r\n        private bool ProcessUpdatesInternal(TLUpdatesBase updatesBase, bool notifyNewMessage = true)\r\n        {\r\n            //ClientSeq = updates.GetSeq() ?? ClientSeq;\r\n\r\n            var updatesShortSentMessage = updatesBase as TLUpdatesShortSentMessage;\r\n            if (updatesShortSentMessage != null)\r\n            {\r\n                //if (updatesShortSentMessage.Date.Value > 0)\r\n                //{\r\n                //    _date = updatesShortSentMessage.Date;\r\n                //}\r\n\r\n                Execute.ShowDebugMessage(string.Format(\"ProcessUpdatesInternal.UpdatesShortSentMessage: id={0}\", updatesShortSentMessage.Id));\r\n\r\n                return true;\r\n            }\r\n\r\n            // chat message\r\n            var updatesShortChatMessage = updatesBase as TLUpdatesShortChatMessage;\r\n            if (updatesShortChatMessage != null)\r\n            {\r\n                var user = _cacheService.GetUser(updatesShortChatMessage.UserId);\r\n                if (user == null)\r\n                {\r\n                    var logString = string.Format(\"ProcessUpdatesInternal.UpdatesShortChatMessage: user is missing (userId={0}, msgId={1})\", updatesShortChatMessage.UserId, updatesShortChatMessage.Id);\r\n                    Logs.Log.Write(logString);\r\n                    Helpers.Execute.ShowDebugMessage(logString);\r\n                    return false;\r\n                }\r\n                var chat = _cacheService.GetChat(updatesShortChatMessage.ChatId);\r\n                if (chat == null)\r\n                {\r\n                    var logString = string.Format(\"ProcessUpdatesInternal.UpdatesShortChatMessage: chat is missing (chatId={0}, msgId={1})\", updatesShortChatMessage.ChatId, updatesShortChatMessage.Id);\r\n                    Logs.Log.Write(logString);\r\n                    Helpers.Execute.ShowDebugMessage(logString);\r\n                    return false;\r\n                }\r\n\r\n                if (updatesShortChatMessage.Date.Value > 0 && (_date == null || _date.Value < updatesShortChatMessage.Date.Value))\r\n                {\r\n                    _date = updatesShortChatMessage.Date;\r\n                }\r\n\r\n                ContinueShortChatMessage(updatesShortChatMessage, notifyNewMessage);\r\n\r\n                return true;\r\n            }\r\n\r\n            // user message\r\n            var updatesShortMessage = updatesBase as TLUpdatesShortMessage;\r\n            if (updatesShortMessage != null)\r\n            {\r\n                if (_cacheService.GetUser(updatesShortMessage.UserId) == null)\r\n                {\r\n                    var logString = string.Format(\"ProcessUpdatesInternal.UpdatesShortMessage: user is missing (userId={0}, msgId={1})\", updatesShortMessage.UserId, updatesShortMessage.Id);\r\n                    Logs.Log.Write(logString);\r\n                    Helpers.Execute.ShowDebugMessage(logString);\r\n                    return false;\r\n                }\r\n\r\n                if (updatesShortMessage.Date.Value > 0 && (_date == null || _date.Value < updatesShortMessage.Date.Value))\r\n                {\r\n                    _date = updatesShortMessage.Date;\r\n                }\r\n\r\n                ContinueShortMessage(updatesShortMessage, notifyNewMessage);\r\n\r\n                return true;\r\n            }\r\n\r\n            var updatesShort = updatesBase as TLUpdatesShort;\r\n            if (updatesShort != null)\r\n            {\r\n                if (updatesShort.Date.Value > 0 && (_date == null || _date.Value < updatesShort.Date.Value))\r\n                {\r\n                    _date = updatesShort.Date;\r\n                }\r\n                return ProcessUpdateInternal(updatesShort.Update, notifyNewMessage);\r\n            }\r\n\r\n            var updatesCombined = updatesBase as TLUpdatesCombined;\r\n            if (updatesCombined != null)\r\n            {\r\n                var resetEvent = new ManualResetEvent(false);\r\n                var returnValue = true;\r\n\r\n                _cacheService.SyncUsersAndChats(updatesCombined.Users, updatesCombined.Chats,\r\n                    result =>\r\n                    {\r\n                        if (updatesCombined.Date.Value > 0 && (_date == null || _date.Value < updatesCombined.Date.Value))\r\n                        {\r\n                            _date = updatesCombined.Date;\r\n                        }\r\n                        //ClientSeq = combined.Seq;\r\n                        foreach (var update in updatesCombined.Updates)\r\n                        {\r\n                            if (!ProcessUpdateInternal(update, notifyNewMessage))\r\n                            {\r\n                                returnValue = false;\r\n                            }\r\n                        }\r\n\r\n                        resetEvent.Set();\r\n                    });\r\n\r\n                resetEvent.WaitOne(10000);\r\n\r\n                return returnValue;\r\n            }\r\n\r\n            var updates = updatesBase as TLUpdates;\r\n            if (updates != null)\r\n            {\r\n                var resetEvent = new ManualResetEvent(false);\r\n                var returnValue = true;\r\n\r\n                _cacheService.SyncUsersAndChats(updates.Users, updates.Chats,\r\n                    result =>\r\n                    {\r\n                        if (updates.Date.Value > 0 && (_date == null || _date.Value < updates.Date.Value))\r\n                        {\r\n                            _date = updates.Date;\r\n                        }\r\n                        //ClientSeq = updatesFull.Seq;\r\n                        foreach (var update in updates.Updates)\r\n                        {\r\n                            if (!ProcessUpdateInternal(update, notifyNewMessage))\r\n                            {\r\n                                returnValue = false;\r\n                            }\r\n                        }\r\n\r\n                        resetEvent.Set();\r\n                    });\r\n\r\n                resetEvent.WaitOne(10000);\r\n                return returnValue;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void ContinueShortMessage(TLUpdatesShortMessage updatesShortMessage, bool notifyNewMessage)\r\n        {\r\n            var message = TLUtils.GetShortMessage(\r\n                updatesShortMessage.Id,\r\n                updatesShortMessage.UserId,\r\n                new TLPeerUser { Id = GetCurrentUserId() },\r\n                updatesShortMessage.Date,\r\n                updatesShortMessage.Message);\r\n\r\n            var shortMessage40 = updatesShortMessage as TLUpdatesShortMessage40;\r\n            if (shortMessage40 != null)\r\n            {\r\n                message.Flags = shortMessage40.Flags;\r\n                message.FwdFromPeer = shortMessage40.FwdFrom;\r\n                //message.FwdFromId = shortMessage25.FwdFromId;\r\n                message.FwdDate = shortMessage40.FwdDate;\r\n                message.ReplyToMsgId = shortMessage40.ReplyToMsgId;\r\n            }\r\n\r\n            var shortMessage48 = updatesShortMessage as TLUpdatesShortMessage48;\r\n            if (shortMessage48 != null)\r\n            {\r\n                message.FwdHeader = shortMessage48.FwdHeader;\r\n            }\r\n\r\n            var shortMessage45 = updatesShortMessage as TLUpdatesShortMessage45;\r\n            if (shortMessage45 != null)\r\n            {\r\n                message.ViaBotId = shortMessage45.ViaBotId;\r\n            }\r\n\r\n            var shortMessage34 = updatesShortMessage as TLUpdatesShortMessage34;\r\n            if (shortMessage34 != null)\r\n            {\r\n                message.Entities = shortMessage34.Entities;\r\n            }\r\n\r\n            if (message.Out.Value)\r\n            {\r\n                message.ToId = new TLPeerUser { Id = updatesShortMessage.UserId };\r\n                message.FromId = GetCurrentUserId();\r\n            }\r\n\r\n            // set as read\r\n            var readMaxId = _cacheService.GetUser(message.Out.Value ? message.ToId.Id : message.FromId) as IReadMaxId;\r\n            if (readMaxId != null)\r\n            {\r\n                var maxId = message.Out.Value ? readMaxId.ReadOutboxMaxId : readMaxId.ReadInboxMaxId;\r\n                if (maxId != null)\r\n                {\r\n                    if (maxId.Value >= message.Index)\r\n                    {\r\n                        message.SetUnreadSilent(TLBool.False);\r\n                    }\r\n                }\r\n            }\r\n\r\n            MTProtoService.ProcessSelfMessage(message);\r\n\r\n            _cacheService.SyncMessage(message,\r\n                cachedMessage =>\r\n                {\r\n                    if (notifyNewMessage)\r\n                    {\r\n                        _eventAggregator.Publish(cachedMessage);\r\n                    }\r\n                });\r\n        }\r\n\r\n        private void ContinueShortChatMessage(TLUpdatesShortChatMessage updatesShortChatMessage, bool notifyNewMessage)\r\n        {\r\n            var message = TLUtils.GetShortMessage(\r\n                updatesShortChatMessage.Id,\r\n                updatesShortChatMessage.UserId,\r\n                new TLPeerChat { Id = updatesShortChatMessage.ChatId },\r\n                updatesShortChatMessage.Date,\r\n                updatesShortChatMessage.Message);\r\n\r\n            var shortChatMessage40 = updatesShortChatMessage as TLUpdatesShortChatMessage40;\r\n            if (shortChatMessage40 != null)\r\n            {\r\n                message.Flags = shortChatMessage40.Flags;\r\n                message.FwdFromPeer = shortChatMessage40.FwdFrom;\r\n                //message.FwdFromId = shortChatMessage25.FwdFromId;\r\n                message.FwdDate = shortChatMessage40.FwdDate;\r\n                message.ReplyToMsgId = shortChatMessage40.ReplyToMsgId;\r\n            }\r\n\r\n            var shortMessage48 = updatesShortChatMessage as TLUpdatesShortChatMessage48;\r\n            if (shortMessage48 != null)\r\n            {\r\n                message.FwdHeader = shortMessage48.FwdHeader;\r\n            }\r\n\r\n            var shortChatMessage45 = updatesShortChatMessage as TLUpdatesShortChatMessage45;\r\n            if (shortChatMessage45 != null)\r\n            {\r\n                message.ViaBotId = shortChatMessage45.ViaBotId;\r\n            }\r\n\r\n            var shortChatMessage34 = updatesShortChatMessage as TLUpdatesShortChatMessage34;\r\n            if (shortChatMessage34 != null)\r\n            {\r\n                message.Entities = shortChatMessage34.Entities;\r\n            }\r\n\r\n            // set as read\r\n            var readMaxId = _cacheService.GetChat(message.ToId.Id) as IReadMaxId;\r\n            if (readMaxId != null)\r\n            {\r\n                var maxId = message.Out.Value ? readMaxId.ReadOutboxMaxId : readMaxId.ReadInboxMaxId;\r\n                if (maxId != null)\r\n                {\r\n                    if (maxId.Value >= message.Index)\r\n                    {\r\n                        message.SetUnreadSilent(TLBool.False);\r\n                    }\r\n                }\r\n            }\r\n\r\n            _cacheService.SyncMessage(message,\r\n                cachedMessage =>\r\n                {\r\n                    if (notifyNewMessage)\r\n                    {\r\n                        _eventAggregator.Publish(cachedMessage);\r\n                    }\r\n                });\r\n        }\r\n\r\n        public event EventHandler<DCOptionsUpdatedEventArgs> DCOptionsUpdated;\r\n\r\n        protected virtual void RaiseDCOptionsUpdated(DCOptionsUpdatedEventArgs e)\r\n        {\r\n            var handler = DCOptionsUpdated;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public static TLDecryptedMessageBase GetDecryptedMessage(TLInt currentUserId, TLEncryptedChat cachedChat, TLEncryptedMessageBase encryptedMessageBase, TLInt qts, out bool commitChat)\r\n        {\r\n            commitChat = false;\r\n\r\n            if (cachedChat == null) return null;\r\n            if (cachedChat.Key == null) return null;\r\n\r\n            TLDecryptedMessageBase decryptedMessage = null;\r\n            try\r\n            {\r\n                decryptedMessage = TLUtils.DecryptMessage(encryptedMessageBase.Bytes, currentUserId, cachedChat, out commitChat);\r\n            }\r\n            catch (Exception e)\r\n            {\r\n#if DEBUG\r\n                TLUtils.WriteException(e);\r\n#endif\r\n            }\r\n\r\n            if (decryptedMessage == null) return null;\r\n\r\n            var participantId = currentUserId.Value == cachedChat.ParticipantId.Value\r\n                ? cachedChat.AdminId\r\n                : cachedChat.ParticipantId;\r\n            var cachedUser = InMemoryCacheService.Instance.GetUser(participantId);\r\n            if (cachedUser == null) return null;\r\n\r\n            decryptedMessage.FromId = cachedUser.Id;\r\n            decryptedMessage.Out = new TLBool(false);\r\n            decryptedMessage.Unread = new TLBool(true);\r\n            decryptedMessage.RandomId = encryptedMessageBase.RandomId;\r\n            decryptedMessage.ChatId = encryptedMessageBase.ChatId;\r\n            decryptedMessage.Date = encryptedMessageBase.Date;\r\n            decryptedMessage.Qts = qts;\r\n\r\n            var message = decryptedMessage as TLDecryptedMessage;\r\n            if (message != null)\r\n            {\r\n                var encryptedMessage = encryptedMessageBase as TLEncryptedMessage;\r\n                if (encryptedMessage != null)\r\n                {\r\n                    message.Media.File = encryptedMessage.File;\r\n                    var document = message.Media as TLDecryptedMessageMediaDocument;\r\n                    if (document != null)\r\n                    {\r\n                        var file = document.File as TLEncryptedFile;\r\n                        if (file != null)\r\n                        {\r\n                            file.FileName = document.FileName;\r\n                        }\r\n                    }\r\n\r\n                    var video = message.Media as TLDecryptedMessageMediaVideo;\r\n                    if (video != null)\r\n                    {\r\n                        var file = video.File as TLEncryptedFile;\r\n                        if (file != null)\r\n                        {\r\n                            file.Duration = video.Duration;\r\n                        }\r\n                    }\r\n\r\n                    var audio = message.Media as TLDecryptedMessageMediaAudio;\r\n                    if (audio != null)\r\n                    {\r\n                        audio.UserId = decryptedMessage.FromId;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return decryptedMessage;\r\n        }\r\n\r\n        private Dictionary<int, int> _contactRegisteredList = new Dictionary<int, int>();\r\n\r\n        private static readonly object _updateChannelTooLongSyncRoot = new object();\r\n\r\n        private Dictionary<int, TLUpdateChannelTooLong> _updateChannelTooLongList = new Dictionary<int, TLUpdateChannelTooLong>();\r\n\r\n        public bool ProcessUpdateInternal(TLUpdateBase update, bool notifyNewMessage = true)\r\n        {\r\n            var userStatus = update as TLUpdateUserStatus;\r\n            if (userStatus != null)\r\n            {\r\n                var user = _cacheService.GetUser(userStatus.UserId);\r\n                if (user == null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                user._status = userStatus.Status;    // not UI Thread\r\n\r\n                if (notifyNewMessage)\r\n                {\r\n                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(userStatus));\r\n                }\r\n                //Execute.BeginOnThreadPool(() => _eventAggregator.Publish(user));\r\n\r\n                return true;\r\n            }\r\n\r\n            var userTyping = update as TLUpdateUserTyping;\r\n            if (userTyping != null)\r\n            {\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(userTyping));\r\n\r\n                return true;\r\n            }\r\n\r\n            var chatUserTyping = update as TLUpdateChatUserTyping;\r\n            if (chatUserTyping != null)\r\n            {\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(chatUserTyping));\r\n\r\n                return true;\r\n            }\r\n\r\n            System.Diagnostics.Debug.WriteLine(update);\r\n\r\n            var updateServiceNotification = update as TLUpdateServiceNotification;\r\n            if (updateServiceNotification != null)\r\n            {\r\n                Helpers.Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateServiceNotification));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updatePrivacy = update as TLUpdatePrivacy;\r\n            if (updatePrivacy != null)\r\n            {\r\n                Helpers.Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updatePrivacy));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateUserBlocked = update as TLUpdateUserBlocked;\r\n            if (updateUserBlocked != null)\r\n            {\r\n                var user = _cacheService.GetUser(updateUserBlocked.UserId);\r\n                if (user != null)\r\n                {\r\n                    user.Blocked = updateUserBlocked.Blocked;\r\n                    _cacheService.Commit();\r\n                }\r\n                Helpers.Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateUserBlocked));\r\n\r\n                return true;\r\n            }\r\n\r\n            var processed = ProcessEncryptedChatUpdate(update);\r\n            if (processed != null)\r\n            {\r\n                return processed.Value;\r\n            }\r\n\r\n            var updateDCOptions = update as TLUpdateDCOptions;\r\n            if (updateDCOptions != null)\r\n            {\r\n                RaiseDCOptionsUpdated(new DCOptionsUpdatedEventArgs { Update = updateDCOptions });\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateChannelTooLong = update as TLUpdateChannelTooLong;\r\n            if (updateChannelTooLong != null)\r\n            {\r\n                if (notifyNewMessage)\r\n                {\r\n                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChannelTooLong));\r\n                }\r\n                else\r\n                {\r\n                    lock (_updateChannelTooLongSyncRoot)\r\n                    {\r\n                        _updateChannelTooLongList[updateChannelTooLong.ChannelId.Value] = updateChannelTooLong;\r\n                    }\r\n                }\r\n\r\n                //var updateChannelTooLong49 = update as TLUpdateChannelTooLong49;\r\n                //if (updateChannelTooLong49 != null)\r\n                //{\r\n                //    Execute.ShowDebugMessage(string.Format(\"updateChannelTooLong channel_id={0} channel_pts={1}\", updateChannelTooLong49.ChannelId, updateChannelTooLong49.ChannelPts));\r\n                //}\r\n                //else\r\n                //{\r\n                //    Execute.ShowDebugMessage(string.Format(\"updateChannelTooLong channel_id={0}\", updateChannelTooLong.ChannelId));\r\n                //}\r\n                //#if DEBUG\r\n                //                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChannelTooLong));\r\n                //                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChannelTooLong));\r\n                //                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChannelTooLong));\r\n                //#endif\r\n\r\n                //UpdateChannelAsync(updateChannelTooLong.ChannelId,\r\n                //    result =>\r\n                //    {\r\n                //        var channel = result.Chats.FirstOrDefault();\r\n                //        if (channel != null)\r\n                //        {\r\n                //            // replace with channels.getDifference and handling channelDifferenceTooLong\r\n                //            GetHistoryAsync(channel.ToInputPeer(), new TLInt(0), new TLInt(0),\r\n                //                new TLInt(Constants.CachedMessagesCount), new TLInt(0), new TLInt(0),\r\n                //                result2 =>\r\n                //                {\r\n\r\n                //                },\r\n                //                error2 =>\r\n                //                {\r\n\r\n                //                });\r\n                //        }\r\n                //        else\r\n                //        {\r\n\r\n                //        }\r\n                //    },\r\n                //    error =>\r\n                //    {\r\n                //        Execute.ShowDebugMessage(\"updateChannel getFullChannel error \" + error);\r\n                //    });\r\n\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateChannel = update as TLUpdateChannel;\r\n            if (updateChannel != null)\r\n            {\r\n                UpdateChannelAsync(updateChannel.ChannelId,\r\n                    result =>\r\n                    {\r\n                        var channel = result.Chats.FirstOrDefault() as TLChannel;\r\n                        if (channel != null)\r\n                        {\r\n                            var dialogBase = _cacheService.GetDialog(new TLPeerChannel { Id = channel.Id });\r\n                            if (channel.Left.Value)\r\n                            {\r\n                                var promo = _cacheService.GetProxyData() as TLProxyDataPromo;\r\n                                if (promo != null && promo.Peer.Id.Value == updateChannel.ChannelId.Value)\r\n                                {\r\n                                    if (dialogBase == null)\r\n                                    {\r\n                                        GetPromoDialogAsync(channel.ToInputPeer(),\r\n                                            result3 =>\r\n                                            {\r\n\r\n                                            });\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        var oldDialogs = _cacheService.GetDialogs().OfType<TLDialog71>().Where(x => x.IsPromo).ToList();\r\n                                        foreach (var oldDialogBase in oldDialogs)\r\n                                        {\r\n                                            _cacheService.UpdateDialogPromo(oldDialogBase, false);\r\n                                        }\r\n\r\n                                        _cacheService.UpdateDialogPromo(dialogBase, true);\r\n                                    }\r\n                                }\r\n                                else\r\n                                {\r\n                                    if (dialogBase != null)\r\n                                    {\r\n                                        _cacheService.DeleteDialog(dialogBase);\r\n                                        if (notifyNewMessage)\r\n                                        {\r\n                                            Execute.BeginOnThreadPool(() => _eventAggregator.Publish(new DialogRemovedEventArgs(dialogBase)));\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                var promo = _cacheService.GetProxyData() as TLProxyDataPromo;\r\n                                if (promo != null && promo.Peer.Id.Value == updateChannel.ChannelId.Value)\r\n                                {\r\n                                    if (dialogBase != null)\r\n                                    {\r\n                                        _cacheService.UpdateDialogPromo(dialogBase, false);\r\n                                    }\r\n                                }\r\n                                else\r\n                                {\r\n                                    if (dialogBase == null)\r\n                                    {\r\n                                        GetPeerDialogsAsync(channel.ToInputPeer(),\r\n                                            result3 =>\r\n                                            {\r\n                                                dialogBase = result3.Dialogs.FirstOrDefault() as TLDialog;\r\n                                                if (dialogBase != null)\r\n                                                {\r\n                                                    if (notifyNewMessage)\r\n                                                    {\r\n                                                        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(new DialogAddedEventArgs(dialogBase)));\r\n                                                    }\r\n                                                }\r\n                                            });\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            if (notifyNewMessage)\r\n                            {\r\n                                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChannel));\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            if (notifyNewMessage)\r\n                            {\r\n                                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChannel));\r\n                            }\r\n\r\n                            Execute.ShowDebugMessage(\"updateChannel empty\");\r\n                        }\r\n                    },\r\n                    error =>\r\n                    {\r\n                        if (notifyNewMessage)\r\n                        {\r\n                            Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChannel));\r\n                        }\r\n\r\n                        Execute.ShowDebugMessage(\"updateChannel getFullChannel error \" + error);\r\n                    });\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateChannelGroup = update as TLUpdateChannelGroup;\r\n            if (updateChannelGroup != null)\r\n            {\r\n                Execute.ShowDebugMessage(string.Format(\"updateChannelGroup channel_id={0} min_id={1} max_id={2} count={3} date={4}\", updateChannelGroup.ChannelId, updateChannelGroup.Group.MinId, updateChannelGroup.Group.MaxId, updateChannelGroup.Group.Count, updateChannelGroup.Group.Date));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateChannelPinnedMessage = update as TLUpdateChannelPinnedMessage;\r\n            if (updateChannelPinnedMessage != null)\r\n            {\r\n                var channel = _cacheService.GetChat(updateChannelPinnedMessage.ChannelId) as TLChannel49;\r\n                if (channel != null)\r\n                {\r\n                    channel.PinnedMsgId = updateChannelPinnedMessage.Id;\r\n                    channel.HiddenPinnedMsgId = null;\r\n                    _cacheService.Commit();\r\n\r\n                    var message = _cacheService.GetMessage(updateChannelPinnedMessage.Id, updateChannelPinnedMessage.ChannelId);\r\n                    if (message == null)\r\n                    {\r\n                        GetChannelMessagesAsync(channel.ToInputChannel(), new TLVector<TLInputMessageBase> { new TLInputMessageId { Id = updateChannelPinnedMessage.Id } },\r\n                            messagesBase =>\r\n                            {\r\n                                _cacheService.AddMessagesToContext(messagesBase, result =>\r\n                                {\r\n                                    if (notifyNewMessage)\r\n                                    {\r\n                                        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChannelPinnedMessage));\r\n                                    }\r\n                                });\r\n                            },\r\n                            error =>\r\n                            {\r\n                                if (notifyNewMessage)\r\n                                {\r\n                                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChannelPinnedMessage));\r\n                                }\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        if (notifyNewMessage)\r\n                        {\r\n                            Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChannelPinnedMessage));\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateEditMessage = update as TLUpdateEditMessage;\r\n            if (updateEditMessage != null)\r\n            {\r\n                //uExecute.ShowDebugMessage(string.Format(\"updateEditMessage pts={0} pts_count={1} message={2}\", updateEditMessage.Pts, updateEditMessage.PtsCount, updateEditMessage.Message));\r\n\r\n                _cacheService.SyncEditedMessage(updateEditMessage.Message, notifyNewMessage, notifyNewMessage,\r\n                    cachedMessage =>\r\n                    {\r\n                        var geoLive = false;\r\n                        var message = cachedMessage as TLMessage;\r\n                        if (message != null)\r\n                        {\r\n                            var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                            if (mediaGeoLive != null)\r\n                            {\r\n                                geoLive = true;\r\n                            }\r\n                        }\r\n\r\n                        if (notifyNewMessage || geoLive) // to avoid handle live locations on UpdateCompletedEventArgs\r\n                        {\r\n                            updateEditMessage.Message = cachedMessage;\r\n                            Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateEditMessage));\r\n                        }\r\n                    });\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateEditChannelMessage = update as TLUpdateEditChannelMessage;\r\n            if (updateEditChannelMessage != null)\r\n            {\r\n                //Execute.ShowDebugMessage(string.Format(\"updateEditChannelMessage channel_pts={0} channel_ptscount={1} message={2}\", updateEditChannelMessage.ChannelPts, updateEditChannelMessage.ChannelPtsCount, updateEditChannelMessage.Message));\r\n\r\n                var commonMessage = updateEditChannelMessage.Message as TLMessageCommon;\r\n                if (commonMessage != null)\r\n                {\r\n                    var peer = commonMessage.ToId;\r\n\r\n                    var channel = _cacheService.GetChat(commonMessage.ToId.Id) as TLChannel;\r\n                    if (channel != null)\r\n                    {\r\n                        if (channel.Pts == null\r\n                            || (channel.Pts.Value < updateEditChannelMessage.ChannelPts.Value\r\n                                && channel.Pts.Value + updateEditChannelMessage.ChannelPtsCount.Value != updateEditChannelMessage.ChannelPts.Value))\r\n                        {\r\n                            Execute.ShowDebugMessage(string.Format(\"channel_id={0} channel_pts={1} updateEditChannelMessage[channel_pts={2} channel_pts_count={3}]\", peer.Id, channel.Pts, updateEditChannelMessage.ChannelPts, updateEditChannelMessage.ChannelPtsCount));\r\n                        }\r\n                        channel.Pts = new TLInt(updateEditChannelMessage.ChannelPts.Value);\r\n                    }\r\n\r\n                    _cacheService.SyncEditedMessage(updateEditChannelMessage.Message, notifyNewMessage, notifyNewMessage,\r\n                        cachedMessage =>\r\n                        {\r\n                            var geoLive = false;\r\n                            var message = cachedMessage as TLMessage;\r\n                            if (message != null)\r\n                            {\r\n                                var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                                if (mediaGeoLive != null)\r\n                                {\r\n                                    geoLive = true;\r\n                                }\r\n                            }\r\n\r\n                            if (notifyNewMessage || geoLive) // to avoid handle live locations on UpdateCompletedEventArgs\r\n                            {\r\n                                updateEditChannelMessage.Message = cachedMessage;\r\n                                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateEditChannelMessage));\r\n                            }\r\n                        });\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateNewChannelMessage = update as TLUpdateNewChannelMessage;\r\n            if (updateNewChannelMessage != null)\r\n            {\r\n                var commonMessage = updateNewChannelMessage.Message as TLMessageCommon;\r\n                if (commonMessage != null)\r\n                {\r\n                    var peer = commonMessage.ToId;\r\n\r\n                    var channel = _cacheService.GetChat(commonMessage.ToId.Id) as TLChannel;\r\n                    if (channel != null)\r\n                    {\r\n                        if (channel.Pts == null\r\n                            || (channel.Pts.Value < updateNewChannelMessage.ChannelPts.Value\r\n                                && channel.Pts.Value + updateNewChannelMessage.ChannelPtsCount.Value != updateNewChannelMessage.ChannelPts.Value))\r\n                        {\r\n                            //Execute.ShowDebugMessage(string.Format(\"channel_id={0} channel_pts={1} updateNewChannelMessage[channel_pts={2} channel_pts_count={3}]\", peer.Id, channel.Pts, updateNewChannelMessage.ChannelPts, updateNewChannelMessage.ChannelPtsCount));\r\n                        }\r\n                        channel.Pts = new TLInt(updateNewChannelMessage.ChannelPts.Value);\r\n\r\n                        if (!commonMessage.Out.Value)\r\n                        {\r\n                            var readInboxMaxId = channel.ReadInboxMaxId != null ? channel.ReadInboxMaxId.Value : 0;\r\n\r\n                            if (commonMessage.Index <= readInboxMaxId)\r\n                            {\r\n                                commonMessage.SetUnreadSilent(TLBool.False);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            var channel49 = channel as TLChannel49;\r\n                            if (channel49 != null)\r\n                            {\r\n                                var readOutboxMaxId = channel49.ReadOutboxMaxId != null ? channel49.ReadOutboxMaxId.Value : 0;\r\n\r\n                                if (commonMessage.Index <= readOutboxMaxId)\r\n                                {\r\n                                    commonMessage.SetUnreadSilent(TLBool.False);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (commonMessage.RandomIndex != 0)\r\n                    {\r\n                        _cacheService.SyncSendingMessage(commonMessage, null,\r\n                            cachedMessage =>\r\n                            {\r\n                                if (notifyNewMessage)\r\n                                {\r\n                                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(cachedMessage));\r\n                                }\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        _cacheService.SyncMessage(updateNewChannelMessage.Message, notifyNewMessage, notifyNewMessage,\r\n                            cachedMessage =>\r\n                            {\r\n                                if (notifyNewMessage)\r\n                                {\r\n                                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(cachedMessage));\r\n                                }\r\n                            });\r\n                    }\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateNewMessage = update as TLUpdateNewMessage;\r\n            if (updateNewMessage != null)\r\n            {\r\n                var commonMessage = updateNewMessage.Message as TLMessageCommon;\r\n                if (commonMessage != null)\r\n                {\r\n                    MTProtoService.ProcessSelfMessage(commonMessage);\r\n\r\n                    TLPeerBase peer;\r\n                    if (commonMessage.ToId is TLPeerChat)\r\n                    {\r\n                        peer = commonMessage.ToId;\r\n                    }\r\n                    else\r\n                    {\r\n                        peer = commonMessage.Out.Value ? commonMessage.ToId : new TLPeerUser { Id = commonMessage.FromId };\r\n                    }\r\n\r\n                    if (commonMessage.RandomIndex != 0)\r\n                    {\r\n#if DEBUG\r\n                        Log.Write(\"TLUpdateNewMessage \" + updateNewMessage.Message);\r\n#endif\r\n                        _cacheService.SyncSendingMessage(commonMessage, null,\r\n                            cachedMessage =>\r\n                            {\r\n                                if (notifyNewMessage)\r\n                                {\r\n                                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(cachedMessage));\r\n                                }\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n#if DEBUG\r\n                        Log.Write(\"TLUpdateNewMessage \" + updateNewMessage.Message);\r\n#endif\r\n\r\n                        _cacheService.SyncMessage(updateNewMessage.Message,\r\n                            cachedMessage =>\r\n                            {\r\n                                if (notifyNewMessage)\r\n                                {\r\n                                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(cachedMessage));\r\n                                }\r\n                            });\r\n                    }\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateMessageId = update as TLUpdateMessageId;\r\n            if (updateMessageId != null)\r\n            {\r\n                _cacheService.SyncSendingMessageId(updateMessageId.RandomId, updateMessageId.Id, m => { });\r\n                RemoveFromQueue(updateMessageId.RandomId);\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateChannelReadMessagesContents = update as TLUpdateChannelReadMessagesContents;\r\n            if (updateChannelReadMessagesContents != null)\r\n            {\r\n                var localMessages = new List<TLMessage25>();\r\n                var remoteMessages = new TLVector<TLInputMessageBase>();\r\n                foreach (var readMessageId in updateChannelReadMessagesContents.Messages)\r\n                {\r\n                    var message = _cacheService.GetMessage(readMessageId, updateChannelReadMessagesContents.ChannelId) as TLMessage25;\r\n                    if (message != null)\r\n                    {\r\n                        localMessages.Add(message);\r\n                    }\r\n                    else\r\n                    {\r\n                        remoteMessages.Add(new TLInputMessageId { Id = readMessageId });\r\n                    }\r\n                }\r\n\r\n                TLDialog71 dialog = null;\r\n                var localMentionsCount = localMessages.OfType<TLMessage17>().Count(x => x.IsMention);\r\n                if (localMentionsCount > 0 || remoteMessages.Count > 0)\r\n                {\r\n                    dialog = _cacheService.GetDialog(new TLPeerChannel { Id = updateChannelReadMessagesContents.ChannelId }) as TLDialog71;\r\n                    if (dialog != null)\r\n                    {\r\n                        if (remoteMessages.Count > 0)\r\n                        {\r\n                            var channel = _cacheService.GetChat(updateChannelReadMessagesContents.ChannelId) as TLChannel;\r\n                            if (channel != null)\r\n                            {\r\n                                GetChannelMessagesAsync(channel.ToInputChannel(),\r\n                                    remoteMessages,\r\n                                    messagesBase =>\r\n                                    {\r\n                                        var remoteMentionsCount = messagesBase.Messages.OfType<TLMessage17>().Count(x => x.IsMention);\r\n                                        if (remoteMentionsCount > 0)\r\n                                        {\r\n                                            Execute.BeginOnUIThread(() =>\r\n                                            {\r\n                                                dialog.UnreadMentionsCount = new TLInt(Math.Max(0, dialog.UnreadMentionsCount.Value - remoteMentionsCount));\r\n                                                dialog.NotifyOfPropertyChange(() => dialog.UnreadMentionsCount);\r\n                                            });\r\n                                        }\r\n                                    },\r\n                                    error =>\r\n                                    {\r\n\r\n                                    });\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var message in localMessages)\r\n                    {\r\n                        message.SetListened();\r\n                        if (message.Media != null)\r\n                        {\r\n                            message.Media.NotListened = false;\r\n                            message.Media.NotifyOfPropertyChange(() => message.Media.NotListened);\r\n                        }\r\n\r\n                        var message70 = message as TLMessage70;\r\n                        if (message70 != null && message70.HasTTL())\r\n                        {\r\n                            var mediaPhoto70 = message.Media as TLMessageMediaPhoto70;\r\n                            if (mediaPhoto70 != null && mediaPhoto70.Photo != null)\r\n                            {\r\n                                mediaPhoto70.Photo = null;\r\n                                message70.NotifyOfPropertyChange(() => message70.TTLMediaExpired);\r\n                            }\r\n\r\n                            var mediaDocument70 = message.Media as TLMessageMediaDocument70;\r\n                            if (mediaDocument70 != null && mediaDocument70.Document != null)\r\n                            {\r\n                                mediaDocument70.Document = null;\r\n                                message70.NotifyOfPropertyChange(() => message70.TTLMediaExpired);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (dialog != null && localMentionsCount > 0)\r\n                    {\r\n                        dialog.UnreadMentionsCount = new TLInt(Math.Max(0, dialog.UnreadMentionsCount.Value - localMentionsCount));\r\n                        dialog.NotifyOfPropertyChange(() => dialog.UnreadMentionsCount);\r\n                    }\r\n\r\n                    if (notifyNewMessage)\r\n                    {\r\n                        _eventAggregator.Publish(updateChannelReadMessagesContents);\r\n                    }\r\n                });\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateReadMessagesContents = update as TLUpdateReadMessagesContents;\r\n            if (updateReadMessagesContents != null)\r\n            {\r\n                var localMessages = new List<TLMessage25>();\r\n                var remoteMessages = new TLVector<TLInputMessageBase>();\r\n                foreach (var readMessageId in updateReadMessagesContents.Messages)\r\n                {\r\n                    var message = _cacheService.GetMessage(readMessageId) as TLMessage25;\r\n                    if (message != null)\r\n                    {\r\n                        localMessages.Add(message);\r\n                    }\r\n                    else\r\n                    {\r\n                        remoteMessages.Add(new TLInputMessageId { Id = readMessageId });\r\n                    }\r\n                }\r\n\r\n                var dialogs = new List<TLDialog71>();\r\n                if (localMessages.Count > 0)\r\n                {\r\n                    foreach (var localMessage in localMessages)\r\n                    {\r\n                        if (localMessage.IsMention)\r\n                        {\r\n                            var dialog = _cacheService.GetDialog(localMessage) as TLDialog71;\r\n                            if (dialog != null && dialog.UnreadMentionsCount.Value > 0)\r\n                            {\r\n                                dialog.UnreadMentionsCount = new TLInt(Math.Max(0, dialog.UnreadMentionsCount.Value - 1));\r\n                                dialogs.Add(dialog);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                if (remoteMessages.Count > 0)\r\n                {\r\n                    GetMessagesAsync(remoteMessages,\r\n                        messagesBase =>\r\n                        {\r\n                            var dialogs2 = new List<TLDialog71>();\r\n                            foreach (var messageBase in messagesBase.Messages)\r\n                            {\r\n                                var message = messageBase as TLMessage17;\r\n                                if (message != null && message.IsMention)\r\n                                {\r\n                                    var dialog = _cacheService.GetDialog(message) as TLDialog71;\r\n                                    if (dialog != null && dialog.UnreadMentionsCount.Value > 0)\r\n                                    {\r\n                                        dialog.UnreadMentionsCount = new TLInt(Math.Max(0, dialog.UnreadMentionsCount.Value - 1));\r\n                                        dialogs2.Add(dialog);\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                foreach (var dialog in dialogs2)\r\n                                {\r\n                                    dialog.NotifyOfPropertyChange(() => dialog.UnreadMentionsCount);\r\n                                }\r\n                            });\r\n                        },\r\n                        error =>\r\n                        {\r\n\r\n                        });\r\n                }\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var message in localMessages)\r\n                    {\r\n                        message.SetListened();\r\n                        if (message.Media != null)\r\n                        {\r\n                            message.Media.NotListened = false;\r\n                            message.Media.NotifyOfPropertyChange(() => message.Media.NotListened);\r\n                        }\r\n\r\n                        var message70 = message as TLMessage70;\r\n                        if (message70 != null && message70.HasTTL())\r\n                        {\r\n                            var mediaPhoto70 = message.Media as TLMessageMediaPhoto70;\r\n                            if (mediaPhoto70 != null && mediaPhoto70.Photo != null)\r\n                            {\r\n                                mediaPhoto70.Photo = null;\r\n                                message70.NotifyOfPropertyChange(() => message70.TTLMediaExpired);\r\n                            }\r\n\r\n                            var mediaDocument70 = message.Media as TLMessageMediaDocument70;\r\n                            if (mediaDocument70 != null && mediaDocument70.Document != null)\r\n                            {\r\n                                mediaDocument70.Document = null;\r\n                                message70.NotifyOfPropertyChange(() => message70.TTLMediaExpired);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    foreach (var dialog in dialogs)\r\n                    {\r\n                        dialog.NotifyOfPropertyChange(() => dialog.UnreadMentionsCount);\r\n                    }\r\n\r\n                    if (notifyNewMessage)\r\n                    {\r\n                        _eventAggregator.Publish(updateReadMessagesContents);\r\n                    }\r\n                });\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateChannelMessageViews = update as TLUpdateChannelMessageViews;\r\n            if (updateChannelMessageViews != null)\r\n            {\r\n                //Execute.ShowDebugMessage(string.Format(\"updateChannelMessageViews channel_id={0} id={1} views={2}\", updateChannelMessageViews.ChannelId, updateChannelMessageViews.Id, updateChannelMessageViews.Views));\r\n\r\n                var message = _cacheService.GetMessage(updateChannelMessageViews.Id, updateChannelMessageViews.ChannelId) as TLMessage36;\r\n                if (message != null)\r\n                {\r\n                    if (message.Views == null || message.Views.Value < updateChannelMessageViews.Views.Value)\r\n                    {\r\n                        message.Views = updateChannelMessageViews.Views;\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            message.NotifyOfPropertyChange(() => message.Views);\r\n                        });\r\n                    }\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n\r\n            var updateReadHistory = update as TLUpdateReadHistory;\r\n            if (updateReadHistory != null)\r\n            {\r\n                var outbox = update is TLUpdateReadHistoryOutbox;\r\n\r\n                IReadMaxId readMaxId = null;\r\n                if (updateReadHistory.Peer is TLPeerUser)\r\n                {\r\n                    readMaxId = _cacheService.GetUser(updateReadHistory.Peer.Id) as IReadMaxId;\r\n                }\r\n                else if (updateReadHistory.Peer is TLPeerChat)\r\n                {\r\n                    readMaxId = _cacheService.GetChat(updateReadHistory.Peer.Id) as IReadMaxId;\r\n                }\r\n                SetReadMaxId(readMaxId, updateReadHistory.MaxId, outbox);\r\n\r\n                var dialog = _cacheService.GetDialog(updateReadHistory.Peer);\r\n                if (dialog != null)\r\n                {\r\n                    var dialog53 = dialog as TLDialog53;\r\n                    if (dialog53 != null)\r\n                    {\r\n                        SetReadMaxId(dialog53, updateReadHistory.MaxId, outbox);\r\n                        SetReadMaxId(dialog53.With as IReadMaxId, updateReadHistory.MaxId, outbox);\r\n                    }\r\n\r\n                    var notifyMessages = new List<TLMessageCommon>();\r\n                    var maxId = updateReadHistory.MaxId;\r\n                    for (int i = 0; i < dialog.Messages.Count; i++)\r\n                    {\r\n                        var message = dialog.Messages[i] as TLMessageCommon;\r\n                        if (message != null)\r\n                        {\r\n                            if (message.Index != 0\r\n                                && message.Index <= maxId.Value\r\n                                && message.Out.Value == outbox)\r\n                            {\r\n                                if (message.Unread.Value)\r\n                                {\r\n                                    message.SetUnread(TLBool.False);\r\n                                    notifyMessages.Add(message);\r\n                                    //message.NotifyOfPropertyChange(() => message.Unread);\r\n                                }\r\n                                else\r\n                                {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var topMessage = dialog.TopMessage as TLMessageCommon;\r\n                    if (topMessage != null)\r\n                    {\r\n                        if (topMessage.Index <= maxId.Value)\r\n                        {\r\n                            if (topMessage.Index != 0\r\n                                && topMessage.Unread.Value\r\n                                && topMessage.Out.Value == outbox)\r\n                            {\r\n                                topMessage.SetUnread(TLBool.False);\r\n                                notifyMessages.Add(topMessage);\r\n                                //topMessage.NotifyOfPropertyChange(() => topMessage.Unread);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var unreadCount = 0;\r\n                    if (dialog.TopMessageId != null && dialog.TopMessageId.Value > updateReadHistory.MaxId.Value)\r\n                    {\r\n                        unreadCount = dialog.UnreadCount.Value;\r\n                    }\r\n                    if (outbox)\r\n                    {\r\n                        unreadCount = dialog.UnreadCount.Value;\r\n                    }\r\n                    dialog.UnreadCount = new TLInt(unreadCount);\r\n\r\n                    if (notifyNewMessage)\r\n                    {\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            foreach (var message in notifyMessages)\r\n                            {\r\n                                message.NotifyOfPropertyChange(() => message.Unread);\r\n                            }\r\n                            dialog.NotifyOfPropertyChange(() => dialog.TopMessage);\r\n                            dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                            dialog.NotifyOfPropertyChange(() => dialog.UnreadCount);\r\n                        });\r\n                    }\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateReadChannelOutbox = update as TLUpdateReadChannelOutbox;\r\n            if (updateReadChannelOutbox != null)\r\n            {\r\n                //Execute.ShowDebugMessage(string.Format(\"TLUpdateReadChannelOutbox channel_id={0} max_id={1}\", updateReadChannelOutbox.ChannelId, updateReadChannelOutbox.MaxId));\r\n\r\n                var readMaxId = _cacheService.GetChat(updateReadChannelOutbox.ChannelId) as IReadMaxId;\r\n                if (readMaxId != null)\r\n                {\r\n                    SetReadMaxId(readMaxId, updateReadChannelOutbox.MaxId, true);\r\n                }\r\n\r\n                var dialog = _cacheService.GetDialog(new TLPeerChannel { Id = updateReadChannelOutbox.ChannelId });\r\n                if (dialog != null)\r\n                {\r\n                    var dialog53 = dialog as TLDialog53;\r\n                    if (dialog53 != null)\r\n                    {\r\n                        SetReadMaxId(dialog53, updateReadChannelOutbox.MaxId, true);\r\n                        SetReadMaxId(dialog53.With as IReadMaxId, updateReadChannelOutbox.MaxId, true);\r\n                    }\r\n\r\n                    var messages = new List<TLMessageCommon>();\r\n\r\n                    var topMessage = dialog.TopMessage as TLMessageCommon;\r\n                    if (topMessage != null\r\n                        && topMessage.Out.Value\r\n                        && topMessage.Index <= updateReadChannelOutbox.MaxId.Value)\r\n                    {\r\n                        //dialog.UnreadCount = new TLInt(0);\r\n                        topMessage.SetUnread(TLBool.False);\r\n                        messages.Add(topMessage);\r\n                    }\r\n\r\n                    foreach (var messageBase in dialog.Messages)\r\n                    {\r\n                        var message = messageBase as TLMessageCommon;\r\n                        if (message != null && message.Unread.Value && message.Out.Value)\r\n                        {\r\n                            if (message.Index != 0 && message.Index < updateReadChannelOutbox.MaxId.Value)\r\n                            {\r\n                                message.SetUnread(TLBool.False);\r\n                                messages.Add(message);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (notifyNewMessage)\r\n                    {\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            foreach (var message in messages)\r\n                            {\r\n                                message.NotifyOfPropertyChange(() => message.Unread);\r\n                            }\r\n\r\n                            dialog.NotifyOfPropertyChange(() => dialog.TopMessage);\r\n                            dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                            dialog.NotifyOfPropertyChange(() => dialog.UnreadCount);\r\n                        });\r\n                    }\r\n                }\r\n\r\n                _cacheService.Commit();\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateReadChannelInbox = update as TLUpdateReadChannelInbox;\r\n            if (updateReadChannelInbox != null)\r\n            {\r\n                //Execute.ShowDebugMessage(string.Format(\"TLUpdateReadChannelInbox channel_id={0} max_id={1}\", updateReadChannelInbox.ChannelId, updateReadChannelInbox.MaxId));\r\n\r\n                var messages = new List<TLMessageCommon>();\r\n\r\n                var readMaxId = _cacheService.GetChat(updateReadChannelInbox.ChannelId) as IReadMaxId;\r\n                if (readMaxId != null)\r\n                {\r\n                    SetReadMaxId(readMaxId, updateReadChannelInbox.MaxId, false);\r\n                }\r\n\r\n                var dialog = _cacheService.GetDialog(new TLPeerChannel { Id = updateReadChannelInbox.ChannelId });\r\n                if (dialog != null)\r\n                {\r\n                    var dialog53 = dialog as TLDialog53;\r\n                    if (dialog53 != null)\r\n                    {\r\n                        SetReadMaxId(dialog53, updateReadChannelInbox.MaxId, false);\r\n                        SetReadMaxId(dialog53.With as IReadMaxId, updateReadChannelInbox.MaxId, false);\r\n                    }\r\n\r\n                    var topMessage = dialog.TopMessage as TLMessageCommon;\r\n                    if (topMessage != null\r\n                        && !topMessage.Out.Value\r\n                        && topMessage.Index <= updateReadChannelInbox.MaxId.Value)\r\n                    {\r\n                        dialog.UnreadCount = new TLInt(0);\r\n                        topMessage.SetUnread(TLBool.False);\r\n                        messages.Add(topMessage);\r\n                    }\r\n\r\n                    foreach (var messageBase in dialog.Messages)\r\n                    {\r\n                        var message = messageBase as TLMessageCommon;\r\n                        if (message != null && message.Unread.Value && !message.Out.Value)\r\n                        {\r\n                            if (message.Index != 0 && message.Index < updateReadChannelInbox.MaxId.Value)\r\n                            {\r\n                                message.SetUnread(TLBool.False);\r\n                                messages.Add(message);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (notifyNewMessage)\r\n                    {\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            foreach (var message in messages)\r\n                            {\r\n                                message.NotifyOfPropertyChange(() => message.Unread);\r\n                            }\r\n\r\n                            dialog.NotifyOfPropertyChange(() => dialog.TopMessage);\r\n                            dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                            dialog.NotifyOfPropertyChange(() => dialog.UnreadCount);\r\n                        });\r\n                    }\r\n                }\r\n\r\n                _cacheService.Commit();\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateReadMessages = update as TLUpdateReadMessages;\r\n            if (updateReadMessages != null)\r\n            {\r\n                var dialogs = new Dictionary<int, TLDialogBase>();\r\n                var messages = new List<TLMessageCommon>(updateReadMessages.Messages.Count);\r\n                foreach (var readMessageId in updateReadMessages.Messages)\r\n                {\r\n                    var message = _cacheService.GetMessage(readMessageId) as TLMessageCommon;\r\n                    if (message != null)\r\n                    {\r\n                        messages.Add(message);\r\n\r\n                        var dialog = _cacheService.GetDialog(message);\r\n                        if (dialog != null && dialog.UnreadCount.Value > 0)\r\n                        {\r\n                            dialog.UnreadCount = new TLInt(Math.Max(0, dialog.UnreadCount.Value - 1));\r\n                            var topMessage = dialog.TopMessage;\r\n                            if (topMessage != null\r\n                                && topMessage.Index == readMessageId.Value)\r\n                            {\r\n                                dialogs[dialog.Index] = dialog;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var message in messages)\r\n                    {\r\n                        message.SetUnread(new TLBool(false));\r\n                        message.NotifyOfPropertyChange(() => message.Unread);\r\n                    }\r\n\r\n                    foreach (var dialogBase in dialogs.Values)\r\n                    {\r\n                        var dialog = dialogBase as TLDialog;\r\n                        if (dialog == null) continue;\r\n\r\n                        dialog.NotifyOfPropertyChange(() => dialog.TopMessage);\r\n                        dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                        dialog.NotifyOfPropertyChange(() => dialog.UnreadCount);\r\n                    }\r\n                });\r\n\r\n                return true;\r\n            }\r\n\r\n            var deleteMessages = update as TLUpdateDeleteMessages;\r\n            if (deleteMessages != null)\r\n            {\r\n                _cacheService.DeleteMessages(deleteMessages.Messages);\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateDeleteChannelMessages = update as TLUpdateDeleteChannelMessages;\r\n            if (updateDeleteChannelMessages != null)\r\n            {\r\n                Execute.ShowDebugMessage(string.Format(\"updateDeleteChannelMessages channel_id={0} msgs=[{1}] channel_pts={2} channel_pts_count={3}\", updateDeleteChannelMessages.ChannelId, string.Join(\", \", updateDeleteChannelMessages.Messages), updateDeleteChannelMessages.ChannelPts, updateDeleteChannelMessages.ChannelPtsCount));\r\n\r\n                var channel = _cacheService.GetChat(updateDeleteChannelMessages.ChannelId) as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    if (channel.Pts == null\r\n                        || channel.Pts.Value + updateDeleteChannelMessages.ChannelPtsCount.Value != updateDeleteChannelMessages.ChannelPts.Value)\r\n                    {\r\n                        Execute.ShowDebugMessage(string.Format(\"channel_id={0} channel_pts={1} updateDeleteChannelMessages[channel_pts={2} channel_pts_count={3}]\", channel.Id, channel.Pts, updateDeleteChannelMessages.ChannelPts, updateDeleteChannelMessages.ChannelPtsCount));\r\n                    }\r\n                    channel.Pts = new TLInt(updateDeleteChannelMessages.ChannelPts.Value);\r\n                }\r\n\r\n                _cacheService.DeleteChannelMessages(updateDeleteChannelMessages.ChannelId, updateDeleteChannelMessages.Messages);\r\n\r\n                return true;\r\n            }\r\n\r\n            var restoreMessages = update as TLUpdateRestoreMessages;\r\n            if (restoreMessages != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var updateChatAdmins = update as TLUpdateChatAdmins;\r\n            if (updateChatAdmins != null)\r\n            {\r\n                var chat = _cacheService.GetChat(updateChatAdmins.ChatId) as TLChat40;\r\n                if (chat != null)\r\n                {\r\n                    chat.AdminsEnabled = updateChatAdmins.Enabled;\r\n                    chat.Version = updateChatAdmins.Version;\r\n\r\n                    _cacheService.Commit();\r\n                }\r\n\r\n                Execute.ShowDebugMessage(string.Format(\"TLUpdateChatAdmins chat_id={0} enabled={1} version={2}\", updateChatAdmins.ChatId, updateChatAdmins.Enabled, updateChatAdmins.Version));\r\n\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChatAdmins));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateChatParticipantAdmin = update as TLUpdateChatParticipantAdmin;\r\n            if (updateChatParticipantAdmin != null)\r\n            {\r\n                var chat = _cacheService.GetChat(updateChatParticipantAdmin.ChatId) as TLChat40;\r\n                if (chat != null)\r\n                {\r\n                    var userId = GetCurrentUserId();\r\n                    if (updateChatParticipantAdmin.UserId.Value == userId.Value)\r\n                    {\r\n                        chat.Admin = updateChatParticipantAdmin.IsAdmin;\r\n                        chat.Version = updateChatParticipantAdmin.Version;\r\n\r\n                        _cacheService.Commit();\r\n                    }\r\n                }\r\n\r\n                Execute.ShowDebugMessage(string.Format(\"TLUpdateChatParticipantAdmin chat_id={0} user_id={1} is_admin={2} version={3}\", updateChatParticipantAdmin.ChatId, updateChatParticipantAdmin.UserId, updateChatParticipantAdmin.IsAdmin, updateChatParticipantAdmin.Version));\r\n\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChatParticipantAdmin));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateChatParticipants = update as TLUpdateChatParticipants;\r\n            if (updateChatParticipants != null)\r\n            {\r\n                var chat = _cacheService.GetChat(updateChatParticipants.Participants.ChatId) as TLChat40;\r\n                if (chat != null)\r\n                {\r\n                    chat.Participants = updateChatParticipants.Participants;\r\n                    var participants = chat.Participants as IChatParticipants;\r\n                    if (participants != null)\r\n                    {\r\n                        chat.Version = participants.Version;\r\n                    }\r\n\r\n                    _cacheService.Commit();\r\n                }\r\n\r\n                Execute.ShowDebugMessage(string.Format(\"TLUpdateChatParticipants participants={0}\", updateChatParticipants.Participants.GetType().Name));\r\n\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChatParticipants));\r\n\r\n                return true;\r\n            }\r\n\r\n            var userName = update as TLUpdateUserName;\r\n            if (userName != null)\r\n            {\r\n                var user = _cacheService.GetUser(userName.UserId);\r\n                if (user == null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                user.FirstName = userName.FirstName;\r\n                user.LastName = userName.LastName;\r\n\r\n                var userWithUserName = user as IUserName;\r\n                if (userWithUserName != null)\r\n                {\r\n                    userWithUserName.UserName = userName.UserName;\r\n                }\r\n\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(userName));\r\n\r\n                return true;\r\n            }\r\n\r\n            var userPhoto = update as TLUpdateUserPhoto;\r\n            if (userPhoto != null)\r\n            {\r\n                if (userPhoto.Date.Value > 0 && (_date == null || _date.Value < userPhoto.Date.Value))\r\n                {\r\n                    _date = userPhoto.Date;\r\n                }\r\n\r\n                var user = _cacheService.GetUser(userPhoto.UserId);\r\n                if (user == null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                user.Photo = userPhoto.Photo;\r\n                Helpers.Execute.BeginOnThreadPool(() => _eventAggregator.Publish(userPhoto));\r\n                //_cacheService.SyncUser(user, result => _eventAggregator.Publish(result));\r\n\r\n                return true;\r\n            }\r\n\r\n            var userPhone = update as TLUpdateUserPhone;\r\n            if (userPhone != null)\r\n            {\r\n                var user = _cacheService.GetUser(userPhone.UserId);\r\n                if (user == null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                user.Phone = userPhone.Phone;\r\n                Helpers.Execute.BeginOnThreadPool(() => user.NotifyOfPropertyChange(() => user.Phone));\r\n\r\n                return true;\r\n            }\r\n\r\n            var contactRegistered = update as TLUpdateContactRegistered;\r\n            if (contactRegistered != null)\r\n            {\r\n                if (contactRegistered.Date.Value > 0 && (_date == null || _date.Value < contactRegistered.Date.Value))\r\n                {\r\n                    _date = contactRegistered.Date;\r\n                }\r\n\r\n                if (_contactRegisteredList.ContainsKey(contactRegistered.UserId.Value))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                _contactRegisteredList[contactRegistered.UserId.Value] = contactRegistered.UserId.Value;\r\n\r\n                if (notifyNewMessage)\r\n                {\r\n                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(contactRegistered));\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateNewAuthorization = update as TLUpdateNewAuthorization;\r\n            if (updateNewAuthorization != null)\r\n            {\r\n                if (updateNewAuthorization.Date.Value > 0 && (_date == null || _date.Value < updateNewAuthorization.Date.Value))\r\n                {\r\n                    _date = updateNewAuthorization.Date;\r\n                }\r\n\r\n                Helpers.Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateNewAuthorization));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateContactLink = update as TLUpdateContactLinkBase;\r\n            if (updateContactLink != null)\r\n            {\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateContactLink));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateChatParticipantAdd = update as TLUpdateChatParticipantAdd;\r\n            if (updateChatParticipantAdd != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var updateChatParticipantDelete = update as TLUpdateChatParticipantDelete;\r\n            if (updateChatParticipantDelete != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var updateNotifySettings = update as TLUpdateNotifySettings;\r\n            if (updateNotifySettings != null)\r\n            {\r\n                var notifyPeer = updateNotifySettings.Peer as TLNotifyPeer;\r\n\r\n                if (notifyPeer != null)\r\n                {\r\n\r\n                    var dialog = _cacheService.GetDialog(notifyPeer.Peer);\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog.NotifySettings = updateNotifySettings.NotifySettings;\r\n\r\n                        var peerUser = dialog.Peer as TLPeerUser;\r\n                        if (peerUser != null)\r\n                        {\r\n                            var user = _cacheService.GetUser(peerUser.Id);\r\n                            if (user != null)\r\n                            {\r\n                                user.NotifySettings = updateNotifySettings.NotifySettings;\r\n                                if (dialog.With != null)\r\n                                {\r\n                                    var dialogUser = dialog.With as TLUserBase;\r\n                                    if (dialogUser != null)\r\n                                    {\r\n                                        dialogUser.NotifySettings = updateNotifySettings.NotifySettings;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var peerChat = dialog.Peer as TLPeerChat;\r\n                        if (peerChat != null)\r\n                        {\r\n                            var chat = _cacheService.GetChat(peerChat.Id);\r\n                            if (chat != null)\r\n                            {\r\n                                chat.NotifySettings = updateNotifySettings.NotifySettings;\r\n                                if (dialog.With != null)\r\n                                {\r\n                                    var dialogChat = dialog.With as TLChatBase;\r\n                                    if (dialogChat != null)\r\n                                    {\r\n                                        dialogChat.NotifySettings = updateNotifySettings.NotifySettings;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        if (peerChat != null || peerUser != null)\r\n                        {\r\n                            _cacheService.Commit();\r\n                        }\r\n\r\n                        Helpers.Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateNotifySettings));\r\n                    }\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateWebPage = update as TLUpdateWebPage;\r\n            if (updateWebPage != null)\r\n            {\r\n                var message = _cacheService.GetMessage(updateWebPage.WebPage) as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    message._media = new TLMessageMediaWebPage { WebPage = updateWebPage.WebPage };\r\n\r\n                    _cacheService.SyncMessage(message,\r\n                        m =>\r\n                        {\r\n                            Helpers.Execute.BeginOnUIThread(() => message.NotifyOfPropertyChange(() => message.Media));\r\n                        });\r\n                }\r\n\r\n                Helpers.Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateWebPage));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateNewStickerSet = update as TLUpdateNewStickerSet;\r\n            if (updateNewStickerSet != null)\r\n            {\r\n                Execute.ShowDebugMessage(\"TLUpdateNewStickeSet\");\r\n\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateNewStickerSet));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateStickerSetsOrder = update as TLUpdateStickerSetsOrder;\r\n            if (updateStickerSetsOrder != null)\r\n            {\r\n                Execute.ShowDebugMessage(\"TLUpdateStickerSetsOrder56\");\r\n\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateStickerSetsOrder));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateStickerSets = update as TLUpdateStickerSets;\r\n            if (updateStickerSets != null)\r\n            {\r\n                Execute.ShowDebugMessage(\"TLUpdateStickerSets\");\r\n\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateStickerSets));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateReadFeaturedStickers = update as TLUpdateReadFeaturedStickers;\r\n            if (updateReadFeaturedStickers != null)\r\n            {\r\n                Execute.ShowDebugMessage(\"TLUpdateReadFeaturedStickers\");\r\n\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateReadFeaturedStickers));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateRecentStickers = update as TLUpdateRecentStickers;\r\n            if (updateRecentStickers != null)\r\n            {\r\n                Execute.ShowDebugMessage(\"TLUpdateRecentStickers\");\r\n\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateRecentStickers));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateFavedStickers = update as TLUpdateFavedStickers;\r\n            if (updateFavedStickers != null)\r\n            {\r\n                //Execute.ShowDebugMessage(\"TLUpdateFavedStickers\");\r\n\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateFavedStickers));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateSavedGifs = update as TLUpdateSavedGifs;\r\n            if (updateSavedGifs != null)\r\n            {\r\n                Execute.ShowDebugMessage(\"TLUpdateSavedGifs\");\r\n\r\n                //Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateSavedGifs));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateBotInlineQuery = update as TLUpdateBotInlineQuery;\r\n            if (updateBotInlineQuery != null)\r\n            {\r\n                Execute.ShowDebugMessage(\"TLUpdateBotInlineQuery\");\r\n\r\n                //Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateSavedGifs));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateBotCallbackQuery = update as TLUpdateBotCallbackQuery;\r\n            if (updateBotCallbackQuery != null)\r\n            {\r\n                Execute.ShowDebugMessage(\"TLUpdateBotCallbackQuery\");\r\n\r\n                //Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateSavedGifs));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateBotInlineSend = update as TLUpdateBotInlineSend;\r\n            if (updateBotInlineSend != null)\r\n            {\r\n                Execute.ShowDebugMessage(\"TLUpdateBotInlineSend\");\r\n\r\n                //Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateSavedGifs));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateInlineBotCallbackQuery = update as TLUpdateInlineBotCallbackQuery;\r\n            if (updateInlineBotCallbackQuery != null)\r\n            {\r\n                Execute.ShowDebugMessage(\"TLUpdateInlineBotCallbackQuery\");\r\n\r\n                //Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateSavedGifs));\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateDraftMessage = update as TLUpdateDraftMessage;\r\n            if (updateDraftMessage != null)\r\n            {\r\n                //Execute.ShowDebugMessage(\"TLUpdateDraftMessage draft=\" + updateDraftMessage.Draft);\r\n\r\n                var dialog = _cacheService.GetDialog(updateDraftMessage.Peer) as TLDialog53;\r\n                if (dialog != null)\r\n                {\r\n                    dialog.Draft = updateDraftMessage.Draft;\r\n\r\n                    _cacheService.Commit();\r\n                }\r\n\r\n                if (notifyNewMessage)\r\n                {\r\n                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateDraftMessage));\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            var updatePinnedDialogs = update as TLUpdatePinnedDialogs;\r\n            if (updatePinnedDialogs != null)\r\n            {\r\n#if DEBUG\r\n                var order = new List<string>();\r\n                if (updatePinnedDialogs.Order != null)\r\n                {\r\n                    foreach (var peer in updatePinnedDialogs.Order)\r\n                    {\r\n                        order.Add(peer.ToString());\r\n                    }\r\n                }\r\n\r\n                Execute.ShowDebugMessage(string.Format(\"TLUpdatePinnedDialogs order=[{0}]\", string.Join(\", \", order)));\r\n#endif\r\n\r\n                //if (updatePinnedDialogs.Order == null)\r\n                //{\r\n                GetPinnedDialogsAsync(result =>\r\n                {\r\n                    // important: must be true in all cases. UpdateCompletedEventArgs will be invoke before getting new pinned chats\r\n                    //if (notifyNewMessage)\r\n                    {\r\n                        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updatePinnedDialogs));\r\n                    }\r\n                });\r\n                //}\r\n                //else\r\n                //{\r\n                //    _cacheService.UpdatePinnedDialogs(updatePinnedDialogs.Order); \r\n\r\n                //    if (notifyNewMessage)\r\n                //    {\r\n                //        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updatePinnedDialogs));\r\n                //    }\r\n                //}\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateDialogPinned = update as TLUpdateDialogPinned76;\r\n            if (updateDialogPinned != null)\r\n            {\r\n                var dialogPeer = updateDialogPinned.Peer as TLDialogPeer;\r\n                if (dialogPeer != null)\r\n                {\r\n                    _cacheService.UpdateDialogPinned(dialogPeer.Peer, updateDialogPinned.Pinned);\r\n                }\r\n\r\n                if (notifyNewMessage)\r\n                {\r\n                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateDialogPinned));\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateChannelAvailableMessages = update as TLUpdateChannelAvailableMessages;\r\n            if (updateChannelAvailableMessages != null)\r\n            {\r\n                _cacheService.UpdateChannelAvailableMessages(updateChannelAvailableMessages.ChannelId, updateChannelAvailableMessages.AvailableMinId);\r\n\r\n                if (notifyNewMessage)\r\n                {\r\n                    Execute.BeginOnThreadPool(() => _eventAggregator.Publish(updateChannelAvailableMessages));\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            var updateDialogUnreadMark = update as TLUpdateDialogUnreadMark;\r\n            if (updateDialogUnreadMark != null)\r\n            {\r\n                var dialogPeer = updateDialogUnreadMark.Peer as TLDialogPeer;\r\n                if (dialogPeer != null)\r\n                {\r\n                    var dialog = _cacheService.GetDialog(dialogPeer.Peer);\r\n                    if (dialog != null)\r\n                    {\r\n                        var dialog71 = dialog as TLDialog71;\r\n                        if (dialog71 != null)\r\n                        {\r\n                            dialog71.UnreadMark = updateDialogUnreadMark.Unread;\r\n                        }\r\n\r\n                        if (notifyNewMessage)\r\n                        {\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                if (dialog71 != null)\r\n                                {\r\n                                    dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMark);\r\n                                }\r\n                            });\r\n                        }\r\n                    }\r\n\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static void SetReadMaxId(IReadMaxId readMaxId, TLInt maxId, bool outbox)\r\n        {\r\n            if (readMaxId == null) return;\r\n\r\n            if (outbox)\r\n            {\r\n                if (readMaxId.ReadOutboxMaxId == null || readMaxId.ReadOutboxMaxId.Value < maxId.Value)\r\n                {\r\n                    readMaxId.ReadOutboxMaxId = maxId;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (readMaxId.ReadInboxMaxId == null || readMaxId.ReadInboxMaxId.Value < maxId.Value)\r\n                {\r\n                    readMaxId.ReadInboxMaxId = maxId;\r\n                }\r\n            }\r\n        }\r\n\r\n        private object _waitingEncryptedMessagesSyncRoot = new object();\r\n\r\n        private List<TLUpdateNewEncryptedMessage> _waitingEncryptedMessages = new List<TLUpdateNewEncryptedMessage>();\r\n\r\n\r\n        private bool? ProcessEncryptedChatUpdate(TLUpdateBase update)\r\n        {\r\n            // typing\r\n            var updateEncryptedChatTyping = update as TLUpdateEncryptedChatTyping;\r\n            if (updateEncryptedChatTyping != null)\r\n            {\r\n                _eventAggregator.Publish(updateEncryptedChatTyping);\r\n\r\n                return true;\r\n            }\r\n\r\n            // reading\r\n            var updateEncryptedMessagesRead = update as TLUpdateEncryptedMessagesRead;\r\n            if (updateEncryptedMessagesRead != null)\r\n            {\r\n                //Helpers.Execute.ShowDebugMessage(updateEncryptedMessagesRead.ToString());\r\n\r\n                var encryptedChat = _cacheService.GetEncryptedChat(updateEncryptedMessagesRead.ChatId) as TLEncryptedChat;\r\n\r\n                if (encryptedChat != null)\r\n                {\r\n                    var items = _cacheService.GetDecryptedHistory(encryptedChat.Id.Value, 100);\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        for (var i = 0; i < items.Count; i++)\r\n                        {\r\n                            if (items[i].Out.Value)\r\n                            {\r\n                                if (items[i].Status == MessageStatus.Confirmed)\r\n                                //&& Items[i].Date.Value <= update.MaxDate.Value) // здесь надо учитывать смещение по времени\r\n                                {\r\n                                    items[i].Status = MessageStatus.Read;\r\n                                    items[i].NotifyOfPropertyChange(() => items[i].Status);\r\n\r\n                                    if (items[i].TTL != null && items[i].TTL.Value > 0)\r\n                                    {\r\n                                        var decryptedMessage = items[i] as TLDecryptedMessage17;\r\n                                        if (decryptedMessage != null)\r\n                                        {\r\n                                            var decryptedPhoto = decryptedMessage.Media as TLDecryptedMessageMediaPhoto;\r\n                                            if (decryptedPhoto != null && items[i].TTL.Value <= 60.0)\r\n                                            {\r\n                                                continue;\r\n                                            }\r\n\r\n                                            var decryptedVideo17 = decryptedMessage.Media as TLDecryptedMessageMediaVideo17;\r\n                                            if (decryptedVideo17 != null && items[i].TTL.Value <= 60.0)\r\n                                            {\r\n                                                continue;\r\n                                            }\r\n\r\n                                            var decryptedAudio17 = decryptedMessage.Media as TLDecryptedMessageMediaAudio17;\r\n                                            if (decryptedAudio17 != null && items[i].TTL.Value <= 60.0)\r\n                                            {\r\n                                                continue;\r\n                                            }\r\n\r\n                                            var decryptedDocument45 = decryptedMessage.Media as TLDecryptedMessageMediaDocument45;\r\n                                            if (decryptedDocument45 != null && (items[i].IsVoice() || items[i].IsVideo()) && items[i].TTL.Value <= 60.0)\r\n                                            {\r\n                                                continue;\r\n                                            }\r\n                                        }\r\n\r\n                                        items[i].DeleteDate = new TLLong(DateTime.Now.Ticks + encryptedChat.MessageTTL.Value * TimeSpan.TicksPerSecond);\r\n                                    }\r\n                                }\r\n                                else if (items[i].Status == MessageStatus.Read)\r\n                                {\r\n                                    var message = items[i] as TLDecryptedMessage;\r\n                                    if (message != null)\r\n                                    {\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var dialog = _cacheService.GetEncryptedDialog(encryptedChat.Id) as TLEncryptedDialog;\r\n                        if (dialog != null)\r\n                        {\r\n                            //dialog.UnreadCount = new TLInt(dialog.UnreadCount.Value - 1);\r\n                            var topMessage = dialog.TopMessage;\r\n                            if (topMessage != null)\r\n                            {\r\n                                dialog.NotifyOfPropertyChange(() => dialog.TopMessage);\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n\r\n                //_eventAggregator.Publish(updateEncryptedMessagesRead);\r\n\r\n                return true;\r\n            }\r\n\r\n            // message\r\n            var updateNewEncryptedMessage = update as TLUpdateNewEncryptedMessage;\r\n            if (updateNewEncryptedMessage != null)\r\n            {\r\n                var encryptedMessageBase = updateNewEncryptedMessage.Message;\r\n                if (encryptedMessageBase != null)\r\n                {\r\n                    var encryptedChat = _cacheService.GetEncryptedChat(encryptedMessageBase.ChatId) as TLEncryptedChat;\r\n                    if (encryptedChat == null)\r\n                    {\r\n                        var chat = _cacheService.GetEncryptedChat(encryptedMessageBase.ChatId);\r\n                        if (chat is TLEncryptedChatWaiting)\r\n                        {\r\n                            Debug.WriteLine(\"  >>ProcessEncryptedChatUpdate await TLUpdateNewEncryptedMessage chat_id=\" + chat.Id);\r\n                            lock (_waitingEncryptedMessagesSyncRoot)\r\n                            {\r\n                                _waitingEncryptedMessages.Add(updateNewEncryptedMessage);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(string.Format(\"ProcessEncryptedChatUpdate chat_id={0} is not TLEncryptedChat ({1})\", encryptedMessageBase.ChatId, chat != null ? chat.GetType() : null));\r\n                        }\r\n\r\n                        return true;\r\n                    }\r\n\r\n                    TLDecryptedMessageBase decryptedMessage = null;\r\n                    try\r\n                    {\r\n                        bool commitChat;\r\n                        decryptedMessage = GetDecryptedMessage(MTProtoService.Instance.CurrentUserId, encryptedChat, encryptedMessageBase, updateNewEncryptedMessage.Qts, out commitChat);\r\n                        if (commitChat)\r\n                        {\r\n                            _cacheService.Commit();\r\n                        }\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        Execute.ShowDebugMessage(\"ProcessEncryptedChatUpdate ex \" + ex);\r\n                    }\r\n\r\n                    if (decryptedMessage == null)\r\n                    {\r\n                        return true;\r\n                    }\r\n\r\n                    var seqNoDecryptedMessage = decryptedMessage as ISeqNo;\r\n                    var encryptedChat17 = encryptedChat as TLEncryptedChat17;\r\n                    if (seqNoDecryptedMessage != null\r\n                        && encryptedChat17 != null)\r\n                    {\r\n                        var chatRawInSeqNo = encryptedChat17.RawInSeqNo.Value;\r\n                        var messageRawInSeqNo = GetRawInFromReceivedMessage(MTProtoService.Instance.CurrentUserId, encryptedChat17, seqNoDecryptedMessage);\r\n\r\n                        if (chatRawInSeqNo <= messageRawInSeqNo)\r\n                        {\r\n                            if (messageRawInSeqNo > chatRawInSeqNo)\r\n                            {\r\n                                Execute.ShowDebugMessage(string.Format(\"ProcessEncryptedChatUpdate decrypted message gap chatId={0} chatRawInSeqNo={1} messageRawInSeqNo={2}\", encryptedChat17.Id, chatRawInSeqNo, messageRawInSeqNo));\r\n                            }\r\n\r\n                            encryptedChat17.RawInSeqNo = new TLInt(chatRawInSeqNo + 1);\r\n                            _cacheService.SyncEncryptedChat(encryptedChat17, r => { });\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(string.Format(\"ProcessEncryptedChatUpdate skip old decrypted message chatId={0} chatRawInSeqNo={1} messageRawInSeqNo={2}\", encryptedChat17.Id, chatRawInSeqNo, messageRawInSeqNo));\r\n                            return true;\r\n                        }\r\n                    }\r\n\r\n                    var decryptedMessageService = decryptedMessage as TLDecryptedMessageService;\r\n                    if (decryptedMessageService != null)\r\n                    {\r\n                        var readMessagesAction = decryptedMessageService.Action as TLDecryptedMessageActionReadMessages;\r\n                        if (readMessagesAction != null)\r\n                        {\r\n                            var items = _cacheService.GetDecryptedHistory(encryptedChat.Id.Value, 100);\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                foreach (var randomId in readMessagesAction.RandomIds)\r\n                                {\r\n                                    foreach (var item in items)\r\n                                    {\r\n                                        if (item.RandomId.Value == randomId.Value)\r\n                                        {\r\n                                            item.Status = MessageStatus.Read;\r\n                                            if (item.TTL != null && item.TTL.Value > 0)\r\n                                            {\r\n                                                item.DeleteDate = new TLLong(DateTime.Now.Ticks + encryptedChat.MessageTTL.Value * TimeSpan.TicksPerSecond);\r\n                                            }\r\n\r\n                                            var message = item as TLDecryptedMessage17;\r\n                                            if (message != null)\r\n                                            {\r\n                                                var decryptedMediaPhoto = message.Media as TLDecryptedMessageMediaPhoto;\r\n                                                if (decryptedMediaPhoto != null)\r\n                                                {\r\n                                                    if (decryptedMediaPhoto.TTLParams == null)\r\n                                                    {\r\n                                                        var ttlParams = new TTLParams();\r\n                                                        ttlParams.IsStarted = true;\r\n                                                        ttlParams.Total = message.TTL.Value;\r\n                                                        ttlParams.StartTime = DateTime.Now;\r\n                                                        ttlParams.Out = message.Out.Value;\r\n\r\n                                                        decryptedMediaPhoto.TTLParams = ttlParams;\r\n                                                    }\r\n                                                }\r\n\r\n                                                var decryptedMediaVideo17 = message.Media as TLDecryptedMessageMediaVideo17;\r\n                                                if (decryptedMediaVideo17 != null)\r\n                                                {\r\n                                                    if (decryptedMediaVideo17.TTLParams == null)\r\n                                                    {\r\n                                                        var ttlParams = new TTLParams();\r\n                                                        ttlParams.IsStarted = true;\r\n                                                        ttlParams.Total = message.TTL.Value;\r\n                                                        ttlParams.StartTime = DateTime.Now;\r\n                                                        ttlParams.Out = message.Out.Value;\r\n\r\n                                                        decryptedMediaVideo17.TTLParams = ttlParams;\r\n                                                    }\r\n                                                }\r\n\r\n                                                var decryptedMediaAudio17 = message.Media as TLDecryptedMessageMediaAudio17;\r\n                                                if (decryptedMediaAudio17 != null)\r\n                                                {\r\n                                                    if (decryptedMediaAudio17.TTLParams == null)\r\n                                                    {\r\n                                                        var ttlParams = new TTLParams();\r\n                                                        ttlParams.IsStarted = true;\r\n                                                        ttlParams.Total = message.TTL.Value;\r\n                                                        ttlParams.StartTime = DateTime.Now;\r\n                                                        ttlParams.Out = message.Out.Value;\r\n\r\n                                                        decryptedMediaAudio17.TTLParams = ttlParams;\r\n                                                    }\r\n                                                }\r\n\r\n                                                var decryptedMediaDocument45 = message.Media as TLDecryptedMessageMediaDocument45;\r\n                                                if (decryptedMediaDocument45 != null && (message.IsVoice() || message.IsVideo()))\r\n                                                {\r\n                                                    if (decryptedMediaDocument45.TTLParams == null)\r\n                                                    {\r\n                                                        var ttlParams = new TTLParams();\r\n                                                        ttlParams.IsStarted = true;\r\n                                                        ttlParams.Total = message.TTL.Value;\r\n                                                        ttlParams.StartTime = DateTime.Now;\r\n                                                        ttlParams.Out = message.Out.Value;\r\n\r\n                                                        decryptedMediaDocument45.TTLParams = ttlParams;\r\n                                                    }\r\n\r\n                                                    var message45 = message as TLDecryptedMessage45;\r\n                                                    if (message45 != null)\r\n                                                    {\r\n                                                        message45.SetListened();\r\n                                                    }\r\n                                                    decryptedMediaDocument45.NotListened = false;\r\n                                                    decryptedMediaDocument45.NotifyOfPropertyChange(() => decryptedMediaDocument45.NotListened);\r\n                                                }\r\n                                            }\r\n                                            break;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            });\r\n\r\n                        }\r\n                    }\r\n\r\n                    var isDisplayedMessage = TLUtils.IsDisplayedDecryptedMessageInternal(decryptedMessage);\r\n                    if (!isDisplayedMessage)\r\n                    {\r\n                        decryptedMessage.Unread = TLBool.False;\r\n                    }\r\n\r\n                    ProcessPFS(SendEncryptedServiceAsync, _cacheService, _eventAggregator, encryptedChat, decryptedMessageService);\r\n\r\n                    ProcessNewLayer(SendEncryptedServiceAsync, _cacheService, _eventAggregator, encryptedChat, decryptedMessage);\r\n\r\n                    _eventAggregator.Publish(decryptedMessage);\r\n\r\n                    _cacheService.SyncDecryptedMessage(decryptedMessage, encryptedChat, cachedMessage =>\r\n                    {\r\n                        SetState(null, null, updateNewEncryptedMessage.Qts, null, null, \"ProcessEncryptedChatUpdate\");\r\n                    });\r\n\r\n                    if (decryptedMessageService != null)\r\n                    {\r\n                        var resendAction = decryptedMessageService.Action as TLDecryptedMessageActionResend;\r\n                        if (resendAction != null)\r\n                        {\r\n                            Execute.ShowDebugMessage(string.Format(\"ProcessEncryptedChatUpdate TLDecryptedMessageActionResend start_seq_no={0} end_seq_no={1}\", resendAction.StartSeqNo, resendAction.EndSeqNo));\r\n                        }\r\n                    }\r\n\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            var updatePhoneCall = update as TLUpdatePhoneCall;\r\n            if (updatePhoneCall != null)\r\n            {\r\n                try\r\n                {\r\n                    _eventAggregator.Publish(updatePhoneCall);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(\"ProcessUpdateInternal\", ex);\r\n                }\r\n            }\r\n\r\n            // creating, new layer\r\n            var updateEncryption = update as TLUpdateEncryption;\r\n            if (updateEncryption != null)\r\n            {\r\n                var chatRequested = updateEncryption.Chat as TLEncryptedChatRequested;\r\n\r\n                if (chatRequested != null)\r\n                {\r\n                    _cacheService.SyncEncryptedChat(updateEncryption.Chat, result => _eventAggregator.Publish(result));\r\n\r\n                    var message = new TLDecryptedMessageService17\r\n                    {\r\n                        RandomId = TLLong.Random(),\r\n                        //RandomBytes = TLString.Random(Constants.MinRandomBytesLength),\r\n                        ChatId = chatRequested.Id,\r\n                        Action = new TLDecryptedMessageActionEmpty(),\r\n                        FromId = MTProtoService.Instance.CurrentUserId,\r\n                        Date = chatRequested.Date,\r\n                        Out = new TLBool(false),\r\n                        Unread = new TLBool(false),\r\n                        Status = MessageStatus.Read\r\n                    };\r\n\r\n                    _cacheService.SyncDecryptedMessage(message, chatRequested, result => { });\r\n\r\n                    GetDHConfigAsync(new TLInt(0), new TLInt(0),\r\n                        result =>\r\n                        {\r\n                            var dhConfig = (TLDHConfig)result;\r\n                            if (!TLUtils.CheckPrime(dhConfig.P.Data, dhConfig.G.Value))\r\n                            {\r\n                                return;\r\n                            }\r\n                            if (!TLUtils.CheckGaAndGb(chatRequested.GA.Data, dhConfig.P.Data))\r\n                            {\r\n                                return;\r\n                            }\r\n\r\n                            //TODO: precalculate gb to improve speed\r\n                            var bBytes = new byte[256];\r\n                            var random = new SecureRandom();\r\n                            random.NextBytes(bBytes);\r\n                            //var b = TLString.FromBigEndianData(bBytes);\r\n                            var p = dhConfig.P;\r\n                            var g = dhConfig.G;\r\n\r\n                            updateEncryption.Chat.P = p;\r\n                            updateEncryption.Chat.G = g;\r\n\r\n                            var gbBytes = MTProtoService.GetGB(bBytes, dhConfig.G, dhConfig.P);\r\n                            var gb = TLString.FromBigEndianData(gbBytes);\r\n\r\n                            var key = MTProtoService.GetAuthKey(bBytes, chatRequested.GA.ToBytes(), dhConfig.P.ToBytes());\r\n                            var keyHash = Utils.ComputeSHA1(key);\r\n                            var keyFingerprint = new TLLong(BitConverter.ToInt64(keyHash, 12));\r\n\r\n                            AcceptEncryptionAsync(\r\n                                new TLInputEncryptedChat\r\n                                {\r\n                                    AccessHash = chatRequested.AccessHash,\r\n                                    ChatId = chatRequested.Id\r\n                                },\r\n                                gb,\r\n                                keyFingerprint,\r\n                                chat =>\r\n                                {\r\n                                    chat.P = p;\r\n                                    chat.G = g;\r\n                                    chat.Key = TLString.FromBigEndianData(key);\r\n                                    chat.KeyFingerprint = keyFingerprint;\r\n\r\n                                    _cacheService.SyncEncryptedChat(chat, r2 => _eventAggregator.Publish(r2));\r\n                                },\r\n                                er =>\r\n                                {\r\n                                    Helpers.Execute.ShowDebugMessage(\"messages.acceptEncryption \" + er);\r\n                                });\r\n\r\n                        },\r\n                        error =>\r\n                        {\r\n                            Helpers.Execute.ShowDebugMessage(\"messages.getDhConfig error \" + error);\r\n                        });\r\n                }\r\n\r\n                var encryptedChat = updateEncryption.Chat as TLEncryptedChat;\r\n                if (encryptedChat != null)\r\n                {\r\n                    var waitingChat = _cacheService.GetEncryptedChat(encryptedChat.Id) as TLEncryptedChatWaiting;\r\n\r\n                    if (waitingChat != null)\r\n                    {\r\n                        _cacheService.SyncEncryptedChat(encryptedChat,\r\n                            syncedChat =>\r\n                            {\r\n                                // to avoid raise conditions for TLUpdateEncryption and TLUpdateNewEncryptedMessage with layer notificaiton\r\n                                var updates = new List<TLUpdateNewEncryptedMessage>();\r\n                                lock (_waitingEncryptedMessagesSyncRoot)\r\n                                {\r\n                                    for (var i = 0; i < _waitingEncryptedMessages.Count; i++)\r\n                                    {\r\n                                        if (_waitingEncryptedMessages[i].Message.ChatId.Value == syncedChat.Index)\r\n                                        {\r\n                                            updates.Add(_waitingEncryptedMessages[i]);\r\n                                            _waitingEncryptedMessages.RemoveAt(i--);\r\n                                        }\r\n                                    }\r\n                                }\r\n                                foreach (var u in updates)\r\n                                {\r\n                                    Debug.WriteLine(\"  >>ProcessEncryptedChatUpdate process awaited TLUpdateNewEncryptedMessage chat_id=\" + syncedChat.Id);\r\n                                    ProcessEncryptedChatUpdate(u);\r\n                                }\r\n\r\n                                var syncedChat17 = _cacheService.GetEncryptedChat(encryptedChat.Id) as TLEncryptedChat17;\r\n                                if (syncedChat17 == null\r\n                                    || syncedChat17.Layer.Value <= Constants.MinSecretSupportedLayer)\r\n                                {\r\n                                    var layer = new TLInt(Constants.MinSecretSupportedLayer);\r\n                                    var rawInSeqNo = new TLInt(0);\r\n                                    var rawOutSeqNo = new TLInt(0);\r\n                                    UpgradeSecretChatLayerAndSendNotification(SendEncryptedServiceAsync, _cacheService, _eventAggregator, encryptedChat, layer, rawInSeqNo, rawOutSeqNo);\r\n                                }\r\n                            });\r\n                    }\r\n\r\n                    var encryptedChat17 = _cacheService.GetEncryptedChat(encryptedChat.Id) as TLEncryptedChat17;\r\n                    if (encryptedChat17 != null)\r\n                    {\r\n                        updateEncryption.Chat = encryptedChat17;\r\n                    }\r\n\r\n                    _cacheService.SyncEncryptedChat(updateEncryption.Chat,\r\n                        r =>\r\n                        {\r\n                            _eventAggregator.Publish(r);\r\n                        });\r\n                }\r\n                else\r\n                {\r\n                    _cacheService.SyncEncryptedChat(updateEncryption.Chat,\r\n                        r =>\r\n                        {\r\n                            _eventAggregator.Publish(r);\r\n                        });\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static void ProcessNewLayer(SendEncryptedServiceAction sendEncryptedServiceActionAsync, ICacheService cacheService, ITelegramEventAggregator eventAggregator, TLEncryptedChatBase encryptedChatBase, TLDecryptedMessageBase decryptedMessageBase)\r\n        {\r\n            var seqNoMessage = decryptedMessageBase as ISeqNo;\r\n            var encryptedChat8 = encryptedChatBase as TLEncryptedChat;\r\n            var encryptedChat17 = encryptedChatBase as TLEncryptedChat17;\r\n            var decryptedMessageService = decryptedMessageBase as TLDecryptedMessageService;\r\n\r\n            if (seqNoMessage != null)\r\n            {\r\n                if (encryptedChat17 != null)\r\n                {\r\n                    if (decryptedMessageService != null)\r\n                    {\r\n                        var notifyLayerAction = decryptedMessageService.Action as TLDecryptedMessageActionNotifyLayer;\r\n                        if (notifyLayerAction != null)\r\n                        {\r\n                            if (encryptedChat17.Layer.Value < notifyLayerAction.Layer.Value\r\n                                && notifyLayerAction.Layer.Value <= Constants.SecretSupportedLayer)\r\n                            {\r\n                                var layer = notifyLayerAction.Layer;\r\n                                var rawInSeqNo = encryptedChat17.RawInSeqNo;\r\n                                var rawOutSeqNo = encryptedChat17.RawOutSeqNo;\r\n                                UpgradeSecretChatLayerAndSendNotification(sendEncryptedServiceActionAsync, cacheService, eventAggregator, encryptedChat17, layer, rawInSeqNo, rawOutSeqNo);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else if (encryptedChat8 != null)\r\n                {\r\n                    var newLayer = Constants.SecretSupportedLayer;\r\n                    if (decryptedMessageService != null)\r\n                    {\r\n                        var actionNotifyLayer = decryptedMessageService.Action as TLDecryptedMessageActionNotifyLayer;\r\n                        if (actionNotifyLayer != null)\r\n                        {\r\n                            if (actionNotifyLayer.Layer.Value <= Constants.SecretSupportedLayer)\r\n                            {\r\n                                newLayer = actionNotifyLayer.Layer.Value;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var layer = new TLInt(newLayer);\r\n                    var rawInSeqNo = new TLInt(1);  // one message was received\r\n                    var rawOutSeqNo = new TLInt(0);\r\n                    UpgradeSecretChatLayerAndSendNotification(sendEncryptedServiceActionAsync, cacheService, eventAggregator, encryptedChat8, layer, rawInSeqNo, rawOutSeqNo);\r\n                }\r\n            }\r\n            else if (decryptedMessageService != null)\r\n            {\r\n                var notifyLayerAction = decryptedMessageService.Action as TLDecryptedMessageActionNotifyLayer;\r\n                if (notifyLayerAction != null)\r\n                {\r\n                    if (encryptedChat17 != null)\r\n                    {\r\n                        var newLayer = Constants.SecretSupportedLayer;\r\n                        if (notifyLayerAction.Layer.Value <= Constants.SecretSupportedLayer)\r\n                        {\r\n                            newLayer = notifyLayerAction.Layer.Value;\r\n                        }\r\n\r\n                        var layer = new TLInt(newLayer);\r\n                        var rawInSeqNo = new TLInt(0);\r\n                        var rawOutSeqNo = new TLInt(0);\r\n                        UpgradeSecretChatLayerAndSendNotification(sendEncryptedServiceActionAsync, cacheService, eventAggregator, encryptedChat17, layer, rawInSeqNo, rawOutSeqNo);\r\n                    }\r\n                    else if (encryptedChat8 != null)\r\n                    {\r\n                        var newLayer = Constants.SecretSupportedLayer;\r\n                        if (notifyLayerAction.Layer.Value <= Constants.SecretSupportedLayer)\r\n                        {\r\n                            newLayer = notifyLayerAction.Layer.Value;\r\n                        }\r\n\r\n                        var layer = new TLInt(newLayer);\r\n                        var rawInSeqNo = new TLInt(1);  // one message was received\r\n                        var rawOutSeqNo = new TLInt(0);\r\n                        UpgradeSecretChatLayerAndSendNotification(sendEncryptedServiceActionAsync, cacheService, eventAggregator, encryptedChat8, layer, rawInSeqNo, rawOutSeqNo);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void ProcessPFS(SendEncryptedServiceAction sendEncryptedServiceActionAsync, ICacheService cacheService, ITelegramEventAggregator eventAggregator, TLEncryptedChatBase encryptedChatBase, TLDecryptedMessageService decryptedMessageService)\r\n        {\r\n            var encryptedChat = encryptedChatBase as TLEncryptedChat20;\r\n            if (encryptedChat == null) return;\r\n            if (decryptedMessageService == null) return;\r\n\r\n            var abortKey = decryptedMessageService.Action as TLDecryptedMessageActionAbortKey;\r\n            if (abortKey != null)\r\n            {\r\n                encryptedChat.PFS_A = null;\r\n                encryptedChat.PFS_ExchangeId = null;\r\n                cacheService.SyncEncryptedChat(encryptedChat, cachedChat =>\r\n                {\r\n\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            var noop = decryptedMessageService.Action as TLDecryptedMessageActionNoop;\r\n            if (noop != null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var commitKey = decryptedMessageService.Action as TLDecryptedMessageActionCommitKey;\r\n            if (commitKey != null)\r\n            {\r\n                encryptedChat.PFS_A = null;\r\n                encryptedChat.PFS_ExchangeId = null;\r\n                encryptedChat.Key = encryptedChat.PFS_Key;\r\n                encryptedChat.PFS_Key = null;\r\n                cacheService.SyncEncryptedChat(encryptedChat, cachedChat =>\r\n                {\r\n                    eventAggregator.Publish(encryptedChat);\r\n\r\n                    var actionNoop = new TLDecryptedMessageActionNoop();\r\n\r\n                    SendEncryptedServiceActionAsync(sendEncryptedServiceActionAsync, cacheService, eventAggregator, encryptedChat, actionNoop,\r\n                        (message, result) =>\r\n                        {\r\n\r\n                        });\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            var requestKey = decryptedMessageService.Action as TLDecryptedMessageActionRequestKey;\r\n            if (requestKey != null)\r\n            {\r\n                var bBytes = new byte[256];\r\n                var random = new Random();\r\n                random.NextBytes(bBytes);\r\n                var p = encryptedChat.P;\r\n                var g = encryptedChat.G;\r\n\r\n                var gbBytes = MTProtoService.GetGB(bBytes, g, p);\r\n                var gb = TLString.FromBigEndianData(gbBytes);\r\n\r\n                encryptedChat.PFS_A = TLString.FromBigEndianData(bBytes);\r\n                encryptedChat.PFS_ExchangeId = requestKey.ExchangeId;\r\n\r\n                if (!TLUtils.CheckGaAndGb(requestKey.GA.Data, encryptedChat.P.Data))\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var key = MTProtoService.GetAuthKey(encryptedChat.PFS_A.Data, requestKey.GA.ToBytes(), encryptedChat.P.ToBytes());\r\n                var keyHash = Utils.ComputeSHA1(key);\r\n                var keyFingerprint = new TLLong(BitConverter.ToInt64(keyHash, 12));\r\n\r\n                encryptedChat.PFS_Key = TLString.FromBigEndianData(key);\r\n                encryptedChat.PFS_KeyFingerprint = keyFingerprint;\r\n                cacheService.SyncEncryptedChat(encryptedChat, cachedChat =>\r\n                {\r\n                    var actionAcceptKey = new TLDecryptedMessageActionAcceptKey\r\n                    {\r\n                        ExchangeId = encryptedChat.PFS_ExchangeId,\r\n                        KeyFingerprint = keyFingerprint,\r\n                        GB = gb\r\n                    };\r\n\r\n                    SendEncryptedServiceActionAsync(sendEncryptedServiceActionAsync, cacheService, eventAggregator, encryptedChat, actionAcceptKey,\r\n                        (message, result) =>\r\n                        {\r\n\r\n                        });\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            var acceptKey = decryptedMessageService.Action as TLDecryptedMessageActionAcceptKey;\r\n            if (acceptKey != null)\r\n            {\r\n                if (!TLUtils.CheckGaAndGb(acceptKey.GB.Data, encryptedChat.P.Data))\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var key = MTProtoService.GetAuthKey(encryptedChat.PFS_A.Data, acceptKey.GB.ToBytes(), encryptedChat.P.ToBytes());\r\n                var keyHash = Utils.ComputeSHA1(key);\r\n                var keyFingerprint = new TLLong(BitConverter.ToInt64(keyHash, 12));\r\n\r\n                // abort for keyfingerprint != acceptKey.keyFingerprint\r\n                if (keyFingerprint.Value != acceptKey.KeyFingerprint.Value)\r\n                {\r\n                    var actionAbortKey = new TLDecryptedMessageActionAbortKey\r\n                    {\r\n                        ExchangeId = encryptedChat.PFS_ExchangeId\r\n                    };\r\n\r\n                    SendEncryptedServiceActionAsync(sendEncryptedServiceActionAsync, cacheService, eventAggregator, encryptedChat, actionAbortKey,\r\n                        (message, result) =>\r\n                        {\r\n                            encryptedChat.PFS_A = null;\r\n                            encryptedChat.PFS_ExchangeId = null;\r\n\r\n                            eventAggregator.Publish(encryptedChat);\r\n                            cacheService.Commit();\r\n                        });\r\n\r\n                    return;\r\n                }\r\n\r\n                encryptedChat.PFS_Key = TLString.FromBigEndianData(key);\r\n                encryptedChat.PFS_KeyFingerprint = keyFingerprint;\r\n                cacheService.SyncEncryptedChat(encryptedChat, cachedChat =>\r\n                {\r\n                    var actionCommitKey = new TLDecryptedMessageActionCommitKey\r\n                    {\r\n                        ExchangeId = encryptedChat.PFS_ExchangeId,\r\n                        KeyFingerprint = keyFingerprint\r\n                    };\r\n\r\n                    SendEncryptedServiceActionAsync(sendEncryptedServiceActionAsync, cacheService, eventAggregator, encryptedChat, actionCommitKey,\r\n                        (message, result) =>\r\n                        {\r\n                            encryptedChat.PFS_ExchangeId = null;\r\n                            if (encryptedChat.PFS_Key != null)\r\n                            {\r\n                                encryptedChat.Key = encryptedChat.PFS_Key;\r\n                            }\r\n                            encryptedChat.PFS_A = null;\r\n                            encryptedChat.PFS_KeyFingerprint = null;\r\n                            cacheService.SyncEncryptedChat(encryptedChat, cachedChat2 =>\r\n                            {\r\n                                eventAggregator.Publish(encryptedChat);\r\n                            });\r\n                        });\r\n                });\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        private static void SendEncryptedServiceActionAsync(SendEncryptedServiceAction sendEncryptedServiceAsync, ICacheService cacheService, ITelegramEventAggregator eventAggregator, TLEncryptedChat20 encryptedChat, TLDecryptedMessageActionBase action, Action<TLDecryptedMessageBase, TLSentEncryptedMessage> callback)\r\n        {\r\n            if (encryptedChat == null) return;\r\n\r\n            var randomId = TLLong.Random();\r\n\r\n            var currentUserId = MTProtoService.Instance.CurrentUserId;\r\n            var clientTicksDelta = MTProtoService.Instance.ClientTicksDelta;\r\n\r\n            var inSeqNo = TLUtils.GetInSeqNo(currentUserId, encryptedChat);\r\n            var outSeqNo = TLUtils.GetOutSeqNo(currentUserId, encryptedChat);\r\n\r\n            encryptedChat.RawOutSeqNo = new TLInt(encryptedChat.RawOutSeqNo.Value + 1);\r\n\r\n            var message = new TLDecryptedMessageService17\r\n            {\r\n                Action = action,\r\n                RandomId = randomId,\r\n                //RandomBytes = TLString.Random(Constants.MinRandomBytesLength),\r\n                ChatId = encryptedChat.Id,\r\n                FromId = currentUserId,\r\n                Out = TLBool.True,\r\n                Unread = TLBool.False,\r\n                Date = TLUtils.DateToUniversalTimeTLInt(clientTicksDelta, DateTime.Now),\r\n                Status = MessageStatus.Sending,\r\n                TTL = new TLInt(0),\r\n                InSeqNo = inSeqNo,\r\n                OutSeqNo = outSeqNo\r\n            };\r\n\r\n            var decryptedMessageLayer17 = TLUtils.GetDecryptedMessageLayer(encryptedChat.Layer, inSeqNo, outSeqNo, message);\r\n\r\n            cacheService.SyncDecryptedMessage(\r\n                message,\r\n                encryptedChat,\r\n                messageResult =>\r\n                {\r\n                    sendEncryptedServiceAsync(\r\n                        new TLInputEncryptedChat\r\n                        {\r\n                            AccessHash = encryptedChat.AccessHash,\r\n                            ChatId = encryptedChat.Id\r\n                        },\r\n                        randomId,\r\n                        TLUtils.EncryptMessage(decryptedMessageLayer17, MTProtoService.Instance.CurrentUserId, encryptedChat),\r\n                        result =>\r\n                        {\r\n                            message.Status = MessageStatus.Confirmed;\r\n                            cacheService.SyncSendingDecryptedMessage(encryptedChat.Id, result.Date, message.RandomId,\r\n                                m =>\r\n                                {\r\n#if DEBUG\r\n                                    eventAggregator.Publish(message);\r\n#endif\r\n                                    callback.SafeInvoke(message, result);\r\n                                });\r\n                        },\r\n                        error => { Helpers.Execute.ShowDebugMessage(\"messages.sendEncryptedService error \" + error); });\r\n                });\r\n        }\r\n\r\n        public static void UpgradeSecretChatLayerAndSendNotification(SendEncryptedServiceAction sendEncryptedServiceAsync, ICacheService cacheService, ITelegramEventAggregator eventAggregator, TLEncryptedChat encryptedChat, TLInt layer, TLInt rawInSeqNo, TLInt rawOutSeqNo)\r\n        {\r\n            var newEncryptedChat = new TLEncryptedChat20();\r\n            newEncryptedChat.Layer = layer;\r\n\r\n            newEncryptedChat.RawInSeqNo = rawInSeqNo;\r\n            newEncryptedChat.RawOutSeqNo = rawOutSeqNo;\r\n\r\n            //SetInitRawSeqNo(newEncryptedChat, MTProtoService.Instance.CurrentUserId);\r\n\r\n            newEncryptedChat.Id = encryptedChat.Id;\r\n            newEncryptedChat.AccessHash = encryptedChat.AccessHash;\r\n            newEncryptedChat.Date = encryptedChat.Date;\r\n            newEncryptedChat.AdminId = encryptedChat.AdminId;\r\n            newEncryptedChat.ParticipantId = encryptedChat.ParticipantId;\r\n            newEncryptedChat.GAorB = encryptedChat.GAorB;\r\n\r\n            newEncryptedChat.CustomFlags = encryptedChat.CustomFlags;\r\n            if (encryptedChat.OriginalKey != null) newEncryptedChat.OriginalKey = encryptedChat.OriginalKey;\r\n            if (encryptedChat.ExtendedKey != null) newEncryptedChat.ExtendedKey = encryptedChat.ExtendedKey;\r\n            newEncryptedChat.Key = encryptedChat.Key;\r\n            newEncryptedChat.KeyFingerprint = encryptedChat.KeyFingerprint;\r\n            newEncryptedChat.P = encryptedChat.P;\r\n            newEncryptedChat.G = encryptedChat.G;\r\n            newEncryptedChat.A = encryptedChat.A;\r\n            newEncryptedChat.MessageTTL = encryptedChat.MessageTTL;\r\n\r\n            cacheService.SyncEncryptedChat(newEncryptedChat,\r\n                result =>\r\n                {\r\n                    eventAggregator.Publish(newEncryptedChat);\r\n\r\n                    var currentUserId = MTProtoService.Instance.CurrentUserId;\r\n                    var clientTicksDelta = MTProtoService.Instance.ClientTicksDelta;\r\n\r\n                    var randomId = TLLong.Random();\r\n\r\n                    var notifyLayerAction = new TLDecryptedMessageActionNotifyLayer();\r\n                    notifyLayerAction.Layer = new TLInt(Constants.SecretSupportedLayer);\r\n\r\n                    var inSeqNo = TLUtils.GetInSeqNo(currentUserId, newEncryptedChat);\r\n                    var outSeqNo = TLUtils.GetOutSeqNo(currentUserId, newEncryptedChat);\r\n\r\n                    var encryptedChat17 = result as TLEncryptedChat17;\r\n                    if (encryptedChat17 != null)\r\n                    {\r\n                        encryptedChat17.RawOutSeqNo = new TLInt(encryptedChat17.RawOutSeqNo.Value + 1);\r\n                    }\r\n\r\n                    var decryptedMessageService17 = new TLDecryptedMessageService17\r\n                    {\r\n                        Action = notifyLayerAction,\r\n                        RandomId = randomId,\r\n                        //RandomBytes = TLString.Random(Constants.MinRandomBytesLength),\r\n\r\n                        ChatId = encryptedChat.Id,\r\n                        FromId = currentUserId,\r\n                        Out = TLBool.True,\r\n                        Unread = TLBool.False,\r\n                        Date = TLUtils.DateToUniversalTimeTLInt(clientTicksDelta, DateTime.Now),\r\n                        Status = MessageStatus.Sending,\r\n\r\n                        TTL = new TLInt(0),\r\n                        InSeqNo = inSeqNo,\r\n                        OutSeqNo = outSeqNo\r\n                    };\r\n\r\n                    var decryptedMessageLayer17 = TLUtils.GetDecryptedMessageLayer(newEncryptedChat.Layer, inSeqNo, outSeqNo, decryptedMessageService17);\r\n\r\n                    cacheService.SyncDecryptedMessage(\r\n                        decryptedMessageService17,\r\n                        encryptedChat,\r\n                        messageResult =>\r\n                        {\r\n                            sendEncryptedServiceAsync(\r\n                                new TLInputEncryptedChat\r\n                                {\r\n                                    AccessHash = encryptedChat.AccessHash,\r\n                                    ChatId = encryptedChat.Id\r\n                                },\r\n                                randomId,\r\n                                TLUtils.EncryptMessage(decryptedMessageLayer17, MTProtoService.Instance.CurrentUserId, newEncryptedChat),\r\n                                sentEncryptedMessage =>\r\n                                {\r\n                                    decryptedMessageService17.Status = MessageStatus.Confirmed;\r\n                                    cacheService.SyncSendingDecryptedMessage(encryptedChat.Id, sentEncryptedMessage.Date, decryptedMessageService17.RandomId,\r\n                                        m =>\r\n                                        {\r\n#if DEBUG\r\n                                            eventAggregator.Publish(decryptedMessageService17);\r\n#endif\r\n                                        });\r\n                                },\r\n                                error =>\r\n                                {\r\n                                    Helpers.Execute.ShowDebugMessage(\"messages.sendEncryptedService error \" + error);\r\n                                });\r\n                        });\r\n                });\r\n        }\r\n\r\n        public static int GetRawInFromReceivedMessage(TLInt currentUserId, TLEncryptedChat17 chat, ISeqNo message)\r\n        {\r\n            var isAdmin = chat.AdminId.Value == currentUserId.Value;\r\n            var x = isAdmin ? 0 : 1;\r\n            return (message.OutSeqNo.Value - x) / 2;\r\n        }\r\n\r\n        private readonly object _clientSeqLock = new object();\r\n\r\n        private readonly Dictionary<int, WindowsPhone.Tuple<DateTime, TLState>> _lostSeq = new Dictionary<int, WindowsPhone.Tuple<DateTime, TLState>>();\r\n\r\n        private void UpdateLostSeq(IList<TLInt> seqList, bool cleanupMissingSeq = false)\r\n        {\r\n            lock (_clientSeqLock)\r\n            {\r\n                if (ClientSeq != null)\r\n                {\r\n                    if (seqList.Count > 0)\r\n                    {\r\n                        // add missing items\r\n                        if (seqList[0].Value > ClientSeq.Value + 1)\r\n                        {\r\n                            for (var i = ClientSeq.Value + 1; i < seqList[0].Value; i++)\r\n                            {\r\n                                _lostSeq[i] = new WindowsPhone.Tuple<DateTime, TLState>(DateTime.Now, new TLState { Seq = ClientSeq, Pts = _pts, Date = _date, Qts = _qts });\r\n                            }\r\n                        }\r\n\r\n                        // remove received items\r\n                        for (var i = 0; i < seqList.Count; i++)\r\n                        {\r\n                            if (_lostSeq.ContainsKey(seqList[i].Value))\r\n                            {\r\n                                TLUtils.WriteLine(\r\n                                    DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" remove from Missing Seq List seq=\" +\r\n                                    seqList[i].Value + \" time=\" + (DateTime.Now - _lostSeq[seqList[i].Value].Item1), LogSeverity.Error);\r\n                                _lostSeq.Remove(seqList[i].Value);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                // cleanup (updates.getDifference, set initState, etc)\r\n                if (cleanupMissingSeq)\r\n                {\r\n                    _lostSeq.Clear();\r\n                }\r\n\r\n                if (seqList.Count > 0)\r\n                {\r\n                    var lastSeqValue = seqList.Last().Value;\r\n                    var maxSeqValue = Math.Max(lastSeqValue, ClientSeq != null ? ClientSeq.Value : -1);\r\n                    ClientSeq = new TLInt(maxSeqValue);\r\n                }\r\n\r\n                if (_lostSeq.Count > 0)\r\n                {\r\n                    var missingSeqInfo = new StringBuilder();\r\n                    foreach (var keyValue in _lostSeq)\r\n                    {\r\n                        missingSeqInfo.AppendLine(string.Format(\"seq={0}, date={1}\", keyValue.Key,\r\n                            keyValue.Value.Item1.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture)));\r\n                    }\r\n\r\n                    StartLostSeqTimer();\r\n\r\n                    TLUtils.WriteLine(\r\n                        DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" Missing Seq List\\n\" +\r\n                        missingSeqInfo, LogSeverity.Error);\r\n                }\r\n            }\r\n        }\r\n\r\n        private readonly object _clientPtsLock = new object();\r\n\r\n        private readonly Dictionary<int, WindowsPhone.Tuple<DateTime, TLState>> _lostPts = new Dictionary<int, WindowsPhone.Tuple<DateTime, TLState>>();\r\n\r\n        private void UpdateLostPts(IList<TLInt> ptsList, bool cleanupMissingPts = false)\r\n        {\r\n            lock (_clientPtsLock)\r\n            {\r\n                if (_pts != null)\r\n                {\r\n                    if (ptsList.Count > 0)\r\n                    {\r\n                        // add missing items\r\n                        if (ptsList[0].Value > _pts.Value + 1)\r\n                        {\r\n                            for (var i = _pts.Value + 1; i < ptsList[0].Value; i++)\r\n                            {\r\n                                _lostPts[i] = new WindowsPhone.Tuple<DateTime, TLState>(DateTime.Now, new TLState { Seq = ClientSeq, Pts = _pts, Date = _date, Qts = _qts });\r\n                            }\r\n                        }\r\n\r\n                        // remove received items\r\n                        for (var i = 0; i < ptsList.Count; i++)\r\n                        {\r\n                            if (_lostPts.ContainsKey(ptsList[i].Value))\r\n                            {\r\n                                TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" remove from Missing Pts List pts=\" + ptsList[i].Value + \" time=\" + (DateTime.Now - _lostPts[ptsList[i].Value].Item1), LogSeverity.Error);\r\n                                _lostPts.Remove(ptsList[i].Value);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                // cleanup (updates.getDifference, set initState, etc)\r\n                if (cleanupMissingPts)\r\n                {\r\n                    _lostPts.Clear();\r\n                }\r\n\r\n                if (ptsList.Count > 0)\r\n                {\r\n                    var lastPtsValue = ptsList.Last().Value;\r\n                    var maxPtsValue = Math.Max(lastPtsValue, _pts != null ? _pts.Value : -1);\r\n                    _pts = new TLInt(maxPtsValue);\r\n                }\r\n\r\n                if (_lostPts.Count > 0)\r\n                {\r\n                    var missingPtsInfo = new StringBuilder();\r\n                    foreach (var keyValue in _lostPts)\r\n                    {\r\n                        missingPtsInfo.AppendLine(string.Format(\"pts={0}, date={1}\", keyValue.Key,\r\n                            keyValue.Value.Item1.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture)));\r\n                    }\r\n\r\n                    StartLostPtsTimer();\r\n\r\n                    TLUtils.WriteLine(\r\n                        DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" Missing Pts List\\n\" +\r\n                        missingPtsInfo, LogSeverity.Error);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ProcessUpdates(IList<TLUpdatesBase> updatesList, IList<TLUpdatesTooLong> updatesTooLong = null, bool notifyNewMessage = true)\r\n        {\r\n            try\r\n            {\r\n#if DEBUG\r\n                if (updatesTooLong != null && updatesTooLong.Count > 0)\r\n                {\r\n                    //NOTE to get AUTH_KEY_UNREGISTERED\r\n                    GetStateAsync.SafeInvoke(\r\n                        result =>\r\n                        {\r\n\r\n                        },\r\n                        error =>\r\n                        {\r\n                            Helpers.Execute.ShowDebugMessage(\"account.updateStatus error \" + error);\r\n                        });\r\n#if LOG_CLIENTSEQ\r\n                    Helpers.Execute.ShowDebugMessage(string.Format(\"{0} updatesTooLong clientSeq={1} pts={2}\", DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture), ClientSeq, _pts));\r\n                    TLUtils.WriteLine(string.Format(\"{0} updatesTooLong seq={1} pts={2}\", DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture), ClientSeq, _pts), LogSeverity.Error);\r\n                    //TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" updatesTooLong clientSeq=\" + ClientSeq, LogSeverity.Error);\r\n#endif\r\n                }\r\n#endif\r\n\r\n                var seqList = updatesList.SelectMany(updates => updates.GetSeq()).OrderBy(x => x.Value).ToList();\r\n                var ptsList = updatesList.SelectMany(updates => updates.GetPts()).OrderBy(x => x.Value).ToList();\r\n\r\n                /*#if DEBUG\r\n                                if (seqList.Count > 0)\r\n                                {\r\n                                    var showDebugInfo = false;\r\n                                    for (var i = 0; i < seqList.Count; i++)\r\n                                    {\r\n                                        if (seqList[i].Value == 0)\r\n                                        {\r\n                                            showDebugInfo = true;\r\n                                            break;\r\n                                        }\r\n                                    }\r\n\r\n                                    // only TLUpdateUserStatus here\r\n                                    if (showDebugInfo)\r\n                                    {\r\n                                        var updateListInfo = new StringBuilder();\r\n                                        foreach (var updatesBase in updateList)\r\n                                        {\r\n                                            updateListInfo.AppendLine(updatesBase.ToString());\r\n                                        }\r\n                                        Helpers.Execute.ShowDebugMessage(\"ProcessTransportMessage seqs=0 \" + updateListInfo);\r\n                                    }\r\n                                }\r\n                #endif*/\r\n\r\n#if LOG_CLIENTSEQ\r\n                if (ptsList.Count > 0 || seqList.Count > 0)\r\n                {\r\n                    var builder = new StringBuilder();\r\n                    builder.AppendLine(string.Format(\"{0} ProcessTransportMessage\", DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture)));\r\n                    builder.AppendLine(string.Format(\"clientSeq={0} seqList={1}\", ClientSeq, seqList.Count == 0 ? \"null\" : string.Join(\", \", seqList)));\r\n                    builder.AppendLine(string.Format(\"pts={0} ptsList={1}\", _pts, ptsList.Count == 0 ? \"null\" : string.Join(\", \", ptsList)));\r\n                    TLUtils.WriteLine(builder.ToString(), LogSeverity.Error);\r\n                }\r\n#endif\r\n                if (GetDifferenceRequired(updatesList))\r\n                {\r\n                    var stopwatch = Stopwatch.StartNew();\r\n                    Logs.Log.Write(\"UpdatesService.ProcessUpdates StartGetDifference\");\r\n                    GetDifference(1000, () =>\r\n                    {\r\n                        var elapsed = stopwatch.Elapsed;\r\n                        Logs.Log.Write(\"UpdatesService.ProcessUpdates StopGetDifference time=\" + elapsed);\r\n                    });\r\n                    return;\r\n                }\r\n\r\n                var processUpdates = false;\r\n                if (updatesList.Count > 0)\r\n                {\r\n                    if (seqList.Count > 0)\r\n                    {\r\n                        UpdateLostSeq(seqList);\r\n                    }\r\n\r\n                    if (ptsList.Count > 0)\r\n                    {\r\n                        UpdateLostPts(ptsList);\r\n                    }\r\n\r\n                    processUpdates = true;\r\n                }\r\n\r\n                if (processUpdates)\r\n                {\r\n                    ProcessReading(updatesList);\r\n                    foreach (var updatesItem in updatesList)\r\n                    {\r\n                        ProcessUpdatesInternal(updatesItem, notifyNewMessage);\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"Error during processing update: \", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n        }\r\n\r\n        private bool GetDifferenceRequired(IList<TLUpdatesBase> updatesList)\r\n        {\r\n            var getDifferenceRequired = false;\r\n            for (int i = 0; i < updatesList.Count; i++)\r\n            {\r\n                var updatesShortChatMessage = updatesList[i] as TLUpdatesShortChatMessage;\r\n                if (updatesShortChatMessage != null)\r\n                {\r\n                    var user = _cacheService.GetUser(updatesShortChatMessage.UserId);\r\n                    if (user == null)\r\n                    {\r\n                        var logString =\r\n                            string.Format(\"ProcessUpdates.UpdatesShortChatMessage: user is missing (userId={0}, msgId={1})\",\r\n                                updatesShortChatMessage.UserId, updatesShortChatMessage.Id);\r\n                        Logs.Log.Write(logString);\r\n                        getDifferenceRequired = true;\r\n                        break;\r\n                    }\r\n                    var chat = _cacheService.GetChat(updatesShortChatMessage.ChatId);\r\n                    if (chat == null)\r\n                    {\r\n                        var logString =\r\n                            string.Format(\"ProcessUpdates.UpdatesShortChatMessage: chat is missing (chatId={0}, msgId={1})\",\r\n                                updatesShortChatMessage.ChatId, updatesShortChatMessage.Id);\r\n                        Logs.Log.Write(logString);\r\n                        getDifferenceRequired = true;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                var updatesShortMessage = updatesList[i] as TLUpdatesShortMessage;\r\n                if (updatesShortMessage != null)\r\n                {\r\n                    var user = _cacheService.GetUser(updatesShortMessage.UserId);\r\n                    if (user == null)\r\n                    {\r\n                        var logString =\r\n                            string.Format(\"ProcessUpdates.UpdatesShortMessage: user is missing (userId={0}, msgId={1})\",\r\n                                updatesShortMessage.UserId, updatesShortMessage.Id);\r\n                        Logs.Log.Write(logString);\r\n                        getDifferenceRequired = true;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n            return getDifferenceRequired;\r\n        }\r\n\r\n        private void ProcessReading(IList<TLUpdatesBase> updatesList)\r\n        {\r\n            var readHistoryInboxList = new List<TLUpdateReadHistory>();\r\n            var readHistoryOutboxList = new List<TLUpdateReadHistory>();\r\n\r\n            var newChatMessageList = new List<TLUpdateNewMessage>();\r\n            var newMessageList = new List<TLUpdateNewMessage>();\r\n            var shortChatMessageList = new List<TLUpdatesShortChatMessage34>();\r\n            var shortMessageList = new List<TLUpdatesShortMessage34>();\r\n\r\n            foreach (var updatesBase in updatesList)\r\n            {\r\n                var updatesShort = updatesBase as TLUpdatesShort;\r\n                if (updatesShort != null)\r\n                {\r\n                    GetReadingUpdates(updatesShort.Update, readHistoryInboxList, readHistoryOutboxList, newChatMessageList, newMessageList);\r\n\r\n                    continue;\r\n                }\r\n\r\n                var updates = updatesBase as TLUpdates;\r\n                if (updates != null)\r\n                {\r\n                    foreach (var updateBase in updates.Updates)\r\n                    {\r\n                        GetReadingUpdates(updateBase, readHistoryInboxList, readHistoryOutboxList, newChatMessageList, newMessageList);\r\n                    }\r\n\r\n                    continue;\r\n                }\r\n\r\n                var shortChatMessage = updatesBase as TLUpdatesShortChatMessage34;\r\n                if (shortChatMessage != null\r\n                    && shortChatMessage.Unread.Value)\r\n                {\r\n                    shortChatMessageList.Add(shortChatMessage);\r\n                    continue;\r\n                }\r\n\r\n                var shortMessage = updatesBase as TLUpdatesShortMessage34;\r\n                if (shortMessage != null\r\n                    && shortMessage.Unread.Value)\r\n                {\r\n                    shortMessageList.Add(shortMessage);\r\n                    continue;\r\n                }\r\n            }\r\n\r\n            ProcessReadingUpdates(false, readHistoryInboxList, shortChatMessageList, newChatMessageList, shortMessageList, newMessageList);\r\n            ProcessReadingUpdates(true, readHistoryOutboxList, shortChatMessageList, newChatMessageList, shortMessageList, newMessageList);\r\n        }\r\n\r\n        private static void ProcessReadingUpdates(\r\n            bool outbox, IList<TLUpdateReadHistory> readHistoryList,\r\n            IList<TLUpdatesShortChatMessage34> shortChatMessageList,\r\n            IList<TLUpdateNewMessage> newChatMessageList,\r\n            IList<TLUpdatesShortMessage34> shortMessageList,\r\n            IList<TLUpdateNewMessage> newMessageList)\r\n        {\r\n            if (readHistoryList.Count == 0) return;\r\n\r\n            foreach (var readHistory in readHistoryList)\r\n            {\r\n                var peerChat = readHistory.Peer as TLPeerChat;\r\n                if (peerChat != null)\r\n                {\r\n                    for (var i = 0; i < shortChatMessageList.Count; i++)\r\n                    {\r\n                        if (shortChatMessageList[i].Out.Value == outbox\r\n                            && peerChat.Id.Value == shortChatMessageList[i].ChatId.Value\r\n                            && readHistory.MaxId.Value >= shortChatMessageList[i].Id.Value)\r\n                        {\r\n                            shortChatMessageList[i].Unread = TLBool.False;\r\n                            shortChatMessageList.RemoveAt(i--);\r\n                        }\r\n                    }\r\n\r\n                    for (var i = 0; i < newChatMessageList.Count; i++)\r\n                    {\r\n                        var message = newChatMessageList[i].Message as TLMessageCommon;\r\n                        if (message != null && message.Out.Value == outbox)\r\n                        {\r\n                            if (message.Out.Value == outbox\r\n                                && peerChat.Id.Value == message.ToId.Id.Value\r\n                                && readHistory.MaxId.Value >= message.Id.Value)\r\n                            {\r\n                                message.SetUnreadSilent(TLBool.False);\r\n                                newChatMessageList.RemoveAt(i--);\r\n                            }\r\n                        }\r\n                    }\r\n                    continue;\r\n                }\r\n\r\n                var peerUser = readHistory.Peer as TLPeerUser;\r\n                if (peerUser != null)\r\n                {\r\n                    for (var i = 0; i < shortMessageList.Count; i++)\r\n                    {\r\n                        if (shortMessageList[i].Out.Value == outbox\r\n                            && peerUser.Id.Value == shortMessageList[i].UserId.Value\r\n                            && readHistory.MaxId.Value >= shortMessageList[i].Id.Value)\r\n                        {\r\n                            shortMessageList[i].Unread = TLBool.False;\r\n                            shortMessageList.RemoveAt(i--);\r\n                        }\r\n                    }\r\n\r\n                    for (var i = 0; i < newMessageList.Count; i++)\r\n                    {\r\n                        var message = newMessageList[i].Message as TLMessageCommon;\r\n                        if (message != null)\r\n                        {\r\n                            if (message.Out.Value == outbox\r\n                                && peerUser.Id.Value == message.FromId.Value\r\n                                && readHistory.MaxId.Value >= message.Id.Value)\r\n                            {\r\n                                message.SetUnreadSilent(TLBool.False);\r\n                                newMessageList.RemoveAt(i--);\r\n                            }\r\n                        }\r\n                    }\r\n                    continue;\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void GetReadingUpdates(TLUpdateBase updateBase,\r\n            IList<TLUpdateReadHistory> readHistoryInboxList,\r\n            IList<TLUpdateReadHistory> readHistoryOutboxList,\r\n            IList<TLUpdateNewMessage> newChatMessageList,\r\n            IList<TLUpdateNewMessage> newMessageList)\r\n        {\r\n            var readHistoryInbox = updateBase as TLUpdateReadHistoryInbox;\r\n            if (readHistoryInbox != null)\r\n            {\r\n                readHistoryInboxList.Add(readHistoryInbox);\r\n                return;\r\n            }\r\n\r\n            var readHistoryOutbox = updateBase as TLUpdateReadHistoryOutbox;\r\n            if (readHistoryOutbox != null)\r\n            {\r\n                readHistoryOutboxList.Add(readHistoryOutbox);\r\n                return;\r\n            }\r\n\r\n            var newMessage = updateBase as TLUpdateNewMessage;\r\n            if (newMessage != null)\r\n            {\r\n                var message = newMessage.Message as TLMessageCommon;\r\n                if (message != null\r\n                    && message.Unread.Value)\r\n                {\r\n                    var peerChat = message.ToId as TLPeerChat;\r\n                    if (peerChat != null)\r\n                    {\r\n                        newChatMessageList.Add(newMessage);\r\n                        return;\r\n                    }\r\n\r\n                    var peerUser = message.ToId as TLPeerUser;\r\n                    if (peerUser != null)\r\n                    {\r\n                        newMessageList.Add(newMessage);\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ProcessUpdates(TLUpdatesBase updates, bool notifyNewMessages = false)\r\n        {\r\n            var updatesList = new List<TLUpdatesBase> { updates };\r\n\r\n            var updatesTooLongList = new List<TLUpdatesTooLong>();\r\n            var updatesTooLong = updates as TLUpdatesTooLong;\r\n            if (updatesTooLong != null)\r\n            {\r\n                updatesTooLongList.Add(updatesTooLong);\r\n            }\r\n\r\n            ProcessUpdates(updatesList, updatesTooLongList, notifyNewMessages);\r\n        }\r\n\r\n        public void ProcessTransportMessage(TLTransportMessage transportMessage)\r\n        {\r\n            try\r\n            {\r\n                var isUpdating = false;\r\n                lock (_getDifferenceRequestRoot)\r\n                {\r\n                    if (_getDifferenceRequests.Count > 0)\r\n                    {\r\n                        isUpdating = true;\r\n                    }\r\n                }\r\n\r\n                if (isUpdating)\r\n                {\r\n                    //Execute.ShowDebugMessage(\"UpdatesService.ProcessTransportMessage Skip\");\r\n                    return;\r\n                }\r\n\r\n                var updatesList = TLUtils.FindInnerObjects<TLUpdatesBase>(transportMessage).ToList();\r\n                var updatesTooLong = TLUtils.FindInnerObjects<TLUpdatesTooLong>(transportMessage).ToList();\r\n\r\n                ProcessUpdates(updatesList, updatesTooLong);\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteLine(\"Error during processing update: \", LogSeverity.Error);\r\n                TLUtils.WriteException(e);\r\n            }\r\n        }\r\n\r\n        private readonly object _stateRoot = new object();\r\n\r\n        public void LoadStateAndUpdate(long acceptedCallId, Action callback)\r\n        {\r\n            var id = new Random().Next(999);\r\n            TLUtils.WritePerformance(\">>Loading current state and updating\");\r\n\r\n            if (_pts == null || _date == null || _qts == null)\r\n            {\r\n                var state = TLUtils.OpenObjectFromMTProtoFile<TLState>(_stateRoot, Constants.StateFileName);\r\n#if DEBUG_UPDATES\r\n                state.Pts = new TLInt(140000);\r\n#endif\r\n\r\n                SetState(state, \"setFileState\");\r\n                TLUtils.WritePerformance(\"Current state: \" + state);\r\n\r\n                FileUtils.Copy(_stateRoot, Constants.StateFileName, Constants.TempStateFileName);\r\n            }\r\n\r\n            Logs.Log.Write(string.Format(\"UpdatesService.LoadStateAndUpdate {0} client_state=[p={1} d={2} q={3}]\", id, _pts, _date, _qts));\r\n\r\n            LoadFileState();\r\n\r\n            var stopwatch = Stopwatch.StartNew();\r\n            Logs.Log.Write(string.Format(\"UpdatesService.LoadStateAndUpdate {0} start GetDifference\", id));\r\n            AddRequest(id);\r\n            //TLObject.LogNotify = true;\r\n            //TelegramEventAggregator.LogPublish = true;\r\n\r\n            GetDifference(id, () =>\r\n            {\r\n                var elapsed = stopwatch.Elapsed;\r\n                Logs.Log.Write(string.Format(\"UpdatesService.LoadStateAndUpdate {0} stop GetDifference elapsed={1}\", id, elapsed));\r\n\r\n\r\n                //TLObject.LogNotify = false;\r\n                //TelegramEventAggregator.LogPublish = false;\r\n                RemoveRequest(id);\r\n                callback.SafeInvoke();\r\n            });\r\n        }\r\n\r\n        private readonly object _differenceSyncRoot = new object();\r\n\r\n        private readonly object _differenceTimeSyncRoot = new object();\r\n\r\n        private void LoadFileState()\r\n        {\r\n            var stopwatch = Stopwatch.StartNew();\r\n            var difference = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLDifferenceBase>>(_differenceSyncRoot, Constants.DifferenceFileName);\r\n\r\n            Logs.Log.Write(\"UpdatesService.LoadStateAndUpdate start LoadFileState\");\r\n\r\n            if (difference != null && difference.Count > 0)\r\n            {\r\n                CleanupDifference(difference);\r\n\r\n                var ptsList = string.Join(\", \", difference.OfType<TLDifference>().Select(x => x.State.Pts));\r\n                Logs.Log.Write(string.Format(\"UpdatesService.LoadStateAndUpdate ptsList=[{0}]\", ptsList));\r\n\r\n                foreach (var differenceBase in difference)\r\n                {\r\n                    var stopwatchProcessDiff = Stopwatch.StartNew();\r\n                    var diff = differenceBase as TLDifference;\r\n                    if (diff != null)\r\n                    {\r\n                        var resetEvent = new ManualResetEvent(false);\r\n\r\n                        lock (_clientSeqLock)\r\n                        {\r\n                            SetState(diff.State, \"loadFileState\");\r\n                        }\r\n                        ProcessDifference(diff, () => resetEvent.Set());\r\n#if DEBUG\r\n                        resetEvent.WaitOne();\r\n#else\r\n                        resetEvent.WaitOne(10000);\r\n#endif\r\n\r\n                        var otherInfo = new StringBuilder();\r\n                        if (diff.OtherUpdates.Count > 0)\r\n                        {\r\n                            otherInfo.AppendLine();\r\n                            for (var i = 0; i < diff.OtherUpdates.Count; i++)\r\n                            {\r\n                                otherInfo.AppendLine(diff.OtherUpdates[i].ToString());\r\n                            }\r\n                        }\r\n\r\n                        Logs.Log.Write(string.Format(\"UpdatesService.LoadFileState processDiff state=[{0}] messages={1} other={2} elapsed={3}{4}\", diff.State, diff.NewMessages.Count, diff.OtherUpdates.Count, stopwatchProcessDiff.Elapsed, otherInfo));\r\n                    }\r\n                }\r\n\r\n                Logs.Log.Write(\"UpdatesService.LoadStateAndUpdate LoadFileState publish UpdateCompletedEventArgs\");\r\n\r\n                Execute.BeginOnThreadPool(() => _eventAggregator.Publish(new UpdateCompletedEventArgs()));\r\n            }\r\n\r\n            Logs.Log.Write(\"UpdatesService.LoadStateAndUpdate stop LoadFileState elapsed=\" + stopwatch.Elapsed);\r\n\r\n            FileUtils.Copy(_differenceSyncRoot, Constants.DifferenceFileName, Constants.TempDifferenceFileName);\r\n            FileUtils.Delete(_differenceSyncRoot, Constants.DifferenceFileName);\r\n            FileUtils.Delete(_differenceTimeSyncRoot, Constants.DifferenceTimeFileName);\r\n        }\r\n\r\n        private void CleanupDifference(TLVector<TLDifferenceBase> list)\r\n        {\r\n            var updateChannelTooLongCache = new Dictionary<int, int>();\r\n            var updateChannelCache = new Dictionary<int, int>();\r\n            var hasUpdateDialogPinned = false;\r\n            var updatePhoneCallDiscardedCache = new Dictionary<long, long>();\r\n\r\n            foreach (var differenceBase in list)\r\n            {\r\n                var differenceSlice = differenceBase as TLDifference;\r\n                if (differenceSlice != null)\r\n                {\r\n                    var updates = differenceSlice.OtherUpdates;\r\n                    for (var i = 0; i < updates.Count; i++)\r\n                    {\r\n                        var updateChannelTooLong = updates[i] as TLUpdateChannelTooLong;\r\n                        if (updateChannelTooLong != null)\r\n                        {\r\n                            if (updateChannelTooLongCache.ContainsKey(updateChannelTooLong.ChannelId.Value))\r\n                            {\r\n                                updates.RemoveAt(i--);\r\n                            }\r\n                            else\r\n                            {\r\n                                updateChannelTooLongCache[updateChannelTooLong.ChannelId.Value] = updateChannelTooLong.ChannelId.Value;\r\n                            }\r\n                        }\r\n\r\n                        var updatePhoneCall = updates[i] as TLUpdatePhoneCall;\r\n                        if (updatePhoneCall != null)\r\n                        {\r\n                            var phoneCallDiscarded = updatePhoneCall.PhoneCall as TLPhoneCallDiscarded61;\r\n                            if (phoneCallDiscarded != null)\r\n                            {\r\n                                updatePhoneCallDiscardedCache[phoneCallDiscarded.Id.Value] = phoneCallDiscarded.Id.Value;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            foreach (var differenceBase in list)\r\n            {\r\n                var differenceSlice = differenceBase as TLDifference;\r\n                if (differenceSlice != null)\r\n                {\r\n                    var updates = differenceSlice.OtherUpdates;\r\n                    for (var i = 0; i < updates.Count; i++)\r\n                    {\r\n                        var updateChannel = updates[i] as TLUpdateChannel;\r\n                        if (updateChannel != null)\r\n                        {\r\n                            if (updateChannelTooLongCache.ContainsKey(updateChannel.ChannelId.Value))\r\n                            {\r\n                                updates.RemoveAt(i--);\r\n                            }\r\n                            else if (updateChannelCache.ContainsKey(updateChannel.ChannelId.Value))\r\n                            {\r\n                                updates.RemoveAt(i--);\r\n                            }\r\n                            else\r\n                            {\r\n                                updateChannelCache[updateChannel.ChannelId.Value] = updateChannel.ChannelId.Value;\r\n                            }\r\n                        }\r\n\r\n                        var updatePinnedDialogs = updates[i] as TLUpdatePinnedDialogs;\r\n                        if (updatePinnedDialogs != null)\r\n                        {\r\n                            if (hasUpdateDialogPinned)\r\n                            {\r\n                                updates.RemoveAt(i--);\r\n                            }\r\n                            else\r\n                            {\r\n                                hasUpdateDialogPinned = true;\r\n                                updatePinnedDialogs.Order = null;\r\n                            }\r\n                        }\r\n\r\n                        var updatePhoneCall = updates[i] as TLUpdatePhoneCall;\r\n                        if (updatePhoneCall != null)\r\n                        {\r\n                            var phoneCallDiscarded = updatePhoneCall.PhoneCall as TLPhoneCallDiscarded61;\r\n                            if (phoneCallDiscarded == null)\r\n                            {\r\n                                if (updatePhoneCallDiscardedCache.ContainsKey(updatePhoneCall.PhoneCall.Id.Value))\r\n                                {\r\n                                    updates.RemoveAt(i--);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void SaveState()\r\n        {\r\n            var state = new TLState { Date = _date, Pts = _pts, Qts = _qts, Seq = ClientSeq, UnreadCount = _unreadCount };\r\n            TLUtils.WritePerformance(\"<<Saving current state\");\r\n            Debug.WriteLine(\"SaveState state={0}\", state);\r\n            TLUtils.SaveObjectToMTProtoFile(_stateRoot, Constants.StateFileName, state);\r\n        }\r\n\r\n        public TLState GetState()\r\n        {\r\n            return new TLState { Date = _date, Pts = _pts, Qts = _qts, Seq = ClientSeq, UnreadCount = _unreadCount };\r\n        }\r\n\r\n        public void SaveStateSnapshot(string toDirectoryName)\r\n        {\r\n            FileUtils.Copy(_differenceSyncRoot, Constants.TempStateFileName, Path.Combine(toDirectoryName, Constants.StateFileName));\r\n            FileUtils.Copy(_differenceSyncRoot, Constants.TempDifferenceFileName, Path.Combine(toDirectoryName, Constants.DifferenceFileName));\r\n        }\r\n\r\n        public void LoadStateSnapshot(string fromDirectoryName)\r\n        {\r\n            var state = TLUtils.OpenObjectFromMTProtoFile<TLState>(_stateRoot, Path.Combine(fromDirectoryName, Constants.StateFileName));\r\n            if (state != null)\r\n            {\r\n                lock (_clientSeqLock)\r\n                {\r\n                    ClientSeq = state.Seq;\r\n                }\r\n                _date = state.Date ?? _date;\r\n                _pts = state.Pts ?? _pts;\r\n                _qts = state.Qts ?? _qts;\r\n                _unreadCount = state.UnreadCount ?? _unreadCount;\r\n                SaveState();\r\n            }\r\n\r\n            FileUtils.Copy(_differenceSyncRoot, Path.Combine(fromDirectoryName, Constants.DifferenceFileName), Constants.DifferenceFileName);\r\n        }\r\n\r\n        public void ClearState()\r\n        {\r\n            _date = null;\r\n            _pts = null;\r\n            _qts = null;\r\n            ClientSeq = null;\r\n            _unreadCount = null;\r\n            FileUtils.Delete(_stateRoot, Constants.StateFileName);\r\n        }\r\n    }\r\n\r\n    public class DCOptionsUpdatedEventArgs : EventArgs\r\n    {\r\n        public TLUpdateDCOptions Update { get; set; }\r\n    }\r\n\r\n    public class UpdatingEventArgs : EventArgs { }\r\n\r\n    public class UpdateCompletedEventArgs : EventArgs\r\n    {\r\n        public IList<TLUpdateChannelTooLong> UpdateChannelTooLongList { get; set; }\r\n    }\r\n\r\n    public class UpdateChannelsEventArgs : EventArgs\r\n    {\r\n        public IList<TLUpdateChannelTooLong> UpdateChannelTooLongList { get; set; }\r\n    }\r\n\r\n    public class ChannelUpdateCompletedEventArgs\r\n    {\r\n        public TLInt ChannelId { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/VoIP/IVoIPService.cs",
    "content": "﻿using Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.VoIP\r\n{\r\n    public interface IVoIPService\r\n    {\r\n        void StartOutgoingCall(TLInputUserBase userId);\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Services/VoIP/VoIPService.cs",
    "content": "﻿using System;\r\nusing System.Text;\r\nusing Windows.Storage;\r\n#if WINDOWS_PHONE\r\nusing libtgvoip;\r\n#endif\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.VoIP\r\n{\r\n    public class VoIPService : IVoIPService, IHandle<TLUpdatePhoneCall>\r\n#if WINDOWS_PHONE\r\n        , IStateCallback\r\n#endif\r\n    {\r\n        private const int CALL_MIN_LAYER = 65;\r\n        private const int CALL_MAX_LAYER = 65;\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        public VoIPService(IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator, ICacheService cacheService)\r\n        {\r\n            _mtProtoService = mtProtoService;\r\n            _eventAggregator = eventAggregator;\r\n            _cacheService = cacheService;\r\n\r\n            _eventAggregator.Subscribe(this);\r\n\r\n#if WINDOWS_PHONE\r\n            MicrosoftCryptoImpl.Init();\r\n\r\n            var input = Encoding.UTF8.GetBytes(\"test\");\r\n            var result1 = MicrosoftCryptoImpl.SHA1_test(input, (uint) input.Length);\r\n            var result2 = Utils.ComputeSHA1(input);\r\n            for (int i = 0; i < result1.Length; i++)\r\n            {\r\n                if (result1[i] != result2[i])\r\n                {\r\n                    throw new Exception(\"sha1 i=\" + i);\r\n                }\r\n            }\r\n            var result3 = MicrosoftCryptoImpl.SHA256_test(input, (uint)input.Length);\r\n            var result4 = Utils.ComputeSHA256(input);\r\n            for (int i = 0; i < result1.Length; i++)\r\n            {\r\n                if (result3[i] != result4[i])\r\n                {\r\n                    throw new Exception(\"sha1 i=\" + i);\r\n                }\r\n            }\r\n            var keyString = \"01234567890123456789012345678901\";\r\n            var ivString = \"01234567890123456789012345678901\";\r\n            var key = Encoding.UTF8.GetBytes(keyString);\r\n            var iv = Encoding.UTF8.GetBytes(ivString);\r\n            var result5 = MicrosoftCryptoImpl.AesIgeEncrypt_test(input, (uint)input.Length, key, iv);\r\n            key = Encoding.UTF8.GetBytes(keyString);\r\n            iv = Encoding.UTF8.GetBytes(ivString);\r\n            var result6 = MicrosoftCryptoImpl.AesIgeDecrypt_test(result5, (uint)input.Length, key, iv);\r\n            key = Encoding.UTF8.GetBytes(keyString);\r\n            iv = Encoding.UTF8.GetBytes(ivString);\r\n            var result7 = Utils.AesIge(input, key, iv, true);\r\n            var result8 = Utils.AesIge(result7, key, iv, false);\r\n#endif\r\n        }\r\n\r\n        private TLString _secretP;\r\n\r\n        private TLString _secretRandom;\r\n\r\n        private TLInt _secretG;\r\n\r\n        private TLInt _lastVersion;\r\n\r\n        private byte[] _ga;\r\n\r\n        private TLPhonePhoneCall _call;\r\n        private byte[] _aOrB;\r\n        private byte[] _authKey;\r\n        private bool _outgoing = true;\r\n#if WINDOWS_PHONE\r\n        private VoIPControllerWrapper _controller;\r\n#endif\r\n\r\n        public void StartOutgoingCall(TLInputUserBase userId)\r\n        {\r\n            var salt = new Byte[256];\r\n            var random = new SecureRandom();\r\n            random.NextBytes(salt);\r\n\r\n            var version = _lastVersion ?? new TLInt(0);\r\n            var randomLength = new TLInt(256);\r\n\r\n            _mtProtoService.GetDHConfigAsync(version, randomLength,\r\n                result =>\r\n                {\r\n                    ConfigureDeviceForCall();\r\n                    ShowNotifications();\r\n                    StartConnectionSound();\r\n                    DispatchStateChanged(PhoneCallState.STATE_REQUESTING);\r\n\r\n                    _eventAggregator.Publish(new PhoneCallEventArgs(\"NotificationCenter.didStartedCall\"));\r\n\r\n                    var dhConfig =  result as TLDHConfig;\r\n                    if (dhConfig != null)\r\n                    {\r\n                        if (!TLUtils.CheckPrime(dhConfig.P.Data, dhConfig.G.Value))\r\n                        {\r\n                            CallFailed();\r\n                            return;\r\n                        }\r\n\r\n                        _secretP = dhConfig.P;\r\n                        _secretG = dhConfig.G;\r\n                        _secretRandom = dhConfig.Random;\r\n                    }\r\n\r\n                    for (var i = 0; i < 256; i++)\r\n                    {\r\n                        salt[i] = (byte) (salt[i] ^ _secretRandom.Data[i]);\r\n                    }\r\n\r\n                    var gaBytes = MTProtoService.GetGB(salt, _secretG, _secretP);\r\n\r\n                    var protocol = new TLPhoneCallProtocol\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        UdpP2P = true,\r\n                        UdpReflector = true,\r\n                        MinLayer = new TLInt(CALL_MIN_LAYER),\r\n                        MaxLayer = new TLInt(CALL_MAX_LAYER)\r\n                    };\r\n                    _ga = gaBytes;\r\n                    var gaHash = Utils.ComputeSHA256(_ga);\r\n\r\n                    _mtProtoService.RequestCallAsync(userId, TLInt.Random(), TLString.FromBigEndianData(gaHash), protocol,\r\n                        result2 =>\r\n                        {\r\n                            _call = result2;\r\n                            _aOrB = salt;\r\n                            DispatchStateChanged(PhoneCallState.STATE_WAITING);\r\n                            //if (_endCallAfterRequest)\r\n                            //{\r\n                            //    Hangup();\r\n                            //    return;\r\n                            //}\r\n                        },\r\n                        error2 =>\r\n                        {\r\n                            \r\n                        });\r\n                },\r\n                error =>\r\n                {\r\n                    Helpers.Execute.ShowDebugMessage(\"messages.getDHConfig error \" + error);\r\n                    CallFailed();\r\n                });\r\n\r\n        }\r\n\r\n        private void DispatchStateChanged(PhoneCallState phoneCallState)\r\n        {\r\n            \r\n        }\r\n\r\n        private void StartConnectionSound()\r\n        {\r\n            \r\n        }\r\n\r\n        private void ShowNotifications()\r\n        {\r\n            \r\n\r\n        }\r\n\r\n        private void ConfigureDeviceForCall()\r\n        {\r\n            \r\n        }\r\n\r\n        private void CallFailed()\r\n        {\r\n            \r\n        }\r\n\r\n        public void Handle(TLUpdatePhoneCall updatePhoneCall)\r\n        {\r\n            var phoneCall = updatePhoneCall.PhoneCall;\r\n            var phoneCallAccepted = phoneCall as TLPhoneCallAccepted;\r\n            if (phoneCallAccepted != null)\r\n            {\r\n                if (_authKey == null)\r\n                {\r\n                    ProcessAcceptedCall(phoneCallAccepted);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n        }\r\n\r\n        private void ProcessAcceptedCall(TLPhoneCallAccepted phoneCallAccepted)\r\n        {\r\n            DispatchStateChanged(PhoneCallState.STATE_EXCHANGING_KEYS);\r\n\r\n            if (!TLUtils.CheckGaAndGb(phoneCallAccepted.GB.Data, _secretP.Data))\r\n            {\r\n                CallFailed();\r\n                return;\r\n            }\r\n\r\n\r\n            _authKey = MTProtoService.GetAuthKey(_aOrB, phoneCallAccepted.GB.ToBytes(), _secretP.ToBytes());\r\n            var keyHash = Utils.ComputeSHA1(_authKey); \r\n            var keyFingerprint = new TLLong(BitConverter.ToInt64(keyHash, 12));\r\n\r\n            var peer = new TLInputPhoneCall\r\n            {\r\n                Id = phoneCallAccepted.Id, \r\n                AccessHash = phoneCallAccepted.AccessHash\r\n            };\r\n\r\n            var protocol = new TLPhoneCallProtocol\r\n            {\r\n                Flags = new TLInt(0),\r\n                UdpP2P = true,\r\n                UdpReflector = true,\r\n                MinLayer = new TLInt(CALL_MIN_LAYER),\r\n                MaxLayer = new TLInt(CALL_MAX_LAYER)\r\n            };\r\n\r\n            _mtProtoService.ConfirmCallAsync(peer, TLString.FromBigEndianData(_ga), keyFingerprint, protocol,\r\n                result =>\r\n                {\r\n                    _call = result;\r\n                    InitiateActualEncryptedCall();\r\n                },\r\n                error =>\r\n                {\r\n                    CallFailed();\r\n                });\r\n\r\n        }\r\n\r\n        private void InitiateActualEncryptedCall()\r\n        {\r\n#if WINDOWS_PHONE\r\n\r\n            _mtProtoService.GetCallConfigAsync(result =>\r\n            {\r\n                VoIPControllerWrapper.UpdateServerConfig(result.Data.ToString());\r\n\r\n                var logFile = ApplicationData.Current.LocalFolder.Path + \"\\\\tgvoip.logFile.txt\";\r\n                var statsDumpFile = ApplicationData.Current.LocalFolder.Path + \"\\\\tgvoip.statsDump.txt\";\r\n\r\n\r\n                if (_controller != null)\r\n                {\r\n                    //_controller.Dispose();\r\n                    _controller = null;\r\n                }\r\n\r\n                _cacheService.GetConfigAsync(config =>\r\n                {\r\n                    var config60 = config as TLConfig60;\r\n                    if (config60 != null)\r\n                    {\r\n                        _controller = new VoIPControllerWrapper();\r\n                        _controller.SetConfig(config60.CallPacketTimeoutMs.Value / 1000.0, config60.CallConnectTimeoutMs.Value / 1000.0, DataSavingMode.Never, false, false, true, logFile, statsDumpFile);\r\n\r\n                        _controller.SetStateCallback(this);\r\n                        _controller.SetEncryptionKey(_authKey, _outgoing);\r\n\r\n                        var phoneCall = _call.PhoneCall as TLPhoneCall;\r\n                        if (phoneCall != null)\r\n                        {\r\n                            var connection = phoneCall.Connection;\r\n                            var endpoints = new Endpoint[phoneCall.AlternativeConnections.Count + 1];\r\n                            endpoints[0] = connection.ToEndpoint();\r\n\r\n                            for (int i = 0; i < phoneCall.AlternativeConnections.Count; i++)\r\n                            {\r\n                                connection = phoneCall.AlternativeConnections[i];\r\n                                endpoints[i + 1] = connection.ToEndpoint();\r\n                            }\r\n\r\n                            _controller.SetPublicEndpoints(endpoints, phoneCall.Protocol.UdpP2P);\r\n                            _controller.Start();\r\n                            _controller.Connect();\r\n                        }\r\n                    }\r\n                });\r\n\r\n            },\r\n            error =>\r\n            {\r\n                    \r\n            });\r\n\r\n#endif\r\n        }\r\n\r\n#if WINDOWS_PHONE\r\n        public void OnCallStateChanged(CallState newState)\r\n        {\r\n            Execute.ShowDebugMessage(\"OnCallStateChanged state=\" + newState);\r\n        }\r\n#endif\r\n    }\r\n\r\n    public class PhoneCallEventArgs\r\n    {\r\n        public string Param { get; set; }\r\n\r\n        public PhoneCallEventArgs(string param)\r\n        {\r\n            Param = param;\r\n        }\r\n    }\r\n\r\n    public enum PhoneCallState\r\n    {\r\n        STATE_WAIT_INIT = 1,\r\n\t    STATE_WAIT_INIT_ACK = 2,\r\n\t    STATE_ESTABLISHED = 3,\r\n\t    STATE_FAILED = 4,\r\n\t    STATE_HANGING_UP = 5,\r\n\t    STATE_ENDED = 6,\r\n\t    STATE_EXCHANGING_KEYS = 7,\r\n\t    STATE_WAITING = 8,\r\n\t    STATE_REQUESTING = 9,\r\n\t    STATE_WAITING_INCOMING = 10,\r\n\t    STATE_RINGING = 11,\r\n\t    STATE_BUSY = 12,\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLChangePhone.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLChangePhone : TLObject\r\n    {\r\n        public const string Signature = \"#70c32edb\";\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString PhoneCodeHash { get; set; }\r\n\r\n        public TLString PhoneCode { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes(),\r\n                PhoneCodeHash.ToBytes(),\r\n                PhoneCode.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Account/TLCheckPassword.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLCheckPassword : TLObject\r\n    {\r\n        public const uint Signature = 0xd18b4d16;\r\n\r\n        public TLInputCheckPasswordBase Password { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Password.ToBytes());\r\n        }\r\n    }\r\n\r\n    class TLCheckPasswordOld : TLObject\r\n    {\r\n        public const string Signature = \"#a63011e\";\r\n\r\n        public TLString PasswordHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PasswordHash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLConfirmPhone.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLConfirmPhone : TLObject\r\n    {\r\n        public const uint Signature = 0x5f2178c3;\r\n\r\n        public TLString PhoneCodeHash { get; set; }\r\n\r\n        public TLString PhoneCode { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneCodeHash.ToBytes(),\r\n                PhoneCode.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Account/TLGetAuthorizations.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    class TLGetAuthorizations : TLObject\r\n    {\r\n        public const uint Signature = 0xe320c158;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLGetPassword.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLGetPassword : TLObject\r\n    {\r\n        public const string Signature = \"#548a30f5\";\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLGetPasswordSettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    class TLGetPasswordSettings : TLObject\r\n    {\r\n        public const uint Signature = 0x9cd4eaf9;\r\n\r\n        public TLInputCheckPasswordBase Password { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Password.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLGetTmpPassword.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLGetTmpPassword : TLObject\r\n    {\r\n        public const uint Signature = 0x449e0b51;\r\n\r\n        public TLInputCheckPasswordBase Password { get; set; }\r\n\r\n        public TLInt Period { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Password.ToBytes(),\r\n                Period.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLGetWallPapers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    class TLGetWallPapers : TLObject\r\n    {\r\n        public const string Signature = \"#c04cfac2\";\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLRecoverPassword.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    class TLRecoverPassword : TLObject\r\n    {\r\n        public const string Signature = \"#4ea56e92\";\r\n\r\n        public TLString Code { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Code.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLReportPeer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    class TLReportPeer : TLObject\r\n    {\r\n        public const uint Signature = 0xae189d5f;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInputReportReasonBase Reason { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Reason.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLRequestPasswordRecovery.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    class TLRequestPasswordRecovery : TLObject\r\n    {\r\n        public const string Signature = \"#d897bc66\";\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLResetAuthorization.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    class TLResetAuthorization : TLObject\r\n    {\r\n        public const uint Signature = 0xdf77f3bc;\r\n\r\n        public TLLong Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLResetPassword.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    class TLResetPassword\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLSendChangePhoneCode.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    [Flags]\r\n    public enum SendChangePhoneCode\r\n    {\r\n        AllowFlashcall = 0x1,      // 0\r\n    }\r\n\r\n    class TLSendChangePhoneCode : TLObject\r\n    {\r\n        public const uint Signature = 0x8e57deb;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        private TLString _currentNumber;\r\n\r\n        public TLString CurrentNumber\r\n        {\r\n            get { return _currentNumber; }\r\n            set { SetField(out _currentNumber, value, ref _flags, (int)SendChangePhoneCode.AllowFlashcall); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                PhoneNumber.ToBytes(),\r\n                ToBytes(CurrentNumber, Flags, (int)SendChangePhoneCode.AllowFlashcall));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLSendConfirmPhoneCode.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    [Flags]\r\n    public enum SendConfirmPhoneCodeFlags\r\n    {\r\n        AllowFlashcall = 0x1,      // 0\r\n    }\r\n\r\n    class TLSendConfirmPhoneCode : TLObject\r\n    {\r\n        public const uint Signature = 0x1516d7bd;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        private TLBool _currentNumber;\r\n\r\n        public TLBool CurrentNumber\r\n        {\r\n            get { return _currentNumber; }\r\n            set { SetField(out _currentNumber, value, ref _flags, (int)SendConfirmPhoneCodeFlags.AllowFlashcall); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Hash.ToBytes(),\r\n                ToBytes(CurrentNumber, Flags, (int)SendConfirmPhoneCodeFlags.AllowFlashcall));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLSetPassword.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLSetPassword : TLObject\r\n    {\r\n        public const string Signature = \"#dd2a4d8f\";\r\n\r\n        public TLString CurrentPasswordHash { get; set; }\r\n\r\n        public TLString NewSalt { get; set; }\r\n\r\n        public TLString NewPasswordHash { get; set; }\r\n\r\n        public TLString Hint { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                CurrentPasswordHash.ToBytes(),\r\n                NewSalt.ToBytes(),\r\n                NewPasswordHash.ToBytes(),\r\n                Hint.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLUpdateDeviceLocked.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    class TLUpdateDeviceLocked : TLObject\r\n    {\r\n        public const string Signature = \"#38df3532\";\r\n\r\n        public TLInt Period { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Period.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Account/TLUpdatePasswordSettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    class TLUpdatePasswordSettings : TLObject\r\n    {\r\n        public const uint Signature = 0xa59b102f;\r\n\r\n        public TLInputCheckPasswordBase Password { get; set; }\r\n\r\n        public TLPasswordInputSettings NewSettings { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Password.ToBytes(),\r\n                NewSettings.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Enums.cs",
    "content": "﻿namespace Telegram.Api.TL\r\n{\r\n    \r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLCheckUsername.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    public class TLCheckUsername : TLObject\r\n    {\r\n        public const string Signature = \"#2714d86c\";\r\n\r\n        public TLString Username { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Username.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLDeleteAccount.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    public class TLDeleteAccount : TLObject\r\n    {\r\n        public const string Signature = \"#418d4e0b\";\r\n\r\n        public TLString Reason { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Reason.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLGetAccountTTL.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    public class TLGetAccountTTL : TLObject\r\n    {\r\n        public const string Signature = \"#8fc711d\";\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSetAccountTTL : TLObject\r\n    {\r\n        public const string Signature = \"#2442485e\";\r\n\r\n        public TLAccountDaysTTL TTL { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                TTL.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLGetNotifySettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    public class TLGetNotifySettings : TLObject\r\n    {\r\n        public const string Signature = \"#12b3ad31\";\r\n\r\n        public TLInputNotifyPeerBase Peer { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLGetPrivacy.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    public class TLGetPrivacy : TLObject\r\n    {\r\n        public const string Signature = \"#dadbc950\";\r\n\r\n        public TLInputPrivacyKeyBase Key { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Key.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLRegisterDevice.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    public class TLRegisterDevice : TLObject\r\n    {\r\n        public const uint Signature = 0x5cbea590;\r\n\r\n        public TLInt TokenType { get; set; }\r\n\r\n        public TLString Token { get; set; }\r\n\r\n        public TLBool AppSandbox { get; set; }\r\n\r\n        public TLString Secret { get; set; }\r\n\r\n        public TLVector<TLInt> OtherUids { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                TokenType.ToBytes(),\r\n                Token.ToBytes(),\r\n                AppSandbox.ToBytes(),\r\n                Secret.ToBytes(),\r\n                OtherUids.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"token_type={0}\\ntoken={1}\", TokenType, Token);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLResetNotifySettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    public class TLResetNotifySettings : TLObject\r\n    {\r\n        public const string Signature = \"#db7e1747\";\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLSetPrivacy.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    public class TLSetPrivacy : TLObject\r\n    {\r\n        public const string Signature = \"#c9f81ce8\";\r\n\r\n        public TLInputPrivacyKeyBase Key { get; set; }\r\n\r\n        public TLVector<TLInputPrivacyRuleBase> Rules { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Key.ToBytes(),\r\n                Rules.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLUnregisterDevice.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    public class TLUnregisterDevice : TLObject\r\n    {\r\n        public const string Signature = \"#65c55b40\";\r\n\r\n        public TLInt TokenType { get; set; }\r\n\r\n        public TLString Token { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                TokenType.ToBytes(),\r\n                Token.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"token_type={0}\\ntoken={1}\", TokenType, Token);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLUpdateNotifySettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    public class TLUpdateNotifySettings : TLObject\r\n    {\r\n        public const string Signature = \"#84be5b93\";\r\n\r\n        public TLInputNotifyPeerBase Peer { get; set; }\r\n\r\n        public TLInputPeerNotifySettings Settings { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Settings.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLUpdateProfile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    [Flags]\r\n    public enum UpdateProfileFlags\r\n    {\r\n        FirstName = 0x1,    // 0\r\n        LastName = 0x2,     // 1\r\n        About = 0x4,        // 2\r\n    }\r\n\r\n    public class TLUpdateProfile : TLObject\r\n    {\r\n        public const uint Signature = 0x78515775;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLString _firstName;\r\n\r\n        public TLString FirstName\r\n        {\r\n            get { return _firstName; }\r\n            set { SetField(out _firstName, value, ref _flags, (int)UpdateProfileFlags.FirstName); }\r\n        }\r\n\r\n        private TLString _lastName;\r\n\r\n        public TLString LastName\r\n        {\r\n            get { return _lastName; }\r\n            set { SetField(out _lastName, value, ref _flags, (int)UpdateProfileFlags.LastName); }\r\n        }\r\n\r\n        private TLString _about;\r\n\r\n        public TLString About\r\n        {\r\n            get { return _about; }\r\n            set { SetField(out _about, value, ref _flags, (int)UpdateProfileFlags.About); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(FirstName, Flags, (int)UpdateProfileFlags.FirstName),\r\n                ToBytes(LastName, Flags, (int)UpdateProfileFlags.LastName),\r\n                ToBytes(About, Flags, (int)UpdateProfileFlags.About));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLUpdateStatus.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    public class TLUpdateStatus : TLObject\r\n    {\r\n        public const string Signature = \"#6628562c\";\r\n\r\n        public TLBool Offline { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offline.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Account/TLUpdateUserName.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Account\r\n{\r\n    public class TLUpdateUserName : TLObject\r\n    {\r\n        public const string Signature = \"#3e0bdd7c\";\r\n\r\n        public TLString Username { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Username.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLCancelCode.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    public class TLCancelCode : TLObject\r\n    {\r\n        public const uint Signature = 0x1f040578;\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString PhoneCodeHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes(),\r\n                PhoneCodeHash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLCheckPhone.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    public class TLCheckPhone : TLObject\r\n    {\r\n        public const string Signature = \"#6fe51dfb\";\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLExportAuthorization.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    public class TLExportAuthorization : TLObject\r\n    {\r\n        public const string Signature = \"#e5bfffcd\";\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                DCId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLImportAuthorization.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    public class TLImportAuthorization : TLObject\r\n    {\r\n        public const string Signature = \"#e3ef9613\";\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Bytes.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLLogOut.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    public class TLLogOut : TLObject\r\n    {\r\n        public const string Signature = \"#5717da40\";\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLResendCode.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    public class TLResendCode : TLObject\r\n    {\r\n        public const uint Signature = 0x3ef1a9bf;\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString PhoneCodeHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes(),\r\n                PhoneCodeHash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLResetAuthorizations.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    public class TLResetAuthorizations : TLObject\r\n    {\r\n        public const string Signature = \"#9fab0d1a\";\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLSendCall.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    public class TLSendCall : TLObject\r\n    {\r\n        public const string Signature = \"#3c51564\";\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString PhoneCodeHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes(),\r\n                PhoneCodeHash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLSendCode.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    [Flags]\r\n    public enum SendCode\r\n    {\r\n        AllowFlashcall = 0x1,      // 0\r\n    }\r\n\r\n    class TLSendCode : TLObject\r\n    {\r\n        public const uint Signature = 0x86aef0ec;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        private TLString _currentNumber;\r\n\r\n        public TLString CurrentNumber\r\n        {\r\n            get { return _currentNumber; }\r\n            set { SetField(out _currentNumber, value, ref _flags, (int)SendCode.AllowFlashcall); }\r\n        }\r\n\r\n        public TLInt ApiId { get; set; }\r\n\r\n        public TLString ApiHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                PhoneNumber.ToBytes(),\r\n                ToBytes(CurrentNumber, Flags, (int)SendCode.AllowFlashcall),\r\n                ApiId.ToBytes(),\r\n                ApiHash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLSendInvites.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    public class TLSendInvites : TLObject\r\n    {\r\n        public const string Signature = \"#771c1d97\";\r\n\r\n        public TLVector<TLString> PhoneNumbers { get; set; }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumbers.ToBytes(),\r\n                Message.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLSendSms.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    public class TLSendSms : TLObject\r\n    {\r\n        public const string Signature = \"#da9f3e8\";\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString PhoneCodeHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes(),\r\n                PhoneCodeHash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLSignIn.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    class TLSignIn : TLObject\r\n    {\r\n        public const string Signature = \"#bcd51581\";\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString PhoneCodeHash { get; set; }\r\n\r\n        public TLString PhoneCode { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes(),\r\n                PhoneCodeHash.ToBytes(),\r\n                PhoneCode.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Auth/TLSignUp.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    public class TLSignUp : TLObject\r\n    {\r\n        public const string Signature = \"#1b067634\";\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString PhoneCodeHash { get; set; }\r\n\r\n        public TLString PhoneCode { get; set; }\r\n\r\n        public TLString FirstName { get; set; }\r\n\r\n        public TLString LastName { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes(),\r\n                PhoneCodeHash.ToBytes(),\r\n                PhoneCode.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLCheckUsername.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLCheckUsername : TLObject\r\n    {\r\n        public const uint Signature = 0x10e6bd2c;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLString Username { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Username.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLCreateChannel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLCreateChannel : TLObject\r\n    {\r\n        public const uint Signature = 0xf4893d7f;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString About { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Title.ToBytes(),\r\n                About.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLDeleteChannel.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLDeleteChannel : TLObject\r\n    {\r\n        public const uint Signature = 0xc0111fe3;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLDeleteChannelMessages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLDeleteChannelMessages : TLObject\r\n    {\r\n        public const uint Signature = 0x84c1fd4e;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLVector<TLInt> Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLDeleteHistory.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLDeleteHistory : TLObject\r\n    {\r\n        public const uint Signature = 0xaf369d42;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                MaxId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLDeleteUserHistory.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLDeleteUserHistory : TLObject\r\n    {\r\n        public const uint Signature = 0xd10dd71b;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInputUserBase UserId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                UserId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLEditAbout.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLEditAbout : TLObject\r\n    {\r\n        public const uint Signature = 0x13e27f1e;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLString About { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                About.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLEditAdmin.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLEditAdmin : TLObject\r\n    {\r\n        public const uint Signature = 0x20b88214;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInputUserBase UserId { get; set; }\r\n\r\n        public TLChannelAdminRights AdminRights { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                UserId.ToBytes(),\r\n                AdminRights.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLEditMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    [Flags]\r\n    public enum EditMessageFlags\r\n    {\r\n        // 0\r\n        NoWebPage = 0x2,        // 1\r\n        ReplyMarkup = 0x4,      // 2\r\n        Entities = 0x8,         // 3\r\n\r\n        Message = 0x800,        // 11\r\n        StopGeoLive = 0x1000,   // 12\r\n        GeoPoint = 0x2000,      // 13\r\n        Media = 0x4000,         // 14\r\n    }\r\n\r\n    class TLEditMessage : TLObject\r\n    {\r\n        public const uint Signature = 0xc000e4c8;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        private TLString _message;\r\n\r\n        public TLString Message\r\n        {\r\n            get { return _message; }\r\n            set { SetField(out _message, value, ref _flags, (int)EditMessageFlags.Message); }\r\n        }\r\n\r\n        private TLVector<TLMessageEntityBase> _entities;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set { SetField(out _entities, value, ref _flags, (int)EditMessageFlags.Entities); }\r\n        }\r\n\r\n        private TLInputMediaBase _media;\r\n\r\n        public TLInputMediaBase Media\r\n        {\r\n            get { return _media; }\r\n            set { SetField(out _media, value, ref _flags, (int)EditMessageFlags.Media); }\r\n        }\r\n\r\n        private TLReplyKeyboardBase _replyMarkup;\r\n\r\n        public TLReplyKeyboardBase ReplyMarkup\r\n        {\r\n            get { return _replyMarkup; }\r\n            set { SetField(out _replyMarkup, value, ref _flags, (int)EditMessageFlags.ReplyMarkup); }\r\n        }\r\n\r\n        public bool NoWebPage\r\n        {\r\n            get { return IsSet(Flags, (int)EditMessageFlags.NoWebPage); }\r\n            set { SetUnset(ref _flags, value, (int)EditMessageFlags.NoWebPage); }\r\n        }\r\n\r\n        private TLInputGeoPointBase _geoPoint;\r\n\r\n        public TLInputGeoPointBase GeoPoint\r\n        {\r\n            get { return _geoPoint; }\r\n            set { SetField(out _geoPoint, value, ref _flags, (int)EditMessageFlags.GeoPoint); }\r\n        }\r\n\r\n        public bool StopGeoLive\r\n        {\r\n            get { return IsSet(Flags, (int)EditMessageFlags.StopGeoLive); }\r\n            set { SetUnset(ref _flags, value, (int)EditMessageFlags.StopGeoLive); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Peer.ToBytes(),\r\n                Id.ToBytes(),\r\n                ToBytes(Message, Flags, (int)EditMessageFlags.Message),\r\n                ToBytes(Media, Flags, (int)EditMessageFlags.Media),\r\n                ToBytes(ReplyMarkup, Flags, (int)EditMessageFlags.ReplyMarkup),\r\n                ToBytes(Entities, Flags, (int)EditMessageFlags.Entities),\r\n                ToBytes(GeoPoint, Flags, (int)EditMessageFlags.GeoPoint));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLEditPhoto.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    public class TLEditPhoto : TLObject\r\n    {\r\n        public const uint Signature = 0xf12e57c9;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInputChatPhotoBase Photo { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Photo.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLEditTitle.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLEditTitle : TLObject\r\n    {\r\n        public const uint Signature = 0x566decd0;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Title.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLExportInvite.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLExportInvite : TLObject\r\n    {\r\n        public const uint Signature = 0xc7560885;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLExportMessageLink.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLExportMessageLink : TLObject\r\n    {\r\n        public const uint Signature = 0xc846d22d;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLGetAdminedPublicChannels.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLGetAdminedPublicChannels : TLObject\r\n    {\r\n        public const uint Signature = 0x8d8d82d7;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLGetChannels.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLGetChannels : TLObject\r\n    {\r\n        public const uint Signature = 0xa7f6bbb;\r\n\r\n        public TLVector<TLInputChannelBase> Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLGetDialogs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLGetDialogs : TLObject\r\n    {\r\n        public const uint Signature = 0xa9d3d249;\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLGetFullChannel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLGetFullChannel : TLObject\r\n    {\r\n        public const uint Signature = 0x08736a09;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLGetImportantHistory.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLGetImportantHistory : TLObject\r\n    {\r\n        public const uint Signature = 0x8f494bb2;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInt OffsetId { get; set; }\r\n\r\n        public TLInt OffsetDate { get; set; }\r\n\r\n        public TLInt AddOffset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public TLInt MinId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                OffsetId.ToBytes(),\r\n                OffsetDate.ToBytes(),\r\n                AddOffset.ToBytes(),\r\n                Limit.ToBytes(),\r\n                MaxId.ToBytes(),\r\n                MinId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLGetMessageEditData.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLGetMessageEditData : TLObject\r\n    {\r\n        public const uint Signature = 0xfda68d36;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLGetMessages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLGetMessages : TLObject\r\n    {\r\n        public const uint Signature = 0xad8c9a23;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLVector<TLInputMessageBase> Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLGetParticipant.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLGetParticipant : TLObject\r\n    {\r\n        public const uint Signature = 0x546dd7a6;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInputUserBase UserId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                UserId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLGetParticipants.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLGetParticipants : TLObject\r\n    {\r\n        public const uint Signature = 0x123e05e9;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLChannelParticipantsFilterBase Filter { get; set; }\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Filter.ToBytes(),\r\n                Offset.ToBytes(),\r\n                Limit.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLInviteToChannel.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLInviteToChannel : TLObject\r\n    {\r\n        public const uint Signature = 0x199f3a6c;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLVector<TLInputUserBase> Users { get; set; } \r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Users.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLJoinChannel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLJoinChannel : TLObject\r\n    {\r\n        public const uint Signature = 0x24b524c5;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLKickFromChannel.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLKickFromChannel : TLObject\r\n    {\r\n        public const uint Signature = 0xa672de14;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInputUserBase UserId { get; set; }\r\n\r\n        public TLBool Kicked { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                UserId.ToBytes(),\r\n                Kicked.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLLeaveChannel.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLLeaveChannel : TLObject\r\n    {\r\n        public const uint Signature = 0xf836aa95;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLReadHistory.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL.Functions.Messages;\r\n\r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    public class TLReadChannelHistory : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0xcc104937;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n        \r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLReadChannelHistory()\r\n        {\r\n            RandomId = TLLong.Random();\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                MaxId.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Channel.ToStream(output);\r\n            MaxId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Channel = GetObject<TLInputChannelBase>(input);\r\n            MaxId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLReadChannelHistory max_id={0} peer=[{1}]\", MaxId, Channel);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLReadMessageContents.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL.Functions.Messages;\r\n\r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLReadMessageContents : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0xeab5dc38;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLVector<TLInt> Id { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLReadMessageContents()\r\n        {\r\n            RandomId = TLLong.Random();\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Channel.ToStream(output);\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Channel = GetObject<TLInputChannelBase>(input);\r\n            Id = GetObject<TLVector<TLInt>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLReportSpam.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLReportSpam : TLObject\r\n    {\r\n        public const uint Signature = 0xfe087810;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLVector<TLInt> Id { get; set; } \r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                UserId.ToBytes(),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLSetStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLSetStickers : TLObject\r\n    {\r\n        public const uint Signature = 0xea8ca4f9;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInputStickerSetBase StickerSet { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                StickerSet.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLToggleComments.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLToggleComments : TLObject\r\n    {\r\n        public const uint Signature = 0xaaa29e88;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLBool Enabled { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Enabled.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLToggleInvites.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLToggleInvites : TLObject\r\n    {\r\n        public const uint Signature = 0x49609307;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLBool Enabled { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Enabled.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLTogglePreHistoryHidden.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLTogglePreHistoryHidden : TLObject\r\n    {\r\n        public const uint Signature = 0xeabbb94c;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLBool Enabled { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Enabled.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLToggleSignatures.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLToggleSignatures : TLObject\r\n    {\r\n        public const uint Signature = 0x1f69b606;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLBool Enabled { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Enabled.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLUpdateChannelUsername.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLUpdateUsername : TLObject\r\n    {\r\n        public const uint Signature = 0x3514b3de;\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLString Username { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Username.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Channels/TLUpdatePinnedMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL.Functions.Messages;\r\n\r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    [Flags]\r\n    public enum UpdatePinnedMessageFlags\r\n    {\r\n        Silent = 0x1,\r\n    }\r\n\r\n    class TLUpdatePinnedMessage : TLObject\r\n    {\r\n        public const uint Signature = 0xa72ded52;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public void SetSilent()\r\n        {\r\n            Set(ref _flags, (int)UpdatePinnedMessageFlags.Silent);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Channel.ToBytes(),\r\n                Id.ToBytes()\r\n                );\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Channel.ToStream(output);\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Channel = GetObject<TLInputChannelBase>(input);\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLBlock.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    public class TLBlock : TLObject\r\n    {\r\n        public const string Signature = \"#332b49fc\";\r\n\r\n        public TLInputUserBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLDeleteContact.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    public class TLDeleteContact : TLObject\r\n    {\r\n        public const string Signature = \"#8e953744\";\r\n\r\n        public TLInputUserBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLDeleteContacts.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    public class TLDeleteContacts : TLObject\r\n    {\r\n        public const uint Signature = 0x59ab389e;\r\n\r\n        public TLVector<TLInputUserBase> Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLGetBlocked.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    public class TLGetBlocked : TLObject\r\n    {\r\n        public const string Signature = \"#f57c350f\";\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLGetContacts.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    public class TLGetContacts : TLObject\r\n    {\r\n        public const uint Signature = 0xc023849f;\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLGetStatuses.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    public class TLGetStatuses : TLObject\r\n    {\r\n        public const uint Signature = 0xc4a353ee;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLGetTopPeers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    [Flags]\r\n    public enum GetTopPeersFlags\r\n    {\r\n        Correspondents = 0x1,\r\n        BotsPM = 0x2,\r\n        BotsInline = 0x4,\r\n        Groups = 0x400,\r\n        Channels = 0x8000,\r\n    }\r\n\r\n    class TLGetTopPeers : TLObject\r\n    {\r\n        public const uint Signature = 0xd4982db5;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Offset.ToBytes(),\r\n                Limit.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLImportContacts.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    public class TLImportContacts : TLObject\r\n    {\r\n        public const uint Signature = 0x2c800be5;\r\n\r\n        public TLVector<TLInputContactBase> Contacts { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Contacts.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLResetSaved.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    class TLResetSaved : TLObject\r\n    {\r\n        public const uint Signature = 0x879537f1;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLResetTopPeerRating.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    class TLResetTopPeerRating : TLObject\r\n    {\r\n        public const uint Signature = 0x1ae373ac;\r\n\r\n        public TLTopPeerCategoryBase Category { get; set; }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Category.ToBytes(),\r\n                Peer.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLResolveUsername.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    class TLResolveUsername : TLObject\r\n    {\r\n        public const uint Signature = 0xf93ccba3;\r\n\r\n        public TLString Username { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Username.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLSearch.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    public class TLSearch : TLObject\r\n    {\r\n        public const string Signature = \"#11f812d8\";\r\n\r\n        public TLString Q { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Q.ToBytes(),\r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Contacts/TLUnblock.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    public class TLUnblock : TLObject\r\n    {\r\n        public const string Signature = \"#e54100bd\";\r\n\r\n        public TLInputUserBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/DHKeyExchange/TLReqDHParams.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.DHKeyExchange\r\n{\r\n    public class TLReqDHParams : TLObject\r\n    {\r\n        public const string Signature = \"#d712e4be\";\r\n\r\n        public TLInt128 Nonce { get; set; }\r\n\r\n        public TLInt128 ServerNonce { get; set; }\r\n\r\n        public TLString P { get; set; }\r\n\r\n        public TLString Q { get; set; }\r\n\r\n        public TLLong PublicKeyFingerprint { get; set; }\r\n\r\n        public TLString EncryptedData { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Nonce.ToBytes(),\r\n                ServerNonce.ToBytes(),\r\n                P.ToBytes(),\r\n                Q.ToBytes(),\r\n                PublicKeyFingerprint.ToBytes(),\r\n                EncryptedData.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/DHKeyExchange/TLReqPQ.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.DHKeyExchange\r\n{\r\n    public class TLReqPQ : TLObject\r\n    {\r\n        public const string Signature = \"#60469778\";\r\n\r\n        public TLInt128 Nonce { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Nonce.Value);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/DHKeyExchange/TLSetClientDHParams.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.DHKeyExchange\r\n{\r\n    public class TLSetClientDHParams : TLObject\r\n    {\r\n        public const string Signature = \"#f5045f1f\";\r\n\r\n        public TLInt128 Nonce { get; set; }\r\n\r\n        public TLInt128 ServerNonce { get; set; }\r\n\r\n        public TLString EncryptedData { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Nonce.ToBytes(),\r\n                ServerNonce.ToBytes(),\r\n                EncryptedData.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Help/TLGetAppChangelog.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    public class TLGetAppChangelog : TLObject\r\n    {\r\n        public const uint Signature = 0xb921197a;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Help/TLGetCdnConfig.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    public class TLGetCdnConfig : TLObject\r\n    {\r\n        public const uint Signature = 0x52029342;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Help/TLGetConfig.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    public class TLGetConfig : TLObject\r\n    {\r\n        public const uint Signature = 0xc4f9186b;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Help/TLGetInviteText.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    public class TLGetInviteText : TLObject\r\n    {\r\n        public const uint Signature = 0x4d392343;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Help/TLGetNearestDC.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    public class TLGetNearestDC : TLObject\r\n    {\r\n        public const string Signature = \"#1fb33026\";\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Help/TLGetRecentMeUrls.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    class TLGetRecentMeUrls\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Help/TLGetSupport.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    public class TLGetSupport : TLObject\r\n    {\r\n        public const string Signature = \"#9cdf08cd\";\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Help/TLGetTermsOfService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    public class TLGetTermsOfService : TLObject\r\n    {\r\n        public const uint Signature = 0x8e59b7e7;\r\n\r\n        public TLString CountryISO2 { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                CountryISO2.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Help/TLInvokeWithLayerN.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    public class TLInvokeWithLayer : TLObject\r\n    {\r\n        public const string Signature = \"#da9b0d0d\";\r\n\r\n        public TLInt Layer { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature), \r\n                Layer.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInvokeWithLayerN : TLObject\r\n    {\r\n        public const string Signature2 = \"#289dd1f6\";\r\n\r\n        public const string Signature3 = \"#b7475268\";\r\n\r\n        public const string Signature4 = \"#dea0d430\";\r\n\r\n        public const string Signature5 = \"#417a57ae\";\r\n\r\n        public const string Signature6 = \"#3a64d54d\";\r\n\r\n        public const string Signature7 = \"#a5be56d3\";\r\n\r\n        public const string Signature8 = \"#e9abd9fd\";\r\n\r\n        public const string Signature9 = \"#76715a63\";\r\n\r\n        public const string Signature10 = \"#39620c41\";\r\n\r\n        public const string Signature11 = \"#a6b88fdf\";\r\n\r\n        public const string Signature12 = \"#dda60d3c\";\r\n\r\n        public const string Signature13 = \"#427c8ea2\";\r\n\r\n        public const string Signature14 = \"#2b9b08fa\";\r\n\r\n        public const string Signature15 = \"#b4418b64\";\r\n\r\n        public const string Signature16 = \"#cf5f0987\";\r\n\r\n        public const string Signature17 = \"#50858a19\";\r\n\r\n        public const string Signature18 = \"#1c900537\";\r\n\r\n        //public const string Signature19 = \"#da9b0d0d\";\r\n\r\n        public TLObject Data { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            byte[] signature;\r\n\r\n            if (Constants.SupportedLayer == 85)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 84)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 83)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 82)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 81)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 80)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 79)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 78)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 76)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 75)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 74)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 73)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 72)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 71)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 70)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 69)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 68)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 67)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 66)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 65)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 64)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 63)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 62)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 61)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 60)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 59)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 58)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 57)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 56)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 55)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 54)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n            \r\n            if (Constants.SupportedLayer == 53)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 52)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 51)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 50)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 49)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 48)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 47)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 46)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 45)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 44)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 43)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(Constants.SupportedLayer) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 42)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(42) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 41)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(41) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 40)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(40) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 39)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(39) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 38)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(38) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 37)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(37) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 36)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(36) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 35)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(35) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 34)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(34) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 33)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(33) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 32)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(32) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 31)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(31) }.ToBytes();\r\n            }\r\n\r\n\r\n            if (Constants.SupportedLayer == 30)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(30) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 29)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(29) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 28)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(28) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 27)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(27) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 26)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(26) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 25)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(25) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 24)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(24) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 23)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(23) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 22)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(22) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 21)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(21) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 20)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(20) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 19)\r\n            {\r\n                signature = new TLInvokeWithLayer { Layer = new TLInt(19) }.ToBytes();\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 18)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature18);\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 17)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature17);\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 16)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature16);\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 15)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature15);\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 14)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature14);\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 13)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature13);\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 12)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature12);\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 11)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature11);\r\n            }\r\n\r\n            if (Constants.SupportedLayer == 1)\r\n            {\r\n                signature = new byte[] { };\r\n            }\r\n            if (Constants.SupportedLayer == 2)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature2);\r\n            }\r\n            if (Constants.SupportedLayer == 3)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature3);\r\n            }\r\n            if (Constants.SupportedLayer == 4)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature4);\r\n            }\r\n            if (Constants.SupportedLayer == 5)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature5);\r\n            }\r\n            if (Constants.SupportedLayer == 6)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature6);\r\n            }\r\n            if (Constants.SupportedLayer == 7)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature7);\r\n            }\r\n            if (Constants.SupportedLayer == 8)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature8);\r\n            }\r\n            if (Constants.SupportedLayer == 9)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature9);\r\n            }\r\n            if (Constants.SupportedLayer == 10)\r\n            {\r\n                signature = TLUtils.SignatureToBytes(Signature10);\r\n            }\r\n\r\n\r\n\r\n            return TLUtils.Combine(signature, Data.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Help/TLInvokeWithoutUpdates.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    public class TLInvokeWithoutUpdates : TLObject\r\n    {\r\n        public const uint Signature = 0xbf9459b7;\r\n\r\n        public TLObject Object { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Object.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Langpack/TLGetDifference.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Langpack\r\n{\r\n    class TLGetDifference : TLObject\r\n    {\r\n        public const uint Signature = 0xb2e4d7d;\r\n\r\n        public TLInt FromVersion { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                FromVersion.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Langpack/TLGetLangPack.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Langpack\r\n{\r\n    class TLGetLangPack : TLObject\r\n    {\r\n        public const uint Signature = 0x9ab5c58e;\r\n\r\n        public TLString LangCode { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                LangCode.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Langpack/TLGetLanguages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Langpack\r\n{\r\n    class TLGetLanguages : TLObject\r\n    {\r\n        public const uint Signature = 0x800fd57d;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Langpack/TLGetStrings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Langpack\r\n{\r\n    class TLGetStrings : TLObject\r\n    {\r\n        public const uint Signature = 0x2e1ee318;\r\n\r\n        public TLString LangCode { get; set; }\r\n\r\n        public TLVector<TLString> Keys { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                LangCode.ToBytes(),\r\n                Keys.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLAcceptEncryption.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLAcceptEncryption : TLObject\r\n    {\r\n        public const string Signature = \"#3dbc0415\";\r\n\r\n        public TLInputEncryptedChat Peer { get; set; }\r\n\r\n        public TLString GB { get; set; }\r\n\r\n        public TLLong KeyFingerprint { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                GB.ToBytes(),\r\n                KeyFingerprint.ToBytes());\r\n        }\r\n    }\r\n }"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLAddChatUser.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLAddChatUser : TLObject\r\n    {\r\n        public const string Signature = \"#f9a0aa09\";\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public TLInputUserBase UserId { get; set; }\r\n\r\n        public TLInt FwdLimit { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes(),\r\n                UserId.ToBytes(),\r\n                FwdLimit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLBotGetCallbackAnswer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum GetBotCallbackAnswerFlags\r\n    {\r\n        Data = 0x1,\r\n        Game = 0x2,\r\n    }\r\n\r\n    class TLGetBotCallbackAnswer : TLObject\r\n    {\r\n        public const uint Signature = 0x810a9fec;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInt MessageId { get; set; }\r\n\r\n        private TLString _data;\r\n\r\n        public TLString Data\r\n        {\r\n            get { return _data; }\r\n            set { SetField(out _data, value, ref _flags, (int) GetBotCallbackAnswerFlags.Data); }\r\n        }\r\n\r\n        public void SetGame()\r\n        {\r\n            Set(ref _flags, (int) GetBotCallbackAnswerFlags.Game);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Peer.ToBytes(),\r\n                MessageId.ToBytes(),\r\n                ToBytes(Data, Flags, (int) GetBotCallbackAnswerFlags.Data));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLCheckChatInvite.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLCheckChatInvite : TLObject\r\n    {\r\n        public const uint Signature = 0x3eadb1bb;\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLClearRecentStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum ClearRecentStickersFlags\r\n    {\r\n        Attached = 0x1\r\n    }\r\n\r\n    class TLClearRecentStickers : TLObject\r\n    {\r\n        public const uint Signature = 0x8999602d;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public void SetAttached()\r\n        {\r\n            Set(ref _flags, (int) ClearRecentStickersFlags.Attached);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature), \r\n                Flags.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLCreateChat.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLCreateChat : TLObject\r\n    {\r\n        public const string Signature = \"#419d9aee\";\r\n\r\n        public TLVector<TLInputUserBase> Users { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Users.ToBytes(),\r\n                Title.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLDeactivateChat.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLDeactivateChat : TLObject\r\n    {\r\n        public const uint Signature = 0x626f0b41;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public TLBool Enabled { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes(),\r\n                Enabled.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLDeleteChatUser.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLDeleteChatUser : TLObject\r\n    {\r\n        public const string Signature = \"#e0611f16\";\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public TLInputUserBase UserId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes(),\r\n                UserId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLDeleteHistory.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum DeleteHistoryFlags\r\n    {\r\n        JustClear = 0x1,\r\n    }\r\n\r\n    class TLDeleteHistory : TLObject\r\n    {\r\n        public const uint Signature = 0x1c015b09;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public void SetJustClear()\r\n        {\r\n            Set(ref _flags, (int) DeleteHistoryFlags.JustClear);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Peer.ToBytes(),\r\n                MaxId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLDeleteMessages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum DeleteMessagesFlags\r\n    {\r\n        Revoke = 0x1,           // 0\r\n    }\r\n\r\n    class TLDeleteMessages : TLObject\r\n    {\r\n        public const uint Signature = 0xe58e95d2;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLVector<TLInt> Id { get; set; }\r\n\r\n        public bool Revoke\r\n        {\r\n            get { return IsSet(Flags, (int) DeleteMessagesFlags.Revoke); }\r\n            set { SetUnset(ref _flags, value, (int) DeleteMessagesFlags.Revoke); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLDiscardEncryption.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLDiscardEncryption : TLObject\r\n    {\r\n        public const string Signature = \"#edd923c5\";\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLEditChatAdmin.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLEditChatAdmin : TLObject\r\n    {\r\n        public const uint Signature = 0xa9e69f2e;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public TLInputUserBase UserId { get; set; }\r\n\r\n        public TLBool IsAdmin { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes(),\r\n                UserId.ToBytes(),\r\n                IsAdmin.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLEditChatPhoto.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLEditChatPhoto : TLObject\r\n    {\r\n        public const string Signature = \"#ca4c79d8\";\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public TLInputChatPhotoBase Photo { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes(),\r\n                Photo.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLEditChatTitle.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLEditChatTitle : TLObject\r\n    {\r\n        public const string Signature = \"#dc452855\";\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes(),\r\n                Title.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLEditGeoLive.cs",
    "content": "﻿using System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum EditGeoLiveFlags\r\n    {\r\n        Stop = 0x1,\r\n        GeoPoint = 0x2\r\n    }\r\n\r\n    public class TLEditGeoLive : TLObject\r\n    {\r\n        public const uint Signature = 0x9a92304e;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Stop\r\n        {\r\n            get { return IsSet(_flags, (int) EditGeoLiveFlags.Stop); }\r\n            set { SetUnset(ref _flags, value, (int) EditGeoLiveFlags.Stop); }\r\n        }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        private TLInputGeoPointBase _geoPoint;\r\n\r\n        public TLInputGeoPointBase GeoPoint\r\n        {\r\n            get { return _geoPoint; }\r\n            set { SetField(out _geoPoint, value, ref _flags, (int) EditGeoLiveFlags.GeoPoint); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Peer.ToBytes(),\r\n                Id.ToBytes(),\r\n                ToBytes(GeoPoint, _flags, (int) EditGeoLiveFlags.GeoPoint));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLExportChatInvite.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLExportChatInvite : TLObject\r\n    {\r\n        public const string Signature = \"#7d885289\";\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLFaveSticker.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLFaveSticker : TLObject\r\n    {\r\n        public const uint Signature = 0xb9ffc55b;\r\n\r\n        public TLInputDocumentBase Id { get; set; }\r\n\r\n        public TLBool Unfave { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Unfave.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLForwardMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLForwardMessage : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0x3f3f4f2;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Id.ToBytes(),\r\n                RandomId.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Peer.ToStream(output);\r\n            Id.ToStream(output);\r\n            RandomId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLInputPeerBase>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLForwardMessages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLForwardMessages : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0x708e0195;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputPeerBase FromPeer { get; set; }\r\n\r\n        public TLInputPeerBase ToPeer { get; set; }\r\n\r\n        public TLVector<TLInt> Id { get; set; }\r\n\r\n        public TLVector<TLLong> RandomIds { get; set; }\r\n\r\n        public TLLong RandomId\r\n        {\r\n            get\r\n            {\r\n                if (RandomIds != null && RandomIds.Count > 0)\r\n                {\r\n                    return RandomIds[0];\r\n                }\r\n\r\n                return new TLLong(0);\r\n            }\r\n        }\r\n\r\n        public void SetChannelMessage()\r\n        {\r\n            Set(ref _flags, (int) SendFlags.Channel);\r\n        }\r\n\r\n        public void SetSilent()\r\n        {\r\n            Set(ref _flags, (int) SendFlags.Silent);\r\n        }\r\n\r\n        public void SetWithMyScore()\r\n        {\r\n            Set(ref _flags, (int) SendFlags.WithMyScore);\r\n        }\r\n\r\n        public void SetGrouped()\r\n        {\r\n            Set(ref _flags, (int)SendFlags.Grouped);\r\n        }\r\n\r\n        public static string ForwardMessagesFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (SendFlags) flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                FromPeer.ToBytes(),\r\n                Id.ToBytes(),\r\n                RandomIds.ToBytes(),\r\n                ToPeer.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            FromPeer.ToStream(output);\r\n            Id.ToStream(output);\r\n            RandomIds.ToStream(output);\r\n            ToPeer.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n\r\n            Flags = GetObject<TLInt>(input);\r\n            FromPeer = GetObject<TLInputPeerBase>(input);\r\n            Id = GetObject<TLVector<TLInt>>(input);\r\n            RandomIds = GetObject<TLVector<TLLong>>(input);\r\n            ToPeer = GetObject<TLInputPeerBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetAllDrafts.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetAllDrafts : TLObject\r\n    {\r\n        public const uint Signature = 0x6a3f8d65;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetAllStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetAllStickers : TLObject\r\n    {\r\n        public const uint Signature = 0x1c9618b1;\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetArchivedStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum GetArchivedStickersFlags\r\n    {\r\n        Masks = 0x1,\r\n    }\r\n\r\n    class TLGetArchivedStickers : TLObject\r\n    {\r\n        public const uint Signature = 0x57f17692;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLLong OffsetId { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public void SetMasks()\r\n        {\r\n            Set(ref _flags, (int) GetArchivedStickersFlags.Masks);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                OffsetId.ToBytes(),\r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetAttachedStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLGetAttachedStickers : TLObject\r\n    {\r\n        public const uint Signature = 0xcc5b67cc;\r\n\r\n        public TLInputStickeredMediaBase Media { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Media.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetChats.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLGetChats : TLObject\r\n    {\r\n        public const string Signature = \"#3c6aa187\";\r\n\r\n        public TLVector<TLInt> Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetCommonChats.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetCommonChats : TLObject\r\n    {\r\n        public const uint Signature = 0xd0a48c4;\r\n\r\n        public TLInputUserBase User { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                User.ToBytes(),\r\n                MaxId.ToBytes(),\r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetDHConfig.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLGetDHConfig : TLObject\r\n    {\r\n        public const string Signature = \"#26cf8950\";\r\n\r\n        public TLInt Version { get; set; }\r\n\r\n        public TLInt RandomLength { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Version.ToBytes(),\r\n                RandomLength.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetDialogs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum GetDialogsFlags\r\n    {\r\n        ExcludePinned = 0x1,\r\n        FeedId = 0x2,\r\n    }\r\n\r\n    class TLGetDialogs : TLObject\r\n    {\r\n        public const uint Signature = 0xb098aee6;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool ExcludePinned\r\n        {\r\n            get { return IsSet(Flags, (int) GetDialogsFlags.ExcludePinned); }\r\n            set { SetUnset(ref _flags, value, (int) GetDialogsFlags.ExcludePinned); }\r\n        }\r\n\r\n        //private TLInt _feedId;\r\n\r\n        //public TLInt FeedId\r\n        //{\r\n        //    get { return _feedId; }\r\n        //    set { SetField(out _feedId, value, ref _flags, (int)GetDialogsFlags.FeedId); }\r\n        //}\r\n\r\n        public TLInt OffsetDate { get; set; }\r\n\r\n        public TLInt OffsetId { get; set; }\r\n\r\n        public TLInputPeerBase OffsetPeer { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                //ToBytes(FeedId, Flags, (int)GetDialogsFlags.FeedId),\r\n                OffsetDate.ToBytes(),\r\n                OffsetId.ToBytes(),\r\n                OffsetPeer.ToBytes(),\r\n                Limit.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetDocumentByHash.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetDocumentByHash : TLObject\r\n    {\r\n        public const uint Signature = 0x338e2464;\r\n\r\n        public TLString Sha256 { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Sha256.ToBytes(),\r\n                Size.ToBytes(),\r\n                MimeType.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetFavedStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetFavedStickers : TLObject\r\n    {\r\n        public const uint Signature = 0x21ce0b0e;\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetFeaturedStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetFeaturedStickers : TLObject\r\n    {\r\n        public const uint Signature = 0x2dacca4f;\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetFullChat.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetFullChat : TLObject\r\n    {\r\n        public const string Signature = \"#3b831c66\";\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetHistory.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLGetHistory : TLObject\r\n    {\r\n        public const uint Signature = 0xdcbb8260;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInt OffsetId { get; set; }\r\n\r\n        public TLInt OffsetDate { get; set; }\r\n\r\n        public TLInt AddOffset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n        \r\n        public TLInt MinId { get; set; }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                OffsetId.ToBytes(),\r\n                OffsetDate.ToBytes(),\r\n                AddOffset.ToBytes(),\r\n                Limit.ToBytes(),\r\n                MaxId.ToBytes(),\r\n                MinId.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetInlineBotResults.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum GetInlineBotResultsFlags\r\n    {\r\n        GeoPoint = 0x1\r\n    }\r\n\r\n    class TLGetInlineBotResults : TLObject\r\n    {\r\n        public const uint Signature = 0x514e999d;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputUserBase Bot { get; set; }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        private TLInputGeoPointBase _geoPoint;\r\n\r\n        public TLInputGeoPointBase GeoPoint\r\n        {\r\n            get { return _geoPoint; }\r\n            set { SetField(out _geoPoint, value, ref _flags, (int) GetInlineBotResultsFlags.GeoPoint); }\r\n        }\r\n\r\n        public TLString Query { get; set; }\r\n\r\n        public TLString Offset { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Bot.ToBytes(),\r\n                Peer.ToBytes(),\r\n                ToBytes(GeoPoint, Flags, (int) GetInlineBotResultsFlags.GeoPoint),\r\n                Query.ToBytes(),\r\n                Offset.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetMaskStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetMaskStickers : TLObject\r\n    {\r\n        public const uint Signature = 0x65b8c79f;\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetMessages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLGetMessages : TLObject\r\n    {\r\n        public const uint Signature = 0x63c66506;\r\n\r\n        public TLVector<TLInputMessageBase> Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetPeerDialogs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetPeerDialogs : TLObject\r\n    {\r\n        public const uint Signature = 0x2d9776b9;\r\n\r\n        public TLVector<TLInputPeerBase> Peers { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peers.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetPeerSettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetPeerSettings : TLObject\r\n    {\r\n        public const uint Signature = 0x3672e09c;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetPinnedDialogs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLGetPinnedDialogs : TLObject\r\n    {\r\n        public const uint Signature = 0xe254d64e;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetRecentLocations.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetRecentLocations : TLObject\r\n    {\r\n        public const uint Signature = 0xbbc45b09;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Limit.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetRecentStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum GetRecentStickersFlags\r\n    {\r\n        Attached = 0x1\r\n    }\r\n\r\n    class TLGetRecentStickers : TLObject\r\n    {\r\n        public const uint Signature = 0x5ea192c9;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public void SetAttached()\r\n        {\r\n            Set(ref _flags, (int) GetRecentStickersFlags.Attached);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetSavedGifs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetSavedGifs : TLObject\r\n    {\r\n        public const uint Signature = 0x83bf3d52;\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetStickerSet.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetStickerSet : TLObject\r\n    {\r\n        public const string Signature = \"#2619a90e\";\r\n\r\n        public TLInputStickerSetBase Stickerset { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Stickerset.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetStickers : TLObject\r\n    {\r\n        public const uint Signature = 0x43d4f2c;\r\n\r\n        public TLString Emoticon { get; set; }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Emoticon.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetUnreadMentions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetUnreadMentions : TLObject\r\n    {\r\n        public const uint Signature = 0x46578472;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInt OffsetId { get; set; }\r\n\r\n        public TLInt AddOffset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public TLInt MinId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                OffsetId.ToBytes(),\r\n                AddOffset.ToBytes(),\r\n                Limit.ToBytes(),\r\n                MaxId.ToBytes(),\r\n                MinId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetUnusedStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetUnusedStickers : TLObject\r\n    {\r\n        public const uint Signature = 0xa978d356;\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature), \r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetWebPage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLGetWebPage : TLObject\r\n    {\r\n        public const uint Signature = 0x32ca8f91;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Url.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLGetWebPagePreview.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLGetWebPagePreview : TLObject\r\n    {\r\n        public const uint Signature = 0x8b68b0cc;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        private TLVector<TLMessageEntityBase> _entities;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set { SetField(out _entities, value, ref _flags, (int)SendFlags.Entities); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Message.ToBytes(),\r\n                ToBytes(Entities, Flags, (int)SendFlags.Entities));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLHideReportSpam.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLHideReportSpam : TLObject\r\n    {\r\n        public const uint Signature = 0xa8f1709b;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLImportChatInvite.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLImportChatInvite : TLObject\r\n    {\r\n        public const string Signature = \"#6c50051c\";\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLInstallStickerSet.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLInstallStickerSet : TLObject\r\n    {\r\n        public const uint Signature = 0xc78fe460;\r\n\r\n        public TLInputStickerSetBase Stickerset { get; set; }\r\n\r\n        public TLBool Archived { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Stickerset.ToBytes(),\r\n                Archived.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLMigrateChat.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLMigrateChat : TLObject\r\n    {\r\n        public const uint Signature = 0x15a3b8e3;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLReadEncryptedHistory.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLReadEncryptedHistory : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0x7f4b690a;\r\n\r\n        public TLInputEncryptedChat Peer { get; set; }\r\n\r\n        public TLInt MaxDate { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLReadEncryptedHistory()\r\n        {\r\n            RandomId = TLLong.Random();\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                MaxDate.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Peer.ToStream(output);\r\n            MaxDate.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLInputEncryptedChat>(input);\r\n            MaxDate = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLReadFeaturedStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLReadFeaturedStickers : TLObject\r\n    {\r\n        public const uint Signature = 0x5b118126;\r\n\r\n        public TLVector<TLLong> Id { get; set; } \r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature), \r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLVector<TLLong>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLReadHistory.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLReadHistory : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0xe306d3a;\r\n        \r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLReadHistory()\r\n        {\r\n            RandomId = TLLong.Random();\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                MaxId.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Peer.ToStream(output);\r\n            MaxId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLInputPeerBase>(input);\r\n            MaxId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLReadHistory max_id={0} peer=[{1}]\", MaxId, Peer);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLReadMentions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLReadMentions : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0xf0189d3;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLReadMentions()\r\n        {\r\n            RandomId = TLLong.Random();\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Peer.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLInputPeerBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLReadMentions peer=[{0}]\", Peer);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLReadMessageContents.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLReadMessageContents : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0x36a73f77;\r\n\r\n        public TLVector<TLInt> Id { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLReadMessageContents()\r\n        {\r\n            RandomId = TLLong.Random();\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLVector<TLInt>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLReceivedMessages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLReceivedMessages : TLObject\r\n    {\r\n        public const string Signature = \"#5a954c0\";\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                MaxId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLReceivedQueue.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLReceivedQueue : TLObject\r\n    {\r\n        public const string Signature = \"#55a5bb66\";\r\n\r\n        public TLLong MaxQts { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                MaxQts.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLReorderPinnedDialogs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum ReorderPinnedDialogsFlags\r\n    {\r\n        Force = 0x1,\r\n    }\r\n\r\n    class TLReorderPinnedDialogs : TLObject\r\n    {\r\n        public const uint Signature = 0x5b51d63f;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLVector<TLInputDialogPeerBase> Order { get; set; }\r\n\r\n        public void SetForce()\r\n        {\r\n            Set(ref _flags, (int) ReorderPinnedDialogsFlags.Force);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Order.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLReorderStickerSets.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum ReorderStickerSetsFlags\r\n    {\r\n        Masks = 0x1,\r\n    }\r\n\r\n    class TLReorderStickerSets : TLObject\r\n    {\r\n        public const uint Signature = 0x78337739;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLVector<TLLong> Order { get; set; }\r\n\r\n        public void SetMasks()\r\n        {\r\n            Set(ref _flags, (int) ReorderStickerSetsFlags.Masks);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Order.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLReportSpam.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLReportSpam : TLObject\r\n    {\r\n        public const uint Signature = 0xcf1592db;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLRequestEncryption.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Logs;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLRequestEncryption : TLObject\r\n    {\r\n        public const string Signature = \"#f64daf43\";\r\n\r\n        public TLInputUserBase UserId { get; set; }\r\n\r\n        public TLInt RandomId { get; set; }\r\n\r\n        public TLString G_A { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            byte[] bytes = null;\r\n            try\r\n            {\r\n                bytes = TLUtils.Combine(\r\n                    TLUtils.SignatureToBytes(Signature),\r\n                    UserId.ToBytes(),\r\n                    RandomId.ToBytes(),\r\n                    G_A.ToBytes());\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                var str = \"TLRequestEncryption.ToBytes error user_id=\" + UserId + \" random_id=\" + RandomId + \" g_a=\" + G_A;\r\n\r\n                Log.Write(str);\r\n\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n\r\n            return bytes;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLRestoreMessages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLRestoreMessages : TLObject\r\n    {\r\n        public const string Signature = \"#395f9d7e\";\r\n\r\n        public TLVector<TLInt> Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSaveDraft.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLSaveDraft : TLObject\r\n    {\r\n        public const uint Signature = 0xbc39e14b;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLInt _replyToMsgId;\r\n\r\n        public TLInt ReplyToMsgId\r\n        {\r\n            get { return _replyToMsgId; }\r\n            set { SetField(out _replyToMsgId, value, ref _flags, (int) SendFlags.ReplyToMsgId); }\r\n        }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        private TLVector<TLMessageEntityBase> _entities;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set { SetField(out _entities, value, ref _flags, (int) SendFlags.Entities); }\r\n        }\r\n\r\n        public void DisableWebPagePreview()\r\n        {\r\n            Set(ref _flags, (int)SendFlags.NoWebpage);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(ReplyToMsgId, Flags, (int)SendFlags.ReplyToMsgId),\r\n                Peer.ToBytes(),\r\n                Message.ToBytes(),\r\n                ToBytes(Entities, Flags, (int) SendFlags.Entities));\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            ToStream(output, ReplyToMsgId, Flags, (int) SendFlags.ReplyToMsgId);\r\n            Peer.ToStream(output);\r\n            Message.ToStream(output);\r\n            ToStream(output, Entities, Flags, (int) SendFlags.Entities);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            ReplyToMsgId = GetObject<TLInt>(Flags, (int) SendFlags.ReplyToMsgId, null, input);\r\n            Peer = GetObject<TLInputPeerBase>(input);\r\n            Message = GetObject<TLString>(input);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int) SendFlags.Entities, null, input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSaveGif.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLSaveGif : TLObject\r\n    {\r\n        public const uint Signature = 0x327a30cb;\r\n\r\n        public TLInputDocumentBase Id { get; set; }\r\n\r\n        public TLBool Unsave { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Unsave.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSearch.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum SearchFlags\r\n    {\r\n        FromId = 0x1,\r\n    }\r\n\r\n    public class TLSearch : TLObject\r\n    {\r\n        public const uint Signature = 0x8614ef68;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLString Query { get; set; }\r\n\r\n        private TLInputUserBase _fromId;\r\n\r\n        public TLInputUserBase FromId\r\n        {\r\n            get { return _fromId; }\r\n            set { SetField(out _fromId, value, ref _flags, (int) SearchFlags.FromId); }\r\n        }\r\n\r\n        public TLInputMessagesFilterBase Filter { get; set; }\r\n\r\n        public TLInt MinDate { get; set; }\r\n\r\n        public TLInt MaxDate { get; set; }\r\n\r\n        public TLInt OffsetId { get; set; }\r\n\r\n        public TLInt AddOffset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public TLInt MinId { get; set; }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Peer.ToBytes(),\r\n                Query.ToBytes(),\r\n                ToBytes(FromId, Flags, (int)SearchFlags.FromId),\r\n                Filter.ToBytes(),\r\n                MinDate.ToBytes(),\r\n                MaxDate.ToBytes(),\r\n                OffsetId.ToBytes(),\r\n                AddOffset.ToBytes(),\r\n                Limit.ToBytes(),\r\n                MaxId.ToBytes(),\r\n                MinId.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSearchGlobal : TLObject\r\n    {\r\n        public const uint Signature = 0x9e3cacb0;\r\n\r\n        public TLString Query { get; set; }\r\n\r\n        public TLInt OffsetDate { get; set; }\r\n\r\n        public TLInputPeerBase OffsetPeer { get; set; }\r\n\r\n        public TLInt OffsetId { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Query.ToBytes(),\r\n                OffsetDate.ToBytes(),\r\n                OffsetPeer.ToBytes(),\r\n                OffsetId.ToBytes(),\r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSearchGifs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLSearchGifs : TLObject\r\n    {\r\n        public const uint Signature = 0xbf9a776b;\r\n\r\n        public TLString Q { get; set; }\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Q.ToBytes(),\r\n                Offset.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSendBroadcast.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLSendBroadcast : TLObject\r\n    {\r\n        public const string Signature = \"#bf73f4da\";\r\n\r\n        public TLVector<TLInputUserBase> Contacts { get; set; }\r\n\r\n        public TLVector<TLLong> RandomId { get; set; }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public TLInputMediaBase Media { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Contacts.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                Message.ToBytes(),\r\n                Media.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSendEncrypted.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLSendEncrypted : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0xa9776773;\r\n\r\n        public TLInputEncryptedChat Peer { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLString Data { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                Data.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Peer.ToStream(output);\r\n            RandomId.ToStream(output);\r\n            Data.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLInputEncryptedChat>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n            Data = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSendEncryptedFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLSendEncryptedFile : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0x9a901b66;\r\n\r\n        public TLInputEncryptedChat Peer { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLString Data { get; set; }\r\n\r\n        public TLInputEncryptedFileBase File { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                Data.ToBytes(),\r\n                File.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Peer.ToStream(output);\r\n            RandomId.ToStream(output);\r\n            Data.ToStream(output);\r\n            File.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLInputEncryptedChat>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n            Data = GetObject<TLString>(input);\r\n            File = GetObject<TLInputEncryptedFileBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSendEncryptedService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLSendEncryptedService : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0x32d439a4;\r\n\r\n        public TLInputEncryptedChat Peer { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLString Data { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                Data.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Peer.ToStream(output);\r\n            RandomId.ToStream(output);\r\n            Data.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLInputEncryptedChat>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n            Data = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSendInlineBotResult.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLSendInlineBotResult : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0xb16e06fe;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        private TLInt _replyToMsgId;\r\n\r\n        public TLInt ReplyToMsgId\r\n        {\r\n            get { return _replyToMsgId; }\r\n            set\r\n            {\r\n                if (value != null && value.Value > 0)\r\n                {\r\n                    Set(ref _flags, (int)SendFlags.ReplyToMsgId);\r\n                    _replyToMsgId = value;\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _flags, (int)SendFlags.ReplyToMsgId);\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLLong QueryId { get; set; }\r\n\r\n        public TLString Id { get; set; }\r\n\r\n        public void SetChannelMessage()\r\n        {\r\n            Set(ref _flags, (int)SendFlags.Channel);\r\n        }\r\n\r\n        public void SetSilent()\r\n        {\r\n            Set(ref _flags, (int)SendFlags.Silent);\r\n        }\r\n\r\n        public void SetClearDraft()\r\n        {\r\n            Set(ref _flags, (int)SendFlags.ClearDraft);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Peer.ToBytes(),\r\n                ToBytes(ReplyToMsgId, Flags, (int)SendFlags.ReplyToMsgId),\r\n                RandomId.ToBytes(),\r\n                QueryId.ToBytes(),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Peer.ToStream(output);\r\n            ToStream(output, ReplyToMsgId, Flags, (int)SendFlags.ReplyToMsgId);\r\n            RandomId.ToStream(output);\r\n            QueryId.ToStream(output);\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLInputPeerBase>(input);\r\n            if (IsSet(Flags, (int)SendFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(input);\r\n            }\r\n            RandomId = GetObject<TLLong>(input);\r\n            QueryId = GetObject<TLLong>(input);\r\n            Id = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSendMedia.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLSendMedia : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0xb8d1262b;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        private TLInt _replyToMsgId;\r\n\r\n        public TLInt ReplyToMsgId\r\n        {\r\n            get { return _replyToMsgId; }\r\n            set\r\n            {\r\n                var replyToMsgId = value != null && value.Value > 0 ? value : null;\r\n\r\n                SetField(out _replyToMsgId, replyToMsgId, ref _flags, (int)SendFlags.ReplyToMsgId);\r\n            }\r\n        }\r\n\r\n        public TLInputMediaBase Media { get; set; }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        private TLReplyKeyboardBase _replyMarkup;\r\n\r\n        public TLReplyKeyboardBase ReplyMarkup\r\n        {\r\n            get { return _replyMarkup; }\r\n            set { SetField(out _replyMarkup, value, ref _flags, (int)SendFlags.ReplyMarkup); }\r\n        }\r\n\r\n        protected TLVector<TLMessageEntityBase> _entities;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set { SetField(out _entities, value, ref _flags, (int)SendFlags.Entities); }\r\n        }\r\n\r\n        public void SetChannelMessage()\r\n        {\r\n            Set(ref _flags, (int)SendFlags.Channel);\r\n        }\r\n\r\n        public void SetSilent()\r\n        {\r\n            Set(ref _flags, (int)SendFlags.Silent);\r\n        }\r\n\r\n        public void SetClearDraft()\r\n        {\r\n            Set(ref _flags, (int)SendFlags.ClearDraft);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Peer.ToBytes(),\r\n                ToBytes(ReplyToMsgId, Flags, (int)SendFlags.ReplyToMsgId),\r\n                Media.ToBytes(),\r\n                Message.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)SendFlags.ReplyMarkup),\r\n                ToBytes(Entities, Flags, (int)SendFlags.Entities)\r\n            );\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Peer.ToStream(output);\r\n            ToStream(output, ReplyToMsgId, Flags, (int)SendFlags.ReplyToMsgId);\r\n            Media.ToStream(output);\r\n            Message.ToStream(output);\r\n            RandomId.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)SendFlags.ReplyMarkup);\r\n            ToStream(output, Entities, Flags, (int)SendFlags.Entities);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLInputPeerBase>(input);\r\n            ReplyToMsgId = GetObject<TLInt>(Flags, (int)SendFlags.ReplyToMsgId, null, input);\r\n            Media = GetObject<TLInputMediaBase>(input);\r\n            Message = GetObject<TLString>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)SendFlags.ReplyMarkup, null, input);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)SendFlags.Entities, null, input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSendMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum SendFlags\r\n    {\r\n        ReplyToMsgId = 0x1,\r\n        NoWebpage = 0x2,\r\n        ReplyMarkup = 0x4,\r\n        Entities = 0x8,\r\n        Channel = 0x10,\r\n        Silent = 0x20,\r\n        Background = 0x40,\r\n        ClearDraft = 0x80,\r\n        WithMyScore = 0x100,\r\n        Grouped = 0x200\r\n    }\r\n\r\n    public interface IRandomId\r\n    {\r\n        TLLong RandomId { get; }\r\n    }\r\n\r\n    public class TLSendMessage : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0xfa88427a;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        private TLInt _replyToMsgId;\r\n\r\n        public TLInt ReplyToMsgId\r\n        {\r\n            get { return _replyToMsgId; }\r\n            set { SetField(out _replyToMsgId, value, ref _flags, (int) SendFlags.ReplyToMsgId); }\r\n        }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        private TLReplyKeyboardBase _replyMarkup;\r\n\r\n        public TLReplyKeyboardBase ReplyMarkup\r\n        {\r\n            get { return _replyMarkup; }\r\n            set { SetField(out _replyMarkup, value, ref _flags, (int) SendFlags.ReplyMarkup); }\r\n        }\r\n\r\n        private TLVector<TLMessageEntityBase> _entities;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set { SetField(out _entities, value, ref _flags, (int) SendFlags.Entities); }\r\n        }\r\n\r\n        public void NoWebpage()\r\n        {\r\n            Set(ref _flags, (int) SendFlags.NoWebpage);\r\n        }\r\n\r\n        public void SetChannelMessage()\r\n        {\r\n            Set(ref _flags, (int) SendFlags.Channel);\r\n        }\r\n\r\n        public void SetSilent()\r\n        {\r\n            Set(ref _flags, (int) SendFlags.Silent);\r\n        }\r\n\r\n        public void ClearDraft()\r\n        {\r\n            Set(ref _flags, (int) SendFlags.ClearDraft);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Peer.ToBytes(),\r\n                ToBytes(ReplyToMsgId, Flags, (int) SendFlags.ReplyToMsgId),\r\n                Message.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int) SendFlags.ReplyMarkup),\r\n                ToBytes(Entities, Flags, (int) SendFlags.Entities)\r\n                );\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Peer.ToStream(output);\r\n            ToStream(output, ReplyToMsgId, Flags, (int) SendFlags.ReplyToMsgId);\r\n            Message.ToStream(output);\r\n            RandomId.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int) SendFlags.ReplyMarkup);\r\n            ToStream(output, Entities, Flags, (int) SendFlags.Entities);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLInputPeerBase>(input);\r\n            ReplyToMsgId = GetObject<TLInt>(Flags, (int) SendFlags.ReplyToMsgId, null, input);\r\n            Message = GetObject<TLString>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int) SendFlags.ReplyMarkup, null, input);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int) SendFlags.Entities, null, input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSendMultiMedia.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLSendMultiMedia : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0x2095512f;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        private TLInt _replyToMsgId;\r\n\r\n        public TLInt ReplyToMsgId\r\n        {\r\n            get { return _replyToMsgId; }\r\n            set\r\n            {\r\n                if (value != null && value.Value > 0)\r\n                {\r\n                    SetField(out _replyToMsgId, value, ref _flags, (int) SendFlags.ReplyToMsgId);\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLVector<TLInputSingleMedia> MultiMedia { get; set; }\r\n\r\n        public TLLong RandomId\r\n        {\r\n            get\r\n            {\r\n                long hash = 19;\r\n\r\n                unchecked\r\n                {\r\n                    if (MultiMedia != null)\r\n                    {\r\n                        for (var i = 0; i < MultiMedia.Count; i++)\r\n                        {\r\n                            hash = hash * 31 + MultiMedia[i].RandomId.Value;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return new TLLong(hash);\r\n            }\r\n            set { }\r\n        }\r\n\r\n        public void SetSilent()\r\n        {\r\n            Set(ref _flags, (int)SendFlags.Silent);\r\n        }\r\n\r\n        public void SetBackground()\r\n        {\r\n            Set(ref _flags, (int)SendFlags.Background);\r\n        }\r\n\r\n        public void SetClearDraft()\r\n        {\r\n            Set(ref _flags, (int)SendFlags.ClearDraft);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Peer.ToBytes(),\r\n                ToBytes(ReplyToMsgId, Flags, (int)SendFlags.ReplyToMsgId),\r\n                MultiMedia.ToBytes()\r\n            );\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Peer.ToStream(output);\r\n            ToStream(output, ReplyToMsgId, Flags, (int)SendFlags.ReplyToMsgId);\r\n            MultiMedia.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLInputPeerBase>(input);\r\n            ReplyToMsgId = GetObject<TLInt>(Flags, (int) SendFlags.ReplyToMsgId, null, input);\r\n            MultiMedia = GetObject<TLVector<TLInputSingleMedia>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSetBotCallbackAnswer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum SetBotCallbackAnswerFlags\r\n    {\r\n        Message = 0x1,          // 0\r\n        Alert = 0x2,            // 1\r\n    }\r\n\r\n    class TLSetBotCallbackAnswer : TLObject\r\n    {\r\n        public const uint Signature = 0xa6e94f04;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt QueryId { get; set; }\r\n\r\n        private TLString _message;\r\n\r\n        public TLString Message\r\n        {\r\n            get { return _message; }\r\n            set { SetField(out _message, value, ref _flags, (int) SetBotCallbackAnswerFlags.Message); }\r\n        }\r\n\r\n        public void SetAlert()\r\n        {\r\n            Set(ref _flags, (int) SetBotCallbackAnswerFlags.Alert);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                QueryId.ToBytes(),\r\n                Message.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSetEncryptedTyping.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLSetEncryptedTyping : TLObject\r\n    {\r\n        public const string Signature = \"#791451ed\";\r\n\r\n        public TLInputEncryptedChat Peer { get; set; }\r\n\r\n        public TLBool Typing { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Typing.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSetInlineBotResults.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum SetInlineBotResultsFlags\r\n    {\r\n        Gallery = 0x1,          // 0\r\n        Private = 0x2,          // 1\r\n        NextOffset = 0x4,       // 2\r\n        SwitchPM = 0x8,         // 3\r\n    }\r\n\r\n    class TLSetInlineBotResults : TLObject\r\n    {\r\n        public const uint Signature = 0xeb5ea206;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLBool _gallery;\r\n\r\n        public TLBool Gallery\r\n        {\r\n            get { return _gallery; }\r\n            set { SetField(out _gallery, value, ref _flags, (int) SetInlineBotResultsFlags.Gallery); }\r\n        }\r\n\r\n        private TLBool _private;\r\n\r\n        public TLBool Private\r\n        {\r\n            get { return _private; }\r\n            set { SetField(out _private, value, ref _flags, (int) SetInlineBotResultsFlags.Private); }\r\n        }\r\n\r\n        public TLLong QueryId { get; set; }\r\n\r\n        public TLVector<TLInputBotInlineResult> Results { get; set; }\r\n\r\n        public TLInt CacheTime { get; set; }\r\n\r\n        private TLString _nextOffset;\r\n\r\n        public TLString NextOffset\r\n        {\r\n            get { return _nextOffset; }\r\n            set { SetField(out _nextOffset, value, ref _flags, (int)SetInlineBotResultsFlags.NextOffset); }\r\n        }\r\n\r\n        private TLInlineBotSwitchPM _switchPM;\r\n\r\n        public TLInlineBotSwitchPM SwitchPM\r\n        {\r\n            get { return _switchPM; }\r\n            set { SetField(out _switchPM, value, ref _flags, (int)SetInlineBotResultsFlags.NextOffset); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                QueryId.ToBytes(),\r\n                Results.ToBytes(),\r\n                CacheTime.ToBytes(),\r\n                ToBytes(NextOffset, Flags, (int) SetInlineBotResultsFlags.NextOffset),\r\n                ToBytes(SwitchPM, Flags, (int) SetInlineBotResultsFlags.SwitchPM));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLSetTyping.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLSetTyping : TLObject\r\n    {\r\n        public const string Signature = \"#a3825e50\";\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLSendMessageActionBase Action { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Action.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLStartBot.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLStartBot : TLObject, IRandomId\r\n    {\r\n        public const uint Signature = 0xe6df7378;\r\n\r\n        public TLInputUserBase Bot { get; set; }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLString StartParam { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Bot.ToBytes(),\r\n                Peer.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                StartParam.ToBytes()\r\n            );\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Bot.ToStream(output);\r\n            Peer.ToStream(output);\r\n            RandomId.ToStream(output);\r\n            StartParam.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Bot = GetObject<TLInputUserBase>(input);\r\n            Peer = GetObject<TLInputPeerBase>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n            StartParam = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLToggleChatAdmins.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLToggleChatAdmins : TLObject\r\n    {\r\n        public const uint Signature = 0xec8bd9e1;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public TLBool Enabled { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes(),\r\n                Enabled.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLToggleDialogPin.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum ToggleDialogPinFlags\r\n    {\r\n        Pinned = 0x1,\r\n    }\r\n\r\n    class TLToggleDialogPin : TLObject\r\n    {\r\n        public const uint Signature = 0x3289be6a;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Pinned\r\n        {\r\n            get { return IsSet(Flags, (int)ToggleDialogPinFlags.Pinned); }\r\n            set { SetUnset(ref _flags, value, (int)ToggleDialogPinFlags.Pinned); }\r\n        }\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Peer.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLUninstallStickerSet.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLUninstallStickerSet : TLObject\r\n    {\r\n        public const uint Signature = 0xf96e55de;\r\n\r\n        public TLInputStickerSetBase Stickerset { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Stickerset.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Messages/TLUploadMedia.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLUploadMedia : TLObject\r\n    {\r\n        public const uint Signature = 0x519bc2b1;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLInputMediaBase Media { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Media.ToBytes()\r\n            );\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Peer.ToStream(output);\r\n            Media.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLInputPeerBase>(input);\r\n            Media = GetObject<TLInputMediaBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Payments/TLClearSavedInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Payments\r\n{\r\n    [Flags]\r\n    public enum ClearSavedInfoFlags\r\n    {\r\n        Credentials = 0x1,\r\n        Info = 0x2\r\n    }\r\n\r\n    class TLClearSavedInfo : TLObject\r\n    {\r\n        public const uint Signature = 0xd83d70c1;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Credentials\r\n        {\r\n            get { return IsSet(Flags, (int) ClearSavedInfoFlags.Credentials); }\r\n            set { SetUnset(ref _flags, value, (int) ClearSavedInfoFlags.Credentials); }\r\n        }\r\n\r\n        public bool Info\r\n        {\r\n            get { return IsSet(Flags, (int) ClearSavedInfoFlags.Info); }\r\n            set { SetUnset(ref _flags, value, (int) ClearSavedInfoFlags.Info); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Payments/TLGetPaymentForm.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Payments\r\n{\r\n    class TLGetPaymentForm : TLObject\r\n    {\r\n        public const uint Signature = 0x99f09745;\r\n\r\n        public TLInt MsgId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                MsgId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Payments/TLGetPaymentReceipt.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Payments\r\n{\r\n    class TLGetPaymentReceipt : TLObject\r\n    {\r\n        public const uint Signature = 0xa092a980;\r\n\r\n        public TLInt MsgId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                MsgId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Payments/TLGetSavedInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Payments\r\n{\r\n    class TLGetSavedInfo : TLObject\r\n    {\r\n        public const uint Signature = 0x227d824b;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Payments/TLSendPaymentForm.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Payments\r\n{\r\n    [Flags]\r\n    public enum SendPaymentFormFlags\r\n    {\r\n        RequestedInfoId = 0x1,\r\n        ShippingOptionId = 0x2\r\n    }\r\n\r\n    class TLSendPaymentForm : TLObject\r\n    {\r\n        public const uint Signature = 0x2b8879b3;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt MsgId { get; set; }\r\n\r\n        private TLString _requestedInfoId;\r\n\r\n        public TLString RequestedInfoId\r\n        {\r\n            get { return _requestedInfoId; }\r\n            set { SetField(out _requestedInfoId, value, ref _flags, (int) SendPaymentFormFlags.RequestedInfoId); }\r\n        }\r\n\r\n        private TLString _shippingOptionId;\r\n\r\n        public TLString ShippingOptionId\r\n        {\r\n            get { return _shippingOptionId; }\r\n            set { SetField(out _shippingOptionId, value, ref _flags, (int)SendPaymentFormFlags.ShippingOptionId); }\r\n        }\r\n\r\n        public TLInputPaymentCredentialsBase Credentials { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                MsgId.ToBytes(),\r\n                ToBytes(RequestedInfoId, Flags, (int) SendPaymentFormFlags.RequestedInfoId),\r\n                ToBytes(ShippingOptionId, Flags, (int) SendPaymentFormFlags.ShippingOptionId),\r\n                Credentials.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Payments/TLValidateRequestedInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Payments\r\n{\r\n    [Flags]\r\n    public enum ValidateRequestedInfoFlags\r\n    {\r\n        Save = 0x1\r\n    }\r\n\r\n    class TLValidateRequestedInfo : TLObject\r\n    {\r\n        public const uint Signature = 0x770a8e74;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Save\r\n        {\r\n            get { return IsSet(Flags, (int) ValidateRequestedInfoFlags.Save); }\r\n            set { SetUnset(ref _flags, value, (int) ValidateRequestedInfoFlags.Save); }\r\n        }\r\n\r\n        public TLInt MsgId { get; set; }\r\n\r\n        public TLPaymentRequestedInfo Info { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            MsgId = GetObject<TLInt>(bytes, ref position);\r\n            Info = GetObject<TLPaymentRequestedInfo>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                MsgId.ToBytes(),\r\n                Info.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Phone/TLAcceptCall.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Phone\r\n{\r\n    class TLAcceptCall : TLObject\r\n    {\r\n        public const uint Signature = 0x3bd2b4a0;\r\n\r\n        public TLInputPhoneCall Peer { get; set; }\r\n\r\n        public TLString GB { get; set; }\r\n\r\n        public TLPhoneCallProtocol Protocol { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                GB.ToBytes(),\r\n                Protocol.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Phone/TLConfirmCall.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Phone\r\n{\r\n    class TLConfirmCall : TLObject\r\n    {\r\n        public const uint Signature = 0x2efe1722;\r\n\r\n        public TLInputPhoneCall Peer { get; set; }\r\n\r\n        public TLString GA { get; set; }\r\n\r\n        public TLLong KeyFingerprint { get; set; }\r\n\r\n        public TLPhoneCallProtocol Protocol { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                GA.ToBytes(),\r\n                KeyFingerprint.ToBytes(),\r\n                Protocol.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Phone/TLDiscardCall.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Phone\r\n{\r\n    public class TLDiscardCall : TLObject\r\n    {\r\n        public const uint Signature = 0x78d413a6;\r\n\r\n        public TLInputPhoneCall Peer { get; set; }\r\n\r\n        public TLInt Duration { get; set; }\r\n\r\n        public TLPhoneCallDiscardReasonBase Reason { get; set; }\r\n\r\n        public TLLong ConnectionId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Duration.ToBytes(),\r\n                Reason.ToBytes(),\r\n                ConnectionId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Phone/TLGetCallConfig.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Phone\r\n{\r\n    class TLGetCallConfig : TLObject\r\n    {\r\n        public const uint Signature = 0x55451fa9;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Phone/TLReceivedCall.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Phone\r\n{\r\n    public class TLReceivedCall : TLObject\r\n    {\r\n        public const uint Signature = 0x17d54f61;\r\n\r\n        public TLInputPhoneCall Peer { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Phone/TLRequestCall.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Phone\r\n{\r\n    class TLRequestCall : TLObject\r\n    {\r\n        public const uint Signature = 0x5b95b3d4;\r\n\r\n        public TLInputUserBase UserId { get; set; }\r\n\r\n        public TLInt RandomId { get; set; }\r\n\r\n        public TLString GAHash { get; set; }\r\n\r\n        public TLPhoneCallProtocol Protocol { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                UserId.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                GAHash.ToBytes(),\r\n                Protocol.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Phone/TLSaveCallDebug.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Phone\r\n{\r\n    class TLSaveCallDebug : TLObject\r\n    {\r\n        public const uint Signature = 0x277add7e;\r\n\r\n        public TLInputPhoneCall Peer { get; set; }\r\n\r\n        public TLDataJSON Debug { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Debug.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Phone/TLSetCallRating.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Phone\r\n{\r\n    class TLSetCallRating : TLObject\r\n    {\r\n        public const uint Signature = 0x1c536a34;\r\n\r\n        public TLInputPhoneCall Peer { get; set; }\r\n\r\n        public TLInt Rating { get; set; }\r\n\r\n        public TLString Comment { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Rating.ToBytes(),\r\n                Comment.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Photos/TLGetUserPhotos.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Photos\r\n{\r\n    class TLGetUserPhotos : TLObject\r\n    {\r\n        public const string Signature = \"#91cd32a8\";\r\n\r\n        public TLInputUserBase UserId { get; set; }\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public TLLong MaxId { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                UserId.ToBytes(),\r\n                Offset.ToBytes(),\r\n                MaxId.ToBytes(),\r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Photos/TLUpdateProfilePhoto.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Photos\r\n{\r\n    public class TLUpdateProfilePhoto : TLObject\r\n    {\r\n        public const uint Signature = 0xf0bb5152;\r\n\r\n        public TLInputPhotoBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Photos/TLUploadProfilePhoto.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Photos\r\n{\r\n    public class TLUploadProfilePhoto : TLObject\r\n    {\r\n        public const uint Signature = 0x4f32c098;\r\n\r\n        public TLInputFile File { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Stuff/TLGetFutureSalts.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Stuff\r\n{\r\n    public class TLGetFutureSalts : TLObject\r\n    {\r\n        public const string Signature = \"#b921bd04\";\r\n\r\n        public TLInt Num { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Num.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Stuff/TLHttpWait.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Stuff\r\n{\r\n    public class TLHttpWait : TLObject\r\n    {\r\n        public const string Signature = \"#9299359f\";\r\n\r\n        /// <summary>\r\n        /// Сервер ждет max_delay миллисекунд, после чего отправляет все сообщения, что у него накопились для клиента.\r\n        /// По умолчанию 0. Второй по приоритету.\r\n        /// </summary>\r\n        public TLInt MaxDelay { get; set; }\r\n\r\n        /// <summary>\r\n        /// После получения последнего сообщения для данной сессии сервер ждет еще wait_after миллисекунд, на тот случай, если появятся еще сообщения. \r\n        /// Если ни одного дополнительного сообщения не появляется, отправляется результат (контейнер со всеми сообщениями); \r\n        /// если же появляются еще сообщения, отсчет wait_after начинается заново.\r\n        /// По умолчанию 0. Последний по приоритету.\r\n        /// </summary>\r\n        public TLInt WaitAfter { get; set; }\r\n\r\n        /// <summary>\r\n        /// Сервер ждет не более max_wait миллисекунд, пока такое сообщение не появится.\r\n        /// Если сообщений так и не появилось, отправляется пустой контейнер.\r\n        /// По умолчанию 25000. Главный по приоритету.\r\n        /// </summary>\r\n        public TLInt MaxWait { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                MaxDelay.ToBytes(),\r\n                WaitAfter.ToBytes(),\r\n                MaxWait.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Stuff/TLMessageAcknowledgments.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Stuff\r\n{\r\n    class TLMessageAcknowledgments : TLObject\r\n    {\r\n        public const string Signature = \"#62d6b459\";\r\n\r\n        public TLVector<TLLong> MsgIds { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                MsgIds.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Stuff/TLRPCDropAnswer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Stuff\r\n{\r\n    public class TLRPCDropAnswer : TLObject\r\n    {\r\n        public const string Signature = \"#5e2ad36e\";\r\n\r\n        public TLLong ReqMsgId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ReqMsgId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Updates/TLGetChannelDifference.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Updates\r\n{\r\n    enum GetChannelDifferenceFlags\r\n    {\r\n        Force = 0x1\r\n    }\r\n\r\n    class TLGetChannelDifference : TLObject\r\n    {\r\n        public const uint Signature = 0xbb32d7c0;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        public TLChannelMessagesFilerBase Filter { get; set; }\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public void SetForce()\r\n        {\r\n            Set(ref _flags, (int) GetChannelDifferenceFlags.Force);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes(),\r\n                Filter.ToBytes(),\r\n                Pts.ToBytes(),\r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Updates/TLGetDifference.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Updates\r\n{\r\n    enum GetDifferenceFlags\r\n    {\r\n        PtsTotalLimit = 0x1\r\n    }\r\n\r\n    class TLGetDifference : TLObject\r\n    {\r\n        public const uint Signature = 0x25939651;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        private TLInt _ptsTotalLimit;\r\n\r\n        public TLInt PtsTotalLimit\r\n        {\r\n            get { return _ptsTotalLimit; }\r\n            set { SetField(out _ptsTotalLimit, value, ref _flags, (int) GetDifferenceFlags.PtsTotalLimit); }\r\n        }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt Qts { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Pts.ToBytes(),\r\n                ToBytes(PtsTotalLimit, Flags, (int)GetDifferenceFlags.PtsTotalLimit),\r\n                Date.ToBytes(),\r\n                Qts.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Updates/TLGetState.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Updates\r\n{\r\n    public class TLGetState : TLObject\r\n    {\r\n        public const string Signature = \"#edd4882a\";\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Upload/TLGetCdnFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Upload\r\n{\r\n    public class TLGetCdnFile : TLObject\r\n    {\r\n        public const uint Signature = 0x2000bcc3;\r\n\r\n        public TLString FileToken { get; set; }\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                FileToken.ToBytes(),\r\n                Offset.ToBytes(),\r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Upload/TLGetFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Upload\r\n{\r\n    class TLGetFile : TLObject\r\n    {\r\n        public const uint Signature = 0xe3a6cfb5;\r\n\r\n        public TLInputFileLocationBase Location { get; set; }\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Location.ToBytes(),\r\n                Offset.ToBytes(),\r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Upload/TLReuploadCdnFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Upload\r\n{\r\n    public class TLReuploadCdnFile : TLObject\r\n    {\r\n        public const uint Signature = 0x9b2754a8;\r\n\r\n        public TLString FileToken { get; set; }\r\n\r\n        public TLString RequestToken { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                FileToken.ToBytes(),\r\n                RequestToken.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Upload/TLSaveFilePart.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Upload\r\n{\r\n    public class TLSaveFilePart : TLObject\r\n    {\r\n        public const string Signature = \"#b304a621\";\r\n\r\n        public TLLong FileId { get; set; }\r\n\r\n        public TLInt FilePart { get; set; }\r\n\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                FileId.ToBytes(),\r\n                FilePart.ToBytes(),\r\n                Bytes.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSaveBigFilePart : TLObject\r\n    {\r\n        public const string Signature = \"#de7b673d\";\r\n\r\n        public TLLong FileId { get; set; }\r\n\r\n        public TLInt FilePart { get; set; }\r\n\r\n        public TLInt FileTotalParts { get; set; }\r\n\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                FileId.ToBytes(),\r\n                FilePart.ToBytes(),\r\n                FileTotalParts.ToBytes(),\r\n                Bytes.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Users/TLGetFullUser.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Users\r\n{\r\n    public class TLGetFullUser : TLObject\r\n    {\r\n        public const string Signature = \"#ca30a5b1\";\r\n\r\n        public TLInputUserBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Functions/Users/TLGetUsers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Users\r\n{\r\n    public class TLGetUsers : TLObject\r\n    {\r\n        public const string Signature = \"#d91a548\";\r\n\r\n        public TLVector<TLInputUserBase> Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Interfaces/IBytes.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Interfaces\r\n{\r\n    public interface IFileData\r\n    {\r\n        byte[] Buffer { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Interfaces/IFullName.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Interfaces\r\n{\r\n    public interface IFullName\r\n    {\r\n        string FullName { get; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Interfaces/IInputPeer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Interfaces\r\n{\r\n    public interface IInputPeer\r\n    {\r\n        TLInputPeerBase ToInputPeer();\r\n\r\n        string GetUnsendedTextFileName();\r\n    }\r\n\r\n    public interface IInputChannel\r\n    {\r\n        TLInputChannelBase ToInputChannel();\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Interfaces/ISelectable.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Interfaces\r\n{\r\n    public interface ISelectable\r\n    {\r\n        bool IsSelected { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/Interfaces/IVIsibility.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Interfaces\r\n{\r\n    public interface IVIsibility\r\n    {\r\n        bool IsVisible { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/SignatureAttribute.cs",
    "content": "﻿using System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    class SignatureAttribute : Attribute\r\n    {\r\n        public string Value { get; set; }\r\n\r\n        public SignatureAttribute(string signature)\r\n        {\r\n            Value = signature;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLAccountAuthorization.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Text;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLAccountAuthorization : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLAccountAuthorization;\r\n\r\n        public TLLong Hash { get; set; }\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLString DeviceModel { get; set; }\r\n\r\n        public TLString Platform { get; set; }\r\n\r\n        public TLString SystemVersion { get; set; }\r\n\r\n        public TLInt ApiId { get; set; }\r\n\r\n        public TLString AppName { get; set; }\r\n\r\n        public TLString AppVersion { get; set; }\r\n\r\n        public TLInt DateCreated { get; set; }\r\n\r\n        public TLInt DateActive { get; set; }\r\n\r\n        public TLString Ip { get; set; }\r\n\r\n        public TLString Country { get; set; }\r\n\r\n        public TLString Region { get; set; }\r\n\r\n        public string Location\r\n        {\r\n            get { return string.Format(\"{0} – {1}\", Ip, Country); }\r\n        }\r\n\r\n        public string AppFullName\r\n        {\r\n            get { return string.Format(\"{0} {1}\", AppName, AppVersion); }\r\n        }\r\n\r\n        public string DeviceFullName\r\n        {\r\n            get\r\n            {\r\n                var name = new StringBuilder();\r\n                name.Append(DeviceModel);\r\n                if (!TLString.IsNullOrEmpty(Platform))\r\n                {\r\n                    name.Append(string.Format(\", {0}\", Platform));\r\n                }\r\n                if (!TLString.IsNullOrEmpty(SystemVersion))\r\n                {\r\n                    name.Append(string.Format(\" {0}\", SystemVersion));\r\n                }\r\n\r\n                return name.ToString();\r\n            }\r\n        }\r\n\r\n        public bool IsCurrent\r\n        {\r\n            get { return IsSet(Flags, 1); }\r\n        }\r\n\r\n        public bool IsOfficialApp\r\n        {\r\n            get { return IsSet(Flags, 2); }\r\n        }\r\n\r\n        public string Description { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLAccountAuthorization hash={0} date_active={1}\", Hash, TLUtils.ToDateTime(DateActive));\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLLong>(bytes, ref position);\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            DeviceModel = GetObject<TLString>(bytes, ref position);\r\n            Platform = GetObject<TLString>(bytes, ref position);\r\n            SystemVersion = GetObject<TLString>(bytes, ref position);\r\n            ApiId = GetObject<TLInt>(bytes, ref position);\r\n            AppName = GetObject<TLString>(bytes, ref position);\r\n            AppVersion = GetObject<TLString>(bytes, ref position);\r\n            DateCreated = GetObject<TLInt>(bytes, ref position);\r\n            DateActive = GetObject<TLInt>(bytes, ref position);\r\n            Ip = GetObject<TLString>(bytes, ref position);\r\n            Country = GetObject<TLString>(bytes, ref position);\r\n            Region = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public void Update(TLAccountAuthorization authorization)\r\n        {\r\n            Hash = authorization.Hash;\r\n            Flags = authorization.Flags;\r\n            DeviceModel = authorization.DeviceModel;\r\n            Platform = authorization.Platform;\r\n            SystemVersion = authorization.SystemVersion;\r\n            ApiId = authorization.ApiId;\r\n            AppName = authorization.AppName;\r\n            AppVersion = authorization.AppVersion;\r\n            DateCreated = authorization.DateCreated;\r\n            DateActive = authorization.DateActive;\r\n            Ip = authorization.Ip;\r\n            Country = authorization.Country;\r\n            Region = authorization.Region;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLAccountAuthorizations.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLAccountAuthorizations : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLAccountAuthorizations;\r\n\r\n        public TLVector<TLAccountAuthorization> Authorizations { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Authorizations = GetObject<TLVector<TLAccountAuthorization>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLAccountDaysTTL.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLAccountDaysTTL : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLAccountDaysTTL;\r\n\r\n        public TLInt Days { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Days = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Days.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLActionInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLActionInfo : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLActionInfo;\r\n\r\n        public TLInt SendBefore { get; set; }\r\n\r\n        public TLObject Action { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"send_before={0} action={1}\", SendBefore, Action);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            SendBefore = GetObject<TLInt>(input);\r\n            Action = GetObject<TLObject>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            SendBefore.ToStream(output);\r\n            Action.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLAdminLogResults.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLAdminLogResults : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLAdminLogResults;\r\n\r\n        public TLVector<TLChannelAdminLogEvent> Events { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Events = GetObject<TLVector<TLChannelAdminLogEvent>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Events = GetObject<TLVector<TLChannelAdminLogEvent>>(input);\r\n            Chats = GetObject<TLVector<TLChatBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Events.ToStream(output);\r\n            Chats.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLAffectedHistory.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLAffectedHistory : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLAffectedHistory;\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public TLInt Seq { get; set; }\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLAffectedHistory24 : TLAffectedHistory, IMultiPts, IMultiChannelPts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLAffectedHistory24;\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public TLInt ChannelPts\r\n        {\r\n            get { return Pts; }\r\n            set { Pts = value; }\r\n        }\r\n\r\n        public TLInt ChannelPtsCount\r\n        {\r\n            get { return PtsCount; }\r\n            set { PtsCount = value; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLAffectedMessages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLAffectedMessages : TLObject, IMultiPts\r\n    {\r\n        public const uint Signature = TLConstructors.TLAffectedMessages;\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLAllStrickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum AllStickersCustomFlags\r\n    {\r\n        RecentStickers = 0x1,\r\n        FavedStickers = 0x2,\r\n        ShowStickersByEmoji = 0x4,\r\n    }\r\n\r\n    public interface IStickers\r\n    {\r\n        TLString Hash { get; set; }\r\n\r\n        TLVector<TLStickerSetBase> Sets { get; set; } \r\n        \r\n        TLVector<TLStickerPack> Packs { get; set; }\r\n\r\n        TLVector<TLDocumentBase> Documents { get; set; }\r\n    }\r\n\r\n    public abstract class TLAllStickersBase : TLObject { }\r\n\r\n    public class TLAllStickersNotModified : TLAllStickersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLAllStickersNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLAllStickers : TLAllStickersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLAllStickers;\r\n\r\n        public virtual TLString Hash { get; set; }\r\n\r\n        public TLVector<TLStickerPack> Packs { get; set; } \r\n\r\n        public TLVector<TLDocumentBase> Documents { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLString>(bytes, ref position);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(bytes, ref position);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes(),\r\n                Packs.ToBytes(),\r\n                Documents.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hash = GetObject<TLString>(input);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Hash.ToStream(output);\r\n            Packs.ToStream(output);\r\n            Documents.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLAllStickers29 : TLAllStickers\r\n    {\r\n        public new const uint Signature = TLConstructors.TLAllStickers29;\r\n\r\n        public TLVector<TLStickerSetBase> Sets { get; set; }\r\n\r\n        #region Additional\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLBool ShowStickersTab { get; set; }\r\n\r\n        public TLVector<TLRecentlyUsedSticker> RecentlyUsed { get; set; } \r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLString>(bytes, ref position);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(bytes, ref position);\r\n            Sets = GetObject<TLVector<TLStickerSetBase>>(bytes, ref position);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            ShowStickersTab = new TLBool(true);\r\n            RecentlyUsed = new TLVector<TLRecentlyUsedSticker>();\r\n            Date = TLUtils.DateToUniversalTimeTLInt(0, DateTime.Now);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes(),\r\n                Packs.ToBytes(),\r\n                Sets.ToBytes(),\r\n                Documents.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hash = GetObject<TLString>(input);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(input);\r\n            Sets = GetObject<TLVector<TLStickerSetBase>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            ShowStickersTab = GetNullableObject<TLBool>(input);\r\n            RecentlyUsed = GetNullableObject<TLVector<TLRecentlyUsedSticker>>(input);\r\n            Date = GetNullableObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Hash.ToStream(output);\r\n            Packs.ToStream(output);\r\n            Sets.ToStream(output);\r\n            Documents.ToStream(output);\r\n\r\n            ShowStickersTab.NullableToStream(output);\r\n            RecentlyUsed.NullableToStream(output);\r\n            Date.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLAllStickers32 : TLAllStickers29\r\n    {\r\n        public new const uint Signature = TLConstructors.TLAllStickers32;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLString>(bytes, ref position);\r\n            Sets = GetObject<TLVector<TLStickerSetBase>>(bytes, ref position);\r\n            \r\n            Packs = new TLVector<TLStickerPack>();\r\n            Documents = new TLVector<TLDocumentBase>();\r\n            ShowStickersTab = TLBool.True;\r\n            RecentlyUsed = new TLVector<TLRecentlyUsedSticker>();\r\n            Date = TLUtils.DateToUniversalTimeTLInt(0, DateTime.Now);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes(),\r\n                Sets.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hash = GetObject<TLString>(input);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(input);\r\n            Sets = GetObject<TLVector<TLStickerSetBase>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            ShowStickersTab = GetNullableObject<TLBool>(input);\r\n            RecentlyUsed = GetNullableObject<TLVector<TLRecentlyUsedSticker>>(input);\r\n            Date = GetNullableObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Hash.ToStream(output);\r\n            Packs.ToStream(output);\r\n            Sets.ToStream(output);\r\n            Documents.ToStream(output);\r\n\r\n            ShowStickersTab.NullableToStream(output);\r\n            RecentlyUsed.NullableToStream(output);\r\n            Date.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLAllStickers43 : TLAllStickers32, IStickers\r\n    {\r\n        public new const uint Signature = TLConstructors.TLAllStickers43;\r\n\r\n        public TLInt HashValue { get; set; }\r\n\r\n        public override TLString Hash\r\n        {\r\n            get { return TLUtils.ToTLString(HashValue) ?? TLString.Empty; }\r\n            set { HashValue = TLUtils.ToTLInt(value) ?? new TLInt(0); }\r\n        }\r\n\r\n        private TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        private TLRecentStickers _recentStickers;\r\n\r\n        public TLRecentStickers RecentStickers\r\n        {\r\n            get { return _recentStickers; }\r\n            set { SetField(out _recentStickers, value, ref _customFlags, (int) AllStickersCustomFlags.RecentStickers); }\r\n        }\r\n\r\n        private TLFavedStickers _favedStickers;\r\n\r\n        public TLFavedStickers FavedStickers\r\n        {\r\n            get { return _favedStickers; }\r\n            set { SetField(out _favedStickers, value, ref _customFlags, (int)AllStickersCustomFlags.FavedStickers); }\r\n        }\r\n\r\n        protected TLInt _showStickersByEmoji;\r\n\r\n        // null - all sets\r\n        // 1 - my sets\r\n        // 0 - none\r\n        public ShowStickersByEmoji ShowStickersByEmoji\r\n        {\r\n            get\r\n            {\r\n                if (_showStickersByEmoji == null)\r\n                {\r\n                    return ShowStickersByEmoji.AllSets;\r\n                }\r\n                if (_showStickersByEmoji.Value == 1)\r\n                {\r\n                    return ShowStickersByEmoji.MySets;\r\n                }\r\n\r\n                return ShowStickersByEmoji.None;\r\n            }\r\n            set\r\n            {\r\n                switch (value)\r\n                {\r\n                    case ShowStickersByEmoji.AllSets:\r\n                        SetField(out _showStickersByEmoji, null, ref _customFlags, (int)AllStickersCustomFlags.ShowStickersByEmoji);\r\n                        break;\r\n                    case ShowStickersByEmoji.MySets:\r\n                        SetField(out _showStickersByEmoji, new TLInt(1), ref _customFlags, (int)AllStickersCustomFlags.ShowStickersByEmoji);\r\n                        break;\r\n                    default:\r\n                        SetField(out _showStickersByEmoji, new TLInt(0), ref _customFlags, (int)AllStickersCustomFlags.ShowStickersByEmoji);\r\n                        break;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            HashValue = GetObject<TLInt>(bytes, ref position);\r\n            Sets = GetObject<TLVector<TLStickerSetBase>>(bytes, ref position);\r\n            \r\n            Packs = new TLVector<TLStickerPack>();\r\n            Documents = new TLVector<TLDocumentBase>();\r\n            ShowStickersTab = TLBool.True;\r\n            RecentlyUsed = new TLVector<TLRecentlyUsedSticker>();\r\n            Date = TLUtils.DateToUniversalTimeTLInt(0, DateTime.Now);\r\n            CustomFlags = new TLLong(0);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                HashValue.ToBytes(),\r\n                Sets.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            HashValue = GetObject<TLInt>(input);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(input);\r\n            \r\n            Sets = GetObject<TLVector<TLStickerSetBase>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n            ShowStickersTab = GetNullableObject<TLBool>(input);\r\n            RecentlyUsed = GetNullableObject<TLVector<TLRecentlyUsedSticker>>(input);\r\n            Date = GetNullableObject<TLInt>(input);\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            RecentStickers = GetObject<TLRecentStickers>(CustomFlags, (int)AllStickersCustomFlags.RecentStickers, null, input);\r\n            FavedStickers = GetObject<TLFavedStickers>(CustomFlags, (int)AllStickersCustomFlags.FavedStickers, null, input);\r\n            _showStickersByEmoji = GetObject<TLInt>(CustomFlags, (int)AllStickersCustomFlags.ShowStickersByEmoji, null, input);\r\n\r\n            // move showStickersTab flag to ShowStickersByEmoji flag\r\n            if (ShowStickersTab != null && !ShowStickersTab.Value)\r\n            {\r\n                ShowStickersByEmoji = ShowStickersByEmoji.MySets;\r\n                ShowStickersTab = TLBool.True;\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            HashValue.ToStream(output);\r\n            Packs.ToStream(output);\r\n            \r\n            Sets.ToStream(output);\r\n            Documents.ToStream(output);\r\n            ShowStickersTab.NullableToStream(output);\r\n            RecentlyUsed.NullableToStream(output);\r\n            Date.NullableToStream(output);\r\n            CustomFlags.ToStream(output);\r\n            ToStream(output, RecentStickers, CustomFlags, (int)AllStickersCustomFlags.RecentStickers);\r\n            ToStream(output, FavedStickers, CustomFlags, (int)AllStickersCustomFlags.FavedStickers);\r\n            ToStream(output, _showStickersByEmoji, CustomFlags, (int)AllStickersCustomFlags.ShowStickersByEmoji);\r\n        }\r\n    }\r\n\r\n    public enum ShowStickersByEmoji\r\n    {\r\n        AllSets,\r\n        MySets,\r\n        None\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLAppChangelogBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLAppChangelogBase : TLObject { }\r\n\r\n    public class TLAppChangelogEmpty : TLAppChangelogBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLAppChangelogEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLAppChangelog : TLAppChangelogBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLAppChangelog;\r\n\r\n        public TLString Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLAppChangelog59 : TLAppChangelogBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLAppChangelog59;\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public TLMessageMediaBase Media { get; set; }\r\n\r\n        public TLVector<TLMessageEntityBase> Entities { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLArchivedStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLArchivedStickers : TLObject, IStickers\r\n    {\r\n        public const uint Signature = TLConstructors.TLArchivedStickers;\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public TLVector<TLStickerSetCoveredBase> SetsCovered { get; set; }\r\n\r\n        public TLVector<TLStickerSetBase> Sets\r\n        {\r\n            get\r\n            {\r\n                var sets = new TLVector<TLStickerSetBase>();\r\n                foreach (var setCovered in SetsCovered)\r\n                {\r\n                    sets.Add(setCovered.StickerSet);\r\n                }\r\n                return sets;\r\n            }\r\n            set\r\n            {\r\n                Execute.ShowDebugMessage(\"TLArchivedStickers.Sets set\");\r\n            }\r\n        }\r\n\r\n        public TLVector<TLStickerPack> Packs { get; set; }\r\n\r\n        public TLVector<TLDocumentBase> Documents { get; set; }\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        public TLVector<TLMessagesStickerSet> MessagesStickerSets { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            SetsCovered = GetObject<TLVector<TLStickerSetCoveredBase>>(bytes, ref position);\r\n\r\n            Packs = new TLVector<TLStickerPack>();\r\n            Documents = new TLVector<TLDocumentBase>();\r\n            MessagesStickerSets = new TLVector<TLMessagesStickerSet>();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Count.ToBytes(),\r\n                SetsCovered.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Count = GetObject<TLInt>(input);\r\n            SetsCovered = GetObject<TLVector<TLStickerSetCoveredBase>>(input);\r\n\r\n            Packs = GetObject<TLVector<TLStickerPack>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n            MessagesStickerSets = GetObject<TLVector<TLMessagesStickerSet>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Count.ToStream(output);\r\n            SetsCovered.ToStream(output);\r\n\r\n            Packs.ToStream(output);\r\n            Documents.ToStream(output);\r\n            MessagesStickerSets.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLAudio.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Cache;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLAudioBase : TLObject\r\n    {\r\n        public TLLong Id { get; set; }\r\n\r\n        public virtual int AudioSize{get { return 0; }}\r\n    }\r\n\r\n    public class TLAudioEmpty : TLAudioBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLAudioEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature), Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLAudio33 : TLAudio\r\n    {\r\n        public new const uint Signature = TLConstructors.TLAudio33;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            //UserId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                //UserId.ToBytes(),\r\n                Date.ToBytes(),\r\n                Duration.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Size.ToBytes(),\r\n                DCId.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            //UserId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            //UserId.ToStream(output);\r\n            Date.ToStream(output);\r\n            Duration.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Size.ToStream(output);\r\n            DCId.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLAudio : TLAudioBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLAudio;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt Duration { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public string GetFileName()\r\n        {\r\n            return string.Format(\"audio{0}_{1}.mp3\", Id, AccessHash);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                UserId.ToBytes(),\r\n                Date.ToBytes(),\r\n                Duration.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Size.ToBytes(),\r\n                DCId.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Date.ToStream(output);\r\n            Duration.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Size.ToStream(output);\r\n            DCId.ToStream(output);\r\n        }\r\n\r\n        #region Additional\r\n\r\n        public override int AudioSize\r\n        {\r\n            get\r\n            {\r\n                return Size != null ? Size.Value : 0;\r\n            }\r\n        }\r\n\r\n        public string DurationString\r\n        {\r\n            get\r\n            {\r\n                var timeSpan = TimeSpan.FromSeconds(Duration.Value);\r\n\r\n                if (timeSpan.Hours > 0)\r\n                {\r\n                    return timeSpan.ToString(@\"h\\:mm\\:ss\");\r\n                }\r\n\r\n                return timeSpan.ToString(@\"m\\:ss\");\r\n            }\r\n        }\r\n\r\n        public TLUserBase User\r\n        {\r\n            get\r\n            {\r\n                var cacheService = InMemoryCacheService.Instance;\r\n                return cacheService.GetUser(UserId);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public TLInputAudioFileLocation ToInputFileLocation()\r\n        {\r\n            return new TLInputAudioFileLocation { AccessHash = AccessHash, Id = Id };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLAuthorization.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum AuthorizationFlags\r\n    {\r\n        TmpSessions = 0x1,          // 0\r\n    }\r\n\r\n    public class TLAuthorization : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLAuthorization;\r\n\r\n        public TLInt Expires { get; set; }\r\n\r\n        public TLUserBase User { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            User = GetObject<TLUserBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLAuthorization31 : TLAuthorization\r\n    {\r\n        public new const uint Signature = TLConstructors.TLAuthorization31;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            User = GetObject<TLUserBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLAuthorization55 : TLAuthorization\r\n    {\r\n        public new const uint Signature = TLConstructors.TLAuthorization55;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLInt TempSessions { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            User = GetObject<TLUserBase>(bytes, ref position);\r\n            TempSessions = GetObject<TLInt>(Flags, (int) AuthorizationFlags.TmpSessions, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLBadMessageNotification.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLBadMessageNotification : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLBadMessageNotification;\r\n\r\n        public TLLong BadMessageId { get; set; }\r\n\r\n        public TLInt BadMessageSequenceNumber { get; set; }\r\n\r\n        public TLInt ErrorCode { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            BadMessageId = GetObject<TLLong>(bytes, ref position);\r\n            BadMessageSequenceNumber = GetObject<TLInt>(bytes, ref position);\r\n            ErrorCode = GetObject<TLInt>(bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBadMessageNotification msg_id={0} msg_seq_no={1} error_code={2}\", BadMessageId, BadMessageSequenceNumber, ErrorCode);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLBadServerSalt.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLBadServerSalt : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLBadServerSalt;\r\n\r\n        public TLLong BadMessageId { get; set; }\r\n\r\n        public TLInt BadMessageSeqNo { get; set; }\r\n\r\n        public TLInt ErrorCode { get; set; }\r\n\r\n        public TLLong NewServerSalt { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            BadMessageId = GetObject<TLLong>(bytes, ref position);\r\n            BadMessageSeqNo = GetObject<TLInt>(bytes, ref position);\r\n            ErrorCode = GetObject<TLInt>(bytes, ref position);\r\n            NewServerSalt = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBadServerSalt msg_id={0} msg_seq_no={1} error_code={2} new_salt={3}\", BadMessageId, BadMessageSeqNo, ErrorCode, NewServerSalt);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLBool.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Runtime.Serialization;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [DataContract]\r\n    public class TLBool : TLObject\r\n    {\r\n        public const uint BoolTrue = 0x997275b5;\r\n        public const uint BoolFalse = 0xbc799737;\r\n\r\n        [DataMember]\r\n        public bool Value { get; set; }\r\n\r\n        public TLBool()\r\n        {\r\n            \r\n        }\r\n\r\n        public TLBool(bool value)\r\n        {\r\n            Value = value;\r\n        }\r\n\r\n        public static TLBool True\r\n        {\r\n            get { return new TLBool(true); }\r\n        }\r\n\r\n        public static TLBool False\r\n        {\r\n            get { return new TLBool(false); }\r\n        }\r\n\r\n        public static TLBool Parse(byte[] bytes, out int bytesRead)\r\n        {\r\n            bytesRead = 4;\r\n            if (bytes.StartsWith(BoolTrue))\r\n            {\r\n                return new TLBool{ Value = true };\r\n            }\r\n            if (bytes.StartsWith(BoolFalse))\r\n            {\r\n                return new TLBool { Value = false };\r\n            }\r\n\r\n            bytesRead = 0;\r\n            bytes.ThrowNotSupportedException(\"TLBool\");\r\n            return null;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return Value ? TLUtils.SignatureToBytes(BoolTrue) : TLUtils.SignatureToBytes(BoolFalse);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            if (bytes.StartsWith(position, BoolTrue))\r\n            {\r\n                Value = true;\r\n            }\r\n            else if (bytes.StartsWith(position, BoolFalse))\r\n            {\r\n                Value = false;\r\n            }\r\n            else\r\n            {\r\n                bytes.ThrowNotSupportedException(\"TLBool\");\r\n            }\r\n            position += 4;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            var buffer = new byte[4];\r\n            input.Read(buffer, 0, 4);\r\n            if (buffer.StartsWith(0, BoolTrue))\r\n            {\r\n                Value = true;\r\n            }\r\n            else if (buffer.StartsWith(0, BoolFalse))\r\n            {\r\n                Value = false;\r\n            }\r\n            else\r\n            {\r\n                buffer.ThrowNotSupportedException(\"TLBool\");\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(Value ? BitConverter.GetBytes(BoolTrue) : BitConverter.GetBytes(BoolFalse), 0, 4);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n#if WIN_RT\r\n            return Value.ToString();\r\n#else\r\n            return Value.ToString(CultureInfo.InvariantCulture);\r\n#endif\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLBotCallbackAnswer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum BotCallbackAnswer\r\n    {\r\n        Message = 0x1,      // 0\r\n        Alert = 0x2,        // 1\r\n        Url = 0x4,          // 2\r\n        HasUrl = 0x8,       // 3\r\n    }\r\n\r\n    public class TLBotCallbackAnswer : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotCallbackAnswer;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public bool Alert { get { return IsSet(Flags, (int) BotCallbackAnswer.Alert); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(Flags, (int)BotCallbackAnswer.Message, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Message.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(Flags, (int)BotCallbackAnswer.Message, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            ToBytes(Message, Flags, (int) BotCallbackAnswer.Message);\r\n        }\r\n    }\r\n\r\n    public class TLBotCallbackAnswer54 : TLBotCallbackAnswer\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotCallbackAnswer54;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(Flags, (int) BotCallbackAnswer.Message, null, bytes, ref position);\r\n            Url = GetObject<TLString>(Flags, (int) BotCallbackAnswer.Url, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Message.ToBytes(),\r\n                Url.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(Flags, (int) BotCallbackAnswer.Message, null, input);\r\n            Url = GetObject<TLString>(Flags, (int) BotCallbackAnswer.Url, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            ToBytes(Message, Flags, (int) BotCallbackAnswer.Message);\r\n            ToBytes(Url, Flags, (int) BotCallbackAnswer.Url);\r\n        }\r\n    }\r\n\r\n    public class TLBotCallbackAnswer58 : TLBotCallbackAnswer54, ICachedObject\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotCallbackAnswer58;\r\n\r\n        public TLInt CacheTime { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(Flags, (int)BotCallbackAnswer.Message, null, bytes, ref position);\r\n            Url = GetObject<TLString>(Flags, (int)BotCallbackAnswer.Url, null, bytes, ref position);\r\n            CacheTime = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(Message, Flags, (int)BotCallbackAnswer.Message),\r\n                ToBytes(Url, Flags, (int)BotCallbackAnswer.Url),\r\n                CacheTime.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(Flags, (int)BotCallbackAnswer.Message, null, input);\r\n            Url = GetObject<TLString>(Flags, (int)BotCallbackAnswer.Url, null, input);\r\n            CacheTime = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            ToStream(output, Message, Flags, (int) BotCallbackAnswer.Message);\r\n            ToStream(output, Url, Flags, (int) BotCallbackAnswer.Url);\r\n            output.Write(CacheTime.ToBytes());\r\n        }\r\n    }\r\n\r\n    public interface ICachedObject\r\n    {\r\n        TLInt CacheTime { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLBotCommand.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLBotCommand : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotCommand;\r\n\r\n        public TLString Command { get; set; }\r\n\r\n        public TLString Description { get; set; }\r\n\r\n\r\n        public TLUserBase Bot { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Command = GetObject<TLString>(bytes, ref position);\r\n            Description = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Command.ToBytes(),\r\n                Description.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Command = GetObject<TLString>(input);\r\n            Description = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Command.ToBytes());\r\n            output.Write(Description.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLBotInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLBotInfoBase : TLObject { }\r\n\r\n    public class TLBotInfoEmpty : TLBotInfoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotInfoEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLBotInfo49 : TLBotInfo\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotInfo49;\r\n\r\n        public override TLInt Version\r\n        {\r\n            get { return new TLInt(0); }\r\n            set { }\r\n        }\r\n\r\n        public override TLString ShareText\r\n        {\r\n            get { return TLString.Empty; }\r\n            set { }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Description = GetObject<TLString>(bytes, ref position);\r\n            Commands = GetObject<TLVector<TLBotCommand>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                UserId.ToBytes(),\r\n                Description.ToBytes(),\r\n                Commands.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            Description = GetObject<TLString>(input);\r\n            Commands = GetObject<TLVector<TLBotCommand>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(Description.ToBytes());\r\n            output.Write(Commands.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLBotInfo : TLBotInfoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotInfo;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public virtual TLInt Version { get; set; }\r\n\r\n        public virtual TLString ShareText { get; set; }\r\n\r\n        public TLString Description { get; set; }\r\n\r\n        public TLVector<TLBotCommand> Commands { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n            ShareText = GetObject<TLString>(bytes, ref position);\r\n            Description = GetObject<TLString>(bytes, ref position);\r\n            Commands = GetObject<TLVector<TLBotCommand>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                UserId.ToBytes(),\r\n                Version.ToBytes(),\r\n                ShareText.ToBytes(),\r\n                Description.ToBytes(),\r\n                Commands.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n            ShareText = GetObject<TLString>(input);\r\n            Description = GetObject<TLString>(input);\r\n            Commands = GetObject<TLVector<TLBotCommand>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(Version.ToBytes());\r\n            output.Write(ShareText.ToBytes());\r\n            output.Write(Description.ToBytes());\r\n            output.Write(Commands.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLBotInlineMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum BotInlineMessageFlags\r\n    {\r\n        NoWebpage = 0x1,            // 0\r\n        Entities = 0x2,             // 1\r\n        ReplyMarkup = 0x4,          // 2\r\n    }\r\n\r\n    public abstract class TLBotInlineMessageBase : TLObject\r\n    {\r\n        public TLReplyKeyboardBase ReplyMarkup { get; set; }\r\n\r\n        public static string BotInlineMessageFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (BotInlineMessageFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n    }\r\n\r\n    public class TLBotInlineMessageMediaAuto75 : TLBotInlineMessageMediaAuto51\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotInlineMessageMediaAuto75;\r\n\r\n        protected TLVector<TLMessageEntityBase> _entities;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set { SetField(out _entities, value, ref _flags, (int)InputBotInlineMessageFlags.Entities); }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineMessageMediaAuto75 flags={0} caption={1} reply_markup={2}\", BotInlineMessageFlagsString(Flags), Caption, ReplyMarkup);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Caption = GetObject<TLString>(bytes, ref position);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)BotInlineMessageFlags.Entities, null, bytes, ref position);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(Entities, Flags, (int)InputBotInlineMessageFlags.Entities),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)BotInlineMessageFlags.Entities, null, input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Caption.ToStream(output);\r\n            ToStream(output, Entities, Flags, (int)BotInlineMessageFlags.Entities);\r\n            ToStream(output, ReplyMarkup, Flags, (int)BotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLBotInlineMessageMediaAuto51 : TLBotInlineMessageMediaAuto\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotInlineMessageMediaAuto51;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineMessageMediaAuto51 flags={0} caption={1} reply_markup={2}\", BotInlineMessageFlagsString(Flags), Caption, ReplyMarkup);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Caption = GetObject<TLString>(bytes, ref position);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Caption.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)BotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLBotInlineMessageMediaAuto : TLBotInlineMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotInlineMessageMediaAuto;\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Caption = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Caption.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLBotInlineMessageText51 : TLBotInlineMessageText\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotInlineMessageText51;\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineMessageText51 flags={0} message={1} entities={2} reply_markup={3}\", BotInlineMessageFlagsString(Flags), Message, Entities, ReplyMarkup);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)BotInlineMessageFlags.Entities, null, bytes, ref position);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Message.ToBytes(),\r\n                ToBytes(Entities, Flags, (int)InputBotInlineMessageFlags.Entities),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)BotInlineMessageFlags.Entities, null, input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Message.ToStream(output);\r\n            ToStream(output, Entities, Flags, (int)InputBotInlineMessageFlags.Entities);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLBotInlineMessageText : TLBotInlineMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotInlineMessageText;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public bool NoWebpage { get { return IsSet(Flags, (int)BotInlineMessageFlags.NoWebpage); } }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public TLVector<TLMessageEntityBase> Entities { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)BotInlineMessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Message.ToBytes(),\r\n                ToBytes(Entities, Flags, (int)InputBotInlineMessageFlags.Entities));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            if (IsSet(Flags, (int)InputBotInlineMessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Message.ToStream(output);\r\n            ToStream(output, Entities, Flags, (int)InputBotInlineMessageFlags.Entities);\r\n        }\r\n    }\r\n\r\n    public class TLBotInlineMessageMediaGeo : TLBotInlineMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotInlineMessageMediaGeo;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLGeoPointBase Geo { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineMessageMediaGeo flags={0} geo={1} reply_markup={2}\", BotInlineMessageFlagsString(Flags), Geo, ReplyMarkup);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Geo = GetObject<TLGeoPointBase>(bytes, ref position);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Geo.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Geo = GetObject<TLGeoPointBase>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Geo.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLBotInlineMessageMediaVenue78 : TLBotInlineMessageMediaVenue\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotInlineMessageMediaVenue78;\r\n\r\n        public TLString VenueType { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineMessageMediaVenue flags={0} geo={1} title={2} address={3} provider={4} venue_id={5} venue_type={6} reply_markup={7}\", BotInlineMessageFlagsString(Flags), Geo, Title, Address, Provider, VenueId, VenueType, ReplyMarkup);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Geo = GetObject<TLGeoPointBase>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Address = GetObject<TLString>(bytes, ref position);\r\n            Provider = GetObject<TLString>(bytes, ref position);\r\n            VenueId = GetObject<TLString>(bytes, ref position);\r\n            VenueType = GetObject<TLString>(bytes, ref position);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Geo.ToBytes(),\r\n                Title.ToBytes(),\r\n                Address.ToBytes(),\r\n                Provider.ToBytes(),\r\n                VenueId.ToBytes(),\r\n                VenueType.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Geo = GetObject<TLGeoPointBase>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Address = GetObject<TLString>(input);\r\n            Provider = GetObject<TLString>(input);\r\n            VenueId = GetObject<TLString>(input);\r\n            VenueType = GetObject<TLString>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Geo.ToStream(output);\r\n            Title.ToStream(output);\r\n            Address.ToStream(output);\r\n            Provider.ToStream(output);\r\n            VenueId.ToStream(output);\r\n            VenueType.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLBotInlineMessageMediaVenue : TLBotInlineMessageMediaGeo\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotInlineMessageMediaVenue;\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Address { get; set; }\r\n\r\n        public TLString Provider { get; set; }\r\n\r\n        public TLString VenueId { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineMessageMediaVenue flags={0} geo={1} title={2} address={3} provider={4} venue_id={5} reply_markup={6}\", BotInlineMessageFlagsString(Flags), Geo, Title, Address, Provider, VenueId, ReplyMarkup);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Geo = GetObject<TLGeoPointBase>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Address = GetObject<TLString>(bytes, ref position);\r\n            Provider = GetObject<TLString>(bytes, ref position);\r\n            VenueId = GetObject<TLString>(bytes, ref position);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Geo.ToBytes(),\r\n                Title.ToBytes(),\r\n                Address.ToBytes(),\r\n                Provider.ToBytes(),\r\n                VenueId.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Geo = GetObject<TLGeoPointBase>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Address = GetObject<TLString>(input);\r\n            Provider = GetObject<TLString>(input);\r\n            VenueId = GetObject<TLString>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Geo.ToStream(output);\r\n            Title.ToStream(output);\r\n            Address.ToStream(output);\r\n            Provider.ToStream(output);\r\n            VenueId.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLBotInlineMessageMediaContact82 : TLBotInlineMessageMediaContact\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotInlineMessageMediaContact82;\r\n\r\n        public TLString VCard { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineMessageMediaContact82 flags={0} phone_number={1} first_name={2} last_name={3} vcard={4} reply_markup={5}\", BotInlineMessageFlagsString(Flags), PhoneNumber, FirstName, LastName, VCard, ReplyMarkup);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            PhoneNumber = GetObject<TLString>(bytes, ref position);\r\n            FirstName = GetObject<TLString>(bytes, ref position);\r\n            LastName = GetObject<TLString>(bytes, ref position);\r\n            VCard = GetObject<TLString>(bytes, ref position);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                PhoneNumber.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                VCard.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            PhoneNumber = GetObject<TLString>(input);\r\n            FirstName = GetObject<TLString>(input);\r\n            LastName = GetObject<TLString>(input);\r\n            VCard = GetObject<TLString>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            PhoneNumber.ToStream(output);\r\n            FirstName.ToStream(output);\r\n            LastName.ToStream(output);\r\n            VCard.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLBotInlineMessageMediaContact : TLBotInlineMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotInlineMessageMediaContact;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString FirstName { get; set; }\r\n\r\n        public TLString LastName { get; set; }\r\n\r\n        public TLUserBase User\r\n        {\r\n            get { return new TLUser { Id = new TLInt(0), Photo = new TLPhotoEmpty { Id = new TLLong(0) }, FirstName = FirstName, LastName = LastName, Phone = PhoneNumber }; }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineMessageMediaContact flags={0} phone_number={1} first_name={2} last_name={3} reply_markup={4}\", BotInlineMessageFlagsString(Flags), PhoneNumber, FirstName, LastName, ReplyMarkup);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            PhoneNumber = GetObject<TLString>(bytes, ref position);\r\n            FirstName = GetObject<TLString>(bytes, ref position);\r\n            LastName = GetObject<TLString>(bytes, ref position);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                PhoneNumber.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            PhoneNumber = GetObject<TLString>(input);\r\n            FirstName = GetObject<TLString>(input);\r\n            LastName = GetObject<TLString>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)BotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            PhoneNumber.ToStream(output);\r\n            FirstName.ToStream(output);\r\n            LastName.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLBotInlineResult.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum BotInlineResultFlags\r\n    {\r\n        //Unread = 0x1,         // 0\r\n        Title = 0x2,            // 1\r\n        Description = 0x4,      // 2\r\n        Url = 0x8,              // 3\r\n        Thumb = 0x10,           // 4\r\n        Content = 0x20,         // 5\r\n        Size = 0x40,            // 6\r\n        Duration = 0x80,        // 7\r\n    }\r\n\r\n    [Flags]\r\n    public enum BotInlineMediaResultFlags\r\n    {\r\n        Photo = 0x1,            // 0\r\n        Document = 0x2,         // 1\r\n        Title = 0x4,            // 2\r\n        Description = 0x8,      // 3\r\n    }\r\n\r\n    public abstract class TLBotInlineResultBase : TLObject\r\n    {\r\n        public TLBotInlineResultBase Self { get { return this; } }\r\n\r\n        public TLString Id { get; set; }\r\n\r\n        public TLString Type { get; set; }\r\n\r\n        public TLBotInlineMessageBase SendMessage { get; set; }\r\n\r\n        public TLLong QueryId { get; set; }\r\n    }\r\n\r\n    public class TLBotInlineMediaResult : TLBotInlineResultBase, IMediaGif\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotInlineMediaResult;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLPhotoBase Photo { get; set; }\r\n\r\n        public TLDocumentBase Document { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Description { get; set; }\r\n\r\n        public TLBotInlineMediaResult ThumbSelf { get { return this; } }\r\n\r\n        private double _downloadingProgress;\r\n\r\n        public double DownloadingProgress\r\n        {\r\n            get { return _downloadingProgress; }\r\n            set { SetField(ref _downloadingProgress, value, () => DownloadingProgress); }\r\n        }\r\n\r\n        public double LastProgress { get; set; }\r\n        public bool IsCanceled { get; set; }\r\n        public string IsoFileName { get; set; }\r\n        public bool? AutoPlayGif { get; set; }\r\n        public bool Forbidden { get; set; }\r\n\r\n        public static string BotInlineMediaResultFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (BotInlineMediaResultFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineMediaResult flags={0} type={2} id={1} photo={3} document={4} title={5} description={6} send_message=[{7}]\", BotInlineMediaResultFlagsString(Flags), Id, Type, Photo != null, Document != null, Title, Description, SendMessage);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLString>(bytes, ref position);\r\n            Type = GetObject<TLString>(bytes, ref position);\r\n            Photo = GetObject<TLPhotoBase>(Flags, (int)BotInlineMediaResultFlags.Photo, null, bytes, ref position);\r\n            Document = GetObject<TLDocumentBase>(Flags, (int)BotInlineMediaResultFlags.Document, null, bytes, ref position);\r\n            Title = GetObject<TLString>(Flags, (int)BotInlineMediaResultFlags.Title, null, bytes, ref position);\r\n            Description = GetObject<TLString>(Flags, (int)BotInlineMediaResultFlags.Description, null, bytes, ref position);\r\n            SendMessage = GetObject<TLBotInlineMessageBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                Type.ToBytes(),\r\n                ToBytes(Photo, Flags, (int)BotInlineMediaResultFlags.Photo),\r\n                ToBytes(Document, Flags, (int)BotInlineMediaResultFlags.Document),\r\n                ToBytes(Title, Flags, (int)BotInlineMediaResultFlags.Title),\r\n                ToBytes(Description, Flags, (int)BotInlineMediaResultFlags.Description),\r\n                SendMessage.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLString>(input);\r\n            Type = GetObject<TLString>(input);\r\n            Photo = GetObject<TLPhotoBase>(Flags, (int)BotInlineMediaResultFlags.Photo, null, input);\r\n            Document = GetObject<TLDocumentBase>(Flags, (int)BotInlineMediaResultFlags.Document, null, input);\r\n            Title = GetObject<TLString>(Flags, (int)BotInlineMediaResultFlags.Title, null, input);\r\n            Description = GetObject<TLString>(Flags, (int)BotInlineMediaResultFlags.Description, null, input);\r\n            SendMessage = GetObject<TLBotInlineMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            Type.ToStream(output);\r\n            ToStream(output, Photo, Flags, (int)BotInlineMediaResultFlags.Photo);\r\n            ToStream(output, Document, Flags, (int)BotInlineMediaResultFlags.Document);\r\n            ToStream(output, Title, Flags, (int)BotInlineMediaResultFlags.Title);\r\n            ToStream(output, Description, Flags, (int)BotInlineMediaResultFlags.Description);\r\n            SendMessage.ToStream(output);\r\n        }\r\n    }\r\n\r\n    //public class TLBotInlineMediaResultDocument : TLBotInlineResultBase, IMediaGif\r\n    //{\r\n    //    public const uint Signature = TLConstructors.TLBotInlineMediaResultDocument;\r\n\r\n    //    public TLDocumentBase Document { get; set; }\r\n\r\n    //    public TLBotInlineMediaResultDocument ThumbSelf { get { return this; } }\r\n\r\n    //    private double _downloadingProgress;\r\n\r\n    //    public double DownloadingProgress\r\n    //    {\r\n    //        get { return _downloadingProgress; }\r\n    //        set { SetField(ref _downloadingProgress, value, () => DownloadingProgress); }\r\n    //    }\r\n\r\n    //    public double LastProgress { get; set; }\r\n    //    public bool IsCanceled { get; set; }\r\n    //    public string IsoFileName { get; set; }\r\n    //    public bool? AutoPlayGif { get; set; }\r\n    //    public bool Forbidden { get; set; }\r\n\r\n    //    public override string ToString()\r\n    //    {\r\n    //        return string.Format(\"TLBotInlineMediaResultDocument id={0} type={1} document={2} send_message={3}\", Id, Type, Document, SendMessage);\r\n    //    }\r\n\r\n    //    public override TLObject FromBytes(byte[] bytes, ref int position)\r\n    //    {\r\n    //        bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n    //        Id = GetObject<TLString>(bytes, ref position);\r\n    //        Type = GetObject<TLString>(bytes, ref position);\r\n    //        Document = GetObject<TLDocumentBase>(bytes, ref position);\r\n    //        SendMessage = GetObject<TLBotInlineMessageBase>(bytes, ref position);\r\n\r\n    //        return this;\r\n    //    }\r\n\r\n    //    public override byte[] ToBytes()\r\n    //    {\r\n    //        return TLUtils.Combine(\r\n    //            TLUtils.SignatureToBytes(Signature),\r\n    //            Id.ToBytes(),\r\n    //            Type.ToBytes(),\r\n    //            Document.ToBytes(),\r\n    //            SendMessage.ToBytes());\r\n    //    }\r\n\r\n    //    public override TLObject FromStream(Stream input)\r\n    //    {\r\n    //        Id = GetObject<TLString>(input);\r\n    //        Type = GetObject<TLString>(input);\r\n    //        Document = GetObject<TLDocumentBase>(input);\r\n    //        SendMessage = GetObject<TLBotInlineMessageBase>(input);\r\n\r\n    //        return this;\r\n    //    }\r\n\r\n    //    public override void ToStream(Stream output)\r\n    //    {\r\n    //        output.Write(TLUtils.SignatureToBytes(Signature));\r\n    //        Id.ToStream(output);\r\n    //        Type.ToStream(output);\r\n    //        Document.ToStream(output);\r\n    //        SendMessage.ToStream(output);\r\n    //    }\r\n    //}\r\n\r\n    public class TLBotInlineMediaResultPhoto : TLBotInlineResultBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotInlineMediaResultPhoto;\r\n\r\n        public TLPhotoBase Photo { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineMediaResultPhoto id={0} type={1} photo={2} send_message={3}\", Id, Type, Photo, SendMessage);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLString>(bytes, ref position);\r\n            Type = GetObject<TLString>(bytes, ref position);\r\n            Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            SendMessage = GetObject<TLBotInlineMessageBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Type.ToBytes(),\r\n                Photo.ToBytes(),\r\n                SendMessage.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLString>(input);\r\n            Type = GetObject<TLString>(input);\r\n            Photo = GetObject<TLPhotoBase>(input);\r\n            SendMessage = GetObject<TLBotInlineMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Type.ToStream(output);\r\n            Photo.ToStream(output);\r\n            SendMessage.ToStream(output);\r\n        }\r\n    }\r\n    \r\n    public class TLBotInlineResult : TLBotInlineResultBase, IMediaGif\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotInlineResult;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Description { get; set; }\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public virtual TLString ThumbUrl { get; protected set; }\r\n\r\n        public string ThumbUrlString { get { return ThumbUrl != null ? ThumbUrl.ToString() : string.Empty; } }\r\n\r\n        public virtual TLString ContentUrl { get; protected set; }\r\n\r\n        public string ContentUrlString { get { return ContentUrl != null ? ContentUrl.ToString() : string.Empty; } }\r\n\r\n        public virtual TLString ContentType { get; protected set; }\r\n\r\n        public virtual TLInt W { get; protected set; }\r\n\r\n        public virtual TLInt H { get; protected set; }\r\n\r\n        public virtual TLInt Duration { get; protected set; }\r\n\r\n        public static string BotInlineResultFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (BotInlineResultFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineResult flags={0} type={2} id={1} title={3} description={4} url={5} thumb_url={6} content_url={7} content_type={8} w={9} h={10} duration={11} send_message=[{12}]\", \r\n                BotInlineResultFlagsString(Flags), Id, Type, Title, Description, Url, ThumbUrl, ContentUrl, ContentType, W, H, Duration, SendMessage);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLString>(bytes, ref position);\r\n            Type = GetObject<TLString>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)BotInlineResultFlags.Title))\r\n            {\r\n                Title = GetObject<TLString>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)BotInlineResultFlags.Description))\r\n            {\r\n                Description = GetObject<TLString>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)BotInlineResultFlags.Url))\r\n            {\r\n                Url = GetObject<TLString>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)BotInlineResultFlags.Thumb))\r\n            {\r\n                ThumbUrl = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            \r\n            if (IsSet(Flags, (int)BotInlineResultFlags.Content))\r\n            {\r\n                ContentUrl = GetObject<TLString>(bytes, ref position);\r\n                ContentType = GetObject<TLString>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)BotInlineResultFlags.Size))\r\n            {\r\n                W = GetObject<TLInt>(bytes, ref position);\r\n                H = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)BotInlineResultFlags.Duration))\r\n            {\r\n                Duration = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            SendMessage = GetObject<TLBotInlineMessageBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                Type.ToBytes(),\r\n                ToBytes(Title, Flags, (int)InputBotInlineResultFlags.Title),\r\n                ToBytes(Description, Flags, (int)InputBotInlineResultFlags.Description),\r\n                ToBytes(Url, Flags, (int)InputBotInlineResultFlags.Url),\r\n                ToBytes(ThumbUrl, Flags, (int)InputBotInlineResultFlags.Thumb),\r\n                ToBytes(ContentUrl, Flags, (int)InputBotInlineResultFlags.Content),\r\n                ToBytes(ContentType, Flags, (int)InputBotInlineResultFlags.Content),\r\n                ToBytes(W, Flags, (int)InputBotInlineResultFlags.Size),\r\n                ToBytes(H, Flags, (int)InputBotInlineResultFlags.Size),\r\n                ToBytes(Duration, Flags, (int)InputBotInlineResultFlags.Duration),\r\n                SendMessage.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLString>(input);\r\n            Type = GetObject<TLString>(input);\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Title))\r\n            {\r\n                Title = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Description))\r\n            {\r\n                Description = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Url))\r\n            {\r\n                Url = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Thumb))\r\n            {\r\n                ThumbUrl = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Content))\r\n            {\r\n                ContentUrl = GetObject<TLString>(input);\r\n                ContentType = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Size))\r\n            {\r\n                W = GetObject<TLInt>(input);\r\n                H = GetObject<TLInt>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Duration))\r\n            {\r\n                Duration = GetObject<TLInt>(input);\r\n            }\r\n            SendMessage = GetObject<TLBotInlineMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            Type.ToStream(output);\r\n            ToStream(output, Title, Flags, (int)InputBotInlineResultFlags.Title);\r\n            ToStream(output, Description, Flags, (int)InputBotInlineResultFlags.Description);\r\n            ToStream(output, Url, Flags, (int)InputBotInlineResultFlags.Url);\r\n            ToStream(output, ThumbUrl, Flags, (int)InputBotInlineResultFlags.Thumb);\r\n            ToStream(output, ContentUrl, Flags, (int)InputBotInlineResultFlags.Content);\r\n            ToStream(output, ContentType, Flags, (int)InputBotInlineResultFlags.Content);\r\n            ToStream(output, W, Flags, (int)InputBotInlineResultFlags.Size);\r\n            ToStream(output, H, Flags, (int)InputBotInlineResultFlags.Size);\r\n            ToStream(output, Duration, Flags, (int)InputBotInlineResultFlags.Duration);\r\n            SendMessage.ToStream(output);\r\n        }\r\n\r\n        public TLBotInlineResult ThumbSelf { get { return this; } }\r\n\r\n        #region IGifMedia\r\n\r\n        private TLDocumentBase _document;\r\n\r\n        public TLDocumentBase Document\r\n        {\r\n            get\r\n            {\r\n                if (_document != null) return _document;\r\n\r\n                if (TLString.Equals(Type, new TLString(\"gif\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    var document = new TLDocumentExternal();\r\n                    document.Id = TLLong.Random();\r\n                    document.ResultId = Id;\r\n                    document.Type = Type;\r\n                    document.Url = Url ?? TLString.Empty;\r\n                    document.ThumbUrl = ThumbUrl ?? TLString.Empty;\r\n                    document.ContentUrl = ContentUrl ?? TLString.Empty;\r\n                    document.ContentType = ContentType ?? TLString.Empty;\r\n                    document.Attributes = new TLVector<TLDocumentAttributeBase>{ new TLDocumentAttributeAnimated() };\r\n                    if (W != null && H != null && W.Value > 0 && H.Value > 0)\r\n                    {\r\n                        var duration = Duration ?? new TLInt(0);\r\n\r\n                        var videoAttribute = new TLDocumentAttributeVideo66 { Flags = new TLInt(0), W = W, H = H, Duration = duration };\r\n                        document.Attributes.Add(videoAttribute);\r\n                    }\r\n\r\n                    _document = document;\r\n                }\r\n                else if (TLString.Equals(Type, new TLString(\"photo\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    \r\n                }\r\n\r\n                return _document;\r\n            }\r\n        }\r\n\r\n        private double _downloadingProgress;\r\n\r\n        public double DownloadingProgress\r\n        {\r\n            get { return _downloadingProgress; }\r\n            set { SetField(ref _downloadingProgress, value, () => DownloadingProgress); }\r\n        }\r\n\r\n        public double LastProgress { get; set; }\r\n\r\n        public bool IsCanceled { get; set; }\r\n        \r\n        public string IsoFileName { get; set; }\r\n        \r\n        public bool? AutoPlayGif { get; set; }\r\n\r\n        public bool Forbidden { get; set; }\r\n        #endregion\r\n    }\r\n\r\n\r\n    public class TLBotInlineResult76 : TLBotInlineResult\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotInlineResult76;\r\n\r\n        public TLWebDocumentBase Thumb { get; set; }\r\n\r\n        public override TLString ThumbUrl\r\n        {\r\n            get { return Thumb != null ? Thumb.Url : null; }\r\n        }\r\n\r\n        public TLWebDocumentBase Content { get; set; }\r\n\r\n        public override TLString ContentUrl\r\n        {\r\n            get { return Content != null ? Content.Url : null; }\r\n        }\r\n\r\n        public override TLString ContentType\r\n        {\r\n            get { return Content != null ? Content.MimeType : null; }\r\n        }\r\n\r\n        public override TLInt W\r\n        {\r\n            get { return Content != null ? Content.W : null; }\r\n        }\r\n\r\n        public override TLInt H\r\n        {\r\n            get { return Content != null ? Content.H : null; }\r\n        }\r\n\r\n        public override TLInt Duration\r\n        {\r\n            get { return Content != null ? Content.Duration : null; }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLBotInlineResult76 flags={0} type={2} id={1} title={3} description={4} url={5} thumb_url={6} content_url={7} content_type={8} w={9} h={10} duration={11} send_message=[{12}]\",\r\n                BotInlineResultFlagsString(Flags), Id, Type, Title, Description, Url, ThumbUrl, ContentUrl, ContentType, W, H, Duration, SendMessage);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLString>(bytes, ref position);\r\n            Type = GetObject<TLString>(bytes, ref position);\r\n            Title = GetObject<TLString>(Flags, (int)BotInlineResultFlags.Title, null, bytes, ref position);\r\n            Description = GetObject<TLString>(Flags, (int)BotInlineResultFlags.Description, null, bytes, ref position);\r\n            Url = GetObject<TLString>(Flags, (int)BotInlineResultFlags.Url, null, bytes, ref position);\r\n            Thumb = GetObject<TLWebDocumentBase>(Flags, (int)BotInlineResultFlags.Thumb, null, bytes, ref position);\r\n            Content = GetObject<TLWebDocumentBase>(Flags, (int)BotInlineResultFlags.Content, null, bytes, ref position);\r\n            SendMessage = GetObject<TLBotInlineMessageBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                Type.ToBytes(),\r\n                ToBytes(Title, Flags, (int)BotInlineResultFlags.Title),\r\n                ToBytes(Description, Flags, (int)BotInlineResultFlags.Description),\r\n                ToBytes(Url, Flags, (int)BotInlineResultFlags.Url),\r\n                ToBytes(Thumb, Flags, (int)BotInlineResultFlags.Thumb),\r\n                ToBytes(Content, Flags, (int)BotInlineResultFlags.Content),\r\n                SendMessage.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLString>(input);\r\n            Type = GetObject<TLString>(input);\r\n            Title = GetObject<TLString>(Flags, (int)BotInlineResultFlags.Title, null, input);\r\n            Description = GetObject<TLString>(Flags, (int)BotInlineResultFlags.Description, null, input);\r\n            Url = GetObject<TLString>(Flags, (int)BotInlineResultFlags.Url, null, input);\r\n            Thumb = GetObject<TLWebDocumentBase>(Flags, (int)BotInlineResultFlags.Thumb, null, input);\r\n            Content = GetObject<TLWebDocumentBase>(Flags, (int)BotInlineResultFlags.Content, null, input);\r\n            SendMessage = GetObject<TLBotInlineMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            Type.ToStream(output);\r\n            ToStream(output, Title, Flags, (int)BotInlineResultFlags.Title);\r\n            ToStream(output, Description, Flags, (int)BotInlineResultFlags.Description);\r\n            ToStream(output, Url, Flags, (int)BotInlineResultFlags.Url);\r\n            ToStream(output, Thumb, Flags, (int)BotInlineResultFlags.Thumb);\r\n            ToStream(output, Content, Flags, (int)BotInlineResultFlags.Content);\r\n            SendMessage.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLBotResults.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum BotResultsFlags\r\n    {\r\n        Gallery = 0x1,          // 0\r\n        NextOffset = 0x2,       // 1\r\n        SwitchPM = 0x4,         // 2\r\n    }\r\n\r\n    public class TLBotResults72 : TLBotResults58\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotResults72;\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            NextOffset = GetObject<TLString>(Flags, (int)BotResultsFlags.NextOffset, null, bytes, ref position);\r\n            SwitchPM = GetObject<TLInlineBotSwitchPM>(Flags, (int)BotResultsFlags.SwitchPM, null, bytes, ref position);\r\n            Results = GetObject<TLVector<TLBotInlineResultBase>>(bytes, ref position);\r\n            CacheTime = GetObject<TLInt>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                QueryId.ToBytes(),\r\n                ToBytes(NextOffset, Flags, (int)BotResultsFlags.NextOffset),\r\n                ToBytes(SwitchPM, Flags, (int)BotResultsFlags.SwitchPM),\r\n                Results.ToBytes(),\r\n                CacheTime.ToBytes(),\r\n                Users.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            QueryId = GetObject<TLLong>(input);\r\n            NextOffset = GetObject<TLString>(Flags, (int)BotResultsFlags.NextOffset, null, input);\r\n            SwitchPM = GetObject<TLInlineBotSwitchPM>(Flags, (int)BotResultsFlags.SwitchPM, null, input);\r\n            Results = GetObject<TLVector<TLBotInlineResultBase>>(input);\r\n            CacheTime = GetObject<TLInt>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            QueryId.ToStream(output);\r\n            ToStream(output, NextOffset, Flags, (int)BotResultsFlags.NextOffset);\r\n            ToStream(output, SwitchPM, Flags, (int)BotResultsFlags.SwitchPM);\r\n            Results.ToStream(output);\r\n            CacheTime.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLBotResults58 : TLBotResults51, ICachedObject\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotResults58;\r\n\r\n        public TLInt CacheTime { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            NextOffset = GetObject<TLString>(Flags, (int)BotResultsFlags.NextOffset, null, bytes, ref position);\r\n            SwitchPM = GetObject<TLInlineBotSwitchPM>(Flags, (int)BotResultsFlags.SwitchPM, null, bytes, ref position);\r\n            Results = GetObject<TLVector<TLBotInlineResultBase>>(bytes, ref position);\r\n            CacheTime = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                QueryId.ToBytes(),\r\n                ToBytes(NextOffset, Flags, (int)BotResultsFlags.NextOffset),\r\n                ToBytes(SwitchPM, Flags, (int)BotResultsFlags.SwitchPM),\r\n                Results.ToBytes(),\r\n                CacheTime.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            QueryId = GetObject<TLLong>(input);\r\n            NextOffset = GetObject<TLString>(Flags, (int)BotResultsFlags.NextOffset, null, input);\r\n            SwitchPM = GetObject<TLInlineBotSwitchPM>(Flags, (int)BotResultsFlags.SwitchPM, null, input);\r\n            Results = GetObject<TLVector<TLBotInlineResultBase>>(input);\r\n            CacheTime = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            QueryId.ToStream(output);\r\n            ToStream(output, NextOffset, Flags, (int)BotResultsFlags.NextOffset);\r\n            ToStream(output, SwitchPM, Flags, (int)BotResultsFlags.SwitchPM);\r\n            Results.ToStream(output);\r\n            CacheTime.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLBotResults51 : TLBotResults\r\n    {\r\n        public new const uint Signature = TLConstructors.TLBotResults51;\r\n\r\n        public TLInlineBotSwitchPM SwitchPM { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            NextOffset = GetObject<TLString>(Flags, (int)BotResultsFlags.NextOffset, null, bytes, ref position);\r\n            SwitchPM = GetObject<TLInlineBotSwitchPM>(Flags, (int)BotResultsFlags.SwitchPM, null, bytes, ref position);\r\n            Results = GetObject<TLVector<TLBotInlineResultBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                QueryId.ToBytes(),\r\n                ToBytes(NextOffset, Flags, (int)BotResultsFlags.NextOffset),\r\n                ToBytes(SwitchPM, Flags, (int)BotResultsFlags.SwitchPM),\r\n                Results.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            QueryId = GetObject<TLLong>(input);\r\n            NextOffset = GetObject<TLString>(Flags, (int)BotResultsFlags.NextOffset, null, input);\r\n            SwitchPM = GetObject<TLInlineBotSwitchPM>(Flags, (int)BotResultsFlags.SwitchPM, null, input);\r\n            Results = GetObject<TLVector<TLBotInlineResultBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            QueryId.ToStream(output);\r\n            ToStream(output, NextOffset, Flags, (int)BotResultsFlags.NextOffset);\r\n            ToStream(output, SwitchPM, Flags, (int)BotResultsFlags.SwitchPM);\r\n            Results.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLBotResults : TLBotInlineResultBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLBotResults;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public bool Gallery { get { return IsSet(Flags, (int)BotResultsFlags.Gallery); } }\r\n\r\n        public TLString NextOffset { get; set; }\r\n\r\n        public TLVector<TLBotInlineResultBase> Results { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            NextOffset = GetObject<TLString>(Flags, (int) BotResultsFlags.NextOffset, null, bytes, ref position);\r\n            Results = GetObject<TLVector<TLBotInlineResultBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                QueryId.ToBytes(),\r\n                ToBytes(NextOffset, Flags, (int)BotResultsFlags.NextOffset),\r\n                Results.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            QueryId = GetObject<TLLong>(input);\r\n            NextOffset = GetObject<TLString>(Flags, (int)BotResultsFlags.NextOffset, null, input);\r\n            Results = GetObject<TLVector<TLBotInlineResultBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            QueryId.ToStream(output);\r\n            ToStream(output, NextOffset, Flags, (int)BotResultsFlags.NextOffset);\r\n            Results.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLCallsSecurity.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum CallsSecurityFlags\r\n    {\r\n        PeerToPeer = 0x1,\r\n\r\n        PeerToPeerEverybody = 0x4,\r\n        PeerToPeerContacts = 0x8,\r\n        PeetToPeerNobody = 0x10\r\n    }\r\n\r\n    public class TLCallsSecurity : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLCallsSecurity;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool PeerToPeer\r\n        {\r\n            get { return IsSet(Flags, (int) CallsSecurityFlags.PeerToPeer); }\r\n            set { SetUnset(ref _flags, value, (int) CallsSecurityFlags.PeerToPeer); }\r\n        }\r\n\r\n        public bool PeerToPeerEverybody\r\n        {\r\n            get { return IsSet(Flags, (int)CallsSecurityFlags.PeerToPeerEverybody); }\r\n            set { SetUnset(ref _flags, value, (int)CallsSecurityFlags.PeerToPeerEverybody); }\r\n        }\r\n\r\n        public bool PeerToPeerContacts\r\n        {\r\n            get { return IsSet(Flags, (int)CallsSecurityFlags.PeerToPeerContacts); }\r\n            set { SetUnset(ref _flags, value, (int)CallsSecurityFlags.PeerToPeerContacts); }\r\n        }\r\n\r\n        public bool PeerToPeerNobody\r\n        {\r\n            get { return IsSet(Flags, (int)CallsSecurityFlags.PeetToPeerNobody); }\r\n            set { SetUnset(ref _flags, value, (int)CallsSecurityFlags.PeetToPeerNobody); }\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n        }\r\n\r\n        public void Update(bool defaultP2PContacts)\r\n        {\r\n            var updated = PeerToPeerEverybody || PeerToPeerContacts || PeerToPeerNobody;\r\n\r\n            if (!updated)\r\n            {\r\n                if (PeerToPeer)\r\n                {\r\n                    PeerToPeerEverybody = false;\r\n                    PeerToPeerContacts = defaultP2PContacts;\r\n                    PeerToPeerNobody = !defaultP2PContacts;\r\n                }\r\n                else\r\n                {\r\n                    PeerToPeerEverybody = false;\r\n                    PeerToPeerContacts = false;\r\n                    PeerToPeerNobody = true;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLCameraSettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum CameraSettingsFlags\r\n    {\r\n        External = 0x1,        // 0\r\n    }\r\n\r\n    public class TLCameraSettings : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLCameraSettings;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool External\r\n        {\r\n            get { return IsSet(Flags, (int) CameraSettingsFlags.External); }\r\n            set { SetUnset(ref _flags, value, (int) CameraSettingsFlags.External); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLCdnConfig.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLCdnConfig : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLCdnConfig;\r\n\r\n        public TLVector<TLCdnPublicKey> PublicKeys { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PublicKeys = GetObject<TLVector<TLCdnPublicKey>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PublicKeys = GetObject<TLVector<TLCdnPublicKey>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PublicKeys.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLCdnFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLCdnFileBase : TLObject { }\r\n\r\n    public class TLCdnFile : TLCdnFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLCdnFile;\r\n\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Bytes = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLCdnFileReuploadNeeded : TLCdnFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLCdnFileReuploadNeeded;\r\n\r\n        public TLString RequestToken { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            RequestToken = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLCdnPublicKey.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public enum CdnPublicKeyCustomFlags\r\n    {\r\n        PublicKeyFingerprint = 0x1\r\n    }\r\n\r\n    public class TLCdnPublicKey : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLCdnPublicKey;\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public TLString PublicKey { get; set; }\r\n\r\n        #region Additional\r\n\r\n        private TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        private TLLong _publicKeyFingerprint;\r\n\r\n        public TLLong PublicKeyFingerprint\r\n        {\r\n            get { return _publicKeyFingerprint; }\r\n            set { SetField(out _publicKeyFingerprint, value, ref _customFlags, (int) CdnPublicKeyCustomFlags.PublicKeyFingerprint); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            PublicKey = GetObject<TLString>(bytes, ref position);\r\n\r\n            CustomFlags = new TLLong(0);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            DCId = GetObject<TLInt>(input);\r\n            PublicKey = GetObject<TLString>(input);\r\n            CustomFlags = GetObject<TLLong>(input);\r\n            _publicKeyFingerprint = GetObject<TLLong>(CustomFlags, (int) CdnPublicKeyCustomFlags.PublicKeyFingerprint, null, input);\r\n\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            DCId.ToStream(output);\r\n            PublicKey.ToStream(output);\r\n            CustomFlags.ToStream(output);\r\n            ToStream(output, _publicKeyFingerprint, CustomFlags, (int)CdnPublicKeyCustomFlags.PublicKeyFingerprint);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChannelAdminLogEvent.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLChannelAdminLogEvent : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEvent;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLChannelAdminLogEventActionBase Action { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Action = GetObject<TLChannelAdminLogEventActionBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Action = GetObject<TLChannelAdminLogEventActionBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Date.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Action.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChannelAdminLogEventAction.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLChannelAdminLogEventActionBase : TLObject { }\r\n\r\n    public class TLChannelAdminLogEventActionChangeTitle : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionChangeTitle;\r\n\r\n        public TLString PrevValue { get; set; }\r\n\r\n        public TLString NewValue { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PrevValue = GetObject<TLString>(bytes, ref position);\r\n            NewValue = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PrevValue = GetObject<TLString>(input);\r\n            NewValue = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PrevValue.ToStream(output);\r\n            NewValue.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionChangeAbout : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionChangeAbout;\r\n\r\n        public TLString PrevValue { get; set; }\r\n\r\n        public TLString NewValue { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PrevValue = GetObject<TLString>(bytes, ref position);\r\n            NewValue = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PrevValue = GetObject<TLString>(input);\r\n            NewValue = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PrevValue.ToStream(output);\r\n            NewValue.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionChangeUsername : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionChangeUsername;\r\n\r\n        public TLString PrevValue { get; set; }\r\n\r\n        public TLString NewValue { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PrevValue = GetObject<TLString>(bytes, ref position);\r\n            NewValue = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PrevValue = GetObject<TLString>(input);\r\n            NewValue = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PrevValue.ToStream(output);\r\n            NewValue.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionChangePhoto : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionChangePhoto;\r\n\r\n        public TLPhotoBase PrevPhoto { get; set; }\r\n\r\n        public TLPhotoBase NewPhoto { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PrevPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NewPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PrevPhoto = GetObject<TLPhotoBase>(input);\r\n            NewPhoto = GetObject<TLPhotoBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PrevPhoto.ToStream(output);\r\n            NewPhoto.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionToggleInvites : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionToggleInvites;\r\n\r\n        public TLBool NewValue { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            NewValue = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            NewValue = GetObject<TLBool>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            NewValue.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionToggleSignatures : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionToggleSignatures;\r\n\r\n        public TLBool NewValue { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            NewValue = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            NewValue = GetObject<TLBool>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            NewValue.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionUpdatePinned : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionUpdatePinned;\r\n\r\n        public TLMessageBase Message { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLMessageBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Message = GetObject<TLMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Message.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionEditMessage : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionEditMessage;\r\n\r\n        public TLMessageBase PrevMessage { get; set; }\r\n\r\n        public TLMessageBase NewMessage { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PrevMessage = GetObject<TLMessageBase>(bytes, ref position);\r\n            NewMessage = GetObject<TLMessageBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PrevMessage = GetObject<TLMessageBase>(input);\r\n            NewMessage = GetObject<TLMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PrevMessage.ToStream(output);\r\n            NewMessage.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionDeleteMessage : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionDeleteMessage;\r\n\r\n        public TLMessageBase Message { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLMessageBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Message = GetObject<TLMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Message.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionParticipantJoin : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionParticipantJoin;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionParticipantLeave : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionParticipantLeave;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionParticipantInvite : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionParticipantInvite;\r\n\r\n        public TLChannelParticipantBase Participant { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Participant = GetObject<TLChannelParticipantBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Participant = GetObject<TLChannelParticipantBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Participant.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionParticipantToggleBan : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionParticipantToggleBan;\r\n\r\n        public TLChannelParticipantBase PrevParticipant { get; set; }\r\n\r\n        public TLChannelParticipantBase NewParticipant { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PrevParticipant = GetObject<TLChannelParticipantBase>(bytes, ref position);\r\n            NewParticipant = GetObject<TLChannelParticipantBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PrevParticipant = GetObject<TLChannelParticipantBase>(input);\r\n            NewParticipant = GetObject<TLChannelParticipantBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PrevParticipant.ToStream(output);\r\n            NewParticipant.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionParticipantToggleAdmin : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionParticipantToggleAdmin;\r\n\r\n        public TLChannelParticipantBase PrevParticipant { get; set; }\r\n\r\n        public TLChannelParticipantBase NewParticipant { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PrevParticipant = GetObject<TLChannelParticipantBase>(bytes, ref position);\r\n            NewParticipant = GetObject<TLChannelParticipantBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PrevParticipant = GetObject<TLChannelParticipantBase>(input);\r\n            NewParticipant = GetObject<TLChannelParticipantBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PrevParticipant.ToStream(output);\r\n            NewParticipant.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionChangeStickerSet : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionChangeStickerSet;\r\n\r\n        public TLInputStickerSetBase PrevStickerSet { get; set; }\r\n\r\n        public TLInputStickerSetBase NewStickerSet { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PrevStickerSet = GetObject<TLInputStickerSetBase>(bytes, ref position);\r\n            NewStickerSet = GetObject<TLInputStickerSetBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PrevStickerSet = GetObject<TLInputStickerSetBase>(input);\r\n            NewStickerSet = GetObject<TLInputStickerSetBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PrevStickerSet.ToStream(output);\r\n            NewStickerSet.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelAdminLogEventActionTogglePreHistoryHidden : TLChannelAdminLogEventActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventActionTogglePreHistoryHidden;\r\n\r\n        public TLBool NewValue { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            NewValue = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            NewValue = GetObject<TLBool>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            NewValue.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChannelAdminLogEventsFilter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ChannelAdminLogEventsFilterFlags\r\n    {\r\n        Join = 0x1,\r\n        Leave = 0x2,\r\n        Invite = 0x4,\r\n        Ban = 0x8,\r\n        Unban = 0x10,\r\n        Kick = 0x20,\r\n        Unkick = 0x40,\r\n        Promote = 0x80,\r\n        Demote = 0x100,\r\n        Info = 0x200,\r\n        Settings = 0x400,\r\n        Pinned = 0x800,\r\n        Edit = 0x1000,\r\n        Delete = 0x2000,\r\n    }\r\n\r\n    public class TLChannelAdminLogEventsFilter : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminLogEventsFilter;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Join\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Join); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Join); }\r\n        }\r\n\r\n        public bool Leave\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Leave); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Leave); }\r\n        }\r\n\r\n        public bool Invite\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Invite); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Invite); }\r\n        }\r\n\r\n        public bool Ban\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Ban); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Ban); }\r\n        }\r\n\r\n        public bool Unban\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Unban); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Unban); }\r\n        }\r\n\r\n        public bool Kick\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Kick); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Kick); }\r\n        }\r\n\r\n        public bool Unkick\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Unkick); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Unkick); }\r\n        }\r\n\r\n        public bool Promote\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Promote); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Promote); }\r\n        }\r\n\r\n        public bool Demote\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Demote); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Demote); }\r\n        }\r\n\r\n        public bool Info\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Info); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Info); }\r\n        }\r\n\r\n        public bool Settings\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Settings); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Settings); }\r\n        }\r\n\r\n        public bool Pinned\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Pinned); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Pinned); }\r\n        }\r\n\r\n        public bool Edit\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Edit); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Edit); }\r\n        }\r\n\r\n        public bool Delete\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminLogEventsFilterFlags.Delete); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminLogEventsFilterFlags.Delete); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChannelAdminRights.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ChannelAdminRightsFlags\r\n    {\r\n        ChannelInfo = 0x1,\r\n        PostMessages = 0x2,\r\n        EditMessages = 0x4,\r\n        DeleteMessages = 0x8,\r\n        BanUsers = 0x10,\r\n        InviteUsers = 0x20,\r\n        InviteLinks = 0x40,\r\n        PinMessages = 0x80,\r\n\r\n        AddAdmins = 0x200,\r\n    }\r\n\r\n    public class TLChannelAdminRights : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelAdminRights;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool ChannelInfo\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminRightsFlags.ChannelInfo); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminRightsFlags.ChannelInfo); }\r\n        }\r\n\r\n        public bool PostMessages\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminRightsFlags.PostMessages); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminRightsFlags.PostMessages); }\r\n        }\r\n\r\n        public bool EditMessages\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminRightsFlags.EditMessages); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminRightsFlags.EditMessages); }\r\n        }\r\n\r\n        public bool DeleteMessages\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminRightsFlags.DeleteMessages); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminRightsFlags.DeleteMessages); }\r\n        }\r\n\r\n        public bool BanUsers\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminRightsFlags.BanUsers); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminRightsFlags.BanUsers); }\r\n        }\r\n\r\n        public bool InviteUsers\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminRightsFlags.InviteUsers); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminRightsFlags.InviteUsers); }\r\n        }\r\n\r\n        public bool InviteLinks\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminRightsFlags.InviteLinks); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminRightsFlags.InviteLinks); }\r\n        }\r\n\r\n        public bool PinMessages\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminRightsFlags.PinMessages); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminRightsFlags.PinMessages); }\r\n        }\r\n\r\n        public bool AddAdmins\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelAdminRightsFlags.AddAdmins); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelAdminRightsFlags.AddAdmins); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChannelBannedRights.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ChannelBannedRightsFlags\r\n    {\r\n        ViewMessages = 0x1,\r\n        SendMessages = 0x2,\r\n        SendMedia = 0x4,\r\n        SendStickers = 0x8,\r\n        SendGifs = 0x10,\r\n        SendGames = 0x20,\r\n        SendInline = 0x40,\r\n        EmbedLinks = 0x80,\r\n    }\r\n\r\n    public class TLChannelBannedRights : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelBannedRights;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt UntilDate { get; set; }\r\n\r\n        public bool ViewMessages\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelBannedRightsFlags.ViewMessages); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelBannedRightsFlags.ViewMessages); }\r\n        }\r\n\r\n        public bool SendMessages\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelBannedRightsFlags.SendMessages); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelBannedRightsFlags.SendMessages); }\r\n        }\r\n\r\n        public bool SendMedia\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelBannedRightsFlags.SendMedia); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelBannedRightsFlags.SendMedia); }\r\n        }\r\n\r\n        public bool SendStickers\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelBannedRightsFlags.SendStickers); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelBannedRightsFlags.SendStickers); }\r\n        }\r\n\r\n        public bool SendGifs\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelBannedRightsFlags.SendGifs); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelBannedRightsFlags.SendGifs); }\r\n        }\r\n\r\n        public bool SendGames\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelBannedRightsFlags.SendGames); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelBannedRightsFlags.SendGames); }\r\n        }\r\n\r\n        public bool SendInline\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelBannedRightsFlags.SendInline); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelBannedRightsFlags.SendInline); }\r\n        }\r\n\r\n        public bool EmbedLinks\r\n        {\r\n            get { return IsSet(_flags, (int)ChannelBannedRightsFlags.EmbedLinks); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelBannedRightsFlags.EmbedLinks); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            UntilDate = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            UntilDate = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            UntilDate.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChannelDifference.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ChannelDifferenceFlags\r\n    {\r\n        Final = 0x1,\r\n        Timeout = 0x2\r\n    }\r\n\r\n    public abstract class TLChannelDifferenceBase : TLObject\r\n    {\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        protected TLInt _timeout;\r\n\r\n        public TLInt Timeout\r\n        {\r\n            get { return _timeout; }\r\n            set { SetField(out _timeout, value, ref _flags, (int) ChannelDifferenceFlags.Timeout); }\r\n        }\r\n    }\r\n\r\n    public class TLChannelDifferenceEmpty : TLChannelDifferenceBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelDifferenceEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            _timeout = GetObject<TLInt>(Flags, (int) ChannelDifferenceFlags.Timeout, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Pts.ToStream(output);\r\n            ToStream(output, Timeout, Flags, (int) ChannelDifferenceFlags.Timeout);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            _timeout = GetObject<TLInt>(Flags, (int)ChannelDifferenceFlags.Timeout, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLChannelDifferenceEmpty flags={0} pts={1} timeout={2}\", Flags, Pts, Timeout);\r\n        }\r\n    }\r\n\r\n    public class TLChannelDifferenceTooLong : TLChannelDifferenceBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelDifferenceTooLong;\r\n\r\n        public TLInt TopMessage { get; set; }\r\n\r\n        public TLInt TopImportantMessage { get; set; }\r\n\r\n        public TLInt ReadInboxMaxId { get; set; }\r\n\r\n        public TLInt UnreadCount { get; set; }\r\n\r\n        public TLInt UnreadMentionsCount { get; set; }\r\n\r\n        public TLVector<TLMessageBase> Messages { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            _timeout = GetObject<TLInt>(Flags, (int)ChannelDifferenceFlags.Timeout, null, bytes, ref position);\r\n            TopMessage = GetObject<TLInt>(bytes, ref position);\r\n            TopImportantMessage = GetObject<TLInt>(bytes, ref position);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadMentionsCount = GetObject<TLInt>(bytes, ref position);\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Pts.ToStream(output);\r\n            ToStream(output, Timeout, Flags, (int)ChannelDifferenceFlags.Timeout);\r\n            TopMessage.ToStream(output);\r\n            TopImportantMessage.ToStream(output);\r\n            ReadInboxMaxId.ToStream(output);\r\n            UnreadCount.ToStream(output);\r\n            UnreadMentionsCount.ToStream(output);\r\n            Messages.ToStream(output);\r\n            Chats.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            _timeout = GetObject<TLInt>(Flags, (int)ChannelDifferenceFlags.Timeout, null, input);\r\n            TopMessage = GetObject<TLInt>(input);\r\n            TopImportantMessage = GetObject<TLInt>(input);\r\n            ReadInboxMaxId = GetObject<TLInt>(input);\r\n            UnreadCount = GetObject<TLInt>(input);\r\n            UnreadMentionsCount = GetObject<TLInt>(input);\r\n            Messages = GetObject<TLVector<TLMessageBase>>(input);\r\n            Chats = GetObject<TLVector<TLChatBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLChannelDifferenceTooLong flags={0} pts={1} timeout={2} new_messages={3}\", Flags, Pts, Timeout, Messages.Count);\r\n        }\r\n    }\r\n\r\n    public class TLChannelDifferenceTooLong53 : TLChannelDifferenceTooLong\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelDifferenceTooLong53;\r\n\r\n        public TLInt ReadOutboxMaxId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            _timeout = GetObject<TLInt>(Flags, (int)ChannelDifferenceFlags.Timeout, null, bytes, ref position);\r\n            TopMessage = GetObject<TLInt>(bytes, ref position);\r\n            TopImportantMessage = new TLInt(0);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            ReadOutboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadMentionsCount = new TLInt(0);\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Pts.ToStream(output);\r\n            ToStream(output, Timeout, Flags, (int)ChannelDifferenceFlags.Timeout);\r\n            TopMessage.ToStream(output);\r\n            ReadInboxMaxId.ToStream(output);\r\n            ReadOutboxMaxId.ToStream(output);\r\n            UnreadCount.ToStream(output);\r\n            Messages.ToStream(output);\r\n            Chats.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            _timeout = GetObject<TLInt>(Flags, (int)ChannelDifferenceFlags.Timeout, null, input);\r\n            TopMessage = GetObject<TLInt>(input);\r\n            TopImportantMessage = new TLInt(0);\r\n            ReadInboxMaxId = GetObject<TLInt>(input);\r\n            ReadOutboxMaxId = GetObject<TLInt>(input);\r\n            UnreadCount = GetObject<TLInt>(input);\r\n            UnreadMentionsCount = new TLInt(0);\r\n            Messages = GetObject<TLVector<TLMessageBase>>(input);\r\n            Chats = GetObject<TLVector<TLChatBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLChannelDifferenceTooLong53 flags={0} pts={1} timeout={2} new_messages={3}\", Flags, Pts, Timeout, Messages.Count);\r\n        }\r\n    }\r\n\r\n    public class TLChannelDifferenceTooLong71 : TLChannelDifferenceTooLong53\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelDifferenceTooLong71;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            _timeout = GetObject<TLInt>(Flags, (int)ChannelDifferenceFlags.Timeout, null, bytes, ref position);\r\n            TopMessage = GetObject<TLInt>(bytes, ref position);\r\n            TopImportantMessage = new TLInt(0);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            ReadOutboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadMentionsCount = GetObject<TLInt>(bytes, ref position);\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Pts.ToStream(output);\r\n            ToStream(output, Timeout, Flags, (int)ChannelDifferenceFlags.Timeout);\r\n            TopMessage.ToStream(output);\r\n            ReadInboxMaxId.ToStream(output);\r\n            ReadOutboxMaxId.ToStream(output);\r\n            UnreadCount.ToStream(output);\r\n            UnreadMentionsCount.ToStream(output);\r\n            Messages.ToStream(output);\r\n            Chats.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            _timeout = GetObject<TLInt>(Flags, (int)ChannelDifferenceFlags.Timeout, null, input);\r\n            TopMessage = GetObject<TLInt>(input);\r\n            TopImportantMessage = new TLInt(0);\r\n            ReadInboxMaxId = GetObject<TLInt>(input);\r\n            ReadOutboxMaxId = GetObject<TLInt>(input);\r\n            UnreadCount = GetObject<TLInt>(input);\r\n            UnreadMentionsCount = GetObject<TLInt>(input);\r\n            Messages = GetObject<TLVector<TLMessageBase>>(input);\r\n            Chats = GetObject<TLVector<TLChatBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLChannelDifferenceTooLong71 flags={0} pts={1} timeout={2} new_messages={3}\", Flags, Pts, Timeout, Messages.Count);\r\n        }\r\n    }\r\n\r\n    public class TLChannelDifference : TLChannelDifferenceBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelDifference;\r\n\r\n        public TLVector<TLMessageBase> NewMessages { get; set; }\r\n\r\n        public TLVector<TLUpdateBase> OtherUpdates { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; } \r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            _timeout = GetObject<TLInt>(Flags, (int)ChannelDifferenceFlags.Timeout, null, bytes, ref position);\r\n            NewMessages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            OtherUpdates = GetObject<TLVector<TLUpdateBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Pts.ToStream(output);\r\n            ToStream(output, Timeout, Flags, (int)ChannelDifferenceFlags.Timeout);\r\n            NewMessages.ToStream(output);\r\n            OtherUpdates.ToStream(output);\r\n            Chats.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            _timeout = GetObject<TLInt>(Flags, (int)ChannelDifferenceFlags.Timeout, null, input);\r\n            NewMessages = GetObject<TLVector<TLMessageBase>>(input);\r\n            OtherUpdates = GetObject<TLVector<TLUpdateBase>>(input);\r\n            Chats = GetObject<TLVector<TLChatBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLChannelDifference flags={0} pts={1} timeout={2} new_messages={3} other_updates={4}\", Flags, Pts, Timeout, NewMessages.Count, OtherUpdates.Count);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChannelMessagesFiler.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLChannelMessagesFilerBase : TLObject { }\r\n\r\n    public class TLChannelMessagesFilterEmpty : TLChannelMessagesFilerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelMessagesFilterEmpty;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChannelMessagesFilter : TLChannelMessagesFilerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelMessagesFilter;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLVector<TLMessageRange> Ranges { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Ranges.ToBytes()\r\n            );\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Ranges.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Ranges = GetObject<TLVector<TLMessageRange>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChannelMessagesFilterCollapsed : TLChannelMessagesFilerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelMessagesFilterCollapsed;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChannelParticipant.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public enum ChannelParticipantBannedFlags\r\n    {\r\n        Left = 0x1\r\n    }\r\n\r\n    public enum ChannelParticipantAdminFlags\r\n    {\r\n        CanEdit = 0x1\r\n    }\r\n\r\n    public interface IChannelInviter\r\n    {\r\n        TLInt InviterId { get; set; }\r\n\r\n        TLInt Date { get; set; }\r\n    }\r\n\r\n    public abstract class TLChannelParticipantBase : TLObject\r\n    {\r\n        public TLInt UserId { get; set; }\r\n    }\r\n\r\n    public class TLChannelParticipant : TLChannelParticipantBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipant;\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipantSelf : TLChannelParticipantBase, IChannelInviter\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantSelf;\r\n\r\n        public TLInt InviterId { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            InviterId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            InviterId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(InviterId.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLChannelParticipantModerator : TLChannelParticipantBase, IChannelInviter\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantModerator;\r\n\r\n        public TLInt InviterId { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            InviterId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            InviterId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(InviterId.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLChannelParticipantEditor : TLChannelParticipantBase, IChannelInviter\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantEditor;\r\n\r\n        public TLInt InviterId { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            InviterId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            InviterId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(InviterId.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLChannelParticipantKicked : TLChannelParticipantBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantKicked;\r\n\r\n        public TLInt KickedBy { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            KickedBy = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            KickedBy = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(KickedBy.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipantCreator : TLChannelParticipantBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantCreator;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipantAdmin : TLChannelParticipantBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantAdmin;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool CanEdit\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelParticipantAdminFlags.CanEdit); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelParticipantAdminFlags.CanEdit); }\r\n        }\r\n\r\n        public TLInt InviterId { get; set; }\r\n\r\n        public TLInt PromotedById { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLChannelAdminRights AdminRights { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            InviterId = GetObject<TLInt>(bytes, ref position);\r\n            PromotedById = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            AdminRights = GetObject<TLChannelAdminRights>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            InviterId = GetObject<TLInt>(input);\r\n            PromotedById = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            AdminRights = GetObject<TLChannelAdminRights>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            UserId.ToStream(output);\r\n            InviterId.ToStream(output);\r\n            PromotedById.ToStream(output);\r\n            Date.ToStream(output);\r\n            AdminRights.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipantBanned : TLChannelParticipantKicked\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelParticipantBanned;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public bool Left { get { return IsSet(Flags, (int) ChannelParticipantBannedFlags.Left); } }\r\n\r\n        public TLChannelBannedRights BannedRights { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            KickedBy = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            BannedRights = GetObject<TLChannelBannedRights>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            KickedBy = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            BannedRights = GetObject<TLChannelBannedRights>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            UserId.ToStream(output);\r\n            KickedBy.ToStream(output);\r\n            Date.ToStream(output);\r\n            BannedRights.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChannelParticipantRole.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLChannelParticipantRoleBase : TLObject { }\r\n\r\n    [Obsolete]\r\n    public class TLChannelRoleEmpty : TLChannelParticipantRoleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelRoleEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLChannelRoleModerator : TLChannelParticipantRoleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelRoleModerator;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLChannelRoleEditor : TLChannelParticipantRoleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelRoleEditor;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChannelParticipantsFilter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLChannelParticipantsFilterBase : TLObject { }\r\n\r\n    public class TLChannelParticipantsRecent : TLChannelParticipantsFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantsRecent;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipantsAdmins : TLChannelParticipantsFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantsAdmins;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipantsKicked68 : TLChannelParticipantsFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantsKicked68;\r\n\r\n        public TLString Q { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Q.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Q.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Q = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipantsKicked : TLChannelParticipantsFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantsKicked;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipantsBots : TLChannelParticipantsFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantsBots;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipantsBanned : TLChannelParticipantsFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantsBanned;\r\n\r\n        public TLString Q { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Q.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Q.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Q = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipantsSearch : TLChannelParticipantsFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantsSearch;\r\n\r\n        public TLString Q { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Q.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Q.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Q = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChat.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL.Interfaces;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ChatFlags\r\n    {\r\n        Creator = 0x1,\r\n        Kicked = 0x2,\r\n        Left = 0x4,\r\n        AdminsEnabled = 0x8,\r\n        Admin = 0x10,\r\n        Deactivated = 0x20,\r\n        MigratedTo = 0x40\r\n    }\r\n\r\n    [Flags]\r\n    public enum ChatCustomFlags\r\n    {\r\n        ReadInboxMaxId = 0x1,\r\n        ReadOutboxMaxId = 0x2,\r\n    }\r\n\r\n    [Flags]\r\n    public enum ChannelFlags\r\n    {\r\n        Creator = 0x1,\r\n        Kicked = 0x2,\r\n        Left = 0x4,\r\n        Editor = 0x8,\r\n        Moderator = 0x10,\r\n        Broadcast = 0x20,\r\n        Public = 0x40,\r\n        Verified = 0x80,\r\n        MegaGroup = 0x100,\r\n        Restricted = 0x200,\r\n        Democracy = 0x400,\r\n        Signatures = 0x800,\r\n        Min = 0x1000,\r\n        AccessHash = 0x2000,\r\n        AdminRights = 0x4000,\r\n        BannedRights = 0x8000,\r\n        UntilDate = 0x10000,\r\n        ParticipantsCount = 0x20000,\r\n        FeedId = 0x40000,\r\n    }\r\n\r\n    [Flags]\r\n    public enum ChannelCustomFlags\r\n    {\r\n        MigratedFromChatId = 0x1,\r\n        MigratedFromMaxId = 0x2,\r\n        Silent = 0x4,\r\n        PinnedMsgId = 0x8,\r\n        HiddenPinnedMsgId = 0x10,\r\n        ReadOutboxMaxId = 0x20,\r\n        ReadInboxMaxId = 0x40,\r\n        CanSetStickers = 0x80,\r\n        StickerSet = 0x100,\r\n        AvailableMinId = 0x200,\r\n        HiddenPrehistory = 0x400\r\n    }\r\n\r\n    public abstract class TLChatBase : TLObject, IInputPeer, IFullName, INotifySettings\r\n    {\r\n\r\n        public static string ChatFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (ChatFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public static string ChannelFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (ChannelFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public static string ChannelCustomFlagsString(TLLong flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (ChannelCustomFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public int Index\r\n        {\r\n            get { return Id.Value; }\r\n            set { Id = new TLInt(value); }\r\n        }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public virtual void Update(TLChatBase chat)\r\n        {\r\n            Id = chat.Id;\r\n\r\n            if (chat.Participants != null)\r\n            {\r\n                Participants = chat.Participants;\r\n            }\r\n\r\n            if (chat.ChatPhoto != null)\r\n            {\r\n                ChatPhoto = chat.ChatPhoto;\r\n            }\r\n\r\n            if (chat.NotifySettings != null)\r\n            {\r\n                NotifySettings = chat.NotifySettings;\r\n            }\r\n        }\r\n\r\n        public abstract TLInputPeerBase ToInputPeer();\r\n\r\n        public abstract string GetUnsendedTextFileName();\r\n\r\n        #region Full chat information\r\n\r\n        public TLChatParticipantsBase Participants { get; set; }\r\n\r\n        public TLPhotoBase ChatPhoto { get; set; }\r\n\r\n        public TLPeerNotifySettingsBase NotifySettings { get; set; }\r\n\r\n        public int UsersOnline { get; set; }\r\n\r\n        public TLExportedChatInvite ExportedInvite { get; set; }\r\n        #endregion\r\n\r\n        public TLInputNotifyPeerBase ToInputNotifyPeer()\r\n        {\r\n            return new TLInputNotifyPeer { Peer = ToInputPeer() };\r\n        }\r\n\r\n        public abstract string FullName { get; }\r\n\r\n        public virtual string FullName2 { get { return FullName; } }\r\n\r\n        public virtual string ShortName { get { return FullName; } }\r\n\r\n        public abstract bool IsForbidden { get; }\r\n\r\n        #region Additional\r\n        public IList<string> FullNameWords { get; set; }\r\n        public TLVector<TLBotInfoBase> BotInfo { get; set; }\r\n\r\n        #endregion\r\n    }\r\n\r\n    public class TLChatEmpty : TLChatBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n        }\r\n\r\n        public override string FullName\r\n        {\r\n            get { return string.Empty; }\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerChat { ChatId = Id };\r\n        }\r\n\r\n        public override string GetUnsendedTextFileName()\r\n        {\r\n            return \"c\" + Id + \".dat\";\r\n        }\r\n\r\n        public override bool IsForbidden\r\n        {\r\n            get { return true; }\r\n        }\r\n    }\r\n\r\n    public class TLChat : TLChatBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChat;\r\n\r\n        protected TLString _title;\r\n\r\n        public TLString Title\r\n        {\r\n            get { return _title; }\r\n            set\r\n            {\r\n                SetField(ref _title, value, () => Title);\r\n                NotifyOfPropertyChange(() => FullName);\r\n            }\r\n        }\r\n\r\n        protected TLPhotoBase _photo;\r\n\r\n        public TLPhotoBase Photo\r\n        {\r\n            get { return _photo; }\r\n            set { SetField(ref _photo, value, () => Photo); }\r\n        }\r\n\r\n        public TLInt ParticipantsCount { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public virtual TLBool Left { get; set; }\r\n\r\n        public TLInt Version { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Title.ToString();\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _title = GetObject<TLString>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            ParticipantsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Left = GetObject<TLBool>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _title = GetObject<TLString>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            ParticipantsCount = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Left = GetObject<TLBool>(input);\r\n            Version = GetObject<TLInt>(input);\r\n\r\n            Participants = GetObject<TLObject>(input) as TLChatParticipantsBase;\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n            Photo.ToStream(output);\r\n            output.Write(ParticipantsCount.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            output.Write(Left.ToBytes());\r\n            output.Write(Version.ToBytes());\r\n\r\n            Participants.NullableToStream(output);\r\n            NotifySettings.NullableToStream(output);\r\n        }\r\n\r\n        public override string FullName\r\n        {\r\n            get { return Title != null ? Title.ToString() : string.Empty; }\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n            var c = chat as TLChat;\r\n            if (c != null)\r\n            {\r\n                _title = c.Title;\r\n                if (Photo.GetType() != c.Photo.GetType())\r\n                {\r\n                    _photo = c.Photo;    // при удалении фото чата не обновляется UI при _photo = c.Photo\r\n                }\r\n                else\r\n                {\r\n                    Photo.Update(c.Photo);\r\n                }\r\n                ParticipantsCount = c.ParticipantsCount;\r\n                Date = c.Date;\r\n                Left = c.Left;\r\n                Version = c.Version;\r\n            }\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerChat { ChatId = Id };\r\n        }\r\n\r\n        public override string GetUnsendedTextFileName()\r\n        {\r\n            return \"c\" + Id + \".dat\";\r\n        }\r\n\r\n        public override bool IsForbidden\r\n        {\r\n            get { return Left.Value; }\r\n        }\r\n    }\r\n\r\n    public class TLChat40 : TLChat\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChat40;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLBool Left\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)ChatFlags.Left)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)ChatFlags.Left);\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool Creator\r\n        {\r\n            get { return IsSet(_flags, (int)ChatFlags.Creator); }\r\n        }\r\n\r\n        public TLBool Admin\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)ChatFlags.Admin)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)ChatFlags.Admin);\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLBool AdminsEnabled\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)ChatFlags.AdminsEnabled)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)ChatFlags.AdminsEnabled);\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool Deactivated\r\n        {\r\n            get { return IsSet(_flags, (int)ChatFlags.Deactivated); }\r\n        }\r\n\r\n        protected TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _title = GetObject<TLString>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            ParticipantsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            //Left = GetObject<TLBool>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _title = GetObject<TLString>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            ParticipantsCount = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            //Left = GetObject<TLBool>(input);\r\n            Version = GetObject<TLInt>(input);\r\n\r\n            Participants = GetObject<TLObject>(input) as TLChatParticipantsBase;\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n            Photo.ToStream(output);\r\n            output.Write(ParticipantsCount.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            //output.Write(Left.ToBytes());\r\n            output.Write(Version.ToBytes());\r\n\r\n            Participants.NullableToStream(output);\r\n            NotifySettings.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n            var c = chat as TLChat40;\r\n            if (c != null)\r\n            {\r\n                Flags = c.Flags;\r\n                if (c.CustomFlags != null)\r\n                {\r\n                    CustomFlags = c.CustomFlags;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return base.ToString() + \" flags=\" + ChatFlagsString(Flags);\r\n        }\r\n    }\r\n\r\n    public class TLChat41 : TLChat40, IReadMaxId\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChat41;\r\n\r\n        public bool IsMigrated { get { return IsSet(Flags, (int)ChatFlags.MigratedTo); } }\r\n\r\n        private TLInputChannelBase _migratedTo;\r\n\r\n        public TLInputChannelBase MigratedTo\r\n        {\r\n            get { return _migratedTo; }\r\n            set { SetField(out _migratedTo, value, ref _flags, (int)ChatFlags.MigratedTo); }\r\n        }\r\n\r\n        private TLInt _readInboxMaxId;\r\n\r\n        public TLInt ReadInboxMaxId\r\n        {\r\n            get { return _readInboxMaxId; }\r\n            set { SetField(out _readInboxMaxId, value, ref _customFlags, (int)ChatCustomFlags.ReadInboxMaxId); }\r\n        }\r\n\r\n        private TLInt _readOutboxMaxId;\r\n\r\n        public TLInt ReadOutboxMaxId\r\n        {\r\n            get { return _readOutboxMaxId; }\r\n            set { SetField(out _readOutboxMaxId, value, ref _customFlags, (int)ChatCustomFlags.ReadOutboxMaxId); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _title = GetObject<TLString>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            ParticipantsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            //Left = GetObject<TLBool>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n            _migratedTo = GetObject<TLInputChannelBase>(Flags, (int)ChatFlags.MigratedTo, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            _title = GetObject<TLString>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            ParticipantsCount = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            //Left = GetObject<TLBool>(input);\r\n            Version = GetObject<TLInt>(input);\r\n            _migratedTo = GetObject<TLInputChannelBase>(Flags, (int)ChatFlags.MigratedTo, null, input);\r\n\r\n            Participants = GetObject<TLObject>(input) as TLChatParticipantsBase;\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            _readInboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChatCustomFlags.ReadInboxMaxId, null, input);\r\n            _readOutboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChatCustomFlags.ReadOutboxMaxId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(Id.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n            Photo.ToStream(output);\r\n            output.Write(ParticipantsCount.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            //output.Write(Left.ToBytes());\r\n            output.Write(Version.ToBytes());\r\n            ToStream(output, MigratedTo, Flags, (int)ChatFlags.MigratedTo);\r\n\r\n            Participants.NullableToStream(output);\r\n            NotifySettings.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            ToStream(output, ReadInboxMaxId, CustomFlags, (int)ChatCustomFlags.ReadInboxMaxId);\r\n            ToStream(output, ReadOutboxMaxId, CustomFlags, (int)ChatCustomFlags.ReadOutboxMaxId);\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n\r\n            var chat41 = chat as TLChat41;\r\n            if (chat41 != null)\r\n            {\r\n                if (chat41.MigratedTo != null)\r\n                {\r\n                    MigratedTo = chat41.MigratedTo;\r\n                }\r\n\r\n                if (chat41.ReadInboxMaxId != null\r\n                    && (ReadInboxMaxId == null || ReadInboxMaxId.Value < chat41.ReadInboxMaxId.Value))\r\n                {\r\n                    ReadInboxMaxId = chat41.ReadInboxMaxId;\r\n                }\r\n\r\n                if (chat41.ReadOutboxMaxId != null\r\n                    && (ReadOutboxMaxId == null || ReadOutboxMaxId.Value < chat41.ReadOutboxMaxId.Value))\r\n                {\r\n                    ReadOutboxMaxId = chat41.ReadOutboxMaxId;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLChatForbidden : TLChatBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatForbidden;\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            Participants = GetObject<TLObject>(input) as TLChatParticipantsBase;\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n\r\n            Participants.NullableToStream(output);\r\n            NotifySettings.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n            var c = (TLChatForbidden)chat;\r\n            Title = c.Title;\r\n            Date = c.Date;\r\n        }\r\n\r\n        public override string FullName\r\n        {\r\n            get\r\n            {\r\n                return Title != null ? Title.ToString() : string.Empty;\r\n            }\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerChat { ChatId = Id };\r\n        }\r\n\r\n        public override string GetUnsendedTextFileName()\r\n        {\r\n            return \"c\" + Id + \".dat\";\r\n        }\r\n\r\n        public override bool IsForbidden\r\n        {\r\n            get { return true; }\r\n        }\r\n    }\r\n\r\n    public class TLChatForbidden40 : TLChatForbidden, IReadMaxId\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChatForbidden40;\r\n\r\n        protected TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        private TLInt _readInboxMaxId;\r\n\r\n        public TLInt ReadInboxMaxId\r\n        {\r\n            get { return _readInboxMaxId; }\r\n            set { SetField(out _readInboxMaxId, value, ref _customFlags, (int)ChatCustomFlags.ReadInboxMaxId); }\r\n        }\r\n\r\n        private TLInt _readOutboxMaxId;\r\n\r\n        public TLInt ReadOutboxMaxId\r\n        {\r\n            get { return _readOutboxMaxId; }\r\n            set { SetField(out _readOutboxMaxId, value, ref _customFlags, (int)ChatCustomFlags.ReadOutboxMaxId); }\r\n        }\r\n\r\n        #region Additional\r\n        public TLPhotoBase Photo { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            //Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            Title = GetObject<TLString>(input);\r\n            //Date = GetObject<TLInt>(input);\r\n\r\n            Participants = GetObject<TLObject>(input) as TLChatParticipantsBase;\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            _readInboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChatCustomFlags.ReadInboxMaxId, null, input);\r\n            _readOutboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChatCustomFlags.ReadOutboxMaxId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n            //output.Write(Date.ToBytes());\r\n\r\n            Participants.NullableToStream(output);\r\n            NotifySettings.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            ToStream(output, ReadInboxMaxId, CustomFlags, (int)ChatCustomFlags.ReadInboxMaxId);\r\n            ToStream(output, ReadOutboxMaxId, CustomFlags, (int)ChatCustomFlags.ReadOutboxMaxId);\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n            var c = chat as TLChatForbidden40;\r\n            if (c != null)\r\n            {\r\n                if (c.ReadInboxMaxId != null\r\n                    && (ReadInboxMaxId == null || ReadInboxMaxId.Value < c.ReadInboxMaxId.Value))\r\n                {\r\n                    ReadInboxMaxId = c.ReadInboxMaxId;\r\n                }\r\n\r\n                if (c.ReadOutboxMaxId != null\r\n                    && (ReadOutboxMaxId == null || ReadOutboxMaxId.Value < c.ReadOutboxMaxId.Value))\r\n                {\r\n                    ReadOutboxMaxId = c.ReadOutboxMaxId;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLBroadcastChat : TLChatBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLBroadcastChat;\r\n\r\n        public TLVector<TLInt> ParticipantIds { get; set; }\r\n\r\n        protected TLString _title;\r\n\r\n        public TLString Title\r\n        {\r\n            get { return _title; }\r\n            set\r\n            {\r\n                SetField(ref _title, value, () => Title);\r\n                NotifyOfPropertyChange(() => FullName);\r\n            }\r\n        }\r\n\r\n        public TLPhotoBase _photo;\r\n\r\n        public TLPhotoBase Photo\r\n        {\r\n            get { return _photo; }\r\n            set { SetField(ref _photo, value, () => Photo); }\r\n        }\r\n\r\n        public override string FullName\r\n        {\r\n            get { return Title != null ? Title.ToString() : string.Empty; }\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _title = GetObject<TLString>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            ParticipantIds = GetObject<TLVector<TLInt>>(input);\r\n\r\n            Participants = GetObject<TLObject>(input) as TLChatParticipantsBase;\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n            Photo.ToStream(output);\r\n            ParticipantIds.ToStream(output);\r\n\r\n            Participants.NullableToStream(output);\r\n            NotifySettings.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n            var c = chat as TLBroadcastChat;\r\n            if (c != null)\r\n            {\r\n                _title = c.Title;\r\n                if (Photo.GetType() != c.Photo.GetType())\r\n                {\r\n                    _photo = c.Photo;\r\n                }\r\n                else\r\n                {\r\n                    Photo.Update(c.Photo);\r\n                }\r\n                ParticipantIds = c.ParticipantIds;\r\n            }\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerBroadcast { ChatId = Id };\r\n        }\r\n\r\n        public override string GetUnsendedTextFileName()\r\n        {\r\n            return \"b\" + Id + \".dat\";\r\n        }\r\n\r\n        public override bool IsForbidden\r\n        {\r\n            get { return false; }\r\n        }\r\n    }\r\n\r\n    public class TLChannel76 : TLChannel73\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannel76;\r\n\r\n        protected TLInt _feedId;\r\n\r\n        public TLInt FeedId\r\n        {\r\n            get { return _feedId; }\r\n            set { SetField(out _feedId, value, ref _flags, (int)ChannelFlags.FeedId); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject(Flags, (int)ChannelFlags.AccessHash, new TLLong(0), bytes, ref position);\r\n            _title = GetObject<TLString>(bytes, ref position);\r\n            UserName = GetObject<TLString>(Flags, (int)ChannelFlags.Public, TLString.Empty, bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n            RestrictionReason = GetObject<TLString>(Flags, (int)ChannelFlags.Restricted, TLString.Empty, bytes, ref position);\r\n            _adminRights = GetObject<TLChannelAdminRights>(Flags, (int)ChannelFlags.AdminRights, null, bytes, ref position);\r\n            _bannedRights = GetObject<TLChannelBannedRights>(Flags, (int)ChannelFlags.BannedRights, null, bytes, ref position);\r\n            _participantsCount = GetObject<TLInt>(Flags, (int)ChannelFlags.ParticipantsCount, null, bytes, ref position);\r\n            _feedId = GetObject<TLInt>(Flags, (int)ChannelFlags.FeedId, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject(Flags, (int)ChannelFlags.AccessHash, new TLLong(0), input);\r\n            _title = GetObject<TLString>(input);\r\n            _userName = GetObject<TLString>(Flags, (int)ChannelFlags.Public, TLString.Empty, input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n            RestrictionReason = GetObject<TLString>(Flags, (int)ChannelFlags.Restricted, TLString.Empty, input);\r\n            _adminRights = GetObject<TLChannelAdminRights>(Flags, (int)ChannelFlags.AdminRights, null, input);\r\n            _bannedRights = GetObject<TLChannelBannedRights>(Flags, (int)ChannelFlags.BannedRights, null, input);\r\n            _participantsCount = GetObject<TLInt>(Flags, (int)ChannelFlags.ParticipantsCount, null, input);\r\n            _feedId = GetObject<TLInt>(Flags, (int)ChannelFlags.FeedId, null, input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            ParticipantIds = GetNullableObject<TLVector<TLInt>>(input);\r\n            About = GetNullableObject<TLString>(input);\r\n            AdminsCount = GetNullableObject<TLInt>(input);\r\n            KickedCount = GetNullableObject<TLInt>(input);\r\n            ReadInboxMaxId = GetNullableObject<TLInt>(input);\r\n            Pts = GetNullableObject<TLInt>(input);\r\n            Participants = GetNullableObject<TLChatParticipantsBase>(input);\r\n            NotifySettings = GetNullableObject<TLPeerNotifySettingsBase>(input);\r\n\r\n            _migratedFromChatId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId, null, input);\r\n            _migratedFromMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId, null, input);\r\n            _pinnedMsgId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.PinnedMsgId, null, input);\r\n            _hiddenPinnedMsgId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.HiddenPinnedMsgId, null, input);\r\n            _readOutboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId, null, input);\r\n            _stickerSet = GetObject<TLStickerSetBase>(CustomFlags, (int)ChannelCustomFlags.StickerSet, null, input);\r\n            _availableMinId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.AvailableMinId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            try\r\n            {\r\n                output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n                output.Write(Flags.ToBytes());\r\n                output.Write(Id.ToBytes());\r\n                ToStream(output, AccessHash, Flags, (int)ChannelFlags.AccessHash);\r\n                output.Write(Title.ToBytes());\r\n                ToStream(output, UserName, Flags, (int)ChannelFlags.Public);\r\n                Photo.ToStream(output);\r\n                Date.ToStream(output);\r\n                Version.ToStream(output);\r\n                ToStream(output, RestrictionReason, Flags, (int)ChannelFlags.Restricted);\r\n                ToStream(output, AdminRights, Flags, (int)ChannelFlags.AdminRights);\r\n                ToStream(output, BannedRights, Flags, (int)ChannelFlags.BannedRights);\r\n                ToStream(output, ParticipantsCount, Flags, (int)ChannelFlags.ParticipantsCount);\r\n                ToStream(output, FeedId, Flags, (int)ChannelFlags.FeedId);\r\n\r\n                CustomFlags.NullableToStream(output);\r\n\r\n                ParticipantIds.NullableToStream(output);\r\n                About.NullableToStream(output);\r\n                AdminsCount.NullableToStream(output);\r\n                KickedCount.NullableToStream(output);\r\n                ReadInboxMaxId.NullableToStream(output);\r\n                Pts.NullableToStream(output);\r\n                Participants.NullableToStream(output);\r\n                NotifySettings.NullableToStream(output);\r\n\r\n                ToStream(output, _migratedFromChatId, CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId);\r\n                ToStream(output, _migratedFromMaxId, CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId);\r\n                ToStream(output, PinnedMsgId, CustomFlags, (int)ChannelCustomFlags.PinnedMsgId);\r\n                ToStream(output, HiddenPinnedMsgId, CustomFlags, (int)ChannelCustomFlags.HiddenPinnedMsgId);\r\n                ToStream(output, ReadOutboxMaxId, CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId);\r\n                ToStream(output, _stickerSet, CustomFlags, (int)ChannelCustomFlags.StickerSet);\r\n                ToStream(output, _availableMinId, CustomFlags, (int)ChannelCustomFlags.AvailableMinId);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\r\n                    string.Format(\r\n                        \"TLChannel76.ToStream access_hash={0} user_name={1} restriction_reason={2} migrated_from_chat_id={3} migrated_from_max_id={4} pinned_msg_id={5} hidden_pinned_msg_id={9} flags={6} custom_flags={7} ex {8}\",\r\n                        AccessHash, UserName, RestrictionReason, MigratedFromChatId, MigratedFromMaxId, PinnedMsgId,\r\n                        ChannelFlagsString(Flags), ChannelCustomFlagsString(CustomFlags), HiddenPinnedMsgId, ex));\r\n            }\r\n\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            var c = chat as TLChannel76;\r\n            if (c != null)\r\n            {\r\n                FeedId = c.FeedId;\r\n            }\r\n\r\n            base.Update(chat);\r\n        }\r\n    }\r\n\r\n    public class TLChannel73 : TLChannel68\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannel73;\r\n\r\n        protected TLInt _participantsCount;\r\n\r\n        public override TLInt ParticipantsCount\r\n        {\r\n            get { return _participantsCount; }\r\n            set { SetField(out _participantsCount, value, ref _flags, (int)ChannelFlags.ParticipantsCount); }\r\n        }\r\n\r\n        public override bool CanPinMessages\r\n        {\r\n            get\r\n            {\r\n                if (IsMegaGroup)\r\n                {\r\n                    return Creator || (AdminRights != null && AdminRights.PinMessages);\r\n                }\r\n\r\n                return Creator || (AdminRights != null && AdminRights.EditMessages);\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject(Flags, (int)ChannelFlags.AccessHash, new TLLong(0), bytes, ref position);\r\n            _title = GetObject<TLString>(bytes, ref position);\r\n            UserName = GetObject<TLString>(Flags, (int)ChannelFlags.Public, TLString.Empty, bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n            RestrictionReason = GetObject<TLString>(Flags, (int)ChannelFlags.Restricted, TLString.Empty, bytes, ref position);\r\n            _adminRights = GetObject<TLChannelAdminRights>(Flags, (int)ChannelFlags.AdminRights, null, bytes, ref position);\r\n            _bannedRights = GetObject<TLChannelBannedRights>(Flags, (int)ChannelFlags.BannedRights, null, bytes, ref position);\r\n            _participantsCount = GetObject<TLInt>(Flags, (int)ChannelFlags.ParticipantsCount, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject(Flags, (int)ChannelFlags.AccessHash, new TLLong(0), input);\r\n            _title = GetObject<TLString>(input);\r\n            _userName = GetObject<TLString>(Flags, (int)ChannelFlags.Public, TLString.Empty, input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n            RestrictionReason = GetObject<TLString>(Flags, (int)ChannelFlags.Restricted, TLString.Empty, input);\r\n            _adminRights = GetObject<TLChannelAdminRights>(Flags, (int)ChannelFlags.AdminRights, null, input);\r\n            _bannedRights = GetObject<TLChannelBannedRights>(Flags, (int)ChannelFlags.BannedRights, null, input);\r\n            _participantsCount = GetObject<TLInt>(Flags, (int)ChannelFlags.ParticipantsCount, null, input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            ParticipantIds = GetNullableObject<TLVector<TLInt>>(input);\r\n            About = GetNullableObject<TLString>(input);\r\n            AdminsCount = GetNullableObject<TLInt>(input);\r\n            KickedCount = GetNullableObject<TLInt>(input);\r\n            ReadInboxMaxId = GetNullableObject<TLInt>(input);\r\n            Pts = GetNullableObject<TLInt>(input);\r\n            Participants = GetNullableObject<TLChatParticipantsBase>(input);\r\n            NotifySettings = GetNullableObject<TLPeerNotifySettingsBase>(input);\r\n\r\n            _migratedFromChatId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId, null, input);\r\n            _migratedFromMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId, null, input);\r\n            _pinnedMsgId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.PinnedMsgId, null, input);\r\n            _hiddenPinnedMsgId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.HiddenPinnedMsgId, null, input);\r\n            _readOutboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId, null, input);\r\n            _stickerSet = GetObject<TLStickerSetBase>(CustomFlags, (int)ChannelCustomFlags.StickerSet, null, input);\r\n            _availableMinId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.AvailableMinId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            try\r\n            {\r\n                output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n                output.Write(Flags.ToBytes());\r\n                output.Write(Id.ToBytes());\r\n                ToStream(output, AccessHash, Flags, (int)ChannelFlags.AccessHash);\r\n                output.Write(Title.ToBytes());\r\n                ToStream(output, UserName, Flags, (int)ChannelFlags.Public);\r\n                Photo.ToStream(output);\r\n                Date.ToStream(output);\r\n                Version.ToStream(output);\r\n                ToStream(output, RestrictionReason, Flags, (int)ChannelFlags.Restricted);\r\n                ToStream(output, AdminRights, Flags, (int)ChannelFlags.AdminRights);\r\n                ToStream(output, BannedRights, Flags, (int)ChannelFlags.BannedRights);\r\n                ToStream(output, ParticipantsCount, Flags, (int)ChannelFlags.ParticipantsCount);\r\n\r\n                CustomFlags.NullableToStream(output);\r\n\r\n                ParticipantIds.NullableToStream(output);\r\n                About.NullableToStream(output);\r\n                AdminsCount.NullableToStream(output);\r\n                KickedCount.NullableToStream(output);\r\n                ReadInboxMaxId.NullableToStream(output);\r\n                Pts.NullableToStream(output);\r\n                Participants.NullableToStream(output);\r\n                NotifySettings.NullableToStream(output);\r\n\r\n                ToStream(output, _migratedFromChatId, CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId);\r\n                ToStream(output, _migratedFromMaxId, CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId);\r\n                ToStream(output, PinnedMsgId, CustomFlags, (int)ChannelCustomFlags.PinnedMsgId);\r\n                ToStream(output, HiddenPinnedMsgId, CustomFlags, (int)ChannelCustomFlags.HiddenPinnedMsgId);\r\n                ToStream(output, ReadOutboxMaxId, CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId);\r\n                ToStream(output, _stickerSet, CustomFlags, (int)ChannelCustomFlags.StickerSet);\r\n                ToStream(output, _availableMinId, CustomFlags, (int)ChannelCustomFlags.AvailableMinId);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\r\n                    string.Format(\r\n                        \"TLChannel68.ToStream access_hash={0} user_name={1} restriction_reason={2} migrated_from_chat_id={3} migrated_from_max_id={4} pinned_msg_id={5} hidden_pinned_msg_id={9} flags={6} custom_flags={7} ex {8}\",\r\n                        AccessHash, UserName, RestrictionReason, MigratedFromChatId, MigratedFromMaxId, PinnedMsgId,\r\n                        ChannelFlagsString(Flags), ChannelCustomFlagsString(CustomFlags), HiddenPinnedMsgId, ex));\r\n            }\r\n\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            var c = chat as TLChannel73;\r\n            if (c != null)\r\n            {\r\n                if (c.ParticipantsCount != null)\r\n                {\r\n                    ParticipantsCount = c.ParticipantsCount;\r\n                }\r\n            }\r\n\r\n            base.Update(chat);\r\n        }\r\n    }\r\n\r\n    public class TLChannel68 : TLChannel49\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannel68;\r\n\r\n        protected TLChannelAdminRights _adminRights;\r\n\r\n        public TLChannelAdminRights AdminRights\r\n        {\r\n            get { return _adminRights; }\r\n            set { SetField(out _adminRights, value, ref _flags, (int)ChannelFlags.AdminRights); }\r\n        }\r\n\r\n        protected TLChannelBannedRights _bannedRights;\r\n\r\n        public TLChannelBannedRights BannedRights\r\n        {\r\n            get { return _bannedRights; }\r\n            set { SetField(out _bannedRights, value, ref _flags, (int)ChannelFlags.BannedRights); }\r\n        }\r\n\r\n        public bool CanSetStickers\r\n        {\r\n            get { return IsSet(CustomFlags, (int)ChannelCustomFlags.CanSetStickers); }\r\n            set { SetUnset(ref _customFlags, value, (int)ChannelCustomFlags.CanSetStickers); }\r\n        }\r\n\r\n        protected TLStickerSetBase _stickerSet;\r\n\r\n        public TLStickerSetBase StickerSet\r\n        {\r\n            get { return _stickerSet; }\r\n            set { SetField(out _stickerSet, value, ref _customFlags, (int)ChannelCustomFlags.StickerSet); }\r\n        }\r\n\r\n        public bool HiddenPrehistory\r\n        {\r\n            get { return IsSet(CustomFlags, (int)ChannelCustomFlags.HiddenPrehistory); }\r\n            set { SetUnset(ref _customFlags, value, (int)ChannelCustomFlags.HiddenPrehistory); }\r\n        }\r\n\r\n        protected TLInt _availableMinId;\r\n\r\n        public TLInt AvailableMinId\r\n        {\r\n            get { return _availableMinId; }\r\n            set { SetField(out _availableMinId, value, ref _customFlags, (int)ChannelCustomFlags.AvailableMinId); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject(Flags, (int)ChannelFlags.AccessHash, new TLLong(0), bytes, ref position);\r\n            _title = GetObject<TLString>(bytes, ref position);\r\n            UserName = GetObject<TLString>(Flags, (int)ChannelFlags.Public, TLString.Empty, bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n            RestrictionReason = GetObject<TLString>(Flags, (int)ChannelFlags.Restricted, TLString.Empty, bytes, ref position);\r\n            _adminRights = GetObject<TLChannelAdminRights>(Flags, (int)ChannelFlags.AdminRights, null, bytes, ref position);\r\n            _bannedRights = GetObject<TLChannelBannedRights>(Flags, (int)ChannelFlags.BannedRights, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject(Flags, (int)ChannelFlags.AccessHash, new TLLong(0), input);\r\n            _title = GetObject<TLString>(input);\r\n            _userName = GetObject<TLString>(Flags, (int)ChannelFlags.Public, TLString.Empty, input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n            RestrictionReason = GetObject<TLString>(Flags, (int)ChannelFlags.Restricted, TLString.Empty, input);\r\n            _adminRights = GetObject<TLChannelAdminRights>(Flags, (int)ChannelFlags.AdminRights, null, input);\r\n            _bannedRights = GetObject<TLChannelBannedRights>(Flags, (int)ChannelFlags.BannedRights, null, input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            ParticipantIds = GetNullableObject<TLVector<TLInt>>(input);\r\n            About = GetNullableObject<TLString>(input);\r\n            ParticipantsCount = GetNullableObject<TLInt>(input);\r\n            AdminsCount = GetNullableObject<TLInt>(input);\r\n            KickedCount = GetNullableObject<TLInt>(input);\r\n            ReadInboxMaxId = GetNullableObject<TLInt>(input);\r\n            Pts = GetNullableObject<TLInt>(input);\r\n            Participants = GetNullableObject<TLChatParticipantsBase>(input);\r\n            NotifySettings = GetNullableObject<TLPeerNotifySettingsBase>(input);\r\n\r\n            _migratedFromChatId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId, null, input);\r\n            _migratedFromMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId, null, input);\r\n            _pinnedMsgId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.PinnedMsgId, null, input);\r\n            _hiddenPinnedMsgId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.HiddenPinnedMsgId, null, input);\r\n            _readOutboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId, null, input);\r\n            _stickerSet = GetObject<TLStickerSetBase>(CustomFlags, (int)ChannelCustomFlags.StickerSet, null, input);\r\n            _availableMinId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.AvailableMinId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            try\r\n            {\r\n                output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n                output.Write(Flags.ToBytes());\r\n                output.Write(Id.ToBytes());\r\n                ToStream(output, AccessHash, Flags, (int)ChannelFlags.AccessHash);\r\n                output.Write(Title.ToBytes());\r\n                ToStream(output, UserName, Flags, (int)ChannelFlags.Public);\r\n                Photo.ToStream(output);\r\n                Date.ToStream(output);\r\n                Version.ToStream(output);\r\n                ToStream(output, RestrictionReason, Flags, (int)ChannelFlags.Restricted);\r\n                ToStream(output, AdminRights, Flags, (int)ChannelFlags.AdminRights);\r\n                ToStream(output, BannedRights, Flags, (int)ChannelFlags.BannedRights);\r\n\r\n                CustomFlags.NullableToStream(output);\r\n\r\n                ParticipantIds.NullableToStream(output);\r\n                About.NullableToStream(output);\r\n                ParticipantsCount.NullableToStream(output);\r\n                AdminsCount.NullableToStream(output);\r\n                KickedCount.NullableToStream(output);\r\n                ReadInboxMaxId.NullableToStream(output);\r\n                Pts.NullableToStream(output);\r\n                Participants.NullableToStream(output);\r\n                NotifySettings.NullableToStream(output);\r\n\r\n                ToStream(output, _migratedFromChatId, CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId);\r\n                ToStream(output, _migratedFromMaxId, CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId);\r\n                ToStream(output, PinnedMsgId, CustomFlags, (int)ChannelCustomFlags.PinnedMsgId);\r\n                ToStream(output, HiddenPinnedMsgId, CustomFlags, (int)ChannelCustomFlags.HiddenPinnedMsgId);\r\n                ToStream(output, ReadOutboxMaxId, CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId);\r\n                ToStream(output, _stickerSet, CustomFlags, (int)ChannelCustomFlags.StickerSet);\r\n                ToStream(output, _availableMinId, CustomFlags, (int)ChannelCustomFlags.AvailableMinId);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\r\n                    string.Format(\r\n                        \"TLChannel68.ToStream access_hash={0} user_name={1} restriction_reason={2} migrated_from_chat_id={3} migrated_from_max_id={4} pinned_msg_id={5} hidden_pinned_msg_id={9} flags={6} custom_flags={7} ex {8}\",\r\n                        AccessHash, UserName, RestrictionReason, MigratedFromChatId, MigratedFromMaxId, PinnedMsgId,\r\n                        ChannelFlagsString(Flags), ChannelCustomFlagsString(CustomFlags), HiddenPinnedMsgId, ex));\r\n            }\r\n\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            var c = chat as TLChannel68;\r\n            if (c != null)\r\n            {\r\n                AdminRights = c.AdminRights;\r\n                BannedRights = c.BannedRights;\r\n\r\n                if (c.Full)\r\n                {\r\n                    CanSetStickers = c.CanSetStickers;\r\n                    if (c.StickerSet != null)\r\n                    {\r\n                        if (c.StickerSet is TLStickerSetEmpty)\r\n                        {\r\n                            StickerSet = null;\r\n                        }\r\n                        else\r\n                        {\r\n                            StickerSet = c.StickerSet;\r\n                        }\r\n                    }\r\n                    HiddenPrehistory = c.HiddenPrehistory;\r\n                    AvailableMinId = c.AvailableMinId;\r\n                }\r\n            }\r\n\r\n            base.Update(chat);\r\n        }\r\n    }\r\n\r\n    public class TLChannel49 : TLChannel44, IReadMaxId\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannel49;\r\n\r\n        public bool Min\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.Min); }\r\n        }\r\n\r\n        protected TLInt _pinnedMsgId;\r\n\r\n        public TLInt PinnedMsgId\r\n        {\r\n            get { return _pinnedMsgId; }\r\n            set { SetField(out _pinnedMsgId, value, ref _customFlags, (int)ChannelCustomFlags.PinnedMsgId); }\r\n        }\r\n\r\n        protected TLInt _hiddenPinnedMsgId;\r\n\r\n        public TLInt HiddenPinnedMsgId\r\n        {\r\n            get { return _hiddenPinnedMsgId; }\r\n            set { SetField(out _hiddenPinnedMsgId, value, ref _customFlags, (int)ChannelCustomFlags.HiddenPinnedMsgId); }\r\n        }\r\n\r\n        protected TLInt _readOutboxMaxId;\r\n\r\n        public TLInt ReadOutboxMaxId\r\n        {\r\n            get { return _readOutboxMaxId; }\r\n            set { SetField(out _readOutboxMaxId, value, ref _customFlags, (int)ChannelCustomFlags.ReadOutboxMaxId); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject(Flags, (int)ChannelFlags.AccessHash, new TLLong(0), bytes, ref position);\r\n            _title = GetObject<TLString>(bytes, ref position);\r\n            UserName = GetObject<TLString>(Flags, (int)ChannelFlags.Public, TLString.Empty, bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n            RestrictionReason = GetObject<TLString>(Flags, (int)ChannelFlags.Restricted, TLString.Empty, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            //try\r\n            ////{\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject(Flags, (int)ChannelFlags.AccessHash, new TLLong(0), input);\r\n            _title = GetObject<TLString>(input);\r\n            _userName = GetObject<TLString>(Flags, (int)ChannelFlags.Public, TLString.Empty, input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n            RestrictionReason = GetObject<TLString>(Flags, (int)ChannelFlags.Restricted, TLString.Empty, input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            ParticipantIds = GetNullableObject<TLVector<TLInt>>(input);\r\n            About = GetNullableObject<TLString>(input);\r\n            ParticipantsCount = GetNullableObject<TLInt>(input);\r\n            AdminsCount = GetNullableObject<TLInt>(input);\r\n            KickedCount = GetNullableObject<TLInt>(input);\r\n            ReadInboxMaxId = GetNullableObject<TLInt>(input);\r\n            Pts = GetNullableObject<TLInt>(input);\r\n            Participants = GetNullableObject<TLChatParticipantsBase>(input);\r\n            NotifySettings = GetNullableObject<TLPeerNotifySettingsBase>(input);\r\n\r\n            _migratedFromChatId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId, null, input);\r\n            _migratedFromMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId, null, input);\r\n            _pinnedMsgId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.PinnedMsgId, null, input);\r\n            _hiddenPinnedMsgId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.HiddenPinnedMsgId, null, input);\r\n            _readOutboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId, null, input);\r\n            //}\r\n            //catch (Exception ex)\r\n            //{\r\n            //    Execute.ShowDebugMessage(\"TLChannel44.FromStream ex \" + ex);\r\n            //}\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            try\r\n            {\r\n                output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n                output.Write(Flags.ToBytes());\r\n                output.Write(Id.ToBytes());\r\n                ToStream(output, AccessHash, Flags, (int)ChannelFlags.AccessHash);\r\n                output.Write(Title.ToBytes());\r\n                ToStream(output, UserName, Flags, (int)ChannelFlags.Public);\r\n                Photo.ToStream(output);\r\n                Date.ToStream(output);\r\n                Version.ToStream(output);\r\n                ToStream(output, RestrictionReason, Flags, (int)ChannelFlags.Restricted);\r\n\r\n                CustomFlags.NullableToStream(output);\r\n\r\n                ParticipantIds.NullableToStream(output);\r\n                About.NullableToStream(output);\r\n                ParticipantsCount.NullableToStream(output);\r\n                AdminsCount.NullableToStream(output);\r\n                KickedCount.NullableToStream(output);\r\n                ReadInboxMaxId.NullableToStream(output);\r\n                Pts.NullableToStream(output);\r\n                Participants.NullableToStream(output);\r\n                NotifySettings.NullableToStream(output);\r\n\r\n                ToStream(output, _migratedFromChatId, CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId);\r\n                ToStream(output, _migratedFromMaxId, CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId);\r\n                ToStream(output, PinnedMsgId, CustomFlags, (int)ChannelCustomFlags.PinnedMsgId);\r\n                ToStream(output, HiddenPinnedMsgId, CustomFlags, (int)ChannelCustomFlags.HiddenPinnedMsgId);\r\n                ToStream(output, ReadOutboxMaxId, CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\r\n                    string.Format(\r\n                        \"TLChannel49.ToStream access_hash={0} user_name={1} restriction_reason={2} migrated_from_chat_id={3} migrated_from_max_id={4} pinned_msg_id={5} hidden_pinned_msg_id={9} flags={6} custom_flags={7} ex {8}\",\r\n                        AccessHash, UserName, RestrictionReason, MigratedFromChatId, MigratedFromMaxId, PinnedMsgId,\r\n                        ChannelFlagsString(Flags), ChannelCustomFlagsString(CustomFlags), HiddenPinnedMsgId, ex));\r\n            }\r\n\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            var c = chat as TLChannel49;\r\n            if (c != null)\r\n            {\r\n                if (c.Min)\r\n                {\r\n                    // copy flags: broadcast, verified, megagroup, democracy\r\n                    IsBroadcast = c.IsBroadcast;\r\n                    IsVerified = c.IsVerified;\r\n                    if (IsMegaGroup && !c.IsMegaGroup)\r\n                    {\r\n\r\n                    }\r\n                    IsMegaGroup = c.IsMegaGroup;\r\n                    IsDemocracy = c.IsDemocracy;\r\n\r\n                    Id = c.Id;\r\n                    _title = c.Title;\r\n                    UserName = c.UserName;\r\n                    _photo = c.Photo;\r\n\r\n                    return;\r\n                }\r\n\r\n                if (c.PinnedMsgId != null)\r\n                {\r\n                    PinnedMsgId = c.PinnedMsgId;\r\n                }\r\n                if (c.HiddenPinnedMsgId != null)\r\n                {\r\n                    HiddenPinnedMsgId = c.HiddenPinnedMsgId;\r\n                }\r\n                if (c.ReadOutboxMaxId != null && (ReadOutboxMaxId == null || ReadOutboxMaxId.Value < c.ReadOutboxMaxId.Value))\r\n                {\r\n                    ReadOutboxMaxId = c.ReadOutboxMaxId;\r\n                }\r\n            }\r\n\r\n            base.Update(chat);\r\n        }\r\n    }\r\n\r\n    public class TLChannel44 : TLChannel\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannel44;\r\n\r\n        protected TLString _restrictionReason;\r\n\r\n        public TLString RestrictionReason\r\n        {\r\n            get { return _restrictionReason; }\r\n            set { SetField(out _restrictionReason, value, ref _flags, (int)ChannelFlags.Restricted); }\r\n        }\r\n\r\n        public bool IsRestricted\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.Restricted); }\r\n        }\r\n\r\n        public bool Silent\r\n        {\r\n            get { return IsSet(CustomFlags, (int)ChannelCustomFlags.Silent); }\r\n            set { SetUnset(ref _customFlags, value, (int)ChannelCustomFlags.Silent); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            _title = GetObject<TLString>(bytes, ref position);\r\n            if (IsSet(Flags, (int)ChannelFlags.Public))\r\n            {\r\n                UserName = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n            if (IsSet(Flags, (int)ChannelFlags.Restricted))\r\n            {\r\n                RestrictionReason = GetObject<TLString>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            //try\r\n            ////{\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            _title = GetObject<TLString>(input);\r\n            if (IsSet(Flags, (int)ChannelFlags.Public))\r\n            {\r\n                UserName = GetObject<TLString>(input);\r\n            }\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n            if (IsSet(Flags, (int)ChannelFlags.Restricted))\r\n            {\r\n                RestrictionReason = GetObject<TLString>(input);\r\n            }\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            ParticipantIds = GetNullableObject<TLVector<TLInt>>(input);\r\n            About = GetNullableObject<TLString>(input);\r\n            ParticipantsCount = GetNullableObject<TLInt>(input);\r\n            AdminsCount = GetNullableObject<TLInt>(input);\r\n            KickedCount = GetNullableObject<TLInt>(input);\r\n            ReadInboxMaxId = GetNullableObject<TLInt>(input);\r\n            Pts = GetNullableObject<TLInt>(input);\r\n            Participants = GetNullableObject<TLChatParticipantsBase>(input);\r\n            NotifySettings = GetNullableObject<TLPeerNotifySettingsBase>(input);\r\n\r\n            if (IsSet(CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId))\r\n            {\r\n                _migratedFromChatId = GetObject<TLInt>(input);\r\n            }\r\n            if (IsSet(CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId))\r\n            {\r\n                _migratedFromMaxId = GetObject<TLInt>(input);\r\n            }\r\n            //}\r\n            //catch (Exception ex)\r\n            //{\r\n            //    Execute.ShowDebugMessage(\"TLChannel44.FromStream ex \" + ex);\r\n            //}\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            try\r\n            {\r\n                output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n                output.Write(Flags.ToBytes());\r\n                output.Write(Id.ToBytes());\r\n                output.Write(AccessHash.ToBytes());\r\n                output.Write(Title.ToBytes());\r\n                if (IsSet(Flags, (int)ChannelFlags.Public))\r\n                {\r\n                    UserName.ToStream(output);\r\n                }\r\n                Photo.ToStream(output);\r\n                Date.ToStream(output);\r\n                Version.ToStream(output);\r\n                if (IsSet(Flags, (int)ChannelFlags.Restricted))\r\n                {\r\n                    RestrictionReason.ToStream(output);\r\n                }\r\n\r\n                CustomFlags.NullableToStream(output);\r\n\r\n                ParticipantIds.NullableToStream(output);\r\n                About.NullableToStream(output);\r\n                ParticipantsCount.NullableToStream(output);\r\n                AdminsCount.NullableToStream(output);\r\n                KickedCount.NullableToStream(output);\r\n                ReadInboxMaxId.NullableToStream(output);\r\n                Pts.NullableToStream(output);\r\n                Participants.NullableToStream(output);\r\n                NotifySettings.NullableToStream(output);\r\n\r\n                if (IsSet(CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId))\r\n                {\r\n                    _migratedFromChatId.ToStream(output);\r\n                }\r\n                if (IsSet(CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId))\r\n                {\r\n                    _migratedFromMaxId.ToStream(output);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\"TLChannel44.ToStream ex \" + ex);\r\n            }\r\n\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n            var c = chat as TLChannel44;\r\n            if (c != null)\r\n            {\r\n                RestrictionReason = c.RestrictionReason ?? TLString.Empty;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLChannel : TLBroadcastChat, IUserName, IInputChannel\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannel;\r\n\r\n        public bool Full { get; set; }\r\n\r\n        protected TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public virtual TLBool Left\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)ChatFlags.Left)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)ChatFlags.Left);\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        protected TLString _userName;\r\n\r\n        public TLString UserName\r\n        {\r\n            get { return _userName; }\r\n            set { SetField(out _userName, value, ref _flags, (int)ChannelFlags.Public); }\r\n        }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt Version { get; set; }\r\n\r\n        public TLString About { get; set; }\r\n\r\n        public virtual TLInt ParticipantsCount { get; set; }\r\n\r\n        public TLInt AdminsCount { get; set; }\r\n\r\n        public TLInt KickedCount { get; set; }\r\n\r\n        public TLInt ReadInboxMaxId { get; set; }\r\n\r\n        private TLInt _pts;\r\n\r\n        public TLInt Pts\r\n        {\r\n            get { return _pts; }\r\n            set { _pts = value; }\r\n        }\r\n\r\n        public override string FullName\r\n        {\r\n            get { return Title != null ? Title.ToString() : string.Empty; }\r\n        }\r\n\r\n        public bool Creator\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.Creator); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelFlags.Creator); }\r\n        }\r\n\r\n        public bool IsEditor\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.Editor); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelFlags.Editor); }\r\n        }\r\n\r\n        public bool IsModerator\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.Moderator); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelFlags.Moderator); }\r\n        }\r\n\r\n        public bool IsBroadcast\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.Broadcast); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelFlags.Broadcast); }\r\n        }\r\n\r\n        public bool IsPublic { get { return IsSet(Flags, (int)ChannelFlags.Public); } }\r\n\r\n        public bool IsKicked { get { return IsSet(Flags, (int)ChannelFlags.Kicked); } }\r\n\r\n        public bool IsVerified\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.Verified); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelFlags.Verified); }\r\n        }\r\n\r\n        public bool IsMegaGroup\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.MegaGroup); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelFlags.MegaGroup); }\r\n        }\r\n\r\n        public bool IsDemocracy\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.Democracy); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelFlags.Democracy); }\r\n        }\r\n\r\n        public bool Signatures\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.Signatures); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelFlags.Signatures); }\r\n        }\r\n\r\n        #region Additional\r\n\r\n        public virtual bool CanPinMessages\r\n        {\r\n            get\r\n            {\r\n                return Creator;\r\n            }\r\n        }\r\n\r\n        public string ChannelParticipantsFileName\r\n        {\r\n            get { return string.Format(\"{0}_participants.dat\", Id); }\r\n        }\r\n\r\n        public TLChannelParticipants ChannelParticipants { get; set; }\r\n\r\n        protected TLInt _migratedFromChatId;\r\n\r\n        public TLInt MigratedFromChatId\r\n        {\r\n            get { return _migratedFromChatId; }\r\n            set { SetField(out _migratedFromChatId, value, ref _customFlags, (int)ChannelCustomFlags.MigratedFromChatId); }\r\n        }\r\n\r\n        protected TLInt _migratedFromMaxId;\r\n\r\n        public TLInt MigratedFromMaxId\r\n        {\r\n            get { return _migratedFromMaxId; }\r\n            set { SetField(out _migratedFromMaxId, value, ref _customFlags, (int)ChannelCustomFlags.MigratedFromMaxId); }\r\n        }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            _title = GetObject<TLString>(bytes, ref position);\r\n            if (IsSet(Flags, (int)ChannelFlags.Public))\r\n            {\r\n                UserName = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            _title = GetObject<TLString>(input);\r\n            if (IsSet(Flags, (int)ChannelFlags.Public))\r\n            {\r\n                UserName = GetObject<TLString>(input);\r\n            }\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            ParticipantIds = GetNullableObject<TLVector<TLInt>>(input);\r\n            About = GetNullableObject<TLString>(input);\r\n            ParticipantsCount = GetNullableObject<TLInt>(input);\r\n            AdminsCount = GetNullableObject<TLInt>(input);\r\n            KickedCount = GetNullableObject<TLInt>(input);\r\n            ReadInboxMaxId = GetNullableObject<TLInt>(input);\r\n            Pts = GetNullableObject<TLInt>(input);\r\n            Participants = GetNullableObject<TLChatParticipantsBase>(input);\r\n            NotifySettings = GetNullableObject<TLPeerNotifySettingsBase>(input);\r\n\r\n            _migratedFromChatId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId, null, input);\r\n            _migratedFromMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            try\r\n            {\r\n                output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n                output.Write(Flags.ToBytes());\r\n                output.Write(Id.ToBytes());\r\n                output.Write(AccessHash.ToBytes());\r\n                output.Write(Title.ToBytes());\r\n                if (IsSet(Flags, (int)ChannelFlags.Public))\r\n                {\r\n                    UserName.ToStream(output);\r\n                }\r\n                Photo.ToStream(output);\r\n                Date.ToStream(output);\r\n                Version.ToStream(output);\r\n\r\n                CustomFlags.NullableToStream(output);\r\n\r\n                ParticipantIds.NullableToStream(output);\r\n                About.NullableToStream(output);\r\n                ParticipantsCount.NullableToStream(output);\r\n                AdminsCount.NullableToStream(output);\r\n                KickedCount.NullableToStream(output);\r\n                ReadInboxMaxId.NullableToStream(output);\r\n                Pts.NullableToStream(output);\r\n                Participants.NullableToStream(output);\r\n                NotifySettings.NullableToStream(output);\r\n\r\n                ToStream(output, _migratedFromChatId, CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId);\r\n                ToStream(output, _migratedFromMaxId, CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n\r\n            var c = chat as TLChannel;\r\n            if (c != null)\r\n            {\r\n                //if (c.Flags != null) Flags = c.Flags;\r\n                Creator = c.Creator;\r\n                Left = c.Left;\r\n                IsEditor = c.IsEditor;\r\n                IsBroadcast = c.IsBroadcast;\r\n                IsVerified = c.IsVerified;\r\n                IsMegaGroup = c.IsMegaGroup;\r\n                IsDemocracy = c.IsDemocracy;\r\n                Signatures = c.Signatures;\r\n\r\n                AccessHash = c.AccessHash ?? new TLLong(0);\r\n                UserName = c.UserName ?? TLString.Empty;\r\n\r\n                //if (c.CustomFlags != null) CustomFlags = c.CustomFlags;\r\n                if (c.MigratedFromChatId != null) MigratedFromChatId = c.MigratedFromChatId;\r\n                if (c.MigratedFromMaxId != null) MigratedFromMaxId = c.MigratedFromMaxId;\r\n\r\n                if (c.ParticipantIds != null) ParticipantIds = c.ParticipantIds;\r\n                if (c.About != null) About = c.About;\r\n                if (c.ParticipantsCount != null) ParticipantsCount = c.ParticipantsCount;\r\n                if (c.AdminsCount != null) AdminsCount = c.AdminsCount;\r\n                if (c.KickedCount != null) KickedCount = c.KickedCount;\r\n                if (c.ReadInboxMaxId != null) ReadInboxMaxId = c.ReadInboxMaxId;\r\n                if (c.Participants != null) Participants = c.Participants;\r\n                if (c.NotifySettings != null) NotifySettings = c.NotifySettings;\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Title + \" flags=\" + ChannelFlagsString(Flags) + \" custom_flags=\" + ChannelCustomFlagsString(CustomFlags); ;\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerChannel { ChatId = Id, AccessHash = AccessHash };\r\n        }\r\n\r\n        public TLInputChannelBase ToInputChannel()\r\n        {\r\n            return new TLInputChannel { ChannelId = Id, AccessHash = AccessHash };\r\n        }\r\n\r\n        public override string GetUnsendedTextFileName()\r\n        {\r\n            return \"ch\" + Id + \".dat\";\r\n        }\r\n\r\n        public override bool IsForbidden\r\n        {\r\n            get { return Left.Value; }\r\n        }\r\n    }\r\n\r\n    public class TLChannelForbidden : TLChatBase, IInputChannel\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelForbidden;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Title = GetObject<TLString>(input);\r\n\r\n            Participants = GetObject<TLObject>(input) as TLChatParticipantsBase;\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n\r\n            Participants.NullableToStream(output);\r\n            NotifySettings.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n            var c = chat as TLChannelForbidden;\r\n            if (c != null)\r\n            {\r\n                Id = c.Id;\r\n                AccessHash = c.AccessHash;\r\n                Title = c.Title;\r\n            }\r\n        }\r\n\r\n        public override string FullName\r\n        {\r\n            get { return Title != null ? Title.ToString() : string.Empty; }\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerChannel { ChatId = Id, AccessHash = AccessHash };\r\n        }\r\n\r\n        public TLInputChannelBase ToInputChannel()\r\n        {\r\n            return new TLInputChannel { ChannelId = Id, AccessHash = AccessHash };\r\n        }\r\n\r\n        public override string GetUnsendedTextFileName()\r\n        {\r\n            return \"ch\" + Id + \".dat\";\r\n        }\r\n\r\n        public override bool IsForbidden\r\n        {\r\n            get { return true; }\r\n        }\r\n    }\r\n\r\n    public class TLChannelForbidden53 : TLChannelForbidden, IReadMaxId\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelForbidden53;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        public bool IsBroadcast\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.Broadcast); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelFlags.Broadcast); }\r\n        }\r\n\r\n        public bool IsMegaGroup\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.MegaGroup); }\r\n            set { SetUnset(ref _flags, value, (int)ChannelFlags.MegaGroup); }\r\n        }\r\n\r\n        protected TLInt _readInboxMaxId;\r\n\r\n        public TLInt ReadInboxMaxId\r\n        {\r\n            get { return _readInboxMaxId; }\r\n            set { SetField(out _readInboxMaxId, value, ref _customFlags, (int)ChatCustomFlags.ReadInboxMaxId); }\r\n        }\r\n\r\n        protected TLInt _readOutboxMaxId;\r\n\r\n        public TLInt ReadOutboxMaxId\r\n        {\r\n            get { return _readOutboxMaxId; }\r\n            set { SetField(out _readOutboxMaxId, value, ref _customFlags, (int)ChatCustomFlags.ReadOutboxMaxId); }\r\n        }\r\n\r\n        #region Additional\r\n        public TLPhotoBase Photo { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Title = GetObject<TLString>(input);\r\n\r\n            Participants = GetObject<TLObject>(input) as TLChatParticipantsBase;\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            _readInboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.ReadInboxMaxId, null, input);\r\n            _readOutboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n\r\n            Participants.NullableToStream(output);\r\n            NotifySettings.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            ToStream(output, ReadInboxMaxId, CustomFlags, (int)ChannelCustomFlags.ReadInboxMaxId);\r\n            ToStream(output, ReadOutboxMaxId, CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId);\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n\r\n            var c = chat as TLChannelForbidden53;\r\n            if (c != null)\r\n            {\r\n                IsBroadcast = c.IsBroadcast;\r\n                IsMegaGroup = c.IsMegaGroup;\r\n\r\n                if (c.ReadInboxMaxId != null\r\n                    && (ReadInboxMaxId == null || ReadInboxMaxId.Value < c.ReadInboxMaxId.Value))\r\n                {\r\n                    ReadInboxMaxId = c.ReadInboxMaxId;\r\n                }\r\n\r\n                if (c.ReadOutboxMaxId != null\r\n                    && (ReadOutboxMaxId == null || ReadOutboxMaxId.Value < c.ReadOutboxMaxId.Value))\r\n                {\r\n                    ReadOutboxMaxId = c.ReadOutboxMaxId;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLChannelForbidden68 : TLChannelForbidden53\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelForbidden68;\r\n\r\n        protected TLInt _untilDate;\r\n\r\n        public TLInt UntilDate\r\n        {\r\n            get { return _untilDate; }\r\n            set { SetField(out _untilDate, value, ref _flags, (int)ChannelFlags.UntilDate); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            _untilDate = GetObject<TLInt>(Flags, (int)ChannelFlags.UntilDate, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Title = GetObject<TLString>(input);\r\n            _untilDate = GetObject<TLInt>(Flags, (int)ChannelFlags.UntilDate, null, input);\r\n\r\n            Participants = GetObject<TLObject>(input) as TLChatParticipantsBase;\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            _readInboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.ReadInboxMaxId, null, input);\r\n            _readOutboxMaxId = GetObject<TLInt>(CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n            ToStream(output, UntilDate, Flags, (int)ChannelFlags.UntilDate);\r\n\r\n            Participants.NullableToStream(output);\r\n            NotifySettings.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            ToStream(output, ReadInboxMaxId, CustomFlags, (int)ChannelCustomFlags.ReadInboxMaxId);\r\n            ToStream(output, ReadOutboxMaxId, CustomFlags, (int)ChannelCustomFlags.ReadOutboxMaxId);\r\n        }\r\n\r\n        public override void Update(TLChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n\r\n            var c = chat as TLChannelForbidden68;\r\n            if (c != null)\r\n            {\r\n                UntilDate = c.UntilDate;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChatFull.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ChannelFullFlags\r\n    {\r\n        ParticipantsCount = 0x1,\r\n        AdminsCount = 0x2,\r\n        KickedCount = 0x4,\r\n        CanViewParticipants = 0x8,\r\n        Migrated = 0x10,\r\n        PinnedMsgId = 0x20,\r\n        CanSetUsername = 0x40,\r\n        CanSetStickers = 0x80,\r\n        StickerSet = 0x100,\r\n        AvailableMinId = 0x200,\r\n        HiddenPrehistory = 0x400\r\n    }\r\n\r\n    public class TLChatFull : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatFull;\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLChatParticipantsBase Participants { get; set; }\r\n\r\n        public TLPhotoBase ChatPhoto { get; set; }\r\n\r\n        public TLPeerNotifySettingsBase NotifySettings { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Participants = GetObject<TLChatParticipantsBase>(bytes, ref position);\r\n            ChatPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public virtual TLChatBase ToChat(TLChatBase chat)\r\n        {\r\n            chat.NotifySettings = NotifySettings;\r\n            chat.Participants = Participants;\r\n            chat.ChatPhoto = ChatPhoto;\r\n\r\n            return chat;\r\n        }\r\n    }\r\n\r\n    public class TLChatFull28 : TLChatFull\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChatFull28;\r\n\r\n        public TLExportedChatInvite ExportedInvite { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Participants = GetObject<TLChatParticipantsBase>(bytes, ref position);\r\n            ChatPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            ExportedInvite = GetObject<TLExportedChatInvite>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChatFull31 : TLChatFull28\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChatFull31;\r\n\r\n        public TLVector<TLBotInfoBase> BotInfo { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Participants = GetObject<TLChatParticipantsBase>(bytes, ref position);\r\n            ChatPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            ExportedInvite = GetObject<TLExportedChatInvite>(bytes, ref position);\r\n            BotInfo = GetObject<TLVector<TLBotInfoBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChannelFull : TLChatFull\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelFull;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLString About { get; set; }\r\n\r\n        protected TLInt _participantsCount;\r\n\r\n        public TLInt ParticipantsCount\r\n        {\r\n            get { return _participantsCount; }\r\n            set { SetField(out _participantsCount, value, ref _flags, (int)ChannelFullFlags.ParticipantsCount); }\r\n        }\r\n\r\n        protected TLInt _adminsCount;\r\n\r\n        public TLInt AdminsCount\r\n        {\r\n            get { return _adminsCount; }\r\n            set { SetField(out _adminsCount, value, ref _flags, (int)ChannelFullFlags.AdminsCount); }\r\n        }\r\n\r\n        protected TLInt _kickedCount;\r\n\r\n        public TLInt KickedCount\r\n        {\r\n            get { return _kickedCount; }\r\n            set { SetField(out _kickedCount, value, ref _flags, (int)ChannelFullFlags.KickedCount); }\r\n        }\r\n\r\n        public TLInt ReadInboxMaxId { get; set; }\r\n\r\n        public TLInt UnreadCount { get; set; }\r\n\r\n        public TLInt UnreadImportantCount { get; set; }\r\n\r\n        public TLExportedChatInvite ExportedInvite { get; set; }\r\n\r\n        public bool CanViewParticipants { get { return IsSet(Flags, (int) ChannelFullFlags.CanViewParticipants); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            //Participants = GetObject<TLChatParticipantsBase>(bytes, ref position);\r\n            About = GetObject<TLString>(bytes, ref position);\r\n            if (IsSet(Flags, (int)ChannelFullFlags.ParticipantsCount))\r\n            {\r\n                ParticipantsCount = GetObject<TLInt>(bytes, ref position);\r\n            } \r\n            if (IsSet(Flags, (int) ChannelFullFlags.AdminsCount))\r\n            {\r\n                AdminsCount = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)ChannelFullFlags.KickedCount))\r\n            {\r\n                KickedCount = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadImportantCount = GetObject<TLInt>(bytes, ref position);        \r\n            ChatPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            ExportedInvite = GetObject<TLExportedChatInvite>(bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override TLChatBase ToChat(TLChatBase chat)\r\n        {\r\n            chat.NotifySettings = NotifySettings;\r\n            chat.Participants = Participants;\r\n            chat.ChatPhoto = ChatPhoto;\r\n\r\n            var channel = chat as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                channel.ExportedInvite = ExportedInvite;\r\n                channel.About = About;\r\n                channel.ParticipantsCount = ParticipantsCount;\r\n                channel.AdminsCount = AdminsCount;\r\n                channel.KickedCount = KickedCount;\r\n                channel.ReadInboxMaxId = ReadInboxMaxId;\r\n            }\r\n\r\n            return chat;\r\n        }\r\n    }\r\n\r\n    public class TLChannelFull41 : TLChannelFull\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelFull41;\r\n\r\n        public TLVector<TLBotInfoBase> BotInfo { get; set; }\r\n\r\n        protected TLInt _migratedFromChatId;\r\n\r\n        public TLInt MigratedFromChatId\r\n        {\r\n            get { return _migratedFromChatId; }\r\n            set { SetField(out _migratedFromChatId, value, ref _flags, (int)ChannelFullFlags.Migrated); }\r\n        }\r\n\r\n        protected TLInt _migratedFromMaxId;\r\n\r\n        public TLInt MigratedFromMaxId\r\n        {\r\n            get { return _migratedFromMaxId; }\r\n            set { SetField(out _migratedFromMaxId, value, ref _flags, (int)ChannelFullFlags.Migrated); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            //Participants = GetObject<TLChatParticipantsBase>(bytes, ref position);\r\n            About = GetObject<TLString>(bytes, ref position);\r\n            if (IsSet(Flags, (int)ChannelFullFlags.ParticipantsCount))\r\n            {\r\n                ParticipantsCount = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)ChannelFullFlags.AdminsCount))\r\n            {\r\n                AdminsCount = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)ChannelFullFlags.KickedCount))\r\n            {\r\n                KickedCount = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadImportantCount = GetObject<TLInt>(bytes, ref position);\r\n            ChatPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            ExportedInvite = GetObject<TLExportedChatInvite>(bytes, ref position);\r\n            BotInfo = GetObject<TLVector<TLBotInfoBase>>(bytes, ref position);\r\n            if (IsSet(Flags, (int)ChannelFullFlags.Migrated))\r\n            {\r\n                MigratedFromChatId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)ChannelFullFlags.Migrated))\r\n            {\r\n                MigratedFromMaxId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLChatBase ToChat(TLChatBase chat)\r\n        {\r\n            chat.NotifySettings = NotifySettings;\r\n            chat.Participants = Participants;\r\n            chat.ChatPhoto = ChatPhoto;\r\n\r\n            var channel = chat as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                channel.ExportedInvite = ExportedInvite;\r\n                channel.About = About;\r\n                channel.ParticipantsCount = ParticipantsCount;\r\n                channel.AdminsCount = AdminsCount;\r\n                channel.KickedCount = KickedCount;\r\n                channel.ReadInboxMaxId = ReadInboxMaxId;\r\n            }\r\n\r\n            return chat;\r\n        }\r\n    }\r\n\r\n    public class TLChannelFull49 : TLChannelFull41\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelFull49;\r\n\r\n        protected TLInt _pinnedMsgId;\r\n\r\n        public TLInt PinnedMsgId\r\n        {\r\n            get { return _pinnedMsgId; }\r\n            set { SetField(out _pinnedMsgId, value, ref _flags, (int)ChannelFullFlags.PinnedMsgId); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            //Participants = GetObject<TLChatParticipantsBase>(bytes, ref position);\r\n            About = GetObject<TLString>(bytes, ref position);\r\n            ParticipantsCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.ParticipantsCount, null, bytes, ref position);\r\n            AdminsCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.AdminsCount, null, bytes, ref position);\r\n            KickedCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.KickedCount, null, bytes, ref position);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadImportantCount = GetObject<TLInt>(bytes, ref position);\r\n            ChatPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            ExportedInvite = GetObject<TLExportedChatInvite>(bytes, ref position);\r\n            BotInfo = GetObject<TLVector<TLBotInfoBase>>(bytes, ref position);\r\n            MigratedFromChatId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.Migrated, null, bytes, ref position);\r\n            MigratedFromMaxId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.Migrated, null, bytes, ref position);\r\n            PinnedMsgId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.PinnedMsgId, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLChatBase ToChat(TLChatBase chat)\r\n        {\r\n            chat.NotifySettings = NotifySettings;\r\n            chat.Participants = Participants;\r\n            chat.ChatPhoto = ChatPhoto;\r\n\r\n            var channel = chat as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                channel.About = About;\r\n                channel.ParticipantsCount = ParticipantsCount;\r\n                channel.AdminsCount = AdminsCount;\r\n                channel.KickedCount = KickedCount;\r\n                channel.ReadInboxMaxId = ReadInboxMaxId;\r\n                channel.ExportedInvite = ExportedInvite;\r\n                channel.BotInfo = BotInfo;\r\n                channel.MigratedFromChatId = MigratedFromChatId;\r\n                channel.MigratedFromMaxId = MigratedFromMaxId;\r\n            }\r\n\r\n            var channel49 = chat as TLChannel49;\r\n            if (channel49 != null)\r\n            {\r\n                channel49.PinnedMsgId = PinnedMsgId;\r\n            }\r\n\r\n            return chat;\r\n        }\r\n    }\r\n\r\n    public class TLChannelFull53 : TLChannelFull49\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelFull53;\r\n\r\n        public TLInt ReadOutboxMaxId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            //Participants = GetObject<TLChatParticipantsBase>(bytes, ref position);\r\n            About = GetObject<TLString>(bytes, ref position);\r\n            ParticipantsCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.ParticipantsCount, null, bytes, ref position);\r\n            AdminsCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.AdminsCount, null, bytes, ref position);\r\n            KickedCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.KickedCount, null, bytes, ref position);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            ReadOutboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadImportantCount = new TLInt(0);\r\n            ChatPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            ExportedInvite = GetObject<TLExportedChatInvite>(bytes, ref position);\r\n            BotInfo = GetObject<TLVector<TLBotInfoBase>>(bytes, ref position);\r\n            MigratedFromChatId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.Migrated, null, bytes, ref position);\r\n            MigratedFromMaxId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.Migrated, null, bytes, ref position);\r\n            PinnedMsgId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.PinnedMsgId, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLChatBase ToChat(TLChatBase chat)\r\n        {\r\n            chat.NotifySettings = NotifySettings;\r\n            chat.Participants = Participants;\r\n            chat.ChatPhoto = ChatPhoto;\r\n\r\n            var channel = chat as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                channel.About = About;\r\n                channel.ParticipantsCount = ParticipantsCount;\r\n                channel.AdminsCount = AdminsCount;\r\n                channel.KickedCount = KickedCount;\r\n                channel.ReadInboxMaxId = ReadInboxMaxId;\r\n                channel.ExportedInvite = ExportedInvite;\r\n                channel.BotInfo = BotInfo;\r\n                channel.MigratedFromChatId = MigratedFromChatId;\r\n                channel.MigratedFromMaxId = MigratedFromMaxId;\r\n            }\r\n\r\n            var channel49 = chat as TLChannel49;\r\n            if (channel49 != null)\r\n            {\r\n                channel49.ReadOutboxMaxId = ReadOutboxMaxId;\r\n                channel49.PinnedMsgId = PinnedMsgId;\r\n            }\r\n\r\n            return chat;\r\n        }\r\n    }\r\n\r\n    public class TLChannelFull68 : TLChannelFull53\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelFull68;\r\n\r\n        protected TLInt _bannedCount;\r\n\r\n        public TLInt BannedCount\r\n        {\r\n            get { return _bannedCount; }\r\n            set { SetField(out _bannedCount, value, ref _flags, (int)ChannelFullFlags.KickedCount); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            About = GetObject<TLString>(bytes, ref position);\r\n            ParticipantsCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.ParticipantsCount, null, bytes, ref position);\r\n            _adminsCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.AdminsCount, null, bytes, ref position);            \r\n            _kickedCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.KickedCount, null, bytes, ref position);\r\n            _bannedCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.KickedCount, null, bytes, ref position);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            ReadOutboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadImportantCount = new TLInt(0);\r\n            ChatPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            ExportedInvite = GetObject<TLExportedChatInvite>(bytes, ref position);\r\n            BotInfo = GetObject<TLVector<TLBotInfoBase>>(bytes, ref position);\r\n            _migratedFromChatId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.Migrated, null, bytes, ref position);\r\n            _migratedFromMaxId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.Migrated, null, bytes, ref position);\r\n            _pinnedMsgId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.PinnedMsgId, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLChatBase ToChat(TLChatBase chat)\r\n        {\r\n            chat.NotifySettings = NotifySettings;\r\n            chat.Participants = Participants;\r\n            chat.ChatPhoto = ChatPhoto;\r\n\r\n            var channel = chat as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                channel.About = About;\r\n                channel.ParticipantsCount = ParticipantsCount;\r\n                channel.AdminsCount = AdminsCount;\r\n                channel.KickedCount = KickedCount;\r\n                channel.ReadInboxMaxId = ReadInboxMaxId;\r\n                channel.ExportedInvite = ExportedInvite;\r\n                channel.BotInfo = BotInfo;\r\n                channel.MigratedFromChatId = MigratedFromChatId;\r\n                channel.MigratedFromMaxId = MigratedFromMaxId;\r\n            }\r\n\r\n            var channel49 = chat as TLChannel49;\r\n            if (channel49 != null)\r\n            {\r\n                channel49.ReadOutboxMaxId = ReadOutboxMaxId;\r\n                channel49.PinnedMsgId = PinnedMsgId;\r\n            }\r\n\r\n            var channel68 = chat as TLChannel68;\r\n            if (channel68 != null)\r\n            {\r\n                \r\n            }\r\n\r\n            return chat;\r\n        }\r\n    }\r\n\r\n    public class TLChannelFull71 : TLChannelFull68\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelFull71;\r\n\r\n        public bool CanSetStickers\r\n        {\r\n            get { return IsSet(Flags, (int) ChannelFullFlags.CanSetStickers); }\r\n        }\r\n\r\n        protected TLStickerSetBase _stickerSet;\r\n\r\n        public TLStickerSetBase StickerSet\r\n        {\r\n            get { return _stickerSet; }\r\n            set { SetField(out _stickerSet, value, ref _flags, (int)ChannelFullFlags.StickerSet); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            About = GetObject<TLString>(bytes, ref position);\r\n            ParticipantsCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.ParticipantsCount, null, bytes, ref position);\r\n            _adminsCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.AdminsCount, null, bytes, ref position);\r\n            _kickedCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.KickedCount, null, bytes, ref position);\r\n            _bannedCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.KickedCount, null, bytes, ref position);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            ReadOutboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadImportantCount = new TLInt(0);\r\n            ChatPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            ExportedInvite = GetObject<TLExportedChatInvite>(bytes, ref position);\r\n            BotInfo = GetObject<TLVector<TLBotInfoBase>>(bytes, ref position);\r\n            _migratedFromChatId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.Migrated, null, bytes, ref position);\r\n            _migratedFromMaxId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.Migrated, null, bytes, ref position);\r\n            _pinnedMsgId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.PinnedMsgId, null, bytes, ref position);\r\n            _stickerSet = GetObject<TLStickerSetBase>(Flags, (int)ChannelFullFlags.StickerSet, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLChatBase ToChat(TLChatBase chat)\r\n        {\r\n            chat.NotifySettings = NotifySettings;\r\n            chat.Participants = Participants;\r\n            chat.ChatPhoto = ChatPhoto;\r\n\r\n            var channel = chat as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                channel.Full = true;\r\n\r\n                channel.About = About;\r\n                channel.ParticipantsCount = ParticipantsCount;\r\n                channel.AdminsCount = AdminsCount;\r\n                channel.KickedCount = KickedCount;\r\n                channel.ReadInboxMaxId = ReadInboxMaxId;\r\n                channel.ExportedInvite = ExportedInvite;\r\n                channel.BotInfo = BotInfo;\r\n                channel.MigratedFromChatId = MigratedFromChatId;\r\n                channel.MigratedFromMaxId = MigratedFromMaxId;\r\n            }\r\n\r\n            var channel49 = chat as TLChannel49;\r\n            if (channel49 != null)\r\n            {\r\n                channel49.ReadOutboxMaxId = ReadOutboxMaxId;\r\n                channel49.PinnedMsgId = PinnedMsgId;\r\n            }\r\n\r\n            var channel68 = chat as TLChannel68;\r\n            if (channel68 != null)\r\n            {\r\n                channel68.CanSetStickers = CanSetStickers;\r\n                channel68.StickerSet = StickerSet ?? new TLStickerSetEmpty();\r\n            }\r\n\r\n            return chat;\r\n        }\r\n    }\r\n\r\n    public class TLChannelFull72 : TLChannelFull71\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelFull72;\r\n\r\n        public bool HiddenPrehistory\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFullFlags.HiddenPrehistory); }\r\n        }\r\n\r\n        protected TLInt _availableMinId;\r\n\r\n        public TLInt AvailableMinId\r\n        {\r\n            get { return _availableMinId; }\r\n            set { SetField(out _availableMinId, value, ref _flags, (int)ChannelFullFlags.AvailableMinId); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            About = GetObject<TLString>(bytes, ref position);\r\n            ParticipantsCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.ParticipantsCount, null, bytes, ref position);\r\n            _adminsCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.AdminsCount, null, bytes, ref position);\r\n            _kickedCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.KickedCount, null, bytes, ref position);\r\n            _bannedCount = GetObject<TLInt>(Flags, (int)ChannelFullFlags.KickedCount, null, bytes, ref position);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            ReadOutboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadImportantCount = new TLInt(0);\r\n            ChatPhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            ExportedInvite = GetObject<TLExportedChatInvite>(bytes, ref position);\r\n            BotInfo = GetObject<TLVector<TLBotInfoBase>>(bytes, ref position);\r\n            _migratedFromChatId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.Migrated, null, bytes, ref position);\r\n            _migratedFromMaxId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.Migrated, null, bytes, ref position);\r\n            _pinnedMsgId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.PinnedMsgId, null, bytes, ref position);\r\n            _stickerSet = GetObject<TLStickerSetBase>(Flags, (int)ChannelFullFlags.StickerSet, null, bytes, ref position);\r\n            _availableMinId = GetObject<TLInt>(Flags, (int)ChannelFullFlags.AvailableMinId, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLChatBase ToChat(TLChatBase chat)\r\n        {\r\n            chat.NotifySettings = NotifySettings;\r\n            chat.Participants = Participants;\r\n            chat.ChatPhoto = ChatPhoto;\r\n\r\n            var channel = chat as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                channel.Full = true;\r\n\r\n                channel.About = About;\r\n                channel.ParticipantsCount = ParticipantsCount;\r\n                channel.AdminsCount = AdminsCount;\r\n                channel.KickedCount = KickedCount;\r\n                channel.ReadInboxMaxId = ReadInboxMaxId;\r\n                channel.ExportedInvite = ExportedInvite;\r\n                channel.BotInfo = BotInfo;\r\n                channel.MigratedFromChatId = MigratedFromChatId;\r\n                channel.MigratedFromMaxId = MigratedFromMaxId;\r\n            }\r\n\r\n            var channel49 = chat as TLChannel49;\r\n            if (channel49 != null)\r\n            {\r\n                channel49.ReadOutboxMaxId = ReadOutboxMaxId;\r\n                channel49.PinnedMsgId = PinnedMsgId;\r\n            }\r\n\r\n            var channel68 = chat as TLChannel68;\r\n            if (channel68 != null)\r\n            {\r\n                channel68.CanSetStickers = CanSetStickers;\r\n                channel68.StickerSet = StickerSet ?? new TLStickerSetEmpty();\r\n\r\n                channel68.HiddenPrehistory = HiddenPrehistory;\r\n                channel68.AvailableMinId = AvailableMinId;\r\n            }\r\n\r\n            return chat;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChatInvite.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ChatInviteFlags\r\n    {\r\n        Channel = 0x1,\r\n        Broadcast = 0x2,\r\n        Public = 0x4,\r\n        MegaGroup = 0x8,\r\n        Participants = 0x10,\r\n    }\r\n\r\n    public abstract class TLChatInviteBase : TLObject { }\r\n\r\n    public abstract class TLExportedChatInvite : TLChatInviteBase { }\r\n\r\n    public class TLChatInviteEmpty : TLExportedChatInvite\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatInviteEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLChatInviteExported : TLExportedChatInvite\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatInviteExported;\r\n\r\n        public TLString Link { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Link = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Link.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Link = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Link.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLChatInviteAlready : TLChatInviteBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatInviteAlready;\r\n\r\n        public TLChatBase Chat { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Chat = GetObject<TLChatBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Chat.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Chat = GetObject<TLChatBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Chat.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLChatInvite : TLChatInviteBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatInvite;\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Title.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Title = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Title.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLChatInvite40 : TLChatInvite\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChatInvite40;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public bool IsChannel { get { return IsSet(Flags, (int) ChatInviteFlags.Channel); } }\r\n\r\n        public bool IsBroadcast { get { return IsSet(Flags, (int)ChatInviteFlags.Broadcast); } }\r\n\r\n        public bool IsPublic { get { return IsSet(Flags, (int)ChatInviteFlags.Public); } }\r\n\r\n        public bool IsMegaGroup { get { return IsSet(Flags, (int)ChatInviteFlags.MegaGroup); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Title.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Title = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n        }\r\n    }\r\n    \r\n    public class TLChatInvite54 : TLChatInvite40\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChatInvite54;\r\n\r\n        public TLPhotoBase Photo { get; set; }\r\n\r\n        public TLInt ParticipantsCount { get; set; }\r\n\r\n        public TLVector<TLUserBase> Participants { get; set; }\r\n\r\n        public static string ChatInviteFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (ChatInviteFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLChatInvite54 flags=\" + ChatInviteFlagsString(Flags);\r\n        }\r\n\r\n        #region Additional\r\n        public TLChatBase Chat { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            ParticipantsCount = GetObject<TLInt>(bytes, ref position);\r\n            Participants = GetObject<TLVector<TLUserBase>>(Flags, (int) ChatInviteFlags.Participants, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Title.ToBytes(),\r\n                Photo.ToBytes(),\r\n                ParticipantsCount.ToBytes(),\r\n                ToBytes(Participants, Flags, (int) ChatInviteFlags.Participants));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Photo = GetObject<TLPhotoBase>(input);\r\n            ParticipantsCount = GetObject<TLInt>(input);\r\n            Participants = GetObject<TLVector<TLUserBase>>(Flags, (int) ChatInviteFlags.Participants, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n            output.Write(Photo.ToBytes());\r\n            output.Write(ParticipantsCount.ToBytes());\r\n            ToStream(output, Participants, Flags, (int) ChatInviteFlags.Participants);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChatParticipant.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public interface IInviter\r\n    {\r\n        TLInt InviterId { get; set; }\r\n\r\n        TLInt Date { get; set; }\r\n    }\r\n\r\n    public abstract class TLChatParticipantBase : TLObject\r\n    {\r\n        public TLInt UserId { get; set; }\r\n    }\r\n\r\n    public class TLChatParticipant : TLChatParticipantBase, IInviter\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatParticipant;\r\n\r\n        public TLInt InviterId { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            InviterId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            InviterId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(InviterId.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLChatParticipantCreator : TLChatParticipantBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatParticipantCreator;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLChatParticipantAdmin : TLChatParticipantBase, IInviter\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatParticipantAdmin;\r\n\r\n        public TLInt InviterId { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            InviterId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            InviterId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(InviterId.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChatParticipants.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public enum ChatParticipantsFlags\r\n    {\r\n        Self = 0x1,\r\n    }\r\n\r\n    public abstract class TLChatParticipantsBase : TLObject\r\n    {\r\n        public TLInt ChatId { get; set; }\r\n    }\r\n\r\n    public class TLChatParticipantsForbidden37 : TLChatParticipantsForbidden\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChatParticipantsForbidden37;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLChatParticipantBase SelfParticipant { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            if (IsSet(Flags, (int) ChatParticipantsFlags.Self))\r\n            {\r\n                SelfParticipant = GetObject<TLChatParticipantBase>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            ChatId = GetObject<TLInt>(input);\r\n            if (IsSet(Flags, (int)ChatParticipantsFlags.Self))\r\n            {\r\n                SelfParticipant = GetObject<TLChatParticipantBase>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(ChatId.ToBytes());\r\n            if (IsSet(Flags, (int)ChatParticipantsFlags.Self))\r\n            {\r\n                SelfParticipant.ToStream(output);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLChatParticipantsForbidden : TLChatParticipantsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatParticipantsForbidden;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(ChatId.ToBytes());\r\n        }\r\n    }\r\n\r\n    public interface IChatParticipants\r\n    {\r\n        TLInt ChatId { get; set; }\r\n\r\n        TLVector<TLChatParticipantBase> Participants { get; set; }\r\n\r\n        TLInt Version { get; set; }\r\n    }\r\n\r\n    public class TLChatParticipants : TLChatParticipantsBase, IChatParticipants\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatParticipants;\r\n\r\n        public TLInt AdminId { get; set; }\r\n\r\n        public TLVector<TLChatParticipantBase> Participants { get; set; }\r\n\r\n        public TLInt Version { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            AdminId = GetObject<TLInt>(bytes, ref position);\r\n            Participants = GetObject<TLVector<TLChatParticipantBase>>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            AdminId = GetObject<TLInt>(input);\r\n            Participants = GetObject<TLVector<TLChatParticipantBase>>(input);\r\n            Version = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(ChatId.ToBytes());\r\n            output.Write(AdminId.ToBytes());\r\n            Participants.ToStream(output);\r\n            output.Write(Version.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLChatParticipants40 : TLChatParticipantsBase, IChatParticipants\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatParticipants40;\r\n\r\n        public TLVector<TLChatParticipantBase> Participants { get; set; }\r\n\r\n        public TLInt Version { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            Participants = GetObject<TLVector<TLChatParticipantBase>>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            Participants = GetObject<TLVector<TLChatParticipantBase>>(input);\r\n            Version = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(ChatId.ToBytes());\r\n            Participants.ToStream(output);\r\n            output.Write(Version.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipants40 : TLChatParticipantsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipants40;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLChatParticipantBase SelfParticipant { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            if (IsSet(Flags, (int)ChatParticipantsFlags.Self))\r\n            {\r\n                SelfParticipant = GetObject<TLChatParticipantBase>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            ChatId = GetObject<TLInt>(input);\r\n            if (IsSet(Flags, (int)ChatParticipantsFlags.Self))\r\n            {\r\n                SelfParticipant = GetObject<TLChatParticipantBase>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(ChatId.ToBytes());\r\n            if (IsSet(Flags, (int)ChatParticipantsFlags.Self))\r\n            {\r\n                SelfParticipant.ToStream(output);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChatSettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ChatSettingsFlags\r\n    {\r\n        AutoDownloadPhotoPrivateChats = 0x1,        // 0\r\n        AutoDownloadPhotoGroups = 0x2,              // 1\r\n        AutoDownloadAudioPrivateChats = 0x4,        // 2\r\n        AutoDownloadAudioGroups = 0x8,              // 3\r\n        AutoDownloadGifPrivateChats = 0x10,\r\n        AutoDownloadGifGroups = 0x20,\r\n        AutoPlayGif = 0x40\r\n    }\r\n\r\n    public class TLChatSettings : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatSettings;\r\n\r\n        private TLLong _flags;\r\n\r\n        public TLLong Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool AutoDownloadPhotoPrivateChats\r\n        {\r\n            get { return IsSet(Flags, (int) ChatSettingsFlags.AutoDownloadPhotoPrivateChats); }\r\n            set { SetUnset(ref _flags, value, (int)ChatSettingsFlags.AutoDownloadPhotoPrivateChats); }\r\n        }\r\n\r\n        public bool AutoDownloadPhotoGroups\r\n        {\r\n            get { return IsSet(Flags, (int)ChatSettingsFlags.AutoDownloadPhotoGroups); }\r\n            set { SetUnset(ref _flags, value, (int)ChatSettingsFlags.AutoDownloadPhotoGroups); }\r\n        }\r\n\r\n        public bool AutoDownloadAudioPrivateChats\r\n        {\r\n            get { return IsSet(Flags, (int)ChatSettingsFlags.AutoDownloadAudioPrivateChats); }\r\n            set { SetUnset(ref _flags, value, (int)ChatSettingsFlags.AutoDownloadAudioPrivateChats); }\r\n        }\r\n\r\n        public bool AutoDownloadAudioGroups\r\n        {\r\n            get { return IsSet(Flags, (int)ChatSettingsFlags.AutoDownloadAudioGroups); }\r\n            set { SetUnset(ref _flags, value, (int)ChatSettingsFlags.AutoDownloadAudioGroups); }\r\n        }\r\n\r\n        public bool AutoDownloadGifPrivateChats\r\n        {\r\n            get { return IsSet(Flags, (int)ChatSettingsFlags.AutoDownloadGifPrivateChats); }\r\n            set { SetUnset(ref _flags, value, (int)ChatSettingsFlags.AutoDownloadGifPrivateChats); }\r\n        }\r\n\r\n        public bool AutoDownloadGifGroups\r\n        {\r\n            get { return IsSet(Flags, (int)ChatSettingsFlags.AutoDownloadGifGroups); }\r\n            set { SetUnset(ref _flags, value, (int)ChatSettingsFlags.AutoDownloadGifGroups); }\r\n        }\r\n\r\n        public bool AutoPlayGif\r\n        {\r\n            get { return IsSet(Flags, (int)ChatSettingsFlags.AutoPlayGif); }\r\n            set { SetUnset(ref _flags, value, (int)ChatSettingsFlags.AutoPlayGif); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature), Flags.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChats.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLChatsBase : TLObject\r\n    {\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n    }\r\n\r\n    public class TLChats : TLChatsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChats;\r\n\r\n        public TLVector<TLUserBase> Users { get; set; } \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChats24 : TLChatsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChats24;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChatsSlice : TLChatsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatsSlice;\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLChatsSlice59 : TLChatsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatsSlice59;\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLChatsSlice.cs",
    "content": "﻿namespace Telegram.Api.TL\r\n{\r\n    public class TLChatsSlice : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatsSlice;\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; } \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLCheckedPhone.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLCheckedPhoneBase : TLObject\r\n    {\r\n        public TLBool PhoneRegistered { get; set; }\r\n    }\r\n\r\n    public class TLCheckedPhone : TLCheckedPhoneBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLCheckedPhone;\r\n\r\n        public TLBool PhoneInvited { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhoneRegistered = GetObject<TLBool>(bytes, ref position);\r\n            PhoneInvited = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLCheckedPhone24 : TLCheckedPhoneBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLCheckedPhone24;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhoneRegistered = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLClientDHInnerData.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLClientDHInnerData : TLObject\r\n    {\r\n        public const string Signature = \"#6643b654\";\r\n\r\n        public TLInt128 Nonce { get; set; }\r\n\r\n        public TLInt128 ServerNonce { get; set; }\r\n\r\n        public TLLong RetryId { get; set; }\r\n\r\n        public TLString GB { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Nonce.ToBytes(),\r\n                ServerNonce.ToBytes(),\r\n                RetryId.ToBytes(),\r\n                GB.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLCodeType.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLCodeTypeBase : TLObject\r\n    {\r\n    }\r\n\r\n    public class TLCodeTypeSms : TLCodeTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLCodeTypeSms;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLCodeTypeCall : TLCodeTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLCodeTypeCall;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLCodeTypeFlashCall : TLCodeTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLCodeTypeFlashCall;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLConfig.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Runtime.Serialization;\r\nusing System.Text;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ConfigFlags\r\n    {\r\n        TmpSessions = 0x1,              // 0\r\n        PhoneCallsEnabled = 0x2,        // 1\r\n        Lang = 0x4,                     // 2\r\n        DefaultP2PContacts = 0x8,       // 3\r\n        PreloadFeaturedStickers = 0x10, // 4\r\n        IgnorePhoneEntities = 0x20,     // 5\r\n        RevokePmInbox = 0x40,           // 6\r\n        AutoupdateUrlPrefix = 0x80,     // 7\r\n        BlockedMode = 0x100,            // 8\r\n        GifSearchUsername = 0x200,      // 9\r\n        VenueSearchUsername = 0x400,    // 10\r\n        ImgSearchUsername = 0x800,      // 11\r\n        StaticMapsProvider = 0x1000,    // 12\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLConfig;\r\n\r\n        [DataMember]\r\n        public TLInt Date { get; set; }\r\n\r\n        [DataMember]\r\n        public TLBool TestMode { get; set; }\r\n\r\n        /// <summary>\r\n        /// Номер датацентра, ему может соответствовать несколько записей в DCOptions\r\n        /// </summary>\r\n        [DataMember]\r\n        public TLInt ThisDC { get; set; }\r\n\r\n        [DataMember]\r\n        public TLVector<TLDCOption> DCOptions { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt ChatSizeMax { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt BroadcastSizeMax { get; set; }\r\n\r\n        #region Additional\r\n        /// <summary>\r\n        /// Время последней загрузки config\r\n        /// </summary>\r\n        [DataMember]\r\n        public DateTime LastUpdate { get; set; }\r\n\r\n        /// <summary>\r\n        /// Номер конкретного датацентра внутри списка DCOptions, однозначно определяет текущий датацентр\r\n        /// </summary>\r\n        [DataMember]\r\n        public int ActiveDCOptionIndex { get; set; }\r\n\r\n        [DataMember]\r\n        public string Country { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public static TLConfig Merge(TLConfig oldConfig, TLConfig newConfig)\r\n        {\r\n            if (oldConfig == null)\r\n                return newConfig;\r\n\r\n            if (newConfig == null)\r\n                return oldConfig;\r\n\r\n            foreach (var dcOption in oldConfig.DCOptions)\r\n            {\r\n                if (dcOption.AuthKey != null)\r\n                {\r\n                    var option = dcOption;\r\n                    foreach (var newDCOption in newConfig.DCOptions.Where(x => x.AreEquals(option)))\r\n                    {\r\n                        newDCOption.AuthKey = dcOption.AuthKey;\r\n                        newDCOption.Salt = dcOption.Salt;\r\n                        newDCOption.SessionId = dcOption.SessionId;\r\n                        newDCOption.ClientTicksDelta = dcOption.ClientTicksDelta;\r\n                    }\r\n                }\r\n            }\r\n            if (!string.IsNullOrEmpty(oldConfig.Country))\r\n            {\r\n                newConfig.Country = oldConfig.Country;\r\n            }\r\n            if (oldConfig.ActiveDCOptionIndex != default(int))\r\n            {\r\n                var oldActiveDCOption = oldConfig.DCOptions[oldConfig.ActiveDCOptionIndex];\r\n                var dcId = oldConfig.DCOptions[oldConfig.ActiveDCOptionIndex].Id.Value;\r\n                var ipv6 = oldActiveDCOption.IPv6.Value;\r\n                var media = oldActiveDCOption.Media.Value;\r\n\r\n                TLDCOption newActiveDCOption = null;\r\n                int newActiveDCOptionIndex = 0;\r\n                for (var i = 0; i < newConfig.DCOptions.Count; i++)\r\n                {\r\n                    if (newConfig.DCOptions[i].Id.Value == dcId\r\n                        && newConfig.DCOptions[i].IPv6.Value == ipv6\r\n                        && newConfig.DCOptions[i].Media.Value == media)\r\n                    {\r\n                        newActiveDCOption = newConfig.DCOptions[i];\r\n                        newActiveDCOptionIndex = i;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (newActiveDCOption == null)\r\n                {\r\n                    for (var i = 0; i < newConfig.DCOptions.Count; i++)\r\n                    {\r\n                        if (newConfig.DCOptions[i].Id.Value == dcId)\r\n                        {\r\n                            newActiveDCOption = newConfig.DCOptions[i];\r\n                            newActiveDCOptionIndex = i;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                newConfig.ActiveDCOptionIndex = newActiveDCOptionIndex;\r\n            }\r\n            if (oldConfig.LastUpdate != default(DateTime))\r\n            {\r\n                newConfig.LastUpdate = oldConfig.LastUpdate;\r\n            }\r\n\r\n            return newConfig;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"BroadcastSizeMax {0}\", BroadcastSizeMax));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig23 : TLConfig\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig23;\r\n\r\n        [DataMember]\r\n        public TLInt Expires { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt ChatBigSize { get; set; }\r\n\r\n        [DataMember]\r\n        public TLVector<TLDisabledFeature> DisabledFeatures { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"BroadcastSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig24 : TLConfig23\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig24;\r\n\r\n        [DataMember]\r\n        public TLInt OnlineUpdatePeriodMs { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt OfflineBlurTimeoutMs { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt OfflineIdleTimeoutMs { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt OnlineCloudTimeoutMs { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt NotifyCloudDelayMs { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt NotifyDefaultDelayMs { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"BroadcastSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig26 : TLConfig24\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig26;\r\n\r\n        [DataMember]\r\n        public TLInt ForwardedCountMax { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"BroadcastSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig28 : TLConfig26\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig28;\r\n\r\n        [DataMember]\r\n        public TLInt PushChatPeriodMs { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt PushChatLimit { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"BroadcastSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig41 : TLConfig28\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig41;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig44 : TLConfig41\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig44;\r\n\r\n        [DataMember]\r\n        public TLInt SavedGifsLimit { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig48 : TLConfig44\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig48;\r\n\r\n        [DataMember]\r\n        public TLInt EditTimeLimit { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig52 : TLConfig48\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig52;\r\n\r\n        [DataMember]\r\n        public TLInt RatingEDecay { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig54 : TLConfig52\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig54;\r\n\r\n        [DataMember]\r\n        public TLInt StickersRecentLimit { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            StickersRecentLimit = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"StickersRecentLimit {0}\", StickersRecentLimit));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig55 : TLConfig54\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig55;\r\n\r\n        protected TLInt _flags;\r\n\r\n        [DataMember]\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        [DataMember]\r\n        public TLInt TmpSessions { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            StickersRecentLimit = GetObject<TLInt>(bytes, ref position);\r\n            TmpSessions = GetObject<TLInt>(Flags, (int)ConfigFlags.TmpSessions, null, bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public static string ConfigFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (ConfigFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Flags {0}\", ConfigFlagsString(Flags)));\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"StickersRecentLimit {0}\", StickersRecentLimit));\r\n            sb.AppendLine(string.Format(\"TmpSessions {0}\", TmpSessions));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig60 : TLConfig55\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig60;\r\n\r\n        public bool PhoneCallsEnabled { get { return IsSet(Flags, (int)ConfigFlags.PhoneCallsEnabled); } }\r\n\r\n        [DataMember]\r\n        public TLInt CallReceiveTimeoutMs { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt CallRingTimeoutMs { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt CallConnectTimeoutMs { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt CallPacketTimeoutMs { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            StickersRecentLimit = GetObject<TLInt>(bytes, ref position);\r\n            TmpSessions = GetObject<TLInt>(Flags, (int)ConfigFlags.TmpSessions, null, bytes, ref position);\r\n            CallReceiveTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallRingTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallConnectTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallPacketTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Flags {0}\", ConfigFlagsString(Flags)));\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"StickersRecentLimit {0}\", StickersRecentLimit));\r\n            sb.AppendLine(string.Format(\"TmpSessions {0}\", TmpSessions));\r\n            sb.AppendLine(string.Format(\"CallReceiveTimeoutMs {0}\", CallReceiveTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallRingTimeoutMs {0}\", CallRingTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallConnectTimeoutMs {0}\", CallConnectTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallPacketTimeoutMs {0}\", CallPacketTimeoutMs));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig61 : TLConfig60\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig61;\r\n\r\n        [DataMember]\r\n        public TLInt PinnedDialogsCountMax { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            StickersRecentLimit = GetObject<TLInt>(bytes, ref position);\r\n            TmpSessions = GetObject<TLInt>(Flags, (int)ConfigFlags.TmpSessions, null, bytes, ref position);\r\n            PinnedDialogsCountMax = GetObject<TLInt>(bytes, ref position);\r\n            CallReceiveTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallRingTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallConnectTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallPacketTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Flags {0}\", ConfigFlagsString(Flags)));\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"StickersRecentLimit {0}\", StickersRecentLimit));\r\n            sb.AppendLine(string.Format(\"TmpSessions {0}\", TmpSessions));\r\n            sb.AppendLine(string.Format(\"PinnedDialogsCountMax {0}\", PinnedDialogsCountMax));\r\n            sb.AppendLine(string.Format(\"CallReceiveTimeoutMs {0}\", CallReceiveTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallRingTimeoutMs {0}\", CallRingTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallConnectTimeoutMs {0}\", CallConnectTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallPacketTimeoutMs {0}\", CallPacketTimeoutMs));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig63 : TLConfig61\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig63;\r\n\r\n        [DataMember]\r\n        public TLString MeUrlPrefix { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            StickersRecentLimit = GetObject<TLInt>(bytes, ref position);\r\n            TmpSessions = GetObject<TLInt>(Flags, (int)ConfigFlags.TmpSessions, null, bytes, ref position);\r\n            PinnedDialogsCountMax = GetObject<TLInt>(bytes, ref position);\r\n            CallReceiveTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallRingTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallConnectTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallPacketTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            MeUrlPrefix = GetObject<TLString>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Flags {0}\", ConfigFlagsString(Flags)));\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"StickersRecentLimit {0}\", StickersRecentLimit));\r\n            sb.AppendLine(string.Format(\"TmpSessions {0}\", TmpSessions));\r\n            sb.AppendLine(string.Format(\"PinnedDialogsCountMax {0}\", PinnedDialogsCountMax));\r\n            sb.AppendLine(string.Format(\"CallReceiveTimeoutMs {0}\", CallReceiveTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallRingTimeoutMs {0}\", CallRingTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallConnectTimeoutMs {0}\", CallConnectTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallPacketTimeoutMs {0}\", CallPacketTimeoutMs));\r\n            sb.AppendLine(string.Format(\"MeUrlPrefix {0}\", MeUrlPrefix));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig67 : TLConfig63\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig67;\r\n\r\n        protected TLString _suggestedLangCode;\r\n\r\n        [DataMember]\r\n        public TLString SuggestedLangCode\r\n        {\r\n            get { return _suggestedLangCode; }\r\n            set { SetField(out _suggestedLangCode, value, ref _flags, (int)ConfigFlags.Lang); }\r\n        }\r\n\r\n        protected TLInt _langPackVersion;\r\n\r\n        [DataMember]\r\n        public TLInt LangPackVersion\r\n        {\r\n            get { return _langPackVersion; }\r\n            set { SetField(out _langPackVersion, value, ref _flags, (int)ConfigFlags.Lang); }\r\n        }\r\n\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            StickersRecentLimit = GetObject<TLInt>(bytes, ref position);\r\n            TmpSessions = GetObject<TLInt>(Flags, (int)ConfigFlags.TmpSessions, null, bytes, ref position);\r\n            PinnedDialogsCountMax = GetObject<TLInt>(bytes, ref position);\r\n            CallReceiveTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallRingTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallConnectTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallPacketTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            MeUrlPrefix = GetObject<TLString>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n            _suggestedLangCode = GetObject<TLString>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n            _langPackVersion = GetObject<TLInt>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Flags {0}\", ConfigFlagsString(Flags)));\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"StickersRecentLimit {0}\", StickersRecentLimit));\r\n            sb.AppendLine(string.Format(\"TmpSessions {0}\", TmpSessions));\r\n            sb.AppendLine(string.Format(\"PinnedDialogsCountMax {0}\", PinnedDialogsCountMax));\r\n            sb.AppendLine(string.Format(\"CallReceiveTimeoutMs {0}\", CallReceiveTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallRingTimeoutMs {0}\", CallRingTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallConnectTimeoutMs {0}\", CallConnectTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallPacketTimeoutMs {0}\", CallPacketTimeoutMs));\r\n            sb.AppendLine(string.Format(\"MeUrlPrefix {0}\", MeUrlPrefix));\r\n            sb.AppendLine(string.Format(\"SuggestedLangCode {0}\", SuggestedLangCode));\r\n            sb.AppendLine(string.Format(\"LangPackVersion {0}\", LangPackVersion));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig71 : TLConfig67\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig71;\r\n\r\n        [DataMember]\r\n        public TLInt StickersFavedLimit { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            StickersRecentLimit = GetObject<TLInt>(bytes, ref position);\r\n            StickersFavedLimit = GetObject<TLInt>(bytes, ref position);\r\n            TmpSessions = GetObject<TLInt>(Flags, (int)ConfigFlags.TmpSessions, null, bytes, ref position);\r\n            PinnedDialogsCountMax = GetObject<TLInt>(bytes, ref position);\r\n            CallReceiveTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallRingTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallConnectTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallPacketTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            MeUrlPrefix = GetObject<TLString>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n            _suggestedLangCode = GetObject<TLString>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n            _langPackVersion = GetObject<TLInt>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Flags {0}\", ConfigFlagsString(Flags)));\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"StickersRecentLimit {0}\", StickersRecentLimit));\r\n            sb.AppendLine(string.Format(\"StickersFavedLimit {0}\", StickersFavedLimit));\r\n            sb.AppendLine(string.Format(\"TmpSessions {0}\", TmpSessions));\r\n            sb.AppendLine(string.Format(\"PinnedDialogsCountMax {0}\", PinnedDialogsCountMax));\r\n            sb.AppendLine(string.Format(\"CallReceiveTimeoutMs {0}\", CallReceiveTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallRingTimeoutMs {0}\", CallRingTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallConnectTimeoutMs {0}\", CallConnectTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallPacketTimeoutMs {0}\", CallPacketTimeoutMs));\r\n            sb.AppendLine(string.Format(\"MeUrlPrefix {0}\", MeUrlPrefix));\r\n            sb.AppendLine(string.Format(\"SuggestedLangCode {0}\", SuggestedLangCode));\r\n            sb.AppendLine(string.Format(\"LangPackVersion {0}\", LangPackVersion));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig72 : TLConfig71\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig72;\r\n\r\n        [DataMember]\r\n        public TLInt ChannelsReadMediaPeriod { get; set; }\r\n\r\n        public bool PreloadFeaturedStickers { get { return IsSet(Flags, (int)ConfigFlags.PreloadFeaturedStickers); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = GetObject<TLInt>(bytes, ref position);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            StickersRecentLimit = GetObject<TLInt>(bytes, ref position);\r\n            StickersFavedLimit = GetObject<TLInt>(bytes, ref position);\r\n            ChannelsReadMediaPeriod = GetObject<TLInt>(bytes, ref position);\r\n            TmpSessions = GetObject<TLInt>(Flags, (int)ConfigFlags.TmpSessions, null, bytes, ref position);\r\n            PinnedDialogsCountMax = GetObject<TLInt>(bytes, ref position);\r\n            CallReceiveTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallRingTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallConnectTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallPacketTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            MeUrlPrefix = GetObject<TLString>(bytes, ref position);\r\n            DisabledFeatures = GetObject<TLVector<TLDisabledFeature>>(bytes, ref position);\r\n            _suggestedLangCode = GetObject<TLString>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n            _langPackVersion = GetObject<TLInt>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Flags {0}\", ConfigFlagsString(Flags)));\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"ChatBigSize {0}\", ChatBigSize));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"StickersRecentLimit {0}\", StickersRecentLimit));\r\n            sb.AppendLine(string.Format(\"StickersFavedLimit {0}\", StickersFavedLimit));\r\n            sb.AppendLine(string.Format(\"ChannelsReadMediaPeriod {0}\", ChannelsReadMediaPeriod));\r\n            sb.AppendLine(string.Format(\"TmpSessions {0}\", TmpSessions));\r\n            sb.AppendLine(string.Format(\"PinnedDialogsCountMax {0}\", PinnedDialogsCountMax));\r\n            sb.AppendLine(string.Format(\"CallReceiveTimeoutMs {0}\", CallReceiveTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallRingTimeoutMs {0}\", CallRingTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallConnectTimeoutMs {0}\", CallConnectTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallPacketTimeoutMs {0}\", CallPacketTimeoutMs));\r\n            sb.AppendLine(string.Format(\"MeUrlPrefix {0}\", MeUrlPrefix));\r\n            sb.AppendLine(string.Format(\"SuggestedLangCode {0}\", SuggestedLangCode));\r\n            sb.AppendLine(string.Format(\"LangPackVersion {0}\", LangPackVersion));\r\n            sb.AppendLine(string.Format(\"DisabledFeatures {0}\", DisabledFeatures.Count));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig76 : TLConfig72\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig76;\r\n\r\n        [DataMember]\r\n        public TLInt RevokeTimeLimit { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt RevokePmTimeLimit { get; set; }\r\n\r\n        public bool IgnorePhoneEntities { get { return IsSet(Flags, (int)ConfigFlags.IgnorePhoneEntities); } }\r\n\r\n        public bool RevokePmInbox { get { return IsSet(Flags, (int)ConfigFlags.RevokePmInbox); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = new TLInt(int.MaxValue);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RevokeTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RevokePmTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            StickersRecentLimit = GetObject<TLInt>(bytes, ref position);\r\n            StickersFavedLimit = GetObject<TLInt>(bytes, ref position);\r\n            ChannelsReadMediaPeriod = GetObject<TLInt>(bytes, ref position);\r\n            TmpSessions = GetObject<TLInt>(Flags, (int)ConfigFlags.TmpSessions, null, bytes, ref position);\r\n            PinnedDialogsCountMax = GetObject<TLInt>(bytes, ref position);\r\n            CallReceiveTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallRingTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallConnectTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallPacketTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            MeUrlPrefix = GetObject<TLString>(bytes, ref position);\r\n            DisabledFeatures = new TLVector<TLDisabledFeature>();\r\n            _suggestedLangCode = GetObject<TLString>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n            _langPackVersion = GetObject<TLInt>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Flags {0}\", ConfigFlagsString(Flags)));\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RevokeTimeLimit {0}\", RevokeTimeLimit));\r\n            sb.AppendLine(string.Format(\"RevokePmTimeLimit {0}\", RevokePmTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"StickersRecentLimit {0}\", StickersRecentLimit));\r\n            sb.AppendLine(string.Format(\"StickersFavedLimit {0}\", StickersFavedLimit));\r\n            sb.AppendLine(string.Format(\"ChannelsReadMediaPeriod {0}\", ChannelsReadMediaPeriod));\r\n            sb.AppendLine(string.Format(\"TmpSessions {0}\", TmpSessions));\r\n            sb.AppendLine(string.Format(\"PinnedDialogsCountMax {0}\", PinnedDialogsCountMax));\r\n            sb.AppendLine(string.Format(\"CallReceiveTimeoutMs {0}\", CallReceiveTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallRingTimeoutMs {0}\", CallRingTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallConnectTimeoutMs {0}\", CallConnectTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallPacketTimeoutMs {0}\", CallPacketTimeoutMs));\r\n            sb.AppendLine(string.Format(\"MeUrlPrefix {0}\", MeUrlPrefix));\r\n            sb.AppendLine(string.Format(\"SuggestedLangCode {0}\", SuggestedLangCode));\r\n            sb.AppendLine(string.Format(\"LangPackVersion {0}\", LangPackVersion));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig78 : TLConfig76\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig78;\r\n\r\n        protected TLString _autoupdateUrlPrefix;\r\n\r\n        [DataMember]\r\n        public TLString AutoupdateUrlPrefix\r\n        {\r\n            get { return _autoupdateUrlPrefix; }\r\n            set { SetField(out _autoupdateUrlPrefix, value, ref _flags, (int)ConfigFlags.AutoupdateUrlPrefix); }\r\n        }\r\n\r\n        public bool BlockedMode { get { return IsSet(Flags, (int)ConfigFlags.BlockedMode); } }\r\n\r\n        public bool DefaultP2PContacts { get { return IsSet(Flags, (int)ConfigFlags.DefaultP2PContacts); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = new TLInt(int.MaxValue);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RevokeTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RevokePmTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            StickersRecentLimit = GetObject<TLInt>(bytes, ref position);\r\n            StickersFavedLimit = GetObject<TLInt>(bytes, ref position);\r\n            ChannelsReadMediaPeriod = GetObject<TLInt>(bytes, ref position);\r\n            TmpSessions = GetObject<TLInt>(Flags, (int)ConfigFlags.TmpSessions, null, bytes, ref position);\r\n            PinnedDialogsCountMax = GetObject<TLInt>(bytes, ref position);\r\n            CallReceiveTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallRingTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallConnectTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallPacketTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            MeUrlPrefix = GetObject<TLString>(bytes, ref position);\r\n            _autoupdateUrlPrefix = GetObject<TLString>(_flags, (int)ConfigFlags.AutoupdateUrlPrefix, null, bytes, ref position);\r\n            DisabledFeatures = new TLVector<TLDisabledFeature>();\r\n            _suggestedLangCode = GetObject<TLString>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n            _langPackVersion = GetObject<TLInt>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Flags {0}\", ConfigFlagsString(Flags)));\r\n            sb.AppendLine(string.Format(\"PhoneCallsEnabled {0}\", PhoneCallsEnabled));\r\n            sb.AppendLine(string.Format(\"DefaultP2PContacts {0}\", DefaultP2PContacts));\r\n            sb.AppendLine(string.Format(\"PreloadFeaturedStickers {0}\", PreloadFeaturedStickers));\r\n            sb.AppendLine(string.Format(\"IgnorePhoneEntities {0}\", IgnorePhoneEntities));\r\n            sb.AppendLine(string.Format(\"RevokePmInbox {0}\", RevokePmInbox));\r\n            sb.AppendLine(string.Format(\"BlockedMode {0}\", BlockedMode));\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ThisDC {0}\", ThisDC));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RevokeTimeLimit {0}\", RevokeTimeLimit));\r\n            sb.AppendLine(string.Format(\"RevokePmTimeLimit {0}\", RevokePmTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"StickersRecentLimit {0}\", StickersRecentLimit));\r\n            sb.AppendLine(string.Format(\"StickersFavedLimit {0}\", StickersFavedLimit));\r\n            sb.AppendLine(string.Format(\"ChannelsReadMediaPeriod {0}\", ChannelsReadMediaPeriod));\r\n            sb.AppendLine(string.Format(\"TmpSessions {0}\", TmpSessions));\r\n            sb.AppendLine(string.Format(\"PinnedDialogsCountMax {0}\", PinnedDialogsCountMax));\r\n            sb.AppendLine(string.Format(\"CallReceiveTimeoutMs {0}\", CallReceiveTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallRingTimeoutMs {0}\", CallRingTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallConnectTimeoutMs {0}\", CallConnectTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallPacketTimeoutMs {0}\", CallPacketTimeoutMs));\r\n            sb.AppendLine(string.Format(\"MeUrlPrefix {0}\", MeUrlPrefix));\r\n            sb.AppendLine(string.Format(\"AutoupdateUrlPrefix {0}\", AutoupdateUrlPrefix));\r\n            sb.AppendLine(string.Format(\"SuggestedLangCode {0}\", SuggestedLangCode));\r\n            sb.AppendLine(string.Format(\"LangPackVersion {0}\", LangPackVersion));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLConfig82 : TLConfig78\r\n    {\r\n        public new const uint Signature = TLConstructors.TLConfig82;\r\n\r\n        [DataMember]\r\n        public TLString DCTxtDomainName { get; set; }\r\n\r\n        protected TLString _gifSearchUsername;\r\n\r\n        [DataMember]\r\n        public TLString GifSearchUsername\r\n        {\r\n            get { return _gifSearchUsername; }\r\n            set { SetField(out _gifSearchUsername, value, ref _flags, (int)ConfigFlags.GifSearchUsername); }\r\n        }\r\n\r\n        protected TLString _venueSearchUsername;\r\n\r\n        [DataMember]\r\n        public TLString VenueSearchUsername\r\n        {\r\n            get { return _venueSearchUsername; }\r\n            set { SetField(out _venueSearchUsername, value, ref _flags, (int)ConfigFlags.VenueSearchUsername); }\r\n        }\r\n\r\n        protected TLString _imgSearchUsername;\r\n\r\n        [DataMember]\r\n        public TLString ImgSearchUsername\r\n        {\r\n            get { return _imgSearchUsername; }\r\n            set { SetField(out _imgSearchUsername, value, ref _flags, (int)ConfigFlags.ImgSearchUsername); }\r\n        }\r\n\r\n        protected TLString _staticMapsProvider;\r\n\r\n        [DataMember]\r\n        public TLString StaticMapsProvider\r\n        {\r\n            get { return _staticMapsProvider; }\r\n            set { SetField(out _staticMapsProvider, value, ref _flags, (int)ConfigFlags.StaticMapsProvider); }\r\n        }\r\n\r\n        [DataMember]\r\n        public TLInt CaptionLengthMax { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt MessageLengthMax { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt WebfileDCId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TestMode = GetObject<TLBool>(bytes, ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n            DCTxtDomainName = GetObject<TLString>(bytes, ref position);\r\n            ChatSizeMax = GetObject<TLInt>(bytes, ref position);\r\n            BroadcastSizeMax = GetObject<TLInt>(bytes, ref position);   // MegagroupSizeMax\r\n            ForwardedCountMax = GetObject<TLInt>(bytes, ref position);\r\n            OnlineUpdatePeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineBlurTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OfflineIdleTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            OnlineCloudTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyCloudDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            NotifyDefaultDelayMs = GetObject<TLInt>(bytes, ref position);\r\n            ChatBigSize = new TLInt(int.MaxValue);\r\n            PushChatPeriodMs = GetObject<TLInt>(bytes, ref position);\r\n            PushChatLimit = GetObject<TLInt>(bytes, ref position);\r\n            SavedGifsLimit = GetObject<TLInt>(bytes, ref position);\r\n            EditTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RevokeTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RevokePmTimeLimit = GetObject<TLInt>(bytes, ref position);\r\n            RatingEDecay = GetObject<TLInt>(bytes, ref position);\r\n            StickersRecentLimit = GetObject<TLInt>(bytes, ref position);\r\n            StickersFavedLimit = GetObject<TLInt>(bytes, ref position);\r\n            ChannelsReadMediaPeriod = GetObject<TLInt>(bytes, ref position);\r\n            TmpSessions = GetObject<TLInt>(Flags, (int)ConfigFlags.TmpSessions, null, bytes, ref position);\r\n            PinnedDialogsCountMax = GetObject<TLInt>(bytes, ref position);\r\n            CallReceiveTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallRingTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallConnectTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            CallPacketTimeoutMs = GetObject<TLInt>(bytes, ref position);\r\n            MeUrlPrefix = GetObject<TLString>(bytes, ref position);\r\n            _autoupdateUrlPrefix = GetObject<TLString>(_flags, (int)ConfigFlags.AutoupdateUrlPrefix, null, bytes, ref position);\r\n            _gifSearchUsername = GetObject<TLString>(_flags, (int)ConfigFlags.GifSearchUsername, null, bytes, ref position);\r\n            _venueSearchUsername = GetObject<TLString>(_flags, (int)ConfigFlags.VenueSearchUsername, null, bytes, ref position);\r\n            _imgSearchUsername = GetObject<TLString>(_flags, (int)ConfigFlags.ImgSearchUsername, null, bytes, ref position);\r\n            _staticMapsProvider = GetObject<TLString>(_flags, (int)ConfigFlags.StaticMapsProvider, null, bytes, ref position);\r\n            CaptionLengthMax = GetObject<TLInt>(bytes, ref position);\r\n            MessageLengthMax = GetObject<TLInt>(bytes, ref position);\r\n            WebfileDCId = GetObject<TLInt>(bytes, ref position);\r\n            DisabledFeatures = new TLVector<TLDisabledFeature>();\r\n            _suggestedLangCode = GetObject<TLString>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n            _langPackVersion = GetObject<TLInt>(Flags, (int)ConfigFlags.Lang, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(string.Format(\"Flags {0}\", ConfigFlagsString(Flags)));\r\n            sb.AppendLine(string.Format(\"PhoneCallsEnabled {0}\", PhoneCallsEnabled));\r\n            sb.AppendLine(string.Format(\"DefaultP2PContacts {0}\", DefaultP2PContacts));\r\n            sb.AppendLine(string.Format(\"PreloadFeaturedStickers {0}\", PreloadFeaturedStickers));\r\n            sb.AppendLine(string.Format(\"IgnorePhoneEntities {0}\", IgnorePhoneEntities));\r\n            sb.AppendLine(string.Format(\"RevokePmInbox {0}\", RevokePmInbox));\r\n            sb.AppendLine(string.Format(\"BlockedMode {0}\", BlockedMode));\r\n            sb.AppendLine(string.Format(\"Date utc0 {0} {1}\", Date.Value, TLUtils.ToDateTime(Date).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"Expires utc0 {0} {1}\", Expires.Value, TLUtils.ToDateTime(Expires).ToUniversalTime().ToString(\"HH:mm:ss.fff dd-MM-yyyy\")));\r\n            sb.AppendLine(string.Format(\"TestMode {0}\", TestMode));\r\n            sb.AppendLine(string.Format(\"ThisDC {0}\", ThisDC));\r\n            sb.AppendLine(string.Format(\"DCTxtDomainName {0}\", DCTxtDomainName));\r\n            sb.AppendLine(string.Format(\"ChatSizeMax {0}\", ChatSizeMax));\r\n            sb.AppendLine(string.Format(\"MegagroupSizeMax {0}\", BroadcastSizeMax));\r\n            sb.AppendLine(string.Format(\"ForwardedCountMax {0}\", ForwardedCountMax));\r\n            sb.AppendLine(string.Format(\"OnlineUpdatePeriodMs {0}\", OnlineUpdatePeriodMs));\r\n            sb.AppendLine(string.Format(\"OfflineBlurTimeoutMs {0}\", OfflineBlurTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OfflineIdleTimeoutMs {0}\", OfflineIdleTimeoutMs));\r\n            sb.AppendLine(string.Format(\"OnlineCloudTimeoutMs {0}\", OnlineCloudTimeoutMs));\r\n            sb.AppendLine(string.Format(\"NotifyCloudDelayMs {0}\", NotifyCloudDelayMs));\r\n            sb.AppendLine(string.Format(\"NotifyDefaultDelayMs {0}\", NotifyDefaultDelayMs));\r\n            sb.AppendLine(string.Format(\"PushChatPeriodMs {0}\", PushChatPeriodMs));\r\n            sb.AppendLine(string.Format(\"PushChatLimit {0}\", PushChatLimit));\r\n            sb.AppendLine(string.Format(\"SavedGifsLimit {0}\", SavedGifsLimit));\r\n            sb.AppendLine(string.Format(\"EditTimeLimit {0}\", EditTimeLimit));\r\n            sb.AppendLine(string.Format(\"RevokeTimeLimit {0}\", RevokeTimeLimit));\r\n            sb.AppendLine(string.Format(\"RevokePmTimeLimit {0}\", RevokePmTimeLimit));\r\n            sb.AppendLine(string.Format(\"RatingEDecay {0}\", RatingEDecay));\r\n            sb.AppendLine(string.Format(\"StickersRecentLimit {0}\", StickersRecentLimit));\r\n            sb.AppendLine(string.Format(\"StickersFavedLimit {0}\", StickersFavedLimit));\r\n            sb.AppendLine(string.Format(\"ChannelsReadMediaPeriod {0}\", ChannelsReadMediaPeriod));\r\n            sb.AppendLine(string.Format(\"TmpSessions {0}\", TmpSessions));\r\n            sb.AppendLine(string.Format(\"PinnedDialogsCountMax {0}\", PinnedDialogsCountMax));\r\n            sb.AppendLine(string.Format(\"CallReceiveTimeoutMs {0}\", CallReceiveTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallRingTimeoutMs {0}\", CallRingTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallConnectTimeoutMs {0}\", CallConnectTimeoutMs));\r\n            sb.AppendLine(string.Format(\"CallPacketTimeoutMs {0}\", CallPacketTimeoutMs));\r\n            sb.AppendLine(string.Format(\"MeUrlPrefix {0}\", MeUrlPrefix));\r\n            sb.AppendLine(string.Format(\"AutoupdateUrlPrefix {0}\", AutoupdateUrlPrefix));\r\n            sb.AppendLine(string.Format(\"GifSearchUsername {0}\", GifSearchUsername));\r\n            sb.AppendLine(string.Format(\"VenueSearchUsername {0}\", VenueSearchUsername));\r\n            sb.AppendLine(string.Format(\"ImgSearchUsername {0}\", ImgSearchUsername));\r\n            sb.AppendLine(string.Format(\"StaticMapsProvider {0}\", StaticMapsProvider));\r\n            sb.AppendLine(string.Format(\"CaptionLengthMax {0}\", CaptionLengthMax));\r\n            sb.AppendLine(string.Format(\"MessageLengthMax {0}\", MessageLengthMax));\r\n            sb.AppendLine(string.Format(\"WebfileDCId {0}\", WebfileDCId));\r\n            sb.AppendLine(string.Format(\"SuggestedLangCode {0}\", SuggestedLangCode));\r\n            sb.AppendLine(string.Format(\"LangPackVersion {0}\", LangPackVersion));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLConfigSimple.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLConfigSimple : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLConfigSimple;\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt Expires { get; set; }\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public TLVector<TLIpPort> IpPortList { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLConfigSimple date={0} expires={1} dc_id={2} ip_port_list=[{3}]\", Date, Expires, DCId, string.Join(\", \", IpPortList));\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            IpPortList = GetObject<TLVector<TLIpPort>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Date = GetObject<TLInt>(input);\r\n            Expires = GetObject<TLInt>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n            IpPortList = GetObject<TLVector<TLIpPort>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Date.ToStream(output);\r\n            Expires.ToStream(output);\r\n            DCId.ToStream(output);\r\n            IpPortList.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLContact.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing System.Runtime.Serialization;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [DataContract]\r\n    public class TLContact : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLContact;\r\n\r\n        [DataMember]\r\n        public TLInt UserId { get; set; }\r\n\r\n        [DataMember]\r\n        public TLBool Mutual { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Mutual = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            Mutual = GetObject<TLBool>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(Mutual.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLContactBlocked.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLContactBlocked : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactBlocked;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLContactBlocked--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            TLUtils.WriteLine(\"UserId: \" + UserId);\r\n            TLUtils.WriteLine(\"Date: \" + TLUtils.MessageIdString(Date));\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLContactFound.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLContactFound : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactFound;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                UserId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLContactLink.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLContactLinkBase : TLObject { }\r\n\r\n    public class TLContactLinkUnknown : TLContactLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactLinkUnknown;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLContactLinkNone : TLContactLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactLinkNone;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLContactLinkHasPhone : TLContactLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactLinkHasPhone;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLContactLink : TLContactLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactLink;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLContactStatus.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLContactStatusBase : TLObject\r\n    {\r\n        public TLInt UserId { get; set; }\r\n    }\r\n\r\n    public class TLContactStatus : TLContactStatusBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactStatus;\r\n\r\n        public TLInt Expires { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLContactStatus19 : TLContactStatusBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactStatus19;\r\n\r\n        public TLUserStatus Status { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Status = GetObject<TLUserStatus>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLContacts.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLContactsBase : TLObject\r\n    {\r\n        public abstract TLContactsBase GetEmptyObject();\r\n    }\r\n\r\n    public class TLContacts71 : TLContacts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLContacts71;\r\n\r\n        public TLInt SavedCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Contacts = GetObject<TLVector<TLContact>>(bytes, ref position);\r\n            SavedCount = GetObject<TLInt>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLContactsBase GetEmptyObject()\r\n        {\r\n            return new TLContacts71\r\n            {\r\n                Contacts = new TLVector<TLContact>(Contacts.Count),\r\n                SavedCount = SavedCount,\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLContacts contacts={0} saved_count={1} users={2}\", Contacts.Count, SavedCount, Users.Count);\r\n        }\r\n    }\r\n\r\n    public class TLContacts : TLContactsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLContacts;\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public TLVector<TLContact> Contacts { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Contacts = GetObject<TLVector<TLContact>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLContactsBase GetEmptyObject()\r\n        {\r\n            return new TLContacts\r\n            {\r\n                Contacts = new TLVector<TLContact>(Contacts.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLContactsNotModified : TLContactsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactsNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLContactsBase GetEmptyObject()\r\n        {\r\n            return new TLContactsNotModified();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLContactsBlocked.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLContactsBlockedBase : TLObject { }\r\n\r\n    public class TLContactsBlocked : TLContactsBlockedBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactsBlocked;\r\n\r\n        public TLVector<TLContactBlocked> Blocked { get; set; }\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLContactsBlocked--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Blocked = GetObject<TLVector<TLContactBlocked>>(bytes, ref position);\r\n\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLContactsBlockedSlice : TLContactsBlocked\r\n    {\r\n        public new const uint Signature = TLConstructors.TLContactsBlockedSlice;\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLContactsBlocked--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Blocked = GetObject<TLVector<TLContactBlocked>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLContactsFound.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLContactsFoundBase : TLObject\r\n    {\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n    }\r\n\r\n    public class TLContactsFound : TLContactsFoundBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactsFound;\r\n\r\n        public TLVector<TLContactFound> Results { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Results = GetObject<TLVector<TLContactFound>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLContactsFound40 : TLContactsFoundBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactsFound40;\r\n\r\n        public TLVector<TLPeerBase> Results { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Results = GetObject<TLVector<TLPeerBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLContactsFound74 : TLContactsFound40\r\n    {\r\n        public new const uint Signature = TLConstructors.TLContactsFound74;\r\n\r\n        public TLVector<TLPeerBase> MyResults { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            MyResults = GetObject<TLVector<TLPeerBase>>(bytes, ref position);\r\n            Results = GetObject<TLVector<TLPeerBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLContainerTransportMessage.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLTransportMessageWithIdBase : TLObject\r\n    {\r\n        public TLLong MessageId { get; set; }\r\n    }\r\n\r\n    public class TLContainerTransportMessage : TLTransportMessageWithIdBase\r\n    {\r\n        public TLInt SeqNo { get; set; }\r\n        public TLInt MessageDataLength { get; set; }\r\n        public TLObject MessageData { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            MessageId = GetObject<TLLong>(bytes, ref position);\r\n            SeqNo = GetObject<TLInt>(bytes, ref position);\r\n            MessageDataLength = GetObject<TLInt>(bytes, ref position);\r\n            MessageData = GetObject<TLObject>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            var objectBytes = MessageData.ToBytes();\r\n\r\n            return TLUtils.Combine(\r\n                MessageId.ToBytes(),\r\n                SeqNo.ToBytes(),\r\n                BitConverter.GetBytes(objectBytes.Length),\r\n                objectBytes);\r\n        }\r\n    }\r\n\r\n    public class TLTransportMessage : TLContainerTransportMessage\r\n    {\r\n        public TLLong Salt { get; set; }\r\n        public TLLong SessionId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            Salt = GetObject<TLLong>(bytes, ref position);\r\n            SessionId = GetObject<TLLong>(bytes, ref position);\r\n            \r\n            MessageId = GetObject<TLLong>(bytes, ref position);\r\n            SeqNo = GetObject<TLInt>(bytes, ref position);\r\n            MessageDataLength = GetObject<TLInt>(bytes, ref position);\r\n            MessageData = GetObject<TLObject>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            var objectBytes = MessageData.ToBytes();\r\n\r\n            return TLUtils.Combine(\r\n               Salt.ToBytes(),\r\n               SessionId.ToBytes(),\r\n               MessageId.ToBytes(),\r\n               SeqNo.ToBytes(),\r\n               BitConverter.GetBytes(objectBytes.Length),\r\n               objectBytes);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLDCOption.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Runtime.Serialization;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum DCOptionFlags\r\n    {\r\n        IPv6 = 0x1,\r\n        Media = 0x2,\r\n        TCPO = 0x4,\r\n        CDN = 0x8,\r\n        Static = 0x10,\r\n        Secret = 0x400\r\n    }\r\n\r\n    [KnownType(typeof(TLDCOption78))]\r\n    [KnownType(typeof(TLDCOption30))]\r\n    [DataContract]\r\n    public class TLDCOption : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLDCOption;\r\n\r\n        [DataMember]\r\n        public TLInt Id { get; set; }\r\n\r\n        [DataMember]\r\n        public TLString Hostname { get; set; }\r\n\r\n        private TLString _ipAddress;\r\n\r\n        [DataMember]\r\n        public TLString IpAddress\r\n        {\r\n            get { return _ipAddress; }\r\n            set { _ipAddress = value; }\r\n        }\r\n\r\n        [DataMember]\r\n        public TLInt Port { get; set; }\r\n\r\n        #region Additional\r\n        public TLLong CustomFlags { get; set; }\r\n\r\n        [DataMember]\r\n        public byte[] AuthKey { get; set; }\r\n\r\n        [DataMember]\r\n        public bool IsAuthorized { get; set; }\r\n\r\n        [DataMember]\r\n        public TLLong Salt { get; set; }\r\n\r\n        [DataMember]\r\n        public long ClientTicksDelta { get; set; }\r\n\r\n        //[DataMember] //Important this field initialize with random value on each app startup to avoid TLBadMessage result with 32, 33 code (incorrect MsgSeqNo)\r\n        public TLLong SessionId { get; set; }\r\n\r\n        public virtual TLBool IPv6\r\n        {\r\n            get { return TLBool.False; }\r\n            set { }\r\n        }\r\n\r\n        public virtual TLBool Media\r\n        {\r\n            get { return TLBool.False; }\r\n            set { }\r\n        }\r\n\r\n        public virtual TLBool TCPO\r\n        {\r\n            get { return TLBool.False; }\r\n            set { }\r\n        }\r\n\r\n        public virtual TLBool CDN\r\n        {\r\n            get { return TLBool.False; }\r\n            set { }\r\n        }\r\n\r\n        public virtual TLBool Static\r\n        {\r\n            get { return TLBool.False; }\r\n            set { }\r\n        }\r\n\r\n        public bool IsValidIPv4Option(TLInt dcId)\r\n        {\r\n            return !IPv6.Value && Id != null && Id.Value == dcId.Value;\r\n        }\r\n\r\n        public virtual bool IsValidIPv4WithTCPO25Option(TLInt dcId)\r\n        {\r\n            return false;\r\n        }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Hostname = GetObject<TLString>(bytes, ref position);\r\n            IpAddress = GetObject<TLString>(bytes, ref position);\r\n            Port = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Hostname.ToStream(output);\r\n            IpAddress.ToStream(output);\r\n            Port.ToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            Hostname = GetObject<TLString>(input);\r\n            IpAddress = GetObject<TLString>(input);\r\n            Port = GetObject<TLInt>(input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public bool AreEquals(TLDCOption dcOption)\r\n        {\r\n            if (dcOption == null) return false;\r\n\r\n            return Id.Value == dcOption.Id.Value;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0}) {1}:{2} (AuthKey {3})\\n  Salt {4} TicksDelta {5}\", Id, IpAddress, Port, AuthKey != null, Salt, ClientTicksDelta);\r\n        }\r\n\r\n        protected string AuthKeySignature(byte[] authKey)\r\n        {\r\n            if (authKey == null || authKey.Length == 0) return \"null\";\r\n\r\n            return string.Join(\" \", AuthKey.Take(7).ToArray());\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLDCOption30 : TLDCOption\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDCOption30;\r\n\r\n        protected TLInt _flags;\r\n\r\n        [DataMember]\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLBool IPv6\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)DCOptionFlags.IPv6)); }\r\n            set { SetUnset(ref _flags, value.Value, (int)DCOptionFlags.IPv6); }\r\n        }\r\n\r\n        public override TLBool Media\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)DCOptionFlags.Media)); }\r\n            set { SetUnset(ref _flags, value.Value, (int)DCOptionFlags.Media); }\r\n        }\r\n\r\n        public override TLBool TCPO\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)DCOptionFlags.TCPO)); }\r\n            set { SetUnset(ref _flags, value.Value, (int)DCOptionFlags.TCPO); }\r\n        }\r\n\r\n        public override TLBool CDN\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)DCOptionFlags.CDN)); }\r\n            set { SetUnset(ref _flags, value.Value, (int)DCOptionFlags.CDN); }\r\n        }\r\n\r\n        public override TLBool Static\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)DCOptionFlags.Static)); }\r\n            set { SetUnset(ref _flags, value.Value, (int)DCOptionFlags.Static); }\r\n        }\r\n\r\n        public static string DCOptionFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (DCOptionFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            //Hostname = GetObject<TLString>(bytes, ref position);\r\n            IpAddress = GetObject<TLString>(bytes, ref position);\r\n            Port = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            //Hostname.ToStream(output);\r\n            IpAddress.ToStream(output);\r\n            Port.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            //Hostname = GetObject<TLString>(input);\r\n            IpAddress = GetObject<TLString>(input);\r\n            Port = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0}) {1}:{2} (AuthKey {3} IsAuthorized={7})\\n Flags {6}  Salt {4} TicksDelta {5}\", Id, IpAddress, Port, AuthKeySignature(AuthKey), Salt, ClientTicksDelta, DCOptionFlagsString(Flags), IsAuthorized);\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLDCOption78 : TLDCOption30\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDCOption78;\r\n\r\n        protected TLString _secret;\r\n\r\n        [DataMember]\r\n        public TLString Secret\r\n        {\r\n            get { return _secret; }\r\n            set { SetField(out _secret, value, ref _flags, (int)DCOptionFlags.Secret); }\r\n        }\r\n\r\n        public override bool IsValidIPv4WithTCPO25Option(TLInt dcId)\r\n        {\r\n            return IsValidIPv4Option(dcId) && !TLString.IsNullOrEmpty(Secret) && Secret.Data.Length == 16;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            IpAddress = GetObject<TLString>(bytes, ref position);\r\n            Port = GetObject<TLInt>(bytes, ref position);\r\n            _secret = GetObject<TLString>(Flags, (int)DCOptionFlags.Secret, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            IpAddress.ToStream(output);\r\n            Port.ToStream(output);\r\n            ToStream(output, _secret, _flags, (int)DCOptionFlags.Secret);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            IpAddress = GetObject<TLString>(input);\r\n            Port = GetObject<TLInt>(input);\r\n            _secret = GetObject<TLString>(Flags, (int)DCOptionFlags.Secret, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0}) {1}:{2} (AuthKey {3} IsAuthorized={7})\\n Flags {6}  Salt {4} TicksDelta {5}\", Id, IpAddress, Port, AuthKeySignature(AuthKey), Salt, ClientTicksDelta, DCOptionFlagsString(Flags), IsAuthorized);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLDHConfig.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLDHConfigBase : TLObject { }\r\n\r\n    public class TLDHConfig : TLDHConfigBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDHConfig;\r\n\r\n        public TLInt G { get; set; }\r\n\r\n        public TLString P { get; set; }\r\n\r\n        public TLInt Version { get; set; }\r\n\r\n        public TLString Random { get; set; }\r\n\r\n        #region Additional\r\n\r\n        public TLString A { get; set; }\r\n\r\n        public TLString GA { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            G = GetObject<TLInt>(bytes, ref position);\r\n            P = GetObject<TLString>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n            Random = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLDHConfigNotModified : TLDHConfigBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDHConfigNotModified;\r\n\r\n        public TLString Random { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Random = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDHGen.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLDHGenBase : TLObject\r\n    {\r\n        public TLInt128 Nonce { get; set; }\r\n\r\n        public TLInt128 ServerNonce { get; set; }\r\n\r\n        public TLInt128 NewNonce { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            Nonce = GetObject<TLInt128>(bytes, ref position);\r\n            ServerNonce = GetObject<TLInt128>(bytes, ref position);\r\n            NewNonce = GetObject<TLInt128>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLDHGenOk : TLDHGenBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDHGenOk;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLDHGenOk--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return base.FromBytes(bytes, ref position);\r\n        }\r\n    }\r\n\r\n    public class TLDHGenRetry : TLDHGenBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDHGenRetry;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLDHGenRetry--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return base.FromBytes(bytes, ref position);\r\n        }\r\n    }\r\n\r\n    public class TLDHGenFail : TLDHGenBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDHGenFail;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLDHGenFail--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return base.FromBytes(bytes, ref position);\r\n        }\r\n    }\r\n\r\n\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDataJSON.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLDataJSON : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDataJSON;\r\n\r\n        public TLString Data { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Data = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Data.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Data.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Data = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDecryptedMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Services.Cache;\r\n#if WIN_RT\r\nusing Windows.UI.Xaml;\r\n#else\r\nusing System.Windows;\r\n#endif\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n\r\n    public interface IMessage\r\n    {\r\n        TLString Message { get; set; }\r\n\r\n        TLObject From { get; }\r\n    }\r\n\r\n    public interface ISeqNo\r\n    {\r\n        TLInt InSeqNo { get; set; }\r\n\r\n        TLInt OutSeqNo { get; set; }\r\n    }\r\n\r\n    public abstract class TLDecryptedMessageBase : TLObject\r\n    {\r\n        public TLDecryptedMessageBase Self { get { return this; } }\r\n\r\n        public TLDecryptedMessageBase MediaSelf { get { return this; } }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public long RandomIndex\r\n        {\r\n            get { return RandomId != null ? RandomId.Value : 0; }\r\n            set { RandomId = new TLLong(value); }\r\n        }\r\n\r\n        public TLString RandomBytes { get; set; }\r\n\r\n        private bool _isHighlighted;\r\n\r\n        public bool IsHighlighted\r\n        {\r\n            get { return _isHighlighted; }\r\n            set { SetField(ref _isHighlighted, value, () => IsHighlighted); }\r\n        }\r\n\r\n        private TLObject _from;\r\n\r\n        public TLObject From\r\n        {\r\n            get\r\n            {\r\n                if (_from != null) return _from;\r\n\r\n                var cacheService = InMemoryCacheService.Instance;\r\n                _from = cacheService.GetUser(FromId);\r\n\r\n                return _from;\r\n            }\r\n        }\r\n\r\n        #region Additional\r\n        public TLInt ChatId { get; set; }\r\n        public TLInputEncryptedFileBase InputFile { get; set; }     // to send media\r\n\r\n        public TLInt FromId { get; set; }\r\n        public TLBool Out { get; set; }\r\n        public TLBool Unread { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n        public int DateIndex\r\n        {\r\n            get { return Date != null ? Date.Value : 0; }\r\n            set { Date = new TLInt(value); }\r\n        }\r\n\r\n        public TLInt Qts { get; set; }\r\n        public int QtsIndex\r\n        {\r\n            get { return Qts != null ? Qts.Value : 0; }\r\n            set { Qts = new TLInt(value); }\r\n        }\r\n\r\n        public TLLong DeleteDate { get; set; }\r\n\r\n        public long DeleteIndex\r\n        {\r\n            get { return DeleteDate != null ? DeleteDate.Value : 0; }\r\n            set { DeleteDate = new TLLong(value); }\r\n        }\r\n\r\n        public MessageStatus Status { get; set; }\r\n\r\n        public virtual bool ShowFrom\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        private bool _isSelected;\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return _isSelected; }\r\n            set { SetField(ref _isSelected, value, () => IsSelected); }\r\n        }\r\n\r\n        public abstract Visibility SelectionVisibility { get; }\r\n\r\n        public TLInt TTL { get; set; }\r\n\r\n        private bool _isTTLStarted;\r\n\r\n        public bool IsTTLStarted\r\n        {\r\n            get { return _isTTLStarted; }\r\n            set { SetField(ref _isTTLStarted, value, () => IsTTLStarted); }\r\n        }\r\n\r\n        public abstract Visibility SecretPhotoMenuVisibility { get; }\r\n\r\n        public abstract Visibility MessageVisibility { get; }\r\n\r\n        public TLDecryptedMessageBase Reply { get; set; }\r\n\r\n        public virtual ReplyInfo ReplyInfo\r\n        {\r\n            get { return null; }\r\n        }\r\n\r\n        public virtual Visibility ReplyVisibility { get { return Visibility.Collapsed; } }\r\n\r\n        public virtual double MediaWidth { get { return 12.0 + 311.0 + 12.0; } }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            RandomId = GetObject<TLLong>(bytes, ref position);\r\n            RandomBytes = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public virtual void Update(TLDecryptedMessageBase message)\r\n        {\r\n            ChatId = message.ChatId ?? ChatId;\r\n            InputFile = message.InputFile ?? InputFile;\r\n            FromId = message.FromId ?? FromId;\r\n            Out = message.Out ?? Out;\r\n            Unread = message.Unread ?? Unread;\r\n            Date = message.Date ?? Date;\r\n            Qts = message.Qts ?? Qts;\r\n            DeleteDate = message.DeleteDate ?? DeleteDate;\r\n            Status = message.Status;\r\n            TTL = message.TTL ?? TTL;\r\n        }\r\n\r\n        public virtual bool IsSticker()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public static bool IsSticker(TLDecryptedMessageMediaExternalDocument document)\r\n        {\r\n#if WP8\r\n            if (document != null\r\n                && document.Size.Value > 0\r\n                && document.Size.Value < Constants.StickerMaxSize)\r\n            {\r\n                //var documentStickerAttribute = document22.Attributes.FirstOrDefault(x => x is TLDocumentAttributeSticker);\r\n\r\n                if (//documentStickerAttribute != null\r\n                    //&& \r\n                    string.Equals(document.MimeType.ToString(), \"image/webp\", StringComparison.OrdinalIgnoreCase)\r\n                    || string.Equals(document.FileExt, \"webp\", StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public virtual bool IsGif()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public virtual bool IsVoice()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public static bool IsVoice(IAttributes attributes, TLInt size)\r\n        {\r\n#if WP8\r\n            if (size == null || size.Value > 0)\r\n            {\r\n                var audioAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio46) as TLDocumentAttributeAudio46;\r\n                if (audioAttribute != null && audioAttribute.Voice)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool IsVoice(TLDecryptedMessageMediaDocument45 document)\r\n        {\r\n#if WP8\r\n            var document22 = document;\r\n            if (document22 != null)\r\n            {\r\n                return IsVoice(document22, document22.Size);\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public virtual bool IsVideo()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public static bool IsVideo(IAttributes attributes, TLInt size)\r\n        {\r\n#if WP8\r\n            if (size == null || size.Value > 0)\r\n            {\r\n                var videoAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeVideo) as TLDocumentAttributeVideo;\r\n                var animatedAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAnimated) as TLDocumentAttributeAnimated;\r\n                if (videoAttribute != null && animatedAttribute == null)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool IsVideo(TLDecryptedMessageMediaDocument45 document)\r\n        {\r\n#if WP8\r\n            var document22 = document;\r\n            if (document22 != null)\r\n            {\r\n                return IsVideo(document22, document22.Size);\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessagesContainter : TLDecryptedMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessagesContainter;\r\n\r\n        public TLMessageMediaBase WebPageMedia { get; set; }\r\n\r\n        public TLVector<TLDecryptedMessage> FwdMessages { get; set; }\r\n\r\n        public override Visibility SelectionVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility SecretPhotoMenuVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility MessageVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public TLObject From\r\n        {\r\n            get\r\n            {\r\n                //if (FwdMessages != null && FwdMessages.Count > 0)\r\n                //{\r\n                //    var fwdMessage = FwdMessages[0] as TLDecryptedMessage;\r\n                //    if (fwdMessage != null)\r\n                //    {\r\n                //        var fwdPeer = fwdMessage.FwdFromPeer;\r\n                //        if (fwdPeer != null)\r\n                //        {\r\n                //            var cacheService = InMemoryCacheService.Instance;\r\n                //            if (fwdPeer is TLPeerChannel)\r\n                //            {\r\n                //                return cacheService.GetChat(fwdPeer.Id);\r\n                //            }\r\n\r\n                //            return cacheService.GetUser(fwdPeer.Id);\r\n                //        }\r\n                //    }\r\n\r\n                //    return FwdMessages[0].FwdFrom;\r\n                //}\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public TLString Message\r\n        {\r\n            get\r\n            {\r\n                if (FwdMessages != null && FwdMessages.Count > 0)\r\n                {\r\n                    return FwdMessages[0].Message;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public TLDecryptedMessageMediaBase Media\r\n        {\r\n            get\r\n            {\r\n                if (FwdMessages != null && FwdMessages.Count > 0)\r\n                {\r\n                    return FwdMessages[0].Media;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessage73 : TLDecryptedMessage45\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDecryptedMessage73;\r\n\r\n        private TLLong _groupedId;\r\n\r\n        public TLLong GroupedId\r\n        {\r\n            get { return _groupedId; }\r\n            set { SetField(out _groupedId, value, ref _flags, (int) MessageFlags.GroupedId); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            RandomId = GetObject<TLLong>(bytes, ref position);\r\n            TTL = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Media = IsSet(Flags, (int)MessageFlags.Media)\r\n                ? GetObject<TLDecryptedMessageMediaBase>(bytes, ref position)\r\n                : new TLDecryptedMessageMediaEmpty();\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int) MessageFlags.Entities, null, bytes, ref position);\r\n            ViaBotName = GetObject<TLString>(Flags, (int) MessageFlags.ViaBotId, null, bytes, ref position);\r\n            ReplyToRandomMsgId = GetObject<TLLong>(Flags, (int) MessageFlags.ReplyToMsgId, null, bytes, ref position);\r\n            GroupedId = GetObject<TLLong>(Flags, (int) MessageFlags.GroupedId, null, bytes, ref position);\r\n\r\n            if (IsVoice())\r\n            {\r\n                NotListened = true;\r\n            }\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"  >>TLDecryptedMessage73.FromBytes random_id={0} ttl={1} message={2} media=[{3}]\", RandomId, TTL, Message, Media);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"  <<TLDecryptedMessage73.ToBytes random_id={0} ttl={1} message={2} media=[{3}]\", RandomId, TTL, Message, Media);\r\n\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                TTL.ToBytes(),\r\n                Message.ToBytes(),\r\n                ToBytes(Media, Flags, (int)MessageFlags.Media),\r\n                ToBytes(Entities, Flags, (int)MessageFlags.Entities),\r\n                ToBytes(ViaBotName, Flags, (int)MessageFlags.ViaBotId),\r\n                ToBytes(ReplyToRandomMsgId, Flags, (int)MessageFlags.ReplyToMsgId),\r\n                ToBytes(GroupedId, Flags, (int)MessageFlags.GroupedId));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n            TTL = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            Media = IsSet(Flags, (int)MessageFlags.Media)\r\n                ? GetObject<TLDecryptedMessageMediaBase>(input)\r\n                : new TLDecryptedMessageMediaEmpty();\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)MessageFlags.Entities, null, input);\r\n            ViaBotName = GetObject<TLString>(Flags, (int)MessageFlags.ViaBotId, null, input);\r\n            ReplyToRandomMsgId = GetObject<TLLong>(Flags, (int)MessageFlags.ReplyToMsgId, null, input);\r\n            GroupedId = GetObject<TLLong>(Flags, (int)MessageFlags.GroupedId, null, input);\r\n\r\n            ChatId = GetNullableObject<TLInt>(input);\r\n            InputFile = GetNullableObject<TLInputEncryptedFileBase>(input);\r\n            FromId = GetNullableObject<TLInt>(input);\r\n            Out = GetNullableObject<TLBool>(input);\r\n            Unread = GetNullableObject<TLBool>(input);\r\n            Date = GetNullableObject<TLInt>(input);\r\n            DeleteDate = GetNullableObject<TLLong>(input);\r\n            Qts = GetNullableObject<TLInt>(input);\r\n\r\n            var status = GetObject<TLInt>(input);\r\n            Status = (MessageStatus)status.Value;\r\n\r\n            InSeqNo = GetNullableObject<TLInt>(input);\r\n            OutSeqNo = GetNullableObject<TLInt>(input);\r\n            CustomFlags = GetNullableObject<TLInt>(input);\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.BotInlineResult))\r\n            {\r\n                _inlineBotResult = GetObject<TLBotInlineResultBase>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(RandomId.ToBytes());\r\n            output.Write(TTL.ToBytes());\r\n            output.Write(Message.ToBytes());\r\n            ToStream(output, Media, Flags, (int)MessageFlags.Media);\r\n            ToStream(output, Entities, Flags, (int)MessageFlags.Entities);\r\n            ToStream(output, ViaBotName, Flags, (int)MessageFlags.ViaBotId);\r\n            ToStream(output, ReplyToRandomMsgId, Flags, (int)MessageFlags.ReplyToMsgId);\r\n            ToStream(output, GroupedId, Flags, (int)MessageFlags.GroupedId);\r\n\r\n            ChatId.NullableToStream(output);\r\n            InputFile.NullableToStream(output);\r\n            FromId.NullableToStream(output);\r\n            Out.NullableToStream(output);\r\n            Unread.NullableToStream(output);\r\n            Date.NullableToStream(output);\r\n            DeleteDate.NullableToStream(output);\r\n            Qts.NullableToStream(output);\r\n\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n\r\n            InSeqNo.NullableToStream(output);\r\n            OutSeqNo.NullableToStream(output);\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.BotInlineResult))\r\n            {\r\n                _inlineBotResult.ToStream(output);\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            if (Media is TLDecryptedMessageMediaEmpty)\r\n            {\r\n                return string.Format(\"TLDecryptedMessage73 random_id={7} qts={0} in_seq_no={1} out_seq_no={2} flags=[{3}] date={4} delete_date={5} message={6}\", Qts, InSeqNo, OutSeqNo, TLMessageBase.MessageFlagsString(Flags), Date, DeleteDate, Message, RandomId);\r\n            }\r\n\r\n            return string.Format(\"TLDecryptedMessage73 random_id={7} qts={0} in_seq_no={1} out_seq_no={2} flags=[{3}] date={4} delete_date={5} media={6}\", Qts, InSeqNo, OutSeqNo, TLMessageBase.MessageFlagsString(Flags), Date, DeleteDate, Media, RandomId);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessage45 : TLDecryptedMessage17\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDecryptedMessage45;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLVector<TLMessageEntityBase> _entities; \r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    _entities = value;\r\n                    Set(ref _flags, (int)MessageFlags.Entities);\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _flags, (int)MessageFlags.Entities);\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLString _viaBotBane;\r\n\r\n        public TLString ViaBotName\r\n        {\r\n            get { return _viaBotBane; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    _viaBotBane = value;\r\n                    Set(ref _flags, (int)MessageFlags.ViaBotId);\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _flags, (int)MessageFlags.ViaBotId);\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLLong _replyToRandomMsgId;\r\n\r\n        public TLLong ReplyToRandomMsgId\r\n        {\r\n            get { return _replyToRandomMsgId; }\r\n            set\r\n            {\r\n                if (value != null && value.Value != 0)\r\n                {\r\n                    _replyToRandomMsgId = value;\r\n                    Set(ref _flags, (int)MessageFlags.ReplyToMsgId);\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _flags, (int)MessageFlags.ReplyToMsgId);\r\n                }\r\n            }\r\n        }\r\n\r\n        protected TLBotInlineResultBase _inlineBotResult;\r\n\r\n        public TLBotInlineResultBase InlineBotResult\r\n        {\r\n            get { return _inlineBotResult; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    Set(ref _customFlags, (int)MessageCustomFlags.BotInlineResult);\r\n                    _inlineBotResult = value;\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _customFlags, (int)MessageCustomFlags.BotInlineResult);\r\n                    _inlineBotResult = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void SetMedia()\r\n        {\r\n            Set(ref _flags, (int)MessageFlags.Media);\r\n        }\r\n\r\n        public void SetListened()\r\n        {\r\n            Unset(ref _flags, (int)MessageFlags.MediaUnread);\r\n        }\r\n\r\n        public bool NotListened\r\n        {\r\n            get { return IsSet(_flags, (int)MessageFlags.MediaUnread); }\r\n            set { SetUnset(ref _flags, value, (int)MessageFlags.MediaUnread); }\r\n        }\r\n\r\n        public override ReplyInfo ReplyInfo\r\n        {\r\n            get { return ReplyToRandomMsgId != null ? new ReplyInfo { ReplyToRandomMsgId = ReplyToRandomMsgId, Reply = Reply } : null; }\r\n        }\r\n\r\n        public override Visibility ReplyVisibility\r\n        {\r\n            get { return ReplyToRandomMsgId != null && ReplyToRandomMsgId.Value != 0 ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public override bool IsVoice()\r\n        {\r\n            var mediaAudio = Media as TLDecryptedMessageMediaAudio;\r\n            if (mediaAudio != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var mediaDocument = Media as TLDecryptedMessageMediaDocument45;\r\n            if (mediaDocument != null)\r\n            {\r\n                return IsVoice(mediaDocument);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override bool IsVideo()\r\n        {\r\n            var mediaVideo = Media as TLDecryptedMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var mediaDocument = Media as TLDecryptedMessageMediaDocument45;\r\n            if (mediaDocument != null)\r\n            {\r\n                return IsVideo(mediaDocument);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override bool IsGif()\r\n        {\r\n            var mediaDocument = Media as TLDecryptedMessageMediaDocument45;\r\n            if (mediaDocument != null && TLString.Equals(mediaDocument.MimeType, new TLString(\"video/mp4\"), StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return TLMessageBase.IsGif(mediaDocument, mediaDocument.Size);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            RandomId = GetObject<TLLong>(bytes, ref position);\r\n            TTL = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Media = IsSet(Flags, (int)MessageFlags.Media)\r\n                ? GetObject<TLDecryptedMessageMediaBase>(bytes, ref position)\r\n                : new TLDecryptedMessageMediaEmpty();\r\n            if (IsSet(Flags, (int) MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n            {\r\n                ViaBotName = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToRandomMsgId = GetObject<TLLong>(bytes, ref position);\r\n            }\r\n\r\n            if (IsVoice())\r\n            {\r\n                NotListened = true;\r\n            }\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"  >>TLDecryptedMessage45.FromBytes random_id={0} ttl={1} message={2} media=[{3}]\", RandomId, TTL, Message, Media);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"  <<TLDecryptedMessage45.ToBytes random_id={0} ttl={1} message={2} media=[{3}]\", RandomId, TTL, Message, Media);\r\n\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                TTL.ToBytes(),\r\n                Message.ToBytes(),\r\n                ToBytes(Media, Flags, (int)MessageFlags.Media),\r\n                ToBytes(Entities, Flags, (int)MessageFlags.Entities),\r\n                ToBytes(ViaBotName, Flags, (int)MessageFlags.ViaBotId),\r\n                ToBytes(ReplyToRandomMsgId, Flags, (int)MessageFlags.ReplyToMsgId));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n            TTL = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            Media = IsSet(Flags, (int)MessageFlags.Media)\r\n                ? GetObject<TLDecryptedMessageMediaBase>(input)\r\n                : new TLDecryptedMessageMediaEmpty();\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(input);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n            {\r\n                ViaBotName = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToRandomMsgId = GetObject<TLLong>(input);\r\n            }\r\n\r\n            ChatId = GetNullableObject<TLInt>(input);\r\n            InputFile = GetNullableObject<TLInputEncryptedFileBase>(input);\r\n            FromId = GetNullableObject<TLInt>(input);\r\n            Out = GetNullableObject<TLBool>(input);\r\n            Unread = GetNullableObject<TLBool>(input);\r\n            Date = GetNullableObject<TLInt>(input);\r\n            DeleteDate = GetNullableObject<TLLong>(input);\r\n            Qts = GetNullableObject<TLInt>(input);\r\n\r\n            var status = GetObject<TLInt>(input);\r\n            Status = (MessageStatus)status.Value;\r\n\r\n            InSeqNo = GetNullableObject<TLInt>(input);\r\n            OutSeqNo = GetNullableObject<TLInt>(input);\r\n            CustomFlags = GetNullableObject<TLInt>(input);\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.BotInlineResult))\r\n            {\r\n                _inlineBotResult = GetObject<TLBotInlineResultBase>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(RandomId.ToBytes());\r\n            output.Write(TTL.ToBytes());\r\n            output.Write(Message.ToBytes());\r\n            ToStream(output, Media, Flags, (int)MessageFlags.Media);\r\n            ToStream(output, Entities, Flags, (int)MessageFlags.Entities);\r\n            ToStream(output, ViaBotName, Flags, (int)MessageFlags.ViaBotId);\r\n            ToStream(output, ReplyToRandomMsgId, Flags, (int)MessageFlags.ReplyToMsgId);\r\n\r\n            ChatId.NullableToStream(output);\r\n            InputFile.NullableToStream(output);\r\n            FromId.NullableToStream(output);\r\n            Out.NullableToStream(output);\r\n            Unread.NullableToStream(output);\r\n            Date.NullableToStream(output);\r\n            DeleteDate.NullableToStream(output);\r\n            Qts.NullableToStream(output);\r\n\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n\r\n            InSeqNo.NullableToStream(output);\r\n            OutSeqNo.NullableToStream(output);\r\n            CustomFlags.NullableToStream(output);\r\n            \r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.BotInlineResult))\r\n            {\r\n                _inlineBotResult.ToStream(output);\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            if (Media is TLDecryptedMessageMediaEmpty)\r\n            {\r\n                return string.Format(\"TLDecryptedMessage45 qts={0} in_seq_no={1} out_seq_no={2} flags=[{3}] date={4} delete_date={5} message={6}\", Qts, InSeqNo, OutSeqNo, TLMessageBase.MessageFlagsString(Flags), Date, DeleteDate, Message);\r\n            }\r\n\r\n            return string.Format(\"TLDecryptedMessage45 qts={0} in_seq_no={1} out_seq_no={2} flags=[{3}] date={4} delete_date={5} media={6}\", Qts, InSeqNo, OutSeqNo, TLMessageBase.MessageFlagsString(Flags), Date, DeleteDate, Media);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessage17 : TLDecryptedMessage, ISeqNo\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDecryptedMessage17;\r\n\r\n        public TLInt InSeqNo { get; set; }\r\n\r\n        public TLInt OutSeqNo { get; set; }\r\n\r\n        protected TLInt _customFlags;\r\n\r\n        public TLInt CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        public override Visibility SecretPhotoMenuVisibility\r\n        {\r\n            get\r\n            {\r\n                var isSecretPhoto = Media is TLDecryptedMessageMediaPhoto;\r\n                return isSecretPhoto && TTL.Value > 0.0 && TTL.Value <= 60.0 ? Visibility.Collapsed : Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            RandomId = GetObject<TLLong>(bytes, ref position);\r\n            TTL = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Media = GetObject<TLDecryptedMessageMediaBase>(bytes, ref position);\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"  >>TLDecryptedMessage17.FromBytes random_id={0} ttl={1} message={2} media=[{3}]\", RandomId, TTL, Message, Media);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"  <<TLDecryptedMessage17.ToBytes random_id={0} ttl={1} message={2} media=[{3}]\", RandomId, TTL, Message, Media);\r\n\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                RandomId.ToBytes(),\r\n                TTL.ToBytes(),\r\n                Message.ToBytes(),\r\n                Media.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            RandomId = GetObject<TLLong>(input);\r\n            TTL = GetObject<TLInt>(input);\r\n            //RandomBytes = GetObject<TLString>(input);\r\n            Message = GetObject<TLString>(input);\r\n            Media = GetObject<TLDecryptedMessageMediaBase>(input);\r\n\r\n            ChatId = GetNullableObject<TLInt>(input);\r\n            InputFile = GetNullableObject<TLInputEncryptedFileBase>(input);\r\n            FromId = GetNullableObject<TLInt>(input);\r\n            Out = GetNullableObject<TLBool>(input);\r\n            Unread = GetNullableObject<TLBool>(input);\r\n            Date = GetNullableObject<TLInt>(input);\r\n            DeleteDate = GetNullableObject<TLLong>(input);\r\n            Qts = GetNullableObject<TLInt>(input);\r\n\r\n            var status = GetObject<TLInt>(input);\r\n            Status = (MessageStatus)status.Value;\r\n\r\n            InSeqNo = GetNullableObject<TLInt>(input);\r\n            OutSeqNo = GetNullableObject<TLInt>(input);\r\n            CustomFlags = GetNullableObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(RandomId.ToBytes());\r\n            output.Write(TTL.ToBytes());\r\n            //output.Write(RandomBytes.ToBytes());\r\n            output.Write(Message.ToBytes());\r\n            Media.ToStream(output);\r\n\r\n            ChatId.NullableToStream(output);\r\n            InputFile.NullableToStream(output);\r\n            FromId.NullableToStream(output);\r\n            Out.NullableToStream(output);\r\n            Unread.NullableToStream(output);\r\n            Date.NullableToStream(output);\r\n            DeleteDate.NullableToStream(output);\r\n            Qts.NullableToStream(output);\r\n\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n\r\n            InSeqNo.NullableToStream(output);\r\n            OutSeqNo.NullableToStream(output);\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            if (Media is TLDecryptedMessageMediaEmpty)\r\n            {\r\n                return string.Format(\"TLDecryptedMessage17 qts={0} in_seq_no={1} out_seq_no={2} date={3} delete_date={4} message={5}\", Qts, InSeqNo, OutSeqNo, Date, DeleteDate, Message);\r\n            }\r\n\r\n            return string.Format(\"TLDecryptedMessage17 qts={0} in_seq_no={1} out_seq_no={2} date={3} delete_date={4} media={5}\", Qts, InSeqNo, OutSeqNo, Date, DeleteDate, Media);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessage : TLDecryptedMessageBase, IMessage\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessage;\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public TLDecryptedMessageMediaBase Media { get; set; }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get\r\n            {\r\n                if (Media != null)\r\n                {\r\n                    return Media.MediaWidth;\r\n                }\r\n\r\n                return base.MediaWidth;\r\n            }\r\n        }\r\n\r\n        public override bool IsSticker()\r\n        {\r\n            var mediaDocument = Media as TLDecryptedMessageMediaExternalDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                return IsSticker(mediaDocument);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override Visibility MessageVisibility\r\n        {\r\n            get { return Message == null || string.IsNullOrEmpty(Message.ToString()) ? Visibility.Collapsed : Visibility.Visible; }\r\n        }\r\n\r\n        public override Visibility SelectionVisibility\r\n        {\r\n            get { return Visibility.Visible; }\r\n        }\r\n\r\n        public override Visibility SecretPhotoMenuVisibility\r\n        {\r\n            get { return Visibility.Visible; }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            if (Media is TLDecryptedMessageMediaEmpty)\r\n            {\r\n                return string.Format(\"TLDecryptedMessage qts={0} date={1} delete_date={2} message={3}\", Qts, Date, DeleteDate, Message);\r\n            }\r\n\r\n            return string.Format(\"TLDecryptedMessage qts={0} date={1} delete_date={2} media={3}\", Qts, Date, DeleteDate, Media);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            base.FromBytes(bytes, ref position);\r\n\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Media = GetObject<TLDecryptedMessageMediaBase>(bytes, ref position);\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"  >>TLDecryptedMessage.FromBytes message={0} media=[{1}]\", Message, Media);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"  <<TLDecryptedMessage.ToBytes message={0} media=[{1}]\", Message, Media);\r\n\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                RandomId.ToBytes(),\r\n                RandomBytes.ToBytes(),\r\n                Message.ToBytes(),\r\n                Media.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            RandomId = GetObject<TLLong>(input);\r\n            RandomBytes = GetObject<TLString>(input);\r\n            Message = GetObject<TLString>(input);\r\n            Media = GetObject<TLDecryptedMessageMediaBase>(input);\r\n\r\n            ChatId = GetNullableObject<TLInt>(input);\r\n            InputFile = GetNullableObject<TLInputEncryptedFileBase>(input);\r\n            FromId = GetNullableObject<TLInt>(input);\r\n            Out = GetNullableObject<TLBool>(input);\r\n            Unread = GetNullableObject<TLBool>(input);\r\n            Date = GetNullableObject<TLInt>(input);\r\n            DeleteDate = GetNullableObject<TLLong>(input);\r\n            Qts = GetNullableObject<TLInt>(input);\r\n\r\n            var status = GetObject<TLInt>(input);\r\n            Status = (MessageStatus)status.Value;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(RandomId.ToBytes());\r\n            output.Write(RandomBytes.ToBytes());\r\n            output.Write(Message.ToBytes());\r\n            Media.ToStream(output);\r\n\r\n            ChatId.NullableToStream(output);\r\n            InputFile.NullableToStream(output);\r\n            FromId.NullableToStream(output);\r\n            Out.NullableToStream(output);\r\n            Unread.NullableToStream(output);\r\n            Date.NullableToStream(output);\r\n            DeleteDate.NullableToStream(output);\r\n            Qts.NullableToStream(output);\r\n\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageService17 : TLDecryptedMessageService, ISeqNo\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDecryptedMessageService17;\r\n\r\n        public TLInt InSeqNo { get; set; }\r\n\r\n        public TLInt OutSeqNo { get; set; }\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            RandomId = GetObject<TLLong>(bytes, ref position);\r\n            Action = GetObject<TLDecryptedMessageActionBase>(bytes, ref position);\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"  >>TLDecryptedMessageService17.FromBytes random_id={0} action=[{1}]\", RandomId, Action);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"  <<TLDecryptedMessageService17.ToBytes random_id={0} action=[{1}]\", RandomId, Action);\r\n\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                RandomId.ToBytes(),\r\n                //RandomBytes.ToBytes(),\r\n                Action.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            RandomId = GetObject<TLLong>(input);\r\n            //RandomBytes = GetObject<TLString>(input);\r\n            Action = GetObject<TLDecryptedMessageActionBase>(input);\r\n\r\n            ChatId = GetNullableObject<TLInt>(input);\r\n            FromId = GetNullableObject<TLInt>(input);\r\n            Out = GetNullableObject<TLBool>(input);\r\n            Unread = GetNullableObject<TLBool>(input);\r\n            Date = GetNullableObject<TLInt>(input);\r\n            DeleteDate = GetNullableObject<TLLong>(input);\r\n            Qts = GetNullableObject<TLInt>(input);\r\n\r\n            var status = GetObject<TLInt>(input);\r\n            Status = (MessageStatus)status.Value;\r\n\r\n            InSeqNo = GetNullableObject<TLInt>(input);\r\n            OutSeqNo = GetNullableObject<TLInt>(input);\r\n            Flags = GetNullableObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(RandomId.ToBytes());\r\n            //output.Write(RandomBytes.ToBytes());\r\n            Action.ToStream(output);\r\n\r\n            ChatId.NullableToStream(output);\r\n            FromId.NullableToStream(output);\r\n            Out.NullableToStream(output);\r\n            Unread.NullableToStream(output);\r\n            Date.NullableToStream(output);\r\n            DeleteDate.NullableToStream(output);\r\n            Qts.NullableToStream(output);\r\n\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n\r\n            InSeqNo.NullableToStream(output);\r\n            OutSeqNo.NullableToStream(output);\r\n            Flags.NullableToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLDecryptedMessageService17 qts={0} in_seq_no={1} out_seq_no={2} random_id={3} date={4} delete_date={5} action=[{6}]\", Qts, InSeqNo, OutSeqNo, RandomId, Date, DeleteDate, Action);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageService : TLDecryptedMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageService;\r\n\r\n        public TLDecryptedMessageActionBase Action { get; set; }\r\n\r\n        public override Visibility SelectionVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility SecretPhotoMenuVisibility\r\n        {\r\n            get { return Visibility.Visible; }\r\n        }\r\n\r\n        public override Visibility MessageVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            base.FromBytes(bytes, ref position);\r\n\r\n            Action = GetObject<TLDecryptedMessageActionBase>(bytes, ref position);\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"  >>TLDecryptedMessageService.FromBytes random_id={0} action=[{1}]\", RandomId, Action);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"  <<TLDecryptedMessageService.ToBytes random_id={0} action=[{1}]\", RandomId, Action);\r\n\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                RandomId.ToBytes(),\r\n                RandomBytes.ToBytes(),\r\n                Action.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            RandomId = GetObject<TLLong>(input);\r\n            RandomBytes = GetObject<TLString>(input);\r\n            Action = GetObject<TLDecryptedMessageActionBase>(input);\r\n\r\n            ChatId = GetNullableObject<TLInt>(input);\r\n            FromId = GetNullableObject<TLInt>(input);\r\n            Out = GetNullableObject<TLBool>(input);\r\n            Unread = GetNullableObject<TLBool>(input);\r\n            Date = GetNullableObject<TLInt>(input);\r\n            DeleteDate = GetNullableObject<TLLong>(input);\r\n            Qts = GetNullableObject<TLInt>(input);\r\n\r\n            var status = GetObject<TLInt>(input);\r\n            Status = (MessageStatus)status.Value;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(RandomId.ToBytes());\r\n            output.Write(RandomBytes.ToBytes());\r\n            output.Write(Action.ToBytes());\r\n\r\n            ChatId.NullableToStream(output);\r\n            FromId.NullableToStream(output);\r\n            Out.NullableToStream(output);\r\n            Unread.NullableToStream(output);\r\n            Date.NullableToStream(output);\r\n            DeleteDate.NullableToStream(output);\r\n            Qts.NullableToStream(output);\r\n\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var dateTimeString = \"null\";\r\n            try\r\n            {\r\n                if (Date != null)\r\n                {\r\n                    var clientDelta = MTProtoService.Instance.ClientTicksDelta;\r\n                    //var utc0SecsLong = Date.Value * 4294967296 - clientDelta;\r\n                    var utc0SecsInt = Date.Value - clientDelta / 4294967296.0;\r\n                    DateTime? dateTime = Helpers.Utils.UnixTimestampToDateTime(utc0SecsInt);\r\n                    dateTimeString = dateTime.Value.ToString(\"H:mm:ss\");\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n            return string.Format(\"TLDecryptedMessageService qts={0} random_id={1} date={2} delete_date={3} action=[{4}]\", Qts, RandomId, Date, DeleteDate, Action);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDecryptedMessageAction.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLDecryptedMessageActionBase : TLObject { }\r\n\r\n    #region Additional\r\n    public class TLDecryptedMessageActionEmpty : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n    #endregion\r\n\r\n    public class TLDecryptedMessageActionSetMessageTTL : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionSetMessageTTL;\r\n\r\n        public TLInt TTLSeconds { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            TTLSeconds = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                TTLSeconds.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            TTLSeconds = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(TTLSeconds.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionReadMessages : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionReadMessages;\r\n\r\n        public TLVector<TLLong> RandomIds { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            RandomIds = GetObject<TLVector<TLLong>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                RandomIds.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            RandomIds = GetObject<TLVector<TLLong>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(RandomIds.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionDeleteMessages : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionDeleteMessages;\r\n\r\n        public TLVector<TLLong> RandomIds { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            RandomIds = GetObject<TLVector<TLLong>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                RandomIds.ToBytes());\r\n        }\r\n        \r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            RandomIds = GetObject<TLVector<TLLong>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(RandomIds.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionScreenshotMessages : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionScreenshotMessages;\r\n\r\n        public TLVector<TLLong> RandomIds { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            RandomIds = GetObject<TLVector<TLLong>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                RandomIds.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            RandomIds = GetObject<TLVector<TLLong>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(RandomIds.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionFlushHistory : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionFlushHistory;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionNotifyLayer : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionNotifyLayer;\r\n\r\n        public TLInt Layer { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Layer = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Layer.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Layer = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Layer.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLDecryptedMessageActionNotifyLayer layer={0}\", Layer);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionResend : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionResend;\r\n\r\n        public TLInt StartSeqNo { get; set; }\r\n\r\n        public TLInt EndSeqNo { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            StartSeqNo = GetObject<TLInt>(bytes, ref position);\r\n            EndSeqNo = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                StartSeqNo.ToBytes(),\r\n                EndSeqNo.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            StartSeqNo = GetObject<TLInt>(input);\r\n            EndSeqNo = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(StartSeqNo.ToBytes());\r\n            output.Write(EndSeqNo.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionTyping : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionTyping;\r\n\r\n        public TLSendMessageActionBase Action { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Action = GetObject<TLSendMessageActionBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Action.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Action = GetObject<TLSendMessageActionBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Action.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionRequestKey : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionRequestKey;\r\n\r\n        public TLLong ExchangeId { get; set; }\r\n\r\n        public TLString GA { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ExchangeId = GetObject<TLLong>(bytes, ref position);\r\n            GA = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ExchangeId.ToBytes(),\r\n                GA.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ExchangeId = GetObject<TLLong>(input);\r\n            GA = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(ExchangeId.ToBytes());\r\n            output.Write(GA.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionAcceptKey : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionAcceptKey;\r\n\r\n        public TLLong ExchangeId { get; set; }\r\n\r\n        public TLString GB { get; set; }\r\n\r\n        public TLLong KeyFingerprint { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ExchangeId = GetObject<TLLong>(bytes, ref position);\r\n            GB = GetObject<TLString>(bytes, ref position);\r\n            KeyFingerprint = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ExchangeId.ToBytes(),\r\n                GB.ToBytes(),\r\n                KeyFingerprint.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ExchangeId = GetObject<TLLong>(input);\r\n            GB = GetObject<TLString>(input);\r\n            KeyFingerprint = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(ExchangeId.ToBytes());\r\n            output.Write(GB.ToBytes());\r\n            output.Write(KeyFingerprint.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionAbortKey : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionAbortKey;\r\n\r\n        public TLLong ExchangeId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ExchangeId = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ExchangeId.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ExchangeId = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(ExchangeId.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionCommitKey : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionCommitKey;\r\n\r\n        public TLLong ExchangeId { get; set; }\r\n\r\n        public TLLong KeyFingerprint { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ExchangeId = GetObject<TLLong>(bytes, ref position);\r\n            KeyFingerprint = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ExchangeId.ToBytes(),\r\n                KeyFingerprint.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ExchangeId = GetObject<TLLong>(input);\r\n            KeyFingerprint = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(ExchangeId.ToBytes());\r\n            output.Write(KeyFingerprint.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageActionNoop : TLDecryptedMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageActionNoop;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDecryptedMessageLayer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLDecryptedMessageLayer : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageLayer;\r\n\r\n        public TLInt Layer { get; set; }\r\n\r\n        public TLDecryptedMessageBase Message { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"  <<TLDecryptedMessageLayer.ToBytes layer={0} message=[{1}]\", Layer, Message);\r\n\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Layer.ToBytes(),\r\n                Message.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"  >>TLDecryptedMessageLayer.FromBytes layer={0} message=[{1}]\", Layer, Message);\r\n\r\n            Layer = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLDecryptedMessageBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageLayer17 : TLDecryptedMessageLayer\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageLayer17;\r\n\r\n        public TLString RandomBytes { get; set; }\r\n\r\n        public TLInt InSeqNo { get; set; }\r\n\r\n        public TLInt OutSeqNo { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"  <<TLDecryptedMessageLayer17.ToBytes layer={0} in_seq_no={1} out_seq_no={2} message=[{3}]\", Layer, InSeqNo, OutSeqNo, Message);\r\n\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                RandomBytes.ToBytes(),\r\n                Layer.ToBytes(),\r\n                InSeqNo.ToBytes(),\r\n                OutSeqNo.ToBytes(),\r\n                Message.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            RandomBytes = GetObject<TLString>(bytes, ref position);\r\n            Layer = GetObject<TLInt>(bytes, ref position);\r\n            InSeqNo = GetObject<TLInt>(bytes, ref position);\r\n            OutSeqNo = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLDecryptedMessageBase>(bytes, ref position);\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"  >>TLDecryptedMessageLayer17.FromBytes layer={0} in_seq_no={1} out_seq_no={2} message=[{3}]\", Layer, InSeqNo, OutSeqNo, Message);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDecryptedMessageMedia.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Linq;\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Cache;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TTLParams\r\n    {\r\n        public bool IsStarted { get; set; }\r\n        public int Total { get; set; }\r\n        public DateTime StartTime { get; set; }\r\n        public bool Out { get; set; }\r\n    }\r\n\r\n    public abstract class TLDecryptedMessageMediaBase : TLObject\r\n    {\r\n        public double LastProgress { get; set; }\r\n        public string IsoFileName { get; set; }\r\n        public bool? AutoPlayGif { get; set; }\r\n        public bool Forbidden { get; set; }\r\n        public TLInt TTLSeconds { get; set; }\r\n\r\n        private double _uploadingProgress;\r\n\r\n        public double UploadingProgress\r\n        {\r\n            get { return _uploadingProgress; }\r\n            set { SetField(ref _uploadingProgress, value, () => UploadingProgress); }\r\n        }\r\n\r\n        private double _downloadingProgress;\r\n\r\n        public double DownloadingProgress\r\n        {\r\n            get { return _downloadingProgress; }\r\n            set { SetField(ref _downloadingProgress, value, () => DownloadingProgress); }\r\n        }\r\n        #region Additional\r\n#if WP8\r\n        public StorageFile StorageFile { get; set; }\r\n#endif\r\n        private TLEncryptedFileBase _file;\r\n\r\n        public TLEncryptedFileBase File\r\n        {\r\n            get { return _file; }\r\n            set { _file = value; }\r\n        }\r\n\r\n        public TLDecryptedMessageMediaBase Self { get { return this; } }\r\n\r\n        public TLDecryptedMessageMediaBase ThumbSelf { get { return this; } }\r\n\r\n        public bool IsCanceled { get; set; }\r\n\r\n        public TTLParams _ttlParams;\r\n\r\n        public TTLParams TTLParams\r\n        {\r\n            get { return _ttlParams; }\r\n            set { SetField(ref _ttlParams, value, () => TTLParams); }\r\n        }\r\n\r\n        public bool NotListened { get; set; }\r\n\r\n        private bool _out = true;\r\n\r\n        public bool Out\r\n        {\r\n            get { return _out; }\r\n            set { _out = value; }\r\n        }\r\n\r\n        public virtual double MediaWidth\r\n        {\r\n            get { return 12.0 + 311.0 + 12.0; }\r\n        }\r\n\r\n        #endregion\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaEmpty : TLDecryptedMessageMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageMediaEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageThumbMediaBase : TLDecryptedMessageMediaBase\r\n    {\r\n        public TLString Thumb { get; set; }\r\n\r\n        public TLInt ThumbW { get; set; }\r\n\r\n        public TLInt ThumbH { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLString Key { get; set; }\r\n\r\n        public TLString IV { get; set; }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaPhoto45 : TLDecryptedMessageMediaPhoto, IMediaCaption\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDecryptedMessageMediaPhoto45;\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Thumb = GetObject<TLString>(bytes, ref position);\r\n            ThumbW = GetObject<TLInt>(bytes, ref position);\r\n            ThumbH = GetObject<TLInt>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n            IV = GetObject<TLString>(bytes, ref position);\r\n            Caption = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Thumb.ToBytes(),\r\n                ThumbW.ToBytes(),\r\n                ThumbH.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Size.ToBytes(),\r\n                Key.ToBytes(),\r\n                IV.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Thumb = GetObject<TLString>(input);\r\n            ThumbW = GetObject<TLInt>(input);\r\n            ThumbH = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Key = GetObject<TLString>(input);\r\n            IV = GetObject<TLString>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            File = GetNullableObject<TLEncryptedFileBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Thumb.ToBytes());\r\n            output.Write(ThumbW.ToBytes());\r\n            output.Write(ThumbH.ToBytes());\r\n            output.Write(W.ToBytes());\r\n            output.Write(H.ToBytes());\r\n            output.Write(Size.ToBytes());\r\n            output.Write(Key.ToBytes());\r\n            output.Write(IV.ToBytes());\r\n            output.Write(Caption.ToBytes());\r\n\r\n            File.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaPhoto : TLDecryptedMessageThumbMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageMediaPhoto;\r\n\r\n        public TLInt W { get; set; }\r\n\r\n        public TLInt H { get; set; }\r\n\r\n        #region Additional\r\n\r\n        public TLEncryptedFileBase Photo { get { return File; } }\r\n        #endregion\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get\r\n            {\r\n                var ttl = TTLSeconds;\r\n                if (ttl != null && ttl.Value > 0 && ttl.Value <= 60.0)\r\n                {\r\n                    return 2.0 + 256.0 + 2.0;\r\n                }\r\n\r\n                var minVerticalRatioToScale = 1.2;\r\n                var scale = 1.2; // must be less than minVerticalRatioToScale to avoid large square photos\r\n                var maxDimension = 323.0;\r\n\r\n                if (H.Value > W.Value)\r\n                {\r\n                    if (TLMessageMediaPhoto.IsScaledVerticalPhoto(minVerticalRatioToScale, H, W))\r\n                    {\r\n                        return 2.0 + scale * maxDimension / H.Value * W.Value + 2.0;\r\n                    }\r\n\r\n                    return 2.0 + maxDimension / H.Value * W.Value + 2.0;\r\n                }\r\n\r\n                return 2.0 + maxDimension + 2.0;\r\n            }\r\n        }\r\n\r\n        //public override double MediaWidth\r\n        //{\r\n        //    get\r\n        //    {\r\n        //        if (TLMessageBase.HasTTL(this) && Photo != null)\r\n        //        {\r\n        //            return 2.0 + 256.0 + 2.0;\r\n        //        }\r\n\r\n        //        return base.MediaWidth;\r\n        //    }\r\n        //}\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Thumb = GetObject<TLString>(bytes, ref position);\r\n            ThumbW = GetObject<TLInt>(bytes, ref position);\r\n            ThumbH = GetObject<TLInt>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n            IV = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Thumb.ToBytes(),\r\n                ThumbW.ToBytes(),\r\n                ThumbH.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Size.ToBytes(),\r\n                Key.ToBytes(),\r\n                IV.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Thumb = GetObject<TLString>(input);\r\n            ThumbW = GetObject<TLInt>(input);\r\n            ThumbH = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Key = GetObject<TLString>(input);\r\n            IV = GetObject<TLString>(input);\r\n\r\n            File = GetNullableObject<TLEncryptedFileBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Thumb.ToBytes());\r\n            output.Write(ThumbW.ToBytes());\r\n            output.Write(ThumbH.ToBytes());\r\n            output.Write(W.ToBytes());\r\n            output.Write(H.ToBytes());\r\n            output.Write(Size.ToBytes());\r\n            output.Write(Key.ToBytes());\r\n            output.Write(IV.ToBytes());\r\n\r\n            File.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaVideo45 : TLDecryptedMessageMediaVideo17, IMediaCaption\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDecryptedMessageMediaVideo45;\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Thumb = GetObject<TLString>(bytes, ref position);\r\n            ThumbW = GetObject<TLInt>(bytes, ref position);\r\n            ThumbH = GetObject<TLInt>(bytes, ref position);\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n            IV = GetObject<TLString>(bytes, ref position);\r\n            Caption = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Thumb.ToBytes(),\r\n                ThumbW.ToBytes(),\r\n                ThumbH.ToBytes(),\r\n                Duration.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Size.ToBytes(),\r\n                Key.ToBytes(),\r\n                IV.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Thumb = GetObject<TLString>(input);\r\n            ThumbW = GetObject<TLInt>(input);\r\n            ThumbH = GetObject<TLInt>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Key = GetObject<TLString>(input);\r\n            IV = GetObject<TLString>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            File = GetNullableObject<TLEncryptedFileBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Thumb.ToBytes());\r\n            output.Write(ThumbW.ToBytes());\r\n            output.Write(ThumbH.ToBytes());\r\n            output.Write(Duration.ToBytes());\r\n            output.Write(MimeType.ToBytes());\r\n            output.Write(W.ToBytes());\r\n            output.Write(H.ToBytes());\r\n            output.Write(Size.ToBytes());\r\n            output.Write(Key.ToBytes());\r\n            output.Write(IV.ToBytes());\r\n            output.Write(Caption.ToBytes());\r\n\r\n            File.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaVideo17 : TLDecryptedMessageMediaVideo\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDecryptedMessageMediaVideo17;\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Thumb = GetObject<TLString>(bytes, ref position);\r\n            ThumbW = GetObject<TLInt>(bytes, ref position);\r\n            ThumbH = GetObject<TLInt>(bytes, ref position);\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n            IV = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Thumb.ToBytes(),\r\n                ThumbW.ToBytes(),\r\n                ThumbH.ToBytes(),\r\n                Duration.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Size.ToBytes(),\r\n                Key.ToBytes(),\r\n                IV.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Thumb = GetObject<TLString>(input);\r\n            ThumbW = GetObject<TLInt>(input);\r\n            ThumbH = GetObject<TLInt>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Key = GetObject<TLString>(input);\r\n            IV = GetObject<TLString>(input);\r\n\r\n            File = GetNullableObject<TLEncryptedFileBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Thumb.ToBytes());\r\n            output.Write(ThumbW.ToBytes());\r\n            output.Write(ThumbH.ToBytes());\r\n            output.Write(Duration.ToBytes());\r\n            output.Write(MimeType.ToBytes());\r\n            output.Write(W.ToBytes());\r\n            output.Write(H.ToBytes());\r\n            output.Write(Size.ToBytes());\r\n            output.Write(Key.ToBytes());\r\n            output.Write(IV.ToBytes());\r\n\r\n            File.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaVideo : TLDecryptedMessageThumbMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageMediaVideo;\r\n\r\n        public TLInt Duration { get; set; }\r\n\r\n        public TLInt W { get; set; }\r\n\r\n        public TLInt H { get; set; }\r\n\r\n        #region Additional\r\n\r\n        public TLDecryptedMessageMediaVideo Video { get { return this; } }\r\n\r\n        public string DurationString\r\n        {\r\n            get\r\n            {\r\n                if (Duration == null) return string.Empty;\r\n\r\n                var timeSpan = TimeSpan.FromSeconds(Duration.Value);\r\n\r\n                if (timeSpan.Hours > 0)\r\n                {\r\n                    return timeSpan.ToString(@\"h\\:mm\\:ss\");\r\n                }\r\n\r\n                return timeSpan.ToString(@\"m\\:ss\");\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 2.0 + 230.0 + 2.0; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Thumb = GetObject<TLString>(bytes, ref position);\r\n            ThumbW = GetObject<TLInt>(bytes, ref position);\r\n            ThumbH = GetObject<TLInt>(bytes, ref position);\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n            IV = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Thumb.ToBytes(),\r\n                ThumbW.ToBytes(),\r\n                ThumbH.ToBytes(),\r\n                Duration.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Size.ToBytes(),\r\n                Key.ToBytes(),\r\n                IV.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Thumb = GetObject<TLString>(input);\r\n            ThumbW = GetObject<TLInt>(input);\r\n            ThumbH = GetObject<TLInt>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Key = GetObject<TLString>(input);\r\n            IV = GetObject<TLString>(input);\r\n\r\n            File = GetNullableObject<TLEncryptedFileBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Thumb.ToBytes());\r\n            output.Write(ThumbW.ToBytes());\r\n            output.Write(ThumbH.ToBytes());\r\n            output.Write(Duration.ToBytes());\r\n            output.Write(W.ToBytes());\r\n            output.Write(H.ToBytes());\r\n            output.Write(Size.ToBytes());\r\n            output.Write(Key.ToBytes());\r\n            output.Write(IV.ToBytes());\r\n\r\n            File.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaVenue : TLDecryptedMessageMediaGeoPoint\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDecryptedMessageMediaVenue;\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Address { get; set; }\r\n\r\n        public TLString Provider { get; set; }\r\n\r\n        public TLString VenueId { get; set; }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 2.0 + 320.0 + 2.0; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Lat = GetObject<TLDouble>(bytes, ref position);\r\n            Long = GetObject<TLDouble>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Address = GetObject<TLString>(bytes, ref position);\r\n            Provider = GetObject<TLString>(bytes, ref position);\r\n            VenueId = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Lat.ToBytes(),\r\n                Long.ToBytes(),\r\n                Title.ToBytes(),\r\n                Address.ToBytes(),\r\n                Provider.ToBytes(),\r\n                VenueId.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Lat = GetObject<TLDouble>(input);\r\n            Long = GetObject<TLDouble>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Address = GetObject<TLString>(input);\r\n            Provider = GetObject<TLString>(input);\r\n            VenueId = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Lat.ToStream(output);\r\n            Long.ToStream(output);\r\n            Title.ToStream(output);\r\n            Address.ToStream(output);\r\n            Provider.ToStream(output);\r\n            VenueId.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaGeoPoint : TLDecryptedMessageMediaBase, IMessageMediaGeoPoint\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageMediaGeoPoint;\r\n\r\n        public TLDouble Lat { get; set; }\r\n\r\n        public TLDouble Long { get; set; }\r\n\r\n        #region Additional\r\n\r\n        public TLGeoPointBase Geo\r\n        {\r\n            get\r\n            {\r\n                return Lat != null && Long != null\r\n                    ? (TLGeoPointBase) new TLGeoPoint{ Lat = Lat, Long = Long }\r\n                    : new TLGeoPointEmpty();\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 2.0 + 320.0 + 2.0; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Lat = GetObject<TLDouble>(bytes, ref position);\r\n            Long = GetObject<TLDouble>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Lat.ToBytes(),\r\n                Long.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Lat = GetObject<TLDouble>(input);\r\n            Long = GetObject<TLDouble>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Lat.ToBytes());\r\n            output.Write(Long.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaContact : TLDecryptedMessageMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageMediaContact;\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString FirstName { get; set; }\r\n\r\n        public TLString LastName { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return FullName;\r\n        }\r\n\r\n        #region Additional\r\n\r\n        public virtual string FullName { get { return string.Format(\"{0} {1}\", FirstName, LastName); } }\r\n\r\n        public TLUserBase User\r\n        {\r\n            get\r\n            {\r\n                var cacheService = InMemoryCacheService.Instance;\r\n                var user = cacheService.GetUser(UserId);\r\n\r\n                if (user == null)\r\n                {\r\n                    return new TLUser{Phone = PhoneNumber, FirstName = FirstName, LastName = LastName, Id = new TLInt(0)};\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 12.0 + 311.0 + 12.0; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhoneNumber = GetObject<TLString>(bytes, ref position);\r\n            FirstName = GetObject<TLString>(bytes, ref position);\r\n            LastName = GetObject<TLString>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                UserId.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PhoneNumber = GetObject<TLString>(input);\r\n            FirstName = GetObject<TLString>(input);\r\n            LastName = GetObject<TLString>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(PhoneNumber.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n            output.Write(UserId.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaAudio : TLDecryptedMessageMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageMediaAudio;\r\n\r\n        public TLInt Duration { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLString Key { get; set; }\r\n\r\n        public TLString IV { get; set; }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 12.0 + 284.0 + 12.0; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n            IV = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Duration.ToBytes(),\r\n                Size.ToBytes(),\r\n                Key.ToBytes(),\r\n                IV.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Duration = GetObject<TLInt>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Key = GetObject<TLString>(input);\r\n            IV = GetObject<TLString>(input);\r\n\r\n            UserId = GetNullableObject<TLInt>(input);\r\n            File = GetNullableObject<TLEncryptedFileBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Duration.ToBytes());\r\n            output.Write(Size.ToBytes());\r\n            output.Write(Key.ToBytes());\r\n            output.Write(IV.ToBytes());\r\n\r\n            UserId.NullableToStream(output);\r\n            File.NullableToStream(output);\r\n        }\r\n\r\n        #region Additional\r\n\r\n        private TLInt _userId;\r\n\r\n        public TLInt UserId\r\n        {\r\n            get { return _userId; }\r\n            set { _userId = value; }\r\n        }\r\n\r\n        public TLDecryptedMessageMediaAudio Audio { get { return this; } }\r\n\r\n        public string DurationString\r\n        {\r\n            get\r\n            {\r\n                var timeSpan = TimeSpan.FromSeconds(Duration.Value);\r\n\r\n                if (timeSpan.Hours > 0)\r\n                {\r\n                    return timeSpan.ToString(@\"h\\:mm\\:ss\");\r\n                }\r\n\r\n                return timeSpan.ToString(@\"m\\:ss\");\r\n            }\r\n        }\r\n\r\n        public TLUserBase User\r\n        {\r\n            get\r\n            {\r\n                if (UserId == null) return null;\r\n\r\n                var cacheService = InMemoryCacheService.Instance;\r\n                return cacheService.GetUser(UserId);\r\n            }\r\n        }\r\n        #endregion\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaAudio17 : TLDecryptedMessageMediaAudio\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDecryptedMessageMediaAudio17;\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n            IV = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Duration.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Size.ToBytes(),\r\n                Key.ToBytes(),\r\n                IV.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Duration = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Key = GetObject<TLString>(input);\r\n            IV = GetObject<TLString>(input);\r\n\r\n            UserId = GetNullableObject<TLInt>(input);\r\n            File = GetNullableObject<TLEncryptedFileBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Duration.ToBytes());\r\n            output.Write(MimeType.ToBytes());\r\n            output.Write(Size.ToBytes());\r\n            output.Write(Key.ToBytes());\r\n            output.Write(IV.ToBytes());\r\n\r\n            UserId.NullableToStream(output);\r\n            File.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaDocument45 : TLDecryptedMessageMediaDocument, IMediaCaption, IAttributes\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDecryptedMessageMediaDocument45;\r\n\r\n        public override TLString FileName\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var fileNameAttribute = Attributes[i] as TLDocumentAttributeFileName;\r\n                        if (fileNameAttribute != null)\r\n                        {\r\n                            return fileNameAttribute.FileName;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return TLString.Empty;\r\n            }\r\n            set\r\n            {\r\n                Attributes = Attributes ?? new TLVector<TLDocumentAttributeBase>();\r\n\r\n                for (var i = 0; i < Attributes.Count; i++)\r\n                {\r\n                    if (Attributes[i] is TLDocumentAttributeFileName)\r\n                    {\r\n                        Attributes.RemoveAt(i--);\r\n                    }\r\n                }\r\n\r\n                Attributes.Add(new TLDocumentAttributeFileName { FileName = value });\r\n            }\r\n        }\r\n\r\n\r\n        public bool Music\r\n        {\r\n            get\r\n            {\r\n                var documentAttributeAudio = Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio32) as TLDocumentAttributeAudio32;\r\n                if (documentAttributeAudio != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public override string DocumentName\r\n        {\r\n            get\r\n            {\r\n                var documentAttributeAudio = Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio46) as TLDocumentAttributeAudio46;\r\n                if (documentAttributeAudio != null)\r\n                {\r\n                    if (documentAttributeAudio.Title != null && documentAttributeAudio.Performer != null)\r\n                    {\r\n                        return string.Format(\"{0} — {1}\", documentAttributeAudio.Title, documentAttributeAudio.Performer);\r\n                    }\r\n\r\n                    if (documentAttributeAudio.Title != null)\r\n                    {\r\n                        return string.Format(\"{0}\", documentAttributeAudio.Title);\r\n                    }\r\n\r\n                    if (documentAttributeAudio.Performer != null)\r\n                    {\r\n                        return string.Format(\"{0}\", documentAttributeAudio.Performer);\r\n                    }\r\n                }\r\n\r\n                return FileName.ToString();\r\n            }\r\n        }\r\n\r\n        public TLVector<TLDocumentAttributeBase> Attributes { get; set; }\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public TLInt Duration\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var audioAttribute = Attributes[i] as TLDocumentAttributeAudio;\r\n                        if (audioAttribute != null)\r\n                        {\r\n                            return audioAttribute.Duration;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return new TLInt(0);\r\n            }\r\n        }\r\n\r\n        public TLString Waveform\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var audioAttribute = Attributes[i] as TLDocumentAttributeAudio46;\r\n                        if (audioAttribute != null)\r\n                        {\r\n                            return audioAttribute.Waveform;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public string DurationString\r\n        {\r\n            get\r\n            {\r\n                var timeSpan = TimeSpan.FromSeconds(Duration.Value);\r\n\r\n                if (timeSpan.Hours > 0)\r\n                {\r\n                    return timeSpan.ToString(@\"h\\:mm\\:ss\");\r\n                }\r\n\r\n                return timeSpan.ToString(@\"m\\:ss\");\r\n            }\r\n        }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get\r\n            {\r\n                var document = Document as TLDecryptedMessageMediaDocument45;\r\n                if (document != null)\r\n                {\r\n                    if (TLMessageBase.IsSticker(document, document.Size))\r\n                    {\r\n                        var maxStickerDimension = 196.0;\r\n\r\n                        return 6.0 + TLMessageMediaDocument.GetStickerDimension(document, true, maxStickerDimension) + 6.0;\r\n                    }\r\n\r\n                    if (TLMessageBase.IsVoice(document, document.Size))\r\n                    {\r\n                        return 12.0 + 284.0 + 12.0;\r\n                    }\r\n\r\n                    //if (TLMessageBase.IsRoundVideo(document))\r\n                    //{\r\n                    //    return 2.0 + 240.0 + 2.0;\r\n                    //}\r\n\r\n                    if (TLMessageBase.IsVideo(document, document.Size))\r\n                    {\r\n                        return 2.0 + 230.0 + 2.0;\r\n                    }\r\n\r\n                    if (TLMessageBase.IsGif(document, document.Size))\r\n                    {\r\n                        var maxGifDimension = 323.0;\r\n\r\n                        return 2.0 + TLMessageMediaDocument.GetGifDimension(new TLPhotoCachedSize { W = ThumbW, H = ThumbH }, document, true, maxGifDimension) + 2.0;\r\n                    }\r\n                }\r\n\r\n                return base.MediaWidth;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Thumb = GetObject<TLString>(bytes, ref position);\r\n            ThumbW = GetObject<TLInt>(bytes, ref position);\r\n            ThumbH = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n            IV = GetObject<TLString>(bytes, ref position);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(bytes, ref position);\r\n            Caption = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Thumb.ToBytes(),\r\n                ThumbW.ToBytes(),\r\n                ThumbH.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Size.ToBytes(),\r\n                Key.ToBytes(),\r\n                IV.ToBytes(),\r\n                Attributes.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Thumb = GetObject<TLString>(input);\r\n            ThumbW = GetObject<TLInt>(input);\r\n            ThumbH = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Key = GetObject<TLString>(input);\r\n            IV = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            File = GetNullableObject<TLEncryptedFileBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Thumb.ToBytes());\r\n            output.Write(ThumbW.ToBytes());\r\n            output.Write(ThumbH.ToBytes());\r\n            output.Write(MimeType.ToBytes());\r\n            output.Write(Size.ToBytes());\r\n            output.Write(Key.ToBytes());\r\n            output.Write(IV.ToBytes());\r\n            output.Write(Attributes.ToBytes());\r\n            output.Write(Caption.ToBytes());\r\n\r\n            File.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaDocument : TLDecryptedMessageMediaBase, IDecryptedMediaGif\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageMediaDocument;\r\n\r\n        public TLString Thumb { get; set; }\r\n\r\n        public TLInt ThumbW { get; set; }\r\n\r\n        public TLInt ThumbH { get; set; }\r\n\r\n        public virtual TLString FileName { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLString Key { get; set; }\r\n\r\n        public TLString IV { get; set; }\r\n\r\n        #region Additional\r\n\r\n        public TLDecryptedMessageMediaDocument Document { get { return this; } }\r\n\r\n        public virtual string DocumentName { get { return FileName != null ? FileName.ToString() : string.Empty; } }\r\n\r\n        public string FileExt\r\n        {\r\n            get { return FileName != null ? Path.GetExtension(FileName.ToString()).Replace(\".\", string.Empty) : null; }\r\n        }\r\n\r\n        public int DocumentSize\r\n        {\r\n            get { return Size != null ? Size.Value : 0; }\r\n        }\r\n\r\n        public string GetFileName()\r\n        {\r\n            var fileLocation = File as TLEncryptedFile;\r\n            if (fileLocation == null) return null;;\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.{3}\",\r\n                fileLocation.Id,\r\n                fileLocation.DCId,\r\n                fileLocation.AccessHash,\r\n                FileExt);\r\n\r\n            return fileName;\r\n        }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Thumb = GetObject<TLString>(bytes, ref position);\r\n            ThumbW = GetObject<TLInt>(bytes, ref position);\r\n            ThumbH = GetObject<TLInt>(bytes, ref position);\r\n            FileName = GetObject<TLString>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n            IV = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Thumb.ToBytes(),\r\n                ThumbW.ToBytes(),\r\n                ThumbH.ToBytes(),\r\n                FileName.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Size.ToBytes(),\r\n                Key.ToBytes(),\r\n                IV.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Thumb = GetObject<TLString>(input);\r\n            ThumbW = GetObject<TLInt>(input);\r\n            ThumbH = GetObject<TLInt>(input);\r\n            FileName = GetObject<TLString>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Key = GetObject<TLString>(input);\r\n            IV = GetObject<TLString>(input);\r\n\r\n            File = GetNullableObject<TLEncryptedFileBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Thumb.ToBytes());\r\n            output.Write(ThumbW.ToBytes());\r\n            output.Write(ThumbH.ToBytes());\r\n            output.Write(FileName.ToBytes());\r\n            output.Write(MimeType.ToBytes());\r\n            output.Write(Size.ToBytes());\r\n            output.Write(Key.ToBytes());\r\n            output.Write(IV.ToBytes());\r\n            File.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaExternalDocument : TLDecryptedMessageMediaBase, IAttributes\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageMediaExternalDocument;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLPhotoSizeBase Thumb { get; set; }\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public TLVector<TLDocumentAttributeBase> Attributes { get; set; }\r\n\r\n        public TLInt ImageSizeH\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var imageSizeAttribute = Attributes[i] as TLDocumentAttributeImageSize;\r\n                        if (imageSizeAttribute != null)\r\n                        {\r\n                            return imageSizeAttribute.H;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return new TLInt(0);\r\n            }\r\n        }\r\n\r\n        public TLInt ImageSizeW\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var imageSizeAttribute = Attributes[i] as TLDocumentAttributeImageSize;\r\n                        if (imageSizeAttribute != null)\r\n                        {\r\n                            return imageSizeAttribute.W;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return new TLInt(0);\r\n            }\r\n        }\r\n\r\n        public string FileExt\r\n        {\r\n            get { return Path.GetExtension(FileName.ToString()).Replace(\".\", string.Empty); }\r\n        }\r\n\r\n        public TLString FileName\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var fileNameAttribute = Attributes[i] as TLDocumentAttributeFileName;\r\n                        if (fileNameAttribute != null)\r\n                        {\r\n                            return fileNameAttribute.FileName;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return TLString.Empty;\r\n            }\r\n            set\r\n            {\r\n                Attributes = Attributes ?? new TLVector<TLDocumentAttributeBase>();\r\n\r\n                for (var i = 0; i < Attributes.Count; i++)\r\n                {\r\n                    if (Attributes[i] is TLDocumentAttributeFileName)\r\n                    {\r\n                        Attributes.RemoveAt(i--);\r\n                    }\r\n                }\r\n\r\n                Attributes.Add(new TLDocumentAttributeFileName { FileName = value });\r\n            }\r\n        }\r\n\r\n        public string GetFileName()\r\n        {\r\n            return string.Format(\"document{0}_{1}.{2}\", Id, AccessHash, FileExt);\r\n        }\r\n\r\n        public TLInputStickerSetBase StickerSet\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var stickerAttribute = Attributes[i] as TLDocumentAttributeSticker29;\r\n                        if (stickerAttribute != null)\r\n                        {\r\n                            return stickerAttribute.Stickerset;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        #region Additional\r\n        public string Emoticon { get; set; }\r\n\r\n        public TLDecryptedMessageMediaExternalDocument Document { get { return this; } }\r\n        #endregion\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} Id={1}\", GetType().Name, Id) + (StickerSet != null ? StickerSet.ToString() : string.Empty);\r\n        }\r\n\r\n        public TLInputDocumentFileLocation ToInputFileLocation()\r\n        {\r\n            return new TLInputDocumentFileLocation54\r\n            {\r\n                Id = Id,\r\n                AccessHash = AccessHash,\r\n                Version = new TLInt(0)\r\n            };\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Thumb = GetObject<TLPhotoSizeBase>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Date.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Size.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                DCId.ToBytes(),\r\n                Attributes.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Thumb = GetObject<TLPhotoSizeBase>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Date.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Size.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            DCId.ToStream(output);\r\n            Attributes.ToStream(output);\r\n        }\r\n    }\r\n    \r\n    public class TLDecryptedMessageMediaWebPage : TLDecryptedMessageMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageMediaWebPage;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLWebPageBase WebPage { get; set; }\r\n\r\n        public TLPhotoBase Photo\r\n        {\r\n            get\r\n            {\r\n                var webPage = WebPage as TLWebPage;\r\n                if (webPage != null)\r\n                {\r\n                    return webPage.Photo;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 12.0 + 311.0 + 12.0; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Url.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n\r\n            WebPage = GetNullableObject<TLWebPageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Url.ToBytes());\r\n\r\n            WebPage.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDecryptedMessageMediaGroup : TLDecryptedMessageMediaBase, IMessageMediaGroup\r\n    {\r\n        public const uint Signature = TLConstructors.TLDecryptedMessageMediaGroup;\r\n\r\n        public TLVector<TLDecryptedMessageBase> Group { get; set; }\r\n\r\n        public TLVector<TLObject> GroupCommon\r\n        {\r\n            get\r\n            {\r\n                if (Group == null)\r\n                {\r\n                    return new TLVector<TLObject>();\r\n                }\r\n\r\n                var group = new TLVector<TLObject>();\r\n                foreach (var item in Group)\r\n                {\r\n                    group.Add(item);\r\n                }\r\n                return group;\r\n            }\r\n        }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 1.0 + 311.0 + 1.0; }\r\n        }\r\n\r\n        public event EventHandler Calculate;\r\n\r\n        public virtual void RaiseCalculate()\r\n        {\r\n            var handler = Calculate;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Group = GetObject<TLVector<TLDecryptedMessageBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Group = GetObject<TLVector<TLDecryptedMessageBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Group.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDialog.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Helpers;\r\n#if WIN_RT\r\nusing Windows.UI;\r\nusing Windows.UI.Xaml;\r\nusing Windows.UI.Xaml.Media;\r\n#elif WINDOWS_PHONE\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n#endif\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum DialogCustomFlags\r\n    {\r\n        PinnedId = 0x1,             // 0\r\n        Promo = 0x2,                // 1\r\n        PromoExpires = 0x4,         // 2\r\n        PromoNotification = 0x8,    // 3\r\n        UnreadMark = 0x10,          // 4\r\n    }\r\n\r\n    [Flags]\r\n    public enum DialogFlags\r\n    {\r\n        Pts = 0x1,                  // 0\r\n        Draft = 0x2,                // 1\r\n        Pinned = 0x4,               // 2\r\n        UnreadMark = 0x8,           // 3\r\n        ReadMaxPosition = 0x10,     // 4\r\n    }\r\n\r\n    public interface IDialogPts\r\n    {\r\n        TLInt Pts { get; set; }\r\n    }\r\n\r\n    public enum TypingType\r\n    {\r\n        Text,\r\n        Record,\r\n        Upload\r\n    }\r\n\r\n    public class Typing\r\n    {\r\n        public TypingType Type { get; protected set; }\r\n\r\n        public string Description { get; protected set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Description;\r\n        }\r\n\r\n        public Typing(TypingType type, string description)\r\n        {\r\n            Description = description;\r\n            Type = type;\r\n        }\r\n\r\n        public static bool Equals(Typing typing1, Typing typing2)\r\n        {\r\n            if (typing1 == null && typing2 == null) return true;\r\n            if (typing1 == null) return false;\r\n            if (typing2 == null) return false;\r\n\r\n            return typing1.Type == typing2.Type;\r\n        }\r\n    }\r\n\r\n    public abstract class TLDialogBase : TLObject\r\n    {\r\n        public static string DialogFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (DialogFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public object MessagesSyncRoot = new object();\r\n\r\n        public int Index\r\n        {\r\n            get { return Peer != null && Peer.Id != null ? Peer.Id.Value : default(int); }\r\n            set\r\n            {\r\n                //NOTE: No need to set Index during deserialization. Possible null reference\r\n            }\r\n        }\r\n\r\n        public TLPeerBase Peer { get; set; }\r\n\r\n        public TLInt TopMessageId { get; set; }\r\n\r\n        private TLInt _unreadCount;\r\n\r\n        public TLInt UnreadCount\r\n        {\r\n            get { return _unreadCount; }\r\n            set { _unreadCount = value; }\r\n        }\r\n\r\n        public virtual bool IsPinned { get; set; }\r\n\r\n        public virtual TLInt PinnedId { get; set; }\r\n\r\n        #region Additional\r\n\r\n        public Typing Typing { get; set; }\r\n\r\n        public TLDialogBase Self { get { return this; } }\r\n\r\n        /// <summary>\r\n        /// If top message is sending message, than it has RandomId instead of Id\r\n        /// </summary>\r\n        public TLLong TopMessageRandomId { get; set; }\r\n\r\n        public TLLong TopDecryptedMessageRandomId { get; set; }\r\n\r\n        public TLPeerNotifySettingsBase NotifySettings { get; set; }\r\n\r\n        public TLObject _with;\r\n\r\n        public TLObject With\r\n        {\r\n            get { return _with; }\r\n            set { SetField(ref _with, value, () => With); }\r\n        }\r\n\r\n        public int WithId\r\n        {\r\n            get\r\n            {\r\n                if (With is TLChatBase)\r\n                {\r\n                    return ((TLChatBase)With).Index;\r\n                }\r\n                if (With is TLUserBase)\r\n                {\r\n                    return ((TLUserBase)With).Index;\r\n                }\r\n                return -1;\r\n            }\r\n        }\r\n\r\n        public Visibility ChatIconVisibility\r\n        {\r\n            get { return Peer is TLPeerChat ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public Visibility ChatVisibility\r\n        {\r\n            get { return Peer is TLPeerChat || Peer is TLPeerEncryptedChat || Peer is TLPeerBroadcast ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public Visibility UserVisibility\r\n        {\r\n            get { return Peer is TLPeerUser || _with is TLChatForbidden || _with is TLChatEmpty ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public Visibility BotVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = _with as TLUser;\r\n                return user != null && user.IsBot ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public Visibility EncryptedChatVisibility\r\n        {\r\n            get { return Peer is TLPeerEncryptedChat ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public Visibility VerifiedVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = With as TLUserBase;\r\n                if (user != null)\r\n                {\r\n                    return user.IsVerified ? Visibility.Visible : Visibility.Collapsed;\r\n                }\r\n\r\n                var channel = With as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    return channel.IsVerified ? Visibility.Visible : Visibility.Collapsed;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public Uri EncryptedImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                return !isLightTheme ?\r\n                    new Uri(\"/Images/Dialogs/secretchat-white-WXGA.png\", UriKind.Relative) :\r\n                    new Uri(\"/Images/Dialogs/secretchat-black-WXGA.png\", UriKind.Relative);\r\n            }\r\n        }\r\n\r\n        public virtual Brush ForegroundBrush\r\n        {\r\n            get { return (Brush)Application.Current.Resources[\"PhoneForegroundBrush\"]; }\r\n        }\r\n\r\n        public Brush MuteIconBackground\r\n        {\r\n            get { return new SolidColorBrush(Color.FromArgb(255, 39, 164, 236)); }\r\n        }\r\n\r\n        public bool IsChat\r\n        {\r\n            get { return Peer is TLPeerChat; }\r\n        }\r\n\r\n        public bool IsEncryptedChat\r\n        {\r\n            get { return Peer is TLPeerEncryptedChat; }\r\n        }\r\n\r\n        public DateTime? LastNotificationTime { get; set; }\r\n\r\n        public int UnmutedCount { get; set; }\r\n        #endregion\r\n\r\n        public abstract int GetDateIndex();\r\n        public abstract int GetDateIndexWithDraft();\r\n        public abstract int CountMessages();\r\n    }\r\n\r\n    public class TLEncryptedDialog : TLDialogBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDialogSecret;\r\n\r\n        #region Additional\r\n\r\n        public TLInt UnreadMentionsCount { get; set; }\r\n\r\n        public TLDecryptedMessageBase _topMessage;\r\n\r\n        public TLDecryptedMessageBase TopMessage\r\n        {\r\n            get\r\n            {\r\n                if (TLUtils.IsDisplayedDecryptedMessage(_topMessage, true))\r\n                {\r\n                    return _topMessage;\r\n                }\r\n\r\n                if (Messages != null)\r\n                {\r\n                    for (var i = 0; i < Messages.Count; i++)\r\n                    {\r\n                        if (TLUtils.IsDisplayedDecryptedMessage(Messages[i], true))\r\n                        {\r\n                            return Messages[i];\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n            set { SetField(ref _topMessage, value, () => TopMessage); }\r\n        }\r\n\r\n        public ObservableCollection<TLDecryptedMessageBase> Messages { get; set; }\r\n        #endregion\r\n\r\n        public override Brush ForegroundBrush\r\n        {\r\n            get { return new SolidColorBrush(Color.FromArgb(255, 0, 170, 8)); }\r\n        }\r\n\r\n        public override int GetDateIndex()\r\n        {\r\n            return _topMessage != null ? _topMessage.DateIndex : 0;\r\n        }\r\n\r\n        public override int GetDateIndexWithDraft()\r\n        {\r\n            return _topMessage != null ? _topMessage.DateIndex : 0;\r\n        }\r\n\r\n        public override int CountMessages()\r\n        {\r\n            return Messages.Count;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            var topDecryptedMessageRandomId = GetObject<TLLong>(input);\r\n            if (topDecryptedMessageRandomId.Value != 0)\r\n            {\r\n                TopDecryptedMessageRandomId = topDecryptedMessageRandomId;\r\n            }\r\n\r\n            UnreadCount = GetObject<TLInt>(input);\r\n\r\n            _with = GetObject<TLObject>(input);\r\n            if (_with is TLNull) { _with = null; }\r\n\r\n            var messages = GetObject<TLVector<TLDecryptedMessageBase>>(input);\r\n            Messages = messages != null ?\r\n                new ObservableCollection<TLDecryptedMessageBase>(messages.Items) :\r\n                new ObservableCollection<TLDecryptedMessageBase>();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Peer.ToStream(output);\r\n\r\n            TopDecryptedMessageRandomId = TopDecryptedMessageRandomId ?? new TLLong(0);\r\n            TopDecryptedMessageRandomId.ToStream(output);\r\n\r\n            output.Write(UnreadCount.ToBytes());\r\n\r\n            With.NullableToStream(output);\r\n\r\n            if (Messages != null)\r\n            {\r\n                var messages = new TLVector<TLDecryptedMessageBase> { Items = Messages };\r\n                messages.ToStream(output);\r\n            }\r\n            else\r\n            {\r\n                var messages = new TLVector<TLDecryptedMessageBase>();\r\n                messages.ToStream(output);\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"peer=[{0}] unread_count={1} top_message_id={2} top_message={3}\", Peer, UnreadCount, TopMessageId, TopMessage);\r\n        }\r\n\r\n        public static int InsertMessageInOrder(IList<TLDecryptedMessageBase> messages, TLDecryptedMessageBase message)\r\n        {\r\n            var position = -1;\r\n\r\n            if (messages.Count == 0)\r\n            {\r\n                position = 0;\r\n            }\r\n\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                if (messages[i].DateIndex < message.DateIndex)\r\n                {\r\n                    position = i;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (position != -1)\r\n            {\r\n                messages.Insert(position, message);\r\n            }\r\n\r\n            return position;\r\n        }\r\n    }\r\n\r\n    public class TLBroadcastDialog : TLDialogBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLBroadcastDialog;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            TopMessageId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            var topMessageId = GetObject<TLInt>(input);\r\n            if (topMessageId.Value != 0)\r\n            {\r\n                TopMessageId = topMessageId;\r\n            }\r\n\r\n            UnreadCount = GetObject<TLInt>(input);\r\n\r\n            var notifySettingsObject = GetObject<TLObject>(input);\r\n            NotifySettings = notifySettingsObject as TLPeerNotifySettingsBase;\r\n\r\n            var topMessageRandomId = GetObject<TLLong>(input);\r\n            if (topMessageRandomId.Value != 0)\r\n            {\r\n                TopMessageRandomId = topMessageRandomId;\r\n            }\r\n\r\n            _with = GetObject<TLObject>(input);\r\n            if (_with is TLNull) { _with = null; }\r\n\r\n            var messages = GetObject<TLVector<TLMessageBase>>(input);\r\n            Messages = messages != null ? new ObservableCollection<TLMessageBase>(messages.Items) : new ObservableCollection<TLMessageBase>();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Peer.ToStream(output);\r\n\r\n            TopMessageId = TopMessageId ?? new TLInt(0);\r\n            TopMessageId.ToStream(output);\r\n\r\n            output.Write(UnreadCount.ToBytes());\r\n\r\n            NotifySettings.NullableToStream(output);\r\n\r\n            TopMessageRandomId = TopMessageRandomId ?? new TLLong(0);\r\n            TopMessageRandomId.ToStream(output);\r\n\r\n            With.NullableToStream(output);\r\n            if (Messages != null)\r\n            {\r\n                var messages = new TLVector<TLMessageBase> { Items = Messages };\r\n                messages.ToStream(output);\r\n            }\r\n            else\r\n            {\r\n                var messages = new TLVector<TLMessageBase>();\r\n                messages.ToStream(output);\r\n            }\r\n        }\r\n\r\n        #region Additional\r\n\r\n        public TLMessageBase _topMessage;\r\n\r\n        public TLMessageBase TopMessage\r\n        {\r\n            get { return _topMessage; }\r\n            set { SetField(ref _topMessage, value, () => TopMessage); }\r\n        }\r\n\r\n        public ObservableCollection<TLMessageBase> Messages { get; set; }\r\n\r\n        public bool ShowFrom\r\n        {\r\n            get { return Peer is TLPeerChat && !(TopMessage is TLMessageService); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public override int GetDateIndex()\r\n        {\r\n            return _topMessage != null ? _topMessage.DateIndex : 0;\r\n        }\r\n\r\n        public override int GetDateIndexWithDraft()\r\n        {\r\n            return _topMessage != null ? _topMessage.DateIndex : 0;\r\n        }\r\n\r\n        public override int CountMessages()\r\n        {\r\n            return Messages.Count;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"peer=[{0}] unread_count={1} top_message_id={2} top_message={3}\", Peer, UnreadCount, TopMessageId, TopMessage);\r\n        }\r\n\r\n        public static int InsertMessageInOrder(IList<TLMessageBase> messages, TLMessageBase message)\r\n        {\r\n            var position = -1;\r\n\r\n            if (messages.Count == 0)\r\n            {\r\n                position = 0;\r\n            }\r\n\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                if (messages[i].Index == 0)\r\n                {\r\n                    if (messages[i].DateIndex < message.DateIndex)\r\n                    {\r\n                        position = i;\r\n                        break;\r\n                    }\r\n\r\n                    continue;\r\n                }\r\n\r\n                if (messages[i].Index == message.Index)\r\n                {\r\n                    position = -1;\r\n                    break;\r\n                }\r\n                if (messages[i].Index < message.Index)\r\n                {\r\n                    position = i;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (position != -1)\r\n            {\r\n                //message.IsAnimated = position == 0;\r\n                Execute.BeginOnUIThread(() => messages.Insert(position, message));\r\n            }\r\n\r\n            return position;\r\n        }\r\n\r\n        public virtual void Update(TLDialog dialog)\r\n        {\r\n            Peer = dialog.Peer;\r\n            UnreadCount = dialog.UnreadCount;\r\n\r\n            //если последнее сообщение отправляется и имеет дату больше, то не меняем\r\n            if (TopMessageId == null && TopMessage.DateIndex > dialog.TopMessage.DateIndex)\r\n            {\r\n                //добавляем сообщение в список в нужное место\r\n                InsertMessageInOrder(Messages, dialog.TopMessage);\r\n\r\n                return;\r\n            }\r\n            TopMessageId = dialog.TopMessageId;\r\n            TopMessageRandomId = dialog.TopMessageRandomId;\r\n            TopMessage = dialog.TopMessage;\r\n            if (Messages.Count > 0)\r\n            {\r\n                for (int i = 0; i < Messages.Count; i++)\r\n                {\r\n                    if (Messages[i].DateIndex < TopMessage.DateIndex)\r\n                    {\r\n                        Messages.Insert(i, TopMessage);\r\n                        break;\r\n                    }\r\n                    if (Messages[i].DateIndex == TopMessage.DateIndex)\r\n                    {\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Messages.Add(TopMessage);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLDialog : TLDialogBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDialog;\r\n\r\n        #region Additional\r\n\r\n        public TLMessageBase _topMessage;\r\n\r\n        public TLMessageBase TopMessage\r\n        {\r\n            get { return _topMessage; }\r\n            set\r\n            {\r\n\r\n                SetField(ref _topMessage, value, () => TopMessage);\r\n            }\r\n        }\r\n\r\n        public ObservableCollection<TLMessageBase> Messages { get; set; }\r\n\r\n        public List<TLMessageBase> CommitMessages { get; set; }\r\n\r\n        public bool ShowFrom\r\n        {\r\n            get { return Peer is TLPeerChat && !(TopMessage is TLMessageService); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            TopMessageId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            var topMessageId = GetObject<TLInt>(input);\r\n            if (topMessageId.Value != 0)\r\n            {\r\n                TopMessageId = topMessageId;\r\n            }\r\n\r\n            UnreadCount = GetObject<TLInt>(input);\r\n\r\n            var notifySettingsObject = GetObject<TLObject>(input);\r\n            NotifySettings = notifySettingsObject as TLPeerNotifySettingsBase;\r\n\r\n            var topMessageRandomId = GetObject<TLLong>(input);\r\n            if (topMessageRandomId.Value != 0)\r\n            {\r\n                TopMessageRandomId = topMessageRandomId;\r\n            }\r\n\r\n            _with = GetObject<TLObject>(input);\r\n            if (_with is TLNull) { _with = null; }\r\n\r\n            var messages = GetObject<TLVector<TLMessageBase>>(input);\r\n            Messages = messages != null ? new ObservableCollection<TLMessageBase>(messages.Items) : new ObservableCollection<TLMessageBase>();\r\n\r\n            var dialog71 = new TLDialog71();\r\n            dialog71.Flags = new TLInt(0);\r\n            dialog71.Peer = Peer;\r\n            dialog71.TopMessageId = TopMessageId;\r\n            dialog71.ReadInboxMaxId = new TLInt(0);\r\n            dialog71.ReadOutboxMaxId = new TLInt(0);\r\n            dialog71.UnreadCount = UnreadCount;\r\n            dialog71.UnreadMentionsCount = new TLInt(0);\r\n            dialog71.NotifySettings = NotifySettings;\r\n            //dialog53.Pts = Pts;\r\n            dialog71.Draft = null;\r\n\r\n            dialog71.TopMessageRandomId = topMessageRandomId;\r\n            dialog71._with = _with;\r\n            dialog71.Messages = Messages;\r\n\r\n            return dialog71;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Peer.ToStream(output);\r\n\r\n            TopMessageId = TopMessageId ?? new TLInt(0);\r\n            TopMessageId.ToStream(output);\r\n\r\n            output.Write(UnreadCount.ToBytes());\r\n\r\n            NotifySettings.NullableToStream(output);\r\n\r\n            TopMessageRandomId = TopMessageRandomId ?? new TLLong(0);\r\n            TopMessageRandomId.ToStream(output);\r\n\r\n            With.NullableToStream(output);\r\n            if (Messages != null)\r\n            {\r\n                var messages = new TLVector<TLMessageBase> { Items = CommitMessages };\r\n                messages.ToStream(output);\r\n            }\r\n            else\r\n            {\r\n                var messages = new TLVector<TLMessageBase>();\r\n                messages.ToStream(output);\r\n            }\r\n        }\r\n\r\n\r\n        public virtual void Update(TLDialog dialog)\r\n        {\r\n            Peer = dialog.Peer;\r\n            UnreadCount = dialog.UnreadCount;\r\n\r\n            //если последнее сообщение отправляется и имеет дату больше, то не меняем\r\n            if (TopMessageId == null && (TopMessage == null || TopMessage.DateIndex > dialog.TopMessage.DateIndex))\r\n            {\r\n                //добавляем сообщение в список в нужное место, если его еще нет\r\n                var insertRequired = false;\r\n                if (Messages != null && dialog.TopMessage != null)\r\n                {\r\n                    var oldMessage = Messages.FirstOrDefault(x => x.Index == dialog.TopMessage.Index);\r\n                    if (oldMessage == null)\r\n                    {\r\n                        insertRequired = true;\r\n                    }\r\n                }\r\n\r\n                if (insertRequired)\r\n                {\r\n                    InsertMessageInOrder(Messages, dialog.TopMessage);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            if (TopMessageId != null\r\n                && dialog.TopMessageId != null\r\n                && TopMessageId.Value == dialog.TopMessageId.Value)\r\n            {\r\n            }\r\n            else if (TopMessage != null && TopMessage.RandomIndex != 0)\r\n            {\r\n\r\n            }\r\n            else\r\n            {\r\n                TopMessageId = dialog.TopMessageId;\r\n                _topMessage = dialog.TopMessage;\r\n                TopMessageRandomId = dialog.TopMessageRandomId;\r\n\r\n                lock (MessagesSyncRoot)\r\n                {\r\n                    InsertMessageInOrder(Messages, TopMessage);\r\n                }\r\n            }\r\n        }\r\n\r\n        #region Methods\r\n\r\n        public override int GetDateIndex()\r\n        {\r\n            return _topMessage != null ? _topMessage.DateIndex : 0;\r\n        }\r\n\r\n        public override int GetDateIndexWithDraft()\r\n        {\r\n            return _topMessage != null ? _topMessage.DateIndex : 0;\r\n        }\r\n\r\n        public override int CountMessages()\r\n        {\r\n            return Messages.Count;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"peer=[{0}] pinned_id={1} unread_count={2} top_message_id={3}    top_message={4}\", Peer, PinnedId, UnreadCount, TopMessageId, TopMessage);\r\n        }\r\n\r\n        public static int InsertMessageInOrder(IList<TLMessageBase> messages, TLMessageBase message)\r\n        {\r\n            var position = -1;\r\n\r\n            if (messages.Count == 0)\r\n            {\r\n                position = 0;\r\n            }\r\n\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                if (messages[i].Index == 0)\r\n                {\r\n                    if (messages[i].DateIndex < message.DateIndex)\r\n                    {\r\n                        position = i;\r\n                        break;\r\n                    }\r\n\r\n                    continue;\r\n                }\r\n\r\n                if (messages[i].Index == message.Index)\r\n                {\r\n                    position = -1;\r\n                    break;\r\n                }\r\n                if (messages[i].Index < message.Index)\r\n                {\r\n                    position = i;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (position != -1)\r\n            {\r\n                //message._isAnimated = position == 0;\r\n                messages.Insert(position, message);\r\n            }\r\n\r\n            return position;\r\n        }\r\n        #endregion\r\n    }\r\n\r\n    public class TLDialog24 : TLDialog\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDialog24;\r\n\r\n        public TLInt ReadInboxMaxId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            TopMessageId = GetObject<TLInt>(bytes, ref position);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            var topMessageId = GetObject<TLInt>(input);\r\n            if (topMessageId.Value != 0)\r\n            {\r\n                TopMessageId = topMessageId;\r\n            }\r\n            ReadInboxMaxId = GetObject<TLInt>(input);\r\n            UnreadCount = GetObject<TLInt>(input);\r\n\r\n            var notifySettingsObject = GetObject<TLObject>(input);\r\n            NotifySettings = notifySettingsObject as TLPeerNotifySettingsBase;\r\n\r\n            var topMessageRandomId = GetObject<TLLong>(input);\r\n            if (topMessageRandomId.Value != 0)\r\n            {\r\n                TopMessageRandomId = topMessageRandomId;\r\n            }\r\n\r\n            _with = GetObject<TLObject>(input);\r\n            if (_with is TLNull) { _with = null; }\r\n\r\n            var messages = GetObject<TLVector<TLMessageBase>>(input);\r\n            Messages = messages != null ? new ObservableCollection<TLMessageBase>(messages.Items) : new ObservableCollection<TLMessageBase>();\r\n\r\n\r\n            var dialog71 = new TLDialog71();\r\n            dialog71.Flags = new TLInt(0);\r\n            dialog71.Peer = Peer;\r\n            dialog71.TopMessageId = TopMessageId;\r\n            dialog71.ReadInboxMaxId = ReadInboxMaxId;\r\n            dialog71.ReadOutboxMaxId = new TLInt(0);\r\n            dialog71.UnreadCount = UnreadCount;\r\n            dialog71.UnreadMentionsCount = new TLInt(0);\r\n            dialog71.NotifySettings = NotifySettings;\r\n            //dialog53.Pts = Pts;\r\n            dialog71.Draft = null;\r\n\r\n            dialog71.TopMessageRandomId = topMessageRandomId;\r\n            dialog71._with = _with;\r\n            dialog71.Messages = Messages;\r\n\r\n            return dialog71;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Peer.ToStream(output);\r\n\r\n            TopMessageId = TopMessageId ?? new TLInt(0);\r\n            TopMessageId.ToStream(output);\r\n\r\n            ReadInboxMaxId = ReadInboxMaxId ?? new TLInt(0);\r\n            ReadInboxMaxId.ToStream(output);\r\n\r\n            output.Write(UnreadCount.ToBytes());\r\n\r\n            NotifySettings.NullableToStream(output);\r\n\r\n            TopMessageRandomId = TopMessageRandomId ?? new TLLong(0);\r\n            TopMessageRandomId.ToStream(output);\r\n\r\n            With.NullableToStream(output);\r\n            if (Messages != null)\r\n            {\r\n                var messages = new TLVector<TLMessageBase> { Items = Messages };\r\n                messages.ToStream(output);\r\n            }\r\n            else\r\n            {\r\n                var messages = new TLVector<TLMessageBase>();\r\n                messages.ToStream(output);\r\n            }\r\n        }\r\n\r\n        public override void Update(TLDialog dialog)\r\n        {\r\n            try\r\n            {\r\n                base.Update(dialog);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n\r\n            var dialog24 = dialog as TLDialog24;\r\n            if (dialog24 != null)\r\n            {\r\n                ReadInboxMaxId = dialog24.ReadInboxMaxId;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLDialog53 : TLDialog24, IReadMaxId, IDialogPts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDialog53;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt ReadOutboxMaxId { get; set; }\r\n\r\n        protected TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        protected TLInt _pts;\r\n\r\n        public TLInt Pts\r\n        {\r\n            get { return _pts; }\r\n            set { SetField(out _pts, value, ref _flags, (int)DialogFlags.Pts); }\r\n        }\r\n\r\n        protected TLDraftMessageBase _draft;\r\n\r\n        public TLDraftMessageBase Draft\r\n        {\r\n            get { return _draft; }\r\n            set { SetField(out _draft, value, ref _flags, (int)DialogFlags.Draft); }\r\n        }\r\n\r\n        protected TLInt _pinnedId;\r\n\r\n        public override TLInt PinnedId\r\n        {\r\n            get { return _pinnedId; }\r\n            set { SetField(out _pinnedId, value, ref _customFlags, (int)DialogCustomFlags.PinnedId); }\r\n        }\r\n\r\n        public bool UnreadMark\r\n        {\r\n            get { return IsSet(_customFlags, (int)DialogFlags.UnreadMark); }\r\n            set { SetUnset(ref _customFlags, value, (int)DialogFlags.UnreadMark); }\r\n        }\r\n\r\n        public override int GetDateIndex()\r\n        {\r\n            if (IsPinned)\r\n            {\r\n                if (PinnedId != null)\r\n                {\r\n                    return int.MaxValue - PinnedId.Value;\r\n                }\r\n\r\n                Execute.ShowDebugMessage(\"GetDateIndex IsPinned=true PinnedId=null with=\" + With);\r\n            }\r\n\r\n            return base.GetDateIndex();\r\n        }\r\n\r\n        public override int GetDateIndexWithDraft()\r\n        {\r\n            var dateIndex = GetDateIndex();\r\n\r\n            if (IsPinned)\r\n            {\r\n                if (PinnedId != null)\r\n                {\r\n                    return int.MaxValue - PinnedId.Value;\r\n                }\r\n            }\r\n\r\n            var draft = Draft as TLDraftMessage;\r\n            if (draft != null)\r\n            {\r\n                return Math.Max(draft.Date.Value, dateIndex);\r\n            }\r\n\r\n            return dateIndex;\r\n        }\r\n\r\n        public override bool IsPinned\r\n        {\r\n            get { return IsSet(Flags, (int)DialogFlags.Pinned); }\r\n            set { SetUnset(ref _flags, value, (int)DialogFlags.Pinned); }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"flags={0} \", DialogFlagsString(Flags)) + \"count=\" + (Messages != null ? Messages.Count : 0) + \" commit_count=\" + (CommitMessages != null ? CommitMessages.Count : 0) + \" \" + base.ToString();\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            TopMessageId = GetObject<TLInt>(bytes, ref position);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            ReadOutboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            _pts = GetObject<TLInt>(Flags, (int)DialogFlags.Pts, null, bytes, ref position);\r\n            _draft = GetObject<TLDraftMessageBase>(Flags, (int)DialogFlags.Draft, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            var topMessageId = GetObject<TLInt>(input);\r\n            if (topMessageId.Value != 0)\r\n            {\r\n                TopMessageId = topMessageId;\r\n            }\r\n            ReadInboxMaxId = GetObject<TLInt>(input);\r\n            ReadOutboxMaxId = GetObject<TLInt>(input);\r\n            UnreadCount = GetObject<TLInt>(input);\r\n\r\n            var notifySettingsObject = GetObject<TLObject>(input);\r\n            NotifySettings = notifySettingsObject as TLPeerNotifySettingsBase;\r\n            _pts = GetObject<TLInt>(Flags, (int)DialogFlags.Pts, null, input);\r\n            _draft = GetObject<TLDraftMessageBase>(Flags, (int)DialogFlags.Draft, null, input);\r\n\r\n            var topMessageRandomId = GetObject<TLLong>(input);\r\n            if (topMessageRandomId.Value != 0)\r\n            {\r\n                TopMessageRandomId = topMessageRandomId;\r\n            }\r\n\r\n            _with = GetObject<TLObject>(input);\r\n            if (_with is TLNull) { _with = null; }\r\n\r\n            var messages = GetObject<TLVector<TLMessageBase>>(input);\r\n            Messages = messages != null ? new ObservableCollection<TLMessageBase>(messages.Items) : new ObservableCollection<TLMessageBase>();\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            PinnedId = GetObject<TLInt>(CustomFlags, (int)DialogCustomFlags.PinnedId, null, input);\r\n\r\n\r\n            var dialog71 = new TLDialog71();\r\n            dialog71.Flags = new TLInt(0);\r\n            dialog71.Peer = Peer;\r\n            dialog71.TopMessageId = TopMessageId;\r\n            dialog71.ReadInboxMaxId = ReadInboxMaxId;\r\n            dialog71.ReadOutboxMaxId = ReadOutboxMaxId;\r\n            dialog71.UnreadCount = UnreadCount;\r\n            dialog71.UnreadMentionsCount = new TLInt(0);\r\n            dialog71.NotifySettings = NotifySettings;\r\n            dialog71.Pts = Pts;\r\n            dialog71.Draft = Draft;\r\n\r\n            dialog71.TopMessageRandomId = TopMessageRandomId;\r\n            dialog71._with = _with;\r\n            dialog71.Messages = Messages;\r\n\r\n            dialog71.PinnedId = PinnedId;\r\n\r\n            return dialog71;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Peer.ToStream(output);\r\n\r\n            TopMessageId = TopMessageId ?? new TLInt(0);\r\n            TopMessageId.ToStream(output);\r\n\r\n            ReadInboxMaxId = ReadInboxMaxId ?? new TLInt(0);\r\n            ReadInboxMaxId.ToStream(output);\r\n\r\n            ReadOutboxMaxId = ReadOutboxMaxId ?? new TLInt(0);\r\n            ReadOutboxMaxId.ToStream(output);\r\n\r\n            UnreadCount.ToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ToStream(output, Pts, Flags, (int)DialogFlags.Pts);\r\n            ToStream(output, Draft, Flags, (int)DialogFlags.Draft);\r\n\r\n            TopMessageRandomId = TopMessageRandomId ?? new TLLong(0);\r\n            TopMessageRandomId.ToStream(output);\r\n\r\n            With.NullableToStream(output);\r\n            if (Messages != null)\r\n            {\r\n                var messages = new TLVector<TLMessageBase> { Items = CommitMessages };\r\n                messages.ToStream(output);\r\n            }\r\n            else\r\n            {\r\n                var messages = new TLVector<TLMessageBase>();\r\n                messages.ToStream(output);\r\n            }\r\n\r\n            CustomFlags.NullableToStream(output);\r\n            ToStream(output, PinnedId, CustomFlags, (int)DialogCustomFlags.PinnedId);\r\n        }\r\n\r\n        public override void Update(TLDialog dialog)\r\n        {\r\n            try\r\n            {\r\n                base.Update(dialog);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n\r\n            var dialog53 = dialog as TLDialog53;\r\n            if (dialog53 != null)\r\n            {\r\n                ReadOutboxMaxId = dialog53.ReadOutboxMaxId;\r\n                Pts = dialog53.Pts;\r\n                Draft = dialog53.Draft;\r\n\r\n                if (dialog53.IsPinned)\r\n                {\r\n                    IsPinned = true;\r\n                    if (dialog53.PinnedId != null) PinnedId = dialog53.PinnedId;\r\n                }\r\n                else\r\n                {\r\n                    IsPinned = false;\r\n                    dialog53.PinnedId = null;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLDialog71 : TLDialog53\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDialog71;\r\n\r\n        public TLInt UnreadMentionsCount { get; set; }\r\n\r\n        public TLVector<TLMessageBase> UnreadMentions { get; set; }\r\n\r\n        public IList<TLMessageBase> MigratedHistory { get; set; }\r\n\r\n        public bool IsPromo\r\n        {\r\n            get { return IsSet(_customFlags, (int)DialogCustomFlags.Promo); }\r\n            set { SetUnset(ref _customFlags, value, (int)DialogCustomFlags.Promo); }\r\n        }\r\n\r\n        protected TLInt _promoExpires;\r\n\r\n        public TLInt PromoExpires\r\n        {\r\n            get { return _promoExpires; }\r\n            set { SetField(out _promoExpires, value, ref _customFlags, (int)DialogCustomFlags.PromoExpires); }\r\n        }\r\n\r\n        public bool PromoNotification\r\n        {\r\n            get { return IsSet(_customFlags, (int)DialogCustomFlags.PromoNotification); }\r\n            set { SetUnset(ref _customFlags, value, (int)DialogCustomFlags.PromoNotification); }\r\n        }\r\n\r\n        public override int GetDateIndex()\r\n        {\r\n            if (IsPromo)\r\n            {\r\n                return int.MaxValue;\r\n            }\r\n\r\n            if (IsPinned)\r\n            {\r\n                if (PinnedId != null)\r\n                {\r\n                    return int.MaxValue - PinnedId.Value - 1;\r\n                }\r\n\r\n                Execute.ShowDebugMessage(\"GetDateIndex IsPinned=true PinnedId=null with=\" + With);\r\n            }\r\n\r\n            return base.GetDateIndex();\r\n        }\r\n\r\n        public override int GetDateIndexWithDraft()\r\n        {\r\n            var dateIndex = GetDateIndex();\r\n\r\n            if (IsPromo)\r\n            {\r\n                return int.MaxValue;\r\n            }\r\n\r\n            if (IsPinned)\r\n            {\r\n                if (PinnedId != null)\r\n                {\r\n                    return int.MaxValue - PinnedId.Value - 1;\r\n                }\r\n            }\r\n\r\n            var draft = Draft as TLDraftMessage;\r\n            if (draft != null)\r\n            {\r\n                return Math.Max(draft.Date.Value, dateIndex);\r\n            }\r\n\r\n            return dateIndex;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            TopMessageId = GetObject<TLInt>(bytes, ref position);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            ReadOutboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadMentionsCount = GetObject<TLInt>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            _pts = GetObject<TLInt>(Flags, (int)DialogFlags.Pts, null, bytes, ref position);\r\n            _draft = GetObject<TLDraftMessageBase>(Flags, (int)DialogFlags.Draft, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            var topMessageId = GetObject<TLInt>(input);\r\n            if (topMessageId.Value != 0)\r\n            {\r\n                TopMessageId = topMessageId;\r\n            }\r\n            ReadInboxMaxId = GetObject<TLInt>(input);\r\n            ReadOutboxMaxId = GetObject<TLInt>(input);\r\n            UnreadCount = GetObject<TLInt>(input);\r\n            UnreadMentionsCount = GetObject<TLInt>(input);\r\n\r\n            var notifySettingsObject = GetObject<TLObject>(input);\r\n            NotifySettings = notifySettingsObject as TLPeerNotifySettingsBase;\r\n            _pts = GetObject<TLInt>(Flags, (int)DialogFlags.Pts, null, input);\r\n            _draft = GetObject<TLDraftMessageBase>(Flags, (int)DialogFlags.Draft, null, input);\r\n\r\n            var topMessageRandomId = GetObject<TLLong>(input);\r\n            if (topMessageRandomId.Value != 0)\r\n            {\r\n                TopMessageRandomId = topMessageRandomId;\r\n            }\r\n\r\n            _with = GetObject<TLObject>(input);\r\n            if (_with is TLNull) { _with = null; }\r\n\r\n            var messages = GetObject<TLVector<TLMessageBase>>(input);\r\n            Messages = messages != null ? new ObservableCollection<TLMessageBase>(messages.Items) : new ObservableCollection<TLMessageBase>();\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            _pinnedId = GetObject<TLInt>(CustomFlags, (int)DialogCustomFlags.PinnedId, null, input);\r\n            _promoExpires = GetObject<TLInt>(CustomFlags, (int)DialogCustomFlags.PromoExpires, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Peer.ToStream(output);\r\n\r\n            TopMessageId = TopMessageId ?? new TLInt(0);\r\n            TopMessageId.ToStream(output);\r\n\r\n            ReadInboxMaxId = ReadInboxMaxId ?? new TLInt(0);\r\n            ReadInboxMaxId.ToStream(output);\r\n\r\n            ReadOutboxMaxId = ReadOutboxMaxId ?? new TLInt(0);\r\n            ReadOutboxMaxId.ToStream(output);\r\n\r\n            UnreadCount.ToStream(output);\r\n            UnreadMentionsCount.ToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ToStream(output, Pts, Flags, (int)DialogFlags.Pts);\r\n            ToStream(output, Draft, Flags, (int)DialogFlags.Draft);\r\n\r\n            TopMessageRandomId = TopMessageRandomId ?? new TLLong(0);\r\n            TopMessageRandomId.ToStream(output);\r\n\r\n            With.NullableToStream(output);\r\n            if (Messages != null)\r\n            {\r\n                var messages = new TLVector<TLMessageBase> { Items = CommitMessages };\r\n                messages.ToStream(output);\r\n            }\r\n            else\r\n            {\r\n                var messages = new TLVector<TLMessageBase>();\r\n                messages.ToStream(output);\r\n            }\r\n\r\n            CustomFlags.NullableToStream(output);\r\n            ToStream(output, PinnedId, CustomFlags, (int)DialogCustomFlags.PinnedId);\r\n            ToStream(output, PromoExpires, CustomFlags, (int)DialogCustomFlags.PromoExpires);\r\n        }\r\n\r\n        public override void Update(TLDialog dialog)\r\n        {\r\n            try\r\n            {\r\n                base.Update(dialog);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n\r\n            var dialog71 = dialog as TLDialog71;\r\n            if (dialog71 != null)\r\n            {\r\n                UnreadMentionsCount = dialog71.UnreadMentionsCount;\r\n                IsPromo = dialog71.IsPromo;\r\n                PromoExpires = dialog71.PromoExpires;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLDialogChannel : TLDialog24, IDialogPts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDialogChannel;\r\n\r\n        public TLInt TopImportantMessageId { get; set; }\r\n\r\n        public TLInt UnreadImportantCount { get; set; }\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            TopMessageId = GetObject<TLInt>(bytes, ref position);\r\n            TopImportantMessageId = GetObject<TLInt>(bytes, ref position);\r\n            ReadInboxMaxId = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadImportantCount = GetObject<TLInt>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            try\r\n            {\r\n                Peer = GetObject<TLPeerBase>(input);\r\n                var topMessageId = GetObject<TLInt>(input);\r\n                if (topMessageId.Value != 0)\r\n                {\r\n                    TopMessageId = topMessageId;\r\n                }\r\n                var topImportantMessageId = GetObject<TLInt>(input);\r\n                if (topImportantMessageId.Value != 0)\r\n                {\r\n                    TopImportantMessageId = topImportantMessageId;\r\n                }\r\n                ReadInboxMaxId = GetObject<TLInt>(input);\r\n                UnreadCount = GetObject<TLInt>(input);\r\n                UnreadImportantCount = GetObject<TLInt>(input);\r\n\r\n                var notifySettingsObject = GetObject<TLObject>(input);\r\n                NotifySettings = notifySettingsObject as TLPeerNotifySettingsBase;\r\n                Pts = GetObject<TLInt>(input);\r\n\r\n                var topMessageRandomId = GetObject<TLLong>(input);\r\n                if (topMessageRandomId.Value != 0)\r\n                {\r\n                    TopMessageRandomId = topMessageRandomId;\r\n                }\r\n\r\n                _with = GetObject<TLObject>(input);\r\n                if (_with is TLNull) { _with = null; }\r\n\r\n                var messages = GetObject<TLVector<TLMessageBase>>(input);\r\n                Messages = messages != null ? new ObservableCollection<TLMessageBase>(messages.Items) : new ObservableCollection<TLMessageBase>();\r\n\r\n                var dialog71 = new TLDialog71();\r\n                dialog71.Flags = new TLInt(0);\r\n                dialog71.Peer = Peer;\r\n                dialog71.TopMessageId = TopMessageId;\r\n                dialog71.ReadInboxMaxId = ReadInboxMaxId;\r\n                dialog71.ReadOutboxMaxId = new TLInt(0);\r\n                dialog71.UnreadCount = UnreadCount;\r\n                dialog71.UnreadMentionsCount = new TLInt(0);\r\n                dialog71.NotifySettings = NotifySettings;\r\n                dialog71.Pts = Pts;\r\n                dialog71.Draft = null;\r\n\r\n                dialog71.TopMessageRandomId = topMessageRandomId;\r\n                dialog71._with = _with;\r\n                dialog71.Messages = Messages;\r\n\r\n                return dialog71;\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Peer.ToStream(output);\r\n\r\n            TopMessageId = TopMessageId ?? new TLInt(0);\r\n            TopMessageId.ToStream(output);\r\n            TopImportantMessageId = TopImportantMessageId ?? new TLInt(0);\r\n            TopImportantMessageId.ToStream(output);\r\n\r\n            ReadInboxMaxId = ReadInboxMaxId ?? new TLInt(0);\r\n            ReadInboxMaxId.ToStream(output);\r\n\r\n            output.Write(UnreadCount.ToBytes());\r\n            output.Write(UnreadImportantCount.ToBytes());\r\n\r\n            NotifySettings.NullableToStream(output);\r\n\r\n            output.Write(Pts.ToBytes());\r\n\r\n            TopMessageRandomId = TopMessageRandomId ?? new TLLong(0);\r\n            TopMessageRandomId.ToStream(output);\r\n\r\n            With.NullableToStream(output);\r\n            if (Messages != null)\r\n            {\r\n                var messages = new TLVector<TLMessageBase> { Items = Messages.Where(x => x != null).ToList() };\r\n#if DEBUG\r\n                var indexes = new List<int>();\r\n                for (var i = 0; i < Messages.Count; i++)\r\n                {\r\n                    if (Messages[i] == null)\r\n                    {\r\n                        indexes.Add(i);\r\n                    }\r\n                }\r\n                if (indexes.Count > 0)\r\n                {\r\n                    Execute.ShowDebugMessage(\"TLDialogChannel.ToStream Items has null values total=\" + Messages.Count + \" null indexes=\" + string.Join(\",\", indexes));\r\n                }\r\n#endif\r\n\r\n                messages.ToStream(output);\r\n            }\r\n            else\r\n            {\r\n                var messages = new TLVector<TLMessageBase>();\r\n                messages.ToStream(output);\r\n            }\r\n        }\r\n\r\n        public override void Update(TLDialog dialog)\r\n        {\r\n            try\r\n            {\r\n                base.Update(dialog);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n\r\n            var d = dialog as TLDialogChannel;\r\n            if (d != null)\r\n            {\r\n                TopImportantMessageId = d.TopImportantMessageId;\r\n                UnreadImportantCount = d.UnreadImportantCount;\r\n                Pts = d.Pts;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLDialogFeed : TLDialog\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDialogFeed;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLLong CustomFlags { get; set; }\r\n\r\n        public TLInt FeedId { get; set; }\r\n\r\n        public TLVector<TLInt> FeedOtherChannels { get; set; }\r\n\r\n        protected TLFeedPosition _readMaxPosition;\r\n\r\n        public TLFeedPosition ReadMaxPosition\r\n        {\r\n            get { return _readMaxPosition; }\r\n            set { SetField(out _readMaxPosition, value, ref _flags, (int)DialogFlags.ReadMaxPosition); }\r\n        }\r\n\r\n        public TLInt UnreadMutedCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            TopMessageId = GetObject<TLInt>(bytes, ref position);\r\n            FeedId = GetObject<TLInt>(bytes, ref position);\r\n            FeedOtherChannels = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n            _readMaxPosition = GetObject<TLFeedPosition>(Flags, (int)DialogFlags.ReadMaxPosition, null, bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n            UnreadMutedCount = GetObject<TLInt>(bytes, ref position);\r\n            NotifySettings = new TLPeerNotifySettingsEmpty();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            TopMessageId = GetObject<TLInt>(input);\r\n            FeedId = GetObject<TLInt>(input);\r\n            FeedOtherChannels = GetObject<TLVector<TLInt>>(input);\r\n            _readMaxPosition = GetObject<TLFeedPosition>(Flags, (int)DialogFlags.ReadMaxPosition, null, input);\r\n            UnreadCount = GetObject<TLInt>(input);\r\n            UnreadMutedCount = GetObject<TLInt>(input);\r\n\r\n            NotifySettings = GetNullableObject<TLPeerNotifySettingsBase>(input);\r\n            TopMessageRandomId = GetObject<TLLong>(input);\r\n            //_with = GetNullableObject<TLObject>(input);\r\n            var messages = GetObject<TLVector<TLMessageBase>>(input) ?? new TLVector<TLMessageBase>();\r\n            Messages = new ObservableCollection<TLMessageBase>(messages.Items);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            PinnedId = GetObject<TLInt>(CustomFlags, (int)DialogCustomFlags.PinnedId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Peer.ToStream(output);\r\n            TopMessageId = TopMessageId ?? new TLInt(0);\r\n            TopMessageId.ToStream(output);\r\n            FeedId.ToStream(output);\r\n            FeedOtherChannels.ToStream(output);\r\n            ToStream(output, ReadMaxPosition, Flags, (int)DialogFlags.ReadMaxPosition);\r\n            UnreadCount.ToStream(output);\r\n            UnreadMutedCount.ToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            TopMessageRandomId = TopMessageRandomId ?? new TLLong(0);\r\n            TopMessageRandomId.ToStream(output);\r\n            //With.NullableToStream(output);\r\n            if (Messages != null)\r\n            {\r\n                var messages = new TLVector<TLMessageBase> { Items = CommitMessages };\r\n                messages.ToStream(output);\r\n            }\r\n            else\r\n            {\r\n                var messages = new TLVector<TLMessageBase>();\r\n                messages.ToStream(output);\r\n            }\r\n\r\n            CustomFlags.NullableToStream(output);\r\n            ToStream(output, PinnedId, CustomFlags, (int)DialogCustomFlags.PinnedId);\r\n        }\r\n\r\n        public override void Update(TLDialog dialog)\r\n        {\r\n            base.Update(dialog);\r\n\r\n            var dialogFeed = dialog as TLDialogFeed;\r\n            if (dialogFeed != null)\r\n            {\r\n                FeedId = dialogFeed.FeedId;\r\n                FeedOtherChannels = dialogFeed.FeedOtherChannels;\r\n                ReadMaxPosition = dialogFeed.ReadMaxPosition;\r\n                UnreadMutedCount = dialogFeed.UnreadMutedCount;\r\n\r\n                if (dialogFeed.IsPinned)\r\n                {\r\n                    IsPinned = true;\r\n                    if (dialogFeed.PinnedId != null) PinnedId = dialogFeed.PinnedId;\r\n                }\r\n                else\r\n                {\r\n                    IsPinned = false;\r\n                    dialogFeed.PinnedId = null;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDialogs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLDialogsBase : TLObject\r\n    {\r\n        public TLVector<TLDialogBase> Dialogs { get; set; }\r\n\r\n        public TLVector<TLMessageBase> Messages { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public abstract TLDialogsBase GetEmptyObject();\r\n\r\n        public TLPeerDialogs ToPeerDialogs(TLState state)\r\n        {\r\n            return new TLPeerDialogs\r\n            {\r\n                Dialogs = Dialogs,\r\n                Messages = Messages,\r\n                Chats = Chats,\r\n                Users = Users,\r\n                State = state\r\n            };\r\n        }\r\n    }\r\n    public class TLDialogsNotModified : TLDialogsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDialogsNotModified;\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Dialogs = new TLVector<TLDialogBase>();\r\n            Messages = new TLVector<TLMessageBase>();\r\n            Chats = new TLVector<TLChatBase>();\r\n            Users = new TLVector<TLUserBase>();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLDialogsBase GetEmptyObject()\r\n        {\r\n            return new TLDialogs\r\n            {\r\n                Dialogs = new TLVector<TLDialogBase>(Dialogs.Count),\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLDialogs : TLDialogsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDialogs;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Dialogs = GetObject<TLVector<TLDialogBase>>(bytes, ref position);\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLDialogsBase GetEmptyObject()\r\n        {\r\n            return new TLDialogs\r\n            {\r\n                Dialogs = new TLVector<TLDialogBase>(Dialogs.Count),\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLDialogsSlice : TLDialogsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDialogsSlice;\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Dialogs = GetObject<TLVector<TLDialogBase>>(bytes, ref position);\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLDialogsBase GetEmptyObject()\r\n        {\r\n            return new TLDialogsSlice\r\n            {\r\n                Count = Count,\r\n                Dialogs = new TLVector<TLDialogBase>(Dialogs.Count),\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDifference.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLDifferenceBase : TLObject\r\n    {\r\n        public abstract TLDifferenceBase GetEmptyObject();\r\n    }\r\n\r\n    public class TLDifferenceEmpty : TLDifferenceBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDifferenceEmpty;\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt Seq { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Date.ToStream(output);\r\n            Seq.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Date = GetObject<TLInt>(input);\r\n            Seq = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLDifferenceBase GetEmptyObject()\r\n        {\r\n            return new TLDifferenceEmpty { Date = Date, Seq = Seq };\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLDifferenceEmpty date={0} seq={1}\", Date, Seq);\r\n        }\r\n    }\r\n\r\n    public class TLDifference : TLDifferenceBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDifference;\r\n\r\n        public TLVector<TLMessageBase> NewMessages { get; set; }\r\n        public TLVector<TLEncryptedMessageBase> NewEncryptedMessages { get; set; }\r\n        public TLVector<TLUpdateBase> OtherUpdates { get; set; }\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n        public TLState State { get; set; }\r\n\r\n        public override TLDifferenceBase GetEmptyObject()\r\n        {\r\n            return new TLDifference\r\n            {\r\n                NewMessages = new TLVector<TLMessageBase>(NewMessages.Count),\r\n                NewEncryptedMessages = new TLVector<TLEncryptedMessageBase>(NewEncryptedMessages.Count),\r\n                OtherUpdates = new TLVector<TLUpdateBase>(OtherUpdates.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count),\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                State = State\r\n            };\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            NewMessages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            NewEncryptedMessages = GetObject<TLVector<TLEncryptedMessageBase>>(bytes, ref position);\r\n            OtherUpdates = GetObject<TLVector<TLUpdateBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            State = GetObject<TLState>(bytes, ref position);\r\n\r\n            ProcessReading();\r\n\r\n            return this;\r\n        }\r\n\r\n        protected void ProcessReading()\r\n        {\r\n            var readUserInbox = new Dictionary<int, TLUpdateReadHistory>();\r\n            var readUserOutbox = new Dictionary<int, TLUpdateReadHistory>();\r\n\r\n            var readChatInbox = new Dictionary<int, TLUpdateReadHistory>();\r\n            var readChatOutbox = new Dictionary<int, TLUpdateReadHistory>();\r\n\r\n            var readChannelInbox = new Dictionary<int, TLUpdateReadChannelInbox>();\r\n            var readChannelOutbox = new Dictionary<int, TLUpdateReadChannelOutbox>();\r\n\r\n            var newMessages = new List<TLUpdateNewMessage>();\r\n            var newChannelMessages = new List<TLUpdateNewChannelMessage>();\r\n\r\n            foreach (var otherUpdate in OtherUpdates)\r\n            {\r\n                var updateNewChannelMessage = otherUpdate as TLUpdateNewChannelMessage;\r\n                if (updateNewChannelMessage != null)\r\n                {\r\n                    newChannelMessages.Add(updateNewChannelMessage);\r\n                    continue;\r\n                }\r\n\r\n                var updateNewMessage = otherUpdate as TLUpdateNewMessage;\r\n                if (updateNewMessage != null)\r\n                {\r\n                    newMessages.Add(updateNewMessage);\r\n                    continue;\r\n                }\r\n\r\n                var updateReadChannelInbox = otherUpdate as TLUpdateReadChannelInbox;\r\n                if (updateReadChannelInbox != null)\r\n                {\r\n                    readChannelInbox[updateReadChannelInbox.ChannelId.Value] = updateReadChannelInbox;\r\n                    continue;\r\n                }\r\n\r\n                var updateReadChannelOutbox = otherUpdate as TLUpdateReadChannelOutbox;\r\n                if (updateReadChannelOutbox != null)\r\n                {\r\n                    readChannelOutbox[updateReadChannelOutbox.ChannelId.Value] = updateReadChannelOutbox;\r\n                    continue;\r\n                }\r\n\r\n                var updateReadHistoryInbox = otherUpdate as TLUpdateReadHistoryInbox;\r\n                if (updateReadHistoryInbox != null)\r\n                {\r\n                    if (updateReadHistoryInbox.Peer is TLPeerChat)\r\n                    {\r\n                        readChatInbox[updateReadHistoryInbox.Peer.Id.Value] = updateReadHistoryInbox;\r\n                    }\r\n                    else if (updateReadHistoryInbox.Peer is TLPeerUser)\r\n                    {\r\n                        readUserInbox[updateReadHistoryInbox.Peer.Id.Value] = updateReadHistoryInbox;\r\n                    }\r\n                    continue;\r\n                }\r\n\r\n                var updateReadHistoryOutbox = otherUpdate as TLUpdateReadHistoryOutbox;\r\n                if (updateReadHistoryOutbox != null)\r\n                {\r\n                    if (updateReadHistoryOutbox.Peer is TLPeerChat)\r\n                    {\r\n                        readChatOutbox[updateReadHistoryOutbox.Peer.Id.Value] = updateReadHistoryOutbox;\r\n                    }\r\n                    else if (updateReadHistoryOutbox.Peer is TLPeerUser)\r\n                    {\r\n                        readUserOutbox[updateReadHistoryOutbox.Peer.Id.Value] = updateReadHistoryOutbox;\r\n                    }\r\n                    continue;\r\n                }\r\n            }\r\n\r\n            for (var i = 0; i < newChannelMessages.Count; i++)\r\n            {\r\n                var messageCommon = newChannelMessages[i].Message as TLMessageCommon;\r\n                if (messageCommon != null)\r\n                {\r\n                    if (IsReadMessage(messageCommon,\r\n                        readChatOutbox, readChatInbox,\r\n                        readUserOutbox, readUserInbox,\r\n                        readChannelOutbox, readChannelInbox))\r\n                    {\r\n                        continue;\r\n                    }\r\n\r\n                    messageCommon.SetUnreadSilent(TLBool.True);\r\n                }\r\n            }\r\n\r\n            for (var i = 0; i < newMessages.Count; i++)\r\n            {\r\n                var messageCommon = newMessages[i].Message as TLMessageCommon;\r\n                if (messageCommon != null)\r\n                {\r\n                    if (IsReadMessage(messageCommon,\r\n                        readChatOutbox, readChatInbox,\r\n                        readUserOutbox, readUserInbox,\r\n                        readChannelOutbox, readChannelInbox))\r\n                    {\r\n                        continue;\r\n                    }\r\n\r\n                    messageCommon.SetUnreadSilent(TLBool.True);\r\n                }\r\n            }\r\n\r\n            for (var i = 0; i < NewMessages.Count; i++)\r\n            {\r\n                var messageCommon = NewMessages[i] as TLMessageCommon;\r\n                if (messageCommon != null)\r\n                {\r\n                    if (IsReadMessage(messageCommon, \r\n                        readChatOutbox, readChatInbox, \r\n                        readUserOutbox, readUserInbox,\r\n                        readChannelOutbox, readChannelInbox))\r\n                    {\r\n                        continue;\r\n                    }\r\n\r\n                    messageCommon.SetUnreadSilent(TLBool.True);\r\n                }\r\n            }\r\n        }\r\n\r\n        private static bool IsReadMessage(TLMessageCommon messageCommon, \r\n            Dictionary<int, TLUpdateReadHistory> readChatOutbox, Dictionary<int, TLUpdateReadHistory> readChatInbox,\r\n            Dictionary<int, TLUpdateReadHistory> readUserOutbox, Dictionary<int, TLUpdateReadHistory> readUserInbox, \r\n            Dictionary<int, TLUpdateReadChannelOutbox> readChannelOutbox, Dictionary<int, TLUpdateReadChannelInbox> readChannelInbox)\r\n        {\r\n            if (messageCommon.ToId is TLPeerChat)\r\n            {\r\n                if (messageCommon.Out.Value)\r\n                {\r\n                    TLUpdateReadHistory updateReadHistory;\r\n                    if (readChatOutbox.TryGetValue(messageCommon.ToId.Id.Value, out updateReadHistory)\r\n                        && updateReadHistory.MaxId.Value >= messageCommon.Index)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    TLUpdateReadHistory updateReadHistory;\r\n                    if (readChatInbox.TryGetValue(messageCommon.ToId.Id.Value, out updateReadHistory)\r\n                        && updateReadHistory.MaxId.Value >= messageCommon.Index)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n            else if (messageCommon.ToId is TLPeerUser)\r\n            {\r\n                if (messageCommon.Out.Value)\r\n                {\r\n                    TLUpdateReadHistory updateReadHistory;\r\n                    if (readUserOutbox.TryGetValue(messageCommon.ToId.Id.Value, out updateReadHistory)\r\n                        && updateReadHistory.MaxId.Value >= messageCommon.Index)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    TLUpdateReadHistory updateReadHistory;\r\n                    if (readUserInbox.TryGetValue(messageCommon.FromId.Value, out updateReadHistory)\r\n                        && updateReadHistory.MaxId.Value >= messageCommon.Index)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n            else if (messageCommon.ToId is TLPeerChannel)\r\n            {\r\n                if (messageCommon.Out.Value)\r\n                {\r\n                    TLUpdateReadChannelOutbox updateReadHistory;\r\n                    if (readChannelOutbox.TryGetValue(messageCommon.ToId.Id.Value, out updateReadHistory)\r\n                        && updateReadHistory.MaxId.Value >= messageCommon.Index)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    TLUpdateReadChannelInbox updateReadHistory;\r\n                    if (readChannelInbox.TryGetValue(messageCommon.ToId.Id.Value, out updateReadHistory)\r\n                        && updateReadHistory.MaxId.Value >= messageCommon.Index)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            NewMessages.ToStream(output);\r\n            NewEncryptedMessages.ToStream(output);\r\n            OtherUpdates.ToStream(output);\r\n            Chats.ToStream(output);\r\n            Users.ToStream(output);\r\n            State.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            NewMessages = GetObject<TLVector<TLMessageBase>>(input);\r\n            NewEncryptedMessages = GetObject<TLVector<TLEncryptedMessageBase>>(input);\r\n            OtherUpdates = GetObject<TLVector<TLUpdateBase>>(input);\r\n            Chats = GetObject<TLVector<TLChatBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n            State = GetObject<TLState>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLDifference state=[{0}] messages={1} other={2} users={3} chats={4} encrypted={5}\", State, NewMessages.Count, OtherUpdates.Count, Users.Count, Chats.Count, NewEncryptedMessages.Count);\r\n        }\r\n    }\r\n\r\n    public class TLDifferenceSlice : TLDifference\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDifferenceSlice;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            NewMessages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            NewEncryptedMessages = GetObject<TLVector<TLEncryptedMessageBase>>(bytes, ref position);\r\n            OtherUpdates = GetObject<TLVector<TLUpdateBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            State = GetObject<TLState>(bytes, ref position);\r\n\r\n            ProcessReading();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            NewMessages.ToStream(output);\r\n            NewEncryptedMessages.ToStream(output);\r\n            OtherUpdates.ToStream(output);\r\n            Chats.ToStream(output);\r\n            Users.ToStream(output);\r\n            State.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            NewMessages = GetObject<TLVector<TLMessageBase>>(input);\r\n            NewEncryptedMessages = GetObject<TLVector<TLEncryptedMessageBase>>(input);\r\n            OtherUpdates = GetObject<TLVector<TLUpdateBase>>(input);\r\n            Chats = GetObject<TLVector<TLChatBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n            State = GetObject<TLState>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLDifferenceSlice state=[{0}] messages={1} other={2} users={3} chats={4} encrypted={5}\", State, NewMessages.Count, OtherUpdates.Count, Users.Count, Chats.Count, NewEncryptedMessages.Count);\r\n        }\r\n    }\r\n\r\n    public class TLDifferenceTooLong : TLDifferenceBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDifferenceTooLong;\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Pts.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Pts = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLDifferenceBase GetEmptyObject()\r\n        {\r\n            return new TLDifferenceTooLong { Pts = Pts };\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLDifferenceTooLong pts={0}\", Pts);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDisabledFeature.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Runtime.Serialization;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [DataContract]\r\n    public class TLDisabledFeature : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLDisabledFeature;\r\n\r\n        [DataMember]\r\n        public TLString Feature { get; set; }\r\n\r\n        [DataMember]\r\n        public TLString Description { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Feature = GetObject<TLString>(bytes, ref position);\r\n            Description = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} {1}\", Feature, Description);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDocument.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public interface IAttributes\r\n    {\r\n        TLVector<TLDocumentAttributeBase> Attributes { get; set; }\r\n    }\r\n\r\n    public abstract class TLDocumentBase : TLObject\r\n    {\r\n        public long Index\r\n        {\r\n            get { return Id != null ? Id.Value : 0; }\r\n        }\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public string ShortId { get { return Id != null ? (Id.Value % 1000).ToString() : \"unknown\"; } }\r\n\r\n        public virtual int DocumentSize { get { return 0; } }\r\n\r\n        public static bool DocumentEquals(TLDocumentBase document1, TLDocumentBase document2)\r\n        {\r\n            var doc1 = document1 as TLDocument;\r\n            var doc2 = document2 as TLDocument;\r\n\r\n            if (doc1 == null || doc2 == null) return false;\r\n\r\n            return doc1.Id.Value == doc2.Id.Value\r\n                   && doc1.DCId.Value == doc2.DCId.Value\r\n                   && doc1.AccessHash.Value == doc2.AccessHash.Value;\r\n        }\r\n    }\r\n\r\n    public class TLDocumentExternal : TLDocumentBase, IAttributes\r\n    {\r\n        public const uint Signature = TLConstructors.TLDocumentExternal;\r\n\r\n        public TLString ResultId { get; set; }\r\n\r\n        public TLString Type { get; set; }\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLString ThumbUrl { get; set; }\r\n\r\n        public TLString ContentUrl { get; set; }\r\n\r\n        public TLString ContentType { get; set; }\r\n\r\n        public TLVector<TLDocumentAttributeBase> Attributes { get; set; }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            ResultId = GetObject<TLString>(input);\r\n            Type = GetObject<TLString>(input);\r\n            ThumbUrl = GetObject<TLString>(input);\r\n            ContentType = GetObject<TLString>(input);\r\n            ContentUrl = GetObject<TLString>(input);\r\n            Url = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n            ResultId.ToStream(output);\r\n            Type.ToStream(output);\r\n            ThumbUrl.ToStream(output);\r\n            ContentType.ToStream(output);\r\n            ContentUrl.ToStream(output);\r\n            Url.ToStream(output);\r\n            Attributes.ToStream(output);\r\n        }\r\n\r\n        public string GetFileName()\r\n        {\r\n            string extension;\r\n            if (!TLString.IsNullOrEmpty(Url))\r\n            {\r\n                extension = Path.GetExtension(Url.ToString());\r\n\r\n                if (!string.IsNullOrEmpty(extension))\r\n                {\r\n                    return ResultId + extension;\r\n                }\r\n            }\r\n            if (!TLString.IsNullOrEmpty(ContentUrl))\r\n            {\r\n                extension = Path.GetExtension(ContentUrl.ToString());\r\n\r\n                if (!string.IsNullOrEmpty(extension))\r\n                {\r\n                    return ResultId + extension;\r\n                }\r\n            }\r\n\r\n            return ResultId + TLUtils.ContentTypeToFileExt(ContentType);\r\n        }\r\n    }\r\n\r\n    public class TLDocumentEmpty : TLDocumentBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDocumentEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature), Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public abstract class TLDocument : TLDocumentBase\r\n    {\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public override int DocumentSize\r\n        {\r\n            get { return Size != null ? Size.Value : 0; }\r\n        }\r\n\r\n        public TLPhotoSizeBase Thumb { get; set; }\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public byte[] Buffer { get; set; }\r\n\r\n        public TLInputFileBase ThumbInputFile { get; set; }\r\n\r\n        public virtual TLInputDocumentFileLocation ToInputFileLocation()\r\n        {\r\n            return new TLInputDocumentFileLocation { AccessHash = AccessHash, Id = Id };\r\n        }\r\n\r\n        public abstract TLString FileName { get; set; }\r\n\r\n        public abstract string DocumentName { get; }\r\n\r\n        public string FileExt\r\n        {\r\n            get { return Path.GetExtension(FileName.ToString()).Replace(\".\", string.Empty); }\r\n        }\r\n\r\n        public virtual string GetFileName()\r\n        {\r\n            return string.Format(\"document{0}_{1}.{2}\", Id, AccessHash, FileExt);\r\n        }\r\n    }\r\n\r\n    public class TLDocument10 : TLDocument\r\n    {\r\n        public const uint Signature = TLConstructors.TLDocument;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override TLString FileName { get; set; }\r\n\r\n        public override string DocumentName { get { return FileName != null ? FileName.ToString() : string.Empty; } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            FileName = GetObject<TLString>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Thumb = GetObject<TLPhotoSizeBase>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                UserId.ToBytes(),\r\n                Date.ToBytes(),\r\n                FileName.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Size.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                DCId.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            FileName = GetObject<TLString>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Thumb = GetObject<TLPhotoSizeBase>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Date.ToStream(output);\r\n            FileName.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Size.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            DCId.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDocument22 : TLDocument, IAttributes\r\n    {\r\n        public const uint Signature = TLConstructors.TLDocument22;\r\n\r\n        public TLVector<TLDocumentAttributeBase> Attributes { get; set; }\r\n\r\n        public bool Music\r\n        {\r\n            get\r\n            {\r\n                var documentAttributeAudio = Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio46) as TLDocumentAttributeAudio46;\r\n                if (documentAttributeAudio != null)\r\n                {\r\n                    return !documentAttributeAudio.Voice;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public override string DocumentName\r\n        {\r\n            get\r\n            {\r\n                var documentAttributeAudio = Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio46) as TLDocumentAttributeAudio46;\r\n                if (documentAttributeAudio != null)\r\n                {\r\n                    if (documentAttributeAudio.Title != null && documentAttributeAudio.Performer != null)\r\n                    {\r\n                        return string.Format(\"{0} — {1}\", documentAttributeAudio.Title, documentAttributeAudio.Performer);\r\n                    }\r\n\r\n                    if (documentAttributeAudio.Title != null)\r\n                    {\r\n                        return string.Format(\"{0}\", documentAttributeAudio.Title);\r\n                    }\r\n\r\n                    if (documentAttributeAudio.Performer != null)\r\n                    {\r\n                        return string.Format(\"{0}\", documentAttributeAudio.Performer);\r\n                    }\r\n                }\r\n\r\n                return FileName.ToString();\r\n            }\r\n        }\r\n\r\n        public override string GetFileName()\r\n        {\r\n            if (TLMessageBase.IsVideo(this))\r\n            {\r\n                return string.Format(\"video{0}_{1}.{2}\", Id, AccessHash, \"mp4\");\r\n            }\r\n            if (TLMessageBase.IsVoice(this))\r\n            {\r\n                return string.Format(\"audio{0}_{1}.{2}\", Id, AccessHash, \"mp3\");\r\n            }\r\n\r\n            return string.Format(\"document{0}_{1}.{2}\", Id, AccessHash, FileExt);\r\n        }\r\n\r\n        public override TLInputDocumentFileLocation ToInputFileLocation()\r\n        {\r\n            return new TLInputDocumentFileLocation\r\n            {\r\n                Id = Id,\r\n                AccessHash = AccessHash\r\n            };\r\n        }\r\n\r\n        public TLInt Duration\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var durationAttribute = Attributes[i] as IAttributeDuration;\r\n                        if (durationAttribute != null)\r\n                        {\r\n                            return durationAttribute.Duration;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return new TLInt(0);\r\n            }\r\n        }\r\n\r\n        public string DurationString\r\n        {\r\n            get\r\n            {\r\n                var timeSpan = TimeSpan.FromSeconds(Duration.Value);\r\n\r\n                if (timeSpan.Hours > 0)\r\n                {\r\n                    return timeSpan.ToString(@\"h\\:mm\\:ss\");\r\n                }\r\n\r\n                return timeSpan.ToString(@\"m\\:ss\");\r\n            }\r\n        }\r\n\r\n        public TLInt ImageSizeH\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var imageSizeAttribute = Attributes[i] as TLDocumentAttributeImageSize;\r\n                        if (imageSizeAttribute != null)\r\n                        {\r\n                            return imageSizeAttribute.H;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return new TLInt(0);\r\n            }\r\n        }\r\n\r\n        public TLInt ImageSizeW\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var imageSizeAttribute = Attributes[i] as TLDocumentAttributeImageSize;\r\n                        if (imageSizeAttribute != null)\r\n                        {\r\n                            return imageSizeAttribute.W;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return new TLInt(0);\r\n            }\r\n        }\r\n\r\n        public override TLString FileName\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var fileNameAttribute = Attributes[i] as TLDocumentAttributeFileName;\r\n                        if (fileNameAttribute != null)\r\n                        {\r\n                            return fileNameAttribute.FileName;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return TLString.Empty;\r\n            }\r\n            set\r\n            {\r\n                Attributes = Attributes ?? new TLVector<TLDocumentAttributeBase>();\r\n\r\n                for (var i = 0; i < Attributes.Count; i++)\r\n                {\r\n                    if (Attributes[i] is TLDocumentAttributeFileName)\r\n                    {\r\n                        Attributes.RemoveAt(i--);\r\n                    }\r\n                }\r\n\r\n                Attributes.Add(new TLDocumentAttributeFileName{FileName = value});\r\n            }\r\n        }\r\n\r\n        public TLInputStickerSetBase StickerSet\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var stickerAttribute = Attributes[i] as TLDocumentAttributeSticker29;\r\n                        if (stickerAttribute != null)\r\n                        {\r\n                            return stickerAttribute.Stickerset;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        #region Additional\r\n\r\n        private string _emoticon;\r\n\r\n        public string Emoticon\r\n        {\r\n            get\r\n            {\r\n                if (_emoticon != null) return _emoticon;\r\n\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var stickerAttribute = Attributes[i] as TLDocumentAttributeSticker29;\r\n                        if (stickerAttribute != null)\r\n                        {\r\n                            _emoticon = stickerAttribute.Alt.ToString();\r\n                        }\r\n                    }\r\n                }\r\n\r\n                _emoticon = _emoticon ?? string.Empty;\r\n\r\n                return _emoticon;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} Id={1}\", GetType().Name, Id) + (StickerSet != null ? StickerSet.ToString() : string.Empty);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Thumb = GetObject<TLPhotoSizeBase>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Date.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Size.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                DCId.ToBytes(),\r\n                Attributes.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Thumb = GetObject<TLPhotoSizeBase>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Date.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Size.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            DCId.ToStream(output);\r\n            Attributes.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDocument54 : TLDocument22\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDocument54;\r\n\r\n        public bool Mask\r\n        {\r\n            get\r\n            {\r\n                if (Attributes != null)\r\n                {\r\n                    for (var i = 0; i < Attributes.Count; i++)\r\n                    {\r\n                        var stickerAttribute = Attributes[i] as TLDocumentAttributeSticker56;\r\n                        if (stickerAttribute != null)\r\n                        {\r\n                            return stickerAttribute.Mask;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public TLInt Version { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} id={1} version={2}\", GetType().Name, Id, Version) + (StickerSet != null ? \" stickerset=[\" + StickerSet + \"]\" : string.Empty);\r\n        }\r\n\r\n        public override string GetFileName()\r\n        {\r\n            if (TLMessageBase.IsVideo(this))\r\n            {\r\n                return string.Format(\"video{0}_{1}.{2}\", Id, AccessHash, \"mp4\");\r\n            }\r\n            if (TLMessageBase.IsVoice(this))\r\n            {\r\n                return string.Format(\"audio{0}_{1}.{2}\", Id, AccessHash, \"mp3\");\r\n            }\r\n\r\n            var documentVersion = Version;\r\n            if (documentVersion != null && documentVersion.Value > 0)\r\n            {\r\n                return string.Format(\"document{0}_{1}.{2}\", Id, documentVersion, FileExt);\r\n            }\r\n\r\n            return string.Format(\"document{0}_{1}.{2}\", Id, AccessHash, FileExt);\r\n        }\r\n\r\n        public override TLInputDocumentFileLocation ToInputFileLocation()\r\n        {\r\n            return new TLInputDocumentFileLocation54\r\n            {\r\n                Id = Id,\r\n                AccessHash = AccessHash,\r\n                Version = Version\r\n            };\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Thumb = GetObject<TLPhotoSizeBase>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Date.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Size.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                DCId.ToBytes(),\r\n                Version.ToBytes(),\r\n                Attributes.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Thumb = GetObject<TLPhotoSizeBase>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Date.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Size.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            DCId.ToStream(output);\r\n            Version.ToStream(output);\r\n            Attributes.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDocumentAttribute.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum DocumentAttributeVideoFlags\r\n    {\r\n        RoundMessage = 0x1,       // 0\r\n    }\r\n\r\n    [Flags]\r\n    public enum DocumentAttributeStickerFlags\r\n    {\r\n        MaskCoords = 0x1,       // 0\r\n        Mask = 0x2,             // 1\r\n    }\r\n\r\n    [Flags]\r\n    public enum DocumentAttributeAudioFlags\r\n    {\r\n        Title = 0x1,            // 0\r\n        Performer = 0x2,        // 1\r\n        Waveform = 0x4,         // 2\r\n\r\n        Voice = 0x400,          // 10\r\n    }\r\n\r\n    public interface IAttributeDuration\r\n    {\r\n        TLInt Duration { get; set; }\r\n    }\r\n\r\n    public interface IAttributeSize\r\n    {\r\n        TLInt W { get; set; }\r\n\r\n        TLInt H { get; set; }\r\n    }\r\n\r\n    public abstract class TLDocumentAttributeBase  : TLObject { }\r\n\r\n    public class TLDocumentAttributeImageSize : TLDocumentAttributeBase, IAttributeSize\r\n    {\r\n        public const uint Signature = TLConstructors.TLDocumentAttributeImageSize;\r\n\r\n        public TLInt W { get; set; }\r\n\r\n        public TLInt H { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                W.ToBytes(),\r\n                H.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeAnimated : TLDocumentAttributeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDocumentAttributeAnimated;\r\n        \r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeSticker : TLDocumentAttributeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDocumentAttributeSticker;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeSticker25 : TLDocumentAttributeSticker\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDocumentAttributeSticker25;\r\n\r\n        public TLString Alt { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Alt = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Alt.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Alt = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Alt.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeSticker29 : TLDocumentAttributeSticker25\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDocumentAttributeSticker29;\r\n\r\n        public TLInputStickerSetBase Stickerset { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Alt = GetObject<TLString>(bytes, ref position);\r\n            Stickerset = GetObject<TLInputStickerSetBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Alt.ToBytes(),\r\n                Stickerset.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Alt = GetObject<TLString>(input);\r\n            Stickerset = GetObject<TLInputStickerSetBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Alt.ToStream(output);\r\n            Stickerset.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeSticker56 : TLDocumentAttributeSticker29\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDocumentAttributeSticker56;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLMaskCoords _maskCoords;\r\n\r\n        public TLMaskCoords MaskCoords\r\n        {\r\n            get { return _maskCoords; }\r\n            set { SetField(out _maskCoords, value, ref _flags, (int) DocumentAttributeStickerFlags.MaskCoords); }\r\n        }\r\n\r\n        public bool Mask { get { return IsSet(Flags, (int) DocumentAttributeStickerFlags.Mask); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Alt = GetObject<TLString>(bytes, ref position);\r\n            Stickerset = GetObject<TLInputStickerSetBase>(bytes, ref position);\r\n            MaskCoords = GetObject<TLMaskCoords>(Flags, (int) DocumentAttributeStickerFlags.MaskCoords, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Alt.ToBytes(),\r\n                Stickerset.ToBytes(),\r\n                ToBytes(MaskCoords, Flags, (int) DocumentAttributeStickerFlags.MaskCoords));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Alt = GetObject<TLString>(input);\r\n            Stickerset = GetObject<TLInputStickerSetBase>(input);\r\n            MaskCoords = GetObject<TLMaskCoords>(Flags, (int) DocumentAttributeStickerFlags.MaskCoords, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Alt.ToStream(output);\r\n            Stickerset.ToStream(output);\r\n            ToStream(output, MaskCoords, Flags, (int) DocumentAttributeStickerFlags.MaskCoords);\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeVideo66 : TLDocumentAttributeVideo\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDocumentAttributeVideo66;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool RoundMessage\r\n        {\r\n            get { return IsSet(Flags, (int) DocumentAttributeVideoFlags.RoundMessage); }\r\n            set { SetUnset(ref _flags, value, (int) DocumentAttributeVideoFlags.RoundMessage); }\r\n        }\r\n\r\n        public bool Mask { get { return IsSet(Flags, (int)DocumentAttributeStickerFlags.Mask); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Duration.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Duration.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeVideo : TLDocumentAttributeBase, IAttributeDuration, IAttributeSize\r\n    {\r\n        public const uint Signature = TLConstructors.TLDocumentAttributeVideo;\r\n\r\n        public TLInt Duration { get; set; }\r\n\r\n        public TLInt W { get; set; }\r\n\r\n        public TLInt H { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Duration.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Duration = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Duration.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeAudio : TLDocumentAttributeBase, IAttributeDuration\r\n    {\r\n        public const uint Signature = TLConstructors.TLDocumentAttributeAudio;\r\n\r\n        public TLInt Duration { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Duration.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Duration = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Duration.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeAudio32 : TLDocumentAttributeAudio\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDocumentAttributeAudio32;\r\n\r\n        public virtual TLString Title { get; set; }\r\n\r\n        public virtual TLString Performer { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Performer = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Duration.ToBytes(),\r\n                Title.ToBytes(),\r\n                Performer.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Duration = GetObject<TLInt>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Performer = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Duration.ToStream(output);\r\n            Title.ToStream(output);\r\n            Performer.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeAudio46 : TLDocumentAttributeAudio32\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDocumentAttributeAudio46;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Voice\r\n        {\r\n            get { return IsSet(Flags, (int) DocumentAttributeAudioFlags.Voice); }\r\n            set { SetUnset(ref _flags, value, (int) DocumentAttributeAudioFlags.Voice); }\r\n        }\r\n\r\n        protected TLString _title;\r\n\r\n        public override TLString Title\r\n        {\r\n            get { return _title; }\r\n            set { SetFlagValue(value, out _title, ref _flags, (int)DocumentAttributeAudioFlags.Title); }\r\n        }\r\n\r\n        protected TLString _performer;\r\n\r\n        public override TLString Performer\r\n        {\r\n            get { return _performer; }\r\n            set { SetFlagValue(value, out _performer, ref _flags, (int)DocumentAttributeAudioFlags.Performer); }\r\n        }\r\n\r\n        protected TLString _waveform;\r\n\r\n        public TLString Waveform\r\n        {\r\n            get { return _waveform; }\r\n            set { SetFlagValue(value, out _waveform, ref _flags, (int)DocumentAttributeAudioFlags.Waveform); }\r\n        }\r\n\r\n        private static void SetFlagValue<T>(T value, out T field, ref TLInt flags, int flag) where T : TLObject\r\n        {\r\n            if (value != null)\r\n            {\r\n                Set(ref flags, flag);\r\n                field = value;\r\n            }\r\n            else\r\n            {\r\n                Unset(ref flags, flag);\r\n                field = default(T);\r\n            }\r\n        }\r\n\r\n        private static void GetObject<T>(byte[] bytes, ref int position, ref T field, TLInt flags, int flag) where T : TLObject\r\n        {\r\n            if (IsSet(flags, flag))\r\n            {\r\n                field = GetObject<T>(bytes, ref position);\r\n            }\r\n        }\r\n\r\n        private static void GetObject<T>(Stream input, ref T field, TLInt flags, int flag) where T : TLObject\r\n        {\r\n            if (IsSet(flags, flag))\r\n            {\r\n                field = GetObject<T>(input);\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            GetObject(bytes, ref position, ref _title, _flags, (int) DocumentAttributeAudioFlags.Title);\r\n            GetObject(bytes, ref position, ref _performer, _flags, (int) DocumentAttributeAudioFlags.Performer);\r\n            GetObject(bytes, ref position, ref _waveform, _flags, (int) DocumentAttributeAudioFlags.Waveform);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Duration.ToBytes(),\r\n                ToBytes(Title, Flags, (int) DocumentAttributeAudioFlags.Title),\r\n                ToBytes(Performer, Flags, (int) DocumentAttributeAudioFlags.Performer),\r\n                ToBytes(Waveform, Flags, (int) DocumentAttributeAudioFlags.Waveform));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            GetObject(input, ref _title, _flags, (int) DocumentAttributeAudioFlags.Title);\r\n            GetObject(input, ref _performer, _flags, (int) DocumentAttributeAudioFlags.Performer);\r\n            GetObject(input, ref _waveform, _flags, (int) DocumentAttributeAudioFlags.Waveform);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Duration.ToStream(output);\r\n            ToStream(output, Title, Flags, (int) DocumentAttributeAudioFlags.Title);\r\n            ToStream(output, Performer, Flags, (int) DocumentAttributeAudioFlags.Performer);\r\n            ToStream(output, Waveform, Flags, (int) DocumentAttributeAudioFlags.Waveform);\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeFileName : TLDocumentAttributeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDocumentAttributeFileName;\r\n\r\n        public TLString FileName { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            FileName = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                FileName.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            FileName = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            FileName.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLDocumentAttributeHasStickers : TLDocumentAttributeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDocumentAttributeHasStickers;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDouble.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Runtime.Serialization;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [DataContract]\r\n    public class TLDouble : TLObject\r\n    {\r\n        public TLDouble() { }\r\n\r\n        public TLDouble(double value)\r\n        {\r\n            Value = value;\r\n        }\r\n\r\n        [DataMember]\r\n        public Double Value { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            Value = BitConverter.ToDouble(bytes, position);\r\n            position += 8;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return BitConverter.GetBytes(Value);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            var buffer = new byte[8];\r\n            input.Read(buffer, 0, 8);\r\n            Value = BitConverter.ToDouble(buffer, 0);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(BitConverter.GetBytes(Value), 0, 8);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Value.ToString(CultureInfo.InvariantCulture);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLDraftMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL.Functions.Messages;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum DraftMessageEmptyFlags\r\n    {\r\n        Date = 0x1      // 0\r\n    }\r\n\r\n    public abstract class TLDraftMessageBase : TLObject\r\n    {\r\n        public abstract bool DraftEquals(TLDraftMessageBase draft);\r\n\r\n        public abstract bool IsEmpty();\r\n\r\n        public abstract TLSaveDraft ToSaveDraftObject(TLInputPeerBase peer);\r\n    }\r\n\r\n    public class TLDraftMessageEmpty82 : TLDraftMessageEmpty\r\n    {\r\n        public new const uint Signature = TLConstructors.TLDraftMessageEmpty82;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        protected TLInt _date;\r\n\r\n        public TLInt Date\r\n        {\r\n            get { return _date; }\r\n            set { SetField(out _date, value, ref _flags, (int) DraftMessageEmptyFlags.Date); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(_flags, (int) DraftMessageEmptyFlags.Date, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(_flags, (int)DraftMessageEmptyFlags.Date, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, Date, _flags, (int)DraftMessageEmptyFlags.Date);\r\n        }\r\n\r\n        public override bool DraftEquals(TLDraftMessageBase draft)\r\n        {\r\n            var emptyDraft = draft as TLDraftMessageEmpty;\r\n            return draft == null || emptyDraft != null;\r\n        }\r\n\r\n        public override TLSaveDraft ToSaveDraftObject(TLInputPeerBase peer)\r\n        {\r\n            return new TLSaveDraft\r\n            {\r\n                Flags = new TLInt(0),\r\n                Peer = peer,\r\n                Message = TLString.Empty\r\n            };\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLDraftMessageEmpty82\";\r\n        }\r\n    }\r\n\r\n    public class TLDraftMessageEmpty : TLDraftMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDraftMessageEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override bool DraftEquals(TLDraftMessageBase draft)\r\n        {\r\n            return draft == null || draft is TLDraftMessageEmpty;\r\n        }\r\n\r\n        public override bool IsEmpty()\r\n        {\r\n            return true;\r\n        }\r\n\r\n        public override TLSaveDraft ToSaveDraftObject(TLInputPeerBase peer)\r\n        {\r\n            return new TLSaveDraft\r\n            {\r\n                Flags = new TLInt(0),\r\n                Peer = peer,\r\n                Message = TLString.Empty\r\n            };\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLDraftMessageEmpty\";\r\n        }\r\n    }\r\n\r\n    public class TLDraftMessage : TLDraftMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDraftMessage;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool NoWebpage\r\n        {\r\n            get { return IsSet(Flags, (int) SendFlags.NoWebpage); }\r\n            set { SetUnset(ref _flags, value, (int) SendFlags.NoWebpage); }\r\n        }\r\n\r\n        private TLInt _replyToMsgId;\r\n\r\n        public TLInt ReplyToMsgId\r\n        {\r\n            get { return _replyToMsgId; }\r\n            set { SetField(out _replyToMsgId, value, ref _flags, (int) SendFlags.ReplyToMsgId); }\r\n        }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        private TLVector<TLMessageEntityBase> _entities;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set { SetField(out _entities, value, ref _flags, (int) SendFlags.Entities); }\r\n        }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLSaveDraft ToSaveDraftObject(TLInputPeerBase peer)\r\n        {\r\n            var obj = new TLSaveDraft\r\n            {\r\n                Flags = new TLInt(0),\r\n                ReplyToMsgId = ReplyToMsgId,\r\n                Peer = peer,\r\n                Message = Message,\r\n                Entities = Entities,\r\n            };\r\n\r\n            if (NoWebpage)\r\n            {\r\n                obj.DisableWebPagePreview();\r\n            }\r\n\r\n            return obj;\r\n        }\r\n\r\n        public override bool DraftEquals(TLDraftMessageBase draftBase)\r\n        {\r\n            var draftEmpty = draftBase as TLDraftMessageEmpty;\r\n            if (draftEmpty != null)\r\n            {\r\n                return IsEmpty();\r\n            }\r\n\r\n            var draft = draftBase as TLDraftMessage;\r\n            if (draft != null)\r\n            {\r\n                if (Flags.Value != draft.Flags.Value) return false;\r\n\r\n                if (!TLString.Equals(Message, draft.Message, StringComparison.Ordinal)) return false;\r\n\r\n                if (ReplyToMsgId != null && draft.ReplyToMsgId != null && ReplyToMsgId.Value != draft.ReplyToMsgId.Value) return false;\r\n\r\n                if (Entities != null && draft.Entities != null && Entities.Count != draft.Entities.Count) return false;\r\n            }\r\n            else\r\n            {\r\n                return false;\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        public override bool IsEmpty()\r\n        {\r\n            return TLString.IsNullOrEmpty(Message) && ReplyToMsgId == null;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            _replyToMsgId = GetObject<TLInt>(Flags, (int)SendFlags.ReplyToMsgId, null, bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            _entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)SendFlags.Entities, null, bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            _replyToMsgId = GetObject<TLInt>(Flags, (int)SendFlags.ReplyToMsgId, null, input);\r\n            Message = GetObject<TLString>(input);\r\n            _entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)SendFlags.Entities, null, input);\r\n            Date = GetObject<TLInt>(input);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, _replyToMsgId, Flags, (int)SendFlags.ReplyToMsgId);\r\n            Message.ToStream(output);\r\n            ToStream(output, _entities, Flags, (int)SendFlags.Entities);\r\n            Date.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLDraftMessage reply_to_msg_id={0} message={1} no_webpage={2} entities={3}\", ReplyToMsgId, Message, NoWebpage, Entities != null? Entities.Count : 0);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLEncryptedChat.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum EncryptedChatCustomFlags\r\n    {\r\n        OriginalKey = 0x1,\r\n        ExtendedKey = 0x2,\r\n        LinkPreview = 0x4\r\n    }\r\n\r\n    public abstract class TLEncryptedChatBase : TLObject\r\n    {\r\n        public int Index { get { return Id.Value; } }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        #region Additional\r\n\r\n        protected TLString _key;\r\n\r\n        public TLString Key\r\n        {\r\n            get { return _key; }\r\n            set\r\n            {\r\n                if (_key == null && value != null)\r\n                {\r\n                    if (OriginalKey == null)\r\n                    {\r\n                        OriginalKey = value;\r\n                    }\r\n\r\n                    if (ExtendedKey == null)\r\n                    {\r\n                        var chat17 = this as TLEncryptedChat17;\r\n                        if (chat17 != null && chat17.Layer != null\r\n                            && chat17.Layer.Value >= Constants.MinSecretChatWithExtendedKeyVisualizationLayer)\r\n                        {\r\n                            ExtendedKey = value;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                _key = value;\r\n            }\r\n        }\r\n\r\n        public TLLong KeyFingerprint { get; set; }\r\n\r\n        public TLString P { get; set; }\r\n\r\n        public TLInt G { get; set; }\r\n\r\n        public TLString A { get; set; }\r\n\r\n        public TLInt MessageTTL { get; set; }\r\n\r\n        protected TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        protected TLString _originalKey;\r\n\r\n        public TLString OriginalKey\r\n        {\r\n            get { return _originalKey; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    Set(ref _customFlags, (int)EncryptedChatCustomFlags.OriginalKey);\r\n                    _originalKey = value;\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _customFlags, (int)EncryptedChatCustomFlags.OriginalKey);\r\n                    _originalKey = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        protected TLString _extendedKey;\r\n\r\n        public TLString ExtendedKey\r\n        {\r\n            get { return _extendedKey; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    Set(ref _customFlags, (int)EncryptedChatCustomFlags.ExtendedKey);\r\n                    _extendedKey = value;\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _customFlags, (int)EncryptedChatCustomFlags.ExtendedKey);\r\n                    _extendedKey = null;\r\n                }\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public virtual void Update(TLEncryptedChatBase chat)\r\n        {\r\n            Id = chat.Id;\r\n            if (chat.Key != null) _key = chat._key;\r\n            if (chat.KeyFingerprint != null) KeyFingerprint = chat.KeyFingerprint;\r\n            if (chat.P != null) P = chat.P;\r\n            if (chat.G != null) G = chat.G;\r\n            if (chat.A != null) A = chat.A;\r\n\r\n            if (chat.CustomFlags != null) CustomFlags = chat.CustomFlags;\r\n            if (chat.OriginalKey != null) OriginalKey = chat.OriginalKey;\r\n            if (chat.ExtendedKey != null) ExtendedKey = chat.ExtendedKey;\r\n        }\r\n    }\r\n\r\n    public class TLEncryptedChatEmpty : TLEncryptedChatBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLEncryptedChatEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            base.FromBytes(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void Update(TLEncryptedChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            _key = GetNullableObject<TLString>(input);\r\n            KeyFingerprint = GetNullableObject<TLLong>(input);\r\n            P = GetNullableObject<TLString>(input);\r\n            G = GetNullableObject<TLInt>(input);\r\n            A = GetNullableObject<TLString>(input);\r\n            MessageTTL = GetNullableObject<TLInt>(input);\r\n            \r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey))\r\n            {\r\n                OriginalKey = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey))\r\n            {\r\n                ExtendedKey = GetObject<TLString>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n\r\n            Key.NullableToStream(output);\r\n            KeyFingerprint.NullableToStream(output);\r\n            P.NullableToStream(output);\r\n            G.NullableToStream(output);\r\n            A.NullableToStream(output);\r\n            MessageTTL.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n            ToStream(output, OriginalKey, CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey);\r\n            ToStream(output, ExtendedKey, CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey);\r\n        }\r\n    }\r\n\r\n    public abstract class TLEncryptedChatCommon : TLEncryptedChatBase\r\n    {\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt AdminId { get; set; }\r\n\r\n        public TLInt ParticipantId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            base.FromBytes(bytes, ref position);\r\n\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            AdminId = GetObject<TLInt>(bytes, ref position);\r\n            ParticipantId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void Update(TLEncryptedChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n\r\n            var chatCommon = chat as TLEncryptedChatCommon;\r\n            if (chatCommon != null)\r\n            {\r\n                AccessHash = chatCommon.AccessHash;\r\n                Date = chatCommon.Date;\r\n                AdminId = chatCommon.AdminId;\r\n                ParticipantId = chatCommon.ParticipantId;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLEncryptedChatWaiting : TLEncryptedChatCommon\r\n    {\r\n        public const uint Signature = TLConstructors.TLEncryptedChatWaiting;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            base.FromBytes(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            AdminId = GetObject<TLInt>(input);\r\n            ParticipantId = GetObject<TLInt>(input);\r\n\r\n            _key = GetNullableObject<TLString>(input);\r\n            KeyFingerprint = GetNullableObject<TLLong>(input);\r\n            P = GetNullableObject<TLString>(input);\r\n            G = GetNullableObject<TLInt>(input);\r\n            A = GetNullableObject<TLString>(input);\r\n            MessageTTL = GetNullableObject<TLInt>(input);\r\n            \r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey))\r\n            {\r\n                OriginalKey = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey))\r\n            {\r\n                ExtendedKey = GetObject<TLString>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            output.Write(AdminId.ToBytes());\r\n            output.Write(ParticipantId.ToBytes());\r\n\r\n            Key.NullableToStream(output);\r\n            KeyFingerprint.NullableToStream(output);\r\n            P.NullableToStream(output);\r\n            G.NullableToStream(output);\r\n            A.NullableToStream(output);\r\n            MessageTTL.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n            ToStream(output, OriginalKey, CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey);\r\n            ToStream(output, ExtendedKey, CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey);\r\n        }\r\n    }\r\n\r\n    public class TLEncryptedChatRequested : TLEncryptedChatCommon\r\n    {\r\n        public const uint Signature = TLConstructors.TLEncryptedChatRequested;\r\n\r\n        public TLString GA { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            base.FromBytes(bytes, ref position);\r\n\r\n            GA = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void Update(TLEncryptedChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n\r\n            var chatRequested = chat as TLEncryptedChatRequested;\r\n            if (chatRequested != null)\r\n            {\r\n                GA = chatRequested.GA;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            AdminId = GetObject<TLInt>(input);\r\n            ParticipantId = GetObject<TLInt>(input);\r\n            GA = GetObject<TLString>(input);\r\n\r\n            _key = GetNullableObject<TLString>(input);\r\n            KeyFingerprint = GetNullableObject<TLLong>(input);\r\n            P = GetNullableObject<TLString>(input);\r\n            G = GetNullableObject<TLInt>(input);\r\n            A = GetNullableObject<TLString>(input);\r\n            MessageTTL = GetNullableObject<TLInt>(input);\r\n            \r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey))\r\n            {\r\n                OriginalKey = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey))\r\n            {\r\n                ExtendedKey = GetObject<TLString>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            output.Write(AdminId.ToBytes());\r\n            output.Write(ParticipantId.ToBytes());\r\n            output.Write(GA.ToBytes());\r\n\r\n            Key.NullableToStream(output);\r\n            KeyFingerprint.NullableToStream(output);\r\n            P.NullableToStream(output);\r\n            G.NullableToStream(output);\r\n            A.NullableToStream(output);\r\n            MessageTTL.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n            ToStream(output, OriginalKey, CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey);\r\n            ToStream(output, ExtendedKey, CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey);\r\n        }\r\n    }\r\n\r\n    public class TLEncryptedChat20 : TLEncryptedChat17\r\n    {\r\n        public new const uint Signature = TLConstructors.TLEncryptedChat20;\r\n\r\n        public TLLong PFS_ExchangeId { get; set; }\r\n        public TLString PFS_A { get; set; }\r\n        public TLString PFS_Key { get; set; }\r\n\r\n        public TLLong PFS_KeyFingerprint { get; set; }\r\n\r\n        public override void Update(TLEncryptedChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n\r\n            var encryptedChat = chat as TLEncryptedChat20;\r\n            if (encryptedChat != null)\r\n            {\r\n                PFS_ExchangeId = encryptedChat.PFS_ExchangeId;\r\n                PFS_A = encryptedChat.PFS_A;\r\n                PFS_Key = encryptedChat.PFS_Key;\r\n                PFS_KeyFingerprint = encryptedChat.PFS_KeyFingerprint;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            AdminId = GetObject<TLInt>(input);\r\n            ParticipantId = GetObject<TLInt>(input);\r\n            GAorB = GetObject<TLString>(input);\r\n\r\n            _key = GetNullableObject<TLString>(input);\r\n            KeyFingerprint = GetNullableObject<TLLong>(input);\r\n            P = GetNullableObject<TLString>(input);\r\n            G = GetNullableObject<TLInt>(input);\r\n            A = GetNullableObject<TLString>(input);\r\n            MessageTTL = GetNullableObject<TLInt>(input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey))\r\n            {\r\n                OriginalKey = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey))\r\n            {\r\n                ExtendedKey = GetObject<TLString>(input);\r\n            }\r\n\r\n            RawInSeqNo = GetNullableObject<TLInt>(input);\r\n            RawOutSeqNo = GetNullableObject<TLInt>(input);\r\n            Layer = GetNullableObject<TLInt>(input);\r\n\r\n            PFS_ExchangeId = GetNullableObject<TLLong>(input);\r\n            PFS_A = GetNullableObject<TLString>(input);\r\n            PFS_Key = GetNullableObject<TLString>(input);\r\n            PFS_KeyFingerprint = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            output.Write(AdminId.ToBytes());\r\n            output.Write(ParticipantId.ToBytes());\r\n            output.Write(GAorB.ToBytes());\r\n\r\n            Key.NullableToStream(output);\r\n            KeyFingerprint.NullableToStream(output);\r\n            P.NullableToStream(output);\r\n            G.NullableToStream(output);\r\n            A.NullableToStream(output);\r\n            MessageTTL.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n            ToStream(output, OriginalKey, CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey);\r\n            ToStream(output, ExtendedKey, CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey);\r\n\r\n            RawInSeqNo.NullableToStream(output);\r\n            RawOutSeqNo.NullableToStream(output);\r\n            Layer.NullableToStream(output);\r\n\r\n            PFS_ExchangeId.NullableToStream(output);\r\n            PFS_A.NullableToStream(output);\r\n            PFS_Key.NullableToStream(output);\r\n            PFS_KeyFingerprint.NullableToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"EncryptedChat20={0} Hash={1}\", Index, GetHashCode());\r\n        }\r\n    }\r\n\r\n    public class TLEncryptedChat17 : TLEncryptedChat\r\n    {\r\n        public new const uint Signature = TLConstructors.TLEncryptedChat17;\r\n\r\n        private TLInt _rawInSeqNo;\r\n\r\n        // from 0, increment by 1 after each received decryptedMessage/decryptedMessageService\r\n        public TLInt RawInSeqNo\r\n        {\r\n            get { return _rawInSeqNo; }\r\n            set\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(\"  raw_in_seq_no chat={0} old={1} new={2}\", Id, _rawInSeqNo, value);\r\n                _rawInSeqNo = value;\r\n            }\r\n        }\r\n\r\n        private TLInt _rawOutSeqNo;\r\n\r\n        // from 0, increment by 1 after each sent decryptedMessage/decryptedMessageService\r\n        public TLInt RawOutSeqNo\r\n        {\r\n            get { return _rawOutSeqNo; }\r\n            set\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(\"  raw_out_seq_no chat={0} old={1} new={2}\", Id, _rawOutSeqNo, value);\r\n                _rawOutSeqNo = value;\r\n            }\r\n        }\r\n\r\n        private TLInt _layer;\r\n\r\n        public TLInt Layer\r\n        {\r\n            get { return _layer; }\r\n            set\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(\"  layer chat={0} old={1} new={2}\", Id, _layer, value);\r\n                _layer = value;\r\n            }\r\n        }\r\n\r\n        public TLBool IsConfirmed { get; set; }\r\n\r\n        public override void Update(TLEncryptedChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n\r\n            var encryptedChat = chat as TLEncryptedChat17;\r\n            if (encryptedChat != null)\r\n            {\r\n                RawInSeqNo = encryptedChat.RawInSeqNo;\r\n                RawOutSeqNo = encryptedChat.RawOutSeqNo;\r\n                Layer = encryptedChat.Layer;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            AdminId = GetObject<TLInt>(input);\r\n            ParticipantId = GetObject<TLInt>(input);\r\n            GAorB = GetObject<TLString>(input);\r\n\r\n            _key = GetNullableObject<TLString>(input);\r\n            KeyFingerprint = GetNullableObject<TLLong>(input);\r\n            P = GetNullableObject<TLString>(input);\r\n            G = GetNullableObject<TLInt>(input);\r\n            A = GetNullableObject<TLString>(input);\r\n            MessageTTL = GetNullableObject<TLInt>(input);\r\n            \r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey))\r\n            {\r\n                OriginalKey = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey))\r\n            {\r\n                ExtendedKey = GetObject<TLString>(input);\r\n            }\r\n\r\n            RawInSeqNo = GetNullableObject<TLInt>(input);\r\n            RawOutSeqNo = GetNullableObject<TLInt>(input);\r\n            Layer = GetNullableObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            output.Write(AdminId.ToBytes());\r\n            output.Write(ParticipantId.ToBytes());\r\n            output.Write(GAorB.ToBytes());\r\n\r\n            Key.NullableToStream(output);\r\n            KeyFingerprint.NullableToStream(output);\r\n            P.NullableToStream(output);\r\n            G.NullableToStream(output);\r\n            A.NullableToStream(output);\r\n            MessageTTL.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n            ToStream(output, OriginalKey, CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey);\r\n            ToStream(output, ExtendedKey, CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey);\r\n\r\n            RawInSeqNo.NullableToStream(output);\r\n            RawOutSeqNo.NullableToStream(output);\r\n            Layer.NullableToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"EncryptedChat17={0} Hash={1}\", Index, GetHashCode());\r\n        }\r\n    }\r\n\r\n    public class TLEncryptedChat : TLEncryptedChatCommon\r\n    {\r\n        public const uint Signature = TLConstructors.TLEncryptedChat;\r\n\r\n        public TLString GAorB { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            base.FromBytes(bytes, ref position);\r\n\r\n            GAorB = GetObject<TLString>(bytes, ref position);\r\n            KeyFingerprint = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void Update(TLEncryptedChatBase chat)\r\n        {\r\n            base.Update(chat);\r\n\r\n            var encryptedChat = chat as TLEncryptedChat;\r\n            if (encryptedChat != null)\r\n            {\r\n                GAorB = encryptedChat.GAorB;\r\n                KeyFingerprint = encryptedChat.KeyFingerprint;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            AdminId = GetObject<TLInt>(input);\r\n            ParticipantId = GetObject<TLInt>(input);\r\n            GAorB = GetObject<TLString>(input);\r\n\r\n            _key = GetNullableObject<TLString>(input);\r\n            KeyFingerprint = GetNullableObject<TLLong>(input);\r\n            P = GetNullableObject<TLString>(input);\r\n            G = GetNullableObject<TLInt>(input);\r\n            A = GetNullableObject<TLString>(input);\r\n            MessageTTL = GetNullableObject<TLInt>(input);\r\n            \r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey))\r\n            {\r\n                OriginalKey = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey))\r\n            {\r\n                ExtendedKey = GetObject<TLString>(input);\r\n            }\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            output.Write(AdminId.ToBytes());\r\n            output.Write(ParticipantId.ToBytes());\r\n            output.Write(GAorB.ToBytes());\r\n\r\n            Key.NullableToStream(output);\r\n            KeyFingerprint.NullableToStream(output);\r\n            P.NullableToStream(output);\r\n            G.NullableToStream(output);\r\n            A.NullableToStream(output);\r\n            MessageTTL.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n            ToStream(output, OriginalKey, CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey);\r\n            ToStream(output, ExtendedKey, CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"EncryptedChat={0} Hash={1}\", Index, GetHashCode());\r\n        }\r\n    }\r\n\r\n    public class TLEncryptedChatDiscarded : TLEncryptedChatBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLEncryptedChatDiscarded;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            base.FromBytes(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            _key = GetNullableObject<TLString>(input);\r\n            KeyFingerprint = GetNullableObject<TLLong>(input);\r\n            P = GetNullableObject<TLString>(input);\r\n            G = GetNullableObject<TLInt>(input);\r\n            A = GetNullableObject<TLString>(input);\r\n            MessageTTL = GetNullableObject<TLInt>(input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey))\r\n            {\r\n                OriginalKey = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey))\r\n            {\r\n                ExtendedKey = GetObject<TLString>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n\r\n            Key.NullableToStream(output);\r\n            KeyFingerprint.NullableToStream(output);\r\n            P.NullableToStream(output);\r\n            G.NullableToStream(output);\r\n            A.NullableToStream(output);\r\n            MessageTTL.NullableToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n            ToStream(output, OriginalKey, CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey);\r\n            ToStream(output, ExtendedKey, CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLEncryptedFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLEncryptedFileBase : TLObject { }\r\n\r\n    public class TLEncryptedFileEmpty : TLEncryptedFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLEncryptedFileEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLEncryptedFile : TLEncryptedFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLEncryptedFile;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public TLInt KeyFingerprint { get; set; }\r\n\r\n        #region Additional\r\n        public TLString FileName { get; set; }\r\n\r\n        public string FileExt\r\n        {\r\n            get\r\n            {\r\n                return FileName != null\r\n                    ? Path.GetExtension(FileName.ToString()).Replace(\".\", string.Empty)\r\n                    : null;\r\n            }\r\n        }\r\n\r\n        public TLInt Duration { get; set; }\r\n\r\n        public string DurationString\r\n        {\r\n            get\r\n            {\r\n                if (Duration == null) return string.Empty;\r\n\r\n                var timeSpan = TimeSpan.FromSeconds(Duration.Value);\r\n\r\n                if (timeSpan.Hours > 0)\r\n                {\r\n                    return timeSpan.ToString(@\"h\\:mm\\:ss\");\r\n                }\r\n\r\n                return timeSpan.ToString(@\"m\\:ss\");\r\n            }\r\n        }\r\n        #endregion \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            KeyFingerprint = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n            KeyFingerprint = GetObject<TLInt>(input);\r\n\r\n            FileName = GetNullableObject<TLString>(input);\r\n            Duration = GetNullableObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Size.ToBytes());\r\n            output.Write(DCId.ToBytes());\r\n            output.Write(KeyFingerprint.ToBytes());\r\n\r\n            FileName.NullableToStream(output);\r\n            Duration.NullableToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLEncryptedMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define MTPROTO\r\n\r\nusing System;\r\nusing System.Linq;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLEncryptedTransportMessage : TLObject\r\n    {\r\n        public TLLong AuthKeyId { get; set; }\r\n        public byte[] MsgKey { get; set; } //128 bit\r\n        public byte[] Data { get; set; }\r\n\r\n        public TLEncryptedTransportMessage Decrypt(byte[] authKey)\r\n        {\r\n            return Decrypt(this, authKey);\r\n        }\r\n\r\n        public static TLEncryptedTransportMessage Decrypt(TLEncryptedTransportMessage transportMessage, byte[] authKey)\r\n        {\r\n            var keyIV = TLUtils.GetDecryptKeyIV(authKey, transportMessage.MsgKey);\r\n            transportMessage.Data = Utils.AesIge(transportMessage.Data, keyIV.Item1, keyIV.Item2, false);\r\n\r\n            //var msgKey = TLUtils.GetDecryptMsgKey(authKey, transportMessage.Data);\r\n            //if (!TLUtils.ByteArraysEqual(msgKey, transportMessage.MsgKey))\r\n            //{\r\n            //    transportMessage.Data = null;\r\n            //}\r\n\r\n            return transportMessage;\r\n        }\r\n\r\n        public TLEncryptedTransportMessage Encrypt(byte[] authKey)\r\n        {\r\n            return Encrypt(this, authKey);\r\n        }\r\n\r\n        public static TLEncryptedTransportMessage Encrypt(TLEncryptedTransportMessage transportMessage, byte[] authKey)\r\n        {\r\n#if MTPROTO\r\n            var random = new SecureRandom();\r\n            \r\n            var data = transportMessage.Data;\r\n\r\n            var length = data.Length;\r\n            var padding = 16 - (length % 16);\r\n            byte[] paddingBytes = null;\r\n            if (padding < 12)\r\n            {\r\n                padding += 16;\r\n            }\r\n            if (padding >= 12 && padding <= 1024)\r\n            {\r\n                paddingBytes = new byte[padding];\r\n                random.NextBytes(paddingBytes);\r\n            }\r\n\r\n            var dataWithPadding = data;\r\n            if (paddingBytes != null)\r\n            {\r\n                dataWithPadding = TLUtils.Combine(data, paddingBytes);\r\n            }\r\n\r\n            var msgKey = TLUtils.GetEncryptMsgKey(authKey, dataWithPadding);\r\n            var keyIV = TLUtils.GetEncryptKeyIV(authKey, msgKey);\r\n            var encryptedData = Utils.AesIge(dataWithPadding, keyIV.Item1, keyIV.Item2, true);\r\n\r\n            var authKeyId = TLUtils.GenerateLongAuthKeyId(authKey);\r\n\r\n            transportMessage.AuthKeyId = new TLLong(authKeyId);\r\n            transportMessage.MsgKey = msgKey;\r\n            transportMessage.Data = encryptedData;\r\n\r\n            return transportMessage;\r\n#else\r\n            var random = new SecureRandom();\r\n\r\n            var data = transportMessage.Data;\r\n\r\n            var length = data.Length;\r\n            var padding = 16 - (length % 16);\r\n            byte[] paddingBytes = null;\r\n            if (padding > 0 && padding < 16)\r\n            {\r\n                paddingBytes = new byte[padding];\r\n                random.NextBytes(paddingBytes);\r\n            }\r\n\r\n            byte[] dataWithPadding = data;\r\n            if (paddingBytes != null)\r\n            {\r\n                dataWithPadding = TLUtils.Combine(data, paddingBytes);\r\n            }\r\n\r\n\r\n            var msgKey = TLUtils.GetMsgKey(data);\r\n            var keyIV = TLUtils.GetEncryptKeyIV(authKey, msgKey);\r\n            var encryptedData = Utils.AesIge(dataWithPadding, keyIV.Item1, keyIV.Item2, true);\r\n\r\n            var authKeyId = TLUtils.GenerateLongAuthKeyId(authKey);\r\n\r\n            transportMessage.AuthKeyId = new TLLong(authKeyId);\r\n            transportMessage.MsgKey = msgKey;\r\n            transportMessage.Data = encryptedData;\r\n\r\n            return transportMessage;\r\n#endif\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            var response = new TLEncryptedTransportMessage();\r\n            response.AuthKeyId = GetObject<TLLong>(bytes, ref position);\r\n            response.MsgKey = bytes.SubArray(position, 16);\r\n\r\n            position += 16;\r\n            response.Data = bytes.SubArray(position, bytes.Length - position);\r\n            position = bytes.Length;\r\n            return response;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                AuthKeyId.ToBytes(),\r\n                MsgKey,\r\n                Data);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLExportedAuthorization.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLExportedAuthorization : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLExportedAuthorization;\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Bytes = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLExportedMessageLink.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLExportedMessageLink : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLExportedMessageLink;\r\n\r\n        public TLString Link { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Link = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n    public class TLExportedMessageLink74 : TLExportedMessageLink\r\n    {\r\n        public new const uint Signature = TLConstructors.TLExportedMessageLink74;\r\n\r\n        public TLString Html { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Link = GetObject<TLString>(bytes, ref position);\r\n            Html = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLFavedStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLFavedStickersBase : TLObject { }\r\n\r\n    public class TLFavedStickersNotModified : TLFavedStickersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFavedStickersNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLFavedStickers : TLFavedStickersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFavedStickers;\r\n\r\n        public virtual TLInt Hash { get; set; }\r\n\r\n        public TLVector<TLStickerPack> Packs { get; set; }\r\n\r\n        public TLVector<TLDocumentBase> Documents { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLInt>(bytes, ref position);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(bytes, ref position);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes(),\r\n                Packs.ToBytes(),\r\n                Documents.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hash = GetObject<TLInt>(input);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Hash.ToStream(output);\r\n            Packs.ToStream(output);\r\n            Documents.ToStream(output);\r\n        }\r\n\r\n        public void AddSticker(TLDocumentBase document)\r\n        {\r\n            Documents.Insert(0, document);\r\n            Hash = TLUtils.GetFavedStickersHash(Documents);\r\n\r\n            var document54 = document as TLDocument54;\r\n            if (document54 != null)\r\n            {\r\n                var emoticon = document54.Emoticon;\r\n                if (!string.IsNullOrEmpty(emoticon))\r\n                {\r\n                    var added = false;\r\n                    for (var i = 0; i < Packs.Count; i++)\r\n                    {\r\n                        if (Packs[i].Emoticon.ToString() == emoticon)\r\n                        {\r\n                            var item = Packs[i].Documents.FirstOrDefault(x => x.Value == document54.Index);\r\n                            if (item == null)\r\n                            {\r\n                                Packs[i].Documents.Insert(0, document54.Id);\r\n                                added = true;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                    if (!added)\r\n                    {\r\n                        Packs.Insert(0, new TLStickerPack{ Emoticon = new TLString(emoticon), Documents = new TLVector<TLLong>{ document54.Id }});\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void RemoveSticker(TLDocumentBase document)\r\n        {\r\n            for (var i = 0; i < Documents.Count; i++)\r\n            {\r\n                if (Documents[i].Index == document.Index)\r\n                {\r\n                    Documents.RemoveAt(i);\r\n                    break;\r\n                }\r\n            }\r\n\r\n            Hash = TLUtils.GetFavedStickersHash(Documents);\r\n\r\n            var document54 = document as TLDocument54;\r\n            if (document54 != null)\r\n            {\r\n                var emoticon = document54.Emoticon;\r\n                if (!string.IsNullOrEmpty(emoticon))\r\n                {\r\n                    for (var i = 0; i < Packs.Count; i++)\r\n                    {\r\n                        if (Packs[i].Emoticon.ToString() == emoticon)\r\n                        {\r\n                            for (int j = 0; j < Packs[i].Documents.Count; j++)\r\n                            {\r\n                                if (Packs[i].Documents[j].Value == document54.Index)\r\n                                {\r\n                                    Packs[i].Documents.RemoveAt(j);\r\n                                    break;\r\n                                }\r\n                            }\r\n\r\n                            if (Packs[i].Documents.Count == 0)\r\n                            {\r\n                                Packs.RemoveAt(i);\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLFeaturedStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLFeaturedStickersBase : TLObject { }\r\n\r\n    public class TLFeaturedStickersNotModified : TLFeaturedStickersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFeaturedStickersNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLFeaturedStickers : TLFeaturedStickersBase, IStickers\r\n    {\r\n        public const uint Signature = TLConstructors.TLFeaturedStickers;\r\n\r\n        public TLInt HashValue { get; set; }\r\n\r\n        public TLVector<TLStickerSetCoveredBase> SetsCovered { get; set; }\r\n\r\n        public TLVector<TLStickerSetBase> Sets\r\n        {\r\n            get\r\n            {\r\n                var sets = new TLVector<TLStickerSetBase>();\r\n                foreach (var setCovered in SetsCovered)\r\n                {\r\n                    sets.Add(setCovered.StickerSet);\r\n                }\r\n                return sets;\r\n            }\r\n            set\r\n            {\r\n                Execute.ShowDebugMessage(\"TLFeaturedStickers.Sets set\");\r\n            }\r\n        } \r\n\r\n        public TLVector<TLLong> Unread { get; set; }\r\n\r\n        public TLVector<TLStickerPack> Packs { get; set; }\r\n\r\n        public TLVector<TLDocumentBase> Documents { get; set; }\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        public TLVector<TLMessagesStickerSet> MessagesStickerSets { get; set; } \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            HashValue = GetObject<TLInt>(bytes, ref position);\r\n            SetsCovered = GetObject<TLVector<TLStickerSetCoveredBase>>(bytes, ref position);\r\n            Unread = GetObject<TLVector<TLLong>>(bytes, ref position); \r\n            \r\n            Packs = new TLVector<TLStickerPack>();\r\n            Documents = new TLVector<TLDocumentBase>();\r\n            MessagesStickerSets = new TLVector<TLMessagesStickerSet>();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                HashValue.ToBytes(),\r\n                SetsCovered.ToBytes(),\r\n                Unread.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            HashValue = GetObject<TLInt>(input);\r\n            SetsCovered = GetObject<TLVector<TLStickerSetCoveredBase>>(input);\r\n            Unread = GetObject<TLVector<TLLong>>(input);\r\n\r\n            Packs = GetObject<TLVector<TLStickerPack>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n            MessagesStickerSets = GetObject<TLVector<TLMessagesStickerSet>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            HashValue.ToStream(output);\r\n            SetsCovered.ToStream(output);\r\n            Unread.ToStream(output);\r\n\r\n            Packs.ToStream(output);\r\n            Documents.ToStream(output);\r\n            MessagesStickerSets.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLFileBase : TLObject { }\r\n\r\n    public class TLFile : TLFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFile;\r\n\r\n        public TLFileTypeBase Type { get; set; }\r\n\r\n        public TLInt MTime { get; set; }\r\n\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLFileTypeBase>(bytes, ref position);\r\n            MTime = GetObject<TLInt>(bytes, ref position);\r\n            Bytes = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileCdnRedirect : TLFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileCdnRedirect;\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public TLString FileToken { get; set; }\r\n\r\n        public TLString EncryptionKey { get; set; }\r\n\r\n        public TLString EncryptionIV { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            FileToken = GetObject<TLString>(bytes, ref position);\r\n            EncryptionKey = GetObject<TLString>(bytes, ref position);\r\n            EncryptionIV = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileCdnRedirect76 : TLFileCdnRedirect\r\n    {\r\n        public new const uint Signature = TLConstructors.TLFileCdnRedirect76;\r\n\r\n        public TLVector<TLFileHash> FileHashes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            FileToken = GetObject<TLString>(bytes, ref position);\r\n            EncryptionKey = GetObject<TLString>(bytes, ref position);\r\n            EncryptionIV = GetObject<TLString>(bytes, ref position);\r\n            FileHashes = GetObject<TLVector<TLFileHash>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileCdnRedirect70 : TLFileCdnRedirect\r\n    {\r\n        public new const uint Signature = TLConstructors.TLFileCdnRedirect70;\r\n\r\n        public TLVector<TLCdnFileHash> CdnFileHashes { get; set; } \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            FileToken = GetObject<TLString>(bytes, ref position);\r\n            EncryptionKey = GetObject<TLString>(bytes, ref position);\r\n            EncryptionIV = GetObject<TLString>(bytes, ref position);\r\n            CdnFileHashes = GetObject<TLVector<TLCdnFileHash>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLCdnFileHash : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLCdnFileHash;\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Limit = GetObject<TLInt>(bytes, ref position);\r\n            Bytes = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileHash : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileHash;\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Limit = GetObject<TLInt>(bytes, ref position);\r\n            Bytes = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLFileLocation.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLFileLocationBase : TLObject//, IFileData\r\n    {\r\n        public TLLong VolumeId { get; set; }\r\n\r\n        public TLInt LocalId { get; set; }\r\n\r\n        public TLLong Secret { get; set; }\r\n\r\n        #region Additional\r\n\r\n        //public string SendingFileName { get; set; }\r\n        //public byte[] Buffer { get; set; }\r\n        //public byte[] Bytes { get; set; }\r\n        #endregion\r\n\r\n        public virtual void Update(TLFileLocationBase fileLocation)\r\n        {\r\n            if (fileLocation != null)\r\n            {\r\n                //if (Buffer == null || LocalId.Value != fileLocation.LocalId.Value)\r\n                //{\r\n                //    Buffer = fileLocation.Buffer;\r\n                //}\r\n\r\n                VolumeId = fileLocation.VolumeId;\r\n                LocalId = fileLocation.LocalId;\r\n                Secret = fileLocation.Secret;\r\n\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLFileLocationUnavailable : TLFileLocationBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileLocationUnavailable;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            VolumeId = GetObject<TLLong>(bytes, ref position);\r\n            LocalId = GetObject<TLInt>(bytes, ref position);\r\n            Secret = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature),\r\n                VolumeId.ToBytes(),\r\n                LocalId.ToBytes(),\r\n                Secret.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            VolumeId = GetObject<TLLong>(input);\r\n            LocalId = GetObject<TLInt>(input);\r\n            Secret = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(VolumeId.ToBytes());\r\n            output.Write(LocalId.ToBytes());\r\n            output.Write(Secret.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLFileLocationUnavailable=[volume_id={0}, local_id={1}, secret={2}]\", VolumeId.Value, LocalId.Value, Secret.Value);\r\n        }\r\n    }\r\n\r\n    public class TLFileLocation : TLFileLocationBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileLocation;\r\n        \r\n        public TLInt DCId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            VolumeId = GetObject<TLLong>(bytes, ref position);\r\n            LocalId = GetObject<TLInt>(bytes, ref position);\r\n            Secret = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature),\r\n                DCId.ToBytes(),\r\n                VolumeId.ToBytes(),\r\n                LocalId.ToBytes(),\r\n                Secret.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            DCId = GetObject<TLInt>(input);\r\n            VolumeId = GetObject<TLLong>(input);\r\n            LocalId = GetObject<TLInt>(input);\r\n            Secret = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(DCId.ToBytes());\r\n            output.Write(VolumeId.ToBytes());\r\n            output.Write(LocalId.ToBytes());\r\n            output.Write(Secret.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLFileLocation=[dc_id={0}, volume_id={1}, local_id={2}, secret={3}]\", DCId, VolumeId.Value, LocalId.Value, Secret.Value);\r\n        }\r\n\r\n        public override void Update(TLFileLocationBase baseFileLocation)\r\n        {\r\n            base.Update(baseFileLocation);\r\n\r\n            var fileLocation = baseFileLocation as TLFileLocation;\r\n            if (fileLocation != null)\r\n            {\r\n                DCId = fileLocation.DCId;\r\n            }\r\n        }\r\n\r\n        public TLInputFileLocation ToInputFileLocation()\r\n        {\r\n            return new TLInputFileLocation\r\n            {\r\n                LocalId = LocalId,\r\n                Secret = Secret,\r\n                VolumeId = VolumeId\r\n            };\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLFileType.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLFileTypeBase : TLObject { }\r\n\r\n    public class TLFileTypeUnknown : TLFileTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileTypeUnknown;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLFileTypeUnknown--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileTypeJpeg : TLFileTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileTypeJpeg;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLFileTypeJpeg--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileTypeGif : TLFileTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileTypeGif;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLFileTypeGif--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileTypePng : TLFileTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileTypePng;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLFileTypePng--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileTypeMp3 : TLFileTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileTypeMp3;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLFileTypeMp3--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileTypeMov : TLFileTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileTypeMov;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLFileTypeMov--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileTypePartial : TLFileTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileTypePartial;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLFileTypePartial--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileTypeMp4 : TLFileTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileTypeMp4;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLFileTypeMp4--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFileTypeWebp : TLFileTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFileTypeWebp;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLFileTypeWebp--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLForeignLink.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLForeignLinkBase : TLObject { }\r\n\r\n    public class TLForeignLinkUnknown : TLForeignLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLForeignLinkUnknown;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLForeignLinkRequested : TLForeignLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLForeignLinkRequested;\r\n\r\n        public TLBool HasPhone { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            HasPhone = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            HasPhone = GetObject<TLBool>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(HasPhone.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLForeignLinkMutual : TLForeignLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLForeignLinkMutual;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLFoundGif.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLFoundGifBase : TLObject { }\r\n\r\n    public class TLFoundGif : TLFoundGifBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFoundGif;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLString ThumbUrl { get; set; }\r\n\r\n        public TLString ContentUrl { get; set; }\r\n\r\n        public TLString ContentType { get; set; }\r\n\r\n        public TLInt W { get; set; }\r\n\r\n        public TLInt H { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            ThumbUrl = GetObject<TLString>(bytes, ref position);\r\n            ContentUrl = GetObject<TLString>(bytes, ref position);\r\n            ContentType = GetObject<TLString>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n            ThumbUrl = GetObject<TLString>(input);\r\n            ContentUrl = GetObject<TLString>(input);\r\n            ContentType = GetObject<TLString>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Url.ToStream(output);\r\n            ThumbUrl.ToStream(output);\r\n            ContentUrl.ToStream(output);\r\n            ContentType.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLFoundGifCached : TLFoundGifBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFoundGifCached;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLPhotoBase Photo { get; set; }\r\n\r\n        public TLDocumentBase Document { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            Document = GetObject<TLDocumentBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n            Photo = GetObject<TLPhotoBase>(input);\r\n            Document = GetObject<TLDocumentBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Url.ToStream(output);\r\n            Photo.ToStream(output);\r\n            Document.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLFoundGifs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLFoundGifs : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLFoundGifs;\r\n\r\n        public TLInt NextOffset { get; set; }\r\n\r\n        public TLVector<TLFoundGifBase> Results { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            NextOffset = GetObject<TLInt>(bytes, ref position);\r\n            Results = GetObject<TLVector<TLFoundGifBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            NextOffset = GetObject<TLInt>(input);\r\n            Results = GetObject<TLVector<TLFoundGifBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            NextOffset.ToStream(output);\r\n            Results.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLFutureSalt.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLFutureSalt : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLFutureSalt;\r\n\r\n        public TLInt ValidSince { get; set; }\r\n\r\n        public TLInt ValidUntil { get; set; }\r\n\r\n        public TLLong Salt { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLFutureSalt--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ValidSince = GetObject<TLInt>(bytes, ref position);\r\n            ValidUntil = GetObject<TLInt>(bytes, ref position);\r\n            Salt = GetObject<TLLong>(bytes, ref position);\r\n\r\n            TLUtils.WriteLine(\"ValidSince: \" + TLUtils.MessageIdString(ValidSince));\r\n            TLUtils.WriteLine(\"ValidUntil: \" + TLUtils.MessageIdString(ValidUntil));\r\n            TLUtils.WriteLine(\"Salt: \" + Salt);\r\n            \r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFutureSalts : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLFutureSalts;\r\n\r\n        public TLLong ReqMsgId { get; set; }\r\n\r\n        public TLInt Now { get; set; }\r\n\r\n        public TLVector<TLFutureSalt> Salts { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLFutureSalts--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ReqMsgId = GetObject<TLLong>(bytes, ref position);\r\n            Now = GetObject<TLInt>(bytes, ref position);\r\n\r\n            TLUtils.WriteLine(\"ReqMsgId: \" + ReqMsgId);\r\n            TLUtils.WriteLine(\"Now: \" + TLUtils.MessageIdString(Now));\r\n            TLUtils.WriteLine(\"Salts:\");\r\n\r\n            Salts = GetObject<TLVector<TLFutureSalt>>(bytes, ref position);\r\n\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLGame.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public enum GameFlags\r\n    {\r\n        Document = 0x1\r\n    }\r\n\r\n    public class TLGame : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLGame;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLString ShortName { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Description { get; set; }\r\n\r\n        public TLPhotoBase Photo { get; set; }\r\n\r\n        private TLDocumentBase _document;\r\n\r\n        public TLDocumentBase Document\r\n        {\r\n            get { return _document; }\r\n            set { SetField(out _document, value, ref _flags, (int) GameFlags.Document); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            ShortName = GetObject<TLString>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Description = GetObject<TLString>(bytes, ref position);\r\n            Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            Document = GetObject<TLDocumentBase>(Flags, (int) GameFlags.Document, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                ShortName.ToBytes(),\r\n                Title.ToBytes(),\r\n                Description.ToBytes(),\r\n                Photo.ToBytes(),\r\n                ToBytes(Document, Flags, (int) GameFlags.Document));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            ShortName = GetObject<TLString>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Description = GetObject<TLString>(input);\r\n\r\n            Photo = GetObject<TLPhotoBase>(input);\r\n            Document = GetObject<TLDocumentBase>(Flags, (int) GameFlags.Document, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            ShortName.ToStream(output);\r\n            Title.ToStream(output);\r\n            Description.ToStream(output);\r\n            Photo.ToStream(output);\r\n            ToStream(output, Document, Flags, (int) GameFlags.Document);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLGame id={0} short_name={1} title={2} description={3} photo={4} document={5}\", Id, ShortName, Title, Description, Photo, Document);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLGeoPoint.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Runtime.Serialization;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [KnownType(typeof(TLGeoPointEmpty))]\r\n    [KnownType(typeof(TLGeoPoint))]\r\n    [DataContract]\r\n    public abstract class TLGeoPointBase : TLObject { }\r\n\r\n    [DataContract]\r\n    public class TLGeoPointEmpty : TLGeoPointBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLGeoPointEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLGeoPoint82 : TLGeoPoint\r\n    {\r\n        public new const uint Signature = TLConstructors.TLGeoPoint82;\r\n\r\n        [DataMember]\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Long = GetObject<TLDouble>(bytes, ref position);\r\n            Lat = GetObject<TLDouble>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Long = GetObject<TLDouble>(input);\r\n            Lat = GetObject<TLDouble>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Long.ToBytes());\r\n            output.Write(Lat.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLGeoPoint82 [lat={0} long={1} access_hash={2}]\", Lat, Long, AccessHash);\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLGeoPoint : TLGeoPointBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLGeoPoint;\r\n\r\n        [DataMember]\r\n        public TLDouble Long { get; set; }\r\n\r\n        [DataMember]\r\n        public TLDouble Lat { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Long = GetObject<TLDouble>(bytes, ref position);\r\n            Lat = GetObject<TLDouble>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Long = GetObject<TLDouble>(input);\r\n            Lat = GetObject<TLDouble>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Long.ToBytes());\r\n            output.Write(Lat.ToBytes());\r\n        }\r\n\r\n        public string GetFileName()\r\n        {\r\n            return string.Format(\"staticmap{0}_{1}.jpg\", Lat.Value.ToString(new CultureInfo(\"en-US\")), Long.Value.ToString(new CultureInfo(\"en-US\")));\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLGeoPoint[lat={0} long={1}]\", Lat, Long);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLGzipPacked.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\n#if SILVERLIGHT\r\nusing SharpGIS;\r\n#else\r\nusing System.IO.Compression;\r\n#endif\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLGzipPacked : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLGzipPacked;\r\n\r\n        public TLString PackedData { get; set; }\r\n\r\n        public TLObject Data { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PackedData = GetObject<TLString>(bytes, ref position);\r\n\r\n            var decopressedData = new byte[] {};\r\n            var compressedData = PackedData.Data;\r\n            var buffer = new byte[4096];\r\n            \r\n#if SILVERLIGHT\r\n            var hgs = new GZipInflateStream(new MemoryStream(compressedData));\r\n#else\r\n            var hgs = new GZipStream(new MemoryStream(compressedData), CompressionMode.Decompress); \r\n#endif\r\n\r\n            var bytesRead = hgs.Read(buffer, 0, buffer.Length);\r\n            while (bytesRead > 0)\r\n            {\r\n                decopressedData = TLUtils.Combine(decopressedData, buffer.SubArray(0, bytesRead));\r\n                bytesRead = hgs.Read(buffer, 0, buffer.Length);\r\n            }\r\n\r\n            bytesRead = 0;\r\n            Data = GetObject<TLObject>(decopressedData, ref bytesRead);\r\n            \r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLHashtagItem.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLHashtagItem : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLHashtagItem;\r\n\r\n        public TLString Hashtag { get; set; }\r\n\r\n        public TLHashtagItem()\r\n        {\r\n            \r\n        }\r\n\r\n        public TLHashtagItem(string hashtag)\r\n        {\r\n            Hashtag = new TLString(hashtag);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hashtag = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hashtag.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hashtag = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Hashtag.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Hashtag != null ? Hashtag.ToString() : string.Empty;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLHighScore.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLHighScore : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLHighScore;\r\n\r\n        public TLInt Pos { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLInt Score { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Pos.ToBytes(),\r\n                UserId.ToBytes(),\r\n                Score.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Pos = GetObject<TLInt>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Score = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Pos = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Score = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Pos.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Score.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLHighScores.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLHighScores : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLHighScores;\r\n\r\n        public TLVector<TLHighScore> HighScores { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                HighScores.ToBytes(),\r\n                Users.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            HighScores = GetObject<TLVector<TLHighScore>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            HighScores = GetObject<TLVector<TLHighScore>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            HighScores.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLImportedContact.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLImportedContact : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLImportedContact;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLLong ClientId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            ClientId = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLImportedContacts.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLImportedContacts : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLImportedContacts;\r\n\r\n        public TLVector<TLImportedContact> Imported { get; set; }\r\n\r\n        public TLVector<TLLong> RetryContacts { get; set; } \r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Imported = GetObject<TLVector<TLImportedContact>>(bytes, ref position);\r\n            RetryContacts = GetObject<TLVector<TLLong>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public virtual TLImportedContacts GetEmptyObject()\r\n        {\r\n            return new TLImportedContacts\r\n            {\r\n                Imported = new TLVector<TLImportedContact>(Imported.Count),\r\n                RetryContacts = new TLVector<TLLong>(RetryContacts.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLImportedContacts69 : TLImportedContacts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLImportedContacts69;\r\n\r\n        public TLVector<TLPopularContact> PopularInvites { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Imported = GetObject<TLVector<TLImportedContact>>(bytes, ref position);\r\n            PopularInvites = GetObject<TLVector<TLPopularContact>>(bytes, ref position);\r\n            RetryContacts = GetObject<TLVector<TLLong>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLImportedContacts GetEmptyObject()\r\n        {\r\n            return new TLImportedContacts69\r\n            {\r\n                Imported = new TLVector<TLImportedContact>(Imported.Count),\r\n                PopularInvites = new TLVector<TLPopularContact>(PopularInvites.Count),\r\n                RetryContacts = new TLVector<TLLong>(RetryContacts.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLImportedContacts imported={0} popular_invites={1} retry_contacts={2} users={3}\", Imported.Count, PopularInvites.Count, RetryContacts.Count, Users.Count);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInitConnection.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public enum InitConnectionFlags\r\n    {\r\n        Proxy = 0x1\r\n    }\r\n\r\n    public class TLInitConnection : TLObject\r\n    {\r\n        public const uint Signature = 0x69796de9;\r\n\r\n        public TLInt AppId { get; set; }\r\n\r\n        public TLString DeviceModel { get; set; }\r\n\r\n        public TLString SystemVersion { get; set; }\r\n\r\n        public TLString AppVersion { get; set; }\r\n\r\n        public TLString LangCode { get; set; }\r\n\r\n        public TLObject Data { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                AppId.ToBytes(),\r\n                DeviceModel.ToBytes(),\r\n                SystemVersion.ToBytes(),\r\n                AppVersion.ToBytes(),\r\n                LangCode.ToBytes(),\r\n                Data.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            AppId.ToStream(output);\r\n            DeviceModel.ToStream(output);\r\n            SystemVersion.ToStream(output);\r\n            AppVersion.ToStream(output);\r\n            LangCode.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            AppId = GetObject<TLInt>(input);\r\n            DeviceModel = GetObject<TLString>(input);\r\n            SystemVersion = GetObject<TLString>(input);\r\n            AppVersion = GetObject<TLString>(input);\r\n            LangCode = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"app_id={0} device_model={1} system_version={2} app_version={3} lang_code={4}\", AppId, DeviceModel, SystemVersion, AppVersion, LangCode);\r\n        }\r\n    }\r\n\r\n    public class TLInitConnection67 : TLInitConnection\r\n    {\r\n        public new const uint Signature = 0xc7481da6;\r\n\r\n        public TLString SystemLangCode { get; set; }\r\n\r\n        public TLString LangPack { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                AppId.ToBytes(),\r\n                DeviceModel.ToBytes(),\r\n                SystemVersion.ToBytes(),\r\n                AppVersion.ToBytes(),\r\n                SystemLangCode.ToBytes(),\r\n                LangPack.ToBytes(),\r\n                LangCode.ToBytes(),\r\n                Data.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            AppId.ToStream(output);\r\n            DeviceModel.ToStream(output);\r\n            SystemVersion.ToStream(output);\r\n            AppVersion.ToStream(output);\r\n            SystemLangCode.ToStream(output);\r\n            LangPack.ToStream(output);\r\n            LangCode.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            AppId = GetObject<TLInt>(input);\r\n            DeviceModel = GetObject<TLString>(input);\r\n            SystemVersion = GetObject<TLString>(input);\r\n            AppVersion = GetObject<TLString>(input);\r\n            SystemLangCode = GetObject<TLString>(input);\r\n            LangPack = GetObject<TLString>(input);\r\n            LangCode = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"app_id={0} device_model={1} system_version={2} app_version={3} system_lang_code={4} lang_pack={5} lang_code={6}\", AppId, DeviceModel, SystemVersion, AppVersion, SystemLangCode, LangPack, LangCode);\r\n        }\r\n    }\r\n\r\n    public class TLInitConnection78 : TLInitConnection67\r\n    {\r\n        public new const uint Signature = 0x785188b8;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        protected TLInputClientProxy _proxy;\r\n\r\n        public TLInputClientProxy Proxy\r\n        {\r\n            get { return _proxy; }\r\n            set { SetField(out _proxy, value, ref _flags, (int)InitConnectionFlags.Proxy); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                AppId.ToBytes(),\r\n                DeviceModel.ToBytes(),\r\n                SystemVersion.ToBytes(),\r\n                AppVersion.ToBytes(),\r\n                SystemLangCode.ToBytes(),\r\n                LangPack.ToBytes(),\r\n                LangCode.ToBytes(),\r\n                ToBytes(_proxy, _flags, (int)InitConnectionFlags.Proxy),\r\n                Data.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            AppId.ToStream(output);\r\n            DeviceModel.ToStream(output);\r\n            SystemVersion.ToStream(output);\r\n            AppVersion.ToStream(output);\r\n            SystemLangCode.ToStream(output);\r\n            LangPack.ToStream(output);\r\n            LangCode.ToStream(output);\r\n            ToStream(output, _proxy, _flags, (int)InitConnectionFlags.Proxy);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            AppId = GetObject<TLInt>(input);\r\n            DeviceModel = GetObject<TLString>(input);\r\n            SystemVersion = GetObject<TLString>(input);\r\n            AppVersion = GetObject<TLString>(input);\r\n            SystemLangCode = GetObject<TLString>(input);\r\n            LangPack = GetObject<TLString>(input);\r\n            LangCode = GetObject<TLString>(input);\r\n            _proxy = GetObject<TLInputClientProxy>(_flags, (int)InitConnectionFlags.Proxy, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"app_id={0} device_model={1} system_version={2} app_version={3} system_lang_code={4} lang_pack={5} lang_code={6} proxy=[{7}]\", AppId, DeviceModel, SystemVersion, AppVersion, SystemLangCode, LangPack, LangCode, Proxy);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInlineBotSwitchPM.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInlineBotSwitchPM : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLInlineBotSwitchPM;\r\n\r\n        public TLString Text { get; set; }\r\n\r\n        public TLString StartParam { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n            StartParam = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes(),\r\n                StartParam.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLString>(input);\r\n            StartParam = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Text.ToStream(output);\r\n            StartParam.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputAudio.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputAudioBase : TLObject { }\r\n\r\n    public class TLInputAudioEmpty : TLInputAudioBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputAudioEmpty;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputAudio : TLInputAudioBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputAudio;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputBotInlineMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum InputBotInlineMessageFlags\r\n    {\r\n        NoWebpage = 0x1,            // 0\r\n        Entities = 0x2,             // 1\r\n        ReplyMarkup = 0x4,          // 2\r\n    }\r\n\r\n    public abstract class TLInputBotInlineMessageBase : TLObject\r\n    {\r\n        public TLReplyKeyboardBase ReplyMarkup { get; set; }\r\n    }\r\n\r\n    public class TLInputBotInlineMessageMediaAuto75 : TLInputBotInlineMessageMediaAuto51\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputBotInlineMessageMediaAuto75;\r\n\r\n        protected TLVector<TLMessageEntityBase> _entities;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set { SetField(out _entities, value, ref _flags, (int)InputBotInlineMessageFlags.Entities); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(Entities, Flags, (int)InputBotInlineMessageFlags.Entities),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Caption = TLString.Empty;\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)InputBotInlineMessageFlags.Entities, null, input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)InputBotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Caption.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineMessageMediaAuto51 : TLInputBotInlineMessageMediaAuto\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputBotInlineMessageMediaAuto51;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)InputBotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Caption.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineMessageMediaAuto : TLInputBotInlineMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputBotInlineMessageMediaAuto;\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Caption.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineMessageText51 : TLInputBotInlineMessageText\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputBotInlineMessageText51;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(NoWebpage, Flags, (int)InputBotInlineMessageFlags.NoWebpage),\r\n                Message.ToBytes(),\r\n                ToBytes(Entities, Flags, (int)InputBotInlineMessageFlags.Entities),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            NoWebpage = GetObject<TLBool>(Flags, (int)InputBotInlineMessageFlags.NoWebpage, null, input);\r\n            Message = GetObject<TLString>(input);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)InputBotInlineMessageFlags.Entities, null, input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)InputBotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, NoWebpage, Flags, (int)InputBotInlineMessageFlags.NoWebpage);\r\n            Message.ToStream(output);\r\n            ToStream(output, Entities, Flags, (int)InputBotInlineMessageFlags.Entities);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineMessageText : TLInputBotInlineMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputBotInlineMessageText;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLBool NoWebpage { get; set; }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public TLVector<TLMessageEntityBase> Entities { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(NoWebpage, Flags, (int)InputBotInlineMessageFlags.NoWebpage),\r\n                Message.ToBytes(),\r\n                ToBytes(Entities, Flags, (int)InputBotInlineMessageFlags.Entities));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            NoWebpage = GetObject<TLBool>(Flags, (int)InputBotInlineMessageFlags.NoWebpage, null, input);\r\n            Message = GetObject<TLString>(input);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)InputBotInlineMessageFlags.Entities, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, NoWebpage, Flags, (int)InputBotInlineMessageFlags.NoWebpage);\r\n            Message.ToStream(output);\r\n            ToStream(output, Entities, Flags, (int)InputBotInlineMessageFlags.Entities);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineMessageMediaGeo : TLInputBotInlineMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputBotInlineMessageMediaGeo;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLGeoPointBase GeoPoint { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                GeoPoint.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            GeoPoint = GetObject<TLGeoPointBase>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)InputBotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            GeoPoint.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineMessageMediaVenue78 : TLInputBotInlineMessageMediaVenue\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputBotInlineMessageMediaVenue78;\r\n\r\n        public TLString VenueType { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                GeoPoint.ToBytes(),\r\n                Title.ToBytes(),\r\n                Address.ToBytes(),\r\n                Provider.ToBytes(),\r\n                VenueId.ToBytes(),\r\n                VenueType.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            GeoPoint = GetObject<TLGeoPointBase>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Address = GetObject<TLString>(input);\r\n            Provider = GetObject<TLString>(input);\r\n            VenueId = GetObject<TLString>(input);\r\n            VenueType = GetObject<TLString>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)InputBotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            GeoPoint.ToStream(output);\r\n            Title.ToStream(output);\r\n            Address.ToStream(output);\r\n            Provider.ToStream(output);\r\n            VenueId.ToStream(output);\r\n            VenueType.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineMessageMediaVenue : TLInputBotInlineMessageMediaGeo\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputBotInlineMessageMediaVenue;\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Address { get; set; }\r\n\r\n        public TLString Provider { get; set; }\r\n\r\n        public TLString VenueId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                GeoPoint.ToBytes(),\r\n                Title.ToBytes(),\r\n                Address.ToBytes(),\r\n                Provider.ToBytes(),\r\n                VenueId.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            GeoPoint = GetObject<TLGeoPointBase>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Address = GetObject<TLString>(input);\r\n            Provider = GetObject<TLString>(input);\r\n            VenueId = GetObject<TLString>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)InputBotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            GeoPoint.ToStream(output);\r\n            Title.ToStream(output);\r\n            Address.ToStream(output);\r\n            Provider.ToStream(output);\r\n            VenueId.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineMessageMediaContact82 : TLInputBotInlineMessageMediaContact\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputBotInlineMessageMediaContact82;\r\n\r\n        public TLString VCard { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                PhoneNumber.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                VCard.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            PhoneNumber = GetObject<TLString>(input);\r\n            FirstName = GetObject<TLString>(input);\r\n            LastName = GetObject<TLString>(input);\r\n            VCard = GetObject<TLString>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)InputBotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            PhoneNumber.ToStream(output);\r\n            FirstName.ToStream(output);\r\n            LastName.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineMessageMediaContact : TLInputBotInlineMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputBotInlineMessageMediaContact;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString FirstName { get; set; }\r\n\r\n        public TLString LastName { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                PhoneNumber.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            PhoneNumber = GetObject<TLString>(input);\r\n            FirstName = GetObject<TLString>(input);\r\n            LastName = GetObject<TLString>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)InputBotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            PhoneNumber.ToStream(output);\r\n            FirstName.ToStream(output);\r\n            LastName.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineMessageGame : TLInputBotInlineMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputBotInlineMessageGame;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            ReplyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)InputBotInlineMessageFlags.ReplyMarkup, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, ReplyMarkup, Flags, (int)InputBotInlineMessageFlags.ReplyMarkup);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputBotInlineMessageId.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInputBotInlineMessageId : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputBotInlineMessageId;\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            DCId.ToStream(output);\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            DCId = GetObject<TLInt>(input);\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputBotInlineResult.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum InputBotInlineResultFlags\r\n    {\r\n        //Unread = 0x1,         // 0\r\n        Title = 0x2,            // 1\r\n        Description = 0x4,      // 2\r\n        Url = 0x8,              // 3\r\n        Thumb = 0x10,        // 4\r\n        Content = 0x20,         // 5\r\n        Size = 0x40,            // 6\r\n        Duration = 0x80,        // 7\r\n    }\r\n\r\n    public abstract class TLInputBotInlineResultBase : TLObject { }\r\n\r\n    public class TLInputBotInlineResult : TLInputBotInlineResultBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputBotInlineResult;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLString Id { get; set; }\r\n\r\n        public TLString Type { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Description { get; set; }\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public virtual TLString ThumbUrl { get; protected set; }\r\n\r\n        public virtual TLString ContentUrl { get; protected set; }\r\n\r\n        public virtual TLString ContentType { get; protected set; }\r\n\r\n        public virtual TLInt W { get; protected set; }\r\n\r\n        public virtual TLInt H { get; protected set; }\r\n\r\n        public virtual TLInt Duration { get; protected set; }\r\n\r\n        public TLInputBotInlineMessageBase SendMessage { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                Type.ToBytes(),\r\n                ToBytes(Title, Flags, (int)InputBotInlineResultFlags.Title),\r\n                ToBytes(Description, Flags, (int)InputBotInlineResultFlags.Description),\r\n                ToBytes(Url, Flags, (int)InputBotInlineResultFlags.Url),\r\n                ToBytes(ThumbUrl, Flags, (int)InputBotInlineResultFlags.Thumb),\r\n                ToBytes(ContentUrl, Flags, (int)InputBotInlineResultFlags.Content),\r\n                ToBytes(ContentType, Flags, (int)InputBotInlineResultFlags.Content),\r\n                ToBytes(W, Flags, (int)InputBotInlineResultFlags.Size),\r\n                ToBytes(H, Flags, (int)InputBotInlineResultFlags.Size),\r\n                ToBytes(Duration, Flags, (int)InputBotInlineResultFlags.Duration),\r\n                SendMessage.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLString>(input);\r\n            Type = GetObject<TLString>(input);\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Title))\r\n            {\r\n                Title = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Description))\r\n            {\r\n                Description = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Url))\r\n            {\r\n                Url = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Thumb))\r\n            {\r\n                ThumbUrl = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Content))\r\n            {\r\n                ContentUrl = GetObject<TLString>(input);\r\n                ContentType = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Size))\r\n            {\r\n                W = GetObject<TLInt>(input);\r\n                H = GetObject<TLInt>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Duration))\r\n            {\r\n                Duration = GetObject<TLInt>(input);\r\n            }\r\n            SendMessage = GetObject<TLInputBotInlineMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            Type.ToStream(output);\r\n            ToStream(output, Title, Flags, (int) InputBotInlineResultFlags.Title);\r\n            ToStream(output, Description, Flags, (int)InputBotInlineResultFlags.Description);\r\n            ToStream(output, Url, Flags, (int)InputBotInlineResultFlags.Url);\r\n            ToStream(output, ThumbUrl, Flags, (int)InputBotInlineResultFlags.Thumb);\r\n            ToStream(output, ContentUrl, Flags, (int)InputBotInlineResultFlags.Content);\r\n            ToStream(output, ContentType, Flags, (int)InputBotInlineResultFlags.Content);\r\n            ToStream(output, W, Flags, (int)InputBotInlineResultFlags.Size);\r\n            ToStream(output, H, Flags, (int)InputBotInlineResultFlags.Size);\r\n            ToStream(output, Duration, Flags, (int)InputBotInlineResultFlags.Duration);\r\n            SendMessage.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineResult76 : TLInputBotInlineResult\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputBotInlineResult76;\r\n\r\n        public TLInputWebDocument Thumb { get; set; }\r\n\r\n        public override TLString ThumbUrl { get { return Thumb != null ? Thumb.Url : null; } }\r\n\r\n        public TLInputWebDocument Content { get; set; }\r\n\r\n        public override TLString ContentUrl { get { return Content != null ? Content.Url : null; } }\r\n\r\n        public override TLString ContentType { get { return Content != null ? Content.MimeType : null; } }\r\n\r\n        public override TLInt W\r\n        {\r\n            get { return Content != null ? Content.W : null; }\r\n        }\r\n\r\n        public override TLInt H\r\n        {\r\n            get { return Content != null ? Content.H : null; }\r\n        }\r\n\r\n        public override TLInt Duration\r\n        {\r\n            get { return Content != null ? Content.Duration : null; }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                Type.ToBytes(),\r\n                ToBytes(Title, Flags, (int)InputBotInlineResultFlags.Title),\r\n                ToBytes(Description, Flags, (int)InputBotInlineResultFlags.Description),\r\n                ToBytes(Url, Flags, (int)InputBotInlineResultFlags.Url),\r\n                ToBytes(Thumb, Flags, (int)InputBotInlineResultFlags.Thumb),\r\n                ToBytes(Content, Flags, (int)InputBotInlineResultFlags.Content),\r\n                SendMessage.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLString>(input);\r\n            Type = GetObject<TLString>(input);\r\n            Title = GetObject<TLString>(Flags, (int)InputBotInlineResultFlags.Title, null, input);\r\n            Description = GetObject<TLString>(Flags, (int)InputBotInlineResultFlags.Description, null, input);\r\n            Url = GetObject<TLString>(Flags, (int)InputBotInlineResultFlags.Url, null, input);\r\n            Thumb = GetObject<TLInputWebDocument>(Flags, (int)InputBotInlineResultFlags.Thumb, null, input);\r\n            Content = GetObject<TLInputWebDocument>(Flags, (int)InputBotInlineResultFlags.Content, null, input);\r\n            SendMessage = GetObject<TLInputBotInlineMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            Type.ToStream(output);\r\n            ToStream(output, Title, Flags, (int)InputBotInlineResultFlags.Title);\r\n            ToStream(output, Description, Flags, (int)InputBotInlineResultFlags.Description);\r\n            ToStream(output, Url, Flags, (int)InputBotInlineResultFlags.Url);\r\n            ToStream(output, Thumb, Flags, (int)InputBotInlineResultFlags.Thumb);\r\n            ToStream(output, Content, Flags, (int)InputBotInlineResultFlags.Content);\r\n            SendMessage.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineResultPhoto : TLInputBotInlineResultBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputBotInlineResultPhoto;\r\n\r\n        public TLString Id { get; set; }\r\n\r\n        public TLString Type { get; set; }\r\n\r\n        public TLInputPhotoBase Photo { get; set; }\r\n\r\n        public TLInputBotInlineMessageBase SendMessage { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Type.ToBytes(),\r\n                Photo.ToBytes(),\r\n                SendMessage.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLString>(input);\r\n            Type = GetObject<TLString>(input);\r\n            Photo = GetObject<TLInputPhotoBase>(input);\r\n            SendMessage = GetObject<TLInputBotInlineMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Type.ToStream(output);\r\n            Photo.ToStream(output);\r\n            SendMessage.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineResultDocument : TLInputBotInlineResultBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputBotInlineResultDocument;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLString Id { get; set; }\r\n\r\n        public TLString Type { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Description { get; set; }\r\n\r\n        public TLInputDocumentBase Document { get; set; }\r\n\r\n        public TLInputBotInlineMessageBase SendMessage { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                Type.ToBytes(),\r\n                ToBytes(Title, Flags, (int)InputBotInlineResultFlags.Title),\r\n                ToBytes(Description, Flags, (int)InputBotInlineResultFlags.Description),\r\n                Document.ToBytes(),\r\n                SendMessage.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLString>(input);\r\n            Type = GetObject<TLString>(input);\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Title))\r\n            {\r\n                Title = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)InputBotInlineResultFlags.Description))\r\n            {\r\n                Description = GetObject<TLString>(input);\r\n            }\r\n            Document = GetObject<TLInputDocumentBase>(input);\r\n            SendMessage = GetObject<TLInputBotInlineMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            Type.ToStream(output);\r\n            ToStream(output, Title, Flags, (int)InputBotInlineResultFlags.Title);\r\n            ToStream(output, Description, Flags, (int)InputBotInlineResultFlags.Description);\r\n            Document.ToStream(output);\r\n            SendMessage.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputBotInlineResultGame : TLInputBotInlineResultBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputBotInlineResultGame;\r\n\r\n        public TLString Id { get; set; }\r\n\r\n        public TLString ShortName { get; set; }\r\n\r\n        public TLInputBotInlineMessageBase SendMessage { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                ShortName.ToBytes(),\r\n                SendMessage.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLString>(input);\r\n            ShortName = GetObject<TLString>(input);\r\n            SendMessage = GetObject<TLInputBotInlineMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            ShortName.ToStream(output);\r\n            SendMessage.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputChatBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputChannelBase : TLObject { }\r\n\r\n    public class TLInputChannelEmpty : TLInputChannelBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputChannelEmpty;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLInputChannelEmpty\";\r\n        }\r\n    }\r\n\r\n    public class TLInputChannel : TLInputChannelBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputChannel;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChannelId.ToBytes(),\r\n                AccessHash.ToBytes()\r\n            );\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            ChannelId.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputChannel channel_id={0} access_hash={1}\", ChannelId, AccessHash);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputChatPhoto.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputChatPhotoBase : TLObject { }\r\n\r\n    public class TLInputChatPhotoEmpty : TLInputChatPhotoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputChatPhotoEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLInputChatUploadedPhoto56 : TLInputChatPhotoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputChatUploadedPhoto56;\r\n\r\n        public TLInputFile File { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            File = GetObject<TLInputFile>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputChatUploadedPhoto : TLInputChatPhotoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputChatUploadedPhoto;\r\n\r\n        public TLInputFile File { get; set; }\r\n\r\n        public TLInputPhotoCropBase Crop { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            File = GetObject<TLInputFile>(bytes, ref position);\r\n            Crop = GetObject<TLInputPhotoCropBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Crop.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputChatPhoto56 : TLInputChatPhotoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputChatPhoto;\r\n\r\n        public TLInputPhotoBase Id { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInputPhotoBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputChatPhoto : TLInputChatPhotoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputChatPhoto;\r\n\r\n        public TLInputPhotoBase Id { get; set; }\r\n\r\n        public TLInputPhotoCropBase Crop { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInputPhotoBase>(bytes, ref position);\r\n            Crop = GetObject<TLInputPhotoCropBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Crop.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputContact.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputContactBase : TLObject { }\r\n\r\n    public class TLInputContact : TLInputContactBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputContact;\r\n\r\n        public TLLong ClientId { get; set; }\r\n\r\n        public TLString Phone { get; set; }\r\n\r\n        public TLString FirstName { get; set; }\r\n\r\n        public TLString LastName { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ClientId.ToBytes(),\r\n                Phone.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} {1}, {2}, {3}\", FirstName, LastName, ClientId, Phone);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputDocument.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputDocumentBase : TLObject { }\r\n\r\n    public class TLInputDocumentEmpty : TLInputDocumentBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputDocumentEmpty;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLInputDocumentEmpty\";\r\n        }\r\n    }\r\n\r\n    public class TLInputDocument : TLInputDocumentBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputDocument;\r\n\r\n        public TLLong Id { get; set; }\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputDocument id={0}\", Id);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputEncryptedChat.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInputEncryptedChat : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputEncryptedChat;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            ChatId.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputEncryptedFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputEncryptedFileBase : TLObject { }\r\n\r\n    public class TLInputEncryptedFileEmpty : TLInputEncryptedFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputEncryptedFileEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLInputEncryptedFileUploaded : TLInputEncryptedFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputEncryptedFileUploaded;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLInt Parts { get; set; }\r\n\r\n        public TLString MD5Checksum { get; set; }\r\n\r\n        public TLInt KeyFingerprint { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Parts = GetObject<TLInt>(bytes, ref position);\r\n            MD5Checksum = GetObject<TLString>(bytes, ref position);\r\n            KeyFingerprint = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Parts.ToBytes(),\r\n                MD5Checksum.ToBytes(),\r\n                KeyFingerprint.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            Parts = GetObject<TLInt>(input);\r\n            MD5Checksum = GetObject<TLString>(input);\r\n            KeyFingerprint = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(Parts.ToBytes());\r\n            output.Write(MD5Checksum.ToBytes());\r\n            output.Write(KeyFingerprint.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputEncryptedFileBigUploaded : TLInputEncryptedFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputEncryptedFileBigUploaded;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLInt Parts { get; set; }\r\n\r\n        public TLInt KeyFingerprint { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Parts = GetObject<TLInt>(bytes, ref position);\r\n            KeyFingerprint = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Parts.ToBytes(),\r\n                KeyFingerprint.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            Parts = GetObject<TLInt>(input);\r\n            KeyFingerprint = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(Parts.ToBytes());\r\n            output.Write(KeyFingerprint.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputEncryptedFile : TLInputEncryptedFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputEncryptedFile;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputEncryptedFileBigUploaded.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputEncryptedFileLocation.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    \r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputFileBase : TLObject { }\r\n\r\n    public class TLInputFile : TLInputFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputFile;\r\n\r\n        public TLLong Id { get; set; }\r\n        public TLInt Parts { get; set; }\r\n        public TLString Name { get; set; }\r\n        public TLString MD5Checksum { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Parts = GetObject<TLInt>(bytes, ref position);\r\n            Name = GetObject<TLString>(bytes, ref position);\r\n            MD5Checksum = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Parts.ToBytes(),\r\n                Name.ToBytes(),\r\n                MD5Checksum.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            Parts = GetObject<TLInt>(input);\r\n            Name = GetObject<TLString>(input);\r\n            MD5Checksum = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Parts.ToStream(output);\r\n            Name.ToStream(output);\r\n            MD5Checksum.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputFileBig : TLInputFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputFileBig;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLInt Parts { get; set; }\r\n\r\n        public TLString Name { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Parts = GetObject<TLInt>(bytes, ref position);\r\n            Name = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Parts.ToBytes(),\r\n                Name.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputFileBig.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    \r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputFileLocation.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputFileLocationBase : TLObject\r\n    {\r\n        public abstract bool LocationEquals(TLInputFileLocationBase location);\r\n\r\n        public abstract string GetPartFileName(int partNumbert, string prefix = \"file\");\r\n\r\n        public abstract string GetFileName(string prefix = \"file\", string ext = \".dat\");\r\n\r\n        public abstract string GetLocationString();\r\n    }\r\n\r\n    public class TLInputFileLocation : TLInputFileLocationBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputFileLocation;\r\n\r\n        public TLLong VolumeId { get; set; }\r\n\r\n        public TLInt LocalId { get; set; }\r\n\r\n        public TLLong Secret { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                VolumeId.ToBytes(),\r\n                LocalId.ToBytes(),\r\n                Secret.ToBytes());\r\n        }\r\n\r\n        public override bool LocationEquals(TLInputFileLocationBase location)\r\n        {\r\n            if (location == null) return false;\r\n\r\n            var fileLocation = location as TLInputFileLocation;\r\n            if (fileLocation == null) return false;\r\n\r\n            return\r\n                VolumeId.Value == fileLocation.VolumeId.Value\r\n                && LocalId.Value == fileLocation.LocalId.Value\r\n                && Secret.Value == fileLocation.Secret.Value;\r\n        }\r\n\r\n        public override string GetPartFileName(int partNumbert, string prefix = \"file\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}_{2}_{3}.dat\", VolumeId.Value, LocalId.Value, Secret.Value, partNumbert);\r\n        }\r\n\r\n        public override string GetFileName(string prefix = \"file\", string ext = \".dat\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}_{2}{3}\", VolumeId.Value, LocalId.Value, Secret.Value, ext);\r\n        }\r\n\r\n        public override string GetLocationString()\r\n        {\r\n            return string.Format(\"volume_id={0} local_id={1}\", VolumeId, LocalId);\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLInputVideoFileLocation : TLInputFileLocationBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputVideoFileLocation;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override bool LocationEquals(TLInputFileLocationBase location)\r\n        {\r\n            if (location == null) return false;\r\n\r\n            var fileLocation = location as TLInputVideoFileLocation;\r\n            if (fileLocation == null) return false;\r\n\r\n            return\r\n                Id.Value == fileLocation.Id.Value\r\n                && AccessHash.Value == fileLocation.AccessHash.Value;\r\n        }\r\n\r\n        public override string GetPartFileName(int partNumbert, string prefix = \"video\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}_{2}.dat\", Id.Value, AccessHash.Value, partNumbert);\r\n        }\r\n\r\n        public override string GetFileName(string prefix = \"video\", string ext = \".dat\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}{2}\", Id.Value, AccessHash.Value, ext);\r\n        }\r\n\r\n        public override string GetLocationString()\r\n        {\r\n            return string.Format(\"id={0}\", Id);\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLInputAudioFileLocation : TLInputFileLocationBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputAudioFileLocation;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override bool LocationEquals(TLInputFileLocationBase location)\r\n        {\r\n            if (location == null) return false;\r\n\r\n            var fileLocation = location as TLInputAudioFileLocation;\r\n            if (fileLocation == null) return false;\r\n\r\n            return\r\n                Id.Value == fileLocation.Id.Value\r\n                && AccessHash.Value == fileLocation.AccessHash.Value;\r\n        }\r\n\r\n        public override string GetPartFileName(int partNumbert, string prefix = \"audio\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}_{2}.dat\", Id.Value, AccessHash.Value, partNumbert);\r\n        }\r\n\r\n        public override string GetFileName(string prefix = \"audio\", string ext = \".dat\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}{2}\", Id.Value, AccessHash.Value, ext);\r\n        }\r\n\r\n        public override string GetLocationString()\r\n        {\r\n            return string.Format(\"id={0}\", Id);\r\n        }\r\n    }\r\n\r\n    public class TLInputDocumentFileLocation : TLInputFileLocationBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputDocumentFileLocation;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override bool LocationEquals(TLInputFileLocationBase location)\r\n        {\r\n            if (location == null) return false;\r\n\r\n            var fileLocation = location as TLInputDocumentFileLocation;\r\n            if (fileLocation == null) return false;\r\n\r\n            return\r\n                Id.Value == fileLocation.Id.Value\r\n                && AccessHash.Value == fileLocation.AccessHash.Value;\r\n        }\r\n\r\n        public override string GetPartFileName(int partNumbert, string prefix = \"document\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}_{2}.dat\", Id.Value, AccessHash.Value, partNumbert);\r\n        }\r\n\r\n        public override string GetFileName(string prefix = \"document\", string ext = \".dat\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}{2}\", Id.Value, AccessHash.Value, ext);\r\n        }\r\n\r\n        public override string GetLocationString()\r\n        {\r\n            return string.Format(\"id={0}\", Id);\r\n        }\r\n    }\r\n\r\n    public class TLInputDocumentFileLocation54 : TLInputDocumentFileLocation\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputDocumentFileLocation54;\r\n\r\n        public TLInt Version { get; set; }\r\n        \r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Version.ToBytes());\r\n        }\r\n\r\n        public override bool LocationEquals(TLInputFileLocationBase location)\r\n        {\r\n            if (location == null) return false;\r\n\r\n            var fileLocation = location as TLInputDocumentFileLocation;\r\n            if (fileLocation == null) return false;\r\n\r\n            var fileLocation54 = location as TLInputDocumentFileLocation54;\r\n            if (fileLocation54 != null)\r\n            {\r\n                return\r\n                    Id.Value == fileLocation54.Id.Value\r\n                    && AccessHash.Value == fileLocation54.AccessHash.Value\r\n                    && Version.Value == fileLocation54.Version.Value;\r\n            }\r\n\r\n            return\r\n                Id.Value == fileLocation.Id.Value\r\n                && AccessHash.Value == fileLocation.AccessHash.Value;\r\n        }\r\n\r\n        public override string GetPartFileName(int partNumbert, string prefix = \"document\")\r\n        {\r\n            if (Version.Value > 0)\r\n            {\r\n                return string.Format(prefix + \"{0}_{1}_{2}.dat\", Id.Value, Version.Value, partNumbert);\r\n            }\r\n\r\n            return string.Format(prefix + \"{0}_{1}_{2}.dat\", Id.Value, AccessHash.Value, partNumbert);\r\n        }\r\n\r\n        public override string GetFileName(string prefix = \"document\", string ext = \".dat\")\r\n        {\r\n            if (Version.Value > 0)\r\n            {\r\n                return string.Format(prefix + \"{0}_{1}{2}\", Id.Value, Version.Value, ext);\r\n            }\r\n\r\n            return string.Format(prefix + \"{0}_{1}{2}\", Id.Value, AccessHash.Value, ext);\r\n        }\r\n\r\n        public override string GetLocationString()\r\n        {\r\n            return string.Format(\"id={0} version={1}\", Id, Version);\r\n        }\r\n    }\r\n\r\n    public class TLInputEncryptedFileLocation : TLInputFileLocationBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputEncryptedFileLocation;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override bool LocationEquals(TLInputFileLocationBase location)\r\n        {\r\n            if (location == null) return false;\r\n\r\n            var fileLocation = location as TLInputEncryptedFileLocation;\r\n            if (fileLocation == null) return false;\r\n\r\n            return\r\n                Id.Value == fileLocation.Id.Value\r\n                && AccessHash.Value == fileLocation.AccessHash.Value;\r\n        }\r\n\r\n        public override string GetPartFileName(int partNumbert, string prefix = \"encrypted\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}_{2}.dat\", Id.Value, AccessHash.Value, partNumbert);\r\n        }\r\n\r\n        public override string GetFileName(string prefix = \"encrypted\", string ext = \".dat\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}{2}\", Id.Value, AccessHash.Value, ext);\r\n        }\r\n\r\n        public override string GetLocationString()\r\n        {\r\n            return string.Format(\"id={0}\", Id);\r\n        }\r\n    }\r\n\r\n    public abstract class TLInputWebFileLocationBase : TLInputFileLocationBase\r\n    {\r\n        public TLLong AccessHash { get; set; }\r\n    }\r\n\r\n    public class TLInputWebFileGeoPointLocation : TLInputWebFileLocationBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputWebFileGeoPointLocation;\r\n\r\n        public TLInputGeoPointBase GeoPoint { get; set; }\r\n\r\n        public TLInt W { get; set; }\r\n\r\n        public TLInt H { get; set; }\r\n\r\n        public TLInt Zoom { get; set; }\r\n\r\n        public TLInt Scale { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                GeoPoint.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Zoom.ToBytes(),\r\n                Scale.ToBytes());\r\n        }\r\n\r\n        public override string GetPartFileName(int partNumbert, string prefix = \"map\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}_{2}_{3}_{4}_{5}_{6}.dat\", GeoPoint, AccessHash.Value, W, H, Zoom, Scale, partNumbert);\r\n        }\r\n\r\n        public override string GetFileName(string prefix = \"map\", string ext = \".dat\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}_{2}_{3}_{4}_{5}{6}\", GeoPoint, AccessHash.Value, W, H, Zoom, Scale, ext);\r\n        }\r\n\r\n        public override string GetLocationString()\r\n        {\r\n            return string.Format(\"point={0} w={1} h={2} zoom={3} scale={4}\", GeoPoint, W, H, Zoom, Scale);\r\n        }\r\n\r\n        public override bool LocationEquals(TLInputFileLocationBase locationBase)\r\n        {\r\n            if (locationBase == null) return false;\r\n\r\n            var location = locationBase as TLInputWebFileGeoPointLocation;\r\n            if (location == null) return false;\r\n\r\n            return\r\n                GeoPoint.GeoPointEquals(location.GeoPoint)\r\n                && AccessHash.Value == location.AccessHash.Value\r\n                && W.Value == location.W.Value\r\n                && H.Value == location.H.Value\r\n                && Zoom.Value == location.Zoom.Value\r\n                && Scale.Value == location.Scale.Value;\r\n        }\r\n    }\r\n\r\n    public class TLInputWebFileLocation : TLInputWebFileLocationBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputWebFileLocation;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Url.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override string GetPartFileName(int partNumbert, string prefix = \"url\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}_{2}.dat\", Url.ToString().GetHashCode(), AccessHash.Value, partNumbert);\r\n        }\r\n\r\n        public override string GetFileName(string prefix = \"url\", string ext = \".dat\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}{2}\", Url.ToString().GetHashCode(), AccessHash.Value, ext);\r\n        }\r\n\r\n        public override string GetLocationString()\r\n        {\r\n            return string.Format(\"id={0}\", Url.ToString().GetHashCode());\r\n        }\r\n\r\n        public override bool LocationEquals(TLInputFileLocationBase location)\r\n        {\r\n            if (location == null) return false;\r\n\r\n            var fileLocation = location as TLInputWebFileLocation;\r\n            if (fileLocation == null) return false;\r\n\r\n            return\r\n                Url.Value == fileLocation.Url.Value\r\n                && AccessHash.Value == fileLocation.AccessHash.Value;\r\n        }\r\n    }\r\n\r\n    public class TLInputSecureFileLocation : TLInputFileLocationBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputSecureFileLocation;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override bool LocationEquals(TLInputFileLocationBase location)\r\n        {\r\n            if (location == null) return false;\r\n\r\n            var fileLocation = location as TLInputSecureFileLocation;\r\n            if (fileLocation == null) return false;\r\n\r\n            return\r\n                Id.Value == fileLocation.Id.Value\r\n                && AccessHash.Value == fileLocation.AccessHash.Value;\r\n        }\r\n\r\n        public override string GetPartFileName(int partNumbert, string prefix = \"document\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}_{2}.dat\", Id.Value, AccessHash.Value, partNumbert);\r\n        }\r\n\r\n        public override string GetFileName(string prefix = \"document\", string ext = \".dat\")\r\n        {\r\n            return string.Format(prefix + \"{0}_{1}{2}\", Id.Value, AccessHash.Value, ext);\r\n        }\r\n\r\n        public override string GetLocationString()\r\n        {\r\n            return string.Format(\"id={0}\", Id);\r\n        }\r\n    }\r\n\r\n    public class TLInputTakeoutFileLocation : TLInputFileLocationBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputTakeoutFileLocation;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override bool LocationEquals(TLInputFileLocationBase location)\r\n        {\r\n            var fileLocation = location as TLInputSecureFileLocation;\r\n            if (fileLocation == null) return false;\r\n\r\n            return true;\r\n        }\r\n\r\n        public override string GetPartFileName(int partNumbert, string prefix = \"document\")\r\n        {\r\n            return string.Format(prefix + \"{0}.dat\", partNumbert);\r\n        }\r\n\r\n        public override string GetFileName(string prefix = \"document\", string ext = \".dat\")\r\n        {\r\n            return string.Format(prefix + \"{2}\", ext);\r\n        }\r\n\r\n        public override string GetLocationString()\r\n        {\r\n            return \"\";\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputGame.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputGameBase : TLObject { }\r\n\r\n    public class TLInputGameId : TLInputGameBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputGameId;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputGameId id={0} access_hash={1}\", Id, AccessHash);\r\n        }\r\n    }\r\n\r\n    public class TLInputGameShortName : TLInputGameBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputGameShortName;\r\n\r\n        public TLInputUserBase BotId { get; set; }\r\n\r\n        public TLString ShortName { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                BotId.ToBytes(),\r\n                ShortName.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            BotId = GetObject<TLInputUserBase>(input);\r\n            ShortName = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            BotId.ToStream(output);\r\n            ShortName.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputGameShortName bot_id={0} short_name={1}\", BotId, ShortName);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputGeoPoint.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Globalization;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputGeoPointBase : TLObject\r\n    {\r\n        public abstract bool GeoPointEquals(TLInputGeoPointBase locationGeoPoint);\r\n    }\r\n\r\n    public class TLInputGeoPointEmpty : TLInputGeoPointBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputGeoPointEmpty;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"empty\";\r\n        }\r\n\r\n        public override bool GeoPointEquals(TLInputGeoPointBase geoPointBase)\r\n        {\r\n            var geoPointEmpty = geoPointBase as TLInputGeoPointEmpty;\r\n            if (geoPointEmpty != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n    }\r\n\r\n    public class TLInputGeoPoint : TLInputGeoPointBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputGeoPoint;\r\n\r\n        public TLDouble Lat { get; set; }\r\n        public TLDouble Long { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Lat.ToBytes(),\r\n                Long.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Lat = GetObject<TLDouble>(input);\r\n            Long = GetObject<TLDouble>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Lat.ToStream(output);\r\n            Long.ToStream(output);\r\n        }\r\n\r\n        public string GetFileName()\r\n        {\r\n            return string.Format(\"staticmap{0}_{1}.jpg\", Lat.Value.ToString(new CultureInfo(\"en-US\")), Long.Value.ToString(new CultureInfo(\"en-US\")));\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0}_{1}\", Lat, Long);\r\n        }\r\n\r\n        public override bool GeoPointEquals(TLInputGeoPointBase geoPointBase)\r\n        {\r\n            var geoPoint = geoPointBase as TLInputGeoPoint;\r\n            if (geoPoint != null)\r\n            {\r\n                return \r\n                    Lat.Value == geoPoint.Lat.Value \r\n                    && Long.Value == geoPoint.Long.Value;\r\n            }\r\n\r\n            return false;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputMedia.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum InputMediaUploadedPhotoFlags\r\n    {\r\n        Stickers = 0x1,\r\n        TTLSeconds = 0x2\r\n    }\r\n\r\n    [Flags]\r\n    public enum InputMediaPhotoFlags\r\n    {\r\n        TTLSeconds = 0x1\r\n    }\r\n\r\n    [Flags]\r\n    public enum InputMediaUploadedDocumentFlags\r\n    {\r\n        Stickers = 0x1,\r\n        TTLSeconds = 0x2,\r\n        Thumb = 0x4,\r\n        NosoundVideo = 0x8,\r\n    }\r\n\r\n    [Flags]\r\n    public enum InputMediaDocumentFlags\r\n    {\r\n        TTLSeconds = 0x1,\r\n    }\r\n\r\n    [Flags]\r\n    public enum InputMediaPhotoExternalFlags\r\n    {\r\n        TTLSeconds = 0x1,\r\n    }\r\n\r\n    [Flags]\r\n    public enum InputMediaDocumentExternalFlags\r\n    {\r\n        TTLSeconds = 0x1,\r\n    }\r\n\r\n    [Flags]\r\n    public enum InputMediaInvoiceFlags\r\n    {\r\n        Photo = 0x1\r\n    }\r\n\r\n    public interface IInputMediaCaption\r\n    {\r\n        TLString Caption { get; set; }\r\n    }\r\n\r\n    public interface IInputTTLMedia\r\n    {\r\n        TLInt TTLSeconds { get; set; }\r\n    }\r\n\r\n    public abstract class TLInputMediaBase : TLObject\r\n    {\r\n#region Additional\r\n        public byte[] MD5Hash { get; set; }\r\n#endregion\r\n    }\r\n\r\n    public class TLInputMediaEmpty : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaEmpty;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedDocument : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaUploadedDocument;\r\n\r\n        public TLInputFileBase File { get; set; }\r\n\r\n        public TLString FileName { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                FileName.ToBytes(),\r\n                MimeType.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n            FileName = GetObject<TLString>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            FileName.ToStream(output);\r\n            MimeType.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedDocument22 : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaUploadedDocument22;\r\n\r\n        public TLInputFileBase File { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public TLVector<TLDocumentAttributeBase> Attributes { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedDocument75 : TLInputMediaUploadedDocument70\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedDocument75;\r\n        \r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                File.ToBytes(),\r\n                ToBytes(Thumb, Flags, (int)InputMediaUploadedDocumentFlags.Thumb),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes(),\r\n                ToBytes(Stickers, Flags, (int)InputMediaUploadedDocumentFlags.Stickers),\r\n                ToBytes(TTLSeconds, Flags, (int)InputMediaUploadedDocumentFlags.TTLSeconds));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            File = GetObject<TLInputFile>(input);\r\n            Thumb = GetObject<TLInputFileBase>(Flags, (int)InputMediaUploadedDocumentFlags.Thumb, null, input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n            Stickers = GetObject<TLVector<TLInputDocumentBase>>(Flags, (int)InputMediaUploadedDocumentFlags.Stickers, null, input);\r\n            TTLSeconds = GetObject<TLInt>(Flags, (int)InputMediaUploadedDocumentFlags.TTLSeconds, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            File.ToStream(output);\r\n            ToStream(output, Thumb, Flags, (int)InputMediaUploadedDocumentFlags.Thumb);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n            ToStream(output, Stickers, Flags, (int)InputMediaUploadedDocumentFlags.Stickers);\r\n            ToStream(output, TTLSeconds, Flags, (int)InputMediaUploadedDocumentFlags.TTLSeconds);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedDocument70 : TLInputMediaUploadedDocument56, IInputTTLMedia\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedDocument70;\r\n\r\n        private TLInputFileBase _thumb;\r\n\r\n        public TLInputFileBase Thumb\r\n        {\r\n            get { return _thumb; }\r\n            set { SetField(out _thumb, value, ref _flags, (int)InputMediaUploadedDocumentFlags.Thumb); }\r\n        }\r\n\r\n        private TLInt _ttlSeconds;\r\n\r\n        public TLInt TTLSeconds\r\n        {\r\n            get { return _ttlSeconds; }\r\n            set { SetField(out _ttlSeconds, value, ref _flags, (int)InputMediaUploadedDocumentFlags.TTLSeconds); }\r\n        }\r\n\r\n        public bool NosoundVideo\r\n        {\r\n            get { return IsSet(_flags, (int) InputMediaUploadedDocumentFlags.NosoundVideo); }\r\n            set { SetUnset(ref _flags, value, (int) InputMediaUploadedDocumentFlags.NosoundVideo); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                File.ToBytes(),\r\n                ToBytes(Thumb, Flags, (int)InputMediaUploadedDocumentFlags.Thumb),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(Stickers, Flags, (int)InputMediaUploadedDocumentFlags.Stickers),\r\n                ToBytes(TTLSeconds, Flags, (int)InputMediaUploadedDocumentFlags.TTLSeconds));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            File = GetObject<TLInputFile>(input);\r\n            Thumb = GetObject<TLInputFileBase>(Flags, (int)InputMediaUploadedDocumentFlags.Thumb, null, input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            Stickers = GetObject<TLVector<TLInputDocumentBase>>(Flags, (int)InputMediaUploadedDocumentFlags.Stickers, null, input);\r\n            TTLSeconds = GetObject<TLInt>(Flags, (int)InputMediaUploadedDocumentFlags.TTLSeconds, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            File.ToStream(output);\r\n            ToStream(output, Thumb, Flags, (int)InputMediaUploadedDocumentFlags.Thumb);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n            Caption.ToStream(output);\r\n            ToStream(output, Stickers, Flags, (int)InputMediaUploadedDocumentFlags.Stickers);\r\n            ToStream(output, TTLSeconds, Flags, (int)InputMediaUploadedDocumentFlags.TTLSeconds);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedDocument56 : TLInputMediaUploadedDocument45\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedDocument56;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLVector<TLInputDocumentBase> _stickers;\r\n\r\n        public TLVector<TLInputDocumentBase> Stickers\r\n        {\r\n            get { return _stickers; }\r\n            set { SetField(out _stickers, value, ref _flags, (int)InputMediaUploadedDocumentFlags.Stickers); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                File.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(Stickers, Flags, (int)InputMediaUploadedDocumentFlags.Stickers));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            File = GetObject<TLInputFile>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            Stickers = GetObject<TLVector<TLInputDocumentBase>>(Flags, (int)InputMediaUploadedDocumentFlags.Stickers, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            File.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n            Caption.ToStream(output);\r\n            ToStream(output, Stickers, Flags, (int)InputMediaUploadedDocumentFlags.Stickers);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedDocument45 : TLInputMediaBase, IAttributes, IInputMediaCaption\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaUploadedDocument45;\r\n\r\n        public TLInputFileBase File { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public TLVector<TLDocumentAttributeBase> Attributes { get; set; }\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedThumbDocument : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaUploadedThumbDocument;\r\n\r\n        public TLInputFileBase File { get; set; }\r\n\r\n        public TLInputFileBase Thumb { get; set; }\r\n\r\n        public TLString FileName { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                FileName.ToBytes(),\r\n                MimeType.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFileBase>(input);\r\n            Thumb = GetObject<TLInputFileBase>(input);\r\n            FileName = GetObject<TLString>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            FileName.ToStream(output);\r\n            MimeType.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedThumbDocument22 : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaUploadedThumbDocument22;\r\n\r\n        public TLInputFileBase File { get; set; }\r\n\r\n        public TLInputFileBase Thumb { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public TLVector<TLDocumentAttributeBase> Attributes { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFileBase>(input);\r\n            Thumb = GetObject<TLInputFileBase>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLInputMediaUploadedThumbDocument56 : TLInputMediaUploadedThumbDocument45\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedThumbDocument56;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLVector<TLInputDocumentBase> _stickers;\r\n\r\n        public TLVector<TLInputDocumentBase> Stickers\r\n        {\r\n            get { return _stickers; }\r\n            set { SetField(out _stickers, value, ref _flags, (int)InputMediaUploadedDocumentFlags.Stickers); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                File.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(Stickers, Flags, (int)InputMediaUploadedDocumentFlags.Stickers));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            File = GetObject<TLInputFileBase>(input);\r\n            Thumb = GetObject<TLInputFileBase>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            Stickers = GetObject<TLVector<TLInputDocumentBase>>(Flags, (int)InputMediaUploadedDocumentFlags.Stickers, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            File.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n            Caption.ToStream(output);\r\n            ToStream(output, Stickers, Flags, (int)InputMediaUploadedDocumentFlags.Stickers);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedThumbDocument45 : TLInputMediaBase, IAttributes, IInputMediaCaption\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaUploadedThumbDocument45;\r\n\r\n        public TLInputFileBase File { get; set; }\r\n\r\n        public TLInputFileBase Thumb { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public TLVector<TLDocumentAttributeBase> Attributes { get; set; }\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFileBase>(input);\r\n            Thumb = GetObject<TLInputFileBase>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaDocument : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaDocument;\r\n\r\n        public TLInputDocumentBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInputDocumentBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaDocument75 : TLInputMediaDocument70\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaDocument75;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                ToBytes(TTLSeconds, Flags, (int)InputMediaDocumentFlags.TTLSeconds));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInputDocumentBase>(input);\r\n            TTLSeconds = GetObject<TLInt>(Flags, (int)InputMediaDocumentFlags.TTLSeconds, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            ToStream(output, TTLSeconds, Flags, (int)InputMediaDocumentFlags.TTLSeconds);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaDocument70 : TLInputMediaDocument45, IInputTTLMedia\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaDocument70;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLInt _ttlSeconds;\r\n\r\n        public TLInt TTLSeconds\r\n        {\r\n            get { return _ttlSeconds; }\r\n            set { SetField(out _ttlSeconds, value, ref _flags, (int)InputMediaDocumentFlags.TTLSeconds); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(TTLSeconds, Flags, (int)InputMediaDocumentFlags.TTLSeconds));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInputDocumentBase>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            TTLSeconds = GetObject<TLInt>(Flags, (int)InputMediaDocumentFlags.TTLSeconds, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            Caption.ToStream(output);\r\n            ToStream(output, TTLSeconds, Flags, (int)InputMediaDocumentFlags.TTLSeconds);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaDocument45 : TLInputMediaBase, IInputMediaCaption\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaDocument45;\r\n\r\n        public TLInputDocumentBase Id { get; set; }\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInputDocumentBase>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedAudio : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaUploadedAudio;\r\n\r\n        public TLInputFile File { get; set; }\r\n\r\n        public TLInt Duration { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Duration.ToBytes(),\r\n                MimeType.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            Duration.ToStream(output);\r\n            MimeType.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaAudio : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaAudio;\r\n\r\n        public TLInputAudioBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedPhoto : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaUploadedPhoto;\r\n\r\n        public TLInputFileBase File { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedPhoto28 : TLInputMediaUploadedPhoto, IInputMediaCaption\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedPhoto28;\r\n\r\n        public TLString Caption { get; set; }\r\n   \r\n        public TLInputMediaUploadedPhoto28()\r\n        {\r\n            \r\n        }\r\n\r\n        public TLInputMediaUploadedPhoto28(TLInputMediaUploadedPhoto inputMediaUploadedPhoto, TLString caption)\r\n        {\r\n            File = inputMediaUploadedPhoto.File;\r\n            Caption = caption;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedPhoto56 : TLInputMediaUploadedPhoto28\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedPhoto56;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLVector<TLInputDocumentBase> _stickers;\r\n\r\n        public TLVector<TLInputDocumentBase> Stickers\r\n        {\r\n            get { return _stickers; }\r\n            set { SetField(out _stickers, value, ref _flags, (int)InputMediaUploadedPhotoFlags.Stickers); }\r\n        }\r\n\r\n        public TLInputMediaUploadedPhoto56()\r\n        {\r\n\r\n        }\r\n\r\n        public TLInputMediaUploadedPhoto56(TLInputMediaUploadedPhoto inputMediaUploadedPhoto, TLString caption, TLVector<TLInputDocumentBase> stickers)\r\n        {\r\n            Flags = new TLInt(0);\r\n            File = inputMediaUploadedPhoto.File;\r\n            Caption = caption;\r\n            Stickers = stickers;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                File.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(Stickers, Flags, (int)InputMediaUploadedPhotoFlags.Stickers));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            File = GetObject<TLInputFile>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            Stickers = GetObject<TLVector<TLInputDocumentBase>>(Flags, (int)InputMediaUploadedPhotoFlags.Stickers, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            File.ToStream(output);\r\n            Caption.ToStream(output);\r\n            ToStream(output, Stickers, Flags, (int)InputMediaUploadedPhotoFlags.Stickers);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedPhoto70 : TLInputMediaUploadedPhoto56, IInputTTLMedia\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedPhoto70;\r\n\r\n        private TLInt _ttlSeconds;\r\n\r\n        public TLInt TTLSeconds\r\n        {\r\n            get { return _ttlSeconds; }\r\n            set { SetField(out _ttlSeconds, value, ref _flags, (int)InputMediaUploadedPhotoFlags.TTLSeconds); }\r\n        }\r\n\r\n        public TLInputMediaUploadedPhoto70()\r\n        {\r\n\r\n        }\r\n\r\n        public TLInputMediaUploadedPhoto70(TLInputMediaUploadedPhoto inputMediaUploadedPhoto, TLString caption, TLVector<TLInputDocumentBase> stickers)\r\n        {\r\n            Flags = new TLInt(0);\r\n            File = inputMediaUploadedPhoto.File;\r\n            Caption = caption;\r\n            Stickers = stickers;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                File.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(Stickers, Flags, (int)InputMediaUploadedPhotoFlags.Stickers),\r\n                ToBytes(TTLSeconds, Flags, (int)InputMediaUploadedPhotoFlags.TTLSeconds));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            File = GetObject<TLInputFile>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            Stickers = GetObject<TLVector<TLInputDocumentBase>>(Flags, (int)InputMediaUploadedPhotoFlags.Stickers, null, input);\r\n            TTLSeconds = GetObject<TLInt>(Flags, (int)InputMediaUploadedPhotoFlags.TTLSeconds, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            File.ToStream(output);\r\n            Caption.ToStream(output);\r\n            ToStream(output, Stickers, Flags, (int)InputMediaUploadedPhotoFlags.Stickers);\r\n            ToStream(output, TTLSeconds, Flags, (int)InputMediaUploadedPhotoFlags.TTLSeconds);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedPhoto75 : TLInputMediaUploadedPhoto70\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedPhoto75;\r\n\r\n        public TLInputMediaUploadedPhoto75()\r\n        {\r\n\r\n        }\r\n\r\n        public TLInputMediaUploadedPhoto75(TLInputMediaUploadedPhoto inputMediaUploadedPhoto, TLVector<TLInputDocumentBase> stickers)\r\n        {\r\n            Flags = new TLInt(0);\r\n            File = inputMediaUploadedPhoto.File;\r\n            Caption = TLString.Empty;\r\n            Stickers = stickers;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                File.ToBytes(),\r\n                ToBytes(Stickers, Flags, (int)InputMediaUploadedPhotoFlags.Stickers),\r\n                ToBytes(TTLSeconds, Flags, (int)InputMediaUploadedPhotoFlags.TTLSeconds));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            File = GetObject<TLInputFile>(input);\r\n            Stickers = GetObject<TLVector<TLInputDocumentBase>>(Flags, (int)InputMediaUploadedPhotoFlags.Stickers, null, input);\r\n            TTLSeconds = GetObject<TLInt>(Flags, (int)InputMediaUploadedPhotoFlags.TTLSeconds, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            File.ToStream(output);\r\n            ToStream(output, Stickers, Flags, (int)InputMediaUploadedPhotoFlags.Stickers);\r\n            ToStream(output, TTLSeconds, Flags, (int)InputMediaUploadedPhotoFlags.TTLSeconds);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaPhoto : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaPhoto;\r\n\r\n        public TLInputPhotoBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInputPhotoBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaPhoto28 : TLInputMediaPhoto, IInputMediaCaption\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaPhoto28;\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public TLInputMediaPhoto28()\r\n        {\r\n            \r\n        }\r\n\r\n        public TLInputMediaPhoto28(TLInputMediaPhoto inputMediaPhoto, TLString caption)\r\n        {\r\n            Id = inputMediaPhoto.Id;\r\n            Caption = caption;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInputPhotoBase>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaPhoto70 : TLInputMediaPhoto28, IInputTTLMedia\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaPhoto70;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLInt _ttlSeconds;\r\n\r\n        public TLInt TTLSeconds\r\n        {\r\n            get { return _ttlSeconds; }\r\n            set { SetField(out _ttlSeconds, value, ref _flags, (int)InputMediaPhotoFlags.TTLSeconds); }\r\n        }\r\n\r\n        public TLInputMediaPhoto70()\r\n        {\r\n\r\n        }\r\n\r\n        public TLInputMediaPhoto70(TLInputMediaPhoto inputMediaPhoto, TLString caption)\r\n        {\r\n            Flags = new TLInt(0);\r\n            Id = inputMediaPhoto.Id;\r\n            Caption = caption;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(TTLSeconds, Flags, (int) InputMediaPhotoFlags.TTLSeconds));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInputPhotoBase>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            TTLSeconds = GetObject<TLInt>(Flags, (int) InputMediaPhotoFlags.TTLSeconds, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            Caption.ToStream(output);\r\n            ToStream(output, TTLSeconds, Flags, (int)InputMediaPhotoFlags.TTLSeconds);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaPhoto75 : TLInputMediaPhoto70\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaPhoto75;\r\n\r\n        public TLInputMediaPhoto75()\r\n        {\r\n\r\n        }\r\n\r\n        public TLInputMediaPhoto75(TLInputMediaPhoto inputMediaPhoto)\r\n        {\r\n            Flags = new TLInt(0);\r\n            Id = inputMediaPhoto.Id;\r\n            Caption = TLString.Empty;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                ToBytes(TTLSeconds, Flags, (int)InputMediaPhotoFlags.TTLSeconds));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInputPhotoBase>(input);\r\n            Caption = TLString.Empty;\r\n            TTLSeconds = GetObject<TLInt>(Flags, (int)InputMediaPhotoFlags.TTLSeconds, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            ToStream(output, TTLSeconds, Flags, (int)InputMediaPhotoFlags.TTLSeconds);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaGeoPoint : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaGeoPoint;\r\n\r\n        public TLInputGeoPointBase GeoPoint { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                GeoPoint.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            GeoPoint = GetObject<TLInputGeoPointBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            GeoPoint.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaVenue : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaVenue;\r\n\r\n        public TLInputGeoPointBase GeoPoint { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Address { get; set; }\r\n\r\n        public TLString Provider { get; set; }\r\n\r\n        public TLString VenueId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                GeoPoint.ToBytes(),\r\n                Title.ToBytes(),\r\n                Address.ToBytes(),\r\n                Provider.ToBytes(),\r\n                VenueId.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            GeoPoint = GetObject<TLInputGeoPointBase>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Address = GetObject<TLString>(input);\r\n            Provider = GetObject<TLString>(input);\r\n            VenueId = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            GeoPoint.ToStream(output);\r\n            Title.ToStream(output);\r\n            Address.ToStream(output);\r\n            Provider.ToStream(output);\r\n            VenueId.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaVenue72 : TLInputMediaVenue\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaVenue72;\r\n\r\n        public TLString VenueType { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                GeoPoint.ToBytes(),\r\n                Title.ToBytes(),\r\n                Address.ToBytes(),\r\n                Provider.ToBytes(),\r\n                VenueId.ToBytes(),\r\n                VenueType.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            GeoPoint = GetObject<TLInputGeoPointBase>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Address = GetObject<TLString>(input);\r\n            Provider = GetObject<TLString>(input);\r\n            VenueId = GetObject<TLString>(input);\r\n            VenueType = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            GeoPoint.ToStream(output);\r\n            Title.ToStream(output);\r\n            Address.ToStream(output);\r\n            Provider.ToStream(output);\r\n            VenueId.ToStream(output);\r\n            VenueType.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaContact82 : TLInputMediaContact\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaContact82;\r\n\r\n        public TLString VCard { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                VCard.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PhoneNumber = GetObject<TLString>(input);\r\n            FirstName = GetObject<TLString>(input);\r\n            LastName = GetObject<TLString>(input);\r\n            VCard = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PhoneNumber.ToStream(output);\r\n            FirstName.ToStream(output);\r\n            LastName.ToStream(output);\r\n            VCard.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaContact : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaContact;\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString FirstName { get; set; }\r\n\r\n        public TLString LastName { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PhoneNumber = GetObject<TLString>(input);\r\n            FirstName = GetObject<TLString>(input);\r\n            LastName = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PhoneNumber.ToStream(output);\r\n            FirstName.ToStream(output);\r\n            LastName.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedVideo : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaUploadedVideo;\r\n\r\n        public TLInputFileBase File { get; set; }\r\n        public TLInt Duration { get; set; }\r\n        public TLInt W { get; set; }\r\n        public TLInt H { get; set; }\r\n        public TLString MimeType { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Duration.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                MimeType.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            Duration.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n            MimeType.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedVideo28 : TLInputMediaUploadedVideo, IInputMediaCaption\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedVideo28;\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Duration.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            Duration.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedVideo36 : TLInputMediaUploadedVideo28\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedVideo36;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Duration.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            Duration.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedThumbVideo : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaUploadedThumbVideo;\r\n\r\n        public TLInputFileBase File { get; set; }\r\n        public TLInputFile Thumb { get; set; }\r\n        public TLInt Duration { get; set; }\r\n        public TLInt W { get; set; }\r\n        public TLInt H { get; set; }\r\n        public TLString MimeType { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                Duration.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                MimeType.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n            Thumb = GetObject<TLInputFile>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            Duration.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n            MimeType.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedThumbVideo28 : TLInputMediaUploadedThumbVideo, IInputMediaCaption\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedThumbVideo28;\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                Duration.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n            Thumb = GetObject<TLInputFile>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            Duration.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaUploadedThumbVideo36 : TLInputMediaUploadedThumbVideo28\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaUploadedThumbVideo36;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                File.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                Duration.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            File = GetObject<TLInputFile>(input);\r\n            Thumb = GetObject<TLInputFile>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            File.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            Duration.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaVideo : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaVideo;\r\n\r\n        public TLInputVideoBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaVideo28 : TLInputMediaVideo, IInputMediaCaption\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaVideo28;\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaGifExternal : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaGifExternal;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLString Q { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Url.ToBytes(),\r\n                Q.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaPhotoExternal75 : TLInputMediaPhotoExternal70\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaPhotoExternal75;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Url.ToBytes(),\r\n                ToBytes(TTLSeconds, Flags, (int)InputMediaPhotoExternalFlags.TTLSeconds));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Url = GetObject<TLString>(input);\r\n            TTLSeconds = GetObject<TLInt>(Flags, (int)InputMediaPhotoFlags.TTLSeconds, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Url.ToStream(output);\r\n            ToStream(output, TTLSeconds, Flags, (int)InputMediaPhotoFlags.TTLSeconds);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaPhotoExternal70 : TLInputMediaPhotoExternal, IInputTTLMedia\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaPhotoExternal70;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLInt _ttlSeconds;\r\n\r\n        public TLInt TTLSeconds\r\n        {\r\n            get { return _ttlSeconds; }\r\n            set { SetField(out _ttlSeconds, value, ref _flags, (int)InputMediaPhotoExternalFlags.TTLSeconds); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Url.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(TTLSeconds, Flags, (int)InputMediaPhotoExternalFlags.TTLSeconds));\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaPhotoExternal : TLInputMediaBase, IInputMediaCaption\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaPhotoExternal;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Url.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaDocumentExternal75 : TLInputMediaDocumentExternal70\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaDocumentExternal75;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Url.ToBytes(),\r\n                ToBytes(TTLSeconds, Flags, (int)InputMediaDocumentExternalFlags.TTLSeconds));\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaDocumentExternal70 : TLInputMediaDocumentExternal, IInputTTLMedia\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaDocumentExternal70;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLInt _ttlSeconds;\r\n\r\n        public TLInt TTLSeconds\r\n        {\r\n            get { return _ttlSeconds; }\r\n            set { SetField(out _ttlSeconds, value, ref _flags, (int)InputMediaDocumentExternalFlags.TTLSeconds); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Url.ToBytes(),\r\n                Caption.ToBytes(),\r\n                ToBytes(TTLSeconds, Flags, (int)InputMediaDocumentExternalFlags.TTLSeconds));\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaDocumentExternal : TLInputMediaBase, IInputMediaCaption\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaDocumentExternal;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Url.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaGame : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaGame;\r\n\r\n        public TLInputGameBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInputGameBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaInvoice73 : TLInputMediaInvoice\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputMediaInvoice73;\r\n\r\n        public TLDataJSON ProviderData { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Title.ToBytes(),\r\n                Description.ToBytes(),\r\n                ToBytes(Photo, Flags, (int)InputMediaInvoiceFlags.Photo),\r\n                Invoice.ToBytes(),\r\n                Payload.ToBytes(),\r\n                Provider.ToBytes(),\r\n                ProviderData.ToBytes(),\r\n                StartParam.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Description = GetObject<TLString>(input);\r\n            Photo = GetObject<TLInputWebDocument>(Flags, (int)InputMediaInvoiceFlags.Photo, null, input);\r\n            Invoice = GetObject<TLInvoice>(input);\r\n            Payload = GetObject<TLString>(input);\r\n            Provider = GetObject<TLString>(input);\r\n            ProviderData = GetObject<TLDataJSON>(input);\r\n            StartParam = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Title.ToStream(output);\r\n            Description.ToStream(output);\r\n            ToStream(output, Photo, Flags, (int)InputMediaInvoiceFlags.Photo);\r\n            Invoice.ToStream(output);\r\n            Payload.ToStream(output);\r\n            Provider.ToStream(output);\r\n            ProviderData.ToStream(output);\r\n            StartParam.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaInvoice : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaInvoice;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Description { get; set; }\r\n\r\n        private TLInputWebDocument _photo;\r\n\r\n        public TLInputWebDocument Photo\r\n        {\r\n            get { return _photo; }\r\n            set { SetField(out _photo, value, ref _flags, (int) InputMediaInvoiceFlags.Photo); }\r\n        }\r\n\r\n        public TLInvoice Invoice { get; set; }\r\n\r\n        public TLString Payload { get; set; }\r\n\r\n        public TLString Provider { get; set; }\r\n\r\n        public TLString StartParam { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Title.ToBytes(),\r\n                Description.ToBytes(),\r\n                ToBytes(Photo, Flags, (int) InputMediaInvoiceFlags.Photo),\r\n                Invoice.ToBytes(),\r\n                Payload.ToBytes(),\r\n                Provider.ToBytes(),\r\n                StartParam.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Description = GetObject<TLString>(input);\r\n            Photo = GetObject<TLInputWebDocument>(Flags, (int) InputMediaInvoiceFlags.Photo, null, input);\r\n            Invoice = GetObject<TLInvoice>(input);\r\n            Payload = GetObject<TLString>(input);\r\n            Provider = GetObject<TLString>(input);\r\n            StartParam = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Title.ToStream(output);\r\n            Description.ToStream(output);\r\n            ToStream(output, Photo, Flags, (int) InputMediaInvoiceFlags.Photo);\r\n            Invoice.ToStream(output);\r\n            Payload.ToStream(output);\r\n            Provider.ToStream(output);\r\n            StartParam.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLInputMediaGeoLive : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMediaGeoLive;\r\n\r\n        public TLInputGeoPointBase GeoPoint { get; set; }\r\n\r\n        public TLInt Period { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                GeoPoint.ToBytes(),\r\n                Period.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            GeoPoint = GetObject<TLInputGeoPointBase>(input);\r\n            Period = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            GeoPoint.ToStream(output);\r\n            Period.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputMessageEntityMentionName.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    \r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputMessagesFilter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum InputMessagesFilterPhoneCallsFlags\r\n    {\r\n        Missed = 0x1,           // 0\r\n    }\r\n\r\n    public abstract class TLInputMessagesFilterBase : TLObject { }\r\n\r\n    public class TLInputMessagesFilterEmpty : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageFilterEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterPhoto : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageFilterPhoto;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterVideo : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageFilterVideo;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterPhotoVideo : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageFilterPhotoVideo;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterPhotoVideoDocument : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageFilterPhotoVideoDocument;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterDocument : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageFilterDocument;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterAudio : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageFilterAudio;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterAudioDocuments : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageFilterAudioDocuments;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterUrl : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageFilterUrl;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterGif : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessagesFilterGif;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterVoice : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessagesFilterVoice;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterMusic : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessagesFilterMusic;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterChatPhotos : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessagesFilterChatPhotos;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterPhoneCalls : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessagesFilterPhoneCalls;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Missed\r\n        {\r\n            get { return IsSet(Flags, (int) InputMessagesFilterPhoneCallsFlags.Missed); }\r\n            set { SetUnset(ref _flags, value, (int) InputMessagesFilterPhoneCallsFlags.Missed); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterRoundVoice : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessagesFilterRoundVoice;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterRoundVideo : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessagesFilterRoundVideo;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterMyMentions : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessagesFilterMyMentions;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterGeo : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessagesFilterGeo;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagesFilterContacts : TLInputMessagesFilterBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessagesFilterContacts;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputNotifyPeer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputNotifyPeerBase : TLObject { }\r\n\r\n    public class TLInputNotifyPeer : TLInputNotifyPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputNotifyPeer;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLInputPeerBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"inputNotifyPeer \" + Peer;\r\n        }\r\n    }\r\n\r\n    public class TLInputNotifyUsers : TLInputNotifyPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputNotifyUsers;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"inputNotifyUsers\";\r\n        }\r\n    }\r\n\r\n    public class TLInputNotifyChats : TLInputNotifyPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputNotifyChats;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"inputNotifyChats\";\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLInputNotifyAll : TLInputNotifyPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputNotifyAll;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"inputNotifyAll\";\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputPaymentCredentials.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum InputPaymentCredentials\r\n    {\r\n        Save = 0x1,            // 0\r\n    }\r\n\r\n    public abstract class TLInputPaymentCredentialsBase : TLObject { }\r\n\r\n    public class TLInputPaymentCredentialsSaved : TLInputPaymentCredentialsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPaymentCredentialsSaved;\r\n\r\n        public TLString Id { get; set; }\r\n\r\n        public TLString TmpPassword { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                TmpPassword.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputPaymentCredentials : TLInputPaymentCredentialsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPaymentCredentials;\r\n        \r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Save\r\n        {\r\n            get { return IsSet(Flags, (int) InputPaymentCredentials.Save); }\r\n            set { SetUnset(ref _flags, value, (int) InputPaymentCredentials.Save); }\r\n        }\r\n\r\n        public TLDataJSON Data { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Data.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputPaymentCredentialsApplePay : TLInputPaymentCredentialsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPaymentCredentialsApplePay;\r\n\r\n        public TLDataJSON PaymentData { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PaymentData.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputPaymentCredentialsAndroidPay : TLInputPaymentCredentialsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPaymentCredentialsAndroidPay;\r\n\r\n        public TLDataJSON PaymentToken { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PaymentToken.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputPaymentCredentialsAndroidPay74 : TLInputPaymentCredentialsAndroidPay\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputPaymentCredentialsAndroidPay74;\r\n\r\n        public TLString GoogleTransactionId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PaymentToken.ToBytes(),\r\n                GoogleTransactionId.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLInputPeer.cs",
    "content": "﻿using System.Linq;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    abstract class TLInputPeer : TLObject { }\r\n\r\n    class TLInputPeerEmpty : TLInputPeer\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLInputPeerEmpty--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLInputPeerEmpty\";\r\n        }\r\n    }\r\n\r\n    class TLInputPeerSelf : TLInputPeer\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerSelf;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLInputPeerSelf--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLInputPeerSelf\";\r\n        }\r\n    }\r\n\r\n    class TLInputPeerContact : TLInputPeer\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerContact;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLInputPeerContact--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature)\r\n                .Concat(UserId.ToBytes())\r\n                .ToArray();\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"UserId \" + UserId;\r\n        }\r\n    }\r\n\r\n    class TLInputPeerForeign : TLInputPeer\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerForeign;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLInputPeerForeign--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature)\r\n                .Concat(UserId.ToBytes())\r\n                .Concat(AccessHash.ToBytes())\r\n                .ToArray();\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"UserId \" + UserId + \" AccessHash \" + AccessHash;\r\n        }\r\n    }\r\n\r\n    class TLInputPeerChat : TLInputPeer\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerChat;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            TLUtils.WriteLine(\"--Parse TLInputPeerChat--\");\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature)\r\n                .Concat(ChatId.ToBytes())\r\n                .ToArray();\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"ChatId \" + ChatId;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputPeerBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputPeerBase : TLObject { }\r\n\r\n    public class TLInputPeerEmpty : TLInputPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerEmpty;\r\n\r\n        #region Additional\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLInt SelfId { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLInputPeerEmpty\";\r\n        }\r\n    }\r\n\r\n    public class TLInputPeerSelf : TLInputPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerSelf;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLInputPeerSelf\";\r\n        }\r\n    }\r\n\r\n    public class TLInputPeerContact : TLInputPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerContact;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(TLInputPeerUser.Signature),\r\n                UserId.ToBytes(),\r\n                new TLLong(0).ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            UserId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputPeerContact user_id={0}\", UserId);\r\n        }\r\n    }\r\n\r\n    public class TLInputPeerForeign : TLInputPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerForeign;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(TLInputPeerUser.Signature),\r\n                UserId.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            UserId.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputPeerForeign user_id={0} access_hash={1}\", UserId, AccessHash);\r\n        }\r\n    }\r\n\r\n    public class TLInputPeerChat : TLInputPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerChat;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            ChatId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputPeerChat chat_id={0}\", ChatId);\r\n        }\r\n    }\r\n\r\n    public class TLInputPeerBroadcast : TLInputPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerBroadcast;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            ChatId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputPeerBroadcast chat_id={0}\", ChatId);\r\n        }\r\n    }\r\n\r\n    public class TLInputPeerUser : TLInputPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerUser;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                UserId.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            UserId.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputPeerUser user_id={0} access_hash={1}\", UserId, AccessHash);\r\n        }\r\n    }\r\n\r\n    public class TLInputPeerChannel : TLInputPeerBroadcast\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputPeerChannel;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            ChatId.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputPeerChannel channel_id={0} access_hash={1}\", ChatId, AccessHash);\r\n        }\r\n    }\r\n\r\n    public class TLInputPeerFeed : TLInputPeerBroadcast\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputPeerFeed;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ChatId.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            ChatId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputPeerFeed feed_id={0}\", ChatId);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputPeerNotifyEvents.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputPeerNotifyEventsBase : TLObject { }\r\n\r\n    [Obsolete]\r\n    public class TLInputPeerNotifyEventsEmpty : TLInputPeerNotifyEventsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerNotifyEventsEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLInputPeerNotifyEventsAll : TLInputPeerNotifyEventsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerNotifyEventsAll;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputPeerNotifySettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInputPeerNotifySettings78 : TLInputPeerNotifySettings48\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputPeerNotifySettings78;\r\n\r\n        protected TLInt _muteUntil;\r\n\r\n        public override TLInt MuteUntil\r\n        {\r\n            get { return _muteUntil; }\r\n            set { SetField(out _muteUntil, value, ref _flags, (int)PeerNotifySettingsFlags.MuteUntil); }\r\n        }\r\n\r\n        protected TLString _sound;\r\n\r\n        public override TLString Sound\r\n        {\r\n            get { return _sound; }\r\n            set { SetField(out _sound, value, ref _flags, (int)PeerNotifySettingsFlags.Sound); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(ShowPreviews, Flags, (int)PeerNotifySettingsFlags.ShowPreviews),\r\n                ToBytes(Silent, Flags, (int)PeerNotifySettingsFlags.Silent),\r\n                ToBytes(MuteUntil, Flags, (int)PeerNotifySettingsFlags.MuteUntil),\r\n                ToBytes(Sound, Flags, (int)PeerNotifySettingsFlags.Sound));\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"mute_until={0} sound={1} show_previews={2} silent={3}\", MuteUntil, Sound, ShowPreviews, Silent);\r\n        }\r\n    }\r\n\r\n    public class TLInputPeerNotifySettings48 : TLInputPeerNotifySettings\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputPeerNotifySettings48;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLBool ShowPreviews\r\n        {\r\n            get { return new TLBool(IsSet(Flags, (int)PeerNotifySettingsFlags.ShowPreviews)); }\r\n            set { SetUnset(ref _flags, value != null && value.Value, (int)PeerNotifySettingsFlags.ShowPreviews); }\r\n        }\r\n\r\n        public TLBool Silent\r\n        {\r\n            get { return new TLBool(IsSet(Flags, (int)PeerNotifySettingsFlags.Silent)); }\r\n            set { SetUnset(ref _flags, value != null && value.Value, (int)PeerNotifySettingsFlags.Silent); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                MuteUntil.ToBytes(),\r\n                Sound.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"mute_until={0} sound={1} show_previews={2} silent={3}\", MuteUntil, Sound, ShowPreviews, Silent);\r\n        }\r\n    }\r\n\r\n    public class TLInputPeerNotifySettings : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPeerNotifySettings;\r\n\r\n        public virtual TLInt MuteUntil { get; set; }\r\n\r\n        public virtual TLString Sound { get; set; }\r\n\r\n        public virtual TLBool ShowPreviews { get; set; }\r\n\r\n        public TLInt EventsMask { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                MuteUntil.ToBytes(),\r\n                Sound.ToBytes(),\r\n                ShowPreviews.ToBytes(),\r\n                EventsMask.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"mute_until={0} sound={1} show_previews={2} events_mask={3}\", MuteUntil, Sound, ShowPreviews, EventsMask);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputPhoneCall.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInputPhoneCall : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPhoneCall;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputPhoto.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputPhotoBase : TLObject { }\r\n\r\n    public class TLInputPhotoEmpty : TLInputPhotoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPhotoEmpty;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLInputPhotoEmpty\";\r\n        }\r\n    }\r\n\r\n    public class TLInputPhoto : TLInputPhotoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPhoto;\r\n\r\n        public TLLong Id { get; set; }\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputPhoto id={0}\", Id);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputPhotoCrop.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputPhotoCropBase : TLObject { }\r\n\r\n    public class TLInputPhotoCropAuto : TLInputPhotoCropBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPhotoCropAuto;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputPhotoCrop : TLInputPhotoCropBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPhotoCrop;\r\n\r\n        public TLDouble CropLeft { get; set; }\r\n\r\n        public TLDouble CropTop { get; set; }\r\n\r\n        public TLDouble CropWidth { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            CropLeft = GetObject<TLDouble>(bytes, ref position);\r\n            CropTop = GetObject<TLDouble>(bytes, ref position);\r\n            CropWidth = GetObject<TLDouble>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                CropLeft.ToBytes(),\r\n                CropTop.ToBytes(),\r\n                CropWidth.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputPrivacyKey.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputPrivacyKeyBase : TLObject { }\r\n\r\n    public class TLInputPrivacyKeyStatusTimestamp : TLInputPrivacyKeyBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPrivacyKeyStatusTimestamp;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLInputPrivacyKeyChatInvite : TLInputPrivacyKeyBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPrivacyKeyChatInvite;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLInputPrivacyKeyPhoneCall : TLInputPrivacyKeyBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPrivacyKeyPhoneCall;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputPrivacyRule.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputPrivacyRuleBase : TLObject { }\r\n\r\n    public class TLInputPrivacyValueAllowContacts : TLInputPrivacyRuleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPrivacyValueAllowContacts;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLInputPrivacyValueAllowAll : TLInputPrivacyRuleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPrivacyValueAllowAll;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLInputPrivacyValueAllowUsers : TLInputPrivacyRuleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPrivacyValueAllowUsers;\r\n\r\n        public TLVector<TLInputUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Users = GetObject<TLVector<TLInputUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Users.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputPrivacyValueDisallowContacts : TLInputPrivacyRuleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPrivacyValueDisallowContacts;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLInputPrivacyValueDisallowAll : TLInputPrivacyRuleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPrivacyValueDisallowAll;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLInputPrivacyValueDisallowUsers : TLInputPrivacyRuleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputPrivacyValueDisallowUsers;\r\n\r\n        public TLVector<TLInputUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Users = GetObject<TLVector<TLInputUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Users.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputReportReason.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputReportReasonBase : TLObject { }\r\n\r\n    public class TLInputReportReasonSpam : TLInputReportReasonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputReportReasonSpam;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLInputReportReasonViolence : TLInputReportReasonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputReportReasonViolence;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLInputReportReasonPornography : TLInputReportReasonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputReportReasonPornography;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLInputReportReasonCopyright : TLInputReportReasonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputReportReasonCopyright;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLInputReportReasonOther : TLInputReportReasonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputReportReasonOther;\r\n\r\n        public TLString Text { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature), Text.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputSingleMedia.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum InputSingleMediaFlags\r\n    {\r\n        Entities = 0x1, // 0\r\n    }\r\n\r\n    public class TLInputSingleMedia76 : TLInputSingleMedia75\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputSingleMedia76;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Media.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                Message.ToBytes(),\r\n                ToBytes(Entities, Flags, (int)InputSingleMediaFlags.Entities));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Media = GetObject<TLInputMediaBase>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n            Message = GetObject<TLString>(input);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)InputSingleMediaFlags.Entities, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Media.ToStream(output);\r\n            RandomId.ToStream(output);\r\n            Message.ToStream(output);\r\n            ToStream(output, Entities, Flags, (int)InputSingleMediaFlags.Entities);\r\n        }\r\n    }\r\n\r\n    public class TLInputSingleMedia75 : TLInputSingleMedia\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputSingleMedia75;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        protected TLVector<TLMessageEntityBase> _entities;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set { SetField(out _entities, value, ref _flags, (int) InputSingleMediaFlags.Entities); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Media.ToBytes(),\r\n                Flags.ToBytes(),\r\n                RandomId.ToBytes(),\r\n                Message.ToBytes(),\r\n                ToBytes(Entities, Flags, (int) InputSingleMediaFlags.Entities));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Media = GetObject<TLInputMediaBase>(input);\r\n            Flags = GetObject<TLInt>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n            Message = GetObject<TLString>(input);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int) InputSingleMediaFlags.Entities, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Media.ToStream(output);\r\n            Flags.ToStream(output);\r\n            RandomId.ToStream(output);\r\n            Message.ToStream(output);\r\n            ToStream(output, Entities, Flags, (int) InputSingleMediaFlags.Entities);\r\n        }\r\n    }\r\n\r\n    public class TLInputSingleMedia : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputSingleMedia;\r\n\r\n        public TLInputMediaBase Media { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Media.ToBytes(),\r\n                RandomId.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Media = GetObject<TLInputMediaBase>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Media.ToStream(output);\r\n            RandomId.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputStickerSet.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputStickerSetBase : TLObject\r\n    {\r\n        public abstract string Name { get; }\r\n    }\r\n\r\n    public class TLInputStickerSetEmpty : TLInputStickerSetBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputStickerSetEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return GetType().Name;\r\n        }\r\n\r\n        public override string Name\r\n        {\r\n            get { return @\"tlg/empty\"; }\r\n        }\r\n    }\r\n\r\n    public class TLInputStickerSetId : TLInputStickerSetBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputStickerSetId;\r\n\r\n        public TLLong Id { get; set; }\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} Id={1}\", GetType().Name, Id);\r\n        }\r\n\r\n        public override string Name\r\n        {\r\n            get { return Id.ToString(); }\r\n        }\r\n    }\r\n\r\n    public class TLInputStickerSetShortName : TLInputStickerSetBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputStickerSetShortName;\r\n\r\n        public TLString ShortName { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ShortName = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                ShortName.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ShortName = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            ShortName.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} ShortName={1}\", GetType().Name, ShortName);\r\n        }\r\n\r\n        public override string Name\r\n        {\r\n            get { return ShortName.ToString(); }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputStickeredMedia.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputStickeredMediaBase : TLObject { }\r\n\r\n    public class TLInputStickeredMediaPhoto : TLInputStickeredMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputStickeredMediaPhoto;\r\n\r\n        public TLInputPhotoBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes()\r\n            );\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInputPhotoBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInputPhotoBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputStickeredMediaPhoto id=[{0}]\", Id);\r\n        }\r\n    }\r\n\r\n    public class TLInputStickeredMediaDocument : TLInputStickeredMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputStickeredMediaDocument;\r\n\r\n        public TLInputDocumentBase Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes()\r\n            );\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInputDocumentBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInputDocumentBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputStickeredMediaDocument id=[{0}]\", Id);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputUser.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public interface IInputUserId\r\n    {\r\n        TLInt UserId { get; set; }\r\n    }\r\n\r\n    public abstract class TLInputUserBase : TLObject\r\n    {\r\n    }\r\n\r\n    public class TLInputUserEmpty : TLInputUserBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputUserEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"user_id=empty\";\r\n        }\r\n    }\r\n\r\n    public class TLInputUserSelf : TLInputUserBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputUserSelf;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"user_id=self\";\r\n        }\r\n    }\r\n\r\n    public class TLInputUserContact : TLInputUserBase, IInputUserId\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputUserContact;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(TLInputUser.Signature),\r\n                UserId.ToBytes(),\r\n                new TLLong(0).ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            UserId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"user_id=\" + UserId;\r\n        }\r\n    }\r\n\r\n    public class TLInputUserForeign : TLInputUserBase, IInputUserId\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputUserForeign;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(TLInputUser.Signature),\r\n                UserId.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            UserId.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"user_id=\" + UserId;\r\n        }\r\n    }\r\n\r\n    public class TLInputUser : TLInputUserBase, IInputUserId\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputUser;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                UserId.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            UserId.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"user_id=\" + UserId;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputVideo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputVideoBase : TLObject { }\r\n\r\n    public class TLInputVideoEmpty : TLInputVideoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputVideoEmpty;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputVideo : TLInputVideoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputVideo;\r\n\r\n        public TLLong Id { get; set; }\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInputWebDocument.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInputWebDocument : TLInputDocumentBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputWebDocument;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public TLVector<TLDocumentAttributeBase> Attributes { get; set; }\r\n\r\n        public TLInt W\r\n        {\r\n            get\r\n            {\r\n                var attributeSize = Attributes.FirstOrDefault(x => x is IAttributeSize) as IAttributeSize;\r\n                if (attributeSize != null)\r\n                {\r\n                    return attributeSize.W;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public TLInt H\r\n        {\r\n            get\r\n            {\r\n                var attributeSize = Attributes.FirstOrDefault(x => x is IAttributeSize) as IAttributeSize;\r\n                if (attributeSize != null)\r\n                {\r\n                    return attributeSize.H;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public TLInt Duration\r\n        {\r\n            get\r\n            {\r\n                var attributeDuration = Attributes.FirstOrDefault(x => x is IAttributeDuration) as IAttributeDuration;\r\n                if (attributeDuration != null)\r\n                {\r\n                    return attributeDuration.Duration;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Url.ToBytes(),\r\n                Size.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Url.ToStream(output);\r\n            Size.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputWebDocument url={0}\", Url);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInt.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Runtime.Serialization;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [DataContract]\r\n    public class TLInt : TLObject\r\n    {\r\n        [DataMember]\r\n        public int Value { get; set; }\r\n\r\n        public TLInt() { }\r\n\r\n        public TLInt(int value)\r\n        {\r\n            Value = value;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            Value = BitConverter.ToInt32(bytes, position);\r\n            position += 4;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return BitConverter.GetBytes(Value);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            var buffer = new byte[4];\r\n            input.Read(buffer, 0, 4);\r\n            Value = BitConverter.ToInt32(buffer, 0);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(BitConverter.GetBytes(Value), 0, 4);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Value.ToString(CultureInfo.InvariantCulture);\r\n        }\r\n\r\n        private static readonly Random _random = new Random();\r\n\r\n        public static TLInt Random()\r\n        {\r\n            var randomNumber = new byte[4];\r\n            var random = _random;\r\n            random.NextBytes(randomNumber);\r\n            return new TLInt { Value = BitConverter.ToInt32(randomNumber, 0) };\r\n        }\r\n        \r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInt128.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInt128 : TLObject\r\n    {\r\n        public byte[] Value { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return Value;\r\n        }\r\n\r\n        public static TLInt128 Random()\r\n        {\r\n            var randomNumber = new byte[16];\r\n            var random = new SecureRandom();\r\n            random.NextBytes(randomNumber);\r\n            return new TLInt128{ Value = randomNumber };\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            Value = bytes.SubArray(position, 16);\r\n            position += 16;\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInt256.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInt256 : TLObject\r\n    {\r\n        public byte[] Value { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return Value;\r\n        }\r\n\r\n        public static TLInt256 Random()\r\n        {\r\n            var randomNumber = new byte[32];\r\n            var random = new Random();\r\n            random.NextBytes(randomNumber);\r\n            return new TLInt256 { Value = randomNumber };\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            Value = bytes.SubArray(position, 32);\r\n            position += 32;\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInviteText.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInviteText : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLInviteText;\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInvoice.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum InvoiceFlags\r\n    {\r\n        Test = 0x1,                         // 0\r\n        NameRequested = 0x2,                // 1\r\n        PhoneRequested = 0x4,               // 2\r\n        EmailRequested = 0x8,               // 3\r\n        ShippingAddressRequested = 0x10,    // 4\r\n        Flexible = 0x20,                    // 5\r\n    }\r\n\r\n    public class TLInvoice : TLInputMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInvoice;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLString Currency { get; set; }\r\n\r\n        public TLVector<TLLabeledPrice> Prices { get; set; }\r\n\r\n        public bool Test { get { return IsSet(Flags, (int) InvoiceFlags.Test); } }\r\n\r\n        public bool NameRequested { get { return IsSet(Flags, (int) InvoiceFlags.NameRequested); } }\r\n\r\n        public bool PhoneRequested { get { return IsSet(Flags, (int) InvoiceFlags.PhoneRequested); } }\r\n\r\n        public bool EmailRequested { get { return IsSet(Flags, (int) InvoiceFlags.EmailRequested); } }\r\n\r\n        public bool ShippingAddressRequested { get { return IsSet(Flags, (int) InvoiceFlags.ShippingAddressRequested); } }\r\n\r\n        public bool Flexible { get { return IsSet(Flags, (int) InvoiceFlags.Flexible); } }\r\n\r\n        #region Additional\r\n\r\n        public bool ReceiverRequested { get { return NameRequested || PhoneRequested || EmailRequested; } }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Currency = GetObject<TLString>(bytes, ref position);\r\n            Prices = GetObject<TLVector<TLLabeledPrice>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Currency.ToBytes(),\r\n                Prices.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Currency = GetObject<TLString>(input);\r\n            Prices = GetObject<TLVector<TLLabeledPrice>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Currency.ToStream(output);\r\n            Prices.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLInvokeAfterMsg.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInvokeAfterMsg : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLInvokeAfterMsg;\r\n\r\n        public TLLong MsgId { get; set; }\r\n\r\n        public TLObject Object { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                MsgId.ToBytes(),\r\n                Object.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLIpPort.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLIpPort : TLObject\r\n    {\r\n        public TLInt Ip { get; set; }\r\n\r\n        public TLInt Port { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLIpPort ip={0}({1}) port={2}\", GetIpString(), Ip, Port);\r\n        }\r\n\r\n        public string GetIpString()\r\n        {\r\n            var ip = Ip.ToBytes();\r\n\r\n            return string.Format(\"{0}.{1}.{2}.{3}\", ip[3], ip[2], ip[1], ip[0]);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            Ip = GetObject<TLInt>(bytes, ref position);\r\n            Port = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Ip = GetObject<TLInt>(input);\r\n            Port = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            Ip.ToStream(output);\r\n            Port.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLKeyboardButton.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum KeyboardButtonSwitchInlineFlags\r\n    {\r\n        SamePeer = 0x1,          // 0\r\n    }\r\n\r\n    public abstract class TLKeyboardButtonBase : TLObject\r\n    {\r\n        public TLString Text { get; set; }\r\n    }\r\n\r\n    public class TLKeyboardButton : TLKeyboardButtonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLKeyboardButton;\r\n\r\n        public TLKeyboardButton() { }\r\n\r\n        public TLKeyboardButton(TLString text)\r\n        {\r\n            Text = text;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLKeyboardButton text={0}\", Text);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Text.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLKeyboardButtonUrl : TLKeyboardButtonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLKeyboardButtonUrl;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLKeyboardButtonUrl text={0} url={1}\", Text, Url);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes(),\r\n                Url.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLString>(input);\r\n            Url = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Text.ToBytes());\r\n            output.Write(Url.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLKeyboardButtonCallback : TLKeyboardButtonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLKeyboardButtonCallback;\r\n\r\n        public TLString Data { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n            Data = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLKeyboardButtonCallback text={0} data={1}\", Text, Data);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes(),\r\n                Data.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLString>(input);\r\n            Data = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Text.ToBytes());\r\n            output.Write(Data.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLKeyboardButtonRequestPhone : TLKeyboardButtonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLKeyboardButtonRequestPhone;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLKeyboardButtonRequestPhone text={0}\", Text);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Text.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLKeyboardButtonRequestGeoLocation : TLKeyboardButtonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLKeyboardButtonRequestGeoLocation;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLKeyboardButtonRequestLocation text={0}\", Text);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Text.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLKeyboardButtonSwitchInline : TLKeyboardButtonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLKeyboardButtonSwitchInline;\r\n\r\n        public TLString Query { get; set; }\r\n\r\n        #region Additional\r\n        public TLUser Bot { get; set; }\r\n        #endregion\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLKeyboardButtonSwitchInline text={0} query={1}\", Text, Query);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n            Query = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes(),\r\n                Query.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLString>(input);\r\n            Query = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Text.ToBytes());\r\n            output.Write(Query.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLKeyboardButtonSwitchInline55 : TLKeyboardButtonSwitchInline\r\n    {\r\n        public new const uint Signature = TLConstructors.TLKeyboardButtonSwitchInline55;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public bool IsSamePeer { get { return IsSet(Flags, (int) KeyboardButtonSwitchInlineFlags.SamePeer); } }\r\n\r\n        public static string KeyboardButtonSwitchInlineFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (KeyboardButtonSwitchInlineFlags) flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLKeyboardButtonSwitchInline55 flags={0} text={1} query={2}\", KeyboardButtonSwitchInlineFlagsString(Flags), Text, Query);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n            Query = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Text.ToBytes(),\r\n                Query.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Text = GetObject<TLString>(input);\r\n            Query = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(Text.ToBytes());\r\n            output.Write(Query.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLKeyboardButtonGame : TLKeyboardButtonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLKeyboardButtonGame;\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLKeyboardButtonGame text={0}\", Text);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Text.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLKeyboardButtonBuy : TLKeyboardButtonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLKeyboardButtonBuy;\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLKeyboardButtonBuy text={0}\", Text);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Text.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLKeyboardButtonRow.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLKeyboardButtonRow : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLKeyboardButtonRow;\r\n\r\n        public TLVector<TLKeyboardButtonBase> Buttons { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Buttons = GetObject<TLVector<TLKeyboardButtonBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Buttons.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Buttons = GetObject<TLVector<TLKeyboardButtonBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Buttons.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLLabeledPrice.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLLabeledPrice : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLLabeledPrice;\r\n\r\n        public TLString Label { get; set; }\r\n\r\n        public TLLong Amount { get; set; }\r\n\r\n        #region Additional\r\n        public TLString Currency { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Label = GetObject<TLString>(bytes, ref position);\r\n            Amount = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Label.ToBytes(),\r\n                Amount.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Label = GetObject<TLString>(input);\r\n            Amount = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Label.ToStream(output);\r\n            Amount.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLLangPackDifference.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLLangPackDifference : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLLangPackDifference;\r\n\r\n        public TLString LangCode { get; set; }\r\n\r\n        public TLInt FromVersion { get; set; }\r\n\r\n        public TLInt Version { get; set; }\r\n\r\n        public TLVector<TLLangPackStringBase> Strings { get; set; } \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            LangCode = GetObject<TLString>(bytes, ref position);\r\n            FromVersion = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n            Strings = GetObject<TLVector<TLLangPackStringBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            LangCode.ToStream(output);\r\n            FromVersion.ToStream(output);\r\n            Version.ToStream(output);\r\n            Strings.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            LangCode = GetObject<TLString>(input);\r\n            FromVersion = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n            Strings = GetObject<TLVector<TLLangPackStringBase>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLLangPackLanguage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLLangPackLanguage : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLLangPackLanguage;\r\n\r\n        public TLString Name { get; set; }\r\n\r\n        public TLString NativeName { get; set; }\r\n\r\n        public TLString LangCode { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Name = GetObject<TLString>(bytes, ref position);\r\n            NativeName = GetObject<TLString>(bytes, ref position);\r\n            LangCode = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Name.ToStream(output);\r\n            NativeName.ToStream(output);\r\n            LangCode.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Name = GetObject<TLString>(input);\r\n            NativeName = GetObject<TLString>(input);\r\n            LangCode = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLLangPackString.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum LangPackStringPluralizedFlags\r\n    {\r\n        ZeroValue = 0x1,                // 0\r\n        OneValue = 0x2,                 // 1\r\n        TwoValue = 0x4,                 // 2\r\n        FewValue = 0x8,                 // 3\r\n        ManyValue = 0x10,               // 4\r\n        OtherValue = 0x20,              // 5\r\n    }\r\n\r\n    public abstract class TLLangPackStringBase : TLObject { }\r\n\r\n    public class TLLangPackString : TLLangPackStringBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLLangPackString;\r\n\r\n        public TLString Key { get; set; }\r\n\r\n        public TLString Value { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n            Value = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Key.ToStream(output);\r\n            Value.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Key = GetObject<TLString>(input);\r\n            Value = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLLangPackStringPluralized : TLLangPackStringBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLLangPackStringPluralized;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLString Key { get; set; }\r\n\r\n        private TLString _zeroValue;\r\n\r\n        public TLString ZeroValue\r\n        {\r\n            get { return _zeroValue; }\r\n            set { SetField(out _zeroValue, value, ref _flags, (int) LangPackStringPluralizedFlags.ZeroValue); }\r\n        }\r\n\r\n        private TLString _oneValue;\r\n\r\n        public TLString OneValue\r\n        {\r\n            get { return _oneValue; }\r\n            set { SetField(out _oneValue, value, ref _flags, (int)LangPackStringPluralizedFlags.OneValue); }\r\n        }\r\n\r\n        private TLString _twoValue;\r\n\r\n        public TLString TwoValue\r\n        {\r\n            get { return _twoValue; }\r\n            set { SetField(out _twoValue, value, ref _flags, (int)LangPackStringPluralizedFlags.TwoValue); }\r\n        }\r\n\r\n        private TLString _fewValue;\r\n\r\n        public TLString FewValue\r\n        {\r\n            get { return _fewValue; }\r\n            set { SetField(out _fewValue, value, ref _flags, (int)LangPackStringPluralizedFlags.FewValue); }\r\n        }\r\n\r\n        private TLString _manyValue;\r\n\r\n        public TLString ManyValue\r\n        {\r\n            get { return _manyValue; }\r\n            set { SetField(out _manyValue, value, ref _flags, (int)LangPackStringPluralizedFlags.ManyValue); }\r\n        }\r\n\r\n        private TLString _otherValue;\r\n\r\n        public TLString OtherValue\r\n        {\r\n            get { return _otherValue; }\r\n            set { SetField(out _otherValue, value, ref _flags, (int)LangPackStringPluralizedFlags.OtherValue); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n            ZeroValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.ZeroValue, null, bytes, ref position);\r\n            OneValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.OneValue, null, bytes, ref position);\r\n            TwoValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.TwoValue, null, bytes, ref position);\r\n            FewValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.FewValue, null, bytes, ref position);\r\n            ManyValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.ManyValue, null, bytes, ref position);\r\n            OtherValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.OtherValue, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Key.ToStream(output);\r\n            ToStream(output, ZeroValue, Flags, (int)LangPackStringPluralizedFlags.ZeroValue);\r\n            ToStream(output, OneValue, Flags, (int)LangPackStringPluralizedFlags.OneValue);\r\n            ToStream(output, TwoValue, Flags, (int)LangPackStringPluralizedFlags.TwoValue);\r\n            ToStream(output, FewValue, Flags, (int)LangPackStringPluralizedFlags.FewValue);\r\n            ToStream(output, ManyValue, Flags, (int)LangPackStringPluralizedFlags.ManyValue);\r\n            ToStream(output, OtherValue, Flags, (int)LangPackStringPluralizedFlags.OtherValue);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Key = GetObject<TLString>(input);\r\n            ZeroValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.ZeroValue, null, input);\r\n            OneValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.OneValue, null, input);\r\n            TwoValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.TwoValue, null, input);\r\n            FewValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.FewValue, null, input);\r\n            ManyValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.ManyValue, null, input);\r\n            OtherValue = GetObject<TLString>(Flags, (int)LangPackStringPluralizedFlags.OtherValue, null, input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLLangPackStringDeleted : TLLangPackStringBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLLangPackStringDeleted;\r\n\r\n        public TLString Key { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Key = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Key.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Key = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLLink.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLLinkBase : TLObject\r\n    {\r\n        public TLUserBase User { get; set; }\r\n    }\r\n\r\n    public class TLLink : TLLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLLink;\r\n\r\n        public TLMyLinkBase MyLink { get; set; }\r\n        public TLForeignLinkBase ForeignLink { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            MyLink = GetObject<TLMyLinkBase>(bytes, ref position);\r\n            ForeignLink = GetObject<TLForeignLinkBase>(bytes, ref position);\r\n            User = GetObject<TLUserBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            MyLink = GetObject<TLMyLinkBase>(input);\r\n            ForeignLink = GetObject<TLForeignLinkBase>(input);\r\n            User = GetObject<TLUserBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            MyLink.ToStream(output);\r\n            ForeignLink.ToStream(output);\r\n            User.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLLink24 : TLLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLLink24;\r\n\r\n        public TLContactLinkBase MyLink { get; set; }\r\n        public TLContactLinkBase ForeignLink { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            MyLink = GetObject<TLContactLinkBase>(bytes, ref position);\r\n            ForeignLink = GetObject<TLContactLinkBase>(bytes, ref position);\r\n            User = GetObject<TLUserBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            MyLink = GetObject<TLContactLinkBase>(input);\r\n            ForeignLink = GetObject<TLContactLinkBase>(input);\r\n            User = GetObject<TLUserBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            MyLink.ToStream(output);\r\n            ForeignLink.ToStream(output);\r\n            User.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLLong.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Runtime.Serialization;\r\nusing Org.BouncyCastle.Security;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [DataContract]\r\n    public class TLLong : TLObject\r\n    {\r\n        [DataMember]\r\n        public Int64 Value { get; set; }\r\n\r\n        public TLLong()\r\n        {\r\n            \r\n        }\r\n\r\n        public TLLong(long value)\r\n        {\r\n            Value = value;\r\n        }\r\n\r\n        private static readonly object _randomSyncRoot = new object();\r\n\r\n        private static Random _random;\r\n\r\n        public static TLLong Random()\r\n        {\r\n            //System.Diagnostics.Debug.WriteLine(\"TLLong.Random 1\");\r\n            var randomNumber = new byte[8];\r\n            lock (_randomSyncRoot)\r\n            {\r\n                //System.Diagnostics.Debug.WriteLine(\"TLLong.Random 2\");\r\n                if (_random == null)\r\n                {\r\n                    //System.Diagnostics.Debug.WriteLine(\"TLLong.Random 3\");\r\n                    _random = new Random(); // Note: SecureRandom doesnt work with Creators Update\r\n                    //System.Diagnostics.Debug.WriteLine(\"TLLong.Random 4\");\r\n                }\r\n\r\n                //System.Diagnostics.Debug.WriteLine(\"TLLong.Random 5\");\r\n                _random.NextBytes(randomNumber);\r\n            }\r\n\r\n            //System.Diagnostics.Debug.WriteLine(\"TLLong.Random 6\");\r\n\r\n            return new TLLong { Value = BitConverter.ToInt64(randomNumber, 0) };\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            Value = BitConverter.ToInt64(bytes, position);\r\n            position += 8;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return BitConverter.GetBytes(Value);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            var buffer = new byte[8];\r\n            input.Read(buffer, 0, 8);\r\n            Value = BitConverter.ToInt64(buffer, 0);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(BitConverter.GetBytes(Value), 0, 8);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Value.ToString(CultureInfo.InvariantCulture);// + \" \" + TLUtils.MessageIdString(this);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMaskCoords.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLMaskCoords : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLMaskCoords;\r\n\r\n        public TLInt N { get; set; }\r\n\r\n        public TLDouble X { get; set; }\r\n\r\n        public TLDouble Y { get; set; }\r\n\r\n        public TLDouble Zoom { get; set; }\r\n\r\n        public TLMaskCoords()\r\n        {\r\n\r\n        }\r\n\r\n        public TLMaskCoords(int n, double x, double y, double zoom)\r\n        {\r\n            N = new TLInt(n);\r\n            X = new TLDouble(x);\r\n            Y = new TLDouble(y);\r\n            Zoom = new TLDouble(zoom);\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                N.ToBytes(),\r\n                X.ToBytes(),\r\n                Y.ToBytes(),\r\n                Zoom.ToBytes()\r\n            );\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            N = GetObject<TLInt>(bytes, ref position);\r\n            X = GetObject<TLDouble>(bytes, ref position);\r\n            Y = GetObject<TLDouble>(bytes, ref position);\r\n            Zoom = GetObject<TLDouble>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            N.ToStream(output);\r\n            X.ToStream(output);\r\n            Y.ToStream(output);\r\n            Zoom.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            N = GetObject<TLInt>(input);\r\n            X = GetObject<TLDouble>(input);\r\n            Y = GetObject<TLDouble>(input);\r\n            Zoom = GetObject<TLDouble>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessage.Encrypted.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLEncryptedMessageBase : TLObject\r\n    {\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            RandomId = GetObject<TLLong>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Bytes = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLEncryptedMessage : TLEncryptedMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLEncryptedMessage;\r\n\r\n        public TLEncryptedFileBase File { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            base.FromBytes(bytes, ref position);\r\n            File = GetObject<TLEncryptedFileBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            RandomId.ToStream(output);\r\n            ChatId.ToStream(output);\r\n            Date.ToStream(output);\r\n            Bytes.ToStream(output);\r\n            File.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            RandomId = GetObject<TLLong>(input);\r\n            ChatId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Bytes = GetObject<TLString>(input);\r\n            File = GetObject<TLEncryptedFileBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLEncryptedMessageService : TLEncryptedMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLEncryptedMessageService;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            base.FromBytes(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            RandomId.ToStream(output);\r\n            ChatId.ToStream(output);\r\n            Date.ToStream(output);\r\n            Bytes.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            RandomId = GetObject<TLLong>(input);\r\n            ChatId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Bytes = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\n#if WIN_RT\r\nusing Windows.UI.Xaml;\r\n#endif\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing Telegram.Logs;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public enum MessageStatus\r\n    {\r\n        Sending = 1,\r\n        Confirmed = 0,\r\n        Failed = 2,\r\n        Read = 3,\r\n        Broadcast = 4,\r\n        Compressing = 5,\r\n    }\r\n\r\n    [Flags]\r\n    public enum MessageCustomFlags\r\n    {\r\n        FwdMessageId = 0x1,\r\n        FwdFromChannelPeer = 0x2,\r\n        BotInlineResult = 0x4,\r\n        Documents = 0x8,\r\n        InputPeer = 0x10,\r\n    }\r\n\r\n    [Flags]\r\n    public enum MessageFlags\r\n    {\r\n        Unread = 0x1,           // 0\r\n        Out = 0x2,              // 1\r\n        FwdFrom = 0x4,          // 2\r\n        ReplyToMsgId = 0x8,     // 3\r\n        Mentioned = 0x10,       // 4\r\n        MediaUnread = 0x20,     // 5\r\n        ReplyMarkup = 0x40,     // 6\r\n        Entities = 0x80,        // 7\r\n        FromId = 0x100,         // 8\r\n        Media = 0x200,          // 9\r\n        Views = 0x400,          // 10\r\n        ViaBotId = 0x800,       // 11\r\n\r\n        Silent = 0x2000,        // 13\r\n        Post = 0x4000,          // 14\r\n        EditDate = 0x8000,      // 15\r\n        PostAuthor = 0x10000,   // 16\r\n        GroupedId = 0x20000,    // 17\r\n    }\r\n\r\n    public interface IReplyToMsgId\r\n    {\r\n        TLInt ReplyToMsgId { get; set; }\r\n        TLMessageBase Reply { get; set; }\r\n        ReplyInfo ReplyInfo { get; }\r\n        TLPeerBase ToId { get; set; }\r\n    }\r\n\r\n    public abstract class TLMessageBase : TLObject, ISelectable\r\n    {\r\n        public virtual TLObject FwdFrom { get; set; }\r\n\r\n        public virtual Visibility ViaBotVisibility { get { return Visibility.Collapsed; } }\r\n\r\n        public virtual Visibility ReplyOrViaBotVisibility { get { return Visibility.Collapsed; } }\r\n\r\n        public virtual Visibility FwdViaBotVisibility { get { return Visibility.Collapsed; } }\r\n\r\n        public virtual TLUserBase ViaBot { get { return null; } }\r\n\r\n        public static string MessageFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (MessageFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public static string MessageCustomFlagsString(TLLong flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (MessageCustomFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public abstract int DateIndex { get; set; }\r\n\r\n        private TLLong _randomId;\r\n\r\n        public TLLong RandomId\r\n        {\r\n            get { return _randomId; }\r\n            set\r\n            {\r\n                _randomId = value;\r\n            }\r\n        }\r\n\r\n        public long RandomIndex\r\n        {\r\n            get { return RandomId != null ? RandomId.Value : 0; }\r\n            set { RandomId = new TLLong(value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Message Id\r\n        /// </summary>\r\n        public TLInt Id { get; set; }\r\n\r\n        public int Index\r\n        {\r\n            get { return Id != null ? Id.Value : 0; }\r\n            set { Id = new TLInt(value); }\r\n        }\r\n\r\n        public virtual void Update(TLMessageBase message)\r\n        {\r\n            Id = message.Id;\r\n            Status = message.Status;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"Id=\" + Index + \" RndId=\" + RandomIndex;\r\n        }\r\n\r\n        #region Additional\r\n\r\n        public string WebPageTitle { get; set; }\r\n\r\n        public bool NoWebpage { get; set; }\r\n\r\n        public virtual TLMessageBase Reply { get; set; }\r\n\r\n        public virtual ReplyInfo ReplyInfo\r\n        {\r\n            get { return null; }\r\n        }\r\n\r\n        public virtual Visibility ReplyVisibility { get { return Visibility.Collapsed; } }\r\n\r\n        public virtual double MediaWidth { get { return 12.0 + 311.0 + 12.0; } }\r\n\r\n        public MessageStatus _status;\r\n\r\n        public virtual MessageStatus Status\r\n        {\r\n            get { return _status; }\r\n            set { _status = value; }\r\n        }\r\n\r\n        public bool _isAnimated;\r\n\r\n        public virtual bool ShowFrom\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        private bool _isSelected;\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return _isSelected; }\r\n            set { SetField(ref _isSelected, value, () => IsSelected); }\r\n        }\r\n\r\n        public abstract Visibility SelectionVisibility { get; }\r\n\r\n        private bool _isHighlighted;\r\n\r\n        public bool IsHighlighted\r\n        {\r\n            get { return _isHighlighted; }\r\n            set { SetField(ref _isHighlighted, value, () => IsHighlighted); }\r\n        }\r\n\r\n        public virtual int MediaSize { get { return 0; } }\r\n\r\n        public virtual Visibility MediaSizeVisibility { get { return Visibility.Collapsed; } }\r\n\r\n        public virtual bool IsSelf()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public virtual bool IsAudioVideoMessage()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public virtual bool HasTTL()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public static bool HasTTL(TLMessageMediaBase mediaBase)\r\n        {\r\n            var mediaPhoto = mediaBase as TLMessageMediaPhoto70;\r\n            if (mediaPhoto != null\r\n                && mediaPhoto.TTLSeconds != null\r\n                && mediaPhoto.TTLSeconds.Value > 0)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var mediaDocument = mediaBase as TLMessageMediaDocument70;\r\n            if (mediaDocument != null\r\n                && mediaDocument.TTLSeconds != null\r\n                && mediaDocument.TTLSeconds.Value > 0)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public virtual bool IsExpired()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public static bool IsExpired(TLMessageMediaBase mediaBase)\r\n        {\r\n            var mediaPhoto = mediaBase as TLMessageMediaPhoto70;\r\n            if (mediaPhoto != null\r\n                && mediaPhoto.Photo == null\r\n                && mediaPhoto.TTLSeconds != null\r\n                && mediaPhoto.TTLSeconds.Value > 0)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var mediaDocument = mediaBase as TLMessageMediaDocument70;\r\n            if (mediaDocument != null\r\n                && mediaDocument.Document == null\r\n                && mediaDocument.TTLSeconds != null\r\n                && mediaDocument.TTLSeconds.Value > 0)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public virtual bool IsSticker()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public static bool IsSticker(TLDocumentBase document)\r\n        {\r\n#if WP8\r\n            var document22 = document as TLDocument22;\r\n            if (document22 != null\r\n                && document22.DocumentSize > 0\r\n                && document22.DocumentSize < Constants.StickerMaxSize)\r\n            {\r\n                var documentStickerAttribute = document22.Attributes.FirstOrDefault(x => x is TLDocumentAttributeSticker);\r\n\r\n                if (documentStickerAttribute != null\r\n                    && string.Equals(document22.MimeType.ToString(), \"image/webp\", StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool IsSticker(IAttributes attributes, TLInt size)\r\n        {\r\n#if WP8\r\n            if (size != null\r\n                && size.Value > 0\r\n                && size.Value < Constants.StickerMaxSize)\r\n            {\r\n                var documentStickerAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeSticker);\r\n\r\n                if (documentStickerAttribute != null)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public virtual bool IsGif()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public static bool IsGif(IAttributes attributes, TLInt size)\r\n        {\r\n#if WP8\r\n            if (size == null\r\n                || (size.Value > 0\r\n                    && size.Value < Constants.GifMaxSize))\r\n            {\r\n                var animatedAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAnimated);\r\n                var videoAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeVideo);\r\n                if (animatedAttribute != null\r\n                    && videoAttribute != null)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool IsGif(TLDocumentBase document)\r\n        {\r\n#if WP8\r\n            var document22 = document as TLDocument22;\r\n            if (document22 != null && TLString.Equals(document22.MimeType, new TLString(\"video/mp4\"), StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return IsGif(document22, document22.Size);\r\n            }\r\n\r\n            var documentExternal = document as TLDocumentExternal;\r\n            if (documentExternal != null\r\n                && string.Equals(documentExternal.Type.ToString(), \"gif\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return IsGif(documentExternal, null);\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public virtual bool IsMusic()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public static bool IsMusic(IAttributes attributes, TLInt size)\r\n        {\r\n#if WP8\r\n            if (size == null || size.Value > 0)\r\n            {\r\n                var audioAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio46) as TLDocumentAttributeAudio46;\r\n                if (audioAttribute != null && !audioAttribute.Voice)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool IsMusic(TLDocumentBase document)\r\n        {\r\n#if WP8\r\n            var document22 = document as TLDocument22;\r\n            if (document22 != null)\r\n            {\r\n                return IsMusic(document22, document22.Size);\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public virtual bool IsVoice()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public static bool IsVoice(IAttributes attributes, TLInt size)\r\n        {\r\n#if WP8\r\n            //if (size == null || size.Value > 0) // TLInlineBotResult non cached voice with unknown size\r\n            {\r\n                var audioAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio46) as TLDocumentAttributeAudio46;\r\n                if (audioAttribute != null && audioAttribute.Voice)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool IsVoice(TLDocumentBase document)\r\n        {\r\n#if WP8\r\n            var document22 = document as TLDocument22;\r\n            if (document22 != null)\r\n            {\r\n                return IsVoice(document22, document22.Size);\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public virtual bool IsRoundVideo()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public static bool IsRoundVideo(IAttributes attributes, TLInt size)\r\n        {\r\n#if WP8\r\n            if (size == null || size.Value > 0)\r\n            {\r\n                var videoAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeVideo66) as TLDocumentAttributeVideo66;\r\n                var animatedAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAnimated) as TLDocumentAttributeAnimated;\r\n                if (videoAttribute != null && animatedAttribute == null)\r\n                {\r\n                    return videoAttribute.RoundMessage;\r\n                }\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool IsRoundVideo(TLDocumentBase document)\r\n        {\r\n#if WP8\r\n            var document22 = document as TLDocument22;\r\n            if (document22 != null)\r\n            {\r\n                return IsRoundVideo(document22, document22.Size);\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public virtual bool IsVideo()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public static bool IsVideo(IAttributes attributes, TLInt size)\r\n        {\r\n#if WP8\r\n            if (size == null || size.Value > 0)\r\n            {\r\n                var videoAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeVideo) as TLDocumentAttributeVideo;\r\n                var animatedAttribute = attributes.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAnimated) as TLDocumentAttributeAnimated;\r\n                if (videoAttribute != null && animatedAttribute == null)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool IsVideo(TLDocumentBase document)\r\n        {\r\n#if WP8\r\n            var document22 = document as TLDocument22;\r\n            if (document22 != null)\r\n            {\r\n                return IsVideo(document22, document22.Size);\r\n            }\r\n#endif\r\n\r\n            return false;\r\n        }\r\n\r\n        public TLMessageBase Self { get { return this; } }\r\n\r\n        public bool ShowSeparator { get; set; }\r\n\r\n        #endregion\r\n\r\n        public virtual void Edit(TLMessageBase messageBase)\r\n        {\r\n\r\n        }\r\n    }\r\n\r\n    public class ReplyInfo\r\n    {\r\n        public TLInt ReplyToMsgId { get; set; }\r\n\r\n        public TLLong ReplyToRandomMsgId { get; set; }\r\n\r\n        public TLObject Reply { get; set; }\r\n    }\r\n\r\n    public abstract class TLMessageCommon : TLMessageBase\r\n    {\r\n        private TLInt _fromId;\r\n\r\n        public virtual TLInt FromId\r\n        {\r\n            get { return _fromId; }\r\n            set { _fromId = value; }\r\n        }\r\n\r\n        public TLPeerBase ToId { get; set; }\r\n\r\n        public virtual TLBool Out { get; set; }\r\n\r\n        private TLBool _unread;\r\n\r\n        public virtual void SetUnread(TLBool value)\r\n        {\r\n            _unread = value;\r\n        }\r\n\r\n        public virtual void SetUnreadSilent(TLBool value)\r\n        {\r\n            _unread = value;\r\n        }\r\n\r\n        public virtual TLBool Unread\r\n        {\r\n            get { return _unread; }\r\n            set\r\n            {\r\n                SetField(ref _unread, value, () => Unread);\r\n                NotifyOfPropertyChange(() => Status);\r\n            }\r\n        }\r\n\r\n        public bool IsChannelMessage\r\n        {\r\n            get\r\n            {\r\n                if (FromId == null || FromId.Value <= 0) return true;\r\n\r\n                if (ToId is TLPeerChannel)\r\n                {\r\n                    var cacheService = InMemoryCacheService.Instance;\r\n                    var channel = cacheService.GetChat(ToId.Id) as TLChannel;\r\n                    if (channel != null && channel.IsBroadcast) return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public override MessageStatus Status\r\n        {\r\n            get\r\n            {\r\n                if (_status == MessageStatus.Broadcast)\r\n                {\r\n                    return _status;\r\n                }\r\n\r\n                if (!Unread.Value)\r\n                {\r\n                    return MessageStatus.Read;\r\n                }\r\n\r\n                return _status;\r\n            }\r\n            set\r\n            {\r\n                if (_status == MessageStatus.Broadcast) return;\r\n                if (_status == MessageStatus.Read) return;\r\n\r\n                //System.Diagnostics.Debug.WriteLine(\"SetStatus hash={0} status={1}\", GetHashCode(), value);\r\n\r\n                SetField(ref _status, value, () => Status);\r\n            }\r\n        }\r\n\r\n        public override int DateIndex\r\n        {\r\n            get { return Date.Value; }\r\n            set { Date = new TLInt(value); }\r\n        }\r\n\r\n        public TLInt _date;\r\n\r\n        public TLInt Date\r\n        {\r\n            get { return _date; }\r\n            set { _date = value; }\r\n        }\r\n\r\n        public virtual Visibility ShareButtonVisibility { get { return Visibility.Collapsed; } }\r\n\r\n        public override bool IsSelf()\r\n        {\r\n            var peerUser = ToId as TLPeerUser;\r\n            if (peerUser != null)\r\n            {\r\n                return FromId.Value != -1 && FromId.Value == peerUser.Id.Value;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            string dateTimeString = null;\r\n            try\r\n            {\r\n                var clientDelta = MTProtoService.Instance.ClientTicksDelta;\r\n                //var utc0SecsLong = Date.Value * 4294967296 - clientDelta;\r\n                var utc0SecsInt = Date.Value - clientDelta / 4294967296.0;\r\n                DateTime? dateTime = Helpers.Utils.UnixTimestampToDateTime(utc0SecsInt);\r\n                dateTimeString = dateTime.Value.ToString(\"H:mm:ss dd.MM\");\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n            return base.ToString() + string.Format(\" [{0} {4}] FromId={1} ToId=[{2}] U={3} S={5}\", Date, FromId, ToId, Unread, dateTimeString, Status);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            FromId = GetObject<TLInt>(bytes, ref position);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n            Out = GetObject<TLBool>(bytes, ref position);\r\n            _unread = GetObject<TLBool>(bytes, ref position);\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n            Out = GetObject<TLBool>(input);\r\n            _unread = GetObject<TLBool>(input);\r\n            _date = GetObject<TLInt>(input);\r\n\r\n            var randomId = GetObject<TLLong>(input);\r\n            if (randomId.Value != 0)\r\n            {\r\n                RandomId = randomId;\r\n            }\r\n            var status = GetObject<TLInt>(input);\r\n            Status = (MessageStatus)status.Value;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(FromId.ToBytes());\r\n            ToId.ToStream(output);\r\n            output.Write(Out.ToBytes());\r\n            output.Write(Unread.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n\r\n            RandomId = RandomId ?? new TLLong(0);\r\n            RandomId.ToStream(output);\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n        }\r\n\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = (TLMessageCommon)message;\r\n            FromId = m.FromId;\r\n            ToId = m.ToId;\r\n            Out = m.Out;\r\n            if (Unread.Value != m.Unread.Value)\r\n            {\r\n                if (Unread.Value)\r\n                {\r\n                    _unread = m.Unread;\r\n                }\r\n            }\r\n            _date = m.Date;\r\n        }\r\n\r\n        #region Additional\r\n\r\n        protected TLObject _from;\r\n\r\n        public virtual TLObject From\r\n        {\r\n            get\r\n            {\r\n                if (_from != null) return _from;\r\n\r\n                var cacheService = InMemoryCacheService.Instance;\r\n\r\n                if (FromId == null || FromId.Value <= 0)\r\n                {\r\n                    _from = cacheService.GetChat(ToId.Id);\r\n                    return _from;\r\n                }\r\n                if (ToId is TLPeerChannel)\r\n                {\r\n                    var channel = cacheService.GetChat(ToId.Id) as TLChannel;\r\n                    if (channel != null && !channel.IsMegaGroup)\r\n                    {\r\n                        _from = channel;\r\n                        return _from;\r\n                    }\r\n                }\r\n\r\n                _from = cacheService.GetUser(FromId);\r\n                return _from;\r\n            }\r\n        }\r\n\r\n        protected TLObject _to;\r\n\r\n        public virtual TLObject To\r\n        {\r\n            get\r\n            {\r\n                if (_to != null) return _to;\r\n\r\n                var cacheService = InMemoryCacheService.Instance;\r\n\r\n                if (ToId is TLPeerUser)\r\n                {\r\n                    var user = cacheService.GetUser(ToId.Id);\r\n                    if (user != null)\r\n                    {\r\n                        _to = user;\r\n                        return _to;\r\n                    }\r\n                }\r\n                if (ToId is TLPeerChat)\r\n                {\r\n                    var chat = cacheService.GetChat(ToId.Id);\r\n                    if (chat != null)\r\n                    {\r\n                        _to = chat;\r\n                        return _to;\r\n                    }\r\n                }\r\n                if (ToId is TLPeerChannel)\r\n                {\r\n                    var channel = cacheService.GetChat(ToId.Id);\r\n                    if (channel != null)\r\n                    {\r\n                        _to = channel;\r\n                        return _to;\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n\r\n        public override bool ShowFrom\r\n        {\r\n            get\r\n            {\r\n                if (this is TLMessageService)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                if (FromId == null || FromId.Value <= 0)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                if (ToId is TLPeerChat) return true;\r\n\r\n                if (ToId is TLPeerChannel)\r\n                {\r\n                    var cacheService = InMemoryCacheService.Instance;\r\n                    var channel = cacheService.GetChat(ToId.Id) as TLChannel;\r\n                    if (channel != null && channel.IsMegaGroup) return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n        #endregion\r\n    }\r\n\r\n    public class TLMessageEmpty : TLMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEmpty;\r\n\r\n        public override int DateIndex { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return base.ToString() + \", TLMessageEmpty\";\r\n        }\r\n\r\n        public override Visibility SelectionVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            RandomId = GetObject<TLObject>(input) as TLLong;\r\n            var status = GetObject<TLInt>(input);\r\n            _status = (MessageStatus)status.Value;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id = Id ?? new TLInt(0);\r\n            output.Write(Id.ToBytes());\r\n\r\n            RandomId.NullableToStream(output);\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLMessagesContainter : TLMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessagesContainter;\r\n\r\n        public TLMessageMediaBase WebPageMedia { get; set; }\r\n\r\n        public TLVector<TLMessage25> FwdMessages { get; set; }\r\n\r\n        public bool WithMyScore { get; set; }\r\n\r\n        public TLMessage25 EditMessage { get; set; }\r\n\r\n        public int EditUntil { get; set; }\r\n\r\n        public string EditTimerString\r\n        {\r\n            get\r\n            {\r\n                var editUntil = EditUntil;\r\n                var now = TLUtils.DateToUniversalTimeTLInt(MTProtoService.Instance.ClientTicksDelta, DateTime.Now).Value;\r\n\r\n                if (editUntil < now)\r\n                {\r\n                    return string.Empty;\r\n                }\r\n\r\n                var timeSpan = TimeSpan.FromSeconds(editUntil - now);\r\n                if (timeSpan.TotalMinutes > 5.0)\r\n                {\r\n                    return string.Empty;\r\n                }\r\n\r\n                if (timeSpan.TotalDays > 1.0)\r\n                {\r\n                    return string.Format(\"({0})\", TimeSpan.FromSeconds(editUntil - now));\r\n                }\r\n\r\n                if (timeSpan.TotalHours > 1.0)\r\n                {\r\n                    return string.Format(\"({0:hh\\\\:mm\\\\:ss})\", TimeSpan.FromSeconds(editUntil - now));\r\n                }\r\n\r\n                return string.Format(\"({0:mm\\\\:ss})\", TimeSpan.FromSeconds(editUntil - now));\r\n            }\r\n        }\r\n\r\n        public override int DateIndex { get; set; }\r\n\r\n        public override Visibility SelectionVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public TLObject From\r\n        {\r\n            get\r\n            {\r\n                if (FwdMessages != null && FwdMessages.Count > 0)\r\n                {\r\n                    var fwdMessage48 = FwdMessages[0] as TLMessage48;\r\n                    if (fwdMessage48 != null)\r\n                    {\r\n                        var fwdHeader = fwdMessage48.FwdHeader;\r\n                        if (fwdHeader != null)\r\n                        {\r\n                            var cacheService = InMemoryCacheService.Instance;\r\n                            if (fwdHeader.ChannelId != null)\r\n                            {\r\n                                return cacheService.GetChat(fwdHeader.ChannelId);\r\n                            }\r\n\r\n                            if (fwdHeader.FromId != null)\r\n                            {\r\n                                return cacheService.GetUser(fwdHeader.FromId);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var fwdMessage = FwdMessages[0] as TLMessage40;\r\n                    if (fwdMessage != null)\r\n                    {\r\n                        var fwdPeer = fwdMessage.FwdFromPeer;\r\n                        if (fwdPeer != null)\r\n                        {\r\n                            var cacheService = InMemoryCacheService.Instance;\r\n                            if (fwdPeer is TLPeerChannel)\r\n                            {\r\n                                return cacheService.GetChat(fwdPeer.Id);\r\n                            }\r\n\r\n                            return cacheService.GetUser(fwdPeer.Id);\r\n                        }\r\n                    }\r\n\r\n                    return FwdMessages[0].FwdFrom;\r\n                }\r\n\r\n                if (EditMessage != null)\r\n                {\r\n                    var fwdMessage48 = EditMessage as TLMessage48;\r\n                    if (fwdMessage48 != null)\r\n                    {\r\n                        var fwdHeader = fwdMessage48.FwdHeader;\r\n                        if (fwdHeader != null)\r\n                        {\r\n                            var cacheService = InMemoryCacheService.Instance;\r\n                            if (fwdHeader.ChannelId != null)\r\n                            {\r\n                                return cacheService.GetChat(fwdHeader.ChannelId);\r\n                            }\r\n\r\n                            if (fwdHeader.FromId != null)\r\n                            {\r\n                                return cacheService.GetUser(fwdHeader.FromId);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    return EditMessage.From;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public TLString Message\r\n        {\r\n            get\r\n            {\r\n                if (FwdMessages != null && FwdMessages.Count > 0)\r\n                {\r\n                    return FwdMessages[0].Message;\r\n                }\r\n                if (EditMessage != null)\r\n                {\r\n                    return EditMessage.Message;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public TLMessageMediaBase Media\r\n        {\r\n            get\r\n            {\r\n                if (FwdMessages != null && FwdMessages.Count > 0)\r\n                {\r\n                    return FwdMessages[0].Media;\r\n                }\r\n                if (EditMessage != null)\r\n                {\r\n                    return EditMessage.Media;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessage73 : TLMessage70\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessage73;\r\n\r\n        protected TLLong _groupedId;\r\n\r\n        public TLLong GroupedId\r\n        {\r\n            get { return _groupedId; }\r\n            set { SetField(out _groupedId, value, ref _flags, (int)MessageFlags.GroupedId); }\r\n        }\r\n\r\n        public override void Edit(TLMessageBase messageBase)\r\n        {\r\n            base.Edit(messageBase);\r\n\r\n            var message = messageBase as TLMessage73;\r\n            if (message != null)\r\n            {\r\n                GroupedId = message.GroupedId;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject(Flags, (int)MessageFlags.FromId, new TLInt(-1), bytes, ref position);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n            _fwdHeader = GetObject<TLMessageFwdHeader73>(Flags, (int)MessageFlags.FwdFrom, null, bytes, ref position);\r\n            _viaBotId = GetObject<TLInt>(Flags, (int)MessageFlags.ViaBotId, null, bytes, ref position);\r\n            _replyToMsgId = GetObject<TLInt>(Flags, (int)MessageFlags.ReplyToMsgId, null, bytes, ref position);\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            _media = GetObject<TLMessageMediaBase>(Flags, (int)MessageFlags.Media, new TLMessageMediaEmpty(), bytes, ref position);\r\n            _replyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)MessageFlags.ReplyMarkup, null, bytes, ref position);\r\n            Entities = GetObject(Flags, (int)MessageFlags.Entities, new TLVector<TLMessageEntityBase>(), bytes, ref position);  // Important to add empty Entities to avoid BrowseNavigationService.ParseText calls\r\n            _views = GetObject(Flags, (int)MessageFlags.Views, new TLInt(0), bytes, ref position);\r\n            _editDate = GetObject(Flags, (int)MessageFlags.EditDate, new TLInt(0), bytes, ref position);\r\n            _postAuthor = GetObject<TLString>(Flags, (int)MessageFlags.PostAuthor, null, bytes, ref position);\r\n            _groupedId = GetObject<TLLong>(Flags, (int)MessageFlags.GroupedId, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n            _fwdHeader = GetObject<TLMessageFwdHeader73>(Flags, (int)MessageFlags.FwdFrom, null, input);\r\n            _viaBotId = GetObject<TLInt>(Flags, (int)MessageFlags.ViaBotId, null, input);\r\n            _replyToMsgId = GetObject<TLInt>(Flags, (int)MessageFlags.ReplyToMsgId, null, input);\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            _media = GetObject<TLMessageMediaBase>(Flags, (int)MessageFlags.Media, new TLMessageMediaEmpty(), input);\r\n            _replyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)MessageFlags.ReplyMarkup, null, input);\r\n            Entities = GetObject(Flags, (int)MessageFlags.Entities, new TLVector<TLMessageEntityBase>(), input);  // Important to add empty Entities to avoid BrowseNavigationService.ParseText calls\r\n            _views = GetObject(Flags, (int)MessageFlags.Views, new TLInt(0), input);\r\n            _editDate = GetObject(Flags, (int)MessageFlags.EditDate, new TLInt(0), input);\r\n            _postAuthor = GetObject<TLString>(Flags, (int)MessageFlags.PostAuthor, null, input);\r\n            _groupedId = GetObject<TLLong>(Flags, (int)MessageFlags.GroupedId, null, input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            var randomId = GetObject<TLLong>(input);\r\n            if (randomId.Value != 0)\r\n            {\r\n                RandomId = randomId;\r\n            }\r\n            _status = (MessageStatus)GetObject<TLInt>(input).Value;\r\n            _fwdMessageId = GetObject<TLInt>(CustomFlags, (int)MessageCustomFlags.FwdMessageId, null, input);\r\n            _fwdFromChannelPeer = GetObject<TLInputPeerBase>(CustomFlags, (int)MessageCustomFlags.FwdFromChannelPeer, null, input);\r\n            _inlineBotResultQueryId = GetObject<TLLong>(CustomFlags, (int)MessageCustomFlags.BotInlineResult, null, input);\r\n            _inlineBotResultId = GetObject<TLString>(CustomFlags, (int)MessageCustomFlags.BotInlineResult, null, input);\r\n            _documents = GetObject<TLVector<TLDocumentBase>>(CustomFlags, (int)MessageCustomFlags.Documents, null, input);\r\n            _inputPeer = GetObject<TLInputPeerBase>(CustomFlags, (int)MessageCustomFlags.InputPeer, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            try\r\n            {\r\n                // to set flags before writing to file\r\n                Views = Views ?? new TLInt(0);\r\n                EditDate = EditDate ?? new TLInt(0);\r\n\r\n                Flags.ToStream(output);\r\n                Id = Id ?? new TLInt(0);\r\n                Id.ToStream(output);\r\n                FromId.ToStream(output);\r\n                ToId.ToStream(output);\r\n                ToStream(output, FwdHeader, Flags, (int)MessageFlags.FwdFrom);\r\n                ToStream(output, ViaBotId, Flags, (int)MessageFlags.ViaBotId);\r\n                ToStream(output, ReplyToMsgId, Flags, (int)MessageFlags.ReplyToMsgId);\r\n                Date.ToStream(output);\r\n                Message.ToStream(output);\r\n                ToStream(output, Media, Flags, (int)MessageFlags.Media);\r\n                ToStream(output, ReplyMarkup, Flags, (int)MessageFlags.ReplyMarkup);\r\n                ToStream(output, Entities, Flags, (int)MessageFlags.Entities);\r\n                ToStream(output, Views, Flags, (int)MessageFlags.Views);\r\n                ToStream(output, EditDate, Flags, (int)MessageFlags.EditDate);\r\n                ToStream(output, PostAuthor, Flags, (int)MessageFlags.PostAuthor);\r\n                ToStream(output, GroupedId, Flags, (int)MessageFlags.GroupedId);\r\n\r\n                CustomFlags.NullableToStream(output);\r\n                RandomId = RandomId ?? new TLLong(0);\r\n                RandomId.ToStream(output);\r\n                var status = new TLInt((int)Status);\r\n                status.ToStream(output);\r\n                ToStream(output, _fwdMessageId, CustomFlags, (int)MessageCustomFlags.FwdMessageId);\r\n                ToStream(output, _fwdFromChannelPeer, CustomFlags, (int)MessageCustomFlags.FwdFromChannelPeer);\r\n                ToStream(output, _inlineBotResultQueryId, CustomFlags, (int)MessageCustomFlags.BotInlineResult);\r\n                ToStream(output, _inlineBotResultId, CustomFlags, (int)MessageCustomFlags.BotInlineResult);\r\n                ToStream(output, _documents, CustomFlags, (int)MessageCustomFlags.Documents);\r\n                ToStream(output, _inputPeer, CustomFlags, (int)MessageCustomFlags.InputPeer);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                var logString = string.Format(\"TLMessage73.ToStream id={0} flags={1} fwd_from_peer={2} fwd_date={3} reply_to_msg_id={4} media={5} reply_markup={6} entities={7} views={8} from_id={9} edit_date={10} fwd_header={11}\", Index, MessageFlagsString(Flags), FwdFromPeer, FwdDate, ReplyToMsgId, Media, ReplyMarkup, Entities, Views, FromId, EditDate, FwdHeader != null);\r\n\r\n                TLUtils.WriteException(logString, ex);\r\n            }\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            var message73 = message as TLMessage73;\r\n            if (message73 != null)\r\n            {\r\n                GroupedId = message73.GroupedId;\r\n\r\n                base.Update(message);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessage70 : TLMessage48\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessage70;\r\n\r\n        protected TLString _postAuthor;\r\n\r\n        public TLString PostAuthor\r\n        {\r\n            get { return _postAuthor; }\r\n            set { SetField(out _postAuthor, value, ref _flags, (int)MessageFlags.PostAuthor); }\r\n        }\r\n\r\n        private string _author;\r\n\r\n        public override string Author\r\n        {\r\n            get\r\n            {\r\n                if (_author != null) return _author;\r\n\r\n                if (!TLString.IsNullOrEmpty(PostAuthor))\r\n                {\r\n                    _author = PostAuthor.ToString();\r\n                    return _author;\r\n                }\r\n\r\n                if (!(ToId is TLPeerChannel)) return null;\r\n                if (FromId == null || FromId.Value < 0) return null;\r\n\r\n                var cacheService = InMemoryCacheService.Instance;\r\n                var user = cacheService.GetUser(FromId);\r\n                _author = user != null ? user.FullName2 : string.Empty;\r\n\r\n                return _author;\r\n            }\r\n        }\r\n\r\n        public override Visibility AuthorVisibility\r\n        {\r\n            get { return !string.IsNullOrEmpty(Author) && !IsMusic() ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public bool TTLMediaExpired\r\n        {\r\n            get\r\n            {\r\n                var mediaPhoto = Media as TLMessageMediaPhoto70;\r\n                if (mediaPhoto != null)\r\n                {\r\n                    return mediaPhoto.Photo == null;\r\n                }\r\n\r\n                var mediaDocument = Media as TLMessageMediaDocument70;\r\n                if (mediaDocument != null)\r\n                {\r\n                    return mediaDocument.Document == null;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        protected TLInputPeerBase _inputPeer;\r\n\r\n        public TLInputPeerBase InputPeer\r\n        {\r\n            get { return _inputPeer; }\r\n            set\r\n            {\r\n                if (_inputPeer != null && value == null)\r\n                {\r\n\r\n                }\r\n\r\n                SetField(out _inputPeer, value, ref _customFlags, (int)MessageCustomFlags.InputPeer);\r\n            }\r\n        }\r\n\r\n        public override void Edit(TLMessageBase messageBase)\r\n        {\r\n            base.Edit(messageBase);\r\n\r\n            var message = messageBase as TLMessage48;\r\n            if (message != null)\r\n            {\r\n                EditDate = message.EditDate;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject(Flags, (int)MessageFlags.FromId, new TLInt(-1), bytes, ref position);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n            _fwdHeader = GetObject<TLMessageFwdHeader>(Flags, (int)MessageFlags.FwdFrom, null, bytes, ref position);\r\n            _viaBotId = GetObject<TLInt>(Flags, (int)MessageFlags.ViaBotId, null, bytes, ref position);\r\n            _replyToMsgId = GetObject<TLInt>(Flags, (int)MessageFlags.ReplyToMsgId, null, bytes, ref position);\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            _media = GetObject<TLMessageMediaBase>(Flags, (int)MessageFlags.Media, new TLMessageMediaEmpty(), bytes, ref position);\r\n            _replyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)MessageFlags.ReplyMarkup, null, bytes, ref position);\r\n            _entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)MessageFlags.Entities, null, bytes, ref position);\r\n            _views = GetObject(Flags, (int)MessageFlags.Views, new TLInt(0), bytes, ref position);\r\n            _editDate = GetObject(Flags, (int)MessageFlags.EditDate, new TLInt(0), bytes, ref position);\r\n            _postAuthor = GetObject<TLString>(Flags, (int)MessageFlags.PostAuthor, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            //#if DEBUG\r\n            //            var flagsString = MessageFlagsString(Flags);\r\n            //#endif\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n            _fwdHeader = GetObject<TLMessageFwdHeader>(Flags, (int)MessageFlags.FwdFrom, null, input);\r\n            _viaBotId = GetObject<TLInt>(Flags, (int)MessageFlags.ViaBotId, null, input);\r\n            _replyToMsgId = GetObject<TLInt>(Flags, (int)MessageFlags.ReplyToMsgId, null, input);\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            _media = GetObject<TLMessageMediaBase>(Flags, (int)MessageFlags.Media, new TLMessageMediaEmpty(), input);\r\n            _replyMarkup = GetObject<TLReplyKeyboardBase>(Flags, (int)MessageFlags.ReplyMarkup, null, input);\r\n            _entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)MessageFlags.Entities, null, input);\r\n            _views = GetObject(Flags, (int)MessageFlags.Views, new TLInt(0), input);\r\n            _editDate = GetObject(Flags, (int)MessageFlags.EditDate, new TLInt(0), input);\r\n            _postAuthor = GetObject<TLString>(Flags, (int)MessageFlags.PostAuthor, null, input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n            var randomId = GetObject<TLLong>(input);\r\n            if (randomId.Value != 0)\r\n            {\r\n                RandomId = randomId;\r\n            }\r\n            _status = (MessageStatus)GetObject<TLInt>(input).Value;\r\n            _fwdMessageId = GetObject<TLInt>(CustomFlags, (int)MessageCustomFlags.FwdMessageId, null, input);\r\n            _fwdFromChannelPeer = GetObject<TLInputPeerBase>(CustomFlags, (int)MessageCustomFlags.FwdFromChannelPeer, null, input);\r\n            _inlineBotResultQueryId = GetObject<TLLong>(CustomFlags, (int)MessageCustomFlags.BotInlineResult, null, input);\r\n            _inlineBotResultId = GetObject<TLString>(CustomFlags, (int)MessageCustomFlags.BotInlineResult, null, input);\r\n            _documents = GetObject<TLVector<TLDocumentBase>>(CustomFlags, (int)MessageCustomFlags.Documents, null, input);\r\n            _inputPeer = GetObject<TLInputPeerBase>(CustomFlags, (int)MessageCustomFlags.InputPeer, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            try\r\n            {\r\n                // to set flags before writing to file\r\n                Views = Views ?? new TLInt(0);\r\n                EditDate = EditDate ?? new TLInt(0);\r\n\r\n                Flags.ToStream(output);\r\n                Id = Id ?? new TLInt(0);\r\n                Id.ToStream(output);\r\n                FromId.ToStream(output);\r\n                ToId.ToStream(output);\r\n                ToStream(output, FwdHeader, Flags, (int)MessageFlags.FwdFrom);\r\n                ToStream(output, ViaBotId, Flags, (int)MessageFlags.ViaBotId);\r\n                ToStream(output, ReplyToMsgId, Flags, (int)MessageFlags.ReplyToMsgId);\r\n                Date.ToStream(output);\r\n                Message.ToStream(output);\r\n                ToStream(output, Media, Flags, (int)MessageFlags.Media);\r\n                ToStream(output, ReplyMarkup, Flags, (int)MessageFlags.ReplyMarkup);\r\n                ToStream(output, Entities, Flags, (int)MessageFlags.Entities);\r\n                ToStream(output, Views, Flags, (int)MessageFlags.Views);\r\n                ToStream(output, EditDate, Flags, (int)MessageFlags.EditDate);\r\n                ToStream(output, PostAuthor, Flags, (int)MessageFlags.PostAuthor);\r\n\r\n                CustomFlags.NullableToStream(output);\r\n                RandomId = RandomId ?? new TLLong(0);\r\n                RandomId.ToStream(output);\r\n                var status = new TLInt((int)Status);\r\n                status.ToStream(output);\r\n                ToStream(output, _fwdMessageId, CustomFlags, (int)MessageCustomFlags.FwdMessageId);\r\n                ToStream(output, _fwdFromChannelPeer, CustomFlags, (int)MessageCustomFlags.FwdFromChannelPeer);\r\n                ToStream(output, _inlineBotResultQueryId, CustomFlags, (int)MessageCustomFlags.BotInlineResult);\r\n                ToStream(output, _inlineBotResultId, CustomFlags, (int)MessageCustomFlags.BotInlineResult);\r\n                ToStream(output, _documents, CustomFlags, (int)MessageCustomFlags.Documents);\r\n                ToStream(output, _inputPeer, CustomFlags, (int)MessageCustomFlags.InputPeer);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                var logString = string.Format(\"TLMessage70.ToStream id={0} flags={1} fwd_from_peer={2} fwd_date={3} reply_to_msg_id={4} media={5} reply_markup={6} entities={7} views={8} from_id={9} edit_date={10} fwd_header={11}\", Index, MessageFlagsString(Flags), FwdFromPeer, FwdDate, ReplyToMsgId, Media, ReplyMarkup, Entities, Views, FromId, EditDate, FwdHeader != null);\r\n\r\n                TLUtils.WriteException(logString, ex);\r\n            }\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            var message70 = message as TLMessage70;\r\n            if (message70 != null)\r\n            {\r\n                // begin copy flags\r\n                Out = message70.Out;\r\n                IsMention = message70.IsMention;\r\n                NotListened = message70.NotListened;\r\n                Silent = message70.Silent;\r\n                Post = message70.Post;\r\n                // end copy flags\r\n\r\n                Id = message70.Id;\r\n                Status = message70.Status;\r\n                FromId = message70.FromId;\r\n                ToId = message70.ToId;\r\n\r\n                if (Unread.Value && !message70.Unread.Value)\r\n                {\r\n                    SetUnreadSilent(message70.Unread);\r\n                }\r\n                if (!Unread.Value && message70.Unread.Value)\r\n                {\r\n#if DEBUG && WINDOWS_PHONE\r\n                    var builder = new StringBuilder();\r\n                    var stackTrace = new StackTrace();\r\n                    var frames = stackTrace.GetFrames();\r\n                    foreach (var r in frames)\r\n                    {\r\n                        builder.AppendLine(string.Format(\"Method: {0}\", r.GetMethod()));\r\n                    }\r\n                    //Helpers.Execute.ShowDebugMessage(\"Set read message as unread\\ncurrent=\" + this + \"\\nnew=\" + message + \"\\n\\n\" + builder.ToString());\r\n#endif\r\n                }\r\n\r\n                _date = message70.Date;\r\n                Message = message70.Message;\r\n\r\n                UpdateMedia(message);\r\n\r\n                FwdFromId = message70.FwdFromId;\r\n                FwdDate = message70.FwdDate;\r\n                ReplyToMsgId = message70.ReplyToMsgId;\r\n\r\n                if (message70.Reply != null)\r\n                {\r\n                    Reply = message70.Reply;\r\n                }\r\n\r\n                if (message70.ReplyMarkup != null)\r\n                {\r\n                    var oldCustomFlags = ReplyMarkup != null ? ReplyMarkup.CustomFlags : null;\r\n                    ReplyMarkup = message70.ReplyMarkup;\r\n                    ReplyMarkup.CustomFlags = oldCustomFlags;\r\n                }\r\n\r\n                if (message70.Entities != null)\r\n                {\r\n                    Entities = message70.Entities;\r\n                }\r\n\r\n                FwdFromPeer = message70.FwdFromPeer;\r\n                if (message70.FwdMessageId != null) FwdMessageId = message70.FwdMessageId;\r\n                if (message70.FwdFromChannelPeer != null) FwdFromChannelPeer = message70.FwdFromChannelPeer;\r\n                if (message70.Views != null)\r\n                {\r\n                    var currentViews = Views != null ? Views.Value : 0;\r\n                    if (currentViews < message70.Views.Value)\r\n                    {\r\n                        Views = message70.Views;\r\n                    }\r\n                }\r\n\r\n                if (message70.ViaBotId != null)\r\n                {\r\n                    ViaBotId = message70.ViaBotId;\r\n                }\r\n\r\n                if (message70.InlineBotResultQueryId != null)\r\n                {\r\n                    InlineBotResultQueryId = message70.InlineBotResultQueryId;\r\n                }\r\n\r\n                if (message70.InlineBotResultId != null)\r\n                {\r\n                    InlineBotResultId = message70.InlineBotResultId;\r\n                }\r\n\r\n                FwdHeader = message70.FwdHeader;\r\n\r\n                if (message70.EditDate != null)\r\n                {\r\n                    EditDate = message70.EditDate;\r\n                }\r\n                PostAuthor = message70.PostAuthor;\r\n\r\n                if (message70.InputPeer != null)\r\n                {\r\n                    InputPeer = message70.InputPeer;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UpdateMedia(TLMessageBase message)\r\n        {\r\n            var m = (TLMessage)message;\r\n            var oldMedia = Media;\r\n            var newMedia = m.Media;\r\n            if (oldMedia.GetType() != newMedia.GetType())\r\n            {\r\n                _media = m.Media;\r\n                if (_media != null) SetMedia();\r\n            }\r\n            else\r\n            {\r\n                var oldMediaGeoLive = oldMedia as TLMessageMediaGeoLive;\r\n                var newMediaGeoLive = newMedia as TLMessageMediaGeoLive;\r\n                if (oldMediaGeoLive != null && newMediaGeoLive != null)\r\n                {\r\n                    oldMediaGeoLive.Geo = newMediaGeoLive.Geo;\r\n                    oldMediaGeoLive.Period = newMediaGeoLive.Period;\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaVenue = oldMedia as TLMessageMediaVenue;\r\n                var newMediaVenue = newMedia as TLMessageMediaVenue;\r\n                if (oldMediaVenue != null && newMediaVenue != null)\r\n                {\r\n                    oldMediaVenue.Geo = newMediaVenue.Geo;\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaGeo = oldMedia as TLMessageMediaGeo;\r\n                var newMediaGeo = newMedia as TLMessageMediaGeo;\r\n                if (oldMediaGeo != null && newMediaGeo != null)\r\n                {\r\n                    oldMediaGeo.Geo = newMediaGeo.Geo;\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldInvoice = oldMedia as TLMessageMediaInvoice;\r\n                var newInvoice = newMedia as TLMessageMediaInvoice;\r\n                if (oldInvoice != null && newInvoice != null && newInvoice.ReceiptMsgId != null)\r\n                {\r\n                    oldInvoice.ReceiptMsgId = newInvoice.ReceiptMsgId;\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaGame = oldMedia as TLMessageMediaGame;\r\n                var newMediaGame = newMedia as TLMessageMediaGame;\r\n                if (oldMediaGame != null && newMediaGame != null)\r\n                {\r\n                    newMediaGame.Message = m.Message;\r\n                    if (oldMediaGame.Game.GetType() != newMediaGame.Game.GetType())\r\n                    {\r\n                        _media = m.Media;\r\n                    }\r\n                    else\r\n                    {\r\n                        var oldGame = oldMediaGame.Game;\r\n                        var newGame = newMediaGame.Game;\r\n                        if (oldGame != null\r\n                            && newGame != null\r\n                            && (oldGame.Id.Value != newGame.Id.Value))\r\n                        {\r\n                            newMediaGame.SourceMessage = this;\r\n                            _media = newMediaGame;\r\n                        }\r\n                        else\r\n                        {\r\n                            oldMediaGame.Message = m.Message;\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaWebPage = oldMedia as TLMessageMediaWebPage;\r\n                var newMediaWebPage = newMedia as TLMessageMediaWebPage;\r\n                if (oldMediaWebPage != null && newMediaWebPage != null)\r\n                {\r\n                    if (oldMediaWebPage.WebPage.GetType() != newMediaWebPage.WebPage.GetType())\r\n                    {\r\n                        _media = m.Media;\r\n                    }\r\n                    else\r\n                    {\r\n                        var oldWebPage = oldMediaWebPage.WebPage as TLWebPage35;\r\n                        var newWebPage = newMediaWebPage.WebPage as TLWebPage35;\r\n                        if (oldWebPage != null\r\n                            && newWebPage != null\r\n                            && (oldWebPage.Id.Value != newWebPage.Id.Value))\r\n                        {\r\n                            _media = m.Media;\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaDocument = oldMedia as TLMessageMediaDocument;\r\n                var newMediaDocument = newMedia as TLMessageMediaDocument;\r\n                if (oldMediaDocument != null && newMediaDocument != null)\r\n                {\r\n                    var oldDocument = oldMediaDocument.Document as TLDocument;\r\n                    var newDocument = newMediaDocument.Document as TLDocument;\r\n                    if (oldDocument == null || newDocument == null)\r\n                    {\r\n                        _media = m.Media;\r\n\r\n                        if (HasTTL())\r\n                        {\r\n                            if (oldDocument != null)\r\n                            {\r\n                                newMediaDocument.Document = oldDocument;\r\n                            }\r\n\r\n                            var oldTTLMessageMedia = oldMediaDocument as ITTLMessageMedia;\r\n                            var newTTLMessageMedia = newMediaDocument as ITTLMessageMedia;\r\n                            if (oldTTLMessageMedia != null && newTTLMessageMedia != null)\r\n                            {\r\n                                newTTLMessageMedia.TTLParams = oldTTLMessageMedia.TTLParams;\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        if (oldDocument.Id.Value != newDocument.Id.Value\r\n                            || oldDocument.AccessHash.Value != newDocument.AccessHash.Value)\r\n                        {\r\n                            oldMediaDocument.Document = newMediaDocument.Document;\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaVideo = oldMedia as TLMessageMediaVideo;\r\n                var newMediaVideo = newMedia as TLMessageMediaVideo;\r\n                if (oldMediaVideo != null && newMediaVideo != null)\r\n                {\r\n                    if (oldMediaVideo.Video.GetType() != newMediaVideo.Video.GetType())\r\n                    {\r\n                        _media = m.Media;\r\n                    }\r\n                    else\r\n                    {\r\n                        var oldVideo = oldMediaVideo.Video as TLVideo;\r\n                        var newVideo = newMediaVideo.Video as TLVideo;\r\n                        if (oldVideo != null\r\n                            && newVideo != null\r\n                            && (oldVideo.Id.Value != newVideo.Id.Value\r\n                                || oldVideo.AccessHash.Value != newVideo.AccessHash.Value))\r\n                        {\r\n                            var isoFileName = Media.IsoFileName;\r\n                            _media = m.Media;\r\n                            _media.IsoFileName = isoFileName;\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaAudio = oldMedia as TLMessageMediaAudio;\r\n                var newMediaAudio = newMedia as TLMessageMediaAudio;\r\n                if (oldMediaAudio != null && newMediaAudio != null)\r\n                {\r\n                    if (oldMediaAudio.Audio.GetType() != newMediaAudio.Audio.GetType())\r\n                    {\r\n                        _media = m.Media;\r\n                    }\r\n                    else\r\n                    {\r\n                        var oldAudio = oldMediaAudio.Audio as TLAudio;\r\n                        var newAudio = newMediaAudio.Audio as TLAudio;\r\n                        if (oldAudio != null\r\n                            && newAudio != null\r\n                            && (oldAudio.Id.Value != newAudio.Id.Value\r\n                                || oldAudio.AccessHash.Value != newAudio.AccessHash.Value))\r\n                        {\r\n                            var isoFileName = Media.IsoFileName;\r\n                            var notListened = Media.NotListened;\r\n                            _media = m.Media;\r\n                            _media.IsoFileName = isoFileName;\r\n                            _media.NotListened = notListened;\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaPhoto = oldMedia as TLMessageMediaPhoto;\r\n                var newMediaPhoto = newMedia as TLMessageMediaPhoto;\r\n                if (oldMediaPhoto == null || newMediaPhoto == null)\r\n                {\r\n                    _media = m.Media;\r\n                }\r\n                else\r\n                {\r\n                    var oldPhoto = oldMediaPhoto.Photo as TLPhoto;\r\n                    var newPhoto = newMediaPhoto.Photo as TLPhoto;\r\n                    if (oldPhoto == null || newPhoto == null)\r\n                    {\r\n                        _media = m.Media;\r\n\r\n                        if (HasTTL())\r\n                        {\r\n                            if (oldPhoto != null)\r\n                            {\r\n                                newMediaPhoto.Photo = oldPhoto;\r\n                            }\r\n\r\n                            var oldTTLMessageMedia = oldMediaPhoto as ITTLMessageMedia;\r\n                            var newTTLMessageMedia = newMediaPhoto as ITTLMessageMedia;\r\n                            if (oldTTLMessageMedia != null && newTTLMessageMedia != null)\r\n                            {\r\n                                newTTLMessageMedia.TTLParams = oldTTLMessageMedia.TTLParams;\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        if (oldPhoto.AccessHash.Value != newPhoto.AccessHash.Value)\r\n                        {\r\n                            var oldCachedSize =\r\n                                oldPhoto.Sizes.FirstOrDefault(x => x is TLPhotoCachedSize) as TLPhotoCachedSize;\r\n                            var oldMSize =\r\n                                oldPhoto.Sizes.FirstOrDefault(\r\n                                    x => TLString.Equals(x.Type, new TLString(\"m\"), StringComparison.OrdinalIgnoreCase));\r\n                            foreach (var size in newPhoto.Sizes)\r\n                            {\r\n                                if (size is TLPhotoCachedSize)\r\n                                {\r\n                                    size.TempUrl = oldCachedSize != null ? oldCachedSize.TempUrl : null;\r\n                                }\r\n                                else if (TLString.Equals(size.Type, new TLString(\"s\"), StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    size.TempUrl = oldCachedSize != null ? oldCachedSize.TempUrl : null;\r\n                                }\r\n                                else\r\n                                {\r\n                                    size.TempUrl = oldMSize != null ? oldMSize.TempUrl : null;\r\n                                }\r\n                            }\r\n\r\n                            oldMediaPhoto.Photo = newMediaPhoto.Photo;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessage48 : TLMessage45\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessage48;\r\n\r\n        protected TLVector<TLDocumentBase> _documents;\r\n\r\n        public TLVector<TLDocumentBase> Documents\r\n        {\r\n            get { return _documents; }\r\n            set { SetField(out _documents, value, ref _customFlags, (int)MessageCustomFlags.Documents); }\r\n        }\r\n\r\n        public Visibility HasStickers\r\n        {\r\n            get\r\n            {\r\n                var mediaPhoto = Media as TLMessageMediaPhoto;\r\n                if (mediaPhoto != null)\r\n                {\r\n                    var photo = mediaPhoto.Photo as TLPhoto56;\r\n                    if (photo != null)\r\n                    {\r\n                        return photo.HasStickers ? Visibility.Visible : Visibility.Collapsed;\r\n                    }\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public bool Silent\r\n        {\r\n            get { return IsSet(Flags, (int)MessageFlags.Silent); }\r\n            set { SetUnset(ref _flags, value, (int)MessageFlags.Silent); }\r\n        }\r\n\r\n        public bool Post\r\n        {\r\n            get { return IsSet(Flags, (int)MessageFlags.Post); }\r\n            set { SetUnset(ref _flags, value, (int)MessageFlags.Post); }\r\n        }\r\n\r\n        protected TLMessageFwdHeader _fwdHeader;\r\n\r\n        public TLMessageFwdHeader FwdHeader\r\n        {\r\n            get { return _fwdHeader; }\r\n            set { SetField(out _fwdHeader, value, ref _flags, (int)MessageFlags.FwdFrom); }\r\n        }\r\n\r\n        protected TLInt _editDate;\r\n\r\n        public TLInt EditDate\r\n        {\r\n            get { return _editDate; }\r\n            set { SetField(out _editDate, value, ref _flags, (int)MessageFlags.EditDate); }\r\n        }\r\n\r\n        public Visibility EditDateVisibility\r\n        {\r\n            get\r\n            {\r\n                if (ViaBotId != null) return Visibility.Collapsed;\r\n\r\n                var from = From;\r\n                var user = from as TLUser;\r\n                if (user != null && user.IsBot) return Visibility.Collapsed;\r\n\r\n                return EditDate != null && EditDate.Value > 0 ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public override Visibility ReplyOrViaBotVisibility\r\n        {\r\n            get\r\n            {\r\n                var replyVisibility = ReplyVisibility;\r\n                if (replyVisibility == Visibility.Visible) return Visibility.Visible;\r\n\r\n                return ViaBotVisibility;\r\n            }\r\n        }\r\n\r\n        public override Visibility ViaBotVisibility\r\n        {\r\n            get\r\n            {\r\n                if (ViaBotId != null && Media is TLMessageMediaContact)\r\n                {\r\n                    return Visibility.Collapsed;\r\n                }\r\n\r\n                var viaBot = ViaBot;\r\n\r\n                return viaBot != null && !viaBot.IsDeleted ? Visibility.Visible : Visibility.Collapsed;\r\n                //return FwdHeader == null && ViaBotId != null ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public override Visibility FwdViaBotVisibility\r\n        {\r\n            get\r\n            {\r\n                if (ViaBotId != null && Media is TLMessageMediaContact)\r\n                {\r\n                    return Visibility.Collapsed;\r\n                }\r\n\r\n                return FwdHeader != null && ViaBotId != null ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n\r\n        public override Visibility FwdFromPeerVisibility\r\n        {\r\n            get\r\n            {\r\n                var peerChannel = FwdHeader != null && FwdHeader.ChannelId != null;\r\n                if (peerChannel)\r\n                {\r\n                    var channelMediaGroup = Media as TLMessageMediaGroup;\r\n                    if (channelMediaGroup != null)\r\n                    {\r\n                        return Visibility.Visible;\r\n                    }\r\n\r\n                    var channelMediaPhoto = Media as TLMessageMediaPhoto;\r\n                    if (channelMediaPhoto != null)\r\n                    {\r\n                        return Visibility.Visible;\r\n                    }\r\n\r\n                    var channelMediaDocument = Media as TLMessageMediaDocument;\r\n                    if (channelMediaDocument != null)\r\n                    {\r\n                        if (IsMusic())\r\n                        {\r\n                            return Visibility.Collapsed;\r\n                        }\r\n\r\n                        return Visibility.Visible;\r\n                    }\r\n\r\n                    var channelMediaVideo = Media as TLMessageMediaVideo;\r\n                    if (channelMediaVideo != null)\r\n                    {\r\n                        return Visibility.Visible;\r\n                    }\r\n\r\n                    var channelGeo = Media as TLMessageMediaGeo;\r\n                    if (channelGeo != null)\r\n                    {\r\n                        return Visibility.Visible;\r\n                    }\r\n                }\r\n\r\n                var mediaGroup = Media as TLMessageMediaGroup;\r\n                if (FwdHeader != null && mediaGroup != null)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                var mediaPhoto = Media as TLMessageMediaPhoto;\r\n                if (FwdHeader != null && mediaPhoto != null)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                var mediaVideo = Media as TLMessageMediaVideo;\r\n                if (FwdHeader != null && mediaVideo != null)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                var mediaDocument = Media as TLMessageMediaDocument;\r\n                if (FwdHeader != null && mediaDocument != null)\r\n                {\r\n                    if (IsMusic())\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                var mediaGeo = Media as TLMessageMediaGeo;\r\n                if (FwdHeader != null && mediaGeo != null)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                var emptyMedia = Media as TLMessageMediaEmpty;\r\n                var webPageMedia = Media as TLMessageMediaWebPage;\r\n                return FwdHeader != null && !TLString.IsNullOrEmpty(Message) && (emptyMedia != null || webPageMedia != null) ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public double FwdMaxWidth\r\n        {\r\n            get\r\n            {\r\n                if (IsSticker()) return 171.0;\r\n\r\n                if (IsVideo()) return 212.0;\r\n\r\n                var mediaVideo = Media as TLMessageMediaVideo;\r\n                if (mediaVideo != null) return 212.0;\r\n\r\n                var mediaGeo = Media as TLMessageMediaGeo;\r\n                var mediaVenue = Media as TLMessageMediaVenue;\r\n                if (mediaGeo != null && mediaVenue == null)\r\n#if DEBUG\r\n                    return 302.0;//120.0;\r\n#else\r\n                    return 302.0;//161.0;\r\n#endif\r\n\r\n                return 311.0;\r\n            }\r\n        }\r\n\r\n        public override TLObject FwdFrom\r\n        {\r\n            get\r\n            {\r\n                if (FwdHeader != null)\r\n                {\r\n                    return FwdHeader;\r\n                }\r\n\r\n                if (FwdFromPeer != null)\r\n                {\r\n                    var cacheService = InMemoryCacheService.Instance;\r\n\r\n                    if (FwdFromPeer is TLPeerChannel)\r\n                    {\r\n                        return cacheService.GetChat(FwdFromPeer.Id);\r\n                    }\r\n\r\n                    return cacheService.GetUser(FwdFromPeer.Id);\r\n                }\r\n\r\n                if (FwdFromId != null)\r\n                {\r\n                    var cacheService = InMemoryCacheService.Instance;\r\n                    return cacheService.GetUser(FwdFromId);\r\n                }\r\n\r\n                return null;\r\n            }\r\n            set\r\n            {\r\n\r\n            }\r\n        }\r\n\r\n        public override Visibility ShareButtonVisibility\r\n        {\r\n            get\r\n            {\r\n                if (Out.Value) return Visibility.Collapsed;\r\n\r\n                var user = From as TLUser;\r\n                if (user != null && (user.IsBot || ViaBotId != null))\r\n                {\r\n                    var entities = Entities;\r\n                    if (entities != null)\r\n                    {\r\n                        var url = entities.FirstOrDefault(x => x is TLMessageEntityUrl || x is TLMessageEntityTextUrl);\r\n                        if (url != null) return Visibility.Visible;\r\n                    }\r\n\r\n                    var mediaGame = Media as TLMessageMediaGame;\r\n                    if (mediaGame != null) return Visibility.Visible;\r\n\r\n                    var mediaPhoto = Media as TLMessageMediaPhoto;\r\n                    if (mediaPhoto != null) return Visibility.Visible;\r\n\r\n                    var mediaVideo = Media as TLMessageMediaVideo;\r\n                    if (mediaVideo != null) return Visibility.Visible;\r\n\r\n                    if (IsVideo()) return Visibility.Visible;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public override TLObject From\r\n        {\r\n            get\r\n            {\r\n                if (IsSelf())\r\n                {\r\n                    var fwdHeader = FwdHeader as TLMessageFwdHeader73;\r\n                    if (fwdHeader != null)\r\n                    {\r\n                        var user = fwdHeader.From as TLUser;\r\n                        if (user == null || !user.IsSelf)\r\n                        {\r\n                            return fwdHeader.From;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return base.From;\r\n            }\r\n        }\r\n\r\n        public override void Edit(TLMessageBase messageBase)\r\n        {\r\n            base.Edit(messageBase);\r\n\r\n            var message = messageBase as TLMessage48;\r\n            if (message != null)\r\n            {\r\n                EditDate = message.EditDate;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = IsSet(Flags, (int)MessageFlags.FromId)\r\n                ? GetObject<TLInt>(bytes, ref position)\r\n                : new TLInt(-1);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdHeader = GetObject<TLMessageFwdHeader>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n            {\r\n                _viaBotId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n\r\n            _media = IsSet(Flags, (int)MessageFlags.Media)\r\n                ? GetObject<TLMessageMediaBase>(bytes, ref position)\r\n                : new TLMessageMediaEmpty();\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n            _views = IsSet(Flags, (int)MessageFlags.Views)\r\n                ? GetObject<TLInt>(bytes, ref position)\r\n                : new TLInt(0);\r\n\r\n            EditDate = IsSet(Flags, (int)MessageFlags.EditDate)\r\n                ? GetObject<TLInt>(bytes, ref position)\r\n                : new TLInt(0);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdHeader = GetObject<TLMessageFwdHeader>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n            {\r\n                _viaBotId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            _media = IsSet(Flags, (int)MessageFlags.Media)\r\n                ? GetObject<TLMessageMediaBase>(input)\r\n                : new TLMessageMediaEmpty();\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Views))\r\n            {\r\n                Views = GetObject<TLInt>(input);\r\n            }\r\n            else\r\n            {\r\n                Views = new TLInt(0);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.EditDate))\r\n            {\r\n                EditDate = GetObject<TLInt>(input);\r\n            }\r\n            else\r\n            {\r\n                EditDate = new TLInt(0);\r\n            }\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            var randomId = GetObject<TLLong>(input);\r\n            if (randomId.Value != 0)\r\n            {\r\n                RandomId = randomId;\r\n            }\r\n            var status = GetObject<TLInt>(input);\r\n            _status = (MessageStatus)status.Value;\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdMessageId))\r\n            {\r\n                _fwdMessageId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdFromChannelPeer))\r\n            {\r\n                _fwdFromChannelPeer = GetObject<TLInputPeerBase>(input);\r\n            }\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.BotInlineResult))\r\n            {\r\n                _inlineBotResultQueryId = GetObject<TLLong>(input);\r\n                _inlineBotResultId = GetObject<TLString>(input);\r\n            }\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.Documents))\r\n            {\r\n                _documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            try\r\n            {\r\n\r\n                Flags.ToStream(output);\r\n                Id = Id ?? new TLInt(0);\r\n                output.Write(Id.ToBytes());\r\n                output.Write(FromId.ToBytes());\r\n                ToId.ToStream(output);\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n                {\r\n                    FwdHeader.ToStream(output);\r\n                    //FwdFromPeer.ToStream(output);\r\n                    //FwdDate.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n                {\r\n                    _viaBotId.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n                {\r\n                    ReplyToMsgId.ToStream(output);\r\n                }\r\n\r\n                output.Write(Date.ToBytes());\r\n                Message.ToStream(output);\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.Media))\r\n                {\r\n                    _media.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n                {\r\n                    ReplyMarkup.ToStream(output);\r\n                }\r\n                if (IsSet(Flags, (int)MessageFlags.Entities))\r\n                {\r\n                    Entities.ToStream(output);\r\n                }\r\n                if (IsSet(Flags, (int)MessageFlags.Views))\r\n                {\r\n                    if (Views == null)\r\n                    {\r\n                        var logString = string.Format(\"TLMessage48.ToStream id={0} flags={1} fwd_from_peer={2} fwd_date={3} reply_to_msg_id={4} media={5} reply_markup={6} entities={7} views={8} from_id={9} edit_date={10} fwd_header={11}\", Index, MessageFlagsString(Flags), FwdFromPeer, FwdDate, ReplyToMsgId, Media, ReplyMarkup, Entities, Views, FromId, EditDate, FwdHeader != null);\r\n                        Log.Write(logString);\r\n                    }\r\n\r\n                    Views = Views ?? new TLInt(0);\r\n                    Views.ToStream(output);\r\n                }\r\n                if (IsSet(Flags, (int)MessageFlags.EditDate))\r\n                {\r\n                    EditDate = EditDate ?? new TLInt(0);\r\n                    EditDate.ToStream(output);\r\n                }\r\n\r\n                CustomFlags.NullableToStream(output);\r\n\r\n                RandomId = RandomId ?? new TLLong(0);\r\n                RandomId.ToStream(output);\r\n                var status = new TLInt((int)Status);\r\n                output.Write(status.ToBytes());\r\n\r\n                if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdMessageId))\r\n                {\r\n                    _fwdMessageId.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdFromChannelPeer))\r\n                {\r\n                    _fwdFromChannelPeer.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(CustomFlags, (int)MessageCustomFlags.BotInlineResult))\r\n                {\r\n                    _inlineBotResultQueryId.ToStream(output);\r\n                    _inlineBotResultId.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(CustomFlags, (int)MessageCustomFlags.Documents))\r\n                {\r\n                    _documents.ToStream(output);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                var logString = string.Format(\"TLMessage48.ToStream id={0} flags={1} fwd_from_peer={2} fwd_date={3} reply_to_msg_id={4} media={5} reply_markup={6} entities={7} views={8} from_id={9} edit_date={10} fwd_header={11}\", Index, MessageFlagsString(Flags), FwdFromPeer, FwdDate, ReplyToMsgId, Media, ReplyMarkup, Entities, Views, FromId, EditDate, FwdHeader != null);\r\n\r\n                TLUtils.WriteException(logString, ex);\r\n            }\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = message as TLMessage48;\r\n            if (m != null)\r\n            {\r\n                FwdHeader = m.FwdHeader;\r\n\r\n                if (m.EditDate != null)\r\n                {\r\n                    EditDate = m.EditDate;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessage45 : TLMessage40\r\n    {\r\n        private string _author;\r\n\r\n        public virtual string Author\r\n        {\r\n            get\r\n            {\r\n                if (_author != null) return _author;\r\n\r\n                if (!(ToId is TLPeerChannel)) return null;\r\n                if (FromId == null || FromId.Value < 0) return null;\r\n\r\n                var cacheService = InMemoryCacheService.Instance;\r\n                var user = cacheService.GetUser(FromId);\r\n                _author = user != null ? user.FullName2 : string.Empty;\r\n\r\n                return _author;\r\n            }\r\n        }\r\n\r\n        public virtual Visibility AuthorVisibility\r\n        {\r\n            get { return ToId is TLPeerChannel && FromId != null && FromId.Value >= 0 && !IsMusic() ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public new const uint Signature = TLConstructors.TLMessage45;\r\n\r\n        protected TLInt _viaBotId;\r\n\r\n        public TLInt ViaBotId\r\n        {\r\n            get { return _viaBotId; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    Set(ref _flags, (int)MessageFlags.ViaBotId);\r\n                    _viaBotId = value;\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _flags, (int)MessageFlags.ViaBotId);\r\n                    _viaBotId = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLUserBase _viaBot;\r\n\r\n        public override TLUserBase ViaBot\r\n        {\r\n            get\r\n            {\r\n                if (_viaBot != null) return _viaBot;\r\n                if (ViaBotId == null) return null;\r\n\r\n                var cacheService = InMemoryCacheService.Instance;\r\n                _viaBot = cacheService.GetUser(ViaBotId);\r\n\r\n                return _viaBot;\r\n            }\r\n        }\r\n\r\n        public override Visibility ViaBotVisibility\r\n        {\r\n            get { return FwdFromPeer == null && ViaBotId != null ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility FwdViaBotVisibility\r\n        {\r\n            get { return FwdFromPeer != null && ViaBotId != null ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        protected TLLong _inlineBotResultQueryId;\r\n\r\n        public TLLong InlineBotResultQueryId\r\n        {\r\n            get { return _inlineBotResultQueryId; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    Set(ref _customFlags, (int)MessageCustomFlags.BotInlineResult);\r\n                    _inlineBotResultQueryId = value;\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _customFlags, (int)MessageCustomFlags.BotInlineResult);\r\n                    _inlineBotResultQueryId = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        protected TLString _inlineBotResultId;\r\n\r\n        public TLString InlineBotResultId\r\n        {\r\n            get { return _inlineBotResultId; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    Set(ref _customFlags, (int)MessageCustomFlags.BotInlineResult);\r\n                    _inlineBotResultId = value;\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _customFlags, (int)MessageCustomFlags.BotInlineResult);\r\n                    _inlineBotResultId = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = IsSet(Flags, (int)MessageFlags.FromId)\r\n                ? GetObject<TLInt>(bytes, ref position)\r\n                : new TLInt(-1);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromPeer = GetObject<TLPeerBase>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n            {\r\n                _viaBotId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n\r\n            _media = IsSet(Flags, (int)MessageFlags.Media)\r\n                ? GetObject<TLMessageMediaBase>(bytes, ref position)\r\n                : new TLMessageMediaEmpty();\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n            _views = IsSet(Flags, (int)MessageFlags.Views)\r\n                ? GetObject<TLInt>(bytes, ref position)\r\n                : new TLInt(0);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromPeer = GetObject<TLPeerBase>(input);\r\n                FwdDate = GetObject<TLInt>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n            {\r\n                _viaBotId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n\r\n            _media = IsSet(Flags, (int)MessageFlags.Media)\r\n                ? GetObject<TLMessageMediaBase>(input)\r\n                : new TLMessageMediaEmpty();\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Views))\r\n            {\r\n                Views = GetObject<TLInt>(input);\r\n            }\r\n            else\r\n            {\r\n                Views = new TLInt(0);\r\n            }\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            var randomId = GetObject<TLLong>(input);\r\n            if (randomId.Value != 0)\r\n            {\r\n                RandomId = randomId;\r\n            }\r\n            var status = GetObject<TLInt>(input);\r\n            _status = (MessageStatus)status.Value;\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdMessageId))\r\n            {\r\n                _fwdMessageId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdFromChannelPeer))\r\n            {\r\n                _fwdFromChannelPeer = GetObject<TLInputPeerBase>(input);\r\n            }\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.BotInlineResult))\r\n            {\r\n                _inlineBotResultQueryId = GetObject<TLLong>(input);\r\n                _inlineBotResultId = GetObject<TLString>(input);\r\n            }\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            try\r\n            {\r\n\r\n                Flags.ToStream(output);\r\n                Id = Id ?? new TLInt(0);\r\n                output.Write(Id.ToBytes());\r\n                output.Write(FromId.ToBytes());\r\n                ToId.ToStream(output);\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n                {\r\n                    FwdFromPeer.ToStream(output);\r\n                    FwdDate.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n                {\r\n                    _viaBotId.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n                {\r\n                    ReplyToMsgId.ToStream(output);\r\n                }\r\n\r\n                output.Write(Date.ToBytes());\r\n                Message.ToStream(output);\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.Media))\r\n                {\r\n                    _media.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n                {\r\n                    ReplyMarkup.ToStream(output);\r\n                }\r\n                if (IsSet(Flags, (int)MessageFlags.Entities))\r\n                {\r\n                    Entities.ToStream(output);\r\n                }\r\n                if (IsSet(Flags, (int)MessageFlags.Views))\r\n                {\r\n                    if (Views == null)\r\n                    {\r\n                        var logString = string.Format(\"TLMessage40.ToStream id={0} flags={1} fwd_from_peer={2} fwd_date={3} reply_to_msg_id={4} media={5} reply_markup={6} entities={7} views={8} from_id={9}\", Index, MessageFlagsString(Flags), FwdFromPeer, FwdDate, ReplyToMsgId, Media, ReplyMarkup, Entities, Views, FromId);\r\n                        Log.Write(logString);\r\n                    }\r\n\r\n                    Views = Views ?? new TLInt(0);\r\n                    Views.ToStream(output);\r\n                }\r\n\r\n                CustomFlags.NullableToStream(output);\r\n\r\n                RandomId = RandomId ?? new TLLong(0);\r\n                RandomId.ToStream(output);\r\n                var status = new TLInt((int)Status);\r\n                output.Write(status.ToBytes());\r\n\r\n                if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdMessageId))\r\n                {\r\n                    _fwdMessageId.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdFromChannelPeer))\r\n                {\r\n                    _fwdFromChannelPeer.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(CustomFlags, (int)MessageCustomFlags.BotInlineResult))\r\n                {\r\n                    _inlineBotResultQueryId.ToStream(output);\r\n                    _inlineBotResultId.ToStream(output);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                var logString = string.Format(\"TLMessage40.ToStream id={0} flags={1} fwd_from_peer={2} fwd_date={3} reply_to_msg_id={4} media={5} reply_markup={6} entities={7} views={8} from_id={9}\", Index, MessageFlagsString(Flags), FwdFromPeer, FwdDate, ReplyToMsgId, Media, ReplyMarkup, Entities, Views, FromId);\r\n\r\n                TLUtils.WriteException(logString, ex);\r\n            }\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = message as TLMessage45;\r\n            if (m != null)\r\n            {\r\n                if (m.ViaBotId != null)\r\n                {\r\n                    ViaBotId = m.ViaBotId;\r\n                }\r\n\r\n                if (m.InlineBotResultQueryId != null)\r\n                {\r\n                    InlineBotResultQueryId = m.InlineBotResultQueryId;\r\n                }\r\n\r\n                if (m.InlineBotResultId != null)\r\n                {\r\n                    InlineBotResultId = m.InlineBotResultId;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessage40 : TLMessage36\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessage40;\r\n\r\n        public TLPeerBase FwdFromPeer { get; set; }\r\n\r\n        protected TLInputPeerBase _fwdFromChannelPeer;\r\n\r\n        public TLInputPeerBase FwdFromChannelPeer\r\n        {\r\n            get { return _fwdFromChannelPeer; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    Set(ref _customFlags, (int)MessageCustomFlags.FwdFromChannelPeer);\r\n                    _fwdFromChannelPeer = value;\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _customFlags, (int)MessageCustomFlags.FwdFromChannelPeer);\r\n                    _fwdFromChannelPeer = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        protected TLInt _fwdMessageId;\r\n\r\n        public TLInt FwdMessageId\r\n        {\r\n            get { return _fwdMessageId; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    Set(ref _customFlags, (int)MessageCustomFlags.FwdMessageId);\r\n                    _fwdMessageId = value;\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _customFlags, (int)MessageCustomFlags.FwdMessageId);\r\n                    _fwdMessageId = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        public virtual Visibility FwdFromPeerVisibility\r\n        {\r\n            get\r\n            {\r\n                var peerChannel = FwdFromPeer as TLPeerChannel;\r\n                if (peerChannel != null)\r\n                {\r\n                    var channelMediaPhoto = Media as TLMessageMediaPhoto;\r\n                    if (channelMediaPhoto != null)\r\n                    {\r\n                        return Visibility.Visible;\r\n                    }\r\n\r\n                    var channelMediaDocument = Media as TLMessageMediaDocument;\r\n                    if (channelMediaDocument != null && IsVideo(channelMediaDocument.Document))\r\n                    {\r\n                        return Visibility.Visible;\r\n                    }\r\n\r\n                    var channelMediaVideo = Media as TLMessageMediaVideo;\r\n                    if (channelMediaVideo != null)\r\n                    {\r\n                        return Visibility.Visible;\r\n                    }\r\n                }\r\n\r\n                var mediaPhoto = Media as TLMessageMediaPhoto;\r\n                if (FwdFromPeer != null && mediaPhoto != null)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                var mediaVideo = Media as TLMessageMediaVideo;\r\n                if (FwdFromPeer != null && mediaVideo != null)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                var mediaDocument = Media as TLMessageMediaDocument;\r\n                if (FwdFromPeer != null && mediaDocument != null)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                var emptyMedia = Media as TLMessageMediaEmpty;\r\n                var webPageMedia = Media as TLMessageMediaWebPage;\r\n                return FwdFromPeer != null && !TLString.IsNullOrEmpty(Message) && (emptyMedia != null || webPageMedia != null) ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public TLMessageBase Group { get; set; }\r\n\r\n        public void SetFromId()\r\n        {\r\n            Set(ref _flags, (int)MessageFlags.FromId);\r\n        }\r\n\r\n        public void SetMedia()\r\n        {\r\n            Set(ref _flags, (int)MessageFlags.Media);\r\n        }\r\n\r\n        public override TLObject FwdFrom\r\n        {\r\n            get\r\n            {\r\n                if (FwdFromId != null)\r\n                {\r\n                    var cacheService = InMemoryCacheService.Instance;\r\n                    return cacheService.GetUser(FwdFromId);\r\n                }\r\n\r\n                if (FwdFromPeer != null)\r\n                {\r\n                    var cacheService = InMemoryCacheService.Instance;\r\n\r\n                    if (FwdFromPeer is TLPeerChannel)\r\n                    {\r\n                        return cacheService.GetChat(FwdFromPeer.Id);\r\n                    }\r\n\r\n                    return cacheService.GetUser(FwdFromPeer.Id);\r\n                }\r\n\r\n                return null;\r\n            }\r\n            set\r\n            {\r\n\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = IsSet(Flags, (int)MessageFlags.FromId)\r\n                ? GetObject<TLInt>(bytes, ref position)\r\n                : new TLInt(-1);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromPeer = GetObject<TLPeerBase>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n\r\n            _media = IsSet(Flags, (int)MessageFlags.Media)\r\n                ? GetObject<TLMessageMediaBase>(bytes, ref position)\r\n                : new TLMessageMediaEmpty();\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n            _views = IsSet(Flags, (int)MessageFlags.Views)\r\n                ? GetObject<TLInt>(bytes, ref position)\r\n                : new TLInt(0);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromPeer = GetObject<TLPeerBase>(input);\r\n                FwdDate = GetObject<TLInt>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n\r\n            _media = IsSet(Flags, (int)MessageFlags.Media)\r\n                ? GetObject<TLMessageMediaBase>(input)\r\n                : new TLMessageMediaEmpty();\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Views))\r\n            {\r\n                Views = GetObject<TLInt>(input);\r\n            }\r\n            else\r\n            {\r\n                Views = new TLInt(0);\r\n            }\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            var randomId = GetObject<TLLong>(input);\r\n            if (randomId.Value != 0)\r\n            {\r\n                RandomId = randomId;\r\n            }\r\n            var status = GetObject<TLInt>(input);\r\n            _status = (MessageStatus)status.Value;\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdMessageId))\r\n            {\r\n                _fwdMessageId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdFromChannelPeer))\r\n            {\r\n                _fwdFromChannelPeer = GetObject<TLInputPeerBase>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            try\r\n            {\r\n\r\n                Flags.ToStream(output);\r\n                Id = Id ?? new TLInt(0);\r\n                output.Write(Id.ToBytes());\r\n                output.Write(FromId.ToBytes());\r\n                ToId.ToStream(output);\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n                {\r\n                    FwdFromPeer.ToStream(output);\r\n                    FwdDate.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n                {\r\n                    ReplyToMsgId.ToStream(output);\r\n                }\r\n\r\n                output.Write(Date.ToBytes());\r\n                Message.ToStream(output);\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.Media))\r\n                {\r\n                    _media.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n                {\r\n                    ReplyMarkup.ToStream(output);\r\n                }\r\n                if (IsSet(Flags, (int)MessageFlags.Entities))\r\n                {\r\n                    Entities.ToStream(output);\r\n                }\r\n                if (IsSet(Flags, (int)MessageFlags.Views))\r\n                {\r\n                    if (Views == null)\r\n                    {\r\n                        var logString = string.Format(\"TLMessage40.ToStream id={0} flags={1} fwd_from_peer={2} fwd_date={3} reply_to_msg_id={4} media={5} reply_markup={6} entities={7} views={8} from_id={9}\", Index, MessageFlagsString(Flags), FwdFromPeer, FwdDate, ReplyToMsgId, Media, ReplyMarkup, Entities, Views, FromId);\r\n                        Log.Write(logString);\r\n                    }\r\n\r\n                    Views = Views ?? new TLInt(0);\r\n                    Views.ToStream(output);\r\n                }\r\n\r\n                CustomFlags.NullableToStream(output);\r\n\r\n                RandomId = RandomId ?? new TLLong(0);\r\n                RandomId.ToStream(output);\r\n                var status = new TLInt((int)Status);\r\n                output.Write(status.ToBytes());\r\n\r\n                if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdMessageId))\r\n                {\r\n                    _fwdMessageId.ToStream(output);\r\n                }\r\n\r\n                if (IsSet(CustomFlags, (int)MessageCustomFlags.FwdFromChannelPeer))\r\n                {\r\n                    _fwdFromChannelPeer.ToStream(output);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                var logString = string.Format(\"TLMessage40.ToStream id={0} flags={1} fwd_from_peer={2} fwd_date={3} reply_to_msg_id={4} media={5} reply_markup={6} entities={7} views={8} from_id={9}\", Index, MessageFlagsString(Flags), FwdFromPeer, FwdDate, ReplyToMsgId, Media, ReplyMarkup, Entities, Views, FromId);\r\n\r\n                TLUtils.WriteException(logString, ex);\r\n            }\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = message as TLMessage40;\r\n            if (m != null)\r\n            {\r\n                FwdFromPeer = m.FwdFromPeer;\r\n                if (m.FwdMessageId != null) FwdMessageId = m.FwdMessageId;\r\n                if (m.FwdFromChannelPeer != null) FwdFromChannelPeer = m.FwdFromChannelPeer;\r\n                if (m.Views != null)\r\n                {\r\n                    var currentViews = Views != null ? Views.Value : 0;\r\n                    if (currentViews < m.Views.Value)\r\n                    {\r\n                        Views = m.Views;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessage36 : TLMessage34\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessage36;\r\n\r\n        protected TLInt _views;\r\n\r\n        public TLInt Views\r\n        {\r\n            get { return _views; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    if (_views == null || _views.Value < value.Value)\r\n                    {\r\n                        Set(ref _flags, (int)MessageFlags.Views);\r\n                        _views = value;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public Visibility ViewsVisibility\r\n        {\r\n            get\r\n            {\r\n                var message40 = this as TLMessage40;\r\n                if (message40 != null)\r\n                {\r\n                    return Views != null && Views.Value > 0 ? Visibility.Visible : Visibility.Collapsed;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject<TLInt>(bytes, ref position);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n\r\n            _media = IsSet(Flags, (int)MessageFlags.Media)\r\n                ? GetObject<TLMessageMediaBase>(bytes, ref position)\r\n                : new TLMessageMediaEmpty();\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(input);\r\n                FwdDate = GetObject<TLInt>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            _media = GetObject<TLMessageMediaBase>(input);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(input);\r\n            }\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            var randomId = GetObject<TLLong>(input);\r\n            if (randomId.Value != 0)\r\n            {\r\n                RandomId = randomId;\r\n            }\r\n            var status = GetObject<TLInt>(input);\r\n            _status = (MessageStatus)status.Value;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Id = Id ?? new TLInt(0);\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FromId.ToBytes());\r\n            ToId.ToStream(output);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId.ToStream(output);\r\n                FwdDate.ToStream(output);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId.ToStream(output);\r\n            }\r\n\r\n            output.Write(Date.ToBytes());\r\n            Message.ToStream(output);\r\n            _media.ToStream(output);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup.ToStream(output);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities.ToStream(output);\r\n            }\r\n\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            RandomId = RandomId ?? new TLLong(0);\r\n            RandomId.ToStream(output);\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLMessage34 : TLMessage31\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessage34;\r\n\r\n        protected TLVector<TLMessageEntityBase> _entities;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set { SetField(out _entities, value, ref _flags, (int)MessageFlags.Entities); }\r\n        }\r\n\r\n        public override void Edit(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage34;\r\n            if (message != null)\r\n            {\r\n                Message = message.Message;\r\n                Entities = message.Entities;\r\n                ReplyMarkup = message.ReplyMarkup;\r\n\r\n                var oldGeoLive = Media as TLMessageMediaGeoLive;\r\n                var newGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                if (oldGeoLive != null && newGeoLive != null)\r\n                {\r\n                    oldGeoLive.Geo = newGeoLive.Geo;\r\n                    oldGeoLive.Period = newGeoLive.Period;\r\n                }\r\n\r\n                var oldInvoice = Media as TLMessageMediaInvoice;\r\n                var newInvoice = message.Media as TLMessageMediaInvoice;\r\n                if (oldInvoice != null && newInvoice != null && newInvoice.ReceiptMsgId != null)\r\n                {\r\n                    oldInvoice.ReceiptMsgId = newInvoice.ReceiptMsgId;\r\n                }\r\n\r\n                var oldWebPage = Media as TLMessageMediaWebPage;\r\n                var newWebPage = message.Media as TLMessageMediaWebPage;\r\n                if ((oldWebPage == null && newWebPage != null)\r\n                    || (oldWebPage != null && newWebPage == null)\r\n                    || (oldWebPage != null && newWebPage != null && oldWebPage.WebPage.Id.Value != newWebPage.WebPage.Id.Value))\r\n                {\r\n                    _media = (TLMessageMediaBase)newWebPage ?? new TLMessageMediaEmpty();\r\n                }\r\n\r\n                var oldGame = Media as TLMessageMediaGame;\r\n                var newGame = message.Media as TLMessageMediaGame;\r\n                if (oldGame != null && newGame != null)\r\n                {\r\n                    oldGame.Message = message.Message;\r\n                }\r\n\r\n                var mediaCaption = message.Media as IMediaCaption;\r\n                var cachedMediaCaption = Media as IMediaCaption;\r\n                if (cachedMediaCaption != null && mediaCaption != null)\r\n                {\r\n                    cachedMediaCaption.Caption = mediaCaption.Caption;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject<TLInt>(bytes, ref position);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            _media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(input);\r\n                FwdDate = GetObject<TLInt>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            _media = GetObject<TLMessageMediaBase>(input);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(input);\r\n            }\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            var randomId = GetObject<TLLong>(input);\r\n            if (randomId.Value != 0)\r\n            {\r\n                RandomId = randomId;\r\n            }\r\n            var status = GetObject<TLInt>(input);\r\n            _status = (MessageStatus)status.Value;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Id = Id ?? new TLInt(0);\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FromId.ToBytes());\r\n            ToId.ToStream(output);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId.ToStream(output);\r\n                FwdDate.ToStream(output);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId.ToStream(output);\r\n            }\r\n\r\n            output.Write(Date.ToBytes());\r\n            Message.ToStream(output);\r\n            _media.ToStream(output);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup.ToStream(output);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities.ToStream(output);\r\n            }\r\n\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            RandomId = RandomId ?? new TLLong(0);\r\n            RandomId.ToStream(output);\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = message as TLMessage34;\r\n            if (m != null)\r\n            {\r\n                if (m.Entities != null)\r\n                {\r\n                    Entities = m.Entities;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessage31 : TLMessage25\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessage31;\r\n\r\n        protected TLReplyKeyboardBase _replyMarkup;\r\n\r\n        public TLReplyKeyboardBase ReplyMarkup\r\n        {\r\n            get { return _replyMarkup; }\r\n            set { SetField(out _replyMarkup, value, ref _flags, (int)MessageFlags.ReplyMarkup); }\r\n        }\r\n\r\n        protected TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject<TLInt>(bytes, ref position);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            _media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(input);\r\n                FwdDate = GetObject<TLInt>(input);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            _media = GetObject<TLMessageMediaBase>(input);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup = GetObject<TLReplyKeyboardBase>(input);\r\n            }\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            var randomId = GetObject<TLLong>(input);\r\n            if (randomId.Value != 0)\r\n            {\r\n                RandomId = randomId;\r\n            }\r\n            var status = GetObject<TLInt>(input);\r\n            _status = (MessageStatus)status.Value;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Id = Id ?? new TLInt(0);\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FromId.ToBytes());\r\n            ToId.ToStream(output);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId.ToStream(output);\r\n                FwdDate.ToStream(output);\r\n            }\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId.ToStream(output);\r\n            }\r\n\r\n            output.Write(Date.ToBytes());\r\n            Message.ToStream(output);\r\n            _media.ToStream(output);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyMarkup))\r\n            {\r\n                ReplyMarkup.ToStream(output);\r\n            }\r\n\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            RandomId = RandomId ?? new TLLong(0);\r\n            RandomId.ToStream(output);\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = message as TLMessage31;\r\n            if (m != null)\r\n            {\r\n                if (m.ReplyMarkup != null)\r\n                {\r\n                    var oldCustomFlags = ReplyMarkup != null ? ReplyMarkup.CustomFlags : null;\r\n                    ReplyMarkup = m.ReplyMarkup;\r\n                    ReplyMarkup.CustomFlags = oldCustomFlags;\r\n                }\r\n\r\n                if (m.CustomFlags != null)\r\n                {\r\n                    CustomFlags = m.CustomFlags;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessage25 : TLMessage17, IReplyToMsgId\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessage25;\r\n\r\n        public TLInt FwdFromId { get; set; }\r\n\r\n        public TLInt FwdDate { get; set; }\r\n\r\n        protected TLInt _replyToMsgId;\r\n\r\n        public TLInt ReplyToMsgId\r\n        {\r\n            get { return _replyToMsgId; }\r\n            set { SetField(out _replyToMsgId, value, ref _flags, (int)MessageFlags.ReplyToMsgId); }\r\n        }\r\n\r\n        public override ReplyInfo ReplyInfo\r\n        {\r\n            get { return ReplyToMsgId != null ? new ReplyInfo { ReplyToMsgId = ReplyToMsgId, Reply = Reply } : null; }\r\n        }\r\n\r\n        public override Visibility ReplyVisibility\r\n        {\r\n            get { return ReplyToMsgId != null && ReplyToMsgId.Value != 0 ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public void SetFwd()\r\n        {\r\n            Set(ref _flags, (int)MessageFlags.FwdFrom);\r\n        }\r\n\r\n        public void SetReply()\r\n        {\r\n            Set(ref _flags, (int)MessageFlags.ReplyToMsgId);\r\n        }\r\n\r\n        public void SetListened()\r\n        {\r\n            Unset(ref _flags, (int)MessageFlags.MediaUnread);\r\n        }\r\n\r\n        public bool NotListened\r\n        {\r\n            get { return IsSet(_flags, (int)MessageFlags.MediaUnread); }\r\n            set { SetUnset(ref _flags, value, (int)MessageFlags.MediaUnread); }\r\n        }\r\n\r\n        public override TLObject FwdFrom\r\n        {\r\n            get\r\n            {\r\n                if (FwdFromId == null) return null;\r\n\r\n                var cacheService = InMemoryCacheService.Instance;\r\n                return cacheService.GetUser(FwdFromId);\r\n            }\r\n            set\r\n            {\r\n\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var messageString = Message != null ? Message.ToString() : string.Empty;\r\n\r\n            var mediaString = Media.GetType().Name;\r\n            //var mediaPhoto = Media as TLMessageMediaPhoto;\r\n            //if (mediaPhoto != null)\r\n            //{\r\n            //    mediaString = mediaPhoto.ToString() + \" \";\r\n            //}\r\n            var str = Media == null || Media is TLMessageMediaEmpty\r\n                ? \" Msg=\" + messageString.Substring(0, Math.Min(messageString.Length, 5))\r\n                : \" Media=\" + mediaString;\r\n\r\n            return base.ToString() + string.Format(\" Flags={0}\" + str, MessageFlagsString(Flags));\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject<TLInt>(bytes, ref position);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            _media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(input);\r\n                FwdDate = GetObject<TLInt>(input);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(input);\r\n            }\r\n\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            _media = GetObject<TLMessageMediaBase>(input);\r\n\r\n            var randomId = GetObject<TLLong>(input);\r\n            if (randomId.Value != 0)\r\n            {\r\n                RandomId = randomId;\r\n            }\r\n            var status = GetObject<TLInt>(input);\r\n            _status = (MessageStatus)status.Value;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Id = Id ?? new TLInt(0);\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FromId.ToBytes());\r\n            ToId.ToStream(output);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId.ToStream(output);\r\n                FwdDate.ToStream(output);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId.ToStream(output);\r\n            }\r\n\r\n            output.Write(Date.ToBytes());\r\n            Message.ToStream(output);\r\n            _media.ToStream(output);\r\n\r\n            RandomId = RandomId ?? new TLLong(0);\r\n            RandomId.ToStream(output);\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = message as TLMessage25;\r\n            if (m != null)\r\n            {\r\n                FwdFromId = m.FwdFromId;\r\n                FwdDate = m.FwdDate;\r\n                ReplyToMsgId = m.ReplyToMsgId;\r\n\r\n                if (m.Reply != null)\r\n                {\r\n                    Reply = m.Reply;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessage17 : TLMessage\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessage17;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLBool Out\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)MessageFlags.Out)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)MessageFlags.Out);\r\n                }\r\n            }\r\n        }\r\n\r\n        public override void SetUnread(TLBool value)\r\n        {\r\n            Unread = value;\r\n        }\r\n\r\n        public override void SetUnreadSilent(TLBool value)\r\n        {\r\n            if (value != null)\r\n            {\r\n                SetUnset(ref _flags, value.Value, (int)MessageFlags.Unread);\r\n            }\r\n        }\r\n\r\n        public override TLBool Unread\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)MessageFlags.Unread)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)MessageFlags.Unread);\r\n                    NotifyOfPropertyChange(() => Status);\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsMention\r\n        {\r\n            get { return IsSet(_flags, (int)MessageFlags.Mentioned); }\r\n            set { SetUnset(ref _flags, value, (int)MessageFlags.Mentioned); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject<TLInt>(bytes, ref position);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            _media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            _media = GetObject<TLMessageMediaBase>(input);\r\n\r\n            var randomId = GetObject<TLLong>(input);\r\n            if (randomId.Value != 0)\r\n            {\r\n                RandomId = randomId;\r\n            }\r\n            var status = GetObject<TLInt>(input);\r\n            _status = (MessageStatus)status.Value;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Id = Id ?? new TLInt(0);\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FromId.ToBytes());\r\n            ToId.ToStream(output);\r\n            output.Write(Date.ToBytes());\r\n            Message.ToStream(output);\r\n            _media.ToStream(output);\r\n\r\n            RandomId = RandomId ?? new TLLong(0);\r\n            RandomId.ToStream(output);\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = (TLMessage17)message;\r\n            var fixUnread = false;\r\n            if (!Unread.Value && m.Unread.Value)\r\n            {\r\n                fixUnread = true;\r\n#if DEBUG\r\n                var builder = new StringBuilder();\r\n#if  WINDOWS_PHONE\r\n                var stackTrace = new StackTrace();\r\n                var frames = stackTrace.GetFrames();\r\n                foreach (var r in frames)\r\n                {\r\n                    builder.AppendLine(string.Format(\"Method: {0}\", r.GetMethod()));\r\n                }\r\n#endif\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"Set read message as unread\\ncurrent=\" + this + \"\\nnew=\" + message + \"\\n\\n\" + builder.ToString());\r\n#endif\r\n            }\r\n\r\n            Flags = m.Flags;\r\n\r\n            if (fixUnread)\r\n            {\r\n                SetUnreadSilent(TLBool.False);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessage : TLMessageCommon, IMessage\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessage;\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public TLMessageMediaBase _media;\r\n\r\n        public TLMessageMediaBase Media\r\n        {\r\n            get { return _media; }\r\n            set { SetField(ref _media, value, () => Media); }\r\n        }\r\n\r\n        public override Visibility SelectionVisibility\r\n        {\r\n            get { return IsExpired() ? Visibility.Collapsed : Visibility.Visible; }\r\n        }\r\n\r\n        public override int MediaSize\r\n        {\r\n            get { return Media.MediaSize; }\r\n        }\r\n\r\n        public override Visibility MediaSizeVisibility\r\n        {\r\n            get { return _media is TLMessageMediaVideo ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public override bool IsMusic()\r\n        {\r\n            var mediaDocument = _media as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                return IsMusic(mediaDocument.Document);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override bool IsVoice()\r\n        {\r\n            var mediaDocument = _media as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                return IsVoice(mediaDocument.Document);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override bool IsRoundVideo()\r\n        {\r\n            var mediaDocument = _media as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                return IsRoundVideo(mediaDocument.Document);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override bool IsVideo()\r\n        {\r\n            var mediaDocument = _media as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                return IsVideo(mediaDocument.Document);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override bool IsSticker()\r\n        {\r\n            var mediaDocument = _media as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                return IsSticker(mediaDocument.Document);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override bool IsExpired()\r\n        {\r\n            return IsExpired(_media);\r\n        }\r\n\r\n        public override bool HasTTL()\r\n        {\r\n            return HasTTL(_media);\r\n        }\r\n\r\n        public override bool IsGif()\r\n        {\r\n            var mediaDocument = _media as IMediaGif;\r\n            if (mediaDocument != null)\r\n            {\r\n                return IsGif(mediaDocument.Document);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get\r\n            {\r\n                if (Media != null)\r\n                {\r\n                    return Media.MediaWidth;\r\n                }\r\n\r\n                return base.MediaWidth;\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return base.ToString();\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            base.FromBytes(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            _media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            base.FromStream(input);\r\n            Message = GetObject<TLString>(input);\r\n            _media = GetObject<TLMessageMediaBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id = Id ?? new TLInt(0);\r\n            output.Write(Id.ToBytes());\r\n            base.ToStream(output);\r\n            Message.ToStream(output);\r\n            _media.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = (TLMessage)message;\r\n            Message = m.Message;\r\n            var oldMedia = Media;\r\n            var newMedia = m.Media;\r\n            if (oldMedia.GetType() != newMedia.GetType())\r\n            {\r\n                _media = m.Media;\r\n            }\r\n            else\r\n            {\r\n                var oldInvoice = oldMedia as TLMessageMediaInvoice;\r\n                var newInvoice = newMedia as TLMessageMediaInvoice;\r\n                if (oldInvoice != null && newInvoice != null && newInvoice.ReceiptMsgId != null)\r\n                {\r\n                    oldInvoice.ReceiptMsgId = newInvoice.ReceiptMsgId;\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaGame = oldMedia as TLMessageMediaGame;\r\n                var newMediaGame = newMedia as TLMessageMediaGame;\r\n                if (oldMediaGame != null && newMediaGame != null)\r\n                {\r\n                    newMediaGame.Message = m.Message;\r\n                    if (oldMediaGame.Game.GetType() != newMediaGame.Game.GetType())\r\n                    {\r\n                        _media = m.Media;\r\n                    }\r\n                    else\r\n                    {\r\n                        var oldGame = oldMediaGame.Game;\r\n                        var newGame = newMediaGame.Game;\r\n                        if (oldGame != null\r\n                            && newGame != null\r\n                            && (oldGame.Id.Value != newGame.Id.Value))\r\n                        {\r\n                            newMediaGame.SourceMessage = this;\r\n                            _media = newMediaGame;\r\n                        }\r\n                        else\r\n                        {\r\n                            oldMediaGame.Message = m.Message;\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaWebPage = oldMedia as TLMessageMediaWebPage;\r\n                var newMediaWebPage = newMedia as TLMessageMediaWebPage;\r\n                if (oldMediaWebPage != null && newMediaWebPage != null)\r\n                {\r\n                    if (oldMediaWebPage.WebPage.GetType() != newMediaWebPage.WebPage.GetType())\r\n                    {\r\n                        _media = m.Media;\r\n                    }\r\n                    else\r\n                    {\r\n                        var oldWebPage = oldMediaWebPage.WebPage as TLWebPage35;\r\n                        var newWebPage = newMediaWebPage.WebPage as TLWebPage35;\r\n                        if (oldWebPage != null\r\n                            && newWebPage != null\r\n                            && (oldWebPage.Id.Value != newWebPage.Id.Value))\r\n                        {\r\n                            _media = m.Media;\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaDocument = oldMedia as TLMessageMediaDocument;\r\n                var newMediaDocument = newMedia as TLMessageMediaDocument;\r\n                if (oldMediaDocument != null && newMediaDocument != null)\r\n                {\r\n                    if (oldMediaDocument.Document.GetType() != newMediaDocument.Document.GetType())\r\n                    {\r\n                        _media = m.Media;\r\n                    }\r\n                    else\r\n                    {\r\n                        var oldDocument = oldMediaDocument.Document as TLDocument;\r\n                        var newDocument = newMediaDocument.Document as TLDocument;\r\n                        if (oldDocument != null\r\n                            && newDocument != null\r\n                            && (oldDocument.Id.Value != newDocument.Id.Value\r\n                                || oldDocument.AccessHash.Value != newDocument.AccessHash.Value))\r\n                        {\r\n                            var isoFileName = Media.IsoFileName;\r\n                            var notListened = Media.NotListened;\r\n#if WP8\r\n                            var file = Media.File;\r\n#endif\r\n                            _media = m.Media;\r\n                            _media.IsoFileName = isoFileName;\r\n                            _media.NotListened = notListened;\r\n\r\n#if WP8\r\n                            _media.File = file;\r\n#endif\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaVideo = oldMedia as TLMessageMediaVideo;\r\n                var newMediaVideo = newMedia as TLMessageMediaVideo;\r\n                if (oldMediaVideo != null && newMediaVideo != null)\r\n                {\r\n                    if (oldMediaVideo.Video.GetType() != newMediaVideo.Video.GetType())\r\n                    {\r\n                        _media = m.Media;\r\n                    }\r\n                    else\r\n                    {\r\n                        var oldVideo = oldMediaVideo.Video as TLVideo;\r\n                        var newVideo = newMediaVideo.Video as TLVideo;\r\n                        if (oldVideo != null\r\n                            && newVideo != null\r\n                            && (oldVideo.Id.Value != newVideo.Id.Value\r\n                                || oldVideo.AccessHash.Value != newVideo.AccessHash.Value))\r\n                        {\r\n                            var isoFileName = Media.IsoFileName;\r\n                            _media = m.Media;\r\n                            _media.IsoFileName = isoFileName;\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaAudio = oldMedia as TLMessageMediaAudio;\r\n                var newMediaAudio = newMedia as TLMessageMediaAudio;\r\n                if (oldMediaAudio != null && newMediaAudio != null)\r\n                {\r\n                    if (oldMediaAudio.Audio.GetType() != newMediaAudio.Audio.GetType())\r\n                    {\r\n                        _media = m.Media;\r\n                    }\r\n                    else\r\n                    {\r\n                        var oldAudio = oldMediaAudio.Audio as TLAudio;\r\n                        var newAudio = newMediaAudio.Audio as TLAudio;\r\n                        if (oldAudio != null\r\n                            && newAudio != null\r\n                            && (oldAudio.Id.Value != newAudio.Id.Value\r\n                                || oldAudio.AccessHash.Value != newAudio.AccessHash.Value))\r\n                        {\r\n                            var isoFileName = Media.IsoFileName;\r\n                            var notListened = Media.NotListened;\r\n                            _media = m.Media;\r\n                            _media.IsoFileName = isoFileName;\r\n                            _media.NotListened = notListened;\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var oldMediaPhoto = oldMedia as TLMessageMediaPhoto;\r\n                var newMediaPhoto = newMedia as TLMessageMediaPhoto;\r\n                if (oldMediaPhoto == null || newMediaPhoto == null)\r\n                {\r\n                    _media = m.Media;\r\n                }\r\n                else\r\n                {\r\n                    var oldPhoto = oldMediaPhoto.Photo as TLPhoto;\r\n                    var newPhoto = newMediaPhoto.Photo as TLPhoto;\r\n                    if (oldPhoto == null || newPhoto == null)\r\n                    {\r\n                        _media = m.Media;\r\n                    }\r\n                    else\r\n                    {\r\n                        if (oldPhoto.AccessHash.Value != newPhoto.AccessHash.Value)\r\n                        {\r\n                            var oldCachedSize = oldPhoto.Sizes.FirstOrDefault(x => x is TLPhotoCachedSize) as TLPhotoCachedSize;\r\n                            var oldMSize = oldPhoto.Sizes.FirstOrDefault(x => TLString.Equals(x.Type, new TLString(\"m\"), StringComparison.OrdinalIgnoreCase));\r\n                            foreach (var size in newPhoto.Sizes)\r\n                            {\r\n                                if (size is TLPhotoCachedSize)\r\n                                {\r\n                                    size.TempUrl = oldCachedSize != null ? oldCachedSize.TempUrl : null;\r\n                                }\r\n                                else if (TLString.Equals(size.Type, new TLString(\"s\"), StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    size.TempUrl = oldCachedSize != null ? oldCachedSize.TempUrl : null;\r\n                                }\r\n                                else\r\n                                {\r\n                                    size.TempUrl = oldMSize != null ? oldMSize.TempUrl : null;\r\n                                }\r\n                            }\r\n\r\n                            _media = m.Media;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        #region Additional\r\n\r\n        private TLInputMediaBase _inputMedia;\r\n\r\n        /// <summary>\r\n        /// To resend canceled message\r\n        /// </summary>\r\n        public TLInputMediaBase InputMedia\r\n        {\r\n            get { return _inputMedia; }\r\n            set { SetField(ref _inputMedia, value, () => InputMedia); }\r\n        }\r\n\r\n        public List<string> Links { get; set; }\r\n\r\n        #endregion\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLMessageForwarded17 : TLMessageForwarded\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageForwarded17;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLBool Out\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)MessageFlags.Out)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)MessageFlags.Out);\r\n                }\r\n            }\r\n        }\r\n\r\n        public override void SetUnread(TLBool value)\r\n        {\r\n            Unread = value;\r\n        }\r\n\r\n        public override TLBool Unread\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)MessageFlags.Unread)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)MessageFlags.Unread);\r\n                    NotifyOfPropertyChange(() => Status);\r\n                }\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FwdFromId = GetObject<TLInt>(bytes, ref position);\r\n            FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject<TLInt>(bytes, ref position);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            _media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FwdFromId = GetObject<TLInt>(input);\r\n            FwdDate = GetObject<TLInt>(input);\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            _media = GetObject<TLMessageMediaBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id = Id ?? new TLInt(0);\r\n            Id.ToStream(output);\r\n            FwdFromId.ToStream(output);\r\n            FwdDate.ToStream(output);\r\n            FromId.ToStream(output);\r\n            ToId.ToStream(output);\r\n            _date.ToStream(output);\r\n            Message.ToStream(output);\r\n            _media.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = (TLMessageForwarded17)message;\r\n            Flags = m.Flags;\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLMessageForwarded : TLMessage\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageForwarded;\r\n\r\n        public TLInt FwdFromId { get; set; }\r\n\r\n        public TLUserBase FwdFrom\r\n        {\r\n            get\r\n            {\r\n                var cacheService = InMemoryCacheService.Instance;\r\n                return cacheService.GetUser(FwdFromId);\r\n            }\r\n        }\r\n\r\n        public TLInt FwdDate { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FwdFromId = GetObject<TLInt>(bytes, ref position);\r\n            FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject<TLInt>(bytes, ref position);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n            Out = GetObject<TLBool>(bytes, ref position);\r\n            Unread = GetObject<TLBool>(bytes, ref position);\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            _media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FwdFromId = GetObject<TLInt>(input);\r\n            FwdDate = GetObject<TLInt>(input);\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n            Out = GetObject<TLBool>(input);\r\n            Unread = GetObject<TLBool>(input);\r\n            _date = GetObject<TLInt>(input);\r\n            Message = GetObject<TLString>(input);\r\n            _media = GetObject<TLMessageMediaBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id = Id ?? new TLInt(0);\r\n            Id.ToStream(output);\r\n            FwdFromId.ToStream(output);\r\n            FwdDate.ToStream(output);\r\n            FromId.ToStream(output);\r\n            ToId.ToStream(output);\r\n            Out.ToStream(output);\r\n            Unread.ToStream(output);\r\n            _date.ToStream(output);\r\n            Message.ToStream(output);\r\n            _media.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = (TLMessageForwarded)message;\r\n            FwdFromId = m.FwdFromId;\r\n            FwdDate = m.FwdDate;\r\n        }\r\n    }\r\n\r\n    public class TLMessageService49 : TLMessageService40, IReplyToMsgId\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageService49;\r\n\r\n        private TLInt _replyToMsgId;\r\n\r\n        public TLInt ReplyToMsgId\r\n        {\r\n            get { return _replyToMsgId; }\r\n            set { SetField(out _replyToMsgId, value, ref _flags, (int)MessageFlags.ReplyToMsgId); }\r\n        }\r\n\r\n        public override ReplyInfo ReplyInfo\r\n        {\r\n            get { return ReplyToMsgId != null ? new ReplyInfo { ReplyToMsgId = ReplyToMsgId, Reply = Reply } : null; }\r\n        }\r\n\r\n        public TLMessageService49 Media\r\n        {\r\n            get { return this; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = IsSet(Flags, (int)MessageFlags.FromId)\r\n                ? GetObject<TLInt>(bytes, ref position)\r\n                : new TLInt(-1);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Action = GetObject<TLMessageActionBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(input);\r\n            }\r\n            _date = GetObject<TLInt>(input);\r\n\r\n            // workaround: RandomId and Status were missing here, so Flags.31 (bits 100000...000) is recerved to handle this issue\r\n            if (IsSet(Flags, int.MinValue))\r\n            {\r\n                var randomId = GetObject<TLLong>(input);\r\n                if (randomId.Value != 0)\r\n                {\r\n                    RandomId = randomId;\r\n                }\r\n                var status = GetObject<TLInt>(input);\r\n                _status = (MessageStatus)status.Value;\r\n            }\r\n\r\n            Action = GetObject<TLMessageActionBase>(input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Set(ref _flags, int.MinValue); // workaround\r\n\r\n            Flags.ToStream(output);\r\n            Id = Id ?? new TLInt(0);\r\n            Id.ToStream(output);\r\n            FromId.ToStream(output);\r\n            ToId.ToStream(output);\r\n            ToStream(output, ReplyToMsgId, Flags, (int)MessageFlags.ReplyToMsgId);\r\n            _date.ToStream(output);\r\n\r\n            // workaround: RandomId and Status were missing here, so Flags.31 is recerved to handle this issue\r\n\r\n            RandomId = RandomId ?? new TLLong(0);\r\n            RandomId.ToStream(output);\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n\r\n            Action.ToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n\r\n            var m = message as TLMessageService49;\r\n            if (m != null)\r\n            {\r\n                if (m.ReplyToMsgId != null)\r\n                {\r\n                    ReplyToMsgId = m.ReplyToMsgId;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return base.ToString() + string.Format(\"ReplyToMsgId={0} Reply={1}\", ReplyToMsgId != null ? ReplyToMsgId.Value.ToString(CultureInfo.InvariantCulture) : \"null\", Reply != null ? Reply.GetType().Name : \"null\");\r\n        }\r\n    }\r\n\r\n    public class TLMessageService40 : TLMessageService17\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageService40;\r\n\r\n        private TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        public bool Silent { get { return IsSet(Flags, (int)MessageFlags.Silent); } }\r\n\r\n        public bool Post { get { return IsSet(Flags, (int)MessageFlags.Post); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = IsSet(Flags, (int)MessageFlags.FromId)\r\n                ? GetObject<TLInt>(bytes, ref position)\r\n                : new TLInt(-1);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Action = GetObject<TLMessageActionBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n            _date = GetObject<TLInt>(input);\r\n\r\n            // workaround: RandomId and Status were missing here, so Flags.31 (bits 100000...000) is recerved to handle this issue\r\n            if (IsSet(Flags, int.MinValue))\r\n            {\r\n                var randomId = GetObject<TLLong>(input);\r\n                if (randomId.Value != 0)\r\n                {\r\n                    RandomId = randomId;\r\n                }\r\n                var status = GetObject<TLInt>(input);\r\n                _status = (MessageStatus)status.Value;\r\n            }\r\n\r\n            Action = GetObject<TLMessageActionBase>(input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Set(ref _flags, int.MinValue); // workaround\r\n\r\n            Flags.ToStream(output);\r\n            Id = Id ?? new TLInt(0);\r\n            Id.ToStream(output);\r\n            FromId.ToStream(output);\r\n            ToId.ToStream(output);\r\n            _date.ToStream(output);\r\n\r\n            // workaround: RandomId and Status were missing here, so Flags.31 is recerved to handle this issue\r\n\r\n            RandomId = RandomId ?? new TLLong(0);\r\n            RandomId.ToStream(output);\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n\r\n            Action.ToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n\r\n            var m = message as TLMessageService40;\r\n            if (m != null)\r\n            {\r\n                if (m.CustomFlags != null)\r\n                {\r\n                    CustomFlags = m.CustomFlags;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return base.ToString() + \" CustomFlags=\" + MessageCustomFlagsString(CustomFlags);\r\n        }\r\n    }\r\n\r\n    public class TLMessageService17 : TLMessageService\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageService17;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLBool Out\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)MessageFlags.Out)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)MessageFlags.Out);\r\n                }\r\n            }\r\n        }\r\n\r\n        public override void SetUnread(TLBool value)\r\n        {\r\n            Unread = value;\r\n        }\r\n\r\n        public override void SetUnreadSilent(TLBool value)\r\n        {\r\n            if (value != null)\r\n            {\r\n                SetUnset(ref _flags, value.Value, (int)MessageFlags.Unread);\r\n            }\r\n        }\r\n\r\n        public override TLBool Unread\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)MessageFlags.Unread)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)MessageFlags.Unread);\r\n                    NotifyOfPropertyChange(() => Status);\r\n                }\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject<TLInt>(bytes, ref position);\r\n            ToId = GetObject<TLPeerBase>(bytes, ref position);\r\n            _date = GetObject<TLInt>(bytes, ref position);\r\n            Action = GetObject<TLMessageActionBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            FromId = GetObject<TLInt>(input);\r\n            ToId = GetObject<TLPeerBase>(input);\r\n            _date = GetObject<TLInt>(input);\r\n\r\n            // workaround: RandomId and Status were missing here, so Flags.31 (bits 100000...000) is recerved to handle this issue\r\n            if (IsSet(_flags, int.MinValue))\r\n            {\r\n                var randomId = GetObject<TLLong>(input);\r\n                if (randomId.Value != 0)\r\n                {\r\n                    RandomId = randomId;\r\n                }\r\n                var status = GetObject<TLInt>(input);\r\n                _status = (MessageStatus)status.Value;\r\n            }\r\n\r\n            Action = GetObject<TLMessageActionBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Set(ref _flags, int.MinValue); // workaround\r\n\r\n            Flags.ToStream(output);\r\n            Id = Id ?? new TLInt(0);\r\n            Id.ToStream(output);\r\n            FromId.ToStream(output);\r\n            ToId.ToStream(output);\r\n            _date.ToStream(output);\r\n\r\n            // workaround: RandomId and Status were missing here, so Flags.31 is recerved to handle this issue\r\n\r\n            RandomId = RandomId ?? new TLLong(0);\r\n            RandomId.ToStream(output);\r\n            var status = new TLInt((int)Status);\r\n            output.Write(status.ToBytes());\r\n\r\n            Action.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = (TLMessageService17)message;\r\n\r\n            Flags = m.Flags;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return base.ToString() + \" Flags=\" + MessageFlagsString(Flags);\r\n        }\r\n    }\r\n\r\n    public class TLMessageService : TLMessageCommon\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageService;\r\n\r\n        public TLMessageActionBase Action { get; set; }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get\r\n            {\r\n                var phoneCall = Action as TLMessageActionPhoneCall;\r\n                if (phoneCall != null)\r\n                {\r\n                    return 12.0 + 284.0 + 12.0;\r\n                }\r\n\r\n                return base.MediaWidth;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            base.FromBytes(bytes, ref position);\r\n            Action = GetObject<TLMessageActionBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            var id = GetObject<TLInt>(input);\r\n            if (id.Value != 0)\r\n            {\r\n                Id = id;\r\n            }\r\n            base.FromStream(input);\r\n            Action = GetObject<TLMessageActionBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id = Id ?? new TLInt(0);\r\n            Id.ToStream(output);\r\n            base.ToStream(output);\r\n            Action.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageBase message)\r\n        {\r\n            base.Update(message);\r\n            var m = (TLMessageService)message;\r\n\r\n            if (Action != null)\r\n            {\r\n                Action.Update(m.Action);\r\n            }\r\n            else\r\n            {\r\n                Action = m.Action;\r\n            }\r\n        }\r\n\r\n\r\n        public override void Edit(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessageService;\r\n            if (message != null)\r\n            {\r\n                var oldMessageMediaActionGame = Action as TLMessageActionGameScore;\r\n                var newMessageMediaActionGame = message.Action as TLMessageActionGameScore;\r\n\r\n                if (oldMessageMediaActionGame != null\r\n                    && newMessageMediaActionGame != null\r\n                    && oldMessageMediaActionGame.Score.Value != newMessageMediaActionGame.Score.Value)\r\n                {\r\n                    oldMessageMediaActionGame.Score = newMessageMediaActionGame.Score;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override Visibility SelectionVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return base.ToString() + \" action=\" + Action;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessageAction.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum MessageActionPhoneCallFlags\r\n    {\r\n        Reason = 0x1,           // 0\r\n        Duration = 0x2,         // 1\r\n    }\r\n\r\n    [Flags]\r\n    public enum MessageActionPaymentSentMeFlags\r\n    {\r\n        Info = 0x1,             // 0\r\n        ShippingOptionId = 0x2, // 1\r\n    }\r\n\r\n    public abstract class TLMessageActionBase : TLObject\r\n    {\r\n        public abstract void Update(TLMessageActionBase newAction);\r\n\r\n        public TLPhotoBase Photo { get; set; }\r\n    }\r\n\r\n    public class TLMessageActionEmpty : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChatCreate : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChatCreate;\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLVector<TLInt> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Title = GetObject<TLString>(input);\r\n            Users = GetObject<TLVector<TLInt>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Title.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n            var action = newAction as TLMessageActionChatCreate;\r\n            if (action != null)\r\n            {\r\n                Title = action.Title;\r\n                Users = action.Users;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChannelCreate : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChannelCreate;\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Title = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Title.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n            var action = newAction as TLMessageActionChannelCreate;\r\n            if (action != null)\r\n            {\r\n                Title = action.Title;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionToggleComments : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionToggleComments;\r\n\r\n        public TLBool Enabled { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Enabled = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Enabled = GetObject<TLBool>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Enabled.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n            var action = newAction as TLMessageActionToggleComments;\r\n            if (action != null)\r\n            {\r\n                Enabled = action.Enabled;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChatEditTitle : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChatEditTitle;\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Title = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Title.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n            var action = newAction as TLMessageActionChatEditTitle;\r\n            if (action != null)\r\n            {\r\n                Title = action.Title;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChatEditPhoto : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChatEditPhoto;\r\n\r\n        //public TLPhotoBase Photo { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Photo = GetObject<TLPhotoBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Photo.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n            var action = newAction as TLMessageActionChatEditPhoto;\r\n            if (action != null)\r\n            {\r\n                if (Photo != null)\r\n                {\r\n                    Photo.Update(action.Photo);\r\n                }\r\n                else\r\n                {\r\n                    Photo = action.Photo;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChatDeletePhoto : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChatDeletePhoto;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n            \r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChannelJoined : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChannelJoined;\r\n\r\n        public TLInt InviterId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            InviterId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            InviterId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            InviterId.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n            var action = newAction as TLMessageActionChannelJoined;\r\n            if (action != null)\r\n            {\r\n                InviterId = action.InviterId;\r\n            }\r\n        }\r\n    }\r\n\r\n    public abstract class TLMessageActionChatAddUserBase : TLMessageActionBase\r\n    {\r\n        \r\n    }\r\n\r\n    public class TLMessageActionChatAddUser : TLMessageActionChatAddUserBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChatAddUser;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n            var action = newAction as TLMessageActionChatAddUser;\r\n            if (action != null)\r\n            {\r\n                UserId = action.UserId;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChatAddUser41 : TLMessageActionChatAddUserBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChatAddUser41;\r\n\r\n        public TLVector<TLInt> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Users = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Users = GetObject<TLVector<TLInt>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Users.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n            var action = newAction as TLMessageActionChatAddUser41;\r\n            if (action != null)\r\n            {\r\n                Users = action.Users;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChatDeleteUser : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChatDeleteUser;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n            var action = newAction as TLMessageActionChatDeleteUser;\r\n            if (action != null)\r\n            {\r\n                UserId = action.UserId;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChatJoinedByLink : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChatJoinedByLink;\r\n\r\n        public TLInt InviterId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            InviterId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            InviterId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            InviterId.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionUnreadMessages : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionUnreadMessages;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n            \r\n        }\r\n    }\r\n\r\n    public class TLMessageActionContactRegistered : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionContactRegistered;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionMessageGroup : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionMessageGroup;\r\n\r\n        public TLMessageGroup Group { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Group = GetObject<TLMessageGroup>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Group = GetObject<TLMessageGroup>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Group.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChatMigrateTo : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChatMigrateTo;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChatDeactivate : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChatDeactivate;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChatActivate : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChatActivate;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionChannelMigrateFrom : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionChannelMigrateFrom;\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Title = GetObject<TLString>(input);\r\n            ChatId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Title.ToStream(output);\r\n            ChatId.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionPinMessage : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionPinMessage;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionClearHistory : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionClearHistory;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionGameScore : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionGameScore;\r\n\r\n        public TLLong GameId { get; set; }\r\n\r\n        public TLInt Score { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} game_id={1} score={2}\", GetType().Name, GameId, Score);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            GameId = GetObject<TLLong>(bytes, ref position);\r\n            Score = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            GameId = GetObject<TLLong>(input);\r\n            Score = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            GameId.ToStream(output);\r\n            Score.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase action)\r\n        {\r\n            var actionGameScore = action as TLMessageActionGameScore;\r\n            if (actionGameScore != null)\r\n            {\r\n                GameId = actionGameScore.GameId;\r\n                Score = actionGameScore.Score;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionPhoneCall : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionPhoneCall;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLLong CallId { get; set; }\r\n\r\n        protected TLPhoneCallDiscardReasonBase _reason;\r\n\r\n        public TLPhoneCallDiscardReasonBase Reason\r\n        {\r\n            get { return _reason; }\r\n            set { SetField(out _reason, value, ref _flags, (int) MessageActionPhoneCallFlags.Reason); }\r\n        }\r\n\r\n        protected TLInt _duration;\r\n\r\n        public TLInt Duration\r\n        {\r\n            get { return _duration; }\r\n            set { SetField(out _duration, value, ref _flags, (int) MessageActionPhoneCallFlags.Duration); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            CallId = GetObject<TLLong>(bytes, ref position);\r\n            _reason = GetObject<TLPhoneCallDiscardReasonBase>(Flags, (int) MessageActionPhoneCallFlags.Reason, null, bytes, ref position);\r\n            _duration = GetObject<TLInt>(Flags, (int) MessageActionPhoneCallFlags.Duration, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            CallId = GetObject<TLLong>(input);\r\n            _reason = GetObject<TLPhoneCallDiscardReasonBase>(Flags, (int) MessageActionPhoneCallFlags.Reason, null, input);\r\n            _duration = GetObject<TLInt>(Flags, (int) MessageActionPhoneCallFlags.Duration, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            CallId.ToStream(output);\r\n            ToStream(output, Reason, Flags, (int) MessageActionPhoneCallFlags.Reason);\r\n            ToStream(output, Duration, Flags, (int) MessageActionPhoneCallFlags.Duration);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase action)\r\n        {\r\n            var actionPhoneCall = action as TLMessageActionPhoneCall;\r\n            if (actionPhoneCall != null)\r\n            {\r\n                CallId = actionPhoneCall.CallId;\r\n                Reason = actionPhoneCall.Reason;\r\n                Duration = actionPhoneCall.Duration;\r\n            }\r\n        }\r\n    }\r\n\r\n    public abstract class TLMessageActionPaymentSentBase : TLMessageActionBase\r\n    {\r\n        public TLString Currency { get; set; }\r\n\r\n        public TLLong TotalAmount { get; set; }\r\n    }\r\n\r\n    public class TLMessageActionPaymentSentMe : TLMessageActionPaymentSentBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionPaymentSentMe;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLString Payload { get; set; }\r\n\r\n        protected TLPaymentRequestedInfo _info;\r\n\r\n        public TLPaymentRequestedInfo Info\r\n        {\r\n            get { return _info; }\r\n            set { SetField(out _info, value, ref _flags, (int) MessageActionPaymentSentMeFlags.Info); }\r\n        }\r\n\r\n        protected TLString _shippingOptionId;\r\n\r\n        public TLString ShippingOptionId\r\n        {\r\n            get { return _shippingOptionId; }\r\n            set { SetField(out _shippingOptionId, value, ref _flags, (int) MessageActionPaymentSentMeFlags.ShippingOptionId); }\r\n        }\r\n\r\n        public TLPaymentCharge Charge { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Currency = GetObject<TLString>(bytes, ref position);\r\n            TotalAmount = GetObject<TLLong>(bytes, ref position);\r\n            Payload = GetObject<TLString>(bytes, ref position);\r\n            _info = GetObject<TLPaymentRequestedInfo>(Flags, (int) MessageActionPaymentSentMeFlags.Info, null, bytes, ref position);\r\n            _shippingOptionId = GetObject<TLString>(Flags, (int) MessageActionPaymentSentMeFlags.ShippingOptionId, null, bytes, ref position);\r\n            Charge = GetObject<TLPaymentCharge>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Currency = GetObject<TLString>(input);\r\n            TotalAmount = GetObject<TLLong>(input);\r\n            Payload = GetObject<TLString>(input);\r\n            _info = GetObject<TLPaymentRequestedInfo>(Flags, (int) MessageActionPaymentSentMeFlags.Info, null, input);\r\n            _shippingOptionId = GetObject<TLString>(Flags, (int) MessageActionPaymentSentMeFlags.ShippingOptionId, null, input);\r\n            Charge = GetObject<TLPaymentCharge>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Currency.ToStream(output);\r\n            TotalAmount.ToStream(output);\r\n            Payload.ToStream(output);\r\n            ToStream(output, _info, Flags, (int) MessageActionPaymentSentMeFlags.Info);\r\n            ToStream(output, _shippingOptionId, Flags, (int) MessageActionPaymentSentMeFlags.ShippingOptionId);\r\n            Charge.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase action)\r\n        {\r\n            var actionPaymentSentMe = action as TLMessageActionPaymentSentMe;\r\n            if (actionPaymentSentMe != null)\r\n            {\r\n                Currency = actionPaymentSentMe.Currency;\r\n                TotalAmount = actionPaymentSentMe.TotalAmount;\r\n                Payload = actionPaymentSentMe.Payload;\r\n                Info = actionPaymentSentMe.Info;\r\n                ShippingOptionId = actionPaymentSentMe.ShippingOptionId;\r\n                Charge = actionPaymentSentMe.Charge;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionPaymentSent : TLMessageActionPaymentSentBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionPaymentSent;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Currency = GetObject<TLString>(bytes, ref position);\r\n            TotalAmount = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Currency = GetObject<TLString>(input);\r\n            TotalAmount = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Currency.ToStream(output);\r\n            TotalAmount.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase action)\r\n        {\r\n            var actionPaymentSent = action as TLMessageActionPaymentSent;\r\n            if (actionPaymentSent != null)\r\n            {\r\n                Currency = actionPaymentSent.Currency;\r\n                TotalAmount = actionPaymentSent.TotalAmount;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionScreenshotTaken : TLMessageActionPaymentSentBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionScreenshotTaken;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase action)\r\n        {\r\n\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionCustomAction : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionCustomAction;\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Message = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Message.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionBotAllowed : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionBotAllowed;\r\n\r\n        public TLString Domain { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Domain = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Domain = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Domain.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionSecureValuesSentMe : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionSecureValuesSentMe;\r\n\r\n        public TLVector<TLSecureValue> Values { get; set; }\r\n\r\n        public TLSecureCredentialsEncrypted Credentials { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Values = GetObject<TLVector<TLSecureValue>>(bytes, ref position);\r\n            Credentials = GetObject<TLSecureCredentialsEncrypted>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Values = GetObject<TLVector<TLSecureValue>>(input);\r\n            Credentials = GetObject<TLSecureCredentialsEncrypted>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Values.ToStream(output);\r\n            Credentials.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class TLMessageActionSecureValuesSent : TLMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageActionSecureValuesSent;\r\n\r\n        public TLVector<TLSecureValueTypeBase> Types { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Types = GetObject<TLVector<TLSecureValueTypeBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Types = GetObject<TLVector<TLSecureValueTypeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Types.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLMessageActionBase newAction)\r\n        {\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLMessageContainer.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLContainer : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLContainer;\r\n\r\n        public List<TLContainerTransportMessage> Messages { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = new List<TLContainerTransportMessage>();\r\n\r\n            var length = BitConverter.ToInt32(bytes, position);\r\n            position += 4;\r\n            for (var i = 0; i < length; i++)\r\n            {\r\n                Messages.Add(GetObject<TLContainerTransportMessage>(bytes, ref position));\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            var stream = new MemoryStream();\r\n            foreach (var message in Messages)\r\n            {\r\n                var bytes = message.ToBytes();\r\n                stream.Write(bytes, 0, bytes.Length);\r\n            }\r\n\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                BitConverter.GetBytes(Messages.Count),\r\n                stream.ToArray());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLMessageEditData.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n\r\n    [Flags]\r\n    public enum MessageEditDataFlags\r\n    {\r\n        Caption = 0x1,           // 0\r\n    }\r\n\r\n    public class TLMessageEditData : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEditData;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public bool Caption { get { return IsSet(Flags, (int) MessageEditDataFlags.Caption); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessageEntity.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLMessageEntityBase : TLObject\r\n    {\r\n        public TLInt Offset { get; set; }\r\n\r\n        public TLInt Length { get; set; }\r\n    }\r\n\r\n    public class TLMessageEntityUnknown : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityUnknown;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityMention : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityMention;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityHashtag : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityHashtag;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityBotCommand : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityBotCommand;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityUrl : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityUrl;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityEmail : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityEmail;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityBold : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityBold;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityItalic : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityItalic;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityCode : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityCode;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityPre : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityPre;\r\n\r\n        public TLString Language { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n            Language = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes(),\r\n                Language.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n            Language.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n            Language = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityTextUrl : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityTextUrl;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes(),\r\n                Url.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n            Url.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n            Url = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLInputMessageEntityMentionName : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageEntityMentionName;\r\n\r\n        public TLInputUserBase User { get; set; }\r\n\r\n        public string Name { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n            User = GetObject<TLInputUserBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes(),\r\n                User.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n            User.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n            User = GetObject<TLInputUserBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityMentionName : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityMentionName;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public string Name { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes(),\r\n                UserId.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n            UserId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityPhone : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityPhone;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageEntityCashtag : TLMessageEntityBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageEntityCashtag;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Offset = GetObject<TLInt>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Offset.ToBytes(),\r\n                Length.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Offset.ToStream(output);\r\n            Length.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Offset = GetObject<TLInt>(input);\r\n            Length = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessageFwdHeader.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Cache;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n\r\n    [Flags]\r\n    public enum MessageFwdHeaderFlags\r\n    {\r\n        From = 0x1,             // 0\r\n        Channel = 0x2,          // 1\r\n        ChannelPost = 0x4,      // 2\r\n        PostAuthor = 0x8,       // 3\r\n        Saved = 0x10,           // 4\r\n    }\r\n\r\n    public class TLMessageFwdHeader : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageFwdHeader;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLInt _fromId;\r\n\r\n        public TLInt FromId\r\n        {\r\n            get { return _fromId; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    _fromId = value;\r\n                    Set(ref _flags, (int)MessageFwdHeaderFlags.From);\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _flags, (int)MessageFwdHeaderFlags.From);\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        private TLInt _channelId;\r\n\r\n        public TLInt ChannelId\r\n        {\r\n            get { return _channelId; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    _channelId = value;\r\n                    Set(ref _flags, (int) MessageFwdHeaderFlags.Channel);\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _flags, (int)MessageFwdHeaderFlags.Channel);\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLInt _channelPost;\r\n\r\n        public TLInt ChannelPost\r\n        {\r\n            get { return _channelPost; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    _channelPost = value;\r\n                    Set(ref _flags, (int)MessageFwdHeaderFlags.ChannelPost);\r\n                }\r\n                else\r\n                {\r\n                    Unset(ref _flags, (int)MessageFwdHeaderFlags.ChannelPost);\r\n                }\r\n            }\r\n        }\r\n\r\n        private string _fullName;\r\n\r\n        public virtual string FullName\r\n        {\r\n            get\r\n            {\r\n                if (_fullName != null) return _fullName;\r\n\r\n                var cacheService = InMemoryCacheService.Instance;\r\n\r\n                var channel = ChannelId != null? cacheService.GetChat(ChannelId) : null;\r\n                var user = FromId != null? cacheService.GetUser(FromId) : null;\r\n\r\n                if (channel != null && user != null)\r\n                {\r\n                    _fullName = string.Format(\"{0} ({1})\", channel.FullName, user.FullName);\r\n                    return _fullName;\r\n                }\r\n\r\n                if (channel != null)\r\n                {\r\n                    _fullName = channel.FullName;\r\n                    return _fullName;\r\n                }\r\n\r\n                if (user != null)\r\n                {\r\n                    _fullName = user.FullName2;\r\n                    return _fullName;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            if (IsSet(Flags, (int) MessageFwdHeaderFlags.From))\r\n            {\r\n                FromId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            if (IsSet(Flags, (int) MessageFwdHeaderFlags.Channel))\r\n            {\r\n                ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFwdHeaderFlags.ChannelPost))\r\n            {\r\n                ChannelPost = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            if (IsSet(Flags, (int) MessageFwdHeaderFlags.From))\r\n            {\r\n                FromId = GetObject<TLInt>(input);\r\n            }\r\n            Date = GetObject<TLInt>(input);\r\n            if (IsSet(Flags, (int) MessageFwdHeaderFlags.Channel))\r\n            {\r\n                ChannelId = GetObject<TLInt>(input);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFwdHeaderFlags.ChannelPost))\r\n            {\r\n                ChannelPost = GetObject<TLInt>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, FromId, Flags, (int)MessageFwdHeaderFlags.From);\r\n            Date.ToStream(output);\r\n            ToStream(output, ChannelId, Flags, (int)MessageFwdHeaderFlags.Channel);\r\n            ToStream(output, ChannelPost, Flags, (int)MessageFwdHeaderFlags.ChannelPost);\r\n        }\r\n\r\n        public TLPeerBase ToFwdFromPeer()\r\n        {\r\n            if (ChannelId != null)\r\n            {\r\n                return new TLPeerChannel{ Id = ChannelId };\r\n            }\r\n\r\n            return new TLPeerUser { Id = FromId };\r\n        }\r\n    }\r\n\r\n    public class TLMessageFwdHeader73 : TLMessageFwdHeader70\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageFwdHeader73;\r\n\r\n        private TLPeerBase _savedFromPeer;\r\n\r\n        public TLPeerBase SavedFromPeer\r\n        {\r\n            get { return _savedFromPeer; }\r\n            set { SetField(out _savedFromPeer, value, ref _flags, (int)MessageFwdHeaderFlags.Saved); }\r\n        }\r\n\r\n        private TLInt _savedFromMsgId;\r\n\r\n        public TLInt SavedFromMsgId\r\n        {\r\n            get { return _savedFromMsgId; }\r\n            set { SetField(out _savedFromMsgId, value, ref _flags, (int)MessageFwdHeaderFlags.Saved); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.From, null, bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            ChannelId = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.Channel, null, bytes, ref position);\r\n            ChannelPost = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.ChannelPost, null, bytes, ref position);\r\n            PostAuthor = GetObject<TLString>(Flags, (int)MessageFwdHeaderFlags.PostAuthor, null, bytes, ref position);\r\n            SavedFromPeer = GetObject<TLPeerBase>(Flags, (int)MessageFwdHeaderFlags.Saved, null, bytes, ref position);\r\n            SavedFromMsgId = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.Saved, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            FromId = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.From, null, input);\r\n            Date = GetObject<TLInt>(input);\r\n            ChannelId = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.Channel, null, input);\r\n            ChannelPost = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.ChannelPost, null, input);\r\n            PostAuthor = GetObject<TLString>(Flags, (int)MessageFwdHeaderFlags.PostAuthor, null, input);\r\n            SavedFromPeer = GetObject<TLPeerBase>(Flags, (int)MessageFwdHeaderFlags.Saved, null, input);\r\n            SavedFromMsgId = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.Saved, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, FromId, Flags, (int)MessageFwdHeaderFlags.From);\r\n            Date.ToStream(output);\r\n            ToStream(output, ChannelId, Flags, (int)MessageFwdHeaderFlags.Channel);\r\n            ToStream(output, ChannelPost, Flags, (int)MessageFwdHeaderFlags.ChannelPost);\r\n            ToStream(output, PostAuthor, Flags, (int)MessageFwdHeaderFlags.PostAuthor);\r\n            ToStream(output, SavedFromPeer, Flags, (int)MessageFwdHeaderFlags.Saved);\r\n            ToStream(output, SavedFromMsgId, Flags, (int)MessageFwdHeaderFlags.Saved);\r\n        }\r\n    }\r\n\r\n    public class TLMessageFwdHeader70 : TLMessageFwdHeader\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageFwdHeader70;\r\n\r\n        private TLString _postAuthor;\r\n\r\n        public TLString PostAuthor\r\n        {\r\n            get { return _postAuthor; }\r\n            set { SetField(out _postAuthor, value, ref _flags, (int) MessageFwdHeaderFlags.PostAuthor); }\r\n        }\r\n\r\n        private TLObject _from;\r\n\r\n        public TLObject From\r\n        {\r\n            get\r\n            {\r\n                if (_from != null) return _from;\r\n\r\n                if (FromId == null && ChannelId == null) return null;\r\n\r\n                if (ChannelId != null)\r\n                {\r\n                    var cacheService = InMemoryCacheService.Instance;\r\n                    _from = cacheService.GetChat(ChannelId);\r\n                }\r\n                else if (FromId != null)\r\n                {\r\n                    var cacheService = InMemoryCacheService.Instance;\r\n                    _from = cacheService.GetUser(FromId);\r\n                }\r\n\r\n                return _from;\r\n            }\r\n        }\r\n\r\n        private string _fullName;\r\n\r\n        public override string FullName\r\n        {\r\n            get\r\n            {\r\n                if (_fullName != null) return _fullName;\r\n\r\n                var cacheService = InMemoryCacheService.Instance;\r\n\r\n                var channel = ChannelId != null ? cacheService.GetChat(ChannelId) : null;\r\n                var user = FromId != null ? cacheService.GetUser(FromId) : null;\r\n\r\n                if (channel != null && (user != null || !TLString.IsNullOrEmpty(PostAuthor)))\r\n                {\r\n                    _fullName = string.Format(\"{0} ({1})\", channel.FullName, user != null ? user.FullName : PostAuthor.ToString());\r\n                    return _fullName;\r\n                }\r\n\r\n                if (channel != null)\r\n                {\r\n                    _fullName = channel.FullName;\r\n                    return _fullName;\r\n                }\r\n\r\n                if (!TLString.IsNullOrEmpty(PostAuthor))\r\n                {\r\n                    return _fullName = PostAuthor.ToString();\r\n                }\r\n\r\n                if (user != null)\r\n                {\r\n                    _fullName = user.FullName2;\r\n                    return _fullName;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            FromId = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.From, null, bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            ChannelId = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.Channel, null, bytes, ref position);\r\n            ChannelPost = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.ChannelPost, null, bytes, ref position);\r\n            PostAuthor = GetObject<TLString>(Flags, (int)MessageFwdHeaderFlags.PostAuthor, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            FromId = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.From, null, input);\r\n            Date = GetObject<TLInt>(input);\r\n            ChannelId = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.Channel, null, input);\r\n            ChannelPost = GetObject<TLInt>(Flags, (int)MessageFwdHeaderFlags.ChannelPost, null, input);\r\n            PostAuthor = GetObject<TLString>(Flags, (int)MessageFwdHeaderFlags.PostAuthor, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, FromId, Flags, (int)MessageFwdHeaderFlags.From);\r\n            Date.ToStream(output);\r\n            ToStream(output, ChannelId, Flags, (int)MessageFwdHeaderFlags.Channel);\r\n            ToStream(output, ChannelPost, Flags, (int)MessageFwdHeaderFlags.ChannelPost);\r\n            ToStream(output, PostAuthor, Flags, (int)MessageFwdHeaderFlags.PostAuthor);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessageGroup.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLMessageGroup : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageGroup;\r\n\r\n        public TLInt MinId { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                MinId.ToBytes(),\r\n                MaxId.ToBytes(),\r\n                Count.ToBytes(),\r\n                Date.ToBytes()\r\n            );\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            MinId = GetObject<TLInt>(bytes, ref position);\r\n            MaxId = GetObject<TLInt>(bytes, ref position);\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            MinId.ToStream(output);\r\n            MaxId.ToStream(output);\r\n            Count.ToStream(output);\r\n            Date.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            MinId = GetObject<TLInt>(input);\r\n            MaxId = GetObject<TLInt>(input);\r\n            Count = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessageInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLMessageDetailedInfoBase : TLObject\r\n    {\r\n        public TLLong AnswerMessageId { get; set; }\r\n\r\n        public TLInt Bytes { get; set; }\r\n\r\n        public TLInt Status { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            AnswerMessageId = GetObject<TLLong>(bytes, ref position);\r\n            Bytes = GetObject<TLInt>(bytes, ref position);\r\n            Status = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLMessageDetailedInfo : TLMessageDetailedInfoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageDetailedInfo;\r\n\r\n        public TLLong MessageId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            MessageId = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return base.FromBytes(bytes, ref position);\r\n        }\r\n    }\r\n\r\n    public class TLMessageNewDetailedInfo : TLMessageDetailedInfoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageNewDetailedInfo;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return base.FromBytes(bytes, ref position);\r\n        }\r\n    }\r\n\r\n    public class TLMessagesAllInfo : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessagesAllInfo;\r\n\r\n        public TLVector<TLLong> MessageIds { get; set; } \r\n\r\n        public TLString Info { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            MessageIds = GetObject<TLVector<TLLong>>(bytes, ref position);\r\n            Info = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessageMedia.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\n#if WP81\r\nusing Windows.Media.Transcoding;\r\n#endif\r\nusing System.Linq;\r\n#if WIN_RT\r\nusing Windows.UI.Xaml;\r\n#else\r\nusing System.Windows;\r\n#endif\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum MessageMediaPhotoFlags\r\n    {\r\n        Photo = 0x1,                        // 0\r\n        Caption = 0x2,                      // 1\r\n        TTLSeconds = 0x4,                   // 2\r\n    }\r\n\r\n    [Flags]\r\n    public enum MessageMediaDocumentFlags\r\n    {\r\n        Document = 0x1,                     // 0\r\n        Caption = 0x2,                      // 1\r\n        TTLSeconds = 0x4,                   // 2\r\n    }\r\n\r\n    [Flags]\r\n    public enum MessageMediaInvoiceFlags\r\n    {\r\n        Photo = 0x1,                        // 0\r\n        ShippingAddressRequested = 0x2,     // 1\r\n        ReceiptMsgId = 0x4,                 // 2\r\n        Test = 0x8,                         // 3\r\n    }\r\n\r\n    public interface IMediaCaption\r\n    {\r\n        TLString Caption { get; set; }\r\n    }\r\n\r\n    public interface ITTLMessageMedia\r\n    {\r\n        TLInt TTLSeconds { get; set; }\r\n\r\n        TTLParams TTLParams { get; set; }\r\n    }\r\n\r\n    public interface IMediaGifBase\r\n    {\r\n        double DownloadingProgress { get; set; }\r\n\r\n        double LastProgress { get; set; }\r\n\r\n        bool IsCanceled { get; set; }\r\n\r\n        string IsoFileName { get; set; }\r\n\r\n        bool? AutoPlayGif { get; set; }\r\n\r\n        bool Forbidden { get; set; }\r\n    }\r\n\r\n    public interface IMediaGif : IMediaGifBase\r\n    {\r\n        TLDocumentBase Document { get; }\r\n    }\r\n\r\n    public interface IDecryptedMediaGif : IMediaGifBase\r\n    {\r\n        TLDecryptedMessageMediaDocument Document { get; }\r\n    }\r\n\r\n    public interface IMessageMediaGeoPoint\r\n    {\r\n        TLGeoPointBase Geo { get; }\r\n    }\r\n\r\n    public abstract class TLMessageMediaBase : TLObject\r\n    {\r\n        public bool Forbidden { get; set; }\r\n\r\n        public virtual bool? AutoPlayGif { get; set; }\r\n\r\n        public TLMessageMediaBase Self { get { return this; } }\r\n\r\n        public TLMessageMediaBase ThumbSelf { get { return this; } }\r\n\r\n        public virtual int MediaSize { get { return 0; } }\r\n\r\n        private double _uploadingProgress;\r\n\r\n        public double UploadingProgress\r\n        {\r\n            get { return _uploadingProgress; }\r\n            set { SetField(ref _uploadingProgress, value, () => UploadingProgress); }\r\n        }\r\n\r\n        private double _downloadingProgress;\r\n\r\n        public double DownloadingProgress\r\n        {\r\n            get { return _downloadingProgress; }\r\n            set { SetField(ref _downloadingProgress, value, () => DownloadingProgress); }\r\n        }\r\n\r\n        private double _compressingProgress;\r\n\r\n        public double CompressingProgress\r\n        {\r\n            get { return _compressingProgress; }\r\n            set { SetField(ref _compressingProgress, value, () => CompressingProgress); }\r\n        }\r\n\r\n        public double LastProgress { get; set; }\r\n\r\n        private bool _notListened;\r\n\r\n        public bool NotListened\r\n        {\r\n            get { return _notListened; }\r\n            set { _notListened = value; }\r\n        }\r\n\r\n        private bool _out = true;\r\n\r\n        public bool Out\r\n        {\r\n            get { return _out; }\r\n            set { _out = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// For internal use\r\n        /// </summary>\r\n        public TLLong FileId { get; set; }\r\n\r\n        public string IsoFileName { get; set; }\r\n\r\n#if WP8\r\n        public StorageFile File { get; set; }\r\n#endif\r\n#if WP81\r\n        public PrepareTranscodeResult TranscodeResult { get; set; }\r\n#endif\r\n\r\n        private bool _isCanceled;\r\n\r\n        public bool IsCanceled\r\n        {\r\n            get { return _isCanceled; }\r\n            set { _isCanceled = value; }\r\n        }\r\n\r\n        public virtual double MediaWidth\r\n        {\r\n            get { return 12.0 + 311.0 + 12.0; }\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaEmpty : TLMessageMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaDocument75 : TLMessageMediaDocument70\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageMediaDocument75;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            _document = GetObject<TLDocumentBase>(Flags, (int)MessageMediaDocumentFlags.Document, null, bytes, ref position);\r\n            Caption = null;\r\n            _ttlSeconds = GetObject<TLInt>(Flags, (int)MessageMediaPhotoFlags.TTLSeconds, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            _document = GetObject<TLDocumentBase>(Flags, (int)MessageMediaDocumentFlags.Document, null, input);\r\n            Caption = null;\r\n            _ttlSeconds = GetObject<TLInt>(Flags, (int)MessageMediaDocumentFlags.TTLSeconds, null, input);\r\n\r\n            var isoFileName = GetObject<TLString>(input);\r\n            IsoFileName = isoFileName.ToString();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, Document, Flags, (int)MessageMediaDocumentFlags.Document);\r\n            ToStream(output, TTLSeconds, Flags, (int)MessageMediaDocumentFlags.TTLSeconds);\r\n\r\n            var isoFileName = new TLString(IsoFileName);\r\n            isoFileName.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Document != null ? \"TLMessageMediaDocument75 \" + Document : \"TLMessageMediaDocument70\";\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaDocument70 : TLMessageMediaDocument45, ITTLMessageMedia\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageMediaDocument70;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        protected TLDocumentBase _document;\r\n\r\n        public override TLDocumentBase Document\r\n        {\r\n            get { return _document; }\r\n            set { SetField(out _document, value, ref _flags, (int)MessageMediaDocumentFlags.Document); }\r\n        }\r\n\r\n        protected TLString _caption;\r\n\r\n        public override TLString Caption\r\n        {\r\n            get { return _caption; }\r\n            set { SetField(out _caption, value, ref _flags, (int)MessageMediaDocumentFlags.Caption); }\r\n        }\r\n\r\n        protected TLInt _ttlSeconds;\r\n\r\n        public TLInt TTLSeconds\r\n        {\r\n            get { return _ttlSeconds; }\r\n            set { SetField(out _ttlSeconds, value, ref _flags, (int)MessageMediaDocumentFlags.TTLSeconds); }\r\n        }\r\n\r\n        public TTLParams TTLParams { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            _document = GetObject<TLDocumentBase>(Flags, (int)MessageMediaDocumentFlags.Document, null, bytes, ref position);\r\n            Caption = GetObject(Flags, (int)MessageMediaPhotoFlags.Caption, TLString.Empty, bytes, ref position);\r\n            _ttlSeconds = GetObject<TLInt>(Flags, (int)MessageMediaPhotoFlags.TTLSeconds, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            _document = GetObject<TLDocumentBase>(Flags, (int)MessageMediaDocumentFlags.Document, null, input);\r\n            Caption = GetObject(Flags, (int)MessageMediaDocumentFlags.Caption, TLString.Empty, input);\r\n            _ttlSeconds = GetObject<TLInt>(Flags, (int)MessageMediaDocumentFlags.TTLSeconds, null, input);\r\n\r\n            var isoFileName = GetObject<TLString>(input);\r\n            IsoFileName = isoFileName.ToString();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, Document, Flags, (int)MessageMediaDocumentFlags.Document);\r\n            ToStream(output, Caption, Flags, (int)MessageMediaDocumentFlags.Caption);\r\n            ToStream(output, TTLSeconds, Flags, (int)MessageMediaDocumentFlags.TTLSeconds);\r\n\r\n            var isoFileName = new TLString(IsoFileName);\r\n            isoFileName.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Document != null ? \"TLMessageMediaDocument70 \" + Document : \"TLMessageMediaDocument70\";\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaDocument45 : TLMessageMediaDocument, IMediaCaption\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageMediaDocument45;\r\n\r\n        private bool? _autoPlayGif;\r\n\r\n        public override bool? AutoPlayGif\r\n        {\r\n            get\r\n            {\r\n                if (TLMessageBase.IsRoundVideo(Document))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return _autoPlayGif;\r\n            }\r\n            set { _autoPlayGif = value; }\r\n        }\r\n\r\n        public virtual TLString Caption { get; set; }\r\n\r\n        public TLString Waveform\r\n        {\r\n            get\r\n            {\r\n                var document = Document as TLDocument22;\r\n                if (document != null)\r\n                {\r\n                    var documentAttributeAudio = document.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio46) as TLDocumentAttributeAudio46;\r\n                    if (documentAttributeAudio != null)\r\n                    {\r\n                        return documentAttributeAudio.Waveform;\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Document = GetObject<TLDocumentBase>(bytes, ref position);\r\n            Caption = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Document = GetObject<TLDocumentBase>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            var isoFileName = GetObject<TLString>(input);\r\n            IsoFileName = isoFileName.ToString();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Document.ToStream(output);\r\n            Caption.ToStream(output);\r\n\r\n            var isoFileName = new TLString(IsoFileName);\r\n            isoFileName.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaDocument : TLMessageMediaBase, IMediaGif\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaDocument;\r\n\r\n        public virtual TLDocumentBase Document { get; set; }\r\n\r\n        public TLDocumentBase Video { get { return Document; } }\r\n\r\n        public override int MediaSize\r\n        {\r\n            get\r\n            {\r\n                return Document.DocumentSize;\r\n            }\r\n        }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get\r\n            {\r\n                var document = Document as TLDocument22;\r\n                if (document != null)\r\n                {\r\n                    if (TLMessageBase.HasTTL(this))\r\n                    {\r\n                        return 2.0 + 256.0 + 2.0;\r\n                    }\r\n                    if (TLMessageBase.IsSticker(document))\r\n                    {\r\n                        var maxStickerDimension = 196.0;\r\n\r\n                        return 6.0 + GetStickerDimension(document, true, maxStickerDimension) + 6.0;\r\n                    }\r\n                    if (TLMessageBase.IsVoice(document))\r\n                    {\r\n                        return 12.0 + 284.0 + 12.0;\r\n                    }\r\n                    if (TLMessageBase.IsRoundVideo(document))\r\n                    {\r\n                        return 2.0 + 240.0 + 2.0;\r\n                    }\r\n                    if (TLMessageBase.IsVideo(document))\r\n                    {\r\n                        return 2.0 + 230.0 + 2.0;\r\n                    }\r\n                    if (TLMessageBase.IsGif(document))\r\n                    {\r\n                        var maxGifDimension = 323.0;\r\n\r\n                        return 2.0 + GetGifDimension(document.Thumb as IPhotoSize, document, true, maxGifDimension) + 2.0;\r\n                    }\r\n                }\r\n\r\n                return base.MediaWidth;\r\n\r\n            }\r\n        }\r\n\r\n        public static double GetGifDimension(IPhotoSize thumb, IAttributes source, bool isWidth, double maxGifDimension)\r\n        {\r\n            TLDocumentAttributeVideo videoAttribute = null;\r\n            if (source != null)\r\n            {\r\n                for (var i = 0; i < source.Attributes.Count; i++)\r\n                {\r\n                    videoAttribute = source.Attributes[i] as TLDocumentAttributeVideo;\r\n                    if (videoAttribute != null)\r\n                    {\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (videoAttribute != null)\r\n            {\r\n                var width = videoAttribute.W.Value;\r\n                var height = videoAttribute.H.Value;\r\n\r\n                var maxDimension = width;\r\n                if (maxDimension > 0)\r\n                {\r\n                    var scaleFactor = maxGifDimension / maxDimension;\r\n\r\n                    return isWidth ? scaleFactor * width : scaleFactor * height;\r\n                }\r\n            }\r\n\r\n            if (thumb != null)\r\n            {\r\n                var width = thumb.W.Value;\r\n                var height = thumb.H.Value;\r\n\r\n                var maxDimension = width;\r\n                if (maxDimension > 0)\r\n                {\r\n                    var scaleFactor = maxGifDimension / maxDimension;\r\n\r\n                    return isWidth ? scaleFactor * width : scaleFactor * height;\r\n                }\r\n            }\r\n\r\n            return maxGifDimension;\r\n        }\r\n\r\n        public static double GetStickerDimension(IAttributes source, bool isWidth, double maxImageDimension)\r\n        {\r\n            TLDocumentAttributeImageSize imageSizeAttribute = null;\r\n            for (var i = 0; i < source.Attributes.Count; i++)\r\n            {\r\n                imageSizeAttribute = source.Attributes[i] as TLDocumentAttributeImageSize;\r\n                if (imageSizeAttribute != null)\r\n                {\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (imageSizeAttribute != null)\r\n            {\r\n                var width = imageSizeAttribute.W.Value;\r\n                var height = imageSizeAttribute.H.Value;\r\n\r\n                var maxDimension = Math.Max(width, height);\r\n                if (maxDimension > maxImageDimension)\r\n                {\r\n                    var scaleFactor = maxImageDimension / maxDimension;\r\n\r\n                    return isWidth ? scaleFactor * width : scaleFactor * height;\r\n                }\r\n\r\n                return isWidth ? width : height;\r\n            }\r\n\r\n            return isWidth ? double.NaN : maxImageDimension;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Document = GetObject<TLDocumentBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Document = GetObject<TLDocumentBase>(input);\r\n\r\n            var isoFileName = GetObject<TLString>(input);\r\n            IsoFileName = isoFileName.ToString();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Document.ToStream(output);\r\n\r\n            var isoFileName = new TLString(IsoFileName);\r\n            isoFileName.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaAudio : TLMessageMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaAudio;\r\n\r\n        public TLAudioBase Audio { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Audio = GetObject<TLAudioBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Audio = GetObject<TLAudioBase>(input);\r\n\r\n            var isoFileName = GetObject<TLString>(input);\r\n            IsoFileName = isoFileName.ToString();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Audio.ToStream(output);\r\n\r\n            var isoFileName = new TLString(IsoFileName);\r\n            isoFileName.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaPhoto75 : TLMessageMediaPhoto70\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageMediaPhoto75;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)MessageMediaPhotoFlags.Photo, null, bytes, ref position);\r\n            Caption = null;\r\n            _ttlSeconds = GetObject<TLInt>(Flags, (int)MessageMediaPhotoFlags.TTLSeconds, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)MessageMediaPhotoFlags.Photo, null, input);\r\n            Caption = null;\r\n            _ttlSeconds = GetObject<TLInt>(Flags, (int)MessageMediaPhotoFlags.TTLSeconds, null, input);\r\n\r\n            var isoFileName = GetObject<TLString>(input);\r\n            IsoFileName = isoFileName.ToString();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, Photo, Flags, (int)MessageMediaPhotoFlags.Photo);\r\n            ToStream(output, TTLSeconds, Flags, (int)MessageMediaPhotoFlags.TTLSeconds);\r\n\r\n            var isoFileName = new TLString(IsoFileName);\r\n            isoFileName.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Photo != null ? \"TLMessageMediaPhoto75 \" + Photo : \"TLMessageMediaPhoto75\";\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaPhoto70 : TLMessageMediaPhoto28, ITTLMessageMedia\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageMediaPhoto70;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        protected TLPhotoBase _photo;\r\n\r\n        public override TLPhotoBase Photo\r\n        {\r\n            get { return _photo; }\r\n            set { SetField(out _photo, value, ref _flags, (int)MessageMediaPhotoFlags.Photo); }\r\n        }\r\n\r\n        protected TLString _caption;\r\n\r\n        public override TLString Caption\r\n        {\r\n            get { return _caption; }\r\n            set { SetField(out _caption, value, ref _flags, (int)MessageMediaPhotoFlags.Caption); }\r\n        }\r\n\r\n        protected TLInt _ttlSeconds;\r\n\r\n        public TLInt TTLSeconds\r\n        {\r\n            get { return _ttlSeconds; }\r\n            set { SetField(out _ttlSeconds, value, ref _flags, (int)MessageMediaPhotoFlags.TTLSeconds); }\r\n        }\r\n\r\n        public TTLParams TTLParams { get; set; }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get\r\n            {\r\n                if (TLMessageBase.HasTTL(this) && Photo != null)\r\n                {\r\n                    return 2.0 + 256.0 + 2.0;\r\n                }\r\n\r\n                return base.MediaWidth;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)MessageMediaPhotoFlags.Photo, null, bytes, ref position);\r\n            Caption = GetObject(Flags, (int)MessageMediaPhotoFlags.Caption, TLString.Empty, bytes, ref position);\r\n            _ttlSeconds = GetObject<TLInt>(Flags, (int)MessageMediaPhotoFlags.TTLSeconds, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)MessageMediaPhotoFlags.Photo, null, input);\r\n            Caption = GetObject(Flags, (int)MessageMediaPhotoFlags.Caption, TLString.Empty, input);\r\n            _ttlSeconds = GetObject<TLInt>(Flags, (int)MessageMediaPhotoFlags.TTLSeconds, null, input);\r\n\r\n            var isoFileName = GetObject<TLString>(input);\r\n            IsoFileName = isoFileName.ToString();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, Photo, Flags, (int)MessageMediaPhotoFlags.Photo);\r\n            ToStream(output, Caption, Flags, (int)MessageMediaPhotoFlags.Caption);\r\n            ToStream(output, TTLSeconds, Flags, (int)MessageMediaPhotoFlags.TTLSeconds);\r\n\r\n            var isoFileName = new TLString(IsoFileName);\r\n            isoFileName.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Photo != null ? \"TLMessageMediaPhoto70\" + Photo : \"TLMessageMediaPhoto70\";\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaPhoto28 : TLMessageMediaPhoto, IMediaCaption\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageMediaPhoto28;\r\n\r\n        public virtual TLString Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            Caption = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Photo = GetObject<TLPhotoBase>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            var isoFileName = GetObject<TLString>(input);\r\n            IsoFileName = isoFileName.ToString();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Photo.ToStream(output);\r\n            Caption.ToStream(output);\r\n\r\n            var isoFileName = new TLString(IsoFileName);\r\n            isoFileName.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Photo.ToString();\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaPhoto : TLMessageMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaPhoto;\r\n\r\n        public virtual TLPhotoBase Photo { get; set; }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get\r\n            {\r\n                var minVerticalRatioToScale = 1.2;\r\n                var scale = 1.2; // must be less than minVerticalRatioToScale to avoid large square photos\r\n                var maxDimension = 323.0;\r\n\r\n                var photo = Photo as TLPhoto;\r\n                if (photo != null)\r\n                {\r\n                    IPhotoSize size = null;\r\n                    var sizes = photo.Sizes.OfType<IPhotoSize>();\r\n                    foreach (var photoSize in sizes)\r\n                    {\r\n                        if (size == null\r\n                            || Math.Abs(maxDimension - size.H.Value) > Math.Abs(maxDimension - photoSize.H.Value))\r\n                        {\r\n                            size = photoSize;\r\n                        }\r\n                    }\r\n\r\n                    if (size != null)\r\n                    {\r\n                        if (size.H.Value > size.W.Value)\r\n                        {\r\n                            if (IsScaledVerticalPhoto(minVerticalRatioToScale, size.H, size.W))\r\n                            {\r\n                                return 2.0 + scale * maxDimension / size.H.Value * size.W.Value + 2.0;\r\n                            }\r\n\r\n                            return 2.0 + maxDimension / size.H.Value * size.W.Value + 2.0;\r\n                        }\r\n\r\n                        return 2.0 + maxDimension + 2.0;\r\n                    }\r\n                }\r\n\r\n                return base.MediaWidth;\r\n            }\r\n        }\r\n\r\n        public static bool IsScaledVerticalPhoto(double minRatio, TLInt heigth, TLInt width)\r\n        {\r\n            var ratio = (double)heigth.Value / width.Value;\r\n\r\n            return ratio > minRatio;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Photo = GetObject<TLPhotoBase>(input);\r\n\r\n            var isoFileName = GetObject<TLString>(input);\r\n            IsoFileName = isoFileName.ToString();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Photo.ToStream(output);\r\n\r\n            var isoFileName = new TLString(IsoFileName);\r\n            isoFileName.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Photo.ToString();\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaVideo28 : TLMessageMediaVideo, IMediaCaption\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageMediaVideo28;\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Video = GetObject<TLVideoBase>(bytes, ref position);\r\n            Caption = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Video = GetObject<TLVideoBase>(input);\r\n            Caption = GetObject<TLString>(input);\r\n\r\n            var isoFileName = GetObject<TLString>(input);\r\n            IsoFileName = isoFileName.ToString();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Video.ToStream(output);\r\n            Caption.ToStream(output);\r\n\r\n            var isoFileName = new TLString(IsoFileName);\r\n            isoFileName.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaVideo : TLMessageMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaVideo;\r\n\r\n        public TLVideoBase Video { get; set; }\r\n\r\n        public override int MediaSize\r\n        {\r\n            get\r\n            {\r\n                return Video.VideoSize;\r\n            }\r\n        }\r\n\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Video = GetObject<TLVideoBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Video = GetObject<TLVideoBase>(input);\r\n\r\n            var isoFileName = GetObject<TLString>(input);\r\n            IsoFileName = isoFileName.ToString();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Video.ToStream(output);\r\n\r\n            var isoFileName = new TLString(IsoFileName);\r\n            isoFileName.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaGeo : TLMessageMediaBase, IMessageMediaGeoPoint\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaGeo;\r\n\r\n        public TLGeoPointBase Geo { get; set; }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 2.0 + 320.0 + 2.0; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Geo = GetObject<TLGeoPointBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Geo = GetObject<TLGeoPointBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Geo.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaVenue72 : TLMessageMediaVenue\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageMediaVenue72;\r\n\r\n        public TLString VenueType { get; set; }\r\n\r\n        #region Additional\r\n\r\n        public Uri IconSource { get; set; }\r\n\r\n        public TLUserBase User { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Geo = GetObject<TLGeoPointBase>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Address = GetObject<TLString>(bytes, ref position);\r\n            Provider = GetObject<TLString>(bytes, ref position);\r\n            VenueId = GetObject<TLString>(bytes, ref position);\r\n            VenueType = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Geo = GetObject<TLGeoPointBase>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Address = GetObject<TLString>(input);\r\n            Provider = GetObject<TLString>(input);\r\n            VenueId = GetObject<TLString>(input);\r\n            VenueType = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Geo.ToStream(output);\r\n            Title.ToStream(output);\r\n            Address.ToStream(output);\r\n            Provider.ToStream(output);\r\n            VenueId.ToStream(output);\r\n            VenueType.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaVenue : TLMessageMediaGeo\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageMediaVenue;\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Address { get; set; }\r\n\r\n        public TLString Provider { get; set; }\r\n\r\n        public TLString VenueId { get; set; }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 2.0 + 320.0 + 2.0; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Geo = GetObject<TLGeoPointBase>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Address = GetObject<TLString>(bytes, ref position);\r\n            Provider = GetObject<TLString>(bytes, ref position);\r\n            VenueId = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Geo = GetObject<TLGeoPointBase>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Address = GetObject<TLString>(input);\r\n            Provider = GetObject<TLString>(input);\r\n            VenueId = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Geo.ToStream(output);\r\n            Title.ToStream(output);\r\n            Address.ToStream(output);\r\n            Provider.ToStream(output);\r\n            VenueId.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaContact82 : TLMessageMediaContact\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageMediaContact82;\r\n\r\n        public TLString VCard { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhoneNumber = GetObject<TLString>(bytes, ref position);\r\n            FirstName = GetObject<TLString>(bytes, ref position);\r\n            LastName = GetObject<TLString>(bytes, ref position);\r\n            VCard = GetObject<TLString>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PhoneNumber = GetObject<TLString>(input);\r\n            FirstName = GetObject<TLString>(input);\r\n            LastName = GetObject<TLString>(input);\r\n            VCard = GetObject<TLString>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PhoneNumber.ToStream(output);\r\n            FirstName.ToStream(output);\r\n            LastName.ToStream(output);\r\n            VCard.ToStream(output);\r\n            UserId.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaContact : TLMessageMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaContact;\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString FirstName { get; set; }\r\n\r\n        public TLString LastName { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 12.0 + 311.0 + 12.0; }\r\n        }\r\n\r\n        #region Additional\r\n\r\n        public virtual string FullName { get { return string.Format(\"{0} {1}\", FirstName, LastName); } }\r\n\r\n        private TLUserBase _user;\r\n\r\n        public TLUserBase User\r\n        {\r\n            get\r\n            {\r\n                if (_user != null) return _user;\r\n\r\n                var cacheService = InMemoryCacheService.Instance;\r\n                _user = cacheService.GetUser(UserId);\r\n                if (_user == null)\r\n                {\r\n                    if (UserId.Value > 0)\r\n                    {\r\n                        _user = new TLUser\r\n                        {\r\n                            FirstName = FirstName,\r\n                            LastName = LastName,\r\n                            Id = UserId,\r\n                            Phone = PhoneNumber,\r\n                            Photo = new TLPhotoEmpty { Id = new TLLong(0) }\r\n                        };\r\n                    }\r\n                    else\r\n                    {\r\n                        _user = new TLUserNotRegistered\r\n                        {\r\n                            FirstName = FirstName,\r\n                            LastName = LastName,\r\n                            Id = UserId,\r\n                            Phone = PhoneNumber,\r\n                            Photo = new TLPhotoEmpty { Id = new TLLong(0) }\r\n                        };\r\n                    }\r\n                }\r\n\r\n                return _user;\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhoneNumber = GetObject<TLString>(bytes, ref position);\r\n            FirstName = GetObject<TLString>(bytes, ref position);\r\n            LastName = GetObject<TLString>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PhoneNumber = GetObject<TLString>(input);\r\n            FirstName = GetObject<TLString>(input);\r\n            LastName = GetObject<TLString>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PhoneNumber.ToStream(output);\r\n            FirstName.ToStream(output);\r\n            LastName.ToStream(output);\r\n            UserId.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return FullName;\r\n        }\r\n    }\r\n\r\n    public abstract class TLMessageMediaUnsupportedBase : TLMessageMediaBase { }\r\n\r\n    public class TLMessageMediaUnsupported : TLMessageMediaUnsupportedBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaUnsupported;\r\n\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 12.0 + 311.0 + 12.0; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Bytes = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Bytes = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Bytes.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaUnsupported24 : TLMessageMediaUnsupportedBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaUnsupported24;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaWebPage : TLMessageMediaBase, IMediaGif\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaWebPage;\r\n\r\n        public TLWebPageBase WebPage { get; set; }\r\n\r\n        #region Additional\r\n\r\n        public TLDocumentBase Document\r\n        {\r\n            get\r\n            {\r\n                var webPage = WebPage as TLWebPage35;\r\n                if (webPage != null)\r\n                {\r\n                    return webPage.Document;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public TLPhotoBase Photo\r\n        {\r\n            get\r\n            {\r\n                var webPage = WebPage as TLWebPage;\r\n                if (webPage != null)\r\n                {\r\n                    return webPage.Photo;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 12.0 + 311.0 + 12.0; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            WebPage = GetObject<TLWebPageBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            WebPage = GetObject<TLWebPageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            WebPage.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaGame : TLMessageMediaBase, IMediaGif\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaGame;\r\n\r\n        public TLGame Game { get; set; }\r\n\r\n        #region Additional\r\n        public TLDocumentBase Document\r\n        {\r\n            get\r\n            {\r\n                if (Game != null)\r\n                {\r\n                    return Game.Document;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public TLPhotoBase Photo\r\n        {\r\n            get\r\n            {\r\n                if (Game != null)\r\n                {\r\n                    return Game.Photo;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 12.0 + 311.0 + 12.0; }\r\n        }\r\n\r\n        public Visibility MessageVisibility\r\n        {\r\n            get\r\n            {\r\n                return !TLString.IsNullOrEmpty(Message)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public Visibility DescriptionVisibility\r\n        {\r\n            get\r\n            {\r\n                return TLString.IsNullOrEmpty(Message) && Game != null && !TLString.IsNullOrEmpty(Game.Description)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public TLMessageBase SourceMessage { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Game = GetObject<TLGame>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Game = GetObject<TLGame>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Game.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaInvoice : TLMessageMediaBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaInvoice;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool ShippingAddressRequested\r\n        {\r\n            get { return IsSet(Flags, (int)MessageMediaInvoiceFlags.ShippingAddressRequested); }\r\n            set { SetUnset(ref _flags, value, (int)MessageMediaInvoiceFlags.ShippingAddressRequested); }\r\n        }\r\n\r\n        public bool Test\r\n        {\r\n            get { return IsSet(Flags, (int)MessageMediaInvoiceFlags.Test); }\r\n            set { SetUnset(ref _flags, value, (int)MessageMediaInvoiceFlags.Test); }\r\n        }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Description { get; set; }\r\n\r\n        private TLWebDocumentBase _photo;\r\n\r\n        public TLWebDocumentBase Photo\r\n        {\r\n            get { return _photo; }\r\n            set { SetField(out _photo, value, ref _flags, (int)MessageMediaInvoiceFlags.Photo); }\r\n        }\r\n\r\n        private TLInt _receiptMsgId;\r\n\r\n        public TLInt ReceiptMsgId\r\n        {\r\n            get { return _receiptMsgId; }\r\n            set { SetField(out _receiptMsgId, value, ref _flags, (int)MessageMediaInvoiceFlags.ReceiptMsgId); }\r\n        }\r\n\r\n        public TLString Currency { get; set; }\r\n\r\n        public TLLong TotalAmount { get; set; }\r\n\r\n        public TLString StartParam { get; set; }\r\n\r\n        public Visibility DescriptionVisibility\r\n        {\r\n            get\r\n            {\r\n                return !TLString.IsNullOrEmpty(Description)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 2.0 + 323.0 + 2.0; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Description = GetObject<TLString>(bytes, ref position);\r\n            _photo = GetObject<TLWebDocumentBase>(Flags, (int)MessageMediaInvoiceFlags.Photo, null, bytes, ref position);\r\n            _receiptMsgId = GetObject<TLInt>(Flags, (int)MessageMediaInvoiceFlags.ReceiptMsgId, null, bytes, ref position);\r\n            Currency = GetObject<TLString>(bytes, ref position);\r\n            TotalAmount = GetObject<TLLong>(bytes, ref position);\r\n            StartParam = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Description = GetObject<TLString>(input);\r\n            _photo = GetObject<TLWebDocumentBase>(Flags, (int)MessageMediaInvoiceFlags.Photo, null, input);\r\n            _receiptMsgId = GetObject<TLInt>(Flags, (int)MessageMediaInvoiceFlags.ReceiptMsgId, null, input);\r\n            Currency = GetObject<TLString>(input);\r\n            TotalAmount = GetObject<TLLong>(input);\r\n            StartParam = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Title.ToStream(output);\r\n            Description.ToStream(output);\r\n            ToStream(output, Photo, Flags, (int)MessageMediaInvoiceFlags.Photo);\r\n            ToStream(output, ReceiptMsgId, Flags, (int)MessageMediaInvoiceFlags.ReceiptMsgId);\r\n            Currency.ToStream(output);\r\n            TotalAmount.ToStream(output);\r\n            StartParam.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMessageMediaGeoLive : TLMessageMediaGeo\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessageMediaGeoLive;\r\n\r\n        public TLInt Period { get; set; }\r\n\r\n        #region Additional\r\n\r\n        public TLObject From { get; set; }\r\n\r\n        public TLInt EditDate { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public bool Active\r\n        {\r\n            get\r\n            {\r\n                if (Date != null)\r\n                {\r\n                    if (Period.Value == 0)\r\n                    {\r\n                        return false;\r\n                    }\r\n\r\n                    var mtProtoService = MTProtoService.Instance;\r\n                    var clientDelta = mtProtoService.ClientTicksDelta;\r\n\r\n                    var now = TLUtils.DateToUniversalTimeTLInt(clientDelta, DateTime.Now);\r\n\r\n                    var expired = Date.Value + Period.Value <= now.Value;\r\n\r\n                    var defaultPeriod = Period.Value == 15 * 60 || Period.Value == 60 * 60 || Period.Value == 8 * 60 * 60;\r\n\r\n                    return defaultPeriod && !expired;\r\n\r\n                    //var mtProtoService = MTProtoService.Instance;\r\n                    //var clientDelta = mtProtoService.ClientTicksDelta;\r\n\r\n                    //if (clientDelta == 0)\r\n                    //{\r\n                    //    var defaultPeriod = Period.Value == 15 * 60 || Period.Value == 60 * 60 || Period.Value == 8 * 60 * 60;\r\n\r\n                    //    if (!defaultPeriod)\r\n                    //    {\r\n                    //        return false;\r\n                    //    }\r\n                    //}\r\n\r\n                    //var date = TLUtils.DateToUniversalTimeTLInt(clientDelta, DateTime.Now);\r\n\r\n                    //return Date.Value + Period.Value > date.Value;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 2.0 + 320.0 + 2.0; }\r\n        }\r\n\r\n        public TLMessageMediaBase ToMediaGeo()\r\n        {\r\n            return new TLMessageMediaGeo\r\n            {\r\n                Geo = Geo\r\n            };\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Geo = GetObject<TLGeoPointBase>(bytes, ref position);\r\n            Period = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Geo = GetObject<TLGeoPointBase>(input);\r\n            Period = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Geo.ToStream(output);\r\n            Period.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public interface IMessageMediaGroup\r\n    {\r\n        TLVector<TLObject> GroupCommon { get; }\r\n        event EventHandler Calculate;\r\n    }\r\n\r\n    public class TLMessageMediaGroup : TLMessageMediaBase, IMessageMediaGroup\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageMediaGroup;\r\n\r\n        public TLVector<TLMessageBase> Group { get; set; }\r\n\r\n        public TLVector<TLObject> GroupCommon\r\n        {\r\n            get\r\n            {\r\n                if (Group == null)\r\n                {\r\n                    return new TLVector<TLObject>();\r\n                }\r\n\r\n                var group = new TLVector<TLObject>();\r\n                foreach (var item in Group)\r\n                {\r\n                    group.Add(item);\r\n                }\r\n                return group;\r\n            }\r\n        }\r\n\r\n        public override double MediaWidth\r\n        {\r\n            get { return 1.0 + 311.0 + 1.0; }\r\n        }\r\n\r\n        public event EventHandler Calculate;\r\n\r\n        public virtual void RaiseCalculate()\r\n        {\r\n            var handler = Calculate;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Group = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Group = GetObject<TLVector<TLMessageBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Group.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessageRange.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLMessageRange : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessageRange;\r\n\r\n        public TLInt MinId { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                MinId.ToBytes(),\r\n                MaxId.ToBytes()\r\n            );\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            MinId = GetObject<TLInt>(bytes, ref position);\r\n            MaxId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            MinId.ToStream(output);\r\n            MaxId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            MinId = GetObject<TLInt>(input);\r\n            MaxId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum MessagesFlags\r\n    {\r\n        Collapsed = 0x1\r\n    }\r\n\r\n    [Flags]\r\n    public enum FeedMessagesFlags\r\n    {\r\n        MaxPosition = 0x1,\r\n        MinPosition = 0x2,\r\n        ReadMaxPosition = 0x4,\r\n    }\r\n\r\n    public abstract class TLMessagesBase : TLObject\r\n    {\r\n        public TLVector<TLMessageBase> Messages { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public abstract TLMessagesBase GetEmptyObject();\r\n    }\r\n\r\n    public class TLMessages : TLMessagesBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessages;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLMessagesBase GetEmptyObject()\r\n        {\r\n            return new TLMessages\r\n            {\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLMessagesSlice : TLMessages\r\n    {\r\n        public new const uint Signature = TLConstructors.TLMessagesSlice;\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLMessagesBase GetEmptyObject()\r\n        {\r\n            return new TLMessagesSlice\r\n            {\r\n                Count = Count,\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLChannelMessages : TLMessagesSlice\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelMessages;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public TLVector<TLMessageGroup> Collapsed { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            if (IsSet(Flags, (int) MessagesFlags.Collapsed))\r\n            {\r\n                Collapsed = GetObject<TLVector<TLMessageGroup>>(bytes, ref position);\r\n            }\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLMessagesBase GetEmptyObject()\r\n        {\r\n            return new TLMessagesSlice\r\n            {\r\n                Count = Count,\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLChannelMessages53 : TLChannelMessages\r\n    {\r\n        public new const uint Signature = TLConstructors.TLChannelMessages53;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLMessagesBase GetEmptyObject()\r\n        {\r\n            return new TLMessagesSlice\r\n            {\r\n                Count = Count,\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLFeedMessagesNotModified : TLMessagesBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFeedMessagesNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = new TLVector<TLMessageBase>();\r\n            Chats = new TLVector<TLChatBase>();\r\n            Users = new TLVector<TLUserBase>();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLMessagesBase GetEmptyObject()\r\n        {\r\n            return new TLFeedMessages\r\n            {\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLFeedMessages : TLMessagesBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFeedMessages;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        protected TLFeedPosition _maxPosition;\r\n\r\n        public TLFeedPosition MaxPosition\r\n        {\r\n            get { return _maxPosition; }\r\n            set { SetField(out _maxPosition, value, ref _flags, (int) FeedMessagesFlags.MaxPosition); }\r\n        }\r\n\r\n        protected TLFeedPosition _minPosition;\r\n\r\n        public TLFeedPosition MinPosition\r\n        {\r\n            get { return _minPosition; }\r\n            set { SetField(out _minPosition, value, ref _flags, (int)FeedMessagesFlags.MinPosition); }\r\n        }\r\n\r\n        protected TLFeedPosition _readMaxPosition;\r\n\r\n        public TLFeedPosition ReadMaxPosition\r\n        {\r\n            get { return _readMaxPosition; }\r\n            set { SetField(out _readMaxPosition, value, ref _flags, (int)FeedMessagesFlags.ReadMaxPosition); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            _flags = GetObject<TLInt>(bytes, ref position);\r\n            _maxPosition = GetObject<TLFeedPosition>(Flags, (int)FeedMessagesFlags.MaxPosition, null, bytes, ref position);\r\n            _minPosition = GetObject<TLFeedPosition>(Flags, (int)FeedMessagesFlags.MinPosition, null, bytes, ref position);\r\n            _readMaxPosition = GetObject<TLFeedPosition>(Flags, (int)FeedMessagesFlags.ReadMaxPosition, null, bytes, ref position);\r\n\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLMessagesBase GetEmptyObject()\r\n        {\r\n            return new TLFeedMessages\r\n            {\r\n                Flags = Flags,\r\n                MaxPosition = MaxPosition,\r\n                MinPosition = MinPosition,\r\n                ReadMaxPosition = ReadMaxPosition,\r\n\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count)\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessagesAcknowledgment.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLMessagesAcknowledgment : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessagesAcknowledgment; \r\n\r\n        public TLVector<TLLong> MessageIds { get; set; } \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            MessageIds = GetObject<TLVector<TLLong>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLMessagesChannelParticipants.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLChannelParticipantsBase : TLObject { }\r\n\r\n    public class TLChannelParticipants : TLChannelParticipantsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipants;\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public TLVector<TLChannelParticipantBase> Participants { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Participants = GetObject<TLVector<TLChannelParticipantBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Count = GetObject<TLInt>(input);\r\n            Participants = GetObject<TLVector<TLChannelParticipantBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Count.ToStream(output);\r\n            Participants.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChannelParticipantsNotModified : TLChatParticipantsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelParticipantsNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLChannelsChannelParticipant : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLChannelsChannelParticipant;\r\n\r\n        public TLChannelParticipantBase Participant { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Participant = GetObject<TLChannelParticipantBase>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Participant = GetObject<TLChannelParticipantBase>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Participant.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessagesChatFull.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLMessagesChatFull : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessagesChatFull;\r\n\r\n        public TLChatFull FullChat { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            FullChat = GetObject<TLChatFull>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMessagesStickerSet.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLMessagesStickerSet : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLMessagesStickerSet;\r\n\r\n        public TLStickerSetBase Set { get; set; }\r\n        public TLVector<TLStickerPack> Packs { get; set; }\r\n        public TLVector<TLDocumentBase> Documents { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Set = GetObject<TLStickerSetBase>(bytes, ref position);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(bytes, ref position);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Set.ToBytes(),\r\n                Packs.ToBytes(),\r\n                Documents.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Set = GetObject<TLStickerSetBase>(input);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Set.ToStream(output);\r\n            Packs.ToStream(output);\r\n            Documents.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLMyLink.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLMyLinkBase : TLObject { }\r\n\r\n    public class TLMyLinkEmpty : TLMyLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMyLinkEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLMyLinkRequested : TLMyLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMyLinkRequested;\r\n\r\n        public TLBool Contact { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Contact = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Contact = GetObject<TLBool>(input);\r\n\r\n            return this;\r\n        }\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Contact.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLMyLinkContact : TLMyLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMyLinkContact;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLNearestDC.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLNearestDC : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLNearestDC;\r\n\r\n        public TLString Country { get; set; }\r\n\r\n        public TLInt ThisDC { get; set; }\r\n\r\n        public TLInt NearestDC { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Country = GetObject<TLString>(bytes,ref position);\r\n            ThisDC = GetObject<TLInt>(bytes, ref position);\r\n            NearestDC = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLNewSessionCreated.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    internal class TLNewSessionCreated : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLNewSessionCreated;\r\n\r\n        public TLLong FirstMessageId { get; set; }\r\n\r\n        public TLLong UniqueId { get; set; }\r\n\r\n        public TLLong ServerSalt { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            FirstMessageId = GetObject<TLLong>(bytes, ref position);\r\n            UniqueId = GetObject<TLLong>(bytes, ref position);\r\n            ServerSalt = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLNonEncryptedMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLNonEncryptedMessage : TLTransportMessageWithIdBase\r\n    {\r\n        public TLLong AuthKeyId { get; set; }\r\n        public TLObject Data { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            AuthKeyId = GetObject<TLLong>(bytes, ref position);\r\n            MessageId = GetObject<TLLong>(bytes, ref position);\r\n            var length = GetObject<TLInt>(bytes, ref position);\r\n            Data = GetObject<TLObject>(bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            var dataBytes = Data.ToBytes();\r\n            var length = new TLInt(dataBytes.Length);\r\n\r\n            return TLUtils.Combine(\r\n                AuthKeyId.ToBytes(),\r\n                MessageId.ToBytes(),\r\n                length.ToBytes(),\r\n                dataBytes);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLNotifyPeer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLNotifyPeerBase : TLObject { }\r\n\r\n    public class TLNotifyPeer : TLNotifyPeerBase\r\n    {\r\n        public TLPeerBase Peer { get; set; }\r\n\r\n        public const uint Signature = TLConstructors.TLNotifyPeer;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Peer.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLPeerBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLNotifyUsers : TLNotifyPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLNotifyUsers;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLNotifyChats : TLNotifyPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLNotifyChats;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLNotifyAll : TLNotifyPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLNotifyAll;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLNull.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLNull : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLNull;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLObject.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Linq.Expressions;\r\nusing System.Reflection;\r\nusing System.Runtime.Serialization;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\n#if WINDOWS_PHONE\r\nusing System.Windows.Media.Imaging;\r\n#elif WIN_RT\r\nusing Windows.UI.Xaml.Media.Imaging;\r\n#endif\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [DataContract]\r\n    public abstract class TLObject : TelegramPropertyChangedBase\r\n    {\r\n        public TLDialogBase Dialog { get; set; }\r\n\r\n        public bool IsGlobalResult { get; set; }\r\n\r\n        #region Flags\r\n\r\n        public static byte[] ToBytes(TLObject obj, TLInt flags, int flag)\r\n        {\r\n            return obj != null && IsSet(flags, flag) ? obj.ToBytes() : new byte[] {};\r\n        }\r\n\r\n        public static void ToStream(Stream output, TLObject obj, TLInt flags, int flag)\r\n        {\r\n            if (IsSet(flags, flag))\r\n            {\r\n                obj.ToStream(output);\r\n            }\r\n        }\r\n\r\n        public static void ToStream(Stream output, TLObject obj, TLLong customFlags, int flag)\r\n        {\r\n            if (IsSet(customFlags, flag))\r\n            {\r\n                if (obj == null)\r\n                {\r\n                    \r\n                }\r\n\r\n                obj.ToStream(output);\r\n            }\r\n        }\r\n\r\n        protected static bool IsSet(TLLong flags, int flag)\r\n        {\r\n            var isSet = false;\r\n\r\n            if (flags != null)\r\n            {\r\n                var intFlag = flag;\r\n                isSet = (flags.Value & intFlag) == intFlag;\r\n            }\r\n\r\n            return isSet;\r\n        }\r\n\r\n        protected static bool IsSet(TLInt flags, int flag)\r\n        {\r\n            var isSet = false;\r\n\r\n            if (flags != null)\r\n            {\r\n                var intFlag = flag;\r\n                isSet = (flags.Value & intFlag) == intFlag;\r\n            }\r\n\r\n            return isSet;\r\n        }\r\n\r\n        protected static void Set(ref TLLong flags, int flag)\r\n        {\r\n            var intFlag = flag;\r\n\r\n            if (flags != null)\r\n            {\r\n                flags.Value |= intFlag;\r\n            }\r\n            else\r\n            {\r\n                flags = new TLLong(intFlag);\r\n            }\r\n        }\r\n\r\n        protected static void Set(ref TLInt flags, int flag)\r\n        {\r\n            var intFlag = flag;\r\n\r\n            if (flags != null)\r\n            {\r\n                flags.Value |= intFlag;\r\n            }\r\n            else\r\n            {\r\n                flags = new TLInt(intFlag);\r\n            }\r\n        }\r\n\r\n        protected static void Unset(ref TLInt flags, int flag)\r\n        {\r\n            var intFlag = flag;\r\n\r\n            if (flags != null)\r\n            {\r\n                flags.Value &= ~intFlag;\r\n            }\r\n            else\r\n            {\r\n                flags = new TLInt(0);\r\n            }\r\n        }\r\n\r\n        protected static void Unset(ref TLLong flags, int flag)\r\n        {\r\n            var intFlag = flag;\r\n\r\n            if (flags != null)\r\n            {\r\n                flags.Value &= ~intFlag;\r\n            }\r\n            else\r\n            {\r\n                flags = new TLLong(0);\r\n            }\r\n        }\r\n\r\n        protected static void SetUnset(ref TLInt flags, bool set, int flag)\r\n        {\r\n            if (set)\r\n            {\r\n                Set(ref flags, flag);\r\n            }\r\n            else\r\n            {\r\n                Unset(ref flags, flag);\r\n            }\r\n        }\r\n\r\n        protected static void SetUnset(ref TLLong flags, bool set, int flag)\r\n        {\r\n            if (set)\r\n            {\r\n                Set(ref flags, flag);\r\n            }\r\n            else\r\n            {\r\n                Unset(ref flags, flag);\r\n            }\r\n        }\r\n\r\n\r\n        protected static void SetField<T>(out T field, T value, ref TLInt flags, int flag) where T : TLObject\r\n        {\r\n            if (value != null)\r\n            {\r\n                Set(ref flags, flag);\r\n                field = value;\r\n            }\r\n            else\r\n            {\r\n                Unset(ref flags, flag);\r\n                field = null;\r\n            }\r\n        }\r\n\r\n        protected static void SetField<T>(out T field, T value, ref TLLong flags, int flag) where T : TLObject\r\n        {\r\n            if (value != null)\r\n            {\r\n                Set(ref flags, flag);\r\n                field = value;\r\n            }\r\n            else\r\n            {\r\n                Unset(ref flags, flag);\r\n                field = null;\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public virtual TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public virtual byte[] ToBytes()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public virtual TLObject FromStream(Stream input)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public virtual void ToStream(Stream output)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public static T GetObject<T>(byte[] bytes, ref int position) where T : TLObject\r\n        {\r\n            try\r\n            {\r\n                return (T)TLObjectGenerator.GetObject<T>(bytes, position).FromBytes(bytes, ref position);\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                Execute.ShowDebugMessage(e.ToString());\r\n                TLUtils.WriteLine(e.StackTrace, LogSeverity.Error);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static T GetObject<T>(Stream input) where T : TLObject\r\n        {\r\n            //try\r\n            //{\r\n            return (T)TLObjectGenerator.GetObject<T>(input).FromStream(input);\r\n            //}\r\n            //catch (Exception e)\r\n            //{\r\n            //    TLUtils.WriteLine(e.StackTrace, LogSeverity.Error);\r\n            //}\r\n\r\n            //return null;\r\n        }\r\n\r\n        public static T GetObject<T>(TLInt flags, int flag, T defaultValue, byte[] bytes, ref int position) where T : TLObject\r\n        {\r\n            var value = IsSet(flags, flag) ? GetObject<T>(bytes, ref position) : defaultValue;\r\n            //if (value != null)\r\n            //{\r\n            //    Set(ref flags, flag);\r\n            //}\r\n            return value;\r\n        }\r\n\r\n        public static T GetObject<T>(TLInt flags, int flag, T defaultValue, Stream inputStream) where T : TLObject\r\n        {\r\n            var value = IsSet(flags, flag) ? GetObject<T>(inputStream) : defaultValue;\r\n            //if (value != null)\r\n            //{\r\n            //    Set(ref flags, flag);\r\n            //}\r\n            return value;\r\n        }\r\n\r\n        public static T GetObject<T>(TLLong customFlags, int flag, T defaultValue, Stream inputStream) where T : TLObject\r\n        {\r\n            var value = IsSet(customFlags, flag) ? GetObject<T>(inputStream) : defaultValue;\r\n            //if (value != null)\r\n            //{\r\n            //    Set(ref customFlags, flag);\r\n            //}\r\n            return value;\r\n        }\r\n\r\n        public static T GetNullableObject<T>(Stream input) where T : TLObject\r\n        {\r\n            return TLObjectExtensions.NullableFromStream<T>(input);\r\n        }\r\n\r\n        protected bool SetField<T>(ref T field, T value, string propertyName)\r\n        {\r\n            if (EqualityComparer<T>.Default.Equals(field, value)) return false;\r\n            field = value;\r\n            NotifyOfPropertyChange(propertyName);\r\n            return true;\r\n        }\r\n\r\n        protected bool SetField<T>(ref T field, T value, Expression<Func<T>> selectorExpression)\r\n        {\r\n            if (EqualityComparer<T>.Default.Equals(field, value)) return false;\r\n            field = value;\r\n            NotifyOfPropertyChange(selectorExpression);\r\n            return true;\r\n        }\r\n\r\n        private WriteableBitmap _bitmap;\r\n\r\n        public WriteableBitmap Bitmap\r\n        {\r\n            get { return _bitmap; }\r\n            set\r\n            {\r\n                SetField(ref _bitmap, value, () => Bitmap);\r\n            }\r\n        }\r\n\r\n        public void SetBitmap(WriteableBitmap bitmap)\r\n        {\r\n            //if (_bitmap == null)\r\n            //{\r\n            Bitmap = bitmap;\r\n            //}\r\n            //else\r\n            //{\r\n            //    _bitmap = bitmap;\r\n            //}\r\n        }\r\n\r\n        public void ClearBitmap()\r\n        {\r\n            _bitmap = null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLObjectGenerator.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Reflection;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL.Account;\r\nusing Telegram.Api.TL.Functions.Channels;\r\nusing Telegram.Api.TL.Functions.Contacts;\r\nusing Telegram.Api.TL.Functions.Messages;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLObjectGenerator\r\n    {\r\n        private static readonly Dictionary<Type, Func<TLObject>> _baredTypes =\r\n            new Dictionary<Type, Func<TLObject>>\r\n                {\r\n                    {typeof (TLDouble), () => new TLDouble()},\r\n                    {typeof (TLBool), () => new TLBool()},\r\n                    {typeof (TLInt), () => new TLInt()},\r\n                    {typeof (TLLong), () => new TLLong()},\r\n                    {typeof (TLInt128), () => new TLInt128()},\r\n                    {typeof (TLInt256), () => new TLInt256()},\r\n                    {typeof (TLString), () => new TLString()},\r\n                    {typeof (TLNonEncryptedMessage), () => new TLNonEncryptedMessage()},\r\n                    {typeof (TLTransportMessage), () => new TLTransportMessage()},\r\n                    {typeof (TLContainerTransportMessage), () => new TLContainerTransportMessage()},\r\n                    {typeof (TLIpPort), () => new TLIpPort()},\r\n                };\r\n\r\n        private static readonly Dictionary<uint, Func<TLObject>> _clothedTypes =\r\n            new Dictionary<uint, Func<TLObject>>\r\n                {\r\n                    {TLUpdateUserBlocked.Signature, () => new TLUpdateUserBlocked()},\r\n                    {TLUpdateNotifySettings.Signature, () => new TLUpdateNotifySettings()},\r\n\r\n                    {TLNotifyPeer.Signature, () => new TLNotifyPeer()},\r\n                    {TLNotifyUsers.Signature, () => new TLNotifyUsers()},\r\n                    {TLNotifyChats.Signature, () => new TLNotifyChats()},\r\n                    {TLNotifyAll.Signature, () => new TLNotifyAll()},\r\n\r\n                    {TLDecryptedMessageLayer.Signature, () => new TLDecryptedMessageLayer()},\r\n                    {TLUpdateDCOptions.Signature, () => new TLUpdateDCOptions()},\r\n                    \r\n                    {TLDecryptedMessageMediaAudio.Signature, () => new TLDecryptedMessageMediaAudio()},\r\n                    {TLDecryptedMessageMediaDocument.Signature, () => new TLDecryptedMessageMediaDocument()},\r\n\r\n                    {TLInputMediaDocument.Signature, () => new TLInputMediaDocument()},\r\n                    {TLInputMediaUploadedDocument.Signature, () => new TLInputMediaUploadedDocument()},\r\n                    {TLInputMediaUploadedThumbDocument.Signature, () => new TLInputMediaUploadedThumbDocument()},\r\n\r\n                    {TLInputMediaAudio.Signature, () => new TLInputMediaAudio()},\r\n                    {TLInputMediaUploadedAudio.Signature, () => new TLInputMediaUploadedAudio()}, \r\n                \r\n                    {TLInputDocument.Signature, () => new TLInputDocument()},\r\n                    {TLInputDocumentEmpty.Signature, () => new TLInputDocumentEmpty()}, \r\n                \r\n                    {TLInputAudio.Signature, () => new TLInputAudio()},\r\n                    {TLInputAudioEmpty.Signature, () => new TLInputAudioEmpty()},\r\n\r\n                    {TLMessageMediaAudio.Signature, () => new TLMessageMediaAudio()},\r\n                    {TLMessageMediaDocument.Signature, () => new TLMessageMediaDocument()},\r\n\r\n                    {TLAudioEmpty.Signature, () => new TLAudioEmpty()},\r\n                    {TLAudio.Signature, () => new TLAudio()},\r\n\r\n                    {TLDocumentEmpty.Signature, () => new TLDocumentEmpty()},\r\n                    {TLDocument10.Signature, () => new TLDocument10()},\r\n\r\n                    {TLUpdateChatParticipantAdd.Signature, () => new TLUpdateChatParticipantAdd()},\r\n                    {TLUpdateChatParticipantDelete.Signature, () => new TLUpdateChatParticipantDelete()},\r\n\r\n                    {TLInputEncryptedFileBigUploaded.Signature, () => new TLInputEncryptedFileBigUploaded()},\r\n                    {TLInputFileBig.Signature, () => new TLInputFileBig()},\r\n\r\n                    {TLDecryptedMessageActionSetMessageTTL.Signature, () => new TLDecryptedMessageActionSetMessageTTL()},\r\n                    {TLDecryptedMessageActionReadMessages.Signature, () => new TLDecryptedMessageActionReadMessages()},\r\n                    {TLDecryptedMessageActionDeleteMessages.Signature, () => new TLDecryptedMessageActionDeleteMessages()},\r\n                    {TLDecryptedMessageActionScreenshotMessages.Signature, () => new TLDecryptedMessageActionScreenshotMessages()},\r\n                    {TLDecryptedMessageActionFlushHistory.Signature, () => new TLDecryptedMessageActionFlushHistory()},\r\n                    {TLDecryptedMessageActionNotifyLayer.Signature, () => new TLDecryptedMessageActionNotifyLayer()},\r\n\r\n                    {TLDecryptedMessage.Signature, () => new TLDecryptedMessage()},\r\n                    {TLDecryptedMessageService.Signature, () => new TLDecryptedMessageService()},\r\n\r\n                    {TLUpdateNewEncryptedMessage.Signature, () => new TLUpdateNewEncryptedMessage()},\r\n                    {TLUpdateEncryptedChatTyping.Signature, () => new TLUpdateEncryptedChatTyping()},\r\n                    {TLUpdateEncryption.Signature, () => new TLUpdateEncryption()},\r\n                    {TLUpdateEncryptedMessagesRead.Signature, () => new TLUpdateEncryptedMessagesRead()},\r\n                    \r\n                    {TLEncryptedChatEmpty.Signature, () => new TLEncryptedChatEmpty()},\r\n                    {TLEncryptedChatWaiting.Signature, () => new TLEncryptedChatWaiting()},\r\n                    {TLEncryptedChatRequested.Signature, () => new TLEncryptedChatRequested()},\r\n                    {TLEncryptedChat.Signature, () => new TLEncryptedChat()},\r\n                    {TLEncryptedChatDiscarded.Signature, () => new TLEncryptedChatDiscarded()},\r\n                    \r\n                    {TLInputEncryptedChat.Signature, () => new TLInputEncryptedChat()},\r\n\r\n                    {TLInputEncryptedFileEmpty.Signature, () => new TLInputEncryptedFileEmpty()},\r\n                    {TLInputEncryptedFileUploaded.Signature, () => new TLInputEncryptedFileUploaded()},\r\n                    {TLInputEncryptedFile.Signature, () => new TLInputEncryptedFile()},\r\n\r\n                    {TLInputEncryptedFileLocation.Signature, () => new TLInputEncryptedFileLocation()},\r\n\r\n                    {TLEncryptedFileEmpty.Signature, () => new TLEncryptedFileEmpty()},\r\n                    {TLEncryptedFile.Signature, () => new TLEncryptedFile()},\r\n\r\n                    {TLEncryptedMessage.Signature, () => new TLEncryptedMessage()},\r\n                    {TLEncryptedMessageService.Signature, () => new TLEncryptedMessageService()},\r\n\r\n                    {TLDecryptedMessageMediaEmpty.Signature, () => new TLDecryptedMessageMediaEmpty()},\r\n                    {TLDecryptedMessageMediaPhoto.Signature, () => new TLDecryptedMessageMediaPhoto()},\r\n                    {TLDecryptedMessageMediaVideo.Signature, () => new TLDecryptedMessageMediaVideo()},\r\n                    {TLDecryptedMessageMediaGeoPoint.Signature, () => new TLDecryptedMessageMediaGeoPoint()},\r\n                    {TLDecryptedMessageMediaContact.Signature, () => new TLDecryptedMessageMediaContact()},\r\n                    \r\n                    {TLDHConfig.Signature, () => new TLDHConfig()},\r\n                    {TLDHConfigNotModified.Signature, () => new TLDHConfigNotModified()},\r\n                    \r\n                    {TLSentEncryptedMessage.Signature, () => new TLSentEncryptedMessage()},\r\n                    {TLSentEncryptedFile.Signature, () => new TLSentEncryptedFile()},\r\n\r\n                    {TLMessageDetailedInfo.Signature, () => new TLMessageDetailedInfo()},\r\n                    {TLMessageNewDetailedInfo.Signature, () => new TLMessageNewDetailedInfo()},\r\n                    {TLMessagesAllInfo.Signature, () => new TLMessagesAllInfo()},\r\n\r\n                    {TLUpdateNewMessage.Signature, () => new TLUpdateNewMessage()},\r\n                    {TLUpdateMessageId.Signature, () => new TLUpdateMessageId()},\r\n                    {TLUpdateReadMessages.Signature, () => new TLUpdateReadMessages()},\r\n                    {TLUpdateDeleteMessages.Signature, () => new TLUpdateDeleteMessages()},\r\n                    {TLUpdateRestoreMessages.Signature, () => new TLUpdateRestoreMessages()},\r\n                    {TLUpdateUserTyping.Signature, () => new TLUpdateUserTyping()},\r\n                    {TLUpdateChatUserTyping.Signature, () => new TLUpdateChatUserTyping()},\r\n                    {TLUpdateChatParticipants.Signature, () => new TLUpdateChatParticipants()},\r\n                    {TLUpdateUserStatus.Signature, () => new TLUpdateUserStatus()},\r\n                    {TLUpdateUserName.Signature, () => new TLUpdateUserName()},\r\n                    {TLUpdateUserPhoto.Signature, () => new TLUpdateUserPhoto()},\r\n                    {TLUpdateContactRegistered.Signature, () => new TLUpdateContactRegistered()},\r\n                    {TLUpdateContactLink.Signature, () => new TLUpdateContactLink()},\r\n                    {TLUpdateActivation.Signature, () => new TLUpdateActivation()},\r\n                    {TLUpdateNewAuthorization.Signature, () => new TLUpdateNewAuthorization()},\r\n\r\n                    {TLDifferenceEmpty.Signature, () => new TLDifferenceEmpty()},\r\n                    {TLDifference.Signature, () => new TLDifference()},\r\n                    {TLDifferenceSlice.Signature, () => new TLDifferenceSlice()},\r\n\r\n                    {TLUpdatesTooLong.Signature, () => new TLUpdatesTooLong()},\r\n                    {TLUpdatesShortMessage.Signature, () => new TLUpdatesShortMessage()},\r\n                    {TLUpdatesShortChatMessage.Signature, () => new TLUpdatesShortChatMessage()},\r\n                    {TLUpdatesShort.Signature, () => new TLUpdatesShort()},\r\n                    {TLUpdatesCombined.Signature, () => new TLUpdatesCombined()},\r\n                    {TLUpdates.Signature, () => new TLUpdates()},\r\n\r\n                    {TLFutureSalt.Signature, () => new TLFutureSalt()},\r\n                    {TLFutureSalts.Signature, () => new TLFutureSalts()},\r\n\r\n                    {TLGzipPacked.Signature, () => new TLGzipPacked()},\r\n                    {TLState.Signature, () => new TLState()},\r\n\r\n                    {TLFileTypeUnknown.Signature, () => new TLFileTypeUnknown()},\r\n                    {TLFileTypeJpeg.Signature, () => new TLFileTypeJpeg()},\r\n                    {TLFileTypeGif.Signature, () => new TLFileTypeGif()},\r\n                    {TLFileTypePng.Signature, () => new TLFileTypePng()},\r\n                    {TLFileTypeMp3.Signature, () => new TLFileTypeMp3()},\r\n                    {TLFileTypeMov.Signature, () => new TLFileTypeMov()},\r\n                    {TLFileTypePartial.Signature, () => new TLFileTypePartial()},\r\n                    {TLFileTypeMp4.Signature, () => new TLFileTypeMp4()},\r\n                    {TLFileTypeWebp.Signature, () => new TLFileTypeWebp()},\r\n\r\n\r\n                    {TLFile.Signature, () => new TLFile()},\r\n                    \r\n                    {TLInputFileLocation.Signature, () => new TLInputFileLocation()},\r\n                    {TLInputVideoFileLocation.Signature, () => new TLInputVideoFileLocation()},\r\n\r\n                    {TLInviteText.Signature, () => new TLInviteText()},\r\n\r\n                    {TLDHGenOk.Signature, () => new TLDHGenOk()},\r\n                    {TLDHGenRetry.Signature, () => new TLDHGenRetry()},\r\n                    {TLDHGenFail.Signature, () => new TLDHGenFail()},\r\n\r\n                    {TLServerDHInnerData.Signature, () => new TLServerDHInnerData()},\r\n                    {TLServerDHParamsFail.Signature, () => new TLServerDHParamsFail()},\r\n                    {TLServerDHParamsOk.Signature, () => new TLServerDHParamsOk()},\r\n                    {TLPQInnerData.Signature, () => new TLPQInnerData()},\r\n                    {TLResPQ.Signature, () => new TLResPQ()},\r\n\r\n                    {TLContactsBlocked.Signature, () => new TLContactsBlocked()},\r\n                    {TLContactsBlockedSlice.Signature, () => new TLContactsBlockedSlice()},\r\n                    {TLContactBlocked.Signature, () => new TLContactBlocked()},\r\n                    \r\n                    {TLImportedContacts.Signature, () => new TLImportedContacts()},\r\n                    {TLImportedContact.Signature, () => new TLImportedContact()},\r\n\r\n                    {TLInputContact.Signature, () => new TLInputContact()},\r\n\r\n                    {TLContactStatus.Signature, () => new TLContactStatus()},\r\n\r\n                    {TLForeignLinkUnknown.Signature, () => new TLForeignLinkUnknown()},\r\n                    {TLForeignLinkRequested.Signature, () => new TLForeignLinkRequested()},\r\n                    {TLForeignLinkMutual.Signature, () => new TLForeignLinkMutual()},\r\n\r\n                    {TLMyLinkEmpty.Signature, () => new TLMyLinkEmpty()},\r\n                    {TLMyLinkContact.Signature, () => new TLMyLinkContact()},\r\n                    {TLMyLinkRequested.Signature, () => new TLMyLinkRequested()},\r\n\r\n                    {TLLink.Signature, () => new TLLink()},\r\n\r\n                    {TLUserFull.Signature, () => new TLUserFull()},\r\n                    \r\n                    {TLPhotos.Signature, () => new TLPhotos()},\r\n                    {TLPhotosSlice.Signature, () => new TLPhotosSlice()},\r\n                    {TLPhotosPhoto.Signature, () => new TLPhotosPhoto()},\r\n\r\n                    {TLInputPeerNotifyEventsEmpty.Signature, () => new TLInputPeerNotifyEventsEmpty()},\r\n                    {TLInputPeerNotifyEventsAll.Signature, () => new TLInputPeerNotifyEventsAll()},\r\n\r\n                    {TLInputPeerNotifySettings.Signature, () => new TLInputPeerNotifySettings()},\r\n\r\n                    {TLInputNotifyPeer.Signature, () => new TLInputNotifyPeer()},\r\n                    {TLInputNotifyUsers.Signature, () => new TLInputNotifyUsers()},\r\n                    {TLInputNotifyChats.Signature, () => new TLInputNotifyChats()},\r\n                    {TLInputNotifyAll.Signature, () => new TLInputNotifyAll()},\r\n\r\n                    {TLInputUserEmpty.Signature, () => new TLInputUserEmpty()},\r\n                    {TLInputUserSelf.Signature, () => new TLInputUserSelf()},\r\n                    {TLInputUserContact.Signature, () => new TLInputUserContact()},\r\n                    {TLInputUserForeign.Signature, () => new TLInputUserForeign()},\r\n\r\n                    {TLInputPhotoCropAuto.Signature, () => new TLInputPhotoCropAuto()},\r\n                    {TLInputPhotoCrop.Signature, () => new TLInputPhotoCrop()},\r\n\r\n                    {TLInputChatPhotoEmpty.Signature, () => new TLInputChatPhotoEmpty()},\r\n                    {TLInputChatUploadedPhoto.Signature, () => new TLInputChatUploadedPhoto()},\r\n                    {TLInputChatPhoto.Signature, () => new TLInputChatPhoto()},\r\n\r\n                    {TLMessagesChatFull.Signature, () => new TLMessagesChatFull()},\r\n                    {TLChatFull.Signature, () => new TLChatFull()},\r\n\r\n                    {TLChatParticipant.Signature, () => new TLChatParticipant()},\r\n\r\n                    {TLChatParticipantsForbidden.Signature, () => new TLChatParticipantsForbidden()},\r\n                    {TLChatParticipants.Signature, () => new TLChatParticipants()},\r\n\r\n                    {TLPeerNotifySettingsEmpty.Signature, () => new TLPeerNotifySettingsEmpty()},\r\n                    {TLPeerNotifySettings.Signature, () => new TLPeerNotifySettings()},\r\n\r\n                    {TLPeerNotifyEventsEmpty.Signature, () => new TLPeerNotifyEventsEmpty()},\r\n                    {TLPeerNotifyEventsAll.Signature, () => new TLPeerNotifyEventsAll()},\r\n\r\n                    {TLChats.Signature, () => new TLChats()},\r\n\r\n                    {TLMessages.Signature, () => new TLMessages()},\r\n                    {TLMessagesSlice.Signature, () => new TLMessagesSlice()},\r\n\r\n                    {TLExportedAuthorization.Signature, () => new TLExportedAuthorization()},                   \r\n\r\n                    {TLInputFile.Signature, () => new TLInputFile()},\r\n                    {TLInputPhotoEmpty.Signature, () => new TLInputPhotoEmpty()},\r\n                    {TLInputPhoto.Signature, () => new TLInputPhoto()},\r\n                    {TLInputGeoPoint.Signature, () => new TLInputGeoPoint()}, \r\n                    {TLInputGeoPointEmpty.Signature, () => new TLInputGeoPointEmpty()},\r\n                    {TLInputVideo.Signature, () => new TLInputVideo()}, \r\n                    {TLInputVideoEmpty.Signature, () => new TLInputVideoEmpty()},\r\n\r\n                    {TLInputMediaEmpty.Signature, () => new TLInputMediaEmpty()},\r\n                    {TLInputMediaUploadedPhoto.Signature, () => new TLInputMediaUploadedPhoto()},\r\n                    {TLInputMediaPhoto.Signature, () => new TLInputMediaPhoto()},\r\n                    {TLInputMediaGeoPoint.Signature, () => new TLInputMediaGeoPoint()}, \r\n                    {TLInputMediaContact.Signature, () => new TLInputMediaContact()},\r\n                    {TLInputMediaUploadedVideo.Signature, () => new TLInputMediaUploadedVideo()},\r\n                    {TLInputMediaUploadedThumbVideo.Signature, () => new TLInputMediaUploadedThumbVideo()},\r\n                    {TLInputMediaVideo.Signature, () => new TLInputMediaVideo()},\r\n\r\n                    {TLInputMessagesFilterEmpty.Signature, () => new TLInputMessagesFilterEmpty()},\r\n                    {TLInputMessagesFilterPhoto.Signature, () => new TLInputMessagesFilterPhoto()},\r\n                    {TLInputMessagesFilterVideo.Signature, () => new TLInputMessagesFilterVideo()},\r\n                    {TLInputMessagesFilterPhotoVideo.Signature, () => new TLInputMessagesFilterPhotoVideo()},\r\n                    {TLInputMessagesFilterPhotoVideoDocument.Signature, () => new TLInputMessagesFilterPhotoVideoDocument()},\r\n                    {TLInputMessagesFilterDocument.Signature, () => new TLInputMessagesFilterDocument()},\r\n                    {TLInputMessagesFilterAudio.Signature, () => new TLInputMessagesFilterAudio()}, \r\n                    {TLInputMessagesFilterAudioDocuments.Signature, () => new TLInputMessagesFilterAudioDocuments()}, \r\n                    {TLInputMessagesFilterUrl.Signature, () => new TLInputMessagesFilterUrl()}, \r\n\r\n                    {TLSentMessageLink.Signature, () => new TLSentMessageLink()},\r\n                    {TLStatedMessage.Signature, () => new TLStatedMessage()},\r\n                    {TLStatedMessageLink.Signature, () => new TLStatedMessageLink()},\r\n                    {TLStatedMessages.Signature, () => new TLStatedMessages()},\r\n                    {TLStatedMessagesLinks.Signature, () => new TLStatedMessagesLinks()},\r\n\r\n                    {TLAffectedHistory.Signature, () => new TLAffectedHistory()},\r\n\r\n                    {TLNull.Signature, () => new TLNull()},               \r\n\r\n                    {TLBool.BoolTrue, () => new TLBool()},\r\n                    {TLBool.BoolFalse, () => new TLBool()},\r\n                    \r\n                    {TLChatEmpty.Signature, () => new TLChatEmpty()},\r\n                    {TLChat.Signature, () => new TLChat()},\r\n                    {TLChatForbidden.Signature, () => new TLChatForbidden()},\r\n\r\n                    {TLSentMessage.Signature, () => new TLSentMessage()},\r\n\r\n                    {TLMessageEmpty.Signature, () => new TLMessageEmpty()},\r\n                    {TLMessage.Signature, () => new TLMessage()},\r\n                    {TLMessageForwarded.Signature, () => new TLMessageForwarded()},\r\n                    {TLMessageService.Signature, () => new TLMessageService()},                   \r\n\r\n                    {TLMessageMediaEmpty.Signature, () => new TLMessageMediaEmpty()},\r\n                    {TLMessageMediaPhoto.Signature, () => new TLMessageMediaPhoto()},\r\n                    {TLMessageMediaVideo.Signature, () => new TLMessageMediaVideo()},\r\n                    {TLMessageMediaGeo.Signature, () => new TLMessageMediaGeo()},\r\n                    {TLMessageMediaContact.Signature, () => new TLMessageMediaContact()},\r\n                    {TLMessageMediaUnsupported.Signature, () => new TLMessageMediaUnsupported()},\r\n\r\n                    {TLMessageActionEmpty.Signature, () => new TLMessageActionEmpty()},\r\n                    {TLMessageActionChatCreate.Signature, () => new TLMessageActionChatCreate()},\r\n                    {TLMessageActionChatEditTitle.Signature, () => new TLMessageActionChatEditTitle()},\r\n                    {TLMessageActionChatEditPhoto.Signature, () => new TLMessageActionChatEditPhoto()},\r\n                    {TLMessageActionChatDeletePhoto.Signature, () => new TLMessageActionChatDeletePhoto()},\r\n                    {TLMessageActionChatAddUser.Signature, () => new TLMessageActionChatAddUser()},\r\n                    {TLMessageActionChatDeleteUser.Signature, () => new TLMessageActionChatDeleteUser()},\r\n\r\n                    {TLPhoto.Signature, () => new TLPhoto()},\r\n                    {TLPhotoEmpty.Signature, () => new TLPhotoEmpty()},\r\n\r\n                    {TLPhotoSize.Signature, () => new TLPhotoSize()},\r\n                    {TLPhotoSizeEmpty.Signature, () => new TLPhotoSizeEmpty()},\r\n                    {TLPhotoCachedSize.Signature, () => new TLPhotoCachedSize()},\r\n\r\n                    {TLVideoEmpty.Signature, () => new TLVideoEmpty()},\r\n                    {TLVideo.Signature, () => new TLVideo()},\r\n\r\n                    {TLGeoPointEmpty.Signature, () => new TLGeoPointEmpty()},\r\n                    {TLGeoPoint.Signature, () => new TLGeoPoint()},\r\n\r\n                    {TLDialog.Signature, () => new TLDialog()},\r\n                    {TLDialogs.Signature, () => new TLDialogs()},\r\n                    {TLDialogsSlice.Signature, () => new TLDialogsSlice()},\r\n\r\n                    {TLInputPeerEmpty.Signature, () => new TLInputPeerEmpty()},\r\n                    {TLInputPeerSelf.Signature, () => new TLInputPeerSelf()},\r\n                    {TLInputPeerContact.Signature, () => new TLInputPeerContact()},\r\n                    {TLInputPeerForeign.Signature, () => new TLInputPeerForeign()},\r\n                    {TLInputPeerChat.Signature, () => new TLInputPeerChat()},\r\n                    \r\n                    {TLPeerUser.Signature, () => new TLPeerUser()},\r\n                    {TLPeerChat.Signature, () => new TLPeerChat()},\r\n\r\n                    {TLUserStatusEmpty.Signature, () => new TLUserStatusEmpty()},\r\n                    {TLUserStatusOnline.Signature, () => new TLUserStatusOnline()},\r\n                    {TLUserStatusOffline.Signature, () => new TLUserStatusOffline()},\r\n\r\n                    {TLChatPhotoEmpty.Signature, () => new TLChatPhotoEmpty()},\r\n                    {TLChatPhoto.Signature, () => new TLChatPhoto()},\r\n                    {TLUserProfilePhotoEmpty.Signature, () => new TLUserProfilePhotoEmpty()},\r\n                    {TLUserProfilePhoto.Signature, () => new TLUserProfilePhoto()},\r\n                    \r\n                    {TLUserEmpty.Signature, () => new TLUserEmpty()},\r\n                    {TLUserSelf.Signature, () => new TLUserSelf()},\r\n                    {TLUserContact.Signature, () => new TLUserContact()},\r\n                    {TLUserRequest.Signature, () => new TLUserRequest()},\r\n                    {TLUserForeign.Signature, () => new TLUserForeign()},\r\n                    {TLUserDeleted.Signature, () => new TLUserDeleted()},\r\n\r\n                    {TLSentCode.Signature, () => new TLSentCode()},\r\n\r\n                    {TLRPCResult.Signature, () => new TLRPCResult()},\r\n\r\n                    {TLRPCError.Signature, () => new TLRPCError()},\r\n                    {TLRPCReqError.Signature, () => new TLRPCReqError()},\r\n\r\n                    {TLNewSessionCreated.Signature, () => new TLNewSessionCreated()},\r\n\r\n                    {TLNearestDC.Signature, () => new TLNearestDC()},\r\n\r\n                    {TLMessagesAcknowledgment.Signature, () => new TLMessagesAcknowledgment()},\r\n\r\n                    {TLContainer.Signature, () => new TLContainer()},\r\n\r\n                    {TLFileLocationUnavailable.Signature, () => new TLFileLocationUnavailable()},\r\n                    {TLFileLocation.Signature, () => new TLFileLocation()},\r\n\r\n                    {TLDCOption.Signature, () => new TLDCOption()},\r\n\r\n                    {TLContacts.Signature, () => new TLContacts()},\r\n                    {TLContactsNotModified.Signature, () => new TLContactsNotModified()},\r\n\r\n                    {TLContact.Signature, () => new TLContact()},\r\n\r\n                    {TLConfig.Signature, () => new TLConfig()},\r\n\r\n                    {TLCheckedPhone.Signature, () => new TLCheckedPhone()},\r\n\r\n                    {TLBadServerSalt.Signature, () => new TLBadServerSalt()},\r\n                    {TLBadMessageNotification.Signature, () => new TLBadMessageNotification()},\r\n\r\n                    {TLAuthorization.Signature, () => new TLAuthorization()},\r\n\r\n                    {TLPong.Signature, () => new TLPong()},\r\n                    {TLWallPaper.Signature, () => new TLWallPaper()},\r\n                    {TLWallPaperSolid.Signature, () => new TLWallPaperSolid()},\r\n                    \r\n                    {TLSupport.Signature, () => new TLSupport()},\r\n\r\n                    //16 layer\r\n                    {TLSentAppCode.Signature, () => new TLSentAppCode()},\r\n\r\n                    //17 layer\r\n                    {TLSendMessageTypingAction.Signature, () => new TLSendMessageTypingAction()},\r\n                    {TLSendMessageCancelAction.Signature, () => new TLSendMessageCancelAction()},\r\n                    {TLSendMessageRecordVideoAction.Signature, () => new TLSendMessageRecordVideoAction()},\r\n                    {TLSendMessageUploadVideoAction.Signature, () => new TLSendMessageUploadVideoAction()},\r\n                    {TLSendMessageRecordAudioAction.Signature, () => new TLSendMessageRecordAudioAction()},\r\n                    {TLSendMessageUploadAudioAction.Signature, () => new TLSendMessageUploadAudioAction()},\r\n                    {TLSendMessageUploadPhotoAction.Signature, () => new TLSendMessageUploadPhotoAction()},\r\n                    {TLSendMessageUploadDocumentAction.Signature, () => new TLSendMessageUploadDocumentAction()},\r\n                    {TLSendMessageGeoLocationAction.Signature, () => new TLSendMessageGeoLocationAction()},\r\n                    {TLSendMessageChooseContactAction.Signature, () => new TLSendMessageChooseContactAction()},                    \r\n                    {TLUpdateUserTyping17.Signature, () => new TLUpdateUserTyping17()},\r\n                    {TLUpdateChatUserTyping17.Signature, () => new TLUpdateChatUserTyping17()},                    \r\n                    {TLMessage17.Signature, () => new TLMessage17()},\r\n                    {TLMessageForwarded17.Signature, () => new TLMessageForwarded17()},\r\n                    {TLMessageService17.Signature, () => new TLMessageService17()},\r\n\r\n                    //17 layer encrypted\r\n                    {TLDecryptedMessage17.Signature, () => new TLDecryptedMessage17()},          \r\n                    {TLDecryptedMessageService17.Signature, () => new TLDecryptedMessageService17()},\r\n                    {TLDecryptedMessageMediaAudio17.Signature, () => new TLDecryptedMessageMediaAudio17()},\r\n                    {TLDecryptedMessageMediaVideo17.Signature, () => new TLDecryptedMessageMediaVideo17()},\r\n                    {TLDecryptedMessageLayer17.Signature, () => new TLDecryptedMessageLayer17()},\r\n                    {TLDecryptedMessageActionResend.Signature, () => new TLDecryptedMessageActionResend()},\r\n                    {TLDecryptedMessageActionTyping.Signature, () => new TLDecryptedMessageActionTyping()},\r\n\r\n                    //18 layer\r\n                    {TLUpdateServiceNotification.Signature, () => new TLUpdateServiceNotification()},\r\n                    {TLContactFound.Signature, () => new TLContactFound()},\r\n                    {TLContactsFound.Signature, () => new TLContactsFound()},\r\n                    {TLUserSelf18.Signature, () => new TLUserSelf18()},\r\n                    {TLUserContact18.Signature, () => new TLUserContact18()},\r\n                    {TLUserRequest18.Signature, () => new TLUserRequest18()},\r\n                    {TLUserForeign18.Signature, () => new TLUserForeign18()},\r\n                    {TLUserDeleted18.Signature, () => new TLUserDeleted18()},\r\n\r\n                    //19 layer\r\n                    {TLUserStatusRecently.Signature, () => new TLUserStatusRecently()},\r\n                    {TLUserStatusLastWeek.Signature, () => new TLUserStatusLastWeek()},\r\n                    {TLUserStatusLastMonth.Signature, () => new TLUserStatusLastMonth()},                    \r\n                    {TLContactStatus19.Signature, () => new TLContactStatus19()},\r\n                    {TLUpdatePrivacy.Signature, () => new TLUpdatePrivacy()},\r\n                    {TLInputPrivacyKeyStatusTimestamp.Signature, () => new TLInputPrivacyKeyStatusTimestamp()},                   \r\n                    {TLPrivacyKeyStatusTimestamp.Signature, () => new TLPrivacyKeyStatusTimestamp()},\r\n                    {TLInputPrivacyValueAllowContacts.Signature, () => new TLInputPrivacyValueAllowContacts()},\r\n                    {TLInputPrivacyValueAllowAll.Signature, () => new TLInputPrivacyValueAllowAll()},\r\n                    {TLInputPrivacyValueAllowUsers.Signature, () => new TLInputPrivacyValueAllowUsers()},\r\n                    {TLInputPrivacyValueDisallowContacts.Signature, () => new TLInputPrivacyValueDisallowContacts()},\r\n                    {TLInputPrivacyValueDisallowAll.Signature, () => new TLInputPrivacyValueDisallowAll()},\r\n                    {TLInputPrivacyValueDisallowUsers.Signature, () => new TLInputPrivacyValueDisallowUsers()},\r\n                    {TLPrivacyValueAllowContacts.Signature, () => new TLPrivacyValueAllowContacts()},\r\n                    {TLPrivacyValueAllowAll.Signature, () => new TLPrivacyValueAllowAll()},\r\n                    {TLPrivacyValueAllowUsers.Signature, () => new TLPrivacyValueAllowUsers()},\r\n                    {TLPrivacyValueDisallowContacts.Signature, () => new TLPrivacyValueDisallowContacts()},\r\n                    {TLPrivacyValueDisallowAll.Signature, () => new TLPrivacyValueDisallowAll()},\r\n                    {TLPrivacyValueDisallowUsers.Signature, () => new TLPrivacyValueDisallowUsers()},                   \r\n                    {TLPrivacyRules.Signature, () => new TLPrivacyRules()},                  \r\n                    {TLAccountDaysTTL.Signature, () => new TLAccountDaysTTL()},\r\n\r\n                    //20 layer\r\n                    {TLSentChangePhoneCode.Signature, () => new TLSentChangePhoneCode()},\r\n                    {TLUpdateUserPhone.Signature, () => new TLUpdateUserPhone()},\r\n                    \r\n                    //20 layer encrypted\r\n                    {TLEncryptedChat20.Signature, () => new TLEncryptedChat20()},\r\n                    {TLDecryptedMessageActionRequestKey.Signature, () => new TLDecryptedMessageActionRequestKey()},\r\n                    {TLDecryptedMessageActionAcceptKey.Signature, () => new TLDecryptedMessageActionAcceptKey()},\r\n                    {TLDecryptedMessageActionAbortKey.Signature, () => new TLDecryptedMessageActionAbortKey()},\r\n                    {TLDecryptedMessageActionCommitKey.Signature, () => new TLDecryptedMessageActionCommitKey()},\r\n                    {TLDecryptedMessageActionNoop.Signature, () => new TLDecryptedMessageActionNoop()},\r\n                    \r\n                    //21 layer\r\n\r\n                    //22 layer\r\n                    {TLInputMediaUploadedDocument22.Signature, () => new TLInputMediaUploadedDocument22()},\r\n                    {TLInputMediaUploadedThumbDocument22.Signature, () => new TLInputMediaUploadedThumbDocument22()},                 \r\n                    {TLDocument22.Signature, () => new TLDocument22()},                  \r\n                    {TLDocumentAttributeImageSize.Signature, () => new TLDocumentAttributeImageSize()},\r\n                    {TLDocumentAttributeAnimated.Signature, () => new TLDocumentAttributeAnimated()},\r\n                    {TLDocumentAttributeSticker.Signature, () => new TLDocumentAttributeSticker()},\r\n                    {TLDocumentAttributeVideo.Signature, () => new TLDocumentAttributeVideo()},\r\n                    {TLDocumentAttributeAudio.Signature, () => new TLDocumentAttributeAudio()},\r\n                    {TLDocumentAttributeFileName.Signature, () => new TLDocumentAttributeFileName()},                  \r\n                    {TLStickersNotModified.Signature, () => new TLStickersNotModified()},\r\n                    {TLStickers.Signature, () => new TLStickers()},                \r\n                    {TLStickerPack.Signature, () => new TLStickerPack()},                    \r\n                    {TLAllStickersNotModified.Signature, () => new TLAllStickersNotModified()},\r\n                    {TLAllStickers.Signature, () => new TLAllStickers()},\r\n\r\n                    //23 layer\r\n                    {TLDisabledFeature.Signature, () => new TLDisabledFeature()},\r\n                    {TLConfig23.Signature, () => new TLConfig23()},\r\n                    \r\n                    //23 layer encrypted\r\n                    {TLDecryptedMessageMediaExternalDocument.Signature, () => new TLDecryptedMessageMediaExternalDocument()},\r\n\r\n                    //24 layer\r\n                    {TLUpdateNewMessage24.Signature, () => new TLUpdateNewMessage24()},\r\n                    {TLUpdateReadMessages24.Signature, () => new TLUpdateReadMessages24()},\r\n                    {TLUpdateDeleteMessages24.Signature, () => new TLUpdateDeleteMessages24()},\r\n                    {TLUpdatesShortMessage24.Signature, () => new TLUpdatesShortMessage24()},\r\n                    {TLUpdatesShortChatMessage24.Signature, () => new TLUpdatesShortChatMessage24()},                    \r\n                    {TLUpdateReadHistoryInbox.Signature, () => new TLUpdateReadHistoryInbox()},\r\n                    {TLUpdateReadHistoryOutbox.Signature, () => new TLUpdateReadHistoryOutbox()},                  \r\n                    {TLDialog24.Signature, () => new TLDialog24()},                    \r\n                    {TLStatedMessages24.Signature, () => new TLStatedMessages24()},\r\n                    {TLStatedMessagesLinks24.Signature, () => new TLStatedMessagesLinks24()},                    \r\n                    {TLStatedMessage24.Signature, () => new TLStatedMessage24()},\r\n                    {TLStatedMessageLink24.Signature, () => new TLStatedMessageLink24()},                    \r\n                    {TLSentMessage24.Signature, () => new TLSentMessage24()},\r\n                    {TLSentMessageLink24.Signature, () => new TLSentMessageLink24()},                   \r\n                    {TLAffectedMessages.Signature, () => new TLAffectedMessages()},\r\n                    {TLAffectedHistory24.Signature, () => new TLAffectedHistory24()},       \r\n                    {TLMessageMediaUnsupported24.Signature, () => new TLMessageMediaUnsupported24()},                 \r\n                    {TLChats24.Signature, () => new TLChats24()},                \r\n                    {TLUserSelf24.Signature, () => new TLUserSelf24()},                 \r\n                    {TLCheckedPhone24.Signature, () => new TLCheckedPhone24()},                   \r\n                    {TLContactLinkUnknown.Signature, () => new TLContactLinkUnknown()},\r\n                    {TLContactLinkNone.Signature, () => new TLContactLinkNone()},\r\n                    {TLContactLinkHasPhone.Signature, () => new TLContactLinkHasPhone()},\r\n                    {TLContactLink.Signature, () => new TLContactLink()},                   \r\n                    {TLUpdateContactLink24.Signature, () => new TLUpdateContactLink24()},\r\n                    {TLLink24.Signature, () => new TLLink24()},\r\n                    {TLConfig24.Signature, () => new TLConfig24()},\r\n\r\n                    //25 layer\r\n                    {TLMessage25.Signature, () => new TLMessage25()},\r\n                    {TLDocumentAttributeSticker25.Signature, () => new TLDocumentAttributeSticker25()},\r\n                    {TLUpdatesShortMessage25.Signature, () => new TLUpdatesShortMessage25()},\r\n                    {TLUpdatesShortChatMessage25.Signature, () => new TLUpdatesShortChatMessage25()},\r\n\r\n                    //26 layer\r\n                    {TLSentMessage26.Signature, () => new TLSentMessage26()},\r\n                    {TLSentMessageLink26.Signature, () => new TLSentMessageLink26()},\r\n                    {TLConfig26.Signature, () => new TLConfig26()},\r\n                    {TLUpdateWebPage.Signature, () => new TLUpdateWebPage()},\r\n                    {TLWebPageEmpty.Signature, () => new TLWebPageEmpty()},\r\n                    {TLWebPagePending.Signature, () => new TLWebPagePending()},\r\n                    {TLWebPage.Signature, () => new TLWebPage()},\r\n                    {TLMessageMediaWebPage.Signature, () => new TLMessageMediaWebPage()},\r\n                    {TLAccountAuthorization.Signature, () => new TLAccountAuthorization()},\r\n                    {TLAccountAuthorizations.Signature, () => new TLAccountAuthorizations()},\r\n\r\n                    //27 layer\r\n                    {TLPassword.Signature, () => new TLPassword()},\r\n                    {TLNoPassword.Signature, () => new TLNoPassword()},\r\n                    {TLPasswordSettings.Signature, () => new TLPasswordSettings()},\r\n                    {TLPasswordInputSettings.Signature, () => new TLPasswordInputSettings()},\r\n                    {TLPasswordRecovery.Signature, () => new TLPasswordRecovery()},\r\n\r\n                    //layer 28\r\n                    {TLInputMediaUploadedPhoto28.Signature, () => new TLInputMediaUploadedPhoto28()},\r\n                    {TLInputMediaPhoto28.Signature, () => new TLInputMediaPhoto28()},\r\n                    {TLInputMediaUploadedVideo28.Signature, () => new TLInputMediaUploadedVideo28()},\r\n                    {TLInputMediaUploadedThumbVideo28.Signature, () => new TLInputMediaUploadedThumbVideo28()},\r\n                    {TLInputMediaVideo28.Signature, () => new TLInputMediaVideo28()},\r\n                    {TLSendMessageUploadVideoAction28.Signature, () => new TLSendMessageUploadVideoAction28()},\r\n                    {TLSendMessageUploadAudioAction28.Signature, () => new TLSendMessageUploadAudioAction28()},\r\n                    {TLSendMessageUploadPhotoAction28.Signature, () => new TLSendMessageUploadPhotoAction28()},\r\n                    {TLSendMessageUploadDocumentAction28.Signature, () => new TLSendMessageUploadDocumentAction28()},\r\n                    {TLInputMediaVenue.Signature, () => new TLInputMediaVenue()},\r\n                    {TLMessageMediaVenue.Signature, () => new TLMessageMediaVenue()},\r\n                    {TLChatInviteEmpty.Signature, () => new TLChatInviteEmpty()},\r\n                    {TLChatInviteExported.Signature, () => new TLChatInviteExported()},\r\n                    {TLChatInviteAlready.Signature, () => new TLChatInviteAlready()},\r\n                    {TLChatInvite.Signature, () => new TLChatInvite()},\r\n                    {TLUpdateReadMessagesContents.Signature, () => new TLUpdateReadMessagesContents()},\r\n                    {TLConfig28.Signature, () => new TLConfig28()},\r\n                    {TLChatFull28.Signature, () => new TLChatFull28()},\r\n                    {TLReceivedNotifyMessage.Signature, () => new TLReceivedNotifyMessage()},\r\n                    {TLMessageActionChatJoinedByLink.Signature, () => new TLMessageActionChatJoinedByLink()},\r\n                    {TLPhoto28.Signature, () => new TLPhoto28()},\r\n                    {TLVideo28.Signature, () => new TLVideo28()},\r\n                    {TLMessageMediaPhoto28.Signature, () => new TLMessageMediaPhoto28()},\r\n                    {TLMessageMediaVideo28.Signature, () => new TLMessageMediaVideo28()},\r\n\r\n                    //layer 29\r\n                    {TLDocumentAttributeSticker29.Signature, () => new TLDocumentAttributeSticker29()},\r\n                    {TLAllStickers29.Signature, () => new TLAllStickers29()},\r\n                    {TLInputStickerSetEmpty.Signature, () => new TLInputStickerSetEmpty()},\r\n                    {TLInputStickerSetId.Signature, () => new TLInputStickerSetId()},\r\n                    {TLInputStickerSetShortName.Signature, () => new TLInputStickerSetShortName()},\r\n                    {TLStickerSet.Signature, () => new TLStickerSet()},\r\n                    {TLMessagesStickerSet.Signature, () => new TLMessagesStickerSet()},\r\n                    \r\n                    //layer 30\r\n                    {TLDCOption30.Signature, () => new TLDCOption30()},\r\n\r\n                    //layer 31\r\n                    {TLChatFull31.Signature, () => new TLChatFull31()},\r\n                    {TLMessage31.Signature, () => new TLMessage31()},\r\n                    {TLAuthorization31.Signature, () => new TLAuthorization31()},\r\n                    {TLUserFull31.Signature, () => new TLUserFull31()},\r\n                    {TLUser.Signature, () => new TLUser()},\r\n                    {TLBotCommand.Signature, () => new TLBotCommand()},\r\n                    {TLBotInfoEmpty.Signature, () => new TLBotInfoEmpty()},\r\n                    {TLBotInfo.Signature, () => new TLBotInfo()},\r\n                    {TLKeyboardButton.Signature, () => new TLKeyboardButton()},\r\n                    {TLKeyboardButtonRow.Signature, () => new TLKeyboardButtonRow()},\r\n                    {TLReplyKeyboardMarkup.Signature, () => new TLReplyKeyboardMarkup()},\r\n                    {TLReplyKeyboardHide.Signature, () => new TLReplyKeyboardHide()},\r\n                    {TLReplyKeyboardForceReply.Signature, () => new TLReplyKeyboardForceReply()},\r\n\r\n                    //layer 32\r\n                    {TLAllStickers32.Signature, () => new TLAllStickers32()},\r\n                    {TLStickerSet32.Signature, () => new TLStickerSet32()},\r\n                    {TLDocumentAttributeAudio32.Signature, () => new TLDocumentAttributeAudio32()},\r\n\r\n                    //layer 33\r\n                    {TLInputPeerUser.Signature, () => new TLInputPeerUser()},\r\n                    {TLInputUser.Signature, () => new TLInputUser()},\r\n                    {TLPhoto33.Signature, () => new TLPhoto33()},\r\n                    {TLVideo33.Signature, () => new TLVideo33()},\r\n                    {TLAudio33.Signature, () => new TLAudio33()},\r\n                    {TLAppChangelogEmpty.Signature, () => new TLAppChangelogEmpty()},\r\n                    {TLAppChangelog.Signature, () => new TLAppChangelog()},\r\n\r\n                    //layer 34\r\n                    {TLMessageEntityUnknown.Signature, () => new TLMessageEntityUnknown()},\r\n                    {TLMessageEntityMention.Signature, () => new TLMessageEntityMention()},\r\n                    {TLMessageEntityHashtag.Signature, () => new TLMessageEntityHashtag()},\r\n                    {TLMessageEntityBotCommand.Signature, () => new TLMessageEntityBotCommand()},\r\n                    {TLMessageEntityUrl.Signature, () => new TLMessageEntityUrl()},\r\n                    {TLMessageEntityEmail.Signature, () => new TLMessageEntityEmail()},\r\n                    {TLMessageEntityBold.Signature, () => new TLMessageEntityBold()},\r\n                    {TLMessageEntityItalic.Signature, () => new TLMessageEntityItalic()},\r\n                    {TLMessageEntityCode.Signature, () => new TLMessageEntityCode()},\r\n                    {TLMessageEntityPre.Signature, () => new TLMessageEntityPre()},\r\n                    {TLMessageEntityTextUrl.Signature, () => new TLMessageEntityTextUrl()},\r\n                    {TLMessage34.Signature, () => new TLMessage34()},\r\n                    {TLSentMessage34.Signature, () => new TLSentMessage34()},\r\n                    {TLUpdatesShortMessage34.Signature, () => new TLUpdatesShortMessage34()},\r\n                    {TLUpdatesShortChatMessage34.Signature, () => new TLUpdatesShortChatMessage34()},\r\n\r\n                    //layer 35\r\n                    {TLWebPage35.Signature, () => new TLWebPage35()},\r\n\r\n                    //layer 36\r\n                    {TLInputMediaUploadedVideo36.Signature, () => new TLInputMediaUploadedVideo36()},\r\n                    {TLInputMediaUploadedThumbVideo36.Signature, () => new TLInputMediaUploadedThumbVideo36()},\r\n                    {TLMessage36.Signature, () => new TLMessage36()},\r\n                    {TLUpdatesShortSentMessage.Signature, () => new TLUpdatesShortSentMessage()},\r\n\r\n                    //layer 37\r\n                    {TLChatParticipantsForbidden37.Signature, () => new TLChatParticipantsForbidden37()},\r\n                    {TLUpdateChatParticipantAdd37.Signature, () => new TLUpdateChatParticipantAdd37()},\r\n                    {TLUpdateWebPage37.Signature, () => new TLUpdateWebPage37()},\r\n\r\n                    //layer 40\r\n                    {TLInputPeerChannel.Signature, () => new TLInputPeerChannel()},\r\n                    {TLPeerChannel.Signature, () => new TLPeerChannel()},\r\n                    {TLChat40.Signature, () => new TLChat40()},\r\n                    {TLChatForbidden40.Signature, () => new TLChatForbidden40()},\r\n                    {TLChannel.Signature, () => new TLChannel()},\r\n                    {TLChannelForbidden.Signature, () => new TLChannelForbidden()},\r\n                    {TLChannelFull.Signature, () => new TLChannelFull()},\r\n                    {TLChannelParticipants40.Signature, () => new TLChannelParticipants40()},\r\n                    {TLMessage40.Signature, () => new TLMessage40()},\r\n                    {TLMessageService40.Signature, () => new TLMessageService40()},\r\n                    {TLMessageActionChannelCreate.Signature, () => new TLMessageActionChannelCreate()},\r\n                    {TLDialogChannel.Signature, () => new TLDialogChannel()},\r\n                    {TLChannelMessages.Signature, () => new TLChannelMessages()},\r\n                    {TLUpdateChannelTooLong.Signature, () => new TLUpdateChannelTooLong()},\r\n                    {TLUpdateChannel.Signature, () => new TLUpdateChannel()},\r\n                    {TLUpdateChannelGroup.Signature, () => new TLUpdateChannelGroup()},\r\n                    {TLUpdateNewChannelMessage.Signature, () => new TLUpdateNewChannelMessage()},\r\n                    {TLUpdateReadChannelInbox.Signature, () => new TLUpdateReadChannelInbox()},\r\n                    {TLUpdateDeleteChannelMessages.Signature, () => new TLUpdateDeleteChannelMessages()},\r\n                    {TLUpdateChannelMessageViews.Signature, () => new TLUpdateChannelMessageViews()},                \r\n                    {TLUpdatesShortMessage40.Signature, () => new TLUpdatesShortMessage40()},\r\n                    {TLUpdatesShortChatMessage40.Signature, () => new TLUpdatesShortChatMessage40()},\r\n                    {TLContactsFound40.Signature, () => new TLContactsFound40()},\r\n                    //{TLInputChatEmpty.Signature, () => new TLInputChatEmpty()},     // delete\r\n                    //{TLInputChat.Signature, () => new TLInputChat()},   // delete\r\n                    {TLInputChannel.Signature, () => new TLInputChannel()}, \r\n                    {TLInputChannelEmpty.Signature, () => new TLInputChannelEmpty()},\r\n                    {TLMessageRange.Signature, () => new TLMessageRange()},\r\n                    {TLMessageGroup.Signature, () => new TLMessageGroup()},\r\n                    {TLChannelDifferenceEmpty.Signature, () => new TLChannelDifferenceEmpty()},\r\n                    {TLChannelDifferenceTooLong.Signature, () => new TLChannelDifferenceTooLong()},\r\n                    {TLChannelDifference.Signature, () => new TLChannelDifference()},\r\n                    {TLChannelMessagesFilterEmpty.Signature, () => new TLChannelMessagesFilterEmpty()},\r\n                    {TLChannelMessagesFilter.Signature, () => new TLChannelMessagesFilter()},\r\n                    {TLChannelMessagesFilterCollapsed.Signature, () => new TLChannelMessagesFilterCollapsed()},\r\n                    {TLResolvedPeer.Signature, () => new TLResolvedPeer()},\r\n                    {TLChannelParticipant.Signature, () => new TLChannelParticipant()},\r\n                    {TLChannelParticipantSelf.Signature, () => new TLChannelParticipantSelf()},\r\n                    {TLChannelParticipantModerator.Signature, () => new TLChannelParticipantModerator()},\r\n                    {TLChannelParticipantEditor.Signature, () => new TLChannelParticipantEditor()},\r\n                    {TLChannelParticipantKicked.Signature, () => new TLChannelParticipantKicked()},\r\n                    {TLChannelParticipantCreator.Signature, () => new TLChannelParticipantCreator()},\r\n                    {TLChannelParticipantsRecent.Signature, () => new TLChannelParticipantsRecent()},\r\n                    {TLChannelParticipantsAdmins.Signature, () => new TLChannelParticipantsAdmins()},\r\n                    {TLChannelParticipantsKicked.Signature, () => new TLChannelParticipantsKicked()},        \r\n                    {TLChannelRoleEmpty.Signature, () => new TLChannelRoleEmpty()},\r\n                    {TLChannelRoleModerator.Signature, () => new TLChannelRoleModerator()},\r\n                    {TLChannelRoleEditor.Signature, () => new TLChannelRoleEditor()},\r\n                    {TLChannelParticipants.Signature, () => new TLChannelParticipants()},\r\n                    {TLChannelsChannelParticipant.Signature, () => new TLChannelsChannelParticipant()},\r\n                    {TLChatInvite40.Signature, () => new TLChatInvite40()},\r\n                    \r\n                    {TLChatParticipantCreator.Signature, () => new TLChatParticipantCreator()},\r\n                    {TLChatParticipantAdmin.Signature, () => new TLChatParticipantAdmin()},\r\n                    {TLChatParticipants40.Signature, () => new TLChatParticipants40()},\r\n                    {TLUpdateChatAdmins.Signature, () => new TLUpdateChatAdmins()},\r\n                    {TLUpdateChatParticipantAdmin.Signature, () => new TLUpdateChatParticipantAdmin()},\r\n\r\n                    // layer 41\r\n                    {TLConfig41.Signature, () => new TLConfig41()},\r\n                    \r\n                    {TLMessageActionChatMigrateTo.Signature, () => new TLMessageActionChatMigrateTo()},\r\n                    {TLMessageActionChatDeactivate.Signature, () => new TLMessageActionChatDeactivate()},\r\n                    {TLMessageActionChatActivate.Signature, () => new TLMessageActionChatActivate()},\r\n                    {TLMessageActionChannelMigrateFrom.Signature, () => new TLMessageActionChannelMigrateFrom()},\r\n\r\n                    {TLChannelParticipantsBots.Signature, () => new TLChannelParticipantsBots()},\r\n                    {TLChat41.Signature, () => new TLChat41()},\r\n                    {TLChannelFull41.Signature, () => new TLChannelFull41()},\r\n                    {TLMessageActionChatAddUser41.Signature, () => new TLMessageActionChatAddUser41()},\r\n\r\n                    // layer 42\r\n                    {TLTermsOfService.Signature, () => new TLTermsOfService()},\r\n                    \r\n                    {TLInputReportReasonSpam.Signature, () => new TLInputReportReasonSpam()},\r\n                    {TLInputReportReasonViolence.Signature, () => new TLInputReportReasonViolence()},\r\n                    {TLInputReportReasonPornography.Signature, () => new TLInputReportReasonPornography()},\r\n                    {TLInputReportReasonOther.Signature, () => new TLInputReportReasonOther()},\r\n                    \r\n                    // layer 43\r\n                    {TLUpdateNewStickerSet.Signature, () => new TLUpdateNewStickerSet()},\r\n                    {TLUpdateStickerSetsOrder.Signature, () => new TLUpdateStickerSetsOrder()},\r\n                    {TLUpdateStickerSets.Signature, () => new TLUpdateStickerSets()},\r\n                    {TLAllStickers43.Signature, () => new TLAllStickers43()},\r\n\r\n                    // layer 44\r\n                    {TLInputMediaGifExternal.Signature, () => new TLInputMediaGifExternal()},\r\n                    {TLUser44.Signature, () => new TLUser44()},\r\n                    {TLChannel44.Signature, () => new TLChannel44()},\r\n                    {TLInputMessagesFilterGif.Signature, () => new TLInputMessagesFilterGif()},\r\n                    {TLUpdateSavedGifs.Signature, () => new TLUpdateSavedGifs()},\r\n                    {TLConfig44.Signature, () => new TLConfig44()},\r\n                    {TLFoundGif.Signature, () => new TLFoundGif()},\r\n                    {TLFoundGifCached.Signature, () => new TLFoundGifCached()},\r\n                    {TLFoundGifs.Signature, () => new TLFoundGifs()},\r\n                    {TLSavedGifsNotModified.Signature, () => new TLSavedGifsNotModified()},\r\n                    {TLSavedGifs.Signature, () => new TLSavedGifs()},\r\n                    \r\n                    // layer 45\r\n                    {TLInputMediaUploadedDocument45.Signature, () => new TLInputMediaUploadedDocument45()},\r\n                    {TLInputMediaUploadedThumbDocument45.Signature, () => new TLInputMediaUploadedThumbDocument45()},\r\n                    {TLInputMediaDocument45.Signature, () => new TLInputMediaDocument45()},\r\n                    {TLUser45.Signature, () => new TLUser45()},\r\n                    {TLMessage45.Signature, () => new TLMessage45()},\r\n                    {TLMessageMediaDocument45.Signature, () => new TLMessageMediaDocument45()},\r\n                    {TLUpdateBotInlineQuery.Signature, () => new TLUpdateBotInlineQuery()},\r\n                    {TLUpdatesShortMessage45.Signature, () => new TLUpdatesShortMessage45()},\r\n                    {TLUpdatesShortChatMessage45.Signature, () => new TLUpdatesShortChatMessage45()},\r\n\r\n                    {TLInputBotInlineMessageMediaAuto.Signature, () => new TLInputBotInlineMessageMediaAuto()},\r\n                    {TLInputBotInlineMessageText.Signature, () => new TLInputBotInlineMessageText()},\r\n                    {TLInputBotInlineResult.Signature, () => new TLInputBotInlineResult()},\r\n                    {TLBotInlineMessageMediaAuto.Signature, () => new TLBotInlineMessageMediaAuto()},\r\n                    {TLBotInlineMessageText.Signature, () => new TLBotInlineMessageText()},\r\n                    //{TLBotInlineMediaResultDocument.Signature, () => new TLBotInlineMediaResultDocument()},\r\n                    {TLBotInlineMediaResultPhoto.Signature, () => new TLBotInlineMediaResultPhoto()},\r\n                    {TLBotInlineResult.Signature, () => new TLBotInlineResult()},\r\n                    {TLBotResults.Signature, () => new TLBotResults()},\r\n                    \r\n                    // layer 46\r\n                    {TLDocumentAttributeAudio46.Signature, () => new TLDocumentAttributeAudio46()},\r\n                    {TLInputMessagesFilterVoice.Signature, () => new TLInputMessagesFilterVoice()},\r\n                    {TLInputMessagesFilterMusic.Signature, () => new TLInputMessagesFilterMusic()},\r\n                    {TLInputPrivacyKeyChatInvite.Signature, () => new TLInputPrivacyKeyChatInvite()},\r\n                    {TLPrivacyKeyChatInvite.Signature, () => new TLPrivacyKeyChatInvite()},\r\n\r\n                    // layer 48\r\n                    {TLMessage48.Signature, () => new TLMessage48()},\r\n                    {TLInputPeerNotifySettings48.Signature, () => new TLInputPeerNotifySettings48()},\r\n                    {TLPeerNotifySettings48.Signature, () => new TLPeerNotifySettings48()},\r\n                    {TLUpdateEditChannelMessage.Signature, () => new TLUpdateEditChannelMessage()},\r\n                    {TLUpdatesShortMessage48.Signature, () => new TLUpdatesShortMessage48()},\r\n                    {TLUpdatesShortChatMessage48.Signature, () => new TLUpdatesShortChatMessage48()},\r\n                    {TLConfig48.Signature, () => new TLConfig48()},\r\n                    {TLExportedMessageLink.Signature, () => new TLExportedMessageLink()},\r\n                    {TLMessageFwdHeader.Signature, () => new TLMessageFwdHeader()},\r\n                    {TLMessageEditData.Signature, () => new TLMessageEditData()},\r\n\r\n                    // layer 49\r\n                    {TLChannel49.Signature, () => new TLChannel49()},\r\n                    {TLChannelFull49.Signature, () => new TLChannelFull49()},\r\n                    {TLMessageService49.Signature, () => new TLMessageService49()},\r\n                    {TLMessageActionPinMessage.Signature, () => new TLMessageActionPinMessage()},\r\n                    {TLPeerSettings.Signature, () => new TLPeerSettings()},\r\n                    {TLUserFull49.Signature, () => new TLUserFull49()},\r\n                    {TLUpdateChannelTooLong49.Signature, () => new TLUpdateChannelTooLong49()},\r\n                    {TLUpdateChannelPinnedMessage.Signature, () => new TLUpdateChannelPinnedMessage()},\r\n                    {TLBotInfo49.Signature, () => new TLBotInfo49()},\r\n\r\n                    // layer 50\r\n                    {TLSentCode50.Signature, () => new TLSentCode50()},\r\n                    {TLCodeTypeSms.Signature, () => new TLCodeTypeSms()},\r\n                    {TLCodeTypeCall.Signature, () => new TLCodeTypeCall()},\r\n                    {TLCodeTypeFlashCall.Signature, () => new TLCodeTypeFlashCall()},\r\n                    {TLSentCodeTypeApp.Signature, () => new TLSentCodeTypeApp()},\r\n                    {TLSentCodeTypeSms.Signature, () => new TLSentCodeTypeSms()},\r\n                    {TLSentCodeTypeCall.Signature, () => new TLSentCodeTypeCall()},\r\n                    {TLSentCodeTypeFlashCall.Signature, () => new TLSentCodeTypeFlashCall()},\r\n\r\n                    // layer 51\r\n                    {TLUpdateBotCallbackQuery.Signature, () => new TLUpdateBotCallbackQuery()},\r\n                    {TLUpdateInlineBotCallbackQuery.Signature, () => new TLUpdateInlineBotCallbackQuery()},\r\n                    {TLUpdateBotInlineQuery51.Signature, () => new TLUpdateBotInlineQuery51()},\r\n                    {TLUpdateBotInlineSend.Signature, () => new TLUpdateBotInlineSend()},\r\n                    {TLUpdateEditMessage.Signature, () => new TLUpdateEditMessage()},\r\n\r\n                    {TLKeyboardButtonUrl.Signature, () => new TLKeyboardButtonUrl()},\r\n                    {TLKeyboardButtonCallback.Signature, () => new TLKeyboardButtonCallback()},\r\n                    {TLKeyboardButtonRequestPhone.Signature, () => new TLKeyboardButtonRequestPhone()},\r\n                    {TLKeyboardButtonRequestGeoLocation.Signature, () => new TLKeyboardButtonRequestGeoLocation()},\r\n                    {TLKeyboardButtonSwitchInline.Signature, () => new TLKeyboardButtonSwitchInline()},\r\n\r\n                    {TLBotCallbackAnswer.Signature, () => new TLBotCallbackAnswer()},\r\n                    {TLReplyInlineMarkup.Signature, () => new TLReplyInlineMarkup()},\r\n\r\n                    {TLInputBotInlineMessageMediaAuto51.Signature, () => new TLInputBotInlineMessageMediaAuto51()},\r\n                    {TLInputBotInlineMessageText51.Signature, () => new TLInputBotInlineMessageText51()},\r\n                    {TLInputBotInlineMessageMediaGeo.Signature, () => new TLInputBotInlineMessageMediaGeo()},\r\n                    {TLInputBotInlineMessageMediaVenue.Signature, () => new TLInputBotInlineMessageMediaVenue()},\r\n                    {TLInputBotInlineMessageMediaContact.Signature, () => new TLInputBotInlineMessageMediaContact()},\r\n                    \r\n                    {TLInputBotInlineResultPhoto.Signature, () => new TLInputBotInlineResultPhoto()},\r\n                    {TLInputBotInlineResultDocument.Signature, () => new TLInputBotInlineResultDocument()},\r\n                    \r\n                    {TLBotInlineMessageMediaAuto51.Signature, () => new TLBotInlineMessageMediaAuto51()},\r\n                    {TLBotInlineMessageText51.Signature, () => new TLBotInlineMessageText51()},              \r\n                    {TLBotInlineMessageMediaGeo.Signature, () => new TLBotInlineMessageMediaGeo()},\r\n                    {TLBotInlineMessageMediaVenue.Signature, () => new TLBotInlineMessageMediaVenue()},\r\n                    {TLBotInlineMessageMediaContact.Signature, () => new TLBotInlineMessageMediaContact()},\r\n                    \r\n                    {TLBotInlineMediaResult.Signature, () => new TLBotInlineMediaResult()},\r\n                    {TLInputBotInlineMessageId.Signature, () => new TLInputBotInlineMessageId()},\r\n                    \r\n                    {TLBotResults51.Signature, () => new TLBotResults51()},\r\n                    {TLInlineBotSwitchPM.Signature, () => new TLInlineBotSwitchPM()},\r\n\r\n                    // layer 52\r\n                    {TLConfig52.Signature, () => new TLConfig52()},\r\n                    {TLMessageEntityMentionName.Signature, () => new TLMessageEntityMentionName()},\r\n                    {TLInputMessageEntityMentionName.Signature, () => new TLInputMessageEntityMentionName()},\r\n                    {TLPeerDialogs.Signature, () => new TLPeerDialogs()},\r\n                    {TLTopPeer.Signature, () => new TLTopPeer()},\r\n                    {TLTopPeerCategoryBotsPM.Signature, () => new TLTopPeerCategoryBotsPM()},\r\n                    {TLTopPeerCategoryBotsInline.Signature, () => new TLTopPeerCategoryBotsInline()},\r\n                    {TLTopPeerCategoryCorrespondents.Signature, () => new TLTopPeerCategoryCorrespondents()},\r\n                    {TLTopPeerCategoryGroups.Signature, () => new TLTopPeerCategoryGroups()},\r\n                    {TLTopPeerCategoryChannels.Signature, () => new TLTopPeerCategoryChannels()},\r\n                    {TLTopPeerCategoryPeers.Signature, () => new TLTopPeerCategoryPeers()},\r\n                    {TLTopPeersNotModified.Signature, () => new TLTopPeersNotModified()},\r\n                    {TLTopPeers.Signature, () => new TLTopPeers()},\r\n\r\n                    // layer 53\r\n                    {TLChannelFull53.Signature, () => new TLChannelFull53()},\r\n                    {TLDialog53.Signature, () => new TLDialog53()},\r\n                    {TLChannelMessages53.Signature, () => new TLChannelMessages53()},\r\n                    {TLUpdateDraftMessage.Signature, () => new TLUpdateDraftMessage()},\r\n                    {TLChannelDifferenceTooLong53.Signature, () => new TLChannelDifferenceTooLong53()},\r\n                    {TLInputMessagesFilterChatPhotos.Signature, () => new TLInputMessagesFilterChatPhotos()},\r\n                    {TLUpdateReadChannelOutbox.Signature, () => new TLUpdateReadChannelOutbox()},\r\n                    {TLDraftMessageEmpty.Signature, () => new TLDraftMessageEmpty()},\r\n                    {TLDraftMessage.Signature, () => new TLDraftMessage()},\r\n                    {TLChannelForbidden53.Signature, () => new TLChannelForbidden53()},\r\n                    {TLMessageActionClearHistory.Signature, () => new TLMessageActionClearHistory()},\r\n\r\n                    // layer 54\r\n                    {TLConfig54.Signature, () => new TLConfig54()},\r\n                    {TLFeaturedStickersNotModified.Signature, () => new TLFeaturedStickersNotModified()},\r\n                    {TLFeaturedStickers.Signature, () => new TLFeaturedStickers()},\r\n                    {TLUpdateReadFeaturedStickers.Signature, () => new TLUpdateReadFeaturedStickers()},\r\n                    {TLBotCallbackAnswer54.Signature, () => new TLBotCallbackAnswer54()},\r\n                    {TLDocument54.Signature, () => new TLDocument54()},\r\n                    {TLInputDocumentFileLocation54.Signature, () => new TLInputDocumentFileLocation54()},\r\n                    {TLRecentStickersNotModified.Signature, () => new TLRecentStickersNotModified()},\r\n                    {TLRecentStickers.Signature, () => new TLRecentStickers()},\r\n                    {TLUpdateRecentStickers.Signature, () => new TLUpdateRecentStickers()},\r\n                    {TLChatInvite54.Signature, () => new TLChatInvite54()},\r\n                    {TLStickerSetInstallResult.Signature, () => new TLStickerSetInstallResult()},\r\n                    {TLStickerSetInstallResultArchive.Signature, () => new TLStickerSetInstallResultArchive()},\r\n                    {TLArchivedStickers.Signature, () => new TLArchivedStickers()},\r\n                    {TLStickerSetCovered.Signature, () => new TLStickerSetCovered()},\r\n\r\n                    // layer 55\r\n                    {TLInputMediaPhotoExternal.Signature, () => new TLInputMediaPhotoExternal()},\r\n                    {TLInputMediaDocumentExternal.Signature, () => new TLInputMediaDocumentExternal()},\r\n                    {TLAuthorization55.Signature, () => new TLAuthorization55()},\r\n                    {TLUpdateConfig.Signature, () => new TLUpdateConfig()},\r\n                    {TLUpdatePtsChanged.Signature, () => new TLUpdatePtsChanged()},                   \r\n                    {TLConfig55.Signature, () => new TLConfig55()},\r\n                    {TLKeyboardButtonSwitchInline55.Signature, () => new TLKeyboardButtonSwitchInline55()},\r\n                    \r\n                    // layer 56\r\n                    {TLUpdateBotCallbackQuery56.Signature, () => new TLUpdateBotCallbackQuery56()},\r\n                    {TLUpdateInlineBotCallbackQuery56.Signature, () => new TLUpdateInlineBotCallbackQuery56()},               \r\n                    {TLUpdateStickerSetsOrder56.Signature, () => new TLUpdateStickerSetsOrder56()},\r\n                    {TLStickerSetMultiCovered.Signature, () => new TLStickerSetMultiCovered()},                   \r\n                    {TLInputMediaUploadedPhoto56.Signature, () => new TLInputMediaUploadedPhoto56()},\r\n                    {TLInputMediaUploadedDocument56.Signature, () => new TLInputMediaUploadedDocument56()},\r\n                    {TLInputMediaUploadedThumbDocument56.Signature, () => new TLInputMediaUploadedThumbDocument56()},\r\n                    {TLInputStickeredMediaPhoto.Signature, () => new TLInputStickeredMediaPhoto()},\r\n                    {TLInputStickeredMediaDocument.Signature, () => new TLInputStickeredMediaDocument()},\r\n                    {TLPhoto56.Signature, () => new TLPhoto56()},\r\n                    {TLMaskCoords.Signature, () => new TLMaskCoords()},\r\n                    {TLDocumentAttributeSticker56.Signature, () => new TLDocumentAttributeSticker56()},\r\n                    {TLDocumentAttributeHasStickers.Signature, () => new TLDocumentAttributeHasStickers()},\r\n\r\n                    // layer 57\r\n                    {TLInputMediaGame.Signature, () => new TLInputMediaGame()},\r\n                    {TLInputGameId.Signature, () => new TLInputGameId()},\r\n                    {TLInputGameShortName.Signature, () => new TLInputGameShortName()},\r\n                    {TLGame.Signature, () => new TLGame()},\r\n                    {TLHighScore.Signature, () => new TLHighScore()},\r\n                    {TLHighScores.Signature, () => new TLHighScores()},\r\n                    {TLInputBotInlineMessageGame.Signature, () => new TLInputBotInlineMessageGame()},\r\n                    {TLInputBotInlineResultGame.Signature, () => new TLInputBotInlineResultGame()},\r\n                    {TLKeyboardButtonGame.Signature, () => new TLKeyboardButtonGame()},\r\n                    {TLMessageActionGameScore.Signature, () => new TLMessageActionGameScore()},\r\n                    {TLMessageMediaGame.Signature, () => new TLMessageMediaGame()},\r\n                    \r\n                    // layer 58\r\n                    {TLUserFull58.Signature, () => new TLUserFull58()},\r\n                    {TLChatsSlice.Signature, () => new TLChatsSlice()},\r\n                    {TLUpdateChannelWebPage.Signature, () => new TLUpdateChannelWebPage()},\r\n                    {TLDifferenceTooLong.Signature, () => new TLDifferenceTooLong()},\r\n                    {TLBotResults58.Signature, () => new TLBotResults58()},\r\n                    {TLBotCallbackAnswer58.Signature, () => new TLBotCallbackAnswer58()},\r\n\r\n                    // layer 59\r\n                    {TLChatsSlice59.Signature, () => new TLChatsSlice59()},\r\n                    {TLUpdateServiceNotification59.Signature, () => new TLUpdateServiceNotification59()},\r\n                    {TLWebPage59.Signature, () => new TLWebPage59()},\r\n                    {TLWebPageNotModified.Signature, () => new TLWebPageNotModified()},\r\n                    {TLAppChangelog59.Signature, () => new TLAppChangelog59()},\r\n                    \r\n                    {TLTextEmpty.Signature, () => new TLTextEmpty()},\r\n                    {TLTextPlain.Signature, () => new TLTextPlain()},\r\n                    {TLTextBold.Signature, () => new TLTextBold()},\r\n                    {TLTextItalic.Signature, () => new TLTextItalic()},\r\n                    {TLTextUnderline.Signature, () => new TLTextUnderline()},\r\n                    {TLTextStrike.Signature, () => new TLTextStrike()},\r\n                    {TLTextFixed.Signature, () => new TLTextFixed()},\r\n                    {TLTextUrl.Signature, () => new TLTextUrl()},\r\n                    {TLTextEmail.Signature, () => new TLTextEmail()},\r\n                    {TLTextConcat.Signature, () => new TLTextConcat()},\r\n\r\n                    {TLPageBlockUnsupported.Signature, () => new TLPageBlockUnsupported()},\r\n                    {TLPageBlockTitle.Signature, () => new TLPageBlockTitle()},\r\n                    {TLPageBlockSubtitle.Signature, () => new TLPageBlockSubtitle()},\r\n                    {TLPageBlockAuthorDate.Signature, () => new TLPageBlockAuthorDate()},\r\n                    {TLPageBlockHeader.Signature, () => new TLPageBlockHeader()},\r\n                    {TLPageBlockSubheader.Signature, () => new TLPageBlockSubheader()},\r\n                    {TLPageBlockParagraph.Signature, () => new TLPageBlockParagraph()},\r\n                    {TLPageBlockPreformatted.Signature, () => new TLPageBlockPreformatted()},\r\n                    {TLPageBlockFooter.Signature, () => new TLPageBlockFooter()},\r\n                    {TLPageBlockDivider.Signature, () => new TLPageBlockDivider()},\r\n                    {TLPageBlockAnchor.Signature, () => new TLPageBlockAnchor()},\r\n                    {TLPageBlockList.Signature, () => new TLPageBlockList()},\r\n                    {TLPageBlockBlockquote.Signature, () => new TLPageBlockBlockquote()},\r\n                    {TLPageBlockPullquote.Signature, () => new TLPageBlockPullquote()},\r\n                    {TLPageBlockPhoto.Signature, () => new TLPageBlockPhoto()},\r\n                    {TLPageBlockVideo.Signature, () => new TLPageBlockVideo()},\r\n                    {TLPageBlockCover.Signature, () => new TLPageBlockCover()},\r\n                    {TLPageBlockEmbed.Signature, () => new TLPageBlockEmbed()},\r\n                    {TLPageBlockEmbedPost.Signature, () => new TLPageBlockEmbedPost()},\r\n                    {TLPageBlockCollage.Signature, () => new TLPageBlockCollage()},\r\n                    {TLPageBlockSlideshow.Signature, () => new TLPageBlockSlideshow()},\r\n                    \r\n                    {TLPagePart.Signature, () => new TLPagePart()},\r\n                    {TLPageFull.Signature, () => new TLPageFull()},\r\n\r\n                    // layer 60\r\n                    {TLUpdatePhoneCall.Signature, () => new TLUpdatePhoneCall()},\r\n                    {TLConfig60.Signature, () => new TLConfig60()},\r\n                    {TLSendMessageGamePlayAction.Signature, () => new TLSendMessageGamePlayAction()},\r\n                    {TLInputPrivacyKeyPhoneCall.Signature, () => new TLInputPrivacyKeyPhoneCall()},\r\n                    {TLPrivacyKeyPhoneCall.Signature, () => new TLPrivacyKeyPhoneCall()},\r\n                    {TLInputPhoneCall.Signature, () => new TLInputPhoneCall()},\r\n                    {TLPhoneCallEmpty.Signature, () => new TLPhoneCallEmpty()},\r\n                    {TLPhoneCallWaiting.Signature, () => new TLPhoneCallWaiting()},\r\n                    {TLPhoneCallRequested.Signature, () => new TLPhoneCallRequested()},\r\n                    {TLPhoneCall.Signature, () => new TLPhoneCall()},\r\n                    {TLPhoneCallDiscarded.Signature, () => new TLPhoneCallDiscarded()},\r\n                    {TLPhoneConnection.Signature, () => new TLPhoneConnection()},\r\n                    {TLPhoneCallProtocol.Signature, () => new TLPhoneCallProtocol()},\r\n                    {TLPhonePhoneCall.Signature, () => new TLPhonePhoneCall()},\r\n                    \r\n                    // layer 61\r\n                    {TLUpdateDialogPinned.Signature, () => new TLUpdateDialogPinned()},\r\n                    {TLUpdatePinnedDialogs.Signature, () => new TLUpdatePinnedDialogs()},\r\n                    {TLConfig61.Signature, () => new TLConfig61()},\r\n                    {TLPageBlockAuthorDate61.Signature, () => new TLPageBlockAuthorDate61()},\r\n                    {TLPageBlockEmbed61.Signature, () => new TLPageBlockEmbed61()},\r\n                    {TLPhoneCallDiscarded61.Signature, () => new TLPhoneCallDiscarded61()},\r\n                    {TLPhoneConnection61.Signature, () => new TLPhoneConnection61()},\r\n                    {TLPhoneCallDiscardReasonMissed.Signature, () => new TLPhoneCallDiscardReasonMissed()},\r\n                    {TLPhoneCallDiscardReasonDisconnect.Signature, () => new TLPhoneCallDiscardReasonDisconnect()},\r\n                    {TLPhoneCallDiscardReasonHangup.Signature, () => new TLPhoneCallDiscardReasonHangup()},\r\n                    {TLPhoneCallDiscardReasonBusy.Signature, () => new TLPhoneCallDiscardReasonBusy()},\r\n                    \r\n                    // layer 62\r\n                    {TLMessageActionPhoneCall.Signature, () => new TLMessageActionPhoneCall()},\r\n                    {TLInputMessagesFilterPhoneCalls.Signature, () => new TLInputMessagesFilterPhoneCalls()},\r\n                    {TLUpdateBotWebhookJSON.Signature, () => new TLUpdateBotWebhookJSON()},\r\n                    {TLUpdateBotWebhookJSONQuery.Signature, () => new TLUpdateBotWebhookJSONQuery()},\r\n                    {TLDataJSON.Signature, () => new TLDataJSON()},\r\n\r\n                    // layer 63\r\n                    {TLConfig63.Signature, () => new TLConfig63()},\r\n\r\n                    // layer 64\r\n                    {TLInputMediaInvoice.Signature, () => new TLInputMediaInvoice()},\r\n                    {TLMessageMediaInvoice.Signature, () => new TLMessageMediaInvoice()},\r\n                    {TLMessageActionPaymentSentMe.Signature, () => new TLMessageActionPaymentSentMe()},\r\n                    {TLMessageActionPaymentSent.Signature, () => new TLMessageActionPaymentSent()},\r\n                    {TLUpdateBotShippingQuery.Signature, () => new TLUpdateBotShippingQuery()},\r\n                    {TLUpdateBotPrecheckoutQuery.Signature, () => new TLUpdateBotPrecheckoutQuery()},\r\n                    {TLKeyboardButtonBuy.Signature, () => new TLKeyboardButtonBuy()},\r\n                    \r\n                    {TLLabeledPrice.Signature, () => new TLLabeledPrice()},\r\n                    {TLInvoice.Signature, () => new TLInvoice()},\r\n                    {TLPaymentCharge.Signature, () => new TLPaymentCharge()},\r\n                    {TLPostAddress.Signature, () => new TLPostAddress()},\r\n                    {TLPaymentRequestedInfo.Signature, () => new TLPaymentRequestedInfo()},\r\n                    {TLPaymentSavedCredentialsCard.Signature, () => new TLPaymentSavedCredentialsCard()},\r\n                    {TLWebDocument.Signature, () => new TLWebDocument()},\r\n                    {TLInputWebDocument.Signature, () => new TLInputWebDocument()},\r\n                    {TLInputWebFileLocation.Signature, () => new TLInputWebFileLocation()},\r\n                    {TLWebFile.Signature, () => new TLWebFile()},\r\n                    {TLPaymentForm.Signature, () => new TLPaymentForm()},\r\n                    {TLValidatedRequestedInfo.Signature, () => new TLValidatedRequestedInfo()},\r\n                    {TLPaymentResult.Signature, () => new TLPaymentResult()},\r\n                    {TLPaymentVerificationNeeded.Signature, () => new TLPaymentVerificationNeeded()},\r\n                    {TLPaymentReceipt.Signature, () => new TLPaymentReceipt()},\r\n                    {TLSavedInfo.Signature, () => new TLSavedInfo()},\r\n                    {TLInputPaymentCredentialsSaved.Signature, () => new TLInputPaymentCredentialsSaved()},\r\n                    {TLInputPaymentCredentials.Signature, () => new TLInputPaymentCredentials()},\r\n                    {TLTmpPassword.Signature, () => new TLTmpPassword()},\r\n                    {TLShippingOption.Signature, () => new TLShippingOption()},\r\n                    \r\n                    {TLPhoneCallRequested64.Signature, () => new TLPhoneCallRequested64()},\r\n                    {TLPhoneCallAccepted.Signature, () => new TLPhoneCallAccepted()},\r\n\r\n                    // layer 65, 66\r\n                    {TLUser66.Signature, () => new TLUser66()},\r\n                    {TLInputMessagesFilterRoundVideo.Signature, () => new TLInputMessagesFilterRoundVideo()},\r\n                    {TLInputMessagesFilterRoundVoice.Signature, () => new TLInputMessagesFilterRoundVoice()},\r\n                    {TLFileCdnRedirect.Signature, () => new TLFileCdnRedirect()},\r\n                    {TLSendMessageRecordRoundAction.Signature, () => new TLSendMessageRecordRoundAction()},\r\n                    {TLSendMessageUploadRoundAction.Signature, () => new TLSendMessageUploadRoundAction()},\r\n                    {TLSendMessageUploadRoundAction66.Signature, () => new TLSendMessageUploadRoundAction66()},\r\n                    {TLDocumentAttributeVideo66.Signature, () => new TLDocumentAttributeVideo66()},\r\n                    {TLPageBlockChannel.Signature, () => new TLPageBlockChannel()},\r\n                    {TLCdnConfig.Signature, () => new TLCdnConfig()},\r\n                    {TLCdnPublicKey.Signature, () => new TLCdnPublicKey()},\r\n                    {TLCdnFile.Signature, () => new TLCdnFile()},\r\n                    {TLCdnFileReuploadNeeded.Signature, () => new TLCdnFileReuploadNeeded()},\r\n\r\n                    // layer 67\r\n                    {TLUpdateLangPackTooLong.Signature, () => new TLUpdateLangPackTooLong()},\r\n                    {TLUpdateLangPack.Signature, () => new TLUpdateLangPack()},\r\n                    {TLConfig67.Signature, () => new TLConfig67()},\r\n                    {TLLangPackString.Signature, () => new TLLangPackString()},\r\n                    {TLLangPackStringPluralized.Signature, () => new TLLangPackStringPluralized()},\r\n                    {TLLangPackStringDeleted.Signature, () => new TLLangPackStringDeleted()},\r\n                    {TLLangPackDifference.Signature, () => new TLLangPackDifference()},\r\n                    {TLLangPackLanguage.Signature, () => new TLLangPackLanguage()},\r\n\r\n                    // layer 68\r\n                    {TLChannel68.Signature, () => new TLChannel68()},\r\n                    {TLChannelForbidden68.Signature, () => new TLChannelForbidden68()},\r\n                    {TLChannelFull68.Signature, () => new TLChannelFull68()},\r\n                    {TLChannelParticipantAdmin.Signature, () => new TLChannelParticipantAdmin()},\r\n                    {TLChannelParticipantBanned.Signature, () => new TLChannelParticipantBanned()},\r\n                    {TLChannelParticipantsKicked68.Signature, () => new TLChannelParticipantsKicked68()},\r\n                    {TLChannelParticipantsBanned.Signature, () => new TLChannelParticipantsBanned()},\r\n                    {TLChannelParticipantsSearch.Signature, () => new TLChannelParticipantsSearch()},\r\n                    {TLTopPeerCategoryPhoneCalls.Signature, () => new TLTopPeerCategoryPhoneCalls()},\r\n                    {TLPageBlockAudio.Signature, () => new TLPageBlockAudio()},\r\n                    {TLPagePart68.Signature, () => new TLPagePart68()},\r\n                    {TLPageFull68.Signature, () => new TLPageFull68()},\r\n                    {TLChannelAdminRights.Signature, () => new TLChannelAdminRights()},\r\n                    {TLChannelBannedRights.Signature, () => new TLChannelBannedRights()},                    \r\n                    {TLChannelAdminLogEventActionChangeTitle.Signature, () => new TLChannelAdminLogEventActionChangeTitle()},\r\n                    {TLChannelAdminLogEventActionChangeAbout.Signature, () => new TLChannelAdminLogEventActionChangeAbout()},\r\n                    {TLChannelAdminLogEventActionChangeUsername.Signature, () => new TLChannelAdminLogEventActionChangeUsername()},\r\n                    {TLChannelAdminLogEventActionChangePhoto.Signature, () => new TLChannelAdminLogEventActionChangePhoto()},\r\n                    {TLChannelAdminLogEventActionToggleInvites.Signature, () => new TLChannelAdminLogEventActionToggleInvites()},\r\n                    {TLChannelAdminLogEventActionToggleSignatures.Signature, () => new TLChannelAdminLogEventActionToggleSignatures()},\r\n                    {TLChannelAdminLogEventActionUpdatePinned.Signature, () => new TLChannelAdminLogEventActionUpdatePinned()},\r\n                    {TLChannelAdminLogEventActionEditMessage.Signature, () => new TLChannelAdminLogEventActionEditMessage()},\r\n                    {TLChannelAdminLogEventActionDeleteMessage.Signature, () => new TLChannelAdminLogEventActionDeleteMessage()},\r\n                    {TLChannelAdminLogEventActionParticipantJoin.Signature, () => new TLChannelAdminLogEventActionParticipantJoin()},\r\n                    {TLChannelAdminLogEventActionParticipantLeave.Signature, () => new TLChannelAdminLogEventActionParticipantLeave()},\r\n                    {TLChannelAdminLogEventActionParticipantInvite.Signature, () => new TLChannelAdminLogEventActionParticipantInvite()},\r\n                    {TLChannelAdminLogEventActionParticipantToggleBan.Signature, () => new TLChannelAdminLogEventActionParticipantToggleBan()},\r\n                    {TLChannelAdminLogEventActionParticipantToggleAdmin.Signature, () => new TLChannelAdminLogEventActionParticipantToggleAdmin()},         \r\n                    {TLChannelAdminLogEvent.Signature, () => new TLChannelAdminLogEvent()},\r\n                    {TLAdminLogResults.Signature, () => new TLAdminLogResults()},\r\n                    {TLChannelAdminLogEventsFilter.Signature, () => new TLChannelAdminLogEventsFilter()},\r\n                    \r\n                    // layer 69\r\n                    {TLPopularContact.Signature, () => new TLPopularContact()},\r\n                    {TLImportedContacts69.Signature, () => new TLImportedContacts69()},\r\n\r\n                    // layer 70\r\n                    {TLInputMediaUploadedPhoto70.Signature, () => new TLInputMediaUploadedPhoto70()},\r\n                    {TLInputMediaPhoto70.Signature, () => new TLInputMediaPhoto70()},\r\n                    {TLInputMediaUploadedDocument70.Signature, () => new TLInputMediaUploadedDocument70()},\r\n                    {TLInputMediaDocument70.Signature, () => new TLInputMediaDocument70()},\r\n                    {TLInputMediaPhotoExternal70.Signature, () => new TLInputMediaPhotoExternal70()},\r\n                    {TLInputMediaDocumentExternal70.Signature, () => new TLInputMediaDocumentExternal70()},\r\n                    {TLMessage70.Signature, () => new TLMessage70()},\r\n                    {TLMessageMediaPhoto70.Signature, () => new TLMessageMediaPhoto70()},\r\n                    {TLMessageMediaDocument70.Signature, () => new TLMessageMediaDocument70()},\r\n                    {TLMessageActionScreenshotTaken.Signature, () => new TLMessageActionScreenshotTaken()},\r\n                    {TLFileCdnRedirect70.Signature, () => new TLFileCdnRedirect70()},\r\n                    {TLMessageFwdHeader70.Signature, () => new TLMessageFwdHeader70()},\r\n                    {TLCdnFileHash.Signature, () => new TLCdnFileHash()},\r\n\r\n                    // layer 71\r\n                    {TLChannelFull71.Signature, () => new TLChannelFull71()},\r\n                    {TLDialog71.Signature, () => new TLDialog71()},\r\n                    {TLContacts71.Signature, () => new TLContacts71()},\r\n                    {TLInputMessagesFilterMyMentions.Signature, () => new TLInputMessagesFilterMyMentions()},\r\n                    {TLUpdateFavedStickers.Signature, () => new TLUpdateFavedStickers()},\r\n                    {TLUpdateChannelReadMessagesContents.Signature, () => new TLUpdateChannelReadMessagesContents()},\r\n                    {TLUpdateContactsReset.Signature, () => new TLUpdateContactsReset()},\r\n                    {TLConfig71.Signature, () => new TLConfig71()},\r\n                    {TLChannelDifferenceTooLong71.Signature, () => new TLChannelDifferenceTooLong71()},\r\n                    {TLChannelAdminLogEventActionChangeStickerSet.Signature, () => new TLChannelAdminLogEventActionChangeStickerSet()},\r\n                    {TLFavedStickersNotModified.Signature, () => new TLFavedStickersNotModified()},\r\n                    {TLFavedStickers.Signature, () => new TLFavedStickers()},\r\n\r\n                    // layer 72\r\n                    {TLInputMediaVenue72.Signature, () => new TLInputMediaVenue72()},\r\n                    {TLInputMediaGeoLive.Signature, () => new TLInputMediaGeoLive()},\r\n                    {TLChannelFull72.Signature, () => new TLChannelFull72()},\r\n                    {TLMessageMediaVenue72.Signature, () => new TLMessageMediaVenue72()},\r\n                    {TLMessageMediaGeoLive.Signature, () => new TLMessageMediaGeoLive()},\r\n                    {TLMessageActionCustomAction.Signature, () => new TLMessageActionCustomAction()},\r\n                    {TLInputMessagesFilterGeo.Signature, () => new TLInputMessagesFilterGeo()},\r\n                    {TLInputMessagesFilterContacts.Signature, () => new TLInputMessagesFilterContacts()},\r\n                    {TLUpdateChannelAvailableMessages.Signature, () => new TLUpdateChannelAvailableMessages()},\r\n                    {TLConfig72.Signature, () => new TLConfig72()},\r\n                    {TLBotResults72.Signature, () => new TLBotResults72()},\r\n                    {TLInputPaymentCredentialsApplePay.Signature, () => new TLInputPaymentCredentialsApplePay()},\r\n                    {TLInputPaymentCredentialsAndroidPay.Signature, () => new TLInputPaymentCredentialsAndroidPay()},\r\n                    {TLChannelAdminLogEventActionTogglePreHistoryHidden.Signature, () => new TLChannelAdminLogEventActionTogglePreHistoryHidden()},\r\n                    {TLRecentMeUrlUnknown.Signature, () => new TLRecentMeUrlUnknown()},\r\n                    {TLRecentMeUrlUser.Signature, () => new TLRecentMeUrlUser()},\r\n                    {TLRecentMeUrlChat.Signature, () => new TLRecentMeUrlChat()},\r\n                    {TLRecentMeUrlChatInvite.Signature, () => new TLRecentMeUrlChatInvite()},\r\n                    {TLRecentMeUrlStickerSet.Signature, () => new TLRecentMeUrlStickerSet()},\r\n                    {TLRecentMeUrls.Signature, () => new TLRecentMeUrls()},\r\n                    {TLChannelParticipantsNotModified.Signature, () => new TLChannelParticipantsNotModified()},\r\n                    \r\n                    // layer 73\r\n                    {TLChannel73.Signature, () => new TLChannel73()},\r\n                    {TLMessage73.Signature, () => new TLMessage73()},\r\n                    {TLMessageFwdHeader73.Signature, () => new TLMessageFwdHeader73()},\r\n                    {TLInputMediaInvoice73.Signature, () => new TLInputMediaInvoice73()},\r\n                    {TLInputSingleMedia.Signature, () => new TLInputSingleMedia()},\r\n\r\n                    // layer 74\r\n                    {TLContactsFound74.Signature, () => new TLContactsFound74()},\r\n                    {TLExportedMessageLink74.Signature, () => new TLExportedMessageLink74()},\r\n                    {TLInputPaymentCredentialsAndroidPay74.Signature, () => new TLInputPaymentCredentialsAndroidPay74()},\r\n                    \r\n                    // layer 75\r\n                    {TLInputMediaUploadedPhoto75.Signature, () => new TLInputMediaUploadedPhoto75()},\r\n                    {TLInputMediaPhoto75.Signature, () => new TLInputMediaPhoto75()},\r\n                    {TLInputMediaUploadedDocument75.Signature, () => new TLInputMediaUploadedDocument75()},\r\n                    {TLInputMediaDocument75.Signature, () => new TLInputMediaDocument75()},\r\n                    {TLInputMediaPhotoExternal75.Signature, () => new TLInputMediaPhotoExternal75()},\r\n                    {TLInputMediaDocumentExternal75.Signature, () => new TLInputMediaDocumentExternal75()},\r\n                    {TLMessageMediaPhoto75.Signature, () => new TLMessageMediaPhoto75()},\r\n                    {TLMessageMediaDocument75.Signature, () => new TLMessageMediaDocument75()},\r\n                    {TLInputBotInlineMessageMediaAuto75.Signature, () => new TLInputBotInlineMessageMediaAuto75()},\r\n                    {TLBotInlineMessageMediaAuto75.Signature, () => new TLBotInlineMessageMediaAuto75()},\r\n                    {TLInputSingleMedia75.Signature, () => new TLInputSingleMedia75()},\r\n\r\n                    // layer 76\r\n                    {TLChannel76.Signature, () => new TLChannel76()},\r\n                    {TLDialogFeed.Signature, () => new TLDialogFeed()},\r\n                    {TLUpdateDialogPinned76.Signature, () => new TLUpdateDialogPinned76()},\r\n                    {TLUpdatePinnedDialogs76.Signature, () => new TLUpdatePinnedDialogs76()},\r\n                    {TLUpdateReadFeed.Signature, () => new TLUpdateReadFeed()},\r\n                    {TLStickerSet76.Signature, () => new TLStickerSet76()},\r\n                    {TLRecentStickers76.Signature, () => new TLRecentStickers76()},\r\n                    {TLFeedPosition.Signature, () => new TLFeedPosition()},\r\n                    {TLInputDialogPeerFeed.Signature, () => new TLInputDialogPeerFeed()},\r\n                    {TLInputDialogPeer.Signature, () => new TLInputDialogPeer()},\r\n                    {TLDialogPeerFeed.Signature, () => new TLDialogPeerFeed()},\r\n                    {TLDialogPeer.Signature, () => new TLDialogPeer()},\r\n                    {TLWebAuthorization.Signature, () => new TLWebAuthorization()},\r\n                    {TLWebAuthorizations.Signature, () => new TLWebAuthorizations()},\r\n                    {TLInputMessageId.Signature, () => new TLInputMessageId()},\r\n                    {TLInputMessageReplyTo.Signature, () => new TLInputMessageReplyTo()},\r\n                    {TLInputMessagePinned.Signature, () => new TLInputMessagePinned()},\r\n                    {TLInputSingleMedia76.Signature, () => new TLInputSingleMedia76()},\r\n                    {TLMessageEntityPhone.Signature, () => new TLMessageEntityPhone()},\r\n                    {TLMessageEntityCashtag.Signature, () => new TLMessageEntityCashtag()},\r\n                    {TLFeedMessagesNotModified.Signature, () => new TLFeedMessagesNotModified()},\r\n                    {TLFeedMessages.Signature, () => new TLFeedMessages()},\r\n                    {TLFeedBroadcastsUngrouped.Signature, () => new TLFeedBroadcastsUngrouped()},\r\n                    {TLFeedBroadcasts.Signature, () => new TLFeedBroadcasts()},\r\n                    {TLFeedSourcesNotModified.Signature, () => new TLFeedSourcesNotModified()},\r\n                    {TLFeedSources.Signature, () => new TLFeedSources()},\r\n                    {TLMessageActionBotAllowed.Signature, () => new TLMessageActionBotAllowed()},\r\n                    {TLPeerFeed.Signature, () => new TLPeerFeed()},\r\n                    {TLInputPeerFeed.Signature, () => new TLInputPeerFeed()},\r\n                    {TLConfig76.Signature, () => new TLConfig76()},\r\n                    {TLFoundStickerSetsNotModified.Signature, () => new TLFoundStickerSetsNotModified()},\r\n                    {TLFoundStickerSets.Signature, () => new TLFoundStickerSets()},\r\n                    {TLFileHash.Signature, () => new TLFileHash()},\r\n                    {TLFileCdnRedirect76.Signature, () => new TLFileCdnRedirect76()},\r\n                    {TLInputBotInlineResult76.Signature, () => new TLInputBotInlineResult76()},\r\n                    {TLBotInlineResult76.Signature, () => new TLBotInlineResult76()},\r\n                    {TLWebDocumentNoProxy.Signature, () => new TLWebDocumentNoProxy()},\r\n                    \r\n                    // layer 77\r\n                    // layer 78\r\n                    {TLDCOption78.Signature, () => new TLDCOption78()},\r\n                    {TLConfig78.Signature, () => new TLConfig78()},\r\n                    {TLInputClientProxy.Signature, () => new TLInputClientProxy()},\r\n                    {TLProxyDataEmpty.Signature, () => new TLProxyDataEmpty()},\r\n                    {TLProxyDataPromo.Signature, () => new TLProxyDataPromo()},\r\n\r\n                    // layer 79\r\n                    {TLStickers79.Signature, () => new TLStickers79()},\r\n                    {TLPeerNotifySettings78.Signature, () => new TLPeerNotifySettings78()},\r\n                    {TLInputPeerNotifySettings78.Signature, () => new TLInputPeerNotifySettings78()},\r\n                    {TLBotInlineMessageMediaVenue78.Signature, () => new TLBotInlineMessageMediaVenue78()},\r\n                    {TLInputBotInlineMessageMediaVenue78.Signature, () => new TLInputBotInlineMessageMediaVenue78()},\r\n                    \r\n                    // layer 80\r\n                    {TLSentCode80.Signature, () => new TLSentCode80()},\r\n                    {TLTermsOfService80.Signature, () => new TLTermsOfService80()},\r\n                    {TLTermsOfServiceUpdateEmpty.Signature, () => new TLTermsOfServiceUpdateEmpty()},\r\n                    {TLTermsOfServiceUpdate.Signature, () => new TLTermsOfServiceUpdate()},\r\n                    \r\n                    // layer 81\r\n                    {TLInputSecureFileLocation.Signature, () => new TLInputSecureFileLocation()},\r\n                    {TLMessageActionSecureValuesSentMe.Signature, () => new TLMessageActionSecureValuesSentMe()},\r\n                    {TLMessageActionSecureValuesSent.Signature, () => new TLMessageActionSecureValuesSent()},\r\n                    {TLNoPassword81.Signature, () => new TLNoPassword81()},\r\n                    {TLPassword81.Signature, () => new TLPassword81()},\r\n                    {TLPasswordSettings81.Signature, () => new TLPasswordSettings81()},\r\n                    {TLPasswordInputSettings81.Signature, () => new TLPasswordInputSettings81()},\r\n                    {TLInputSecureFileUploaded.Signature, () => new TLInputSecureFileUploaded()},\r\n                    {TLInputSecureFile.Signature, () => new TLInputSecureFile()},\r\n                    {TLSecureFileEmpty.Signature, () => new TLSecureFileEmpty()},\r\n                    {TLSecureFile.Signature, () => new TLSecureFile()},\r\n                    {TLSecureData.Signature, () => new TLSecureData()},\r\n                    {TLSecurePlainPhone.Signature, () => new TLSecurePlainPhone()},\r\n                    {TLSecurePlainEmail.Signature, () => new TLSecurePlainEmail()},\r\n                    {TLSecureValueTypePersonalDetails.Signature, () => new TLSecureValueTypePersonalDetails()},\r\n                    {TLSecureValueTypePassport.Signature, () => new TLSecureValueTypePassport()},\r\n                    {TLSecureValueTypeDriverLicense.Signature, () => new TLSecureValueTypeDriverLicense()},\r\n                    {TLSecureValueTypeIdentityCard.Signature, () => new TLSecureValueTypeIdentityCard()},\r\n                    {TLSecureValueTypeInternalPassport.Signature, () => new TLSecureValueTypeInternalPassport()},\r\n                    {TLSecureValueTypeAddress.Signature, () => new TLSecureValueTypeAddress()},\r\n                    {TLSecureValueTypeUtilityBill.Signature, () => new TLSecureValueTypeUtilityBill()},\r\n                    {TLSecureValueTypeBankStatement.Signature, () => new TLSecureValueTypeBankStatement()},\r\n                    {TLSecureValueTypeRentalAgreement.Signature, () => new TLSecureValueTypeRentalAgreement()},\r\n                    {TLSecureValueTypePassportRegistration.Signature, () => new TLSecureValueTypePassportRegistration()},\r\n                    {TLSecureValueTypeTemporaryRegistration.Signature, () => new TLSecureValueTypeTemporaryRegistration()},             \r\n                    {TLSecureValueTypePhone.Signature, () => new TLSecureValueTypePhone()},\r\n                    {TLSecureValueTypeEmail.Signature, () => new TLSecureValueTypeEmail()},\r\n                    {TLSecureValue.Signature, () => new TLSecureValue()},\r\n                    {TLInputSecureValue.Signature, () => new TLInputSecureValue()},\r\n                    {TLSecureValueHash.Signature, () => new TLSecureValueHash()},\r\n                    {TLSecureValueErrorData.Signature, () => new TLSecureValueErrorData()},\r\n                    {TLSecureValueErrorFrontSide.Signature, () => new TLSecureValueErrorFrontSide()},\r\n                    {TLSecureValueErrorReverseSide.Signature, () => new TLSecureValueErrorReverseSide()},\r\n                    {TLSecureValueErrorSelfie.Signature, () => new TLSecureValueErrorSelfie()},\r\n                    {TLSecureValueErrorFile.Signature, () => new TLSecureValueErrorFile()},\r\n                    {TLSecureValueErrorFiles.Signature, () => new TLSecureValueErrorFiles()},\r\n                    {TLSecureCredentialsEncrypted.Signature, () => new TLSecureCredentialsEncrypted()},\r\n                    {TLAuthorizationForm.Signature, () => new TLAuthorizationForm()},\r\n                    {TLSentEmailCode.Signature, () => new TLSentEmailCode()},\r\n                    {TLDeepLinkInfoEmpty.Signature, () => new TLDeepLinkInfoEmpty()},\r\n                    {TLDeepLinkInfo.Signature, () => new TLDeepLinkInfo()},\r\n                    {TLSavedPhoneContact.Signature, () => new TLSavedPhoneContact()},\r\n                    {TLTakeout.Signature, () => new TLTakeout()},\r\n                    \r\n                    // layer 82\r\n                    {TLInputTakeoutFileLocation.Signature, () => new TLInputTakeoutFileLocation()},\r\n                    {TLAppUpdate.Signature, () => new TLAppUpdate()},\r\n                    {TLNoAppUpdate.Signature, () => new TLNoAppUpdate()},\r\n                    {TLInputMediaContact82.Signature, () => new TLInputMediaContact82()},\r\n                    {TLMessageMediaContact82.Signature, () => new TLMessageMediaContact82()},\r\n                    {TLGeoPoint82.Signature, () => new TLGeoPoint82()},\r\n                    {TLDialogsNotModified.Signature, () => new TLDialogsNotModified()},\r\n                    {TLUpdateDialogUnreadMark.Signature, () => new TLUpdateDialogUnreadMark()},\r\n                    {TLConfig82.Signature, () => new TLConfig82()},\r\n                    {TLInputBotInlineMessageMediaContact82.Signature, () => new TLInputBotInlineMessageMediaContact82()},\r\n                    {TLBotInlineMessageMediaContact82.Signature, () => new TLBotInlineMessageMediaContact82()},\r\n                    {TLDraftMessageEmpty82.Signature, () => new TLDraftMessageEmpty82()},\r\n                    {TLWebDocument82.Signature, () => new TLWebDocument82()},\r\n                    {TLInputWebFileGeoPointLocation.Signature, () => new TLInputWebFileGeoPointLocation()},\r\n                    {TLInputReportReasonCopyright.Signature, () => new TLInputReportReasonCopyright()},\r\n                    {TLTopPeersDisabled.Signature, () => new TLTopPeersDisabled()},\r\n                   \r\n                    // layer 83\r\n                    {TLPassword83.Signature, () => new TLPassword83()},\r\n                    {TLPasswordSettings83.Signature, () => new TLPasswordSettings83()},\r\n                    {TLPasswordInputSettings83.Signature, () => new TLPasswordInputSettings83()},\r\n                    {TLPasswordKdfAlgoUnknown.Signature, () => new TLPasswordKdfAlgoUnknown()},\r\n                    {TLSecurePasswordKdfAlgoUnknown.Signature, () => new TLSecurePasswordKdfAlgoUnknown()},\r\n                    {TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000.Signature, () => new TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000()},\r\n                    {TLSecurePasswordKdfAlgoSHA512.Signature, () => new TLSecurePasswordKdfAlgoSHA512()},\r\n                    {TLSecureSecretSettings.Signature, () => new TLSecureSecretSettings()},\r\n\r\n                    // layer 84\r\n                    {TLPassword84.Signature, () => new TLPassword84()},\r\n                    {TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.Signature, () => new TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow()},\r\n                    {TLInputCheckPasswordEmpty.Signature, () => new TLInputCheckPasswordEmpty()},\r\n                    {TLInputCheckPasswordSRP.Signature, () => new TLInputCheckPasswordSRP()},\r\n                    \r\n                    // layer 85\r\n                    {TLSecureValue85.Signature, () => new TLSecureValue85()},\r\n                    {TLInputSecureValue85.Signature, () => new TLInputSecureValue85()},\r\n                    {TLSecureValueError.Signature, () => new TLSecureValueError()},\r\n                    {TLSecureValueErrorTranslationFile.Signature, () => new TLSecureValueErrorTranslationFile()},\r\n                    {TLSecureValueErrorTranslationFiles.Signature, () => new TLSecureValueErrorTranslationFiles()},\r\n                    {TLAuthorizationForm85.Signature, () => new TLAuthorizationForm85()},\r\n                    {TLSecureRequiredType.Signature, () => new TLSecureRequiredType()},\r\n                    {TLSecureRequiredTypeOneOf.Signature, () => new TLSecureRequiredTypeOneOf()},\r\n                    {TLPassportConfigNotModified.Signature, () => new TLPassportConfigNotModified()},\r\n                    {TLPassportConfig.Signature, () => new TLPassportConfig()},\r\n                    \r\n                    //\r\n                    {TLConfigSimple.Signature, () => new TLConfigSimple()},\r\n\r\n                    //45 layer encrypted\r\n                    {TLDecryptedMessage45.Signature, () => new TLDecryptedMessage45()},\r\n                    {TLDecryptedMessageMediaPhoto45.Signature, () => new TLDecryptedMessageMediaPhoto45()},\r\n                    {TLDecryptedMessageMediaVideo45.Signature, () => new TLDecryptedMessageMediaVideo45()},\r\n                    {TLDecryptedMessageMediaDocument45.Signature, () => new TLDecryptedMessageMediaDocument45()},\r\n                    {TLDecryptedMessageMediaVenue.Signature, () => new TLDecryptedMessageMediaVenue()},\r\n                    {TLDecryptedMessageMediaWebPage.Signature, () => new TLDecryptedMessageMediaWebPage()},\r\n\r\n                    //73 layer encrypted\r\n                    {TLDecryptedMessage73.Signature, () => new TLDecryptedMessage73()},\r\n\r\n                    // functions\r\n                    {TLSendMessage.Signature, () => new TLSendMessage()},\r\n                    {TLSendInlineBotResult.Signature, () => new TLSendInlineBotResult()},\r\n                    {TLSendMedia.Signature, () => new TLSendMedia()},\r\n                    {TLForwardMessage.Signature, () => new TLForwardMessage()},\r\n                    {TLForwardMessages.Signature, () => new TLForwardMessages()},\r\n                    {TLStartBot.Signature, () => new TLStartBot()},\r\n                    {TLReadHistory.Signature, () => new TLReadHistory()},\r\n                    {TLReadChannelHistory.Signature, () => new TLReadChannelHistory()},\r\n                    {Functions.Messages.TLReadMessageContents.Signature, () => new Functions.Messages.TLReadMessageContents()},\r\n                    {Functions.Channels.TLReadMessageContents.Signature, () => new Functions.Channels.TLReadMessageContents()},\r\n                    \r\n                    {TLSendEncrypted.Signature, () => new TLSendEncrypted()},\r\n                    {TLSendEncryptedFile.Signature, () => new TLSendEncryptedFile()},\r\n                    {TLSendEncryptedService.Signature, () => new TLSendEncryptedService()},\r\n                    {TLReadEncryptedHistory.Signature, () => new TLReadEncryptedHistory()},\r\n                    \r\n                    {TLInitConnection.Signature, () => new TLInitConnection()},\r\n                    {TLInitConnection67.Signature, () => new TLInitConnection67()},\r\n\r\n                    // additional sigantures\r\n                    {TLEncryptedDialog.Signature, () => new TLEncryptedDialog()},                   \r\n                    {TLUserExtendedInfo.Signature, () => new TLUserExtendedInfo()},                   \r\n                    {TLDecryptedMessageActionEmpty.Signature, () => new TLDecryptedMessageActionEmpty()},\r\n                    {TLPeerEncryptedChat.Signature, () => new TLPeerEncryptedChat()},\r\n                    {TLBroadcastChat.Signature, () => new TLBroadcastChat()},\r\n                    {TLPeerBroadcast.Signature, () => new TLPeerBroadcast()},\r\n                    {TLBroadcastDialog.Signature, () => new TLBroadcastDialog()},\r\n                    {TLInputPeerBroadcast.Signature, () => new TLInputPeerBroadcast()},\r\n                    {TLServerFile.Signature, () => new TLServerFile()},\r\n                    {TLEncryptedChat17.Signature, () => new TLEncryptedChat17()},\r\n                    {TLMessageActionUnreadMessages.Signature, () => new TLMessageActionUnreadMessages()},\r\n                    {TLMessagesContainter.Signature, () => new TLMessagesContainter()},\r\n                    {TLHashtagItem.Signature, () => new TLHashtagItem()},\r\n                    {TLMessageActionContactRegistered.Signature, () => new TLMessageActionContactRegistered()},\r\n                    {TLPasscodeParams.Signature, () => new TLPasscodeParams()},\r\n                    {TLRecentlyUsedSticker.Signature, () => new TLRecentlyUsedSticker()},\r\n                    {TLActionInfo.Signature, () => new TLActionInfo()},\r\n                    {TLResultInfo.Signature, () => new TLResultInfo()},\r\n                    {TLMessageActionMessageGroup.Signature, () => new TLMessageActionMessageGroup()},\r\n                    {TLMessageActionChannelJoined.Signature, () => new TLMessageActionChannelJoined()},\r\n                    {TLChatSettings.Signature, () => new TLChatSettings()},\r\n                    {TLDocumentExternal.Signature, () => new TLDocumentExternal()},\r\n                    {TLDecryptedMessagesContainter.Signature, () => new TLDecryptedMessagesContainter()},\r\n                    {TLCameraSettings.Signature, () => new TLCameraSettings()},\r\n                    {TLPhotoPickerSettings.Signature, () => new TLPhotoPickerSettings()},\r\n                    {TLProxyConfig.Signature, () => new TLProxyConfig()},\r\n                    {TLCallsSecurity.Signature, () => new TLCallsSecurity()},\r\n                    {TLStickerSetEmpty.Signature, () => new TLStickerSetEmpty()},\r\n                    {TLMessageMediaGroup.Signature, () => new TLMessageMediaGroup()},\r\n                    {TLDecryptedMessageMediaGroup.Signature, () => new TLDecryptedMessageMediaGroup()},\r\n                    {TLSecureFileUploaded.Signature, () => new TLSecureFileUploaded()},\r\n                    {TLProxyConfig76.Signature, () => new TLProxyConfig76()},\r\n                    {TLSocks5Proxy.Signature, () => new TLSocks5Proxy()},\r\n                    {TLMTProtoProxy.Signature, () => new TLMTProtoProxy()},\r\n                    {TLContactsSettings.Signature, () => new TLContactsSettings()},\r\n                };\r\n\r\n        public static TimeSpan ElapsedClothedTypes;\r\n\r\n        public static TimeSpan ElapsedBaredTypes;\r\n\r\n        public static TimeSpan ElapsedVectorTypes;\r\n\r\n        public static T GetObject<T>(byte[] bytes, int position) where T : TLObject\r\n        {\r\n\r\n            //var stopwatch = Stopwatch.StartNew();\r\n\r\n            // bared types\r\n\r\n\r\n            var stopwatch2 = Stopwatch.StartNew();\r\n            try\r\n            {\r\n\r\n                if (_baredTypes.ContainsKey(typeof (T)))\r\n                {\r\n                    return (T) _baredTypes[typeof (T)].Invoke();\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n            finally\r\n            {\r\n                ElapsedBaredTypes += stopwatch2.Elapsed;\r\n            }\r\n\r\n            var stopwatch = Stopwatch.StartNew();\r\n            uint signature = 0;\r\n            try\r\n            {\r\n                // clothed types\r\n                //var signatureBytes = bytes.SubArray(position, 4);\r\n                //Array.Reverse(signatureBytes);\r\n                signature = BitConverter.ToUInt32(bytes, position);\r\n                Func<TLObject> getInstance;\r\n\r\n\r\n                // exact matching\r\n                if (_clothedTypes.TryGetValue(signature, out getInstance))\r\n                {\r\n                    return (T)getInstance.Invoke();\r\n                }\r\n\r\n\r\n                //// matching with removed leading 0\r\n                //while (signature.StartsWith(\"0\"))\r\n                //{\r\n                //    signature = signature.Remove(0, 1);\r\n                //    if (_clothedTypes.TryGetValue(\"#\" + signature, out getInstance))\r\n                //    {\r\n                //        return (T)getInstance.Invoke();\r\n                //    }\r\n                //}\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n            finally\r\n            {\r\n                ElapsedClothedTypes += stopwatch.Elapsed;\r\n            }\r\n\r\n\r\n\r\n\r\n            var stopwatch3 = Stopwatch.StartNew();\r\n            //throw new Exception(\"Signature exception\");\r\n            try\r\n            {\r\n                // TLVector\r\n                if (bytes.StartsWith(position, TLConstructors.TLVector))\r\n                {\r\n                    \r\n\r\n                    //TODO: remove workaround for TLRPCRESULT: TLVECTOR<TLINT>\r\n                    if (typeof (T) == typeof (TLObject))\r\n                    {\r\n                        Func<TLObject> getObject;\r\n                        var internalSignature = BitConverter.ToUInt32(bytes, position + 8);\r\n                        var length = BitConverter.ToInt32(bytes, position + 4);\r\n                        if (length > 0)\r\n                        {\r\n                            if (_clothedTypes.TryGetValue(internalSignature, out getObject))\r\n                            {\r\n                                var obj = getObject.Invoke();\r\n                                if (obj is TLUserBase)\r\n                                {\r\n                                    return (T)Activator.CreateInstance(typeof(TLVector<TLUserBase>));\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        if (bytes.StartsWith(position + 8, TLConstructors.TLStickerSet)\r\n                            || bytes.StartsWith(position + 8, TLConstructors.TLStickerSet32))\r\n                        {\r\n                            return (T)Activator.CreateInstance(typeof(TLVector<TLStickerSetBase>));\r\n                        }\r\n                        else if (bytes.StartsWith(position + 8, TLConstructors.TLContactStatus19)\r\n                            || bytes.StartsWith(position + 8, TLConstructors.TLContactStatus))\r\n                        {\r\n                            return (T)Activator.CreateInstance(typeof(TLVector<TLContactStatusBase>));\r\n                        }\r\n                        else if (bytes.StartsWith(position + 8, TLConstructors.TLWallPaper)\r\n                            || bytes.StartsWith(position + 8, TLConstructors.TLWallPaperSolid))\r\n                        {\r\n                            return (T)Activator.CreateInstance(typeof(TLVector<TLWallPaperBase>));\r\n                        }\r\n                        else if (bytes.StartsWith(position + 8, TLConstructors.TLStickerSetCovered)\r\n                            || bytes.StartsWith(position + 8, TLConstructors.TLStickerSetMultiCovered))\r\n                        {\r\n                            return (T)Activator.CreateInstance(typeof(TLVector<TLStickerSetCoveredBase>));\r\n                        }\r\n                        else if (bytes.StartsWith(position + 8, TLConstructors.TLSecureValue)\r\n                            || bytes.StartsWith(position + 8, TLConstructors.TLSecureValue85))\r\n                        {\r\n                            return (T)Activator.CreateInstance(typeof(TLVector<TLSecureValue>));\r\n                        }\r\n                        TLUtils.WriteLine(\"TLVecto<TLInt>  hack \", LogSeverity.Error);\r\n                        return (T) Activator.CreateInstance(typeof(TLVector<TLInt>));\r\n                    }\r\n                    else\r\n                    {\r\n                        return (T) Activator.CreateInstance(typeof (T));\r\n                    }\r\n                }\r\n\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n            finally\r\n            {\r\n                ElapsedVectorTypes += stopwatch3.Elapsed;\r\n            }\r\n\r\n            var signatureBytes = BitConverter.GetBytes(signature);\r\n            Array.Reverse(signatureBytes);\r\n            var signatureString = BitConverter.ToString(signatureBytes).Replace(\"-\", string.Empty).ToLowerInvariant();\r\n            if (typeof (T) == typeof (TLObject))\r\n            {\r\n                var error = string.Format(\"  ERROR TLObjectGenerator: Cannot find signature #{0} ({1})\\n\\n{2}\", signatureString, signature, GetStackTrace());\r\n                TLUtils.WriteLine(error, LogSeverity.Error);\r\n                Logs.Log.Write(error);\r\n                Execute.ShowDebugMessage(error);\r\n            }\r\n            else\r\n            {\r\n                var error = string.Format(\"  ERROR TLObjectGenerator: Incorrect signature #{0} ({1}) for type {2}\\n\\n{3}\", signatureString, signature, typeof(T), GetStackTrace());\r\n                TLUtils.WriteLine(error, LogSeverity.Error);\r\n                Logs.Log.Write(error);\r\n                Execute.ShowDebugMessage(error);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static string GetStackTrace()\r\n        {\r\n            try\r\n            {\r\n                var type = typeof(Environment);\r\n                foreach (var p in type.GetRuntimeProperties())\r\n                {\r\n                    if (p.Name == \"StackTrace\")\r\n                    {\r\n                        var v = p.GetValue(null, null);\r\n\r\n                        return v != null ? v.ToString() : null;\r\n                    }\r\n                }\r\n            }\r\n            catch\r\n            {\r\n                \r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static T GetNullableObject<T>(Stream input) where T : TLObject\r\n        {\r\n            // clothed types\r\n            var signatureBytes = new byte[4];\r\n            input.Read(signatureBytes, 0, 4);\r\n            uint signature = BitConverter.ToUInt32(signatureBytes, 0);\r\n\r\n            if (signature == TLNull.Signature) return null;\r\n\r\n            input.Position = input.Position - 4;\r\n            return GetObject<T>(input);\r\n        }\r\n\r\n        public static T GetObject<T>(Stream input) where T : TLObject\r\n        {\r\n            //var startPosition = input.Position;\r\n            //var stopwatch = Stopwatch.StartNew();\r\n\r\n            // bared types\r\n\r\n\r\n            var stopwatch2 = Stopwatch.StartNew();\r\n            try\r\n            {\r\n\r\n                if (_baredTypes.ContainsKey(typeof(T)))\r\n                {\r\n                    return (T)_baredTypes[typeof(T)].Invoke();\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n            finally\r\n            {\r\n                ElapsedBaredTypes += stopwatch2.Elapsed;\r\n            }\r\n\r\n            var stopwatch = Stopwatch.StartNew();\r\n            uint signature = 0;\r\n            try\r\n            {\r\n                // clothed types\r\n                var signatureBytes = new byte[4];\r\n                input.Read(signatureBytes, 0, 4);\r\n                signature = BitConverter.ToUInt32(signatureBytes, 0);\r\n                Func<TLObject> getInstance;\r\n\r\n\r\n                // exact matching\r\n                if (_clothedTypes.TryGetValue(signature, out getInstance))\r\n                {\r\n                    return (T)getInstance.Invoke();\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n            finally\r\n            {\r\n\r\n                ElapsedClothedTypes += stopwatch.Elapsed;\r\n            }\r\n\r\n\r\n\r\n\r\n            var stopwatch3 = Stopwatch.StartNew();\r\n            //throw new Exception(\"Signature exception\");\r\n            try\r\n            {\r\n                // TLVector\r\n                if (signature == TLConstructors.TLVector)\r\n                {\r\n                    //TODO: remove workaround for TLRPCRESULT: TLVECTOR<TLINT>\r\n                    if (typeof(T) == typeof(TLObject))\r\n                    {\r\n                        TLUtils.WriteLine(\"TLVecto<TLInt>  hack \", LogSeverity.Error);\r\n                        return (T)Activator.CreateInstance(typeof(TLVector<TLInt>));\r\n                    }\r\n                    else\r\n                    {\r\n                        return (T)Activator.CreateInstance(typeof(T));\r\n                    }\r\n                }\r\n\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n            finally\r\n            {\r\n                ElapsedVectorTypes += stopwatch3.Elapsed;\r\n            }\r\n\r\n            var bytes = BitConverter.GetBytes(signature);\r\n            Array.Reverse(bytes);\r\n            var signatureString = BitConverter.ToString(bytes).Replace(\"-\", string.Empty).ToLowerInvariant();\r\n            if (typeof(T) == typeof(TLObject))\r\n            {\r\n                var error = string.Format(\"  ERROR TLObjectGenerator FromStream: Cannot find signature #{0} ({1})\\n\\n{2}\", signatureString, signature, GetStackTrace());\r\n                TLUtils.WriteLine(error, LogSeverity.Error);\r\n                Execute.ShowDebugMessage(error);\r\n            }\r\n            else\r\n            {\r\n                var error = string.Format(\"  ERROR TLObjectGenerator FromStream: Incorrect signature #{0} ({1}) for type {2}\\n\\n{3}\", signatureString, signature, typeof(T), GetStackTrace());\r\n\r\n                //var count = 0;\r\n                //while (input.Position < input.Length)\r\n                //{\r\n                //    input.Position = startPosition + count;\r\n                //    var signatureBytes = new byte[4];\r\n                //    input.Read(signatureBytes, 0, 4);\r\n                //    signature = BitConverter.ToUInt32(signatureBytes, 0);\r\n                //    Func<TLObject> getInstance;\r\n                //    if (_clothedTypes.TryGetValue(signature, out getInstance))\r\n                //    {\r\n                //        var instance = getInstance.Invoke();\r\n                //    }\r\n                //    count++;\r\n                //}\r\n\r\n                TLUtils.WriteLine(error, LogSeverity.Error);\r\n                Execute.ShowDebugMessage(error);\r\n            }\r\n\r\n            return null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPQInnerData.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPQInnerData : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPQInnerData;\r\n\r\n        public TLString PQ { get; set; }\r\n\r\n        public TLString P { get; set; }\r\n\r\n        public TLString Q { get; set; }\r\n\r\n        public TLInt128 Nonce { get; set; }\r\n\r\n        public TLInt128 ServerNonce { get; set; }\r\n\r\n        public TLInt256 NewNonce { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PQ.ToBytes(),\r\n                P.ToBytes(),\r\n                Q.ToBytes(),\r\n                Nonce.ToBytes(),\r\n                ServerNonce.ToBytes(),\r\n                NewNonce.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLPQInnerDataDC : TLPQInnerData\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPQInnerDataDC;\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PQ.ToBytes(),\r\n                P.ToBytes(),\r\n                Q.ToBytes(),\r\n                Nonce.ToBytes(),\r\n                ServerNonce.ToBytes(),\r\n                NewNonce.ToBytes(),\r\n                DCId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLPageBase : TLObject\r\n    {\r\n        public TLVector<TLPageBlockBase> Blocks { get; set; }\r\n\r\n        public TLVector<TLPhotoBase> Photos { get; set; }\r\n\r\n        public TLVector<TLDocumentBase> Documents { get; set; } \r\n    }\r\n\r\n    public class TLPagePart : TLPageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPagePart;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Blocks = GetObject<TLVector<TLPageBlockBase>>(bytes, ref position);\r\n            Photos = GetObject<TLVector<TLPhotoBase>>(bytes, ref position);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Blocks.ToBytes(),\r\n                Photos.ToBytes(),\r\n                Documents.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Blocks.ToStream(output);\r\n            Photos.ToStream(output);\r\n            Documents.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Blocks = GetObject<TLVector<TLPageBlockBase>>(input);\r\n            Photos = GetObject<TLVector<TLPhotoBase>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPagePart68 : TLPageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPagePart68;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Blocks = GetObject<TLVector<TLPageBlockBase>>(bytes, ref position);\r\n            Photos = GetObject<TLVector<TLPhotoBase>>(bytes, ref position);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Blocks.ToBytes(),\r\n                Photos.ToBytes(),\r\n                Documents.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Blocks.ToStream(output);\r\n            Photos.ToStream(output);\r\n            Documents.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Blocks = GetObject<TLVector<TLPageBlockBase>>(input);\r\n            Photos = GetObject<TLVector<TLPhotoBase>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageFull : TLPageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageFull;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Blocks = GetObject<TLVector<TLPageBlockBase>>(bytes, ref position);\r\n            Photos = GetObject<TLVector<TLPhotoBase>>(bytes, ref position);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Blocks.ToBytes(),\r\n                Photos.ToBytes(),\r\n                Documents.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Blocks.ToStream(output);\r\n            Photos.ToStream(output);\r\n            Documents.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Blocks = GetObject<TLVector<TLPageBlockBase>>(input);\r\n            Photos = GetObject<TLVector<TLPhotoBase>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageFull68 : TLPageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageFull68;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Blocks = GetObject<TLVector<TLPageBlockBase>>(bytes, ref position);\r\n            Photos = GetObject<TLVector<TLPhotoBase>>(bytes, ref position);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Blocks.ToBytes(),\r\n                Photos.ToBytes(),\r\n                Documents.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Blocks.ToStream(output);\r\n            Photos.ToStream(output);\r\n            Documents.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Blocks = GetObject<TLVector<TLPageBlockBase>>(input);\r\n            Photos = GetObject<TLVector<TLPhotoBase>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPageBlock.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PageBlockVideoFlags\r\n    {\r\n        Autoplay = 0x1,     // 0\r\n        Loop = 0x2,         // 1 \r\n    }\r\n\r\n    [Flags]\r\n    public enum PageBlockEmbedFlags\r\n    {\r\n        FullWidth = 0x1,        // 0\r\n        Url = 0x2,              // 1 \r\n        Html = 0x4,             // 2\r\n        AllowScrolling = 0x8,   // 3\r\n        PosterPhotoId = 0x10,   // 4  \r\n    }\r\n\r\n    public abstract class TLPageBlockBase : TLObject { }\r\n\r\n    public class TLPageBlockUnsupported : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockUnsupported;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockTitle : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockTitle;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockSubtitle : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockSubtitle;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public abstract class TLPageBlockPublishedDateBase : TLPageBlockBase\r\n    {\r\n        public TLInt PublishedDate { get; set; }\r\n    }\r\n\r\n    public class TLPageBlockAuthorDate : TLPageBlockPublishedDateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockAuthorDate;\r\n\r\n        public TLString Author { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Author = GetObject<TLString>(bytes, ref position);\r\n            PublishedDate = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Author.ToBytes(),\r\n                PublishedDate.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Author.ToStream(output);\r\n            PublishedDate.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Author = GetObject<TLString>(input);\r\n            PublishedDate = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockAuthorDate61 : TLPageBlockPublishedDateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockAuthorDate61;\r\n\r\n        public TLRichTextBase Author { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Author = GetObject<TLRichTextBase>(bytes, ref position);\r\n            PublishedDate = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Author.ToBytes(),\r\n                PublishedDate.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Author.ToStream(output);\r\n            PublishedDate.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Author = GetObject<TLRichTextBase>(input);\r\n            PublishedDate = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockHeader : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockHeader;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockSubheader : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockSubheader;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockParagraph : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockParagraph;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockPreformatted : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockPreformatted;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public TLString Language { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n            Language = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes(),\r\n                Language.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n            Language.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n            Language = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockFooter : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockFooter;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockDivider : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockDivider;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockAnchor : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockAnchor;\r\n\r\n        public TLString Name { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Name = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Name.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Name.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Name = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockList : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockList;\r\n\r\n        public TLBool Ordered { get; set; }\r\n\r\n        public TLVector<TLRichTextBase> Items { get; set; } \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Ordered = GetObject<TLBool>(bytes, ref position);\r\n            Items = GetObject<TLVector<TLRichTextBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Ordered.ToBytes(),\r\n                Items.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Ordered.ToStream(output);\r\n            Items.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Ordered = GetObject<TLBool>(input);\r\n            Items = GetObject<TLVector<TLRichTextBase>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockBlockquote : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockBlockquote;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public TLRichTextBase Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n            Caption = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n            Caption = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockPullquote : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockPullquote;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public TLRichTextBase Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n            Caption = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n            Caption = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockPhoto : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockPhoto;\r\n\r\n        public TLLong PhotoId { get; set; }\r\n\r\n        public TLRichTextBase Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhotoId = GetObject<TLLong>(bytes, ref position);\r\n            Caption = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhotoId.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            PhotoId.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PhotoId = GetObject<TLLong>(input);\r\n            Caption = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockVideo : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockVideo;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public bool Autoplay { get { return IsSet(Flags, (int) PageBlockVideoFlags.Autoplay); } }\r\n\r\n        public bool Loop { get { return IsSet(Flags, (int) PageBlockVideoFlags.Loop); } }\r\n\r\n        public TLLong VideoId { get; set; }\r\n\r\n        public TLRichTextBase Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            VideoId = GetObject<TLLong>(bytes, ref position);\r\n            Caption = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                VideoId.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            VideoId.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            VideoId = GetObject<TLLong>(input);\r\n            Caption = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockCover : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockCover;\r\n\r\n        public TLPageBlockBase Cover { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Cover = GetObject<TLPageBlockBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Cover.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Cover.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Cover = GetObject<TLPageBlockBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockEmbed : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockEmbed;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool FullWidth { get { return IsSet(Flags, (int) PageBlockEmbedFlags.FullWidth); } }\r\n\r\n        public bool AllowScrolling { get { return IsSet(Flags, (int) PageBlockEmbedFlags.AllowScrolling); } }\r\n\r\n        protected TLString _url;\r\n\r\n        public TLString Url\r\n        {\r\n            get { return _url; }\r\n            set { SetField(out _url, value, ref _flags, (int) PageBlockEmbedFlags.Url); }\r\n        }\r\n\r\n        protected TLString _html;\r\n\r\n        public TLString Html\r\n        {\r\n            get { return _html; }\r\n            set { SetField(out _html, value, ref _flags, (int) PageBlockEmbedFlags.Html); }\r\n        }\r\n\r\n        public TLInt W { get; set; }\r\n\r\n        public TLInt H { get; set; }\r\n\r\n        public TLRichTextBase Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            _url = GetObject<TLString>(Flags, (int) PageBlockEmbedFlags.Url, null, bytes, ref position);\r\n            _html = GetObject<TLString>(Flags, (int) PageBlockEmbedFlags.Html, null, bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n            Caption = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(Url, Flags, (int) PageBlockEmbedFlags.Url),\r\n                ToBytes(Html, Flags, (int) PageBlockEmbedFlags.Html),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            ToStream(output, Url, Flags, (int) PageBlockEmbedFlags.Url);\r\n            ToStream(output, Html, Flags, (int) PageBlockEmbedFlags.Html);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            _url = GetObject<TLString>(Flags, (int) PageBlockEmbedFlags.Url, null, input);\r\n            _html = GetObject<TLString>(Flags, (int) PageBlockEmbedFlags.Html, null, input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            Caption = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockEmbed61 : TLPageBlockEmbed\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPageBlockEmbed61;\r\n\r\n        protected TLLong _posterPhotoId;\r\n\r\n        public TLLong PosterPhotoId\r\n        {\r\n            get { return _posterPhotoId; }\r\n            set { SetField(out _posterPhotoId, value, ref _flags, (int) PageBlockEmbedFlags.PosterPhotoId); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            _url = GetObject<TLString>(Flags, (int)PageBlockEmbedFlags.Url, null, bytes, ref position);\r\n            _html = GetObject<TLString>(Flags, (int)PageBlockEmbedFlags.Html, null, bytes, ref position);\r\n            _posterPhotoId = GetObject<TLLong>(Flags, (int)PageBlockEmbedFlags.PosterPhotoId, null, bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n            Caption = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(Url, Flags, (int)PageBlockEmbedFlags.Url),\r\n                ToBytes(Html, Flags, (int)PageBlockEmbedFlags.Html),\r\n                ToBytes(PosterPhotoId, Flags, (int)PageBlockEmbedFlags.PosterPhotoId),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            ToStream(output, Url, Flags, (int)PageBlockEmbedFlags.Url);\r\n            ToStream(output, Html, Flags, (int)PageBlockEmbedFlags.Html);\r\n            ToStream(output, PosterPhotoId, Flags, (int)PageBlockEmbedFlags.PosterPhotoId);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            _url = GetObject<TLString>(Flags, (int)PageBlockEmbedFlags.Url, null, input);\r\n            _html = GetObject<TLString>(Flags, (int)PageBlockEmbedFlags.Html, null, input);\r\n            _posterPhotoId = GetObject<TLLong>(Flags, (int)PageBlockEmbedFlags.PosterPhotoId, null, input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            Caption = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockEmbedPost : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockEmbedPost;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLLong WebPageId { get; set; }\r\n\r\n        public TLLong AuthorPhotoId { get; set; }\r\n\r\n        public TLString Author { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLVector<TLPageBlockBase> Blocks { get; set; } \r\n\r\n        public TLRichTextBase Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            WebPageId = GetObject<TLLong>(bytes, ref position);\r\n            AuthorPhotoId = GetObject<TLLong>(bytes, ref position);\r\n            Author = GetObject<TLString>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Blocks = GetObject<TLVector<TLPageBlockBase>>(bytes, ref position);\r\n            Caption = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Url.ToBytes(),\r\n                WebPageId.ToBytes(),\r\n                AuthorPhotoId.ToBytes(),\r\n                Author.ToBytes(),\r\n                Date.ToBytes(),\r\n                Blocks.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Url.ToStream(output);\r\n            WebPageId.ToStream(output);\r\n            AuthorPhotoId.ToStream(output);\r\n            Author.ToStream(output);\r\n            Date.ToStream(output);\r\n            Blocks.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n            WebPageId = GetObject<TLLong>(input);\r\n            AuthorPhotoId = GetObject<TLLong>(input);\r\n            Author = GetObject<TLString>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Blocks = GetObject<TLVector<TLPageBlockBase>>(input);\r\n            Caption = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockCollage : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockCollage;\r\n\r\n        public TLVector<TLPageBlockBase> Items { get; set; }\r\n\r\n        public TLRichTextBase Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Items = GetObject<TLVector<TLPageBlockBase>>(bytes, ref position);\r\n            Caption = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Items.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Items.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Items = GetObject<TLVector<TLPageBlockBase>>(input);\r\n            Caption = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockSlideshow : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockSlideshow;\r\n\r\n        public TLVector<TLPageBlockBase> Items { get; set; }\r\n\r\n        public TLRichTextBase Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Items = GetObject<TLVector<TLPageBlockBase>>(bytes, ref position);\r\n            Caption = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Items.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Items.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Items = GetObject<TLVector<TLPageBlockBase>>(input);\r\n            Caption = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockChannel : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockChannel;\r\n\r\n        public TLChatBase Channel { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Channel = GetObject<TLChatBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Channel.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Channel.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Channel = GetObject<TLChannel>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPageBlockAudio : TLPageBlockBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPageBlockAudio;\r\n\r\n        public TLLong AudioId { get; set; }\r\n\r\n        public TLRichTextBase Caption { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            AudioId = GetObject<TLLong>(bytes, ref position);\r\n            Caption = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                AudioId.ToBytes(),\r\n                Caption.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            AudioId.ToStream(output);\r\n            Caption.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            AudioId = GetObject<TLLong>(input);\r\n            Caption = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPasscodeParams.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPasscodeParams : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPasscodeParams;\r\n\r\n        public TLString Hash { get; set; }\r\n        public TLString Salt { get; set; }\r\n        public TLBool IsSimple { get; set; }\r\n        public TLInt CloseTime { get; set; }\r\n        public TLInt AutolockTimeout { get; set; }\r\n        public TLBool Locked { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLString>(bytes, ref position);\r\n            Salt = GetObject<TLString>(bytes, ref position);\r\n            IsSimple = GetObject<TLBool>(bytes, ref position);\r\n            CloseTime = GetObject<TLInt>(bytes, ref position);\r\n            AutolockTimeout = GetObject<TLInt>(bytes, ref position);\r\n            Locked = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature), \r\n                Hash.ToBytes(), \r\n                Salt.ToBytes(),\r\n                IsSimple.ToBytes(),\r\n                CloseTime.ToBytes(),\r\n                AutolockTimeout.ToBytes(),\r\n                Locked.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hash = GetObject<TLString>(input);\r\n            Salt = GetObject<TLString>(input);\r\n            IsSimple = GetObject<TLBool>(input);\r\n            CloseTime = GetObject<TLInt>(input);\r\n            AutolockTimeout = GetObject<TLInt>(input);\r\n            Locked = GetObject<TLBool>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Hash.ToStream(output);\r\n            Salt.ToStream(output);\r\n            IsSimple.ToStream(output);\r\n            CloseTime.ToStream(output);\r\n            AutolockTimeout.ToStream(output);\r\n            Locked.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPassword.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PasswordFlags\r\n    {\r\n        HasRecovery = 0x1,              // 0\r\n        HasSecureValues = 0x2,          // 1\r\n        HasPassword = 0x4,              // 2\r\n        Hint = 0x8,                     // 3\r\n        EmailUnconfirmedPattern = 0x10, // 4\r\n    }\r\n\r\n    public interface IPasswordSecret\r\n    {\r\n        TLString SecretRandom { get; set; }\r\n\r\n        TLSecurePasswordKdfAlgoBase NewSecureAlgo { get; set; }\r\n    }\r\n\r\n    public interface IPasswordSRPParams\r\n    {\r\n        TLString SRPB { get; set; }\r\n\r\n        TLLong SRPId { get; set; }\r\n\r\n        TLPasswordKdfAlgoBase CurrentAlgo { get; set; }\r\n    }\r\n\r\n    public abstract class TLPasswordBase : TLObject\r\n    {\r\n        public TLString NewSalt { get; set; }\r\n\r\n        public virtual TLString EmailUnconfirmedPattern { get; set; }\r\n\r\n        public bool IsAvailable { get { return HasPassword || !TLString.IsNullOrEmpty(EmailUnconfirmedPattern); } } \r\n\r\n        public bool IsAuthRecovery { get; set; }\r\n\r\n        public abstract bool HasPassword { get; }\r\n\r\n        public TLString CurrentPasswordHash { get; set; }\r\n    }\r\n\r\n    public class TLPassword : TLPasswordBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPassword;\r\n\r\n        public TLString CurrentSalt { get; set; }\r\n\r\n        public virtual TLString Hint { get; set; }\r\n\r\n        public virtual TLBool HasRecovery { get; set; }\r\n\r\n        public override bool HasPassword { get { return true; } }\r\n\r\n        #region Additional\r\n\r\n        public TLPasswordSettings Settings { get; set; }\r\n\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            CurrentSalt = GetObject<TLString>(bytes, ref position);\r\n            NewSalt = GetObject<TLString>(bytes, ref position);\r\n            Hint = GetObject<TLString>(bytes, ref position);\r\n            HasRecovery = GetObject<TLBool>(bytes, ref position);\r\n            EmailUnconfirmedPattern = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPassword81 : TLPassword\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPassword81;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLBool HasRecovery\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int) PasswordFlags.HasRecovery)); }\r\n            set { SetUnset(ref _flags, value != null && value.Value, (int)PasswordFlags.HasRecovery); }\r\n        }\r\n\r\n        public bool HasSecureValues\r\n        {\r\n            get { return IsSet(_flags, (int) PasswordFlags.HasSecureValues); }\r\n        }\r\n\r\n        public TLString NewSecureSalt { get; set; }\r\n\r\n        public TLString SecretRandom { get; set; }\r\n\r\n        #region Additional\r\n        public TLString CurrentSecret { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            _flags = GetObject<TLInt>(bytes, ref position);\r\n            CurrentSalt = GetObject<TLString>(bytes, ref position);\r\n            NewSalt = GetObject<TLString>(bytes, ref position);\r\n            NewSecureSalt = GetObject<TLString>(bytes, ref position);\r\n            SecretRandom = GetObject<TLString>(bytes, ref position);\r\n            Hint = GetObject<TLString>(bytes, ref position);\r\n            EmailUnconfirmedPattern = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPassword83 : TLPassword81\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPassword83;\r\n\r\n        public override bool HasPassword { get { return IsSet(_flags, (int)PasswordFlags.HasPassword); } }\r\n\r\n        protected TLPasswordKdfAlgoBase _currentAlgo;\r\n\r\n        public TLPasswordKdfAlgoBase CurrentAlgo\r\n        {\r\n            get { return _currentAlgo; }\r\n            set { SetField(out _currentAlgo, value, ref _flags, (int)PasswordFlags.HasPassword); }\r\n        }\r\n\r\n        protected TLString _hint;\r\n\r\n        public override TLString Hint\r\n        {\r\n            get { return _hint; }\r\n            set { SetField(out _hint, value, ref _flags, (int)PasswordFlags.Hint); }\r\n        }\r\n\r\n        protected TLString _emailUnconfirmedPattern;\r\n\r\n        public override TLString EmailUnconfirmedPattern\r\n        {\r\n            get { return _emailUnconfirmedPattern; }\r\n            set { SetField(out _emailUnconfirmedPattern, value, ref _flags, (int)PasswordFlags.EmailUnconfirmedPattern); }\r\n        }\r\n\r\n        public TLPasswordKdfAlgoBase NewAlgo { get; set; }\r\n\r\n        public TLSecurePasswordKdfAlgoBase NewSecureAlgo { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            _flags = GetObject<TLInt>(bytes, ref position);\r\n            _currentAlgo = GetObject<TLPasswordKdfAlgoBase>(Flags, (int) PasswordFlags.HasPassword, null, bytes, ref position);\r\n            _hint = GetObject<TLString>(Flags, (int)PasswordFlags.Hint, null, bytes, ref position);\r\n            _emailUnconfirmedPattern = GetObject<TLString>(Flags, (int)PasswordFlags.EmailUnconfirmedPattern, null, bytes, ref position);\r\n            NewAlgo = GetObject<TLPasswordKdfAlgoBase>(bytes, ref position);\r\n            NewSecureAlgo = GetObject<TLSecurePasswordKdfAlgoBase>(bytes, ref position);\r\n            SecretRandom = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPassword84 : TLPassword83, IPasswordSecret, IPasswordSRPParams\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPassword84;\r\n\r\n        public TLString SRPB { get; set; }\r\n\r\n        public TLLong SRPId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            _flags = GetObject<TLInt>(bytes, ref position);\r\n            _currentAlgo = GetObject<TLPasswordKdfAlgoBase>(Flags, (int)PasswordFlags.HasPassword, null, bytes, ref position);\r\n            SRPB = GetObject<TLString>(Flags, (int)PasswordFlags.HasPassword, null, bytes, ref position);\r\n            SRPId = GetObject<TLLong>(Flags, (int)PasswordFlags.HasPassword, null, bytes, ref position);            \r\n            _hint = GetObject<TLString>(Flags, (int)PasswordFlags.Hint, null, bytes, ref position);\r\n            _emailUnconfirmedPattern = GetObject<TLString>(Flags, (int)PasswordFlags.EmailUnconfirmedPattern, null, bytes, ref position);\r\n            NewAlgo = GetObject<TLPasswordKdfAlgoBase>(bytes, ref position);\r\n            NewSecureAlgo = GetObject<TLSecurePasswordKdfAlgoBase>(bytes, ref position);\r\n            SecretRandom = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLNoPassword : TLPasswordBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLNoPassword;\r\n\r\n        public override bool HasPassword { get { return false; } }\r\n\r\n        #region Additional\r\n\r\n        public TLPasswordSettings Settings { get; set; }\r\n\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            NewSalt = GetObject<TLString>(bytes, ref position);\r\n            EmailUnconfirmedPattern = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLNoPassword81 : TLNoPassword\r\n    {\r\n        public new const uint Signature = TLConstructors.TLNoPassword81;\r\n\r\n        public TLString NewSecureSalt { get; set; }\r\n\r\n        public TLString SecretRandom { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            NewSalt = GetObject<TLString>(bytes, ref position);\r\n            NewSecureSalt = GetObject<TLString>(bytes, ref position);\r\n            SecretRandom = GetObject<TLString>(bytes, ref position);\r\n            EmailUnconfirmedPattern = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPasswordInputSettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PasswordInputSettingsFlags\r\n    {\r\n        Password = 0x1,\r\n        Email = 0x2,\r\n        NewSecureSecret = 0x4,\r\n    }\r\n\r\n    public class TLPasswordInputSettings : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPasswordInputSettings;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; } \r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLString _newSalt;\r\n\r\n        public virtual TLString NewSalt\r\n        {\r\n            get { return _newSalt; }\r\n            set { SetField(out _newSalt, value, ref _flags, (int)PasswordInputSettingsFlags.Password); }\r\n        }\r\n\r\n        protected TLString _newPasswordHash;\r\n\r\n        public TLString NewPasswordHash\r\n        {\r\n            get { return _newPasswordHash; }\r\n            set { SetField(out _newPasswordHash, value, ref _flags, (int)PasswordInputSettingsFlags.Password); }\r\n        }\r\n\r\n        protected TLString _hint;\r\n\r\n        public TLString Hint\r\n        {\r\n            get { return _hint; }\r\n            set { SetField(out _hint, value, ref _flags, (int)PasswordInputSettingsFlags.Password); }\r\n        }\r\n\r\n        protected TLString _email;\r\n\r\n        public TLString Email\r\n        {\r\n            get { return _email; }\r\n            set { SetField(out _email, value, ref _flags, (int)PasswordInputSettingsFlags.Email); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            NewSalt = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.Password, null, bytes, ref position);\r\n            NewPasswordHash = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.Password, null, bytes, ref position);\r\n            Hint = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.Password, null, bytes, ref position);\r\n            Email = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.Email, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(NewSalt, Flags, (int)PasswordInputSettingsFlags.Password),\r\n                ToBytes(NewPasswordHash, Flags, (int)PasswordInputSettingsFlags.Password),\r\n                ToBytes(Hint, Flags, (int)PasswordInputSettingsFlags.Password),\r\n                ToBytes(Email, Flags, (int)PasswordInputSettingsFlags.Email));\r\n        }\r\n    }\r\n\r\n    public class TLPasswordInputSettings81 : TLPasswordInputSettings\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPasswordInputSettings81;\r\n\r\n        private TLString _newSecureSalt;\r\n\r\n        public virtual TLString NewSecureSalt\r\n        {\r\n            get { return _newSecureSalt; }\r\n            set { SetField(out _newSecureSalt, value, ref _flags, (int)PasswordInputSettingsFlags.NewSecureSecret); }\r\n        }\r\n\r\n        private TLString _newSecureSecret;\r\n\r\n        public virtual TLString NewSecureSecret\r\n        {\r\n            get { return _newSecureSecret; }\r\n            set { SetField(out _newSecureSecret, value, ref _flags, (int)PasswordInputSettingsFlags.NewSecureSecret); }\r\n        }\r\n\r\n        private TLLong _newSecureSecretId;\r\n\r\n        public virtual TLLong NewSecureSecretId\r\n        {\r\n            get { return _newSecureSecretId; }\r\n            set { SetField(out _newSecureSecretId, value, ref _flags, (int)PasswordInputSettingsFlags.NewSecureSecret); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            NewSalt = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.Password, null, bytes, ref position);\r\n            NewPasswordHash = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.Password, null, bytes, ref position);\r\n            Hint = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.Password, null, bytes, ref position);\r\n            Email = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.Email, null, bytes, ref position);\r\n            NewSecureSalt = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.NewSecureSecret, null, bytes, ref position);\r\n            NewSecureSecret = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.NewSecureSecret, null, bytes, ref position);\r\n            NewSecureSecretId = GetObject<TLLong>(Flags, (int)PasswordInputSettingsFlags.NewSecureSecret, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(NewSalt, Flags, (int)PasswordInputSettingsFlags.Password),\r\n                ToBytes(NewPasswordHash, Flags, (int)PasswordInputSettingsFlags.Password),\r\n                ToBytes(Hint, Flags, (int)PasswordInputSettingsFlags.Password),\r\n                ToBytes(Email, Flags, (int)PasswordInputSettingsFlags.Email),\r\n                ToBytes(NewSecureSalt, Flags, (int)PasswordInputSettingsFlags.NewSecureSecret),\r\n                ToBytes(NewSecureSecret, Flags, (int)PasswordInputSettingsFlags.NewSecureSecret),\r\n                ToBytes(NewSecureSecretId, Flags, (int)PasswordInputSettingsFlags.NewSecureSecret));\r\n        }\r\n    }\r\n\r\n    public class TLPasswordInputSettings83 : TLPasswordInputSettings81\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPasswordInputSettings83;\r\n\r\n        private TLPasswordKdfAlgoBase _newAlgo;\r\n\r\n        public TLPasswordKdfAlgoBase NewAlgo    \r\n        {\r\n            get { return _newAlgo; }\r\n            set { SetField(out _newAlgo, value, ref _flags, (int)PasswordInputSettingsFlags.Password); }\r\n        }\r\n\r\n        private TLSecureSecretSettings _newSecureSettings;\r\n\r\n        public TLSecureSecretSettings NewSecureSettings\r\n        {\r\n            get { return _newSecureSettings; }\r\n            set { SetField(out _newSecureSettings, value, ref _flags, (int)PasswordInputSettingsFlags.NewSecureSecret); }\r\n        }\r\n        \r\n        #region Additional\r\n        public string NewPassword { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            _newAlgo = GetObject<TLPasswordKdfAlgoBase>(Flags, (int)PasswordInputSettingsFlags.Password, null, bytes, ref position);\r\n            _newPasswordHash = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.Password, null, bytes, ref position);\r\n            _hint = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.Password, null, bytes, ref position);\r\n            _email = GetObject<TLString>(Flags, (int)PasswordInputSettingsFlags.Email, null, bytes, ref position);\r\n            _newSecureSettings = GetObject<TLSecureSecretSettings>(Flags, (int)PasswordInputSettingsFlags.NewSecureSecret, null, bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(NewAlgo, Flags, (int)PasswordInputSettingsFlags.Password),\r\n                ToBytes(NewPasswordHash, Flags, (int)PasswordInputSettingsFlags.Password),\r\n                ToBytes(Hint, Flags, (int)PasswordInputSettingsFlags.Password),\r\n                ToBytes(Email, Flags, (int)PasswordInputSettingsFlags.Email),\r\n                ToBytes(NewSecureSettings, Flags, (int)PasswordInputSettingsFlags.NewSecureSecret));\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLPasswordRecovery.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPasswordRecovery : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPasswordRecovery;\r\n\r\n        public TLString EmailPattern { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            EmailPattern = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLPasswordSettings.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PasswordSettingsFlags\r\n    {\r\n        Email = 0x1,                // 0\r\n        SecureSettings = 0x2,       // 1\r\n    }\r\n\r\n    public class TLPasswordSettings : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPasswordSettings;\r\n\r\n        public virtual TLString Email { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Email = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPasswordSettings81 : TLPasswordSettings\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPasswordSettings81;\r\n\r\n        public TLString SecureSalt { get; set; }\r\n\r\n        public TLString SecureSecret { get; set; }\r\n\r\n        public TLLong SecureSecretId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Email = GetObject<TLString>(bytes, ref position);\r\n            SecureSalt = GetObject<TLString>(bytes, ref position);\r\n            SecureSecret = GetObject<TLString>(bytes, ref position);\r\n            SecureSecretId = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPasswordSettings83 : TLPasswordSettings81\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPasswordSettings83;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        protected TLString _email;\r\n\r\n        public override TLString Email\r\n        {\r\n            get { return _email; }\r\n            set { SetField(out _email, value, ref _flags, (int)PasswordSettingsFlags.Email); }\r\n        }\r\n\r\n        protected TLSecureSecretSettings _secureSettings;\r\n\r\n        public TLSecureSecretSettings SecureSettings\r\n        {\r\n            get { return _secureSettings; }\r\n            set { SetField(out _secureSettings, value, ref _flags, (int)PasswordSettingsFlags.SecureSettings); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            _flags = GetObject<TLInt>(bytes, ref position);\r\n            _email = GetObject<TLString>(Flags, (int)PasswordSettingsFlags.Email, null, bytes, ref position);\r\n            _secureSettings = GetObject<TLSecureSecretSettings>(Flags, (int)PasswordSettingsFlags.SecureSettings, null, bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLPaymentCharge.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPaymentCharge : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPaymentCharge;\r\n\r\n        public TLString Id { get; set; }\r\n\r\n        public TLString ProviderChargeId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLString>(bytes, ref position);\r\n            ProviderChargeId = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLString>(input);\r\n            ProviderChargeId = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            Id.ToStream(output);\r\n            ProviderChargeId.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPaymentForm.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PaymentFormFlags\r\n    {\r\n        SavedInfo = 0x1,            // 0\r\n        SavedCredentials = 0x2,     // 1\r\n        CanSaveCredentials = 0x4,   // 2\r\n        PasswordMissing = 0x8,      // 3\r\n        Native = 0x10,              // 4\r\n    }\r\n\r\n    public class TLPaymentForm : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPaymentForm;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool CanSaveCredentials\r\n        {\r\n            get { return IsSet(Flags, (int) PaymentFormFlags.CanSaveCredentials); }\r\n            set { SetUnset(ref _flags, value, (int) PaymentFormFlags.CanSaveCredentials); }\r\n        }\r\n\r\n        public bool PasswordMissing\r\n        {\r\n            get { return IsSet(Flags, (int) PaymentFormFlags.PasswordMissing); }\r\n            set { SetUnset(ref _flags, value, (int) PaymentFormFlags.PasswordMissing); }\r\n        }\r\n\r\n        public TLInt BotId { get; set; }\r\n\r\n        public TLInvoice Invoice { get; set; }\r\n\r\n        public TLInt ProviderId { get; set; }\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        private TLString _nativeProvider;\r\n\r\n        public TLString NativeProvider\r\n        {\r\n            get { return _nativeProvider; }\r\n            set { SetField(out _nativeProvider, value, ref _flags, (int) PaymentFormFlags.Native); }\r\n        }\r\n\r\n        private TLDataJSON _nativeParams;\r\n\r\n        public TLDataJSON NativeParams\r\n        {\r\n            get { return _nativeParams; }\r\n            set { SetField(out _nativeParams, value, ref _flags, (int) PaymentFormFlags.Native); }\r\n        }\r\n\r\n        private TLPaymentRequestedInfo _savedInfo;\r\n\r\n        public TLPaymentRequestedInfo SavedInfo\r\n        {\r\n            get { return _savedInfo; }\r\n            set { SetField(out _savedInfo, value, ref _flags, (int) PaymentFormFlags.SavedInfo); }\r\n        }\r\n\r\n        private TLPaymentSavedCredentials _savedCredentials;\r\n\r\n        public TLPaymentSavedCredentials SavedCredentials\r\n        {\r\n            get { return _savedCredentials; }\r\n            set { SetField(out _savedCredentials, value, ref _flags, (int) PaymentFormFlags.SavedCredentials); }\r\n        }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public bool IsNativeProvider\r\n        {\r\n            get\r\n            {\r\n                if (TLString.Equals(NativeProvider, new TLString(\"stripe\"), StringComparison.Ordinal)\r\n                    && NativeParams != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            BotId = GetObject<TLInt>(bytes, ref position);\r\n            Invoice = GetObject<TLInvoice>(bytes, ref position);\r\n            ProviderId = GetObject<TLInt>(bytes, ref position);\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            _nativeProvider = GetObject<TLString>(Flags, (int) PaymentFormFlags.Native, null, bytes, ref position);\r\n            _nativeParams = GetObject<TLDataJSON>(Flags, (int) PaymentFormFlags.Native, null, bytes, ref position);\r\n            _savedInfo = GetObject<TLPaymentRequestedInfo>(Flags, (int) PaymentFormFlags.SavedInfo, null, bytes, ref position);\r\n            _savedCredentials = GetObject<TLPaymentSavedCredentials>(Flags, (int) PaymentFormFlags.SavedCredentials, null, bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPaymentReceipt.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PaymentReceiptFlags\r\n    {\r\n        Info = 0x1,         // 0\r\n        Shipping = 0x2,     // 1\r\n    }\r\n\r\n    public class TLPaymentReceipt : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPaymentReceipt;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt BotId { get; set; }\r\n\r\n        public TLInvoice Invoice { get; set; }\r\n\r\n        public TLInt ProviderId { get; set; }\r\n\r\n        private TLPaymentRequestedInfo _info;\r\n\r\n        public TLPaymentRequestedInfo SavedInfo\r\n        {\r\n            get { return _info; }\r\n            set { SetField(out _info, value, ref _flags, (int) PaymentReceiptFlags.Info); }\r\n        }\r\n\r\n        private TLShippingOption _shipping;\r\n\r\n        public TLShippingOption Shipping\r\n        {\r\n            get { return _shipping; }\r\n            set { SetField(out _shipping, value, ref _flags, (int) PaymentReceiptFlags.Shipping); }\r\n        }\r\n\r\n        public TLString Currency { get; set; }\r\n\r\n        public TLLong TotalAmount { get; set; }\r\n\r\n        public TLString CredentialsTitle { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            BotId = GetObject<TLInt>(bytes, ref position);\r\n            Invoice = GetObject<TLInvoice>(bytes, ref position);\r\n            ProviderId = GetObject<TLInt>(bytes, ref position);\r\n            _info = GetObject<TLPaymentRequestedInfo>(Flags, (int) PaymentReceiptFlags.Info, null, bytes, ref position);\r\n            _shipping = GetObject<TLShippingOption>(Flags, (int) PaymentReceiptFlags.Shipping, null, bytes, ref position);\r\n            Currency = GetObject<TLString>(bytes, ref position);\r\n            TotalAmount = GetObject<TLLong>(bytes, ref position);\r\n            CredentialsTitle = GetObject<TLString>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLPaymentRequestedInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PaymentRequestedInfoFlags\r\n    {\r\n        Name = 0x1,             // 0\r\n        Phone = 0x2,            // 1\r\n        Email = 0x4,            // 2\r\n        ShippingAddress = 0x8,  // 3\r\n    }\r\n\r\n    public class TLPaymentRequestedInfo : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPaymentRequestedInfo;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        protected TLString _name;\r\n\r\n        public TLString Name\r\n        {\r\n            get { return _name; }\r\n            set { SetField(out _name, value, ref _flags, (int)PaymentRequestedInfoFlags.Name); }\r\n        }\r\n\r\n        protected TLString _phone;\r\n\r\n        public TLString Phone\r\n        {\r\n            get { return _phone; }\r\n            set { SetField(out _phone, value, ref _flags, (int)PaymentRequestedInfoFlags.Phone); }\r\n        }\r\n\r\n        protected TLString _email;\r\n\r\n        public TLString Email\r\n        {\r\n            get { return _email; }\r\n            set { SetField(out _email, value, ref _flags, (int)PaymentRequestedInfoFlags.Email); }\r\n        }\r\n\r\n        protected TLPostAddress _shippingAddress;\r\n\r\n        public TLPostAddress ShippingAddress\r\n        {\r\n            get { return _shippingAddress; }\r\n            set { SetField(out _shippingAddress, value, ref _flags, (int)PaymentRequestedInfoFlags.ShippingAddress); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            _name = GetObject<TLString>(Flags, (int)PaymentRequestedInfoFlags.Name, null, bytes, ref position);\r\n            _phone = GetObject<TLString>(Flags, (int)PaymentRequestedInfoFlags.Phone, null, bytes, ref position);\r\n            _email = GetObject<TLString>(Flags, (int)PaymentRequestedInfoFlags.Email, null, bytes, ref position);\r\n            _shippingAddress = GetObject<TLPostAddress>(Flags, (int)PaymentRequestedInfoFlags.ShippingAddress, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(Name, Flags, (int)PaymentRequestedInfoFlags.Name),\r\n                ToBytes(Phone, Flags, (int)PaymentRequestedInfoFlags.Phone),\r\n                ToBytes(Email, Flags, (int)PaymentRequestedInfoFlags.Email),\r\n                ToBytes(ShippingAddress, Flags, (int)PaymentRequestedInfoFlags.ShippingAddress));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            _name = GetObject<TLString>(Flags, (int)PaymentRequestedInfoFlags.Name, null, input);\r\n            _phone = GetObject<TLString>(Flags, (int)PaymentRequestedInfoFlags.Phone, null, input);\r\n            _email = GetObject<TLString>(Flags, (int)PaymentRequestedInfoFlags.Email, null, input);\r\n            _shippingAddress = GetObject<TLPostAddress>(Flags, (int)PaymentRequestedInfoFlags.ShippingAddress, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, _name, Flags, (int)PaymentRequestedInfoFlags.Name);\r\n            ToStream(output, _phone, Flags, (int)PaymentRequestedInfoFlags.Phone);\r\n            ToStream(output, _email, Flags, (int)PaymentRequestedInfoFlags.Email);\r\n            ToStream(output, _shippingAddress, Flags, (int)PaymentRequestedInfoFlags.ShippingAddress);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPaymentResult.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLPaymentResultBase : TLObject { }\r\n\r\n    public class TLPaymentResult : TLPaymentResultBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPaymentResult;\r\n\r\n        public TLUpdatesBase Updates { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Updates = GetObject<TLUpdatesBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPaymentVerificationNeeded : TLPaymentResultBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPaymentVerificationNeeded;\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLPaymentSavedCredentialsCard.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLPaymentSavedCredentials : TLObject { }\r\n\r\n    public class TLPaymentSavedCredentialsCard : TLPaymentSavedCredentials\r\n    {\r\n        public const uint Signature = TLConstructors.TLPaymentSavedCredentialsCard;\r\n\r\n        public TLString Id { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLString>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Title.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLString>(input);\r\n            Title = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(Title.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPeer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLPeerBase : TLObject\r\n    {\r\n        public TLInt Id { get; set; }\r\n    }\r\n\r\n    public class TLPeerUser : TLPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerUser;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"UserId=\" + Id;\r\n        }\r\n    }\r\n\r\n    public class TLPeerChat : TLPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerChat;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"ChatId=\" + Id;\r\n        }\r\n    }\r\n\r\n    public class TLPeerEncryptedChat : TLPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerEncryptedChat;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"EncryptedChatId=\" + Id;\r\n        }\r\n    }\r\n\r\n    public class TLPeerBroadcast : TLPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerBroadcastChat;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"BroadcastChatId=\" + Id;\r\n        }\r\n    }\r\n\r\n    public class TLPeerChannel : TLPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerChannel;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"ChannelId=\" + Id;\r\n        }\r\n    }\r\n\r\n    public class TLPeerFeed : TLPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerFeed;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"FeedId=\" + Id;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPeerDialogs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPeerDialogs : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerDialogs;\r\n\r\n        public TLVector<TLDialogBase> Dialogs { get; set; } \r\n\r\n        public TLVector<TLMessageBase> Messages { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public TLState State { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Dialogs = GetObject<TLVector<TLDialogBase>>(bytes, ref position);\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            State = GetObject<TLState>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public TLDialogsBase ToDialogs()\r\n        {\r\n            return new TLDialogs\r\n            {\r\n                Dialogs = Dialogs,\r\n                Messages = Messages,\r\n                Chats = Chats,\r\n                Users = Users\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPeerNotifyEvents.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Runtime.Serialization;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [KnownType(typeof(TLPeerNotifyEventsEmpty))]\r\n    [KnownType(typeof(TLPeerNotifyEventsAll))]\r\n    [DataContract]\r\n    public abstract class TLPeerNotifyEventsBase : TLObject { }\r\n\r\n    [Obsolete]\r\n    [DataContract]\r\n    public class TLPeerNotifyEventsEmpty : TLPeerNotifyEventsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerNotifyEventsEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    [DataContract]\r\n    public class TLPeerNotifyEventsAll : TLPeerNotifyEventsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerNotifyEventsAll;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPeerNotifySettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PeerNotifySettingsFlags\r\n    {\r\n        ShowPreviews = 0x1,         // 0\r\n        Silent = 0x2,               // 1\r\n        MuteUntil = 0x4,            // 2\r\n        Sound = 0x8,                // 3\r\n    }\r\n\r\n    public abstract class TLPeerNotifySettingsBase : TLObject\r\n    {\r\n        #region Additional\r\n        public DateTime? LastNotificationTime { get; set; }\r\n        #endregion\r\n    }\r\n\r\n    public class TLPeerNotifySettings78 : TLPeerNotifySettings48\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPeerNotifySettings78;\r\n\r\n        protected TLBool _showPreviews;\r\n\r\n        public override TLBool ShowPreviews\r\n        {\r\n            get { return _showPreviews; }\r\n            set { SetField(out _showPreviews, value, ref _flags, (int)PeerNotifySettingsFlags.ShowPreviews); }\r\n        }\r\n\r\n        protected TLBool _silent;\r\n\r\n        public override TLBool Silent\r\n        {\r\n            get { return _silent; }\r\n            set { SetField(out _silent, value, ref _flags, (int)PeerNotifySettingsFlags.Silent); }\r\n        }\r\n\r\n        protected TLInt _muteUntil;\r\n\r\n        public override TLInt MuteUntil\r\n        {\r\n            get { return _muteUntil; }\r\n            set { SetField(out _muteUntil, value, ref _flags, (int)PeerNotifySettingsFlags.MuteUntil); }\r\n        }\r\n\r\n        protected TLString _sound;\r\n\r\n        public override TLString Sound\r\n        {\r\n            get { return _sound; }\r\n            set { SetField(out _sound, value, ref _flags, (int)PeerNotifySettingsFlags.Sound); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            ShowPreviews = GetObject<TLBool>(Flags, (int)PeerNotifySettingsFlags.ShowPreviews, null, bytes, ref position);\r\n            Silent = GetObject<TLBool>(Flags, (int)PeerNotifySettingsFlags.Silent, null, bytes, ref position);\r\n            MuteUntil = GetObject<TLInt>(Flags, (int)PeerNotifySettingsFlags.MuteUntil, null, bytes, ref position);\r\n            Sound = GetObject<TLString>(Flags, (int)PeerNotifySettingsFlags.Sound, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            ShowPreviews = GetObject<TLBool>(Flags, (int)PeerNotifySettingsFlags.ShowPreviews, null, input);\r\n            Silent = GetObject<TLBool>(Flags, (int)PeerNotifySettingsFlags.Silent, null, input);\r\n            MuteUntil = GetObject<TLInt>(Flags, (int)PeerNotifySettingsFlags.MuteUntil, null, input);\r\n            Sound = GetObject<TLString>(Flags, (int)PeerNotifySettingsFlags.Sound, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            ToStream(output, ShowPreviews, Flags, (int)PeerNotifySettingsFlags.ShowPreviews);\r\n            ToStream(output, Silent, Flags, (int)PeerNotifySettingsFlags.Silent);\r\n            ToStream(output, MuteUntil, Flags, (int)PeerNotifySettingsFlags.MuteUntil);\r\n            ToStream(output, Sound, Flags, (int)PeerNotifySettingsFlags.Sound);\r\n        }\r\n    }\r\n\r\n    public class TLPeerNotifySettings48 : TLPeerNotifySettings\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPeerNotifySettings48;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLBool ShowPreviews\r\n        {\r\n            get { return new TLBool(IsSet(Flags, (int)PeerNotifySettingsFlags.ShowPreviews)); }\r\n            set { SetUnset(ref _flags, value != null && value.Value, (int)PeerNotifySettingsFlags.ShowPreviews); }\r\n        }\r\n\r\n        public virtual TLBool Silent\r\n        {\r\n            get { return new TLBool(IsSet(Flags, (int)PeerNotifySettingsFlags.Silent)); }\r\n            set { SetUnset(ref _flags, value != null && value.Value, (int)PeerNotifySettingsFlags.Silent); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            MuteUntil = GetObject<TLInt>(bytes, ref position);\r\n            Sound = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            MuteUntil = GetObject<TLInt>(input);\r\n            Sound = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(MuteUntil.ToBytes());\r\n            output.Write(Sound.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLPeerNotifySettings : TLPeerNotifySettingsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerNotifySettings;\r\n\r\n        public virtual TLInt MuteUntil { get; set; }\r\n\r\n        public virtual TLString Sound { get; set; }\r\n\r\n        public virtual TLBool ShowPreviews { get; set; }\r\n\r\n        public TLInt EventsMask { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            MuteUntil = GetObject<TLInt>(bytes, ref position);\r\n            Sound = GetObject<TLString>(bytes, ref position);\r\n            ShowPreviews = GetObject<TLBool>(bytes, ref position);\r\n            EventsMask = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            MuteUntil = GetObject<TLInt>(input);\r\n            Sound = GetObject<TLString>(input);\r\n            ShowPreviews = GetObject<TLBool>(input);\r\n            EventsMask = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(MuteUntil.ToBytes());\r\n            output.Write(Sound.ToBytes());\r\n            output.Write(ShowPreviews.ToBytes());\r\n            output.Write(EventsMask.ToBytes());\r\n        }\r\n    }\r\n\r\n    [Obsolete]\r\n    public class TLPeerNotifySettingsEmpty : TLPeerNotifySettingsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerNotifySettingsEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPeerSettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PeerSettingsFlags\r\n    {\r\n        ReportSpam = 0x1,\r\n    }\r\n\r\n    public class TLPeerSettings : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPeerSettings;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public bool ReportSpam { get { return IsSet(Flags, (int)PeerSettingsFlags.ReportSpam); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPhoneCall.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PhoneCallWaitingFlags\r\n    {\r\n        ReceiveDate = 0x1,      // 0\r\n    }\r\n\r\n    [Flags]\r\n    public enum PhoneCallDiscardedFlags\r\n    {\r\n        Reason = 0x1,           // 0\r\n        Duration = 0x2,         // 1\r\n        NeedDebug = 0x4,        // 2\r\n        NeedRating = 0x8,       // 3\r\n    }\r\n\r\n    public abstract class TLPhoneCallBase : TLObject\r\n    {\r\n        public TLLong Id { get; set; }\r\n    }\r\n\r\n    public interface IInputPhoneCall\r\n    {\r\n        TLLong Id { get; }\r\n        TLLong AccessHash { get; }\r\n        TLInputPhoneCall ToInputPhoneCall();\r\n    }\r\n\r\n    public class TLPhoneCallEmpty : TLPhoneCallBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCallEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLPhoneCallEmpty id={0}\", Id);\r\n        }\r\n    }\r\n\r\n    public class TLPhoneCallWaiting : TLPhoneCallBase, IInputPhoneCall\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCallWaiting;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt AdminId { get; set; }\r\n\r\n        public TLInt ParticipantId { get; set; }\r\n\r\n        public TLPhoneCallProtocol Protocol { get; set; }\r\n\r\n        public TLInt ReceiveDate { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            AdminId = GetObject<TLInt>(bytes, ref position);\r\n            ParticipantId = GetObject<TLInt>(bytes, ref position);\r\n            Protocol = GetObject<TLPhoneCallProtocol>(bytes, ref position);\r\n            ReceiveDate = GetObject<TLInt>(Flags, (int) PhoneCallWaitingFlags.ReceiveDate, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Date.ToBytes(),\r\n                AdminId.ToBytes(),\r\n                ParticipantId.ToBytes(),\r\n                Protocol.ToBytes(),\r\n                ToBytes(ReceiveDate, Flags, (int) PhoneCallWaitingFlags.ReceiveDate));\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Date.ToStream(output);\r\n            AdminId.ToStream(output);\r\n            ParticipantId.ToStream(output);\r\n            Protocol.ToStream(output);\r\n            ToStream(output, ReceiveDate, Flags, (int) PhoneCallWaitingFlags.ReceiveDate);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            AdminId = GetObject<TLInt>(input);\r\n            ParticipantId = GetObject<TLInt>(input);\r\n            Protocol = GetObject<TLPhoneCallProtocol>(input);\r\n            ReceiveDate = GetObject<TLInt>(Flags, (int) PhoneCallWaitingFlags.ReceiveDate, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLPhoneCallWaiting flags={0} id={1} access_hash={2} date={3} admin_id={4} participant_id={5} protocol={6} receive_date={7}\", Flags, Id, AccessHash, Date, AdminId, ParticipantId, Protocol, ReceiveDate);\r\n        }\r\n\r\n        public TLInputPhoneCall ToInputPhoneCall()\r\n        {\r\n            return new TLInputPhoneCall { Id = Id, AccessHash = AccessHash };\r\n        }\r\n    }\r\n\r\n    public class TLPhoneCallRequestedBase : TLPhoneCallBase, IInputPhoneCall\r\n    {\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt AdminId { get; set; }\r\n\r\n        public TLInt ParticipantId { get; set; }\r\n\r\n        public TLPhoneCallProtocol Protocol { get; set; }\r\n\r\n        public TLInputPhoneCall ToInputPhoneCall()\r\n        {\r\n            return new TLInputPhoneCall { Id = Id, AccessHash = AccessHash };\r\n        }\r\n    }\r\n\r\n    public class TLPhoneCallRequested64 : TLPhoneCallRequestedBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCallRequested64;\r\n\r\n        public TLString GAHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            AdminId = GetObject<TLInt>(bytes, ref position);\r\n            ParticipantId = GetObject<TLInt>(bytes, ref position);\r\n            GAHash = GetObject<TLString>(bytes, ref position);\r\n            Protocol = GetObject<TLPhoneCallProtocol>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Date.ToBytes(),\r\n                AdminId.ToBytes(),\r\n                ParticipantId.ToBytes(),\r\n                GAHash.ToBytes(),\r\n                Protocol.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Date.ToStream(output);\r\n            AdminId.ToStream(output);\r\n            ParticipantId.ToStream(output);\r\n            GAHash.ToStream(output);\r\n            Protocol.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            AdminId = GetObject<TLInt>(input);\r\n            ParticipantId = GetObject<TLInt>(input);\r\n            GAHash = GetObject<TLString>(input);\r\n            Protocol = GetObject<TLPhoneCallProtocol>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLPhoneCallRequested id={0} access_hash={1} date={2} admin_id={3} participant_id={4} protocol={5}\", Id, AccessHash, Date, AdminId, ParticipantId, Protocol);\r\n        }\r\n    }\r\n\r\n    public class TLPhoneCallRequested : TLPhoneCallRequestedBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCallRequested;\r\n\r\n        public TLString GA { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            AdminId = GetObject<TLInt>(bytes, ref position);\r\n            ParticipantId = GetObject<TLInt>(bytes, ref position);\r\n            GA = GetObject<TLString>(bytes, ref position);\r\n            Protocol = GetObject<TLPhoneCallProtocol>(bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Date.ToBytes(),\r\n                AdminId.ToBytes(),\r\n                ParticipantId.ToBytes(),\r\n                GA.ToBytes(),\r\n                Protocol.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Date.ToStream(output);\r\n            AdminId.ToStream(output);\r\n            ParticipantId.ToStream(output);\r\n            GA.ToStream(output);\r\n            Protocol.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            AdminId = GetObject<TLInt>(input);\r\n            ParticipantId = GetObject<TLInt>(input);\r\n            GA = GetObject<TLString>(input);\r\n            Protocol = GetObject<TLPhoneCallProtocol>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPhoneCall : TLPhoneCallBase, IInputPhoneCall\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCall;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt AdminId { get; set; }\r\n\r\n        public TLInt ParticipantId { get; set; }\r\n\r\n        public TLString GAorB { get; set; }\r\n\r\n        public TLLong KeyFingerprint { get; set; }\r\n\r\n        public TLPhoneCallProtocol Protocol { get; set; }\r\n\r\n        public TLPhoneConnection Connection { get; set; }\r\n\r\n        public TLVector<TLPhoneConnection> AlternativeConnections { get; set; }\r\n\r\n        public TLInt StartDate { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLPhoneCall id={0} access_hash={1} date={2} admin_id={3} participant_id={4} protocol={5} start_date={6}\", Id, AccessHash, Date, AdminId, ParticipantId, Protocol, StartDate);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            AdminId = GetObject<TLInt>(bytes, ref position);\r\n            ParticipantId = GetObject<TLInt>(bytes, ref position);\r\n            GAorB = GetObject<TLString>(bytes, ref position);\r\n            KeyFingerprint = GetObject<TLLong>(bytes, ref position);\r\n            Protocol = GetObject<TLPhoneCallProtocol>(bytes, ref position);\r\n            Connection = GetObject<TLPhoneConnection>(bytes, ref position);\r\n            AlternativeConnections = GetObject<TLVector<TLPhoneConnection>>(bytes, ref position);\r\n            StartDate = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Date.ToBytes(),\r\n                AdminId.ToBytes(),\r\n                ParticipantId.ToBytes(),\r\n                GAorB.ToBytes(),\r\n                KeyFingerprint.ToBytes(),\r\n                Protocol.ToBytes(),\r\n                Connection.ToBytes(),\r\n                AlternativeConnections.ToBytes(),\r\n                StartDate.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Date.ToStream(output);\r\n            AdminId.ToStream(output);\r\n            ParticipantId.ToStream(output);\r\n            GAorB.ToStream(output);\r\n            KeyFingerprint.ToStream(output);\r\n            Protocol.ToStream(output);\r\n            Connection.ToStream(output);\r\n            AlternativeConnections.ToStream(output);\r\n            StartDate.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            AdminId = GetObject<TLInt>(input);\r\n            ParticipantId = GetObject<TLInt>(input);\r\n            GAorB = GetObject<TLString>(input);\r\n            KeyFingerprint = GetObject<TLLong>(input);\r\n            Protocol = GetObject<TLPhoneCallProtocol>(input);\r\n            Connection = GetObject<TLPhoneConnection>(input);\r\n            AlternativeConnections = GetObject<TLVector<TLPhoneConnection>>(input);\r\n            StartDate = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public TLInputPhoneCall ToInputPhoneCall()\r\n        {\r\n            return new TLInputPhoneCall { Id = Id, AccessHash = AccessHash };\r\n        }\r\n    }\r\n\r\n    public class TLPhoneCallDiscarded : TLPhoneCallBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCallDiscarded;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPhoneCallDiscarded61 : TLPhoneCallDiscarded\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPhoneCallDiscarded61;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLPhoneCallDiscardReasonBase Reason { get; set; }\r\n\r\n        public TLInt Duration { get; set; }\r\n\r\n        public bool NeedDebug\r\n        {\r\n            get { return IsSet(Flags, (int) PhoneCallDiscardedFlags.NeedDebug); }\r\n            set { SetUnset(ref _flags, value, (int) PhoneCallDiscardedFlags.NeedDebug); }\r\n        }\r\n\r\n        public bool NeedRating\r\n        {\r\n            get { return IsSet(Flags, (int) PhoneCallDiscardedFlags.NeedRating); }\r\n            set { SetUnset(ref _flags, value, (int) PhoneCallDiscardedFlags.NeedRating); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Reason = GetObject<TLPhoneCallDiscardReasonBase>(Flags, (int) PhoneCallDiscardedFlags.Reason, null, bytes, ref position);\r\n            Duration = GetObject<TLInt>(Flags, (int) PhoneCallDiscardedFlags.Duration, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                ToBytes(Reason, Flags, (int) PhoneCallDiscardedFlags.Reason),\r\n                ToBytes(Duration, Flags, (int) PhoneCallDiscardedFlags.Duration));\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            ToStream(output, Reason, Flags, (int) PhoneCallDiscardedFlags.Reason);\r\n            ToStream(output, Duration, Flags, (int) PhoneCallDiscardedFlags.Duration);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLLong>(input);\r\n            Reason = GetObject<TLPhoneCallDiscardReasonBase>(Flags, (int) PhoneCallDiscardedFlags.Reason, null, input);\r\n            Duration = GetObject<TLInt>(Flags, (int) PhoneCallDiscardedFlags.Duration, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLPhoneCallDiscarded id={0} reason={1} duration={2}\", Id, Reason, Duration);\r\n        }\r\n    }\r\n\r\n    public class TLPhoneCallAccepted : TLPhoneCallBase, IInputPhoneCall\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCallAccepted;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt AdminId { get; set; }\r\n\r\n        public TLInt ParticipantId { get; set; }\r\n\r\n        public TLPhoneCallProtocol Protocol { get; set; }\r\n\r\n        public TLString GB { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLPhoneAccepted id={0} access_hash={1} date={2} admin_id={3} participant_id={4} protocol={5}\", Id, AccessHash, Date, AdminId, ParticipantId, Protocol);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            AdminId = GetObject<TLInt>(bytes, ref position);\r\n            ParticipantId = GetObject<TLInt>(bytes, ref position);\r\n            GB = GetObject<TLString>(bytes, ref position);\r\n            Protocol = GetObject<TLPhoneCallProtocol>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Date.ToBytes(),\r\n                AdminId.ToBytes(),\r\n                ParticipantId.ToBytes(),\r\n                GB.ToBytes(),\r\n                Protocol.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Date.ToStream(output);\r\n            AdminId.ToStream(output);\r\n            ParticipantId.ToStream(output);\r\n            GB.ToStream(output);\r\n            Protocol.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            AdminId = GetObject<TLInt>(input);\r\n            ParticipantId = GetObject<TLInt>(input);\r\n            GB = GetObject<TLString>(input);\r\n            Protocol = GetObject<TLPhoneCallProtocol>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public TLInputPhoneCall ToInputPhoneCall()\r\n        {\r\n            return new TLInputPhoneCall { Id = Id, AccessHash = AccessHash };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPhoneCallDiscardReason.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLPhoneCallDiscardReasonBase : TLObject { }\r\n\r\n    public class TLPhoneCallDiscardReasonMissed : TLPhoneCallDiscardReasonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCallDiscardReasonMissed;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPhoneCallDiscardReasonDisconnect : TLPhoneCallDiscardReasonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCallDiscardReasonDisconnect;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPhoneCallDiscardReasonHangup : TLPhoneCallDiscardReasonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCallDiscardReasonHangup;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPhoneCallDiscardReasonBusy : TLPhoneCallDiscardReasonBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCallDiscardReasonBusy;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPhoneCallProtocol.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PhoneCallProtocolFlags\r\n    {\r\n        UdpP2P = 0x1,           // 0\r\n        UdpReflector = 0x2,     // 1\r\n    }\r\n\r\n    public class TLPhoneCallProtocol : TLPhoneCallBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneCallProtocol;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool UdpP2P\r\n        {\r\n            get { return IsSet(Flags, (int) PhoneCallProtocolFlags.UdpP2P); }\r\n            set { SetUnset(ref _flags, value, (int) PhoneCallProtocolFlags.UdpP2P); }\r\n        }\r\n\r\n        public bool UdpReflector \r\n        {\r\n            get { return IsSet(Flags, (int) PhoneCallProtocolFlags.UdpReflector); }\r\n            set { SetUnset(ref _flags, value, (int) PhoneCallProtocolFlags.UdpReflector); }\r\n        }\r\n\r\n        public TLInt MinLayer { get; set; }\r\n\r\n        public TLInt MaxLayer { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLPhoneCallProtocol min_layer={0} max_layer={1}\", MinLayer, MaxLayer);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            MinLayer = GetObject<TLInt>(bytes, ref position);\r\n            MaxLayer = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                MinLayer.ToBytes(),\r\n                MaxLayer.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n            MinLayer.ToStream(output);\r\n            MaxLayer.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            MinLayer = GetObject<TLInt>(input);\r\n            MaxLayer = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPhoneConnection.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPhoneConnection : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoneConnection;\r\n\r\n        public TLString Ip { get; set; }\r\n\r\n        public TLString IpV6 { get; set; }\r\n\r\n        public TLInt Port { get; set; }\r\n\r\n        public TLString PeerTag { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Ip = GetObject<TLString>(bytes, ref position);\r\n            IpV6 = GetObject<TLString>(bytes, ref position);\r\n            Port = GetObject<TLInt>(bytes, ref position);\r\n            PeerTag = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Ip.ToBytes(),\r\n                IpV6.ToBytes(),\r\n                Port.ToBytes(),\r\n                PeerTag.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Ip.ToStream(output);\r\n            IpV6.ToStream(output);\r\n            Port.ToStream(output);\r\n            PeerTag.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Ip = GetObject<TLString>(input);\r\n            IpV6 = GetObject<TLString>(input);\r\n            Port = GetObject<TLInt>(input);\r\n            PeerTag = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPhoneConnection61 : TLPhoneConnection\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPhoneConnection61;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Ip = GetObject<TLString>(bytes, ref position);\r\n            IpV6 = GetObject<TLString>(bytes, ref position);\r\n            Port = GetObject<TLInt>(bytes, ref position);\r\n            PeerTag = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Ip.ToBytes(),\r\n                IpV6.ToBytes(),\r\n                Port.ToBytes(),\r\n                PeerTag.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Id.ToStream(output);\r\n            Ip.ToStream(output);\r\n            IpV6.ToStream(output);\r\n            Port.ToStream(output);\r\n            PeerTag.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            Ip = GetObject<TLString>(input);\r\n            IpV6 = GetObject<TLString>(input);\r\n            Port = GetObject<TLInt>(input);\r\n            PeerTag = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPhonePhoneCall.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPhonePhoneCall : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhonePhoneCall;\r\n\r\n        public TLPhoneCallBase PhoneCall { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhoneCall = GetObject<TLPhoneCallBase>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneCall.ToBytes(),\r\n                Users.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            PhoneCall.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PhoneCall = GetObject<TLPhoneCallBase>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPhoto.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PhotoFlags\r\n    {\r\n        HasStickers = 0x1\r\n    }\r\n\r\n    public abstract class TLPhotoBase : TLObject\r\n    {\r\n        public abstract void Update(TLPhotoBase photo);\r\n\r\n        public TLPhotoBase Self{ get { return this; } }\r\n    }\r\n\r\n    public abstract class TLPhotoCommon : TLPhotoBase\r\n    {\r\n        public TLFileLocationBase PhotoSmall { get; set; }\r\n\r\n        public TLFileLocationBase PhotoBig { get; set; }\r\n\r\n        public override void Update(TLPhotoBase photo)\r\n        {\r\n            var photoCommon = photo as TLPhotoCommon;\r\n            if (photoCommon != null)\r\n            {\r\n                if (PhotoSmall != null)\r\n                {\r\n                    PhotoSmall.Update(photoCommon.PhotoSmall);\r\n                }\r\n                else\r\n                {\r\n                    PhotoSmall = photoCommon.PhotoSmall;\r\n                }\r\n                if (PhotoBig != null)\r\n                {\r\n                    PhotoBig.Update(photoCommon.PhotoBig);\r\n                }\r\n                else\r\n                {\r\n                    PhotoBig = photoCommon.PhotoBig;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public abstract class TLMediaPhotoBase : TLPhotoBase\r\n    {\r\n        public TLLong Id { get; set; }\r\n\r\n        public override void Update(TLPhotoBase photo)\r\n        {\r\n            var mediaPhoto = photo as TLMediaPhotoBase;\r\n            if (mediaPhoto != null)\r\n            {\r\n                Id = mediaPhoto.Id;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLPhotoEmpty : TLMediaPhotoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhotoEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLPhoto56 : TLPhoto33\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPhoto56;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool HasStickers\r\n        {\r\n            get { return IsSet(Flags, (int) PhotoFlags.HasStickers); }\r\n            set { SetUnset(ref _flags, value, (int) PhotoFlags.HasStickers); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Sizes = GetObject<TLVector<TLPhotoSizeBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Sizes = GetObject<TLVector<TLPhotoSizeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            Sizes.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLPhoto33 : TLPhoto28\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPhoto33;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Sizes = GetObject<TLVector<TLPhotoSizeBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Sizes = GetObject<TLVector<TLPhotoSizeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            Sizes.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLPhoto28 : TLPhoto\r\n    {\r\n        public new const uint Signature = TLConstructors.TLPhoto28;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Geo = GetObject<TLGeoPointBase>(bytes, ref position);\r\n            Sizes = GetObject<TLVector<TLPhotoSizeBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Geo = GetObject<TLGeoPointBase>(input);\r\n            Sizes = GetObject<TLVector<TLPhotoSizeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            Geo.ToStream(output);\r\n            Sizes.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLPhotoBase photo)\r\n        {\r\n            var p = photo as TLPhoto28;\r\n            if (p != null)\r\n            {\r\n                base.Update(p);\r\n\r\n                AccessHash = p.AccessHash;\r\n                UserId = p.UserId;\r\n                Date = p.Date;\r\n                Caption = p.Caption;\r\n                Geo = p.Geo;\r\n\r\n                if (AccessHash.Value != p.AccessHash.Value)\r\n                {\r\n                    Sizes = p.Sizes;\r\n                }\r\n                else\r\n                {\r\n                    for (var i = 0; i < Sizes.Count; i++)\r\n                    {\r\n                        Sizes[i].Update(p.Sizes[i]);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLPhoto : TLMediaPhotoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhoto;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLString Caption { get; set; }\r\n\r\n        public TLGeoPointBase Geo { get; set; }\r\n\r\n        public TLVector<TLPhotoSizeBase> Sizes { get; set; }\r\n\r\n        public string GetFileName()\r\n        {\r\n            var photoSize = Sizes.FirstOrDefault() as TLPhotoSize;\r\n            if (photoSize != null)\r\n            {\r\n                var fileLocation = photoSize.Location;\r\n                if (fileLocation == null) return null;\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                    fileLocation.VolumeId,\r\n                    fileLocation.LocalId,\r\n                    fileLocation.Secret);\r\n\r\n                return fileName;\r\n            }\r\n\r\n            return null;\r\n        }\r\n        \r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Caption = GetObject<TLString>(bytes, ref position);\r\n            Geo = GetObject<TLGeoPointBase>(bytes, ref position);\r\n            Sizes = GetObject<TLVector<TLPhotoSizeBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            Geo = GetObject<TLGeoPointBase>(input);\r\n            Sizes = GetObject<TLVector<TLPhotoSizeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(UserId.ToBytes());\r\n            output.Write(Date.ToBytes());\r\n            output.Write(Caption.ToBytes());\r\n            Geo.ToStream(output);\r\n            Sizes.ToStream(output);\r\n        }\r\n\r\n        public override void Update(TLPhotoBase photo)\r\n        {\r\n            var p = photo as TLPhoto;\r\n            if (p != null)\r\n            {\r\n                base.Update(p);\r\n\r\n                AccessHash = p.AccessHash;\r\n                UserId = p.UserId;\r\n                Date = p.Date;\r\n                Caption = p.Caption;\r\n                Geo = p.Geo;\r\n\r\n                if (AccessHash.Value != p.AccessHash.Value)\r\n                {\r\n                    Sizes = p.Sizes;\r\n                }\r\n                else\r\n                {\r\n                    for (var i = 0; i < Sizes.Count; i++)\r\n                    {\r\n                        Sizes[i].Update(p.Sizes[i]);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLPhotoCachedSize CachedSize\r\n        {\r\n            get\r\n            {\r\n                return Sizes != null ? (TLPhotoCachedSize)Sizes.FirstOrDefault(x => x is TLPhotoCachedSize) : null;\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLPhoto Sizes=[{0}]\", string.Join(\", \", Sizes.Select(x => x.ToString())));\r\n        }\r\n    }\r\n\r\n    public class TLUserProfilePhotoEmpty : TLPhotoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserProfilePhotoEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void Update(TLPhotoBase photo)\r\n        {\r\n\r\n        }\r\n    }\r\n\r\n    public class TLUserProfilePhoto : TLPhotoCommon\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserProfilePhoto;\r\n\r\n        public TLLong PhotoId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhotoId = GetObject<TLLong>(bytes, ref position);\r\n            PhotoSmall = GetObject<TLFileLocationBase>(bytes, ref position);\r\n            PhotoBig = GetObject<TLFileLocationBase>(bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PhotoId = GetObject<TLLong>(input);\r\n            PhotoSmall = GetObject<TLFileLocationBase>(input);\r\n            PhotoBig = GetObject<TLFileLocationBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(PhotoId != null ? PhotoId.ToBytes() : new TLLong(0).ToBytes());\r\n            PhotoSmall.ToStream(output);\r\n            PhotoBig.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLChatPhotoEmpty : TLPhotoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatPhotoEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void Update(TLPhotoBase photo)\r\n        {\r\n\r\n        }\r\n    }\r\n\r\n    public class TLChatPhoto : TLPhotoCommon\r\n    {\r\n        public const uint Signature = TLConstructors.TLChatPhoto;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhotoSmall = GetObject<TLFileLocationBase>(bytes, ref position);\r\n            PhotoBig = GetObject<TLFileLocationBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PhotoSmall = GetObject<TLFileLocationBase>(input);\r\n            PhotoBig = GetObject<TLFileLocationBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PhotoSmall.ToStream(output);\r\n            PhotoBig.ToStream(output);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLPhotoPickerSettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum PhotoPickerSettingsFlags\r\n    {\r\n        External = 0x1,        // 0\r\n    }\r\n\r\n    public class TLPhotoPickerSettings : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhotoPickerSettings;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool External\r\n        {\r\n            get { return IsSet(Flags, (int)PhotoPickerSettingsFlags.External); }\r\n            set { SetUnset(ref _flags, value, (int)PhotoPickerSettingsFlags.External); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLPhotoSize.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing System.Runtime.Serialization;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public interface IPhotoSize\r\n    {\r\n        TLInt W { get; set; }\r\n\r\n        TLInt H { get; set; }\r\n    }\r\n\r\n    [KnownType(typeof(TLPhotoSizeEmpty))]\r\n    [KnownType(typeof(TLPhotoSize))]\r\n    [KnownType(typeof(TLPhotoCachedSize))]\r\n    [DataContract]\r\n    public abstract class TLPhotoSizeBase : TLObject\r\n    {\r\n        [DataMember]\r\n        public TLString Type { get; set; }\r\n\r\n        public string TempUrl { get; set; } \r\n\r\n        public virtual void Update(TLPhotoSizeBase photoSizeBase)\r\n        {\r\n            if (photoSizeBase != null)\r\n            {\r\n                Type = photoSizeBase.Type;\r\n            }\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLPhotoSizeEmpty : TLPhotoSizeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhotoSizeEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature),\r\n                Type.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Type = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Type.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"empty {0}\", Type);\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLPhotoSize : TLPhotoSizeBase, IPhotoSize\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhotoSize;\r\n\r\n        [DataMember]\r\n        public TLFileLocationBase Location { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt W { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt H { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLString>(bytes, ref position);\r\n            Location = GetObject<TLFileLocationBase>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature),\r\n                Type.ToBytes(),\r\n                Location.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Size.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Type = GetObject<TLString>(input);\r\n            Location = GetObject<TLFileLocationBase>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            Size = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Type.ToBytes());\r\n            Location.ToStream(output);\r\n            output.Write(W.ToBytes());\r\n            output.Write(H.ToBytes());\r\n            output.Write(Size.ToBytes());\r\n        }\r\n\r\n        public override void Update(TLPhotoSizeBase photoSizeBase)\r\n        {\r\n            base.Update(photoSizeBase);\r\n\r\n            var photoSize = photoSizeBase as TLPhotoSize;\r\n            if (photoSize != null)\r\n            {\r\n                W = photoSize.W;\r\n                H = photoSize.H;\r\n                Size = photoSize.Size;\r\n                if (Location != null)\r\n                {\r\n                    Location.Update(photoSize.Location);\r\n                }\r\n                else\r\n                {\r\n                    Location = photoSize.Location;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0}{1}x{2} {3}\", Type, W, H, Size);\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLPhotoCachedSize : TLPhotoSizeBase, IPhotoSize\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhotoCachedSize;\r\n\r\n        [DataMember]\r\n        public TLFileLocationBase Location { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt W { get; set; }\r\n\r\n        [DataMember]\r\n        public TLInt H { get; set; }\r\n\r\n        [DataMember]\r\n        public TLString Bytes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLString>(bytes, ref position);\r\n            Location = GetObject<TLFileLocationBase>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n            Bytes = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature),\r\n                Type.ToBytes(),\r\n                Location.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes(),\r\n                Bytes.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Type = GetObject<TLString>(input);\r\n            Location = GetObject<TLFileLocationBase>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n            Bytes = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Type.ToBytes());\r\n            Location.ToStream(output);\r\n            output.Write(W.ToBytes());\r\n            output.Write(H.ToBytes());\r\n            output.Write(Bytes.ToBytes());\r\n        }\r\n\r\n        public override void Update(TLPhotoSizeBase photoSizeBase)\r\n        {\r\n            base.Update(photoSizeBase);\r\n\r\n            var photoSize = photoSizeBase as TLPhotoCachedSize;\r\n            if (photoSize != null)\r\n            {\r\n                W = photoSize.W;\r\n                H = photoSize.H;\r\n                Bytes = photoSize.Bytes;\r\n                if (Location != null)\r\n                {\r\n                    Location.Update(photoSize.Location);\r\n                }\r\n                else\r\n                {\r\n                    Location = photoSize.Location;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"cached {0}{1}x{2}\", Type, H, W);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPhotos.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLPhotosBase : TLObject\r\n    {\r\n        public TLVector<TLPhotoBase> Photos { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n    }\r\n\r\n    public class TLPhotos : TLPhotosBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhotos; \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Photos = GetObject<TLVector<TLPhotoBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPhotosSlice : TLPhotosBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhotosSlice;\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Photos = GetObject<TLVector<TLPhotoBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPhotosPhoto.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPhotosPhoto : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPhotosPhoto;\r\n\r\n        public TLPhotoBase Photo { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPong.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPing : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPing;\r\n\r\n        public TLLong PingId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PingId.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLPingDelayDisconnect : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPingDelayDisconnect;\r\n\r\n        public TLLong PingId { get; set; }\r\n\r\n        public TLInt DisconnectDelay { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PingId.ToBytes(),\r\n                DisconnectDelay.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLPong : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPong;\r\n\r\n        public TLLong MessageId { get; set; }\r\n\r\n        public TLLong PingId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            MessageId = GetObject<TLLong>(bytes, ref position);\r\n            PingId = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPopularContact.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPopularContact : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPopularContact;\r\n\r\n        public TLLong ClientId { get; set; }\r\n\r\n        public TLInt Importers { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ClientId = GetObject<TLLong>(bytes, ref position);\r\n            Importers = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPostAddress.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.IO;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPostAddress : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPostAddress;\r\n\r\n        public TLString StreetLine1 { get; set; }\r\n\r\n        public TLString StreetLine2 { get; set; }\r\n\r\n        public TLString City { get; set; }\r\n\r\n        public TLString State { get; set; }\r\n\r\n        public TLString CountryIso2 { get; set; }\r\n\r\n        public TLString PostCode { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            var list = new List<TLString>();\r\n            if (!TLString.IsNullOrEmpty(StreetLine1)) list.Add(StreetLine1);\r\n            if (!TLString.IsNullOrEmpty(StreetLine2)) list.Add(StreetLine2);\r\n            if (!TLString.IsNullOrEmpty(City)) list.Add(City);\r\n            if (!TLString.IsNullOrEmpty(State)) list.Add(State);\r\n            if (!TLString.IsNullOrEmpty(CountryIso2)) list.Add(CountryIso2);\r\n            if (!TLString.IsNullOrEmpty(PostCode)) list.Add(PostCode);\r\n\r\n            return string.Join(\", \", list);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            StreetLine1 = GetObject<TLString>(bytes, ref position);\r\n            StreetLine2 = GetObject<TLString>(bytes, ref position);\r\n            City = GetObject<TLString>(bytes, ref position);\r\n            State = GetObject<TLString>(bytes, ref position);\r\n            CountryIso2 = GetObject<TLString>(bytes, ref position);\r\n            PostCode = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                StreetLine1.ToBytes(),\r\n                StreetLine2.ToBytes(),\r\n                City.ToBytes(),\r\n                State.ToBytes(),\r\n                CountryIso2.ToBytes(),\r\n                PostCode.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            StreetLine1 = GetObject<TLString>(input);\r\n            StreetLine2 = GetObject<TLString>(input);\r\n            City = GetObject<TLString>(input);\r\n            State = GetObject<TLString>(input);\r\n            CountryIso2 = GetObject<TLString>(input);\r\n            PostCode = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            StreetLine1.ToStream(output);\r\n            StreetLine2.ToStream(output);\r\n            City.ToStream(output);\r\n            State.ToStream(output);\r\n            CountryIso2.ToStream(output);\r\n            PostCode.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPrivacyKey.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLPrivacyKeyBase : TLObject { }\r\n\r\n    public class TLPrivacyKeyStatusTimestamp : TLPrivacyKeyBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPrivacyKeyStatusTimestamp;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPrivacyKeyChatInvite : TLPrivacyKeyBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPrivacyKeyChatInvite;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLPrivacyKeyPhoneCall : TLPrivacyKeyBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPrivacyKeyPhoneCall;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPrivacyRule.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLPrivacyRuleBase : TLObject\r\n    {\r\n        public string Label { get; set; }\r\n        public bool IsChecked { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Label;\r\n        }\r\n\r\n        public abstract TLInputPrivacyRuleBase ToInputRule();\r\n    }\r\n\r\n    public class TLPrivacyValueAllowContacts : TLPrivacyRuleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPrivacyValueAllowContacts;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override TLInputPrivacyRuleBase ToInputRule()\r\n        {\r\n            return new TLInputPrivacyValueAllowContacts();\r\n        }\r\n    }\r\n\r\n    public class TLPrivacyValueAllowAll : TLPrivacyRuleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPrivacyValueAllowAll;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override TLInputPrivacyRuleBase ToInputRule()\r\n        {\r\n            return new TLInputPrivacyValueAllowAll();\r\n        }\r\n    }\r\n\r\n    public class TLPrivacyValueAllowUsers : TLPrivacyRuleBase, IPrivacyValueUsersRule\r\n    {\r\n        public const uint Signature = TLConstructors.TLPrivacyValueAllowUsers;\r\n\r\n        public TLVector<TLInt> Users { get; set; } \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Users = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Users.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Users = GetObject<TLVector<TLInt>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLInputPrivacyRuleBase ToInputRule()\r\n        {\r\n            return new TLInputPrivacyValueAllowUsers{Users = new TLVector<TLInputUserBase>()};\r\n        }\r\n    }\r\n\r\n    public class TLPrivacyValueDisallowContacts : TLPrivacyRuleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPrivacyValueDisallowContacts;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override TLInputPrivacyRuleBase ToInputRule()\r\n        {\r\n            return new TLInputPrivacyValueDisallowContacts();\r\n        }\r\n    }\r\n\r\n    public class TLPrivacyValueDisallowAll : TLPrivacyRuleBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPrivacyValueDisallowAll;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override TLInputPrivacyRuleBase ToInputRule()\r\n        {\r\n            return new TLInputPrivacyValueDisallowAll();\r\n        }\r\n    }\r\n\r\n    public class TLPrivacyValueDisallowUsers : TLPrivacyRuleBase, IPrivacyValueUsersRule\r\n    {\r\n        public const uint Signature = TLConstructors.TLPrivacyValueDisallowUsers;\r\n\r\n        public TLVector<TLInt> Users { get; set; } \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Users = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Users.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Users = GetObject<TLVector<TLInt>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLInputPrivacyRuleBase ToInputRule()\r\n        {\r\n            return new TLInputPrivacyValueDisallowUsers{Users = new TLVector<TLInputUserBase>()};\r\n        }\r\n    }\r\n\r\n    public interface IPrivacyValueUsersRule\r\n    {\r\n        TLVector<TLInt> Users { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLPrivacyRules.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLPrivacyRules : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLPrivacyRules;\r\n\r\n        public TLVector<TLPrivacyRuleBase> Rules { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; } \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Rules = GetObject<TLVector<TLPrivacyRuleBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLProxyConfig.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ProxyConfigCustomFlags\r\n    {\r\n        IsEnabled = 0x1,\r\n        UseForCalls = 0x2\r\n    }\r\n\r\n    [Flags]\r\n    public enum ProxyCustomFlags\r\n    {\r\n        Ping = 0x1,\r\n        CheckTime = 0x2\r\n    }\r\n\r\n    public enum ProxyStatus\r\n    {\r\n        Available,\r\n        Unavailable,\r\n        Connecting\r\n    }\r\n\r\n    public abstract class TLProxyConfigBase : TLObject\r\n    {\r\n        public virtual TLBool IsEnabled { get; set; }\r\n\r\n        public virtual TLBool UseForCalls { get; set; }\r\n\r\n        public abstract bool IsEmpty { get; }\r\n\r\n        public abstract TLProxyBase GetProxy();\r\n\r\n        public abstract TLProxyConfigBase ToLastProxyConfig();\r\n\r\n        public static TLProxyConfigBase Empty\r\n        {\r\n            get\r\n            {\r\n                var proxyConfig = new TLProxyConfig76\r\n                {\r\n                    CustomFlags = new TLLong(0),\r\n                    IsEnabled = TLBool.False,\r\n                    UseForCalls = TLBool.False,\r\n                    SelectedIndex = new TLInt(-1),\r\n                    Items = new TLVector<TLProxyBase>()\r\n                };\r\n\r\n                return proxyConfig;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLProxyConfig : TLProxyConfigBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLProxyConfig;\r\n\r\n        public TLString Server { get; set; }\r\n\r\n        public TLInt Port { get; set; }\r\n\r\n        public TLString Username { get; set; }\r\n\r\n        public TLString Password { get; set; }\r\n\r\n        public override bool IsEmpty\r\n        {\r\n            get { return TLString.IsNullOrEmpty(Server) || Port.Value < 0; }\r\n        }\r\n\r\n        public override TLProxyBase GetProxy()\r\n        {\r\n            return IsEmpty\r\n                ? null\r\n                : new TLSocks5Proxy\r\n                {\r\n                    CustomFlags = new TLLong(0),\r\n                    Server = Server,\r\n                    Port = Port,\r\n                    Username = Username,\r\n                    Password = Password\r\n                };\r\n        }\r\n\r\n        public override TLProxyConfigBase ToLastProxyConfig()\r\n        {\r\n            return new TLProxyConfig76\r\n            {\r\n                CustomFlags = new TLLong(0),\r\n                IsEnabled = IsEnabled,\r\n                SelectedIndex = new TLInt(0),\r\n                Items = new TLVector<TLProxyBase>\r\n                {\r\n                    new TLSocks5Proxy\r\n                    {\r\n                        CustomFlags = new TLLong(0),\r\n                        Server = Server,\r\n                        Port = Port,\r\n                        Username = Username,\r\n                        Password = Password\r\n                    }\r\n                }\r\n            };\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            IsEnabled = GetObject<TLBool>(input);\r\n            Server = GetObject<TLString>(input);\r\n            Port = GetObject<TLInt>(input);\r\n            Username = GetObject<TLString>(input);\r\n            Password = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            IsEnabled.ToStream(output);\r\n            Server.ToStream(output);\r\n            Port.ToStream(output);\r\n            Username.ToStream(output);\r\n            Password.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLProxyConfig server={0} port={1} username={2} password={3}\", Server, Port, Username, Password);\r\n        }\r\n    }\r\n\r\n    public class TLProxyConfig76 : TLProxyConfigBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLProxyConfig76;\r\n\r\n        protected TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        public override TLBool IsEnabled\r\n        {\r\n            get { return IsSet(CustomFlags, (int)ProxyConfigCustomFlags.IsEnabled) ? TLBool.True : TLBool.False; }\r\n            set { SetUnset(ref _customFlags, value.Value, (int)ProxyConfigCustomFlags.IsEnabled); }\r\n        }\r\n\r\n        public override TLBool UseForCalls\r\n        {\r\n            get { return IsSet(CustomFlags, (int)ProxyConfigCustomFlags.UseForCalls) ? TLBool.True : TLBool.False; }\r\n            set { SetUnset(ref _customFlags, value.Value, (int)ProxyConfigCustomFlags.UseForCalls); }\r\n        }\r\n\r\n        public TLInt SelectedIndex { get; set; }\r\n\r\n        public TLVector<TLProxyBase> Items { get; set; }\r\n\r\n        public override bool IsEmpty\r\n        {\r\n            get { return SelectedIndex.Value < 0 || SelectedIndex.Value > Items.Count - 1 || Items[SelectedIndex.Value].IsEmpty; }\r\n        }\r\n\r\n        public override TLProxyConfigBase ToLastProxyConfig()\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override TLProxyBase GetProxy()\r\n        {\r\n            return IsEmpty\r\n                ? null\r\n                : Items[SelectedIndex.Value];\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            CustomFlags = GetObject<TLLong>(input);\r\n            SelectedIndex = GetObject<TLInt>(input);\r\n            Items = GetObject<TLVector<TLProxyBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            CustomFlags.ToStream(output);\r\n            SelectedIndex.ToStream(output);\r\n            Items.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public abstract class TLProxyBase : TLObject\r\n    {\r\n        protected TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        protected TLInt _ping;\r\n\r\n        public TLInt Ping\r\n        {\r\n            get { return _ping; }\r\n            set\r\n            {\r\n                SetField(out _ping, value, ref _customFlags, (int)ProxyCustomFlags.Ping);\r\n                NotifyOfPropertyChange(() => Ping);\r\n            }\r\n        }\r\n\r\n        protected TLInt _checkTime;\r\n\r\n        public TLInt CheckTime\r\n        {\r\n            get { return _checkTime; }\r\n            set { SetField(out _checkTime, value, ref _customFlags, (int)ProxyCustomFlags.CheckTime); }\r\n        }\r\n\r\n        public TLString Server { get; set; }\r\n\r\n        public TLInt Port { get; set; }\r\n\r\n        protected ProxyStatus _proxyStatus;\r\n\r\n        public ProxyStatus Status\r\n        {\r\n            get { return _proxyStatus; }\r\n            set\r\n            {\r\n                SetField(ref _proxyStatus, value, () => Status);\r\n                NotifyOfPropertyChange(() => Self);\r\n            }\r\n        }\r\n\r\n        public virtual string About { get { return string.Format(\"{0}:{1}\", Server, Port); } }\r\n\r\n        public abstract bool IsEmpty { get; }\r\n\r\n        private bool _isSelected;\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return _isSelected; }\r\n            set\r\n            {\r\n                SetField(ref _isSelected, value, () => IsSelected);\r\n                NotifyOfPropertyChange(() => Self);\r\n            }\r\n        }\r\n\r\n        public abstract bool ProxyEquals(TLProxyBase proxy);\r\n\r\n        public static bool ProxyEquals(TLProxyBase proxyItem1, TLProxyBase proxyItem2)\r\n        {\r\n            if (proxyItem1 != null && proxyItem2 == null) return false;\r\n            if (proxyItem1 == null && proxyItem2 == null) return false;\r\n            if (proxyItem1 == null && proxyItem2 != null) return false;\r\n\r\n            return proxyItem1.ProxyEquals(proxyItem2);\r\n        }\r\n\r\n        public TLProxyBase Self\r\n        {\r\n            get { return this; }\r\n        }\r\n\r\n        public abstract string GetUrl(string prefix);\r\n\r\n        public abstract TLInputClientProxy ToInputProxy();\r\n    }\r\n\r\n    public class TLSocks5Proxy : TLProxyBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSocks5Proxy;\r\n\r\n        public TLString Username { get; set; }\r\n\r\n        public TLString Password { get; set; }\r\n\r\n        public override bool IsEmpty\r\n        {\r\n            get { return TLString.IsNullOrEmpty(Server) || Port.Value < 0; }\r\n        }\r\n\r\n        public override bool ProxyEquals(TLProxyBase proxy)\r\n        {\r\n            var socks5Proxy = proxy as TLSocks5Proxy;\r\n            if (socks5Proxy == null) return false;\r\n\r\n            return\r\n                TLString.Equals(Server, socks5Proxy.Server, StringComparison.OrdinalIgnoreCase)\r\n                && Port.Value == socks5Proxy.Port.Value\r\n                && TLString.Equals(Username, socks5Proxy.Username, StringComparison.Ordinal)\r\n                && TLString.Equals(Password, socks5Proxy.Password, StringComparison.Ordinal);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            CustomFlags = GetObject<TLLong>(input);\r\n            Server = GetObject<TLString>(input);\r\n            Port = GetObject<TLInt>(input);\r\n            Username = GetObject<TLString>(input);\r\n            Password = GetObject<TLString>(input);\r\n\r\n            Ping = GetObject<TLInt>(CustomFlags, (int)ProxyCustomFlags.Ping, null, input);\r\n            CheckTime = GetObject<TLInt>(CustomFlags, (int)ProxyCustomFlags.CheckTime, null, input);\r\n            Status = Ping != null ? ProxyStatus.Available : ProxyStatus.Unavailable;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            CustomFlags.ToStream(output);\r\n            Server.ToStream(output);\r\n            Port.ToStream(output);\r\n            Username.ToStream(output);\r\n            Password.ToStream(output);\r\n\r\n            ToStream(output, Ping, CustomFlags, (int)ProxyCustomFlags.Ping);\r\n            ToStream(output, CheckTime, CustomFlags, (int)ProxyCustomFlags.CheckTime);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLSocks5Proxy server={0} port={1} username={2} password={3}\", Server, Port, Username, Password);\r\n        }\r\n\r\n        public override string GetUrl(string prefix)\r\n        {\r\n            var proxyString = prefix + string.Format(\"socks?server={0}&port={1}\", Server, Port);\r\n\r\n            if (!TLString.IsNullOrEmpty(Username) && !TLString.IsNullOrEmpty(Password))\r\n            {\r\n                proxyString += string.Format(\"&user={0}&pass={1}\", Username, Password);\r\n            }\r\n\r\n            return proxyString;\r\n        }\r\n\r\n        public override TLInputClientProxy ToInputProxy()\r\n        {\r\n            return null;\r\n        }\r\n    }\r\n\r\n    public class TLMTProtoProxy : TLProxyBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLMTProtoProxy;\r\n\r\n        public TLString Secret { get; set; }\r\n\r\n        public override bool IsEmpty\r\n        {\r\n            get { return TLString.IsNullOrEmpty(Server) || Port.Value < 0 || TLString.IsNullOrEmpty(Secret); }\r\n        }\r\n\r\n        public override bool ProxyEquals(TLProxyBase proxy)\r\n        {\r\n            var mtProtoProxy = proxy as TLMTProtoProxy;\r\n            if (mtProtoProxy == null) return false;\r\n\r\n            return\r\n                TLString.Equals(Server, mtProtoProxy.Server, StringComparison.OrdinalIgnoreCase)\r\n                && Port.Value == mtProtoProxy.Port.Value\r\n                && TLString.Equals(Secret, mtProtoProxy.Secret, StringComparison.Ordinal);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            CustomFlags = GetObject<TLLong>(input);\r\n            Server = GetObject<TLString>(input);\r\n            Port = GetObject<TLInt>(input);\r\n            Secret = GetObject<TLString>(input);\r\n\r\n            Ping = GetObject<TLInt>(CustomFlags, (int)ProxyCustomFlags.Ping, null, input);\r\n            CheckTime = GetObject<TLInt>(CustomFlags, (int)ProxyCustomFlags.CheckTime, null, input);\r\n            Status = Ping != null ? ProxyStatus.Available : ProxyStatus.Unavailable;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            CustomFlags.ToStream(output);\r\n            Server.ToStream(output);\r\n            Port.ToStream(output);\r\n            Secret.ToStream(output);\r\n\r\n            ToStream(output, Ping, CustomFlags, (int)ProxyCustomFlags.Ping);\r\n            ToStream(output, CheckTime, CustomFlags, (int)ProxyCustomFlags.CheckTime);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLMTProtoProxy server={0} port={1} secret={2}\", Server, Port, Secret);\r\n        }\r\n\r\n        public override string GetUrl(string prefix)\r\n        {\r\n            var proxyString = prefix + string.Format(\"proxy?server={0}&port={1}\", Server, Port);\r\n\r\n            if (!TLString.IsNullOrEmpty(Secret))\r\n            {\r\n                proxyString += string.Format(\"&secret={0}\", Secret);\r\n            }\r\n\r\n            return proxyString;\r\n        }\r\n\r\n        public override TLInputClientProxy ToInputProxy()\r\n        {\r\n            return new TLInputClientProxy\r\n            {\r\n                Address = Server,\r\n                Port = Port\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLRPCDropAnswer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLRPCAnswerUnknown : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLRPCAnswerUnknown;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLRPCAnswerDroppedRunning : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLRPCAnswerDroppedRunning;\r\n        \r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLRPCAnswerDropped : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLRPCAnswerDropped;\r\n\r\n        public TLLong MsgId { get; set; }\r\n\r\n        public TLInt SeqNo { get; set; }\r\n\r\n        public TLInt Bytes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            MsgId = GetObject<TLLong>(bytes, ref position);\r\n            SeqNo = GetObject<TLInt>(bytes, ref position);\r\n            Bytes = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLRPCError.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n#if !WIN_RT\r\nusing System.Net.Sockets;\r\n#endif\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public enum ErrorType\r\n    {\r\n        PHONE_MIGRATE,\r\n        NETWORK_MIGRATE, \r\n        FILE_MIGRATE,\r\n        USER_MIGRATE,\r\n        PHONE_NUMBER_INVALID,\r\n        PHONE_CODE_EMPTY,\r\n        PHONE_CODE_EXPIRED,\r\n        PHONE_CODE_INVALID,\r\n        PHONE_NUMBER_OCCUPIED,\r\n        PHONE_NUMBER_UNOCCUPIED,\r\n        FLOOD_WAIT,\r\n        PEER_FLOOD,\r\n        FIRSTNAME_INVALID,\r\n        MIDDLENAME_INVALID,\r\n        LASTNAME_INVALID,\r\n        FIRSTNAMENATIVE_INVALID,\r\n        MIDDLENAMENATIVE_INVALID,\r\n        LASTNAMENATIVE_INVALID,\r\n        QUERY_TOO_SHORT,\r\n        USERNAME_INVALID,\r\n        USERNAME_OCCUPIED,\r\n        USERNAME_NOT_OCCUPIED,  // 400\r\n        USERNAME_NOT_MODIFIED,  // 400\r\n        CHANNELS_ADMIN_PUBLIC_TOO_MUCH, // 400\r\n        CHANNEL_PRIVATE,        // 400\r\n        PEER_ID_INVALID,        // 400    \r\n        MESSAGE_EMPTY,          // 400\r\n        MESSAGE_TOO_LONG,       // 400\r\n        MSG_WAIT_FAILED,        // 400\r\n        MESSAGE_ID_INVALID,     // 400\r\n        MESSAGE_NOT_MODIFIED,   // 400\r\n        MESSAGE_EDIT_TIME_EXPIRED, // 400\r\n\r\n        PASSWORD_HASH_INVALID,  // 400\r\n        NEW_PASSWORD_BAD,       // 400\r\n        NEW_SALT_INVALID,       // 400\r\n        EMAIL_INVALID,          // 400\r\n        EMAIL_UNCONFIRMED,      // 400\r\n        EMAIL_VERIFY_EXPIRED,   // 400\r\n\r\n        CODE_EMPTY,             // 400\r\n        CODE_INVALID,           // 400\r\n        PASSWORD_EMPTY,         // 400\r\n        PASSWORD_RECOVERY_NA,   // 400\r\n        PASSWORD_RECOVERY_EXPIRED,  //400\r\n\r\n        CHAT_INVALID,           // 400\r\n        CHAT_ADMIN_REQUIRED,    // 400   \r\n        CHAT_NOT_MODIFIED,      // 400\r\n        CHAT_ABOUT_NOT_MODIFIED,// 400\r\n        INVITE_HASH_EMPTY,      // 400\r\n        INVITE_HASH_INVALID,    // 400\r\n        INVITE_HASH_EXPIRED,    // 400\r\n        USERS_TOO_MUCH,         // 400\r\n        BOTS_TOO_MUCH,          // 400\r\n        ADMINS_TOO_MUCH,        // 400\r\n        CHANNELS_TOO_MUCH,      // 400\r\n        USER_CHANNELS_TOO_MUCH, // 400\r\n        USER_NOT_MUTUAL_CONTACT,    // 400\r\n        USER_ALREADY_PARTICIPANT,   // 400\r\n        USER_NOT_PARTICIPANT,   // 400\r\n\r\n        STICKERSET_INVALID,     // 400\r\n        LOCATION_INVALID,       // 400 upload.getFile\r\n        VOLUME_LOC_NOT_FOUND,   // 400 upload.getFile\r\n\r\n        SRP_ID_INVALID,\r\n        SRP_PASSWORD_CHANGED,\r\n\r\n        REQ_INFO_NAME_INVALID,\r\n        REQ_INFO_PHONE_INVALID,\r\n        REQ_INFO_EMAIL_INVALID,\r\n        ADDRESS_COUNTRY_INVALID,\r\n        ADDRESS_RESIDENCE_COUNTRY_INVALID,\r\n        ADDRESS_CITY_INVALID,\r\n        ADDRESS_POSTCODE_INVALID,\r\n        ADDRESS_STATE_INVALID,\r\n        ADDRESS_STREET_LINE1_INVALID,\r\n        ADDRESS_STREET_LINE2_INVALID,\r\n        SHIPPING_BOT_TIMEOUT,\r\n        SHIPPING_NOT_AVAILABLE,\r\n\r\n        BIRTHDATE_INVALID,\r\n        GENDER_INVALID,\r\n        DOCUMENT_NUMBER_INVALID,\r\n        EXPIRYDATE_INVALID,\r\n\r\n        PROVIDER_ACCOUNT_INVALID,\r\n        PROVIDER_ACCOUNT_TIMEOUT,\r\n        INVOICE_ALREADY_PAID,\r\n\r\n        REQUESTED_INFO_INVALID,\r\n        SHIPPING_OPTION_INVALID,\r\n        PAYMENT_FAILED,\r\n        PAYMENT_CREDENTIALS_INVALID,\r\n        PAYMENT_CREDENTIALS_ID_INVALID,\r\n        BOT_PRECHECKOUT_FAILED,\r\n\r\n        FILE_TOKEN_INVALID,\r\n        REQUEST_TOKEN_INVALID,\r\n\r\n        FILES_EMPTY,\r\n        FILES_TOO_MUCH,\r\n        FILE_ERROR,\r\n        TRANSLATION_ERROR,\r\n        TRANSLATION_EMPTY,\r\n        FRONT_SIDE_REQUIRED,\r\n        REVERSE_SIDE_REQUIRED,\r\n        SELFIE_REQUIRED,\r\n\r\n        PHONE_VERIFICATION_NEEDED,\r\n        EMAIL_VERIFICATION_NEEDED,\r\n\r\n        APP_VERSION_OUTDATED,\r\n\r\n        SESSION_PASSWORD_NEEDED,// 401\r\n        SESSION_REVOKED,        // 401\r\n        USER_PRIVACY_RESTRICTED,// 403\r\n\r\n        //2FA_RECENT_CONFIRM,   // 420\r\n        //2FA_CONFIRM_WAIT_XXX, // 420\r\n        \r\n        RPC_CALL_FAIL,          // 500\r\n\r\n        CANTPARSE\r\n    }\r\n\r\n    public enum ErrorCode\r\n    {\r\n        ERROR_SEE_OTHER = 303,\r\n        BAD_REQUEST = 400,\r\n        UNAUTHORIZED = 401,\r\n        FORBIDDEN = 403,\r\n        NOT_FOUND = 404,\r\n        FLOOD = 420,\r\n        INTERNAL = 500,\r\n\r\n        #region Additional\r\n        TIMEOUT = 408,\r\n        #endregion\r\n    }\r\n\r\n    public class TLRPCReqError : TLRPCError\r\n    {\r\n        public new const uint Signature = TLConstructors.TLRPCReqError;\r\n\r\n        public TLLong QueryId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            Code = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                QueryId.ToBytes(),\r\n                Code.ToBytes(),\r\n                Message.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLRPCError : TLObject\r\n    {\r\n        public TLRPCError()\r\n        {\r\n            Code = new TLInt(0);\r\n        }\r\n\r\n        public TLRPCError(int errorCode)\r\n        {\r\n            Code = new TLInt(errorCode);\r\n        }\r\n\r\n        #region Additional\r\n#if !WIN_RT\r\n        public SocketError? SocketError { get; set; }\r\n#endif\r\n        \r\n        public Exception Exception { get; set; }\r\n\r\n        /// <summary>\r\n        /// Await time before next request (ms)\r\n        /// </summary>\r\n        public int AwaitTime { get; set; }\r\n        #endregion\r\n\r\n\r\n        public bool CodeEquals(ErrorCode code)\r\n        {\r\n            if (Code != null && Enum.IsDefined(typeof (ErrorCode), Code.Value))\r\n            {\r\n                return (ErrorCode) Code.Value == code;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool CodeEquals(TLRPCError error, ErrorCode code)\r\n        {\r\n            if (error.Code != null && Enum.IsDefined(typeof(ErrorCode), error.Code.Value))\r\n            {\r\n                return (ErrorCode)error.Code.Value == code;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public ErrorType GetErrorType()\r\n        {\r\n            var strings = Message.ToString().Split(':');\r\n            var typeString = strings[0];\r\n            if (Enum.IsDefined(typeof(ErrorType), typeString))\r\n            {\r\n                var value = (ErrorType) Enum.Parse(typeof(ErrorType), typeString, true);\r\n\r\n                return value;\r\n            }\r\n\r\n            return ErrorType.CANTPARSE;\r\n        }\r\n\r\n        public string GetErrorTypeString()\r\n        {\r\n            var strings = Message.ToString().Split(':');\r\n            return strings[0];\r\n        }\r\n\r\n        public bool TypeStarsWith(string type)\r\n        {\r\n            var strings = Message.ToString().Split(':');\r\n            var typeString = strings[0];\r\n\r\n            return typeString.StartsWith(type, StringComparison.OrdinalIgnoreCase);\r\n        }\r\n\r\n        public bool TypeStarsWith(ErrorType type)\r\n        {\r\n            var strings = Message.ToString().Split(':');\r\n            var typeString = strings[0];\r\n\r\n            return typeString.StartsWith(type.ToString(), StringComparison.OrdinalIgnoreCase);\r\n        }\r\n\r\n        public bool TypeEquals(string type)\r\n        {\r\n            if (Message == null) return false;\r\n\r\n            var strings = Message.ToString().Split(':');\r\n            var typeString = strings[0];\r\n\r\n            return string.Equals(type, typeString, StringComparison.OrdinalIgnoreCase);\r\n        }\r\n\r\n        public bool TypeEquals(ErrorType type)\r\n        {\r\n            if (Message == null) return false;\r\n\r\n            var strings = Message.ToString().Split(':');\r\n            var typeString = strings[0];\r\n            if (Enum.IsDefined(typeof(ErrorType), typeString))\r\n            {\r\n                var value = (ErrorType)Enum.Parse(typeof (ErrorType), typeString, true);\r\n\r\n                return value == type;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool TypeEquals(TLRPCError error, ErrorType type)\r\n        {\r\n            if (error == null) return false;\r\n\r\n            return error.TypeEquals(type);\r\n        }\r\n\r\n        public const uint Signature = TLConstructors.TLRPCError;\r\n\r\n        public TLInt Code { get; set; }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Code = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Code.ToBytes(),\r\n                Message.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n#if DEBUG\r\n            return string.Format(\"{0} {1}{2}{3}\", Code, Message, \r\n#if WINDOWS_PHONE\r\n                SocketError != null ? \"\\nSocketError=\" + SocketError : string.Empty, \r\n#else\r\n                string.Empty,\r\n#endif\r\n                Exception != null ? \"\\nException=\" : string.Empty);\r\n#else\r\n            return string.Format(\"{0} {1}\", Code, Message);\r\n#endif\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLRPCResult.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLRPCResult : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLRPCResult;\r\n\r\n        public TLLong RequestMessageId { get; set; }\r\n\r\n        public TLObject Object { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            RequestMessageId = GetObject<TLLong>(bytes, ref position);\r\n            Object = GetObject<TLObject>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLReceivedNotifyMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLReceivedNotifyMessage : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLReceivedNotifyMessage;\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Flags.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            Flags = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(Flags.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLRecentMeUrl.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLRecentMeUrlBase : TLObject\r\n    {\r\n        public TLString Url { get; set; }\r\n    }\r\n\r\n    public class TLRecentMeUrlUnknown : TLRecentMeUrlBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLRecentMeUrlUnknown;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Url.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLRecentMeUrlUser : TLRecentMeUrlBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLRecentMeUrlUser;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Url.ToStream(output);\r\n            UserId.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLRecentMeUrlChat : TLRecentMeUrlBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLRecentMeUrlChat;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n            ChatId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Url.ToStream(output);\r\n            ChatId.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLRecentMeUrlChatInvite : TLRecentMeUrlBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLRecentMeUrlChatInvite;\r\n\r\n        public TLChatInviteBase ChatInvite { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            ChatInvite = GetObject<TLChatInviteBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n            ChatInvite = GetObject<TLChatInviteBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Url.ToStream(output);\r\n            ChatInvite.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLRecentMeUrlStickerSet : TLRecentMeUrlBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLRecentMeUrlStickerSet;\r\n\r\n        public TLStickerSetCoveredBase Set { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            Set = GetObject<TLStickerSetCoveredBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n            Set = GetObject<TLStickerSetCoveredBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Url.ToStream(output);\r\n            Set.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLRecentMeUrls.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLRecentMeUrls : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLRecentMeUrls;\r\n\r\n        public TLVector<TLRecentMeUrlBase> Urls { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Urls = GetObject<TLVector<TLRecentMeUrlBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Urls = GetObject<TLVector<TLRecentMeUrlBase>>(input);\r\n            Chats = GetObject<TLVector<TLChatBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Urls.ToStream(output);\r\n            Chats.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLRecentStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLRecentStickersBase : TLObject { }\r\n\r\n    public class TLRecentStickersNotModified : TLRecentStickersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLRecentStickersNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLRecentStickers76 : TLRecentStickers\r\n    {\r\n        public new const uint Signature = TLConstructors.TLRecentStickers76;\r\n\r\n        public TLVector<TLStickerPack> Packs { get; set; }\r\n\r\n        public TLVector<TLInt> Dates { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLInt>(bytes, ref position);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(bytes, ref position);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n            Dates = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes(),\r\n                Packs.ToBytes(),\r\n                Documents.ToBytes(),\r\n                Dates.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hash = GetObject<TLInt>(input);\r\n            Packs = GetObject<TLVector<TLStickerPack>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n            Dates = GetObject<TLVector<TLInt>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Hash.ToStream(output);\r\n            Packs.ToStream(output);\r\n            Documents.ToStream(output);\r\n            Dates.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLRecentStickers : TLRecentStickersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLRecentStickers;\r\n\r\n        public virtual TLInt Hash { get; set; }\r\n\r\n        public TLVector<TLDocumentBase> Documents { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLInt>(bytes, ref position);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes(),\r\n                Documents.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hash = GetObject<TLInt>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Hash.ToStream(output);\r\n            Documents.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLRecentlyUsedSticker.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLRecentlyUsedSticker : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLRecentlyUsedSticker;\r\n\r\n        public TLLong Id { get; set; }\r\n        public TLLong Count { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Count = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Count.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            Count = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Count.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"Id={0} Count={1}\", Id, Count);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLReplyKeyboardMarkup.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    enum ReplyKeyboardFlags\r\n    {\r\n        Resize = 0x1,\r\n        SingleUse = 0x2,\r\n        Personal = 0x4\r\n    }\r\n\r\n    enum ReplyKeyboardCustomFlags\r\n    {\r\n        HasResponse = 0x1,\r\n    }\r\n\r\n    public interface IReplyKeyboardRows\r\n    {\r\n        TLVector<TLKeyboardButtonRow> Rows { get; set; }\r\n    }\r\n\r\n    public abstract class TLReplyKeyboardBase : TLObject\r\n    {\r\n        public TLInt Flags { get; set; }\r\n\r\n        private TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        public bool IsResizable\r\n        {\r\n            get { return IsSet(Flags, (int)ReplyKeyboardFlags.Resize); }\r\n        }\r\n\r\n        public bool IsSingleUse\r\n        {\r\n            get { return IsSet(Flags, (int)ReplyKeyboardFlags.SingleUse); }\r\n        }\r\n\r\n        public bool IsPersonal\r\n        {\r\n            get { return IsSet(Flags, (int)ReplyKeyboardFlags.Personal); }\r\n        }\r\n\r\n        public bool HasResponse\r\n        {\r\n            get { return IsSet(CustomFlags, (int) ReplyKeyboardCustomFlags.HasResponse); }\r\n            set { Set(ref _customFlags, (int) ReplyKeyboardCustomFlags.HasResponse);}\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var isPersonal = IsPersonal ? \"p\" : string.Empty;\r\n            var isResizable = IsResizable ? \"r\" : string.Empty;\r\n            var isSingleUse = IsSingleUse ? \"s\" : string.Empty;\r\n            var hasResponse = HasResponse ? \"h\" : string.Empty;\r\n            return string.Format(\"{0} {1} {2} {3}\", isPersonal, isResizable, isSingleUse, hasResponse);\r\n        }\r\n    }\r\n\r\n    public class TLReplyInlineMarkup : TLReplyKeyboardBase, IReplyKeyboardRows\r\n    {\r\n        public const uint Signature = TLConstructors.TLReplyInlineMarkup;\r\n\r\n        public TLVector<TLKeyboardButtonRow> Rows { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Rows = GetObject<TLVector<TLKeyboardButtonRow>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Rows.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Rows = GetObject<TLVector<TLKeyboardButtonRow>>(input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Rows.ToBytes());\r\n\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var rowsString = new List<string>();\r\n            foreach (var row in Rows)\r\n            {\r\n                rowsString.Add(row.Buttons.Count.ToString());\r\n            }\r\n\r\n            return \"IM \" + string.Join(\" \", rowsString) + base.ToString();\r\n        }\r\n    }\r\n\r\n    public class TLReplyKeyboardMarkup : TLReplyKeyboardBase, IReplyKeyboardRows\r\n    {\r\n        public const uint Signature = TLConstructors.TLReplyKeyboardMarkup;\r\n\r\n        public TLVector<TLKeyboardButtonRow> Rows { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Rows = GetObject<TLVector<TLKeyboardButtonRow>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Rows.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Rows = GetObject<TLVector<TLKeyboardButtonRow>>(input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n            output.Write(Rows.ToBytes());\r\n\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var rowsString = new List<string>();\r\n            foreach (var row in Rows)\r\n            {\r\n                rowsString.Add(row.Buttons.Count.ToString());\r\n            }\r\n\r\n            return \"KM \" + string.Join(\" \", rowsString) + base.ToString();\r\n        }\r\n    }\r\n\r\n    public class TLReplyKeyboardHide : TLReplyKeyboardBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLReplyKeyboardHide;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"KH \" + base.ToString();\r\n        }\r\n    }\r\n\r\n    public class TLReplyKeyboardForceReply : TLReplyKeyboardBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLReplyKeyboardForceReply;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Flags.ToBytes());\r\n\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"KFR \" + base.ToString();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLRequest.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    \r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLResPQ.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLResPQ : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLResPQ;\r\n\r\n        public TLInt128 Nonce { get; set; }\r\n\r\n        public TLInt128 ServerNonce { get; set; }\r\n\r\n        public TLString PQ { get; set; }\r\n\r\n        public TLVector<TLLong> ServerPublicKeyFingerprints { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Nonce = GetObject<TLInt128>(bytes, ref position);\r\n            ServerNonce = GetObject<TLInt128>(bytes, ref position);\r\n            PQ = GetObject<TLString>(bytes, ref position);\r\n            ServerPublicKeyFingerprints = GetObject<TLVector<TLLong>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Nonce.ToBytes(),\r\n                ServerNonce.ToBytes(),\r\n                PQ.ToBytes(),\r\n                ServerPublicKeyFingerprints.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLResolvedPeer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLResolvedPeer : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLResolvedPeer;\r\n\r\n        public TLPeerBase Peer { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            Chats = GetObject<TLVector<TLChatBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Peer.ToBytes());\r\n            output.Write(Chats.ToBytes());\r\n            output.Write(Users.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLResponse.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLResponse\r\n    {\r\n        public byte[] AuthKeyId { get; set; }\r\n\r\n        public byte[] MessageKey { get; set; }\r\n\r\n        public byte[] EncryptedData { get; set; }\r\n\r\n        public byte[] DecryptedData { get; set; }\r\n\r\n        public byte[] Salt { get; set; }\r\n\r\n        public byte[] SessionId { get; set; }\r\n\r\n        public TLLong MessageId { get; set; }\r\n\r\n        public TLInt SequenceNumber { get; set; }\r\n\r\n        public Int32 MessageLength { get; set; }\r\n\r\n        public byte[] MessageData { get; set; }\r\n\r\n        public TLObject Data { get; set; }\r\n\r\n        public static TLResponse Parse(byte[] bytes, byte[] authKey)\r\n        {\r\n            TLUtils.WriteLine(\"-------------------\");\r\n            TLUtils.WriteLine(\"--Parse response --\");\r\n            TLUtils.WriteLine(\"-------------------\");\r\n\r\n\r\n            int position = 0;\r\n            var response = new TLResponse();\r\n            response.AuthKeyId = bytes.SubArray(0, 8);\r\n            TLUtils.WriteLine(\"AuthKeyId: \" + BitConverter.ToString(response.AuthKeyId));\r\n            response.MessageKey = bytes.SubArray(8, 16);\r\n            TLUtils.WriteLine(\"MessageKey: \" + BitConverter.ToString(response.MessageKey));\r\n\r\n            response.EncryptedData = bytes.SubArray(24, bytes.Length - 24);\r\n            //TLUtils.WriteLine(\"Encrypted data: \" + BitConverter.ToString(response.Data));\r\n\r\n            var keyIV = TLUtils.GetDecryptKeyIV(authKey, response.MessageKey);\r\n\r\n            response.DecryptedData = Utils.AesIge(response.EncryptedData, keyIV.Item1, keyIV.Item2, false);\r\n            //TLUtils.WriteLine(\"Decrypted data: \" + BitConverter.ToString(response.DecryptedData));\r\n            \r\n            response.Salt = response.DecryptedData.SubArray(0, 8);\r\n            TLUtils.WriteLine(\"Salt: \" + BitConverter.ToString(response.Salt));\r\n\r\n            response.SessionId = response.DecryptedData.SubArray(8, 8);\r\n            TLUtils.WriteLine(\"SessionId: \" + BitConverter.ToString(response.SessionId));\r\n\r\n            position = 0;\r\n            response.MessageId = TLObject.GetObject<TLLong>(response.DecryptedData.SubArray(16, 8), ref position);\r\n            TLUtils.WriteLine(\"<-MESSAGEID: \" + TLUtils.MessageIdString(response.MessageId));\r\n\r\n            position = 0;\r\n            response.SequenceNumber = TLObject.GetObject<TLInt>(response.DecryptedData.SubArray(24, 4), ref position);\r\n            TLUtils.WriteLine(\"  SEQUENCENUMBER: \" + response.SequenceNumber);\r\n\r\n            response.MessageLength = BitConverter.ToInt32(response.DecryptedData.SubArray(28, 4), 0);\r\n            TLUtils.WriteLine(\"MessageLength: \" + response.MessageLength);\r\n\r\n            response.MessageData = response.DecryptedData.SubArray(32, response.MessageLength);\r\n            TLUtils.WriteLine(\"MessageData: \" + BitConverter.ToString(response.MessageData));\r\n\r\n            position = 0;\r\n            response.Data = TLObject.GetObject<TLObject>(response.MessageData, ref position);\r\n\r\n            return response;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLResultInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLResultInfo : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLResultInfo;\r\n\r\n        public TLString Type { get; set; }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLLong Count { get; set; }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Type.ToStream(output);\r\n            Id.ToStream(output);\r\n            Count.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Type = GetObject<TLString>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            Count = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLRichText.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLRichTextBase : TLObject { }\r\n\r\n    public class TLTextEmpty : TLRichTextBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTextEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLTextPlain : TLRichTextBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTextPlain;\r\n\r\n        public TLString Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLTextBold : TLRichTextBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTextBold;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLTextItalic : TLRichTextBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTextItalic;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLTextUnderline : TLRichTextBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTextUnderline;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLTextStrike : TLRichTextBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTextStrike;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLTextFixed : TLRichTextBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTextFixed;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLTextUrl : TLRichTextBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTextUrl;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLLong WebPageId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            WebPageId = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes(),\r\n                Url.ToBytes(),\r\n                WebPageId.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n            Url.ToStream(output);\r\n            WebPageId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n            Url = GetObject<TLString>(input);\r\n            WebPageId = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLTextEmail : TLRichTextBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTextEmail;\r\n\r\n        public TLRichTextBase Text { get; set; }\r\n\r\n        public TLString Email { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLRichTextBase>(bytes, ref position);\r\n            Email = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Text.ToBytes(),\r\n                Email.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Text.ToStream(output);\r\n            Email.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Text = GetObject<TLRichTextBase>(input);\r\n            Email = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLTextConcat : TLRichTextBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTextConcat;\r\n\r\n        public TLVector<TLRichTextBase> Texts { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Texts = GetObject<TLVector<TLRichTextBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Texts.ToBytes());\r\n        }\r\n\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Texts.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Texts = GetObject<TLVector<TLRichTextBase>>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLSavedGifs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLSavedGifsBase : TLObject { }\r\n\r\n    public class TLSavedGifsNotModified : TLSavedGifsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSavedGifsNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSavedGifs : TLSavedGifsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSavedGifs;\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public TLVector<TLDocumentBase> Gifs { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLInt>(bytes, ref position);\r\n            Gifs = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hash = GetObject<TLInt>(input);\r\n            Gifs = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Hash.ToStream(output);\r\n            Gifs.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLSavedInfo.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum SavedInfoFlags\r\n    {\r\n        SavedInfo = 0x1,                    // 0\r\n        HasSavedCredentials = 0x2,          // 1\r\n    }\r\n\r\n    public class TLSavedInfo : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLSavedInfo;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool HasSavedCredentials\r\n        {\r\n            get { return IsSet(Flags, (int) SavedInfoFlags.HasSavedCredentials); }\r\n            set { SetUnset(ref _flags, value, (int) SavedInfoFlags.HasSavedCredentials); }\r\n        }\r\n\r\n        private TLPaymentRequestedInfo _savedInfo;\r\n\r\n        public TLPaymentRequestedInfo SavedInfo\r\n        {\r\n            get { return _savedInfo; }\r\n            set { SetField(out _savedInfo, value, ref _flags, (int) SavedInfoFlags.SavedInfo); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            _savedInfo = GetObject<TLPaymentRequestedInfo>(Flags, (int) SavedInfoFlags.SavedInfo, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLSendMessageAction.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLSendMessageActionBase : TLObject { }\r\n\r\n    public class TLSendMessageTypingAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageTypingAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageCancelAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageCancelAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageRecordVideoAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageRecordVideoAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageUploadVideoAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageUploadVideoAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageUploadVideoAction28 : TLSendMessageUploadVideoAction\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSendMessageUploadVideoAction28;\r\n\r\n        public TLInt Progress { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Progress = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature),\r\n                Progress.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Progress.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Progress = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageRecordAudioAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageRecordAudioAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageUploadAudioAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageUploadAudioAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageUploadAudioAction28 : TLSendMessageUploadAudioAction\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSendMessageUploadAudioAction28;\r\n\r\n        public TLInt Progress { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Progress = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature),\r\n                Progress.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Progress.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Progress = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageUploadPhotoAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageUploadPhotoAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageUploadPhotoAction28 : TLSendMessageUploadPhotoAction\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSendMessageUploadPhotoAction28;\r\n\r\n        public TLInt Progress { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Progress = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature),\r\n                Progress.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Progress.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Progress = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageUploadDocumentAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageUploadDocumentAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageUploadDocumentAction28 : TLSendMessageUploadDocumentAction\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSendMessageUploadDocumentAction28;\r\n\r\n        public TLInt Progress { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Progress = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature),\r\n                Progress.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Progress.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Progress = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageGeoLocationAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageGeoLocationAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageChooseContactAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageChooseContactAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageGamePlayAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageGamePlayAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageRecordRoundAction : TLSendMessageActionBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSendMessageRecordRoundAction;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageUploadRoundAction : TLSendMessageUploadDocumentAction\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSendMessageUploadRoundAction;\r\n\r\n        public TLInt Progress { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Progress = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature),\r\n                Progress.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Progress.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Progress = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLSendMessageUploadRoundAction66 : TLSendMessageUploadDocumentAction\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSendMessageUploadRoundAction66;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLSentChangePhoneCode.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Text;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLSentChangePhoneCode : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentChangePhoneCode;\r\n\r\n        public TLString PhoneCodeHash { get; set; }\r\n\r\n        public TLInt SendCodeTimeout { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhoneCodeHash = GetObject<TLString>(bytes, ref position);\r\n            SendCodeTimeout = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneCodeHash.ToBytes(),\r\n                SendCodeTimeout.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(\"SentChangePhoneCode\");\r\n            sb.AppendLine(string.Format(\"PhoneCodeHash \" + PhoneCodeHash));\r\n            sb.AppendLine(string.Format(\"SendCodeTimeout \" + SendCodeTimeout));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLSentCode.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Text;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum SentCodeFlags\r\n    {\r\n        PhoneRegistered = 0x1,      // 0\r\n        NextType = 0x2,             // 1\r\n        Timeout = 0x4,              // 2\r\n        TermsOfService = 0x8,       // 3\r\n    }\r\n\r\n    public abstract class TLSentCodeBase : TLObject\r\n    {\r\n        public virtual TLBool PhoneRegistered { get; set; }\r\n\r\n        public TLString PhoneCodeHash { get; set; }\r\n\r\n        public TLInt SendCallTimeout { get; set; }\r\n\r\n        public TLBool IsPassword { get; set; }\r\n    }\r\n\r\n    public class TLSentCode80 : TLSentCode50\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSentCode80;\r\n\r\n        protected TLTermsOfServiceBase _termsOfService;\r\n\r\n        public TLTermsOfServiceBase TermsOfService\r\n        {\r\n            get { return _termsOfService; }\r\n            set { SetField(out _termsOfService, value, ref _flags, (int)SentCodeFlags.TermsOfService); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Type = GetObject<TLSentCodeTypeBase>(bytes, ref position);\r\n            PhoneCodeHash = GetObject<TLString>(bytes, ref position);\r\n            NextType = GetObject<TLCodeTypeBase>(Flags, (int)SentCodeFlags.NextType, null, bytes, ref position);\r\n            SendCallTimeout = GetObject<TLInt>(Flags, (int)SentCodeFlags.Timeout, null, bytes, ref position);\r\n            _termsOfService = GetObject<TLTermsOfServiceBase>(Flags, (int)SentCodeFlags.TermsOfService, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(\"SentCode80\");\r\n            sb.AppendLine(string.Format(\"PhoneRegistered \" + PhoneRegistered));\r\n            sb.AppendLine(string.Format(\"Type \" + Type));\r\n            sb.AppendLine(string.Format(\"PhoneCodeHash \" + PhoneCodeHash));\r\n            sb.AppendLine(string.Format(\"NextType \" + NextType));\r\n            sb.AppendLine(string.Format(\"SendCallTimeout \" + SendCallTimeout));\r\n            sb.AppendLine(string.Format(\"TermsOfService \" + TermsOfService));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    public class TLSentCode50 : TLSentCodeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentCode50;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLBool PhoneRegistered\r\n        {\r\n            get { return new TLBool(IsSet(Flags, (int)SentCodeFlags.PhoneRegistered)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)SentCodeFlags.PhoneRegistered);\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLSentCodeTypeBase Type { get; set; }\r\n\r\n        public TLCodeTypeBase NextType { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Type = GetObject<TLSentCodeTypeBase>(bytes, ref position);\r\n            PhoneCodeHash = GetObject<TLString>(bytes, ref position);\r\n            NextType = GetObject<TLCodeTypeBase>(Flags, (int)SentCodeFlags.NextType, null, bytes, ref position);\r\n            SendCallTimeout = GetObject<TLInt>(Flags, (int)SentCodeFlags.Timeout, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(\"SentCode50\");\r\n            sb.AppendLine(string.Format(\"PhoneRegistered \" + PhoneRegistered));\r\n            sb.AppendLine(string.Format(\"Type \" + Type));\r\n            sb.AppendLine(string.Format(\"PhoneCodeHash \" + PhoneCodeHash));\r\n            sb.AppendLine(string.Format(\"NextType \" + NextType));\r\n            sb.AppendLine(string.Format(\"SendCallTimeout \" + SendCallTimeout));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    public class TLSentCode : TLSentCodeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentCode;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhoneRegistered = GetObject<TLBool>(bytes, ref position);\r\n            PhoneCodeHash = GetObject<TLString>(bytes, ref position);\r\n            SendCallTimeout = GetObject<TLInt>(bytes, ref position);\r\n            IsPassword = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneRegistered.ToBytes(),\r\n                PhoneCodeHash.ToBytes(),\r\n                SendCallTimeout.ToBytes(),\r\n                IsPassword.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(\"SentCode\");\r\n            sb.AppendLine(string.Format(\"PhoneRegistered \" + PhoneRegistered));\r\n            sb.AppendLine(string.Format(\"PhoneCodeHash \" + PhoneCodeHash));\r\n            sb.AppendLine(string.Format(\"SendCallTimeout \" + SendCallTimeout));\r\n            sb.AppendLine(string.Format(\"IsPassword \" + IsPassword));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    public class TLSentAppCode : TLSentCodeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentAppCode;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhoneRegistered = GetObject<TLBool>(bytes, ref position);\r\n            PhoneCodeHash = GetObject<TLString>(bytes, ref position);\r\n            SendCallTimeout = GetObject<TLInt>(bytes, ref position);\r\n            IsPassword = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneRegistered.ToBytes(),\r\n                PhoneCodeHash.ToBytes(),\r\n                SendCallTimeout.ToBytes(),\r\n                IsPassword.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            sb.AppendLine(\"SentAppCode\");\r\n            sb.AppendLine(string.Format(\"PhoneRegistered \" + PhoneRegistered));\r\n            sb.AppendLine(string.Format(\"PhoneCodeHash \" + PhoneCodeHash));\r\n            sb.AppendLine(string.Format(\"SendCallTimeout \" + SendCallTimeout));\r\n            sb.AppendLine(string.Format(\"IsPassword \" + IsPassword));\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLSentCodeType.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public interface ILength\r\n    {\r\n        TLInt Length { get; set; }\r\n    }\r\n\r\n    public abstract class TLSentCodeTypeBase : TLObject\r\n    {\r\n    }\r\n\r\n    public class TLSentCodeTypeApp : TLSentCodeTypeBase, ILength\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentCodeTypeApp;\r\n\r\n        public TLInt Length { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Length.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSentCodeTypeSms : TLSentCodeTypeBase, ILength\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentCodeTypeSms;\r\n\r\n        public TLInt Length { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Length.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSentCodeTypeCall : TLSentCodeTypeBase, ILength\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentCodeTypeCall;\r\n\r\n        public TLInt Length { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Length.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSentCodeTypeFlashCall : TLSentCodeTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentCodeTypeFlashCall;\r\n\r\n        public TLString Pattern { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Pattern = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Pattern.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLSentEncryptedFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLSentEncryptedFile : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentEncryptedFile;\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLEncryptedFileBase EncryptedFile { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            EncryptedFile = GetObject<TLEncryptedFileBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLSentEncryptedMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLSentEncryptedMessage : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentEncryptedMessage;\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLSentMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLSentMessageBase : TLObject\r\n    {\r\n        public TLInt Id { get; set; }\r\n        public TLInt Date { get; set; }\r\n        public TLInt Pts { get; set; }\r\n\r\n        public virtual TLInt GetSeq()\r\n        {\r\n            return null;\r\n        }\r\n    }\r\n\r\n    public interface ISentMessageMedia\r\n    {\r\n        TLMessageMediaBase Media { get; set; }\r\n    }\r\n\r\n    public class TLSentMessage : TLSentMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentMessage;\r\n\r\n        public TLInt Seq { get; set; }\r\n\r\n        public override TLInt GetSeq()\r\n        {\r\n            return Seq;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Date.ToBytes(),\r\n                Pts.ToBytes(),\r\n                Seq.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSentMessage24 : TLSentMessageBase, IMultiPts\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentMessage24;\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Date.ToBytes(),\r\n                Pts.ToBytes(),\r\n                PtsCount.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSentMessage26 : TLSentMessage24, ISentMessageMedia\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSentMessage26;\r\n\r\n        public TLMessageMediaBase Media { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Date.ToBytes(),\r\n                Media.ToBytes(),\r\n                Pts.ToBytes(),\r\n                PtsCount.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSentMessage34 : TLSentMessage26\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSentMessage34;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Date.ToBytes(),\r\n                Media.ToBytes(),\r\n                Entities.ToBytes(),\r\n                Pts.ToBytes(),\r\n                PtsCount.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSentMessageLink : TLSentMessage\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSentMessageLink;\r\n\r\n        public TLVector<TLLinkBase> Links { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n            Links = GetObject<TLVector<TLLinkBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Date.ToBytes(),\r\n                Pts.ToBytes(),\r\n                Seq.ToBytes(),\r\n                Links.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSentMessageLink24 : TLSentMessage24\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSentMessageLink24;\r\n\r\n        public TLVector<TLLinkBase> Links { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Links = GetObject<TLVector<TLLinkBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Date.ToBytes(),\r\n                Pts.ToBytes(),\r\n                PtsCount.ToBytes(),\r\n                Links.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSentMessageLink26 : TLSentMessageLink24, ISentMessageMedia\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSentMessageLink26;\r\n\r\n        public TLMessageMediaBase Media { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Links = GetObject<TLVector<TLLinkBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Date.ToBytes(),\r\n                Media.ToBytes(),\r\n                Pts.ToBytes(),\r\n                PtsCount.ToBytes(),\r\n                Links.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLServerDHInnerData.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLServerDHInnerData : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLServerDHInnerData;\r\n\r\n        public TLInt128 Nonce { get; set; }\r\n\r\n        public TLInt128 ServerNonce { get; set; }\r\n\r\n        public TLInt G { get; set; }\r\n\r\n        public TLString DHPrime { get; set; }\r\n\r\n        public TLString GA { get; set; }\r\n\r\n        public TLInt ServerTime { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Nonce.ToBytes(),\r\n                ServerNonce.ToBytes(),\r\n                G.ToBytes(),\r\n                DHPrime.ToBytes(),\r\n                GA.ToBytes(),\r\n                ServerTime.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Nonce = GetObject<TLInt128>(bytes, ref position);\r\n            ServerNonce = GetObject<TLInt128>(bytes, ref position);\r\n            G = GetObject<TLInt>(bytes, ref position);\r\n            DHPrime = GetObject<TLString>(bytes, ref position);\r\n            GA = GetObject<TLString>(bytes, ref position);\r\n            ServerTime = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLServerDHParams.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLServerDHParamsBase : TLObject\r\n    {\r\n        public TLInt128 Nonce { get; set; }\r\n\r\n        public TLInt128 ServerNonce { get; set; }\r\n    }\r\n\r\n    public class TLServerDHParamsFail : TLServerDHParamsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLServerDHParamsFail;\r\n\r\n        public TLInt128 NewNonceHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Nonce = GetObject<TLInt128>(bytes, ref position);\r\n            ServerNonce = GetObject<TLInt128>(bytes, ref position);\r\n            NewNonceHash = GetObject<TLInt128>(bytes, ref position);           \r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLServerDHParamsOk : TLServerDHParamsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLServerDHParamsOk;\r\n\r\n        public TLString EncryptedAnswer { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Nonce = GetObject<TLInt128>(bytes, ref position);\r\n            ServerNonce = GetObject<TLInt128>(bytes, ref position);\r\n            EncryptedAnswer = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLServerFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLServerFile : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLServerFile;\r\n\r\n        public TLLong MD5Checksum { get; set; }\r\n\r\n        public TLInputMediaBase Media { get; set; }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            MD5Checksum = GetObject<TLLong>(input);\r\n            Media = GetObject<TLInputMediaBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            MD5Checksum.ToStream(output);\r\n            Media.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLShippingOption.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLShippingOption : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLShippingOption;\r\n\r\n        public TLString Id { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLVector<TLLabeledPrice> Prices { get; set; }\r\n\r\n        #region Additional\r\n        public bool IsSelected { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLString>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Prices = GetObject<TLVector<TLLabeledPrice>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLSignatures.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public static class TLConstructors\r\n    {\r\n        public const uint TLUpdateUserBlocked = 0x80ece81a;\r\n        public const uint TLUpdateNotifySettings = 0xbec268ef;\r\n        public const uint TLNotifyPeer = 0x9fd40bd8;\r\n        public const uint TLNotifyUsers = 0xb4c83b4c;\r\n        public const uint TLNotifyChats = 0xc007cec3;\r\n        public const uint TLNotifyAll = 0x74d07c60;\r\n        public const uint TLDecryptedMessageActionReadMessages = 0xc4f40be;\r\n        public const uint TLDecryptedMessageActionDeleteMessages = 0x65614304;\r\n        public const uint TLDecryptedMessageActionScreenshotMessages = 0x8ac1f475;\r\n        public const uint TLDecryptedMessageActionFlushHistory = 0x6719e45c;\r\n        public const uint TLDecryptedMessageActionNotifyLayer = 0xf3048883;\r\n        public const uint TLDecryptedMessageLayer = 0x99a438cf;\r\n        public const uint TLSupport = 0x17c6b5f6;\r\n        public const uint TLDecryptedMessageMediaAudio = 0x6080758f;\r\n        public const uint TLDecryptedMessageMediaDocument = 0xb095434b;\r\n        public const uint TLInputAudioFileLocation = 0x74dc404d;\r\n        public const uint TLInputDocumentFileLocation = 0x4e45abe9;\r\n        public const uint TLInputMediaUploadedDocument = 0x34e794bd;\r\n        public const uint TLInputMediaUploadedThumbDocument = 0x3e46de5d;\r\n        public const uint TLInputMediaDocument = 0xd184e841;\r\n        public const uint TLInputMediaAudio = 0x89938781;\r\n        public const uint TLInputMediaUploadedAudio = 0x4e498cab;\r\n        public const uint TLInputAudio = 0x77d440ff;\r\n        public const uint TLInputAudioEmpty = 0xd95adc84;\r\n        public const uint TLInputDocument = 0x18798952;\r\n        public const uint TLInputDocumentEmpty = 0x72f0eaae;\r\n        public const uint TLMessageMediaAudio = 0xc6b68300;\r\n        public const uint TLMessageMediaDocument = 0x2fda2204;\r\n        public const uint TLAudioEmpty = 0x586988d8;\r\n        public const uint TLAudio = 0xc7ac6496;\r\n        public const uint TLDocumentEmpty = 0x36f8c871;\r\n        public const uint TLDocument = 0x9efc6326;\r\n        public const uint TLUpdateChatParticipantAdd = 0x3a0eeb22;\r\n        public const uint TLUpdateChatParticipantDelete = 0x6e5f8c22;\r\n        public const uint TLInputEncryptedFileBigUploaded = 0x2dc173c8;\r\n        public const uint TLInputFileBig = 0xfa4f0bb5;\r\n        public const uint TLDecryptedMessage = 0x1f814f1f;\r\n        public const uint TLDecryptedMessageService = 0xaa48327d;\r\n        public const uint TLUpdateNewEncryptedMessage = 0x12bcbd9a;\r\n        public const uint TLUpdateEncryptedChatTyping = 0x1710f156;\r\n        public const uint TLUpdateEncryption = 0xb4a2e88d;\r\n        public const uint TLUpdateEncryptedMessagesRead = 0x38fe25b7;\r\n        public const uint TLEncryptedChatEmpty = 0xab7ec0a0;\r\n        public const uint TLEncryptedChatWaiting = 0x3bf703dc;\r\n        public const uint TLEncryptedChatRequested = 0xc878527e;\r\n        public const uint TLEncryptedChat = 0xfa56ce36;\r\n        public const uint TLEncryptedChatDiscarded = 0x13d6dd27;\r\n        public const uint TLInputEncryptedChat = 0xf141b5e1;\r\n        public const uint TLInputEncryptedFileEmpty = 0x1837c364;\r\n        public const uint TLInputEncryptedFileUploaded = 0x64bd0306;\r\n        public const uint TLInputEncryptedFile = 0x5a17b5e5;\r\n        public const uint TLInputEncryptedFileLocation = 0xf5235d55;\r\n        public const uint TLEncryptedFileEmpty = 0xc21f497e;\r\n        public const uint TLEncryptedFile = 0x4a70994c;\r\n        public const uint TLEncryptedMessage = 0xed18c118;\r\n        public const uint TLEncryptedMessageService = 0x23734b06;\r\n        public const uint TLDecryptedMessageActionSetMessageTTL = 0xa1733aec;\r\n        public const uint TLDecryptedMessageMediaEmpty = 0x089f5c4a;\r\n        public const uint TLDecryptedMessageMediaPhoto = 0x32798a8c;\r\n        public const uint TLDecryptedMessageMediaVideo = 0x4cee6ef3;\r\n        public const uint TLDecryptedMessageMediaGeoPoint = 0x35480a59;\r\n        public const uint TLDecryptedMessageMediaContact = 0x588a0a97;\r\n        public const uint TLDHConfig = 0x2c221edd;\r\n        public const uint TLDHConfigNotModified = 0xc0e24635;\r\n        public const uint TLSentEncryptedMessage = 0x560f8935;\r\n        public const uint TLSentEncryptedFile = 0x9493ff32;\r\n        public const uint TLRPCAnswerUnknown = 0x5e2ad36e;\r\n        public const uint TLRPCAnswerDroppedRunning = 0xcd78e586;\r\n        public const uint TLRPCAnswerDropped = 0xa43ad8b7;\r\n        public const uint TLMessageDetailedInfo = 0x276d3ec6;\r\n        public const uint TLMessageNewDetailedInfo = 0x809db6df;\r\n        public const uint TLMessagesAllInfo = 0x8cc0d131;\r\n        public const uint TLInvokeAfterMsg = 0xcb9f372d;\r\n        public const uint TLDifferenceEmpty = 0x5d75a138;\r\n        public const uint TLDifference = 0xf49ca0;\r\n        public const uint TLDifferenceSlice = 0xa8fb1981;\r\n        public const uint TLUpdateNewMessage = 0x013abdb3;\r\n        public const uint TLUpdateMessageId = 0x4e90bfd6;\r\n        public const uint TLUpdateReadMessages = 0xc6649e31;\r\n        public const uint TLUpdateDeleteMessages = 0xa92bfe26;\r\n        public const uint TLUpdateRestoreMessages = 0xd15de04d;\r\n        public const uint TLUpdateUserTyping = 0x6baa8508;\r\n        public const uint TLUpdateChatUserTyping = 0x3c46cfe6;\r\n        public const uint TLUpdateChatParticipants = 0x07761198;\r\n        public const uint TLUpdateUserStatus = 0x1bfbd823;\r\n        public const uint TLUpdateUserName = 0xa7332b73;\r\n        public const uint TLUpdateUserPhoto = 0x95313b0c;\r\n        public const uint TLUpdateContactRegistered = 0x2575bbb9;\r\n        public const uint TLUpdateContactLink = 0x51a48a9a;\r\n        public const uint TLUpdateActivation = 0x6f690963;\r\n        public const uint TLUpdateNewAuthorization = 0x8f06529a;\r\n        public const uint TLUpdateDCOptions = 0x8e5e9873;\r\n        public const uint TLUpdatesTooLong = 0xe317af7e;\r\n        public const uint TLUpdateShortMessage = 0xd3f45784;\r\n        public const uint TLUpdateShortChatMessage = 0x2b2fbd4e;\r\n        public const uint TLUpdateShort = 0x78d4dec1;\r\n        public const uint TLUpdatesCombined = 0x725b04c3;\r\n        public const uint TLUpdates = 0x74ae4240;\r\n        public const uint TLFutureSalt = 0x0949d9dc;\r\n        public const uint TLFutureSalts = 0xae500895;\r\n        public const uint TLGzipPacked = 0x3072cfa1;\r\n        public const uint TLState = 0xa56c2a3e;\r\n        public const uint TLFileTypeUnknown = 0xaa963b05;\r\n        public const uint TLFileTypeJpeg = 0x7efe0e;\r\n        public const uint TLFileTypeGif = 0xcae1aadf;\r\n        public const uint TLFileTypePng = 0x0a4f63c0;\r\n        public const uint TLFileTypeMp3 = 0x528a0677;\r\n        public const uint TLFileTypeMov = 0x4b09ebbc;\r\n        public const uint TLFileTypePartial = 0x40bc6f52;\r\n        public const uint TLFileTypeMp4 = 0xb3cea0e4;\r\n        public const uint TLFileTypeWebp = 0x1081464c;\r\n        public const uint TLFile = 0x096a18d5;\r\n        public const uint TLInputFileLocation = 0x14637196;\r\n        public const uint TLInputVideoFileLocation = 0x3d0364ec;\r\n        public const uint TLInviteText = 0x18cb9f78;\r\n        public const uint TLDHGenOk = 0x3bcbf734;\r\n        public const uint TLDHGenRetry = 0x46dc1fb9;\r\n        public const uint TLDHGenFail = 0xa69dae02;\r\n        public const uint TLServerDHInnerData = 0xb5890dba;\r\n        public const uint TLServerDHParamsFail = 0x79cb045d;\r\n        public const uint TLServerDHParamsOk = 0xd0e8075c;\r\n        public const uint TLPQInnerData = 0x83c95aec;\r\n        public const uint TLPQInnerDataDC = 0xa9f55f95;\r\n        public const uint TLResPQ = 0x05162463;\r\n        public const uint TLContactsBlocked = 0x1c138d15;\r\n        public const uint TLContactsBlockedSlice = 0x900802a1;\r\n        public const uint TLContactBlocked = 0x561bc879;\r\n        public const uint TLImportedContacts = 0xad524315;\r\n        public const uint TLImportedContact = 0xd0028438;\r\n        public const uint TLInputContact = 0xf392b7f4;\r\n        public const uint TLContactStatus = 0xaa77b873;\r\n        public const uint TLForeignLinkUnknown = 0x133421f8;\r\n        public const uint TLForeignLinkRequested = 0xa7801f47;\r\n        public const uint TLForeignLinkMutual = 0x1bea8ce1;\r\n        public const uint TLMyLinkEmpty = 0xd22a1c60;\r\n        public const uint TLMyLinkRequested = 0x6c69efee;\r\n        public const uint TLMyLinkContact = 0xc240ebd9;\r\n        public const uint TLLink = 0xeccea3f5;\r\n        public const uint TLUserFull = 0x771095da;\r\n        public const uint TLPhotos = 0x8dca6aa5;\r\n        public const uint TLPhotosSlice = 0x15051f54;\r\n        public const uint TLPhotosPhoto = 0x20212ca8;\r\n        public const uint TLInputPeerNotifyEventsEmpty = 0xf03064d8;\r\n        public const uint TLInputPeerNotifyEventsAll = 0xe86a2c74;\r\n        public const uint TLInputPeerNotifySettings = 0x46a2ce98;\r\n        public const uint TLInputNotifyPeer = 0xb8bc5b0c;\r\n        public const uint TLInputNotifyUsers = 0x193b4417;\r\n        public const uint TLInputNotifyChats = 0x4a95e84e;\r\n        public const uint TLInputNotifyAll = 0xa429b886;\r\n        public const uint TLInputUserEmpty = 0xb98886cf;\r\n        public const uint TLInputUserSelf = 0xf7c1b13f;\r\n        public const uint TLInputUserContact = 0x86e94f65;\r\n        public const uint TLInputUserForeign = 0x655e74ff;\r\n        public const uint TLInputPhotoCropAuto = 0xade6b004;\r\n        public const uint TLInputPhotoCrop = 0xd9915325;\r\n        public const uint TLInputChatPhotoEmpty = 0x1ca48f57;\r\n        public const uint TLInputChatUploadedPhoto = 0x94254732;\r\n        public const uint TLInputChatPhoto = 0xb2e1bf08;\r\n        public const uint TLMessagesChatFull = 0xe5d7d19c;\r\n        public const uint TLChatFull = 0x630e61be;\r\n        public const uint TLChatParticipant = 0xc8d7493e;\r\n        public const uint TLChatParticipantsForbidden = 0x0fd2bb8a;\r\n        public const uint TLChatParticipants = 0x7841b415;\r\n        public const uint TLPeerNotifySettingsEmpty = 0x70a68512;\r\n        public const uint TLPeerNotifySettings = 0x8d5e11ee;\r\n        public const uint TLPeerNotifyEventsEmpty = 0xadd53cb3;\r\n        public const uint TLPeerNotifyEventsAll = 0x6d1ded88;\r\n        public const uint TLChats = 0x8150cbd8;\r\n        public const uint TLMessages = 0x8c718e87;\r\n        public const uint TLMessagesSlice = 0x0b446ae3;\r\n        public const uint TLExportedAuthorization = 0xdf969c2d;\r\n        public const uint TLInputFile = 0xf52ff27f;\r\n        public const uint TLInputPhotoEmpty = 0x1cd7bf0d;\r\n        public const uint TLInputPhoto = 0xfb95c6c4;\r\n        public const uint TLInputGeoPointEmpty = 0xe4c123d6;\r\n        public const uint TLInputGeoPoint = 0xf3b7acc9;\r\n        public const uint TLInputVideoEmpty = 0x5508ec75;\r\n        public const uint TLInputVideo = 0xee579652;\r\n        public const uint TLInputMediaEmpty = 0x9664f57f;\r\n        public const uint TLInputMediaUploadedPhoto = 0x2dc53a7d;\r\n        public const uint TLInputMediaPhoto = 0x8f2ab2ec;\r\n        public const uint TLInputMediaGeoPoint = 0xf9c44144;\r\n        public const uint TLInputMediaContact = 0xa6e45987;\r\n        public const uint TLInputMediaUploadedVideo = 0x133ad6f6;\r\n        public const uint TLInputMediaUploadedThumbVideo = 0x9912dabf;\r\n        public const uint TLInputMediaVideo = 0x7f023ae6;\r\n        public const uint TLInputMessageFilterEmpty = 0x57e2f66c;\r\n        public const uint TLInputMessageFilterPhoto = 0x9609a51c;\r\n        public const uint TLInputMessageFilterVideo = 0x9fc00e65;\r\n        public const uint TLInputMessageFilterPhotoVideo = 0x56e9f0e4;\r\n        public const uint TLInputMessageFilterPhotoVideoDocument = 0xd95e73bb;\r\n        public const uint TLInputMessageFilterDocument = 0x9eddf188;\r\n        public const uint TLInputMessageFilterAudio = 0xcfc87522;\r\n        public const uint TLInputMessageFilterAudioDocuments = 0x5afbf764;\r\n        public const uint TLInputMessageFilterUrl = 0x7ef0dd87;\r\n        public const uint TLStatedMessage = 0xd07ae726;\r\n        public const uint TLStatedMessageLink = 0xa9af2881;\r\n        public const uint TLStatedMessages = 0x969478bb;\r\n        public const uint TLStatedMessagesLinks = 0x3e74f5c6;\r\n        public const uint TLAffectedHistory = 0xb7de36f2;\r\n        public const uint TLNull = 0x56730bcc;\r\n        public const uint TLChatEmpty = 0x9ba2d800;\r\n        public const uint TLChat = 0x6e9c9bc7;\r\n        public const uint TLChatForbidden = 0xfb0ccc41;\r\n        public const uint TLSentMessage = 0xd1f4d35c;\r\n        public const uint TLSentMessageLink = 0xe9db4a3f;\r\n        public const uint TLMessageEmpty = 0x83e5de54;\r\n        public const uint TLMessage = 0x22eb6aba;\r\n        public const uint TLMessageForwarded = 0x05f46804;\r\n        public const uint TLMessageService = 0x9f8d60bb;\r\n        public const uint TLMessageMediaEmpty = 0x3ded6320;\r\n        public const uint TLMessageMediaPhoto = 0xc8c45a2a;\r\n        public const uint TLMessageMediaVideo = 0xa2d24290;\r\n        public const uint TLMessageMediaGeo = 0x56e0d474;\r\n        public const uint TLMessageMediaContact = 0x5e7d2f39;\r\n        public const uint TLMessageMediaUnsupported = 0x29632a36;\r\n        public const uint TLMessageActionEmpty = 0xb6aef7b0;\r\n        public const uint TLMessageActionChatCreate = 0xa6638b9a;\r\n        public const uint TLMessageActionChatEditTitle = 0xb5a1ce5a;\r\n        public const uint TLMessageActionChatEditPhoto = 0x7fcb13a8;\r\n        public const uint TLMessageActionChatDeletePhoto = 0x95e3fbef;\r\n        public const uint TLMessageActionChatAddUser = 0x5e3cfc4b;\r\n        public const uint TLMessageActionChatDeleteUser = 0xb2ae9b0c;\r\n        public const uint TLPhotoEmpty = 0x2331b22d;\r\n        public const uint TLPhoto = 0x22b56751;\r\n        public const uint TLPhotoSizeEmpty = 0x0e17e23c;\r\n        public const uint TLPhotoSize = 0x77bfb61b;\r\n        public const uint TLPhotoCachedSize = 0xe9a734fa;\r\n        public const uint TLVideoEmpty = 0xc10658a8;\r\n        public const uint TLVideo = 0x388fa391;\r\n        public const uint TLGeoPointEmpty = 0x1117dd5f;\r\n        public const uint TLGeoPoint = 0x2049d70c;\r\n        public const uint TLDialogs = 0x15ba6c40;\r\n        public const uint TLDialogsSlice = 0x71e094f3;\r\n        public const uint TLDialog = 0xab3a99ac;\r\n        public const uint TLInputPeerEmpty = 0x7f3b18ea;\r\n        public const uint TLInputPeerSelf = 0x7da07ec9;\r\n        public const uint TLInputPeerContact = 0x1023dbe8;\r\n        public const uint TLInputPeerForeign = 0x9b447325;\r\n        public const uint TLInputPeerChat = 0x179be863;\r\n        public const uint TLPeerUser = 0x9db1bc6d;\r\n        public const uint TLPeerChat = 0xbad0e5bb;\r\n        public const uint TLVector = 0x1cb5c415;\r\n        public const uint TLUserStatusEmpty = 0x09d05049;\r\n        public const uint TLUserStatusOnline = 0xedb93949;\r\n        public const uint TLUserStatusOffline = 0x8c703f;\r\n        public const uint TLChatPhotoEmpty = 0x37c1011c;\r\n        public const uint TLChatPhoto = 0x6153276a;\r\n        public const uint TLUserProfilePhotoEmpty = 0x4f11bae1;\r\n        public const uint TLUserProfilePhoto = 0xd559d8c8;\r\n        public const uint TLUserEmpty = 0x200250ba;\r\n        public const uint TLUserSelf = 0x720535ec;\r\n        public const uint TLUserContact = 0xf2fb8319;\r\n        public const uint TLUserRequest = 0x22e8ceb0;\r\n        public const uint TLUserForeign = 0x5214c89d;\r\n        public const uint TLUserDeleted = 0xb29ad7cc;\r\n        public const uint TLSentCode = 0xefed51d9;\r\n        public const uint TLRPCResult = 0xf35c6d01;\r\n        public const uint TLRPCError = 0x2144ca19;\r\n        public const uint TLRPCReqError = 0x7ae432f5;\r\n        public const uint TLNewSessionCreated = 0x9ec20908;\r\n        public const uint TLNearestDC = 0x8e1a1775;\r\n        public const uint TLMessagesAcknowledgment = 0x62d6b459;\r\n        public const uint TLContainer = 0x73f1f8dc;\r\n        public const uint TLFileLocationUnavailable = 0x7c596b46;\r\n        public const uint TLFileLocation = 0x53d69076;\r\n        public const uint TLDCOption = 0x2ec2a43c;\r\n        public const uint TLContacts = 0x6f8b8cb2;\r\n        public const uint TLContactsNotModified = 0xb74ba9d2;\r\n        public const uint TLContact = 0xf911c994;\r\n        public const uint TLConfig = 0x2e54dd74;\r\n        public const uint TLConfig23 = 0x7dae33e0; \r\n        public const uint TLCheckedPhone = 0xe300cc3b;\r\n        public const uint TLBadServerSalt = 0xedab447b;\r\n        public const uint TLBadMessageNotification = 0xa7eff811;\r\n        public const uint TLAuthorization = 0xf6b673a4;\r\n        public const uint TLWallPaper = 0xccb03657;\r\n        public const uint TLWallPaperSolid = 0x63117f24;\r\n        public const uint TLPing = 0x7abe77ec;\r\n        public const uint TLPong = 0x347773c5;\r\n        public const uint TLPingDelayDisconnect = 0xf3427b8c;\r\n        public const uint TLContactFound = 0xea879f95;\r\n        public const uint TLContactsFound = 0x566000e;\r\n\r\n        // layer 16\r\n        public const uint TLSentAppCode = 0xe325edcf;\r\n\r\n        // layer 17\r\n        public const uint TLSendMessageTypingAction = 0x16bf744e;\r\n        public const uint TLSendMessageCancelAction = 0xfd5ec8f5;\r\n        public const uint TLSendMessageRecordVideoAction = 0xa187d66f;\r\n        public const uint TLSendMessageUploadVideoAction = 0x92042ff7;\r\n        public const uint TLSendMessageRecordAudioAction = 0xd52f73f7;\r\n        public const uint TLSendMessageUploadAudioAction = 0xe6ac8a6f;\r\n        public const uint TLSendMessageUploadPhotoAction = 0x990a3c1a;\r\n        public const uint TLSendMessageUploadDocumentAction = 0x8faee98e;\r\n        public const uint TLSendMessageGeoLocationAction = 0x176f8ba1;\r\n        public const uint TLSendMessageChooseContactAction = 0x628cbc6f;\r\n        public const uint TLUpdateUserTyping17 = 0x5c486927;\r\n        public const uint TLUpdateChatUserTyping17 = 0x9a65ea1f;\r\n        public const uint TLMessage17 = 0x567699b3;\r\n        public const uint TLMessageForwarded17 = 0xa367e716;\r\n        public const uint TLMessageService17 = 0x1d86f70e;\r\n\r\n        // layer 17 encrypted\r\n        public const uint TLDecryptedMessage17 = 0x204d3878;\r\n        public const uint TLDecryptedMessageService17 = 0x73164160;\r\n        public const uint TLDecryptedMessageMediaVideo17 = 0x524a415d;\r\n        public const uint TLDecryptedMessageMediaAudio17 = 0x57e0a9cb;\r\n        public const uint TLDecryptedMessageLayer17 = 0x1be31789;\r\n        public const uint TLDecryptedMessageActionResend = 0x511110b0;\r\n        public const uint TLDecryptedMessageActionTyping = 0xccb27641;\r\n\r\n        // layer 18\r\n        public const uint TLUpdateServiceNotification = 0x382dd3e4;\r\n        public const uint TLUserSelf18 = 0x7007b451;\r\n        public const uint TLUserContact18 = 0xcab35e18;\r\n        public const uint TLUserRequest18 = 0xd9ccc4ef;\r\n        public const uint TLUserForeign18 = 0x75cf7a8;\r\n        public const uint TLUserDeleted18 = 0xd6016d7a;\r\n\r\n        // layer 19\r\n        public const uint TLUserStatusRecently = 0xe26f42f1;\r\n        public const uint TLUserStatusLastWeek = 0x7bf09fc;\r\n        public const uint TLUserStatusLastMonth = 0x77ebc742;\r\n        public const uint TLContactStatus19 = 0xd3680c61;\r\n        public const uint TLUpdatePrivacy = 0xee3b272a;\r\n        public const uint TLInputPrivacyKeyStatusTimestamp = 0x4f96cb18;\r\n        public const uint TLPrivacyKeyStatusTimestamp = 0xbc2eab30;\r\n        public const uint TLInputPrivacyValueAllowContacts = 0xd09e07b;\r\n        public const uint TLInputPrivacyValueAllowAll = 0x184b35ce;\r\n        public const uint TLInputPrivacyValueAllowUsers = 0x131cc67f;\r\n        public const uint TLInputPrivacyValueDisallowContacts = 0xba52007;\r\n        public const uint TLInputPrivacyValueDisallowAll = 0xd66b66c9;\r\n        public const uint TLInputPrivacyValueDisallowUsers = 0x90110467;\r\n        public const uint TLPrivacyValueAllowContacts = 0xfffe1bac;\r\n        public const uint TLPrivacyValueAllowAll = 0x65427b82;\r\n        public const uint TLPrivacyValueAllowUsers = 0x4d5bbe0c;\r\n        public const uint TLPrivacyValueDisallowContacts = 0xf888fa1a;\r\n        public const uint TLPrivacyValueDisallowAll = 0x8b73e763;\r\n        public const uint TLPrivacyValueDisallowUsers = 0xc7f49b7;\r\n        public const uint TLPrivacyRules = 0x554abb6f;\r\n        public const uint TLAccountDaysTTL = 0xb8d0afdf;\r\n\r\n        // layer 20\r\n        public const uint TLSentChangePhoneCode = 0xa4f58c4c;\r\n        public const uint TLUpdateUserPhone = 0x12b9417b;\r\n\r\n        // layer 20 encrypted\r\n        public const uint TLDecryptedMessageActionRequestKey = 0xf3c9611b;\r\n        public const uint TLDecryptedMessageActionAcceptKey = 0x6fe1735b;\r\n        public const uint TLDecryptedMessageActionAbortKey = 0xdd05ec6b;\r\n        public const uint TLDecryptedMessageActionCommitKey = 0xec2e0b9b;\r\n        public const uint TLDecryptedMessageActionNoop = 0xa82fdd63;\r\n        \r\n        // layer 21\r\n\r\n        // layer 22\r\n        public const uint TLInputMediaUploadedDocument22 = 0xffe76b78;\r\n        public const uint TLInputMediaUploadedThumbDocument22 = 0x41481486;\r\n        public const uint TLDocument22 = 0xf9a39f4f;\r\n        public const uint TLDocumentAttributeImageSize = 0x6c37c15c;\r\n        public const uint TLDocumentAttributeAnimated = 0x11b58939;\r\n        public const uint TLDocumentAttributeSticker = 0xfb0a5727;\r\n        public const uint TLDocumentAttributeVideo = 0x5910cccb;\r\n        public const uint TLDocumentAttributeAudio = 0x51448e5;\r\n        public const uint TLDocumentAttributeFileName = 0x15590068;\r\n        public const uint TLStickersNotModified = 0xf1749a22;\r\n        public const uint TLStickers = 0x8a8ecd32;\r\n        public const uint TLStickerPack = 0x12b299d4;\r\n        public const uint TLAllStickersNotModified = 0xe86602c3;\r\n        public const uint TLAllStickers = 0xdcef3102;\r\n\r\n        // layer 23\r\n        public const uint TLDisabledFeature = 0xae636f24;\r\n\r\n        // layer 23 encrypted\r\n        public const uint TLDecryptedMessageMediaExternalDocument = 0xfa95b0dd;\r\n\r\n        // layer 24\r\n        public const uint TLUpdateNewMessage24 = 0x1f2b0afd;\r\n        public const uint TLUpdateReadMessages24 = 0x2e5ab668;\r\n        public const uint TLUpdateDeleteMessages24 = 0xa20db0e5;\r\n        public const uint TLUpdateShortMessage24 = 0xb87da3b1;\r\n        public const uint TLUpdateShortChatMessage24 = 0x20e85ded;\r\n        public const uint TLUpdateReadHistoryInbox = 0x9961fd5c;\r\n        public const uint TLUpdateReadHistoryOutbox = 0x2f2f21bf;\r\n        public const uint TLDialog24 = 0xc1dd804a;\r\n        public const uint TLStatedMessages24 = 0x7d84b48;\r\n        public const uint TLStatedMessagesLinks24 = 0x51be5d19;\r\n        public const uint TLStatedMessage24 = 0x96240c6a;\r\n        public const uint TLStatedMessageLink24 = 0x948a288;\r\n        public const uint TLSentMessage24 = 0x900eac40;\r\n        public const uint TLSentMessageLink24 = 0xe923400d;\r\n        public const uint TLAffectedMessages = 0x84d19185;\r\n        public const uint TLAffectedHistory24 = 0xb45c69d1;\r\n        public const uint TLMessageMediaUnsupported24 = 0x9f84f49e;\r\n        public const uint TLChats24 = 0x64ff9fd5;\r\n        public const uint TLUserSelf24 = 0x1c60e608;\r\n        public const uint TLCheckedPhone24 = 0x811ea28e;\r\n        public const uint TLContactLinkUnknown = 0x5f4f9247;\r\n        public const uint TLContactLinkNone = 0xfeedd3ad;\r\n        public const uint TLContactLinkHasPhone = 0x268f3f59;\r\n        public const uint TLContactLink = 0xd502c2d0;\r\n        public const uint TLUpdateContactLink24 = 0x9d2e67c5;\r\n        public const uint TLLink24 = 0x3ace484c;\r\n        public const uint TLConfig24 = 0x3e6f732a;\r\n\r\n        // layer 25\r\n        public const uint TLMessage25 = 0xa7ab1991;\r\n        public const uint TLDocumentAttributeSticker25 = 0x994c9882;\r\n        public const uint TLUpdatesShortMessage25 = 0xed5c2127;\r\n        public const uint TLUpdatesShortChatMessage25 = 0x52238b3c;\r\n\r\n        // layer 26\r\n        public const uint TLSentMessage26 = 0x4c3d47f3;\r\n        public const uint TLSentMessageLink26 = 0x35a1a663;\r\n        public const uint TLConfig26 = 0x68bac247;\r\n        public const uint TLUpdateWebPage = 0x2cc36971;\r\n        public const uint TLWebPageEmpty = 0xeb1477e8;\r\n        public const uint TLWebPagePending = 0xc586da1c;\r\n        public const uint TLWebPage = 0xa31ea0b5;\r\n        public const uint TLMessageMediaWebPage = 0xa32dd600;\r\n        public const uint TLAccountAuthorization = 0x7bf2e6f6;\r\n        public const uint TLAccountAuthorizations = 0x1250abde;\r\n\r\n        // layer 27\r\n        public const uint TLNoPassword = 0x96dabc18;\r\n        public const uint TLPassword = 0x7c18141c;\r\n        public const uint TLPasswordSettings = 0xb7b72ab3;\r\n        public const uint TLPasswordInputSettings = 0x86916deb; //0xbcfc532c;\r\n        public const uint TLPasswordRecovery = 0x137948a5;\r\n\r\n        // layer 28\r\n        public const uint TLInvokeWithoutUpdates = 0xbf9459b7;\r\n        public const uint TLInputMediaUploadedPhoto28 = 0xf7aff1c0;\r\n        public const uint TLInputMediaPhoto28 = 0xe9bfb4f3;\r\n        public const uint TLInputMediaUploadedVideo28 = 0xe13fd4bc;\r\n        public const uint TLInputMediaUploadedThumbVideo28 = 0x96fb97dc;\r\n        public const uint TLInputMediaVideo28 = 0x936a4ebd;\r\n        public const uint TLSendMessageUploadVideoAction28 = 0xe9763aec;\r\n        public const uint TLSendMessageUploadAudioAction28 = 0xf351d7ab;\r\n        public const uint TLSendMessageUploadDocumentAction28 = 0xaa0cd9e4;\r\n        public const uint TLSendMessageUploadPhotoAction28 = 0xd1d34a26;\r\n        public const uint TLInputMediaVenue = 0x2827a81a;\r\n        public const uint TLMessageMediaVenue = 0x7912b71f;\r\n        public const uint TLReceivedNotifyMessage = 0xa384b779;\r\n        public const uint TLChatInviteEmpty = 0x69df3769;\r\n        public const uint TLChatInviteExported = 0xfc2e05bc;\r\n        public const uint TLChatInviteAlready = 0x5a686d7c;\r\n        public const uint TLChatInvite = 0xce917dcd;\r\n        public const uint TLMessageActionChatJoinedByLink = 0xf89cf5e8;\r\n        public const uint TLUpdateReadMessagesContents = 0x68c13933;\r\n        public const uint TLChatFull28 = 0xcade0791;\r\n        public const uint TLConfig28 = 0x4e32b894;\r\n        public const uint TLMessageMediaPhoto28 = 0x3d8ce53d;\r\n        public const uint TLMessageMediaVideo28 = 0x5bcf1675;\r\n        public const uint TLPhoto28 = 0xc3838076;\r\n        public const uint TLVideo28 = 0xee9f4a4d;\r\n\r\n        // layer 29\r\n        public const uint TLDocumentAttributeSticker29 = 0x3a556302;\r\n        public const uint TLAllStickers29 = 0x5ce352ec;\r\n        public const uint TLInputStickerSetEmpty = 0xffb62b95;\r\n        public const uint TLInputStickerSetId = 0x9de7a269;\r\n        public const uint TLInputStickerSetShortName = 0x861cc8a0;\r\n        public const uint TLStickerSet = 0xa7a43b17;\r\n        public const uint TLMessagesStickerSet = 0xb60a24a6;\r\n\r\n        // layer 30\r\n        public const uint TLDCOption30 = 0x5d8c6cc;\r\n\r\n        // layer 31\r\n        public const uint TLAuthorization31 = 0xff036af1;\r\n        public const uint TLMessage31 = 0xc3060325;\r\n        public const uint TLChatFull31 = 0x2e02a614;\r\n        public const uint TLUserFull31 = 0x5a89ac5b;\r\n        public const uint TLUser = 0x22e49072;\r\n        public const uint TLBotCommand = 0xc27ac8c7;\r\n        public const uint TLBotInfoEmpty = 0xbb2e37ce;\r\n        public const uint TLBotInfo = 0x9cf585d;\r\n        public const uint TLKeyboardButton = 0xa2fa4880;\r\n        public const uint TLKeyboardButtonRow = 0x77608b83;\r\n        public const uint TLReplyKeyboardMarkup = 0x3502758c;\r\n        public const uint TLReplyKeyboardHide = 0xa03e5b85;\r\n        public const uint TLReplyKeyboardForceReply = 0xf4108aa0;\r\n\r\n        // layer 32\r\n        public const uint TLDocumentAttributeAudio32 = 0xded218e0;\r\n        public const uint TLAllStickers32 = 0xd51dafdb;\r\n        public const uint TLStickerSet32 = 0xcd303b41;\r\n\r\n        // layer 33\r\n        public const uint TLInputPeerUser = 0x7b8e7de6;\r\n        public const uint TLInputUser = 0xd8292816;\r\n        public const uint TLPhoto33 = 0xcded42fe;\r\n        public const uint TLVideo33 = 0xf72887d3;\r\n        public const uint TLAudio33 = 0xf9e35055;\r\n        public const uint TLAppChangelogEmpty = 0xaf7e0394;\r\n        public const uint TLAppChangelog = 0x4668e6bd;\r\n\r\n        // layer 34\r\n        public const uint TLMessageEntityUnknown = 0xbb92ba95;\r\n        public const uint TLMessageEntityMention = 0xfa04579d;\r\n        public const uint TLMessageEntityHashtag = 0x6f635b0d;\r\n        public const uint TLMessageEntityBotCommand = 0x6cef8ac7;\r\n        public const uint TLMessageEntityUrl = 0x6ed02538;\r\n        public const uint TLMessageEntityEmail = 0x64e475c2;\r\n        public const uint TLMessageEntityBold = 0xbd610bc9;\r\n        public const uint TLMessageEntityItalic = 0x826f8b60;\r\n        public const uint TLMessageEntityCode = 0x28a20571;\r\n        public const uint TLMessageEntityPre = 0x73924be0;\r\n        public const uint TLMessageEntityTextUrl = 0x76a6d327;\r\n        public const uint TLMessage34 = 0xf07814c8;\r\n        public const uint TLSentMessage34 = 0x8a99d8e0;\r\n        public const uint TLUpdatesShortMessage34 = 0x3f32d858;\r\n        public const uint TLUpdatesShortChatMessage34 = 0xf9409b3d;\r\n\r\n        // layer 35\r\n        public const uint TLWebPage35 = 0xca820ed7;\r\n\r\n        // layer 36\r\n        public const uint TLInputMediaUploadedVideo36 = 0x82713fdf;\r\n        public const uint TLInputMediaUploadedThumbVideo36 = 0x7780ddf9;\r\n        public const uint TLMessage36 = 0x2bebfa86;\r\n        public const uint TLUpdatesShortSentMessage = 0x11f1331c;\r\n\r\n        // layer 37\r\n        public const uint TLChatParticipantsForbidden37 = 0xfc900c2b;\r\n        public const uint TLUpdateChatParticipantAdd37 = 0xea4b0e5c;\r\n        public const uint TLUpdateWebPage37 = 0x7f891213;\r\n\r\n        // layer 40\r\n        public const uint TLInputPeerChannel = 0x20adaef8;\r\n        public const uint TLPeerChannel = 0xbddde532;\r\n        public const uint TLChat40 = 0x7312bc48;\r\n        public const uint TLChatForbidden40 = 0x7328bdb;\r\n        public const uint TLChannel = 0x678e9587; //0x1bcc63f2;\r\n        public const uint TLChannelForbidden = 0x2d85832c;\r\n        public const uint TLChannelFull = 0xfab31aa3; //0xf6945b65;\r\n        public const uint TLChannelParticipants40 = 0xb561ad0c;\r\n        public const uint TLMessage40 = 0x5ba66c13;\r\n        public const uint TLMessageService40 = 0xc06b9607;\r\n        public const uint TLMessageActionChannelCreate = 0x95d2ac92;\r\n        public const uint TLMessageActionToggleComments = 0xf2863903;\r\n        public const uint TLDialogChannel = 0x5b8496b2;\r\n        public const uint TLChannelMessages = 0xbc0f17bc;\r\n        public const uint TLUpdateChannelTooLong = 0x60946422;\r\n        public const uint TLUpdateChannelGroup = 0xc36c1e3c;\r\n        public const uint TLUpdateNewChannelMessage = 0x62ba04d9;\r\n        public const uint TLUpdateReadChannelInbox = 0x4214f37f;// 0x87b87b7d;\r\n        public const uint TLUpdateDeleteChannelMessages = 0xc37521c9;// 0x11da3046;\r\n        public const uint TLUpdateChannelMessageViews = 0x98a12b4b;//0xf3349b09;\r\n        public const uint TLUpdateChannel = 0xb6d45656;\r\n        public const uint TLUpdatesShortMessage40 = 0xf7d91a46;\r\n        public const uint TLUpdatesShortChatMessage40 = 0xcac7fdd2;\r\n        public const uint TLContactsFound40 = 0x1aa1f784;\r\n        //public const uint TLInputChatEmpty = 0xd9ff343c;\r\n        //public const uint TLInputChat = 0x43a5b9c3;\r\n        public const uint TLInputChannel = 0xafeb712e;// 0x30c6ce73;\r\n        public const uint TLInputChannelEmpty = 0xee8c1e86;\r\n        public const uint TLMessageRange = 0xae30253;\r\n        public const uint TLMessageGroup = 0xe8346f53;\r\n        public const uint TLChannelDifferenceEmpty = 0x3e11affb;\r\n        public const uint TLChannelDifferenceTooLong = 0x5e167646;\r\n        public const uint TLChannelDifference = 0x2064674e;\r\n        public const uint TLChannelMessagesFilterEmpty = 0x94d42ee7;\r\n        public const uint TLChannelMessagesFilter = 0xcd77d957;\r\n        public const uint TLChannelMessagesFilterCollapsed = 0xfa01232e;\r\n        public const uint TLResolvedPeer = 0x7f077ad9;\r\n        public const uint TLChannelParticipant = 0x15ebac1d;\r\n        public const uint TLChannelParticipantSelf = 0xa3289a6d; \r\n        public const uint TLChannelParticipantModerator = 0x91057fef;\r\n        public const uint TLChannelParticipantEditor = 0x98192d61;\r\n        public const uint TLChannelParticipantKicked = 0x8cc5e69a;\r\n        public const uint TLChannelParticipantCreator = 0xe3e2e1f9;\r\n        public const uint TLChannelParticipantsRecent = 0xde3f3c79;\r\n        public const uint TLChannelParticipantsAdmins = 0xb4608969;\r\n        public const uint TLChannelParticipantsKicked = 0x3c37bb7a;\r\n        public const uint TLChannelRoleEmpty = 0xb285a0c6;\r\n        public const uint TLChannelRoleModerator = 0x9618d975;\r\n        public const uint TLChannelRoleEditor = 0x820bfe8c;\r\n        public const uint TLChannelParticipants = 0xf56ee2a8;\r\n        public const uint TLChannelsChannelParticipant = 0xd0d9b163;\r\n        public const uint TLChatInvite40 = 0x93e99b60;\r\n        public const uint TLChatParticipants40 = 0x3f460fed;\r\n        public const uint TLChatParticipantCreator = 0xda13538a;\r\n        public const uint TLChatParticipantAdmin = 0xe2d6e436;\r\n        public const uint TLUpdateChatAdmins = 0x6e947941;\r\n        public const uint TLUpdateChatParticipantAdmin = 0xb6901959;\r\n        public const uint TLConfig41 = 0x6cb6e65e;\r\n        public const uint TLMessageActionChatMigrateTo = 0x51bdb021;\r\n        public const uint TLMessageActionChatDeactivate = 0x64ad20a8;\r\n        public const uint TLMessageActionChatActivate = 0x40ad8cb2;\r\n        public const uint TLMessageActionChannelMigrateFrom = 0xb055eaee;\r\n        public const uint TLChannelParticipantsBots = 0xb0d1865b;\r\n        public const uint TLChat41 = 0xd91cdd54;\r\n        public const uint TLChannelFull41 = 0x9e341ddf;\r\n        public const uint TLMessageActionChatAddUser41 = 0x488a7337;\r\n\r\n        // layer 42\r\n        public const uint TLInputReportReasonSpam = 0x58dbcab8;\r\n        public const uint TLInputReportReasonViolence = 0x1e22c78d;\r\n        public const uint TLInputReportReasonPornography = 0x2e59d922;\r\n        public const uint TLInputReportReasonOther = 0xe1746d0a;\r\n        public const uint TLTermsOfService = 0xf1ee3e90;\r\n\r\n        // layer 43\r\n        public const uint TLUpdateNewStickerSet = 0x688a30aa;\r\n        public const uint TLUpdateStickerSetsOrder = 0xf0dfb451;\r\n        public const uint TLUpdateStickerSets = 0x43ae3dec;\r\n        public const uint TLAllStickers43 = 0xedfd405f;\r\n\r\n        // layer 44\r\n        public const uint TLInputMediaGifExternal = 0x4843b0fd;\r\n        public const uint TLUser44 = 0x603539b4;\r\n        public const uint TLChannel44 = 0x4b1b7506;\r\n        public const uint TLInputMessagesFilterGif = 0xffc86587;\r\n        public const uint TLUpdateSavedGifs = 0x9375341e;\r\n        public const uint TLConfig44 = 0x6bbc5f8;\r\n        public const uint TLFoundGif = 0x162ecc1f;\r\n        public const uint TLFoundGifCached = 0x9c750409;\r\n        public const uint TLFoundGifs = 0x450a1c0a;\r\n        public const uint TLSavedGifsNotModified = 0xe8025ca2;\r\n        public const uint TLSavedGifs = 0x2e0709a5;\r\n\r\n        // layer 45\r\n        public const uint TLInputMediaUploadedDocument45 = 0x1d89306d;\r\n        public const uint TLInputMediaUploadedThumbDocument45 = 0xad613491;\r\n        public const uint TLInputMediaDocument45 = 0x1a77f29c;\r\n        public const uint TLUser45 = 0xd10d979a;\r\n        public const uint TLMessage45 = 0xc992e15c;\r\n        public const uint TLMessageMediaDocument45 = 0xf3e02ea8;\r\n        public const uint TLUpdateBotInlineQuery = 0xc01eea08;\r\n        public const uint TLUpdatesShortMessage45 = 0x13e4deaa;\r\n        public const uint TLUpdatesShortChatMessage45 = 0x248afa62;\r\n        public const uint TLInputBotInlineMessageMediaAuto = 0x2e43e587;\r\n        public const uint TLInputBotInlineMessageText = 0xadf0df71;\r\n        public const uint TLInputBotInlineResult = 0x2cbbe15a;\r\n        public const uint TLBotInlineMessageMediaAuto = 0xfc56e87d;\r\n        public const uint TLBotInlineMessageText = 0xa56197a9;\r\n        public const uint TLBotInlineMediaResultDocument = 0xf897d33e;\r\n        public const uint TLBotInlineMediaResultPhoto = 0xc5528587;\r\n        public const uint TLBotInlineResult = 0x9bebaeb9;\r\n        public const uint TLBotResults = 0x1170b0a3;\r\n\r\n        // layer 46\r\n        public const uint TLDocumentAttributeAudio46 = 0x9852f9c6;\r\n        public const uint TLInputMessagesFilterVoice = 0x50f5c392;\r\n        public const uint TLInputMessagesFilterMusic = 0x3751b49e;\r\n        public const uint TLInputPrivacyKeyChatInvite = 0xbdfb0426;\r\n        public const uint TLPrivacyKeyChatInvite = 0x500e6dfa;\r\n\r\n        // layer 48\r\n        public const uint TLMessage48 = 0xc09be45f;\r\n        public const uint TLInputPeerNotifySettings48 = 0x38935eb2;\r\n        public const uint TLPeerNotifySettings48 = 0x9acda4c0;\r\n        public const uint TLUpdateEditChannelMessage = 0x1b3f4df7;\r\n        public const uint TLUpdatesShortMessage48 = 0x914fbf11;\r\n        public const uint TLUpdatesShortChatMessage48 = 0x16812688;\r\n        public const uint TLConfig48 = 0x317ceef4;\r\n        public const uint TLConfig54 = 0xf401a4bf;\r\n        public const uint TLExportedMessageLink = 0x1f486803;\r\n        public const uint TLMessageFwdHeader = 0xc786ddcb;\r\n        public const uint TLMessageEditData = 0x26b5dde6;\r\n\r\n        // layer 49\r\n        public const uint TLPeerSettings = 0x818426cd;\r\n        public const uint TLMessageService49 = 0x9e19a1f6;\r\n        public const uint TLMessageActionPinMessage = 0x94bd38ed;\r\n        public const uint TLChannel49 = 0xa14dca52;\r\n        public const uint TLChannelFull49 = 0x97bee562;\r\n        public const uint TLUserFull49 = 0x5932fc03;\r\n        public const uint TLBotInfo49 = 0x98e81d3a;\r\n        public const uint TLUpdateChannelPinnedMessage = 0x98592475;\r\n        public const uint TLUpdateChannelTooLong49 = 0xeb0467fb;\r\n\r\n        // layer 50\r\n        public const uint TLSentCode50 = 0x5e002502;\r\n        public const uint TLCodeTypeSms = 0x72a3158c;\r\n        public const uint TLCodeTypeCall = 0x741cd3e3;\r\n        public const uint TLCodeTypeFlashCall = 0x226ccefb;\r\n        public const uint TLSentCodeTypeApp = 0x3dbb5986;\r\n        public const uint TLSentCodeTypeSms = 0xc000bba2;\r\n        public const uint TLSentCodeTypeCall = 0x5353e5a7;\r\n        public const uint TLSentCodeTypeFlashCall = 0xab03c6d9;\r\n\r\n        // layer 51\r\n        public const uint TLUpdateBotCallbackQuery = 0xa68c688c;\r\n        public const uint TLUpdateInlineBotCallbackQuery = 0x2cbd95af;\r\n        public const uint TLUpdateBotInlineQuery51 = 0x54826690;\r\n        public const uint TLUpdateBotInlineSend = 0xe48f964;\r\n        public const uint TLUpdateEditMessage = 0xe40370a3;\r\n        public const uint TLKeyboardButtonUrl = 0x258aff05;\r\n        public const uint TLKeyboardButtonCallback = 0x683a5e46;\r\n        public const uint TLKeyboardButtonRequestPhone = 0xb16a6c29;\r\n        public const uint TLKeyboardButtonRequestGeoLocation = 0xfc796b3f;\r\n        public const uint TLKeyboardButtonSwitchInline = 0xea1b7a14;\r\n        public const uint TLBotCallbackAnswer = 0x1264f1c6;\r\n        public const uint TLReplyInlineMarkup = 0x48a30254;\r\n        public const uint TLInputBotInlineMessageMediaAuto51 = 0x292fed13;\r\n        public const uint TLInputBotInlineMessageText51 = 0x3dcd7a87;\r\n        public const uint TLInputBotInlineMessageMediaGeo = 0xf4a59de1;\r\n        public const uint TLInputBotInlineMessageMediaVenue = 0xaaafadc8;\r\n        public const uint TLInputBotInlineMessageMediaContact = 0x2daf01a7;\r\n        public const uint TLInputBotInlineResultPhoto = 0xa8d864a7;\r\n        public const uint TLInputBotInlineResultDocument = 0xfff8fdc4;\r\n        public const uint TLBotInlineMessageMediaAuto51 = 0xa74b15b;\r\n        public const uint TLBotInlineMessageText51 = 0x8c7f65e2;\r\n        public const uint TLBotInlineMessageMediaGeo = 0x3a8fd8b8;\r\n        public const uint TLBotInlineMessageMediaVenue = 0x4366232e;\r\n        public const uint TLBotInlineMessageMediaContact = 0x35edb4d4;\r\n        public const uint TLBotInlineMediaResult = 0x17db940b;\r\n        public const uint TLInputBotInlineMessageId = 0x890c3d89;\r\n        public const uint TLBotResults51 = 0x256709a6;\r\n        public const uint TLInlineBotSwitchPM = 0x3c20629f;\r\n\r\n        // layer 52\r\n        public const uint TLConfig52 = 0xc9411388;\r\n        public const uint TLMessageEntityMentionName = 0x352dca58;\r\n        public const uint TLInputMessageEntityMentionName = 0x208e68c9;\r\n        public const uint TLPeerDialogs = 0x3371c354;\r\n        public const uint TLTopPeer = 0xedcdc05b;\r\n        public const uint TLTopPeerCategoryBotsPM = 0xab661b5b;\r\n        public const uint TLTopPeerCategoryBotsInline = 0x148677e2;\r\n        public const uint TLTopPeerCategoryCorrespondents = 0x637b7ed;\r\n        public const uint TLTopPeerCategoryGroups = 0xbd17a14a;\r\n        public const uint TLTopPeerCategoryChannels = 0x161d9628;\r\n        public const uint TLTopPeerCategoryPeers = 0xfb834291;\r\n        public const uint TLTopPeersNotModified = 0xde266ef5;\r\n        public const uint TLTopPeers = 0x70b772a8;\r\n\r\n        // layer 53\r\n        public const uint TLInputMessagesFilterChatPhotos = 0x3a20ecb8;\r\n        public const uint TLUpdateReadChannelOutbox = 0x25d6c9c7;\r\n        public const uint TLChannelFull53 = 0xc3d5512f;\r\n        public const uint TLDialog53 = 0x66ffba14;\r\n        public const uint TLChannelMessages53 = 0x99262e37;\r\n        public const uint TLUpdateDraftMessage = 0xee2bb969;\r\n        public const uint TLChannelDifferenceTooLong53 = 0x410dee07;\r\n        public const uint TLChannelMessagesFilter53 = 0xcd77d957;\r\n        public const uint TLDraftMessageEmpty = 0xba4baec5;\r\n        public const uint TLDraftMessage = 0xfd8e711f;\r\n        public const uint TLChannelForbidden53 = 0x8537784f;\r\n        public const uint TLMessageActionClearHistory = 0x9fbab604;\r\n\r\n        // layer 54\r\n        public const uint TLFeaturedStickersNotModified = 0x4ede3cf;\r\n        public const uint TLUpdateReadFeaturedStickers = 0x571d2742;\r\n        public const uint TLBotCallbackAnswer54 = 0xb10df1fb;   //0x31fde6e4;\r\n        public const uint TLInputDocumentFileLocation54 = 0x430f0724;\r\n        public const uint TLDocument54 = 0x87232bc7;\r\n        public const uint TLUpdateRecentStickers = 0x9a422c20;\r\n        public const uint TLRecentStickersNotModified = 0xb17f890;\r\n        public const uint TLRecentStickers = 0x5ce20970;\r\n        public const uint TLChatInvite54 = 0xdb74f558;\r\n        public const uint TLStickerSetInstallResult = 0x38641628;\r\n        public const uint TLStickerSetInstallResultArchive = 0x35e410a8;\r\n        public const uint TLFeaturedStickers = 0xf89d88e5;\r\n        public const uint TLArchivedStickers = 0x4fcba9c8;\r\n        public const uint TLStickerSetCovered = 0x6410a5d2;\r\n\r\n        // layer 55\r\n        public const uint TLInputMediaPhotoExternal = 0xb55f4f18;\r\n        public const uint TLInputMediaDocumentExternal = 0xe5e9607c;\r\n        public const uint TLAuthorization55 = 0xcd050916;\r\n        public const uint TLUpdateConfig = 0xa229dd06;\r\n        public const uint TLUpdatePtsChanged = 0x3354678f;\r\n        public const uint TLConfig55 = 0x9a6b2e2a;\r\n        public const uint TLKeyboardButtonSwitchInline55 = 0x568a748;\r\n\r\n        // layer 56\r\n        public const uint TLUpdateBotCallbackQuery56 = 0x81c5615f;\r\n        public const uint TLUpdateInlineBotCallbackQuery56 = 0xd618a28b;\r\n        public const uint TLUpdateStickerSetsOrder56 = 0xbb2d201;\r\n        public const uint TLStickerSetMultiCovered = 0x3407e51b;\r\n        public const uint TLInputMediaUploadedPhoto56 = 0x630c9af1;\r\n        public const uint TLInputMediaUploadedDocument56 = 0xd070f1e9;\r\n        public const uint TLInputMediaUploadedThumbDocument56 = 0x50d88cae;\r\n        public const uint TLPhoto56 = 0x9288dd29;\r\n        public const uint TLDocumentAttributeSticker56 = 0x6319d612;\r\n        public const uint TLDocumentAttributeHasStickers = 0x9801d2f7;\r\n        public const uint TLMaskCoords = 0xaed6dbb2;\r\n        public const uint TLInputStickeredMediaPhoto = 0x4a992157;\r\n        public const uint TLInputStickeredMediaDocument = 0x438865b;\r\n        public const uint TLInputChatUploadedPhoto56 = 0x927c55b4;\r\n        public const uint TLInputChatPhoto56 = 0x8953ad37;\r\n\r\n        // layer 57\r\n        public const uint TLInputMediaGame = 0xd33f43f3;\r\n        public const uint TLInputGameId = 0x32c3e77;\r\n        public const uint TLInputGameShortName = 0xc331e80a;\r\n        public const uint TLGame = 0xbdf9653b;\r\n        public const uint TLHighScore = 0x58fffcd0;\r\n        public const uint TLHighScores = 0x9a3bfd99;\r\n        public const uint TLInputBotInlineMessageGame = 0x4b425864;\r\n        public const uint TLInputBotInlineResultGame = 0x4fa417f2;\r\n        public const uint TLKeyboardButtonGame = 0x50f41ccf;\r\n        public const uint TLMessageActionGameScore = 0x92a72876;\r\n        public const uint TLMessageMediaGame = 0xfdb19008;\r\n\r\n        // layer 58\r\n        public const uint TLUserFull58 = 0xf220f3f;\r\n        public const uint TLChatsSlice = 0x78f69146;\r\n        public const uint TLUpdateChannelWebPage = 0x40771900;\r\n        public const uint TLDifferenceTooLong = 0x4afe8f6d;\r\n        public const uint TLBotResults58 = 0xccd3563d;\r\n        public const uint TLBotCallbackAnswer58 = 0x36585ea4;\r\n\r\n        // layer 59\r\n        public const uint TLChatsSlice59 = 0x9cd81144;\r\n        public const uint TLUpdateServiceNotification59 = 0xebe46819;\r\n        public const uint TLWebPage59 = 0x5f07b4bc;\r\n        public const uint TLWebPageNotModified = 0x85849473;\r\n        public const uint TLAppChangelog59 = 0x2a137e7c;     \r\n        public const uint TLTextEmpty = 0xdc3d824f;\r\n        public const uint TLTextPlain = 0x744694e0;\r\n        public const uint TLTextBold = 0x6724abc4;\r\n        public const uint TLTextItalic = 0xd912a59c;\r\n        public const uint TLTextUnderline = 0xc12622c4;\r\n        public const uint TLTextStrike = 0x9bf8bb95;\r\n        public const uint TLTextFixed = 0x6c3f19b9;\r\n        public const uint TLTextUrl = 0x3c2884c1;\r\n        public const uint TLTextEmail = 0xde5a0dd6;\r\n        public const uint TLTextConcat = 0x7e6260d7;\r\n        public const uint TLPageBlockUnsupported = 0x13567e8a;\r\n        public const uint TLPageBlockTitle = 0x70abc3fd;\r\n        public const uint TLPageBlockSubtitle = 0x8ffa9a1f;\r\n        public const uint TLPageBlockAuthorDate = 0x3d5b64f2;\r\n        public const uint TLPageBlockHeader = 0xbfd064ec;\r\n        public const uint TLPageBlockSubheader = 0xf12bb6e1;\r\n        public const uint TLPageBlockParagraph = 0x467a0766;\r\n        public const uint TLPageBlockPreformatted = 0xc070d93e;\r\n        public const uint TLPageBlockFooter = 0x48870999;\r\n        public const uint TLPageBlockDivider = 0xdb20b188;\r\n        public const uint TLPageBlockAnchor = 0xce0d37b0;\r\n        public const uint TLPageBlockList = 0x3a58c7f4;\r\n        public const uint TLPageBlockBlockquote = 0x263d7c26;\r\n        public const uint TLPageBlockPullquote = 0x4f4456d3;\r\n        public const uint TLPageBlockPhoto = 0xe9c69982;\r\n        public const uint TLPageBlockVideo = 0xd9d71866;\r\n        public const uint TLPageBlockCover = 0x39f23300;\r\n        public const uint TLPageBlockEmbed = 0xd935d8fb;\r\n        public const uint TLPageBlockEmbedPost = 0x292c7be9;\r\n        public const uint TLPageBlockCollage = 0x8b31c4f;\r\n        public const uint TLPageBlockSlideshow = 0x130c8963;\r\n        public const uint TLPagePart = 0x8dee6c44;\r\n        public const uint TLPageFull = 0xd7a19d69;\r\n\r\n        // layer 60\r\n        public const uint TLUpdatePhoneCall = 0xab0f6b1e;\r\n        public const uint TLConfig60 = 0xb6735d71;\r\n        public const uint TLSendMessageGamePlayAction = 0xdd6a8f48;\r\n        public const uint TLInputPrivacyKeyPhoneCall = 0xfabadc5f;\r\n        public const uint TLPrivacyKeyPhoneCall = 0x3d662b7b;\r\n        public const uint TLInputPhoneCall = 0x1e36fded;\r\n        public const uint TLPhoneCallEmpty = 0x5366c915;\r\n        public const uint TLPhoneCallWaiting = 0x1b8f4ad1;\r\n        public const uint TLPhoneCallRequested = 0x6c448ae8;\r\n        public const uint TLPhoneCall = 0xffe6ab67;\r\n        public const uint TLPhoneCallDiscarded = 0xcc3740bd;\r\n        public const uint TLPhoneConnection = 0x6b7411c9;\r\n        public const uint TLPhoneCallProtocol = 0xa2bb35cb;\r\n        public const uint TLPhonePhoneCall = 0xec82e140;\r\n\r\n        // layer 61\r\n        public const uint TLUpdateDialogPinned = 0xd711a2cc;\r\n        public const uint TLUpdatePinnedDialogs = 0xd8caf68d;\r\n        public const uint TLConfig61 = 0x3af6fb5f;\r\n        public const uint TLPageBlockAuthorDate61 = 0xbaafe5e0;\r\n        public const uint TLPageBlockEmbed61 = 0xcde200d1;\r\n        public const uint TLPhoneCallDiscarded61 = 0x50ca4de1;\r\n        public const uint TLPhoneConnection61 = 0x9d4c17c0;\r\n        public const uint TLPhoneCallDiscardReasonMissed = 0x85e42301;\r\n        public const uint TLPhoneCallDiscardReasonDisconnect = 0xe095c1a0;\r\n        public const uint TLPhoneCallDiscardReasonHangup = 0x57adc690;\r\n        public const uint TLPhoneCallDiscardReasonBusy = 0xfaf7e8c9;\r\n\r\n        // layer 62\r\n        public const uint TLMessageActionPhoneCall = 0x80e11a7f;\r\n        public const uint TLInputMessagesFilterPhoneCalls = 0x80c99768;\r\n        public const uint TLUpdateBotWebhookJSON = 0x8317c0c3;\r\n        public const uint TLUpdateBotWebhookJSONQuery = 0x9b9240a6;\r\n        public const uint TLDataJSON = 0x7d748d04;\r\n\r\n        // layer 63\r\n        public const uint TLConfig63 = 0xcb601684;\r\n\r\n        // layer 64\r\n        public const uint TLInputMediaInvoice = 0x92153685;\r\n        public const uint TLMessageMediaInvoice = 0x84551347;\r\n        public const uint TLMessageActionPaymentSentMe = 0x8f31b327;\r\n        public const uint TLMessageActionPaymentSent = 0x40699cd0;\r\n        public const uint TLUpdateBotShippingQuery = 0xe0cdc940;\r\n        public const uint TLUpdateBotPrecheckoutQuery = 0x5d2f3aa9;\r\n        public const uint TLKeyboardButtonBuy = 0xafd93fbb;\r\n        public const uint TLLabeledPrice = 0xcb296bf8;\r\n        public const uint TLInvoice = 0xc30aa358;\r\n        public const uint TLPaymentCharge = 0xea02c27e;\r\n        public const uint TLPostAddress = 0x1e8caaeb;\r\n        public const uint TLPaymentRequestedInfo = 0x909c3f94;\r\n        public const uint TLPaymentSavedCredentialsCard = 0xcdc27a1f;\r\n        public const uint TLWebDocument = 0xc61acbd8;\r\n        public const uint TLInputWebDocument = 0x9bed434d;\r\n        public const uint TLInputWebFileLocation = 0xc239d686;\r\n        public const uint TLWebFile = 0x21e753bc;\r\n        public const uint TLPaymentForm = 0x3f56aea3;\r\n        public const uint TLValidatedRequestedInfo = 0xd1451883;\r\n        public const uint TLPaymentResult = 0x4e5f810d;\r\n        public const uint TLPaymentVerificationNeeded = 0x6b56b921;\r\n        public const uint TLPaymentReceipt = 0x500911e1;\r\n        public const uint TLSavedInfo = 0xfb8fe43c;\r\n        public const uint TLInputPaymentCredentialsSaved = 0xc10eb2cf;\r\n        public const uint TLInputPaymentCredentials = 0x3417d728;\r\n        public const uint TLTmpPassword = 0xdb64fd34;\r\n        public const uint TLShippingOption = 0xb6213cdf;\r\n\r\n        public const uint TLPhoneCallRequested64 = 0x83761ce4;\r\n        public const uint TLPhoneCallAccepted = 0x6d003d3f;\r\n\r\n        // layer 65, 66\r\n        public const uint TLUser66 = 0x2e13f4c3;\r\n        public const uint TLInputMessagesFilterRoundVoice = 0x7a7c17a4;\r\n        public const uint TLInputMessagesFilterRoundVideo = 0xb549da53;\r\n        public const uint TLFileCdnRedirect = 0x1508485a;\r\n        public const uint TLSendMessageRecordRoundAction = 0x88f27fbc;\r\n        public const uint TLSendMessageUploadRoundAction = 0x243e1c66;\r\n        public const uint TLSendMessageUploadRoundAction66 = 0xbb718624;\r\n        public const uint TLDocumentAttributeVideo66 = 0xef02ce6;\r\n        public const uint TLPageBlockChannel = 0xef1751b5;\r\n        public const uint TLCdnFileReuploadNeeded = 0xeea8e46e;\r\n        public const uint TLCdnFile = 0xa99fca4f;\r\n        public const uint TLCdnPublicKey = 0xc982eaba;\r\n        public const uint TLCdnConfig = 0x5725e40a;\r\n\r\n        // layer 67\r\n        public const uint TLUpdateLangPackTooLong = 0x10c2404b;\r\n        public const uint TLUpdateLangPack = 0x56022f4d;\r\n        public const uint TLConfig67 = 0x7feec888;\r\n        public const uint TLLangPackString = 0xcad181f6;\r\n        public const uint TLLangPackStringPluralized = 0x6c47ac9f;\r\n        public const uint TLLangPackStringDeleted = 0x2979eeb2;\r\n        public const uint TLLangPackDifference = 0xf385c1f6;\r\n        public const uint TLLangPackLanguage = 0x117698f1;\r\n\r\n        // layer 68\r\n        public const uint TLChannel68 = 0xcb44b1c;\r\n        public const uint TLChannelForbidden68 = 0x289da732;\r\n        public const uint TLChannelFull68 = 0x95cb5f57;\r\n        public const uint TLChannelParticipantAdmin = 0xa82fa898;\r\n        public const uint TLChannelParticipantBanned = 0x222c1886;\r\n        public const uint TLChannelParticipantsKicked68 = 0xa3b54985;\r\n        public const uint TLChannelParticipantsBanned = 0x1427a5e1;\r\n        public const uint TLChannelParticipantsSearch = 0x656ac4b;\r\n        public const uint TLTopPeerCategoryPhoneCalls = 0x1e76a78c;\r\n        public const uint TLPageBlockAudio = 0x31b81a7f;\r\n        public const uint TLPagePart68 = 0x8e3f9ebe;\r\n        public const uint TLPageFull68 = 0x556ec7aa;\r\n        public const uint TLChannelAdminRights = 0x5d7ceba5;\r\n        public const uint TLChannelBannedRights = 0x58cf4249;\r\n        public const uint TLChannelAdminLogEventActionChangeTitle = 0xe6dfb825;\r\n        public const uint TLChannelAdminLogEventActionChangeAbout = 0x55188a2e;\r\n        public const uint TLChannelAdminLogEventActionChangeUsername = 0x6a4afc38;\r\n        public const uint TLChannelAdminLogEventActionChangePhoto = 0xb82f55c3;\r\n        public const uint TLChannelAdminLogEventActionToggleInvites = 0x1b7907ae;\r\n        public const uint TLChannelAdminLogEventActionToggleSignatures = 0x26ae0971;\r\n        public const uint TLChannelAdminLogEventActionUpdatePinned = 0xe9e82c18;\r\n        public const uint TLChannelAdminLogEventActionEditMessage = 0x709b2405;\r\n        public const uint TLChannelAdminLogEventActionDeleteMessage = 0x42e047bb;\r\n        public const uint TLChannelAdminLogEventActionParticipantJoin = 0x183040d3;\r\n        public const uint TLChannelAdminLogEventActionParticipantLeave = 0xf89777f2;\r\n        public const uint TLChannelAdminLogEventActionParticipantInvite = 0xe31c34d8;\r\n        public const uint TLChannelAdminLogEventActionParticipantToggleBan = 0xe6d83d7e;\r\n        public const uint TLChannelAdminLogEventActionParticipantToggleAdmin = 0xd5676710;\r\n        public const uint TLChannelAdminLogEvent = 0x3b5a3e40;\r\n        public const uint TLAdminLogResults = 0xed8af74d;\r\n        public const uint TLChannelAdminLogEventsFilter = 0xea107ae4;\r\n\r\n        // layer 69\r\n        public const uint TLImportedContacts69 = 0x77d01c3b;\r\n        public const uint TLPopularContact = 0x5ce14175;\r\n\r\n        // layer 70\r\n        public const uint TLInputMediaUploadedPhoto70 = 0x2f37e231;\r\n        public const uint TLInputMediaPhoto70 = 0x81fa373a;\r\n        public const uint TLInputMediaUploadedDocument70 = 0xe39621fd;\r\n        public const uint TLInputMediaDocument70 = 0x5acb668e;\r\n        public const uint TLInputMediaPhotoExternal70 = 0x922aec1;\r\n        public const uint TLInputMediaDocumentExternal70 = 0xb6f74335;\r\n        public const uint TLMessage70 = 0x90dddc11;\r\n        public const uint TLMessageMediaPhoto70 = 0xb5223b0f;\r\n        public const uint TLMessageMediaDocument70 = 0x7c4414d3;\r\n        public const uint TLMessageActionScreenshotTaken = 0x4792929b;\r\n        public const uint TLFileCdnRedirect70 = 0xea52fe5a;\r\n        public const uint TLMessageFwdHeader70 = 0xfadff4ac;\r\n        public const uint TLCdnFileHash = 0x77eec38f;\r\n\r\n        // layer 71\r\n        public const uint TLChannelFull71 = 0x17f45fcf;\r\n        public const uint TLDialog71 = 0xe4def5db;\r\n        public const uint TLContacts71 = 0xeae87e42;\r\n        public const uint TLInputMessagesFilterMyMentions = 0xc1f8e69a;\r\n        public const uint TLUpdateFavedStickers = 0xe511996d;\r\n        public const uint TLUpdateChannelReadMessagesContents = 0x89893b45;\r\n        public const uint TLUpdateContactsReset = 0x7084a7be;\r\n        public const uint TLConfig71 = 0x8df376a4;\r\n        public const uint TLChannelDifferenceTooLong71 = 0x6a9d7b35;\r\n        public const uint TLChannelAdminLogEventActionChangeStickerSet = 0xb1c3caa7;\r\n        public const uint TLFavedStickersNotModified = 0x9e8fa6d3;\r\n        public const uint TLFavedStickers = 0xf37f2f16;\r\n\r\n        // layer 72\r\n        public const uint TLInputMediaVenue72 = 0xc13d1c11;\r\n        public const uint TLInputMediaGeoLive = 0x7b1a118f;\r\n        public const uint TLChannelFull72 = 0x76af5481;\r\n        public const uint TLMessageMediaVenue72 = 0x2ec0533f;\r\n        public const uint TLMessageMediaGeoLive = 0x7c3c2609;\r\n        public const uint TLMessageActionCustomAction = 0xfae69f56;\r\n        public const uint TLInputMessagesFilterGeo = 0xe7026d0d;\r\n        public const uint TLInputMessagesFilterContacts = 0xe062db83;\r\n        public const uint TLUpdateChannelAvailableMessages = 0x70db6837;\r\n        public const uint TLConfig72 = 0x9c840964;\r\n        public const uint TLBotResults72 = 0x947ca848;\r\n        public const uint TLInputPaymentCredentialsApplePay = 0xaa1c39f;\r\n        public const uint TLInputPaymentCredentialsAndroidPay = 0x795667a6;\r\n        public const uint TLChannelAdminLogEventActionTogglePreHistoryHidden = 0x5f5c95f1;\r\n        public const uint TLRecentMeUrlUnknown = 0x46e1d13d;\r\n        public const uint TLRecentMeUrlUser = 0x8dbc3336;\r\n        public const uint TLRecentMeUrlChat = 0xa01b22f9;\r\n        public const uint TLRecentMeUrlChatInvite = 0xeb49081d;\r\n        public const uint TLRecentMeUrlStickerSet = 0xbc0a57dc;\r\n        public const uint TLRecentMeUrls = 0xe0310d7;\r\n        public const uint TLChannelParticipantsNotModified = 0xf0173fe9;\r\n\r\n        // layer 73\r\n        public const uint TLChannel73 = 0x450b7115;\r\n        public const uint TLMessage73 = 0x44f9b43d;\r\n        public const uint TLMessageFwdHeader73 = 0x559ebe6d;\r\n        public const uint TLInputSingleMedia = 0x5eaa7809;\r\n        public const uint TLInputMediaInvoice73 = 0xf4e096c3;\r\n        public const uint TLDecryptedMessage73 = 0x91cc4674;\r\n\r\n        // layer 74\r\n        public const uint TLContactsFound74 = 0xb3134d9d;\r\n        public const uint TLExportedMessageLink74 = 0x5dab1af4;\r\n        public const uint TLInputPaymentCredentialsAndroidPay74 = 0xca05d50e;\r\n\r\n        // layer 75\r\n        public const uint TLInputMediaUploadedPhoto75 = 0x1e287d04;\r\n        public const uint TLInputMediaPhoto75 = 0xb3ba0635;\r\n        public const uint TLInputMediaUploadedDocument75 = 0x5b38c6c1;\r\n        public const uint TLInputMediaDocument75 = 0x23ab23d2;\r\n        public const uint TLInputMediaPhotoExternal75 = 0xe5bbfe1a;\r\n        public const uint TLInputMediaDocumentExternal75 = 0xfb52dc99;\r\n        public const uint TLMessageMediaPhoto75 = 0x695150d7;\r\n        public const uint TLMessageMediaDocument75 = 0x9cb070d7;\r\n        public const uint TLInputBotInlineMessageMediaAuto75 = 0x3380c786;\r\n        public const uint TLBotInlineMessageMediaAuto75 = 0x764cf810;\r\n        public const uint TLInputSingleMedia75 = 0x31bc3d25;\r\n\r\n        // layer 76\r\n        public const uint TLChannel76 = 0xc88974ac;\r\n        public const uint TLDialogFeed = 0x36086d42;\r\n        public const uint TLUpdateDialogPinned76 = 0x19d27f3c;\r\n        public const uint TLUpdatePinnedDialogs76 = 0xea4cb65b;\r\n        public const uint TLUpdateReadFeed = 0x6fa68e41;\r\n        public const uint TLStickerSet76 = 0x5585a139;\r\n        public const uint TLRecentStickers76 = 0x22f3afb3;\r\n        public const uint TLFeedPosition = 0x5059dc73;\r\n        public const uint TLFeedMessagesNotModified = 0x4678d0cf;\r\n        public const uint TLFeedMessages = 0x55c3a1b1;\r\n        public const uint TLFeedBroadcasts = 0x4f4feaf1;\r\n        public const uint TLFeedBroadcastsUngrouped = 0x9a687cba;\r\n        public const uint TLFeedSourcesNotModified = 0x88b12a17;\r\n        public const uint TLFeedSources = 0x8e8bca3d;\r\n        public const uint TLInputDialogPeerFeed = 0x2c38b8cf;\r\n        public const uint TLInputDialogPeer = 0xfcaafeb7;\r\n        public const uint TLDialogPeerFeed = 0xda429411;\r\n        public const uint TLDialogPeer = 0xe56dbf05;\r\n        public const uint TLWebAuthorization = 0xcac943f2;\r\n        public const uint TLWebAuthorizations = 0xed56c9fc;\r\n        public const uint TLInputMessageId = 0xa676a322;\r\n        public const uint TLInputMessageReplyTo = 0xbad88395;\r\n        public const uint TLInputMessagePinned = 0x86872538;\r\n        public const uint TLInputSingleMedia76 = 0x1cc6e91f;\r\n        public const uint TLMessageEntityPhone = 0x9b69e34b;\r\n        public const uint TLMessageEntityCashtag = 0x4c4e743f;\r\n        public const uint TLMessageActionBotAllowed = 0xabe9affe;\r\n        public const uint TLConfig76 = 0x86b5778e;\r\n        public const uint TLFoundStickerSetsNotModified = 0xd54b65d;\r\n        public const uint TLFoundStickerSets = 0x5108d648;\r\n        public const uint TLFileHash = 0x6242c773;\r\n        public const uint TLFileCdnRedirect76 = 0xf18cda44;\r\n        public const uint TLInputBotInlineResult76 = 0x88bf9319;\r\n        public const uint TLBotInlineResult76 = 0x11965f3a;\r\n        public const uint TLWebDocumentNoProxy = 0xf9c8bcc6;\r\n\r\n        // layer 77\r\n        // layer 78\r\n        public const uint TLDCOption78 = 0x18b7a10d;\r\n        public const uint TLConfig78 = 0xeb7bb160;\r\n        public const uint TLInputClientProxy = 0x75588b3f;\r\n        public const uint TLProxyDataEmpty = 0xe09e1fb8;\r\n        public const uint TLProxyDataPromo = 0x2bf7ee23;\r\n\r\n        // layer 79\r\n        public const uint TLInputPeerNotifySettings78 = 0x9c3d198e;\r\n        public const uint TLPeerNotifySettings78 = 0xaf509d20;\r\n        public const uint TLStickers79 = 0xe4599bbd;\r\n        public const uint TLInputBotInlineMessageMediaVenue78 = 0x417bbf11;\r\n        public const uint TLBotInlineMessageMediaVenue78 = 0x8a86659c;\r\n\r\n        // layer 80\r\n        public const uint TLSentCode80 = 0x38faab5f;\r\n        public const uint TLTermsOfService80 = 0x780a0310;\r\n        public const uint TLTermsOfServiceUpdateEmpty = 0xe3309f7f;\r\n        public const uint TLTermsOfServiceUpdate = 0x28ecf961;\r\n\r\n        // layer 81\r\n        public const uint TLInputSecureFileLocation = 0xcbc7ee28;       \r\n        public const uint TLMessageActionSecureValuesSentMe = 0x1b287353;\r\n        public const uint TLMessageActionSecureValuesSent = 0xd95c6154;\r\n        public const uint TLNoPassword81 = 0x5ea182f6;\r\n        public const uint TLPassword81 = 0xca39b447;\r\n        public const uint TLPasswordSettings81 = 0x7bd9c3f1;\r\n        public const uint TLPasswordInputSettings81 = 0x21ffa60d;\r\n        public const uint TLInputSecureFileUploaded = 0x3334b0f0;\r\n        public const uint TLInputSecureFile = 0x5367e5be;\r\n        public const uint TLSecureFileEmpty = 0x64199744;\r\n        public const uint TLSecureFile = 0xe0277a62;\r\n        public const uint TLSecureData = 0x8aeabec3;\r\n        public const uint TLSecurePlainPhone = 0x7d6099dd;\r\n        public const uint TLSecurePlainEmail = 0x21ec5a5f;\r\n        public const uint TLSecureValueTypePersonalDetails = 0x9d2a81e3;\r\n        public const uint TLSecureValueTypePassport = 0x3dac6a00;\r\n        public const uint TLSecureValueTypeDriverLicense = 0x6e425c4;\r\n        public const uint TLSecureValueTypeIdentityCard = 0xa0d0744b;\r\n        public const uint TLSecureValueTypeInternalPassport = 0x99a48f23;\r\n        public const uint TLSecureValueTypeAddress = 0xcbe31e26;\r\n        public const uint TLSecureValueTypeUtilityBill = 0xfc36954e;\r\n        public const uint TLSecureValueTypeBankStatement = 0x89137c0d;\r\n        public const uint TLSecureValueTypeRentalAgreement = 0x8b883488;\r\n        public const uint TLSecureValueTypePassportRegistration = 0x99e3806a;\r\n        public const uint TLSecureValueTypeTemporaryRegistration = 0xea02ec33;\r\n        public const uint TLSecureValueTypePhone = 0xb320aadb;\r\n        public const uint TLSecureValueTypeEmail = 0x8e3ca7ee;\r\n        public const uint TLSecureValue = 0xb4b4b699;\r\n        public const uint TLInputSecureValue = 0x67872e8;\r\n        public const uint TLSecureValueHash = 0xed1ecdb0;\r\n        public const uint TLSecureValueErrorData = 0xe8a40bd9;\r\n        public const uint TLSecureValueErrorFrontSide = 0xbe3dfa;\r\n        public const uint TLSecureValueErrorReverseSide = 0x868a2aa5;\r\n        public const uint TLSecureValueErrorSelfie = 0xe537ced6;\r\n        public const uint TLSecureValueErrorFile = 0x7a700873;\r\n        public const uint TLSecureValueErrorFiles = 0x666220e9;\r\n        public const uint TLSecureCredentialsEncrypted = 0x33f0ea47;\r\n        public const uint TLAuthorizationForm = 0xcb976d53;\r\n        public const uint TLSentEmailCode = 0x811f854f;\r\n        public const uint TLDeepLinkInfoEmpty = 0x66afa166;\r\n        public const uint TLDeepLinkInfo = 0x6a4ee832;\r\n        public const uint TLSavedPhoneContact = 0x1142bd56;\r\n        public const uint TLTakeout = 0x4dba4501;\r\n\r\n        // layer 82\r\n        public const uint TLInputTakeoutFileLocation = 0x29be5899;\r\n        public const uint TLAppUpdate = 0x1da7158f;\r\n        public const uint TLNoAppUpdate = 0xc45a6536;\r\n        public const uint TLInvokeWithMessagesRange = 0x365275f2;\r\n        public const uint TLInputMediaContact82 = 0xf8ab7dfb;\r\n        public const uint TLMessageMediaContact82 = 0xcbf24940;\r\n        public const uint TLGeoPoint82 = 0x296f104;\r\n        public const uint TLDialogsNotModified = 0xf0e3e596;\r\n        public const uint TLUpdateDialogUnreadMark = 0xe16459c3;\r\n        public const uint TLConfig82 = 0x3213dbba;\r\n        public const uint TLInputBotInlineMessageMediaContact82 = 0xa6edbffd;\r\n        public const uint TLBotInlineMessageMediaContact82 = 0x18d1cdc2;\r\n        public const uint TLDraftMessageEmpty82 = 0x1b0c841a;\r\n        public const uint TLWebDocument82 = 0x1c570ed1;\r\n        public const uint TLInputWebFileGeoPointLocation = 0x9f2221c9;\r\n        public const uint TLInputReportReasonCopyright = 0x9b89f93a;\r\n        public const uint TLTopPeersDisabled = 0xb52c939d;\r\n\r\n        // layer 83\r\n        public const uint TLPassword83 = 0x68873ba5;\r\n        public const uint TLPasswordSettings83 = 0x9a5c33e5;\r\n        public const uint TLPasswordInputSettings83 = 0xc23727c9;\r\n        public const uint TLPasswordKdfAlgoUnknown = 0xd45ab096;\r\n        public const uint TLSecurePasswordKdfAlgoUnknown = 0x4a8537;\r\n        public const uint TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 = 0xbbf2dda0;\r\n        public const uint TLSecurePasswordKdfAlgoSHA512 = 0x86471d92;\r\n        public const uint TLSecureSecretSettings = 0x1527bcac;\r\n\r\n        // layer 84\r\n        public const uint TLPassword84 = 0xad2641f8;\r\n        public const uint TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow = 0x3a912d4a;\r\n        public const uint TLInputCheckPasswordEmpty = 0x9880f658;\r\n        public const uint TLInputCheckPasswordSRP = 0xd27ff082;\r\n\r\n        // layer 85\r\n        public const uint TLSecureValue85 = 0x187fa0ca;\r\n        public const uint TLInputSecureValue85 = 0xdb21d0a7;\r\n        public const uint TLSecureValueError = 0x869d758f;\r\n        public const uint TLSecureValueErrorTranslationFile = 0xa1144770;\r\n        public const uint TLSecureValueErrorTranslationFiles = 0x34636dd8;\r\n        public const uint TLAuthorizationForm85 = 0xad2e1cd8;\r\n        public const uint TLSecureRequiredType = 0x829d99da;\r\n        public const uint TLSecureRequiredTypeOneOf = 0x27477b4;\r\n        public const uint TLPassportConfigNotModified = 0xbfb9f457;\r\n        public const uint TLPassportConfig = 0xa098d6af;\r\n\r\n        //\r\n        public const uint TLConfigSimple = 0xd997c3c5;\r\n\r\n        // layer 45 encrypted\r\n        public const uint TLDecryptedMessage45 = 0x36b091de;\r\n        public const uint TLDecryptedMessageMediaPhoto45 = 0xf1fa8d78;\r\n        public const uint TLDecryptedMessageMediaVideo45 = 0x970c8c0e;\r\n        public const uint TLDecryptedMessageMediaDocument45 = 0x7afe8ae2;\r\n        public const uint TLDecryptedMessageMediaVenue = 0x8a0df56f;\r\n        public const uint TLDecryptedMessageMediaWebPage = 0xe50511d8;\r\n\r\n        // additional signatures\r\n        public const uint TLMessageActionChannelJoined = 0xffffff00;\r\n        public const uint TLUserExtendedInfo = 0xffffff01;\r\n        public const uint TLDialogSecret = 0xffffff02;\r\n        public const uint TLDecryptedMessageActionEmpty = 0xffffff03;\r\n        public const uint TLPeerEncryptedChat = 0xffffff04;\r\n        public const uint TLBroadcastChat = 0xffffff05;\r\n        public const uint TLPeerBroadcastChat = 0xffffff06;\r\n        public const uint TLBroadcastDialog = 0xffffff07;\r\n        public const uint TLInputPeerBroadcast = 0xffffff08;\r\n        public const uint TLServerFile = 0xffffff09;\r\n        public const uint TLMessageActionContactRegistered = 0xffffff0a;\r\n        public const uint TLPasscodeParams = 0xffffff0b;\r\n        public const uint TLRecentlyUsedSticker = 0xffffff0c;\r\n        public const uint TLActionInfo = 0xffffff0d;\r\n        public const uint TLResultInfo = 0xffffff0e;\r\n        public const uint TLEncryptedChat20 = 0xffffff0f;\r\n        public const uint TLEncryptedChat17 = 0xffffff10;\r\n        public const uint TLMessageActionUnreadMessages = 0xffffff11;\r\n        public const uint TLMessagesContainter = 0xffffff12;\r\n        public const uint TLHashtagItem = 0xffffff13;\r\n        public const uint TLMessageActionMessageGroup = 0xffffff14;\r\n        public const uint TLChatSettings = 0xffffff15;\r\n        public const uint TLDocumentExternal = 0xffffff16;\r\n        public const uint TLDecryptedMessagesContainter = 0xffffff17;\r\n        public const uint TLCameraSettings = 0xffffff18;\r\n        public const uint TLPhotoPickerSettings = 0xffffff19;\r\n        public const uint TLProxyConfig = 0xffffff1a;\r\n        public const uint TLCallsSecurity = 0xffffff1b;\r\n        public const uint TLStickerSetEmpty = 0xffffff1c;\r\n        public const uint TLMessagesGroup = 0xffffff1d;\r\n        public const uint TLMessageMediaGroup = 0xffffff1e;\r\n        public const uint TLDecryptedMessageMediaGroup = 0xffffff1f;\r\n        public const uint TLPeerFeed = 0xffffff20;\r\n        public const uint TLInputPeerFeed = 0xffffff21;\r\n        public const uint TLProxyConfig76 = 0xffffff22;\r\n        public const uint TLSocks5Proxy = 0xffffff23;\r\n        public const uint TLMTProtoProxy = 0xffffff24;\r\n        public const uint TLContactsSettings = 0xffffff25;\r\n        public const uint TLSecureFileUploaded = 0xffffff26;\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLState.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLState : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLState;\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public TLInt Qts { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt Seq { get; set; }\r\n\r\n        public TLInt UnreadCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Qts = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n            UnreadCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Pts = GetNullableObject<TLInt>(input);\r\n            Qts = GetNullableObject<TLInt>(input);\r\n            Date = GetNullableObject<TLInt>(input);\r\n            Seq = GetNullableObject<TLInt>(input);\r\n            UnreadCount = GetNullableObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Pts.NullableToStream(output);\r\n            Qts.NullableToStream(output);\r\n            Date.NullableToStream(output);\r\n            Seq.NullableToStream(output);\r\n            UnreadCount.NullableToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"p={0} q={1} s={2} u_c={3} d={4} [{5}]\", Pts, Qts, Seq, UnreadCount, Date, Date != null ? TLUtils.ToDateTime(Date) : DateTime.MinValue);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLStatedMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLStatedMessageBase : TLObject\r\n    {\r\n        public TLMessageBase Message { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public abstract TLStatedMessageBase GetEmptyObject();\r\n\r\n        public virtual TLInt GetSeq()\r\n        {\r\n            return null;\r\n        }\r\n    }\r\n\r\n    public interface ILinks\r\n    {\r\n        TLVector<TLLinkBase> Links { get; set; }\r\n    }\r\n\r\n    public class TLStatedMessage : TLStatedMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLStatedMessage;\r\n\r\n        public TLInt Seq { get; set; }\r\n\r\n        public override TLInt GetSeq()\r\n        {\r\n            return Seq;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLMessageBase>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLStatedMessageBase GetEmptyObject()\r\n        {\r\n            return new TLStatedMessage\r\n            {\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count),\r\n                Pts = Pts,\r\n                Seq = Seq\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLStatedMessage24 : TLStatedMessageBase, IMultiPts\r\n    {\r\n        public const uint Signature = TLConstructors.TLStatedMessage24;\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLMessageBase>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLStatedMessageBase GetEmptyObject()\r\n        {\r\n            return new TLStatedMessage24\r\n            {\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count),\r\n                Pts = Pts,\r\n                PtsCount = PtsCount\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLStatedMessageLink : TLStatedMessage, ILinks\r\n    {\r\n        public new const uint Signature = TLConstructors.TLStatedMessageLink;\r\n\r\n        public TLVector<TLLinkBase> Links { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLMessageBase>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            Links = GetObject<TLVector<TLLinkBase>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLStatedMessageBase GetEmptyObject()\r\n        {\r\n            return new TLStatedMessageLink\r\n            {\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count),\r\n                Links = new TLVector<TLLinkBase>(Links.Count),\r\n                Pts = Pts,\r\n                Seq = Seq\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLStatedMessageLink24 : TLStatedMessage24, ILinks\r\n    {\r\n        public new const uint Signature = TLConstructors.TLStatedMessageLink24;\r\n\r\n        public TLVector<TLLinkBase> Links { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLMessageBase>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            Links = GetObject<TLVector<TLLinkBase>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLStatedMessageBase GetEmptyObject()\r\n        {\r\n            return new TLStatedMessageLink24\r\n            {\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count),\r\n                Links = new TLVector<TLLinkBase>(Links.Count),\r\n                Pts = Pts,\r\n                PtsCount = PtsCount\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLStatedMessages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLStatedMessagesBase : TLObject\r\n    {\r\n        public TLVector<TLMessageBase> Messages { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public abstract TLStatedMessagesBase GetEmptyObject();\r\n\r\n        public virtual TLInt GetSeq()\r\n        {\r\n            return null;\r\n        }\r\n    }\r\n\r\n    public class TLStatedMessages : TLStatedMessagesBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLStatedMessages;\r\n\r\n        public TLInt Seq { get; set; }\r\n\r\n        public override TLInt GetSeq()\r\n        {\r\n            return Seq;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLStatedMessagesBase GetEmptyObject()\r\n        {\r\n            return new TLStatedMessages\r\n            {\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count),\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Pts = Pts,\r\n                Seq = Seq\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLStatedMessages24 : TLStatedMessagesBase, IMultiPts\r\n    {\r\n        public const uint Signature = TLConstructors.TLStatedMessages24;\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLStatedMessagesBase GetEmptyObject()\r\n        {\r\n            return new TLStatedMessages24\r\n            {\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count),\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Pts = Pts,\r\n                PtsCount = PtsCount\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLStatedMessagesLinks : TLStatedMessages, ILinks\r\n    {\r\n        public new const uint Signature = TLConstructors.TLStatedMessagesLinks;\r\n\r\n        public TLVector<TLLinkBase> Links { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            Links = GetObject<TLVector<TLLinkBase>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLStatedMessagesBase GetEmptyObject()\r\n        {\r\n            return new TLStatedMessagesLinks\r\n            {\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count),\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Links = new TLVector<TLLinkBase>(Links.Count),\r\n                Pts = Pts,\r\n                Seq = Seq\r\n            };\r\n        }\r\n    }\r\n\r\n    public class TLStatedMessagesLinks24 : TLStatedMessages24, ILinks\r\n    {\r\n        public new const uint Signature = TLConstructors.TLStatedMessagesLinks24;\r\n\r\n        public TLVector<TLLinkBase> Links { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = GetObject<TLVector<TLMessageBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            Links = GetObject<TLVector<TLLinkBase>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLStatedMessagesBase GetEmptyObject()\r\n        {\r\n            return new TLStatedMessagesLinks24\r\n            {\r\n                Chats = new TLVector<TLChatBase>(Chats.Count),\r\n                Users = new TLVector<TLUserBase>(Users.Count),\r\n                Messages = new TLVector<TLMessageBase>(Messages.Count),\r\n                Links = new TLVector<TLLinkBase>(Links.Count),\r\n                Pts = Pts,\r\n                PtsCount = PtsCount\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLStickerPack.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLStickerPack : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLStickerPack;\r\n\r\n        public TLString Emoticon { get; set; }\r\n\r\n        public TLVector<TLLong> Documents { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Emoticon = GetObject<TLString>(bytes, ref position);\r\n            Documents = GetObject<TLVector<TLLong>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Emoticon.ToBytes(),\r\n                Documents.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Emoticon = GetObject<TLString>(input);\r\n            Documents = GetObject<TLVector<TLLong>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Emoticon.ToStream(output);\r\n            Documents.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLStickerSet.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum StickerSetFlags\r\n    {\r\n        Installed = 0x1,\r\n        Disabled = 0x2,\r\n        Official = 0x4,\r\n        Masks = 0x8\r\n    }\r\n\r\n    public abstract class TLStickerSetBase : TLObject\r\n    {\r\n        public TLLong Id { get; set; }\r\n        public TLLong AccessHash { get; set; }\r\n        public TLString Title { get; set; }\r\n        public TLString ShortName { get; set; }\r\n\r\n        #region Additional\r\n        public TLVector<TLObject> Stickers { get; set; }\r\n        public bool Unread { get; set; }\r\n        public bool IsSelected { get; set; }\r\n        #endregion\r\n    }\r\n\r\n    public class TLStickerSet : TLStickerSetBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLStickerSet;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            ShortName = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Title.ToBytes(),\r\n                ShortName.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Title = GetObject<TLString>(input);\r\n            ShortName = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Title.ToStream(output);\r\n            ShortName.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLStickerSet76 : TLStickerSet32\r\n    {\r\n        public new const uint Signature = TLConstructors.TLStickerSet76;\r\n\r\n        protected TLInt _installedDate;\r\n\r\n        public TLInt InstalledDate\r\n        {\r\n            get { return _installedDate; }\r\n            set { SetField(out _installedDate, value, ref _flags, (int) StickerSetFlags.Installed); }\r\n        }\r\n\r\n        public int SortDate { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            InstalledDate = GetObject<TLInt>(Flags, (int) StickerSetFlags.Installed, null, bytes, ref position);\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            ShortName = GetObject<TLString>(bytes, ref position);\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Hash = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(InstalledDate, Flags, (int) StickerSetFlags.Installed),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Title.ToBytes(),\r\n                ShortName.ToBytes(),\r\n                Count.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            InstalledDate = GetObject<TLInt>(Flags, (int) StickerSetFlags.Installed, null, input);\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Title = GetObject<TLString>(input);\r\n            ShortName = GetObject<TLString>(input);\r\n            Count = GetObject<TLInt>(input);\r\n            Hash = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, InstalledDate, Flags, (int) StickerSetFlags.Installed);\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Title.ToStream(output);\r\n            ShortName.ToStream(output);\r\n            Count.ToStream(output);\r\n            Hash.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLStickerSet76 id={0} short_name={1} flags={2}\", Id, ShortName, StickerSetFlagsString(Flags));\r\n        }\r\n    }\r\n\r\n    public class TLStickerSet32 : TLStickerSet\r\n    {\r\n        public new const uint Signature = TLConstructors.TLStickerSet32;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public bool Installed\r\n        {\r\n            get { return IsSet(Flags, (int) StickerSetFlags.Installed); }\r\n            set { SetUnset(ref _flags, value, (int) StickerSetFlags.Installed); }\r\n        }\r\n\r\n        public bool Archived\r\n        {\r\n            get { return IsSet(Flags, (int)StickerSetFlags.Disabled); }\r\n            set { SetUnset(ref _flags, value, (int)StickerSetFlags.Disabled); }\r\n        }\r\n\r\n        public bool Official\r\n        {\r\n            get { return IsSet(Flags, (int)StickerSetFlags.Official); }\r\n            set { SetUnset(ref _flags, value, (int)StickerSetFlags.Official); }\r\n        }\r\n\r\n        public bool Masks\r\n        {\r\n            get { return IsSet(Flags, (int)StickerSetFlags.Masks); }\r\n            set { SetUnset(ref _flags, value, (int)StickerSetFlags.Masks); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            \r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            ShortName = GetObject<TLString>(bytes, ref position);\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Hash = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Title.ToBytes(),\r\n                ShortName.ToBytes(), \r\n                Count.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Title = GetObject<TLString>(input);\r\n            ShortName = GetObject<TLString>(input);\r\n            Count = GetObject<TLInt>(input);\r\n            Hash = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Title.ToStream(output);\r\n            ShortName.ToStream(output);\r\n            Count.ToStream(output);\r\n            Hash.ToStream(output);\r\n        }\r\n\r\n        public static string StickerSetFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (StickerSetFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLStickerSet32 id={0} short_name={1} flags={2}\", Id, ShortName, StickerSetFlagsString(Flags));\r\n        }\r\n    }\r\n\r\n    public class TLStickerSetEmpty : TLStickerSetBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLStickerSetEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLStickerSetCovered.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLStickerSetCoveredBase : TLObject\r\n    {\r\n        public TLStickerSetBase StickerSet { get; set; }\r\n    }\r\n    public class TLStickerSetCovered : TLStickerSetCoveredBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLStickerSetCovered;\r\n\r\n        public TLDocumentBase Cover { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            StickerSet = GetObject<TLStickerSetBase>(bytes, ref position);\r\n            Cover = GetObject<TLDocumentBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                StickerSet.ToBytes(),\r\n                Cover.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            StickerSet = GetObject<TLStickerSetBase>(input);\r\n            Cover = GetObject<TLDocumentBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            StickerSet.ToStream(output);\r\n            Cover.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLStickerSetMultiCovered : TLStickerSetCoveredBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLStickerSetMultiCovered;\r\n\r\n        public TLVector<TLDocumentBase> Covers { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            StickerSet = GetObject<TLStickerSetBase>(bytes, ref position);\r\n            Covers = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                StickerSet.ToBytes(),\r\n                Covers.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            StickerSet = GetObject<TLStickerSetBase>(input);\r\n            Covers = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            StickerSet.ToStream(output);\r\n            Covers.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLStickerSetInstallResult.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLStickerSetInstallResultBase : TLObject { }\r\n\r\n    public class TLStickerSetInstallResult : TLStickerSetInstallResultBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLStickerSetInstallResult;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLStickerSetInstallResult\";\r\n        }\r\n    }\r\n\r\n    public class TLStickerSetInstallResultArchive : TLStickerSetInstallResultBase, IStickers\r\n    {\r\n        public const uint Signature = TLConstructors.TLStickerSetInstallResultArchive;\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        public TLVector<TLStickerSetCoveredBase> SetsCovered { get; set; }\r\n\r\n        #region Additional\r\n\r\n        public TLVector<TLStickerSetBase> Sets\r\n        {\r\n            get\r\n            {\r\n                var sets = new TLVector<TLStickerSetBase>();\r\n                foreach (var setCovered in SetsCovered)\r\n                {\r\n                    sets.Add(setCovered.StickerSet);\r\n                }\r\n                return sets;\r\n            }\r\n            set\r\n            {\r\n                Execute.ShowDebugMessage(\"TLStickerSetInstallResultArchive.Sets set\");\r\n            }\r\n        }\r\n        public TLVector<TLStickerPack> Packs { get; set; }\r\n        public TLVector<TLDocumentBase> Documents { get; set; }\r\n        public TLVector<TLMessagesStickerSet> MessagesStickerSets { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            SetsCovered = GetObject<TLVector<TLStickerSetCoveredBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                SetsCovered.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            SetsCovered = GetObject<TLVector<TLStickerSetCoveredBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            SetsCovered.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLStickerSetInstallResultArchive sets=[{0}]\", string.Join(\", \", Sets.Select(x => x.Id)));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLStickers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLStickersBase : TLObject { }\r\n\r\n    public class TLStickersNotModified : TLStickersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLStickersNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLStickers79 : TLStickersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLStickers79;\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public TLVector<TLDocumentBase> Stickers { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLInt>(bytes, ref position);\r\n            Stickers = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes(),\r\n                Stickers.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hash = GetObject<TLInt>(input);\r\n            Stickers = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Hash.ToStream(output);\r\n            Stickers.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLStickers : TLStickersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLStickers;\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        public TLVector<TLDocumentBase> Stickers { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLString>(bytes, ref position);\r\n            Stickers = GetObject<TLVector<TLDocumentBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes(),\r\n                Stickers.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hash = GetObject<TLString>(input);\r\n            Stickers = GetObject<TLVector<TLDocumentBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Hash.ToStream(output);\r\n            Stickers.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLString.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Numerics;\r\nusing System.Runtime.Serialization;\r\nusing System.Text;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [DataContract]\r\n    public class TLString : TLObject\r\n    {\r\n        public TLString(){ }\r\n\r\n        public TLString(string s)\r\n        {\r\n            if (s == null) s = \"\";\r\n            var data = Encoding.UTF8.GetBytes(s);\r\n            //Length = data.Length;\r\n            Data = data;                  // NOTE: remove Reverse here\r\n        }\r\n\r\n        public static TLString Random(int count)\r\n        {\r\n            var random = new SecureRandom();\r\n            var randomBytes = new byte[count];\r\n            random.NextBytes(randomBytes);\r\n\r\n            return FromBigEndianData(randomBytes);\r\n        }\r\n\r\n        public static TLString Empty\r\n        {\r\n            get\r\n            {\r\n                return new TLString(\"\");\r\n            }\r\n        }\r\n\r\n        //little endian data with leading 0x00 padding\r\n        [DataMember]\r\n        public byte[] Data { get; set; }            // NOT: now its big endian with 0x0 padding at the end\r\n\r\n        public static TLString FromBigEndianData(byte[] data)\r\n        {\r\n            var str = new TLString();\r\n            str.Data = data;                        // NOTE: remove Reverse here\r\n            return str;\r\n        }\r\n\r\n        // UInt64 - little endian \r\n        public static TLString FromUInt64(UInt64 data)\r\n        {\r\n            var str = new TLString();\r\n\r\n            // revert to big endian and remove first zero bytes\r\n            var bigEndianBytes = RemoveFirstZeroBytes(BitConverter.GetBytes(data).Reverse().ToArray());\r\n\r\n            // revert to little endian again\r\n            str.Data = bigEndianBytes;              // NOTE: remove Reverse here\r\n\r\n            return str;\r\n        }\r\n\r\n        private static byte[] RemoveFirstZeroBytes(IList<byte> bytes)\r\n        {\r\n            var result = new List<byte>(bytes);\r\n\r\n            while (result.Count > 0 && result[0] == 0x00)\r\n            {\r\n                result.RemoveAt(0);\r\n            }\r\n\r\n            return result.ToArray();\r\n        }\r\n\r\n        public BigInteger ToBigInteger()\r\n        {\r\n            var data = new List<byte>(Data);\r\n            while (data[0] == 0x00)\r\n            {\r\n                data.RemoveAt(0);\r\n            }\r\n\r\n            return new BigInteger(Data.Reverse().Concat(new byte[] {0x00}).ToArray());  //NOTE: add reverse here\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            int bytesRead;\r\n            int length;\r\n            if (bytes[position] == 0xfe)\r\n            {\r\n                var lengthBytes = bytes.SubArray(position + 1, 3);\r\n                length = BitConverter.ToInt32(lengthBytes.Concat(new byte[] { 0x00 }).ToArray(), 0);\r\n                bytesRead = 4;\r\n            }\r\n            else\r\n            {\r\n                length = bytes[position];\r\n                bytesRead = 1;\r\n            }\r\n            Data = bytes.SubArray(position + bytesRead, length);            //NOTE: remove Reverse here\r\n\r\n            bytesRead += Data.Length;\r\n            var padding = (bytesRead % 4 == 0) ? 0 : (4 - (bytesRead % 4));\r\n            bytesRead += padding;\r\n            if (bytesRead % 4 != 0) throw new Exception(\"Length must be divisible on 4\");\r\n\r\n            position += bytesRead;\r\n\r\n            return this;\r\n        }\r\n\r\n        // length + big endian data + zero bytes\r\n        public override byte[] ToBytes()\r\n        {\r\n            var length = (Data.Length >= 254) ? 4 + Data.Length : 1 + Data.Length;\r\n            var padding = (length % 4 == 0)? 0 : (4 - (length % 4));\r\n            length = length + padding;\r\n            var bytes = new byte[length];\r\n\r\n            if (Data.Length >= 254)\r\n            {\r\n                bytes[0] = 0xFE;\r\n                var lengthBytes = BitConverter.GetBytes(Data.Length);\r\n                Array.Copy(lengthBytes, 0, bytes, 1, 3);\r\n                Array.Copy(Data, 0, bytes, 4, Data.Length);                         //NOTE: Remove Reverse here\r\n            }\r\n            else\r\n            {\r\n                bytes[0] = (byte)Data.Length;\r\n                Array.Copy(Data, 0, bytes, 1, Data.Length);                         //NOTE: Remove Reverse here\r\n            }          \r\n\r\n            return bytes;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            int bytesRead;\r\n            int length;\r\n            var bytes = new byte[1];\r\n            input.Read(bytes, 0, 1);\r\n            if (bytes[0] == 0xfe)\r\n            {\r\n                var lengthBytes = new byte[3];\r\n                input.Read(lengthBytes, 0, 3);\r\n                length = BitConverter.ToInt32(lengthBytes.Concat(new byte[] { 0x00 }).ToArray(), 0);\r\n                bytesRead = 4;\r\n            }\r\n            else\r\n            {\r\n                length = bytes[0];\r\n                bytesRead = 1;\r\n            }\r\n            Data = new byte[length];\r\n            input.Read(Data, 0, Data.Length);\r\n            //    bytes.SubArray(position + bytesRead, length);            //NOTE: remove Reverse here\r\n\r\n            bytesRead += Data.Length;\r\n            var padding = (bytesRead % 4 == 0) ? 0 : (4 - (bytesRead % 4));\r\n            bytesRead += padding;\r\n            if (bytesRead % 4 != 0) throw new Exception(\"Length must be divisible on 4\");\r\n\r\n            input.Position += padding;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            var buffer = ToBytes();\r\n            output.Write(buffer, 0, buffer.Length);\r\n        }\r\n\r\n        private WeakReference<string> _str;\r\n\r\n        public override string ToString()\r\n        {\r\n#if SILVERLIGHT || WIN_RT\r\n            string str;\r\n            if (_str != null && _str.TryGetTarget(out str)) return str;\r\n\r\n            str = Data == null ? string.Empty : Encoding.UTF8.GetString(Data, 0, Data.Length);\r\n            _str = new WeakReference<string>(str);\r\n\r\n            return str;\r\n#else\r\n            string str;\r\n            if (_str != null && _str.TryGetTarget(out str)) return str;\r\n\r\n            str = Data == null? string.Empty : Encoding.UTF8.GetString(Data);\r\n            _str = new WeakReference<string>(str);\r\n\r\n            return str;\r\n#endif\r\n        }\r\n\r\n        public string Value\r\n        {\r\n            get { return ToString(); }\r\n        }\r\n\r\n        public static bool IsNullOrEmpty(TLString str)\r\n        {\r\n            return str == null || string.IsNullOrEmpty(str.ToString());\r\n        }\r\n\r\n        public static bool Equals(TLString str1, TLString str2, StringComparison comparison)\r\n        {\r\n            if (str1 == null && str2 == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (str1 != null && str2 == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (str1 == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            return string.Equals(str1.ToString(), str2.ToString(), comparison);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLSupport.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLSupport : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLSupport;\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLUserBase User { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhoneNumber = GetObject<TLString>(bytes, ref position);\r\n            User = GetObject<TLUserBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLTermsOfService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum TermsOfServiceFlags\r\n    {\r\n        Popup = 0x1,\r\n        MinAgeConfirm = 0x2\r\n    }\r\n\r\n    public abstract class TLTermsOfServiceBase : TLObject { }\r\n\r\n    public class TLTermsOfService80 : TLTermsOfService\r\n    {\r\n        public new const uint Signature = TLConstructors.TLTermsOfService80;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Popup\r\n        {\r\n            get { return IsSet(_flags, (int)TermsOfServiceFlags.Popup); }\r\n            set { SetUnset(ref _flags, value, (int)TermsOfServiceFlags.Popup); }\r\n        }\r\n\r\n        public TLDataJSON Id { get; set; }\r\n\r\n        public TLVector<TLMessageEntityBase> Entities { get; set; }\r\n\r\n        public bool MinAgeConfirm\r\n        {\r\n            get { return IsSet(_flags, (int)TermsOfServiceFlags.MinAgeConfirm); }\r\n            set { SetUnset(ref _flags, value, (int)TermsOfServiceFlags.MinAgeConfirm); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            _flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLDataJSON>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLTermsOfService : TLTermsOfServiceBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTermsOfService;\r\n\r\n        public TLString Text { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLTmpPassword.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLTmpPassword : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLTmpPassword;\r\n\r\n        public TLString TmpPassword { get; set; }\r\n\r\n        public TLInt ValidUntil { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            TmpPassword = GetObject<TLString>(bytes, ref position);\r\n            ValidUntil = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            TmpPassword = GetObject<TLString>(input);\r\n            ValidUntil = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            TmpPassword.ToStream(output);\r\n            ValidUntil.ToStream(output);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLTopPeer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLTopPeer : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLTopPeer;\r\n\r\n        public TLPeerBase Peer { get; set; }\r\n\r\n        public TLDouble Rating { get; set; }\r\n\r\n        public TLObject Object { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            Rating = GetObject<TLDouble>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Rating.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            Rating = GetObject<TLDouble>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Peer.ToStream(output);\r\n            Rating.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLTopPeerCategory.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLTopPeerCategoryBase : TLObject { }\r\n\r\n    public class TLTopPeerCategoryBotsPM : TLTopPeerCategoryBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTopPeerCategoryBotsPM;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLTopPeerCategoryBotsInline : TLTopPeerCategoryBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTopPeerCategoryBotsInline;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLTopPeerCategoryCorrespondents : TLTopPeerCategoryBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTopPeerCategoryCorrespondents;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLTopPeerCategoryGroups : TLTopPeerCategoryBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTopPeerCategoryGroups;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLTopPeerCategoryChannels : TLTopPeerCategoryBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTopPeerCategoryChannels;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLTopPeerCategoryPhoneCalls : TLTopPeerCategoryBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTopPeerCategoryPhoneCalls;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLTopPeerCategoryPeers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLTopPeerCategoryPeers : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLTopPeerCategoryPeers;\r\n\r\n        public TLTopPeerCategoryBase Category { get; set; }\r\n\r\n        public TLInt Count { get; set; }\r\n\r\n        public TLVector<TLTopPeer> Peers { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Category = GetObject<TLTopPeerCategoryBase>(bytes, ref position);\r\n            Count = GetObject<TLInt>(bytes, ref position);\r\n            Peers = GetObject<TLVector<TLTopPeer>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Category.ToBytes(),\r\n                Count.ToBytes(),\r\n                Peers.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Category = GetObject<TLTopPeerCategoryBase>(input);\r\n            Count = GetObject<TLInt>(input);\r\n            Peers = GetObject<TLVector<TLTopPeer>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Category.ToStream(output);\r\n            Count.ToStream(output);\r\n            Peers.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLTopPeers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLTopPeersBase : TLObject { }\r\n\r\n    public class TLTopPeers : TLTopPeersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTopPeers;\r\n\r\n        public TLVector<TLTopPeerCategoryPeers> Categories { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Categories = GetObject<TLVector<TLTopPeerCategoryPeers>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Categories.ToBytes(),\r\n                Chats.ToBytes(),\r\n                Users.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Categories = GetObject<TLVector<TLTopPeerCategoryPeers>>(input);\r\n            Chats = GetObject<TLVector<TLChatBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Categories.ToStream(output);\r\n            Chats.ToStream(output);\r\n            Users.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLTopPeersNotModified : TLTopPeersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTopPeersNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLTopPeersDisabled : TLTopPeersBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTopPeersDisabled;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLUpdate.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum UpdateFlags\r\n    {\r\n        Geo = 0x1,          // 0\r\n        MessageId = 0x2,    // 1 \r\n    }\r\n\r\n    [Flags]\r\n    public enum UpdateServiceNotificationFlags\r\n    {\r\n        Popup = 0x1,        // 0\r\n        InboxDate = 0x2,    // 1 \r\n    }\r\n\r\n    [Flags]\r\n    public enum UpdateDilogPinnedFlags\r\n    {\r\n        Pinned = 0x1,       // 0\r\n    }\r\n\r\n    [Flags]\r\n    public enum UpdatePinnedDialogsFlags\r\n    {\r\n        Order = 0x1,        // 0\r\n    }\r\n\r\n    [Flags]\r\n    public enum UpdateBotPrecheckoutQueryFlags\r\n    {\r\n        Info = 0x1,                 // 0\r\n        ShippingOptionId = 0x2,     // 1\r\n    }\r\n\r\n    [Flags]\r\n    public enum UpdateReadFeedFlags\r\n    {\r\n        UnreadCount = 0x1,          // 0\r\n    }\r\n\r\n    [Flags]\r\n    public enum UpdateDialogUnreadMarkFlags\r\n    {\r\n        Unread = 0x1,               // 0\r\n    }\r\n\r\n    public abstract class TLUpdateBase : TLObject\r\n    {\r\n        public abstract IList<TLInt> GetPts();\r\n    }\r\n\r\n    public interface IMultiPts\r\n    {\r\n        TLInt Pts { get; set; }\r\n\r\n        TLInt PtsCount { get; set; }\r\n    }\r\n\r\n    public interface IMultiChannelPts\r\n    {\r\n        TLInt ChannelPts { get; set; }\r\n\r\n        TLInt ChannelPtsCount { get; set; }\r\n    }\r\n\r\n    public class TLUpdateNewMessage : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateNewMessage;\r\n\r\n        public TLMessageBase Message { get; set; }\r\n        public TLInt Pts { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLMessageBase>(bytes, ref position);\r\n\r\n            var messageCommon = Message as TLMessageCommon;\r\n            if (messageCommon != null) messageCommon.SetUnreadSilent(TLBool.True);\r\n\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Message.ToStream(output);\r\n            Pts.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Message = GetObject<TLMessageBase>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt> { Pts };\r\n        }\r\n    }\r\n\r\n    public class TLUpdateNewMessage24 : TLUpdateNewMessage, IMultiPts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateNewMessage24;\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLMessageBase>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            var messageCommon = Message as TLMessageCommon;\r\n            if (messageCommon != null) messageCommon.SetUnreadSilent(TLBool.True);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Message.ToStream(output);\r\n            Pts.ToStream(output);\r\n            PtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Message = GetObject<TLMessageBase>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            PtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChatParticipantAdd37 : TLUpdateChatParticipantAdd\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateChatParticipantAdd37;\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            InviterId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChatId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            InviterId.ToStream(output);\r\n            Date.ToStream(output);\r\n            Version.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            InviterId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChatParticipantAdd : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChatParticipantAdd;\r\n\r\n        public TLInt ChatId { get; set; }\r\n        public TLInt UserId { get; set; }\r\n        public TLInt InviterId { get; set; }\r\n        public TLInt Version { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            InviterId = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChatId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            InviterId.ToStream(output);\r\n            Version.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            InviterId = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChatParticipantDelete : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChatParticipantDelete;\r\n\r\n        public TLInt ChatId { get; set; }\r\n        public TLInt UserId { get; set; }\r\n        public TLInt Version { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChatId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Version.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Version = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateNewEncryptedMessage : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateNewEncryptedMessage;\r\n\r\n        public TLEncryptedMessageBase Message { get; set; }\r\n        public TLInt Qts { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLEncryptedMessageBase>(bytes, ref position);\r\n            Qts = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Message.ToStream(output);\r\n            Qts.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Message = GetObject<TLEncryptedMessageBase>(input);\r\n            Qts = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateEncryption : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateEncryption;\r\n\r\n        public TLEncryptedChatBase Chat { get; set; }\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Chat = GetObject<TLEncryptedChatBase>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Chat.ToStream(output);\r\n            Date.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Chat = GetObject<TLEncryptedChatBase>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateMessageId : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateMessageId;\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLLong RandomId { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLUpdateMessageId id={0} random_id={1}\", Id, RandomId);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            RandomId = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            RandomId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            RandomId = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateReadMessages : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateReadMessages;\r\n\r\n        public TLVector<TLInt> Messages { get; set; }\r\n        public TLInt Pts { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Messages.ToStream(output);\r\n            Pts.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Messages = GetObject<TLVector<TLInt>>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt> { Pts };\r\n        }\r\n    }\r\n\r\n    public class TLUpdateReadMessages24 : TLUpdateReadMessages, IMultiPts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateReadMessages24;\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Messages.ToStream(output);\r\n            Pts.ToStream(output);\r\n            PtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Messages = GetObject<TLVector<TLInt>>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            PtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n    }\r\n\r\n    public class TLUpdateReadMessagesContents : TLUpdateReadMessages, IMultiPts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateReadMessagesContents;\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Messages.ToStream(output);\r\n            Pts.ToStream(output);\r\n            PtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Messages = GetObject<TLVector<TLInt>>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            PtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n    }\r\n\r\n    public abstract class TLUpdateReadHistory : TLUpdateBase, IMultiPts\r\n    {\r\n        public TLPeerBase Peer { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public TLInt PtsCount { get; set; }\r\n    }\r\n\r\n    public class TLUpdateReadHistoryInbox : TLUpdateReadHistory\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateReadHistoryInbox;\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLUpdateReadHistoryInbox peer={0} max_id={1} pts={2} pts_count={3}\", Peer, MaxId, Pts, PtsCount);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            MaxId = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Peer.ToStream(output);\r\n            MaxId.ToStream(output);\r\n            Pts.ToStream(output);\r\n            PtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            MaxId = GetObject<TLInt>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            PtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n    }\r\n\r\n    public class TLUpdateReadHistoryOutbox : TLUpdateReadHistory\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateReadHistoryOutbox;\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLUpdateReadHistoryOutbox peer={0} max_id={1} pts={2} pts_count={3}\", Peer, MaxId, Pts, PtsCount);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            MaxId = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Peer.ToStream(output);\r\n            MaxId.ToStream(output);\r\n            Pts.ToStream(output);\r\n            PtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            MaxId = GetObject<TLInt>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            PtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n    }\r\n\r\n    public class TLUpdateEncryptedMessagesRead : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateEncryptedMessagesRead;\r\n\r\n        public TLInt ChatId { get; set; }\r\n        public TLInt MaxDate { get; set; }\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            MaxDate = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChatId.ToStream(output);\r\n            MaxDate.ToStream(output);\r\n            Date.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            MaxDate = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} ChatId={1} MaxDate={2} Date={3}\", GetType().Name, ChatId, MaxDate, Date);\r\n        }\r\n    }\r\n\r\n    public class TLUpdateDeleteMessages : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateDeleteMessages;\r\n\r\n        public TLVector<TLInt> Messages { get; set; }\r\n        public TLInt Pts { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Messages.ToStream(output);\r\n            Pts.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Messages = GetObject<TLVector<TLInt>>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt> { Pts };\r\n        }\r\n    }\r\n\r\n    public class TLUpdateDeleteMessages24 : TLUpdateDeleteMessages, IMultiPts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateDeleteMessages24;\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Messages.ToStream(output);\r\n            Pts.ToStream(output);\r\n            PtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Messages = GetObject<TLVector<TLInt>>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            PtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n    }\r\n\r\n    public class TLUpdateRestoreMessages : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateRestoreMessages;\r\n\r\n        public TLVector<TLInt> Messages { get; set; }\r\n        public TLInt Pts { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Messages = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Messages.ToStream(output);\r\n            Pts.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Messages = GetObject<TLVector<TLInt>>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt> { Pts };\r\n        }\r\n    }\r\n\r\n    public interface IUserTypingAction\r\n    {\r\n        TLSendMessageActionBase Action { get; set; }\r\n    }\r\n\r\n    public abstract class TLUpdateTypingBase : TLUpdateBase\r\n    {\r\n        public TLInt UserId { get; set; }\r\n    }\r\n\r\n    public class TLUpdateUserTyping : TLUpdateTypingBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateUserTyping;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateUserTyping17 : TLUpdateUserTyping, IUserTypingAction\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateUserTyping17;\r\n\r\n        public TLSendMessageActionBase Action { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Action = GetObject<TLSendMessageActionBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n            Action.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            Action = GetObject<TLSendMessageActionBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n\r\n    public class TLUpdateChatUserTyping : TLUpdateTypingBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChatUserTyping;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChatId.ToStream(output);\r\n            UserId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChatUserTyping17 : TLUpdateChatUserTyping, IUserTypingAction\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateChatUserTyping17;\r\n\r\n        public TLSendMessageActionBase Action { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Action = GetObject<TLSendMessageActionBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChatId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Action.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Action = GetObject<TLSendMessageActionBase>(input);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLUpdateEncryptedChatTyping : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateEncryptedChatTyping;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChatId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChatParticipants : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChatParticipants;\r\n\r\n        public TLChatParticipantsBase Participants { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Participants = GetObject<TLChatParticipantsBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Participants.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Participants = GetObject<TLChatParticipantsBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateUserStatus : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateUserStatus;\r\n\r\n        public TLInt UserId { get; set; }\r\n        public TLUserStatus Status { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Status = GetObject<TLUserStatus>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n            Status.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            Status = GetObject<TLUserStatus>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateUserName : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateUserName;\r\n\r\n        public TLInt UserId { get; set; }\r\n        public TLString FirstName { get; set; }\r\n        public TLString LastName { get; set; }\r\n        public TLString UserName { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            FirstName = GetObject<TLString>(bytes, ref position);\r\n            LastName = GetObject<TLString>(bytes, ref position);\r\n            UserName = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n            FirstName.ToStream(output);\r\n            LastName.ToStream(output);\r\n            UserName.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            FirstName = GetObject<TLString>(input);\r\n            LastName = GetObject<TLString>(input);\r\n            UserName = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateUserPhoto : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateUserPhoto;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLPhotoBase Photo { get; set; }\r\n\r\n        public TLBool Previous { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            Previous = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n            Date.ToStream(output);\r\n            Photo.ToStream(output);\r\n            Previous.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Photo = GetObject<TLPhotoBase>(input);\r\n            Previous = GetObject<TLBool>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateContactRegistered : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateContactRegistered;\r\n\r\n        public TLInt UserId { get; set; }\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n            Date.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public abstract class TLUpdateContactLinkBase : TLUpdateBase\r\n    {\r\n        public TLInt UserId { get; set; }\r\n    }\r\n\r\n    public class TLUpdateContactLink : TLUpdateContactLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateContactLink;\r\n\r\n        public TLMyLinkBase MyLink { get; set; }\r\n        public TLForeignLinkBase ForeignLink { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            MyLink = GetObject<TLMyLinkBase>(bytes, ref position);\r\n            ForeignLink = GetObject<TLForeignLinkBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n            MyLink.ToStream(output);\r\n            ForeignLink.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            MyLink = GetObject<TLMyLinkBase>(input);\r\n            ForeignLink = GetObject<TLForeignLinkBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateContactLink24 : TLUpdateContactLinkBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateContactLink24;\r\n\r\n        public TLContactLinkBase MyLink { get; set; }\r\n        public TLContactLinkBase ForeignLink { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLUpdateContactLink24 user_id={0} my_link={1} foreign_link={2}\", UserId, MyLink, ForeignLink);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            MyLink = GetObject<TLContactLinkBase>(bytes, ref position);\r\n            ForeignLink = GetObject<TLContactLinkBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n            MyLink.ToStream(output);\r\n            ForeignLink.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            MyLink = GetObject<TLContactLinkBase>(input);\r\n            ForeignLink = GetObject<TLContactLinkBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateActivation : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateActivation;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateNewAuthorization : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateNewAuthorization;\r\n\r\n        public TLLong AuthKeyId { get; set; }\r\n        public TLInt Date { get; set; }\r\n        public TLString Device { get; set; }\r\n        public TLString Location { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            AuthKeyId = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Device = GetObject<TLString>(bytes, ref position);\r\n            Location = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            AuthKeyId.ToStream(output);\r\n            Date.ToStream(output);\r\n            Device.ToStream(output);\r\n            Location.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            AuthKeyId = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Device = GetObject<TLString>(input);\r\n            Location = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateDCOptions : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateDCOptions;\r\n\r\n        public TLVector<TLDCOption> DCOptions { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            DCOptions.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            DCOptions = GetObject<TLVector<TLDCOption>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateNotifySettings : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateNotifySettings;\r\n\r\n        public TLNotifyPeerBase Peer { get; set; }\r\n\r\n        public TLPeerNotifySettingsBase NotifySettings { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLNotifyPeerBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Peer.ToStream(output);\r\n            NotifySettings.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLNotifyPeerBase>(input);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateUserBlocked : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateUserBlocked;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLBool Blocked { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Blocked = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n            Blocked.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            Blocked = GetObject<TLBool>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdatePrivacy : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdatePrivacy;\r\n\r\n        public TLPrivacyKeyBase Key { get; set; }\r\n\r\n        public TLVector<TLPrivacyRuleBase> Rules { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Key = GetObject<TLPrivacyKeyBase>(bytes, ref position);\r\n            Rules = GetObject<TLVector<TLPrivacyRuleBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Key.ToStream(output);\r\n            Rules.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Key = GetObject<TLPrivacyKeyBase>(input);\r\n            Rules = GetObject<TLVector<TLPrivacyRuleBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateUserPhone : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateUserPhone;\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLString Phone { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Phone = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n            Phone.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            Phone = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateServiceNotification : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateServiceNotification;\r\n\r\n        public TLString Type { get; set; }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public TLMessageMediaBase Media { get; set; }\r\n\r\n        public virtual TLBool Popup { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLString>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n            Popup = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Type.ToStream(output);\r\n            Message.ToStream(output);\r\n            Media.ToStream(output);\r\n            Popup.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Type = GetObject<TLString>(input);\r\n            Message = GetObject<TLString>(input);\r\n            Media = GetObject<TLMessageMediaBase>(input);\r\n            Popup = GetObject<TLBool>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateServiceNotification59 : TLUpdateServiceNotification\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateServiceNotification59;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLBool Popup\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)UpdateServiceNotificationFlags.Popup)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)UpdateServiceNotificationFlags.Popup);\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLInt InboxDate { get; set; }\r\n\r\n        public TLVector<TLMessageEntityBase> Entities { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            InboxDate = GetObject<TLInt>(Flags, (int)UpdateServiceNotificationFlags.InboxDate, null, bytes, ref position);\r\n            Type = GetObject<TLString>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, InboxDate, Flags, (int)UpdateServiceNotificationFlags.InboxDate);\r\n            Type.ToStream(output);\r\n            Message.ToStream(output);\r\n            Media.ToStream(output);\r\n            Entities.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            InboxDate = GetObject<TLInt>(Flags, (int)UpdateServiceNotificationFlags.InboxDate, null, input);\r\n            Type = GetObject<TLString>(input);\r\n            Message = GetObject<TLString>(input);\r\n            Media = GetObject<TLMessageMediaBase>(input);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateWebPage37 : TLUpdateWebPage, IMultiPts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateWebPage37;\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            WebPage = GetObject<TLWebPageBase>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            WebPage.ToStream(output);\r\n            Pts.ToStream(output);\r\n            PtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            WebPage = GetObject<TLWebPageBase>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            PtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n    }\r\n\r\n    public class TLUpdateWebPage : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateWebPage;\r\n\r\n        public TLWebPageBase WebPage { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            WebPage = GetObject<TLWebPageBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            WebPage.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            WebPage = GetObject<TLWebPageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    [Flags]\r\n    public enum UpdateChannelTooLongFlags\r\n    {\r\n        ChannelPts = 0x1\r\n    }\r\n\r\n    public class TLUpdateChannelTooLong49 : TLUpdateChannelTooLong\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateChannelTooLong49;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLInt ChannelPts { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLUpdateChannelTooLong49 channel_id={0} channel_pts={1} flags={2}\", ChannelId, ChannelPts, Flags);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            ChannelPts = GetObject<TLInt>(Flags, (int)UpdateChannelTooLongFlags.ChannelPts, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ChannelId.ToStream(output);\r\n            ToStream(output, ChannelPts, Flags, (int)UpdateChannelTooLongFlags.ChannelPts);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            ChannelId = GetObject<TLInt>(input);\r\n            ChannelPts = GetObject<TLInt>(Flags, (int)UpdateChannelTooLongFlags.ChannelPts, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChannelTooLong : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChannelTooLong;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLUpdateChannelTooLong channel_id=\" + ChannelId;\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChannelGroup : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChannelGroup;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public TLMessageGroup Group { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            Group = GetObject<TLMessageGroup>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n            Group.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n            Group = GetObject<TLMessageGroup>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateNewChannelMessage : TLUpdateBase, IMultiChannelPts\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateNewChannelMessage;\r\n\r\n        public TLMessageBase Message { get; set; }\r\n\r\n        public TLInt ChannelPts { get; set; }\r\n\r\n        public TLInt ChannelPtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLMessageBase>(bytes, ref position);\r\n\r\n            var messageCommon = Message as TLMessageCommon;\r\n            if (messageCommon != null) messageCommon.SetUnreadSilent(TLBool.True);\r\n\r\n            ChannelPts = GetObject<TLInt>(bytes, ref position);\r\n            ChannelPtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Message.ToStream(output);\r\n            ChannelPts.ToStream(output);\r\n            ChannelPtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Message = GetObject<TLMessageBase>(input);\r\n            ChannelPts = GetObject<TLInt>(input);\r\n            ChannelPtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var toId = Message is TLMessageCommon ? ((TLMessageCommon) Message).ToId : null;\r\n            return string.Format(\"{0} message_id={1} channel=[{2}]\", GetType(), Message.Index, toId);\r\n        }\r\n    }\r\n\r\n    public class TLUpdateReadChannelInbox : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateReadChannelInbox;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            MaxId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n            MaxId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n            MaxId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateDeleteChannelMessages : TLUpdateBase, IMultiChannelPts\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateDeleteChannelMessages;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public TLVector<TLInt> Messages { get; set; }\r\n\r\n        public TLInt ChannelPts { get; set; }\r\n\r\n        public TLInt ChannelPtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            Messages = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n            ChannelPts = GetObject<TLInt>(bytes, ref position);\r\n            ChannelPtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n            Messages.ToStream(output);\r\n            ChannelPts.ToStream(output);\r\n            ChannelPtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n            Messages = GetObject<TLVector<TLInt>>(input);\r\n            ChannelPts = GetObject<TLInt>(input);\r\n            ChannelPtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChannelMessageViews : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChannelMessageViews;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLInt Views { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Views = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n            Id.ToStream(output);\r\n            Views.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            Views = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChannel : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChannel;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLUpdateChannel channel_id=\" + ChannelId;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChatAdmins : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChatAdmins;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public TLBool Enabled { get; set; }\r\n\r\n        public TLInt Version { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            Enabled = GetObject<TLBool>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChatId.ToStream(output);\r\n            Enabled.ToStream(output);\r\n            Version.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            Enabled = GetObject<TLBool>(input);\r\n            Version = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChatParticipantAdmin : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChatParticipantAdmin;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLBool IsAdmin { get; set; }\r\n\r\n        public TLInt Version { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            IsAdmin = GetObject<TLBool>(bytes, ref position);\r\n            Version = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChatId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            IsAdmin.ToStream(output);\r\n            Version.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChatId = GetObject<TLInt>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            IsAdmin = GetObject<TLBool>(input);\r\n            Version = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateNewStickerSet : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateNewStickerSet;\r\n\r\n        public TLMessagesStickerSet Stickerset { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Stickerset = GetObject<TLMessagesStickerSet>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Stickerset.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Stickerset = GetObject<TLMessagesStickerSet>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    [Flags]\r\n    public enum UpdateStickerSetsOrderFlags\r\n    {\r\n        Masks = 0x1\r\n    }\r\n\r\n    public class TLUpdateStickerSetsOrder56 : TLUpdateStickerSetsOrder\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateStickerSetsOrder56;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public bool Masks { get { return IsSet(Flags, (int)UpdateStickerSetsOrderFlags.Masks); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Order = GetObject<TLVector<TLLong>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Order.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Order = GetObject<TLVector<TLLong>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateStickerSetsOrder : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateStickerSetsOrder;\r\n\r\n        public TLVector<TLLong> Order { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Order = GetObject<TLVector<TLLong>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Order.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Order = GetObject<TLVector<TLLong>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateStickerSets : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateStickerSets;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateSavedGifs : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateSavedGifs;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateBotInlineQuery : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateBotInlineQuery;\r\n\r\n        public TLLong QueryId { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLString Query { get; set; }\r\n\r\n        public TLString Offset { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Query = GetObject<TLString>(bytes, ref position);\r\n            Offset = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            QueryId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Query.ToStream(output);\r\n            Offset.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            QueryId = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Query = GetObject<TLString>(input);\r\n            Offset = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateBotInlineQuery51 : TLUpdateBotInlineQuery\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateBotInlineQuery51;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLGeoPointBase Geo { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Query = GetObject<TLString>(bytes, ref position);\r\n            Geo = GetObject<TLGeoPointBase>(Flags, (int)UpdateFlags.Geo, null, bytes, ref position);\r\n            Offset = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            QueryId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Query.ToStream(output);\r\n            ToStream(output, Geo, Flags, (int)UpdateFlags.Geo);\r\n            Offset.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            QueryId = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Query = GetObject<TLString>(input);\r\n            Geo = GetObject<TLGeoPointBase>(Flags, (int)UpdateFlags.Geo, null, input);\r\n            Offset = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateBotInlineSend : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateBotInlineSend;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLString Query { get; set; }\r\n\r\n        public TLGeoPointBase Geo { get; set; }\r\n\r\n        public TLString Id { get; set; }\r\n\r\n        public TLInputBotInlineMessageId MessageId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Query = GetObject<TLString>(bytes, ref position);\r\n            Geo = GetObject<TLGeoPointBase>(Flags, (int)UpdateFlags.Geo, null, bytes, ref position);\r\n            Id = GetObject<TLString>(bytes, ref position);\r\n            MessageId = GetObject<TLInputBotInlineMessageId>(Flags, (int)UpdateFlags.MessageId, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            UserId.ToStream(output);\r\n            Query.ToStream(output);\r\n            ToStream(output, Geo, Flags, (int)UpdateFlags.Geo);\r\n            Id.ToStream(output);\r\n            ToStream(output, MessageId, Flags, (int)UpdateFlags.MessageId);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            UserId = GetObject<TLInt>(input);\r\n            Query = GetObject<TLString>(input);\r\n            Geo = GetObject<TLGeoPointBase>(Flags, (int)UpdateFlags.Geo, null, input);\r\n            Id = GetObject<TLString>(input);\r\n            MessageId = GetObject<TLInputBotInlineMessageId>(Flags, (int)UpdateFlags.MessageId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateEditChannelMessage : TLUpdateBase, IMultiChannelPts\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateEditChannelMessage;\r\n\r\n        public TLMessageBase Message { get; set; }\r\n\r\n        public TLInt ChannelPts { get; set; }\r\n\r\n        public TLInt ChannelPtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            //Execute.ShowDebugMessage(string.Format(\"TLUpdateEditChannelMessage.FromBytes channel_pts={0} channel_pts_count={1} message={2}\", ChannelPts, ChannelPtsCount, Message));\r\n\r\n            Message = GetObject<TLMessageBase>(bytes, ref position);\r\n            ChannelPts = GetObject<TLInt>(bytes, ref position);\r\n            ChannelPtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Message.ToStream(output);\r\n            ChannelPts.ToStream(output);\r\n            ChannelPtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Message = GetObject<TLMessageBase>(input);\r\n            ChannelPts = GetObject<TLInt>(input);\r\n            ChannelPtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChannelPinnedMessage : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChannelPinnedMessage;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    [Flags]\r\n    public enum UpdateBotCallbackQueryFlags\r\n    {\r\n        Data = 0x1,\r\n        GameId = 0x2,\r\n    }\r\n\r\n    public class TLUpdateBotCallbackQuery56 : TLUpdateBotCallbackQuery\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateBotCallbackQuery56;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLInt GameId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            MessageId = GetObject<TLInt>(bytes, ref position);\r\n            Data = GetObject<TLString>(Flags, (int)UpdateBotCallbackQueryFlags.Data, null, bytes, ref position);\r\n            GameId = GetObject<TLInt>(Flags, (int)UpdateBotCallbackQueryFlags.GameId, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            QueryId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Peer.ToStream(output);\r\n            MessageId.ToStream(output);\r\n            ToStream(output, Data, Flags, (int)UpdateBotCallbackQueryFlags.Data);\r\n            ToStream(output, GameId, Flags, (int)UpdateBotCallbackQueryFlags.GameId);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            QueryId = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            MessageId = GetObject<TLInt>(input);\r\n            Data = GetObject<TLString>(Flags, (int)UpdateBotCallbackQueryFlags.Data, null, input);\r\n            GameId = GetObject<TLInt>(Flags, (int)UpdateBotCallbackQueryFlags.GameId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateBotCallbackQuery : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateBotCallbackQuery;\r\n\r\n        public TLLong QueryId { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLPeerBase Peer { get; set; }\r\n\r\n        public TLInt MessageId { get; set; }\r\n\r\n        public TLString Data { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            MessageId = GetObject<TLInt>(bytes, ref position);\r\n            Data = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            QueryId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Peer.ToStream(output);\r\n            MessageId.ToStream(output);\r\n            Data.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            QueryId = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            MessageId = GetObject<TLInt>(input);\r\n            Data = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    [Flags]\r\n    public enum UpdateInlineBotCallbackQueryFlags\r\n    {\r\n        Data = 0x1,\r\n        GameId = 0x2\r\n    }\r\n\r\n    public class TLUpdateInlineBotCallbackQuery56 : TLUpdateInlineBotCallbackQuery\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateInlineBotCallbackQuery56;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLInt GameId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            MessageId = GetObject<TLInputBotInlineMessageId>(bytes, ref position);\r\n            Data = GetObject<TLString>(Flags, (int)UpdateInlineBotCallbackQueryFlags.Data, null, bytes, ref position);\r\n            GameId = GetObject<TLInt>(Flags, (int)UpdateInlineBotCallbackQueryFlags.GameId, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            QueryId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            MessageId.ToStream(output);\r\n            ToStream(output, Data, Flags, (int)UpdateBotCallbackQueryFlags.Data);\r\n            ToStream(output, GameId, Flags, (int)UpdateBotCallbackQueryFlags.GameId);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            QueryId = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            MessageId = GetObject<TLInputBotInlineMessageId>(input);\r\n            Data = GetObject<TLString>(Flags, (int)UpdateInlineBotCallbackQueryFlags.Data, null, input);\r\n            GameId = GetObject<TLInt>(Flags, (int)UpdateInlineBotCallbackQueryFlags.GameId, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateInlineBotCallbackQuery : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateInlineBotCallbackQuery;\r\n\r\n        public TLLong QueryId { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLInputBotInlineMessageId MessageId { get; set; }\r\n\r\n        public TLString Data { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            MessageId = GetObject<TLInputBotInlineMessageId>(bytes, ref position);\r\n            Data = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            QueryId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            MessageId.ToStream(output);\r\n            Data.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            QueryId = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            MessageId = GetObject<TLInputBotInlineMessageId>(input);\r\n            Data = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateEditMessage : TLUpdateBase, IMultiPts\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateEditMessage;\r\n\r\n        public TLMessageBase Message { get; set; }\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Message = GetObject<TLMessageBase>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            Execute.ShowDebugMessage(string.Format(\"TLUpdateEditMessage.FromBytes pts={0} pts_count={1} message={2}\", Pts, PtsCount, Message));\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Message.ToStream(output);\r\n            Pts.ToStream(output);\r\n            PtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Message = GetObject<TLMessageBase>(input);\r\n            Pts = GetObject<TLInt>(input);\r\n            PtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n    }\r\n\r\n    public class TLUpdateReadChannelOutbox : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateReadChannelOutbox;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public TLInt MaxId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            MaxId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n            MaxId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n            MaxId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateDraftMessage : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateDraftMessage;\r\n\r\n        public TLPeerBase Peer { get; set; }\r\n\r\n        public TLDraftMessageBase Draft { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            Draft = GetObject<TLDraftMessageBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Peer.ToStream(output);\r\n            Draft.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            Draft = GetObject<TLDraftMessageBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateReadFeaturedStickers : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateReadFeaturedStickers;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateRecentStickers : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateRecentStickers;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateConfig : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateConfig;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdatePtsChanged : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdatePtsChanged;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChannelWebPage : TLUpdateWebPage, IMultiChannelPts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateChannelWebPage;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public TLInt ChannelPts { get; set; }\r\n\r\n        public TLInt ChannelPtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            WebPage = GetObject<TLWebPageBase>(bytes, ref position);\r\n            ChannelPts = GetObject<TLInt>(bytes, ref position);\r\n            ChannelPtsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n            WebPage.ToStream(output);\r\n            ChannelPts.ToStream(output);\r\n            ChannelPtsCount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n            WebPage = GetObject<TLWebPageBase>(input);\r\n            ChannelPts = GetObject<TLInt>(input);\r\n            ChannelPtsCount = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>(); //TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n    }\r\n\r\n    public class TLUpdatePhoneCall : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdatePhoneCall;\r\n\r\n        public TLPhoneCallBase PhoneCall { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            PhoneCall = GetObject<TLPhoneCallBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            PhoneCall.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            PhoneCall = GetObject<TLPhoneCallBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLUpdatePhoneCall PhoneCall={0}\", PhoneCall);\r\n        }\r\n    }\r\n\r\n    public abstract class TLUpdateDialogPinnedBase : TLUpdateBase\r\n    {\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Pinned\r\n        {\r\n            get { return IsSet(Flags, (int)UpdateDilogPinnedFlags.Pinned); }\r\n            set { SetUnset(ref _flags, value, (int)UpdateDilogPinnedFlags.Pinned); }\r\n        }\r\n    }\r\n\r\n    public class TLUpdateDialogPinned76 : TLUpdateDialogPinnedBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateDialogPinned76;\r\n\r\n        public TLDialogPeerBase Peer { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Peer = GetObject<TLDialogPeerBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Peer.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLDialogPeerBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateDialogPinned : TLUpdateDialogPinnedBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateDialogPinned;\r\n\r\n        public TLPeerBase Peer { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Peer.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLPeerBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public abstract class TLUpdatePinnedDialogsBase : TLUpdateBase\r\n    {\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n    }\r\n\r\n    public class TLUpdatePinnedDialogs76 : TLUpdatePinnedDialogsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdatePinnedDialogs76;\r\n\r\n        protected TLVector<TLDialogPeerBase> _order;\r\n\r\n        public TLVector<TLDialogPeerBase> Order\r\n        {\r\n            get { return _order; }\r\n            set { SetField(out _order, value, ref _flags, (int)UpdatePinnedDialogsFlags.Order); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Order = GetObject<TLVector<TLDialogPeerBase>>(Flags, (int)UpdatePinnedDialogsFlags.Order, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, Order, Flags, (int)UpdatePinnedDialogsFlags.Order);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Order = GetObject<TLVector<TLDialogPeerBase>>(Flags, (int)UpdatePinnedDialogsFlags.Order, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdatePinnedDialogs : TLUpdatePinnedDialogsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdatePinnedDialogs;\r\n\r\n        protected TLVector<TLPeerBase> _order;\r\n\r\n        public TLVector<TLPeerBase> Order\r\n        {\r\n            get { return _order; }\r\n            set { SetField(out _order, value, ref _flags, (int)UpdatePinnedDialogsFlags.Order); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Order = GetObject<TLVector<TLPeerBase>>(Flags, (int)UpdatePinnedDialogsFlags.Order, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            ToStream(output, Order, Flags, (int)UpdatePinnedDialogsFlags.Order);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Order = GetObject<TLVector<TLPeerBase>>(Flags, (int)UpdatePinnedDialogsFlags.Order, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateBotWebhookJSON : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateBotWebhookJSON;\r\n\r\n        public TLString DataJSON { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            DataJSON = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            DataJSON.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            DataJSON = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateBotWebhookJSONQuery : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateBotWebhookJSONQuery;\r\n\r\n        public TLLong QueryId { get; set; }\r\n\r\n        public TLString DataJSON { get; set; }\r\n\r\n        public TLInt Timeout { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            DataJSON = GetObject<TLString>(bytes, ref position);\r\n            Timeout = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            QueryId.ToStream(output);\r\n            DataJSON.ToStream(output);\r\n            Timeout.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            QueryId = GetObject<TLLong>(input);\r\n            DataJSON = GetObject<TLString>(input);\r\n            Timeout = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateBotShippingQuery : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateBotShippingQuery;\r\n\r\n        public TLLong QueryId { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLString Payload { get; set; }\r\n\r\n        public TLPostAddress ShippingAddress { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Payload = GetObject<TLString>(bytes, ref position);\r\n            ShippingAddress = GetObject<TLPostAddress>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            QueryId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Payload.ToStream(output);\r\n            ShippingAddress.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            QueryId = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Payload = GetObject<TLString>(input);\r\n            ShippingAddress = GetObject<TLPostAddress>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateBotPrecheckoutQuery : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateBotPrecheckoutQuery;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLLong QueryId { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLString Payload { get; set; }\r\n\r\n        protected TLPaymentRequestedInfo _info;\r\n\r\n        public TLPaymentRequestedInfo Info\r\n        {\r\n            get { return _info; }\r\n            set { SetField(out _info, value, ref _flags, (int)UpdateBotPrecheckoutQueryFlags.Info); }\r\n        }\r\n\r\n        protected TLString _shippingOptionId;\r\n\r\n        public TLString ShippingOptionId\r\n        {\r\n            get { return _shippingOptionId; }\r\n            set { SetField(out _shippingOptionId, value, ref _flags, (int)UpdateBotPrecheckoutQueryFlags.ShippingOptionId); }\r\n        }\r\n\r\n        public TLString Currency { get; set; }\r\n\r\n        public TLLong TotalAmount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            QueryId = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Payload = GetObject<TLString>(bytes, ref position);\r\n            _info = GetObject<TLPaymentRequestedInfo>(Flags, (int)UpdateBotPrecheckoutQueryFlags.Info, null, bytes, ref position);\r\n            _shippingOptionId = GetObject<TLString>(Flags, (int)UpdateBotPrecheckoutQueryFlags.ShippingOptionId, null, bytes, ref position);\r\n            Currency = GetObject<TLString>(bytes, ref position);\r\n            TotalAmount = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            QueryId.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Payload.ToStream(output);\r\n            ToStream(output, Info, Flags, (int)UpdateBotPrecheckoutQueryFlags.Info);\r\n            ToStream(output, ShippingOptionId, Flags, (int)UpdateBotPrecheckoutQueryFlags.ShippingOptionId);\r\n            Currency.ToStream(output);\r\n            TotalAmount.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            QueryId = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Payload = GetObject<TLString>(input);\r\n            _info = GetObject<TLPaymentRequestedInfo>(Flags, (int)UpdateBotPrecheckoutQueryFlags.Info, null, input);\r\n            _shippingOptionId = GetObject<TLString>(Flags, (int)UpdateBotPrecheckoutQueryFlags.ShippingOptionId, null, input);\r\n            Currency = GetObject<TLString>(input);\r\n            TotalAmount = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateLangPackTooLong : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateLangPackTooLong;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateLangPack : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateLangPack;\r\n\r\n        public TLLangPackDifference Difference { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Difference = GetObject<TLLangPackDifference>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Difference.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Difference = GetObject<TLLangPackDifference>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateFavedStickers : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateFavedStickers;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChannelReadMessagesContents : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChannelReadMessagesContents;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public TLVector<TLInt> Messages { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            Messages = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n            Messages.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n            Messages = GetObject<TLVector<TLInt>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateContactsReset : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateContactsReset;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateChannelAvailableMessages : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateChannelAvailableMessages;\r\n\r\n        public TLInt ChannelId { get; set; }\r\n\r\n        public TLInt AvailableMinId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            ChannelId = GetObject<TLInt>(bytes, ref position);\r\n            AvailableMinId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            ChannelId.ToStream(output);\r\n            AvailableMinId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            ChannelId = GetObject<TLInt>(input);\r\n            AvailableMinId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateReadFeed : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateReadFeed;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt FeedId { get; set; }\r\n\r\n        public TLFeedPosition MaxPosition { get; set; }\r\n\r\n        protected TLInt _unreadCount;\r\n\r\n        public TLInt UnreadCount\r\n        {\r\n            get { return _unreadCount; }\r\n            set { SetField(out _unreadCount, value, ref _flags, (int)UpdateReadFeedFlags.UnreadCount); }\r\n        }\r\n\r\n        protected TLInt _unreadMutedCount;\r\n\r\n        public TLInt UnreadMutedCount\r\n        {\r\n            get { return _unreadMutedCount; }\r\n            set { SetField(out _unreadMutedCount, value, ref _flags, (int)UpdateReadFeedFlags.UnreadCount); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            FeedId = GetObject<TLInt>(bytes, ref position);\r\n            MaxPosition = GetObject<TLFeedPosition>(bytes, ref position);\r\n            _unreadCount = GetObject<TLInt>(Flags, (int)UpdateReadFeedFlags.UnreadCount, null, bytes, ref position);\r\n            _unreadMutedCount = GetObject<TLInt>(Flags, (int)UpdateReadFeedFlags.UnreadCount, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            FeedId.ToStream(output);\r\n            MaxPosition.ToStream(output);\r\n            ToStream(output, _unreadCount, Flags, (int)UpdateReadFeedFlags.UnreadCount);\r\n            ToStream(output, _unreadMutedCount, Flags, (int)UpdateReadFeedFlags.UnreadCount);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            FeedId = GetObject<TLInt>(input);\r\n            MaxPosition = GetObject<TLFeedPosition>(input);\r\n            _unreadCount = GetObject<TLInt>(Flags, (int)UpdateReadFeedFlags.UnreadCount, null, input);\r\n            _unreadMutedCount = GetObject<TLInt>(Flags, (int)UpdateReadFeedFlags.UnreadCount, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdateDialogUnreadMark : TLUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateDialogUnreadMark;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Unread\r\n        {\r\n            get { return IsSet(_flags, (int)UpdateDialogUnreadMarkFlags.Unread); }\r\n            set { SetUnset(ref _flags, value, (int)UpdateDialogUnreadMarkFlags.Unread); }\r\n        }\r\n\r\n        public TLDialogPeerBase Peer { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Peer = GetObject<TLDialogPeerBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Peer.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLDialogPeerBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLUpdates.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLUpdatesBase : TLObject\r\n    {\r\n        public abstract IList<TLInt> GetSeq();\r\n\r\n        public abstract IList<TLInt> GetPts();\r\n    }\r\n\r\n    public class TLUpdatesTooLong : TLUpdatesBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdatesTooLong;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortSentMessage : TLUpdatesBase, ISentMessageMedia, IMultiPts\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdatesShortSentMessage;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLMessageMediaBase Media { get; set; }\r\n\r\n        public TLVector<TLMessageEntityBase> Entities { get; set; }\r\n\r\n        public bool HasMedia { get { return IsSet(Flags, (int) MessageFlags.Media); } }\r\n\r\n        public bool HasEntities { get { return IsSet(Flags, (int) MessageFlags.Entities); } }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.Media))\r\n            {\r\n                Media = GetObject<TLMessageMediaBase>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n            _flags.Value |= (int) MessageFlags.Unread;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLUpdatesShortSentMessage id={0} media={1} flags={2}\", Id, Media, TLMessageBase.MessageFlagsString(Flags));\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortMessage : TLUpdatesBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateShortMessage;\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLInt UserId { get; set; }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        public TLInt Pts { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt Seq { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt> { Seq };\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return new List<TLInt> { Pts };\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"UserMessage: FromId: {0} Message: {1}\", UserId, Message);\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortMessage24 : TLUpdatesShortMessage, IMultiPts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateShortMessage24;\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"UserMessage: FromId: {0} Message: {1}\", UserId, Message);\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortMessage25 : TLUpdatesShortMessage24\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdatesShortMessage25;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt FwdFromId { get; set; }\r\n\r\n        public TLInt FwdDate { get; set; }\r\n\r\n        public TLInt ReplyToMsgId { get; set; }\r\n\r\n        public TLBool Out\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)MessageFlags.Out)); }\r\n        }\r\n\r\n        public TLBool Unread\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)MessageFlags.Unread)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)MessageFlags.Unread);\r\n                }\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"UserMessage: FromId: {0} Message: {1}\", UserId, Message);\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortMessage34 : TLUpdatesShortMessage25\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdatesShortMessage34;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"UserMessage: FromId: {0} Message: {1}\", UserId, Message);\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortMessage40 : TLUpdatesShortMessage34\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdatesShortMessage40;\r\n\r\n        public TLPeerBase FwdFrom { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFrom = GetObject<TLPeerBase>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n#if DEBUG\r\n            var messageString = Message.ToString();\r\n            var logString = string.Format(\"TLUpdateShortMessage40 id={0} flags={1} user_id={2} message={3} pts={4} pts_count={5} date={6} fwd_from={7} fwd_date={8} reply_to_msg_id={9} entities={10}\", Id, TLMessageBase.MessageFlagsString(Flags), UserId, messageString.Substring(0, Math.Min(messageString.Length, 5)), Pts, PtsCount, Date, FwdFrom, FwdDate, ReplyToMsgId, Entities);\r\n\r\n            Logs.Log.Write(logString);\r\n#endif\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"UserMessage: FromId: {0} Message: {1}\", UserId, Message);\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortMessage45 : TLUpdatesShortMessage40\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdatesShortMessage45;\r\n\r\n        public TLInt ViaBotId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFrom = GetObject<TLPeerBase>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n            {\r\n                ViaBotId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n//#if DEBUG\r\n//            var messageString = Message.ToString();\r\n//            var logString = string.Format(\"TLUpdateShortMessage45 id={0} flags={1} user_id={2} message={3} pts={4} pts_count={5} date={6} fwd_from={7} fwd_date={8} via_bot_id={9} reply_to_msg_id={10} entities={11}\", Id, TLMessageBase.MessageFlagsString(Flags), UserId, messageString.Substring(0, Math.Min(messageString.Length, 5)), Pts, PtsCount, Date, FwdFrom, FwdDate, ViaBotId, ReplyToMsgId, Entities);\r\n\r\n//            Logs.Log.Write(logString);\r\n//#endif\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"UserMessage: FromId: {0} Message: {1}\", UserId, Message);\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortMessage48 : TLUpdatesShortMessage45\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdatesShortMessage48;\r\n\r\n        public TLMessageFwdHeader FwdHeader { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdHeader = GetObject<TLMessageFwdHeader>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n            {\r\n                ViaBotId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n            _flags.Value |= (int)MessageFlags.Unread;\r\n\r\n//#if DEBUG\r\n//            var messageString = Message.ToString();\r\n//            var logString = string.Format(\"TLUpdateShortMessage45 id={0} flags={1} user_id={2} message={3} pts={4} pts_count={5} date={6} fwd_from={7} fwd_date={8} via_bot_id={9} reply_to_msg_id={10} entities={11}, fwd_header={12}\", Id, TLMessageBase.MessageFlagsString(Flags), UserId, messageString.Substring(0, Math.Min(messageString.Length, 5)), Pts, PtsCount, Date, FwdFrom, FwdDate, ViaBotId, ReplyToMsgId, Entities, FwdHeader);\r\n\r\n//            Logs.Log.Write(logString);\r\n//#endif\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"UserMessage: FromId: {0} Message: {1}\", UserId, Message);\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortChatMessage : TLUpdatesShortMessage\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateShortChatMessage;\r\n\r\n        public TLInt ChatId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"ChatMessage: ChatId: {0} FromId: {1} Message: {2}\", ChatId, UserId, Message);\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortChatMessage24 : TLUpdatesShortChatMessage, IMultiPts\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdateShortChatMessage24;\r\n\r\n        public TLInt PtsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"ChatMessage: ChatId: {0} FromId: {1} Message: {2}\", ChatId, UserId, Message);\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortChatMessage25 : TLUpdatesShortChatMessage24\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdatesShortChatMessage25;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInt FwdFromId { get; set; }\r\n\r\n        public TLInt FwdDate { get; set; }\r\n\r\n        public TLInt ReplyToMsgId { get; set; }\r\n\r\n        public TLBool Out\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)MessageFlags.Out)); }\r\n        }\r\n\r\n        public TLBool Unread\r\n        {\r\n            get { return new TLBool(IsSet(_flags, (int)MessageFlags.Unread)); }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    SetUnset(ref _flags, value.Value, (int)MessageFlags.Unread);\r\n                }\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return TLUtils.GetPtsRange(Pts, PtsCount);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"ChatMessage: ChatId: {0} FromId: {1} Message: {2}\", ChatId, UserId, Message);\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortChatMessage34 : TLUpdatesShortChatMessage25\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdatesShortChatMessage34;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities { get; set; } \r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFromId = GetObject<TLInt>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortChatMessage40 : TLUpdatesShortChatMessage34\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdatesShortChatMessage40;\r\n\r\n        public TLPeerBase FwdFrom { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFrom = GetObject<TLPeerBase>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n\r\n\r\n#if DEBUG\r\n            var messageString = Message.ToString();\r\n            var logString = string.Format(\"TLUpdateShortChatMessage40 id={0} flags={1} user_id={2} message={3} pts={4} pts_count={5} date={6} fwd_from={7} fwd_date={8} reply_to_msg_id={9} entities={10}\", Id, TLMessageBase.MessageFlagsString(Flags), UserId, messageString.Substring(0, Math.Min(messageString.Length, 5)), Pts, PtsCount, Date, FwdFrom, FwdDate, ReplyToMsgId, Entities);\r\n\r\n            Logs.Log.Write(logString);\r\n#endif\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortChatMessage45 : TLUpdatesShortChatMessage40\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdatesShortChatMessage45;\r\n\r\n        public TLInt ViaBotId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdFrom = GetObject<TLPeerBase>(bytes, ref position);\r\n                FwdDate = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n            {\r\n                ViaBotId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n#if DEBUG\r\n            var messageString = Message.ToString();\r\n            var logString = string.Format(\"TLUpdateShortChatMessage44 id={0} flags={1} user_id={2} message={3} pts={4} pts_count={5} date={6} fwd_from={7} fwd_date={8} reply_to_msg_id={9} via_bot_id={10} entities={11}\", Id, TLMessageBase.MessageFlagsString(Flags), UserId, messageString.Substring(0, Math.Min(messageString.Length, 5)), Pts, PtsCount, Date, FwdFrom, FwdDate, ViaBotId, ReplyToMsgId, Entities);\r\n\r\n            Logs.Log.Write(logString);\r\n#endif\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShortChatMessage48 : TLUpdatesShortChatMessage45\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdatesShortChatMessage48;\r\n\r\n        public TLMessageFwdHeader FwdHeader { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            ChatId = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            Pts = GetObject<TLInt>(bytes, ref position);\r\n            PtsCount = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)MessageFlags.FwdFrom))\r\n            {\r\n                FwdHeader = GetObject<TLMessageFwdHeader>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ViaBotId))\r\n            {\r\n                ViaBotId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.ReplyToMsgId))\r\n            {\r\n                ReplyToMsgId = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)MessageFlags.Entities))\r\n            {\r\n                Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            }\r\n\r\n            _flags.Value |= (int)MessageFlags.Unread;\r\n\r\n#if DEBUG\r\n            var messageString = Message.ToString();\r\n            var logString = string.Format(\"TLUpdateShortChatMessage48 id={0} flags={1} user_id={2} message={3} pts={4} pts_count={5} date={6} fwd_from={7} fwd_date={8} reply_to_msg_id={9} via_bot_id={10} entities={11} fwd_header={12}\", Id, TLMessageBase.MessageFlagsString(Flags), UserId, messageString.Substring(0, Math.Min(messageString.Length, 5)), Pts, PtsCount, Date, FwdFrom, FwdDate, ViaBotId, ReplyToMsgId, Entities, FwdHeader);\r\n\r\n            Logs.Log.Write(logString);\r\n#endif\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesShort : TLUpdatesBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdateShort;\r\n\r\n        public TLUpdateBase Update { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Update = GetObject<TLUpdateBase>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>();\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return Update.GetPts();\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLUpdatesShort Update: \" + Update;\r\n        }\r\n    }\r\n\r\n    public class TLUpdates : TLUpdatesBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUpdates;\r\n\r\n        public TLVector<TLUpdateBase> Updates { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLInt Seq { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Updates = GetObject<TLVector<TLUpdateBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Seq = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var info = new StringBuilder();\r\n\r\n            info.AppendLine(\"TLUpdates\");\r\n            for (var i = 0; i < Updates.Count; i++)\r\n            {\r\n                info.AppendLine(Updates[i].ToString());\r\n            }\r\n\r\n            return info.ToString();\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            return new List<TLInt>{Seq};\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return Updates.SelectMany(x => x.GetPts()).ToList();\r\n        }\r\n    }\r\n\r\n    public class TLUpdatesCombined : TLUpdates\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUpdatesCombined;\r\n\r\n        public TLInt SeqStart { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Updates = GetObject<TLVector<TLUpdateBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            SeqStart = GetObject<TLInt>(bytes, ref position);               // seq младший\r\n            Seq = GetObject<TLInt>(bytes, ref position);                    // seq старший\r\n\r\n            return this;\r\n        }\r\n\r\n        public override IList<TLInt> GetSeq()\r\n        {\r\n            var list = new List<TLInt>();\r\n\r\n            for (var i = SeqStart.Value; i <= Seq.Value; i++)\r\n            {\r\n                list.Add(new TLInt(i));\r\n            }\r\n\r\n            return list;\r\n        }\r\n\r\n        public override IList<TLInt> GetPts()\r\n        {\r\n            return Updates.SelectMany(x => x.GetPts()).ToList();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLUserBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\n#if WINDOWS_PHONE\r\nusing System.Windows;\r\nusing Microsoft.Phone.UserData;\r\n#elif WIN_RT\r\nusing Windows.UI.Xaml;\r\n#endif\r\nusing Telegram.Api.TL.Interfaces;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Resources;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum UserFlags\r\n    {\r\n        AccessHash = 0x1,       // 0\r\n        FirstName = 0x2,        // 1\r\n        LastName = 0x4,\r\n        UserName = 0x8,\r\n        Phone = 0x10,\r\n        Photo = 0x20,\r\n        Status = 0x40,          // 6\r\n        // = 0x80,              // 7\r\n        // = 0x100,             // 8\r\n        // = 0x200,             // 9\r\n        Self = 0x400,           // 10\r\n        Contact = 0x800,\r\n        ContactMutual = 0x1000,\r\n        Deleted = 0x2000,\r\n        Bot = 0x4000,\r\n        BotAllHistory = 0x8000,\r\n        BotGroupsBlocked = 0x10000,\r\n        Verified = 0x20000,\r\n        Restricted = 0x40000,\r\n        BotInlinePlaceholder = 0x80000,\r\n        Min = 0x100000,          // 20\r\n        BotInlineGeo = 0x200000,\r\n        LangCode = 0x400000,\r\n    }\r\n\r\n    [Flags]\r\n    public enum UserCustomFlags\r\n    {\r\n        Blocked = 0x1,          // 0\r\n        About = 0x2,            // 1\r\n        BotInlineGeoAccess = 0x4,\r\n        NotifyGeoAccessDate = 0x8,\r\n        ReadInboxMaxId = 0x10,\r\n        ReadOutboxMaxId = 0x20,\r\n        BotOpenUrlPermission = 0x40,\r\n        BotPassTelegramNameToWebPagesPermission = 0x80,\r\n        CommonChatsCount = 0x100,\r\n        BotPaymentsPermission = 0x200,\r\n    }\r\n\r\n    public interface IReadMaxId\r\n    {\r\n        TLInt ReadInboxMaxId { get; set; }\r\n\r\n        TLInt ReadOutboxMaxId { get; set; }\r\n    }\r\n\r\n    public interface IUserName\r\n    {\r\n        TLString UserName { get; set; }\r\n    }\r\n\r\n    public interface INotifySettings\r\n    {\r\n        TLPeerNotifySettingsBase NotifySettings { get; set; }\r\n    }\r\n\r\n    public class TLUserExtendedInfo : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserExtendedInfo;\r\n\r\n        public TLString FirstName { get; set; }\r\n\r\n        public TLString LastName { get; set; }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            FirstName = GetObject<TLString>(input);\r\n            LastName = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLUserPhone : TLObject\r\n    {\r\n        public TLInt Kind { get; set; }\r\n\r\n        public TLString Number { get; set; }\r\n\r\n        public TLString Description { get; set; }\r\n\r\n        protected bool _isSelected;\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return _isSelected; }\r\n            set { SetField(ref _isSelected, value, () => IsSelected); }\r\n        }\r\n\r\n        protected bool _isIconVisible;\r\n\r\n        public bool IsIconVisible\r\n        {\r\n            get { return _isIconVisible; }\r\n            set { SetField(ref _isIconVisible, value, () => IsIconVisible); }\r\n        }\r\n    }\r\n\r\n    public class TLUserNotRegistered : TLUserBase\r\n    {\r\n        public TLVector<TLUserPhone> Phones { get; set; }\r\n\r\n        public override TLInputUserBase ToInputUser()\r\n        {\r\n            return null;\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return null;\r\n        }\r\n\r\n        public override string GetUnsendedTextFileName()\r\n        {\r\n            return \"u\" + Id + \".dat\";\r\n        }\r\n\r\n        public override bool IsDeleted { get { return false; } set { } }\r\n\r\n        public override bool IsSelf { get { return false; } set { } }\r\n\r\n        public override bool IsForeign { get { return false; } }\r\n\r\n        public override bool IsRequest { get { return false; } }\r\n\r\n        public override bool IsContact { get { return false; } set { } }\r\n\r\n        public override bool IsContactMutual { get { return false; } set { } }\r\n    }\r\n\r\n    public abstract class TLUserBase : TLObject, IInputPeer, ISelectable, IFullName, INotifySettings, IVIsibility\r\n    {\r\n        public abstract bool IsDeleted { get; set; }\r\n\r\n        public abstract bool IsSelf { get; set; }\r\n\r\n        public abstract bool IsForeign { get; } //access_hash, !phone, !contact, !contact_mutual\r\n\r\n        public abstract bool IsRequest { get; } //access_hash, phone, !contact, !contact_mutual\r\n\r\n        public abstract bool IsContact { get; set; } //access_hash, phone, contact\r\n\r\n        public abstract bool IsContactMutual { get; set; } //access_hash, phone, contact_mutual\r\n\r\n        public bool IsAdmin { get; set; }\r\n\r\n        public string AccessToken { get; set; }\r\n\r\n        public TLUserBase Self\r\n        {\r\n            get { return this; }\r\n        }\r\n\r\n        public int Index\r\n        {\r\n            get { return Id.Value; }\r\n            set { Id = new TLInt(value); }\r\n        }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLString _firstName;\r\n\r\n        public TLString FirstName\r\n        {\r\n            get { return _firstName; }\r\n            set\r\n            {\r\n                SetField(ref _firstName, value, () => FirstName);\r\n                NotifyOfPropertyChange(() => FullName2);\r\n            }\r\n        }\r\n\r\n        public TLString _lastName;\r\n\r\n        public TLString LastName\r\n        {\r\n            get { return _lastName; }\r\n            set\r\n            {\r\n                SetField(ref _lastName, value, () => LastName);\r\n                NotifyOfPropertyChange(() => FullName2);\r\n            }\r\n        }\r\n\r\n        public TLString Phone { get; set; }\r\n\r\n        public TLPhotoBase _photo;\r\n\r\n        public TLPhotoBase Photo\r\n        {\r\n            get { return _photo; }\r\n            set { SetField(ref _photo, value, () => Photo); }\r\n        }\r\n\r\n        public TLUserStatus _status;\r\n\r\n        public TLUserStatus Status\r\n        {\r\n            get { return _status; }\r\n            set\r\n            {\r\n                if (_status != value)\r\n                {\r\n                    _status = value;\r\n                    NotifyOfPropertyChange(() => Status);\r\n                    NotifyOfPropertyChange(() => StatusCommon);\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLUserBase StatusCommon\r\n        {\r\n            get { return this; }\r\n        }\r\n\r\n        public int StatusValue\r\n        {\r\n            get\r\n            {\r\n                if (Status is TLUserStatusOnline)\r\n                {\r\n                    return int.MaxValue;\r\n                }\r\n                var offline = Status as TLUserStatusOffline;\r\n                if (offline != null)\r\n                {\r\n                    return offline.WasOnline.Value;\r\n                }\r\n\r\n                return int.MinValue;\r\n            }\r\n        }\r\n\r\n        public static string UserFlagsString(TLInt flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (UserFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        public static string UserCustomFlagsString(TLLong flags)\r\n        {\r\n            if (flags == null) return string.Empty;\r\n\r\n            var list = (UserCustomFlags)flags.Value;\r\n\r\n            return string.Format(\"{0} [{1}]\", flags, list);\r\n        }\r\n\r\n        #region Additional\r\n\r\n        public virtual bool IsVerified\r\n        {\r\n            get { return Index == 777000; }\r\n            set { throw new NotImplementedException(); }\r\n        }\r\n\r\n        public IList<string> FullNameWords { get; set; }\r\n\r\n        public bool RemoveUserAction { get; set; }\r\n\r\n        public TLContact Contact { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} {1} {2}\", GetType().Name, Index, FullName);\r\n        }\r\n\r\n        public static string GetFirstName(TLString FirstName, TLString LastName, TLString Phone)\r\n        {\r\n            var firstName = FirstName != null ? FirstName.ToString().Trim() : string.Empty;\r\n\r\n            if (!string.IsNullOrEmpty(firstName))\r\n            {\r\n                return firstName;\r\n            }\r\n\r\n            var lastName = LastName != null ? LastName.ToString().Trim() : string.Empty;\r\n            if (!string.IsNullOrEmpty(lastName))\r\n            {\r\n                return lastName;\r\n            }\r\n\r\n            if (string.IsNullOrEmpty(firstName) && string.IsNullOrEmpty(lastName))\r\n            {\r\n                return Phone != null ? \"+\" + Phone : string.Empty;\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public virtual string ShortName\r\n        {\r\n            get\r\n            {\r\n                if (IsSelf)\r\n                {\r\n                    return AppResources.SavedMessages;\r\n                }\r\n\r\n                if (this is TLUserEmpty)\r\n                {\r\n                    return AppResources.EmptyUser;\r\n                }\r\n\r\n                if (IsDeleted)\r\n                {\r\n                    return AppResources.DeletedUser;\r\n                }\r\n\r\n                var firstName = FirstName != null ? FirstName.ToString() : string.Empty;\r\n                var lastName = LastName != null ? LastName.ToString() : string.Empty;\r\n                if (ExtendedInfo != null)\r\n                {\r\n                    firstName = ExtendedInfo.FirstName != null ? ExtendedInfo.FirstName.ToString() : string.Empty;\r\n                    lastName = ExtendedInfo.LastName != null ? ExtendedInfo.LastName.ToString() : string.Empty;\r\n                }\r\n\r\n                if (string.Equals(firstName, lastName, StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return firstName;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(firstName))\r\n                {\r\n                    return firstName;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(lastName))\r\n                {\r\n                    return lastName;\r\n                }\r\n\r\n                return Phone != null ? \"+\" + Phone : string.Empty;\r\n            }\r\n        }\r\n\r\n        public virtual string FullName\r\n        {\r\n            get\r\n            {\r\n                if (IsSelf)\r\n                {\r\n                    return AppResources.SavedMessages;\r\n                }\r\n\r\n                if (this is TLUserEmpty)\r\n                {\r\n                    return AppResources.EmptyUser;\r\n                }\r\n\r\n                if (IsDeleted)\r\n                {\r\n                    return AppResources.DeletedUser;\r\n                }\r\n\r\n                var firstName = FirstName != null ? FirstName.ToString() : string.Empty;\r\n                var lastName = LastName != null ? LastName.ToString() : string.Empty;\r\n                if (ExtendedInfo != null)\r\n                {\r\n                    firstName = ExtendedInfo.FirstName != null ? ExtendedInfo.FirstName.ToString() : string.Empty;\r\n                    lastName = ExtendedInfo.LastName != null ? ExtendedInfo.LastName.ToString() : string.Empty;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(firstName) && string.IsNullOrEmpty(lastName))\r\n                {\r\n                    return Phone != null ? \"+\" + Phone : string.Empty;\r\n                }\r\n\r\n                if (string.Equals(firstName, lastName, StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return firstName;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(firstName))\r\n                {\r\n                    return lastName;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(lastName))\r\n                {\r\n                    return firstName;\r\n                }\r\n\r\n                return string.Format(\"{0} {1}\", firstName, lastName);\r\n            }\r\n        }\r\n\r\n        public virtual string FullName2\r\n        {\r\n            get\r\n            {\r\n                if (this is TLUserEmpty)\r\n                {\r\n                    return AppResources.EmptyUser;\r\n                }\r\n\r\n                if (IsDeleted)\r\n                {\r\n                    return AppResources.DeletedUser;\r\n                }\r\n\r\n                var firstName = FirstName != null ? FirstName.ToString() : string.Empty;\r\n                var lastName = LastName != null ? LastName.ToString() : string.Empty;\r\n                if (ExtendedInfo != null)\r\n                {\r\n                    firstName = ExtendedInfo.FirstName != null ? ExtendedInfo.FirstName.ToString() : string.Empty;\r\n                    lastName = ExtendedInfo.LastName != null ? ExtendedInfo.LastName.ToString() : string.Empty;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(firstName) && string.IsNullOrEmpty(lastName))\r\n                {\r\n                    return Phone != null ? \"+\" + Phone : string.Empty;\r\n                }\r\n\r\n                if (string.Equals(firstName, lastName, StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return firstName;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(firstName))\r\n                {\r\n                    return lastName;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(lastName))\r\n                {\r\n                    return firstName;\r\n                }\r\n\r\n                return string.Format(\"{0} {1}\", firstName, lastName);\r\n            }\r\n        }\r\n\r\n        public virtual bool HasPhone { get { return Phone != null && !string.IsNullOrEmpty(Phone.ToString()); } }\r\n\r\n        public abstract TLInputUserBase ToInputUser();\r\n\r\n        public virtual void Update(TLUserBase user)\r\n        {\r\n            try\r\n            {\r\n                _firstName = user.FirstName;\r\n                _lastName = user.LastName;\r\n                Phone = user.Phone;\r\n\r\n                if (Photo != null\r\n                    && user.Photo != null\r\n                    && Photo.GetType() == user.Photo.GetType())\r\n                {\r\n                    Photo.Update(user.Photo);\r\n                }\r\n                else\r\n                {\r\n                    _photo = user.Photo;\r\n                }\r\n\r\n                _status = user.Status;\r\n\r\n                if (user.Contact != null)\r\n                {\r\n                    Contact = user.Contact;\r\n                }\r\n\r\n                if (user.Link != null)\r\n                {\r\n                    Link = user.Link;\r\n                }\r\n\r\n                if (user.ProfilePhoto != null)\r\n                {\r\n                    ProfilePhoto = user.ProfilePhoto;\r\n                }\r\n\r\n                if (user.NotifySettings != null)\r\n                {\r\n                    NotifySettings = user.NotifySettings;\r\n                }\r\n\r\n                if (user.ExtendedInfo != null)\r\n                {\r\n                    ExtendedInfo = user.ExtendedInfo;\r\n                }\r\n\r\n                if (user.Blocked != null)\r\n                {\r\n                    Blocked = user.Blocked;\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n\r\n            }\r\n\r\n        }\r\n\r\n        public abstract TLInputPeerBase ToInputPeer();\r\n\r\n        public virtual string GetUnsendedTextFileName()\r\n        {\r\n            return \"u\" + Id + \".dat\";\r\n        }\r\n\r\n        public TLUserExtendedInfo ExtendedInfo { get; set; }\r\n\r\n        #region UserFull information\r\n\r\n        public TLLinkBase Link { get; set; }\r\n\r\n        public TLPhotoBase ProfilePhoto { get; set; }\r\n\r\n        public TLPeerNotifySettingsBase NotifySettings { get; set; }\r\n\r\n        public virtual TLBool Blocked { get; set; }\r\n\r\n        public TLBotInfoBase BotInfo { get; set; }\r\n        #endregion\r\n\r\n        public Visibility DeleteActionVisibility { get; set; }\r\n\r\n        #endregion\r\n\r\n        public TLInputNotifyPeerBase ToInputNotifyPeer()\r\n        {\r\n            return new TLInputNotifyPeer { Peer = ToInputPeer() };\r\n        }\r\n\r\n        private bool _isVisible;\r\n\r\n        public bool IsVisible\r\n        {\r\n            get { return _isVisible; }\r\n            set { SetField(ref _isVisible, value, () => IsVisible); }\r\n        }\r\n\r\n        public bool _isSelected;\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return _isSelected; }\r\n            set { SetField(ref _isSelected, value, () => IsSelected); }\r\n        }\r\n\r\n        private string _selectedText;\r\n\r\n        public string SelectedText\r\n        {\r\n            get { return _selectedText; }\r\n            set { SetField(ref _selectedText, value, () => SelectedText); }\r\n        }\r\n\r\n        #region PhoneBook\r\n        public TLLong ClientId { get; set; }\r\n\r\n        public string Mobile { get; set; }\r\n\r\n        public string Mobile2 { get; set; }\r\n\r\n\r\n        public string Home { get; set; }\r\n\r\n        public string Home2 { get; set; }\r\n\r\n\r\n        public string Work { get; set; }\r\n\r\n        public string Work2 { get; set; }\r\n\r\n\r\n        public string Company { get; set; }\r\n\r\n        public string Pager { get; set; }\r\n\r\n        public string HomeFax { get; set; }\r\n\r\n        public string WorkFax { get; set; }\r\n\r\n        #endregion\r\n\r\n        public static string GetLastNameKey(TLUserBase person)\r\n        {\r\n            if (person.LastName == null) return ('#').ToString();\r\n\r\n            char key = char.ToLower(person.LastName.Value[0]);\r\n\r\n            if (key < 'a' || key > 'z')\r\n            {\r\n                if (key < 'а' || key > 'я')\r\n                {\r\n                    key = '#';\r\n                }\r\n            }\r\n\r\n            return key.ToString();\r\n        }\r\n\r\n        public static int CompareByLastName(object obj1, object obj2)\r\n        {\r\n            var p1 = (TLUserBase)obj1;\r\n            var p2 = (TLUserBase)obj2;\r\n\r\n            if (p1.LastName == null && p2.LastName != null)\r\n            {\r\n                return -1;\r\n            }\r\n\r\n            if (p1.LastName != null && p2.LastName == null)\r\n            {\r\n                return 1;\r\n            }\r\n\r\n            if (p1.LastName == null && p2.LastName == null)\r\n            {\r\n                return 0;\r\n            }\r\n\r\n\r\n            int result = String.Compare(p1.LastName.Value, p2.LastName.Value, StringComparison.Ordinal);\r\n            //if (result == 0)\r\n            //{\r\n            //    result = String.Compare(p1.FirstName.Value, p2.FirstName.Value, StringComparison.Ordinal);\r\n            //}\r\n\r\n            return result;\r\n        }\r\n    }\r\n\r\n    public class TLUser66 : TLUser45\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUser66;\r\n\r\n        private TLString _langCode;\r\n\r\n        public TLString LangCode\r\n        {\r\n            get { return _langCode; }\r\n            set { SetField(out _langCode, value, ref _flags, (int)UserFlags.LangCode); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject(Flags, (int)UserFlags.AccessHash, new TLLong(0), bytes, ref position);\r\n            _firstName = GetObject(Flags, (int)UserFlags.FirstName, TLString.Empty, bytes, ref position);\r\n            _lastName = GetObject(Flags, (int)UserFlags.LastName, TLString.Empty, bytes, ref position);\r\n            UserName = GetObject(Flags, (int)UserFlags.UserName, TLString.Empty, bytes, ref position);\r\n            Phone = GetObject(Flags, (int)UserFlags.Phone, TLString.Empty, bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)UserFlags.Photo, new TLUserProfilePhotoEmpty(), bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(Flags, (int)UserFlags.Status, new TLUserStatusEmpty(), bytes, ref position);\r\n            BotInfoVersion = GetObject(Flags, (int)UserFlags.Bot, new TLInt(0), bytes, ref position);\r\n            RestrictionReason = GetObject(Flags, (int)UserFlags.Restricted, TLString.Empty, bytes, ref position);\r\n            _botInlinePlaceholder = GetObject(Flags, (int)UserFlags.BotInlinePlaceholder, TLString.Empty, bytes, ref position);\r\n            _langCode = GetObject(Flags, (int)UserFlags.LangCode, TLString.Empty, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                ToBytes(AccessHash, Flags, (int)UserFlags.AccessHash),\r\n                ToBytes(FirstName, Flags, (int)UserFlags.FirstName),\r\n                ToBytes(LastName, Flags, (int)UserFlags.LastName),\r\n                ToBytes(UserName, Flags, (int)UserFlags.UserName),\r\n                ToBytes(Phone, Flags, (int)UserFlags.Phone),\r\n                ToBytes(Photo, Flags, (int)UserFlags.Photo),\r\n                ToBytes(Status, Flags, (int)UserFlags.Status),\r\n                ToBytes(BotInfoVersion, Flags, (int)UserFlags.Bot),\r\n                ToBytes(RestrictionReason, Flags, (int)UserFlags.Restricted),\r\n                ToBytes(BotInlinePlaceholder, Flags, (int)UserFlags.BotInlinePlaceholder),\r\n                ToBytes(LangCode, Flags, (int)UserFlags.LangCode));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject(Flags, (int)UserFlags.AccessHash, new TLLong(0), input);\r\n            _firstName = GetObject(Flags, (int)UserFlags.FirstName, TLString.Empty, input);\r\n            _lastName = GetObject(Flags, (int)UserFlags.LastName, TLString.Empty, input);\r\n            UserName = GetObject(Flags, (int)UserFlags.UserName, TLString.Empty, input);\r\n            Phone = GetObject(Flags, (int)UserFlags.Phone, TLString.Empty, input);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)UserFlags.Photo, new TLUserProfilePhotoEmpty(), input);\r\n            _status = GetObject<TLUserStatus>(Flags, (int)UserFlags.Status, new TLUserStatusEmpty(), input);\r\n            BotInfoVersion = GetObject(Flags, (int)UserFlags.Bot, new TLInt(0), input);\r\n            RestrictionReason = GetObject(Flags, (int)UserFlags.Restricted, TLString.Empty, input);\r\n            BotInlinePlaceholder = GetObject(Flags, (int)UserFlags.BotInlinePlaceholder, TLString.Empty, input);\r\n            LangCode = GetObject(Flags, (int)UserFlags.LangCode, TLString.Empty, input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            NotifySettings = GetNullableObject<TLPeerNotifySettingsBase>(input);\r\n            ExtendedInfo = GetNullableObject<TLUserExtendedInfo>(input);\r\n            BotInfo = GetNullableObject<TLBotInfoBase>(input);\r\n\r\n            // as bit\r\n            _blocked = GetObject<TLBool>(CustomFlags, (int)UserCustomFlags.Blocked, null, input);\r\n            _about = GetObject<TLString>(CustomFlags, (int)UserCustomFlags.About, null, input);\r\n            _notifyGeoAccessDate = GetObject<TLInt>(CustomFlags, (int)UserCustomFlags.NotifyGeoAccessDate, null, input);\r\n\r\n            _readInboxMaxId = GetObject<TLInt>(CustomFlags, (int)UserCustomFlags.ReadInboxMaxId, null, input);\r\n            _readOutboxMaxId = GetObject<TLInt>(CustomFlags, (int)UserCustomFlags.ReadOutboxMaxId, null, input);\r\n            _commonChatsCount = GetObject<TLInt>(CustomFlags, (int)UserCustomFlags.CommonChatsCount, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void Update(TLUserBase userBase)\r\n        {\r\n            var user = userBase as TLUser66;\r\n            if (user != null)\r\n            {\r\n                if (user.Min)\r\n                {\r\n                    _firstName = user.FirstName ?? TLString.Empty;\r\n                    _lastName = user.LastName ?? TLString.Empty;\r\n                    _photo = user.Photo ?? new TLUserProfilePhotoEmpty();\r\n\r\n                    return;\r\n                }\r\n\r\n                // set bits\r\n                Flags = user.Flags;\r\n                //IsSelf = user.IsSelf;\r\n                //IsContact = user.IsContact;\r\n                //IsMutualContact = user.IsMutualContact;\r\n                //IsDeleted = user.IsDeleted;\r\n                //IsBot = user.IsBot;\r\n                //IsBotAllHistory = user.IsBotAllHistory;\r\n                //IsBotGroupsBlocked = user.IsBotGroupsBlocked;\r\n                //IsVerified = user.IsVerified;\r\n                //IsRestricted = user.IsRestricted;\r\n                //IsBotInlineGeo = user.IsBotInlineGeo;\r\n                // end set bits\r\n\r\n                Id = user.Id;\r\n                AccessHash = user.AccessHash ?? new TLLong(0);\r\n                _firstName = user.FirstName ?? TLString.Empty;\r\n                _lastName = user.LastName ?? TLString.Empty;\r\n                UserName = user.UserName ?? TLString.Empty;\r\n                Phone = user.Phone ?? TLString.Empty;\r\n                if (Photo != null\r\n                    && user.Photo != null\r\n                    && Photo.GetType() == user.Photo.GetType())\r\n                {\r\n                    Photo.Update(user.Photo);\r\n                }\r\n                else\r\n                {\r\n                    _photo = user.Photo ?? new TLUserProfilePhotoEmpty();\r\n                }\r\n                _status = user.Status ?? new TLUserStatusEmpty();\r\n                BotInfoVersion = user.BotInfoVersion ?? new TLInt(0);\r\n                RestrictionReason = user.RestrictionReason ?? TLString.Empty;\r\n                _botInlinePlaceholder = user.BotInlinePlaceholder ?? TLString.Empty;\r\n                _langCode = user.LangCode ?? TLString.Empty;\r\n\r\n                if (user.ReadInboxMaxId != null\r\n                    && (ReadInboxMaxId == null || ReadInboxMaxId.Value < user.ReadInboxMaxId.Value))\r\n                {\r\n                    ReadInboxMaxId = user.ReadInboxMaxId;\r\n                }\r\n\r\n                if (user.ReadOutboxMaxId != null\r\n                    && (ReadOutboxMaxId == null || ReadOutboxMaxId.Value < user.ReadOutboxMaxId.Value))\r\n                {\r\n                    ReadOutboxMaxId = user.ReadOutboxMaxId;\r\n                }\r\n\r\n                if (user.About != null)\r\n                {\r\n                    About = user.About;\r\n                }\r\n\r\n                if (user.NotifyGeoAccessDate != null)\r\n                {\r\n                    NotifyGeoAccessDate = user.NotifyGeoAccessDate;\r\n                }\r\n\r\n                if (user.BotInlineGeoAccess)\r\n                {\r\n                    BotInlineGeoAccess = true;\r\n                }\r\n\r\n                if (user.BotInfo != null)\r\n                {\r\n                    BotInfo = user.BotInfo;\r\n                }\r\n\r\n                if (user.Contact != null)\r\n                {\r\n                    Contact = user.Contact;\r\n                }\r\n\r\n                if (user.Link != null)\r\n                {\r\n                    Link = user.Link;\r\n                }\r\n\r\n                if (user.ProfilePhoto != null)\r\n                {\r\n                    ProfilePhoto = user.ProfilePhoto;\r\n                }\r\n\r\n                if (user.NotifySettings != null)\r\n                {\r\n                    NotifySettings = user.NotifySettings;\r\n                }\r\n\r\n                if (user.ExtendedInfo != null)\r\n                {\r\n                    ExtendedInfo = user.ExtendedInfo;\r\n                }\r\n\r\n                if (user.Blocked != null)\r\n                {\r\n                    Blocked = user.Blocked;\r\n                }\r\n\r\n                if (user.CommonChatsCount != null)\r\n                {\r\n                    CommonChatsCount = user.CommonChatsCount;\r\n                }\r\n            }\r\n\r\n            //base.Update(userBase);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            ToStream(output, AccessHash, Flags, (int)UserFlags.AccessHash);\r\n            ToStream(output, FirstName, Flags, (int)UserFlags.FirstName);\r\n            ToStream(output, LastName, Flags, (int)UserFlags.LastName);\r\n            ToStream(output, UserName, Flags, (int)UserFlags.UserName);\r\n            ToStream(output, Phone, Flags, (int)UserFlags.Phone);\r\n            ToStream(output, Photo, Flags, (int)UserFlags.Photo);\r\n            ToStream(output, Status, Flags, (int)UserFlags.Status);\r\n            ToStream(output, BotInfoVersion, Flags, (int)UserFlags.Bot);\r\n            ToStream(output, RestrictionReason, Flags, (int)UserFlags.Restricted);\r\n            ToStream(output, BotInlinePlaceholder, Flags, (int)UserFlags.BotInlinePlaceholder);\r\n            ToStream(output, LangCode, Flags, (int)UserFlags.LangCode);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            BotInfo.NullableToStream(output);\r\n\r\n            // as bit\r\n            ToStream(output, Blocked, CustomFlags, (int)UserCustomFlags.Blocked);\r\n            ToStream(output, About, CustomFlags, (int)UserCustomFlags.About);\r\n            ToStream(output, NotifyGeoAccessDate, CustomFlags, (int)UserCustomFlags.NotifyGeoAccessDate);\r\n            ToStream(output, ReadInboxMaxId, CustomFlags, (int)UserCustomFlags.ReadInboxMaxId);\r\n            ToStream(output, ReadOutboxMaxId, CustomFlags, (int)UserCustomFlags.ReadOutboxMaxId);\r\n            ToStream(output, CommonChatsCount, CustomFlags, (int)UserCustomFlags.CommonChatsCount);\r\n        }\r\n    }\r\n\r\n    public class TLUser45 : TLUser44, IReadMaxId\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUser45;\r\n\r\n        protected TLString _botInlinePlaceholder;\r\n\r\n        public TLString BotInlinePlaceholder\r\n        {\r\n            get { return _botInlinePlaceholder; }\r\n            set { SetField(out _botInlinePlaceholder, value, ref _flags, (int)UserFlags.BotInlinePlaceholder); }\r\n        }\r\n\r\n        protected TLString _about;\r\n\r\n        public TLString About\r\n        {\r\n            get { return _about; }\r\n            set { SetField(out _about, value, ref _customFlags, (int)UserCustomFlags.About); }\r\n        }\r\n\r\n        public bool BotInlineGeoAccess\r\n        {\r\n            get { return IsSet(CustomFlags, (int)UserCustomFlags.BotInlineGeoAccess); }\r\n            set { SetUnset(ref _customFlags, value, (int)UserCustomFlags.BotInlineGeoAccess); }\r\n        }\r\n\r\n        public bool BotOpenUrlPermission\r\n        {\r\n            get { return IsSet(CustomFlags, (int)UserCustomFlags.BotOpenUrlPermission); }\r\n            set { SetUnset(ref _customFlags, value, (int)UserCustomFlags.BotOpenUrlPermission); }\r\n        }\r\n\r\n        public bool BotPassTelegramNameToWebPagesPermission\r\n        {\r\n            get { return IsSet(CustomFlags, (int)UserCustomFlags.BotPassTelegramNameToWebPagesPermission); }\r\n            set { SetUnset(ref _customFlags, value, (int)UserCustomFlags.BotPassTelegramNameToWebPagesPermission); }\r\n        }\r\n\r\n        public bool BotPaymentsPermission\r\n        {\r\n            get { return IsSet(CustomFlags, (int)UserCustomFlags.BotPaymentsPermission); }\r\n            set { SetUnset(ref _customFlags, value, (int)UserCustomFlags.BotPaymentsPermission); }\r\n        }\r\n\r\n        protected TLInt _notifyGeoAccessDate;\r\n\r\n        public TLInt NotifyGeoAccessDate\r\n        {\r\n            get { return _notifyGeoAccessDate; }\r\n            set { SetField(out _notifyGeoAccessDate, value, ref _customFlags, (int)UserCustomFlags.NotifyGeoAccessDate); }\r\n        }\r\n\r\n        protected TLInt _readInboxMaxId;\r\n\r\n        public TLInt ReadInboxMaxId\r\n        {\r\n            get { return _readInboxMaxId; }\r\n            set { SetField(out _readInboxMaxId, value, ref _customFlags, (int)UserCustomFlags.ReadInboxMaxId); }\r\n        }\r\n\r\n        protected TLInt _readOutboxMaxId;\r\n\r\n        public TLInt ReadOutboxMaxId\r\n        {\r\n            get { return _readOutboxMaxId; }\r\n            set { SetField(out _readOutboxMaxId, value, ref _customFlags, (int)UserCustomFlags.ReadOutboxMaxId); }\r\n        }\r\n\r\n        protected TLInt _commonChatsCount;\r\n\r\n        public TLInt CommonChatsCount\r\n        {\r\n            get { return _commonChatsCount; }\r\n            set { SetField(out _commonChatsCount, value, ref _customFlags, (int)UserCustomFlags.CommonChatsCount); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject(Flags, (int)UserFlags.AccessHash, new TLLong(0), bytes, ref position);\r\n            _firstName = GetObject(Flags, (int)UserFlags.FirstName, TLString.Empty, bytes, ref position);\r\n            _lastName = GetObject(Flags, (int)UserFlags.LastName, TLString.Empty, bytes, ref position);\r\n            UserName = GetObject(Flags, (int)UserFlags.UserName, TLString.Empty, bytes, ref position);\r\n            Phone = GetObject(Flags, (int)UserFlags.Phone, TLString.Empty, bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)UserFlags.Photo, new TLUserProfilePhotoEmpty(), bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(Flags, (int)UserFlags.Status, new TLUserStatusEmpty(), bytes, ref position);\r\n            BotInfoVersion = GetObject(Flags, (int)UserFlags.Bot, new TLInt(0), bytes, ref position);\r\n            RestrictionReason = GetObject(Flags, (int)UserFlags.Restricted, TLString.Empty, bytes, ref position);\r\n            _botInlinePlaceholder = GetObject(Flags, (int)UserFlags.BotInlinePlaceholder, TLString.Empty, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                ToBytes(AccessHash, Flags, (int)UserFlags.AccessHash),\r\n                ToBytes(FirstName, Flags, (int)UserFlags.FirstName),\r\n                ToBytes(LastName, Flags, (int)UserFlags.LastName),\r\n                ToBytes(UserName, Flags, (int)UserFlags.UserName),\r\n                ToBytes(Phone, Flags, (int)UserFlags.Phone),\r\n                ToBytes(Photo, Flags, (int)UserFlags.Photo),\r\n                ToBytes(Status, Flags, (int)UserFlags.Status),\r\n                ToBytes(BotInfoVersion, Flags, (int)UserFlags.Bot),\r\n                ToBytes(RestrictionReason, Flags, (int)UserFlags.Restricted),\r\n                ToBytes(BotInlinePlaceholder, Flags, (int)UserFlags.BotInlinePlaceholder));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject(Flags, (int)UserFlags.AccessHash, new TLLong(0), input);\r\n            _firstName = GetObject(Flags, (int)UserFlags.FirstName, TLString.Empty, input);\r\n            _lastName = GetObject(Flags, (int)UserFlags.LastName, TLString.Empty, input);\r\n            UserName = GetObject(Flags, (int)UserFlags.UserName, TLString.Empty, input);\r\n            Phone = GetObject(Flags, (int)UserFlags.Phone, TLString.Empty, input);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)UserFlags.Photo, new TLUserProfilePhotoEmpty(), input);\r\n            _status = GetObject<TLUserStatus>(Flags, (int)UserFlags.Status, new TLUserStatusEmpty(), input);\r\n            BotInfoVersion = GetObject(Flags, (int)UserFlags.Bot, new TLInt(0), input);\r\n            RestrictionReason = GetObject(Flags, (int)UserFlags.Restricted, TLString.Empty, input);\r\n            BotInlinePlaceholder = GetObject(Flags, (int)UserFlags.BotInlinePlaceholder, TLString.Empty, input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            NotifySettings = GetNullableObject<TLPeerNotifySettingsBase>(input);\r\n            ExtendedInfo = GetNullableObject<TLUserExtendedInfo>(input);\r\n            BotInfo = GetNullableObject<TLBotInfoBase>(input);\r\n\r\n            // as bit\r\n            _blocked = GetObject<TLBool>(CustomFlags, (int)UserCustomFlags.Blocked, null, input);\r\n            _about = GetObject<TLString>(CustomFlags, (int)UserCustomFlags.About, null, input);\r\n            _notifyGeoAccessDate = GetObject<TLInt>(CustomFlags, (int)UserCustomFlags.NotifyGeoAccessDate, null, input);\r\n\r\n            _readInboxMaxId = GetObject<TLInt>(CustomFlags, (int)UserCustomFlags.ReadInboxMaxId, null, input);\r\n            _readOutboxMaxId = GetObject<TLInt>(CustomFlags, (int)UserCustomFlags.ReadOutboxMaxId, null, input);\r\n            _commonChatsCount = GetObject<TLInt>(CustomFlags, (int)UserCustomFlags.CommonChatsCount, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void Update(TLUserBase userBase)\r\n        {\r\n            var user = userBase as TLUser45;\r\n            if (user != null)\r\n            {\r\n                if (user.Min)\r\n                {\r\n                    _firstName = user.FirstName ?? TLString.Empty;\r\n                    _lastName = user.LastName ?? TLString.Empty;\r\n                    _photo = user.Photo ?? new TLUserProfilePhotoEmpty();\r\n\r\n                    return;\r\n                }\r\n\r\n                // set bits\r\n                Flags = user.Flags;\r\n                //IsSelf = user.IsSelf;\r\n                //IsContact = user.IsContact;\r\n                //IsMutualContact = user.IsMutualContact;\r\n                //IsDeleted = user.IsDeleted;\r\n                //IsBot = user.IsBot;\r\n                //IsBotAllHistory = user.IsBotAllHistory;\r\n                //IsBotGroupsBlocked = user.IsBotGroupsBlocked;\r\n                //IsVerified = user.IsVerified;\r\n                //IsRestricted = user.IsRestricted;\r\n                //IsBotInlineGeo = user.IsBotInlineGeo;\r\n                // end set bits\r\n\r\n                Id = user.Id;\r\n                AccessHash = user.AccessHash ?? new TLLong(0);\r\n                _firstName = user.FirstName ?? TLString.Empty;\r\n                _lastName = user.LastName ?? TLString.Empty;\r\n                UserName = user.UserName ?? TLString.Empty;\r\n                Phone = user.Phone ?? TLString.Empty;\r\n                if (Photo != null\r\n                    && user.Photo != null\r\n                    && Photo.GetType() == user.Photo.GetType())\r\n                {\r\n                    Photo.Update(user.Photo);\r\n                }\r\n                else\r\n                {\r\n                    _photo = user.Photo ?? new TLUserProfilePhotoEmpty();\r\n                }\r\n                _status = user.Status ?? new TLUserStatusEmpty();\r\n                BotInfoVersion = user.BotInfoVersion ?? new TLInt(0);\r\n                RestrictionReason = user.RestrictionReason ?? TLString.Empty;\r\n                _botInlinePlaceholder = user.BotInlinePlaceholder ?? TLString.Empty;\r\n\r\n\r\n                if (user.ReadInboxMaxId != null\r\n                    && (ReadInboxMaxId == null || ReadInboxMaxId.Value < user.ReadInboxMaxId.Value))\r\n                {\r\n                    ReadInboxMaxId = user.ReadInboxMaxId;\r\n                }\r\n\r\n                if (user.ReadOutboxMaxId != null\r\n                    && (ReadOutboxMaxId == null || ReadOutboxMaxId.Value < user.ReadOutboxMaxId.Value))\r\n                {\r\n                    ReadOutboxMaxId = user.ReadOutboxMaxId;\r\n                }\r\n\r\n                if (user.About != null)\r\n                {\r\n                    About = user.About;\r\n                }\r\n\r\n                if (user.NotifyGeoAccessDate != null)\r\n                {\r\n                    NotifyGeoAccessDate = user.NotifyGeoAccessDate;\r\n                }\r\n\r\n                if (user.BotInlineGeoAccess)\r\n                {\r\n                    BotInlineGeoAccess = true;\r\n                }\r\n\r\n                if (user.BotInfo != null)\r\n                {\r\n                    BotInfo = user.BotInfo;\r\n                }\r\n\r\n                if (user.Contact != null)\r\n                {\r\n                    Contact = user.Contact;\r\n                }\r\n\r\n                if (user.Link != null)\r\n                {\r\n                    Link = user.Link;\r\n                }\r\n\r\n                if (user.ProfilePhoto != null)\r\n                {\r\n                    ProfilePhoto = user.ProfilePhoto;\r\n                }\r\n\r\n                if (user.NotifySettings != null)\r\n                {\r\n                    NotifySettings = user.NotifySettings;\r\n                }\r\n\r\n                if (user.ExtendedInfo != null)\r\n                {\r\n                    ExtendedInfo = user.ExtendedInfo;\r\n                }\r\n\r\n                if (user.Blocked != null)\r\n                {\r\n                    Blocked = user.Blocked;\r\n                }\r\n\r\n                if (user.CommonChatsCount != null)\r\n                {\r\n                    CommonChatsCount = user.CommonChatsCount;\r\n                }\r\n            }\r\n\r\n            //base.Update(userBase);\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            ToStream(output, AccessHash, Flags, (int)UserFlags.AccessHash);\r\n            ToStream(output, FirstName, Flags, (int)UserFlags.FirstName);\r\n            ToStream(output, LastName, Flags, (int)UserFlags.LastName);\r\n            ToStream(output, UserName, Flags, (int)UserFlags.UserName);\r\n            ToStream(output, Phone, Flags, (int)UserFlags.Phone);\r\n            ToStream(output, Photo, Flags, (int)UserFlags.Photo);\r\n            ToStream(output, Status, Flags, (int)UserFlags.Status);\r\n            ToStream(output, BotInfoVersion, Flags, (int)UserFlags.Bot);\r\n            ToStream(output, RestrictionReason, Flags, (int)UserFlags.Restricted);\r\n            ToStream(output, BotInlinePlaceholder, Flags, (int)UserFlags.BotInlinePlaceholder);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            BotInfo.NullableToStream(output);\r\n\r\n            // as bit\r\n            ToStream(output, Blocked, CustomFlags, (int)UserCustomFlags.Blocked);\r\n            ToStream(output, About, CustomFlags, (int)UserCustomFlags.About);\r\n            ToStream(output, NotifyGeoAccessDate, CustomFlags, (int)UserCustomFlags.NotifyGeoAccessDate);\r\n            ToStream(output, ReadInboxMaxId, CustomFlags, (int)UserCustomFlags.ReadInboxMaxId);\r\n            ToStream(output, ReadOutboxMaxId, CustomFlags, (int)UserCustomFlags.ReadOutboxMaxId);\r\n            ToStream(output, CommonChatsCount, CustomFlags, (int)UserCustomFlags.CommonChatsCount);\r\n        }\r\n    }\r\n\r\n    public class TLUser44 : TLUser\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUser44;\r\n\r\n        public TLString RestrictionReason { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject(Flags, (int)UserFlags.AccessHash, new TLLong(0), bytes, ref position);\r\n            _firstName = GetObject(Flags, (int)UserFlags.FirstName, TLString.Empty, bytes, ref position);\r\n            _lastName = GetObject(Flags, (int)UserFlags.LastName, TLString.Empty, bytes, ref position);\r\n            UserName = GetObject(Flags, (int)UserFlags.UserName, TLString.Empty, bytes, ref position);\r\n            Phone = GetObject(Flags, (int)UserFlags.Phone, TLString.Empty, bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)UserFlags.Photo, new TLUserProfilePhotoEmpty(), bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(Flags, (int)UserFlags.Status, new TLUserStatusEmpty(), bytes, ref position);\r\n            BotInfoVersion = GetObject(Flags, (int)UserFlags.Bot, new TLInt(0), bytes, ref position);\r\n            RestrictionReason = GetObject(Flags, (int)UserFlags.Restricted, TLString.Empty, bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)UserFlags.Bot)\r\n                || IsSet(Flags, (int)UserFlags.BotAllHistory))\r\n            {\r\n                return this;\r\n            }\r\n\r\n            if (IsSet(Flags, (int)UserFlags.AccessHash))\r\n            {\r\n                if (IsSet(Flags, (int)UserFlags.Contact)\r\n                    || IsSet(Flags, (int)UserFlags.ContactMutual))\r\n                {\r\n                    var userContact = new TLUserContact18\r\n                    {\r\n                        Id = Id,\r\n                        AccessHash = AccessHash,\r\n                        _firstName = _firstName,\r\n                        _lastName = _lastName,\r\n                        UserName = UserName,\r\n                        Phone = Phone,\r\n                        _photo = _photo,\r\n                        _status = _status,\r\n                    };\r\n\r\n                    return userContact;\r\n                }\r\n\r\n                if (IsSet(Flags, (int)UserFlags.Phone))\r\n                {\r\n                    var userRequest = new TLUserRequest18\r\n                    {\r\n                        Id = Id,\r\n                        AccessHash = AccessHash,\r\n                        _firstName = _firstName,\r\n                        _lastName = _lastName,\r\n                        UserName = UserName,\r\n                        Phone = Phone,\r\n                        _photo = _photo,\r\n                        _status = _status,\r\n                    };\r\n\r\n                    return userRequest;\r\n                }\r\n\r\n                var userForeign = new TLUserForeign18\r\n                {\r\n                    Id = Id,\r\n                    AccessHash = AccessHash,\r\n                    _firstName = _firstName,\r\n                    _lastName = _lastName,\r\n                    UserName = UserName,\r\n                    _photo = _photo,\r\n                    _status = _status,\r\n                };\r\n\r\n                return userForeign;\r\n            }\r\n\r\n            if (IsSet(Flags, (int)UserFlags.Deleted))\r\n            {\r\n                var userDeleted = new TLUserDeleted18\r\n                {\r\n                    Id = Id,\r\n                    _firstName = _firstName,\r\n                    _lastName = _lastName,\r\n                    UserName = UserName\r\n                };\r\n\r\n                return userDeleted;\r\n            }\r\n\r\n            if (IsSet(Flags, (int)UserFlags.Self))\r\n            {\r\n                var userSelf = new TLUserSelf24\r\n                {\r\n                    Id = Id,\r\n                    _firstName = _firstName,\r\n                    _lastName = _lastName,\r\n                    UserName = UserName,\r\n                    Phone = Phone,\r\n                    _photo = _photo,\r\n                    _status = _status,\r\n                };\r\n\r\n                return userSelf;\r\n            }\r\n\r\n            Helpers.Execute.ShowDebugMessage(\"TLUser unknown \" + FullName);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                ToBytes(AccessHash, Flags, (int)UserFlags.AccessHash),\r\n                ToBytes(FirstName, Flags, (int)UserFlags.FirstName),\r\n                ToBytes(LastName, Flags, (int)UserFlags.LastName),\r\n                ToBytes(UserName, Flags, (int)UserFlags.UserName),\r\n                ToBytes(Phone, Flags, (int)UserFlags.Phone),\r\n                ToBytes(Photo, Flags, (int)UserFlags.Photo),\r\n                ToBytes(Status, Flags, (int)UserFlags.Status),\r\n                ToBytes(BotInfoVersion, Flags, (int)UserFlags.Bot),\r\n                ToBytes(RestrictionReason, Flags, (int)UserFlags.Restricted));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject(Flags, (int)UserFlags.AccessHash, new TLLong(0), input);\r\n            _firstName = GetObject(Flags, (int)UserFlags.FirstName, TLString.Empty, input);\r\n            _lastName = GetObject(Flags, (int)UserFlags.LastName, TLString.Empty, input);\r\n            UserName = GetObject(Flags, (int)UserFlags.UserName, TLString.Empty, input);\r\n            Phone = GetObject(Flags, (int)UserFlags.Phone, TLString.Empty, input);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)UserFlags.Photo, new TLUserProfilePhotoEmpty(), input);\r\n            _status = GetObject<TLUserStatus>(Flags, (int)UserFlags.Status, new TLUserStatusEmpty(), input);\r\n            BotInfoVersion = GetObject(Flags, (int)UserFlags.Bot, new TLInt(0), input);\r\n            RestrictionReason = GetObject(Flags, (int)UserFlags.Restricted, TLString.Empty, input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            NotifySettings = GetNullableObject<TLPeerNotifySettingsBase>(input);\r\n            ExtendedInfo = GetNullableObject<TLUserExtendedInfo>(input);\r\n            BotInfo = GetNullableObject<TLBotInfoBase>(input);\r\n\r\n            // as bit\r\n            _blocked = GetObject<TLBool>(CustomFlags, (int)UserCustomFlags.Blocked, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void Update(TLUserBase userBase)\r\n        {\r\n            base.Update(userBase);\r\n\r\n            var user = userBase as TLUser44;\r\n            if (user != null)\r\n            {\r\n                if (user.RestrictionReason != null)\r\n                {\r\n                    RestrictionReason = user.RestrictionReason;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            ToStream(output, AccessHash, Flags, (int)UserFlags.AccessHash);\r\n            ToStream(output, FirstName, Flags, (int)UserFlags.FirstName);\r\n            ToStream(output, LastName, Flags, (int)UserFlags.LastName);\r\n            ToStream(output, UserName, Flags, (int)UserFlags.UserName);\r\n            ToStream(output, Phone, Flags, (int)UserFlags.Phone);\r\n            ToStream(output, Photo, Flags, (int)UserFlags.Photo);\r\n            ToStream(output, Status, Flags, (int)UserFlags.Status);\r\n            ToStream(output, BotInfoVersion, Flags, (int)UserFlags.Bot);\r\n            ToStream(output, RestrictionReason, Flags, (int)UserFlags.Restricted);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            BotInfo.NullableToStream(output);\r\n\r\n            // as bit\r\n            ToStream(output, Blocked, CustomFlags, (int)UserCustomFlags.Blocked);\r\n        }\r\n    }\r\n\r\n    public class TLUser : TLUserBase, IUserName\r\n    {\r\n        public const uint Signature = TLConstructors.TLUser;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override bool IsForeign\r\n        {\r\n            get\r\n            {\r\n                return\r\n                    IsSet(Flags, (int)UserFlags.AccessHash)\r\n                    && !IsSet(Flags, (int)UserFlags.Phone)\r\n                    && !IsSet(Flags, (int)UserFlags.Self)\r\n                    && !IsSet(Flags, (int)UserFlags.Contact)\r\n                    && !IsSet(Flags, (int)UserFlags.ContactMutual);\r\n            }\r\n        }\r\n\r\n        public override bool IsRequest\r\n        {\r\n            get\r\n            {\r\n                return\r\n                    IsSet(Flags, (int)UserFlags.AccessHash)\r\n                    && IsSet(Flags, (int)UserFlags.Phone)\r\n                    && !IsSet(Flags, (int)UserFlags.Self)\r\n                    && !IsSet(Flags, (int)UserFlags.Contact)\r\n                    && !IsSet(Flags, (int)UserFlags.ContactMutual);\r\n            }\r\n        }\r\n\r\n        public override bool IsSelf\r\n        {\r\n            get { return IsSet(Flags, (int)UserFlags.Self); }\r\n            set { SetUnset(ref _flags, value, (int)UserFlags.Self); }\r\n        }\r\n\r\n        public override bool IsContact\r\n        {\r\n            get { return IsSet(Flags, (int)UserFlags.Contact); }\r\n            set { SetUnset(ref _flags, value, (int)UserFlags.Contact); }\r\n        }\r\n\r\n        public override bool IsContactMutual\r\n        {\r\n            get { return IsSet(Flags, (int)UserFlags.ContactMutual); }\r\n            set { SetUnset(ref _flags, value, (int)UserFlags.ContactMutual); }\r\n        }\r\n\r\n        public override bool IsDeleted\r\n        {\r\n            get { return IsSet(Flags, (int)UserFlags.Deleted); }\r\n            set { SetUnset(ref _flags, value, (int)UserFlags.Deleted); }\r\n        }\r\n\r\n        public bool IsBot\r\n        {\r\n            get { return IsSet(Flags, (int)UserFlags.Bot); }\r\n            set { SetUnset(ref _flags, value, (int)UserFlags.Bot); }\r\n        }\r\n\r\n        public bool IsBotAllHistory\r\n        {\r\n            get { return IsSet(Flags, (int)UserFlags.BotAllHistory); }\r\n            set { SetUnset(ref _flags, value, (int)UserFlags.BotAllHistory); }\r\n        }\r\n\r\n        public bool IsBotGroupsBlocked\r\n        {\r\n            get { return IsSet(Flags, (int)UserFlags.BotGroupsBlocked); }\r\n            set { SetUnset(ref _flags, value, (int)UserFlags.BotGroupsBlocked); }\r\n        }\r\n\r\n        public override bool IsVerified\r\n        {\r\n            get { return IsSet(Flags, (int)UserFlags.Verified); }\r\n            set { SetUnset(ref _flags, value, (int)UserFlags.Verified); }\r\n        }\r\n\r\n        public bool IsRestricted\r\n        {\r\n            get { return IsSet(Flags, (int)ChannelFlags.Restricted); }\r\n            set { SetUnset(ref _flags, value, (int)UserFlags.Restricted); }\r\n        }\r\n\r\n        public bool Min { get { return IsSet(Flags, (int)UserFlags.Min); } }\r\n\r\n        public bool IsBotInlineGeo\r\n        {\r\n            get { return IsSet(Flags, (int)UserFlags.BotInlineGeo); }\r\n            set { SetUnset(ref _flags, value, (int)UserFlags.BotInlineGeo); }\r\n        }\r\n\r\n        public bool IsInlineBot\r\n        {\r\n            get { return IsSet(Flags, (int)UserFlags.BotInlinePlaceholder); }\r\n        }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLString UserName { get; set; }\r\n\r\n        public TLInt BotInfoVersion { get; set; }\r\n\r\n        protected TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        protected TLBool _blocked;\r\n\r\n        public override TLBool Blocked\r\n        {\r\n            get { return _blocked; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    Set(ref _customFlags, (int)UserCustomFlags.Blocked);\r\n                    _blocked = value;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return base.ToString() + string.Format(\" flags={0} custom_flags={1}\", UserFlagsString(Flags), UserCustomFlagsString(CustomFlags));\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            AccessHash = GetObject(Flags, (int)UserFlags.AccessHash, new TLLong(0), bytes, ref position);\r\n            _firstName = GetObject(Flags, (int)UserFlags.FirstName, TLString.Empty, bytes, ref position);\r\n            _lastName = GetObject(Flags, (int)UserFlags.LastName, TLString.Empty, bytes, ref position);\r\n            UserName = GetObject(Flags, (int)UserFlags.UserName, TLString.Empty, bytes, ref position);\r\n            Phone = GetObject(Flags, (int)UserFlags.Phone, TLString.Empty, bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)UserFlags.Photo, new TLUserProfilePhotoEmpty(), bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(Flags, (int)UserFlags.Status, new TLUserStatusEmpty(), bytes, ref position);\r\n            BotInfoVersion = GetObject(Flags, (int)UserFlags.Bot, new TLInt(0), bytes, ref position);\r\n\r\n            if (IsSet(Flags, (int)UserFlags.Bot)\r\n                || IsSet(Flags, (int)UserFlags.BotAllHistory))\r\n            {\r\n                return this;\r\n            }\r\n\r\n            if (IsSet(Flags, (int)UserFlags.AccessHash))\r\n            {\r\n                if (IsSet(Flags, (int)UserFlags.Contact)\r\n                    || IsSet(Flags, (int)UserFlags.ContactMutual))\r\n                {\r\n                    var userContact = new TLUserContact18\r\n                    {\r\n                        Id = Id,\r\n                        AccessHash = AccessHash,\r\n                        _firstName = _firstName,\r\n                        _lastName = _lastName,\r\n                        UserName = UserName,\r\n                        Phone = Phone,\r\n                        _photo = _photo,\r\n                        _status = _status,\r\n                    };\r\n\r\n                    return userContact;\r\n                }\r\n\r\n                if (IsSet(Flags, (int)UserFlags.Phone))\r\n                {\r\n                    var userRequest = new TLUserRequest18\r\n                    {\r\n                        Id = Id,\r\n                        AccessHash = AccessHash,\r\n                        _firstName = _firstName,\r\n                        _lastName = _lastName,\r\n                        UserName = UserName,\r\n                        Phone = Phone,\r\n                        _photo = _photo,\r\n                        _status = _status,\r\n                    };\r\n\r\n                    return userRequest;\r\n                }\r\n\r\n                var userForeign = new TLUserForeign18\r\n                {\r\n                    Id = Id,\r\n                    AccessHash = AccessHash,\r\n                    _firstName = _firstName,\r\n                    _lastName = _lastName,\r\n                    UserName = UserName,\r\n                    _photo = _photo,\r\n                    _status = _status,\r\n                };\r\n\r\n                return userForeign;\r\n            }\r\n\r\n            if (IsSet(Flags, (int)UserFlags.Deleted))\r\n            {\r\n                var userDeleted = new TLUserDeleted18\r\n                {\r\n                    Id = Id,\r\n                    _firstName = _firstName,\r\n                    _lastName = _lastName,\r\n                    UserName = UserName\r\n                };\r\n\r\n                return userDeleted;\r\n            }\r\n\r\n            if (IsSet(Flags, (int)UserFlags.Self))\r\n            {\r\n                var userSelf = new TLUserSelf24\r\n                {\r\n                    Id = Id,\r\n                    _firstName = _firstName,\r\n                    _lastName = _lastName,\r\n                    UserName = UserName,\r\n                    Phone = Phone,\r\n                    _photo = _photo,\r\n                    _status = _status,\r\n                };\r\n\r\n                return userSelf;\r\n            }\r\n\r\n            Helpers.Execute.ShowDebugMessage(\"TLUser unknown \" + FullName);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                ToBytes(AccessHash, Flags, (int)UserFlags.AccessHash),\r\n                ToBytes(FirstName, Flags, (int)UserFlags.FirstName),\r\n                ToBytes(LastName, Flags, (int)UserFlags.LastName),\r\n                ToBytes(UserName, Flags, (int)UserFlags.UserName),\r\n                ToBytes(Phone, Flags, (int)UserFlags.Phone),\r\n                ToBytes(Photo, Flags, (int)UserFlags.Photo),\r\n                ToBytes(Status, Flags, (int)UserFlags.Status),\r\n                ToBytes(BotInfoVersion, Flags, (int)UserFlags.Bot));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            AccessHash = GetObject(Flags, (int)UserFlags.AccessHash, new TLLong(0), input);\r\n            _firstName = GetObject(Flags, (int)UserFlags.FirstName, TLString.Empty, input);\r\n            _lastName = GetObject(Flags, (int)UserFlags.LastName, TLString.Empty, input);\r\n            UserName = GetObject(Flags, (int)UserFlags.UserName, TLString.Empty, input);\r\n            Phone = GetObject(Flags, (int)UserFlags.Phone, TLString.Empty, input);\r\n            _photo = GetObject<TLPhotoBase>(Flags, (int)UserFlags.Photo, new TLUserProfilePhotoEmpty(), input);\r\n            _status = GetObject<TLUserStatus>(Flags, (int)UserFlags.Status, new TLUserStatusEmpty(), input);\r\n            BotInfoVersion = GetObject(Flags, (int)UserFlags.Bot, new TLInt(0), input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            NotifySettings = GetNullableObject<TLPeerNotifySettingsBase>(input);\r\n            ExtendedInfo = GetNullableObject<TLUserExtendedInfo>(input);\r\n            BotInfo = GetNullableObject<TLBotInfoBase>(input);\r\n\r\n            // as bit\r\n            _blocked = GetObject<TLBool>(CustomFlags, (int)UserCustomFlags.Blocked, null, input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void Update(TLUserBase userBase)\r\n        {\r\n            base.Update(userBase);\r\n\r\n            var user = userBase as TLUser;\r\n            if (user != null)\r\n            {\r\n                Flags = user.Flags;\r\n                Id = user.Id;\r\n                AccessHash = user.AccessHash;\r\n                UserName = user.UserName;\r\n                BotInfoVersion = user.BotInfoVersion;\r\n\r\n                //if (user.CustomFlags != null) // will be erased user.NotifyGeoAccessDate user.BotInlineGeoAccess after user.getFullUser\r\n                //{\r\n                //    CustomFlags = user.CustomFlags;\r\n                //}\r\n\r\n                if (user.BotInfo != null)\r\n                {\r\n                    BotInfo = user.BotInfo;\r\n                }\r\n            }\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            ToStream(output, AccessHash, Flags, (int)UserFlags.AccessHash);\r\n            ToStream(output, FirstName, Flags, (int)UserFlags.FirstName);\r\n            ToStream(output, LastName, Flags, (int)UserFlags.LastName);\r\n            ToStream(output, UserName, Flags, (int)UserFlags.UserName);\r\n            ToStream(output, Phone, Flags, (int)UserFlags.Phone);\r\n            ToStream(output, Photo, Flags, (int)UserFlags.Photo);\r\n            ToStream(output, Status, Flags, (int)UserFlags.Status);\r\n            ToStream(output, BotInfoVersion, Flags, (int)UserFlags.Bot);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            BotInfo.NullableToStream(output);\r\n\r\n            // as bit\r\n            ToStream(output, Blocked, CustomFlags, (int)UserCustomFlags.Blocked);\r\n        }\r\n\r\n        public override TLInputUserBase ToInputUser()\r\n        {\r\n            if (IsSet(Flags, (int)UserFlags.AccessHash))\r\n            {\r\n                if (IsSet(Flags, (int)UserFlags.Contact)\r\n                    || IsSet(Flags, (int)UserFlags.ContactMutual))\r\n                {\r\n                    var userContact = new TLInputUser\r\n                    {\r\n                        UserId = Id,\r\n                        AccessHash = new TLLong(0)\r\n                    };\r\n\r\n                    return userContact;\r\n                }\r\n\r\n                var userForeign = new TLInputUser\r\n                {\r\n                    UserId = Id,\r\n                    AccessHash = AccessHash\r\n                };\r\n\r\n                return userForeign;\r\n            }\r\n\r\n            if (IsSet(Flags, (int)UserFlags.Deleted))\r\n            {\r\n                var userDeleted = new TLInputUser { UserId = Id, AccessHash = new TLLong(0) };\r\n\r\n                return userDeleted;\r\n            }\r\n\r\n            if (IsSet(Flags, (int)UserFlags.Self))\r\n            {\r\n                var userSelf = new TLInputUserSelf();\r\n\r\n                return userSelf;\r\n            }\r\n\r\n            Helpers.Execute.ShowDebugMessage(\"TLUser.ToInputUser unknown \" + FullName);\r\n\r\n            return null;\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            if (IsSet(Flags, (int)UserFlags.AccessHash))\r\n            {\r\n                if (IsSet(Flags, (int)UserFlags.Contact)\r\n                    || IsSet(Flags, (int)UserFlags.ContactMutual))\r\n                {\r\n                    var userContact = new TLInputPeerUser\r\n                    {\r\n                        UserId = Id,\r\n                        AccessHash = new TLLong(0)\r\n                    };\r\n\r\n                    return userContact;\r\n                }\r\n\r\n                var userForeign = new TLInputPeerUser\r\n                {\r\n                    UserId = Id,\r\n                    AccessHash = AccessHash\r\n                };\r\n\r\n                return userForeign;\r\n            }\r\n\r\n            if (IsSet(Flags, (int)UserFlags.Deleted))\r\n            {\r\n                var userDeleted = new TLInputPeerUser { UserId = Id, AccessHash = new TLLong(0) };\r\n\r\n                return userDeleted;\r\n            }\r\n\r\n            if (IsSet(Flags, (int)UserFlags.Self))\r\n            {\r\n                var userSelf = new TLInputPeerSelf();\r\n\r\n                return userSelf;\r\n            }\r\n\r\n            Helpers.Execute.ShowDebugMessage(\"TLUser.ToInputPeer unknown \" + FullName);\r\n\r\n            return null;\r\n        }\r\n\r\n        //public string AccessToken { get; set; }\r\n    }\r\n\r\n    public class TLUserEmpty : TLUserBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n        }\r\n\r\n        public override void Update(TLUserBase user)\r\n        {\r\n            return;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLInputUserBase ToInputUser()\r\n        {\r\n            return new TLInputUser { UserId = Id, AccessHash = new TLLong(0) };\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerUser { UserId = Id, AccessHash = new TLLong(0) };\r\n        }\r\n\r\n        public override bool IsDeleted\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsSelf\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsForeign\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        public override bool IsRequest\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        public override bool IsContact\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsContactMutual\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n    }\r\n\r\n    public abstract class TLUserSelfBase : TLUserBase\r\n    {\r\n        public override bool HasPhone { get { return true; } }\r\n\r\n        public override TLInputUserBase ToInputUser()\r\n        {\r\n            return new TLInputUserSelf();\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerSelf();\r\n        }\r\n\r\n        public override bool IsDeleted\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsSelf\r\n        {\r\n            get { return true; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsForeign\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        public override bool IsRequest\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        public override bool IsContact\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsContactMutual\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n    }\r\n\r\n    public class TLUserSelf : TLUserSelfBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserSelf;\r\n\r\n        public TLBool Inactive { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _firstName = GetObject<TLString>(bytes, ref position);\r\n            _lastName = GetObject<TLString>(bytes, ref position);\r\n            Phone = GetObject<TLString>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(bytes, ref position);\r\n            Inactive = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                Phone.ToBytes(),\r\n                Photo.ToBytes(),\r\n                Status.ToBytes(),\r\n                Inactive.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _firstName = GetObject<TLString>(input);\r\n            _lastName = GetObject<TLString>(input);\r\n            Phone = GetObject<TLString>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            _status = GetObject<TLUserStatus>(input);\r\n            Inactive = GetObject<TLBool>(input);\r\n\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n            ExtendedInfo = GetObject<TLObject>(input) as TLUserExtendedInfo;\r\n            Contact = GetObject<TLObject>(input) as TLContact;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n            output.Write(Phone.ToBytes());\r\n            Photo.ToStream(output);\r\n            Status.ToStream(output);\r\n            output.Write(Inactive.ToBytes());\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            Contact.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLUserBase user)\r\n        {\r\n            base.Update(user);\r\n\r\n            Inactive = ((TLUserSelf)user).Inactive;\r\n        }\r\n    }\r\n\r\n    public class TLUserSelf18 : TLUserSelfBase, IUserName\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserSelf18;\r\n\r\n        public TLString UserName { get; set; }\r\n        public TLBool Inactive { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _firstName = GetObject<TLString>(bytes, ref position);\r\n            _lastName = GetObject<TLString>(bytes, ref position);\r\n            UserName = GetObject<TLString>(bytes, ref position);\r\n            Phone = GetObject<TLString>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(bytes, ref position);\r\n            Inactive = GetObject<TLBool>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                UserName.ToBytes(),\r\n                Phone.ToBytes(),\r\n                Photo.ToBytes(),\r\n                Status.ToBytes(),\r\n                Inactive.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _firstName = GetObject<TLString>(input);\r\n            _lastName = GetObject<TLString>(input);\r\n            UserName = GetObject<TLString>(input);\r\n            Phone = GetObject<TLString>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            _status = GetObject<TLUserStatus>(input);\r\n            Inactive = GetObject<TLBool>(input);\r\n\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n            ExtendedInfo = GetObject<TLObject>(input) as TLUserExtendedInfo;\r\n            Contact = GetObject<TLObject>(input) as TLContact;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n            output.Write(UserName.ToBytes());\r\n            output.Write(Phone.ToBytes());\r\n            Photo.ToStream(output);\r\n            Status.ToStream(output);\r\n            output.Write(Inactive.ToBytes());\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            Contact.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLUserBase user)\r\n        {\r\n            base.Update(user);\r\n\r\n            var user18 = user as TLUserSelf18;\r\n            if (user18 != null)\r\n            {\r\n                UserName = user18.UserName;\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var userNameString = UserName != null ? \" @\" + UserName : string.Empty;\r\n            return base.ToString() + userNameString;\r\n        }\r\n    }\r\n\r\n    public class TLUserSelf24 : TLUserSelfBase, IUserName\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserSelf24;\r\n\r\n        public TLString UserName { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _firstName = GetObject<TLString>(bytes, ref position);\r\n            _lastName = GetObject<TLString>(bytes, ref position);\r\n            UserName = GetObject<TLString>(bytes, ref position);\r\n            Phone = GetObject<TLString>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                UserName.ToBytes(),\r\n                Phone.ToBytes(),\r\n                Photo.ToBytes(),\r\n                Status.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _firstName = GetObject<TLString>(input);\r\n            _lastName = GetObject<TLString>(input);\r\n            UserName = GetObject<TLString>(input);\r\n            Phone = GetObject<TLString>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            _status = GetObject<TLUserStatus>(input);\r\n\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n            ExtendedInfo = GetObject<TLObject>(input) as TLUserExtendedInfo;\r\n            Contact = GetObject<TLObject>(input) as TLContact;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n            output.Write(UserName.ToBytes());\r\n            output.Write(Phone.ToBytes());\r\n            Photo.ToStream(output);\r\n            Status.ToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            Contact.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLUserBase user)\r\n        {\r\n            base.Update(user);\r\n\r\n            var userName = user as IUserName;\r\n            if (userName != null)\r\n            {\r\n                UserName = userName.UserName;\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var userNameString = UserName != null ? \" @\" + UserName : string.Empty;\r\n            return base.ToString() + userNameString;\r\n        }\r\n    }\r\n\r\n    public class TLUserContact18 : TLUserContact, IUserName\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUserContact18;\r\n\r\n        public TLString UserName { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _firstName = GetObject<TLString>(bytes, ref position);\r\n            _lastName = GetObject<TLString>(bytes, ref position);\r\n            UserName = GetObject<TLString>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Phone = GetObject<TLString>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                UserName.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Phone.ToBytes(),\r\n                Photo.ToBytes(),\r\n                Status.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _firstName = GetObject<TLString>(input);\r\n            _lastName = GetObject<TLString>(input);\r\n            UserName = GetObject<TLString>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Phone = GetObject<TLString>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            _status = GetObject<TLUserStatus>(input);\r\n\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n            ExtendedInfo = GetObject<TLObject>(input) as TLUserExtendedInfo;\r\n            Contact = GetObject<TLObject>(input) as TLContact;\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n            output.Write(UserName.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Phone.ToBytes());\r\n            Photo.ToStream(output);\r\n            Status.ToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            Contact.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLUserBase user)\r\n        {\r\n            base.Update(user);\r\n\r\n            var user18 = user as TLUserContact18;\r\n            if (user18 != null)\r\n            {\r\n                UserName = user18.UserName;\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var userNameString = !TLString.IsNullOrEmpty(UserName) ? \" @\" + UserName : string.Empty;\r\n            return base.ToString() + userNameString;\r\n        }\r\n    }\r\n\r\n    public class TLUserContact : TLUserBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserContact;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _firstName = GetObject<TLString>(bytes, ref position);\r\n            _lastName = GetObject<TLString>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Phone = GetObject<TLString>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Phone.ToBytes(),\r\n                Photo.ToBytes(),\r\n                Status.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _firstName = GetObject<TLString>(input);\r\n            _lastName = GetObject<TLString>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Phone = GetObject<TLString>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            _status = GetObject<TLUserStatus>(input);\r\n\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n            ExtendedInfo = GetObject<TLObject>(input) as TLUserExtendedInfo;\r\n            Contact = GetObject<TLObject>(input) as TLContact;\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Phone.ToBytes());\r\n            Photo.ToStream(output);\r\n            Status.ToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            Contact.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLUserBase user)\r\n        {\r\n            base.Update(user);\r\n\r\n            AccessHash = ((TLUserContact)user).AccessHash;\r\n        }\r\n\r\n        public override TLInputUserBase ToInputUser()\r\n        {\r\n            return new TLInputUser { UserId = Id, AccessHash = new TLLong(0) };\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerUser { UserId = Id, AccessHash = new TLLong(0) };\r\n        }\r\n\r\n        public override bool IsDeleted\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsSelf\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsForeign\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        public override bool IsRequest\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        public override bool IsContact\r\n        {\r\n            get { return true; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsContactMutual\r\n        {\r\n            get { return Contact != null && Contact.Mutual.Value; }\r\n            set { }\r\n        }\r\n    }\r\n\r\n    public class TLUserRequest18 : TLUserRequest, IUserName\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUserRequest18;\r\n\r\n        public TLString UserName { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _firstName = GetObject<TLString>(bytes, ref position);\r\n            _lastName = GetObject<TLString>(bytes, ref position);\r\n            UserName = GetObject<TLString>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Phone = GetObject<TLString>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                UserName.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Phone.ToBytes(),\r\n                Photo.ToBytes(),\r\n                Status.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _firstName = GetObject<TLString>(input);\r\n            _lastName = GetObject<TLString>(input);\r\n            UserName = GetObject<TLString>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Phone = GetObject<TLString>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            _status = GetObject<TLUserStatus>(input);\r\n\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n            ExtendedInfo = GetObject<TLObject>(input) as TLUserExtendedInfo;\r\n            Contact = GetObject<TLObject>(input) as TLContact;\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n            output.Write(UserName.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Phone.ToBytes());\r\n            Photo.ToStream(output);\r\n            Status.ToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            Contact.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLUserBase user)\r\n        {\r\n            base.Update(user);\r\n\r\n            var user18 = user as TLUserRequest18;\r\n            if (user18 != null)\r\n            {\r\n                UserName = user18.UserName;\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var userNameString = UserName != null ? \" @\" + UserName : string.Empty;\r\n            return base.ToString() + userNameString;\r\n        }\r\n    }\r\n\r\n    public class TLUserRequest : TLUserBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserRequest;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _firstName = GetObject<TLString>(bytes, ref position);\r\n            _lastName = GetObject<TLString>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Phone = GetObject<TLString>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Phone.ToBytes(),\r\n                Photo.ToBytes(),\r\n                Status.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _firstName = GetObject<TLString>(input);\r\n            _lastName = GetObject<TLString>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Phone = GetObject<TLString>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            _status = GetObject<TLUserStatus>(input);\r\n\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n            ExtendedInfo = GetObject<TLObject>(input) as TLUserExtendedInfo;\r\n            Contact = GetObject<TLObject>(input) as TLContact;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            output.Write(Phone.ToBytes());\r\n            Photo.ToStream(output);\r\n            Status.ToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            Contact.NullableToStream(output);\r\n        }\r\n\r\n        public override TLInputUserBase ToInputUser()\r\n        {\r\n            return new TLInputUser { UserId = Id, AccessHash = AccessHash };\r\n        }\r\n\r\n        public override void Update(TLUserBase user)\r\n        {\r\n            base.Update(user);\r\n\r\n            AccessHash = ((TLUserRequest)user).AccessHash;\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerUser { UserId = Id, AccessHash = AccessHash };\r\n        }\r\n\r\n        public override bool IsDeleted\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsSelf\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsForeign\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        public override bool IsRequest\r\n        {\r\n            get { return true; }\r\n        }\r\n\r\n        public override bool IsContact\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsContactMutual\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n    }\r\n\r\n    public class TLUserForeign18 : TLUserForeign, IUserName\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUserForeign18;\r\n\r\n        public TLString UserName { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _firstName = GetObject<TLString>(bytes, ref position);\r\n            _lastName = GetObject<TLString>(bytes, ref position);\r\n            UserName = GetObject<TLString>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                UserName.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Photo.ToBytes(),\r\n                Status.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _firstName = GetObject<TLString>(input);\r\n            _lastName = GetObject<TLString>(input);\r\n            UserName = GetObject<TLString>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            _status = GetObject<TLUserStatus>(input);\r\n\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n            ExtendedInfo = GetObject<TLObject>(input) as TLUserExtendedInfo;\r\n            Contact = GetObject<TLObject>(input) as TLContact;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n            output.Write(UserName.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            Photo.ToStream(output);\r\n            Status.ToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            Contact.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLUserBase user)\r\n        {\r\n            base.Update(user);\r\n\r\n            var user18 = user as TLUserForeign18;\r\n            if (user18 != null)\r\n            {\r\n                UserName = user18.UserName;\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var userNameString = UserName != null ? \" @\" + UserName : string.Empty;\r\n            return base.ToString() + userNameString;\r\n        }\r\n    }\r\n\r\n    public class TLUserForeign : TLUserBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserForeign;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _firstName = GetObject<TLString>(bytes, ref position);\r\n            _lastName = GetObject<TLString>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            _photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            _status = GetObject<TLUserStatus>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Photo.ToBytes(),\r\n                Status.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _firstName = GetObject<TLString>(input);\r\n            _lastName = GetObject<TLString>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            _photo = GetObject<TLPhotoBase>(input);\r\n            _status = GetObject<TLUserStatus>(input);\r\n\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n            ExtendedInfo = GetObject<TLObject>(input) as TLUserExtendedInfo;\r\n            Contact = GetObject<TLObject>(input) as TLContact;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n            output.Write(AccessHash.ToBytes());\r\n            Photo.ToStream(output);\r\n            Status.ToStream(output);\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            Contact.NullableToStream(output);\r\n        }\r\n\r\n        public override TLInputUserBase ToInputUser()\r\n        {\r\n            return new TLInputUser { UserId = Id, AccessHash = AccessHash };\r\n        }\r\n\r\n        public override void Update(TLUserBase user)\r\n        {\r\n            base.Update(user);\r\n\r\n            AccessHash = ((TLUserForeign)user).AccessHash;\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerUser { UserId = Id, AccessHash = AccessHash };\r\n        }\r\n\r\n        public override bool IsDeleted\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsSelf\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsForeign\r\n        {\r\n            get { return true; }\r\n        }\r\n\r\n        public override bool IsRequest\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        public override bool IsContact\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsContactMutual\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n    }\r\n\r\n    public class TLUserDeleted18 : TLUserDeleted, IUserName\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUserDeleted18;\r\n\r\n        public TLString UserName { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _firstName = GetObject<TLString>(bytes, ref position);\r\n            _lastName = GetObject<TLString>(bytes, ref position);\r\n            UserName = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes(),\r\n                UserName.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _firstName = GetObject<TLString>(input);\r\n            _lastName = GetObject<TLString>(input);\r\n            UserName = GetObject<TLString>(input);\r\n\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n            ExtendedInfo = GetObject<TLObject>(input) as TLUserExtendedInfo;\r\n            Contact = GetObject<TLObject>(input) as TLContact;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n            output.Write(UserName.ToBytes());\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            Contact.NullableToStream(output);\r\n        }\r\n\r\n        public override void Update(TLUserBase user)\r\n        {\r\n            base.Update(user);\r\n\r\n            var user18 = user as TLUserDeleted18;\r\n            if (user18 != null)\r\n            {\r\n                UserName = user18.UserName;\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            var userNameString = UserName != null ? \" @\" + UserName : string.Empty;\r\n            return base.ToString() + userNameString;\r\n        }\r\n    }\r\n\r\n    public class TLUserDeleted : TLUserBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserDeleted;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            _firstName = GetObject<TLString>(bytes, ref position);\r\n            _lastName = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                FirstName.ToBytes(),\r\n                LastName.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            _firstName = GetObject<TLString>(input);\r\n            _lastName = GetObject<TLString>(input);\r\n\r\n            NotifySettings = GetObject<TLObject>(input) as TLPeerNotifySettingsBase;\r\n            ExtendedInfo = GetObject<TLObject>(input) as TLUserExtendedInfo;\r\n            Contact = GetObject<TLObject>(input) as TLContact;\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Id.ToBytes());\r\n            output.Write(FirstName.ToBytes());\r\n            output.Write(LastName.ToBytes());\r\n\r\n            NotifySettings.NullableToStream(output);\r\n            ExtendedInfo.NullableToStream(output);\r\n            Contact.NullableToStream(output);\r\n        }\r\n\r\n        public override TLInputUserBase ToInputUser()\r\n        {\r\n            return new TLInputUser { UserId = Id, AccessHash = new TLLong(0) };\r\n        }\r\n\r\n        public override TLInputPeerBase ToInputPeer()\r\n        {\r\n            return new TLInputPeerUser { UserId = Id, AccessHash = new TLLong(0) };\r\n        }\r\n\r\n        public override bool IsDeleted\r\n        {\r\n            get { return true; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsSelf\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsForeign\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        public override bool IsRequest\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        public override bool IsContact\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n\r\n        public override bool IsContactMutual\r\n        {\r\n            get { return false; }\r\n            set { }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLUserFull.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum UserFullFlags\r\n    {\r\n        Blocked = 0x1,          // 0\r\n        About = 0x2,            // 1\r\n        ProfilePhoto = 0x4,     // 2\r\n        BotInfo = 0x8,          // 3\r\n    }\r\n\r\n    public class TLUserFull : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserFull;\r\n\r\n        public TLUserBase User { get; set; }\r\n\r\n        public TLLinkBase Link { get; set; }\r\n\r\n        public TLPhotoBase ProfilePhoto { get; set; }\r\n\r\n        public TLPeerNotifySettingsBase NotifySettings { get; set; }\r\n\r\n        public virtual TLBool Blocked { get; set; }\r\n\r\n        public TLString RealFirstName { get; set; }\r\n\r\n        public TLString RealLastName { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            User = GetObject<TLUserBase>(bytes, ref position);\r\n            Link = GetObject<TLLinkBase>(bytes, ref position);\r\n            ProfilePhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            Blocked = GetObject<TLBool>(bytes, ref position);\r\n            RealFirstName = GetObject<TLString>(bytes, ref position);\r\n            RealLastName = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public virtual TLUserBase ToUser()\r\n        {\r\n            User.Link = Link;\r\n            User.ProfilePhoto = ProfilePhoto;\r\n            User.NotifySettings = NotifySettings;\r\n            User.Blocked = Blocked;\r\n\r\n            return User;\r\n        }\r\n    }\r\n\r\n    public class TLUserFull31 : TLUserFull\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUserFull31;\r\n\r\n        public TLBotInfoBase BotInfo { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            User = GetObject<TLUserBase>(bytes, ref position);\r\n            Link = GetObject<TLLinkBase>(bytes, ref position);\r\n            ProfilePhoto = GetObject<TLPhotoBase>(bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            Blocked = GetObject<TLBool>(bytes, ref position);\r\n            BotInfo = GetObject<TLBotInfoBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLUserBase ToUser()\r\n        {\r\n            User.Link = Link;\r\n            User.ProfilePhoto = ProfilePhoto;\r\n            User.NotifySettings = NotifySettings;\r\n            User.Blocked = Blocked;\r\n            User.BotInfo = BotInfo;\r\n\r\n            return User;\r\n        }\r\n    }\r\n\r\n    public class TLUserFull49 : TLUserFull31\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUserFull49;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLBool Blocked\r\n        {\r\n            get { return new TLBool(IsSet(Flags, (int) UserFullFlags.Blocked)); }\r\n            set { SetUnset(ref _flags, value != null && value.Value, (int) UserFullFlags.Blocked); }\r\n        }\r\n\r\n        public TLString About { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            User = GetObject<TLUserBase>(bytes, ref position);\r\n            About = GetObject(Flags, (int)UserFullFlags.About, TLString.Empty, bytes, ref position);\r\n            Link = GetObject<TLLinkBase>(bytes, ref position);\r\n            ProfilePhoto = GetObject<TLPhotoBase>(Flags, (int)UserFullFlags.ProfilePhoto, null, bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            BotInfo = GetObject<TLBotInfoBase>(Flags, (int) UserFullFlags.BotInfo, new TLBotInfoEmpty(), bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLUserBase ToUser()\r\n        {\r\n            User.Link = Link;\r\n            var user45 = User as TLUser45;\r\n            if (user45 != null) user45.About = About;\r\n            if (ProfilePhoto != null) User.ProfilePhoto = ProfilePhoto;\r\n            User.NotifySettings = NotifySettings;\r\n            User.Blocked = Blocked;\r\n            User.BotInfo = BotInfo;\r\n\r\n            return User;\r\n        }\r\n    }\r\n\r\n    public class TLUserFull58 : TLUserFull49\r\n    {\r\n        public new const uint Signature = TLConstructors.TLUserFull58;\r\n\r\n        public TLInt CommonChatsCount { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            User = GetObject<TLUserBase>(bytes, ref position);\r\n            About = GetObject(Flags, (int)UserFullFlags.About, TLString.Empty, bytes, ref position);\r\n            Link = GetObject<TLLinkBase>(bytes, ref position);\r\n            ProfilePhoto = GetObject<TLPhotoBase>(Flags, (int)UserFullFlags.ProfilePhoto, null, bytes, ref position);\r\n            NotifySettings = GetObject<TLPeerNotifySettingsBase>(bytes, ref position);\r\n            BotInfo = GetObject<TLBotInfoBase>(Flags, (int)UserFullFlags.BotInfo, new TLBotInfoEmpty(), bytes, ref position);\r\n            CommonChatsCount = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLUserBase ToUser()\r\n        {\r\n            User.Link = Link;\r\n            var user45 = User as TLUser45;\r\n            if (user45 != null)\r\n            {\r\n                user45.About = About;\r\n                user45.CommonChatsCount = CommonChatsCount;\r\n            }\r\n            if (ProfilePhoto != null) User.ProfilePhoto = ProfilePhoto;\r\n            User.NotifySettings = NotifySettings;\r\n            User.Blocked = Blocked;\r\n            User.BotInfo = BotInfo;\r\n\r\n            return User;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLUserStatus.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing System.Runtime.Serialization;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [KnownType(typeof(TLUserStatusEmpty))]\r\n    [KnownType(typeof(TLUserStatusOnline))]\r\n    [KnownType(typeof(TLUserStatusOffline))]\r\n    [KnownType(typeof(TLUserStatusRecently))]\r\n    [KnownType(typeof(TLUserStatusLastWeek))]\r\n    [KnownType(typeof(TLUserStatusLastMonth))]\r\n    [DataContract]\r\n    public abstract class TLUserStatus : TLObject{ }\r\n\r\n    [DataContract]\r\n    public class TLUserStatusEmpty : TLUserStatus\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserStatusEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            var buffer = ToBytes();\r\n            output.Write(buffer, 0, buffer.Length);\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLUserStatusOnline : TLUserStatus\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserStatusOnline;\r\n\r\n        [DataMember]\r\n        public TLInt Expires { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Expires.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Expires = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            var buffer = ToBytes();\r\n            output.Write(buffer, 0, buffer.Length);\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLUserStatusOffline : TLUserStatus\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserStatusOffline;\r\n\r\n        [DataMember]\r\n        public TLInt WasOnline { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            WasOnline = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                WasOnline.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            WasOnline = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            var buffer = ToBytes();\r\n            output.Write(buffer, 0, buffer.Length);\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLUserStatusRecently : TLUserStatus\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserStatusRecently;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLUserStatusLastWeek : TLUserStatus\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserStatusLastWeek;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class TLUserStatusLastMonth : TLUserStatus\r\n    {\r\n        public const uint Signature = TLConstructors.TLUserStatusLastMonth;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLUtils.Log.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.ObjectModel;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing Telegram.Api.Helpers;\r\n#if WIN_RT\r\nusing Windows.UI.Popups;\r\nusing Windows.UI.Core;\r\n#endif\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Logs;\r\n#if WINDOWS_PHONE\r\nusing System.Threading;\r\nusing System.Windows;\r\n#endif\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public enum LogSeverity\r\n    {\r\n        Error,\r\n\t\tWarning,\r\n\t\tInfo\r\n    }\r\n\r\n    public static partial class TLUtils\r\n    {\r\n        private static void LogBugsenseError(string caption, Exception e)\r\n        {\r\n            var eventAggregator = TelegramEventAggregator.Instance;\r\n\r\n            eventAggregator.Publish(new ExceptionInfo{ Caption = caption, Exception = e });\r\n        }\r\n\r\n        private static bool _isLogEnabled = false;\r\n\r\n        public static bool IsLogEnabled\r\n        {\r\n            get { return _isLogEnabled; }\r\n            set { _isLogEnabled = value; }\r\n        }\r\n\r\n        private static bool _isDebugEnabled = false;\r\n\r\n        public static bool IsDebugEnabled\r\n        {\r\n            get { return _isDebugEnabled; }\r\n            set { _isDebugEnabled = value; }\r\n        }\r\n\r\n        private static bool _isLongPollLogEnabled = false;\r\n\r\n        public static bool IsLongPollDebugEnabled\r\n        {\r\n            get { return _isLongPollLogEnabled; }\r\n            set { _isLongPollLogEnabled = value; }\r\n        }\r\n#if DEBUG\r\n        private static bool _isPerformanceLogEnabled = false;\r\n#else\r\n        private static bool _isPerformanceLogEnabled = false;\r\n\r\n#endif\r\n\r\n\r\n        public static bool IsPerformanceLogEnabled\r\n        {\r\n            get { return _isPerformanceLogEnabled; }\r\n            set { _isPerformanceLogEnabled = value; }\r\n        }\r\n\r\n        public static ObservableCollection<string> LongPollItems = new ObservableCollection<string>(); \r\n\r\n        public static ObservableCollection<string> PerformanceItems = new ObservableCollection<string>();\r\n\r\n        public static ObservableCollection<string> DebugItems = new ObservableCollection<string>();\r\n\r\n        public static ObservableCollection<string> LogItems = new ObservableCollection<string>();\r\n\r\n        public static void WritePerformance(string str)\r\n        {\r\n            if (!IsPerformanceLogEnabled) return;\r\n\r\n            Execute.BeginOnUIThread(() => PerformanceItems.Add(str));\r\n        }\r\n\r\n        public static void WriteLog(string str)\r\n        {\r\n            if (!IsLogEnabled) return;\r\n\r\n            var timestamp = DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture);\r\n            Execute.BeginOnUIThread(() => LogItems.Add(timestamp + \": \" + str));\r\n        }\r\n\r\n        public static void WriteLongPoll(string str)\r\n        {\r\n            if (!IsLongPollDebugEnabled) return;\r\n\r\n            Execute.BeginOnUIThread(() => LongPollItems.Add(str));\r\n        }\r\n\r\n        public static void WriteLine(LogSeverity severity = LogSeverity.Info)\r\n        {\r\n            if (!IsDebugEnabled && severity != LogSeverity.Error) return;\r\n\r\n            Execute.BeginOnUIThread(() => DebugItems.Add(\" \"));\r\n        }\r\n\r\n        public static void WriteLineAtBegin(string str, LogSeverity severity = LogSeverity.Info)\r\n        {\r\n            if (!IsDebugEnabled && severity != LogSeverity.Error) return;\r\n\r\n            Execute.BeginOnUIThread(() => DebugItems.Insert(0, str));\r\n        }\r\n\r\n        public static void WriteException(string caption, Exception e)\r\n        {\r\n            Execute.ShowDebugMessage(caption + Environment.NewLine + e);\r\n\r\n#if LOG_REGISTRATION\r\n            WriteLog(caption + Environment.NewLine + e);\r\n#endif\r\n            Log.Write(caption + Environment.NewLine + e);\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                DebugItems.Add(caption + Environment.NewLine + e);\r\n                LogBugsenseError(caption, e);\r\n            });\r\n        }\r\n\r\n        public static void WriteException(Exception e)\r\n        {\r\n            WriteException(null, e);\r\n        }\r\n\r\n        public static void WriteLine(string str, LogSeverity severity = LogSeverity.Info)\r\n        {\r\n#if DEBUG\r\n            if (!IsDebugEnabled && severity != LogSeverity.Error) return;\r\n\r\n            Execute.BeginOnUIThread(() => DebugItems.Add(str));\r\n#endif\r\n        }\r\n\r\n        public static void WriteLine<T>(string fieldName, T fieldValue, LogSeverity severity = LogSeverity.Info)\r\n        {\r\n            if (!IsDebugEnabled && severity != LogSeverity.Error) return;\r\n\r\n            Execute.BeginOnUIThread(() => DebugItems.Add(String.Format(\"{0}: {1}\", fieldName, fieldValue)));\r\n        }\r\n\r\n        public static string WriteThreadInfo()\r\n        {\r\n            var threadId =\r\n\r\n#if WINDOWS_PHONE\r\n                Thread.CurrentThread.ManagedThreadId;\r\n#elif WIN_RT\r\n                Environment.CurrentManagedThreadId;\r\n#endif\r\n\r\n            return \"ThreadId \" + threadId;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLUtils.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define MTPROTO\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.Serialization;\r\nusing Org.BouncyCastle.Math;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.TL.Functions.Channels;\r\nusing Telegram.Api.TL.Functions.Messages;\r\nusing Telegram.Logs;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public static partial class TLUtils\r\n    {\r\n        public static TLInputClientProxy GetInputProxy(TLProxyConfigBase proxyConfig)\r\n        {\r\n            TLInputClientProxy inputProxy = null;\r\n            if (proxyConfig != null && !proxyConfig.IsEmpty && proxyConfig.IsEnabled.Value)\r\n            {\r\n                var proxy = proxyConfig.GetProxy();\r\n                inputProxy = proxy != null ? proxy.ToInputProxy() : null;\r\n            }\r\n\r\n            return inputProxy;\r\n        }\r\n\r\n        public static TLDCOption GetDCOption(TLConfig config, TLInt dcId, bool media = false)\r\n        {\r\n            TLDCOption dcOption = null;\r\n            if (config != null)\r\n            {\r\n                dcOption = config.DCOptions.FirstOrDefault(x => x.IsValidIPv4WithTCPO25Option(dcId) && x.Media.Value == media);\r\n                if (dcOption == null)\r\n                {\r\n                    dcOption = config.DCOptions.FirstOrDefault(x => x.IsValidIPv4Option(dcId) && x.Media.Value == media);\r\n                }\r\n            }\r\n\r\n            return dcOption;\r\n        }\r\n\r\n        public static short GetProtocolDCId(int dcId, bool media, bool testServer)\r\n        {\r\n            dcId = testServer ? 10000 + dcId : dcId;\r\n\r\n            return media ? (short)-dcId : (short)dcId;\r\n        }\r\n\r\n        public static byte[] ParseSecret(TLDCOption dcOption)\r\n        {\r\n            var dcOption78 = dcOption as TLDCOption78;\r\n            if (dcOption78 != null && !TLString.IsNullOrEmpty(dcOption78.Secret))\r\n            {\r\n                return dcOption78.Secret.Data; //ParseSecret(dcOption78.Secret);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static byte[] ParseSecret(TLString str)\r\n        {\r\n            if (TLString.IsNullOrEmpty(str)) return null;\r\n\r\n            var hexStr = str.ToString().ToLowerInvariant();\r\n            for (var i = 0; i < hexStr.Length; i++)\r\n            {\r\n                if (hexStr[i] >= '0' && hexStr[i] <= '9')\r\n                {\r\n                    continue;\r\n                }\r\n                if (hexStr[i] >= 'a' && hexStr[i] <= 'f')\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                return null;\r\n            }\r\n\r\n            var bytes = new byte[hexStr.Length / 2];\r\n            for (var i = 0; i < hexStr.Length; i += 2)\r\n            {\r\n                bytes[i / 2] = Convert.ToByte(hexStr.Substring(i, 2), 16);\r\n            }\r\n\r\n            return bytes;\r\n        }\r\n\r\n        public static string ContentTypeToFileExt(TLString contentType)\r\n        {\r\n            if (contentType != null)\r\n            {\r\n                if (TLString.Equals(contentType, new TLString(\"image/jpg\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return \".jpg\";\r\n                }\r\n                if (TLString.Equals(contentType, new TLString(\"video/mp4\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return \".mp4\";\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static TLInt ToTLInt(TLString value)\r\n        {\r\n            try\r\n            {\r\n                var intValue = Convert.ToInt32(value.Value);\r\n                return new TLInt(intValue);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static TLString ToTLString(TLInt value)\r\n        {\r\n            try\r\n            {\r\n                var intValue = value.Value.ToString(CultureInfo.InvariantCulture);\r\n                return new TLString(intValue);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static int GetTopPeersHash(TLTopPeers topPeers)\r\n        {\r\n            long acc = 0;\r\n            foreach (var category in topPeers.Categories)\r\n            {\r\n                foreach (var topPeer in category.Peers)\r\n                {\r\n                    acc = ((acc * 20261) + 0x80000000 + topPeer.Peer.Id.Value) % 0x80000000;\r\n                }\r\n            }\r\n\r\n            return (int)acc;\r\n        }\r\n\r\n        public static int GetAllStickersHash(IList<TLStickerSetBase> sets)\r\n        {\r\n            long acc = 0;\r\n            foreach (var set in sets)\r\n            {\r\n                var stickerSet32 = set as TLStickerSet32;\r\n                if (stickerSet32 != null)\r\n                {\r\n                    if (stickerSet32.Archived) continue;\r\n\r\n                    acc = ((acc * 20261) + 0x80000000 + stickerSet32.Hash.Value) % 0x80000000;\r\n                }\r\n            }\r\n\r\n            return (int)acc;\r\n        }\r\n\r\n        public static int GetFeaturedStickersHash(IList<TLStickerSetBase> sets, IList<TLLong> unreadSets)\r\n        {\r\n            long acc = 0;\r\n            foreach (var set in sets)\r\n            {\r\n                var stickerSet32 = set as TLStickerSet32;\r\n                if (stickerSet32 != null)\r\n                {\r\n                    if (stickerSet32.Archived) continue;\r\n\r\n                    var high_id = (int)(stickerSet32.Id.Value >> 32);\r\n                    var low_id = (int)stickerSet32.Id.Value;\r\n\r\n                    acc = ((acc * 20261) + 0x80000000L + high_id) % 0x80000000L;\r\n                    acc = ((acc * 20261) + 0x80000000L + low_id) % 0x80000000L;\r\n\r\n                    if (unreadSets.FirstOrDefault(x => x.Value == stickerSet32.Id.Value) != null)\r\n                    {\r\n                        acc = ((acc * 20261) + 0x80000000L + 1) % 0x80000000L;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return (int)acc;\r\n        }\r\n\r\n        public static TLInt GetFavedStickersHash(IList<TLDocumentBase> documents)\r\n        {\r\n            long acc = 0;\r\n            foreach (var documentBase in documents)\r\n            {\r\n                var document = documentBase as TLDocument;\r\n                if (document == null) continue;\r\n\r\n                var high_id = (int)(document.Id.Value >> 32);\r\n                var low_id = (int)document.Id.Value;\r\n\r\n                acc = ((acc * 20261) + 0x80000000L + high_id) % 0x80000000L;\r\n                acc = ((acc * 20261) + 0x80000000L + low_id) % 0x80000000L;\r\n            }\r\n\r\n            return new TLInt((int)acc);\r\n        }\r\n\r\n        public static TLInt GetRecentStickersHash(IList<TLDocumentBase> documents)\r\n        {\r\n            long acc = 0;\r\n            foreach (var documentBase in documents)\r\n            {\r\n                var document = documentBase as TLDocument;\r\n                if (document == null) continue;\r\n\r\n                var high_id = (int)(document.Id.Value >> 32);\r\n                var low_id = (int)document.Id.Value;\r\n\r\n                acc = ((acc * 20261) + 0x80000000L + high_id) % 0x80000000L;\r\n                acc = ((acc * 20261) + 0x80000000L + low_id) % 0x80000000L;\r\n            }\r\n\r\n            return new TLInt((int)acc);\r\n        }\r\n\r\n        public static int GetContactsHash(TLInt savedCount, IList<TLUserBase> contacts)\r\n        {\r\n            savedCount = savedCount ?? new TLInt(0);\r\n            if (contacts == null)\r\n            {\r\n                return 0;\r\n            }\r\n\r\n            long acc = 0;\r\n            acc = ((acc * 20261) + 0x80000000L + savedCount.Value) % 0x80000000L;\r\n\r\n            foreach (var contact in contacts)\r\n            {\r\n                if (contact == null) continue;\r\n\r\n                acc = ((acc * 20261) + 0x80000000L + contact.Id.Value) % 0x80000000L;\r\n            }\r\n\r\n            return (int)acc;\r\n        }\r\n\r\n        public static void AddStickerSetCovered(IStickers stickers, TLMessagesStickerSet messagesSet, TLVector<TLStickerSetCoveredBase> coveredSets, TLStickerSetCoveredBase coveredSet)\r\n        {\r\n            coveredSets.Insert(0, coveredSet);\r\n            //stickers.SetsCovered.Insert(0, messagesSet.Set);\r\n\r\n            stickers.Hash = new TLString(GetAllStickersHash(stickers.Sets).ToString(CultureInfo.InvariantCulture));\r\n\r\n            var packsDict = new Dictionary<string, TLStickerPack>();\r\n            for (var i = 0; i < messagesSet.Packs.Count; i++)\r\n            {\r\n                packsDict[messagesSet.Packs[i].Emoticon.ToString()] = messagesSet.Packs[i];\r\n            }\r\n\r\n            for (var i = 0; i < messagesSet.Packs.Count; i++)\r\n            {\r\n                TLStickerPack pack;\r\n                if (packsDict.TryGetValue(messagesSet.Packs[i].Emoticon.ToString(), out pack))\r\n                {\r\n                    for (var j = messagesSet.Packs[i].Documents.Count - 1; j >= 0; j--)\r\n                    {\r\n                        pack.Documents.Insert(0, messagesSet.Packs[i].Documents[j]);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    stickers.Packs.Insert(0, messagesSet.Packs[i]);\r\n                }\r\n            }\r\n\r\n            for (var i = messagesSet.Documents.Count - 1; i >= 0; i--)\r\n            {\r\n                stickers.Documents.Insert(0, messagesSet.Documents[i]);\r\n            }\r\n        }\r\n\r\n        public static void AddStickerSet(IStickers stickers, TLMessagesStickerSet messagesSet)\r\n        {\r\n            stickers.Sets.Insert(0, messagesSet.Set);\r\n\r\n            stickers.Hash = new TLString(GetAllStickersHash(stickers.Sets).ToString(CultureInfo.InvariantCulture));\r\n\r\n            var packsDict = new Dictionary<string, TLStickerPack>();\r\n            for (var i = 0; i < messagesSet.Packs.Count; i++)\r\n            {\r\n                packsDict[messagesSet.Packs[i].Emoticon.ToString()] = messagesSet.Packs[i];\r\n            }\r\n\r\n            for (var i = 0; i < messagesSet.Packs.Count; i++)\r\n            {\r\n                TLStickerPack pack;\r\n                if (packsDict.TryGetValue(messagesSet.Packs[i].Emoticon.ToString(), out pack))\r\n                {\r\n                    for (var j = messagesSet.Packs[i].Documents.Count - 1; j >= 0; j--)\r\n                    {\r\n                        pack.Documents.Insert(0, messagesSet.Packs[i].Documents[j]);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    stickers.Packs.Insert(0, messagesSet.Packs[i]);\r\n                }\r\n            }\r\n\r\n            for (var i = messagesSet.Documents.Count - 1; i >= 0; i--)\r\n            {\r\n                stickers.Documents.Insert(0, messagesSet.Documents[i]);\r\n            }\r\n        }\r\n\r\n        public static TLMessagesStickerSet RemoveStickerSetCovered(IStickers stickers, TLStickerSetBase set, TLVector<TLStickerSetCoveredBase> coveredSets)\r\n        {\r\n            TLStickerSetCoveredBase s = null;\r\n            for (var i = 0; i < coveredSets.Count; i++)\r\n            {\r\n                if (coveredSets[i].StickerSet.Id.Value == set.Id.Value)\r\n                {\r\n                    s = coveredSets[i];\r\n                    coveredSets.RemoveAt(i);\r\n                    break;\r\n                }\r\n            }\r\n\r\n            var s32 = s.StickerSet as TLStickerSet32;\r\n            var set32 = set as TLStickerSet32;\r\n            if (s32 != null && set32 != null)\r\n            {\r\n                s32.Flags = set32.Flags;\r\n            }\r\n\r\n            stickers.Hash = new TLString(GetAllStickersHash(stickers.Sets).ToString(CultureInfo.InvariantCulture));\r\n\r\n            var documents = new TLVector<TLDocumentBase>();\r\n            var documentsDict = new Dictionary<long, long>();\r\n            for (var i = 0; i < stickers.Documents.Count; i++)\r\n            {\r\n                var document = stickers.Documents[i] as TLDocument54;\r\n                if (document != null)\r\n                {\r\n                    var inputStickerSetId = document.StickerSet as TLInputStickerSetId;\r\n                    if (inputStickerSetId != null && inputStickerSetId.Id.Value == set.Id.Value)\r\n                    {\r\n                        documents.Add(document);\r\n                        documentsDict[document.Id.Value] = document.Id.Value;\r\n\r\n                        stickers.Documents.RemoveAt(i--);\r\n                        continue;\r\n                    }\r\n\r\n                    var inputStickerSetShortName = document.StickerSet as TLInputStickerSetShortName;\r\n                    if (inputStickerSetShortName != null && inputStickerSetShortName.ShortName.ToString() == set.ShortName.ToString())\r\n                    {\r\n                        documents.Add(document);\r\n                        documentsDict[document.Id.Value] = document.Id.Value;\r\n\r\n                        stickers.Documents.RemoveAt(i--);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var packs = new TLVector<TLStickerPack>();\r\n            for (var i = 0; i < stickers.Packs.Count; i++)\r\n            {\r\n                var pack = new TLStickerPack { Emoticon = stickers.Packs[i].Emoticon, Documents = new TLVector<TLLong>() };\r\n\r\n                for (var j = 0; j < stickers.Packs[i].Documents.Count; j++)\r\n                {\r\n                    if (documentsDict.ContainsKey(stickers.Packs[i].Documents[j].Value))\r\n                    {\r\n                        pack.Documents.Add(stickers.Packs[i].Documents[j]);\r\n                        stickers.Packs[i].Documents.RemoveAt(j--);\r\n                    }\r\n                }\r\n\r\n                if (pack.Documents.Count > 0)\r\n                {\r\n                    packs.Add(pack);\r\n                }\r\n\r\n                if (stickers.Packs[i].Documents.Count == 0)\r\n                {\r\n                    stickers.Packs.RemoveAt(i--);\r\n                }\r\n            }\r\n\r\n            return new TLMessagesStickerSet { Set = s.StickerSet, Packs = packs, Documents = documents };\r\n        }\r\n\r\n        public static TLMessagesStickerSet RemoveStickerSet(IStickers stickers, TLStickerSetBase set)\r\n        {\r\n            TLStickerSetBase s = null;\r\n            for (var i = 0; i < stickers.Sets.Count; i++)\r\n            {\r\n                if (stickers.Sets[i].Id.Value == set.Id.Value)\r\n                {\r\n                    s = stickers.Sets[i];\r\n                    stickers.Sets.RemoveAt(i);\r\n                    break;\r\n                }\r\n            }\r\n\r\n            var s32 = s as TLStickerSet32;\r\n            var set32 = set as TLStickerSet32;\r\n            if (s32 != null && set32 != null)\r\n            {\r\n                s32.Flags = set32.Flags;\r\n            }\r\n\r\n            stickers.Hash = new TLString(GetAllStickersHash(stickers.Sets).ToString(CultureInfo.InvariantCulture));\r\n\r\n            var documents = new TLVector<TLDocumentBase>();\r\n            var documentsDict = new Dictionary<long, long>();\r\n            for (var i = 0; i < stickers.Documents.Count; i++)\r\n            {\r\n                var document = stickers.Documents[i] as TLDocument54;\r\n                if (document != null)\r\n                {\r\n                    var inputStickerSetId = document.StickerSet as TLInputStickerSetId;\r\n                    if (inputStickerSetId != null && inputStickerSetId.Id.Value == set.Id.Value)\r\n                    {\r\n                        documents.Add(document);\r\n                        documentsDict[document.Id.Value] = document.Id.Value;\r\n\r\n                        stickers.Documents.RemoveAt(i--);\r\n                        continue;\r\n                    }\r\n\r\n                    var inputStickerSetShortName = document.StickerSet as TLInputStickerSetShortName;\r\n                    if (inputStickerSetShortName != null && inputStickerSetShortName.ShortName.ToString() == set.ShortName.ToString())\r\n                    {\r\n                        documents.Add(document);\r\n                        documentsDict[document.Id.Value] = document.Id.Value;\r\n\r\n                        stickers.Documents.RemoveAt(i--);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var packs = new TLVector<TLStickerPack>();\r\n            for (var i = 0; i < stickers.Packs.Count; i++)\r\n            {\r\n                var pack = new TLStickerPack { Emoticon = stickers.Packs[i].Emoticon, Documents = new TLVector<TLLong>() };\r\n\r\n                for (var j = 0; j < stickers.Packs[i].Documents.Count; j++)\r\n                {\r\n                    if (documentsDict.ContainsKey(stickers.Packs[i].Documents[j].Value))\r\n                    {\r\n                        pack.Documents.Add(stickers.Packs[i].Documents[j]);\r\n                        stickers.Packs[i].Documents.RemoveAt(j--);\r\n                    }\r\n                }\r\n\r\n                if (pack.Documents.Count > 0)\r\n                {\r\n                    packs.Add(pack);\r\n                }\r\n\r\n                if (stickers.Packs[i].Documents.Count == 0)\r\n                {\r\n                    stickers.Packs.RemoveAt(i--);\r\n                }\r\n            }\r\n\r\n            return new TLMessagesStickerSet { Set = s ?? set32, Packs = packs, Documents = documents };\r\n        }\r\n\r\n        public static bool IsValidAction(TLObject obj)\r\n        {\r\n            var readChannelHistoryAction = obj as TLReadChannelHistory;\r\n            if (readChannelHistoryAction != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var readHistoryAction = obj as TLReadHistory;\r\n            if (readHistoryAction != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var readMessageContents = obj as Functions.Messages.TLReadMessageContents;\r\n            if (readMessageContents != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var readChannelMessageContents = obj as Functions.Channels.TLReadMessageContents;\r\n            if (readChannelMessageContents != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var sendMessageAction = obj as TLSendMessage;\r\n            if (sendMessageAction != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var sendMediaAction = obj as TLSendMedia;\r\n            if (sendMediaAction != null)\r\n            {\r\n                var mediaGame = sendMediaAction.Media as TLInputMediaGame;\r\n                if (mediaGame != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                var mediaContact = sendMediaAction.Media as TLInputMediaContact;\r\n                if (mediaContact != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                var mediaGeoPoint = sendMediaAction.Media as TLInputMediaGeoPoint;\r\n                if (mediaGeoPoint != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                var mediaVenue = sendMediaAction.Media as TLInputMediaVenue;\r\n                if (mediaVenue != null)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            var forwardMessagesAction = obj as TLForwardMessages;\r\n            if (forwardMessagesAction != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var forwardMessageAction = obj as TLForwardMessage;\r\n            if (forwardMessageAction != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var startBotAction = obj as TLStartBot;\r\n            if (startBotAction != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var sendInlineBotResult = obj as TLSendInlineBotResult;\r\n            if (sendInlineBotResult != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var sendEncrypted = obj as TLSendEncrypted;\r\n            if (sendEncrypted != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var sendEncryptedFile = obj as TLSendEncryptedFile;\r\n            if (sendEncryptedFile != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var sendEncryptedService = obj as TLSendEncryptedService;\r\n            if (sendEncryptedService != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var readEncryptedHistory = obj as TLReadEncryptedHistory;\r\n            if (readEncryptedHistory != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public static TLMessage48 GetShortMessage(\r\n            TLInt id,\r\n            TLInt fromId,\r\n            TLPeerBase toId,\r\n            TLInt date,\r\n            TLString message)\r\n        {\r\n\r\n            var m = new TLMessage73\r\n            {\r\n                Flags = new TLInt(0),\r\n                Id = id,\r\n                FromId = fromId,\r\n                ToId = toId,\r\n                Out = TLBool.False,\r\n                _date = date,\r\n                Message = message,\r\n                _media = new TLMessageMediaEmpty()\r\n            };\r\n\r\n            if (m.FromId != null) m.SetFromId();\r\n            if (m._media != null) m.SetMedia();\r\n\r\n            return m;\r\n        }\r\n\r\n        public static TLMessage36 GetMessage(\r\n            TLInt fromId,\r\n            TLPeerBase toId,\r\n            MessageStatus status,\r\n            TLBool outFlag,\r\n            TLBool unreadFlag,\r\n            TLInt date,\r\n            TLString message,\r\n            TLMessageMediaBase media,\r\n            TLLong randomId,\r\n            TLInt replyToMsgId)\r\n        {\r\n            var m = new TLMessage73\r\n            {\r\n                Flags = new TLInt(0),\r\n                FromId = fromId,\r\n                ToId = toId,\r\n                _status = status,\r\n                Out = outFlag,\r\n                Unread = unreadFlag,\r\n                _date = date,\r\n                Message = message,\r\n                _media = media,\r\n                RandomId = randomId,\r\n                ReplyToMsgId = replyToMsgId\r\n            };\r\n\r\n            if (m.FromId != null) m.SetFromId();\r\n            if (m._media != null) m.SetMedia();\r\n            if (m.ReplyToMsgId != null && m.ReplyToMsgId.Value != 0) m.SetReply();\r\n\r\n            return m;\r\n        }\r\n\r\n        [MethodImpl(MethodImplOptions.NoOptimization)]\r\n        public static bool ByteArraysEqual(byte[] a, byte[] b)\r\n        {\r\n            if (ReferenceEquals(a, b))\r\n            {\r\n                return true;\r\n            }\r\n            if (((a == null) || (b == null)) || (a.Length != b.Length))\r\n            {\r\n                return false;\r\n            }\r\n            var flag = true;\r\n            for (var i = 0; i < a.Length; i++)\r\n            {\r\n                flag &= a[i] == b[i];\r\n            }\r\n            return flag;\r\n        }\r\n\r\n        public static IList<TLInt> GetPtsRange(IMultiPts multiPts)\r\n        {\r\n            var pts = multiPts.Pts;\r\n            var ptsCount = multiPts.PtsCount;\r\n\r\n            return GetPtsRange(pts, ptsCount);\r\n        }\r\n\r\n        public static IList<TLInt> GetPtsRange(TLInt pts, TLInt ptsCount)\r\n        {\r\n            var ptsList = new List<TLInt>(ptsCount.Value);\r\n            for (var i = ptsCount.Value - 1; i >= 0; i--)\r\n            {\r\n                ptsList.Add(new TLInt(pts.Value - i));\r\n            }\r\n\r\n            return ptsList;\r\n        }\r\n\r\n        public static bool IsDisplayedDecryptedMessage(TLDecryptedMessageBase message, bool displayEmpty = false)\r\n        {\r\n            if (message == null) return false;\r\n\r\n#if DEBUG\r\n            //return true;\r\n#endif\r\n            return IsDisplayedDecryptedMessageInternal(message, displayEmpty);\r\n        }\r\n\r\n        public static bool CheckPrime(byte[] prime, int g)\r\n        {\r\n            if (!(g >= 2 && g <= 7))\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (prime.Length != 256 || prime[0] <= 127)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            var dhBI = new BigInteger(1, prime);\r\n\r\n            if (g == 2)\r\n            { // p mod 8 = 7 for g = 2;\r\n                var res = dhBI.Mod(BigInteger.ValueOf(8));\r\n                if (res.IntValue != 7)\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n            else if (g == 3)\r\n            { // p mod 3 = 2 for g = 3;\r\n                var res = dhBI.Mod(BigInteger.ValueOf(3));\r\n                if (res.IntValue != 2)\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n            else if (g == 5)\r\n            { // p mod 5 = 1 or 4 for g = 5;\r\n                var res = dhBI.Mod(BigInteger.ValueOf(5));\r\n                int val = res.IntValue;\r\n                if (val != 1 && val != 4)\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n            else if (g == 6)\r\n            { // p mod 24 = 19 or 23 for g = 6;\r\n                var res = dhBI.Mod(BigInteger.ValueOf(24));\r\n                int val = res.IntValue;\r\n                if (val != 19 && val != 23)\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n            else if (g == 7)\r\n            { // p mod 7 = 3, 5 or 6 for g = 7.\r\n                var res = dhBI.Mod(BigInteger.ValueOf(7));\r\n                int val = res.IntValue;\r\n                if (val != 3 && val != 5 && val != 6)\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            var hex = BitConverter.ToString(prime).Replace(\"-\", String.Empty).ToUpperInvariant();\r\n            if (hex.Equals(\"C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5B\"))\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var dhBI2 = dhBI.Subtract(BigInteger.ValueOf(1)).Divide(BigInteger.ValueOf(2));\r\n            return !(!dhBI.IsProbablePrime(30) || !dhBI2.IsProbablePrime(30));\r\n        }\r\n\r\n        public static bool CheckGaAndGb(byte[] ga, byte[] prime)\r\n        {\r\n            var g_a = new BigInteger(1, ga);\r\n            var p = new BigInteger(1, prime);\r\n\r\n            return CheckGaAndGb(g_a, p);\r\n        }\r\n\r\n        public static bool CheckGaAndGb(BigInteger ga, BigInteger prime)\r\n        {\r\n            return !(ga.CompareTo(BigInteger.ValueOf(1)) != 1 || ga.CompareTo(prime.Subtract(BigInteger.ValueOf(1))) != -1);\r\n        }\r\n\r\n        public static bool IsDisplayedDecryptedMessageInternal(TLDecryptedMessageBase message, bool displayEmpty = false)\r\n        {\r\n            var serviceMessage = message as TLDecryptedMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                var emptyAction = serviceMessage.Action as TLDecryptedMessageActionEmpty;\r\n                if (emptyAction != null)\r\n                {\r\n                    if (displayEmpty)\r\n                    {\r\n                        return true;\r\n                    }\r\n\r\n                    return false;\r\n                }\r\n\r\n                var notifyLayerAction = serviceMessage.Action as TLDecryptedMessageActionNotifyLayer;\r\n                if (notifyLayerAction != null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var deleteMessagesAction = serviceMessage.Action as TLDecryptedMessageActionDeleteMessages;\r\n                if (deleteMessagesAction != null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var readMessagesAction = serviceMessage.Action as TLDecryptedMessageActionReadMessages;\r\n                if (readMessagesAction != null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var flushHistoryAction = serviceMessage.Action as TLDecryptedMessageActionFlushHistory;\r\n                if (flushHistoryAction != null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var resendAction = serviceMessage.Action as TLDecryptedMessageActionResend;\r\n                if (resendAction != null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var requestKey = serviceMessage.Action as TLDecryptedMessageActionRequestKey;\r\n                if (requestKey != null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var commitKey = serviceMessage.Action as TLDecryptedMessageActionCommitKey;\r\n                if (commitKey != null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var acceptKey = serviceMessage.Action as TLDecryptedMessageActionAcceptKey;\r\n                if (acceptKey != null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var noop = serviceMessage.Action as TLDecryptedMessageActionNoop;\r\n                if (noop != null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var abortKey = serviceMessage.Action as TLDecryptedMessageActionAbortKey;\r\n                if (abortKey != null)\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        public static TLInt GetOutSeqNo(TLInt currentUserId, TLEncryptedChat17 chat)\r\n        {\r\n            var isAdmin = chat.AdminId.Value == currentUserId.Value;\r\n            var seqNo = 2 * chat.RawOutSeqNo.Value + (isAdmin ? 1 : 0);\r\n\r\n            return new TLInt(seqNo);\r\n        }\r\n\r\n        public static TLInt GetInSeqNo(TLInt currentUserId, TLEncryptedChat17 chat)\r\n        {\r\n            var isAdmin = chat.AdminId.Value == currentUserId.Value;\r\n            var seqNo = 2 * chat.RawInSeqNo.Value + (isAdmin ? 0 : 1);\r\n\r\n            return new TLInt(seqNo);\r\n        }\r\n\r\n        public static TLString EncryptMessage2(TLObject decryptedMessage, TLInt currentUserId, TLEncryptedChatCommon chat)\r\n        {\r\n            Debug.WriteLine(\"TLUtils.EncryptMessage2\");\r\n\r\n            var random = new Random();\r\n\r\n            var key = chat.Key.Data;\r\n            var keyHash = Utils.ComputeSHA1(key);\r\n            var keyFingerprint = new TLLong(BitConverter.ToInt64(keyHash, 12));\r\n            var decryptedBytes = decryptedMessage.ToBytes();\r\n            var bytes = Combine(BitConverter.GetBytes(decryptedBytes.Length), decryptedBytes);\r\n\r\n            var padding = 16 - bytes.Length % 16;\r\n            if (padding < 12)\r\n            {\r\n                padding += 16;\r\n            }\r\n            var paddingBytes = new byte[padding];\r\n            random.NextBytes(paddingBytes);\r\n            var bytesWithPadding = Combine(bytes, paddingBytes);\r\n\r\n            var x = chat.AdminId.Value == currentUserId.Value ? 0 : 8; //8;\r\n            var msgKeyLarge = Utils.ComputeSHA256(Combine(key.SubArray(88 + x, 32), bytesWithPadding));\r\n            var msgKey = msgKeyLarge.SubArray(8, 16);\r\n\r\n            var sha256_a = Utils.ComputeSHA256(Combine(msgKey, key.SubArray(x, 36)));\r\n            var sha256_b = Utils.ComputeSHA256(Combine(key.SubArray(40 + x, 36), msgKey));\r\n            var aesKey = Combine(sha256_a.SubArray(0, 8), sha256_b.SubArray(8, 16), sha256_a.SubArray(24, 8));\r\n            var aesIV = Combine(sha256_b.SubArray(0, 8), sha256_a.SubArray(8, 16), sha256_b.SubArray(24, 8));\r\n\r\n            var encryptedBytes = Utils.AesIge(bytesWithPadding, aesKey, aesIV, true);\r\n\r\n            var resultBytes = Combine(keyFingerprint.ToBytes(), msgKey, encryptedBytes);\r\n\r\n            return TLString.FromBigEndianData(resultBytes);\r\n        }\r\n\r\n        public static TLDecryptedMessageBase DecryptMessage2(TLString data, TLInt currentUserId, TLEncryptedChat chat, out bool commitChat)\r\n        {\r\n            Debug.WriteLine(\"TLUtils.DecryptMessage2\");\r\n\r\n            commitChat = false;\r\n\r\n            var bytes = data.Data;\r\n\r\n            var keyFingerprint = BitConverter.ToInt64(bytes, 0);\r\n            var msgKey = bytes.SubArray(8, 16);\r\n            var key = chat.Key.Data;\r\n            var keyHash = Utils.ComputeSHA1(key);\r\n            var calculatedKeyFingerprint = BitConverter.ToInt64(keyHash, keyHash.Length - 8);\r\n\r\n            if (keyFingerprint != calculatedKeyFingerprint)\r\n            {\r\n                var chat20 = chat as TLEncryptedChat20;\r\n                if (chat20 != null && chat20.PFS_Key != null)\r\n                {\r\n                    var pfsKeyHash = Utils.ComputeSHA1(chat20.PFS_Key.Data);\r\n                    var pfsKeyFingerprint = BitConverter.ToInt64(pfsKeyHash, pfsKeyHash.Length - 8);\r\n                    if (pfsKeyFingerprint == keyFingerprint)\r\n                    {\r\n                        chat20.Key = chat20.PFS_Key;\r\n                        chat20.PFS_Key = null;\r\n                        chat20.PFS_KeyFingerprint = null;\r\n                        chat20.PFS_A = null;\r\n                        chat20.PFS_ExchangeId = null;\r\n                        commitChat = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        return null;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    return null;\r\n                }\r\n            }\r\n\r\n            var x = chat.AdminId.Value == currentUserId.Value ? 8 : 0; //0;\r\n            var sha256_a = Utils.ComputeSHA256(Combine(msgKey, key.SubArray(x, 36)));\r\n            var sha256_b = Utils.ComputeSHA256(Combine(key.SubArray(40 + x, 36), msgKey));\r\n            var aesKey = Combine(sha256_a.SubArray(0, 8), sha256_b.SubArray(8, 16), sha256_a.SubArray(24, 8));\r\n            var aesIV = Combine(sha256_b.SubArray(0, 8), sha256_a.SubArray(8, 16), sha256_b.SubArray(24, 8));\r\n\r\n            var encryptedBytes = bytes.SubArray(24, bytes.Length - 24);\r\n            var decryptedBytes = Utils.AesIge(encryptedBytes, aesKey, aesIV, false);\r\n\r\n            var length = BitConverter.ToInt32(decryptedBytes, 0);\r\n            if (length <= 0 || (4 + length) > decryptedBytes.Length)\r\n            {\r\n                Log.Write(\"TLUtils.DecryptMessage length <= 0 || (4 + length) > decryptedBytes.Length\");\r\n                return null;\r\n            }\r\n\r\n            var calculatedMsgKeyLarge = Utils.ComputeSHA256(Combine(key.SubArray(88 + x, 32), decryptedBytes));\r\n            var calculatedMsgKey = calculatedMsgKeyLarge.SubArray(8, 16);\r\n            for (var i = 0; i < 16; i++)\r\n            {\r\n                if (msgKey[i] != calculatedMsgKey[i])\r\n                {\r\n                    Log.Write(\"TLUtils.DecryptMessage msgKey != calculatedMsgKey\");\r\n                    return null;\r\n                }\r\n            }\r\n\r\n            var position = 4;\r\n            var decryptedObject = TLObject.GetObject<TLObject>(decryptedBytes, ref position);\r\n            var decryptedMessageLayer = decryptedObject as TLDecryptedMessageLayer;\r\n            var decryptedMessageLayer17 = decryptedObject as TLDecryptedMessageLayer17;\r\n            TLDecryptedMessageBase decryptedMessage = null;\r\n\r\n            if (decryptedMessageLayer17 != null)\r\n            {\r\n                var randomBytes = decryptedMessageLayer17.RandomBytes.Data;\r\n                if (randomBytes == null || randomBytes.Length < Constants.MinRandomBytesLength)\r\n                {\r\n                    Log.Write(\"TLUtils.DecryptMessage randomBytes.Length<\" + Constants.MinRandomBytesLength);\r\n                    return null;\r\n                }\r\n\r\n                decryptedMessage = decryptedMessageLayer17.Message;\r\n                var decryptedMessage17 = decryptedMessage as ISeqNo;\r\n                if (decryptedMessage17 != null)\r\n                {\r\n                    decryptedMessage17.InSeqNo = decryptedMessageLayer17.InSeqNo;\r\n                    decryptedMessage17.OutSeqNo = decryptedMessageLayer17.OutSeqNo;\r\n                }\r\n            }\r\n            else if (decryptedMessageLayer != null)\r\n            {\r\n                decryptedMessage = decryptedMessageLayer.Message;\r\n            }\r\n            else if (decryptedObject is TLDecryptedMessageBase)\r\n            {\r\n                decryptedMessage = (TLDecryptedMessageBase)decryptedObject;\r\n            }\r\n\r\n            return decryptedMessage;\r\n        }\r\n\r\n        public static TLString EncryptMessage(TLObject decryptedMessage, TLInt currentUserId, TLEncryptedChatCommon chat)\r\n        {\r\n            Debug.WriteLine(\"TLUtils.EncryptMessage\");\r\n            var chat20 = chat as TLEncryptedChat20;\r\n            if (chat20 != null && chat20.Layer.Value >= Constants.MinSecretChatWithMTProto2Layer)\r\n            {\r\n                return EncryptMessage2(decryptedMessage, currentUserId, chat);\r\n            }\r\n\r\n            var random = new Random();\r\n\r\n            var key = chat.Key.Data;\r\n            var keyHash = Utils.ComputeSHA1(key);\r\n            var keyFingerprint = new TLLong(BitConverter.ToInt64(keyHash, 12));\r\n            var decryptedBytes = decryptedMessage.ToBytes();\r\n            var bytes = Combine(BitConverter.GetBytes(decryptedBytes.Length), decryptedBytes);\r\n            var sha1Hash = Utils.ComputeSHA1(bytes);\r\n            var msgKey = sha1Hash.SubArray(sha1Hash.Length - 16, 16);\r\n\r\n            var padding = (bytes.Length % 16 == 0) ? 0 : (16 - (bytes.Length % 16));\r\n            var paddingBytes = new byte[padding];\r\n            random.NextBytes(paddingBytes);\r\n            var bytesWithPadding = Combine(bytes, paddingBytes);\r\n\r\n            var x = 0;\r\n            var sha1_a = Utils.ComputeSHA1(Combine(msgKey, key.SubArray(x, 32)));\r\n            var sha1_b = Utils.ComputeSHA1(Combine(key.SubArray(32 + x, 16), msgKey, key.SubArray(48 + x, 16)));\r\n            var sha1_c = Utils.ComputeSHA1(Combine(key.SubArray(64 + x, 32), msgKey));\r\n            var sha1_d = Utils.ComputeSHA1(Combine(msgKey, key.SubArray(96 + x, 32)));\r\n            var aesKey = Combine(sha1_a.SubArray(0, 8), sha1_b.SubArray(8, 12), sha1_c.SubArray(4, 12));\r\n            var aesIV = Combine(sha1_a.SubArray(8, 12), sha1_b.SubArray(0, 8), sha1_c.SubArray(16, 4), sha1_d.SubArray(0, 8));\r\n\r\n            var encryptedBytes = Utils.AesIge(bytesWithPadding, aesKey, aesIV, true);\r\n\r\n            var resultBytes = Combine(keyFingerprint.ToBytes(), msgKey, encryptedBytes);\r\n\r\n            return TLString.FromBigEndianData(resultBytes);\r\n        }\r\n\r\n        public static TLDecryptedMessageBase DecryptMessage(TLString data, TLInt currentUserId, TLEncryptedChat chat, out bool commitChat)\r\n        {\r\n            Debug.WriteLine(\"TLUtils.DecryptMessage\");\r\n\r\n            commitChat = false;\r\n\r\n            var bytes = data.Data;\r\n\r\n            var keyFingerprint = BitConverter.ToInt64(bytes, 0);\r\n            var msgKey = bytes.SubArray(8, 16);\r\n            var key = chat.Key.Data;\r\n            var keyHash = Utils.ComputeSHA1(key);\r\n            var calculatedKeyFingerprint = BitConverter.ToInt64(keyHash, keyHash.Length - 8);\r\n\r\n            if (keyFingerprint != calculatedKeyFingerprint)\r\n            {\r\n                var chat20 = chat as TLEncryptedChat20;\r\n                if (chat20 != null && chat20.PFS_Key != null)\r\n                {\r\n                    var pfsKeyHash = Utils.ComputeSHA1(chat20.PFS_Key.Data);\r\n                    var pfsKeyFingerprint = BitConverter.ToInt64(pfsKeyHash, pfsKeyHash.Length - 8);\r\n                    if (pfsKeyFingerprint == keyFingerprint)\r\n                    {\r\n                        chat20.Key = chat20.PFS_Key;\r\n                        chat20.PFS_Key = null;\r\n                        chat20.PFS_KeyFingerprint = null;\r\n                        chat20.PFS_A = null;\r\n                        chat20.PFS_ExchangeId = null;\r\n                        commitChat = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        return null;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    return null;\r\n                }\r\n            }\r\n\r\n            var x = 0;\r\n            var sha1_a = Utils.ComputeSHA1(Combine(msgKey, key.SubArray(x, 32)));\r\n            var sha1_b = Utils.ComputeSHA1(Combine(key.SubArray(32 + x, 16), msgKey, key.SubArray(48 + x, 16)));\r\n            var sha1_c = Utils.ComputeSHA1(Combine(key.SubArray(64 + x, 32), msgKey));\r\n            var sha1_d = Utils.ComputeSHA1(Combine(msgKey, key.SubArray(96 + x, 32)));\r\n\r\n            var aesKey = Combine(sha1_a.SubArray(0, 8), sha1_b.SubArray(8, 12), sha1_c.SubArray(4, 12));\r\n            var aesIV = Combine(sha1_a.SubArray(8, 12), sha1_b.SubArray(0, 8), sha1_c.SubArray(16, 4), sha1_d.SubArray(0, 8));\r\n\r\n            var encryptedBytes = bytes.SubArray(24, bytes.Length - 24);\r\n            var decryptedBytes = Utils.AesIge(encryptedBytes, aesKey, aesIV, false);\r\n\r\n            var msgKeyEquals = true;\r\n            var length = BitConverter.ToInt32(decryptedBytes, 0);\r\n            if (length <= 0 || 4 + length > decryptedBytes.Length)\r\n            {\r\n                Log.Write(\"TLUtils.DecryptMessage length <= 0 || (4 + length) > decryptedBytes.Length\");\r\n                msgKeyEquals = false;\r\n            }\r\n            var calculatedMsgKey = msgKeyEquals ? Utils.ComputeSHA1(decryptedBytes.SubArray(0, 4 + length)) : new byte[] { };\r\n            for (var i = 0; i < 16; i++)\r\n            {\r\n                if (msgKeyEquals && msgKey[i] != calculatedMsgKey[i + 4])\r\n                {\r\n                    msgKeyEquals = false;\r\n                }\r\n            }\r\n            if (!msgKeyEquals)\r\n            {\r\n                Log.Write(\"TLUtils.DecryptMessage msgKey != calculatedMsgKey\");\r\n\r\n                var result = DecryptMessage2(data, currentUserId, chat, out commitChat);\r\n                return result;\r\n            }\r\n\r\n            var position = 4;\r\n            var decryptedObject = TLObject.GetObject<TLObject>(decryptedBytes, ref position);\r\n            var decryptedMessageLayer = decryptedObject as TLDecryptedMessageLayer;\r\n            var decryptedMessageLayer17 = decryptedObject as TLDecryptedMessageLayer17;\r\n            TLDecryptedMessageBase decryptedMessage = null;\r\n\r\n            if (decryptedMessageLayer17 != null)\r\n            {\r\n                var randomBytes = decryptedMessageLayer17.RandomBytes.Data;\r\n                if (randomBytes == null || randomBytes.Length < Constants.MinRandomBytesLength)\r\n                {\r\n                    Log.Write(\"TLUtils.DecryptMessage randomBytes.Length<\" + Constants.MinRandomBytesLength);\r\n                    return null;\r\n                }\r\n\r\n                decryptedMessage = decryptedMessageLayer17.Message;\r\n                var decryptedMessage17 = decryptedMessage as ISeqNo;\r\n                if (decryptedMessage17 != null)\r\n                {\r\n                    decryptedMessage17.InSeqNo = decryptedMessageLayer17.InSeqNo;\r\n                    decryptedMessage17.OutSeqNo = decryptedMessageLayer17.OutSeqNo;\r\n                }\r\n            }\r\n            else if (decryptedMessageLayer != null)\r\n            {\r\n                decryptedMessage = decryptedMessageLayer.Message;\r\n            }\r\n            else if (decryptedObject is TLDecryptedMessageBase)\r\n            {\r\n                decryptedMessage = (TLDecryptedMessageBase)decryptedObject;\r\n            }\r\n\r\n            return decryptedMessage;\r\n        }\r\n\r\n        public static T OpenObjectFromFile<T>(object syncRoot, string fileName)\r\n            where T : class\r\n        {\r\n            try\r\n            {\r\n                Debug.WriteLine(\"::OpenFile \" + fileName);\r\n\r\n                lock (syncRoot)\r\n                {\r\n                    using (var fileStream = FileUtils.GetLocalFileStreamForRead(fileName))\r\n                    {\r\n                        if (fileStream.Length > 0)\r\n                        {\r\n                            var serializer = new DataContractSerializer(typeof(T));\r\n                            return serializer.ReadObject(fileStream) as T;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                var caption = String.Format(\"MTPROTO FILE ERROR: cannot read {0} from file {1}\", typeof(T), fileName);\r\n                WriteLine(caption, LogSeverity.Error);\r\n                WriteException(caption, e);\r\n            }\r\n            return default(T);\r\n        }\r\n\r\n\r\n        public static T OpenObjectFromMTProtoFile<T>(object syncRoot, string fileName, out long length)\r\n            where T : TLObject\r\n        {\r\n            length = 0;\r\n\r\n            try\r\n            {\r\n\r\n                Debug.WriteLine(\"::OpenMTProtoFile \" + fileName);\r\n\r\n                lock (syncRoot)\r\n                {\r\n                    using (var fileStream = FileUtils.GetLocalFileStreamForRead(fileName))\r\n                    {\r\n                        if (fileStream.Length > 0)\r\n                        {\r\n                            length = fileStream.Length;\r\n                            return TLObject.GetObject<T>(fileStream);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                var caption = String.Format(\"MTPROTO FILE ERROR: cannot read {0} from file {1}\", typeof(T), fileName);\r\n                WriteLine(caption, LogSeverity.Error);\r\n                WriteException(caption, e);\r\n            }\r\n            return default(T);\r\n        }\r\n\r\n        public static T OpenObjectFromMTProtoFile<T>(object syncRoot, string fileName)\r\n            where T : TLObject\r\n        {\r\n            try\r\n            {\r\n                Debug.WriteLine(\"::OpenMTProtoFile \" + fileName);\r\n\r\n                lock (syncRoot)\r\n                {\r\n                    using (var fileStream = FileUtils.GetLocalFileStreamForRead(fileName))\r\n                    {\r\n                        if (fileStream.Length > 0)\r\n                        {\r\n                            return TLObject.GetObject<T>(fileStream);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                var caption = String.Format(\"MTPROTO FILE ERROR: cannot read {0} from file {1}\", typeof(T), fileName);\r\n                WriteLine(caption, LogSeverity.Error);\r\n                WriteException(caption, e);\r\n            }\r\n            return default(T);\r\n        }\r\n\r\n        public static void SaveObjectToFile<T>(object syncRoot, string fileName, T data)\r\n        {\r\n            try\r\n            {\r\n                lock (syncRoot)\r\n                {\r\n                    using (var fileStream = FileUtils.GetLocalFileStreamForWrite(fileName))\r\n                    {\r\n                        var dcs = new DataContractSerializer(typeof(T));\r\n                        dcs.WriteObject(fileStream, data);\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                var caption = String.Format(\"FILE ERROR: cannot write {0} to file {1}\", typeof(T), fileName);\r\n                WriteLine(caption, LogSeverity.Error);\r\n                WriteException(caption, e);\r\n            }\r\n        }\r\n\r\n        public static void SaveObjectToMTProtoFile<T>(object syncRoot, string fileName, T data)\r\n            where T : TLObject\r\n        {\r\n            try\r\n            {\r\n                lock (syncRoot)\r\n                {\r\n                    FileUtils.SaveWithTempFile(fileName, data);\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                var caption = String.Format(\"MTPROTO FILE ERROR: cannot write {0} to file {1}\", typeof(T), fileName);\r\n                WriteLine(caption, LogSeverity.Error);\r\n                WriteException(caption, e);\r\n            }\r\n        }\r\n\r\n        public static TLPeerBase GetPeerFromMessage(TLDecryptedMessageBase message)\r\n        {\r\n            TLPeerBase peer = null;\r\n            var commonMessage = message;\r\n            if (commonMessage != null)\r\n            {\r\n                if (commonMessage.ChatId != null)\r\n                {\r\n                    peer = new TLPeerEncryptedChat { Id = commonMessage.ChatId };\r\n                }\r\n            }\r\n            else\r\n            {\r\n                WriteLine(\"Cannot get peer from non TLDecryptedMessage\", LogSeverity.Error);\r\n            }\r\n\r\n            return peer;\r\n        }\r\n\r\n        public static TLPeerBase GetPeerFromMessage(TLMessageBase message)\r\n        {\r\n            TLPeerBase peer = null;\r\n            var commonMessage = message as TLMessageCommon;\r\n            if (commonMessage != null)\r\n            {\r\n                if (commonMessage.ToId is TLPeerChannel)\r\n                {\r\n                    peer = commonMessage.ToId;\r\n                }\r\n                else if (commonMessage.ToId is TLPeerChat)\r\n                {\r\n                    peer = commonMessage.ToId;\r\n                }\r\n                else\r\n                {\r\n                    if (commonMessage.Out.Value)\r\n                    {\r\n                        peer = commonMessage.ToId;\r\n                    }\r\n                    else\r\n                    {\r\n                        peer = new TLPeerUser { Id = commonMessage.FromId };\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                WriteLine(\"Cannot get peer from non TLMessageCommon\", LogSeverity.Error);\r\n            }\r\n\r\n            return peer;\r\n        }\r\n\r\n        public static bool IsChannelMessage(TLMessageBase message, out TLPeerChannel channel)\r\n        {\r\n            var isChannel = false;\r\n            channel = null;\r\n\r\n            var messageCommon = message as TLMessageCommon;\r\n            if (messageCommon != null)\r\n            {\r\n                channel = messageCommon.ToId as TLPeerChannel;\r\n                isChannel = channel != null;\r\n            }\r\n\r\n            return isChannel;\r\n        }\r\n\r\n        public static bool InsertItem<T>(IList<T> items, T item, Func<T, long> getField, Func<T, long> equalitysField = null)\r\n            where T : TLObject\r\n        {\r\n            var fieldValue = getField(item);\r\n            for (var i = 0; i < items.Count; i++)\r\n            {\r\n                if (getField(items[i]) > fieldValue)\r\n                {\r\n                    items.Insert(i, item);\r\n                    return true;\r\n                }\r\n                if (getField(items[i]) == fieldValue\r\n                    && equalitysField != null\r\n                    && equalitysField(items[i]) == equalitysField(item))\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            items.Add(item);\r\n            return true;\r\n        }\r\n\r\n        public static bool InsertItemByDesc<T>(IList<T> items, T item, Func<T, long> getField, Func<T, long> equalityField = null)\r\n            where T : TLObject\r\n        {\r\n            var fieldValue = getField(item);\r\n            for (var i = 0; i < items.Count; i++)\r\n            {\r\n                if (getField(items[i]) < fieldValue)\r\n                {\r\n                    items.Insert(i, item);\r\n                    return true;\r\n                }\r\n                if (getField(items[i]) == fieldValue\r\n                    && equalityField != null\r\n                    && equalityField(items[i]) == equalityField(item))\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            items.Add(item);\r\n            return true;\r\n        }\r\n\r\n        public static IEnumerable<T> FindInnerObjects<T>(TLTransportMessage obj)\r\n            where T : TLObject\r\n        {\r\n            var result = obj.MessageData as T;\r\n            if (result != null)\r\n            {\r\n                yield return (T)obj.MessageData;\r\n            }\r\n            else\r\n            {\r\n                var gzipData = obj.MessageData as TLGzipPacked;\r\n                if (gzipData != null)\r\n                {\r\n                    result = gzipData.Data as T;\r\n                    if (result != null)\r\n                    {\r\n                        yield return result;\r\n                    }\r\n                }\r\n\r\n                var container = obj.MessageData as TLContainer;\r\n                if (container != null)\r\n                {\r\n                    foreach (var message in container.Messages)\r\n                    {\r\n                        result = message.MessageData as T;\r\n                        if (result != null)\r\n                        {\r\n                            yield return (T)message.MessageData;\r\n                        }\r\n                        gzipData = message.MessageData as TLGzipPacked;\r\n                        if (gzipData != null)\r\n                        {\r\n                            result = gzipData.Data as T;\r\n                            if (result != null)\r\n                            {\r\n                                yield return result;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static int InputPeerToId(TLInputPeerBase inputPeer, TLInt selfId)\r\n        {\r\n            var chat = inputPeer as TLInputPeerChat;\r\n            if (chat != null)\r\n            {\r\n                return chat.ChatId.Value;\r\n            }\r\n\r\n            var contact = inputPeer as TLInputPeerContact;\r\n            if (contact != null)\r\n            {\r\n                return contact.UserId.Value;\r\n            }\r\n\r\n            var foreign = inputPeer as TLInputPeerForeign;\r\n            if (foreign != null)\r\n            {\r\n                return foreign.UserId.Value;\r\n            }\r\n\r\n            var user = inputPeer as TLInputPeerUser;\r\n            if (user != null)\r\n            {\r\n                return user.UserId.Value;\r\n            }\r\n\r\n            var self = inputPeer as TLInputPeerSelf;\r\n            if (self != null)\r\n            {\r\n                return selfId.Value;\r\n            }\r\n\r\n            return -1;\r\n        }\r\n\r\n        public static TLPeerBase InputPeerToPeer(TLInputPeerBase inputPeer, int selfId)\r\n        {\r\n            var channel = inputPeer as TLInputPeerChannel;\r\n            if (channel != null)\r\n            {\r\n                return new TLPeerChannel { Id = channel.ChatId };\r\n            }\r\n\r\n            var broadcast = inputPeer as TLInputPeerBroadcast;\r\n            if (broadcast != null)\r\n            {\r\n                return new TLPeerBroadcast { Id = broadcast.ChatId };\r\n            }\r\n\r\n            var chat = inputPeer as TLInputPeerChat;\r\n            if (chat != null)\r\n            {\r\n                return new TLPeerChat { Id = chat.ChatId };\r\n            }\r\n\r\n            var contact = inputPeer as TLInputPeerContact;\r\n            if (contact != null)\r\n            {\r\n                return new TLPeerUser { Id = contact.UserId };\r\n            }\r\n\r\n            var foreign = inputPeer as TLInputPeerForeign;\r\n            if (foreign != null)\r\n            {\r\n                return new TLPeerUser { Id = foreign.UserId };\r\n            }\r\n\r\n            var user = inputPeer as TLInputPeerUser;\r\n            if (user != null)\r\n            {\r\n                return new TLPeerUser { Id = user.UserId };\r\n            }\r\n\r\n            var self = inputPeer as TLInputPeerSelf;\r\n            if (self != null)\r\n            {\r\n                return new TLPeerUser { Id = new TLInt(selfId) };\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n\r\n        public static int MergeItemsDesc<T>(Func<T, int> dateIndexFunc, IList<T> current, IList<T> updated, int offset, int maxId, int count, out IList<T> removedItems, Func<T, int> indexFunc, Func<T, bool> skipTailFunc)\r\n        {\r\n            removedItems = new List<T>();\r\n\r\n            var currentIndex = 0;\r\n            var updatedIndex = 0;\r\n\r\n            var index = new Dictionary<int, int>();\r\n            foreach (var item in current)\r\n            {\r\n                var id = indexFunc(item);\r\n                if (id > 0)\r\n                {\r\n                    index[id] = id;\r\n                }\r\n            }\r\n\r\n\r\n            //skip just added or sending items\r\n            while (updatedIndex < updated.Count\r\n                && currentIndex < current.Count\r\n                && dateIndexFunc(updated[updatedIndex]) < dateIndexFunc(current[currentIndex]))\r\n            {\r\n                currentIndex++;\r\n            }\r\n\r\n            // insert before current items\r\n            while (updatedIndex < updated.Count\r\n                && (current.Count < currentIndex\r\n                    || (currentIndex < current.Count && dateIndexFunc(updated[updatedIndex]) > dateIndexFunc(current[currentIndex]))))\r\n            {\r\n                if (dateIndexFunc(current[currentIndex]) == 0)\r\n                {\r\n                    currentIndex++;\r\n                    continue;\r\n                }\r\n                if (index.ContainsKey(indexFunc(updated[updatedIndex])))\r\n                {\r\n                    updatedIndex++;\r\n                    continue;\r\n                }\r\n                current.Insert(currentIndex, updated[updatedIndex]);\r\n                updatedIndex++;\r\n                currentIndex++;\r\n            }\r\n\r\n            // update existing items\r\n            if (updatedIndex < updated.Count)\r\n            {\r\n                for (; currentIndex < current.Count; currentIndex++)\r\n                {\r\n                    if (indexFunc != null\r\n                        && indexFunc(current[currentIndex]) == 0)\r\n                    {\r\n                        continue;\r\n                    }\r\n\r\n                    for (; updatedIndex < updated.Count; updatedIndex++)\r\n                    {\r\n                        // missing item at current list\r\n                        if (dateIndexFunc(updated[updatedIndex]) > dateIndexFunc(current[currentIndex]))\r\n                        {\r\n                            current.Insert(currentIndex, updated[updatedIndex]);\r\n                            updatedIndex++;\r\n                            break;\r\n                        }\r\n                        // equal item\r\n                        if (dateIndexFunc(updated[updatedIndex]) == dateIndexFunc(current[currentIndex]))\r\n                        {\r\n                            updatedIndex++;\r\n                            break;\r\n                        }\r\n                        // deleted item\r\n                        if (dateIndexFunc(updated[updatedIndex]) < dateIndexFunc(current[currentIndex]))\r\n                        {\r\n                            var removedItem = current[currentIndex];\r\n                            removedItems.Add(removedItem);\r\n                            current.RemoveAt(currentIndex);\r\n                            currentIndex--;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    // at the end of updated list\r\n                    if (updatedIndex == updated.Count)\r\n                    {\r\n                        currentIndex++;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            // all other items were deleted\r\n            if (updated.Count > 0 && updated.Count < count && current.Count != currentIndex)\r\n            {\r\n                for (var i = current.Count - 1; i >= updatedIndex; i--)\r\n                {\r\n                    if (skipTailFunc != null && skipTailFunc(current[i]))\r\n                    {\r\n                        continue;\r\n                    }\r\n                    current.RemoveAt(i);\r\n                }\r\n                return currentIndex - 1;\r\n            }\r\n\r\n            // add after current items\r\n            while (updatedIndex < updated.Count)\r\n            {\r\n                current.Add(updated[updatedIndex]);\r\n                updatedIndex++;\r\n                currentIndex++;\r\n            }\r\n\r\n            return currentIndex - 1;\r\n        }\r\n\r\n        public static TLInt DateToUniversalTimeTLInt(long clientDelta, DateTime date)\r\n        {\r\n            clientDelta = MTProtoService.Instance.ClientTicksDelta;\r\n\r\n            var unixTime = (int)Utils.DateTimeToUnixTimestamp(date) + clientDelta / 4294967296.0; //int * 2^32 + clientDelta\r\n\r\n            return new TLInt((int)unixTime);\r\n        }\r\n\r\n        public static TLInt ToTLInt(DateTime date)\r\n        {\r\n            var unixTime = (int)Utils.DateTimeToUnixTimestamp(date); //int * 2^32 + clientDelta\r\n\r\n            return new TLInt(unixTime);\r\n        }\r\n\r\n        public static byte[] GenerateAuthKeyId(byte[] authKey)\r\n        {\r\n            var authKeyHash = Utils.ComputeSHA1(authKey);\r\n            var authKeyId = authKeyHash.SubArray(12, 8);\r\n\r\n            return authKeyId;\r\n        }\r\n\r\n        public static long GenerateLongAuthKeyId(byte[] authKey)\r\n        {\r\n            var authKeyHash = Utils.ComputeSHA1(authKey);\r\n            var authKeyId = authKeyHash.SubArray(12, 8);\r\n\r\n            return BitConverter.ToInt64(authKeyId, 0);\r\n        }\r\n\r\n        private const int encryptXParam = 0;\r\n        private const int decryptXParam = 8;\r\n\r\n        public static WindowsPhone.Tuple<byte[], byte[]> GetEncryptKeyIV(byte[] authKey, byte[] msgKey)\r\n        {\r\n            return GetKeyIVCommon(authKey, msgKey, encryptXParam);\r\n        }\r\n\r\n        public static WindowsPhone.Tuple<byte[], byte[]> GetDecryptKeyIV(byte[] authKey, byte[] msgKey)\r\n        {\r\n            return GetKeyIVCommon(authKey, msgKey, decryptXParam);\r\n        }\r\n\r\n        private static WindowsPhone.Tuple<byte[], byte[]> GetKeyIVCommon(byte[] authKey, byte[] msgKey, int x)\r\n        {\r\n#if MTPROTO\r\n            var sha256_a = Utils.ComputeSHA256(Combine(msgKey, authKey.SubArray(x, 36)));\r\n            var sha256_b = Utils.ComputeSHA256(Combine(authKey.SubArray(40 + x, 36), msgKey));\r\n\r\n            var aesKey = Combine(\r\n                sha256_a.SubArray(0, 8),\r\n                sha256_b.SubArray(8, 16),\r\n                sha256_a.SubArray(24, 8));\r\n\r\n            var aesIV = Combine(\r\n                sha256_b.SubArray(0, 8),\r\n                sha256_a.SubArray(8, 16),\r\n                sha256_b.SubArray(24, 8));\r\n#else\r\n            var sha1_a = Utils.ComputeSHA1(Combine(msgKey, authKey.SubArray(x, 32)));\r\n            var sha1_b = Utils.ComputeSHA1(Combine(authKey.SubArray(32 + x, 16), msgKey, authKey.SubArray(48 + x, 16)));\r\n            var sha1_c = Utils.ComputeSHA1(Combine(authKey.SubArray(64 + x, 32), msgKey));\r\n            var sha1_d = Utils.ComputeSHA1(Combine(msgKey, authKey.SubArray(96 + x, 32)));\r\n\r\n            var aesKey = Combine( \r\n                sha1_a.SubArray(0, 8),\r\n                sha1_b.SubArray(8, 12),\r\n                sha1_c.SubArray(4, 12));\r\n\r\n            var aesIV = Combine(\r\n                sha1_a.SubArray(8, 12),\r\n                sha1_b.SubArray(0, 8),\r\n                sha1_c.SubArray(16, 4),\r\n                sha1_d.SubArray(0, 8));\r\n#endif\r\n\r\n            return new WindowsPhone.Tuple<byte[], byte[]>(aesKey, aesIV);\r\n        }\r\n\r\n#if MTPROTO\r\n        public static byte[] GetEncryptMsgKey(byte[] authKey, byte[] dataWithPadding)\r\n        {\r\n            return GetMsgKeyCommon(authKey, dataWithPadding, encryptXParam);\r\n        }\r\n\r\n        public static byte[] GetDecryptMsgKey(byte[] authKey, byte[] dataWithPadding)\r\n        {\r\n            return GetMsgKeyCommon(authKey, dataWithPadding, decryptXParam);\r\n        }\r\n\r\n        private static byte[] GetMsgKeyCommon(byte[] authKey, byte[] dataWithPadding, int x)\r\n        {\r\n            var bytes = Combine(authKey.SubArray(88 + x, 32), dataWithPadding);\r\n\r\n            var msgKeyLarge = Utils.ComputeSHA256(bytes);\r\n            var msgKey = msgKeyLarge.SubArray(8, 16);\r\n\r\n            return msgKey;\r\n        }\r\n#else\r\n        public static byte[] GetMsgKey(byte[] data)\r\n        {\r\n            var bytes = Utils.ComputeSHA1(data);\r\n            var last16Bytes = bytes.SubArray(4, 16);\r\n\r\n            return last16Bytes;\r\n        }\r\n#endif\r\n\r\n        public static byte[] Combine(params byte[][] arrays)\r\n        {\r\n            var length = 0;\r\n            for (var i = 0; i < arrays.Length; i++)\r\n            {\r\n                length += arrays[i].Length;\r\n            }\r\n\r\n            var result = new byte[length]; ////[arrays.Sum(a => a.Length)];\r\n            var offset = 0;\r\n            foreach (var array in arrays)\r\n            {\r\n                Buffer.BlockCopy(array, 0, result, offset, array.Length);\r\n                offset += array.Length;\r\n            }\r\n            return result;\r\n        }\r\n\r\n        public static string MessageIdString(byte[] bytes)\r\n        {\r\n            var ticks = BitConverter.ToInt64(bytes, 0);\r\n            var date = Utils.UnixTimestampToDateTime(ticks >> 32);\r\n\r\n            return BitConverter.ToString(bytes) + \" \"\r\n                + ticks + \"%4=\" + ticks % 4 + \" \"\r\n                + date;\r\n        }\r\n\r\n        public static string MessageIdString(TLLong messageId)\r\n        {\r\n            var bytes = BitConverter.GetBytes(messageId.Value);\r\n            var ticks = BitConverter.ToInt64(bytes, 0);\r\n            var date = Utils.UnixTimestampToDateTime(ticks >> 32);\r\n\r\n            return BitConverter.ToString(bytes) + \" \"\r\n                + ticks + \"%4=\" + ticks % 4 + \" \"\r\n                + date;\r\n        }\r\n\r\n        public static string MessageIdString(TLInt messageId)\r\n        {\r\n            var ticks = messageId.Value;\r\n            var date = Utils.UnixTimestampToDateTime(ticks >> 32);\r\n\r\n            return BitConverter.ToString(BitConverter.GetBytes(messageId.Value)) + \" \"\r\n                + ticks + \"%4=\" + ticks % 4 + \" \"\r\n                + date;\r\n        }\r\n\r\n        public static DateTime ToDateTime(TLInt date)\r\n        {\r\n            var ticks = date.Value;\r\n            return Utils.UnixTimestampToDateTime(ticks >> 32);\r\n        }\r\n\r\n        public static void ThrowNotSupportedException(this byte[] bytes, string objectType)\r\n        {\r\n            throw new NotSupportedException(String.Format(\"Not supported {0} signature: {1}\", objectType, BitConverter.ToString(bytes.SubArray(0, 4))));\r\n        }\r\n\r\n        public static void ThrowNotSupportedException(this byte[] bytes, int position, string objectType)\r\n        {\r\n            throw new NotSupportedException(String.Format(\"Not supported {0} signature: {1}\", objectType, BitConverter.ToString(bytes.SubArray(position, position + 4))));\r\n        }\r\n\r\n        public static void ThrowExceptionIfIncorrect(this byte[] bytes, ref int position, uint signature)\r\n        {\r\n            //if (!bytes.SubArray(position, 4).StartsWith(signature))\r\n            //{\r\n            //    throw new ArgumentException(String.Format(\"Incorrect signature: actual - {1}, expected - {0}\", SignatureToBytesString(signature), BitConverter.ToString(bytes.SubArray(0, 4))));\r\n            //}\r\n            position += 4;\r\n        }\r\n\r\n        public static void ThrowExceptionIfIncorrect(this byte[] bytes, ref int position, string signature)\r\n        {\r\n            //if (!bytes.SubArray(position, 4).StartsWith(signature))\r\n            //{\r\n            //    throw new ArgumentException(String.Format(\"Incorrect signature: actual - {1}, expected - {0}\", SignatureToBytesString(signature), BitConverter.ToString(bytes.SubArray(0, 4))));\r\n            //}\r\n            position += 4;\r\n        }\r\n\r\n        private static bool StartsWith(this byte[] array, byte[] startArray)\r\n        {\r\n            for (var i = 0; i < startArray.Length; i++)\r\n            {\r\n                if (array[i] != startArray[i]) return false;\r\n            }\r\n            return true;\r\n        }\r\n\r\n        private static bool StartsWith(this byte[] array, int position, byte[] startArray)\r\n        {\r\n            for (var i = 0; i < startArray.Length; i++)\r\n            {\r\n                if (array[position + i] != startArray[i]) return false;\r\n            }\r\n            return true;\r\n        }\r\n\r\n        public static bool StartsWith(this byte[] bytes, uint signature)\r\n        {\r\n            var sign = BitConverter.ToUInt32(bytes, 0);\r\n\r\n            return sign == signature;\r\n        }\r\n\r\n        public static bool StartsWith(this Stream input, uint signature)\r\n        {\r\n            var bytes = new byte[4];\r\n            input.Read(bytes, 0, 4);\r\n            var sign = BitConverter.ToUInt32(bytes, 0);\r\n\r\n            return sign == signature;\r\n        }\r\n\r\n        public static bool StartsWith(this byte[] bytes, string signature)\r\n        {\r\n            if (signature[0] != '#') throw new ArgumentException(\"Incorrect first symbol of signature: expexted - #, actual - \" + signature[0]);\r\n\r\n            var signatureBytes = SignatureToBytes(signature);\r\n\r\n            return bytes.StartsWith(signatureBytes);\r\n        }\r\n\r\n        public static bool StartsWith(this byte[] bytes, int position, uint signature)\r\n        {\r\n            var sign = BitConverter.ToUInt32(bytes, position);\r\n\r\n            return sign == signature;\r\n        }\r\n\r\n        public static bool StartsWith(this byte[] bytes, int position, string signature)\r\n        {\r\n            if (signature[0] != '#') throw new ArgumentException(\"Incorrect first symbol of signature: expexted - #, actual - \" + signature[0]);\r\n\r\n            var signatureBytes = SignatureToBytes(signature);\r\n\r\n            return bytes.StartsWith(position, signatureBytes);\r\n        }\r\n\r\n        public static string SignatureToBytesString(string signature)\r\n        {\r\n            if (signature[0] != '#') throw new ArgumentException(\"Incorrect first symbol of signature: expexted - #, actual - \" + signature[0]);\r\n\r\n            return BitConverter.ToString(SignatureToBytes(signature));\r\n        }\r\n\r\n        public static byte[] SignatureToBytes(uint signature)\r\n        {\r\n            return BitConverter.GetBytes(signature);\r\n        }\r\n\r\n        public static byte[] SignatureToBytes(string signature)\r\n        {\r\n            if (signature[0] != '#') throw new ArgumentException(\"Incorrect first symbol of signature: expexted - #, actual - \" + signature[0]);\r\n\r\n            var bytesString =\r\n                signature.Length % 2 == 0 ?\r\n                new string(signature.Replace(\"#\", \"0\").ToArray()) :\r\n                new string(signature.Replace(\"#\", String.Empty).ToArray());\r\n\r\n            var bytes = Utils.StringToByteArray(bytesString);\r\n            Array.Reverse(bytes);\r\n            return bytes;\r\n        }\r\n\r\n\r\n        public static TLDecryptedMessageLayer GetDecryptedMessageLayer(TLInt layer, TLInt inSeqNo, TLInt outSeqNo, TLDecryptedMessageBase message)\r\n        {\r\n            var randomBytes = new byte[15];\r\n            var random = new SecureRandom();\r\n            random.NextBytes(randomBytes);\r\n\r\n            var decryptedMessageLayer17 = new TLDecryptedMessageLayer17();\r\n            decryptedMessageLayer17.Layer = layer;\r\n            decryptedMessageLayer17.InSeqNo = inSeqNo;\r\n            decryptedMessageLayer17.OutSeqNo = outSeqNo;\r\n            decryptedMessageLayer17.RandomBytes = TLString.FromBigEndianData(randomBytes);\r\n            decryptedMessageLayer17.Message = message;\r\n\r\n            return decryptedMessageLayer17;\r\n        }\r\n\r\n    }\r\n}\r\n\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLValidatedRequestedInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ValidatedRequestedInfoFlags\r\n    {\r\n        Id = 0x1,                   // 0\r\n        ShippingOptions = 0x2,      // 1\r\n    }\r\n\r\n    public class TLValidatedRequestedInfo : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLValidatedRequestedInfo;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        private TLString _id;\r\n\r\n        public TLString Id\r\n        {\r\n            get { return _id; }\r\n            set { SetField(out _id, value, ref _flags, (int) ValidatedRequestedInfoFlags.Id); }\r\n        }\r\n\r\n        private TLVector<TLShippingOption> _shippingOptions;\r\n\r\n        public TLVector<TLShippingOption> ShippingOptions\r\n        {\r\n            get { return _shippingOptions; }\r\n            set { SetField(out _shippingOptions, value, ref _flags, (int) ValidatedRequestedInfoFlags.ShippingOptions); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            _id = GetObject<TLString>(Flags, (int) ValidatedRequestedInfoFlags.Id, null, bytes, ref position);\r\n            _shippingOptions = GetObject<TLVector<TLShippingOption>>(Flags, (int)ValidatedRequestedInfoFlags.ShippingOptions, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLVector.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Runtime.Serialization;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [DataContract]\r\n    public class  TLVector<T> : TLObject, IList<T> \r\n        where T : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLVector;        \r\n\r\n        [DataMember]\r\n        public IList<T> Items { get; set; }\r\n\r\n        public TLVector()\r\n        {\r\n            Items = new List<T>();        \r\n        }\r\n\r\n        public TLVector(int count)\r\n        {\r\n            Items = new List<T>(count);\r\n        }\r\n\r\n        public TLVector(IList<T> items)\r\n        {\r\n            Items = items;\r\n        } \r\n\r\n        public T this[int index]\r\n        {\r\n            get { return Items[index]; }\r\n            set { Items[index] = value; }\r\n        }\r\n\r\n        public int IndexOf(T item)\r\n        {\r\n            return Items.IndexOf(item);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            var length = GetObject<TLInt>(bytes, ref position);\r\n            Items = new List<T>(length.Value);\r\n\r\n            for (var i = 0; i < length.Value; i++)\r\n            {\r\n                Items.Add(GetObject<T>(bytes, ref position));\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                BitConverter.GetBytes(Items.Count),\r\n                TLUtils.Combine(Items.Select(x => x.ToBytes()).ToArray())\r\n                );\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            var length = GetObject<TLInt>(input);\r\n            Items = new List<T>(length.Value);\r\n\r\n            try\r\n            {\r\n                for (var i = 0; i < length.Value; i++)\r\n                {\r\n                    Items.Add(GetObject<T>(input));\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                \r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(new TLInt(Items.Count).ToBytes());\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                Items[i].ToStream(output);\r\n            }\r\n        }\r\n\r\n        public IEnumerator<T> GetEnumerator()\r\n        {\r\n            return Items.GetEnumerator();\r\n        }\r\n\r\n        IEnumerator IEnumerable.GetEnumerator()\r\n        {\r\n            return GetEnumerator();\r\n        }\r\n\r\n        public void Add(T item)\r\n        {\r\n            Items.Add(item);\r\n        }\r\n\r\n        public void Clear()\r\n        {\r\n           Items.Clear();\r\n        }\r\n\r\n        public bool Contains(T item)\r\n        {\r\n            return Items.Contains(item);\r\n        }\r\n\r\n        public void CopyTo(T[] array, int arrayIndex)\r\n        {\r\n            Items.CopyTo(array, arrayIndex);\r\n        }\r\n\r\n        public bool Remove(T item)\r\n        {\r\n            return Items.Remove(item);\r\n        }\r\n\r\n        public void RemoveAt(int index)\r\n        {\r\n            Items.RemoveAt(index);\r\n        }\r\n\r\n        public void Insert(int index, T item)\r\n        {\r\n            Items.Insert(index, item);\r\n        }\r\n\r\n        public int Count { get { return Items.Count; } }\r\n        public bool IsReadOnly { get { return Items.IsReadOnly; } }\r\n\r\n        public int IndexOf(TLDCOption dcOption)\r\n        {\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (Items[i] == dcOption)\r\n                    return i;\r\n            }\r\n\r\n            return -1;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLVideo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLVideoBase : TLObject\r\n    {\r\n        public TLLong Id { get; set; }\r\n\r\n        public virtual int VideoSize { get { return 0; } }\r\n    }\r\n\r\n    public class TLVideoEmpty : TLVideoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLVideoEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature), Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLVideo33 : TLVideo28\r\n    {\r\n        public new const uint Signature = TLConstructors.TLVideo33;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            //UserId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Thumb = GetObject<TLPhotoSizeBase>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                //UserId.ToBytes(),\r\n                Date.ToBytes(),\r\n                Duration.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Size.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                DCId.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            //UserId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Thumb = GetObject<TLPhotoSizeBase>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            //UserId.ToStream(output);\r\n            Date.ToStream(output);\r\n            Duration.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Size.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            DCId.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLVideo28 : TLVideo\r\n    {\r\n        public new const uint Signature = TLConstructors.TLVideo28;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Thumb = GetObject<TLPhotoSizeBase>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                UserId.ToBytes(),\r\n                Date.ToBytes(),\r\n                Duration.ToBytes(),\r\n                Size.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                DCId.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Thumb = GetObject<TLPhotoSizeBase>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Date.ToStream(output);\r\n            Duration.ToStream(output);\r\n            Size.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            DCId.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLVideo : TLVideoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLVideo;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n        public TLInt UserId { get; set; }\r\n        public TLInt Date { get; set; }\r\n        public TLString Caption { get; set; }\r\n        public TLInt Duration { get; set; }\r\n        public TLString MimeType { get; set; }\r\n        public TLInt Size { get; set; }\r\n        public TLPhotoSizeBase Thumb { get; set; }\r\n        public TLInt DCId { get; set; }\r\n        public TLInt W { get; set; }\r\n        public TLInt H { get; set; }\r\n\r\n        public string GetFileName()\r\n        {\r\n            return string.Format(\"video{0}_{1}.mp4\", Id, AccessHash);\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            UserId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Caption = GetObject<TLString>(bytes, ref position);\r\n            Duration = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            Thumb = GetObject<TLPhotoSizeBase>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            W = GetObject<TLInt>(bytes, ref position);\r\n            H = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature), \r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                UserId.ToBytes(),\r\n                Date.ToBytes(),\r\n                Caption.ToBytes(),\r\n                Duration.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Size.ToBytes(),\r\n                Thumb.ToBytes(),\r\n                DCId.ToBytes(),\r\n                W.ToBytes(),\r\n                H.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            UserId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            Caption = GetObject<TLString>(input);\r\n            Duration = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Thumb = GetObject<TLPhotoSizeBase>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n            W = GetObject<TLInt>(input);\r\n            H = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            UserId.ToStream(output);\r\n            Date.ToStream(output);\r\n            Caption.ToStream(output);\r\n            Duration.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Size.ToStream(output);\r\n            Thumb.ToStream(output);\r\n            DCId.ToStream(output);\r\n            W.ToStream(output);\r\n            H.ToStream(output);\r\n        }\r\n\r\n        #region Additional\r\n\r\n        public override int VideoSize\r\n        {\r\n            get { return Size != null ? Size.Value : 0; }\r\n        }\r\n\r\n        public string DurationString\r\n        {\r\n            get\r\n            {\r\n                var timeSpan = TimeSpan.FromSeconds(Duration.Value);\r\n\r\n                if (timeSpan.Hours > 0)\r\n                {\r\n                    return timeSpan.ToString(@\"h\\:mm\\:ss\");\r\n                }\r\n\r\n                return timeSpan.ToString(@\"m\\:ss\");\r\n            }\r\n        }\r\n\r\n        public TLInputFile ThumbInputFile { get; set; }\r\n\r\n        #endregion\r\n\r\n        public TLInputVideoFileLocation ToInputFileLocation()\r\n        {\r\n            return new TLInputVideoFileLocation {AccessHash = AccessHash, Id = Id};\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLWallpaperSolid.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLWallPaperBase : TLObject\r\n    {\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLInt Color { get; set; }\r\n\r\n        public TLLong CustomFlags { get; set; }\r\n    }\r\n\r\n    public class TLWallPaper : TLWallPaperBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLWallPaper;\r\n\r\n        public TLVector<TLPhotoSizeBase> Sizes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            Sizes = GetObject<TLVector<TLPhotoSizeBase>>(bytes, ref position);\r\n            Color = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            Title = GetObject<TLString>(input);\r\n            Sizes = GetObject<TLVector<TLPhotoSizeBase>>(input);\r\n            Color = GetObject<TLInt>(input);\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Title.ToStream(output);\r\n            Sizes.ToStream(output);\r\n            Color.ToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLWallPaperSolid : TLWallPaperBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLWallPaperSolid;\r\n\r\n        public TLInt BgColor { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Title = GetObject<TLString>(bytes, ref position);\r\n            BgColor = GetObject<TLInt>(bytes, ref position);\r\n            Color = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n            Title = GetObject<TLString>(input);\r\n            BgColor = GetObject<TLInt>(input);\r\n            Color = GetObject<TLInt>(input);\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Title.ToStream(output);\r\n            BgColor.ToStream(output);\r\n            Color.ToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLWebDocument.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLWebDocumentBase : TLObject, IAttributes\r\n    {\r\n        public TLString Url { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public TLVector<TLDocumentAttributeBase> Attributes { get; set; }\r\n\r\n        public TLInt W\r\n        {\r\n            get\r\n            {\r\n                var attributeSize = Attributes.FirstOrDefault(x => x is IAttributeSize) as IAttributeSize;\r\n                if (attributeSize != null)\r\n                {\r\n                    return attributeSize.W;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public TLInt H\r\n        {\r\n            get\r\n            {\r\n                var attributeSize = Attributes.FirstOrDefault(x => x is IAttributeSize) as IAttributeSize;\r\n                if (attributeSize != null)\r\n                {\r\n                    return attributeSize.H;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public TLInt Duration\r\n        {\r\n            get\r\n            {\r\n                var attributeDuration = Attributes.FirstOrDefault(x => x is IAttributeDuration) as IAttributeDuration;\r\n                if (attributeDuration != null)\r\n                {\r\n                    return attributeDuration.Duration;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public Uri Uri\r\n        {\r\n            get\r\n            {\r\n                if (TLString.IsNullOrEmpty(Url)) return null;\r\n\r\n                return new Uri(Url.ToString(), UriKind.Absolute);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TLWebDocument82 : TLWebDocumentBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLWebDocument82;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Url.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Size.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Url.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Size.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLWebDocument : TLWebDocumentBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLWebDocument;\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Url.ToBytes(),\r\n                AccessHash.ToBytes(),\r\n                Size.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes(),\r\n                DCId.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Url.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Size.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n            DCId.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLWebDocumentNoProxy : TLWebDocumentBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLWebDocumentNoProxy;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Url.ToBytes(),\r\n                Size.ToBytes(),\r\n                MimeType.ToBytes(),\r\n                Attributes.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Url = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            MimeType = GetObject<TLString>(input);\r\n            Attributes = GetObject<TLVector<TLDocumentAttributeBase>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Url.ToStream(output);\r\n            Size.ToStream(output);\r\n            MimeType.ToStream(output);\r\n            Attributes.ToStream(output);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/TL/TLWebFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLWebFile : TLFile\r\n    {\r\n        public new const uint Signature = TLConstructors.TLWebFile;\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLString MimeType { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            MimeType = GetObject<TLString>(bytes, ref position);\r\n            Type = GetObject<TLFileTypeBase>(bytes, ref position);\r\n            MTime = GetObject<TLInt>(bytes, ref position);\r\n            Bytes = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/TL/TLWebPage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\n#if WINDOWS_PHONE\r\nusing System.Net;\r\nusing System.Windows;\r\n#elif WIN_RT\r\nusing Windows.UI.Xaml;\r\n#endif\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api\r\n{\r\n    [Flags]\r\n    public enum WebPageFlags\r\n    {\r\n        Type = 0x1,\r\n        SiteName = 0x2,\r\n        Title = 0x4,\r\n        Description = 0x8,\r\n        Photo = 0x10,\r\n        Embed = 0x20,\r\n        EmbedSize = 0x40,\r\n        Duration = 0x80,\r\n        Author = 0x100,\r\n        Document = 0x200,\r\n        CachedPage = 0x400,\r\n    }\r\n\r\n    public abstract class TLWebPageBase : TLObject\r\n    {\r\n        public TLLong Id { get; set; }\r\n\r\n        #region Additional\r\n        public abstract Visibility SiteNameVisibility { get; }\r\n        public abstract Visibility AuthorVisibility { get; }\r\n        public abstract Visibility TitleVisibility { get; }\r\n        public abstract Visibility DescriptionVisibility { get; }\r\n        #endregion\r\n    }\r\n\r\n    public class TLWebPageEmpty : TLWebPageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLWebPageEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override Visibility SiteNameVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility AuthorVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility TitleVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility DescriptionVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n    }\r\n\r\n    public class TLWebPagePending : TLWebPageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLWebPagePending;\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Date.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            Date = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Date.ToStream(output);\r\n        }\r\n\r\n        public override Visibility SiteNameVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility AuthorVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility TitleVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility DescriptionVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n    }\r\n\r\n    public class TLWebPage : TLWebPageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLWebPage;\r\n\r\n        public TLInt Flags { get; set; }\r\n\r\n        public TLString Url { get; set; }\r\n\r\n        public TLString DisplayUrl { get; set; }\r\n\r\n        public TLString Type { get; set; }\r\n\r\n        public TLString SiteName { get; set; }\r\n\r\n        public TLString Title { get; set; }\r\n\r\n        public TLString Description { get; set; }\r\n\r\n        public TLPhotoBase Photo { get; set; }\r\n\r\n        public TLString EmbedUrl { get; set; }\r\n\r\n        public TLString EmbedType { get; set; }\r\n\r\n        public TLInt EmbedWidth { get; set; }\r\n\r\n        public TLInt EmbedHeight { get; set; }\r\n\r\n        public TLInt Duration { get; set; }\r\n\r\n        public string DurationString\r\n        {\r\n            get\r\n            {\r\n                if (Duration == null) return null;\r\n\r\n                var timeSpan = TimeSpan.FromSeconds(Duration.Value);\r\n\r\n                if (timeSpan.Hours > 0)\r\n                {\r\n                    return timeSpan.ToString(@\"h\\:mm\\:ss\");\r\n                }\r\n\r\n                return timeSpan.ToString(@\"m\\:ss\");\r\n            }\r\n        }\r\n\r\n        public TLString Author { get; set; }\r\n\r\n\r\n        public override Visibility SiteNameVisibility\r\n        {\r\n            get { return TLString.IsNullOrEmpty(SiteName) ? Visibility.Collapsed : Visibility.Visible; }\r\n        }\r\n\r\n        public override Visibility AuthorVisibility\r\n        {\r\n            get { return TLString.IsNullOrEmpty(Author) ? Visibility.Collapsed : Visibility.Visible; }\r\n        }\r\n\r\n        public override Visibility TitleVisibility\r\n        {\r\n            get { return TLString.IsNullOrEmpty(Title)? Visibility.Collapsed : Visibility.Visible; }\r\n        }\r\n\r\n        public override Visibility DescriptionVisibility\r\n        {\r\n            get { return TLString.IsNullOrEmpty(Description) ? Visibility.Collapsed : Visibility.Visible; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            DisplayUrl = GetObject<TLString>(bytes, ref position);\r\n            if (IsSet(Flags, (int)WebPageFlags.Type))\r\n            {\r\n                Type = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.SiteName))\r\n            {\r\n                SiteName = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Title))\r\n            {\r\n                Title = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Description))\r\n            {\r\n                Description = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Photo))\r\n            {\r\n                Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Embed))\r\n            {\r\n                EmbedUrl = GetObject<TLString>(bytes, ref position);\r\n                EmbedType = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.EmbedSize))\r\n            {\r\n                EmbedWidth = GetObject<TLInt>(bytes, ref position);\r\n                EmbedHeight = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Duration))\r\n            {\r\n                Duration = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Author))\r\n            {\r\n                Author = GetObject<TLString>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                Url.ToBytes(),\r\n                DisplayUrl.ToBytes(),\r\n                ToBytes(Type, Flags, (int)WebPageFlags.Type),\r\n                ToBytes(SiteName, Flags, (int)WebPageFlags.SiteName),\r\n                ToBytes(Title, Flags, (int)WebPageFlags.Title),\r\n                ToBytes(Description, Flags, (int)WebPageFlags.Description),\r\n                ToBytes(Photo, Flags, (int)WebPageFlags.Photo),\r\n                ToBytes(EmbedUrl, Flags, (int)WebPageFlags.Embed),\r\n                ToBytes(EmbedType, Flags, (int)WebPageFlags.Embed),\r\n                ToBytes(EmbedWidth, Flags, (int)WebPageFlags.EmbedSize),\r\n                ToBytes(EmbedHeight, Flags, (int)WebPageFlags.EmbedSize),\r\n                ToBytes(Duration, Flags, (int)WebPageFlags.Duration),\r\n                ToBytes(Author, Flags, (int)WebPageFlags.Author));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLLong>(input);\r\n            Url = GetObject<TLString>(input);\r\n            DisplayUrl = GetObject<TLString>(input);\r\n            if (IsSet(Flags, (int)WebPageFlags.Type))\r\n            {\r\n                Type = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.SiteName))\r\n            {\r\n                SiteName = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Title))\r\n            {\r\n                Title = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Description))\r\n            {\r\n                Description = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Photo))\r\n            {\r\n                Photo = GetObject<TLPhotoBase>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Embed))\r\n            {\r\n                EmbedUrl = GetObject<TLString>(input);\r\n                EmbedType = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.EmbedSize))\r\n            {\r\n                EmbedWidth = GetObject<TLInt>(input);\r\n                EmbedHeight = GetObject<TLInt>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Duration))\r\n            {\r\n                Duration = GetObject<TLInt>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Author))\r\n            {\r\n                Author = GetObject<TLString>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            Url.ToStream(output);\r\n            DisplayUrl.ToStream(output);\r\n            ToStream(output, Type, Flags, (int)WebPageFlags.Type);\r\n            ToStream(output, SiteName, Flags, (int)WebPageFlags.SiteName);\r\n            ToStream(output, Title, Flags, (int)WebPageFlags.Title);\r\n            ToStream(output, Description, Flags, (int)WebPageFlags.Description);\r\n            ToStream(output, Photo, Flags, (int)WebPageFlags.Photo);\r\n            ToStream(output, EmbedUrl, Flags, (int)WebPageFlags.Embed);\r\n            ToStream(output, EmbedType, Flags, (int)WebPageFlags.Embed);\r\n            ToStream(output, EmbedWidth, Flags, (int)WebPageFlags.EmbedSize);\r\n            ToStream(output, EmbedHeight, Flags, (int)WebPageFlags.EmbedSize);\r\n            ToStream(output, Duration, Flags, (int)WebPageFlags.Duration);\r\n            ToStream(output, Author, Flags, (int) WebPageFlags.Author);\r\n        }\r\n    }\r\n\r\n    public class TLWebPage35 : TLWebPage\r\n    {\r\n        public new const uint Signature = TLConstructors.TLWebPage35;\r\n\r\n        public TLDocumentBase Document { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            DisplayUrl = GetObject<TLString>(bytes, ref position);\r\n            if (IsSet(Flags, (int)WebPageFlags.Type))\r\n            {\r\n                Type = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.SiteName))\r\n            {\r\n                SiteName = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Title))\r\n            {\r\n                Title = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Description))\r\n            {\r\n                Description = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Photo))\r\n            {\r\n                Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Embed))\r\n            {\r\n                EmbedUrl = GetObject<TLString>(bytes, ref position);\r\n                EmbedType = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.EmbedSize))\r\n            {\r\n                EmbedWidth = GetObject<TLInt>(bytes, ref position);\r\n                EmbedHeight = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Duration))\r\n            {\r\n                Duration = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Author))\r\n            {\r\n                Author = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Document))\r\n            {\r\n                Document = GetObject<TLDocumentBase>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                Url.ToBytes(),\r\n                DisplayUrl.ToBytes(),\r\n                ToBytes(Type, Flags, (int)WebPageFlags.Type),\r\n                ToBytes(SiteName, Flags, (int)WebPageFlags.SiteName),\r\n                ToBytes(Title, Flags, (int)WebPageFlags.Title),\r\n                ToBytes(Description, Flags, (int)WebPageFlags.Description),\r\n                ToBytes(Photo, Flags, (int)WebPageFlags.Photo),\r\n                ToBytes(EmbedUrl, Flags, (int)WebPageFlags.Embed),\r\n                ToBytes(EmbedType, Flags, (int)WebPageFlags.Embed),\r\n                ToBytes(EmbedWidth, Flags, (int)WebPageFlags.EmbedSize),\r\n                ToBytes(EmbedHeight, Flags, (int)WebPageFlags.EmbedSize),\r\n                ToBytes(Duration, Flags, (int)WebPageFlags.Duration),\r\n                ToBytes(Author, Flags, (int)WebPageFlags.Author),\r\n                ToBytes(Document, Flags, (int)WebPageFlags.Document));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLLong>(input);\r\n            Url = GetObject<TLString>(input);\r\n            DisplayUrl = GetObject<TLString>(input);\r\n            if (IsSet(Flags, (int)WebPageFlags.Type))\r\n            {\r\n                Type = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.SiteName))\r\n            {\r\n                SiteName = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Title))\r\n            {\r\n                Title = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Description))\r\n            {\r\n                Description = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Photo))\r\n            {\r\n                Photo = GetObject<TLPhotoBase>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Embed))\r\n            {\r\n                EmbedUrl = GetObject<TLString>(input);\r\n                EmbedType = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.EmbedSize))\r\n            {\r\n                EmbedWidth = GetObject<TLInt>(input);\r\n                EmbedHeight = GetObject<TLInt>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Duration))\r\n            {\r\n                Duration = GetObject<TLInt>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Author))\r\n            {\r\n                Author = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Document))\r\n            {\r\n                Document = GetObject<TLDocumentBase>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            Url.ToStream(output);\r\n            DisplayUrl.ToStream(output);\r\n            ToStream(output, Type, Flags, (int)WebPageFlags.Type);\r\n            ToStream(output, SiteName, Flags, (int)WebPageFlags.SiteName);\r\n            ToStream(output, Title, Flags, (int)WebPageFlags.Title);\r\n            ToStream(output, Description, Flags, (int)WebPageFlags.Description);\r\n            ToStream(output, Photo, Flags, (int)WebPageFlags.Photo);\r\n            ToStream(output, EmbedUrl, Flags, (int)WebPageFlags.Embed);\r\n            ToStream(output, EmbedType, Flags, (int)WebPageFlags.Embed);\r\n            ToStream(output, EmbedWidth, Flags, (int)WebPageFlags.EmbedSize);\r\n            ToStream(output, EmbedHeight, Flags, (int)WebPageFlags.EmbedSize);\r\n            ToStream(output, Duration, Flags, (int)WebPageFlags.Duration);\r\n            ToStream(output, Author, Flags, (int)WebPageFlags.Author);\r\n            ToStream(output, Document, Flags, (int)WebPageFlags.Document);\r\n        }\r\n    }\r\n\r\n    public class TLWebPage59 : TLWebPage35\r\n    {\r\n        public new const uint Signature = TLConstructors.TLWebPage59;\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public TLPageBase CachedPage { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            Url = GetObject<TLString>(bytes, ref position);\r\n            DisplayUrl = GetObject<TLString>(bytes, ref position);\r\n            Hash = GetObject<TLInt>(bytes, ref position);\r\n            if (IsSet(Flags, (int)WebPageFlags.Type))\r\n            {\r\n                Type = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.SiteName))\r\n            {\r\n                SiteName = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Title))\r\n            {\r\n                Title = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Description))\r\n            {\r\n                Description = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Photo))\r\n            {\r\n                Photo = GetObject<TLPhotoBase>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Embed))\r\n            {\r\n                EmbedUrl = GetObject<TLString>(bytes, ref position);\r\n                EmbedType = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.EmbedSize))\r\n            {\r\n                EmbedWidth = GetObject<TLInt>(bytes, ref position);\r\n                EmbedHeight = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Duration))\r\n            {\r\n                Duration = GetObject<TLInt>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Author))\r\n            {\r\n                Author = GetObject<TLString>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Document))\r\n            {\r\n                Document = GetObject<TLDocumentBase>(bytes, ref position);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.CachedPage))\r\n            {\r\n                CachedPage = GetObject<TLPageBase>(bytes, ref position);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Id.ToBytes(),\r\n                Url.ToBytes(),\r\n                DisplayUrl.ToBytes(),\r\n                Hash.ToBytes(),\r\n                ToBytes(Type, Flags, (int)WebPageFlags.Type),\r\n                ToBytes(SiteName, Flags, (int)WebPageFlags.SiteName),\r\n                ToBytes(Title, Flags, (int)WebPageFlags.Title),\r\n                ToBytes(Description, Flags, (int)WebPageFlags.Description),\r\n                ToBytes(Photo, Flags, (int)WebPageFlags.Photo),\r\n                ToBytes(EmbedUrl, Flags, (int)WebPageFlags.Embed),\r\n                ToBytes(EmbedType, Flags, (int)WebPageFlags.Embed),\r\n                ToBytes(EmbedWidth, Flags, (int)WebPageFlags.EmbedSize),\r\n                ToBytes(EmbedHeight, Flags, (int)WebPageFlags.EmbedSize),\r\n                ToBytes(Duration, Flags, (int)WebPageFlags.Duration),\r\n                ToBytes(Author, Flags, (int)WebPageFlags.Author),\r\n                ToBytes(Document, Flags, (int)WebPageFlags.Document),\r\n                ToBytes(CachedPage, Flags, (int)WebPageFlags.CachedPage));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Id = GetObject<TLLong>(input);\r\n            Url = GetObject<TLString>(input);\r\n            DisplayUrl = GetObject<TLString>(input);\r\n            Hash = GetObject<TLInt>(input);\r\n            if (IsSet(Flags, (int)WebPageFlags.Type))\r\n            {\r\n                Type = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.SiteName))\r\n            {\r\n                SiteName = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Title))\r\n            {\r\n                Title = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Description))\r\n            {\r\n                Description = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Photo))\r\n            {\r\n                Photo = GetObject<TLPhotoBase>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Embed))\r\n            {\r\n                EmbedUrl = GetObject<TLString>(input);\r\n                EmbedType = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.EmbedSize))\r\n            {\r\n                EmbedWidth = GetObject<TLInt>(input);\r\n                EmbedHeight = GetObject<TLInt>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Duration))\r\n            {\r\n                Duration = GetObject<TLInt>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Author))\r\n            {\r\n                Author = GetObject<TLString>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.Document))\r\n            {\r\n                Document = GetObject<TLDocumentBase>(input);\r\n            }\r\n            if (IsSet(Flags, (int)WebPageFlags.CachedPage))\r\n            {\r\n                CachedPage = GetObject<TLPageBase>(input);\r\n            }\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Id.ToStream(output);\r\n            Url.ToStream(output);\r\n            DisplayUrl.ToStream(output);\r\n            Hash.ToStream(output);\r\n            ToStream(output, Type, Flags, (int)WebPageFlags.Type);\r\n            ToStream(output, SiteName, Flags, (int)WebPageFlags.SiteName);\r\n            ToStream(output, Title, Flags, (int)WebPageFlags.Title);\r\n            ToStream(output, Description, Flags, (int)WebPageFlags.Description);\r\n            ToStream(output, Photo, Flags, (int)WebPageFlags.Photo);\r\n            ToStream(output, EmbedUrl, Flags, (int)WebPageFlags.Embed);\r\n            ToStream(output, EmbedType, Flags, (int)WebPageFlags.Embed);\r\n            ToStream(output, EmbedWidth, Flags, (int)WebPageFlags.EmbedSize);\r\n            ToStream(output, EmbedHeight, Flags, (int)WebPageFlags.EmbedSize);\r\n            ToStream(output, Duration, Flags, (int)WebPageFlags.Duration);\r\n            ToStream(output, Author, Flags, (int)WebPageFlags.Author);\r\n            ToStream(output, Document, Flags, (int)WebPageFlags.Document);\r\n            ToStream(output, CachedPage, Flags, (int)WebPageFlags.CachedPage);\r\n        }\r\n    }\r\n\r\n    public class TLWebPageNotModified : TLWebPageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLWebPageNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override Visibility SiteNameVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility AuthorVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility TitleVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n\r\n        public override Visibility DescriptionVisibility\r\n        {\r\n            get { return Visibility.Collapsed; }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Telegram.Api.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Telegram.Api</RootNamespace>\r\n    <AssemblyName>Telegram.Api</AssemblyName>\r\n    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>\r\n    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;LOG_REGISTRATION;LAYER_29;LAYER_40</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;LOG_REGISTRATION;LAYER_29;LAYER_40</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug Private Beta|AnyCPU'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\Debug Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;PRIVATE_BETA;</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release Private Beta|AnyCPU'\">\r\n    <OutputPath>bin\\Release Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;PRIVATE_BETA;LOG_REGISTRATION;</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"BouncyCastle.Crypto.WP71\">\r\n      <HintPath>..\\Libraries\\BouncyCastle.Crypto.WP71.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Phone\" />\r\n    <Reference Include=\"System.Observable\" />\r\n    <Reference Include=\"System.Reactive.Core\">\r\n      <HintPath>..\\packages\\Rx-Core.2.2.2\\lib\\windowsphone71\\System.Reactive.Core.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Interfaces\">\r\n      <HintPath>..\\packages\\Rx-Interfaces.2.2.2\\lib\\windowsphone71\\System.Reactive.Interfaces.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Linq\">\r\n      <HintPath>..\\packages\\Rx-Linq.2.2.2\\lib\\windowsphone71\\System.Reactive.Linq.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Runtime.Serialization\" />\r\n    <Reference Include=\"System.Windows\" />\r\n    <Reference Include=\"system\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Net\" />\r\n    <Reference Include=\"mscorlib.extensions\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"Compression\\GZipDeflateStream.cs\">\r\n      <Link>Compression\\GZipDeflateStream.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Constants.cs\">\r\n      <Link>Constants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"CRC.cs\">\r\n      <Link>CRC.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Extensions\\ActionExtensions.cs\">\r\n      <Link>Extensions\\ActionExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Extensions\\HttpWebRequestExtensions.cs\">\r\n      <Link>Extensions\\HttpWebRequestExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Extensions\\StreamExtensions.cs\">\r\n      <Link>Extensions\\StreamExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Extensions\\TLObjectExtensions.cs\">\r\n      <Link>Extensions\\TLObjectExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Helpers\\Execute.cs\">\r\n      <Link>Helpers\\Execute.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Helpers\\FileUtils.cs\">\r\n      <Link>Helpers\\FileUtils.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Helpers\\PhoneHelper.cs\">\r\n      <Link>Helpers\\PhoneHelper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Helpers\\SettingsHelper.cs\">\r\n      <Link>Helpers\\SettingsHelper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Helpers\\Utils.cs\">\r\n      <Link>Helpers\\Utils.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"MD5\\MD5.cs\">\r\n      <Link>MD5\\MD5.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"MD5\\MD5CryptoServiceProvider.cs\">\r\n      <Link>MD5\\MD5CryptoServiceProvider.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"MD5\\MD5Managed.cs\">\r\n      <Link>MD5\\MD5Managed.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\Cache\\Context.cs\">\r\n      <Link>Services\\Cache\\Context.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\Cache\\EventArgs\\DialogAddedEventArgs.cs\">\r\n      <Link>Services\\Cache\\EventArgs\\DialogAddedEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\Cache\\EventArgs\\TopMessageUpdatedEventArgs.cs\">\r\n      <Link>Services\\Cache\\EventArgs\\TopMessageUpdatedEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\Cache\\ICacheService.cs\">\r\n      <Link>Services\\Cache\\ICacheService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\Cache\\InMemoryCacheService.cs\">\r\n      <Link>Services\\Cache\\InMemoryCacheService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\Cache\\InMemoryDatabase.cs\">\r\n      <Link>Services\\Cache\\InMemoryDatabase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\Connection\\ConnectionService.cs\">\r\n      <Link>Services\\Connection\\ConnectionService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\DCOptionItem.cs\">\r\n      <Link>Services\\DCOptionItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\DelayedItem.cs\">\r\n      <Link>Services\\DelayedItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\AudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\AudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\DocumentFileManager.cs\">\r\n      <Link>Services\\FileManager\\DocumentFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\DownloadableItem.cs\">\r\n      <Link>Services\\FileManager\\DownloadableItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\DownloadablePart.cs\">\r\n      <Link>Services\\FileManager\\DownloadablePart.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\DownloadingCanceledEventArgs.cs\">\r\n      <Link>Services\\FileManager\\DownloadingCanceledEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\EncryptedFileManager.cs\">\r\n      <Link>Services\\FileManager\\EncryptedFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\FileManager.cs\">\r\n      <Link>Services\\FileManager\\FileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\IAudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\IAudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\IDocumentFileManager.cs\">\r\n      <Link>Services\\FileManager\\IDocumentFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\IEncryptedFileManager.cs\">\r\n      <Link>Services\\FileManager\\IEncryptedFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\IFileManager.cs\">\r\n      <Link>Services\\FileManager\\IFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\IUploadAudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\IUploadAudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\IUploadFileManager.cs\">\r\n      <Link>Services\\FileManager\\IUploadFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\IUploadVideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\IUploadVideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\IVideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\IVideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\ProgressChangedEventArgs.cs\">\r\n      <Link>Services\\FileManager\\ProgressChangedEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\UploadAudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\UploadAudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\UploadFileManager.cs\">\r\n      <Link>Services\\FileManager\\UploadFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\UploadVideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\UploadVideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\VideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\VideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\Worker.cs\">\r\n      <Link>Services\\FileManager\\Worker.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\HistoryItem.cs\">\r\n      <Link>Services\\HistoryItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\IMTProtoService.cs\">\r\n      <Link>Services\\IMTProtoService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Account.cs\">\r\n      <Link>Services\\MTProtoService.Account.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Auth.cs\">\r\n      <Link>Services\\MTProtoService.Auth.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.ByTransport.cs\">\r\n      <Link>Services\\MTProtoService.ByTransport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Config.cs\">\r\n      <Link>Services\\MTProtoService.Config.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Contacts.cs\">\r\n      <Link>Services\\MTProtoService.Contacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.cs\">\r\n      <Link>Services\\MTProtoService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.DHKeyExchange.cs\">\r\n      <Link>Services\\MTProtoService.DHKeyExchange.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Help.cs\">\r\n      <Link>Services\\MTProtoService.Help.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Helpers.cs\">\r\n      <Link>Services\\MTProtoService.Helpers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.HttpLongPoll.cs\">\r\n      <Link>Services\\MTProtoService.HttpLongPoll.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Messages.cs\">\r\n      <Link>Services\\MTProtoService.Messages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Photos.cs\">\r\n      <Link>Services\\MTProtoService.Photos.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.SecretChats.cs\">\r\n      <Link>Services\\MTProtoService.SecretChats.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.SendingQueue.cs\">\r\n      <Link>Services\\MTProtoService.SendingQueue.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Stuff.cs\">\r\n      <Link>Services\\MTProtoService.Stuff.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Updates.cs\">\r\n      <Link>Services\\MTProtoService.Updates.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Upload.cs\">\r\n      <Link>Services\\MTProtoService.Upload.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\MTProtoService.Users.cs\">\r\n      <Link>Services\\MTProtoService.Users.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\ServiceBase.cs\">\r\n      <Link>Services\\ServiceBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\Updates\\IUpdatesService.cs\">\r\n      <Link>Services\\Updates\\IUpdatesService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\Updates\\ReceiveUpdatesEventArgs.cs\">\r\n      <Link>Services\\Updates\\ReceiveUpdatesEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\Updates\\UpdatesBySeqComparer.cs\">\r\n      <Link>Services\\Updates\\UpdatesBySeqComparer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Services\\Updates\\UpdatesService.cs\">\r\n      <Link>Services\\Updates\\UpdatesService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Enums.cs\">\r\n      <Link>TL\\Enums.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLCheckUsername.cs\">\r\n      <Link>TL\\Account\\TLCheckUsername.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLDeleteAccount.cs\">\r\n      <Link>TL\\Account\\TLDeleteAccount.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLGetAccountTTL.cs\">\r\n      <Link>TL\\Account\\TLGetAccountTTL.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLGetNotifySettings.cs\">\r\n      <Link>TL\\Account\\TLGetNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLGetPrivacy.cs\">\r\n      <Link>TL\\Account\\TLGetPrivacy.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLRegisterDevice.cs\">\r\n      <Link>TL\\Account\\TLRegisterDevice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLResetNotifySettings.cs\">\r\n      <Link>TL\\Account\\TLResetNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLSetPrivacy.cs\">\r\n      <Link>TL\\Account\\TLSetPrivacy.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLUnregisterDevice.cs\">\r\n      <Link>TL\\Account\\TLUnregisterDevice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLUpdateNotifySettings.cs\">\r\n      <Link>TL\\Account\\TLUpdateNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLUpdateProfile.cs\">\r\n      <Link>TL\\Account\\TLUpdateProfile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLUpdateStatus.cs\">\r\n      <Link>TL\\Account\\TLUpdateStatus.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Account\\TLUpdateUserName.cs\">\r\n      <Link>TL\\Account\\TLUpdateUserName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLCheckPhone.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLCheckPhone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLExportAuthorization.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLExportAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLImportAuthorization.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLImportAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLLogOut.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLLogOut.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLResetAuthorizations.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLResetAuthorizations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLSendCall.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLSendCode.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLSendInvites.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendInvites.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLSendSms.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendSms.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLSignIn.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSignIn.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLSignUp.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSignUp.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Contacts\\TLBlock.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLBlock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Contacts\\TLDeleteContact.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLDeleteContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Contacts\\TLDeleteContacts.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLDeleteContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Contacts\\TLGetBlocked.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetBlocked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Contacts\\TLGetContacts.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Contacts\\TLGetStatuses.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetStatuses.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Contacts\\TLImportContacts.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLImportContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Contacts\\TLSearch.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLSearch.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Contacts\\TLUnblock.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLUnblock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\DHKeyExchange\\TLReqDHParams.cs\">\r\n      <Link>TL\\Functions\\DHKeyExchange\\TLReqDHParams.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\DHKeyExchange\\TLReqPQ.cs\">\r\n      <Link>TL\\Functions\\DHKeyExchange\\TLReqPQ.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\DHKeyExchange\\TLSetClientDHParams.cs\">\r\n      <Link>TL\\Functions\\DHKeyExchange\\TLSetClientDHParams.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Help\\TLGetConfig.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Help\\TLGetInviteText.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetInviteText.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Help\\TLGetNearestDC.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetNearestDC.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Help\\TLGetSupport.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetSupport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Help\\TLInvokeWithLayerN.cs\">\r\n      <Link>TL\\Functions\\Help\\TLInvokeWithLayerN.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLAcceptEncryption.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLAcceptEncryption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLAddChatUser.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLAddChatUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLCreateChat.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLCreateChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLDeleteChatUser.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDeleteChatUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLDeleteHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDeleteHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLDeleteMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDeleteMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLDiscardEncryption.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDiscardEncryption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLEditChatPhoto.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLEditChatPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLEditChatTitle.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLEditChatTitle.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLForwardMessage.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLForwardMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLForwardMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLForwardMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetChats.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetChats.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetDHConfig.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetDHConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetDialogs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetFullChat.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetFullChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLReadEncryptedHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadEncryptedHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLReadHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLReadMessageContents.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadMessageContents.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLReceivedMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReceivedMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLReceivedQueue.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReceivedQueue.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLRequestEncryption.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLRequestEncryption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLRestoreMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLRestoreMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSearch.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSearch.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSendBroadcast.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendBroadcast.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSendEncrypted.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendEncrypted.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSendEncryptedFile.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSendEncryptedService.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendEncryptedService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSendMedia.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSendMessage.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSetEncryptedTyping.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSetEncryptedTyping.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSetTyping.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSetTyping.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Photos\\TLGetUserPhotos.cs\">\r\n      <Link>TL\\Functions\\Photos\\TLGetUserPhotos.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Photos\\TLUpdateProfilePhoto.cs\">\r\n      <Link>TL\\Functions\\Photos\\TLUpdateProfilePhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Photos\\TLUploadProfilePhoto.cs\">\r\n      <Link>TL\\Functions\\Photos\\TLUploadProfilePhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Stuff\\TLGetFutureSalts.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLGetFutureSalts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Stuff\\TLHttpWait.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLHttpWait.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Stuff\\TLMessageAcknowledgments.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLMessageAcknowledgments.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Stuff\\TLRPCDropAnswer.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLRPCDropAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Updates\\TLGetDifference.cs\">\r\n      <Link>TL\\Functions\\Updates\\TLGetDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Updates\\TLGetState.cs\">\r\n      <Link>TL\\Functions\\Updates\\TLGetState.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Upload\\TLGetFile.cs\">\r\n      <Link>TL\\Functions\\Upload\\TLGetFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Upload\\TLSaveFilePart.cs\">\r\n      <Link>TL\\Functions\\Upload\\TLSaveFilePart.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Users\\TLGetFullUser.cs\">\r\n      <Link>TL\\Functions\\Users\\TLGetFullUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Functions\\Users\\TLGetUsers.cs\">\r\n      <Link>TL\\Functions\\Users\\TLGetUsers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Interfaces\\IBytes.cs\">\r\n      <Link>TL\\Interfaces\\IBytes.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Interfaces\\IFullName.cs\">\r\n      <Link>TL\\Interfaces\\IFullName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Interfaces\\IInputPeer.cs\">\r\n      <Link>TL\\Interfaces\\IInputPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Interfaces\\ISelectable.cs\">\r\n      <Link>TL\\Interfaces\\ISelectable.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\Interfaces\\IVIsibility.cs\">\r\n      <Link>TL\\Interfaces\\IVIsibility.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\SignatureAttribute.cs\">\r\n      <Link>TL\\SignatureAttribute.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLAffectedHistory.cs\">\r\n      <Link>TL\\TLAffectedHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLAudio.cs\">\r\n      <Link>TL\\TLAudio.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLAuthorization.cs\">\r\n      <Link>TL\\TLAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLBadMessageNotification.cs\">\r\n      <Link>TL\\TLBadMessageNotification.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLBadServerSalt.cs\">\r\n      <Link>TL\\TLBadServerSalt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLBool.cs\">\r\n      <Link>TL\\TLBool.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLChat.cs\">\r\n      <Link>TL\\TLChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLChatFull.cs\">\r\n      <Link>TL\\TLChatFull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLChatParticipant.cs\">\r\n      <Link>TL\\TLChatParticipant.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLChatParticipants.cs\">\r\n      <Link>TL\\TLChatParticipants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLChats.cs\">\r\n      <Link>TL\\TLChats.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLCheckedPhone.cs\">\r\n      <Link>TL\\TLCheckedPhone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLClientDHInnerData.cs\">\r\n      <Link>TL\\TLClientDHInnerData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLConfig.cs\">\r\n      <Link>TL\\TLConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLContact.cs\">\r\n      <Link>TL\\TLContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLContactBlocked.cs\">\r\n      <Link>TL\\TLContactBlocked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLContactFound.cs\">\r\n      <Link>TL\\TLContactFound.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLContacts.cs\">\r\n      <Link>TL\\TLContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLContactsBlocked.cs\">\r\n      <Link>TL\\TLContactsBlocked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLContactsFound.cs\">\r\n      <Link>TL\\TLContactsFound.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLContactStatus.cs\">\r\n      <Link>TL\\TLContactStatus.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLContainerTransportMessage.cs\">\r\n      <Link>TL\\TLContainerTransportMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDCOption.cs\">\r\n      <Link>TL\\TLDCOption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDecryptedMessage.cs\">\r\n      <Link>TL\\TLDecryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDecryptedMessageAction.cs\">\r\n      <Link>TL\\TLDecryptedMessageAction.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDecryptedMessageLayer.cs\">\r\n      <Link>TL\\TLDecryptedMessageLayer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDecryptedMessageMedia.cs\">\r\n      <Link>TL\\TLDecryptedMessageMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDHConfig.cs\">\r\n      <Link>TL\\TLDHConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDHGen.cs\">\r\n      <Link>TL\\TLDHGen.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDialog.cs\">\r\n      <Link>TL\\TLDialog.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDialogs.cs\">\r\n      <Link>TL\\TLDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDifference.cs\">\r\n      <Link>TL\\TLDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDocument.cs\">\r\n      <Link>TL\\TLDocument.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLDouble.cs\">\r\n      <Link>TL\\TLDouble.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLEncryptedChat.cs\">\r\n      <Link>TL\\TLEncryptedChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLEncryptedFile.cs\">\r\n      <Link>TL\\TLEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLEncryptedMessage.cs\">\r\n      <Link>TL\\TLEncryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLExportedAuthorization.cs\">\r\n      <Link>TL\\TLExportedAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLFile.cs\">\r\n      <Link>TL\\TLFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLFileLocation.cs\">\r\n      <Link>TL\\TLFileLocation.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLFileType.cs\">\r\n      <Link>TL\\TLFileType.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLForeignLink.cs\">\r\n      <Link>TL\\TLForeignLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLFutureSalt.cs\">\r\n      <Link>TL\\TLFutureSalt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLGeoPoint.cs\">\r\n      <Link>TL\\TLGeoPoint.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLGzipPacked.cs\">\r\n      <Link>TL\\TLGzipPacked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLImportedContact.cs\">\r\n      <Link>TL\\TLImportedContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLImportedContacts.cs\">\r\n      <Link>TL\\TLImportedContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInitConnection.cs\">\r\n      <Link>TL\\TLInitConnection.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputAudio.cs\">\r\n      <Link>TL\\TLInputAudio.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputChatPhoto.cs\">\r\n      <Link>TL\\TLInputChatPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputContact.cs\">\r\n      <Link>TL\\TLInputContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputDocument.cs\">\r\n      <Link>TL\\TLInputDocument.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputEncryptedChat.cs\">\r\n      <Link>TL\\TLInputEncryptedChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputEncryptedFile.cs\">\r\n      <Link>TL\\TLInputEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputEncryptedFileLocation.cs\">\r\n      <Link>TL\\TLInputEncryptedFileLocation.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputFile.cs\">\r\n      <Link>TL\\TLInputFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputFileLocation.cs\">\r\n      <Link>TL\\TLInputFileLocation.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputGeoPoint.cs\">\r\n      <Link>TL\\TLInputGeoPoint.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputMedia.cs\">\r\n      <Link>TL\\TLInputMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputMessagesFilter.cs\">\r\n      <Link>TL\\TLInputMessagesFilter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputNotifyPeer.cs\">\r\n      <Link>TL\\TLInputNotifyPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputPeerBase.cs\">\r\n      <Link>TL\\TLInputPeerBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputPeerNotifyEvents.cs\">\r\n      <Link>TL\\TLInputPeerNotifyEvents.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputPeerNotifySettings.cs\">\r\n      <Link>TL\\TLInputPeerNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputPhoto.cs\">\r\n      <Link>TL\\TLInputPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputPhotoCrop.cs\">\r\n      <Link>TL\\TLInputPhotoCrop.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputUser.cs\">\r\n      <Link>TL\\TLInputUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInputVideo.cs\">\r\n      <Link>TL\\TLInputVideo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInt.cs\">\r\n      <Link>TL\\TLInt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInt128.cs\">\r\n      <Link>TL\\TLInt128.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInt256.cs\">\r\n      <Link>TL\\TLInt256.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInviteText.cs\">\r\n      <Link>TL\\TLInviteText.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLInvokeAfterMsg.cs\">\r\n      <Link>TL\\TLInvokeAfterMsg.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLLink.cs\">\r\n      <Link>TL\\TLLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLLong.cs\">\r\n      <Link>TL\\TLLong.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLMessage.cs\">\r\n      <Link>TL\\TLMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLMessage.Encrypted.cs\">\r\n      <Link>TL\\TLMessage.Encrypted.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLMessageAction.cs\">\r\n      <Link>TL\\TLMessageAction.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLMessageContainer.cs\">\r\n      <Link>TL\\TLMessageContainer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLMessageInfo.cs\">\r\n      <Link>TL\\TLMessageInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLMessageMedia.cs\">\r\n      <Link>TL\\TLMessageMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLMessages.cs\">\r\n      <Link>TL\\TLMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLMessagesAcknowledgment.cs\">\r\n      <Link>TL\\TLMessagesAcknowledgment.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLMessagesChatFull.cs\">\r\n      <Link>TL\\TLMessagesChatFull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLMyLink.cs\">\r\n      <Link>TL\\TLMyLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLNearestDC.cs\">\r\n      <Link>TL\\TLNearestDC.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLNewSessionCreated.cs\">\r\n      <Link>TL\\TLNewSessionCreated.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLNonEncryptedMessage.cs\">\r\n      <Link>TL\\TLNonEncryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLNotifyPeer.cs\">\r\n      <Link>TL\\TLNotifyPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLNull.cs\">\r\n      <Link>TL\\TLNull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLObject.cs\">\r\n      <Link>TL\\TLObject.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLObjectGenerator.cs\">\r\n      <Link>TL\\TLObjectGenerator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLPeer.cs\">\r\n      <Link>TL\\TLPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLPeerNotifyEvents.cs\">\r\n      <Link>TL\\TLPeerNotifyEvents.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLPeerNotifySettings.cs\">\r\n      <Link>TL\\TLPeerNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLPhoto.cs\">\r\n      <Link>TL\\TLPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLPhotos.cs\">\r\n      <Link>TL\\TLPhotos.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLPhotoSize.cs\">\r\n      <Link>TL\\TLPhotoSize.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLPhotosPhoto.cs\">\r\n      <Link>TL\\TLPhotosPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLPong.cs\">\r\n      <Link>TL\\TLPong.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLPQInnerData.cs\">\r\n      <Link>TL\\TLPQInnerData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLRequest.cs\">\r\n      <Link>TL\\TLRequest.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLResponse.cs\">\r\n      <Link>TL\\TLResponse.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLResPQ.cs\">\r\n      <Link>TL\\TLResPQ.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLRPCDropAnswer.cs\">\r\n      <Link>TL\\TLRPCDropAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLRPCError.cs\">\r\n      <Link>TL\\TLRPCError.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLRPCResult.cs\">\r\n      <Link>TL\\TLRPCResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLSendMessageAction.cs\">\r\n      <Link>TL\\TLSendMessageAction.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLSentCode.cs\">\r\n      <Link>TL\\TLSentCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLSentEncryptedFile.cs\">\r\n      <Link>TL\\TLSentEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLSentEncryptedMessage.cs\">\r\n      <Link>TL\\TLSentEncryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLSentMessage.cs\">\r\n      <Link>TL\\TLSentMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLServerDHInnerData.cs\">\r\n      <Link>TL\\TLServerDHInnerData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLServerDHParams.cs\">\r\n      <Link>TL\\TLServerDHParams.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLServerFile.cs\">\r\n      <Link>TL\\TLServerFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLSignatures.cs\">\r\n      <Link>TL\\TLSignatures.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLState.cs\">\r\n      <Link>TL\\TLState.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLStatedMessage.cs\">\r\n      <Link>TL\\TLStatedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLStatedMessages.cs\">\r\n      <Link>TL\\TLStatedMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLString.cs\">\r\n      <Link>TL\\TLString.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLSupport.cs\">\r\n      <Link>TL\\TLSupport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLUpdate.cs\">\r\n      <Link>TL\\TLUpdate.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLUpdates.cs\">\r\n      <Link>TL\\TLUpdates.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLUserBase.cs\">\r\n      <Link>TL\\TLUserBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLUserFull.cs\">\r\n      <Link>TL\\TLUserFull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLUserStatus.cs\">\r\n      <Link>TL\\TLUserStatus.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLUtils.cs\">\r\n      <Link>TL\\TLUtils.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLUtils.Log.cs\">\r\n      <Link>TL\\TLUtils.Log.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLVector.cs\">\r\n      <Link>TL\\TLVector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLVideo.cs\">\r\n      <Link>TL\\TLVideo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"TL\\TLWallpaperSolid.cs\">\r\n      <Link>TL\\TLWallpaperSolid.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Transport\\DataEventArgs.cs\">\r\n      <Link>Transport\\DataEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Transport\\HttpTransport.cs\">\r\n      <Link>Transport\\HttpTransport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Transport\\ITransport.cs\">\r\n      <Link>Transport\\ITransport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Transport\\ITransportService.cs\">\r\n      <Link>Transport\\ITransportService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Transport\\TCPTransport.cs\">\r\n      <Link>Transport\\TCPTransport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Transport\\TCPTransportBase.cs\">\r\n      <Link>Transport\\TCPTransportBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Transport\\TCPTransportResult.cs\">\r\n      <Link>Transport\\TCPTransportResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Transport\\TransportService.cs\">\r\n      <Link>Transport\\TransportService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Aggregator\\EventAggregator.cs\" />\r\n    <Compile Include=\"Aggregator\\ExtensionMethods.cs\" />\r\n    <Compile Include=\"Logs\\Log.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"Services\\DeviceInfo\\EmptyDeviceInfoService.cs\" />\r\n    <Compile Include=\"Services\\DeviceInfo\\IDeviceInfo.cs\" />\r\n    <Compile Include=\"Services\\MTProtoService.Channel.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLRecoverPassword.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLReportPeer.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLRequestPasswordRecovery.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLGetAuthorizations.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLGetPasswordSettings.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLResetAuthorization.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLResetPassword.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLUpdatePasswordSettings.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLCancelCode.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLResendCode.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLDeleteChannel.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLDeleteUserHistory.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLEditMessage.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLEditPhoto.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLEditTitle.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLExportInvite.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLExportMessageLink.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLGetChannels.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLGetFullChannel.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLGetMessageEditData.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLGetMessages.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLGetParticipant.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLInviteToChannel.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLJoinChannel.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLKickFromChannel.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLLeaveChannel.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLReportSpam.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLToggleComments.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLToggleInvites.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLToggleSignatures.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLUpdatePinnedMessage.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Help\\TLGetAppChangelog.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLCheckUsername.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLCreateChannel.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLDeleteChannelMessages.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLEditAbout.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLEditAdmin.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLGetDialogs.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Help\\TLGetTermsOfService.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLDeactivateChat.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLEditChatAdmin.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLBotGetCallbackAnswer.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetDocumentByHash.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetInlineBotResults.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetPeerSettings.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetSavedGifs.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLHideReportSpam.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLMigrateChat.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLReorderStickerSets.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSaveGif.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSearchGifs.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSendInlineBotResult.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSetBotCallbackAnswer.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSetInlineBotResults.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLToggleChatAdmins.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Updates\\TLGetChannelDifference.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLGetParticipants.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLGetImportantHistory.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLReadHistory.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLReportSpam.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLStartBot.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLUpdateChannelUsername.cs\" />\r\n    <Compile Include=\"TL\\TLActionInfo.cs\" />\r\n    <Compile Include=\"TL\\TLAppChangelogBase.cs\" />\r\n    <Compile Include=\"TL\\TLBotCallbackAnswer.cs\" />\r\n    <Compile Include=\"TL\\TLBotInfo.cs\" />\r\n    <Compile Include=\"TL\\TLBotInlineMessage.cs\" />\r\n    <Compile Include=\"TL\\TLBotInlineResult.cs\" />\r\n    <Compile Include=\"TL\\TLBotResults.cs\" />\r\n    <Compile Include=\"TL\\TLChannelDifference.cs\" />\r\n    <Compile Include=\"TL\\TLChannelMessagesFiler.cs\" />\r\n    <Compile Include=\"TL\\TLChannelParticipant.cs\" />\r\n    <Compile Include=\"TL\\TLChannelParticipantRole.cs\" />\r\n    <Compile Include=\"TL\\TLChannelParticipantsFilter.cs\" />\r\n    <Compile Include=\"TL\\TLChatSettings.cs\" />\r\n    <Compile Include=\"TL\\TLCodeType.cs\" />\r\n    <Compile Include=\"TL\\TLExportedMessageLink.cs\" />\r\n    <Compile Include=\"TL\\TLFoundGif.cs\" />\r\n    <Compile Include=\"TL\\TLFoundGifs.cs\" />\r\n    <Compile Include=\"TL\\TLInlineBotSwitchPM.cs\" />\r\n    <Compile Include=\"TL\\TLInputBotInlineMessage.cs\" />\r\n    <Compile Include=\"TL\\TLInputBotInlineMessageId.cs\" />\r\n    <Compile Include=\"TL\\TLInputBotInlineResult.cs\" />\r\n    <Compile Include=\"TL\\TLInputChatBase.cs\" />\r\n    <Compile Include=\"TL\\TLMessageEditData.cs\" />\r\n    <Compile Include=\"TL\\TLMessageEntity.cs\" />\r\n    <Compile Include=\"TL\\TLMessageFwdHeader.cs\" />\r\n    <Compile Include=\"TL\\TLMessageGroup.cs\" />\r\n    <Compile Include=\"TL\\TLMessageRange.cs\" />\r\n    <Compile Include=\"TL\\TLMessagesChannelParticipants.cs\" />\r\n    <Compile Include=\"TL\\TLPeerSettings.cs\" />\r\n    <Compile Include=\"TL\\TLReplyKeyboardMarkup.cs\" />\r\n    <Compile Include=\"TL\\TLKeyboardButtonRow.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Help\\TLInvokeWithoutUpdates.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLCheckChatInvite.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLExportChatInvite.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetStickerSet.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetWebPagePreview.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLImportChatInvite.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLInstallStickerSet.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLUninstallStickerSet.cs\" />\r\n    <Compile Include=\"TL\\TLAccountAuthorization.cs\" />\r\n    <Compile Include=\"TL\\TLAccountAuthorizations.cs\" />\r\n    <Compile Include=\"TL\\TLBotCommand.cs\" />\r\n    <Compile Include=\"TL\\TLChatInvite.cs\" />\r\n    <Compile Include=\"TL\\TLInputStickerSet.cs\" />\r\n    <Compile Include=\"TL\\TLKeyboardButton.cs\" />\r\n    <Compile Include=\"TL\\TLMessagesStickerSet.cs\" />\r\n    <Compile Include=\"TL\\TLPasscodeParams.cs\" />\r\n    <Compile Include=\"TL\\TLPasswordInputSettings.cs\" />\r\n    <Compile Include=\"TL\\TLPasswordRecovery.cs\" />\r\n    <Compile Include=\"TL\\TLPasswordSettings.cs\" />\r\n    <Compile Include=\"TL\\TLReceivedNotifyMessage.cs\" />\r\n    <Compile Include=\"TL\\TLRecentlyUsedSticker.cs\" />\r\n    <Compile Include=\"TL\\TLInputReportReason.cs\" />\r\n    <Compile Include=\"TL\\TLResolvedPeer.cs\" />\r\n    <Compile Include=\"TL\\TLResultInfo.cs\" />\r\n    <Compile Include=\"TL\\TLSavedGifs.cs\" />\r\n    <Compile Include=\"TL\\TLSentCodeType.cs\" />\r\n    <Compile Include=\"TL\\TLStickerSet.cs\" />\r\n    <Compile Include=\"TL\\TLTermsOfService.cs\" />\r\n    <Compile Include=\"TL\\TLWebPage.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLChangePhone.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLCheckPassword.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLGetPassword.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLGetWallPapers.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLSendChangePhoneCode.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLSetPassword.cs\" />\r\n    <Compile Include=\"TL\\Account\\TLUpdateDeviceLocked.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Contacts\\TLResolveUsername.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetAllStickers.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetStickers.cs\" />\r\n    <Compile Include=\"TL\\TLAccountDaysTTL.cs\" />\r\n    <Compile Include=\"TL\\TLAffectedMessages.cs\" />\r\n    <Compile Include=\"TL\\TLAllStrickers.cs\" />\r\n    <Compile Include=\"TL\\TLContactLink.cs\" />\r\n    <Compile Include=\"TL\\TLDisabledFeature.cs\" />\r\n    <Compile Include=\"TL\\TLDocumentAttribute.cs\" />\r\n    <Compile Include=\"TL\\TLHashtagItem.cs\" />\r\n    <Compile Include=\"TL\\TLInputPrivacyKey.cs\" />\r\n    <Compile Include=\"TL\\TLInputPrivacyRule.cs\" />\r\n    <Compile Include=\"TL\\TLPassword.cs\" />\r\n    <Compile Include=\"TL\\TLPrivacyKey.cs\" />\r\n    <Compile Include=\"TL\\TLPrivacyRule.cs\" />\r\n    <Compile Include=\"TL\\TLPrivacyRules.cs\" />\r\n    <Compile Include=\"TL\\TLSentChangePhoneCode.cs\" />\r\n    <Compile Include=\"TL\\TLStickerPack.cs\" />\r\n    <Compile Include=\"TL\\TLStickers.cs\" />\r\n    <Compile Include=\"WindowsPhone\\BigInteger.cs\" />\r\n    <Compile Include=\"WindowsPhone\\Tuple.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup />\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\nuget.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "Telegram.Api/Transport/DataEventArgs.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.Transport\r\n{\r\n    public class DataEventArgs : EventArgs\r\n    {\r\n        public byte[] Data { get; set; }\r\n        public DateTime? LastReceiveTime { get; set; }\r\n        public int NextPacketLength { get; set; }\r\n\r\n        public DataEventArgs(byte[] data)\r\n        {\r\n            Data = data;\r\n        }\r\n\r\n        public DataEventArgs(byte[] data, int packetLength, DateTime? lastReceiveTime)\r\n        {\r\n            Data = data;\r\n            NextPacketLength = packetLength;\r\n            LastReceiveTime = lastReceiveTime;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/Transport/HttpTransport.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Text;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing Action = System.Action;\r\nusing TransportType = Telegram.Api.Services.TransportType;\r\n\r\nnamespace Telegram.Api.Transport\r\n{\r\n    public class HttpTransport : ITransport\r\n    {\r\n        public ulong Ping { get { return 0; } }\r\n\r\n        public MTProtoTransportType MTProtoType { get; protected set; }\r\n\r\n        public long MinMessageId { get; set; }\r\n        public Dictionary<long, long> MessageIdDict { get; set; }\r\n\r\n        public bool Additional { get; set; }\r\n\r\n        private bool _once;\r\n\r\n        public void UpdateTicksDelta(TLLong msgId)\r\n        {\r\n            lock (SyncRoot)\r\n            {\r\n                if (_once) return;\r\n                _once = true;\r\n\r\n                var clientTime = GenerateMessageId().Value;\r\n                var serverTime = msgId.Value;\r\n                ClientTicksDelta += serverTime - clientTime;\r\n            }\r\n        }\r\n\r\n        public event EventHandler ConnectionLost;\r\n\r\n        public event EventHandler Connecting;\r\n\r\n        public event EventHandler Connected;\r\n\r\n        public DateTime? FirstReceiveTime\r\n        {\r\n            get { throw new NotImplementedException(); }\r\n        }\r\n\r\n        public DateTime? LastReceiveTime\r\n        {\r\n            get { throw new NotImplementedException(); }\r\n        }\r\n\r\n        public int PacketLength\r\n        {\r\n            get { throw new NotImplementedException(); }\r\n        }\r\n\r\n        public int LastPacketLength\r\n        {\r\n            get { throw new NotImplementedException(); }\r\n        }\r\n\r\n        public DateTime? FirstSendTime\r\n        {\r\n            get { throw new NotImplementedException(); }\r\n        }\r\n\r\n        public DateTime? LastSendTime\r\n        {\r\n            get { throw new NotImplementedException(); }\r\n        }\r\n\r\n        public WindowsPhone.Tuple<int, int, int> GetCurrentPacketInfo()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public string GetTransportInfo()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public int Id { get; protected set; }\r\n\r\n        private readonly object _previousMessageRoot = new object();\r\n\r\n        public long PreviousMessageId;\r\n\r\n        public TLLong GenerateMessageId(bool checkPreviousMessageId = false)\r\n        {\r\n            var clientDelta = ClientTicksDelta;\r\n            // serverTime = clientTime + clientDelta\r\n            var now = DateTime.Now;\r\n            //var unixTime = (long)Utils.DateTimeToUnixTimestamp(now) << 32;\r\n\r\n            var unixTime = (long)(Utils.DateTimeToUnixTimestamp(now) * 4294967296) + clientDelta; //2^32\r\n            long correctUnixTime;\r\n\r\n            var addingTicks = 4 - (unixTime % 4);\r\n            if ((unixTime % 4) == 0)\r\n            {\r\n                correctUnixTime = unixTime;\r\n            }\r\n            else\r\n            {\r\n                correctUnixTime = unixTime + addingTicks;\r\n            }\r\n\r\n            // check with previous messageId\r\n\r\n            lock (_previousMessageRoot)\r\n            {\r\n                if (PreviousMessageId != 0 && checkPreviousMessageId)\r\n                {\r\n                    correctUnixTime = Math.Max(PreviousMessageId + 4, correctUnixTime);\r\n                }\r\n                PreviousMessageId = correctUnixTime;\r\n            }\r\n\r\n            // refactor this:\r\n            // addTicks = 4 - (unixTime % 4)\r\n            // fixedUnixTime = unixTime + addTicks\r\n            // max(fixedUnixTime, previousMessageId + 4)\r\n\r\n            //if ((unixTime % 4) == 0)\r\n            //{\r\n            //    correctUnixTime = unixTime;\r\n            //}\r\n            //else\r\n            //{\r\n            //    for (int i = 0; i < 300; i++)\r\n            //    {\r\n            //        var temp = unixTime - i;\r\n            //        if ((temp % 4) == 0)\r\n            //        {\r\n            //            correctUnixTime = unixTime;\r\n            //            break;\r\n            //        }\r\n            //    }\r\n            //}\r\n            //TLUtils.WriteLine(\"TLMessage ID: \" + correctUnixTime);\r\n            //TLUtils.WriteLine(\"MessageId % 4 =\" + (correctUnixTime % 4));\r\n            //TLUtils.WriteLine(\"Corresponding time: \" + Utils.UnixTimestampToDateTime(correctUnixTime >> 32));\r\n\r\n            if (correctUnixTime == 0)\r\n                throw new Exception(\"Bad message id\");\r\n\r\n            return new TLLong(correctUnixTime);\r\n        }\r\n\r\n        #region NonEncryptedHistory\r\n\r\n        private readonly object _nonEncryptedHistoryRoot = new object();\r\n\r\n        private readonly Dictionary<long, HistoryItem> _nonEncryptedHistory = new Dictionary<long, HistoryItem>();\r\n\r\n        public IList<HistoryItem> RemoveTimeOutRequests(double timeout = Constants.TimeoutInterval)\r\n        {\r\n            var now = DateTime.Now;\r\n            var timedOutKeys = new List<long>();\r\n            var timedOutValues = new List<HistoryItem>();\r\n\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n                foreach (var historyKeyValue in _nonEncryptedHistory)\r\n                {\r\n                    var historyValue = historyKeyValue.Value;\r\n                    if (historyValue.SendTime != default(DateTime)\r\n                        && historyValue.SendTime.AddSeconds(timeout) < now)\r\n                    {\r\n                        timedOutKeys.Add(historyKeyValue.Key);\r\n                        timedOutValues.Add(historyKeyValue.Value);\r\n                    }\r\n                }\r\n\r\n                foreach (var key in timedOutKeys)\r\n                {\r\n                    _nonEncryptedHistory.Remove(key);\r\n                }\r\n            }\r\n\r\n            return timedOutValues;\r\n        }\r\n\r\n        public void EnqueueNonEncryptedItem(HistoryItem item)\r\n        {\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n                _nonEncryptedHistory[item.Hash] = item;\r\n            }\r\n        }\r\n\r\n        public HistoryItem DequeueFirstNonEncryptedItem()\r\n        {\r\n            HistoryItem item;\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n                item = _nonEncryptedHistory.Values.FirstOrDefault();\r\n                if (item != null)\r\n                {\r\n                    _nonEncryptedHistory.Remove(item.Hash);\r\n                }\r\n            }\r\n\r\n            return item;\r\n        }\r\n\r\n        public bool RemoveNonEncryptedItem(HistoryItem item)\r\n        {\r\n            bool result;\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n                result = _nonEncryptedHistory.Remove(item.Hash);\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public void ClearNonEncryptedHistory(Exception e = null)\r\n        {\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n                foreach (var historyItem in _nonEncryptedHistory)\r\n                {\r\n                    var error = new StringBuilder();\r\n                    error.AppendLine(\"Clear NonEncrypted History: \");\r\n                    if (e != null)\r\n                    {\r\n                        error.AppendLine(e.ToString());\r\n                    }\r\n                    historyItem.Value.FaultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(error.ToString()) });\r\n                }\r\n\r\n                _nonEncryptedHistory.Clear();\r\n            }\r\n        }\r\n\r\n        public string PrintNonEncryptedHistory()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n                sb.AppendLine(\"NonEncryptedHistory items:\");\r\n                foreach (var historyItem in _nonEncryptedHistory.Values)\r\n                {\r\n                    sb.AppendLine(historyItem.Caption);\r\n                }\r\n            }\r\n\r\n            return sb.ToString();\r\n        }\r\n        #endregion\r\n\r\n        public void StartListening()\r\n        {\r\n\r\n        }\r\n        private readonly object _syncRoot = new object();\r\n\r\n        public object SyncRoot { get { return _syncRoot; } }\r\n\r\n        public int DCId { get; set; }\r\n        public byte[] Secret { get; set; }\r\n        public byte[] AuthKey { get; set; }\r\n        public TLLong SessionId { get; set; }\r\n        public TLLong Salt { get; set; }\r\n        public int SequenceNumber { get; set; }\r\n        public long ClientTicksDelta { get; set; }\r\n\r\n        public bool Initiated { get; set; }\r\n\r\n        public bool Initialized { get; set; }\r\n\r\n        public bool IsInitializing { get; set; }\r\n\r\n        public bool IsAuthorized { get; set; }\r\n\r\n        public bool IsAuthorizing { get; set; }\r\n\r\n        public string Host { get { return _host; } }\r\n        public int Port { get { return 80; } }\r\n        public string StaticHost { get; protected set; }\r\n        public int StaticPort { get; protected set; }\r\n        public string ActualHost { get; protected set; }\r\n        public int ActualPort { get; protected set; }\r\n        public TLProxyConfigBase ProxyConfig { get; protected set; }\r\n\r\n        public TransportType Type { get { return TransportType.Http; } }\r\n        public bool Closed { get; private set; }\r\n\r\n        private string _host;\r\n\r\n        public HttpTransport(string address, MTProtoTransportType mtProtoType, TLProxyConfigBase proxyConfig)\r\n        {\r\n            var host = string.IsNullOrEmpty(address) ? Constants.FirstServerIpAddress : address;\r\n            _host = string.Format(\"http://{0}:80/api\", host);\r\n\r\n            MTProtoType = mtProtoType;\r\n            ProxyConfig = proxyConfig;\r\n\r\n            MessageIdDict = new Dictionary<long, long>();\r\n        }\r\n\r\n        public void ConnectAsync(Action callback, Action<TcpTransportResult> faultCallback)\r\n        {\r\n\r\n        }\r\n\r\n        public event EventHandler<DataEventArgs> PacketReceived;\r\n\r\n        private void RaiseGetBytes(byte[] data)\r\n        {\r\n            var eventHandler = PacketReceived;\r\n            if (eventHandler != null)\r\n            {\r\n                eventHandler.Invoke(this, new DataEventArgs(data));\r\n            }\r\n        }\r\n\r\n        private static HttpWebRequest CreateRequest(int contentLength, string address)\r\n        {\r\n            var request = (HttpWebRequest)WebRequest.Create(address);\r\n            request.Method = \"POST\";\r\n#if SILVERLIGHT\r\n\r\n            request.Headers[\"Connection\"] = \"Keep-alive\";\r\n            request.Headers[\"Content-Length\"] = contentLength.ToString(CultureInfo.InvariantCulture);\r\n#else\r\n            request.KeepAlive = true;\r\n            request.ContentLength = contentLength;\r\n            ServicePointManager.Expect100Continue = false;\r\n#endif\r\n            //IWebProxy proxy = request.Proxy;\r\n            //if (proxy != null)\r\n            //{\r\n            //    string proxyuri = proxy.GetProxy(request.RequestUri).ToString();\r\n            //    request.UseDefaultCredentials = true;\r\n            //    request.Proxy = new WebProxy(proxyuri, false);\r\n            //    request.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;\r\n            //}\r\n\r\n            return request;\r\n        }\r\n\r\n        public void SendPacketAsync(string caption, byte[] message, Action<bool> callback, Action<TcpTransportResult> faultCallback = null)\r\n        {\r\n            //var guid = Guid.NewGuid();\r\n            var stopwatch = Stopwatch.StartNew();\r\n            TLUtils.WriteLine(\"  HTTP: Send \" + caption);\r\n            var request = CreateRequest(message.Length, _host);\r\n\r\n\r\n            request.BeginAsync(message, result =>\r\n            {\r\n                TLUtils.WriteLine();\r\n                TLUtils.WriteLine();\r\n                TLUtils.WriteLine(\"  HTTP: Receive \" + caption + \" (\" + stopwatch.Elapsed + \")\");\r\n                RaiseGetBytes(result);\r\n                ///callback(result);\r\n            },\r\n            () =>\r\n            {\r\n                TLUtils.WriteLine();\r\n                TLUtils.WriteLine();\r\n                TLUtils.WriteLine(\"  HTTP: Receive Falt \" + caption + \" (\" + stopwatch.Elapsed + \")\");\r\n                faultCallback.SafeInvoke(null);\r\n            });\r\n        }\r\n\r\n        public byte[] SendBytes(byte[] message)\r\n        {\r\n            //95.142.192.65:80\r\n            //173.240.5.253:443\r\n#if SILVERLIGHT\r\n            throw new NotImplementedException(\"Sync mode is not supported in Windows Phone\");\r\n#else\r\n\r\n            var request = CreateRequest(message.Length, _host);\r\n            var dataStream = request.GetRequestStream();\r\n            dataStream.Write(message, 0, message.Length);\r\n            dataStream.Close();\r\n            var response = request.GetResponse();\r\n            //TLUtils.WriteLine(((HttpWebResponse)response).StatusDescription);\r\n            dataStream = response.GetResponseStream();\r\n            var buffer = new byte[Int32.Parse(response.Headers[\"Content-Length\"])];\r\n            var bytesRead = 0;\r\n            var totalBytesRead = bytesRead;\r\n            while (totalBytesRead < buffer.Length)\r\n            {\r\n                bytesRead = dataStream.Read(buffer, bytesRead, buffer.Length - bytesRead);\r\n                totalBytesRead += bytesRead;\r\n            }\r\n            dataStream.Close();\r\n            dataStream.Close();\r\n            response.Close();\r\n\r\n            RaiseGetBytes(buffer);\r\n            return buffer;\r\n#endif\r\n        }\r\n\r\n        public void Close()\r\n        {\r\n\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Transport/ITransport.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Transport\r\n{\r\n    public interface ITransport\r\n    {\r\n        ulong Ping { get; }\r\n\r\n        MTProtoTransportType MTProtoType { get; }\r\n\r\n        event EventHandler Connecting;\r\n        event EventHandler Connected;\r\n        event EventHandler ConnectionLost;\r\n        event EventHandler<DataEventArgs> PacketReceived;\r\n\r\n        void SendPacketAsync(string caption, byte[] data, Action<bool> callback, Action<TcpTransportResult> faultCallback = null);\r\n        void Close();\r\n\r\n        // check hang connection\r\n        DateTime? FirstSendTime { get; }\r\n        DateTime? LastReceiveTime { get; }\r\n        int PacketLength { get; }\r\n        int LastPacketLength { get; }\r\n\r\n        // debug\r\n        WindowsPhone.Tuple<int, int, int> GetCurrentPacketInfo();\r\n        string GetTransportInfo();\r\n        string PrintNonEncryptedHistory();\r\n\r\n        TLLong GenerateMessageId(bool checkPreviousMessageId = false);\r\n        void EnqueueNonEncryptedItem(HistoryItem item);\r\n        HistoryItem DequeueFirstNonEncryptedItem();\r\n        bool RemoveNonEncryptedItem(HistoryItem item);\r\n        void ClearNonEncryptedHistory(Exception e = null);\r\n        IList<HistoryItem> RemoveTimeOutRequests(double timeout = Constants.TimeoutInterval);\r\n        void UpdateTicksDelta(TLLong msgId);\r\n\r\n        object SyncRoot { get; }\r\n        int Id { get; }\r\n        int DCId { get; set; }\r\n        byte[] Secret { get; set; }\r\n        byte[] AuthKey { get; set; }\r\n\r\n        TLLong SessionId { get; set; }\r\n        long MinMessageId { get; set; }\r\n        Dictionary<long, long> MessageIdDict { get; set; }\r\n\r\n        TLLong Salt { get; set; }\r\n        int SequenceNumber { get; set; }\r\n        long ClientTicksDelta { get; set; }\r\n\r\n        string Host { get; }\r\n        int Port { get; }\r\n        string StaticHost { get; }\r\n        int StaticPort { get; }\r\n        string ActualHost { get; }\r\n        int ActualPort { get; }\r\n        TLProxyConfigBase ProxyConfig { get; }\r\n\r\n        TransportType Type { get; }\r\n\r\n        //сделан initConnection\r\n        bool Initiated { get; set; }\r\n        //создан ключ\r\n        bool Initialized { get; set; }\r\n        bool IsInitializing { get; set; }\r\n        //перенесена авторизация из активного dc (import/export authorization)\r\n        bool IsAuthorized { get; set; }\r\n        bool IsAuthorizing { get; set; }\r\n        //вызван метод Close\r\n        bool Closed { get; }\r\n    }\r\n\r\n    public enum MTProtoTransportType\r\n    {\r\n        Main,\r\n        File,\r\n        Special,\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Transport/ITransportService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Transport\r\n{\r\n    public interface ITransportService\r\n    {\r\n        void SetProxyConfig(TLProxyConfigBase proxyConfig);\r\n        TLProxyConfigBase GetProxyConfig();\r\n\r\n        ITransport GetTransport(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, out bool isCreated);\r\n        ITransport GetFileTransport(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, out bool isCreated);\r\n        ITransport GetFileTransport2(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, out bool isCreated);\r\n        ITransport GetSpecialTransport(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, out bool isCreated);\r\n        ITransport GetSpecialTransport(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, TLProxyBase proxy, out bool isCreated);\r\n\r\n\r\n        void Close();\r\n        void CloseTransport(ITransport transport);\r\n        void CloseSpecialTransport(ITransport transport);\r\n\r\n        event EventHandler<TransportEventArgs> TransportConnecting;\r\n        event EventHandler<TransportEventArgs> TransportConnected;\r\n\r\n        event EventHandler<TransportEventArgs> ConnectionLost;\r\n        event EventHandler<TransportEventArgs> FileConnectionLost;\r\n        event EventHandler<TransportEventArgs> SpecialConnectionLost;\r\n\r\n        event EventHandler CheckConfig;\r\n    }\r\n\r\n    public delegate ITransport GetTransportFunc(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, out bool isCreated);\r\n\r\n    public delegate ITransport GetTransportWithProxyFunc(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, TLProxyBase proxy, out bool isCreated);\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Transport/SocksProxy.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing Windows.Networking;\r\nusing Windows.Storage.Streams;\r\nusing Telegram.Api.Helpers;\r\nusing Windows.Networking.Sockets;\r\n#if WIN_RT\r\n#else\r\nusing System.Net.Sockets;\r\nusing Microsoft.Phone.Net.NetworkInformation;\r\n#endif\r\n\r\nnamespace Telegram.Api.Transport\r\n{\r\n    /// <summary>\r\n    /// Provides sock5 functionality to clients (Connect only).\r\n    /// </summary>\r\n    public class SocksProxy\r\n    {\r\n        private SocksProxy() { }\r\n\r\n        #region ErrorMessages\r\n        private static string[] errorMsgs =    {\r\n                                        \"Operation completed successfully.\",\r\n                                        \"General SOCKS server failure.\",\r\n                                        \"Connection not allowed by ruleset.\",\r\n                                        \"Network unreachable.\",\r\n                                        \"Host unreachable.\",\r\n                                        \"Connection refused.\",\r\n                                        \"TTL expired.\",\r\n                                        \"Command not supported.\",\r\n                                        \"Address type not supported.\",\r\n                                        \"Unknown error.\"\r\n                                    };\r\n        #endregion\r\n\r\n        private static bool Send(DataWriter dataWriter, byte[] buffer, int offset, int length)\r\n        {\r\n            var sendBuffer = buffer.SubArray(offset, length);\r\n            dataWriter.WriteBytes(sendBuffer);\r\n            var resul = dataWriter.StoreAsync().AsTask().Result;\r\n\r\n            return true;\r\n        }\r\n\r\n        private static int Receive(DataReader dataReader, byte[] buffer, int offset, int length)\r\n        {\r\n            var bytesTransferred = dataReader.LoadAsync((uint)buffer.Length).AsTask().Result;\r\n            var receiveBuffer = new byte[bytesTransferred];\r\n            dataReader.ReadBytes(receiveBuffer);\r\n\r\n            Array.Copy(receiveBuffer, buffer, receiveBuffer.Length);\r\n\r\n            return (int) bytesTransferred;\r\n        }\r\n\r\n\r\n        public static async Task<StreamSocket> ConnectToSocks5Proxy(double timeout, StreamSocket s, DataWriter _dataWriter, DataReader _dataReader, string proxyAddress, ushort proxyPort, string destAddress, ushort destPort, string userName, string password)\r\n        {\r\n            var destIP = new HostName(destAddress);\r\n            var proxyIP = new HostName(proxyAddress);\r\n            var request = new byte[256];\r\n            var response = new byte[256];\r\n            ushort nIndex;\r\n\r\n            // open a TCP connection to SOCKS server...\r\n            //Connect(s, proxyEndPoint);\r\n            await s.ConnectAsync(proxyIP, proxyPort.ToString(CultureInfo.InvariantCulture)).WithTimeout(timeout);\r\n\r\n            nIndex = 0;\r\n            request[nIndex++] = 0x05; // Version 5.\r\n            request[nIndex++] = 0x02; // 2 Authentication methods are in packet...\r\n            request[nIndex++] = 0x00; // NO AUTHENTICATION REQUIRED\r\n            request[nIndex++] = 0x02; // USERNAME/PASSWORD\r\n\r\n            Send(_dataWriter, request, 0, nIndex);\r\n            var nGot = Receive(_dataReader, response, 0, response.Length);\r\n\r\n            // Receive 2 byte response...\r\n            if (nGot != 2)\r\n                throw new ConnectionException(\"Bad response received from proxy server.\");\r\n\r\n            if (response[1] == 0xFF)\r\n            {    // No authentication method was accepted close the socket.\r\n                s.Dispose();\r\n                throw new ConnectionException(\"None of the authentication method was accepted by proxy server.\");\r\n            }\r\n\r\n            byte[] rawBytes;\r\n            //Username/Password Authentication protocol\r\n            if (response[1] == 0x02)\r\n            {\r\n                nIndex = 0;\r\n                request[nIndex++] = 0x01; // Version 5.\r\n\r\n                // add user name\r\n                request[nIndex++] = (byte)userName.Length;\r\n                rawBytes = Encoding.UTF8.GetBytes(userName);\r\n                rawBytes.CopyTo(request, nIndex);\r\n                nIndex += (ushort)rawBytes.Length;\r\n\r\n                // add password\r\n                request[nIndex++] = (byte)password.Length;\r\n                rawBytes = Encoding.UTF8.GetBytes(password);\r\n                rawBytes.CopyTo(request, nIndex);\r\n                nIndex += (ushort)rawBytes.Length;\r\n\r\n                // Send the Username/Password request\r\n                Send(_dataWriter, request, 0, nIndex);\r\n                nGot = Receive(_dataReader, response, 0, response.Length);\r\n\r\n                if (nGot != 2)\r\n                    throw new ConnectionException(\"Bad response received from proxy server.\");\r\n                if (response[1] != 0x00)\r\n                    throw new ConnectionException(\"Bad Usernaem/Password.\");\r\n            }\r\n            //// This version only supports connect command. \r\n            //// UDP and Bind are not supported.\r\n\r\n            // Send connect request now...\r\n            nIndex = 0;\r\n            request[nIndex++] = 0x05;    // version 5.\r\n            request[nIndex++] = 0x01;    // command = connect.\r\n            request[nIndex++] = 0x00;    // Reserve = must be 0x00\r\n\r\n            // Destination adress in an IP.\r\n            switch (destIP.Type)\r\n            {\r\n                case HostNameType.Ipv4:\r\n                    // Address is IPV4 format\r\n                    request[nIndex++] = 0x01;\r\n                    rawBytes = destIP.GetAddressBytes();\r\n                    rawBytes.CopyTo(request, nIndex);\r\n                    nIndex += (ushort)rawBytes.Length;\r\n                    break;\r\n                case HostNameType.Ipv6:\r\n                    // Address is IPV6 format\r\n                    request[nIndex++] = 0x04;\r\n                    rawBytes = destIP.GetAddressBytes();\r\n                    rawBytes.CopyTo(request, nIndex);\r\n                    nIndex += (ushort)rawBytes.Length;\r\n                    break;\r\n                //case HostNameType.DomainName:\r\n                //    // Dest. address is domain name.\r\n                //    request[nIndex++] = 0x03;    // Address is full-qualified domain name.\r\n                //    request[nIndex++] = Convert.ToByte(destAddress.Length); // length of address.\r\n                //    rawBytes = Encoding.UTF8.GetBytes(destAddress);\r\n                //    rawBytes.CopyTo(request, nIndex);\r\n                //    nIndex += (ushort)rawBytes.Length;\r\n                //    break;\r\n            }\r\n\r\n            // using big-edian byte order\r\n            byte[] portBytes = BitConverter.GetBytes(destPort);\r\n            for (int i = portBytes.Length - 1; i >= 0; i--)\r\n                request[nIndex++] = portBytes[i];\r\n\r\n            // send connect request.\r\n            Send(_dataWriter, request, 0, nIndex);\r\n            nGot = Receive(_dataReader, response, 0, response.Length);\r\n\r\n            if (response[1] != 0x00)\r\n                throw new ConnectionException(errorMsgs[response[1]]);\r\n            \r\n            // Success Connected...\r\n            return s;\r\n        }\r\n#if !WIN_RT\r\n        private static bool Send(Socket s, byte[] buffer, int offset, int length)\r\n        {\r\n            var send1Event = new AutoResetEvent(false);\r\n            var sendArgs = new SocketAsyncEventArgs();\r\n            sendArgs.SetBuffer(buffer, offset, length);\r\n            sendArgs.Completed += (sender, eventArgs) =>\r\n            {\r\n                send1Event.Set();\r\n            };\r\n\r\n            var result = s.SendAsync(sendArgs);\r\n            send1Event.WaitOne();\r\n\r\n            return result;\r\n        }\r\n\r\n        private static int Receive(Socket s, byte[] buffer, int offset, int length)\r\n        {\r\n            var receive1Event = new AutoResetEvent(false);\r\n            var receive1Args = new SocketAsyncEventArgs();\r\n            receive1Args.SetBuffer(buffer, offset, length);\r\n            receive1Args.Completed += (sender, eventArgs) =>\r\n            {\r\n                receive1Event.Set();\r\n            };\r\n            var result = s.ReceiveAsync(receive1Args);\r\n            receive1Event.WaitOne();\r\n\r\n            return receive1Args.BytesTransferred;\r\n        }\r\n\r\n        private static bool Connect(Socket s, IPEndPoint remoteEndpoit)\r\n        {\r\n            var connectEvent = new AutoResetEvent(false);\r\n            var connectArgs = new SocketAsyncEventArgs();\r\n            connectArgs.RemoteEndPoint = remoteEndpoit;\r\n            connectArgs.Completed += (sender, eventArgs) =>\r\n            {\r\n                connectEvent.Set();\r\n            };\r\n            s.ConnectAsync(connectArgs);\r\n            connectEvent.WaitOne();\r\n\r\n            return connectArgs.SocketError == System.Net.Sockets.SocketError.Success;\r\n        }\r\n\r\n        public static Socket ConnectToSocks5Proxy(Socket s, string proxyAdress, ushort proxyPort, string destAddress, ushort destPort, string userName, string password)\r\n        {\r\n            IPAddress destIP = null;\r\n            IPAddress proxyIP = null;\r\n            var request = new byte[256];\r\n            var response = new byte[256];\r\n            ushort nIndex;\r\n\r\n            try\r\n            {\r\n                proxyIP = IPAddress.Parse(proxyAdress);\r\n            }\r\n            catch (FormatException)\r\n            {    // get the IP address\r\n                NameResolutionResult resolutionResult = null;\r\n                var dnsResolveEvent = new AutoResetEvent(false);\r\n                var endpoint = new DnsEndPoint(proxyAdress, 0);\r\n                DeviceNetworkInformation.ResolveHostNameAsync(endpoint, result =>\r\n                {\r\n                    resolutionResult = result;\r\n                    dnsResolveEvent.Set();\r\n                }, null);\r\n                dnsResolveEvent.WaitOne();\r\n                proxyIP = resolutionResult.IPEndPoints[0].Address;\r\n            }\r\n\r\n            // Parse destAddress (assume it in string dotted format \"212.116.65.112\" )\r\n            try\r\n            {\r\n                destIP = IPAddress.Parse(destAddress);\r\n            }\r\n            catch (FormatException)\r\n            {\r\n                // wrong assumption its in domain name format \"www.microsoft.com\"\r\n            }\r\n\r\n            var proxyEndPoint = new IPEndPoint(proxyIP, proxyPort);\r\n\r\n            // open a TCP connection to SOCKS server...\r\n            var connected = Connect(s, proxyEndPoint);\r\n            if (!connected)\r\n            {\r\n                throw new ConnectionException(\"Can't connect to proxy server.\");\r\n            }\r\n\r\n            nIndex = 0;\r\n            request[nIndex++] = 0x05; // Version 5.\r\n            request[nIndex++] = 0x02; // 2 Authentication methods are in packet...\r\n            request[nIndex++] = 0x00; // NO AUTHENTICATION REQUIRED\r\n            request[nIndex++] = 0x02; // USERNAME/PASSWORD\r\n\r\n            Send(s, request, 0, nIndex);\r\n            var nGot = Receive(s, response, 0, response.Length);\r\n\r\n            // Receive 2 byte response...\r\n            if (nGot != 2)\r\n                throw new ConnectionException(\"Bad response received from proxy server.\");\r\n\r\n            if (response[1] == 0xFF)\r\n            {    // No authentication method was accepted close the socket.\r\n                s.Close();\r\n                throw new ConnectionException(\"None of the authentication method was accepted by proxy server.\");\r\n            }\r\n\r\n            byte[] rawBytes;\r\n            //Username/Password Authentication protocol\r\n            if (response[1] == 0x02)\r\n            {\r\n                nIndex = 0;\r\n                request[nIndex++] = 0x01; // Version 5.\r\n\r\n                // add user name\r\n                request[nIndex++] = (byte)userName.Length;\r\n                rawBytes = Encoding.UTF8.GetBytes(userName);\r\n                rawBytes.CopyTo(request, nIndex);\r\n                nIndex += (ushort)rawBytes.Length;\r\n\r\n                // add password\r\n                request[nIndex++] = (byte)password.Length;\r\n                rawBytes = Encoding.UTF8.GetBytes(password);\r\n                rawBytes.CopyTo(request, nIndex);\r\n                nIndex += (ushort)rawBytes.Length;\r\n\r\n                // Send the Username/Password request\r\n                Send(s, request, 0, nIndex);\r\n                nGot = Receive(s, response, 0, response.Length);\r\n\r\n                if (nGot != 2)\r\n                    throw new ConnectionException(\"Bad response received from proxy server.\");\r\n                if (response[1] != 0x00)\r\n                    throw new ConnectionException(\"Bad Usernaem/Password.\");\r\n            }\r\n            //// This version only supports connect command. \r\n            //// UDP and Bind are not supported.\r\n\r\n            // Send connect request now...\r\n            nIndex = 0;\r\n            request[nIndex++] = 0x05;    // version 5.\r\n            request[nIndex++] = 0x01;    // command = connect.\r\n            request[nIndex++] = 0x00;    // Reserve = must be 0x00\r\n\r\n            if (destIP != null)\r\n            {\r\n                // Destination adress in an IP.\r\n                switch (destIP.AddressFamily)\r\n                {\r\n                    case AddressFamily.InterNetwork:\r\n                        // Address is IPV4 format\r\n                        request[nIndex++] = 0x01;\r\n                        rawBytes = destIP.GetAddressBytes();\r\n                        rawBytes.CopyTo(request, nIndex);\r\n                        nIndex += (ushort)rawBytes.Length;\r\n                        break;\r\n                    case AddressFamily.InterNetworkV6:\r\n                        // Address is IPV6 format\r\n                        request[nIndex++] = 0x04;\r\n                        rawBytes = destIP.GetAddressBytes();\r\n                        rawBytes.CopyTo(request, nIndex);\r\n                        nIndex += (ushort)rawBytes.Length;\r\n                        break;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                // Dest. address is domain name.\r\n                request[nIndex++] = 0x03;    // Address is full-qualified domain name.\r\n                request[nIndex++] = Convert.ToByte(destAddress.Length); // length of address.\r\n                rawBytes = Encoding.UTF8.GetBytes(destAddress);\r\n                rawBytes.CopyTo(request, nIndex);\r\n                nIndex += (ushort)rawBytes.Length;\r\n            }\r\n\r\n            // using big-edian byte order\r\n            byte[] portBytes = BitConverter.GetBytes(destPort);\r\n            for (int i = portBytes.Length - 1; i >= 0; i--)\r\n                request[nIndex++] = portBytes[i];\r\n\r\n            // send connect request.\r\n            Send(s, request, 0, nIndex);\r\n            nGot = Receive(s, response, 0, response.Length);\r\n\r\n            if (response[1] != 0x00)\r\n                throw new ConnectionException(errorMsgs[response[1]]);\r\n            // Success Connected...\r\n            return s;\r\n        }\r\n#endif\r\n    }\r\n\r\n    public class ConnectionException : Exception\r\n    {\r\n        public ConnectionException(string message)\r\n            : base(message)\r\n        {\r\n        }\r\n    }\r\n\r\n    public static class NetworkConverter\r\n    {\r\n        public static bool IsLoopBackForIPv4(string ipv4)\r\n        {\r\n            var data = GetBytesForIPv4(ipv4);\r\n            return data[3] == 1 && data[0] == 127 && data[1] == 0 && data[2] == 0;\r\n        }\r\n\r\n        public static bool IsLoopBackForIPv6(string ipv6)\r\n        {\r\n            var data = GetWordsForIPv6(ipv6);\r\n            return IsLoopBackForIPv6(data);\r\n        }\r\n\r\n        public static bool IsLoopBack(this HostName hostName)\r\n        {\r\n            switch (hostName.Type)\r\n            {\r\n                case HostNameType.Ipv4:\r\n                    return IsLoopBackForIPv4(hostName.CanonicalName);\r\n                case HostNameType.Ipv6:\r\n                    return IsLoopBackForIPv6(hostName.CanonicalName);\r\n            }\r\n\r\n            throw new NotSupportedException();\r\n        }\r\n\r\n        public static bool IsLoopBackForIPv6(ushort[] data)\r\n        {\r\n            for (var i = 0; i != 5; ++i)\r\n                if (data[i] != 0)\r\n                    return false;\r\n            if (data[5] == 0)\r\n                return data[6] == 0 && data[7] == 1;\r\n            if (data[5] != 0xFFFF)\r\n                return false;\r\n            return data[6] == 0x7F00 && data[7] == 1;\r\n        }\r\n\r\n        public static byte[] GetPortBytes(int port)\r\n        {\r\n            var portBytes = BitConverter.GetBytes((ushort)port);\r\n            if (BitConverter.IsLittleEndian)\r\n                Array.Reverse(portBytes);\r\n            return portBytes;\r\n        }\r\n\r\n        public static int ToPort(byte[] data)\r\n        {\r\n            if (BitConverter.IsLittleEndian)\r\n                Array.Reverse(data);\r\n            return BitConverter.ToUInt16(data, 0);\r\n        }\r\n\r\n        public static byte[] GetAddressBytes(this HostName hostName)\r\n        {\r\n            switch (hostName.Type)\r\n            {\r\n                case HostNameType.Ipv4:\r\n                    return GetBytesForIPv4(hostName.CanonicalName);\r\n                case HostNameType.Ipv6:\r\n                    return GetBytesForIPv6(hostName.CanonicalName);\r\n            }\r\n            throw new NotSupportedException();\r\n        }\r\n\r\n        public static byte[] GetBytesForIPv6(string ipv6)\r\n        {\r\n            var result = new byte[16];\r\n            var idxDst = 0;\r\n            var words = GetWordsForIPv6(ipv6);\r\n            for (var idxSrc = 0; idxSrc != words.Length; ++idxSrc)\r\n            {\r\n                var v = words[idxSrc];\r\n                result[idxDst++] = (byte)((v >> 8) & 0xFF);\r\n                result[idxDst++] = (byte)(v & 0xFF);\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public static byte[] GetBytesForIPv4(string ipv4)\r\n        {\r\n            var result = ipv4.Split('.').Select(byte.Parse)\r\n                .ToArray();\r\n            return result;\r\n        }\r\n\r\n        public static ushort[] GetWordsForIPv6(string ipv6)\r\n        {\r\n            var data = new ushort[8];\r\n            ipv6 = ipv6.Replace(\" \", string.Empty);\r\n            if (ipv6.StartsWith(\"::ffff:\"))\r\n            {\r\n                data[5] = 0xFFFF;\r\n                var ipv4 = ipv6.Substring(7);\r\n                if (ipv4.IndexOf(':') != -1)\r\n                {\r\n                    var parts = ipv4.Split(':')\r\n                        .Select(x => ushort.Parse(x, System.Globalization.NumberStyles.HexNumber))\r\n                        .ToArray();\r\n                    data[6] = parts[0];\r\n                    data[7] = parts[1];\r\n                }\r\n                else\r\n                {\r\n                    var d = GetBytesForIPv4(ipv4);\r\n                    data[6] = (ushort)((d[0] << 8) + d[1]);\r\n                    data[7] = (ushort)((d[2] << 8) + d[3]);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                var parts = ipv6.Split(':')\r\n                    .Select(x => string.IsNullOrWhiteSpace(x) ? -1 : int.Parse(x, System.Globalization.NumberStyles.HexNumber))\r\n                    .ToArray();\r\n                var prefixSize = Array.IndexOf(parts, -1);\r\n                if (prefixSize == -1)\r\n                {\r\n                    if (parts.Length != 8)\r\n                        throw new ArgumentOutOfRangeException();\r\n                    data = parts.Select(x => (ushort)x).ToArray();\r\n                }\r\n                else\r\n                {\r\n                    var nonEmptyIndex = prefixSize;\r\n                    while (nonEmptyIndex < (parts.Length - 1) && parts[nonEmptyIndex + 1] == -1)\r\n                        nonEmptyIndex += 1;\r\n                    var suffixSize = parts.Length - nonEmptyIndex - 1;\r\n                    for (var i = 0; i != prefixSize; ++i)\r\n                        data[i] = (ushort)parts[i];\r\n                    var suffixIndexSrc = parts.Length - suffixSize;\r\n                    var suffixIndexDst = data.Length - suffixSize;\r\n                    for (var i = 0; i != suffixSize; ++i)\r\n                        data[suffixIndexDst++] = (ushort)parts[suffixIndexSrc++];\r\n                }\r\n            }\r\n\r\n            return data;\r\n        }\r\n\r\n        public static string ToIPv4(byte[] data)\r\n        {\r\n            return string.Join(\".\", data.Reverse().Select(x => x.ToString()));\r\n        }\r\n\r\n        public static string ToIPv6(byte[] data)\r\n        {\r\n            var words = new ushort[8];\r\n            var idxDst = 0;\r\n            for (var idxSrc = 0; idxSrc != data.Length; idxSrc += 2)\r\n                words[idxDst++] = (ushort)((data[idxSrc] << 8) + data[idxSrc + 1]);\r\n            return ToIPv6(words);\r\n        }\r\n\r\n        public static string ToIPv6(ushort[] data)\r\n        {\r\n            var zeroRanges = new List<Tuple<int, int>>();\r\n            var startIndex = -1;\r\n            var indexCount = 0;\r\n            for (var i = 0; i != 8; ++i)\r\n            {\r\n                var v = data[i];\r\n                if (v == 0)\r\n                {\r\n                    if (startIndex == -1)\r\n                    {\r\n                        startIndex = i;\r\n                        indexCount = 1;\r\n                    }\r\n                    else\r\n                        indexCount += 1;\r\n                }\r\n                else if (v != 0 && startIndex != -1)\r\n                {\r\n                    zeroRanges.Add(Tuple.Create(startIndex, indexCount));\r\n                    startIndex = -1;\r\n                }\r\n            }\r\n\r\n            if (startIndex != -1)\r\n                zeroRanges.Add(Tuple.Create(startIndex, indexCount));\r\n\r\n            if (zeroRanges.Count != 0)\r\n            {\r\n                var largestRange = zeroRanges.OrderByDescending(x => x.Item2).First();\r\n                startIndex = largestRange.Item1;\r\n                indexCount = largestRange.Item2;\r\n            }\r\n\r\n            ushort[] wordsPrefix, wordsSuffix;\r\n            if (startIndex != -1)\r\n            {\r\n                wordsPrefix = data.Take(startIndex).ToArray();\r\n                wordsSuffix = data.Skip(startIndex + indexCount).ToArray();\r\n            }\r\n            else\r\n            {\r\n                wordsPrefix = data;\r\n                wordsSuffix = null;\r\n            }\r\n\r\n            var result = new StringBuilder();\r\n            if (wordsPrefix.Length != 0)\r\n                result.Append(string.Join(\":\", wordsPrefix.Select(x => x.ToString(\"x\"))));\r\n            if (wordsSuffix != null)\r\n                result\r\n                    .Append(\"::\")\r\n                    .Append(string.Join(\":\", wordsSuffix.Select(x => x.ToString(\"x\"))));\r\n            return result.ToString();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Transport/TCPTransport.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define TCP_OBFUSCATED_2\r\nusing System;\r\nusing System.Globalization;\r\nusing System.Net;\r\nusing System.Net.Sockets;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing Action = System.Action;\r\nusing SocketError = System.Net.Sockets.SocketError;\r\n\r\nnamespace Telegram.Api.Transport\r\n{\r\n    public class TcpTransport : TcpTransportBase\r\n    {\r\n        private readonly object _isConnectedSocketRoot = new object();\r\n\r\n        private readonly object _encryptedStreamSyncRoot = new object();\r\n\r\n        private readonly Socket _socket;\r\n\r\n        private const int BufferSize = 64;\r\n\r\n        private readonly byte[] _buffer;\r\n\r\n        private readonly SocketAsyncEventArgs _listener = new SocketAsyncEventArgs();\r\n\r\n        private readonly IPAddress _address;\r\n\r\n        public TcpTransport(string host, int port, string staticHost, int staticPort, MTProtoTransportType mtProtoType, TLProxyConfigBase proxyConfig)\r\n            : base(host, port, staticHost, staticPort, mtProtoType, proxyConfig)\r\n        {\r\n            // ipv6 support\r\n            _address = proxyConfig != null && !proxyConfig.IsEmpty\r\n                ? IPAddress.Parse(staticHost)\r\n                : IPAddress.Parse(host);\r\n\r\n            _socket = new Socket(_address.AddressFamily, SocketType.Stream, ProtocolType.Tcp);\r\n\r\n            _buffer = new byte[BufferSize];\r\n            _listener.SetBuffer(_buffer, 0, _buffer.Length);\r\n            _listener.Completed += OnReceived;\r\n        }\r\n\r\n        public override string GetTransportInfo()\r\n        {\r\n            var info = new StringBuilder();\r\n            info.AppendLine(\"TCP transport\");\r\n            info.AppendLine(string.Format(\"Socket {0}:{1}, Connected={2}, Ttl={3}, HashCode={4}\", Host, Port, _socket.Connected, _socket.Ttl, _socket.GetHashCode()));\r\n            info.AppendLine(string.Format(\"Listener LastOperation={0}, SocketError={1}, RemoteEndPoint={2}, SocketHash={3}\", _listener.LastOperation, _listener.SocketError, _listener.RemoteEndPoint, _listener.ConnectSocket != null ? _listener.ConnectSocket.GetHashCode().ToString() : \"null\"));\r\n            info.AppendLine(string.Format(\"FirstReceiveTime={0}\", FirstReceiveTime.GetValueOrDefault().ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture)));\r\n            info.AppendLine(string.Format(\"FirstSendTime={0}\", FirstSendTime.GetValueOrDefault().ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture)));\r\n            info.AppendLine(string.Format(\"LastSendTime={0}\", LastSendTime.GetValueOrDefault().ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture)));\r\n\r\n            return info.ToString();\r\n        }\r\n\r\n        public override void SendPacketAsync(string caption, byte[] data, Action<bool> callback, Action<TcpTransportResult> faultCallback = null)\r\n        {\r\n            var now = DateTime.Now;\r\n            if (!FirstSendTime.HasValue)\r\n            {\r\n                FirstSendTime = now;\r\n            }\r\n            LastSendTime = now;\r\n\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                TLUtils.WriteLine(\"  TCP: Send \" + caption);\r\n\r\n                lock (_isConnectedSocketRoot)\r\n                {\r\n                    var manualResetEvent = new ManualResetEvent(false);\r\n                    if (!_socket.Connected)\r\n                    {\r\n                        if (caption.StartsWith(\"msgs_ack\"))\r\n                        {\r\n                            TLUtils.WriteLine(\"!!!!!!MSGS_ACK FAULT!!!!!!!\", LogSeverity.Error);\r\n                            faultCallback.SafeInvoke(new TcpTransportResult(SocketAsyncOperation.Send, new Exception(\"MSGS_ACK_FAULT\")));\r\n                            return;\r\n                        }\r\n\r\n                        ConnectAsync(() =>\r\n                        {\r\n                            manualResetEvent.Set();\r\n\r\n                            try\r\n                            {\r\n                                lock (_encryptedStreamSyncRoot)\r\n                                {\r\n                                    var args = CreateArgs(data, callback);\r\n                                    _socket.SendAsync(args);\r\n                                }\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                faultCallback.SafeInvoke(new TcpTransportResult(SocketAsyncOperation.Send, ex));\r\n\r\n                                WRITE_LOG(\"Socket.ConnectAsync SendAsync[1]\", ex);\r\n                            }\r\n                        },\r\n                            error =>\r\n                            {\r\n                                manualResetEvent.Set();\r\n                                faultCallback.SafeInvoke(error);\r\n                            });\r\n\r\n                        var connected = manualResetEvent.WaitOne(25000);\r\n                        if (!connected)\r\n                        {\r\n                            faultCallback.SafeInvoke(new TcpTransportResult(SocketAsyncOperation.Connect, new Exception(\"Connect timeout exception 25s\")));\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        try\r\n                        {\r\n                            lock (_encryptedStreamSyncRoot)\r\n                            {\r\n                                var args = CreateArgs(data, callback);\r\n                                _socket.SendAsync(args);\r\n                            }\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            faultCallback.SafeInvoke(new TcpTransportResult(SocketAsyncOperation.Send, ex));\r\n\r\n                            WRITE_LOG(\"Socket.SendAsync[1]\", ex);\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private SocketAsyncEventArgs CreateArgs(byte[] data, Action<bool> callback = null)\r\n        {\r\n            var packet = CreatePacket(data);\r\n\r\n#if TCP_OBFUSCATED_2\r\n            packet = Encrypt(packet);\r\n#endif\r\n\r\n            var args = new SocketAsyncEventArgs();\r\n            args.SetBuffer(packet, 0, packet.Length);\r\n            args.Completed += (sender, eventArgs) =>\r\n            {\r\n                callback.SafeInvoke(eventArgs.SocketError == SocketError.Success);\r\n            };\r\n            return args;\r\n        }\r\n\r\n        private void ConnectAsync(Action callback, Action<TcpTransportResult> faultCallback)\r\n        {\r\n            WRITE_LOG(string.Format(\"Socket.ConnectAsync[#3] {0} ({1}:{2})\", Id, Host, Port));\r\n\r\n            TLSocks5Proxy socks5Proxy = ProxyConfig != null && ProxyConfig.IsEnabled.Value && !ProxyConfig.IsEmpty\r\n                ? ProxyConfig.GetProxy() as TLSocks5Proxy\r\n                : null;\r\n\r\n            if (socks5Proxy != null)\r\n            {\r\n                try\r\n                {\r\n                    ActualHost = StaticHost;\r\n                    ActualPort = StaticPort;\r\n\r\n                    RaiseConnectingAsync();\r\n\r\n                    SocksProxy.ConnectToSocks5Proxy(_socket, socks5Proxy.Server.ToString(), (ushort)socks5Proxy.Port.Value, StaticHost, (ushort)StaticPort, socks5Proxy.Username.ToString(), socks5Proxy.Password.ToString());\r\n\r\n                    OnConnected(new SocketAsyncEventArgs { SocketError = SocketError.Success }, callback, faultCallback);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    faultCallback.SafeInvoke(new TcpTransportResult(SocketAsyncOperation.Connect, ex));\r\n\r\n                    WRITE_LOG(\"Socket.ConnectAsync[#3]\", ex);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(\"  Connecting mtproto=[server={0} port={1}]\", Host, Port);\r\n\r\n                var args = new SocketAsyncEventArgs\r\n                {\r\n                    RemoteEndPoint = new IPEndPoint(_address, Port)\r\n                };\r\n\r\n                args.Completed += (o, e) => OnConnected(e, callback, faultCallback);\r\n\r\n                try\r\n                {\r\n                    ActualHost = Host;\r\n                    ActualPort = Port;\r\n\r\n                    RaiseConnectingAsync();\r\n                    _socket.ConnectAsync(args);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    faultCallback.SafeInvoke(new TcpTransportResult(SocketAsyncOperation.Connect, ex));\r\n\r\n                    WRITE_LOG(\"Socket.ConnectAsync[#3]\", ex);\r\n                }\r\n            }\r\n        }\r\n\r\n#if TCP_OBFUSCATED_2\r\n        protected override byte[] GetInitBuffer()\r\n        {\r\n            var buffer = new byte[64];\r\n            var random = new Random();\r\n            while (true)\r\n            {\r\n                random.NextBytes(buffer);\r\n\r\n                var val = (buffer[3] << 24) | (buffer[2] << 16) | (buffer[1] << 8) | (buffer[0]);\r\n                var val2 = (buffer[7] << 24) | (buffer[6] << 16) | (buffer[5] << 8) | (buffer[4]);\r\n                if (buffer[0] != 0xef\r\n                    && val != 0x44414548\r\n                    && val != 0x54534f50\r\n                    && val != 0x20544547\r\n                    && val != 0x4954504f\r\n                    && val != 0xeeeeeeee\r\n                    && val2 != 0x00000000)\r\n                {\r\n                    buffer[56] = buffer[57] = buffer[58] = buffer[59] = 0xef;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            var keyIvEncrypt = buffer.SubArray(8, 48);\r\n            EncryptKey = keyIvEncrypt.SubArray(0, 32);\r\n            EncryptIV = keyIvEncrypt.SubArray(32, 16);\r\n\r\n            Array.Reverse(keyIvEncrypt);\r\n            DecryptKey = keyIvEncrypt.SubArray(0, 32);\r\n            DecryptIV = keyIvEncrypt.SubArray(32, 16);\r\n\r\n            var encryptedBuffer = Encrypt(buffer);\r\n            for (var i = 56; i < encryptedBuffer.Length; i++)\r\n            {\r\n                buffer[i] = encryptedBuffer[i];\r\n            }\r\n\r\n            return buffer;\r\n        }\r\n#endif\r\n\r\n        private void OnConnected(SocketAsyncEventArgs args, Action callback = null, Action<TcpTransportResult> faultCallback = null)\r\n        {\r\n            WRITE_LOG(string.Format(\"Socket.OnConnected[#4] {0} socketError={1}\", Id, args.SocketError));\r\n\r\n            try\r\n            {\r\n                if (args.SocketError != SocketError.Success)\r\n                {\r\n                    faultCallback.SafeInvoke(new TcpTransportResult(SocketAsyncOperation.Connect, args.SocketError));\r\n                }\r\n                else\r\n                {\r\n                    RaiseConnectedAsync();\r\n\r\n                    ReceiveAsync();\r\n\r\n                    try\r\n                    {\r\n                        lock (_encryptedStreamSyncRoot)\r\n                        {\r\n                            var buffer = GetInitBuffer();\r\n\r\n                            var sendArgs = new SocketAsyncEventArgs();\r\n                            sendArgs.SetBuffer(buffer, 0, buffer.Length);\r\n                            sendArgs.Completed += (o, e) => callback.SafeInvoke();\r\n\r\n                            _socket.SendAsync(sendArgs);\r\n                        }\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        faultCallback.SafeInvoke(new TcpTransportResult(SocketAsyncOperation.Send, ex));\r\n\r\n                        WRITE_LOG(\"Socket.OnConnected[#4]\", ex);\r\n                    }\r\n                }\r\n\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                faultCallback.SafeInvoke(new TcpTransportResult(SocketAsyncOperation.Connect, ex));\r\n\r\n                WRITE_LOG(\"Socket.OnConnected[#4] SendAsync\", ex);\r\n            }\r\n        }\r\n\r\n        private void ReceiveAsync()\r\n        {\r\n            if (Closed)\r\n            {\r\n                //Execute.ShowDebugMessage(\"TCPTransport ReceiveAsync closed=true\");\r\n                return;\r\n            }\r\n\r\n            try\r\n            {\r\n                if (_socket != null)\r\n                {\r\n                    if (_socket.Connected)\r\n                    {\r\n                        try\r\n                        {\r\n                            _socket.ReceiveAsync(_listener);\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            WRITE_LOG(\"Socket.ReceiveAsync[#5] ReceiveAsync\", ex);\r\n\r\n                            if (ex is ObjectDisposedException)\r\n                            {\r\n                                return;\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        //Execute.ShowDebugMessage(\"TCPTransport ReceiveAsync socket.Connected=false\");\r\n                        //throw new Exception(\"Socket is not connected\");\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    throw new NullReferenceException(\"Socket is null\");\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                WRITE_LOG(\"Socket.ReceiveAsync[#5]\", ex);\r\n            }\r\n        }\r\n\r\n        private void OnReceived(object sender, SocketAsyncEventArgs e)\r\n        {\r\n            var socket = sender as Socket;\r\n            if (socket == null || socket != _socket)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (e.SocketError != SocketError.Success)\r\n            {\r\n                //Log.Write(string.Format(\"  TCPTransport.OnReceived transport={0} error={1}\", Id, e.SocketError));\r\n                Execute.ShowDebugMessage(string.Format(\"!!!TCPTransport OnReceived connection lost; BytesTransferred={0} SocketError={1}\", e.BytesTransferred, e.SocketError));\r\n                ReceiveAsync();\r\n                return;\r\n            }\r\n\r\n            if (e.BytesTransferred > 0)\r\n            {\r\n                //Log.Write(string.Format(\"  TCPTransport.OnReceived transport={0} bytes_transferred={1}\", Id, e.BytesTransferred));\r\n                var now = DateTime.Now;\r\n\r\n                if (!FirstReceiveTime.HasValue)\r\n                {\r\n                    FirstReceiveTime = now;\r\n                }\r\n\r\n                LastReceiveTime = now;\r\n\r\n                // AES-CTR decrypt\r\n#if TCP_OBFUSCATED_2\r\n                var buffer = e.Buffer.SubArray(e.Offset, e.BytesTransferred);\r\n                buffer = Decrypt(buffer);\r\n                OnBufferReceived(buffer, 0, buffer.Length);\r\n#else\r\n                OnBufferReceived(e.Buffer, e.Offset, e.BytesTransferred);\r\n#endif\r\n            }\r\n            else\r\n            {\r\n                Closed = true;\r\n                RaiseConnectionLost();\r\n                //Log.Write(\"  TCPTransport.Recconect reason=BytesTransferred=0 transport=\" + Id);\r\n                //Execute.ShowDebugMessage(string.Format(\"TCPTransport id={0} dc_id={1} hash={2} OnReceived connection lost bytesTransferred=0; close transport; error={3}\", Id, DCId, GetHashCode(), e.SocketError));\r\n            }\r\n\r\n            ReceiveAsync();\r\n        }\r\n\r\n        public override void Close()\r\n        {\r\n            WRITE_LOG(string.Format(\"Close socket {2} {0}:{1}\", Host, Port, Id));\r\n\r\n            if (_socket != null)\r\n            {\r\n                _socket.Close();\r\n                Closed = true;\r\n            }\r\n\r\n            StopCheckConfigTimer();\r\n        }\r\n\r\n        public DateTime? LastSendTime { get; protected set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Transport/TCPTransportBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define TCP_OBFUSCATED_2\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TransportType = Telegram.Api.Services.TransportType;\r\n\r\nnamespace Telegram.Api.Transport\r\n{\r\n    public abstract class TcpTransportBase : ITransport\r\n    {\r\n        public virtual ulong Ping\r\n        {\r\n            get { return 0; }\r\n        }\r\n\r\n        public MTProtoTransportType MTProtoType { get; protected set; }\r\n\r\n        public long MinMessageId { get; set; }\r\n        public Dictionary<long, long> MessageIdDict { get; set; }\r\n\r\n        public string Host { get; protected set; }\r\n        public int Port { get; protected set; }\r\n        public string StaticHost { get; protected set; }\r\n        public int StaticPort { get; protected set; }\r\n        public string ActualHost { get; protected set; }\r\n        public int ActualPort { get; protected set; }\r\n        public TLProxyConfigBase ProxyConfig { get; protected set; }\r\n        public virtual TransportType Type { get { return TransportType.Tcp; } }\r\n\r\n        private readonly Timer _timer;\r\n\r\n        protected TcpTransportBase(string host, int port, string staticHost, int staticPort, MTProtoTransportType mtProtoType, TLProxyConfigBase proxyConfig)\r\n        {\r\n            MessageIdDict = new Dictionary<long, long>();\r\n\r\n            Host = host;\r\n            Port = port;\r\n            StaticHost = staticHost;\r\n            StaticPort = staticPort;\r\n            MTProtoType = mtProtoType;\r\n            ProxyConfig = proxyConfig;\r\n\r\n            var random = new Random();\r\n            Id = random.Next(0, 255);\r\n\r\n            _timer = new Timer(OnTimerTick, _timer, Timeout.Infinite, Timeout.Infinite);\r\n        }\r\n\r\n        #region Check Config\r\n\r\n        public event EventHandler CheckConfig;\r\n\r\n        protected virtual void RaiseCheckConfig()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var handler = CheckConfig;\r\n                if (handler != null) handler(this, EventArgs.Empty);\r\n            });\r\n        }\r\n\r\n        private void OnTimerTick(object state)\r\n        {\r\n            _timer.Change(Timeout.Infinite, Timeout.Infinite);\r\n\r\n            RaiseCheckConfig();\r\n        }\r\n\r\n        protected void StartCheckConfigTimer()\r\n        {\r\n            if (MTProtoType != MTProtoTransportType.Main) return;\r\n\r\n            _timer.Change(TimeSpan.FromSeconds(Constants.CheckConfigTimeout), Timeout.InfiniteTimeSpan);\r\n        }\r\n\r\n        protected void StopCheckConfigTimer()\r\n        {\r\n            _timer.Change(Timeout.Infinite, Timeout.Infinite);\r\n        }\r\n        #endregion\r\n\r\n        public bool Initiated { get; set; }\r\n        public bool Initialized { get; set; }\r\n        public bool IsInitializing { get; set; }\r\n        public bool IsAuthorized { get; set; }\r\n        public bool IsAuthorizing { get; set; }\r\n        public bool Closed { get; protected set; }\r\n\r\n        private readonly object _syncRoot = new object();\r\n        public object SyncRoot { get { return _syncRoot; } }\r\n\r\n        public int Id { get; protected set; }\r\n        public int DCId { get; set; }\r\n        public byte[] Secret { get; set; }\r\n        public byte[] AuthKey { get; set; }\r\n        public TLLong SessionId { get; set; }\r\n        public TLLong Salt { get; set; }\r\n\r\n        private int _sequenceNumber;\r\n\r\n        public int SequenceNumber\r\n        {\r\n            get { return _sequenceNumber; }\r\n            set\r\n            {\r\n                _sequenceNumber = value;\r\n            }\r\n        }\r\n\r\n        private long _clientTicksDelta;\r\n        public long ClientTicksDelta\r\n        {\r\n            get\r\n            {\r\n                return _clientTicksDelta;\r\n            }\r\n            set\r\n            {\r\n                _clientTicksDelta = value;\r\n            }\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        public void UpdateTicksDelta(TLLong msgId)\r\n        {\r\n            if (_once) return;  // to avoid lock\r\n\r\n            lock (SyncRoot)\r\n            {\r\n                if (_once) return;\r\n                _once = true;\r\n\r\n                var clientTime = GenerateMessageId().Value;\r\n                var serverTime = msgId.Value;\r\n                ClientTicksDelta += serverTime - clientTime;\r\n            }\r\n            //Execute.ShowDebugMessage(\"ITransport.UpdateTicksDelta dc_id=\" + DCId);\r\n        }\r\n\r\n        public abstract void SendPacketAsync(string caption, byte[] data, Action<bool> callback, Action<TcpTransportResult> faultCallback = null);\r\n        public abstract void Close();\r\n\r\n        public int PacketLength { get { return _packetLength; } }\r\n\r\n        private int _lastPacketLength;\r\n\r\n        public int LastPacketLength { get { return _lastPacketLength; } }\r\n\r\n\r\n        public WindowsPhone.Tuple<int, int, int> GetCurrentPacketInfo()\r\n        {\r\n            return new WindowsPhone.Tuple<int, int, int>(_packetLengthBytesRead, _packetLength, _bytesReceived);\r\n        }\r\n\r\n        public abstract string GetTransportInfo();\r\n\r\n        public DateTime? FirstSendTime { get; protected set; }\r\n        public DateTime? FirstReceiveTime { get; protected set; }\r\n        public DateTime? LastReceiveTime { get; protected set; }\r\n\r\n        protected static byte[] CreatePacket(byte[] buffer)\r\n        {\r\n            const int maxShortLength = 0x7E;\r\n            var shortLength = buffer.Length / 4;\r\n            var length = (shortLength > maxShortLength) ? 4 + buffer.Length : 1 + buffer.Length;\r\n            var bytes = new byte[length];\r\n\r\n            if (shortLength > maxShortLength)\r\n            {\r\n                bytes[0] = 0x7F;\r\n                var shortLengthBytes = BitConverter.GetBytes(shortLength);\r\n                Array.Copy(shortLengthBytes, 0, bytes, 1, 3);\r\n                Array.Copy(buffer, 0, bytes, 4, buffer.Length);\r\n            }\r\n            else\r\n            {\r\n                bytes[0] = (byte)shortLength;\r\n                Array.Copy(buffer, 0, bytes, 1, buffer.Length);\r\n            }\r\n\r\n            return bytes;\r\n        }\r\n\r\n        protected static int GetPacketLength(byte[] bytes, int position, out int bytesRead)\r\n        {\r\n            if (bytes.Length <= position)\r\n            {\r\n                if (bytes.Length != 0 && position != 0)\r\n                {\r\n                    Execute.ShowDebugMessage(\"TCPTransport.0x7F l<=p p=\" + position + \" l=\" + bytes.Length);\r\n                }\r\n                bytesRead = 0;\r\n                return 0;\r\n            }\r\n\r\n            int shortLength;\r\n            if (bytes[position] == 0x7F)\r\n            {\r\n                if (bytes.Length < (position + 1 + 3))\r\n                {\r\n                    Execute.ShowDebugMessage(\"TCPTransport.0x7F error p=\" + position + \" l=\" + bytes.Length);\r\n                }\r\n\r\n                var lengthBytes = bytes.SubArray(1 + position, 3);\r\n\r\n                shortLength = BitConverter.ToInt32(TLUtils.Combine(lengthBytes, new byte[] { 0x00 }), 0);\r\n                bytesRead = 4;\r\n            }\r\n            else\r\n            {\r\n                //Execute.ShowDebugMessage(\"TCPTransport.!=0x7F \" + position);\r\n\r\n                shortLength = bytes[position];\r\n                bytesRead = 1;\r\n            }\r\n\r\n            return shortLength * 4;\r\n        }\r\n\r\n        protected virtual byte[] GetInitBuffer()\r\n        {\r\n            var buffer = new byte[64];\r\n            var random = new Random();\r\n            while (true)\r\n            {\r\n                random.NextBytes(buffer);\r\n\r\n                var val = (buffer[3] << 24) | (buffer[2] << 16) | (buffer[1] << 8) | (buffer[0]);\r\n                var val2 = (buffer[7] << 24) | (buffer[6] << 16) | (buffer[5] << 8) | (buffer[4]);\r\n                if (buffer[0] != 0xef\r\n                    && val != 0x44414548\r\n                    && val != 0x54534f50\r\n                    && val != 0x20544547\r\n                    && val != 0x4954504f\r\n                    && val != 0xeeeeeeee\r\n                    && val2 != 0x00000000)\r\n                {\r\n                    buffer[56] = buffer[57] = buffer[58] = buffer[59] = 0xef;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            return buffer;\r\n        }\r\n\r\n        private int _bytesReceived;\r\n        private int _packetLength = 0;\r\n        private byte[] _previousTail = new byte[0];\r\n        private bool _usePreviousTail;\r\n        private int _packetLengthBytesRead = 0;\r\n        readonly MemoryStream _stream = new MemoryStream(32 * 1024);\r\n\r\n        protected void OnBufferReceived(byte[] buffer, int offset, int bytesTransferred)\r\n        {\r\n            if (bytesTransferred > 0)\r\n            {\r\n                StopCheckConfigTimer();\r\n\r\n                _bytesReceived += bytesTransferred;\r\n\r\n                if (_packetLength == 0)\r\n                {\r\n                    byte[] fullBuffer;\r\n\r\n                    if (_usePreviousTail)\r\n                    {\r\n                        _usePreviousTail = false;\r\n                        fullBuffer = TLUtils.Combine(_previousTail, buffer);\r\n                        _previousTail = new byte[0];\r\n                    }\r\n                    else\r\n                    {\r\n                        fullBuffer = buffer;\r\n                    }\r\n\r\n                    _packetLength = GetPacketLength(fullBuffer, offset, out _packetLengthBytesRead);\r\n                }\r\n\r\n                _stream.Write(buffer, offset, bytesTransferred);\r\n\r\n                if (_bytesReceived >= _packetLength + _packetLengthBytesRead)\r\n                {\r\n                    var bytes = _stream.ToArray();\r\n\r\n                    var data = bytes.SubArray(_packetLengthBytesRead, _packetLength);\r\n                    _previousTail = new byte[] { };\r\n                    if (_bytesReceived > _packetLength + _packetLengthBytesRead)\r\n                    {\r\n                        _previousTail = bytes.SubArray(_packetLengthBytesRead + _packetLength, _bytesReceived - (_packetLengthBytesRead + _packetLength));\r\n                    }\r\n\r\n                    _stream.SetLength(0);\r\n                    _stream.Write(_previousTail, 0, _previousTail.Length);\r\n                    _bytesReceived = _previousTail.Length;\r\n\r\n                    if (_previousTail.Length > 0)\r\n                    {\r\n                        if (_previousTail.Length >= 4)\r\n                        {\r\n                            _packetLength = GetPacketLength(_previousTail, 0, out _packetLengthBytesRead);\r\n\r\n                            if (_packetLength != 0\r\n                                && _previousTail.Length >= _packetLength + _packetLengthBytesRead)\r\n                            {\r\n                                Execute.ShowDebugMessage(\"TCPTransport.0x7F forgot package length=\" + _packetLength + \" tail=\" + _previousTail.Length);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            _packetLengthBytesRead = 0;\r\n                            _packetLength = 0;\r\n                            _usePreviousTail = true;\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        _packetLength = GetPacketLength(_previousTail, 0, out _packetLengthBytesRead);\r\n                    }\r\n                    _lastPacketLength = data.Length;\r\n\r\n\r\n\r\n                    if (MinMessageId == 0 && AuthKey != null)\r\n                    {\r\n                        SetMinMessageId(data);\r\n                    }\r\n                    RaisePacketReceived(new DataEventArgs(data, PacketLength, LastReceiveTime));\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Execute.ShowDebugMessage(\"TCP bytesTransferred=\" + bytesTransferred);\r\n            }\r\n        }\r\n\r\n        private void SetMinMessageId(byte[] bytes)\r\n        {\r\n            try\r\n            {\r\n                var position = 0;\r\n                var encryptedMessage = (TLEncryptedTransportMessage)new TLEncryptedTransportMessage().FromBytes(bytes, ref position);\r\n                encryptedMessage.Decrypt(AuthKey);\r\n\r\n                position = 0;\r\n                TLTransportMessage transportMessage;\r\n                transportMessage = TLObject.GetObject<TLTransportMessage>(encryptedMessage.Data, ref position);\r\n\r\n                MinMessageId = transportMessage.MessageId.Value;\r\n                System.Diagnostics.Debug.WriteLine(\"TCPTransport set min message_id={0} seq_no={1}\", transportMessage.MessageId, transportMessage.SeqNo);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\"SetMessageId exception \" + ex);\r\n            }\r\n        }\r\n\r\n        #region MessageId\r\n        private static readonly object _messageIdRoot = new object();\r\n\r\n        public static long PreviousMessageId;\r\n\r\n        public TLLong GenerateMessageId(bool checkPreviousMessageId = false)\r\n        {\r\n            long correctUnixTime;\r\n            lock (_messageIdRoot)\r\n            {\r\n                var clientDelta = ClientTicksDelta;\r\n                // serverTime = clientTime + clientDelta\r\n                var now = DateTime.Now;\r\n                //var unixTime = (long)Utils.DateTimeToUnixTimestamp(now) << 32;\r\n\r\n                var unixTime = (long)(Utils.DateTimeToUnixTimestamp(now) * 4294967296) + clientDelta; //2^32\r\n\r\n                var addingTicks = 4 - (unixTime % 4);\r\n                if ((unixTime % 4) == 0)\r\n                {\r\n                    correctUnixTime = unixTime;\r\n                }\r\n                else\r\n                {\r\n                    correctUnixTime = unixTime + addingTicks;\r\n                }\r\n\r\n                // check with previous messageId\r\n                if (PreviousMessageId != 0 && checkPreviousMessageId)\r\n                {\r\n                    correctUnixTime = Math.Max(PreviousMessageId + 4, correctUnixTime);\r\n                }\r\n                PreviousMessageId = correctUnixTime;\r\n            }\r\n\r\n            if (correctUnixTime == 0)\r\n                throw new Exception(\"Bad message id\");\r\n\r\n            return new TLLong(correctUnixTime);\r\n        }\r\n        #endregion\r\n\r\n        #region NonEncryptedHistory\r\n\r\n        private readonly object _nonEncryptedHistoryRoot = new object();\r\n\r\n        private readonly Dictionary<long, HistoryItem> _nonEncryptedHistory = new Dictionary<long, HistoryItem>();\r\n\r\n        public void EnqueueNonEncryptedItem(HistoryItem item)\r\n        {\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n                _nonEncryptedHistory[item.Hash] = item;\r\n            }\r\n#if LOG_REGISTRATION\r\n            var info = new StringBuilder();\r\n            info.AppendLine(String.Format(\"Socket.EnqueueNonEncryptedItem {0} item {1} hash={2}\", Id, item.Caption, item.Hash));\r\n            info.AppendLine(\"Items: \" + _nonEncryptedHistory.Count);\r\n            foreach (var historyItem in _nonEncryptedHistory.Values)\r\n            {\r\n                info.AppendLine(historyItem.Caption + \" \" + historyItem.Hash);\r\n            }\r\n            TLUtils.WriteLog(info.ToString());\r\n#endif\r\n        }\r\n\r\n        public IList<HistoryItem> RemoveTimeOutRequests(double timeout = Constants.TimeoutInterval)\r\n        {\r\n            var now = DateTime.Now;\r\n            var timedOutKeys = new List<long>();\r\n            var timedOutValues = new List<HistoryItem>();\r\n\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n                foreach (var historyKeyValue in _nonEncryptedHistory)\r\n                {\r\n                    var historyValue = historyKeyValue.Value;\r\n                    if (historyValue.SendTime != default(DateTime)\r\n                        && historyValue.SendTime.AddSeconds(timeout) < now)\r\n                    {\r\n                        timedOutKeys.Add(historyKeyValue.Key);\r\n                        timedOutValues.Add(historyKeyValue.Value);\r\n                    }\r\n                }\r\n\r\n                if (timedOutKeys.Count > 0)\r\n                {\r\n#if LOG_REGISTRATION\r\n                    var info = new StringBuilder();\r\n                    info.AppendLine(String.Format(\"Socket.RemoveTimeOutRequests {0}\", Id));\r\n                    info.AppendLine(\"Items before: \" + _nonEncryptedHistory.Count);\r\n                    foreach (var historyItem in _nonEncryptedHistory.Values)\r\n                    {\r\n                        info.AppendLine(historyItem.Caption + \" \" + historyItem.Hash);\r\n                    }\r\n#endif\r\n                    foreach (var key in timedOutKeys)\r\n                    {\r\n                        _nonEncryptedHistory.Remove(key);\r\n                    }\r\n#if LOG_REGISTRATION\r\n                    info.AppendLine(\"Items after: \" + _nonEncryptedHistory.Count);\r\n                    foreach (var historyItem in _nonEncryptedHistory.Values)\r\n                    {\r\n                        info.AppendLine(historyItem.Caption + \" \" + historyItem.Hash);\r\n                    }\r\n                    TLUtils.WriteLog(info.ToString());\r\n#endif\r\n                }\r\n            }\r\n\r\n            return timedOutValues;\r\n        }\r\n\r\n        public HistoryItem DequeueFirstNonEncryptedItem()\r\n        {\r\n            HistoryItem item;\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n                item = _nonEncryptedHistory.Values.FirstOrDefault();\r\n                if (item != null)\r\n                {\r\n                    _nonEncryptedHistory.Remove(item.Hash);\r\n                }\r\n            }\r\n\r\n            return item;\r\n        }\r\n\r\n        public bool RemoveNonEncryptedItem(HistoryItem item)\r\n        {\r\n            bool result;\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n#if LOG_REGISTRATION\r\n                var info = new StringBuilder();\r\n                info.AppendLine(String.Format(\"Socket.RemoveNonEncryptedItem {0} item {1} hash={2}\", Id, item.Caption, item.Hash));\r\n                info.AppendLine(\"Items before: \" + _nonEncryptedHistory.Count);\r\n                foreach (var historyItem in _nonEncryptedHistory.Values)\r\n                {\r\n                    info.AppendLine(historyItem.Caption + \" \" + historyItem.Hash);\r\n                }\r\n#endif\r\n\r\n                result = _nonEncryptedHistory.Remove(item.Hash);\r\n\r\n#if LOG_REGISTRATION\r\n                info.AppendLine(\"Items after: \" + _nonEncryptedHistory.Count);\r\n                foreach (var historyItem in _nonEncryptedHistory.Values)\r\n                {\r\n                    info.AppendLine(historyItem.Caption + \" \" + historyItem.Hash);\r\n                }\r\n                TLUtils.WriteLog(info.ToString());\r\n#endif\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public void ClearNonEncryptedHistory(Exception e = null)\r\n        {\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n                var error = new StringBuilder();\r\n                error.Append(String.Format(\"Socket.ClearNonEncryptedHistory {0} count={1}\", Id, _nonEncryptedHistory.Count));\r\n                if (e != null)\r\n                {\r\n                    error.AppendLine(e.ToString());\r\n                }\r\n\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(error.ToString());\r\n#endif\r\n\r\n                foreach (var historyItem in _nonEncryptedHistory)\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(String.Format(\"Socket.ClearNonEncryptedHistory {0} item {1}\", Id, historyItem.Value.Caption));\r\n#endif\r\n                    historyItem.Value.FaultCallback.SafeInvoke(new TLRPCError { Code = new TLInt(404), Message = new TLString(error.ToString()) });\r\n                }\r\n\r\n                _nonEncryptedHistory.Clear();\r\n            }\r\n        }\r\n\r\n        public string PrintNonEncryptedHistory()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            lock (_nonEncryptedHistoryRoot)\r\n            {\r\n                sb.AppendLine(\"NonEncryptedHistory items:\");\r\n                foreach (var historyItem in _nonEncryptedHistory.Values)\r\n                {\r\n                    sb.AppendLine(historyItem.Caption + \" msgId \" + historyItem.Hash);\r\n                }\r\n            }\r\n\r\n            return sb.ToString();\r\n        }\r\n        #endregion\r\n\r\n        #region Events\r\n        public event EventHandler<DataEventArgs> PacketReceived;\r\n\r\n        protected virtual void RaisePacketReceived(DataEventArgs args)\r\n        {\r\n            var handler = PacketReceived;\r\n            if (handler != null)\r\n            {\r\n                Execute.BeginOnThreadPool(() =>\r\n                {\r\n                    handler(this, args);\r\n                });\r\n            }\r\n        }\r\n\r\n        public event EventHandler Connecting;\r\n\r\n        private bool _connectingRaised;\r\n\r\n        protected virtual void RaiseConnectingAsync()\r\n        {\r\n            if (_connectingRaised) return;\r\n            _connectingRaised = true;\r\n\r\n            StartCheckConfigTimer();\r\n\r\n            var handler = Connecting;\r\n            if (handler != null)\r\n            {\r\n                Execute.BeginOnThreadPool(() => handler(this, EventArgs.Empty));\r\n            }\r\n        }\r\n\r\n        public event EventHandler Connected;\r\n\r\n        protected virtual void RaiseConnectedAsync()\r\n        {\r\n            var handler = Connected;\r\n            if (handler != null)\r\n            {\r\n                Execute.BeginOnThreadPool(() => handler(this, EventArgs.Empty));\r\n            }\r\n        }\r\n\r\n        public event EventHandler ConnectionLost;\r\n\r\n        protected virtual void RaiseConnectionLost()\r\n        {\r\n            var handler = ConnectionLost;\r\n            if (handler != null)\r\n            {\r\n                Execute.BeginOnThreadPool(() => handler(this, EventArgs.Empty));\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public override string ToString()\r\n        {\r\n            return String.Format(\"Id={0} {1}) {2}:{3} (AuthKey {4})\\n  Salt {5}\\n  SessionId {6} TicksDelta {7}\", Id, DCId, Host, Port, AuthKey != null, Salt, SessionId, ClientTicksDelta);\r\n        }\r\n\r\n        protected virtual void WRITE_LOG(string str)\r\n        {\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(str);\r\n#endif\r\n        }\r\n\r\n        protected virtual void WRITE_LOG(string str, Exception ex)\r\n        {\r\n            var type = ex != null ? ex.GetType().Name : \"null\";\r\n            WRITE_LOG(String.Format(\"{0} {1} {2}={3}\", str, Id, type, ex));\r\n        }\r\n\r\n#if TCP_OBFUSCATED_2\r\n        protected byte[] EncryptKey;\r\n\r\n        protected byte[] EncryptIV;\r\n\r\n        protected byte[] DecryptKey;\r\n\r\n        protected byte[] DecryptIV;\r\n\r\n        private byte[] EncryptCountBuf;\r\n\r\n        private uint EncryptNum;\r\n\r\n        public byte[] Encrypt(byte[] data)\r\n        {\r\n            if (EncryptCountBuf == null)\r\n            {\r\n                EncryptCountBuf = new byte[16];\r\n                EncryptNum = 0;\r\n            }\r\n\r\n            return Utils.AES_ctr128_encrypt(data, EncryptKey, ref EncryptIV, ref EncryptCountBuf, ref EncryptNum);\r\n        }\r\n\r\n        private byte[] DecryptCountBuf;\r\n\r\n        private uint DecryptNum;\r\n\r\n        public byte[] Decrypt(byte[] data)\r\n        {\r\n            if (DecryptCountBuf == null)\r\n            {\r\n                DecryptCountBuf = new byte[16];\r\n                DecryptNum = 0;\r\n            }\r\n\r\n            return Utils.AES_ctr128_encrypt(data, DecryptKey, ref DecryptIV, ref DecryptCountBuf, ref DecryptNum);\r\n        }\r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Transport/TCPTransportResult.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n#if WINDOWS_PHONE\r\nusing System.Net.Sockets;\r\nusing SocketError = System.Net.Sockets.SocketError;\r\n#endif\r\nusing System.Text;\r\n\r\nnamespace Telegram.Api.Transport\r\n{\r\n    public class TcpTransportResult\r\n    {\r\n#if WINDOWS_PHONE\r\n        public SocketError Error { get; set; }\r\n\r\n        public SocketAsyncOperation Operation { get; set; }\r\n#endif\r\n\r\n        public Exception Exception { get; set; }\r\n\r\n        public TcpTransportResult(Exception exception)\r\n        {\r\n            Exception = exception;\r\n        }\r\n\r\n#if WINDOWS_PHONE\r\n        public TcpTransportResult(SocketAsyncOperation operation, SocketError error)\r\n        {\r\n            Operation = operation;\r\n            Error = error;\r\n        }\r\n\r\n        public TcpTransportResult(SocketAsyncOperation operation, Exception exception)\r\n        {\r\n            Operation = operation;\r\n            Exception = exception;\r\n        }\r\n#endif\r\n\r\n        public override string ToString()\r\n        {\r\n            var sb = new StringBuilder();\r\n#if WINDOWS_PHONE\r\n            sb.AppendLine(\"Operation=\" + Operation);\r\n            sb.AppendLine(\"Error=\" + Error);\r\n#endif\r\n            sb.AppendLine(\"Exception=\" + Exception);\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/Transport/TransportService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define NATIVE\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Transport\r\n{\r\n    public class TransportService : ITransportService\r\n    {\r\n        public TransportService()\r\n        {\r\n\r\n        }\r\n\r\n        private readonly object _proxyConfigSyncRoot = new object();\r\n\r\n        private TLProxyConfigBase _proxyConfig;\r\n\r\n        public TLProxyConfigBase GetProxyConfig()\r\n        {\r\n            if (_proxyConfig != null)\r\n            {\r\n                return _proxyConfig;\r\n            }\r\n\r\n            _proxyConfig = TLUtils.OpenObjectFromMTProtoFile<TLProxyConfigBase>(_proxyConfigSyncRoot, Constants.ProxyConfigFileName) ?? TLProxyConfigBase.Empty;\r\n\r\n            _proxyConfig = _proxyConfig.ToLastProxyConfig();\r\n\r\n            return _proxyConfig;\r\n        }\r\n\r\n        public void SetProxyConfig(TLProxyConfigBase proxyConfig)\r\n        {\r\n            _proxyConfig = proxyConfig;\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_proxyConfigSyncRoot, Constants.ProxyConfigFileName, _proxyConfig);\r\n        }\r\n\r\n        private readonly Dictionary<string, ITransport> _cache = new Dictionary<string, ITransport>();\r\n\r\n        private readonly Dictionary<string, ITransport> _fileCache = new Dictionary<string, ITransport>();\r\n\r\n        private readonly Dictionary<string, ITransport> _specialCache = new Dictionary<string, ITransport>();\r\n\r\n        public ITransport GetFileTransport(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, out bool isCreated)\r\n        {\r\n            var key = string.Format(\"{0} {1} {2} {3}\", host, port, protocolDCId, type);\r\n            if (_fileCache.ContainsKey(key))\r\n            {\r\n                isCreated = false;\r\n                return _fileCache[key];\r\n            }\r\n\r\n#if WINDOWS_PHONE\r\n            if (type == TransportType.Http)\r\n            {\r\n                var transport = new HttpTransport(host, MTProtoTransportType.File, GetProxyConfig());\r\n\r\n                _fileCache.Add(key, transport);\r\n                isCreated = true;\r\n                return transport;\r\n                //transport.SetAddress(host, port, () => callback(transport));\r\n            }\r\n            else\r\n#endif\r\n            {\r\n                var transport =\r\n#if WIN_RT\r\n                    new TcpTransportWinRT(host, port, staticHost, staticPort, MTProtoTransportType.File, GetProxyConfig());\r\n#elif NATIVE\r\n new NativeTcpTransport(host, port, staticHost, staticPort, MTProtoTransportType.File, protocolDCId, protocolSecret, GetProxyConfig());\r\n#else\r\n                    new TcpTransport(host, port, staticHost, staticPort, MTProtoTransportType.File, GetProxyConfig());\r\n#endif\r\n                transport.ConnectionLost += OnConnectionLost;\r\n                TLUtils.WritePerformance(string.Format(\"  TCP: New file transport {0}:{1}\", host, port));\r\n\r\n                _fileCache.Add(key, transport);\r\n                isCreated = true;\r\n\r\n                Debug.WriteLine(\"  TCP: New transport {0}:{1}\", host, port);\r\n                return transport;\r\n                //trasport.SetAddress(host, port, () => callback(trasport));\r\n            }\r\n        }\r\n\r\n        private readonly Dictionary<string, ITransport> _fileCache2 = new Dictionary<string, ITransport>();\r\n\r\n        public ITransport GetFileTransport2(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, out bool isCreated)\r\n        {\r\n            var key = string.Format(\"{0} {1} {2} {3}\", host, port, protocolDCId, type);\r\n            if (_fileCache2.ContainsKey(key))\r\n            {\r\n                isCreated = false;\r\n                return _fileCache2[key];\r\n            }\r\n\r\n#if WINDOWS_PHONE\r\n            if (type == TransportType.Http)\r\n            {\r\n                var transport = new HttpTransport(host, MTProtoTransportType.File, GetProxyConfig());\r\n\r\n                _fileCache2.Add(key, transport);\r\n                isCreated = true;\r\n                return transport;\r\n                //transport.SetAddress(host, port, () => callback(transport));\r\n            }\r\n            else\r\n#endif\r\n            {\r\n                var transport =\r\n#if WIN_RT\r\n                    new TcpTransportWinRT(host, port, staticHost, staticPort, MTProtoTransportType.File, GetProxyConfig());\r\n#elif NATIVE\r\n new NativeTcpTransport(host, port, staticHost, staticPort, MTProtoTransportType.File, protocolDCId, protocolSecret, GetProxyConfig());\r\n#else\r\n                    new TcpTransport(host, port, staticHost, staticPort, MTProtoTransportType.File, GetProxyConfig());\r\n#endif\r\n                transport.ConnectionLost += OnConnectionLost;\r\n                TLUtils.WritePerformance(string.Format(\"  TCP: New file transport 2 {0}:{1}\", host, port));\r\n\r\n                _fileCache2.Add(key, transport);\r\n                isCreated = true;\r\n\r\n                Debug.WriteLine(\"  TCP: New transport {0}:{1}\", host, port);\r\n                return transport;\r\n                //trasport.SetAddress(host, port, () => callback(trasport));\r\n            }\r\n        }\r\n\r\n        public ITransport GetTransport(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, out bool isCreated)\r\n        {\r\n            var key = string.Format(\"{0} {1} {2} {3}\", host, port, protocolDCId, type);\r\n            if (_cache.ContainsKey(key))\r\n            {\r\n                isCreated = false;\r\n\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(string.Format(\"Old transport {2} {0}:{1}\", host, port, _cache[key].Id));\r\n#endif\r\n                return _cache[key];\r\n            }\r\n\r\n#if WINDOWS_PHONE\r\n            if (type == TransportType.Http)\r\n            {\r\n                var transport = new HttpTransport(host, MTProtoTransportType.Main, GetProxyConfig());\r\n\r\n                _cache.Add(key, transport);\r\n                isCreated = true;\r\n                return transport;\r\n                //transport.SetAddress(host, port, () => callback(transport));\r\n            }\r\n            else\r\n#endif\r\n            {\r\n                var transport =\r\n#if WIN_RT\r\n                    new TcpTransportWinRT(host, port, staticHost, staticPort, MTProtoTransportType.Main, GetProxyConfig());\r\n#elif NATIVE\r\n new NativeTcpTransport(host, port, staticHost, staticPort, MTProtoTransportType.Main, protocolDCId, protocolSecret, GetProxyConfig());\r\n#else\r\n                    new TcpTransport(host, port, staticHost, staticPort, MTProtoTransportType.Main, GetProxyConfig());\r\n#endif\r\n\r\n                transport.Connecting += OnConnecting;\r\n                transport.Connected += OnConnected;\r\n                transport.ConnectionLost += OnConnectionLost;\r\n                transport.CheckConfig += OnCheckConfig;\r\n\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(string.Format(\"New transport {2} {0}:{1}\", host, port, transport.Id));\r\n#endif\r\n                TLUtils.WritePerformance(string.Format(\"  TCP: New transport {0}:{1}\", host, port));\r\n\r\n                _cache.Add(key, transport);\r\n                isCreated = true;\r\n\r\n                Debug.WriteLine(\"  TCP: New transport {0}:{1}\", host, port);\r\n                return transport;\r\n                //trasport.SetAddress(host, port, () => callback(trasport));\r\n            }\r\n        }\r\n\r\n        public ITransport GetSpecialTransport(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, out bool isCreated)\r\n        {\r\n            var random = TLLong.Random();   // Important! To ping multiple connections to one proxy, will be closed after first ping otherwise\r\n            var proxyConfig = GetProxyConfig();\r\n            var proxy = proxyConfig != null ? proxyConfig.GetProxy() : null;\r\n            var key = string.Format(\"{0} {1} {2} {3} {4} {5}\", host, port, protocolDCId, type, random, proxy != null ? string.Format(\"{0}:{1}\", proxy.Server, proxy.Port) : string.Empty);\r\n            if (_specialCache.ContainsKey(key))\r\n            {\r\n                isCreated = false;\r\n\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(string.Format(\"Old transport {2} {0}:{1}\", host, port, _specialCache[key].Id));\r\n#endif\r\n                return _specialCache[key];\r\n            }\r\n\r\n#if WINDOWS_PHONE\r\n            if (type == TransportType.Http)\r\n            {\r\n                var transport = new HttpTransport(host, MTProtoTransportType.Special, GetProxyConfig());\r\n\r\n                _specialCache.Add(key, transport);\r\n                isCreated = true;\r\n                return transport;\r\n                //transport.SetAddress(host, port, () => callback(transport));\r\n            }\r\n            else\r\n#endif\r\n            {\r\n                var transport =\r\n#if WIN_RT\r\n                    new TcpTransportWinRT(host, port, staticHost, staticPort, MTProtoTransportType.Special, GetProxyConfig());\r\n#elif NATIVE\r\n new NativeTcpTransport(host, port, staticHost, staticPort, MTProtoTransportType.Special, protocolDCId, protocolSecret, GetProxyConfig());\r\n#else\r\n                    new TcpTransport(host, port, staticHost, staticPort, MTProtoTransportType.Special, GetProxyConfig());\r\n#endif\r\n                transport.Connecting += OnConnecting;\r\n                transport.Connected += OnConnected;\r\n                transport.ConnectionLost += OnConnectionLost;\r\n                transport.CheckConfig += OnCheckConfig;\r\n\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(string.Format(\"New transport {2} {0}:{1}\", host, port, transport.Id));\r\n#endif\r\n                TLUtils.WritePerformance(string.Format(\"  TCP: New transport {0}:{1}\", host, port));\r\n\r\n                _specialCache.Add(key, transport);\r\n                isCreated = true;\r\n\r\n                Debug.WriteLine(\"  TCP: New transport {0}:{1}\", host, port);\r\n                return transport;\r\n                //trasport.SetAddress(host, port, () => callback(trasport));\r\n            }\r\n        }\r\n\r\n        public ITransport GetSpecialTransport(string host, int port, string staticHost, int staticPort, TransportType type, short protocolDCId, byte[] protocolSecret, TLProxyBase proxy, out bool isCreated)\r\n        {\r\n            var random = TLLong.Random();   // Important! To ping multiple connections to one proxy, will be closed after first ping otherwise\r\n            var key = string.Format(\"{0} {1} {2} {3} {4} {5}\", host, port, protocolDCId, type, random, proxy != null ? string.Format(\"{0}:{1}\", proxy.Server, proxy.Port) : string.Empty);\r\n            if (_specialCache.ContainsKey(key))\r\n            {\r\n                isCreated = false;\r\n\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(string.Format(\"Old transport {2} {0}:{1}\", host, port, _specialCache[key].Id));\r\n#endif\r\n                return _specialCache[key];\r\n            }\r\n\r\n#if WINDOWS_PHONE\r\n            if (type == TransportType.Http)\r\n            {\r\n                var transport = new HttpTransport(host, MTProtoTransportType.Special, GetProxyConfig());\r\n\r\n                _specialCache.Add(key, transport);\r\n                isCreated = true;\r\n                return transport;\r\n                //transport.SetAddress(host, port, () => callback(transport));\r\n            }\r\n            else\r\n#endif\r\n            {\r\n                var proxyConfig = new TLProxyConfig76\r\n                {\r\n                    CustomFlags = new TLLong(0),\r\n                    IsEnabled = TLBool.True,\r\n                    SelectedIndex = new TLInt(0),\r\n                    UseForCalls = TLBool.False,\r\n                    Items = new TLVector<TLProxyBase> { proxy }\r\n                };\r\n\r\n                var transport =\r\n#if WIN_RT\r\n                    new TcpTransportWinRT(host, port, staticHost, staticPort, MTProtoTransportType.Special, proxyConfig);\r\n#elif NATIVE\r\n new NativeTcpTransport(host, port, staticHost, staticPort, MTProtoTransportType.Special, protocolDCId, protocolSecret, proxyConfig);\r\n#else\r\n                    new TcpTransport(host, port, staticHost, staticPort, MTProtoTransportType.Special, proxyConfig);\r\n#endif\r\n                transport.Connecting += OnConnecting;\r\n                transport.Connected += OnConnected;\r\n                transport.ConnectionLost += OnConnectionLost;\r\n                transport.CheckConfig += OnCheckConfig;\r\n\r\n#if LOG_REGISTRATION\r\n                TLUtils.WriteLog(string.Format(\"New transport {2} {0}:{1}\", host, port, transport.Id));\r\n#endif\r\n                TLUtils.WritePerformance(string.Format(\"  TCP: New transport {0}:{1}\", host, port));\r\n\r\n                _specialCache.Add(key, transport);\r\n                isCreated = true;\r\n\r\n                Debug.WriteLine(\"  TCP: New transport {0}:{1}\", host, port);\r\n                return transport;\r\n                //trasport.SetAddress(host, port, () => callback(trasport));\r\n            }\r\n        }\r\n\r\n        public event EventHandler CheckConfig;\r\n\r\n        protected virtual void RaiseCheckConfig()\r\n        {\r\n            var handler = CheckConfig;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        private void OnCheckConfig(object sender, EventArgs e)\r\n        {\r\n            var transport = sender as ITransport;\r\n            if (transport != null && transport.MTProtoType == MTProtoTransportType.Main)\r\n            {\r\n                Logs.Log.Write(string.Format(\"TransportService CheckConfig Transport=[dc_id={0} ip={1} port={2} proxy=[{3}]]\", transport.DCId, transport.Host, transport.Port, transport.ProxyConfig));\r\n\r\n                RaiseCheckConfig();\r\n            }\r\n        }\r\n\r\n        public void Close()\r\n        {\r\n            var transports = new List<ITransport>(_cache.Values);\r\n            foreach (var transport in transports)\r\n            {\r\n                transport.Connecting -= OnConnecting;\r\n                transport.Connected -= OnConnected;\r\n                transport.ConnectionLost -= OnConnectionLost;\r\n                transport.Close();\r\n            }\r\n            _cache.Clear();\r\n\r\n            var fileTransports = new List<ITransport>(_fileCache.Values);\r\n            foreach (var transport in fileTransports)\r\n            {\r\n                transport.Connecting -= OnConnecting;\r\n                transport.Connected -= OnConnected;\r\n                transport.ConnectionLost -= OnConnectionLost;\r\n                transport.Close();\r\n            }\r\n            _fileCache.Clear();\r\n\r\n            var fileTransports2 = new List<ITransport>(_fileCache2.Values);\r\n            foreach (var transport in fileTransports2)\r\n            {\r\n                transport.Connecting -= OnConnecting;\r\n                transport.Connected -= OnConnected;\r\n                transport.ConnectionLost -= OnConnectionLost;\r\n                transport.Close();\r\n            }\r\n            _fileCache2.Clear();\r\n\r\n            /*var specialTransports = new List<ITransport>(_specialCache.Values);\r\n            foreach (var transport in specialTransports)\r\n            {\r\n                transport.Connecting -= OnConnecting;\r\n                transport.Connected -= OnConnected;\r\n                transport.ConnectionLost -= OnConnectionLost;\r\n                transport.Close();\r\n            }\r\n            _specialCache.Clear();*/\r\n        }\r\n\r\n        public void CloseTransport(ITransport transport)\r\n        {\r\n            foreach (var value in _cache.Values.Where(x => string.Equals(x.Host, transport.Host, StringComparison.OrdinalIgnoreCase)))\r\n            {\r\n                value.Close();\r\n                transport.Connecting -= OnConnecting;\r\n                transport.Connected -= OnConnected;\r\n                transport.ConnectionLost -= OnConnectionLost;\r\n            }\r\n            _cache.Remove(string.Format(\"{0} {1} {2}\", transport.Host, transport.Port, transport.Type));\r\n\r\n            foreach (var value in _fileCache.Values.Where(x => string.Equals(x.Host, transport.Host, StringComparison.OrdinalIgnoreCase)))\r\n            {\r\n                value.Close();\r\n                transport.Connecting -= OnConnecting;\r\n                transport.Connected -= OnConnected;\r\n                transport.ConnectionLost -= OnConnectionLost;\r\n            }\r\n            _fileCache.Remove(string.Format(\"{0} {1} {2}\", transport.Host, transport.Port, transport.Type));\r\n\r\n            foreach (var value in _fileCache2.Values.Where(x => string.Equals(x.Host, transport.Host, StringComparison.OrdinalIgnoreCase)))\r\n            {\r\n                value.Close();\r\n                transport.Connecting -= OnConnecting;\r\n                transport.Connected -= OnConnected;\r\n                transport.ConnectionLost -= OnConnectionLost;\r\n            }\r\n            _fileCache2.Remove(string.Format(\"{0} {1} {2}\", transport.Host, transport.Port, transport.Type));\r\n        }\r\n\r\n        public void CloseSpecialTransport(ITransport transport)\r\n        {\r\n            transport.Connecting -= OnConnecting;\r\n            transport.Connected -= OnConnected;\r\n            transport.ConnectionLost -= OnConnectionLost;\r\n            transport.Close();\r\n\r\n            _specialCache.Remove(GetSpecialTransportKey(transport));\r\n        }\r\n\r\n        private static string GetSpecialTransportKey(ITransport transport)\r\n        {\r\n            var proxy = transport.ProxyConfig != null ? transport.ProxyConfig.GetProxy() : null;\r\n            return string.Format(\"{0} {1} {2} {3}\",\r\n                transport.Host,\r\n                transport.Port,\r\n                transport.Type,\r\n                proxy != null ? string.Format(\"{0}:{1}\", proxy.Server, proxy.Port) : String.Empty);\r\n        }\r\n\r\n        public event EventHandler<TransportEventArgs> TransportConnecting;\r\n\r\n        protected virtual void RaiseTransportConnecting(ITransport transport)\r\n        {\r\n            var handler = TransportConnecting;\r\n            if (handler != null) handler(this, new TransportEventArgs { Transport = transport });\r\n        }\r\n\r\n        public void OnConnecting(object sender, EventArgs args)\r\n        {\r\n            RaiseTransportConnecting(sender as ITransport);\r\n        }\r\n\r\n        public event EventHandler<TransportEventArgs> TransportConnected;\r\n\r\n        protected virtual void RaiseTransportConnected(ITransport transport)\r\n        {\r\n            var handler = TransportConnected;\r\n            if (handler != null) handler(this, new TransportEventArgs { Transport = transport });\r\n        }\r\n\r\n        public void OnConnected(object sender, EventArgs args)\r\n        {\r\n            RaiseTransportConnected(sender as ITransport);\r\n        }\r\n\r\n        public event EventHandler<TransportEventArgs> ConnectionLost;\r\n\r\n        protected virtual void RaiseConnectionLost(ITransport transport)\r\n        {\r\n            var handler = ConnectionLost;\r\n            if (handler != null) handler(this, new TransportEventArgs { Transport = transport });\r\n        }\r\n\r\n        public event EventHandler<TransportEventArgs> FileConnectionLost;\r\n\r\n        protected virtual void RaiseFileConnectionLost(ITransport transport)\r\n        {\r\n            var handler = FileConnectionLost;\r\n            if (handler != null) handler(this, new TransportEventArgs { Transport = transport });\r\n        }\r\n\r\n        public event EventHandler<TransportEventArgs> SpecialConnectionLost;\r\n\r\n        protected virtual void RaiseSpecialConnectionLost(ITransport transport)\r\n        {\r\n            var handler = SpecialConnectionLost;\r\n            if (handler != null) handler(this, new TransportEventArgs { Transport = transport });\r\n        }\r\n\r\n        private void OnConnectionLost(object sender, EventArgs e)\r\n        {\r\n            var transport = (ITransport)sender;\r\n            if (transport.MTProtoType == MTProtoTransportType.File)\r\n            {\r\n                RaiseFileConnectionLost(sender as ITransport);\r\n            }\r\n            else if (transport.MTProtoType == MTProtoTransportType.Special)\r\n            {\r\n                RaiseSpecialConnectionLost(sender as ITransport);\r\n            }\r\n            else\r\n            {\r\n                RaiseConnectionLost(sender as ITransport);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TransportEventArgs : EventArgs\r\n    {\r\n        public ITransport Transport { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/WindowsPhone/BigInteger.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Text;\r\nusing System.Threading;\r\n\r\n/*\r\nOptimization\r\n\tHave proper popcount function for IsPowerOfTwo\r\n\tUse unsafe ops to avoid bounds check\r\n\tCoreAdd could avoid some resizes by checking for equal sized array that top overflow\r\n\tFor bitwise operators, hoist the conditionals out of their main loop\r\n\tOptimize BitScanBackward\r\n\tUse a carry variable to make shift opts do half the number of array ops.\r\n\tSchoolbook multiply is O(n^2), use Karatsuba /Toom-3 for large numbers\r\n*/\r\nnamespace System.Numerics\r\n{\r\n    public struct BigInteger : IComparable, IFormattable, IComparable<BigInteger>, IEquatable<BigInteger>\r\n    {\r\n        //LSB on [0]\r\n        readonly uint[] data;\r\n        readonly short sign;\r\n\r\n        static readonly uint[] ZERO = new uint[1];\r\n        static readonly uint[] ONE = new uint[1] { 1 };\r\n\r\n        BigInteger(short sign, uint[] data)\r\n        {\r\n            this.sign = sign;\r\n            this.data = data;\r\n        }\r\n\r\n        public BigInteger(int value)\r\n        {\r\n            if (value == 0)\r\n            {\r\n                sign = 0;\r\n                data = ZERO;\r\n            }\r\n            else if (value > 0)\r\n            {\r\n                sign = 1;\r\n                data = new uint[] { (uint)value };\r\n            }\r\n            else\r\n            {\r\n                sign = -1;\r\n                data = new uint[1] { (uint)-value };\r\n            }\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public BigInteger(uint value)\r\n        {\r\n            if (value == 0)\r\n            {\r\n                sign = 0;\r\n                data = ZERO;\r\n            }\r\n            else\r\n            {\r\n                sign = 1;\r\n                data = new uint[1] { value };\r\n            }\r\n        }\r\n\r\n        public BigInteger(long value)\r\n        {\r\n            if (value == 0)\r\n            {\r\n                sign = 0;\r\n                data = ZERO;\r\n            }\r\n            else if (value > 0)\r\n            {\r\n                sign = 1;\r\n                uint low = (uint)value;\r\n                uint high = (uint)(value >> 32);\r\n\r\n                data = new uint[high != 0 ? 2 : 1];\r\n                data[0] = low;\r\n                if (high != 0)\r\n                    data[1] = high;\r\n            }\r\n            else\r\n            {\r\n                sign = -1;\r\n                value = -value;\r\n                uint low = (uint)value;\r\n                uint high = (uint)((ulong)value >> 32);\r\n\r\n                data = new uint[high != 0 ? 2 : 1];\r\n                data[0] = low;\r\n                if (high != 0)\r\n                    data[1] = high;\r\n            }\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public BigInteger(ulong value)\r\n        {\r\n            if (value == 0)\r\n            {\r\n                sign = 0;\r\n                data = ZERO;\r\n            }\r\n            else\r\n            {\r\n                sign = 1;\r\n                uint low = (uint)value;\r\n                uint high = (uint)(value >> 32);\r\n\r\n                data = new uint[high != 0 ? 2 : 1];\r\n                data[0] = low;\r\n                if (high != 0)\r\n                    data[1] = high;\r\n            }\r\n        }\r\n\r\n\r\n        static bool Negative(byte[] v)\r\n        {\r\n            return ((v[7] & 0x80) != 0);\r\n        }\r\n\r\n        static ushort Exponent(byte[] v)\r\n        {\r\n            return (ushort)((((ushort)(v[7] & 0x7F)) << (ushort)4) | (((ushort)(v[6] & 0xF0)) >> 4));\r\n        }\r\n\r\n        static ulong Mantissa(byte[] v)\r\n        {\r\n            uint i1 = ((uint)v[0] | ((uint)v[1] << 8) | ((uint)v[2] << 16) | ((uint)v[3] << 24));\r\n            uint i2 = ((uint)v[4] | ((uint)v[5] << 8) | ((uint)(v[6] & 0xF) << 16));\r\n\r\n            return (ulong)((ulong)i1 | ((ulong)i2 << 32));\r\n        }\r\n\r\n        const int bias = 1075;\r\n        public BigInteger(double value)\r\n        {\r\n            if (double.IsNaN(value) || Double.IsInfinity(value))\r\n                throw new OverflowException();\r\n\r\n            byte[] bytes = BitConverter.GetBytes(value);\r\n            ulong mantissa = Mantissa(bytes);\r\n            if (mantissa == 0)\r\n            {\r\n                // 1.0 * 2**exp, we have a power of 2\r\n                int exponent = Exponent(bytes);\r\n                if (exponent == 0)\r\n                {\r\n                    sign = 0;\r\n                    data = ZERO;\r\n                    return;\r\n                }\r\n\r\n                BigInteger res = Negative(bytes) ? MinusOne : One;\r\n                res = res << (exponent - 0x3ff);\r\n                this.sign = res.sign;\r\n                this.data = res.data;\r\n            }\r\n            else\r\n            {\r\n                // 1.mantissa * 2**exp\r\n                int exponent = Exponent(bytes);\r\n                mantissa |= 0x10000000000000ul;\r\n                BigInteger res = mantissa;\r\n                res = exponent > bias ? res << (exponent - bias) : res >> (bias - exponent);\r\n\r\n                this.sign = (short)(Negative(bytes) ? -1 : 1);\r\n                this.data = res.data;\r\n            }\r\n        }\r\n\r\n        public BigInteger(float value)\r\n            : this((double)value)\r\n        {\r\n        }\r\n\r\n        const Int32 DecimalScaleFactorMask = 0x00FF0000;\r\n        const Int32 DecimalSignMask = unchecked((Int32)0x80000000);\r\n\r\n        public BigInteger(decimal value)\r\n        {\r\n            // First truncate to get scale to 0 and extract bits\r\n            int[] bits = Decimal.GetBits(Decimal.Truncate(value));\r\n\r\n            int size = 3;\r\n            while (size > 0 && bits[size - 1] == 0) size--;\r\n\r\n            if (size == 0)\r\n            {\r\n                sign = 0;\r\n                data = ZERO;\r\n                return;\r\n            }\r\n\r\n            sign = (short)((bits[3] & DecimalSignMask) != 0 ? -1 : 1);\r\n\r\n            data = new uint[size];\r\n            data[0] = (uint)bits[0];\r\n            if (size > 1)\r\n                data[1] = (uint)bits[1];\r\n            if (size > 2)\r\n                data[2] = (uint)bits[2];\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public BigInteger(byte[] value)\r\n        {\r\n            if (value == null)\r\n                throw new ArgumentNullException(\"value\");\r\n\r\n            int len = value.Length;\r\n\r\n            if (len == 0 || (len == 1 && value[0] == 0))\r\n            {\r\n                sign = 0;\r\n                data = ZERO;\r\n                return;\r\n            }\r\n\r\n            if ((value[len - 1] & 0x80) != 0)\r\n                sign = -1;\r\n            else\r\n                sign = 1;\r\n\r\n            if (sign == 1)\r\n            {\r\n                while (value[len - 1] == 0)\r\n                {\r\n                    if (--len == 0)\r\n                    {\r\n                        sign = 0;\r\n                        data = ZERO;\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                int full_words, size;\r\n                full_words = size = len / 4;\r\n                if ((len & 0x3) != 0)\r\n                    ++size;\r\n\r\n                data = new uint[size];\r\n                int j = 0;\r\n                for (int i = 0; i < full_words; ++i)\r\n                {\r\n                    data[i] = (uint)value[j++] |\r\n                                (uint)(value[j++] << 8) |\r\n                                (uint)(value[j++] << 16) |\r\n                                (uint)(value[j++] << 24);\r\n                }\r\n                size = len & 0x3;\r\n                if (size > 0)\r\n                {\r\n                    int idx = data.Length - 1;\r\n                    for (int i = 0; i < size; ++i)\r\n                        data[idx] |= (uint)(value[j++] << (i * 8));\r\n                }\r\n            }\r\n            else\r\n            {\r\n                int full_words, size;\r\n                full_words = size = len / 4;\r\n                if ((len & 0x3) != 0)\r\n                    ++size;\r\n\r\n                data = new uint[size];\r\n\r\n                uint word, borrow = 1;\r\n                ulong sub = 0;\r\n                int j = 0;\r\n\r\n                for (int i = 0; i < full_words; ++i)\r\n                {\r\n                    word = (uint)value[j++] |\r\n                            (uint)(value[j++] << 8) |\r\n                            (uint)(value[j++] << 16) |\r\n                            (uint)(value[j++] << 24);\r\n\r\n                    sub = (ulong)word - borrow;\r\n                    word = (uint)sub;\r\n                    borrow = (uint)(sub >> 32) & 0x1u;\r\n                    data[i] = ~word;\r\n                }\r\n                size = len & 0x3;\r\n\r\n                if (size > 0)\r\n                {\r\n                    word = 0;\r\n                    uint store_mask = 0;\r\n                    for (int i = 0; i < size; ++i)\r\n                    {\r\n                        word |= (uint)(value[j++] << (i * 8));\r\n                        store_mask = (store_mask << 8) | 0xFF;\r\n                    }\r\n\r\n                    sub = word - borrow;\r\n                    word = (uint)sub;\r\n                    borrow = (uint)(sub >> 32) & 0x1u;\r\n\r\n                    data[data.Length - 1] = ~word & store_mask;\r\n                }\r\n                if (borrow != 0) //FIXME I believe this can't happen, can someone write a test for it?\r\n                    throw new Exception(\"non zero final carry\");\r\n            }\r\n\r\n        }\r\n\r\n        public bool IsEven\r\n        {\r\n            get { return sign == 0 || (data[0] & 0x1) == 0; }\r\n        }\r\n\r\n        public bool IsOne\r\n        {\r\n            get { return sign == 1 && data.Length == 1 && data[0] == 1; }\r\n        }\r\n\r\n\r\n        //Gem from Hacker's Delight\r\n        //Returns the number of bits set in @x\r\n        static int PopulationCount(uint x)\r\n        {\r\n            x = x - ((x >> 1) & 0x55555555);\r\n            x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\r\n            x = (x + (x >> 4)) & 0x0F0F0F0F;\r\n            x = x + (x >> 8);\r\n            x = x + (x >> 16);\r\n            return (int)(x & 0x0000003F);\r\n        }\r\n\r\n        public bool IsPowerOfTwo\r\n        {\r\n            get\r\n            {\r\n                bool foundBit = false;\r\n                if (sign != 1)\r\n                    return false;\r\n                //This function is pop count == 1 for positive numbers\r\n                for (int i = 0; i < data.Length; ++i)\r\n                {\r\n                    int p = PopulationCount(data[i]);\r\n                    if (p > 0)\r\n                    {\r\n                        if (p > 1 || foundBit)\r\n                            return false;\r\n                        foundBit = true;\r\n                    }\r\n                }\r\n                return foundBit;\r\n            }\r\n        }\r\n\r\n        public bool IsZero\r\n        {\r\n            get { return sign == 0; }\r\n        }\r\n\r\n        public int Sign\r\n        {\r\n            get { return sign; }\r\n        }\r\n\r\n        public static BigInteger MinusOne\r\n        {\r\n            get { return new BigInteger(-1, ONE); }\r\n        }\r\n\r\n        public static BigInteger One\r\n        {\r\n            get { return new BigInteger(1, ONE); }\r\n        }\r\n\r\n        public static BigInteger Zero\r\n        {\r\n            get { return new BigInteger(0, ZERO); }\r\n        }\r\n\r\n        public static explicit operator int(BigInteger value)\r\n        {\r\n            if (value.sign == 0)\r\n                return 0;\r\n            if (value.data.Length > 1)\r\n                throw new OverflowException();\r\n            uint data = value.data[0];\r\n\r\n            if (value.sign == 1)\r\n            {\r\n                if (data > (uint)int.MaxValue)\r\n                    throw new OverflowException();\r\n                return (int)data;\r\n            }\r\n            else if (value.sign == -1)\r\n            {\r\n                if (data > 0x80000000u)\r\n                    throw new OverflowException();\r\n                return -(int)data;\r\n            }\r\n\r\n            return 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static explicit operator uint(BigInteger value)\r\n        {\r\n            if (value.sign == 0)\r\n                return 0;\r\n            if (value.data.Length > 1 || value.sign == -1)\r\n                throw new OverflowException();\r\n            return value.data[0];\r\n        }\r\n\r\n        public static explicit operator short(BigInteger value)\r\n        {\r\n            int val = (int)value;\r\n            if (val < short.MinValue || val > short.MaxValue)\r\n                throw new OverflowException();\r\n            return (short)val;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static explicit operator ushort(BigInteger value)\r\n        {\r\n            uint val = (uint)value;\r\n            if (val > ushort.MaxValue)\r\n                throw new OverflowException();\r\n            return (ushort)val;\r\n        }\r\n\r\n        public static explicit operator byte(BigInteger value)\r\n        {\r\n            uint val = (uint)value;\r\n            if (val > byte.MaxValue)\r\n                throw new OverflowException();\r\n            return (byte)val;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static explicit operator sbyte(BigInteger value)\r\n        {\r\n            int val = (int)value;\r\n            if (val < sbyte.MinValue || val > sbyte.MaxValue)\r\n                throw new OverflowException();\r\n            return (sbyte)val;\r\n        }\r\n\r\n\r\n        public static explicit operator long(BigInteger value)\r\n        {\r\n            if (value.sign == 0)\r\n                return 0;\r\n\r\n            if (value.data.Length > 2)\r\n                throw new OverflowException();\r\n\r\n            uint low = value.data[0];\r\n\r\n            if (value.data.Length == 1)\r\n            {\r\n                if (value.sign == 1)\r\n                    return (long)low;\r\n                long res = (long)low;\r\n                return -res;\r\n            }\r\n\r\n            uint high = value.data[1];\r\n\r\n            if (value.sign == 1)\r\n            {\r\n                if (high >= 0x80000000u)\r\n                    throw new OverflowException();\r\n                return (((long)high) << 32) | low;\r\n            }\r\n\r\n            if (high > 0x80000000u)\r\n                throw new OverflowException();\r\n\r\n            return -((((long)high) << 32) | (long)low);\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static explicit operator ulong(BigInteger value)\r\n        {\r\n            if (value.sign == 0)\r\n                return 0;\r\n            if (value.data.Length > 2 || value.sign == -1)\r\n                throw new OverflowException();\r\n\r\n            uint low = value.data[0];\r\n            if (value.data.Length == 1)\r\n                return low;\r\n\r\n            uint high = value.data[1];\r\n            return (((ulong)high) << 32) | low;\r\n        }\r\n\r\n        public static explicit operator double(BigInteger value)\r\n        {\r\n            //FIXME\r\n            try\r\n            {\r\n                return double.Parse(value.ToString(),\r\n                    System.Globalization.CultureInfo.InvariantCulture.NumberFormat);\r\n            }\r\n            catch (OverflowException)\r\n            {\r\n                return value.sign == -1 ? double.NegativeInfinity : double.PositiveInfinity;\r\n            }\r\n        }\r\n\r\n        public static explicit operator float(BigInteger value)\r\n        {\r\n            //FIXME\r\n            try\r\n            {\r\n                return float.Parse(value.ToString(),\r\n                System.Globalization.CultureInfo.InvariantCulture.NumberFormat);\r\n            }\r\n            catch (OverflowException)\r\n            {\r\n                return value.sign == -1 ? float.NegativeInfinity : float.PositiveInfinity;\r\n            }\r\n        }\r\n\r\n        public static explicit operator decimal(BigInteger value)\r\n        {\r\n            if (value.sign == 0)\r\n                return Decimal.Zero;\r\n\r\n            uint[] data = value.data;\r\n            if (data.Length > 3)\r\n                throw new OverflowException();\r\n\r\n            int lo = 0, mi = 0, hi = 0;\r\n            if (data.Length > 2)\r\n                hi = (Int32)data[2];\r\n            if (data.Length > 1)\r\n                mi = (Int32)data[1];\r\n            if (data.Length > 0)\r\n                lo = (Int32)data[0];\r\n\r\n            return new Decimal(lo, mi, hi, value.sign < 0, 0);\r\n        }\r\n\r\n        public static implicit operator BigInteger(int value)\r\n        {\r\n            return new BigInteger(value);\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static implicit operator BigInteger(uint value)\r\n        {\r\n            return new BigInteger(value);\r\n        }\r\n\r\n        public static implicit operator BigInteger(short value)\r\n        {\r\n            return new BigInteger(value);\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static implicit operator BigInteger(ushort value)\r\n        {\r\n            return new BigInteger(value);\r\n        }\r\n\r\n        public static implicit operator BigInteger(byte value)\r\n        {\r\n            return new BigInteger(value);\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static implicit operator BigInteger(sbyte value)\r\n        {\r\n            return new BigInteger(value);\r\n        }\r\n\r\n        public static implicit operator BigInteger(long value)\r\n        {\r\n            return new BigInteger(value);\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static implicit operator BigInteger(ulong value)\r\n        {\r\n            return new BigInteger(value);\r\n        }\r\n\r\n        public static explicit operator BigInteger(double value)\r\n        {\r\n            return new BigInteger(value);\r\n        }\r\n\r\n        public static explicit operator BigInteger(float value)\r\n        {\r\n            return new BigInteger(value);\r\n        }\r\n\r\n        public static explicit operator BigInteger(decimal value)\r\n        {\r\n            return new BigInteger(value);\r\n        }\r\n\r\n        public static BigInteger operator +(BigInteger left, BigInteger right)\r\n        {\r\n            if (left.sign == 0)\r\n                return right;\r\n            if (right.sign == 0)\r\n                return left;\r\n\r\n            if (left.sign == right.sign)\r\n                return new BigInteger(left.sign, CoreAdd(left.data, right.data));\r\n\r\n            int r = CoreCompare(left.data, right.data);\r\n\r\n            if (r == 0)\r\n                return new BigInteger(0, ZERO);\r\n\r\n            if (r > 0) //left > right\r\n                return new BigInteger(left.sign, CoreSub(left.data, right.data));\r\n\r\n            return new BigInteger(right.sign, CoreSub(right.data, left.data));\r\n        }\r\n\r\n        public static BigInteger operator -(BigInteger left, BigInteger right)\r\n        {\r\n            if (right.sign == 0)\r\n                return left;\r\n            if (left.sign == 0)\r\n                return new BigInteger((short)-right.sign, right.data);\r\n\r\n            if (left.sign == right.sign)\r\n            {\r\n                int r = CoreCompare(left.data, right.data);\r\n\r\n                if (r == 0)\r\n                    return new BigInteger(0, ZERO);\r\n\r\n                if (r > 0) //left > right\r\n                    return new BigInteger(left.sign, CoreSub(left.data, right.data));\r\n\r\n                return new BigInteger((short)-right.sign, CoreSub(right.data, left.data));\r\n            }\r\n\r\n            return new BigInteger(left.sign, CoreAdd(left.data, right.data));\r\n        }\r\n\r\n        public static BigInteger operator *(BigInteger left, BigInteger right)\r\n        {\r\n            if (left.sign == 0 || right.sign == 0)\r\n                return new BigInteger(0, ZERO);\r\n\r\n            if (left.data[0] == 1 && left.data.Length == 1)\r\n            {\r\n                if (left.sign == 1)\r\n                    return right;\r\n                return new BigInteger((short)-right.sign, right.data);\r\n            }\r\n\r\n            if (right.data[0] == 1 && right.data.Length == 1)\r\n            {\r\n                if (right.sign == 1)\r\n                    return left;\r\n                return new BigInteger((short)-left.sign, left.data);\r\n            }\r\n\r\n            uint[] a = left.data;\r\n            uint[] b = right.data;\r\n\r\n            uint[] res = new uint[a.Length + b.Length];\r\n\r\n            for (int i = 0; i < a.Length; ++i)\r\n            {\r\n                uint ai = a[i];\r\n                int k = i;\r\n\r\n                ulong carry = 0;\r\n                for (int j = 0; j < b.Length; ++j)\r\n                {\r\n                    carry = carry + ((ulong)ai) * b[j] + res[k];\r\n                    res[k++] = (uint)carry;\r\n                    carry >>= 32;\r\n                }\r\n\r\n                while (carry != 0)\r\n                {\r\n                    carry += res[k];\r\n                    res[k++] = (uint)carry;\r\n                    carry >>= 32;\r\n                }\r\n            }\r\n\r\n            int m;\r\n            for (m = res.Length - 1; m >= 0 && res[m] == 0; --m) ;\r\n            if (m < res.Length - 1)\r\n                res = Resize(res, m + 1);\r\n\r\n            return new BigInteger((short)(left.sign * right.sign), res);\r\n        }\r\n\r\n        public static BigInteger operator /(BigInteger dividend, BigInteger divisor)\r\n        {\r\n            if (divisor.sign == 0)\r\n                throw new DivideByZeroException();\r\n\r\n            if (dividend.sign == 0)\r\n                return dividend;\r\n\r\n            uint[] quotient;\r\n            uint[] remainder_value;\r\n\r\n            DivModUnsigned(dividend.data, divisor.data, out quotient, out remainder_value);\r\n\r\n            int i;\r\n            for (i = quotient.Length - 1; i >= 0 && quotient[i] == 0; --i) ;\r\n            if (i == -1)\r\n                return new BigInteger(0, ZERO);\r\n            if (i < quotient.Length - 1)\r\n                quotient = Resize(quotient, i + 1);\r\n\r\n            return new BigInteger((short)(dividend.sign * divisor.sign), quotient);\r\n        }\r\n\r\n        public static BigInteger operator %(BigInteger dividend, BigInteger divisor)\r\n        {\r\n            if (divisor.sign == 0)\r\n                throw new DivideByZeroException();\r\n\r\n            if (dividend.sign == 0)\r\n                return dividend;\r\n\r\n            uint[] quotient;\r\n            uint[] remainder_value;\r\n\r\n            DivModUnsigned(dividend.data, divisor.data, out quotient, out remainder_value);\r\n\r\n            int i;\r\n            for (i = remainder_value.Length - 1; i >= 0 && remainder_value[i] == 0; --i) ;\r\n            if (i == -1)\r\n                return new BigInteger(0, ZERO);\r\n\r\n            if (i < remainder_value.Length - 1)\r\n                remainder_value = Resize(remainder_value, i + 1);\r\n            return new BigInteger(dividend.sign, remainder_value);\r\n        }\r\n\r\n        public static BigInteger operator -(BigInteger value)\r\n        {\r\n            if (value.sign == 0)\r\n                return value;\r\n            return new BigInteger((short)-value.sign, value.data);\r\n        }\r\n\r\n        public static BigInteger operator +(BigInteger value)\r\n        {\r\n            return value;\r\n        }\r\n\r\n        public static BigInteger operator ++(BigInteger value)\r\n        {\r\n            if (value.sign == 0)\r\n                return One;\r\n\r\n            short sign = value.sign;\r\n            uint[] data = value.data;\r\n            if (data.Length == 1)\r\n            {\r\n                if (sign == -1 && data[0] == 1)\r\n                    return new BigInteger(0, ZERO);\r\n                if (sign == 0)\r\n                    return new BigInteger(1, ONE);\r\n            }\r\n\r\n            if (sign == -1)\r\n                data = CoreSub(data, 1);\r\n            else\r\n                data = CoreAdd(data, 1);\r\n\r\n            return new BigInteger(sign, data);\r\n        }\r\n\r\n        public static BigInteger operator --(BigInteger value)\r\n        {\r\n            if (value.sign == 0)\r\n                return MinusOne;\r\n\r\n            short sign = value.sign;\r\n            uint[] data = value.data;\r\n            if (data.Length == 1)\r\n            {\r\n                if (sign == 1 && data[0] == 1)\r\n                    return new BigInteger(0, ZERO);\r\n                if (sign == 0)\r\n                    return new BigInteger(-1, ONE);\r\n            }\r\n\r\n            if (sign == -1)\r\n                data = CoreAdd(data, 1);\r\n            else\r\n                data = CoreSub(data, 1);\r\n\r\n            return new BigInteger(sign, data);\r\n        }\r\n\r\n        public static BigInteger operator &(BigInteger left, BigInteger right)\r\n        {\r\n            if (left.sign == 0)\r\n                return left;\r\n\r\n            if (right.sign == 0)\r\n                return right;\r\n\r\n            uint[] a = left.data;\r\n            uint[] b = right.data;\r\n            int ls = left.sign;\r\n            int rs = right.sign;\r\n\r\n            bool neg_res = (ls == rs) && (ls == -1);\r\n\r\n            uint[] result = new uint[Math.Max(a.Length, b.Length)];\r\n\r\n            ulong ac = 1, bc = 1, borrow = 1;\r\n\r\n            int i;\r\n            for (i = 0; i < result.Length; ++i)\r\n            {\r\n                uint va = 0;\r\n                if (i < a.Length)\r\n                    va = a[i];\r\n                if (ls == -1)\r\n                {\r\n                    ac = ~va + ac;\r\n                    va = (uint)ac;\r\n                    ac = (uint)(ac >> 32);\r\n                }\r\n\r\n                uint vb = 0;\r\n                if (i < b.Length)\r\n                    vb = b[i];\r\n                if (rs == -1)\r\n                {\r\n                    bc = ~vb + bc;\r\n                    vb = (uint)bc;\r\n                    bc = (uint)(bc >> 32);\r\n                }\r\n\r\n                uint word = va & vb;\r\n\r\n                if (neg_res)\r\n                {\r\n                    borrow = word - borrow;\r\n                    word = ~(uint)borrow;\r\n                    borrow = (uint)(borrow >> 32) & 0x1u;\r\n                }\r\n\r\n                result[i] = word;\r\n            }\r\n\r\n            for (i = result.Length - 1; i >= 0 && result[i] == 0; --i) ;\r\n            if (i == -1)\r\n                return new BigInteger(0, ZERO);\r\n\r\n            if (i < result.Length - 1)\r\n                result = Resize(result, i + 1);\r\n\r\n            return new BigInteger(neg_res ? (short)-1 : (short)1, result);\r\n        }\r\n\r\n        public static BigInteger operator |(BigInteger left, BigInteger right)\r\n        {\r\n            if (left.sign == 0)\r\n                return right;\r\n\r\n            if (right.sign == 0)\r\n                return left;\r\n\r\n            uint[] a = left.data;\r\n            uint[] b = right.data;\r\n            int ls = left.sign;\r\n            int rs = right.sign;\r\n\r\n            bool neg_res = (ls == -1) || (rs == -1);\r\n\r\n            uint[] result = new uint[Math.Max(a.Length, b.Length)];\r\n\r\n            ulong ac = 1, bc = 1, borrow = 1;\r\n\r\n            int i;\r\n            for (i = 0; i < result.Length; ++i)\r\n            {\r\n                uint va = 0;\r\n                if (i < a.Length)\r\n                    va = a[i];\r\n                if (ls == -1)\r\n                {\r\n                    ac = ~va + ac;\r\n                    va = (uint)ac;\r\n                    ac = (uint)(ac >> 32);\r\n                }\r\n\r\n                uint vb = 0;\r\n                if (i < b.Length)\r\n                    vb = b[i];\r\n                if (rs == -1)\r\n                {\r\n                    bc = ~vb + bc;\r\n                    vb = (uint)bc;\r\n                    bc = (uint)(bc >> 32);\r\n                }\r\n\r\n                uint word = va | vb;\r\n\r\n                if (neg_res)\r\n                {\r\n                    borrow = word - borrow;\r\n                    word = ~(uint)borrow;\r\n                    borrow = (uint)(borrow >> 32) & 0x1u;\r\n                }\r\n\r\n                result[i] = word;\r\n            }\r\n\r\n            for (i = result.Length - 1; i >= 0 && result[i] == 0; --i) ;\r\n            if (i == -1)\r\n                return new BigInteger(0, ZERO);\r\n\r\n            if (i < result.Length - 1)\r\n                result = Resize(result, i + 1);\r\n\r\n            return new BigInteger(neg_res ? (short)-1 : (short)1, result);\r\n        }\r\n\r\n        public static BigInteger operator ^(BigInteger left, BigInteger right)\r\n        {\r\n            if (left.sign == 0)\r\n                return right;\r\n\r\n            if (right.sign == 0)\r\n                return left;\r\n\r\n            uint[] a = left.data;\r\n            uint[] b = right.data;\r\n            int ls = left.sign;\r\n            int rs = right.sign;\r\n\r\n            bool neg_res = (ls == -1) ^ (rs == -1);\r\n\r\n            uint[] result = new uint[Math.Max(a.Length, b.Length)];\r\n\r\n            ulong ac = 1, bc = 1, borrow = 1;\r\n\r\n            int i;\r\n            for (i = 0; i < result.Length; ++i)\r\n            {\r\n                uint va = 0;\r\n                if (i < a.Length)\r\n                    va = a[i];\r\n                if (ls == -1)\r\n                {\r\n                    ac = ~va + ac;\r\n                    va = (uint)ac;\r\n                    ac = (uint)(ac >> 32);\r\n                }\r\n\r\n                uint vb = 0;\r\n                if (i < b.Length)\r\n                    vb = b[i];\r\n                if (rs == -1)\r\n                {\r\n                    bc = ~vb + bc;\r\n                    vb = (uint)bc;\r\n                    bc = (uint)(bc >> 32);\r\n                }\r\n\r\n                uint word = va ^ vb;\r\n\r\n                if (neg_res)\r\n                {\r\n                    borrow = word - borrow;\r\n                    word = ~(uint)borrow;\r\n                    borrow = (uint)(borrow >> 32) & 0x1u;\r\n                }\r\n\r\n                result[i] = word;\r\n            }\r\n\r\n            for (i = result.Length - 1; i >= 0 && result[i] == 0; --i) ;\r\n            if (i == -1)\r\n                return new BigInteger(0, ZERO);\r\n\r\n            if (i < result.Length - 1)\r\n                result = Resize(result, i + 1);\r\n\r\n            return new BigInteger(neg_res ? (short)-1 : (short)1, result);\r\n        }\r\n\r\n        public static BigInteger operator ~(BigInteger value)\r\n        {\r\n            if (value.sign == 0)\r\n                return new BigInteger(-1, ONE);\r\n\r\n            uint[] data = value.data;\r\n            int sign = value.sign;\r\n\r\n            bool neg_res = sign == 1;\r\n\r\n            uint[] result = new uint[data.Length];\r\n\r\n            ulong carry = 1, borrow = 1;\r\n\r\n            int i;\r\n            for (i = 0; i < result.Length; ++i)\r\n            {\r\n                uint word = data[i];\r\n                if (sign == -1)\r\n                {\r\n                    carry = ~word + carry;\r\n                    word = (uint)carry;\r\n                    carry = (uint)(carry >> 32);\r\n                }\r\n\r\n                word = ~word;\r\n\r\n                if (neg_res)\r\n                {\r\n                    borrow = word - borrow;\r\n                    word = ~(uint)borrow;\r\n                    borrow = (uint)(borrow >> 32) & 0x1u;\r\n                }\r\n\r\n                result[i] = word;\r\n            }\r\n\r\n            for (i = result.Length - 1; i >= 0 && result[i] == 0; --i) ;\r\n            if (i == -1)\r\n                return new BigInteger(0, ZERO);\r\n\r\n            if (i < result.Length - 1)\r\n                result = Resize(result, i + 1);\r\n\r\n            return new BigInteger(neg_res ? (short)-1 : (short)1, result);\r\n        }\r\n\r\n        //returns the 0-based index of the most significant set bit\r\n        //returns 0 if no bit is set, so extra care when using it\r\n        static int BitScanBackward(uint word)\r\n        {\r\n            for (int i = 31; i >= 0; --i)\r\n            {\r\n                uint mask = 1u << i;\r\n                if ((word & mask) == mask)\r\n                    return i;\r\n            }\r\n            return 0;\r\n        }\r\n\r\n        public static BigInteger operator <<(BigInteger value, int shift)\r\n        {\r\n            if (shift == 0 || value.sign == 0)\r\n                return value;\r\n            if (shift < 0)\r\n                return value >> -shift;\r\n\r\n            uint[] data = value.data;\r\n            int sign = value.sign;\r\n\r\n            int topMostIdx = BitScanBackward(data[data.Length - 1]);\r\n            int bits = shift - (31 - topMostIdx);\r\n            int extra_words = (bits >> 5) + ((bits & 0x1F) != 0 ? 1 : 0);\r\n\r\n            uint[] res = new uint[data.Length + extra_words];\r\n\r\n            int idx_shift = shift >> 5;\r\n            int bit_shift = shift & 0x1F;\r\n            int carry_shift = 32 - bit_shift;\r\n\r\n            if (carry_shift == 32)\r\n            {\r\n                for (int i = 0; i < data.Length; ++i)\r\n                {\r\n                    uint word = data[i];\r\n                    res[i + idx_shift] |= word << bit_shift;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                for (int i = 0; i < data.Length; ++i)\r\n                {\r\n                    uint word = data[i];\r\n                    res[i + idx_shift] |= word << bit_shift;\r\n                    if (i + idx_shift + 1 < res.Length)\r\n                        res[i + idx_shift + 1] = word >> carry_shift;\r\n                }\r\n            }\r\n\r\n            return new BigInteger((short)sign, res);\r\n        }\r\n\r\n        public static BigInteger operator >>(BigInteger value, int shift)\r\n        {\r\n            if (shift == 0 || value.sign == 0)\r\n                return value;\r\n            if (shift < 0)\r\n                return value << -shift;\r\n\r\n            uint[] data = value.data;\r\n            int sign = value.sign;\r\n\r\n            int topMostIdx = BitScanBackward(data[data.Length - 1]);\r\n            int idx_shift = shift >> 5;\r\n            int bit_shift = shift & 0x1F;\r\n\r\n            int extra_words = idx_shift;\r\n            if (bit_shift > topMostIdx)\r\n                ++extra_words;\r\n            int size = data.Length - extra_words;\r\n\r\n            if (size <= 0)\r\n            {\r\n                if (sign == 1)\r\n                    return new BigInteger(0, ZERO);\r\n                return new BigInteger(-1, ONE);\r\n            }\r\n\r\n            uint[] res = new uint[size];\r\n            int carry_shift = 32 - bit_shift;\r\n\r\n            if (carry_shift == 32)\r\n            {\r\n                for (int i = data.Length - 1; i >= idx_shift; --i)\r\n                {\r\n                    uint word = data[i];\r\n\r\n                    if (i - idx_shift < res.Length)\r\n                        res[i - idx_shift] |= word >> bit_shift;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                for (int i = data.Length - 1; i >= idx_shift; --i)\r\n                {\r\n                    uint word = data[i];\r\n\r\n                    if (i - idx_shift < res.Length)\r\n                        res[i - idx_shift] |= word >> bit_shift;\r\n                    if (i - idx_shift - 1 >= 0)\r\n                        res[i - idx_shift - 1] = word << carry_shift;\r\n                }\r\n\r\n            }\r\n\r\n            //Round down instead of toward zero\r\n            if (sign == -1)\r\n            {\r\n                for (int i = 0; i < idx_shift; i++)\r\n                {\r\n                    if (data[i] != 0u)\r\n                    {\r\n                        var tmp = new BigInteger((short)sign, res);\r\n                        --tmp;\r\n                        return tmp;\r\n                    }\r\n                }\r\n                if (bit_shift > 0 && (data[idx_shift] << carry_shift) != 0u)\r\n                {\r\n                    var tmp = new BigInteger((short)sign, res);\r\n                    --tmp;\r\n                    return tmp;\r\n                }\r\n            }\r\n            return new BigInteger((short)sign, res);\r\n        }\r\n\r\n        public static bool operator <(BigInteger left, BigInteger right)\r\n        {\r\n            return Compare(left, right) < 0;\r\n        }\r\n\r\n        public static bool operator <(BigInteger left, long right)\r\n        {\r\n            return left.CompareTo(right) < 0;\r\n        }\r\n\r\n\r\n        public static bool operator <(long left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) > 0;\r\n        }\r\n\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator <(BigInteger left, ulong right)\r\n        {\r\n            return left.CompareTo(right) < 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator <(ulong left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) > 0;\r\n        }\r\n\r\n        public static bool operator <=(BigInteger left, BigInteger right)\r\n        {\r\n            return Compare(left, right) <= 0;\r\n        }\r\n\r\n        public static bool operator <=(BigInteger left, long right)\r\n        {\r\n            return left.CompareTo(right) <= 0;\r\n        }\r\n\r\n        public static bool operator <=(long left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) >= 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator <=(BigInteger left, ulong right)\r\n        {\r\n            return left.CompareTo(right) <= 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator <=(ulong left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) >= 0;\r\n        }\r\n\r\n        public static bool operator >(BigInteger left, BigInteger right)\r\n        {\r\n            return Compare(left, right) > 0;\r\n        }\r\n\r\n        public static bool operator >(BigInteger left, long right)\r\n        {\r\n            return left.CompareTo(right) > 0;\r\n        }\r\n\r\n        public static bool operator >(long left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) < 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator >(BigInteger left, ulong right)\r\n        {\r\n            return left.CompareTo(right) > 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator >(ulong left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) < 0;\r\n        }\r\n\r\n        public static bool operator >=(BigInteger left, BigInteger right)\r\n        {\r\n            return Compare(left, right) >= 0;\r\n        }\r\n\r\n        public static bool operator >=(BigInteger left, long right)\r\n        {\r\n            return left.CompareTo(right) >= 0;\r\n        }\r\n\r\n        public static bool operator >=(long left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) <= 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator >=(BigInteger left, ulong right)\r\n        {\r\n            return left.CompareTo(right) >= 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator >=(ulong left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) <= 0;\r\n        }\r\n\r\n        public static bool operator ==(BigInteger left, BigInteger right)\r\n        {\r\n            return Compare(left, right) == 0;\r\n        }\r\n\r\n        public static bool operator ==(BigInteger left, long right)\r\n        {\r\n            return left.CompareTo(right) == 0;\r\n        }\r\n\r\n        public static bool operator ==(long left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) == 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator ==(BigInteger left, ulong right)\r\n        {\r\n            return left.CompareTo(right) == 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator ==(ulong left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) == 0;\r\n        }\r\n\r\n        public static bool operator !=(BigInteger left, BigInteger right)\r\n        {\r\n            return Compare(left, right) != 0;\r\n        }\r\n\r\n        public static bool operator !=(BigInteger left, long right)\r\n        {\r\n            return left.CompareTo(right) != 0;\r\n        }\r\n\r\n        public static bool operator !=(long left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) != 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator !=(BigInteger left, ulong right)\r\n        {\r\n            return left.CompareTo(right) != 0;\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public static bool operator !=(ulong left, BigInteger right)\r\n        {\r\n            return right.CompareTo(left) != 0;\r\n        }\r\n\r\n        public override bool Equals(object obj)\r\n        {\r\n            if (!(obj is BigInteger))\r\n                return false;\r\n            return Equals((BigInteger)obj);\r\n        }\r\n\r\n        public bool Equals(BigInteger other)\r\n        {\r\n            if (sign != other.sign)\r\n                return false;\r\n\r\n            int alen = data != null ? data.Length : 0;\r\n            int blen = other.data != null ? other.data.Length : 0;\r\n\r\n            if (alen != blen)\r\n                return false;\r\n            for (int i = 0; i < alen; ++i)\r\n            {\r\n                if (data[i] != other.data[i])\r\n                    return false;\r\n            }\r\n            return true;\r\n        }\r\n\r\n        public bool Equals(long other)\r\n        {\r\n            return CompareTo(other) == 0;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return ToString(10, null);\r\n        }\r\n\r\n        string ToStringWithPadding(string format, uint radix, IFormatProvider provider)\r\n        {\r\n            if (format.Length > 1)\r\n            {\r\n                int precision = Convert.ToInt32(format.Substring(1), CultureInfo.InvariantCulture.NumberFormat);\r\n                string baseStr = ToString(radix, provider);\r\n                if (baseStr.Length < precision)\r\n                {\r\n                    string additional = new String('0', precision - baseStr.Length);\r\n                    if (baseStr[0] != '-')\r\n                    {\r\n                        return additional + baseStr;\r\n                    }\r\n                    else\r\n                    {\r\n                        return \"-\" + additional + baseStr.Substring(1);\r\n                    }\r\n                }\r\n                return baseStr;\r\n            }\r\n            return ToString(radix, provider);\r\n        }\r\n\r\n        public string ToString(string format)\r\n        {\r\n            return ToString(format, null);\r\n        }\r\n\r\n        public string ToString(IFormatProvider provider)\r\n        {\r\n            return ToString(null, provider);\r\n        }\r\n\r\n\r\n        public string ToString(string format, IFormatProvider provider)\r\n        {\r\n            if (format == null || format == \"\")\r\n                return ToString(10, provider);\r\n\r\n            switch (format[0])\r\n            {\r\n                case 'd':\r\n                case 'D':\r\n                case 'g':\r\n                case 'G':\r\n                case 'r':\r\n                case 'R':\r\n                    return ToStringWithPadding(format, 10, provider);\r\n                case 'x':\r\n                case 'X':\r\n                    return ToStringWithPadding(format, 16, null);\r\n                default:\r\n                    throw new FormatException(string.Format(\"format '{0}' not implemented\", format));\r\n            }\r\n        }\r\n\r\n        static uint[] MakeTwoComplement(uint[] v)\r\n        {\r\n            uint[] res = new uint[v.Length];\r\n\r\n            ulong carry = 1;\r\n            for (int i = 0; i < v.Length; ++i)\r\n            {\r\n                uint word = v[i];\r\n                carry = (ulong)~word + carry;\r\n                word = (uint)carry;\r\n                carry = (uint)(carry >> 32);\r\n                res[i] = word;\r\n            }\r\n\r\n            uint last = res[res.Length - 1];\r\n            int idx = FirstNonFFByte(last);\r\n            uint mask = 0xFF;\r\n            for (int i = 1; i < idx; ++i)\r\n                mask = (mask << 8) | 0xFF;\r\n\r\n            res[res.Length - 1] = last & mask;\r\n            return res;\r\n        }\r\n\r\n        string ToString(uint radix, IFormatProvider provider)\r\n        {\r\n            const string characterSet = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n\r\n            if (characterSet.Length < radix)\r\n                throw new ArgumentException(\"charSet length less than radix\", \"characterSet\");\r\n            if (radix == 1)\r\n                throw new ArgumentException(\"There is no such thing as radix one notation\", \"radix\");\r\n\r\n            if (sign == 0)\r\n                return \"0\";\r\n            if (data.Length == 1 && data[0] == 1)\r\n                return sign == 1 ? \"1\" : \"-1\";\r\n\r\n            List<char> digits = new List<char>(1 + data.Length * 3 / 10);\r\n\r\n            BigInteger a;\r\n            if (sign == 1)\r\n                a = this;\r\n            else\r\n            {\r\n                uint[] dt = data;\r\n                if (radix > 10)\r\n                    dt = MakeTwoComplement(dt);\r\n                a = new BigInteger(1, dt);\r\n            }\r\n\r\n            while (a != 0)\r\n            {\r\n                BigInteger rem;\r\n                a = DivRem(a, radix, out rem);\r\n                digits.Add(characterSet[(int)rem]);\r\n            }\r\n\r\n            if (sign == -1 && radix == 10)\r\n            {\r\n                NumberFormatInfo info = null;\r\n                if (provider != null)\r\n                    info = provider.GetFormat(typeof(NumberFormatInfo)) as NumberFormatInfo;\r\n                if (info != null)\r\n                {\r\n                    string str = info.NegativeSign;\r\n                    for (int i = str.Length - 1; i >= 0; --i)\r\n                        digits.Add(str[i]);\r\n                }\r\n                else\r\n                {\r\n                    digits.Add('-');\r\n                }\r\n            }\r\n\r\n            char last = digits[digits.Count - 1];\r\n            if (sign == 1 && radix > 10 && (last < '0' || last > '9'))\r\n                digits.Add('0');\r\n\r\n            digits.Reverse();\r\n\r\n            return new String(digits.ToArray());\r\n        }\r\n\r\n#if NET_4_0\r\n\t\t[MonoTODO]\r\n\t\tpublic static BigInteger Parse (string value, NumberStyles style)\r\n\t\t{\r\n\t\t\tthrow new NotImplementedException ();\r\n\t\t}\r\n\r\n\t\t[MonoTODO]\r\n\t\tpublic static BigInteger Parse (string value, IFormatProvider provider)\r\n\t\t{\r\n\t\t\tthrow new NotImplementedException ();\r\n\t\t}\r\n\r\n\t\t[MonoTODO]\r\n\t\tpublic static BigInteger Parse (\r\n\t\t\tstring value, NumberStyles style, IFormatProvider provider)\r\n\t\t{\r\n\t\t\tthrow new InvalidOperationException ();\r\n\t\t}\r\n\t\t\r\n\t\t[MonoTODO]\r\n\t\tpublic static bool TryParse (\r\n\t\t\tstring value, NumberStyles style, IFormatProvider provider,\r\n\t\t\tout BigInteger result)\r\n\t\t{\r\n\t\t\tthrow new NotImplementedException ();\r\n\t\t}\r\n#endif\r\n\r\n\r\n        static Exception GetFormatException()\r\n        {\r\n            return new FormatException(\"Input string was not in the correct format\");\r\n        }\r\n\r\n        static bool ProcessTrailingWhitespace(bool tryParse, string s, int position, ref Exception exc)\r\n        {\r\n            int len = s.Length;\r\n\r\n            for (int i = position; i < len; i++)\r\n            {\r\n                char c = s[i];\r\n\r\n                if (c != 0 && !Char.IsWhiteSpace(c))\r\n                {\r\n                    if (!tryParse)\r\n                        exc = GetFormatException();\r\n                    return false;\r\n                }\r\n            }\r\n            return true;\r\n        }\r\n\r\n        public static BigInteger Min(BigInteger left, BigInteger right)\r\n        {\r\n            int ls = left.sign;\r\n            int rs = right.sign;\r\n\r\n            if (ls < rs)\r\n                return left;\r\n            if (rs < ls)\r\n                return right;\r\n\r\n            int r = CoreCompare(left.data, right.data);\r\n            if (ls == -1)\r\n                r = -r;\r\n\r\n            if (r <= 0)\r\n                return left;\r\n            return right;\r\n        }\r\n\r\n\r\n        public static BigInteger Max(BigInteger left, BigInteger right)\r\n        {\r\n            int ls = left.sign;\r\n            int rs = right.sign;\r\n\r\n            if (ls > rs)\r\n                return left;\r\n            if (rs > ls)\r\n                return right;\r\n\r\n            int r = CoreCompare(left.data, right.data);\r\n            if (ls == -1)\r\n                r = -r;\r\n\r\n            if (r >= 0)\r\n                return left;\r\n            return right;\r\n        }\r\n\r\n        public static BigInteger Abs(BigInteger value)\r\n        {\r\n            return new BigInteger((short)Math.Abs(value.sign), value.data);\r\n        }\r\n\r\n\r\n        public static BigInteger DivRem(BigInteger dividend, BigInteger divisor, out BigInteger remainder)\r\n        {\r\n            if (divisor.sign == 0)\r\n                throw new DivideByZeroException();\r\n\r\n            if (dividend.sign == 0)\r\n            {\r\n                remainder = dividend;\r\n                return dividend;\r\n            }\r\n\r\n            uint[] quotient;\r\n            uint[] remainder_value;\r\n\r\n            DivModUnsigned(dividend.data, divisor.data, out quotient, out remainder_value);\r\n\r\n            int i;\r\n            for (i = remainder_value.Length - 1; i >= 0 && remainder_value[i] == 0; --i) ;\r\n            if (i == -1)\r\n            {\r\n                remainder = new BigInteger(0, ZERO);\r\n            }\r\n            else\r\n            {\r\n                if (i < remainder_value.Length - 1)\r\n                    remainder_value = Resize(remainder_value, i + 1);\r\n                remainder = new BigInteger(dividend.sign, remainder_value);\r\n            }\r\n\r\n            for (i = quotient.Length - 1; i >= 0 && quotient[i] == 0; --i) ;\r\n            if (i == -1)\r\n                return new BigInteger(0, ZERO);\r\n            if (i < quotient.Length - 1)\r\n                quotient = Resize(quotient, i + 1);\r\n\r\n            return new BigInteger((short)(dividend.sign * divisor.sign), quotient);\r\n        }\r\n\r\n        public static BigInteger Pow(BigInteger value, int exponent)\r\n        {\r\n            if (exponent < 0)\r\n                throw new ArgumentOutOfRangeException(\"exponent\", \"exp must be >= 0\");\r\n            if (exponent == 0)\r\n                return One;\r\n            if (exponent == 1)\r\n                return value;\r\n\r\n            BigInteger result = One;\r\n            while (exponent != 0)\r\n            {\r\n                if ((exponent & 1) != 0)\r\n                    result = result * value;\r\n                if (exponent == 1)\r\n                    break;\r\n\r\n                value = value * value;\r\n                exponent >>= 1;\r\n            }\r\n            return result;\r\n        }\r\n\r\n        public static BigInteger ModPow(BigInteger value, BigInteger exponent, BigInteger modulus)\r\n        {\r\n            if (exponent.sign == -1)\r\n                throw new ArgumentOutOfRangeException(\"exponent\", \"power must be >= 0\");\r\n            if (modulus.sign == 0)\r\n                throw new DivideByZeroException();\r\n\r\n            BigInteger result = One % modulus;\r\n            while (exponent.sign != 0)\r\n            {\r\n                if (!exponent.IsEven)\r\n                {\r\n                    result = result * value;\r\n                    result = result % modulus;\r\n                }\r\n                if (exponent.IsOne)\r\n                    break;\r\n                value = value * value;\r\n                value = value % modulus;\r\n                exponent >>= 1;\r\n            }\r\n            return result;\r\n        }\r\n\r\n        public static BigInteger GreatestCommonDivisor(BigInteger left, BigInteger right)\r\n        {\r\n            if (left.sign != 0 && left.data.Length == 1 && left.data[0] == 1)\r\n                return new BigInteger(1, ONE);\r\n            if (right.sign != 0 && right.data.Length == 1 && right.data[0] == 1)\r\n                return new BigInteger(1, ONE);\r\n            if (left.IsZero)\r\n                return Abs(right);\r\n            if (right.IsZero)\r\n                return Abs(left);\r\n\r\n            BigInteger x = new BigInteger(1, left.data);\r\n            BigInteger y = new BigInteger(1, right.data);\r\n\r\n            BigInteger g = y;\r\n\r\n            while (x.data.Length > 1)\r\n            {\r\n                g = x;\r\n                x = y % x;\r\n                y = g;\r\n\r\n            }\r\n            if (x.IsZero) return g;\r\n\r\n            // TODO: should we have something here if we can convert to long?\r\n\r\n            //\r\n            // Now we can just do it with single precision. I am using the binary gcd method,\r\n            // as it should be faster.\r\n            //\r\n\r\n            uint yy = x.data[0];\r\n            uint xx = (uint)(y % yy);\r\n\r\n            int t = 0;\r\n\r\n            while (((xx | yy) & 1) == 0)\r\n            {\r\n                xx >>= 1; yy >>= 1; t++;\r\n            }\r\n            while (xx != 0)\r\n            {\r\n                while ((xx & 1) == 0) xx >>= 1;\r\n                while ((yy & 1) == 0) yy >>= 1;\r\n                if (xx >= yy)\r\n                    xx = (xx - yy) >> 1;\r\n                else\r\n                    yy = (yy - xx) >> 1;\r\n            }\r\n\r\n            return yy << t;\r\n        }\r\n\r\n        /*LAMESPEC Log doesn't specify to how many ulp is has to be precise\r\n        We are equilavent to MS with about 2 ULP\r\n        */\r\n        public static double Log(BigInteger value, Double baseValue)\r\n        {\r\n            if (value.sign == -1 || baseValue == 1.0d || baseValue == -1.0d ||\r\n                    baseValue == Double.NegativeInfinity || double.IsNaN(baseValue))\r\n                return double.NaN;\r\n\r\n            if (baseValue == 0.0d || baseValue == Double.PositiveInfinity)\r\n                return value.IsOne ? 0 : double.NaN;\r\n\r\n            if (value.sign == 0)\r\n                return double.NegativeInfinity;\r\n\r\n            int length = value.data.Length - 1;\r\n            int bitCount = -1;\r\n            for (int curBit = 31; curBit >= 0; curBit--)\r\n            {\r\n                if ((value.data[length] & (1 << curBit)) != 0)\r\n                {\r\n                    bitCount = curBit + length * 32;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            long bitlen = bitCount;\r\n            Double c = 0, d = 1;\r\n\r\n            BigInteger testBit = One;\r\n            long tempBitlen = bitlen;\r\n            while (tempBitlen > Int32.MaxValue)\r\n            {\r\n                testBit = testBit << Int32.MaxValue;\r\n                tempBitlen -= Int32.MaxValue;\r\n            }\r\n            testBit = testBit << (int)tempBitlen;\r\n\r\n            for (long curbit = bitlen; curbit >= 0; --curbit)\r\n            {\r\n                if ((value & testBit).sign != 0)\r\n                    c += d;\r\n                d *= 0.5;\r\n                testBit = testBit >> 1;\r\n            }\r\n            return (System.Math.Log(c) + System.Math.Log(2) * bitlen) / System.Math.Log(baseValue);\r\n        }\r\n\r\n\r\n        public static double Log(BigInteger value)\r\n        {\r\n            return Log(value, Math.E);\r\n        }\r\n\r\n\r\n        public static double Log10(BigInteger value)\r\n        {\r\n            return Log(value, 10);\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public bool Equals(ulong other)\r\n        {\r\n            return CompareTo(other) == 0;\r\n        }\r\n\r\n        public override int GetHashCode()\r\n        {\r\n            uint hash = (uint)(sign * 0x01010101u);\r\n            int len = data != null ? data.Length : 0;\r\n\r\n            for (int i = 0; i < len; ++i)\r\n                hash ^= data[i];\r\n            return (int)hash;\r\n        }\r\n\r\n        public static BigInteger Add(BigInteger left, BigInteger right)\r\n        {\r\n            return left + right;\r\n        }\r\n\r\n        public static BigInteger Subtract(BigInteger left, BigInteger right)\r\n        {\r\n            return left - right;\r\n        }\r\n\r\n        public static BigInteger Multiply(BigInteger left, BigInteger right)\r\n        {\r\n            return left * right;\r\n        }\r\n\r\n        public static BigInteger Divide(BigInteger dividend, BigInteger divisor)\r\n        {\r\n            return dividend / divisor;\r\n        }\r\n\r\n        public static BigInteger Remainder(BigInteger dividend, BigInteger divisor)\r\n        {\r\n            return dividend % divisor;\r\n        }\r\n\r\n        public static BigInteger Negate(BigInteger value)\r\n        {\r\n            return -value;\r\n        }\r\n\r\n        public int CompareTo(object obj)\r\n        {\r\n            if (obj == null)\r\n                return 1;\r\n\r\n            if (!(obj is BigInteger))\r\n                return -1;\r\n\r\n            return Compare(this, (BigInteger)obj);\r\n        }\r\n\r\n        public int CompareTo(BigInteger other)\r\n        {\r\n            return Compare(this, other);\r\n        }\r\n\r\n        [CLSCompliantAttribute(false)]\r\n        public int CompareTo(ulong other)\r\n        {\r\n            if (sign < 0)\r\n                return -1;\r\n            if (sign == 0)\r\n                return other == 0 ? 0 : -1;\r\n\r\n            if (data.Length > 2)\r\n                return 1;\r\n\r\n            uint high = (uint)(other >> 32);\r\n            uint low = (uint)other;\r\n\r\n            return LongCompare(low, high);\r\n        }\r\n\r\n        int LongCompare(uint low, uint high)\r\n        {\r\n            uint h = 0;\r\n            if (data.Length > 1)\r\n                h = data[1];\r\n\r\n            if (h > high)\r\n                return 1;\r\n            if (h < high)\r\n                return -1;\r\n\r\n            uint l = data[0];\r\n\r\n            if (l > low)\r\n                return 1;\r\n            if (l < low)\r\n                return -1;\r\n\r\n            return 0;\r\n        }\r\n\r\n        public int CompareTo(long other)\r\n        {\r\n            int ls = sign;\r\n            int rs = Math.Sign(other);\r\n\r\n            if (ls != rs)\r\n                return ls > rs ? 1 : -1;\r\n\r\n            if (ls == 0)\r\n                return 0;\r\n\r\n            if (data.Length > 2)\r\n                return sign;\r\n\r\n            if (other < 0)\r\n                other = -other;\r\n            uint low = (uint)other;\r\n            uint high = (uint)((ulong)other >> 32);\r\n\r\n            int r = LongCompare(low, high);\r\n            if (ls == -1)\r\n                r = -r;\r\n\r\n            return r;\r\n        }\r\n\r\n        public static int Compare(BigInteger left, BigInteger right)\r\n        {\r\n            int ls = left.sign;\r\n            int rs = right.sign;\r\n\r\n            if (ls != rs)\r\n                return ls > rs ? 1 : -1;\r\n\r\n            int r = CoreCompare(left.data, right.data);\r\n            if (ls < 0)\r\n                r = -r;\r\n            return r;\r\n        }\r\n\r\n\r\n        static int TopByte(uint x)\r\n        {\r\n            if ((x & 0xFFFF0000u) != 0)\r\n            {\r\n                if ((x & 0xFF000000u) != 0)\r\n                    return 4;\r\n                return 3;\r\n            }\r\n            if ((x & 0xFF00u) != 0)\r\n                return 2;\r\n            return 1;\r\n        }\r\n\r\n        static int FirstNonFFByte(uint word)\r\n        {\r\n            if ((word & 0xFF000000u) != 0xFF000000u)\r\n                return 4;\r\n            else if ((word & 0xFF0000u) != 0xFF0000u)\r\n                return 3;\r\n            else if ((word & 0xFF00u) != 0xFF00u)\r\n                return 2;\r\n            return 1;\r\n        }\r\n\r\n        public byte[] ToByteArray()\r\n        {\r\n            if (sign == 0)\r\n                return new byte[1];\r\n\r\n            //number of bytes not counting upper word\r\n            int bytes = (data.Length - 1) * 4;\r\n            bool needExtraZero = false;\r\n\r\n            uint topWord = data[data.Length - 1];\r\n            int extra;\r\n\r\n            //if the topmost bit is set we need an extra \r\n            if (sign == 1)\r\n            {\r\n                extra = TopByte(topWord);\r\n                uint mask = 0x80u << ((extra - 1) * 8);\r\n                if ((topWord & mask) != 0)\r\n                {\r\n                    needExtraZero = true;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                extra = TopByte(topWord);\r\n            }\r\n\r\n            byte[] res = new byte[bytes + extra + (needExtraZero ? 1 : 0)];\r\n            if (sign == 1)\r\n            {\r\n                int j = 0;\r\n                int end = data.Length - 1;\r\n                for (int i = 0; i < end; ++i)\r\n                {\r\n                    uint word = data[i];\r\n\r\n                    res[j++] = (byte)word;\r\n                    res[j++] = (byte)(word >> 8);\r\n                    res[j++] = (byte)(word >> 16);\r\n                    res[j++] = (byte)(word >> 24);\r\n                }\r\n                while (extra-- > 0)\r\n                {\r\n                    res[j++] = (byte)topWord;\r\n                    topWord >>= 8;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                int j = 0;\r\n                int end = data.Length - 1;\r\n\r\n                uint carry = 1, word;\r\n                ulong add;\r\n                for (int i = 0; i < end; ++i)\r\n                {\r\n                    word = data[i];\r\n                    add = (ulong)~word + carry;\r\n                    word = (uint)add;\r\n                    carry = (uint)(add >> 32);\r\n\r\n                    res[j++] = (byte)word;\r\n                    res[j++] = (byte)(word >> 8);\r\n                    res[j++] = (byte)(word >> 16);\r\n                    res[j++] = (byte)(word >> 24);\r\n                }\r\n\r\n                add = (ulong)~topWord + (carry);\r\n                word = (uint)add;\r\n                carry = (uint)(add >> 32);\r\n                if (carry == 0)\r\n                {\r\n                    int ex = FirstNonFFByte(word);\r\n                    bool needExtra = (word & (1 << (ex * 8 - 1))) == 0;\r\n                    int to = ex + (needExtra ? 1 : 0);\r\n\r\n                    if (to != extra)\r\n                        res = Resize(res, bytes + to);\r\n\r\n                    while (ex-- > 0)\r\n                    {\r\n                        res[j++] = (byte)word;\r\n                        word >>= 8;\r\n                    }\r\n                    if (needExtra)\r\n                        res[j++] = 0xFF;\r\n                }\r\n                else\r\n                {\r\n                    res = Resize(res, bytes + 5);\r\n                    res[j++] = (byte)word;\r\n                    res[j++] = (byte)(word >> 8);\r\n                    res[j++] = (byte)(word >> 16);\r\n                    res[j++] = (byte)(word >> 24);\r\n                    res[j++] = 0xFF;\r\n                }\r\n            }\r\n\r\n            return res;\r\n        }\r\n\r\n        static byte[] Resize(byte[] v, int len)\r\n        {\r\n            byte[] res = new byte[len];\r\n            Array.Copy(v, res, Math.Min(v.Length, len));\r\n            return res;\r\n        }\r\n\r\n        static uint[] Resize(uint[] v, int len)\r\n        {\r\n            uint[] res = new uint[len];\r\n            Array.Copy(v, res, Math.Min(v.Length, len));\r\n            return res;\r\n        }\r\n\r\n        static uint[] CoreAdd(uint[] a, uint[] b)\r\n        {\r\n            if (a.Length < b.Length)\r\n            {\r\n                uint[] tmp = a;\r\n                a = b;\r\n                b = tmp;\r\n            }\r\n\r\n            int bl = a.Length;\r\n            int sl = b.Length;\r\n\r\n            uint[] res = new uint[bl];\r\n\r\n            ulong sum = 0;\r\n\r\n            int i = 0;\r\n            for (; i < sl; i++)\r\n            {\r\n                sum = sum + a[i] + b[i];\r\n                res[i] = (uint)sum;\r\n                sum >>= 32;\r\n            }\r\n\r\n            for (; i < bl; i++)\r\n            {\r\n                sum = sum + a[i];\r\n                res[i] = (uint)sum;\r\n                sum >>= 32;\r\n            }\r\n\r\n            if (sum != 0)\r\n            {\r\n                res = Resize(res, bl + 1);\r\n                res[i] = (uint)sum;\r\n            }\r\n\r\n            return res;\r\n        }\r\n\r\n        /*invariant a > b*/\r\n        static uint[] CoreSub(uint[] a, uint[] b)\r\n        {\r\n            int bl = a.Length;\r\n            int sl = b.Length;\r\n\r\n            uint[] res = new uint[bl];\r\n\r\n            ulong borrow = 0;\r\n            int i;\r\n            for (i = 0; i < sl; ++i)\r\n            {\r\n                borrow = (ulong)a[i] - b[i] - borrow;\r\n\r\n                res[i] = (uint)borrow;\r\n                borrow = (borrow >> 32) & 0x1;\r\n            }\r\n\r\n            for (; i < bl; i++)\r\n            {\r\n                borrow = (ulong)a[i] - borrow;\r\n                res[i] = (uint)borrow;\r\n                borrow = (borrow >> 32) & 0x1;\r\n            }\r\n\r\n            //remove extra zeroes\r\n            for (i = bl - 1; i >= 0 && res[i] == 0; --i) ;\r\n            if (i < bl - 1)\r\n                res = Resize(res, i + 1);\r\n\r\n            return res;\r\n        }\r\n\r\n\r\n        static uint[] CoreAdd(uint[] a, uint b)\r\n        {\r\n            int len = a.Length;\r\n            uint[] res = new uint[len];\r\n\r\n            ulong sum = b;\r\n            int i;\r\n            for (i = 0; i < len; i++)\r\n            {\r\n                sum = sum + a[i];\r\n                res[i] = (uint)sum;\r\n                sum >>= 32;\r\n            }\r\n\r\n            if (sum != 0)\r\n            {\r\n                res = Resize(res, len + 1);\r\n                res[i] = (uint)sum;\r\n            }\r\n\r\n            return res;\r\n        }\r\n\r\n        static uint[] CoreSub(uint[] a, uint b)\r\n        {\r\n            int len = a.Length;\r\n            uint[] res = new uint[len];\r\n\r\n            ulong borrow = b;\r\n            int i;\r\n            for (i = 0; i < len; i++)\r\n            {\r\n                borrow = (ulong)a[i] - borrow;\r\n                res[i] = (uint)borrow;\r\n                borrow = (borrow >> 32) & 0x1;\r\n            }\r\n\r\n            //remove extra zeroes\r\n            for (i = len - 1; i >= 0 && res[i] == 0; --i) ;\r\n            if (i < len - 1)\r\n                res = Resize(res, i + 1);\r\n\r\n            return res;\r\n        }\r\n\r\n        static int CoreCompare(uint[] a, uint[] b)\r\n        {\r\n            int al = a != null ? a.Length : 0;\r\n            int bl = b != null ? b.Length : 0;\r\n\r\n            if (al > bl)\r\n                return 1;\r\n            if (bl > al)\r\n                return -1;\r\n\r\n            for (int i = al - 1; i >= 0; --i)\r\n            {\r\n                uint ai = a[i];\r\n                uint bi = b[i];\r\n                if (ai > bi)\r\n                    return 1;\r\n                if (ai < bi)\r\n                    return -1;\r\n            }\r\n            return 0;\r\n        }\r\n\r\n        static int GetNormalizeShift(uint value)\r\n        {\r\n            int shift = 0;\r\n\r\n            if ((value & 0xFFFF0000) == 0) { value <<= 16; shift += 16; }\r\n            if ((value & 0xFF000000) == 0) { value <<= 8; shift += 8; }\r\n            if ((value & 0xF0000000) == 0) { value <<= 4; shift += 4; }\r\n            if ((value & 0xC0000000) == 0) { value <<= 2; shift += 2; }\r\n            if ((value & 0x80000000) == 0) { value <<= 1; shift += 1; }\r\n\r\n            return shift;\r\n        }\r\n\r\n        static void Normalize(uint[] u, int l, uint[] un, int shift)\r\n        {\r\n            uint carry = 0;\r\n            int i;\r\n            if (shift > 0)\r\n            {\r\n                int rshift = 32 - shift;\r\n                for (i = 0; i < l; i++)\r\n                {\r\n                    uint ui = u[i];\r\n                    un[i] = (ui << shift) | carry;\r\n                    carry = ui >> rshift;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                for (i = 0; i < l; i++)\r\n                {\r\n                    un[i] = u[i];\r\n                }\r\n            }\r\n\r\n            while (i < un.Length)\r\n            {\r\n                un[i++] = 0;\r\n            }\r\n\r\n            if (carry != 0)\r\n            {\r\n                un[l] = carry;\r\n            }\r\n        }\r\n\r\n        static void Unnormalize(uint[] un, out uint[] r, int shift)\r\n        {\r\n            int length = un.Length;\r\n            r = new uint[length];\r\n\r\n            if (shift > 0)\r\n            {\r\n                int lshift = 32 - shift;\r\n                uint carry = 0;\r\n                for (int i = length - 1; i >= 0; i--)\r\n                {\r\n                    uint uni = un[i];\r\n                    r[i] = (uni >> shift) | carry;\r\n                    carry = (uni << lshift);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                for (int i = 0; i < length; i++)\r\n                {\r\n                    r[i] = un[i];\r\n                }\r\n            }\r\n        }\r\n\r\n        const ulong Base = 0x100000000;\r\n        static void DivModUnsigned(uint[] u, uint[] v, out uint[] q, out uint[] r)\r\n        {\r\n            int m = u.Length;\r\n            int n = v.Length;\r\n\r\n            if (n <= 1)\r\n            {\r\n                //  Divide by single digit\r\n                //\r\n                ulong rem = 0;\r\n                uint v0 = v[0];\r\n                q = new uint[m];\r\n                r = new uint[1];\r\n\r\n                for (int j = m - 1; j >= 0; j--)\r\n                {\r\n                    rem *= Base;\r\n                    rem += u[j];\r\n\r\n                    ulong div = rem / v0;\r\n                    rem -= div * v0;\r\n                    q[j] = (uint)div;\r\n                }\r\n                r[0] = (uint)rem;\r\n            }\r\n            else if (m >= n)\r\n            {\r\n                int shift = GetNormalizeShift(v[n - 1]);\r\n\r\n                uint[] un = new uint[m + 1];\r\n                uint[] vn = new uint[n];\r\n\r\n                Normalize(u, m, un, shift);\r\n                Normalize(v, n, vn, shift);\r\n\r\n                q = new uint[m - n + 1];\r\n                r = null;\r\n\r\n                //  Main division loop\r\n                //\r\n                for (int j = m - n; j >= 0; j--)\r\n                {\r\n                    ulong rr, qq;\r\n                    int i;\r\n\r\n                    rr = Base * un[j + n] + un[j + n - 1];\r\n                    qq = rr / vn[n - 1];\r\n                    rr -= qq * vn[n - 1];\r\n\r\n                    for (; ; )\r\n                    {\r\n                        // Estimate too big ?\r\n                        //\r\n                        if ((qq >= Base) || (qq * vn[n - 2] > (rr * Base + un[j + n - 2])))\r\n                        {\r\n                            qq--;\r\n                            rr += (ulong)vn[n - 1];\r\n                            if (rr < Base)\r\n                                continue;\r\n                        }\r\n                        break;\r\n                    }\r\n\r\n\r\n                    //  Multiply and subtract\r\n                    //\r\n                    long b = 0;\r\n                    long t = 0;\r\n                    for (i = 0; i < n; i++)\r\n                    {\r\n                        ulong p = vn[i] * qq;\r\n                        t = (long)un[i + j] - (long)(uint)p - b;\r\n                        un[i + j] = (uint)t;\r\n                        p >>= 32;\r\n                        t >>= 32;\r\n                        b = (long)p - t;\r\n                    }\r\n                    t = (long)un[j + n] - b;\r\n                    un[j + n] = (uint)t;\r\n\r\n                    //  Store the calculated value\r\n                    //\r\n                    q[j] = (uint)qq;\r\n\r\n                    //  Add back vn[0..n] to un[j..j+n]\r\n                    //\r\n                    if (t < 0)\r\n                    {\r\n                        q[j]--;\r\n                        ulong c = 0;\r\n                        for (i = 0; i < n; i++)\r\n                        {\r\n                            c = (ulong)vn[i] + un[j + i] + c;\r\n                            un[j + i] = (uint)c;\r\n                            c >>= 32;\r\n                        }\r\n                        c += (ulong)un[j + n];\r\n                        un[j + n] = (uint)c;\r\n                    }\r\n                }\r\n\r\n                Unnormalize(un, out r, shift);\r\n            }\r\n            else\r\n            {\r\n                q = new uint[] { 0 };\r\n                r = u;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api/WindowsPhone/Tuple.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.WindowsPhone\r\n{\r\n    public class Tuple<T1, T2, T3>\r\n    {\r\n        public T1 Item1 { get; set; }\r\n\r\n        public T2 Item2 { get; set; }\r\n\r\n        public T3 Item3 { get; set; }\r\n\r\n        public Tuple(T1 item1, T2 item2, T3 item3)\r\n        {\r\n            Item1 = item1;\r\n            Item2 = item2;\r\n            Item3 = item3;\r\n        }\r\n    }\r\n\r\n    public class Tuple<T1, T2>\r\n    {\r\n        public T1 Item1 { get; set; }\r\n\r\n        public T2 Item2 { get; set; }\r\n\r\n        public Tuple(T1 item1, T2 item2)\r\n        {\r\n            Item1 = item1;\r\n            Item2 = item2;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Rx-Core\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-Interfaces\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-Linq\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n</packages>"
  },
  {
    "path": "Telegram.Api.PCL/Hash/CRC32/CRC.WinRT.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#if WIN_RT\r\n\r\n\r\nusing System;\r\nusing System.IO;\r\n\r\nnamespace Telegram.Api\r\n{\r\n    /// <summary>\r\n    /// Calculates a 32bit Cyclic Redundancy Checksum (CRC) using the same polynomial\r\n    /// used by Zip. This type is used internally by DotNetZip; it is generally not used\r\n    /// directly by applications wishing to create, read, or manipulate zip archive\r\n    /// files.\r\n    /// </summary>\r\n    internal class CRC32\r\n    {\r\n        private const int BUFFER_SIZE = 8192;\r\n        private static readonly UInt32[] crc32Table;\r\n        private UInt32 runningCrc32Result = 0xFFFFFFFF;\r\n        private Int64 totalBytesRead;\r\n\r\n        static CRC32()\r\n        {\r\n            unchecked\r\n            {\r\n                // PKZip specifies CRC32 with a polynomial of 0xEDB88320;\r\n                // This is also the CRC-32 polynomial used bby Ethernet, FDDI,\r\n                // bzip2, gzip, and others.\r\n                // Often the polynomial is shown reversed as 0x04C11DB7.\r\n                // For more details, see http://en.wikipedia.org/wiki/Cyclic_redundancy_check\r\n                UInt32 dwPolynomial = 0xEDB88320;\r\n                UInt32 i, j;\r\n\r\n                crc32Table = new UInt32[256];\r\n\r\n                UInt32 dwCrc;\r\n                for (i = 0; i < 256; i++)\r\n                {\r\n                    dwCrc = i;\r\n                    for (j = 8; j > 0; j--)\r\n                    {\r\n                        if ((dwCrc & 1) == 1)\r\n                        {\r\n                            dwCrc = (dwCrc >> 1) ^ dwPolynomial;\r\n                        }\r\n                        else\r\n                        {\r\n                            dwCrc >>= 1;\r\n                        }\r\n                    }\r\n                    crc32Table[i] = dwCrc;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// indicates the total number of bytes read on the CRC stream.\r\n        /// This is used when writing the ZipDirEntry when compressing files.\r\n        /// </summary>\r\n        public Int64 TotalBytesRead\r\n        {\r\n            get { return totalBytesRead; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Indicates the current CRC for all blocks slurped in.\r\n        /// </summary>\r\n        public Int32 Crc32Result\r\n        {\r\n            get\r\n            {\r\n                // return one's complement of the running result\r\n                return unchecked((Int32)(~runningCrc32Result));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the CRC32 for the specified stream.\r\n        /// </summary>\r\n        /// <param name=\"input\">The stream over which to calculate the CRC32</param>\r\n        /// <returns>the CRC32 calculation</returns>\r\n        public Int32 GetCrc32(Stream input)\r\n        {\r\n            return GetCrc32AndCopy(input, null);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the CRC32 for the specified stream, and writes the input into the\r\n        /// output stream.\r\n        /// </summary>\r\n        /// <param name=\"input\">The stream over which to calculate the CRC32</param>\r\n        /// <param name=\"output\">The stream into which to deflate the input</param>\r\n        /// <returns>the CRC32 calculation</returns>\r\n        public Int32 GetCrc32AndCopy(Stream input, Stream output)\r\n        {\r\n            if (input == null)\r\n                throw new ArgumentException(\"The input stream must not be null.\");\r\n\r\n            unchecked\r\n            {\r\n                //UInt32 crc32Result;\r\n                //crc32Result = 0xFFFFFFFF;\r\n                var buffer = new byte[BUFFER_SIZE];\r\n                int readSize = BUFFER_SIZE;\r\n\r\n                totalBytesRead = 0;\r\n                int count = input.Read(buffer, 0, readSize);\r\n                if (output != null) output.Write(buffer, 0, count);\r\n                totalBytesRead += count;\r\n                while (count > 0)\r\n                {\r\n                    SlurpBlock(buffer, 0, count);\r\n                    count = input.Read(buffer, 0, readSize);\r\n                    if (output != null) output.Write(buffer, 0, count);\r\n                    totalBytesRead += count;\r\n                }\r\n\r\n                return (Int32)(~runningCrc32Result);\r\n            }\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Get the CRC32 for the given (word,byte) combo.  This is a computation\r\n        /// defined by PKzip.\r\n        /// </summary>\r\n        /// <param name=\"W\">The word to start with.</param>\r\n        /// <param name=\"B\">The byte to combine it with.</param>\r\n        /// <returns>The CRC-ized result.</returns>\r\n        public Int32 ComputeCrc32(Int32 W, byte B)\r\n        {\r\n            return _InternalComputeCrc32((UInt32)W, B);\r\n        }\r\n\r\n        internal Int32 _InternalComputeCrc32(UInt32 W, byte B)\r\n        {\r\n            return (Int32)(crc32Table[(W ^ B) & 0xFF] ^ (W >> 8));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the value for the running CRC32 using the given block of bytes.\r\n        /// This is useful when using the CRC32() class in a Stream.\r\n        /// </summary>\r\n        /// <param name=\"block\">block of bytes to slurp</param>\r\n        /// <param name=\"offset\">starting point in the block</param>\r\n        /// <param name=\"count\">how many bytes within the block to slurp</param>\r\n        public void SlurpBlock(byte[] block, int offset, int count)\r\n        {\r\n            if (block == null)\r\n                throw new ArgumentException(\"The data buffer must not be null.\");\r\n\r\n            for (int i = 0; i < count; i++)\r\n            {\r\n                int x = offset + i;\r\n                runningCrc32Result = ((runningCrc32Result) >> 8) ^\r\n                                     crc32Table[(block[x]) ^ ((runningCrc32Result) & 0x000000FF)];\r\n            }\r\n            totalBytesRead += count;\r\n        }\r\n\r\n\r\n        // pre-initialize the crc table for speed of lookup.\r\n\r\n\r\n        private uint gf2_matrix_times(uint[] matrix, uint vec)\r\n        {\r\n            uint sum = 0;\r\n            int i = 0;\r\n            while (vec != 0)\r\n            {\r\n                if ((vec & 0x01) == 0x01)\r\n                    sum ^= matrix[i];\r\n                vec >>= 1;\r\n                i++;\r\n            }\r\n            return sum;\r\n        }\r\n\r\n        private void gf2_matrix_square(uint[] square, uint[] mat)\r\n        {\r\n            for (int i = 0; i < 32; i++)\r\n                square[i] = gf2_matrix_times(mat, mat[i]);\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Combines the given CRC32 value with the current running total.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This is useful when using a divide-and-conquer approach to calculating a CRC.\r\n        /// Multiple threads can each calculate a CRC32 on a segment of the data, and then\r\n        /// combine the individual CRC32 values at the end.\r\n        /// </remarks>\r\n        /// <param name=\"crc\">the crc value to be combined with this one</param>\r\n        /// <param name=\"length\">the length of data the CRC value was calculated on</param>\r\n        public void Combine(int crc, int length)\r\n        {\r\n            var even = new uint[32]; // even-power-of-two zeros operator\r\n            var odd = new uint[32]; // odd-power-of-two zeros operator\r\n\r\n            if (length == 0)\r\n                return;\r\n\r\n            uint crc1 = ~runningCrc32Result;\r\n            var crc2 = (uint)crc;\r\n\r\n            // put operator for one zero bit in odd\r\n            odd[0] = 0xEDB88320; // the CRC-32 polynomial\r\n            uint row = 1;\r\n            for (int i = 1; i < 32; i++)\r\n            {\r\n                odd[i] = row;\r\n                row <<= 1;\r\n            }\r\n\r\n            // put operator for two zero bits in even\r\n            gf2_matrix_square(even, odd);\r\n\r\n            // put operator for four zero bits in odd\r\n            gf2_matrix_square(odd, even);\r\n\r\n            var len2 = (uint)length;\r\n\r\n            // apply len2 zeros to crc1 (first square will put the operator for one\r\n            // zero byte, eight zero bits, in even)\r\n            do\r\n            {\r\n                // apply zeros operator for this bit of len2\r\n                gf2_matrix_square(even, odd);\r\n\r\n                if ((len2 & 1) == 1)\r\n                    crc1 = gf2_matrix_times(even, crc1);\r\n                len2 >>= 1;\r\n\r\n                if (len2 == 0)\r\n                    break;\r\n\r\n                // another iteration of the loop with odd and even swapped\r\n                gf2_matrix_square(odd, even);\r\n                if ((len2 & 1) == 1)\r\n                    crc1 = gf2_matrix_times(odd, crc1);\r\n                len2 >>= 1;\r\n            } while (len2 != 0);\r\n\r\n            crc1 ^= crc2;\r\n\r\n            runningCrc32Result = ~crc1;\r\n\r\n            //return (int) crc1;\r\n            return;\r\n        }\r\n\r\n        public byte[] ComputeHash(byte[] data)\r\n        {\r\n            return BitConverter.GetBytes(GetCrc32(new MemoryStream(data)));\r\n        }\r\n    }\r\n}\r\n#endif"
  },
  {
    "path": "Telegram.Api.PCL/Properties/AssemblyInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Resources;\r\nusing System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Telegram.Api.PCL\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Telegram.Api.PCL\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2015\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n[assembly: NeutralResourcesLanguage(\"en\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n"
  },
  {
    "path": "Telegram.Api.PCL/Resources/AppResources.cs",
    "content": "﻿using Windows.ApplicationModel.Resources;\r\n\r\nnamespace Telegram.Api.Resources\r\n{\r\n    internal class AppResources\r\n    {\r\n        private static ResourceLoader resourceMan;\r\n\r\n        //private static global::System.Globalization.CultureInfo resourceCulture;\r\n\r\n        internal AppResources()\r\n        {\r\n        }\r\n\r\n        internal static ResourceLoader ResourceManager\r\n        {\r\n            get\r\n            {\r\n                if (ReferenceEquals(resourceMan, null))\r\n                {\r\n                    var temp = ResourceLoader.GetForViewIndependentUse(\"TelegramClient.Tasks/Resources\");\r\n                    resourceMan = temp;\r\n                }\r\n\r\n                return resourceMan;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Deleted User.\r\n        /// </summary>\r\n        internal static string DeletedUser\r\n        {\r\n            get\r\n            {\r\n                return ResourceManager.GetString(\"DeletedUser\");\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Empty User.\r\n        /// </summary>\r\n        internal static string EmptyUser\r\n        {\r\n            get\r\n            {\r\n                return ResourceManager.GetString(\"EmptyUser\");\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Saved Messages.\r\n        /// </summary>\r\n        internal static string SavedMessages\r\n        {\r\n            get\r\n            {\r\n                return ResourceManager.GetString(\"SavedMessages\");\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api.PCL/Resources/de/Resources.resw",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Gelöschtes Konto</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Gelöschtes Konto</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Saved Messages</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.PCL/Resources/en/Resources.resw",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Deleted account</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Deleted account</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Saved messages</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.PCL/Resources/es/Resources.resw",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Cuenta eliminada</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Cuenta eliminada</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Saved Messages</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.PCL/Resources/it/Resources.resw",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Account eliminato</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Account eliminato</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Saved Messages</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.PCL/Resources/nl/Resources.resw",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Verwijderd account</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Verwijderd account</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Saved Messages</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.PCL/Resources/pt/Resources.resw",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Conta excluída</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Conta excluída</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Saved Messages</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.PCL/Resources/ru/Resources.resw",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Удаленный аккаунт</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Удаленный аккаунт</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Избранное</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.PCL/Telegram.Api.PCL.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProjectGuid>{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}</ProjectGuid>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Telegram.Api</RootNamespace>\r\n    <AssemblyName>Telegram.Api.PCL</AssemblyName>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <FileAlignment>512</FileAlignment>\r\n    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\r\n    <TargetFrameworkProfile>Profile32</TargetFrameworkProfile>\r\n    <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\..\\..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;WIN_RT;WP8</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE;WIN_RT;WP8</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <TargetPlatform Include=\"WindowsPhoneApp, Version=8.1\" />\r\n    <TargetPlatform Include=\"Windows, Version=8.1\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"..\\Telegram.Api\\Compression\\GZipDeflateStream.cs\">\r\n      <Link>Compression\\GZipDeflateStream.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Constants.cs\">\r\n      <Link>Constants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Hash\\CRC32\\CRC.cs\">\r\n      <Link>Hash\\CRC32\\CRC.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Extensions\\ActionExtensions.cs\">\r\n      <Link>Extensions\\ActionExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Extensions\\HttpWebRequestExtensions.cs\">\r\n      <Link>Extensions\\HttpWebRequestExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Extensions\\StreamExtensions.cs\">\r\n      <Link>Extensions\\StreamExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Extensions\\TLObjectExtensions.cs\">\r\n      <Link>Extensions\\TLObjectExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Helpers\\Execute.cs\">\r\n      <Link>Helpers\\Execute.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Helpers\\FileUtils.cs\">\r\n      <Link>Helpers\\FileUtils.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Helpers\\SettingsHelper.cs\">\r\n      <Link>Helpers\\SettingsHelper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Helpers\\Utils.cs\">\r\n      <Link>Helpers\\Utils.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Hash\\MD5\\MD5.cs\">\r\n      <Link>Hash\\MD5\\MD5.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Hash\\MD5\\MD5CryptoServiceProvider.cs\">\r\n      <Link>Hash\\MD5\\MD5CryptoServiceProvider.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Hash\\MD5\\MD5Managed.cs\">\r\n      <Link>Hash\\MD5\\MD5Managed.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Cache\\Context.cs\">\r\n      <Link>Services\\Cache\\Context.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Cache\\EventArgs\\DialogAddedEventArgs.cs\">\r\n      <Link>Services\\Cache\\EventArgs\\DialogAddedEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Cache\\EventArgs\\TopMessageUpdatedEventArgs.cs\">\r\n      <Link>Services\\Cache\\EventArgs\\TopMessageUpdatedEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Cache\\ICacheService.cs\">\r\n      <Link>Services\\Cache\\ICacheService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Cache\\InMemoryCacheService.cs\">\r\n      <Link>Services\\Cache\\InMemoryCacheService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Cache\\InMemoryDatabase.cs\">\r\n      <Link>Services\\Cache\\InMemoryDatabase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Connection\\ConnectionService.cs\">\r\n      <Link>Services\\Connection\\ConnectionService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\DCOptionItem.cs\">\r\n      <Link>Services\\DCOptionItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\DelayedItem.cs\">\r\n      <Link>Services\\DelayedItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\AudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\AudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\DocumentFileManager.cs\">\r\n      <Link>Services\\FileManager\\DocumentFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\DownloadableItem.cs\">\r\n      <Link>Services\\FileManager\\DownloadableItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\DownloadablePart.cs\">\r\n      <Link>Services\\FileManager\\DownloadablePart.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\DownloadingCanceledEventArgs.cs\">\r\n      <Link>Services\\FileManager\\DownloadingCanceledEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\EncryptedFileManager.cs\">\r\n      <Link>Services\\FileManager\\EncryptedFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\FileManager.cs\">\r\n      <Link>Services\\FileManager\\FileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\IAudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\IAudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\IDocumentFileManager.cs\">\r\n      <Link>Services\\FileManager\\IDocumentFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\IEncryptedFileManager.cs\">\r\n      <Link>Services\\FileManager\\IEncryptedFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\IFileManager.cs\">\r\n      <Link>Services\\FileManager\\IFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\IUploadAudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\IUploadAudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\IUploadFileManager.cs\">\r\n      <Link>Services\\FileManager\\IUploadFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\IUploadVideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\IUploadVideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\IVideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\IVideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\ProgressChangedEventArgs.cs\">\r\n      <Link>Services\\FileManager\\ProgressChangedEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\UploadAudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\UploadAudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\UploadFileManager.cs\">\r\n      <Link>Services\\FileManager\\UploadFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\UploadVideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\UploadVideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\VideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\VideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\Worker.cs\">\r\n      <Link>Services\\FileManager\\Worker.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\HistoryItem.cs\">\r\n      <Link>Services\\HistoryItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\IMTProtoService.cs\">\r\n      <Link>Services\\IMTProtoService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Account.cs\">\r\n      <Link>Services\\MTProtoService.Account.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Auth.cs\">\r\n      <Link>Services\\MTProtoService.Auth.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.ByTransport.cs\">\r\n      <Link>Services\\MTProtoService.ByTransport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Config.cs\">\r\n      <Link>Services\\MTProtoService.Config.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Contacts.cs\">\r\n      <Link>Services\\MTProtoService.Contacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.cs\">\r\n      <Link>Services\\MTProtoService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.DHKeyExchange.cs\">\r\n      <Link>Services\\MTProtoService.DHKeyExchange.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Help.cs\">\r\n      <Link>Services\\MTProtoService.Help.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Helpers.cs\">\r\n      <Link>Services\\MTProtoService.Helpers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.HttpLongPoll.cs\">\r\n      <Link>Services\\MTProtoService.HttpLongPoll.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Messages.cs\">\r\n      <Link>Services\\MTProtoService.Messages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Photos.cs\">\r\n      <Link>Services\\MTProtoService.Photos.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.SecretChats.cs\">\r\n      <Link>Services\\MTProtoService.SecretChats.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.SendingQueue.cs\">\r\n      <Link>Services\\MTProtoService.SendingQueue.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Stuff.cs\">\r\n      <Link>Services\\MTProtoService.Stuff.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Updates.cs\">\r\n      <Link>Services\\MTProtoService.Updates.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Upload.cs\">\r\n      <Link>Services\\MTProtoService.Upload.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Users.cs\">\r\n      <Link>Services\\MTProtoService.Users.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\ServiceBase.cs\">\r\n      <Link>Services\\ServiceBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Updates\\IUpdatesService.cs\">\r\n      <Link>Services\\Updates\\IUpdatesService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Updates\\ReceiveUpdatesEventArgs.cs\">\r\n      <Link>Services\\Updates\\ReceiveUpdatesEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Updates\\UpdatesBySeqComparer.cs\">\r\n      <Link>Services\\Updates\\UpdatesBySeqComparer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Updates\\UpdatesService.cs\">\r\n      <Link>Services\\Updates\\UpdatesService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLCheckUsername.cs\">\r\n      <Link>TL\\Functions\\Account\\TLCheckUsername.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLDeleteAccount.cs\">\r\n      <Link>TL\\Functions\\Account\\TLDeleteAccount.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLGetAccountTTL.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetAccountTTL.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLGetNotifySettings.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLGetPrivacy.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetPrivacy.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLRegisterDevice.cs\">\r\n      <Link>TL\\Functions\\Account\\TLRegisterDevice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLResetNotifySettings.cs\">\r\n      <Link>TL\\Functions\\Account\\TLResetNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLSetPrivacy.cs\">\r\n      <Link>TL\\Functions\\Account\\TLSetPrivacy.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLUnregisterDevice.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUnregisterDevice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLUpdateNotifySettings.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdateNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLUpdateProfile.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdateProfile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLUpdateStatus.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdateStatus.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLUpdateUserName.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdateUserName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLCheckPhone.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLCheckPhone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLExportAuthorization.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLExportAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLImportAuthorization.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLImportAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLLogOut.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLLogOut.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLResetAuthorizations.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLResetAuthorizations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLSendCall.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLSendCode.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLSendInvites.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendInvites.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLSendSms.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendSms.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLSignIn.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSignIn.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLSignUp.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSignUp.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLBlock.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLBlock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLDeleteContact.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLDeleteContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLDeleteContacts.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLDeleteContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLGetBlocked.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetBlocked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLGetContacts.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLGetStatuses.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetStatuses.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLImportContacts.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLImportContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLSearch.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLSearch.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLUnblock.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLUnblock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\DHKeyExchange\\TLReqDHParams.cs\">\r\n      <Link>TL\\Functions\\DHKeyExchange\\TLReqDHParams.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\DHKeyExchange\\TLReqPQ.cs\">\r\n      <Link>TL\\Functions\\DHKeyExchange\\TLReqPQ.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\DHKeyExchange\\TLSetClientDHParams.cs\">\r\n      <Link>TL\\Functions\\DHKeyExchange\\TLSetClientDHParams.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetConfig.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetInviteText.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetInviteText.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetNearestDC.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetNearestDC.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetSupport.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetSupport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLInvokeWithLayerN.cs\">\r\n      <Link>TL\\Functions\\Help\\TLInvokeWithLayerN.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLAcceptEncryption.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLAcceptEncryption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLAddChatUser.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLAddChatUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLCreateChat.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLCreateChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLDeleteChatUser.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDeleteChatUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLDeleteHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDeleteHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLDeleteMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDeleteMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLDiscardEncryption.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDiscardEncryption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLEditChatPhoto.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLEditChatPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLEditChatTitle.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLEditChatTitle.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLForwardMessage.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLForwardMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLForwardMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLForwardMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetChats.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetChats.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetDHConfig.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetDHConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetDialogs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetFullChat.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetFullChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReadEncryptedHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadEncryptedHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReadHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReadMessageContents.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadMessageContents.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReceivedMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReceivedMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReceivedQueue.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReceivedQueue.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLRequestEncryption.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLRequestEncryption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLRestoreMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLRestoreMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSearch.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSearch.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSendBroadcast.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendBroadcast.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSendEncrypted.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendEncrypted.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSendEncryptedFile.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSendEncryptedService.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendEncryptedService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSendMedia.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSendMessage.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSetEncryptedTyping.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSetEncryptedTyping.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSetTyping.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSetTyping.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Photos\\TLGetUserPhotos.cs\">\r\n      <Link>TL\\Functions\\Photos\\TLGetUserPhotos.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Photos\\TLUpdateProfilePhoto.cs\">\r\n      <Link>TL\\Functions\\Photos\\TLUpdateProfilePhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Photos\\TLUploadProfilePhoto.cs\">\r\n      <Link>TL\\Functions\\Photos\\TLUploadProfilePhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Stuff\\TLGetFutureSalts.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLGetFutureSalts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Stuff\\TLHttpWait.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLHttpWait.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Stuff\\TLMessageAcknowledgments.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLMessageAcknowledgments.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Stuff\\TLRPCDropAnswer.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLRPCDropAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Updates\\TLGetDifference.cs\">\r\n      <Link>TL\\Functions\\Updates\\TLGetDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Updates\\TLGetState.cs\">\r\n      <Link>TL\\Functions\\Updates\\TLGetState.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Upload\\TLGetFile.cs\">\r\n      <Link>TL\\Functions\\Upload\\TLGetFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Upload\\TLSaveFilePart.cs\">\r\n      <Link>TL\\Functions\\Upload\\TLSaveFilePart.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Users\\TLGetFullUser.cs\">\r\n      <Link>TL\\Functions\\Users\\TLGetFullUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Users\\TLGetUsers.cs\">\r\n      <Link>TL\\Functions\\Users\\TLGetUsers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Interfaces\\IBytes.cs\">\r\n      <Link>TL\\Interfaces\\IBytes.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Interfaces\\IFullName.cs\">\r\n      <Link>TL\\Interfaces\\IFullName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Interfaces\\IInputPeer.cs\">\r\n      <Link>TL\\Interfaces\\IInputPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Interfaces\\ISelectable.cs\">\r\n      <Link>TL\\Interfaces\\ISelectable.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Interfaces\\IVIsibility.cs\">\r\n      <Link>TL\\Interfaces\\IVIsibility.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAffectedHistory.cs\">\r\n      <Link>TL\\TLAffectedHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAudio.cs\">\r\n      <Link>TL\\TLAudio.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAuthorization.cs\">\r\n      <Link>TL\\TLAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBadMessageNotification.cs\">\r\n      <Link>TL\\TLBadMessageNotification.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBadServerSalt.cs\">\r\n      <Link>TL\\TLBadServerSalt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBool.cs\">\r\n      <Link>TL\\TLBool.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChat.cs\">\r\n      <Link>TL\\TLChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChatFull.cs\">\r\n      <Link>TL\\TLChatFull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChatParticipant.cs\">\r\n      <Link>TL\\TLChatParticipant.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChatParticipants.cs\">\r\n      <Link>TL\\TLChatParticipants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChats.cs\">\r\n      <Link>TL\\TLChats.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCheckedPhone.cs\">\r\n      <Link>TL\\TLCheckedPhone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLClientDHInnerData.cs\">\r\n      <Link>TL\\TLClientDHInnerData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLConfig.cs\">\r\n      <Link>TL\\TLConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLContact.cs\">\r\n      <Link>TL\\TLContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLContactBlocked.cs\">\r\n      <Link>TL\\TLContactBlocked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLContactFound.cs\">\r\n      <Link>TL\\TLContactFound.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLContacts.cs\">\r\n      <Link>TL\\TLContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLContactsBlocked.cs\">\r\n      <Link>TL\\TLContactsBlocked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLContactsFound.cs\">\r\n      <Link>TL\\TLContactsFound.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLContactStatus.cs\">\r\n      <Link>TL\\TLContactStatus.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLContainerTransportMessage.cs\">\r\n      <Link>TL\\TLContainerTransportMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDCOption.cs\">\r\n      <Link>TL\\TLDCOption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDecryptedMessage.cs\">\r\n      <Link>TL\\TLDecryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDecryptedMessageAction.cs\">\r\n      <Link>TL\\TLDecryptedMessageAction.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDecryptedMessageLayer.cs\">\r\n      <Link>TL\\TLDecryptedMessageLayer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDecryptedMessageMedia.cs\">\r\n      <Link>TL\\TLDecryptedMessageMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDHConfig.cs\">\r\n      <Link>TL\\TLDHConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDHGen.cs\">\r\n      <Link>TL\\TLDHGen.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDialog.cs\">\r\n      <Link>TL\\TLDialog.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDialogs.cs\">\r\n      <Link>TL\\TLDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDifference.cs\">\r\n      <Link>TL\\TLDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDocument.cs\">\r\n      <Link>TL\\TLDocument.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDouble.cs\">\r\n      <Link>TL\\TLDouble.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLEncryptedChat.cs\">\r\n      <Link>TL\\TLEncryptedChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLEncryptedFile.cs\">\r\n      <Link>TL\\TLEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLEncryptedMessage.cs\">\r\n      <Link>TL\\TLEncryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLExportedAuthorization.cs\">\r\n      <Link>TL\\TLExportedAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFile.cs\">\r\n      <Link>TL\\TLFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFileLocation.cs\">\r\n      <Link>TL\\TLFileLocation.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFileType.cs\">\r\n      <Link>TL\\TLFileType.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLForeignLink.cs\">\r\n      <Link>TL\\TLForeignLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFutureSalt.cs\">\r\n      <Link>TL\\TLFutureSalt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLGeoPoint.cs\">\r\n      <Link>TL\\TLGeoPoint.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLGzipPacked.cs\">\r\n      <Link>TL\\TLGzipPacked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLImportedContact.cs\">\r\n      <Link>TL\\TLImportedContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLImportedContacts.cs\">\r\n      <Link>TL\\TLImportedContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInitConnection.cs\">\r\n      <Link>TL\\TLInitConnection.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputAudio.cs\">\r\n      <Link>TL\\TLInputAudio.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputChatPhoto.cs\">\r\n      <Link>TL\\TLInputChatPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputContact.cs\">\r\n      <Link>TL\\TLInputContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputDocument.cs\">\r\n      <Link>TL\\TLInputDocument.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputEncryptedChat.cs\">\r\n      <Link>TL\\TLInputEncryptedChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputEncryptedFile.cs\">\r\n      <Link>TL\\TLInputEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputEncryptedFileBigUploaded.cs\">\r\n      <Link>TL\\TLInputEncryptedFileBigUploaded.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputEncryptedFileLocation.cs\">\r\n      <Link>TL\\TLInputEncryptedFileLocation.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputFile.cs\">\r\n      <Link>TL\\TLInputFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputFileBig.cs\">\r\n      <Link>TL\\TLInputFileBig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputFileLocation.cs\">\r\n      <Link>TL\\TLInputFileLocation.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputGeoPoint.cs\">\r\n      <Link>TL\\TLInputGeoPoint.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputMedia.cs\">\r\n      <Link>TL\\TLInputMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputMessagesFilter.cs\">\r\n      <Link>TL\\TLInputMessagesFilter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputNotifyPeer.cs\">\r\n      <Link>TL\\TLInputNotifyPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPeerBase.cs\">\r\n      <Link>TL\\TLInputPeerBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPeerNotifyEvents.cs\">\r\n      <Link>TL\\TLInputPeerNotifyEvents.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPeerNotifySettings.cs\">\r\n      <Link>TL\\TLInputPeerNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPhoto.cs\">\r\n      <Link>TL\\TLInputPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPhotoCrop.cs\">\r\n      <Link>TL\\TLInputPhotoCrop.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputUser.cs\">\r\n      <Link>TL\\TLInputUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputVideo.cs\">\r\n      <Link>TL\\TLInputVideo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInt.cs\">\r\n      <Link>TL\\TLInt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInt128.cs\">\r\n      <Link>TL\\TLInt128.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInt256.cs\">\r\n      <Link>TL\\TLInt256.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInviteText.cs\">\r\n      <Link>TL\\TLInviteText.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInvokeAfterMsg.cs\">\r\n      <Link>TL\\TLInvokeAfterMsg.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLLink.cs\">\r\n      <Link>TL\\TLLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLLong.cs\">\r\n      <Link>TL\\TLLong.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessage.cs\">\r\n      <Link>TL\\TLMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessage.Encrypted.cs\">\r\n      <Link>TL\\TLMessage.Encrypted.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageAction.cs\">\r\n      <Link>TL\\TLMessageAction.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageContainer.cs\">\r\n      <Link>TL\\TLMessageContainer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageInfo.cs\">\r\n      <Link>TL\\TLMessageInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageMedia.cs\">\r\n      <Link>TL\\TLMessageMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessages.cs\">\r\n      <Link>TL\\TLMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessagesAcknowledgment.cs\">\r\n      <Link>TL\\TLMessagesAcknowledgment.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessagesChatFull.cs\">\r\n      <Link>TL\\TLMessagesChatFull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMyLink.cs\">\r\n      <Link>TL\\TLMyLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLNearestDC.cs\">\r\n      <Link>TL\\TLNearestDC.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLNewSessionCreated.cs\">\r\n      <Link>TL\\TLNewSessionCreated.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLNonEncryptedMessage.cs\">\r\n      <Link>TL\\TLNonEncryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLNotifyPeer.cs\">\r\n      <Link>TL\\TLNotifyPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLNull.cs\">\r\n      <Link>TL\\TLNull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLObject.cs\">\r\n      <Link>TL\\TLObject.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLObjectGenerator.cs\">\r\n      <Link>TL\\TLObjectGenerator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPeer.cs\">\r\n      <Link>TL\\TLPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPeerNotifyEvents.cs\">\r\n      <Link>TL\\TLPeerNotifyEvents.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPeerNotifySettings.cs\">\r\n      <Link>TL\\TLPeerNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhoto.cs\">\r\n      <Link>TL\\TLPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhotos.cs\">\r\n      <Link>TL\\TLPhotos.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhotoSize.cs\">\r\n      <Link>TL\\TLPhotoSize.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhotosPhoto.cs\">\r\n      <Link>TL\\TLPhotosPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPong.cs\">\r\n      <Link>TL\\TLPong.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPQInnerData.cs\">\r\n      <Link>TL\\TLPQInnerData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLResponse.cs\">\r\n      <Link>TL\\TLResponse.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLResPQ.cs\">\r\n      <Link>TL\\TLResPQ.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRPCDropAnswer.cs\">\r\n      <Link>TL\\TLRPCDropAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRPCError.cs\">\r\n      <Link>TL\\TLRPCError.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRPCResult.cs\">\r\n      <Link>TL\\TLRPCResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSendMessageAction.cs\">\r\n      <Link>TL\\TLSendMessageAction.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSentCode.cs\">\r\n      <Link>TL\\TLSentCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSentEncryptedFile.cs\">\r\n      <Link>TL\\TLSentEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSentEncryptedMessage.cs\">\r\n      <Link>TL\\TLSentEncryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSentMessage.cs\">\r\n      <Link>TL\\TLSentMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLServerDHInnerData.cs\">\r\n      <Link>TL\\TLServerDHInnerData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLServerDHParams.cs\">\r\n      <Link>TL\\TLServerDHParams.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLServerFile.cs\">\r\n      <Link>TL\\TLServerFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSignatures.cs\">\r\n      <Link>TL\\TLSignatures.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLState.cs\">\r\n      <Link>TL\\TLState.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStatedMessage.cs\">\r\n      <Link>TL\\TLStatedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStatedMessages.cs\">\r\n      <Link>TL\\TLStatedMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLString.cs\">\r\n      <Link>TL\\TLString.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSupport.cs\">\r\n      <Link>TL\\TLSupport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLUpdate.cs\">\r\n      <Link>TL\\TLUpdate.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLUpdates.cs\">\r\n      <Link>TL\\TLUpdates.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLUserBase.cs\">\r\n      <Link>TL\\TLUserBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLUserFull.cs\">\r\n      <Link>TL\\TLUserFull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLUserStatus.cs\">\r\n      <Link>TL\\TLUserStatus.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLUtils.cs\">\r\n      <Link>TL\\TLUtils.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLUtils.Log.cs\">\r\n      <Link>TL\\TLUtils.Log.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLVector.cs\">\r\n      <Link>TL\\TLVector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLVideo.cs\">\r\n      <Link>TL\\TLVideo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLWallpaperSolid.cs\">\r\n      <Link>TL\\TLWallpaperSolid.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Transport\\DataEventArgs.cs\">\r\n      <Link>Transport\\DataEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Transport\\ITransport.cs\">\r\n      <Link>Transport\\ITransport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Transport\\ITransportService.cs\">\r\n      <Link>Transport\\ITransportService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Transport\\TCPTransportBase.cs\">\r\n      <Link>Transport\\TCPTransportBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Transport\\TCPTransportResult.cs\">\r\n      <Link>Transport\\TCPTransportResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Transport\\TransportService.cs\">\r\n      <Link>Transport\\TransportService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\Services\\FileManager\\IWebFileManager.cs\">\r\n      <Link>Services\\FileManager\\IWebFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\Services\\FileManager\\WebFileManager.cs\">\r\n      <Link>Services\\FileManager\\WebFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLAcceptAuthorization.cs\">\r\n      <Link>TL\\Functions\\Account\\TLAcceptAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLDeleteSecureValue.cs\">\r\n      <Link>TL\\Functions\\Account\\TLDeleteSecureValue.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLGetAllSecureValues.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetAllSecureValues.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLGetAuthorizationForm.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetAuthorizationForm.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLGetSecureValue.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetSecureValue.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLGetWebAuthorizations.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetWebAuthorizations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLInitTakeoutSession.cs\">\r\n      <Link>TL\\Functions\\Account\\TLInitTakeoutSession.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLResetWebAuthorization.cs\">\r\n      <Link>TL\\Functions\\Account\\TLResetWebAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLResetWebAuthorizations.cs\">\r\n      <Link>TL\\Functions\\Account\\TLResetWebAuthorizations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLSaveSecureValue.cs\">\r\n      <Link>TL\\Functions\\Account\\TLSaveSecureValue.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLSendVerifyEmailCode.cs\">\r\n      <Link>TL\\Functions\\Account\\TLSendVerifyEmailCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLSendVerifyPhoneCode.cs\">\r\n      <Link>TL\\Functions\\Account\\TLSendVerifyPhoneCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLVerifyEmail.cs\">\r\n      <Link>TL\\Functions\\Account\\TLVerifyEmail.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLVerifyEmailCode.cs\">\r\n      <Link>TL\\Functions\\Account\\TLVerifyEmailCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Account\\TLVerifyPhone.cs\">\r\n      <Link>TL\\Functions\\Account\\TLVerifyPhone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Auth\\TLBindTempAuthKey.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLBindTempAuthKey.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Channels\\TLChangeFeedBroadcast.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLChangeFeedBroadcast.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Channels\\TLGetFeed.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetFeed.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Channels\\TLReadFeed.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLReadFeed.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Channels\\TLSetFeedBroadcasts.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLSetFeedBroadcasts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Contacts\\TLGetSaved.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetSaved.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Help\\TLGetDeepLinkInfo.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetDeepLinkInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Help\\TLGetPassportConfig.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetPassportConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Help\\TLGetProxyData.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetProxyData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Messages\\TLClearAllDrafts.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLClearAllDrafts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Messages\\TLGetDialogUnreadMarks.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetDialogUnreadMarks.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Messages\\TLMarkDialogUnread.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLMarkDialogUnread.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Messages\\TLReport.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Messages\\TLSearchStickerSets.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSearchStickerSets.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Messages\\TLToggleTopPeers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLToggleTopPeers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Upload\\TLGetWebFile.cs\">\r\n      <Link>TL\\Functions\\Upload\\TLGetWebFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\Functions\\Users\\TLSetSecureValueErrors.cs\">\r\n      <Link>TL\\Functions\\Users\\TLSetSecureValueErrors.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLAppUpdate.cs\">\r\n      <Link>TL\\TLAppUpdate.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLAuthorizationForm.cs\">\r\n      <Link>TL\\TLAuthorizationForm.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLContactsSettings.cs\">\r\n      <Link>TL\\TLContactsSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLDeepLinkInfo.cs\">\r\n      <Link>TL\\TLDeepLinkInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLDialogPeer.cs\">\r\n      <Link>TL\\TLDialogPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLFeedBroadcasts.cs\">\r\n      <Link>TL\\TLFeedBroadcasts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLFeedPosition.cs\">\r\n      <Link>TL\\TLFeedPosition.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLFeedSources.cs\">\r\n      <Link>TL\\TLFeedSources.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLFoundStickerSets.cs\">\r\n      <Link>TL\\TLFoundStickerSets.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLInputCheckPasswordSRP.cs\">\r\n      <Link>TL\\TLInputCheckPasswordSRP.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLInputClientProxy.cs\">\r\n      <Link>TL\\TLInputClientProxy.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLInputDialogPeer.cs\">\r\n      <Link>TL\\TLInputDialogPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLInputMessage.cs\">\r\n      <Link>TL\\TLInputMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLInputSecureFile.cs\">\r\n      <Link>TL\\TLInputSecureFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLInputSecureValue.cs\">\r\n      <Link>TL\\TLInputSecureValue.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLInvokeWithMessageRange.cs\">\r\n      <Link>TL\\TLInvokeWithMessageRange.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLPassportConfig.cs\">\r\n      <Link>TL\\TLPassportConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLPasswordKdfAlgo.cs\">\r\n      <Link>TL\\TLPasswordKdfAlgo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLProxyData.cs\">\r\n      <Link>TL\\TLProxyData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSavedPhoneContact.cs\">\r\n      <Link>TL\\TLSavedPhoneContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSecureCredentialsEncrypted.cs\">\r\n      <Link>TL\\TLSecureCredentialsEncrypted.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSecureData.cs\">\r\n      <Link>TL\\TLSecureData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSecureFile.cs\">\r\n      <Link>TL\\TLSecureFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSecurePasswordKdfAlgo.cs\">\r\n      <Link>TL\\TLSecurePasswordKdfAlgo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSecureRequiredType.cs\">\r\n      <Link>TL\\TLSecureRequiredType.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSecureSecretSettings.cs\">\r\n      <Link>TL\\TLSecureSecretSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSecureValue.cs\">\r\n      <Link>TL\\TLSecureValue.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSecureValueError.cs\">\r\n      <Link>TL\\TLSecureValueError.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSecureValueHash.cs\">\r\n      <Link>TL\\TLSecureValueHash.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSecureValuePlainData.cs\">\r\n      <Link>TL\\TLSecureValuePlainData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSecureValueType.cs\">\r\n      <Link>TL\\TLSecureValueType.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLSentEmailCode.cs\">\r\n      <Link>TL\\TLSentEmailCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLTakeout.cs\">\r\n      <Link>TL\\TLTakeout.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLTermsOfServiceUpdate.cs\">\r\n      <Link>TL\\TLTermsOfServiceUpdate.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLWebAuthorization.cs\">\r\n      <Link>TL\\TLWebAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\TL\\TLWebAuthorizations.cs\">\r\n      <Link>TL\\TLWebAuthorizations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api.WP8\\Transport\\TCPTransportWinRT.cs\">\r\n      <Link>Transport\\TCPTransportWinRT.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Aggregator\\EventAggregator.cs\">\r\n      <Link>Aggregator\\EventAggregator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Aggregator\\ExtensionMethods.cs\">\r\n      <Link>Aggregator\\ExtensionMethods.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Helpers\\Notifications.cs\">\r\n      <Link>Helpers\\Notifications.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Logs\\Log.cs\">\r\n      <Link>Logs\\Log.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Connection\\PublicConfigService.cs\">\r\n      <Link>Services\\Connection\\PublicConfigService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\DeviceInfo\\EmptyDeviceInfoService.cs\">\r\n      <Link>Services\\DeviceInfo\\EmptyDeviceInfoService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\DeviceInfo\\IDeviceInfo.cs\">\r\n      <Link>Services\\DeviceInfo\\IDeviceInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\FileManagerBase.cs\">\r\n      <Link>Services\\FileManager\\FileManagerBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Channel.cs\">\r\n      <Link>Services\\MTProtoService.Channel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Langpack.cs\">\r\n      <Link>Services\\MTProtoService.Langpack.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Payments.cs\">\r\n      <Link>Services\\MTProtoService.Payments.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Phone.cs\">\r\n      <Link>Services\\MTProtoService.Phone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLChangePhone.cs\">\r\n      <Link>TL\\Functions\\Account\\TLChangePhone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLCheckPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLCheckPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLConfirmPhone.cs\">\r\n      <Link>TL\\Functions\\Account\\TLConfirmPhone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLGetAuthorizations.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetAuthorizations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLGetPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLGetPasswordSettings.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetPasswordSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLGetTmpPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetTmpPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLGetWallPapers.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetWallPapers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLRecoverPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLRecoverPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLReportPeer.cs\">\r\n      <Link>TL\\Functions\\Account\\TLReportPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLRequestPasswordRecovery.cs\">\r\n      <Link>TL\\Functions\\Account\\TLRequestPasswordRecovery.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLResetAuthorization.cs\">\r\n      <Link>TL\\Functions\\Account\\TLResetAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLResetPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLResetPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLSendChangePhoneCode.cs\">\r\n      <Link>TL\\Functions\\Account\\TLSendChangePhoneCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLSendConfirmPhoneCode.cs\">\r\n      <Link>TL\\Functions\\Account\\TLSendConfirmPhoneCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLSetPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLSetPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLUpdateDeviceLocked.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdateDeviceLocked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLUpdatePasswordSettings.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdatePasswordSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLCancelCode.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLCancelCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLResendCode.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLResendCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLCheckUsername.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLCheckUsername.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLCreateChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLCreateChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLDeleteChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLDeleteChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLDeleteChannelMessages.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLDeleteChannelMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLDeleteHistory.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLDeleteHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLDeleteUserHistory.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLDeleteUserHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLEditAbout.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLEditAbout.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLEditAdmin.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLEditAdmin.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLEditMessage.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLEditMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLEditPhoto.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLEditPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLEditTitle.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLEditTitle.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLExportInvite.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLExportInvite.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLExportMessageLink.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLExportMessageLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetAdminedPublicChannels.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetAdminedPublicChannels.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetChannels.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetChannels.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetDialogs.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetFullChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetFullChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetImportantHistory.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetImportantHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetMessageEditData.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetMessageEditData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetMessages.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetParticipant.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetParticipant.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetParticipants.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetParticipants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLInviteToChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLInviteToChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLJoinChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLJoinChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLKickFromChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLKickFromChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLLeaveChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLLeaveChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLReadHistory.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLReadHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLReadMessageContents.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLReadMessageContents.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLReportSpam.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLReportSpam.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLSetStickers.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLSetStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLToggleComments.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLToggleComments.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLToggleInvites.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLToggleInvites.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLTogglePreHistoryHidden.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLTogglePreHistoryHidden.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLToggleSignatures.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLToggleSignatures.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLUpdateChannelUsername.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLUpdateChannelUsername.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLUpdatePinnedMessage.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLUpdatePinnedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLGetTopPeers.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetTopPeers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLResetSaved.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLResetSaved.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLResetTopPeerRating.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLResetTopPeerRating.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLResolveUsername.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLResolveUsername.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetAppChangelog.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetAppChangelog.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetCdnConfig.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetCdnConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetRecentMeUrls.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetRecentMeUrls.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetTermsOfService.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetTermsOfService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLInvokeWithoutUpdates.cs\">\r\n      <Link>TL\\Functions\\Help\\TLInvokeWithoutUpdates.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Langpack\\TLGetDifference.cs\">\r\n      <Link>TL\\Functions\\Langpack\\TLGetDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Langpack\\TLGetLangPack.cs\">\r\n      <Link>TL\\Functions\\Langpack\\TLGetLangPack.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Langpack\\TLGetLanguages.cs\">\r\n      <Link>TL\\Functions\\Langpack\\TLGetLanguages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Langpack\\TLGetStrings.cs\">\r\n      <Link>TL\\Functions\\Langpack\\TLGetStrings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLBotGetCallbackAnswer.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLBotGetCallbackAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLCheckChatInvite.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLCheckChatInvite.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLClearRecentStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLClearRecentStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLDeactivateChat.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDeactivateChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLEditChatAdmin.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLEditChatAdmin.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLExportChatInvite.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLExportChatInvite.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLFaveSticker.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLFaveSticker.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetAllDrafts.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetAllDrafts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetAllStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetAllStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetArchivedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetArchivedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetAttachedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetAttachedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetCommonChats.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetCommonChats.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetDocumentByHash.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetDocumentByHash.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetFavedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetFavedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetFeaturedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetFeaturedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetInlineBotResults.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetInlineBotResults.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetMaskStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetMaskStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetPeerDialogs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetPeerDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetPeerSettings.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetPeerSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetPinnedDialogs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetPinnedDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetRecentLocations.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetRecentLocations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetRecentStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetRecentStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetSavedGifs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetSavedGifs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetStickerSet.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetUnreadMentions.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetUnreadMentions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetUnusedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetUnusedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetWebPage.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetWebPage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetWebPagePreview.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetWebPagePreview.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLHideReportSpam.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLHideReportSpam.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLImportChatInvite.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLImportChatInvite.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLInstallStickerSet.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLInstallStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLMigrateChat.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLMigrateChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReadFeaturedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadFeaturedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReadMentions.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadMentions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReorderPinnedDialogs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReorderPinnedDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReorderStickerSets.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReorderStickerSets.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReportSpam.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReportSpam.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSaveDraft.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSaveDraft.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSaveGif.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSaveGif.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSearchGifs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSearchGifs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSendInlineBotResult.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendInlineBotResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSendMultiMedia.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendMultiMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSetBotCallbackAnswer.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSetBotCallbackAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSetInlineBotResults.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSetInlineBotResults.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLStartBot.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLStartBot.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLToggleChatAdmins.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLToggleChatAdmins.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLToggleDialogPin.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLToggleDialogPin.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLUninstallStickerSet.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLUninstallStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLUploadMedia.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLUploadMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLClearSavedInfo.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLClearSavedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLGetPaymentForm.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLGetPaymentForm.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLGetPaymentReceipt.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLGetPaymentReceipt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLGetSavedInfo.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLGetSavedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLSendPaymentForm.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLSendPaymentForm.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLValidateRequestedInfo.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLValidateRequestedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLAcceptCall.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLAcceptCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLConfirmCall.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLConfirmCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLDiscardCall.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLDiscardCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLGetCallConfig.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLGetCallConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLReceivedCall.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLReceivedCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLRequestCall.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLRequestCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLSaveCallDebug.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLSaveCallDebug.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLSetCallRating.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLSetCallRating.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Updates\\TLGetChannelDifference.cs\">\r\n      <Link>TL\\Functions\\Updates\\TLGetChannelDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Upload\\TLGetCdnFile.cs\">\r\n      <Link>TL\\Functions\\Upload\\TLGetCdnFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Upload\\TLReuploadCdnFile.cs\">\r\n      <Link>TL\\Functions\\Upload\\TLReuploadCdnFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAccountAuthorization.cs\">\r\n      <Link>TL\\TLAccountAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAccountAuthorizations.cs\">\r\n      <Link>TL\\TLAccountAuthorizations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAccountDaysTTL.cs\">\r\n      <Link>TL\\TLAccountDaysTTL.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLActionInfo.cs\">\r\n      <Link>TL\\TLActionInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAdminLogResults.cs\">\r\n      <Link>TL\\TLAdminLogResults.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAffectedMessages.cs\">\r\n      <Link>TL\\TLAffectedMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAllStrickers.cs\">\r\n      <Link>TL\\TLAllStrickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAppChangelogBase.cs\">\r\n      <Link>TL\\TLAppChangelogBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLArchivedStickers.cs\">\r\n      <Link>TL\\TLArchivedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotCallbackAnswer.cs\">\r\n      <Link>TL\\TLBotCallbackAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotCommand.cs\">\r\n      <Link>TL\\TLBotCommand.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotInfo.cs\">\r\n      <Link>TL\\TLBotInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotInlineMessage.cs\">\r\n      <Link>TL\\TLBotInlineMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotInlineResult.cs\">\r\n      <Link>TL\\TLBotInlineResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotResults.cs\">\r\n      <Link>TL\\TLBotResults.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCallsSecurity.cs\">\r\n      <Link>TL\\TLCallsSecurity.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCameraSettings.cs\">\r\n      <Link>TL\\TLCameraSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCdnConfig.cs\">\r\n      <Link>TL\\TLCdnConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCdnFile.cs\">\r\n      <Link>TL\\TLCdnFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCdnPublicKey.cs\">\r\n      <Link>TL\\TLCdnPublicKey.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelAdminLogEvent.cs\">\r\n      <Link>TL\\TLChannelAdminLogEvent.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelAdminLogEventAction.cs\">\r\n      <Link>TL\\TLChannelAdminLogEventAction.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelAdminLogEventsFilter.cs\">\r\n      <Link>TL\\TLChannelAdminLogEventsFilter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelAdminRights.cs\">\r\n      <Link>TL\\TLChannelAdminRights.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelBannedRights.cs\">\r\n      <Link>TL\\TLChannelBannedRights.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelDifference.cs\">\r\n      <Link>TL\\TLChannelDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelMessagesFiler.cs\">\r\n      <Link>TL\\TLChannelMessagesFiler.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelParticipant.cs\">\r\n      <Link>TL\\TLChannelParticipant.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelParticipantRole.cs\">\r\n      <Link>TL\\TLChannelParticipantRole.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelParticipantsFilter.cs\">\r\n      <Link>TL\\TLChannelParticipantsFilter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChatInvite.cs\">\r\n      <Link>TL\\TLChatInvite.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChatSettings.cs\">\r\n      <Link>TL\\TLChatSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCodeType.cs\">\r\n      <Link>TL\\TLCodeType.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLConfigSimple.cs\">\r\n      <Link>TL\\TLConfigSimple.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLContactLink.cs\">\r\n      <Link>TL\\TLContactLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDataJSON.cs\">\r\n      <Link>TL\\TLDataJSON.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDisabledFeature.cs\">\r\n      <Link>TL\\TLDisabledFeature.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDocumentAttribute.cs\">\r\n      <Link>TL\\TLDocumentAttribute.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDraftMessage.cs\">\r\n      <Link>TL\\TLDraftMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLExportedMessageLink.cs\">\r\n      <Link>TL\\TLExportedMessageLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFavedStickers.cs\">\r\n      <Link>TL\\TLFavedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFeaturedStickers.cs\">\r\n      <Link>TL\\TLFeaturedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFoundGif.cs\">\r\n      <Link>TL\\TLFoundGif.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFoundGifs.cs\">\r\n      <Link>TL\\TLFoundGifs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLGame.cs\">\r\n      <Link>TL\\TLGame.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLHashtagItem.cs\">\r\n      <Link>TL\\TLHashtagItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLHighScore.cs\">\r\n      <Link>TL\\TLHighScore.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLHighScores.cs\">\r\n      <Link>TL\\TLHighScores.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInlineBotSwitchPM.cs\">\r\n      <Link>TL\\TLInlineBotSwitchPM.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputBotInlineMessage.cs\">\r\n      <Link>TL\\TLInputBotInlineMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputBotInlineMessageId.cs\">\r\n      <Link>TL\\TLInputBotInlineMessageId.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputBotInlineResult.cs\">\r\n      <Link>TL\\TLInputBotInlineResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputChatBase.cs\">\r\n      <Link>TL\\TLInputChatBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputGame.cs\">\r\n      <Link>TL\\TLInputGame.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputMessageEntityMentionName.cs\">\r\n      <Link>TL\\TLInputMessageEntityMentionName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPaymentCredentials.cs\">\r\n      <Link>TL\\TLInputPaymentCredentials.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPhoneCall.cs\">\r\n      <Link>TL\\TLInputPhoneCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPrivacyKey.cs\">\r\n      <Link>TL\\TLInputPrivacyKey.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPrivacyRule.cs\">\r\n      <Link>TL\\TLInputPrivacyRule.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputReportReason.cs\">\r\n      <Link>TL\\TLInputReportReason.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputSingleMedia.cs\">\r\n      <Link>TL\\TLInputSingleMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputStickeredMedia.cs\">\r\n      <Link>TL\\TLInputStickeredMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputStickerSet.cs\">\r\n      <Link>TL\\TLInputStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputWebDocument.cs\">\r\n      <Link>TL\\TLInputWebDocument.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInvoice.cs\">\r\n      <Link>TL\\TLInvoice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLIpPort.cs\">\r\n      <Link>TL\\TLIpPort.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLKeyboardButton.cs\">\r\n      <Link>TL\\TLKeyboardButton.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLKeyboardButtonRow.cs\">\r\n      <Link>TL\\TLKeyboardButtonRow.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLLabeledPrice.cs\">\r\n      <Link>TL\\TLLabeledPrice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLLangPackDifference.cs\">\r\n      <Link>TL\\TLLangPackDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLLangPackLanguage.cs\">\r\n      <Link>TL\\TLLangPackLanguage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLLangPackString.cs\">\r\n      <Link>TL\\TLLangPackString.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMaskCoords.cs\">\r\n      <Link>TL\\TLMaskCoords.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageEditData.cs\">\r\n      <Link>TL\\TLMessageEditData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageEntity.cs\">\r\n      <Link>TL\\TLMessageEntity.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageFwdHeader.cs\">\r\n      <Link>TL\\TLMessageFwdHeader.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageGroup.cs\">\r\n      <Link>TL\\TLMessageGroup.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageRange.cs\">\r\n      <Link>TL\\TLMessageRange.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessagesChannelParticipants.cs\">\r\n      <Link>TL\\TLMessagesChannelParticipants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessagesStickerSet.cs\">\r\n      <Link>TL\\TLMessagesStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPage.cs\">\r\n      <Link>TL\\TLPage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPageBlock.cs\">\r\n      <Link>TL\\TLPageBlock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPasscodeParams.cs\">\r\n      <Link>TL\\TLPasscodeParams.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPassword.cs\">\r\n      <Link>TL\\TLPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPasswordInputSettings.cs\">\r\n      <Link>TL\\TLPasswordInputSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPasswordRecovery.cs\">\r\n      <Link>TL\\TLPasswordRecovery.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPasswordSettings.cs\">\r\n      <Link>TL\\TLPasswordSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentCharge.cs\">\r\n      <Link>TL\\TLPaymentCharge.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentForm.cs\">\r\n      <Link>TL\\TLPaymentForm.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentReceipt.cs\">\r\n      <Link>TL\\TLPaymentReceipt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentRequestedInfo.cs\">\r\n      <Link>TL\\TLPaymentRequestedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentResult.cs\">\r\n      <Link>TL\\TLPaymentResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentSavedCredentialsCard.cs\">\r\n      <Link>TL\\TLPaymentSavedCredentialsCard.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPeerDialogs.cs\">\r\n      <Link>TL\\TLPeerDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPeerSettings.cs\">\r\n      <Link>TL\\TLPeerSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhoneCall.cs\">\r\n      <Link>TL\\TLPhoneCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhoneCallDiscardReason.cs\">\r\n      <Link>TL\\TLPhoneCallDiscardReason.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhoneCallProtocol.cs\">\r\n      <Link>TL\\TLPhoneCallProtocol.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhoneConnection.cs\">\r\n      <Link>TL\\TLPhoneConnection.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhonePhoneCall.cs\">\r\n      <Link>TL\\TLPhonePhoneCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhotoPickerSettings.cs\">\r\n      <Link>TL\\TLPhotoPickerSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPopularContact.cs\">\r\n      <Link>TL\\TLPopularContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPostAddress.cs\">\r\n      <Link>TL\\TLPostAddress.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPrivacyKey.cs\">\r\n      <Link>TL\\TLPrivacyKey.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPrivacyRule.cs\">\r\n      <Link>TL\\TLPrivacyRule.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPrivacyRules.cs\">\r\n      <Link>TL\\TLPrivacyRules.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLProxyConfig.cs\">\r\n      <Link>TL\\TLProxyConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLReceivedNotifyMessage.cs\">\r\n      <Link>TL\\TLReceivedNotifyMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRecentlyUsedSticker.cs\">\r\n      <Link>TL\\TLRecentlyUsedSticker.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRecentMeUrl.cs\">\r\n      <Link>TL\\TLRecentMeUrl.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRecentMeUrls.cs\">\r\n      <Link>TL\\TLRecentMeUrls.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRecentStickers.cs\">\r\n      <Link>TL\\TLRecentStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLReplyKeyboardMarkup.cs\">\r\n      <Link>TL\\TLReplyKeyboardMarkup.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLResolvedPeer.cs\">\r\n      <Link>TL\\TLResolvedPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLResultInfo.cs\">\r\n      <Link>TL\\TLResultInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRichText.cs\">\r\n      <Link>TL\\TLRichText.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSavedGifs.cs\">\r\n      <Link>TL\\TLSavedGifs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSavedInfo.cs\">\r\n      <Link>TL\\TLSavedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSentChangePhoneCode.cs\">\r\n      <Link>TL\\TLSentChangePhoneCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSentCodeType.cs\">\r\n      <Link>TL\\TLSentCodeType.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLShippingOption.cs\">\r\n      <Link>TL\\TLShippingOption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStickerPack.cs\">\r\n      <Link>TL\\TLStickerPack.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStickers.cs\">\r\n      <Link>TL\\TLStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStickerSet.cs\">\r\n      <Link>TL\\TLStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStickerSetCovered.cs\">\r\n      <Link>TL\\TLStickerSetCovered.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStickerSetInstallResult.cs\">\r\n      <Link>TL\\TLStickerSetInstallResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTermsOfService.cs\">\r\n      <Link>TL\\TLTermsOfService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTmpPassword.cs\">\r\n      <Link>TL\\TLTmpPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTopPeer.cs\">\r\n      <Link>TL\\TLTopPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTopPeerCategory.cs\">\r\n      <Link>TL\\TLTopPeerCategory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTopPeerCategoryPeers.cs\">\r\n      <Link>TL\\TLTopPeerCategoryPeers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTopPeers.cs\">\r\n      <Link>TL\\TLTopPeers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLValidatedRequestedInfo.cs\">\r\n      <Link>TL\\TLValidatedRequestedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLWebDocument.cs\">\r\n      <Link>TL\\TLWebDocument.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLWebFile.cs\">\r\n      <Link>TL\\TLWebFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLWebPage.cs\">\r\n      <Link>TL\\TLWebPage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Transport\\SocksProxy.cs\">\r\n      <Link>Transport\\SocksProxy.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\WindowsPhone\\BigInteger.cs\">\r\n      <Link>WindowsPhone\\BigInteger.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\WindowsPhone\\Tuple.cs\">\r\n      <Link>WindowsPhone\\Tuple.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Hash\\CRC32\\CRC.WinRT.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"Resources\\AppResources.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"crypto\">\r\n      <HintPath>..\\packages\\Portable.BouncyCastle.1.7.0.2\\lib\\portable-net4+sl5+wp8+win8+wpa81+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10\\crypto.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Core\">\r\n      <HintPath>..\\packages\\Rx-Core.2.2.5\\lib\\portable-win81+wpa81\\System.Reactive.Core.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Interfaces\">\r\n      <HintPath>..\\packages\\Rx-Interfaces.2.2.5\\lib\\portable-win81+wpa81\\System.Reactive.Interfaces.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Linq\">\r\n      <HintPath>..\\packages\\Rx-Linq.2.2.5\\lib\\portable-win81+wpa81\\System.Reactive.Linq.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n    <PRIResource Include=\"Resources\\ru\\Resources.resw\" />\r\n    <PRIResource Include=\"Resources\\pt\\Resources.resw\" />\r\n    <PRIResource Include=\"Resources\\nl\\Resources.resw\" />\r\n    <PRIResource Include=\"Resources\\it\\Resources.resw\" />\r\n    <PRIResource Include=\"Resources\\es\\Resources.resw\" />\r\n    <PRIResource Include=\"Resources\\de\\Resources.resw\" />\r\n    <PRIResource Include=\"Resources\\en\\Resources.resw\" />\r\n  </ItemGroup>\r\n  <ItemGroup />\r\n  <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\Portable\\$(TargetFrameworkVersion)\\Microsoft.Portable.CSharp.targets\" />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\r\n    <PropertyGroup>\r\n      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>\r\n    </PropertyGroup>\r\n    <Error Condition=\"!Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\\.nuget\\NuGet.targets'))\" />\r\n  </Target>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "Telegram.Api.PCL/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Portable.BouncyCastle\" version=\"1.7.0.2\" targetFramework=\"portable-win81+wpa81\" />\r\n  <package id=\"Rx-Core\" version=\"2.2.5\" targetFramework=\"portable-win81+wpa81\" />\r\n  <package id=\"Rx-Interfaces\" version=\"2.2.5\" targetFramework=\"portable-win81+wpa81\" />\r\n  <package id=\"Rx-Linq\" version=\"2.2.5\" targetFramework=\"portable-win81+wpa81\" />\r\n  <package id=\"Rx-Main\" version=\"2.2.5\" targetFramework=\"portable-win81+wpa81\" />\r\n  <package id=\"Rx-PlatformServices\" version=\"2.2.5\" targetFramework=\"portable-win81+wpa81\" />\r\n  <package id=\"Rx-WinRT\" version=\"2.2.5\" targetFramework=\"portable-win81+wpa81\" />\r\n</packages>"
  },
  {
    "path": "Telegram.Api.WP8/Properties/AssemblyInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Telegram.Api.WP8\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Telegram.Api.WP8\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"e79d5093-8038-4a5f-8a98-ca38c0d0886f\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code was generated by a tool.\r\n//     Runtime Version:4.0.30319.42000\r\n//\r\n//     Changes to this file may cause incorrect behavior and will be lost if\r\n//     the code is regenerated.\r\n// </auto-generated>\r\n//------------------------------------------------------------------------------\r\n\r\nnamespace Telegram.Api.Resources {\r\n    using System;\r\n    \r\n    \r\n    /// <summary>\r\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\r\n    /// </summary>\r\n    // This class was auto-generated by the StronglyTypedResourceBuilder\r\n    // class via a tool like ResGen or Visual Studio.\r\n    // To add or remove a member, edit your .ResX file then rerun ResGen\r\n    // with the /str option, or rebuild your VS project.\r\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"4.0.0.0\")]\r\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r\n    internal class AppResources {\r\n        \r\n        private static global::System.Resources.ResourceManager resourceMan;\r\n        \r\n        private static global::System.Globalization.CultureInfo resourceCulture;\r\n        \r\n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n        internal AppResources() {\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Returns the cached ResourceManager instance used by this class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Resources.ResourceManager ResourceManager {\r\n            get {\r\n                if (object.ReferenceEquals(resourceMan, null)) {\r\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"Telegram.Api.Resources.AppResources\", typeof(AppResources).Assembly);\r\n                    resourceMan = temp;\r\n                }\r\n                return resourceMan;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Overrides the current thread's CurrentUICulture property for all\r\n        ///   resource lookups using this strongly typed resource class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Globalization.CultureInfo Culture {\r\n            get {\r\n                return resourceCulture;\r\n            }\r\n            set {\r\n                resourceCulture = value;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Deleted account.\r\n        /// </summary>\r\n        internal static string DeletedUser {\r\n            get {\r\n                return ResourceManager.GetString(\"DeletedUser\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Deleted account.\r\n        /// </summary>\r\n        internal static string EmptyUser {\r\n            get {\r\n                return ResourceManager.GetString(\"EmptyUser\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Saved messages.\r\n        /// </summary>\r\n        internal static string SavedMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"SavedMessages\", resourceCulture);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.de.Designer.cs",
    "content": ""
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.de.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Gelöschtes Konto</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Gelöschtes Konto</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Gespeichertes</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.es.Designer.cs",
    "content": ""
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.es.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Cuenta eliminada</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Cuenta eliminada</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Mensajes guardados</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.it.Designer.cs",
    "content": ""
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.it.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Account eliminato</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Account eliminato</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Messaggi salvati</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.nl.Designer.cs",
    "content": ""
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.nl.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Verwijderd account</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Verwijderd account</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Bewaarde berichten</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.pt.Designer.cs",
    "content": ""
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.pt.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Conta excluída</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Conta excluída</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Saved messages</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Deleted account</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Deleted account</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Saved messages</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.ru.Designer.cs",
    "content": ""
  },
  {
    "path": "Telegram.Api.WP8/Resources/AppResources.ru.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Удаленный аккаунт</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Удаленный аккаунт</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Избранное</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "Telegram.Api.WP8/Services/FileManager/IWebFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public interface IWebFileManager\r\n    {\r\n        void DownloadFile(TLInt dcId, TLInputWebFileGeoPointLocation file, string fileName, TLObject owner);\r\n        void DownloadFile(TLInt dcId, TLInputWebFileGeoPointLocation file, string fileName, TLObject owner, System.Action<DownloadableItem> callback);\r\n        void CancelDownloadFile(TLObject owner);\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/Services/FileManager/WebFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Linq;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.FileManager\r\n{\r\n    public class WebFileManager : FileManagerBase, IWebFileManager\r\n    {\r\n        public WebFileManager(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService)\r\n            : base(eventAggregator, mtProtoService)\r\n        {\r\n            for (var i = 0; i < Constants.WorkersNumber; i++)\r\n            {\r\n                var worker = new Worker(OnDownloading, \"webDownloader\"+i);\r\n                _workers.Add(worker);\r\n            }\r\n        }\r\n\r\n        private void OnDownloading(object state)\r\n        {\r\n            DownloadablePart part = null;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Canceled)\r\n                    {\r\n\r\n                        _items.RemoveAt(i--);\r\n\r\n                        try\r\n                        {\r\n                            _eventAggregator.Publish(new DownloadingCanceledEventArgs(item));\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteException(e);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                foreach (var item in _items)\r\n                {\r\n                    part = item.Parts.FirstOrDefault(x => x.Status == PartStatus.Ready);\r\n                    if (part != null)\r\n                    {\r\n                        part.Status = PartStatus.Processing;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (part == null)\r\n            {\r\n                var currentWorker = (Worker)state;\r\n                currentWorker.Stop();\r\n                return;\r\n            }\r\n\r\n            bool canceled;\r\n            ProcessFilePart(part, part.ParentItem.DCId, part.ParentItem.InputLocation, out canceled);\r\n            if (canceled)\r\n            {\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    part.ParentItem.Canceled = true;\r\n                    part.Status = PartStatus.Processed;\r\n                    _items.Remove(part.ParentItem);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            // indicate progress\r\n            // indicate complete\r\n            bool isComplete;\r\n            bool isCanceled;\r\n            var progress = 0.0;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                part.Status = PartStatus.Processed;\r\n\r\n                var data = part.File.Bytes.Data;\r\n                if (data.Length < part.Limit.Value && (part.Number + 1) != part.ParentItem.Parts.Count)\r\n                {\r\n                    var complete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                    if (!complete)\r\n                    {\r\n                        var emptyBufferSize = part.Limit.Value - data.Length;\r\n                        var position = data.Length;\r\n\r\n                        var missingPart = new DownloadablePart(part.ParentItem, new TLInt(position), new TLInt(emptyBufferSize), -part.Number);\r\n\r\n                        var currentItemIndex = part.ParentItem.Parts.IndexOf(part);\r\n                        part.ParentItem.Parts.Insert(currentItemIndex + 1, missingPart);\r\n                    }\r\n                }\r\n\r\n                isCanceled = part.ParentItem.Canceled;\r\n\r\n                isComplete = part.ParentItem.Parts.All(x => x.Status == PartStatus.Processed);\r\n                if (!isComplete)\r\n                {\r\n                    var downloadedCount = part.ParentItem.Parts.Count(x => x.Status == PartStatus.Processed);\r\n                    var count = part.ParentItem.Parts.Count;\r\n                    progress = (double)downloadedCount / count;\r\n                }\r\n                else\r\n                {\r\n                    _items.Remove(part.ParentItem);\r\n                }\r\n            }\r\n\r\n            if (!isCanceled)\r\n            {\r\n                if (isComplete)\r\n                {\r\n                    byte[] bytes = { };\r\n                    foreach (var p in part.ParentItem.Parts)\r\n                    {\r\n                        bytes = TLUtils.Combine(bytes, p.File.Bytes.Data);\r\n                    }\r\n                    //part.ParentItem.Location.Buffer = bytes;\r\n\r\n                    var fileName = part.ParentItem.FileName.ToString();\r\n\r\n                    StringLocker.Lock(fileName, () => FileUtils.WriteBytes(fileName, bytes));\r\n\r\n                    if (part.ParentItem.Callback != null)\r\n                    {\r\n                        Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            part.ParentItem.Callback.SafeInvoke(part.ParentItem);\r\n                            if (part.ParentItem.Callbacks != null)\r\n                            {\r\n                                foreach (var callback in part.ParentItem.Callbacks)\r\n                                {\r\n                                    callback.SafeInvoke(part.ParentItem);\r\n                                }\r\n                            }\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.BeginOnThreadPool(() => _eventAggregator.Publish(part.ParentItem));\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    //Execute.BeginOnThreadPool(() => _eventAggregator.Publish(new ProgressChangedEventArgs(part.ParentItem, progress)));\r\n                }\r\n            }\r\n        }\r\n\r\n        protected DownloadableItem GetDownloadableItem(TLInt dcId, TLInputWebFileGeoPointLocation location, string fileName, TLObject owner, TLInt fileSize, Action<DownloadableItem> callback)\r\n        {\r\n            var item = new DownloadableItem\r\n            {\r\n                Owner = owner,\r\n                DCId = dcId,\r\n                Callback = callback,\r\n                InputLocation = location\r\n            };\r\n            item.Parts = GetItemParts(fileSize, item);\r\n\r\n            return item;\r\n        }\r\n\r\n        public void DownloadFile(TLInt dcId, TLInputWebFileGeoPointLocation file, string fileName, TLObject owner)\r\n        {\r\n            DownloadFile(dcId, file, fileName, owner, null);\r\n        }\r\n\r\n        public void DownloadFile(TLInt dcId, TLInputWebFileGeoPointLocation file, string fileName, TLObject owner, Action<DownloadableItem> callback)\r\n        {\r\n            var downloadableItem = GetDownloadableItem(dcId, file, fileName, owner, new TLInt(0), callback);\r\n            downloadableItem.FileName = new TLString(fileName);\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                bool addFile = true;\r\n                foreach (var item in _items)\r\n                {\r\n                    if (item.InputLocation.LocationEquals(file)\r\n                        && item.Owner == owner)\r\n                    {\r\n                        addFile = false;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (addFile)\r\n                {\r\n                    _items.Add(downloadableItem);\r\n                }\r\n            }\r\n\r\n            StartAwaitingWorkers();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/Services/Location/ILiveLocationService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Location\r\n{\r\n    public interface ILiveLocationService\r\n    {\r\n        void Load();\r\n\r\n        void UpdateAll();\r\n\r\n        void LoadAndUpdateAllAsync();\r\n\r\n        void Add(TLMessage70 messageBase);\r\n\r\n        void UpdateAsync(TLMessage70 message, TLGeoPointBase geoPoint, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null);\r\n\r\n        TLMessage Get(TLPeerBase peer, TLInt fromId);\r\n\r\n        IList<TLMessage> Get();\r\n\r\n        void Clear();\r\n\r\n        void StopAllAsync();\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/Services/Location/LiveLocationService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Device.Location;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Services.Location\r\n{\r\n    public class LiveLocationService : ILiveLocationService, IHandle<TLUpdateEditMessage>, IHandle<TLUpdateEditChannelMessage>\r\n    {\r\n        private readonly TLVector<TLMessageBase> _messages;\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        private readonly object _liveLocationsSyncRoot = new object();\r\n\r\n        private readonly Timer _timer;\r\n\r\n        public LiveLocationService(IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n        {\r\n            _timer = new Timer(OnTick);\r\n            _timer.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);\r\n\r\n            _mtProtoService = mtProtoService;\r\n            _eventAggregator = eventAggregator;\r\n\r\n            _eventAggregator.Subscribe(this);\r\n\r\n            _messages = new TLVector<TLMessageBase>();\r\n        }\r\n\r\n        private void OnTick(object state)\r\n        {\r\n            UpdateAll();\r\n\r\n            SetNextTimer();\r\n        }\r\n\r\n        public void LoadAndUpdateAllAsync()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                Load();\r\n\r\n                UpdateAll();\r\n\r\n                SetNextTimer();\r\n            });\r\n        }\r\n\r\n        public void StopAllAsync()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                lock (_liveLocationsSyncRoot)\r\n                {\r\n                    for (var i = 0; i < _messages.Count; i++)\r\n                    {\r\n                        var message = _messages[i] as TLMessage70;\r\n                        if (message != null)\r\n                        {\r\n                            var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                            if (mediaGeoLive != null)\r\n                            {\r\n                                mediaGeoLive.Date = message.Date;\r\n                                mediaGeoLive.EditDate = message.EditDate;\r\n                                if (!mediaGeoLive.Active)\r\n                                {\r\n                                    _messages.RemoveAt(i--);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_liveLocationsSyncRoot, Constants.LiveLocationsFileName, _messages);\r\n\r\n                var messages = new List<TLMessage70>();\r\n                lock (_liveLocationsSyncRoot)\r\n                {\r\n                    for (var i = 0; i < _messages.Count; i++)\r\n                    {\r\n                        var message = _messages[i] as TLMessage70;\r\n                        if (message != null)\r\n                        {\r\n                            messages.Add(message);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (messages.Count > 0)\r\n                {\r\n                    var handles = new List<WaitHandle>();\r\n\r\n                    foreach (var message in messages)\r\n                    {\r\n                        var m = message;\r\n                        var waitHandle = new ManualResetEvent(false);\r\n                        handles.Add(waitHandle);\r\n                        UpdateAsync(m,\r\n                            new TLGeoPointEmpty(),\r\n                            result =>\r\n                            {\r\n                                waitHandle.Set();\r\n                            },\r\n                            error =>\r\n                            {\r\n                                waitHandle.Set();\r\n                            });\r\n                    }\r\n\r\n#if DEBUG\r\n                    var timeout = Timeout.InfiniteTimeSpan;\r\n#else\r\n                var timeout = TimeSpan.FromSeconds(30.0);\r\n#endif\r\n\r\n                    var noTimeout = WaitHandle.WaitAll(handles.ToArray(), timeout);\r\n\r\n                    if (noTimeout)\r\n                    {\r\n                        lock (_liveLocationsSyncRoot)\r\n                        {\r\n                            _messages.Clear();\r\n                        }\r\n\r\n                        TLUtils.SaveObjectToMTProtoFile(_liveLocationsSyncRoot, Constants.LiveLocationsFileName, _messages);\r\n\r\n                        _eventAggregator.Publish(new LiveLocationClearedEventArgs());\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    lock (_liveLocationsSyncRoot)\r\n                    {\r\n                        _messages.Clear();\r\n                    }\r\n\r\n                    TLUtils.SaveObjectToMTProtoFile(_liveLocationsSyncRoot, Constants.LiveLocationsFileName, _messages);\r\n\r\n                    _eventAggregator.Publish(new LiveLocationClearedEventArgs());\r\n                }\r\n            });\r\n        }\r\n\r\n        public void UpdateAll()\r\n        {\r\n            var removedMessages = new List<TLMessage>();\r\n            lock (_liveLocationsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _messages.Count; i++)\r\n                {\r\n                    var message = _messages[i] as TLMessage70;\r\n                    if (message != null)\r\n                    {\r\n                        var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                        if (mediaGeoLive != null)\r\n                        {\r\n                            mediaGeoLive.Date = message.Date;\r\n                            mediaGeoLive.EditDate = message.EditDate;\r\n                            if (!mediaGeoLive.Active)\r\n                            {\r\n                                removedMessages.Add(message);\r\n                                _messages.RemoveAt(i--);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (removedMessages.Count > 0)\r\n            {\r\n                _eventAggregator.Publish(new LiveLocationRemovedEventArgs { Messages = removedMessages });\r\n            }\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_liveLocationsSyncRoot, Constants.LiveLocationsFileName, _messages);\r\n\r\n            var messages = new List<TLMessage70>();\r\n            lock (_liveLocationsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _messages.Count; i++)\r\n                {\r\n                    var message = _messages[i] as TLMessage70;\r\n                    if (message != null)\r\n                    {\r\n                        var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                        if (mediaGeoLive != null && mediaGeoLive.Active)\r\n                        {\r\n                            var period = mediaGeoLive.Period.Value > 3600 ? 180 : 90;\r\n\r\n                            var clientDelta = _mtProtoService.ClientTicksDelta;\r\n                            //var utc0SecsLong = message.EditDate.Value * 4294967296 - clientDelta;\r\n                            var utc0SecsInt = message.EditDate.Value - clientDelta / 4294967296.0;\r\n\r\n                            var nextTime = Utils.UnixTimestampToDateTime(utc0SecsInt + period);\r\n\r\n                            if (nextTime <= DateTime.Now.AddSeconds(30.0))\r\n                            {\r\n                                messages.Add(message);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (messages.Count > 0)\r\n            {\r\n                GeoCoordinate location;\r\n                using (var coordinateWatcher = new GeoCoordinateWatcher())\r\n                {\r\n                    coordinateWatcher.TryStart(false, TimeSpan.FromMilliseconds(1000));\r\n\r\n                    location = coordinateWatcher.Position.Location;\r\n\r\n                    coordinateWatcher.Stop();\r\n                }\r\n\r\n                if (!location.IsUnknown)\r\n                {\r\n                    var handles = new List<WaitHandle>();\r\n\r\n                    foreach (var message in messages)\r\n                    {\r\n                        var m = message;\r\n                        var waitHandle = new ManualResetEvent(false);\r\n                        handles.Add(waitHandle);\r\n                        UpdateAsync(m,\r\n                            new TLGeoPoint\r\n                            {\r\n                                Lat = new TLDouble(location.Latitude),\r\n                                Long = new TLDouble(location.Longitude)\r\n                            },\r\n                            result =>\r\n                            {\r\n                                waitHandle.Set();\r\n                            },\r\n                            error =>\r\n                            {\r\n                                waitHandle.Set();\r\n                            });\r\n                    }\r\n\r\n#if DEBUG\r\n                    var timeout = Timeout.InfiniteTimeSpan;\r\n#else\r\n                    var timeout = TimeSpan.FromSeconds(30.0);\r\n#endif\r\n\r\n\r\n                    var noTimeout = WaitHandle.WaitAll(handles.ToArray(), timeout);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SetNextTimer()\r\n        {\r\n            var timeSpan = GetTimeSpan();\r\n            _timer.Change(timeSpan, Timeout.InfiniteTimeSpan);\r\n        }\r\n\r\n        public IList<TLMessage> Get()\r\n        {\r\n            var list = new List<TLMessage>();\r\n\r\n            lock (_liveLocationsSyncRoot)\r\n            {\r\n                for (var index = _messages.Count - 1; index >= 0; index--)\r\n                {\r\n                    var messageBase = _messages[index];\r\n                    var message = messageBase as TLMessage48;\r\n                    if (message != null)\r\n                    {\r\n                        var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                        if (mediaGeoLive != null)\r\n                        {\r\n                            mediaGeoLive.EditDate = message.EditDate;\r\n                            mediaGeoLive.Date = message.Date;\r\n                            if (mediaGeoLive.Active)\r\n                            {\r\n                                list.Add(message);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return list;\r\n        }\r\n\r\n        public TLMessage Get(TLPeerBase peer, TLInt fromId)\r\n        {\r\n            try\r\n            {\r\n                lock (_liveLocationsSyncRoot)\r\n                {\r\n                    for (var index = _messages.Count - 1; index >= 0; index--)\r\n                    {\r\n                        var messageBase = _messages[index];\r\n                        var message = messageBase as TLMessage48;\r\n                        if (message != null\r\n                            && message.FromId.Value == fromId.Value)\r\n                        {\r\n                            var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                            if (mediaGeoLive != null)\r\n                            {\r\n                                mediaGeoLive.EditDate = message.EditDate;\r\n                                mediaGeoLive.Date = message.Date;\r\n                                if (mediaGeoLive.Active)\r\n                                {\r\n                                    if (peer is TLPeerUser\r\n                                        && message.ToId is TLPeerUser\r\n                                        && !message.Out.Value\r\n                                        && peer.Id.Value == message.FromId.Value)\r\n                                    {\r\n                                        return message;\r\n                                    }\r\n\r\n                                    if (peer is TLPeerUser\r\n                                        && message.ToId is TLPeerUser\r\n                                        && message.Out.Value\r\n                                        && peer.Id.Value == message.ToId.Id.Value)\r\n                                    {\r\n                                        return message;\r\n                                    }\r\n\r\n                                    if (peer is TLPeerChat\r\n                                        && message.ToId is TLPeerChat\r\n                                        && peer.Id.Value == message.ToId.Id.Value)\r\n                                    {\r\n                                        return message;\r\n                                    }\r\n\r\n                                    if (peer is TLPeerChannel\r\n                                        && message.ToId is TLPeerChannel\r\n                                        && peer.Id.Value == message.ToId.Id.Value)\r\n                                    {\r\n                                        return message;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public void Load()\r\n        {\r\n            if (_messages == null) return;\r\n\r\n            var messages = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLMessageBase>>(_liveLocationsSyncRoot, Constants.LiveLocationsFileName) ?? new TLVector<TLMessageBase>();\r\n\r\n            var m = new List<TLMessage>();\r\n            lock (_liveLocationsSyncRoot)\r\n            {\r\n                _messages.Clear();\r\n                foreach (var messageBase in messages)\r\n                {\r\n                    var message = messageBase as TLMessage70;\r\n                    if (message != null)\r\n                    {\r\n                        if (message.InputPeer == null)\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                        if (mediaGeoLive != null)\r\n                        {\r\n                            mediaGeoLive.EditDate = message.EditDate;\r\n                            mediaGeoLive.Date = message.Date;\r\n                            if (!mediaGeoLive.Active)\r\n                            {\r\n                                continue;\r\n                            }\r\n                        }\r\n\r\n                        _messages.Add(messageBase);\r\n                        m.Add(message);\r\n                    }\r\n                }\r\n            }\r\n\r\n            _eventAggregator.Publish(new LiveLocationLoadedEventArgs { Messages = m });\r\n        }\r\n\r\n        public void Clear()\r\n        {\r\n            lock (_liveLocationsSyncRoot)\r\n            {\r\n                _messages.Clear();\r\n            }\r\n\r\n            FileUtils.Delete(_liveLocationsSyncRoot, Constants.LiveLocationsFileName);\r\n\r\n            _eventAggregator.Publish(new LiveLocationClearedEventArgs());\r\n        }\r\n\r\n        private TimeSpan GetTimeSpan()\r\n        {\r\n            var timeSpan = Timeout.InfiniteTimeSpan;\r\n            lock (_liveLocationsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _messages.Count; i++)\r\n                {\r\n                    var message = _messages[i] as TLMessage70;\r\n                    if (message != null)\r\n                    {\r\n                        var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                        if (mediaGeoLive != null && mediaGeoLive.Active)\r\n                        {\r\n                            var period = mediaGeoLive.Period.Value > 3600 ? 180 : 90;\r\n\r\n                            var editDate = message.EditDate != null && message.EditDate.Value > message.Date.Value\r\n                                ? message.EditDate.Value\r\n                                : message.Date.Value;\r\n\r\n                            // edit date + update interval\r\n                            var clientDelta = _mtProtoService.ClientTicksDelta;\r\n                            //var utc0SecsLong = editDate * 4294967296 - clientDelta;\r\n                            var utc0SecsInt = editDate - clientDelta / 4294967296.0;\r\n\r\n                            var nextEditDate1 = Utils.UnixTimestampToDateTime(utc0SecsInt + period);\r\n                            var timeSpan1 = nextEditDate1 - DateTime.Now;\r\n                            if (timeSpan1.Ticks < 0) timeSpan1 = new TimeSpan(0);\r\n\r\n                            // date + period\r\n                            //utc0SecsLong = message.Date.Value * 4294967296 - clientDelta;\r\n                            utc0SecsInt = message.Date.Value - clientDelta / 4294967296.0;\r\n\r\n                            var nextEditDate2 = Utils.UnixTimestampToDateTime(utc0SecsInt + mediaGeoLive.Period.Value);\r\n                            var timeSpan2 = nextEditDate2 - DateTime.Now;\r\n                            if (timeSpan2.Ticks < 0) timeSpan2 = new TimeSpan(0);\r\n\r\n                            var currentTimeSpan = timeSpan1.Ticks < timeSpan2.Ticks ? timeSpan1 : timeSpan2;\r\n                            if (currentTimeSpan < timeSpan || timeSpan == Timeout.InfiniteTimeSpan)\r\n                            {\r\n                                timeSpan = currentTimeSpan;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return timeSpan;\r\n        }\r\n\r\n        public void Add(TLMessage70 message)\r\n        {\r\n            message.InputPeer = _mtProtoService.PeerToInputPeer(message.ToId);\r\n\r\n            lock (_liveLocationsSyncRoot)\r\n            {\r\n                _messages.Add(message);\r\n            }\r\n\r\n            SetNextTimer();\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_liveLocationsSyncRoot, Constants.LiveLocationsFileName, _messages);\r\n\r\n            _eventAggregator.Publish(new LiveLocationAddedEventArgs { Message = message });\r\n        }\r\n\r\n        public void Remove(TLMessage message)\r\n        {\r\n            lock (_liveLocationsSyncRoot)\r\n            {\r\n                _messages.Remove(message);\r\n            }\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_liveLocationsSyncRoot, Constants.LiveLocationsFileName, _messages);\r\n\r\n            SetNextTimer();\r\n\r\n            _eventAggregator.Publish(new LiveLocationRemovedEventArgs { Messages = new List<TLMessage> { message } });\r\n        }\r\n\r\n        public void UpdateAsync(TLMessage70 message, TLGeoPointBase geoPointBase, Action<TLUpdatesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            TLMessage70 m;\r\n            lock (_liveLocationsSyncRoot)\r\n            {\r\n                m = _messages.FirstOrDefault(\r\n                    x => x.Index == message.Index\r\n                    && ((TLMessage)x).ToId.GetType() == message.ToId.GetType()\r\n                    && ((TLMessage)x).ToId.Id.Value == message.ToId.Id.Value) as TLMessage70;\r\n            }\r\n            if (m == null || m.InputPeer == null)\r\n            {\r\n                faultCallback.SafeInvoke(null);\r\n                return;\r\n            };\r\n\r\n            var stopGeoLive = false;\r\n            TLInputGeoPoint inputGeoPoint = null;\r\n            var geoPoint = geoPointBase as TLGeoPoint;\r\n            if (geoPoint != null)\r\n            {\r\n                inputGeoPoint = new TLInputGeoPoint { Lat = geoPoint.Lat, Long = geoPoint.Long };\r\n            }\r\n            else\r\n            {\r\n                stopGeoLive = true;\r\n            }\r\n\r\n            _mtProtoService.EditMessageAsync(m.InputPeer, message.Id, null, null, null, null, false, stopGeoLive, inputGeoPoint,\r\n                result =>\r\n                {\r\n                    m.EditDate = TLUtils.DateToUniversalTimeTLInt(_mtProtoService.ClientTicksDelta, DateTime.Now);\r\n                    var mediaGeoLive = m.Media as TLMessageMediaGeoLive;\r\n                    if (mediaGeoLive != null)\r\n                    {\r\n                        mediaGeoLive.EditDate = m.EditDate;\r\n                    }\r\n\r\n                    if (stopGeoLive)\r\n                    {\r\n                        Remove(m);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                },\r\n                error =>\r\n                {\r\n                    // handle 400 MESSAGE_EDIT_TIME_EXPIRED, MESSAGE_ID_INVALID, ...\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (error.TypeEquals(ErrorType.MESSAGE_NOT_MODIFIED))\r\n                        {\r\n                            m.EditDate = TLUtils.DateToUniversalTimeTLInt(_mtProtoService.ClientTicksDelta, DateTime.Now);\r\n                            var mediaGeoLive = m.Media as TLMessageMediaGeoLive;\r\n                            if (mediaGeoLive != null)\r\n                            {\r\n                                mediaGeoLive.EditDate = m.EditDate;\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Remove(m);\r\n                        }\r\n                    }\r\n\r\n                    faultCallback.SafeInvoke(error);\r\n                    Execute.ShowDebugMessage(\"messages.editMessage error \" + error);\r\n                });\r\n        }\r\n\r\n        private void UpdateAndRemoveAt(int i, TLMessage message, TLMessage updatedMessage)\r\n        {\r\n            message.Update(updatedMessage);\r\n\r\n            var messageMediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n            if (messageMediaGeoLive != null && !messageMediaGeoLive.Active)\r\n            {\r\n                _messages.RemoveAt(i);\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_liveLocationsSyncRoot, Constants.LiveLocationsFileName, _messages);\r\n\r\n                SetNextTimer();\r\n\r\n                _eventAggregator.Publish(new LiveLocationRemovedEventArgs { Messages = new List<TLMessage> { message } });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateEditMessage update)\r\n        {\r\n            var updatedMessage = update.Message as TLMessage;\r\n            if (updatedMessage != null)\r\n            {\r\n                lock (_liveLocationsSyncRoot)\r\n                {\r\n                    if (_messages == null)\r\n                    {\r\n                        Load();\r\n                    }\r\n\r\n                    if (_messages == null) return;\r\n\r\n                    for (var i = 0; i < _messages.Count; i++)\r\n                    {\r\n                        var message = _messages[i] as TLMessage;\r\n                        if (message != null && message.Index == updatedMessage.Index)\r\n                        {\r\n                            var peer = updatedMessage.ToId;\r\n                            if (peer is TLPeerUser\r\n                                && message.ToId is TLPeerUser\r\n                                && !message.Out.Value\r\n                                && peer.Id.Value == message.FromId.Value)\r\n                            {\r\n                                UpdateAndRemoveAt(i, message, updatedMessage);\r\n                                return;\r\n                            }\r\n\r\n                            if (peer is TLPeerUser\r\n                                && message.ToId is TLPeerUser\r\n                                && message.Out.Value\r\n                                && peer.Id.Value == message.ToId.Id.Value)\r\n                            {\r\n                                UpdateAndRemoveAt(i, message, updatedMessage);\r\n                                return;\r\n                            }\r\n\r\n                            if (peer is TLPeerChat\r\n                                && message.ToId is TLPeerChat\r\n                                && peer.Id.Value == message.ToId.Id.Value)\r\n                            {\r\n                                UpdateAndRemoveAt(i, message, updatedMessage);\r\n                                return;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateEditChannelMessage update)\r\n        {\r\n            var updatedMessage = update.Message as TLMessage;\r\n            if (updatedMessage != null)\r\n            {\r\n                lock (_liveLocationsSyncRoot)\r\n                {\r\n                    if (_messages == null)\r\n                    {\r\n                        Load();\r\n                    }\r\n\r\n                    if (_messages == null) return;\r\n\r\n                    for (var i = 0; i < _messages.Count; i++)\r\n                    {\r\n                        var message = _messages[i] as TLMessage;\r\n                        if (message != null && message.Index == updatedMessage.Index)\r\n                        {\r\n                            var peer = updatedMessage.ToId;\r\n                            if (peer is TLPeerChannel\r\n                                && message.ToId is TLPeerChannel\r\n                                && peer.Id.Value == message.ToId.Id.Value)\r\n                            {\r\n                                UpdateAndRemoveAt(i, message, updatedMessage);\r\n\r\n                                return;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class LiveLocationAddedEventArgs\r\n    {\r\n        public TLMessage Message { get; set; }\r\n    }\r\n\r\n    public class LiveLocationRemovedEventArgs\r\n    {\r\n        public IList<TLMessage> Messages { get; set; }\r\n    }\r\n\r\n    public class LiveLocationClearedEventArgs\r\n    {\r\n\r\n    }\r\n\r\n    public class LiveLocationLoadedEventArgs\r\n    {\r\n        public IList<TLMessage> Messages { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLAcceptAuthorization.cs",
    "content": "﻿namespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLAcceptAuthorization : TLObject\r\n    {\r\n        public const uint Signature = 0xe7027c94;\r\n\r\n        public TLInt BotId { get; set; }\r\n\r\n        public TLString Scope { get; set; }\r\n\r\n        public TLString PublicKey { get; set; }\r\n\r\n        public TLVector<TLSecureValueHash> ValueHashes { get; set; }\r\n\r\n        public TLSecureCredentialsEncrypted Credentials { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                BotId.ToBytes(),\r\n                Scope.ToBytes(),\r\n                PublicKey.ToBytes(),\r\n                ValueHashes.ToBytes(),\r\n                Credentials.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLDeleteSecureValue.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    public class TLDeleteSecureValue : TLObject\r\n    {\r\n        public const uint Signature = 0xb880bc4b;\r\n\r\n        public TLVector<TLSecureValueTypeBase> Types { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Types.ToBytes());\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLGetAllSecureValues.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    public class TLGetAllSecureValues : TLObject\r\n    {\r\n        public const uint Signature = 0xb288bc7d;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLGetAuthorizationForm.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLGetAuthorizationForm : TLObject\r\n    {\r\n        public const uint Signature = 0xb86ba8e1;\r\n\r\n        public TLInt BotId { get; set; }\r\n\r\n        public TLString Scope { get; set; }\r\n\r\n        public TLString PublicKey { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                BotId.ToBytes(),\r\n                Scope.ToBytes(),\r\n                PublicKey.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLGetSecureValue.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    public class TLGetSecureValue : TLObject\r\n    {\r\n        public const uint Signature = 0x73665bc2;\r\n\r\n        public TLVector<TLSecureValueTypeBase> Types { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Types.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLGetWebAuthorizations.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLGetWebAuthorizations : TLObject\r\n    {\r\n        public const uint Signature = 0x182e6d6f;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLInitTakeoutSession.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    [Flags]\r\n    public enum InitTakeoutSessionFlags\r\n    {\r\n        Contacts = 0x1,                 // 0\r\n        MessageUsers = 0x2,             // 1\r\n        MessageChats = 0x4,             // 2\r\n        MessageMegagroups = 0x8,        // 3\r\n        MessageChannels = 0x10,         // 4\r\n        Files = 0x20,                   // 5\r\n    }\r\n\r\n    class TLInitTakeoutSession : TLObject\r\n    {\r\n        public const uint Signature = 0x768a4999;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Contacts\r\n        {\r\n            get { return IsSet(_flags, (int)InitTakeoutSessionFlags.Contacts); }\r\n            set { SetUnset(ref _flags, value, (int)InitTakeoutSessionFlags.Contacts); }\r\n        }\r\n\r\n        public bool MessageUsers\r\n        {\r\n            get { return IsSet(_flags, (int)InitTakeoutSessionFlags.MessageUsers); }\r\n            set { SetUnset(ref _flags, value, (int)InitTakeoutSessionFlags.MessageUsers); }\r\n        }\r\n\r\n        public bool MessageChats\r\n        {\r\n            get { return IsSet(_flags, (int)InitTakeoutSessionFlags.MessageChats); }\r\n            set { SetUnset(ref _flags, value, (int)InitTakeoutSessionFlags.MessageChats); }\r\n        }\r\n\r\n        public bool MessageMegagroups\r\n        {\r\n            get { return IsSet(_flags, (int)InitTakeoutSessionFlags.MessageMegagroups); }\r\n            set { SetUnset(ref _flags, value, (int)InitTakeoutSessionFlags.MessageMegagroups); }\r\n        }\r\n\r\n        public bool MessageChannels\r\n        {\r\n            get { return IsSet(_flags, (int)InitTakeoutSessionFlags.MessageChannels); }\r\n            set { SetUnset(ref _flags, value, (int)InitTakeoutSessionFlags.MessageChannels); }\r\n        }\r\n\r\n        public bool Files\r\n        {\r\n            get { return IsSet(_flags, (int)InitTakeoutSessionFlags.Files); }\r\n            set { SetUnset(ref _flags, value, (int)InitTakeoutSessionFlags.Files); }\r\n        }\r\n\r\n        private TLInt _fileMaxSize;\r\n\r\n        public TLInt FileMaxSize\r\n        {\r\n            get { return _fileMaxSize; }\r\n            set { SetField(out _fileMaxSize, value, ref _flags, (int)InitTakeoutSessionFlags.Files); }\r\n        }\r\n\r\n        public TLLong TakeoutId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                ToBytes(_fileMaxSize, Flags, (int)InitTakeoutSessionFlags.Files),\r\n                TakeoutId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLResetWebAuthorization.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLResetWebAuthorization : TLObject\r\n    {\r\n        public const uint Signature = 0x2d01b9ef;\r\n\r\n        public TLLong Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLResetWebAuthorizations.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLResetWebAuthorizations : TLObject\r\n    {\r\n        public const uint Signature = 0x682d2594;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLSaveSecureValue.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLSaveSecureValue : TLObject\r\n    {\r\n        public const uint Signature = 0x899fe31d;\r\n\r\n        public TLInputSecureValue Value { get; set; }\r\n\r\n        public TLLong SecureSecretId { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Value.ToBytes(),\r\n                SecureSecretId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLSendVerifyEmailCode.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLSendVerifyEmailCode : TLObject\r\n    {\r\n        public const uint Signature = 0x7011509f;\r\n\r\n        public TLString Email { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Email.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLSendVerifyPhoneCode.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    [Flags]\r\n    public enum SendVerifyPhoneCodeFlags\r\n    {\r\n        AllowFlashcall = 0x1,      // 0\r\n    }\r\n\r\n    class TLSendVerifyPhoneCode : TLObject\r\n    {\r\n        public const uint Signature = 0x823380b4;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        private TLBool _currentNumber;\r\n\r\n        public TLBool CurrentNumber\r\n        {\r\n            get { return _currentNumber; }\r\n            set { SetField(out _currentNumber, value, ref _flags, (int)SendVerifyPhoneCodeFlags.AllowFlashcall); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                PhoneNumber.ToBytes(),\r\n                ToBytes(CurrentNumber, Flags, (int)SendVerifyPhoneCodeFlags.AllowFlashcall));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLVerifyEmail.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLVerifyEmail : TLObject\r\n    {\r\n        public const uint Signature = 0xecba39db;\r\n\r\n        public TLString Email { get; set; }\r\n\r\n        public TLString Code { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Email.ToBytes(),\r\n                Code.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLVerifyEmailCode.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLVerifyEmailCode\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Account/TLVerifyPhone.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Account\r\n{\r\n    class TLVerifyPhone : TLObject\r\n    {\r\n        public const uint Signature = 0x4dd3a7f6;\r\n\r\n        public TLString PhoneNumber { get; set; }\r\n\r\n        public TLString PhoneCodeHash { get; set; }\r\n\r\n        public TLString PhoneCode { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PhoneNumber.ToBytes(),\r\n                PhoneCodeHash.ToBytes(),\r\n                PhoneCode.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Auth/TLBindTempAuthKey.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Auth\r\n{\r\n    class TLBindTempAuthKey : TLObject\r\n    {\r\n        public const uint Signature = 0xcdd42a05;\r\n\r\n        public TLLong PermAuthKeyId { get; set; }\r\n\r\n        public TLLong Nonce { get; set; }\r\n\r\n        public TLInt ExpiresAt { get; set; }\r\n\r\n        public TLString EncryptedMessage { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                PermAuthKeyId.ToBytes(),\r\n                Nonce.ToBytes(),\r\n                ExpiresAt.ToBytes(),\r\n                EncryptedMessage.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Channels/TLChangeFeedBroadcast.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    [Flags]\r\n    public enum ChangeFeedBroadcastFlags\r\n    {\r\n        FeedId = 0x1\r\n    }\r\n\r\n    class TLChangeFeedBroadcast : TLObject\r\n    {\r\n        public const uint Signature = 0xffb37511;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLInputChannelBase Channel { get; set; }\r\n\r\n        private TLInt _feedId;\r\n\r\n        public TLInt FeedId\r\n        {\r\n            get { return _feedId; }\r\n            set { SetField(out _feedId, value, ref _flags, (int)ChangeFeedBroadcastFlags.FeedId); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Channel.ToBytes(),\r\n                ToBytes(FeedId, Flags, (int)ChangeFeedBroadcastFlags.FeedId));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Channels/TLGetFeed.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    [Flags]\r\n    public enum GetFeedFlags\r\n    {\r\n        OffsetPosition = 0x1,\r\n        MaxPosition = 0x2,\r\n        MinPosition = 0x4,\r\n        OffsetToMaxRead = 0x8,\r\n    }\r\n\r\n    class TLGetFeed : TLObject\r\n    {\r\n        public const uint Signature = 0xb90f450;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool OffsetToMaxRead\r\n        {\r\n            get { return IsSet(Flags, (int) GetFeedFlags.OffsetToMaxRead); }\r\n            set { SetUnset(ref _flags, value, (int) GetFeedFlags.OffsetToMaxRead); }\r\n        }\r\n\r\n        public TLInt FeedId { get; set; }\r\n\r\n        private TLFeedPosition _offsetPosition;\r\n\r\n        public TLFeedPosition OffsetPosition\r\n        {\r\n            get { return _offsetPosition; }\r\n            set { SetField(out _offsetPosition, value, ref _flags, (int)GetFeedFlags.OffsetPosition); }\r\n        }\r\n\r\n        public TLInt AddOffset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        private TLFeedPosition _maxPosition;\r\n\r\n        public TLFeedPosition MaxPosition\r\n        {\r\n            get { return _maxPosition; }\r\n            set { SetField(out _maxPosition, value, ref _flags, (int)GetFeedFlags.MaxPosition); }\r\n        }\r\n\r\n        private TLFeedPosition _minPosition;\r\n\r\n        public TLFeedPosition MinPosition\r\n        {\r\n            get { return _minPosition; }\r\n            set { SetField(out _minPosition, value, ref _flags, (int)GetFeedFlags.MinPosition); }\r\n        }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                FeedId.ToBytes(),\r\n                ToBytes(OffsetPosition, Flags, (int)GetFeedFlags.OffsetPosition),\r\n                AddOffset.ToBytes(),\r\n                Limit.ToBytes(),\r\n                ToBytes(MaxPosition, Flags, (int)GetFeedFlags.MaxPosition),\r\n                ToBytes(MinPosition, Flags, (int)GetFeedFlags.MinPosition),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Channels/TLReadFeed.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLReadFeed : TLObject\r\n    {\r\n        public const uint Signature = 0x9c3011d;\r\n\r\n        public TLInt FeedId { get; set; }\r\n\r\n        public TLFeedPosition MaxPosition { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                FeedId.ToBytes(),\r\n                MaxPosition.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Channels/TLSetFeedBroadcasts.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Channels\r\n{\r\n    class TLSetFeedBroadcasts : TLObject\r\n    {\r\n        public const uint Signature = 0xb5287d9a;\r\n\r\n        public TLInt FeedId { get; set; }\r\n\r\n        public TLVector<TLInputChannelBase> Channels { get; set; }\r\n\r\n        public TLBool AlsoNewlyJoined { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                FeedId.ToBytes(),\r\n                Channels.ToBytes(),\r\n                AlsoNewlyJoined.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Contacts/TLGetSaved.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Contacts\r\n{\r\n    class TLGetSaved : TLObject\r\n    {\r\n        public const uint Signature = 0x82f1e39f;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Help/TLGetDeepLinkInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    public class TLGetDeepLinkInfo : TLObject\r\n    {\r\n        public const uint Signature = 0x3fedc75f;\r\n\r\n        public TLString Path { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Path.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Help/TLGetPassportConfig.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    class TLGetPassportConfig : TLObject\r\n    {\r\n        public const uint Signature = 0xc661ad08;\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Help/TLGetProxyData.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Help\r\n{\r\n    class TLGetProxyData : TLObject\r\n    {\r\n        public const uint Signature = 0x3d7758e1;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Messages/TLClearAllDrafts.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLClearAllDrafts : TLObject\r\n    {\r\n        public const uint Signature = 0x7e58ee9c;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Messages/TLGetDialogUnreadMarks.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLGetDialogUnreadMarks : TLObject\r\n    {\r\n        public const uint Signature = 0x22e24e22;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Messages/TLMarkDialogUnread.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum MarkDialogUnreadFlags\r\n    {\r\n        Unread = 0x1\r\n    }\r\n\r\n    class TLMarkDialogUnread : TLObject\r\n    {\r\n        public const uint Signature = 0xc286d98f;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool Unread\r\n        {\r\n            get { return IsSet(Flags, (int)MarkDialogUnreadFlags.Unread); }\r\n            set { SetUnset(ref _flags, value, (int)MarkDialogUnreadFlags.Unread); }\r\n        }\r\n\r\n        public TLInputDialogPeerBase Peer { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Peer.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Messages/TLReport.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    public class TLReport : TLObject\r\n    {\r\n        public const uint Signature = 0xbd82b658;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public TLVector<TLInt> Id { get; set; }\r\n\r\n        public TLInputReportReasonBase Reason { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes(),\r\n                Id.ToBytes(),\r\n                Reason.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Messages/TLSearchStickerSets.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    [Flags]\r\n    public enum SearchStickerSetsFlags\r\n    {\r\n        ExcludeFeatured = 0x1,\r\n    }\r\n\r\n    class TLSearchStickerSets : TLObject\r\n    {\r\n        public const uint Signature = 0xc2b7d08b;\r\n\r\n        private TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool ExcludeFeatured\r\n        {\r\n            get { return IsSet(Flags, (int)SearchStickerSetsFlags.ExcludeFeatured); }\r\n            set { SetUnset(ref _flags, value, (int)SearchStickerSetsFlags.ExcludeFeatured); }\r\n        }\r\n\r\n        public TLString Q { get; set; }\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Q.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Messages/TLToggleTopPeers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Messages\r\n{\r\n    class TLToggleTopPeers : TLObject\r\n    {\r\n        public const uint Signature = 0x8514bdda;\r\n\r\n        public TLBool Enabled { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Enabled.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Upload/TLGetWebFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Upload\r\n{\r\n    public class TLGetWebFile : TLObject\r\n    {\r\n        public const uint Signature = 0x24e6818d;\r\n\r\n        public TLInputFileLocationBase Location { get; set; }\r\n\r\n        public TLInt Offset { get; set; }\r\n\r\n        public TLInt Limit { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Location.ToBytes(),\r\n                Offset.ToBytes(),\r\n                Limit.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/Functions/Users/TLSetSecureValueErrors.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL.Functions.Users\r\n{\r\n    class TLSetSecureValueErrors : TLObject\r\n    {\r\n        public const uint Signature = 0x90c894b5;\r\n\r\n        public TLInputUserBase Id { get; set; }\r\n\r\n        public TLVector<TLSecureValueErrorBase> Errors { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Errors.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLAppUpdate.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum AppUpdateFlags\r\n    {\r\n        Popup = 0x1,            // 0\r\n        Document = 0x2,         // 1\r\n        Url = 0x4,              // 2\r\n    }\r\n\r\n    public abstract class TLAppUpdateBase : TLObject { }\r\n\r\n    public class TLNoAppUpdate : TLAppUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLNoAppUpdate;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLAppUpdate : TLAppUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLAppUpdate;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n        public bool Popup\r\n        {\r\n            get { return IsSet(_flags, (int)AppUpdateFlags.Popup); }\r\n            set { SetUnset(ref _flags, value, (int)AppUpdateFlags.Popup); }\r\n        }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public TLString Version { get; set; }\r\n\r\n        public TLString Text { get; set; }\r\n\r\n        public TLVector<TLMessageEntityBase> Entities { get; set; }\r\n\r\n        protected TLDocumentBase _document;\r\n\r\n        public TLDocumentBase Document\r\n        {\r\n            get { return _document; }\r\n            set { SetField(out _document, value, ref _flags, (int)AppUpdateFlags.Document); }\r\n        }\r\n\r\n        protected TLString _url;\r\n\r\n        public TLString Url\r\n        {\r\n            get { return _url; }\r\n            set { SetField(out _url, value, ref _flags, (int)AppUpdateFlags.Url); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            Version = GetObject<TLString>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n            Entities = GetObject<TLVector<TLMessageEntityBase>>(bytes, ref position);\r\n            _document = GetObject<TLDocumentBase>(Flags, (int)AppUpdateFlags.Document, null, bytes, ref position);\r\n            _url = GetObject<TLString>(Flags, (int)AppUpdateFlags.Url, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLAuthorizationForm.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum AuthorizationFormFlags\r\n    {\r\n        PrivacyPolicyUrl = 0x1,         // 0\r\n        SelfieRequired = 0x2,           // 1\r\n    }\r\n\r\n    public class TLAuthorizationForm : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLAuthorizationForm;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool SelfieRequired { get { return IsSet(Flags, (int) AuthorizationFormFlags.SelfieRequired); } }\r\n\r\n        public TLVector<TLSecureValueTypeBase> RequiredTypes { get; set; }\r\n\r\n        public TLVector<TLSecureValue> Values { get; set; }\r\n\r\n        public TLVector<TLSecureValueErrorBase> Errors { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        protected TLString _privacyPolicyUrl;\r\n\r\n        public TLString PrivacyPolicyUrl\r\n        {\r\n            get { return _privacyPolicyUrl; }\r\n            set { SetField(out _privacyPolicyUrl, value, ref _flags, (int)AuthorizationFormFlags.PrivacyPolicyUrl); }\r\n        }\r\n\r\n        #region Additional\r\n        \r\n        public TLInt BotId { get; set; }\r\n\r\n        public TLString Scope { get; set; }\r\n\r\n        public TLString PublicKey { get; set; }\r\n\r\n        public TLString CallbackUrl { get; set; }\r\n\r\n        public TLString Payload { get; set; }\r\n\r\n        public TLPassportConfig Config { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            \r\n            _flags = GetObject<TLInt>(bytes, ref position);        \r\n            RequiredTypes = GetObject<TLVector<TLSecureValueTypeBase>>(bytes, ref position);\r\n            Values = GetObject<TLVector<TLSecureValue>>(bytes, ref position);\r\n            Errors = GetObject<TLVector<TLSecureValueErrorBase>>(bytes, ref position);     \r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            _privacyPolicyUrl = GetObject<TLString>(Flags, (int)AuthorizationFormFlags.PrivacyPolicyUrl, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLAuthorizationForm85 : TLAuthorizationForm\r\n    {\r\n        public new const uint Signature = TLConstructors.TLAuthorizationForm85;\r\n\r\n        public TLVector<TLSecureRequiredTypeBase> NewRequiredTypes { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            _flags = GetObject<TLInt>(bytes, ref position);\r\n            NewRequiredTypes = GetObject<TLVector<TLSecureRequiredTypeBase>>(bytes, ref position);\r\n            Values = GetObject<TLVector<TLSecureValue>>(bytes, ref position);\r\n            Errors = GetObject<TLVector<TLSecureValueErrorBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            _privacyPolicyUrl = GetObject<TLString>(Flags, (int)AuthorizationFormFlags.PrivacyPolicyUrl, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLContactsSettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ContactsSettingsFlags\r\n    {\r\n        SuggestFrequentContacts = 0x1,        // 0 obsolete\r\n    }\r\n\r\n    public class TLContactsSettings : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLContactsSettings;\r\n\r\n        private TLLong _flags;\r\n\r\n        public TLLong Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(TLUtils.SignatureToBytes(Signature), Flags.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Flags.ToStream(output);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLDeepLinkInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum DeepLinkInfoFlags\r\n    {\r\n        UpdateApp = 0x1,    // 0\r\n        Entities = 0x2,     // 1\r\n    }\r\n\r\n    public abstract class TLDeepLinkInfoBase : TLObject { }\r\n\r\n    public class TLDeepLinkInfoEmpty : TLDeepLinkInfoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDeepLinkInfoEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLDeepLinkInfo : TLDeepLinkInfoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDeepLinkInfo;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool UpdateApp { get { return IsSet(Flags, (int)DeepLinkInfoFlags.UpdateApp); } }\r\n\r\n        public TLString Message { get; set; }\r\n\r\n        protected TLVector<TLMessageEntityBase> _entities;\r\n\r\n        public TLVector<TLMessageEntityBase> Entities\r\n        {\r\n            get { return _entities; }\r\n            set { SetField(out _entities, value, ref _flags, (int)DeepLinkInfoFlags.Entities); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            _flags = GetObject<TLInt>(bytes, ref position);\r\n            Message = GetObject<TLString>(bytes, ref position);\r\n            _entities = GetObject<TLVector<TLMessageEntityBase>>(Flags, (int)DeepLinkInfoFlags.Entities, null, bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLDialogPeer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLDialogPeerBase : TLObject { }\r\n\r\n    public class TLDialogPeerFeed : TLDialogPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDialogPeerFeed;\r\n\r\n        public TLInt FeedId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            FeedId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                FeedId.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            FeedId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(FeedId.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLDialogPeer feed_id=\" + FeedId;\r\n        }\r\n    }\r\n\r\n    public class TLDialogPeer : TLDialogPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLDialogPeer;\r\n\r\n        public TLPeerBase Peer { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLPeerBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            output.Write(Peer.ToBytes());\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLDialogPeer peer=\" + Peer;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLFeedBroadcasts.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLFeedBroadcastsBase : TLObject\r\n    {\r\n        public TLVector<TLInt> Channels { get; set; }\r\n    }\r\n\r\n    public class TLFeedBroadcastsUngrouped : TLFeedBroadcastsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFeedBroadcastsUngrouped;\r\n        \r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Channels = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFeedBroadcasts : TLFeedBroadcastsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFeedBroadcasts;\r\n\r\n        public TLInt FeedId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            FeedId = GetObject<TLInt>(bytes, ref position);\r\n            Channels = GetObject<TLVector<TLInt>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLFeedPosition.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLFeedPosition : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLFeedPosition;\r\n        \r\n        public TLInt Date { get; set; }\r\n\r\n        public TLPeerBase Peer { get; set; }\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            Id = GetObject<TLInt>(bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Date.ToBytes(),\r\n                Peer.ToBytes(),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Date = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            Id = GetObject<TLInt>(input);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Date.ToStream(output);\r\n            Peer.ToStream(output);\r\n            Id.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLFeedSources.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum FeedSourcesFlags\r\n    {\r\n        NewlyJoinedFeed = 0x1\r\n    }\r\n\r\n    public abstract class TLFeedSourcesBase : TLObject { }\r\n\r\n    public class TLFeedSourcesNotModified : TLFeedSourcesBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFeedSourcesNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLFeedSources : TLFeedSourcesBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFeedSources;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        protected TLInt _newlyJoinedFeed;\r\n\r\n        public TLInt NewlyJoinedFeed\r\n        {\r\n            get { return _newlyJoinedFeed; }\r\n            set { SetField(out _newlyJoinedFeed, value, ref _flags, (int)FeedSourcesFlags.NewlyJoinedFeed); }\r\n        }\r\n\r\n        public TLVector<TLFeedBroadcastsBase> Feeds { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            _flags = GetObject<TLInt>(bytes, ref position);\r\n            _newlyJoinedFeed = GetObject<TLInt>(Flags, (int)FeedSourcesFlags.NewlyJoinedFeed, null, bytes, ref position);\r\n            \r\n            Feeds = GetObject<TLVector<TLFeedBroadcastsBase>>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLFoundStickerSets.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLFoundStickerSetsBase : TLObject { }\r\n\r\n    public class TLFoundStickerSetsNotModified : TLFoundStickerSetsBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLFoundStickerSetsNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLFoundStickerSets : TLFoundStickerSetsBase, IStickers\r\n    {\r\n        public const uint Signature = TLConstructors.TLFoundStickerSets;\r\n\r\n        public TLInt HashValue { get; set; }\r\n\r\n        public TLVector<TLStickerSetCoveredBase> SetsCovered { get; set; }\r\n\r\n        public TLVector<TLStickerSetBase> Sets\r\n        {\r\n            get\r\n            {\r\n                var sets = new TLVector<TLStickerSetBase>();\r\n                foreach (var setCovered in SetsCovered)\r\n                {\r\n                    sets.Add(setCovered.StickerSet);\r\n                }\r\n                return sets;\r\n            }\r\n            set\r\n            {\r\n                Execute.ShowDebugMessage(\"TLFoundStickerSets.Sets set\");\r\n            }\r\n        }\r\n\r\n        public TLVector<TLStickerPack> Packs { get; set; }\r\n\r\n        public TLVector<TLDocumentBase> Documents { get; set; }\r\n\r\n        public TLVector<TLMessagesStickerSet> MessagesStickerSets { get; set; }\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            HashValue = GetObject<TLInt>(bytes, ref position);\r\n            SetsCovered = GetObject<TLVector<TLStickerSetCoveredBase>>(bytes, ref position);\r\n\r\n            Packs = new TLVector<TLStickerPack>();\r\n            Documents = new TLVector<TLDocumentBase>();\r\n            MessagesStickerSets = new TLVector<TLMessagesStickerSet>();\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                HashValue.ToBytes(),\r\n                Sets.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            HashValue = GetObject<TLInt>(input);\r\n            Sets = GetObject<TLVector<TLStickerSetBase>>(input);\r\n\r\n            Packs = GetObject<TLVector<TLStickerPack>>(input);\r\n            Documents = GetObject<TLVector<TLDocumentBase>>(input);\r\n            MessagesStickerSets = GetObject<TLVector<TLMessagesStickerSet>>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            HashValue.ToStream(output);\r\n            Sets.ToStream(output);\r\n\r\n            Packs.ToStream(output);\r\n            Documents.ToStream(output);\r\n            MessagesStickerSets.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLInputCheckPasswordSRP.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputCheckPasswordBase : TLObject { }\r\n\r\n    public class TLInputCheckPasswordEmpty : TLInputCheckPasswordBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputCheckPasswordEmpty;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLInputCheckPasswordSRP : TLInputCheckPasswordBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputCheckPasswordSRP;\r\n\r\n        public TLLong SRPId { get; set; }\r\n\r\n        public TLString A { get; set; }\r\n\r\n        public TLString M1 { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                SRPId.ToBytes(),\r\n                A.ToBytes(),\r\n                M1.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLInputClientProxy.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInputClientProxy : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputClientProxy;\r\n\r\n        public TLString Address { get; set; }\r\n\r\n        public TLInt Port { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Address.ToBytes(),\r\n                Port.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Address.ToStream(output);\r\n            Port.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Address = GetObject<TLString>(input);\r\n            Port = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputClientProxy address={0} port={1}\", Address, Port);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLInputDialogPeer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputDialogPeerBase : TLObject { }\r\n\r\n    public class TLInputDialogPeerFeed : TLInputDialogPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputDialogPeerFeed;\r\n\r\n        public TLInt FeedId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            FeedId = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(TLInputPeerUser.Signature),\r\n                FeedId.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            FeedId.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            FeedId = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputDialogPeerFeed feed_id={0}\", FeedId);\r\n        }\r\n    }\r\n\r\n    public class TLInputDialogPeer : TLInputDialogPeerBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputDialogPeer;\r\n\r\n        public TLInputPeerBase Peer { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Peer = GetObject<TLInputPeerBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Peer.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Peer.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Peer = GetObject<TLInputPeerBase>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputDialogPeer peer={0}\", Peer);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLInputMessage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputMessageBase :  TLObject { }\r\n\r\n    public class TLInputMessageId : TLInputMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageId;\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputMessageId id={0}\", Id);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessageReplyTo : TLInputMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessageReplyTo;\r\n\r\n        public TLInt Id { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLInputMessageId id={0}\", Id);\r\n        }\r\n    }\r\n\r\n    public class TLInputMessagePinned : TLInputMessageBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputMessagePinned;\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return \"TLInputMessagePinned\";\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLInputSecureFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLInputSecureFileBase : TLObject { }\r\n\r\n    public class TLInputSecureFileUploaded : TLInputSecureFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputSecureFileUploaded;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLInt Parts { get; set; }\r\n\r\n        public TLString MD5Checksum { get; set; }\r\n\r\n        public TLString FileHash { get; set; }\r\n\r\n        public TLString Secret { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                Parts.ToBytes(),\r\n                MD5Checksum.ToBytes(),\r\n                FileHash.ToBytes(),\r\n                Secret.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLInputSecureFile : TLInputSecureFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputSecureFile;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Id.ToBytes(),\r\n                AccessHash.ToBytes());\r\n        }\r\n\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLInputSecureValue.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInputSecureValue : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLInputSecureValue;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLSecureValueTypeBase Type { get; set; }\r\n\r\n        protected TLSecureData _data;\r\n\r\n        public TLSecureData Data\r\n        {\r\n            get { return _data; }\r\n            set { SetField(out _data, value, ref _flags, (int)SecureValueFlags.Data); }\r\n        }\r\n\r\n        protected TLInputSecureFileBase _frontSide;\r\n\r\n        public TLInputSecureFileBase FrontSide\r\n        {\r\n            get { return _frontSide; }\r\n            set { SetField(out _frontSide, value, ref _flags, (int)SecureValueFlags.FrontSide); }\r\n        }\r\n\r\n        protected TLInputSecureFileBase _reverseSide;\r\n\r\n        public TLInputSecureFileBase ReverseSide\r\n        {\r\n            get { return _reverseSide; }\r\n            set { SetField(out _reverseSide, value, ref _flags, (int)SecureValueFlags.ReverseSide); }\r\n        }\r\n\r\n        protected TLInputSecureFileBase _selfie;\r\n\r\n        public TLInputSecureFileBase Selfie\r\n        {\r\n            get { return _selfie; }\r\n            set { SetField(out _selfie, value, ref _flags, (int)SecureValueFlags.Selfie); }\r\n        }\r\n\r\n        protected TLVector<TLInputSecureFileBase> _files;\r\n\r\n        public TLVector<TLInputSecureFileBase> Files\r\n        {\r\n            get { return _files; }\r\n            set { SetField(out _files, value, ref _flags, (int)SecureValueFlags.Files); }\r\n        }\r\n\r\n        protected TLSecurePlainDataBase _plainData;\r\n\r\n        public TLSecurePlainDataBase PlainData\r\n        {\r\n            get { return _plainData; }\r\n            set { SetField(out _plainData, value, ref _flags, (int)SecureValueFlags.PlainData); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Type.ToBytes(),\r\n                ToBytes(Data, Flags, (int)SecureValueFlags.Data),\r\n                ToBytes(_frontSide, Flags, (int)SecureValueFlags.FrontSide),\r\n                ToBytes(_reverseSide, Flags, (int)SecureValueFlags.ReverseSide),\r\n                ToBytes(_selfie, Flags, (int)SecureValueFlags.Selfie),\r\n                ToBytes(_files, Flags, (int)SecureValueFlags.Files),\r\n                ToBytes(_plainData, Flags, (int)SecureValueFlags.PlainData));\r\n        }\r\n    }\r\n\r\n    public class TLInputSecureValue85 : TLInputSecureValue\r\n    {\r\n        public new const uint Signature = TLConstructors.TLInputSecureValue85;\r\n\r\n        protected TLVector<TLInputSecureFileBase> _translation;\r\n\r\n        public TLVector<TLInputSecureFileBase> Translation\r\n        {\r\n            get { return _translation; }\r\n            set { SetField(out _translation, value, ref _flags, (int)SecureValueFlags.Translation); }\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Flags.ToBytes(),\r\n                Type.ToBytes(),\r\n                ToBytes(Data, Flags, (int)SecureValueFlags.Data),\r\n                ToBytes(_frontSide, Flags, (int)SecureValueFlags.FrontSide),\r\n                ToBytes(_reverseSide, Flags, (int)SecureValueFlags.ReverseSide),\r\n                ToBytes(_selfie, Flags, (int)SecureValueFlags.Selfie),\r\n                ToBytes(_translation, Flags, (int)SecureValueFlags.Translation),\r\n                ToBytes(_files, Flags, (int)SecureValueFlags.Files),\r\n                ToBytes(_plainData, Flags, (int)SecureValueFlags.PlainData));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLInvokeWithMessageRange.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    class TLInvokeWithMessageRange : TLObject\r\n    {\r\n        public const uint Signature = 0x365275f2;\r\n\r\n        public TLMessageRange Range { get; set; }\r\n\r\n        public TLObject Object { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Range.ToBytes(),\r\n                Object.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLInvokeWithTakeout.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLInvokeWithTakeout : TLObject\r\n    {\r\n        public const uint Signature = 0xaca9fd2e;\r\n\r\n        public TLLong TakeoutId { get; set; }\r\n\r\n        public TLObject Object { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                TakeoutId.ToBytes(),\r\n                Object.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLPassportConfig.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.IO;\r\nusing Windows.Data.Json;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLPassportConfigBase : TLObject { }\r\n\r\n    public class TLPassportConfigNotModified : TLPassportConfigBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPassportConfigNotModified;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLPassportConfig : TLPassportConfigBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPassportConfig;\r\n\r\n        public TLInt Hash { get; set; }\r\n\r\n        public TLDataJSON CountriesLangs { get; set; }\r\n\r\n        public JsonObject CountriesLangsObject { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLInt>(bytes, ref position);\r\n            CountriesLangs = GetObject<TLDataJSON>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Hash = GetObject<TLInt>(input);\r\n            CountriesLangs = GetObject<TLDataJSON>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n\r\n            Hash.ToStream(output);\r\n            CountriesLangs.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLPasswordKdfAlgo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLPasswordKdfAlgoBase : TLObject { }\r\n\r\n    public class TLPasswordKdfAlgoUnknown : TLPasswordKdfAlgoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPasswordKdfAlgoUnknown;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow : TLPasswordKdfAlgoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n\r\n        public TLString Salt1 { get; set; }\r\n\r\n        public TLString Salt2 { get; set; }\r\n\r\n        public TLInt G { get; set; }\r\n\r\n        public TLString P { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Salt1 = GetObject<TLString>(bytes, ref position);\r\n            Salt2 = GetObject<TLString>(bytes, ref position);\r\n            G = GetObject<TLInt>(bytes, ref position);\r\n            P = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Salt1.ToBytes(),\r\n                Salt2.ToBytes(),\r\n                G.ToBytes(),\r\n                P.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLProxyData.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum ProxyDataPromoCustomFlags\r\n    {\r\n        //Channel = 0x1,\r\n        Notified = 0x2,\r\n    }\r\n\r\n    public abstract class TLProxyDataBase : TLObject\r\n    {\r\n        public TLInt Expires { get; set; }\r\n\r\n        public abstract TLProxyDataBase GetEmptyObject();\r\n    }\r\n\r\n    public class TLProxyDataEmpty : TLProxyDataBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLProxyDataEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Expires.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Expires.ToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Expires = GetObject<TLInt>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLProxyDataBase GetEmptyObject()\r\n        {\r\n            return new TLProxyDataEmpty { Expires = Expires };\r\n        }\r\n    }\r\n\r\n    public class TLProxyDataPromo : TLProxyDataBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLProxyDataPromo;\r\n\r\n        protected TLLong _customFlags;\r\n\r\n        public TLLong CustomFlags\r\n        {\r\n            get { return _customFlags; }\r\n            set { _customFlags = value; }\r\n        }\r\n\r\n        public bool Notified\r\n        {\r\n            get { return IsSet(_customFlags, (int) ProxyDataPromoCustomFlags.Notified); }\r\n            set { SetUnset(ref _customFlags, value, (int) ProxyDataPromoCustomFlags.Notified); }\r\n        }\r\n\r\n        public TLPeerBase Peer { get; set; }\r\n\r\n        public TLVector<TLChatBase> Chats { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            Peer = GetObject<TLPeerBase>(bytes, ref position);\r\n            Chats = GetObject<TLVector<TLChatBase>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n            CustomFlags = new TLLong(0);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Expires.ToBytes(),\r\n                Peer.ToBytes(),\r\n                Chats.ToBytes(),\r\n                Users.ToBytes());\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Expires.ToStream(output);\r\n            Peer.ToStream(output);\r\n            Chats.ToStream(output);\r\n            Users.ToStream(output);\r\n\r\n            CustomFlags.NullableToStream(output);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Expires = GetObject<TLInt>(input);\r\n            Peer = GetObject<TLPeerBase>(input);\r\n            Chats = GetObject<TLVector<TLChatBase>>(input);\r\n            Users = GetObject<TLVector<TLUserBase>>(input);\r\n\r\n            CustomFlags = GetNullableObject<TLLong>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLProxyDataBase GetEmptyObject()\r\n        {\r\n            return new TLProxyDataPromo\r\n            {\r\n                Expires = Expires,\r\n                Peer = Peer,\r\n                Chats = new TLVector<TLChatBase>(),\r\n                Users = new TLVector<TLUserBase>(),\r\n                CustomFlags = new TLLong(0)\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSavedPhoneContact.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLSavedPhoneContact : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLSavedPhoneContact;\r\n\r\n        public TLString Phone { get; set; }\r\n\r\n        public TLString FirstName { get; set; }\r\n\r\n        public TLString LastName { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Phone = GetObject<TLString>(bytes, ref position);\r\n            FirstName = GetObject<TLString>(bytes, ref position);\r\n            LastName = GetObject<TLString>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSecureCredentialsEncrypted.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLSecureCredentialsEncrypted : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureCredentialsEncrypted;\r\n\r\n        public TLString Data { get; set; }\r\n\r\n        public TLString Secret { get; set; }\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Data = GetObject<TLString>(bytes, ref position);\r\n            Hash = GetObject<TLString>(bytes, ref position);\r\n            Secret = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Data.ToBytes(),\r\n                Hash.ToBytes(),\r\n                Secret.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSecureData.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLSecureData : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureData;\r\n\r\n        public TLString Data { get; set; }\r\n\r\n        public TLString DataHash { get; set; }\r\n\r\n        public TLString Secret { get; set; }\r\n\r\n        #region Additional\r\n        public object DecryptedData { get; set; }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Data = GetObject<TLString>(bytes, ref position);\r\n            DataHash = GetObject<TLString>(bytes, ref position);\r\n            Secret = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Data.ToBytes(),\r\n                DataHash.ToBytes(),\r\n                Secret.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Data = GetObject<TLString>(input);\r\n            DataHash = GetObject<TLString>(input);\r\n            Secret = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Data.ToStream(output);\r\n            DataHash.ToStream(output);\r\n            Secret.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSecureFile.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public interface ISecureFileError\r\n    {\r\n        TLString FileHash { get; set; }\r\n\r\n        string Error { get; set; }\r\n    }\r\n\r\n    public abstract class TLSecureFileBase : TLObject\r\n    {\r\n        private double _uploadingProgress;\r\n\r\n        public double UploadingProgress\r\n        {\r\n            get { return _uploadingProgress; }\r\n            set { SetField(ref _uploadingProgress, value, () => UploadingProgress); }\r\n        }\r\n\r\n        private int _uploadingSize;\r\n\r\n        public int UploadingSize\r\n        {\r\n            get { return _uploadingSize; }\r\n            set { SetField(ref _uploadingSize, value, () => UploadingSize); }\r\n        }\r\n\r\n        private double _downloadingProgress;\r\n\r\n        public double DownloadingProgress\r\n        {\r\n            get { return _downloadingProgress; }\r\n            set { SetField(ref _downloadingProgress, value, () => DownloadingProgress); }\r\n        }\r\n\r\n        public TLSecureFileBase Self { get { return this; } }\r\n\r\n        public abstract TLInputSecureFileBase ToInputSecureFile();\r\n    }\r\n\r\n    public class TLSecureFileEmpty : TLSecureFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureFileEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n\r\n        public override TLInputSecureFileBase ToInputSecureFile()\r\n        {\r\n            return null;\r\n        }\r\n    }\r\n\r\n    public class TLSecureFile : TLSecureFileBase, ISecureFileError\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureFile;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLLong AccessHash { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLInt DCId { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLString FileHash { get; set; }\r\n\r\n        public TLString Secret { get; set; }\r\n\r\n        public string Error { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n            AccessHash = GetObject<TLLong>(bytes, ref position);\r\n            Size = GetObject<TLInt>(bytes, ref position);\r\n            DCId = GetObject<TLInt>(bytes, ref position);\r\n            Date = GetObject<TLInt>(bytes, ref position);\r\n            FileHash = GetObject<TLString>(bytes, ref position);\r\n            Secret = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            AccessHash = GetObject<TLLong>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            DCId = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            FileHash = GetObject<TLString>(input);\r\n            Secret = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            AccessHash.ToStream(output);\r\n            Size.ToStream(output);\r\n            DCId.ToStream(output);\r\n            Date.ToStream(output);\r\n            FileHash.ToStream(output);\r\n            Secret.ToStream(output);\r\n        }\r\n\r\n        public override TLInputSecureFileBase ToInputSecureFile()\r\n        {\r\n            return new TLInputSecureFile { Id = Id, AccessHash = AccessHash };\r\n        }\r\n    }\r\n\r\n    public class TLSecureFileUploaded : TLSecureFileBase, ISecureFileError\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureFileUploaded;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public TLInt Parts { get; set; }\r\n\r\n        public TLString MD5Checksum { get; set; }\r\n\r\n        public TLInt Size { get; set; }\r\n\r\n        public TLInt Date { get; set; }\r\n\r\n        public TLString FileHash { get; set; }\r\n\r\n        public TLString Secret { get; set; }\r\n\r\n        public string Error { get; set; }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Id = GetObject<TLLong>(input);\r\n            Parts = GetObject<TLInt>(input);\r\n            MD5Checksum = GetObject<TLString>(input);\r\n            Size = GetObject<TLInt>(input);\r\n            Date = GetObject<TLInt>(input);\r\n            FileHash = GetObject<TLString>(input);\r\n            Secret = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Id.ToStream(output);\r\n            Parts.ToStream(output);\r\n            MD5Checksum.ToStream(output);\r\n            Size.ToStream(output);\r\n            Date.ToStream(output);\r\n            FileHash.ToStream(output);\r\n            Secret.ToStream(output);\r\n        }\r\n\r\n        public override TLInputSecureFileBase ToInputSecureFile()\r\n        {\r\n            return new TLInputSecureFileUploaded { Id = Id, Parts = Parts, MD5Checksum = MD5Checksum, FileHash = FileHash, Secret = Secret };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSecurePasswordKdfAlgo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLSecurePasswordKdfAlgoBase : TLObject { }\r\n\r\n    public class TLSecurePasswordKdfAlgoUnknown : TLSecurePasswordKdfAlgoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecurePasswordKdfAlgoUnknown;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n    }\r\n\r\n    public class TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 : TLSecurePasswordKdfAlgoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000;\r\n\r\n        public TLString Salt { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Salt = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Salt.ToBytes());\r\n        }\r\n    }\r\n\r\n    public class TLSecurePasswordKdfAlgoSHA512 : TLSecurePasswordKdfAlgoBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecurePasswordKdfAlgoSHA512;\r\n\r\n        public TLString Salt { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Salt = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Salt.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSecureRequiredType.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum SecureRequiredTypeFlags\r\n    {\r\n        NativeNames = 0x1,              // 0\r\n        SelfieRequired = 0x2,           // 1\r\n        TranslationRequired = 0x4,      // 2\r\n    }\r\n\r\n    public abstract class TLSecureRequiredTypeBase : TLObject { }\r\n    \r\n    public class TLSecureRequiredType : TLSecureRequiredTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureRequiredType;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public bool NativeNames { get { return IsSet(Flags, (int)SecureRequiredTypeFlags.NativeNames); } }\r\n\r\n        public bool SelfieRequired { get { return IsSet(Flags, (int)SecureRequiredTypeFlags.SelfieRequired); } }\r\n\r\n        public bool TranslationRequired { get { return IsSet(Flags, (int)SecureRequiredTypeFlags.TranslationRequired); } }\r\n\r\n        public TLSecureValueTypeBase Type { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n            \r\n            _flags = GetObject<TLInt>(bytes, ref position);\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLSecureRequiredType type={0} native_names={1} selfie={2} translation={3}\", Type, NativeNames, SelfieRequired, TranslationRequired);\r\n        }\r\n    }\r\n\r\n    public class TLSecureRequiredTypeOneOf : TLSecureRequiredTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureRequiredTypeOneOf;\r\n\r\n        public TLVector<TLSecureRequiredTypeBase> Types { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Types = GetObject<TLVector<TLSecureRequiredTypeBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLSecureRequiredTypeOneOf types=[{0}]\", string.Join(\",\", Types));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSecureSecretSettings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLSecureSecretSettings : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureSecretSettings;\r\n\r\n        public TLSecurePasswordKdfAlgoBase SecureAlgo { get; set; }\r\n\r\n        public TLString SecureSecret { get; set; }\r\n\r\n        public TLLong SecureSecretId { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            SecureAlgo = GetObject<TLSecurePasswordKdfAlgoBase>(bytes, ref position);\r\n            SecureSecret = GetObject<TLString>(bytes, ref position);\r\n            SecureSecretId = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                SecureAlgo.ToBytes(),\r\n                SecureSecret.ToBytes(),\r\n                SecureSecretId.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSecureValue.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    [Flags]\r\n    public enum SecureValueFlags\r\n    {\r\n        Data = 0x1,         // 0\r\n        FrontSide = 0x2,    // 1\r\n        ReverseSide = 0x4,  // 2\r\n        Selfie = 0x8,       // 3\r\n        Files = 0x10,       // 4\r\n        PlainData = 0x20,   // 5\r\n        Translation = 0x40, // 6\r\n    }\r\n\r\n    public class TLSecureValue : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValue;\r\n\r\n        protected TLInt _flags;\r\n\r\n        public TLInt Flags\r\n        {\r\n            get { return _flags; }\r\n            set { _flags = value; }\r\n        }\r\n\r\n        public TLSecureValueTypeBase Type { get; set; }\r\n\r\n        protected TLSecureData _data;\r\n\r\n        public TLSecureData Data\r\n        {\r\n            get { return _data; }\r\n            set { SetField(out _data, value, ref _flags, (int)SecureValueFlags.Data); }\r\n        }\r\n\r\n        protected TLSecureFileBase _frontSide;\r\n\r\n        public TLSecureFileBase FrontSide\r\n        {\r\n            get { return _frontSide; }\r\n            set { SetField(out _frontSide, value, ref _flags, (int)SecureValueFlags.FrontSide); }\r\n        }\r\n\r\n        protected TLSecureFileBase _reverseSide;\r\n\r\n        public TLSecureFileBase ReverseSide\r\n        {\r\n            get { return _reverseSide; }\r\n            set { SetField(out _reverseSide, value, ref _flags, (int)SecureValueFlags.ReverseSide); }\r\n        }\r\n\r\n        protected TLSecureFileBase _selfie;\r\n\r\n        public TLSecureFileBase Selfie\r\n        {\r\n            get { return _selfie; }\r\n            set { SetField(out _selfie, value, ref _flags, (int)SecureValueFlags.Selfie); }\r\n        }\r\n\r\n        protected TLVector<TLSecureFileBase> _files;\r\n\r\n        public TLVector<TLSecureFileBase> Files\r\n        {\r\n            get { return _files; }\r\n            set { SetField(out _files, value, ref _flags, (int)SecureValueFlags.Files); }\r\n        }\r\n\r\n        protected TLSecurePlainDataBase _plainData;\r\n\r\n        public TLSecurePlainDataBase PlainData\r\n        {\r\n            get { return _plainData; }\r\n            set { SetField(out _plainData, value, ref _flags, (int)SecureValueFlags.PlainData); }\r\n        }\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        #region Additional\r\n        public TLSecureValue Self { get { return this; } }\r\n        #endregion\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n            _data = GetObject<TLSecureData>(Flags, (int)SecureValueFlags.Data, null, bytes, ref position);\r\n            _frontSide = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.FrontSide, null, bytes, ref position);\r\n            _reverseSide = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.ReverseSide, null, bytes, ref position);\r\n            _selfie = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.Selfie, null, bytes, ref position);\r\n            _files = GetObject<TLVector<TLSecureFileBase>>(Flags, (int)SecureValueFlags.Files, null, bytes, ref position);\r\n            _plainData = GetObject<TLSecurePlainDataBase>(Flags, (int)SecureValueFlags.PlainData, null, bytes, ref position);\r\n            Hash = GetObject<TLString>(bytes, ref position);\r\n            \r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Type = GetObject<TLSecureValueTypeBase>(input);\r\n            _data = GetObject<TLSecureData>(Flags, (int)SecureValueFlags.Data, null, input);\r\n            _frontSide = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.FrontSide, null, input);\r\n            _reverseSide = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.ReverseSide, null, input);\r\n            _selfie = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.Selfie, null, input);\r\n            _files = GetObject<TLVector<TLSecureFileBase>>(Flags, (int)SecureValueFlags.Files, null, input);\r\n            _plainData = GetObject<TLSecurePlainDataBase>(Flags, (int)SecureValueFlags.PlainData, null, input);\r\n            Hash = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Type.ToStream(output);\r\n            ToStream(output, _data, Flags, (int)SecureValueFlags.Data);\r\n            ToStream(output, _frontSide, Flags, (int)SecureValueFlags.FrontSide);\r\n            ToStream(output, _reverseSide, Flags, (int)SecureValueFlags.ReverseSide);\r\n            ToStream(output, _selfie, Flags, (int)SecureValueFlags.Selfie);\r\n            ToStream(output, _files, Flags, (int)SecureValueFlags.Files);\r\n            ToStream(output, _plainData, Flags, (int)SecureValueFlags.PlainData);\r\n            Hash.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLSecureValue type={0} data={1} front_side={2} reverse_side={3} selfie={4} files={5} plain_data={6} hash={7}\", \r\n                Type,\r\n                _data != null ? \"[data]\" : \"null\",\r\n                _frontSide != null ? \"[front_side]\" : \"null\",\r\n                _reverseSide != null ? \"[reverse_side]\" : \"null\",\r\n                _selfie != null ? \"[selfie]\" : \"null\",\r\n                _files != null ? _files.Count.ToString() : \"null\",\r\n                _plainData != null ? \"[plain_data]\" : \"null\", \r\n                Hash);\r\n        }\r\n\r\n        public virtual TLInputSecureValue ToInputSecureValue()\r\n        {\r\n            TLVector<TLInputSecureFileBase> files = null;\r\n            if (_files != null && _files.Count > 0)\r\n            {\r\n                files = new TLVector<TLInputSecureFileBase>();\r\n                foreach (var file in _files)\r\n                {\r\n                    files.Add(file.ToInputSecureFile());\r\n                }\r\n            }\r\n\r\n            return new TLInputSecureValue\r\n            {\r\n                Flags = new TLInt(0),\r\n                Type = Type,\r\n                Data = _data,\r\n                FrontSide = _frontSide != null ? _frontSide.ToInputSecureFile() : null,\r\n                ReverseSide = _reverseSide != null ? _reverseSide.ToInputSecureFile() : null,\r\n                Selfie = _selfie != null ? _selfie.ToInputSecureFile() : null,\r\n                Files = files,\r\n                PlainData = _plainData\r\n            };\r\n        }\r\n\r\n        public virtual void Update(TLSecureValue result)\r\n        {\r\n            Flags = new TLInt(0);\r\n            Type = result.Type;\r\n            Data = result.Data;\r\n            FrontSide = result.FrontSide;\r\n            ReverseSide = result.ReverseSide;\r\n            Selfie = result.Selfie;\r\n            Files = result.Files;\r\n            PlainData = result.PlainData;\r\n            Hash = result.Hash;\r\n        }\r\n    }\r\n\r\n    public class TLSecureValue85 : TLSecureValue\r\n    {\r\n        public new const uint Signature = TLConstructors.TLSecureValue85;\r\n\r\n        protected TLVector<TLSecureFileBase> _translation;\r\n\r\n        public TLVector<TLSecureFileBase> Translation\r\n        {\r\n            get { return _translation; }\r\n            set { SetField(out _translation, value, ref _flags, (int)SecureValueFlags.Translation); }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Flags = GetObject<TLInt>(bytes, ref position);\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n            _data = GetObject<TLSecureData>(Flags, (int)SecureValueFlags.Data, null, bytes, ref position);\r\n            _frontSide = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.FrontSide, null, bytes, ref position);\r\n            _reverseSide = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.ReverseSide, null, bytes, ref position);\r\n            _selfie = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.Selfie, null, bytes, ref position);\r\n            _translation = GetObject<TLVector<TLSecureFileBase>>(Flags, (int)SecureValueFlags.Translation, null, bytes, ref position);\r\n            _files = GetObject<TLVector<TLSecureFileBase>>(Flags, (int)SecureValueFlags.Files, null, bytes, ref position);\r\n            _plainData = GetObject<TLSecurePlainDataBase>(Flags, (int)SecureValueFlags.PlainData, null, bytes, ref position);\r\n            Hash = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Flags = GetObject<TLInt>(input);\r\n            Type = GetObject<TLSecureValueTypeBase>(input);\r\n            _data = GetObject<TLSecureData>(Flags, (int)SecureValueFlags.Data, null, input);\r\n            _frontSide = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.FrontSide, null, input);\r\n            _reverseSide = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.ReverseSide, null, input);\r\n            _selfie = GetObject<TLSecureFileBase>(Flags, (int)SecureValueFlags.Selfie, null, input);\r\n            _translation = GetObject<TLVector<TLSecureFileBase>>(Flags, (int)SecureValueFlags.Translation, null, input);\r\n            _files = GetObject<TLVector<TLSecureFileBase>>(Flags, (int)SecureValueFlags.Files, null, input);\r\n            _plainData = GetObject<TLSecurePlainDataBase>(Flags, (int)SecureValueFlags.PlainData, null, input);\r\n            Hash = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Flags.ToStream(output);\r\n            Type.ToStream(output);\r\n            ToStream(output, _data, Flags, (int)SecureValueFlags.Data);\r\n            ToStream(output, _frontSide, Flags, (int)SecureValueFlags.FrontSide);\r\n            ToStream(output, _reverseSide, Flags, (int)SecureValueFlags.ReverseSide);\r\n            ToStream(output, _selfie, Flags, (int)SecureValueFlags.Selfie);\r\n            ToStream(output, _translation, Flags, (int)SecureValueFlags.Translation);\r\n            ToStream(output, _files, Flags, (int)SecureValueFlags.Files);\r\n            ToStream(output, _plainData, Flags, (int)SecureValueFlags.PlainData);\r\n            Hash.ToStream(output);\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLSecureValue85 type={0} data={1} front_side={2} reverse_side={3} selfie={4} translation{5} files={6} plain_data={7} hash={8}\",\r\n                Type,\r\n                _data != null ? \"[data]\" : \"null\",\r\n                _frontSide != null ? \"[front_side]\" : \"null\",\r\n                _reverseSide != null ? \"[reverse_side]\" : \"null\",\r\n                _selfie != null ? \"[selfie]\" : \"null\",\r\n                _translation != null ? _translation.Count.ToString() : \"null\",\r\n                _files != null ? _files.Count.ToString() : \"null\",\r\n                _plainData != null ? \"[plain_data]\" : \"null\",\r\n                Hash);\r\n        }\r\n\r\n        public override TLInputSecureValue ToInputSecureValue()\r\n        {\r\n            TLVector<TLInputSecureFileBase> files = null;\r\n            if (_files != null && _files.Count > 0)\r\n            {\r\n                files = new TLVector<TLInputSecureFileBase>();\r\n                foreach (var file in _files)\r\n                {\r\n                    files.Add(file.ToInputSecureFile());\r\n                }\r\n            } \r\n            TLVector<TLInputSecureFileBase> translation = null;\r\n            if (_translation != null && _translation.Count > 0)\r\n            {\r\n                translation = new TLVector<TLInputSecureFileBase>();\r\n                foreach (var file in _translation)\r\n                {\r\n                    translation.Add(file.ToInputSecureFile());\r\n                }\r\n            }\r\n\r\n            return new TLInputSecureValue85\r\n            {\r\n                Flags = new TLInt(0),\r\n                Type = Type,\r\n                Data = _data,\r\n                FrontSide = _frontSide != null ? _frontSide.ToInputSecureFile() : null,\r\n                ReverseSide = _reverseSide != null ? _reverseSide.ToInputSecureFile() : null,\r\n                Selfie = _selfie != null ? _selfie.ToInputSecureFile() : null,\r\n                Translation = translation,\r\n                Files = files,\r\n                PlainData = _plainData\r\n            };\r\n        }\r\n\r\n        public override void Update(TLSecureValue result)\r\n        {\r\n            base.Update(result);\r\n\r\n            var result85 = result as TLSecureValue85;\r\n            if (result85 != null)\r\n            {\r\n                Translation = result85.Translation;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSecureValueError.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLSecureValueErrorBase : TLObject \r\n    {\r\n        public TLSecureValueTypeBase Type { get; set; }\r\n\r\n        public TLString Text { get; set; }\r\n\r\n        public abstract int Priority { get; }\r\n    }\r\n\r\n    public class TLSecureValueError : TLSecureValueErrorBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueError;\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n            Hash = GetObject<TLString>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override int Priority\r\n        {\r\n            get { return 1; }\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueErrorData : TLSecureValueErrorBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueErrorData;\r\n\r\n        public TLString DataHash { get; set; }\r\n\r\n        public TLString Field { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n            DataHash = GetObject<TLString>(bytes, ref position);\r\n            Field = GetObject<TLString>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override int Priority\r\n        {\r\n            get\r\n            {\r\n                switch (Field.ToString())\r\n                {\r\n                    case \"first_name\":\r\n                        return 801;\r\n                    case \"middle_name\":\r\n                        return 802;\r\n                    case \"last_name\":\r\n                        return 803;\r\n                    case \"birth_date\":\r\n                        return 804;\r\n                    case \"gender\":\r\n                        return 805;\r\n                    //case \"country_code\":\r\n                    //    return 806;\r\n                    case \"residence_country_code\":\r\n                        return 807;\r\n                    case \"document_no\":\r\n                        return 808;\r\n                    case \"expiry_date\":\r\n                        return 809;\r\n\r\n\r\n                    case \"street_line1\":\r\n                        return 851;\r\n                    case \"street_line2\":\r\n                        return 852;\r\n                    case \"post_code\":\r\n                        return 853;\r\n                    case \"state\":\r\n                        return 854;\r\n                    case \"city\":\r\n                        return 855;\r\n                    case \"country_code\":\r\n                        return 856;\r\n                }\r\n                \r\n                return 800;\r\n            }\r\n        }\r\n    }\r\n\r\n    public abstract class TLSecureValueErrorFileBase : TLSecureValueErrorBase\r\n    {\r\n        public TLString FileHash { get; set; }\r\n    }\r\n\r\n    public class TLSecureValueErrorFrontSide : TLSecureValueErrorFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueErrorFrontSide;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n            FileHash = GetObject<TLString>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override int Priority\r\n        {\r\n            get { return 100; }\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueErrorReverseSide : TLSecureValueErrorFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueErrorReverseSide;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n            FileHash = GetObject<TLString>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override int Priority\r\n        {\r\n            get { return 200; }\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueErrorSelfie : TLSecureValueErrorFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueErrorSelfie;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n            FileHash = GetObject<TLString>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override int Priority\r\n        {\r\n            get { return 300; }\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueErrorFile : TLSecureValueErrorFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueErrorFile;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n            FileHash = GetObject<TLString>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override int Priority\r\n        {\r\n            get { return 400; }\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueErrorFiles : TLSecureValueErrorBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueErrorFiles;\r\n\r\n        public TLVector<TLString> FileHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n            FileHash = GetObject<TLVector<TLString>>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override int Priority\r\n        {\r\n            get { return 500; }\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueErrorTranslationFile : TLSecureValueErrorFileBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueErrorTranslationFile;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n            FileHash = GetObject<TLString>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override int Priority\r\n        {\r\n            get { return 600; }\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueErrorTranslationFiles : TLSecureValueErrorBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueErrorTranslationFiles;\r\n\r\n        public TLVector<TLString> FileHash { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Type = GetObject<TLSecureValueTypeBase>(bytes, ref position);\r\n            FileHash = GetObject<TLVector<TLString>>(bytes, ref position);\r\n            Text = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override int Priority\r\n        {\r\n            get { return 700; }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSecureValueHash.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLSecureValueHash : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueHash;\r\n\r\n        public TLSecureValueTypeBase Type { get; set; }\r\n\r\n        public TLString Hash { get; set; }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Type.ToBytes(),\r\n                Hash.ToBytes());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSecureValuePlainData.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLSecurePlainDataBase : TLObject { }\r\n\r\n    public class TLSecurePlainPhone : TLSecurePlainDataBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecurePlainPhone;\r\n\r\n        public TLString Phone { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Phone = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Phone.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Phone = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Phone.ToStream(output);\r\n        }\r\n    }\r\n\r\n    public class TLSecurePlainEmail : TLSecurePlainDataBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecurePlainEmail;\r\n\r\n        public TLString Email { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Email = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.Combine(\r\n                TLUtils.SignatureToBytes(Signature),\r\n                Email.ToBytes());\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            Email = GetObject<TLString>(input);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n            Email.ToStream(output);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSecureValueType.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.IO;\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLSecureValueTypeBase : TLObject { }\r\n\r\n    public class TLSecureValueTypePersonalDetails : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypePersonalDetails;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypePassport : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypePassport;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypeDriverLicense : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypeDriverLicense;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypeIdentityCard : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypeIdentityCard;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypeInternalPassport : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypeInternalPassport;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypeAddress : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypeAddress;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypeUtilityBill : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypeUtilityBill;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypeBankStatement : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypeBankStatement;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypeRentalAgreement : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypeRentalAgreement;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypePassportRegistration : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypePassportRegistration;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypeTemporaryRegistration : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypeTemporaryRegistration;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypePhone : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypePhone;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n\r\n    public class TLSecureValueTypeEmail : TLSecureValueTypeBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLSecureValueTypeEmail;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            return this;\r\n        }\r\n\r\n        public override byte[] ToBytes()\r\n        {\r\n            return TLUtils.SignatureToBytes(Signature);\r\n        }\r\n\r\n        public override TLObject FromStream(Stream input)\r\n        {\r\n            return this;\r\n        }\r\n\r\n        public override void ToStream(Stream output)\r\n        {\r\n            output.Write(TLUtils.SignatureToBytes(Signature));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLSentEmailCode.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLSentEmailCode : TLObject, ILength\r\n    {\r\n        public const uint Signature = TLConstructors.TLSentEmailCode;\r\n\r\n        public TLString EmailPattern { get; set; }\r\n\r\n        public TLInt Length { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            EmailPattern = GetObject<TLString>(bytes, ref position);\r\n            Length = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLTakeout.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLTakeout : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLTakeout;\r\n\r\n        public TLLong Id { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Id = GetObject<TLLong>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLTermsOfServiceUpdate.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public abstract class TLTermsOfServiceUpdateBase : TLObject\r\n    {\r\n        public TLInt Expires { get; set; }\r\n    }\r\n\r\n    public class TLTermsOfServiceUpdate : TLTermsOfServiceUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTermsOfServiceUpdate;\r\n\r\n        public TLTermsOfServiceBase TermsOfService { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n            TermsOfService = GetObject<TLTermsOfServiceBase>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n\r\n    public class TLTermsOfServiceUpdateEmpty : TLTermsOfServiceUpdateBase\r\n    {\r\n        public const uint Signature = TLConstructors.TLTermsOfServiceUpdateEmpty;\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Expires = GetObject<TLInt>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLWebAuthorization.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing Telegram.Api.Services.Cache;\r\n\r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLWebAuthorization : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLWebAuthorization;\r\n\r\n        public TLLong Hash { get; set; }\r\n\r\n        public TLInt BotId { get; set; }\r\n\r\n        public TLString Domain { get; set; }\r\n\r\n        public TLString Browser { get; set; }\r\n\r\n        public TLString Platform { get; set; }\r\n\r\n        public TLInt DateCreated { get; set; }\r\n\r\n        public TLInt DateActive { get; set; }\r\n\r\n        public TLString Ip { get; set; }\r\n\r\n        public TLString Region { get; set; }\r\n\r\n        public string Caption\r\n        {\r\n            get\r\n            {\r\n                var domain =\r\n                    Domain.ToString()\r\n                        .Replace(\"https://\", string.Empty)\r\n                        .Replace(\"http://\", string.Empty)\r\n                        .Replace(\"www.\", string.Empty);\r\n                var index = domain.IndexOf('.');\r\n                if (index > 0)\r\n                {\r\n                    var result = domain.Substring(0, index);\r\n                    if (!string.IsNullOrEmpty(result))\r\n                    {\r\n                        return char.ToUpper(result[0]) + result.Substring(1);\r\n                    }\r\n                }\r\n\r\n                return Domain.ToString();\r\n            }\r\n        }\r\n\r\n        public string Location\r\n        {\r\n            get { return string.Format(\"{0} – {1}\", Ip, Region); }\r\n        }\r\n\r\n        public TLUserBase Bot\r\n        {\r\n            get\r\n            {\r\n                var cacheService = InMemoryCacheService.Instance;\r\n\r\n                return cacheService.GetUser(BotId);\r\n            }\r\n        }\r\n\r\n        public string ParamsString\r\n        {\r\n            get { return string.Join(\", \", Params); }\r\n        }\r\n\r\n        public IEnumerable<string> Params\r\n        {\r\n            get\r\n            {\r\n                if (Bot != null) yield return Bot.FullName;\r\n                if (!TLString.IsNullOrEmpty(Browser)) yield return Browser.ToString();\r\n                if (!TLString.IsNullOrEmpty(Platform)) yield return Platform.ToString();\r\n            }\r\n        }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Hash = GetObject<TLLong>(bytes, ref position);\r\n            BotId = GetObject<TLInt>(bytes, ref position);\r\n            Domain = GetObject<TLString>(bytes, ref position);\r\n            Browser = GetObject<TLString>(bytes, ref position);\r\n            Platform = GetObject<TLString>(bytes, ref position);\r\n            DateCreated = GetObject<TLInt>(bytes, ref position);\r\n            DateActive = GetObject<TLInt>(bytes, ref position);\r\n            Ip = GetObject<TLString>(bytes, ref position);\r\n            Region = GetObject<TLString>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n\r\n        public void Update(TLWebAuthorization authorization)\r\n        {\r\n            Hash = authorization.Hash;\r\n            BotId = authorization.BotId;\r\n            Domain = authorization.Domain;\r\n            Browser = authorization.Browser;\r\n            Platform = authorization.Platform;\r\n            DateCreated = authorization.DateCreated;\r\n            DateActive = authorization.DateActive;\r\n            Ip = authorization.Ip;\r\n            Region = authorization.Region;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/TL/TLWebAuthorizations.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Api.TL\r\n{\r\n    public class TLWebAuthorizations : TLObject\r\n    {\r\n        public const uint Signature = TLConstructors.TLWebAuthorizations;\r\n\r\n        public TLVector<TLWebAuthorization> Authorizations { get; set; }\r\n\r\n        public TLVector<TLUserBase> Users { get; set; }\r\n\r\n        public override TLObject FromBytes(byte[] bytes, ref int position)\r\n        {\r\n            bytes.ThrowExceptionIfIncorrect(ref position, Signature);\r\n\r\n            Authorizations = GetObject<TLVector<TLWebAuthorization>>(bytes, ref position);\r\n            Users = GetObject<TLVector<TLUserBase>>(bytes, ref position);\r\n\r\n            return this;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/Telegram.Api.WP8.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{E79D5093-8038-4A5F-8A98-CA38C0D0886F}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Telegram.Api</RootNamespace>\r\n    <AssemblyName>Telegram.Api</AssemblyName>\r\n    <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>\r\n    <TargetFrameworkVersion>v8.1</TargetFrameworkVersion>\r\n    <SilverlightVersion>\r\n    </SilverlightVersion>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n    <TargetFrameworkProfile />\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;LOG_REGISTRATION;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;LOG_REGISTRATION;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|x86' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\x86\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;LOG_REGISTRATION;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <PlatformTarget />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|x86' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\x86\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;LOG_REGISTRATION;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <PlatformTarget />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|ARM' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\ARM\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;LOG_REGISTRATION;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <PlatformTarget />\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|ARM' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\ARM\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;LOG_REGISTRATION;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <PlatformTarget />\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"..\\Telegram.Api\\compression\\GZipDeflateStream.cs\">\r\n      <Link>Compression\\GZipDeflateStream.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Constants.cs\">\r\n      <Link>Constants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Hash\\CRC32\\CRC.cs\">\r\n      <Link>Hash\\CRC32\\CRC.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\extensions\\ActionExtensions.cs\">\r\n      <Link>Extensions\\ActionExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\extensions\\HttpWebRequestExtensions.cs\">\r\n      <Link>Extensions\\HttpWebRequestExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\extensions\\StreamExtensions.cs\">\r\n      <Link>Extensions\\StreamExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\extensions\\TLObjectExtensions.cs\">\r\n      <Link>Extensions\\TLObjectExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\helpers\\Execute.cs\">\r\n      <Link>Helpers\\Execute.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Helpers\\FileUtils.cs\">\r\n      <Link>Helpers\\FileUtils.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\helpers\\SettingsHelper.cs\">\r\n      <Link>Helpers\\SettingsHelper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\helpers\\Utils.cs\">\r\n      <Link>Helpers\\Utils.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Hash\\MD5\\MD5.cs\">\r\n      <Link>Hash\\MD5\\MD5.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Hash\\MD5\\MD5CryptoServiceProvider.cs\">\r\n      <Link>Hash\\MD5\\MD5CryptoServiceProvider.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Hash\\MD5\\MD5Managed.cs\">\r\n      <Link>Hash\\MD5\\MD5Managed.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\cache\\Context.cs\">\r\n      <Link>Services\\Cache\\Context.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\cache\\eventargs\\DialogAddedEventArgs.cs\">\r\n      <Link>Services\\Cache\\EventArgs\\DialogAddedEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\cache\\eventargs\\TopMessageUpdatedEventArgs.cs\">\r\n      <Link>Services\\Cache\\EventArgs\\TopMessageUpdatedEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\cache\\ICacheService.cs\">\r\n      <Link>Services\\Cache\\ICacheService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\cache\\InMemoryCacheService.cs\">\r\n      <Link>Services\\Cache\\InMemoryCacheService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\cache\\InMemoryDatabase.cs\">\r\n      <Link>Services\\Cache\\InMemoryDatabase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\connection\\ConnectionService.cs\">\r\n      <Link>Services\\Connection\\ConnectionService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\DCOptionItem.cs\">\r\n      <Link>Services\\DCOptionItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\DelayedItem.cs\">\r\n      <Link>Services\\DelayedItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\AudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\AudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\DocumentFileManager.cs\">\r\n      <Link>Services\\FileManager\\DocumentFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\DownloadableItem.cs\">\r\n      <Link>Services\\FileManager\\DownloadableItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\DownloadablePart.cs\">\r\n      <Link>Services\\FileManager\\DownloadablePart.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\DownloadingCanceledEventArgs.cs\">\r\n      <Link>Services\\FileManager\\DownloadingCanceledEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\EncryptedFileManager.cs\">\r\n      <Link>Services\\FileManager\\EncryptedFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\FileManager.cs\">\r\n      <Link>Services\\FileManager\\FileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\IAudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\IAudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\IDocumentFileManager.cs\">\r\n      <Link>Services\\FileManager\\IDocumentFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\IEncryptedFileManager.cs\">\r\n      <Link>Services\\FileManager\\IEncryptedFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\IFileManager.cs\">\r\n      <Link>Services\\FileManager\\IFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\IUploadAudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\IUploadAudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\IUploadFileManager.cs\">\r\n      <Link>Services\\FileManager\\IUploadFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\IUploadVideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\IUploadVideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\IVideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\IVideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\ProgressChangedEventArgs.cs\">\r\n      <Link>Services\\FileManager\\ProgressChangedEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\UploadAudioFileManager.cs\">\r\n      <Link>Services\\FileManager\\UploadAudioFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\UploadFileManager.cs\">\r\n      <Link>Services\\FileManager\\UploadFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\UploadVideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\UploadVideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\VideoFileManager.cs\">\r\n      <Link>Services\\FileManager\\VideoFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\filemanager\\Worker.cs\">\r\n      <Link>Services\\FileManager\\Worker.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\HistoryItem.cs\">\r\n      <Link>Services\\HistoryItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\IMTProtoService.cs\">\r\n      <Link>Services\\IMTProtoService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Account.cs\">\r\n      <Link>Services\\MTProtoService.Account.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Auth.cs\">\r\n      <Link>Services\\MTProtoService.Auth.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.ByTransport.cs\">\r\n      <Link>Services\\MTProtoService.ByTransport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Config.cs\">\r\n      <Link>Services\\MTProtoService.Config.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Contacts.cs\">\r\n      <Link>Services\\MTProtoService.Contacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.cs\">\r\n      <Link>Services\\MTProtoService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.DHKeyExchange.cs\">\r\n      <Link>Services\\MTProtoService.DHKeyExchange.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Help.cs\">\r\n      <Link>Services\\MTProtoService.Help.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Helpers.cs\">\r\n      <Link>Services\\MTProtoService.Helpers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.HttpLongPoll.cs\">\r\n      <Link>Services\\MTProtoService.HttpLongPoll.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Messages.cs\">\r\n      <Link>Services\\MTProtoService.Messages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Photos.cs\">\r\n      <Link>Services\\MTProtoService.Photos.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.SecretChats.cs\">\r\n      <Link>Services\\MTProtoService.SecretChats.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.SendingQueue.cs\">\r\n      <Link>Services\\MTProtoService.SendingQueue.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Stuff.cs\">\r\n      <Link>Services\\MTProtoService.Stuff.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Updates.cs\">\r\n      <Link>Services\\MTProtoService.Updates.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Upload.cs\">\r\n      <Link>Services\\MTProtoService.Upload.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\MTProtoService.Users.cs\">\r\n      <Link>Services\\MTProtoService.Users.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\ServiceBase.cs\">\r\n      <Link>Services\\ServiceBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\updates\\IUpdatesService.cs\">\r\n      <Link>Services\\Updates\\IUpdatesService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\updates\\ReceiveUpdatesEventArgs.cs\">\r\n      <Link>Services\\Updates\\ReceiveUpdatesEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\updates\\UpdatesBySeqComparer.cs\">\r\n      <Link>Services\\Updates\\UpdatesBySeqComparer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\services\\updates\\UpdatesService.cs\">\r\n      <Link>Services\\Updates\\UpdatesService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\account\\TLCheckUsername.cs\">\r\n      <Link>TL\\Functions\\Account\\TLCheckUsername.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLDeleteAccount.cs\">\r\n      <Link>TL\\Functions\\Account\\TLDeleteAccount.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLGetAccountTTL.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetAccountTTL.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\account\\TLGetNotifySettings.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLGetPrivacy.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetPrivacy.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\account\\TLRegisterDevice.cs\">\r\n      <Link>TL\\Functions\\Account\\TLRegisterDevice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\account\\TLResetNotifySettings.cs\">\r\n      <Link>TL\\Functions\\Account\\TLResetNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Account\\TLSetPrivacy.cs\">\r\n      <Link>TL\\Functions\\Account\\TLSetPrivacy.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\account\\TLUnregisterDevice.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUnregisterDevice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\account\\TLUpdateNotifySettings.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdateNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\account\\TLUpdateProfile.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdateProfile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\account\\TLUpdateStatus.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdateStatus.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\account\\TLUpdateUserName.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdateUserName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\auth\\TLCheckPhone.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLCheckPhone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\auth\\TLExportAuthorization.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLExportAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\auth\\TLImportAuthorization.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLImportAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\auth\\TLLogOut.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLLogOut.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\auth\\TLResetAuthorizations.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLResetAuthorizations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\auth\\TLSendCall.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\auth\\TLSendCode.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\auth\\TLSendInvites.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendInvites.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\auth\\TLSendSms.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSendSms.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\auth\\TLSignIn.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSignIn.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\auth\\TLSignUp.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLSignUp.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\contacts\\TLBlock.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLBlock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\contacts\\TLDeleteContact.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLDeleteContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\contacts\\TLDeleteContacts.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLDeleteContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\contacts\\TLGetBlocked.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetBlocked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\contacts\\TLGetContacts.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\contacts\\TLGetStatuses.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetStatuses.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\contacts\\TLImportContacts.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLImportContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\contacts\\TLSearch.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLSearch.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\contacts\\TLUnblock.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLUnblock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\dhkeyexchange\\TLReqDHParams.cs\">\r\n      <Link>TL\\Functions\\DHKeyExchange\\TLReqDHParams.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\dhkeyexchange\\TLReqPQ.cs\">\r\n      <Link>TL\\Functions\\DHKeyExchange\\TLReqPQ.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\dhkeyexchange\\TLSetClientDHParams.cs\">\r\n      <Link>TL\\Functions\\DHKeyExchange\\TLSetClientDHParams.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\help\\TLGetConfig.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\help\\TLGetInviteText.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetInviteText.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\help\\TLGetNearestDC.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetNearestDC.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\help\\TLGetSupport.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetSupport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\help\\TLInvokeWithLayerN.cs\">\r\n      <Link>TL\\Functions\\Help\\TLInvokeWithLayerN.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLAcceptEncryption.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLAcceptEncryption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLAddChatUser.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLAddChatUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLCreateChat.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLCreateChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLDeleteChatUser.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDeleteChatUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLDeleteHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDeleteHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLDeleteMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDeleteMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLDiscardEncryption.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDiscardEncryption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLEditChatPhoto.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLEditChatPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLEditChatTitle.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLEditChatTitle.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLForwardMessage.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLForwardMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLForwardMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLForwardMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLGetChats.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetChats.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLGetDHConfig.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetDHConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLGetDialogs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLGetFullChat.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetFullChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLGetHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLGetMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLReadEncryptedHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadEncryptedHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLReadHistory.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLReadMessageContents.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadMessageContents.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLReceivedMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReceivedMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLReceivedQueue.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReceivedQueue.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLRequestEncryption.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLRequestEncryption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLRestoreMessages.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLRestoreMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLSearch.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSearch.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLSendBroadcast.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendBroadcast.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLSendEncrypted.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendEncrypted.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLSendEncryptedFile.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLSendEncryptedService.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendEncryptedService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLSendMedia.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLSendMessage.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLSetEncryptedTyping.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSetEncryptedTyping.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\messages\\TLSetTyping.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSetTyping.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\photos\\TLGetUserPhotos.cs\">\r\n      <Link>TL\\Functions\\Photos\\TLGetUserPhotos.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\photos\\TLUpdateProfilePhoto.cs\">\r\n      <Link>TL\\Functions\\Photos\\TLUpdateProfilePhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\photos\\TLUploadProfilePhoto.cs\">\r\n      <Link>TL\\Functions\\Photos\\TLUploadProfilePhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\stuff\\TLGetFutureSalts.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLGetFutureSalts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\stuff\\TLHttpWait.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLHttpWait.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\stuff\\TLMessageAcknowledgments.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLMessageAcknowledgments.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\stuff\\TLRPCDropAnswer.cs\">\r\n      <Link>TL\\Functions\\Stuff\\TLRPCDropAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\updates\\TLGetDifference.cs\">\r\n      <Link>TL\\Functions\\Updates\\TLGetDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\updates\\TLGetState.cs\">\r\n      <Link>TL\\Functions\\Updates\\TLGetState.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\upload\\TLGetFile.cs\">\r\n      <Link>TL\\Functions\\Upload\\TLGetFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\upload\\TLSaveFilePart.cs\">\r\n      <Link>TL\\Functions\\Upload\\TLSaveFilePart.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\users\\TLGetFullUser.cs\">\r\n      <Link>TL\\Functions\\Users\\TLGetFullUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\functions\\users\\TLGetUsers.cs\">\r\n      <Link>TL\\Functions\\Users\\TLGetUsers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\interfaces\\IBytes.cs\">\r\n      <Link>TL\\Interfaces\\IBytes.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\interfaces\\IFullName.cs\">\r\n      <Link>TL\\Interfaces\\IFullName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\interfaces\\IInputPeer.cs\">\r\n      <Link>TL\\Interfaces\\IInputPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\interfaces\\ISelectable.cs\">\r\n      <Link>TL\\Interfaces\\ISelectable.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\interfaces\\IVIsibility.cs\">\r\n      <Link>TL\\Interfaces\\IVIsibility.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLAffectedHistory.cs\">\r\n      <Link>TL\\TLAffectedHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLAudio.cs\">\r\n      <Link>TL\\TLAudio.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLAuthorization.cs\">\r\n      <Link>TL\\TLAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLBadMessageNotification.cs\">\r\n      <Link>TL\\TLBadMessageNotification.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLBadServerSalt.cs\">\r\n      <Link>TL\\TLBadServerSalt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLBool.cs\">\r\n      <Link>TL\\TLBool.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLChat.cs\">\r\n      <Link>TL\\TLChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLChatFull.cs\">\r\n      <Link>TL\\TLChatFull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLChatParticipant.cs\">\r\n      <Link>TL\\TLChatParticipant.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLChatParticipants.cs\">\r\n      <Link>TL\\TLChatParticipants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLChats.cs\">\r\n      <Link>TL\\TLChats.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLCheckedPhone.cs\">\r\n      <Link>TL\\TLCheckedPhone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLClientDHInnerData.cs\">\r\n      <Link>TL\\TLClientDHInnerData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLConfig.cs\">\r\n      <Link>TL\\TLConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLContact.cs\">\r\n      <Link>TL\\TLContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLContactBlocked.cs\">\r\n      <Link>TL\\TLContactBlocked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLContactFound.cs\">\r\n      <Link>TL\\TLContactFound.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLContacts.cs\">\r\n      <Link>TL\\TLContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLContactsBlocked.cs\">\r\n      <Link>TL\\TLContactsBlocked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLContactsFound.cs\">\r\n      <Link>TL\\TLContactsFound.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLContactStatus.cs\">\r\n      <Link>TL\\TLContactStatus.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLContainerTransportMessage.cs\">\r\n      <Link>TL\\TLContainerTransportMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDCOption.cs\">\r\n      <Link>TL\\TLDCOption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDecryptedMessage.cs\">\r\n      <Link>TL\\TLDecryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDecryptedMessageAction.cs\">\r\n      <Link>TL\\TLDecryptedMessageAction.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDecryptedMessageLayer.cs\">\r\n      <Link>TL\\TLDecryptedMessageLayer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDecryptedMessageMedia.cs\">\r\n      <Link>TL\\TLDecryptedMessageMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDHConfig.cs\">\r\n      <Link>TL\\TLDHConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDHGen.cs\">\r\n      <Link>TL\\TLDHGen.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDialog.cs\">\r\n      <Link>TL\\TLDialog.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDialogs.cs\">\r\n      <Link>TL\\TLDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDifference.cs\">\r\n      <Link>TL\\TLDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDocument.cs\">\r\n      <Link>TL\\TLDocument.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLDouble.cs\">\r\n      <Link>TL\\TLDouble.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLEncryptedChat.cs\">\r\n      <Link>TL\\TLEncryptedChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLEncryptedFile.cs\">\r\n      <Link>TL\\TLEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLEncryptedMessage.cs\">\r\n      <Link>TL\\TLEncryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLExportedAuthorization.cs\">\r\n      <Link>TL\\TLExportedAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLFile.cs\">\r\n      <Link>TL\\TLFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLFileLocation.cs\">\r\n      <Link>TL\\TLFileLocation.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLFileType.cs\">\r\n      <Link>TL\\TLFileType.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLForeignLink.cs\">\r\n      <Link>TL\\TLForeignLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLFutureSalt.cs\">\r\n      <Link>TL\\TLFutureSalt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLGeoPoint.cs\">\r\n      <Link>TL\\TLGeoPoint.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLGzipPacked.cs\">\r\n      <Link>TL\\TLGzipPacked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLImportedContact.cs\">\r\n      <Link>TL\\TLImportedContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLImportedContacts.cs\">\r\n      <Link>TL\\TLImportedContacts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInitConnection.cs\">\r\n      <Link>TL\\TLInitConnection.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputAudio.cs\">\r\n      <Link>TL\\TLInputAudio.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputChatPhoto.cs\">\r\n      <Link>TL\\TLInputChatPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputContact.cs\">\r\n      <Link>TL\\TLInputContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputDocument.cs\">\r\n      <Link>TL\\TLInputDocument.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputEncryptedChat.cs\">\r\n      <Link>TL\\TLInputEncryptedChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputEncryptedFile.cs\">\r\n      <Link>TL\\TLInputEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputEncryptedFileLocation.cs\">\r\n      <Link>TL\\TLInputEncryptedFileLocation.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputFile.cs\">\r\n      <Link>TL\\TLInputFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputFileLocation.cs\">\r\n      <Link>TL\\TLInputFileLocation.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputGeoPoint.cs\">\r\n      <Link>TL\\TLInputGeoPoint.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputMedia.cs\">\r\n      <Link>TL\\TLInputMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputMessagesFilter.cs\">\r\n      <Link>TL\\TLInputMessagesFilter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputNotifyPeer.cs\">\r\n      <Link>TL\\TLInputNotifyPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputPeerBase.cs\">\r\n      <Link>TL\\TLInputPeerBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputPeerNotifyEvents.cs\">\r\n      <Link>TL\\TLInputPeerNotifyEvents.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputPeerNotifySettings.cs\">\r\n      <Link>TL\\TLInputPeerNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputPhoto.cs\">\r\n      <Link>TL\\TLInputPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputPhotoCrop.cs\">\r\n      <Link>TL\\TLInputPhotoCrop.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputUser.cs\">\r\n      <Link>TL\\TLInputUser.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInputVideo.cs\">\r\n      <Link>TL\\TLInputVideo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInt.cs\">\r\n      <Link>TL\\TLInt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInt128.cs\">\r\n      <Link>TL\\TLInt128.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInt256.cs\">\r\n      <Link>TL\\TLInt256.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInviteText.cs\">\r\n      <Link>TL\\TLInviteText.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLInvokeAfterMsg.cs\">\r\n      <Link>TL\\TLInvokeAfterMsg.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLLink.cs\">\r\n      <Link>TL\\TLLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLLong.cs\">\r\n      <Link>TL\\TLLong.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLMessage.cs\">\r\n      <Link>TL\\TLMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLMessage.Encrypted.cs\">\r\n      <Link>TL\\TLMessage.Encrypted.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLMessageAction.cs\">\r\n      <Link>TL\\TLMessageAction.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLMessageContainer.cs\">\r\n      <Link>TL\\TLMessageContainer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLMessageInfo.cs\">\r\n      <Link>TL\\TLMessageInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLMessageMedia.cs\">\r\n      <Link>TL\\TLMessageMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLMessages.cs\">\r\n      <Link>TL\\TLMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLMessagesAcknowledgment.cs\">\r\n      <Link>TL\\TLMessagesAcknowledgment.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLMessagesChatFull.cs\">\r\n      <Link>TL\\TLMessagesChatFull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLMyLink.cs\">\r\n      <Link>TL\\TLMyLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLNearestDC.cs\">\r\n      <Link>TL\\TLNearestDC.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLNewSessionCreated.cs\">\r\n      <Link>TL\\TLNewSessionCreated.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLNonEncryptedMessage.cs\">\r\n      <Link>TL\\TLNonEncryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLNotifyPeer.cs\">\r\n      <Link>TL\\TLNotifyPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLNull.cs\">\r\n      <Link>TL\\TLNull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLObject.cs\">\r\n      <Link>TL\\TLObject.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLObjectGenerator.cs\">\r\n      <Link>TL\\TLObjectGenerator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLPeer.cs\">\r\n      <Link>TL\\TLPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLPeerNotifyEvents.cs\">\r\n      <Link>TL\\TLPeerNotifyEvents.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLPeerNotifySettings.cs\">\r\n      <Link>TL\\TLPeerNotifySettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLPhoto.cs\">\r\n      <Link>TL\\TLPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLPhotos.cs\">\r\n      <Link>TL\\TLPhotos.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLPhotoSize.cs\">\r\n      <Link>TL\\TLPhotoSize.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLPhotosPhoto.cs\">\r\n      <Link>TL\\TLPhotosPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLPong.cs\">\r\n      <Link>TL\\TLPong.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLPQInnerData.cs\">\r\n      <Link>TL\\TLPQInnerData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLResponse.cs\">\r\n      <Link>TL\\TLResponse.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLResPQ.cs\">\r\n      <Link>TL\\TLResPQ.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLRPCDropAnswer.cs\">\r\n      <Link>TL\\TLRPCDropAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLRPCError.cs\">\r\n      <Link>TL\\TLRPCError.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLRPCResult.cs\">\r\n      <Link>TL\\TLRPCResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLSendMessageAction.cs\">\r\n      <Link>TL\\TLSendMessageAction.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLSentCode.cs\">\r\n      <Link>TL\\TLSentCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLSentEncryptedFile.cs\">\r\n      <Link>TL\\TLSentEncryptedFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLSentEncryptedMessage.cs\">\r\n      <Link>TL\\TLSentEncryptedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLSentMessage.cs\">\r\n      <Link>TL\\TLSentMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLServerDHInnerData.cs\">\r\n      <Link>TL\\TLServerDHInnerData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLServerDHParams.cs\">\r\n      <Link>TL\\TLServerDHParams.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLServerFile.cs\">\r\n      <Link>TL\\TLServerFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLSignatures.cs\">\r\n      <Link>TL\\TLSignatures.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLState.cs\">\r\n      <Link>TL\\TLState.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLStatedMessage.cs\">\r\n      <Link>TL\\TLStatedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLStatedMessages.cs\">\r\n      <Link>TL\\TLStatedMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLString.cs\">\r\n      <Link>TL\\TLString.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLSupport.cs\">\r\n      <Link>TL\\TLSupport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLUpdate.cs\">\r\n      <Link>TL\\TLUpdate.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLUpdates.cs\">\r\n      <Link>TL\\TLUpdates.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLUserBase.cs\">\r\n      <Link>TL\\TLUserBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLUserFull.cs\">\r\n      <Link>TL\\TLUserFull.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLUserStatus.cs\">\r\n      <Link>TL\\TLUserStatus.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLUtils.cs\">\r\n      <Link>TL\\TLUtils.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLUtils.Log.cs\">\r\n      <Link>TL\\TLUtils.Log.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLVector.cs\">\r\n      <Link>TL\\TLVector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLVideo.cs\">\r\n      <Link>TL\\TLVideo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\tl\\TLWallpaperSolid.cs\">\r\n      <Link>TL\\TLWallpaperSolid.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\transport\\DataEventArgs.cs\">\r\n      <Link>Transport\\DataEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\transport\\HttpTransport.cs\">\r\n      <Link>Transport\\HttpTransport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\transport\\ITransport.cs\">\r\n      <Link>Transport\\ITransport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\transport\\ITransportService.cs\">\r\n      <Link>Transport\\ITransportService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\transport\\TCPTransport.cs\">\r\n      <Link>Transport\\TCPTransport.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Transport\\TCPTransportBase.cs\">\r\n      <Link>Transport\\TCPTransportBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Transport\\TCPTransportResult.cs\">\r\n      <Link>Transport\\TCPTransportResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\transport\\TransportService.cs\">\r\n      <Link>Transport\\TransportService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Aggregator\\EventAggregator.cs\">\r\n      <Link>Aggregator\\EventAggregator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Aggregator\\ExtensionMethods.cs\">\r\n      <Link>Aggregator\\ExtensionMethods.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Helpers\\Notifications.cs\">\r\n      <Link>Helpers\\Notifications.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Logs\\Log.cs\">\r\n      <Link>Logs\\Log.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\Connection\\PublicConfigService.cs\">\r\n      <Link>Services\\Connection\\PublicConfigService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\DeviceInfo\\EmptyDeviceInfoService.cs\">\r\n      <Link>Services\\DeviceInfo\\EmptyDeviceInfoService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\DeviceInfo\\IDeviceInfo.cs\">\r\n      <Link>Services\\DeviceInfo\\IDeviceInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\FileManager\\FileManagerBase.cs\">\r\n      <Link>Services\\FileManager\\FileManagerBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Channel.cs\">\r\n      <Link>Services\\MTProtoService.Channel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Langpack.cs\">\r\n      <Link>Services\\MTProtoService.Langpack.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Payments.cs\">\r\n      <Link>Services\\MTProtoService.Payments.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Services\\MTProtoService.Phone.cs\">\r\n      <Link>Services\\MTProtoService.Phone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLChangePhone.cs\">\r\n      <Link>TL\\Functions\\Account\\TLChangePhone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLCheckPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLCheckPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLConfirmPhone.cs\">\r\n      <Link>TL\\Functions\\Account\\TLConfirmPhone.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLGetAuthorizations.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetAuthorizations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLGetPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLGetPasswordSettings.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetPasswordSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLGetTmpPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetTmpPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLGetWallPapers.cs\">\r\n      <Link>TL\\Functions\\Account\\TLGetWallPapers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLRecoverPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLRecoverPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLReportPeer.cs\">\r\n      <Link>TL\\Functions\\Account\\TLReportPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLRequestPasswordRecovery.cs\">\r\n      <Link>TL\\Functions\\Account\\TLRequestPasswordRecovery.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLResetAuthorization.cs\">\r\n      <Link>TL\\Functions\\Account\\TLResetAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLResetPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLResetPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLSendChangePhoneCode.cs\">\r\n      <Link>TL\\Functions\\Account\\TLSendChangePhoneCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLSendConfirmPhoneCode.cs\">\r\n      <Link>TL\\Functions\\Account\\TLSendConfirmPhoneCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLSetPassword.cs\">\r\n      <Link>TL\\Functions\\Account\\TLSetPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLUpdateDeviceLocked.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdateDeviceLocked.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Account\\TLUpdatePasswordSettings.cs\">\r\n      <Link>TL\\Functions\\Account\\TLUpdatePasswordSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLCancelCode.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLCancelCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Auth\\TLResendCode.cs\">\r\n      <Link>TL\\Functions\\Auth\\TLResendCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLCheckUsername.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLCheckUsername.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLCreateChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLCreateChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLDeleteChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLDeleteChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLDeleteChannelMessages.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLDeleteChannelMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLDeleteHistory.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLDeleteHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLDeleteUserHistory.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLDeleteUserHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLEditAbout.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLEditAbout.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLEditAdmin.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLEditAdmin.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLEditMessage.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLEditMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLEditPhoto.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLEditPhoto.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLEditTitle.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLEditTitle.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLExportInvite.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLExportInvite.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLExportMessageLink.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLExportMessageLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetAdminedPublicChannels.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetAdminedPublicChannels.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetChannels.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetChannels.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetDialogs.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetFullChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetFullChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetImportantHistory.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetImportantHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetMessageEditData.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetMessageEditData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetMessages.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetParticipant.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetParticipant.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLGetParticipants.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLGetParticipants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLInviteToChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLInviteToChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLJoinChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLJoinChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLKickFromChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLKickFromChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLLeaveChannel.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLLeaveChannel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLReadHistory.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLReadHistory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLReadMessageContents.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLReadMessageContents.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLReportSpam.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLReportSpam.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLSetStickers.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLSetStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLToggleComments.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLToggleComments.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLToggleInvites.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLToggleInvites.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLTogglePreHistoryHidden.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLTogglePreHistoryHidden.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLToggleSignatures.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLToggleSignatures.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLUpdateChannelUsername.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLUpdateChannelUsername.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Channels\\TLUpdatePinnedMessage.cs\">\r\n      <Link>TL\\Functions\\Channels\\TLUpdatePinnedMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLGetTopPeers.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLGetTopPeers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLResetSaved.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLResetSaved.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLResetTopPeerRating.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLResetTopPeerRating.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Contacts\\TLResolveUsername.cs\">\r\n      <Link>TL\\Functions\\Contacts\\TLResolveUsername.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetAppChangelog.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetAppChangelog.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetCdnConfig.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetCdnConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetRecentMeUrls.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetRecentMeUrls.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLGetTermsOfService.cs\">\r\n      <Link>TL\\Functions\\Help\\TLGetTermsOfService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Help\\TLInvokeWithoutUpdates.cs\">\r\n      <Link>TL\\Functions\\Help\\TLInvokeWithoutUpdates.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Langpack\\TLGetDifference.cs\">\r\n      <Link>TL\\Functions\\Langpack\\TLGetDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Langpack\\TLGetLangPack.cs\">\r\n      <Link>TL\\Functions\\Langpack\\TLGetLangPack.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Langpack\\TLGetLanguages.cs\">\r\n      <Link>TL\\Functions\\Langpack\\TLGetLanguages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Langpack\\TLGetStrings.cs\">\r\n      <Link>TL\\Functions\\Langpack\\TLGetStrings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLBotGetCallbackAnswer.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLBotGetCallbackAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLCheckChatInvite.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLCheckChatInvite.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLClearRecentStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLClearRecentStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLDeactivateChat.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLDeactivateChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLEditChatAdmin.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLEditChatAdmin.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLExportChatInvite.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLExportChatInvite.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLFaveSticker.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLFaveSticker.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetAllDrafts.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetAllDrafts.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetAllStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetAllStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetArchivedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetArchivedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetAttachedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetAttachedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetCommonChats.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetCommonChats.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetDocumentByHash.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetDocumentByHash.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetFavedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetFavedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetFeaturedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetFeaturedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetInlineBotResults.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetInlineBotResults.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetMaskStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetMaskStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetPeerDialogs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetPeerDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetPeerSettings.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetPeerSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetPinnedDialogs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetPinnedDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetRecentLocations.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetRecentLocations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetRecentStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetRecentStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetSavedGifs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetSavedGifs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetStickerSet.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetUnreadMentions.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetUnreadMentions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetUnusedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetUnusedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetWebPage.cs\">\r\n      <Link>TL\\TLGetWebPage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLGetWebPagePreview.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLGetWebPagePreview.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLHideReportSpam.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLHideReportSpam.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLImportChatInvite.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLImportChatInvite.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLInstallStickerSet.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLInstallStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLMigrateChat.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLMigrateChat.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReadFeaturedStickers.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadFeaturedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReadMentions.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReadMentions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReorderPinnedDialogs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReorderPinnedDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReorderStickerSets.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReorderStickerSets.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLReportSpam.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLReportSpam.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSaveDraft.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSaveDraft.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSaveGif.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSaveGif.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSearchGifs.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSearchGifs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSendInlineBotResult.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendInlineBotResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSendMultiMedia.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSendMultiMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSetBotCallbackAnswer.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSetBotCallbackAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLSetInlineBotResults.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLSetInlineBotResults.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLStartBot.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLStartBot.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLToggleChatAdmins.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLToggleChatAdmins.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLToggleDialogPin.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLToggleDialogPin.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLUninstallStickerSet.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLUninstallStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Messages\\TLUploadMedia.cs\">\r\n      <Link>TL\\Functions\\Messages\\TLUploadMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLClearSavedInfo.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLClearSavedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLGetPaymentForm.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLGetPaymentForm.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLGetPaymentReceipt.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLGetPaymentReceipt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLGetSavedInfo.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLGetSavedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLSendPaymentForm.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLSendPaymentForm.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Payments\\TLValidateRequestedInfo.cs\">\r\n      <Link>TL\\Functions\\Payments\\TLValidateRequestedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLAcceptCall.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLAcceptCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLConfirmCall.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLConfirmCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLDiscardCall.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLDiscardCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLGetCallConfig.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLGetCallConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLReceivedCall.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLReceivedCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLRequestCall.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLRequestCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLSaveCallDebug.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLSaveCallDebug.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Phone\\TLSetCallRating.cs\">\r\n      <Link>TL\\Functions\\Phone\\TLSetCallRating.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Updates\\TLGetChannelDifference.cs\">\r\n      <Link>TL\\Functions\\Updates\\TLGetChannelDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Upload\\TLGetCdnFile.cs\">\r\n      <Link>TL\\Functions\\Upload\\TLGetCdnFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\Functions\\Upload\\TLReuploadCdnFile.cs\">\r\n      <Link>TL\\Functions\\Upload\\TLReuploadCdnFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAccountAuthorization.cs\">\r\n      <Link>TL\\TLAccountAuthorization.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAccountAuthorizations.cs\">\r\n      <Link>TL\\TLAccountAuthorizations.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAccountDaysTTL.cs\">\r\n      <Link>TL\\TLAccountDaysTTL.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLActionInfo.cs\">\r\n      <Link>TL\\TLActionInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAdminLogResults.cs\">\r\n      <Link>TL\\TLAdminLogResults.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAffectedMessages.cs\">\r\n      <Link>TL\\TLAffectedMessages.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAllStrickers.cs\">\r\n      <Link>TL\\TLAllStrickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLAppChangelogBase.cs\">\r\n      <Link>TL\\TLAppChangelogBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLArchivedStickers.cs\">\r\n      <Link>TL\\TLArchivedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotCallbackAnswer.cs\">\r\n      <Link>TL\\TLBotCallbackAnswer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotCommand.cs\">\r\n      <Link>TL\\TLBotCommand.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotInfo.cs\">\r\n      <Link>TL\\TLBotInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotInlineMessage.cs\">\r\n      <Link>TL\\TLBotInlineMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotInlineResult.cs\">\r\n      <Link>TL\\TLBotInlineResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLBotResults.cs\">\r\n      <Link>TL\\TLBotResults.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCallsSecurity.cs\">\r\n      <Link>TL\\TLCallsSecurity.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCameraSettings.cs\">\r\n      <Link>TL\\TLCameraSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCdnConfig.cs\">\r\n      <Link>TL\\TLCdnConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCdnFile.cs\">\r\n      <Link>TL\\TLCdnFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCdnPublicKey.cs\">\r\n      <Link>TL\\TLCdnPublicKey.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelAdminLogEvent.cs\">\r\n      <Link>TL\\TLChannelAdminLogEvent.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelAdminLogEventAction.cs\">\r\n      <Link>TL\\TLChannelAdminLogEventAction.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelAdminLogEventsFilter.cs\">\r\n      <Link>TL\\TLChannelAdminLogEventsFilter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelAdminRights.cs\">\r\n      <Link>TL\\TLChannelAdminRights.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelBannedRights.cs\">\r\n      <Link>TL\\TLChannelBannedRights.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelDifference.cs\">\r\n      <Link>TL\\TLChannelDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelMessagesFiler.cs\">\r\n      <Link>TL\\TLChannelMessagesFiler.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelParticipant.cs\">\r\n      <Link>TL\\TLChannelParticipant.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelParticipantRole.cs\">\r\n      <Link>TL\\TLChannelParticipantRole.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChannelParticipantsFilter.cs\">\r\n      <Link>TL\\TLChannelParticipantsFilter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChatInvite.cs\">\r\n      <Link>TL\\TLChatInvite.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLChatSettings.cs\">\r\n      <Link>TL\\TLChatSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLCodeType.cs\">\r\n      <Link>TL\\TLCodeType.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLConfigSimple.cs\">\r\n      <Link>TL\\TLConfigSimple.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLContactLink.cs\">\r\n      <Link>TL\\TLContactLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDataJSON.cs\">\r\n      <Link>TL\\TLDataJSON.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDisabledFeature.cs\">\r\n      <Link>TL\\TLDisabledFeature.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDocumentAttribute.cs\">\r\n      <Link>TL\\TLDocumentAttribute.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLDraftMessage.cs\">\r\n      <Link>TL\\TLDraftMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLExportedMessageLink.cs\">\r\n      <Link>TL\\TLExportedMessageLink.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFavedStickers.cs\">\r\n      <Link>TL\\TLFavedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFeaturedStickers.cs\">\r\n      <Link>TL\\TLFeaturedStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFoundGif.cs\">\r\n      <Link>TL\\TLFoundGif.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLFoundGifs.cs\">\r\n      <Link>TL\\TLFoundGifs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLGame.cs\">\r\n      <Link>TL\\TLGame.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLHashtagItem.cs\">\r\n      <Link>TL\\TLHashtagItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLHighScore.cs\">\r\n      <Link>TL\\TLHighScore.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLHighScores.cs\">\r\n      <Link>TL\\TLHighScores.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInlineBotSwitchPM.cs\">\r\n      <Link>TL\\TLInlineBotSwitchPM.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputBotInlineMessage.cs\">\r\n      <Link>TL\\TLInputBotInlineMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputBotInlineMessageId.cs\">\r\n      <Link>TL\\TLInputBotInlineMessageId.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputBotInlineResult.cs\">\r\n      <Link>TL\\TLInputBotInlineResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputChatBase.cs\">\r\n      <Link>TL\\TLInputChatBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputGame.cs\">\r\n      <Link>TL\\TLInputGame.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputMessageEntityMentionName.cs\">\r\n      <Link>TL\\TLInputMessageEntityMentionName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPaymentCredentials.cs\">\r\n      <Link>TL\\TLInputPaymentCredentials.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPhoneCall.cs\">\r\n      <Link>TL\\TLInputPhoneCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPrivacyKey.cs\">\r\n      <Link>TL\\TLInputPrivacyKey.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputPrivacyRule.cs\">\r\n      <Link>TL\\TLInputPrivacyRule.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputReportReason.cs\">\r\n      <Link>TL\\TLInputReportReason.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputSingleMedia.cs\">\r\n      <Link>TL\\TLInputSingleMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputStickeredMedia.cs\">\r\n      <Link>TL\\TLInputStickeredMedia.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputStickerSet.cs\">\r\n      <Link>TL\\TLInputStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInputWebDocument.cs\">\r\n      <Link>TL\\TLInputWebDocument.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLInvoice.cs\">\r\n      <Link>TL\\TLInvoice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLIpPort.cs\">\r\n      <Link>TL\\TLIpPort.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLKeyboardButton.cs\">\r\n      <Link>TL\\TLKeyboardButton.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLKeyboardButtonRow.cs\">\r\n      <Link>TL\\TLKeyboardButtonRow.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLLabeledPrice.cs\">\r\n      <Link>TL\\TLLabeledPrice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLLangPackDifference.cs\">\r\n      <Link>TL\\TLLangPackDifference.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLLangPackLanguage.cs\">\r\n      <Link>TL\\TLLangPackLanguage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLLangPackString.cs\">\r\n      <Link>TL\\TLLangPackString.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMaskCoords.cs\">\r\n      <Link>TL\\TLMaskCoords.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageEditData.cs\">\r\n      <Link>TL\\TLMessageEditData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageEntity.cs\">\r\n      <Link>TL\\TLMessageEntity.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageFwdHeader.cs\">\r\n      <Link>TL\\TLMessageFwdHeader.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageGroup.cs\">\r\n      <Link>TL\\TLMessageGroup.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessageRange.cs\">\r\n      <Link>TL\\TLMessageRange.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessagesChannelParticipants.cs\">\r\n      <Link>TL\\TLMessagesChannelParticipants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLMessagesStickerSet.cs\">\r\n      <Link>TL\\TLMessagesStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPage.cs\">\r\n      <Link>TL\\TLPage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPageBlock.cs\">\r\n      <Link>TL\\TLPageBlock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPasscodeParams.cs\">\r\n      <Link>TL\\TLPasscodeParams.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPassword.cs\">\r\n      <Link>TL\\TLPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPasswordInputSettings.cs\">\r\n      <Link>TL\\TLPasswordInputSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPasswordRecovery.cs\">\r\n      <Link>TL\\TLPasswordRecovery.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPasswordSettings.cs\">\r\n      <Link>TL\\TLPasswordSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentCharge.cs\">\r\n      <Link>TL\\TLPaymentCharge.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentForm.cs\">\r\n      <Link>TL\\TLPaymentForm.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentReceipt.cs\">\r\n      <Link>TL\\TLPaymentReceipt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentRequestedInfo.cs\">\r\n      <Link>TL\\TLPaymentRequestedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentResult.cs\">\r\n      <Link>TL\\TLPaymentResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPaymentSavedCredentialsCard.cs\">\r\n      <Link>TL\\TLPaymentSavedCredentialsCard.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPeerDialogs.cs\">\r\n      <Link>TL\\TLPeerDialogs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPeerSettings.cs\">\r\n      <Link>TL\\TLPeerSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhoneCall.cs\">\r\n      <Link>TL\\TLPhoneCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhoneCallDiscardReason.cs\">\r\n      <Link>TL\\TLPhoneCallDiscardReason.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhoneCallProtocol.cs\">\r\n      <Link>TL\\TLPhoneCallProtocol.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhoneConnection.cs\">\r\n      <Link>TL\\TLPhoneConnection.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhonePhoneCall.cs\">\r\n      <Link>TL\\TLPhonePhoneCall.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPhotoPickerSettings.cs\">\r\n      <Link>TL\\TLPhotoPickerSettings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPopularContact.cs\">\r\n      <Link>TL\\TLPopularContact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPostAddress.cs\">\r\n      <Link>TL\\TLPostAddress.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPrivacyKey.cs\">\r\n      <Link>TL\\TLPrivacyKey.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPrivacyRule.cs\">\r\n      <Link>TL\\TLPrivacyRule.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLPrivacyRules.cs\">\r\n      <Link>TL\\TLPrivacyRules.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLProxyConfig.cs\">\r\n      <Link>TL\\TLProxyConfig.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLReceivedNotifyMessage.cs\">\r\n      <Link>TL\\TLReceivedNotifyMessage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRecentlyUsedSticker.cs\">\r\n      <Link>TL\\TLRecentlyUsedSticker.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRecentMeUrl.cs\">\r\n      <Link>TL\\TLRecentMeUrl.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRecentMeUrls.cs\">\r\n      <Link>TL\\TLRecentMeUrls.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRecentStickers.cs\">\r\n      <Link>TL\\TLRecentStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLReplyKeyboardMarkup.cs\">\r\n      <Link>TL\\TLReplyKeyboardMarkup.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLResolvedPeer.cs\">\r\n      <Link>TL\\TLResolvedPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLResultInfo.cs\">\r\n      <Link>TL\\TLResultInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLRichText.cs\">\r\n      <Link>TL\\TLRichText.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSavedGifs.cs\">\r\n      <Link>TL\\TLSavedGifs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSavedInfo.cs\">\r\n      <Link>TL\\TLSavedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSentChangePhoneCode.cs\">\r\n      <Link>TL\\TLSentChangePhoneCode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLSentCodeType.cs\">\r\n      <Link>TL\\TLSentCodeType.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLShippingOption.cs\">\r\n      <Link>TL\\TLShippingOption.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStickerPack.cs\">\r\n      <Link>TL\\TLStickerPack.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStickers.cs\">\r\n      <Link>TL\\TLStickers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStickerSet.cs\">\r\n      <Link>TL\\TLStickerSet.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStickerSetCovered.cs\">\r\n      <Link>TL\\TLStickerSetCovered.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLStickerSetInstallResult.cs\">\r\n      <Link>TL\\TLStickerSetInstallResult.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTermsOfService.cs\">\r\n      <Link>TL\\TLTermsOfService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTmpPassword.cs\">\r\n      <Link>TL\\TLTmpPassword.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTopPeer.cs\">\r\n      <Link>TL\\TLTopPeer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTopPeerCategory.cs\">\r\n      <Link>TL\\TLTopPeerCategory.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTopPeerCategoryPeers.cs\">\r\n      <Link>TL\\TLTopPeerCategoryPeers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLTopPeers.cs\">\r\n      <Link>TL\\TLTopPeers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLValidatedRequestedInfo.cs\">\r\n      <Link>TL\\TLValidatedRequestedInfo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLWebDocument.cs\">\r\n      <Link>TL\\TLWebDocument.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLWebFile.cs\">\r\n      <Link>TL\\TLWebFile.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\TL\\TLWebPage.cs\">\r\n      <Link>TL\\TLWebPage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\Transport\\SocksProxy.cs\">\r\n      <Link>Transport\\SocksProxy.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\WindowsPhone\\BigInteger.cs\">\r\n      <Link>WindowsPhone\\BigInteger.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Api\\WindowsPhone\\Tuple.cs\">\r\n      <Link>WindowsPhone\\Tuple.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"Resources\\AppResources.ru.Designer.cs\">\r\n      <DependentUpon>AppResources.ru.resx</DependentUpon>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\AppResources.pt.Designer.cs\">\r\n      <DependentUpon>AppResources.pt.resx</DependentUpon>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\AppResources.nl.Designer.cs\">\r\n      <DependentUpon>AppResources.nl.resx</DependentUpon>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\AppResources.it.Designer.cs\">\r\n      <DependentUpon>AppResources.it.resx</DependentUpon>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\AppResources.es.Designer.cs\">\r\n      <DependentUpon>AppResources.es.resx</DependentUpon>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\AppResources.de.Designer.cs\">\r\n      <DependentUpon>AppResources.de.resx</DependentUpon>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\AppResources.Designer.cs\">\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n      <DependentUpon>AppResources.resx</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Services\\FileManager\\IWebFileManager.cs\" />\r\n    <Compile Include=\"Services\\FileManager\\WebFileManager.cs\" />\r\n    <Compile Include=\"Services\\Location\\ILiveLocationService.cs\" />\r\n    <Compile Include=\"Services\\Location\\LiveLocationService.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLAcceptAuthorization.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLDeleteSecureValue.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLGetAllSecureValues.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLGetAuthorizationForm.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLGetSecureValue.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLInitTakeoutSession.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLResetWebAuthorization.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLResetWebAuthorizations.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLGetWebAuthorizations.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLSaveSecureValue.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLSendVerifyEmailCode.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLSendVerifyPhoneCode.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLVerifyEmail.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLVerifyEmailCode.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Account\\TLVerifyPhone.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Auth\\TLBindTempAuthKey.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLChangeFeedBroadcast.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLGetFeed.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLReadFeed.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Channels\\TLSetFeedBroadcasts.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Contacts\\TLGetSaved.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Help\\TLGetDeepLinkInfo.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Help\\TLGetPassportConfig.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Help\\TLGetProxyData.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLClearAllDrafts.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLGetDialogUnreadMarks.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLMarkDialogUnread.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLReport.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLSearchStickerSets.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Messages\\TLToggleTopPeers.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Upload\\TLGetWebFile.cs\" />\r\n    <Compile Include=\"TL\\Functions\\Users\\TLSetSecureValueErrors.cs\" />\r\n    <Compile Include=\"TL\\TLAppUpdate.cs\" />\r\n    <Compile Include=\"TL\\TLContactsSettings.cs\" />\r\n    <Compile Include=\"TL\\TLDeepLinkInfo.cs\" />\r\n    <Compile Include=\"TL\\TLInputCheckPasswordSRP.cs\" />\r\n    <Compile Include=\"TL\\TLInputClientProxy.cs\" />\r\n    <Compile Include=\"TL\\TLInvokeWithMessageRange.cs\" />\r\n    <Compile Include=\"TL\\TLInvokeWithTakeout.cs\" />\r\n    <Compile Include=\"TL\\TLPassportConfig.cs\" />\r\n    <Compile Include=\"TL\\TLPasswordKdfAlgo.cs\" />\r\n    <Compile Include=\"TL\\TLProxyData.cs\" />\r\n    <Compile Include=\"TL\\TLSavedPhoneContact.cs\" />\r\n    <Compile Include=\"TL\\TLSecureCredentialsEncrypted.cs\" />\r\n    <Compile Include=\"TL\\TLSecureData.cs\" />\r\n    <Compile Include=\"TL\\TLSecurePasswordKdfAlgo.cs\" />\r\n    <Compile Include=\"TL\\TLSecureRequiredType.cs\" />\r\n    <Compile Include=\"TL\\TLSecureSecretSettings.cs\" />\r\n    <Compile Include=\"TL\\TLSecureValueError.cs\" />\r\n    <Compile Include=\"TL\\TLSecureValueType.cs\" />\r\n    <Compile Include=\"TL\\TLAuthorizationForm.cs\" />\r\n    <Compile Include=\"TL\\TLFeedBroadcasts.cs\" />\r\n    <Compile Include=\"TL\\TLFeedSources.cs\" />\r\n    <Compile Include=\"TL\\TLFoundStickerSets.cs\" />\r\n    <Compile Include=\"TL\\TLInputDialogPeer.cs\" />\r\n    <Compile Include=\"TL\\TLDialogPeer.cs\" />\r\n    <Compile Include=\"TL\\TLFeedPosition.cs\" />\r\n    <Compile Include=\"TL\\TLInputMessage.cs\" />\r\n    <Compile Include=\"TL\\TLInputSecureFile.cs\" />\r\n    <Compile Include=\"TL\\TLInputSecureValue.cs\" />\r\n    <Compile Include=\"TL\\TLSecureFile.cs\" />\r\n    <Compile Include=\"TL\\TLSecureValue.cs\" />\r\n    <Compile Include=\"TL\\TLSecureValueHash.cs\" />\r\n    <Compile Include=\"TL\\TLSecureValuePlainData.cs\" />\r\n    <Compile Include=\"TL\\TLSentEmailCode.cs\" />\r\n    <Compile Include=\"TL\\TLTakeout.cs\" />\r\n    <Compile Include=\"TL\\TLTermsOfServiceUpdate.cs\" />\r\n    <Compile Include=\"TL\\TLWebAuthorization.cs\" />\r\n    <Compile Include=\"TL\\TLWebAuthorizations.cs\" />\r\n    <Compile Include=\"Transport\\NativeTcpTransport.cs\" />\r\n    <Compile Include=\"Transport\\TCPTransportWinRT.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"crypto\">\r\n      <HintPath>..\\packages\\Portable.BouncyCastle.1.7.0.2\\lib\\portable-net4+sl5+wp8+win8+wpa81+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10\\crypto.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Core\">\r\n      <HintPath>..\\packages\\Rx-Core.2.2.2\\lib\\windowsphone71\\System.Reactive.Core.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Linq\">\r\n      <HintPath>..\\packages\\Rx-Linq.2.2.2\\lib\\windowsphone71\\System.Reactive.Linq.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Interfaces\">\r\n      <HintPath>..\\packages\\Rx-Interfaces.2.2.2\\lib\\windowsphone71\\System.Reactive.Interfaces.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.ru.resx\">\r\n      <Generator>ResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.ru.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.pt.resx\">\r\n      <Generator>ResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.pt.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.nl.resx\">\r\n      <Generator>ResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.nl.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.it.resx\">\r\n      <Generator>ResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.it.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.es.resx\">\r\n      <Generator>ResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.es.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.de.resx\">\r\n      <Generator>ResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.de.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.resx\">\r\n      <Generator>ResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\libtgnet\\libtgnet.vcxproj\">\r\n      <Project>{cc7a35bf-aabc-411d-b911-ac037a781266}</Project>\r\n      <Name>libtgnet</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\r\n    <PropertyGroup>\r\n      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>\r\n    </PropertyGroup>\r\n    <Error Condition=\"!Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\\.nuget\\NuGet.targets'))\" />\r\n  </Target>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "Telegram.Api.WP8/Transport/NativeTcpTransport.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing Windows.Networking;\r\nusing libtgnet;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Transport\r\n{\r\n    public class NativeTcpTransport : TcpTransportBase\r\n    {\r\n        private readonly ConnectionSocketWrapper _wrapper;\r\n\r\n        private bool _isConnected;\r\n\r\n        private readonly List<Tuple<byte[], Action<bool>, Action<TcpTransportResult>>> _requests = new List<Tuple<byte[], Action<bool>, Action<TcpTransportResult>>>();\r\n\r\n        public override ulong Ping\r\n        {\r\n            get\r\n            {\r\n                ulong ping;\r\n                lock (SyncRoot)\r\n                {\r\n                    ping = _wrapper != null ? _wrapper.GetPing() : 0;\r\n                }\r\n                return ping;\r\n            }\r\n        }\r\n\r\n        private ProxySettings _proxySettings;\r\n\r\n        public NativeTcpTransport(string host, int port, string staticHost, int staticPort, MTProtoTransportType mtProtoType, short protocolDCId, byte[] protocolSecret, TLProxyConfigBase proxyConfig)\r\n            : base(host, port, staticHost, staticPort, mtProtoType, proxyConfig)\r\n        {\r\n//            System.Diagnostics.Debug.WriteLine(\r\n//                \"  [NativeTcpTransport] .ctor begin host={0} port={1} static_host={2} static_port={3} type={4} protocol_dcid={5} protocol_secret={6} proxy={7}\",\r\n//                host, port, staticHost, staticPort, mtProtoType, protocolDCId, protocolSecret, proxyConfig);\r\n\r\n            ActualHost = host;\r\n            ActualPort = port;\r\n\r\n            var ipv4 = true;\r\n            ProxySettings proxySettings = null;\r\n            if (proxyConfig != null && proxyConfig.IsEnabled.Value && !proxyConfig.IsEmpty)\r\n            {\r\n                var socks5Proxy = proxyConfig.GetProxy() as TLSocks5Proxy;\r\n                if (socks5Proxy != null)\r\n                {\r\n                    try\r\n                    {\r\n                        ipv4 = new HostName(socks5Proxy.Server.ToString()).Type == HostNameType.Ipv4;\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n\r\n                    }\r\n                    proxySettings = new ProxySettings\r\n                    {\r\n                        Type = ProxyType.Socks5,\r\n                        Host = socks5Proxy.Server.ToString(),\r\n                        Port = socks5Proxy.Port.Value,\r\n                        Username = socks5Proxy.Username.ToString(),\r\n                        Password = socks5Proxy.Password.ToString(),\r\n                        IPv4 = ipv4\r\n                    };\r\n\r\n                    ActualHost = staticHost;\r\n                    ActualPort = staticPort;\r\n                    protocolSecret = null;\r\n                    protocolDCId = protocolDCId;\r\n                }\r\n                var mtProtoProxy = proxyConfig.GetProxy() as TLMTProtoProxy;\r\n                if (mtProtoProxy != null)\r\n                {\r\n                    try\r\n                    {\r\n                        ipv4 = new HostName(mtProtoProxy.Server.ToString()).Type == HostNameType.Ipv4;\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n\r\n                    }\r\n                    proxySettings = new ProxySettings\r\n                    {\r\n                        Type = ProxyType.MTProto,\r\n                        Host = mtProtoProxy.Server.ToString(),\r\n                        Port = mtProtoProxy.Port.Value,\r\n                        Secret = TLUtils.ParseSecret(mtProtoProxy.Secret),\r\n                        IPv4 = ipv4\r\n                    };\r\n\r\n                    ActualHost = staticHost;\r\n                    ActualPort = staticPort;\r\n                }\r\n            }\r\n\r\n            try\r\n            {\r\n                ipv4 = new HostName(ActualHost).Type == HostNameType.Ipv4;\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n\r\n            var connectionSettings = new ConnectionSettings\r\n            {\r\n                Host = ActualHost,\r\n                Port = ActualPort,\r\n                IPv4 = ipv4,\r\n                ProtocolDCId = protocolDCId,\r\n                ProtocolSecret = protocolSecret\r\n            };\r\n\r\n            _proxySettings = proxySettings;\r\n\r\n//            var proxyString = proxySettings == null\r\n//                ? \"null\"\r\n//                : string.Format(\"[host={0} port={1} ipv4={2} type={3} secret={4} username={5} password={6}]\", \r\n//                proxySettings.Host, \r\n//                proxySettings.Port, \r\n//                proxySettings.IPv4, \r\n//                proxySettings.Type, \r\n//                proxySettings.Secret, \r\n//                proxySettings.Username, \r\n//                proxySettings.Password);\r\n//            System.Diagnostics.Debug.WriteLine(\r\n//                \"  [NativeTcpTransport] .ctor end host={0} port={1} ipv4={2} protocol_dcid={3} protocol_secret={4} proxy={5}\",\r\n//                connectionSettings.Host, connectionSettings.Port, connectionSettings.IPv4, connectionSettings.ProtocolDCId, connectionSettings.ProtocolSecret, proxyString);\r\n\r\n            _wrapper = new ConnectionSocketWrapper(connectionSettings, proxySettings);\r\n            _wrapper.Closed += Wrapper_OnClosed;\r\n            _wrapper.PacketReceived += Wrapper_OnPacketReceived;\r\n        }\r\n\r\n        private void Wrapper_OnPacketReceived(ConnectionSocketWrapper sender, byte[] data)\r\n        {\r\n            LastReceiveTime = DateTime.Now;\r\n\r\n            StopCheckConfigTimer();\r\n            RaiseConnectedAsync();\r\n            lock (SyncRoot)\r\n            {\r\n                _isConnected = true;\r\n            }\r\n\r\n            Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                RaisePacketReceived(new DataEventArgs(data));\r\n            });\r\n        }\r\n\r\n        private void Wrapper_OnClosed(ConnectionSocketWrapper sender)\r\n        {\r\n            RaiseConnectionLost();\r\n        }\r\n\r\n        ~NativeTcpTransport()\r\n        {\r\n\r\n        }\r\n\r\n        private void LOG(string message)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"NativeTcpTransport \" + Host + \" \" + message);\r\n        }\r\n\r\n        public override void SendPacketAsync(string caption, byte[] data, Action<bool> callback, Action<TcpTransportResult> faultCallback = null)\r\n        {\r\n            var now = DateTime.Now;\r\n            if (!FirstSendTime.HasValue)\r\n            {\r\n                FirstSendTime = now;\r\n            }\r\n\r\n            Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var isConnected = false;\r\n                var isConnecting = false;\r\n                var result = -1;\r\n\r\n                lock (SyncRoot)\r\n                {\r\n                    isConnected = _isConnected;\r\n                    if (!isConnected)\r\n                    {\r\n                        _requests.Add(new Tuple<byte[], Action<bool>, Action<TcpTransportResult>>(data, callback, faultCallback));\r\n                        isConnecting = _requests.Count == 1;\r\n                    }\r\n                }\r\n\r\n                if (isConnected)\r\n                {\r\n                    lock (SyncRoot)\r\n                    {\r\n                        try\r\n                        {\r\n                            result = _wrapper.SendPacket(data);\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n\r\n                        }\r\n                    }\r\n\r\n                    if (result > 0 && result < data.Length)\r\n                    {\r\n                        Helpers.Execute.ShowDebugMessage(string.Format(\"NativeTransport Send req={0} sent={1}\", data.Length, result));\r\n                        callback.SafeInvoke(true);\r\n                    }\r\n                    else if (result > 0)\r\n                    {\r\n                        callback.SafeInvoke(true);\r\n                    }\r\n                    else\r\n                    {\r\n                        faultCallback.SafeInvoke(new TcpTransportResult(new Exception(\"NativeTCPTransport error=\" + result)));\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                if (isConnecting)\r\n                {\r\n                    RaiseConnectingAsync();\r\n                    result = -1;\r\n\r\n                    try\r\n                    {\r\n                        //LOG(\"Connect start\");\r\n                        result = _wrapper.Connect();\r\n                        //LOG(\"Connect end\");\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n\r\n                    }\r\n\r\n                    isConnected = result > 0;\r\n                    if (!isConnected)\r\n                    {\r\n                        List<Tuple<byte[], Action<bool>, Action<TcpTransportResult>>> requests;\r\n                        lock (SyncRoot)\r\n                        {\r\n                            _isConnected = false;\r\n                            requests = new List<Tuple<byte[], Action<bool>, Action<TcpTransportResult>>>(_requests);\r\n                            _requests.Clear();\r\n                        }\r\n\r\n                        if (requests.Count > 0)\r\n                        {\r\n                            for (var i = 0; i < requests.Count; i++)\r\n                            {\r\n                                requests[i].Item3.SafeInvoke(new TcpTransportResult(new Exception(\"NativeTCPTransport connect error=\" + result)));\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            try\r\n                            {\r\n                                _wrapper.StartReceive();\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n\r\n                            }\r\n                        });\r\n\r\n                        List<Tuple<byte[], Action<bool>, Action<TcpTransportResult>>> requests;\r\n                        lock (SyncRoot)\r\n                        {\r\n                            _isConnected = true;\r\n                            requests = new List<Tuple<byte[], Action<bool>, Action<TcpTransportResult>>>(_requests);\r\n                            _requests.Clear();\r\n                        }\r\n\r\n                        if (requests.Count > 0)\r\n                        {\r\n                            for (var i = 0; i < requests.Count; i++)\r\n                            {\r\n                                lock (SyncRoot)\r\n                                {\r\n                                    try\r\n                                    {\r\n                                        result = _wrapper.SendPacket(requests[i].Item1);\r\n                                    }\r\n                                    catch (Exception ex)\r\n                                    {\r\n\r\n                                    }\r\n                                }\r\n                                if (result > 0 && result < requests[i].Item1.Length)\r\n                                {\r\n                                    Helpers.Execute.ShowDebugMessage(string.Format(\"NativeTransport Send req={0} sent={1}\", requests[i].Item1.Length, result));\r\n                                    requests[i].Item2.SafeInvoke(true);\r\n                                }\r\n                                else if (result > 0)\r\n                                {\r\n                                    requests[i].Item2.SafeInvoke(true);\r\n                                }\r\n                                else\r\n                                {\r\n                                    requests[i].Item3.SafeInvoke(new TcpTransportResult(new Exception(\"NativeTCPTransport error=\" + result)));\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public override void Close()\r\n        {\r\n            WRITE_LOG(string.Format(\"Close socket {2} {0}:{1}\", Host, Port, Id));\r\n\r\n            List<Tuple<byte[], Action<bool>, Action<TcpTransportResult>>> requests;\r\n\r\n            lock (SyncRoot)\r\n            {\r\n                if (Closed)\r\n                {\r\n                    return;\r\n                }\r\n                try\r\n                {\r\n                    _wrapper.Closed -= Wrapper_OnClosed;\r\n                    _wrapper.PacketReceived -= Wrapper_OnPacketReceived;\r\n                    _wrapper.Close();\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Helpers.Execute.ShowDebugMessage(\"NativeTCPTransport.Close ex \" + ex);\r\n                }\r\n                Closed = true;\r\n                requests = new List<Tuple<byte[], Action<bool>, Action<TcpTransportResult>>>(_requests);\r\n                _requests.Clear();\r\n                StopCheckConfigTimer();\r\n            }\r\n\r\n            if (requests.Count > 0)\r\n            {\r\n                for (var i = 0; i < requests.Count; i++)\r\n                {\r\n                    requests[i].Item3.SafeInvoke(new TcpTransportResult(new Exception(\"NativeTCPTransport closed\")));\r\n                }\r\n            }\r\n        }\r\n\r\n        public override string GetTransportInfo()\r\n        {\r\n            return string.Empty;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Api.WP8/Transport/TCPTransportWinRT.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define TCP_OBFUSCATED_2\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing Windows.Foundation;\r\nusing Windows.Networking;\r\nusing Windows.Networking.Sockets;\r\nusing Windows.Storage.Streams;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.Api.Transport\r\n{\r\n    public class TcpTransportWinRT : TcpTransportBase\r\n    {\r\n        private readonly StreamSocket _socket;\r\n\r\n        private readonly object _isConnectedSyncRoot = new object();\r\n\r\n        private bool _isConnected;\r\n\r\n        private readonly object _dataWriterSyncRoot = new object();\r\n\r\n        private readonly DataReader _dataReader;\r\n\r\n        private readonly DataWriter _dataWriter;\r\n\r\n        private readonly double _timeout;\r\n\r\n        public TcpTransportWinRT(string host, int port, string staticHost, int staticPort, MTProtoTransportType mtProtoType, TLProxyConfigBase proxyConfig)\r\n            : base(host, port, staticHost, staticPort, mtProtoType, proxyConfig)\r\n        {\r\n            _timeout = 25.0;\r\n            _socket = new StreamSocket();\r\n            var control = _socket.Control;\r\n            control.QualityOfService = SocketQualityOfService.LowLatency;\r\n\r\n            _dataReader = new DataReader(_socket.InputStream) { InputStreamOptions = InputStreamOptions.Partial };\r\n            _dataWriter = new DataWriter(_socket.OutputStream);\r\n        }\r\n\r\n#if TCP_OBFUSCATED_2\r\n        private byte[] GetInitBufferInternal()\r\n        {\r\n            var buffer = new byte[64];\r\n            var random = new Random();\r\n            while (true)\r\n            {\r\n                random.NextBytes(buffer);\r\n\r\n                var val = (buffer[3] << 24) | (buffer[2] << 16) | (buffer[1] << 8) | (buffer[0]);\r\n                var val2 = (buffer[7] << 24) | (buffer[6] << 16) | (buffer[5] << 8) | (buffer[4]);\r\n                if (buffer[0] != 0xef\r\n                    && val != 0x44414548\r\n                    && val != 0x54534f50\r\n                    && val != 0x20544547\r\n                    && val != 0x4954504f\r\n                    && val != 0xeeeeeeee\r\n                    && val2 != 0x00000000)\r\n                {\r\n                    buffer[56] = buffer[57] = buffer[58] = buffer[59] = 0xef;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            var keyIvEncrypt = buffer.SubArray(8, 48);\r\n            EncryptKey = keyIvEncrypt.SubArray(0, 32);\r\n            EncryptIV = keyIvEncrypt.SubArray(32, 16);\r\n            //Array.Reverse(EncryptIV);\r\n\r\n            Array.Reverse(keyIvEncrypt);\r\n            DecryptKey = keyIvEncrypt.SubArray(0, 32);\r\n            DecryptIV = keyIvEncrypt.SubArray(32, 16);\r\n            //Array.Reverse(DecryptIV);\r\n\r\n            //var shortStamp = BitConverter.GetBytes(0xefefefef);\r\n            //for (var i = 0; i < shortStamp.Length; i++)\r\n            //{\r\n            //    buffer[56 + i] = shortStamp[i];\r\n            //}\r\n\r\n            var encryptedBuffer = Encrypt(buffer);\r\n            for (var i = 56; i < encryptedBuffer.Length; i++)\r\n            {\r\n                buffer[i] = encryptedBuffer[i];\r\n            }\r\n\r\n            return buffer;\r\n        }\r\n\r\n        protected override byte[] GetInitBuffer()\r\n        {\r\n            return GetInitBufferInternal();\r\n        }\r\n#endif\r\n\r\n        private async Task<bool> ConnectAsync(double timeout, Action<TcpTransportResult> faultCallback)\r\n        {\r\n            TLSocks5Proxy socks5Proxy = ProxyConfig != null && ProxyConfig.IsEnabled.Value && !ProxyConfig.IsEmpty\r\n                ? ProxyConfig.GetProxy() as TLSocks5Proxy\r\n                : null;\r\n\r\n            if (socks5Proxy != null)\r\n            {\r\n                try\r\n                {\r\n                    ActualHost = StaticHost;\r\n                    ActualPort = StaticPort;\r\n\r\n                    RaiseConnectingAsync();\r\n\r\n                    await SocksProxy.ConnectToSocks5Proxy(timeout, _socket, _dataWriter, _dataReader, socks5Proxy.Server.ToString(), (ushort)socks5Proxy.Port.Value, StaticHost, (ushort)StaticPort, socks5Proxy.Username.ToString(), socks5Proxy.Password.ToString());\r\n\r\n                    lock (_dataWriterSyncRoot)\r\n                    {\r\n                        var buffer = GetInitBufferInternal();\r\n                        _dataWriter.WriteBytes(buffer);\r\n\r\n                        var result = _dataWriter.StoreAsync().AsTask().Result;\r\n                    }\r\n\r\n                    lock (_isConnectedSyncRoot)\r\n                    {\r\n                        _isConnecting = false;\r\n                        _isConnected = true;\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    var status = SocketError.GetStatus(ex.HResult);\r\n                    WRITE_LOG(\"TCPTransportWinRT.ConnectAsync \" + status, ex);\r\n\r\n                    var error = SocketError.GetStatus(ex.HResult);\r\n                    faultCallback.SafeInvoke(new TcpTransportResult(ex));\r\n                    return false;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                try\r\n                {\r\n                    ActualHost = Host;\r\n                    ActualPort = Port;\r\n\r\n                    RaiseConnectingAsync();\r\n\r\n                    //var address = IPAddress.IsValidIPv6(Host);\r\n                    await _socket.ConnectAsync(new HostName(Host), Port.ToString(CultureInfo.InvariantCulture)).WithTimeout(timeout);\r\n\r\n                    lock (_dataWriterSyncRoot)\r\n                    {\r\n                        var buffer = GetInitBufferInternal();\r\n                        _dataWriter.WriteBytes(buffer);\r\n                    }\r\n\r\n                    lock (_isConnectedSyncRoot)\r\n                    {\r\n                        _isConnecting = false;\r\n                        _isConnected = true;\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    var status = SocketError.GetStatus(ex.HResult);\r\n                    WRITE_LOG(\"TCPTransportWinRT.ConnectAsync \" + status, ex);\r\n\r\n                    var error = SocketError.GetStatus(ex.HResult);\r\n                    faultCallback.SafeInvoke(new TcpTransportResult(ex));\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private async Task<bool> SendAsync(double timeout, byte[] data, Action<TcpTransportResult> faultCallback)\r\n        {\r\n            try\r\n            {\r\n#if TCP_OBFUSCATED_2\r\n                lock (_dataWriterSyncRoot)\r\n                {\r\n                    data = Encrypt(data);\r\n                    _dataWriter.WriteBytes(data);\r\n                }\r\n\r\n                var storeResult = await _dataWriter.StoreAsync();\r\n#else\r\n                lock (_dataWriterSyncRoot)\r\n                {\r\n                    _dataWriter.WriteBytes(data);\r\n                }\r\n                var storeResult = await _dataWriter.StoreAsync();//.WithTimeout(timeout);\r\n#endif\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                var status = SocketError.GetStatus(ex.HResult);\r\n                WRITE_LOG(\"TCPTransportWinRT.SendAsync \" + status, ex);\r\n\r\n                faultCallback.SafeInvoke(new TcpTransportResult(ex));\r\n                return false;\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private async void ReceiveAsync(double timeout)\r\n        {\r\n            while (true)\r\n            {\r\n                if (Closed)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                int bytesTransferred = 0;\r\n                try\r\n                {\r\n                    bytesTransferred = (int)await _dataReader.LoadAsync(64); //WithTimeout(timeout);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    //Log.Write(string.Format(\"  TCPTransport.ReceiveAsync transport={0} LoadAsync exception={1}\", Id, ex));\r\n                    var status = SocketError.GetStatus(ex.HResult);\r\n                    WRITE_LOG(\"ReceiveAsync DataReader.LoadAsync \" + status, ex);\r\n\r\n                    if (ex is ObjectDisposedException)\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                if (bytesTransferred > 0)\r\n                {\r\n                    //Log.Write(string.Format(\"  TCPTransport.ReceiveAsync transport={0} bytes_transferred={1}\", Id, bytesTransferred));\r\n\r\n                    var now = DateTime.Now;\r\n\r\n                    if (!FirstReceiveTime.HasValue)\r\n                    {\r\n                        FirstReceiveTime = now;\r\n                        RaiseConnectedAsync();\r\n                    }\r\n\r\n                    LastReceiveTime = now;\r\n\r\n                    var buffer = new byte[_dataReader.UnconsumedBufferLength];\r\n                    _dataReader.ReadBytes(buffer);\r\n\r\n#if TCP_OBFUSCATED_2\r\n                    buffer = Decrypt(buffer);\r\n#endif\r\n\r\n                    OnBufferReceived(buffer, 0, bytesTransferred);\r\n                }\r\n                else\r\n                {\r\n                    //Log.Write(string.Format(\"  TCPTransport.ReceiveAsync transport={0} bytes_transferred={1} closed={2}\", Id, bytesTransferred, Closed));\r\n                    if (!Closed)\r\n                    {\r\n                        Closed = true;\r\n                        RaiseConnectionLost();\r\n                        Execute.ShowDebugMessage(\"TCPTransportWinRT ReceiveAsync connection lost bytesTransferred=0; close transport\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isConnecting;\r\n\r\n        private readonly List<Tuple<string, byte[], Action<TcpTransportResult>>> _queue = new List<Tuple<string, byte[], Action<TcpTransportResult>>>();\r\n\r\n        public override void SendPacketAsync(string caption, byte[] data, Action<bool> callback, Action<TcpTransportResult> faultCallback = null)\r\n        {\r\n            var now = DateTime.Now;\r\n            if (!FirstSendTime.HasValue)\r\n            {\r\n                FirstSendTime = now;\r\n            }\r\n\r\n            Execute.BeginOnThreadPool(async () =>\r\n            {\r\n                bool connect = false;\r\n                bool isConnected;\r\n                lock (_isConnectedSyncRoot)\r\n                {\r\n                    isConnected = _isConnected;\r\n                    if (!_isConnected && !_isConnecting)\r\n                    {\r\n                        _isConnecting = true;\r\n                        connect = true;\r\n                    }\r\n\r\n                    if (connect\r\n                        && caption.StartsWith(\"msgs_ack\"))\r\n                    {\r\n                        Execute.ShowDebugMessage(\"TCPTransportWinRT connect on msgs_ack\");\r\n                        connect = false;\r\n                    }\r\n                }\r\n\r\n                if (!isConnected)\r\n                {\r\n                    if (connect)\r\n                    {\r\n                        var connectResult = await ConnectAsync(_timeout, faultCallback);\r\n                        if (!connectResult) return;\r\n\r\n                        //var buffer = GetInitBuffer();\r\n                        //var sendResult = await SendAsync(_timeout, buffer, faultCallback);\r\n                        //if (!sendResult) return;\r\n\r\n                        ReceiveAsync(_timeout);\r\n\r\n                        SendQueue(_timeout);\r\n                    }\r\n                    else\r\n                    {\r\n                        Enqueue(caption, data, faultCallback);\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var sendPacketResult = await SendAsync(_timeout, CreatePacket(data), faultCallback);\r\n                if (!sendPacketResult) return;\r\n\r\n                callback.SafeInvoke(true);\r\n            });\r\n        }\r\n\r\n        private void Enqueue(string caption, byte[] data, Action<TcpTransportResult> faultCallback)\r\n        {\r\n            lock (_isConnectedSyncRoot)\r\n            {\r\n                _queue.Add(new Tuple<string, byte[], Action<TcpTransportResult>>(caption, data, faultCallback));\r\n            }\r\n        }\r\n\r\n        private void SendQueue(double timeout)\r\n        {\r\n            var queue = new List<Tuple<string, byte[], Action<TcpTransportResult>>>();\r\n            var info = new StringBuilder();\r\n            info.Append(\"SendQueue\");\r\n            lock (_isConnectedSyncRoot)\r\n            {\r\n                foreach (var tuple in _queue)\r\n                {\r\n                    queue.Add(tuple);\r\n                    info.AppendLine(tuple.Item1);\r\n                }\r\n\r\n                _queue.Clear();\r\n            }\r\n\r\n            //Execute.ShowDebugMessage(info.ToString());\r\n\r\n            foreach (var tuple in queue)\r\n            {\r\n                SendAsync(timeout, CreatePacket(tuple.Item2), tuple.Item3);\r\n            }\r\n        }\r\n\r\n        public override void Close()\r\n        {\r\n            Closed = true;\r\n            if (_socket != null)\r\n            {\r\n                _socket.Dispose();\r\n            }\r\n\r\n            StopCheckConfigTimer();\r\n        }\r\n\r\n        public override string GetTransportInfo()\r\n        {\r\n            var info = new StringBuilder();\r\n            info.AppendLine(\"TCP_WinRT transport\");\r\n            info.AppendLine(string.Format(\"Socket {0}:{1}, Connected={2}, HashCode={3}\", Host, Port, _isConnected, _socket.GetHashCode()));\r\n            info.AppendLine(string.Format(\"LastReceiveTime={0}\", LastReceiveTime.GetValueOrDefault().ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture)));\r\n            info.AppendLine(string.Format(\"FirstSendTime={0}\", FirstSendTime.GetValueOrDefault().ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture)));\r\n\r\n            return info.ToString();\r\n        }\r\n    }\r\n\r\n    public static class AsyncExtensions\r\n    {\r\n        public static async Task WithTimeout(this IAsyncAction task, double timeout)\r\n        {\r\n            var cts = new CancellationTokenSource(TimeSpan.FromSeconds(timeout));\r\n            await task.AsTask(cts.Token);\r\n        }\r\n\r\n        public static async Task<T> WithTimeout<T>(this IAsyncOperation<T> task, double timeout)\r\n        {\r\n            var cts = new CancellationTokenSource(TimeSpan.FromSeconds(timeout));\r\n            return await task.AsTask(cts.Token);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Api.WP8/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Portable.BouncyCastle\" version=\"1.7.0.2\" targetFramework=\"wp80\" />\r\n  <package id=\"Rx-Core\" version=\"2.2.2\" targetFramework=\"wp71\" requireReinstallation=\"True\" />\r\n  <package id=\"Rx-Interfaces\" version=\"2.2.2\" targetFramework=\"wp71\" requireReinstallation=\"True\" />\r\n  <package id=\"Rx-Linq\" version=\"2.2.2\" targetFramework=\"wp71\" requireReinstallation=\"True\" />\r\n</packages>"
  },
  {
    "path": "Telegram.Client.TileUpdated/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Telegram.Client.TileUpdated\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Telegram.Client.TileUpdated\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"8c9a6178-3edd-4995-92e5-194220a0ece6\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "Telegram.Client.TileUpdated/ScheduledAgent.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\n//using Caliburn.Micro;\r\nusing Mangopollo.Tiles;\r\nusing Microsoft.Phone.Scheduler;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace Telegram.Client.TileUpdated\r\n{\r\n    public class ScheduledAgent : ScheduledTaskAgent\r\n    {\r\n        private static volatile bool _classInitialized;\r\n\r\n        /// <remarks>\r\n        /// ScheduledAgent constructor, initializes the UnhandledException handler\r\n        /// </remarks>\r\n        public ScheduledAgent()\r\n        {\r\n            if (!_classInitialized)\r\n            {\r\n                _classInitialized = true;\r\n                // Subscribe to the managed exception handler\r\n                Deployment.Current.Dispatcher.BeginInvoke(delegate\r\n                {\r\n                    Application.Current.UnhandledException += ScheduledAgent_UnhandledException;\r\n                });\r\n            }\r\n        }\r\n\r\n        /// Code to execute on Unhandled Exceptions\r\n        private void ScheduledAgent_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)\r\n        {\r\n            if (System.Diagnostics.Debugger.IsAttached)\r\n            {\r\n                // An unhandled exception has occurred; break into the debugger\r\n                System.Diagnostics.Debugger.Break();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Agent that runs a scheduled task\r\n        /// </summary>\r\n        /// <param name=\"task\">\r\n        /// The invoked task\r\n        /// </param>\r\n        /// <remarks>\r\n        /// This method is called when a periodic or resource intensive task is invoked\r\n        /// </remarks>\r\n        protected override void OnInvoke(ScheduledTask task)\r\n        {\r\n            /*var manualResetEvent = new ManualResetEvent(false);\r\n            var eventAggregator = new EventAggregator();\r\n            var cacheService = new InMemoryCacheService(eventAggregator);\r\n            var updatesService = new UpdatesService(cacheService, eventAggregator);\r\n            //TODO: Add code to perform your task in background\r\n            var mtProtoService = new MTProtoService(updatesService, cacheService, new TransportService());\r\n            mtProtoService.GetStateAsync(\r\n                state =>\r\n                {\r\n\r\n                    var unreadCount = state.UnreadCount.Value;\r\n\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        //var shellTileData = Mangopollo.Utils.CanUseLiveTiles\r\n                        //    ? (ShellTileData)new IconicTileData { Count = unreadCount }\r\n                        //    : new StandardTileData {Count = unreadCount};\r\n\r\n                        var shellTileData = new StandardTileData { Count = unreadCount };\r\n\r\n                        var tile = ShellTile.ActiveTiles.FirstOrDefault();\r\n                        if (tile != null)\r\n                        {\r\n                            tile.Update(shellTileData);\r\n                        }\r\n\r\n                        //if (previousUnreadCount < unreadCount)\r\n                        //{\r\n                        //    //_previousUnreadCount = unreadCount;\r\n                        //    var toast = new ShellToast\r\n                        //    {\r\n                        //        Content = string.Format(\"Previous - {0}, current - {1}\", previousUnreadCount, unreadCount),\r\n                        //        Title = \"Telegram\",\r\n                        //        NavigationUri = new System.Uri(\"/Views/ShellView.xaml\", System.UriKind.Relative)\r\n                        //    };\r\n\r\n                        //    settings[\"UnreadCountKey\"] = unreadCount;\r\n                        //    toast.Show();\r\n                        //}\r\n                        \r\n\r\n                        manualResetEvent.Set();\r\n                    });\r\n\r\n                },\r\n                error =>\r\n                {\r\n                    manualResetEvent.Set();\r\n                });\r\n\r\n            manualResetEvent.WaitOne(20000);*/\r\n            NotifyComplete();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Client.TileUpdated/Telegram.Client.TileUpdated.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{8C9A6178-3EDD-4995-92E5-194220A0ECE6}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Telegram.Client.TileUpdated</RootNamespace>\r\n    <AssemblyName>Telegram.Client.TileUpdated</AssemblyName>\r\n    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>\r\n    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <BackgroundAgentType>ScheduledTaskAgent</BackgroundAgentType>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug Private Beta|AnyCPU'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\Debug Private Beta\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release Private Beta|AnyCPU'\">\r\n    <OutputPath>bin\\Release Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Caliburn.Micro\">\r\n      <HintPath>..\\..\\..\\Vkontakte\\Libraries\\Caliburn.Micro.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Mangopollo.Light\">\r\n      <HintPath>..\\packages\\Mangopollo.Light.1.3\\lib\\sl4-windowsphone71\\Mangopollo.Light.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Phone\" />\r\n    <Reference Include=\"System.Windows\" />\r\n    <Reference Include=\"system\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Net\" />\r\n    <Reference Include=\"mscorlib.extensions\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"ScheduledAgent.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\Telegram.Api\\Telegram.Api.csproj\">\r\n      <Project>{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}</Project>\r\n      <Name>Telegram.Api</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "Telegram.Client.TileUpdated/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Mangopollo.Light\" version=\"1.3\" targetFramework=\"wp71\" />\r\n</packages>"
  },
  {
    "path": "Telegram.Controls/AnimationMediator.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    /// <summary>\r\n    /// Class that acts as a Mediator between a Storyboard animation and a\r\n    /// Transform used by the Silverlight Toolkit's LayoutTransformer.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// Works around an issue with the Silverlight platform where changes to\r\n    /// properties of child Transforms assigned to a Transform property do not\r\n    /// trigger the top-level property changed handler (as on WPF).\r\n    /// </remarks>\r\n    public class AnimationMediator : FrameworkElement\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets a reference to the LayoutTransformer to update.\r\n        /// </summary>\r\n        //public LayoutTransformer LayoutTransformer { get; set; }\r\n\r\n        public static readonly DependencyProperty LayoutTransformerProperty =\r\n            DependencyProperty.Register(\"LayoutTransformer\", typeof (LayoutTransformer), typeof (AnimationMediator), new PropertyMetadata(default(LayoutTransformer)));\r\n\r\n        public LayoutTransformer LayoutTransformer\r\n        {\r\n            get { return (LayoutTransformer) GetValue(LayoutTransformerProperty); }\r\n            set { SetValue(LayoutTransformerProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the name of the LayoutTransformer to update.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This property is used iff the LayoutTransformer property is null.\r\n        /// </remarks>\r\n        public string LayoutTransformerName\r\n        {\r\n            get\r\n            {\r\n                return _layoutTransformerName;\r\n            }\r\n            set\r\n            {\r\n                _layoutTransformerName = value;\r\n                // Force a new name lookup\r\n                LayoutTransformer = null;\r\n            }\r\n        }\r\n        private string _layoutTransformerName;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the value being animated.\r\n        /// </summary>\r\n        public double AnimationValue\r\n        {\r\n            get { return (double)GetValue(AnimationValueProperty); }\r\n            set { SetValue(AnimationValueProperty, value); }\r\n        }\r\n        public static readonly DependencyProperty AnimationValueProperty =\r\n            DependencyProperty.Register(\r\n                \"AnimationValue\",\r\n                typeof(double),\r\n                typeof(AnimationMediator),\r\n                new PropertyMetadata(AnimationValuePropertyChanged));\r\n        private static void AnimationValuePropertyChanged(\r\n            DependencyObject o,\r\n            DependencyPropertyChangedEventArgs e)\r\n        {\r\n            //Debug.WriteLine(e.NewValue);\r\n            ((AnimationMediator)o).AnimationValuePropertyChanged();\r\n        }\r\n        private void AnimationValuePropertyChanged()\r\n        {\r\n            if (null == LayoutTransformer)\r\n            {\r\n                // No LayoutTransformer set; try to find it by LayoutTransformerName\r\n                LayoutTransformer = FindName(LayoutTransformerName) as LayoutTransformer;\r\n                if (null == LayoutTransformer)\r\n                {\r\n                    throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture,\r\n                        \"AnimationMediator was unable to find a LayoutTransformer named \\\"{0}\\\".\",\r\n                        LayoutTransformerName));\r\n                }\r\n            }\r\n            // The Transform hasn't been updated yet; schedule an update to run after it has\r\n            Dispatcher.BeginInvoke(() => LayoutTransformer.ApplyLayoutTransform());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/BindingListener.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace DanielVaughan.WindowsPhone7Unleashed\r\n{\r\n\tpublic class BindingListener\r\n\t{\r\n\t\tpublic delegate void ChangedHandler(object sender, BindingChangedEventArgs e);\r\n\r\n\t\tstatic readonly List<DependencyPropertyListener> freeListeners = new List<DependencyPropertyListener>();\r\n\r\n\t\treadonly ChangedHandler changedHandler;\r\n\t\tBinding binding;\r\n\t\tDependencyPropertyListener listener;\r\n\t\tFrameworkElement target;\r\n\t\tobject value;\r\n\r\n\t\tpublic BindingListener(ChangedHandler changedHandler)\r\n\t\t{\r\n\t\t\tthis.changedHandler = changedHandler;\r\n\t\t}\r\n\r\n\t\tpublic Binding Binding\r\n\t\t{\r\n\t\t\tget\r\n\t\t\t{\r\n\t\t\t\treturn binding;\r\n\t\t\t}\r\n\t\t\tset\r\n\t\t\t{\r\n\t\t\t\tbinding = value;\r\n\t\t\t\tAttach();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpublic FrameworkElement Element\r\n\t\t{\r\n\t\t\tget\r\n\t\t\t{\r\n\t\t\t\treturn target;\r\n\t\t\t}\r\n\t\t\tset\r\n\t\t\t{\r\n\t\t\t\ttarget = value;\r\n\t\t\t\tAttach();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpublic object Value\r\n\t\t{\r\n\t\t\tget\r\n\t\t\t{\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvoid Attach()\r\n\t\t{\r\n\t\t\tDetach();\r\n\r\n\t\t\tif (target != null && binding != null)\r\n\t\t\t{\r\n\t\t\t\tlistener = GetListener();\r\n\t\t\t\tlistener.Attach(target, binding);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvoid Detach()\r\n\t\t{\r\n\t\t\tif (listener != null)\r\n\t\t\t{\r\n                this.listener.Detach(); // This is not called in the original samples            \r\n\t\t\t\tReturnListener();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tDependencyPropertyListener GetListener()\r\n\t\t{\r\n\t\t\tDependencyPropertyListener listener;\r\n\r\n\t\t\tif (freeListeners.Count != 0)\r\n\t\t\t{\r\n\t\t\t\tlistener = freeListeners[freeListeners.Count - 1];\r\n\t\t\t\tfreeListeners.RemoveAt(freeListeners.Count - 1);\r\n\r\n\t\t\t\t//return listener; //Memory leak here\r\n\t\t\t}\r\n\t\t\tlistener = new DependencyPropertyListener();\r\n\r\n\t\t\tlistener.Changed += HandleValueChanged;\r\n\r\n\t\t\treturn listener;\r\n\t\t}\r\n\r\n\t\tvoid ReturnListener()\r\n\t\t{\r\n\t\t\tlistener.Changed -= HandleValueChanged;\r\n\r\n\t\t\tfreeListeners.Add(listener);\r\n\r\n\t\t\tlistener = null;\r\n\t\t}\r\n\r\n\t\tvoid HandleValueChanged(object sender, BindingChangedEventArgs e)\r\n\t\t{\r\n\t\t\tvalue = e.EventArgs.NewValue;\r\n\r\n\t\t\tchangedHandler(this, e);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic class DependencyPropertyListener\r\n\t{\r\n\t\tstatic int index;\r\n\t\treadonly DependencyProperty property;\r\n\t\tFrameworkElement target;\r\n\r\n\t\tpublic DependencyPropertyListener()\r\n\t\t{\r\n\t\t\tproperty = DependencyProperty.RegisterAttached(\r\n\t\t\t\t\"DependencyPropertyListener\" + index++,\r\n\t\t\t\ttypeof(object),\r\n\t\t\t\ttypeof(DependencyPropertyListener),\r\n\t\t\t\tnew PropertyMetadata(null, HandleValueChanged));\r\n\t\t}\r\n\r\n\t\tpublic event EventHandler<BindingChangedEventArgs> Changed;\r\n\r\n\t\tvoid HandleValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)\r\n\t\t{\r\n\t\t\tOnChanged(new BindingChangedEventArgs(e));\r\n\t\t}\r\n\r\n\t\tprotected void OnChanged(BindingChangedEventArgs e)\r\n\t\t{\r\n\t\t\tvar temp = Changed;\r\n\t\t\tif (temp != null)\r\n\t\t\t{\r\n\t\t\t\ttemp(target, e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpublic void Attach(FrameworkElement element, Binding binding)\r\n\t\t{\r\n\t\t\tif (target != null)\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\r\n\t\t\t\t\t\"Cannot attach an already attached listener\");\r\n\t\t\t}\r\n\r\n\t\t\ttarget = element;\r\n\t\t\ttarget.SetBinding(property, binding);\r\n\t\t}\r\n\r\n\t\tpublic void Detach()\r\n\t\t{\r\n\t\t    if (target == null) return;\r\n\r\n\t\t\ttarget.ClearValue(property);\r\n\t\t\ttarget = null;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic class BindingChangedEventArgs : EventArgs\r\n\t{\r\n\t\tpublic BindingChangedEventArgs(DependencyPropertyChangedEventArgs e)\r\n\t\t{\r\n\t\t\tEventArgs = e;\r\n\t\t}\r\n\r\n\t\tpublic DependencyPropertyChangedEventArgs EventArgs { get; private set; }\r\n\t}\r\n}"
  },
  {
    "path": "Telegram.Controls/Extensions/ScrollViewerExtensions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace Telegram.Controls.Extensions\r\n    {\r\n        /// <summary>\r\n        /// Provides useful extensions to ScrollViewer instances.\r\n        /// \r\n        /// </summary>\r\n        /// <QualityBand>Experimental</QualityBand>\r\n        public static class ScrollViewerExtensions\r\n        {\r\n            /// <summary>\r\n            /// The amount to scroll a ScrollViewer for a line change.\r\n            /// \r\n            /// </summary>\r\n            private const double LineChange = 16.0;\r\n            /// <summary>\r\n            /// Identifies the IsMouseWheelScrollingEnabled dependency property.\r\n            /// \r\n            /// </summary>\r\n            public static readonly DependencyProperty IsMouseWheelScrollingEnabledProperty;\r\n            /// <summary>\r\n            /// Identifies the VerticalOffset dependency property.\r\n            /// \r\n            /// </summary>\r\n            private static readonly DependencyProperty VerticalOffsetProperty;\r\n            /// <summary>\r\n            /// Identifies the HorizontalOffset dependency property.\r\n            /// \r\n            /// </summary>\r\n            private static readonly DependencyProperty HorizontalOffsetProperty;\r\n\r\n            static ScrollViewerExtensions()\r\n            {\r\n                // ISSUE: method pointer\r\n                ScrollViewerExtensions.IsMouseWheelScrollingEnabledProperty = DependencyProperty.RegisterAttached(\"IsMouseWheelScrollingEnabled\", typeof(bool), typeof(ScrollViewerExtensions), new PropertyMetadata((object)false, new PropertyChangedCallback(OnIsMouseWheelScrollingEnabledPropertyChanged)));\r\n                // ISSUE: method pointer\r\n                ScrollViewerExtensions.VerticalOffsetProperty = DependencyProperty.RegisterAttached(\"VerticalOffset\", typeof(double), typeof(ScrollViewerExtensions), new PropertyMetadata(new PropertyChangedCallback(OnVerticalOffsetPropertyChanged)));\r\n                // ISSUE: method pointer\r\n                ScrollViewerExtensions.HorizontalOffsetProperty = DependencyProperty.RegisterAttached(\"HorizontalOffset\", typeof(double), typeof(ScrollViewerExtensions), new PropertyMetadata(new PropertyChangedCallback(OnHorizontalOffsetPropertyChanged)));\r\n            }\r\n\r\n            /// <summary>\r\n            /// Gets a value indicating whether the ScrollViewer has enabled\r\n            ///             scrolling via the mouse wheel.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param>\r\n            /// <returns>\r\n            /// A value indicating whether the ScrollViewer has enabled scrolling\r\n            ///             via the mouse wheel.\r\n            /// \r\n            /// </returns>\r\n            public static bool GetIsMouseWheelScrollingEnabled(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                else\r\n                    return (bool)viewer.GetValue(ScrollViewerExtensions.IsMouseWheelScrollingEnabledProperty);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Sets a value indicating whether the ScrollViewer will enable\r\n            ///             scrolling via the mouse wheel.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><param name=\"value\">A value indicating whether the ScrollViewer will enable scrolling\r\n            ///             via the mouse wheel.\r\n            ///             </param>\r\n            public static void SetIsMouseWheelScrollingEnabled(this ScrollViewer viewer, bool value)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                viewer.SetValue(ScrollViewerExtensions.IsMouseWheelScrollingEnabledProperty, (value ? 1 : 0));\r\n            }\r\n\r\n            /// <summary>\r\n            /// IsMouseWheelScrollingEnabledProperty property changed handler.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"d\">ScrollViewerExtensions that changed its IsMouseWheelScrollingEnabled.</param><param name=\"e\">Event arguments.</param>\r\n            private static void OnIsMouseWheelScrollingEnabledPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n            {\r\n                ScrollViewer scrollViewer = d as ScrollViewer;\r\n                if ((bool)e.NewValue)\r\n                {\r\n                    // ISSUE: method pointer\r\n                    scrollViewer.MouseWheel += new MouseWheelEventHandler(OnMouseWheel);\r\n                }\r\n                else\r\n                {\r\n                    // ISSUE: method pointer\r\n                    scrollViewer.MouseWheel -= new MouseWheelEventHandler(OnMouseWheel);\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Handles the mouse wheel event.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"sender\">The ScrollViewer.</param><param name=\"e\">Event arguments.</param>\r\n            private static void OnMouseWheel(object sender, MouseWheelEventArgs e)\r\n            {\r\n                ScrollViewer viewer = sender as ScrollViewer;\r\n                Debug.Assert(viewer != null, \"sender should be a non-null ScrollViewer!\");\r\n                Debug.Assert(e != null, \"e should not be null!\");\r\n                if (e.Handled)\r\n                    return;\r\n                double offset = ScrollViewerExtensions.CoerceVerticalOffset(viewer, viewer.VerticalOffset - (double)e.Delta);\r\n                viewer.ScrollToVerticalOffset(offset);\r\n                e.Handled = true;\r\n            }\r\n\r\n            /// <summary>\r\n            /// Gets the value of the VerticalOffset attached property for a specified ScrollViewer.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"element\">The ScrollViewer from which the property value is read.</param>\r\n            /// <returns>\r\n            /// The VerticalOffset property value for the ScrollViewer.\r\n            /// </returns>\r\n            private static double GetVerticalOffset(ScrollViewer element)\r\n            {\r\n                if (element == null)\r\n                    throw new ArgumentNullException(\"element\");\r\n                else\r\n                    return (double)element.GetValue(ScrollViewerExtensions.VerticalOffsetProperty);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Sets the value of the VerticalOffset attached property to a specified ScrollViewer.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"element\">The ScrollViewer to which the attached property is written.</param><param name=\"value\">The needed VerticalOffset value.</param>\r\n            private static void SetVerticalOffset(ScrollViewer element, double value)\r\n            {\r\n                if (element == null)\r\n                    throw new ArgumentNullException(\"element\");\r\n                element.SetValue(ScrollViewerExtensions.VerticalOffsetProperty, (object)value);\r\n            }\r\n\r\n            /// <summary>\r\n            /// VerticalOffsetProperty property changed handler.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"dependencyObject\">ScrollViewer that changed its VerticalOffset.</param><param name=\"eventArgs\">Event arguments.</param>\r\n            private static void OnVerticalOffsetPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)\r\n            {\r\n                ScrollViewer scrollViewer = dependencyObject as ScrollViewer;\r\n                if (scrollViewer == null)\r\n                    throw new ArgumentNullException(\"dependencyObject\");\r\n                scrollViewer.ScrollToVerticalOffset((double)eventArgs.NewValue);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Gets the value of the HorizontalOffset attached property for a specified ScrollViewer.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"element\">The ScrollViewer from which the property value is read.</param>\r\n            /// <returns>\r\n            /// The HorizontalOffset property value for the ScrollViewer.\r\n            /// </returns>\r\n            private static double GetHorizontalOffset(ScrollViewer element)\r\n            {\r\n                if (element == null)\r\n                    throw new ArgumentNullException(\"element\");\r\n                else\r\n                    return (double)element.GetValue(ScrollViewerExtensions.HorizontalOffsetProperty);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Sets the value of the HorizontalOffset attached property to a specified ScrollViewer.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"element\">The ScrollViewer to which the attached property is written.</param><param name=\"value\">The needed HorizontalOffset value.</param>\r\n            private static void SetHorizontalOffset(ScrollViewer element, double value)\r\n            {\r\n                if (element == null)\r\n                    throw new ArgumentNullException(\"element\");\r\n                element.SetValue(ScrollViewerExtensions.HorizontalOffsetProperty, (object)value);\r\n            }\r\n\r\n            /// <summary>\r\n            /// HorizontalOffsetProperty property changed handler.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"dependencyObject\">ScrollViewer that changed its HorizontalOffset.</param><param name=\"eventArgs\">Event arguments.</param>\r\n            private static void OnHorizontalOffsetPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)\r\n            {\r\n                ScrollViewer scrollViewer = dependencyObject as ScrollViewer;\r\n                if (scrollViewer == null)\r\n                    throw new ArgumentNullException(\"dependencyObject\");\r\n                scrollViewer.ScrollToHorizontalOffset((double)eventArgs.NewValue);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Coerce a vertical offset to fall within the vertical bounds of a\r\n            ///             ScrollViewer.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><param name=\"offset\">The vertical offset to coerce.</param>\r\n            /// <returns>\r\n            /// The coerced vertical offset that falls within the ScrollViewer's\r\n            ///             vertical bounds.\r\n            /// \r\n            /// </returns>\r\n            private static double CoerceVerticalOffset(ScrollViewer viewer, double offset)\r\n            {\r\n                Debug.Assert(viewer != null, \"viewer should not be null!\");\r\n                return Math.Max(Math.Min(offset, viewer.ExtentHeight), 0.0);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Coerce a horizontal offset to fall within the horizontal bounds of a\r\n            ///             ScrollViewer.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><param name=\"offset\">The horizontal offset to coerce.</param>\r\n            /// <returns>\r\n            /// The coerced horizontal offset that falls within the ScrollViewer's\r\n            ///             horizontal bounds.\r\n            /// \r\n            /// </returns>\r\n            private static double CoerceHorizontalOffset(ScrollViewer viewer, double offset)\r\n            {\r\n                Debug.Assert(viewer != null, \"viewer should not be null!\");\r\n                return Math.Max(Math.Min(offset, viewer.ExtentWidth), 0.0);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll a ScrollViewer vertically by a given offset.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><param name=\"offset\">The vertical offset to scroll.</param>\r\n            private static void ScrollByVerticalOffset(ScrollViewer viewer, double offset)\r\n            {\r\n                Debug.Assert(viewer != null, \"viewer should not be null!\");\r\n                offset += viewer.VerticalOffset;\r\n                offset = ScrollViewerExtensions.CoerceVerticalOffset(viewer, offset);\r\n                viewer.ScrollToVerticalOffset(offset);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll a ScrollViewer horizontally by a given offset.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><param name=\"offset\">The horizontal offset to scroll.</param>\r\n            private static void ScrollByHorizontalOffset(ScrollViewer viewer, double offset)\r\n            {\r\n                Debug.Assert(viewer != null, \"viewer should not be null!\");\r\n                offset += viewer.HorizontalOffset;\r\n                offset = ScrollViewerExtensions.CoerceHorizontalOffset(viewer, offset);\r\n                viewer.ScrollToHorizontalOffset(offset);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer up by a line.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void LineUp(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                ScrollViewerExtensions.ScrollByVerticalOffset(viewer, -16.0);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer down by a line.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void LineDown(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                ScrollViewerExtensions.ScrollByVerticalOffset(viewer, 16.0);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer left by a line.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void LineLeft(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                ScrollViewerExtensions.ScrollByHorizontalOffset(viewer, -16.0);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer right by a line.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void LineRight(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                ScrollViewerExtensions.ScrollByHorizontalOffset(viewer, 16.0);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer up by a page.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void PageUp(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                ScrollViewerExtensions.ScrollByVerticalOffset(viewer, -viewer.ViewportHeight);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer down by a page.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void PageDown(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                ScrollViewerExtensions.ScrollByVerticalOffset(viewer, viewer.ViewportHeight);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer left by a page.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void PageLeft(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                ScrollViewerExtensions.ScrollByHorizontalOffset(viewer, -viewer.ViewportWidth);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer right by a page.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void PageRight(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                ScrollViewerExtensions.ScrollByHorizontalOffset(viewer, viewer.ViewportWidth);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer to the top.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void ScrollToTop(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                viewer.ScrollToVerticalOffset(0.0);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer to the bottom.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void ScrollToBottom(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                viewer.ScrollToVerticalOffset(viewer.ExtentHeight);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer to the left.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void ScrollToLeft(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                viewer.ScrollToHorizontalOffset(0.0);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the ScrollViewer to the right.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception>\r\n            public static void ScrollToRight(this ScrollViewer viewer)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                viewer.ScrollToHorizontalOffset(viewer.ExtentWidth);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the desired element into the ScrollViewer's viewport.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><param name=\"element\">The element to scroll into view.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"element\"/> is null.\r\n            ///             </exception>\r\n            public static void ScrollIntoView(this ScrollViewer viewer, FrameworkElement element)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                if (element == null)\r\n                    throw new ArgumentNullException(\"element\");\r\n                ScrollViewerExtensions.ScrollIntoView(viewer, element, 0.0, 112.0, TimeSpan.FromSeconds(0.25));\r\n            }\r\n\r\n            public static void ScrollToBeginnig(this ScrollViewer viewer, Duration duration)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n\r\n                Storyboard storyboard = new Storyboard();\r\n                ScrollViewerExtensions.SetVerticalOffset(viewer, viewer.VerticalOffset);\r\n                ScrollViewerExtensions.SetHorizontalOffset(viewer, viewer.HorizontalOffset);\r\n                DoubleAnimation doubleAnimation1 = new DoubleAnimation();\r\n                doubleAnimation1.To = new double?(0.0);\r\n                doubleAnimation1.Duration = duration;\r\n                DoubleAnimation doubleAnimation2 = doubleAnimation1;\r\n                DoubleAnimation doubleAnimation3 = new DoubleAnimation();\r\n                doubleAnimation3.To = new double?(0.0);\r\n                doubleAnimation3.Duration = duration;\r\n                DoubleAnimation doubleAnimation4 = doubleAnimation3;\r\n                Storyboard.SetTarget((Timeline)doubleAnimation2, (DependencyObject)viewer);\r\n                Storyboard.SetTarget((Timeline)doubleAnimation4, (DependencyObject)viewer);\r\n                Storyboard.SetTargetProperty((Timeline)doubleAnimation4, new PropertyPath((object)ScrollViewerExtensions.HorizontalOffsetProperty));\r\n                Storyboard.SetTargetProperty((Timeline)doubleAnimation2, new PropertyPath((object)ScrollViewerExtensions.VerticalOffsetProperty));\r\n                storyboard.Children.Add((Timeline)doubleAnimation2);\r\n                storyboard.Children.Add((Timeline)doubleAnimation4);\r\n                storyboard.Begin();\r\n            }\r\n\r\n            /// <summary>\r\n            /// Scroll the desired element into the ScrollViewer's viewport.\r\n            /// \r\n            /// </summary>\r\n            /// <param name=\"viewer\">The ScrollViewer.</param><param name=\"element\">The element to scroll into view.</param><param name=\"horizontalMargin\">The margin to add on the left or right.\r\n            ///             </param><param name=\"verticalMargin\">The margin to add on the top or bottom.\r\n            ///             </param><param name=\"duration\">The duration of the animation.</param><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"viewer\"/> is null.\r\n            ///             </exception><exception cref=\"T:System.ArgumentNullException\"><paramref name=\"element\"/> is null.\r\n            ///             </exception>\r\n            public static void ScrollIntoView(this ScrollViewer viewer, FrameworkElement element, double horizontalMargin, double verticalMargin, Duration duration)\r\n            {\r\n                if (viewer == null)\r\n                    throw new ArgumentNullException(\"viewer\");\r\n                if (element == null)\r\n                    throw new ArgumentNullException(\"element\");\r\n                Rect? boundsRelativeTo = VisualTreeExtensions.GetBoundsRelativeTo(element, (UIElement)viewer);\r\n                if (!boundsRelativeTo.HasValue)\r\n                    return;\r\n                double verticalOffset = viewer.VerticalOffset;\r\n                double num1 = 0.0;\r\n                double viewportHeight = viewer.ViewportHeight;\r\n                double num2 = boundsRelativeTo.Value.Bottom + verticalMargin;\r\n                if (viewportHeight < num2)\r\n                {\r\n                    num1 = num2 - viewportHeight;\r\n                    verticalOffset += num1;\r\n                }\r\n                double num3 = boundsRelativeTo.Value.Top - verticalMargin;\r\n                if (num3 - num1 < 0.0)\r\n                    verticalOffset -= num1 - num3;\r\n                double horizontalOffset = viewer.HorizontalOffset;\r\n                double num4 = 0.0;\r\n                double viewportWidth = viewer.ViewportWidth;\r\n                double num5 = boundsRelativeTo.Value.Right + horizontalMargin;\r\n                if (viewportWidth < num5)\r\n                {\r\n                    num4 = num5 - viewportWidth;\r\n                    horizontalOffset += num4;\r\n                }\r\n                double num6 = boundsRelativeTo.Value.Left - horizontalMargin;\r\n                if (num6 - num4 < 0.0)\r\n                    horizontalOffset -= num4 - num6;\r\n                if (duration == (Duration)TimeSpan.Zero)\r\n                {\r\n                    viewer.ScrollToVerticalOffset(verticalOffset);\r\n                    viewer.ScrollToHorizontalOffset(horizontalOffset);\r\n                }\r\n                else\r\n                {\r\n                    Storyboard storyboard = new Storyboard();\r\n                    ScrollViewerExtensions.SetVerticalOffset(viewer, viewer.VerticalOffset);\r\n                    ScrollViewerExtensions.SetHorizontalOffset(viewer, viewer.HorizontalOffset);\r\n                    DoubleAnimation doubleAnimation1 = new DoubleAnimation();\r\n                    doubleAnimation1.To = new double?(verticalOffset);\r\n                    doubleAnimation1.Duration = duration;\r\n                    DoubleAnimation doubleAnimation2 = doubleAnimation1;\r\n                    DoubleAnimation doubleAnimation3 = new DoubleAnimation();\r\n                    doubleAnimation3.To = new double?(verticalOffset);\r\n                    doubleAnimation3.Duration = duration;\r\n                    DoubleAnimation doubleAnimation4 = doubleAnimation3;\r\n                    Storyboard.SetTarget((Timeline)doubleAnimation2, (DependencyObject)viewer);\r\n                    Storyboard.SetTarget((Timeline)doubleAnimation4, (DependencyObject)viewer);\r\n                    Storyboard.SetTargetProperty((Timeline)doubleAnimation4, new PropertyPath((object)ScrollViewerExtensions.HorizontalOffsetProperty));\r\n                    Storyboard.SetTargetProperty((Timeline)doubleAnimation2, new PropertyPath((object)ScrollViewerExtensions.VerticalOffsetProperty));\r\n                    storyboard.Children.Add((Timeline)doubleAnimation2);\r\n                    storyboard.Children.Add((Timeline)doubleAnimation4);\r\n                    storyboard.Begin();\r\n                }\r\n            }\r\n        }\r\n    }\r\n"
  },
  {
    "path": "Telegram.Controls/Extensions/VisualTreeExtensions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Media;\r\n\r\nnamespace Telegram.Controls.Extensions\r\n{\r\n    /// <summary>\r\n    /// Provides useful extensions for working with the visual tree.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// Since many of these extension methods are declared on types like\r\n    /// DependencyObject high up in the class hierarchy, we've placed them in\r\n    /// the Primitives namespace which is less likely to be imported for normal\r\n    /// scenarios.\r\n    /// </remarks>\r\n    /// <QualityBand>Experimental</QualityBand>\r\n    public static class VisualTreeExtensions\r\n    {\r\n        /// <summary>\r\n        /// Retrieves all the logical children of a specified type using a \r\n        /// breadth-first search.  A visual element is assumed to be a logical \r\n        /// child of another visual element if they are in the same namescope.\r\n        /// For performance reasons this method manually manages the queue \r\n        /// instead of using recursion.\r\n        /// </summary>\r\n        /// <param name=\"parent\">The parent framework element.</param>\r\n        /// <param name=\"applyTemplates\">Specifies whether to apply templates on the traversed framework elements</param>\r\n        /// <returns>The logical children of the framework element of the specified type.</returns>\r\n        internal static IEnumerable<T> GetLogicalChildrenByType<T>(this FrameworkElement parent, bool applyTemplates)\r\n                where T : FrameworkElement\r\n        {\r\n            Debug.Assert(parent != null, \"The parent cannot be null.\");\r\n\r\n            if (applyTemplates && parent is Control)\r\n            {\r\n                ((Control)parent).ApplyTemplate();\r\n            }\r\n\r\n            Queue<FrameworkElement> queue =\r\n               new Queue<FrameworkElement>(parent.GetVisualChildren().OfType<FrameworkElement>());\r\n\r\n            while (queue.Count > 0)\r\n            {\r\n                FrameworkElement element = queue.Dequeue();\r\n                if (applyTemplates && element is Control)\r\n                {\r\n                    ((Control)element).ApplyTemplate();\r\n                }\r\n\r\n                if (element is T)\r\n                {\r\n                    yield return (T)element;\r\n                }\r\n\r\n                foreach (FrameworkElement visualChild in element.GetVisualChildren().OfType<FrameworkElement>())\r\n                {\r\n                    queue.Enqueue(visualChild);\r\n                }\r\n            }\r\n        }\r\n\r\n        public static T FindParentOfType<T>(this DependencyObject root) where T : class\r\n        {\r\n            var parent = VisualTreeHelper.GetParent(root);\r\n            while (parent != null)\r\n            {\r\n                var typedParent = parent as T;\r\n                if (typedParent != null) return typedParent;\r\n                parent = VisualTreeHelper.GetParent(parent);\r\n            }\r\n            return null;\r\n        }\r\n\r\n        public static T FindChildOfType<T>(this DependencyObject root) where T : class\r\n        {\r\n            var queue = new Queue<DependencyObject>();\r\n            queue.Enqueue(root);\r\n\r\n            while (queue.Count > 0)\r\n            {\r\n                var current = queue.Dequeue();\r\n                for (var i = VisualTreeHelper.GetChildrenCount(current) - 1; 0 <= i; i--)\r\n                {\r\n                    var child = VisualTreeHelper.GetChild(current, i);\r\n                    var typedChild = child as T;\r\n                    if (typedChild != null)\r\n                    {\r\n                        return typedChild;\r\n                    }\r\n                    queue.Enqueue(child);\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n\r\n        public static T FindByName<T>(this DependencyObject parentElement, string name) where T : FrameworkElement\r\n        {\r\n            var count = VisualTreeHelper.GetChildrenCount(parentElement);\r\n            if (count == 0)\r\n                return null;\r\n\r\n            for (int i = 0; i < count; i++)\r\n            {\r\n                var child = VisualTreeHelper.GetChild(parentElement, i);\r\n\r\n                if (child != null && child is T && (string.IsNullOrEmpty(name) || ((T)child).Name == name))\r\n                {\r\n                    return (T)child;\r\n                }\r\n\r\n                var result = FindByName<T>(child, name);\r\n                if (result != null)\r\n                    return result;\r\n            }\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the visual tree ancestors of an element.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <returns>The visual tree ancestors of the element.</returns>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"element\"/> is null.\r\n        /// </exception>\r\n        public static IEnumerable<DependencyObject> GetVisualAncestors(this DependencyObject element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n\r\n            return GetVisualAncestorsAndSelfIterator(element).Skip(1);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the visual tree ancestors of an element and the element itself.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <returns>\r\n        /// The visual tree ancestors of an element and the element itself.\r\n        /// </returns>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"element\"/> is null.\r\n        /// </exception>\r\n        public static IEnumerable<DependencyObject> GetVisualAncestorsAndSelf(this DependencyObject element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n\r\n            return GetVisualAncestorsAndSelfIterator(element);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the visual tree ancestors of an element and the element itself.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <returns>\r\n        /// The visual tree ancestors of an element and the element itself.\r\n        /// </returns>\r\n        private static IEnumerable<DependencyObject> GetVisualAncestorsAndSelfIterator(DependencyObject element)\r\n        {\r\n            Debug.Assert(element != null, \"element should not be null!\");\r\n\r\n            for (DependencyObject obj = element;\r\n                    obj != null;\r\n                    obj = VisualTreeHelper.GetParent(obj))\r\n            {\r\n                yield return obj;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the visual children of type T.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\"></typeparam>\r\n        /// <param name=\"target\"></param>\r\n        /// <returns></returns>\r\n        public static IEnumerable<T> GetVisualChildren<T>(this DependencyObject target)\r\n            where T : DependencyObject\r\n        {\r\n            return GetVisualChildren(target).Where(child => child is T).Cast<T>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the visual children of type T.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\"></typeparam>\r\n        /// <param name=\"target\"></param>\r\n        /// <returns></returns>\r\n        public static IEnumerable<T> GetVisualChildren<T>(this DependencyObject target, bool strict)\r\n            where T : DependencyObject\r\n        {\r\n            return GetVisualChildren(target, strict).Where(child => child is T).Cast<T>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the visual children.\r\n        /// </summary>\r\n        /// <param name=\"target\"></param>\r\n        /// <param name=\"strict\">Prevents the search from navigating the logical tree; eg. ContentControl.Content</param>\r\n        /// <returns></returns>\r\n        public static IEnumerable<DependencyObject> GetVisualChildren(this DependencyObject target, bool strict)\r\n        {\r\n            int count = VisualTreeHelper.GetChildrenCount(target);\r\n            if (count == 0)\r\n            {\r\n                if (!strict && target is ContentControl)\r\n                {\r\n                    var child = ((ContentControl)target).Content as DependencyObject;\r\n                    if (child != null)\r\n                    {\r\n                        yield return child;\r\n                    }\r\n                    else\r\n                    {\r\n                        yield break;\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                for (int i = 0; i < count; i++)\r\n                {\r\n                    yield return VisualTreeHelper.GetChild(target, i);\r\n                }\r\n            }\r\n            yield break;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the visual tree children of an element.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <returns>The visual tree children of an element.</returns>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"element\"/> is null.\r\n        /// </exception>\r\n        public static IEnumerable<DependencyObject> GetVisualChildren(this DependencyObject element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n\r\n            return GetVisualChildrenAndSelfIterator(element).Skip(1);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the visual tree children of an element and the element itself.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <returns>\r\n        /// The visual tree children of an element and the element itself.\r\n        /// </returns>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"element\"/> is null.\r\n        /// </exception>\r\n        public static IEnumerable<DependencyObject> GetVisualChildrenAndSelf(this DependencyObject element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n\r\n            return GetVisualChildrenAndSelfIterator(element);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the visual tree children of an element and the element itself.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <returns>\r\n        /// The visual tree children of an element and the element itself.\r\n        /// </returns>\r\n        private static IEnumerable<DependencyObject> GetVisualChildrenAndSelfIterator(this DependencyObject element)\r\n        {\r\n            Debug.Assert(element != null, \"element should not be null!\");\r\n\r\n            yield return element;\r\n\r\n            int count = VisualTreeHelper.GetChildrenCount(element);\r\n            for (int i = 0; i < count; i++)\r\n            {\r\n                yield return VisualTreeHelper.GetChild(element, i);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// A helper method used to get visual decnedants using a breadth-first strategy.\r\n        /// </summary>\r\n        /// <param name=\"target\"></param>\r\n        /// <param name=\"strict\">Prevents the search from navigating the logical tree; eg. ContentControl.Content</param>\r\n        /// <param name=\"queue\"></param>\r\n        /// <returns></returns>\r\n        private static IEnumerable<DependencyObject> GetVisualDecendants(DependencyObject target, bool strict, Queue<DependencyObject> queue)\r\n        {\r\n            foreach (var child in GetVisualChildren(target, strict))\r\n            {\r\n                queue.Enqueue(child);\r\n            }\r\n\r\n            if (queue.Count == 0)\r\n            {\r\n                yield break;\r\n            }\r\n            else\r\n            {\r\n                DependencyObject node = queue.Dequeue();\r\n                yield return node;\r\n\r\n                foreach (var decendant in GetVisualDecendants(node, strict, queue))\r\n                {\r\n                    yield return decendant;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// A helper method used to get visual decnedants using a depth-first strategy.\r\n        /// </summary>\r\n        /// <param name=\"target\"></param>\r\n        /// <param name=\"strict\">Prevents the search from navigating the logical tree; eg. ContentControl.Content</param>\r\n        /// <param name=\"stack\"></param>\r\n        /// <returns></returns>\r\n        private static IEnumerable<DependencyObject> GetVisualDecendants(DependencyObject target, bool strict, Stack<DependencyObject> stack)\r\n        {\r\n            foreach (var child in GetVisualChildren(target, strict))\r\n            {\r\n                stack.Push(child);\r\n            }\r\n\r\n            if (stack.Count == 0)\r\n            {\r\n                yield break;\r\n            }\r\n            else\r\n            {\r\n                DependencyObject node = stack.Pop();\r\n                yield return node;\r\n\r\n                foreach (var decendant in GetVisualDecendants(node, strict, stack))\r\n                {\r\n                    yield return decendant;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the visual tree descendants of an element.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <returns>The visual tree descendants of an element.</returns>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"element\"/> is null.\r\n        /// </exception>\r\n        public static IEnumerable<DependencyObject> GetVisualDescendants(this DependencyObject element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n\r\n            return GetVisualDescendantsAndSelfIterator(element).Skip(1);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the visual tree descendants of an element and the element\r\n        /// itself.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <returns>\r\n        /// The visual tree descendants of an element and the element itself.\r\n        /// </returns>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"element\"/> is null.\r\n        /// </exception>\r\n        public static IEnumerable<DependencyObject> GetVisualDescendantsAndSelf(this DependencyObject element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n\r\n            return GetVisualDescendantsAndSelfIterator(element);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the visual tree descendants of an element and the element\r\n        /// itself.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <returns>\r\n        /// The visual tree descendants of an element and the element itself.\r\n        /// </returns>\r\n        private static IEnumerable<DependencyObject> GetVisualDescendantsAndSelfIterator(DependencyObject element)\r\n        {\r\n            Debug.Assert(element != null, \"element should not be null!\");\r\n\r\n            Queue<DependencyObject> remaining = new Queue<DependencyObject>();\r\n            remaining.Enqueue(element);\r\n\r\n            while (remaining.Count > 0)\r\n            {\r\n                DependencyObject obj = remaining.Dequeue();\r\n                yield return obj;\r\n\r\n                foreach (DependencyObject child in obj.GetVisualChildren())\r\n                {\r\n                    remaining.Enqueue(child);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the visual tree siblings of an element.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <returns>The visual tree siblings of an element.</returns>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"element\"/> is null.\r\n        /// </exception>\r\n        public static IEnumerable<DependencyObject> GetVisualSiblings(this DependencyObject element)\r\n        {\r\n            return element\r\n                .GetVisualSiblingsAndSelf()\r\n                .Where(p => p != element);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the visual tree siblings of an element and the element itself.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <returns>\r\n        /// The visual tree siblings of an element and the element itself.\r\n        /// </returns>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"element\"/> is null.\r\n        /// </exception>\r\n        public static IEnumerable<DependencyObject> GetVisualSiblingsAndSelf(this DependencyObject element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n\r\n            DependencyObject parent = VisualTreeHelper.GetParent(element);\r\n            return parent == null ?\r\n                Enumerable.Empty<DependencyObject>() :\r\n                parent.GetVisualChildren();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the bounds of an element relative to another element.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <param name=\"otherElement\">\r\n        /// The element relative to the other element.\r\n        /// </param>\r\n        /// <returns>\r\n        /// The bounds of the element relative to another element, or null if\r\n        /// the elements are not related.\r\n        /// </returns>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"element\"/> is null.\r\n        /// </exception>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"otherElement\"/> is null.\r\n        /// </exception>\r\n        public static Rect? GetBoundsRelativeTo(this FrameworkElement element, UIElement otherElement)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            else if (otherElement == null)\r\n            {\r\n                throw new ArgumentNullException(\"otherElement\");\r\n            }\r\n\r\n            try\r\n            {\r\n                Point origin, bottom;\r\n                GeneralTransform transform = element.TransformToVisual(otherElement);\r\n                if (transform != null &&\r\n                    transform.TryTransform(new Point(), out origin) &&\r\n                    transform.TryTransform(new Point(element.ActualWidth, element.ActualHeight), out bottom))\r\n                {\r\n                    return new Rect(origin, bottom);\r\n                }\r\n            }\r\n            catch (ArgumentException)\r\n            {\r\n                // Ignore any exceptions thrown while trying to transform\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static childItem FindVisualChild<childItem>(DependencyObject obj) where childItem : DependencyObject\r\n        {\r\n            for (var i = 0; i < VisualTreeHelper.GetChildrenCount(obj); i++)\r\n            {\r\n                var child = VisualTreeHelper.GetChild(obj, i);\r\n                if (child != null && child is childItem)\r\n                {\r\n                    return (childItem)child;\r\n                }\r\n                else\r\n                {\r\n                    var childOfChild = FindVisualChild<childItem>(child);\r\n                    if (childOfChild != null)\r\n                    {\r\n                        return childOfChild;\r\n                    }\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n\r\n        public static TItem FindVisualChildWithPredicate<TItem>(DependencyObject obj, Predicate<TItem> predicate) where TItem : DependencyObject\r\n        {\r\n            for (var i = 0; i < VisualTreeHelper.GetChildrenCount(obj); i++)\r\n            {\r\n                var child = VisualTreeHelper.GetChild(obj, i);\r\n                if (child is TItem && predicate((TItem)child))\r\n                {\r\n                    return (TItem)child;\r\n                }\r\n\r\n                var childOfChild = FindVisualChild<TItem>(child);\r\n                if (childOfChild != null)\r\n                {\r\n                    return childOfChild;\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Equivalent of FindName, but works on the visual tree to go through templates, etc.\r\n        /// </summary>\r\n        /// <param name=\"root\">The node to search from</param>\r\n        /// <param name=\"name\">The name to look for</param>\r\n        /// <returns>The found node, or null if not found</returns>\r\n        public static FrameworkElement FindVisualChild(this FrameworkElement root, string name)\r\n        {\r\n            FrameworkElement temp = root.FindName(name) as FrameworkElement;\r\n            if (temp != null)\r\n                return temp;\r\n\r\n            foreach (FrameworkElement element in root.GetVisualChildren())\r\n            {\r\n                temp = element.FindName(name) as FrameworkElement;\r\n                if (temp != null)\r\n                    return temp;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static IEnumerable<DependencyObject> GetVisuals(this DependencyObject root)\r\n        {\r\n            int count = VisualTreeHelper.GetChildrenCount(root);\r\n            for (int i = 0; i < count; i++)\r\n            {\r\n                var child = VisualTreeHelper.GetChild(root, i);\r\n                yield return child;\r\n                foreach (var descendants in child.GetVisuals())\r\n                {\r\n                    yield return descendants;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a visual child of the element\r\n        /// </summary>\r\n        /// <param name=\"node\">The element to check</param>\r\n        /// <param name=\"index\">The index of the child</param>\r\n        /// <returns>The found child</returns>\r\n        public static FrameworkElement GetVisualChild(this FrameworkElement node, int index)\r\n        {\r\n            return VisualTreeHelper.GetChild(node, index) as FrameworkElement;\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Gets the visual parent of the element\r\n        /// </summary>\r\n        /// <param name=\"node\">The element to check</param>\r\n        /// <returns>The visual parent</returns>\r\n        public static FrameworkElement GetVisualParent(this FrameworkElement node)\r\n        {\r\n            return VisualTreeHelper.GetParent(node) as FrameworkElement;\r\n        }\r\n\r\n        public static T GetParent<T>(DependencyObject child) where T : DependencyObject\r\n        {\r\n            //get parent item\r\n            DependencyObject parentObject = VisualTreeHelper.GetParent(child);\r\n\r\n            //we've reached the end of the tree\r\n            if (parentObject == null) return null;\r\n\r\n            //check if the parent matches the type we're looking for\r\n            T parent = parentObject as T;\r\n            if (parent != null)\r\n                return parent;\r\n            else\r\n                return GetParent<T>(parentObject);\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Gets the VisualStateGroup with the given name, looking up the visual tree\r\n        /// </summary>\r\n        /// <param name=\"root\">Element to start from</param>\r\n        /// <param name=\"groupName\">Name of the group to look for</param>\r\n        /// <param name=\"searchAncestors\">Whether or not to look up the tree</param>\r\n        /// <returns>The group, if found</returns>\r\n        public static VisualStateGroup GetVisualStateGroup(this FrameworkElement root, string groupName, bool searchAncestors)\r\n        {\r\n            IList groups = VisualStateManager.GetVisualStateGroups(root);\r\n            foreach (object o in groups)\r\n            {\r\n                VisualStateGroup group = o as VisualStateGroup;\r\n                if (group != null && group.Name == groupName)\r\n                    return group;\r\n            }\r\n\r\n            if (searchAncestors)\r\n            {\r\n                FrameworkElement parent = root.GetVisualParent();\r\n                if (parent != null)\r\n                    return parent.GetVisualStateGroup(groupName, true);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides a debug string that represents the visual child tree\r\n        /// </summary>\r\n        /// <param name=\"root\">The root node</param>\r\n        /// <param name=\"result\">StringBuilder into which the text is appended</param>\r\n        /// <remarks>This method only works in DEBUG mode</remarks>\r\n        [Conditional(\"DEBUG\")]\r\n        public static void GetVisualChildTreeDebugText(this FrameworkElement root, StringBuilder result)\r\n        {\r\n            List<string> results = new List<string>();\r\n            root.GetChildTree(\"\", \"  \", results);\r\n            foreach (string s in results)\r\n                result.AppendLine(s);\r\n        }\r\n\r\n        private static void GetChildTree(this FrameworkElement root, string prefix, string addPrefix, List<string> results)\r\n        {\r\n            string thisElement = \"\";\r\n            if (String.IsNullOrEmpty(root.Name))\r\n                thisElement = \"[Anonymous]\";\r\n            else\r\n                thisElement = \"[\" + root.Name + \"]\";\r\n\r\n            thisElement += \" : \" + root.GetType().Name;\r\n\r\n            results.Add(prefix + thisElement);\r\n            foreach (FrameworkElement directChild in root.GetVisualChildren())\r\n            {\r\n                directChild.GetChildTree(prefix + addPrefix, addPrefix, results);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides a debug string that represents the visual child tree\r\n        /// </summary>\r\n        /// <param name=\"node\">The root node</param>\r\n        /// <param name=\"result\">StringBuilder into which the text is appended</param>\r\n        /// <remarks>This method only works in DEBUG mode</remarks>\r\n        [Conditional(\"DEBUG\")]\r\n        public static void GetAncestorVisualTreeDebugText(this FrameworkElement node, StringBuilder result)\r\n        {\r\n            List<string> tree = new List<string>();\r\n            node.GetAncestorVisualTree(tree);\r\n            string prefix = \"\";\r\n            foreach (string s in tree)\r\n            {\r\n                result.AppendLine(prefix + s);\r\n                prefix = prefix + \"  \";\r\n            }\r\n        }\r\n\r\n        private static void GetAncestorVisualTree(this FrameworkElement node, List<string> children)\r\n        {\r\n            string name = String.IsNullOrEmpty(node.Name) ? \"[Anon]\" : node.Name;\r\n            string thisNode = name + \": \" + node.GetType().Name;\r\n\r\n            // Ensure list is in reverse order going up the tree\r\n            children.Insert(0, thisNode);\r\n            FrameworkElement parent = node.GetVisualParent();\r\n            if (parent != null)\r\n                GetAncestorVisualTree(parent, children);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a render transform of the specified type from the element, creating it if necessary\r\n        /// </summary>\r\n        /// <typeparam name=\"RequestedTransform\">The type of transform (Rotate, Translate, etc)</typeparam>\r\n        /// <param name=\"element\">The element to check</param>\r\n        /// <param name=\"mode\">The mode to use for creating transforms, if not found</param>\r\n        /// <returns>The specified transform, or null if not found and not created</returns>\r\n        public static RequestedTransform GetTransform<RequestedTransform>(this UIElement element, TransformCreationMode mode) where RequestedTransform : Transform, new()\r\n        {\r\n            //if (element == null)\r\n            //    return null;\r\n\r\n            Transform originalTransform = element.RenderTransform;\r\n            RequestedTransform requestedTransform = null;\r\n            MatrixTransform matrixTransform = null;\r\n            TransformGroup transformGroup = null;\r\n\r\n            // Current transform is null -- create if necessary and return\r\n            if (originalTransform == null)\r\n            {\r\n                if ((mode & TransformCreationMode.Create) == TransformCreationMode.Create)\r\n                {\r\n                    requestedTransform = new RequestedTransform();\r\n                    element.RenderTransform = requestedTransform;\r\n                    return requestedTransform;\r\n                }\r\n\r\n                return null;\r\n            }\r\n\r\n            // Transform is exactly what we want -- return it\r\n            requestedTransform = originalTransform as RequestedTransform;\r\n            if (requestedTransform != null)\r\n                return requestedTransform;\r\n\r\n\r\n            // The existing transform is matrix transform - overwrite if necessary and return\r\n            matrixTransform = originalTransform as MatrixTransform;\r\n            if (matrixTransform != null)\r\n            {\r\n                if (matrixTransform.Matrix.IsIdentity\r\n                  && (mode & TransformCreationMode.Create) == TransformCreationMode.Create\r\n                  && (mode & TransformCreationMode.IgnoreIdentityMatrix) == TransformCreationMode.IgnoreIdentityMatrix)\r\n                {\r\n                    requestedTransform = new RequestedTransform();\r\n                    element.RenderTransform = requestedTransform;\r\n                    return requestedTransform;\r\n                }\r\n\r\n                return null;\r\n            }\r\n\r\n            // Transform is actually a group -- check for the requested type\r\n            transformGroup = originalTransform as TransformGroup;\r\n            if (transformGroup != null)\r\n            {\r\n                foreach (Transform child in transformGroup.Children)\r\n                {\r\n                    // Child is the right type -- return it\r\n                    if (child is RequestedTransform)\r\n                        return child as RequestedTransform;\r\n                }\r\n\r\n                // Right type was not found, but we are OK to add it\r\n                if ((mode & TransformCreationMode.AddToGroup) == TransformCreationMode.AddToGroup)\r\n                {\r\n                    requestedTransform = new RequestedTransform();\r\n                    transformGroup.Children.Add(requestedTransform);\r\n                    return requestedTransform;\r\n                }\r\n\r\n                return null;\r\n            }\r\n\r\n            // Current ransform is not a group and is not what we want;\r\n            // create a new group containing the existing transform and the new one\r\n            if ((mode & TransformCreationMode.CombineIntoGroup) == TransformCreationMode.CombineIntoGroup)\r\n            {\r\n                transformGroup = new TransformGroup();\r\n                transformGroup.Children.Add(originalTransform);\r\n                transformGroup.Children.Add(requestedTransform);\r\n                element.RenderTransform = transformGroup;\r\n                return requestedTransform;\r\n            }\r\n\r\n            Debug.Assert(false, \"Shouldn't get here\");\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a string representation of a property path needed to update a Storyboard\r\n        /// </summary>\r\n        /// <param name=\"element\">The element to get the path for</param>\r\n        /// <param name=\"subProperty\">The property of the transform</param>\r\n        /// <typeparam name=\"RequestedType\">The type of transform to look fo</typeparam>\r\n        /// <returns>A property path</returns>\r\n        public static string GetTransformPropertyPath<RequestedType>(this FrameworkElement element, string subProperty) where RequestedType : Transform\r\n        {\r\n            Transform t = element.RenderTransform;\r\n            if (t is RequestedType)\r\n                return String.Format(\"(RenderTransform).({0}.{1})\", typeof(RequestedType).Name, subProperty);\r\n\r\n            else if (t is TransformGroup)\r\n            {\r\n                TransformGroup g = t as TransformGroup;\r\n                for (int i = 0; i < g.Children.Count; i++)\r\n                {\r\n                    if (g.Children[i] is RequestedType)\r\n                        return String.Format(\"(RenderTransform).(TransformGroup.Children)[\" + i + \"].({0}.{1})\",\r\n                          typeof(RequestedType).Name, subProperty);\r\n                }\r\n            }\r\n\r\n            return \"\";\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a plane projection, creating it if necessary\r\n        /// </summary>\r\n        /// <param name=\"element\">The element</param>\r\n        /// <param name=\"create\">Whether or not to create the projection if it doesn't already exist</param>\r\n        /// <returns>The plane project, or null if not found / created</returns>\r\n        public static PlaneProjection GetPlaneProjection(this UIElement element, bool create)\r\n        {\r\n            Projection originalProjection = element.Projection;\r\n            PlaneProjection projection = null;\r\n\r\n            // Projection is already a plane projection; return it\r\n            if (originalProjection is PlaneProjection)\r\n                return originalProjection as PlaneProjection;\r\n\r\n            // Projection is null; create it if necessary\r\n            if (originalProjection == null)\r\n            {\r\n                if (create)\r\n                {\r\n                    projection = new PlaneProjection();\r\n                    element.Projection = projection;\r\n                }\r\n            }\r\n\r\n            // Note that if the project is a Matrix projection, it will not be\r\n            // changed and null will be returned.\r\n            return projection;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Perform an action when the element's LayoutUpdated event fires.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <param name=\"action\">The action to perform.</param>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"element\"/> is null.\r\n        /// </exception>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"action\"/> is null.\r\n        /// </exception>\r\n        public static void InvokeOnLayoutUpdated(this FrameworkElement element, Action action)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            else if (action == null)\r\n            {\r\n                throw new ArgumentNullException(\"action\");\r\n            }\r\n\r\n            // Create an event handler that unhooks itself before calling the\r\n            // action and then attach it to the LayoutUpdated event.\r\n            EventHandler handler = null;\r\n            handler = (s, e) =>\r\n            {\r\n                //TODO: is this the right thing to do?\r\n                //Deployment.Current.Dispatcher.BeginInvoke(() => { element.LayoutUpdated -= handler; });\r\n                element.LayoutUpdated -= handler;\r\n\r\n                action();\r\n            };\r\n            element.LayoutUpdated += handler;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Retrieves all the logical children of a framework element using a \r\n        /// breadth-first search. For performance reasons this method manually \r\n        /// manages the stack instead of using recursion.\r\n        /// </summary>\r\n        /// <param name=\"parent\">The parent framework element.</param>\r\n        /// <returns>The logical children of the framework element.</returns>\r\n        internal static IEnumerable<FrameworkElement> GetLogicalChildren(this FrameworkElement parent)\r\n        {\r\n            Debug.Assert(parent != null, \"The parent cannot be null.\");\r\n\r\n            Popup popup = parent as Popup;\r\n            if (popup != null)\r\n            {\r\n                FrameworkElement popupChild = popup.Child as FrameworkElement;\r\n                if (popupChild != null)\r\n                {\r\n                    yield return popupChild;\r\n                }\r\n            }\r\n\r\n            // If control is an items control return all children using the \r\n            // Item container generator.\r\n            ItemsControl itemsControl = parent as ItemsControl;\r\n            if (itemsControl != null)\r\n            {\r\n                foreach (FrameworkElement logicalChild in\r\n                    Enumerable\r\n                        .Range(0, itemsControl.Items.Count)\r\n                        .Select(index => itemsControl.ItemContainerGenerator.ContainerFromIndex(index))\r\n                        .OfType<FrameworkElement>())\r\n                {\r\n                    yield return logicalChild;\r\n                }\r\n            }\r\n\r\n            string parentName = parent.Name;\r\n            Queue<FrameworkElement> queue =\r\n                new Queue<FrameworkElement>(parent.GetVisualChildren().OfType<FrameworkElement>());\r\n\r\n            while (queue.Count > 0)\r\n            {\r\n                FrameworkElement element = queue.Dequeue();\r\n                if (element.Parent == parent || element is UserControl)\r\n                {\r\n                    yield return element;\r\n                }\r\n                else\r\n                {\r\n                    foreach (FrameworkElement visualChild in element.GetVisualChildren().OfType<FrameworkElement>())\r\n                    {\r\n                        queue.Enqueue(visualChild);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Retrieves all the logical descendents of a framework element using a \r\n        /// breadth-first search. For performance reasons this method manually \r\n        /// manages the stack instead of using recursion.\r\n        /// </summary>\r\n        /// <param name=\"parent\">The parent framework element.</param>\r\n        /// <returns>The logical children of the framework element.</returns>\r\n        internal static IEnumerable<FrameworkElement> GetLogicalDescendents(this FrameworkElement parent)\r\n        {\r\n            Debug.Assert(parent != null, \"The parent cannot be null.\");\r\n\r\n            //return\r\n            //    FunctionalProgramming.TraverseBreadthFirst(\r\n            //        parent,\r\n            //        node => node.GetLogicalChildren(),\r\n            //        node => true);\r\n\r\n            return null;\r\n        }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Possible modes for creating a transform\r\n    /// </summary>\r\n    [Flags]\r\n    public enum TransformCreationMode\r\n    {\r\n        /// <summary>\r\n        /// Don't try and create a transform if it doesn't already exist\r\n        /// </summary>\r\n        None = 0,\r\n\r\n        /// <summary>\r\n        /// Create a transform if none exists\r\n        /// </summary>\r\n        Create = 1,\r\n\r\n        /// <summary>\r\n        /// Create and add to an existing group\r\n        /// </summary>\r\n        AddToGroup = 2,\r\n\r\n        /// <summary>\r\n        /// Create a group and combine with existing transform; may break existing animations\r\n        /// </summary>\r\n        CombineIntoGroup = 4,\r\n\r\n        /// <summary>\r\n        /// Treat identity matrix as if it wasn't there; may break existing animations\r\n        /// </summary>\r\n        IgnoreIdentityMatrix = 8,\r\n\r\n        /// <summary>\r\n        /// Create a new transform or add to group\r\n        /// </summary>\r\n        CreateOrAddAndIgnoreMatrix = Create | AddToGroup | IgnoreIdentityMatrix,\r\n\r\n        /// <summary>\r\n        /// Default behaviour, equivalent to CreateOrAddAndIgnoreMatrix\r\n        /// </summary>\r\n        Default = CreateOrAddAndIgnoreMatrix,\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/FlipCounter.xaml",
    "content": "﻿<UserControl\r\n\txmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n\txmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n\txmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n\txmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n\tmc:Ignorable=\"d\"\r\n\tx:Class=\"Telegram.Controls.FlipCounter\"\r\n\td:DesignWidth=\"480\" d:DesignHeight=\"800\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n    \t<Grid.Projection>\r\n    \t\t<PlaneProjection/>\r\n    \t</Grid.Projection>\r\n    \t<VisualStateManager.VisualStateGroups>\r\n    \t\t<VisualStateGroup x:Name=\"FlipStates\">\r\n    \t\t\t<VisualStateGroup.Transitions>\r\n    \t\t\t\t<VisualTransition From=\"Normal\" GeneratedDuration=\"0\" To=\"Flipped\">\r\n    \t\t\t\t\t<Storyboard Completed=\"Flip_Completed\">\r\n    \t\t\t\t\t\t<DoubleAnimation Duration=\"0:0:0.425\" To=\"180\" Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"LayoutRoot\" d:IsOptimized=\"True\">\r\n    \t\t\t\t\t\t\t<DoubleAnimation.EasingFunction>\r\n    \t\t\t\t\t\t\t\t<CubicEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t</DoubleAnimation.EasingFunction>\r\n    \t\t\t\t\t\t</DoubleAnimation>\r\n    \t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"BackTile\">\r\n    \t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0:0:0.0925\">\r\n    \t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n    \t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n    \t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n    \t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n    \t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"BackTile\">\r\n                                <EasingDoubleKeyFrame KeyTime=\"0:0:0.0925\" Value=\"-180\"/>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.425\" Value=\"-180\"/>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t</Storyboard>\r\n    \t\t\t\t</VisualTransition>\r\n    \t\t\t</VisualStateGroup.Transitions>\r\n    \t\t\t<VisualState x:Name=\"Normal\">\r\n    \t\t\t\t<Storyboard>\r\n    \t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"BackTile\">\r\n    \t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n    \t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n    \t\t\t\t</Storyboard>\r\n    \t\t\t</VisualState>\r\n    \t\t\t<VisualState x:Name=\"Flipped\">\r\n    \t\t\t\t<Storyboard>\r\n    \t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FrontTile\">\r\n    \t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n    \t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n    \t\t\t\t</Storyboard>\r\n    \t\t\t</VisualState>\r\n    \t\t</VisualStateGroup>\r\n    \t</VisualStateManager.VisualStateGroups>\r\n        <Border x:Name=\"FrontTile\" Background=\"{StaticResource PhoneAccentBrush}\" Width=\"Auto\" Height=\"22\">\r\n            <TextBlock x:Name=\"FrontText\" Foreground=\"White\" FontSize=\"14.67\" FontWeight=\"Bold\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Text=\"0\"/>\r\n        </Border>\r\n        <Border x:Name=\"BackTile\" Background=\"{StaticResource PhoneAccentBrush}\" Width=\"Auto\" Height=\"22\">\r\n        \t<Border.Projection>\r\n        \t\t<PlaneProjection/>\r\n        \t</Border.Projection>\r\n            <TextBlock x:Name=\"BackText\" Foreground=\"White\" FontSize=\"14.67\" FontWeight=\"Bold\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Text=\"0\"/>\r\n        </Border>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "Telegram.Controls/FlipCounter.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n\tpublic partial class FlipCounter\r\n\t{\r\n\t\tpublic FlipCounter()\r\n\t\t{\r\n\t\t\t// Required to initialize variables\r\n\t\t\tInitializeComponent();\r\n\r\n\t\t    BackTile.Width = 2*6.0 + 1*8.66;\r\n            FrontTile.Width = 2 * 6.0 + 1 * 8.66;\r\n\t\t}\r\n\r\n\t    private int _previousCounter;\r\n\r\n\t    public static readonly DependencyProperty CounterProperty =\r\n\t        DependencyProperty.Register(\"Counter\", typeof (int), typeof (FlipCounter), new PropertyMetadata(default(int), OnCounterChanged));\r\n\r\n\t    private bool _initialized;\r\n\r\n\t    private static void OnCounterChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n\t    {\r\n\t        var flipCounter = (FlipCounter) d;\r\n            if (flipCounter != null)\r\n            {\r\n                var oldCounter = (int)e.OldValue;\r\n                var oldCounterLength = e.OldValue.ToString().Length;\r\n                var newCounter = (int)e.NewValue;\r\n                var newCounterLength = e.NewValue.ToString().Length;\r\n                if (!flipCounter._initialized)\r\n                {\r\n                    flipCounter._initialized = true;\r\n                    flipCounter.BackTile.Width = 2 * 6.0 + newCounterLength * 8.66;\r\n                    flipCounter.FrontTile.Width = 2 * 6.0 + newCounterLength * 8.66;\r\n                }\r\n                if (oldCounter != newCounter)\r\n                {\r\n                    if (oldCounterLength != newCounterLength)\r\n                    {\r\n                        flipCounter.BackTile.Width = 2 * 6.0 + newCounterLength * 8.66;\r\n                        flipCounter.FrontTile.Width = 2 * 6.0 + newCounterLength * 8.66;\r\n                    }\r\n\r\n                    flipCounter.FrontText.Text = flipCounter.BackText.Text;\r\n                    var check1 = VisualStateManager.GoToState(flipCounter, \"Normal\", false);\r\n                    flipCounter.BackText.Text = Convert.ToString(newCounter);\r\n                    var check = VisualStateManager.GoToState(flipCounter, \"Flipped\", true);\r\n                }\r\n            }\r\n\t    }\r\n\r\n\t    public int Counter\r\n\t    {\r\n\t        get { return (int) GetValue(CounterProperty); }\r\n\t        set { SetValue(CounterProperty, value); }\r\n\t    }\r\n\r\n        private void Flip_Completed(object sender, EventArgs e)\r\n        {\r\n            //FrontText.Text = BackText.Text;\r\n            //var check = VisualStateManager.GoToState(this, \"Normal\", false);\r\n        }\r\n\t}\r\n}"
  },
  {
    "path": "Telegram.Controls/FlipPanel.xaml",
    "content": "﻿<UserControl x:Class=\"Telegram.Controls.FlipPanel\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.Projection>\r\n            <PlaneProjection/>\r\n        </Grid.Projection>\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"FlipStates\">\r\n                <VisualStateGroup.Transitions>\r\n                    <VisualTransition From=\"Normal\" GeneratedDuration=\"0\" To=\"Flipped\">\r\n                        <Storyboard>\r\n                            <DoubleAnimation Duration=\"0:0:0.425\" To=\"180\" Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"LayoutRoot\" d:IsOptimized=\"True\">\r\n                                <DoubleAnimation.EasingFunction>\r\n                                    <CubicEase EasingMode=\"EaseOut\"/>\r\n                                </DoubleAnimation.EasingFunction>\r\n                            </DoubleAnimation>\r\n                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"BackTile\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0925\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                        <Visibility>Visible</Visibility>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                </DiscreteObjectKeyFrame>\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"BackTile\">\r\n                                <EasingDoubleKeyFrame KeyTime=\"0:0:0.0925\" Value=\"-180\"/>\r\n                                <EasingDoubleKeyFrame KeyTime=\"0:0:0.425\" Value=\"-180\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </VisualTransition>\r\n                </VisualStateGroup.Transitions>\r\n                <VisualState x:Name=\"Normal\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"BackTile\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Flipped\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FrontTile\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Border x:Name=\"FrontTile\" Background=\"{StaticResource PhoneBackgroundBrush}\" Width=\"Auto\" Height=\"22\">\r\n            <TextBlock x:Name=\"FrontText\"/>\r\n        </Border>\r\n        <Border x:Name=\"BackTile\" Background=\"{StaticResource PhoneBackgroundBrush}\" Width=\"Auto\" Height=\"22\">\r\n            <Border.Projection>\r\n                <PlaneProjection/>\r\n            </Border.Projection>\r\n            <TextBlock x:Name=\"BackText\"/>\r\n        </Border>\r\n    </Grid>\r\n</UserControl>\r\n"
  },
  {
    "path": "Telegram.Controls/FlipPanel.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    public partial class FlipPanel\r\n    {\r\n        public FlipPanel()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        public static readonly DependencyProperty TextBlockStyleProperty =\r\n            DependencyProperty.Register(\"TextBlockStyle\", typeof (Style), typeof (FlipPanel), new PropertyMetadata(default(Style), OnTextBlockStyleChanged));\r\n\r\n        private static void OnTextBlockStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var panel = (FlipPanel)d;\r\n            if (panel != null)\r\n            {\r\n                panel.FrontText.Style = (Style)e.NewValue;\r\n                panel.BackText.Style = (Style)e.NewValue;\r\n            }\r\n\r\n        }\r\n\r\n        public Style TextBlockStyle\r\n        {\r\n            get { return (Style) GetValue(TextBlockStyleProperty); }\r\n            set { SetValue(TextBlockStyleProperty, value); }\r\n        }\r\n\r\n\r\n        public static readonly DependencyProperty TextProperty =\r\n            DependencyProperty.Register(\"Text\", typeof(string), typeof(FlipPanel), new PropertyMetadata(default(string), OnTextChanged));\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var panel = (FlipPanel)d;\r\n            if (panel != null)\r\n            {\r\n                var oldText = (string)e.OldValue;\r\n                var newText = (string)e.NewValue;\r\n                \r\n                if (oldText != newText)\r\n                {\r\n\r\n                    panel.FrontText.Text = panel.BackText.Text;\r\n                    var check1 = VisualStateManager.GoToState(panel, \"Normal\", false);\r\n                    panel.BackText.Text = Convert.ToString(newText);\r\n                    var check = VisualStateManager.GoToState(panel, \"Flipped\", true);\r\n                }\r\n            }\r\n        }\r\n\r\n        public string Text\r\n        {\r\n            get { return (string)GetValue(TextProperty); }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/Helpers/DependencyPropertyChangedListener.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace Telegram.Controls.Helpers\r\n{\r\n    /// <summary>\r\n    /// This class implements a listener to receive notifications for dependency property changes.\r\n    /// </summary>\r\n    public class DependencyPropertyChangedListener\r\n    {\r\n\r\n        #region Inner types\r\n\r\n        // Helper element to make it possible to use the binding engine to get notified when the source element property changes.\r\n        private sealed class RelayObject : DependencyObject\r\n        {\r\n            private DependencyPropertyChangedListener _listener;\r\n\r\n            internal RelayObject(DependencyPropertyChangedListener listener)\r\n            {\r\n                _listener = listener;\r\n            }\r\n\r\n            #region Value (DependencyProperty)\r\n\r\n            public object Value\r\n            {\r\n                get { return (object)GetValue(ValueProperty); }\r\n                set { SetValue(ValueProperty, value); }\r\n            }\r\n            public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(\"Value\", typeof(object), typeof(RelayObject), new PropertyMetadata(default(object), new PropertyChangedCallback(OnValueChanged)));\r\n\r\n            private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n            {\r\n                object oldValue = (object)e.OldValue;\r\n                object newValue = (object)e.NewValue;\r\n                RelayObject source = (RelayObject)d;\r\n                source.OnValueChanged(oldValue, newValue);\r\n            }\r\n\r\n            private void OnValueChanged(object oldValue, object newValue)\r\n            {\r\n                _listener.OnValueChanged(oldValue, newValue);\r\n            }\r\n\r\n            #endregion\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Events\r\n\r\n        /// <summary>\r\n        /// Raises when the dependency property changes.\r\n        /// </summary>\r\n        public event EventHandler<DependencyPropertyValueChangedEventArgs> ValueChanged;\r\n\r\n        #endregion\r\n\r\n        #region Ctor\r\n\r\n        private DependencyPropertyChangedListener()\r\n        {\r\n            // just to make it private\r\n        }\r\n\r\n        #endregion\r\n\r\n        // holds a reference to the relay object in order that the GC does not collect it\r\n        private RelayObject RelayInstance { get; set; }\r\n\r\n        public static DependencyPropertyChangedListener Create(DependencyObject sourceElement, string propertyPath)\r\n        //public static DependencyPropertyChangedListener Create(DependencyObject sourceElement, DependencyProperty property)\r\n        {\r\n            // check input\r\n            if (sourceElement == null)\r\n                throw new ArgumentNullException(\"sourceElement\");\r\n            if (string.IsNullOrWhiteSpace(propertyPath))\r\n                throw new ArgumentException(\"propertyPath is empty\");\r\n\r\n            // create listener\r\n            DependencyPropertyChangedListener listener = new DependencyPropertyChangedListener();\r\n\r\n            // setup binding\r\n            Binding binding = new Binding();\r\n            binding.Source = sourceElement;\r\n            binding.Mode = BindingMode.OneWay;\r\n            //binding.Path = new PropertyPath(property); // throws exception\r\n            binding.Path = new PropertyPath(propertyPath);\r\n\r\n            // create relay object\r\n            RelayObject relay = new RelayObject(listener);\r\n            // ...the listener holds a reference to the relay object in order that the GC does not collect it\r\n            listener.RelayInstance = relay;\r\n\r\n            // set binding\r\n            BindingOperations.SetBinding(relay, RelayObject.ValueProperty, binding);\r\n\r\n            return listener;\r\n        }\r\n\r\n        public void Detach()\r\n        {\r\n            if (this.RelayInstance != null)\r\n            {\r\n                // first: reset member to prevent further eventing of ValueChanged event.\r\n                RelayObject temp = this.RelayInstance;\r\n                this.RelayInstance = null;\r\n\r\n                // second: clear the binding -> raises property changed event...\r\n                temp.ClearValue(RelayObject.ValueProperty);\r\n            }\r\n        }\r\n\r\n        private void OnValueChanged(object oldValue, object newValue)\r\n        {\r\n            // raise event, but only if the listener is not detached.\r\n            if (ValueChanged != null && this.RelayInstance != null)\r\n                ValueChanged(this, new DependencyPropertyValueChangedEventArgs(oldValue, newValue));\r\n        }\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/Helpers/DependencyPropertyValueChangedEventArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.Controls.Helpers\r\n{\r\n    /// <summary>\r\n    /// Provides data for a DependencyPropertyChangedListener ValueChanged implementation.\r\n    /// </summary>\r\n    public class DependencyPropertyValueChangedEventArgs : EventArgs\r\n    {\r\n        internal DependencyPropertyValueChangedEventArgs(object oldValue, object newValue)\r\n        {\r\n            OldValue = oldValue;\r\n            NewValue = newValue;\r\n        }\r\n\r\n        /// <summary>\r\n        ///  Gets the value of the property before the change.\r\n        /// </summary>\r\n        public object OldValue { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets the value of the property after the change.\r\n        /// </summary>\r\n        public object NewValue { get; private set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/HighlightingTextBlock.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Media;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    /// <summary>\r\n    /// A specialized highlighting text block control.\r\n    /// </summary>\r\n    public class HighlightingTextBlock : ContentControl \r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the  text block reference.\r\n        /// </summary>\r\n        private TextBlock _textBlock { get; set; }\r\n\r\n        #region public string Text\r\n        /// <summary>\r\n        /// Gets or sets the contents of the TextBox.\r\n        /// </summary>\r\n        public string Text\r\n        {\r\n            get { return GetValue(TextProperty) as string; }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Text dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TextProperty =\r\n            DependencyProperty.Register(\r\n                \"Text\",\r\n                typeof(string),\r\n                typeof(HighlightingTextBlock),\r\n                new PropertyMetadata(OnTextPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// TextProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteBox that changed its Text.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var source = d as HighlightingTextBlock;\r\n\r\n            if (source != null\r\n                && source._textBlock != null)\r\n            {\r\n                source._textBlock.Inlines.Clear();\r\n\r\n                var value = e.NewValue as string;\r\n                \r\n                if (value != null)\r\n                {\r\n                    var highlight = source.HighlightText ?? string.Empty;\r\n                    if (string.IsNullOrEmpty(highlight))\r\n                    {\r\n                        var run = new Run\r\n                        {\r\n                            Text = value,\r\n                            Foreground = source._textBlock.Foreground,\r\n                            FontWeight = source._textBlock.FontWeight\r\n                        };\r\n\r\n                        source._textBlock.Inlines.Add(run);\r\n                    }\r\n                    else\r\n                    {\r\n                        var index = 0;\r\n                        var previousIndex = -1;\r\n                        while ((index = value.IndexOf(highlight, index, StringComparison.OrdinalIgnoreCase)) != -1)\r\n                        {\r\n                            if (previousIndex == -1\r\n                                || index > previousIndex + highlight.Length)\r\n                            {\r\n                                var startIndex = previousIndex == -1 ? 0 : previousIndex + highlight.Length;\r\n                                var run = new Run\r\n                                {\r\n                                    Text = value.Substring(startIndex, index - startIndex),\r\n                                    Foreground = source._textBlock.Foreground,\r\n                                    FontWeight = source._textBlock.FontWeight\r\n                                };\r\n                                \r\n                                source._textBlock.Inlines.Add(run);\r\n                            }\r\n\r\n                            var highlightedRun = new Run\r\n                            {\r\n                                Text = value.Substring(index, highlight.Length),\r\n                                Foreground = source.HighlightBrush,\r\n                                FontWeight = source.HighlightFontWeight\r\n                            };\r\n\r\n                            source._textBlock.Inlines.Add(highlightedRun);\r\n\r\n                            previousIndex = index;\r\n                            index = index + highlight.Length;\r\n                        }\r\n\r\n                        if (previousIndex == -1)\r\n                        {\r\n                            var run = new Run\r\n                            {\r\n                                Text = value,\r\n                                Foreground = source._textBlock.Foreground,\r\n                                FontWeight = source._textBlock.FontWeight\r\n                            };\r\n\r\n                            source._textBlock.Inlines.Add(run);\r\n                        }\r\n                        else if (value.Length > previousIndex + highlight.Length)\r\n                        {\r\n                            var run = new Run\r\n                            {\r\n                                Text = value.Substring(previousIndex + highlight.Length, value.Length - (previousIndex + highlight.Length)),\r\n                                Foreground = source._textBlock.Foreground,\r\n                                FontWeight = source._textBlock.FontWeight\r\n                            };\r\n\r\n                            source._textBlock.Inlines.Add(run);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion public string Text\r\n\r\n        public static readonly DependencyProperty UseTransliterationProperty = DependencyProperty.Register(\r\n            \"UseTransliteration\", typeof (bool), typeof (HighlightingTextBlock), new PropertyMetadata(default(bool)));\r\n\r\n        public bool UseTransliteration\r\n        {\r\n            get { return (bool) GetValue(UseTransliterationProperty); }\r\n            set { SetValue(UseTransliterationProperty, value); }\r\n        }\r\n\r\n        #region public string HighlightText\r\n        /// <summary>\r\n        /// Gets or sets the highlighted text.\r\n        /// </summary>\r\n        public string HighlightText\r\n        {\r\n            get { return GetValue(HighlightTextProperty) as string; }\r\n            set { SetValue(HighlightTextProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the HighlightText dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty HighlightTextProperty =\r\n            DependencyProperty.Register(\r\n                \"HighlightText\",\r\n                typeof(string),\r\n                typeof(HighlightingTextBlock),\r\n                new PropertyMetadata(OnHighlightTextPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// HighlightText property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteBox that changed its HighlightText.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnHighlightTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n        }\r\n\r\n        #endregion public string HighlightText\r\n\r\n        #region public Style TextBlockStyle\r\n\r\n        public static readonly DependencyProperty TextBlockStyleProperty =\r\n            DependencyProperty.Register(\"TextBlockStyle\", typeof (Style), typeof (HighlightingTextBlock), new PropertyMetadata(default(Style), OnTextBlockStyleChanged));\r\n\r\n        private static void OnTextBlockStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var highlightingTextBlock = (HighlightingTextBlock) d;\r\n\r\n            if (highlightingTextBlock != null\r\n                && highlightingTextBlock._textBlock != null)\r\n            {\r\n                highlightingTextBlock._textBlock.Style = (Style) e.NewValue;\r\n            }\r\n        }\r\n\r\n        public Style TextBlockStyle\r\n        {\r\n            get { return (Style)GetValue(TextBlockStyleProperty); }\r\n            set { SetValue(TextBlockStyleProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region public Brush HighlightBrush\r\n        /// <summary>\r\n        /// Gets or sets the highlight brush.\r\n        /// </summary>\r\n        public Brush HighlightBrush\r\n        {\r\n            get { return GetValue(HighlightBrushProperty) as Brush; }\r\n            set { SetValue(HighlightBrushProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the HighlightBrush dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty HighlightBrushProperty =\r\n            DependencyProperty.Register(\r\n                \"HighlightBrush\",\r\n                typeof(Brush),\r\n                typeof(HighlightingTextBlock),\r\n                new PropertyMetadata(null, OnHighlightBrushPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// HighlightBrushProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">HighlightingTextBlock that changed its HighlightBrush.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnHighlightBrushPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            //HighlightingTextBlock source = d as HighlightingTextBlock;\r\n            //source.ApplyHighlighting();\r\n        }\r\n        #endregion public Brush HighlightBrush\r\n\r\n        #region public FontWeight HighlightFontWeight\r\n        /// <summary>\r\n        /// Gets or sets the font weight used on highlighted text.\r\n        /// </summary>\r\n        public FontWeight HighlightFontWeight\r\n        {\r\n            get { return (FontWeight)GetValue(HighlightFontWeightProperty); }\r\n            set { SetValue(HighlightFontWeightProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the HighlightFontWeight dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty HighlightFontWeightProperty =\r\n            DependencyProperty.Register(\r\n                \"HighlightFontWeight\",\r\n                typeof(FontWeight),\r\n                typeof(HighlightingTextBlock),\r\n                new PropertyMetadata(FontWeights.Normal, OnHighlightFontWeightPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// HighlightFontWeightProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">HighlightingTextBlock that changed its HighlightFontWeight.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnHighlightFontWeightPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            HighlightingTextBlock source = d as HighlightingTextBlock;\r\n            FontWeight value = (FontWeight)e.NewValue;\r\n        }\r\n        #endregion public FontWeight HighlightFontWeight\r\n\r\n        /// <summary>\r\n        /// Initializes a new HighlightingTextBlock class.\r\n        /// </summary>\r\n        public HighlightingTextBlock()\r\n        {\r\n            _textBlock = new TextBlock();\r\n            if (TextBlockStyle != null)\r\n            {\r\n                _textBlock.Style = TextBlockStyle;\r\n            }\r\n            Content = _textBlock;\r\n        }\r\n    }\r\n\r\n\r\n    public static class Emoji\r\n\r\n    {\r\n        /**\r\n *  Emoji codes combined into the groups corresponding to the categories in the interface\r\n *\r\n **/\r\n\r\n        public static ulong[][] Data = {\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83DDE04L, 0x00000000D83DDE03L, 0x00000000D83DDE00L, 0x00000000D83DDE0AL, 0x000000000000263AL, 0x00000000D83DDE09L, 0x00000000D83DDE0DL,\r\n\t\t\t0x00000000D83DDE18L, 0x00000000D83DDE1AL, 0x00000000D83DDE17L, 0x00000000D83DDE19L, 0x00000000D83DDE1CL, 0x00000000D83DDE1DL, 0x00000000D83DDE1BL,\r\n\t\t\t0x00000000D83DDE33L, 0x00000000D83DDE01L, 0x00000000D83DDE14L, 0x00000000D83DDE0CL, 0x00000000D83DDE12L, 0x00000000D83DDE1EL, 0x00000000D83DDE23L,\r\n\t\t\t0x00000000D83DDE22L, 0x00000000D83DDE02L, 0x00000000D83DDE2DL, 0x00000000D83DDE2AL, 0x00000000D83DDE25L, 0x00000000D83DDE30L, 0x00000000D83DDE05L,\r\n\t\t\t0x00000000D83DDE13L, 0x00000000D83DDE29L, 0x00000000D83DDE2BL, 0x00000000D83DDE28L, 0x00000000D83DDE31L, 0x00000000D83DDE20L, 0x00000000D83DDE21L,\r\n\t\t\t0x00000000D83DDE24L, 0x00000000D83DDE16L, 0x00000000D83DDE06L, 0x00000000D83DDE0BL, 0x00000000D83DDE37L, 0x00000000D83DDE0EL, 0x00000000D83DDE34L,\r\n\t\t\t0x00000000D83DDE35L, 0x00000000D83DDE32L, 0x00000000D83DDE1FL, 0x00000000D83DDE26L, 0x00000000D83DDE27L, 0x00000000D83DDE08L, 0x00000000D83DDC7FL,\r\n\t\t\t0x00000000D83DDE2EL, 0x00000000D83DDE2CL, 0x00000000D83DDE10L, 0x00000000D83DDE15L, 0x00000000D83DDE2FL, 0x00000000D83DDE36L, 0x00000000D83DDE07L,\r\n\t\t\t0x00000000D83DDE0FL, 0x00000000D83DDE11L, 0x00000000D83DDC72L, 0x00000000D83DDC73L, 0x00000000D83DDC6EL, 0x00000000D83DDC77L, 0x00000000D83DDC82L,\r\n\t\t\t0x00000000D83DDC76L, 0x00000000D83DDC66L, 0x00000000D83DDC67L, 0x00000000D83DDC68L, 0x00000000D83DDC69L, 0x00000000D83DDC74L, 0x00000000D83DDC75L,\r\n\t\t\t0x00000000D83DDC71L, 0x00000000D83DDC7CL, 0x00000000D83DDC78L, 0x00000000D83DDE3AL, 0x00000000D83DDE38L, 0x00000000D83DDE3BL, 0x00000000D83DDE3DL,\r\n\t\t\t0x00000000D83DDE3CL, 0x00000000D83DDE40L, 0x00000000D83DDE3FL, 0x00000000D83DDE39L, 0x00000000D83DDE3EL, 0x00000000D83DDC79L, 0x00000000D83DDC7AL,\r\n\t\t\t0x00000000D83DDE48L, 0x00000000D83DDE49L, 0x00000000D83DDE4AL, 0x00000000D83DDC80L, 0x00000000D83DDC7DL, 0x00000000D83DDCA9L, 0x00000000D83DDD25L,\r\n\t\t\t0x0000000000002728L, 0x00000000D83CDF1FL, 0x00000000D83DDCABL, 0x00000000D83DDCA5L, 0x00000000D83DDCA2L, 0x00000000D83DDCA6L, 0x00000000D83DDCA7L,\r\n\t\t\t0x00000000D83DDCA4L, 0x00000000D83DDCA8L, 0x00000000D83DDC42L, 0x00000000D83DDC40L, 0x00000000D83DDC43L, 0x00000000D83DDC45L, 0x00000000D83DDC44L,\r\n\t\t\t0x00000000D83DDC4DL, 0x00000000D83DDC4EL, 0x00000000D83DDC4CL, 0x00000000D83DDC4AL, 0x000000000000270AL, 0x000000000000270CL, 0x00000000D83DDC4BL,\r\n\t\t\t0x000000000000270BL, 0x00000000D83DDC50L, 0x00000000D83DDC46L, 0x00000000D83DDC47L, 0x00000000D83DDC49L, 0x00000000D83DDC48L, 0x00000000D83DDE4CL,\r\n\t\t\t0x00000000D83DDE4FL, 0x000000000000261DL, 0x00000000D83DDC4FL, 0x00000000D83DDCAAL, 0x00000000D83DDEB6L, 0x00000000D83CDFC3L, 0x00000000D83DDC83L,\r\n\t\t\t0x00000000D83DDC6BL, 0x00000000D83DDC6AL, 0x00000000D83DDC6CL, 0x00000000D83DDC6DL, 0x00000000D83DDC8FL, 0x00000000D83DDC91L, 0x00000000D83DDC6FL,\r\n\t\t\t0x00000000D83DDE46L, 0x00000000D83DDE45L, 0x00000000D83DDC81L, 0x00000000D83DDE4BL, 0x00000000D83DDC86L, 0x00000000D83DDC87L, 0x00000000D83DDC85L,\r\n\t\t\t0x00000000D83DDC70L, 0x00000000D83DDE4EL, 0x00000000D83DDE4DL, 0x00000000D83DDE47L, 0x00000000D83CDFA9L, 0x00000000D83DDC51L, 0x00000000D83DDC52L,\r\n\t\t\t0x00000000D83DDC5FL, 0x00000000D83DDC5EL, 0x00000000D83DDC61L, 0x00000000D83DDC60L, 0x00000000D83DDC62L, 0x00000000D83DDC55L, 0x00000000D83DDC54L,\r\n\t\t\t0x00000000D83DDC5AL, 0x00000000D83DDC57L, 0x00000000D83CDFBDL, 0x00000000D83DDC56L, 0x00000000D83DDC58L, 0x00000000D83DDC59L, 0x00000000D83DDCBCL,\r\n\t\t\t0x00000000D83DDC5CL, 0x00000000D83DDC5DL, 0x00000000D83DDC5BL, 0x00000000D83DDC53L, 0x00000000D83CDF80L, 0x00000000D83CDF02L, 0x00000000D83DDC84L,\r\n\t\t\t0x00000000D83DDC9BL, 0x00000000D83DDC99L, 0x00000000D83DDC9CL, 0x00000000D83DDC9AL, 0x0000000000002764L, 0x00000000D83DDC94L, 0x00000000D83DDC97L,\r\n\t\t\t0x00000000D83DDC93L, 0x00000000D83DDC95L, 0x00000000D83DDC96L, 0x00000000D83DDC9EL, 0x00000000D83DDC98L, 0x00000000D83DDC8CL, 0x00000000D83DDC8BL,\r\n\t\t\t0x00000000D83DDC8DL, 0x00000000D83DDC8EL, 0x00000000D83DDC64L, 0x00000000D83DDC65L, 0x00000000D83DDCACL, 0x00000000D83DDC63L, 0x00000000D83DDCADL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83DDC36L, 0x00000000D83DDC3AL, 0x00000000D83DDC31L, 0x00000000D83DDC2DL, 0x00000000D83DDC39L, 0x00000000D83DDC30L, 0x00000000D83DDC38L, 0x00000000D83DDC2FL,\r\n\t\t\t0x00000000D83DDC28L, 0x00000000D83DDC3BL, 0x00000000D83DDC37L, 0x00000000D83DDC3DL, 0x00000000D83DDC2EL, 0x00000000D83DDC17L, 0x00000000D83DDC35L,\r\n\t\t\t0x00000000D83DDC12L, 0x00000000D83DDC34L, 0x00000000D83DDC11L, 0x00000000D83DDC18L, 0x00000000D83DDC3CL, 0x00000000D83DDC27L, 0x00000000D83DDC26L,\r\n\t\t\t0x00000000D83DDC24L, 0x00000000D83DDC25L, 0x00000000D83DDC23L, 0x00000000D83DDC14L, 0x00000000D83DDC0DL, 0x00000000D83DDC22L, 0x00000000D83DDC1BL,\r\n\t\t\t0x00000000D83DDC1DL, 0x00000000D83DDC1CL, 0x00000000D83DDC1EL, 0x00000000D83DDC0CL, 0x00000000D83DDC19L, 0x00000000D83DDC1AL, 0x00000000D83DDC20L,\r\n\t\t\t0x00000000D83DDC1FL, 0x00000000D83DDC2CL, 0x00000000D83DDC33L, 0x00000000D83DDC0BL, 0x00000000D83DDC04L, 0x00000000D83DDC0FL, 0x00000000D83DDC00L,\r\n\t\t\t0x00000000D83DDC03L, 0x00000000D83DDC05L, 0x00000000D83DDC07L, 0x00000000D83DDC09L, 0x00000000D83DDC0EL, 0x00000000D83DDC10L, 0x00000000D83DDC13L,\r\n\t\t\t0x00000000D83DDC15L, 0x00000000D83DDC16L, 0x00000000D83DDC01L, 0x00000000D83DDC02L, 0x00000000D83DDC32L, 0x00000000D83DDC21L, 0x00000000D83DDC0AL,\r\n\t\t\t0x00000000D83DDC2BL, 0x00000000D83DDC2AL, 0x00000000D83DDC06L, 0x00000000D83DDC08L, 0x00000000D83DDC29L, 0x00000000D83DDC3EL, 0x00000000D83DDC90L,\r\n\t\t\t0x00000000D83CDF38L, 0x00000000D83CDF37L, 0x00000000D83CDF40L, 0x00000000D83CDF39L, 0x00000000D83CDF3BL, 0x00000000D83CDF3AL, 0x00000000D83CDF41L,\r\n\t\t\t0x00000000D83CDF43L, 0x00000000D83CDF42L, 0x00000000D83CDF3FL, 0x00000000D83CDF3EL, 0x00000000D83CDF44L, 0x00000000D83CDF35L, 0x00000000D83CDF34L,\r\n\t\t\t0x00000000D83CDF32L, 0x00000000D83CDF33L, 0x00000000D83CDF30L, 0x00000000D83CDF31L, 0x00000000D83CDF3CL, 0x00000000D83CDF10L, 0x00000000D83CDF1EL,\r\n\t\t\t0x00000000D83CDF1DL, 0x00000000D83CDF1AL, 0x00000000D83CDF11L, 0x00000000D83CDF12L, 0x00000000D83CDF13L, 0x00000000D83CDF14L, 0x00000000D83CDF15L,\r\n\t\t\t0x00000000D83CDF16L, 0x00000000D83CDF17L, 0x00000000D83CDF18L, 0x00000000D83CDF1CL, 0x00000000D83CDF1BL, 0x00000000D83CDF19L, 0x00000000D83CDF0DL,\r\n\t\t\t0x00000000D83CDF0EL, 0x00000000D83CDF0FL, 0x00000000D83CDF0BL, 0x00000000D83CDF0CL, 0x00000000D83CDF20L, 0x0000000000002B50L, 0x0000000000002600L,\r\n\t\t\t0x00000000000026C5L, 0x0000000000002601L, 0x00000000000026A1L, 0x0000000000002614L, 0x0000000000002744L, 0x00000000000026C4L, 0x00000000D83CDF00L,\r\n\t\t\t0x00000000D83CDF01L, 0x00000000D83CDF08L, 0x00000000D83CDF0AL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83CDF8DL, 0x00000000D83DDC9DL, 0x00000000D83CDF8EL, 0x00000000D83CDF92L, 0x00000000D83CDF93L, 0x00000000D83CDF8FL, 0x00000000D83CDF86L, 0x00000000D83CDF87L,\r\n\t\t\t0x00000000D83CDF90L, 0x00000000D83CDF91L, 0x00000000D83CDF83L, 0x00000000D83DDC7BL, 0x00000000D83CDF85L, 0x00000000D83CDF84L, 0x00000000D83CDF81L,\r\n\t\t\t0x00000000D83CDF8BL, 0x00000000D83CDF89L, 0x00000000D83CDF8AL, 0x00000000D83CDF88L, 0x00000000D83CDF8CL, 0x00000000D83DDD2EL, 0x00000000D83CDFA5L,\r\n\t\t\t0x00000000D83DDCF7L, 0x00000000D83DDCF9L, 0x00000000D83DDCFCL, 0x00000000D83DDCBFL, 0x00000000D83DDCC0L, 0x00000000D83DDCBDL, 0x00000000D83DDCBEL,\r\n\t\t\t0x00000000D83DDCBBL, 0x00000000D83DDCF1L, 0x000000000000260EL, 0x00000000D83DDCDEL, 0x00000000D83DDCDFL, 0x00000000D83DDCE0L, 0x00000000D83DDCE1L,\r\n\t\t\t0x00000000D83DDCFAL, 0x00000000D83DDCFBL, 0x00000000D83DDD0AL, 0x00000000D83DDD09L, 0x00000000D83DDD08L, 0x00000000D83DDD07L, 0x00000000D83DDD14L,\r\n\t\t\t0x00000000D83DDD14L, 0x00000000D83DDCE2L, 0x00000000D83DDCE3L, 0x00000000000023F3L, 0x000000000000231BL, 0x00000000000023F0L, 0x000000000000231AL,\r\n\t\t\t0x00000000D83DDD13L, 0x00000000D83DDD12L, 0x00000000D83DDD0FL, 0x00000000D83DDD10L, 0x00000000D83DDD11L, 0x00000000D83DDD0EL, 0x00000000D83DDCA1L,\r\n\t\t\t0x00000000D83DDD26L, 0x00000000D83DDD06L, 0x00000000D83DDD05L, 0x00000000D83DDD0CL, 0x00000000D83DDD0BL, 0x00000000D83DDD0DL, 0x00000000D83DDEC0L,\r\n\t\t\t0x00000000D83DDEBFL, 0x00000000D83DDEBDL, 0x00000000D83DDD27L, 0x00000000D83DDD29L, 0x00000000D83DDD28L, 0x00000000D83DDEAAL, 0x00000000D83DDEACL,\r\n\t\t\t0x00000000D83DDCA3L, 0x00000000D83DDD2BL, 0x00000000D83DDD2AL, 0x00000000D83DDC8AL, 0x00000000D83DDC89L, 0x00000000D83DDCB0L, 0x00000000D83DDCB4L,\r\n\t\t\t0x00000000D83DDCB5L, 0x00000000D83DDCB7L, 0x00000000D83DDCB6L, 0x00000000D83DDCB3L, 0x00000000D83DDCB8L, 0x00000000D83DDCF2L, 0x00000000D83DDCE7L,\r\n\t\t\t0x00000000D83DDCE5L, 0x00000000D83DDCE4L, 0x0000000000002709L, 0x00000000D83DDCE9L, 0x00000000D83DDCE8L, 0x00000000D83DDCEFL, 0x00000000D83DDCEBL,\r\n\t\t\t0x00000000D83DDCEAL, 0x00000000D83DDCECL, 0x00000000D83DDCEDL, 0x00000000D83DDCEEL, 0x00000000D83DDCE6L, 0x00000000D83DDCDDL, 0x00000000D83DDCC4L,\r\n\t\t\t0x00000000D83DDCC3L, 0x00000000D83DDCD1L, 0x00000000D83DDCCAL, 0x00000000D83DDCC8L, 0x00000000D83DDCC9L, 0x00000000D83DDCDCL, 0x00000000D83DDCCBL,\r\n\t\t\t0x00000000D83DDCC5L, 0x00000000D83DDCC6L, 0x00000000D83DDCC7L, 0x00000000D83DDCC1L, 0x00000000D83DDCC2L, 0x0000000000002702L, 0x00000000D83DDCCCL,\r\n\t\t\t0x00000000D83DDCCEL, 0x0000000000002712L, 0x000000000000270FL, 0x00000000D83DDCCFL, 0x00000000D83DDCD0L, 0x00000000D83DDCD5L, 0x00000000D83DDCD7L,\r\n\t\t\t0x00000000D83DDCD8L, 0x00000000D83DDCD9L, 0x00000000D83DDCD3L, 0x00000000D83DDCD4L, 0x00000000D83DDCD2L, 0x00000000D83DDCDAL, 0x00000000D83DDCD6L,\r\n\t\t\t0x00000000D83DDD16L, 0x00000000D83DDCDBL, 0x00000000D83DDD2CL, 0x00000000D83DDD2DL, 0x00000000D83DDCF0L, 0x00000000D83CDFA8L, 0x00000000D83CDFACL,\r\n\t\t\t0x00000000D83CDFA4L, 0x00000000D83CDFA7L, 0x00000000D83CDFBCL, 0x00000000D83CDFB5L, 0x00000000D83CDFB6L, 0x00000000D83CDFB9L, 0x00000000D83CDFBBL,\r\n\t\t\t0x00000000D83CDFBAL, 0x00000000D83CDFB7L, 0x00000000D83CDFB8L, 0x00000000D83DDC7EL, 0x00000000D83CDFAEL, 0x00000000D83CDCCFL, 0x00000000D83CDFB4L,\r\n\t\t\t0x00000000D83CDC04L, 0x00000000D83CDFB2L, 0x00000000D83CDFAFL, 0x00000000D83CDFC8L, 0x00000000D83CDFC0L, 0x00000000000026BDL, 0x00000000000026BEL,\r\n\t\t\t0x00000000D83CDFBEL, 0x00000000D83CDFB1L, 0x00000000D83CDFC9L, 0x00000000D83CDFB3L, 0x00000000000026F3L, 0x00000000D83DDEB5L, 0x00000000D83DDEB4L,\r\n\t\t\t0x00000000D83CDFC1L, 0x00000000D83CDFC7L, 0x00000000D83CDFC6L, 0x00000000D83CDFBFL, 0x00000000D83CDFC2L, 0x00000000D83CDFCAL, 0x00000000D83CDFC4L,\r\n\t\t\t0x00000000D83CDFA3L, 0x0000000000002615L, 0x00000000D83CDF75L, 0x00000000D83CDF76L, 0x00000000D83CDF7CL, 0x00000000D83CDF7AL, 0x00000000D83CDF7BL,\r\n\t\t\t0x00000000D83CDF78L, 0x00000000D83CDF79L, 0x00000000D83CDF77L, 0x00000000D83CDF74L, 0x00000000D83CDF55L, 0x00000000D83CDF54L, 0x00000000D83CDF5FL,\r\n\t\t\t0x00000000D83CDF57L, 0x00000000D83CDF56L, 0x00000000D83CDF5DL, 0x00000000D83CDF5BL, 0x00000000D83CDF64L, 0x00000000D83CDF71L, 0x00000000D83CDF63L,\r\n\t\t\t0x00000000D83CDF65L, 0x00000000D83CDF59L, 0x00000000D83CDF58L, 0x00000000D83CDF5AL, 0x00000000D83CDF5CL, 0x00000000D83CDF72L, 0x00000000D83CDF62L,\r\n\t\t\t0x00000000D83CDF61L, 0x00000000D83CDF73L, 0x00000000D83CDF5EL, 0x00000000D83CDF69L, 0x00000000D83CDF6EL, 0x00000000D83CDF66L, 0x00000000D83CDF68L,\r\n\t\t\t0x00000000D83CDF67L, 0x00000000D83CDF82L, 0x00000000D83CDF70L, 0x00000000D83CDF6AL, 0x00000000D83CDF6BL, 0x00000000D83CDF6CL, 0x00000000D83CDF6DL,\r\n\t\t\t0x00000000D83CDF6FL, 0x00000000D83CDF4EL, 0x00000000D83CDF4FL, 0x00000000D83CDF4AL, 0x00000000D83CDF4BL, 0x00000000D83CDF52L, 0x00000000D83CDF47L,\r\n\t\t\t0x00000000D83CDF49L, 0x00000000D83CDF53L, 0x00000000D83CDF51L, 0x00000000D83CDF48L, 0x00000000D83CDF4CL, 0x00000000D83CDF50L, 0x00000000D83CDF4DL,\r\n\t\t\t0x00000000D83CDF60L, 0x00000000D83CDF46L, 0x00000000D83CDF45L, 0x00000000D83CDF3DL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83CDFE0L, 0x00000000D83CDFE1L, 0x00000000D83CDFEBL, 0x00000000D83CDFE2L, 0x00000000D83CDFE3L, 0x00000000D83CDFE5L, 0x00000000D83CDFE6L, 0x00000000D83CDFEAL,\r\n\t\t\t0x00000000D83CDFE9L, 0x00000000D83CDFE8L, 0x00000000D83DDC92L, 0x00000000000026EAL, 0x00000000D83CDFECL, 0x00000000D83CDFE4L, 0x00000000D83CDF07L,\r\n\t\t\t0x00000000D83CDF06L, 0x00000000D83CDFEFL, 0x00000000D83CDFF0L, 0x00000000000026FAL, 0x00000000D83CDFEDL, 0x00000000D83DDDFCL, 0x00000000D83DDDFEL,\r\n\t\t\t0x00000000D83DDDFBL, 0x00000000D83CDF04L, 0x00000000D83CDF05L, 0x00000000D83CDF03L, 0x00000000D83DDDFDL, 0x00000000D83CDF09L, 0x00000000D83CDFA0L,\r\n\t\t\t0x00000000D83CDFA1L, 0x00000000000026F2L, 0x00000000D83CDFA2L, 0x00000000D83DDEA2L, 0x00000000000026F5L, 0x00000000D83DDEA4L, 0x00000000D83DDEA3L,\r\n\t\t\t0x0000000000002693L, 0x00000000D83DDE80L, 0x0000000000002708L, 0x00000000D83DDCBAL, 0x00000000D83DDE81L, 0x00000000D83DDE82L, 0x00000000D83DDE8AL,\r\n\t\t\t0x00000000D83DDE89L, 0x00000000D83DDE9EL, 0x00000000D83DDE86L, 0x00000000D83DDE84L, 0x00000000D83DDE85L, 0x00000000D83DDE88L, 0x00000000D83DDE87L,\r\n\t\t\t0x00000000D83DDE9DL, 0x00000000D83DDE8BL, 0x00000000D83DDE83L, 0x00000000D83DDE8EL, 0x00000000D83DDE8CL, 0x00000000D83DDE8DL, 0x00000000D83DDE99L,\r\n\t\t\t0x00000000D83DDE98L, 0x00000000D83DDE97L, 0x00000000D83DDE95L, 0x00000000D83DDE96L, 0x00000000D83DDE9BL, 0x00000000D83DDE9AL, 0x00000000D83DDEA8L,\r\n\t\t\t0x00000000D83DDE93L, 0x00000000D83DDE94L, 0x00000000D83DDE92L, 0x00000000D83DDE91L, 0x00000000D83DDE90L, 0x00000000D83DDEB2L, 0x00000000D83DDEA1L,\r\n\t\t\t0x00000000D83DDE9FL, 0x00000000D83DDEA0L, 0x00000000D83DDE9CL, 0x00000000D83DDC88L, 0x00000000D83DDE8FL, 0x00000000D83CDFABL, 0x00000000D83DDEA6L,\r\n\t\t\t0x00000000D83DDEA5L, 0x00000000000026A0L, 0x00000000D83DDEA7L, 0x00000000D83DDD30L, 0x00000000000026FDL, 0x00000000D83CDFEEL, 0x00000000D83CDFB0L,\r\n\t\t\t0x0000000000002668L, 0x00000000D83DDDFFL, 0x00000000D83CDFAAL, 0x00000000D83CDFADL, 0x00000000D83DDCCDL, 0x00000000D83DDEA9L, 0xD83CDDEFD83CDDF5L,\r\n\t\t\t0xD83CDDF0D83CDDF7L, 0xD83CDDE9D83CDDEAL, 0xD83CDDE8D83CDDF3L, 0xD83CDDFAD83CDDF8L, 0xD83CDDEBD83CDDF7L, 0xD83CDDEAD83CDDF8L, 0xD83CDDEED83CDDF9L,\r\n\t\t\t0xD83CDDF7D83CDDFAL, 0xD83CDDECD83CDDE7L},\r\n\t\t\tnew ulong[]{\r\n            0x00000000003120E3L, 0x00000000003220E3L, 0x00000000003320E3L, 0x00000000003420E3L, 0x00000000003520E3L, 0x00000000003620E3L, 0x00000000003720E3L, 0x00000000003820E3L,\r\n\t\t\t0x00000000003920E3L, 0x00000000003020E3L, 0x00000000D83DDD1FL, 0x00000000D83DDD22L, 0x00000000002320E3L, 0x00000000D83DDD23L, 0x0000000000002B06L,\r\n\t\t\t0x0000000000002B07L, 0x0000000000002B05L, 0x00000000000027A1L, 0x00000000D83DDD20L, 0x00000000D83DDD21L, 0x00000000D83DDD24L, 0x0000000000002197L,\r\n\t\t\t0x0000000000002196L, 0x0000000000002198L, 0x0000000000002199L, 0x0000000000002194L, 0x0000000000002195L, 0x00000000D83DDD04L, 0x00000000000025C0L,\r\n\t\t\t0x00000000000025B6L, 0x00000000D83DDD3CL, 0x00000000D83DDD3DL, 0x00000000000021A9L, 0x00000000000021AAL, 0x0000000000002139L, 0x00000000000023EAL,\r\n\t\t\t0x00000000000023E9L, 0x00000000000023EBL, 0x00000000000023ECL, 0x0000000000002935L, 0x0000000000002934L, 0x00000000D83CDD97L, 0x00000000D83DDD00L,\r\n\t\t\t0x00000000D83DDD01L, 0x00000000D83DDD02L, 0x00000000D83CDD95L, 0x00000000D83CDD99L, 0x00000000D83CDD92L, 0x00000000D83CDD93L, 0x00000000D83CDD96L,\r\n\t\t\t0x00000000D83DDCF6L, 0x00000000D83CDFA6L, 0x00000000D83CDE01L, 0x00000000D83CDE2FL, 0x00000000D83CDE33L, 0x00000000D83CDE35L, 0x00000000D83CDE32L,\r\n\t\t\t0x00000000D83CDE34L, 0x00000000D83CDE32L, 0x00000000D83CDE50L, 0x00000000D83CDE39L, 0x00000000D83CDE3AL, 0x00000000D83CDE36L, 0x00000000D83CDE1AL,\r\n\t\t\t0x00000000D83DDEBBL, 0x00000000D83DDEB9L, 0x00000000D83DDEBAL, 0x00000000D83DDEBCL, 0x00000000D83DDEBEL, 0x00000000D83DDEB0L, 0x00000000D83DDEAEL,\r\n\t\t\t0x00000000D83CDD7FL, 0x000000000000267FL, 0x00000000D83DDEADL, 0x00000000D83CDE37L, 0x00000000D83CDE38L, 0x00000000D83CDE02L, 0x00000000000024C2L,\r\n\t\t\t0x00000000D83CDE51L, 0x0000000000003299L, 0x0000000000003297L, 0x00000000D83CDD91L, 0x00000000D83CDD98L, 0x00000000D83CDD94L, 0x00000000D83DDEABL,\r\n\t\t\t0x00000000D83DDD1EL, 0x00000000D83DDCF5L, 0x00000000D83DDEAFL, 0x00000000D83DDEB1L, 0x00000000D83DDEB3L, 0x00000000D83DDEB7L, 0x00000000D83DDEB8L,\r\n\t\t\t0x00000000000026D4L, 0x0000000000002733L, 0x0000000000002747L, 0x000000000000274EL, 0x0000000000002705L, 0x0000000000002734L, 0x00000000D83DDC9FL,\r\n\t\t\t0x00000000D83CDD9AL, 0x00000000D83DDCF3L, 0x00000000D83DDCF4L, 0x00000000D83CDD70L, 0x00000000D83CDD71L, 0x00000000D83CDD8EL, 0x00000000D83CDD7EL,\r\n\t\t\t0x00000000D83DDCA0L, 0x00000000000027BFL, 0x000000000000267BL, 0x0000000000002648L, 0x0000000000002649L, 0x000000000000264AL, 0x000000000000264BL,\r\n\t\t\t0x000000000000264CL, 0x000000000000264DL, 0x000000000000264EL, 0x000000000000264FL, 0x0000000000002650L, 0x0000000000002651L, 0x0000000000002652L,\r\n\t\t\t0x0000000000002653L, 0x00000000000026CEL, 0x00000000D83DDD2FL, 0x00000000D83CDFE7L, 0x00000000D83DDCB9L, 0x00000000D83DDCB2L, 0x00000000D83DDCB1L,\r\n\t\t\t0x00000000000000A9L, 0x00000000000000AEL, 0x0000000000002122L, 0x000000000000303DL, 0x0000000000003030L, 0x00000000D83DDD1DL, 0x00000000D83DDD1AL,\r\n\t\t\t0x00000000D83DDD19L, 0x00000000D83DDD1BL, 0x00000000D83DDD1CL, 0x000000000000274CL, 0x0000000000002B55L, 0x0000000000002757L, 0x0000000000002753L,\r\n\t\t\t0x0000000000002755L, 0x0000000000002754L, 0x00000000D83DDD03L, 0x00000000D83DDD5BL, 0x00000000D83DDD67L, 0x00000000D83DDD50L, 0x00000000D83DDD5CL,\r\n\t\t\t0x00000000D83DDD51L, 0x00000000D83DDD5DL, 0x00000000D83DDD52L, 0x00000000D83DDD5EL, 0x00000000D83DDD53L, 0x00000000D83DDD5FL, 0x00000000D83DDD54L,\r\n\t\t\t0x00000000D83DDD60L, 0x00000000D83DDD55L, 0x00000000D83DDD56L, 0x00000000D83DDD57L, 0x00000000D83DDD58L, 0x00000000D83DDD59L, 0x00000000D83DDD5AL,\r\n\t\t\t0x00000000D83DDD61L, 0x00000000D83DDD62L, 0x00000000D83DDD63L, 0x00000000D83DDD64L, 0x00000000D83DDD65L, 0x00000000D83DDD66L, 0x0000000000002716L,\r\n\t\t\t0x0000000000002795L, 0x0000000000002796L, 0x0000000000002797L, 0x0000000000002660L, 0x0000000000002665L, 0x0000000000002663L, 0x0000000000002666L,\r\n\t\t\t0x00000000D83DDCAEL, 0x00000000D83DDCAFL, 0x0000000000002714L, 0x0000000000002611L, 0x00000000D83DDD18L, 0x00000000D83DDD17L, 0x00000000000027B0L,\r\n\t\t\t0x00000000D83DDD31L, 0x00000000D83DDD32L, 0x00000000D83DDD33L, 0x00000000000025FCL, 0x00000000000025FBL, 0x00000000000025FEL, 0x00000000000025FDL,\r\n\t\t\t0x00000000000025AAL, 0x00000000000025ABL, 0x00000000D83DDD3AL, 0x0000000000002B1CL, 0x0000000000002B1BL, 0x00000000000026ABL, 0x00000000000026AAL,\r\n\t\t\t0x00000000D83DDD34L, 0x00000000D83DDD35L, 0x00000000D83DDD3BL, 0x00000000D83DDD36L, 0x00000000D83DDD37L, 0x00000000D83DDD38L, 0x00000000D83DDD39L}};\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/IHighlightable.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Controls\r\n{\r\n    public interface IHighlightable\r\n    {\r\n        bool HighlightItem { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LazyItemsControl.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing Telegram.Controls.Extensions;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    public class LazyItemsControl : ItemsControl, ICompression\r\n    {\r\n        private const string VerticalCompressionGroup = \"VerticalCompression\";\r\n        private const string ScrollStatesGroup = \"ScrollStates\";\r\n\r\n        private const string CompressionTopState = \"CompressionTop\";\r\n        private const string CompressionBottomState = \"CompressionBottom\";\r\n        private const string ScrollingState = \"Scrolling\";\r\n\r\n        private ScrollViewer _scrollViewer;\r\n\r\n        public LazyItemsControl()\r\n        {\r\n            Loaded += LazyItemsControl_Loaded;\r\n        }\r\n\r\n        private void LazyItemsControl_Loaded(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= LazyItemsControl_Loaded;\r\n\r\n            _scrollViewer = this.FindChildOfType<ScrollViewer>();\r\n\r\n            if (_scrollViewer != null)\r\n            {\r\n                var element = VisualTreeHelper.GetChild(_scrollViewer, 0) as FrameworkElement;\r\n                if (element != null)\r\n                {\r\n                    var verticalGroup = FindVisualState(element, VerticalCompressionGroup);\r\n                    var scrollStatesGroup = FindVisualState(element, ScrollStatesGroup);\r\n\r\n                    if (verticalGroup != null)\r\n                        verticalGroup.CurrentStateChanging += VerticalGroup_CurrentStateChanging;\r\n\r\n                    if (scrollStatesGroup != null)\r\n                        scrollStatesGroup.CurrentStateChanging += ScrollStateGroup_CurrentStateChanging;\r\n                }\r\n\r\n                var binding = new Binding(\"VerticalOffset\") { Source = _scrollViewer };\r\n                SetBinding(VerticalOffsetProperty, binding);\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty VerticalOffsetProperty = DependencyProperty.Register(\r\n            \"VerticalOffset\", typeof (double), typeof (LazyItemsControl), new PropertyMetadata(default(double), OnVerticalOffsetChanged));\r\n\r\n        public double VerticalOffset\r\n        {\r\n            get { return (double) GetValue(VerticalOffsetProperty); }\r\n            set { SetValue(VerticalOffsetProperty, value); }\r\n        }\r\n\r\n        private static void OnVerticalOffsetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var lazyItemsControl = (LazyItemsControl)d;\r\n\r\n            lazyItemsControl.OnListenerChanged(d, e);\r\n        }\r\n\r\n        private double _closeToEndPercent = 0.7;\r\n\r\n        public double CloseToEndPercent\r\n        {\r\n            get { return _closeToEndPercent; }\r\n            set { _closeToEndPercent = value; }\r\n        }\r\n\r\n        private double _prevVerticalOffset;\r\n\r\n        public event EventHandler<EventArgs> CloseToEnd;\r\n\r\n        protected virtual void RaiseCloseToEnd()\r\n        {\r\n            var handler = CloseToEnd;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        private void OnListenerChanged(object sender, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            if (_prevVerticalOffset >= _scrollViewer.VerticalOffset) return;\r\n            if (_scrollViewer.VerticalOffset == 0.0 && _scrollViewer.ScrollableHeight == 0.0) return;\r\n\r\n            _prevVerticalOffset = _scrollViewer.VerticalOffset;\r\n            var atBottom = _scrollViewer.VerticalOffset >= _scrollViewer.ScrollableHeight * CloseToEndPercent;\r\n\r\n            if (atBottom)\r\n            {\r\n                RaiseCloseToEnd();\r\n            }\r\n        }\r\n\r\n        private static VisualStateGroup FindVisualState(FrameworkElement element, string stateName)\r\n        {\r\n            if (element == null)\r\n                return null;\r\n\r\n            var groups = VisualStateManager.GetVisualStateGroups(element);\r\n            return groups.Cast<VisualStateGroup>().FirstOrDefault(group => group.Name == stateName);\r\n        }\r\n        \r\n        public event EventHandler<CompressionEventArgs> Compression;\r\n\r\n        protected virtual void RaiseCompression(CompressionEventArgs e)\r\n        {\r\n            var handler = Compression;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void VerticalGroup_CurrentStateChanging(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            if (e.NewState.Name == CompressionTopState)\r\n            {\r\n                RaiseCompression(new CompressionEventArgs(CompressionType.Top));\r\n            }\r\n            if (e.NewState.Name == CompressionBottomState)\r\n            {\r\n                RaiseCompression(new CompressionEventArgs(CompressionType.Bottom));\r\n            }\r\n        }\r\n\r\n        private void ScrollStateGroup_CurrentStateChanging(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            IsScrolling = (e.NewState.Name == ScrollingState);\r\n        }\r\n\r\n        public static readonly DependencyProperty IsScrollingProperty = DependencyProperty.Register(\r\n            \"IsScrolling\",\r\n            typeof(bool),\r\n            typeof(LazyItemsControl),\r\n            new PropertyMetadata(false));\r\n\r\n        public bool IsScrolling\r\n        {\r\n            get { return (bool)GetValue(IsScrollingProperty); }\r\n            set { SetValue(IsScrollingProperty, value); }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LazyListBox.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing DanielVaughan.WindowsPhone7Unleashed;\r\nusing Telegram.Controls.Extensions;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    public enum CompressionType { Top, Bottom, Left, Right };\r\n\r\n    public interface ICompression\r\n    {\r\n        event EventHandler<CompressionEventArgs> Compression;\r\n    }\r\n\r\n    public class LazyListBox : ListBox, ICompression\r\n    {\r\n        public static readonly DependencyProperty KeepScrollingPositionProperty = DependencyProperty.Register(\r\n            \"KeepScrollingPosition\", typeof (bool), typeof (LazyListBox), new PropertyMetadata(default(bool)));\r\n\r\n        public bool KeepScrollingPosition\r\n        {\r\n            get { return (bool) GetValue(KeepScrollingPositionProperty); }\r\n            set { SetValue(KeepScrollingPositionProperty, value); }\r\n        }\r\n\r\n        public bool SuppressVerticalOffsetListener { get; set; }\r\n\r\n        public static readonly DependencyProperty IsHorizontalProperty = DependencyProperty.Register(\r\n            \"IsHorizontal\", typeof (bool), typeof (LazyListBox), new PropertyMetadata(default(bool), OnIsHorizontalChanged));\r\n\r\n        private static void OnIsHorizontalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var listBox = d as LazyListBox;\r\n            if (listBox != null)\r\n            {\r\n                var isHorizontal = (bool) e.NewValue;\r\n                if (isHorizontal)\r\n                {\r\n                    listBox.ToHorizontalOrientation();\r\n                }\r\n                else\r\n                {\r\n                    listBox.ToVerticalOrientation();\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsHorizontal\r\n        {\r\n            get { return (bool) GetValue(IsHorizontalProperty); }\r\n            set { SetValue(IsHorizontalProperty, value); }\r\n        }\r\n\r\n        public void ToHorizontalOrientation()\r\n        {\r\n            if (_stackPanel != null)\r\n            {\r\n                _stackPanel.Orientation = Orientation.Horizontal;\r\n            }\r\n\r\n            if (_scrollViewer != null)\r\n            {\r\n                _scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;\r\n                _scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;\r\n            }\r\n        }\r\n\r\n        public void ToVerticalOrientation()\r\n        {\r\n            if (_stackPanel != null)\r\n            {\r\n                _stackPanel.Orientation = Orientation.Vertical;\r\n            }\r\n\r\n            if (_scrollViewer != null)\r\n            {\r\n                _scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;\r\n                _scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;\r\n            }\r\n        }\r\n\r\n        private const string VerticalCompressionGroup = \"VerticalCompression\";\r\n        private const string HorizontalCompressionGroup = \"HorizontalCompression\";\r\n        private const string ScrollStatesGroup = \"ScrollStates\";\r\n        private const string NoHorizontalCompressionState = \"NoHorizontalCompression\";\r\n        private const string CompressionRightState = \"CompressionRight\";\r\n        private const string CompressionLeftState = \"CompressionLeft\";\r\n        private const string NoVerticalCompressionState = \"NoVerticalCompression\";\r\n        private const string CompressionTopState = \"CompressionTop\";\r\n        private const string CompressionBottomState = \"CompressionBottom\";\r\n        private const string ScrollingState = \"Scrolling\";\r\n\r\n        public double PanelVerticalOffset { get; set; }\r\n\r\n        public double PanelViewPortHeight { get; set; }\r\n\r\n        private VirtualizingStackPanel _stackPanel;\r\n\r\n        private ScrollViewer _scrollViewer;\r\n\r\n        public ScrollViewer Scroll\r\n        {\r\n            get { return _scrollViewer; }\r\n        }\r\n\r\n        protected bool IsBouncy;\r\n\r\n        private bool _isInitialized;\r\n\r\n        public LazyListBox()\r\n        {\r\n            Loaded += ListBox_Loaded;\r\n            //Unloaded += ListBox_Unloaded;\r\n        }\r\n\r\n        //~LazyListBox()\r\n        //{\r\n            \r\n        //}\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n        }\r\n\r\n        public static readonly DependencyProperty VerticalOffsetProperty = DependencyProperty.Register(\r\n            \"VerticalOffset\", typeof(double), typeof(LazyListBox), new PropertyMetadata(default(double), OnVerticalOffsetChanged));\r\n\r\n        private static void OnVerticalOffsetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var lazyListBox = d as LazyListBox;\r\n            if (lazyListBox != null)\r\n            {\r\n                lazyListBox.OnListenerChanged(lazyListBox, new BindingChangedEventArgs(e));\r\n            }\r\n        }\r\n\r\n        public double VerticalOffset\r\n        {\r\n            get { return (double) GetValue(VerticalOffsetProperty); }\r\n            set { SetValue(VerticalOffsetProperty, value); }\r\n        }\r\n\r\n        private void OnListenerChanged(object sender, BindingChangedEventArgs e)\r\n        {\r\n            if (_prevVerticalOffset >= _scrollViewer.VerticalOffset) return;\r\n            if (_scrollViewer.VerticalOffset == 0.0 && _scrollViewer.ScrollableHeight == 0.0) return;\r\n\r\n            _prevVerticalOffset = _scrollViewer.VerticalOffset;\r\n            var atBottom = _scrollViewer.VerticalOffset >= _scrollViewer.ScrollableHeight * CloseToEndPercent;\r\n\r\n            if (atBottom)\r\n            {\r\n                RaiseCloseToEnd();\r\n            }\r\n        }\r\n\r\n        public void StopScrolling()\r\n        {\r\n            //stop scrolling\r\n\r\n\r\n            var offset = _stackPanel.VerticalOffset;\r\n\r\n            if (_scrollViewer != null)\r\n            {\r\n                _scrollViewer.InvalidateScrollInfo();\r\n                _scrollViewer.ScrollToVerticalOffset(offset);\r\n                VisualStateManager.GoToState(_scrollViewer, \"NotScrolling\", true);\r\n            }\r\n        }\r\n\r\n        public void ScrollToBeginning()\r\n        {\r\n            _scrollViewer.ScrollToBeginnig(new Duration(TimeSpan.FromSeconds(0.3)));\r\n        }\r\n\r\n        private void ListBox_Loaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_isInitialized)\r\n                return;\r\n \r\n            _isInitialized = true;\r\n            \r\n            AddHandler(ManipulationCompletedEvent, new EventHandler<ManipulationCompletedEventArgs>(ListBox_ManipulationCompleted), true);\r\n\r\n            _scrollViewer = this.FindChildOfType<ScrollViewer>();\r\n \r\n            if (_scrollViewer != null)\r\n            {\r\n                _stackPanel = _scrollViewer.FindChildOfType<VirtualizingStackPanel>();\r\n\r\n                if (IsHorizontal)\r\n                {\r\n                    ToHorizontalOrientation();\r\n                }\r\n                else\r\n                {\r\n                    ToVerticalOrientation();\r\n                }\r\n                // Visual States are always on the first child of the control template \r\n                var element = VisualTreeHelper.GetChild(_scrollViewer, 0) as FrameworkElement;\r\n                if (element != null)\r\n                {\r\n                    var verticalGroup = FindVisualState(element, VerticalCompressionGroup);\r\n                    var horizontalGroup = FindVisualState(element, HorizontalCompressionGroup);\r\n                    var scrollStatesGroup = FindVisualState(element, ScrollStatesGroup); \r\n\r\n                    if (verticalGroup != null)\r\n                        verticalGroup.CurrentStateChanging += VerticalGroup_CurrentStateChanging;\r\n                    if (horizontalGroup != null)\r\n                        horizontalGroup.CurrentStateChanging += HorizontalGroup_CurrentStateChanging;\r\n                    if (scrollStatesGroup != null)\r\n                        scrollStatesGroup.CurrentStateChanging += ScrollStateGroup_CurrentStateChanging;\r\n                }\r\n\r\n\r\n                if (!SuppressVerticalOffsetListener)\r\n                {\r\n                    var binding = new Binding(\"VerticalOffset\") { Source = _scrollViewer };\r\n                    SetBinding(VerticalOffsetProperty, binding);\r\n                }\r\n            }\r\n        }\r\n\r\n        private double _closeToEndPercent = 0.7;\r\n\r\n        public double CloseToEndPercent\r\n        {\r\n            get { return _closeToEndPercent; }\r\n            set { _closeToEndPercent = value; }\r\n        }\r\n\r\n        private double _prevVerticalOffset;\r\n\r\n        public event EventHandler<EventArgs> CloseToEnd;\r\n\r\n        protected virtual void RaiseCloseToEnd()\r\n        {\r\n            var handler = CloseToEnd;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        private void ScrollStateGroup_CurrentStateChanging(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            IsScrolling = (e.NewState.Name == ScrollingState);\r\n        }\r\n\r\n        public event EventHandler<ScrollingStateChangedEventArgs> ScrollingStateChanged;\r\n\r\n        protected virtual void RaiseScrollingStateChanged(ScrollingStateChangedEventArgs e)\r\n        {\r\n            var handler = ScrollingStateChanged;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public static readonly DependencyProperty IsScrollingProperty = DependencyProperty.Register(\r\n            \"IsScrolling\",\r\n            typeof(bool),\r\n            typeof(LazyListBox),\r\n            new PropertyMetadata(false, IsScrollingPropertyChanged));\r\n\r\n        public bool IsScrolling\r\n        {\r\n            get { return (bool)GetValue(IsScrollingProperty); }\r\n            set { SetValue(IsScrollingProperty, value); }\r\n        }\r\n\r\n        static void IsScrollingPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var listbox = source as LazyListBox;\r\n            if (listbox == null) return;\r\n\r\n            listbox.RaiseScrollingStateChanged(new ScrollingStateChangedEventArgs((bool) e.OldValue, (bool) e.NewValue));\r\n        }\r\n\r\n        #region Compression\r\n        public event EventHandler<CompressionEventArgs> Compression;\r\n\r\n        protected virtual void RaiseCompression(CompressionEventArgs e)\r\n        {\r\n            var handler = Compression;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void HorizontalGroup_CurrentStateChanging(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            if (e.NewState.Name == CompressionLeftState)\r\n            {\r\n                IsBouncy = true;\r\n                RaiseCompression(new CompressionEventArgs(CompressionType.Left));\r\n            }\r\n\r\n            if (e.NewState.Name == CompressionRightState)\r\n            {\r\n                IsBouncy = true;\r\n                RaiseCompression(new CompressionEventArgs(CompressionType.Right));\r\n            }\r\n            if (e.NewState.Name == NoHorizontalCompressionState)\r\n            {\r\n                IsBouncy = false;\r\n            }\r\n        }\r\n \r\n        private void VerticalGroup_CurrentStateChanging(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            if (e.NewState.Name == CompressionTopState)\r\n            {\r\n                IsBouncy = true;\r\n                RaiseCompression(new CompressionEventArgs(CompressionType.Top));\r\n            }\r\n            if (e.NewState.Name == CompressionBottomState)\r\n            {\r\n                IsBouncy = true;\r\n                RaiseCompression(new CompressionEventArgs(CompressionType.Bottom));\r\n            }\r\n            if (e.NewState.Name == NoVerticalCompressionState)\r\n                IsBouncy = false;\r\n        }\r\n \r\n        private void ListBox_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            if (IsBouncy)\r\n                IsBouncy = false;\r\n        }\r\n \r\n        private static VisualStateGroup FindVisualState(FrameworkElement element, string stateName)\r\n        {\r\n            if (element == null)\r\n                return null;\r\n \r\n            var groups = VisualStateManager.GetVisualStateGroups(element);\r\n            return groups.Cast<VisualStateGroup>().FirstOrDefault(group => group.Name == stateName);\r\n        }\r\n        #endregion\r\n\r\n\r\n        public List<ListBoxItem> GetVisibleItems()\r\n        {\r\n\r\n            var items = new List<ListBoxItem>();\r\n\r\n            //if (_stackPanel == null) return items;\r\n\r\n            //var firstVisibleItem = IsHorizontal ? (int)_stackPanel.HorizontalOffset : (int)_stackPanel.VerticalOffset;\r\n            //var visibleItemCount = IsHorizontal ? (int)_stackPanel.ViewportWidth : (int)_stackPanel.ViewportHeight;\r\n            //for (int index = firstVisibleItem; index < firstVisibleItem + visibleItemCount + 1; index++)\r\n            //{\r\n            //    var item = ItemContainerGenerator.ContainerFromIndex(index) as ListBoxItem;\r\n            //    if (item == null)\r\n            //        continue;\r\n\r\n            //    items.Add(item);\r\n            //}\r\n\r\n            //return items;\r\n\r\n            foreach (var item in Items)\r\n            {\r\n                var listBoxItem = ItemContainerGenerator.ContainerFromItem(item) as ListBoxItem;\r\n                if (IsInView(listBoxItem, this))\r\n                {\r\n                    items.Add(listBoxItem);\r\n                }\r\n                else if (items.Any())\r\n                {\r\n                    break;\r\n                }\r\n            }\r\n\r\n            return items;\r\n        }\r\n\r\n        private static bool IsInView(FrameworkElement element, FrameworkElement container)\r\n        {\r\n            if (element == null) return false;\r\n\r\n            var elementBounds = element.TransformToVisual(container).TransformBounds(new Rect(0.0, 0.0, element.ActualWidth, element.ActualHeight));\r\n            var containerBounds = new Rect(0.0, 0.0, container.ActualWidth, container.ActualHeight);\r\n\r\n            return containerBounds.Contains(new Point(elementBounds.X, elementBounds.Y)) // topLeft point\r\n                || containerBounds.Contains(new Point(elementBounds.X + elementBounds.Width, elementBounds.Y + elementBounds.Height)); // bottomRight point\r\n        }\r\n\r\n        public event EventHandler Clear;\r\n\r\n        protected virtual void RaiseClear()\r\n        {\r\n            var handler = Clear;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler FirstSliceLoaded;\r\n\r\n        protected virtual void RaiseFirstSliceLoaded()\r\n        {\r\n            var handler = FirstSliceLoaded;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler<VerticalOffsetChangedEventArgs> VerticalOffsetChanged;\r\n\r\n        protected virtual void RaiseVerticalOffsetChanged(VerticalOffsetChangedEventArgs e)\r\n        {\r\n            EventHandler<VerticalOffsetChangedEventArgs> handler = VerticalOffsetChanged;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private object _lastRemovedItem;\r\n\r\n        protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (KeepScrollingPosition)\r\n            {\r\n                if (_scrollViewer != null && _scrollViewer.VerticalOffset > 0.0001)\r\n                {\r\n                    if (e.Action == NotifyCollectionChangedAction.Add)\r\n                    {\r\n                        if (e.NewItems != null && e.NewItems.Count == 1 && e.NewStartingIndex == 0)\r\n                        {\r\n                            if (_lastRemovedItem != e.NewItems[0])\r\n                            {\r\n                                var nextOffset = Math.Min(_scrollViewer.VerticalOffset + 1.0, _scrollViewer.ScrollableHeight + 1.0);\r\n\r\n                                Debug.WriteLine(\"VerticalOffset={0} ExtentHeight={1} ViewportHeight={2} ScrollableHeight={3}\", _scrollViewer.VerticalOffset, _scrollViewer.ExtentHeight, _scrollViewer.ViewportHeight, _scrollViewer.ScrollableHeight);\r\n                                RaiseVerticalOffsetChanged(new VerticalOffsetChangedEventArgs { Viewer = _scrollViewer });\r\n                                _scrollViewer.ScrollToVerticalOffset(nextOffset);\r\n                            }\r\n                        }\r\n                    }\r\n                    else if (e.Action == NotifyCollectionChangedAction.Remove)\r\n                    {\r\n                        if (e.OldItems != null && e.OldItems.Count == 1 &&\r\n                            (e.OldStartingIndex) <= _scrollViewer.VerticalOffset)\r\n                        {\r\n                            _lastRemovedItem = e.OldItems[0];\r\n                        }\r\n                        else\r\n                        {\r\n                            _lastRemovedItem = null;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                //if (_scrollViewer != null && _scrollViewer.VerticalOffset > 0.0001)\r\n                //{\r\n                //    if (e.Action == NotifyCollectionChangedAction.Add)\r\n                //    {\r\n                //        if (e.NewItems != null && e.NewStartingIndex == 0)\r\n                //        {\r\n                //            foreach (var newItem in e.NewItems)\r\n                //            {\r\n                //                _scrollViewer.ScrollToVerticalOffset(Math.Min(_scrollViewer.VerticalOffset + 1.0, _scrollViewer.ScrollableHeight));\r\n                //            }\r\n                //        }\r\n                //    }\r\n                //    else if (e.Action == NotifyCollectionChangedAction.Remove)\r\n                //    {\r\n                //        if (e.OldItems != null && e.OldStartingIndex == 0)\r\n                //        {\r\n                //            foreach (var oldItem in e.OldItems)\r\n                //            {\r\n                //                _scrollViewer.ScrollToVerticalOffset(Math.Max(_scrollViewer.VerticalOffset - 1.0, 0.0));\r\n                //            }\r\n                //        }\r\n                //    }\r\n                //}\r\n            }\r\n\r\n            if (e.Action == NotifyCollectionChangedAction.Reset)\r\n            {\r\n                RaiseClear();\r\n            }\r\n            else if (e.Action == NotifyCollectionChangedAction.Add && e.NewItems != null && Items != null && Items.Count == e.NewItems.Count)\r\n            {\r\n                RaiseFirstSliceLoaded();\r\n            }\r\n\r\n            base.OnItemsChanged(e);\r\n        }\r\n    }\r\n\r\n    public class VerticalOffsetChangedEventArgs : EventArgs\r\n    {\r\n        public ScrollViewer Viewer { get; set; }\r\n    }\r\n\r\n    public class ScrollingStateChangedEventArgs : EventArgs\r\n    {\r\n        public bool OldValue { get; private set; }\r\n\r\n        public bool NewValue { get; private set; }\r\n\r\n        public ScrollingStateChangedEventArgs(bool oldValue, bool newValue)\r\n        {\r\n            OldValue = oldValue;\r\n            NewValue = newValue;\r\n        }\r\n    }\r\n \r\n    public class CompressionEventArgs : EventArgs\r\n    {\r\n        public CompressionType Type { get; protected set; }\r\n \r\n        public CompressionEventArgs(CompressionType type)\r\n        {\r\n            Type = type;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LongListSelector/Common/MotionParameters.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Controls.LongListSelector.Common\r\n{\r\n    internal static class MotionParameters\r\n    {\r\n        public static double MaximumSpeed { get { return 4000.0; } }\r\n        public static double ParkingSpeed { get { return 80.0; } }\r\n        public static double Friction { get { return 0.2; } }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LongListSelector/Common/SafeRaise.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace Telegram.Controls.LongListSelector.Common\r\n{\r\n    /// <summary>\r\n    /// A helper class for raising events safely.\r\n    /// </summary>\r\n    internal static class SafeRaise\r\n    {\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping existing implementation.\")]\r\n        public static void Raise(EventHandler eventToRaise, object sender)\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, EventArgs.Empty);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        public static void Raise(EventHandler<EventArgs> eventToRaise, object sender)\r\n        {\r\n            Raise(eventToRaise, sender, EventArgs.Empty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event args type.</typeparam>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"args\">The event args.</param>\r\n        public static void Raise<T>(EventHandler<T> eventToRaise, object sender, T args) where T : EventArgs\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, args);\r\n            }\r\n        }\r\n\r\n        // Lazy event args creation example:\r\n        //\r\n        // public class MyEventArgs : EventArgs\r\n        // {\r\n        //     public MyEventArgs(int x) { X = x; }\r\n        //     public int X { get; set; }\r\n        // }\r\n        //\r\n        // event EventHandler<MyEventArgs> Foo;\r\n        //\r\n        // public void Bar()\r\n        // {\r\n        //     int y = 2;\r\n        //     Raise(Foo, null, () => { return new MyEventArgs(y); });\r\n        // }\r\n\r\n        /// <summary>\r\n        /// This is a method that returns event args, used for lazy creation.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event type.</typeparam>\r\n        /// <returns></returns>\r\n        public delegate T GetEventArgs<T>() where T : EventArgs;\r\n\r\n        /// <summary>\r\n        /// Raise an event in a thread-safe manner, with the required null check. Lazily creates event args.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event args type.</typeparam>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"getEventArgs\">The delegate to return the event args if needed.</param>\r\n        public static void Raise<T>(EventHandler<T> eventToRaise, object sender, GetEventArgs<T> getEventArgs) where T : EventArgs\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, getEventArgs());\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LongListSelector/Common/TempaltedVisualTreeExtensions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Telegram.Controls.Extensions;\r\n\r\nnamespace Telegram.Controls.LongListSelector.Common\r\n{\r\n    /// <summary>\r\n    /// A static class providing methods for working with the visual tree using generics.  \r\n    /// </summary>\r\n    public static class TemplatedVisualTreeExtensions\r\n    {\r\n\r\n        #region GetFirstLogicalChildByType<T>(...)\r\n        /// <summary>\r\n        /// Retrieves the first logical child of a specified type using a \r\n        /// breadth-first search.  A visual element is assumed to be a logical \r\n        /// child of another visual element if they are in the same namescope.\r\n        /// For performance reasons this method manually manages the queue \r\n        /// instead of using recursion.\r\n        /// </summary>\r\n        /// <param name=\"parent\">The parent framework element.</param>\r\n        /// <param name=\"applyTemplates\">Specifies whether to apply templates on the traversed framework elements</param>\r\n        /// <returns>The first logical child of the framework element of the specified type.</returns>\r\n        internal static T GetFirstLogicalChildByType<T>(this FrameworkElement parent, bool applyTemplates)\r\n            where T : FrameworkElement\r\n        {\r\n            Debug.Assert(parent != null, \"The parent cannot be null.\");\r\n\r\n            Queue<FrameworkElement> queue = new Queue<FrameworkElement>();\r\n            queue.Enqueue(parent);\r\n\r\n            while (queue.Count > 0)\r\n            {\r\n                FrameworkElement element = queue.Dequeue();\r\n                var elementAsControl = element as Control;\r\n                if (applyTemplates && elementAsControl != null)\r\n                {\r\n                    elementAsControl.ApplyTemplate();\r\n                }\r\n\r\n                if (element is T && element != parent)\r\n                {\r\n                    return (T)element;\r\n                }\r\n\r\n                foreach (FrameworkElement visualChild in element.GetVisualChildren().OfType<FrameworkElement>())\r\n                {\r\n                    queue.Enqueue(visualChild);\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n        #endregion\r\n\r\n        #region GetLogicalChildrenByType<T>(...)\r\n        /// <summary>\r\n        /// Retrieves all the logical children of a specified type using a \r\n        /// breadth-first search.  A visual element is assumed to be a logical \r\n        /// child of another visual element if they are in the same namescope.\r\n        /// For performance reasons this method manually manages the queue \r\n        /// instead of using recursion.\r\n        /// </summary>\r\n        /// <param name=\"parent\">The parent framework element.</param>\r\n        /// <param name=\"applyTemplates\">Specifies whether to apply templates on the traversed framework elements</param>\r\n        /// <returns>The logical children of the framework element of the specified type.</returns>\r\n        internal static IEnumerable<T> GetLogicalChildrenByType<T>(this FrameworkElement parent, bool applyTemplates)\r\n                where T : FrameworkElement\r\n        {\r\n            Debug.Assert(parent != null, \"The parent cannot be null.\");\r\n\r\n            if (applyTemplates && parent is Control)\r\n            {\r\n                ((Control)parent).ApplyTemplate();\r\n            }\r\n\r\n            Queue<FrameworkElement> queue =\r\n               new Queue<FrameworkElement>(parent.GetVisualChildren().OfType<FrameworkElement>());\r\n\r\n            while (queue.Count > 0)\r\n            {\r\n                FrameworkElement element = queue.Dequeue();\r\n                if (applyTemplates && element is Control)\r\n                {\r\n                    ((Control)element).ApplyTemplate();\r\n                }\r\n\r\n                if (element is T)\r\n                {\r\n                    yield return (T)element;\r\n                }\r\n\r\n                foreach (FrameworkElement visualChild in element.GetVisualChildren().OfType<FrameworkElement>())\r\n                {\r\n                    queue.Enqueue(visualChild);\r\n                }\r\n            }\r\n        }\r\n        #endregion\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LongListSelector/Common/VisualStates.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\n\r\nnamespace Telegram.Controls.LongListSelector.Common\r\n{\r\n\r\n    /// <summary>\r\n    /// Names and helpers for visual states in the controls.\r\n    /// </summary>\r\n    internal static class VisualStates\r\n    {\r\n        #region GroupCommon\r\n        /// <summary>\r\n        /// Common state group.\r\n        /// </summary>\r\n        public const string GroupCommon = \"CommonStates\";\r\n\r\n        /// <summary>\r\n        /// Normal state of the Common state group.\r\n        /// </summary>\r\n        public const string StateNormal = \"Normal\";\r\n\r\n        /// <summary>\r\n        /// Normal state of the Common state group.\r\n        /// </summary>\r\n        public const string StateReadOnly = \"ReadOnly\";\r\n\r\n        /// <summary>\r\n        /// MouseOver state of the Common state group.\r\n        /// </summary>\r\n        public const string StateMouseOver = \"MouseOver\";\r\n\r\n        /// <summary>\r\n        /// Pressed state of the Common state group.\r\n        /// </summary>\r\n        public const string StatePressed = \"Pressed\";\r\n\r\n        /// <summary>\r\n        /// Disabled state of the Common state group.\r\n        /// </summary>\r\n        public const string StateDisabled = \"Disabled\";\r\n        #endregion GroupCommon\r\n\r\n        #region GroupFocus\r\n        /// <summary>\r\n        /// Focus state group.\r\n        /// </summary>\r\n        public const string GroupFocus = \"FocusStates\";\r\n\r\n        /// <summary>\r\n        /// Unfocused state of the Focus state group.\r\n        /// </summary>\r\n        public const string StateUnfocused = \"Unfocused\";\r\n\r\n        /// <summary>\r\n        /// Focused state of the Focus state group.\r\n        /// </summary>\r\n        public const string StateFocused = \"Focused\";\r\n        #endregion GroupFocus\r\n\r\n        #region GroupSelection\r\n        /// <summary>\r\n        /// Selection state group.\r\n        /// </summary>\r\n        public const string GroupSelection = \"SelectionStates\";\r\n\r\n        /// <summary>\r\n        /// Selected state of the Selection state group.\r\n        /// </summary>\r\n        public const string StateSelected = \"Selected\";\r\n\r\n        /// <summary>\r\n        /// Unselected state of the Selection state group.\r\n        /// </summary>\r\n        public const string StateUnselected = \"Unselected\";\r\n\r\n        /// <summary>\r\n        /// Selected inactive state of the Selection state group.\r\n        /// </summary>\r\n        public const string StateSelectedInactive = \"SelectedInactive\";\r\n        #endregion GroupSelection\r\n\r\n        #region GroupExpansion\r\n        /// <summary>\r\n        /// Expansion state group.\r\n        /// </summary>\r\n        public const string GroupExpansion = \"ExpansionStates\";\r\n\r\n        /// <summary>\r\n        /// Expanded state of the Expansion state group.\r\n        /// </summary>\r\n        public const string StateExpanded = \"Expanded\";\r\n\r\n        /// <summary>\r\n        /// Collapsed state of the Expansion state group.\r\n        /// </summary>\r\n        public const string StateCollapsed = \"Collapsed\";\r\n        #endregion GroupExpansion\r\n\r\n        #region GroupPopup\r\n        /// <summary>\r\n        /// Popup state group.\r\n        /// </summary>\r\n        public const string GroupPopup = \"PopupStates\";\r\n\r\n        /// <summary>\r\n        /// Opened state of the Popup state group.\r\n        /// </summary>\r\n        public const string StatePopupOpened = \"PopupOpened\";\r\n\r\n        /// <summary>\r\n        /// Closed state of the Popup state group.\r\n        /// </summary>\r\n        public const string StatePopupClosed = \"PopupClosed\";\r\n        #endregion\r\n\r\n        #region GroupValidation\r\n        /// <summary>\r\n        /// ValidationStates state group.\r\n        /// </summary>\r\n        public const string GroupValidation = \"ValidationStates\";\r\n\r\n        /// <summary>\r\n        /// The valid state for the ValidationStates group.\r\n        /// </summary>\r\n        public const string StateValid = \"Valid\";\r\n\r\n        /// <summary>\r\n        /// Invalid, focused state for the ValidationStates group.\r\n        /// </summary>\r\n        public const string StateInvalidFocused = \"InvalidFocused\";\r\n\r\n        /// <summary>\r\n        /// Invalid, unfocused state for the ValidationStates group.\r\n        /// </summary>\r\n        public const string StateInvalidUnfocused = \"InvalidUnfocused\";\r\n        #endregion\r\n\r\n        #region GroupExpandDirection\r\n        /// <summary>\r\n        /// ExpandDirection state group.\r\n        /// </summary>\r\n        public const string GroupExpandDirection = \"ExpandDirectionStates\";\r\n\r\n        /// <summary>\r\n        /// Down expand direction state of ExpandDirection state group.\r\n        /// </summary>\r\n        public const string StateExpandDown = \"ExpandDown\";\r\n\r\n        /// <summary>\r\n        /// Up expand direction state of ExpandDirection state group.\r\n        /// </summary>\r\n        public const string StateExpandUp = \"ExpandUp\";\r\n\r\n        /// <summary>\r\n        /// Left expand direction state of ExpandDirection state group.\r\n        /// </summary>\r\n        public const string StateExpandLeft = \"ExpandLeft\";\r\n\r\n        /// <summary>\r\n        /// Right expand direction state of ExpandDirection state group.\r\n        /// </summary>\r\n        public const string StateExpandRight = \"ExpandRight\";\r\n        #endregion\r\n\r\n        #region GroupHasItems\r\n        /// <summary>\r\n        /// HasItems state group.\r\n        /// </summary>\r\n        public const string GroupHasItems = \"HasItemsStates\";\r\n\r\n        /// <summary>\r\n        /// HasItems state of the HasItems state group.\r\n        /// </summary>\r\n        public const string StateHasItems = \"HasItems\";\r\n\r\n        /// <summary>\r\n        /// NoItems state of the HasItems state group.\r\n        /// </summary>\r\n        public const string StateNoItems = \"NoItems\";\r\n        #endregion GroupHasItems\r\n\r\n        #region GroupIncrease\r\n        /// <summary>\r\n        /// Increment state group.\r\n        /// </summary>\r\n        public const string GroupIncrease = \"IncreaseStates\";\r\n\r\n        /// <summary>\r\n        /// State enabled for increment group.\r\n        /// </summary>\r\n        public const string StateIncreaseEnabled = \"IncreaseEnabled\";\r\n\r\n        /// <summary>\r\n        /// State disabled for increment group.\r\n        /// </summary>\r\n        public const string StateIncreaseDisabled = \"IncreaseDisabled\";\r\n        #endregion GroupIncrease\r\n\r\n        #region GroupDecrease\r\n        /// <summary>\r\n        /// Decrement state group.\r\n        /// </summary>\r\n        public const string GroupDecrease = \"DecreaseStates\";\r\n\r\n        /// <summary>\r\n        /// State enabled for decrement group.\r\n        /// </summary>\r\n        public const string StateDecreaseEnabled = \"DecreaseEnabled\";\r\n\r\n        /// <summary>\r\n        /// State disabled for decrement group.\r\n        /// </summary>\r\n        public const string StateDecreaseDisabled = \"DecreaseDisabled\";\r\n        #endregion GroupDecrease\r\n\r\n        #region GroupIteractionMode\r\n        /// <summary>\r\n        /// InteractionMode state group.\r\n        /// </summary>\r\n        public const string GroupInteractionMode = \"InteractionModeStates\";\r\n\r\n        /// <summary>\r\n        /// Edit of the DisplayMode state group.\r\n        /// </summary>\r\n        public const string StateEdit = \"Edit\";\r\n\r\n        /// <summary>\r\n        /// Display of the DisplayMode state group.\r\n        /// </summary>\r\n        public const string StateDisplay = \"Display\";\r\n        #endregion GroupIteractionMode\r\n\r\n        #region GroupLocked\r\n        /// <summary>\r\n        /// DisplayMode state group.\r\n        /// </summary>\r\n        public const string GroupLocked = \"LockedStates\";\r\n\r\n        /// <summary>\r\n        /// Edit of the DisplayMode state group.\r\n        /// </summary>\r\n        public const string StateLocked = \"Locked\";\r\n\r\n        /// <summary>\r\n        /// Display of the DisplayMode state group.\r\n        /// </summary>\r\n        public const string StateUnlocked = \"Unlocked\";\r\n        #endregion GroupLocked\r\n\r\n        #region GroupActive\r\n        /// <summary>\r\n        /// Active state.\r\n        /// </summary>\r\n        public const string StateActive = \"Active\";\r\n\r\n        /// <summary>\r\n        /// Inactive state.\r\n        /// </summary>\r\n        public const string StateInactive = \"Inactive\";\r\n\r\n        /// <summary>\r\n        /// Active state group.\r\n        /// </summary>\r\n        public const string GroupActive = \"ActiveStates\";\r\n        #endregion GroupActive\r\n\r\n        #region GroupWatermark\r\n        /// <summary>\r\n        /// Non-watermarked state.\r\n        /// </summary>\r\n        public const string StateUnwatermarked = \"Unwatermarked\";\r\n\r\n        /// <summary>\r\n        /// Watermarked state.\r\n        /// </summary>\r\n        public const string StateWatermarked = \"Watermarked\";\r\n\r\n        /// <summary>\r\n        /// Watermark state group.\r\n        /// </summary>\r\n        public const string GroupWatermark = \"WatermarkStates\";\r\n        #endregion GroupWatermark\r\n\r\n        #region GroupCalendarButtonFocus\r\n        /// <summary>\r\n        /// Unfocused state for Calendar Buttons.\r\n        /// </summary>\r\n        public const string StateCalendarButtonUnfocused = \"CalendarButtonUnfocused\";\r\n\r\n        /// <summary>\r\n        /// Focused state for Calendar Buttons.\r\n        /// </summary>\r\n        public const string StateCalendarButtonFocused = \"CalendarButtonFocused\";\r\n\r\n        /// <summary>\r\n        /// CalendarButtons Focus state group.\r\n        /// </summary>\r\n        public const string GroupCalendarButtonFocus = \"CalendarButtonFocusStates\";\r\n        #endregion GroupCalendarButtonFocus\r\n\r\n        #region GroupBusyStatus\r\n        /// <summary>\r\n        /// Busy state for BusyIndicator.\r\n        /// </summary>\r\n        public const string StateBusy = \"Busy\";\r\n\r\n        /// <summary>\r\n        /// Idle state for BusyIndicator.\r\n        /// </summary>\r\n        public const string StateIdle = \"Idle\";\r\n\r\n        /// <summary>\r\n        /// Busyness group name.\r\n        /// </summary>\r\n        public const string GroupBusyStatus = \"BusyStatusStates\";\r\n        #endregion\r\n\r\n        #region GroupVisibility\r\n        /// <summary>\r\n        /// Visible state name for BusyIndicator.\r\n        /// </summary>\r\n        public const string StateVisible = \"Visible\";\r\n\r\n        /// <summary>\r\n        /// Hidden state name for BusyIndicator.\r\n        /// </summary>\r\n        public const string StateHidden = \"Hidden\";\r\n\r\n        /// <summary>\r\n        /// BusyDisplay group.\r\n        /// </summary>\r\n        public const string GroupVisibility = \"VisibilityStates\";\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Use VisualStateManager to change the visual state of the control.\r\n        /// </summary>\r\n        /// <param name=\"control\">\r\n        /// Control whose visual state is being changed.\r\n        /// </param>\r\n        /// <param name=\"useTransitions\">\r\n        /// A value indicating whether to use transitions when updating the\r\n        /// visual state, or to snap directly to the new visual state.\r\n        /// </param>\r\n        /// <param name=\"stateNames\">\r\n        /// Ordered list of state names and fallback states to transition into.\r\n        /// Only the first state to be found will be used.\r\n        /// </param>\r\n        public static void GoToState(Control control, bool useTransitions, params string[] stateNames)\r\n        {\r\n            Debug.Assert(control != null, \"control should not be null!\");\r\n            Debug.Assert(stateNames != null, \"stateNames should not be null!\");\r\n            Debug.Assert(stateNames.Length > 0, \"stateNames should not be empty!\");\r\n\r\n            foreach (string name in stateNames)\r\n            {\r\n                if (VisualStateManager.GoToState(control, name, useTransitions))\r\n                {\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the implementation root of the Control.\r\n        /// </summary>\r\n        /// <param name=\"dependencyObject\">The DependencyObject.</param>\r\n        /// <remarks>\r\n        /// Implements Silverlight's corresponding internal property on Control.\r\n        /// </remarks>\r\n        /// <returns>Returns the implementation root or null.</returns>\r\n        public static FrameworkElement GetImplementationRoot(DependencyObject dependencyObject)\r\n        {\r\n            Debug.Assert(dependencyObject != null, \"DependencyObject should not be null.\");\r\n            return (1 == VisualTreeHelper.GetChildrenCount(dependencyObject)) ?\r\n                VisualTreeHelper.GetChild(dependencyObject, 0) as FrameworkElement :\r\n                null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method tries to get the named VisualStateGroup for the \r\n        /// dependency object. The provided object's ImplementationRoot will be \r\n        /// looked up in this call.\r\n        /// </summary>\r\n        /// <param name=\"dependencyObject\">The dependency object.</param>\r\n        /// <param name=\"groupName\">The visual state group's name.</param>\r\n        /// <returns>Returns null or the VisualStateGroup object.</returns>\r\n        public static VisualStateGroup TryGetVisualStateGroup(DependencyObject dependencyObject, string groupName)\r\n        {\r\n            FrameworkElement root = GetImplementationRoot(dependencyObject);\r\n            if (root == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return VisualStateManager.GetVisualStateGroups(root)\r\n                .OfType<VisualStateGroup>()\r\n                .Where(group => string.CompareOrdinal(groupName, group.Name) == 0)\r\n                .FirstOrDefault();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LongListSelector/LongListSelector.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media;\r\nusing DanielVaughan.WindowsPhone7Unleashed;\r\nusing Telegram.Controls.LongListSelector.Common;\r\n\r\nnamespace Telegram.Controls.LongListSelector\r\n{\r\n\r\n    /// <summary>\r\n    /// Represents a virtualizing list designed for grouped lists. Can also be \r\n    /// used with flat lists.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [SuppressMessage(\"Microsoft.Maintainability\", \"CA1506:AvoidExcessiveClassCoupling\", Justification = \"LongListSelector is a complicated control.\")]\r\n    [TemplatePart(Name = TemplatedListBoxName, Type = typeof(TemplatedListBox))]\r\n    public partial class LongListSelector : Control\r\n    {\r\n        #region Constants\r\n        /// <summary>\r\n        /// The templated list box name.\r\n        /// </summary>\r\n        private const string TemplatedListBoxName = \"TemplatedListBox\";\r\n\r\n        /// <summary>\r\n        /// This constant is not actively used in the new version, however, the\r\n        /// value is exposed through a deprecated property. For backward-\r\n        /// compatibility only.\r\n        /// </summary>\r\n        private const double BufferSizeDefault = 1.0;\r\n\r\n        /// <summary>\r\n        /// The Scrolling state name.\r\n        /// </summary>\r\n        private const string ScrollingState = \"Scrolling\";\r\n\r\n        /// <summary>\r\n        /// The NotScrolling state name.\r\n        /// </summary>\r\n        private const string NotScrollingState = \"NotScrolling\";\r\n\r\n        /// <summary>\r\n        /// The vertical compression top state name.\r\n        /// </summary>\r\n        private const string CompressionTop = \"CompressionTop\";\r\n\r\n        /// <summary>\r\n        /// The vertical compression bottom state name.\r\n        /// </summary>\r\n        private const string CompressionBottom = \"CompressionBottom\";\r\n\r\n        /// <summary>\r\n        /// The absense of vertical compression state name.\r\n        /// </summary>\r\n        private const string NoVerticalCompression = \"NoVerticalCompression\";\r\n\r\n        /// <summary>\r\n        /// The vertical compression state name.\r\n        /// </summary>\r\n        private const string VerticalCompressionStateName = \"VerticalCompression\";\r\n\r\n        /// <summary>\r\n        /// The name of the scroll states visual state group.\r\n        /// </summary>\r\n        private const string ScrollStatesGroupName = \"ScrollStates\";\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Reference to the ListBox hosted in this control.\r\n        /// </summary>\r\n        private TemplatedListBox _listBox;\r\n\r\n        private ScrollViewer _scrollViewer;\r\n\r\n        /// <summary>\r\n        /// Reference to the visual state group for scrolling.\r\n        /// </summary>\r\n        private VisualStateGroup _scrollGroup;\r\n\r\n        /// <summary>\r\n        /// Reference to the visual state group for  vertical compression.\r\n        /// </summary>\r\n        private VisualStateGroup _verticalCompressionGroup;\r\n\r\n        /// <summary>\r\n        /// // Used to listen for changes in the ItemsSource \r\n        /// (_rootCollection = ItemsSource as INotifyCollectionChanged).\r\n        /// </summary>\r\n        private INotifyCollectionChanged _rootCollection;\r\n\r\n        /// <summary>\r\n        /// Used to listen for changes in the groups within ItemsSource.\r\n        /// </summary>\r\n        private List<INotifyCollectionChanged> _groupCollections = new List<INotifyCollectionChanged>();\r\n\r\n        #region Properties\r\n\r\n        /// <summary>\r\n        /// Gets or sets whether the list is flat instead of a group hierarchy.\r\n        /// </summary>\r\n        public bool IsFlatList { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the selected item.\r\n        /// </summary>\r\n        public object SelectedItem\r\n        {\r\n            get\r\n            {\r\n                if (_listBox != null && _listBox.SelectedItem != null)\r\n                {\r\n                    LongListSelectorItem tuple = (LongListSelectorItem)_listBox.SelectedItem;\r\n                    if (tuple.ItemType == LongListSelectorItemType.Item)\r\n                        return tuple.Item;\r\n                }\r\n                return null;\r\n            }\r\n            set\r\n            {\r\n                if (_listBox != null)\r\n                {\r\n                    if (value == null)\r\n                    {\r\n                        _listBox.SelectedItem = null;\r\n                    }\r\n                    else\r\n                    {\r\n                        foreach (LongListSelectorItem tuple in _listBox.ItemsSource)\r\n                        {\r\n                            if (tuple.Item == value)\r\n                            {\r\n                                _listBox.SelectedItem = tuple;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets whether the list can be (temporarily) scrolled off of the ends. \r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1822:MarkMembersAsStatic\", Justification = \"Backward compatible public setter.\")]\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"value\", Justification = \"Backward compatible public setter.\")]\r\n        [Obsolete(\"IsBouncy is always set to true.\")]\r\n        public bool IsBouncy\r\n        {\r\n            get { return true; }\r\n            set { }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets whether a list header is shown.\r\n        /// </summary>\r\n        private bool HasListHeader { get { return ListHeaderTemplate != null || ListHeader is UIElement; } }\r\n        \r\n        /// <summary>\r\n        /// Gets whether a list footer is shown.\r\n        /// </summary>\r\n        private bool HasListFooter { get { return ListFooterTemplate != null || ListFooter is UIElement; } }\r\n\r\n        /// <summary>\r\n        /// Gets whether or not the user is manipulating the list, or if an inertial animation is taking place.\r\n        /// </summary>\r\n        public bool IsScrolling\r\n        {\r\n            get;\r\n            private set;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets whether or not stretching is taking place.\r\n        /// </summary>\r\n        public bool IsStretching\r\n        {\r\n            get;\r\n            private set;\r\n        }\r\n        #endregion\r\n\r\n        #region Dependency Properties\r\n\r\n        #region HorizontalScrollBar DependencyProperty\r\n\r\n        public static readonly DependencyProperty HorizontalScrollBarVisibilityProperty = DependencyProperty.Register(\r\n            \"HorizontalScrollBarVisibility\", typeof(ScrollBarVisibility), typeof(LongListSelector), new PropertyMetadata(ScrollBarVisibility.Disabled));\r\n\r\n        public ScrollBarVisibility HorizontalScrollBarVisibility\r\n        {\r\n            get { return (ScrollBarVisibility) GetValue(HorizontalScrollBarVisibilityProperty); }\r\n            set { SetValue(HorizontalScrollBarVisibilityProperty, value); }\r\n        }\r\n        #endregion\r\n\r\n        #region VerticalScrollBar DependencyProperty\r\n\r\n        public static readonly DependencyProperty VerticalScrollBarVisibilityProperty = DependencyProperty.Register(\r\n            \"VerticalScrollBarVisibility\", typeof(ScrollBarVisibility), typeof(LongListSelector), new PropertyMetadata(ScrollBarVisibility.Auto));\r\n\r\n        public ScrollBarVisibility VerticalScrollBarVisibility\r\n        {\r\n            get { return (ScrollBarVisibility) GetValue(VerticalScrollBarVisibilityProperty); }\r\n            set { SetValue(VerticalScrollBarVisibilityProperty, value); }\r\n        }\r\n        #endregion\r\n\r\n        #region ItemsSource DependencyProperty\r\n\r\n        /// <summary>\r\n        /// The DataSource property. Where all of the items come from.\r\n        /// </summary>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get { return (IEnumerable)GetValue(ItemsSourceProperty); }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The DataSource DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemsSourceProperty =\r\n            DependencyProperty.Register(\"ItemsSource\", typeof(IEnumerable), typeof(LongListSelector), new PropertyMetadata(null, OnItemsSourceChanged));\r\n\r\n        private static void OnItemsSourceChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((LongListSelector)obj).OnItemsSourceChanged();\r\n        }\r\n\r\n\r\n\r\n        #endregion\r\n\r\n        #region ListHeader DependencyProperty\r\n\r\n        /// <summary>\r\n        /// The ListHeader property. Will be used as the first scrollItem in the list.\r\n        /// </summary>\r\n        public object ListHeader\r\n        {\r\n            get { return (object)GetValue(ListHeaderProperty); }\r\n            set { SetValue(ListHeaderProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The ListHeader DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ListHeaderProperty =\r\n            DependencyProperty.Register(\"ListHeader\", typeof(object), typeof(LongListSelector), new PropertyMetadata(null));\r\n\r\n        #endregion\r\n\r\n        #region ItemsPanel DependencyProperty\r\n\r\n        /// <summary>\r\n        /// The ItemsPanel provides the template for the ListHeader.\r\n        /// </summary>\r\n        public ItemsPanelTemplate ItemsPanel\r\n        {\r\n            get { return (ItemsPanelTemplate)GetValue(ItemsPanelProperty); }\r\n            set { SetValue(ItemsPanelProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The ItemsPanel DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemsPanelProperty =\r\n            DependencyProperty.Register(\"ItemsPanel\", typeof(ItemsPanelTemplate), typeof(LongListSelector), new PropertyMetadata(OnItemsPanelChanged));\r\n\r\n        private static void OnItemsPanelChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as LongListSelector;\r\n            if (control != null)\r\n            {\r\n                if (control._listBox != null)\r\n                {\r\n                    control._listBox.ItemsPanel = e.NewValue as ItemsPanelTemplate;\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region ListHeaderTemplate DependencyProperty\r\n\r\n        /// <summary>\r\n        /// The ListHeaderTemplate provides the template for the ListHeader.\r\n        /// </summary>\r\n        public DataTemplate ListHeaderTemplate\r\n        {\r\n            get { return (DataTemplate)GetValue(ListHeaderTemplateProperty); }\r\n            set { SetValue(ListHeaderTemplateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The ListHeaderTemplate DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ListHeaderTemplateProperty =\r\n            DependencyProperty.Register(\"ListHeaderTemplate\", typeof(DataTemplate), typeof(LongListSelector), new PropertyMetadata(null, OnDataTemplateChanged));\r\n\r\n        #endregion\r\n\r\n        #region ListFooter DependencyProperty\r\n\r\n        /// <summary>\r\n        /// The ListFooter property. Will be used as the first scrollItem in the list.\r\n        /// </summary>\r\n        public object ListFooter\r\n        {\r\n            get { return (object)GetValue(ListFooterProperty); }\r\n            set { SetValue(ListFooterProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The ListFooter DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ListFooterProperty =\r\n            DependencyProperty.Register(\"ListFooter\", typeof(object), typeof(LongListSelector), new PropertyMetadata(null));\r\n\r\n        #endregion\r\n\r\n        #region ListFooterTemplate DependencyProperty\r\n\r\n        /// <summary>\r\n        /// The ListFooterTemplate provides the template for the ListFooter.\r\n        /// </summary>\r\n        public DataTemplate ListFooterTemplate\r\n        {\r\n            get { return (DataTemplate)GetValue(ListFooterTemplateProperty); }\r\n            set { SetValue(ListFooterTemplateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The ListFooterTemplate DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ListFooterTemplateProperty =\r\n            DependencyProperty.Register(\"ListFooterTemplate\", typeof(DataTemplate), typeof(LongListSelector), new PropertyMetadata(null, OnDataTemplateChanged));\r\n\r\n        #endregion\r\n\r\n        #region GroupHeaderTemplate DependencyProperty\r\n\r\n        /// <summary>\r\n        /// The GroupHeaderTemplate provides the template for the groups in the items view.\r\n        /// </summary>\r\n        public DataTemplate GroupHeaderTemplate\r\n        {\r\n            get { return (DataTemplate)GetValue(GroupHeaderProperty); }\r\n            set { SetValue(GroupHeaderProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The GroupHeaderTemplate DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty GroupHeaderProperty =\r\n            DependencyProperty.Register(\"GroupHeaderTemplate\", typeof(DataTemplate), typeof(LongListSelector), new PropertyMetadata(null, OnDataTemplateChanged));\r\n        #endregion\r\n\r\n        #region GroupFooterTemplate DependencyProperty\r\n\r\n        /// <summary>\r\n        /// The GroupFooterTemplate provides the template for the groups in the items view.\r\n        /// </summary>\r\n        public DataTemplate GroupFooterTemplate\r\n        {\r\n            get { return (DataTemplate)GetValue(GroupFooterProperty); }\r\n            set { SetValue(GroupFooterProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The GroupFooterTemplate DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty GroupFooterProperty =\r\n            DependencyProperty.Register(\"GroupFooterTemplate\", typeof(DataTemplate), typeof(LongListSelector), new PropertyMetadata(null, OnDataTemplateChanged));\r\n\r\n        #endregion\r\n\r\n        #region ItemTemplate DependencyProperty\r\n\r\n        /// <summary>\r\n        /// The ItemTemplate provides the template for the items in the items view.\r\n        /// </summary>\r\n        public DataTemplate ItemTemplate\r\n        {\r\n            get { return (DataTemplate)GetValue(ItemsTemplateProperty); }\r\n            set { SetValue(ItemsTemplateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The ItemTemplate DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemsTemplateProperty =\r\n            DependencyProperty.Register(\"ItemTemplate\", typeof(DataTemplate), typeof(LongListSelector), new PropertyMetadata(null, OnDataTemplateChanged));\r\n\r\n        #endregion\r\n\r\n        #region DisplayAllGroups DependencyProperty\r\n\r\n        /// <summary>\r\n        /// Display all groups whether or not they have items.\r\n        /// </summary>\r\n        public bool DisplayAllGroups\r\n        {\r\n            get { return (bool)GetValue(DisplayAllGroupsProperty); }\r\n            set { SetValue(DisplayAllGroupsProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// DisplayAllGroups DependencyProperty\r\n        /// </summary>\r\n        public static readonly DependencyProperty DisplayAllGroupsProperty =\r\n            DependencyProperty.Register(\"DisplayAllGroups\", typeof(bool), typeof(LongListSelector), new PropertyMetadata(false, OnDisplayAllGroupsChanged));\r\n        #endregion\r\n\r\n        #region GroupItemTemplate DependencyProperty\r\n\r\n        /// <summary>\r\n        /// The GroupItemTemplate specifies the template that will be used in group view mode.\r\n        /// </summary>\r\n        public DataTemplate GroupItemTemplate\r\n        {\r\n            get { return (DataTemplate)GetValue(GroupItemTemplateProperty); }\r\n            set { SetValue(GroupItemTemplateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The GroupItemTemplate DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty GroupItemTemplateProperty =\r\n            DependencyProperty.Register(\"GroupItemTemplate\", typeof(DataTemplate), typeof(LongListSelector), new PropertyMetadata(null));\r\n\r\n        #endregion\r\n\r\n        #region GroupItemsPanel DependencyProperty\r\n\r\n        /// <summary>\r\n        /// The GroupItemsPanel specifies the panel that will be used in group view mode.\r\n        /// </summary>\r\n        public ItemsPanelTemplate GroupItemsPanel\r\n        {\r\n            get { return (ItemsPanelTemplate)GetValue(GroupItemsPanelProperty); }\r\n            set { SetValue(GroupItemsPanelProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The GroupItemsPanel DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty GroupItemsPanelProperty =\r\n            DependencyProperty.Register(\"GroupItemsPanel\", typeof(ItemsPanelTemplate), typeof(LongListSelector), new PropertyMetadata(null));\r\n\r\n        #endregion\r\n\r\n        #region BufferSize DependencyProperty\r\n        /// <summary>\r\n        /// The number of \"screens\" (as defined by the ActualHeight of the LongListSelector) above and below the visible\r\n        /// items of the list that will be filled with items.\r\n        /// </summary>\r\n        [Obsolete(\"BufferSize no longer affect items virtualization\")]\r\n        public double BufferSize\r\n        {\r\n            get { return (double)GetValue(BufferSizeProperty); }\r\n            set { SetValue(BufferSizeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The BufferSize DependencyProperty\r\n        /// </summary>\r\n        [Obsolete(\"BufferSizeProperty no longer affect items virtualization\")]\r\n        public static readonly DependencyProperty BufferSizeProperty =\r\n            DependencyProperty.Register(\"BufferSize\", typeof(double), typeof(LongListSelector), new PropertyMetadata(BufferSizeDefault, OnBufferSizeChanged));\r\n\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Usage\", \"CA2208:InstantiateArgumentExceptionsCorrectly\")]\r\n        private static void OnBufferSizeChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            double newValue = (double)e.NewValue;\r\n\r\n            if (newValue < 0)\r\n            {\r\n                throw new ArgumentOutOfRangeException(\"BufferSize\");\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region MaximumFlickVelocity DependencyProperty\r\n        /// <summary>\r\n        /// The maximum velocity for flicks, in pixels per second.\r\n        /// </summary>\r\n        [Obsolete(\"MaximumFlickVelocity is not used anymore.\")]\r\n        public double MaximumFlickVelocity\r\n        {\r\n            get { return (double)GetValue(MaximumFlickVelocityProperty); }\r\n            set { SetValue(MaximumFlickVelocityProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The MaximumFlickVelocity DependencyProperty.\r\n        /// </summary>\r\n        [Obsolete(\"MaximumFlickVelocityProperty is not used anymore.\")]\r\n        public static readonly DependencyProperty MaximumFlickVelocityProperty =\r\n            DependencyProperty.Register(\"MaximumFlickVelocity\", typeof(double), typeof(LongListSelector), new PropertyMetadata(MotionParameters.MaximumSpeed));\r\n\r\n        #endregion\r\n\r\n        #region ShowListHeader DependencyProperty\r\n\r\n        /// <summary>\r\n        /// Controls whether or not the ListHeader is shown.\r\n        /// </summary>\r\n        public bool ShowListHeader\r\n        {\r\n            get { return (bool)GetValue(ShowListHeaderProperty); }\r\n            set { SetValue(ShowListHeaderProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The ShowListHeader DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ShowListHeaderProperty =\r\n            DependencyProperty.Register(\"ShowListHeader\", typeof(bool), typeof(LongListSelector), new PropertyMetadata(true, OnShowListHeaderChanged));\r\n\r\n        private static void OnShowListHeaderChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            LongListSelector control = (LongListSelector)obj;\r\n            \r\n            if (control._listBox != null)\r\n            {\r\n                Collection<LongListSelectorItem> tuples = (Collection<LongListSelectorItem>)control._listBox.ItemsSource;\r\n                if (control.ShowListHeader)\r\n                {\r\n                    control.AddListHeader(tuples);\r\n                }\r\n                else\r\n                {\r\n                    RemoveListHeader(tuples);\r\n                }\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region ShowListFooter DependencyProperty\r\n\r\n        /// <summary>\r\n        /// Controls whether or not the ListFooter is shown.\r\n        /// </summary>\r\n        public bool ShowListFooter\r\n        {\r\n            get { return (bool)GetValue(ShowListFooterProperty); }\r\n            set { SetValue(ShowListFooterProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The ShowListFooter DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ShowListFooterProperty =\r\n            DependencyProperty.Register(\"ShowListFooter\", typeof(bool), typeof(LongListSelector), new PropertyMetadata(true, OnShowListFooterChanged));\r\n\r\n        private static void OnShowListFooterChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            LongListSelector control = (LongListSelector)obj;\r\n\r\n            if (control._listBox != null)\r\n            {\r\n                Collection<LongListSelectorItem> tuples = (Collection<LongListSelectorItem>)control._listBox.ItemsSource;\r\n                if (control.ShowListFooter)\r\n                {\r\n                    control.AddListFooter(tuples);\r\n                }\r\n                else\r\n                {\r\n                    RemoveListFooter(tuples);\r\n                }\r\n            }\r\n            \r\n        }\r\n\r\n        #endregion\r\n\r\n        #endregion\r\n\r\n        #region Events\r\n\r\n        /// <summary>\r\n        /// Occurs when the currently selected item changes.\r\n        /// </summary>\r\n        public event SelectionChangedEventHandler SelectionChanged;\r\n\r\n        /// <summary>\r\n        /// Occurs when this control starts scrolling.\r\n        /// </summary>\r\n        public event EventHandler ScrollingStarted;\r\n\r\n        /// <summary>\r\n        /// Occurs when this control stops scrolling.\r\n        /// </summary>\r\n        public event EventHandler ScrollingCompleted;\r\n\r\n        /// <summary>\r\n        /// Occurs when the group Popup's IsOpen has been set to true.\r\n        /// </summary>\r\n        public event EventHandler<GroupViewOpenedEventArgs> GroupViewOpened;\r\n\r\n        /// <summary>\r\n        /// Occurs when the group popup is about to close.\r\n        /// </summary>\r\n        public event EventHandler<GroupViewClosingEventArgs> GroupViewClosing;\r\n\r\n        /// <summary>\r\n        /// Occurs when an item is about to be \"realized\".\r\n        /// </summary>\r\n        public event EventHandler<LinkUnlinkEventArgs> Link;\r\n\r\n        /// <summary>\r\n        /// Occurs when an item is about to be \"un-realized\".\r\n        /// </summary>\r\n        public event EventHandler<LinkUnlinkEventArgs> Unlink;\r\n\r\n        /// <summary>\r\n        /// Occurs when the user has dragged the items up from the bottom as far as they can go. \r\n        /// </summary>\r\n        public event EventHandler StretchingBottom;\r\n\r\n        /// <summary>\r\n        /// Occurs when the user is no longer stretching. \r\n        /// </summary>\r\n        public event EventHandler StretchingCompleted;\r\n\r\n        /// <summary>\r\n        /// Occurs when the user has dragged the items down from the top as far as they can go.  \r\n        /// </summary>\r\n        public event EventHandler StretchingTop;\r\n\r\n        #endregion\r\n\r\n        #region Constructor\r\n        /// <summary>\r\n        /// Initializes a new instance of <see cref=\"LongListSelector\"/>.\r\n        /// </summary>\r\n        public LongListSelector()\r\n        {\r\n            DefaultStyleKey = typeof(LongListSelector);\r\n        }\r\n\r\n        //~LongListSelector()\r\n        //{\r\n            \r\n        //}\r\n        #endregion\r\n\r\n        //\r\n        // Public methods\r\n        //\r\n\r\n        public void ScrollToTop()\r\n        {\r\n            if (_scrollViewer != null)\r\n            {\r\n                _scrollViewer.ScrollToVerticalOffset(0.0);\r\n            }\r\n        }\r\n\r\n        #region ScrollTo(...)\r\n        /// <summary>\r\n        /// Instantly jump to the specified item. \r\n        /// </summary>\r\n        /// <param name=\"item\">Item to jump to.</param>\r\n        public void ScrollTo(object item)\r\n        {\r\n            if (_listBox != null && item != null)\r\n            {\r\n                ObservableCollection<LongListSelectorItem> tuples = (ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource;\r\n                LongListSelectorItem lastTuple = tuples[tuples.Count - 1];\r\n                \r\n                _listBox.ScrollIntoView(lastTuple);\r\n\r\n                UpdateLayout();\r\n\r\n                foreach (LongListSelectorItem tuple in _listBox.ItemsSource)\r\n                {\r\n                    if (tuple.Item != null && tuple.Item.Equals(item))\r\n                    {\r\n                        _listBox.ScrollIntoView(tuple);\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region ScrollToGroup(...)\r\n        /// <summary>\r\n        /// Instantly jump to the specified  group. \r\n        /// </summary>\r\n        /// <param name=\"group\">Group to jump to.</param>\r\n        public void ScrollToGroup(object group)\r\n        {\r\n            ScrollTo(group);\r\n        }\r\n        #endregion\r\n\r\n        #region DisplayGroupView()\r\n        /// <summary>\r\n        /// Invokes the group view if a GroupItemTemplate has been defined. \r\n        /// </summary>\r\n        public void DisplayGroupView()\r\n        {\r\n            if (GroupItemTemplate != null && !IsFlatList)\r\n            {\r\n                OpenPopup();\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region CloseGroupView()\r\n        /// <summary>\r\n        /// Closes the group view unconditionally. \r\n        /// </summary>\r\n        /// <remarks>Does not raise the GroupViewClosingEventArgs event.</remarks>\r\n        public void CloseGroupView()\r\n        {\r\n            ClosePopup(null, false);\r\n        }\r\n        #endregion\r\n\r\n        // Obsolete:\r\n\r\n        #region AnimateTo(...)        \r\n        /// <summary>\r\n        /// Animate the scrolling of the list to the specified item.\r\n        /// </summary>\r\n        /// <param name=\"item\">Item to scroll to.</param>\r\n        [Obsolete(\"AnimateTo(...) call ScrollTo(...) to jump without animation to the given item.\")]\r\n        public void AnimateTo(object item)\r\n        {\r\n            ScrollTo(item);\r\n        }\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Returns either containers or items for either all items with \r\n        /// containers or just the visible ones, as specified by the \r\n        /// parameters.\r\n        /// </summary>\r\n        /// <param name=\"onlyItemsInView\">When true, will return values for \r\n        /// only items that are in view.</param>\r\n        /// <param name=\"getContainers\">When true, will return the containers \r\n        /// rather than the items.</param>\r\n        /// <returns>Returns either containers or items for either all items \r\n        /// with containers or just the visible ones, as specified by the \r\n        /// parameters. </returns>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"getContainers\", Justification = \"This is an obsolete old method that cannot change now.\")]\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"onlyItemsInView\", Justification = \"This is an obsolete old method that cannot change now.\")]\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1822:MarkMembersAsStatic\", Justification = \"This is an obsolete old method that cannot change now.\")]\r\n        [Obsolete(\"GetItemsWithContainers(...) always returns an empty collection of items. Rely on Link/Unlink to know an item get realized or unrealized.\")]\r\n        public ICollection<Object> GetItemsWithContainers(bool onlyItemsInView, bool getContainers)\r\n        {\r\n            return new Collection<Object>();\r\n        }\r\n\r\n        #region GetItemsInView()\r\n        /// <summary>\r\n        /// Returns all of the items that are currently in view.\r\n        /// This is not the same as the items that have associated visual elements: there are usually some visuals offscreen.\r\n        /// This might be an empty list if scrolling is happening too quickly. \r\n        /// </summary>\r\n        /// <returns>Returns all of the items that are currently in view.</returns>\r\n        [Obsolete(\"GetItemsInView() always returns an empty collection of items. Rely on Link/Unlink to know an item get realized or unrealized.\")]\r\n        public ICollection<Object> GetItemsInView()\r\n        {\r\n            return GetItemsWithContainers(true, false);\r\n        }\r\n        #endregion\r\n\r\n        #region OnItemsSourceChanged()\r\n        /// <summary>\r\n        /// Called when the ItemsSource dependency property changes.\r\n        /// </summary>\r\n        private void OnItemsSourceChanged()\r\n        {\r\n            // Reload the whole list.\r\n            LoadDataIntoListBox();\r\n        }\r\n        #endregion\r\n\r\n        #region OnApplyTemplate()\r\n        /// <summary>\r\n        /// Called whenever a template gets applied on this control.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n            // Unsubscribe from events we registered for in the past.\r\n            if (_listBox != null)\r\n            {\r\n                _listBox.SelectionChanged -= OnSelectionChanged;\r\n                _listBox.Link -= OnLink;\r\n                _listBox.Unlink -= OnUnlink;\r\n            }\r\n            \r\n            if (_scrollGroup != null)\r\n            {\r\n                _scrollGroup.CurrentStateChanging -= OnScrollStateChanging;\r\n            }\r\n\r\n            // Locates and setup the TemplatedListBox in the template. If no TemplatedListBox is found, we\r\n            // initialize one.\r\n            _listBox = GetTemplateChild(TemplatedListBoxName) as TemplatedListBox ?? new TemplatedListBox();\r\n            _listBox.ItemsPanel = ItemsPanel;\r\n            _listBox.ListHeaderTemplate = ListHeaderTemplate;\r\n            _listBox.ListFooterTemplate = ListFooterTemplate;\r\n            _listBox.GroupHeaderTemplate = GroupHeaderTemplate;\r\n            _listBox.GroupFooterTemplate = GroupFooterTemplate;\r\n            _listBox.ItemTemplate = ItemTemplate;\r\n            _listBox.SelectionChanged += OnSelectionChanged;\r\n            _listBox.Link += OnLink;\r\n            _listBox.Unlink += OnUnlink;\r\n\r\n            // Retrieves the ScrollViewer of the list box.\r\n            ScrollViewer sv = _listBox.GetFirstLogicalChildByType<ScrollViewer>(true);\r\n\r\n            if (sv != null)\r\n            {\r\n                _scrollViewer = sv;\r\n\r\n                _scrollViewer.HorizontalScrollBarVisibility = HorizontalScrollBarVisibility;\r\n                _scrollViewer.VerticalScrollBarVisibility = VerticalScrollBarVisibility;\r\n\r\n                // Visual States are always on the first child of the control template \r\n                FrameworkElement element = VisualTreeHelper.GetChild(sv, 0) as FrameworkElement;\r\n                if (element != null)\r\n                {\r\n                    _scrollGroup = VisualStates.TryGetVisualStateGroup(sv, ScrollStatesGroupName);\r\n                    if (_scrollGroup != null)\r\n                    {\r\n                        _scrollGroup.CurrentStateChanging += OnScrollStateChanging;\r\n                    }\r\n\r\n                    _verticalCompressionGroup = VisualStates.TryGetVisualStateGroup(sv, VerticalCompressionStateName);\r\n                    if(_verticalCompressionGroup != null)\r\n                    {\r\n                        _verticalCompressionGroup.CurrentStateChanging += OnStretchStateChanging;\r\n                    }\r\n                }\r\n\r\n                var binding = new Binding(\"VerticalOffset\") { Source = _scrollViewer };\r\n                SetBinding(VerticalOffsetProperty, binding);\r\n            }\r\n\r\n            LoadDataIntoListBox();\r\n        }\r\n        #endregion\r\n\r\n        #region LoadDataIntoListBox()\r\n        /// <summary>\r\n        /// Loads ItemsSource into the hosted list box.\r\n        /// </summary>\r\n        private void LoadDataIntoListBox()\r\n        {\r\n            if (_listBox != null)\r\n            {\r\n                ObservableCollection<LongListSelectorItem> tuples = new ObservableCollection<LongListSelectorItem>();\r\n                \r\n                AddListHeader(tuples);\r\n\r\n                UnsubscribeFromAllCollections();\r\n                \r\n                // if it's a flat list, add the items without grouping.\r\n                if (IsFlatList)\r\n                {\r\n                    if (ItemsSource != null)\r\n                    {\r\n                        foreach (object item in ItemsSource)\r\n                        {\r\n                            tuples.Add(new LongListSelectorItem() { Item = item, ItemType = LongListSelectorItemType.Item });\r\n                        }\r\n                    }\r\n                }\r\n                // Otherwise, apply the grouping logic.\r\n                else\r\n                {\r\n                    IEnumerable groups = ItemsSource;\r\n                    if (groups != null)\r\n                    {\r\n                        foreach (object group in groups)\r\n                        {\r\n                            AddGroup(group, tuples);\r\n                        }\r\n                    }\r\n                }\r\n\r\n\r\n                AddListFooter(tuples);\r\n\r\n                _rootCollection = ItemsSource as INotifyCollectionChanged;\r\n                if (_rootCollection != null)\r\n                {\r\n                    _rootCollection.CollectionChanged += OnCollectionChanged;\r\n                }\r\n\r\n                _listBox.ItemsSource = tuples;\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region  List/Footer Headers\r\n        /// <summary>\r\n        /// Adds a list header to the given list.\r\n        /// </summary>\r\n        private void AddListHeader(IList<LongListSelectorItem> tuples)\r\n        {\r\n            if (HasListHeader && ShowListHeader &&  // Adds the list header if it got a template or if it's a UI element itself.\r\n                (tuples.Count == 0 || tuples[0].ItemType != LongListSelectorItemType.ListHeader))   // Also, make sure its not already there\r\n            {\r\n                tuples.Insert(0, new LongListSelectorItem() { Item = ListHeader, ItemType = LongListSelectorItemType.ListHeader });\r\n            }\r\n        }\r\n        /// <summary>\r\n        /// Adds a list header to the listbox.\r\n        /// </summary>\r\n        private void AddListHeader()\r\n        {\r\n            AddListHeader((ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the list header from the given list.\r\n        /// </summary>\r\n        private static void RemoveListHeader(IList<LongListSelectorItem> tuples)\r\n        {\r\n            if (tuples.Count > 0 && tuples[0].ItemType == LongListSelectorItemType.ListHeader)\r\n            {\r\n                tuples.RemoveAt(0);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the list header from the listbox.\r\n        /// </summary>\r\n        private void RemoveListHeader()\r\n        {\r\n            RemoveListHeader((ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds a list footer to the given list.\r\n        /// </summary>\r\n        private void AddListFooter(IList<LongListSelectorItem> tuples)\r\n        {\r\n            if (HasListFooter && ShowListFooter &&  // Adds the list footer if it got a template or if it's a UI element itself.\r\n                (tuples.Count == 0 || tuples[tuples.Count - 1].ItemType != LongListSelectorItemType.ListFooter))   // Also, make sure its not already there\r\n            {\r\n                tuples.Add(new LongListSelectorItem() { Item = ListFooter, ItemType = LongListSelectorItemType.ListFooter });\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds a list footer to the listbox.\r\n        /// </summary>\r\n        private void AddListFooter()\r\n        {\r\n            AddListFooter((ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the list footer from the given list.\r\n        /// </summary>\r\n        private static void RemoveListFooter(IList<LongListSelectorItem> tuples)\r\n        {\r\n            LongListSelectorItem lastTuple = tuples[tuples.Count - 1];\r\n            if (lastTuple != null && lastTuple.ItemType == LongListSelectorItemType.ListFooter)\r\n            {\r\n                tuples.RemoveAt(tuples.Count - 1);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the list footer from the listbox.\r\n        /// </summary>\r\n        private void RemoveListFooter()\r\n        {\r\n            RemoveListFooter((ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource);\r\n        }\r\n        #endregion\r\n\r\n        #region AddGroup(...)\r\n        /// <summary>\r\n        /// Adds a group to a list of tuples.\r\n        /// </summary>\r\n        /// <param name=\"groupToAdd\">Group to add.</param>\r\n        /// <param name=\"tuples\">List to which the method will add the group.</param>\r\n        private void AddGroup(object groupToAdd, IList tuples)\r\n        {\r\n            IEnumerable group = groupToAdd as IEnumerable;\r\n            if (group != null)\r\n            {\r\n                bool groupHasItems = false;\r\n                \r\n                // Adds the group header\r\n                if (GroupHeaderTemplate != null)\r\n                {\r\n                    tuples.Add(new LongListSelectorItem() { Item = group, ItemType = LongListSelectorItemType.GroupHeader });\r\n                }\r\n\r\n                // For each group header, add its items\r\n                foreach (object item in group)\r\n                {\r\n                    tuples.Add(new LongListSelectorItem() { Item = item, ItemType = LongListSelectorItemType.Item, Group = group });\r\n                    groupHasItems = true;\r\n                }\r\n\r\n                // Add the group footer if the group has items or if we must display all groups whether or not they have items.\r\n                if (groupHasItems || DisplayAllGroups)\r\n                {\r\n                    if (GroupFooterTemplate != null)\r\n                    {\r\n                        tuples.Add(new LongListSelectorItem() { Item = group, ItemType = LongListSelectorItemType.GroupFooter });\r\n                    }\r\n                }\r\n                // Otherwise, remove the group header\r\n                else if (GroupHeaderTemplate != null)\r\n                {\r\n                    tuples.RemoveAt(tuples.Count - 1);\r\n                }\r\n\r\n                // Subscribe to collection change event\r\n                INotifyCollectionChanged groupCollection = group as INotifyCollectionChanged;\r\n                if (groupCollection != null && !_groupCollections.Contains(groupCollection))\r\n                {\r\n                    groupCollection.CollectionChanged += OnCollectionChanged;\r\n                    _groupCollections.Add(groupCollection);\r\n                }\r\n\r\n            }\r\n        }\r\n        #endregion  \r\n\r\n        #region AddGroupHeadersAndFooters(...)\r\n        /// <summary>\r\n        /// Adds group headers or footers after their template switch from being null\r\n        /// to an actual value.\r\n        /// </summary>\r\n        /// <param name=\"addHeaders\">Specifies whether or not to add group headers.</param>\r\n        /// <param name=\"addFooters\">Specifies whether or not to add group footers.</param>\r\n        /// <remarks>Used only when templates for group headers/footers switch from being null.\r\n        /// In this case, they must be added to the lisbox if a group is not empty or DisplayAllGroups is true.\r\n        /// For performance reasons, this method makes an assumption that headers/footers are not already present.\r\n        /// Which is the case when its called from OnDataTemplateChanged.</remarks>\r\n        private void AddGroupHeadersAndFooters(bool addHeaders, bool addFooters)\r\n        {\r\n            int indexInListBox = 0;\r\n\r\n            if (HasListHeader && ShowListHeader)\r\n            {\r\n                ++indexInListBox;\r\n            }\r\n\r\n            IEnumerable groups = ItemsSource;\r\n            ObservableCollection<LongListSelectorItem> tuples = (ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource;\r\n\r\n            if (groups != null)\r\n            {\r\n                foreach (object group in groups)\r\n                {\r\n                    var groupAsEnumerable = group as IEnumerable;\r\n                    if (groupAsEnumerable != null)\r\n                    {\r\n                        int itemsCount = GetHeadersAndItemsCountFromGroup(groupAsEnumerable);\r\n\r\n                        // Adds the group header\r\n                        if (addHeaders && GroupHeaderTemplate != null && itemsCount > 0)\r\n                        {\r\n                            tuples.Insert(indexInListBox, new LongListSelectorItem\r\n                            { \r\n                                Item = group, \r\n                                ItemType = LongListSelectorItemType.GroupHeader \r\n                            });\r\n                        }\r\n\r\n                        indexInListBox += itemsCount;\r\n\r\n                        // Adds the group footer\r\n                        if (addFooters && GroupFooterTemplate != null && itemsCount > 0)\r\n                        {\r\n                            tuples.Insert(indexInListBox - 1, new LongListSelectorItem\r\n                            { \r\n                                Item = group, \r\n                                ItemType = LongListSelectorItemType.GroupFooter \r\n                            });\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds group headers after the GroupHeaderTeamplate switch from being null\r\n        /// to an actual value.\r\n        /// </summary>\r\n        private void AddGroupHeaders()\r\n        {\r\n            AddGroupHeadersAndFooters(true, false);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds group headers after the GroupFooterTeamplate switch from being null\r\n        /// to an actual value.\r\n        /// </summary>\r\n        private void AddGroupFooters()\r\n        {\r\n            AddGroupHeadersAndFooters(false, true);\r\n        }\r\n        #endregion\r\n\r\n        #region RemoveAllGroupHeadersAndFooters(...)\r\n        /// <summary>\r\n        /// Removes group headers or footers after their template becomes null.\r\n        /// </summary>\r\n        /// <param name=\"removeHeaders\">Specifies whether or not to remove group headers.</param>\r\n        /// <param name=\"removeFooters\">Specifies whether or not to remove group footers.</param>\r\n        private void RemoveAllGroupHeadersAndFooters(bool removeHeaders, bool removeFooters)\r\n        {\r\n            ObservableCollection<LongListSelectorItem> tuples = (ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource;\r\n            for (int i = 0; i < tuples.Count; ++i)\r\n            {\r\n                if ((removeHeaders && tuples[i].ItemType == LongListSelectorItemType.GroupHeader) ||\r\n                    (removeFooters && tuples[i].ItemType == LongListSelectorItemType.GroupFooter))\r\n                {\r\n                    tuples.RemoveAt(i--);   // the -- is there so we don't skip tuples\r\n                }\r\n            }\r\n        }\r\n        private void RemoveAllGroupHeaders()\r\n        {\r\n            RemoveAllGroupHeadersAndFooters(true, false);\r\n        }\r\n        private void RemoveAllGroupFooters()\r\n        {\r\n            RemoveAllGroupHeadersAndFooters(false, true);\r\n        }\r\n        #endregion\r\n\r\n        #region UnsubscribeFromAllCollections()\r\n        /// <summary>\r\n        /// Unsubscrives from every collection in ItemsSource.\r\n        /// </summary>\r\n        private void UnsubscribeFromAllCollections()\r\n        {\r\n            if (_rootCollection != null)\r\n            {\r\n                _rootCollection.CollectionChanged -= OnCollectionChanged;\r\n            }\r\n\r\n            foreach (INotifyCollectionChanged collection in _groupCollections)\r\n            {\r\n                collection.CollectionChanged -= OnCollectionChanged;\r\n            }\r\n\r\n            _rootCollection = null;\r\n            _groupCollections.Clear();\r\n        }\r\n        #endregion\r\n\r\n        #region InsertNewGroups(...)\r\n        /// <summary>\r\n        /// Inserts new groups in the list box.\r\n        /// </summary>\r\n        /// <param name=\"newGroups\">List of the new groups to insert.</param>\r\n        /// <param name=\"newGroupsIndex\">Insertion index relative to the collection.</param>\r\n        private void InsertNewGroups(IList newGroups, int newGroupsIndex)\r\n        {\r\n            ObservableCollection<LongListSelectorItem> tuples = (ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource;\r\n\r\n            // 1 - Builds items tuples for the new groups\r\n            List<LongListSelectorItem> newGroupsTuples = new List<LongListSelectorItem>();\r\n            \r\n            foreach (object group in newGroups)\r\n            {\r\n                AddGroup(group, newGroupsTuples);\r\n            }\r\n\r\n            if (newGroupsTuples.Count > 0)\r\n            {\r\n                // 2 - Finds insertion index in the list box\r\n                int insertIndex = GetGroupIndexInListBox(newGroupsIndex);\r\n\r\n                // 3 - Inserts the new items into the list box\r\n                foreach (LongListSelectorItem tuple in newGroupsTuples)\r\n                {\r\n                    tuples.Insert(insertIndex++, tuple);\r\n                }\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region InsertNewItems(...)\r\n        /// <summary>\r\n        /// Inserts new items in the list box.\r\n        /// </summary>\r\n        /// <param name=\"newItems\">List of new items to insert.</param>\r\n        /// <param name=\"newItemsIndex\">Insertion index relative to the collection</param>\r\n        /// <param name=\"group\">Group into which the items are inserted. Can be null if IsFlatList == true</param>\r\n        private void InsertNewItems(IList newItems, int newItemsIndex, IEnumerable group)\r\n        {\r\n            ObservableCollection<LongListSelectorItem> tuples = (ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource;\r\n\r\n            // 1 - Builds items tuples for the new items\r\n            List<LongListSelectorItem> newItemsTuples = new List<LongListSelectorItem>();\r\n            foreach (object item in newItems)\r\n            {\r\n                newItemsTuples.Add(new LongListSelectorItem\r\n                { \r\n                    Group = group, \r\n                    Item = item, \r\n                    ItemType = LongListSelectorItemType.Item \r\n                });\r\n            }\r\n\r\n            // 2 - Finds the insertion index in the listbox\r\n            // Since a single group might be referenced by more than one, we might need to update more than one spot in the listbox\r\n            if (group != null)\r\n            {\r\n                int i = 0;\r\n                bool groupWasNotDisplayed = ((IList)group).Count == newItems.Count && !DisplayAllGroups;\r\n\r\n                foreach (object g in ItemsSource)\r\n                {\r\n                    if (g == group)\r\n                    {\r\n                        int insertIndex = GetGroupIndexInListBox(i);\r\n\r\n                        if (GroupHeaderTemplate != null)\r\n                        {\r\n                            if (groupWasNotDisplayed)\r\n                            {\r\n                                tuples.Insert(insertIndex, new LongListSelectorItem() { ItemType = LongListSelectorItemType.GroupHeader, Item = group });\r\n                            }\r\n                            ++insertIndex;\r\n                        }\r\n\r\n                        insertIndex += newItemsIndex;\r\n\r\n                        // 3 - Inserts the new items into the list box\r\n                        foreach (LongListSelectorItem tuple in newItemsTuples)\r\n                        {\r\n                            tuples.Insert(insertIndex++, tuple);\r\n                        }\r\n\r\n                        if (groupWasNotDisplayed && GroupFooterTemplate != null)\r\n                        {\r\n                            tuples.Insert(insertIndex++, new LongListSelectorItem() { ItemType = LongListSelectorItemType.GroupFooter, Item = group });\r\n                        }\r\n                    }\r\n                    ++i;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                int insertIndex = newItemsIndex;\r\n                if (HasListHeader && ShowListHeader)\r\n                {\r\n                    ++insertIndex;\r\n                }\r\n\r\n                // 3 - Inserts the new items into the list box\r\n                foreach (LongListSelectorItem tuple in newItemsTuples)\r\n                {\r\n                    tuples.Insert(insertIndex++, tuple);\r\n                }\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region RemoveOldGroups(...)\r\n        /// <summary>\r\n        /// Removes groups from the list box.\r\n        /// </summary>\r\n        /// <param name=\"oldGroups\">List of groups to remove.</param>\r\n        /// <param name=\"oldGroupsIndex\">Start index relative to the root collection.</param>\r\n        private void RemoveOldGroups(IList oldGroups, int oldGroupsIndex)\r\n        {\r\n            ObservableCollection<LongListSelectorItem> tuples = (ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource;\r\n\r\n            // 1 - Find the index at which we start removing groups\r\n            int removeStartIndex = 0;\r\n            if (oldGroupsIndex > 0)\r\n            {\r\n                removeStartIndex = GetGroupIndexInListBox(oldGroupsIndex - 1);\r\n                IEnumerable group = ((IList)ItemsSource)[oldGroupsIndex - 1] as IEnumerable;\r\n                if (group != null)\r\n                {\r\n                    removeStartIndex += GetHeadersAndItemsCountFromGroup(group);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (HasListHeader && ShowListHeader)\r\n                {\r\n                    ++removeStartIndex;\r\n                }\r\n            }\r\n\r\n            // 2 - Calculates how many items to delete from the ListBox\r\n            int itemsToRemoveCount = GetItemsCountFromGroups(oldGroups);\r\n\r\n            // 3 - Removes the old items from the ListBox\r\n            for (int i = 0; i < itemsToRemoveCount; ++i)\r\n            {\r\n                tuples.RemoveAt(removeStartIndex);\r\n            }\r\n\r\n            // 4 - Unsubscribe from the old groups\r\n            foreach (INotifyCollectionChanged collection in oldGroups)\r\n            {\r\n                collection.CollectionChanged -= OnCollectionChanged;\r\n            }\r\n            \r\n        }\r\n        #endregion\r\n\r\n        #region RemoveOldItems(...)\r\n        /// <summary>\r\n        /// Removes old items from a group or from the root collection.\r\n        /// </summary>\r\n        /// <param name=\"oldItems\">List of items to remove.</param>\r\n        /// <param name=\"oldItemsIndex\">Start index relative to the group or root collection.</param>\r\n        /// <param name=\"group\">Group from which items are removed. Can be null if IsFlatList == true.</param>\r\n        private void RemoveOldItems(IList oldItems, int oldItemsIndex, IEnumerable group)\r\n        {\r\n            ObservableCollection<LongListSelectorItem> tuples = (ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource;\r\n\r\n            // 1 - Finds the remove index in the listbox\r\n            // Since a single group might be referenced by more than one, we might need to update more than one group\r\n            if (group != null)\r\n            {\r\n                int i = 0;\r\n\r\n                foreach (object g in ItemsSource)\r\n                {\r\n                    if (g == group)\r\n                    {\r\n                        int removeIndex = GetGroupIndexInListBox(i);\r\n                        removeIndex += oldItemsIndex;\r\n\r\n                        if (GroupHeaderTemplate != null)\r\n                        {\r\n                            ++removeIndex;\r\n                        }\r\n\r\n                        // 2 - Removes the old items\r\n                        for (int j = 0; j < oldItems.Count; ++j)\r\n                        {\r\n                            tuples.RemoveAt(removeIndex);\r\n                        }\r\n\r\n                        // 3 - Hides the group header and footer if it's empty and DisplayAllGroups is false\r\n                        if (((IList)group).Count == 0 && !DisplayAllGroups)\r\n                        {\r\n                            if (GroupFooterTemplate != null)\r\n                            {\r\n                                tuples.RemoveAt(removeIndex); // Removes the group footer\r\n                            }\r\n                            if (GroupHeaderTemplate != null)\r\n                            {\r\n                                tuples.RemoveAt(removeIndex - 1); // Removes the group header\r\n                            }\r\n                        }\r\n                    }\r\n                    ++i;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                int removeIndex = oldItemsIndex;\r\n                if (HasListHeader && ShowListHeader)\r\n                {\r\n                    ++removeIndex;\r\n                }\r\n                for(int i = 0; i < oldItems.Count; ++i)\r\n                    tuples.RemoveAt(removeIndex);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region GetGroupIndexInListBox(...)\r\n        /// <summary>\r\n        /// Returns, for a group, an index relative to the templated list box from an index relative to the root collection.\r\n        /// </summary>\r\n        /// <param name=\"indexInLLS\">Index relative to the root collection.</param>\r\n        /// <returns>Returns, for a group, an index relative to the templated list box from an index relative to the root collection.</returns>\r\n        private int GetGroupIndexInListBox(int indexInLLS)\r\n        {\r\n            int indexInListBox = 0, index = 0;\r\n\r\n            if (HasListHeader && ShowListHeader)\r\n            {\r\n                ++indexInListBox;\r\n            }\r\n\r\n            IEnumerable groups = ItemsSource;\r\n\r\n            if (groups != null)\r\n            {\r\n                foreach (object group in groups)\r\n                {\r\n                    if (indexInLLS == index)\r\n                    {\r\n                        break;\r\n                    }\r\n\r\n                    ++index;\r\n\r\n                    var groupAsEnumerable = group as IEnumerable;\r\n                    if (groupAsEnumerable != null)\r\n                    {\r\n                        indexInListBox += GetHeadersAndItemsCountFromGroup(groupAsEnumerable);\r\n                    }\r\n                }\r\n            }\r\n\r\n            return indexInListBox;\r\n        }\r\n        #endregion\r\n\r\n        #region GetItemsCountFromGroups(...)\r\n        /// <summary>\r\n        /// Returns the number of items in a list of groups.\r\n        /// </summary>\r\n        /// <param name=\"groups\">List of groups from which to retrieve the items count.</param>\r\n        /// <returns>Returns the number of items in a list of groups.</returns>\r\n        private int GetItemsCountFromGroups(IEnumerable groups)\r\n        {\r\n            int count = 0;\r\n\r\n            foreach (object g in groups)\r\n            {\r\n                IEnumerable group = g as IEnumerable;\r\n                if (group != null)\r\n                {\r\n                    count += GetHeadersAndItemsCountFromGroup(group);\r\n                }\r\n            }\r\n            \r\n            return count;\r\n        }\r\n        #endregion\r\n\r\n        #region GetItemsCountFromGroup(...)\r\n        /// <summary>\r\n        /// Returns the number of items in a group including the group header.\r\n        /// </summary>\r\n        /// <param name=\"group\">Group from which to retrieve the items count.</param>\r\n        /// <returns>Returns the number of items in a group including the group header.</returns>\r\n        private int GetHeadersAndItemsCountFromGroup(IEnumerable group)\r\n        {\r\n            int count = 0;\r\n\r\n            IList groupAsList = group as IList;\r\n            if (groupAsList != null)\r\n            {\r\n                count += groupAsList.Count;\r\n            }\r\n            else\r\n            {\r\n                count += group.Cast<object>().Count();\r\n            }\r\n\r\n            bool groupHasItems = count > 0;\r\n\r\n            if ((groupHasItems || DisplayAllGroups) && GroupHeaderTemplate != null)\r\n            {\r\n                ++count;\r\n            }\r\n\r\n            if ((groupHasItems || DisplayAllGroups) && GroupFooterTemplate != null)\r\n            {\r\n                ++count;\r\n            }\r\n            \r\n            return count;\r\n        }\r\n        #endregion\r\n\r\n        #region UpdateListBoxItemsTemplate(...)\r\n        /// <summary>\r\n        /// Updates the templates for a given item type in the list box.\r\n        /// </summary>\r\n        /// <param name=\"itemType\">Item type for which to update the template.</param>\r\n        /// <param name=\"newTemplate\">New template that will replace the old one.</param>\r\n        private void UpdateItemsTemplate(LongListSelectorItemType itemType, DataTemplate newTemplate)\r\n        {\r\n            if (_listBox != null)\r\n            {\r\n                // Update template for items that have been linked (realized)\r\n                IEnumerable<TemplatedListBoxItem> items = _listBox.GetLogicalChildrenByType<TemplatedListBoxItem>(false);\r\n                foreach (TemplatedListBoxItem item in items)\r\n                {\r\n                    LongListSelectorItem tuple = (LongListSelectorItem)item.Tuple;\r\n                    if (tuple.ItemType == itemType)\r\n                    {\r\n                        item.ContentTemplate = newTemplate;\r\n                    }\r\n                }\r\n\r\n                // Save the new template so they can be applied in the future when new items\r\n                // are linked (realized)\r\n                switch (itemType)\r\n                {\r\n                    case LongListSelectorItemType.ListHeader:\r\n                        _listBox.ListHeaderTemplate = newTemplate;\r\n                        break;\r\n                    case LongListSelectorItemType.ListFooter:\r\n                        _listBox.ListFooterTemplate = newTemplate;\r\n                        break;\r\n                    case LongListSelectorItemType.GroupHeader:\r\n                        _listBox.GroupHeaderTemplate = newTemplate;\r\n                        break;\r\n                    case LongListSelectorItemType.GroupFooter:\r\n                        _listBox.GroupFooterTemplate = newTemplate;\r\n                        break;\r\n                    case LongListSelectorItemType.Item:\r\n                        _listBox.ItemTemplate = newTemplate;\r\n                        break;\r\n                }\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region OnDataTemplateChanged(...)\r\n        /// <summary>\r\n        /// Called when a data template has changed.\r\n        /// </summary>\r\n        private static void OnDataTemplateChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            LongListSelector lls = (LongListSelector)o;\r\n            if (lls._listBox == null)\r\n                return;\r\n\r\n            DataTemplate newTemplate = (DataTemplate)e.NewValue;\r\n\r\n            if (e.Property == ListHeaderTemplateProperty)\r\n            {\r\n                lls.UpdateItemsTemplate(LongListSelectorItemType.ListHeader, newTemplate);\r\n\r\n                // If the old value was null, we might need to add the list header.\r\n                if (e.OldValue == null)\r\n                {\r\n                    lls.AddListHeader();    // Will add a list header if it's not already there.\r\n                }\r\n                // If we don't have a list header anymore, then remove it from the listbox\r\n                else if (e.NewValue == null && !lls.HasListHeader)\r\n                {\r\n                    lls.RemoveListHeader();\r\n                }\r\n\r\n            }\r\n            else if (e.Property == ListFooterTemplateProperty)\r\n            {\r\n                lls.UpdateItemsTemplate(LongListSelectorItemType.ListFooter, newTemplate);\r\n\r\n                // If the old value was null, we might need to add the list footer.\r\n                if (e.OldValue == null)\r\n                {\r\n                    lls.AddListFooter();    // Will add a list footer if it's not already there.\r\n                }\r\n                // If we don't have a list footer anymore, then remove it from the listbox\r\n                else if (e.NewValue == null && !lls.HasListHeader)\r\n                {\r\n                    lls.RemoveListFooter();\r\n                }\r\n\r\n            }\r\n            else if (e.Property == GroupHeaderProperty)\r\n            {\r\n                lls.UpdateItemsTemplate(LongListSelectorItemType.GroupHeader, newTemplate);\r\n\r\n                // If the old value was null, this means we might need to add group headers to the listbox\r\n                if (e.OldValue == null)\r\n                {\r\n                    lls.AddGroupHeaders();\r\n                }\r\n                // If the new value is null, this means we might need to remove group headers from the listbox\r\n                else if (e.NewValue == null)\r\n                {\r\n                    lls.RemoveAllGroupHeaders();\r\n                }\r\n\r\n            }\r\n            else if(e.Property == GroupFooterProperty)\r\n            {\r\n                lls.UpdateItemsTemplate(LongListSelectorItemType.GroupFooter, newTemplate);\r\n\r\n                // If the old value was null, this means we might need to add group footers to the listbox\r\n                if (e.OldValue == null)\r\n                {\r\n                    lls.AddGroupFooters();\r\n                }\r\n                // If the new value is null, this means we might need to remove group footers from the listbox\r\n                else if (e.NewValue == null)\r\n                {\r\n                    lls.RemoveAllGroupFooters();\r\n                }\r\n\r\n            }\r\n            else if (e.Property == ItemsTemplateProperty)\r\n            {\r\n                lls.UpdateItemsTemplate(LongListSelectorItemType.Item, newTemplate);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region OnDisplayAllGroupsChanged(...)\r\n        /// <summary>\r\n        /// Called when the DisplayAllGroups dependency property changes\r\n        /// </summary>\r\n        private static void OnDisplayAllGroupsChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((LongListSelector)obj).LoadDataIntoListBox();\r\n        }\r\n        #endregion\r\n\r\n        #region OnSelectionChanged(...)\r\n        /// <summary>\r\n        /// Called when there is a change in the selected item(s) in the listbox.\r\n        /// </summary>\r\n        private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            // Group navigation\r\n            //var group = (from t in (IEnumerable<object>)e.AddedItems where ((ItemTuple)t).ItemType == ItemType.GroupHeader select (ItemTuple)t).FirstOrDefault();\r\n            LongListSelectorItem group = null;\r\n            foreach (LongListSelectorItem tuple in e.AddedItems)\r\n            {\r\n                if (tuple.ItemType == LongListSelectorItemType.GroupHeader)\r\n                {\r\n                    group = tuple;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (group != null)\r\n            {\r\n                SelectedItem = null;\r\n                DisplayGroupView();\r\n            }\r\n            else\r\n            {\r\n                var handler = SelectionChanged;\r\n\r\n                if (handler != null)\r\n                {\r\n                    List<LongListSelectorItem> addedItems = new List<LongListSelectorItem>();\r\n                    List<LongListSelectorItem> removedItems = new List<LongListSelectorItem>();\r\n\r\n                    foreach (LongListSelectorItem tuple in e.AddedItems)\r\n                    {\r\n                        if (tuple.ItemType == LongListSelectorItemType.Item)\r\n                        {\r\n                            addedItems.Add(tuple);\r\n                        }\r\n                    }\r\n\r\n                    foreach (LongListSelectorItem tuple in e.RemovedItems)\r\n                    {\r\n                        if (tuple.ItemType == LongListSelectorItemType.Item)\r\n                        {\r\n                            removedItems.Add(tuple);\r\n                        }\r\n                    }\r\n\r\n                    handler(this, new SelectionChangedEventArgs(removedItems, addedItems));\r\n                }\r\n            }\r\n            \r\n        }\r\n        #endregion\r\n\r\n        #region OnCollectionChanged(...)\r\n        /// <summary>\r\n        /// Called when there is a change in the root or a group collection.\r\n        /// </summary>\r\n        private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            var senderAsEnumerable = sender as IEnumerable;\r\n\r\n            switch (e.Action)\r\n            {\r\n                case NotifyCollectionChangedAction.Add:\r\n                    if (sender == _rootCollection)\r\n                    {\r\n                        if (IsFlatList)\r\n                        {\r\n                            InsertNewItems(e.NewItems, e.NewStartingIndex, null);\r\n                        }\r\n                        else\r\n                        {\r\n                            InsertNewGroups(e.NewItems, e.NewStartingIndex);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        InsertNewItems(e.NewItems, e.NewStartingIndex, senderAsEnumerable);\r\n                    }\r\n                    break;\r\n\r\n                case NotifyCollectionChangedAction.Remove:\r\n                    if (sender == _rootCollection)\r\n                    {\r\n                        if (IsFlatList)\r\n                        {\r\n                            RemoveOldItems(e.OldItems, e.OldStartingIndex, null);\r\n                        }\r\n                        else\r\n                        {\r\n                            RemoveOldGroups(e.OldItems, e.OldStartingIndex);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        RemoveOldItems(e.OldItems, e.OldStartingIndex, senderAsEnumerable);\r\n                    }\r\n                    break;\r\n\r\n                case NotifyCollectionChangedAction.Replace:\r\n                case NotifyCollectionChangedAction.Reset:\r\n                    LoadDataIntoListBox();\r\n                    break;\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region OnScrollStateChanging(...)\r\n        /// <summary>\r\n        /// Called when the scrolling state of the list box changes.\r\n        /// </summary>\r\n        private void OnScrollStateChanging(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            IsScrolling = e.NewState.Name == ScrollingState;\r\n\r\n            if (e.NewState.Name == ScrollingState && ScrollingStarted != null)\r\n            {\r\n                ScrollingStarted(this, null);\r\n            }\r\n            else if (e.NewState.Name == NotScrollingState && ScrollingCompleted != null)\r\n            {\r\n                ScrollingCompleted(this, null);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region OnScrollStateChanging(...)\r\n        /// <summary>\r\n        /// Called when the scrolling state of the list box changes.\r\n        /// </summary>\r\n        private void OnStretchStateChanging(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            IsStretching = e.NewState.Name == CompressionBottom || e.NewState.Name == CompressionTop;\r\n\r\n            if (e.NewState.Name == CompressionTop && StretchingTop != null)\r\n            {\r\n                StretchingTop(this, null);\r\n            }\r\n            else if (e.NewState.Name == CompressionBottom && StretchingBottom != null)\r\n            {\r\n                StretchingBottom(this, null);\r\n            }\r\n            else if (e.NewState.Name == NoVerticalCompression && StretchingCompleted != null)\r\n            {\r\n                StretchingCompleted(this, null);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region OnLink(...)\r\n        /// <summary>\r\n        /// Called when an item gets realized.\r\n        /// </summary>\r\n        void OnLink(object sender, LinkUnlinkEventArgs e)\r\n        {\r\n            if (Link != null)\r\n            {\r\n                Link(this, e);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region OnUnlink(...)\r\n        /// <summary>\r\n        /// Called when an item gets unrealized.\r\n        /// </summary>\r\n        void OnUnlink(object sender, LinkUnlinkEventArgs e)\r\n        {\r\n            if (Unlink != null)\r\n            {\r\n                Unlink(this, e);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public int SelectedIndex\r\n        {\r\n            get { return _listBox.SelectedIndex; }\r\n        }\r\n\r\n        public DependencyObject ContainerFromSelectedItem()\r\n        {\r\n            if (_listBox == null\r\n                || _listBox.ItemContainerGenerator == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return _listBox.ItemContainerGenerator.ContainerFromItem(_listBox.SelectedItem);\r\n        }\r\n\r\n        public DependencyObject ContainerFromItem(object item)\r\n        {\r\n            if (_listBox == null\r\n                || _listBox.ItemContainerGenerator == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var tuples = (ObservableCollection<LongListSelectorItem>)_listBox.ItemsSource;\r\n            if (tuples != null && tuples.Count > 0)\r\n            {\r\n                foreach (var tuple in tuples)\r\n                {\r\n                    if (tuple.Item == item)\r\n                    {\r\n                        return _listBox.ItemContainerGenerator.ContainerFromItem(tuple);\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        #region Additional\r\n\r\n        private double _closeToEndPercent = 0.7;\r\n\r\n        public double CloseToEndPercent\r\n        {\r\n            get { return _closeToEndPercent; }\r\n            set { _closeToEndPercent = value; }\r\n        }\r\n\r\n        private double _prevVerticalOffset;\r\n\r\n        public static readonly DependencyProperty VerticalOffsetProperty = DependencyProperty.Register(\r\n            \"VerticalOffset\", typeof(double), typeof(LongListSelector), new PropertyMetadata(default(double), OnVerticalOffsetChanged));\r\n\r\n        private static void OnVerticalOffsetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var longListSelector = d as LongListSelector;\r\n            if (longListSelector != null)\r\n            {\r\n                longListSelector.OnListenerChanged(longListSelector, new BindingChangedEventArgs(e));\r\n            }\r\n        }\r\n\r\n        public double VerticalOffset\r\n        {\r\n            get { return (double) GetValue(VerticalOffsetProperty); }\r\n            set { SetValue(VerticalOffsetProperty, value); }\r\n        }\r\n\r\n        private void OnListenerChanged(object sender, BindingChangedEventArgs e)\r\n        {\r\n            if (_prevVerticalOffset >= _scrollViewer.VerticalOffset) return;\r\n            if (_scrollViewer.VerticalOffset == 0.0 && _scrollViewer.ScrollableHeight == 0.0) return;\r\n\r\n            _prevVerticalOffset = _scrollViewer.VerticalOffset;\r\n            var atBottom = _scrollViewer.VerticalOffset >= _scrollViewer.ScrollableHeight * CloseToEndPercent;\r\n\r\n            if (atBottom)\r\n            {\r\n                RaiseCloseToEnd();\r\n            }\r\n        }\r\n\r\n        public event EventHandler<EventArgs> CloseToEnd;\r\n\r\n        protected virtual void RaiseCloseToEnd()\r\n        {\r\n            var handler = CloseToEnd;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n        #endregion\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Controls/LongListSelector/LongListSelectorEventArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows.Controls;\r\n\r\nnamespace Telegram.Controls.LongListSelector\r\n{\r\n    /// <summary>\r\n    /// The event args for the Link/Unlink events.\r\n    /// </summary>\r\n    public class LinkUnlinkEventArgs : EventArgs\r\n    {\r\n        /// <summary>\r\n        /// Create new LinkUnlinkEventArgs.\r\n        /// </summary>\r\n        /// <param name=\"cp\">The ContentPresenter.</param>\r\n        public LinkUnlinkEventArgs(ContentPresenter cp)\r\n        {\r\n            ContentPresenter = cp;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The ContentPresenter which is displaying the item.\r\n        /// </summary>\r\n        public ContentPresenter ContentPresenter { get; private set; }\r\n    }\r\n\r\n    /// <summary>\r\n    /// The GroupPopupOpened event args.\r\n    /// </summary>\r\n    public class GroupViewOpenedEventArgs : EventArgs\r\n    {\r\n        internal GroupViewOpenedEventArgs(ItemsControl itemsControl)\r\n        {\r\n            ItemsControl = itemsControl;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The ItemsControl containing the groups.\r\n        /// </summary>\r\n        public ItemsControl ItemsControl { get; private set; }\r\n    }\r\n\r\n    /// <summary>\r\n    /// The GroupPopupClosing event args.\r\n    /// </summary>\r\n    public class GroupViewClosingEventArgs : EventArgs\r\n    {\r\n        internal GroupViewClosingEventArgs(ItemsControl itemsControl, object selectedGroup)\r\n        {\r\n            ItemsControl = itemsControl;\r\n            SelectedGroup = selectedGroup;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The ItemsControl containing the groups.\r\n        /// </summary>\r\n        public ItemsControl ItemsControl { get; private set; }\r\n\r\n        /// <summary>\r\n        /// The selected group. Will be null if the back button was pressed.\r\n        /// </summary>\r\n        public object SelectedGroup { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Set this to true if the application will handle the popup closing and scrolling to the group.\r\n        /// </summary>\r\n        public bool Cancel { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LongListSelector/LongListSelectorGroup.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Media;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Controls.LongListSelector.Common;\r\n\r\nnamespace Telegram.Controls.LongListSelector\r\n{\r\n    /// <summary>\r\n    /// Partial definition of LongListSelector. Includes group view code.\r\n    /// </summary>\r\n    public partial class LongListSelector : Control\r\n    {\r\n        private PhoneApplicationPage _page;\r\n\r\n        private bool _systemTrayVisible;\r\n        private bool _applicationBarVisible;\r\n        private Border _border;\r\n        private LongListSelectorItemsControl _itemsControl;\r\n        private Popup _groupSelectorPopup;\r\n\r\n        private static double _screenWidth = Application.Current.Host.Content.ActualWidth;\r\n        private static double _screenHeight = Application.Current.Host.Content.ActualHeight;\r\n\r\n        private void OpenPopup()\r\n        {\r\n            SaveSystemState(true, false);\r\n            BuildPopup();\r\n            AttachToPageEvents();\r\n            _groupSelectorPopup.IsOpen = true;\r\n\r\n            // This has to happen eventually anyway, and this forces the ItemsControl to\r\n            // expand it's template, populate it's items etc.\r\n            UpdateLayout();\r\n        }\r\n\r\n        private void popup_Opened(object sender, EventArgs e)\r\n        {\r\n            SafeRaise.Raise(GroupViewOpened, this, () => { return new GroupViewOpenedEventArgs(_itemsControl); });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Closes the group popup.\r\n        /// </summary>\r\n        /// <param name=\"selectedGroup\">The selected group.</param>\r\n        /// <param name=\"raiseEvent\">Should the GroupPopupClosing event be raised.</param>\r\n        /// <returns>True if the event was not raised or if it was raised and e.Handled is false.</returns>\r\n        private bool ClosePopup(object selectedGroup, bool raiseEvent)\r\n        {\r\n            if (raiseEvent)\r\n            {\r\n                GroupViewClosingEventArgs args = null;\r\n\r\n                SafeRaise.Raise(GroupViewClosing, this, () => { return args = new GroupViewClosingEventArgs(_itemsControl, selectedGroup); });\r\n\r\n                if (args != null && args.Cancel)\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            if (_groupSelectorPopup != null)\r\n            {\r\n                RestoreSystemState();\r\n                _groupSelectorPopup.IsOpen = false;\r\n                DetachFromPageEvents();\r\n                _groupSelectorPopup.Child = null;\r\n                _border = null;\r\n                _itemsControl = null;\r\n                _groupSelectorPopup = null;\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private Thickness _borderPadding;\r\n\r\n        private void BuildPopup()\r\n        {\r\n            _groupSelectorPopup = new Popup();\r\n            _groupSelectorPopup.Opened += popup_Opened;\r\n\r\n            // Support the background color jumping through. Note that the\r\n            // alpha channel will be ignored, unless it is a purely transparent\r\n            // value (such as when a user uses Transparent as the background\r\n            // on the control).\r\n            SolidColorBrush background = Background as SolidColorBrush;\r\n            Color bg = (Color)Resources[\"PhoneBackgroundColor\"];\r\n            if (background != null\r\n                && background.Color != null\r\n                && background.Color.A > 0)\r\n            {\r\n                bg = background.Color;\r\n            }\r\n            _border = new Border\r\n            {\r\n                Background = new SolidColorBrush(\r\n                    Color.FromArgb(0xa0, bg.R, bg.G, bg.B))\r\n            };\r\n\r\n            // Prevents touch events from bubbling up for most handlers.\r\n            _border.ManipulationStarted += ((o, e) => e.Handled = true);\r\n            _border.ManipulationCompleted += ((o, e) => e.Handled = true);\r\n            _border.ManipulationDelta += ((o, e) => e.Handled = true);\r\n\r\n            var gestureHandler = new EventHandler<System.Windows.Input.GestureEventArgs>((o, e) => e.Handled = true);\r\n            _border.Tap += gestureHandler;\r\n            _border.DoubleTap += gestureHandler;\r\n            _border.Hold += gestureHandler;\r\n            _borderPadding = _border.Padding;\r\n\r\n            _itemsControl = new LongListSelectorItemsControl();\r\n            _itemsControl.ItemTemplate = GroupItemTemplate;\r\n            _itemsControl.ItemsPanel = GroupItemsPanel;\r\n            _itemsControl.ItemsSource = ItemsSource;\r\n\r\n            _itemsControl.GroupSelected += itemsControl_GroupSelected;\r\n\r\n            _groupSelectorPopup.Child = _border;\r\n            ScrollViewer sv = new ScrollViewer() { HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled };\r\n\r\n            _itemsControl.HorizontalAlignment = HorizontalAlignment.Center;\r\n            _itemsControl.Margin = new Thickness(0, 12, 0, 0);\r\n            _border.Child = sv;\r\n            sv.Content = _itemsControl;\r\n\r\n            SetItemsControlSize();\r\n        }\r\n\r\n        private void SetItemsControlSize()\r\n        {\r\n            Rect client = GetTransformedRect();\r\n            if (_border != null)\r\n            {\r\n                _border.RenderTransform = GetTransform();\r\n\r\n                _border.Width = client.Width;\r\n                _border.Height = client.Height;\r\n            }\r\n        }\r\n\r\n        private void itemsControl_GroupSelected(object sender, LongListSelector.GroupSelectedEventArgs e)\r\n        {\r\n            if (ClosePopup(e.Group, true))\r\n            {\r\n                ScrollToGroup(e.Group);\r\n            }\r\n        }\r\n\r\n        private void AttachToPageEvents()\r\n        {\r\n            PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            if (frame != null)\r\n            {\r\n                _page = frame.Content as PhoneApplicationPage;\r\n                if (_page != null)\r\n                {\r\n                    _page.BackKeyPress += page_BackKeyPress;\r\n                    _page.OrientationChanged += page_OrientationChanged;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void DetachFromPageEvents()\r\n        {\r\n            if (_page != null)\r\n            {\r\n                _page.BackKeyPress -= page_BackKeyPress;\r\n                _page.OrientationChanged -= page_OrientationChanged;\r\n                _page = null;\r\n            }\r\n        }\r\n\r\n        private void page_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e)\r\n        {\r\n            e.Cancel = false;\r\n            e.Cancel = true;\r\n            ClosePopup(null, true);\r\n        }\r\n\r\n        void page_OrientationChanged(object sender, OrientationChangedEventArgs e)\r\n        {\r\n            SetItemsControlSize();\r\n        }\r\n\r\n        private static Rect GetTransformedRect()\r\n        {\r\n            bool isLandscape = IsLandscape(GetPageOrientation());\r\n\r\n            var frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            if (frame != null)\r\n            {\r\n                var page = frame.Content as PhoneApplicationPage;\r\n\r\n                //if (page != null)\r\n                //{\r\n                //    _screenHeight = page.ActualHeight;\r\n                //    _screenWidth = page.ActualWidth;\r\n\r\n                //    //return new Rect(0, 0, _screenWidth, _screenHeight);\r\n                //}\r\n                //else\r\n                {\r\n                    _screenWidth = Application.Current.Host.Content.ActualWidth;\r\n                    _screenHeight = Application.Current.Host.Content.ActualHeight;\r\n                }\r\n                \r\n            }\r\n            else\r\n            {\r\n                _screenWidth = Application.Current.Host.Content.ActualWidth;\r\n                _screenHeight = Application.Current.Host.Content.ActualHeight;\r\n            }\r\n\r\n            return new Rect(0, 0,\r\n                isLandscape ? _screenHeight : _screenWidth,\r\n                isLandscape ? _screenWidth : _screenHeight);\r\n        }\r\n\r\n        private Transform GetTransform()\r\n        {\r\n            PageOrientation orientation = GetPageOrientation();\r\n\r\n            switch (orientation)\r\n            {\r\n                case PageOrientation.LandscapeLeft:\r\n                case PageOrientation.Landscape:\r\n                    _border.Padding = new Thickness(_borderPadding.Left  + 68.0, _borderPadding.Top, _borderPadding.Right, _borderPadding.Bottom);\r\n                    return new CompositeTransform { Rotation = 90, TranslateX = _screenWidth };\r\n                case PageOrientation.LandscapeRight:\r\n                    _border.Padding = new Thickness(_borderPadding.Left, _borderPadding.Top, _borderPadding.Right + 68.0, _borderPadding.Bottom);\r\n                    return new CompositeTransform { Rotation = -90, TranslateY = _screenHeight };\r\n                default:\r\n                    _border.Padding = _borderPadding;\r\n                    return null;\r\n            }\r\n        }\r\n\r\n        private static bool IsLandscape(PageOrientation orientation)\r\n        {\r\n            return orientation == PageOrientation.Landscape || orientation == PageOrientation.LandscapeLeft || orientation == PageOrientation.LandscapeRight;\r\n        }\r\n\r\n        private static PageOrientation GetPageOrientation()\r\n        {\r\n            PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            if (frame != null)\r\n            {\r\n                PhoneApplicationPage page = frame.Content as PhoneApplicationPage;\r\n\r\n                if (page != null)\r\n                {\r\n                    return page.Orientation;\r\n                }\r\n            }\r\n\r\n            return PageOrientation.None;\r\n        }\r\n\r\n        private void SaveSystemState(bool newSystemTrayVisible, bool newApplicationBarVisible)\r\n        {\r\n            _systemTrayVisible = SystemTray.IsVisible;\r\n            SystemTray.IsVisible = newSystemTrayVisible;\r\n\r\n            PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            if (frame != null)\r\n            {\r\n                PhoneApplicationPage page = frame.Content as PhoneApplicationPage;\r\n                if (page != null && page.ApplicationBar != null)\r\n                {\r\n                    _applicationBarVisible = page.ApplicationBar.IsVisible;\r\n                    page.ApplicationBar.IsVisible = newApplicationBarVisible;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void RestoreSystemState()\r\n        {\r\n            SystemTray.IsVisible = _systemTrayVisible;\r\n\r\n            PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            if (frame != null)\r\n            {\r\n                PhoneApplicationPage page = frame.Content as PhoneApplicationPage;\r\n                if (page != null && page.ApplicationBar != null)\r\n                {\r\n                    page.ApplicationBar.IsVisible = _applicationBarVisible;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Controls/LongListSelector/LongListSelectorItem.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace Telegram.Controls.LongListSelector\r\n{\r\n    /// <summary>\r\n    /// Holds information about an item for use in the LongListSelector.\r\n    /// </summary>\r\n    public class LongListSelectorItem\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the item type.\r\n        /// </summary>\r\n        public LongListSelectorItemType ItemType\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the associated group for the item.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Assists in debugging.\")]\r\n        public object Group\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the underlying item instance.\r\n        /// </summary>\r\n        public object Item\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LongListSelector/LongListSelectorItemType.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Controls.LongListSelector\r\n{\r\n    /// <summary>\r\n    /// Describes different items.\r\n    /// </summary>\r\n    public enum LongListSelectorItemType\r\n    {\r\n        /// <summary>\r\n        /// Indicates an unknown item type.\r\n        /// </summary>\r\n        Unknown,\r\n\r\n        /// <summary>\r\n        /// Represents a standard list item.\r\n        /// </summary>\r\n        Item,\r\n\r\n        /// <summary>\r\n        /// Represents a group header.\r\n        /// </summary>\r\n        GroupHeader,\r\n\r\n        /// <summary>\r\n        /// Represents a group footer.\r\n        /// </summary>\r\n        GroupFooter,\r\n\r\n        /// <summary>\r\n        /// Represents a list header.\r\n        /// </summary>\r\n        ListHeader,\r\n\r\n        /// <summary>\r\n        /// Represents a list footer.\r\n        /// </summary>\r\n        ListFooter,\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LongListSelector/LongListSelectorItemsControl.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace Telegram.Controls.LongListSelector\r\n{\r\n    /// <summary>\r\n    /// Partial definition of LongListSelector. Includes ItemsControl subclass.\r\n    /// </summary>\r\n    public partial class LongListSelector : Control\r\n    {\r\n        private class GroupSelectedEventArgs : EventArgs\r\n        {\r\n            public GroupSelectedEventArgs(object group)\r\n            {\r\n                Group = group;\r\n            }\r\n\r\n            public object Group { get; private set; }\r\n        }\r\n\r\n        private delegate void GroupSelectedEventHandler(object sender, GroupSelectedEventArgs e);\r\n\r\n        private class LongListSelectorItemsControl : ItemsControl\r\n        {\r\n            public event GroupSelectedEventHandler GroupSelected;\r\n\r\n            protected override void PrepareContainerForItemOverride(DependencyObject element, object item)\r\n            {\r\n                base.PrepareContainerForItemOverride(element, item);\r\n                ((UIElement)element).Tap += LongListSelectorItemsControl_Tap;\r\n            }\r\n\r\n            protected override void ClearContainerForItemOverride(DependencyObject element, object item)\r\n            {\r\n                base.ClearContainerForItemOverride(element, item);\r\n\r\n                ((UIElement)element).Tap -= LongListSelectorItemsControl_Tap;\r\n            }\r\n\r\n            private void LongListSelectorItemsControl_Tap(object sender, System.Windows.Input.GestureEventArgs e)\r\n            {\r\n                ContentPresenter cc = sender as ContentPresenter;\r\n                if (cc != null)\r\n                {\r\n                    var handler = GroupSelected;\r\n                    if (handler != null)\r\n                    {\r\n                        GroupSelectedEventArgs args = new GroupSelectedEventArgs(cc.Content);\r\n                        handler(this, args);\r\n                    }\r\n\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LongListSelector/TemplatedListBox.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Telegram.Controls.LongListSelector.Common;\r\n\r\nnamespace Telegram.Controls.LongListSelector\r\n{\r\n    /// <summary>\r\n    /// Represents a ListBox with item-specific templates.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class TemplatedListBox : ListBox\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the list header template.\r\n        /// </summary>\r\n        public DataTemplate ListHeaderTemplate { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the list footer template.\r\n        /// </summary>\r\n        public DataTemplate ListFooterTemplate { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the group header template.\r\n        /// </summary>\r\n        public DataTemplate GroupHeaderTemplate { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the footer template.\r\n        /// </summary>\r\n        public DataTemplate GroupFooterTemplate { get; set; }\r\n\r\n        /// <summary>\r\n        /// Occurs when an item is about to be \"realized\".\r\n        /// </summary>\r\n        public event EventHandler<LinkUnlinkEventArgs> Link;\r\n        \r\n        /// <summary>\r\n        /// Occurs when an item is about to be \"un-realized\".\r\n        /// </summary>\r\n        public event EventHandler<LinkUnlinkEventArgs> Unlink;\r\n\r\n        /// <summary>\r\n        /// Creates or identifies the element used to display a specified item.\r\n        /// </summary>\r\n        /// <returns>Returns the new container.</returns>\r\n        protected override DependencyObject GetContainerForItemOverride()\r\n        {\r\n            return new TemplatedListBoxItem();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares the specified element to display the specified item.\r\n        /// </summary>\r\n        /// <param name=\"element\">Element used to display the specified item.</param>\r\n        /// <param name=\"item\">Specified item.</param>\r\n        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            base.PrepareContainerForItemOverride(element, item);\r\n\r\n            DataTemplate template = null;\r\n            LongListSelectorItem itemTuple = item as LongListSelectorItem;\r\n            \r\n            if (itemTuple != null)\r\n            {\r\n                switch (itemTuple.ItemType)\r\n                {\r\n                    case LongListSelectorItemType.ListHeader:\r\n                        template = this.ListHeaderTemplate;\r\n                        break;\r\n                    case LongListSelectorItemType.ListFooter:\r\n                        template = this.ListFooterTemplate;\r\n                        break;\r\n                    case LongListSelectorItemType.GroupHeader:\r\n                        template = this.GroupHeaderTemplate;\r\n                        break;\r\n                    case LongListSelectorItemType.GroupFooter:\r\n                        template = this.GroupFooterTemplate;\r\n                        break;\r\n                    case LongListSelectorItemType.Item:\r\n                        template = this.ItemTemplate;\r\n                        break;\r\n                }\r\n\r\n                TemplatedListBoxItem listBoxItem = (TemplatedListBoxItem)element;\r\n                listBoxItem.Content = itemTuple.Item;\r\n                listBoxItem.Tuple = itemTuple;\r\n                listBoxItem.ContentTemplate = template;\r\n\r\n                var result = listBoxItem.GetFirstLogicalChildByType<ContentPresenter>(true);\r\n                var handler = Link;\r\n                if (result != null && handler != null)\r\n                {\r\n                    handler(this, new LinkUnlinkEventArgs(result));\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// When overridden in a derived class, undoes the effects of the \r\n        /// PrepareContainerForItemOverride method.\r\n        /// </summary>\r\n        /// <param name=\"element\">The container element.</param>\r\n        /// <param name=\"item\">The item.</param>\r\n        protected override void ClearContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            LongListSelectorItem itemTuple = item as LongListSelectorItem;\r\n\r\n            if (itemTuple != null)\r\n            {\r\n                var result = ((FrameworkElement)element).GetFirstLogicalChildByType<ContentPresenter>(true);\r\n                var handler = Unlink;\r\n                if (result != null && handler != null)\r\n                {\r\n                    handler(this, new LinkUnlinkEventArgs(result));\r\n                }\r\n            }\r\n\r\n            base.ClearContainerForItemOverride(element, item);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/LongListSelector/TemplatedListBoxItem.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows.Controls;\r\n\r\nnamespace Telegram.Controls.LongListSelector\r\n{\r\n    /// <summary>\r\n    /// Represents an item within a <see cref=\"TemplatedListBox\"/>\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    internal class TemplatedListBoxItem : ListBoxItem\r\n    {\r\n        public LongListSelectorItem Tuple { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/MultiTemplateItemsControl.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    public interface ITemplateSelector\r\n    {\r\n        DataTemplate SelectTemplate(object item, DependencyObject container);\r\n    }\r\n\r\n    public class MultiTemplateItemsControl : ItemsControl\r\n    {\r\n        public static readonly DependencyProperty TemplateSelectorProperty =\r\n            DependencyProperty.Register(\"TemplateSelector\",\r\n            typeof(ITemplateSelector), typeof(MultiTemplateItemsControl),\r\n            new PropertyMetadata(OnTemplateChanged));\r\n\r\n        public ITemplateSelector TemplateSelector\r\n        {\r\n            get { return (ITemplateSelector)GetValue(TemplateSelectorProperty); }\r\n            set { SetValue(TemplateSelectorProperty, value); }\r\n        }\r\n\r\n        private static void OnTemplateChanged(DependencyObject d,\r\n            DependencyPropertyChangedEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        protected override void PrepareContainerForItemOverride(\r\n            DependencyObject element, object item)\r\n        {\r\n            base.PrepareContainerForItemOverride(element, item);\r\n\r\n            var content = element as ContentPresenter;\r\n\r\n            if (content != null)\r\n            {\r\n                content.ContentTemplate = TemplateSelector.SelectTemplate(item, this);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/MultiTemplateLazyListBox.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    public class MultiTemplateLazyListBox : LazyListBox\r\n    {\r\n\r\n        public static readonly DependencyProperty TemplateSelectorProperty =\r\n            DependencyProperty.Register(\"TemplateSelector\",\r\n            typeof(ITemplateSelector), typeof(MultiTemplateLazyListBox),\r\n            new PropertyMetadata(OnTemplateChanged));\r\n\r\n        public ITemplateSelector TemplateSelector\r\n        {\r\n            get { return (ITemplateSelector)GetValue(TemplateSelectorProperty); }\r\n            set { SetValue(TemplateSelectorProperty, value); }\r\n        }\r\n\r\n        private static void OnTemplateChanged(DependencyObject d,\r\n            DependencyPropertyChangedEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        protected override void PrepareContainerForItemOverride(\r\n            DependencyObject element, object item)\r\n        {\r\n            base.PrepareContainerForItemOverride(element, item);\r\n\r\n            var listBoxItem = element as ListBoxItem;\r\n\r\n            if (listBoxItem != null)\r\n            {\r\n                listBoxItem.ContentTemplate = TemplateSelector.SelectTemplate(item, this);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/Notifications/DialogService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Coding4Fun.Toolkit.Controls.Binding;\r\nusing Coding4Fun.Toolkit.Controls.Common;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace Telegram.Controls.Notifications\r\n{\r\n    // this code has been modified from the orginal code\r\n    // from Kevin Marshall's post \r\n    // http://blogs.claritycon.com/kevinmarshall/2010/10/13/wp7-page-transitions-sample/\r\n\r\n    public class DialogService\r\n    {\r\n        public enum AnimationTypes\r\n        {\r\n            Slide,\r\n            SlideHorizontal,\r\n            Swivel,\r\n            SwivelHorizontal,\r\n            Fade\r\n        }\r\n\r\n        private const string SlideUpStoryboard = @\"\r\n        <Storyboard  xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(TranslateTransform.Y)\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"150\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.35\"\" Value=\"\"0\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"6\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimation Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" From=\"\"0\"\" To=\"\"1\"\" Duration=\"\"0:0:0.350\"\">\r\n                <DoubleAnimation.EasingFunction>\r\n                    <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"6\"\"/>\r\n                </DoubleAnimation.EasingFunction>\r\n            </DoubleAnimation>\r\n        </Storyboard>\";\r\n\r\n        private const string SlideHorizontalInStoryboard = @\"\r\n        <Storyboard  xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(TranslateTransform.X)\"\" >\r\n                    <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"-150\"\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.35\"\" Value=\"\"0\"\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"6\"\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimation Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" From=\"\"0\"\" To=\"\"1\"\" Duration=\"\"0:0:0.350\"\" >\r\n                <DoubleAnimation.EasingFunction>\r\n                    <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"6\"\"/>\r\n                </DoubleAnimation.EasingFunction>\r\n            </DoubleAnimation>\r\n        </Storyboard>\";\r\n\r\n        private const string SlideHorizontalOutStoryboard = @\"\r\n        <Storyboard  xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(TranslateTransform.X)\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"150\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"6\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimation Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" From=\"\"1\"\" To=\"\"0\"\" Duration=\"\"0:0:0.25\"\">\r\n                <DoubleAnimation.EasingFunction>\r\n                    <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"6\"\"/>\r\n                </DoubleAnimation.EasingFunction>\r\n            </DoubleAnimation>\r\n        </Storyboard>\";\r\n\r\n        private const string SlideDownStoryboard = @\"\r\n        <Storyboard  xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(TranslateTransform.Y)\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"150\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"6\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimation Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" From=\"\"1\"\" To=\"\"0\"\" Duration=\"\"0:0:0.25\"\">\r\n                <DoubleAnimation.EasingFunction>\r\n                    <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"6\"\"/>\r\n                </DoubleAnimation.EasingFunction>\r\n            </DoubleAnimation>\r\n        </Storyboard>\";\r\n\r\n        private const string SwivelInStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimation \r\n\t\t\t\tTo=\"\".5\"\"\r\n                Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.CenterOfRotationY)\"\" />\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.RotationX)\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"-30\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.35\"\" Value=\"\"0\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"6\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\">\r\n                <DiscreteDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"1\"\" />\r\n            </DoubleAnimationUsingKeyFrames>\r\n        </Storyboard>\";\r\n\r\n        private const string SwivelOutStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimation BeginTime=\"\"0:0:0\"\" Duration=\"\"0\"\" \r\n                                Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.CenterOfRotationY)\"\" \r\n                                To=\"\".5\"\"/>\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.RotationX)\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"45\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"6\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\">\r\n                <DiscreteDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"1\"\" />\r\n                <DiscreteDoubleKeyFrame KeyTime=\"\"0:0:0.267\"\" Value=\"\"0\"\" />\r\n            </DoubleAnimationUsingKeyFrames>\r\n        </Storyboard>\";\r\n\r\n        private const string FadeInStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimation \r\n\t\t\t\tDuration=\"\"0:0:0.2\"\" \r\n\t\t\t\tStoryboard.TargetProperty=\"\"(UIElement.Opacity)\"\" \r\n                To=\"\"1\"\"/>\r\n        </Storyboard>\";\r\n\r\n        private const string FadeOutStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimation \r\n\t\t\t\tDuration=\"\"0:0:0.2\"\"\r\n\t\t\t\tStoryboard.TargetProperty=\"\"(UIElement.Opacity)\"\" \r\n                To=\"\"0\"\"/>\r\n        </Storyboard>\";\r\n\r\n        private Panel _popupContainer;\r\n        private Frame _rootFrame;\r\n        private PhoneApplicationPage _page;\r\n        private Grid _childPanel;\r\n        private Grid _overlay;\r\n\r\n        public bool IsOverlayApplied\r\n        {\r\n            get { return _isOverlayApplied; }\r\n            set { _isOverlayApplied = value; }\r\n        }\r\n        private bool _isOverlayApplied = true;\r\n\r\n        public FrameworkElement Child { get; set; }\r\n        public AnimationTypes AnimationType { get; set; }\r\n        public TimeSpan MainBodyDelay { get; set; }\r\n\r\n        public double VerticalOffset { get; set; }\r\n        internal double ControlVerticalOffset { get; set; }\r\n        public bool BackButtonPressed { get; set; }\r\n\r\n        public Brush BackgroundBrush { get; set; }\r\n\r\n        internal bool IsOpen { get; set; }\r\n        protected internal bool IsBackKeyOverride { get; set; }\r\n\r\n        public event EventHandler Closed;\r\n        public event EventHandler Opened;\r\n\r\n        // set this to prevent the dialog service from closing on back click\r\n        public bool HasPopup { get; set; }\r\n\r\n        internal PhoneApplicationPage Page\r\n        {\r\n            get { return _page ?? (_page = RootFrame.GetFirstLogicalChildByType<PhoneApplicationPage>(false)); }\r\n        }\r\n\r\n        internal Frame RootFrame\r\n        {\r\n            get { return _rootFrame ?? (_rootFrame = ApplicationSpace.RootFrame); }\r\n        }\r\n\r\n        internal Panel PopupContainer\r\n        {\r\n            get\r\n            {\r\n                if (_popupContainer == null)\r\n                {\r\n                    //var popups = RootFrame.GetLogicalChildrenByType<Popup>(false).Where(x => x.IsOpen);\r\n\r\n                    //if (popups.Any())\r\n                    //{\r\n                    //    for (var i = 0; i < popups.Count(); i++)\r\n                    //    {\r\n                    //        var child = popups.ElementAt(i).Child as Panel;\r\n\r\n                    //        if (child == null)\r\n                    //            continue;\r\n\r\n                    //        _popupContainer = child;\r\n                    //        break;\r\n                    //    }\r\n                    //}\r\n                    //else\r\n                    {\r\n                        var presenters = RootFrame.GetLogicalChildrenByType<ContentPresenter>(false);\r\n\r\n                        for (var i = 0; i < presenters.Count(); i++)\r\n                        {\r\n                            var panels = presenters.ElementAt(i).GetLogicalChildrenByType<Panel>(false);\r\n\r\n                            if (!panels.Any())\r\n                                continue;\r\n\r\n                            _popupContainer = panels.First();\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                }\r\n\r\n                return _popupContainer;\r\n            }\r\n        }\r\n\r\n        public DialogService()\r\n        {\r\n            AnimationType = AnimationTypes.Slide;\r\n\r\n            BackButtonPressed = false;\r\n        }\r\n\r\n        bool _deferredShowToLoaded;\r\n        private void InitializePopup()\r\n        {\r\n            // Add overlay which is the size of RootFrame\r\n            _childPanel = CreateGrid();\r\n\r\n            if (IsOverlayApplied)\r\n            {\r\n                _overlay = CreateGrid();\r\n                PreventScrollBinding.SetIsEnabled(_overlay, true);\r\n            }\r\n\r\n            ApplyOverlayBackground();\r\n\r\n            // Initialize popup to draw the context menu over all controls\r\n            if (PopupContainer != null)\r\n            {\r\n                if (_overlay != null)\r\n                    PopupContainer.Children.Add(_overlay);\r\n\r\n                PopupContainer.Children.Add(_childPanel);\r\n                _childPanel.Children.Add(Child);\r\n            }\r\n            else\r\n            {\r\n                _deferredShowToLoaded = true;\r\n                RootFrame.Loaded += RootFrameDeferredShowLoaded;\r\n            }\r\n        }\r\n\r\n        internal void ApplyOverlayBackground()\r\n        {\r\n            if (IsOverlayApplied && BackgroundBrush != null)\r\n                _overlay.Background = BackgroundBrush;\r\n        }\r\n\r\n        private Grid CreateGrid()\r\n        {\r\n            var grid = new Grid { Name = Guid.NewGuid().ToString() };\r\n\r\n            Grid.SetColumnSpan(grid, int.MaxValue);\r\n            Grid.SetRowSpan(grid, int.MaxValue);\r\n\r\n            grid.Opacity = 0;\r\n\r\n            CalculateVerticalOffset(grid);\r\n\r\n            return grid;\r\n        }\r\n\r\n        internal void CalculateVerticalOffset()\r\n        {\r\n            CalculateVerticalOffset(_childPanel);\r\n        }\r\n\r\n        internal void CalculateVerticalOffset(Panel panel)\r\n        {\r\n            if (panel == null)\r\n                return;\r\n\r\n            var sysTrayVerticalOffset = 0;\r\n\r\n            if (SystemTray.IsVisible && SystemTray.Opacity < 1 && SystemTray.Opacity > 0)\r\n            {\r\n                sysTrayVerticalOffset += 32;\r\n            }\r\n\r\n            panel.Margin = new Thickness(0, VerticalOffset + sysTrayVerticalOffset + ControlVerticalOffset, 0, 0);\r\n        }\r\n\r\n        void RootFrameDeferredShowLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            RootFrame.Loaded -= RootFrameDeferredShowLoaded;\r\n            _deferredShowToLoaded = false;\r\n\r\n            Show();\r\n        }\r\n\r\n        protected internal void SetAlignmentsOnOverlay(HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment)\r\n        {\r\n            if (_childPanel != null)\r\n            {\r\n                _childPanel.HorizontalAlignment = horizontalAlignment;\r\n                _childPanel.VerticalAlignment = verticalAlignment;\r\n            }\r\n        }\r\n\r\n        private static readonly object Lockobj = new object();\r\n        /// <summary>\r\n        /// Shows the context menu.\r\n        /// </summary>\r\n        public void Show()\r\n        {\r\n            lock (Lockobj)\r\n            {\r\n                Page.BackKeyPress -= OnBackKeyPress;\r\n\r\n                IsOpen = true;\r\n\r\n                InitializePopup();\r\n\r\n                if (_deferredShowToLoaded)\r\n                    return;\r\n\r\n                if (!IsBackKeyOverride)\r\n                    Page.BackKeyPress += OnBackKeyPress;\r\n\r\n                Page.NavigationService.Navigated += OnNavigated;\r\n\r\n                RunShowStoryboard(_overlay, AnimationTypes.Fade);\r\n                RunShowStoryboard(_childPanel, AnimationType, MainBodyDelay);\r\n\r\n                if (Opened != null)\r\n                    Opened.Invoke(this, null);\r\n\r\n            }\r\n        }\r\n\r\n        private void RunShowStoryboard(UIElement grid, AnimationTypes animation)\r\n        {\r\n            RunShowStoryboard(grid, animation, TimeSpan.MinValue);\r\n        }\r\n\r\n        private void RunShowStoryboard(UIElement grid, AnimationTypes animation, TimeSpan delay)\r\n        {\r\n            if (grid == null)\r\n                return;\r\n\r\n            Storyboard storyboard;\r\n            switch (animation)\r\n            {\r\n                case AnimationTypes.SlideHorizontal:\r\n                    storyboard = XamlReader.Load(SlideHorizontalInStoryboard) as Storyboard;\r\n                    grid.RenderTransform = new TranslateTransform();\r\n                    break;\r\n\r\n                case AnimationTypes.Slide:\r\n                    storyboard = XamlReader.Load(SlideUpStoryboard) as Storyboard;\r\n                    grid.RenderTransform = new TranslateTransform();\r\n                    break;\r\n                case AnimationTypes.Fade:\r\n                    storyboard = XamlReader.Load(FadeInStoryboard) as Storyboard;\r\n                    break;\r\n                case AnimationTypes.Swivel:\r\n                case AnimationTypes.SwivelHorizontal:\r\n                default:\r\n                    storyboard = XamlReader.Load(SwivelInStoryboard) as Storyboard;\r\n                    grid.Projection = new PlaneProjection();\r\n                    break;\r\n            }\r\n\r\n            if (storyboard != null)\r\n            {\r\n                foreach (var storyboardAnimation in storyboard.Children)\r\n                {\r\n                    if (!(storyboardAnimation is DoubleAnimationUsingKeyFrames))\r\n                        continue;\r\n\r\n                    var doubleKey = storyboardAnimation as DoubleAnimationUsingKeyFrames;\r\n\r\n                    foreach (var frame in doubleKey.KeyFrames)\r\n                    {\r\n                        frame.KeyTime = KeyTime.FromTimeSpan(frame.KeyTime.TimeSpan.Add(delay));\r\n                    }\r\n                }\r\n\r\n                Page.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    foreach (var t in storyboard.Children)\r\n                        Storyboard.SetTarget(t, grid);\r\n\r\n                    storyboard.Begin();\r\n                });\r\n            }\r\n        }\r\n\r\n        void OnNavigated(object sender, System.Windows.Navigation.NavigationEventArgs e)\r\n        {\r\n            if (e.IsNavigationInitiator) //current app initialized navigation?\r\n                Hide();\r\n        }\r\n\r\n        public void Hide()\r\n        {\r\n            if (!IsOpen)\r\n                return;\r\n\r\n            if (Page != null)\r\n            {\r\n                Page.BackKeyPress -= OnBackKeyPress;\r\n                Page.NavigationService.Navigated -= OnNavigated;\r\n\r\n                _page = null;\r\n            }\r\n\r\n            RunHideStoryboard(_overlay, AnimationTypes.Fade);\r\n            RunHideStoryboard(_childPanel, AnimationType);\r\n        }\r\n\r\n        void RunHideStoryboard(Grid grid, AnimationTypes animation)\r\n        {\r\n            if (grid == null)\r\n                return;\r\n\r\n            Storyboard storyboard;\r\n\r\n            switch (animation)\r\n            {\r\n                case AnimationTypes.SlideHorizontal:\r\n                    storyboard = XamlReader.Load(SlideHorizontalOutStoryboard) as Storyboard;\r\n                    break;\r\n                case AnimationTypes.Slide:\r\n                    storyboard = XamlReader.Load(SlideDownStoryboard) as Storyboard;\r\n                    break;\r\n                case AnimationTypes.Fade:\r\n                    storyboard = XamlReader.Load(FadeOutStoryboard) as Storyboard;\r\n                    break;\r\n                case AnimationTypes.Swivel:\r\n                case AnimationTypes.SwivelHorizontal:\r\n                default:\r\n                    storyboard = XamlReader.Load(SwivelOutStoryboard) as Storyboard;\r\n                    break;\r\n            }\r\n\r\n            try\r\n            {\r\n                if (storyboard != null)\r\n                {\r\n                    storyboard.Completed += HideStoryboardCompleted;\r\n\r\n                    foreach (var t in storyboard.Children)\r\n                        Storyboard.SetTarget(t, grid);\r\n\r\n                    storyboard.Begin();\r\n                }\r\n            }\r\n            catch (Exception)\r\n            {\r\n                // chances are user nav'ed away\r\n                // attempting to be extremely robust here\r\n                // if this fails, go straight to complete\r\n                // and attempt to remove it from the visual tree\r\n                HideStoryboardCompleted(null, null);\r\n            }\r\n        }\r\n\r\n        void HideStoryboardCompleted(object sender, EventArgs e)\r\n        {\r\n            IsOpen = false;\r\n\r\n            try\r\n            {\r\n                if (PopupContainer != null && PopupContainer.Children != null)\r\n                {\r\n                    if (_overlay != null)\r\n                        PopupContainer.Children.Remove(_overlay);\r\n\r\n                    PopupContainer.Children.Remove(_childPanel);\r\n                }\r\n\r\n                _childPanel.Children.Clear();\r\n            }\r\n            catch\r\n            {\r\n                // chances are user nav'ed away\r\n                // attempting to be extremely robust here\r\n                // if this fails, go straight to complete\r\n                // and attempt to remove it from the visual tree\r\n            }\r\n\r\n            try\r\n            {\r\n                if (Closed != null)\r\n                    Closed(this, null);\r\n\r\n            }\r\n            catch\r\n            {\r\n                // chances are user nav'ed away\r\n                // attempting to be extremely robust here\r\n                // if this fails, go straight to complete\r\n                // and attempt to remove it from the visual tree\r\n            }\r\n        }\r\n\r\n        public void OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            if (HasPopup)\r\n            {\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            if (IsOpen)\r\n            {\r\n                e.Cancel = true;\r\n                BackButtonPressed = true;\r\n                Hide();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/Notifications/PopUp.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing Clarity.Phone.Extensions;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Coding4Fun.Toolkit.Controls.Common;\r\nusing Microsoft.Phone.Controls;\r\n\r\nnamespace Telegram.Controls.Notifications\r\n{\r\n    public abstract class PopUp<T, TPopUpResult> : Control\r\n    {\r\n        internal DialogService PopUpService;\r\n        private PhoneApplicationPage _startingPage;\r\n        private bool _alreadyFired;\r\n\r\n        public event EventHandler<PopUpEventArgs<T, TPopUpResult>> Completed;\r\n        public event EventHandler Opened;\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            if (PopUpService != null)\r\n            {\r\n                // template hasn't been applied yet\r\n                // overlay is null until now\r\n                PopUpService.BackgroundBrush = Overlay;\r\n\r\n                PopUpService.ApplyOverlayBackground();\r\n                PopUpService.SetAlignmentsOnOverlay(HorizontalAlignment, VerticalAlignment);\r\n            }\r\n        }\r\n\r\n        public virtual void Show()\r\n        {\r\n            if (IsOpen)\r\n                return;\r\n\r\n            if (_alreadyFired)\r\n                throw new InvalidOperationException(\"Invalid control state, do not reuse object after calling Show()\");\r\n\r\n            if (PopUpService == null)\r\n            {\r\n                PopUpService = new DialogService\r\n                {\r\n                    AnimationType = AnimationType,\r\n                    Child = this,\r\n                    IsBackKeyOverride = IsBackKeyOverride,\r\n                    IsOverlayApplied = IsOverlayApplied,\r\n                    MainBodyDelay = MainBodyDelay,\r\n                };\r\n            }\r\n\r\n            // this will happen if the user comes in OnNavigate or \r\n            // something where the DOM hasn't been created yet.\r\n            if (PopUpService.Page == null)\r\n            {\r\n                Dispatcher.BeginInvoke(Show);\r\n\r\n                return;\r\n            }\r\n\r\n            if (IsCalculateFrameVerticalOffset)\r\n            {\r\n                PopUpService.ControlVerticalOffset = -FrameTransform;\r\n            }\r\n\r\n            PopUpService.Closed -= PopUpClosed;\r\n            PopUpService.Opened -= PopUpOpened;\r\n\r\n            PopUpService.Closed += PopUpClosed;\r\n            PopUpService.Opened += PopUpOpened;\r\n\r\n\r\n            if (!IsAppBarVisible && PopUpService.Page.ApplicationBar != null && PopUpService.Page.ApplicationBar.IsVisible)\r\n            {\r\n                PopUpService.Page.ApplicationBar.IsVisible = false;\r\n\r\n                IsSetAppBarVisibiilty = true;\r\n            }\r\n\r\n            _startingPage = PopUpService.Page;\r\n\r\n            PopUpService.Show();\r\n        }\r\n\r\n\r\n\r\n        protected virtual TPopUpResult GetOnClosedValue()\r\n        {\r\n            return default(TPopUpResult);\r\n        }\r\n\r\n        public void Hide()\r\n        {\r\n            PopUpClosed(this, null);\r\n        }\r\n\r\n\r\n\r\n        #region Control Events\r\n        void PopUpOpened(object sender, EventArgs e)\r\n        {\r\n            if (Opened != null)\r\n                Opened(sender, e);\r\n        }\r\n\r\n        void PopUpClosed(object sender, EventArgs e)\r\n        {\r\n            if (!_alreadyFired)\r\n            {\r\n                OnCompleted(new PopUpEventArgs<T, TPopUpResult> { PopUpResult = GetOnClosedValue() });\r\n                return;\r\n            }\r\n\r\n            ResetWorldAndDestroyPopUp();\r\n        }\r\n\r\n        public virtual void OnCompleted(PopUpEventArgs<T, TPopUpResult> result)\r\n        {\r\n            _alreadyFired = true;\r\n\r\n            if (Completed != null)\r\n                Completed(this, result);\r\n\r\n            if (PopUpService != null)\r\n                PopUpService.Hide();\r\n\r\n            if (PopUpService != null && PopUpService.BackButtonPressed)\r\n                ResetWorldAndDestroyPopUp();\r\n        }\r\n        #endregion\r\n\r\n        #region helper methods\r\n        private void ResetWorldAndDestroyPopUp()\r\n        {\r\n            if (PopUpService != null)\r\n            {\r\n                if (!IsAppBarVisible && IsSetAppBarVisibiilty)\r\n                {\r\n                    _startingPage.ApplicationBar.IsVisible = IsSetAppBarVisibiilty;\r\n                }\r\n\r\n                _startingPage = null;\r\n\r\n                PopUpService.Child = null;\r\n                PopUpService = null;\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region Dependency Property Callbacks\r\n        static void OnFrameTransformPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var sender = source as PopUp<T, TPopUpResult>;\r\n\r\n            if (sender == null || sender.PopUpService == null)\r\n                return;\r\n\r\n            if (!sender.IsCalculateFrameVerticalOffset)\r\n                return;\r\n\r\n            sender.PopUpService.ControlVerticalOffset = -sender.FrameTransform;\r\n            sender.PopUpService.CalculateVerticalOffset();\r\n        }\r\n        #endregion\r\n\r\n        #region Dependency Properties / Properties\r\n        public bool IsOpen { get { return PopUpService != null && PopUpService.IsOpen; } }\r\n        public bool IsAppBarVisible { get; set; }\r\n\r\n        // adjust for SIP\r\n        private bool _isCalculateFrameVerticalOffset;\r\n\r\n        protected bool IsCalculateFrameVerticalOffset\r\n        {\r\n            get { return _isCalculateFrameVerticalOffset; }\r\n            set\r\n            {\r\n                _isCalculateFrameVerticalOffset = value;\r\n\r\n                if (_isCalculateFrameVerticalOffset)\r\n                {\r\n                    var bind = new System.Windows.Data.Binding(\"Y\");\r\n\r\n                    var rootFrame = ApplicationSpace.RootFrame;\r\n\r\n                    if (rootFrame != null)\r\n                    {\r\n                        var transGroup = rootFrame.RenderTransform as TransformGroup;\r\n\r\n                        if (transGroup != null)\r\n                        {\r\n                            bind.Source = transGroup.Children.FirstOrDefault(t => t is TranslateTransform);\r\n                            SetBinding(FrameTransformProperty, bind);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsOverlayApplied\r\n        {\r\n            get { return _isOverlayApplied; }\r\n            set { _isOverlayApplied = value; }\r\n        }\r\n        private bool _isOverlayApplied = true;\r\n\r\n        internal bool IsSetAppBarVisibiilty { get; set; }\r\n        internal TimeSpan MainBodyDelay { get; set; }\r\n\r\n        protected internal bool IsBackKeyOverride { get; set; }\r\n        protected DialogService.AnimationTypes AnimationType { get; set; }\r\n\r\n        double FrameTransform\r\n        {\r\n            get { return (double)GetValue(FrameTransformProperty); }\r\n            set { SetValue(FrameTransformProperty, value); }\r\n        }\r\n\r\n        static readonly DependencyProperty FrameTransformProperty = DependencyProperty.Register(\r\n              \"FrameTransform\",\r\n              typeof(double),\r\n              typeof(PopUp<T, TPopUpResult>),\r\n              new PropertyMetadata(0.0, OnFrameTransformPropertyChanged));\r\n\r\n        public Brush Overlay\r\n        {\r\n            get { return (Brush)GetValue(OverlayProperty); }\r\n            set { SetValue(OverlayProperty, value); }\r\n        }\r\n\r\n        // Using a DependencyProperty as the backing store for Overlay.  This enables animation, styling, binding, etc...\r\n        public static readonly DependencyProperty OverlayProperty =\r\n            DependencyProperty.Register(\"Overlay\", typeof(Brush), typeof(PopUp<T, TPopUpResult>), new PropertyMetadata(default(SolidColorBrush)));\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/Notifications/ToastPrompt.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Clarity.Phone.Extensions;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Coding4Fun.Toolkit.Controls.Binding;\r\nusing Coding4Fun.Toolkit.Controls.Common;\r\n\r\nnamespace Telegram.Controls.Notifications\r\n{\r\n    public class ToastPrompt : PopUp<string, PopUpResult>, IDisposable, IImageSourceFull\r\n    {\r\n        protected Image ToastImage;\r\n        private const string ToastImageName = \"ToastImage\";\r\n        private Timer _timer;\r\n\r\n        private TranslateTransform _translate;\r\n\r\n        public ToastPrompt()\r\n        {\r\n            DefaultStyleKey = typeof(ToastPrompt);\r\n\r\n            IsAppBarVisible = true;\r\n            IsBackKeyOverride = true;\r\n            IsCalculateFrameVerticalOffset = true;\r\n\r\n            IsOverlayApplied = false;\r\n\r\n            AnimationType = DialogService.AnimationTypes.Swivel;\r\n            //AnimationType = DialogService.AnimationTypes.SlideHorizontal;\r\n\r\n            ManipulationStarted += ToastPromptManipulationStarted;\r\n            ManipulationDelta += ToastPromptManipulationDelta;\r\n            ManipulationCompleted += ToastPromptManipulationCompleted;\r\n\r\n            Opened += ToastPromptOpened;\r\n        }\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            SetRenderTransform();\r\n\r\n            ToastImage = GetTemplateChild(ToastImageName) as Image;\r\n\r\n            if (ToastImage != null && ImageSource != null)\r\n            {\r\n                ToastImage.Source = ImageSource;\r\n                SetImageVisibility(ImageSource);\r\n            }\r\n\r\n            SetTextOrientation(TextWrapping);\r\n        }\r\n\r\n        public override void Show()\r\n        {\r\n            if (!IsTimerEnabled)\r\n                return;\r\n\r\n            base.Show();\r\n\r\n            SetRenderTransform();\r\n            PreventScrollBinding.SetIsEnabled(this, true);\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            if (_timer != null)\r\n            {\r\n                _timer.Dispose();\r\n                _timer = null;\r\n            }\r\n        }\r\n\r\n        #region Control Events\r\n        void ToastPromptManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            PauseTimer();\r\n        }\r\n\r\n        void ToastPromptManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            _translate.X += e.DeltaManipulation.Translation.X;\r\n\r\n            if (_translate.X < 0)\r\n                _translate.X = 0;\r\n        }\r\n\r\n        void ToastPromptManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            if (e.TotalManipulation.Translation.X > 200 || e.FinalVelocities.LinearVelocity.X > 1000)\r\n            {\r\n                OnCompleted(new PopUpEventArgs<string, PopUpResult> { PopUpResult = PopUpResult.UserDismissed });\r\n            }\r\n            else if (e.TotalManipulation.Translation.X < 20)\r\n            {\r\n                OnCompleted(new PopUpEventArgs<string, PopUpResult> { PopUpResult = PopUpResult.Ok });\r\n            }\r\n            else\r\n            {\r\n                _translate.X = 0;\r\n                StartTimer();\r\n            }\r\n        }\r\n\r\n        void ToastPromptOpened(object sender, EventArgs e)\r\n        {\r\n            StartTimer();\r\n        }\r\n\r\n        void TimerTick(object state)\r\n        {\r\n            Dispatcher.BeginInvoke(() => OnCompleted(new PopUpEventArgs<string, PopUpResult> { PopUpResult = PopUpResult.NoResponse }));\r\n        }\r\n\r\n        public override void OnCompleted(PopUpEventArgs<string, PopUpResult> result)\r\n        {\r\n            if (PopUpService != null && result.PopUpResult == PopUpResult.UserDismissed)\r\n            {\r\n                PopUpService.AnimationType = DialogService.AnimationTypes.SlideHorizontal;   \r\n            }\r\n\r\n            PreventScrollBinding.SetIsEnabled(this, false);\r\n\r\n            PauseTimer();\r\n            Dispose();\r\n\r\n\r\n            base.OnCompleted(result);\r\n        }\r\n        #endregion\r\n\r\n        #region helper methods\r\n        private void SetImageVisibility(ImageSource source)\r\n        {\r\n            ToastImage.Visibility = (source == null) ? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        private void SetTextOrientation(TextWrapping value)\r\n        {\r\n            if (value == TextWrapping.Wrap)\r\n            {\r\n                TextOrientation = Orientation.Vertical;\r\n            }\r\n        }\r\n\r\n        private void StartTimer()\r\n        {\r\n            if (_timer == null)\r\n                _timer = new Timer(TimerTick);\r\n\r\n            _timer.Change(TimeSpan.FromMilliseconds(MillisecondsUntilHidden), TimeSpan.FromMilliseconds(-1));\r\n        }\r\n\r\n        private void PauseTimer()\r\n        {\r\n            if (_timer != null)\r\n                _timer.Change(TimeSpan.FromMilliseconds(-1), TimeSpan.FromMilliseconds(-1));\r\n        }\r\n\r\n        private void SetRenderTransform()\r\n        {\r\n            _translate = new TranslateTransform();\r\n            RenderTransform = _translate;\r\n        }\r\n        #endregion\r\n\r\n        #region Dependency Property Callbacks\r\n        private static void OnTextWrapping(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var sender = o as ToastPrompt;\r\n\r\n            if (sender == null || sender.ToastImage == null)\r\n                return;\r\n\r\n            sender.SetTextOrientation((TextWrapping)e.NewValue);\r\n        }\r\n\r\n        private static void OnImageSource(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var sender = o as ToastPrompt;\r\n\r\n            if (sender == null || sender.ToastImage == null)\r\n                return;\r\n\r\n            sender.SetImageVisibility(e.NewValue as ImageSource);\r\n        }\r\n        #endregion\r\n\r\n        #region Dependency Properties / Properties\r\n\r\n        public int MillisecondsUntilHidden\r\n        {\r\n            get { return (int)GetValue(MillisecondsUntilHiddenProperty); }\r\n            set { SetValue(MillisecondsUntilHiddenProperty, value); }\r\n        }\r\n\r\n        // Using a DependencyProperty as the backing store for MillisecondsUntilHidden.  This enables animation, styling, binding, etc...\r\n        public static readonly DependencyProperty MillisecondsUntilHiddenProperty =\r\n            DependencyProperty.Register(\"MillisecondsUntilHidden\", typeof(int), typeof(ToastPrompt), new PropertyMetadata(4000));\r\n\r\n        public bool IsTimerEnabled\r\n        {\r\n            get { return (bool)GetValue(IsTimerEnabledProperty); }\r\n            set { SetValue(IsTimerEnabledProperty, value); }\r\n        }\r\n\r\n        // Using a DependencyProperty as the backing store for IsTimerEnabled.  This enables animation, styling, binding, etc...\r\n        public static readonly DependencyProperty IsTimerEnabledProperty =\r\n            DependencyProperty.Register(\"IsTimerEnabled\", typeof(bool), typeof(ToastPrompt), new PropertyMetadata(true));\r\n\r\n        public string Title\r\n        {\r\n            get { return (string)GetValue(TitleProperty); }\r\n            set { SetValue(TitleProperty, value); }\r\n        }\r\n\r\n        // Using a DependencyProperty as the backing store for Title.  This enables animation, styling, binding, etc...\r\n        public static readonly DependencyProperty TitleProperty =\r\n            DependencyProperty.Register(\"Title\", typeof(string), typeof(ToastPrompt), new PropertyMetadata(\"\"));\r\n\r\n        public string Message\r\n        {\r\n            get { return (string)GetValue(MessageProperty); }\r\n            set { SetValue(MessageProperty, value); }\r\n        }\r\n\r\n        // Using a DependencyProperty as the backing store for Message.  This enables animation, styling, binding, etc...\r\n        public static readonly DependencyProperty MessageProperty =\r\n            DependencyProperty.Register(\"Message\", typeof(string), typeof(ToastPrompt), new PropertyMetadata(\"\"));\r\n\r\n        public ImageSource ImageSource\r\n        {\r\n            get { return (ImageSource)GetValue(ImageSourceProperty); }\r\n            set { SetValue(ImageSourceProperty, value); }\r\n        }\r\n\r\n        // Using a DependencyProperty as the backing store for ImageSource.  This enables animation, styling, binding, etc...\r\n        public static readonly DependencyProperty ImageSourceProperty =\r\n            DependencyProperty.Register(\"ImageSource\", typeof(ImageSource), typeof(ToastPrompt),\r\n            new PropertyMetadata(OnImageSource));\r\n\r\n        public Stretch Stretch\r\n        {\r\n            get { return (Stretch)GetValue(StretchProperty); }\r\n            set { SetValue(StretchProperty, value); }\r\n        }\r\n\r\n        // Using a DependencyProperty as the backing store for Stretch.  This enables animation, styling, binding, etc...\r\n        public static readonly DependencyProperty StretchProperty =\r\n            DependencyProperty.Register(\"Stretch\", typeof(Stretch), typeof(ToastPrompt),\r\n            new PropertyMetadata(Stretch.None));\r\n\r\n        public double ImageWidth\r\n        {\r\n            get { return (double)GetValue(ImageWidthProperty); }\r\n            set { SetValue(ImageWidthProperty, value); }\r\n        }\r\n\r\n        // Using a DependencyProperty as the backing store for ImageWidth.  This enables animation, styling, binding, etc...\r\n        public static readonly DependencyProperty ImageWidthProperty =\r\n            DependencyProperty.Register(\"ImageWidth\", typeof(double), typeof(ToastPrompt), new PropertyMetadata(double.NaN));\r\n\r\n        public double ImageHeight\r\n        {\r\n            get { return (double)GetValue(ImageHeightProperty); }\r\n            set { SetValue(ImageHeightProperty, value); }\r\n        }\r\n\r\n        // Using a DependencyProperty as the backing store for ImageWidth.  This enables animation, styling, binding, etc...\r\n        public static readonly DependencyProperty ImageHeightProperty =\r\n            DependencyProperty.Register(\"ImageHeight\", typeof(double), typeof(ToastPrompt), new PropertyMetadata(double.NaN));\r\n\r\n        public Orientation TextOrientation\r\n        {\r\n            get { return (Orientation)GetValue(TextOrientationProperty); }\r\n            set { SetValue(TextOrientationProperty, value); }\r\n        }\r\n\r\n        // Using a DependencyProperty as the backing store for TextOrientation.  This enables animation, styling, binding, etc...\r\n        public static readonly DependencyProperty TextOrientationProperty =\r\n            DependencyProperty.Register(\"TextOrientation\", typeof(Orientation), typeof(ToastPrompt), new PropertyMetadata(Orientation.Horizontal));\r\n\r\n        public TextWrapping TextWrapping\r\n        {\r\n            get { return (TextWrapping)GetValue(TextWrappingProperty); }\r\n            set { SetValue(TextWrappingProperty, value); }\r\n        }\r\n\r\n        // Using a DependencyProperty as the backing store for TextWrapping.  This enables animation, styling, binding, etc...\r\n        public static readonly DependencyProperty TextWrappingProperty =\r\n            DependencyProperty.Register(\"TextWrapping\", typeof(TextWrapping), typeof(ToastPrompt), new PropertyMetadata(TextWrapping.NoWrap, OnTextWrapping));\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/Profiling/ApplicationSpace.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Threading;\r\n\r\nnamespace Telegram.Controls.Profiling\r\n{\r\n    public static class ApplicationSpace\r\n    {\r\n        public static Frame RootFrame\r\n        {\r\n            get\r\n            {\r\n                return Application.Current.RootVisual as Frame;\r\n            }\r\n        }\r\n\r\n        public static bool IsDesignMode\r\n        {\r\n            get\r\n            {\r\n                return DesignerProperties.IsInDesignTool;\r\n            }\r\n        }\r\n\r\n        public static Dispatcher CurrentDispatcher\r\n        {\r\n            get\r\n            {\r\n                return Deployment.Current.Dispatcher;\r\n            }\r\n        }\r\n\r\n        public static int ScaleFactor()\r\n        {\r\n            return 100;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/Profiling/MemoryCounter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing System.Windows.Threading;\r\nusing Microsoft.Phone.Info;\r\n\r\nnamespace Telegram.Controls.Profiling\r\n{\r\n    public class MemoryCounter : Control, IDisposable\r\n    {\r\n        private const float ByteToMega = 1024 * 1024;\r\n        private DispatcherTimer _timer;\r\n\r\n        private bool _threwException;\r\n\r\n        public MemoryCounter()\r\n        {\r\n            DefaultStyleKey = typeof(MemoryCounter);\r\n            DataContext = this;\r\n\r\n            Loaded += ControlLoaded;\r\n            Unloaded += ControlUnloaded;\r\n        }\r\n\r\n        public int UpdateInterval\r\n        {\r\n            get { return (int)GetValue(UpdateIntervalProperty); }\r\n            set { SetValue(UpdateIntervalProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty UpdateIntervalProperty =\r\n            DependencyProperty.Register(\"UpdateInterval\", typeof(int), typeof(MemoryCounter), new PropertyMetadata(1000, OnUpdateIntervalChanged));\r\n\r\n        private static void OnUpdateIntervalChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n\r\n            var sender = ((MemoryCounter)o);\r\n\r\n            if (sender != null && sender._timer != null)\r\n                sender._timer.Interval = TimeSpan.FromMilliseconds((int)e.NewValue);\r\n        }\r\n\r\n        public string CurrentMemory\r\n        {\r\n            get { return (string)GetValue(CurrentMemoryProperty); }\r\n            set { SetValue(CurrentMemoryProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty CurrentMemoryProperty =\r\n            DependencyProperty.Register(\"CurrentMemory\", typeof(string), typeof(MemoryCounter), new PropertyMetadata(\"0\"));\r\n\r\n        public string PeakMemory\r\n        {\r\n            get { return (string)GetValue(PeakMemoryProperty); }\r\n            set { SetValue(PeakMemoryProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty PeakMemoryProperty =\r\n            DependencyProperty.Register(\"PeakMemory\", typeof(string), typeof(MemoryCounter), new PropertyMetadata(\"0\"));\r\n\r\n        void TimerTick(object sender, EventArgs e)\r\n        {\r\n            if ( _threwException)\r\n            {\r\n                StopAndHide();\r\n            }\r\n\r\n            try\r\n            {\r\n                CurrentMemory = ((DeviceStatus.ApplicationCurrentMemoryUsage) / ByteToMega).ToString(\"#.00\");\r\n                PeakMemory = ((DeviceStatus.ApplicationPeakMemoryUsage) / ByteToMega).ToString(\"#.00\");\r\n\r\n                Debug.WriteLine(\"CALLING MEM: \" + DateTime.Now);\r\n            }\r\n            catch (Exception)\r\n            {\r\n                _threwException = true;\r\n                _timer.Stop();\r\n            }\r\n        }\r\n\r\n        private void StopAndHide()\r\n        {\r\n            if (_timer != null)\r\n                _timer.Stop();\r\n\r\n            Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n\r\n        void ControlLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (ApplicationSpace.IsDesignMode)\r\n                return;\r\n\r\n            _timer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(UpdateInterval) };\r\n            _timer.Tick += TimerTick;\r\n            _timer.Start();\r\n\r\n            var rootFrame = ApplicationSpace.RootFrame;\r\n\r\n            if (rootFrame == null)\r\n                return;\r\n\r\n            rootFrame.Navigated -= FrameNavigated;\r\n            rootFrame.Navigated += FrameNavigated;\r\n        }\r\n\r\n        #region control unloaded\r\n        void ControlUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            Dispose();\r\n        }\r\n\r\n        void FrameNavigated(object sender, NavigationEventArgs e)\r\n        {\r\n#if WINDOWS_PHONE\r\n            if (e.IsNavigationInitiator)\r\n#endif\r\n            {\r\n                Dispose();\r\n            }\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            var rootFrame = ApplicationSpace.RootFrame;\r\n\r\n            if (rootFrame != null)\r\n                rootFrame.Navigated -= FrameNavigated;\r\n\r\n            if (_timer != null)\r\n            {\r\n                _timer.Stop();\r\n                _timer.Tick -= TimerTick;\r\n\r\n                _timer = null;\r\n            }\r\n        }\r\n        #endregion\r\n\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Controls/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Telegram.Controls\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Telegram.Controls\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"c1e19589-bd32-4dcf-af58-393ad4d40b4e\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "Telegram.Controls/README_FIRST.txt",
    "content": "For the Windows Phone toolkit make sure that you have\r\nmarked the icons in the \"Toolkit.Content\" folder as content.  That way they \r\ncan be used as the icons for the ApplicationBar control."
  },
  {
    "path": "Telegram.Controls/RangeSlider.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace Telegram.Controls\r\n{\r\n    using System;\r\n    using System.Windows;\r\n    using System.Windows.Controls;\r\n    using System.Windows.Controls.Primitives;\r\n\r\n    /// <summary>\r\n    /// A double headed slider for selecting a range.\r\n    /// </summary>\r\n    public class RangeSlider : Control\r\n    {\r\n        /// <summary>\r\n        /// The minimum value dependency protperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty MinimumProperty =\r\n            DependencyProperty.Register(\"Minimum\", typeof(double), typeof(RangeSlider), new PropertyMetadata(0.0, new PropertyChangedCallback(RangeBounds_Changed)));\r\n\r\n        /// <summary>\r\n        /// The maximum value dependency protperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty MaximumProperty =\r\n            DependencyProperty.Register(\"Maximum\", typeof(double), typeof(RangeSlider), new PropertyMetadata(1.0, new PropertyChangedCallback(RangeBounds_Changed)));\r\n\r\n        /// <summary>\r\n        /// The minimum range span dependency protperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty MinimumRangeSpanProperty =\r\n            DependencyProperty.Register(\"MinimumRangeSpan\", typeof(double), typeof(RangeSlider), new PropertyMetadata(0.0));\r\n\r\n        /// <summary>\r\n        /// The range start dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty RangeStartProperty =\r\n            DependencyProperty.Register(\"RangeStart\", typeof(double), typeof(RangeSlider), new PropertyMetadata(0.0, new PropertyChangedCallback(Range_Changed)));\r\n\r\n        /// <summary>\r\n        /// The range end dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty RangeEndProperty =\r\n            DependencyProperty.Register(\"RangeEnd\", typeof(double), typeof(RangeSlider), new PropertyMetadata(1.0, new PropertyChangedCallback(Range_Changed)));\r\n\r\n        /// <summary>\r\n        /// The element name for the range start thumb.\r\n        /// </summary>\r\n        private const string ElementRangeStartThumb = \"RangeStartThumb\";\r\n\r\n        /// <summary>\r\n        /// The element name for the range center thumb.\r\n        /// </summary>\r\n        private const string ElementRangeCenterThumb = \"RangeCenterThumb\";\r\n\r\n        /// <summary>\r\n        /// The element name for the range end thumb.\r\n        /// </summary>\r\n        private const string ElementRangeEndThumb = \"RangeEndThumb\";\r\n\r\n        /// <summary>\r\n        /// The element name for the selected range borer.\r\n        /// </summary>\r\n        private const string ElementSelectedRangeBorder = \"SelectedRangeBorder\";\r\n\r\n        /// <summary>\r\n        /// The range start thumb.\r\n        /// </summary>\r\n        private Thumb rangeStartThumb;\r\n\r\n        /// <summary>\r\n        /// The range center thumb.\r\n        /// </summary>\r\n        private Thumb rangeCenterThumb;\r\n\r\n        /// <summary>\r\n        /// The range end thumb.\r\n        /// </summary>\r\n        private Thumb rangeEndThumb;\r\n\r\n        /// <summary>\r\n        /// The selected range border.\r\n        /// </summary>\r\n        private Border selectedRangeBorder;\r\n\r\n        /// <summary>\r\n        /// RangeSlider constructor.\r\n        /// </summary>\r\n        public RangeSlider()\r\n        {\r\n            this.DefaultStyleKey = typeof(RangeSlider);\r\n            this.SizeChanged += new SizeChangedEventHandler(this.RangeSlider_SizeChanged);\r\n        }\r\n\r\n        /// <summary>\r\n        /// RangeChanged event.\r\n        /// </summary>\r\n        public event EventHandler RangeChanged;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the slider minimum value.\r\n        /// </summary>\r\n        public double Minimum\r\n        {\r\n            get\r\n            {\r\n                return (double)GetValue(MinimumProperty);\r\n            }\r\n\r\n            set\r\n            {\r\n                SetValue(MinimumProperty, Math.Min(this.Maximum, Math.Max(0, value)));\r\n\r\n                if (this.Maximum - this.Minimum < this.MinimumRangeSpan)\r\n                {\r\n                    this.MinimumRangeSpan = this.Maximum - this.Minimum;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the slider maximum value.\r\n        /// </summary>\r\n        public double Maximum\r\n        {\r\n            get\r\n            {\r\n                return (double)GetValue(MaximumProperty);\r\n            }\r\n\r\n            set\r\n            {\r\n                SetValue(MaximumProperty, Math.Max(this.Minimum, value));\r\n\r\n                if (this.Maximum - this.Minimum < this.MinimumRangeSpan)\r\n                {\r\n                    this.MinimumRangeSpan = this.Maximum - this.Minimum;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the slider minimum range span.\r\n        /// </summary>\r\n        public double MinimumRangeSpan\r\n        {\r\n            get\r\n            {\r\n                return (double)GetValue(MinimumRangeSpanProperty);\r\n            }\r\n\r\n            set\r\n            {\r\n                SetValue(MinimumRangeSpanProperty, Math.Min(this.Maximum - this.Minimum, value));\r\n                this.UpdateSelectedRangeMinimumWidth();\r\n                this.UpdateRange(false);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the range start.\r\n        /// </summary>\r\n        public double RangeStart\r\n        {\r\n            get\r\n            {\r\n                return (double)GetValue(RangeStartProperty);\r\n            }\r\n\r\n            set\r\n            {\r\n                double rangeStart = Math.Max(this.Minimum, value);\r\n                SetValue(RangeStartProperty, rangeStart);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the range end.\r\n        /// </summary>\r\n        public double RangeEnd\r\n        {\r\n            get\r\n            {\r\n                return (double)GetValue(RangeEndProperty);\r\n            }\r\n\r\n            set\r\n            {\r\n                double rangeEnd = Math.Min(this.Maximum, value);\r\n                SetValue(RangeEndProperty, rangeEnd);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the template parts from the template.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            this.selectedRangeBorder = this.GetTemplateChild(RangeSlider.ElementSelectedRangeBorder) as Border;\r\n            this.rangeStartThumb = this.GetTemplateChild(RangeSlider.ElementRangeStartThumb) as Thumb;\r\n            if (this.rangeStartThumb != null)\r\n            {\r\n                this.rangeStartThumb.DragDelta += new DragDeltaEventHandler(this.RangeStartThumb_DragDelta);\r\n                this.rangeStartThumb.SizeChanged += new SizeChangedEventHandler(this.RangeThumb_SizeChanged);\r\n            }\r\n\r\n            this.rangeCenterThumb = this.GetTemplateChild(RangeSlider.ElementRangeCenterThumb) as Thumb;\r\n            if (this.rangeCenterThumb != null)\r\n            {\r\n                this.rangeCenterThumb.DragDelta += new DragDeltaEventHandler(this.RangeCenterThumb_DragDelta);\r\n            }\r\n\r\n            this.rangeEndThumb = this.GetTemplateChild(RangeSlider.ElementRangeEndThumb) as Thumb;\r\n            if (this.rangeEndThumb != null)\r\n            {\r\n                this.rangeEndThumb.DragDelta += new DragDeltaEventHandler(this.RangeEndThumb_DragDelta);\r\n                this.rangeEndThumb.SizeChanged += new SizeChangedEventHandler(this.RangeThumb_SizeChanged);\r\n            }\r\n        }\r\n\r\n        #region Dependency property events.\r\n        /// <summary>\r\n        /// Updates the slider when the selected range changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">The range slider.</param>\r\n        /// <param name=\"args\">Dependency Property Changed Event Args.</param>\r\n        private static void Range_Changed(DependencyObject d, DependencyPropertyChangedEventArgs args)\r\n        {\r\n            RangeSlider rangeSlider = d as RangeSlider;\r\n            rangeSlider.UpdateSlider();\r\n\r\n            if (rangeSlider.RangeChanged != null)\r\n            {\r\n                rangeSlider.RangeChanged(rangeSlider, EventArgs.Empty);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the range start and end values.\r\n        /// </summary>\r\n        /// <param name=\"d\">The range slider.</param>\r\n        /// <param name=\"args\">Dependency Property Changed Event Args.</param>\r\n        private static void RangeBounds_Changed(DependencyObject d, DependencyPropertyChangedEventArgs args)\r\n        {\r\n            (d as RangeSlider).UpdateRange(true);\r\n        }\r\n        #endregion\r\n\r\n        #region Range Slider events\r\n        /// <summary>\r\n        /// Updates the slider UI.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The range slider.</param>\r\n        /// <param name=\"e\">Size Changed Event Args.</param>\r\n        private void RangeSlider_SizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            this.UpdateSelectedRangeMinimumWidth();\r\n            this.UpdateSlider();\r\n        }\r\n        #endregion\r\n\r\n        #region Thumb events\r\n        /// <summary>\r\n        /// Updates the slider's minimum width.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The range thumb.</param>\r\n        /// <param name=\"e\">Size changed event args.</param>\r\n        private void RangeThumb_SizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            this.UpdateSelectedRangeMinimumWidth();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Moves the whole range slider.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The range cetner thumb.</param>\r\n        /// <param name=\"e\">Drag Delta Event Args.</param>\r\n        private void RangeCenterThumb_DragDelta(object sender, DragDeltaEventArgs e)\r\n        {\r\n            if (this.selectedRangeBorder != null)\r\n            {\r\n                double startMargin = this.selectedRangeBorder.Margin.Left + e.HorizontalChange;\r\n                double endMargin = this.selectedRangeBorder.Margin.Right - e.HorizontalChange;\r\n\r\n                if (startMargin + e.HorizontalChange <= 0)\r\n                {\r\n                    startMargin = 0;\r\n                    endMargin = Math.Round(this.ActualWidth - (((this.RangeEnd - this.RangeStart) / (this.Maximum - this.Minimum)) * this.ActualWidth), 0);\r\n                }\r\n                else if (endMargin - e.HorizontalChange <= 0)\r\n                {\r\n                    endMargin = 0;\r\n                    startMargin = Math.Round(this.ActualWidth - (((this.RangeEnd - this.RangeStart) / (this.Maximum - this.Minimum)) * this.ActualWidth), 0);\r\n                }\r\n\r\n                if (!double.IsNaN(startMargin) && !double.IsNaN(endMargin))\r\n                {\r\n                    this.selectedRangeBorder.Margin = new Thickness(\r\n                        startMargin,\r\n                        this.selectedRangeBorder.Margin.Top,\r\n                        endMargin,\r\n                        this.selectedRangeBorder.Margin.Bottom);\r\n                }\r\n\r\n                this.UpdateRange(true);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Moves the range end thumb.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The range end thumb.</param>\r\n        /// <param name=\"e\">Drag Delta Event Args.</param>\r\n        private void RangeEndThumb_DragDelta(object sender, DragDeltaEventArgs e)\r\n        {\r\n            if (this.selectedRangeBorder != null)\r\n            {\r\n                double endMargin = Math.Round(Math.Min(this.ActualWidth - this.selectedRangeBorder.MinWidth, Math.Max(0, this.selectedRangeBorder.Margin.Right - e.HorizontalChange)), 0);\r\n                double startMargin = Math.Round(this.selectedRangeBorder.Margin.Left, 0);\r\n\r\n                if (this.ActualWidth - startMargin - endMargin < this.selectedRangeBorder.MinWidth)\r\n                {\r\n                    startMargin = Math.Round(this.ActualWidth - endMargin - this.selectedRangeBorder.MinWidth, 0);\r\n                }\r\n\r\n                this.selectedRangeBorder.Margin = new Thickness(\r\n                    startMargin,\r\n                    this.selectedRangeBorder.Margin.Top,\r\n                    endMargin,\r\n                    this.selectedRangeBorder.Margin.Bottom);\r\n\r\n                this.UpdateRange(true);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Moves the range start thumb.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The range start thumb.</param>\r\n        /// <param name=\"e\">Drag Delta Event Args.</param>\r\n        private void RangeStartThumb_DragDelta(object sender, DragDeltaEventArgs e)\r\n        {\r\n            if (this.selectedRangeBorder != null)\r\n            {\r\n                double startMargin = Math.Round(Math.Min(this.ActualWidth - this.selectedRangeBorder.MinWidth, Math.Max(0, this.selectedRangeBorder.Margin.Left + e.HorizontalChange)), 0);\r\n                double endMargin = Math.Round(this.selectedRangeBorder.Margin.Right, 0);\r\n\r\n                if (this.ActualWidth - startMargin - endMargin < this.selectedRangeBorder.MinWidth)\r\n                {\r\n                    endMargin = Math.Round(this.ActualWidth - startMargin - this.selectedRangeBorder.MinWidth, 0);\r\n                }\r\n\r\n                \r\n\r\n                this.selectedRangeBorder.Margin = new Thickness(\r\n                    startMargin,\r\n                    this.selectedRangeBorder.Margin.Top,\r\n                    endMargin,\r\n                    this.selectedRangeBorder.Margin.Bottom);\r\n\r\n                this.UpdateRange(true);\r\n            }\r\n        }\r\n\r\n        public void Log(string str)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(str);\r\n        }\r\n\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Updates the thumb mimimum width.\r\n        /// </summary>\r\n        private void UpdateSelectedRangeMinimumWidth()\r\n        {\r\n            if (this.selectedRangeBorder != null && this.rangeStartThumb != null && this.rangeEndThumb != null)\r\n            {\r\n                this.selectedRangeBorder.MinWidth = Math.Max(\r\n                    this.rangeStartThumb.ActualWidth + this.rangeEndThumb.ActualWidth,\r\n                    (this.MinimumRangeSpan / ((this.Maximum - this.Minimum) == 0 ? 1 : (this.Maximum - this.Minimum))) * this.ActualWidth);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the slider UI.\r\n        /// </summary>\r\n        private void UpdateSlider()\r\n        {\r\n            if (this.selectedRangeBorder != null)\r\n            {\r\n                double startMargin = (this.RangeStart / (this.Maximum - this.Minimum)) * this.ActualWidth;\r\n                double endMargin = ((this.Maximum - this.RangeEnd) / (this.Maximum - this.Minimum)) * this.ActualWidth;\r\n\r\n                if (!double.IsNaN(startMargin) && !double.IsNaN(endMargin))\r\n                {\r\n                    this.selectedRangeBorder.Margin = new Thickness(\r\n                            startMargin,\r\n                            this.selectedRangeBorder.Margin.Top,\r\n                            endMargin,\r\n                            this.selectedRangeBorder.Margin.Bottom);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the selected range.\r\n        /// </summary>\r\n        /// <param name=\"raiseEvent\">Whether the range changed event should fire.</param>\r\n        private void UpdateRange(bool raiseEvent)\r\n        {\r\n            if (this.selectedRangeBorder != null)\r\n            {\r\n                bool rangeChanged = false;\r\n                double rangeStart = Math.Round(((this.Maximum - this.Minimum) * (this.selectedRangeBorder.Margin.Left / this.ActualWidth)) + this.Minimum, 0);\r\n                double rangeEnd = Math.Round(this.Maximum - ((this.Maximum - this.Minimum) * (this.selectedRangeBorder.Margin.Right / this.ActualWidth)), 0);\r\n\r\n                if (rangeEnd - rangeStart < this.MinimumRangeSpan)\r\n                {\r\n                    if (rangeStart + this.MinimumRangeSpan > this.Maximum)\r\n                    {\r\n                        rangeStart = this.Maximum - this.MinimumRangeSpan;\r\n                    }\r\n\r\n                    rangeEnd = Math.Min(this.Maximum, rangeStart + this.MinimumRangeSpan);\r\n                }\r\n\r\n                if (rangeStart != this.RangeStart || rangeEnd != this.RangeEnd)\r\n                {\r\n                    rangeChanged = true;\r\n                }\r\n\r\n                this.RangeStart = rangeStart;\r\n                this.RangeEnd = rangeEnd;\r\n\r\n                if (raiseEvent && rangeChanged && this.RangeChanged != null)\r\n                {\r\n                    this.RangeChanged(this, EventArgs.Empty);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/ReorderListBox/ReorderListBox.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Controls;\r\n\r\nnamespace ReorderListBox\r\n{\r\n    /// <summary>\r\n    /// Extends ListBox to enable drag-and-drop reorder within the list.\r\n    /// </summary>\r\n    [TemplatePart(Name = ReorderListBox.ScrollViewerPart, Type = typeof(ScrollViewer))]\r\n    [TemplatePart(Name = ReorderListBox.DragIndicatorPart, Type = typeof(Image))]\r\n    [TemplatePart(Name = ReorderListBox.DragInterceptorPart, Type = typeof(Canvas))]\r\n    [TemplatePart(Name = ReorderListBox.RearrangeCanvasPart, Type = typeof(Canvas))]\r\n    public class ReorderListBox : ListBox\r\n    {\r\n        #region Template part name constants\r\n\r\n        public const string ScrollViewerPart = \"ScrollViewer\";\r\n        public const string DragIndicatorPart = \"DragIndicator\";\r\n        public const string DragInterceptorPart = \"DragInterceptor\";\r\n        public const string RearrangeCanvasPart = \"RearrangeCanvas\";\r\n\r\n        #endregion\r\n\r\n        private const string VerticalCompressionGroup = \"VerticalCompression\";\r\n        private const string HorizontalCompressionGroup = \"HorizontalCompression\";\r\n        private const string ScrollStatesGroup = \"ScrollStates\";\r\n\r\n        private const string ScrollViewerScrollingVisualState = \"Scrolling\";\r\n        private const string ScrollViewerNotScrollingVisualState = \"NotScrolling\";\r\n\r\n        private const string IsReorderEnabledPropertyName = \"IsReorderEnabled\";\r\n\r\n        #region Private fields\r\n\r\n        private double dragScrollDelta;\r\n        private Panel itemsPanel;\r\n        private ScrollViewer scrollViewer;\r\n        private Canvas dragInterceptor;\r\n        private Image dragIndicator;\r\n        private object dragItem;\r\n        private ReorderListBoxItem dragItemContainer;\r\n        private bool isDragItemSelected;\r\n        private Rect dragInterceptorRect;\r\n        private int dropTargetIndex;\r\n        private Canvas rearrangeCanvas;\r\n        private Queue<KeyValuePair<Action, Duration>> rearrangeQueue;\r\n\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Creates a new ReorderListBox and sets the default style key.\r\n        /// The style key is used to locate the control template in Generic.xaml.\r\n        /// </summary>\r\n        public ReorderListBox()\r\n        {\r\n            this.DefaultStyleKey = typeof(ReorderListBox);\r\n\r\n            ItemContainerGenerator.ItemsChanged += (sender, args) =>\r\n            {\r\n\r\n            };\r\n        }\r\n\r\n        public static readonly DependencyProperty HeaderTemplateProperty = DependencyProperty.Register(\r\n            \"HeaderTemplate\", typeof (DataTemplate), typeof (ReorderListBox), new PropertyMetadata(default(DataTemplate)));\r\n\r\n        public DataTemplate HeaderTemplate\r\n        {\r\n            get { return (DataTemplate) GetValue(HeaderTemplateProperty); }\r\n            set { SetValue(HeaderTemplateProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty FooterTemplateProperty = DependencyProperty.Register(\r\n            \"FooterTemplate\", typeof (DataTemplate), typeof (ReorderListBox), new PropertyMetadata(default(DataTemplate)));\r\n\r\n        public DataTemplate FooterTemplate\r\n        {\r\n            get { return (DataTemplate) GetValue(FooterTemplateProperty); }\r\n            set { SetValue(FooterTemplateProperty, value); }\r\n        }\r\n\r\n        #region IsReorderEnabled DependencyProperty\r\n\r\n        public static readonly DependencyProperty IsReorderEnabledProperty = DependencyProperty.Register(\r\n            ReorderListBox.IsReorderEnabledPropertyName, typeof(bool), typeof(ReorderListBox),\r\n            new PropertyMetadata(false, (d, e) => ((ReorderListBox)d).OnIsReorderEnabledChanged(e)));\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether reordering is enabled in the listbox.\r\n        /// This also controls the visibility of the reorder drag-handle of each listbox item.\r\n        /// </summary>\r\n        public bool IsReorderEnabled\r\n        {\r\n            get\r\n            {\r\n                return (bool)this.GetValue(ReorderListBox.IsReorderEnabledProperty);\r\n            }\r\n            set\r\n            {\r\n                this.SetValue(ReorderListBox.IsReorderEnabledProperty, value);\r\n            }\r\n        }\r\n\r\n        protected void OnIsReorderEnabledChanged(DependencyPropertyChangedEventArgs e)\r\n        {\r\n            if (this.dragInterceptor != null)\r\n            {\r\n                this.dragInterceptor.Visibility = (bool)e.NewValue ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n\r\n            this.InvalidateArrange();\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region AutoScrollMargin DependencyProperty\r\n\r\n        public static readonly DependencyProperty AutoScrollMarginProperty = DependencyProperty.Register(\r\n            \"AutoScrollMargin\", typeof(int), typeof(ReorderListBox), new PropertyMetadata(32));\r\n\r\n        private PhoneApplicationPage _page;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the size of the region at the top and bottom of the list where dragging will\r\n        /// cause the list to automatically scroll.\r\n        /// </summary>\r\n        public double AutoScrollMargin\r\n        {\r\n            get\r\n            {\r\n                return (int)this.GetValue(ReorderListBox.AutoScrollMarginProperty);\r\n            }\r\n            set\r\n            {\r\n                this.SetValue(ReorderListBox.AutoScrollMarginProperty, value);\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region ItemsControl overrides\r\n\r\n        /// <summary>\r\n        /// Applies the control template, gets required template parts, and hooks up the drag events.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            this.scrollViewer = (ScrollViewer)this.GetTemplateChild(ReorderListBox.ScrollViewerPart);\r\n            if (scrollViewer != null)\r\n            {\r\n                //var verticalGroup = FindVisualState(scrollViewer, VerticalCompressionGroup);\r\n                //var horizontalGroup = FindVisualState(scrollViewer, HorizontalCompressionGroup);\r\n                var scrollStatesGroup = FindVisualState(scrollViewer, ScrollStatesGroup);\r\n\r\n                //if (verticalGroup != null)\r\n                //    verticalGroup.CurrentStateChanging += VerticalGroup_CurrentStateChanging;\r\n                //if (horizontalGroup != null)\r\n                //    horizontalGroup.CurrentStateChanging += HorizontalGroup_CurrentStateChanging;\r\n                if (scrollStatesGroup != null)\r\n                    scrollStatesGroup.CurrentStateChanging += ScrollStateGroup_CurrentStateChanging;\r\n            }\r\n            this.dragInterceptor = this.GetTemplateChild(ReorderListBox.DragInterceptorPart) as Canvas;\r\n            this.dragIndicator = this.GetTemplateChild(ReorderListBox.DragIndicatorPart) as Image;\r\n            this.rearrangeCanvas = this.GetTemplateChild(ReorderListBox.RearrangeCanvasPart) as Canvas;\r\n\r\n            if (this.scrollViewer != null && this.dragInterceptor != null && this.dragIndicator != null)\r\n            {\r\n                this.dragInterceptor.Visibility = this.IsReorderEnabled ? Visibility.Visible : Visibility.Collapsed;\r\n\r\n                //AddHandler(ManipulationStartedEvent, new EventHandler<ManipulationStartedEventArgs>(OnReorderListBoxManipulationStarted), true);\r\n                //AddHandler(ManipulationDeltaEvent, new EventHandler<ManipulationDeltaEventArgs>(dragInterceptor_ManipulationDelta), true);\r\n                //AddHandler(ManipulationCompletedEvent, new EventHandler<ManipulationCompletedEventArgs>(dragInterceptor_ManipulationCompleted), true);\r\n                this.dragInterceptor.ManipulationStarted += this.dragInterceptor_ManipulationStarted;\r\n                this.dragInterceptor.ManipulationDelta += this.dragInterceptor_ManipulationDelta;\r\n                this.dragInterceptor.ManipulationCompleted += this.dragInterceptor_ManipulationCompleted;\r\n            }\r\n        }\r\n\r\n        private void ScrollStateGroup_CurrentStateChanging(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            IsScrolling = (e.NewState.Name == ScrollViewerScrollingVisualState);\r\n        }\r\n        /// <summary>\r\n        /// The event people can subscribe to\r\n        /// </summary>\r\n        public event EventHandler<ScrollingStateChangedEventArgs> ScrollingStateChanged;\r\n\r\n        /// <summary>\r\n        /// DependencyProperty that backs the <see cref=\"IsScrolling\"/> property\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsScrollingProperty = DependencyProperty.Register(\r\n            \"IsScrolling\",\r\n            typeof(bool),\r\n            typeof(ReorderListBox),\r\n            new PropertyMetadata(false, IsScrollingPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Whether the list is currently scrolling or not\r\n        /// </summary>\r\n        public bool IsScrolling\r\n        {\r\n            get { return (bool)GetValue(IsScrollingProperty); }\r\n            set { SetValue(IsScrollingProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handler for when the IsScrolling dependency property changes\r\n        /// </summary>\r\n        /// <param name=\"source\">The object that has the property</param>\r\n        /// <param name=\"e\">Args</param>\r\n        static void IsScrollingPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var listbox = source as ReorderListBox;\r\n            if (listbox == null) return;\r\n\r\n            // Call the virtual notification method for anyone who derives from this class\r\n            var scrollingArgs = new ScrollingStateChangedEventArgs((bool)e.OldValue, (bool)e.NewValue);\r\n\r\n            // Raise the event, if anyone is listening to it\r\n            var handler = listbox.ScrollingStateChanged;\r\n            if (handler != null)\r\n                handler(listbox, scrollingArgs);\r\n        }\r\n\r\n        private static VisualStateGroup FindVisualState(FrameworkElement element, string stateName)\r\n        {\r\n            if (element == null)\r\n                return null;\r\n\r\n            var groups = VisualStateManager.GetVisualStateGroups(element);\r\n            return groups.Cast<VisualStateGroup>().FirstOrDefault(group => group.Name == stateName);\r\n        }\r\n\r\n        //private void OnReorderListBoxManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        //{\r\n        //    scrollViewer.IsHitTestVisible = false;\r\n        //    dragInterceptor_ManipulationStarted(sender, e);\r\n        //}\r\n\r\n        protected override DependencyObject GetContainerForItemOverride()\r\n        {\r\n            return new ReorderListBoxItem();\r\n        }\r\n\r\n        protected override bool IsItemItsOwnContainerOverride(object item)\r\n        {\r\n            return item is ReorderListBoxItem;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Ensures that a possibly-recycled item container (ReorderListBoxItem) is ready to display a list item.\r\n        /// </summary>\r\n        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            base.PrepareContainerForItemOverride(element, item);\r\n\r\n            ReorderListBoxItem itemContainer = (ReorderListBoxItem)element;\r\n            itemContainer.ApplyTemplate();  // Loads visual states.\r\n\r\n            // Set this state before binding to avoid showing the visual transition in this case.\r\n            string reorderState = this.IsReorderEnabled ?\r\n                ReorderListBoxItem.ReorderEnabledState : ReorderListBoxItem.ReorderDisabledState;\r\n            VisualStateManager.GoToState(itemContainer, reorderState, false);\r\n\r\n            itemContainer.SetBinding(ReorderListBoxItem.IsReorderEnabledProperty,\r\n                new Binding(ReorderListBox.IsReorderEnabledPropertyName) { Source = this });\r\n\r\n            if (item == this.dragItem)\r\n            {\r\n                itemContainer.IsSelected = this.isDragItemSelected;\r\n                VisualStateManager.GoToState(itemContainer, ReorderListBoxItem.DraggingState, false);\r\n\r\n                if (this.dropTargetIndex >= 0)\r\n                {\r\n                    // The item's dragIndicator is currently being moved, so the item itself is hidden. \r\n                    itemContainer.Visibility = Visibility.Collapsed;\r\n                    this.dragItemContainer = itemContainer;\r\n                }\r\n                else\r\n                {\r\n                    itemContainer.Opacity = 0;\r\n                    this.Dispatcher.BeginInvoke(() => this.AnimateDrop(itemContainer, \"prepareContainer\"));\r\n                }\r\n            }\r\n            else\r\n            {\r\n                VisualStateManager.GoToState(itemContainer, ReorderListBoxItem.NotDraggingState, false);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when an item container (ReorderListBoxItem) is being removed from the list panel.\r\n        /// This may be because the item was removed from the list or because the item is now outside\r\n        /// the virtualization region (because ListBox uses a VirtualizingStackPanel as its items panel).\r\n        /// </summary>\r\n        protected override void ClearContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            base.ClearContainerForItemOverride(element, item);\r\n\r\n            ReorderListBoxItem itemContainer = (ReorderListBoxItem)element;\r\n            if (itemContainer == this.dragItemContainer)\r\n            {\r\n                this.dragItemContainer.Visibility = Visibility.Visible;\r\n                this.dragItemContainer = null;\r\n                Debug.WriteLine(\"ClearContainerForItemOverride dragItemContainer=null\");\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Drag & drop reorder\r\n\r\n        internal static T GetFirstLogicalChildByType<T>(FrameworkElement parent, bool applyTemplates)\r\n            where T : FrameworkElement\r\n        {\r\n            Debug.Assert(parent != null, \"The parent cannot be null.\");\r\n\r\n            Queue<FrameworkElement> queue = new Queue<FrameworkElement>();\r\n            queue.Enqueue(parent);\r\n\r\n            while (queue.Count > 0)\r\n            {\r\n                FrameworkElement element = queue.Dequeue();\r\n                var elementAsControl = element as Control;\r\n                if (applyTemplates && elementAsControl != null)\r\n                {\r\n                    elementAsControl.ApplyTemplate();\r\n                }\r\n\r\n                if (element is T && element != parent)\r\n                {\r\n                    return (T)element;\r\n                }\r\n\r\n                foreach (FrameworkElement visualChild in GetVisualChildren(element).OfType<FrameworkElement>())\r\n                {\r\n                    queue.Enqueue(visualChild);\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static IEnumerable<DependencyObject> GetVisualChildren(DependencyObject target)\r\n        {\r\n            int count = VisualTreeHelper.GetChildrenCount(target);\r\n            if (count == 0)\r\n            {\r\n            }\r\n            else\r\n            {\r\n                for (int i = 0; i < count; i++)\r\n                {\r\n                    yield return VisualTreeHelper.GetChild(target, i);\r\n                }\r\n            }\r\n            yield break;\r\n        }\r\n\r\n        private bool _isManipulating;\r\n        private DateTime? _manipulationTimestamp;\r\n        /// <summary>\r\n        /// Called when the user presses down on the transparent drag-interceptor. Identifies the targed\r\n        /// drag handle and list item and prepares for a drag operation.\r\n        /// </summary>\r\n        private void dragInterceptor_ManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            Debug.WriteLine(\"ManipulationDelta dropTargetIndex=\" + dropTargetIndex + \" dragItemContainer=\" + (dragItemContainer != null ? dragItemContainer.Content : \"null\") + \" dragItem=\" + dragItem);\r\n           \r\n \r\n            _isManipulating = true;\r\n\r\n            _manipulationTimestamp = DateTime.Now;\r\n            var timestamp = _manipulationTimestamp;\r\n            GeneralTransform interceptorTransform;\r\n            List<UIElement> targetElements;\r\n            var targetItemContainer = InterceptorTransform(e, out targetElements, out interceptorTransform);\r\n            ThreadPool.QueueUserWorkItem(state =>\r\n            {\r\n                Thread.Sleep(TimeSpan.FromSeconds(0.5));\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    if (!_isManipulating) return;\r\n                    if (timestamp != _manipulationTimestamp) return;\r\n\r\n                    _page = _page ?? GetFirstLogicalChildByType<PhoneApplicationPage>(Application.Current.RootVisual as FrameworkElement, false);\r\n                    _page.NavigationService.Navigated += OnPageNavigated;\r\n                    if (this.dragItem != null)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    if (this.itemsPanel == null)\r\n                    {\r\n                        ItemsPresenter scrollItemsPresenter = (ItemsPresenter) GetFirstLogicalChildByType<ItemsPresenter>(this.scrollViewer, false);\r\n                        this.itemsPanel = (Panel)VisualTreeHelper.GetChild(scrollItemsPresenter, 0);\r\n                    }\r\n\r\n                    var newTargetItemContainer = InterceptorTransform(e, out targetElements, out interceptorTransform);\r\n                    if (newTargetItemContainer != targetItemContainer)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    targetItemContainer = newTargetItemContainer;\r\n                    if (targetItemContainer != null && targetElements.Contains(targetItemContainer.DragHandle))\r\n                    {\r\n                        VisualStateManager.GoToState(targetItemContainer, ReorderListBoxItem.DraggingState, true);\r\n\r\n                        GeneralTransform targetItemTransform = targetItemContainer.TransformToVisual(this.dragInterceptor);\r\n                        Point targetItemOrigin = targetItemTransform.Transform(new Point(0, 0));\r\n                        Canvas.SetLeft(this.dragIndicator, targetItemOrigin.X);\r\n                        Canvas.SetTop(this.dragIndicator, targetItemOrigin.Y);\r\n                        this.dragIndicator.Width = targetItemContainer.RenderSize.Width;\r\n                        this.dragIndicator.Height = targetItemContainer.RenderSize.Height;\r\n\r\n                        this.dragItemContainer = targetItemContainer;\r\n                        this.dragItem = this.dragItemContainer.Content;\r\n                        this.isDragItemSelected = this.dragItemContainer.IsSelected;\r\n\r\n                        dragInterceptorRect = interceptorTransform.TransformBounds(new Rect(new Point(0, 0), this.dragInterceptor.RenderSize));\r\n\r\n                        this.dropTargetIndex = -1;\r\n                        Debug.WriteLine(\"ManipulationStarted dropTargetIndex=\" + dropTargetIndex);\r\n                    }\r\n                });\r\n            });\r\n\r\n        }\r\n\r\n        private ReorderListBoxItem InterceptorTransform(ManipulationStartedEventArgs e, out List<UIElement> targetElements, out GeneralTransform interceptorTransform)\r\n        {\r\n            interceptorTransform = dragInterceptor.TransformToVisual(Application.Current.RootVisual);\r\n            \r\n            var targetPoint = interceptorTransform.Transform(e.ManipulationOrigin);\r\n            targetPoint = GetHostCoordinates(targetPoint);\r\n\r\n            targetElements = VisualTreeHelper.FindElementsInHostCoordinates(targetPoint, itemsPanel).ToList();\r\n\r\n            return targetElements.OfType<ReorderListBoxItem>().FirstOrDefault();\r\n        }\r\n\r\n        private void OnPageNavigated(object sender, NavigationEventArgs e)\r\n        {\r\n            _isManipulating = false;\r\n            _manipulationTimestamp = null;\r\n\r\n            Debug.WriteLine(\"PageNavigated initiator=\" + e.IsNavigationInitiator);\r\n\r\n            dragInterceptor_ManipulationCompleted(sender, null);\r\n\r\n            _page.NavigationService.Navigated -= OnPageNavigated;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the user drags on (or from) the transparent drag-interceptor.\r\n        /// Moves the item (actually a rendered snapshot of the item) according to the drag delta.\r\n        /// </summary>\r\n        private void dragInterceptor_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            Debug.WriteLine(\"ManipulationDelta dropTargetIndex=\" + dropTargetIndex + \" dragItemContainer=\" + (dragItemContainer != null ? dragItemContainer.Content : \"null\") + \" dragItem=\" + dragItem);\r\n            \r\n\r\n            if (e.PinchManipulation != null)\r\n            {\r\n                dragInterceptor_ManipulationCompleted(sender, null);\r\n\r\n                return;\r\n            }\r\n\r\n            if (this.Items.Count <= 1 || this.dragItem == null)\r\n            {\r\n                if (_manipulationTimestamp != null)\r\n                {\r\n                    _isManipulating = false;\r\n                    _manipulationTimestamp = null;\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            if (this.dropTargetIndex == -1)\r\n            {\r\n                if (this.dragItemContainer == null)\r\n                {\r\n                    dragItem = null;\r\n                    return;\r\n                }\r\n\r\n                // When the drag actually starts, swap out the item for the drag-indicator image of the item.\r\n                // This is necessary because the item itself may be removed from the virtualizing panel\r\n                // if the drag causes a scroll of considerable distance.\r\n                Size dragItemSize = this.dragItemContainer.RenderSize;\r\n                WriteableBitmap writeableBitmap = new WriteableBitmap(\r\n                    (int)dragItemSize.Width, (int)dragItemSize.Height);\r\n\r\n                // Swap states to force the transition to complete.\r\n                VisualStateManager.GoToState(this.dragItemContainer, ReorderListBoxItem.NotDraggingState, false);\r\n                VisualStateManager.GoToState(this.dragItemContainer, ReorderListBoxItem.DraggingState, false);\r\n                writeableBitmap.Render(this.dragItemContainer, null);\r\n\r\n                writeableBitmap.Invalidate();\r\n                this.dragIndicator.Source = writeableBitmap;\r\n\r\n                this.dragIndicator.Visibility = Visibility.Visible;\r\n                this.dragItemContainer.Visibility = Visibility.Collapsed;\r\n\r\n                if (this.itemsPanel.Children.IndexOf(this.dragItemContainer) < this.itemsPanel.Children.Count - 1)\r\n                {\r\n                    this.UpdateDropTarget(Canvas.GetTop(this.dragIndicator) + this.dragIndicator.Height + 1, false);\r\n                }\r\n                else\r\n                {\r\n                    this.UpdateDropTarget(Canvas.GetTop(this.dragIndicator) - 1, false);\r\n                }\r\n            }\r\n\r\n            double dragItemHeight = this.dragIndicator.Height;\r\n\r\n            TranslateTransform translation = (TranslateTransform)this.dragIndicator.RenderTransform;\r\n            double top = Canvas.GetTop(this.dragIndicator);\r\n\r\n            // Limit the translation to keep the item within the list area.\r\n            // Use different targeting for the top and bottom edges to allow taller items to\r\n            // move before or after shorter items at the edges.\r\n            double y = top + e.CumulativeManipulation.Translation.Y;\r\n            if (y < 0)\r\n            {\r\n                y = 0;\r\n                this.UpdateDropTarget(0, true);\r\n            }\r\n            else if (y >= this.dragInterceptorRect.Height - dragItemHeight)\r\n            {\r\n                y = this.dragInterceptorRect.Height - dragItemHeight;\r\n                this.UpdateDropTarget(this.dragInterceptorRect.Height - 1, true);\r\n            }\r\n            else\r\n            {\r\n                this.UpdateDropTarget(y + dragItemHeight / 2, true);\r\n            }\r\n\r\n            translation.Y = y - top;\r\n\r\n            // Check if we're within the margin where auto-scroll needs to happen.\r\n            bool scrolling = (this.dragScrollDelta != 0);\r\n            double autoScrollMargin = this.AutoScrollMargin;\r\n            if (autoScrollMargin > 0 && y < autoScrollMargin)\r\n            {\r\n                this.dragScrollDelta = y - autoScrollMargin;\r\n                if (!scrolling)\r\n                {\r\n                    VisualStateManager.GoToState(this.scrollViewer, ReorderListBox.ScrollViewerScrollingVisualState, true);\r\n                    this.Dispatcher.BeginInvoke(() => this.DragScroll());\r\n                    return;\r\n                }\r\n            }\r\n            else if (autoScrollMargin > 0 && y + dragItemHeight > this.dragInterceptorRect.Height - autoScrollMargin)\r\n            {\r\n                this.dragScrollDelta = (y + dragItemHeight - (this.dragInterceptorRect.Height - autoScrollMargin));\r\n                if (!scrolling)\r\n                {\r\n                    VisualStateManager.GoToState(this.scrollViewer, ReorderListBox.ScrollViewerScrollingVisualState, true);\r\n                    this.Dispatcher.BeginInvoke(() => this.DragScroll());\r\n                    return;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                // We're not within the auto-scroll margin. This ensures any current scrolling is stopped.\r\n                this.dragScrollDelta = 0;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the user releases a drag. Moves the item within the source list and then resets everything.\r\n        /// </summary>\r\n        private void dragInterceptor_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            _isManipulating = false;\r\n            _manipulationTimestamp = null;\r\n\r\n\r\n            Debug.WriteLine(\"ManipulationCompleted dropTargetIndex=\" + dropTargetIndex + \" dragItemContainer=\" + (dragItemContainer != null ? dragItemContainer.Content : \"null\") + \" dragItem=\" + dragItem);\r\n\r\n            if (_page != null)\r\n            {\r\n                _page.NavigationService.Navigated -= OnPageNavigated;\r\n            }\r\n\r\n            if (this.dragItem == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (this.dropTargetIndex >= 0)\r\n            {\r\n                this.MoveItem(this.dragItem, this.dropTargetIndex);\r\n            }\r\n            else\r\n            {\r\n\r\n            }\r\n\r\n            if (this.dragItemContainer != null)\r\n            {\r\n                this.dragItemContainer.Visibility = Visibility.Visible;\r\n                this.dragItemContainer.Opacity = 0;\r\n                this.AnimateDrop(this.dragItemContainer, \"manipulationCompleted\");\r\n                this.dragItemContainer = null;\r\n            }\r\n            else\r\n            {\r\n\r\n            }\r\n\r\n            this.dragScrollDelta = 0;\r\n            this.dropTargetIndex = -1;\r\n            //Debug.WriteLine(\"ManipulationCompleted dropTargetIndex=\" + dropTargetIndex);\r\n            this.ClearDropTarget();\r\n\r\n        }\r\n\r\n        /// <summary>\r\n        /// Slides the drag indicator (item snapshot) to the location of the dropped item,\r\n        /// then performs the visibility swap and removes the dragging visual state.\r\n        /// </summary>\r\n        private void AnimateDrop(ReorderListBoxItem itemContainer, string from)\r\n        {\r\n            GeneralTransform itemTransform = itemContainer.TransformToVisual(this.dragInterceptor);\r\n\r\n            Rect itemRect = itemTransform.TransformBounds(new Rect(new Point(0, 0), itemContainer.RenderSize));\r\n            double delta = Math.Abs(itemRect.Y - Canvas.GetTop(this.dragIndicator) - ((TranslateTransform)this.dragIndicator.RenderTransform).Y);\r\n            if (itemRect.Height == 0.0 || (itemContainer.RenderSize.Width == 0.0 && itemContainer.RenderSize.Height == 0.0))\r\n            {\r\n                delta = 0.0;\r\n            }\r\n            if (delta > 0.0)\r\n            {\r\n                // Adjust the duration based on the distance, so the speed will be constant.\r\n                TimeSpan duration = TimeSpan.FromSeconds(0.25 * delta / itemRect.Height);\r\n                Debug.WriteLine(\"Duration=\" + duration + \" from=\" + from + \" delta=\" + delta + \" itemRect.Height=\" + itemRect.Height + \" dragIndicator.Y=\" + ((TranslateTransform)this.dragIndicator.RenderTransform).Y + \" itemRect.Y=\" + itemRect.Y + \" Canvas.GetTop=\" + Canvas.GetTop(this.dragIndicator));\r\n                if (duration.TotalSeconds > 1.0)\r\n                {\r\n                    // There was no need for an animation, so do the visibility swap right now.\r\n                    this.dragItem = null;\r\n                    itemContainer.Opacity = 1;\r\n                    this.dragIndicator.Visibility = Visibility.Collapsed;\r\n                    this.dragIndicator.Source = null;\r\n                    VisualStateManager.GoToState(itemContainer, ReorderListBoxItem.NotDraggingState, true);\r\n                }\r\n                else\r\n                {\r\n                    Storyboard dropStoryboard = new Storyboard();\r\n                    DoubleAnimation moveToDropAnimation = new DoubleAnimation();\r\n                    Storyboard.SetTarget(moveToDropAnimation, this.dragIndicator.RenderTransform);\r\n                    Storyboard.SetTargetProperty(moveToDropAnimation, new PropertyPath(TranslateTransform.YProperty));\r\n                    moveToDropAnimation.To = itemRect.Y - Canvas.GetTop(this.dragIndicator);\r\n                    moveToDropAnimation.Duration = duration;\r\n                    dropStoryboard.Children.Add(moveToDropAnimation);\r\n\r\n                    dropStoryboard.Completed += delegate\r\n                    {\r\n                        this.dragItem = null;\r\n                        itemContainer.Opacity = 1;\r\n                        this.dragIndicator.Visibility = Visibility.Collapsed;\r\n                        this.dragIndicator.Source = null;\r\n                        ((TranslateTransform)this.dragIndicator.RenderTransform).Y = 0;\r\n                        VisualStateManager.GoToState(itemContainer, ReorderListBoxItem.NotDraggingState, true);\r\n\r\n                    };\r\n                    dropStoryboard.Begin();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                // There was no need for an animation, so do the visibility swap right now.\r\n                this.dragItem = null;\r\n                itemContainer.Opacity = 1;\r\n                this.dragIndicator.Visibility = Visibility.Collapsed;\r\n                this.dragIndicator.Source = null;\r\n                VisualStateManager.GoToState(itemContainer, ReorderListBoxItem.NotDraggingState, true);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Automatically scrolls for as long as the drag is held within the margin.\r\n        /// The speed of the scroll is adjusted based on the depth into the margin.\r\n        /// </summary>\r\n        private void DragScroll()\r\n        {\r\n            if (this.dragScrollDelta != 0)\r\n            {\r\n                double scrollRatio = this.scrollViewer.ViewportHeight / this.scrollViewer.RenderSize.Height;\r\n                double adjustedDelta = this.dragScrollDelta * scrollRatio;\r\n                double newOffset = this.scrollViewer.VerticalOffset + adjustedDelta;\r\n                this.scrollViewer.ScrollToVerticalOffset(newOffset);\r\n\r\n                this.Dispatcher.BeginInvoke(() => this.DragScroll());\r\n\r\n                double dragItemOffset = Canvas.GetTop(this.dragIndicator) +\r\n                    ((TranslateTransform)this.dragIndicator.RenderTransform).Y +\r\n                    this.dragIndicator.Height / 2;\r\n                this.UpdateDropTarget(dragItemOffset, true);\r\n            }\r\n            else\r\n            {\r\n                VisualStateManager.GoToState(this.scrollViewer, ReorderListBox.ScrollViewerNotScrollingVisualState, true);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates spacing (drop target indicators) surrounding the targeted region.\r\n        /// </summary>\r\n        /// <param name=\"dragItemOffset\">Vertical offset into the items panel where the drag is currently targeting.</param>\r\n        /// <param name=\"showTransition\">True if the drop-indicator transitions should be shown.</param>\r\n        private void UpdateDropTarget(double dragItemOffset, bool showTransition)\r\n        {\r\n            Point dragPoint = ReorderListBox.GetHostCoordinates(\r\n                new Point(this.dragInterceptorRect.Left, this.dragInterceptorRect.Top + dragItemOffset));\r\n            IEnumerable<UIElement> targetElements = VisualTreeHelper.FindElementsInHostCoordinates(dragPoint, this.itemsPanel);\r\n            ReorderListBoxItem targetItem = targetElements.OfType<ReorderListBoxItem>().FirstOrDefault();\r\n            if (targetItem != null)\r\n            {\r\n                GeneralTransform targetTransform = targetItem.DragHandle.TransformToVisual(this.dragInterceptor);\r\n                Rect targetRect = targetTransform.TransformBounds(new Rect(new Point(0, 0), targetItem.DragHandle.RenderSize));\r\n                double targetCenter = (targetRect.Top + targetRect.Bottom) / 2;\r\n\r\n                int targetIndex = this.itemsPanel.Children.IndexOf(targetItem);\r\n                int childrenCount = this.itemsPanel.Children.Count;\r\n                bool after = dragItemOffset > targetCenter;\r\n\r\n                ReorderListBoxItem indicatorItem = null;\r\n                if (!after && targetIndex > 0)\r\n                {\r\n                    ReorderListBoxItem previousItem = (ReorderListBoxItem)this.itemsPanel.Children[targetIndex - 1];\r\n                    if (previousItem.Tag as string == ReorderListBoxItem.DropAfterIndicatorState)\r\n                    {\r\n                        indicatorItem = previousItem;\r\n                    }\r\n                }\r\n                else if (after && targetIndex < childrenCount - 1)\r\n                {\r\n                    ReorderListBoxItem nextItem = (ReorderListBoxItem)this.itemsPanel.Children[targetIndex + 1];\r\n                    if (nextItem.Tag as string == ReorderListBoxItem.DropBeforeIndicatorState)\r\n                    {\r\n                        indicatorItem = nextItem;\r\n                    }\r\n                }\r\n                if (indicatorItem == null)\r\n                {\r\n                    targetItem.DropIndicatorHeight = this.dragIndicator.Height;\r\n                    string dropIndicatorState = after ?\r\n                        ReorderListBoxItem.DropAfterIndicatorState : ReorderListBoxItem.DropBeforeIndicatorState;\r\n                    VisualStateManager.GoToState(targetItem, dropIndicatorState, showTransition);\r\n                    targetItem.Tag = dropIndicatorState;\r\n                    indicatorItem = targetItem;\r\n                }\r\n\r\n                for (int i = targetIndex - 5; i <= targetIndex + 5; i++)\r\n                {\r\n                    if (i >= 0 && i < childrenCount)\r\n                    {\r\n                        ReorderListBoxItem nearbyItem = (ReorderListBoxItem)this.itemsPanel.Children[i];\r\n                        if (nearbyItem != indicatorItem)\r\n                        {\r\n                            VisualStateManager.GoToState(nearbyItem, ReorderListBoxItem.NoDropIndicatorState, showTransition);\r\n                            nearbyItem.Tag = ReorderListBoxItem.NoDropIndicatorState;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                this.UpdateDropTargetIndex(targetItem, after);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the targeted index -- that is the index where the item will be moved to if dropped at this point.\r\n        /// </summary>\r\n        private void UpdateDropTargetIndex(ReorderListBoxItem targetItemContainer, bool after)\r\n        {\r\n            int dragItemIndex = this.Items.IndexOf(this.dragItem);\r\n            int targetItemIndex = this.Items.IndexOf(targetItemContainer.Content);\r\n\r\n            int newDropTargetIndex;\r\n            if (targetItemIndex == dragItemIndex)\r\n            {\r\n                newDropTargetIndex = dragItemIndex;\r\n            }\r\n            else\r\n            {\r\n                if (dragItemIndex == -1)\r\n                {\r\n                    newDropTargetIndex = targetItemIndex + (after ? 1 : 0);\r\n                    Debug.WriteLine(\"   Catched UpdateDropTargetIndex dropTargetIndex=-1 targetItemIndex=\" + targetItemIndex + \" dragItemIndex=\" + dragItemIndex + \" after=\" + after);\r\n                }\r\n                else\r\n                {\r\n                    newDropTargetIndex = targetItemIndex + (after ? 1 : 0) - (targetItemIndex >= dragItemIndex ? 1 : 0);\r\n                }\r\n            }\r\n\r\n            if (newDropTargetIndex != this.dropTargetIndex)\r\n            {\r\n                this.dropTargetIndex = newDropTargetIndex;\r\n                if (dropTargetIndex == -1)\r\n                {\r\n                    Debug.WriteLine(\"UpdateDropTargetIndex dropTargetIndex=-1 targetItemIndex=\" + targetItemIndex + \" dragItemIndex=\" + dragItemIndex + \" after=\" + after);\r\n                }\r\n                else\r\n                {\r\n                    Debug.WriteLine(\"UpdateDropTargetIndex dropTargetIndex=\" + dropTargetIndex);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Hides any drop-indicators that are currently visible.\r\n        /// </summary>\r\n        private void ClearDropTarget()\r\n        {\r\n            foreach (ReorderListBoxItem itemContainer in this.itemsPanel.Children)\r\n            {\r\n                VisualStateManager.GoToState(itemContainer, ReorderListBoxItem.NoDropIndicatorState, false);\r\n                itemContainer.Tag = null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Moves an item to a specified index in the source list.\r\n        /// </summary>\r\n        private bool MoveItem(object item, int toIndex)\r\n        {\r\n            object itemsSource = this.ItemsSource;\r\n\r\n            System.Collections.IList sourceList = itemsSource as System.Collections.IList;\r\n            if (!(sourceList is System.Collections.Specialized.INotifyCollectionChanged))\r\n            {\r\n                // If the source does not implement INotifyCollectionChanged, then there's no point in\r\n                // changing the source because changes to it will not be synchronized with the list items.\r\n                // So, just change the ListBox's view of the items.\r\n                sourceList = this.Items;\r\n            }\r\n\r\n            int fromIndex = sourceList.IndexOf(item);\r\n            if (fromIndex != toIndex)\r\n            {\r\n                double scrollOffset = this.scrollViewer.VerticalOffset;\r\n\r\n                Debug.WriteLine(\"Move item \" + item + \" toIndex=\" + toIndex + \" fromIndex=\" + fromIndex);\r\n                sourceList.RemoveAt(fromIndex);\r\n                sourceList.Insert(toIndex, item);\r\n\r\n                if (fromIndex <= scrollOffset && toIndex > scrollOffset)\r\n                {\r\n                    // Correct the scroll offset for the removed item so that the list doesn't appear to jump.\r\n                    this.scrollViewer.ScrollToVerticalOffset(scrollOffset - 1);\r\n                }\r\n                return true;\r\n            }\r\n            else\r\n            {\r\n                return false;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region View range detection\r\n\r\n        /// <summary>\r\n        /// Gets the indices of the first and last items in the view based on the current scroll position.\r\n        /// </summary>\r\n        /// <param name=\"includePartial\">True to include items that are partially obscured at the top and bottom,\r\n        /// false to include only items that are completely in view.</param>\r\n        /// <param name=\"firstIndex\">Returns the index of the first item in view (or -1 if there are no items).</param>\r\n        /// <param name=\"lastIndex\">Returns the index of the last item in view (or -1 if there are no items).</param>\r\n        public void GetViewIndexRange(bool includePartial, out int firstIndex, out int lastIndex)\r\n        {\r\n            if (this.Items.Count > 0)\r\n            {\r\n                firstIndex = 0;\r\n                lastIndex = this.Items.Count - 1;\r\n\r\n                if (this.scrollViewer != null && this.Items.Count > 1)\r\n                {\r\n                    Thickness scrollViewerPadding = new Thickness(\r\n                        this.scrollViewer.BorderThickness.Left + this.scrollViewer.Padding.Left,\r\n                        this.scrollViewer.BorderThickness.Top + this.scrollViewer.Padding.Top,\r\n                        this.scrollViewer.BorderThickness.Right + this.scrollViewer.Padding.Right,\r\n                        this.scrollViewer.BorderThickness.Bottom + this.scrollViewer.Padding.Bottom);\r\n\r\n                    GeneralTransform scrollViewerTransform = this.scrollViewer.TransformToVisual(\r\n                        Application.Current.RootVisual);\r\n                    Rect scrollViewerRect = scrollViewerTransform.TransformBounds(\r\n                        new Rect(new Point(0, 0), this.scrollViewer.RenderSize));\r\n\r\n                    Point topPoint = ReorderListBox.GetHostCoordinates(new Point(\r\n                        scrollViewerRect.Left + scrollViewerPadding.Left,\r\n                        scrollViewerRect.Top + scrollViewerPadding.Top));\r\n                    IEnumerable<UIElement> topElements = VisualTreeHelper.FindElementsInHostCoordinates(\r\n                        topPoint, this.scrollViewer);\r\n                    ReorderListBoxItem topItem = topElements.OfType<ReorderListBoxItem>().FirstOrDefault();\r\n                    if (topItem != null)\r\n                    {\r\n                        GeneralTransform itemTransform = topItem.TransformToVisual(Application.Current.RootVisual);\r\n                        Rect itemRect = itemTransform.TransformBounds(new Rect(new Point(0, 0), topItem.RenderSize));\r\n\r\n                        firstIndex = this.ItemContainerGenerator.IndexFromContainer(topItem);\r\n                        if (!includePartial && firstIndex < this.Items.Count - 1 &&\r\n                            itemRect.Top < scrollViewerRect.Top && itemRect.Bottom < scrollViewerRect.Bottom)\r\n                        {\r\n                            firstIndex++;\r\n                        }\r\n                    }\r\n\r\n                    Point bottomPoint = ReorderListBox.GetHostCoordinates(new Point(\r\n                        scrollViewerRect.Left + scrollViewerPadding.Left,\r\n                        scrollViewerRect.Bottom - scrollViewerPadding.Bottom - 1));\r\n                    IEnumerable<UIElement> bottomElements = VisualTreeHelper.FindElementsInHostCoordinates(\r\n                        bottomPoint, this.scrollViewer);\r\n                    ReorderListBoxItem bottomItem = bottomElements.OfType<ReorderListBoxItem>().FirstOrDefault();\r\n                    if (bottomItem != null)\r\n                    {\r\n                        GeneralTransform itemTransform = bottomItem.TransformToVisual(Application.Current.RootVisual);\r\n                        Rect itemRect = itemTransform.TransformBounds(\r\n                            new Rect(new Point(0, 0), bottomItem.RenderSize));\r\n\r\n                        lastIndex = this.ItemContainerGenerator.IndexFromContainer(bottomItem);\r\n                        if (!includePartial && lastIndex > firstIndex &&\r\n                            itemRect.Bottom > scrollViewerRect.Bottom && itemRect.Top > scrollViewerRect.Top)\r\n                        {\r\n                            lastIndex--;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                firstIndex = -1;\r\n                lastIndex = -1;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Rearrange\r\n\r\n        /// <summary>\r\n        /// Private helper class for keeping track of each item involved in a rearrange.\r\n        /// </summary>\r\n        private class RearrangeItemInfo\r\n        {\r\n            public object Item = null;\r\n            public int FromIndex = -1;\r\n            public int ToIndex = -1;\r\n            public double FromY = Double.NaN;\r\n            public double ToY = Double.NaN;\r\n            public double Height = Double.NaN;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Animates movements, insertions, or deletions in the list. \r\n        /// </summary>\r\n        /// <param name=\"animationDuration\">Duration of the animation.</param>\r\n        /// <param name=\"rearrangeAction\">Performs the actual rearrange on the list source.</param>\r\n        /// <remarks>\r\n        /// The animations are as follows:\r\n        ///   - Inserted items fade in while later items slide down to make space.\r\n        ///   - Removed items fade out while later items slide up to close the gap.\r\n        ///   - Moved items slide from their previous location to their new location.\r\n        ///   - Moved items which move out of or in to the visible area also fade out / fade in while sliding.\r\n        /// <para>\r\n        /// The rearrange action callback is called in the middle of the rearrange process. That\r\n        /// callback may make any number of changes to the list source, in any order. After the rearrange\r\n        /// action callback returns, the net result of all changes will be detected and included in a dynamically\r\n        /// generated rearrange animation.\r\n        /// </para><para>\r\n        /// Multiple calls to this method in quick succession will be automatically queued up and executed in turn\r\n        /// to avoid any possibility of conflicts. (If simultaneous rearrange animations are desired, use a single\r\n        /// call to AnimateRearrange with a rearrange action callback that does both operations.)\r\n        /// </para>\r\n        /// </remarks>\r\n        public void AnimateRearrange(Duration animationDuration, Action rearrangeAction)\r\n        {\r\n            if (rearrangeAction == null)\r\n            {\r\n                throw new ArgumentNullException(\"rearrangeAction\");\r\n            }\r\n\r\n            if (this.rearrangeCanvas == null)\r\n            {\r\n                throw new InvalidOperationException(\"ReorderListBox control template is missing \" +\r\n                    \"a part required for rearrange: \" + ReorderListBox.RearrangeCanvasPart);\r\n            }\r\n\r\n            if (this.rearrangeQueue == null)\r\n            {\r\n                this.rearrangeQueue = new Queue<KeyValuePair<Action, Duration>>();\r\n                this.scrollViewer.ScrollToVerticalOffset(this.scrollViewer.VerticalOffset); // Stop scrolling.\r\n                this.Dispatcher.BeginInvoke(() =>\r\n                    this.AnimateRearrangeInternal(rearrangeAction, animationDuration));\r\n            }\r\n            else\r\n            {\r\n                this.rearrangeQueue.Enqueue(new KeyValuePair<Action, Duration>(rearrangeAction, animationDuration));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Orchestrates the rearrange animation process.\r\n        /// </summary>\r\n        private void AnimateRearrangeInternal(Action rearrangeAction, Duration animationDuration)\r\n        {\r\n            // Find the indices of items in the view. Animations are optimzed to only include what is visible.\r\n            int viewFirstIndex, viewLastIndex;\r\n            this.GetViewIndexRange(true, out viewFirstIndex, out viewLastIndex);\r\n\r\n            // Collect information about items and their positions before any changes are made.\r\n            RearrangeItemInfo[] rearrangeMap = this.BuildRearrangeMap(viewFirstIndex, viewLastIndex);\r\n\r\n            // Call the rearrange action callback which actually makes the changes to the source list.\r\n            // Assuming the source list is properly bound, the base class will pick up the changes.\r\n            rearrangeAction();\r\n\r\n            this.rearrangeCanvas.Visibility = Visibility.Visible;\r\n\r\n            // Update the layout (positions of all items) based on the changes that were just made.\r\n            this.UpdateLayout();\r\n\r\n            // Find the NEW last-index in view, which may have changed if the items are not constant heights\r\n            // or if the view includes the end of the list.\r\n            viewLastIndex = this.FindViewLastIndex(viewFirstIndex);\r\n\r\n            // Collect information about the NEW items and their NEW positions, linking up to information\r\n            // about items which existed before.\r\n            RearrangeItemInfo[] rearrangeMap2 = this.BuildRearrangeMap2(rearrangeMap,\r\n                viewFirstIndex, viewLastIndex);\r\n\r\n            // Find all the movements that need to be animated.\r\n            IEnumerable<RearrangeItemInfo> movesWithinView = rearrangeMap\r\n                .Where(rii => !Double.IsNaN(rii.FromY) && !Double.IsNaN(rii.ToY));\r\n            IEnumerable<RearrangeItemInfo> movesOutOfView = rearrangeMap\r\n                .Where(rii => !Double.IsNaN(rii.FromY) && Double.IsNaN(rii.ToY));\r\n            IEnumerable<RearrangeItemInfo> movesInToView = rearrangeMap2\r\n                .Where(rii => Double.IsNaN(rii.FromY) && !Double.IsNaN(rii.ToY));\r\n            IEnumerable<RearrangeItemInfo> visibleMoves =\r\n                movesWithinView.Concat(movesOutOfView).Concat(movesInToView);\r\n\r\n            // Set a clip rect so the animations don't go outside the listbox.\r\n            this.rearrangeCanvas.Clip = new RectangleGeometry() { Rect = new Rect(new Point(0, 0), this.rearrangeCanvas.RenderSize) };\r\n\r\n            // Create the animation storyboard.\r\n            Storyboard rearrangeStoryboard = this.CreateRearrangeStoryboard(visibleMoves, animationDuration);\r\n            if (rearrangeStoryboard.Children.Count > 0)\r\n            {\r\n                // The storyboard uses an overlay canvas with item snapshots.\r\n                // While that is playing, hide the real items.\r\n                this.scrollViewer.Visibility = Visibility.Collapsed;\r\n\r\n                rearrangeStoryboard.Completed += delegate\r\n                {\r\n                    rearrangeStoryboard.Stop();\r\n                    this.rearrangeCanvas.Children.Clear();\r\n                    this.rearrangeCanvas.Visibility = Visibility.Collapsed;\r\n                    this.scrollViewer.Visibility = Visibility.Visible;\r\n\r\n                    this.AnimateNextRearrange();\r\n                };\r\n\r\n                this.Dispatcher.BeginInvoke(() => rearrangeStoryboard.Begin());\r\n            }\r\n            else\r\n            {\r\n                this.rearrangeCanvas.Visibility = Visibility.Collapsed;\r\n                this.AnimateNextRearrange();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks if there's another rearrange action waiting in the queue, and if so executes it next.\r\n        /// </summary>\r\n        private void AnimateNextRearrange()\r\n        {\r\n            if (this.rearrangeQueue.Count > 0)\r\n            {\r\n                KeyValuePair<Action, Duration> nextRearrange = this.rearrangeQueue.Dequeue();\r\n                this.Dispatcher.BeginInvoke(() =>\r\n                    this.AnimateRearrangeInternal(nextRearrange.Key, nextRearrange.Value));\r\n            }\r\n            else\r\n            {\r\n                this.rearrangeQueue = null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Collects information about items and their positions before any changes are made.\r\n        /// </summary>\r\n        private RearrangeItemInfo[] BuildRearrangeMap(int viewFirstIndex, int viewLastIndex)\r\n        {\r\n            RearrangeItemInfo[] map = new RearrangeItemInfo[this.Items.Count];\r\n\r\n            for (int i = 0; i < map.Length; i++)\r\n            {\r\n                object item = this.Items[i];\r\n\r\n                RearrangeItemInfo info = new RearrangeItemInfo()\r\n                {\r\n                    Item = item,\r\n                    FromIndex = i,\r\n                };\r\n\r\n                // The precise item location is only important if it's within the view.\r\n                if (viewFirstIndex <= i && i <= viewLastIndex)\r\n                {\r\n                    ReorderListBoxItem itemContainer = (ReorderListBoxItem)\r\n                        this.ItemContainerGenerator.ContainerFromIndex(i);\r\n                    if (itemContainer != null)\r\n                    {\r\n                        GeneralTransform itemTransform = itemContainer.TransformToVisual(this.rearrangeCanvas);\r\n                        Point itemPoint = itemTransform.Transform(new Point(0, 0));\r\n                        info.FromY = itemPoint.Y;\r\n                        info.Height = itemContainer.RenderSize.Height;\r\n                    }\r\n                }\r\n\r\n                map[i] = info;\r\n            }\r\n\r\n            return map;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Collects information about the NEW items and their NEW positions after changes were made.\r\n        /// </summary>\r\n        private RearrangeItemInfo[] BuildRearrangeMap2(RearrangeItemInfo[] map,\r\n            int viewFirstIndex, int viewLastIndex)\r\n        {\r\n            RearrangeItemInfo[] map2 = new RearrangeItemInfo[this.Items.Count];\r\n\r\n            for (int i = 0; i < map2.Length; i++)\r\n            {\r\n                object item = this.Items[i];\r\n\r\n                // Try to find the same item in the pre-rearrange info.\r\n                RearrangeItemInfo info = map.FirstOrDefault(rii => rii.ToIndex < 0 && rii.Item == item);\r\n                if (info == null)\r\n                {\r\n                    info = new RearrangeItemInfo()\r\n                    {\r\n                        Item = item,\r\n                    };\r\n                }\r\n\r\n                info.ToIndex = i;\r\n\r\n                // The precise item location is only important if it's within the view.\r\n                if (viewFirstIndex <= i && i <= viewLastIndex)\r\n                {\r\n                    ReorderListBoxItem itemContainer = (ReorderListBoxItem)\r\n                        this.ItemContainerGenerator.ContainerFromIndex(i);\r\n                    if (itemContainer != null)\r\n                    {\r\n                        GeneralTransform itemTransform = itemContainer.TransformToVisual(this.rearrangeCanvas);\r\n                        Point itemPoint = itemTransform.Transform(new Point(0, 0));\r\n                        info.ToY = itemPoint.Y;\r\n                        info.Height = itemContainer.RenderSize.Height;\r\n                    }\r\n                }\r\n\r\n                map2[i] = info;\r\n            }\r\n\r\n            return map2;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Finds the index of the last visible item by starting at the first index and\r\n        /// comparing the bounds of each following item to the ScrollViewer bounds.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This method is less efficient than the hit-test method used by GetViewIndexRange() above,\r\n        /// but it works when the controls haven't actually been rendered yet, while the other doesn't.\r\n        /// </remarks>\r\n        private int FindViewLastIndex(int firstIndex)\r\n        {\r\n            int lastIndex = firstIndex;\r\n\r\n            GeneralTransform scrollViewerTransform = this.scrollViewer.TransformToVisual(\r\n                Application.Current.RootVisual);\r\n            Rect scrollViewerRect = scrollViewerTransform.TransformBounds(\r\n                new Rect(new Point(0, 0), this.scrollViewer.RenderSize));\r\n\r\n            while (lastIndex < this.Items.Count - 1)\r\n            {\r\n                ReorderListBoxItem itemContainer = (ReorderListBoxItem)\r\n                    this.ItemContainerGenerator.ContainerFromIndex(lastIndex + 1);\r\n                if (itemContainer == null)\r\n                {\r\n                    break;\r\n                }\r\n\r\n                GeneralTransform itemTransform = itemContainer.TransformToVisual(\r\n                    Application.Current.RootVisual);\r\n                Rect itemRect = itemTransform.TransformBounds(new Rect(new Point(0, 0), itemContainer.RenderSize));\r\n                itemRect.Intersect(scrollViewerRect);\r\n                if (itemRect == Rect.Empty)\r\n                {\r\n                    break;\r\n                }\r\n\r\n                lastIndex++;\r\n            }\r\n\r\n            return lastIndex;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a storyboard to animate the visible moves of a rearrange.\r\n        /// </summary>\r\n        private Storyboard CreateRearrangeStoryboard(IEnumerable<RearrangeItemInfo> visibleMoves,\r\n            Duration animationDuration)\r\n        {\r\n            Storyboard storyboard = new Storyboard();\r\n\r\n            ReorderListBoxItem temporaryItemContainer = null;\r\n\r\n            foreach (RearrangeItemInfo move in visibleMoves)\r\n            {\r\n                Size itemSize = new Size(this.rearrangeCanvas.RenderSize.Width, move.Height);\r\n\r\n                ReorderListBoxItem itemContainer = null;\r\n                if (move.ToIndex >= 0)\r\n                {\r\n                    itemContainer = (ReorderListBoxItem)this.ItemContainerGenerator.ContainerFromIndex(move.ToIndex);\r\n                }\r\n                if (itemContainer == null)\r\n                {\r\n                    if (temporaryItemContainer == null)\r\n                    {\r\n                        temporaryItemContainer = new ReorderListBoxItem();\r\n                    }\r\n\r\n                    itemContainer = temporaryItemContainer;\r\n                    itemContainer.Width = itemSize.Width;\r\n                    itemContainer.Height = itemSize.Height;\r\n                    this.rearrangeCanvas.Children.Add(itemContainer);\r\n                    this.PrepareContainerForItemOverride(itemContainer, move.Item);\r\n                    itemContainer.UpdateLayout();\r\n                }\r\n\r\n                WriteableBitmap itemSnapshot = new WriteableBitmap((int)itemSize.Width, (int)itemSize.Height);\r\n                itemSnapshot.Render(itemContainer, null);\r\n                itemSnapshot.Invalidate();\r\n\r\n                Image itemImage = new Image();\r\n                itemImage.Width = itemSize.Width;\r\n                itemImage.Height = itemSize.Height;\r\n                itemImage.Source = itemSnapshot;\r\n                itemImage.RenderTransform = new TranslateTransform();\r\n                this.rearrangeCanvas.Children.Add(itemImage);\r\n\r\n                if (itemContainer == temporaryItemContainer)\r\n                {\r\n                    this.rearrangeCanvas.Children.Remove(itemContainer);\r\n                }\r\n\r\n                if (!Double.IsNaN(move.FromY) && !Double.IsNaN(move.ToY))\r\n                {\r\n                    Canvas.SetTop(itemImage, move.FromY);\r\n                    if (move.FromY != move.ToY)\r\n                    {\r\n                        DoubleAnimation moveAnimation = new DoubleAnimation();\r\n                        moveAnimation.Duration = animationDuration;\r\n                        Storyboard.SetTarget(moveAnimation, itemImage.RenderTransform);\r\n                        Storyboard.SetTargetProperty(moveAnimation, new PropertyPath(TranslateTransform.YProperty));\r\n                        moveAnimation.To = move.ToY - move.FromY;\r\n                        storyboard.Children.Add(moveAnimation);\r\n                    }\r\n                }\r\n                else if (Double.IsNaN(move.FromY) != Double.IsNaN(move.ToY))\r\n                {\r\n                    if (move.FromIndex >= 0 && move.ToIndex >= 0)\r\n                    {\r\n                        DoubleAnimation moveAnimation = new DoubleAnimation();\r\n                        moveAnimation.Duration = animationDuration;\r\n                        Storyboard.SetTarget(moveAnimation, itemImage.RenderTransform);\r\n                        Storyboard.SetTargetProperty(moveAnimation, new PropertyPath(TranslateTransform.YProperty));\r\n\r\n                        const double animationDistance = 200;\r\n                        if (!Double.IsNaN(move.FromY))\r\n                        {\r\n                            Canvas.SetTop(itemImage, move.FromY);\r\n                            if (move.FromIndex < move.ToIndex)\r\n                            {\r\n                                moveAnimation.To = animationDistance;\r\n                            }\r\n                            else if (move.FromIndex > move.ToIndex)\r\n                            {\r\n                                moveAnimation.To = -animationDistance;\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Canvas.SetTop(itemImage, move.ToY);\r\n                            if (move.FromIndex < move.ToIndex)\r\n                            {\r\n                                moveAnimation.From = -animationDistance;\r\n                            }\r\n                            else if (move.FromIndex > move.ToIndex)\r\n                            {\r\n                                moveAnimation.From = animationDistance;\r\n                            }\r\n                        }\r\n\r\n                        storyboard.Children.Add(moveAnimation);\r\n                    }\r\n\r\n                    DoubleAnimation fadeAnimation = new DoubleAnimation();\r\n                    fadeAnimation.Duration = animationDuration;\r\n                    Storyboard.SetTarget(fadeAnimation, itemImage);\r\n                    Storyboard.SetTargetProperty(fadeAnimation, new PropertyPath(UIElement.OpacityProperty));\r\n\r\n                    if (Double.IsNaN(move.FromY))\r\n                    {\r\n                        itemImage.Opacity = 0.0;\r\n                        fadeAnimation.To = 1.0;\r\n                        Canvas.SetTop(itemImage, move.ToY);\r\n                    }\r\n                    else\r\n                    {\r\n                        itemImage.Opacity = 1.0;\r\n                        fadeAnimation.To = 0.0;\r\n                        Canvas.SetTop(itemImage, move.FromY);\r\n                    }\r\n\r\n                    storyboard.Children.Add(fadeAnimation);\r\n                }\r\n            }\r\n\r\n            return storyboard;\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Private utility methods\r\n\r\n        /// <summary>\r\n        /// Gets host coordinates, adjusting for orientation. This is helpful when identifying what\r\n        /// controls are under a point.\r\n        /// </summary>\r\n        private static Point GetHostCoordinates(Point point)\r\n        {\r\n            PhoneApplicationFrame frame = (PhoneApplicationFrame)Application.Current.RootVisual;\r\n            switch (frame.Orientation)\r\n            {\r\n                case PageOrientation.LandscapeLeft: return new Point(frame.RenderSize.Width - point.Y, point.X);\r\n                case PageOrientation.LandscapeRight: return new Point(point.Y, frame.RenderSize.Height - point.X);\r\n                default: return point;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/ReorderListBox/ReorderListBoxItem.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media;\r\n\r\nnamespace ReorderListBox\r\n{\r\n    /// <summary>\r\n    /// Extends ListBoxItem to support a styleable drag handle, drop-indicator spacing,\r\n    /// and visual states and transitions for dragging/dropping and enabling/disabling the reorder capability.\r\n    /// </summary>\r\n    [TemplatePart(Name = ReorderListBoxItem.DragHandlePart, Type = typeof(ContentPresenter))]\r\n    [TemplatePart(Name = ReorderListBoxItem.DropBeforeSpacePart, Type = typeof(UIElement))]\r\n    [TemplatePart(Name = ReorderListBoxItem.DropAfterSpacePart, Type = typeof(UIElement))]\r\n    [TemplateVisualState(Name = ReorderListBoxItem.ReorderDisabledState, GroupName = ReorderListBoxItem.ReorderEnabledStateGroup)]\r\n    [TemplateVisualState(Name = ReorderListBoxItem.ReorderEnabledState, GroupName = ReorderListBoxItem.ReorderEnabledStateGroup)]\r\n    [TemplateVisualState(Name = ReorderListBoxItem.NotDraggingState, GroupName = ReorderListBoxItem.DraggingStateGroup)]\r\n    [TemplateVisualState(Name = ReorderListBoxItem.DraggingState, GroupName = ReorderListBoxItem.DraggingStateGroup)]\r\n    [TemplateVisualState(Name = ReorderListBoxItem.NoDropIndicatorState, GroupName = ReorderListBoxItem.DropIndicatorStateGroup)]\r\n    [TemplateVisualState(Name = ReorderListBoxItem.DropBeforeIndicatorState, GroupName = ReorderListBoxItem.DropIndicatorStateGroup)]\r\n    [TemplateVisualState(Name = ReorderListBoxItem.DropAfterIndicatorState, GroupName = ReorderListBoxItem.DropIndicatorStateGroup)]\r\n    public class ReorderListBoxItem : ListBoxItem\r\n    {\r\n        #region Template part name constants\r\n\r\n        public const string DragHandlePart = \"DragHandle\";\r\n        public const string DropBeforeSpacePart = \"DropBeforeSpace\";\r\n        public const string DropAfterSpacePart = \"DropAfterSpace\";\r\n\r\n        #endregion\r\n\r\n        #region Visual state name constants\r\n\r\n        public const string ReorderEnabledStateGroup = \"ReorderEnabledStates\";\r\n        public const string ReorderDisabledState = \"ReorderDisabled\";\r\n        public const string ReorderEnabledState = \"ReorderEnabled\";\r\n\r\n        public const string DraggingStateGroup = \"DraggingStates\";\r\n        public const string NotDraggingState = \"NotDragging\";\r\n        public const string DraggingState = \"Dragging\";\r\n\r\n        public const string DropIndicatorStateGroup = \"DropIndicatorStates\";\r\n        public const string NoDropIndicatorState = \"NoDropIndicator\";\r\n        public const string DropBeforeIndicatorState = \"DropBeforeIndicator\";\r\n        public const string DropAfterIndicatorState = \"DropAfterIndicator\";\r\n\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Creates a new ReorderListBoxItem and sets the default style key.\r\n        /// The style key is used to locate the control template in Generic.xaml.\r\n        /// </summary>\r\n        public ReorderListBoxItem()\r\n        {\r\n            this.DefaultStyleKey = typeof(ReorderListBoxItem);\r\n        }\r\n\r\n        #region DropIndicatorHeight DependencyProperty\r\n\r\n        public static readonly DependencyProperty DropIndicatorHeightProperty = DependencyProperty.Register(\r\n            \"DropIndicatorHeight\", typeof(double), typeof(ReorderListBoxItem),\r\n            new PropertyMetadata(0.0, (d, e) => ((ReorderListBoxItem)d).OnDropIndicatorHeightChanged(e)));\r\n\r\n        /// <summary>\r\n        /// Gets or sets the height of the drop-before and drop-after indicators.\r\n        /// The drop-indicator visual states and transitions are automatically updated to use this height.\r\n        /// </summary>\r\n        public double DropIndicatorHeight\r\n        {\r\n            get\r\n            {\r\n                return (double)this.GetValue(ReorderListBoxItem.DropIndicatorHeightProperty);\r\n            }\r\n            set\r\n            {\r\n                this.SetValue(ReorderListBoxItem.DropIndicatorHeightProperty, value);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the drop-indicator height value for visual state and transition animations.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This is a workaround for the inability of visual states and transitions to do template binding\r\n        /// in Silverlight 3. In SL4, they could bind directly to the DropIndicatorHeight property instead.\r\n        /// </remarks>\r\n        protected void OnDropIndicatorHeightChanged(DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Panel rootPanel = (Panel)VisualTreeHelper.GetChild(this, 0);\r\n            VisualStateGroup vsg = ReorderListBoxItem.GetVisualStateGroup(\r\n                rootPanel, ReorderListBoxItem.DropIndicatorStateGroup);\r\n            if (vsg != null)\r\n            {\r\n                foreach (VisualState vs in vsg.States)\r\n                {\r\n                    foreach (Timeline animation in vs.Storyboard.Children)\r\n                    {\r\n                        this.UpdateDropIndicatorAnimationHeight((double)e.NewValue, animation);\r\n                    }\r\n                }\r\n                foreach (VisualTransition vt in vsg.Transitions)\r\n                {\r\n                    foreach (Timeline animation in vt.Storyboard.Children)\r\n                    {\r\n                        this.UpdateDropIndicatorAnimationHeight((double)e.NewValue, animation);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Helper for the UpdateDropIndicatorAnimationHeight method.\r\n        /// </summary>\r\n        private void UpdateDropIndicatorAnimationHeight(double height, Timeline animation)\r\n        {\r\n            DoubleAnimation da = animation as DoubleAnimation;\r\n            if (da != null)\r\n            {\r\n                string targetName = Storyboard.GetTargetName(da);\r\n                PropertyPath targetPath = Storyboard.GetTargetProperty(da);\r\n                if ((targetName == ReorderListBoxItem.DropBeforeSpacePart ||\r\n                     targetName == ReorderListBoxItem.DropAfterSpacePart) &&\r\n                    targetPath != null && targetPath.Path == \"Height\")\r\n                {\r\n                    if (da.From > 0 && da.From != height)\r\n                    {\r\n                        da.From = height;\r\n                    }\r\n                    if (da.To > 0 && da.To != height)\r\n                    {\r\n                        da.To = height;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a named VisualStateGroup for a framework element.\r\n        /// </summary>\r\n        private static VisualStateGroup GetVisualStateGroup(FrameworkElement element, string groupName)\r\n        {\r\n            VisualStateGroup result = null;\r\n            System.Collections.IList groups = VisualStateManager.GetVisualStateGroups(element);\r\n            if (groups != null)\r\n            {\r\n                foreach (VisualStateGroup group in groups)\r\n                {\r\n                    if (group.Name == groupName)\r\n                    {\r\n                        result = group;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n            return result;\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region IsReorderEnabled DependencyProperty\r\n\r\n        public static readonly DependencyProperty IsReorderEnabledProperty = DependencyProperty.Register(\r\n            \"IsReorderEnabled\", typeof(bool), typeof(ReorderListBoxItem),\r\n            new PropertyMetadata(false, (d, e) => ((ReorderListBoxItem)d).OnIsReorderEnabledChanged(e)));\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the drag handle should be shown.\r\n        /// </summary>\r\n        public bool IsReorderEnabled\r\n        {\r\n            get\r\n            {\r\n                return (bool)this.GetValue(ReorderListBoxItem.IsReorderEnabledProperty);\r\n            }\r\n            set\r\n            {\r\n                this.SetValue(ReorderListBoxItem.IsReorderEnabledProperty, value);\r\n            }\r\n        }\r\n\r\n        protected void OnIsReorderEnabledChanged(DependencyPropertyChangedEventArgs e)\r\n        {\r\n            string visualState = (bool)e.NewValue ?\r\n                ReorderListBoxItem.ReorderEnabledState : ReorderListBoxItem.ReorderDisabledState;\r\n            VisualStateManager.GoToState(this, visualState, true);\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region DragHandleTemplate DependencyProperty\r\n\r\n        public static readonly DependencyProperty DragHandleTemplateProperty = DependencyProperty.Register(\r\n            \"DragHandleTemplate\", typeof(DataTemplate), typeof(ReorderListBoxItem), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the template for the drag handle.\r\n        /// </summary>\r\n        public DataTemplate DragHandleTemplate\r\n        {\r\n            get\r\n            {\r\n                return (DataTemplate)this.GetValue(ReorderListBoxItem.DragHandleTemplateProperty);\r\n            }\r\n            set\r\n            {\r\n                this.SetValue(ReorderListBoxItem.DragHandleTemplateProperty, value);\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Gets the element (control template part) that serves as a handle for dragging the item. \r\n        /// </summary>\r\n        public ContentPresenter DragHandle\r\n        {\r\n            get;\r\n            private set;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Applies the control template, checks for required template parts, and initializes visual states.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            this.DragHandle = this.GetTemplateChild(ReorderListBoxItem.DragHandlePart) as ContentPresenter;\r\n\r\n            if (this.DragHandle == null)\r\n            {\r\n                throw new InvalidOperationException(\"ReorderListBoxItem must have a DragHandle ContentPresenter part.\");\r\n            }\r\n\r\n            VisualStateManager.GoToState(this, ReorderListBoxItem.ReorderDisabledState, false);\r\n            VisualStateManager.GoToState(this, ReorderListBoxItem.NotDraggingState, false);\r\n            VisualStateManager.GoToState(this, ReorderListBoxItem.NoDropIndicatorState, false);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Controls/ScrollableTextBlock.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Net;\r\nusing System.Text.RegularExpressions;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Microsoft.Phone.Tasks;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    public class ScrollableTextBlock : Control\r\n    {\r\n        private const int MaxSymbolsChunk = 1024;\r\n\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(\r\n            \"Text\",\r\n            typeof (string),\r\n            typeof (ScrollableTextBlock),\r\n            new PropertyMetadata(OnTextPropertyChanged));\r\n\r\n        private TextBlock _measureText;\r\n\r\n        private StackPanel _stackPanel;\r\n\r\n        public ScrollableTextBlock()\r\n        {\r\n            DefaultStyleKey = typeof (ScrollableTextBlock);\r\n        }\r\n\r\n        public string Text\r\n        {\r\n            get { return (string) GetValue(TextProperty); }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((ScrollableTextBlock) d).ParseText((string) e.NewValue);\r\n        }\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n            _stackPanel = GetTemplateChild(\"StackPanel\") as StackPanel;\r\n            ParseText(Text);\r\n        }\r\n\r\n        private void ParseText(string value)\r\n        {\r\n            if (string.IsNullOrEmpty(value) || _stackPanel == null)\r\n                return;\r\n            _stackPanel.Children.Clear();\r\n            var maxTextSize = GetMaxTextSize();\r\n            if (value.Length < maxTextSize)\r\n            {\r\n                AddTextChunk(value);\r\n            }\r\n            else\r\n                SplitText(value);\r\n        }\r\n\r\n        private static readonly Regex HyperlinkRegex = new Regex(\"(?i)\\\\b(((?:https?://|www\\\\d{0,3}[.]|[a-z0-9.\\\\-]+[.][a-z]{2,4}/)(?:[^\\\\s()<>]+|\\\\(([^\\\\s()<>]+|(\\\\([^\\\\s()<>]+\\\\)))*\\\\))+(?:\\\\(([^\\\\s()<>]+|(\\\\([^\\\\s()<>]+\\\\)))*\\\\)|[^\\\\s`!()\\\\[\\\\]{};:'\\\".,<>?«»“”‘’]))|([a-z0-9.\\\\-]+(\\\\.ru|\\\\.com|\\\\.net|\\\\.org|\\\\.us|\\\\.it|\\\\.co\\\\.uk)(?![a-z0-9]))|([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\\\.[a-zA-Z0-9-.]*[a-zA-Z0-9-]+))\");\r\n    \r\n\r\n        private void AddTextChunk(string value)\r\n        {\r\n            var index = 0;\r\n            foreach (Match match in HyperlinkRegex.Matches(value))\r\n            {\r\n                string text;\r\n                if (match.Index != index)\r\n                {\r\n                    text = value.Substring(index, match.Index - index);\r\n                    _stackPanel.Children.Add(GetTextElement(text));\r\n                }\r\n\r\n                var link = match.Value;\r\n                var flag = link.EndsWith(\",\");\r\n                if (flag && link.Length > 1)\r\n                    link = link.Substring(0, link.Length - 1);\r\n                if (!link.StartsWith(\"http\", StringComparison.OrdinalIgnoreCase))\r\n                    link = \"http://\" + link;\r\n\r\n                text = match.Value;\r\n                _stackPanel.Children.Add(GeHyperlinkElement(text, link));\r\n\r\n                index = match.Index + match.Length;\r\n            }\r\n            if (index < value.Length)\r\n            {\r\n                var textElement = GetTextElement(value.Substring(index));\r\n                _stackPanel.Children.Add(textElement);\r\n            }\r\n        }\r\n\r\n        private FrameworkElement GeHyperlinkElement(string text, string uri)\r\n        {\r\n            var textBlock = GetTextBlock();\r\n            textBlock.Text = text;\r\n            textBlock.Tap += (sender, args) =>\r\n            {\r\n                if (textBlock.Text.Contains(\"@\"))\r\n                {\r\n                    var task = new EmailComposeTask();\r\n                    task.To = uri.ToLowerInvariant().Replace(\"http://\", string.Empty);\r\n                    task.Show();\r\n\r\n                }\r\n                else\r\n                {\r\n                    var task = new WebBrowserTask();\r\n                    task.URL = HttpUtility.UrlEncode(uri); \r\n                    task.Show();\r\n                }\r\n                \r\n            };\r\n            textBlock.TextDecorations = TextDecorations.Underline;\r\n            var border = GetBackgroundBorder();\r\n            border.Child = textBlock;\r\n\r\n            return border;\r\n\r\n            //var hyperlink = GetHyperlinkButton();\r\n            //var content = GetTextBlock();\r\n            //content.Text = text;\r\n            //hyperlink.Content = content;\r\n            //hyperlink.NavigateUri = new Uri(uri, UriKind.Absolute);\r\n            //var border = GetBackgroundBorder();\r\n            //border.Child = hyperlink;\r\n\r\n            //return border;\r\n        }\r\n\r\n        private FrameworkElement GetTextElement(string text)\r\n        {\r\n            var textBlock = GetTextBlock();\r\n            textBlock.Text = text;\r\n            var border = GetBackgroundBorder();\r\n            border.Child = textBlock;\r\n\r\n            return border;\r\n        }\r\n\r\n        private static readonly Dictionary<char, char> Delimiters = new Dictionary<char, char>\r\n        {\r\n            {' ', ' '},\r\n            {'.', ' '},\r\n            {',', ' '},\r\n            {'!', ' '},\r\n            {'?', ' '},\r\n            {':', ' '},\r\n            {';', ' '},\r\n            {']', ' '},\r\n            {')', ' '},\r\n            {'}', ' '},\r\n        }; \r\n\r\n        private void SplitText(string text)\r\n        {\r\n            while (true)\r\n            {\r\n                var symbolsCount = Math.Min(MaxSymbolsChunk, text.Length);\r\n                \r\n                var stepsBack = 0;\r\n                if (symbolsCount != text.Length)\r\n                {\r\n                    if (!Delimiters.ContainsKey(text[symbolsCount - 1]))\r\n                    {\r\n                        for (var i = 1; i < 24 && (symbolsCount - 1 - i) >= 0; i++)\r\n                        {\r\n                            if (Delimiters.ContainsKey(text[symbolsCount - 1 - i]))\r\n                            {\r\n                                stepsBack += i;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                symbolsCount -= stepsBack;\r\n\r\n                var currentChunk = text.Substring(0, symbolsCount);\r\n\r\n                AddTextChunk(currentChunk);\r\n\r\n                var nextChunk = text.Substring(symbolsCount, text.Length - symbolsCount);\r\n                if (nextChunk.Length > 0)\r\n                {\r\n                    text = nextChunk;\r\n                    continue;\r\n                }\r\n                break;\r\n            }\r\n        }\r\n\r\n        private Size MeasureString(string text)\r\n        {\r\n            if (_measureText == null)\r\n                _measureText = GetTextBlock();\r\n            _measureText.Text = text;\r\n            return new Size(_measureText.ActualWidth, _measureText.ActualHeight);\r\n        }\r\n\r\n        private int GetMaxTextSize()\r\n        {\r\n            var size = MeasureString(\"W\");\r\n            return (int) (Width/size.Width)*(int) (2048.0/size.Height)/2;\r\n        }\r\n\r\n        private TextBlock GetTextBlock()\r\n        {\r\n            return new TextBlock\r\n            {\r\n                TextWrapping = TextWrapping.Wrap,\r\n                FontSize = FontSize,\r\n                FontFamily = FontFamily,\r\n                FontWeight = FontWeight,\r\n                Foreground = Foreground,\r\n            };\r\n        }\r\n\r\n        private HyperlinkButton GetHyperlinkButton()\r\n        {\r\n            //var resources = new generic();\r\n\r\n            //Uri resourceLocater = new Uri(\"/Telegram.Controls;component/Themes/generic.xaml\", UriKind.Relative);\r\n            //ResourceDictionary resourceDictionary = (ResourceDictionary)Application.LoadComponent(resourceLocater);\r\n            //groupStyle.ContainerStyle = resourceDictionary[\"GroupHeaderStyle\"] as Style; \r\n\r\n            return new HyperlinkButton\r\n            {\r\n                //Style = (Style) resources[\"HyperlinkButtonWrappingStyle\"],\r\n                ClickMode = ClickMode.Release,\r\n                TargetName = \"_blank\",\r\n                HorizontalAlignment = HorizontalAlignment.Left,\r\n                Margin = new Thickness(0.0),\r\n                FontSize = FontSize,\r\n                FontFamily = FontFamily,\r\n                FontWeight = FontWeight,\r\n                Foreground = Foreground,\r\n            };\r\n        }\r\n\r\n        private Border GetBackgroundBorder()\r\n        {\r\n            return new Border\r\n            {\r\n                Background = Background,\r\n                Margin = new Thickness(0.0, -2.0, 0.0, 0.0),\r\n                Padding = new Thickness(Padding.Left, 0.0, Padding.Right, 0.0),\r\n                //BorderBrush = new SolidColorBrush(Colors.Blue),\r\n                //BorderThickness = new Thickness(1.0)\r\n            };\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "Telegram.Controls/SmoothProgressBar.xaml",
    "content": "﻿<UserControl x:Class=\"Telegram.Controls.SmoothProgressBar\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\"\r\n    x:Name=\"Self\">\r\n\r\n    <Grid VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" Background=\"#44000000\">\r\n        <Grid.ColumnDefinitions>\r\n            <ColumnDefinition Width=\"*\"/>\r\n            <ColumnDefinition Width=\"Auto\"/>\r\n        </Grid.ColumnDefinitions>\r\n        <ProgressBar CacheMode=\"BitmapCache\" x:Name=\"Progress\" Margin=\"-6,12,0,12\" Background=\"#33FFFFFF\" Foreground=\"White\" Value=\"0\" Maximum=\"1.0\"/>\r\n        <TextBlock Grid.Column=\"1\" Margin=\"0,0,6,4\" VerticalAlignment=\"Bottom\" Foreground=\"#FFFFFFFF\" Text=\"{Binding CommandText, ElementName=Self}\" TextDecorations=\"Underline\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "Telegram.Controls/SmoothProgressBar.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    public partial class SmoothProgressBar\r\n    {\r\n        private bool _useAnimations = true;\r\n\r\n        public bool UseAnimations\r\n        {\r\n            get { return _useAnimations; }\r\n            set { _useAnimations = value; }\r\n        }\r\n\r\n        public static readonly DependencyProperty CommandTextProperty = DependencyProperty.Register(\r\n            \"CommandText\", typeof (string), typeof (SmoothProgressBar), new PropertyMetadata(default(string)));\r\n\r\n        public string CommandText\r\n        {\r\n            get { return (string) GetValue(CommandTextProperty); }\r\n            set { SetValue(CommandTextProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(\r\n            \"Value\", typeof (double), typeof (SmoothProgressBar), new PropertyMetadata(default(double), OnValueChanged));\r\n\r\n        private Storyboard _previousStoryboard;\r\n\r\n        private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var smoothProgressBar = (SmoothProgressBar) d;\r\n            if ((double) e.NewValue > 0.0)\r\n            {\r\n                smoothProgressBar.Visibility = Visibility.Visible;\r\n            }\r\n\r\n            //smoothProgressBar.Progress.Value = (double)e.NewValue;\r\n            //if ((double)e.NewValue <= 0.0 || (double)e.NewValue >= 1.0)\r\n            //{\r\n            //    smoothProgressBar.Visibility = Visibility.Collapsed;\r\n            //}\r\n            //return;\r\n            var newValue = (double)e.NewValue;\r\n            if ((double) e.OldValue > 0.0 && newValue == 0.0)\r\n            {\r\n               newValue = 1.0;\r\n            }\r\n\r\n            var animation = new DoubleAnimation\r\n            {\r\n                To = newValue,\r\n                Duration = new Duration(TimeSpan.FromSeconds(0.2)),\r\n            };\r\n\r\n            if (smoothProgressBar.UseAnimations)\r\n            {\r\n                Storyboard.SetTarget(animation, smoothProgressBar.Progress);\r\n                Storyboard.SetTargetProperty(animation, new PropertyPath(RangeBase.ValueProperty));\r\n                var sb = new Storyboard();\r\n                sb.Children.Add(animation);\r\n                if ((double)e.NewValue <= 0.0 || (double)e.NewValue >= 1.0)\r\n                {\r\n                    sb.Completed += (sender, args) =>\r\n                    {\r\n                        smoothProgressBar.Visibility = Visibility.Collapsed;\r\n                    };\r\n                }\r\n\r\n                if (smoothProgressBar._previousStoryboard != null)\r\n                {\r\n                    smoothProgressBar._previousStoryboard.Stop();\r\n                }\r\n                smoothProgressBar._previousStoryboard = sb;\r\n\r\n                sb.Begin();\r\n            }\r\n            else\r\n            {\r\n                smoothProgressBar.Value = newValue;\r\n                if ((double)e.NewValue <= 0.0 || (double)e.NewValue >= 1.0)\r\n                {\r\n                    smoothProgressBar.Visibility = Visibility.Collapsed;\r\n                }\r\n            }\r\n        }\r\n\r\n        public double Value\r\n        {\r\n            get { return (double) GetValue(ValueProperty); }\r\n            set { SetValue(ValueProperty, value); }\r\n        }\r\n\r\n        public SmoothProgressBar()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Visibility = Visibility.Collapsed;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/Telegram.Controls.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Telegram.Controls</RootNamespace>\r\n    <AssemblyName>Telegram.Controls</AssemblyName>\r\n    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>\r\n    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug Private Beta|AnyCPU'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\Debug Private Beta\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release Private Beta|AnyCPU'\">\r\n    <OutputPath>bin\\Release Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Coding4Fun.Toolkit.Controls\">\r\n      <HintPath>..\\packages\\Coding4Fun.Toolkit.Controls.2.0.7\\lib\\wp71\\Coding4Fun.Toolkit.Controls.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"LayoutTransformer\">\r\n      <HintPath>..\\Libraries\\LayoutTransformer.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Phone\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls.Toolkit\">\r\n      <HintPath>..\\packages\\WPtoolkit.4.2013.08.16\\lib\\sl4-windowsphone71\\Microsoft.Phone.Controls.Toolkit.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Phone.Interop\" />\r\n    <Reference Include=\"System.Windows\" />\r\n    <Reference Include=\"system\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Windows.Interactivity, Version=3.8.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Net\" />\r\n    <Reference Include=\"mscorlib.extensions\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"AnimationMediator.cs\" />\r\n    <Compile Include=\"BindingListener.cs\" />\r\n    <Compile Include=\"Extensions\\ScrollViewerExtensions.cs\" />\r\n    <Compile Include=\"Extensions\\VisualTreeExtensions.cs\" />\r\n    <Compile Include=\"FlipCounter.xaml.cs\">\r\n      <DependentUpon>FlipCounter.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"FlipPanel.xaml.cs\">\r\n      <DependentUpon>FlipPanel.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Helpers\\DependencyPropertyChangedListener.cs\" />\r\n    <Compile Include=\"Helpers\\DependencyPropertyValueChangedEventArgs.cs\" />\r\n    <Compile Include=\"HighlightingTextBlock.cs\" />\r\n    <Compile Include=\"IHighlightable.cs\" />\r\n    <Compile Include=\"LazyItemsControl.cs\" />\r\n    <Compile Include=\"LazyListBox.cs\" />\r\n    <Compile Include=\"LongListSelector\\Common\\MotionParameters.cs\" />\r\n    <Compile Include=\"LongListSelector\\Common\\SafeRaise.cs\" />\r\n    <Compile Include=\"LongListSelector\\Common\\TempaltedVisualTreeExtensions.cs\" />\r\n    <Compile Include=\"LongListSelector\\Common\\VisualStates.cs\" />\r\n    <Compile Include=\"LongListSelector\\LongListSelector.cs\" />\r\n    <Compile Include=\"LongListSelector\\LongListSelectorEventArgs.cs\" />\r\n    <Compile Include=\"LongListSelector\\LongListSelectorGroup.cs\" />\r\n    <Compile Include=\"LongListSelector\\LongListSelectorItem.cs\" />\r\n    <Compile Include=\"LongListSelector\\LongListSelectorItemsControl.cs\" />\r\n    <Compile Include=\"LongListSelector\\LongListSelectorItemType.cs\" />\r\n    <Compile Include=\"LongListSelector\\TemplatedListBox.cs\" />\r\n    <Compile Include=\"LongListSelector\\TemplatedListBoxItem.cs\" />\r\n    <Compile Include=\"MultiTemplateLazyListBox.cs\" />\r\n    <Compile Include=\"Notifications\\DialogService.cs\" />\r\n    <Compile Include=\"Notifications\\PopUp.cs\" />\r\n    <Compile Include=\"Notifications\\ToastPrompt.cs\" />\r\n    <Compile Include=\"Profiling\\MemoryCounter.cs\" />\r\n    <Compile Include=\"Profiling\\ApplicationSpace.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"MultiTemplateItemsControl.cs\" />\r\n    <Compile Include=\"ReorderListBox\\ReorderListBox.cs\" />\r\n    <Compile Include=\"ReorderListBox\\ReorderListBoxItem.cs\" />\r\n    <Compile Include=\"ScrollableTextBlock.cs\" />\r\n    <Compile Include=\"SmoothProgressBar.xaml.cs\">\r\n      <DependentUpon>SmoothProgressBar.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Triggers\\CompressionTrigger.cs\" />\r\n    <Compile Include=\"Utils\\Language.cs\" />\r\n    <Compile Include=\"ValidationTextBox.cs\" />\r\n    <Compile Include=\"WatermarkTextBox.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Page Include=\"FlipCounter.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"FlipPanel.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"SmoothProgressBar.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Themes\\generic.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"README_FIRST.txt\" />\r\n    <Content Include=\"Toolkit.Content\\ApplicationBar.Add.png\" />\r\n    <Content Include=\"Toolkit.Content\\ApplicationBar.Cancel.png\" />\r\n    <Content Include=\"Toolkit.Content\\ApplicationBar.Check.png\" />\r\n    <Content Include=\"Toolkit.Content\\ApplicationBar.Delete.png\" />\r\n    <Content Include=\"Toolkit.Content\\ApplicationBar.Select.png\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "Telegram.Controls/Themes/generic.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls\"\r\n    xmlns:profiling=\"clr-namespace:Telegram.Controls.Profiling\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector\"\r\n    xmlns:notifications=\"clr-namespace:Telegram.Controls.Notifications\"\r\n    xmlns:primitives=\"clr-namespace:Coding4Fun.Toolkit.Controls.Primitives;assembly=Coding4Fun.Toolkit.Controls\"\r\n    xmlns:reorderListBox=\"clr-namespace:ReorderListBox\">\r\n\r\n    <!-- RANGE SLIDER -->\r\n    <Style TargetType=\"controls:RangeSlider\">\r\n        <Setter Property=\"BorderThickness\"\r\n                Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\"\r\n                Value=\"Black\" />\r\n        <Setter Property=\"Background\"\r\n                Value=\"#7fffffff\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"controls:RangeSlider\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                        <Grid>\r\n                            <Rectangle Height=\"2\"\r\n                                       Fill=\"Black\"\r\n                                       VerticalAlignment=\"Center\"\r\n                                       Margin=\"2.5,0,2.5,0\" />\r\n                            <Border x:Name=\"SelectedRangeBorder\"\r\n                                    Margin=\"0\">\r\n                                <Grid>\r\n                                    <Grid.Resources>\r\n                                        <Style x:Key=\"EndThumbStyle\"\r\n                                               TargetType=\"Thumb\">\r\n                                            <Setter Property=\"Background\"\r\n                                                    Value=\"#FF1F3B53\" />\r\n                                            <Setter Property=\"BorderThickness\"\r\n                                                    Value=\"1\" />\r\n                                            <Setter Property=\"IsTabStop\"\r\n                                                    Value=\"False\" />\r\n                                            <Setter Property=\"BorderBrush\">\r\n                                                <Setter.Value>\r\n                                                    <LinearGradientBrush EndPoint=\"0.5,1\"\r\n                                                                         StartPoint=\"0.5,0\">\r\n                                                        <GradientStop Color=\"#FFA3AEB9\"\r\n                                                                      Offset=\"0\" />\r\n                                                        <GradientStop Color=\"#FF8399A9\"\r\n                                                                      Offset=\"0.375\" />\r\n                                                        <GradientStop Color=\"#FF718597\"\r\n                                                                      Offset=\"0.375\" />\r\n                                                        <GradientStop Color=\"#FF617584\"\r\n                                                                      Offset=\"1\" />\r\n                                                    </LinearGradientBrush>\r\n                                                </Setter.Value>\r\n                                            </Setter>\r\n                                            <Setter Property=\"Template\">\r\n                                                <Setter.Value>\r\n                                                    <ControlTemplate TargetType=\"Thumb\">\r\n                                                        <Grid Background=\"Transparent\">\r\n                                                            <VisualStateManager.VisualStateGroups>\r\n                                                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                                    <VisualState x:Name=\"Normal\" />\r\n                                                                    <VisualState x:Name=\"MouseOver\">\r\n                                                                        <Storyboard>\r\n                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                                                                           Storyboard.TargetProperty=\"Opacity\">\r\n                                                                                <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                                                                      Value=\"1\" />\r\n                                                                            </DoubleAnimationUsingKeyFrames>\r\n                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\"\r\n                                                                                                          Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                                                <SplineColorKeyFrame KeyTime=\"0\"\r\n                                                                                                     Value=\"#F2FFFFFF\" />\r\n                                                                            </ColorAnimationUsingKeyFrames>\r\n                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\"\r\n                                                                                                          Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                                                <SplineColorKeyFrame KeyTime=\"0\"\r\n                                                                                                     Value=\"#CCFFFFFF\" />\r\n                                                                            </ColorAnimationUsingKeyFrames>\r\n                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\"\r\n                                                                                                          Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                                                <SplineColorKeyFrame KeyTime=\"0\"\r\n                                                                                                     Value=\"#7FFFFFFF\" />\r\n                                                                            </ColorAnimationUsingKeyFrames>\r\n                                                                        </Storyboard>\r\n                                                                    </VisualState>\r\n                                                                    <VisualState x:Name=\"Pressed\">\r\n                                                                        <Storyboard>\r\n                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\"\r\n                                                                                                          Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\">\r\n                                                                                <SplineColorKeyFrame KeyTime=\"0\"\r\n                                                                                                     Value=\"#FF6DBDD1\" />\r\n                                                                            </ColorAnimationUsingKeyFrames>\r\n                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                                                                           Storyboard.TargetProperty=\"Opacity\">\r\n                                                                                <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                                                                      Value=\"1\" />\r\n                                                                            </DoubleAnimationUsingKeyFrames>\r\n                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\"\r\n                                                                                                          Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                                                <SplineColorKeyFrame KeyTime=\"0\"\r\n                                                                                                     Value=\"#D8FFFFFF\" />\r\n                                                                            </ColorAnimationUsingKeyFrames>\r\n                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\"\r\n                                                                                                          Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                                                <SplineColorKeyFrame KeyTime=\"0\"\r\n                                                                                                     Value=\"#C6FFFFFF\" />\r\n                                                                            </ColorAnimationUsingKeyFrames>\r\n                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\"\r\n                                                                                                          Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                                                <SplineColorKeyFrame KeyTime=\"0\"\r\n                                                                                                     Value=\"#8CFFFFFF\" />\r\n                                                                            </ColorAnimationUsingKeyFrames>\r\n                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\"\r\n                                                                                                          Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                                                <SplineColorKeyFrame KeyTime=\"0\"\r\n                                                                                                     Value=\"#3FFFFFFF\" />\r\n                                                                            </ColorAnimationUsingKeyFrames>\r\n                                                                        </Storyboard>\r\n                                                                    </VisualState>\r\n                                                                    <VisualState x:Name=\"Disabled\">\r\n                                                                        <Storyboard>\r\n                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                                                                           Storyboard.TargetProperty=\"Opacity\">\r\n                                                                                <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                                                                      Value=\".55\" />\r\n                                                                            </DoubleAnimationUsingKeyFrames>\r\n                                                                        </Storyboard>\r\n                                                                    </VisualState>\r\n                                                                </VisualStateGroup>\r\n                                                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                                                    <VisualState x:Name=\"Focused\">\r\n                                                                        <Storyboard>\r\n                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\"\r\n                                                                                                           Storyboard.TargetProperty=\"Opacity\">\r\n                                                                                <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                                                                      Value=\"1\" />\r\n                                                                            </DoubleAnimationUsingKeyFrames>\r\n                                                                        </Storyboard>\r\n                                                                    </VisualState>\r\n                                                                    <VisualState x:Name=\"Unfocused\" />\r\n                                                                </VisualStateGroup>\r\n                                                            </VisualStateManager.VisualStateGroups>\r\n                                                            <Border x:Name=\"Background\"\r\n                                                                    Background=\"White\"\r\n                                                                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                                                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                                                    CornerRadius=\"2\"\r\n                                                                    Margin=\"0,5\">\r\n                                                                <Grid Margin=\"1\"\r\n                                                                      Background=\"{TemplateBinding Background}\">\r\n                                                                    <Border x:Name=\"BackgroundAnimation\"\r\n                                                                            Opacity=\"0\"\r\n                                                                            Background=\"#FF448DCA\" />\r\n                                                                    <Rectangle x:Name=\"BackgroundGradient\">\r\n                                                                        <Rectangle.Fill>\r\n                                                                            <LinearGradientBrush EndPoint=\".7,1\"\r\n                                                                                                 StartPoint=\".7,0\">\r\n                                                                                <GradientStop Color=\"#FFFFFFFF\"\r\n                                                                                              Offset=\"0\" />\r\n                                                                                <GradientStop Color=\"#F9FFFFFF\"\r\n                                                                                              Offset=\"0.375\" />\r\n                                                                                <GradientStop Color=\"#E5FFFFFF\"\r\n                                                                                              Offset=\"0.625\" />\r\n                                                                                <GradientStop Color=\"#C6FFFFFF\"\r\n                                                                                              Offset=\"1\" />\r\n                                                                            </LinearGradientBrush>\r\n                                                                        </Rectangle.Fill>\r\n                                                                    </Rectangle>\r\n                                                                </Grid>\r\n                                                            </Border>\r\n                                                            <Rectangle x:Name=\"DisabledVisualElement\"\r\n                                                                       Fill=\"#FFFFFFFF\"\r\n                                                                       RadiusX=\"2\"\r\n                                                                       RadiusY=\"2\"\r\n                                                                       IsHitTestVisible=\"false\"\r\n                                                                       Opacity=\"0\"\r\n                                                                       Margin=\"0,15\" />\r\n                                                            <Rectangle x:Name=\"FocusVisualElement\"\r\n                                                                       Stroke=\"#FF6DBDD1\"\r\n                                                                       StrokeThickness=\"1\"\r\n                                                                       RadiusX=\"1\"\r\n                                                                       RadiusY=\"1\"\r\n                                                                       Margin=\"1,6\"\r\n                                                                       IsHitTestVisible=\"false\"\r\n                                                                       Opacity=\"0\" />\r\n                                                            <StackPanel HorizontalAlignment=\"Center\"\r\n                                                                        Orientation=\"Horizontal\"\r\n                                                                        Margin=\"0,8\"\r\n                                                                        MaxHeight=\"10\">\r\n                                                                <Rectangle Width=\"1\"\r\n                                                                           Fill=\"Black\" />\r\n                                                                <Rectangle Fill=\"Black\"\r\n                                                                           Width=\"1\"\r\n                                                                           Margin=\"1,0,0,0\" />\r\n                                                            </StackPanel>\r\n                                                        </Grid>\r\n                                                    </ControlTemplate>\r\n                                                </Setter.Value>\r\n                                            </Setter>\r\n                                        </Style>\r\n                                    </Grid.Resources>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                        <ColumnDefinition Width=\"*\" />\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                    </Grid.ColumnDefinitions>\r\n\r\n                                    <Thumb x:Name=\"RangeCenterThumb\"\r\n                                           Grid.Column=\"1\"\r\n                                           Cursor=\"Hand\"\r\n                                           Margin=\"-5,0,-5,0\"\r\n                                           BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                           BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                           Background=\"{TemplateBinding Background}\">\r\n                                        <Thumb.Style>\r\n                                            <Style TargetType=\"Thumb\">\r\n                                                <Setter Property=\"Template\">\r\n                                                    <Setter.Value>\r\n                                                        <ControlTemplate TargetType=\"Thumb\">\r\n                                                            <Grid Background=\"Transparent\">\r\n                                                                <Border BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                                                        BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                                                        Background=\"{TemplateBinding Background}\"\r\n                                                                        CornerRadius=\"3\" />\r\n                                                            </Grid>\r\n                                                        </ControlTemplate>\r\n                                                    </Setter.Value>\r\n                                                </Setter>\r\n                                            </Style>\r\n                                        </Thumb.Style>\r\n                                    </Thumb>\r\n\r\n                                    <Thumb x:Name=\"RangeStartThumb\"\r\n                                           Cursor=\"SizeWE\"\r\n                                           Width=\"10\"\r\n                                           Style=\"{StaticResource EndThumbStyle}\"\r\n                                           BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                           BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n\r\n                                    <Thumb x:Name=\"RangeEndThumb\"\r\n                                           Grid.Column=\"2\"\r\n                                           Cursor=\"SizeWE\"\r\n                                           Width=\"10\"\r\n                                           Style=\"{StaticResource EndThumbStyle}\"\r\n                                           BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                           BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n\r\n                                </Grid>\r\n                            </Border>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    \r\n    <Style TargetType=\"notifications:ToastPrompt\">\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\" />\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeSmall}\" />\r\n        <Setter Property=\"Foreground\" Value=\"White\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneAccentBrush}\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Overlay\" Value=\"Transparent\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"notifications:ToastPrompt\">\r\n                    <Grid VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" Background=\"{TemplateBinding Background}\">\r\n                        <StackPanel VerticalAlignment=\"Bottom\" Margin=\"24, 32, 16, 5\" Orientation=\"{TemplateBinding TextOrientation}\">\r\n                            <StackPanel Margin=\"0,0,16,0\" VerticalAlignment=\"Bottom\" Orientation=\"Horizontal\">\r\n                                <Image Margin=\"0,0,16,0\" Visibility=\"Collapsed\" Name=\"ToastImage\" VerticalAlignment=\"Bottom\" Width=\"{TemplateBinding ImageWidth}\" Height=\"{TemplateBinding ImageHeight}\" Source=\"{TemplateBinding ImageSource}\" Stretch=\"{TemplateBinding Stretch}\" />\r\n                                <TextBlock Text=\"{TemplateBinding Title}\" FontWeight=\"Bold\" VerticalAlignment=\"Center\" Margin=\"0\" Padding=\"0\" />\r\n                            </StackPanel>\r\n                            <TextBlock Text=\"{TemplateBinding Message}\" Margin=\"0\" Padding=\"0\" Foreground=\"#99FFFFFF\" TextWrapping=\"{TemplateBinding TextWrapping}\" VerticalAlignment=\"Center\" />\r\n                        </StackPanel>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"longListSelector:LongListSelector\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <longListSelector:TemplatedListBox x:Name=\"TemplatedListBox\" Background=\"{TemplateBinding Background}\">\r\n                        <longListSelector:TemplatedListBox.ItemContainerStyle>\r\n                            <Style TargetType=\"ListBoxItem\">\r\n                                <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n                            </Style>\r\n                        </longListSelector:TemplatedListBox.ItemContainerStyle>                        \r\n                    </longListSelector:TemplatedListBox>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"primitives:LoopingSelectorItem\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Padding\" Value=\"6\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border x:Name=\"root\" Opacity=\"0\" CacheMode=\"BitmapCache\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\">\r\n\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.2\"/>\r\n                                </VisualStateGroup.Transitions>\r\n\r\n                                <VisualState x:Name=\"Normal\"/>\r\n\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"root\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\"/>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"background\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0\"/>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"Opacity\" To=\".6\" Duration=\"0\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"root\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\"/>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"background\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <Border.RenderTransform>\r\n                            <TranslateTransform x:Name=\"Transform\"/>\r\n                        </Border.RenderTransform>\r\n\r\n                        <Grid>\r\n                            <Rectangle x:Name=\"background\" Margin=\"2\" Opacity=\"0\" Fill=\"{StaticResource PhoneInactiveBrush}\" CacheMode=\"BitmapCache\"/>\r\n\r\n                            <Border BorderThickness=\"2\" BorderBrush=\"{StaticResource PhoneInactiveBrush}\">\r\n                                <ContentPresenter x:Name=\"contentPresenter\" CacheMode=\"BitmapCache\"/>\r\n                            </Border>\r\n                        </Grid>\r\n\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"profiling:MemoryCounter\">\r\n        <Setter Property=\"FontFamily\" Value=\"Courier New\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"profiling:MemoryCounter\">\r\n                    <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"100\"/>\r\n                            <ColumnDefinition Width=\"100\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Rectangle Grid.ColumnSpan=\"2\" Fill=\"Transparent\" />\r\n\r\n                        <TextBlock Padding=\"0,0,10,0\" Grid.Column=\"0\" HorizontalAlignment=\"Right\" Text=\"{TemplateBinding CurrentMemory}\"/>\r\n                        <TextBlock Padding=\"0,0,10,0\" Grid.Column=\"1\" HorizontalAlignment=\"Right\" Text=\"{TemplateBinding PeakMemory}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"controls:ScrollableTextBlock\" >\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n        <Setter Property=\"Padding\" Value=\"12,0\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <!--<Setter Property=\"Width\" Value=\"250\"/>-->\r\n        \r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"controls:ScrollableTextBlock\">\r\n                    <StackPanel Orientation=\"Vertical\" x:Name=\"StackPanel\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--<Style TargetType=\"controls:LongListSelector\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <controls:TemplatedListBox x:Name=\"TemplatedListBox\" \r\n                                                 Background=\"{TemplateBinding Background}\">\r\n                        <controls:TemplatedListBox.ItemContainerStyle>\r\n                            <Style TargetType=\"ListBoxItem\">\r\n                                <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n                            </Style>\r\n                        </controls:TemplatedListBox.ItemContainerStyle>\r\n                    </controls:TemplatedListBox>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"toolkitPrimitives:LoopingSelectorItem\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Padding\" Value=\"6\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border x:Name=\"root\" Opacity=\"0\" CacheMode=\"BitmapCache\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\">\r\n\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.2\"/>\r\n                                </VisualStateGroup.Transitions>\r\n\r\n                                <VisualState x:Name=\"Normal\"/>\r\n\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"root\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\"/>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"background\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0\"/>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"Opacity\" To=\".6\" Duration=\"0\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"root\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\"/>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"background\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <Border.RenderTransform>\r\n                            <TranslateTransform x:Name=\"Transform\"/>\r\n                        </Border.RenderTransform>\r\n\r\n                        <Grid>\r\n                            <Rectangle x:Name=\"background\" Margin=\"2\" Opacity=\"0\" Fill=\"{StaticResource PhoneInactiveBrush}\" CacheMode=\"BitmapCache\"/>\r\n\r\n                            <Border BorderThickness=\"2\" BorderBrush=\"{StaticResource PhoneInactiveBrush}\">\r\n                                <ContentPresenter x:Name=\"contentPresenter\" CacheMode=\"BitmapCache\"/>\r\n                            </Border>\r\n                        </Grid>\r\n\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>-->\r\n\r\n\r\n    <!--<Style x:Key=\"ThumbStyle\" TargetType=\"Thumb\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Border>\r\n                        <Rectangle x:Name=\"rectangle\" Fill=\"White\"  >\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\"/>\r\n                                    <VisualState x:Name=\"Disabled\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                        </Rectangle>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>-->\r\n\r\n\r\n    <!--<Style TargetType=\"local:HighlightingTextBlock\">\r\n        <Setter Property=\"HighlightBrush\" Value=\"Blue\" />\r\n    </Style>\r\n    \r\n    <Style TargetType=\"local:MultiTemplateItemsControl\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"local:MultiTemplateItemsControl\">\r\n                    <UserControl x:Name=\"root\"/>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>-->\r\n    <ControlTemplate x:Key=\"PhoneDisabledTextBoxTemplate\" TargetType=\"TextBox\">\r\n        <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n    </ControlTemplate>\r\n\r\n    <Style TargetType=\"controls:WatermarkedTextBox\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n        <Setter Property=\"SelectionBackground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n        <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"Padding\" Value=\"11,2\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"controls:WatermarkedTextBox\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledOrReadonlyContent\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <Grid>\r\n                                <ContentControl x:Name=\"WatermarkInlineContent\" Margin=\"12,0\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Style=\"{TemplateBinding WatermarkStyle}\" Content=\"{TemplateBinding InlineWatermark}\" Background=\"Transparent\" Opacity=\"0.5\"/>\r\n                                <ContentControl x:Name=\"WatermarkContent\" Margin=\"12,0\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Style=\"{TemplateBinding WatermarkStyle}\" Content=\"{TemplateBinding Watermark}\" Background=\"Transparent\" Opacity=\"0.5\"/>\r\n                                <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledOrReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                            <TextBox x:Name=\"DisabledOrReadonlyContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\"\r\n\t\t\t\t\t\t\t\t\t FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontSize=\"{TemplateBinding FontSize}\"\r\n\t\t\t\t\t\t\t\t\t FontFamily=\"{TemplateBinding FontFamily}\" IsReadOnly=\"True\" SelectionForeground=\"{TemplateBinding SelectionForeground}\" \r\n\t\t\t\t\t\t\t\t\t SelectionBackground=\"{TemplateBinding SelectionBackground}\" TextAlignment=\"{TemplateBinding TextAlignment}\" \r\n\t\t\t\t\t\t\t\t\t TextWrapping=\"{TemplateBinding TextWrapping}\" Text=\"{TemplateBinding Text}\" Template=\"{StaticResource PhoneDisabledTextBoxTemplate}\" />\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"reorderListBox:ReorderListBox\">\r\n        <Setter\r\n            Property=\"Background\"\r\n            Value=\"Transparent\" />\r\n        <Setter\r\n            Property=\"Foreground\"\r\n            Value=\"{StaticResource PhoneForegroundBrush}\" />\r\n        <Setter\r\n            Property=\"ScrollViewer.HorizontalScrollBarVisibility\"\r\n            Value=\"Disabled\" />\r\n        <Setter\r\n            Property=\"ScrollViewer.VerticalScrollBarVisibility\"\r\n            Value=\"Auto\" />\r\n        <Setter\r\n            Property=\"BorderThickness\"\r\n            Value=\"0\" />\r\n        <Setter\r\n            Property=\"BorderBrush\"\r\n            Value=\"Transparent\" />\r\n        <Setter\r\n            Property=\"Padding\"\r\n            Value=\"0\" />\r\n        <Setter\r\n            Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate\r\n                    TargetType=\"reorderListBox:ReorderListBox\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition\r\n                                Width=\"*\" />\r\n                            <ColumnDefinition\r\n                                Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <!-- ScrollViewer ManipulationMode=Conrtrol is only required for compatibility with PullDownToRefreshPanel. -->\r\n                        <!-- Otherwise, the default ManipulationMode=System will provide better scrolling performance. -->\r\n                        <ScrollViewer\r\n                            x:Name=\"ScrollViewer\"\r\n                            Grid.ColumnSpan=\"2\"\r\n                            ManipulationMode=\"Control\"\r\n                            Foreground=\"{TemplateBinding Foreground}\"\r\n                            Background=\"{TemplateBinding Background}\"\r\n                            BorderBrush=\"Transparent\"\r\n                            BorderThickness=\"0\"\r\n                            Padding=\"{TemplateBinding Padding}\">\r\n                            <ItemsPresenter />\r\n                        </ScrollViewer>\r\n                        <!-- The DragInterceptor sits on top of the item DragHandles and intercepts drag events\r\n                             so that the capture is not lost when the item container is removed from the panel.\r\n                             Its width must be equal to the width of the item DragHandles. -->\r\n                        <Canvas\r\n                            x:Name=\"DragInterceptor\"\r\n                            Grid.Column=\"1\"\r\n                            Margin=\"{TemplateBinding Padding}\"\r\n                            Background=\"Transparent\"\r\n                            VerticalAlignment=\"Stretch\"\r\n                            Width=\"52\">\r\n                            <Image\r\n                                x:Name=\"DragIndicator\"\r\n                                Visibility=\"Collapsed\">\r\n                                <Image.RenderTransform>\r\n                                    <TranslateTransform />\r\n                                </Image.RenderTransform>\r\n                            </Image>\r\n                        </Canvas>\r\n                        <Canvas\r\n                            x:Name=\"RearrangeCanvas\"\r\n                            Grid.ColumnSpan=\"2\"\r\n                            Margin=\"{TemplateBinding Padding}\"\r\n                            Background=\"Transparent\"\r\n                            Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"reorderListBox:ReorderListBoxItem\">\r\n        <Setter\r\n            Property=\"Background\"\r\n            Value=\"Transparent\" />\r\n        <Setter\r\n            Property=\"BorderThickness\"\r\n            Value=\"0\" />\r\n        <Setter\r\n            Property=\"BorderBrush\"\r\n            Value=\"Transparent\" />\r\n        <Setter\r\n            Property=\"Padding\"\r\n            Value=\"0\" />\r\n        <Setter\r\n            Property=\"HorizontalContentAlignment\"\r\n            Value=\"Stretch\" />\r\n        <Setter\r\n            Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\" />\r\n        <Setter\r\n            Property=\"DragHandleTemplate\">\r\n            <Setter.Value>\r\n                <DataTemplate>\r\n                    <Canvas\r\n                        Width=\"52\"\r\n                        Height=\"48\"\r\n                        Background=\"Transparent\">\r\n                        <Polygon\r\n                            Fill=\"Gray\"\r\n                            Points=\"16,20 4,20 22,4 22,44 16,44\" />\r\n                        <Polygon\r\n                            Fill=\"Gray\"\r\n                            Points=\"32,28 44,28 26,44 26,4 32,4\" />\r\n                    </Canvas>\r\n                </DataTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter\r\n            Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate\r\n                    TargetType=\"reorderListBox:ReorderListBoxItem\">\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition\r\n                                Height=\"Auto\" />\r\n                            <RowDefinition\r\n                                Height=\"*\" />\r\n                            <RowDefinition\r\n                                Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Grid\r\n                            x:Name=\"DropBeforeSpace\"\r\n                            Grid.Row=\"0\"\r\n                            Height=\"0\" />\r\n                        <Grid\r\n                            x:Name=\"DropAfterSpace\"\r\n                            Grid.Row=\"2\"\r\n                            Height=\"0\" />\r\n                        <Border\r\n                            x:Name=\"LayoutRoot\"\r\n                            Grid.Row=\"1\"\r\n                            Background=\"{TemplateBinding Background}\"\r\n                            HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                            VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                            <Grid\r\n                                Background=\"Transparent\"\r\n                                Margin=\"{TemplateBinding Padding}\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition\r\n                                        Width=\"*\" />\r\n                                    <ColumnDefinition\r\n                                        Width=\"Auto\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <ContentControl\r\n                                    x:Name=\"ContentContainer\"\r\n                                    Grid.Column=\"0\"\r\n                                    HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                    VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                    Content=\"{TemplateBinding Content}\"\r\n                                    ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\" />\r\n                                <Grid\r\n                                    x:Name=\"HandleContainer\"\r\n                                    Grid.Column=\"1\">\r\n                                    <ContentPresenter\r\n                                        x:Name=\"DragHandle\"\r\n                                        Width=\"52\"\r\n                                        VerticalAlignment=\"Center\"\r\n                                        ContentTemplate=\"{TemplateBinding DragHandleTemplate}\" />\r\n                                </Grid>\r\n                            </Grid>\r\n                        </Border>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup\r\n                                x:Name=\"CommonStates\">\r\n                                <VisualState\r\n                                    x:Name=\"Normal\" />\r\n                                <VisualState\r\n                                    x:Name=\"MouseOver\" />\r\n                                <VisualState\r\n                                    x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames\r\n                                            Storyboard.TargetName=\"LayoutRoot\"\r\n                                            Storyboard.TargetProperty=\"Background\">\r\n                                            <DiscreteObjectKeyFrame\r\n                                                KeyTime=\"0\"\r\n                                                Value=\"{StaticResource TransparentBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation\r\n                                            Storyboard.TargetName=\"ContentContainer\"\r\n                                            Storyboard.TargetProperty=\"Opacity\"\r\n                                            Duration=\"0\"\r\n                                            To=\".5\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup\r\n                                x:Name=\"SelectionStates\">\r\n                                <VisualState\r\n                                    x:Name=\"Unselected\" />\r\n                                <VisualState\r\n                                    x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames\r\n                                            Storyboard.TargetName=\"ContentContainer\"\r\n                                            Storyboard.TargetProperty=\"Foreground\">\r\n                                            <DiscreteObjectKeyFrame\r\n                                                KeyTime=\"0\"\r\n                                                Value=\"{StaticResource PhoneAccentBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup\r\n                                x:Name=\"ReorderEnabledStates\">\r\n                                <VisualState\r\n                                    x:Name=\"ReorderDisabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation\r\n                                            Storyboard.TargetName=\"DragHandle\"\r\n                                            Storyboard.TargetProperty=\"Width\"\r\n                                            To=\"0\"\r\n                                            Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState\r\n                                    x:Name=\"ReorderEnabled\" />\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition\r\n                                        From=\"ReorderDisabled\"\r\n                                        To=\"ReorderEnabled\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"DragHandle\"\r\n                                                Storyboard.TargetProperty=\"Width\"\r\n                                                To=\"52\"\r\n                                                Duration=\"0:0:0.4\" />\r\n                                        </Storyboard>\r\n                                    </VisualTransition>\r\n                                    <VisualTransition\r\n                                        From=\"ReorderEnabled\"\r\n                                        To=\"ReorderDisabled\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"DragHandle\"\r\n                                                Storyboard.TargetProperty=\"Width\"\r\n                                                To=\"0\"\r\n                                                Duration=\"0:0:0.4\" />\r\n                                        </Storyboard>\r\n                                    </VisualTransition>\r\n                                </VisualStateGroup.Transitions>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup\r\n                                x:Name=\"DraggingStates\">\r\n                                <VisualState\r\n                                    x:Name=\"NotDragging\" />\r\n                                <VisualState\r\n                                    x:Name=\"Dragging\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation\r\n                                            Storyboard.TargetName=\"LayoutRoot\"\r\n                                            Storyboard.TargetProperty=\"(Control.Background).(SolidColorBrush.Color)\"\r\n                                            To=\"#60808080\"\r\n                                            Duration=\"0\" />\r\n                                        <DoubleAnimation\r\n                                            Storyboard.TargetName=\"LayoutRoot\"\r\n                                            Storyboard.TargetProperty=\"Opacity\"\r\n                                            To=\"0.7\"\r\n                                            Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition\r\n                                        To=\"NotDragging\">\r\n                                        <Storyboard>\r\n                                            <ColorAnimation\r\n                                                Storyboard.TargetName=\"LayoutRoot\"\r\n                                                Storyboard.TargetProperty=\"(Control.Background).(SolidColorBrush.Color)\"\r\n                                                From=\"#60808080\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"LayoutRoot\"\r\n                                                Storyboard.TargetProperty=\"Opacity\"\r\n                                                From=\"0.7\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                        </Storyboard>\r\n                                    </VisualTransition>\r\n                                    <VisualTransition\r\n                                        To=\"Dragging\">\r\n                                        <Storyboard>\r\n                                            <ColorAnimation\r\n                                                Storyboard.TargetName=\"LayoutRoot\"\r\n                                                Storyboard.TargetProperty=\"(Control.Background).(SolidColorBrush.Color)\"\r\n                                                To=\"#60808080\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"LayoutRoot\"\r\n                                                Storyboard.TargetProperty=\"Opacity\"\r\n                                                To=\"0.7\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                        </Storyboard>\r\n                                    </VisualTransition>\r\n                                </VisualStateGroup.Transitions>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup\r\n                                x:Name=\"DropIndicatorStates\">\r\n                                <VisualState\r\n                                    x:Name=\"NoDropIndicator\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation\r\n                                            Storyboard.TargetName=\"DropBeforeSpace\"\r\n                                            Storyboard.TargetProperty=\"Height\"\r\n                                            To=\"0\"\r\n                                            Duration=\"0\" />\r\n                                        <DoubleAnimation\r\n                                            Storyboard.TargetName=\"DropAfterSpace\"\r\n                                            Storyboard.TargetProperty=\"Height\"\r\n                                            To=\"0\"\r\n                                            Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState\r\n                                    x:Name=\"DropBeforeIndicator\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation\r\n                                            Storyboard.TargetName=\"DropBeforeSpace\"\r\n                                            Storyboard.TargetProperty=\"Height\"\r\n                                            To=\"1\"\r\n                                            Duration=\"0\" />\r\n                                        <DoubleAnimation\r\n                                            Storyboard.TargetName=\"DropAfterSpace\"\r\n                                            Storyboard.TargetProperty=\"Height\"\r\n                                            To=\"0\"\r\n                                            Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState\r\n                                    x:Name=\"DropAfterIndicator\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation\r\n                                            Storyboard.TargetName=\"DropBeforeSpace\"\r\n                                            Storyboard.TargetProperty=\"Height\"\r\n                                            To=\"0\"\r\n                                            Duration=\"0\" />\r\n                                        <DoubleAnimation\r\n                                            Storyboard.TargetName=\"DropAfterSpace\"\r\n                                            Storyboard.TargetProperty=\"Height\"\r\n                                            To=\"1\"\r\n                                            Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition\r\n                                        From=\"NoDropIndicator\"\r\n                                        To=\"DropBeforeIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"DropBeforeSpace\"\r\n                                                Storyboard.TargetProperty=\"Height\"\r\n                                                To=\"1\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                        </Storyboard>\r\n                                    </VisualTransition>\r\n                                    <VisualTransition\r\n                                        From=\"NoDropIndicator\"\r\n                                        To=\"DropAfterIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"DropAfterSpace\"\r\n                                                Storyboard.TargetProperty=\"Height\"\r\n                                                To=\"1\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                        </Storyboard>\r\n                                    </VisualTransition>\r\n                                    <VisualTransition\r\n                                        From=\"DropBeforeIndicator\"\r\n                                        To=\"NoDropIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"DropBeforeSpace\"\r\n                                                Storyboard.TargetProperty=\"Height\"\r\n                                                To=\"0\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                        </Storyboard>\r\n                                    </VisualTransition>\r\n                                    <VisualTransition\r\n                                        From=\"DropAfterIndicator\"\r\n                                        To=\"NoDropIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"DropAfterSpace\"\r\n                                                Storyboard.TargetProperty=\"Height\"\r\n                                                To=\"0\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                        </Storyboard>\r\n                                    </VisualTransition>\r\n                                    <VisualTransition\r\n                                        From=\"DropBeforeIndicator\"\r\n                                        To=\"DropAfterIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"DropBeforeSpace\"\r\n                                                Storyboard.TargetProperty=\"Height\"\r\n                                                To=\"0\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"DropAfterSpace\"\r\n                                                Storyboard.TargetProperty=\"Height\"\r\n                                                To=\"1\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                        </Storyboard>\r\n                                    </VisualTransition>\r\n                                    <VisualTransition\r\n                                        From=\"DropAfterIndicator\"\r\n                                        To=\"DropBeforeIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"DropBeforeSpace\"\r\n                                                Storyboard.TargetProperty=\"Height\"\r\n                                                To=\"1\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                            <DoubleAnimation\r\n                                                Storyboard.TargetName=\"DropAfterSpace\"\r\n                                                Storyboard.TargetProperty=\"Height\"\r\n                                                To=\"0\"\r\n                                                Duration=\"0:0:0.2\" />\r\n                                        </Storyboard>\r\n                                    </VisualTransition>\r\n                                </VisualStateGroup.Transitions>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "Telegram.Controls/Triggers/CompressionTrigger.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Interactivity;\r\n\r\nnamespace Telegram.Controls.Triggers\r\n{\r\n    public class CompressionTrigger : TriggerBase<LazyListBox>\r\n    {\r\n        public static DependencyProperty IsDisabledProperty = DependencyProperty.Register(\"IsDisabled\", typeof(bool), typeof(CompressionTrigger), null);\r\n\r\n        public bool IsDisabled\r\n        {\r\n            get { return (bool)GetValue(IsDisabledProperty); }\r\n            set { SetValue(IsDisabledProperty, value); }\r\n        }\r\n\r\n        public static DependencyProperty CompressionTypeProperty = DependencyProperty.Register(\"CompressionType\", typeof(CompressionType), typeof(CompressionTrigger), null);\r\n\r\n        public CompressionType CompressionType\r\n        {\r\n            get { return (CompressionType)GetValue(CompressionTypeProperty); }\r\n            set { SetValue(CompressionTypeProperty, value); }\r\n        }\r\n\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n\r\n            AssociatedObject.Compression += AssociatedObject_Compression;\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            AssociatedObject.Compression -= AssociatedObject_Compression;\r\n\r\n            base.OnDetaching();\r\n        }\r\n\r\n        private void AssociatedObject_Compression(object sender, CompressionEventArgs args)\r\n        {\r\n            if (!IsDisabled\r\n                && args.Type == CompressionType)\r\n            {\r\n                InvokeActions(null);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class CompressionTrigger2 : TriggerBase<LazyItemsControl>\r\n    {\r\n        public static DependencyProperty IsDisabledProperty = DependencyProperty.Register(\"IsDisabled\", typeof(bool), typeof(CompressionTrigger2), null);\r\n\r\n        public bool IsDisabled\r\n        {\r\n            get { return (bool)GetValue(IsDisabledProperty); }\r\n            set { SetValue(IsDisabledProperty, value); }\r\n        }\r\n\r\n        public static DependencyProperty CompressionTypeProperty = DependencyProperty.Register(\"CompressionType\", typeof(CompressionType), typeof(CompressionTrigger2), null);\r\n\r\n        public CompressionType CompressionType\r\n        {\r\n            get { return (CompressionType)GetValue(CompressionTypeProperty); }\r\n            set { SetValue(CompressionTypeProperty, value); }\r\n        }\r\n\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n\r\n            AssociatedObject.Compression += AssociatedObject_Compression;\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            AssociatedObject.Compression -= AssociatedObject_Compression;\r\n\r\n            base.OnDetaching();\r\n        }\r\n\r\n        private void AssociatedObject_Compression(object sender, CompressionEventArgs args)\r\n        {\r\n            if (!IsDisabled\r\n                && args.Type == CompressionType)\r\n            {\r\n                InvokeActions(null);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/UnreadCounter.xaml",
    "content": "﻿<UserControl x:Class=\"Telegram.Controls.UnreadCounter\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\" \r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n        <Border x:Name=\"Border\" CornerRadius=\"14\" Height=\"28\" MinWidth=\"28\" Background=\"{StaticResource PhoneAccentBrush}\"/>\r\n        <TextBlock x:Name=\"CounterText\" Margin=\"7,-3,7,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n            Foreground=\"White\" \r\n            FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n            FontWeight=\"SemiBold\"\r\n            FontSize=\"18\"\r\n            Text=\"9\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "Telegram.Controls/UnreadCounter.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    public partial class UnreadCounter\r\n    {\r\n        public static readonly DependencyProperty BorderBackgroundProperty = DependencyProperty.Register(\r\n            \"BorderBackground\", typeof (Brush), typeof (UnreadCounter), new PropertyMetadata(default(Brush), OnBorderBackgroundChanged));\r\n\r\n        private static void OnBorderBackgroundChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var unreadCounter = d as UnreadCounter;\r\n            if (unreadCounter != null)\r\n            {\r\n                unreadCounter.Border.Background = (Brush) e.NewValue;\r\n            }\r\n        }\r\n\r\n        public Brush BorderBackground\r\n        {\r\n            get { return (Brush) GetValue(BorderBackgroundProperty); }\r\n            set { SetValue(BorderBackgroundProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty CounterProperty = DependencyProperty.Register(\r\n            \"Counter\", typeof(int), typeof(UnreadCounter), new PropertyMetadata(OnCounterChanged));\r\n\r\n        private static void OnCounterChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var unreadCounter = d as UnreadCounter;\r\n            if (unreadCounter != null)\r\n            {\r\n                var counter = (int)e.NewValue;\r\n\r\n                unreadCounter.Visibility = counter <= 0 ? Visibility.Collapsed : Visibility.Visible;\r\n                if (counter < 1000)\r\n                {\r\n                    unreadCounter.CounterText.Text = counter.ToString(CultureInfo.InvariantCulture);\r\n                }\r\n                else\r\n                {\r\n\r\n                    unreadCounter.CounterText.Text = counter / 1000 + \"K\";\r\n                }\r\n            }\r\n        }\r\n\r\n        public int Counter\r\n        {\r\n            get { return (int)GetValue(CounterProperty); }\r\n            set { SetValue(CounterProperty, value); }\r\n        }\r\n\r\n        public UnreadCounter()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Background = (Brush) Resources[\"PhoneAccentBrush\"];\r\n\r\n            Visibility = Visibility.Collapsed;\r\n            CounterText.Text = null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/Utils/Language.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nnamespace Telegram.Controls.Utils\r\n{\r\n    public static class Language\r\n    {\r\n        private static readonly Dictionary<char, string> _ruEnTable = new Dictionary<char, string>\r\n        {\r\n            {'а', \"a\"}, {'б', \"b\"}, \r\n            {'в', \"v\"}, {'г', \"g\"}, \r\n            {'д', \"d\"}, {'е', \"e\"},\r\n            {'ё', \"e\"}, {'ж', \"zh\"}, \r\n            {'з', \"z\"}, {'и', \"i\"}, \r\n            {'й', \"j\"}, {'к', \"k\"},\r\n            {'л', \"l\"}, {'м', \"m\"}, \r\n            {'н', \"n\"}, {'о', \"o\"}, \r\n            {'п', \"p\"}, {'р', \"r\"},\r\n            {'с', \"s\"}, {'т', \"t\"}, \r\n            {'у', \"u\"}, {'ф', \"f\"}, \r\n            {'х', \"kh\"}, {'ц', \"tc\"},\r\n            {'ч', \"ch\"}, {'ш', \"sh\"}, \r\n            {'щ', \"shch\"}, {'ъ', \"\"}, \r\n            {'ы', \"y\"}, {'ь', \"\"},\r\n            {'э', \"e\"}, {'ю', \"iu\"}, \r\n            {'я', \"ia\"}\r\n        };\r\n\r\n        private static readonly Dictionary<char, string> _enRuTable = new Dictionary<char, string>\r\n        {\r\n            {'a', \"а\"}, {'b', \"б\"}, \r\n            {'c', \"ц\"}, {'d', \"д\"}, \r\n            {'e', \"е\"}, {'f', \"ф\"},\r\n            {'g', \"г\"}, {'h', \"х\"}, \r\n            {'i', \"и\"}, {'j', \"й\"}, \r\n            {'k', \"к\"}, {'l', \"л\"},\r\n            {'m', \"м\"}, {'n', \"н\"}, \r\n            {'o', \"о\"}, {'p', \"п\"}, \r\n            {'q', \"к\"}, {'r', \"р\"},\r\n            {'s', \"с\"}, {'t', \"т\"}, \r\n            {'u', \"ю\"}, {'v', \"в\"}, \r\n            {'w', \"в\"}, {'x', \"х\"},\r\n            {'y', \"й\"}, {'z', \"з\"}\r\n        };\r\n\r\n        public static string Transliterate(string str)\r\n        {\r\n            var enCount = 0;\r\n            var ruCount = 0;\r\n            var count = 0;\r\n            const int maxCount = 7;\r\n            foreach (var alpha in str)\r\n            {\r\n                if (count > maxCount) break;\r\n                if (_enRuTable.ContainsKey(alpha))\r\n                {\r\n                    enCount++;\r\n                }\r\n                else if (_ruEnTable.ContainsKey(alpha))\r\n                {\r\n                    ruCount++;\r\n                }\r\n                count++;\r\n            }\r\n\r\n            if (enCount > ruCount)\r\n            {\r\n                return TransliterateToRussian(str);\r\n            }\r\n\r\n            return TransliterateToEnglish(str);\r\n        }\r\n\r\n        public static string TransliterateToRussian(string str)\r\n        {\r\n            var enStr = new StringBuilder();\r\n            foreach (var alpha in str)\r\n            {\r\n                if (_enRuTable.ContainsKey(alpha))\r\n                {\r\n                    enStr.Append(_enRuTable[alpha]);\r\n                }\r\n            }\r\n\r\n            return enStr.ToString();\r\n        }\r\n\r\n        public static string TransliterateToEnglish(string str)\r\n        {\r\n            var enStr = new StringBuilder();\r\n            foreach (var alpha in str)\r\n            {\r\n                if (_ruEnTable.ContainsKey(alpha))\r\n                {\r\n                    enStr.Append(_ruEnTable[alpha]);\r\n                }\r\n            }\r\n\r\n            return enStr.ToString();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/ValidationTextBox.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeniy Nadymov, 2013-2018.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    public class ValidationTextBox : TextBox\r\n    {\r\n        public ValidationTextBox()\r\n        {\r\n            DefaultStyleKey = typeof(ValidationTextBox);\r\n        }\r\n\r\n        public static readonly DependencyProperty HasErrorProperty = DependencyProperty.Register(\r\n            \"HasError\", typeof (bool), typeof (ValidationTextBox), new PropertyMetadata(default(bool), OnHasErrorChanged));\r\n\r\n        private static void OnHasErrorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var validationTextBox = (ValidationTextBox)d;\r\n            if ((bool)e.NewValue)\r\n            {\r\n                VisualStateManager.GoToState(validationTextBox, \"Invalid\", true);\r\n            }\r\n            else\r\n            {\r\n                VisualStateManager.GoToState(validationTextBox, \"Valid\", true);\r\n            }\r\n        }\r\n\r\n        public bool HasError\r\n        {\r\n            get { return (bool) GetValue(HasErrorProperty); }\r\n            set { SetValue(HasErrorProperty, value); }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/WatermarkTextBox.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing Telegram.Controls.Helpers;\r\n\r\nnamespace Telegram.Controls\r\n{\r\n    public class WatermarkedTextBox : TextBox\r\n    {\r\n        public static readonly DependencyProperty InlineWatermarkProperty = DependencyProperty.Register(\r\n            \"InlineWatermark\", typeof (string), typeof (WatermarkedTextBox), new PropertyMetadata(default(string), OnInlineWatermarkPropertyChanged));\r\n\r\n        private static void OnInlineWatermarkPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var textBox = d as WatermarkedTextBox;\r\n            if (textBox != null)\r\n            {\r\n                SetInlineWatermarkPosition(textBox);\r\n            }\r\n        }\r\n\r\n        private static void SetInlineWatermarkPosition(WatermarkedTextBox textBox)\r\n        {\r\n            var text = textBox.Text ?? string.Empty;\r\n            if (textBox._watermarkInlineContentBorder != null)\r\n            {\r\n                var measuredText = text;\r\n\r\n                var rect = textBox.GetRectFromCharacterIndex(measuredText.Length);\r\n#if DEBUG\r\n    //Deployment.Current.Dispatcher.BeginInvoke(() => MessageBox.Show(\"'\" + text + \"' \" + text.Length + \" \" + rect));\r\n#endif\r\n                \r\n                //textBox._watermarkInlineContentBorder.Margin = new Thickness(textBox.Margin.Left, textBox.Margin.Top, textBox.ActualWidth - rect.X - 15.0, textBox.Margin.Bottom);\r\n                //textBox.GetRectFromCharacterIndex(0, )\r\n                var delta = !measuredText.EndsWith(\" \") && measuredText.Length > 0 ? rect.X - textBox.GetRectFromCharacterIndex(measuredText.Length - 1).X : 0.0;\r\n                textBox._watermarkInlineContentBorder.RenderTransform = new TranslateTransform { X = rect.X + delta, Y = 0.0 };\r\n            }\r\n        }\r\n\r\n        public string InlineWatermark\r\n        {\r\n            get { return (string) GetValue(InlineWatermarkProperty); }\r\n            set { SetValue(InlineWatermarkProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextScaleFactorProperty = DependencyProperty.Register(\r\n            \"TextScaleFactor\", typeof(double), typeof(WatermarkedTextBox), new PropertyMetadata(1.0, OnTextScaleFactorChanged));\r\n\r\n        private static void OnTextScaleFactorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var textBox = (WatermarkedTextBox)d;\r\n            if (textBox != null && textBox._contentElement != null)\r\n            {\r\n                var opacity = textBox._watermarkInlineContent.Opacity;\r\n                textBox._watermarkInlineContent.Opacity = 0.0;\r\n                textBox.FontSize = textBox._defaultFontSize * (double)e.NewValue;\r\n\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    textBox._watermarkInlineContent.Opacity = opacity;\r\n                    SetInlineWatermarkPosition(textBox);\r\n                });\r\n            }\r\n        }\r\n\r\n        private double _defaultFontSize;\r\n\r\n        public double TextScaleFactor\r\n        {\r\n            get { return (double)GetValue(TextScaleFactorProperty); }\r\n            set { SetValue(TextScaleFactorProperty, value); }\r\n        }\r\n\r\n\r\n        private ContentControl _watermarkContent;\r\n\r\n        private ContentControl _watermarkInlineContent;\r\n\r\n        private ContentControl _contentElement;\r\n\r\n        public static readonly DependencyProperty WatermarkForegroundProperty = DependencyProperty.Register(\r\n            \"WatermarkForeground\", typeof (Brush), typeof (WatermarkedTextBox), new PropertyMetadata(default(Brush)));\r\n\r\n        public Brush WatermarkForeground\r\n        {\r\n            get { return (Brush) GetValue(WatermarkForegroundProperty); }\r\n            set { SetValue(WatermarkForegroundProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty WatermarkProperty =\r\n            DependencyProperty.Register(\"Watermark\", typeof(object), typeof(WatermarkedTextBox), new PropertyMetadata(OnWatermarkPropertyChanged));\r\n\r\n        public static readonly DependencyProperty WatermarkStyleProperty =\r\n            DependencyProperty.Register(\"WatermarkStyle\", typeof(Style), typeof(WatermarkedTextBox), null);\r\n\r\n        public Style WatermarkStyle\r\n        {\r\n            get { return GetValue(WatermarkStyleProperty) as Style; }\r\n            set { SetValue(WatermarkStyleProperty, value); }\r\n        }\r\n\r\n        public object Watermark\r\n        {\r\n            get { return GetValue(WatermarkProperty); }\r\n            set { SetValue(WatermarkProperty, value); }\r\n        }\r\n\r\n        private readonly DependencyPropertyChangedListener _listener;\r\n        private Border _watermarkInlineContentBorder;\r\n\r\n        public WatermarkedTextBox()\r\n        {\r\n            DefaultStyleKey = typeof(WatermarkedTextBox);\r\n\r\n            _listener = DependencyPropertyChangedListener.Create(this, \"Text\");\r\n            _listener.ValueChanged += OnTextChanged;\r\n        }\r\n\r\n        private void OnTextChanged(object sender, DependencyPropertyValueChangedEventArgs args)\r\n        {\r\n            if (_watermarkContent != null)\r\n            {\r\n                _watermarkContent.Opacity = !string.IsNullOrEmpty(Text) ? 0.0 : 0.5;\r\n            }\r\n\r\n            if (_watermarkInlineContent != null)\r\n            {\r\n                _watermarkInlineContent.Opacity = !string.IsNullOrEmpty(Text) ? 0.5 : 0.0;\r\n            }\r\n            //var text = Text ?? string.Empty;\r\n            //if (_watermarkInlineContentBorder != null)\r\n            //{\r\n            //    var rect = GetRectFromCharacterIndex(text.Length);\r\n            //    _watermarkInlineContentBorder.RenderTransform = new TranslateTransform { X = rect.X - 12.0, Y = rect.Y - rect.Height / 2.0 - 8.0 };\r\n            //}\r\n        }\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            _defaultFontSize = FontSize;\r\n            if (TextScaleFactor > 1.0)\r\n            {\r\n                FontSize = _defaultFontSize*TextScaleFactor;\r\n            }\r\n\r\n            _watermarkContent = GetTemplateChild(\"WatermarkContent\") as ContentControl;\r\n            _watermarkInlineContent = GetTemplateChild(\"WatermarkInlineContent\") as ContentControl;\r\n            _watermarkInlineContentBorder = GetTemplateChild(\"WatermarkInlineContentBorder\") as Border;\r\n            _contentElement = GetTemplateChild(\"ContentElement\") as ContentControl;\r\n\r\n            if (_watermarkContent != null)\r\n            {\r\n                DetermineWatermarkContentVisibility();\r\n            }\r\n        }\r\n\r\n        protected override void OnGotFocus(RoutedEventArgs e)\r\n        {\r\n            DetermineWatermarkContentVisibility();\r\n            base.OnGotFocus(e);\r\n        }\r\n\r\n        protected override void OnLostFocus(RoutedEventArgs e)\r\n        {\r\n            DetermineWatermarkContentVisibility();\r\n            base.OnLostFocus(e);\r\n        }\r\n\r\n        private static void OnWatermarkPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)\r\n        {\r\n            var watermarkTextBox = sender as WatermarkedTextBox;\r\n            if (watermarkTextBox != null && watermarkTextBox._watermarkContent != null)\r\n            {\r\n                watermarkTextBox.DetermineWatermarkContentVisibility();\r\n            }\r\n        }\r\n\r\n        private void DetermineWatermarkContentVisibility()\r\n        {\r\n            _watermarkContent.Opacity = string.IsNullOrEmpty(Text) ? 0.5 : 0.0;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Coding4Fun.Toolkit.Controls\" version=\"2.0.7\" targetFramework=\"wp71\" />\r\n  <package id=\"WPtoolkit\" version=\"4.2013.08.16\" targetFramework=\"wp71\" />\r\n</packages>"
  },
  {
    "path": "Telegram.Controls.WP8/Properties/AssemblyInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Telegram.Controls.WP8\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Telegram.Controls.WP8\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"f04be5a2-70df-4e82-bfb5-cd03985c9746\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "Telegram.Controls.WP8/Telegram.Controls.WP8.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Telegram.Controls</RootNamespace>\r\n    <AssemblyName>Telegram.Controls</AssemblyName>\r\n    <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>\r\n    <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|x86' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\x86\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|x86' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\x86\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|ARM' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\ARM\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|ARM' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\ARM\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"..\\Telegram.Controls\\AnimationMediator.cs\">\r\n      <Link>AnimationMediator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\BindingListener.cs\">\r\n      <Link>BindingListener.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\Extensions\\ScrollViewerExtensions.cs\">\r\n      <Link>Extensions\\ScrollViewerExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\Extensions\\VisualTreeExtensions.cs\">\r\n      <Link>Extensions\\VisualTreeExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\FlipCounter.xaml.cs\">\r\n      <Link>FlipCounter.xaml.cs</Link>\r\n      <DependentUpon>FlipCounter.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\FlipPanel.xaml.cs\">\r\n      <Link>FlipPanel.xaml.cs</Link>\r\n      <DependentUpon>FlipPanel.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\Helpers\\DependencyPropertyChangedListener.cs\">\r\n      <Link>Helpers\\DependencyPropertyChangedListener.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\Helpers\\DependencyPropertyValueChangedEventArgs.cs\">\r\n      <Link>Helpers\\DependencyPropertyValueChangedEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\HighlightingTextBlock.cs\">\r\n      <Link>HighlightingTextBlock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\IHighlightable.cs\">\r\n      <Link>IHighlightable.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LazyItemsControl.cs\">\r\n      <Link>LazyItemsControl.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LazyListBox.cs\">\r\n      <Link>LazyListBox.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\Common\\MotionParameters.cs\">\r\n      <Link>LongListSelector\\Common\\MotionParameters.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\Common\\SafeRaise.cs\">\r\n      <Link>LongListSelector\\Common\\SafeRaise.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\Common\\TempaltedVisualTreeExtensions.cs\">\r\n      <Link>LongListSelector\\Common\\TempaltedVisualTreeExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\Common\\VisualStates.cs\">\r\n      <Link>LongListSelector\\Common\\VisualStates.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\LongListSelector.cs\">\r\n      <Link>LongListSelector\\LongListSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\LongListSelectorEventArgs.cs\">\r\n      <Link>LongListSelector\\LongListSelectorEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\LongListSelectorGroup.cs\">\r\n      <Link>LongListSelector\\LongListSelectorGroup.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\LongListSelectorItem.cs\">\r\n      <Link>LongListSelector\\LongListSelectorItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\LongListSelectorItemsControl.cs\">\r\n      <Link>LongListSelector\\LongListSelectorItemsControl.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\LongListSelectorItemType.cs\">\r\n      <Link>LongListSelector\\LongListSelectorItemType.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\TemplatedListBox.cs\">\r\n      <Link>LongListSelector\\TemplatedListBox.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\LongListSelector\\TemplatedListBoxItem.cs\">\r\n      <Link>LongListSelector\\TemplatedListBoxItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\MultiTemplateItemsControl.cs\">\r\n      <Link>MultiTemplateItemsControl.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\MultiTemplateLazyListBox.cs\">\r\n      <Link>MultiTemplateLazyListBox.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\Notifications\\DialogService.cs\">\r\n      <Link>Notifications\\DialogService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\Notifications\\PopUp.cs\">\r\n      <Link>Notifications\\PopUp.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\Notifications\\ToastPrompt.cs\">\r\n      <Link>Notifications\\ToastPrompt.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\Profiling\\ApplicationSpace.cs\">\r\n      <Link>Profiling\\ApplicationSpace.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\Profiling\\MemoryCounter.cs\">\r\n      <Link>Profiling\\MemoryCounter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\RangeSlider.cs\">\r\n      <Link>RangeSlider.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\ReorderListBox\\ReorderListBox.cs\">\r\n      <Link>ReorderListBox\\ReorderListBox.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\ReorderListBox\\ReorderListBoxItem.cs\">\r\n      <Link>ReorderListBox\\ReorderListBoxItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\ScrollableTextBlock.cs\">\r\n      <Link>ScrollableTextBlock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\SmoothProgressBar.xaml.cs\">\r\n      <Link>SmoothProgressBar.xaml.cs</Link>\r\n      <DependentUpon>SmoothProgressBar.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\Triggers\\CompressionTrigger.cs\">\r\n      <Link>Triggers\\CompressionTrigger.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\UnreadCounter.xaml.cs\">\r\n      <Link>UnreadCounter.xaml.cs</Link>\r\n      <DependentUpon>UnreadCounter.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\Utils\\Language.cs\">\r\n      <Link>Utils\\Language.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.Controls\\WatermarkTextBox.cs\">\r\n      <Link>WatermarkTextBox.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"Utils\\Currency.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Page Include=\"..\\Telegram.Controls\\FlipCounter.xaml\">\r\n      <Link>FlipCounter.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\Telegram.Controls\\FlipPanel.xaml\">\r\n      <Link>FlipPanel.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\Telegram.Controls\\SmoothProgressBar.xaml\">\r\n      <Link>SmoothProgressBar.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\Telegram.Controls\\Themes\\generic.xaml\">\r\n      <Link>Themes\\generic.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\Telegram.Controls\\UnreadCounter.xaml\">\r\n      <Link>UnreadCounter.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Toolkit.Content\\ApplicationBar.Cancel.png\" />\r\n    <Content Include=\"Toolkit.Content\\ApplicationBar.Check.png\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Coding4Fun.Toolkit.Controls\">\r\n      <HintPath>..\\packages\\Coding4Fun.Toolkit.Controls.2.0.7\\lib\\windowsphone8\\Coding4Fun.Toolkit.Controls.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"LayoutTransformer\">\r\n      <HintPath>..\\Libraries\\LayoutTransformer.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Windows.Interactivity, Version=3.9.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\r\n    <PropertyGroup>\r\n      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>\r\n    </PropertyGroup>\r\n    <Error Condition=\"!Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\\.nuget\\NuGet.targets'))\" />\r\n  </Target>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "Telegram.Controls.WP8/Utils/Currency.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace Telegram.Controls.Utils\r\n{\r\n    public static class Currency\r\n    {\r\n        public static int GetPow(string currency)\r\n        {\r\n            if (currency == \"CLF\")\r\n            {\r\n                return 4;\r\n            }\r\n\r\n            string[] cur3 =\r\n            {\r\n                \"BHD\", \"IQD\", \"JOD\", \"KWD\", \"LYD\", \"OMR\", \"TND\"\r\n            };\r\n            if (cur3.Contains(currency))\r\n            {\r\n                return 3;\r\n            }\r\n\r\n            string[] cur0 =\r\n            {\r\n                \"BIF\", \"BYR\", \"CLP\", \"CVE\", \"DJF\", \"GNF\", \"ISK\", \"JPY\", \"KMF\", \"KRW\", \"MGA\", \"PYG\", \"RWF\", \"UGX\", \"UYI\", \"VND\", \"VUV\", \"XAF\", \"XOF\", \"XPF\"\r\n            };\r\n            if (cur0.Contains(currency)) \r\n            {\r\n                return 0;\r\n            }\r\n\r\n            if (currency == \"MRO\") \r\n            {\r\n                return 1;\r\n            }\r\n\r\n            return 2;\r\n        }\r\n\r\n        private static Dictionary<string, string> _dict = new Dictionary<string, string>\r\n            {\r\n                {\"AED\", \"د.إ\"},\r\n                {\"AFN\", \"؋\"},\r\n                {\"ARS\", \"$\"},\r\n                {\"AUD\", \"$\"},\r\n                {\"AZN\", \"₼\"},\r\n                {\"BND\", \"B$\"},\r\n                {\"BRL\", \"R$\"},\r\n                {\"CAD\", \"$\"},\r\n                {\"CHF\", \"Fr\"},\r\n                {\"CLP\", \"$\"},\r\n                {\"CNY\", \"¥\"},\r\n                {\"COP\", \"$\"},\r\n                {\"EGP\", \"E£\"},\r\n                {\"EUR\", \"€\"},\r\n                {\"GBP\", \"£\"},\r\n                {\"HKD\", \"$\"},\r\n                {\"IDR\", \"Rp\"},\r\n                {\"ILS\", \"₪\"},\r\n                {\"INR\", \"₹\"},\r\n                {\"ISK\", \"kr\"},\r\n                {\"JPY\", \"¥\"},\r\n                {\"KRW\", \"₩\"},\r\n                {\"KZT\", \"₸\"},\r\n                {\"MXN\", \"$\"},\r\n                {\"MYR\", \"RM\"},\r\n                {\"NOK\", \"kr\"},\r\n                {\"NZD\", \"$\"},\r\n                {\"PHP\", \"₱\"},\r\n                {\"RUB\", \"₽\"},\r\n                {\"SAR\", \"SR\"},\r\n                {\"SEK\", \"kr\"},\r\n                {\"SGD\", \"$\"},\r\n                {\"TRY\", \"₺\"},\r\n                {\"TTD\", \"$\"},\r\n                {\"TWD\", \"$\"},\r\n                {\"TZS\", \"TSh\"},\r\n                {\"UAH\", \"₴\"},\r\n                {\"UGX\", \"USh\"},\r\n                {\"USD\", \"$\"},\r\n                {\"UYU\", \"$\"},\r\n                {\"VND\", \"₫\"},\r\n                {\"YER\", \"﷼\"},\r\n                {\"ZAR\", \"R\"},\r\n                {\"IRR\", \"﷼\"},\r\n                {\"IQD\", \"ع.د\"},\r\n                {\"VEF\", \"Bs.F.\"}\r\n            };\r\n\r\n        public static string GetSymbol(string currency)\r\n        {\r\n            string symbol;\r\n            if (_dict.TryGetValue(currency, out symbol))\r\n            {\r\n                return symbol;\r\n            }\r\n\r\n            return currency;\r\n        }\r\n\r\n        public static string GetString(long totalAmount, string currency)\r\n        {\r\n            return string.Format(\"{0:0.00} {1}\", totalAmount / Math.Pow(10.0, GetPow(currency)), GetSymbol(currency));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.Controls.WP8/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Coding4Fun.Toolkit.Controls\" version=\"2.0.7\" targetFramework=\"wp80\" />\r\n</packages>"
  },
  {
    "path": "Telegram.EmojiPanel/BrowserNavigationService.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Text;\r\nusing System.Text.RegularExpressions;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\n\r\nnamespace Telegram.EmojiPanel\r\n{\r\n\r\n    public static class Emoji\r\n    {\r\n        private static Dictionary<string, string> _dict;\r\n\r\n        public static Dictionary<string, string> Dict\r\n        {\r\n            get\r\n            {\r\n                if (_dict == null)\r\n                {\r\n                    _dict = new Dictionary<string, string>();\r\n\r\n                    InitializeDict();\r\n                }\r\n\r\n                return _dict;\r\n            }\r\n        }\r\n\r\n        private static void InitializeDict()\r\n        {\r\n            _dict[\"002320E3\"] = \"002320E3\";\r\n            _dict[\"003020E3\"] = \"003020E3\";\r\n            _dict[\"003120E3\"] = \"003120E3\";\r\n            _dict[\"003220E3\"] = \"003220E3\";\r\n            _dict[\"003320E3\"] = \"003320E3\";\r\n            _dict[\"003420E3\"] = \"003420E3\";\r\n            _dict[\"003520E3\"] = \"003520E3\";\r\n            _dict[\"003620E3\"] = \"003620E3\";\r\n            _dict[\"003720E3\"] = \"003720E3\";\r\n            _dict[\"003820E3\"] = \"003820E3\";\r\n            _dict[\"003920E3\"] = \"003920E3\";\r\n            _dict[\"00A9\"] = \"00A9\";\r\n            _dict[\"00AE\"] = \"00AE\";\r\n            _dict[\"203C\"] = \"203C\";\r\n            _dict[\"2049\"] = \"2049\";\r\n            _dict[\"2122\"] = \"2122\";\r\n            _dict[\"2139\"] = \"2139\";\r\n            _dict[\"2194\"] = \"2194\";\r\n            _dict[\"2195\"] = \"2195\";\r\n            _dict[\"2196\"] = \"2196\";\r\n            _dict[\"2197\"] = \"2197\";\r\n            _dict[\"2198\"] = \"2198\";\r\n            _dict[\"2199\"] = \"2199\";\r\n            _dict[\"21A9\"] = \"21A9\";\r\n            _dict[\"21AA\"] = \"21AA\";\r\n            _dict[\"231A\"] = \"231A\";\r\n            _dict[\"231B\"] = \"231B\";\r\n            _dict[\"23E9\"] = \"23E9\";\r\n            _dict[\"23EA\"] = \"23EA\";\r\n            _dict[\"23EB\"] = \"23EB\";\r\n            _dict[\"23EC\"] = \"23EC\";\r\n            _dict[\"23F0\"] = \"23F0\";\r\n            _dict[\"23F3\"] = \"23F3\";\r\n            _dict[\"24C2\"] = \"24C2\";\r\n            _dict[\"25AA\"] = \"25AA\";\r\n            _dict[\"25AB\"] = \"25AB\";\r\n            _dict[\"25B6\"] = \"25B6\";\r\n            _dict[\"25C0\"] = \"25C0\";\r\n            _dict[\"25FB\"] = \"25FB\";\r\n            _dict[\"25FC\"] = \"25FC\";\r\n            _dict[\"25FD\"] = \"25FD\";\r\n            _dict[\"25FE\"] = \"25FE\";\r\n            _dict[\"2600\"] = \"2600\";\r\n            _dict[\"2601\"] = \"2601\";\r\n            _dict[\"260E\"] = \"260E\";\r\n            _dict[\"2611\"] = \"2611\";\r\n            _dict[\"2614\"] = \"2614\";\r\n            _dict[\"2615\"] = \"2615\";\r\n            _dict[\"261D\"] = \"261D\";\r\n            _dict[\"263A\"] = \"263A\";\r\n            _dict[\"2648\"] = \"2648\";\r\n            _dict[\"2649\"] = \"2649\";\r\n            _dict[\"264A\"] = \"264A\";\r\n            _dict[\"264B\"] = \"264B\";\r\n            _dict[\"264C\"] = \"264C\";\r\n            _dict[\"264D\"] = \"264D\";\r\n            _dict[\"264E\"] = \"264E\";\r\n            _dict[\"264F\"] = \"264F\";\r\n            _dict[\"2650\"] = \"2650\";\r\n            _dict[\"2651\"] = \"2651\";\r\n            _dict[\"2652\"] = \"2652\";\r\n            _dict[\"2653\"] = \"2653\";\r\n            _dict[\"2660\"] = \"2660\";\r\n            _dict[\"2663\"] = \"2663\";\r\n            _dict[\"2665\"] = \"2665\";\r\n            _dict[\"2666\"] = \"2666\";\r\n            _dict[\"2668\"] = \"2668\";\r\n            _dict[\"267B\"] = \"267B\";\r\n            _dict[\"267F\"] = \"267F\";\r\n            _dict[\"2693\"] = \"2693\";\r\n            _dict[\"26A0\"] = \"26A0\";\r\n            _dict[\"26A1\"] = \"26A1\";\r\n            _dict[\"26AA\"] = \"26AA\";\r\n            _dict[\"26AB\"] = \"26AB\";\r\n            _dict[\"26BD\"] = \"26BD\";\r\n            _dict[\"26BE\"] = \"26BE\";\r\n            _dict[\"26C4\"] = \"26C4\";\r\n            _dict[\"26C5\"] = \"26C5\";\r\n            _dict[\"26CE\"] = \"26CE\";\r\n            _dict[\"26D4\"] = \"26D4\";\r\n            _dict[\"26EA\"] = \"26EA\";\r\n            _dict[\"26F2\"] = \"26F2\";\r\n            _dict[\"26F3\"] = \"26F3\";\r\n            _dict[\"26F5\"] = \"26F5\";\r\n            _dict[\"26FA\"] = \"26FA\";\r\n            _dict[\"26FD\"] = \"26FD\";\r\n            _dict[\"2702\"] = \"2702\";\r\n            _dict[\"2705\"] = \"2705\";\r\n            _dict[\"2708\"] = \"2708\";\r\n            _dict[\"2709\"] = \"2709\";\r\n            _dict[\"270A\"] = \"270A\";\r\n            _dict[\"270B\"] = \"270B\";\r\n            _dict[\"270C\"] = \"270C\";\r\n            _dict[\"270F\"] = \"270F\";\r\n            _dict[\"2712\"] = \"2712\";\r\n            _dict[\"2714\"] = \"2714\";\r\n            _dict[\"2716\"] = \"2716\";\r\n            _dict[\"2728\"] = \"2728\";\r\n            _dict[\"2733\"] = \"2733\";\r\n            _dict[\"2734\"] = \"2734\";\r\n            _dict[\"2744\"] = \"2744\";\r\n            _dict[\"2747\"] = \"2747\";\r\n            _dict[\"274C\"] = \"274C\";\r\n            _dict[\"274E\"] = \"274E\";\r\n            _dict[\"2753\"] = \"2753\";\r\n            _dict[\"2754\"] = \"2754\";\r\n            _dict[\"2755\"] = \"2755\";\r\n            _dict[\"2757\"] = \"2757\";\r\n            _dict[\"2764\"] = \"2764\";\r\n            _dict[\"2795\"] = \"2795\";\r\n            _dict[\"2796\"] = \"2796\";\r\n            _dict[\"2797\"] = \"2797\";\r\n            _dict[\"27A1\"] = \"27A1\";\r\n            _dict[\"27B0\"] = \"27B0\";\r\n            _dict[\"27BF\"] = \"27BF\";\r\n            _dict[\"2934\"] = \"2934\";\r\n            _dict[\"2935\"] = \"2935\";\r\n            _dict[\"2B05\"] = \"2B05\";\r\n            _dict[\"2B06\"] = \"2B06\";\r\n            _dict[\"2B07\"] = \"2B07\";\r\n            _dict[\"2B1B\"] = \"2B1B\";\r\n            _dict[\"2B1C\"] = \"2B1C\";\r\n            _dict[\"2B50\"] = \"2B50\";\r\n            _dict[\"2B55\"] = \"2B55\";\r\n            _dict[\"3030\"] = \"3030\";\r\n            _dict[\"303D\"] = \"303D\";\r\n            _dict[\"3297\"] = \"3297\";\r\n            _dict[\"3299\"] = \"3299\";\r\n            _dict[\"D83CDC04\"] = \"D83CDC04\";\r\n            _dict[\"D83CDCCF\"] = \"D83CDCCF\";\r\n            _dict[\"D83CDD70\"] = \"D83CDD70\";\r\n            _dict[\"D83CDD71\"] = \"D83CDD71\";\r\n            _dict[\"D83CDD7E\"] = \"D83CDD7E\";\r\n            _dict[\"D83CDD7F\"] = \"D83CDD7F\";\r\n            _dict[\"D83CDD8E\"] = \"D83CDD8E\";\r\n            _dict[\"D83CDD91\"] = \"D83CDD91\";\r\n            _dict[\"D83CDD92\"] = \"D83CDD92\";\r\n            _dict[\"D83CDD93\"] = \"D83CDD93\";\r\n            _dict[\"D83CDD94\"] = \"D83CDD94\";\r\n            _dict[\"D83CDD95\"] = \"D83CDD95\";\r\n            _dict[\"D83CDD96\"] = \"D83CDD96\";\r\n            _dict[\"D83CDD97\"] = \"D83CDD97\";\r\n            _dict[\"D83CDD98\"] = \"D83CDD98\";\r\n            _dict[\"D83CDD99\"] = \"D83CDD99\";\r\n            _dict[\"D83CDD9A\"] = \"D83CDD9A\";\r\n            _dict[\"D83CDDE8D83CDDF3\"] = \"D83CDDE8D83CDDF3\";\r\n            _dict[\"D83CDDE9D83CDDEA\"] = \"D83CDDE9D83CDDEA\";\r\n            _dict[\"D83CDDEAD83CDDF8\"] = \"D83CDDEAD83CDDF8\";\r\n            _dict[\"D83CDDEBD83CDDF7\"] = \"D83CDDEBD83CDDF7\";\r\n            _dict[\"D83CDDECD83CDDE7\"] = \"D83CDDECD83CDDE7\";\r\n            _dict[\"D83CDDEED83CDDF9\"] = \"D83CDDEED83CDDF9\";\r\n            _dict[\"D83CDDEFD83CDDF5\"] = \"D83CDDEFD83CDDF5\";\r\n            _dict[\"D83CDDF0D83CDDF7\"] = \"D83CDDF0D83CDDF7\";\r\n            _dict[\"D83CDDF7D83CDDFA\"] = \"D83CDDF7D83CDDFA\";\r\n            _dict[\"D83CDDFAD83CDDF8\"] = \"D83CDDFAD83CDDF8\";\r\n            _dict[\"D83CDE01\"] = \"D83CDE01\";\r\n            _dict[\"D83CDE02\"] = \"D83CDE02\";\r\n            _dict[\"D83CDE1A\"] = \"D83CDE1A\";\r\n            _dict[\"D83CDE2F\"] = \"D83CDE2F\";\r\n            _dict[\"D83CDE32\"] = \"D83CDE32\";\r\n            _dict[\"D83CDE33\"] = \"D83CDE33\";\r\n            _dict[\"D83CDE34\"] = \"D83CDE34\";\r\n            _dict[\"D83CDE35\"] = \"D83CDE35\";\r\n            _dict[\"D83CDE36\"] = \"D83CDE36\";\r\n            _dict[\"D83CDE37\"] = \"D83CDE37\";\r\n            _dict[\"D83CDE38\"] = \"D83CDE38\";\r\n            _dict[\"D83CDE39\"] = \"D83CDE39\";\r\n            _dict[\"D83CDE3A\"] = \"D83CDE3A\";\r\n            _dict[\"D83CDE50\"] = \"D83CDE50\";\r\n            _dict[\"D83CDE51\"] = \"D83CDE51\";\r\n            _dict[\"D83CDF00\"] = \"D83CDF00\";\r\n            _dict[\"D83CDF01\"] = \"D83CDF01\";\r\n            _dict[\"D83CDF02\"] = \"D83CDF02\";\r\n            _dict[\"D83CDF03\"] = \"D83CDF03\";\r\n            _dict[\"D83CDF04\"] = \"D83CDF04\";\r\n            _dict[\"D83CDF05\"] = \"D83CDF05\";\r\n            _dict[\"D83CDF06\"] = \"D83CDF06\";\r\n            _dict[\"D83CDF07\"] = \"D83CDF07\";\r\n            _dict[\"D83CDF08\"] = \"D83CDF08\";\r\n            _dict[\"D83CDF09\"] = \"D83CDF09\";\r\n            _dict[\"D83CDF0A\"] = \"D83CDF0A\";\r\n            _dict[\"D83CDF0B\"] = \"D83CDF0B\";\r\n            _dict[\"D83CDF0C\"] = \"D83CDF0C\";\r\n            _dict[\"D83CDF0D\"] = \"D83CDF0D\";\r\n            _dict[\"D83CDF0E\"] = \"D83CDF0E\";\r\n            _dict[\"D83CDF0F\"] = \"D83CDF0F\";\r\n            _dict[\"D83CDF10\"] = \"D83CDF10\";\r\n            _dict[\"D83CDF11\"] = \"D83CDF11\";\r\n            _dict[\"D83CDF12\"] = \"D83CDF12\";\r\n            _dict[\"D83CDF13\"] = \"D83CDF13\";\r\n            _dict[\"D83CDF14\"] = \"D83CDF14\";\r\n            _dict[\"D83CDF15\"] = \"D83CDF15\";\r\n            _dict[\"D83CDF16\"] = \"D83CDF16\";\r\n            _dict[\"D83CDF17\"] = \"D83CDF17\";\r\n            _dict[\"D83CDF18\"] = \"D83CDF18\";\r\n            _dict[\"D83CDF19\"] = \"D83CDF19\";\r\n            _dict[\"D83CDF1A\"] = \"D83CDF1A\";\r\n            _dict[\"D83CDF1B\"] = \"D83CDF1B\";\r\n            _dict[\"D83CDF1C\"] = \"D83CDF1C\";\r\n            _dict[\"D83CDF1D\"] = \"D83CDF1D\";\r\n            _dict[\"D83CDF1E\"] = \"D83CDF1E\";\r\n            _dict[\"D83CDF1F\"] = \"D83CDF1F\";\r\n            _dict[\"D83CDF20\"] = \"D83CDF20\";\r\n            _dict[\"D83CDF30\"] = \"D83CDF30\";\r\n            _dict[\"D83CDF31\"] = \"D83CDF31\";\r\n            _dict[\"D83CDF32\"] = \"D83CDF32\";\r\n            _dict[\"D83CDF33\"] = \"D83CDF33\";\r\n            _dict[\"D83CDF34\"] = \"D83CDF34\";\r\n            _dict[\"D83CDF35\"] = \"D83CDF35\";\r\n            _dict[\"D83CDF37\"] = \"D83CDF37\";\r\n            _dict[\"D83CDF38\"] = \"D83CDF38\";\r\n            _dict[\"D83CDF39\"] = \"D83CDF39\";\r\n            _dict[\"D83CDF3A\"] = \"D83CDF3A\";\r\n            _dict[\"D83CDF3B\"] = \"D83CDF3B\";\r\n            _dict[\"D83CDF3C\"] = \"D83CDF3C\";\r\n            _dict[\"D83CDF3D\"] = \"D83CDF3D\";\r\n            _dict[\"D83CDF3E\"] = \"D83CDF3E\";\r\n            _dict[\"D83CDF3F\"] = \"D83CDF3F\";\r\n            _dict[\"D83CDF40\"] = \"D83CDF40\";\r\n            _dict[\"D83CDF41\"] = \"D83CDF41\";\r\n            _dict[\"D83CDF42\"] = \"D83CDF42\";\r\n            _dict[\"D83CDF43\"] = \"D83CDF43\";\r\n            _dict[\"D83CDF44\"] = \"D83CDF44\";\r\n            _dict[\"D83CDF45\"] = \"D83CDF45\";\r\n            _dict[\"D83CDF46\"] = \"D83CDF46\";\r\n            _dict[\"D83CDF47\"] = \"D83CDF47\";\r\n            _dict[\"D83CDF48\"] = \"D83CDF48\";\r\n            _dict[\"D83CDF49\"] = \"D83CDF49\";\r\n            _dict[\"D83CDF4A\"] = \"D83CDF4A\";\r\n            _dict[\"D83CDF4B\"] = \"D83CDF4B\";\r\n            _dict[\"D83CDF4C\"] = \"D83CDF4C\";\r\n            _dict[\"D83CDF4D\"] = \"D83CDF4D\";\r\n            _dict[\"D83CDF4E\"] = \"D83CDF4E\";\r\n            _dict[\"D83CDF4F\"] = \"D83CDF4F\";\r\n            _dict[\"D83CDF50\"] = \"D83CDF50\";\r\n            _dict[\"D83CDF51\"] = \"D83CDF51\";\r\n            _dict[\"D83CDF52\"] = \"D83CDF52\";\r\n            _dict[\"D83CDF53\"] = \"D83CDF53\";\r\n            _dict[\"D83CDF54\"] = \"D83CDF54\";\r\n            _dict[\"D83CDF55\"] = \"D83CDF55\";\r\n            _dict[\"D83CDF56\"] = \"D83CDF56\";\r\n            _dict[\"D83CDF57\"] = \"D83CDF57\";\r\n            _dict[\"D83CDF58\"] = \"D83CDF58\";\r\n            _dict[\"D83CDF59\"] = \"D83CDF59\";\r\n            _dict[\"D83CDF5A\"] = \"D83CDF5A\";\r\n            _dict[\"D83CDF5B\"] = \"D83CDF5B\";\r\n            _dict[\"D83CDF5C\"] = \"D83CDF5C\";\r\n            _dict[\"D83CDF5D\"] = \"D83CDF5D\";\r\n            _dict[\"D83CDF5E\"] = \"D83CDF5E\";\r\n            _dict[\"D83CDF5F\"] = \"D83CDF5F\";\r\n            _dict[\"D83CDF60\"] = \"D83CDF60\";\r\n            _dict[\"D83CDF61\"] = \"D83CDF61\";\r\n            _dict[\"D83CDF62\"] = \"D83CDF62\";\r\n            _dict[\"D83CDF63\"] = \"D83CDF63\";\r\n            _dict[\"D83CDF64\"] = \"D83CDF64\";\r\n            _dict[\"D83CDF65\"] = \"D83CDF65\";\r\n            _dict[\"D83CDF66\"] = \"D83CDF66\";\r\n            _dict[\"D83CDF67\"] = \"D83CDF67\";\r\n            _dict[\"D83CDF68\"] = \"D83CDF68\";\r\n            _dict[\"D83CDF69\"] = \"D83CDF69\";\r\n            _dict[\"D83CDF6A\"] = \"D83CDF6A\";\r\n            _dict[\"D83CDF6B\"] = \"D83CDF6B\";\r\n            _dict[\"D83CDF6C\"] = \"D83CDF6C\";\r\n            _dict[\"D83CDF6D\"] = \"D83CDF6D\";\r\n            _dict[\"D83CDF6E\"] = \"D83CDF6E\";\r\n            _dict[\"D83CDF6F\"] = \"D83CDF6F\";\r\n            _dict[\"D83CDF70\"] = \"D83CDF70\";\r\n            _dict[\"D83CDF71\"] = \"D83CDF71\";\r\n            _dict[\"D83CDF72\"] = \"D83CDF72\";\r\n            _dict[\"D83CDF73\"] = \"D83CDF73\";\r\n            _dict[\"D83CDF74\"] = \"D83CDF74\";\r\n            _dict[\"D83CDF75\"] = \"D83CDF75\";\r\n            _dict[\"D83CDF76\"] = \"D83CDF76\";\r\n            _dict[\"D83CDF77\"] = \"D83CDF77\";\r\n            _dict[\"D83CDF78\"] = \"D83CDF78\";\r\n            _dict[\"D83CDF79\"] = \"D83CDF79\";\r\n            _dict[\"D83CDF7A\"] = \"D83CDF7A\";\r\n            _dict[\"D83CDF7B\"] = \"D83CDF7B\";\r\n            _dict[\"D83CDF7C\"] = \"D83CDF7C\";\r\n            _dict[\"D83CDF80\"] = \"D83CDF80\";\r\n            _dict[\"D83CDF81\"] = \"D83CDF81\";\r\n            _dict[\"D83CDF82\"] = \"D83CDF82\";\r\n            _dict[\"D83CDF83\"] = \"D83CDF83\";\r\n            _dict[\"D83CDF84\"] = \"D83CDF84\";\r\n            _dict[\"D83CDF85\"] = \"D83CDF85\";\r\n            _dict[\"D83CDF86\"] = \"D83CDF86\";\r\n            _dict[\"D83CDF87\"] = \"D83CDF87\";\r\n            _dict[\"D83CDF88\"] = \"D83CDF88\";\r\n            _dict[\"D83CDF89\"] = \"D83CDF89\";\r\n            _dict[\"D83CDF8A\"] = \"D83CDF8A\";\r\n            _dict[\"D83CDF8B\"] = \"D83CDF8B\";\r\n            _dict[\"D83CDF8C\"] = \"D83CDF8C\";\r\n            _dict[\"D83CDF8D\"] = \"D83CDF8D\";\r\n            _dict[\"D83CDF8E\"] = \"D83CDF8E\";\r\n            _dict[\"D83CDF8F\"] = \"D83CDF8F\";\r\n            _dict[\"D83CDF90\"] = \"D83CDF90\";\r\n            _dict[\"D83CDF91\"] = \"D83CDF91\";\r\n            _dict[\"D83CDF92\"] = \"D83CDF92\";\r\n            _dict[\"D83CDF93\"] = \"D83CDF93\";\r\n            _dict[\"D83CDFA0\"] = \"D83CDFA0\";\r\n            _dict[\"D83CDFA1\"] = \"D83CDFA1\";\r\n            _dict[\"D83CDFA2\"] = \"D83CDFA2\";\r\n            _dict[\"D83CDFA3\"] = \"D83CDFA3\";\r\n            _dict[\"D83CDFA4\"] = \"D83CDFA4\";\r\n            _dict[\"D83CDFA5\"] = \"D83CDFA5\";\r\n            _dict[\"D83CDFA6\"] = \"D83CDFA6\";\r\n            _dict[\"D83CDFA7\"] = \"D83CDFA7\";\r\n            _dict[\"D83CDFA8\"] = \"D83CDFA8\";\r\n            _dict[\"D83CDFA9\"] = \"D83CDFA9\";\r\n            _dict[\"D83CDFAA\"] = \"D83CDFAA\";\r\n            _dict[\"D83CDFAB\"] = \"D83CDFAB\";\r\n            _dict[\"D83CDFAC\"] = \"D83CDFAC\";\r\n            _dict[\"D83CDFAD\"] = \"D83CDFAD\";\r\n            _dict[\"D83CDFAE\"] = \"D83CDFAE\";\r\n            _dict[\"D83CDFAF\"] = \"D83CDFAF\";\r\n            _dict[\"D83CDFB0\"] = \"D83CDFB0\";\r\n            _dict[\"D83CDFB1\"] = \"D83CDFB1\";\r\n            _dict[\"D83CDFB2\"] = \"D83CDFB2\";\r\n            _dict[\"D83CDFB3\"] = \"D83CDFB3\";\r\n            _dict[\"D83CDFB4\"] = \"D83CDFB4\";\r\n            _dict[\"D83CDFB5\"] = \"D83CDFB5\";\r\n            _dict[\"D83CDFB6\"] = \"D83CDFB6\";\r\n            _dict[\"D83CDFB7\"] = \"D83CDFB7\";\r\n            _dict[\"D83CDFB8\"] = \"D83CDFB8\";\r\n            _dict[\"D83CDFB9\"] = \"D83CDFB9\";\r\n            _dict[\"D83CDFBA\"] = \"D83CDFBA\";\r\n            _dict[\"D83CDFBB\"] = \"D83CDFBB\";\r\n            _dict[\"D83CDFBC\"] = \"D83CDFBC\";\r\n            _dict[\"D83CDFBD\"] = \"D83CDFBD\";\r\n            _dict[\"D83CDFBE\"] = \"D83CDFBE\";\r\n            _dict[\"D83CDFBF\"] = \"D83CDFBF\";\r\n            _dict[\"D83CDFC0\"] = \"D83CDFC0\";\r\n            _dict[\"D83CDFC1\"] = \"D83CDFC1\";\r\n            _dict[\"D83CDFC2\"] = \"D83CDFC2\";\r\n            _dict[\"D83CDFC3\"] = \"D83CDFC3\";\r\n            _dict[\"D83CDFC4\"] = \"D83CDFC4\";\r\n            _dict[\"D83CDFC6\"] = \"D83CDFC6\";\r\n            _dict[\"D83CDFC7\"] = \"D83CDFC7\";\r\n            _dict[\"D83CDFC8\"] = \"D83CDFC8\";\r\n            _dict[\"D83CDFC9\"] = \"D83CDFC9\";\r\n            _dict[\"D83CDFCA\"] = \"D83CDFCA\";\r\n            _dict[\"D83CDFE0\"] = \"D83CDFE0\";\r\n            _dict[\"D83CDFE1\"] = \"D83CDFE1\";\r\n            _dict[\"D83CDFE2\"] = \"D83CDFE2\";\r\n            _dict[\"D83CDFE3\"] = \"D83CDFE3\";\r\n            _dict[\"D83CDFE4\"] = \"D83CDFE4\";\r\n            _dict[\"D83CDFE5\"] = \"D83CDFE5\";\r\n            _dict[\"D83CDFE6\"] = \"D83CDFE6\";\r\n            _dict[\"D83CDFE7\"] = \"D83CDFE7\";\r\n            _dict[\"D83CDFE8\"] = \"D83CDFE8\";\r\n            _dict[\"D83CDFE9\"] = \"D83CDFE9\";\r\n            _dict[\"D83CDFEA\"] = \"D83CDFEA\";\r\n            _dict[\"D83CDFEB\"] = \"D83CDFEB\";\r\n            _dict[\"D83CDFEC\"] = \"D83CDFEC\";\r\n            _dict[\"D83CDFED\"] = \"D83CDFED\";\r\n            _dict[\"D83CDFEE\"] = \"D83CDFEE\";\r\n            _dict[\"D83CDFEF\"] = \"D83CDFEF\";\r\n            _dict[\"D83CDFF0\"] = \"D83CDFF0\";\r\n            _dict[\"D83DDC00\"] = \"D83DDC00\";\r\n            _dict[\"D83DDC01\"] = \"D83DDC01\";\r\n            _dict[\"D83DDC02\"] = \"D83DDC02\";\r\n            _dict[\"D83DDC03\"] = \"D83DDC03\";\r\n            _dict[\"D83DDC04\"] = \"D83DDC04\";\r\n            _dict[\"D83DDC05\"] = \"D83DDC05\";\r\n            _dict[\"D83DDC06\"] = \"D83DDC06\";\r\n            _dict[\"D83DDC07\"] = \"D83DDC07\";\r\n            _dict[\"D83DDC08\"] = \"D83DDC08\";\r\n            _dict[\"D83DDC09\"] = \"D83DDC09\";\r\n            _dict[\"D83DDC0A\"] = \"D83DDC0A\";\r\n            _dict[\"D83DDC0B\"] = \"D83DDC0B\";\r\n            _dict[\"D83DDC0C\"] = \"D83DDC0C\";\r\n            _dict[\"D83DDC0D\"] = \"D83DDC0D\";\r\n            _dict[\"D83DDC0E\"] = \"D83DDC0E\";\r\n            _dict[\"D83DDC0F\"] = \"D83DDC0F\";\r\n            _dict[\"D83DDC10\"] = \"D83DDC10\";\r\n            _dict[\"D83DDC11\"] = \"D83DDC11\";\r\n            _dict[\"D83DDC12\"] = \"D83DDC12\";\r\n            _dict[\"D83DDC13\"] = \"D83DDC13\";\r\n            _dict[\"D83DDC14\"] = \"D83DDC14\";\r\n            _dict[\"D83DDC15\"] = \"D83DDC15\";\r\n            _dict[\"D83DDC16\"] = \"D83DDC16\";\r\n            _dict[\"D83DDC17\"] = \"D83DDC17\";\r\n            _dict[\"D83DDC18\"] = \"D83DDC18\";\r\n            _dict[\"D83DDC19\"] = \"D83DDC19\";\r\n            _dict[\"D83DDC1A\"] = \"D83DDC1A\";\r\n            _dict[\"D83DDC1B\"] = \"D83DDC1B\";\r\n            _dict[\"D83DDC1C\"] = \"D83DDC1C\";\r\n            _dict[\"D83DDC1D\"] = \"D83DDC1D\";\r\n            _dict[\"D83DDC1E\"] = \"D83DDC1E\";\r\n            _dict[\"D83DDC1F\"] = \"D83DDC1F\";\r\n            _dict[\"D83DDC20\"] = \"D83DDC20\";\r\n            _dict[\"D83DDC21\"] = \"D83DDC21\";\r\n            _dict[\"D83DDC22\"] = \"D83DDC22\";\r\n            _dict[\"D83DDC23\"] = \"D83DDC23\";\r\n            _dict[\"D83DDC24\"] = \"D83DDC24\";\r\n            _dict[\"D83DDC25\"] = \"D83DDC25\";\r\n            _dict[\"D83DDC26\"] = \"D83DDC26\";\r\n            _dict[\"D83DDC27\"] = \"D83DDC27\";\r\n            _dict[\"D83DDC28\"] = \"D83DDC28\";\r\n            _dict[\"D83DDC29\"] = \"D83DDC29\";\r\n            _dict[\"D83DDC2A\"] = \"D83DDC2A\";\r\n            _dict[\"D83DDC2B\"] = \"D83DDC2B\";\r\n            _dict[\"D83DDC2C\"] = \"D83DDC2C\";\r\n            _dict[\"D83DDC2D\"] = \"D83DDC2D\";\r\n            _dict[\"D83DDC2E\"] = \"D83DDC2E\";\r\n            _dict[\"D83DDC2F\"] = \"D83DDC2F\";\r\n            _dict[\"D83DDC30\"] = \"D83DDC30\";\r\n            _dict[\"D83DDC31\"] = \"D83DDC31\";\r\n            _dict[\"D83DDC32\"] = \"D83DDC32\";\r\n            _dict[\"D83DDC33\"] = \"D83DDC33\";\r\n            _dict[\"D83DDC34\"] = \"D83DDC34\";\r\n            _dict[\"D83DDC35\"] = \"D83DDC35\";\r\n            _dict[\"D83DDC36\"] = \"D83DDC36\";\r\n            _dict[\"D83DDC37\"] = \"D83DDC37\";\r\n            _dict[\"D83DDC38\"] = \"D83DDC38\";\r\n            _dict[\"D83DDC39\"] = \"D83DDC39\";\r\n            _dict[\"D83DDC3A\"] = \"D83DDC3A\";\r\n            _dict[\"D83DDC3B\"] = \"D83DDC3B\";\r\n            _dict[\"D83DDC3C\"] = \"D83DDC3C\";\r\n            _dict[\"D83DDC3D\"] = \"D83DDC3D\";\r\n            _dict[\"D83DDC3E\"] = \"D83DDC3E\";\r\n            _dict[\"D83DDC40\"] = \"D83DDC40\";\r\n            _dict[\"D83DDC42\"] = \"D83DDC42\";\r\n            _dict[\"D83DDC43\"] = \"D83DDC43\";\r\n            _dict[\"D83DDC44\"] = \"D83DDC44\";\r\n            _dict[\"D83DDC45\"] = \"D83DDC45\";\r\n            _dict[\"D83DDC46\"] = \"D83DDC46\";\r\n            _dict[\"D83DDC47\"] = \"D83DDC47\";\r\n            _dict[\"D83DDC48\"] = \"D83DDC48\";\r\n            _dict[\"D83DDC49\"] = \"D83DDC49\";\r\n            _dict[\"D83DDC4A\"] = \"D83DDC4A\";\r\n            _dict[\"D83DDC4B\"] = \"D83DDC4B\";\r\n            _dict[\"D83DDC4C\"] = \"D83DDC4C\";\r\n            _dict[\"D83DDC4D\"] = \"D83DDC4D\";\r\n            _dict[\"D83DDC4E\"] = \"D83DDC4E\";\r\n            _dict[\"D83DDC4F\"] = \"D83DDC4F\";\r\n            _dict[\"D83DDC50\"] = \"D83DDC50\";\r\n            _dict[\"D83DDC51\"] = \"D83DDC51\";\r\n            _dict[\"D83DDC52\"] = \"D83DDC52\";\r\n            _dict[\"D83DDC53\"] = \"D83DDC53\";\r\n            _dict[\"D83DDC54\"] = \"D83DDC54\";\r\n            _dict[\"D83DDC55\"] = \"D83DDC55\";\r\n            _dict[\"D83DDC56\"] = \"D83DDC56\";\r\n            _dict[\"D83DDC57\"] = \"D83DDC57\";\r\n            _dict[\"D83DDC58\"] = \"D83DDC58\";\r\n            _dict[\"D83DDC59\"] = \"D83DDC59\";\r\n            _dict[\"D83DDC5A\"] = \"D83DDC5A\";\r\n            _dict[\"D83DDC5B\"] = \"D83DDC5B\";\r\n            _dict[\"D83DDC5C\"] = \"D83DDC5C\";\r\n            _dict[\"D83DDC5D\"] = \"D83DDC5D\";\r\n            _dict[\"D83DDC5E\"] = \"D83DDC5E\";\r\n            _dict[\"D83DDC5F\"] = \"D83DDC5F\";\r\n            _dict[\"D83DDC60\"] = \"D83DDC60\";\r\n            _dict[\"D83DDC61\"] = \"D83DDC61\";\r\n            _dict[\"D83DDC62\"] = \"D83DDC62\";\r\n            _dict[\"D83DDC63\"] = \"D83DDC63\";\r\n            _dict[\"D83DDC64\"] = \"D83DDC64\";\r\n            _dict[\"D83DDC65\"] = \"D83DDC65\";\r\n            _dict[\"D83DDC66\"] = \"D83DDC66\";\r\n            _dict[\"D83DDC67\"] = \"D83DDC67\";\r\n            _dict[\"D83DDC68\"] = \"D83DDC68\";\r\n            _dict[\"D83DDC69\"] = \"D83DDC69\";\r\n            _dict[\"D83DDC6A\"] = \"D83DDC6A\";\r\n            _dict[\"D83DDC6B\"] = \"D83DDC6B\";\r\n            _dict[\"D83DDC6C\"] = \"D83DDC6C\";\r\n            _dict[\"D83DDC6D\"] = \"D83DDC6D\";\r\n            _dict[\"D83DDC6E\"] = \"D83DDC6E\";\r\n            _dict[\"D83DDC6F\"] = \"D83DDC6F\";\r\n            _dict[\"D83DDC70\"] = \"D83DDC70\";\r\n            _dict[\"D83DDC71\"] = \"D83DDC71\";\r\n            _dict[\"D83DDC72\"] = \"D83DDC72\";\r\n            _dict[\"D83DDC73\"] = \"D83DDC73\";\r\n            _dict[\"D83DDC74\"] = \"D83DDC74\";\r\n            _dict[\"D83DDC75\"] = \"D83DDC75\";\r\n            _dict[\"D83DDC76\"] = \"D83DDC76\";\r\n            _dict[\"D83DDC77\"] = \"D83DDC77\";\r\n            _dict[\"D83DDC78\"] = \"D83DDC78\";\r\n            _dict[\"D83DDC79\"] = \"D83DDC79\";\r\n            _dict[\"D83DDC7A\"] = \"D83DDC7A\";\r\n            _dict[\"D83DDC7B\"] = \"D83DDC7B\";\r\n            _dict[\"D83DDC7C\"] = \"D83DDC7C\";\r\n            _dict[\"D83DDC7D\"] = \"D83DDC7D\";\r\n            _dict[\"D83DDC7E\"] = \"D83DDC7E\";\r\n            _dict[\"D83DDC7F\"] = \"D83DDC7F\";\r\n            _dict[\"D83DDC80\"] = \"D83DDC80\";\r\n            _dict[\"D83DDC81\"] = \"D83DDC81\";\r\n            _dict[\"D83DDC82\"] = \"D83DDC82\";\r\n            _dict[\"D83DDC83\"] = \"D83DDC83\";\r\n            _dict[\"D83DDC84\"] = \"D83DDC84\";\r\n            _dict[\"D83DDC85\"] = \"D83DDC85\";\r\n            _dict[\"D83DDC86\"] = \"D83DDC86\";\r\n            _dict[\"D83DDC87\"] = \"D83DDC87\";\r\n            _dict[\"D83DDC88\"] = \"D83DDC88\";\r\n            _dict[\"D83DDC89\"] = \"D83DDC89\";\r\n            _dict[\"D83DDC8A\"] = \"D83DDC8A\";\r\n            _dict[\"D83DDC8B\"] = \"D83DDC8B\";\r\n            _dict[\"D83DDC8C\"] = \"D83DDC8C\";\r\n            _dict[\"D83DDC8D\"] = \"D83DDC8D\";\r\n            _dict[\"D83DDC8E\"] = \"D83DDC8E\";\r\n            _dict[\"D83DDC8F\"] = \"D83DDC8F\";\r\n            _dict[\"D83DDC90\"] = \"D83DDC90\";\r\n            _dict[\"D83DDC91\"] = \"D83DDC91\";\r\n            _dict[\"D83DDC92\"] = \"D83DDC92\";\r\n            _dict[\"D83DDC93\"] = \"D83DDC93\";\r\n            _dict[\"D83DDC94\"] = \"D83DDC94\";\r\n            _dict[\"D83DDC95\"] = \"D83DDC95\";\r\n            _dict[\"D83DDC96\"] = \"D83DDC96\";\r\n            _dict[\"D83DDC97\"] = \"D83DDC97\";\r\n            _dict[\"D83DDC98\"] = \"D83DDC98\";\r\n            _dict[\"D83DDC99\"] = \"D83DDC99\";\r\n            _dict[\"D83DDC9A\"] = \"D83DDC9A\";\r\n            _dict[\"D83DDC9B\"] = \"D83DDC9B\";\r\n            _dict[\"D83DDC9C\"] = \"D83DDC9C\";\r\n            _dict[\"D83DDC9D\"] = \"D83DDC9D\";\r\n            _dict[\"D83DDC9E\"] = \"D83DDC9E\";\r\n            _dict[\"D83DDC9F\"] = \"D83DDC9F\";\r\n            _dict[\"D83DDCA0\"] = \"D83DDCA0\";\r\n            _dict[\"D83DDCA1\"] = \"D83DDCA1\";\r\n            _dict[\"D83DDCA2\"] = \"D83DDCA2\";\r\n            _dict[\"D83DDCA3\"] = \"D83DDCA3\";\r\n            _dict[\"D83DDCA4\"] = \"D83DDCA4\";\r\n            _dict[\"D83DDCA5\"] = \"D83DDCA5\";\r\n            _dict[\"D83DDCA6\"] = \"D83DDCA6\";\r\n            _dict[\"D83DDCA7\"] = \"D83DDCA7\";\r\n            _dict[\"D83DDCA8\"] = \"D83DDCA8\";\r\n            _dict[\"D83DDCA9\"] = \"D83DDCA9\";\r\n            _dict[\"D83DDCAA\"] = \"D83DDCAA\";\r\n            _dict[\"D83DDCAB\"] = \"D83DDCAB\";\r\n            _dict[\"D83DDCAC\"] = \"D83DDCAC\";\r\n            _dict[\"D83DDCAD\"] = \"D83DDCAD\";\r\n            _dict[\"D83DDCAE\"] = \"D83DDCAE\";\r\n            _dict[\"D83DDCAF\"] = \"D83DDCAF\";\r\n            _dict[\"D83DDCB0\"] = \"D83DDCB0\";\r\n            _dict[\"D83DDCB1\"] = \"D83DDCB1\";\r\n            _dict[\"D83DDCB2\"] = \"D83DDCB2\";\r\n            _dict[\"D83DDCB3\"] = \"D83DDCB3\";\r\n            _dict[\"D83DDCB4\"] = \"D83DDCB4\";\r\n            _dict[\"D83DDCB5\"] = \"D83DDCB5\";\r\n            _dict[\"D83DDCB6\"] = \"D83DDCB6\";\r\n            _dict[\"D83DDCB7\"] = \"D83DDCB7\";\r\n            _dict[\"D83DDCB8\"] = \"D83DDCB8\";\r\n            _dict[\"D83DDCB9\"] = \"D83DDCB9\";\r\n            _dict[\"D83DDCBA\"] = \"D83DDCBA\";\r\n            _dict[\"D83DDCBB\"] = \"D83DDCBB\";\r\n            _dict[\"D83DDCBC\"] = \"D83DDCBC\";\r\n            _dict[\"D83DDCBD\"] = \"D83DDCBD\";\r\n            _dict[\"D83DDCBE\"] = \"D83DDCBE\";\r\n            _dict[\"D83DDCBF\"] = \"D83DDCBF\";\r\n            _dict[\"D83DDCC0\"] = \"D83DDCC0\";\r\n            _dict[\"D83DDCC1\"] = \"D83DDCC1\";\r\n            _dict[\"D83DDCC2\"] = \"D83DDCC2\";\r\n            _dict[\"D83DDCC3\"] = \"D83DDCC3\";\r\n            _dict[\"D83DDCC4\"] = \"D83DDCC4\";\r\n            _dict[\"D83DDCC5\"] = \"D83DDCC5\";\r\n            _dict[\"D83DDCC6\"] = \"D83DDCC6\";\r\n            _dict[\"D83DDCC7\"] = \"D83DDCC7\";\r\n            _dict[\"D83DDCC8\"] = \"D83DDCC8\";\r\n            _dict[\"D83DDCC9\"] = \"D83DDCC9\";\r\n            _dict[\"D83DDCCA\"] = \"D83DDCCA\";\r\n            _dict[\"D83DDCCB\"] = \"D83DDCCB\";\r\n            _dict[\"D83DDCCC\"] = \"D83DDCCC\";\r\n            _dict[\"D83DDCCD\"] = \"D83DDCCD\";\r\n            _dict[\"D83DDCCE\"] = \"D83DDCCE\";\r\n            _dict[\"D83DDCCF\"] = \"D83DDCCF\";\r\n            _dict[\"D83DDCD0\"] = \"D83DDCD0\";\r\n            _dict[\"D83DDCD1\"] = \"D83DDCD1\";\r\n            _dict[\"D83DDCD2\"] = \"D83DDCD2\";\r\n            _dict[\"D83DDCD3\"] = \"D83DDCD3\";\r\n            _dict[\"D83DDCD4\"] = \"D83DDCD4\";\r\n            _dict[\"D83DDCD5\"] = \"D83DDCD5\";\r\n            _dict[\"D83DDCD6\"] = \"D83DDCD6\";\r\n            _dict[\"D83DDCD7\"] = \"D83DDCD7\";\r\n            _dict[\"D83DDCD8\"] = \"D83DDCD8\";\r\n            _dict[\"D83DDCD9\"] = \"D83DDCD9\";\r\n            _dict[\"D83DDCDA\"] = \"D83DDCDA\";\r\n            _dict[\"D83DDCDB\"] = \"D83DDCDB\";\r\n            _dict[\"D83DDCDC\"] = \"D83DDCDC\";\r\n            _dict[\"D83DDCDD\"] = \"D83DDCDD\";\r\n            _dict[\"D83DDCDE\"] = \"D83DDCDE\";\r\n            _dict[\"D83DDCDF\"] = \"D83DDCDF\";\r\n            _dict[\"D83DDCE0\"] = \"D83DDCE0\";\r\n            _dict[\"D83DDCE1\"] = \"D83DDCE1\";\r\n            _dict[\"D83DDCE2\"] = \"D83DDCE2\";\r\n            _dict[\"D83DDCE3\"] = \"D83DDCE3\";\r\n            _dict[\"D83DDCE4\"] = \"D83DDCE4\";\r\n            _dict[\"D83DDCE5\"] = \"D83DDCE5\";\r\n            _dict[\"D83DDCE6\"] = \"D83DDCE6\";\r\n            _dict[\"D83DDCE7\"] = \"D83DDCE7\";\r\n            _dict[\"D83DDCE8\"] = \"D83DDCE8\";\r\n            _dict[\"D83DDCE9\"] = \"D83DDCE9\";\r\n            _dict[\"D83DDCEA\"] = \"D83DDCEA\";\r\n            _dict[\"D83DDCEB\"] = \"D83DDCEB\";\r\n            _dict[\"D83DDCEC\"] = \"D83DDCEC\";\r\n            _dict[\"D83DDCED\"] = \"D83DDCED\";\r\n            _dict[\"D83DDCEE\"] = \"D83DDCEE\";\r\n            _dict[\"D83DDCEF\"] = \"D83DDCEF\";\r\n            _dict[\"D83DDCF0\"] = \"D83DDCF0\";\r\n            _dict[\"D83DDCF1\"] = \"D83DDCF1\";\r\n            _dict[\"D83DDCF2\"] = \"D83DDCF2\";\r\n            _dict[\"D83DDCF3\"] = \"D83DDCF3\";\r\n            _dict[\"D83DDCF4\"] = \"D83DDCF4\";\r\n            _dict[\"D83DDCF5\"] = \"D83DDCF5\";\r\n            _dict[\"D83DDCF6\"] = \"D83DDCF6\";\r\n            _dict[\"D83DDCF7\"] = \"D83DDCF7\";\r\n            _dict[\"D83DDCF9\"] = \"D83DDCF9\";\r\n            _dict[\"D83DDCFA\"] = \"D83DDCFA\";\r\n            _dict[\"D83DDCFB\"] = \"D83DDCFB\";\r\n            _dict[\"D83DDCFC\"] = \"D83DDCFC\";\r\n            _dict[\"D83DDD00\"] = \"D83DDD00\";\r\n            _dict[\"D83DDD01\"] = \"D83DDD01\";\r\n            _dict[\"D83DDD02\"] = \"D83DDD02\";\r\n            _dict[\"D83DDD03\"] = \"D83DDD03\";\r\n            _dict[\"D83DDD04\"] = \"D83DDD04\";\r\n            _dict[\"D83DDD05\"] = \"D83DDD05\";\r\n            _dict[\"D83DDD06\"] = \"D83DDD06\";\r\n            _dict[\"D83DDD07\"] = \"D83DDD07\";\r\n            _dict[\"D83DDD08\"] = \"D83DDD08\";\r\n            _dict[\"D83DDD09\"] = \"D83DDD09\";\r\n            _dict[\"D83DDD0A\"] = \"D83DDD0A\";\r\n            _dict[\"D83DDD0B\"] = \"D83DDD0B\";\r\n            _dict[\"D83DDD0C\"] = \"D83DDD0C\";\r\n            _dict[\"D83DDD0D\"] = \"D83DDD0D\";\r\n            _dict[\"D83DDD0E\"] = \"D83DDD0E\";\r\n            _dict[\"D83DDD0F\"] = \"D83DDD0F\";\r\n            _dict[\"D83DDD10\"] = \"D83DDD10\";\r\n            _dict[\"D83DDD11\"] = \"D83DDD11\";\r\n            _dict[\"D83DDD12\"] = \"D83DDD12\";\r\n            _dict[\"D83DDD13\"] = \"D83DDD13\";\r\n            _dict[\"D83DDD14\"] = \"D83DDD14\";\r\n            _dict[\"D83DDD15\"] = \"D83DDD15\";\r\n            _dict[\"D83DDD16\"] = \"D83DDD16\";\r\n            _dict[\"D83DDD17\"] = \"D83DDD17\";\r\n            _dict[\"D83DDD18\"] = \"D83DDD18\";\r\n            _dict[\"D83DDD19\"] = \"D83DDD19\";\r\n            _dict[\"D83DDD1A\"] = \"D83DDD1A\";\r\n            _dict[\"D83DDD1B\"] = \"D83DDD1B\";\r\n            _dict[\"D83DDD1C\"] = \"D83DDD1C\";\r\n            _dict[\"D83DDD1D\"] = \"D83DDD1D\";\r\n            _dict[\"D83DDD1E\"] = \"D83DDD1E\";\r\n            _dict[\"D83DDD1F\"] = \"D83DDD1F\";\r\n            _dict[\"D83DDD20\"] = \"D83DDD20\";\r\n            _dict[\"D83DDD21\"] = \"D83DDD21\";\r\n            _dict[\"D83DDD22\"] = \"D83DDD22\";\r\n            _dict[\"D83DDD23\"] = \"D83DDD23\";\r\n            _dict[\"D83DDD24\"] = \"D83DDD24\";\r\n            _dict[\"D83DDD25\"] = \"D83DDD25\";\r\n            _dict[\"D83DDD26\"] = \"D83DDD26\";\r\n            _dict[\"D83DDD27\"] = \"D83DDD27\";\r\n            _dict[\"D83DDD28\"] = \"D83DDD28\";\r\n            _dict[\"D83DDD29\"] = \"D83DDD29\";\r\n            _dict[\"D83DDD2A\"] = \"D83DDD2A\";\r\n            _dict[\"D83DDD2B\"] = \"D83DDD2B\";\r\n            _dict[\"D83DDD2C\"] = \"D83DDD2C\";\r\n            _dict[\"D83DDD2D\"] = \"D83DDD2D\";\r\n            _dict[\"D83DDD2E\"] = \"D83DDD2E\";\r\n            _dict[\"D83DDD2F\"] = \"D83DDD2F\";\r\n            _dict[\"D83DDD30\"] = \"D83DDD30\";\r\n            _dict[\"D83DDD31\"] = \"D83DDD31\";\r\n            _dict[\"D83DDD32\"] = \"D83DDD32\";\r\n            _dict[\"D83DDD33\"] = \"D83DDD33\";\r\n            _dict[\"D83DDD34\"] = \"D83DDD34\";\r\n            _dict[\"D83DDD35\"] = \"D83DDD35\";\r\n            _dict[\"D83DDD36\"] = \"D83DDD36\";\r\n            _dict[\"D83DDD37\"] = \"D83DDD37\";\r\n            _dict[\"D83DDD38\"] = \"D83DDD38\";\r\n            _dict[\"D83DDD39\"] = \"D83DDD39\";\r\n            _dict[\"D83DDD3A\"] = \"D83DDD3A\";\r\n            _dict[\"D83DDD3B\"] = \"D83DDD3B\";\r\n            _dict[\"D83DDD3C\"] = \"D83DDD3C\";\r\n            _dict[\"D83DDD3D\"] = \"D83DDD3D\";\r\n            _dict[\"D83DDD50\"] = \"D83DDD50\";\r\n            _dict[\"D83DDD51\"] = \"D83DDD51\";\r\n            _dict[\"D83DDD52\"] = \"D83DDD52\";\r\n            _dict[\"D83DDD53\"] = \"D83DDD53\";\r\n            _dict[\"D83DDD54\"] = \"D83DDD54\";\r\n            _dict[\"D83DDD55\"] = \"D83DDD55\";\r\n            _dict[\"D83DDD56\"] = \"D83DDD56\";\r\n            _dict[\"D83DDD57\"] = \"D83DDD57\";\r\n            _dict[\"D83DDD58\"] = \"D83DDD58\";\r\n            _dict[\"D83DDD59\"] = \"D83DDD59\";\r\n            _dict[\"D83DDD5A\"] = \"D83DDD5A\";\r\n            _dict[\"D83DDD5B\"] = \"D83DDD5B\";\r\n            _dict[\"D83DDD5C\"] = \"D83DDD5C\";\r\n            _dict[\"D83DDD5D\"] = \"D83DDD5D\";\r\n            _dict[\"D83DDD5E\"] = \"D83DDD5E\";\r\n            _dict[\"D83DDD5F\"] = \"D83DDD5F\";\r\n            _dict[\"D83DDD60\"] = \"D83DDD60\";\r\n            _dict[\"D83DDD61\"] = \"D83DDD61\";\r\n            _dict[\"D83DDD62\"] = \"D83DDD62\";\r\n            _dict[\"D83DDD63\"] = \"D83DDD63\";\r\n            _dict[\"D83DDD64\"] = \"D83DDD64\";\r\n            _dict[\"D83DDD65\"] = \"D83DDD65\";\r\n            _dict[\"D83DDD66\"] = \"D83DDD66\";\r\n            _dict[\"D83DDD67\"] = \"D83DDD67\";\r\n            _dict[\"D83DDDFB\"] = \"D83DDDFB\";\r\n            _dict[\"D83DDDFC\"] = \"D83DDDFC\";\r\n            _dict[\"D83DDDFD\"] = \"D83DDDFD\";\r\n            _dict[\"D83DDDFE\"] = \"D83DDDFE\";\r\n            _dict[\"D83DDDFF\"] = \"D83DDDFF\";\r\n            _dict[\"D83DDE00\"] = \"D83DDE00\";\r\n            _dict[\"D83DDE01\"] = \"D83DDE01\";\r\n            _dict[\"D83DDE02\"] = \"D83DDE02\";\r\n            _dict[\"D83DDE03\"] = \"D83DDE03\";\r\n            _dict[\"D83DDE04\"] = \"D83DDE04\";\r\n            _dict[\"D83DDE05\"] = \"D83DDE05\";\r\n            _dict[\"D83DDE06\"] = \"D83DDE06\";\r\n            _dict[\"D83DDE07\"] = \"D83DDE07\";\r\n            _dict[\"D83DDE08\"] = \"D83DDE08\";\r\n            _dict[\"D83DDE09\"] = \"D83DDE09\";\r\n            _dict[\"D83DDE0A\"] = \"D83DDE0A\";\r\n            _dict[\"D83DDE0B\"] = \"D83DDE0B\";\r\n            _dict[\"D83DDE0C\"] = \"D83DDE0C\";\r\n            _dict[\"D83DDE0D\"] = \"D83DDE0D\";\r\n            _dict[\"D83DDE0E\"] = \"D83DDE0E\";\r\n            _dict[\"D83DDE0F\"] = \"D83DDE0F\";\r\n            _dict[\"D83DDE10\"] = \"D83DDE10\";\r\n            _dict[\"D83DDE11\"] = \"D83DDE11\";\r\n            _dict[\"D83DDE12\"] = \"D83DDE12\";\r\n            _dict[\"D83DDE13\"] = \"D83DDE13\";\r\n            _dict[\"D83DDE14\"] = \"D83DDE14\";\r\n            _dict[\"D83DDE15\"] = \"D83DDE15\";\r\n            _dict[\"D83DDE16\"] = \"D83DDE16\";\r\n            _dict[\"D83DDE17\"] = \"D83DDE17\";\r\n            _dict[\"D83DDE18\"] = \"D83DDE18\";\r\n            _dict[\"D83DDE19\"] = \"D83DDE19\";\r\n            _dict[\"D83DDE1A\"] = \"D83DDE1A\";\r\n            _dict[\"D83DDE1B\"] = \"D83DDE1B\";\r\n            _dict[\"D83DDE1C\"] = \"D83DDE1C\";\r\n            _dict[\"D83DDE1D\"] = \"D83DDE1D\";\r\n            _dict[\"D83DDE1E\"] = \"D83DDE1E\";\r\n            _dict[\"D83DDE1F\"] = \"D83DDE1F\";\r\n            _dict[\"D83DDE20\"] = \"D83DDE20\";\r\n            _dict[\"D83DDE21\"] = \"D83DDE21\";\r\n            _dict[\"D83DDE22\"] = \"D83DDE22\";\r\n            _dict[\"D83DDE23\"] = \"D83DDE23\";\r\n            _dict[\"D83DDE24\"] = \"D83DDE24\";\r\n            _dict[\"D83DDE25\"] = \"D83DDE25\";\r\n            _dict[\"D83DDE26\"] = \"D83DDE26\";\r\n            _dict[\"D83DDE27\"] = \"D83DDE27\";\r\n            _dict[\"D83DDE28\"] = \"D83DDE28\";\r\n            _dict[\"D83DDE29\"] = \"D83DDE29\";\r\n            _dict[\"D83DDE2A\"] = \"D83DDE2A\";\r\n            _dict[\"D83DDE2B\"] = \"D83DDE2B\";\r\n            _dict[\"D83DDE2C\"] = \"D83DDE2C\";\r\n            _dict[\"D83DDE2D\"] = \"D83DDE2D\";\r\n            _dict[\"D83DDE2E\"] = \"D83DDE2E\";\r\n            _dict[\"D83DDE2F\"] = \"D83DDE2F\";\r\n            _dict[\"D83DDE30\"] = \"D83DDE30\";\r\n            _dict[\"D83DDE31\"] = \"D83DDE31\";\r\n            _dict[\"D83DDE32\"] = \"D83DDE32\";\r\n            _dict[\"D83DDE33\"] = \"D83DDE33\";\r\n            _dict[\"D83DDE34\"] = \"D83DDE34\";\r\n            _dict[\"D83DDE35\"] = \"D83DDE35\";\r\n            _dict[\"D83DDE36\"] = \"D83DDE36\";\r\n            _dict[\"D83DDE37\"] = \"D83DDE37\";\r\n            _dict[\"D83DDE38\"] = \"D83DDE38\";\r\n            _dict[\"D83DDE39\"] = \"D83DDE39\";\r\n            _dict[\"D83DDE3A\"] = \"D83DDE3A\";\r\n            _dict[\"D83DDE3B\"] = \"D83DDE3B\";\r\n            _dict[\"D83DDE3C\"] = \"D83DDE3C\";\r\n            _dict[\"D83DDE3D\"] = \"D83DDE3D\";\r\n            _dict[\"D83DDE3E\"] = \"D83DDE3E\";\r\n            _dict[\"D83DDE3F\"] = \"D83DDE3F\";\r\n            _dict[\"D83DDE40\"] = \"D83DDE40\";\r\n            _dict[\"D83DDE45\"] = \"D83DDE45\";\r\n            _dict[\"D83DDE46\"] = \"D83DDE46\";\r\n            _dict[\"D83DDE47\"] = \"D83DDE47\";\r\n            _dict[\"D83DDE48\"] = \"D83DDE48\";\r\n            _dict[\"D83DDE49\"] = \"D83DDE49\";\r\n            _dict[\"D83DDE4A\"] = \"D83DDE4A\";\r\n            _dict[\"D83DDE4B\"] = \"D83DDE4B\";\r\n            _dict[\"D83DDE4C\"] = \"D83DDE4C\";\r\n            _dict[\"D83DDE4D\"] = \"D83DDE4D\";\r\n            _dict[\"D83DDE4E\"] = \"D83DDE4E\";\r\n            _dict[\"D83DDE4F\"] = \"D83DDE4F\";\r\n            _dict[\"D83DDE80\"] = \"D83DDE80\";\r\n            _dict[\"D83DDE81\"] = \"D83DDE81\";\r\n            _dict[\"D83DDE82\"] = \"D83DDE82\";\r\n            _dict[\"D83DDE83\"] = \"D83DDE83\";\r\n            _dict[\"D83DDE84\"] = \"D83DDE84\";\r\n            _dict[\"D83DDE85\"] = \"D83DDE85\";\r\n            _dict[\"D83DDE86\"] = \"D83DDE86\";\r\n            _dict[\"D83DDE87\"] = \"D83DDE87\";\r\n            _dict[\"D83DDE88\"] = \"D83DDE88\";\r\n            _dict[\"D83DDE89\"] = \"D83DDE89\";\r\n            _dict[\"D83DDE8A\"] = \"D83DDE8A\";\r\n            _dict[\"D83DDE8B\"] = \"D83DDE8B\";\r\n            _dict[\"D83DDE8C\"] = \"D83DDE8C\";\r\n            _dict[\"D83DDE8D\"] = \"D83DDE8D\";\r\n            _dict[\"D83DDE8E\"] = \"D83DDE8E\";\r\n            _dict[\"D83DDE8F\"] = \"D83DDE8F\";\r\n            _dict[\"D83DDE90\"] = \"D83DDE90\";\r\n            _dict[\"D83DDE91\"] = \"D83DDE91\";\r\n            _dict[\"D83DDE92\"] = \"D83DDE92\";\r\n            _dict[\"D83DDE93\"] = \"D83DDE93\";\r\n            _dict[\"D83DDE94\"] = \"D83DDE94\";\r\n            _dict[\"D83DDE95\"] = \"D83DDE95\";\r\n            _dict[\"D83DDE96\"] = \"D83DDE96\";\r\n            _dict[\"D83DDE97\"] = \"D83DDE97\";\r\n            _dict[\"D83DDE98\"] = \"D83DDE98\";\r\n            _dict[\"D83DDE99\"] = \"D83DDE99\";\r\n            _dict[\"D83DDE9A\"] = \"D83DDE9A\";\r\n            _dict[\"D83DDE9B\"] = \"D83DDE9B\";\r\n            _dict[\"D83DDE9C\"] = \"D83DDE9C\";\r\n            _dict[\"D83DDE9D\"] = \"D83DDE9D\";\r\n            _dict[\"D83DDE9E\"] = \"D83DDE9E\";\r\n            _dict[\"D83DDE9F\"] = \"D83DDE9F\";\r\n            _dict[\"D83DDEA0\"] = \"D83DDEA0\";\r\n            _dict[\"D83DDEA1\"] = \"D83DDEA1\";\r\n            _dict[\"D83DDEA2\"] = \"D83DDEA2\";\r\n            _dict[\"D83DDEA3\"] = \"D83DDEA3\";\r\n            _dict[\"D83DDEA4\"] = \"D83DDEA4\";\r\n            _dict[\"D83DDEA5\"] = \"D83DDEA5\";\r\n            _dict[\"D83DDEA6\"] = \"D83DDEA6\";\r\n            _dict[\"D83DDEA7\"] = \"D83DDEA7\";\r\n            _dict[\"D83DDEA8\"] = \"D83DDEA8\";\r\n            _dict[\"D83DDEA9\"] = \"D83DDEA9\";\r\n            _dict[\"D83DDEAA\"] = \"D83DDEAA\";\r\n            _dict[\"D83DDEAB\"] = \"D83DDEAB\";\r\n            _dict[\"D83DDEAC\"] = \"D83DDEAC\";\r\n            _dict[\"D83DDEAD\"] = \"D83DDEAD\";\r\n            _dict[\"D83DDEAE\"] = \"D83DDEAE\";\r\n            _dict[\"D83DDEAF\"] = \"D83DDEAF\";\r\n            _dict[\"D83DDEB0\"] = \"D83DDEB0\";\r\n            _dict[\"D83DDEB1\"] = \"D83DDEB1\";\r\n            _dict[\"D83DDEB2\"] = \"D83DDEB2\";\r\n            _dict[\"D83DDEB3\"] = \"D83DDEB3\";\r\n            _dict[\"D83DDEB4\"] = \"D83DDEB4\";\r\n            _dict[\"D83DDEB5\"] = \"D83DDEB5\";\r\n            _dict[\"D83DDEB6\"] = \"D83DDEB6\";\r\n            _dict[\"D83DDEB7\"] = \"D83DDEB7\";\r\n            _dict[\"D83DDEB8\"] = \"D83DDEB8\";\r\n            _dict[\"D83DDEB9\"] = \"D83DDEB9\";\r\n            _dict[\"D83DDEBA\"] = \"D83DDEBA\";\r\n            _dict[\"D83DDEBB\"] = \"D83DDEBB\";\r\n            _dict[\"D83DDEBC\"] = \"D83DDEBC\";\r\n            _dict[\"D83DDEBD\"] = \"D83DDEBD\";\r\n            _dict[\"D83DDEBE\"] = \"D83DDEBE\";\r\n            _dict[\"D83DDEBF\"] = \"D83DDEBF\";\r\n            _dict[\"D83DDEC0\"] = \"D83DDEC0\";\r\n            _dict[\"D83DDEC1\"] = \"D83DDEC1\";\r\n            _dict[\"D83DDEC2\"] = \"D83DDEC2\";\r\n            _dict[\"D83DDEC3\"] = \"D83DDEC3\";\r\n            _dict[\"D83DDEC4\"] = \"D83DDEC4\";\r\n            _dict[\"D83DDEC5\"] = \"D83DDEC5\";\r\n        }\r\n    }\r\n\r\n    public static class BrowserNavigationService\r\n    {\r\n        private static double _fontScaleFactor = 1.0;\r\n\r\n        public static double FontScaleFactor\r\n        {\r\n            get { return _fontScaleFactor; }\r\n            set { _fontScaleFactor = value; }\r\n        }\r\n\r\n        // http://daringfireball.net/2010/07/improved_regex_for_matching_urls\r\n        private static readonly Regex RE_URL = new Regex(@\"(?i)\\b(((?:https?://|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\"\".,<>?«»“”‘’]))|([a-z0-9.\\-]+(\\.ru|\\.com|\\.net|\\.org|\\.us|\\.it|\\.co\\.uk)(?![a-z0-9]))|([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]*[a-zA-Z0-9-]+))\");\r\n\r\n        public static readonly Regex UserMentionRegex = new Regex(@\"\\[id\\d+.*?\\|.*?\\]\");\r\n        public static readonly Regex GroupMentionRegex = new Regex(@\"\\[club\\d+.*?\\|.*?\\]\");\r\n\r\n\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.RegisterAttached(\r\n            \"Text\",\r\n            typeof(string),\r\n            typeof(BrowserNavigationService),\r\n            new PropertyMetadata(null, OnTextChanged)\r\n        );\r\n\r\n        public static string GetText(DependencyObject d)\r\n        { return d.GetValue(TextProperty) as string; }\r\n\r\n        public static void SetText(DependencyObject d, string value)\r\n        { d.SetValue(TextProperty, value); }\r\n\r\n        // Fetch run with PhoneTextNormalStyle\r\n        public static Run GetRunWithStyle(string text, RichTextBox richTextBox)\r\n        {\r\n            var run = new Run();\r\n\r\n            run.FontFamily = richTextBox.FontFamily;\r\n            //run.FontSize = richTextBox.FontSize * TextScaleFactor;\r\n            run.Foreground = richTextBox.Foreground;// (Brush)Application.Current.Resources[\"PhoneForegroundBrush\"];\r\n            run.Text = text;\r\n\r\n            return run;\r\n        }\r\n\r\n        public static event EventHandler<TelegramEventArgs> ResolveUsername;\r\n\r\n        private static void RaiseTelegramNavigated(TelegramEventArgs e)\r\n        {\r\n            var handler = ResolveUsername;\r\n            if (handler != null) handler(null, e);\r\n        }\r\n\r\n        public static event EventHandler<TelegramHashtagEventArgs> SearchHashtag;\r\n\r\n        private static void RaiseSearchHashtag(TelegramHashtagEventArgs e)\r\n        {\r\n            var handler = SearchHashtag;\r\n            if (handler != null) handler(null, e);\r\n        }\r\n\r\n        public static event EventHandler<TelegramMentionEventArgs> MentionNavigated;\r\n\r\n        private static void RaiseMentionNavigated(TelegramMentionEventArgs e)\r\n        {\r\n            var handler = MentionNavigated;\r\n            if (handler != null) handler(null, e);\r\n        }\r\n\r\n        public static Hyperlink GetHyperlink(string text, string link, Action<object, string> action, Brush foreground)\r\n        {\r\n            var hyperlink = new Hyperlink();\r\n            hyperlink.Inlines.Add(new Run { Text = text, Foreground = foreground });\r\n            hyperlink.NavigateUri = new Uri(link, UriKind.RelativeOrAbsolute);\r\n            hyperlink.Click += (sender, args) => action(hyperlink, link);\r\n            return hyperlink;\r\n        }\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var text_block = d as RichTextBox;\r\n            if (text_block == null)\r\n                return;\r\n\r\n            text_block.Blocks.Clear();\r\n            Paragraph par = new Paragraph();\r\n\r\n\r\n            var new_text = (string)e.NewValue;\r\n\r\n\r\n            if (string.IsNullOrEmpty(new_text))\r\n                return;\r\n\r\n            //new_text = PreprocessTextForGroupBoardMentions(new_text);\r\n\r\n            var splitData = ParseText(new_text);\r\n\r\n            foreach (var splStr in splitData)\r\n            {\r\n                var innerSplit = splStr.Split('\\b');\r\n\r\n                if (innerSplit.Length == 1)\r\n                {\r\n                    AddRawText(text_block, par, innerSplit[0]);\r\n                }\r\n                else if (innerSplit.Length > 1)\r\n                {\r\n                    var hyp = GetHyperlink(\r\n                           innerSplit[1],\r\n                           innerSplit[0],\r\n                           (h, navstr) =>\r\n                           {\r\n                               NavigateOnHyperlink(navstr);\r\n                           },\r\n                           text_block.Foreground);\r\n\r\n                    par.Inlines.Add(hyp);\r\n                }\r\n            }\r\n            //var dateRun = new Run {Text = \"1:23 1.07.2014\"};\r\n            //dateRun.\r\n            //par.Inlines.Add(dateRun);\r\n\r\n            text_block.Blocks.Add(par);\r\n        }\r\n\r\n        private static void AddRawText(RichTextBox text_block, Paragraph par, string raw_text)\r\n        {\r\n\r\n            var textEnumerator = StringInfo.GetTextElementEnumerator(raw_text);\r\n            bool cont = false;\r\n\r\n\r\n            //  DebugWriteUnicode(raw_text);\r\n\r\n            StringBuilder sb = new StringBuilder();\r\n\r\n            // Note: Begins at element -1 (none).\r\n            cont = textEnumerator.MoveNext();\r\n            while (cont)\r\n            {\r\n                var text = textEnumerator.GetTextElement();\r\n\r\n                var bytes = Encoding.BigEndianUnicode.GetBytes(text);\r\n\r\n                var bytesStr = ConvertToHexString(bytes);\r\n\r\n                if (_flagsPrefixes.Contains(bytesStr) && textEnumerator.MoveNext())\r\n                {\r\n                    var text2 = textEnumerator.GetTextElement();\r\n\r\n                    var bytes2 = Encoding.BigEndianUnicode.GetBytes(text2);\r\n\r\n                    var bytesStr2 = ConvertToHexString(bytes2);\r\n\r\n                    bytesStr += bytesStr2;\r\n\r\n                    text += text2;\r\n                }\r\n\r\n                if (Emoji.Dict.ContainsKey(bytesStr))\r\n                {\r\n                    var sbStr = sb.ToString();\r\n                    sb = sb.Clear();\r\n                    if (sbStr != string.Empty)\r\n                    {\r\n                        par.Inlines.Add(GetRunWithStyle(sbStr, text_block));\r\n                    }\r\n\r\n                    par.Inlines.Add(GetImage(bytesStr));\r\n                }\r\n\r\n                else\r\n                {\r\n                    sb = sb.Append(text);\r\n                }\r\n\r\n                cont = textEnumerator.MoveNext();\r\n\r\n            }\r\n\r\n            var sbStrLast = sb.ToString();\r\n\r\n            if (sbStrLast != string.Empty)\r\n            {\r\n                par.Inlines.Add(GetRunWithStyle(sbStrLast, text_block));\r\n            }\r\n        }\r\n\r\n        private static List<string> _flagsPrefixes =\r\n        new List<string>{\"D83CDDE8\",\r\n            \"D83CDDE9\",\r\n            \"D83CDDEA\",\r\n            \"D83CDDEB\",\r\n            \"D83CDDEC\",\r\n            \"D83CDDEE\",\r\n            \"D83CDDEF\",\r\n            \"D83CDDF0\",\r\n            \"D83CDDF7\",\r\n            \"D83CDDFA\"};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n        //public static void DebugWriteUnicode(string input)\r\n        //{\r\n        //    var res = \"\";\r\n        //    for (var i = 0; i < input.Length; i += char.IsSurrogatePair(input, i) ? 2 : 1)\r\n        //    {\r\n        //        var codepoint = char.ConvertToUtf32(input, i);\r\n\r\n        //        res += string.Format(\"U+{0:X4}\", codepoint);\r\n        //    }\r\n\r\n        //    Debug.WriteLine(res);\r\n        //}\r\n        private static string ConvertToHexString(byte[] bytes)\r\n        {\r\n            var sb = new StringBuilder();\r\n            for (int i = 0; i < bytes.Length; i++)\r\n            {\r\n                sb = sb.Append(Convert.ToString(bytes[i], 16).PadLeft(2, '0'));\r\n            }\r\n\r\n            return sb.ToString().ToUpperInvariant();\r\n        }\r\n\r\n        private static InlineUIContainer GetImage(string name)\r\n        {\r\n            var image = new Image();\r\n            image.Source = new BitmapImage(new Uri(string.Format(\"/Assets/Emoji/Separated/{0}.png\", name), UriKind.RelativeOrAbsolute));\r\n            image.Height = 27 * FontScaleFactor;\r\n            image.Width = 27 * FontScaleFactor;\r\n            image.Margin = new Thickness(0, 5, 0, -5);\r\n            var container = new InlineUIContainer();\r\n            \r\n            container.Child = image;\r\n\r\n            return container;\r\n        }\r\n\r\n        private static void NavigateOnHyperlink(string navstr)\r\n        {\r\n            if (string.IsNullOrEmpty(navstr)) return;\r\n\r\n            if (navstr.StartsWith(\"tlg://?action=mention\"))\r\n            {\r\n                var mentionIndex = navstr.IndexOf('@');\r\n\r\n                if (mentionIndex != -1)\r\n                {\r\n                    var mention = navstr.Substring(mentionIndex);\r\n\r\n                    RaiseMentionNavigated(new TelegramMentionEventArgs { Mention = mention });\r\n                }\r\n            }\r\n            else if (navstr.StartsWith(\"tlg://?action=search\"))\r\n            {\r\n                var hashtagIndex = navstr.IndexOf('#');\r\n\r\n                if (hashtagIndex != -1)\r\n                {\r\n                    var hashtag = navstr.Substring(hashtagIndex);\r\n\r\n                    RaiseSearchHashtag(new TelegramHashtagEventArgs{ Hashtag = hashtag });\r\n                }\r\n            }\r\n            else if (!navstr.Contains(\"@\"))\r\n            {\r\n                if (navstr.ToLowerInvariant().Contains(\"telegram.me\"))\r\n                {\r\n                    RaiseTelegramNavigated(new TelegramEventArgs{Uri = navstr});\r\n                }\r\n                else\r\n                {\r\n                    var task = new WebBrowserTask();\r\n                    task.URL = navstr;\r\n                    task.Show();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                EmailComposeTask emailComposeTask = new EmailComposeTask();\r\n\r\n                if (navstr.StartsWith(\"http://\"))\r\n                {\r\n                    navstr = navstr.Remove(0, 7);\r\n                }\r\n\r\n                emailComposeTask.To = navstr;\r\n\r\n                emailComposeTask.Show();\r\n            }\r\n        }\r\n\r\n\r\n        public static string PreprocessTextForGroupBoardMentions(string s)\r\n        {\r\n            s = Regex.Replace(s, @\"\\[(id|club)(\\d+):bp\\-(\\d+)_(\\d+)\\|([^\\]]+)\\]\", \"[$1$2|$5]\");\r\n            return s;\r\n        }\r\n\r\n        private static bool IsValidUsernameSymbol(char symbol)\r\n        {\r\n            if ((symbol >= 'a' && symbol <= 'z')\r\n                || (symbol >= 'A' && symbol <= 'Z')\r\n                || (symbol >= '0' && symbol <= '9')\r\n                || symbol == '_')\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static bool IsValidUsername(string username)\r\n        {\r\n            if (username.Length <= 5)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (username.Length > 32)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (username[0] != '@')\r\n            {\r\n                return false;\r\n            }\r\n\r\n            for (var i = 1; i < username.Length; i++)\r\n            {\r\n                if (!IsValidUsernameSymbol(username[i]))\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        public static List<string> ParseText(string html)\r\n        {\r\n            html = html.Replace(\"\\n\", \" \\n \");\r\n            var rx = new Regex(\"(https?:\\\\/\\\\/)?(([A-Za-zА-Яа-яЁё0-9@][A-Za-zА-Яа-яЁё0-9@\\\\-_\\\\.]*[A-Za-zА-Яа-яЁё0-9@])(\\\\/([A-Za-zА-Яа-я0-9@\\\\-_#%&?+\\\\/\\\\.=;:~]*[^\\\\.\\\\,;\\\\(\\\\)\\\\?<\\\\&\\\\s:])?)?)\", RegexOptions.IgnoreCase);\r\n            html = rx.Replace(html, delegate(Match m)\r\n            {\r\n                var full = m.Value;\r\n\r\n                if (full.IndexOf('@') == 0 && IsValidUsername(full))\r\n                    return string.Format(\"\\atlg://?action=mention&q={0}\\b{1}\\a\", full, full);\r\n                \r\n                var protocol = (m.Groups.Count > 1) ? m.Groups[1].Value : \"http://\";\r\n                if (protocol == string.Empty) protocol = \"http://\";\r\n                var url = (m.Groups.Count > 2) ? m.Groups[2].Value : string.Empty;\r\n                var domain = (m.Groups.Count > 3) ? m.Groups[3].Value : string.Empty;\r\n                if (domain.IndexOf(\".\") == -1 || domain.IndexOf(\"..\") != -1) return full;\r\n                var topDomain = domain.Split('.').LastOrDefault();\r\n                if (topDomain.Length > 5 ||\r\n                    !(\"guru,info,name,aero,arpa,coop,museum,mobi,travel,xxx,asia,biz,com,net,org,gov,mil,edu,int,tel,ac,ad,ae,af,ag,ai,al,am,an,ao,aq,ar,as,at,au,aw,az,ba,bb,bd,be,bf,bg,bh,bi,bj,bm,bn,bo,br,bs,bt,bv,bw,by,bz,ca,cc,cd,cf,cg,ch,ci,ck,cl,cm,cn,co,cr,cu,cv,cx,cy,cz,de,dj,dk,dm,do,dz,ec,ee,eg,eh,er,es,et,eu,fi,fj,fk,fm,fo,fr,ga,gd,ge,gf,gg,gh,gi,gl,gm,gn,gp,gq,gr,gs,gt,gu,gw,gy,hk,hm,hn,hr,ht,hu,id,ie,il,im,in,io,iq,ir,is,it,je,jm,jo,jp,ke,kg,kh,ki,km,kn,kp,kr,kw,ky,kz,la,lb,lc,li,lk,lr,ls,lt,lu,lv,ly,ma,mc,md,me,mg,mh,mk,ml,mm,mn,mo,mp,mq,mr,ms,mt,mu,mv,mw,mx,my,mz,na,nc,ne,nf,ng,ni,nl,no,np,nr,nu,nz,om,pa,pe,pf,pg,ph,pk,pl,pm,pn,pr,ps,pt,pw,py,qa,re,ro,ru,rw,sa,sb,sc,sd,se,sg,sh,si,sj,sk,sl,sm,sn,so,sr,st,su,sv,sy,sz,tc,td,tf,tg,th,tj,tk,tl,tm,tn,to,tp,tr,tt,tv,tw,tz,ua,ug,uk,um,us,uy,uz,va,vc,ve,vg,vi,vn,vu,wf,ws,ye,yt,yu,za,zm,zw,рф,cat,pro\"\r\n                        .Split(',').Contains(topDomain))) return full;\r\n                if (full.IndexOf('@') != -1) return \"\\amailto:\" + full + \"\\b\" + full + \"\\a\";\r\n                \r\n\r\n                full = HttpUtility.UrlDecode(full);\r\n                if (full.Length > 55) full = full.Substring(0, 53) + \"..\";\r\n\r\n                return string.Format(\"\\a{0}\\b{1}\\a\", (protocol + url), full);\r\n            }).ReplaceByRegex(\"(^|\\\\s)#[\\\\w@\\\\.]+\", \" \\atlg://?action=search&q=$0\\b$0\\a\"); ;\r\n            html = html.Replace(\"\\n \", \"\\n\").Replace(\" \\n\", \"\\n\");\r\n\r\n            if (html.StartsWith(\" \")) html = html.Remove(0, 1);\r\n            var blocks = html.Split('\\a');\r\n            return blocks.ToList();\r\n        }\r\n\r\n    }\r\n\r\n    public static class StringExtensions\r\n    {\r\n        public static string ReplaceByRegex(this string str, string regexStr, string replace)\r\n        {\r\n            var regex = new Regex(regexStr);\r\n\r\n            var result = regex.Replace(str, replace);\r\n\r\n            return result;\r\n        }\r\n    }\r\n\r\n    public class TelegramEventArgs : EventArgs\r\n    {\r\n        public string Uri { get; set; }\r\n    }\r\n\r\n    public class TelegramHashtagEventArgs : EventArgs\r\n    {\r\n        public string Hashtag { get; set; }\r\n    }\r\n\r\n    public class TelegramMentionEventArgs : EventArgs\r\n    {\r\n        public string Mention { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Controls/Emoji/EmojiControl.xaml",
    "content": "﻿<UserControl x:Class=\"Telegram.EmojiPanel.Controls.Emoji.EmojiControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:utilites=\"clr-namespace:Telegram.EmojiPanel.Controls.Utilites\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"Self\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <Style x:Key=\"CategoryButtonBaseStyle\" TargetType=\"Button\">\r\n            <Setter Property=\"Margin\" Value=\"3 0 3 0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid x:Name=\"ContentGrid\" Background=\"{TemplateBinding Background}\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ContentGrid\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n\r\n                            <ContentControl x:Name=\"ContentContainer\"\r\n                                            ContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n                                            Content=\"{TemplateBinding Content}\" />\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        \r\n        <Style x:Key=\"CategoryButtonDarkThemeStyle\" TargetType=\"Button\" BasedOn=\"{StaticResource CategoryButtonBaseStyle}\">\r\n            <Setter Property=\"Background\" Value=\"#FF474747\"/>\r\n        </Style>\r\n\r\n        <Style x:Key=\"CategoryButtonLightThemeStyle\" TargetType=\"Button\" BasedOn=\"{StaticResource CategoryButtonBaseStyle}\">\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        </Style>\r\n\r\n        <Style x:Key=\"RepeatButtonBaseStyle\" TargetType=\"RepeatButton\">\r\n            <Setter Property=\"Margin\" Value=\"3 0 3 0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"RepeatButton\">\r\n                        <Grid x:Name=\"ContentGrid\" Background=\"{TemplateBinding Background}\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ContentGrid\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n\r\n                            <ContentControl x:Name=\"ContentContainer\"\r\n                                            ContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n                                            Content=\"{TemplateBinding Content}\" />\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"RepeatButtonDarkThemeStyle\" TargetType=\"RepeatButton\" BasedOn=\"{StaticResource RepeatButtonBaseStyle}\">\r\n            <Setter Property=\"Background\" Value=\"#FF474747\"/>\r\n        </Style>\r\n\r\n        <Style x:Key=\"RepeatButtonLightThemeStyle\" TargetType=\"RepeatButton\" BasedOn=\"{StaticResource RepeatButtonBaseStyle}\">\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"EmojiContainer\"\r\n          Visibility=\"Visible\">\r\n        <Grid Background=\"{StaticResource PhoneChromeBrush}\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"*\" />\r\n                <RowDefinition Height=\"Auto\" />\r\n            </Grid.RowDefinitions>\r\n\r\n            <ProgressBar x:Name=\"LoadingProgressBar\" IsIndeterminate=\"True\"/>\r\n\r\n            <ScrollViewer Grid.Row=\"0\" Margin=\"0\" Padding=\"0\" x:Name=\"CSV\">\r\n                <utilites:MyVirtualizingPanel x:Name=\"VirtPanel\" Margin=\"0 3 0 0\" />\r\n            </ScrollViewer>\r\n\r\n            <!-- recent panel-->\r\n            <Border Background=\"{StaticResource PhoneChromeBrush}\" Grid.Row=\"0\" Margin=\"0\" Padding=\"0\" x:Name=\"Recents\" Visibility=\"Collapsed\">\r\n                <ItemsControl ItemsSource=\"{Binding RecentItems, ElementName=Self}\" Margin=\"3,4,3,0\">\r\n                    <ItemsControl.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <Border \r\n                                MouseLeftButtonDown=\"UIElement_OnMouseLeftButtonDown\"\r\n                                MouseLeftButtonUp=\"UIElement_OnMouseLeftButtonUp\"\r\n                                MouseLeave=\"UIElement_OnMouseLeave\"\r\n                                Tap=\"EmojiButton_OnTap\" \r\n                                Width=\"77\" Height=\"68\" Margin=\"1\" \r\n                                Background=\"{Binding ButtonBackground, ElementName=Self}\">\r\n                                <Image Width=\"42\" Source=\"{Binding Uri}\">\r\n                                    <Image.RenderTransform>\r\n                                        <TranslateTransform Y=\"-1\"/>\r\n                                    </Image.RenderTransform>\r\n                                </Image>\r\n                            </Border>\r\n                        </DataTemplate>\r\n                    </ItemsControl.ItemTemplate>\r\n                    <ItemsControl.ItemsPanel>\r\n                        <ItemsPanelTemplate>\r\n                            <toolkit:WrapPanel/>\r\n                        </ItemsPanelTemplate>\r\n                    </ItemsControl.ItemsPanel>\r\n                    <ItemsControl.Template>\r\n                        <ControlTemplate TargetType=\"ItemsControl\">\r\n                            <ScrollViewer HorizontalScrollBarVisibility=\"Disabled\" VerticalScrollBarVisibility=\"Auto\">\r\n                                <ItemsPresenter Margin=\"0\"/>\r\n                            </ScrollViewer>\r\n                        </ControlTemplate>\r\n                    </ItemsControl.Template>\r\n                </ItemsControl>\r\n            </Border>\r\n\r\n            <Grid x:Name=\"ButtonsGrid\"\r\n                  Grid.Row=\"1\" \r\n                  Height=\"78\"\r\n                  Margin=\"0 6 0 0\"\r\n                  Background=\"{StaticResource PhoneChromeBrush}\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                    <ColumnDefinition />\r\n                </Grid.ColumnDefinitions>\r\n\r\n                <!-- Buttons created code behind -->\r\n            </Grid>\r\n        </Grid>\r\n\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "Telegram.EmojiPanel/Controls/Emoji/EmojiControl.xaml.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing System.Windows.Shapes;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Info;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Controls.VirtualizedView;\r\nusing Telegram.EmojiPanel.Controls.Utilites;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Emoji\r\n{\r\n    public class IsOpenedEventArgs : EventArgs\r\n    {\r\n        public bool IsOpened { get; set; }\r\n    }\r\n\r\n    public partial class EmojiControl\r\n    {\r\n\r\n        private List<VListItemBase> _category1Sprites;\r\n        private List<VListItemBase> _category2Sprites;\r\n        private List<VListItemBase> _category3Sprites;\r\n        private List<VListItemBase> _category4Sprites;\r\n        private List<VListItemBase> _category5Sprites;\r\n\r\n        public event EventHandler<IsOpenedEventArgs> IsOpenedChanged;\r\n\r\n        private void RaiseIsOpenedChanged(bool isOpened)\r\n        {\r\n            var eventHandler = IsOpenedChanged;\r\n\r\n            if (eventHandler != null)\r\n            {\r\n                eventHandler(this, new IsOpenedEventArgs { IsOpened = isOpened });\r\n            }\r\n        }\r\n\r\n        public TextBox TextBoxTarget { get; set; }\r\n\r\n        private const int AlbumOrientationHeight = 328;\r\n\r\n        public const int PortraitOrientationHeight100 = 408;\r\n\r\n        public const int PortraitOrientationHeight112 = 408;\r\n\r\n        public const int PortraitOrientationHeight112Software = 400;\r\n\r\n        public const int PortraitOrientationHeight150 = 408;\r\n\r\n        public const int PortraitOrientationHeight150Software = 400;\r\n\r\n        public const int PortraitOrientationHeight160 = 408;\r\n\r\n        public const int PortraitOrientationHeight225 = 332;\r\n\r\n        public static int PortraitOrientationHeight\r\n        {\r\n            get\r\n            {\r\n#if WP8\r\n                var appBar = new ApplicationBar();\r\n                switch (Application.Current.Host.Content.ScaleFactor)\r\n                {\r\n                    case 100:   //Lumia 820             WVGA    480x800\r\n                        return PortraitOrientationHeight100;\r\n                        break;\r\n                    case 112:   //Lumia 535             qHD     540x960\r\n                        // Software buttons //Lumia 535\r\n                        if (appBar.DefaultSize == 67.0)\r\n                        {\r\n                            return PortraitOrientationHeight112Software;\r\n                        }\r\n                        \r\n                        return PortraitOrientationHeight112;\r\n                        break;\r\n                    case 150:   //HTC 8X, 730, 830      720p    720x1280\r\n                        //Software buttons  //Lumia 730\r\n                        if (appBar.DefaultSize == 67.0)\r\n                        {\r\n                            return PortraitOrientationHeight150Software;\r\n                        }\r\n\r\n                        return PortraitOrientationHeight150;\r\n                        break;\r\n                    case 160:   //Lumia 925, 1020       WXGA    768x1280\r\n                        return PortraitOrientationHeight160;\r\n                        break;\r\n                    case 225:   // Lumia 1520, 930      1020p   1080x1920  \r\n                        \r\n                        var deviceName = DeviceStatus.DeviceName;\r\n                        if (!string.IsNullOrEmpty(deviceName))\r\n                        {\r\n                            deviceName = deviceName.Replace(\"-\", string.Empty).ToLowerInvariant();\r\n\r\n                            //Lumia 1520    6 inch 1020p\r\n                            if (deviceName.StartsWith(\"rm937\")\r\n                                || deviceName.StartsWith(\"rm938\")\r\n                                || deviceName.StartsWith(\"rm939\")\r\n                                || deviceName.StartsWith(\"rm940\"))\r\n                            {\r\n                                return PortraitOrientationHeight225;\r\n                            }\r\n                        }\r\n\r\n                        //Lumia 930 other 1020p\r\n                        return PortraitOrientationHeight100;\r\n                        break;\r\n                }\r\n#endif\r\n\r\n                return PortraitOrientationHeight100;\r\n            }\r\n        }\r\n\r\n        private bool _isOpen;\r\n        private bool _isPortrait = true;\r\n        private bool _isTextBoxTargetFocused;\r\n        private bool _isBlocked; // Block IsOpen during animation\r\n        private int _currentCategory;\r\n        private bool _wasRendered;\r\n        private readonly TranslateTransform _frameTransform;\r\n        private static EmojiControl _instance;\r\n\r\n        public static EmojiControl GetInstance()\r\n        {\r\n            return _instance ?? (_instance = new EmojiControl());\r\n        }\r\n\r\n        public static readonly DependencyProperty RootFrameTransformProperty = DependencyProperty.Register(\r\n                \"RootFrameTransform\",\r\n                typeof(double),\r\n                typeof(EmojiControl),\r\n                new PropertyMetadata(OnRootFrameTransformChanged));\r\n\r\n        public EmojiControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            //var frame = (Frame)Application.Current.RootVisual;\r\n            //_frameTransform = ((TranslateTransform)((TransformGroup)frame.RenderTransform).Children[0]);\r\n            //var binding = new Binding(\"Y\")\r\n            //{\r\n            //    Source = _frameTransform\r\n            //};\r\n            //SetBinding(RootFrameTransformProperty, binding);\r\n\r\n            VirtPanel.InitializeWithScrollViewer(CSV);\r\n            VirtPanel.ScrollPositionChanged += VirtPanelOnScrollPositionChanged;\r\n            //SizeChanged += OnSizeChanged;\r\n            OnSizeChanged(null, null);\r\n\r\n            LoadButtons();\r\n            CurrentCategory = 0;\r\n        }\r\n\r\n        public void BindTextBox(TextBox textBox)\r\n        {\r\n            TextBoxTarget = textBox;\r\n            textBox.GotFocus += TextBoxOnGotFocus;\r\n            textBox.LostFocus += TextBoxOnLostFocus;\r\n        }\r\n\r\n        public void UnbindTextBox()\r\n        {\r\n            TextBoxTarget.GotFocus -= TextBoxOnGotFocus;\r\n            TextBoxTarget.LostFocus -= TextBoxOnLostFocus;\r\n            TextBoxTarget = null;\r\n        }\r\n\r\n        public bool IsOpen\r\n        {\r\n            get\r\n            {\r\n                return !_isTextBoxTargetFocused && _isOpen;\r\n            }\r\n            set\r\n            {\r\n                // Dont hide EmojiControl when keyboard is shown (or to be shown)\r\n                if (!_isTextBoxTargetFocused && _isOpen == value || _isBlocked) return;\r\n\r\n                if (value)\r\n                {\r\n                    Open();\r\n                }\r\n                else\r\n                {\r\n                    Hide();\r\n                }\r\n\r\n\r\n                RaiseIsOpenedChanged(value);\r\n            }\r\n        }\r\n\r\n        private void Open()\r\n        {\r\n            _isOpen = true;\r\n\r\n            TextBoxTarget.Dispatcher.BeginInvoke(() => VisualStateManager.GoToState(TextBoxTarget, \"Focused\", false));\r\n\r\n\r\n\r\n            //var frame = (PhoneApplicationFrame)Application.Current.RootVisual;\r\n            EmojiContainer.Visibility = Visibility.Visible;\r\n            Deployment.Current.Dispatcher.BeginInvoke(() => LoadCategory(0));\r\n\r\n            //frame.BackKeyPress += OnBackKeyPress;\r\n\r\n            //if (!(EmojiContainer.RenderTransform is TranslateTransform))\r\n            //    EmojiContainer.RenderTransform = new TranslateTransform();\r\n            //var transform = (TranslateTransform)EmojiContainer.RenderTransform;\r\n\r\n            var offset = _isPortrait ? PortraitOrientationHeight : AlbumOrientationHeight;\r\n            EmojiContainer.Height = offset;\r\n\r\n            //var from = 0;\r\n\r\n            //if (_frameTransform.Y < 0) // Keyboard is in view\r\n            //{\r\n            //    from = (int)_frameTransform.Y;\r\n            //    //_frameTransform.Y = -offset;\r\n            //    //transform.Y = offset;// -72;\r\n            //}\r\n            //transform.Y = offset;// -72\r\n\r\n            //if (from == offset) return;\r\n\r\n            //frame.IsHitTestVisible = false;\r\n            //_isBlocked = true;\r\n\r\n            //var storyboard = new Storyboard();\r\n            //var doubleTransformFrame = new DoubleAnimation\r\n            //{\r\n            //    From = from,\r\n            //    To = -offset,\r\n            //    Duration = TimeSpan.FromMilliseconds(440),\r\n            //    EasingFunction = new ExponentialEase\r\n            //    {\r\n            //        EasingMode = EasingMode.EaseOut,\r\n            //        Exponent = 6\r\n            //    }\r\n            //};\r\n            //storyboard.Children.Add(doubleTransformFrame);\r\n            //Storyboard.SetTarget(doubleTransformFrame, _frameTransform);\r\n            //Storyboard.SetTargetProperty(doubleTransformFrame, new PropertyPath(\"Y\"));\r\n\r\n            //EmojiContainer.Dispatcher.BeginInvoke(async () =>\r\n            //{\r\n            //    storyboard.Begin();\r\n\r\n            //    if (_frameTransform.Y < 0) // Keyboard is in view\r\n            //    {\r\n            //        Focus();\r\n            //        TextBoxTarget.Dispatcher.BeginInvoke(() // no effect without dispatcher\r\n            //            => VisualStateManager.GoToState(TextBoxTarget, \"Focused\", false));\r\n            //    }\r\n\r\n            //    if (_wasRendered) return;\r\n            //    await Task.Delay(50);\r\n            //    LoadCategory(0);\r\n            //});\r\n\r\n            //storyboard.Completed += (sender, args) =>\r\n            //{\r\n            //    frame.IsHitTestVisible = true;\r\n            //    _isBlocked = false;\r\n            //};\r\n        }\r\n\r\n        private void Hide()\r\n        {\r\n            _isOpen = false;\r\n\r\n            VisualStateManager.GoToState(TextBoxTarget, \"Unfocused\", false);\r\n            EmojiContainer.Visibility = Visibility.Collapsed;\r\n\r\n\r\n            //var frame = (PhoneApplicationFrame)Application.Current.RootVisual;\r\n            //frame.BackKeyPress -= OnBackKeyPress;\r\n\r\n            //if (_isTextBoxTargetFocused)\r\n            //{\r\n            //    _frameTransform.Y = 0;\r\n\r\n            //    EmojiContainer.Visibility = Visibility.Collapsed;\r\n\r\n            //    return;\r\n            //}\r\n\r\n            //VisualStateManager.GoToState(TextBoxTarget, \"Unfocused\", false);\r\n\r\n            //frame.IsHitTestVisible = false;\r\n            //_isBlocked = true;\r\n\r\n            //var transform = (TranslateTransform)EmojiContainer.RenderTransform;\r\n\r\n            //var storyboard = new Storyboard();\r\n            //var doubleTransformFrame = new DoubleAnimation\r\n            //{\r\n            //    From = -transform.Y,\r\n            //    To = 0,\r\n            //    Duration = TimeSpan.FromMilliseconds(440),\r\n            //    EasingFunction = new ExponentialEase\r\n            //    {\r\n            //        EasingMode = EasingMode.EaseOut,\r\n            //        Exponent = 6\r\n            //    }\r\n            //};\r\n            //storyboard.Children.Add(doubleTransformFrame);\r\n            //Storyboard.SetTarget(doubleTransformFrame, _frameTransform);\r\n            //Storyboard.SetTargetProperty(doubleTransformFrame, new PropertyPath(\"Y\"));\r\n            //storyboard.Begin();\r\n\r\n            //storyboard.Completed += (sender, args) =>\r\n            //{\r\n            //    EmojiContainer.Visibility = Visibility.Collapsed;\r\n\r\n            //    frame.IsHitTestVisible = true;\r\n            //    _isBlocked = false;\r\n            //    transform.Y = 0;\r\n            //};\r\n\r\n        }\r\n\r\n        #region _isTextBoxTargetFocused listeners\r\n        private void TextBoxOnGotFocus(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            _isTextBoxTargetFocused = true;\r\n        }\r\n        private void TextBoxOnLostFocus(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            _isTextBoxTargetFocused = false;\r\n        }\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Hide instance on pressing hardware Back button. Fires only when instance is opened.\r\n        /// </summary>\r\n        private void OnBackKeyPress(object sender, CancelEventArgs cancelEventArgs)\r\n        {\r\n            IsOpen = false;\r\n            cancelEventArgs.Cancel = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Clear current highlight on scroll\r\n        /// </summary>\r\n        private static void VirtPanelOnScrollPositionChanged(object sender, MyVirtualizingPanel.ScrollPositionChangedEventAgrs scrollPositionChangedEventAgrs)\r\n        {\r\n            EmojiSpriteItem.ClearCurrentHighlight();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Changes tabs in UI and _currentCategory property\r\n        /// </summary>\r\n        public int CurrentCategory\r\n        {\r\n            get { return _currentCategory; }\r\n            set\r\n            {\r\n                var previousCategory = GetCategoryButtonByIndex(_currentCategory);\r\n                var nextCategory = GetCategoryButtonByIndex(value);\r\n\r\n                if (previousCategory != null)\r\n                    previousCategory.Background = ButtonBackground;\r\n\r\n                nextCategory.Background = (Brush)Application.Current.Resources[\"PhoneAccentBrush\"];\r\n                _currentCategory = value;\r\n            }\r\n        }\r\n\r\n        public void LoadCategory(int index)\r\n        {\r\n            VirtPanel.ClearItems();\r\n\r\n            if (_currentCategory == RecentsCategoryIndex)\r\n                UnloadRecents();\r\n\r\n            if (index == RecentsCategoryIndex)\r\n            {\r\n                LoadRecents();\r\n                return;\r\n            }\r\n\r\n            List<VListItemBase> sprites = null;\r\n\r\n            switch (index)\r\n            {\r\n                case 0:\r\n                    sprites = _category1Sprites;\r\n                    break;\r\n                case 1:\r\n                    sprites = _category2Sprites;\r\n                    break;\r\n                case 2:\r\n                    sprites = _category3Sprites;\r\n                    break;\r\n                case 3:\r\n                    sprites = _category4Sprites;\r\n                    break;\r\n                case 4:\r\n                    sprites = _category5Sprites;\r\n                    break;\r\n            }\r\n\r\n            if (sprites == null)\r\n            {\r\n                sprites = new List<VListItemBase>();\r\n\r\n                for (var i = 0; i < EmojiData.SpritesByCategory[index].Length; i++)\r\n                {\r\n                    //var item = new EmojiSpriteItem(index, i);\r\n                    var item = new EmojiSpriteItem(EmojiData.SpritesByCategory[index][i], index, i);\r\n                    item.EmojiSelected += OnEmojiSelected;\r\n                    sprites.Add(item);\r\n                }\r\n\r\n                switch (index)\r\n                {\r\n                    case 0:\r\n                        _category1Sprites = sprites;\r\n                        break;\r\n                    case 1:\r\n                        _category2Sprites = sprites;\r\n                        break;\r\n                    case 2:\r\n                        _category3Sprites = sprites;\r\n                        break;\r\n                    case 3:\r\n                        _category4Sprites = sprites;\r\n                        break;\r\n                    case 4:\r\n                        _category5Sprites = sprites;\r\n                        break;\r\n                }\r\n            }\r\n\r\n            CurrentCategory = index;\r\n\r\n            VirtPanel.AddItems(new List<VListItemBase> { sprites[0] });\r\n            CreateButtonsBackgrounds(index);\r\n\r\n            if (!_wasRendered)\r\n            {\r\n                // Display LoadingProgressBar only once\r\n                LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                _wasRendered = true;\r\n            }\r\n\r\n            // Delayed rendering of the rest parts - speeds up initial load\r\n            ThreadPool.QueueUserWorkItem(state =>\r\n            {\r\n                Thread.Sleep(100);\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    if (_currentCategory != index)\r\n                        return;\r\n\r\n                    var listList = sprites.ToList();\r\n                    listList.RemoveAt(0);\r\n                    VirtPanel.AddItems(listList);\r\n                });\r\n            });\r\n        }\r\n\r\n        public static void OnRootFrameTransformChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((EmojiControl)source).OnRootFrameTransformChanged();\r\n        }\r\n\r\n        public void OnRootFrameTransformChanged()\r\n        {\r\n            if (!_isOpen) return;\r\n\r\n            var offset = _isPortrait ? -PortraitOrientationHeight : -AlbumOrientationHeight;\r\n            _frameTransform.Y = offset;\r\n        }\r\n\r\n        #region Recents\r\n\r\n        public static readonly DependencyProperty RecentItemsProperty = DependencyProperty.Register(\r\n            \"RecentItems\", typeof (IList<EmojiDataItem>), typeof (EmojiControl), new PropertyMetadata(default(IList<EmojiDataItem>)));\r\n\r\n        public IList<EmojiDataItem> RecentItems\r\n        {\r\n            get { return (IList<EmojiDataItem>) GetValue(RecentItemsProperty); }\r\n            set { SetValue(RecentItemsProperty, value); }\r\n        }\r\n\r\n        public void LoadRecents()\r\n        {\r\n            CurrentCategory = RecentsCategoryIndex;\r\n\r\n            if (EmojiData.Recents == null)\r\n            {\r\n                EmojiData.LoadRecents();\r\n            }\r\n\r\n            RecentItems = new ObservableCollection<EmojiDataItem>(EmojiData.Recents ?? new List<EmojiDataItem>());\r\n\r\n            CSV.IsHitTestVisible = false;\r\n            Recents.Visibility = Visibility.Visible;\r\n        }\r\n\r\n        public void UnloadRecents()\r\n        {\r\n            CSV.IsHitTestVisible = true;\r\n            Recents.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        #endregion Recents\r\n\r\n        private void OnEmojiSelected(object sender, EmojiSelectedEventArgs args)\r\n        {\r\n            TextBoxTarget.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                var selectionStart = TextBoxTarget.SelectionStart;\r\n                TextBoxTarget.Text = TextBoxTarget.Text.Insert(selectionStart, args.DataItem.String);\r\n                TextBoxTarget.Select(selectionStart + args.DataItem.String.Length, 0);\r\n            });\r\n\r\n            if (_currentCategory == RecentsCategoryIndex) return;\r\n\r\n            var that = args.DataItem;\r\n            ThreadPool.QueueUserWorkItem(state => EmojiData.AddToRecents(that));\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Emoji control backspace button logic\r\n        /// </summary>\r\n        private void BackspaceButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            var text = TextBoxTarget.Text;\r\n            var selectionStart = TextBoxTarget.SelectionStart;\r\n\r\n            if (text.Length <= 0) return;\r\n            if (selectionStart == 0) return;\r\n\r\n            int toSubstring;\r\n\r\n            if (text.Length > 1)\r\n            {\r\n                var prevSymbol = text[selectionStart - 2];\r\n                var prevBytes = BitConverter.GetBytes(prevSymbol);\r\n\r\n                var curSymbol = text[selectionStart - 1];\r\n                var curBytes = BitConverter.GetBytes(curSymbol);\r\n\r\n                if (prevBytes[1] == 0xD8 && (prevBytes[0] == 0x3D || prevBytes[0] == 0x3C))\r\n                    toSubstring = 2;\r\n                else if (curBytes[1] == 0x20 && curBytes[0] == 0xE3)\r\n                    toSubstring = 2;\r\n                else\r\n                    toSubstring = 1;\r\n            }\r\n            else\r\n            {\r\n                toSubstring = 1;\r\n            }\r\n\r\n            TextBoxTarget.Text = text.Remove(selectionStart - toSubstring, toSubstring);\r\n            TextBoxTarget.SelectionStart = selectionStart - toSubstring;\r\n        }\r\n\r\n        #region User Interface\r\n\r\n        private readonly Button _abcButton = new Button { ClickMode = ClickMode.Release };\r\n        private readonly Button _recentsButton = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat0Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat1Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat2Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat3Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat4Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly RepeatButton _backspaceButton = new RepeatButton { ClickMode = ClickMode.Release, Interval = 100 };\r\n        public const int RecentsCategoryIndex = 5;\r\n\r\n        private Button GetCategoryButtonByIndex(int index)\r\n        {\r\n            switch (index)\r\n            {\r\n                case 0:\r\n                    return _cat0Button;\r\n                case 1:\r\n                    return _cat1Button;\r\n                case 2:\r\n                    return _cat2Button;\r\n                case 3:\r\n                    return _cat3Button;\r\n                case 4:\r\n                    return _cat4Button;\r\n                case RecentsCategoryIndex:\r\n                    return _recentsButton;\r\n                default:\r\n                    return null;\r\n            }\r\n        }\r\n\r\n        public Brush ButtonBackground\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                return isLightTheme\r\n                    ? new SolidColorBrush(Colors.White)\r\n                    : new SolidColorBrush(Color.FromArgb(255, 71, 71, 71));\r\n            }\r\n        }\r\n\r\n        public void LoadButtons()\r\n        {\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n            var buttonStyleResourceKey = isLightTheme ? \"CategoryButtonLightThemeStyle\" : \"CategoryButtonDarkThemeStyle\";\r\n            var buttonStyle = (Style)Resources[buttonStyleResourceKey];\r\n            _abcButton.Style = buttonStyle;\r\n            _recentsButton.Style = buttonStyle;\r\n            _cat0Button.Style = buttonStyle;\r\n            _cat1Button.Style = buttonStyle;\r\n            _cat2Button.Style = buttonStyle;\r\n            _cat3Button.Style = buttonStyle;\r\n            _cat4Button.Style = buttonStyle;\r\n\r\n            var repeatButtonStyleResourceKey = isLightTheme ? \"RepeatButtonLightThemeStyle\" : \"RepeatButtonDarkThemeStyle\";\r\n            _backspaceButton.Style = (Style)Resources[repeatButtonStyleResourceKey];\r\n\r\n            var prefix = isLightTheme ? \"light.\" : string.Empty;\r\n            _abcButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.abc\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _recentsButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.recent\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat0Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.category.1\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat1Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.category.2\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat2Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.category.3\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat3Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.category.4\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat4Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.category.5\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _backspaceButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.backspace\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n\r\n            Grid.SetColumn(_abcButton, 0);\r\n            Grid.SetColumn(_recentsButton, 1);\r\n            Grid.SetColumn(_cat0Button, 2);\r\n            Grid.SetColumn(_cat1Button, 3);\r\n            Grid.SetColumn(_cat2Button, 4);\r\n            Grid.SetColumn(_cat3Button, 5);\r\n            Grid.SetColumn(_cat4Button, 6);\r\n            Grid.SetColumn(_backspaceButton, 7);\r\n\r\n            ButtonsGrid.Children.Add(_abcButton);\r\n            ButtonsGrid.Children.Add(_recentsButton);\r\n            ButtonsGrid.Children.Add(_cat0Button);\r\n            ButtonsGrid.Children.Add(_cat1Button);\r\n            ButtonsGrid.Children.Add(_cat2Button);\r\n            ButtonsGrid.Children.Add(_cat3Button);\r\n            ButtonsGrid.Children.Add(_cat4Button);\r\n            ButtonsGrid.Children.Add(_backspaceButton);\r\n\r\n            _abcButton.Click += AbcButtonOnClick;\r\n            _cat0Button.Click += CategoryButtonClick;\r\n            _cat1Button.Click += CategoryButtonClick;\r\n            _cat2Button.Click += CategoryButtonClick;\r\n            _cat3Button.Click += CategoryButtonClick;\r\n            _cat4Button.Click += CategoryButtonClick;\r\n            _recentsButton.Click += CategoryButtonClick;\r\n            _backspaceButton.Click += BackspaceButtonOnClick;\r\n        }\r\n\r\n        private void AbcButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            TextBoxTarget.Focus();\r\n        }\r\n\r\n        private void CategoryButtonClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            if (sender == _cat0Button)\r\n                LoadCategory(0);\r\n            else if (sender == _cat1Button)\r\n                LoadCategory(1);\r\n            else if (sender == _cat2Button)\r\n                LoadCategory(2);\r\n            else if (sender == _cat3Button)\r\n                LoadCategory(3);\r\n            else if (sender == _cat4Button)\r\n                LoadCategory(4);\r\n            else if (sender == _recentsButton)\r\n                LoadCategory(RecentsCategoryIndex);\r\n        }\r\n\r\n        private void CreateButtonsBackgrounds(int categoryIndex)\r\n        {\r\n            var sprites = EmojiData.SpriteRowsCountByCategory[categoryIndex];\r\n            var buttonBackgroundColor = ButtonBackground;\r\n            for (var i = 0; i < sprites.Length; i++)\r\n            {\r\n                var rowsCount = sprites[i];\r\n\r\n                var block = new Rectangle\r\n                {\r\n                    Width = EmojiSpriteItem.SpriteWidth,\r\n                    Height = EmojiSpriteItem.RowHeight * rowsCount,\r\n                    Fill = buttonBackgroundColor,\r\n                    Margin = new Thickness(4, 0, 4, 0)\r\n                };\r\n                Canvas.SetTop(block, (EmojiSpriteItem.SpriteHeight) * i);\r\n                VirtPanel.Children.Insert(0, block);\r\n            }\r\n        }\r\n\r\n        private void InitializeOrientation(Orientation orientation)\r\n        {\r\n            switch (orientation)\r\n            {\r\n                case Orientation.Vertical:\r\n                    ButtonsGrid.Height = 78;\r\n                    ButtonsGrid.Margin = new Thickness(0, 6, 0, 0);\r\n                    EmojiContainer.Height = PortraitOrientationHeight;\r\n                    //_frameTransform.Y = -PortraitOrientationHeight;\r\n                    break;\r\n\r\n                case Orientation.Horizontal:\r\n                    ButtonsGrid.Height = 58;\r\n                    ButtonsGrid.Margin = new Thickness(0, 6, 0, 3);\r\n                    EmojiContainer.Height = AlbumOrientationHeight;\r\n                    //_frameTransform.Y = -AlbumOrientationHeight;\r\n                    break;\r\n            }\r\n        }\r\n\r\n        #endregion User Interface\r\n\r\n\r\n        /// <summary>\r\n        /// Orientation change handler\r\n        /// </summary>\r\n        private void OnSizeChanged(object sender, SizeChangedEventArgs sizeChangedEventArgs)\r\n        {\r\n            var currentOrientation = ((PhoneApplicationFrame)Application.Current.RootVisual).Orientation;\r\n            var isPortrait = currentOrientation == PageOrientation.PortraitUp ||\r\n                             currentOrientation == PageOrientation.PortraitDown ||\r\n                             currentOrientation == PageOrientation.Portrait;\r\n\r\n            if (_isPortrait == isPortrait && _wasRendered) return;\r\n\r\n            _isPortrait = isPortrait;\r\n            InitializeOrientation(isPortrait ? Orientation.Vertical : Orientation.Horizontal);\r\n        }\r\n\r\n        private void UIElement_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n\r\n            ((Border)sender).Background = (Brush)Application.Current.Resources[\"PhoneAccentBrush\"];\r\n        }\r\n\r\n        private void UIElement_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            ((Border) sender).Background = ButtonBackground;\r\n        }\r\n\r\n        private void UIElement_OnMouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            ((Border) sender).Background = ButtonBackground;\r\n        }\r\n\r\n        private void EmojiButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var button = (FrameworkElement)sender;\r\n            var emojiItem = (EmojiDataItem)button.DataContext;\r\n\r\n            OnEmojiSelected(sender, new EmojiSelectedEventArgs{DataItem = emojiItem});\r\n\r\n            ////RaiseEmojiAdded(new EmojiAddedEventArgs { Emoji = emojiItem.String });\r\n\r\n            //if (_currentCategory != RecentsCategoryIndex)\r\n            //{\r\n            //    var prevItem = RecentItems.FirstOrDefault(x => x.Code == emojiItem.Code);\r\n            //    if (prevItem != null)\r\n            //    {\r\n            //        RecentItems.Remove(prevItem);\r\n            //        RecentItems.Insert(0, prevItem);\r\n            //    }\r\n            //    else\r\n            //    {\r\n            //        RecentItems.Insert(0, emojiItem);\r\n            //        RecentItems = RecentItems.Take(30).ToList();\r\n            //    }\r\n            //}\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Controls/Emoji/EmojiData.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Emoji\r\n{\r\n    public class EmojiDataItem\r\n    {\r\n        public EmojiDataItem() { }\r\n\r\n        public EmojiDataItem(string string2, ulong code)\r\n        {\r\n            String = string2;\r\n            Code = code;\r\n        }\r\n\r\n        public string String { get; set; }\r\n        public ulong Code { get; set; }\r\n        public Uri Uri { get; set; }\r\n\r\n        public static string BuildString(ulong code)\r\n        {\r\n            var bytes = BitConverter.GetBytes(code);\r\n\r\n            var char1 = BitConverter.ToChar(bytes, 6);\r\n            var char2 = BitConverter.ToChar(bytes, 4);\r\n            var char3 = BitConverter.ToChar(bytes, 2);\r\n            var char4 = BitConverter.ToChar(bytes, 0);\r\n\r\n            string text;\r\n\r\n            if (char1 != 0)\r\n            {\r\n                text = new string(new [] { char1, char2, char3, char4 });\r\n            }\r\n            else if (char3 != 0)\r\n            {\r\n                text = new string(new [] { char3, char4 });\r\n            }\r\n            else\r\n            {\r\n                text = char4.ToString();\r\n            }\r\n\r\n            return text;\r\n        }\r\n\r\n        public static Uri BuildUri(string string2)\r\n        {\r\n            //var string3 = BitConverter.ToString(bytes.Take(4).Reverse().ToArray())\r\n            var string3 = string.Format(\"{0:X}\", (Int16) string2[0]);\r\n\r\n            switch (string2.Length)\r\n            {\r\n                case 2:\r\n                    {\r\n                        uint emoji = 0;\r\n                        emoji |= (uint) string2[0] << 16;\r\n                        emoji |= (uint) string2[1];\r\n\r\n                        return new Uri(string.Format(\"/Assets/Emoji/Separated/{0:X8}.png\", emoji), UriKind.Relative);\r\n                    }\r\n                case 4:\r\n                    {\r\n                        uint emoji1 = 0;\r\n                        emoji1 |= (uint) string2[0] << 16;\r\n                        emoji1 |= (uint) string2[1];\r\n\r\n                        ulong emoji2 = 0;\r\n                        emoji2 |= (uint) string2[2] << 16;\r\n                        emoji2 |= (uint) string2[3];\r\n\r\n                        return new Uri(string.Format(\"/Assets/Emoji/Separated/{0:X}{1:X}.png\", emoji1, emoji2), UriKind.Relative);\r\n                    }\r\n                default:\r\n                    return new Uri(string.Format(\"/Assets/Emoji/Separated/{0:X}.png\", (Int16) string2[0]), UriKind.Relative);\r\n            }\r\n        }\r\n\r\n        public static EmojiDataItem GetByIndex(int categoryIndex, int spriteIndex, int itemIndex)\r\n        {\r\n\r\n            var category = EmojiData.CodesByCategory[categoryIndex];\r\n            var emojiIndex = spriteIndex * EmojiData.ItemsInSprite + itemIndex;\r\n\r\n            if (category.Length <= emojiIndex) return null; // out of bounds\r\n\r\n            ulong code = category[emojiIndex];\r\n\r\n            var result = new EmojiDataItem\r\n            {\r\n                Code = code,\r\n                String = BuildString(code)\r\n            };\r\n            result.Uri = BuildUri(result.String);\r\n\r\n            return result;\r\n        }\r\n    }\r\n\r\n    public static class EmojiData\r\n    {\r\n        public static List<EmojiDataItem> Recents;\r\n\r\n        public static void AddToRecents(EmojiDataItem emojiDataItem)\r\n        {\r\n            if (Recents == null)\r\n            {\r\n                LoadRecents();\r\n                if (Recents == null)\r\n                {\r\n                    Recents = new List<EmojiDataItem>();\r\n                }\r\n            }\r\n\r\n            var prevItem = Recents.FirstOrDefault(x => x.Code == emojiDataItem.Code);\r\n            if (prevItem != null)\r\n            {\r\n                Recents.Remove(prevItem);\r\n                Recents.Insert(0, prevItem);\r\n            }\r\n            else\r\n            {\r\n                Recents.Insert(0, emojiDataItem);\r\n                Recents = Recents.Take(42).ToList();\r\n            }\r\n\r\n            SaveRecents();\r\n        }\r\n\r\n        public static void LoadRecents()\r\n        {\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(\"EmojiRecents\")) return;\r\n                using (var stream = new IsolatedStorageFileStream(\"EmojiRecents\", FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite, store))\r\n                {\r\n                    if (stream.Length <= 0) return;\r\n\r\n                    using (var br = new BinaryReader(stream))\r\n                    {\r\n                        var count = br.ReadInt32();\r\n\r\n                        Recents = new List<EmojiDataItem>();\r\n\r\n                        for (var i = 0; i < count; i++)\r\n                        {\r\n                            var emoji = new EmojiDataItem(br.ReadString(), br.ReadUInt64());\r\n                            emoji.Uri = EmojiDataItem.BuildUri(emoji.String);\r\n                            Recents.Add(emoji);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static IList<EmojiDataItem> LoadDefaultRecents()\r\n        {\r\n            return new List<EmojiDataItem>\r\n            {\r\n                new EmojiDataItem{Code = 1, String = \"😂\"},\r\n                new EmojiDataItem{Code = 1, String = \"😘\"},\r\n                new EmojiDataItem{Code = 1, String = \"❤\"},\r\n                new EmojiDataItem{Code = 1, String = \"😍\"},\r\n                new EmojiDataItem{Code = 1, String = \"😊\"},\r\n                new EmojiDataItem{Code = 1, String = \"😁\"},\r\n                new EmojiDataItem{Code = 1, String = \"👍\"},\r\n                new EmojiDataItem{Code = 1, String = \"☺\"},\r\n                new EmojiDataItem{Code = 1, String = \"😔\"},\r\n                //new EmojiDataItem{Code = 1, String = \"😂 😘 ❤ 😍 😊 😁 👍 ☺ 😔 😄 😭 💋 😒 😳 😜 🙈 😉 😃 😢 😝 😱 😡 😏 😞 😅 😚 🙊 😌 😀 😋 😆 👌 😐 😕\"},\r\n            };\r\n        }\r\n\r\n        public static void SaveRecents()\r\n        {\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var stream = new IsolatedStorageFileStream(\"EmojiRecents\", FileMode.Create, FileAccess.Write, FileShare.ReadWrite, store))\r\n                {\r\n                    using (var bw = new BinaryWriter(stream))\r\n                    {\r\n                        var emojies = Recents.ToList();\r\n\r\n                        bw.Write(emojies.Count);\r\n\r\n                        foreach (var item in emojies)\r\n                        {\r\n                            bw.Write(item.String);\r\n                            bw.Write(item.Code);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public const int ItemsInRow = 6;\r\n        public const int ItemsInSprite = 36;\r\n\r\n        /// <summary>\r\n        /// Custom spaced sprites by category\r\n        /// </summary>\r\n        public static Uri[][] SpritesByCategory =\r\n        {\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part3.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part4.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part5.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part3.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part3.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part4.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part5.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part6.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat3_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat3_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat3_part2.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part3.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part4.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part5.png\", UriKind.Relative),\r\n            },\r\n        };\r\n\r\n        /// <summary>\r\n        /// Config of rows count for sprites in categories\r\n        /// </summary>\r\n        public static int[][] SpriteRowsCountByCategory = \r\n        {\r\n            new [] { 6, 6, 6, 6, 6, 2 },\r\n            new [] { 6, 6, 6, 2 },\r\n            new [] { 6, 6, 6, 6, 6, 6, 3 },\r\n            new [] { 6, 6, 5 }, \r\n            new [] { 6, 6, 6, 6, 6, 5 }\r\n        };\r\n\r\n        /// <summary>\r\n        /// Config of missing cells in last row for each last category's sprite\r\n        /// </summary>\r\n        public static int[] SpriteMissingCellsByCategory =\r\n        {\r\n            3, 4, 4, 1, 1\r\n        };\r\n\r\n        /// <summary>\r\n        /// Emoji codes combined into the groups corresponding to the categories in the interface\r\n        /// </summary>\r\n        public static ulong[][] CodesByCategory = {\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83DDE04L, 0x00000000D83DDE03L, 0x00000000D83DDE00L, 0x00000000D83DDE0AL, 0x000000000000263AL, 0x00000000D83DDE09L, 0x00000000D83DDE0DL,\r\n\t\t\t0x00000000D83DDE18L, 0x00000000D83DDE1AL, 0x00000000D83DDE17L, 0x00000000D83DDE19L, 0x00000000D83DDE1CL, 0x00000000D83DDE1DL, 0x00000000D83DDE1BL,\r\n\t\t\t0x00000000D83DDE33L, 0x00000000D83DDE01L, 0x00000000D83DDE14L, 0x00000000D83DDE0CL, 0x00000000D83DDE12L, 0x00000000D83DDE1EL, 0x00000000D83DDE23L,\r\n\t\t\t0x00000000D83DDE22L, 0x00000000D83DDE02L, 0x00000000D83DDE2DL, 0x00000000D83DDE2AL, 0x00000000D83DDE25L, 0x00000000D83DDE30L, 0x00000000D83DDE05L,\r\n\t\t\t0x00000000D83DDE13L, 0x00000000D83DDE29L, 0x00000000D83DDE2BL, 0x00000000D83DDE28L, 0x00000000D83DDE31L, 0x00000000D83DDE20L, 0x00000000D83DDE21L,\r\n\t\t\t0x00000000D83DDE24L, 0x00000000D83DDE16L, 0x00000000D83DDE06L, 0x00000000D83DDE0BL, 0x00000000D83DDE37L, 0x00000000D83DDE0EL, 0x00000000D83DDE34L,\r\n\t\t\t0x00000000D83DDE35L, 0x00000000D83DDE32L, 0x00000000D83DDE1FL, 0x00000000D83DDE26L, 0x00000000D83DDE27L, 0x00000000D83DDE08L, 0x00000000D83DDC7FL,\r\n\t\t\t0x00000000D83DDE2EL, 0x00000000D83DDE2CL, 0x00000000D83DDE10L, 0x00000000D83DDE15L, 0x00000000D83DDE2FL, 0x00000000D83DDE36L, 0x00000000D83DDE07L,\r\n\t\t\t0x00000000D83DDE0FL, 0x00000000D83DDE11L, 0x00000000D83DDC72L, 0x00000000D83DDC73L, 0x00000000D83DDC6EL, 0x00000000D83DDC77L, 0x00000000D83DDC82L,\r\n\t\t\t0x00000000D83DDC76L, 0x00000000D83DDC66L, 0x00000000D83DDC67L, 0x00000000D83DDC68L, 0x00000000D83DDC69L, 0x00000000D83DDC74L, 0x00000000D83DDC75L,\r\n\t\t\t0x00000000D83DDC71L, 0x00000000D83DDC7CL, 0x00000000D83DDC78L, 0x00000000D83DDE3AL, 0x00000000D83DDE38L, 0x00000000D83DDE3BL, 0x00000000D83DDE3DL,\r\n\t\t\t0x00000000D83DDE3CL, 0x00000000D83DDE40L, 0x00000000D83DDE3FL, 0x00000000D83DDE39L, 0x00000000D83DDE3EL, 0x00000000D83DDC79L, 0x00000000D83DDC7AL,\r\n\t\t\t0x00000000D83DDE48L, 0x00000000D83DDE49L, 0x00000000D83DDE4AL, 0x00000000D83DDC80L, 0x00000000D83DDC7DL, 0x00000000D83DDCA9L, 0x00000000D83DDD25L,\r\n\t\t\t0x0000000000002728L, 0x00000000D83CDF1FL, 0x00000000D83DDCABL, 0x00000000D83DDCA5L, 0x00000000D83DDCA2L, 0x00000000D83DDCA6L, 0x00000000D83DDCA7L,\r\n\t\t\t0x00000000D83DDCA4L, 0x00000000D83DDCA8L, 0x00000000D83DDC42L, 0x00000000D83DDC40L, 0x00000000D83DDC43L, 0x00000000D83DDC45L, 0x00000000D83DDC44L,\r\n\t\t\t0x00000000D83DDC4DL, 0x00000000D83DDC4EL, 0x00000000D83DDC4CL, 0x00000000D83DDC4AL, 0x000000000000270AL, 0x000000000000270CL, 0x00000000D83DDC4BL,\r\n\t\t\t0x000000000000270BL, 0x00000000D83DDC50L, 0x00000000D83DDC46L, 0x00000000D83DDC47L, 0x00000000D83DDC49L, 0x00000000D83DDC48L, 0x00000000D83DDE4CL,\r\n\t\t\t0x00000000D83DDE4FL, 0x000000000000261DL, 0x00000000D83DDC4FL, 0x00000000D83DDCAAL, 0x00000000D83DDEB6L, 0x00000000D83CDFC3L, 0x00000000D83DDC83L,\r\n\t\t\t0x00000000D83DDC6BL, 0x00000000D83DDC6AL, 0x00000000D83DDC6CL, 0x00000000D83DDC6DL, 0x00000000D83DDC8FL, 0x00000000D83DDC91L, 0x00000000D83DDC6FL,\r\n\t\t\t0x00000000D83DDE46L, 0x00000000D83DDE45L, 0x00000000D83DDC81L, 0x00000000D83DDE4BL, 0x00000000D83DDC86L, 0x00000000D83DDC87L, 0x00000000D83DDC85L,\r\n\t\t\t0x00000000D83DDC70L, 0x00000000D83DDE4EL, 0x00000000D83DDE4DL, 0x00000000D83DDE47L, 0x00000000D83CDFA9L, 0x00000000D83DDC51L, 0x00000000D83DDC52L,\r\n\t\t\t0x00000000D83DDC5FL, 0x00000000D83DDC5EL, 0x00000000D83DDC61L, 0x00000000D83DDC60L, 0x00000000D83DDC62L, 0x00000000D83DDC55L, 0x00000000D83DDC54L,\r\n\t\t\t0x00000000D83DDC5AL, 0x00000000D83DDC57L, 0x00000000D83CDFBDL, 0x00000000D83DDC56L, 0x00000000D83DDC58L, 0x00000000D83DDC59L, 0x00000000D83DDCBCL,\r\n\t\t\t0x00000000D83DDC5CL, 0x00000000D83DDC5DL, 0x00000000D83DDC5BL, 0x00000000D83DDC53L, 0x00000000D83CDF80L, 0x00000000D83CDF02L, 0x00000000D83DDC84L,\r\n\t\t\t0x00000000D83DDC9BL, 0x00000000D83DDC99L, 0x00000000D83DDC9CL, 0x00000000D83DDC9AL, 0x0000000000002764L, 0x00000000D83DDC94L, 0x00000000D83DDC97L,\r\n\t\t\t0x00000000D83DDC93L, 0x00000000D83DDC95L, 0x00000000D83DDC96L, 0x00000000D83DDC9EL, 0x00000000D83DDC98L, 0x00000000D83DDC8CL, 0x00000000D83DDC8BL,\r\n\t\t\t0x00000000D83DDC8DL, 0x00000000D83DDC8EL, 0x00000000D83DDC64L, 0x00000000D83DDC65L, 0x00000000D83DDCACL, 0x00000000D83DDC63L, 0x00000000D83DDCADL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83DDC36L, 0x00000000D83DDC3AL, 0x00000000D83DDC31L, 0x00000000D83DDC2DL, 0x00000000D83DDC39L, 0x00000000D83DDC30L, 0x00000000D83DDC38L, 0x00000000D83DDC2FL,\r\n\t\t\t0x00000000D83DDC28L, 0x00000000D83DDC3BL, 0x00000000D83DDC37L, 0x00000000D83DDC3DL, 0x00000000D83DDC2EL, 0x00000000D83DDC17L, 0x00000000D83DDC35L,\r\n\t\t\t0x00000000D83DDC12L, 0x00000000D83DDC34L, 0x00000000D83DDC11L, 0x00000000D83DDC18L, 0x00000000D83DDC3CL, 0x00000000D83DDC27L, 0x00000000D83DDC26L,\r\n\t\t\t0x00000000D83DDC24L, 0x00000000D83DDC25L, 0x00000000D83DDC23L, 0x00000000D83DDC14L, 0x00000000D83DDC0DL, 0x00000000D83DDC22L, 0x00000000D83DDC1BL,\r\n\t\t\t0x00000000D83DDC1DL, 0x00000000D83DDC1CL, 0x00000000D83DDC1EL, 0x00000000D83DDC0CL, 0x00000000D83DDC19L, 0x00000000D83DDC1AL, 0x00000000D83DDC20L,\r\n\t\t\t0x00000000D83DDC1FL, 0x00000000D83DDC2CL, 0x00000000D83DDC33L, 0x00000000D83DDC0BL, 0x00000000D83DDC04L, 0x00000000D83DDC0FL, 0x00000000D83DDC00L,\r\n\t\t\t0x00000000D83DDC03L, 0x00000000D83DDC05L, 0x00000000D83DDC07L, 0x00000000D83DDC09L, 0x00000000D83DDC0EL, 0x00000000D83DDC10L, 0x00000000D83DDC13L,\r\n\t\t\t0x00000000D83DDC15L, 0x00000000D83DDC16L, 0x00000000D83DDC01L, 0x00000000D83DDC02L, 0x00000000D83DDC32L, 0x00000000D83DDC21L, 0x00000000D83DDC0AL,\r\n\t\t\t0x00000000D83DDC2BL, 0x00000000D83DDC2AL, 0x00000000D83DDC06L, 0x00000000D83DDC08L, 0x00000000D83DDC29L, 0x00000000D83DDC3EL, 0x00000000D83DDC90L,\r\n\t\t\t0x00000000D83CDF38L, 0x00000000D83CDF37L, 0x00000000D83CDF40L, 0x00000000D83CDF39L, 0x00000000D83CDF3BL, 0x00000000D83CDF3AL, 0x00000000D83CDF41L,\r\n\t\t\t0x00000000D83CDF43L, 0x00000000D83CDF42L, 0x00000000D83CDF3FL, 0x00000000D83CDF3EL, 0x00000000D83CDF44L, 0x00000000D83CDF35L, 0x00000000D83CDF34L,\r\n\t\t\t0x00000000D83CDF32L, 0x00000000D83CDF33L, 0x00000000D83CDF30L, 0x00000000D83CDF31L, 0x00000000D83CDF3CL, 0x00000000D83CDF10L, 0x00000000D83CDF1EL,\r\n\t\t\t0x00000000D83CDF1DL, 0x00000000D83CDF1AL, 0x00000000D83CDF11L, 0x00000000D83CDF12L, 0x00000000D83CDF13L, 0x00000000D83CDF14L, 0x00000000D83CDF15L,\r\n\t\t\t0x00000000D83CDF16L, 0x00000000D83CDF17L, 0x00000000D83CDF18L, 0x00000000D83CDF1CL, 0x00000000D83CDF1BL, 0x00000000D83CDF19L, 0x00000000D83CDF0DL,\r\n\t\t\t0x00000000D83CDF0EL, 0x00000000D83CDF0FL, 0x00000000D83CDF0BL, 0x00000000D83CDF0CL, 0x00000000D83CDF20L, 0x0000000000002B50L, 0x0000000000002600L,\r\n\t\t\t0x00000000000026C5L, 0x0000000000002601L, 0x00000000000026A1L, 0x0000000000002614L, 0x0000000000002744L, 0x00000000000026C4L, 0x00000000D83CDF00L,\r\n\t\t\t0x00000000D83CDF01L, 0x00000000D83CDF08L, 0x00000000D83CDF0AL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83CDF8DL, 0x00000000D83DDC9DL, 0x00000000D83CDF8EL, 0x00000000D83CDF92L, 0x00000000D83CDF93L, 0x00000000D83CDF8FL, 0x00000000D83CDF86L, 0x00000000D83CDF87L,\r\n\t\t\t0x00000000D83CDF90L, 0x00000000D83CDF91L, 0x00000000D83CDF83L, 0x00000000D83DDC7BL, 0x00000000D83CDF85L, 0x00000000D83CDF84L, 0x00000000D83CDF81L,\r\n\t\t\t0x00000000D83CDF8BL, 0x00000000D83CDF89L, 0x00000000D83CDF8AL, 0x00000000D83CDF88L, 0x00000000D83CDF8CL, 0x00000000D83DDD2EL, 0x00000000D83CDFA5L,\r\n\t\t\t0x00000000D83DDCF7L, 0x00000000D83DDCF9L, 0x00000000D83DDCFCL, 0x00000000D83DDCBFL, 0x00000000D83DDCC0L, 0x00000000D83DDCBDL, 0x00000000D83DDCBEL,\r\n\t\t\t0x00000000D83DDCBBL, 0x00000000D83DDCF1L, 0x000000000000260EL, 0x00000000D83DDCDEL, 0x00000000D83DDCDFL, 0x00000000D83DDCE0L, 0x00000000D83DDCE1L,\r\n\t\t\t0x00000000D83DDCFAL, 0x00000000D83DDCFBL, 0x00000000D83DDD0AL, 0x00000000D83DDD09L, 0x00000000D83DDD08L, 0x00000000D83DDD07L, 0x00000000D83DDD14L,\r\n\t\t\t0x00000000D83DDD14L, 0x00000000D83DDCE2L, 0x00000000D83DDCE3L, 0x00000000000023F3L, 0x000000000000231BL, 0x00000000000023F0L, 0x000000000000231AL,\r\n\t\t\t0x00000000D83DDD13L, 0x00000000D83DDD12L, 0x00000000D83DDD0FL, 0x00000000D83DDD10L, 0x00000000D83DDD11L, 0x00000000D83DDD0EL, 0x00000000D83DDCA1L,\r\n\t\t\t0x00000000D83DDD26L, 0x00000000D83DDD06L, 0x00000000D83DDD05L, 0x00000000D83DDD0CL, 0x00000000D83DDD0BL, 0x00000000D83DDD0DL, 0x00000000D83DDEC1L /* was missing */, 0x00000000D83DDEC0L,\r\n\t\t\t0x00000000D83DDEBFL, 0x00000000D83DDEBDL, 0x00000000D83DDD27L, 0x00000000D83DDD29L, 0x00000000D83DDD28L, 0x00000000D83DDEAAL, 0x00000000D83DDEACL,\r\n\t\t\t0x00000000D83DDCA3L, 0x00000000D83DDD2BL, 0x00000000D83DDD2AL, 0x00000000D83DDC8AL, 0x00000000D83DDC89L, 0x00000000D83DDCB0L, 0x00000000D83DDCB4L,\r\n\t\t\t0x00000000D83DDCB5L, 0x00000000D83DDCB7L, 0x00000000D83DDCB6L, 0x00000000D83DDCB3L, 0x00000000D83DDCB8L, 0x00000000D83DDCF2L, 0x00000000D83DDCE7L,\r\n\t\t\t0x00000000D83DDCE5L, 0x00000000D83DDCE4L, 0x0000000000002709L, 0x00000000D83DDCE9L, 0x00000000D83DDCE8L, 0x00000000D83DDCEFL, 0x00000000D83DDCEBL,\r\n\t\t\t0x00000000D83DDCEAL, 0x00000000D83DDCECL, 0x00000000D83DDCEDL, 0x00000000D83DDCEEL, 0x00000000D83DDCE6L, 0x00000000D83DDCDDL, 0x00000000D83DDCC4L,\r\n\t\t\t0x00000000D83DDCC3L, 0x00000000D83DDCD1L, 0x00000000D83DDCCAL, 0x00000000D83DDCC8L, 0x00000000D83DDCC9L, 0x00000000D83DDCDCL, 0x00000000D83DDCCBL,\r\n\t\t\t0x00000000D83DDCC5L, 0x00000000D83DDCC6L, 0x00000000D83DDCC7L, 0x00000000D83DDCC1L, 0x00000000D83DDCC2L, 0x0000000000002702L, 0x00000000D83DDCCCL,\r\n\t\t\t0x00000000D83DDCCEL, 0x0000000000002712L, 0x000000000000270FL, 0x00000000D83DDCCFL, 0x00000000D83DDCD0L, 0x00000000D83DDCD5L, 0x00000000D83DDCD7L,\r\n\t\t\t0x00000000D83DDCD8L, 0x00000000D83DDCD9L, 0x00000000D83DDCD3L, 0x00000000D83DDCD4L, 0x00000000D83DDCD2L, 0x00000000D83DDCDAL, 0x00000000D83DDCD6L,\r\n\t\t\t0x00000000D83DDD16L, 0x00000000D83DDCDBL, 0x00000000D83DDD2CL, 0x00000000D83DDD2DL, 0x00000000D83DDCF0L, 0x00000000D83CDFA8L, 0x00000000D83CDFACL,\r\n\t\t\t0x00000000D83CDFA4L, 0x00000000D83CDFA7L, 0x00000000D83CDFBCL, 0x00000000D83CDFB5L, 0x00000000D83CDFB6L, 0x00000000D83CDFB9L, 0x00000000D83CDFBBL,\r\n\t\t\t0x00000000D83CDFBAL, 0x00000000D83CDFB7L, 0x00000000D83CDFB8L, 0x00000000D83DDC7EL, 0x00000000D83CDFAEL, 0x00000000D83CDCCFL, 0x00000000D83CDFB4L,\r\n\t\t\t0x00000000D83CDC04L, 0x00000000D83CDFB2L, 0x00000000D83CDFAFL, 0x00000000D83CDFC8L, 0x00000000D83CDFC0L, 0x00000000000026BDL, 0x00000000000026BEL,\r\n\t\t\t0x00000000D83CDFBEL, 0x00000000D83CDFB1L, 0x00000000D83CDFC9L, 0x00000000D83CDFB3L, 0x00000000000026F3L, 0x00000000D83DDEB5L, 0x00000000D83DDEB4L,\r\n\t\t\t0x00000000D83CDFC1L, 0x00000000D83CDFC7L, 0x00000000D83CDFC6L, 0x00000000D83CDFBFL, 0x00000000D83CDFC2L, 0x00000000D83CDFCAL, 0x00000000D83CDFC4L,\r\n\t\t\t0x00000000D83CDFA3L, 0x0000000000002615L, 0x00000000D83CDF75L, 0x00000000D83CDF76L, 0x00000000D83CDF7CL, 0x00000000D83CDF7AL, 0x00000000D83CDF7BL,\r\n\t\t\t0x00000000D83CDF78L, 0x00000000D83CDF79L, 0x00000000D83CDF77L, 0x00000000D83CDF74L, 0x00000000D83CDF55L, 0x00000000D83CDF54L, 0x00000000D83CDF5FL,\r\n\t\t\t0x00000000D83CDF57L, 0x00000000D83CDF56L, 0x00000000D83CDF5DL, 0x00000000D83CDF5BL, 0x00000000D83CDF64L, 0x00000000D83CDF71L, 0x00000000D83CDF63L,\r\n\t\t\t0x00000000D83CDF65L, 0x00000000D83CDF59L, 0x00000000D83CDF58L, 0x00000000D83CDF5AL, 0x00000000D83CDF5CL, 0x00000000D83CDF72L, 0x00000000D83CDF62L,\r\n\t\t\t0x00000000D83CDF61L, 0x00000000D83CDF73L, 0x00000000D83CDF5EL, 0x00000000D83CDF69L, 0x00000000D83CDF6EL, 0x00000000D83CDF66L, 0x00000000D83CDF68L,\r\n\t\t\t0x00000000D83CDF67L, 0x00000000D83CDF82L, 0x00000000D83CDF70L, 0x00000000D83CDF6AL, 0x00000000D83CDF6BL, 0x00000000D83CDF6CL, 0x00000000D83CDF6DL,\r\n\t\t\t0x00000000D83CDF6FL, 0x00000000D83CDF4EL, 0x00000000D83CDF4FL, 0x00000000D83CDF4AL, 0x00000000D83CDF4BL, 0x00000000D83CDF52L, 0x00000000D83CDF47L,\r\n\t\t\t0x00000000D83CDF49L, 0x00000000D83CDF53L, 0x00000000D83CDF51L, 0x00000000D83CDF48L, 0x00000000D83CDF4CL, 0x00000000D83CDF50L, 0x00000000D83CDF4DL,\r\n\t\t\t0x00000000D83CDF60L, 0x00000000D83CDF46L, 0x00000000D83CDF45L, 0x00000000D83CDF3DL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83CDFE0L, 0x00000000D83CDFE1L, 0x00000000D83CDFEBL, 0x00000000D83CDFE2L, 0x00000000D83CDFE3L, 0x00000000D83CDFE5L, 0x00000000D83CDFE6L, 0x00000000D83CDFEAL,\r\n\t\t\t0x00000000D83CDFE9L, 0x00000000D83CDFE8L, 0x00000000D83DDC92L, 0x00000000000026EAL, 0x00000000D83CDFECL, 0x00000000D83CDFE4L, 0x00000000D83CDF07L,\r\n\t\t\t0x00000000D83CDF06L, 0x00000000D83CDFEFL, 0x00000000D83CDFF0L, 0x00000000000026FAL, 0x00000000D83CDFEDL, 0x00000000D83DDDFCL, 0x00000000D83DDDFEL,\r\n\t\t\t0x00000000D83DDDFBL, 0x00000000D83CDF04L, 0x00000000D83CDF05L, 0x00000000D83CDF03L, 0x00000000D83DDDFDL, 0x00000000D83CDF09L, 0x00000000D83CDFA0L,\r\n\t\t\t0x00000000D83CDFA1L, 0x00000000000026F2L, 0x00000000D83CDFA2L, 0x00000000D83DDEA2L, 0x00000000000026F5L, 0x00000000D83DDEA4L, 0x00000000D83DDEA3L,\r\n\t\t\t0x0000000000002693L, 0x00000000D83DDE80L, 0x0000000000002708L, 0x00000000D83DDCBAL, 0x00000000D83DDE81L, 0x00000000D83DDE82L, 0x00000000D83DDE8AL,\r\n\t\t\t0x00000000D83DDE89L, 0x00000000D83DDE9EL, 0x00000000D83DDE86L, 0x00000000D83DDE84L, 0x00000000D83DDE85L, 0x00000000D83DDE88L, 0x00000000D83DDE87L,\r\n\t\t\t0x00000000D83DDE9DL, 0x00000000D83DDE8BL, 0x00000000D83DDE83L, 0x00000000D83DDE8EL, 0x00000000D83DDE8CL, 0x00000000D83DDE8DL, 0x00000000D83DDE99L,\r\n\t\t\t0x00000000D83DDE98L, 0x00000000D83DDE97L, 0x00000000D83DDE95L, 0x00000000D83DDE96L, 0x00000000D83DDE9BL, 0x00000000D83DDE9AL, 0x00000000D83DDEA8L,\r\n\t\t\t0x00000000D83DDE93L, 0x00000000D83DDE94L, 0x00000000D83DDE92L, 0x00000000D83DDE91L, 0x00000000D83DDE90L, 0x00000000D83DDEB2L, 0x00000000D83DDEA1L,\r\n\t\t\t0x00000000D83DDE9FL, 0x00000000D83DDEA0L, 0x00000000D83DDE9CL, 0x00000000D83DDC88L, 0x00000000D83DDE8FL, 0x00000000D83CDFABL, 0x00000000D83DDEA6L,\r\n\t\t\t0x00000000D83DDEA5L, 0x00000000000026A0L, 0x00000000D83DDEA7L, 0x00000000D83DDD30L, 0x00000000000026FDL, 0x00000000D83CDFEEL, 0x00000000D83CDFB0L,\r\n\t\t\t0x0000000000002668L, 0x00000000D83DDDFFL, 0x00000000D83CDFAAL, 0x00000000D83CDFADL, 0x00000000D83DDCCDL, 0x00000000D83DDEA9L, 0xD83CDDEFD83CDDF5L,\r\n\t\t\t0xD83CDDF0D83CDDF7L, 0xD83CDDE9D83CDDEAL, 0xD83CDDE8D83CDDF3L, 0xD83CDDFAD83CDDF8L, 0xD83CDDEBD83CDDF7L, 0xD83CDDEAD83CDDF8L, 0xD83CDDEED83CDDF9L,\r\n\t\t\t0xD83CDDF7D83CDDFAL, 0xD83CDDECD83CDDE7L},\r\n\t\t\tnew ulong[]{\r\n            0x00000000003120E3L, 0x00000000003220E3L, 0x00000000003320E3L, 0x00000000003420E3L, 0x00000000003520E3L, 0x00000000003620E3L, 0x00000000003720E3L, 0x00000000003820E3L,\r\n\t\t\t0x00000000003920E3L, 0x00000000003020E3L, 0x00000000D83DDD1FL, 0x00000000D83DDD22L, 0x00000000002320E3L, 0x00000000D83DDD23L, 0x0000000000002B06L,\r\n\t\t\t0x0000000000002B07L, 0x0000000000002B05L, 0x00000000000027A1L, 0x00000000D83DDD20L, 0x00000000D83DDD21L, 0x00000000D83DDD24L, 0x0000000000002197L,\r\n\t\t\t0x0000000000002196L, 0x0000000000002198L, 0x0000000000002199L, 0x0000000000002194L, 0x0000000000002195L, 0x00000000D83DDD04L, 0x00000000000025C0L,\r\n\t\t\t0x00000000000025B6L, 0x00000000D83DDD3CL, 0x00000000D83DDD3DL, 0x00000000000021A9L, 0x00000000000021AAL, 0x0000000000002139L, 0x00000000000023EAL,\r\n\t\t\t0x00000000000023E9L, 0x00000000000023EBL, 0x00000000000023ECL, 0x0000000000002935L, 0x0000000000002934L, 0x00000000D83CDD97L, 0x00000000D83DDD00L,\r\n\t\t\t0x00000000D83DDD01L, 0x00000000D83DDD02L, 0x00000000D83CDD95L, 0x00000000D83CDD99L, 0x00000000D83CDD92L, 0x00000000D83CDD93L, 0x00000000D83CDD96L,\r\n\t\t\t0x00000000D83DDCF6L, 0x00000000D83CDFA6L, 0x00000000D83CDE01L, 0x00000000D83CDE2FL, 0x00000000D83CDE33L, 0x00000000D83CDE35L, 0x00000000D83CDE34L /* was missing */, 0x00000000D83CDE32L,\r\n\t\t\t0x00000000D83CDE50L /* //34 was wrong */, 0x00000000D83CDE39L /* //32 was duplicate */, /* removed 3 */  0x00000000D83CDE3AL, 0x00000000D83CDE36L, 0x00000000D83CDE1AL,\r\n\t\t\t0x00000000D83DDEBBL, 0x00000000D83DDEB9L, 0x00000000D83DDEBAL, 0x00000000D83DDEBCL, 0x00000000D83DDEBEL, 0x00000000D83DDEB0L, 0x00000000D83DDEAEL,\r\n\t\t\t0x00000000D83CDD7FL, 0x000000000000267FL, 0x00000000D83DDEADL, 0x00000000D83CDE37L, 0x00000000D83CDE38L, 0x00000000D83CDE02L, 0x00000000000024C2L,\r\n            /* missing 4 unicodes */\r\n            0x00000000D83DDEC2L, 0x00000000D83DDEC4L, 0x00000000D83DDEC5L, 0x00000000D83DDEC3L,\r\n\t\t\t0x00000000D83CDE51L, 0x0000000000003299L, 0x0000000000003297L, 0x00000000D83CDD91L, 0x00000000D83CDD98L, 0x00000000D83CDD94L, 0x00000000D83DDEABL,\r\n\t\t\t0x00000000D83DDD1EL, 0x00000000D83DDCF5L, 0x00000000D83DDEAFL, 0x00000000D83DDEB1L, 0x00000000D83DDEB3L, 0x00000000D83DDEB7L, 0x00000000D83DDEB8L,\r\n\t\t\t0x00000000000026D4L, 0x0000000000002733L, 0x0000000000002747L, 0x000000000000274EL, 0x0000000000002705L, 0x0000000000002734L, 0x00000000D83DDC9FL,\r\n\t\t\t0x00000000D83CDD9AL, 0x00000000D83DDCF3L, 0x00000000D83DDCF4L, 0x00000000D83CDD70L, 0x00000000D83CDD71L, 0x00000000D83CDD8EL, 0x00000000D83CDD7EL,\r\n\t\t\t0x00000000D83DDCA0L, 0x00000000000027BFL, 0x000000000000267BL, 0x0000000000002648L, 0x0000000000002649L, 0x000000000000264AL, 0x000000000000264BL,\r\n\t\t\t0x000000000000264CL, 0x000000000000264DL, 0x000000000000264EL, 0x000000000000264FL, 0x0000000000002650L, 0x0000000000002651L, 0x0000000000002652L,\r\n\t\t\t0x0000000000002653L, 0x00000000000026CEL, 0x00000000D83DDD2FL, 0x00000000D83CDFE7L, 0x00000000D83DDCB9L, 0x00000000D83DDCB2L, 0x00000000D83DDCB1L,\r\n\t\t\t0x00000000000000A9L, 0x00000000000000AEL, 0x0000000000002122L /* TM */, \r\n            /* was mixed, missing 2-3 */\r\n            0x000000000000274CL, 0x000000000000203CL, 0x0000000000002049L, 0x0000000000002757L, 0x0000000000002753L, 0x0000000000002755L, 0x0000000000002754L, 0x0000000000002B55L,\r\n            0x00000000D83DDD1DL, 0x00000000D83DDD1AL,\r\n\t\t\t0x00000000D83DDD19L, 0x00000000D83DDD1BL, 0x00000000D83DDD1CL,\r\n            0x00000000D83DDD03L, 0x00000000D83DDD5BL, 0x00000000D83DDD67L, 0x00000000D83DDD50L, 0x00000000D83DDD5CL,\r\n\t\t\t0x00000000D83DDD51L, 0x00000000D83DDD5DL, 0x00000000D83DDD52L, 0x00000000D83DDD5EL, 0x00000000D83DDD53L, 0x00000000D83DDD5FL, 0x00000000D83DDD54L,\r\n\t\t\t0x00000000D83DDD60L, 0x00000000D83DDD55L, 0x00000000D83DDD56L, 0x00000000D83DDD57L, 0x00000000D83DDD58L, 0x00000000D83DDD59L, 0x00000000D83DDD5AL,\r\n\t\t\t0x00000000D83DDD61L, 0x00000000D83DDD62L, 0x00000000D83DDD63L, 0x00000000D83DDD64L, 0x00000000D83DDD65L, 0x00000000D83DDD66L, 0x0000000000002716L,\r\n\t\t\t0x0000000000002795L, 0x0000000000002796L, 0x0000000000002797L, 0x0000000000002660L, 0x0000000000002665L, 0x0000000000002663L, 0x0000000000002666L,\r\n\t\t\t0x00000000D83DDCAEL, 0x00000000D83DDCAFL, 0x0000000000002714L, 0x0000000000002611L, 0x00000000D83DDD18L, 0x00000000D83DDD17L, 0x00000000000027B0L,\r\n            0x0000000000003030L, 0x000000000000303DL, 0x00000000D83DDD31L, \r\n            0x00000000000025FCL, 0x00000000000025FBL, 0x00000000000025FEL, 0x00000000000025FDL,\r\n\t\t\t0x00000000000025AAL, 0x00000000000025ABL,\r\n            0x00000000D83DDD3AL, 0x00000000D83DDD32L, 0x00000000D83DDD33L, 0x00000000000026ABL, 0x00000000000026AAL,\r\n\t\t\t0x00000000D83DDD34L, 0x00000000D83DDD35L, 0x00000000D83DDD3BL, 0x0000000000002B1CL, 0x0000000000002B1BL, 0x00000000D83DDD36L, 0x00000000D83DDD37L, 0x00000000D83DDD38L, 0x00000000D83DDD39L}};\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Controls/Emoji/EmojiSpriteItem.cs",
    "content": "﻿using System;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Shapes;\r\nusing Telegram.Controls.VirtualizedView;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Emoji\r\n{\r\n    public class EmojiSelectedEventArgs : EventArgs\r\n    {\r\n        public EmojiDataItem DataItem { get; set; }\r\n    }\r\n\r\n    public class EmojiSpriteItem : VListItemBase\r\n    {\r\n        public int CategoryIndex;\r\n        public int SpriteOffset;\r\n        public int Rows;\r\n\r\n        public EventHandler<EmojiSelectedEventArgs> EmojiSelected = delegate { };\r\n\r\n        public EmojiSpriteItem(int categoryIndex, int spriteOffset)\r\n        {\r\n            CategoryIndex = categoryIndex;\r\n            SpriteOffset = spriteOffset;\r\n            Rows = EmojiData.SpriteRowsCountByCategory[categoryIndex][spriteOffset];\r\n\r\n            var emojiInCategory = EmojiData.CodesByCategory[categoryIndex];\r\n            ulong[] emojis = null;\r\n            emojis = spriteOffset != 0 ? \r\n                emojiInCategory.Skip(spriteOffset*EmojiData.ItemsInSprite).Take(EmojiData.ItemsInSprite).ToArray() : \r\n                emojiInCategory.Take(EmojiData.ItemsInSprite).ToArray();\r\n\r\n            View.Width = SpriteWidth + 8;\r\n            var decodePixelWidth = SpriteWidth;\r\n            //switch (Application.Current.Host.Content.ScaleFactor)\r\n            //{\r\n            //    case 100:\r\n            //        break;\r\n            //    case 150:\r\n            //        decodePixelWidth = 711;\r\n            //        break;\r\n            //    case 160:\r\n            //        decodePixelWidth = 758;\r\n            //        break;\r\n            //}\r\n\r\n            var image = new Image\r\n            {\r\n                Width = SpriteWidth,\r\n                Source = new BitmapImage\r\n                {\r\n                    //DecodePixelWidth = decodePixelWidth,\r\n                    //DecodePixelType = DecodePixelType.Physical\r\n                    //UriSource = spriteUri\r\n                },\r\n                Margin = new Thickness(4, 1, 4, 1),\r\n                VerticalAlignment = VerticalAlignment.Top\r\n            };\r\n            Children.Add(image);\r\n\r\n            View.MouseLeftButtonDown += ViewOnMouseLeftButtonDown;\r\n            View.LostMouseCapture += ViewOnLostMouseCapture;\r\n            View.MouseLeftButtonUp += ViewOnLostMouseCapture;\r\n            View.MouseLeave += ViewOnLostMouseCapture;\r\n            View.Tap += ViewOnTap;\r\n\r\n            CreateBorders();\r\n        }\r\n\r\n        public EmojiSpriteItem(Uri spriteUri, int categoryIndex, int spriteOffset)\r\n        {\r\n            CategoryIndex = categoryIndex;\r\n            SpriteOffset = spriteOffset;\r\n            Rows = EmojiData.SpriteRowsCountByCategory[categoryIndex][spriteOffset];\r\n\r\n            View.Width = SpriteWidth + 8;\r\n            var decodePixelWidth = SpriteWidth;\r\n            //switch (Application.Current.Host.Content.ScaleFactor)\r\n            //{\r\n            //    case 100:\r\n            //        break;\r\n            //    case 150:\r\n            //        decodePixelWidth = 711;\r\n            //        break;\r\n            //    case 160:\r\n            //        decodePixelWidth = 758;\r\n            //        break;\r\n            //}\r\n\r\n            var image = new Image\r\n            {\r\n                Width = SpriteWidth,\r\n                Source = new BitmapImage\r\n                {\r\n                    //DecodePixelWidth = decodePixelWidth,\r\n                    //DecodePixelType = DecodePixelType.Physical,\r\n                    UriSource = spriteUri\r\n                },\r\n                Margin = new Thickness(4, 1, 4, 1),\r\n                VerticalAlignment = VerticalAlignment.Top\r\n            };\r\n            Children.Add(image);\r\n\r\n            View.MouseLeftButtonDown += ViewOnMouseLeftButtonDown;\r\n            View.LostMouseCapture += ViewOnLostMouseCapture;\r\n            View.MouseLeftButtonUp += ViewOnLostMouseCapture;\r\n            View.MouseLeave += ViewOnLostMouseCapture;\r\n            View.Tap += ViewOnTap;\r\n\r\n            CreateBorders();\r\n        }\r\n\r\n        private static void ViewOnLostMouseCapture(object sender, MouseEventArgs mouseEventArgs)\r\n        {\r\n            ClearCurrentHighlight();\r\n        }\r\n\r\n        public static void ClearCurrentHighlight()\r\n        {\r\n            if (_currentHighlight == null) return;\r\n\r\n            var parent = _currentHighlight.Parent as Grid;\r\n            if (parent != null)\r\n                parent.Children.Remove(_currentHighlight);\r\n\r\n            _currentHighlight = null;\r\n        }\r\n\r\n        private void ViewOnMouseLeftButtonDown(object sender, MouseButtonEventArgs args)\r\n        {\r\n            var point = args.GetPosition(View);\r\n            var column = (int) Math.Ceiling(point.X / ColumnWidth);\r\n            var row = (int) Math.Ceiling(point.Y / RowHeight);\r\n\r\n            if (column <= 0 || row <= 0) return;\r\n            if (Rows < MaxRowsInSprite && row == Rows)\r\n            {\r\n                if (EmojiData.ItemsInRow - EmojiData.SpriteMissingCellsByCategory[CategoryIndex] < column)\r\n                    return;\r\n            }\r\n\r\n            var emojiHoverBackground = new Rectangle\r\n            {\r\n                Width = ColumnWidth - 2, //width without 2px border\r\n                Height = RowHeight,\r\n                Fill = (Brush) Application.Current.Resources[\"PhoneAccentBrush\"],\r\n                Margin = new Thickness((column - 1) * 79 + 4, (row - 1) * 70 + 2, 0, 0),\r\n                HorizontalAlignment = HorizontalAlignment.Left,\r\n                VerticalAlignment = VerticalAlignment.Top\r\n            };\r\n            View.Children.Insert(0, emojiHoverBackground);\r\n\r\n            ClearCurrentHighlight();\r\n            _currentHighlight = emojiHoverBackground;\r\n        }\r\n\r\n        private void ViewOnTap(object sender, GestureEventArgs args)\r\n        {\r\n            var point = args.GetPosition(View);\r\n            var column = (int) Math.Ceiling(point.X / 79);\r\n            var row = (int) Math.Ceiling(point.Y / 70);\r\n\r\n            if (column <= 0 || row <= 0) return;\r\n\r\n            //Debug.WriteLine(\"{0}-{1}\", column, row);\r\n\r\n            var itemIndex = (row - 1) * EmojiData.ItemsInRow + (column - 1);\r\n\r\n            var emoji = EmojiDataItem.GetByIndex(CategoryIndex, SpriteOffset, itemIndex);\r\n            if (emoji != null)\r\n                EmojiSelected(this, new EmojiSelectedEventArgs{DataItem = emoji});\r\n        }\r\n\r\n        private static Rectangle _currentHighlight;\r\n\r\n        private void CreateBorders()\r\n        {\r\n            for (int i = 0; i < Rows + 1; i++)\r\n            {\r\n                var line = new Rectangle\r\n                {\r\n                    Width = SpriteWidth + 4,\r\n                    Height = 2,\r\n                    Fill = (Brush) Application.Current.Resources[\"PhoneChromeBrush\"],\r\n                    Margin = new Thickness(0, i * RowHeight, 0, 0),\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top\r\n                };\r\n                Children.Add(line);\r\n            }\r\n\r\n            for (int i = 0; i < 5; i++)\r\n            {\r\n                var line = new Rectangle\r\n                {\r\n                    Width = 2,\r\n                    Height = RowHeight * Rows,\r\n                    Fill = (Brush) Application.Current.Resources[\"PhoneChromeBrush\"],\r\n                    Margin = new Thickness((i + 1) * ColumnWidth + 2, 0, 0, 0),\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top\r\n                };\r\n                Children.Add(line);\r\n            }\r\n\r\n            if (Rows < MaxRowsInSprite)\r\n            {\r\n                var missingRows = EmojiData.SpriteMissingCellsByCategory[CategoryIndex];\r\n                var startIndex = EmojiData.ItemsInRow - missingRows;\r\n\r\n                var width = missingRows * ColumnWidth;\r\n                var horizontalOffset = startIndex * ColumnWidth + 4;\r\n\r\n                var rect = new Rectangle\r\n                {\r\n                    Fill = (Brush) Application.Current.Resources[\"PhoneChromeBrush\"],\r\n                    Width = width,\r\n                    Height = RowHeight,\r\n                    Margin = new Thickness(horizontalOffset, (Rows - 1) * RowHeight, 0, 0),\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top\r\n                };\r\n                Children.Add(rect);\r\n            }\r\n        }\r\n\r\n        public const int SpriteWidth = 472;\r\n        public const int SpriteHeight = 420;\r\n        public const int ColumnWidth = 79;\r\n        public const int RowHeight = 70; // 105 in pixel logic\r\n\r\n        public const int MaxRowsInSprite = 6;\r\n\r\n        public override double FixedHeight\r\n        {\r\n            get { return RowHeight * Rows; }\r\n            set { }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Controls/Emoji/StickerSpriteItem.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.VirtualizedView;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Emoji\r\n{\r\n    //class StickerToImageSourceConverter : IValueConverter\r\n    //{\r\n\r\n    //    private static ImageSource ReturnOrEnqueueSticker(TLDocument22 document, TLStickerItem sticker)\r\n    //    {\r\n    //        if (document == null) return null;\r\n\r\n    //        var documentLocalFileName = document.GetFileName();\r\n\r\n    //        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n    //        {\r\n    //            if (!store.FileExists(documentLocalFileName))\r\n    //            {\r\n    //                TLObject owner = document;\r\n    //                if (sticker != null)\r\n    //                {\r\n    //                    owner = sticker;\r\n    //                }\r\n\r\n    //                // 1. download full size\r\n    //                IoC.Get<IDocumentFileManager>().DownloadFileAsync(document.FileName, document.DCId, document.ToInputFileLocation(), owner, document.Size, progress => { });\r\n\r\n    //                // 2. download preview\r\n    //                var thumbCachedSize = document.Thumb as TLPhotoCachedSize;\r\n    //                if (thumbCachedSize != null)\r\n    //                {\r\n    //                    var fileName = \"cached\" + document.GetFileName();\r\n    //                    var buffer = thumbCachedSize.Bytes.Data;\r\n    //                    if (buffer == null) return null;\r\n\r\n    //                    return DecodeWebPImage(fileName, buffer, () => { });\r\n    //                }\r\n\r\n    //                var thumbPhotoSize = document.Thumb as TLPhotoSize;\r\n    //                if (thumbPhotoSize != null)\r\n    //                {\r\n    //                    var location = thumbPhotoSize.Location as TLFileLocation;\r\n    //                    if (location != null)\r\n    //                    {\r\n    //                        return ReturnOrEnqueueStickerPreview(location, sticker, thumbPhotoSize.Size);\r\n    //                    }\r\n    //                }\r\n    //            }\r\n    //            else\r\n    //            {\r\n    //                if (document.DocumentSize > 0\r\n    //                    && document.DocumentSize < Telegram.Api.Constants.StickerMaxSize)\r\n    //                {\r\n    //                    byte[] buffer;\r\n    //                    using (var file = store.OpenFile(documentLocalFileName, FileMode.Open))\r\n    //                    {\r\n    //                        buffer = new byte[file.Length];\r\n    //                        file.Read(buffer, 0, buffer.Length);\r\n    //                    }\r\n\r\n    //                    return DecodeWebPImage(documentLocalFileName, buffer,\r\n    //                        () =>\r\n    //                        {\r\n    //                            using (var localStore = IsolatedStorageFile.GetUserStoreForApplication())\r\n    //                            {\r\n    //                                localStore.DeleteFile(documentLocalFileName);\r\n    //                            }\r\n    //                        });\r\n    //                }\r\n    //            }\r\n    //        }\r\n\r\n    //        return null;\r\n    //    }\r\n\r\n    //    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n    //    {\r\n    //        var document = value as TLDocument22;\r\n    //        if (document == null) return null;\r\n\r\n    //        document.\r\n    //    }\r\n\r\n    //    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n    //    {\r\n    //        throw new NotImplementedException();\r\n    //    }\r\n    //}\r\n\r\n    //class StickerSpriteItem : VListItemBase\r\n    //{\r\n    //    public override double FixedHeight\r\n    //    {\r\n    //        get { return 180.0; } \r\n    //        set { }\r\n    //    }\r\n\r\n    //    public double StickerWidth\r\n    //    {\r\n    //        get { return 120.0; }\r\n    //    }\r\n\r\n    //    public double StickerHeight\r\n    //    {\r\n    //        get { return 180.0; }\r\n    //    }\r\n\r\n    //    public StickerSpriteItem(IList<TLDocument> stickers)\r\n    //    {\r\n    //        var stackPanel = new StackPanel();\r\n\r\n    //        for (var i = 0; i < stickers.Count; i++)\r\n    //        {\r\n    //            var binding = new Binding();\r\n    //            binding.Source = stickers[i];\r\n    //            //binding.Path = new PropertyPath(\"\");\r\n    //            binding.Mode = BindingMode.OneWay;\r\n    //            binding.Converter = new StickerToImageSourceConverter();\r\n\r\n    //            var image = new Image\r\n    //            {\r\n    //                Width = StickerWidth,\r\n    //                Height = StickerHeight,\r\n    //                //Source = new BitmapImage\r\n    //                //{\r\n    //                //    //DecodePixelWidth = decodePixelWidth,\r\n    //                //    //DecodePixelType = DecodePixelType.Physical\r\n    //                //    //UriSource = spriteUri\r\n    //                //},\r\n    //                Margin = new Thickness(0, 0, 0, 0),\r\n    //                VerticalAlignment = VerticalAlignment.Top\r\n    //            };\r\n    //            image.SetBinding(Image.SourceProperty, binding);\r\n    //            image.Tap += Sticker_OnTap;\r\n\r\n    //            stackPanel.Children.Add(image);\r\n    //        }\r\n\r\n    //        Children.Add(stackPanel);\r\n    //    }\r\n\r\n    //    private void Sticker_OnTap(object sender, GestureEventArgs e)\r\n    //    {\r\n            \r\n    //    }\r\n    //}\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Controls/Utilites/DelayedExecutor.cs",
    "content": "﻿using System;\r\nusing System.Diagnostics;\r\nusing System.Threading;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Utilites\r\n{\r\n    public class DelayedExecutor\r\n    {\r\n        class ExecutionInfo\r\n        {\r\n            public Action Action { get; set; }\r\n            public DateTime Timestamp { get; set; }\r\n        }\r\n\r\n        ExecutionInfo m_executionInfo;\r\n        Timer m_timer;\r\n        int m_delay;\r\n        bool m_timerIsActive;\r\n        object m_lockObj = new object();\r\n\r\n        public DelayedExecutor(int delay) // TO DO : add IDateTimeProvider dependency to remove dependency on DateTime\r\n        {\r\n            m_delay = delay;\r\n            m_timer = new Timer(TimerCallback);\r\n        }\r\n\r\n        public void AddToDelayedExecution(Action action)\r\n        {\r\n            lock (m_lockObj)\r\n            {\r\n                m_executionInfo = new ExecutionInfo() { Action = action, Timestamp = DateTime.Now };\r\n            }\r\n\r\n            ChangeTimer(true);\r\n        }\r\n\r\n        private void TimerCallback(object state)\r\n        {\r\n            Action executeAction = null;\r\n\r\n            lock (m_lockObj)\r\n            {\r\n                if (m_executionInfo != null)\r\n                {\r\n                    if (DateTime.Now - m_executionInfo.Timestamp >= TimeSpan.FromMilliseconds(m_delay))\r\n                    {\r\n                        Debug.WriteLine(\"Action is set to be executed.\");\r\n                        executeAction = m_executionInfo.Action;\r\n                        m_executionInfo = null;\r\n                        ChangeTimer(false);\r\n                    }\r\n                }\r\n            }\r\n            if (executeAction != null)\r\n            {\r\n                try\r\n                {\r\n                    executeAction();\r\n                }\r\n                catch (Exception exc)\r\n                {\r\n                    //Logger.Instance.Error(\"Exeption during delayed execution\", exc);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ChangeTimer(bool activate)\r\n        {\r\n            if (activate && !m_timerIsActive)\r\n            {\r\n                lock (m_timer)\r\n                {\r\n                    m_timerIsActive = true;\r\n                    m_timer.Change(m_delay, m_delay);\r\n                }\r\n            }\r\n            else if (!activate && m_timerIsActive)\r\n            {\r\n                lock (m_timer)\r\n                {\r\n                    m_timerIsActive = false;\r\n                    m_timer.Change(Timeout.Infinite, 0);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Controls/Utilites/Helpers.cs",
    "content": "﻿using System;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Utilites\r\n{\r\n    public static class Helpers\r\n    {\r\n        public static Uri GetAssetUri(string assetName)\r\n        {\r\n            return new Uri(String.Format(\"/Assets/{0}-WXGA.png\", assetName), UriKind.Relative);\r\n\r\n            //switch (Application.Current.Host.Content.ScaleFactor)\r\n            //{\r\n            //    case 100:\r\n            //        return new Uri(String.Format(\"/Assets/{0}-WVGA.png\", assetName), UriKind.Relative);\r\n            //    case 160:\r\n            //        return new Uri(String.Format(\"/Assets/{0}-WXGA.png\", assetName), UriKind.Relative);\r\n            //    case 150:\r\n            //        return new Uri(String.Format(\"/Assets/{0}-720p.png\", assetName), UriKind.Relative);\r\n            //    default:\r\n            //        return new Uri(String.Format(\"/Assets/{0}-WVGA.png\", assetName), UriKind.Relative);\r\n            //}\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Controls/Utilites/MyListItemBase.cs",
    "content": "﻿using System.Windows.Controls;\r\nusing Telegram.Controls.VirtualizedView;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Utilites\r\n{\r\n    public class MyListItemBase : Grid\r\n    {\r\n        //private Panel _contentPanel;\r\n        //public Panel ContentPanel\r\n        //{\r\n        //    get\r\n        //    {\r\n        //        return _contentPanel;\r\n        //    }\r\n        //    set\r\n        //    {\r\n        //        _contentPanel = value;\r\n        //        Content = _contentPanel;\r\n        //    }\r\n        //}\r\n\r\n        public VListItemBase VirtSource { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Controls/Utilites/MyVirtualizingPanel.cs",
    "content": "﻿using System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing Telegram.Controls.VirtualizedView;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Utilites\r\n{\r\n    public class MyVirtualizingPanel : Canvas\r\n    {\r\n        private const bool IsLogEnabled = false;\r\n\r\n        private static void Log(string str)\r\n        {\r\n            if (IsLogEnabled)\r\n            {\r\n                Debug.WriteLine(str);\r\n            }\r\n        }\r\n\r\n\r\n        private const double LoadUnloadThreshold = 500;\r\n        private const double LoadedHeightUpwards = 300;\r\n        private const double LoadedHeightDownwards = 900;\r\n        private const double LoadedHeightDownwardsNotScrolling = 800;\r\n\r\n        private bool _changingVerticalOffset = false;\r\n\r\n        readonly DependencyProperty _listVerticalOffsetProperty = DependencyProperty.Register(\r\n             \"ListVerticalOffset\",\r\n             typeof(double),\r\n             typeof(MyVirtualizingPanel),\r\n             new PropertyMetadata(new PropertyChangedCallback(OnListVerticalOffsetChanged)));\r\n\r\n        public double ListVerticalOffset\r\n        {\r\n            get { return (double) this.GetValue(_listVerticalOffsetProperty); }\r\n            set { this.SetValue(_listVerticalOffsetProperty, value); }\r\n        }\r\n\r\n        private static void OnListVerticalOffsetChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = (MyVirtualizingPanel) obj;\r\n            control.OnListVerticalOffsetChanged();\r\n        }\r\n\r\n        private ScrollViewer _scrollViewer;\r\n        bool _isScrolling = false;\r\n\r\n        public ScrollViewer ScrollViewer\r\n        {\r\n            get { return _scrollViewer; }\r\n        }\r\n\r\n        public void InitializeWithScrollViewer(ScrollViewer scrollViewer)\r\n        {\r\n            _scrollViewer = scrollViewer;\r\n            EnsureBoundToScrollViewer();\r\n        }\r\n\r\n        protected void EnsureBoundToScrollViewer()\r\n        {\r\n            Binding binding = new Binding\r\n            {\r\n                Source = _scrollViewer,\r\n                Path = new PropertyPath(\"VerticalOffset\"),\r\n                Mode = BindingMode.OneWay\r\n            };\r\n            this.SetBinding(_listVerticalOffsetProperty, binding);\r\n\r\n\r\n        }\r\n\r\n        bool _notReactToScroll = false;\r\n        private double _savedDelta;\r\n        //private DelayedExecutor _de = new DelayedExecutor(300);\r\n        //internal void PrepareForScrollToBottom()\r\n        //{\r\n        //    _notReactToScroll = true;\r\n        //    _savedDelta = DeltaOffset;\r\n        //    // load in the end\r\n        //    DeltaOffset = _scrollViewer.ExtentHeight - _scrollViewer.ViewportHeight - _scrollViewer.VerticalOffset;\r\n        //    Debug.WriteLine(\"PrepareForScrollToBottom\");\r\n        //    PerformLoadUnload2(VirtualizableState.LoadedPartially, false);\r\n        //    _de.AddToDelayedExecution(() =>\r\n        //        {\r\n        //            Execute.ExecuteOnUIThread(() => ScrollToBottomCompleted());\r\n        //        });\r\n        //}\r\n\r\n        //internal void ScrollToBottomCompleted()\r\n        //{\r\n        //    _notReactToScroll = false;\r\n        //    DeltaOffset = _savedDelta;\r\n        //    PerformLoadUnload(VirtualizableState.LoadedFully);\r\n        //    Debug.WriteLine(\"ScrolltoBottomCompleted\");\r\n        //}\r\n\r\n        private void group_CurrentStateChanging(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            if (e.NewState.Name == \"Scrolling\")\r\n            {\r\n                _isScrolling = true;\r\n            }\r\n            else\r\n            {\r\n                _isScrolling = false;\r\n                PerformLoadUnload(true);\r\n            }\r\n        }\r\n\r\n        private static VisualStateGroup FindVisualState(FrameworkElement element, string name)\r\n        {\r\n            if (element == null)\r\n                return null;\r\n\r\n            IList groups = VisualStateManager.GetVisualStateGroups(element);\r\n            foreach (VisualStateGroup group in groups)\r\n                if (group.Name == name)\r\n                    return group;\r\n\r\n            return null;\r\n        }\r\n\r\n        public class ScrollPositionChangedEventAgrs : EventArgs\r\n        {\r\n            public double CurrentPosition { get; private set; }\r\n            public double ScrollHeight { get; private set; }\r\n\r\n            public ScrollPositionChangedEventAgrs(double currentPosition,\r\n                double scrollHeight)\r\n            {\r\n                CurrentPosition = currentPosition;\r\n                ScrollHeight = scrollHeight;\r\n            }\r\n        }\r\n\r\n        public event EventHandler<ScrollPositionChangedEventAgrs> ScrollPositionChanged;\r\n\r\n        private double _previousScrollOffset = 0;\r\n        private DateTime _previousScrollOffsetChangedTime = DateTime.MinValue;\r\n        private const double PixelsPerSecondThreshold = 200;\r\n\r\n        private void OnListVerticalOffsetChanged()\r\n        {\r\n            if (_notReactToScroll) return;\r\n\r\n            if (!_changingVerticalOffset)\r\n            {\r\n\r\n                var w = new Stopwatch();\r\n                w.Start();\r\n                PerformLoadUnload(true);\r\n                w.Stop();\r\n\r\n                Log(\"LOADUNLOAD performed in \" + w.ElapsedMilliseconds);\r\n\r\n                if (ScrollPositionChanged != null)\r\n                {\r\n                    ScrollPositionChanged(this, new ScrollPositionChangedEventAgrs(\r\n                        _scrollViewer.VerticalOffset,\r\n                        Height));\r\n                }\r\n\r\n                Log(\"Reported Offset: \" + _scrollViewer.VerticalOffset);\r\n            }\r\n        }\r\n\r\n        private bool DetermineIfScrollingIsFast()\r\n        {\r\n            var now = DateTime.Now;\r\n            var result = false;\r\n            if (_previousScrollOffsetChangedTime != DateTime.Now)\r\n            {\r\n                var scrolledPixels = Math.Abs(_scrollViewer.VerticalOffset - _previousScrollOffset);\r\n                var timeInSeconds = (now - _previousScrollOffsetChangedTime).TotalSeconds;\r\n\r\n                if (scrolledPixels != 0)\r\n                {\r\n                    var speedPixelsPerSecond = scrolledPixels / timeInSeconds;\r\n                    Log(String.Format(\"Speed of scroll {0} \", speedPixelsPerSecond));\r\n\r\n                    if (speedPixelsPerSecond > PixelsPerSecondThreshold)\r\n                    {\r\n                        result = true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            _previousScrollOffsetChangedTime = now;\r\n            _previousScrollOffset = _scrollViewer.VerticalOffset;\r\n            return result;\r\n        }\r\n\r\n        private readonly List<VListItemBase> _virtItems = new List<VListItemBase>();\r\n\r\n        // indexes of loaded items\r\n        private Segment _loadedSegment = new Segment();\r\n\r\n        // maps a point to its index in _virtItems\r\n        // covers only points 0, LoadUnloadThreshold, 2*LoadUnloadThreshold, etc\r\n        private readonly Dictionary<int, int> _thresholdPointIndexes = new Dictionary<int, int>();\r\n\r\n\r\n        // do not change through this property\r\n        public List<VListItemBase> VirtItems\r\n        {\r\n            get { return _virtItems; }\r\n        }\r\n\r\n        public MyVirtualizingPanel()\r\n        {\r\n            Loaded += MyVirtualizingPanel_Loaded;\r\n        }\r\n\r\n        void MyVirtualizingPanel_Loaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!DesignerProperties.GetIsInDesignMode(this))\r\n            {\r\n                // Visual States are always on the first child of the control template \r\n                FrameworkElement element = VisualTreeHelper.GetChild(_scrollViewer, 0) as FrameworkElement;\r\n                if (element != null)\r\n                {\r\n                    VisualStateGroup group = FindVisualState(element, \"ScrollStates\");\r\n                    if (group != null)\r\n                    {\r\n                        group.CurrentStateChanging += group_CurrentStateChanging;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void AddItems(IEnumerable<VListItemBase> _itemsToBeAdded)\r\n        {\r\n            var sw = new Stopwatch();\r\n            sw.Start();\r\n\r\n            double topMargin = 0;\r\n\r\n            if (_virtItems.Count > 0)\r\n            {\r\n                topMargin = _virtItems.Sum(vi => vi.FixedHeight);\r\n            }\r\n\r\n            foreach (var itemToBeAdded in _itemsToBeAdded)\r\n            {\r\n                itemToBeAdded.View.Margin = new Thickness(itemToBeAdded.Margin.Left, itemToBeAdded.Margin.Top + topMargin, itemToBeAdded.Margin.Right, itemToBeAdded.Margin.Bottom);\r\n\r\n                _virtItems.Add(itemToBeAdded);\r\n\r\n                var itemHeightIncludingMargin = itemToBeAdded.FixedHeight;\r\n\r\n                List<int> coveredPoints = GetCoveredPoints(topMargin, topMargin + itemHeightIncludingMargin);\r\n\r\n                foreach (var coveredPoint in coveredPoints)\r\n                {\r\n                    _thresholdPointIndexes[coveredPoint] = _virtItems.Count - 1; // index of the last\r\n                }\r\n\r\n                topMargin += itemHeightIncludingMargin;\r\n            }\r\n\r\n            PerformLoadUnload(true);\r\n\r\n            Height = topMargin;\r\n\r\n            sw.Stop();\r\n\r\n            Log(String.Format(\"MyVirtualizingPanel.AddItems {0}\", sw.ElapsedMilliseconds));\r\n        }\r\n\r\n\r\n        public void InsertRemoveItems(int index, List<VListItemBase> itemsToInsert, bool keepItemsBelowIndexFixed = false, VListItemBase itemToRemove = null)\r\n        {\r\n            bool needToAdjustScrollPositionAfterInsertion = false;\r\n\r\n            if (keepItemsBelowIndexFixed)\r\n            {\r\n                double totalHeightOfAllItemsBeforeIndex = 0;\r\n\r\n                for (int i = 0; i < index; i++)\r\n                {\r\n                    totalHeightOfAllItemsBeforeIndex += VirtItems[i].FixedHeight + VirtItems[i].Margin.Top + VirtItems[i].Margin.Bottom;\r\n                }\r\n\r\n                if (totalHeightOfAllItemsBeforeIndex < _scrollViewer.VerticalOffset + _scrollViewer.ViewportHeight)\r\n                {\r\n                    needToAdjustScrollPositionAfterInsertion = true;\r\n                }\r\n            }\r\n\r\n            //  UnloadItemsInSegment(_loadedSegment);\r\n            _loadedSegment = new Segment();\r\n\r\n            var totalHeight = itemsToInsert.Sum(i => i.FixedHeight + i.Margin.Top + i.Margin.Bottom);\r\n\r\n            _virtItems.InsertRange(index, itemsToInsert);\r\n\r\n            if (itemToRemove != null)\r\n            {\r\n                itemToRemove.IsVLoaded = false;\r\n                totalHeight -= itemToRemove.FixedHeight + itemToRemove.Margin.Top + itemToRemove.Margin.Bottom;\r\n                _virtItems.Remove(itemToRemove);\r\n            }\r\n\r\n\r\n            RearrangeAllItems();\r\n\r\n\r\n            if (needToAdjustScrollPositionAfterInsertion)\r\n            {\r\n                _changingVerticalOffset = true;\r\n                //Debug.WriteLine(\"SCROLLING TO \" + _scrollViewer.VerticalOffset + totalHeight + \" scroll height : \" + _scrollViewer.ExtentHeight);\r\n                _scrollViewer.ScrollToVerticalOffset(_scrollViewer.VerticalOffset + totalHeight);\r\n                _changingVerticalOffset = false;\r\n            }\r\n\r\n            PerformLoadUnload(false);\r\n        }\r\n\r\n        public void RemoveItem(VListItemBase itemToBeRemoved)\r\n        {\r\n            itemToBeRemoved.IsVLoaded = false;\r\n\r\n\r\n            _virtItems.Remove(itemToBeRemoved);\r\n            _loadedSegment = new Segment();\r\n            RearrangeAllItems();\r\n\r\n            PerformLoadUnload(true);\r\n        }\r\n\r\n        private void RearrangeAllItems()\r\n        {\r\n            double topMargin = 0;\r\n            _thresholdPointIndexes.Clear();\r\n            int ind = 0;\r\n            foreach (var item in _virtItems)\r\n            {\r\n                item.View.Margin = new Thickness(item.Margin.Left, item.Margin.Top + topMargin, item.Margin.Right, item.Margin.Bottom);\r\n\r\n                var itemHeightIncludingMargin = item.FixedHeight + item.Margin.Top + item.Margin.Bottom;\r\n\r\n                List<int> coveredPoints = GetCoveredPoints(topMargin, topMargin + itemHeightIncludingMargin);\r\n\r\n                foreach (var coveredPoint in coveredPoints)\r\n                {\r\n                    _thresholdPointIndexes[coveredPoint] = ind; // index of the last\r\n                }\r\n\r\n                topMargin += itemHeightIncludingMargin;\r\n                ind++;\r\n            }\r\n\r\n            Height = topMargin;\r\n            _scrollViewer.UpdateLayout();\r\n        }\r\n\r\n        private void PerformLoadUnload2(bool isToLoad, bool bypassUnload = false)\r\n        {\r\n            if (_virtItems.Count == 0)\r\n                return;\r\n\r\n            double currentOffset = GetRealOffset();\r\n\r\n            int lowestLoadedInd = 0;\r\n            int upperInd = 0;\r\n\r\n            bool triggerLoading = false;\r\n\r\n            if (isToLoad || _loadedSegment.IsEmpty)\r\n            {\r\n                triggerLoading = true;\r\n            }\r\n            else\r\n            {\r\n                lowestLoadedInd = _loadedSegment.LowerBound;\r\n                upperInd = _loadedSegment.UpperBound;\r\n\r\n                double topPoint = _virtItems[lowestLoadedInd].View.Margin.Top;\r\n                double bottomPoint = _virtItems[upperInd].View.Margin.Top + _virtItems[upperInd].FixedHeight;\r\n\r\n                if (currentOffset - topPoint < 500 ||\r\n                    bottomPoint - currentOffset < 1500)\r\n                {\r\n                    triggerLoading = true;\r\n                }\r\n            }\r\n\r\n            if (triggerLoading)\r\n            {\r\n                if (_scrollViewer.ExtentHeight < 3000 && _isScrolling)\r\n                {\r\n                    //Debug.WriteLine(\"Detected short scroll; loading all items\");\r\n                    // otherwise there are glitches in scrolling\r\n                    lowestLoadedInd = 0;\r\n                    upperInd = VirtItems.Count - 1;\r\n                    isToLoad = true;\r\n                }\r\n                else\r\n                {\r\n                    var threshold = (int) Math.Floor((currentOffset - (currentOffset % LoadUnloadThreshold)));\r\n\r\n                    int indexOfBaseItem = _thresholdPointIndexes.ContainsKey(threshold) ? _thresholdPointIndexes[threshold] : -1;\r\n\r\n                    lowestLoadedInd = upperInd = indexOfBaseItem < 0 ? 0 : indexOfBaseItem;\r\n\r\n                    double loadUpwards = LoadedHeightUpwards;\r\n                    double loadDownwards = _isScrolling ? LoadedHeightDownwards : LoadedHeightDownwardsNotScrolling;\r\n\r\n                    //if (_isScrolling)\r\n                    //{\r\n                    //    loadUpwards = LoadUpwardsWhenScrolling;\r\n                    //    loadDownwards = LoadDownwardsWhenScrolling;\r\n                    //}\r\n\r\n                    // count up from the lower point on view\r\n                    while (lowestLoadedInd > 0 && currentOffset - _virtItems[lowestLoadedInd].View.Margin.Top < loadUpwards)\r\n                    {\r\n                        lowestLoadedInd--;\r\n                    }\r\n\r\n                    while (upperInd < _virtItems.Count - 1 && _virtItems[upperInd].View.Margin.Top - currentOffset < loadDownwards)\r\n                    {\r\n                        upperInd++;\r\n                    }\r\n\r\n                }\r\n\r\n                SetLoadedBounds(lowestLoadedInd, upperInd, isToLoad, bypassUnload);\r\n\r\n\r\n                if (IsLogEnabled)\r\n                {\r\n                    string loadedIndexes = \"Loaded indexes : \";\r\n                    for (int i = 0; i < _virtItems.Count; i++)\r\n                    {\r\n                        if (_virtItems[i].IsVLoaded)\r\n                        {\r\n                            loadedIndexes += i + \",\";\r\n                        }\r\n                    }\r\n\r\n                    Log(loadedIndexes);\r\n                }\r\n            }\r\n\r\n        }\r\n\r\n        public double DeltaOffset\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        private double GetRealOffset()\r\n        {\r\n            //// it might throw exception\r\n            //try\r\n            //{\r\n            //    GeneralTransform childTransform = this.TransformToVisual(_listScrollViewer);\r\n\r\n            //    var p = childTransform.Transform(new Point(0, 0));\r\n\r\n            //    var delta = p.Y;\r\n            //    Debug.WriteLine(\"DELTA offset =\" + delta + \"; VerticalOffset=\" + _listScrollViewer.VerticalOffset);\r\n\r\n            //    return -delta;\r\n            //}\r\n            //catch (Exception exc)\r\n            //{\r\n            //    return _listScrollViewer.VerticalOffset;\r\n            //}\r\n\r\n            return _scrollViewer.VerticalOffset + DeltaOffset;\r\n        }\r\n\r\n        private void PerformLoadUnload(bool isToLoad)\r\n        {\r\n            PerformLoadUnload2(isToLoad);\r\n        }\r\n\r\n        private void SetLoadedBounds(int lowerBoundInd, int upperBoundInd, bool isToLoad, bool bypassUnload = false)\r\n        {\r\n            var newLoadedSegment = new Segment(lowerBoundInd, upperBoundInd);\r\n\r\n            Segment newMinusLoaded1;\r\n            Segment newMinusLoaded2;\r\n            Segment intersection;\r\n            Segment loadedMinusNew1;\r\n            Segment loadedMinusNew2;\r\n\r\n            newLoadedSegment.CompareToSegment(_loadedSegment,\r\n                out newMinusLoaded1,\r\n                out newMinusLoaded2,\r\n                out intersection,\r\n                out loadedMinusNew1,\r\n                out loadedMinusNew2);\r\n\r\n\r\n            Log(String.Format(\"LoadedSegment:{0}, NewSegment:{1}, NewMinusLoaded1:{2}, NewMinusLoaded2:{3}, loadedMinusNew1:{4}, loadedMinusNew2:{5}\",\r\n                _loadedSegment,\r\n                newLoadedSegment,\r\n                newMinusLoaded1,\r\n                newMinusLoaded2,\r\n                loadedMinusNew1,\r\n                loadedMinusNew2));\r\n\r\n            if (isToLoad)\r\n            {\r\n                // ensure items are loaded fully for the whole segment\r\n                LoadItemsInSegment(newLoadedSegment);\r\n            }\r\n\r\n            if (!bypassUnload)\r\n            {\r\n                UnloadItemsInSegment(loadedMinusNew1);\r\n                UnloadItemsInSegment(loadedMinusNew2);\r\n            }\r\n            _loadedSegment = newLoadedSegment;\r\n\r\n        }\r\n\r\n        private void UnloadItemsInSegment(Segment segment)\r\n        {\r\n            for (int i = segment.LowerBound; i <= segment.UpperBound; i++)\r\n            {\r\n                var item = _virtItems[i];\r\n\r\n                Children.Remove(item.View);\r\n\r\n                item.IsVLoaded = false;\r\n            }\r\n        }\r\n\r\n        private void LoadItemsInSegment(Segment segment)\r\n        {\r\n            for (int i = segment.LowerBound; i <= segment.UpperBound; i++)\r\n            {\r\n                var item = _virtItems[i];\r\n\r\n                item.IsVLoaded = true;\r\n\r\n                if (!Children.Contains(item.View))\r\n                {\r\n                    Children.Add(item.View);\r\n                }\r\n            }\r\n        }\r\n\r\n        private List<int> GetCoveredPoints(double from, double to)\r\n        {\r\n\r\n            var result = new List<int>();\r\n\r\n            var candidate = from - (from % LoadUnloadThreshold);\r\n\r\n            while (candidate <= to)\r\n            {\r\n                if (candidate >= from)\r\n                {\r\n                    result.Add((int) Math.Floor(candidate));\r\n                }\r\n                candidate += LoadUnloadThreshold;\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public void ClearItems()\r\n        {\r\n            _virtItems.Clear();\r\n            Children.Clear();\r\n            _loadedSegment = new Segment();\r\n            _thresholdPointIndexes.Clear();\r\n            _scrollViewer.ScrollToVerticalOffset(0);\r\n            Height = 0;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Controls/Utilites/VListItemBase.cs",
    "content": "﻿using System.Collections.Generic;\r\nusing System.Windows;\r\nusing Telegram.EmojiPanel.Controls.Utilites;\r\nusing Rectangle = System.Windows.Shapes.Rectangle;\r\n\r\nnamespace Telegram.Controls.VirtualizedView\r\n{\r\n    public abstract class VListItemBase\r\n    {\r\n        private readonly List<FrameworkElement> _children = new List<FrameworkElement>();\r\n\r\n        public MyListItemBase View { get; private set; }\r\n\r\n        public List<FrameworkElement> Children\r\n        {\r\n            get { return _children; }\r\n        }\r\n\r\n        protected VListItemBase()\r\n        {\r\n            View = new MyListItemBase\r\n            {\r\n                VirtSource = this,\r\n                Width = 440\r\n            };\r\n        }\r\n        public abstract double FixedHeight { get; set; }\r\n\r\n        public Thickness Margin = new Thickness();\r\n\r\n        public virtual object ItemSource { get; set; }\r\n\r\n        private bool _isVLoaded;\r\n\r\n        public bool IsVLoaded\r\n        {\r\n            get { return _isVLoaded; }\r\n            set\r\n            {\r\n                if (value != IsVLoaded)\r\n                {\r\n                    if (value) Load();\r\n                    else Unload();\r\n                }\r\n                _isVLoaded = value;\r\n            }\r\n        }\r\n\r\n        public virtual void Load()\r\n        {\r\n            if (View.Children.Count == 0)\r\n                foreach (var child in _children)\r\n                    View.Children.Add(child);\r\n        }\r\n\r\n        public virtual void Unload()\r\n        {\r\n            View.Children.Clear();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Controls/Utilites/VirtSegment.cs",
    "content": "﻿using System;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Utilites\r\n{\r\n    public class Segment\r\n    {\r\n        public int LowerBound { get; private set; }\r\n        public int UpperBound { get; private set; }\r\n\r\n        public bool IsEmpty { get { return UpperBound < LowerBound; } }\r\n\r\n        public Segment(int lowerBound, int upperBound)\r\n        {\r\n            LowerBound = lowerBound;\r\n            UpperBound = upperBound;\r\n        }\r\n\r\n        public Segment()\r\n            : this(0, -1)\r\n        {\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            if (IsEmpty) return \"[]\";\r\n            return String.Format(\"[{0},{1}]\", LowerBound, UpperBound);\r\n        }\r\n\r\n        public void CompareToSegment(\r\n            Segment otherSegment,\r\n            out Segment thisMinusOther1,\r\n            out Segment thisMinusOther2,\r\n            out Segment intersection,\r\n            out Segment otherMinusThis1,\r\n            out Segment otherMinusThis2)\r\n        {\r\n\r\n            thisMinusOther1 = new Segment();\r\n            thisMinusOther2 = new Segment();\r\n            intersection = new Segment();\r\n            otherMinusThis1 = new Segment();\r\n            otherMinusThis2 = new Segment();\r\n\r\n\r\n            if (this.IsEmpty)\r\n            {\r\n                otherMinusThis1 = otherSegment;\r\n                return;\r\n            }\r\n\r\n            if (otherSegment.IsEmpty)\r\n            {\r\n                thisMinusOther1 = this;\r\n                return;\r\n            }\r\n\r\n            if (this.UpperBound < otherSegment.LowerBound)\r\n            {\r\n\r\n                // do not intersect\r\n\r\n                thisMinusOther1 = this;\r\n\r\n                otherMinusThis1 = otherSegment;\r\n\r\n                return;\r\n            }\r\n\r\n\r\n            if (this.LowerBound < otherSegment.LowerBound &&\r\n                this.UpperBound >= otherSegment.LowerBound &&\r\n                this.UpperBound <= otherSegment.UpperBound)\r\n            {\r\n                thisMinusOther1 = new Segment(this.LowerBound, otherSegment.LowerBound - 1);\r\n                intersection = new Segment(otherSegment.LowerBound, this.UpperBound);\r\n                otherMinusThis1 = new Segment(this.UpperBound + 1, otherSegment.UpperBound);\r\n                return;\r\n            }\r\n\r\n            if (this.LowerBound >= otherSegment.LowerBound &&\r\n                this.UpperBound <= otherSegment.UpperBound)\r\n            {\r\n                intersection = this;\r\n                otherMinusThis1 = new Segment(otherSegment.LowerBound, this.LowerBound - 1);\r\n                otherMinusThis2 = new Segment(this.UpperBound + 1, otherSegment.UpperBound);\r\n                return;\r\n            }\r\n\r\n            otherSegment.CompareToSegment(this,\r\n                out otherMinusThis1,\r\n                out otherMinusThis2,\r\n                out intersection,\r\n                out thisMinusOther1,\r\n                out thisMinusOther2);\r\n\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Telegram.EmojiPanel\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Telegram.EmojiPanel\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"755e1785-f75a-4a86-b0e1-ef202e134f1c\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Telegram.EmojiPanel.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{755E1785-F75A-4A86-B0E1-EF202E134F1C}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Telegram.EmojiPanel</RootNamespace>\r\n    <AssemblyName>Telegram.EmojiPanel</AssemblyName>\r\n    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>\r\n    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Microsoft.Phone\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls.Toolkit\">\r\n      <HintPath>..\\packages\\WPtoolkit.4.2013.08.16\\lib\\sl4-windowsphone71\\Microsoft.Phone.Controls.Toolkit.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Phone.Interop\" />\r\n    <Reference Include=\"System.Windows\" />\r\n    <Reference Include=\"system\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Net\" />\r\n    <Reference Include=\"mscorlib.extensions\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"BrowserNavigationService.cs\" />\r\n    <Compile Include=\"Controls\\Emoji\\EmojiData.cs\" />\r\n    <Compile Include=\"Controls\\Emoji\\EmojiSpriteItem.cs\" />\r\n    <Compile Include=\"Controls\\Emoji\\EmojiControl.xaml.cs\">\r\n      <DependentUpon>EmojiControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Controls\\Emoji\\StickerSpriteItem.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\DelayedExecutor.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\Helpers.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\MyListItemBase.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\MyVirtualizingPanel.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\VirtSegment.cs\" />\r\n    <Compile Include=\"Controls\\Utilites\\VListItemBase.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"TestScrollableTextBlock.cs\" />\r\n    <Compile Include=\"TelegramRichTextBox.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"Controls\\VirtualizedView\\\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Page Include=\"Controls\\Emoji\\EmojiControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Themes\\generic.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"Assets\\emoji.abc-WXGA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\emoji.backspace-WXGA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\emoji.category.1-WXGA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\emoji.category.2-WXGA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\emoji.category.3-WXGA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\emoji.category.4-WXGA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\emoji.category.5-WXGA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\emoji.recent-WXGA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\002320E3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003020E3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003120E3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003220E3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003320E3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003420E3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003520E3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003620E3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003720E3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003820E3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003920E3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\00A9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\00AE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\203C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2049.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2122.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2139.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2194.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2195.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2196.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2197.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2198.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2199.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\21A9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\21AA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\231A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\231B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23E9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23EA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23EB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23EC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23F0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23F3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\24C2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25AA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25AB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25B6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25C0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25FB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25FC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25FD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25FE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2600.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2601.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\260E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2611.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2614.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2615.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\261D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\263A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2648.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2649.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2650.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2651.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2652.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2653.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2660.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2663.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2665.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2666.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2668.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\267B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\267F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2693.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26A0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26A1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26AA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26AB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26BD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26BE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26C4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26C5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26CE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26D4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26EA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26FA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26FD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2702.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2705.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2708.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2709.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2712.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2714.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2716.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2728.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2733.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2734.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2744.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2747.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\274C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\274E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2753.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2754.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2755.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2757.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2764.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2795.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2796.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2797.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\27A1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\27B0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\27BF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2934.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2935.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B05.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B06.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B07.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B1B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B1C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B50.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B55.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\3030.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\303D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\3297.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\3299.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDC04.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDCCF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD70.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD71.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD7E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD7F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD8E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD91.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD92.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD93.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD94.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD95.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD96.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD97.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD98.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD99.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD9A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDE8D83CDDF3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDE9D83CDDEA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDEAD83CDDF8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDEBD83CDDF7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDECD83CDDE7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDEED83CDDF9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDEFD83CDDF5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDF0D83CDDF7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDF7D83CDDFA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDFAD83CDDF8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE01.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE02.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE1A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE2F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE32.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE33.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE34.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE35.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE36.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE37.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE38.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE39.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE3A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE50.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE51.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF00.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF01.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF02.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF03.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF04.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF05.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF06.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF07.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF08.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF09.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF10.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF11.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF12.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF13.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF14.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF15.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF16.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF17.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF18.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF19.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF20.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF30.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF31.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF32.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF33.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF34.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF35.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF37.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF38.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF39.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF40.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF41.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF42.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF43.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF44.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF45.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF46.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF47.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF48.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF49.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF50.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF51.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF52.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF53.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF54.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF55.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF56.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF57.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF58.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF59.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF60.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF61.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF62.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF63.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF64.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF65.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF66.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF67.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF68.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF69.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF70.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF71.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF72.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF73.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF74.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF75.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF76.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF77.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF78.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF79.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF7A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF7B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF7C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF80.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF81.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF82.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF83.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF84.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF85.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF86.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF87.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF88.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF89.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF90.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF91.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF92.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF93.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFEA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFEB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFEC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFED.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFEE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFEF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFF0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC00.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC01.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC02.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC03.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC04.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC05.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC06.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC07.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC08.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC09.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC10.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC11.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC12.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC13.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC14.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC15.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC16.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC17.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC18.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC19.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC20.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC21.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC22.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC23.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC24.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC25.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC26.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC27.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC28.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC29.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC30.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC31.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC32.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC33.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC34.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC35.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC36.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC37.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC38.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC39.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC3A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC3B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC3C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC3D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC3E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC40.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC42.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC43.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC44.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC45.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC46.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC47.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC48.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC49.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC50.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC51.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC52.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC53.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC54.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC55.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC56.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC57.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC58.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC59.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC60.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC61.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC62.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC63.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC64.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC65.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC66.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC67.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC68.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC69.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC70.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC71.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC72.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC73.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC74.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC75.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC76.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC77.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC78.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC79.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC80.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC81.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC82.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC83.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC84.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC85.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC86.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC87.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC88.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC89.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC90.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC91.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC92.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC93.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC94.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC95.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC96.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC97.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC98.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC99.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCEA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCEB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCEC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCED.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCEE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCEF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCFA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCFB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCFC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD00.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD01.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD02.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD03.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD04.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD05.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD06.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD07.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD08.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD09.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD10.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD11.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD12.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD13.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD14.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD15.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD16.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD17.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD18.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD19.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD20.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD21.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD22.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD23.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD24.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD25.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD26.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD27.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD28.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD29.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD30.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD31.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD32.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD33.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD34.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD35.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD36.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD37.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD38.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD39.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD3A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD3B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD3C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD3D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD50.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD51.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD52.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD53.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD54.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD55.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD56.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD57.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD58.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD59.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD60.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD61.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD62.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD63.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD64.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD65.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD66.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD67.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDFB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDFC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDFD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDFE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDFF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE00.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE01.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE02.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE03.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE04.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE05.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE06.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE07.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE08.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE09.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE10.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE11.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE12.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE13.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE14.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE15.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE16.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE17.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE18.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE19.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE20.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE21.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE22.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE23.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE24.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE25.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE26.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE27.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE28.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE29.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE30.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE31.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE32.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE33.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE34.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE35.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE36.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE37.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE38.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE39.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE40.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE45.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE46.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE47.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE48.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE49.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE80.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE81.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE82.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE83.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE84.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE85.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE86.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE87.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE88.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE89.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE90.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE91.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE92.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE93.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE94.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE95.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE96.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE97.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE98.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE99.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9A.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9B.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9C.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9D.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9E.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9F.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB7.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB8.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB9.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBA.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBB.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBC.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBD.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBE.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBF.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part6.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part0.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part1.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part2.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part3.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part4.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part5.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Assets\\light.emoji.abc-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.backspace-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.category.1-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.category.2-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.category.3-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.category.4-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.category.5-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.recent-WXGA.png\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\Telegram.Api\\Telegram.Api.csproj\">\r\n      <Project>{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}</Project>\r\n      <Name>Telegram.Api</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\r\n    <PropertyGroup>\r\n      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>\r\n    </PropertyGroup>\r\n    <Error Condition=\"!Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\\.nuget\\NuGet.targets'))\" />\r\n  </Target>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "Telegram.EmojiPanel/TelegramRichTextBox.cs",
    "content": "﻿using System;\r\nusing System.Text.RegularExpressions;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\n\r\nnamespace Telegram.EmojiPanel\r\n{\r\n    public class TelegramRichTextBox : Control\r\n    {\r\n        public static readonly DependencyProperty MoreElementProperty = DependencyProperty.Register(\r\n            \"MoreElement\", typeof (FrameworkElement), typeof (TelegramRichTextBox), new PropertyMetadata(default(FrameworkElement), OnMoreElementChanged));\r\n\r\n        private static void OnMoreElementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var telegramRichTextBox = (TelegramRichTextBox) d;\r\n            telegramRichTextBox.OnSizeChanged(null, null);\r\n        }\r\n\r\n        public FrameworkElement MoreElement\r\n        {\r\n            get { return (FrameworkElement) GetValue(MoreElementProperty); }\r\n            set { SetValue(MoreElementProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextScaleFactorProperty = DependencyProperty.Register(\r\n            \"TextScaleFactor\", typeof (double), typeof (TelegramRichTextBox), new PropertyMetadata(1.0, OnFontScaleFactorChanged));\r\n\r\n        private static void OnFontScaleFactorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var textBox = (TelegramRichTextBox)d;\r\n            if (textBox != null && textBox._stackPanel != null)\r\n            {\r\n                foreach (var child in textBox._stackPanel.Children)\r\n                {\r\n                    var richTextBox = child as RichTextBox;\r\n                    if (richTextBox != null)\r\n                    {\r\n                        richTextBox.FontSize = textBox._defaultFontSize*(double) e.NewValue;\r\n                        foreach (var block in richTextBox.Blocks)\r\n                        {\r\n                            var paragraph = block as Paragraph;\r\n                            if (paragraph != null)\r\n                            {\r\n                                foreach (var inline in paragraph.Inlines)\r\n                                {\r\n                                    var uiContainer = inline as InlineUIContainer;\r\n                                    if (uiContainer != null)\r\n                                    {\r\n                                        var image = uiContainer.Child as Image;\r\n                                        if (image != null)\r\n                                        {\r\n                                            var size = 27.0 * (double)e.NewValue;\r\n                                            image.Height = size;\r\n                                            image.Width = size;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private double _defaultFontSize;\r\n\r\n        public double TextScaleFactor\r\n        {\r\n            get { return (double) GetValue(TextScaleFactorProperty); }\r\n            set { SetValue(TextScaleFactorProperty, value); }\r\n        }\r\n\r\n        private StackPanel _stackPanel;\r\n        private TextBlock measureTxt;\r\n\r\n        public TelegramRichTextBox()\r\n        {\r\n            DefaultStyleKey = typeof(TelegramRichTextBox);\r\n\r\n            SizeChanged += OnSizeChanged;\r\n        }\r\n\r\n        private void OnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            if (MoreElement != null)\r\n            {\r\n                if (ActualHeight > 0.0 && MaxHeight > 0.0 && ActualHeight >= MaxHeight)\r\n                {\r\n                    MoreElement.Visibility = Visibility.Visible;\r\n                }\r\n                else\r\n                {\r\n                    MoreElement.Visibility = Visibility.Collapsed;\r\n                }\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty =\r\n            DependencyProperty.Register(\r\n                \"Text\",\r\n                typeof(string),\r\n                typeof(TelegramRichTextBox),\r\n                new PropertyMetadata(\"\", OnTextPropertyChanged));\r\n\r\n        public string Text\r\n        {\r\n            get\r\n            {\r\n                return (string)GetValue(TextProperty);\r\n            }\r\n            set\r\n            {\r\n                SetValue(TextProperty, value);\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty DateTextProperty = DependencyProperty.Register(\r\n            \"DateText\", typeof (string), typeof (TelegramRichTextBox), new PropertyMetadata(default(string)));\r\n\r\n        public string DateText\r\n        {\r\n            get { return (string) GetValue(DateTextProperty); }\r\n            set { SetValue(DateTextProperty, value); }\r\n        }\r\n\r\n        private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            TelegramRichTextBox source = (TelegramRichTextBox)d;\r\n            string value = (string)e.NewValue;\r\n            source.ParseText(value);\r\n        }\r\n\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            _defaultFontSize = FontSize;\r\n            _stackPanel = GetTemplateChild(\"StackPanel\") as StackPanel;\r\n            ParseText(Text);\r\n\r\n            base.OnApplyTemplate();\r\n\r\n        }\r\n\r\n        private void ParseText(string value)\r\n        {\r\n            if (value == null)\r\n            {\r\n                value = \"\";\r\n            }\r\n\r\n            if (_stackPanel == null)\r\n            {\r\n                return;\r\n            }\r\n            // Clear previous TextBlocks\r\n            _stackPanel.Children.Clear();\r\n\r\n\r\n            bool fitIn2000Pixels = CheckFitInMaxRenderHeight(value);\r\n\r\n            if (fitIn2000Pixels)\r\n            {\r\n                var textBlock = GetTextBlock();\r\n                BrowserNavigationService.SetText(textBlock, value);\r\n                _stackPanel.Children.Add(textBlock);\r\n            }\r\n            else\r\n            {\r\n                ParseLineExtended(value);\r\n            }\r\n        }\r\n\r\n        private readonly int MAX_STR_LENGTH = 1100;\r\n\r\n        private void ParseLineExtended(string allText)\r\n        {\r\n            if (string.IsNullOrEmpty(allText))\r\n                return;\r\n\r\n\r\n            int cutIndex = MAX_STR_LENGTH;\r\n            if (cutIndex >= allText.Length)\r\n                cutIndex = allText.Length - 1;\r\n\r\n            var endOfSentenceIndAfterCut = allText.IndexOf(\".\", cutIndex);\r\n\r\n            if (endOfSentenceIndAfterCut >= 0 && endOfSentenceIndAfterCut - cutIndex < 200)\r\n            {\r\n                cutIndex = endOfSentenceIndAfterCut;\r\n            }\r\n            else\r\n            {\r\n                var whiteSpaceIndAfterCut = allText.IndexOf(' ', cutIndex);\r\n\r\n                if (whiteSpaceIndAfterCut >= 0 && whiteSpaceIndAfterCut - cutIndex < 100)\r\n                {\r\n                    cutIndex = whiteSpaceIndAfterCut;\r\n                }\r\n            }\r\n\r\n            // add all whitespaces before cut\r\n            while (cutIndex + 1 < allText.Length &&\r\n                   allText[cutIndex + 1] == ' ')\r\n            {\r\n                cutIndex++;\r\n            }\r\n\r\n            string leftSide = allText.Substring(0, cutIndex + 1);\r\n            RichTextBox textBlock = this.GetTextBlock();\r\n            BrowserNavigationService.SetText(textBlock, leftSide);\r\n            this._stackPanel.Children.Add(textBlock);\r\n\r\n            allText = allText.Substring(cutIndex + 1);\r\n\r\n            if (allText.Length > 0)\r\n            {\r\n                ParseLineExtended(allText);\r\n            }\r\n        }\r\n\r\n        private bool CheckFitInMaxRenderHeight(string value)\r\n        {\r\n            return value.Length <= MAX_STR_LENGTH;\r\n        }\r\n\r\n        private RichTextBox GetTextBlock()\r\n        {\r\n            var textBlock = new RichTextBox();\r\n\r\n            textBlock.TextWrapping = TextWrapping.Wrap;\r\n            textBlock.IsReadOnly = true;\r\n            textBlock.FontSize = FontSize * TextScaleFactor;\r\n            textBlock.FontFamily = FontFamily;\r\n            textBlock.HorizontalContentAlignment = HorizontalContentAlignment;\r\n            textBlock.Foreground = Foreground;\r\n            textBlock.Padding = new Thickness(0, 0, 0, 0);\r\n\r\n            return textBlock;\r\n        }\r\n\r\n    }\r\n\r\n    public class Utils\r\n    {\r\n        public static readonly Regex HyperlinkRegex = new Regex(\"(?i)\\\\b(((?:https?://|www\\\\d{0,3}[.]|[a-z0-9.\\\\-]+[.][a-z]{2,4}/)(?:[^\\\\s()<>]+|\\\\(([^\\\\s()<>]+|(\\\\([^\\\\s()<>]+\\\\)))*\\\\))+(?:\\\\(([^\\\\s()<>]+|(\\\\([^\\\\s()<>]+\\\\)))*\\\\)|[^\\\\s`!()\\\\[\\\\]{};:'\\\".,<>?«»“”‘’]))|([a-z0-9.\\\\-]+(\\\\.ru|\\\\.com|\\\\.net|\\\\.org|\\\\.us|\\\\.it|\\\\.co\\\\.uk)(?![a-z0-9]))|([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\\\.[a-zA-Z0-9-.]*[a-zA-Z0-9-]+))\");\r\n\r\n        public static string GetFormattedLink(string link)\r\n        {\r\n            var flag = link.EndsWith(\",\");\r\n            if (flag && link.Length > 1)\r\n                link = link.Substring(0, link.Length - 1);\r\n            if (!link.StartsWith(\"http\", StringComparison.OrdinalIgnoreCase))\r\n                link = \"http://\" + link;\r\n\r\n            return link;\r\n        }\r\n\r\n        public static Inline GetTextBlock(string text)\r\n        {\r\n            return new Run { Text = text };\r\n        }\r\n\r\n        public static Inline GetHyperlinkBlock(string text, string link)\r\n        {\r\n            var hyperlink = new Hyperlink();\r\n            hyperlink.Inlines.Add(text);\r\n            hyperlink.NavigateUri = new Uri(link, UriKind.Absolute);\r\n\r\n            return hyperlink;\r\n        }\r\n\r\n        public static Inline GetEmojiBlock(string emoji)\r\n        {\r\n            var uiContainer = new InlineUIContainer();\r\n            uiContainer.Child = new Image { Source = GetEmojiSource(emoji), Width = 30, Height = 30 };\r\n\r\n            return uiContainer;\r\n        }\r\n\r\n        public static ImageSource GetEmojiSource(string emoji)\r\n        {\r\n            return new BitmapImage(new Uri(emoji));\r\n        }\r\n\r\n        public static Regex GetRegex(bool supportEmoji)\r\n        {\r\n            if (supportEmoji)\r\n            {\r\n                return HyperlinkRegex;\r\n            }\r\n\r\n            return HyperlinkRegex;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/TestScrollableTextBlock.cs",
    "content": "﻿using System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace Telegram.EmojiPanel\r\n{\r\n    public class TestScrollableTextBlock : Control\r\n    {\r\n        private StackPanel stackPanel;\r\n        private TextBlock measureTxt;\r\n\r\n        public TestScrollableTextBlock()\r\n        {\r\n            DefaultStyleKey = typeof(TestScrollableTextBlock);\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty =\r\n            DependencyProperty.Register(\r\n                \"Text\",\r\n                typeof(string),\r\n                typeof(TestScrollableTextBlock),\r\n                new PropertyMetadata(\"\", OnTextPropertyChanged));\r\n\r\n\r\n        public static readonly DependencyProperty LineHeightProperty\r\n            = DependencyProperty.Register(\r\n            \"LineHeight\",\r\n            typeof(double),\r\n            typeof(TestScrollableTextBlock), null);\r\n\r\n        public string Text\r\n        {\r\n            get\r\n            {\r\n                return (string)GetValue(TextProperty);\r\n            }\r\n            set\r\n            {\r\n                SetValue(TextProperty, value);\r\n            }\r\n        }\r\n\r\n        private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            //TestScrollableTextBlock source = (TestScrollableTextBlock)d;\r\n            //string value = (string)e.NewValue;\r\n            //source.ParseText(value);\r\n        }\r\n\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            stackPanel = GetTemplateChild(\"StackPanel\") as StackPanel;\r\n            ParseText(Text);\r\n\r\n            base.OnApplyTemplate();\r\n            \r\n        }\r\n\r\n        private void ParseText(string value)\r\n        {\r\n            if (value == null)\r\n            {\r\n                value = \"\";\r\n            }\r\n\r\n            if (this.stackPanel == null)\r\n            {\r\n                return;\r\n            }\r\n            // Clear previous TextBlocks\r\n            this.stackPanel.Children.Clear();\r\n\r\n\r\n            bool fitIn2000Pixels = CheckFitInMaxRenderHeight(value);\r\n\r\n            if (fitIn2000Pixels)\r\n            {\r\n                RichTextBox textBlock = this.GetTextBlock();\r\n                BrowserNavigationService.SetText(textBlock, value);\r\n                this.stackPanel.Children.Add(textBlock);\r\n            }\r\n            else\r\n            {\r\n                ParseLineExtended(value);\r\n            }\r\n        }\r\n\r\n        private readonly int MAX_STR_LENGTH = 1100;\r\n\r\n        private void ParseLineExtended(string allText)\r\n        {\r\n            if (string.IsNullOrEmpty(allText))\r\n                return;\r\n\r\n\r\n            int cutIndex = MAX_STR_LENGTH;\r\n            if (cutIndex >= allText.Length)\r\n                cutIndex = allText.Length - 1;\r\n\r\n            var endOfSentenceIndAfterCut = allText.IndexOf(\".\", cutIndex);\r\n\r\n            if (endOfSentenceIndAfterCut >= 0 && endOfSentenceIndAfterCut - cutIndex < 200)\r\n            {\r\n                cutIndex = endOfSentenceIndAfterCut;\r\n            }\r\n            else\r\n            {\r\n                var whiteSpaceIndAfterCut = allText.IndexOf(' ', cutIndex);\r\n\r\n                if (whiteSpaceIndAfterCut >= 0 && whiteSpaceIndAfterCut - cutIndex < 100)\r\n                {\r\n                    cutIndex = whiteSpaceIndAfterCut;\r\n                }\r\n            }\r\n\r\n            // add all whitespaces before cut\r\n            while (cutIndex + 1 < allText.Length &&\r\n                   allText[cutIndex + 1] == ' ')\r\n            {\r\n                cutIndex++;\r\n            }\r\n\r\n            string leftSide = allText.Substring(0, cutIndex + 1);\r\n            RichTextBox textBlock = this.GetTextBlock();\r\n            BrowserNavigationService.SetText(textBlock, leftSide);\r\n            this.stackPanel.Children.Add(textBlock);\r\n\r\n            allText = allText.Substring(cutIndex + 1);\r\n\r\n            if (allText.Length > 0)\r\n            {\r\n                ParseLineExtended(allText);\r\n            }\r\n        }\r\n\r\n        private bool CheckFitInMaxRenderHeight(string value)\r\n        {\r\n            return value.Length <= MAX_STR_LENGTH;\r\n        }\r\n\r\n        private RichTextBox GetTextBlock()\r\n        {\r\n            RichTextBox textBlock = new RichTextBox();\r\n            textBlock.TextWrapping = TextWrapping.Wrap;\r\n\r\n            textBlock.IsReadOnly = true;\r\n            textBlock.FontSize = this.FontSize;\r\n            textBlock.FontFamily = this.FontFamily;\r\n            textBlock.HorizontalContentAlignment = this.HorizontalContentAlignment;\r\n            textBlock.Foreground = Foreground;\r\n            textBlock.Padding = new Thickness(-12, 0, 0, 0);\r\n\r\n            return textBlock;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "Telegram.EmojiPanel/Themes/generic.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\">\r\n\r\n    <Style TargetType=\"emojiPanel:TelegramRichTextBox\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n        <Setter Property=\"Padding\" Value=\"12,0\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"emojiPanel:TelegramRichTextBox\">\r\n                    <!--<RichTextBox IsReadOnly=\"true\" x:Name=\"RichTextBox\" />-->\r\n                    <StackPanel Orientation=\"Vertical\" x:Name=\"StackPanel\"/>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"emojiPanel:TestScrollableTextBlock\">\r\n        <!--<Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n        <Setter Property=\"Padding\" Value=\"12,0\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>-->\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"emojiPanel:TestScrollableTextBlock\">\r\n                    <StackPanel x:Name=\"StackPanel\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "Telegram.EmojiPanel/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"WPtoolkit\" version=\"4.2013.08.16\" targetFramework=\"wp71\" />\r\n</packages>"
  },
  {
    "path": "Telegram.EmojiPanel.WP8/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Telegram.EmojiPanel.WP8\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Telegram.EmojiPanel.WP8\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"8223db37-4a07-4e16-91a1-b28e822c9dc0\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "Telegram.EmojiPanel.WP8/Telegram.EmojiPanel.WP8.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{8223DB37-4A07-4E16-91A1-B28E822C9DC0}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>Telegram.EmojiPanel</RootNamespace>\r\n    <AssemblyName>Telegram.EmojiPanel</AssemblyName>\r\n    <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>\r\n    <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|x86' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\x86\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|x86' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\x86\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|ARM' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\ARM\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|ARM' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\ARM\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\BrowserNavigationService.cs\">\r\n      <Link>BrowserNavigationService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml.cs\">\r\n      <Link>Controls\\Emoji\\EmojiControl.xaml.cs</Link>\r\n      <DependentUpon>EmojiControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\Controls\\Emoji\\EmojiData.cs\">\r\n      <Link>Controls\\Emoji\\EmojiData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\Controls\\Emoji\\EmojiSpriteItem.cs\">\r\n      <Link>Controls\\Emoji\\EmojiSpriteItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\Controls\\Utilites\\DelayedExecutor.cs\">\r\n      <Link>Controls\\Utilites\\DelayedExecutor.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\Controls\\Utilites\\Helpers.cs\">\r\n      <Link>Controls\\Utilites\\Helpers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\Controls\\Utilites\\MyListItemBase.cs\">\r\n      <Link>Controls\\Utilites\\MyListItemBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\Controls\\Utilites\\MyVirtualizingPanel.cs\">\r\n      <Link>Controls\\Utilites\\MyVirtualizingPanel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\Controls\\Utilites\\VirtSegment.cs\">\r\n      <Link>Controls\\Utilites\\VirtSegment.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\Controls\\Utilites\\VListItemBase.cs\">\r\n      <Link>Controls\\Utilites\\VListItemBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\TelegramRichTextBox.cs\">\r\n      <Link>TelegramRichTextBox.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\Telegram.EmojiPanel\\TestScrollableTextBlock.cs\">\r\n      <Link>TestScrollableTextBlock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Page Include=\"..\\Telegram.EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml\">\r\n      <Link>Controls\\Emoji\\EmojiControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\Telegram.EmojiPanel\\Themes\\generic.xaml\">\r\n      <Link>Themes\\generic.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\emoji.abc-WXGA.png\">\r\n      <Link>Assets\\emoji.abc-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\emoji.backspace-WXGA.png\">\r\n      <Link>Assets\\emoji.backspace-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\emoji.category.1-WXGA.png\">\r\n      <Link>Assets\\emoji.category.1-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\emoji.category.2-WXGA.png\">\r\n      <Link>Assets\\emoji.category.2-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\emoji.category.3-WXGA.png\">\r\n      <Link>Assets\\emoji.category.3-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\emoji.category.4-WXGA.png\">\r\n      <Link>Assets\\emoji.category.4-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\emoji.category.5-WXGA.png\">\r\n      <Link>Assets\\emoji.category.5-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\emoji.recent-WXGA.png\">\r\n      <Link>Assets\\emoji.recent-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\002320E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\002320E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\003020E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003020E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\003120E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003120E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\003220E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003220E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\003320E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003320E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\003420E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003420E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\003520E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003520E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\003620E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003620E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\003720E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003720E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\003820E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003820E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\003920E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003920E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\00a9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\00a9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\00ae.png\">\r\n      <Link>Assets\\Emoji\\Separated\\00ae.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\203C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\203C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2049.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2049.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2122.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2122.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2139.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2139.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2194.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2194.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2195.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2195.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2196.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2196.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2197.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2197.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2198.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2198.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2199.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2199.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\21A9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\21A9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\21AA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\21AA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\231A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\231A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\231B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\231B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\23e9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23e9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\23ea.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23ea.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\23eb.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23eb.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\23ec.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23ec.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\23f0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23f0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\23f3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23f3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\24C2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\24C2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\25AA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25AA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\25AB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25AB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\25B6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25B6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\25C0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25C0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\25FB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\25FC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\25FD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\25FE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2600.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2600.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2601.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2601.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\260E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\260E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2611.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2611.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2614.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2614.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2615.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2615.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\261D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\263A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\263A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2648.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2648.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2649.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2649.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\264A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\264B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\264C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\264D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\264E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\264F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2650.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2650.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2651.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2651.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2652.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2652.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2653.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2653.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2660.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2660.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2663.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2663.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2665.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2665.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2666.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2666.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2668.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2668.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\267B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\267B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\267F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\267F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2693.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2693.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26A0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26A0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26A1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26A1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26AA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26AA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26AB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26AB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26BD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26BD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26BE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26BE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26C4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26C4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26C5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26C5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26ce.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26ce.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26D4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26D4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26EA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26EA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26F2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26F3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26F5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26FA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26FA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\26FD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26FD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2702.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2702.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2705.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2705.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2709.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2709.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\270a.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270a.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\270b.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270b.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\270C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\270F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2712.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2712.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2714.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2714.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2716.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2716.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2728.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2728.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2733.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2733.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2734.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2734.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2744.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2744.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2747.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2747.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\274c.png\">\r\n      <Link>Assets\\Emoji\\Separated\\274c.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\274e.png\">\r\n      <Link>Assets\\Emoji\\Separated\\274e.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2753.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2753.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2754.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2754.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2755.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2755.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2757.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2757.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2764.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2764.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2795.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2795.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2796.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2796.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2797.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2797.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\27A1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\27A1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\27b0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\27b0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\27bf.png\">\r\n      <Link>Assets\\Emoji\\Separated\\27bf.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2934.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2934.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2935.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2935.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2B05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2B06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2B07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2B1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2B1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2B50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\2B55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\3030.png\">\r\n      <Link>Assets\\Emoji\\Separated\\3030.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\303D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\303D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\3297.png\">\r\n      <Link>Assets\\Emoji\\Separated\\3297.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\3299.png\">\r\n      <Link>Assets\\Emoji\\Separated\\3299.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDC04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDC04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDCCF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDCCF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD70.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD70.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD71.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD71.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD7E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD7E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD7F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD7F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD94.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD94.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD95.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD95.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD97.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD97.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD98.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD98.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD99.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD99.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDD9A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD9A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDDE9D83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE9D83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDDEAD83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEAD83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDDEBD83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEBD83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDDECD83CDDE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDDEED83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDDEFD83CDDF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEFD83CDDF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDDF7D83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF7D83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDDFAD83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFAD83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDE51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF3F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF40.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF40.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF41.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF41.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF42.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF42.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF43.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF43.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF44.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF44.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF45.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF45.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF46.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF46.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF47.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF47.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF48.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF48.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF49.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF49.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF4C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF4D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF4E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF4F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF52.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF52.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF53.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF53.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF54.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF54.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF56.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF56.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF57.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF57.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF58.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF58.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF59.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF59.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF5A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF5B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF5C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF5D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF5E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF5F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF60.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF60.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF61.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF61.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF62.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF62.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF63.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF63.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF64.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF64.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF65.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF65.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF68.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF68.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF69.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF69.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF6A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF6B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF6C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF6D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF6E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF6F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF70.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF70.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF71.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF71.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF72.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF72.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF74.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF74.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF75.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF75.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF76.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF76.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF77.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF77.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF78.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF78.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF79.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF79.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF7A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF7B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF7C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF84.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF84.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF85.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF86.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF86.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF88.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF88.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF89.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF89.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF8F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFA0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFA1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFA2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFA3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFA5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFA6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFA7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFA9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFAA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFAB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFAC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFAD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFAE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFAF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFB0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFB1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFB2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFB3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFB4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFB5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFB6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFB7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFB8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFB9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFBA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFBD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFBE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFBF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFC0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFC1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFC2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFC3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFC4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFC6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFC7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFC8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFC9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFCA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFE0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFE1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFE2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFE3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFE4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFE5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFEF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83CDFF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC22.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC22.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC23.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC23.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC26.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC26.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC28.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC28.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC29.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC29.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC2A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC2B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC2D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC2E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC40.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC40.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC42.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC43.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC44.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC44.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC45.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC45.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC46.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC47.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC48.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC49.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC4C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC4D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC4E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC4F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC52.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC52.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC53.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC53.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC54.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC54.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC56.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC56.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC57.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC57.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC58.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC58.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC59.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC59.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC5A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC5B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC5C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC5D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC5E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC5F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC60.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC60.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC61.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC61.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC62.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC62.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC63.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC63.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC64.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC64.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC65.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC65.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC68.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC69.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC6A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC6B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC6C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC6D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC6E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC6F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC70.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC71.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC72.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC74.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC75.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC76.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC77.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC78.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC79.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC79.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC7A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC7B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC7C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC7D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC7E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC7F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC84.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC84.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC85.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC86.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC88.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC88.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC89.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC89.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC8F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC94.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC94.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC95.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC95.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC97.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC97.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC98.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC98.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC99.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC99.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC9A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC9B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC9C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC9D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC9E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDC9F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCA0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCA1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCA2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCA3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCA5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCA6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCA7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCA9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCAA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCAB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCAC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCAD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCAE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCAF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCB0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCB1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCB2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCB3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCB4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCB5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCB6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCB7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCB8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCB9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCBA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCBD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCBE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCBF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCC0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCC1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCC2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCC3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCC4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCC5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCC6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCC7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCC8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCC9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCCA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCCB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCCC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCCD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCCE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCCF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCD0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCD1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCD2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCD3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCD4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCD5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCD6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCD7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCD8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCD9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCDA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCDB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCDC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCDD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCDE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCDF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCE0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCE1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCE2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCE3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCE4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCE5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCEF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCF6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDCFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD22.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD22.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD23.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD23.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD26.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD26.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD28.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD28.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD29.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD29.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD2A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD2B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD2D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD2E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD52.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD52.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD53.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD53.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD54.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD54.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD56.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD56.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD57.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD57.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD58.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD58.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD59.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD59.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD5A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD5B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD5C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD5D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD5E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD5F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD60.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD60.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD61.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD61.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD62.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD62.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD63.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD63.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD64.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD64.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD65.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD65.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDD67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDDFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDDFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE22.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE22.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE23.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE23.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE26.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE26.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE28.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE28.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE29.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE29.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE2A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE2B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE2D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE2E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE3F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE40.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE40.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE45.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE46.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE47.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE48.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE48.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE49.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE49.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE4C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE4D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE4E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE4F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE84.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE84.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE85.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE85.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE86.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE86.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE88.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE88.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE89.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE89.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE8F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE94.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE94.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE95.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE95.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE97.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE97.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE98.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE98.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE99.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE99.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE9A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE9B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE9C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE9D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE9E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDE9F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEA0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEA1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEA2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEA3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEA5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEA6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEA7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEA9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEAA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEAB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEAC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEAD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEAE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEAF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEB0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEB1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEB2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEB3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEB4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEB5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEB6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEB7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEB8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEB9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEBA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEBD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEBE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEBF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEC0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEC1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEC2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEC3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEC4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\Separated\\D83DDEC5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part5.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part5.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part6.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part5.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\light.emoji.abc-WXGA.png\">\r\n      <Link>Assets\\light.emoji.abc-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\light.emoji.backspace-WXGA.png\">\r\n      <Link>Assets\\light.emoji.backspace-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\light.emoji.category.1-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.1-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\light.emoji.category.2-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.2-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\light.emoji.category.3-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.3-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\light.emoji.category.4-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.4-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\light.emoji.category.5-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.5-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\Telegram.EmojiPanel\\Assets\\light.emoji.recent-WXGA.png\">\r\n      <Link>Assets\\light.emoji.recent-WXGA.png</Link>\r\n    </Content>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Microsoft.Phone.Controls.Toolkit\">\r\n      <HintPath>..\\packages\\WPtoolkit.4.2013.08.16\\lib\\wp8\\Microsoft.Phone.Controls.Toolkit.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\r\n    <PropertyGroup>\r\n      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>\r\n    </PropertyGroup>\r\n    <Error Condition=\"!Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\\.nuget\\NuGet.targets'))\" />\r\n  </Target>\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "Telegram.EmojiPanel.WP8/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"WPtoolkit\" version=\"4.2013.08.16\" targetFramework=\"wp80\" />\r\n</packages>"
  },
  {
    "path": "TelegramClient/Analytics/AnalyticsProperties.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO.IsolatedStorage;\r\nusing Coding4Fun.Toolkit.Controls.Common;\r\nusing Microsoft.Phone.Info;\r\n\r\nnamespace TelegramClient.Analytics\r\n{\r\n    public static class AnalyticsProperties\r\n    {\r\n        //public static string DeviceId\r\n        //{\r\n        //    get\r\n        //    {\r\n        //        var value = (byte[])DeviceExtendedProperties.GetValue(\"DeviceUniqueId\");\r\n        //        return Convert.ToBase64String(value);\r\n        //    }\r\n        //}\r\n\r\n        public static string LaunchCount\r\n        {\r\n            get\r\n            {\r\n                var settings = IsolatedStorageSettings.ApplicationSettings;\r\n\r\n                if (settings != null)\r\n                {\r\n                    if (settings.Contains(\"LaunchCount\"))\r\n                    {\r\n                        return ((int)settings[\"LaunchCount\"] + 1).ToString(CultureInfo.InvariantCulture);\r\n                    }\r\n                }\r\n\r\n                return \"1\";\r\n            }\r\n        }\r\n\r\n        public static string DeviceManufacturer\r\n        {\r\n            get { return DeviceExtendedProperties.GetValue(\"DeviceManufacturer\").ToString(); }\r\n        }\r\n\r\n        public static string DeviceType\r\n        {\r\n            get { return DeviceExtendedProperties.GetValue(\"DeviceName\").ToString(); }\r\n        }\r\n\r\n        public static string Device\r\n        {\r\n            get { return string.Format(\"{0} - {1}\", DeviceManufacturer, DeviceType); }\r\n        }\r\n\r\n        public static string OsVersion\r\n        {\r\n            get { return string.Format(\"WP {0}\", Environment.OSVersion.Version); }\r\n        }\r\n\r\n        public static string ApplicationVersion\r\n        {\r\n            get { return PhoneHelper.GetAppAttribute(\"Version\").Replace(\".0.0\", \"\"); }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Analytics/AnalyticsService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n"
  },
  {
    "path": "TelegramClient/Analytics/AnalyticsTracker.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n"
  },
  {
    "path": "TelegramClient/Analytics/ReviewRequester.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO.IsolatedStorage;\r\nusing System.Windows;\r\nusing Microsoft.Phone.Tasks;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Analytics\r\n{\r\n    public class ReviewRequester\r\n    {\r\n        public static void IncreaseLaunchCount()\r\n        {\r\n            var settings = IsolatedStorageSettings.ApplicationSettings;\r\n\r\n            if (settings.Contains(\"LaunchCount\"))\r\n            {\r\n                var launchCount = (int)settings[\"LaunchCount\"];\r\n                settings[\"LaunchCount\"] = ++launchCount;\r\n            }\r\n            else\r\n            {\r\n                settings[\"LaunchCount\"] = 1;\r\n            }\r\n        }\r\n\r\n        public static void Request()\r\n        {\r\n            var settings = IsolatedStorageSettings.ApplicationSettings;\r\n\r\n            if (settings.Contains(\"LaunchCount\"))\r\n            {\r\n                var launchCount = (int)settings[\"LaunchCount\"];\r\n                var isReviewed = settings.Contains(\"IsReviewed\");\r\n\r\n                if (!isReviewed)\r\n                {\r\n                    if (launchCount == 3\r\n                        || launchCount == 5)\r\n                    {\r\n                        //var tracker = new AnalyticsTracker();\r\n                        \r\n                        //var result = MessageBox.Show(AppResources.ReviewRequestMessage, AppResources.ReviewRequestTitle, MessageBoxButton.OKCancel);\r\n                        //tracker.Track(\"Review\", \"Requested\");\r\n\r\n                        //if (result == MessageBoxResult.OK)\r\n                        //{\r\n                        //    settings.Add(\"IsReviewed\", true);\r\n                        //    tracker.Track(\"Review\", \"Accepted\");\r\n\r\n                        //    var task = new MarketplaceReviewTask();\r\n                        //    task.Show();\r\n                        //}\r\n                    }\r\n                }\r\n\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Animation/LinqToVisualTree.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Animation.LinqToVisualTree\r\n{\r\n  /// <summary>\r\n  /// Adapts a DependencyObject to provide methods required for generate\r\n  /// a Linq To Tree API\r\n  /// </summary>\r\n  public class VisualTreeAdapter : ILinqTree<DependencyObject>\r\n  {\r\n    private DependencyObject _item;\r\n\r\n    public VisualTreeAdapter(DependencyObject item)\r\n    {\r\n      _item = item;\r\n    }\r\n\r\n    public IEnumerable<DependencyObject> Children()\r\n    {\r\n      int childrenCount = VisualTreeHelper.GetChildrenCount(_item);\r\n      for (int i = 0; i < childrenCount; i++)\r\n      {\r\n        yield return VisualTreeHelper.GetChild(_item, i);\r\n      }\r\n    }\r\n\r\n    public DependencyObject Parent\r\n    {\r\n      get\r\n      {\r\n        return VisualTreeHelper.GetParent(_item);\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\nnamespace TelegramClient.Animation.LinqToVisualTree\r\n{\r\n  /// <summary>\r\n  /// Defines an interface that must be implemented to generate the LinqToTree methods\r\n  /// </summary>\r\n  /// <typeparam name=\"T\"></typeparam>\r\n  public interface ILinqTree<T>\r\n  {\r\n    IEnumerable<T> Children();\r\n\r\n    T Parent { get; }\r\n  }\r\n\r\n  public static class TreeExtensions\r\n  {\r\n    /// <summary>\r\n    /// Returns a collection of descendant elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Descendants(this DependencyObject item)\r\n    {\r\n      ILinqTree<DependencyObject> adapter = new VisualTreeAdapter(item);\r\n      foreach (var child in adapter.Children())\r\n      {\r\n        yield return child;\r\n\r\n        foreach (var grandChild in child.Descendants())\r\n        {\r\n          yield return grandChild;\r\n        }\r\n      }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all descendant elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> DescendantsAndSelf(this DependencyObject item)\r\n    {\r\n      yield return item;\r\n\r\n      foreach (var child in item.Descendants())\r\n      {\r\n        yield return child;\r\n      }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of ancestor elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Ancestors(this DependencyObject item)\r\n    {\r\n      ILinqTree<DependencyObject> adapter = new VisualTreeAdapter(item);\r\n\r\n      var parent = adapter.Parent;\r\n      while (parent != null)\r\n      {\r\n        yield return parent;\r\n        adapter = new VisualTreeAdapter(parent);\r\n        parent = adapter.Parent;\r\n      }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all ancestor elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> AncestorsAndSelf(this DependencyObject item)\r\n    {\r\n      yield return item;\r\n\r\n      foreach (var ancestor in item.Ancestors())\r\n      {\r\n        yield return ancestor;\r\n      }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of child elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Elements(this DependencyObject item)\r\n    {\r\n      ILinqTree<DependencyObject> adapter = new VisualTreeAdapter(item);\r\n      foreach (var child in adapter.Children())\r\n      {\r\n        yield return child;\r\n      }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of the sibling elements before this node, in document order.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> ElementsBeforeSelf(this DependencyObject item)\r\n    {\r\n      if (item.Ancestors().FirstOrDefault() == null)\r\n        yield break;\r\n      foreach (var child in item.Ancestors().First().Elements())\r\n      {\r\n        if (child.Equals(item))\r\n          break;\r\n        yield return child;\r\n      }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of the after elements after this node, in document order.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> ElementsAfterSelf(this DependencyObject item)\r\n    {\r\n      if (item.Ancestors().FirstOrDefault() == null)\r\n        yield break;\r\n      bool afterSelf = false;\r\n      foreach (var child in item.Ancestors().First().Elements())\r\n      {\r\n        if (afterSelf)\r\n          yield return child;\r\n\r\n        if (child.Equals(item))\r\n          afterSelf = true;\r\n      }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all child elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> ElementsAndSelf(this DependencyObject item)\r\n    {\r\n      yield return item;\r\n\r\n      foreach (var child in item.Elements())\r\n      {\r\n        yield return child;\r\n      }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of descendant elements which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Descendants<T>(this DependencyObject item)\r\n    {\r\n      return item.Descendants().Where(i => i is T).Cast<DependencyObject>();\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of the sibling elements before this node, in document order\r\n    /// which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> ElementsBeforeSelf<T>(this DependencyObject item)\r\n    {\r\n      return item.ElementsBeforeSelf().Where(i => i is T).Cast<DependencyObject>();\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of the after elements after this node, in document order\r\n    /// which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> ElementsAfterSelf<T>(this DependencyObject item)\r\n    {\r\n      return item.ElementsAfterSelf().Where(i => i is T).Cast<DependencyObject>();\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all descendant elements\r\n    /// which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> DescendantsAndSelf<T>(this DependencyObject item)\r\n    {\r\n      return item.DescendantsAndSelf().Where(i => i is T).Cast<DependencyObject>();\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of ancestor elements which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Ancestors<T>(this DependencyObject item)\r\n    {\r\n      return item.Ancestors().Where(i => i is T).Cast<DependencyObject>();\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all ancestor elements\r\n    /// which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> AncestorsAndSelf<T>(this DependencyObject item)\r\n    {\r\n      return item.AncestorsAndSelf().Where(i => i is T).Cast<DependencyObject>();\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of child elements which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Elements<T>(this DependencyObject item)\r\n    {\r\n      return item.Elements().Where(i => i is T).Cast<DependencyObject>();\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all child elements.\r\n    /// which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> ElementsAndSelf<T>(this DependencyObject item)\r\n    {\r\n      return item.ElementsAndSelf().Where(i => i is T).Cast<DependencyObject>();\r\n    }\r\n\r\n  }\r\n\r\n  public static class EnumerableTreeExtensions\r\n  {\r\n    /// <summary>\r\n    /// Applies the given function to each of the items in the supplied\r\n    /// IEnumerable.\r\n    /// </summary>\r\n    private static IEnumerable<DependencyObject> DrillDown(this IEnumerable<DependencyObject> items,\r\n        Func<DependencyObject, IEnumerable<DependencyObject>> function)\r\n    {\r\n      foreach (var item in items)\r\n      {\r\n        foreach (var itemChild in function(item))\r\n        {\r\n          yield return itemChild;\r\n        }\r\n      }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Applies the given function to each of the items in the supplied\r\n    /// IEnumerable, which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> DrillDown<T>(this IEnumerable<DependencyObject> items,\r\n        Func<DependencyObject, IEnumerable<DependencyObject>> function)\r\n        where T : DependencyObject\r\n    {\r\n      foreach (var item in items)\r\n      {\r\n        foreach (var itemChild in function(item))\r\n        {\r\n          if (itemChild is T)\r\n          {\r\n            yield return (T)itemChild;\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of descendant elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Descendants(this IEnumerable<DependencyObject> items)\r\n    {\r\n      return items.DrillDown(i => i.Descendants());\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all descendant elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> DescendantsAndSelf(this IEnumerable<DependencyObject> items)\r\n    {\r\n      return items.DrillDown(i => i.DescendantsAndSelf());\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of ancestor elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Ancestors(this IEnumerable<DependencyObject> items)\r\n    {\r\n      return items.DrillDown(i => i.Ancestors());\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all ancestor elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> AncestorsAndSelf(this IEnumerable<DependencyObject> items)\r\n    {\r\n      return items.DrillDown(i => i.AncestorsAndSelf());\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of child elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Elements(this IEnumerable<DependencyObject> items)\r\n    {\r\n      return items.DrillDown(i => i.Elements());\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all child elements.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> ElementsAndSelf(this IEnumerable<DependencyObject> items)\r\n    {\r\n      return items.DrillDown(i => i.ElementsAndSelf());\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of descendant elements which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Descendants<T>(this IEnumerable<DependencyObject> items)\r\n        where T : DependencyObject\r\n    {\r\n      return items.DrillDown<T>(i => i.Descendants());\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all descendant elements.\r\n    /// which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> DescendantsAndSelf<T>(this IEnumerable<DependencyObject> items)\r\n        where T : DependencyObject\r\n    {\r\n      return items.DrillDown<T>(i => i.DescendantsAndSelf());\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of ancestor elements which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Ancestors<T>(this IEnumerable<DependencyObject> items)\r\n        where T : DependencyObject\r\n    {\r\n      return items.DrillDown<T>(i => i.Ancestors());\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all ancestor elements.\r\n    /// which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> AncestorsAndSelf<T>(this IEnumerable<DependencyObject> items)\r\n        where T : DependencyObject\r\n    {\r\n      return items.DrillDown<T>(i => i.AncestorsAndSelf());\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection of child elements which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> Elements<T>(this IEnumerable<DependencyObject> items)\r\n        where T : DependencyObject\r\n    {\r\n      return items.DrillDown<T>(i => i.Elements());\r\n    }\r\n\r\n    /// <summary>\r\n    /// Returns a collection containing this element and all child elements.\r\n    /// which match the given type.\r\n    /// </summary>\r\n    public static IEnumerable<DependencyObject> ElementsAndSelf<T>(this IEnumerable<DependencyObject> items)\r\n        where T : DependencyObject\r\n    {\r\n      return items.DrillDown<T>(i => i.ElementsAndSelf());\r\n    }\r\n  }\r\n}"
  },
  {
    "path": "TelegramClient/Animation/MetroInMotion.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Controls;\r\nusing TelegramClient.Animation.LinqToVisualTree;\r\n\r\nnamespace TelegramClient.Animation\r\n{\r\n  public static class MetroInMotion\r\n  {\r\n\r\n\r\n      public static int GetPivotIndex(DependencyObject obj)\r\n      {\r\n          return (int)obj.GetValue(PivotIndexProperty);\r\n      }\r\n\r\n      public static void SetPivotIndex(DependencyObject obj, int value)\r\n      {\r\n          obj.SetValue(PivotIndexProperty, value);\r\n      }\r\n\r\n\r\n      public static readonly DependencyProperty PivotIndexProperty =\r\n          DependencyProperty.RegisterAttached(\"PivotIndex\", typeof(int),\r\n          typeof(MetroInMotion), new PropertyMetadata(-1));\r\n\r\n    #region AnimationLevel\r\n\r\n    public static int GetAnimationLevel(DependencyObject obj)\r\n    {\r\n      return (int)obj.GetValue(AnimationLevelProperty);\r\n    }\r\n\r\n    public static void SetAnimationLevel(DependencyObject obj, int value)\r\n    {\r\n      obj.SetValue(AnimationLevelProperty, value);\r\n    }\r\n\r\n\r\n    public static readonly DependencyProperty AnimationLevelProperty =\r\n        DependencyProperty.RegisterAttached(\"AnimationLevel\", typeof(int),\r\n        typeof(MetroInMotion), new PropertyMetadata(-1));\r\n\r\n    #endregion\r\n\r\n    #region IsPivotAnimated\r\n\r\n    public static bool GetIsPivotAnimated(DependencyObject obj)\r\n    {\r\n      return (bool)obj.GetValue(IsPivotAnimatedProperty);\r\n    }\r\n\r\n    public static void SetIsPivotAnimated(DependencyObject obj, bool value)\r\n    {\r\n      obj.SetValue(IsPivotAnimatedProperty, value);\r\n    }\r\n\r\n    public static readonly DependencyProperty IsPivotAnimatedProperty =\r\n        DependencyProperty.RegisterAttached(\"IsPivotAnimated\", typeof(bool),\r\n        typeof(MetroInMotion), new PropertyMetadata(false, OnIsPivotAnimatedChanged));\r\n\r\n    private static void OnIsPivotAnimatedChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)\r\n    {\r\n      ItemsControl list = d as ItemsControl;\r\n\r\n      list.Loaded += (s2, e2) =>\r\n      {\r\n\r\n          // locate the pivot control that this list is within\r\n          Pivot pivot = list.Ancestors<Pivot>().Single() as Pivot;\r\n\r\n            var pivotIndex = GetPivotIndex(list);\r\n            if (pivotIndex == -1)\r\n            {\r\n\r\n\r\n                var pivotItem = list.Ancestors<PivotItem>().Single();\r\n\r\n                // and its index within the pivot\r\n                pivotIndex = pivot.Items.IndexOf(pivotItem);\r\n                                 \r\n            }\r\n\r\n          bool selectionChanged = false;\r\n\r\n          pivot.SelectionChanged += (s3, e3) =>\r\n            {\r\n              selectionChanged = true;\r\n            };\r\n\r\n          // handle manipulation events which occur when the user\r\n          // moves between pivot items\r\n          pivot.ManipulationCompleted += (s, e) =>\r\n            {\r\n              if (!selectionChanged)\r\n                return;\r\n\r\n              selectionChanged = false;\r\n\r\n              if (pivotIndex != pivot.SelectedIndex)\r\n                return;\r\n              \r\n              // determine which direction this tab will be scrolling in from\r\n              bool fromRight = e.TotalManipulation.Translation.X <= 0;\r\n\r\n                            \r\n              // iterate over each of the items in view\r\n              var items = list.GetItemsInView().ToList();\r\n              for (int index = 0; index < items.Count; index++ )\r\n              {\r\n                var lbi = items[index];\r\n\r\n                list.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                  var animationTargets = lbi.Descendants()\r\n                                         .Where(p => MetroInMotion.GetAnimationLevel(p) > -1);\r\n                  foreach (FrameworkElement target in animationTargets)\r\n                  {\r\n                    // trigger the required animation\r\n                    GetSlideAnimation(target, fromRight).Begin();\r\n                  }\r\n                });\r\n              };\r\n             \r\n            };\r\n        };\r\n    }\r\n\r\n\r\n    #endregion\r\n\r\n    /// <summary>\r\n    /// Animates each element in order, creating a 'peel' effect. The supplied action\r\n    /// is invoked when the animation ends.\r\n    /// </summary>\r\n    public static void Peel(this IEnumerable<FrameworkElement> elements, Action endAction)\r\n    {\r\n      var elementList = elements.ToList();\r\n      var lastElement = elementList.Last();\r\n\r\n      // iterate over all the elements, animating each of them\r\n      double delay = 0;\r\n      foreach (FrameworkElement element in elementList)\r\n      {\r\n        var sb = GetPeelAnimation(element, delay);\r\n\r\n        // add a Completed event handler to the last element\r\n        if (element.Equals(lastElement))\r\n        {\r\n          sb.Completed += (s, e) =>\r\n            {\r\n              endAction();\r\n            };\r\n        }\r\n\r\n        sb.Begin();\r\n        delay += 50;\r\n      }\r\n    }\r\n\r\n\r\n    /// <summary>\r\n    /// Enumerates all the items that are currently visible in am ItemsControl. This implementation assumes\r\n    /// that a VirtualizingStackPanel is being used as the ItemsPanel.\r\n    /// </summary>\r\n    public static IEnumerable<FrameworkElement> GetItemsInView(this ItemsControl itemsControl)\r\n    {\r\n       // locate the stack panel that hosts the items\r\n      VirtualizingStackPanel vsp = itemsControl.Descendants<VirtualizingStackPanel>().First() as VirtualizingStackPanel;\r\n\r\n      // iterate over each of the items in view\r\n      int firstVisibleItem = (int)vsp.VerticalOffset;\r\n      int visibleItemCount = (int)vsp.ViewportHeight;\r\n      for (int index = firstVisibleItem; index <= firstVisibleItem + visibleItemCount + 1; index++)\r\n      {\r\n        var item = itemsControl.ItemContainerGenerator.ContainerFromIndex(index) as FrameworkElement;\r\n        if (item == null)\r\n          continue;\r\n\r\n        yield return item;\r\n      }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Creates a PlaneProjection and associates it with the given element, returning\r\n    /// a Storyboard which will animate the PlaneProjection to 'peel' the item\r\n    /// from the screen.\r\n    /// </summary>\r\n    private static Storyboard GetPeelAnimation(FrameworkElement element, double delay)\r\n    {\r\n      Storyboard sb;\r\n\r\n      var projection = new PlaneProjection()\r\n      {\r\n        CenterOfRotationX = -0.1\r\n      };\r\n      element.Projection = projection;\r\n\r\n      // compute the angle of rotation required to make this element appear\r\n      // at a 90 degree angle at the edge of the screen.\r\n      var width = element.ActualWidth;\r\n      var targetAngle = Math.Atan(1000 / (width / 2));\r\n      targetAngle = targetAngle * 180 / Math.PI;\r\n\r\n      // animate the projection\r\n      sb = new Storyboard();\r\n      sb.BeginTime = TimeSpan.FromMilliseconds(delay);      \r\n      sb.Children.Add(CreateAnimation(0, -(180 - targetAngle), 0.3, \"RotationY\", projection));\r\n      sb.Children.Add(CreateAnimation(0, 23, 0.3, \"RotationZ\", projection));\r\n      sb.Children.Add(CreateAnimation(0, -23, 0.3, \"GlobalOffsetZ\", projection));      \r\n      return sb;\r\n    }\r\n\r\n    private static DoubleAnimation CreateAnimation(double from, double to, double duration,\r\n      string targetProperty, DependencyObject target)\r\n    {\r\n      var db = new DoubleAnimation();\r\n      db.To = to;\r\n      db.From = from;\r\n      db.EasingFunction = new SineEase();\r\n      db.Duration = TimeSpan.FromSeconds(duration);\r\n      Storyboard.SetTarget(db, target);\r\n      Storyboard.SetTargetProperty(db, new PropertyPath(targetProperty));\r\n      return db;\r\n    }\r\n\r\n    /// <summary>\r\n    /// Creates a TranslateTransform and associates it with the given element, returning\r\n    /// a Storyboard which will animate the TranslateTransform with a SineEase function\r\n    /// </summary>\r\n    private static Storyboard  GetSlideAnimation(FrameworkElement element, bool fromRight)\r\n    {\r\n      double from = fromRight ? 40 : -40;\r\n      \r\n      Storyboard sb;\r\n      double delay = (GetAnimationLevel(element)) * 0.1 + 0.1;\r\n\r\n      var trans = new TranslateTransform { X = from };\r\n      element.RenderTransform = trans;\r\n\r\n      sb = new Storyboard();\r\n      sb.BeginTime = TimeSpan.FromSeconds(delay);\r\n      sb.Children.Add(CreateAnimation(from, 0, 0.3, \"X\", trans));      \r\n      return sb;\r\n    }\r\n\r\n  }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Animation/Navigation/AnimatedBasePage.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Extensions;\r\nusing TelegramClient.Views;\r\n\r\nnamespace TelegramClient.Animation.Navigation\r\n{\r\n    \r\n    public class AnimatedBasePage : TelegramViewBase\r\n    {\r\n\r\n        public static readonly DependencyProperty IsAnimationTargetProperty = DependencyProperty.RegisterAttached(\"IsAnimationTarget\",\r\n                                                                                                                typeof(bool),\r\n                                                                                                                typeof(AnimatedBasePage),\r\n                                                                                                                null);\r\n\r\n        public static void SetIsAnimationTarget(UIElement element, bool value)\r\n        {\r\n            element.SetValue(IsAnimationTargetProperty, value);\r\n        }\r\n\r\n        public static bool GetIsAnimationTarget(UIElement element)\r\n        {\r\n            return (bool)element.GetValue(IsAnimationTargetProperty);\r\n        }\r\n\r\n        private static readonly Uri ExternalUri = new Uri(@\"app://external/\");\r\n\r\n        public static readonly DependencyProperty AnimationContextProperty = DependencyProperty.Register(\r\n            \"AnimationContext\", \r\n            typeof(FrameworkElement), \r\n            typeof(AnimatedBasePage), \r\n            new PropertyMetadata(null));\r\n        \r\n        public FrameworkElement AnimationContext\r\n        {\r\n            get { return (FrameworkElement)GetValue(AnimationContextProperty); }\r\n            set { SetValue(AnimationContextProperty, value); }\r\n        }\r\n\r\n        private static Uri _fromUri;\r\n\r\n        private bool _isAnimating;\r\n        private static bool _isNavigating;\r\n        private bool _needsOutroAnimation;\r\n        private Uri _nextUri;\r\n        private Uri _arrivedFromUri;\r\n        private AnimationType _currentAnimationType;\r\n        private NavigationMode? _currentNavigationMode;\r\n        private bool _isActive;\r\n        private bool _isForwardNavigation;\r\n        private bool _loadingAndAnimatingIn;\r\n\r\n        private static PageOrientation _lastOrientation;\r\n\r\n        public AnimatedBasePage()\r\n        {\r\n            _isActive = true;\r\n\r\n            _isForwardNavigation = true;\r\n\r\n            OrientationChanged += Page_OrientationChanged;\r\n        }\r\n\r\n        void Page_OrientationChanged(object sender, OrientationChangedEventArgs e)\r\n        {\r\n            var newOrientation = e.Orientation;\r\n\r\n            if (newOrientation == _lastOrientation) return;\r\n            // Orientations are (clockwise) 'PortraitUp', 'LandscapeRight', 'LandscapeLeft'\r\n\r\n            var transitionElement = new RotateTransition();\r\n\r\n            switch (newOrientation)\r\n            {\r\n                case PageOrientation.Landscape:\r\n                case PageOrientation.LandscapeRight:\r\n                    // Come here from PortraitUp (i.e. clockwise) or LandscapeLeft?\r\n                    if (_lastOrientation == PageOrientation.PortraitUp)\r\n                        transitionElement.Mode = RotateTransitionMode.In90Counterclockwise;\r\n                    else\r\n                        transitionElement.Mode = RotateTransitionMode.In180Counterclockwise;\r\n                    break;\r\n                case PageOrientation.LandscapeLeft:\r\n                    // Come here from LandscapeRight or PortraitUp?\r\n                    if (_lastOrientation == PageOrientation.LandscapeRight)\r\n                        transitionElement.Mode = RotateTransitionMode.In180Clockwise;\r\n                    else\r\n                        transitionElement.Mode = RotateTransitionMode.In90Clockwise;\r\n                    break;\r\n                case PageOrientation.Portrait:\r\n                case PageOrientation.PortraitUp:\r\n                    // Come here from LandscapeLeft or LandscapeRight?\r\n                    if (_lastOrientation == PageOrientation.LandscapeLeft)\r\n                        transitionElement.Mode = RotateTransitionMode.In90Counterclockwise;\r\n                    else\r\n                        transitionElement.Mode = RotateTransitionMode.In90Clockwise;\r\n                    break;\r\n            }\r\n            \r\n            // Execute the transition\r\n            var phoneApplicationPage = (PhoneApplicationPage)(((PhoneApplicationFrame)Application.Current.RootVisual)).Content;\r\n            var transition = transitionElement.GetTransition(phoneApplicationPage);\r\n            transition.Completed += delegate\r\n            {\r\n                transition.Stop();\r\n            };\r\n            transition.Begin();\r\n\r\n            _lastOrientation = newOrientation;\r\n        }\r\n\r\n        protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)\r\n        {\r\n            base.OnBackKeyPress(e);\r\n\r\n            //if (_isNavigating)\r\n            //{\r\n            //    e.Cancel = true;\r\n            //    return;\r\n            //}\r\n\r\n            if (!CanAnimate())\r\n                return;\r\n\r\n            //if (_isAnimating)\r\n            //{\r\n            //    e.Cancel = true;\r\n            //    return;\r\n            //}\r\n\r\n            //if (_loadingAndAnimatingIn)\r\n            //{\r\n            //    e.Cancel = true;\r\n            //    return;\r\n            //}\r\n\r\n            if (!NavigationService.CanGoBack)\r\n                return;\r\n            \r\n            if (!IsPopupOpen())\r\n            {\r\n                _isNavigating = true;\r\n                e.Cancel = true;\r\n                _needsOutroAnimation = false;\r\n                _currentAnimationType = AnimationType.NavigateBackwardOut;\r\n                _currentNavigationMode = NavigationMode.Back;\r\n\r\n                RunAnimation();\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            base.OnNavigatingFrom(e);\r\n\r\n            if (e.Cancel)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _lastOrientation = Orientation;\r\n\r\n            if (_isAnimating)\r\n            {\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            if (_loadingAndAnimatingIn)\r\n            {\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            _fromUri = NavigationService.CurrentSource;\r\n\r\n            if (_needsOutroAnimation)\r\n            {\r\n                _needsOutroAnimation = false;\r\n\r\n                if (!CanAnimate())\r\n                    return;\r\n\r\n                if (_isNavigating)\r\n                {\r\n                    e.Cancel = true;\r\n                    return;\r\n                }\r\n\r\n                if (!NavigationService.CanGoBack && e.NavigationMode == NavigationMode.Back)\r\n                    return;\r\n\r\n                if (IsPopupOpen() && e.Uri != ExternalUri)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                e.Cancel = true;\r\n                _nextUri = e.Uri;\r\n\r\n                switch (e.NavigationMode)\r\n                {\r\n                    case NavigationMode.New:\r\n                        _currentAnimationType = AnimationType.NavigateForwardOut;\r\n                        break;\r\n\r\n                    case NavigationMode.Back:\r\n                        _currentAnimationType = AnimationType.NavigateBackwardOut;\r\n                        break;\r\n\r\n                    case NavigationMode.Forward:\r\n                        _currentAnimationType = AnimationType.NavigateForwardOut;\r\n                        break;\r\n                }\r\n                _currentNavigationMode = e.NavigationMode;\r\n\r\n                if (e.Uri != ExternalUri)\r\n                    RunAnimation();\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            base.OnNavigatedTo(e);\r\n\r\n            Orientation = _lastOrientation;\r\n\r\n            _currentNavigationMode = null;\r\n\r\n            //Debug.WriteLine(\"OnNavigatedTo: {0}\", this);\r\n\r\n            if (_nextUri != ExternalUri)\r\n            {\r\n                //this.InvokeOnLayoutUpdated(() => OnLayoutUpdated(this, null));\r\n                _loadingAndAnimatingIn = true;\r\n                Loaded += AnimatedBasePage_Loaded;\r\n\r\n                if (AnimationContext != null)\r\n                {\r\n                    AnimationContext.Opacity = 0;\r\n                }\r\n            }\r\n\r\n            _needsOutroAnimation = true;\r\n        }\r\n\r\n        void AnimatedBasePage_Loaded(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= AnimatedBasePage_Loaded;\r\n            OnLayoutUpdated();\r\n        }\r\n\r\n        public void OnLayoutUpdated()\r\n        {\r\n            //Debug.WriteLine(\"OnLayoutUpdated: {0}\", this);\r\n\r\n            if (_isForwardNavigation)\r\n            {\r\n                _currentAnimationType = AnimationType.NavigateForwardIn;\r\n                _arrivedFromUri = _fromUri != null ? new Uri(_fromUri.OriginalString, UriKind.Relative) : null;\r\n            }\r\n            else\r\n            {\r\n                _currentAnimationType = AnimationType.NavigateBackwardIn;\r\n            }\r\n\r\n            if (CanAnimate())\r\n            {\r\n                RunAnimation();\r\n            }\r\n            else\r\n            {\r\n                if (AnimationContext != null)\r\n                    AnimationContext.Opacity = 1;\r\n\r\n                OnTransitionAnimationCompleted();\r\n            }\r\n\r\n            //OnFirstLayoutUpdated(!_isForwardNavigation, _fromUri);\r\n\r\n            if (_isForwardNavigation)\r\n                _isForwardNavigation = false;\r\n        }\r\n\r\n        protected virtual void OnFirstLayoutUpdated(bool isBackNavigation, Uri from) { }\r\n\r\n        private void RunAnimation()\r\n        {\r\n            _isAnimating = true;\r\n\r\n            AnimatorHelperBase animation;\r\n\r\n            switch (_currentAnimationType)\r\n            {\r\n                case AnimationType.NavigateForwardIn:\r\n                    animation = GetAnimation(_currentAnimationType, _fromUri);\r\n                    break;\r\n                case AnimationType.NavigateBackwardOut:\r\n                    animation = GetAnimation(_currentAnimationType, _arrivedFromUri);\r\n                    break;\r\n                default:\r\n                    animation = GetAnimation(_currentAnimationType, _nextUri);\r\n                    break;\r\n            }\r\n\r\n            Dispatcher.BeginInvoke(() =>\r\n            {\r\n                if (animation == null)\r\n                {\r\n                    AnimationContext.Opacity = 1;\r\n                    OnTransitionAnimationCompleted();\r\n                }\r\n                else\r\n                {\r\n                    AnimatorHelperBase transitionAnimation = animation;\r\n                    AnimationContext.Opacity = 1;\r\n                    transitionAnimation.Begin(OnTransitionAnimationCompleted);\r\n                }\r\n\r\n                //Debug.WriteLine(\"{0} - {1} - {2} - {3}\", this, _currentAnimationType, _currentAnimationType == AnimationType.NavigateForwardOut || _currentAnimationType == AnimationType.NavigateBackwardIn ? _nextUri : _fromUri, transitionAnimation);\r\n            });\r\n        }\r\n\r\n        private bool CanAnimate()\r\n        {\r\n            return (_isActive \r\n                && !_isNavigating \r\n                && AnimationContext != null);\r\n        }\r\n\r\n        void OnTransitionAnimationCompleted()\r\n        {\r\n            _isAnimating = false;\r\n            _loadingAndAnimatingIn = false;\r\n\r\n            try\r\n            {\r\n                Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    //Debug.WriteLine(\"{0} - Animation complete: {1}\", this, _currentAnimationType);\r\n                    //Debug.WriteLine(\"nav mode : {0}\", _currentNavigationMode);\r\n                    switch (_currentNavigationMode)\r\n                    {\r\n                        case NavigationMode.Forward:\r\n                            Application.Current.GoForward();\r\n                            break;\r\n\r\n                        case NavigationMode.Back:\r\n                            Application.Current.GoBack();\r\n                            break;\r\n\r\n                        case NavigationMode.New:\r\n                            Application.Current.Navigate(_nextUri);\r\n                            break;\r\n                    }\r\n                    _isNavigating = false;\r\n                });\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Debug.WriteLine(\"OnTransitionAnimationCompleted Exception on {0}: {1}\", this, ex);\r\n            }\r\n\r\n            AnimationsComplete(_currentAnimationType);\r\n        }\r\n\r\n        public AnimatorHelperBase GetContinuumAnimation(FrameworkElement element, AnimationType animationType)\r\n        {\r\n            var movedText = element;\r\n\r\n            var isTarget = false;\r\n            \r\n            if (element != null)\r\n            {\r\n                isTarget = GetIsAnimationTarget(element);\r\n            } \r\n\r\n            if (!isTarget && element != null)\r\n            {\r\n                foreach (var descendant in element.GetVisualDescendants().OfType<FrameworkElement>())\r\n                {\r\n                    if (GetIsAnimationTarget(descendant))\r\n                    {\r\n                        movedText = descendant;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (movedText != null)\r\n            {\r\n                if (animationType == AnimationType.NavigateForwardIn)\r\n                {\r\n                    return new ContinuumForwardInAnimator() { RootElement = movedText, LayoutRoot = AnimationContext };\r\n                }\r\n                if (animationType == AnimationType.NavigateForwardOut)\r\n                {\r\n                    return new ContinuumForwardOutAnimator() { RootElement = movedText, LayoutRoot = AnimationContext };\r\n                }\r\n                if (animationType == AnimationType.NavigateBackwardIn)\r\n                {\r\n                    return new ContinuumBackwardInAnimator() { RootElement = movedText, LayoutRoot = AnimationContext };\r\n                }\r\n                if (animationType == AnimationType.NavigateBackwardOut)\r\n                {\r\n                    return new ContinuumBackwardOutAnimator() { RootElement = movedText, LayoutRoot = AnimationContext };\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n\r\n        protected virtual void AnimationsComplete(AnimationType animationType) { }\r\n\r\n        protected virtual AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            AnimatorHelperBase animation;\r\n\r\n            switch (animationType)\r\n            {\r\n                case AnimationType.NavigateBackwardIn:\r\n                    animation = new TurnstileBackwardInAnimator();\r\n                    break;\r\n\r\n                case AnimationType.NavigateBackwardOut:\r\n                    animation = new TurnstileBackwardOutAnimator();\r\n                    break;\r\n\r\n                case AnimationType.NavigateForwardIn:\r\n                    animation = new TurnstileForwardInAnimator();\r\n                    break;\r\n\r\n                default:\r\n                    animation = new TurnstileForwardOutAnimator();\r\n                    break;\r\n            }\r\n\r\n            animation.RootElement = AnimationContext;\r\n            return animation;\r\n        }\r\n\r\n        protected virtual bool IsPopupOpen()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        public void CancelAnimation()\r\n        {\r\n            _isActive = false;\r\n        }\r\n\r\n        public void ResumeAnimation()\r\n        {\r\n            _isActive = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Animation/Navigation/AnimatorHelperBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace TelegramClient.Animation.Navigation\r\n{\r\n\r\n    public enum AnimationType\r\n    {\r\n        PivotInLeft,\r\n        PivotInRight,\r\n        PivotOutLeft,\r\n        PivotOutRight,\r\n        NavigateBackwardIn,\r\n        NavigateBackwardOut,\r\n        NavigateForwardIn,\r\n        NavigateForwardOut,\r\n        Appear,\r\n        Disappear\r\n    }\r\n\r\n    public abstract class AnimatorHelperBase\r\n    {\r\n        private Action _oneTimeAction;\r\n        public Storyboard Storyboard { get; set; }\r\n\r\n        // Methods\r\n        protected AnimatorHelperBase()\r\n        {\r\n\r\n        }\r\n\r\n        private void OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            Storyboard.Completed -= new EventHandler(OnCompleted);\r\n            Action action = _oneTimeAction;\r\n            if (action != null)\r\n            {\r\n                _oneTimeAction = null;\r\n                action();\r\n            }\r\n        }\r\n\r\n        public virtual void Begin(Action completionAction)\r\n        {\r\n            Storyboard.Stop();\r\n            Storyboard.Begin();\r\n            Storyboard.SeekAlignedToLastTick(TimeSpan.Zero);\r\n            Storyboard.Completed += new EventHandler(OnCompleted);\r\n            _oneTimeAction = completionAction;\r\n        }\r\n\r\n        public void SetTargets(Dictionary<string, FrameworkElement> targets, Storyboard sb)\r\n        {\r\n            foreach (var kvp in targets)\r\n            {\r\n                var timelines = sb.Children.Where(t => Storyboard.GetTargetName(t) == kvp.Key);\r\n                foreach (Timeline t in timelines)\r\n                    Storyboard.SetTarget(t, kvp.Value);\r\n            }\r\n        }\r\n\r\n        public void SetTargets(Dictionary<string, FrameworkElement> targets)\r\n        {\r\n            SetTargets(targets, Storyboard);\r\n        }\r\n\r\n        public void SetTarget(FrameworkElement target)\r\n        {\r\n            foreach (Timeline t in Storyboard.Children)\r\n                Storyboard.SetTarget(t, target);\r\n        }\r\n\r\n        public FrameworkElement RootElement { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Animation/Navigation/ContinuumAnimator.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Telegram.Controls.Extensions;\r\n\r\nnamespace TelegramClient.Animation.Navigation\r\n{\r\n    public class ContinuumAnimator : AnimatorHelperBase\r\n    {\r\n        public FrameworkElement LayoutRoot { get; set; }\r\n        private Popup _popup;\r\n\r\n        public override void Begin(Action completionAction)\r\n        {\r\n            Storyboard.Stop();\r\n\r\n            PrepareElement(LayoutRoot);\r\n\r\n            //if (this is ContinuumForwardOutAnimator)\r\n            //{\r\n            //    WriteableBitmap bitmap = new WriteableBitmap(RootElement, null);\r\n            //    bitmap.Invalidate();\r\n            //    var image = new Image() { Source = bitmap, Stretch = System.Windows.Media.Stretch.None };\r\n\r\n            //    var rootVisual = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            //    _popup = new Popup();\r\n            //    var popupChild = new Canvas()\r\n            //    {\r\n            //        Width = rootVisual.ActualWidth,\r\n            //        Height = rootVisual.ActualHeight\r\n            //    };\r\n\r\n            //    var transfrom = RootElement.TransformToVisual(rootVisual);\r\n            //    var origin = transfrom.Transform(new Point(0, 0));\r\n            //    popupChild.Children.Add(image);\r\n            //    PrepareElement(image);\r\n            //    Canvas.SetLeft(image, origin.X);\r\n            //    Canvas.SetTop(image, origin.Y);\r\n\r\n            //    _popup.Child = popupChild;\r\n            //    RootElement.Opacity = 0;\r\n            //    _popup.IsOpen = true;\r\n\r\n            //    Storyboard.Completed += new EventHandler(OnContinuumBackwardOutStoryboardCompleted);\r\n            //    base.SetTargets(new Dictionary<string, FrameworkElement>()\r\n            //    {\r\n            //        { \"LayoutRoot\", LayoutRoot },\r\n            //        { \"ContinuumElement\", image }\r\n            //    });\r\n            //}\r\n            //else\r\n            {\r\n                PrepareElement(LayoutRoot);\r\n                PrepareElement(RootElement);\r\n                SetTargets(new Dictionary<string, FrameworkElement>\r\n                               {\r\n                                   {\"LayoutRoot\", LayoutRoot},\r\n                                   {\"ContinuumElement\", RootElement}\r\n                               });\r\n            }\r\n            base.Begin(completionAction);\r\n        }\r\n\r\n        void OnContinuumBackwardOutStoryboardCompleted(object sender, System.EventArgs e)\r\n        {\r\n            Storyboard.Completed -= new EventHandler(OnContinuumBackwardOutStoryboardCompleted);\r\n            _popup.IsOpen = false;\r\n            _popup.Child = null;\r\n            _popup = null;\r\n        }\r\n\r\n        private bool PrepareElement(UIElement element)\r\n        {\r\n            element.GetTransform<CompositeTransform>(TransformCreationMode.CreateOrAddAndIgnoreMatrix);\r\n\r\n            return true;\r\n        }\r\n    }\r\n\r\n    public class ContinuumForwardInAnimator : ContinuumAnimator\r\n    {\r\n        public ContinuumForwardInAnimator()\r\n            : base()\r\n        {\r\n            Storyboard = XamlReader.Load(Storyboards.ContinuumForwardInStoryboard) as Storyboard;\r\n        }\r\n    }\r\n\r\n    public class ContinuumBackwardOutAnimator : ContinuumAnimator\r\n    {\r\n        public ContinuumBackwardOutAnimator()\r\n            : base()\r\n        {\r\n            Storyboard = XamlReader.Load(Storyboards.ContinuumBackwardOutStoryboard) as Storyboard;\r\n        }\r\n    }\r\n\r\n    public class ContinuumBackwardInAnimator : ContinuumAnimator\r\n    {\r\n        public ContinuumBackwardInAnimator()\r\n            : base()\r\n        {\r\n            Storyboard = XamlReader.Load(Storyboards.ContinuumBackwardInStoryboard) as Storyboard;\r\n        }\r\n    }\r\n\r\n    public class ContinuumForwardOutAnimator : ContinuumAnimator\r\n    {\r\n        public ContinuumForwardOutAnimator()\r\n            : base()\r\n        {\r\n            Storyboard = XamlReader.Load(Storyboards.ContinuumForwardOutStoryboard) as Storyboard;\r\n        }\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Animation/Navigation/SlideAnimator.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Telegram.Controls.Extensions;\r\n\r\nnamespace TelegramClient.Animation.Navigation\r\n{\r\n    public class SlideAnimator : AnimatorHelperBase\r\n    {\r\n        public override void Begin(Action completionAction)\r\n        {\r\n            if (this.PrepareElement(RootElement))\r\n            {\r\n                Storyboard.Stop();\r\n                base.SetTarget(RootElement);\r\n            }\r\n\r\n            base.Begin(completionAction);\r\n        }\r\n\r\n        private bool PrepareElement(UIElement element)\r\n        {\r\n            element.GetTransform<CompositeTransform>(TransformCreationMode.CreateOrAddAndIgnoreMatrix);\r\n\r\n            return true;\r\n        }\r\n    }\r\n\r\n    public class SlideUpAnimator : SlideAnimator\r\n    {\r\n        private static Storyboard _storyboard;\r\n\r\n        public SlideUpAnimator()\r\n            : base()\r\n        {\r\n            if (_storyboard == null)\r\n                _storyboard = XamlReader.Load(Storyboards.SlideUpFadeInStoryboard) as Storyboard;\r\n            Storyboard = _storyboard;\r\n        }\r\n    }\r\n\r\n    public class SlideDownAnimator : SlideAnimator\r\n    {\r\n        private static Storyboard _storyboard;\r\n\r\n        public SlideDownAnimator()\r\n            : base()\r\n        {\r\n            if (_storyboard == null)\r\n                _storyboard = XamlReader.Load(Storyboards.SlideDownFadeOutStoryboard) as Storyboard;\r\n\r\n            Storyboard = _storyboard;\r\n        }\r\n    }\r\n\r\n    public class SlideDownSwivelShowAnimator : SlideAnimator\r\n    {\r\n        \r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Animation/Navigation/Storyboards.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Animation.Navigation\r\n{\r\n    public class Storyboards\r\n    {\r\n        internal static readonly string DefaultStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimation Duration=\"\"0\"\" To=\"\"1\"\" Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\" />\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string TurnstileForwardInStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n\t        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.RotationY)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"-90\"\"/>\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"0\"\">\r\n\t\t\t        <EasingDoubleKeyFrame.EasingFunction>\r\n\t\t\t\t        <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"6\"\"/>\r\n\t\t\t        </EasingDoubleKeyFrame.EasingFunction>\r\n\t\t        </EasingDoubleKeyFrame>\r\n\t        </DoubleAnimationUsingKeyFrames>\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string TurnstileForwardOutStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n\t        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.RotationY)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"90\"\">\r\n\t\t\t        <EasingDoubleKeyFrame.EasingFunction>\r\n\t\t\t\t        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"6\"\"/>\r\n\t\t\t        </EasingDoubleKeyFrame.EasingFunction>\r\n\t\t        </EasingDoubleKeyFrame>\r\n\t        </DoubleAnimationUsingKeyFrames>\r\n\t\t\t<!--<DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"\"LayoutRoot\"\" Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\">\r\n\t\t\t\t<DiscreteDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"0\"\" />\r\n\t\t\t</DoubleAnimationUsingKeyFrames>-->\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string TurnstileBackwardInStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n\t        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.RotationY)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"105\"\"/>\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"0\"\">\r\n\t\t\t        <EasingDoubleKeyFrame.EasingFunction>\r\n\t\t\t\t        <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"6\"\"/>\r\n\t\t\t        </EasingDoubleKeyFrame.EasingFunction>\r\n\t\t        </EasingDoubleKeyFrame>\r\n\t        </DoubleAnimationUsingKeyFrames>\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string TurnstileBackwardOutStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n\t        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.RotationY)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"-105\"\">\r\n\t\t\t        <EasingDoubleKeyFrame.EasingFunction>\r\n\t\t\t\t        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"6\"\"/>\r\n\t\t\t        </EasingDoubleKeyFrame.EasingFunction>\r\n\t\t        </EasingDoubleKeyFrame>\r\n\t        </DoubleAnimationUsingKeyFrames>\r\n\t\t\t<!--<DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"\"LayoutRoot\"\" Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\">\r\n\t\t\t\t<DiscreteDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"0\"\" />\r\n\t\t\t</DoubleAnimationUsingKeyFrames>-->\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string SwivelShowStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n\t        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.RotationX)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"-60\"\"/>\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"0\"\">\r\n\t\t\t        <EasingDoubleKeyFrame.EasingFunction>\r\n\t\t\t\t        <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"3\"\"/>\r\n\t\t\t        </EasingDoubleKeyFrame.EasingFunction>\r\n\t\t        </EasingDoubleKeyFrame>\r\n\t        </DoubleAnimationUsingKeyFrames>\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string SwivelHideStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n\t        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.RotationX)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"60\"\">\r\n\t\t\t        <EasingDoubleKeyFrame.EasingFunction>\r\n\t\t\t\t        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"3\"\"/>\r\n\t\t\t        </EasingDoubleKeyFrame.EasingFunction>\r\n\t\t        </EasingDoubleKeyFrame>\r\n\t        </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"1\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"0\"\"/>\r\n\t        </DoubleAnimationUsingKeyFrames>\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string SwivelFullScreenShowStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.RotationX)\"\" Storyboard.TargetName=\"\"MyPopup\"\">\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"-30\"\"/>\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.35\"\" Value=\"\"0\"\">\r\n\t\t\t        <EasingDoubleKeyFrame.EasingFunction>\r\n\t\t\t\t        <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"3\"\"/>\r\n\t\t\t        </EasingDoubleKeyFrame.EasingFunction>\r\n\t\t        </EasingDoubleKeyFrame>\r\n\t        </DoubleAnimationUsingKeyFrames>\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string SwivelFullScreenHideStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Projection).(PlaneProjection.RotationX)\"\" Storyboard.TargetName=\"\"MyPopup\"\">\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"45\"\">\r\n\t\t\t        <EasingDoubleKeyFrame.EasingFunction>\r\n\t\t\t\t        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"3\"\"/>\r\n\t\t\t        </EasingDoubleKeyFrame.EasingFunction>\r\n\t\t        </EasingDoubleKeyFrame>\r\n\t        </DoubleAnimationUsingKeyFrames>\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string ContinuumForwardOutStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"70\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"3\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.16\"\" Value=\"\"0\"\"/>\r\n            </DoubleAnimationUsingKeyFrames>\r\n\t        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"1\"\"/>\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"0\"\">\r\n\t\t\t        <EasingDoubleKeyFrame.EasingFunction>\r\n\t\t\t\t        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"3\"\"/>\r\n\t\t\t        </EasingDoubleKeyFrame.EasingFunction>\r\n\t\t        </EasingDoubleKeyFrame>\r\n\t        </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"\" Storyboard.TargetName=\"\"ContinuumElement\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"73\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.16\"\" Value=\"\"0\"\"/>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"\" Storyboard.TargetName=\"\"ContinuumElement\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"225\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"3\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.16\"\" Value=\"\"0\"\"/>\r\n            </DoubleAnimationUsingKeyFrames>\r\n\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"\"ContinuumElement\"\" Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\">\r\n\t\t\t\t<DiscreteDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"0\"\" />\r\n                <DiscreteDoubleKeyFrame KeyTime=\"\"0:0:0.16\"\" Value=\"\"1\"\" />\r\n\t\t\t</DoubleAnimationUsingKeyFrames>\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string ContinuumForwardInStoryboard =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"150\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"0\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"3\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimation Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" From=\"\"0\"\" To=\"\"1\"\" Duration=\"\"0:0:0.25\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n                <DoubleAnimation.EasingFunction>\r\n                    <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"6\"\"/>\r\n                </DoubleAnimation.EasingFunction>\r\n            </DoubleAnimation>\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"\" Storyboard.TargetName=\"\"ContinuumElement\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"-40\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"0\"\"/>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"\" Storyboard.TargetName=\"\"ContinuumElement\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"130\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"0\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"3\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string ContinuumBackwardOutStoryboard =\r\n        @\"<Storyboard  xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"\" \r\n                                           Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"800\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"6\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <!--<DoubleAnimation Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" From=\"\"1\"\" To=\"\"0\"\" Duration=\"\"0:0:0.15\"\" \r\n                                 Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n                <DoubleAnimation.EasingFunction>\r\n                    <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"6\"\"/>\r\n                </DoubleAnimation.EasingFunction>\r\n            </DoubleAnimation>-->\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string ContinuumBackwardInStoryboard =\r\n        @\"\";\r\n\r\n        internal static readonly string ContinuumBackwardInStoryboard2 =\r\n        @\"<Storyboard xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"\" Storyboard.TargetName=\"\"ContinuumElement\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.0\"\" Value=\"\"0\"\"/>\r\n                <!--<EasingDoubleKeyFrame KeyTime=\"\"0:0:0.0\"\" Value=\"\"-70\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"0\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"3\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>-->\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"\" Storyboard.TargetName=\"\"ContinuumElement\"\">\r\n               <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.0\"\" Value=\"\"0\"\"/>\r\n                <!--<EasingDoubleKeyFrame KeyTime=\"\"0:0:0.0\"\" Value=\"\"-30\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"0\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"3\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>-->\r\n            </DoubleAnimationUsingKeyFrames>\r\n\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"\"ContinuumElement\"\" Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\">\r\n\t\t\t\t<DiscreteDoubleKeyFrame KeyTime=\"\"0:0:0\"\" Value=\"\"1\"\" />\r\n\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n\t\t        <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.15\"\" Value=\"\"1\"\">\r\n\t\t\t        <EasingDoubleKeyFrame.EasingFunction>\r\n\t\t\t\t        <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"6\"\"/>\r\n\t\t\t        </EasingDoubleKeyFrame.EasingFunction>\r\n\t\t        </EasingDoubleKeyFrame>\r\n\t        </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimation Duration=\"\"0\"\" To=\"\"0\"\" Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"\" Storyboard.TargetName=\"\"LayoutRoot\"\"/>-->\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string RotateLeftStoryboard =\r\n            @\"\";\r\n\r\n        internal static readonly string RotateRightStoryboard =\r\n            @\"\";\r\n\r\n        internal static readonly string SlideUpFadeInStoryboard = @\"\r\n        <Storyboard  xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"\" \r\n                                           Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"150\"\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.35\"\" Value=\"\"0\"\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"6\"\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimation Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" From=\"\"0\"\" To=\"\"1\"\" Duration=\"\"0:0:0.350\"\" \r\n                                 Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n                <DoubleAnimation.EasingFunction>\r\n                    <ExponentialEase EasingMode=\"\"EaseOut\"\" Exponent=\"\"6\"\"/>\r\n                </DoubleAnimation.EasingFunction>\r\n            </DoubleAnimation>\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string SlideDownFadeOutStoryboard = @\"\r\n        <Storyboard  xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"\" \r\n                                           Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0\"\" Value=\"\"0\"\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"\"0:0:0.25\"\" Value=\"\"150\"\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"6\"\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimation Storyboard.TargetProperty=\"\"(UIElement.Opacity)\"\" From=\"\"1\"\" To=\"\"0\"\" Duration=\"\"0:0:0.25\"\" \r\n                                 Storyboard.TargetName=\"\"LayoutRoot\"\">\r\n                <DoubleAnimation.EasingFunction>\r\n                    <ExponentialEase EasingMode=\"\"EaseIn\"\" Exponent=\"\"6\"\"/>\r\n                </DoubleAnimation.EasingFunction>\r\n            </DoubleAnimation>\r\n        </Storyboard>\";\r\n\r\n        internal static readonly string SlideLeftFadeInStoryboard =\r\n    @\"\";\r\n\r\n        internal static readonly string SlideLeftFadeOutStoryboard =\r\n@\"\";\r\n\r\n        internal static readonly string SlideRightFadeInStoryboard =\r\n@\"\";\r\n\r\n        internal static readonly string SlideRightFadeOutStoryboard =\r\n@\"\";\r\n\r\n        internal static readonly string SlideRightStoryboard =\r\n@\"\";\r\n        internal static readonly string SlideLeftStoryboard =\r\n@\"\";\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Animation/Navigation/SwivelAnimator.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Telegram.Controls.Extensions;\r\n\r\nnamespace TelegramClient.Animation.Navigation\r\n{\r\n    public class SwivelAnimator : AnimatorHelperBase\r\n    {\r\n        public override void Begin(Action completionAction)\r\n        {\r\n            if (this.PrepareElement(RootElement))\r\n            {\r\n                (RootElement.Projection as PlaneProjection).CenterOfRotationY = 0.5;\r\n                Storyboard.Stop();\r\n                base.SetTarget(RootElement);\r\n            }\r\n\r\n            base.Begin(completionAction);\r\n\r\n            base.Begin(completionAction);\r\n        }\r\n\r\n        private bool PrepareElement(UIElement element)\r\n        {\r\n            if (element.GetPlaneProjection(true) == null)\r\n            {\r\n                return false;\r\n            }\r\n            return true;\r\n        }\r\n    }\r\n\r\n    public class SwivelShowAnimator : SwivelAnimator\r\n    {\r\n        private static Storyboard _storyboard;\r\n\r\n        public SwivelShowAnimator()\r\n            : base()\r\n        {\r\n            if (_storyboard == null)\r\n                _storyboard = XamlReader.Load(Storyboards.SwivelShowStoryboard) as Storyboard;\r\n\r\n            Storyboard = _storyboard;\r\n        }\r\n    }\r\n\r\n    public class SwivelHideAnimator : SwivelAnimator\r\n    {\r\n        private static Storyboard _storyboard;\r\n\r\n        public SwivelHideAnimator()\r\n            : base()\r\n        {\r\n            if (_storyboard == null)\r\n                _storyboard = XamlReader.Load(Storyboards.SwivelHideStoryboard) as Storyboard;\r\n\r\n            Storyboard = _storyboard;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Animation/Navigation/TurnstileAnimator.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Telegram.Controls.Extensions;\r\n\r\nnamespace TelegramClient.Animation.Navigation\r\n{\r\n    public class TurnstileAnimator : AnimatorHelperBase\r\n    {\r\n        public override void Begin(Action completionAction)\r\n        {\r\n            if (this.PrepareElement(RootElement))\r\n            {\r\n                (RootElement.Projection as PlaneProjection).CenterOfRotationX = 0;\r\n                Storyboard.Stop();\r\n                base.SetTarget(RootElement);\r\n            }\r\n\r\n            base.Begin(completionAction);\r\n        }\r\n\r\n        private bool PrepareElement(UIElement element)\r\n        {\r\n            if (element.GetPlaneProjection(true) == null)\r\n            {\r\n                return false;\r\n            }\r\n            return true;\r\n        }\r\n    }\r\n\r\n    public class TurnstileForwardInAnimator : TurnstileAnimator\r\n    {\r\n        private static Storyboard _storyboard;\r\n\r\n        public TurnstileForwardInAnimator()\r\n            : base()\r\n        {\r\n            if (_storyboard == null)\r\n                _storyboard = XamlReader.Load(Storyboards.TurnstileForwardInStoryboard) as Storyboard;\r\n\r\n            Storyboard = _storyboard;\r\n        }\r\n    }\r\n\r\n    public class TurnstileForwardOutAnimator : TurnstileAnimator\r\n    {\r\n        private static Storyboard _storyboard;\r\n\r\n        public TurnstileForwardOutAnimator()\r\n            : base()\r\n        {\r\n            if (_storyboard == null)\r\n                _storyboard = XamlReader.Load(Storyboards.TurnstileForwardOutStoryboard) as Storyboard;\r\n\r\n            Storyboard = _storyboard;\r\n        }\r\n    }\r\n\r\n    public class TurnstileBackwardInAnimator : TurnstileAnimator\r\n    {\r\n        private static Storyboard _storyboard;\r\n\r\n        public TurnstileBackwardInAnimator()\r\n            : base()\r\n        {\r\n            if (_storyboard == null)\r\n                _storyboard = XamlReader.Load(Storyboards.TurnstileBackwardInStoryboard) as Storyboard;\r\n\r\n            Storyboard = _storyboard;\r\n        }\r\n    }\r\n\r\n    public class TurnstileBackwardOutAnimator : TurnstileAnimator\r\n    {\r\n        private static Storyboard _storyboard;\r\n\r\n        public TurnstileBackwardOutAnimator()\r\n            : base()\r\n        {\r\n            if (_storyboard == null)\r\n                _storyboard = XamlReader.Load(Storyboards.TurnstileBackwardOutStoryboard) as Storyboard;\r\n\r\n            Storyboard = _storyboard;\r\n        }\r\n    }\r\n\r\n    public class DefaultPageAnimator : TurnstileAnimator \r\n    {\r\n        private static Storyboard _storyboard;\r\n\r\n        public DefaultPageAnimator()\r\n            : base()\r\n        {\r\n            if (_storyboard == null)\r\n                _storyboard = XamlReader.Load(Storyboards.DefaultStoryboard) as Storyboard;\r\n\r\n            Storyboard = XamlReader.Load(Storyboards.DefaultStoryboard) as Storyboard;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Animation/Navigation/TurnstileFeatherAnimator.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Helpers;\r\n\r\nnamespace TelegramClient.Animation.Navigation\r\n{\r\n    public class TurnstileFeatherAnimator : AnimatorHelperBase\r\n    {\r\n        protected enum Directions\r\n        {\r\n            In,\r\n            Out\r\n        }\r\n\r\n        public ListBox ListBox { get; set; }\r\n        protected int Duration { get; set; }\r\n        protected int Angle { get; set; }\r\n        protected int FeatherDelay { get; set; }\r\n        protected Directions Direction { get; set; }\r\n        protected int InitialDelay { get; set; }\r\n        protected bool HoldSelectedItem { get; set; }\r\n\r\n        private FrameworkElement _visual;\r\n        private bool? _isVerticalOrientation;\r\n\r\n        internal bool IsOnCurrentPage(ListBoxItem item)\r\n        {\r\n            var itemsHostRect = Rect.Empty;\r\n            var listBoxItemRect = Rect.Empty;\r\n\r\n            if (_visual == null)\r\n            {\r\n                Helpers.ItemsControlHelper ich = new Helpers.ItemsControlHelper(ListBox);\r\n                ScrollContentPresenter scp = ich.ScrollHost == null ? null : ich.ScrollHost.GetVisualDescendants().OfType<ScrollContentPresenter>().FirstOrDefault();\r\n                _visual = (ich.ScrollHost == null) ? null : ((scp == null) ? ((FrameworkElement)ich.ScrollHost) : ((FrameworkElement)scp));\r\n            }\r\n\r\n            if (_visual == null)\r\n                return true;\r\n\r\n            itemsHostRect = new Rect(0.0, 0.0, _visual.ActualWidth, _visual.ActualHeight);\r\n            //ListBoxItem item = ListBox.ItemContainerGenerator.ContainerFromIndex(index) as ListBoxItem;\r\n            if (item == null)\r\n            {\r\n                listBoxItemRect = Rect.Empty;\r\n                return false;\r\n            }\r\n\r\n            GeneralTransform transform = item.TransformToVisual(_visual);\r\n            listBoxItemRect = new Rect(transform.Transform(new Point()), transform.Transform(new Point(item.ActualWidth, item.ActualHeight)));\r\n            if (!this.IsVerticalOrientation())\r\n            {\r\n                return ((itemsHostRect.Left <= listBoxItemRect.Left) && (listBoxItemRect.Right <= itemsHostRect.Right));\r\n            }\r\n\r\n            return ((listBoxItemRect.Bottom + 100 >= itemsHostRect.Top) && (listBoxItemRect.Top - 100 <= itemsHostRect.Bottom));\r\n            //return ((itemsHostRect.Top <= listBoxItemRect.Bottom) && (listBoxItemRect.Top <= itemsHostRect.Bottom));\r\n        }\r\n\r\n        internal bool IsVerticalOrientation()\r\n        {\r\n            if (_isVerticalOrientation.HasValue)\r\n                return _isVerticalOrientation.Value;\r\n\r\n            Helpers.ItemsControlHelper ich = new Helpers.ItemsControlHelper(ListBox);\r\n            StackPanel itemsHost = ich.ItemsHost as StackPanel;\r\n            if (itemsHost != null)\r\n            {\r\n                _isVerticalOrientation = (itemsHost.Orientation == System.Windows.Controls.Orientation.Vertical);\r\n                return _isVerticalOrientation.Value;\r\n            }\r\n            VirtualizingStackPanel panel2 = ich.ItemsHost as VirtualizingStackPanel;\r\n            _isVerticalOrientation = ((panel2 == null) || (panel2.Orientation == System.Windows.Controls.Orientation.Vertical));\r\n            return _isVerticalOrientation.Value;\r\n        }\r\n\r\n        public TurnstileFeatherAnimator()\r\n            :base()\r\n        {\r\n            InitialDelay = 0;\r\n        }\r\n\r\n        public override void Begin(Action completionAction)\r\n        {\r\n            Storyboard = new Storyboard();\r\n\r\n            double liCounter = 0;\r\n            var listBoxItems = ListBox.GetVisualDescendants().OfType<ListBoxItem>().Where(lbi => IsOnCurrentPage(lbi) && lbi.IsEnabled).ToList();\r\n            \r\n            if (HoldSelectedItem && Direction == Directions.Out && ListBox.SelectedItem != null)\r\n            {\r\n                //move selected container to end\r\n                var selectedContainer = ListBox.ItemContainerGenerator.ContainerFromItem(ListBox.SelectedItem);\r\n\r\n                listBoxItems.Remove(selectedContainer);\r\n                listBoxItems.Add(selectedContainer);\r\n            }\r\n\r\n            foreach (ListBoxItem li in listBoxItems)\r\n            {\r\n                GeneralTransform gt = li.TransformToVisual(RootElement);\r\n                Point globalCoords = gt.Transform(new Point(0, 0));\r\n                double heightAdjustment = li.Content is FrameworkElement ? ((li.Content as FrameworkElement).ActualHeight / 2) : (li.ActualHeight / 2);\r\n                //double yCoord = globalCoords.Y + ((((System.Windows.FrameworkElement)(((System.Windows.Controls.ContentControl)(li)).Content)).ActualHeight) / 2);\r\n                double yCoord = globalCoords.Y + heightAdjustment;\r\n\r\n                double offsetAmount = (RootElement.ActualHeight / 2) - yCoord;\r\n\r\n                PlaneProjection pp = new PlaneProjection();\r\n                pp.GlobalOffsetY = offsetAmount * -1;\r\n                pp.CenterOfRotationX = 0;\r\n                li.Projection = pp;\r\n\r\n                CompositeTransform ct = new CompositeTransform();\r\n                ct.TranslateY = offsetAmount;\r\n                li.RenderTransform = ct;\r\n\r\n                var beginTime = TimeSpan.FromMilliseconds((FeatherDelay * liCounter) + InitialDelay);\r\n\r\n                if (Direction == Directions.In)\r\n                {\r\n                    li.Opacity = 0;\r\n\r\n                    DoubleAnimationUsingKeyFrames daukf = new DoubleAnimationUsingKeyFrames();\r\n\r\n                    EasingDoubleKeyFrame edkf1 = new EasingDoubleKeyFrame();\r\n                    edkf1.KeyTime = beginTime;\r\n                    edkf1.Value = Angle;\r\n                    daukf.KeyFrames.Add(edkf1);\r\n\r\n                    EasingDoubleKeyFrame edkf2 = new EasingDoubleKeyFrame();\r\n                    edkf2.KeyTime = TimeSpan.FromMilliseconds(Duration).Add(beginTime);\r\n                    edkf2.Value = 0;\r\n\r\n                    ExponentialEase ee = new ExponentialEase();\r\n                    ee.EasingMode = EasingMode.EaseOut;\r\n                    ee.Exponent = 6;\r\n\r\n                    edkf2.EasingFunction = ee;\r\n                    daukf.KeyFrames.Add(edkf2);\r\n\r\n                    Storyboard.SetTarget(daukf, li);\r\n                    Storyboard.SetTargetProperty(daukf, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationY)\"));\r\n                    Storyboard.Children.Add(daukf);\r\n\r\n                    DoubleAnimation da = new DoubleAnimation();\r\n                    da.Duration = TimeSpan.FromMilliseconds(0);\r\n                    da.BeginTime = beginTime;\r\n                    da.To = 1;\r\n\r\n                    Storyboard.SetTarget(da, li);\r\n                    Storyboard.SetTargetProperty(da, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                    Storyboard.Children.Add(da);\r\n                }\r\n                else\r\n                {\r\n                    li.Opacity = 1;\r\n\r\n                    DoubleAnimation da = new DoubleAnimation();\r\n                    da.BeginTime = beginTime;\r\n                    da.Duration = TimeSpan.FromMilliseconds(Duration);\r\n                    da.To = Angle;\r\n\r\n                    ExponentialEase ee = new ExponentialEase();\r\n                    ee.EasingMode = EasingMode.EaseIn;\r\n                    ee.Exponent = 6;\r\n\r\n                    da.EasingFunction = ee;\r\n\r\n                    Storyboard.SetTarget(da, li);\r\n                    Storyboard.SetTargetProperty(da, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationY)\"));\r\n                    Storyboard.Children.Add(da);\r\n\r\n                    da = new DoubleAnimation();\r\n                    da.Duration = TimeSpan.FromMilliseconds(10);\r\n                    da.To = 0;\r\n                    da.BeginTime = TimeSpan.FromMilliseconds(Duration).Add(beginTime);\r\n\r\n                    Storyboard.SetTarget(da, li);\r\n                    Storyboard.SetTargetProperty(da, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                    Storyboard.Children.Add(da);\r\n                }\r\n\r\n                liCounter++;\r\n            }\r\n\r\n            base.Begin(completionAction);\r\n        }\r\n    }\r\n\r\n    public class TurnstileFeatherForwardInAnimator : TurnstileFeatherAnimator\r\n    {\r\n        public TurnstileFeatherForwardInAnimator()\r\n            : base()\r\n        {\r\n            Duration = 350;\r\n            Angle = -80;\r\n            FeatherDelay = 50;\r\n            Direction = Directions.In;\r\n        }\r\n    }\r\n\r\n    public class TurnstileFeatherForwardOutAnimator : TurnstileFeatherAnimator\r\n    {\r\n        public TurnstileFeatherForwardOutAnimator()\r\n            : base()\r\n        {\r\n            Duration = 250;\r\n            Angle = 50;\r\n            FeatherDelay = 50;\r\n            Direction = Directions.Out;\r\n            HoldSelectedItem = true;\r\n        }\r\n    }\r\n\r\n    public class TurnstileFeatherBackwardInAnimator : TurnstileFeatherAnimator\r\n    {\r\n        public TurnstileFeatherBackwardInAnimator()\r\n            : base()\r\n        {\r\n            Duration = 350;\r\n            Angle = 50;\r\n            FeatherDelay = 50;\r\n            Direction = Directions.In;\r\n        }\r\n    }\r\n\r\n    public class TurnstileFeatherBackwardOutAnimator : TurnstileFeatherAnimator\r\n    {\r\n        public TurnstileFeatherBackwardOutAnimator()\r\n            : base()\r\n        {\r\n            Duration = 250;\r\n            Angle = -80;\r\n            FeatherDelay = 50;\r\n            Direction = Directions.Out;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/App.xaml",
    "content": "﻿<Application \r\n    x:Class=\"TelegramClient.App\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"       \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:telegramClient=\"clr-namespace:TelegramClient\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:resources=\"clr-namespace:TelegramClient.Resources\"\r\n    xmlns:selectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\">\r\n\r\n    <!--<Application.ApplicationLifetimeObjects>\r\n        <shell:PhoneApplicationService/>\r\n    </Application.ApplicationLifetimeObjects>-->\r\n\r\n    <Application.Resources>\r\n        <ResourceDictionary>\r\n            <ResourceDictionary.MergedDictionaries>\r\n                <ResourceDictionary Source=\"Themes/Default/Theme.xaml\"/>\r\n            </ResourceDictionary.MergedDictionaries>\r\n\r\n            <dialogs:CheckDialogTypeConverter x:Key=\"CheckDialogTypeConverter\"/>\r\n\r\n            <selectors:ItemsPanelTemplateSelector x:Key=\"ItemsPanelTemplateSelector\"\r\n                LowMemoryDeviceTemplate=\"{StaticResource LowMemoryDeviceTemplate}\"\r\n                NormalMemoryDeviceTemplate=\"{StaticResource NormalMemoryDeviceTemplate}\"/>\r\n\r\n            <controls:NonBreakingStringConverter x:Key=\"NonBreakingStringConverter\"/>\r\n            <converters:RecentItemToNameConverter x:Key=\"RecentItemToNameConverter\"/>\r\n            <resources:LocalizedStrings x:Key=\"Strings\" />\r\n            <resources:ScaledText x:Key=\"ScaledText\"/>\r\n            <converters:LowercaseConverter x:Key=\"Lowercase\"/>\r\n            <converters:UppercaseConverter x:Key=\"Uppercase\"/>\r\n            <resources:LocalizationConverter x:Key=\"LocalizationLowercase\" Type=\"Lowercase\"/>\r\n            <resources:LocalizationConverter x:Key=\"LocalizationUppercase\" Type=\"UpperCase\"/>\r\n            <converters:MaskConverter x:Key=\"MaskConverter\"/>\r\n\r\n            <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n            <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n\r\n            <SolidColorBrush Color=\"#333333\" x:Key=\"PhoneChromeBrush2\" />\r\n            <SolidColorBrush Color=\"#0050EF\" x:Key=\"BlueBrush\" />\r\n            <SolidColorBrush  Color=\"#00BCD4\" x:Key=\"CyanBrush\" />\r\n            <SolidColorBrush  Color=\"#00AA08\" x:Key=\"GreenBrush\" />\r\n            <SolidColorBrush Color=\"#F0A30A\" x:Key=\"OrangeBrush\" />\r\n            <SolidColorBrush Color=\"#F472D0\" x:Key=\"PinkBrush\" />\r\n            <SolidColorBrush Color=\"#AA00FF\" x:Key=\"PurpleBrush\" />\r\n            <SolidColorBrush Color=\"#FA6800\" x:Key=\"RedBrush\" />\r\n            <SolidColorBrush  Color=\"#FBC02D\" x:Key=\"YellowBrush\" />\r\n            <converters:IdToPlaceholderBackgroundConverter x:Key=\"PlaceholderBackgroundConverter\"/>\r\n            <converters:FileExtToColorConverter x:Key=\"FileExtToColorConverter\"\r\n                Yellow=\"{StaticResource YellowBrush}\"\r\n                Green=\"{StaticResource GreenBrush}\"\r\n                Red=\"{StaticResource RedBrush}\"\r\n                Blue=\"{StaticResource BlueBrush}\"/>\r\n            <converters:PlaceholderDefaultImageConverter x:Key=\"PlaceholderDefaultImageConverter\"/>\r\n            <converters:PlaceholderDefaultTextConverter x:Key=\"PlaceholderDefaultTextConverter\"/>\r\n            <converters:ContactToVisibilityConverter x:Key=\"ContactToVisibilityConverter\"/>\r\n\r\n            <converters:LinkDefaultTextConverter x:Key=\"LinkDefaultTextConverter\"/>\r\n            <converters:InlineResultDefaultTextConverter x:Key=\"InlineResultDefaultTextConverter\"/>\r\n            <!--<converters:InvoiceToDescriptionConverter2 x:Key=\"InvoiceToDescriptionConverter2\"/>-->\r\n\r\n\r\n            <selectors:MediaTemplateSelector\r\n                x:Key=\"MediaTemplateSelector\"\r\n                EmptyTemplate=\"{StaticResource MediaEmptyTemplate}\"\r\n                GroupTemplate=\"{StaticResource GroupTemplate}\"\r\n                CallTemplate=\"{StaticResource CallTemplate}\"\r\n                StickerTemplate=\"{StaticResource StickerTemplate}\"\r\n                VenueTemplate=\"{StaticResource VenueTemplate}\"\r\n                ContactTemplate=\"{StaticResource ContactTemplate}\"\r\n                PhoneContactTemplate=\"{StaticResource PhoneContactTemplate}\"\r\n                SecretPhotoTemplate=\"{StaticResource SecretPhotoTemplate}\"\r\n                PhotoTemplate=\"{StaticResource PhotoTemplate}\"\r\n                RoundVideoTemplate=\"{StaticResource RoundVideoTemplate}\"\r\n                SecretVideoTemplate=\"{StaticResource SecretVideoTemplate}\"\r\n                VideoTemplate=\"{StaticResource VideoTemplate}\"\r\n                GeoLiveTemplate=\"{StaticResource LiveGeoPointTemplate}\"\r\n                GeoTemplate=\"{StaticResource GeoPointTemplate}\"\r\n                DocumentTemplate=\"{StaticResource DocumentTemplate}\"\r\n                AudioTemplate=\"{StaticResource AudioTemplate}\"\r\n                WebPageTemplate=\"{StaticResource WebPageMediaTemplate}\"\r\n                WebPageSmallPhotoTemplate=\"{StaticResource WebPageSmallPhotoMediaTemplate}\"\r\n                WebPagePhotoTemplate=\"{StaticResource WebPagePhotoMediaTemplate}\"\r\n                WebPagePendingTemplate=\"{StaticResource WebPagePendingMediaTemplate}\"\r\n                WebPageGifTemplate=\"{StaticResource WebPageGifMediaTemplate}\"\r\n                GifTemplate=\"{StaticResource GifTemplate}\"\r\n                GameGifTemplate=\"{StaticResource GameGifTemplate}\"\r\n                GameTemplate=\"{StaticResource GameTemplate}\"\r\n                InvoiceTemplate=\"{StaticResource InvoiceTemplate}\"\r\n                InvoicePhotoTemplate=\"{StaticResource InvoicePhotoTemplate}\"\r\n                UnsupportedTemplate=\"{StaticResource UnsupportedTemplate}\"/>\r\n\r\n            <selectors:ReplyTemplateSelector\r\n                x:Key=\"ReplyTemplateSelector\" \r\n                WebPageEmptyTemplate=\"{StaticResource WebPageEmptyTemplate}\"\r\n                WebPageTemplate=\"{StaticResource WebPageTemplate}\"\r\n                WebPagePendingTemplate=\"{StaticResource WebPagePendingTemplate}\"\r\n                \r\n                ForwardedMessagesTemplate=\"{StaticResource ForwardedMessagesTemplate}\"\r\n                \r\n                ForwardEmptyTemplate=\"{StaticResource ForwardEmptyTemplate}\"\r\n                ForwardTextTemplate=\"{StaticResource ForwardTextTemplate}\"\r\n                ForwardContactTemplate=\"{StaticResource ForwardContactTemplate}\"\r\n                ForwardGameTemplate=\"{StaticResource ForwardGameTemplate}\"\r\n                ForwardInvoiceTemplate=\"{StaticResource ForwardInvoiceTemplate}\"\r\n                ForwardPhotoTemplate=\"{StaticResource ForwardPhotoTemplate}\"\r\n                ForwardVideoTemplate=\"{StaticResource ForwardVideoTemplate}\"\r\n                ForwardRoundVideoTemplate=\"{StaticResource ForwardRoundVideoTemplate}\"\r\n                ForwardGeoPointTemplate=\"{StaticResource ForwardGeoPointTemplate}\"\r\n                ForwardLiveGeoPointTemplate=\"{StaticResource ForwardLiveGeoPointTemplate}\"\r\n                ForwardDocumentTemplate=\"{StaticResource ForwardDocumentTemplate}\"\r\n                ForwardGifTemplate=\"{StaticResource ForwardGifTemplate}\"\r\n                ForwardStickerTemplate=\"{StaticResource ForwardStickerTemplate}\"\r\n                ForwardAudioTemplate=\"{StaticResource ForwardAudioTemplate}\"\r\n                ForwardVoiceMessageTemplate=\"{StaticResource ForwardVoiceMessageTemplate}\"\r\n                ForwardUnsupportedTemplate=\"{StaticResource ForwardUnsupportedTemplate}\"\r\n                \r\n                ReplyServiceTextTemplate=\"{StaticResource ReplyServiceTextTemplate}\"\r\n                ReplyServicePhotoTemplate=\"{StaticResource ReplyServicePhotoTemplate}\"\r\n                \r\n                ReplyEmptyTemplate=\"{StaticResource ReplyEmptyTemplate}\"\r\n                ReplyLoadingTemplate=\"{StaticResource ReplyLoadingTemplate}\"\r\n                ReplyTextTemplate=\"{StaticResource ReplyTextTemplate}\"\r\n                ReplyContactTemplate=\"{StaticResource ReplyContactTemplate}\"\r\n                ReplyPhotoTemplate=\"{StaticResource ReplyPhotoTemplate}\"\r\n                ReplyInvoiceTemplate=\"{StaticResource ReplyInvoiceTemplate}\"\r\n                ReplyGameTemplate=\"{StaticResource ReplyGameTemplate}\"\r\n                ReplyVideoTemplate=\"{StaticResource ReplyVideoTemplate}\"\r\n                ReplyRoundVideoTemplate=\"{StaticResource ReplyRoundVideoTemplate}\"\r\n                ReplyGeoPointTemplate=\"{StaticResource ReplyGeoPointTemplate}\"\r\n                ReplyLiveGeoPointTemplate=\"{StaticResource ReplyLiveGeoPointTemplate}\"\r\n                ReplyDocumentTemplate=\"{StaticResource ReplyDocumentTemplate}\"\r\n                ReplyGifTemplate=\"{StaticResource ReplyGifTemplate}\"\r\n                ReplyStickerTemplate=\"{StaticResource ReplyStickerTemplate}\"\r\n                ReplyAudioTemplate=\"{StaticResource ReplyAudioTemplate}\"\r\n                ReplyVoiceMessageTemplate=\"{StaticResource ReplyVoiceMessageTemplate}\"\r\n                ReplyUnsupportedTemplate=\"{StaticResource ReplyUnsupportedTemplate}\"\r\n                \r\n                EditTextTemplate=\"{StaticResource EditTextTemplate}\"\r\n                EditContactTemplate=\"{StaticResource EditContactTemplate}\"\r\n                EditPhotoTemplate=\"{StaticResource EditPhotoTemplate}\"\r\n                EditVideoTemplate=\"{StaticResource EditVideoTemplate}\"\r\n                EditRoundVideoTemplate=\"{StaticResource EditRoundVideoTemplate}\"\r\n                EditGeoPointTemplate=\"{StaticResource EditGeoPointTemplate}\"\r\n                EditLiveGeoPointTemplate=\"{StaticResource EditLiveGeoPointTemplate}\"\r\n                EditDocumentTemplate=\"{StaticResource EditDocumentTemplate}\"\r\n                EditGifTemplate=\"{StaticResource EditGifTemplate}\"\r\n                EditStickerTemplate=\"{StaticResource EditStickerTemplate}\"\r\n                EditAudioTemplate=\"{StaticResource EditAudioTemplate}\"\r\n                EditVoiceMessageTemplate=\"{StaticResource EditVoiceMessageTemplate}\"\r\n                EditUnsupportedTemplate=\"{StaticResource EditUnsupportedTemplate}\"/>\r\n\r\n            <selectors:PinnedMessageTemplateSelector\r\n                x:Key=\"PinnedMessageTemplateSelector\"\r\n                PinnedEmptyTemplate=\"{StaticResource PinnedEmptyTemplate}\"\r\n                PinnedTextTemplate=\"{StaticResource PinnedTextTemplate}\"\r\n                PinnedContactTemplate=\"{StaticResource PinnedContactTemplate}\"\r\n                PinnedInvoiceTemplate=\"{StaticResource PinnedInvoiceTemplate}\"\r\n                PinnedGameTemplate=\"{StaticResource PinnedGameTemplate}\"\r\n                PinnedPhotoTemplate=\"{StaticResource PinnedPhotoTemplate}\"\r\n                PinnedVideoTemplate=\"{StaticResource PinnedVideoTemplate}\"\r\n                PinnedRoundVideoTemplate=\"{StaticResource PinnedRoundVideoTemplate}\"\r\n                PinnedGeoPointTemplate=\"{StaticResource PinnedGeoPointTemplate}\"\r\n                PinnedLiveGeoPointTemplate=\"{StaticResource PinnedLiveGeoPointTemplate}\"\r\n                PinnedDocumentTemplate=\"{StaticResource PinnedDocumentTemplate}\"\r\n                PinnedGifTemplate=\"{StaticResource PinnedGifTemplate}\"\r\n                PinnedStickerTemplate=\"{StaticResource PinnedStickerTemplate}\"\r\n                PinnedAudioTemplate=\"{StaticResource PinnedAudioTemplate}\"\r\n                PinnedVoiceMessageTemplate=\"{StaticResource PinnedVoiceMessageTemplate}\"\r\n                PinnedClearHistoryTemplate=\"{StaticResource PinnedClearHistoryTemplate}\"\r\n                PinnedUnsupportedTemplate=\"{StaticResource PinnedUnsupportedTemplate}\"/>\r\n\r\n            <selectors:DecryptedReplyTemplateSelector\r\n                x:Key=\"DecryptedReplyTemplateSelector\" \r\n                \r\n                WebPageEmptyTemplate=\"{StaticResource WebPageEmptyTemplate}\"\r\n                WebPageTemplate=\"{StaticResource WebPageTemplate}\"\r\n                WebPagePendingTemplate=\"{StaticResource WebPagePendingTemplate}\"\r\n                \r\n                ForwardedMessagesTemplate=\"{StaticResource ForwardedMessagesTemplate}\"\r\n                \r\n                ForwardEmptyTemplate=\"{StaticResource ForwardEmptyTemplate}\"\r\n                ForwardTextTemplate=\"{StaticResource ForwardTextTemplate}\"\r\n                ForwardContactTemplate=\"{StaticResource ForwardContactTemplate}\"\r\n                ForwardPhotoTemplate=\"{StaticResource ForwardPhotoTemplate}\"\r\n                ForwardVideoTemplate=\"{StaticResource ForwardVideoTemplate}\"\r\n                ForwardGeoPointTemplate=\"{StaticResource ForwardGeoPointTemplate}\"\r\n                ForwardDocumentTemplate=\"{StaticResource ForwardDocumentTemplate}\"\r\n                ForwardGifTemplate=\"{StaticResource ForwardGifTemplate}\"\r\n                ForwardStickerTemplate=\"{StaticResource ForwardStickerTemplate}\"\r\n                ForwardAudioTemplate=\"{StaticResource ForwardAudioTemplate}\"\r\n                ForwardVoiceMessageTemplate=\"{StaticResource ForwardVoiceMessageTemplate}\"\r\n                ForwardUnsupportedTemplate=\"{StaticResource ForwardUnsupportedTemplate}\"\r\n                \r\n                ReplyServiceTextTemplate=\"{StaticResource ReplyServiceTextTemplate}\"\r\n                ReplyServicePhotoTemplate=\"{StaticResource ReplyServicePhotoTemplate}\"\r\n                \r\n                ReplyEmptyTemplate=\"{StaticResource ReplyEmptyTemplate}\"\r\n                ReplyLoadingTemplate=\"{StaticResource ReplyLoadingTemplate}\"\r\n                ReplyTextTemplate=\"{StaticResource ReplyTextTemplate}\"\r\n                ReplyWebPageTemplate=\"{StaticResource ReplyWebPageTemplate}\"\r\n                ReplyContactTemplate=\"{StaticResource ReplyContactTemplate}\"\r\n                ReplyPhotoTemplate=\"{StaticResource ReplyPhotoTemplate}\"\r\n                ReplySecretPhotoTemplate=\"{StaticResource ReplySecretPhotoTemplate}\"\r\n                ReplyVideoTemplate=\"{StaticResource ReplyVideoTemplate}\"\r\n                ReplyGeoPointTemplate=\"{StaticResource ReplyGeoPointTemplate}\"\r\n                ReplyDocumentTemplate=\"{StaticResource ReplyDocumentTemplate}\"\r\n                ReplyGifTemplate=\"{StaticResource ReplyGifTemplate}\"\r\n                ReplyStickerTemplate=\"{StaticResource ReplyStickerTemplate}\"\r\n                ReplyAudioTemplate=\"{StaticResource ReplyAudioTemplate}\"\r\n                ReplyVoiceMessageTemplate=\"{StaticResource ReplyVoiceMessageTemplate}\"\r\n                ReplyUnsupportedTemplate=\"{StaticResource ReplyUnsupportedTemplate}\"/>\r\n\r\n            <converters:DialogDetailsBackgroundConverter \r\n                x:Key=\"DialogDetailsBackgroundConverter\"\r\n                EmptyTemplate=\"{StaticResource EmptyTemplate}\"\r\n                ImageTemplate=\"{StaticResource ImageBackgroundTemplate}\"\r\n                AnimatedTemplate=\"{StaticResource AnimatedBackgroundTemplate}\"/>\r\n\r\n            <converters:InvoiceToDescriptionConverter x:Key=\"InvoiceToDescriptionConverter\"/>\r\n            <converters:WebPageToDescriptionConverter x:Key=\"WebPageToDescriptionConverter\"/>\r\n            <converters:WebPageToCaptionConverter x:Key=\"WebPageToCaptionConverter\"/>\r\n            <converters:MessageToWebPageCaptionConverter x:Key=\"MessageToWebPageCaptionConverter\"/>\r\n            <converters:MessageContainerToFromConverter x:Key=\"MessageContainerToFromConverter\"/>\r\n            <converters:MessageContainerToContentConverter x:Key=\"MessageContainerToContentConverter\"/>\r\n            <converters:DownloadMessageToVisibilityConverter x:Key=\"DownloadMessageToVisibilityConverter\"/>\r\n            <converters:DownloadMediaToVisibilityConverter x:Key=\"DownloadMediaToVisibilityConverter\"/>\r\n            <converters:UserToActionStringConverter x:Key=\"UserToActionStringConverter\"/>\r\n            <converters:DebugVisibilityConverter x:Key=\"DebugVisibilityConverter\"/>\r\n            <converters:EmptyChatPhotoToVisibilityConverter x:Key=\"EmptyChatPhotoToVisibilityConverter\"/>\r\n            <converters:EmptyUserProfilePhotoToVisibilityConverter x:Key=\"EmptyPhotoToVisibilityConverter\"/>\r\n            <converters:PrivateBetaToVisibilityConverter x:Key=\"PrivateBetaToVisibilityConverter\"/>\r\n            <converters:PrivateBetaIdentityToVisibilityConverter x:Key=\"PrivateBetaIdentityNameToVisibilityConverter\"/>\r\n            <converters:LogVisibilityConverter x:Key=\"LogVisibilityConverter\"/>\r\n            <converters:TestBindingConverter x:Key=\"TestBindingConverter\"/>\r\n            <converters:MediaSizeConverter x:Key=\"MediaSizeConverter\"/>\r\n            <converters:FileSizeConverter x:Key=\"FileSizeConverter\"/>\r\n            <converters:MessageViewsConverter x:Key=\"MessageViewsConverter\"/>\r\n            <converters:FileNameConverter x:Key=\"FileNameConverter\"/>\r\n            <converters:PhoneNumberConverter x:Key=\"PhoneNumberConverter\"/>\r\n            <converters:PhoneCallToTitleConverter x:Key=\"PhoneCallToTitleConverter\"/>\r\n            <converters:PhoneCallToSubtitleConverter x:Key=\"PhoneCallToSubtitleConverter\"/>\r\n            <converters:SimplePhoneNumberConverter x:Key=\"SimplePhoneNumberConverter\"/>\r\n            <converters:IsSelectedToBackgroundConverter x:Key=\"IsSelectedToBackgroundConverter\"/>\r\n            <converters:ChatToMaxHeight x:Key=\"ChatToMaxHeight\"/>\r\n            <converters:WP8VisibilityConverter x:Key=\"WP8VisibilityConverter\"/>\r\n            <converters:WP81VisibilityConverter x:Key=\"WP81VisibilityConverter\"/>\r\n            <converters:NotServiceMessageToVisibilityConverter x:Key=\"NotServiceMessageToVisibilityConverter\"/>\r\n            <converters:TextMessageToVisibilityConverter x:Key=\"TextMessageToVisibilityConverter\"/>\r\n            <converters:MediaFileAvailableToVisibilityConverter x:Key=\"MediaFileAvailableToVisibilityConverter\"/>\r\n            <converters:ChatToVisibilityConverter x:Key=\"ChatToVisibilityConverter\"/>\r\n            <converters:GroupToBackgroundBrushValueConverter x:Key=\"GroupBackground\"/>\r\n            <converters:GroupToForegroundBrushValueConverter x:Key=\"GroupForeground\"/>\r\n            <converters:StringEqualsToVisibilityConverter IsInvert=\"True\" x:Key=\"GroupVisibilityConverter\"/>\r\n            <converters:StringEqualsToVisibilityConverter IsInvert=\"False\" x:Key=\"TelegramGroupVisibilityConverter\"/>\r\n            <converters:DistanceAwayConverter x:Key=\"DistanceAwayConverter\"/>\r\n            <converters:GeoLocationToVisibilityConverter x:Key=\"GeoLocationToVisibilityConverter\"/>\r\n            <converters:DialogCaptionConverter x:Key=\"DialogCaptionConverter\"/>\r\n            <converters:PhotoBytesToImageConverter x:Key=\"PhotoBytesToImageConverter\"/>\r\n            <converters:UserStatusToStringConverter x:Key=\"UserStatusToStringConverter\"/>\r\n            <converters:EditDateToStringConverter x:Key=\"EditDateToStringConverter\"/>\r\n            <converters:MuteUntilToStringConverter x:Key=\"MuteUntilToStringConverter\"/>\r\n            <converters:ViaBotToStringConverter x:Key=\"ViaBotToStringConverter\"/>\r\n            <converters:DecryptedViaBotToStringConverter x:Key=\"DecryptedViaBotToStringConverter\"/>\r\n            <converters:MuteUntilToBoolConverter x:Key=\"MuteUntilToBoolConverter\"/>\r\n            <converters:UserStatusToBrushConverter x:Key=\"UserStatusToBrushConverter\"/>\r\n            <converters:EmptyStringToVisibilityConverter x:Key=\"EmptyStringToVisibilityConverter\"/>\r\n            <converters:EmptyTLStringToVisibilityConverter x:Key=\"EmptyTLStringToVisibilityConverter\"/>\r\n            <converters:StringFormatConverter String=\"{Binding Resources.ViewUser, Source={StaticResource Strings}}\" x:Key=\"ViewUserString\"/>\r\n            <converters:StringFormatConverter String=\"{Binding Resources.MessageUser, Source={StaticResource Strings}}\" x:Key=\"MessageUserString\"/>\r\n            <converters:ProgressToVisibilityConverter x:Key=\"ProgressToVisibilityConverter\"/>\r\n            <converters:ProgressBetween0and1ToVisibilityConverter x:Key=\"ProgressBetween0and1ToVisibilityConverter\"/>\r\n            <converters:StatusToImageConverter x:Key=\"StatusToImageConverter\"/>\r\n            <converters:ExistsToVisibilityConverter x:Key=\"ExistsToVisibilityConverter\"/>\r\n            <converters:ServiceMessageToTextConverter x:Key=\"ServiceMessageToTextConverter\"/>\r\n            <converters:DecryptedServiceMessageToTextConverter x:Key=\"DecryptedServiceMessageToTextConverter\"/>\r\n            <converters:UnreadMessageConverter x:Key=\"UnreadMessageConverter\"/>\r\n            <converters:PhotoToDimensionConverter x:Key=\"PhotoToDimensionConverter\"/>\r\n            <converters:PhotoToDimensionConverter x:Key=\"FullPhotoToDimensionConverter\" MaxDimension=\"480\"/>\r\n            <converters:VideoToDimensionConverter x:Key=\"VideoToDimensionConverter\"/>\r\n            <converters:DocumentToDimensionConverter x:Key=\"DocumentToDimensionConverter\"/>\r\n            <converters:StickerToDimensionConverter x:Key=\"StickerToDimensionConverter\"/>\r\n            <converters:StickerPreviewToDimensionConverter x:Key=\"StickerPreviewToDimensionConverter\"/>\r\n            <converters:GifToDimensionConverter x:Key=\"GifToDimensionConverter\"/>\r\n            <converters:WebPageGifToDimensionConverter x:Key=\"WebPageGifToDimensionConverter\"/>\r\n            <converters:WebPageToDimensionConverter x:Key=\"WebPageToDimensionConverter\"/>\r\n            <converters:GameToDimensionConverter x:Key=\"GameToDimensionConverter\"/>\r\n            <converters:InvoiceToDimensionConverter x:Key=\"InvoiceToDimensionConverter\"/>\r\n            <converters:PhotoToThumbConverter x:Key=\"PhotoToThumbConverter\"/>\r\n            <converters:PhotoToThumbConverter x:Key=\"SecretPhotoToThumbConverter\" Secret=\"True\"/>\r\n            <converters:GeoPointToStaticGoogleMapsConverter2 Width=\"96\" Height=\"96\" x:Key=\"VenueToStaticGoogleMapsConverter\"/>\r\n            <converters:GeoPointToStaticGoogleMapsConverter3 Width=\"96\" Height=\"96\" x:Key=\"VenueToStaticGoogleMapsConverter2\"/>\r\n            <converters:GeoPointToStaticGoogleMapsConverter Width=\"320\" Height=\"188\" x:Key=\"GeoPointToStaticGoogleMapsConverter\"/>\r\n            <converters:GeoPointToStaticGoogleMapsConverter2 Width=\"320\" Height=\"188\" x:Key=\"GeoPointToStaticGoogleMapsConverter2\"/>\r\n            <converters:GeoPointToStaticGoogleMapsConverter3 Width=\"320\" Height=\"188\" x:Key=\"GeoPointToStaticGoogleMapsConverter3\"/>\r\n            <converters:GeoPointToStaticGoogleMapsConverter Width=\"50\" Height=\"50\" x:Key=\"ReplyGeoPointToStaticGoogleMapsConverter\"/>\r\n            <converters:MediaEmptyToVisibilityConverter x:Key=\"MediaEmptyToVisibilityConverter\"/>\r\n            <converters:UserStatusToVisibilityConverter x:Key=\"UserStatus\"/>\r\n            <converters:DialogToBriefInfoConverter x:Key=\"DialogToBriefInfo\"/>\r\n            <converters:MessageStateToForegroundConverter x:Key=\"MessageForeground\"/>\r\n            <converters:DialogToForegroundConverter x:Key=\"DialogForeground\"/>\r\n            <converters:OverlayAccentBrushConverter AccentColor=\"{StaticResource PhoneAccentColor}\" x:Key=\"OverlayAccentBrush\"/>\r\n            <converters:BooleanToValueConverter x:Key=\"IsAnimatedToScaleConverter\" TrueValue=\"0.0\" FalseValue=\"1.0\"/>\r\n            <converters:MessageStatusConverter x:Key=\"MessageStatusConverter\"/>\r\n            <converters:StringEqualsToVisibilityConverter x:Key=\"StringEqualsToVisibilityConverter\"/>\r\n            <converters:CountToVisibilityConverter x:Key=\"CountMoreThanToVisibilityConverter\" Type=\"MoreThan\"/>\r\n            <converters:CountToVisibilityConverter x:Key=\"CountEqualsToVisibilityConverter\" Type=\"Equals\"/>\r\n            <converters:DefaultPhotoConverter x:Key=\"DefaultPhotoConverter\" CheckChatSettings=\"True\"/>\r\n            <converters:DefaultPhotoConverter x:Key=\"ForcePhotoConverter\" CheckChatSettings=\"False\"/>\r\n            <converters:PhotoConverter x:Key=\"PhotoConverter\"/>\r\n            <converters:ProfileBigPhotoConverter x:Key=\"ProfileBigPhotoConverter\"/>\r\n            <converters:ProfileSmallPhotoConverter x:Key=\"ProfileSmallPhotoConverter\"/>\r\n            <converters:IntToVisibilityConverter x:Key=\"IntToVisibilityConverter\"/>\r\n            <converters:BooleanToVisibilityConverter x:Key=\"BooleanToVisibilityConverter\"/>\r\n            <converters:InvertBooleanConverter x:Key=\"InvertBooleanConverter\"/>\r\n            <converters:InvertVisibilityConverter x:Key=\"InvertVisibilityConverter\"/>\r\n            <converters:DialogMessageFromConverter x:Key=\"DialogMessageFromConverter\"/>\r\n            <converters:MessageToFontFamilyConverter x:Key=\"MessageToFontFamilyConverter\"/>\r\n            <converters:EmptyDialogMessageConverter x:Key=\"EmptyDialogMessageConverter\"/>\r\n            <converters:SecretChatsAvailabilityConverter x:Key=\"SecretChatsAvailabilityConverter\"/>\r\n            <converters:SecretChatsForegroundConverter x:Key=\"SecretChatsForegroundConverter\"/>\r\n            <converters:DialogStatusEqualsToVisibilityConverter x:Key=\"DialogStatusEqualsToVisibilityConverter\"/>\r\n            <converters:TextSizeToVisibilityConverter x:Key=\"TextSizeToVisibilityConverter\"/>\r\n            <converters:DraftToVisibilityConverter x:Key=\"DraftToVisibilityConverter\"/>\r\n            <converters:ShowFromVisibilityConverter x:Key=\"ShowFromVisibilityConverter\"/>\r\n            <converters:DialogToMessageStatusVisibilityConverter x:Key=\"DialogToMessageStatusVisibilityConverter\"/>\r\n            <converters:UnreadCountToVisibilityConverter x:Key=\"UnreadCountToVisibilityConverter\"/>\r\n            <converters:StickerSetToCountStringConverter x:Key=\"StickerSetToCountStringConverter\"/>\r\n            <converters:ReplyMarkupButtonVisibilityConverter x:Key=\"ReplyMarkupButtonVisibilityConverter\"/>\r\n\r\n            <converters:DialogTLIntToDateTimeConverter x:Key=\"DialogDateTimeConverter\" \r\n        \t\tTodayFormat=\"{Binding Resources.TodayFormat, Source={StaticResource Strings}}\"       \r\n        \t\tWeekFormat=\"ddd\" \r\n        \t\tRegularFormat=\"{Binding Resources.RegularFormat, Source={StaticResource Strings}}\"\r\n        \t\tLongRegularFormat=\"{Binding Resources.LongRegularFormat, Source={StaticResource Strings}}\"/>\r\n\r\n            <converters:DraftDialogTLIntToDateTimeConverter x:Key=\"DraftDialogDateTimeConverter\" \r\n        \t\tTodayFormat=\"{Binding Resources.TodayFormat, Source={StaticResource Strings}}\"       \r\n        \t\tWeekFormat=\"ddd\" \r\n        \t\tRegularFormat=\"{Binding Resources.RegularFormat, Source={StaticResource Strings}}\"\r\n        \t\tLongRegularFormat=\"{Binding Resources.LongRegularFormat, Source={StaticResource Strings}}\"/>\r\n\r\n            <converters:TLIntToDateTimeConverter x:Key=\"MessageDateTimeConverter\" \r\n        \t\tTodayFormat=\"{Binding Resources.MessageTodayFormat, Source={StaticResource Strings}}\" \r\n        \t\tRegularFormat=\"{Binding Resources.MessageRegularFormat, Source={StaticResource Strings}}\"\r\n        \t\tLongRegularFormat=\"{Binding Resources.MessageLongRegularFormat, Source={StaticResource Strings}}\"/>\r\n\r\n            <telegramClient:Bootstrapper x:Key=\"Bootstrapper\"/>\r\n        </ResourceDictionary>\r\n    </Application.Resources>\r\n</Application>"
  },
  {
    "path": "TelegramClient/App.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n#if WP81\r\nusing Windows.ApplicationModel.DataTransfer.ShareTarget;\r\nusing Windows.ApplicationModel.Activation;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Passport;\r\nusing TelegramClient.Views.Dialogs;\r\nusing TelegramClient.Views.Passport;\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nnamespace TelegramClient\r\n{\r\n    public partial class App : Application\r\n    {\r\n        /// <summary>\r\n        /// Provides easy access to the root frame of the Phone Application.\r\n        /// </summary>\r\n        /// <returns>The root frame of the Phone Application.</returns>\r\n        //public PhoneApplicationFrame RootFrame { get; private set; }\r\n\r\n        public static Stopwatch Timer = Stopwatch.StartNew();\r\n\r\n        public static Stopwatch StartupStimer = Stopwatch.StartNew();\r\n\r\n        public static void Log(string str)\r\n        {\r\n            Debug.WriteLine(\"{0} {1}\", StartupStimer.Elapsed, str);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Constructor for the Application object.\r\n        /// </summary>\r\n        public App()\r\n        {\r\n            Log(\"App start .ctor\");\r\n\r\n            Telegram.Api.Helpers.Execute.IsForegroundApp = true;\r\n            //var color = Colors.Magenta;\r\n            //Resources.Remove(\"PhoneAccentColor\");\r\n            //Resources.Add(\"PhoneAccentColor\", color);\r\n            //((SolidColorBrush)Resources[\"PhoneAccentBrush\"]).Color = color;\r\n\r\n            // Standard Silverlight initialization\r\n            InitializeComponent();\r\n\r\n            //RootVisual = new PhoneApplicationFrame();\r\n\r\n            Log(\"App start InitilizeComponent\");\r\n\r\n            // Show graphics profiling information while debugging.\r\n            if (Debugger.IsAttached)\r\n            {\r\n                // Display the current frame rate counters.\r\n\r\n\r\n                // Show the areas of the app that are being redrawn in each frame.\r\n                //Application.Current.Host.Settings.EnableRedrawRegions = true;\r\n\r\n                // Enable non-production analysis visualization mode, \r\n                // which shows areas of a page that are handed off to GPU with a colored overlay.\r\n                //Application.Current.Host.Settings.EnableCacheVisualization = true;\r\n\r\n                // Disable the application idle detection by setting the UserIdleDetectionMode property of the\r\n                // application's PhoneApplicationService object to Disabled.\r\n                // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run\r\n                // and consume battery power when the user is not using the phone.\r\n                PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;\r\n            }\r\n            //Current.Host.Settings.EnableRedrawRegions = true;\r\n            //Current.Host.Settings.EnableFrameRateCounter = true;\r\n#if DEBUG\r\n            Current.Host.Settings.EnableFrameRateCounter = true;\r\n            //Current.Host.Settings.EnableRedrawRegions = true;\r\n#endif\r\n#if WP81\r\n            PhoneApplicationService.Current.Activated += OnActivated;\r\n            PhoneApplicationService.Current.ContractActivated += OnContractActivated;\r\n#endif\r\n//#if WP8\r\n//            ApplicationLifetimeObjects.Add(new XnaAsyncDispatcher(TimeSpan.FromMilliseconds(50)));\r\n//#endif\r\n            Windows.ApplicationModel.Core.CoreApplication.UnhandledErrorDetected += (sender, args) =>\r\n            {\r\n                try\r\n                {\r\n                    Telegram.Logs.Log.SyncWrite(args.UnhandledError.ToString());\r\n#if DEBUG\r\n                    Caliburn.Micro.Execute.OnUIThread(() => MessageBox.Show(\"UnhandledErrorDetected\\n\" + args.UnhandledError));\r\n#endif\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n\r\n                }\r\n\r\n                if (!args.UnhandledError.Handled)\r\n                {\r\n                    try\r\n                    {\r\n                        args.UnhandledError.Propagate();\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        try\r\n                        {\r\n                            Telegram.Logs.Log.SyncWrite(args.UnhandledError.ToString());\r\n#if DEBUG\r\n                            Caliburn.Micro.Execute.OnUIThread(() => MessageBox.Show(\"UnhandledErrorDetected Propogate\\n\" + args.UnhandledError));\r\n#endif\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n\r\n                        }\r\n                    }\r\n                }\r\n                //args.UnhandledError.Handled = true;\r\n            };\r\n            UnhandledException += (sender, args) =>\r\n            {\r\n                try\r\n                {\r\n                    Telegram.Logs.Log.SyncWrite(args.ExceptionObject.ToString());\r\n#if DEBUG\r\n                    Caliburn.Micro.Execute.OnUIThread(() => MessageBox.Show(args.ExceptionObject.ToString()));\r\n#endif\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n\r\n                }\r\n                args.Handled = true;\r\n            };\r\n\r\n            Log(\"App stop .ctor\");\r\n        }\r\n\r\n        public ChooseFileInfo ChooseFileInfo { get; set; }\r\n\r\n#if WP81\r\n        public ShareOperation ShareOperation { get; set; }\r\n#endif\r\n\r\n        private void OnActivated(object sender, ActivatedEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        public bool Offline { get; set; }\r\n#if WP8\r\n        public static IReadOnlyCollection<StorageFile> Photos { get; set; }\r\n\r\n        public static StorageFile Video { get; set; }\r\n#endif\r\n\r\n#if WP81\r\n        private void OnContractActivated(object sender, IActivatedEventArgs e)\r\n        {\r\n            var saveArgs = e as FileSavePickerContinuationEventArgs;\r\n            if (saveArgs != null)\r\n            {\r\n                object from;\r\n                if (saveArgs.ContinuationData != null\r\n                    && saveArgs.ContinuationData.TryGetValue(\"From\", out from))\r\n                {\r\n                    if (string.Equals(from, \"DialogDetailsView\"))\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => DialogDetailsViewModel.SaveFile(saveArgs.File));\r\n\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var args = e as FileOpenPickerContinuationEventArgs;\r\n            if (args != null)\r\n            {\r\n                object from;\r\n                if (args.ContinuationData != null\r\n                    && args.ContinuationData.TryGetValue(\"From\", out from))\r\n                {\r\n                    if (string.Equals(from, \"DialogDetailsView\"))\r\n                    {\r\n                        var contentControl = RootVisual as ContentControl;\r\n                        if (contentControl != null)\r\n                        {\r\n                            var dialogDetailsView = contentControl.Content as DialogDetailsView;\r\n                            if (dialogDetailsView != null)\r\n                            {\r\n                                var dialogDetailsViewModel = dialogDetailsView.DataContext as DialogDetailsViewModel;\r\n                                if (dialogDetailsViewModel != null)\r\n                                {\r\n                                    object type;\r\n                                    if (!args.ContinuationData.TryGetValue(\"Type\", out type))\r\n                                    {\r\n                                        type = \"Document\";\r\n                                    }\r\n\r\n                                    if (string.Equals(type, \"Video\"))\r\n                                    {\r\n                                        var file = args.Files.FirstOrDefault();\r\n                                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => dialogDetailsViewModel.SendVideo(file));\r\n                                    }\r\n                                    else if (string.Equals(type, \"Image\"))\r\n                                    {\r\n                                        var file = args.Files.FirstOrDefault();\r\n                                        if (file != null)\r\n                                        {\r\n#if MULTIPLE_PHOTOS\r\n                                            Photos = args.Files;\r\n                                            return;\r\n#endif\r\n\r\n#if WP81\r\n                                            Telegram.Api.Helpers.Execute.BeginOnThreadPool(async () =>\r\n                                            {\r\n                                                var randomStream = await file.OpenReadAsync();\r\n\r\n                                                await ChooseAttachmentViewModel.Handle(IoC.Get<IStateService>(), randomStream, file.Name);\r\n\r\n                                                //MessageBox.Show(\"OnContractActivated after handle\");\r\n                                                dialogDetailsViewModel.BackwardInAnimationComplete();\r\n                                            });\r\n#else\r\n                                            Telegram.Api.Helpers.Execute.BeginOnThreadPool(async () =>\r\n                                            {\r\n                                                var randomStream = await file.OpenReadAsync();\r\n                                                var chosenPhoto = randomStream.AsStreamForRead();\r\n\r\n                                                //MessageBox.Show(\"OnContractActivated stream\");\r\n                                                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                                                {\r\n                                                    ChooseAttachmentViewModel.Handle(IoC.Get<IStateService>(), chosenPhoto, file.Name);\r\n\r\n                                                    //MessageBox.Show(\"OnContractActivated after handle\");\r\n                                                    dialogDetailsViewModel.BackwardInAnimationComplete();\r\n                                                });\r\n                                            });\r\n#endif\r\n\r\n\r\n                                        }\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        var file = args.Files.FirstOrDefault();\r\n                                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => dialogDetailsViewModel.SendDocument(file));\r\n                                    }\r\n\r\n                                    return;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    else if (string.Equals(from, \"SecretDialogDetailsView\"))\r\n                    {\r\n                        var contentControl = RootVisual as ContentControl;\r\n                        if (contentControl != null)\r\n                        {\r\n                            var dialogDetailsView = contentControl.Content as SecretDialogDetailsView;\r\n                            if (dialogDetailsView != null)\r\n                            {\r\n                                var secretDialogDetailsViewModel = dialogDetailsView.DataContext as SecretDialogDetailsViewModel;\r\n                                if (secretDialogDetailsViewModel != null)\r\n                                {\r\n                                    object type;\r\n                                    if (!args.ContinuationData.TryGetValue(\"Type\", out type))\r\n                                    {\r\n                                        type = \"Document\";\r\n                                    }\r\n\r\n                                    if (string.Equals(type, \"Video\"))\r\n                                    //{\r\n                                    //    var file = args.Files.FirstOrDefault();\r\n                                    //    Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => dialogDetailsViewModel.EditVideo(file));\r\n                                    //}\r\n                                    //else\r\n                                    {\r\n                                        var file = args.Files.FirstOrDefault();\r\n                                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => secretDialogDetailsViewModel.SendDocument(file));\r\n                                    }\r\n                                    else if (string.Equals(type, \"Image\"))\r\n                                    {\r\n                                        var file = args.Files.FirstOrDefault();\r\n                                        if (file != null)\r\n                                        {\r\n#if MULTIPLE_PHOTOS\r\n                                            Photos = args.Files;\r\n                                            return;\r\n#endif\r\n#if WP81\r\n                                            Telegram.Api.Helpers.Execute.BeginOnThreadPool(async () =>\r\n                                            {\r\n                                                var randomStream = await file.OpenReadAsync();\r\n                                                await ChooseAttachmentViewModel.Handle(IoC.Get<IStateService>(), randomStream, file.Name);\r\n                                                secretDialogDetailsViewModel.OnBackwardInAnimationComplete();\r\n                                            });\r\n#else\r\n                                            Telegram.Api.Helpers.Execute.BeginOnThreadPool(async () =>\r\n                                            {\r\n                                                var randomStream = await file.OpenReadAsync();\r\n                                                var chosenPhoto = randomStream.AsStreamForRead();\r\n\r\n                                                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                                                {\r\n                                                    ChooseAttachmentViewModel.Handle(IoC.Get<IStateService>(), chosenPhoto, file.Name);\r\n                                                });\r\n                                            });\r\n#endif\r\n                                        }\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        var file = args.Files.FirstOrDefault();\r\n                                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => secretDialogDetailsViewModel.SendDocument(file));\r\n                                    }\r\n\r\n                                    return;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    else if (string.Equals(from, \"ResidentialAddressView\"))\r\n                    {\r\n                        var contentControl = RootVisual as ContentControl;\r\n                        if (contentControl != null)\r\n                        {\r\n                            var view = contentControl.Content as ResidentialAddressView;\r\n                            if (view != null)\r\n                            {\r\n                                object type;\r\n                                if (!args.ContinuationData.TryGetValue(\"Type\", out type))\r\n                                {\r\n                                    type = \"Document\";\r\n                                }\r\n\r\n                                if (type is string)\r\n                                {\r\n                                    var viewModel = view.DataContext as ResidentialAddressViewModel;\r\n                                    if (viewModel != null)\r\n                                    {\r\n                                        var file = args.Files.FirstOrDefault();\r\n                                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => viewModel.SendDocument(type.ToString(), file));\r\n\r\n                                        return;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    else if (string.Equals(from, \"PersonalDetailsView\"))\r\n                    {\r\n                        var contentControl = RootVisual as ContentControl;\r\n                        if (contentControl != null)\r\n                        {\r\n                            object type;\r\n                            if (!args.ContinuationData.TryGetValue(\"Type\", out type))\r\n                            {\r\n                                type = \"Document\";\r\n                            }\r\n\r\n                            if (type is string)\r\n                            {\r\n                                var view = contentControl.Content as PersonalDetailsView;\r\n                                if (view != null)\r\n                                {\r\n                                    var viewModel = view.DataContext as PersonalDetailsViewModel;\r\n                                    if (viewModel != null)\r\n                                    {\r\n                                        var file = args.Files.FirstOrDefault();\r\n                                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => viewModel.SendDocument(type.ToString(), file));\r\n\r\n                                        return;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n#endif\r\n\r\n#region Delayed Bugsense exceptions\r\n        private readonly object _bugsenseSyncRoot = new object();\r\n\r\n        public bool IsBugsenseInitialized { get; set; }\r\n#endregion\r\n    }\r\n\r\n    public class ChooseFileInfo\r\n    {\r\n        public DateTime Time { get; set; }\r\n\r\n        public ChooseFileInfo(DateTime time)\r\n        {\r\n            Time = time;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Behaviors/MarkTapAsHandledBehavior.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Interactivity;\r\n\r\nnamespace TelegramClient.Behaviors\r\n{\r\n    public class HandledEventTrigger : System.Windows.Interactivity.EventTrigger\r\n    {\r\n        protected override void OnEvent(System.EventArgs eventArgs)\r\n        {\r\n            var routedEventArgs = eventArgs as GestureEventArgs;\r\n            if (routedEventArgs != null)\r\n                routedEventArgs.Handled = true;\r\n\r\n            base.OnEvent(eventArgs);\r\n        }\r\n    }\r\n\r\n    public class MarkTapAsHandledBehavior : Behavior<UIElement>\r\n    {\r\n        protected override void OnAttached()\r\n        {\r\n            AssociatedObject.Tap += AssociatedObjectOnTap;\r\n\r\n            base.OnAttached();\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            base.OnDetaching();\r\n\r\n            AssociatedObject.Tap -= AssociatedObjectOnTap;\r\n        }\r\n\r\n        private void AssociatedObjectOnTap(object sender, GestureEventArgs gestureEventArgs)\r\n        {\r\n            gestureEventArgs.Handled = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Behaviors/PanAndZoomBehavior.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Interactivity;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Controls;\r\nusing DragCompletedGestureEventArgs = TelegramClient.Controls.GestureListener.DragCompletedGestureEventArgs;\r\nusing DragDeltaGestureEventArgs = TelegramClient.Controls.GestureListener.DragDeltaGestureEventArgs;\r\nusing DragStartedGestureEventArgs = TelegramClient.Controls.GestureListener.DragStartedGestureEventArgs;\r\nusing FlickGestureEventArgs = TelegramClient.Controls.GestureListener.FlickGestureEventArgs;\r\nusing GestureEventArgs = TelegramClient.Controls.GestureListener.GestureEventArgs;\r\nusing GestureListener = TelegramClient.Controls.GestureListener.GestureListener;\r\nusing GestureService = TelegramClient.Controls.GestureListener.GestureService;\r\nusing PinchGestureEventArgs = TelegramClient.Controls.GestureListener.PinchGestureEventArgs;\r\nusing PinchStartedGestureEventArgs = TelegramClient.Controls.GestureListener.PinchStartedGestureEventArgs;\r\n\r\nnamespace TelegramClient.Behaviors\r\n{\r\n    public class PanAndZoomBehavior : Behavior<FrameworkElement>\r\n    {\r\n        private const double MinZoom = 1.0;\r\n        private readonly CompositeTransform _old = new CompositeTransform();\r\n        private double _initialScale;\r\n        private GestureListener _listener;\r\n\r\n        private bool _isEnabled = true;\r\n\r\n        public bool IsEnabled\r\n        {\r\n            get { return _isEnabled; }\r\n            set { _isEnabled = value; }\r\n        }\r\n\r\n        public bool SuppressDrag { get; set; }\r\n\r\n        public PanAndZoomBehavior()\r\n        {\r\n            MaxZoom = 10.0;\r\n        }\r\n\r\n        /// <summary>\r\n        /// This does not enforce zoom bounds on setting.\r\n        /// </summary>\r\n        public double MaxZoom { get; set; }\r\n\r\n        public static readonly DependencyProperty CanZoomProperty = DependencyProperty.Register(\r\n            \"CanZoom\", typeof (bool), typeof (PanAndZoomBehavior), new PropertyMetadata(default(bool)));\r\n\r\n        public bool CanZoom\r\n        {\r\n            get { return (bool) GetValue(CanZoomProperty); }\r\n            set { SetValue(CanZoomProperty, value); }\r\n        }\r\n\r\n\r\n        public static readonly DependencyProperty CurrentScaleXProperty = DependencyProperty.Register(\r\n            \"CurrentScaleX\", typeof (double), typeof (PanAndZoomBehavior), new PropertyMetadata(1.0));\r\n\r\n        public double CurrentScaleX\r\n        {\r\n            get { return (double) GetValue(CurrentScaleXProperty); }\r\n            set { SetValue(CurrentScaleXProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty CurrentScaleYProperty = DependencyProperty.Register(\r\n            \"CurrentScaleY\", typeof (double), typeof (PanAndZoomBehavior), new PropertyMetadata(1.0));\r\n\r\n        public double CurrentScaleY\r\n        {\r\n            get { return (double) GetValue(CurrentScaleYProperty); }\r\n            set { SetValue(CurrentScaleYProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty BackgroundPanelProperty = DependencyProperty.Register(\r\n            \"BackgroundPanel\", typeof (Panel), typeof (PanAndZoomBehavior), new PropertyMetadata(default(Panel)));\r\n\r\n        public Panel BackgroundPanel\r\n        {\r\n            get { return (Panel) GetValue(BackgroundPanelProperty); }\r\n            set { SetValue(BackgroundPanelProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty DebugTextProperty = DependencyProperty.Register(\r\n            \"DebugText\", typeof (TextBlock), typeof (PanAndZoomBehavior), new PropertyMetadata(default(TextBlock)));\r\n\r\n        private Orientation? _direction;\r\n\r\n        public TextBlock DebugText\r\n        {\r\n            get { return (TextBlock) GetValue(DebugTextProperty); }\r\n            set { SetValue(DebugTextProperty, value); }\r\n        }\r\n\r\n        public event EventHandler<FlickGestureEventArgs> Flick;\r\n\r\n        protected virtual void RaiseFlick(FlickGestureEventArgs e)\r\n        {\r\n            var handler = Flick;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public event EventHandler<DragDeltaGestureEventArgs> DragDelta;\r\n\r\n        protected virtual void RaiseDragDelta(DragDeltaGestureEventArgs e)\r\n        {\r\n            var handler = DragDelta;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n            AssociatedObject.RenderTransform = new CompositeTransform();\r\n            _listener = GestureService.GetGestureListener(AssociatedObject);\r\n\r\n            _listener.PinchDelta += OnPinchDelta;\r\n            _listener.PinchStarted += OnPinchStarted;\r\n            _listener.DragStarted += OnDragStarted;\r\n            _listener.DragDelta += OnDragDelta;\r\n            //_listener.DragCompleted += OnDragCompleted;\r\n            _listener.GestureCompleted += OnGestureCompleted;\r\n            _listener.Flick += OnFlick;\r\n            _listener.Tap += OnTap;\r\n            _listener.DoubleTap += OnDoubleTap;\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            _listener.PinchDelta -= OnPinchDelta;\r\n            _listener.PinchStarted -= OnPinchStarted;\r\n            _listener.DragStarted -= OnDragStarted;\r\n            _listener.DragDelta -= OnDragDelta;\r\n            //_listener.DragCompleted -= OnDragCompleted;\r\n            _listener.GestureCompleted -= OnGestureCompleted;\r\n            _listener.Flick -= OnFlick;\r\n            _listener.Tap -= OnTap;\r\n            _listener.DoubleTap -= OnDoubleTap;\r\n            _listener = null;\r\n            base.OnDetaching();\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> DoubleTap;\r\n\r\n        protected virtual void RaiseDoubleTap(GestureEventArgs e)\r\n        {\r\n            var handler = DoubleTap;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void OnDoubleTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n            if (!CanZoom) return;\r\n\r\n            if (CurrentScaleX > 1.0 || CurrentScaleY > 1.0)\r\n            {\r\n                var frameworkElement = sender as FrameworkElement;\r\n                var transform = frameworkElement.RenderTransform as CompositeTransform;\r\n\r\n                AnimateTransform(transform, 0.0, 0.0, 1.0, 1.0);\r\n\r\n                CurrentScaleX = 1.0;\r\n                CurrentScaleY = 1.0;\r\n            }\r\n            else\r\n            {\r\n                var frameworkElement = sender as FrameworkElement;\r\n                var transform = frameworkElement.RenderTransform as CompositeTransform;\r\n                var a = transform.Transform(e.GetPosition(frameworkElement)); // we need the points to be relative to the current transform\r\n                var b = transform.Transform(e.GetPosition(frameworkElement));\r\n\r\n                var scale = new CompositeTransform\r\n                {\r\n                    CenterX = (a.X + b.X) / 2,\r\n                    CenterY = (a.Y + b.Y) / 2,\r\n                    ScaleX = 4.0,\r\n                    ScaleY = 4.0\r\n                };\r\n\r\n                ConstrainToParentBounds(frameworkElement, scale);\r\n\r\n                var newTransform = ComposeScaleTranslate(transform, scale);\r\n\r\n                AnimateTransform(transform, newTransform.TranslateX, newTransform.TranslateY, newTransform.ScaleX, newTransform.ScaleY);\r\n\r\n                _old.CenterX = newTransform.CenterX;\r\n                _old.CenterY = newTransform.CenterY;\r\n                _old.TranslateX = newTransform.TranslateX;\r\n                _old.TranslateY = newTransform.TranslateY;\r\n                _old.ScaleX = newTransform.ScaleX;\r\n                _old.ScaleY = newTransform.ScaleY;\r\n\r\n                CurrentScaleX = _old.ScaleX;\r\n                CurrentScaleY = _old.ScaleY;\r\n            }\r\n\r\n            RaiseDoubleTap(e);\r\n        }\r\n\r\n        private static void AnimateTransform(CompositeTransform transform, double translateX, double translateY, double scaleX, double scaleY)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateXAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = TimeSpan.FromSeconds(0.25),\r\n                Value = translateX,\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n            });\r\n            Storyboard.SetTarget(translateXAnimation, transform);\r\n            Storyboard.SetTargetProperty(translateXAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(translateXAnimation);\r\n\r\n            var translateYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = TimeSpan.FromSeconds(0.25),\r\n                Value = translateY,\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n            });\r\n            Storyboard.SetTarget(translateYAnimation, transform);\r\n            Storyboard.SetTargetProperty(translateYAnimation, new PropertyPath(\"TranslateY\"));\r\n            storyboard.Children.Add(translateYAnimation);\r\n\r\n            var scaleXAnimation = new DoubleAnimationUsingKeyFrames();\r\n            scaleXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = TimeSpan.FromSeconds(0.25),\r\n                Value = scaleX,\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n            });\r\n            Storyboard.SetTarget(scaleXAnimation, transform);\r\n            Storyboard.SetTargetProperty(scaleXAnimation, new PropertyPath(\"ScaleX\"));\r\n            storyboard.Children.Add(scaleXAnimation);\r\n\r\n            var scaleYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            scaleYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = TimeSpan.FromSeconds(0.25),\r\n                Value = scaleY,\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n            });\r\n            Storyboard.SetTarget(scaleYAnimation, transform);\r\n            Storyboard.SetTargetProperty(scaleYAnimation, new PropertyPath(\"ScaleY\"));\r\n            storyboard.Children.Add(scaleYAnimation);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> Tap;\r\n\r\n        protected virtual void RaiseTap(GestureEventArgs e)\r\n        {\r\n            var handler = Tap;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n\r\n            RaiseTap(e);\r\n        }\r\n\r\n        public event EventHandler<PanAndZoomCloseEventArgs> Close;\r\n\r\n        protected virtual void RaiseClose(PanAndZoomCloseEventArgs e)\r\n        {\r\n            var handler = Close;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void OnGestureCompleted(object sender, GestureEventArgs e)\r\n        {\r\n            if (_isDragging)\r\n            {\r\n                var args = new DragCompletedGestureEventArgs(\r\n                    new Point(0.0, 0.0), \r\n                    new Point(0.0, 0.0),\r\n                    new Point(0.0, 0.0), \r\n                    Orientation.Vertical, \r\n                    new Point(0.0, 0.0));\r\n\r\n                if (_lastDragDeltaEventArgs != null)\r\n                {\r\n                    args = new DragCompletedGestureEventArgs(\r\n                    new Point(0.0, 0.0),\r\n                    new Point(0.0, 0.0),\r\n                    new Point(_lastDragDeltaEventArgs.HorizontalChange, _lastDragDeltaEventArgs.VerticalChange),\r\n                    _lastDragDeltaEventArgs.Direction,\r\n                    new Point(0.0, 0.0));\r\n                }\r\n\r\n                _isDragging = false;\r\n                OnDragCompleted(sender, args);\r\n            }\r\n        }\r\n\r\n        private void OnDragCompleted(object sender, DragCompletedGestureEventArgs e)\r\n        {\r\n            //System.Diagnostics.Debug.WriteLine(\"OnDragCompleted IsEnabled=\" + IsEnabled + \" horizontal_change=\" + e.HorizontalChange + \" vertical_change=\" + e.VerticalChange + \" direction=\" + e.Direction + \" horizontal_velocity=\" + e.HorizontalVelocity + \" vertical_velocity=\" + e.VerticalVelocity);\r\n            _isDragging = false;\r\n\r\n            if (!IsEnabled) return;\r\n\r\n            if (CurrentScaleX != 1.0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var frameworkElement = sender as FrameworkElement;\r\n            var transform = frameworkElement.RenderTransform as CompositeTransform;\r\n\r\n            if (DebugText != null)\r\n            {\r\n                DebugText.Text = string.Format(\"DragCompleted TranslateX={0} TranslateY={1}\", transform.TranslateX, transform.TranslateY);\r\n            }\r\n\r\n            if (_direction == Orientation.Vertical)\r\n            {\r\n                if (SuppressDrag) return;\r\n                if (Math.Abs(transform.TranslateY) > 100)\r\n                {\r\n                    RaiseClose(new PanAndZoomCloseEventArgs{ VerticalChange = e.VerticalChange });\r\n                    return;\r\n                }\r\n                else\r\n                {\r\n                    var storyboard = new Storyboard();\r\n\r\n                    var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n                    Storyboard.SetTarget(translateAnimation, frameworkElement);\r\n                    Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                    storyboard.Children.Add(translateAnimation);\r\n\r\n                    storyboard.Begin();\r\n\r\n                    if (BackgroundPanel != null)\r\n                    {\r\n                        BackgroundPanel.Opacity = 1.0;\r\n                        //BackgroundPanel.Background = new SolidColorBrush(Colors.Black);\r\n                    }\r\n                }\r\n            }\r\n            //else if (_direction == Orientation.Horizontal && Math.Abs(transform.TranslateX) < 150)\r\n            //{\r\n            //    var storyboard = new Storyboard();\r\n\r\n            //    var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n            //    translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            //    Storyboard.SetTarget(translateAnimation, img);\r\n            //    Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            //    storyboard.Children.Add(translateAnimation);\r\n\r\n            //    storyboard.Begin();\r\n            //}\r\n\r\n\r\n            _direction = null;\r\n        }\r\n\r\n        private void OnFlick(object sender, FlickGestureEventArgs e)\r\n        {\r\n            //System.Diagnostics.Debug.WriteLine(\"OnFlick IsEnabled=\" + IsEnabled + \" angle=\" + e.Angle + \" direction=\" + e.Direction + \" horizontal_velocity=\" + e.HorizontalVelocity + \" vertical_velocity=\" + e.VerticalVelocity);\r\n\r\n            if (!IsEnabled) return;\r\n\r\n            RaiseFlick(e);\r\n        }\r\n\r\n        private bool _isDragging;\r\n\r\n        private void OnDragStarted(object sender, DragStartedGestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n\r\n            _direction = e.Direction;\r\n            _isDragging = true;\r\n        }\r\n\r\n        private void OnPinchDelta(object sender, PinchGestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n            if (!CanZoom) return;\r\n\r\n            var frameworkElement = sender as FrameworkElement;\r\n            var transform = frameworkElement.RenderTransform as CompositeTransform;\r\n            var a = transform.Transform(e.GetPosition(frameworkElement, 0)); // we need the points to be relative to the current transform\r\n            var b = transform.Transform(e.GetPosition(frameworkElement, 1));\r\n\r\n            var scale = new CompositeTransform\r\n            {\r\n                CenterX = (a.X + b.X) / 2,\r\n                CenterY = (a.Y + b.Y) / 2,\r\n                ScaleX = Clamp(e.DistanceRatio * _initialScale / _old.ScaleX,\r\n                    MinZoom / _old.ScaleX,\r\n                    MaxZoom / _old.ScaleX),\r\n                ScaleY = Clamp(e.DistanceRatio * _initialScale / _old.ScaleY,\r\n                    MinZoom / _old.ScaleY,\r\n                    MaxZoom / _old.ScaleY)\r\n            };\r\n\r\n            ConstrainToParentBounds(frameworkElement, scale);\r\n\r\n            transform = ComposeScaleTranslate(transform, scale);\r\n            frameworkElement.RenderTransform = transform;\r\n\r\n            _old.CenterX = transform.CenterX;\r\n            _old.CenterY = transform.CenterY;\r\n            _old.TranslateX = transform.TranslateX;\r\n            _old.TranslateY = transform.TranslateY;\r\n            _old.ScaleX = transform.ScaleX;\r\n            _old.ScaleY = transform.ScaleY;\r\n\r\n            CurrentScaleX = _old.ScaleX;\r\n            CurrentScaleY = _old.ScaleY;\r\n        }\r\n\r\n        private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n            if (!CanZoom) return;\r\n\r\n            var img = sender as FrameworkElement;\r\n            var transform = img.RenderTransform as CompositeTransform;\r\n\r\n            _old.CenterX = transform.CenterX;\r\n            _old.CenterY = transform.CenterY;\r\n            _old.TranslateX = transform.TranslateX;\r\n            _old.TranslateY = transform.TranslateY;\r\n            _old.ScaleX = transform.ScaleX;\r\n            _old.ScaleY = transform.ScaleY;\r\n            \r\n            _initialScale = transform.ScaleX;\r\n        }\r\n\r\n        private DragDeltaGestureEventArgs _lastDragDeltaEventArgs;\r\n\r\n        private void OnDragDelta(object sender, DragDeltaGestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n\r\n            _lastDragDeltaEventArgs = e;\r\n\r\n            RaiseDragDelta(e);\r\n\r\n            //if (CurrentScaleX == 1.0) return;\r\n\r\n\r\n            //DebugText.Text = string.Format(\"DragDelta X={0} Y={1} Direction={2}\", e.HorizontalChange, e.VerticalChange, e.Direction);\r\n\r\n            // Translation is done as the last operation, so no need to move the operation up in composition order\r\n            var img = sender as FrameworkElement;\r\n            if (img == null) return;\r\n            var transform = img.RenderTransform as CompositeTransform;\r\n            if (transform == null) return;\r\n\r\n            CompositeTransform translate = null;\r\n            if (CurrentScaleX == 1.0)\r\n            {\r\n                if (SuppressDrag) return;\r\n                if (_direction == Orientation.Vertical)\r\n                {\r\n                    translate = new CompositeTransform\r\n                    {\r\n                        TranslateX = 0,\r\n                        TranslateY = e.VerticalChange\r\n                    };\r\n\r\n                    if (BackgroundPanel != null)\r\n                    {\r\n                        var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n                        var deltaY = Math.Abs(translate.TranslateY + translate.ScaleY * transform.TranslateY + (translate.ScaleY - 1) * (transform.CenterY - translate.CenterY));\r\n                        var opacity = (rootFrameHeight - deltaY) / rootFrameHeight;\r\n                        var backgroundBrush = (SolidColorBrush)BackgroundPanel.Background;\r\n                        var backgroundColor = backgroundBrush.Color;\r\n                        backgroundColor.A = (byte)(opacity * byte.MaxValue);\r\n\r\n                        BackgroundPanel.Opacity = opacity;\r\n                        //BackgroundPanel.Background = new SolidColorBrush(backgroundColor);\r\n                    }\r\n\r\n                    img.RenderTransform = ComposeScaleTranslate(transform, translate);\r\n                }\r\n                else if (_direction == Orientation.Horizontal)\r\n                {\r\n                    //translate = new CompositeTransform\r\n                    //{\r\n                    //    TranslateX = e.HorizontalChange,\r\n                    //    TranslateY = 0\r\n                    //};\r\n\r\n                    //img.RenderTransform = ComposeScaleTranslate(transform, translate);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (!CanZoom) return;\r\n\r\n                translate = new CompositeTransform\r\n                {\r\n                    TranslateX = e.HorizontalChange,\r\n                    TranslateY = e.VerticalChange\r\n                };\r\n\r\n                ConstrainToParentBounds(img, translate);\r\n\r\n                img.RenderTransform = ComposeScaleTranslate(transform, translate);\r\n            }\r\n        }\r\n\r\n        private static void ConstrainToParentBounds(FrameworkElement elm, CompositeTransform transform)\r\n        {\r\n            var p = (FrameworkElement)elm.Parent;\r\n            var canvas = p.TransformToVisual(elm).TransformBounds(new Rect(0, 0, p.ActualWidth, p.ActualHeight));\r\n            // Now compute the new viewport relative to the previous\r\n            var newViewport = transform.TransformBounds(new Rect(0, 0, elm.ActualWidth, elm.ActualHeight));\r\n\r\n            var top = newViewport.Top - canvas.Top;\r\n            var bottom = canvas.Bottom - newViewport.Bottom;\r\n            var left = newViewport.Left - canvas.Left;\r\n            var right = canvas.Right - newViewport.Right;\r\n\r\n            if (top > 0)\r\n                if (top + bottom > 0)\r\n                    transform.TranslateY += (bottom - top) / 2;\r\n                else\r\n                    transform.TranslateY -= top;\r\n            else if (bottom > 0)\r\n                if (top + bottom > 0)\r\n                    transform.TranslateY += (bottom - top) / 2;\r\n                else\r\n                    transform.TranslateY += bottom;\r\n\r\n            if (left > 0)\r\n                if (left + right > 0)\r\n                    transform.TranslateX += (right - left) / 2;\r\n                else\r\n                    transform.TranslateX -= left;\r\n            else if (right > 0)\r\n                if (left + right > 0)\r\n                    transform.TranslateX += (right - left) / 2;\r\n                else\r\n                    transform.TranslateX += right;\r\n        }\r\n\r\n        public static CompositeTransform ComposeScaleTranslate(CompositeTransform fst, CompositeTransform snd)\r\n        {\r\n            // See http://stackoverflow.com/a/19439099/388010 on why this works\r\n            var compositTransform =  new CompositeTransform\r\n            {\r\n                ScaleX = fst.ScaleX * snd.ScaleX,\r\n                ScaleY = fst.ScaleY * snd.ScaleY,\r\n                CenterX = fst.CenterX,\r\n                CenterY = fst.CenterY,\r\n                TranslateX = snd.TranslateX + snd.ScaleX * fst.TranslateX + (snd.ScaleX - 1) * (fst.CenterX - snd.CenterX),\r\n                TranslateY = snd.TranslateY + snd.ScaleY * fst.TranslateY + (snd.ScaleY - 1) * (fst.CenterY - snd.CenterY),\r\n            };\r\n\r\n            return compositTransform;\r\n        }\r\n\r\n        public static double Clamp(double val, double min, double max)\r\n        {\r\n            return val > min ? val < max ? val : max : min;\r\n        }\r\n\r\n        private void OrientationChanged(object sender, OrientationChangedEventArgs e)\r\n        {\r\n            // Handling orientation change is a heck more involved than I initially thought\r\n            AssociatedObject.RenderTransform = new CompositeTransform();\r\n        }\r\n    }\r\n\r\n    public class PanAndZoomCloseEventArgs : System.EventArgs\r\n    {\r\n        public double VerticalChange { get; set; }\r\n    }\r\n\r\n    public class PanAndZoom2Behavior : Behavior<FrameworkElement>\r\n    {\r\n        private const double MinZoom = 1.0;\r\n        private readonly CompositeTransform _old = new CompositeTransform();\r\n        private double _initialScale;\r\n        private GestureListener _listener;\r\n\r\n        private bool _isEnabled = true;\r\n\r\n        public bool IsEnabled\r\n        {\r\n            get { return _isEnabled; }\r\n            set { _isEnabled = value; }\r\n        }\r\n\r\n        public PanAndZoom2Behavior()\r\n        {\r\n            MaxZoom = 10.0;\r\n        }\r\n\r\n        /// <summary>\r\n        /// This does not enforce zoom bounds on setting.\r\n        /// </summary>\r\n        public double MaxZoom { get; set; }\r\n\r\n        public static readonly DependencyProperty CanZoomProperty = DependencyProperty.Register(\r\n            \"CanZoom\", typeof(bool), typeof(PanAndZoom2Behavior), new PropertyMetadata(default(bool)));\r\n\r\n        public bool CanZoom\r\n        {\r\n            get { return (bool)GetValue(CanZoomProperty); }\r\n            set { SetValue(CanZoomProperty, value); }\r\n        }\r\n\r\n\r\n        public static readonly DependencyProperty CurrentScaleXProperty = DependencyProperty.Register(\r\n            \"CurrentScaleX\", typeof(double), typeof(PanAndZoom2Behavior), new PropertyMetadata(1.0));\r\n\r\n        public double CurrentScaleX\r\n        {\r\n            get { return (double)GetValue(CurrentScaleXProperty); }\r\n            set { SetValue(CurrentScaleXProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty CurrentScaleYProperty = DependencyProperty.Register(\r\n            \"CurrentScaleY\", typeof(double), typeof(PanAndZoom2Behavior), new PropertyMetadata(1.0));\r\n\r\n        public double CurrentScaleY\r\n        {\r\n            get { return (double)GetValue(CurrentScaleYProperty); }\r\n            set { SetValue(CurrentScaleYProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty BackgroundPanelProperty = DependencyProperty.Register(\r\n            \"BackgroundPanel\", typeof(Panel), typeof(PanAndZoom2Behavior), new PropertyMetadata(default(Panel)));\r\n\r\n        public Panel BackgroundPanel\r\n        {\r\n            get { return (Panel)GetValue(BackgroundPanelProperty); }\r\n            set { SetValue(BackgroundPanelProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty DebugTextProperty = DependencyProperty.Register(\r\n            \"DebugText\", typeof(TextBlock), typeof(PanAndZoom2Behavior), new PropertyMetadata(default(TextBlock)));\r\n\r\n        private Orientation? _direction;\r\n\r\n        public TextBlock DebugText\r\n        {\r\n            get { return (TextBlock)GetValue(DebugTextProperty); }\r\n            set { SetValue(DebugTextProperty, value); }\r\n        }\r\n\r\n        public event EventHandler<FlickGestureEventArgs> Flick;\r\n\r\n        protected virtual void RaiseFlick(FlickGestureEventArgs e)\r\n        {\r\n            var handler = Flick;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public event EventHandler<DragDeltaGestureEventArgs> DragDelta;\r\n\r\n        protected virtual void RaiseDragDelta(DragDeltaGestureEventArgs e)\r\n        {\r\n            var handler = DragDelta;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n            AssociatedObject.RenderTransform = new CompositeTransform();\r\n            _listener = GestureService.GetGestureListener(AssociatedObject);\r\n\r\n            //Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(1.0), () =>\r\n            //{\r\n            _listener.PinchDelta += OnPinchDelta;\r\n            _listener.PinchStarted += OnPinchStarted;\r\n            _listener.DragStarted += OnDragStarted;\r\n            _listener.DragDelta += OnDragDelta;\r\n            _listener.DragCompleted += OnDragCompleted;\r\n            _listener.Flick += OnFlick;\r\n            _listener.Tap += OnTap;\r\n            _listener.DoubleTap += OnDoubleTap;\r\n            //});\r\n            // wait for the RootVisual to be initialized\r\n            //Dispatcher.BeginInvoke(() =>\r\n            //    ((PhoneApplicationFrame)Application.Current.RootVisual).OrientationChanged += OrientationChanged);\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            //((PhoneApplicationPage)Application.Current.RootVisual).OrientationChanged -= OrientationChanged;\r\n            _listener.Flick -= OnFlick;\r\n            _listener.PinchDelta -= OnPinchDelta;\r\n            _listener.PinchStarted -= OnPinchStarted;\r\n            _listener.DragStarted -= OnDragStarted;\r\n            _listener.DragDelta -= OnDragDelta;\r\n            _listener.DragCompleted -= OnDragCompleted;\r\n            _listener.Tap -= OnTap;\r\n            _listener.DoubleTap -= OnDoubleTap;\r\n            _listener = null;\r\n            base.OnDetaching();\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> DoubleTap;\r\n\r\n        protected virtual void RaiseDoubleTap(GestureEventArgs e)\r\n        {\r\n            var handler = DoubleTap;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void OnDoubleTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n\r\n            RaiseDoubleTap(e);\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> Tap;\r\n\r\n        protected virtual void RaiseTap(GestureEventArgs e)\r\n        {\r\n            var handler = Tap;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n\r\n            RaiseTap(e);\r\n        }\r\n\r\n        public event EventHandler<DragCompletedGestureEventArgs> Close;\r\n\r\n        protected virtual void RaiseClose(DragCompletedGestureEventArgs e)\r\n        {\r\n            var handler = Close;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void OnDragCompleted(object sender, DragCompletedGestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n\r\n            //if (CurrentScaleX != 1.0)\r\n            //{\r\n            //    return;\r\n            //}\r\n\r\n            //var frameworkElement = sender as FrameworkElement;\r\n            //var transform = frameworkElement.RenderTransform as CompositeTransform;\r\n\r\n            //if (DebugText != null)\r\n            //{\r\n            //    DebugText.Text = string.Format(\"DragCompleted TranslateX={0} TranslateY={1}\", transform.TranslateX, transform.TranslateY);\r\n            //}\r\n\r\n            //if (_direction == Orientation.Vertical)\r\n            //{\r\n            //    if (Math.Abs(transform.TranslateY) > 100)\r\n            //    {\r\n            //        RaiseClose(e);\r\n            //        return;\r\n            //    }\r\n            //    else\r\n            //    {\r\n            //        var storyboard = new Storyboard();\r\n\r\n            //        var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n            //        translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            //        Storyboard.SetTarget(translateAnimation, frameworkElement);\r\n            //        Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            //        storyboard.Children.Add(translateAnimation);\r\n\r\n            //        storyboard.Begin();\r\n\r\n            //        if (BackgroundPanel != null)\r\n            //        {\r\n            //            BackgroundPanel.Opacity = 1.0;\r\n            //            //BackgroundPanel.Background = new SolidColorBrush(Colors.Black);\r\n            //        }\r\n            //    }\r\n            //}\r\n            //else if (_direction == Orientation.Horizontal && Math.Abs(transform.TranslateX) < 150)\r\n            //{\r\n            //    var storyboard = new Storyboard();\r\n\r\n            //    var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n            //    translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            //    Storyboard.SetTarget(translateAnimation, img);\r\n            //    Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            //    storyboard.Children.Add(translateAnimation);\r\n\r\n            //    storyboard.Begin();\r\n            //}\r\n\r\n\r\n            _direction = null;\r\n        }\r\n\r\n        private void OnFlick(object sender, FlickGestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n\r\n            RaiseFlick(e);\r\n        }\r\n\r\n\r\n\r\n        private void OnDragStarted(object sender, DragStartedGestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n\r\n            _direction = e.Direction;\r\n        }\r\n\r\n        private void OnPinchDelta(object sender, PinchGestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n            if (!CanZoom) return;\r\n\r\n            var frameworkElement = sender as FrameworkElement;\r\n            var transform = frameworkElement.RenderTransform as CompositeTransform;\r\n            var a = transform.Transform(e.GetPosition(frameworkElement, 0)); // we need the points to be relative to the current transform\r\n            var b = transform.Transform(e.GetPosition(frameworkElement, 1));\r\n\r\n            var scale = new CompositeTransform\r\n            {\r\n                CenterX = (a.X + b.X) / 2,\r\n                CenterY = (a.Y + b.Y) / 2,\r\n                ScaleX = Clamp(e.DistanceRatio * _initialScale / _old.ScaleX,\r\n                    MinZoom / _old.ScaleX,\r\n                    MaxZoom / _old.ScaleX),\r\n                ScaleY = Clamp(e.DistanceRatio * _initialScale / _old.ScaleY,\r\n                    MinZoom / _old.ScaleY,\r\n                    MaxZoom / _old.ScaleY)\r\n            };\r\n\r\n            ConstrainToParentBounds(frameworkElement, scale);\r\n\r\n            transform = ComposeScaleTranslate(transform, scale);\r\n            frameworkElement.RenderTransform = transform;\r\n\r\n            _old.CenterX = transform.CenterX;\r\n            _old.CenterY = transform.CenterY;\r\n            _old.TranslateX = transform.TranslateX;\r\n            _old.TranslateY = transform.TranslateY;\r\n            _old.ScaleX = transform.ScaleX;\r\n            _old.ScaleY = transform.ScaleY;\r\n\r\n            CurrentScaleX = _old.ScaleX;\r\n            CurrentScaleY = _old.ScaleY;\r\n\r\n            if (DebugText != null)\r\n            {\r\n                DebugText.Text = string.Format(\"Scale={0}x{1}\\nCenter={2}x{3}\\nTranslate={4}x{5}\", transform.ScaleX, transform.ScaleY, transform.CenterX, transform.CenterY, transform.TranslateX, transform.TranslateY);\r\n            }\r\n        }\r\n\r\n        private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n            if (!CanZoom) return;\r\n\r\n            var img = sender as FrameworkElement;\r\n            var transform = img.RenderTransform as CompositeTransform;\r\n\r\n            _old.CenterX = transform.CenterX;\r\n            _old.CenterY = transform.CenterY;\r\n            _old.TranslateX = transform.TranslateX;\r\n            _old.TranslateY = transform.TranslateY;\r\n            _old.ScaleX = transform.ScaleX;\r\n            _old.ScaleY = transform.ScaleY;\r\n            _initialScale = transform.ScaleX;\r\n        }\r\n\r\n        private void OnDragDelta(object sender, DragDeltaGestureEventArgs e)\r\n        {\r\n            if (!IsEnabled) return;\r\n\r\n            RaiseDragDelta(e);\r\n\r\n            //if (CurrentScaleX == 1.0) return;\r\n\r\n\r\n            //DebugText.Text = string.Format(\"DragDelta X={0} Y={1} Direction={2}\", e.HorizontalChange, e.VerticalChange, e.Direction);\r\n\r\n            // Translation is done as the last operation, so no need to move the operation up in composition order\r\n            var img = sender as FrameworkElement;\r\n            if (img == null) return;\r\n            var transform = img.RenderTransform as CompositeTransform;\r\n            if (transform == null) return;\r\n\r\n            if (!CanZoom) return;\r\n\r\n            var translate = new CompositeTransform\r\n            {\r\n                TranslateX = e.HorizontalChange,\r\n                TranslateY = e.VerticalChange\r\n            };\r\n\r\n            ConstrainToParentBounds(img, translate);\r\n\r\n            var t = ComposeScaleTranslate(transform, translate);\r\n            img.RenderTransform = t;\r\n\r\n            if (DebugText != null)\r\n            {\r\n                DebugText.Text = string.Format(\"Scale={0}x{1}\\nCenter={2}x{3}\\nTranslate={4}x{5}\", t.ScaleX, t.ScaleY, t.CenterX, t.CenterY, t.TranslateX, t.TranslateY);\r\n            }\r\n        }\r\n\r\n        private static void ConstrainToParentBounds(FrameworkElement elm, CompositeTransform transform)\r\n        {\r\n            var p = (FrameworkElement)elm.Parent;\r\n            var canvas = p.TransformToVisual(elm).TransformBounds(new Rect(0, 0, p.ActualWidth, p.ActualHeight));\r\n            // Now compute the new viewport relative to the previous\r\n            var newViewport = transform.TransformBounds(new Rect(0, 0, elm.ActualWidth, elm.ActualHeight));\r\n\r\n            var top = newViewport.Top - canvas.Top;\r\n            var bottom = canvas.Bottom - newViewport.Bottom;\r\n            var left = newViewport.Left - canvas.Left;\r\n            var right = canvas.Right - newViewport.Right;\r\n\r\n            if (top > 0)\r\n                if (top + bottom > 0)\r\n                    transform.TranslateY += (bottom - top) / 2;\r\n                else\r\n                    transform.TranslateY -= top;\r\n            else if (bottom > 0)\r\n                if (top + bottom > 0)\r\n                    transform.TranslateY += (bottom - top) / 2;\r\n                else\r\n                    transform.TranslateY += bottom;\r\n\r\n            if (left > 0)\r\n                if (left + right > 0)\r\n                    transform.TranslateX += (right - left) / 2;\r\n                else\r\n                    transform.TranslateX -= left;\r\n            else if (right > 0)\r\n                if (left + right > 0)\r\n                    transform.TranslateX += (right - left) / 2;\r\n                else\r\n                    transform.TranslateX += right;\r\n        }\r\n\r\n        public static CompositeTransform ComposeScaleTranslate(CompositeTransform fst, CompositeTransform snd)\r\n        {\r\n            // See http://stackoverflow.com/a/19439099/388010 on why this works\r\n            var compositTransform = new CompositeTransform\r\n            {\r\n                ScaleX = fst.ScaleX * snd.ScaleX,\r\n                ScaleY = fst.ScaleY * snd.ScaleY,\r\n                CenterX = fst.CenterX,\r\n                CenterY = fst.CenterY,\r\n                TranslateX = snd.TranslateX + snd.ScaleX * fst.TranslateX + (snd.ScaleX - 1) * (fst.CenterX - snd.CenterX),\r\n                TranslateY = snd.TranslateY + snd.ScaleY * fst.TranslateY + (snd.ScaleY - 1) * (fst.CenterY - snd.CenterY),\r\n            };\r\n\r\n            return compositTransform;\r\n        }\r\n\r\n        private static double Clamp(double val, double min, double max)\r\n        {\r\n            return val > min ? val < max ? val : max : min;\r\n        }\r\n\r\n        private void OrientationChanged(object sender, OrientationChangedEventArgs e)\r\n        {\r\n            // Handling orientation change is a heck more involved than I initially thought\r\n            AssociatedObject.RenderTransform = new CompositeTransform();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Behaviors/ProgressBarSmoother.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace TelegramClient.Behaviors\r\n{\r\n    public class ProgressBarSmoother\r\n    {\r\n        public static double GetSmoothValue(DependencyObject obj)\r\n        {\r\n            return (double)obj.GetValue(SmoothValueProperty);\r\n        }\r\n\r\n        public static void SetSmoothValue(DependencyObject obj, double value)\r\n        {\r\n            obj.SetValue(SmoothValueProperty, value);\r\n        }\r\n\r\n        public static readonly DependencyProperty SmoothValueProperty =\r\n            DependencyProperty.RegisterAttached(\"SmoothValue\", typeof(double), typeof(ProgressBarSmoother), new PropertyMetadata(0.0, OnSmoothValueChanged));\r\n\r\n        private static void OnSmoothValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            //if ((double)e.NewValue > (double)e.OldValue)\r\n            //{\r\n                \r\n            //}\r\n\r\n            var animation = new DoubleAnimation\r\n            {\r\n                To = (double) e.NewValue,\r\n                Duration = new Duration(TimeSpan.FromSeconds(0.2)),\r\n                //EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 }\r\n            };\r\n\r\n            Storyboard.SetTarget(animation, d);\r\n            Storyboard.SetTargetProperty(animation, new PropertyPath(RangeBase.ValueProperty));\r\n            var sb = new Storyboard();\r\n            sb.Children.Add(animation);\r\n            sb.Begin();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Behaviors/SelectionBehavior.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Interactivity;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Behaviors\r\n{\r\n    public class SelectionBehavior : Behavior<CheckBox>\r\n    {\r\n        public static readonly DependencyProperty IsSelectionEnabledProperty = DependencyProperty.Register(\r\n            \"IsSelectionEnabled\", typeof (bool), typeof (SelectionBehavior), new PropertyMetadata(default(bool), OnSelectionChanged));\r\n\r\n        private static void OnSelectionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var behavior = d as SelectionBehavior;\r\n            if (behavior != null && behavior.AssociatedObject != null)\r\n            {\r\n                if ((bool) e.NewValue)\r\n                {\r\n                    var storyboard = new Storyboard();\r\n                    if (!(behavior.AssociatedObject.RenderTransform is CompositeTransform))\r\n                    {\r\n                        behavior.AssociatedObject.RenderTransform = new CompositeTransform();\r\n                    }\r\n                    var continuumLayoutRootY = new DoubleAnimationUsingKeyFrames();\r\n                    continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -80.0 });\r\n                    continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = -80.0 });\r\n                    continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.55), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                    Storyboard.SetTarget(continuumLayoutRootY, behavior.AssociatedObject);\r\n                    Storyboard.SetTargetProperty(continuumLayoutRootY, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n                    storyboard.Children.Add(continuumLayoutRootY);\r\n\r\n                    behavior.AssociatedObject.Visibility = Visibility.Visible;\r\n                    storyboard.Begin();\r\n                }\r\n                else\r\n                {\r\n                    behavior.AssociatedObject.Visibility = Visibility.Collapsed;\r\n                    //var storyboard = new Storyboard();\r\n                    //if (!(behavior.AssociatedObject.RenderTransform is CompositeTransform))\r\n                    //{\r\n                    //    behavior.AssociatedObject.RenderTransform = new CompositeTransform();\r\n                    //}\r\n                    //var translateX = new DoubleAnimationUsingKeyFrames();\r\n                    //translateX.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n                    //translateX.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = -50.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 3.0 } });\r\n                    //Storyboard.SetTarget(translateX, behavior.AssociatedObject);\r\n                    //Storyboard.SetTargetProperty(translateX, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n                    //storyboard.Children.Add(translateX);\r\n\r\n                    //var visibility = new ObjectAnimationUsingKeyFrames();\r\n                    //visibility.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = Visibility.Collapsed });\r\n                    //Storyboard.SetTarget(visibility, behavior.AssociatedObject);\r\n                    //Storyboard.SetTargetProperty(visibility, new PropertyPath(\"Visibility\"));\r\n                    //storyboard.Children.Add(visibility);\r\n\r\n                    //storyboard.Begin();\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return (bool) GetValue(IsSelectionEnabledProperty); }\r\n            set { SetValue(IsSelectionEnabledProperty, value); }\r\n        }\r\n\r\n        protected override void OnAttached()\r\n        {\r\n            AssociatedObject.Loaded += AssociatedObject_OnLoaded;\r\n\r\n            base.OnAttached();\r\n        }\r\n\r\n        private void AssociatedObject_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!(AssociatedObject.RenderTransform is CompositeTransform))\r\n            {\r\n                AssociatedObject.RenderTransform = new CompositeTransform();\r\n            }\r\n            var transform = AssociatedObject.RenderTransform as CompositeTransform;\r\n            transform.TranslateX = IsSelectionEnabled ? 0.0 : -68.0;\r\n\r\n            //var message = AssociatedObject.DataContext as TLMessage;\r\n            //if (message != null)\r\n            //{\r\n            //    TLUtils.WriteLine(string.Format(\"SelectionsBehavior.OnLoaded {0} {1}\", message.Index, message.Message), LogSeverity.Error);\r\n            //}\r\n            //else\r\n            //{\r\n            //    TLUtils.WriteLine(string.Format(\"SelectionsBehavior.OnLoaded {0}\", \"null\"), LogSeverity.Error);\r\n            //}\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            AssociatedObject.Loaded -= AssociatedObject_OnLoaded;\r\n\r\n            base.OnDetaching();\r\n        }\r\n    }\r\n\r\n    public class NewSelectionBehavior : Behavior<FrameworkElement>\r\n    {\r\n        public static readonly DependencyProperty IsSelectionEnabledProperty = DependencyProperty.Register(\r\n            \"IsSelectionEnabled\", typeof(bool), typeof(NewSelectionBehavior), new PropertyMetadata(default(bool), OnSelectionChanged));\r\n\r\n        private static void OnSelectionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var behavior = d as NewSelectionBehavior;\r\n            if (behavior != null && behavior.AssociatedObject != null)\r\n            {\r\n                if ((bool)e.NewValue)\r\n                {\r\n                    //behavior.AssociatedObject.CacheMode = behavior.AssociatedObject.CacheMode ?? new BitmapCache();\r\n\r\n                    var storyboard = new Storyboard();\r\n                    if (!(behavior.AssociatedObject.RenderTransform is CompositeTransform))\r\n                    {\r\n                        behavior.AssociatedObject.RenderTransform = new CompositeTransform();\r\n                    }\r\n                    var translateXAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    translateXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -68.0 });\r\n                    translateXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.55), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                    Storyboard.SetTarget(translateXAnimation, behavior.AssociatedObject);\r\n                    Storyboard.SetTargetProperty(translateXAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n                    storyboard.Children.Add(translateXAnimation);\r\n\r\n                    //behavior.AssociatedObject.Visibility = Visibility.Visible;\r\n                    storyboard.Begin();\r\n                    //Deployment.Current.Dispatcher.BeginInvoke(() => storyboard.Begin());\r\n                }\r\n                else\r\n                {\r\n                    var storyboard = new Storyboard();\r\n                    if (!(behavior.AssociatedObject.RenderTransform is CompositeTransform))\r\n                    {\r\n                        behavior.AssociatedObject.RenderTransform = new CompositeTransform();\r\n                    }\r\n                    var translateXAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    translateXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n                    translateXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.55), Value = -68.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                    Storyboard.SetTarget(translateXAnimation, behavior.AssociatedObject);\r\n                    Storyboard.SetTargetProperty(translateXAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n                    storyboard.Children.Add(translateXAnimation);\r\n\r\n                    //behavior.AssociatedObject.Visibility = Visibility.Visible;\r\n                    storyboard.Begin();\r\n                    //Deployment.Current.Dispatcher.BeginInvoke(() => storyboard.Begin());\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return (bool)GetValue(IsSelectionEnabledProperty); }\r\n            set { SetValue(IsSelectionEnabledProperty, value); }\r\n        }\r\n\r\n        protected override void OnAttached()\r\n        {\r\n            AssociatedObject.Loaded += AssociatedObject_OnLoaded;\r\n\r\n            base.OnAttached();\r\n        }\r\n\r\n        private void AssociatedObject_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var transform = AssociatedObject.RenderTransform as CompositeTransform;\r\n            if (transform != null)\r\n            {\r\n                transform.TranslateX = IsSelectionEnabled ? 0.0 : -68.0;\r\n            }\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            AssociatedObject.Loaded -= AssociatedObject_OnLoaded;\r\n\r\n            base.OnDetaching();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Behaviors/ThemeToStateBehavior.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Interactivity;\r\n\r\nnamespace TelegramClient.Behaviors\r\n{\r\n    public class ThemeToStateBehavior : Behavior<Control>\r\n    {\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n            Dispatcher.BeginInvoke(() =>  VisualStateManager.GoToState(AssociatedObject, isLightTheme ? LightState : DarkState, true));\r\n        }\r\n\r\n        [CustomPropertyValueEditor(CustomPropertyValueEditor.StateName)]\r\n        public string LightState { get; set; }\r\n\r\n        [CustomPropertyValueEditor(CustomPropertyValueEditor.StateName)]\r\n        public string DarkState { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Behaviors/ToggleSwitchLocalizedContentBehavior.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Interactivity;\r\nusing Microsoft.Phone.Controls;\r\n\r\nnamespace TelegramClient.Behaviors\r\n{\r\n    public class ToggleSwitchLocalizedContentBehavior : Behavior<ToggleSwitch>\r\n    {\r\n        public static readonly DependencyProperty OnContentProperty =\r\n            DependencyProperty.Register(\"OnContent\", typeof (string), typeof (ToggleSwitchLocalizedContentBehavior), new PropertyMetadata(default(string)));\r\n\r\n        public string OnContent\r\n        {\r\n            get { return (string) GetValue(OnContentProperty); }\r\n            set { SetValue(OnContentProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty OffContentProperty =\r\n            DependencyProperty.Register(\"OffContent\", typeof (string), typeof (ToggleSwitchLocalizedContentBehavior), new PropertyMetadata(default(string)));\r\n\r\n        public string OffContent\r\n        {\r\n            get { return (string) GetValue(OffContentProperty); }\r\n            set { SetValue(OffContentProperty, value); }\r\n        }\r\n\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n\r\n            AssociatedObject.Loaded += ToggleSwitch_Click;\r\n            //AssociatedObject.Click += ToggleSwitch_Click;\r\n            AssociatedObject.Checked += ToggleSwitch_Click;\r\n            AssociatedObject.Unchecked += ToggleSwitch_Click;\r\n        }\r\n\r\n        private void ToggleSwitch_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            AssociatedObject.Content = AssociatedObject.IsChecked == true ? OnContent : OffContent;\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            AssociatedObject.Unchecked -= ToggleSwitch_Click;\r\n            AssociatedObject.Checked -= ToggleSwitch_Click;\r\n            //AssociatedObject.Click -= ToggleSwitch_Click;\r\n            AssociatedObject.Loaded -= ToggleSwitch_Click;\r\n\r\n            base.OnDetaching();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Behaviors/UpdateTextBindingBehavior.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Interactivity;\r\nusing TelegramClient.Views.Controls;\r\n\r\nnamespace TelegramClient.Behaviors\r\n{\r\n    public class UpdateTextBindingBehavior : Behavior<TextBox>\r\n    {\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n\r\n            AssociatedObject.TextChanged += AssociatedObject_TextChanged;\r\n        }\r\n\r\n        private void AssociatedObject_TextChanged(object sender, TextChangedEventArgs textChangedEventArgs)\r\n        {\r\n            var binding = AssociatedObject.GetBindingExpression(TextBox.TextProperty);\r\n            if (binding != null) binding.UpdateSource();\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            AssociatedObject.TextChanged -= AssociatedObject_TextChanged;\r\n\r\n            base.OnDetaching();\r\n        }\r\n    }\r\n\r\n    public class UpdatePasswordBindingBehavior : Behavior<PasswordBox>\r\n    {\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n\r\n            AssociatedObject.PasswordChanged += AssociatedObject_PasswordChanged;\r\n        }\r\n\r\n        private void AssociatedObject_PasswordChanged(object sender, RoutedEventArgs e)\r\n        {\r\n            var binding = AssociatedObject.GetBindingExpression(PasswordBox.PasswordProperty);\r\n            if (binding != null) binding.UpdateSource();\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            AssociatedObject.PasswordChanged -= AssociatedObject_PasswordChanged;\r\n\r\n            base.OnDetaching();\r\n        }\r\n    }\r\n\r\n    public class UpdateLabeledTextBindingBehavior : Behavior<LabeledTextBox>\r\n    {\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n\r\n            AssociatedObject.Input.TextChanged += AssociatedObject_TextChanged;\r\n        }\r\n\r\n        private void AssociatedObject_TextChanged(object sender, TextChangedEventArgs textChangedEventArgs)\r\n        {\r\n            AssociatedObject.Text = AssociatedObject.Input.Text;\r\n\r\n            var binding = AssociatedObject.GetBindingExpression(LabeledTextBox.TextProperty);\r\n            if (binding != null) binding.UpdateSource();\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            AssociatedObject.Input.TextChanged -= AssociatedObject_TextChanged;\r\n\r\n            base.OnDetaching();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Bootstrapper.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Microsoft.Phone.Networking.Voip;\r\nusing PhoneVoIPApp.UI;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services.DeviceInfo;\r\nusing Telegram.EmojiPanel;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Calls;\r\nusing TelegramClient.ViewModels.Payments;\r\n#if WP8\r\nusing Windows.Phone.System.Power;\r\n#endif\r\n#if WP81 && WNS_PUSH_SERVICE\r\nusing Windows.UI.Notifications;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Scheduler;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Connection;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.Services.Location;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing Telegram.Api.Transport;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Auth;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Debug;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Feed;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.ViewModels.Passport;\r\nusing TelegramClient.ViewModels.Search;\r\nusing EnterPasswordViewModel = TelegramClient.ViewModels.Passport.EnterPasswordViewModel;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing ExtensionMethods = Caliburn.Micro.ExtensionMethods;\r\n\r\nnamespace TelegramClient\r\n{\r\n    public class Bootstrapper : PhoneBootstrapperBase\r\n    {\r\n        public Bootstrapper()\r\n        {\r\n            //LogManager.GetLog = type => new DebugLog(type);\r\n            Initialize();\r\n            //System.Diagnostics.Debug.WriteLine(System.Reflection.Assembly.GetCallingAssembly().FullName);\r\n            //System.Diagnostics.Debug.WriteLine(Application.Current.GetType().Assembly);\r\n            //System.Diagnostics.Debug.WriteLine(System.AppDomain.CurrentDomain.FriendlyName);\r\n            //System.Diagnostics.Debug.WriteLine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase));\r\n        }\r\n\r\n        public static PhoneApplicationFrame PhoneFrame { get; protected set; }\r\n\r\n        protected override PhoneApplicationFrame CreatePhoneApplicationFrame()\r\n        {\r\n            //return new PhoneApplicationFrame();\r\n            PhoneFrame = new TelegramTransitionFrame{ Title = AppResources.Loading };\r\n            //PhoneFrame.Loaded += InitializeMTProtoService;\r\n\r\n            //PhoneFrame.FlowDirection = FlowDirection.RightToLeft;\r\n            PhoneFrame.UriMapper = new TelegramUriMapper();\r\n            //var stateService = IoC.Get<IStateService>();\r\n            //var background = stateService.CurrentBackground;\r\n            //var brush = new ImageBrush();\r\n            //PhoneFrame.Navigate(new Uri(\"/Views/ShellView.xaml\", UriKind.Relative));\r\n            //brush.ImageSource = new BitmapImage(new Uri(background, UriKind.Relative));\r\n\r\n            //frame.Background = brush;\r\n            return PhoneFrame;\r\n        }\r\n\r\n        private PhoneContainer _container;\r\n\r\n        protected override void Configure()\r\n        {\r\n            App.Log(\"start Bootstrapper.Configure \");\r\n            _container = new PhoneContainer();\r\n//            _container.Activated += instance =>\r\n//            {\r\n//#if DEBUG\r\n//                Debug.WriteLine(\"Bootstrapper.Activated \" + (instance != null ? instance.ToString() : \"null\"));\r\n//#endif\r\n//            };\r\n\r\n            if (!DesignerProperties.IsInDesignTool)\r\n            {\r\n                _container.RegisterPhoneServices(RootFrame);\r\n            }\r\n\r\n            _container.PerRequest<SecretContactDetailsViewModel>();\r\n            _container.PerRequest<SecretMediaViewModel>();\r\n            _container.PerRequest<SecretContactViewModel>();\r\n            \r\n\r\n            _container.Singleton<ShellViewModel>();\r\n            _container.Singleton<DialogsViewModel>();\r\n            _container.Singleton<ContactsViewModel>();\r\n\r\n            _container.Singleton<LogViewModel>();\r\n#if DEBUG\r\n            _container.Singleton<DebugViewModel>();\r\n            _container.Singleton<LongPollViewModel>();\r\n            _container.Singleton<PerformanceViewModel>();\r\n#endif\r\n            _container.PerRequest<EncryptionKeyViewModel>();\r\n            _container.PerRequest<AboutViewModel>();\r\n            _container.PerRequest<CacheViewModel>();\r\n            _container.PerRequest<StartupViewModel>();\r\n            _container.PerRequest<SignInViewModel>();\r\n            _container.PerRequest<SignUpViewModel>();\r\n            _container.PerRequest<ConfirmViewModel>();\r\n            _container.PerRequest<ContactViewModel>();\r\n            _container.PerRequest<ContactInfoViewModel>();\r\n            _container.PerRequest<ChatViewModel>();\r\n            _container.PerRequest<AddChatParticipantViewModel>();\r\n            _container.PerRequest<AddChannelManagerViewModel>();\r\n            _container.PerRequest<AddSecretChatParticipantViewModel>();\r\n            _container.PerRequest<EditChatViewModel>();\r\n            _container.PerRequest<EditContactViewModel>();\r\n            _container.PerRequest<EditCurrentUserViewModel>();\r\n            _container.PerRequest<EditUsernameViewModel>();\r\n            _container.PerRequest<EditPhoneNumberViewModel>();\r\n            _container.PerRequest<ChangePhoneNumberViewModel>();\r\n            _container.PerRequest<MediaViewModel<TLUserBase>>();\r\n            _container.PerRequest<MediaViewModel<TLChatBase>>();\r\n            _container.PerRequest<MediaViewModel<IInputPeer>>();\r\n            _container.PerRequest<FullMediaViewModel>();\r\n            _container.PerRequest<LinksViewModel<TLUserBase>>();\r\n            _container.PerRequest<LinksViewModel<TLChatBase>>();\r\n            _container.PerRequest<LinksViewModel<IInputPeer>>();\r\n            _container.PerRequest<FilesViewModel<TLUserBase>>();\r\n            _container.PerRequest<FilesViewModel<TLChatBase>>();\r\n            _container.PerRequest<FilesViewModel<IInputPeer>>();\r\n            _container.PerRequest<MusicViewModel<TLUserBase>>();\r\n            _container.PerRequest<MusicViewModel<TLChatBase>>();\r\n            _container.PerRequest<MusicViewModel<IInputPeer>>();\r\n            _container.PerRequest<ImageViewerViewModel>();\r\n            _container.PerRequest<AnimatedImageViewerViewModel>();\r\n            _container.PerRequest<DecryptedImageViewerViewModel>();\r\n            _container.PerRequest<ProfilePhotoViewerViewModel>();\r\n            _container.PerRequest<ShareViewModel>();\r\n            _container.PerRequest<DialogDetailsViewModel>();\r\n            _container.PerRequest<SecretDialogDetailsViewModel>();\r\n            _container.PerRequest<CreateDialogViewModel>();\r\n            _container.PerRequest<CreateBroadcastViewModel>();\r\n            _container.PerRequest<CreateChannelStep1ViewModel>();\r\n            _container.PerRequest<CreateChannelStep2ViewModel>();\r\n            _container.PerRequest<CreateChannelStep3ViewModel>();\r\n            _container.PerRequest<ChooseParticipantsViewModel>();\r\n            _container.PerRequest<SettingsViewModel>();\r\n            _container.PerRequest<NotificationsViewModel>();\r\n            _container.PerRequest<BlockedContactsViewModel>();\r\n            _container.PerRequest<ChooseBackgroundViewModel>();\r\n            _container.PerRequest<ChooseAttachmentViewModel>();\r\n            _container.PerRequest<AskQuestionConfirmationViewModel>();\r\n            _container.PerRequest<AddChatParticipantConfirmationViewModel>();\r\n            _container.PerRequest<MapViewModel>();\r\n            _container.PerRequest<SearchShellViewModel>();\r\n            _container.PerRequest<SearchDialogsViewModel>();\r\n            _container.PerRequest<SearchMessagesViewModel>();\r\n            _container.PerRequest<DialogSearchMessagesViewModel>();\r\n            _container.PerRequest<SearchContactsViewModel>();\r\n            _container.PerRequest<SearchFilesViewModel>();\r\n            _container.PerRequest<SearchLinksViewModel>();\r\n            _container.PerRequest<SearchMusicViewModel>();\r\n            _container.PerRequest<SearchViewModel>();\r\n            _container.PerRequest<ShareContactViewModel>();\r\n            _container.PerRequest<VideoPlayerViewModel>();\r\n            _container.PerRequest<LastSeenViewModel>();\r\n            _container.PerRequest<SecretChatsViewModel>();\r\n            _container.PerRequest<GroupsViewModel>();\r\n            _container.PerRequest<PrivacySecurityViewModel>();\r\n            _container.PerRequest<AccountSelfDestructsViewModel>();\r\n            _container.PerRequest<AllowUsersViewModel>();\r\n            _container.PerRequest<ChooseTTLViewModel>();\r\n            _container.PerRequest<ChooseNotificationSpanViewModel>();\r\n            _container.PerRequest<MessageViewerViewModel>();\r\n            _container.PerRequest<FastDialogDetailsViewModel>();\r\n            _container.PerRequest<FeaturedStickersViewModel>();\r\n            _container.PerRequest<ArchivedStickersViewModel>();\r\n            _container.PerRequest<CallsPrivacyViewModel>();\r\n\r\n            _container.PerRequest<PasscodeViewModel>();\r\n            _container.PerRequest<ChangePasscodeViewModel>();\r\n            _container.PerRequest<EnterPasscodeViewModel>();\r\n            _container.PerRequest<LockscreenViewModel>();\r\n\r\n            _container.PerRequest<ConfirmPasswordViewModel>();\r\n            _container.PerRequest<PasswordViewModel>();\r\n            _container.PerRequest<ChangePasswordViewModel>();\r\n            _container.PerRequest<ChangePasswordHintViewModel>();\r\n            _container.PerRequest<ChangePasswordEmailViewModel>();\r\n            _container.PerRequest<ViewModels.Additional.EnterPasswordViewModel>();\r\n            _container.PerRequest<PasswordRecoveryViewModel>();\r\n            _container.PerRequest<CancelConfirmResetViewModel>();\r\n            _container.PerRequest<ResetAccountViewModel>();\r\n            _container.PerRequest<FeedViewModel>();\r\n            _container.PerRequest<ShareContactDetailsViewModel>();\r\n\r\n            //_container.PerRequest<FastDialogDetailsViewModel>();\r\n\r\n            _container.PerRequest<SessionsViewModel>();\r\n\r\n#if WP81\r\n            _container.PerRequest<EditVideoViewModel>();\r\n#endif\r\n            _container.PerRequest<ChooseCountryViewModel>();\r\n            _container.PerRequest<VideoCaptureViewModel>();\r\n            _container.PerRequest<PrivacyStatementViewModel>();\r\n            _container.PerRequest<ChooseDialogViewModel>();\r\n            _container.PerRequest<SnapshotsViewModel>();\r\n            _container.PerRequest<UsernameHintsViewModel>();\r\n            _container.PerRequest<HashtagHintsViewModel>();\r\n            _container.PerRequest<InlineBotResultsViewModel>();\r\n            _container.PerRequest<UserActionViewModel>();\r\n            _container.PerRequest<PinnedMessageViewModel>();\r\n            _container.PerRequest<ImageEditorViewModel>();\r\n#if WP8\r\n            _container.PerRequest<MultiImageEditorViewModel>();\r\n#endif\r\n            _container.PerRequest<InviteLinkViewModel>();\r\n            _container.PerRequest<SearchVenuesViewModel>();\r\n            _container.PerRequest<StickersViewModel>();\r\n            _container.PerRequest<SecretChatDebugViewModel>();\r\n            _container.PerRequest<CommandHintsViewModel>();\r\n            _container.PerRequest<DialogSearchMessagesViewModel>();\r\n            _container.PerRequest<ChannelAdministratorsViewModel>();\r\n            _container.PerRequest<ChannelMembersViewModel>();\r\n            _container.PerRequest<ChannelIntroViewModel>();\r\n            _container.PerRequest<AddAdminsViewModel>();\r\n            _container.PerRequest<ChannelBlockedContactsViewModel>();\r\n            _container.PerRequest<ChatSettingsViewModel>();\r\n            _container.PerRequest<ClearCacheSettingsViewModel>();\r\n            _container.PerRequest<ConvertToSupergroupViewModel>();\r\n            _container.PerRequest<MassDeleteReportSpamViewModel>();\r\n            _container.PerRequest<EditGroupTypeViewModel>();\r\n            _container.PerRequest<StickerHintsViewModel>();\r\n            _container.PerRequest<WebViewModel>();\r\n            _container.PerRequest<MasksViewModel>();\r\n            _container.PerRequest<GroupsInCommonViewModel>();\r\n            _container.PerRequest<WebCardInfoViewModel>();\r\n            _container.PerRequest<WebVerificationViewModel>();\r\n            _container.PerRequest<CardInfoViewModel>();\r\n            _container.PerRequest<SavedCardInfoViewModel>();\r\n            _container.PerRequest<ShippingInfoViewModel>();\r\n            _container.PerRequest<ShippingMethodViewModel>();\r\n            _container.PerRequest<CheckoutViewModel>();\r\n            _container.PerRequest<CallsViewModel>();\r\n            _container.PerRequest<CameraViewModel>();\r\n            _container.PerRequest<PhotoPickerViewModel>();\r\n            _container.PerRequest<ProxyViewModel>();\r\n            _container.PerRequest<CallsSecurityViewModel>();\r\n            _container.PerRequest<BioViewModel>();\r\n            _container.PerRequest<EmojiHintsViewModel>();\r\n            _container.PerRequest<GroupStickersViewModel>();\r\n            _container.PerRequest<PasswordEmailViewModel>();\r\n            _container.PerRequest<LiveLocationBadgeViewModel>();\r\n            _container.PerRequest<LoggedInViewModel>();\r\n            _container.PerRequest<PassportViewModel>();\r\n            _container.PerRequest<PersonalDetailsViewModel>();\r\n            _container.PerRequest<ResidentialAddressViewModel>();\r\n            _container.PerRequest<PhoneNumberViewModel>();\r\n            _container.PerRequest<PhoneNumberCodeViewModel>();\r\n            _container.PerRequest<EmailViewModel>();\r\n            _container.PerRequest<EmailCodeViewModel>();\r\n            _container.PerRequest<EnterPasswordViewModel>();\r\n            _container.PerRequest<ProxyListViewModel>();\r\n            _container.PerRequest<ContactsSecurityViewModel>();\r\n            _container.PerRequest<SearchSharedContactsViewModel>();\r\n            _container.PerRequest<PassportSettingsViewModel>();\r\n            _container.PerRequest<PasswordIntroViewModel>();\r\n\r\n            _container.Singleton<IVoIPService, VoIPService>();\r\n            _container.Singleton<ITelegramEventAggregator, TelegramEventAggregator>();\r\n            _container.Singleton<IConnectionService, ConnectionService>();\r\n            _container.Singleton<ICommonErrorHandler, CommonErrorHandler>();\r\n            _container.Singleton<IMTProtoService, MTProtoService>();\r\n            _container.Singleton<IStateService, StateService>();\r\n            _container.Singleton<ITransport, HttpTransport>();\r\n            _container.Singleton<ICacheService, InMemoryCacheService>();\r\n            _container.Singleton<IUpdatesService, UpdatesService>();\r\n            _container.Singleton<IFileManager, FileManager>();\r\n            _container.Singleton<IVideoFileManager, VideoFileManager>();\r\n            _container.Singleton<IEncryptedFileManager, EncryptedFileManager>();\r\n            _container.Singleton<IUploadFileManager, UploadFileManager>();\r\n            _container.Singleton<ITransportService, TransportService>();\r\n            _container.Singleton<IProxyChecker, ProxyChecker>();\r\n\r\n            _container.Singleton<IDeviceInfoService, PhoneInfoService>();\r\n            _container.Singleton<IExtendedDeviceInfoService, PhoneInfoService>();\r\n\r\n#if WP81 && WNS_PUSH_SERVICE\r\n            _container.Singleton<IPushService, WNSPushService>();\r\n            _container.Singleton<IWindowsPhoneStoreUpdateService, WindowsPhoneStoreUpdateService>();\r\n#else\r\n            _container.Singleton<IPushService, PushService>();\r\n#endif\r\n            _container.Singleton<IHttpDocumentFileManager, HttpDocumentFileManager>();\r\n            _container.Singleton<IUploadVideoFileManager, UploadVideoFileManager>();\r\n            _container.Singleton<IDocumentFileManager, DocumentFileManager>();\r\n            _container.Singleton<IAudioFileManager, AudioFileManager>();\r\n            _container.Singleton<IUploadAudioFileManager, UploadAudioFileManager>();\r\n            _container.Singleton<IUploadDocumentFileManager, UploadDocumentFileManager>();\r\n            _container.Singleton<IUploadService, UploadService>();\r\n            _container.Singleton<ILiveLocationService, LiveLocationService>();\r\n            _container.Singleton<IPublicConfigService, PublicConfigService>();\r\n            _container.Singleton<IWindowsPhoneStoreUpdateService, WindowsPhoneStoreUpdateService>();\r\n            _container.Singleton<IWebFileManager, WebFileManager>();\r\n\r\n            SetupViewLocator();\r\n\r\n            // avoid xaml ui designer crashes \r\n            if (Caliburn.Micro.Execute.InDesignMode) return;\r\n\r\n            StartBugsenseAsync();\r\n            AddCustomConventions();\r\n\r\n            App.Log(\"end Bootstrapper.Configure\");\r\n        }\r\n\r\n        protected override void OnUnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)\r\n        {\r\n            base.OnUnhandledException(sender, e);\r\n\r\n            \r\n\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"Unhandled exception \" + e);\r\n#endif\r\n\r\n            e.Handled = true;\r\n        }\r\n\r\n        private static void AddCustomConventions()\r\n        {\r\n            // App Bar Conventions\r\n\r\n            // ... the rest of your conventions\r\n        }\r\n\r\n        protected override object GetInstance(Type service, string key)\r\n        {\r\n            object instance = null;\r\n            var stopwatch = Stopwatch.StartNew();\r\n            //App.Log(\"  Bootstrapper.GetInstance start \" + (service != null ? service.ToString() : \"null\") + \" \" + stopwatch.Elapsed);\r\n            instance = _container.GetInstance(service, key);\r\n            //App.Log(\"  Bootstrapper.GetInstance stop \" + (service != null ? service.ToString() : \"null\") + \" \" + stopwatch.Elapsed);\r\n\r\n            return instance;\r\n        }\r\n\r\n        protected override IEnumerable<object> GetAllInstances(Type service)\r\n        {\r\n            return _container.GetAllInstances(service);\r\n        }\r\n\r\n        protected override void BuildUp(object instance)\r\n        {\r\n            _container.BuildUp(instance);\r\n        }\r\n\r\n        protected override void OnStartup(object sender, StartupEventArgs e)\r\n        {\r\n            Telegram.Logs.Log.Write(\"Startup\");\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"App startup \");\r\n#endif\r\n\r\n            base.OnStartup(sender, e);\r\n        }\r\n\r\n        protected override void OnLaunch(object sender, LaunchingEventArgs e)\r\n        {\r\n\r\n            App.Log(\"start Bootstrapper.OnLaunch \");\r\n\r\n            Telegram.Logs.Log.Write(\"\\nLaunch\");\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"App launch\");\r\n#endif\r\n            EnterAppMutex();\r\n\r\n            App.Log(\"Bootstrapper.OnLaunch EnterAppMutex\");\r\n            //var cacheService = IoC.Get<ICacheService>();\r\n            //cacheService.Init();\r\n\r\n            App.Log(\"Bootstrapper.OnLaunch cacheService.Init\");\r\n            var transportService = IoC.Get<ITransportService>();\r\n            transportService.TransportConnecting += OnTransportConnecting;\r\n            transportService.TransportConnected += OnTransportConnected;\r\n\r\n            TLUtils.WritePerformance(\">>OnLaunch\");\r\n\r\n            App.Log(\"Bootstrapper.OnLaunch transportService\");\r\n            LoadStateAndUpdateAsync();\r\n\r\n            App.Log(\"Bootstrapper.OnLaunch LoadStateAndUpdateAsync\");\r\n            ShowBatterySaverAlertAsync();\r\n\r\n            App.Log(\"Bootstrapper.OnLaunch ShowBatterySaverAlertAsync\");\r\n            StartAgent();\r\n\r\n            App.Log(\"Bootstrapper.OnLaunch StartAgent\");\r\n            SetInitTextScaleFactor();\r\n\r\n            App.Log(\"Bootstrapper.OnLaunch SetInitTextScaleFactor\");\r\n#if WP81\r\n            var shareTargetLaunch = e as ShareLaunchingEventArgs;\r\n            if (shareTargetLaunch != null)\r\n            {\r\n                (App.Current as App).ShareOperation = shareTargetLaunch.ShareTargetActivatedEventArgs.ShareOperation;\r\n            }\r\n#endif\r\n\r\n            base.OnLaunch(sender, e);\r\n            App.Log(\"end Bootstrapper.OnLaunch\");\r\n        }\r\n\r\n        protected override void OnActivate(object sender, ActivatedEventArgs e)\r\n        {\r\n\r\n            Telegram.Logs.Log.Write(\"Activate\");\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"App activate IsAppInstancePreserved=\" + e.IsApplicationInstancePreserved);\r\n#endif\r\n            EnterAppMutex();\r\n            CheckPasscode();\r\n\r\n            if (!e.IsApplicationInstancePreserved)\r\n            {\r\n                var cacheService = IoC.Get<ICacheService>();\r\n                cacheService.Init();\r\n                Execute.ShowDebugMessage(\"Init database\");\r\n            }\r\n\r\n            TLUtils.WritePerformance(\">>OnActivate IsAppInstancePreserved \" + e.IsApplicationInstancePreserved);\r\n\r\n            LoadStateAndUpdateAsync();\r\n\r\n            ShowBatterySaverAlertAsync();\r\n\r\n            CheckTextScaleFactorAsync();\r\n\r\n            base.OnActivate(sender, e);\r\n        }\r\n\r\n        private void OnTransportConnected(object sender, TransportEventArgs e)\r\n        {\r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n            if (mtProtoService != null)\r\n            {\r\n                var transport = e.Transport;\r\n                if (transport == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                if (transport.MTProtoType != MTProtoTransportType.Main)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                mtProtoService.SetMessageOnTime(0.0, string.Empty);\r\n            }\r\n        }\r\n\r\n        private void OnTransportConnecting(object sender, TransportEventArgs e)\r\n        {\r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n            if (mtProtoService != null)\r\n            {\r\n                var transport = e.Transport;\r\n\r\n                if (transport == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                if (transport.MTProtoType != MTProtoTransportType.Main)\r\n                {\r\n                    return;\r\n                }\r\n\r\n#if DEBUG\r\n                var proxy =\r\n                    transport.ProxyConfig != null\r\n                    && transport.ProxyConfig.IsEnabled.Value\r\n                    && !transport.ProxyConfig.IsEmpty\r\n                    ? transport.ProxyConfig.GetProxy()\r\n                    : null;\r\n\r\n                var transportIdString = string.Format(\"({0} {1}_{2}{3})\", transport.Id, transport.DCId, transport.ActualHost, proxy != null ? \"_\" + proxy.Server : \"\");\r\n#else\r\n                var transportIdString = string.Empty;\r\n#endif\r\n\r\n                var proxyConfig = transport.ProxyConfig;\r\n                if (proxyConfig != null && proxyConfig.IsEnabled.Value && !proxyConfig.IsEmpty)\r\n                {\r\n                    mtProtoService.SetMessageOnTime(25.0, string.Format(\"{0}{1}...\", AppResources.ConnectingToProxy, transportIdString));\r\n                }\r\n                else\r\n                {\r\n                    mtProtoService.SetMessageOnTime(25.0, string.Format(\"{0}{1}...\", AppResources.Connecting, transportIdString));\r\n                }\r\n            }\r\n        }\r\n\r\n        protected override void OnClose(object sender, ClosingEventArgs e)\r\n        {\r\n            var updatesService = IoC.Get<IUpdatesService>();\r\n\r\n            Telegram.Logs.Log.Write(\"Close state=\" + updatesService.GetState());\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"App close\");\r\n#endif\r\n            ReleaseAppMutex();\r\n            //BackgroundProcessController.Instance.CallController.StartMTProtoUpdater();\r\n            try\r\n            {\r\n                if (BackgroundProcessController.Instance.CallController != null)\r\n                {\r\n                    BackgroundProcessController.Instance.CallController.SetStatusCallback(null);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                TLUtils.WriteException(\"OnDeactivate\", ex);\r\n            }\r\n            BackgroundProcessController.Instance.DisconnectUi();\r\n\r\n            UpdateMainTile();\r\n\r\n            if (PasscodeUtils.IsEnabled)\r\n            {\r\n                var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                if (frame != null && !frame.IsLockScreenOpen())\r\n                {\r\n                    PasscodeUtils.CloseTime = DateTime.Now;\r\n                }\r\n            }\r\n\r\n            var cacheService = IoC.Get<ICacheService>();\r\n            cacheService.TryCommit();\r\n\r\n            updatesService.SaveState();\r\n\r\n            var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n            if (isAuthorized)\r\n            {\r\n                var mtProtoService = IoC.Get<IMTProtoService>();\r\n                mtProtoService.UpdateStatusAsync(new TLBool(true), result => CloseTransport());\r\n            }\r\n            else\r\n            {\r\n                CloseTransport();\r\n            }\r\n\r\n            base.OnClose(sender, e);\r\n        }\r\n\r\n#if WP8\r\n        private static readonly Mutex _appOpenMutex = new Mutex(false, Telegram.Api.Constants.TelegramMessengerMutexName);\r\n#endif\r\n\r\n        private static bool EnterAppMutex()\r\n        {\r\n#if WP8\r\n            return _appOpenMutex.WaitOne();\r\n#endif\r\n\r\n            return true;\r\n        }\r\n\r\n        private static void ReleaseAppMutex()\r\n        {\r\n#if WP8\r\n            _appOpenMutex.ReleaseMutex();\r\n#endif\r\n        }\r\n\r\n        private void CheckPasscode()\r\n        {\r\n            if (PasscodeUtils.IsLockscreenRequired)\r\n            {\r\n                var chooseFileInfo = ((App) Application.Current).ChooseFileInfo;\r\n                if (chooseFileInfo == null || DateTime.Now > chooseFileInfo.Time.AddSeconds(120.0))\r\n                {\r\n                    var frame = RootFrame as TelegramTransitionFrame;\r\n                    if (frame != null)\r\n                    {\r\n                        frame.OpenLockscreen();\r\n                    }\r\n                }\r\n            }\r\n\r\n            ((App) Application.Current).ChooseFileInfo = null;\r\n        }\r\n\r\n        private double _previousScaleFactor = 1.0;\r\n\r\n        private void CheckTextScaleFactorAsync()\r\n        {\r\n            var scaledText = Application.Current.Resources[\"ScaledText\"] as ScaledText;\r\n            if (scaledText != null)\r\n            {\r\n                if (scaledText.TextScaleFactor != _previousScaleFactor)\r\n                {\r\n                    _previousScaleFactor = scaledText.TextScaleFactor;\r\n                    BrowserNavigationService.FontScaleFactor = scaledText.TextScaleFactor;\r\n                    scaledText.NotifyOfPropertyChange(() => scaledText.TextScaleFactor);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SetInitTextScaleFactor()\r\n        {\r\n            var scaledText = Application.Current.Resources[\"ScaledText\"] as ScaledText;\r\n            if (scaledText != null)\r\n            {\r\n                BrowserNavigationService.FontScaleFactor = scaledText.TextScaleFactor;\r\n                _previousScaleFactor = scaledText.TextScaleFactor;\r\n            }\r\n        }\r\n\r\n        protected override void OnDeactivate(object sender, DeactivatedEventArgs args)\r\n        {\r\n            var updatesService = IoC.Get<IUpdatesService>();\r\n            Telegram.Logs.Log.Write(\"Deactivate state=\" + updatesService.GetState());\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"App deactivate\");\r\n#endif\r\n            ReleaseAppMutex();\r\n            //BackgroundProcessController.Instance.CallController.StartMTProtoUpdater();\r\n            try\r\n            {\r\n                if (BackgroundProcessController.Instance.CallController != null)\r\n                {\r\n                    BackgroundProcessController.Instance.CallController.SetStatusCallback(null);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                TLUtils.WriteException(\"OnDeactivate\", ex);\r\n            }\r\n            BackgroundProcessController.Instance.DisconnectUi();\r\n\r\n            UpdateMainTile();\r\n\r\n            var cacheService = IoC.Get<ICacheService>();\r\n            cacheService.TryCommit();\r\n\r\n            updatesService.SaveState();\r\n            updatesService.CancelUpdating();\r\n\r\n\r\n            \r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n            var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n            if (isAuthorized)\r\n            {\r\n                var manualResetEvent2 = new ManualResetEvent(false);\r\n                mtProtoService.UpdateStatusAsync(TLBool.True,\r\n                    result =>\r\n                    {\r\n                        manualResetEvent2.Set();\r\n                    },\r\n                    error =>\r\n                    {\r\n                        manualResetEvent2.Set();\r\n                    });\r\n                manualResetEvent2.WaitOne(200);\r\n\r\n                ((App) Application.Current).Offline = true;\r\n\r\n                if (PasscodeUtils.IsEnabled)\r\n                {\r\n                    var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                    if (frame != null && !frame.IsLockScreenOpen())\r\n                    {\r\n                        PasscodeUtils.CloseTime = DateTime.Now;\r\n                    }\r\n                }\r\n            }\r\n            //manualResetEvent2.WaitOne(20000);\r\n\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            ThreadPool.QueueUserWorkItem(state =>\r\n            {\r\n                try\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\"OnDeactivate MTProtoService.ClearHistory\");\r\n#endif\r\n                    mtProtoService.ClearHistory(\"OnDeactivate\", true);\r\n                }\r\n                catch (Exception e)\r\n                {\r\n                    TLUtils.WriteException(e);\r\n                }\r\n                finally\r\n                {\r\n                    manualResetEvent.Set();\r\n                }\r\n            });\r\n            manualResetEvent.WaitOne(5000);\r\n\r\n            base.OnDeactivate(sender, args);\r\n        }\r\n\r\n        private void ShowBatterySaverAlertAsync()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                if (!_showBatterySaverOnce)\r\n                {\r\n                    _showBatterySaverOnce = CheckBatterySaverState();\r\n                }\r\n            });\r\n        }\r\n\r\n        private bool _showBatterySaverOnce;\r\n\r\n        private bool CheckBatterySaverState()\r\n        {\r\n#if WP8\r\n            // The minimum phone version that supports the PowerSavingModeEnabled property\r\n            var targetVersion = new Version(8, 0, 10492);\r\n\r\n            //if (Environment.OSVersion.Version >= targetVersion)\r\n            {\r\n                // Use reflection to get the PowerSavingModeEnabled value\r\n                //var powerSaveEnabled = (bool) typeof(PowerManager).GetProperty(\"PowerSavingModeEnabled\").GetValue(null, null);\r\n                var powerSaveOn = PowerManager.PowerSavingMode == PowerSavingMode.On;\r\n                if (powerSaveOn)\r\n                {\r\n                    Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.BatterySaverModeAlert, AppResources.Warning, MessageBoxButton.OK));\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n#endif\r\n\r\n            return true;\r\n        }\r\n\r\n        private void LoadStateAndUpdateAsync()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                try\r\n                {\r\n                    BackgroundProcessController.Instance.ConnectUi();\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(\"LoadStateAndUpdateAsync 1\", ex);\r\n                }\r\n                //BackgroundProcessController.Instance.CallController.StopMTProtoUpdater();\r\n\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (!isAuthorized) return;\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    //MessageBox.Show(\"LoadStateAndUpdateAsync\");\r\n\r\n                    var mtProtoService = IoC.Get<IMTProtoService>();\r\n                    var stateService = IoC.Get<IStateService>();\r\n                    var updatesService = IoC.Get<IUpdatesService>();\r\n                    var voipService = IoC.Get<IVoIPService>();\r\n                    var liveLocationsService = IoC.Get<ILiveLocationService>();\r\n\r\n                    mtProtoService.CurrentUserId = new TLInt(stateService.CurrentUserId);\r\n                    updatesService.GetCurrentUserId = () => mtProtoService.CurrentUserId;\r\n                    updatesService.GetStateAsync = mtProtoService.GetStateAsync;\r\n                    updatesService.GetDHConfigAsync = mtProtoService.GetDHConfigAsync;\r\n                    updatesService.GetDifferenceAsync = mtProtoService.GetDifferenceAsync;\r\n                    updatesService.AcceptEncryptionAsync = mtProtoService.AcceptEncryptionAsync;\r\n                    updatesService.SendEncryptedServiceAsync = mtProtoService.SendEncryptedServiceAsync;\r\n                    updatesService.SetMessageOnTimeAsync = mtProtoService.SetMessageOnTime;\r\n                    updatesService.RemoveFromQueue = mtProtoService.RemoveFromQueue;\r\n                    updatesService.UpdateChannelAsync = mtProtoService.UpdateChannelAsync;\r\n                    updatesService.GetFullChatAsync = mtProtoService.GetFullChatAsync;\r\n                    updatesService.GetFullUserAsync = mtProtoService.GetFullUserAsync;\r\n                    updatesService.GetChannelMessagesAsync = mtProtoService.GetMessagesAsync;\r\n                    updatesService.GetPinnedDialogsAsync = mtProtoService.GetPinnedDialogsAsync;\r\n                    updatesService.GetMessagesAsync = mtProtoService.GetMessagesAsync;\r\n                    updatesService.GetPeerDialogsAsync = mtProtoService.GetPeerDialogsAsync;\r\n                    updatesService.GetPromoDialogAsync = mtProtoService.GetPromoDialogAsync;\r\n\r\n                    stateService.SuppressNotifications = true;\r\n\r\n                    long acceptedCallId = -1;\r\n                    try\r\n                    {\r\n                        if (BackgroundProcessController.Instance.CallController != null)\r\n                        {\r\n                            BackgroundProcessController.Instance.CallController.SetStatusCallback((VoIPService)voipService);\r\n                            acceptedCallId = BackgroundProcessController.Instance.CallController.AcceptedCallId;\r\n                            BackgroundProcessController.Instance.CallController.AcceptedCallId = -1;\r\n                            voipService.AcceptedCallId = acceptedCallId;\r\n                            if (acceptedCallId != -1)\r\n                            {\r\n                                BackgroundProcessController.Instance.CallController.EndCall();\r\n                            }\r\n                        }\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        TLUtils.WriteException(\"LoadStateAndUpdateAsync 2\", ex);\r\n                    }\r\n\r\n                    liveLocationsService.LoadAndUpdateAllAsync();\r\n\r\n                    var timer = Stopwatch.StartNew();\r\n                    TLUtils.WritePerformance(\">>UpdateService.LoadStateAndUpdate start\");\r\n                    //mtProtoService.SetMessageOnTime(60.0 * 5, AppResources.Updating + \"...\");\r\n                    updatesService.LoadStateAndUpdate(acceptedCallId,\r\n                        () =>\r\n                        {\r\n                            //mtProtoService.SetMessageOnTime(0.0, string.Empty);\r\n                            TLUtils.WritePerformance(\">>UpdateService.LoadStateAndUpdate stop \" + timer.Elapsed);\r\n                            stateService.SuppressNotifications = false;\r\n                        });\r\n                });\r\n            });\r\n        }\r\n\r\n        private void RestoreConnectionAsync()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (!isAuthorized) return;\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var mtProtoService = IoC.Get<IMTProtoService>();\r\n                    //mtProtoService.PingAsync(TLLong.Random(), result => { }, error => { });\r\n                    mtProtoService.UpdateStatusAsync(TLBool.False, result => { }, error => { });\r\n                });\r\n            });\r\n        }\r\n\r\n        private void CloseTransport()\r\n        {\r\n            var transportService = IoC.Get<ITransportService>();\r\n            transportService.Close();\r\n        }\r\n\r\n        public static void UpdateMainTile()\r\n        {\r\n#if WNS_PUSH_SERVICE\r\n            try\r\n            {\r\n                ToastNotificationManager.History.Clear();\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(\"ClearNotifications ex \" + ex);\r\n                Execute.ShowDebugMessage(\"Clear notifications history exception\\n\" + ex);\r\n            }\r\n\r\n            try\r\n            {\r\n                BadgeUpdateManager.CreateBadgeUpdaterForApplication().Clear();\r\n                TileUpdateManager.CreateTileUpdaterForApplication().Clear();\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(\"ClearTile ex \" + ex);\r\n                Execute.ShowDebugMessage(\"Clear tile exception\\n\" + ex);\r\n            }\r\n#else\r\n            // no way to clear toast history with MPNS\r\n            //try\r\n            //{\r\n            //    ToastNotificationManager.History.Clear();\r\n            //}\r\n            //catch (Exception ex)\r\n            //{\r\n            //    Telegram.Logs.Log.Write(\"ClearNotifications ex \" + ex);\r\n            //    Execute.ShowDebugMessage(\"Clear notifications history exception\\n\" + ex);\r\n            //}\r\n\r\n            var tile = ShellTile.ActiveTiles.FirstOrDefault();\r\n            if (tile == null) return;\r\n\r\n#if WP8\r\n            var tileData = new IconicTileData { Count = 0, WideContent1 = \"\", WideContent2 = \"\", WideContent3 = \"\" };\r\n#else\r\n            var tileData = new StandardTileData{ Count = 0 };\r\n#endif\r\n            try\r\n            { \r\n                tile.Update(tileData);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\"Tile.Update exception\\n\" + ex);\r\n            }\r\n#endif\r\n        }\r\n\r\n        private static void StartBugsenseAsync()\r\n        {\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(3.0), BugSenseWrapper.Init);\r\n        }\r\n\r\n        // The name of the incoming call task.\r\n        private const string incomingCallTaskName = \"PhoneVoIPApp.IncomingCallTask\";\r\n\r\n        public static void InitHttpNotificationTask()\r\n        {\r\n            try\r\n            {\r\n                // Obtain a reference to the existing task, if any.\r\n                var incomingCallTask = ScheduledActionService.Find(incomingCallTaskName) as VoipHttpIncomingCallTask;\r\n                if (incomingCallTask != null)\r\n                {\r\n                    if (incomingCallTask.IsScheduled == false)\r\n                    {\r\n                        // The incoming call task has been unscheduled due to OOM or throwing an unhandled exception twice in a row\r\n                        ScheduledActionService.Remove(incomingCallTaskName);\r\n                    }\r\n                    else\r\n                    {\r\n                        // The incoming call task has been scheduled and is still scheduled so there is nothing more to do\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                // Create a new incoming call task.\r\n                incomingCallTask = new VoipHttpIncomingCallTask(incomingCallTaskName, Constants.ToastNotificationChannelName);\r\n                incomingCallTask.Description = \"Incoming call task\";\r\n\r\n                foreach (var action in ScheduledActionService.GetActions<ScheduledAction>())\r\n                {\r\n                    ScheduledActionService.Remove(action.Name);\r\n                }\r\n\r\n                ScheduledActionService.Add(incomingCallTask);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(\"InitHttpNotificationTask ScheduledActionService.Add exception\\n\" + ex);\r\n            }\r\n        }\r\n\r\n        private static void StartAgent()\r\n        {\r\n            InitHttpNotificationTask();\r\n\r\n            return;\r\n\r\n            if (ScheduledActionService.Find(Constants.ScheduledAgentTaskName) != null)\r\n            {\r\n                ScheduledActionService.Remove(Constants.ScheduledAgentTaskName);\r\n            }\r\n\r\n            var task = new PeriodicTask(Constants.ScheduledAgentTaskName)\r\n            {\r\n                Description = AppResources.TileUpdaterTaskDescription\r\n            };\r\n\r\n            try\r\n            {\r\n                ScheduledActionService.Add(task);\r\n\r\n#if DEBUG\r\n            // If we're debugging, attempt to start the task immediately \r\n            // this break our service and updates\r\n            try\r\n            {\r\n                ScheduledActionService.LaunchForTest(Constants.ScheduledAgentTaskName, new TimeSpan(0, 0, 10));\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteException(e);\r\n            }\r\n#endif\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                TLUtils.WriteException(e);\r\n            }\r\n\r\n            //SettingsHelper.SetValue(Constants.UnreadCountKey, 0);\r\n\r\n        }\r\n\r\n        private static void SetupViewLocator()\r\n        {\r\n            ViewLocator.DeterminePackUriFromType = (viewModelType, viewType) =>\r\n            {\r\n                var assemblyName = ExtensionMethods.GetAssemblyName(viewType.Assembly);\r\n                var uri = viewType.FullName.Replace(assemblyName\r\n#if WP8 //NOTE: at WP8 project deafult assembly name TelegramClient.WP8 instead of TelegramClient at WP7\r\n.Replace(\".WP8\", string.Empty)\r\n#endif\r\n, string.Empty).Replace(\".\", \"/\") + \".xaml\";\r\n\r\n                if (!ExtensionMethods.GetAssemblyName(Application.Current.GetType().Assembly).Equals(assemblyName))\r\n                {\r\n                    return \"/\" + assemblyName + \";component\" + uri;\r\n                }\r\n\r\n                return uri;\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/CapabilityPlaceholder.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Microsoft.Xna.Framework.Audio;\r\n\r\nnamespace TelegramClient\r\n{\r\n    // In Windows Phone applications that use the CaptureSource class, \r\n    // you must also use the Microsoft.Devices.Camera, Microsoft.Devices.PhotoCamera, \r\n    // or Microsoft.Xna.Framework.Audio.Microphone class to enable audio capture \r\n    // and accurate capability detection in the application.\r\n\r\n    // Since this sample does not need any of these classes, this unused\r\n    // class prompts the Marketplace capability detection process to add the \r\n    // ID_CAP_MICROPHONE capability to the application capabilities list upon ingestion. \r\n\r\n    // For more information about capability detection, see: http://go.microsoft.com/fwlink/?LinkID=204620\r\n\r\n    public class CapabilityPlaceholder\r\n    {\r\n        Microphone unusedMic = null;\r\n\r\n        private string unusedMethod()\r\n        {\r\n            return unusedMic.ToString();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Commands.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient\r\n{\r\n    public class Commands\r\n    {\r\n        public const string LogOutCommand = \"LogOut\";\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Constants.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient\r\n{\r\n    static class Constants\r\n    {\r\n#if PRIVATE_BETA || DEBUG\r\n        public const string LogEmail = \"sms@telegram.org\";\r\n#else\r\n        public const string LogEmail = \"sms@telegram.org\";\r\n#endif\r\n        public const int TelegramNotificationsId = 777000;\r\n\r\n        public const string DefaultMeUrlPrefix = \"https://t.me/\";\r\n\r\n        public const string TelegramFaq = \"https://telegram.org/faq\";\r\n        public const string TelegramPrivacyPolicy = \"https://telegram.org/privacy\";\r\n        public const string TelegramShare = \"https://telegram.org/dl\";\r\n        public const string TelegramTroubleshooting = \"https://telegram.org/faq#troubleshooting\";\r\n\r\n        public const int VideoPreviewMaxSize = 90;//320;\r\n        public const int VideoPreviewQuality = 87;\r\n\r\n        public const int DocumentPreviewMaxSize = 90;\r\n        public const int DocumentPreviewQuality = 87;\r\n\r\n        public const int PhotoPreviewMaxSize = 90;\r\n        public const int PhotoPreviewQuality = 87;\r\n\r\n        public const string EmptyBackgroundString = \"Empty\";\r\n        public const string LibraryBackgroundString = \"Library\";\r\n        public const string AnimatedBackground1String = \"AnimatedBackground1\";\r\n\r\n        public const int MaximumMessageLength = 4096;\r\n\r\n        public const double GlueGeoPointsDistance = 50.0;\r\n\r\n        public const double DefaultMessageContentWidth = 323.0;\r\n        public const double DefaultMessageContentHeight = 150.0;\r\n        public const double MaxStickerDimension = 196.0;\r\n        public const double MaxGifDimension = 323.0;\r\n        public const double DeafultInlineBotResultHeight = 118.0;\r\n\r\n        public const int ShowHelpTimeInSeconds = 120;\r\n        public const int DialogsSlice = 20;\r\n        public const int MessagesSlice = 25;\r\n        public const string IsAuthorizedKey = \"IsAuthorized\";\r\n        public const string ConfigKey = \"Config\";\r\n        public const string CurrentUserKey = \"CurrentUser\";\r\n        public const string CurrentBackgroundKey = \"CurrentBackground\";\r\n        public const string SendByEnterKey = \"SendByEnter\";\r\n\r\n\r\n        public const string UnreadCountKey = \"UnreadCountKey\";\r\n        public const string SettingsKey = \"SettingsKey\";\r\n        public const string CommonNotifySettingsFileName = \"CommonNotifySettings.xml\";\r\n        public const string DelayedContactsFileName = \"PeopleHub.dat\";\r\n\r\n        public const string ScheduledAgentTaskName = \"TelegramScheduledAgent\";\r\n        public const string ToastNotificationChannelName = \"TelegramNotificationChannel\";\r\n\r\n        public const int MaxImportingContactsCount = 1300;\r\n        public static string StaticGoogleMap = \"https://maps.googleapis.com/maps/api/staticmap?center={0},{1}&zoom=16&size={2}x{3}&sensor=false&format=jpg&scale=2&language=en\";\r\n\r\n        public const double SetTypingIntervalInSeconds = 5.0;\r\n        public const int SendCallDefaultTimeout = 90;\r\n        public const int DefaultCodeLength = 5;\r\n        public const int DefaultForwardingMessagesCount = 50;\r\n        public const string ImportedPhonesFileName = \"importedPhones.dat\";\r\n        public const string CachedServerFilesFileName = \"cachedServerFiles.dat\";\r\n        public const string AllStickersFileName = \"allStickers.dat\";\r\n        public const string MasksFileName = \"masks.dat\";\r\n        public const string FeaturedStickersFileName = \"featuredStickers.dat\";\r\n        public const string RecentStickersFileName = \"recentStickers.dat\";\r\n        public const string ArchivedStickersFileName = \"archivedStickers.dat\";\r\n        public const string WallpapersFileName = \"wallpapers.dat\";\r\n\r\n        public const string TelegramFolderName = \"Telegram\";\r\n        public const int UsernameMinLength = 5;\r\n        public const int UsernameMaxLength = 32;\r\n        public const double GetAllStickersInterval = 60.0 * 60.0;     // 60 min\r\n\r\n        public const int FileSliceLength = 50;\r\n        public const int PhotoVideoSliceLength = 48;    // 4 preview * 12 rows\r\n\r\n        // FullHD\r\n        public const double FullHDAppBarHeight = 60.0;\r\n        public const double FullHDAppBarDifference = -12.0;\r\n\r\n        //qHD\r\n        public const double QHDAppBarHeight = 67.0;\r\n        public const double QHDAppBarDifference = -5.0;\r\n\r\n        public const double NotificationTimerInterval = 10.0;   // seconds\r\n        public const string SnapshotsDirectoryName = \"Snapshots\";\r\n\r\n        //passcode\r\n        public const string AppCloseTimeKey = \"AppCloseTime\";\r\n        public const string PasscodeKey = \"PasscodeEnabled\";\r\n        public const string IsSimplePasscodeKey = \"IsSimplePasscode\";\r\n        public const string IsPasscodeEnabledKey = \"IsPasscodeEnabled\";\r\n        public const string PasscodeAutolockKey = \"PasscodeAutolock\";\r\n        public const string PasscodeParamsFileName = \"passcode_params.dat\";\r\n        public const int PasscodeHashIterations = 1000;\r\n\r\n        //password\r\n        public const int PasswordRecoveryCodeLength = 6;\r\n\r\n        //passport\r\n        public const uint DefaultPassportImageSize = 2048;\r\n        public const uint MaxPassportFilesCount = 20;\r\n\r\n        //notifications\r\n        public const int WNSTokenType = 8;\r\n        public const int MPNSTokenType = 3;\r\n        public const int VoIPMPNSTokenType = 11;\r\n        public const int NotificationInterval = 15; // Interval to count notifications (seconds)\r\n        public const int UnmutedCount = 1; // Cont of notifications to show within interval \r\n\r\n        //unread messages\r\n        public const int MinUnreadCountToShowSeparator = 2;\r\n\r\n        //venues\r\n        public const string FoursquireCategoryIconUrl = @\"https://foursquare.com/img/categories_v2/{0}_{1}.png\";\r\n\r\n        //stickers\r\n        public const string AddStickersLinkPlaceholder = @\"https://t.me/addstickers/{0}\";\r\n\r\n        //usernames\r\n        public const string UsernameLinkPlaceholder = @\"https://t.me/{0}\";\r\n\r\n        //background tasks\r\n        public const string PushNotificationsBackgroundTaskName = \"PushNotificationsTask\";\r\n        public const string MessageSchedulerBackgroundTaskName = \"SchedulerTask\";\r\n        public const string TimerMessageSchedulerBackgroundTaskName = \"TimerSchedulerTask\";\r\n        public const string BackgroundDifferenceLoaderTaskName = \"BackgroundDifferenceLoader\";\r\n        public const string InteractiveNotificationsBackgroundTaskName = \"InteractiveNotificationsBackgroundTask\";\r\n\r\n        //message search\r\n        public const int SearchMessagesSliceLimit = 5;\r\n\r\n        //search\r\n        public const string RecentSearchResultsFileName = \"search_chats_recent.dat\";\r\n        public const string TopPeersFileName = \"top_peers.dat\";\r\n\r\n        //channels\r\n        public const string ChannelIntroFileName = \"channel_intro.dat\";\r\n\r\n        //photo\r\n        public const uint DefaultImageSize = 1280;\r\n\r\n        //chat settings\r\n        public const string ChatSettingsFileName = \"chat_settings.dat\";\r\n        public const string SuppressInlineBotsHintFileName = \"suppress_inline_bots_hint.dat\";\r\n\r\n        //contacts settings \r\n        public const string ContactsSettingsFileName = \"contacts_settings.dat\";\r\n\r\n        // services\r\n        public static int HttpDownloadersCount = 5;\r\n\r\n        public static int MinSecretChatWithStickersLayer = 23;\r\n        public static int MinSecretChatWithRepliesLayer = 45;\r\n        public static int MinSecretChatWithCaptionsLayer = 45;\r\n        public static int MinSecretChatWithVenuesLayer = 45;\r\n        public static int MinSecretChatWithInlineBotsLayer = 45;\r\n        public static int MinSecretChatWithExtendedKeyVisualizationLayer = 46;\r\n        public static int MinSecretChatWithAudioAsDocumentsLayer = 46;\r\n        public static int MinSecretChatWithRoundVideoLayer = 66;\r\n        public static int MinSecretChatWithGroupedMediaLayer = 73;\r\n\r\n        public const string InlineBotsNotificationFileName = \"inlinebots_notificaiton.dat\";\r\n        public const string WebPagePreviewsFileName = \"webpagepreviews_notificaiton.dat\";\r\n        public const int RecheckBotInlineGeoAccessInterval =\r\n#if DEBUG\r\n            10; // seconds\r\n#else\r\n            600; // seconds\r\n#endif\r\n\r\n        public const string SpambotUsername = \"spambot\";\r\n        public const string InlineBotsFileName = \"inline_bots.dat\";\r\n\r\n        // camera\r\n        public const string CameraSettingsFileName = \"camera_settings.dat\";\r\n\r\n        // photo picker\r\n        public const string PhotoPickerSettingsFileName = \"photo_picker_settings.dat\";\r\n\r\n        public const int DefaultTmpPasswordLifetime =\r\n#if DEBUG\r\n            60 * 5;\r\n#else\r\n            60 * 30;\r\n#endif\r\n        public const string TmpPasswordFileName = \"tmp_password.dat\";\r\n\r\n        public const string CallsSecurityFileName = \"calls_security.dat\";\r\n\r\n        public const string SavedCountFileName = \"saved_count.dat\";\r\n\r\n        public const int MinSetsToAddFavedSticker = 5;\r\n\r\n        public const double MinDistanceToUpdateLiveLocation = 20.0;\r\n\r\n        public const int MaxCacheCapacity = 50;\r\n        public const int MaxGroupedMediaCount = 10;\r\n\r\n        // update\r\n        public const string PreviewUpdateUri = \"ms-windows-store://pdp/?productid=9P0F9KC5TSTT\";\r\n        public const string UpdateUri = \"ms-windows-store://pdp/?productid=9WZDNCRDZHS0\";\r\n\r\n        public const string PassportConfigFileName = \"passport_config.dat\";\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Controls/BrowserNavigationService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Text;\r\nusing System.Text.RegularExpressions;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Devices;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views;\r\n\r\nnamespace Telegram.EmojiPanel\r\n{\r\n    public class TreeNode\r\n    {\r\n        public string Key { get; set; }\r\n\r\n        public Dictionary<string, TreeNode> Values { get; set; }\r\n\r\n        public bool IsEnded { get; set; }\r\n\r\n        public TreeNode(string key)\r\n        {\r\n            Key = key;\r\n            Values = new Dictionary<string, TreeNode>();\r\n        }\r\n    }\r\n\r\n    public static class Emoji\r\n    {\r\n        private static Dictionary<string, string> _dict;\r\n\r\n        public static Dictionary<string, string> Dict\r\n        {\r\n            get\r\n            {\r\n                if (_dict == null)\r\n                {\r\n                    InitializeDict();\r\n                }\r\n\r\n                return _dict;\r\n            }\r\n        }\r\n\r\n        private static Dictionary<string, string> _skinnedDict;\r\n\r\n        public static Dictionary<string, string> SkinnedDict\r\n        {\r\n            get\r\n            {\r\n                if (_skinnedDict == null)\r\n                {\r\n                    InitializeDict();\r\n                }\r\n\r\n                return _skinnedDict;\r\n            }\r\n        }\r\n\r\n        private static Dictionary<string, string> _joinedEmojiPartDict;\r\n\r\n        public static Dictionary<string, string> JoinedEmojiPartDict\r\n        {\r\n            get\r\n            {\r\n                if (_joinedEmojiPartDict == null)\r\n                {\r\n                    InitializeDict();\r\n                }\r\n\r\n                return _joinedEmojiPartDict;\r\n            }\r\n        }\r\n\r\n        private static TreeNode _joinedEmojiTree;\r\n\r\n        public static TreeNode JoinedEmojiTree\r\n        {\r\n            get\r\n            {\r\n                if (_joinedEmojiTree == null)\r\n                {\r\n                    InitializeDict();\r\n                }\r\n\r\n                return _joinedEmojiTree;\r\n            }\r\n        }\r\n\r\n        private static Dictionary<string, string> _skinsDict;\r\n\r\n        public static Dictionary<string, string> SkinsDict\r\n        {\r\n            get\r\n            {\r\n                if (_skinsDict == null)\r\n                {\r\n                    InitializeDict();\r\n                }\r\n\r\n                return _skinsDict;\r\n            }\r\n        }\r\n\r\n        private static Dictionary<string, string> _flagPrefixes;\r\n\r\n        public static Dictionary<string, string> FlagsPrefixes\r\n        {\r\n            get\r\n            {\r\n                if (_flagPrefixes == null)\r\n                {\r\n                    InitializeDict();\r\n                }\r\n\r\n                return _flagPrefixes;\r\n            }\r\n        }\r\n\r\n        public static string ZeroWidthJoiner = \"200D\";\r\n\r\n        public static string EmojiStyleVarianSelector = \"FE0F\";\r\n\r\n        public static string TextStyleVarianSelector = \"FE0E\";\r\n\r\n        private static void AddTreeNodes(TreeNode node, int index, params string[] values)\r\n        {\r\n            if (_dict == null) return;\r\n            if (index >= values.Length)\r\n            {\r\n                node.IsEnded = true;\r\n                return;\r\n            }\r\n\r\n            var key = values[index];\r\n            TreeNode internalNode;\r\n            if (node.Values.TryGetValue(key, out internalNode))\r\n            {\r\n                AddTreeNodes(internalNode, index + 1, values);\r\n            }\r\n            else\r\n            {\r\n                internalNode = new TreeNode(key);\r\n\r\n                node.Values[key] = internalNode;\r\n\r\n                AddTreeNodes(internalNode, index + 1, values);\r\n            }\r\n        }\r\n\r\n        private static void InitializeDict()\r\n        {\r\n            _dict = new Dictionary<string, string>();\r\n            _skinnedDict = new Dictionary<string, string>();\r\n            _skinsDict = new Dictionary<string, string>();\r\n            _joinedEmojiPartDict = new Dictionary<string, string>();\r\n            _joinedEmojiTree = new TreeNode(string.Empty);\r\n            _flagPrefixes = new Dictionary<string, string>();\r\n\r\n            _flagPrefixes[\"D83CDDE6\"] = \"D83CDDE6\";\r\n            _flagPrefixes[\"D83CDDE7\"] = \"D83CDDE7\";\r\n            _flagPrefixes[\"D83CDDE8\"] = \"D83CDDE8\";\r\n            _flagPrefixes[\"D83CDDE9\"] = \"D83CDDE9\";\r\n            _flagPrefixes[\"D83CDDEA\"] = \"D83CDDEA\";\r\n            _flagPrefixes[\"D83CDDEB\"] = \"D83CDDEB\";\r\n            _flagPrefixes[\"D83CDDEC\"] = \"D83CDDEC\";\r\n            _flagPrefixes[\"D83CDDED\"] = \"D83CDDED\";\r\n            _flagPrefixes[\"D83CDDEE\"] = \"D83CDDEE\";\r\n            _flagPrefixes[\"D83CDDEF\"] = \"D83CDDEF\";\r\n            _flagPrefixes[\"D83CDDF0\"] = \"D83CDDF0\";\r\n            _flagPrefixes[\"D83CDDF1\"] = \"D83CDDF1\";\r\n            _flagPrefixes[\"D83CDDF2\"] = \"D83CDDF2\";\r\n            _flagPrefixes[\"D83CDDF3\"] = \"D83CDDF3\";\r\n            _flagPrefixes[\"D83CDDF4\"] = \"D83CDDF4\";\r\n            _flagPrefixes[\"D83CDDF5\"] = \"D83CDDF5\";\r\n            _flagPrefixes[\"D83CDDF6\"] = \"D83CDDF6\";\r\n            _flagPrefixes[\"D83CDDF7\"] = \"D83CDDF7\";\r\n            _flagPrefixes[\"D83CDDF8\"] = \"D83CDDF8\";\r\n            _flagPrefixes[\"D83CDDF9\"] = \"D83CDDF9\";\r\n            _flagPrefixes[\"D83CDDFA\"] = \"D83CDDFA\";\r\n            _flagPrefixes[\"D83CDDFB\"] = \"D83CDDFB\";\r\n            _flagPrefixes[\"D83CDDFC\"] = \"D83CDDFC\";\r\n            _flagPrefixes[\"D83CDDFD\"] = \"D83CDDFD\";\r\n            _flagPrefixes[\"D83CDDFE\"] = \"D83CDDFE\";\r\n            _flagPrefixes[\"D83CDDFF\"] = \"D83CDDFF\";\r\n\r\n            _joinedEmojiPartDict[\"D83DDC69\"] = \"D83DDC69\";\r\n            _joinedEmojiPartDict[\"D83DDC68\"] = \"D83DDC68\";\r\n            _joinedEmojiPartDict[\"2764\"] = \"2764\";\r\n            _joinedEmojiPartDict[\"D83DDC8B\"] = \"D83DDC8B\";\r\n            _joinedEmojiPartDict[\"D83DDC66\"] = \"D83DDC66\";\r\n            _joinedEmojiPartDict[\"D83DDC67\"] = \"D83DDC67\";\r\n            _joinedEmojiPartDict[\"D83DDC41\"] = \"D83DDC41\";\r\n            _joinedEmojiPartDict[\"D83DDDE8\"] = \"D83DDDE8\";\r\n\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6E\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC3\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC6F\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"2764\", \"200D\", \"D83DDC8B\", \"200D\", \"D83DDC68\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"2764\", \"200D\", \"D83DDC68\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC67\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC66\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC67\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC67\", \"200D\", \"D83DDC67\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFB\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFC\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFD\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFE\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"D83CDFFF\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"2695\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"2696\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"2708\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"2764\", \"200D\", \"D83DDC8B\", \"200D\", \"D83DDC69\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"2764\", \"200D\", \"D83DDC69\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83CDF3E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83CDF73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83CDF93\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83CDFA4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83CDFA8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83CDFEB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83CDFED\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDC67\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDC66\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDC67\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDC67\", \"200D\", \"D83DDC67\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83DDCBB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83DDCBC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83DDD2C\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83DDD27\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83DDE80\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFB\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFC\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFD\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFE\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"D83CDFFF\", \"200D\", \"D83DDE92\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC71\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC73\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC77\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC81\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC82\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC86\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC87\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDD75\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4B\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4D\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE4E\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE45\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE46\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDE47\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB6\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD26\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD37\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"2764FE0F\", \"200D\", \"D83DDC69\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"2764FE0F\", \"200D\", \"D83DDC68\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"2764FE0F\", \"200D\", \"D83DDC8B\", \"200D\", \"D83DDC69\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"2764FE0F\", \"200D\", \"D83DDC8B\", \"200D\", \"D83DDC68\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC41\", \"200D\", \"D83DDDE8\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC69\", \"200D\", \"D83DDC67\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC69\", \"200D\", \"D83DDC67\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC69\", \"200D\", \"D83DDC66\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC69\", \"200D\", \"D83DDC67\", \"200D\", \"D83DDC67\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDC69\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDC69\", \"200D\", \"D83DDC67\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDC69\", \"200D\", \"D83DDC67\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDC69\", \"200D\", \"D83DDC66\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC69\", \"200D\", \"D83DDC69\", \"200D\", \"D83DDC67\", \"200D\", \"D83DDC67\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC68\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC68\", \"200D\", \"D83DDC67\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC68\", \"200D\", \"D83DDC67\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC68\", \"200D\", \"D83DDC66\", \"200D\", \"D83DDC66\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDC68\", \"200D\", \"D83DDC68\", \"200D\", \"D83DDC67\", \"200D\", \"D83DDC67\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9D83C\", \"DFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9D83C\", \"DFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9D83C\", \"DFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9D83C\", \"DFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9D83C\", \"DFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"26F9\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC4\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCA\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCC\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEA3\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB4\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83DDEB5\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD38\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD39\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3C\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3C\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3D\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"D83CDFFB\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"D83CDFFC\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"D83CDFFD\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"D83CDFFE\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"D83CDFFF\", \"200D\", \"2642\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83EDD3E\", \"D83CDFFF\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFF3\", \"200D\", \"D83CDF08\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC7\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC7\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC7\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC7\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC7\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFC7\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\", \"D83CDFFB\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\", \"D83CDFFC\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\", \"D83CDFFD\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\", \"D83CDFFE\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\", \"D83CDFFF\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\", \"D83CDFFB\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\", \"D83CDFFC\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\", \"D83CDFFD\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\", \"D83CDFFE\", \"200D\", \"2640\");\r\n            AddTreeNodes(_joinedEmojiTree, 0, \"D83CDFCB\", \"D83CDFFF\", \"200D\", \"2640\");\r\n\r\n            _skinsDict[\"D83CDFFB\"] = \"D83CDFFB\";\r\n            _skinsDict[\"D83CDFFC\"] = \"D83CDFFC\";\r\n            _skinsDict[\"D83CDFFD\"] = \"D83CDFFD\";\r\n            _skinsDict[\"D83CDFFE\"] = \"D83CDFFE\";\r\n            _skinsDict[\"D83CDFFF\"] = \"D83CDFFF\";\r\n\r\n            _skinnedDict[\"D83DDC41\"] = \"D83DDC41\";\r\n            _skinnedDict[\"D83DDC6F\"] = \"D83DDC6F\"; // workaround\r\n            _skinnedDict[\"D83EDD26\"] = \"D83EDD26\"; // workaround\r\n            _skinnedDict[\"D83EDD37\"] = \"D83EDD37\"; // workaround\r\n            _skinnedDict[\"D83DDD75\"] = \"D83DDD75\"; // workaround\r\n            _skinnedDict[\"D83EDD3C\"] = \"D83EDD3C\"; // workaround\r\n            _skinnedDict[\"D83EDD38\"] = \"D83EDD38\"; // workaround\r\n            _skinnedDict[\"D83EDD3E\"] = \"D83EDD3E\"; // workaround\r\n            _skinnedDict[\"D83CDFCC\"] = \"D83CDFCC\"; // workaround\r\n            _skinnedDict[\"D83EDD3D\"] = \"D83EDD3D\"; // workaround\r\n            _skinnedDict[\"D83EDD39\"] = \"D83EDD39\"; // workaround\r\n            _skinnedDict[\"D83CDFF3\"] = \"D83CDFF3\"; // workaround\r\n            _skinnedDict[\"D83DDC6E\"] = \"D83DDC6E\"; // workaround\r\n            _skinnedDict[\"D83DDC82\"] = \"D83DDC82\"; // workaround\r\n            _skinnedDict[\"D83DDC77\"] = \"D83DDC77\"; // workaround\r\n            _skinnedDict[\"D83DDC73\"] = \"D83DDC73\"; // workaround\r\n            _skinnedDict[\"D83DDC71\"] = \"D83DDC71\"; // workaround\r\n            _skinnedDict[\"D83DDE47\"] = \"D83DDE47\"; // workaround\r\n            _skinnedDict[\"D83DDC81\"] = \"D83DDC81\"; // workaround\r\n            _skinnedDict[\"D83DDE45\"] = \"D83DDE45\"; // workaround\r\n            _skinnedDict[\"D83DDE46\"] = \"D83DDE46\"; // workaround\r\n            _skinnedDict[\"D83DDE4B\"] = \"D83DDE4B\"; // workaround\r\n            _skinnedDict[\"D83DDD26\"] = \"D83DDD26\"; // workaround\r\n            _skinnedDict[\"D83DDE4E\"] = \"D83DDE4E\"; // workaround\r\n            _skinnedDict[\"D83DDE4D\"] = \"D83DDE4D\"; // workaround\r\n            _skinnedDict[\"D83DDC87\"] = \"D83DDC87\"; // workaround\r\n            _skinnedDict[\"D83DDC86\"] = \"D83DDC86\"; // workaround\r\n            _skinnedDict[\"D83DDEB6\"] = \"D83DDEB6\"; // workaround\r\n            _skinnedDict[\"D83CDFC3\"] = \"D83CDFC3\"; // workaround\r\n            _skinnedDict[\"D83DDC69\"] = \"D83DDC69\"; // workaround\r\n            _skinnedDict[\"D83DDC68\"] = \"D83DDC68\"; // workaround\r\n            _skinnedDict[\"D83DDEB4\"] = \"D83DDEB4\"; // workaround\r\n            _skinnedDict[\"D83DDEB5\"] = \"D83DDEB5\"; // workaround\r\n            _skinnedDict[\"D83CDFC7\"] = \"D83CDFC7\"; // workaround\r\n            _skinnedDict[\"D83DDEA3\"] = \"D83DDEA3\"; // workaround\r\n            _skinnedDict[\"D83CDFCA\"] = \"D83CDFCA\"; // workaround\r\n            _skinnedDict[\"D83CDFC4\"] = \"D83CDFC4\"; // workaround\r\n            _skinnedDict[\"26F9\"] = \"26F9\"; // workaround\r\n            _skinnedDict[\"D83CDFCB\"] = \"D83CDFCB\"; // workaround\r\n\r\n            _skinnedDict[\"D83DDD74\"] = \"D83DDD74\";\r\n            _skinnedDict[\"D83DDD74D83CDFFB\"] = \"D83DDD74D83CDFFB\";\r\n            _skinnedDict[\"D83DDD74D83CDFFC\"] = \"D83DDD74D83CDFFC\";\r\n            _skinnedDict[\"D83DDD74D83CDFFD\"] = \"D83DDD74D83CDFFD\";\r\n            _skinnedDict[\"D83DDD74D83CDFFE\"] = \"D83DDD74D83CDFFE\";\r\n            _skinnedDict[\"D83DDD74D83CDFFF\"] = \"D83DDD74D83CDFFF\";\r\n            _skinnedDict[\"D83DDD7A\"] = \"D83DDD7A\";\r\n            _skinnedDict[\"D83DDD7AD83CDFFB\"] = \"D83DDD7AD83CDFFB\";\r\n            _skinnedDict[\"D83DDD7AD83CDFFC\"] = \"D83DDD7AD83CDFFC\";\r\n            _skinnedDict[\"D83DDD7AD83CDFFD\"] = \"D83DDD7AD83CDFFD\";\r\n            _skinnedDict[\"D83DDD7AD83CDFFE\"] = \"D83DDD7AD83CDFFE\";\r\n            _skinnedDict[\"D83DDD7AD83CDFFF\"] = \"D83DDD7AD83CDFFF\";\r\n            _skinnedDict[\"D83EDD30\"] = \"D83EDD30\";\r\n            _skinnedDict[\"D83EDD30D83CDFFB\"] = \"D83EDD30D83CDFFB\";\r\n            _skinnedDict[\"D83EDD30D83CDFFC\"] = \"D83EDD30D83CDFFC\";\r\n            _skinnedDict[\"D83EDD30D83CDFFD\"] = \"D83EDD30D83CDFFD\";\r\n            _skinnedDict[\"D83EDD30D83CDFFE\"] = \"D83EDD30D83CDFFE\";\r\n            _skinnedDict[\"D83EDD30D83CDFFF\"] = \"D83EDD30D83CDFFF\";\r\n            _skinnedDict[\"D83EDD34\"] = \"D83EDD34\";\r\n            _skinnedDict[\"D83EDD34D83CDFFB\"] = \"D83EDD34D83CDFFB\";\r\n            _skinnedDict[\"D83EDD34D83CDFFC\"] = \"D83EDD34D83CDFFC\";\r\n            _skinnedDict[\"D83EDD34D83CDFFD\"] = \"D83EDD34D83CDFFD\";\r\n            _skinnedDict[\"D83EDD34D83CDFFE\"] = \"D83EDD34D83CDFFE\";\r\n            _skinnedDict[\"D83EDD34D83CDFFF\"] = \"D83EDD34D83CDFFF\";\r\n            _skinnedDict[\"D83EDD35\"] = \"D83EDD35\";\r\n            _skinnedDict[\"D83EDD35D83CDFFB\"] = \"D83EDD35D83CDFFB\";\r\n            _skinnedDict[\"D83EDD35D83CDFFC\"] = \"D83EDD35D83CDFFC\";\r\n            _skinnedDict[\"D83EDD35D83CDFFD\"] = \"D83EDD35D83CDFFD\";\r\n            _skinnedDict[\"D83EDD35D83CDFFE\"] = \"D83EDD35D83CDFFE\";\r\n            _skinnedDict[\"D83EDD35D83CDFFF\"] = \"D83EDD35D83CDFFF\";\r\n            _skinnedDict[\"D83EDD36\"] = \"D83EDD36\";\r\n            _skinnedDict[\"D83EDD36D83CDFFB\"] = \"D83EDD36D83CDFFB\";\r\n            _skinnedDict[\"D83EDD36D83CDFFC\"] = \"D83EDD36D83CDFFC\";\r\n            _skinnedDict[\"D83EDD36D83CDFFD\"] = \"D83EDD36D83CDFFD\";\r\n            _skinnedDict[\"D83EDD36D83CDFFE\"] = \"D83EDD36D83CDFFE\";\r\n            _skinnedDict[\"D83EDD36D83CDFFF\"] = \"D83EDD36D83CDFFF\";\r\n            _skinnedDict[\"D83EDD1A\"] = \"D83EDD1A\";\r\n            _skinnedDict[\"D83EDD1AD83CDFFB\"] = \"D83EDD1AD83CDFFB\";\r\n            _skinnedDict[\"D83EDD1AD83CDFFC\"] = \"D83EDD1AD83CDFFC\";\r\n            _skinnedDict[\"D83EDD1AD83CDFFD\"] = \"D83EDD1AD83CDFFD\";\r\n            _skinnedDict[\"D83EDD1AD83CDFFE\"] = \"D83EDD1AD83CDFFE\";\r\n            _skinnedDict[\"D83EDD1AD83CDFFF\"] = \"D83EDD1AD83CDFFF\";\r\n            _skinnedDict[\"D83EDD1B\"] = \"D83EDD1B\";\r\n            _skinnedDict[\"D83EDD1BD83CDFFB\"] = \"D83EDD1BD83CDFFB\";\r\n            _skinnedDict[\"D83EDD1BD83CDFFC\"] = \"D83EDD1BD83CDFFC\";\r\n            _skinnedDict[\"D83EDD1BD83CDFFD\"] = \"D83EDD1BD83CDFFD\";\r\n            _skinnedDict[\"D83EDD1BD83CDFFE\"] = \"D83EDD1BD83CDFFE\";\r\n            _skinnedDict[\"D83EDD1BD83CDFFF\"] = \"D83EDD1BD83CDFFF\";\r\n            _skinnedDict[\"D83EDD1C\"] = \"D83EDD1C\";\r\n            _skinnedDict[\"D83EDD1CD83CDFFB\"] = \"D83EDD1CD83CDFFB\";\r\n            _skinnedDict[\"D83EDD1CD83CDFFC\"] = \"D83EDD1CD83CDFFC\";\r\n            _skinnedDict[\"D83EDD1CD83CDFFD\"] = \"D83EDD1CD83CDFFD\";\r\n            _skinnedDict[\"D83EDD1CD83CDFFE\"] = \"D83EDD1CD83CDFFE\";\r\n            _skinnedDict[\"D83EDD1CD83CDFFF\"] = \"D83EDD1CD83CDFFF\";\r\n            _skinnedDict[\"D83EDD1E\"] = \"D83EDD1E\";\r\n            _skinnedDict[\"D83EDD1ED83CDFFB\"] = \"D83EDD1ED83CDFFB\";\r\n            _skinnedDict[\"D83EDD1ED83CDFFC\"] = \"D83EDD1ED83CDFFC\";\r\n            _skinnedDict[\"D83EDD1ED83CDFFD\"] = \"D83EDD1ED83CDFFD\";\r\n            _skinnedDict[\"D83EDD1ED83CDFFE\"] = \"D83EDD1ED83CDFFE\";\r\n            _skinnedDict[\"D83EDD1ED83CDFFF\"] = \"D83EDD1ED83CDFFF\";\r\n            _skinnedDict[\"D83EDD19\"] = \"D83EDD19\";\r\n            _skinnedDict[\"D83EDD19D83CDFFB\"] = \"D83EDD19D83CDFFB\";\r\n            _skinnedDict[\"D83EDD19D83CDFFC\"] = \"D83EDD19D83CDFFC\";\r\n            _skinnedDict[\"D83EDD19D83CDFFD\"] = \"D83EDD19D83CDFFD\";\r\n            _skinnedDict[\"D83EDD19D83CDFFE\"] = \"D83EDD19D83CDFFE\";\r\n            _skinnedDict[\"D83EDD19D83CDFFF\"] = \"D83EDD19D83CDFFF\";\r\n            _skinnedDict[\"D83DDE4C\"] = \"D83DDE4C\";\r\n            _skinnedDict[\"D83DDE4CD83CDFFB\"] = \"D83DDE4CD83CDFFB\";\r\n            _skinnedDict[\"D83DDE4CD83CDFFC\"] = \"D83DDE4CD83CDFFC\";\r\n            _skinnedDict[\"D83DDE4CD83CDFFD\"] = \"D83DDE4CD83CDFFD\";\r\n            _skinnedDict[\"D83DDE4CD83CDFFE\"] = \"D83DDE4CD83CDFFE\";\r\n            _skinnedDict[\"D83DDE4CD83CDFFF\"] = \"D83DDE4CD83CDFFF\";\r\n            _skinnedDict[\"D83DDC4F\"] = \"D83DDC4F\";\r\n            _skinnedDict[\"D83DDC4FD83CDFFB\"] = \"D83DDC4FD83CDFFB\";\r\n            _skinnedDict[\"D83DDC4FD83CDFFC\"] = \"D83DDC4FD83CDFFC\";\r\n            _skinnedDict[\"D83DDC4FD83CDFFD\"] = \"D83DDC4FD83CDFFD\";\r\n            _skinnedDict[\"D83DDC4FD83CDFFE\"] = \"D83DDC4FD83CDFFE\";\r\n            _skinnedDict[\"D83DDC4FD83CDFFF\"] = \"D83DDC4FD83CDFFF\";\r\n            _skinnedDict[\"D83DDC4B\"] = \"D83DDC4B\";\r\n            _skinnedDict[\"D83DDC4BD83CDFFB\"] = \"D83DDC4BD83CDFFB\";\r\n            _skinnedDict[\"D83DDC4BD83CDFFC\"] = \"D83DDC4BD83CDFFC\";\r\n            _skinnedDict[\"D83DDC4BD83CDFFD\"] = \"D83DDC4BD83CDFFD\";\r\n            _skinnedDict[\"D83DDC4BD83CDFFE\"] = \"D83DDC4BD83CDFFE\";\r\n            _skinnedDict[\"D83DDC4BD83CDFFF\"] = \"D83DDC4BD83CDFFF\";\r\n            _skinnedDict[\"D83DDC4D\"] = \"D83DDC4D\";\r\n            _skinnedDict[\"D83DDC4DD83CDFFB\"] = \"D83DDC4DD83CDFFB\";\r\n            _skinnedDict[\"D83DDC4DD83CDFFC\"] = \"D83DDC4DD83CDFFC\";\r\n            _skinnedDict[\"D83DDC4DD83CDFFD\"] = \"D83DDC4DD83CDFFD\";\r\n            _skinnedDict[\"D83DDC4DD83CDFFE\"] = \"D83DDC4DD83CDFFE\";\r\n            _skinnedDict[\"D83DDC4DD83CDFFF\"] = \"D83DDC4DD83CDFFF\";\r\n            _skinnedDict[\"D83DDC4E\"] = \"D83DDC4E\";\r\n            _skinnedDict[\"D83DDC4ED83CDFFB\"] = \"D83DDC4ED83CDFFB\";\r\n            _skinnedDict[\"D83DDC4ED83CDFFC\"] = \"D83DDC4ED83CDFFC\";\r\n            _skinnedDict[\"D83DDC4ED83CDFFD\"] = \"D83DDC4ED83CDFFD\";\r\n            _skinnedDict[\"D83DDC4ED83CDFFE\"] = \"D83DDC4ED83CDFFE\";\r\n            _skinnedDict[\"D83DDC4ED83CDFFF\"] = \"D83DDC4ED83CDFFF\";\r\n            _skinnedDict[\"D83DDC4A\"] = \"D83DDC4A\";\r\n            _skinnedDict[\"D83DDC4AD83CDFFB\"] = \"D83DDC4AD83CDFFB\";\r\n            _skinnedDict[\"D83DDC4AD83CDFFC\"] = \"D83DDC4AD83CDFFC\";\r\n            _skinnedDict[\"D83DDC4AD83CDFFD\"] = \"D83DDC4AD83CDFFD\";\r\n            _skinnedDict[\"D83DDC4AD83CDFFE\"] = \"D83DDC4AD83CDFFE\";\r\n            _skinnedDict[\"D83DDC4AD83CDFFF\"] = \"D83DDC4AD83CDFFF\";\r\n            _skinnedDict[\"D83DDC4C\"] = \"D83DDC4C\";\r\n            _skinnedDict[\"D83DDC4CD83CDFFB\"] = \"D83DDC4CD83CDFFB\";\r\n            _skinnedDict[\"D83DDC4CD83CDFFC\"] = \"D83DDC4CD83CDFFC\";\r\n            _skinnedDict[\"D83DDC4CD83CDFFD\"] = \"D83DDC4CD83CDFFD\";\r\n            _skinnedDict[\"D83DDC4CD83CDFFE\"] = \"D83DDC4CD83CDFFE\";\r\n            _skinnedDict[\"D83DDC4CD83CDFFF\"] = \"D83DDC4CD83CDFFF\";\r\n            _skinnedDict[\"D83DDC46\"] = \"D83DDC46\";\r\n            _skinnedDict[\"D83DDC46D83CDFFB\"] = \"D83DDC46D83CDFFB\";\r\n            _skinnedDict[\"D83DDC46D83CDFFC\"] = \"D83DDC46D83CDFFC\";\r\n            _skinnedDict[\"D83DDC46D83CDFFD\"] = \"D83DDC46D83CDFFD\";\r\n            _skinnedDict[\"D83DDC46D83CDFFE\"] = \"D83DDC46D83CDFFE\";\r\n            _skinnedDict[\"D83DDC46D83CDFFF\"] = \"D83DDC46D83CDFFF\";\r\n            _skinnedDict[\"D83DDC47\"] = \"D83DDC47\";\r\n            _skinnedDict[\"D83DDC47D83CDFFB\"] = \"D83DDC47D83CDFFB\";\r\n            _skinnedDict[\"D83DDC47D83CDFFC\"] = \"D83DDC47D83CDFFC\";\r\n            _skinnedDict[\"D83DDC47D83CDFFD\"] = \"D83DDC47D83CDFFD\";\r\n            _skinnedDict[\"D83DDC47D83CDFFE\"] = \"D83DDC47D83CDFFE\";\r\n            _skinnedDict[\"D83DDC47D83CDFFF\"] = \"D83DDC47D83CDFFF\";\r\n            _skinnedDict[\"D83DDC48\"] = \"D83DDC48\";\r\n            _skinnedDict[\"D83DDC48D83CDFFB\"] = \"D83DDC48D83CDFFB\";\r\n            _skinnedDict[\"D83DDC48D83CDFFC\"] = \"D83DDC48D83CDFFC\";\r\n            _skinnedDict[\"D83DDC48D83CDFFD\"] = \"D83DDC48D83CDFFD\";\r\n            _skinnedDict[\"D83DDC48D83CDFFE\"] = \"D83DDC48D83CDFFE\";\r\n            _skinnedDict[\"D83DDC48D83CDFFF\"] = \"D83DDC48D83CDFFF\";\r\n            _skinnedDict[\"D83DDC49\"] = \"D83DDC49\";\r\n            _skinnedDict[\"D83DDC49D83CDFFB\"] = \"D83DDC49D83CDFFB\";\r\n            _skinnedDict[\"D83DDC49D83CDFFC\"] = \"D83DDC49D83CDFFC\";\r\n            _skinnedDict[\"D83DDC49D83CDFFD\"] = \"D83DDC49D83CDFFD\";\r\n            _skinnedDict[\"D83DDC49D83CDFFE\"] = \"D83DDC49D83CDFFE\";\r\n            _skinnedDict[\"D83DDC49D83CDFFF\"] = \"D83DDC49D83CDFFF\";\r\n            _skinnedDict[\"D83DDC50\"] = \"D83DDC50\";\r\n            _skinnedDict[\"D83DDC50D83CDFFB\"] = \"D83DDC50D83CDFFB\";\r\n            _skinnedDict[\"D83DDC50D83CDFFC\"] = \"D83DDC50D83CDFFC\";\r\n            _skinnedDict[\"D83DDC50D83CDFFD\"] = \"D83DDC50D83CDFFD\";\r\n            _skinnedDict[\"D83DDC50D83CDFFE\"] = \"D83DDC50D83CDFFE\";\r\n            _skinnedDict[\"D83DDC50D83CDFFF\"] = \"D83DDC50D83CDFFF\";\r\n            _skinnedDict[\"D83DDCAA\"] = \"D83DDCAA\";\r\n            _skinnedDict[\"D83DDCAAD83CDFFB\"] = \"D83DDCAAD83CDFFB\";\r\n            _skinnedDict[\"D83DDCAAD83CDFFC\"] = \"D83DDCAAD83CDFFC\";\r\n            _skinnedDict[\"D83DDCAAD83CDFFD\"] = \"D83DDCAAD83CDFFD\";\r\n            _skinnedDict[\"D83DDCAAD83CDFFE\"] = \"D83DDCAAD83CDFFE\";\r\n            _skinnedDict[\"D83DDCAAD83CDFFF\"] = \"D83DDCAAD83CDFFF\";\r\n            _skinnedDict[\"D83DDE4F\"] = \"D83DDE4F\";\r\n            _skinnedDict[\"D83DDE4FD83CDFFB\"] = \"D83DDE4FD83CDFFB\";\r\n            _skinnedDict[\"D83DDE4FD83CDFFC\"] = \"D83DDE4FD83CDFFC\";\r\n            _skinnedDict[\"D83DDE4FD83CDFFD\"] = \"D83DDE4FD83CDFFD\";\r\n            _skinnedDict[\"D83DDE4FD83CDFFE\"] = \"D83DDE4FD83CDFFE\";\r\n            _skinnedDict[\"D83DDE4FD83CDFFF\"] = \"D83DDE4FD83CDFFF\";\r\n            _skinnedDict[\"D83DDD95\"] = \"D83DDD95\";\r\n            _skinnedDict[\"D83DDD95D83CDFFB\"] = \"D83DDD95D83CDFFB\";\r\n            _skinnedDict[\"D83DDD95D83CDFFC\"] = \"D83DDD95D83CDFFC\";\r\n            _skinnedDict[\"D83DDD95D83CDFFD\"] = \"D83DDD95D83CDFFD\";\r\n            _skinnedDict[\"D83DDD95D83CDFFE\"] = \"D83DDD95D83CDFFE\";\r\n            _skinnedDict[\"D83DDD95D83CDFFF\"] = \"D83DDD95D83CDFFF\";\r\n            _skinnedDict[\"D83DDD90\"] = \"D83DDD90\";\r\n            _skinnedDict[\"D83DDD90D83CDFFB\"] = \"D83DDD90D83CDFFB\";\r\n            _skinnedDict[\"D83DDD90D83CDFFC\"] = \"D83DDD90D83CDFFC\";\r\n            _skinnedDict[\"D83DDD90D83CDFFD\"] = \"D83DDD90D83CDFFD\";\r\n            _skinnedDict[\"D83DDD90D83CDFFE\"] = \"D83DDD90D83CDFFE\";\r\n            _skinnedDict[\"D83DDD90D83CDFFF\"] = \"D83DDD90D83CDFFF\";\r\n            _skinnedDict[\"D83EDD18\"] = \"D83EDD18\";\r\n            _skinnedDict[\"D83EDD18D83CDFFB\"] = \"D83EDD18D83CDFFB\";\r\n            _skinnedDict[\"D83EDD18D83CDFFC\"] = \"D83EDD18D83CDFFC\";\r\n            _skinnedDict[\"D83EDD18D83CDFFD\"] = \"D83EDD18D83CDFFD\";\r\n            _skinnedDict[\"D83EDD18D83CDFFE\"] = \"D83EDD18D83CDFFE\";\r\n            _skinnedDict[\"D83EDD18D83CDFFF\"] = \"D83EDD18D83CDFFF\";\r\n            _skinnedDict[\"D83DDD96\"] = \"D83DDD96\";\r\n            _skinnedDict[\"D83DDD96D83CDFFB\"] = \"D83DDD96D83CDFFB\";\r\n            _skinnedDict[\"D83DDD96D83CDFFC\"] = \"D83DDD96D83CDFFC\";\r\n            _skinnedDict[\"D83DDD96D83CDFFD\"] = \"D83DDD96D83CDFFD\";\r\n            _skinnedDict[\"D83DDD96D83CDFFE\"] = \"D83DDD96D83CDFFE\";\r\n            _skinnedDict[\"D83DDD96D83CDFFF\"] = \"D83DDD96D83CDFFF\";\r\n            _skinnedDict[\"D83DDC85\"] = \"D83DDC85\";\r\n            _skinnedDict[\"D83DDC85D83CDFFB\"] = \"D83DDC85D83CDFFB\";\r\n            _skinnedDict[\"D83DDC85D83CDFFC\"] = \"D83DDC85D83CDFFC\";\r\n            _skinnedDict[\"D83DDC85D83CDFFD\"] = \"D83DDC85D83CDFFD\";\r\n            _skinnedDict[\"D83DDC85D83CDFFE\"] = \"D83DDC85D83CDFFE\";\r\n            _skinnedDict[\"D83DDC85D83CDFFF\"] = \"D83DDC85D83CDFFF\";\r\n            _skinnedDict[\"D83DDC42\"] = \"D83DDC42\";\r\n            _skinnedDict[\"D83DDC42D83CDFFB\"] = \"D83DDC42D83CDFFB\";\r\n            _skinnedDict[\"D83DDC42D83CDFFC\"] = \"D83DDC42D83CDFFC\";\r\n            _skinnedDict[\"D83DDC42D83CDFFD\"] = \"D83DDC42D83CDFFD\";\r\n            _skinnedDict[\"D83DDC42D83CDFFE\"] = \"D83DDC42D83CDFFE\";\r\n            _skinnedDict[\"D83DDC42D83CDFFF\"] = \"D83DDC42D83CDFFF\";\r\n            _skinnedDict[\"D83DDC43\"] = \"D83DDC43\";\r\n            _skinnedDict[\"D83DDC43D83CDFFB\"] = \"D83DDC43D83CDFFB\";\r\n            _skinnedDict[\"D83DDC43D83CDFFC\"] = \"D83DDC43D83CDFFC\";\r\n            _skinnedDict[\"D83DDC43D83CDFFD\"] = \"D83DDC43D83CDFFD\";\r\n            _skinnedDict[\"D83DDC43D83CDFFE\"] = \"D83DDC43D83CDFFE\";\r\n            _skinnedDict[\"D83DDC43D83CDFFF\"] = \"D83DDC43D83CDFFF\";\r\n            _skinnedDict[\"D83DDC76\"] = \"D83DDC76\";\r\n            _skinnedDict[\"D83DDC76D83CDFFB\"] = \"D83DDC76D83CDFFB\";\r\n            _skinnedDict[\"D83DDC76D83CDFFC\"] = \"D83DDC76D83CDFFC\";\r\n            _skinnedDict[\"D83DDC76D83CDFFD\"] = \"D83DDC76D83CDFFD\";\r\n            _skinnedDict[\"D83DDC76D83CDFFE\"] = \"D83DDC76D83CDFFE\";\r\n            _skinnedDict[\"D83DDC76D83CDFFF\"] = \"D83DDC76D83CDFFF\";\r\n            _skinnedDict[\"D83DDC66\"] = \"D83DDC66\";\r\n            _skinnedDict[\"D83DDC66D83CDFFB\"] = \"D83DDC66D83CDFFB\";\r\n            _skinnedDict[\"D83DDC66D83CDFFC\"] = \"D83DDC66D83CDFFC\";\r\n            _skinnedDict[\"D83DDC66D83CDFFD\"] = \"D83DDC66D83CDFFD\";\r\n            _skinnedDict[\"D83DDC66D83CDFFE\"] = \"D83DDC66D83CDFFE\";\r\n            _skinnedDict[\"D83DDC66D83CDFFF\"] = \"D83DDC66D83CDFFF\";\r\n            _skinnedDict[\"D83DDC67\"] = \"D83DDC67\";\r\n            _skinnedDict[\"D83DDC67D83CDFFB\"] = \"D83DDC67D83CDFFB\";\r\n            _skinnedDict[\"D83DDC67D83CDFFC\"] = \"D83DDC67D83CDFFC\";\r\n            _skinnedDict[\"D83DDC67D83CDFFD\"] = \"D83DDC67D83CDFFD\";\r\n            _skinnedDict[\"D83DDC67D83CDFFE\"] = \"D83DDC67D83CDFFE\";\r\n            _skinnedDict[\"D83DDC67D83CDFFF\"] = \"D83DDC67D83CDFFF\";\r\n            _skinnedDict[\"D83DDC74\"] = \"D83DDC74\";\r\n            _skinnedDict[\"D83DDC74D83CDFFB\"] = \"D83DDC74D83CDFFB\";\r\n            _skinnedDict[\"D83DDC74D83CDFFC\"] = \"D83DDC74D83CDFFC\";\r\n            _skinnedDict[\"D83DDC74D83CDFFD\"] = \"D83DDC74D83CDFFD\";\r\n            _skinnedDict[\"D83DDC74D83CDFFE\"] = \"D83DDC74D83CDFFE\";\r\n            _skinnedDict[\"D83DDC74D83CDFFF\"] = \"D83DDC74D83CDFFF\";\r\n            _skinnedDict[\"D83DDC75\"] = \"D83DDC75\";\r\n            _skinnedDict[\"D83DDC75D83CDFFB\"] = \"D83DDC75D83CDFFB\";\r\n            _skinnedDict[\"D83DDC75D83CDFFC\"] = \"D83DDC75D83CDFFC\";\r\n            _skinnedDict[\"D83DDC75D83CDFFD\"] = \"D83DDC75D83CDFFD\";\r\n            _skinnedDict[\"D83DDC75D83CDFFE\"] = \"D83DDC75D83CDFFE\";\r\n            _skinnedDict[\"D83DDC75D83CDFFF\"] = \"D83DDC75D83CDFFF\";\r\n            _skinnedDict[\"D83DDC72\"] = \"D83DDC72\";\r\n            _skinnedDict[\"D83DDC72D83CDFFB\"] = \"D83DDC72D83CDFFB\";\r\n            _skinnedDict[\"D83DDC72D83CDFFC\"] = \"D83DDC72D83CDFFC\";\r\n            _skinnedDict[\"D83DDC72D83CDFFD\"] = \"D83DDC72D83CDFFD\";\r\n            _skinnedDict[\"D83DDC72D83CDFFE\"] = \"D83DDC72D83CDFFE\";\r\n            _skinnedDict[\"D83DDC72D83CDFFF\"] = \"D83DDC72D83CDFFF\";\r\n            _skinnedDict[\"D83DDC83\"] = \"D83DDC83\";\r\n            _skinnedDict[\"D83DDC83D83CDFFB\"] = \"D83DDC83D83CDFFB\";\r\n            _skinnedDict[\"D83DDC83D83CDFFC\"] = \"D83DDC83D83CDFFC\";\r\n            _skinnedDict[\"D83DDC83D83CDFFD\"] = \"D83DDC83D83CDFFD\";\r\n            _skinnedDict[\"D83DDC83D83CDFFE\"] = \"D83DDC83D83CDFFE\";\r\n            _skinnedDict[\"D83DDC83D83CDFFF\"] = \"D83DDC83D83CDFFF\";\r\n            _skinnedDict[\"D83CDF85\"] = \"D83CDF85\";\r\n            _skinnedDict[\"D83CDF85D83CDFFB\"] = \"D83CDF85D83CDFFB\";\r\n            _skinnedDict[\"D83CDF85D83CDFFC\"] = \"D83CDF85D83CDFFC\";\r\n            _skinnedDict[\"D83CDF85D83CDFFD\"] = \"D83CDF85D83CDFFD\";\r\n            _skinnedDict[\"D83CDF85D83CDFFE\"] = \"D83CDF85D83CDFFE\";\r\n            _skinnedDict[\"D83CDF85D83CDFFF\"] = \"D83CDF85D83CDFFF\";\r\n            _skinnedDict[\"D83DDC7C\"] = \"D83DDC7C\";\r\n            _skinnedDict[\"D83DDC7CD83CDFFB\"] = \"D83DDC7CD83CDFFB\";\r\n            _skinnedDict[\"D83DDC7CD83CDFFC\"] = \"D83DDC7CD83CDFFC\";\r\n            _skinnedDict[\"D83DDC7CD83CDFFD\"] = \"D83DDC7CD83CDFFD\";\r\n            _skinnedDict[\"D83DDC7CD83CDFFE\"] = \"D83DDC7CD83CDFFE\";\r\n            _skinnedDict[\"D83DDC7CD83CDFFF\"] = \"D83DDC7CD83CDFFF\";\r\n            _skinnedDict[\"D83DDC78\"] = \"D83DDC78\";\r\n            _skinnedDict[\"D83DDC78D83CDFFB\"] = \"D83DDC78D83CDFFB\";\r\n            _skinnedDict[\"D83DDC78D83CDFFC\"] = \"D83DDC78D83CDFFC\";\r\n            _skinnedDict[\"D83DDC78D83CDFFD\"] = \"D83DDC78D83CDFFD\";\r\n            _skinnedDict[\"D83DDC78D83CDFFE\"] = \"D83DDC78D83CDFFE\";\r\n            _skinnedDict[\"D83DDC78D83CDFFF\"] = \"D83DDC78D83CDFFF\";\r\n            _skinnedDict[\"D83DDC70\"] = \"D83DDC70\";\r\n            _skinnedDict[\"D83DDC70D83CDFFB\"] = \"D83DDC70D83CDFFB\";\r\n            _skinnedDict[\"D83DDC70D83CDFFC\"] = \"D83DDC70D83CDFFC\";\r\n            _skinnedDict[\"D83DDC70D83CDFFD\"] = \"D83DDC70D83CDFFD\";\r\n            _skinnedDict[\"D83DDC70D83CDFFE\"] = \"D83DDC70D83CDFFE\";\r\n            _skinnedDict[\"D83DDC70D83CDFFF\"] = \"D83DDC70D83CDFFF\";\r\n            _skinnedDict[\"D83DDEC0\"] = \"D83DDEC0\";\r\n            _skinnedDict[\"D83DDEC0D83CDFFB\"] = \"D83DDEC0D83CDFFB\";\r\n            _skinnedDict[\"D83DDEC0D83CDFFC\"] = \"D83DDEC0D83CDFFC\";\r\n            _skinnedDict[\"D83DDEC0D83CDFFD\"] = \"D83DDEC0D83CDFFD\";\r\n            _skinnedDict[\"D83DDEC0D83CDFFE\"] = \"D83DDEC0D83CDFFE\";\r\n            _skinnedDict[\"D83DDEC0D83CDFFF\"] = \"D83DDEC0D83CDFFF\";\r\n\r\n            _skinnedDict[\"270A\"] = \"270A\";\r\n            _skinnedDict[\"270AD83CDFFB\"] = \"270AD83CDFFB\";\r\n            _skinnedDict[\"270AD83CDFFC\"] = \"270AD83CDFFC\";\r\n            _skinnedDict[\"270AD83CDFFD\"] = \"270AD83CDFFD\";\r\n            _skinnedDict[\"270AD83CDFFE\"] = \"270AD83CDFFE\";\r\n            _skinnedDict[\"270AD83CDFFF\"] = \"270AD83CDFFF\";\r\n            _skinnedDict[\"270B\"] = \"270B\";\r\n            _skinnedDict[\"270BD83CDFFB\"] = \"270BD83CDFFB\";\r\n            _skinnedDict[\"270BD83CDFFC\"] = \"270BD83CDFFC\";\r\n            _skinnedDict[\"270BD83CDFFD\"] = \"270BD83CDFFD\";\r\n            _skinnedDict[\"270BD83CDFFE\"] = \"270BD83CDFFE\";\r\n            _skinnedDict[\"270BD83CDFFF\"] = \"270BD83CDFFF\";\r\n            _skinnedDict[\"270C\"] = \"270C\";\r\n            _skinnedDict[\"270CD83CDFFB\"] = \"270CD83CDFFB\";\r\n            _skinnedDict[\"270CD83CDFFC\"] = \"270CD83CDFFC\";\r\n            _skinnedDict[\"270CD83CDFFD\"] = \"270CD83CDFFD\";\r\n            _skinnedDict[\"270CD83CDFFE\"] = \"270CD83CDFFE\";\r\n            _skinnedDict[\"270CD83CDFFF\"] = \"270CD83CDFFF\";\r\n            _skinnedDict[\"270D\"] = \"270D\";\r\n            _skinnedDict[\"270DD83CDFFB\"] = \"270DD83CDFFB\";\r\n            _skinnedDict[\"270DD83CDFFC\"] = \"270DD83CDFFC\";\r\n            _skinnedDict[\"270DD83CDFFD\"] = \"270DD83CDFFD\";\r\n            _skinnedDict[\"270DD83CDFFE\"] = \"270DD83CDFFE\";\r\n            _skinnedDict[\"270DD83CDFFF\"] = \"270DD83CDFFF\";\r\n            _skinnedDict[\"261D\"] = \"261D\";\r\n            _skinnedDict[\"261DD83CDFFB\"] = \"261DD83CDFFB\";\r\n            _skinnedDict[\"261DD83CDFFC\"] = \"261DD83CDFFC\";\r\n            _skinnedDict[\"261DD83CDFFD\"] = \"261DD83CDFFD\";\r\n            _skinnedDict[\"261DD83CDFFE\"] = \"261DD83CDFFE\";\r\n            _skinnedDict[\"261DD83CDFFF\"] = \"261DD83CDFFF\";\r\n\r\n            _dict[\"002320E3\"] = \"002320E3\";\r\n            _dict[\"003020E3\"] = \"003020E3\";\r\n            _dict[\"003120E3\"] = \"003120E3\";\r\n            _dict[\"003220E3\"] = \"003220E3\";\r\n            _dict[\"003320E3\"] = \"003320E3\";\r\n            _dict[\"003420E3\"] = \"003420E3\";\r\n            _dict[\"003520E3\"] = \"003520E3\";\r\n            _dict[\"003620E3\"] = \"003620E3\";\r\n            _dict[\"003720E3\"] = \"003720E3\";\r\n            _dict[\"003820E3\"] = \"003820E3\";\r\n            _dict[\"003920E3\"] = \"003920E3\";\r\n            _dict[\"00A9\"] = \"00A9\";\r\n            _dict[\"00AE\"] = \"00AE\";\r\n            _dict[\"203C\"] = \"203C\";\r\n            _dict[\"2049\"] = \"2049\";\r\n            _dict[\"2122\"] = \"2122\";\r\n            _dict[\"2139\"] = \"2139\";\r\n            _dict[\"2194\"] = \"2194\";\r\n            _dict[\"2195\"] = \"2195\";\r\n            _dict[\"2196\"] = \"2196\";\r\n            _dict[\"2197\"] = \"2197\";\r\n            _dict[\"2198\"] = \"2198\";\r\n            _dict[\"2199\"] = \"2199\";\r\n            _dict[\"21A9\"] = \"21A9\";\r\n            _dict[\"21AA\"] = \"21AA\";\r\n            _dict[\"231A\"] = \"231A\";\r\n            _dict[\"231B\"] = \"231B\";\r\n            _dict[\"2328\"] = \"2328\";\r\n            _dict[\"23E9\"] = \"23E9\";\r\n            _dict[\"23EA\"] = \"23EA\";\r\n            _dict[\"23EB\"] = \"23EB\";\r\n            _dict[\"23EC\"] = \"23EC\";\r\n            _dict[\"23ED\"] = \"23ED\";\r\n            _dict[\"23EE\"] = \"23EE\";\r\n            _dict[\"23EF\"] = \"23EF\";\r\n            _dict[\"23F0\"] = \"23F0\";\r\n            _dict[\"23F1\"] = \"23F1\";\r\n            _dict[\"23F2\"] = \"23F2\";\r\n            _dict[\"23F3\"] = \"23F3\";\r\n            _dict[\"23F8\"] = \"23F8\";\r\n            _dict[\"23F9\"] = \"23F9\";\r\n            _dict[\"23FA\"] = \"23FA\";\r\n            _dict[\"24C2\"] = \"24C2\";\r\n            _dict[\"25AA\"] = \"25AA\";\r\n            _dict[\"25AB\"] = \"25AB\";\r\n            _dict[\"25B6\"] = \"25B6\";\r\n            _dict[\"25C0\"] = \"25C0\";\r\n            _dict[\"25FB\"] = \"25FB\";\r\n            _dict[\"25FC\"] = \"25FC\";\r\n            _dict[\"25FD\"] = \"25FD\";\r\n            _dict[\"25FE\"] = \"25FE\";\r\n            _dict[\"2600\"] = \"2600\";\r\n            _dict[\"2601\"] = \"2601\";\r\n            _dict[\"2602\"] = \"2602\";\r\n            _dict[\"2603\"] = \"2603\";\r\n            _dict[\"2604\"] = \"2604\";\r\n            _dict[\"260E\"] = \"260E\";\r\n            _dict[\"2611\"] = \"2611\";\r\n            _dict[\"2614\"] = \"2614\";\r\n            _dict[\"2618\"] = \"2618\";\r\n            _dict[\"2614FE0F\"] = \"2614\";\r\n            _dict[\"2615\"] = \"2615\";\r\n            _dict[\"261D\"] = \"261D\";\r\n            _dict[\"2620\"] = \"2620\";\r\n            _dict[\"2622\"] = \"2622\";\r\n            _dict[\"2623\"] = \"2623\";\r\n            _dict[\"2626\"] = \"2626\";\r\n            _dict[\"262A\"] = \"262A\";\r\n            _dict[\"262E\"] = \"262E\";\r\n            _dict[\"262F\"] = \"262F\";\r\n            _dict[\"2638\"] = \"2638\";\r\n            _dict[\"2639\"] = \"2639\";\r\n            _dict[\"263A\"] = \"263A\";\r\n            _dict[\"2648\"] = \"2648\";\r\n            _dict[\"2649\"] = \"2649\";\r\n            _dict[\"264A\"] = \"264A\";\r\n            _dict[\"264B\"] = \"264B\";\r\n            _dict[\"264C\"] = \"264C\";\r\n            _dict[\"264D\"] = \"264D\";\r\n            _dict[\"264E\"] = \"264E\";\r\n            _dict[\"264F\"] = \"264F\";\r\n            _dict[\"2650\"] = \"2650\";\r\n            _dict[\"2651\"] = \"2651\";\r\n            _dict[\"2652\"] = \"2652\";\r\n            _dict[\"2653\"] = \"2653\";\r\n            _dict[\"2660\"] = \"2660\";\r\n            _dict[\"2663\"] = \"2663\";\r\n            _dict[\"2665\"] = \"2665\";\r\n            _dict[\"2666\"] = \"2666\";\r\n            _dict[\"2668\"] = \"2668\";\r\n            _dict[\"267B\"] = \"267B\";\r\n            _dict[\"267F\"] = \"267F\";\r\n            _dict[\"2692\"] = \"2692\";\r\n            _dict[\"2693\"] = \"2693\";\r\n            _dict[\"2694\"] = \"2694\";\r\n            _dict[\"2696\"] = \"2696\";\r\n            _dict[\"2697\"] = \"2697\";\r\n            _dict[\"2699\"] = \"2699\";\r\n            _dict[\"269B\"] = \"269B\";\r\n            _dict[\"269C\"] = \"269C\";\r\n            _dict[\"26A0\"] = \"26A0\";\r\n            _dict[\"26A1\"] = \"26A1\";\r\n            _dict[\"26AA\"] = \"26AA\";\r\n            _dict[\"26AB\"] = \"26AB\";\r\n            _dict[\"26B0\"] = \"26B0\";\r\n            _dict[\"26B1\"] = \"26B1\";\r\n            _dict[\"26BD\"] = \"26BD\";\r\n            _dict[\"26BE\"] = \"26BE\";\r\n            _dict[\"26C4\"] = \"26C4\";\r\n            _dict[\"26C5\"] = \"26C5\";\r\n            _dict[\"26C8\"] = \"26C8\";\r\n            _dict[\"26CE\"] = \"26CE\";\r\n            _dict[\"26CF\"] = \"26CF\";\r\n            _dict[\"26D1\"] = \"26D1\";\r\n            _dict[\"26D3\"] = \"26D3\";\r\n            _dict[\"26D4\"] = \"26D4\";\r\n            _dict[\"26E9\"] = \"26E9\";\r\n            _dict[\"26EA\"] = \"26EA\";\r\n            _dict[\"26F0\"] = \"26F0\";\r\n            _dict[\"26F1\"] = \"26F1\";\r\n            _dict[\"26F2\"] = \"26F2\";\r\n            _dict[\"26F3\"] = \"26F3\";\r\n            _dict[\"26F4\"] = \"26F4\";\r\n            _dict[\"26F5\"] = \"26F5\";\r\n            _dict[\"26F7\"] = \"26F7\";\r\n            _dict[\"26F8\"] = \"26F8\";\r\n            _dict[\"26FA\"] = \"26FA\";\r\n            _dict[\"26FD\"] = \"26FD\";\r\n            _dict[\"2702\"] = \"2702\";\r\n            _dict[\"2705\"] = \"2705\";\r\n            _dict[\"2708\"] = \"2708\";\r\n            _dict[\"2709\"] = \"2709\";\r\n            _dict[\"270A\"] = \"270A\";\r\n            _dict[\"270B\"] = \"270B\";\r\n            _dict[\"270C\"] = \"270C\";\r\n            _dict[\"270F\"] = \"270F\";\r\n            _dict[\"2712\"] = \"2712\";\r\n            _dict[\"2714\"] = \"2714\";\r\n            _dict[\"2716\"] = \"2716\";\r\n            _dict[\"271D\"] = \"271D\";\r\n            _dict[\"2721\"] = \"2721\";\r\n            _dict[\"2728\"] = \"2728\";\r\n            _dict[\"2733\"] = \"2733\";\r\n            _dict[\"2734\"] = \"2734\";\r\n            _dict[\"2744\"] = \"2744\";\r\n            _dict[\"2747\"] = \"2747\";\r\n            _dict[\"274C\"] = \"274C\";\r\n            _dict[\"274E\"] = \"274E\";\r\n            _dict[\"2753\"] = \"2753\";\r\n            _dict[\"2754\"] = \"2754\";\r\n            _dict[\"2755\"] = \"2755\";\r\n            _dict[\"2757\"] = \"2757\";\r\n            _dict[\"2763\"] = \"2763\";\r\n            _dict[\"2764\"] = \"2764\";\r\n            _dict[\"2764FE0F\"] = \"2764\";\r\n            _dict[\"2795\"] = \"2795\";\r\n            _dict[\"2796\"] = \"2796\";\r\n            _dict[\"2797\"] = \"2797\";\r\n            _dict[\"27A1\"] = \"27A1\";\r\n            _dict[\"27B0\"] = \"27B0\";\r\n            _dict[\"27BF\"] = \"27BF\";\r\n            _dict[\"2934\"] = \"2934\";\r\n            _dict[\"2935\"] = \"2935\";\r\n            _dict[\"2B05\"] = \"2B05\";\r\n            _dict[\"2B06\"] = \"2B06\";\r\n            _dict[\"2B07\"] = \"2B07\";\r\n            _dict[\"2B1B\"] = \"2B1B\";\r\n            _dict[\"2B1C\"] = \"2B1C\";\r\n            _dict[\"2B50\"] = \"2B50\";\r\n            _dict[\"2B55\"] = \"2B55\";\r\n            _dict[\"3030\"] = \"3030\";\r\n            _dict[\"303D\"] = \"303D\";\r\n            _dict[\"3297\"] = \"3297\";\r\n            _dict[\"3299\"] = \"3299\";\r\n            _dict[\"D83CDC04\"] = \"D83CDC04\";\r\n            _dict[\"D83CDCCF\"] = \"D83CDCCF\";\r\n            _dict[\"D83CDD70\"] = \"D83CDD70\";\r\n            _dict[\"D83CDD71\"] = \"D83CDD71\";\r\n            _dict[\"D83CDD7E\"] = \"D83CDD7E\";\r\n            _dict[\"D83CDD7F\"] = \"D83CDD7F\";\r\n            _dict[\"D83CDD8E\"] = \"D83CDD8E\";\r\n            _dict[\"D83CDD91\"] = \"D83CDD91\";\r\n            _dict[\"D83CDD92\"] = \"D83CDD92\";\r\n            _dict[\"D83CDD93\"] = \"D83CDD93\";\r\n            _dict[\"D83CDD94\"] = \"D83CDD94\";\r\n            _dict[\"D83CDD95\"] = \"D83CDD95\";\r\n            _dict[\"D83CDD96\"] = \"D83CDD96\";\r\n            _dict[\"D83CDD97\"] = \"D83CDD97\";\r\n            _dict[\"D83CDD98\"] = \"D83CDD98\";\r\n            _dict[\"D83CDD99\"] = \"D83CDD99\";\r\n            _dict[\"D83CDD9A\"] = \"D83CDD9A\";\r\n            _dict[\"D83CDDE8D83CDDF3\"] = \"D83CDDE8D83CDDF3\";\r\n            _dict[\"D83CDDE9D83CDDEA\"] = \"D83CDDE9D83CDDEA\";\r\n            _dict[\"D83CDDEAD83CDDF8\"] = \"D83CDDEAD83CDDF8\";\r\n            _dict[\"D83CDDEBD83CDDF7\"] = \"D83CDDEBD83CDDF7\";\r\n            _dict[\"D83CDDECD83CDDE7\"] = \"D83CDDECD83CDDE7\";\r\n            _dict[\"D83CDDEED83CDDF9\"] = \"D83CDDEED83CDDF9\";\r\n            _dict[\"D83CDDEFD83CDDF5\"] = \"D83CDDEFD83CDDF5\";\r\n            _dict[\"D83CDDF0D83CDDF7\"] = \"D83CDDF0D83CDDF7\";\r\n            _dict[\"D83CDDF7D83CDDFA\"] = \"D83CDDF7D83CDDFA\";\r\n            _dict[\"D83CDDFAD83CDDF8\"] = \"D83CDDFAD83CDDF8\";\r\n\r\n            _dict[\"D83CDDE6D83CDDFA\"] = \"D83CDDE6D83CDDFA\";\r\n            _dict[\"D83CDDE6D83CDDF9\"] = \"D83CDDE6D83CDDF9\";\r\n            _dict[\"D83CDDE6D83CDDFF\"] = \"D83CDDE6D83CDDFF\";\r\n            _dict[\"D83CDDE6D83CDDFD\"] = \"D83CDDE6D83CDDFD\";\r\n            _dict[\"D83CDDE6D83CDDF1\"] = \"D83CDDE6D83CDDF1\";\r\n            _dict[\"D83CDDE9D83CDDFF\"] = \"D83CDDE9D83CDDFF\";\r\n            _dict[\"D83CDDE6D83CDDF8\"] = \"D83CDDE6D83CDDF8\";\r\n            _dict[\"D83CDDE6D83CDDEE\"] = \"D83CDDE6D83CDDEE\";\r\n            _dict[\"D83CDDE6D83CDDF4\"] = \"D83CDDE6D83CDDF4\";\r\n            _dict[\"D83CDDE6D83CDDE9\"] = \"D83CDDE6D83CDDE9\";\r\n            _dict[\"D83CDDE6D83CDDF6\"] = \"D83CDDE6D83CDDF6\";\r\n            _dict[\"D83CDDE6D83CDDEC\"] = \"D83CDDE6D83CDDEC\";\r\n            _dict[\"D83CDDE6D83CDDF7\"] = \"D83CDDE6D83CDDF7\";\r\n            _dict[\"D83CDDE6D83CDDF2\"] = \"D83CDDE6D83CDDF2\";\r\n            _dict[\"D83CDDE6D83CDDFC\"] = \"D83CDDE6D83CDDFC\";\r\n            _dict[\"D83CDDE6D83CDDEB\"] = \"D83CDDE6D83CDDEB\";\r\n            _dict[\"D83CDDE7D83CDDF8\"] = \"D83CDDE7D83CDDF8\";\r\n            _dict[\"D83CDDE7D83CDDE9\"] = \"D83CDDE7D83CDDE9\";\r\n            _dict[\"D83CDDE7D83CDDE7\"] = \"D83CDDE7D83CDDE7\";\r\n            _dict[\"D83CDDE7D83CDDED\"] = \"D83CDDE7D83CDDED\";\r\n            _dict[\"D83CDDE7D83CDDFE\"] = \"D83CDDE7D83CDDFE\";\r\n            _dict[\"D83CDDE7D83CDDFF\"] = \"D83CDDE7D83CDDFF\";\r\n            _dict[\"D83CDDE7D83CDDEA\"] = \"D83CDDE7D83CDDEA\";\r\n            _dict[\"D83CDDE7D83CDDEF\"] = \"D83CDDE7D83CDDEF\";\r\n            _dict[\"D83CDDE7D83CDDF2\"] = \"D83CDDE7D83CDDF2\";\r\n            _dict[\"D83CDDE7D83CDDEC\"] = \"D83CDDE7D83CDDEC\";\r\n            _dict[\"D83CDDE7D83CDDF4\"] = \"D83CDDE7D83CDDF4\";\r\n            _dict[\"D83CDDE7D83CDDF6\"] = \"D83CDDE7D83CDDF6\";\r\n            _dict[\"D83CDDE7D83CDDE6\"] = \"D83CDDE7D83CDDE6\";\r\n            _dict[\"D83CDDE7D83CDDFC\"] = \"D83CDDE7D83CDDFC\";\r\n            _dict[\"D83CDDE7D83CDDF7\"] = \"D83CDDE7D83CDDF7\";\r\n            _dict[\"D83CDDEED83CDDF4\"] = \"D83CDDEED83CDDF4\";\r\n            _dict[\"D83CDDE7D83CDDF3\"] = \"D83CDDE7D83CDDF3\";\r\n            _dict[\"D83CDDE7D83CDDEB\"] = \"D83CDDE7D83CDDEB\";\r\n            _dict[\"D83CDDE7D83CDDEE\"] = \"D83CDDE7D83CDDEE\";\r\n            _dict[\"D83CDDE7D83CDDF9\"] = \"D83CDDE7D83CDDF9\";\r\n            _dict[\"D83CDDFBD83CDDFA\"] = \"D83CDDFBD83CDDFA\";\r\n            _dict[\"D83CDDFBD83CDDE6\"] = \"D83CDDFBD83CDDE6\";\r\n            _dict[\"D83CDDECD83CDDE7\"] = \"D83CDDECD83CDDE7\";\r\n            _dict[\"D83CDDEDD83CDDFA\"] = \"D83CDDEDD83CDDFA\";\r\n            _dict[\"D83CDDFBD83CDDEA\"] = \"D83CDDFBD83CDDEA\";\r\n            _dict[\"D83CDDFBD83CDDEC\"] = \"D83CDDFBD83CDDEC\";\r\n            _dict[\"D83CDDFBD83CDDEE\"] = \"D83CDDFBD83CDDEE\";\r\n            _dict[\"D83CDDF9D83CDDF1\"] = \"D83CDDF9D83CDDF1\";\r\n            _dict[\"D83CDDFBD83CDDF3\"] = \"D83CDDFBD83CDDF3\";\r\n            _dict[\"D83CDDECD83CDDE6\"] = \"D83CDDECD83CDDE6\";\r\n            _dict[\"D83CDDEDD83CDDF9\"] = \"D83CDDEDD83CDDF9\";\r\n            _dict[\"D83CDDECD83CDDFE\"] = \"D83CDDECD83CDDFE\";\r\n            _dict[\"D83CDDECD83CDDF2\"] = \"D83CDDECD83CDDF2\";\r\n            _dict[\"D83CDDECD83CDDED\"] = \"D83CDDECD83CDDED\";\r\n\r\n            _dict[\"D83CDDECD83CDDF5\"] = \"D83CDDECD83CDDF5\";\r\n            _dict[\"D83CDDECD83CDDF9\"] = \"D83CDDECD83CDDF9\";\r\n            _dict[\"D83CDDECD83CDDF3\"] = \"D83CDDECD83CDDF3\";\r\n            _dict[\"D83CDDECD83CDDFC\"] = \"D83CDDECD83CDDFC\";\r\n            _dict[\"D83CDDE9D83CDDEA\"] = \"D83CDDE9D83CDDEA\";\r\n            _dict[\"D83CDDECD83CDDEC\"] = \"D83CDDECD83CDDEC\";\r\n            _dict[\"D83CDDECD83CDDEE\"] = \"D83CDDECD83CDDEE\";\r\n            _dict[\"D83CDDEDD83CDDF3\"] = \"D83CDDEDD83CDDF3\";\r\n            _dict[\"D83CDDEDD83CDDF0\"] = \"D83CDDEDD83CDDF0\";\r\n            _dict[\"D83CDDECD83CDDE9\"] = \"D83CDDECD83CDDE9\";\r\n            _dict[\"D83CDDECD83CDDF1\"] = \"D83CDDECD83CDDF1\";\r\n            _dict[\"D83CDDECD83CDDF7\"] = \"D83CDDECD83CDDF7\";\r\n            _dict[\"D83CDDECD83CDDEA\"] = \"D83CDDECD83CDDEA\";\r\n            _dict[\"D83CDDECD83CDDFA\"] = \"D83CDDECD83CDDFA\";\r\n            _dict[\"D83CDDE9D83CDDF0\"] = \"D83CDDE9D83CDDF0\";\r\n            _dict[\"D83CDDEFD83CDDEA\"] = \"D83CDDEFD83CDDEA\";\r\n            _dict[\"D83CDDE9D83CDDEF\"] = \"D83CDDE9D83CDDEF\";\r\n            _dict[\"D83CDDE9D83CDDF2\"] = \"D83CDDE9D83CDDF2\";\r\n            _dict[\"D83CDDE9D83CDDF4\"] = \"D83CDDE9D83CDDF4\";\r\n            _dict[\"D83CDDEAD83CDDFA\"] = \"D83CDDEAD83CDDFA\";\r\n            _dict[\"D83CDDEAD83CDDEC\"] = \"D83CDDEAD83CDDEC\";\r\n            _dict[\"D83CDDFFD83CDDF2\"] = \"D83CDDFFD83CDDF2\";\r\n            _dict[\"D83CDDEAD83CDDED\"] = \"D83CDDEAD83CDDED\";\r\n            _dict[\"D83CDDFFD83CDDFC\"] = \"D83CDDFFD83CDDFC\";\r\n            _dict[\"D83CDDEED83CDDF1\"] = \"D83CDDEED83CDDF1\";\r\n            _dict[\"D83CDDEED83CDDF3\"] = \"D83CDDEED83CDDF3\";\r\n            _dict[\"D83CDDEED83CDDE9\"] = \"D83CDDEED83CDDE9\";\r\n            _dict[\"D83CDDEFD83CDDF4\"] = \"D83CDDEFD83CDDF4\";\r\n            _dict[\"D83CDDEED83CDDF6\"] = \"D83CDDEED83CDDF6\";\r\n            _dict[\"D83CDDEED83CDDF7\"] = \"D83CDDEED83CDDF7\";\r\n\r\n            _dict[\"D83CDDEED83CDDEA\"] = \"D83CDDEED83CDDEA\";\r\n            _dict[\"D83CDDEED83CDDF8\"] = \"D83CDDEED83CDDF8\";\r\n            _dict[\"D83CDDEAD83CDDF8\"] = \"D83CDDEAD83CDDF8\";\r\n            _dict[\"D83CDDEED83CDDF9\"] = \"D83CDDEED83CDDF9\";\r\n            _dict[\"D83CDDFED83CDDEA\"] = \"D83CDDFED83CDDEA\";\r\n            _dict[\"D83CDDE8D83CDDFB\"] = \"D83CDDE8D83CDDFB\";\r\n            _dict[\"D83CDDF0D83CDDFF\"] = \"D83CDDF0D83CDDFF\";\r\n            _dict[\"D83CDDF0D83CDDFE\"] = \"D83CDDF0D83CDDFE\";\r\n            _dict[\"D83CDDF0D83CDDED\"] = \"D83CDDF0D83CDDED\";\r\n            _dict[\"D83CDDE8D83CDDF2\"] = \"D83CDDE8D83CDDF2\";\r\n            _dict[\"D83CDDE8D83CDDE6\"] = \"D83CDDE8D83CDDE6\";\r\n            _dict[\"D83CDDEED83CDDE8\"] = \"D83CDDEED83CDDE8\";\r\n            _dict[\"D83CDDF6D83CDDE6\"] = \"D83CDDF6D83CDDE6\";\r\n            _dict[\"D83CDDF0D83CDDEA\"] = \"D83CDDF0D83CDDEA\";\r\n            _dict[\"D83CDDE8D83CDDFE\"] = \"D83CDDE8D83CDDFE\";\r\n            _dict[\"D83CDDF0D83CDDEC\"] = \"D83CDDF0D83CDDEC\";\r\n            _dict[\"D83CDDF0D83CDDEE\"] = \"D83CDDF0D83CDDEE\";\r\n            _dict[\"D83CDDE8D83CDDF3\"] = \"D83CDDE8D83CDDF3\";\r\n            _dict[\"D83CDDF0D83CDDF5\"] = \"D83CDDF0D83CDDF5\";\r\n            _dict[\"D83CDDE8D83CDDE8\"] = \"D83CDDE8D83CDDE8\";\r\n            _dict[\"D83CDDE8D83CDDF4\"] = \"D83CDDE8D83CDDF4\";\r\n            _dict[\"D83CDDF0D83CDDF2\"] = \"D83CDDF0D83CDDF2\";\r\n            _dict[\"D83CDDE8D83CDDEC\"] = \"D83CDDE8D83CDDEC\";\r\n            _dict[\"D83CDDE8D83CDDE9\"] = \"D83CDDE8D83CDDE9\";\r\n            _dict[\"D83CDDFDD83CDDF0\"] = \"D83CDDFDD83CDDF0\";\r\n            _dict[\"D83CDDE8D83CDDF7\"] = \"D83CDDE8D83CDDF7\";\r\n            _dict[\"D83CDDE8D83CDDEE\"] = \"D83CDDE8D83CDDEE\";\r\n            _dict[\"D83CDDE8D83CDDFA\"] = \"D83CDDE8D83CDDFA\";\r\n            _dict[\"D83CDDF0D83CDDFC\"] = \"D83CDDF0D83CDDFC\";\r\n            _dict[\"D83CDDE8D83CDDFC\"] = \"D83CDDE8D83CDDFC\";\r\n            _dict[\"D83CDDF1D83CDDE6\"] = \"D83CDDF1D83CDDE6\";\r\n            _dict[\"D83CDDF1D83CDDFB\"] = \"D83CDDF1D83CDDFB\";\r\n            _dict[\"D83CDDF1D83CDDF8\"] = \"D83CDDF1D83CDDF8\";\r\n            _dict[\"D83CDDF1D83CDDF7\"] = \"D83CDDF1D83CDDF7\";\r\n            _dict[\"D83CDDF1D83CDDE7\"] = \"D83CDDF1D83CDDE7\";\r\n            _dict[\"D83CDDF1D83CDDFE\"] = \"D83CDDF1D83CDDFE\";\r\n            _dict[\"D83CDDF1D83CDDF9\"] = \"D83CDDF1D83CDDF9\";\r\n            _dict[\"D83CDDF1D83CDDEE\"] = \"D83CDDF1D83CDDEE\";\r\n            _dict[\"D83CDDF1D83CDDFA\"] = \"D83CDDF1D83CDDFA\";\r\n            _dict[\"D83CDDF2D83CDDFA\"] = \"D83CDDF2D83CDDFA\";\r\n\r\n            _dict[\"D83CDDF2D83CDDF7\"] = \"D83CDDF2D83CDDF7\";\r\n            _dict[\"D83CDDF2D83CDDEC\"] = \"D83CDDF2D83CDDEC\";\r\n            _dict[\"D83CDDFED83CDDF9\"] = \"D83CDDFED83CDDF9\";\r\n            _dict[\"D83CDDF2D83CDDF4\"] = \"D83CDDF2D83CDDF4\";\r\n            _dict[\"D83CDDF2D83CDDF0\"] = \"D83CDDF2D83CDDF0\";\r\n            _dict[\"D83CDDF2D83CDDFC\"] = \"D83CDDF2D83CDDFC\";\r\n            _dict[\"D83CDDF2D83CDDFE\"] = \"D83CDDF2D83CDDFE\";\r\n            _dict[\"D83CDDF2D83CDDF1\"] = \"D83CDDF2D83CDDF1\";\r\n            _dict[\"D83CDDF2D83CDDFB\"] = \"D83CDDF2D83CDDFB\";\r\n            _dict[\"D83CDDF2D83CDDF9\"] = \"D83CDDF2D83CDDF9\";\r\n            _dict[\"D83CDDF2D83CDDE6\"] = \"D83CDDF2D83CDDE6\";\r\n            _dict[\"D83CDDF2D83CDDF6\"] = \"D83CDDF2D83CDDF6\";\r\n            _dict[\"D83CDDF2D83CDDED\"] = \"D83CDDF2D83CDDED\";\r\n            _dict[\"D83CDDF2D83CDDFD\"] = \"D83CDDF2D83CDDFD\";\r\n            _dict[\"D83CDDEBD83CDDF2\"] = \"D83CDDEBD83CDDF2\";\r\n            _dict[\"D83CDDF2D83CDDFF\"] = \"D83CDDF2D83CDDFF\";\r\n            _dict[\"D83CDDF2D83CDDE9\"] = \"D83CDDF2D83CDDE9\";\r\n            _dict[\"D83CDDF2D83CDDE8\"] = \"D83CDDF2D83CDDE8\";\r\n            _dict[\"D83CDDF2D83CDDF3\"] = \"D83CDDF2D83CDDF3\";\r\n            _dict[\"D83CDDF2D83CDDF8\"] = \"D83CDDF2D83CDDF8\";\r\n            _dict[\"D83CDDF2D83CDDF2\"] = \"D83CDDF2D83CDDF2\";\r\n            _dict[\"D83CDDF3D83CDDE6\"] = \"D83CDDF3D83CDDE6\";\r\n            _dict[\"D83CDDF3D83CDDF7\"] = \"D83CDDF3D83CDDF7\";\r\n            _dict[\"D83CDDF3D83CDDF5\"] = \"D83CDDF3D83CDDF5\";\r\n            _dict[\"D83CDDF3D83CDDEA\"] = \"D83CDDF3D83CDDEA\";\r\n            _dict[\"D83CDDF3D83CDDEC\"] = \"D83CDDF3D83CDDEC\";\r\n            _dict[\"D83CDDF3D83CDDF1\"] = \"D83CDDF3D83CDDF1\";\r\n            _dict[\"D83CDDF3D83CDDEE\"] = \"D83CDDF3D83CDDEE\";\r\n            _dict[\"D83CDDF3D83CDDFA\"] = \"D83CDDF3D83CDDFA\";\r\n            _dict[\"D83CDDF3D83CDDFF\"] = \"D83CDDF3D83CDDFF\";\r\n            _dict[\"D83CDDF3D83CDDE8\"] = \"D83CDDF3D83CDDE8\";\r\n            _dict[\"D83CDDF3D83CDDF4\"] = \"D83CDDF3D83CDDF4\";\r\n            _dict[\"D83CDDEED83CDDF2\"] = \"D83CDDEED83CDDF2\";\r\n            _dict[\"D83CDDF3D83CDDEB\"] = \"D83CDDF3D83CDDEB\";\r\n            _dict[\"D83CDDE8D83CDDFD\"] = \"D83CDDE8D83CDDFD\";\r\n            _dict[\"D83CDDF8D83CDDED\"] = \"D83CDDF8D83CDDED\";\r\n            _dict[\"D83CDDE8D83CDDF0\"] = \"D83CDDE8D83CDDF0\";\r\n            _dict[\"D83CDDF9D83CDDE8\"] = \"D83CDDF9D83CDDE8\";\r\n            _dict[\"D83CDDE6D83CDDEA\"] = \"D83CDDE6D83CDDEA\";\r\n            _dict[\"D83CDDF4D83CDDF2\"] = \"D83CDDF4D83CDDF2\";\r\n\r\n            _dict[\"D83CDDF5D83CDDF0\"] = \"D83CDDF5D83CDDF0\";\r\n            _dict[\"D83CDDF5D83CDDFC\"] = \"D83CDDF5D83CDDFC\";\r\n            _dict[\"D83CDDF5D83CDDF8\"] = \"D83CDDF5D83CDDF8\";\r\n            _dict[\"D83CDDF5D83CDDE6\"] = \"D83CDDF5D83CDDE6\";\r\n            _dict[\"D83CDDF5D83CDDEC\"] = \"D83CDDF5D83CDDEC\";\r\n            _dict[\"D83CDDF5D83CDDFE\"] = \"D83CDDF5D83CDDFE\";\r\n            _dict[\"D83CDDF5D83CDDEA\"] = \"D83CDDF5D83CDDEA\";\r\n            _dict[\"D83CDDF5D83CDDF3\"] = \"D83CDDF5D83CDDF3\";\r\n            _dict[\"D83CDDF5D83CDDF1\"] = \"D83CDDF5D83CDDF1\";\r\n            _dict[\"D83CDDF5D83CDDF9\"] = \"D83CDDF5D83CDDF9\";\r\n            _dict[\"D83CDDF5D83CDDF7\"] = \"D83CDDF5D83CDDF7\";\r\n            _dict[\"D83CDDF0D83CDDF7\"] = \"D83CDDF0D83CDDF7\";\r\n            _dict[\"D83CDDF7D83CDDEA\"] = \"D83CDDF7D83CDDEA\";\r\n            _dict[\"D83CDDF7D83CDDFA\"] = \"D83CDDF7D83CDDFA\";\r\n            _dict[\"D83CDDF7D83CDDFC\"] = \"D83CDDF7D83CDDFC\";\r\n            _dict[\"D83CDDF7D83CDDF4\"] = \"D83CDDF7D83CDDF4\";\r\n            _dict[\"D83CDDF8D83CDDFB\"] = \"D83CDDF8D83CDDFB\";\r\n            _dict[\"D83CDDFCD83CDDF8\"] = \"D83CDDFCD83CDDF8\";\r\n            _dict[\"D83CDDF8D83CDDF2\"] = \"D83CDDF8D83CDDF2\";\r\n            _dict[\"D83CDDF8D83CDDF9\"] = \"D83CDDF8D83CDDF9\";\r\n            _dict[\"D83CDDF8D83CDDE6\"] = \"D83CDDF8D83CDDE6\";\r\n            _dict[\"D83CDDF8D83CDDFF\"] = \"D83CDDF8D83CDDFF\";\r\n            _dict[\"D83CDDF2D83CDDF5\"] = \"D83CDDF2D83CDDF5\";\r\n            _dict[\"D83CDDF8D83CDDE8\"] = \"D83CDDF8D83CDDE8\";\r\n            _dict[\"D83CDDE7D83CDDF1\"] = \"D83CDDE7D83CDDF1\";\r\n            _dict[\"D83CDDF5D83CDDF2\"] = \"D83CDDF5D83CDDF2\";\r\n            _dict[\"D83CDDF8D83CDDF3\"] = \"D83CDDF8D83CDDF3\";\r\n            _dict[\"D83CDDFBD83CDDE8\"] = \"D83CDDFBD83CDDE8\";\r\n            _dict[\"D83CDDF0D83CDDF3\"] = \"D83CDDF0D83CDDF3\";\r\n            _dict[\"D83CDDF1D83CDDE8\"] = \"D83CDDF1D83CDDE8\";\r\n            _dict[\"D83CDDF7D83CDDF8\"] = \"D83CDDF7D83CDDF8\";\r\n            _dict[\"D83CDDF8D83CDDEC\"] = \"D83CDDF8D83CDDEC\";\r\n            _dict[\"D83CDDF8D83CDDFD\"] = \"D83CDDF8D83CDDFD\";\r\n            _dict[\"D83CDDF8D83CDDFE\"] = \"D83CDDF8D83CDDFE\";\r\n            _dict[\"D83CDDF8D83CDDF0\"] = \"D83CDDF8D83CDDF0\";\r\n            _dict[\"D83CDDF8D83CDDEE\"] = \"D83CDDF8D83CDDEE\";\r\n            _dict[\"D83CDDFAD83CDDF8\"] = \"D83CDDFAD83CDDF8\";\r\n            _dict[\"D83CDDF8D83CDDE7\"] = \"D83CDDF8D83CDDE7\";\r\n            _dict[\"D83CDDF8D83CDDF4\"] = \"D83CDDF8D83CDDF4\";\r\n            _dict[\"D83CDDF8D83CDDE9\"] = \"D83CDDF8D83CDDE9\";\r\n\r\n            _dict[\"D83CDDF8D83CDDF7\"] = \"D83CDDF8D83CDDF7\";\r\n            _dict[\"D83CDDF8D83CDDF1\"] = \"D83CDDF8D83CDDF1\";\r\n            _dict[\"D83CDDF9D83CDDEF\"] = \"D83CDDF9D83CDDEF\";\r\n            _dict[\"D83CDDF9D83CDDED\"] = \"D83CDDF9D83CDDED\";\r\n            _dict[\"D83CDDF9D83CDDFC\"] = \"D83CDDF9D83CDDFC\";\r\n            _dict[\"D83CDDF9D83CDDFF\"] = \"D83CDDF9D83CDDFF\";\r\n            _dict[\"D83CDDF9D83CDDEC\"] = \"D83CDDF9D83CDDEC\";\r\n            _dict[\"D83CDDF9D83CDDF0\"] = \"D83CDDF9D83CDDF0\";\r\n            _dict[\"D83CDDF9D83CDDF4\"] = \"D83CDDF9D83CDDF4\";\r\n            _dict[\"D83CDDF9D83CDDF9\"] = \"D83CDDF9D83CDDF9\";\r\n            _dict[\"D83CDDF9D83CDDFB\"] = \"D83CDDF9D83CDDFB\";\r\n            _dict[\"D83CDDF9D83CDDF3\"] = \"D83CDDF9D83CDDF3\";\r\n            _dict[\"D83CDDF9D83CDDF2\"] = \"D83CDDF9D83CDDF2\";\r\n            _dict[\"D83CDDF9D83CDDF7\"] = \"D83CDDF9D83CDDF7\";\r\n            _dict[\"D83CDDFAD83CDDEC\"] = \"D83CDDFAD83CDDEC\";\r\n            _dict[\"D83CDDFAD83CDDFF\"] = \"D83CDDFAD83CDDFF\";\r\n            _dict[\"D83CDDFAD83CDDE6\"] = \"D83CDDFAD83CDDE6\";\r\n            _dict[\"D83CDDFCD83CDDEB\"] = \"D83CDDFCD83CDDEB\";\r\n            _dict[\"D83CDDFAD83CDDFE\"] = \"D83CDDFAD83CDDFE\";\r\n            _dict[\"D83CDDEBD83CDDF4\"] = \"D83CDDEBD83CDDF4\";\r\n            _dict[\"D83CDDEBD83CDDEF\"] = \"D83CDDEBD83CDDEF\";\r\n            _dict[\"D83CDDF5D83CDDED\"] = \"D83CDDF5D83CDDED\";\r\n            _dict[\"D83CDDEBD83CDDEE\"] = \"D83CDDEBD83CDDEE\";\r\n            _dict[\"D83CDDEBD83CDDF0\"] = \"D83CDDEBD83CDDF0\";\r\n            _dict[\"D83CDDEBD83CDDF7\"] = \"D83CDDEBD83CDDF7\";\r\n            _dict[\"D83CDDECD83CDDEB\"] = \"D83CDDECD83CDDEB\";\r\n            _dict[\"D83CDDF5D83CDDEB\"] = \"D83CDDF5D83CDDEB\";\r\n            _dict[\"D83CDDF9D83CDDEB\"] = \"D83CDDF9D83CDDEB\";\r\n            _dict[\"D83CDDEDD83CDDF7\"] = \"D83CDDEDD83CDDF7\";\r\n            _dict[\"D83CDDE8D83CDDEB\"] = \"D83CDDE8D83CDDEB\";\r\n            _dict[\"D83CDDF9D83CDDE9\"] = \"D83CDDF9D83CDDE9\";\r\n            _dict[\"D83CDDF2D83CDDEA\"] = \"D83CDDF2D83CDDEA\";\r\n            _dict[\"D83CDDE8D83CDDFF\"] = \"D83CDDE8D83CDDFF\";\r\n            _dict[\"D83CDDE8D83CDDF1\"] = \"D83CDDE8D83CDDF1\";\r\n            _dict[\"D83CDDE8D83CDDED\"] = \"D83CDDE8D83CDDED\";\r\n            _dict[\"D83CDDF8D83CDDEA\"] = \"D83CDDF8D83CDDEA\";\r\n            _dict[\"D83CDDF1D83CDDF0\"] = \"D83CDDF1D83CDDF0\";\r\n            _dict[\"D83CDDEAD83CDDE8\"] = \"D83CDDEAD83CDDE8\";\r\n            _dict[\"D83CDDECD83CDDF6\"] = \"D83CDDECD83CDDF6\";\r\n            _dict[\"D83CDDEAD83CDDF7\"] = \"D83CDDEAD83CDDF7\";\r\n            _dict[\"D83CDDEAD83CDDEA\"] = \"D83CDDEAD83CDDEA\";\r\n            _dict[\"D83CDDEAD83CDDF9\"] = \"D83CDDEAD83CDDF9\";\r\n            _dict[\"D83CDDFFD83CDDE6\"] = \"D83CDDFFD83CDDE6\";\r\n            _dict[\"D83CDDECD83CDDF8\"] = \"D83CDDECD83CDDF8\";\r\n            _dict[\"D83CDDF8D83CDDF8\"] = \"D83CDDF8D83CDDF8\";\r\n            _dict[\"D83CDDEFD83CDDF2\"] = \"D83CDDEFD83CDDF2\";\r\n            _dict[\"D83CDDEFD83CDDF5\"] = \"D83CDDEFD83CDDF5\";\r\n\r\n\r\n\r\n            _dict[\"D83CDE01\"] = \"D83CDE01\";\r\n            _dict[\"D83CDE02\"] = \"D83CDE02\";\r\n            _dict[\"D83CDE1A\"] = \"D83CDE1A\";\r\n            _dict[\"D83CDE2F\"] = \"D83CDE2F\";\r\n            _dict[\"D83CDE32\"] = \"D83CDE32\";\r\n            _dict[\"D83CDE33\"] = \"D83CDE33\";\r\n            _dict[\"D83CDE34\"] = \"D83CDE34\";\r\n            _dict[\"D83CDE35\"] = \"D83CDE35\";\r\n            _dict[\"D83CDE36\"] = \"D83CDE36\";\r\n            _dict[\"D83CDE37\"] = \"D83CDE37\";\r\n            _dict[\"D83CDE38\"] = \"D83CDE38\";\r\n            _dict[\"D83CDE39\"] = \"D83CDE39\";\r\n            _dict[\"D83CDE3A\"] = \"D83CDE3A\";\r\n            _dict[\"D83CDE50\"] = \"D83CDE50\";\r\n            _dict[\"D83CDE51\"] = \"D83CDE51\";\r\n            _dict[\"D83CDF00\"] = \"D83CDF00\";\r\n            _dict[\"D83CDF01\"] = \"D83CDF01\";\r\n            _dict[\"D83CDF02\"] = \"D83CDF02\";\r\n            _dict[\"D83CDF03\"] = \"D83CDF03\";\r\n            _dict[\"D83CDF04\"] = \"D83CDF04\";\r\n            _dict[\"D83CDF05\"] = \"D83CDF05\";\r\n            _dict[\"D83CDF06\"] = \"D83CDF06\";\r\n            _dict[\"D83CDF07\"] = \"D83CDF07\";\r\n            _dict[\"D83CDF08\"] = \"D83CDF08\";\r\n            _dict[\"D83CDF09\"] = \"D83CDF09\";\r\n            _dict[\"D83CDF0A\"] = \"D83CDF0A\";\r\n            _dict[\"D83CDF0B\"] = \"D83CDF0B\";\r\n            _dict[\"D83CDF0C\"] = \"D83CDF0C\";\r\n            _dict[\"D83CDF0D\"] = \"D83CDF0D\";\r\n            _dict[\"D83CDF0E\"] = \"D83CDF0E\";\r\n            _dict[\"D83CDF0F\"] = \"D83CDF0F\";\r\n            _dict[\"D83CDF10\"] = \"D83CDF10\";\r\n            _dict[\"D83CDF11\"] = \"D83CDF11\";\r\n            _dict[\"D83CDF12\"] = \"D83CDF12\";\r\n            _dict[\"D83CDF13\"] = \"D83CDF13\";\r\n            _dict[\"D83CDF14\"] = \"D83CDF14\";\r\n            _dict[\"D83CDF15\"] = \"D83CDF15\";\r\n            _dict[\"D83CDF16\"] = \"D83CDF16\";\r\n            _dict[\"D83CDF17\"] = \"D83CDF17\";\r\n            _dict[\"D83CDF18\"] = \"D83CDF18\";\r\n            _dict[\"D83CDF19\"] = \"D83CDF19\";\r\n            _dict[\"D83CDF1A\"] = \"D83CDF1A\";\r\n            _dict[\"D83CDF1B\"] = \"D83CDF1B\";\r\n            _dict[\"D83CDF1C\"] = \"D83CDF1C\";\r\n            _dict[\"D83CDF1D\"] = \"D83CDF1D\";\r\n            _dict[\"D83CDF1E\"] = \"D83CDF1E\";\r\n            _dict[\"D83CDF1F\"] = \"D83CDF1F\";\r\n            _dict[\"D83CDF20\"] = \"D83CDF20\";\r\n            _dict[\"D83CDF21\"] = \"D83CDF21\";\r\n            _dict[\"D83CDF24\"] = \"D83CDF24\";\r\n            _dict[\"D83CDF25\"] = \"D83CDF25\";\r\n            _dict[\"D83CDF26\"] = \"D83CDF26\";\r\n            _dict[\"D83CDF27\"] = \"D83CDF27\";\r\n            _dict[\"D83CDF28\"] = \"D83CDF28\";\r\n            _dict[\"D83CDF29\"] = \"D83CDF29\";\r\n            _dict[\"D83CDF2A\"] = \"D83CDF2A\";\r\n            _dict[\"D83CDF2B\"] = \"D83CDF2B\";\r\n            _dict[\"D83CDF2C\"] = \"D83CDF2C\";\r\n            _dict[\"D83CDF2D\"] = \"D83CDF2D\";\r\n            _dict[\"D83CDF2E\"] = \"D83CDF2E\";\r\n            _dict[\"D83CDF2F\"] = \"D83CDF2F\";\r\n            _dict[\"D83CDF30\"] = \"D83CDF30\";\r\n            _dict[\"D83CDF31\"] = \"D83CDF31\";\r\n            _dict[\"D83CDF32\"] = \"D83CDF32\";\r\n            _dict[\"D83CDF33\"] = \"D83CDF33\";\r\n            _dict[\"D83CDF34\"] = \"D83CDF34\";\r\n            _dict[\"D83CDF35\"] = \"D83CDF35\";\r\n            _dict[\"D83CDF36\"] = \"D83CDF36\";\r\n            _dict[\"D83CDF37\"] = \"D83CDF37\";\r\n            _dict[\"D83CDF38\"] = \"D83CDF38\";\r\n            _dict[\"D83CDF39\"] = \"D83CDF39\";\r\n            _dict[\"D83CDF3A\"] = \"D83CDF3A\";\r\n            _dict[\"D83CDF3B\"] = \"D83CDF3B\";\r\n            _dict[\"D83CDF3C\"] = \"D83CDF3C\";\r\n            _dict[\"D83CDF3D\"] = \"D83CDF3D\";\r\n            _dict[\"D83CDF3E\"] = \"D83CDF3E\";\r\n            _dict[\"D83CDF3F\"] = \"D83CDF3F\";\r\n            _dict[\"D83CDF40\"] = \"D83CDF40\";\r\n            _dict[\"D83CDF41\"] = \"D83CDF41\";\r\n            _dict[\"D83CDF42\"] = \"D83CDF42\";\r\n            _dict[\"D83CDF43\"] = \"D83CDF43\";\r\n            _dict[\"D83CDF44\"] = \"D83CDF44\";\r\n            _dict[\"D83CDF45\"] = \"D83CDF45\";\r\n            _dict[\"D83CDF46\"] = \"D83CDF46\";\r\n            _dict[\"D83CDF47\"] = \"D83CDF47\";\r\n            _dict[\"D83CDF48\"] = \"D83CDF48\";\r\n            _dict[\"D83CDF49\"] = \"D83CDF49\";\r\n            _dict[\"D83CDF4A\"] = \"D83CDF4A\";\r\n            _dict[\"D83CDF4B\"] = \"D83CDF4B\";\r\n            _dict[\"D83CDF4C\"] = \"D83CDF4C\";\r\n            _dict[\"D83CDF4D\"] = \"D83CDF4D\";\r\n            _dict[\"D83CDF4E\"] = \"D83CDF4E\";\r\n            _dict[\"D83CDF4F\"] = \"D83CDF4F\";\r\n            _dict[\"D83CDF50\"] = \"D83CDF50\";\r\n            _dict[\"D83CDF51\"] = \"D83CDF51\";\r\n            _dict[\"D83CDF52\"] = \"D83CDF52\";\r\n            _dict[\"D83CDF53\"] = \"D83CDF53\";\r\n            _dict[\"D83CDF54\"] = \"D83CDF54\";\r\n            _dict[\"D83CDF55\"] = \"D83CDF55\";\r\n            _dict[\"D83CDF56\"] = \"D83CDF56\";\r\n            _dict[\"D83CDF57\"] = \"D83CDF57\";\r\n            _dict[\"D83CDF58\"] = \"D83CDF58\";\r\n            _dict[\"D83CDF59\"] = \"D83CDF59\";\r\n            _dict[\"D83CDF5A\"] = \"D83CDF5A\";\r\n            _dict[\"D83CDF5B\"] = \"D83CDF5B\";\r\n            _dict[\"D83CDF5C\"] = \"D83CDF5C\";\r\n            _dict[\"D83CDF5D\"] = \"D83CDF5D\";\r\n            _dict[\"D83CDF5E\"] = \"D83CDF5E\";\r\n            _dict[\"D83CDF5F\"] = \"D83CDF5F\";\r\n            _dict[\"D83CDF60\"] = \"D83CDF60\";\r\n            _dict[\"D83CDF61\"] = \"D83CDF61\";\r\n            _dict[\"D83CDF62\"] = \"D83CDF62\";\r\n            _dict[\"D83CDF63\"] = \"D83CDF63\";\r\n            _dict[\"D83CDF64\"] = \"D83CDF64\";\r\n            _dict[\"D83CDF65\"] = \"D83CDF65\";\r\n            _dict[\"D83CDF66\"] = \"D83CDF66\";\r\n            _dict[\"D83CDF67\"] = \"D83CDF67\";\r\n            _dict[\"D83CDF68\"] = \"D83CDF68\";\r\n            _dict[\"D83CDF69\"] = \"D83CDF69\";\r\n            _dict[\"D83CDF6A\"] = \"D83CDF6A\";\r\n            _dict[\"D83CDF6B\"] = \"D83CDF6B\";\r\n            _dict[\"D83CDF6C\"] = \"D83CDF6C\";\r\n            _dict[\"D83CDF6D\"] = \"D83CDF6D\";\r\n            _dict[\"D83CDF6E\"] = \"D83CDF6E\";\r\n            _dict[\"D83CDF6F\"] = \"D83CDF6F\";\r\n            _dict[\"D83CDF70\"] = \"D83CDF70\";\r\n            _dict[\"D83CDF71\"] = \"D83CDF71\";\r\n            _dict[\"D83CDF72\"] = \"D83CDF72\";\r\n            _dict[\"D83CDF73\"] = \"D83CDF73\";\r\n            _dict[\"D83CDF74\"] = \"D83CDF74\";\r\n            _dict[\"D83CDF75\"] = \"D83CDF75\";\r\n            _dict[\"D83CDF76\"] = \"D83CDF76\";\r\n            _dict[\"D83CDF77\"] = \"D83CDF77\";\r\n            _dict[\"D83CDF78\"] = \"D83CDF78\";\r\n            _dict[\"D83CDF79\"] = \"D83CDF79\";\r\n            _dict[\"D83CDF7A\"] = \"D83CDF7A\";\r\n            _dict[\"D83CDF7B\"] = \"D83CDF7B\";\r\n            _dict[\"D83CDF7C\"] = \"D83CDF7C\";\r\n            _dict[\"D83CDF7D\"] = \"D83CDF7D\";\r\n            _dict[\"D83CDF7E\"] = \"D83CDF7E\";\r\n            _dict[\"D83CDF7F\"] = \"D83CDF7F\";\r\n            _dict[\"D83CDF80\"] = \"D83CDF80\";\r\n            _dict[\"D83CDF81\"] = \"D83CDF81\";\r\n            _dict[\"D83CDF82\"] = \"D83CDF82\";\r\n            _dict[\"D83CDF83\"] = \"D83CDF83\";\r\n            _dict[\"D83CDF84\"] = \"D83CDF84\";\r\n            _dict[\"D83CDF85\"] = \"D83CDF85\";\r\n            _dict[\"D83CDF86\"] = \"D83CDF86\";\r\n            _dict[\"D83CDF87\"] = \"D83CDF87\";\r\n            _dict[\"D83CDF88\"] = \"D83CDF88\";\r\n            _dict[\"D83CDF89\"] = \"D83CDF89\";\r\n            _dict[\"D83CDF8A\"] = \"D83CDF8A\";\r\n            _dict[\"D83CDF8B\"] = \"D83CDF8B\";\r\n            _dict[\"D83CDF8C\"] = \"D83CDF8C\";\r\n            _dict[\"D83CDF8D\"] = \"D83CDF8D\";\r\n            _dict[\"D83CDF8E\"] = \"D83CDF8E\";\r\n            _dict[\"D83CDF8F\"] = \"D83CDF8F\";\r\n            _dict[\"D83CDF90\"] = \"D83CDF90\";\r\n            _dict[\"D83CDF91\"] = \"D83CDF91\";\r\n            _dict[\"D83CDF92\"] = \"D83CDF92\";\r\n            _dict[\"D83CDF93\"] = \"D83CDF93\";\r\n            _dict[\"D83CDF96\"] = \"D83CDF96\";\r\n            _dict[\"D83CDF97\"] = \"D83CDF97\";\r\n            _dict[\"D83CDF99\"] = \"D83CDF99\";\r\n            _dict[\"D83CDF9A\"] = \"D83CDF9A\";\r\n            _dict[\"D83CDF9B\"] = \"D83CDF9B\";\r\n            _dict[\"D83CDF9E\"] = \"D83CDF9E\";\r\n            _dict[\"D83CDF9F\"] = \"D83CDF9F\";\r\n            _dict[\"D83CDFA0\"] = \"D83CDFA0\";\r\n            _dict[\"D83CDFA1\"] = \"D83CDFA1\";\r\n            _dict[\"D83CDFA2\"] = \"D83CDFA2\";\r\n            _dict[\"D83CDFA3\"] = \"D83CDFA3\";\r\n            _dict[\"D83CDFA4\"] = \"D83CDFA4\";\r\n            _dict[\"D83CDFA5\"] = \"D83CDFA5\";\r\n            _dict[\"D83CDFA6\"] = \"D83CDFA6\";\r\n            _dict[\"D83CDFA7\"] = \"D83CDFA7\";\r\n            _dict[\"D83CDFA8\"] = \"D83CDFA8\";\r\n            _dict[\"D83CDFA9\"] = \"D83CDFA9\";\r\n            _dict[\"D83CDFAA\"] = \"D83CDFAA\";\r\n            _dict[\"D83CDFAB\"] = \"D83CDFAB\";\r\n            _dict[\"D83CDFAC\"] = \"D83CDFAC\";\r\n            _dict[\"D83CDFAD\"] = \"D83CDFAD\";\r\n            _dict[\"D83CDFAE\"] = \"D83CDFAE\";\r\n            _dict[\"D83CDFAF\"] = \"D83CDFAF\";\r\n            _dict[\"D83CDFB0\"] = \"D83CDFB0\";\r\n            _dict[\"D83CDFB1\"] = \"D83CDFB1\";\r\n            _dict[\"D83CDFB2\"] = \"D83CDFB2\";\r\n            _dict[\"D83CDFB3\"] = \"D83CDFB3\";\r\n            _dict[\"D83CDFB4\"] = \"D83CDFB4\";\r\n            _dict[\"D83CDFB5\"] = \"D83CDFB5\";\r\n            _dict[\"D83CDFB6\"] = \"D83CDFB6\";\r\n            _dict[\"D83CDFB7\"] = \"D83CDFB7\";\r\n            _dict[\"D83CDFB8\"] = \"D83CDFB8\";\r\n            _dict[\"D83CDFB9\"] = \"D83CDFB9\";\r\n            _dict[\"D83CDFBA\"] = \"D83CDFBA\";\r\n            _dict[\"D83CDFBB\"] = \"D83CDFBB\";\r\n            _dict[\"D83CDFBC\"] = \"D83CDFBC\";\r\n            _dict[\"D83CDFBD\"] = \"D83CDFBD\";\r\n            _dict[\"D83CDFBE\"] = \"D83CDFBE\";\r\n            _dict[\"D83CDFBF\"] = \"D83CDFBF\";\r\n            _dict[\"D83CDFC0\"] = \"D83CDFC0\";\r\n            _dict[\"D83CDFC1\"] = \"D83CDFC1\";\r\n            _dict[\"D83CDFC2\"] = \"D83CDFC2\";\r\n            _dict[\"D83CDFC5\"] = \"D83CDFC5\";\r\n            _dict[\"D83CDFC6\"] = \"D83CDFC6\";\r\n            _dict[\"D83CDFC8\"] = \"D83CDFC8\";\r\n            _dict[\"D83CDFC9\"] = \"D83CDFC9\";\r\n            _dict[\"D83CDFCD\"] = \"D83CDFCD\";\r\n            _dict[\"D83CDFCE\"] = \"D83CDFCE\";\r\n            _dict[\"D83CDFCF\"] = \"D83CDFCF\";\r\n            _dict[\"D83CDFD0\"] = \"D83CDFD0\";\r\n            _dict[\"D83CDFD1\"] = \"D83CDFD1\";\r\n            _dict[\"D83CDFD2\"] = \"D83CDFD2\";\r\n            _dict[\"D83CDFD3\"] = \"D83CDFD3\";\r\n            _dict[\"D83CDFD4\"] = \"D83CDFD4\";\r\n            _dict[\"D83CDFD5\"] = \"D83CDFD5\";\r\n            _dict[\"D83CDFD6\"] = \"D83CDFD6\";\r\n            _dict[\"D83CDFD7\"] = \"D83CDFD7\";\r\n            _dict[\"D83CDFD8\"] = \"D83CDFD8\";\r\n            _dict[\"D83CDFD9\"] = \"D83CDFD9\";\r\n            _dict[\"D83CDFDA\"] = \"D83CDFDA\";\r\n            _dict[\"D83CDFDB\"] = \"D83CDFDB\";\r\n            _dict[\"D83CDFDC\"] = \"D83CDFDC\";\r\n            _dict[\"D83CDFDD\"] = \"D83CDFDD\";\r\n            _dict[\"D83CDFDE\"] = \"D83CDFDE\";\r\n            _dict[\"D83CDFDF\"] = \"D83CDFDF\";\r\n            _dict[\"D83CDFE0\"] = \"D83CDFE0\";\r\n            _dict[\"D83CDFE1\"] = \"D83CDFE1\";\r\n            _dict[\"D83CDFE2\"] = \"D83CDFE2\";\r\n            _dict[\"D83CDFE3\"] = \"D83CDFE3\";\r\n            _dict[\"D83CDFE4\"] = \"D83CDFE4\";\r\n            _dict[\"D83CDFE5\"] = \"D83CDFE5\";\r\n            _dict[\"D83CDFE6\"] = \"D83CDFE6\";\r\n            _dict[\"D83CDFE7\"] = \"D83CDFE7\";\r\n            _dict[\"D83CDFE8\"] = \"D83CDFE8\";\r\n            _dict[\"D83CDFE9\"] = \"D83CDFE9\";\r\n            _dict[\"D83CDFEA\"] = \"D83CDFEA\";\r\n            _dict[\"D83CDFEB\"] = \"D83CDFEB\";\r\n            _dict[\"D83CDFEC\"] = \"D83CDFEC\";\r\n            _dict[\"D83CDFED\"] = \"D83CDFED\";\r\n            _dict[\"D83CDFEE\"] = \"D83CDFEE\";\r\n            _dict[\"D83CDFEF\"] = \"D83CDFEF\";\r\n            _dict[\"D83CDFF0\"] = \"D83CDFF0\";\r\n            _dict[\"D83CDFF3\"] = \"D83CDFF3\";\r\n            _dict[\"D83CDFF4\"] = \"D83CDFF4\";\r\n            _dict[\"D83CDFF5\"] = \"D83CDFF5\";\r\n            _dict[\"D83CDFF7\"] = \"D83CDFF7\";\r\n            _dict[\"D83CDFF8\"] = \"D83CDFF8\";\r\n            _dict[\"D83CDFF9\"] = \"D83CDFF9\";\r\n            _dict[\"D83CDFFA\"] = \"D83CDFFA\";\r\n            _dict[\"D83DDC00\"] = \"D83DDC00\";\r\n            _dict[\"D83DDC01\"] = \"D83DDC01\";\r\n            _dict[\"D83DDC02\"] = \"D83DDC02\";\r\n            _dict[\"D83DDC03\"] = \"D83DDC03\";\r\n            _dict[\"D83DDC04\"] = \"D83DDC04\";\r\n            _dict[\"D83DDC05\"] = \"D83DDC05\";\r\n            _dict[\"D83DDC06\"] = \"D83DDC06\";\r\n            _dict[\"D83DDC07\"] = \"D83DDC07\";\r\n            _dict[\"D83DDC08\"] = \"D83DDC08\";\r\n            _dict[\"D83DDC09\"] = \"D83DDC09\";\r\n            _dict[\"D83DDC0A\"] = \"D83DDC0A\";\r\n            _dict[\"D83DDC0B\"] = \"D83DDC0B\";\r\n            _dict[\"D83DDC0C\"] = \"D83DDC0C\";\r\n            _dict[\"D83DDC0D\"] = \"D83DDC0D\";\r\n            _dict[\"D83DDC0E\"] = \"D83DDC0E\";\r\n            _dict[\"D83DDC0F\"] = \"D83DDC0F\";\r\n            _dict[\"D83DDC10\"] = \"D83DDC10\";\r\n            _dict[\"D83DDC11\"] = \"D83DDC11\";\r\n            _dict[\"D83DDC12\"] = \"D83DDC12\";\r\n            _dict[\"D83DDC13\"] = \"D83DDC13\";\r\n            _dict[\"D83DDC14\"] = \"D83DDC14\";\r\n            _dict[\"D83DDC15\"] = \"D83DDC15\";\r\n            _dict[\"D83DDC16\"] = \"D83DDC16\";\r\n            _dict[\"D83DDC17\"] = \"D83DDC17\";\r\n            _dict[\"D83DDC18\"] = \"D83DDC18\";\r\n            _dict[\"D83DDC19\"] = \"D83DDC19\";\r\n            _dict[\"D83DDC1A\"] = \"D83DDC1A\";\r\n            _dict[\"D83DDC1B\"] = \"D83DDC1B\";\r\n            _dict[\"D83DDC1C\"] = \"D83DDC1C\";\r\n            _dict[\"D83DDC1D\"] = \"D83DDC1D\";\r\n            _dict[\"D83DDC1E\"] = \"D83DDC1E\";\r\n            _dict[\"D83DDC1F\"] = \"D83DDC1F\";\r\n            _dict[\"D83DDC20\"] = \"D83DDC20\";\r\n            _dict[\"D83DDC21\"] = \"D83DDC21\";\r\n            _dict[\"D83DDC22\"] = \"D83DDC22\";\r\n            _dict[\"D83DDC23\"] = \"D83DDC23\";\r\n            _dict[\"D83DDC24\"] = \"D83DDC24\";\r\n            _dict[\"D83DDC25\"] = \"D83DDC25\";\r\n            _dict[\"D83DDC26\"] = \"D83DDC26\";\r\n            _dict[\"D83DDC27\"] = \"D83DDC27\";\r\n            _dict[\"D83DDC28\"] = \"D83DDC28\";\r\n            _dict[\"D83DDC29\"] = \"D83DDC29\";\r\n            _dict[\"D83DDC2A\"] = \"D83DDC2A\";\r\n            _dict[\"D83DDC2B\"] = \"D83DDC2B\";\r\n            _dict[\"D83DDC2C\"] = \"D83DDC2C\";\r\n            _dict[\"D83DDC2D\"] = \"D83DDC2D\";\r\n            _dict[\"D83DDC2E\"] = \"D83DDC2E\";\r\n            _dict[\"D83DDC2F\"] = \"D83DDC2F\";\r\n            _dict[\"D83DDC30\"] = \"D83DDC30\";\r\n            _dict[\"D83DDC31\"] = \"D83DDC31\";\r\n            _dict[\"D83DDC32\"] = \"D83DDC32\";\r\n            _dict[\"D83DDC33\"] = \"D83DDC33\";\r\n            _dict[\"D83DDC34\"] = \"D83DDC34\";\r\n            _dict[\"D83DDC35\"] = \"D83DDC35\";\r\n            _dict[\"D83DDC36\"] = \"D83DDC36\";\r\n            _dict[\"D83DDC37\"] = \"D83DDC37\";\r\n            _dict[\"D83DDC38\"] = \"D83DDC38\";\r\n            _dict[\"D83DDC39\"] = \"D83DDC39\";\r\n            _dict[\"D83DDC3A\"] = \"D83DDC3A\";\r\n            _dict[\"D83DDC3B\"] = \"D83DDC3B\";\r\n            _dict[\"D83DDC3C\"] = \"D83DDC3C\";\r\n            _dict[\"D83DDC3D\"] = \"D83DDC3D\";\r\n            _dict[\"D83DDC3E\"] = \"D83DDC3E\";\r\n            _dict[\"D83DDC3F\"] = \"D83DDC3F\";\r\n            _dict[\"D83DDC40\"] = \"D83DDC40\";\r\n            _dict[\"D83DDC41\"] = \"D83DDC41\";\r\n            _dict[\"D83DDC42\"] = \"D83DDC42\";\r\n            _dict[\"D83DDC43\"] = \"D83DDC43\";\r\n            _dict[\"D83DDC44\"] = \"D83DDC44\";\r\n            _dict[\"D83DDC45\"] = \"D83DDC45\";\r\n            _dict[\"D83DDC46\"] = \"D83DDC46\";\r\n            _dict[\"D83DDC47\"] = \"D83DDC47\";\r\n            _dict[\"D83DDC48\"] = \"D83DDC48\";\r\n            _dict[\"D83DDC49\"] = \"D83DDC49\";\r\n            _dict[\"D83DDC4A\"] = \"D83DDC4A\";\r\n            _dict[\"D83DDC4B\"] = \"D83DDC4B\";\r\n            _dict[\"D83DDC4C\"] = \"D83DDC4C\";\r\n            _dict[\"D83DDC4D\"] = \"D83DDC4D\";\r\n            _dict[\"D83DDC4E\"] = \"D83DDC4E\";\r\n            //_dict[\"D83DDC4F\"] = \"D83DDC4F\";\r\n            _dict[\"D83DDC50\"] = \"D83DDC50\";\r\n            _dict[\"D83DDC51\"] = \"D83DDC51\";\r\n            _dict[\"D83DDC52\"] = \"D83DDC52\";\r\n            _dict[\"D83DDC53\"] = \"D83DDC53\";\r\n            _dict[\"D83DDC54\"] = \"D83DDC54\";\r\n            _dict[\"D83DDC55\"] = \"D83DDC55\";\r\n            _dict[\"D83DDC56\"] = \"D83DDC56\";\r\n            _dict[\"D83DDC57\"] = \"D83DDC57\";\r\n            _dict[\"D83DDC58\"] = \"D83DDC58\";\r\n            _dict[\"D83DDC59\"] = \"D83DDC59\";\r\n            _dict[\"D83DDC5A\"] = \"D83DDC5A\";\r\n            _dict[\"D83DDC5B\"] = \"D83DDC5B\";\r\n            _dict[\"D83DDC5C\"] = \"D83DDC5C\";\r\n            _dict[\"D83DDC5D\"] = \"D83DDC5D\";\r\n            _dict[\"D83DDC5E\"] = \"D83DDC5E\";\r\n            _dict[\"D83DDC5F\"] = \"D83DDC5F\";\r\n            _dict[\"D83DDC60\"] = \"D83DDC60\";\r\n            _dict[\"D83DDC61\"] = \"D83DDC61\";\r\n            _dict[\"D83DDC62\"] = \"D83DDC62\";\r\n            _dict[\"D83DDC63\"] = \"D83DDC63\";\r\n            _dict[\"D83DDC64\"] = \"D83DDC64\";\r\n            _dict[\"D83DDC65\"] = \"D83DDC65\";\r\n            _dict[\"D83DDC66\"] = \"D83DDC66\";\r\n            _dict[\"D83DDC67\"] = \"D83DDC67\";\r\n            _dict[\"D83DDC68\"] = \"D83DDC68\";\r\n            _dict[\"D83DDC6A\"] = \"D83DDC6A\";\r\n            _dict[\"D83DDC6B\"] = \"D83DDC6B\";\r\n            _dict[\"D83DDC6C\"] = \"D83DDC6C\";\r\n            _dict[\"D83DDC6D\"] = \"D83DDC6D\";\r\n            _dict[\"D83DDC6E\"] = \"D83DDC6E\";\r\n            _dict[\"D83DDC6F\"] = \"D83DDC6F\";\r\n            _dict[\"D83DDC70\"] = \"D83DDC70\";\r\n            _dict[\"D83DDC72\"] = \"D83DDC72\";\r\n            _dict[\"D83DDC74\"] = \"D83DDC74\";\r\n            _dict[\"D83DDC75\"] = \"D83DDC75\";\r\n            _dict[\"D83DDC76\"] = \"D83DDC76\";\r\n            _dict[\"D83DDC78\"] = \"D83DDC78\";\r\n            _dict[\"D83DDC79\"] = \"D83DDC79\";\r\n            _dict[\"D83DDC7A\"] = \"D83DDC7A\";\r\n            _dict[\"D83DDC7B\"] = \"D83DDC7B\";\r\n            _dict[\"D83DDC7C\"] = \"D83DDC7C\";\r\n            _dict[\"D83DDC7D\"] = \"D83DDC7D\";\r\n            _dict[\"D83DDC7E\"] = \"D83DDC7E\";\r\n            _dict[\"D83DDC7F\"] = \"D83DDC7F\";\r\n            _dict[\"D83DDC80\"] = \"D83DDC80\";\r\n            _dict[\"D83DDC83\"] = \"D83DDC83\";\r\n            _dict[\"D83DDC84\"] = \"D83DDC84\";\r\n            _dict[\"D83DDC85\"] = \"D83DDC85\";\r\n            _dict[\"D83DDC88\"] = \"D83DDC88\";\r\n            _dict[\"D83DDC89\"] = \"D83DDC89\";\r\n            _dict[\"D83DDC8A\"] = \"D83DDC8A\";\r\n            _dict[\"D83DDC8B\"] = \"D83DDC8B\";\r\n            _dict[\"D83DDC8C\"] = \"D83DDC8C\";\r\n            _dict[\"D83DDC8D\"] = \"D83DDC8D\";\r\n            _dict[\"D83DDC8E\"] = \"D83DDC8E\";\r\n            _dict[\"D83DDC8F\"] = \"D83DDC8F\";\r\n            _dict[\"D83DDC90\"] = \"D83DDC90\";\r\n            _dict[\"D83DDC91\"] = \"D83DDC91\";\r\n            _dict[\"D83DDC92\"] = \"D83DDC92\";\r\n            _dict[\"D83DDC93\"] = \"D83DDC93\";\r\n            _dict[\"D83DDC94\"] = \"D83DDC94\";\r\n            _dict[\"D83DDC95\"] = \"D83DDC95\";\r\n            _dict[\"D83DDC96\"] = \"D83DDC96\";\r\n            _dict[\"D83DDC97\"] = \"D83DDC97\";\r\n            _dict[\"D83DDC98\"] = \"D83DDC98\";\r\n            _dict[\"D83DDC99\"] = \"D83DDC99\";\r\n            _dict[\"D83DDC9A\"] = \"D83DDC9A\";\r\n            _dict[\"D83DDC9B\"] = \"D83DDC9B\";\r\n            _dict[\"D83DDC9C\"] = \"D83DDC9C\";\r\n            _dict[\"D83DDC9D\"] = \"D83DDC9D\";\r\n            _dict[\"D83DDC9E\"] = \"D83DDC9E\";\r\n            _dict[\"D83DDC9F\"] = \"D83DDC9F\";\r\n            _dict[\"D83DDCA0\"] = \"D83DDCA0\";\r\n            _dict[\"D83DDCA1\"] = \"D83DDCA1\";\r\n            _dict[\"D83DDCA2\"] = \"D83DDCA2\";\r\n            _dict[\"D83DDCA3\"] = \"D83DDCA3\";\r\n            _dict[\"D83DDCA4\"] = \"D83DDCA4\";\r\n            _dict[\"D83DDCA5\"] = \"D83DDCA5\";\r\n            _dict[\"D83DDCA6\"] = \"D83DDCA6\";\r\n            _dict[\"D83DDCA7\"] = \"D83DDCA7\";\r\n            _dict[\"D83DDCA8\"] = \"D83DDCA8\";\r\n            _dict[\"D83DDCA9\"] = \"D83DDCA9\";\r\n            _dict[\"D83DDCAA\"] = \"D83DDCAA\";\r\n            _dict[\"D83DDCAB\"] = \"D83DDCAB\";\r\n            _dict[\"D83DDCAC\"] = \"D83DDCAC\";\r\n            _dict[\"D83DDCAD\"] = \"D83DDCAD\";\r\n            _dict[\"D83DDCAE\"] = \"D83DDCAE\";\r\n            _dict[\"D83DDCAF\"] = \"D83DDCAF\";\r\n            _dict[\"D83DDCB0\"] = \"D83DDCB0\";\r\n            _dict[\"D83DDCB1\"] = \"D83DDCB1\";\r\n            _dict[\"D83DDCB2\"] = \"D83DDCB2\";\r\n            _dict[\"D83DDCB3\"] = \"D83DDCB3\";\r\n            _dict[\"D83DDCB4\"] = \"D83DDCB4\";\r\n            _dict[\"D83DDCB5\"] = \"D83DDCB5\";\r\n            _dict[\"D83DDCB6\"] = \"D83DDCB6\";\r\n            _dict[\"D83DDCB7\"] = \"D83DDCB7\";\r\n            _dict[\"D83DDCB8\"] = \"D83DDCB8\";\r\n            _dict[\"D83DDCB9\"] = \"D83DDCB9\";\r\n            _dict[\"D83DDCBA\"] = \"D83DDCBA\";\r\n            _dict[\"D83DDCBB\"] = \"D83DDCBB\";\r\n            _dict[\"D83DDCBC\"] = \"D83DDCBC\";\r\n            _dict[\"D83DDCBD\"] = \"D83DDCBD\";\r\n            _dict[\"D83DDCBE\"] = \"D83DDCBE\";\r\n            _dict[\"D83DDCBF\"] = \"D83DDCBF\";\r\n            _dict[\"D83DDCC0\"] = \"D83DDCC0\";\r\n            _dict[\"D83DDCC1\"] = \"D83DDCC1\";\r\n            _dict[\"D83DDCC2\"] = \"D83DDCC2\";\r\n            _dict[\"D83DDCC3\"] = \"D83DDCC3\";\r\n            _dict[\"D83DDCC4\"] = \"D83DDCC4\";\r\n            _dict[\"D83DDCC5\"] = \"D83DDCC5\";\r\n            _dict[\"D83DDCC6\"] = \"D83DDCC6\";\r\n            _dict[\"D83DDCC7\"] = \"D83DDCC7\";\r\n            _dict[\"D83DDCC8\"] = \"D83DDCC8\";\r\n            _dict[\"D83DDCC9\"] = \"D83DDCC9\";\r\n            _dict[\"D83DDCCA\"] = \"D83DDCCA\";\r\n            _dict[\"D83DDCCB\"] = \"D83DDCCB\";\r\n            _dict[\"D83DDCCC\"] = \"D83DDCCC\";\r\n            _dict[\"D83DDCCD\"] = \"D83DDCCD\";\r\n            _dict[\"D83DDCCE\"] = \"D83DDCCE\";\r\n            _dict[\"D83DDCCF\"] = \"D83DDCCF\";\r\n            _dict[\"D83DDCD0\"] = \"D83DDCD0\";\r\n            _dict[\"D83DDCD1\"] = \"D83DDCD1\";\r\n            _dict[\"D83DDCD2\"] = \"D83DDCD2\";\r\n            _dict[\"D83DDCD3\"] = \"D83DDCD3\";\r\n            _dict[\"D83DDCD4\"] = \"D83DDCD4\";\r\n            _dict[\"D83DDCD5\"] = \"D83DDCD5\";\r\n            _dict[\"D83DDCD6\"] = \"D83DDCD6\";\r\n            _dict[\"D83DDCD7\"] = \"D83DDCD7\";\r\n            _dict[\"D83DDCD8\"] = \"D83DDCD8\";\r\n            _dict[\"D83DDCD9\"] = \"D83DDCD9\";\r\n            _dict[\"D83DDCDA\"] = \"D83DDCDA\";\r\n            _dict[\"D83DDCDB\"] = \"D83DDCDB\";\r\n            _dict[\"D83DDCDC\"] = \"D83DDCDC\";\r\n            _dict[\"D83DDCDD\"] = \"D83DDCDD\";\r\n            _dict[\"D83DDCDE\"] = \"D83DDCDE\";\r\n            _dict[\"D83DDCDF\"] = \"D83DDCDF\";\r\n            _dict[\"D83DDCE0\"] = \"D83DDCE0\";\r\n            _dict[\"D83DDCE1\"] = \"D83DDCE1\";\r\n            _dict[\"D83DDCE2\"] = \"D83DDCE2\";\r\n            _dict[\"D83DDCE3\"] = \"D83DDCE3\";\r\n            _dict[\"D83DDCE4\"] = \"D83DDCE4\";\r\n            _dict[\"D83DDCE5\"] = \"D83DDCE5\";\r\n            _dict[\"D83DDCE6\"] = \"D83DDCE6\";\r\n            _dict[\"D83DDCE7\"] = \"D83DDCE7\";\r\n            _dict[\"D83DDCE8\"] = \"D83DDCE8\";\r\n            _dict[\"D83DDCE9\"] = \"D83DDCE9\";\r\n            _dict[\"D83DDCEA\"] = \"D83DDCEA\";\r\n            _dict[\"D83DDCEB\"] = \"D83DDCEB\";\r\n            _dict[\"D83DDCEC\"] = \"D83DDCEC\";\r\n            _dict[\"D83DDCED\"] = \"D83DDCED\";\r\n            _dict[\"D83DDCEE\"] = \"D83DDCEE\";\r\n            _dict[\"D83DDCEF\"] = \"D83DDCEF\";\r\n            _dict[\"D83DDCF0\"] = \"D83DDCF0\";\r\n            _dict[\"D83DDCF1\"] = \"D83DDCF1\";\r\n            _dict[\"D83DDCF2\"] = \"D83DDCF2\";\r\n            _dict[\"D83DDCF3\"] = \"D83DDCF3\";\r\n            _dict[\"D83DDCF4\"] = \"D83DDCF4\";\r\n            _dict[\"D83DDCF5\"] = \"D83DDCF5\";\r\n            _dict[\"D83DDCF6\"] = \"D83DDCF6\";\r\n            _dict[\"D83DDCF7\"] = \"D83DDCF7\";\r\n            _dict[\"D83DDCF8\"] = \"D83DDCF8\";\r\n            _dict[\"D83DDCF9\"] = \"D83DDCF9\";\r\n            _dict[\"D83DDCFA\"] = \"D83DDCFA\";\r\n            _dict[\"D83DDCFB\"] = \"D83DDCFB\";\r\n            _dict[\"D83DDCFC\"] = \"D83DDCFC\";\r\n            _dict[\"D83DDCFD\"] = \"D83DDCFD\";\r\n            _dict[\"D83DDCFF\"] = \"D83DDCFF\";\r\n            _dict[\"D83DDD00\"] = \"D83DDD00\";\r\n            _dict[\"D83DDD01\"] = \"D83DDD01\";\r\n            _dict[\"D83DDD02\"] = \"D83DDD02\";\r\n            _dict[\"D83DDD03\"] = \"D83DDD03\";\r\n            _dict[\"D83DDD04\"] = \"D83DDD04\";\r\n            _dict[\"D83DDD05\"] = \"D83DDD05\";\r\n            _dict[\"D83DDD06\"] = \"D83DDD06\";\r\n            _dict[\"D83DDD07\"] = \"D83DDD07\";\r\n            _dict[\"D83DDD08\"] = \"D83DDD08\";\r\n            _dict[\"D83DDD09\"] = \"D83DDD09\";\r\n            _dict[\"D83DDD0A\"] = \"D83DDD0A\";\r\n            _dict[\"D83DDD0B\"] = \"D83DDD0B\";\r\n            _dict[\"D83DDD0C\"] = \"D83DDD0C\";\r\n            _dict[\"D83DDD0D\"] = \"D83DDD0D\";\r\n            _dict[\"D83DDD0E\"] = \"D83DDD0E\";\r\n            _dict[\"D83DDD0F\"] = \"D83DDD0F\";\r\n            _dict[\"D83DDD10\"] = \"D83DDD10\";\r\n            _dict[\"D83DDD11\"] = \"D83DDD11\";\r\n            _dict[\"D83DDD12\"] = \"D83DDD12\";\r\n            _dict[\"D83DDD13\"] = \"D83DDD13\";\r\n            _dict[\"D83DDD14\"] = \"D83DDD14\";\r\n            _dict[\"D83DDD15\"] = \"D83DDD15\";\r\n            _dict[\"D83DDD16\"] = \"D83DDD16\";\r\n            _dict[\"D83DDD17\"] = \"D83DDD17\";\r\n            _dict[\"D83DDD18\"] = \"D83DDD18\";\r\n            _dict[\"D83DDD19\"] = \"D83DDD19\";\r\n            _dict[\"D83DDD1A\"] = \"D83DDD1A\";\r\n            _dict[\"D83DDD1B\"] = \"D83DDD1B\";\r\n            _dict[\"D83DDD1C\"] = \"D83DDD1C\";\r\n            _dict[\"D83DDD1D\"] = \"D83DDD1D\";\r\n            _dict[\"D83DDD1E\"] = \"D83DDD1E\";\r\n            _dict[\"D83DDD1F\"] = \"D83DDD1F\";\r\n            _dict[\"D83DDD20\"] = \"D83DDD20\";\r\n            _dict[\"D83DDD21\"] = \"D83DDD21\";\r\n            _dict[\"D83DDD22\"] = \"D83DDD22\";\r\n            _dict[\"D83DDD23\"] = \"D83DDD23\";\r\n            _dict[\"D83DDD24\"] = \"D83DDD24\";\r\n            _dict[\"D83DDD25\"] = \"D83DDD25\";\r\n            _dict[\"D83DDD27\"] = \"D83DDD27\";\r\n            _dict[\"D83DDD28\"] = \"D83DDD28\";\r\n            _dict[\"D83DDD29\"] = \"D83DDD29\";\r\n            _dict[\"D83DDD2A\"] = \"D83DDD2A\";\r\n            _dict[\"D83DDD2B\"] = \"D83DDD2B\";\r\n            _dict[\"D83DDD2C\"] = \"D83DDD2C\";\r\n            _dict[\"D83DDD2D\"] = \"D83DDD2D\";\r\n            _dict[\"D83DDD2E\"] = \"D83DDD2E\";\r\n            _dict[\"D83DDD2F\"] = \"D83DDD2F\";\r\n            _dict[\"D83DDD30\"] = \"D83DDD30\";\r\n            _dict[\"D83DDD31\"] = \"D83DDD31\";\r\n            _dict[\"D83DDD32\"] = \"D83DDD32\";\r\n            _dict[\"D83DDD33\"] = \"D83DDD33\";\r\n            _dict[\"D83DDD34\"] = \"D83DDD34\";\r\n            _dict[\"D83DDD35\"] = \"D83DDD35\";\r\n            _dict[\"D83DDD36\"] = \"D83DDD36\";\r\n            _dict[\"D83DDD37\"] = \"D83DDD37\";\r\n            _dict[\"D83DDD38\"] = \"D83DDD38\";\r\n            _dict[\"D83DDD39\"] = \"D83DDD39\";\r\n            _dict[\"D83DDD3A\"] = \"D83DDD3A\";\r\n            _dict[\"D83DDD3B\"] = \"D83DDD3B\";\r\n            _dict[\"D83DDD3C\"] = \"D83DDD3C\";\r\n            _dict[\"D83DDD3D\"] = \"D83DDD3D\";\r\n            _dict[\"D83DDD49\"] = \"D83DDD49\";\r\n            _dict[\"D83DDD4A\"] = \"D83DDD4A\";\r\n            _dict[\"D83DDD4B\"] = \"D83DDD4B\";\r\n            _dict[\"D83DDD4C\"] = \"D83DDD4C\";\r\n            _dict[\"D83DDD4D\"] = \"D83DDD4D\";\r\n            _dict[\"D83DDD4E\"] = \"D83DDD4E\";\r\n            _dict[\"D83DDD50\"] = \"D83DDD50\";\r\n            _dict[\"D83DDD51\"] = \"D83DDD51\";\r\n            _dict[\"D83DDD52\"] = \"D83DDD52\";\r\n            _dict[\"D83DDD53\"] = \"D83DDD53\";\r\n            _dict[\"D83DDD54\"] = \"D83DDD54\";\r\n            _dict[\"D83DDD55\"] = \"D83DDD55\";\r\n            _dict[\"D83DDD56\"] = \"D83DDD56\";\r\n            _dict[\"D83DDD57\"] = \"D83DDD57\";\r\n            _dict[\"D83DDD58\"] = \"D83DDD58\";\r\n            _dict[\"D83DDD59\"] = \"D83DDD59\";\r\n            _dict[\"D83DDD5A\"] = \"D83DDD5A\";\r\n            _dict[\"D83DDD5B\"] = \"D83DDD5B\";\r\n            _dict[\"D83DDD5C\"] = \"D83DDD5C\";\r\n            _dict[\"D83DDD5D\"] = \"D83DDD5D\";\r\n            _dict[\"D83DDD5E\"] = \"D83DDD5E\";\r\n            _dict[\"D83DDD5F\"] = \"D83DDD5F\";\r\n            _dict[\"D83DDD60\"] = \"D83DDD60\";\r\n            _dict[\"D83DDD61\"] = \"D83DDD61\";\r\n            _dict[\"D83DDD62\"] = \"D83DDD62\";\r\n            _dict[\"D83DDD63\"] = \"D83DDD63\";\r\n            _dict[\"D83DDD64\"] = \"D83DDD64\";\r\n            _dict[\"D83DDD65\"] = \"D83DDD65\";\r\n            _dict[\"D83DDD66\"] = \"D83DDD66\";\r\n            _dict[\"D83DDD67\"] = \"D83DDD67\";\r\n            _dict[\"D83DDD6F\"] = \"D83DDD6F\";\r\n            _dict[\"D83DDD70\"] = \"D83DDD70\";\r\n            _dict[\"D83DDD73\"] = \"D83DDD73\";\r\n            _dict[\"D83DDD76\"] = \"D83DDD76\";\r\n            _dict[\"D83DDD77\"] = \"D83DDD77\";\r\n            _dict[\"D83DDD78\"] = \"D83DDD78\";\r\n            _dict[\"D83DDD79\"] = \"D83DDD79\";\r\n            _dict[\"D83DDD87\"] = \"D83DDD87\";\r\n            _dict[\"D83DDD8A\"] = \"D83DDD8A\";\r\n            _dict[\"D83DDD8B\"] = \"D83DDD8B\";\r\n            _dict[\"D83DDD8C\"] = \"D83DDD8C\";\r\n            _dict[\"D83DDD8D\"] = \"D83DDD8D\";\r\n            _dict[\"D83DDDA4\"] = \"D83DDDA4\";\r\n            _dict[\"D83DDDA5\"] = \"D83DDDA5\";\r\n            _dict[\"D83DDDA8\"] = \"D83DDDA8\";\r\n            _dict[\"D83DDDB1\"] = \"D83DDDB1\";\r\n            _dict[\"D83DDDB2\"] = \"D83DDDB2\";\r\n            _dict[\"D83DDDBC\"] = \"D83DDDBC\";\r\n            _dict[\"D83DDDC2\"] = \"D83DDDC2\";\r\n            _dict[\"D83DDDC3\"] = \"D83DDDC3\";\r\n            _dict[\"D83DDDC4\"] = \"D83DDDC4\";\r\n            _dict[\"D83DDDD1\"] = \"D83DDDD1\";\r\n            _dict[\"D83DDDD2\"] = \"D83DDDD2\";\r\n            _dict[\"D83DDDD3\"] = \"D83DDDD3\";\r\n            _dict[\"D83DDDDC\"] = \"D83DDDDC\";\r\n            _dict[\"D83DDDDD\"] = \"D83DDDDD\";\r\n            _dict[\"D83DDDDE\"] = \"D83DDDDE\";\r\n            _dict[\"D83DDDE1\"] = \"D83DDDE1\";\r\n            _dict[\"D83DDDE3\"] = \"D83DDDE3\";\r\n            _dict[\"D83DDDE8\"] = \"D83DDDE8\";\r\n            _dict[\"D83DDDEF\"] = \"D83DDDEF\";\r\n            _dict[\"D83DDDF3\"] = \"D83DDDF3\";\r\n            _dict[\"D83DDDFA\"] = \"D83DDDFA\";\r\n            _dict[\"D83DDDFB\"] = \"D83DDDFB\";\r\n            _dict[\"D83DDDFC\"] = \"D83DDDFC\";\r\n            _dict[\"D83DDDFD\"] = \"D83DDDFD\";\r\n            _dict[\"D83DDDFE\"] = \"D83DDDFE\";\r\n            _dict[\"D83DDDFF\"] = \"D83DDDFF\";\r\n            _dict[\"D83DDE00\"] = \"D83DDE00\";\r\n            _dict[\"D83DDE01\"] = \"D83DDE01\";\r\n            _dict[\"D83DDE02\"] = \"D83DDE02\";\r\n            _dict[\"D83DDE03\"] = \"D83DDE03\";\r\n            _dict[\"D83DDE04\"] = \"D83DDE04\";\r\n            _dict[\"D83DDE05\"] = \"D83DDE05\";\r\n            _dict[\"D83DDE06\"] = \"D83DDE06\";\r\n            _dict[\"D83DDE07\"] = \"D83DDE07\";\r\n            _dict[\"D83DDE08\"] = \"D83DDE08\";\r\n            _dict[\"D83DDE09\"] = \"D83DDE09\";\r\n            _dict[\"D83DDE0A\"] = \"D83DDE0A\";\r\n            _dict[\"D83DDE0B\"] = \"D83DDE0B\";\r\n            _dict[\"D83DDE0C\"] = \"D83DDE0C\";\r\n            _dict[\"D83DDE0D\"] = \"D83DDE0D\";\r\n            _dict[\"D83DDE0E\"] = \"D83DDE0E\";\r\n            _dict[\"D83DDE0F\"] = \"D83DDE0F\";\r\n            _dict[\"D83DDE10\"] = \"D83DDE10\";\r\n            _dict[\"D83DDE11\"] = \"D83DDE11\";\r\n            _dict[\"D83DDE12\"] = \"D83DDE12\";\r\n            _dict[\"D83DDE13\"] = \"D83DDE13\";\r\n            _dict[\"D83DDE14\"] = \"D83DDE14\";\r\n            _dict[\"D83DDE15\"] = \"D83DDE15\";\r\n            _dict[\"D83DDE16\"] = \"D83DDE16\";\r\n            _dict[\"D83DDE17\"] = \"D83DDE17\";\r\n            _dict[\"D83DDE18\"] = \"D83DDE18\";\r\n            _dict[\"D83DDE19\"] = \"D83DDE19\";\r\n            _dict[\"D83DDE1A\"] = \"D83DDE1A\";\r\n            _dict[\"D83DDE1B\"] = \"D83DDE1B\";\r\n            _dict[\"D83DDE1C\"] = \"D83DDE1C\";\r\n            _dict[\"D83DDE1D\"] = \"D83DDE1D\";\r\n            _dict[\"D83DDE1E\"] = \"D83DDE1E\";\r\n            _dict[\"D83DDE1F\"] = \"D83DDE1F\";\r\n            _dict[\"D83DDE20\"] = \"D83DDE20\";\r\n            _dict[\"D83DDE21\"] = \"D83DDE21\";\r\n            _dict[\"D83DDE22\"] = \"D83DDE22\";\r\n            _dict[\"D83DDE23\"] = \"D83DDE23\";\r\n            _dict[\"D83DDE24\"] = \"D83DDE24\";\r\n            _dict[\"D83DDE25\"] = \"D83DDE25\";\r\n            _dict[\"D83DDE26\"] = \"D83DDE26\";\r\n            _dict[\"D83DDE27\"] = \"D83DDE27\";\r\n            _dict[\"D83DDE28\"] = \"D83DDE28\";\r\n            _dict[\"D83DDE29\"] = \"D83DDE29\";\r\n            _dict[\"D83DDE2A\"] = \"D83DDE2A\";\r\n            _dict[\"D83DDE2B\"] = \"D83DDE2B\";\r\n            _dict[\"D83DDE2C\"] = \"D83DDE2C\";\r\n            _dict[\"D83DDE2D\"] = \"D83DDE2D\";\r\n            _dict[\"D83DDE2E\"] = \"D83DDE2E\";\r\n            _dict[\"D83DDE2F\"] = \"D83DDE2F\";\r\n            _dict[\"D83DDE30\"] = \"D83DDE30\";\r\n            _dict[\"D83DDE31\"] = \"D83DDE31\";\r\n            _dict[\"D83DDE32\"] = \"D83DDE32\";\r\n            _dict[\"D83DDE33\"] = \"D83DDE33\";\r\n            _dict[\"D83DDE34\"] = \"D83DDE34\";\r\n            _dict[\"D83DDE35\"] = \"D83DDE35\";\r\n            _dict[\"D83DDE36\"] = \"D83DDE36\";\r\n            _dict[\"D83DDE37\"] = \"D83DDE37\";\r\n            _dict[\"D83DDE38\"] = \"D83DDE38\";\r\n            _dict[\"D83DDE39\"] = \"D83DDE39\";\r\n            _dict[\"D83DDE3A\"] = \"D83DDE3A\";\r\n            _dict[\"D83DDE3B\"] = \"D83DDE3B\";\r\n            _dict[\"D83DDE3C\"] = \"D83DDE3C\";\r\n            _dict[\"D83DDE3D\"] = \"D83DDE3D\";\r\n            _dict[\"D83DDE3E\"] = \"D83DDE3E\";\r\n            _dict[\"D83DDE3F\"] = \"D83DDE3F\";\r\n            _dict[\"D83DDE40\"] = \"D83DDE40\";\r\n            _dict[\"D83DDE41\"] = \"D83DDE41\";\r\n            _dict[\"D83DDE42\"] = \"D83DDE42\";\r\n            _dict[\"D83DDE43\"] = \"D83DDE43\";\r\n            _dict[\"D83DDE44\"] = \"D83DDE44\";\r\n            _dict[\"D83DDE47\"] = \"D83DDE47\";\r\n            _dict[\"D83DDE48\"] = \"D83DDE48\";\r\n            _dict[\"D83DDE49\"] = \"D83DDE49\";\r\n            _dict[\"D83DDE4A\"] = \"D83DDE4A\";\r\n            _dict[\"D83DDE4F\"] = \"D83DDE4F\";\r\n            _dict[\"D83DDE80\"] = \"D83DDE80\";\r\n            _dict[\"D83DDE81\"] = \"D83DDE81\";\r\n            _dict[\"D83DDE82\"] = \"D83DDE82\";\r\n            _dict[\"D83DDE83\"] = \"D83DDE83\";\r\n            _dict[\"D83DDE84\"] = \"D83DDE84\";\r\n            _dict[\"D83DDE85\"] = \"D83DDE85\";\r\n            _dict[\"D83DDE86\"] = \"D83DDE86\";\r\n            _dict[\"D83DDE87\"] = \"D83DDE87\";\r\n            _dict[\"D83DDE88\"] = \"D83DDE88\";\r\n            _dict[\"D83DDE89\"] = \"D83DDE89\";\r\n            _dict[\"D83DDE8A\"] = \"D83DDE8A\";\r\n            _dict[\"D83DDE8B\"] = \"D83DDE8B\";\r\n            _dict[\"D83DDE8C\"] = \"D83DDE8C\";\r\n            _dict[\"D83DDE8D\"] = \"D83DDE8D\";\r\n            _dict[\"D83DDE8E\"] = \"D83DDE8E\";\r\n            _dict[\"D83DDE8F\"] = \"D83DDE8F\";\r\n            _dict[\"D83DDE90\"] = \"D83DDE90\";\r\n            _dict[\"D83DDE91\"] = \"D83DDE91\";\r\n            _dict[\"D83DDE92\"] = \"D83DDE92\";\r\n            _dict[\"D83DDE93\"] = \"D83DDE93\";\r\n            _dict[\"D83DDE94\"] = \"D83DDE94\";\r\n            _dict[\"D83DDE95\"] = \"D83DDE95\";\r\n            _dict[\"D83DDE96\"] = \"D83DDE96\";\r\n            _dict[\"D83DDE97\"] = \"D83DDE97\";\r\n            _dict[\"D83DDE98\"] = \"D83DDE98\";\r\n            _dict[\"D83DDE99\"] = \"D83DDE99\";\r\n            _dict[\"D83DDE9A\"] = \"D83DDE9A\";\r\n            _dict[\"D83DDE9B\"] = \"D83DDE9B\";\r\n            _dict[\"D83DDE9C\"] = \"D83DDE9C\";\r\n            _dict[\"D83DDE9D\"] = \"D83DDE9D\";\r\n            _dict[\"D83DDE9E\"] = \"D83DDE9E\";\r\n            _dict[\"D83DDE9F\"] = \"D83DDE9F\";\r\n            _dict[\"D83DDEA0\"] = \"D83DDEA0\";\r\n            _dict[\"D83DDEA1\"] = \"D83DDEA1\";\r\n            _dict[\"D83DDEA2\"] = \"D83DDEA2\";\r\n            _dict[\"D83DDEA4\"] = \"D83DDEA4\";\r\n            _dict[\"D83DDEA5\"] = \"D83DDEA5\";\r\n            _dict[\"D83DDEA6\"] = \"D83DDEA6\";\r\n            _dict[\"D83DDEA7\"] = \"D83DDEA7\";\r\n            _dict[\"D83DDEA8\"] = \"D83DDEA8\";\r\n            _dict[\"D83DDEA9\"] = \"D83DDEA9\";\r\n            _dict[\"D83DDEAA\"] = \"D83DDEAA\";\r\n            _dict[\"D83DDEAB\"] = \"D83DDEAB\";\r\n            _dict[\"D83DDEAC\"] = \"D83DDEAC\";\r\n            _dict[\"D83DDEAD\"] = \"D83DDEAD\";\r\n            _dict[\"D83DDEAE\"] = \"D83DDEAE\";\r\n            _dict[\"D83DDEAF\"] = \"D83DDEAF\";\r\n            _dict[\"D83DDEB0\"] = \"D83DDEB0\";\r\n            _dict[\"D83DDEB1\"] = \"D83DDEB1\";\r\n            _dict[\"D83DDEB2\"] = \"D83DDEB2\";\r\n            _dict[\"D83DDEB3\"] = \"D83DDEB3\";\r\n            _dict[\"D83DDEB7\"] = \"D83DDEB7\";\r\n            _dict[\"D83DDEB8\"] = \"D83DDEB8\";\r\n            _dict[\"D83DDEB9\"] = \"D83DDEB9\";\r\n            _dict[\"D83DDEBA\"] = \"D83DDEBA\";\r\n            _dict[\"D83DDEBB\"] = \"D83DDEBB\";\r\n            _dict[\"D83DDEBC\"] = \"D83DDEBC\";\r\n            _dict[\"D83DDEBD\"] = \"D83DDEBD\";\r\n            _dict[\"D83DDEBE\"] = \"D83DDEBE\";\r\n            _dict[\"D83DDEBF\"] = \"D83DDEBF\";\r\n            _dict[\"D83DDEC0\"] = \"D83DDEC0\";\r\n            _dict[\"D83DDEC1\"] = \"D83DDEC1\";\r\n            _dict[\"D83DDEC2\"] = \"D83DDEC2\";\r\n            _dict[\"D83DDEC3\"] = \"D83DDEC3\";\r\n            _dict[\"D83DDEC4\"] = \"D83DDEC4\";\r\n            _dict[\"D83DDEC5\"] = \"D83DDEC5\";\r\n            _dict[\"D83DDECB\"] = \"D83DDECB\";\r\n            _dict[\"D83DDECC\"] = \"D83DDECC\";\r\n            _dict[\"D83DDECD\"] = \"D83DDECD\";\r\n            _dict[\"D83DDECE\"] = \"D83DDECE\";\r\n            _dict[\"D83DDECF\"] = \"D83DDECF\";\r\n            _dict[\"D83DDED0\"] = \"D83DDED0\";\r\n            _dict[\"D83DDED1\"] = \"D83DDED1\";\r\n            _dict[\"D83DDED2\"] = \"D83DDED2\";\r\n            _dict[\"D83DDEE0\"] = \"D83DDEE0\";\r\n            _dict[\"D83DDEE1\"] = \"D83DDEE1\";\r\n            _dict[\"D83DDEE2\"] = \"D83DDEE2\";\r\n            _dict[\"D83DDEE3\"] = \"D83DDEE3\";\r\n            _dict[\"D83DDEE4\"] = \"D83DDEE4\";\r\n            _dict[\"D83DDEE5\"] = \"D83DDEE5\";\r\n            _dict[\"D83DDEE9\"] = \"D83DDEE9\";\r\n            _dict[\"D83DDEEB\"] = \"D83DDEEB\";\r\n            _dict[\"D83DDEEC\"] = \"D83DDEEC\";\r\n            _dict[\"D83DDEF0\"] = \"D83DDEF0\";\r\n            _dict[\"D83DDEF3\"] = \"D83DDEF3\";\r\n            _dict[\"D83DDEF4\"] = \"D83DDEF4\";\r\n            _dict[\"D83DDEF5\"] = \"D83DDEF5\";\r\n            _dict[\"D83DDEF6\"] = \"D83DDEF6\";\r\n\r\n            _dict[\"D83EDD10\"] = \"D83EDD10\";\r\n            _dict[\"D83EDD11\"] = \"D83EDD11\";\r\n            _dict[\"D83EDD12\"] = \"D83EDD12\";\r\n            _dict[\"D83EDD13\"] = \"D83EDD13\";\r\n            _dict[\"D83EDD14\"] = \"D83EDD14\";\r\n            _dict[\"D83EDD15\"] = \"D83EDD15\";\r\n            _dict[\"D83EDD16\"] = \"D83EDD16\";\r\n            _dict[\"D83EDD17\"] = \"D83EDD17\";\r\n            _dict[\"D83EDD18\"] = \"D83EDD18\";\r\n            _dict[\"D83EDD1D\"] = \"D83EDD1D\";\r\n            _dict[\"D83EDD20\"] = \"D83EDD20\";\r\n            _dict[\"D83EDD21\"] = \"D83EDD21\";\r\n            _dict[\"D83EDD22\"] = \"D83EDD22\";\r\n            _dict[\"D83EDD23\"] = \"D83EDD23\";\r\n            _dict[\"D83EDD24\"] = \"D83EDD24\";\r\n            _dict[\"D83EDD25\"] = \"D83EDD25\";\r\n            _dict[\"D83EDD27\"] = \"D83EDD27\";\r\n            _dict[\"D83EDD33\"] = \"D83EDD33\";\r\n            _dict[\"D83EDD35\"] = \"D83EDD35\";\r\n            _dict[\"D83EDD3A\"] = \"D83EDD3A\";\r\n            _dict[\"D83EDD40\"] = \"D83EDD40\";\r\n            _dict[\"D83EDD41\"] = \"D83EDD41\";\r\n            _dict[\"D83EDD42\"] = \"D83EDD42\";\r\n            _dict[\"D83EDD43\"] = \"D83EDD43\";\r\n            _dict[\"D83EDD44\"] = \"D83EDD44\";\r\n            _dict[\"D83EDD45\"] = \"D83EDD45\";\r\n            _dict[\"D83EDD47\"] = \"D83EDD47\";\r\n            _dict[\"D83EDD48\"] = \"D83EDD48\";\r\n            _dict[\"D83EDD49\"] = \"D83EDD49\";\r\n            _dict[\"D83EDD4A\"] = \"D83EDD4A\";\r\n            _dict[\"D83EDD4B\"] = \"D83EDD4B\";\r\n            _dict[\"D83EDD50\"] = \"D83EDD50\";\r\n            _dict[\"D83EDD51\"] = \"D83EDD51\";\r\n            _dict[\"D83EDD52\"] = \"D83EDD52\";\r\n            _dict[\"D83EDD53\"] = \"D83EDD53\";\r\n            _dict[\"D83EDD54\"] = \"D83EDD54\";\r\n            _dict[\"D83EDD55\"] = \"D83EDD55\";\r\n            _dict[\"D83EDD56\"] = \"D83EDD56\";\r\n            _dict[\"D83EDD57\"] = \"D83EDD57\";\r\n            _dict[\"D83EDD58\"] = \"D83EDD58\";\r\n            _dict[\"D83EDD59\"] = \"D83EDD59\";\r\n            _dict[\"D83EDD5A\"] = \"D83EDD5A\";\r\n            _dict[\"D83EDD5B\"] = \"D83EDD5B\";\r\n            _dict[\"D83EDD5C\"] = \"D83EDD5C\";\r\n            _dict[\"D83EDD5D\"] = \"D83EDD5D\";\r\n            _dict[\"D83EDD5E\"] = \"D83EDD5E\";\r\n            _dict[\"D83EDD80\"] = \"D83EDD80\";\r\n            _dict[\"D83EDD81\"] = \"D83EDD81\";\r\n            _dict[\"D83EDD82\"] = \"D83EDD82\";\r\n            _dict[\"D83EDD83\"] = \"D83EDD83\";\r\n            _dict[\"D83EDD84\"] = \"D83EDD84\";\r\n            _dict[\"D83EDD85\"] = \"D83EDD85\";\r\n            _dict[\"D83EDD86\"] = \"D83EDD86\";\r\n            _dict[\"D83EDD87\"] = \"D83EDD87\";\r\n            _dict[\"D83EDD88\"] = \"D83EDD88\";\r\n            _dict[\"D83EDD89\"] = \"D83EDD89\";\r\n            _dict[\"D83EDD8A\"] = \"D83EDD8A\";\r\n            _dict[\"D83EDD8B\"] = \"D83EDD8B\";\r\n            _dict[\"D83EDD8C\"] = \"D83EDD8C\";\r\n            _dict[\"D83EDD8D\"] = \"D83EDD8D\";\r\n            _dict[\"D83EDD8E\"] = \"D83EDD8E\";\r\n            _dict[\"D83EDD8F\"] = \"D83EDD8F\";\r\n            _dict[\"D83EDD90\"] = \"D83EDD90\";\r\n            _dict[\"D83EDD91\"] = \"D83EDD91\";\r\n            _dict[\"D83EDDC0\"] = \"D83EDDC0\";\r\n\r\n            _dict[\"2639\"] = \"2639FE0F\";\r\n            _dict[\"263AFE0F\"] = \"263A\";\r\n            _dict[\"26AAFE0F\"] = \"26AA\";\r\n            _dict[\"26ABFE0F\"] = \"26AB\";\r\n            _dict[\"25AAFE0F\"] = \"25AA\";\r\n            _dict[\"25ABFE0F\"] = \"25AB\";\r\n            _dict[\"2B1BFE0F\"] = \"2B1B\";\r\n            _dict[\"2B1CFE0F\"] = \"2B1C\";\r\n            _dict[\"25FBFE0F\"] = \"25FB\";\r\n            _dict[\"25FCFE0F\"] = \"25FC\";\r\n            _dict[\"25FDFE0F\"] = \"25FD\";\r\n            _dict[\"25FEFE0F\"] = \"25FE\";\r\n            _dict[\"25B6FE0F\"] = \"25B6\";\r\n\r\n            _dict[\"0023FE0F20E3\"] = \"002320E3\";\r\n            _dict[\"002AFE0F20E3\"] = \"002A20E3\";\r\n            _dict[\"0030FE0F20E3\"] = \"003020E3\";\r\n            _dict[\"0031FE0F20E3\"] = \"003120E3\";\r\n            _dict[\"0032FE0F20E3\"] = \"003220E3\";\r\n            _dict[\"0033FE0F20E3\"] = \"003320E3\";\r\n            _dict[\"0034FE0F20E3\"] = \"003420E3\";\r\n            _dict[\"0035FE0F20E3\"] = \"003520E3\";\r\n            _dict[\"0036FE0F20E3\"] = \"003620E3\";\r\n            _dict[\"0037FE0F20E3\"] = \"003720E3\";\r\n            _dict[\"0038FE0F20E3\"] = \"003820E3\";\r\n            _dict[\"0039FE0F20E3\"] = \"003920E3\";\r\n        }\r\n    }\r\n\r\n    public static class BrowserNavigationService\r\n    {\r\n        private static double _fontScaleFactor = 1.0;\r\n\r\n        public static double FontScaleFactor\r\n        {\r\n            get { return _fontScaleFactor; }\r\n            set { _fontScaleFactor = value; }\r\n        }\r\n\r\n        // http://daringfireball.net/2010/07/improved_regex_for_matching_urls\r\n        //private static readonly Regex RE_URL = new Regex(@\"(?i)\\b(((?:https?://|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\"\".,<>?«»“”‘’]))|([a-z0-9.\\-]+(\\.ru|\\.com|\\.net|\\.org|\\.us|\\.it|\\.co\\.uk)(?![a-z0-9]))|([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]*[a-zA-Z0-9-]+))\");\r\n\r\n        //public static readonly Regex UserMentionRegex = new Regex(@\"\\[id\\d+.*?\\|.*?\\]\");\r\n        //public static readonly Regex GroupMentionRegex = new Regex(@\"\\[club\\d+.*?\\|.*?\\]\");\r\n\r\n        public static readonly DependencyProperty AddFooterProperty = DependencyProperty.RegisterAttached(\r\n            \"AddFooter\", typeof(bool), typeof(BrowserNavigationService), new PropertyMetadata(default(bool)));\r\n\r\n        public static void SetAddFooter(DependencyObject element, bool value)\r\n        {\r\n            element.SetValue(AddFooterProperty, value);\r\n        }\r\n\r\n        public static bool GetAddFooter(DependencyObject element)\r\n        {\r\n            return (bool)element.GetValue(AddFooterProperty);\r\n        }\r\n\r\n        public static readonly DependencyProperty SuppressParsingProperty = DependencyProperty.RegisterAttached(\r\n            \"SuppressParsing\", typeof(bool), typeof(BrowserNavigationService), new PropertyMetadata(default(bool)));\r\n\r\n        public static void SetSuppressParsing(DependencyObject element, bool value)\r\n        {\r\n            element.SetValue(SuppressParsingProperty, value);\r\n        }\r\n\r\n        public static bool GetSuppressParsing(DependencyObject element)\r\n        {\r\n            return (bool)element.GetValue(SuppressParsingProperty);\r\n        }\r\n\r\n        public static readonly DependencyProperty MediaProperty = DependencyProperty.RegisterAttached(\r\n            \"Media\", typeof(TLMessageMediaBase), typeof(BrowserNavigationService), new PropertyMetadata(default(TLMessageMediaBase)));\r\n\r\n\r\n        public static void SetMedia(DependencyObject element, TLMessageMediaBase value)\r\n        {\r\n            element.SetValue(MediaProperty, value);\r\n        }\r\n\r\n        public static TLMessageMediaBase GetMedia(DependencyObject element)\r\n        {\r\n            return (TLMessageMediaBase)element.GetValue(MediaProperty);\r\n        }\r\n\r\n        public static readonly DependencyProperty MessageProperty = DependencyProperty.RegisterAttached(\r\n            \"Message\", typeof(TLMessageBase), typeof(BrowserNavigationService), new PropertyMetadata(default(TLMessageBase)));\r\n\r\n        public static void SetMessage(DependencyObject element, TLMessageBase value)\r\n        {\r\n            element.SetValue(MessageProperty, value);\r\n        }\r\n\r\n        public static TLMessageBase GetMessage(DependencyObject element)\r\n        {\r\n            return (TLMessageBase)element.GetValue(MessageProperty);\r\n        }\r\n\r\n        public static readonly DependencyProperty DecryptedMessageProperty = DependencyProperty.RegisterAttached(\r\n            \"DecryptedMessage\", typeof(TLDecryptedMessageBase), typeof(BrowserNavigationService), new PropertyMetadata(default(TLDecryptedMessageBase)));\r\n\r\n        public static void SetDecryptedMessage(DependencyObject element, TLDecryptedMessageBase value)\r\n        {\r\n            element.SetValue(DecryptedMessageProperty, value);\r\n        }\r\n\r\n        public static TLDecryptedMessageBase GetDecryptedMessage(DependencyObject element)\r\n        {\r\n            return (TLDecryptedMessageBase)element.GetValue(DecryptedMessageProperty);\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.RegisterAttached(\r\n            \"Text\",\r\n            typeof(string),\r\n            typeof(BrowserNavigationService),\r\n            new PropertyMetadata(null, OnTextChanged)\r\n        );\r\n\r\n        public static string GetText(DependencyObject d)\r\n        {\r\n            return d.GetValue(TextProperty) as string;\r\n        }\r\n\r\n        public static void SetText(DependencyObject d, string value)\r\n        {\r\n            d.SetValue(TextProperty, value);\r\n        }\r\n\r\n        public static event EventHandler<TelegramEventArgs> TelegramLinkAction;\r\n\r\n        private static void RaiseTelegramLinkAction(TelegramEventArgs e)\r\n        {\r\n            var handler = TelegramLinkAction;\r\n            if (handler != null) handler(null, e);\r\n        }\r\n\r\n        public static event EventHandler<TelegramHashtagEventArgs> SearchHashtag;\r\n\r\n        private static void RaiseSearchHashtag(TelegramHashtagEventArgs e)\r\n        {\r\n            var handler = SearchHashtag;\r\n            if (handler != null) handler(null, e);\r\n        }\r\n\r\n        public static event EventHandler<TelegramCommandEventArgs> InvokeCommand;\r\n\r\n        private static void RaiseInvokeCommand(TelegramCommandEventArgs e)\r\n        {\r\n            var handler = InvokeCommand;\r\n            if (handler != null) handler(null, e);\r\n        }\r\n\r\n        public static event EventHandler<TelegramGameEventArgs> OpenGame;\r\n\r\n        private static void RaiseOpenGame(TelegramGameEventArgs e)\r\n        {\r\n            var handler = OpenGame;\r\n            if (handler != null) handler(null, e);\r\n        }\r\n\r\n        public static event EventHandler<TelegramMentionEventArgs> MentionNavigated;\r\n\r\n        private static void RaiseMentionNavigated(TelegramMentionEventArgs e)\r\n        {\r\n            var handler = MentionNavigated;\r\n            if (handler != null) handler(null, e);\r\n        }\r\n\r\n        public static event EventHandler<TelegramPhoneEventArgs> OpenPhone;\r\n\r\n        private static void RaiseOpenPhone(TelegramPhoneEventArgs e)\r\n        {\r\n            var handler = OpenPhone;\r\n            if (handler != null) handler(null, e);\r\n        }\r\n\r\n        public static Hyperlink GetHyperlink(string text, string link, Action<object, string> action, Brush foreground)\r\n        {\r\n            var hyperlink = new Hyperlink { TextDecorations = null, MouseOverTextDecorations = null };\r\n            if (foreground != null)\r\n            {\r\n                hyperlink.Foreground = foreground;\r\n                hyperlink.MouseOverForeground = foreground;\r\n            }\r\n            else\r\n            {\r\n                hyperlink.ClearValue(Hyperlink.ForegroundProperty);\r\n                hyperlink.ClearValue(Hyperlink.MouseOverForegroundProperty);\r\n            }\r\n            hyperlink.Inlines.Add(new Run { Text = text });\r\n\r\n            Uri uri = null;\r\n            try\r\n            {\r\n                uri = new Uri(link, UriKind.RelativeOrAbsolute);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n\r\n            }\r\n            hyperlink.NavigateUri = uri;\r\n            hyperlink.Click += (sender, args) =>\r\n            {\r\n                var result = MessageBoxResult.OK;\r\n                if (!link.StartsWith(\"tlg://\") && !string.Equals(text, link, StringComparison.OrdinalIgnoreCase) && !string.Equals(\"http://\" + text, link, StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    result = MessageBox.Show(string.Format(AppResources.OpenUrlConfirmation, link), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                }\r\n                if (result == MessageBoxResult.OK)\r\n                {\r\n                    action(hyperlink, link);\r\n                }\r\n            };\r\n\r\n            return hyperlink;\r\n        }\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var textBox = d as RichTextBox;\r\n            if (textBox == null)\r\n                return;\r\n\r\n            var message = GetMessage(textBox);\r\n            var decryptedMessage = GetDecryptedMessage(textBox);\r\n            var media = GetMedia(textBox);\r\n            var addFooter = GetAddFooter(textBox);\r\n\r\n            textBox.Blocks.Clear();\r\n\r\n            var paragraph = new Paragraph();\r\n            var newText = (string)e.NewValue;\r\n\r\n            if (string.IsNullOrEmpty(newText))\r\n                return;\r\n\r\n            //newText = newText + \" \";\r\n\r\n            var suppressParsing = GetSuppressParsing(textBox);\r\n            List<string> splitData;\r\n            var message34 = message as TLMessage34;\r\n            var decryptedMessage45 = decryptedMessage as TLDecryptedMessage45;\r\n            if (message34 != null && message34.Entities != null)\r\n            {\r\n                splitData = GetSplitData(newText, message34.Entities);\r\n            }\r\n            else if (decryptedMessage45 != null && decryptedMessage45.Entities != null)\r\n            {\r\n                splitData = GetSplitData(newText, decryptedMessage45.Entities);\r\n            }\r\n            else\r\n            {\r\n                splitData = suppressParsing ? new List<string> { newText } : ParseText(newText);\r\n            }\r\n\r\n            foreach (var splStr in splitData)\r\n            {\r\n                var innerSplit = splStr.Split('\\b');\r\n\r\n                if (innerSplit.Length == 1)\r\n                {\r\n                    AddRawText(textBox, paragraph, innerSplit[0], textBox.FontStyle, textBox.FontWeight, textBox.FontFamily);\r\n                }\r\n                else if (innerSplit.Length > 1)\r\n                {\r\n                    if (string.Equals(innerSplit[0], \"pre\"))\r\n                    {\r\n                        AddRawText(textBox, paragraph, innerSplit[1], textBox.FontStyle, textBox.FontWeight, new FontFamily(\"Courier New\"));\r\n                    }\r\n                    else if (string.Equals(innerSplit[0], \"code\"))\r\n                    {\r\n                        AddRawText(textBox, paragraph, innerSplit[1], textBox.FontStyle, textBox.FontWeight, new FontFamily(\"Courier New\"));\r\n                    }\r\n                    else if (string.Equals(innerSplit[0], \"italic\"))\r\n                    {\r\n                        AddRawText(textBox, paragraph, innerSplit[1], FontStyles.Italic, textBox.FontWeight, textBox.FontFamily);\r\n                    }\r\n                    else if (string.Equals(innerSplit[0], \"bold\"))\r\n                    {\r\n                        AddRawText(textBox, paragraph, innerSplit[1], textBox.FontStyle, FontWeights.SemiBold, textBox.FontFamily);\r\n                    }\r\n                    else if (suppressParsing)\r\n                    {\r\n                        AddRawText(textBox, paragraph, innerSplit[0], textBox.FontStyle, textBox.FontWeight, textBox.FontFamily);\r\n                    }\r\n                    else\r\n                    {\r\n                        var hyperlinkForeground = (message is TLMessage || decryptedMessage is TLDecryptedMessage)\r\n                            ? (Brush)Application.Current.Resources[\"TelegramTextAccentBrush\"]\r\n                            : null;//textBox.Foreground;//null;\r\n\r\n                        var hyp = GetHyperlink(innerSplit[1], innerSplit[0], (h, navstr) => NavigateOnHyperlink(navstr, textBox), hyperlinkForeground);\r\n                        paragraph.Inlines.Add(hyp);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (addFooter)\r\n            {\r\n                var footerRun = new Run\r\n                {\r\n                    Foreground =\r\n#if DEBUG\r\n new SolidColorBrush(Colors.Transparent)\r\n#else\r\n                    new SolidColorBrush(Colors.Transparent)\r\n#endif\r\n                };\r\n                paragraph.Inlines.Add(footerRun);\r\n\r\n                textBox.Tag = footerRun;\r\n            }\r\n\r\n            //            var message48 = message as TLMessage48;\r\n            //            if (!string.IsNullOrEmpty(footerText) \r\n            //                && message48 != null\r\n            //                && (message48.Media == null || message48.Media is TLMessageMediaEmpty))\r\n            //            {\r\n            //                var footerBuilder = new StringBuilder();\r\n            //                footerBuilder.Append(\" \");\r\n            //                if (GetIsChannelMessage(textBox)\r\n            //                    && message48.AuthorVisibility == Visibility.Visible \r\n            //                    && message48.Author != null)\r\n            //                {\r\n            //                    footerBuilder.Append(string.Format(\"{0} \", message48.Author.FullName2));\r\n            //                }\r\n            //                if (message48.ViewsVisibility == Visibility.Visible)\r\n            //                {\r\n            //                    footerBuilder.Append(string.Format(\"vc {0}, \", new MessageViewsConverter().Convert(message48.Views, null, null, null)));\r\n            //                }\r\n            //                footerBuilder.Append(\"/ \" + footerText + \" W\");\r\n\r\n            //                var dateRun = new Run { FontSize= footerFontSize, Text = footerBuilder.ToString(), Foreground = \r\n            //#if DEBUG\r\n            //                    new SolidColorBrush(Colors.Red)\r\n            //#else\r\n            //                    new SolidColorBrush(Colors.Transparent)\r\n            //#endif\r\n            //                };\r\n            //                paragraph.Inlines.Add(dateRun);\r\n            //            }\r\n\r\n            textBox.Blocks.Add(paragraph);\r\n        }\r\n\r\n        private static List<string> GetSplitData(string newText, TLVector<TLMessageEntityBase> entities)\r\n        {\r\n            var splitData = new List<string>();\r\n\r\n            var position = 0;\r\n            var length = 0;\r\n            var possibleLength = 0;\r\n            string subString;\r\n            for (var i = 0; i < entities.Count; i++)\r\n            {\r\n                if (entities[i].Offset.Value > position)\r\n                {\r\n                    possibleLength = entities[i].Offset.Value - position;\r\n                    length = (position + possibleLength) > newText.Length ? newText.Length - position : possibleLength;\r\n                    subString = newText.Substring(position, length);\r\n                    splitData.Add(subString);\r\n                    position += length;\r\n                }\r\n\r\n                possibleLength = entities[i].Length.Value;\r\n                length = (position + possibleLength) > newText.Length ? newText.Length - position : possibleLength;\r\n                subString = newText.Substring(position, length);\r\n                splitData.Add(GetSplitItem(entities[i], subString));\r\n                position += length;\r\n            }\r\n\r\n            if (position < newText.Length)\r\n            {\r\n                possibleLength = newText.Length - position;\r\n                length = (position + possibleLength) > newText.Length ? newText.Length - position : possibleLength;\r\n                subString = newText.Substring(position, length);\r\n                splitData.Add(subString);\r\n                position += length;\r\n            }\r\n\r\n            return splitData;\r\n        }\r\n\r\n        private static string GetSplitItem(TLMessageEntityBase entity, string text)\r\n        {\r\n            if (entity is TLInputMessageEntityMentionName)\r\n            {\r\n                return string.Format(\"tlg://?action=profile&{1}\\b{0}\", text, ((TLInputMessageEntityMentionName)entity).User);\r\n            }\r\n            if (entity is TLMessageEntityMentionName)\r\n            {\r\n                return string.Format(\"tlg://?action=profile&user_id={1}\\b{0}\", text, ((TLMessageEntityMentionName)entity).UserId);\r\n            }\r\n            if (entity is TLMessageEntityMention)\r\n            {\r\n                return string.Format(\"tlg://?action=mention&q={0}\\b{0}\", text);\r\n            }\r\n            if (entity is TLMessageEntityHashtag)\r\n            {\r\n                return string.Format(\"tlg://?action=search&q={0}\\b{0}\", text);\r\n            }\r\n            if (entity is TLMessageEntityBotCommand)\r\n            {\r\n                return string.Format(\"tlg://?action=command&q={0}\\b{0}\", text);\r\n            }\r\n            if (entity is TLMessageEntityUrl)\r\n            {\r\n                return string.Format(\"{0}\\b{0}\", text);\r\n            }\r\n            if (entity is TLMessageEntityEmail)\r\n            {\r\n                return string.Format(\"mailto:{0}\\b{0}\", text);\r\n            }\r\n            if (entity is TLMessageEntityBold)\r\n            {\r\n                return string.Format(\"bold\\b{0}\", text);\r\n            }\r\n            if (entity is TLMessageEntityItalic)\r\n            {\r\n                //return text;\r\n                return string.Format(\"italic\\b{0}\", text);\r\n            }\r\n            if (entity is TLMessageEntityCode)\r\n            {\r\n                return string.Format(\"code\\b{0}\", text);\r\n            }\r\n            if (entity is TLMessageEntityPre)\r\n            {\r\n                return string.Format(\"pre\\b{0}\", text);\r\n            }\r\n            if (entity is TLMessageEntityTextUrl)\r\n            {\r\n                var url = ((TLMessageEntityTextUrl)entity).Url;\r\n                return string.Format(\"{0}\\b{1}\", url, text);\r\n            }\r\n            if (entity is TLMessageEntityCashtag)\r\n            {\r\n                return string.Format(\"pre\\b{0}\", text);\r\n            }\r\n            if (entity is TLMessageEntityPhone)\r\n            {\r\n                var config = IoC.Get<ICacheService>().GetConfig() as TLConfig76;\r\n                if (config != null && !config.IgnorePhoneEntities)\r\n                {\r\n                    return string.Format(\"tlg://?action=phone&q={0}\\b{0}\", text);\r\n                }\r\n\r\n                return text;\r\n            }\r\n\r\n            return text;\r\n        }\r\n\r\n        private static void AddRawText(RichTextBox text_block, Paragraph par, string raw_text, FontStyle fontStyle, FontWeight fontWeight, FontFamily fontFamily)\r\n        {\r\n            var textEnumerator = StringInfo.GetTextElementEnumerator(raw_text);\r\n            bool cont = false;\r\n\r\n            var nextElements = new List<Tuple<string, byte[], string>>();\r\n\r\n            //string nextText = null;\r\n            //byte[] nextBytes = null;\r\n            //string nextBytesStr = null;\r\n\r\n            StringBuilder sb = new StringBuilder();\r\n\r\n            // Note: Begins at element -1 (none).\r\n            cont = textEnumerator.MoveNext();\r\n            while (cont)\r\n            {\r\n                string text;\r\n                byte[] bytes;\r\n                string bytesStr;\r\n\r\n                if (nextElements.Count > 0)\r\n                {\r\n                    text = nextElements[0].Item1;\r\n                    bytes = nextElements[0].Item2;\r\n                    bytesStr = nextElements[0].Item3;\r\n\r\n                    nextElements.RemoveAt(0);\r\n                }\r\n                else\r\n                {\r\n                    text = textEnumerator.GetTextElement();\r\n                    bytes = Encoding.BigEndianUnicode.GetBytes(text);\r\n                    bytesStr = ConvertToHexString(bytes);\r\n                }\r\n\r\n                if (Emoji.FlagsPrefixes.ContainsKey(bytesStr) && textEnumerator.MoveNext())\r\n                {\r\n                    var text2 = textEnumerator.GetTextElement();\r\n                    var bytes2 = Encoding.BigEndianUnicode.GetBytes(text2);\r\n                    var bytesStr2 = ConvertToHexString(bytes2);\r\n\r\n                    bytesStr += bytesStr2;\r\n                    text += text2;\r\n                }\r\n\r\n                string bytesValue2;\r\n                if (string.IsNullOrEmpty(bytesStr)\r\n                    || Emoji.SkinsDict.TryGetValue(bytesStr, out bytesValue2))\r\n                {\r\n                    if (nextElements.Count == 0)\r\n                    {\r\n                        cont = textEnumerator.MoveNext();\r\n                    }\r\n                    continue;   //skip unknown skin emoji\r\n                }\r\n\r\n                string bytesValue;\r\n                TreeNode node;\r\n                //System.Diagnostics.Debug.WriteLine(bytesStr);\r\n                // skinned emoji\r\n                if (Emoji.SkinnedDict.TryGetValue(bytesStr, out bytesValue))\r\n                {\r\n                    if (textEnumerator.MoveNext())\r\n                    {\r\n                        var text2 = textEnumerator.GetTextElement();\r\n                        var bytes2 = Encoding.BigEndianUnicode.GetBytes(text2);\r\n                        var bytesStr2 = ConvertToHexString(bytes2);\r\n\r\n                        if (string.IsNullOrEmpty(bytesStr2))\r\n                        {\r\n                            if (textEnumerator.MoveNext())\r\n                            {\r\n                                text2 = textEnumerator.GetTextElement();\r\n                                bytes2 = Encoding.BigEndianUnicode.GetBytes(text2);\r\n                                bytesStr2 = ConvertToHexString(bytes2);\r\n                            }\r\n                        }\r\n\r\n                        // skins\r\n                        if (Emoji.SkinsDict.TryGetValue(bytesStr2, out bytesValue2) && Emoji.SkinnedDict.TryGetValue(bytesStr + bytesStr2, out bytesValue2))\r\n                        {\r\n                            bytesValue = bytesValue2;\r\n                        }\r\n                        // joined emoji\r\n                        else if (Emoji.JoinedEmojiTree.Values.TryGetValue(bytesStr, out node) && node.Values.TryGetValue(bytesStr2, out node))\r\n                        {\r\n                            var initBytesValue = bytesValue;\r\n                            bytesValue += bytesStr2;\r\n\r\n                            var localNextElements = new List<Tuple<string, byte[], string>>();\r\n\r\n                            var isJoinedEmoji = true;\r\n\r\n                            cont = textEnumerator.MoveNext();\r\n                            while (cont)\r\n                            {\r\n                                text2 = textEnumerator.GetTextElement();\r\n                                bytes2 = Encoding.BigEndianUnicode.GetBytes(text2);\r\n                                bytesStr2 = ConvertToHexString(bytes2);\r\n                                localNextElements.Add(new Tuple<string, byte[], string>(text2, bytes2, bytesStr2));\r\n\r\n                                if (string.IsNullOrEmpty(bytesStr2))\r\n                                {\r\n                                    if (textEnumerator.MoveNext())\r\n                                    {\r\n                                        text2 = textEnumerator.GetTextElement();\r\n                                        bytes2 = Encoding.BigEndianUnicode.GetBytes(text2);\r\n                                        bytesStr2 = ConvertToHexString(bytes2);\r\n                                        localNextElements.Add(new Tuple<string, byte[], string>(text2, bytes2, bytesStr2));\r\n                                    }\r\n                                }\r\n\r\n                                var previousNode = node;\r\n                                if (node.Values.TryGetValue(bytesStr2, out node))\r\n                                {\r\n                                    bytesValue += bytesStr2;\r\n                                    if (node.Values.Count == 0)\r\n                                    {\r\n                                        localNextElements.Clear();\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                else\r\n                                {\r\n                                    if (previousNode.IsEnded)\r\n                                    {\r\n                                        localNextElements.Clear();\r\n                                        localNextElements.Add(new Tuple<string, byte[], string>(text2, bytes2, bytesStr2));\r\n                                    }\r\n\r\n                                    isJoinedEmoji = previousNode.IsEnded;\r\n                                    break;\r\n                                }\r\n\r\n                                cont = textEnumerator.MoveNext();\r\n                                if (!cont)\r\n                                {\r\n                                    localNextElements.Clear();\r\n                                }\r\n                            }\r\n\r\n                            if (!isJoinedEmoji)\r\n                            {\r\n                                bytesValue = initBytesValue;\r\n                            }\r\n\r\n                            for (var i = 0; i < localNextElements.Count; i++)\r\n                            {\r\n                                nextElements.Add(localNextElements[i]);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            nextElements.Add(new Tuple<string, byte[], string>(text2, bytes2, bytesStr2));\r\n                        }\r\n                    }\r\n\r\n                    AddTextAndEmoji(text_block, par, fontStyle, fontWeight, fontFamily, sb, bytesValue);\r\n                }\r\n                else if (Emoji.Dict.TryGetValue(bytesStr, out bytesValue))\r\n                {\r\n                    AddTextAndEmoji(text_block, par, fontStyle, fontWeight, fontFamily, sb, bytesValue);\r\n                }\r\n                else\r\n                {\r\n                    sb = sb.Append(text);\r\n                }\r\n\r\n                if (nextElements.Count == 0)\r\n                {\r\n                    cont = textEnumerator.MoveNext();\r\n                }\r\n            }\r\n\r\n            var sbStrLast = sb.ToString();\r\n\r\n            if (sbStrLast != string.Empty)\r\n            {\r\n                par.Inlines.Add(GetRunWithStyle(sbStrLast, text_block, fontStyle, fontWeight, fontFamily));\r\n            }\r\n        }\r\n\r\n        private static void AddTextAndEmoji(RichTextBox text_block, Paragraph par, FontStyle fontStyle, FontWeight fontWeight, FontFamily fontFamily, StringBuilder sb, string bytesValue)\r\n        {\r\n            var sbStr = sb.ToString();\r\n            sb.Clear();\r\n            if (sbStr != string.Empty)\r\n            {\r\n                par.Inlines.Add(GetRunWithStyle(sbStr, text_block, fontStyle, fontWeight, fontFamily));\r\n            }\r\n            double imageHeight;\r\n            //System.Diagnostics.Debug.WriteLine(bytesValue);\r\n            par.Inlines.Add(GetImage(bytesValue, out imageHeight));\r\n            text_block.MinHeight = imageHeight; //+ 10;\r\n        }\r\n\r\n        public static string ConvertToHexString(byte[] bytes)\r\n        {\r\n            //remove end FE0F/FE0E bytes\r\n            var length = bytes.Length;\r\n            if (bytes.Length >= 2\r\n                && bytes[bytes.Length - 2] == 254\r\n                && (bytes[bytes.Length - 1] == 15 || bytes[bytes.Length - 1] == 14))\r\n            {\r\n                length -= 2;\r\n            }\r\n            var sb = new StringBuilder();\r\n            for (var i = 0; i < length; i++)\r\n            {\r\n                sb = sb.Append(Convert.ToString(bytes[i], 16).PadLeft(2, '0'));\r\n            }\r\n\r\n            return sb.ToString().ToUpperInvariant();\r\n        }\r\n\r\n        // Fetch run with PhoneTextNormalStyle\r\n        public static Run GetRunWithStyle(string text, RichTextBox richTextBox, FontStyle fontStyle, FontWeight fontWeight, FontFamily fontFamily)\r\n        {\r\n            var run = new Run();\r\n\r\n            run.FontFamily = richTextBox.FontFamily;\r\n            //run.FontSize = richTextBox.FontSize * TextScaleFactor;\r\n            //run.Foreground = richTextBox.Foreground;// (Brush)Application.Current.Resources[\"PhoneForegroundBrush\"];\r\n            run.Text = text;\r\n            run.FontStyle = fontStyle;\r\n            run.FontWeight = fontWeight;\r\n            run.FontFamily = fontFamily;\r\n\r\n            return run;\r\n        }\r\n\r\n        private static InlineUIContainer GetImage(string name, out double height)\r\n        {\r\n            var image = new Image();\r\n            image.Source = new BitmapImage(new Uri(string.Format(\"/Assets/Emoji/Separated/{0}.png\", name), UriKind.RelativeOrAbsolute));\r\n            image.Height = 27 * FontScaleFactor;\r\n            image.Width = 27 * FontScaleFactor;\r\n            image.VerticalAlignment = VerticalAlignment.Center;\r\n            image.Margin = new Thickness(0, 5.0, 0, -5.0);\r\n            var container = new InlineUIContainer { };\r\n\r\n            height = image.Height;\r\n\r\n            container.Child = image;//new Border {Child = image, Background = new SolidColorBrush(Colors.Red), Opacity = 0.7};\r\n\r\n            return container;\r\n        }\r\n\r\n        private static void NavigateOnHyperlink(string navstr, RichTextBox textBox)\r\n        {\r\n            var message = GetMessage(textBox);\r\n            var media = GetMedia(textBox);\r\n            var contentControl = VisualTreeExtensions.FindParentOfType<ContentControl>(textBox);\r\n            if (contentControl != null)\r\n            {\r\n                media = contentControl.Content as TLMessageMediaBase;\r\n            }\r\n\r\n            if (string.IsNullOrEmpty(navstr)) return;\r\n\r\n            if (navstr.StartsWith(\"tlg://?action=profile\"))\r\n            {\r\n                var mentionIndex = navstr.IndexOf(\"user_id\", StringComparison.OrdinalIgnoreCase);\r\n\r\n                if (mentionIndex != -1)\r\n                {\r\n                    var userIdString = navstr.Substring(mentionIndex).Replace(\"user_id=\", string.Empty);\r\n\r\n                    if (string.Equals(userIdString, \"self\", StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        RaiseMentionNavigated(new TelegramMentionEventArgs { UserId = IoC.Get<IStateService>().CurrentUserId });\r\n                        return;\r\n                    }\r\n\r\n                    int userId;\r\n                    if (int.TryParse(userIdString, out userId))\r\n                    {\r\n                        RaiseMentionNavigated(new TelegramMentionEventArgs { UserId = userId });\r\n                    }\r\n                }\r\n\r\n                mentionIndex = navstr.IndexOf(\"chat_id\", StringComparison.OrdinalIgnoreCase);\r\n                if (mentionIndex != -1)\r\n                {\r\n                    var userIdString = navstr.Substring(mentionIndex).Replace(\"chat_id=\", string.Empty);\r\n                    int userId;\r\n                    if (int.TryParse(userIdString, out userId))\r\n                    {\r\n                        RaiseMentionNavigated(new TelegramMentionEventArgs { ChatId = userId });\r\n                    }\r\n                }\r\n\r\n                mentionIndex = navstr.IndexOf(\"channel_id\", StringComparison.OrdinalIgnoreCase);\r\n                if (mentionIndex != -1)\r\n                {\r\n                    var userIdString = navstr.Substring(mentionIndex).Replace(\"channel_id=\", string.Empty);\r\n                    int userId;\r\n                    if (int.TryParse(userIdString, out userId))\r\n                    {\r\n                        RaiseMentionNavigated(new TelegramMentionEventArgs { ChannelId = userId });\r\n                    }\r\n                }\r\n            }\r\n            else if (navstr.StartsWith(\"tlg://?action=mention\"))\r\n            {\r\n                var mentionIndex = navstr.IndexOf('@');\r\n\r\n                if (mentionIndex != -1)\r\n                {\r\n                    var mention = navstr.Substring(mentionIndex);\r\n\r\n                    RaiseMentionNavigated(new TelegramMentionEventArgs { Mention = mention });\r\n                }\r\n            }\r\n            else if (navstr.StartsWith(\"tlg://?action=search\"))\r\n            {\r\n                var hashtagIndex = navstr.IndexOf('#');\r\n\r\n                if (hashtagIndex != -1)\r\n                {\r\n                    var hashtag = navstr.Substring(hashtagIndex);\r\n\r\n                    RaiseSearchHashtag(new TelegramHashtagEventArgs { Hashtag = hashtag });\r\n                }\r\n            }\r\n            else if (navstr.StartsWith(\"tlg://?action=command\"))\r\n            {\r\n                var commandIndex = navstr.LastIndexOf('/');\r\n\r\n                if (commandIndex != -1)\r\n                {\r\n                    var command = navstr.Substring(commandIndex);\r\n\r\n                    RaiseInvokeCommand(new TelegramCommandEventArgs { Command = command, Message = message, Media = media });\r\n                }\r\n            }\r\n            else if (navstr.StartsWith(\"tlg://?action=game\"))\r\n            {\r\n                RaiseOpenGame(new TelegramGameEventArgs { Message = message });\r\n            }\r\n            else if (navstr.StartsWith(\"tlg://?action=phone\"))\r\n            {\r\n                var phoneIndex = navstr.IndexOf(\"q\", StringComparison.OrdinalIgnoreCase);\r\n\r\n                if (phoneIndex != -1)\r\n                {\r\n                    var phoneString = navstr.Substring(phoneIndex).Replace(\"q=\", string.Empty);\r\n\r\n                    if (!string.IsNullOrEmpty(phoneString))\r\n                    {\r\n                        RaiseOpenPhone(new TelegramPhoneEventArgs { Phone = phoneString });\r\n                    }\r\n                }\r\n            }\r\n            else if (navstr.StartsWith(\"tg://\"))\r\n            {\r\n                Uri uri = null;\r\n                try\r\n                {\r\n                    uri = new Uri(\"/Protocol?encodedLaunchUri=\" + HttpUtility.UrlEncode(navstr), UriKind.Relative);\r\n                }\r\n                catch (Exception e)\r\n                {\r\n\r\n                }\r\n\r\n                if (uri == null) return;\r\n\r\n                TelegramViewBase.NavigateToTelegramUriAsync(uri);\r\n            }\r\n            else if (!navstr.Contains(\"@\"))\r\n            {\r\n                if (navstr.ToLowerInvariant().Contains(\"telegram.me\")\r\n                    || navstr.ToLowerInvariant().Contains(\"t.me\"))\r\n                {\r\n                    RaiseTelegramLinkAction(new TelegramEventArgs { Uri = navstr });\r\n                }\r\n                else\r\n                {\r\n                    var task = new WebBrowserTask();\r\n                    task.URL = HttpUtility.UrlEncode(navstr);\r\n                    task.Show();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                EmailComposeTask emailComposeTask = new EmailComposeTask();\r\n\r\n                if (navstr.StartsWith(\"http://\"))\r\n                {\r\n                    navstr = navstr.Remove(0, 7);\r\n                }\r\n\r\n                emailComposeTask.To = navstr;\r\n\r\n                emailComposeTask.Show();\r\n            }\r\n        }\r\n\r\n        public static bool IsValidUsernameSymbol(char symbol)\r\n        {\r\n            if ((symbol >= 'a' && symbol <= 'z')\r\n                || (symbol >= 'A' && symbol <= 'Z')\r\n                || (symbol >= '0' && symbol <= '9')\r\n                || symbol == '_')\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool IsValidUsername(string username)\r\n        {\r\n            if (username.Length <= 3)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (username.Length > 32)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (username[0] != '@')\r\n            {\r\n                return false;\r\n            }\r\n\r\n            for (var i = 1; i < username.Length; i++)\r\n            {\r\n                if (!IsValidUsernameSymbol(username[i]))\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private static bool IsValidCommand(string command)\r\n        {\r\n            if (command.Length <= 2)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (command.Length > 32)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (command[0] != '/')\r\n            {\r\n                return false;\r\n            }\r\n\r\n            for (var i = 1; i < command.Length; i++)\r\n            {\r\n                if (!IsValidUsernameSymbol(command[i]))\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        public static List<string> ParseText(string html)\r\n        {\r\n            //#if DEBUG\r\n            //            return new List<string>{ html };\r\n            //            VibrateController.Default.Start(TimeSpan.FromSeconds(0.2));\r\n            //#endif\r\n\r\n            var originalHtml = html;\r\n            html = html.Replace(\"\\n\", \" \\n \");\r\n\r\n            var rx = new Regex(\"(https?:\\\\/\\\\/)?(([A-Za-zА-Яа-яЁё0-9@][A-Za-zА-Яа-яЁё0-9@\\\\-_\\\\.]*[A-Za-zА-Яа-яЁё0-9@])(\\\\/([A-Za-zА-Яа-я0-9@\\\\-_#%&?+\\\\/\\\\.=;:~!]*[^\\\\.\\\\,;\\\\(\\\\)\\\\?<\\\\&\\\\s:])?)?)\", RegexOptions.IgnoreCase | RegexOptions.Compiled);\r\n            html = rx.Replace(html, delegate(Match m)\r\n            {\r\n                var full = m.Value;\r\n\r\n                if (full.IndexOf('@') == 0 && IsValidUsername(full))\r\n                    return string.Format(\"\\atlg://?action=mention&q={0}\\b{1}\\a\", full, full);\r\n\r\n                var protocol = (m.Groups.Count > 1) ? m.Groups[1].Value : \"http://\";\r\n                if (protocol == string.Empty) protocol = \"http://\";\r\n                var url = (m.Groups.Count > 2) ? m.Groups[2].Value : string.Empty;\r\n                var domain = (m.Groups.Count > 3) ? m.Groups[3].Value : string.Empty;\r\n                if (domain.IndexOf(\".\") == -1 || domain.IndexOf(\"..\") != -1) return full;\r\n                var topDomain = domain.Split('.').LastOrDefault();\r\n                if (topDomain.Length > 5 ||\r\n                    !(\"guru,info,name,aero,arpa,coop,museum,mobi,travel,xxx,asia,biz,com,net,org,gov,mil,edu,int,tel,ac,ad,ae,af,ag,ai,al,am,an,ao,aq,ar,as,at,au,aw,az,ba,bb,bd,be,bf,bg,bh,bi,bj,bm,bn,bo,br,bs,bt,bv,bw,by,bz,ca,cc,cd,cf,cg,ch,ci,ck,cl,cm,cn,co,cr,cu,cv,cx,cy,cz,de,dj,dk,dm,do,dz,ec,ee,eg,eh,er,es,et,eu,fi,fj,fk,fm,fo,fr,ga,gd,ge,gf,gg,gh,gi,gl,gm,gn,gp,gq,gr,gs,gt,gu,gw,gy,hk,hm,hn,hr,ht,hu,id,ie,il,im,in,io,iq,ir,is,it,je,jm,jo,jp,ke,kg,kh,ki,km,kn,kp,kr,kw,ky,kz,la,lb,lc,li,lk,lr,ls,lt,lu,lv,ly,ma,mc,md,me,mg,mh,mk,ml,mm,mn,mo,mp,mq,mr,ms,mt,mu,mv,mw,mx,my,mz,na,nc,ne,nf,ng,ni,nl,no,np,nr,nu,nz,om,pa,pe,pf,pg,ph,pk,pl,pm,pn,pr,ps,pt,pw,py,qa,re,ro,ru,rw,sa,sb,sc,sd,se,sg,sh,si,sj,sk,sl,sm,sn,so,sr,st,su,sv,sy,sz,tc,td,tf,tg,th,tj,tk,tl,tm,tn,to,tp,tr,tt,tv,tw,tz,ua,ug,uk,um,us,uy,uz,va,vc,ve,vg,vi,vn,vu,wf,ws,ye,yt,yu,za,zm,zw,рф,cat,pro\"\r\n                        .Split(',').Contains(topDomain))) return full;\r\n\r\n                if (full.IndexOf('@') != -1) return string.Format(\"\\amailto:{0}\\b{1}\\a\", full, full);\r\n\r\n\r\n                full = HttpUtility.UrlDecode(full);\r\n                if (full.Length > 55) full = full.Substring(0, 53) + \"..\";\r\n\r\n                return string.Format(\"\\a{0}\\b{1}\\a\", (protocol + url), full);\r\n            });\r\n\r\n            // is # but not #️⃣ (0x0023 0xFE0F 0x20E3)\r\n            var hashIndex = originalHtml.IndexOf('#');\r\n            if (hashIndex != -1 && !(hashIndex + 2 < originalHtml.Length && originalHtml[hashIndex + 1] == 0xFE0F && originalHtml[hashIndex + 2] == 0x20E3))\r\n            {\r\n                var hashtagRx = new Regex(\"(^|[\\\\s])#[\\\\w@\\\\.]+\", RegexOptions.Compiled);\r\n\r\n                html = hashtagRx.Replace(html, match =>\r\n                {\r\n                    var trimmedText = match.Value.TrimStart();\r\n                    var trimStart = trimmedText.Length < match.Value.Length\r\n                        ? match.Value.Substring(0, match.Value.Length - trimmedText.Length)\r\n                        : string.Empty;\r\n                    var trimEnd = trimmedText.EndsWith(\".\")\r\n                        ? \".\"\r\n                        : string.Empty;\r\n                    var displayText = trimmedText.TrimEnd('.');\r\n                    var internalText = \"tlg://?action=search&q=\" + displayText;\r\n\r\n                    return string.Format(\"{0}\\a{1}\\b{2}\\a{3}\", trimStart, internalText, displayText, trimEnd);\r\n                });\r\n            }\r\n\r\n            if (originalHtml.IndexOf('/') != -1)\r\n            {\r\n                html = html.ReplaceByRegex(\"(^|[\\\\s])\\\\/[A-Za-z_0-9]{1,64}(@[A-Za-z_0-9]{5,32})?([\\\\w]|$)\", \" \\atlg://?action=command&q=$0\\b$0\\a\");\r\n            }\r\n\r\n            html = html.Replace(\"\\n \", \"\\n\").Replace(\" \\n\", \"\\n\");\r\n\r\n            if (html.StartsWith(\" \")) html = html.Remove(0, 1);\r\n\r\n            return html.Split('\\a').ToList();\r\n        }\r\n\r\n    }\r\n\r\n    public static class StringExtensions\r\n    {\r\n        public static string ReplaceByRegex(this string str, string regexStr, string replace)\r\n        {\r\n            var regex = new Regex(regexStr);\r\n\r\n            var result = regex.Replace(str, replace);\r\n\r\n            return result;\r\n        }\r\n    }\r\n\r\n    public class TelegramEventArgs : EventArgs\r\n    {\r\n        public string Uri { get; set; }\r\n    }\r\n\r\n    public class TelegramHashtagEventArgs : EventArgs\r\n    {\r\n        public string Hashtag { get; set; }\r\n    }\r\n\r\n    public class TelegramCommandEventArgs : EventArgs\r\n    {\r\n        public string Command { get; set; }\r\n\r\n        public TLMessageBase Message { get; set; }\r\n\r\n        public TLMessageMediaBase Media { get; set; }\r\n    }\r\n\r\n    public class TelegramGameEventArgs : EventArgs\r\n    {\r\n        public TLMessageBase Message { get; set; }\r\n    }\r\n\r\n    public class TelegramMentionEventArgs : EventArgs\r\n    {\r\n        public string Mention { get; set; }\r\n\r\n        public int UserId { get; set; }\r\n\r\n        public int ChatId { get; set; }\r\n\r\n        public int ChannelId { get; set; }\r\n    }\r\n\r\n    public class TelegramPhoneEventArgs : EventArgs\r\n    {\r\n        public string Phone { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Controls/TelegramNavigationInTransition.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Controls\r\n{\r\n    /// <summary>\r\n    /// Has navigation-in\r\n    /// <see cref=\"T:Microsoft.Phone.Controls.TransitionElement\"/>s\r\n    /// for the designer experiences.\r\n    /// </summary>\r\n    public class TelegramNavigationInTransition : TelegramNavigationTransition\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Controls/TelegramNavigationOutTransition.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Controls\r\n{\r\n    /// <summary>\r\n    /// Has navigation-out\r\n    /// <see cref=\"T:Microsoft.Phone.Controls.TransitionElement\"/>s\r\n    /// for the designer experiences.\r\n    /// </summary>\r\n    public class TelegramNavigationOutTransition : TelegramNavigationTransition\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Controls/TelegramNavigationTransition.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing Microsoft.Phone.Controls;\r\n\r\nnamespace TelegramClient.Controls\r\n{\r\n    /// <summary>\r\n    /// Has\r\n    /// <see cref=\"T:Microsoft.Phone.Controls.TransitionElement\"/>s\r\n    /// for the designer experiences.\r\n    /// </summary>\r\n    public class TelegramNavigationTransition : DependencyObject\r\n    {\r\n        /// <summary>\r\n        /// The\r\n        /// <see cref=\"T:System.Windows.DependencyProperty\"/>\r\n        /// for the backward\r\n        /// <see cref=\"T:Microsoft.Phone.Controls.NavigationTransition\"/>.\r\n        /// </summary>\r\n        public static readonly DependencyProperty BackwardProperty =\r\n            DependencyProperty.Register(\"Backward\", typeof(TransitionElement), typeof(TelegramNavigationTransition), null);\r\n\r\n        /// <summary>\r\n        /// The\r\n        /// <see cref=\"T:System.Windows.DependencyProperty\"/>\r\n        /// for the forward\r\n        /// <see cref=\"T:Microsoft.Phone.Controls.NavigationTransition\"/>.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ForwardProperty =\r\n            DependencyProperty.Register(\"Forward\", typeof(TransitionElement), typeof(TelegramNavigationTransition), null);\r\n\r\n        /// <summary>\r\n        /// The navigation transition will begin.\r\n        /// </summary>\r\n        public event RoutedEventHandler BeginTransition;\r\n\r\n        /// <summary>\r\n        /// The navigation transition has ended.\r\n        /// </summary>\r\n        public event RoutedEventHandler EndTransition;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the backward\r\n        /// <see cref=\"T:Microsoft.Phone.Controls.NavigationTransition\"/>.\r\n        /// </summary>\r\n        public TransitionElement Backward\r\n        {\r\n            get\r\n            {\r\n                return (TransitionElement)GetValue(BackwardProperty);\r\n            }\r\n            set\r\n            {\r\n                SetValue(BackwardProperty, value);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the forward\r\n        /// <see cref=\"T:Microsoft.Phone.Controls.NavigationTransition\"/>.\r\n        /// </summary>\r\n        public TransitionElement Forward\r\n        {\r\n            get\r\n            {\r\n                return (TransitionElement)GetValue(ForwardProperty);\r\n            }\r\n            set\r\n            {\r\n                SetValue(ForwardProperty, value);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Triggers <see cref=\"E:Microsoft.Phone.Controls.NavigationTransition.BeginTransition\"/>.\r\n        /// </summary>\r\n        internal void OnBeginTransition()\r\n        {\r\n            if (BeginTransition != null)\r\n            {\r\n                BeginTransition(this, new RoutedEventArgs());\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Triggers <see cref=\"E:Microsoft.Phone.Controls.NavigationTransition.EndTransition\"/>.\r\n        /// </summary>\r\n        internal void OnEndTransition()\r\n        {\r\n            if (EndTransition != null)\r\n            {\r\n                EndTransition(this, new RoutedEventArgs());\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Controls/TelegramRichTextBox.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Text.RegularExpressions;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace Telegram.EmojiPanel\r\n{\r\n    public class TelegramRichTextBox : Control\r\n    {\r\n        private Run _footerRun;\r\n\r\n        public static readonly DependencyProperty FooterFontSizeProperty = DependencyProperty.Register(\r\n            \"FooterFontSize\", typeof (double), typeof (TelegramRichTextBox), new PropertyMetadata(18.87, OnFooterFontSizeChanged));\r\n\r\n        private static void OnFooterFontSizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var telegramRichTextBox = d as TelegramRichTextBox;\r\n            if (telegramRichTextBox != null)\r\n            {\r\n                if (telegramRichTextBox._footerRun != null)\r\n                {\r\n                    telegramRichTextBox._footerRun.Text = (string)e.NewValue;\r\n                }\r\n            }\r\n        }\r\n\r\n        public double FooterFontSize\r\n        {\r\n            get { return (double) GetValue(FooterFontSizeProperty); }\r\n            set { SetValue(FooterFontSizeProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty FooterProperty = DependencyProperty.Register(\r\n            \"Footer\", typeof (string), typeof (TelegramRichTextBox), new PropertyMetadata(default(string), OnFooterChanged));\r\n\r\n        private static void OnFooterChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var telegramRichTextBox = d as TelegramRichTextBox;\r\n            if (telegramRichTextBox != null)\r\n            {\r\n                if (telegramRichTextBox._footerRun != null)\r\n                {\r\n                    telegramRichTextBox._footerRun.Text = (string)e.NewValue;\r\n                }\r\n            }\r\n        }\r\n\r\n        public string Footer\r\n        {\r\n            get { return (string) GetValue(FooterProperty); }\r\n            set { SetValue(FooterProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty EntitiesProperty = DependencyProperty.Register(\r\n            \"Entities\", typeof (IList<TLMessageEntityBase>), typeof (TelegramRichTextBox), new PropertyMetadata(default(IList<TLMessageEntityBase>)));\r\n\r\n        public IList<TLMessageEntityBase> Entities\r\n        {\r\n            get { return (IList<TLMessageEntityBase>) GetValue(EntitiesProperty); }\r\n            set { SetValue(EntitiesProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextWrappingProperty = DependencyProperty.Register(\r\n            \"TextWrapping\", typeof (TextWrapping), typeof (TelegramRichTextBox), new PropertyMetadata(TextWrapping.Wrap));\r\n\r\n        public TextWrapping TextWrapping\r\n        {\r\n            get { return (TextWrapping) GetValue(TextWrappingProperty); }\r\n            set { SetValue(TextWrappingProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextTrimmingProperty = DependencyProperty.Register(\r\n            \"TextTrimming\", typeof (TextTrimming), typeof (TelegramRichTextBox), new PropertyMetadata(default(TextTrimming)));\r\n\r\n        public TextTrimming TextTrimming\r\n        {\r\n            get { return (TextTrimming) GetValue(TextTrimmingProperty); }\r\n            set { SetValue(TextTrimmingProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextAlignmentProperty = DependencyProperty.Register(\r\n            \"TextAlignment\", typeof (TextAlignment), typeof (TelegramRichTextBox), new PropertyMetadata(TextAlignment.Left, OnTextAlignmentChanged));\r\n\r\n        private static void OnTextAlignmentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var textBox = (TelegramRichTextBox)d;\r\n            if (textBox != null && textBox._stackPanel != null)\r\n            {\r\n                foreach (var child in textBox._stackPanel.Children)\r\n                {\r\n                    var richTextBox = child as RichTextBox;\r\n                    if (richTextBox != null)\r\n                    {\r\n                        richTextBox.TextAlignment = (TextAlignment) e.NewValue;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public TextAlignment TextAlignment\r\n        {\r\n            get { return (TextAlignment) GetValue(TextAlignmentProperty); }\r\n            set { SetValue(TextAlignmentProperty, value); }\r\n        }\r\n\r\n        public void SetForeground(Brush foreground)\r\n        {\r\n            if (_stackPanel != null)\r\n            {\r\n                foreach (var child in _stackPanel.Children)\r\n                {\r\n                    var richTextBox = child as RichTextBox;\r\n                    if (richTextBox != null)\r\n                    {\r\n                        richTextBox.Foreground = foreground;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty MoreElementProperty = DependencyProperty.Register(\r\n            \"MoreElement\", typeof (FrameworkElement), typeof (TelegramRichTextBox), new PropertyMetadata(default(FrameworkElement), OnMoreElementChanged));\r\n\r\n        private static void OnMoreElementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var telegramRichTextBox = (TelegramRichTextBox) d;\r\n            telegramRichTextBox.OnSizeChanged(null, null);\r\n        }\r\n\r\n        public FrameworkElement MoreElement\r\n        {\r\n            get { return (FrameworkElement) GetValue(MoreElementProperty); }\r\n            set { SetValue(MoreElementProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextScaleFactorProperty = DependencyProperty.Register(\r\n            \"TextScaleFactor\", typeof (double), typeof (TelegramRichTextBox), new PropertyMetadata(1.0, OnFontScaleFactorChanged));\r\n\r\n        private static void OnFontScaleFactorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var textBox = (TelegramRichTextBox)d;\r\n            if (textBox != null && textBox._stackPanel != null)\r\n            {\r\n                foreach (var child in textBox._stackPanel.Children)\r\n                {\r\n                    var richTextBox = child as RichTextBox;\r\n                    if (richTextBox != null)\r\n                    {\r\n                        richTextBox.FontSize = textBox._defaultFontSize*(double) e.NewValue;\r\n                        foreach (var block in richTextBox.Blocks)\r\n                        {\r\n                            var paragraph = block as Paragraph;\r\n                            if (paragraph != null)\r\n                            {\r\n                                foreach (var inline in paragraph.Inlines)\r\n                                {\r\n                                    var uiContainer = inline as InlineUIContainer;\r\n                                    if (uiContainer != null)\r\n                                    {\r\n                                        var image = uiContainer.Child as Image;\r\n                                        if (image != null)\r\n                                        {\r\n                                            var size = 27.0 * (double)e.NewValue;\r\n                                            image.Height = size;\r\n                                            image.Width = size;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private double _defaultFontSize;\r\n\r\n        public double TextScaleFactor\r\n        {\r\n            get { return (double) GetValue(TextScaleFactorProperty); }\r\n            set { SetValue(TextScaleFactorProperty, value); }\r\n        }\r\n\r\n        private StackPanel _stackPanel;\r\n        private TextBlock measureTxt;\r\n\r\n        public TelegramRichTextBox()\r\n        {\r\n            DefaultStyleKey = typeof(TelegramRichTextBox);\r\n\r\n            SizeChanged += OnSizeChanged;\r\n        }\r\n\r\n        private void OnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            if (MoreElement != null)\r\n            {\r\n                if (ActualHeight > 0.0 && MaxHeight > 0.0 && ActualHeight >= MaxHeight)\r\n                {\r\n                    MoreElement.Visibility = Visibility.Visible;\r\n                }\r\n                else\r\n                {\r\n                    MoreElement.Visibility = Visibility.Collapsed;\r\n                }\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty =\r\n            DependencyProperty.Register(\r\n                \"Text\",\r\n                typeof(string),\r\n                typeof(TelegramRichTextBox),\r\n                new PropertyMetadata(\"\", OnTextPropertyChanged));\r\n\r\n        public string Text\r\n        {\r\n            get\r\n            {\r\n                return (string)GetValue(TextProperty);\r\n            }\r\n            set\r\n            {\r\n                SetValue(TextProperty, value);\r\n            }\r\n        }\r\n\r\n        private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            TelegramRichTextBox source = (TelegramRichTextBox)d;\r\n            string value = (string)e.NewValue;\r\n            //if (value.Length <= 2)\r\n            //{\r\n            //    value += \"TTT\";\r\n            //}\r\n            //System.Diagnostics.Debug.WriteLine(\"oldText={0} newText={1} foreground={2} textAlignment={3}\", e.OldValue, e.NewValue, ((SolidColorBrush)source.Foreground).Color, source.TextAlignment);\r\n            source.ParseText(value);\r\n        }\r\n\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            _defaultFontSize = FontSize;\r\n            _stackPanel = GetTemplateChild(\"StackPanel\") as StackPanel;\r\n            ParseText(Text);\r\n\r\n            base.OnApplyTemplate();\r\n\r\n        }\r\n\r\n        private void ParseText(string value)\r\n        {\r\n            if (value == null)\r\n            {\r\n                value = \"\";\r\n            }\r\n\r\n            if (_stackPanel == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            //System.Diagnostics.Debug.WriteLine(\"{0} ParseText\", GetHashCode());\r\n            // Clear previous TextBlocks\r\n            _stackPanel.Children.Clear();\r\n\r\n            var suppressParsing = BrowserNavigationService.GetSuppressParsing(this);\r\n            var message = DataContext as TLMessageBase ?? BrowserNavigationService.GetMessage(this);\r\n            var decryptedMessage = DataContext as TLDecryptedMessageBase;\r\n            var fitIn2000Pixels = CheckFitInMaxRenderHeight(value);\r\n\r\n            if (fitIn2000Pixels)\r\n            {\r\n                var textBlock = GetTextBlock();\r\n                BrowserNavigationService.SetSuppressParsing(textBlock, suppressParsing);\r\n                BrowserNavigationService.SetMessage(textBlock, message);\r\n                BrowserNavigationService.SetDecryptedMessage(textBlock, decryptedMessage);\r\n                BrowserNavigationService.SetAddFooter(textBlock, true);\r\n                BrowserNavigationService.SetText(textBlock, value);\r\n                _stackPanel.Children.Add(textBlock);\r\n\r\n                _footerRun = GetFooter(textBlock);\r\n            }\r\n            else\r\n            {\r\n                ParseLineExtended(value);\r\n            }\r\n        }\r\n\r\n        private Run GetFooter(RichTextBox textBlock)\r\n        {\r\n            var run = textBlock.Tag as Run;\r\n            if (run != null)\r\n            {\r\n                run.Text = Footer;\r\n                run.FontSize = FooterFontSize;\r\n            }\r\n\r\n            return run;\r\n        }\r\n\r\n        private readonly int MAX_STR_LENGTH = 1100;\r\n\r\n        private void ParseLineExtended(string allText)\r\n        {\r\n            if (string.IsNullOrEmpty(allText))\r\n                return;\r\n\r\n\r\n            int cutIndex = MAX_STR_LENGTH;\r\n            if (cutIndex >= allText.Length)\r\n                cutIndex = allText.Length - 1;\r\n\r\n            var endOfSentenceIndAfterCut = allText.IndexOf(\".\", cutIndex);\r\n\r\n            if (endOfSentenceIndAfterCut >= 0 && endOfSentenceIndAfterCut - cutIndex < 200)\r\n            {\r\n                cutIndex = endOfSentenceIndAfterCut;\r\n            }\r\n            else\r\n            {\r\n                var whiteSpaceIndAfterCut = allText.IndexOf(' ', cutIndex);\r\n\r\n                if (whiteSpaceIndAfterCut >= 0 && whiteSpaceIndAfterCut - cutIndex < 100)\r\n                {\r\n                    cutIndex = whiteSpaceIndAfterCut;\r\n                }\r\n            }\r\n\r\n            // add all whitespaces before cut\r\n            while (cutIndex + 1 < allText.Length &&\r\n                   allText[cutIndex + 1] == ' ')\r\n            {\r\n                cutIndex++;\r\n            }\r\n\r\n            var suppressParsing = BrowserNavigationService.GetSuppressParsing(this);\r\n            var message = DataContext as TLMessageBase;\r\n            var decryptedMessage = DataContext as TLDecryptedMessageBase;\r\n\r\n            var leftSide = allText.Substring(0, cutIndex + 1);\r\n            allText = allText.Substring(cutIndex + 1);\r\n            var isLastTextBlock = allText.Length <= 0;\r\n            var textBlock = GetTextBlock();\r\n            BrowserNavigationService.SetSuppressParsing(textBlock, suppressParsing);\r\n            BrowserNavigationService.SetMessage(textBlock, message);\r\n            BrowserNavigationService.SetDecryptedMessage(textBlock, decryptedMessage);\r\n            if (isLastTextBlock)\r\n            {\r\n                BrowserNavigationService.SetAddFooter(textBlock, true);\r\n            }\r\n            BrowserNavigationService.SetText(textBlock, leftSide);\r\n            _stackPanel.Children.Add(textBlock);\r\n\r\n            _footerRun = GetFooter(textBlock);\r\n\r\n            if (!isLastTextBlock)\r\n            {\r\n                ParseLineExtended(allText);\r\n            }\r\n        }\r\n\r\n        private bool CheckFitInMaxRenderHeight(string value)\r\n        {\r\n            return value.Length <= MAX_STR_LENGTH;\r\n        }\r\n\r\n        private RichTextBox GetTextBlock()\r\n        {\r\n            var textBlock = new RichTextBox();\r\n\r\n            textBlock.TextAlignment = TextAlignment;\r\n            textBlock.TextWrapping = TextWrapping;\r\n            \r\n            textBlock.IsReadOnly = true;\r\n            textBlock.FontSize = FontSize * TextScaleFactor;\r\n            textBlock.FontFamily = FontFamily;\r\n            textBlock.HorizontalContentAlignment = HorizontalContentAlignment;\r\n            textBlock.Foreground = Foreground;\r\n            textBlock.Padding = new Thickness(0, 0, 0, 0);\r\n            textBlock.Margin = new Thickness(0, 0, 0, 0);\r\n            textBlock.FlowDirection = FlowDirection;\r\n\r\n            return textBlock;\r\n        }\r\n\r\n    }\r\n\r\n    public class Utils\r\n    {\r\n        public static readonly Regex HyperlinkRegex = new Regex(\"(?i)\\\\b(((?:https?://|www\\\\d{0,3}[.]|[a-z0-9.\\\\-]+[.][a-z]{2,4}/)(?:[^\\\\s()<>]+|\\\\(([^\\\\s()<>]+|(\\\\([^\\\\s()<>]+\\\\)))*\\\\))+(?:\\\\(([^\\\\s()<>]+|(\\\\([^\\\\s()<>]+\\\\)))*\\\\)|[^\\\\s`!()\\\\[\\\\]{};:'\\\".,<>?«»“”‘’]))|([a-z0-9.\\\\-]+(\\\\.ru|\\\\.com|\\\\.net|\\\\.org|\\\\.us|\\\\.it|\\\\.co\\\\.uk)(?![a-z0-9]))|([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\\\.[a-zA-Z0-9-.]*[a-zA-Z0-9-]+))\");\r\n\r\n        public static string GetFormattedLink(string link)\r\n        {\r\n            var flag = link.EndsWith(\",\");\r\n            if (flag && link.Length > 1)\r\n                link = link.Substring(0, link.Length - 1);\r\n            if (!link.StartsWith(\"http\", StringComparison.OrdinalIgnoreCase))\r\n                link = \"http://\" + link;\r\n\r\n            return link;\r\n        }\r\n\r\n        public static Inline GetTextBlock(string text)\r\n        {\r\n            return new Run { Text = text };\r\n        }\r\n\r\n        public static Inline GetHyperlinkBlock(string text, string link)\r\n        {\r\n            var hyperlink = new Hyperlink();\r\n            hyperlink.Inlines.Add(text);\r\n            hyperlink.NavigateUri = new Uri(link, UriKind.Absolute);\r\n\r\n            return hyperlink;\r\n        }\r\n\r\n        public static Inline GetEmojiBlock(string emoji)\r\n        {\r\n            var uiContainer = new InlineUIContainer();\r\n            uiContainer.Child = new Image { Source = GetEmojiSource(emoji), Width = 30, Height = 30 };\r\n\r\n            return uiContainer;\r\n        }\r\n\r\n        public static ImageSource GetEmojiSource(string emoji)\r\n        {\r\n            return new BitmapImage(new Uri(emoji));\r\n        }\r\n\r\n        public static Regex GetRegex(bool supportEmoji)\r\n        {\r\n            if (supportEmoji)\r\n            {\r\n                return HyperlinkRegex;\r\n            }\r\n\r\n            return HyperlinkRegex;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Controls/TelegramTransitionFrame.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Extensions;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Themes.Default.Templates;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.Views.Additional;\r\nusing TelegramClient.Views.Calls;\r\nusing TelegramClient.Views.Controls;\r\n\r\nnamespace TelegramClient.Controls\r\n{\r\n    public class TelegramTransitionFrame : TransitionFrame\r\n    {\r\n        public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(\r\n            \"Title\", typeof(string), typeof(TelegramTransitionFrame), new PropertyMetadata(default(string)));\r\n\r\n        public string Title\r\n        {\r\n            get { return (string)GetValue(TitleProperty); }\r\n            set { SetValue(TitleProperty, value); }\r\n        }\r\n\r\n        private UIElement _blockingProgress;\r\n\r\n        private Border _clientArea;\r\n\r\n        private StackPanel _blockingPanel;\r\n\r\n        private LockscreenView _passcodePanel;\r\n\r\n        //private TextBlock _debugInfo;\r\n\r\n        //public TextBlock DebugInfo { get { return _debugInfo; } }\r\n\r\n        //private ListBox _debugList;\r\n\r\n        //public ListBox DebugList { get { return _debugList; } }\r\n\r\n        private MediaElement _element;\r\n\r\n        public MediaElement Element { get { return _element; } }\r\n\r\n        private ContentControl _callPlaceholder;\r\n\r\n        private ContentControl _blockingPlaceholder;\r\n\r\n        private Border _player;\r\n\r\n        public TelegramTransitionFrame()\r\n        {\r\n            DefaultStyleKey = typeof(TelegramTransitionFrame);\r\n\r\n            Loaded += OnLoaded;\r\n\r\n            Navigating += OnNavigating;\r\n\r\n            //AddOrRemoveEventHandler();\r\n        }\r\n\r\n        #region Handle Software buttons\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            this.Unloaded -= this.OnUnloaded;\r\n            this.AddOrRemoveEventHandler(remove: true);\r\n        }\r\n\r\n        private bool AddOrRemoveEventHandler(bool remove = false)\r\n        {\r\n            var ei = GetType().GetEvents();\r\n            var pi = GetType().GetProperties();\r\n\r\n            var evInfo = GetType().GetEvent(\"NavigationBarVisibilityChanged\", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance);\r\n            if (evInfo != null)\r\n            {\r\n                var method = evInfo.AddMethod;\r\n                if (remove)\r\n                {\r\n                    method = evInfo.RemoveMethod;\r\n                }\r\n                method.Invoke(this, new EventHandler[] { OnNavBarVisibilityChanged });\r\n                Unloaded += OnUnloaded;\r\n                return true;\r\n            }\r\n            return false;\r\n        }\r\n\r\n        private void UpdateMargin(double occludedHeight)\r\n        {\r\n            Margin = new Thickness(0, 0, 0, occludedHeight);\r\n        }\r\n\r\n        private void OnNavBarVisibilityChanged(object sender, System.EventArgs e)\r\n        {\r\n            var occludedHeightProp = e.GetType().GetProperties().SingleOrDefault(p => p.Name == \"OccludedHeight\");\r\n            if (occludedHeightProp != null)\r\n            {\r\n                var occludedHeight = (double)occludedHeightProp.GetValue(e);\r\n                UpdateMargin(occludedHeight);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n\r\n\r\n        private void OnNavigating(object sender, NavigatingCancelEventArgs e)\r\n        {\r\n            if (_passcodePanel != null\r\n                && _passcodePanel.Visibility == Visibility.Visible\r\n                && e.IsCancelable)\r\n            {\r\n                e.Cancel = true;\r\n            }\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            _blockingProgress = GetTemplateChild(\"BlockingProgress\") as Border;\r\n            _clientArea = GetTemplateChild(\"ClientArea\") as Border;\r\n            _blockingPanel = GetTemplateChild(\"BlockingPanel\") as StackPanel;\r\n            _passcodePanel = GetTemplateChild(\"PasscodePanel\") as LockscreenView;\r\n            //_debugInfo = GetTemplateChild(\"DebugInfo\") as TextBlock;\r\n            _element = GetTemplateChild(\"Element\") as MediaElement;\r\n            if (_element != null)\r\n            {\r\n                _element.MediaOpened += PlayerOnMediaOpened;\r\n                _element.MediaFailed += PlayerOnMediaFailed;\r\n                _element.MediaEnded += PlayerOnMediaEnded;\r\n            }\r\n            _callPlaceholder = GetTemplateChild(\"CallPlaceholder\") as ContentControl;\r\n            _blockingPlaceholder = GetTemplateChild(\"BlockingPlaceholder\") as ContentControl;\r\n            _player = GetTemplateChild(\"Player\") as Border;\r\n            if (_player != null)\r\n            {\r\n                _player.ManipulationDelta += PlayerOnManipulationDelta;\r\n                _player.ManipulationCompleted += PlayerOnManipulationCompleted;\r\n            }\r\n\r\n            //#if !DEBUG\r\n            //if (_debugInfo != null) _debugInfo.Visibility = Visibility.Collapsed;\r\n            //if (_debugList != null) _debugList.Visibility = Visibility.Collapsed;\r\n            //#endif\r\n\r\n            if (_returnToCallControl != null)\r\n            {\r\n                _callPlaceholder.Content = _returnToCallControl;\r\n            }\r\n\r\n            if (PasscodeUtils.IsLockscreenRequired)\r\n            {\r\n                OpenLockscreen();\r\n            }\r\n        }\r\n\r\n\r\n\r\n        private void PlayerOnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            if (_player.Visibility == Visibility.Visible)\r\n            {\r\n                var position = _player.TransformToVisual(Application.Current.RootVisual).Transform(new Point(80.0, 80.0));\r\n\r\n                System.Diagnostics.Debug.WriteLine(position.X + \" \" + position.Y);\r\n\r\n                var toX = 0.0;\r\n                var toY = 0.0;\r\n\r\n                var transform = _player.RenderTransform as TranslateTransform;\r\n                if (transform != null)\r\n                {\r\n                    if (position.X < 40.0)\r\n                    {\r\n                        toX = transform.X - 160.0;\r\n                    }\r\n                    else if (position.X > 440.0)\r\n                    {\r\n                        toX = transform.X + 160.0;\r\n                    }\r\n                    else if (position.Y < 40.0)\r\n                    {\r\n                        toY = transform.Y - 160.0;\r\n                    }\r\n                    else if (position.Y > 760.0)\r\n                    {\r\n                        toY = transform.Y + 160.0;\r\n                    }\r\n\r\n                    if (Math.Abs(toY) > 0.001 || Math.Abs(toX) > 0.001)\r\n                    {\r\n                        var storyborad = new Storyboard();\r\n                        if (Math.Abs(toY) > 0.001)\r\n                        {\r\n                            var translateYAnimaiton = new DoubleAnimation { To = toY, Duration = TimeSpan.FromSeconds(0.15), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 3.0 } };\r\n                            Storyboard.SetTarget(translateYAnimaiton, transform);\r\n                            Storyboard.SetTargetProperty(translateYAnimaiton, new PropertyPath(\"Y\"));\r\n                            storyborad.Children.Add(translateYAnimaiton);\r\n                        }\r\n                        else if (Math.Abs(toX) > 0.001)\r\n                        {\r\n                            var translateYAnimaiton = new DoubleAnimation { To = toX, Duration = TimeSpan.FromSeconds(0.15), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 3.0 } };\r\n                            Storyboard.SetTarget(translateYAnimaiton, transform);\r\n                            Storyboard.SetTargetProperty(translateYAnimaiton, new PropertyPath(\"X\"));\r\n                            storyborad.Children.Add(translateYAnimaiton);\r\n                        }\r\n                        storyborad.Completed += (o, args) =>\r\n                        {\r\n                            _player.Visibility = Visibility.Collapsed;\r\n                            _player.RenderTransform = null;\r\n\r\n                            PlayerOnMediaEnded(_element, new RoutedEventArgs());\r\n                        };\r\n\r\n                        _element.Stop();\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(storyborad.Begin);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void PlayerOnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            var translateTransform = _player.RenderTransform as TranslateTransform;\r\n            if (translateTransform == null)\r\n            {\r\n                translateTransform = new TranslateTransform();\r\n                _player.RenderTransform = translateTransform;\r\n            }\r\n\r\n            translateTransform.X += e.DeltaManipulation.Translation.X;\r\n            translateTransform.Y += e.DeltaManipulation.Translation.Y;\r\n\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void PlayerOnMediaEnded(object sender, RoutedEventArgs e)\r\n        {\r\n            var mediaElement = sender as MediaElement;\r\n            if (mediaElement != null)\r\n            {\r\n                var player = mediaElement.Tag as GifPlayerControl;\r\n                if (player != null)\r\n                {\r\n                    player.OnMediaEnded();\r\n                    return;\r\n                }\r\n\r\n                var audioPlayer = mediaElement.Tag as MessagePlayerControl;\r\n                if (audioPlayer != null)\r\n                {\r\n                    audioPlayer.OnMediaEnded();\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void PlayerOnMediaFailed(object sender, ExceptionRoutedEventArgs e)\r\n        {\r\n            var mediaElement = sender as MediaElement;\r\n            if (mediaElement != null)\r\n            {\r\n                var player = mediaElement.Tag as GifPlayerControl;\r\n                if (player != null)\r\n                {\r\n                    player.OnMediaFailed(e);\r\n                    return;\r\n                }\r\n\r\n                var audioPlayer = mediaElement.Tag as MessagePlayerControl;\r\n                if (audioPlayer != null)\r\n                {\r\n                    audioPlayer.OnMediaFailed(e);\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void PlayerOnMediaOpened(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            var mediaElement = sender as MediaElement;\r\n            if (mediaElement != null)\r\n            {\r\n                var player = mediaElement.Tag as GifPlayerControl;\r\n                if (player != null)\r\n                {\r\n                    player.OnMediaOpened();\r\n                    return;\r\n                }\r\n\r\n                var audioPlayer = mediaElement.Tag as MessagePlayerControl;\r\n                if (audioPlayer != null)\r\n                {\r\n                    audioPlayer.OnMediaOpened();\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        private TranslateTransform _frameTransform;\r\n\r\n        public static readonly DependencyProperty RootFrameTransformProperty = DependencyProperty.Register(\r\n            \"RootFrameTransformProperty\", typeof(double), typeof(TelegramTransitionFrame), new PropertyMetadata(OnRootFrameTransformChanged));\r\n\r\n        private static void OnRootFrameTransformChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var view = d as TelegramTransitionFrame;\r\n            if (view != null)\r\n            {\r\n                view._frameTransform.Y = 0;\r\n            }\r\n        }\r\n\r\n        public double RootFrameTransform\r\n        {\r\n            get { return (double)GetValue(RootFrameTransformProperty); }\r\n            set { SetValue(RootFrameTransformProperty, value); }\r\n        }\r\n\r\n        private void SetRootFrameBinding()\r\n        {\r\n            var frame = (Frame)Application.Current.RootVisual;\r\n            _frameTransform = ((TranslateTransform)((TransformGroup)frame.RenderTransform).Children[0]);\r\n            var binding = new Binding(\"Y\")\r\n            {\r\n                Source = _frameTransform\r\n            };\r\n            SetBinding(RootFrameTransformProperty, binding);\r\n        }\r\n\r\n        private void RemoveRootFrameBinding()\r\n        {\r\n            ClearValue(RootFrameTransformProperty);\r\n        }\r\n\r\n        private IList<object> _buttons = new List<object>();\r\n        private IList<object> _menuItems = new List<object>();\r\n\r\n        private bool _removeApplicationBar;\r\n        private double _previousOpacity;\r\n        private Color _previousColor;\r\n        private bool _isSystemTrayVisible;\r\n\r\n        public bool IsPasscodeActive\r\n        {\r\n            get { return _passcodePanel != null && _passcodePanel.Visibility == Visibility.Visible; }\r\n        }\r\n\r\n        private bool _stateExists;\r\n\r\n        public void OpenLockscreen()\r\n        {\r\n            if (_passcodePanel != null && _clientArea != null)\r\n            {\r\n                if (_passcodePanel.DataContext == null)\r\n                {\r\n                    var viewModel = new LockscreenViewModel();\r\n                    _passcodePanel.DataContext = viewModel;\r\n                    viewModel.PasscodeIncorrect += _passcodePanel.OnPasscodeIncorrect;\r\n                }\r\n                _passcodePanel.Visibility = Visibility.Visible;\r\n                var page = Content as PhoneApplicationPage;\r\n                if (page != null)\r\n                {\r\n                    _passcodePanel.ParentPage = page;\r\n                    SetRootFrameBinding();\r\n                    page.IsHitTestVisible = false;\r\n\r\n                    if (!_stateExists)\r\n                    {\r\n                        _stateExists = true;\r\n                        _isSystemTrayVisible = SystemTray.IsVisible;\r\n                        SystemTray.IsVisible = false;\r\n                        if (page.ApplicationBar != null)\r\n                        {\r\n                            if (_buttons.Count == 0)\r\n                            {\r\n                                foreach (var button in page.ApplicationBar.Buttons)\r\n                                {\r\n                                    _buttons.Add(button);\r\n                                }\r\n                            }\r\n\r\n                            if (_menuItems.Count == 0)\r\n                            {\r\n                                foreach (var menuItem in page.ApplicationBar.MenuItems)\r\n                                {\r\n                                    _menuItems.Add(menuItem);\r\n                                }\r\n                            }\r\n                            //page.ApplicationBar.IsVisible = false;\r\n                            page.ApplicationBar.Buttons.Clear();\r\n                            page.ApplicationBar.MenuItems.Clear();\r\n                        }\r\n                        else\r\n                        {\r\n                            page.ApplicationBar = new ApplicationBar();\r\n                            //page.ApplicationBar.IsVisible = false;\r\n                            _removeApplicationBar = true;\r\n                        }\r\n                        _previousColor = page.ApplicationBar.BackgroundColor;\r\n                        _previousOpacity = page.ApplicationBar.Opacity;\r\n                        page.ApplicationBar.Opacity = 1.0;\r\n                        page.ApplicationBar.BackgroundColor = Colors.Transparent;\r\n                    }\r\n                }\r\n                _passcodePanel.FocusPasscode();\r\n            }\r\n        }\r\n\r\n        public void CloseLockscreen()\r\n        {\r\n            if (_passcodePanel != null && _clientArea != null)\r\n            {\r\n                _passcodePanel.Visibility = Visibility.Collapsed;\r\n\r\n                var page = Content as PhoneApplicationPage;\r\n                if (page != null)\r\n                {\r\n                    RemoveRootFrameBinding();\r\n                    page.IsHitTestVisible = true;\r\n                    _stateExists = false;\r\n                    SystemTray.IsVisible = _isSystemTrayVisible;\r\n                    if (_removeApplicationBar)\r\n                    {\r\n                        page.ApplicationBar = null;\r\n                        _removeApplicationBar = false;\r\n                    }\r\n\r\n                    if (page.ApplicationBar != null)\r\n                    {\r\n                        page.ApplicationBar.Buttons.Clear();\r\n                        page.ApplicationBar.MenuItems.Clear();\r\n                        foreach (var button in _buttons)\r\n                        {\r\n                            page.ApplicationBar.Buttons.Add(button);\r\n                        }\r\n                        foreach (var menuItem in _menuItems)\r\n                        {\r\n                            page.ApplicationBar.MenuItems.Add(menuItem);\r\n                        }\r\n\r\n                        _buttons.Clear();\r\n                        _menuItems.Clear();\r\n\r\n                        page.ApplicationBar.BackgroundColor = _previousColor;\r\n                        page.ApplicationBar.Opacity = _previousOpacity;\r\n                        //page.ApplicationBar.IsVisible = true;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsLockScreenOpen()\r\n        {\r\n            return _passcodePanel != null && _passcodePanel.Visibility == Visibility.Visible;\r\n        }\r\n\r\n        public void OpenBlockingProgress()\r\n        {\r\n            if (_blockingProgress != null && _clientArea != null)\r\n            {\r\n                _clientArea.IsHitTestVisible = false;\r\n                _blockingProgress.Visibility = Visibility.Visible;\r\n                _blockingPanel.Visibility = Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        public void CloseBlockingProgress()\r\n        {\r\n            if (_blockingProgress != null && _clientArea != null)\r\n            {\r\n                _clientArea.IsHitTestVisible = true;\r\n                _blockingProgress.Visibility = Visibility.Collapsed;\r\n                _blockingPanel.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public bool IsBlockingProgressOpen()\r\n        {\r\n            return _blockingProgress != null && _blockingProgress.Visibility == Visibility.Visible;\r\n        }\r\n\r\n        private ReturnToCallControl _returnToCallControl;\r\n\r\n        public ContentControl CallPlaceholder\r\n        {\r\n            get { return _callPlaceholder; }\r\n        }\r\n\r\n        public void ShowCallPlaceholder(System.Action callback)\r\n        {\r\n            if (_callPlaceholder == null\r\n                || _callPlaceholder.Content != null)\r\n            {\r\n                _returnToCallControl = new ReturnToCallControl();\r\n                _returnToCallControl.Tap += (o, e) =>\r\n                {\r\n                    callback.SafeInvoke();\r\n                };\r\n                return;\r\n            }\r\n\r\n            var returnToCallControl = new ReturnToCallControl();\r\n            returnToCallControl.Tap += (o, e) =>\r\n            {\r\n                callback.SafeInvoke();\r\n            };\r\n\r\n            _callPlaceholder.Content = returnToCallControl;\r\n        }\r\n\r\n        public void HideCallPlaceholder()\r\n        {\r\n            _returnToCallControl = null;\r\n            if (_callPlaceholder != null)\r\n            {\r\n                _callPlaceholder.Content = null;\r\n            }\r\n        }\r\n\r\n        private UpdateAppControl _updateAppControl;\r\n\r\n        public ContentControl BlockingPlaceholder\r\n        {\r\n            get { return _blockingPlaceholder; }\r\n        }\r\n\r\n        public void ShowBlockingPlaceholder(System.Action callback)\r\n        {\r\n            var updateAppControl = new UpdateAppControl();\r\n            updateAppControl.TapBottomMenu += (o, e) =>\r\n            {\r\n                callback.SafeInvoke();\r\n            };\r\n\r\n            _blockingPlaceholder.Content = updateAppControl;\r\n            _blockingPlaceholder.Visibility = Visibility.Visible;\r\n        }\r\n\r\n        public void HideBlockingPlaceholder()\r\n        {\r\n            _updateAppControl = null;\r\n            if (_blockingPlaceholder != null)\r\n            {\r\n                _blockingPlaceholder.Content = null;\r\n                _blockingPlaceholder.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public bool IsPlayerVisible\r\n        {\r\n            get { return _player != null && _player.Visibility == Visibility.Visible; }\r\n        }\r\n\r\n        public void ShowPlayer(Brush brush)\r\n        {\r\n            if (_player == null) return;\r\n\r\n            _player.Visibility = Visibility.Visible;\r\n            _player.Background = brush;\r\n        }\r\n\r\n        public void HidePlayer()\r\n        {\r\n            _player.Visibility = Visibility.Collapsed;\r\n            _player.Background = null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Controls/TelegramTransitionService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Controls\r\n{\r\n    /// <summary>\r\n    /// Provides attached properties for navigation\r\n    /// <see cref=\"T:Microsoft.Phone.Controls.ITransition\"/>s.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public static class TelegramTransitionService\r\n    {\r\n        /// <summary>\r\n        /// The\r\n        /// <see cref=\"T:System.Windows.DependencyProperty\"/>\r\n        /// for the in <see cref=\"T:Microsoft.Phone.Controls.ITransition\"/>s.\r\n        /// </summary>\r\n        public static readonly DependencyProperty NavigationInTransitionProperty =\r\n            DependencyProperty.RegisterAttached(\"NavigationInTransition\", typeof(TelegramNavigationInTransition), typeof(TelegramTransitionService), null);\r\n\r\n        /// <summary>\r\n        /// The\r\n        /// <see cref=\"T:System.Windows.DependencyProperty\"/>\r\n        /// for the in <see cref=\"T:Microsoft.Phone.Controls.ITransition\"/>s.\r\n        /// </summary>\r\n        public static readonly DependencyProperty NavigationOutTransitionProperty =\r\n            DependencyProperty.RegisterAttached(\"NavigationOutTransition\", typeof(TelegramNavigationOutTransition), typeof(TelegramTransitionService), null);\r\n\r\n        /// <summary>\r\n        /// Gets the\r\n        /// <see cref=\"T:Microsoft.Phone.Controls.NavigationTransition\"/>s\r\n        /// of\r\n        /// <see cref=\"M:Microsoft.Phone.Controls.TransitionService.NavigationInTransitionProperty\"/>\r\n        /// for a\r\n        /// <see cref=\"T:System.Windows.UIElement\"/>.\r\n        /// </summary>\r\n        /// <param name=\"element\">The <see cref=\"T:System.Windows.UIElement\"/>.</param>\r\n        /// <returns>The </returns>\r\n        public static TelegramNavigationInTransition GetNavigationInTransition(UIElement element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            return (TelegramNavigationInTransition)element.GetValue(NavigationInTransitionProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the\r\n        /// <see cref=\"T:Microsoft.Phone.Controls.NavigationTransition\"/>s\r\n        /// of\r\n        /// <see cref=\"M:Microsoft.Phone.Controls.TransitionService.NavigationOutTransitionProperty\"/>\r\n        /// for a\r\n        /// <see cref=\"T:System.Windows.UIElement\"/>.\r\n        /// </summary>\r\n        /// <param name=\"element\">The <see cref=\"T:System.Windows.UIElement\"/>.</param>\r\n        /// <returns>The </returns>\r\n        public static TelegramNavigationOutTransition GetNavigationOutTransition(UIElement element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            return (TelegramNavigationOutTransition)element.GetValue(NavigationOutTransitionProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets a\r\n        /// <see cref=\"T:Microsoft.Phone.Controls.NavigationTransition\"/>\r\n        /// to\r\n        /// <see cref=\"M:Microsoft.Phone.Controls.TransitionService.NavigationInTransitionProperty\"/>\r\n        /// for a\r\n        /// <see cref=\"T:System.Windows.UIElement\"/>.\r\n        /// </summary>\r\n        /// <param name=\"element\">The <see cref=\"T:System.Windows.UIElement\"/>.</param>\r\n        /// <param name=\"value\">The <see cref=\"T:Microsoft.Phone.Controls.NavigationTransition\"/>.</param>\r\n        /// <returns>The </returns>\r\n        public static void SetNavigationInTransition(UIElement element, TelegramNavigationInTransition value)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            element.SetValue(NavigationInTransitionProperty, value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets a\r\n        /// <see cref=\"T:Microsoft.Phone.Controls.NavigationTransition\"/>s\r\n        /// to\r\n        /// <see cref=\"M:Microsoft.Phone.Controls.TransitionService.NavigationOutTransitionProperty\"/>\r\n        /// for a\r\n        /// <see cref=\"T:System.Windows.UIElement\"/>.\r\n        /// </summary>\r\n        /// <param name=\"element\">The <see cref=\"T:System.Windows.UIElement\"/>.</param>\r\n        /// <param name=\"value\">The <see cref=\"T:Microsoft.Phone.Controls.NavigationTransition\"/>.</param>\r\n        /// <returns>The </returns>\r\n        public static void SetNavigationOutTransition(UIElement element, TelegramNavigationOutTransition value)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            element.SetValue(NavigationOutTransitionProperty, value);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Controls/TelegramTurnstileTransition.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Controls;\r\n\r\nnamespace TelegramClient.Controls\r\n{\r\n    public class TelegramTurnstileTransition : TransitionElement\r\n    {\r\n        public static readonly DependencyProperty ModeProperty = DependencyProperty.Register(\"Mode\", typeof (TurnstileTransitionMode), typeof (TelegramTurnstileTransition), null);\r\n\r\n        public TurnstileTransitionMode Mode\r\n        {\r\n            get { return (TurnstileTransitionMode)GetValue(ModeProperty); }\r\n            set { SetValue(ModeProperty, value); }\r\n        }\r\n\r\n        static TelegramTurnstileTransition()\r\n        {\r\n        }\r\n\r\n        public override ITransition GetTransition(UIElement element)\r\n        {\r\n            return new Transition(element, TelegramTurnstileAnimations.GetAnimation(element, Mode));\r\n        }\r\n    }\r\n\r\n    public static class TelegramTurnstileAnimations\r\n    {\r\n        public static Storyboard GetAnimation(UIElement element, TurnstileTransitionMode mode)\r\n        {\r\n            if (!(element.Projection is PlaneProjection))\r\n            {\r\n                element.Projection = new PlaneProjection { CenterOfRotationX = 0.0 };\r\n            }\r\n\r\n            if (mode == TurnstileTransitionMode.ForwardIn)\r\n            {\r\n                return ForwardIn(element);\r\n            }\r\n            \r\n            if (mode == TurnstileTransitionMode.ForwardOut)\r\n            {\r\n                return ForwardOut(element);\r\n            }\r\n            \r\n            if (mode == TurnstileTransitionMode.BackwardIn)\r\n            {\r\n                return BackwardIn(element);\r\n            }\r\n                \r\n            return BackwardOut(element);\r\n        }\r\n\r\n        public static Storyboard ForwardIn(UIElement element)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var rotationYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            rotationYAnimation.KeyFrames.Add(new SplineDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -80 });\r\n            rotationYAnimation.KeyFrames.Add(new SplineDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.35), Value = 0, KeySpline = new KeySpline { ControlPoint1 = new Point(0.10000000149011612, 0.89999997615811421), ControlPoint2 = new Point(0.20000000298023224, 1) } });\r\n            Storyboard.SetTargetProperty(rotationYAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationY)\"));\r\n            storyboard.Children.Add(rotationYAnimation);\r\n\r\n            var globalOffsetXAnimation = new DoubleAnimationUsingKeyFrames();\r\n            globalOffsetXAnimation.KeyFrames.Add(new SplineDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 200 });\r\n            globalOffsetXAnimation.KeyFrames.Add(new SplineDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.35), Value = 0, KeySpline = new KeySpline { ControlPoint1 = new Point(0.10000000149011612, 0.89999997615811421), ControlPoint2 = new Point(0.20000000298023224, 1) } });\r\n            Storyboard.SetTargetProperty(globalOffsetXAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.LocalOffsetX)\"));\r\n            storyboard.Children.Add(globalOffsetXAnimation);\r\n\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.01), Value = 1 });\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            Storyboard.SetTarget(storyboard, element);\r\n\r\n            return storyboard;\r\n        }\r\n\r\n        public static Storyboard ForwardOut(UIElement element)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var rotationYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            rotationYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0 });\r\n            rotationYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.22), Value = 30, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5 } });\r\n            Storyboard.SetTargetProperty(rotationYAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationY)\"));\r\n            storyboard.Children.Add(rotationYAnimation);\r\n\r\n            var globalOffsetXAnimation = new DoubleAnimationUsingKeyFrames();\r\n            globalOffsetXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0 });\r\n            globalOffsetXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.22), Value = -100, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5 } });\r\n            Storyboard.SetTargetProperty(globalOffsetXAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.GlobalOffsetX)\"));\r\n            storyboard.Children.Add(globalOffsetXAnimation);\r\n\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 1 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.219), Value = 1 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.22), Value = 0 });\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            Storyboard.SetTarget(storyboard, element);\r\n\r\n            return storyboard;\r\n        }\r\n\r\n        public static Storyboard BackwardIn(UIElement element)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var rotationYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            rotationYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 50 });\r\n            rotationYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.35), Value = 0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6 } });\r\n            Storyboard.SetTargetProperty(rotationYAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationY)\"));\r\n            storyboard.Children.Add(rotationYAnimation);\r\n\r\n            var globalOffsetXAnimation = new DoubleAnimationUsingKeyFrames();\r\n            globalOffsetXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -60 });\r\n            globalOffsetXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.35), Value = 0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6 } });\r\n            Storyboard.SetTargetProperty(globalOffsetXAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.GlobalOffsetX)\"));\r\n            storyboard.Children.Add(globalOffsetXAnimation);\r\n\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.001), Value = 1 });\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            Storyboard.SetTarget(storyboard, element);\r\n\r\n            return storyboard;\r\n        }\r\n\r\n        public static Storyboard BackwardOut(UIElement element)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var rotationYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            rotationYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0 });\r\n            rotationYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = -60, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5 } });\r\n            Storyboard.SetTargetProperty(rotationYAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationY)\"));\r\n            storyboard.Children.Add(rotationYAnimation);\r\n\r\n            var globalOffsetXAnimation = new DoubleAnimationUsingKeyFrames();\r\n            globalOffsetXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0 });\r\n            globalOffsetXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = 60, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6 } });\r\n            Storyboard.SetTargetProperty(globalOffsetXAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.GlobalOffsetX)\"));\r\n            storyboard.Children.Add(globalOffsetXAnimation);\r\n\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 1 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.19), Value = 1 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = 0 });\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            Storyboard.SetTarget(storyboard, element);\r\n\r\n            return storyboard;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Controls/TestScrollableTextBlock.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace Telegram.EmojiPanel\r\n{\r\n    public class TestScrollableTextBlock : Control\r\n    {\r\n        private StackPanel stackPanel;\r\n        private TextBlock measureTxt;\r\n\r\n        public TestScrollableTextBlock()\r\n        {\r\n            DefaultStyleKey = typeof(TestScrollableTextBlock);\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty =\r\n            DependencyProperty.Register(\r\n                \"Text\",\r\n                typeof(string),\r\n                typeof(TestScrollableTextBlock),\r\n                new PropertyMetadata(\"\", OnTextPropertyChanged));\r\n\r\n\r\n        public static readonly DependencyProperty LineHeightProperty\r\n            = DependencyProperty.Register(\r\n            \"LineHeight\",\r\n            typeof(double),\r\n            typeof(TestScrollableTextBlock), null);\r\n\r\n        public string Text\r\n        {\r\n            get\r\n            {\r\n                return (string)GetValue(TextProperty);\r\n            }\r\n            set\r\n            {\r\n                SetValue(TextProperty, value);\r\n            }\r\n        }\r\n\r\n        private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            //TestScrollableTextBlock source = (TestScrollableTextBlock)d;\r\n            //string value = (string)e.NewValue;\r\n            //source.ParseText(value);\r\n        }\r\n\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            stackPanel = GetTemplateChild(\"StackPanel\") as StackPanel;\r\n            ParseText(Text);\r\n\r\n            base.OnApplyTemplate();\r\n            \r\n        }\r\n\r\n        private void ParseText(string value)\r\n        {\r\n            if (value == null)\r\n            {\r\n                value = \"\";\r\n            }\r\n\r\n            if (this.stackPanel == null)\r\n            {\r\n                return;\r\n            }\r\n            // Clear previous TextBlocks\r\n            this.stackPanel.Children.Clear();\r\n\r\n\r\n            bool fitIn2000Pixels = CheckFitInMaxRenderHeight(value);\r\n\r\n            if (fitIn2000Pixels)\r\n            {\r\n                RichTextBox textBlock = this.GetTextBlock();\r\n                BrowserNavigationService.SetText(textBlock, value);\r\n                this.stackPanel.Children.Add(textBlock);\r\n            }\r\n            else\r\n            {\r\n                ParseLineExtended(value);\r\n            }\r\n        }\r\n\r\n        private readonly int MAX_STR_LENGTH = 1100;\r\n\r\n        private void ParseLineExtended(string allText)\r\n        {\r\n            if (string.IsNullOrEmpty(allText))\r\n                return;\r\n\r\n\r\n            int cutIndex = MAX_STR_LENGTH;\r\n            if (cutIndex >= allText.Length)\r\n                cutIndex = allText.Length - 1;\r\n\r\n            var endOfSentenceIndAfterCut = allText.IndexOf(\".\", cutIndex);\r\n\r\n            if (endOfSentenceIndAfterCut >= 0 && endOfSentenceIndAfterCut - cutIndex < 200)\r\n            {\r\n                cutIndex = endOfSentenceIndAfterCut;\r\n            }\r\n            else\r\n            {\r\n                var whiteSpaceIndAfterCut = allText.IndexOf(' ', cutIndex);\r\n\r\n                if (whiteSpaceIndAfterCut >= 0 && whiteSpaceIndAfterCut - cutIndex < 100)\r\n                {\r\n                    cutIndex = whiteSpaceIndAfterCut;\r\n                }\r\n            }\r\n\r\n            // add all whitespaces before cut\r\n            while (cutIndex + 1 < allText.Length &&\r\n                   allText[cutIndex + 1] == ' ')\r\n            {\r\n                cutIndex++;\r\n            }\r\n\r\n            string leftSide = allText.Substring(0, cutIndex + 1);\r\n            RichTextBox textBlock = this.GetTextBlock();\r\n            BrowserNavigationService.SetText(textBlock, leftSide);\r\n            this.stackPanel.Children.Add(textBlock);\r\n\r\n            allText = allText.Substring(cutIndex + 1);\r\n\r\n            if (allText.Length > 0)\r\n            {\r\n                ParseLineExtended(allText);\r\n            }\r\n        }\r\n\r\n        private bool CheckFitInMaxRenderHeight(string value)\r\n        {\r\n            return value.Length <= MAX_STR_LENGTH;\r\n        }\r\n\r\n        private RichTextBox GetTextBlock()\r\n        {\r\n            RichTextBox textBlock = new RichTextBox();\r\n            textBlock.TextWrapping = TextWrapping.Wrap;\r\n\r\n            textBlock.IsReadOnly = true;\r\n            textBlock.FontSize = this.FontSize;\r\n            textBlock.FontFamily = this.FontFamily;\r\n            textBlock.HorizontalContentAlignment = this.HorizontalContentAlignment;\r\n            textBlock.Foreground = Foreground;\r\n            textBlock.Padding = new Thickness(-12, 0, 0, 0);\r\n\r\n            return textBlock;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Controls/TransitionFrame.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Reflection;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\n\r\nnamespace TelegramClient.Controls\r\n{\r\n    /// <summary>\r\n    /// Enables navigation transitions for\r\n    /// <see cref=\"T:Microsoft.Phone.Controls.PhoneApplicationPage\"/>s.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplatePart(Name = FirstTemplatePartName, Type = typeof(ContentPresenter))]\r\n    [TemplatePart(Name = SecondTemplatePartName, Type = typeof(ContentPresenter))]\r\n    public class TransitionFrame : PhoneApplicationFrame\r\n    {\r\n        #region Constants and Statics\r\n        /// <summary>\r\n        /// The new\r\n        /// <see cref=\"T:System.Windows.Controls.ContentPresenter\"/>\r\n        /// template part name.\r\n        /// </summary>\r\n        private const string FirstTemplatePartName = \"FirstContentPresenter\";\r\n\r\n        /// <summary>\r\n        /// The old\r\n        /// <see cref=\"T:System.Windows.Controls.ContentPresenter\"/>\r\n        /// template part name.\r\n        /// </summary>\r\n        private const string SecondTemplatePartName = \"SecondContentPresenter\";\r\n\r\n        /// <summary>\r\n        /// A single shared instance for setting BitmapCache on a visual.\r\n        /// </summary>\r\n        internal static readonly CacheMode BitmapCacheMode = new BitmapCache();\r\n        #endregion\r\n\r\n        #region Template Parts\r\n        /// <summary>\r\n        /// The first <see cref=\"T:System.Windows.Controls.ContentPresenter\"/>.\r\n        /// </summary>\r\n        private ContentPresenter _firstContentPresenter;\r\n\r\n        /// <summary>\r\n        /// The second <see cref=\"T:System.Windows.Controls.ContentPresenter\"/>.\r\n        /// </summary>\r\n        private ContentPresenter _secondContentPresenter;\r\n\r\n        /// <summary>\r\n        /// The new <see cref=\"T:System.Windows.Controls.ContentPresenter\"/>.\r\n        /// </summary>\r\n        private ContentPresenter _newContentPresenter;\r\n\r\n        /// <summary>\r\n        /// The old <see cref=\"T:System.Windows.Controls.ContentPresenter\"/>.\r\n        /// </summary>\r\n        private ContentPresenter _oldContentPresenter;\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Indicates whether a navigation is forward.\r\n        /// </summary>\r\n        private bool _isForwardNavigation;\r\n\r\n        /// <summary>\r\n        /// Determines whether to set the new content to the first or second\r\n        /// <see cref=\"T:System.Windows.Controls.ContentPresenter\"/>.\r\n        /// </summary>\r\n        private bool _useFirstAsNew;\r\n\r\n        /// <summary>\r\n        /// A value indicating whether the old transition has completed and the\r\n        /// new transition can begin.\r\n        /// </summary>\r\n        private bool _readyToTransitionToNewContent;\r\n\r\n        /// <summary>\r\n        /// A value indicating whether the new content has been loaded and the\r\n        /// new transition can begin.\r\n        /// </summary>\r\n        private bool _contentReady;\r\n\r\n        /// <summary>\r\n        /// A value indicating whether the exit transition is currently being performed.\r\n        /// </summary>\r\n        private bool _performingExitTransition;\r\n\r\n        /// <summary>\r\n        /// A value indicating whether the navigation is cancelled.\r\n        /// </summary>\r\n        private bool _navigationStopped;\r\n\r\n        /// <summary>\r\n        /// The transition to use to move in new content once the old transition\r\n        /// is complete and ready for movement.\r\n        /// </summary>\r\n        private ITransition _storedNewTransition;\r\n\r\n        /// <summary>\r\n        /// The stored NavigationIn transition instance to use once the old\r\n        /// transition is complete and ready for movement.\r\n        /// </summary>\r\n        private TelegramNavigationInTransition _storedNavigationInTransition;\r\n\r\n        /// <summary>\r\n        /// The transition to use to complete the old transition.\r\n        /// </summary>\r\n        private ITransition _storedOldTransition;\r\n\r\n        /// <summary>\r\n        /// The stored NavigationOut transition instance.\r\n        /// </summary>\r\n        private TelegramNavigationOutTransition _storedNavigationOutTransition;\r\n\r\n        /// <summary>\r\n        /// Initialzies a new instance of the TransitionFrame class.\r\n        /// </summary>\r\n        public TransitionFrame()\r\n            : base()\r\n        {\r\n            DefaultStyleKey = typeof(TransitionFrame);\r\n            Navigating += OnNavigating;\r\n            NavigationStopped += OnNavigationStopped;\r\n            NavigationFailed += OnNavigationFailed;\r\n        }\r\n\r\n        private void OnNavigationFailed(object sender, NavigationFailedEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        /// <summary>\r\n        /// Flips the logical content presenters to prepare for the next visual\r\n        /// transition.\r\n        /// </summary>\r\n        private void FlipPresenters()\r\n        {\r\n            _newContentPresenter = _useFirstAsNew ? _firstContentPresenter : _secondContentPresenter;\r\n            _oldContentPresenter = _useFirstAsNew ? _secondContentPresenter : _firstContentPresenter;\r\n            _useFirstAsNew = !_useFirstAsNew;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the Navigating event of the frame, the immediate way to\r\n        /// begin a transition out before the new page has loaded or had its\r\n        /// layout pass.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event arguments.</param>\r\n        private void OnNavigating(object sender, NavigatingCancelEventArgs e)\r\n        {\r\n            //if (e.NavigationMode == NavigationMode.Reset \r\n            //    || e.Uri.OriginalString == \"app://external/\" \r\n            //    || e.Uri.OriginalString.StartsWith(\"/Protocol?encodedLaunchUri\"))\r\n                //|| e.Uri.OriginalString.Contains(\"msg_id\"))         \r\n            //    return; \r\n\r\n            // If the current application is not the origin\r\n            // and destination of the navigation, ignore it.\r\n            // e.g. do not play a transition when the \r\n            // application gets deactivated because the shell\r\n            // will animate the frame out automatically.\r\n            if (!e.IsNavigationInitiator)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _isForwardNavigation = e.NavigationMode != NavigationMode.Back;\r\n\r\n            var oldElement = Content as UIElement;\r\n            if (oldElement == null)\r\n            {\r\n                return;\r\n            }\r\n            \r\n            EnsureLastTransitionIsComplete();\r\n\r\n            FlipPresenters();\r\n\r\n            TransitionElement oldTransitionElement = null;\r\n            TelegramNavigationOutTransition navigationOutTransition = null;\r\n            ITransition oldTransition = null;\r\n\r\n            if (!e.Uri.OriginalString.Contains(\"msg_id\")\r\n                && !e.Uri.OriginalString.Contains(\"SecondaryTile\")\r\n                && !e.Uri.OriginalString.StartsWith(\"/Protocol?encodedLaunchUri\")\r\n                && !e.Uri.OriginalString.Contains(\"rndParam\")\r\n                && !(e.Uri.OriginalString == \"/Views/ShellView.xaml\" && e.NavigationMode == NavigationMode.New)\r\n                && !(e.Uri.OriginalString.StartsWith(\"/Views/Additional/SettingsView.xaml?Action=DC_UPDATE\")))\r\n            {\r\n                navigationOutTransition = TelegramTransitionService.GetNavigationOutTransition(oldElement);\r\n            }\r\n\r\n            if (navigationOutTransition != null)\r\n            {\r\n                oldTransitionElement = _isForwardNavigation ? navigationOutTransition.Forward : navigationOutTransition.Backward;\r\n            }\r\n            if (oldTransitionElement != null)\r\n            {\r\n                oldTransition = oldTransitionElement.GetTransition(oldElement);\r\n            }\r\n            if (oldTransition != null)\r\n            {\r\n                EnsureStoppedTransition(oldTransition);\r\n\r\n                _storedNavigationOutTransition = navigationOutTransition;\r\n                _storedOldTransition = oldTransition;\r\n                oldTransition.Completed += OnExitTransitionCompleted;\r\n\r\n                _performingExitTransition = true;\r\n\r\n                PerformTransition(navigationOutTransition, _oldContentPresenter, oldTransition);\r\n\r\n                PrepareContentPresenterForCompositor(_oldContentPresenter);\r\n            }\r\n            else\r\n            {\r\n                _readyToTransitionToNewContent = true;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the NavigationStopped event of the frame. Set a value indicating \r\n        /// that the navigation is cancelled.\r\n        /// </summary>\r\n        private void OnNavigationStopped(object sender, NavigationEventArgs e)\r\n        {\r\n            _navigationStopped = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stops the last navigation transition if it's active and a new navigation occurs.\r\n        /// </summary>\r\n        private void EnsureLastTransitionIsComplete()\r\n        {\r\n            _readyToTransitionToNewContent = false;\r\n            _contentReady = false;\r\n\r\n            if (_performingExitTransition)\r\n            {\r\n                Debug.Assert(_storedOldTransition != null && _storedNavigationOutTransition != null);\r\n\r\n                // If the app calls GoBack on NavigatedTo, we want the old content to be null\r\n                // because you can't have the same content in two spots on the visual tree.\r\n                if (_oldContentPresenter != null)\r\n                {\r\n                    _oldContentPresenter.Content = null;\r\n                }\r\n\r\n                if (_storedOldTransition != null)\r\n                {\r\n                    _storedOldTransition.Stop();\r\n                }\r\n\r\n                _storedNavigationOutTransition = null;\r\n                _storedOldTransition = null;\r\n\r\n                if (_storedNewTransition != null)\r\n                {\r\n                    _storedNewTransition.Stop();\r\n\r\n                    _storedNewTransition = null;\r\n                    _storedNavigationInTransition = null;\r\n                }\r\n\r\n                _performingExitTransition = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the completion of the exit transition, automatically \r\n        /// continuing to bring in the new element's transition as well if it is\r\n        /// ready.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event arguments.</param>\r\n        private void OnExitTransitionCompleted(object sender, System.EventArgs e)\r\n        {\r\n            _readyToTransitionToNewContent = true;\r\n            _performingExitTransition = false;\r\n\r\n            if (_navigationStopped)\r\n            {\r\n                // Restore the old content presenter's interactivity if the navigation is cancelled.\r\n                CompleteTransition(_storedNavigationOutTransition, _oldContentPresenter, _storedOldTransition);\r\n                _navigationStopped = false;\r\n            }\r\n            else\r\n            {\r\n                CompleteTransition(_storedNavigationOutTransition, /*_oldContentPresenter*/ null, _storedOldTransition);\r\n            }\r\n            \r\n            _storedNavigationOutTransition = null;\r\n            _storedOldTransition = null;\r\n\r\n            if (_contentReady)\r\n            {\r\n                ITransition newTransition = _storedNewTransition;\r\n                TelegramNavigationInTransition navigationInTransition = _storedNavigationInTransition;\r\n\r\n                _storedNewTransition = null;\r\n                _storedNavigationInTransition = null;\r\n\r\n                TransitionNewContent(newTransition, navigationInTransition);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// When overridden in a derived class, is invoked whenever application \r\n        /// code or internal processes (such as a rebuilding layout pass) call\r\n        /// <see cref=\"M:System.Windows.Controls.Control.ApplyTemplate\"/>.\r\n        /// In simplest terms, this means the method is called just before a UI \r\n        /// element displays in an application.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            _firstContentPresenter = GetTemplateChild(FirstTemplatePartName) as ContentPresenter;\r\n            _secondContentPresenter = GetTemplateChild(SecondTemplatePartName) as ContentPresenter;\r\n            \r\n            _newContentPresenter = _secondContentPresenter;\r\n            _oldContentPresenter = _firstContentPresenter;\r\n            _useFirstAsNew = true;\r\n\r\n            _readyToTransitionToNewContent = true;\r\n\r\n            if (Content != null)\r\n            {\r\n                OnContentChanged(null, Content);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the\r\n        /// <see cref=\"P:System.Windows.Controls.ContentControl.Content\"/>\r\n        /// property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldContent\">The old <see cref=\"T:System.Object\"/>.</param>\r\n        /// <param name=\"newContent\">The new <see cref=\"T:System.Object\"/>.</param>\r\n        protected override void OnContentChanged(object oldContent, object newContent)\r\n        {\r\n            base.OnContentChanged(oldContent, newContent);\r\n\r\n            _contentReady = true;\r\n\r\n            UIElement oldElement = oldContent as UIElement;\r\n            UIElement newElement = newContent as UIElement;\r\n\r\n            // Require the appropriate template parts plus a new element to\r\n            // transition to.\r\n            if (_firstContentPresenter == null || _secondContentPresenter == null || newElement == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            TelegramNavigationInTransition navigationInTransition = null;\r\n            ITransition newTransition = null;\r\n\r\n            if (newElement != null)\r\n            {\r\n                navigationInTransition = TelegramTransitionService.GetNavigationInTransition(newElement);\r\n                TransitionElement newTransitionElement = null;\r\n                if (navigationInTransition != null)\r\n                {\r\n                    newTransitionElement = _isForwardNavigation ? navigationInTransition.Forward : navigationInTransition.Backward;\r\n                }\r\n                if (newTransitionElement != null)\r\n                {\r\n                    newElement.UpdateLayout();\r\n\r\n                    newTransition = newTransitionElement.GetTransition(newElement);\r\n                    PrepareContentPresenterForCompositor(_newContentPresenter);\r\n                }\r\n            }\r\n\r\n            _newContentPresenter.Opacity = 0;\r\n            _newContentPresenter.Visibility = Visibility.Visible;\r\n            _newContentPresenter.Content = newElement;\r\n\r\n            _oldContentPresenter.Opacity = 1;\r\n            _oldContentPresenter.Visibility = Visibility.Visible;\r\n            _oldContentPresenter.Content = oldElement;\r\n\r\n            if (_readyToTransitionToNewContent)\r\n            {\r\n                TransitionNewContent(newTransition, navigationInTransition);\r\n            }\r\n            else\r\n            {\r\n                _storedNewTransition = newTransition;\r\n                _storedNavigationInTransition = navigationInTransition;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Transitions the new <see cref=\"T:System.Windows.UIElement\"/>.\r\n        /// </summary>\r\n        /// <param name=\"newTransition\">The <see cref=\"T:Microsoft.Phone.Controls.ITransition\"/> \r\n        /// for the new <see cref=\"T:System.Windows.UIElement\"/>.</param>\r\n        /// <param name=\"navigationInTransition\">The <see cref=\"T:Microsoft.Phone.Controls.NavigationInTransition\"/> \r\n        /// for the new <see cref=\"T:System.Windows.UIElement\"/>.</param>\r\n        private void TransitionNewContent(ITransition newTransition, TelegramNavigationInTransition navigationInTransition)\r\n        {\r\n            if (_oldContentPresenter != null)\r\n            {\r\n                _oldContentPresenter.Visibility = Visibility.Collapsed;\r\n                _oldContentPresenter.Content = null;\r\n            }\r\n\r\n            if (null == newTransition)\r\n            {\r\n                RestoreContentPresenterInteractivity(_newContentPresenter);\r\n                return;\r\n            }\r\n\r\n            EnsureStoppedTransition(newTransition);\r\n            newTransition.Completed += delegate\r\n            {\r\n                CompleteTransition(navigationInTransition, _newContentPresenter, newTransition);\r\n            };\r\n\r\n            _readyToTransitionToNewContent = false;\r\n            _storedNavigationInTransition = null;\r\n            _storedNewTransition = null;\r\n\r\n            PerformTransition(navigationInTransition, _newContentPresenter, newTransition);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This checks to make sure that, if the transition not be in the clock\r\n        /// state of Stopped, that is will be stopped.\r\n        /// </summary>\r\n        /// <param name=\"transition\">The transition instance.</param>\r\n        private static void EnsureStoppedTransition(ITransition transition)\r\n        {\r\n            if (transition != null && transition.GetCurrentState() != ClockState.Stopped)\r\n            {\r\n                transition.Stop();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Performs a transition when given the appropriate components,\r\n        /// includes calling the appropriate start event and ensuring opacity\r\n        /// on the content presenter.\r\n        /// </summary>\r\n        /// <param name=\"navigationTransition\">The navigation transition.</param>\r\n        /// <param name=\"presenter\">The content presenter.</param>\r\n        /// <param name=\"transition\">The transition instance.</param>\r\n        private static void PerformTransition(TelegramNavigationTransition navigationTransition, ContentPresenter presenter, ITransition transition)\r\n        {\r\n            if (navigationTransition != null)\r\n            {\r\n                navigationTransition.OnBeginTransition();\r\n                //var dynMethod = navigationTransition.GetType().GetMethod(\"OnBeginTransition\", BindingFlags.NonPublic | BindingFlags.Instance); \r\n                //dynMethod.Invoke(navigationTransition, new object[] { }); \r\n\r\n            }\r\n            if (presenter != null && presenter.Opacity != 1)\r\n            {\r\n                presenter.Opacity = 1;\r\n            }\r\n            if (transition != null)\r\n            {\r\n                transition.Begin();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Completes a transition operation by stopping it, restoring \r\n        /// interactivity, and then firing the OnEndTransition event.\r\n        /// </summary>\r\n        /// <param name=\"navigationTransition\">The navigation transition.</param>\r\n        /// <param name=\"presenter\">The content presenter.</param>\r\n        /// <param name=\"transition\">The transition instance.</param>\r\n        private static void CompleteTransition(TelegramNavigationTransition navigationTransition, ContentPresenter presenter, ITransition transition)\r\n        {\r\n            if (transition != null)\r\n            {\r\n                transition.Stop();\r\n            }\r\n\r\n            RestoreContentPresenterInteractivity(presenter);\r\n\r\n            if (navigationTransition != null)\r\n            {\r\n                navigationTransition.OnEndTransition();\r\n                //var dynMethod = navigationTransition.GetType().GetMethod(\"OnEndTransition\", BindingFlags.NonPublic | BindingFlags.Instance);\r\n                //dynMethod.Invoke(navigationTransition, new object[] { });\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the content presenter for off-thread compositing for the\r\n        /// transition animation. Also disables interactivity on it to prevent\r\n        /// accidental touches.\r\n        /// </summary>\r\n        /// <param name=\"presenter\">The content presenter instance.</param>\r\n        /// <param name=\"applyBitmapCache\">A value indicating whether to apply\r\n        /// a bitmap cache.</param>\r\n        private static void PrepareContentPresenterForCompositor(ContentPresenter presenter, bool applyBitmapCache = true)\r\n        {\r\n            if (presenter != null)\r\n            {\r\n                if (applyBitmapCache)\r\n                {\r\n                    presenter.CacheMode = BitmapCacheMode;\r\n                }\r\n                presenter.IsHitTestVisible = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Restores the interactivity for the presenter post-animation, also\r\n        /// removes the BitmapCache value.\r\n        /// </summary>\r\n        /// <param name=\"presenter\">The content presenter instance.</param>\r\n        private static void RestoreContentPresenterInteractivity(ContentPresenter presenter)\r\n        {\r\n            if (presenter != null)\r\n            {\r\n                presenter.CacheMode = null;\r\n\r\n                if (presenter.Opacity != 1)\r\n                {\r\n                    presenter.Opacity = 1;\r\n                }\r\n\r\n                presenter.IsHitTestVisible = true;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Converters/BackgroundImageConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Imaging;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class BackgroundBrushConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var bagroundItem = value as BackgroundItem;\r\n            if (bagroundItem == null) return null;\r\n\r\n            if (string.Equals(bagroundItem.Name, Constants.LibraryBackgroundString))\r\n            {\r\n                return Application.Current.Resources[\"PhoneAccentBrush\"];\r\n            }\r\n\r\n            return Application.Current.Resources[\"PhoneChromeBrush\"];\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class BackgroundImageConverter : IValueConverter\r\n    {\r\n        private BitmapCreateOptions _createOptions = BitmapCreateOptions.BackgroundCreation;\r\n\r\n        public BitmapCreateOptions CreateOptions\r\n        {\r\n            get { return _createOptions; }\r\n            set { _createOptions = value; }\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var bagroundItem = value as BackgroundItem;\r\n            if (bagroundItem == null) return null;\r\n\r\n            if (string.Equals(bagroundItem.Name, Constants.LibraryBackgroundString))\r\n            {\r\n                var fileName = bagroundItem.IsoFileName;\r\n                if (!string.IsNullOrEmpty(fileName))\r\n                {\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.FileExists(fileName))\r\n                        {\r\n                            return null;\r\n                        }\r\n\r\n                        BitmapImage imageSource;\r\n\r\n                        try\r\n                        {\r\n                            using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                            {\r\n                                stream.Seek(0, SeekOrigin.Begin);\r\n                                var b = new BitmapImage();\r\n                                b.CreateOptions = CreateOptions;\r\n                                b.SetSource(stream);\r\n                                imageSource = b;\r\n                            }\r\n                        }\r\n                        catch (Exception)\r\n                        {\r\n                            return null;\r\n                        }\r\n\r\n                        return imageSource;\r\n                    }\r\n                }\r\n\r\n                return bagroundItem.SourceString;\r\n            }\r\n\r\n            if (bagroundItem.Name.StartsWith(\"telegram\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                var fileName = bagroundItem.IsoFileName;\r\n                if (!string.IsNullOrEmpty(fileName))\r\n                {\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (store.FileExists(fileName))\r\n                        {\r\n                            BitmapImage imageSource;\r\n\r\n                            try\r\n                            {\r\n                                using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                {\r\n                                    stream.Seek(0, SeekOrigin.Begin);\r\n                                    var b = new BitmapImage();\r\n                                    b.CreateOptions = CreateOptions;\r\n                                    b.SetSource(stream);\r\n                                    imageSource = b;\r\n                                }\r\n\r\n                                return imageSource;\r\n                            }\r\n                            catch (Exception)\r\n                            {\r\n                                return null;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (bagroundItem.Wallpaper != null)\r\n            {\r\n                var width = 99.0;\r\n                double result;\r\n                if (Double.TryParse((string)parameter, out result))\r\n                {\r\n                    width = result;\r\n                }\r\n\r\n                var size = GetPhotoSize(bagroundItem.Wallpaper.Sizes, width);\r\n\r\n                if (size != null)\r\n                {\r\n                    var location = size.Location as TLFileLocation;\r\n                    if (location != null)\r\n                    {\r\n                        return DefaultPhotoConverter.ReturnOrEnqueueImage(null, false, location, bagroundItem.Wallpaper, size.Size, null);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            var image = new BitmapImage();\r\n            image.CreateOptions = CreateOptions;\r\n            image.UriSource = isLightTheme? new Uri(\"/Images/W10M/default.png\", UriKind.Relative) : null;\r\n            return image;\r\n        }\r\n\r\n        public static TLPhotoSize GetPhotoSize(TLVector<TLPhotoSizeBase> photoSizes, double width)\r\n        {\r\n            TLPhotoSize size = null;\r\n            var sizes = photoSizes.OfType<TLPhotoSize>();\r\n            foreach (var photoSize in sizes)\r\n            {\r\n                if (size == null\r\n                    || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                {\r\n                    size = photoSize;\r\n                }\r\n            }\r\n\r\n            return size;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/BooleanToValueConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class BooleanToValueConverter : IValueConverter\r\n    {\r\n        public object TrueValue { get; set; }\r\n\r\n        public object FalseValue { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return (bool)value ? TrueValue : FalseValue;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/BooleanToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class BooleanToVisibilityConverter : IValueConverter\r\n    {\r\n        #region Implementation of IValueConverter\r\n\r\n        /// <summary>\r\n        /// Modifies the source data before passing it to the target for display in the UI.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the target dependency property.\r\n        /// </returns>\r\n        /// <param name=\"value\">The source data being passed to the target.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the target dependency property.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value == null || !(value is bool)) return Visibility.Collapsed;\r\n\r\n            var result = (bool) value;\r\n            if (parameter != null\r\n                && string.Equals(parameter.ToString(), \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                result = !result;\r\n            }\r\n\r\n            return result ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Modifies the target data before passing it to the source object.  This method is called only in <see cref=\"F:System.Windows.Data.BindingMode.TwoWay\"/> bindings.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the source object.\r\n        /// </returns>\r\n        /// <param name=\"value\">The target data being passed to the source.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the source object.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/ChatForbiddenToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/ChatToMaxHeight.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class ChatToMaxHeight : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return (bool) value ? 22.0 : 44.0;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/ChatToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class ChatToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isChat = value is TLChatBase;\r\n\r\n            if (parameter != null\r\n                && string.Equals(parameter.ToString(), \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                isChat = !isChat;\r\n            }\r\n\r\n            return isChat ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/CountToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public enum ComparandType\r\n    {\r\n        MoreThan,\r\n        Equals,\r\n        LessThan\r\n    }\r\n\r\n    public class CountToVisibilityConverter : IValueConverter\r\n    {\r\n        public ComparandType Type { get; set; }\r\n\r\n\r\n        /// <summary>\r\n        /// Modifies the source data before passing it to the target for display in the UI.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the target dependency property.\r\n        /// </returns>\r\n        /// <param name=\"value\">The source data being passed to the target.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the target dependency property.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is int) || parameter == null) return Visibility.Collapsed;\r\n            try\r\n            {\r\n                var count = int.Parse(parameter.ToString());\r\n\r\n                if (Type == ComparandType.MoreThan)\r\n                {\r\n                    return (int)value > count  ? Visibility.Visible : Visibility.Collapsed;\r\n                }\r\n\r\n                if (Type == ComparandType.LessThan)\r\n                {\r\n                    return (int)value < count ? Visibility.Visible : Visibility.Collapsed;\r\n                }\r\n\r\n                return (int)value == count ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Modifies the target data before passing it to the source object.  This method is called only in <see cref=\"F:System.Windows.Data.BindingMode.TwoWay\"/> bindings.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the source object.\r\n        /// </returns>\r\n        /// <param name=\"value\">The target data being passed to the source.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the source object.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/DebugVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class DebugVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n#if DEBUG\r\n            return Visibility.Visible;\r\n#endif\r\n\r\n            return Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Converters/DefaultPhotoConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n//#define PHOTO_CACHE_DISABLED\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Dialogs;\r\nusing TelegramClient.Views.Media;\r\n#if WP81\r\nusing Windows.Graphics.Imaging;\r\n#endif\r\n#if WP8\r\nusing TelegramClient_WebP.LibWebP;\r\n#endif\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class InlineBotResultPhotoConverter : IValueConverter\r\n    {\r\n        public static BitmapImage ReturnOrEnqueueImage(TLFileLocation location, TLBotInlineResultBase owner, TLInt fileSize)\r\n        {\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                location.VolumeId,\r\n                location.LocalId,\r\n                location.Secret);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(fileName))\r\n                {\r\n                    if (fileSize != null)\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            var fileManager = IoC.Get<IFileManager>();\r\n                            fileManager.DownloadFile(location, owner, fileSize, item => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                owner.NotifyOfPropertyChange(() => owner.Self);\r\n                            }));\r\n                        });\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    BitmapImage imageSource;\r\n\r\n                    try\r\n                    {\r\n                        using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            stream.Seek(0, SeekOrigin.Begin);\r\n                            var image = new BitmapImage();\r\n                            image.SetSource(stream);\r\n                            imageSource = image;\r\n                        }\r\n                    }\r\n                    catch (Exception)\r\n                    {\r\n                        return null;\r\n                    }\r\n\r\n                    return imageSource;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static TLPhotoSize GetPhotoSize(TLPhoto photo, object parameter = null)\r\n        {\r\n            var width = 311.0;\r\n            double result;\r\n            if (Double.TryParse((string)parameter, out result))\r\n            {\r\n                width = result;\r\n            }\r\n\r\n            TLPhotoSize size = null;\r\n            var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n            foreach (var photoSize in sizes)\r\n            {\r\n                if (size == null\r\n                    || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                {\r\n                    size = photoSize;\r\n                }\r\n            }\r\n\r\n            return size;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var resultMedia = value as TLBotInlineMediaResult;\r\n            if (resultMedia != null)\r\n            {\r\n                var photo = resultMedia.Photo as TLPhoto;\r\n                if (photo != null)\r\n                {\r\n                    var size = GetPhotoSize(photo, parameter);\r\n\r\n                    if (size != null)\r\n                    {\r\n                        var location = size.Location as TLFileLocation;\r\n                        if (location != null)\r\n                        {\r\n                            return ReturnOrEnqueueImage(location, resultMedia, size.Size);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var document = resultMedia.Document as TLDocument;\r\n                if (document != null)\r\n                {\r\n                    var cachedSize = document.Thumb as TLPhotoCachedSize;\r\n                    if (cachedSize != null)\r\n                    {\r\n                        BitmapImage imageSource;\r\n\r\n                        try\r\n                        {\r\n                            var image = new BitmapImage();\r\n                            image.SetSource(new MemoryStream(cachedSize.Bytes.Data));\r\n                            imageSource = image;\r\n                        }\r\n                        catch (Exception)\r\n                        {\r\n                            return null;\r\n                        }\r\n\r\n                        return imageSource;\r\n                    }\r\n\r\n                    var size = document.Thumb as TLPhotoSize;\r\n                    if (size != null)\r\n                    {\r\n                        var location = size.Location as TLFileLocation;\r\n                        if (location != null)\r\n                        {\r\n                            return ReturnOrEnqueueImage(location, resultMedia, size.Size);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class MediaPhotoConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var photo = value as TLPhoto;\r\n            if (photo != null)\r\n            {\r\n                var imageSource = GetImageSource(photo, 311.0);\r\n                if (imageSource != null) return imageSource;\r\n\r\n                imageSource = GetImageSource(photo, 800.0);\r\n                if (imageSource != null) return imageSource;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static object GetImageSource(TLPhoto photo, double width)\r\n        {\r\n            TLPhotoSize size = null;\r\n            var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n            foreach (var photoSize in sizes)\r\n            {\r\n                if (size == null\r\n                    || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                {\r\n                    size = photoSize;\r\n                }\r\n            }\r\n\r\n            if (size != null)\r\n            {\r\n                var location = size.Location as TLFileLocation;\r\n                if (location != null)\r\n                {\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.VolumeId,\r\n                        location.LocalId,\r\n                        location.Secret);\r\n\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (store.FileExists(fileName))\r\n                        {\r\n                            BitmapImage imageSource;\r\n\r\n                            try\r\n                            {\r\n                                using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                {\r\n                                    stream.Seek(0, SeekOrigin.Begin);\r\n                                    var image = new BitmapImage();\r\n                                    image.SetSource(stream);\r\n                                    imageSource = image;\r\n                                }\r\n                            }\r\n                            catch (Exception)\r\n                            {\r\n                                return null;\r\n                            }\r\n\r\n                            return imageSource;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class PhotoConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var photoSize = value as TLPhotoSize;\r\n            if (photoSize != null)\r\n            {\r\n                var location = photoSize.Location as TLFileLocation;\r\n                if (location != null)\r\n                {\r\n                    return DefaultPhotoConverter.ReturnImage(timer, location);\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class ProfileSmallPhotoConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var userProfilePhoto = value as TLUserProfilePhoto;\r\n            if (userProfilePhoto != null)\r\n            {\r\n                var location = userProfilePhoto.PhotoSmall as TLFileLocation;\r\n                if (location != null)\r\n                {\r\n                    return DefaultPhotoConverter.ReturnOrEnqueueImage(timer, false, location, userProfilePhoto, new TLInt(0), null, true);\r\n                }\r\n            }\r\n\r\n            var chatPhoto = value as TLChatPhoto;\r\n            if (chatPhoto != null)\r\n            {\r\n                var location = chatPhoto.PhotoSmall as TLFileLocation;\r\n                if (location != null)\r\n                {\r\n                    return DefaultPhotoConverter.ReturnOrEnqueueImage(timer, false, location, chatPhoto, new TLInt(0), null, true);\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class ProfileBigPhotoConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var userProfilePhoto = value as TLUserProfilePhoto;\r\n            if (userProfilePhoto != null)\r\n            {\r\n                var location = userProfilePhoto.PhotoBig as TLFileLocation;\r\n                if (location != null)\r\n                {\r\n                    return DefaultPhotoConverter.ReturnOrEnqueueImage(timer, false, location, userProfilePhoto, new TLInt(0), null, true,\r\n                        result => Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            userProfilePhoto.NotifyOfPropertyChange(() => userProfilePhoto.Self);\r\n                        }));\r\n                }\r\n            }\r\n\r\n            var chatPhoto = value as TLChatPhoto;\r\n            if (chatPhoto != null)\r\n            {\r\n                var location = chatPhoto.PhotoBig as TLFileLocation;\r\n                if (location != null)\r\n                {\r\n                    return DefaultPhotoConverter.ReturnOrEnqueueImage(timer, false, location, chatPhoto, new TLInt(0), null, true,\r\n                        result => Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            chatPhoto.NotifyOfPropertyChange(() => chatPhoto.Self);\r\n                        }));\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class DefaultPhotoConverter : IValueConverter\r\n    {\r\n        public bool CheckChatSettings { get; set; }\r\n\r\n        public static BitmapImage ReturnOrEnqueueImage(bool checkChatSettings, TLEncryptedFile location, TLObject owner, TLDecryptedMessageMediaBase mediaPhoto, bool isBackground)\r\n        {\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                location.Id,\r\n                location.DCId,\r\n                location.AccessHash);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(fileName))\r\n                {\r\n                    TLObject with = null;\r\n                    if (checkChatSettings)\r\n                    {\r\n                        var navigationService = IoC.Get<INavigationService>();\r\n                        var dialogDetailsView = navigationService.CurrentContent as SecretDialogDetailsView;\r\n                        if (dialogDetailsView != null)\r\n                        {\r\n                            var dialogDetailsViewModel = dialogDetailsView.DataContext as SecretDialogDetailsViewModel;\r\n                            if (dialogDetailsViewModel != null)\r\n                            {\r\n                                with = dialogDetailsViewModel.With;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var stateService = IoC.Get<IStateService>();\r\n                    var chatSettings = stateService.GetChatSettings();\r\n                    if (chatSettings != null)\r\n                    {\r\n                        if (with is TLUserBase && !chatSettings.AutoDownloadPhotoPrivateChats)\r\n                        {\r\n                            return null;\r\n                        }\r\n\r\n                        if (with is TLChatBase && !chatSettings.AutoDownloadPhotoGroups)\r\n                        {\r\n                            return null;\r\n                        }\r\n                    }\r\n\r\n                    if (mediaPhoto != null) mediaPhoto.DownloadingProgress = 0.01;\r\n\r\n                    Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                    {\r\n                        var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                        fileManager.DownloadFile(location, owner);\r\n                    });\r\n                }\r\n                else\r\n                {\r\n                    BitmapImage imageSource;\r\n\r\n                    try\r\n                    {\r\n                        using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            stream.Seek(0, SeekOrigin.Begin);\r\n                            var image = new BitmapImage();\r\n                            if (isBackground)\r\n                            {\r\n                                image.CreateOptions |= BitmapCreateOptions.BackgroundCreation;\r\n                            }\r\n                            image.SetSource(stream);\r\n                            imageSource = image;\r\n                        }\r\n                    }\r\n                    catch (Exception)\r\n                    {\r\n                        return null;\r\n                    }\r\n\r\n                    return imageSource;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static BitmapImage ReturnImage(Stopwatch timer, TLFileLocation location)\r\n        {\r\n            //return null;\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.VolumeId,\r\n                        location.LocalId,\r\n                        location.Secret);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(fileName))\r\n                {\r\n\r\n                }\r\n                else\r\n                {\r\n                    BitmapImage imageSource;\r\n\r\n                    try\r\n                    {\r\n                        //using (var stream = new IsolatedStorageFileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read, store))\r\n                        //{\r\n                        //    stream.Seek(0, SeekOrigin.Begin);\r\n                        //    var image = new BitmapImage();\r\n                        //    image.SetSource(stream);\r\n                        //    imageSource = image;\r\n                        //}\r\n\r\n                        using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            stream.Seek(0, SeekOrigin.Begin);\r\n                            var image = new BitmapImage();\r\n                            image.CreateOptions = BitmapCreateOptions.DelayCreation |\r\n                                                  BitmapCreateOptions.BackgroundCreation;\r\n                            image.SetSource(stream);\r\n                            imageSource = image;\r\n                        }\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(ex.ToString());\r\n\r\n                        return null;\r\n                    }\r\n\r\n\r\n                    //TLUtils.WritePerformance(\"DefaultPhotoConverter time: \" + timer.Elapsed);\r\n                    return imageSource;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n#if !PHOTO_CACHE_DISABLED\r\n        private static LRUCache<string, WeakReference<BitmapImage>> _photoCache = new LRUCache<string, WeakReference<BitmapImage>>(100);\r\n#endif\r\n\r\n        public static BitmapImage ReturnOrEnqueueImage(Stopwatch timer, bool checkChatSettings, TLFileLocation location, TLObject owner, TLInt fileSize, TLMessageMediaPhoto mediaPhoto, bool isBackground = false, Action<DownloadableItem> callback = null)\r\n        {\r\n            var fileName = string.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.VolumeId,\r\n                        location.LocalId,\r\n                        location.Secret);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(fileName))\r\n                {\r\n                    if (fileSize != null)\r\n                    {\r\n                        TLObject with = null;\r\n                        if (checkChatSettings)\r\n                        {\r\n                            var navigationService = IoC.Get<INavigationService>();\r\n                            var dialogDetailsView = navigationService.CurrentContent as DialogDetailsView;\r\n                            if (dialogDetailsView != null)\r\n                            {\r\n                                var dialogDetailsViewModel = dialogDetailsView.DataContext as DialogDetailsViewModel;\r\n                                if (dialogDetailsViewModel != null)\r\n                                {\r\n                                    with = dialogDetailsViewModel.With;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var stateService = IoC.Get<IStateService>();\r\n                        var chatSettings = stateService.GetChatSettings();\r\n                        if (chatSettings != null)\r\n                        {\r\n                            if (with is TLUserBase && !chatSettings.AutoDownloadPhotoPrivateChats)\r\n                            {\r\n                                return null;\r\n                            }\r\n\r\n                            if (with is TLChatBase && !chatSettings.AutoDownloadPhotoGroups)\r\n                            {\r\n                                return null;\r\n                            }\r\n                        }\r\n\r\n                        if (location.DCId.Value == 0) return null;\r\n                        if (mediaPhoto != null) mediaPhoto.DownloadingProgress = 0.01;\r\n\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            var fileManager = IoC.Get<IFileManager>();\r\n                            fileManager.DownloadFile(location, owner, fileSize, callback);\r\n                        });\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    BitmapImage imageSource;\r\n\r\n                    try\r\n                    {\r\n                        BitmapImage image;\r\n#if !PHOTO_CACHE_DISABLED\r\n                        WeakReference<BitmapImage> reference;\r\n                        if (_photoCache.TryGetValue(fileName, out reference) && reference.TryGetTarget(out image))\r\n                        {\r\n                            if (image.PixelHeight > 0 || image.PixelWidth > 0)\r\n                            {\r\n                                return image;\r\n                            }\r\n                        }\r\n#endif\r\n\r\n                        using (IsolatedStorageFileStream stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            stream.Seek(0, SeekOrigin.Begin);\r\n                            image = new BitmapImage();\r\n                            if (isBackground)\r\n                            {\r\n                                image.CreateOptions |= BitmapCreateOptions.BackgroundCreation;\r\n                            }\r\n                            image.SetSource(stream);\r\n#if !PHOTO_CACHE_DISABLED\r\n                            if (image.CreateOptions.HasFlag(BitmapCreateOptions.BackgroundCreation))\r\n                            {\r\n                                var wrapper = new BitmapImageWrapper(fileName, image);\r\n                                wrapper.Subscribe(bi =>\r\n                                {\r\n                                    _photoCache[fileName] = new WeakReference<BitmapImage>(image);\r\n                                });\r\n                            }\r\n                            else\r\n                            {\r\n                                _photoCache[fileName] = new WeakReference<BitmapImage>(image);\r\n                            }\r\n#endif\r\n                            imageSource = image;\r\n                        }\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(ex.ToString());\r\n\r\n                        return null;\r\n                    }\r\n\r\n                    return imageSource;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n#if !PHOTO_CACHE_DISABLED\r\n        public static void InvalidateCacheItem(string key)\r\n        {\r\n            _photoCache.Remove(key);\r\n        }\r\n#endif\r\n\r\n        #region Profile Photo\r\n#if !PHOTO_CACHE_DISABLED\r\n        private static readonly LRUCache<string, WeakReference<BitmapImage>> _cachedSources = new LRUCache<string, WeakReference<BitmapImage>>(200);\r\n#else\r\n        private static readonly Dictionary<string, WeakReference> _cachedSources = new Dictionary<string, WeakReference>();\r\n#endif\r\n\r\n        public static BitmapSource ReturnOrEnqueueProfileImage(Stopwatch timer, TLFileLocation location, TLObject owner, TLInt fileSize, bool isBackground = false)\r\n        {\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                location.VolumeId,\r\n                location.LocalId,\r\n                location.Secret);\r\n\r\n#if !PHOTO_CACHE_DISABLED\r\n            BitmapImage bitmapImage;\r\n            WeakReference<BitmapImage> weakImageSource;\r\n            if (_cachedSources.TryGetValue(fileName, out weakImageSource) && weakImageSource.TryGetTarget(out bitmapImage))\r\n            {\r\n                return bitmapImage;\r\n            }\r\n#else\r\n            BitmapSource bitmapImage;\r\n            WeakReference weakImageSource;\r\n            if (_cachedSources.TryGetValue(fileName, out weakImageSource))\r\n            {\r\n                if (weakImageSource.IsAlive)\r\n                {\r\n                    bitmapImage = weakImageSource.Target as BitmapSource;\r\n\r\n                    //System.Diagnostics.Debug.WriteLine(\"DefaultPhotoConverter weakImageSource return elapsed=\" + ShellViewModel.Timer.Elapsed);\r\n                    return bitmapImage;\r\n                }\r\n            }\r\n#endif\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(fileName))\r\n                {\r\n                    if (fileSize != null)\r\n                    {\r\n                        var fileManager = IoC.Get<IFileManager>();\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            fileManager.DownloadFile(location, owner, fileSize);\r\n                        });\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    try\r\n                    {\r\n                        using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            stream.Seek(0, SeekOrigin.Begin);\r\n                            var image = new BitmapImage();\r\n                            if (isBackground)\r\n                            {\r\n                                image.CreateOptions = BitmapCreateOptions.DelayCreation | BitmapCreateOptions.BackgroundCreation;\r\n                            }\r\n                            image.SetSource(stream);\r\n                            bitmapImage = image;\r\n#if !PHOTO_CACHE_DISABLED\r\n                            if (image.CreateOptions.HasFlag(BitmapCreateOptions.BackgroundCreation))\r\n                            {\r\n                                var wrapper = new BitmapImageWrapper(fileName, bitmapImage);\r\n                                wrapper.Subscribe(bi =>\r\n                                {\r\n                                    _cachedSources[fileName] = new WeakReference<BitmapImage>(image);\r\n                                });\r\n                            }\r\n                            else\r\n                            {\r\n                                _cachedSources[fileName] = new WeakReference<BitmapImage>(image);\r\n                            }\r\n#else\r\n                            _cachedSources[fileName] = new WeakReference(bitmapImage);\r\n#endif\r\n                        }\r\n                    }\r\n                    catch (Exception)\r\n                    {\r\n                        return null;\r\n                    }\r\n\r\n                    return bitmapImage;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n        #endregion\r\n\r\n#if WP8\r\n\r\n        private static readonly Dictionary<string, WeakReference<WriteableBitmap>> _cachedWebPImages = new Dictionary<string, WeakReference<WriteableBitmap>>();\r\n\r\n        private static ImageSource DecodeWebPImage(string cacheKey, byte[] buffer, System.Action faultCallback = null)\r\n        {\r\n            try\r\n            {\r\n                WeakReference<WriteableBitmap> reference;\r\n                if (_cachedWebPImages.TryGetValue(cacheKey, out reference))\r\n                {\r\n                    WriteableBitmap cachedBitmap;\r\n                    if (reference.TryGetTarget(out cachedBitmap))\r\n                    {\r\n                        return cachedBitmap;\r\n                    }\r\n                }\r\n\r\n                var decoder = new WebPDecoder();\r\n                int width = 0, height = 0;\r\n                byte[] decoded = null;\r\n                //try\r\n                //{\r\n                if (buffer == null)\r\n                {\r\n                    Telegram.Logs.Log.Write(\"DefaultPhotoConverter.DecodeWebPImage buffer=null\");\r\n                }\r\n                else\r\n                {\r\n                    //buffer = null;\r\n                    decoded = decoder.DecodeRgbA(buffer, out width, out height);\r\n                }\r\n                //}\r\n                //catch (Exception ex)\r\n                //{\r\n                //    faultCallback.SafeInvoke();\r\n                //    // не получается сконвертировать, битый файл\r\n                //    //store.DeleteFile(documentLocalFileName);\r\n                //    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"WebPDecoder.DecodeRgbA ex \" + ex);\r\n                //}\r\n\r\n                if (decoded == null) return null;\r\n\r\n                var wb = new WriteableBitmap(width, height);\r\n                for (var i = 0; i < decoded.Length / 4; i++)\r\n                {\r\n                    int r = decoded[4 * i];\r\n                    int g = decoded[4 * i + 1];\r\n                    int b = decoded[4 * i + 2];\r\n                    int a = decoded[4 * i + 3];\r\n\r\n                    a <<= 24;\r\n                    r <<= 16;\r\n                    g <<= 8;\r\n                    int iPixel = a | r | g | b;\r\n\r\n                    wb.Pixels[i] = iPixel;\r\n                }\r\n\r\n                _cachedWebPImages[cacheKey] = new WeakReference<WriteableBitmap>(wb);\r\n\r\n                return wb;\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                TLUtils.WriteException(\"WebPDecode ex \", ex);\r\n                //Telegram.Api.Helpers.Execute.BeginOnThreadPool(faultCallback);\r\n                return null;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static ImageSource ReturnOrEnqueueStickerPreview(TLFileLocation location, TLObject owner, TLInt fileSize)\r\n        {\r\n            var fileName =\r\n                String.Format(\"{0}_{1}_{2}.jpg\",\r\n                location.VolumeId,\r\n                location.LocalId,\r\n                location.Secret);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(fileName))\r\n                {\r\n                    if (fileSize != null)\r\n                    {\r\n                        var fileManager = IoC.Get<IFileManager>();\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            fileManager.DownloadFile(location, owner, fileSize);\r\n                        });\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    byte[] buffer;\r\n                    using (var file = store.OpenFile(fileName, FileMode.Open))\r\n                    {\r\n                        buffer = new byte[file.Length];\r\n                        file.Read(buffer, 0, buffer.Length);\r\n                    }\r\n\r\n                    return DecodeWebPImage(fileName, buffer,\r\n                        () =>\r\n                        {\r\n                            using (var localStore = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                localStore.DeleteFile(fileName);\r\n                            }\r\n                        });\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static ImageSource ReturnOrEnqueueSticker(TLDecryptedMessageMediaExternalDocument document, TLObject owner)\r\n        {\r\n            if (document == null) return null;\r\n\r\n            var documentLocalFileName = document.GetFileName();\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(documentLocalFileName))\r\n                {\r\n                    // 1. download full size\r\n                    IoC.Get<IDocumentFileManager>().DownloadFileAsync(document.FileName, document.DCId, document.ToInputFileLocation(), owner, document.Size, progress => { });\r\n\r\n                    // 2. download preview\r\n                    var thumbCachedSize = document.Thumb as TLPhotoCachedSize;\r\n                    if (thumbCachedSize != null)\r\n                    {\r\n                        var fileName = \"cached\" + document.GetFileName();\r\n                        var buffer = thumbCachedSize.Bytes.Data;\r\n                        if (buffer == null) return null;\r\n\r\n                        return DecodeWebPImage(fileName, buffer, () => { });\r\n                    }\r\n\r\n                    var thumbPhotoSize = document.Thumb as TLPhotoSize;\r\n                    if (thumbPhotoSize != null)\r\n                    {\r\n                        var location = thumbPhotoSize.Location as TLFileLocation;\r\n                        if (location != null)\r\n                        {\r\n                            return ReturnOrEnqueueStickerPreview(location, owner, thumbPhotoSize.Size);\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    if (document.Size.Value > 0\r\n                        && document.Size.Value < Telegram.Api.Constants.StickerMaxSize)\r\n                    {\r\n                        byte[] buffer;\r\n                        using (var file = store.OpenFile(documentLocalFileName, FileMode.Open))\r\n                        {\r\n                            buffer = new byte[file.Length];\r\n                            file.Read(buffer, 0, buffer.Length);\r\n                        }\r\n\r\n                        return DecodeWebPImage(documentLocalFileName, buffer,\r\n                            () =>\r\n                            {\r\n                                using (var localStore = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    localStore.DeleteFile(documentLocalFileName);\r\n                                }\r\n                            });\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static ImageSource ReturnOrEnqueueSticker(TLDocument22 document, TLObject sticker)\r\n        {\r\n            if (document == null) return null;\r\n\r\n            var documentLocalFileName = document.GetFileName();\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(documentLocalFileName))\r\n                {\r\n                    TLObject owner = document;\r\n                    if (sticker != null)\r\n                    {\r\n                        owner = sticker;\r\n                    }\r\n\r\n                    // 1. download full size\r\n                    IoC.Get<IDocumentFileManager>().DownloadFileAsync(document.FileName, document.DCId, document.ToInputFileLocation(), owner, document.Size, progress => { });\r\n\r\n                    // 2. download preview\r\n                    var thumbCachedSize = document.Thumb as TLPhotoCachedSize;\r\n                    if (thumbCachedSize != null)\r\n                    {\r\n                        var fileName = \"cached\" + document.GetFileName();\r\n                        var buffer = thumbCachedSize.Bytes.Data;\r\n                        if (buffer == null) return null;\r\n\r\n                        return DecodeWebPImage(fileName, buffer, () => { });\r\n                    }\r\n\r\n                    var thumbPhotoSize = document.Thumb as TLPhotoSize;\r\n                    if (thumbPhotoSize != null)\r\n                    {\r\n                        var location = thumbPhotoSize.Location as TLFileLocation;\r\n                        if (location != null)\r\n                        {\r\n                            return ReturnOrEnqueueStickerPreview(location, sticker, thumbPhotoSize.Size);\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    if (document.DocumentSize > 0\r\n                        && document.DocumentSize < Telegram.Api.Constants.StickerMaxSize)\r\n                    {\r\n                        byte[] buffer;\r\n                        using (var file = store.OpenFile(documentLocalFileName, FileMode.Open))\r\n                        {\r\n                            buffer = new byte[file.Length];\r\n                            file.Read(buffer, 0, buffer.Length);\r\n                        }\r\n\r\n                        return DecodeWebPImage(documentLocalFileName, buffer,\r\n                            () =>\r\n                            {\r\n                                using (var localStore = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    localStore.DeleteFile(documentLocalFileName);\r\n                                }\r\n                            });\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n#endif\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            //System.Diagnostics.Debug.WriteLine(\"DefaultPhotoConverter elapsed=\" + ShellViewModel.Timer.Elapsed);\r\n            if (value == null) return null;\r\n\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            var encryptedPhoto = value as TLEncryptedFile;\r\n            if (encryptedPhoto != null)\r\n            {\r\n                var isBackground = parameter != null && Equals(parameter, \"Background\");\r\n\r\n                return ReturnOrEnqueueImage(CheckChatSettings, encryptedPhoto, encryptedPhoto, null, isBackground);\r\n            }\r\n\r\n            var userProfilePhoto = value as TLUserProfilePhoto;\r\n            if (userProfilePhoto != null)\r\n            {\r\n                var location = userProfilePhoto.PhotoSmall as TLFileLocation;\r\n                if (location != null)\r\n                {\r\n                    return ReturnOrEnqueueProfileImage(timer, location, userProfilePhoto, new TLInt(0), false);\r\n                }\r\n            }\r\n\r\n            var chatPhoto = value as TLChatPhoto;\r\n            if (chatPhoto != null)\r\n            {\r\n                var location = chatPhoto.PhotoSmall as TLFileLocation;\r\n                if (location != null)\r\n                {\r\n                    return ReturnOrEnqueueProfileImage(timer, location, chatPhoto, new TLInt(0), false);\r\n                }\r\n            }\r\n\r\n            var decrypteMedia = value as TLDecryptedMessageMediaBase;\r\n            if (decrypteMedia != null)\r\n            {\r\n                var decryptedMediaVideo = value as TLDecryptedMessageMediaVideo;\r\n                if (decryptedMediaVideo != null)\r\n                {\r\n                    var buffer = decryptedMediaVideo.Thumb.Data;\r\n\r\n                    if (buffer.Length > 0\r\n                        && decryptedMediaVideo.ThumbW.Value > 0\r\n                        && decryptedMediaVideo.ThumbH.Value > 0)\r\n                    {\r\n                        try\r\n                        {\r\n                            var memoryStream = new MemoryStream(buffer);\r\n                            var bitmap = PictureDecoder.DecodeJpeg(memoryStream);\r\n\r\n                            bitmap.BoxBlur(37);\r\n\r\n                            var blurredStream = new MemoryStream();\r\n                            bitmap.SaveJpeg(blurredStream, decryptedMediaVideo.ThumbW.Value, decryptedMediaVideo.ThumbH.Value, 0, 70);\r\n\r\n                            return ImageUtils.CreateImage(blurredStream.ToArray());\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n\r\n                        }\r\n                    }\r\n\r\n                    return ImageUtils.CreateImage(buffer);\r\n                }\r\n\r\n                var decryptedMediaDocument = value as TLDecryptedMessageMediaDocument;\r\n                if (decryptedMediaDocument != null)\r\n                {\r\n                    var location = decryptedMediaDocument.File as TLEncryptedFile;\r\n                    if (location != null)\r\n                    {\r\n                        var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.Id,\r\n                        location.DCId,\r\n                        location.AccessHash);\r\n\r\n                        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                        {\r\n                            if (store.FileExists(fileName))\r\n                            {\r\n                                BitmapImage imageSource;\r\n\r\n                                try\r\n                                {\r\n                                    using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                    {\r\n                                        stream.Seek(0, SeekOrigin.Begin);\r\n                                        var image = new BitmapImage();\r\n                                        image.SetSource(stream);\r\n                                        imageSource = image;\r\n                                    }\r\n                                }\r\n                                catch (Exception)\r\n                                {\r\n                                    return null;\r\n                                }\r\n\r\n                                return imageSource;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var buffer = decryptedMediaDocument.Thumb.Data;\r\n                    return ImageUtils.CreateImage(buffer);\r\n                }\r\n\r\n                var decryptedMediaPhoto = value as TLDecryptedMessageMediaPhoto;\r\n                if (decryptedMediaPhoto != null)\r\n                {\r\n                    if (decryptedMediaPhoto.Bitmap != null)\r\n                    {\r\n                        var bitmap = decryptedMediaPhoto.Bitmap;\r\n                        decryptedMediaPhoto.Bitmap = null;\r\n                        return bitmap;\r\n                    }\r\n                }\r\n\r\n                var file = decrypteMedia.File as TLEncryptedFile;\r\n                if (file != null)\r\n                {\r\n                    if (!decrypteMedia.IsCanceled)\r\n                    {\r\n                        var isBackground = parameter != null && Equals(parameter, \"Background\");\r\n                        return ReturnOrEnqueueImage(CheckChatSettings, file, decrypteMedia, decrypteMedia, isBackground);\r\n                    }\r\n                }\r\n            }\r\n\r\n            TLDecryptedMessageMediaExternalDocument decryptedMediaExternalDocument;\r\n            var decryptedMessage = value as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                decryptedMediaExternalDocument = decryptedMessage.Media as TLDecryptedMessageMediaExternalDocument;\r\n                if (decryptedMediaExternalDocument != null)\r\n                {\r\n#if WP8\r\n                    return ReturnOrEnqueueSticker(decryptedMediaExternalDocument, decryptedMessage);\r\n#endif\r\n\r\n                    return null;\r\n                }\r\n\r\n            }\r\n\r\n            decryptedMediaExternalDocument = value as TLDecryptedMessageMediaExternalDocument;\r\n            if (decryptedMediaExternalDocument != null)\r\n            {\r\n#if WP8\r\n                return ReturnOrEnqueueSticker(decryptedMediaExternalDocument, decryptedMediaExternalDocument);\r\n#endif\r\n\r\n                return null;\r\n            }\r\n\r\n            var photoMedia = value as TLMessageMediaPhoto;\r\n            if (photoMedia != null)\r\n            {\r\n                if (photoMedia.Bitmap != null)\r\n                {\r\n                    var bitmap = photoMedia.Bitmap;\r\n                    photoMedia.Bitmap = null;\r\n                    return bitmap;\r\n                }\r\n\r\n                value = photoMedia.Photo;\r\n            }\r\n\r\n            var photo = value as TLPhoto;\r\n            if (photo != null)\r\n            {\r\n                bool isBackground;\r\n                var size = GetPhotoSize(parameter, photo, out isBackground);\r\n\r\n                if (size != null)\r\n                {\r\n                    if (!string.IsNullOrEmpty(size.TempUrl))\r\n                    {\r\n                        if (photoMedia != null) photoMedia.DownloadingProgress = 0.01;\r\n                        return size.TempUrl;\r\n                    }\r\n\r\n                    var location = size.Location as TLFileLocation;\r\n                    if (location != null)\r\n                    {\r\n                        if (photoMedia == null\r\n                            || !photoMedia.IsCanceled)\r\n                        {\r\n                            Action<DownloadableItem> callback = null;\r\n                            if (photoMedia == null)\r\n                            {\r\n                                callback = item => Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    photo.NotifyOfPropertyChange(() => photo.Self);\r\n                                });\r\n                            }\r\n\r\n                            return ReturnOrEnqueueImage(timer, CheckChatSettings, location, photo, size.Size, photoMedia, isBackground, callback);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n#if WP8\r\n            var inlineMediaResult = value as TLBotInlineMediaResult;\r\n            if (inlineMediaResult != null)\r\n            {\r\n                if (TLString.Equals(inlineMediaResult.Type, new TLString(\"sticker\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    var document22 = inlineMediaResult.Document as TLDocument22;\r\n                    if (document22 == null) return null;\r\n\r\n                    var thumbCachedSize = document22.Thumb as TLPhotoCachedSize;\r\n                    if (thumbCachedSize != null)\r\n                    {\r\n                        var fileName = \"cached\" + document22.GetFileName();\r\n                        var buffer = thumbCachedSize.Bytes.Data;\r\n                        if (buffer == null) return null;\r\n\r\n                        return DecodeWebPImage(fileName, buffer, () => { });\r\n                    }\r\n\r\n                    var thumbPhotoSize = document22.Thumb as TLPhotoSize;\r\n                    if (thumbPhotoSize != null)\r\n                    {\r\n                        var location = thumbPhotoSize.Location as TLFileLocation;\r\n                        if (location != null)\r\n                        {\r\n                            return ReturnOrEnqueueStickerPreview(location, inlineMediaResult, thumbPhotoSize.Size);\r\n                        }\r\n                    }\r\n\r\n                    if (TLMessageBase.IsSticker(document22))\r\n                    {\r\n                        return ReturnOrEnqueueSticker(document22, inlineMediaResult);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var sticker = value as TLStickerItem;\r\n            if (sticker != null)\r\n            {\r\n                var document22 = sticker.Document as TLDocument22;\r\n                if (document22 == null) return null;\r\n\r\n                var thumbCachedSize = document22.Thumb as TLPhotoCachedSize;\r\n                if (thumbCachedSize != null)\r\n                {\r\n                    var fileName = \"cached\" + document22.GetFileName();\r\n                    var buffer = thumbCachedSize.Bytes.Data;\r\n                    if (buffer == null) return null;\r\n\r\n                    return DecodeWebPImage(fileName, buffer, () => { });\r\n                }\r\n\r\n                var thumbPhotoSize = document22.Thumb as TLPhotoSize;\r\n                if (thumbPhotoSize != null)\r\n                {\r\n                    var location = thumbPhotoSize.Location as TLFileLocation;\r\n                    if (location != null)\r\n                    {\r\n                        return ReturnOrEnqueueStickerPreview(location, sticker, thumbPhotoSize.Size);\r\n                    }\r\n                }\r\n\r\n                if (TLMessageBase.IsSticker(document22))\r\n                {\r\n                    return ReturnOrEnqueueSticker(document22, sticker);\r\n                }\r\n            }\r\n#endif\r\n\r\n            var document = value as TLDocument;\r\n            if (document != null)\r\n            {\r\n#if WP8\r\n                if (TLMessageBase.IsSticker(document))\r\n                {\r\n                    if (parameter != null &&\r\n                        string.Equals(parameter.ToString(), \"ignoreStickers\", StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        return null;\r\n                    }\r\n\r\n                    return ReturnOrEnqueueSticker((TLDocument22)document, null);\r\n                }\r\n#endif\r\n\r\n                var thumbPhotoSize = document.Thumb as TLPhotoSize;\r\n                if (thumbPhotoSize != null)\r\n                {\r\n                    var location = thumbPhotoSize.Location as TLFileLocation;\r\n                    if (location != null)\r\n                    {\r\n                        return ReturnOrEnqueueImage(timer, false, location, document, thumbPhotoSize.Size, null);\r\n                    }\r\n                }\r\n\r\n                var thumbCachedSize = document.Thumb as TLPhotoCachedSize;\r\n                if (thumbCachedSize != null)\r\n                {\r\n                    var buffer = thumbCachedSize.Bytes.Data;\r\n\r\n                    return ImageUtils.CreateImage(buffer);\r\n                }\r\n            }\r\n\r\n            var videoMedia = value as TLMessageMediaVideo;\r\n            if (videoMedia != null)\r\n            {\r\n                value = videoMedia.Video;\r\n            }\r\n\r\n            var video = value as TLVideo;\r\n            if (video != null)\r\n            {\r\n                var thumbPhotoSize = video.Thumb as TLPhotoSize;\r\n\r\n                if (thumbPhotoSize != null)\r\n                {\r\n                    var location = thumbPhotoSize.Location as TLFileLocation;\r\n                    if (location != null)\r\n                    {\r\n                        return ReturnOrEnqueueImage(timer, false, location, video, thumbPhotoSize.Size, null);\r\n                    }\r\n                }\r\n\r\n                var thumbCachedSize = video.Thumb as TLPhotoCachedSize;\r\n                if (thumbCachedSize != null)\r\n                {\r\n                    var buffer = thumbCachedSize.Bytes.Data;\r\n                    return ImageUtils.CreateImage(buffer);\r\n                }\r\n            }\r\n\r\n            var invoiceMedia = value as TLMessageMediaInvoice;\r\n            if (invoiceMedia != null)\r\n            {\r\n\r\n            }\r\n\r\n            var webPageMedia = value as TLMessageMediaWebPage;\r\n            if (webPageMedia != null)\r\n            {\r\n                value = webPageMedia.WebPage;\r\n            }\r\n\r\n            var decryptedWebPageMedia = value as TLDecryptedMessageMediaWebPage;\r\n            if (decryptedWebPageMedia != null)\r\n            {\r\n                value = decryptedWebPageMedia.WebPage;\r\n            }\r\n\r\n            var webPage = value as TLWebPage;\r\n            if (webPage != null)\r\n            {\r\n                var webPagePhoto = webPage.Photo as TLPhoto;\r\n                if (webPagePhoto != null)\r\n                {\r\n                    var width = 311.0;\r\n                    double result;\r\n                    if (Double.TryParse((string)parameter, out result))\r\n                    {\r\n                        width = result;\r\n                    }\r\n\r\n                    TLPhotoSize size = null;\r\n                    var sizes = webPagePhoto.Sizes.OfType<TLPhotoSize>();\r\n                    foreach (var photoSize in sizes)\r\n                    {\r\n                        if (size == null\r\n                            || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                        {\r\n                            size = photoSize;\r\n                        }\r\n                    }\r\n\r\n                    if (size != null)\r\n                    {\r\n                        var location = size.Location as TLFileLocation;\r\n                        if (location != null)\r\n                        {\r\n                            return ReturnOrEnqueueImage(timer, false, location, webPage, size.Size, null);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var gameMedia = value as TLMessageMediaGame;\r\n            if (gameMedia != null)\r\n            {\r\n                value = gameMedia.Game;\r\n            }\r\n\r\n            //var decryptedWebPageMedia = value as TLDecryptedMessageMediaWebPage;\r\n            //if (decryptedWebPageMedia != null)\r\n            //{\r\n            //    value = decryptedWebPageMedia.WebPage;\r\n            //}\r\n\r\n            var game = value as TLGame;\r\n            if (game != null)\r\n            {\r\n                var gamePhoto = game.Photo as TLPhoto;\r\n                if (gamePhoto != null)\r\n                {\r\n                    var width = 311.0;\r\n                    double result;\r\n                    if (Double.TryParse((string)parameter, out result))\r\n                    {\r\n                        width = result;\r\n                    }\r\n\r\n                    TLPhotoSize size = null;\r\n                    var sizes = gamePhoto.Sizes.OfType<TLPhotoSize>();\r\n                    foreach (var photoSize in sizes)\r\n                    {\r\n                        if (size == null\r\n                            || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                        {\r\n                            size = photoSize;\r\n                        }\r\n                    }\r\n\r\n                    if (size != null)\r\n                    {\r\n                        var location = size.Location as TLFileLocation;\r\n                        if (location != null)\r\n                        {\r\n                            return ReturnOrEnqueueImage(timer, false, location, game, size.Size, null);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static TLPhotoSize GetPhotoSize(object parameter, TLPhoto photo, out bool isBackground)\r\n        {\r\n            var widthParameter = string.Empty;\r\n            isBackground = false;\r\n            if (parameter != null)\r\n            {\r\n                var p = parameter.ToString().Split('_');\r\n                if (p.Length > 0)\r\n                {\r\n                    widthParameter = p[0];\r\n                }\r\n                if (p.Length > 1)\r\n                {\r\n                    isBackground = string.Equals(p[1], \"background\", StringComparison.OrdinalIgnoreCase);\r\n                }\r\n            }\r\n\r\n            var width = 311.0;\r\n            double result;\r\n            if (!string.IsNullOrEmpty(widthParameter) && double.TryParse(widthParameter, out result))\r\n            {\r\n                width = result;\r\n            }\r\n\r\n            TLPhotoSize size = null;\r\n            var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n            foreach (var photoSize in sizes)\r\n            {\r\n                if (photoSize.W.Value > 90\r\n                    && (size == null || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value)))\r\n                {\r\n                    size = photoSize;\r\n                }\r\n            }\r\n\r\n            return size;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class ImageViewerPhotoConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var photoMedia = value as TLMessageMediaPhoto;\r\n            if (photoMedia != null)\r\n            {\r\n                value = photoMedia.Photo;\r\n            }\r\n\r\n            var webPageMedia = value as TLMessageMediaWebPage;\r\n            if (webPageMedia != null)\r\n            {\r\n                var webPage = webPageMedia.WebPage as TLWebPage;\r\n                if (webPage != null)\r\n                {\r\n                    value = webPage.Photo;\r\n                }\r\n            }\r\n\r\n            var photo = value as TLPhoto;\r\n            if (photo != null)\r\n            {\r\n                var width = 311.0;\r\n                BitmapSource image = ReturnImageBySize(photo, width);\r\n                if (image != null) return image;\r\n\r\n                if (webPageMedia != null)\r\n                {\r\n                    width = 99.0;\r\n                    image = ReturnImageBySize(photo, width);\r\n                    if (image != null) return image;\r\n                }\r\n                else if (photoMedia != null)\r\n                {\r\n                    image = new PhotoToThumbConverter().Convert(photoMedia, targetType, parameter, culture) as BitmapSource;\r\n                }\r\n                return image;\r\n            }\r\n\r\n            var documentMedia = value as TLMessageMediaDocument;\r\n            if (documentMedia != null)\r\n            {\r\n                return new PhotoToThumbConverter().Convert(documentMedia, targetType, parameter, culture);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static BitmapImage ReturnImageBySize(TLPhoto photo, double width)\r\n        {\r\n            TLPhotoSize size = null;\r\n            var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n            foreach (var photoSize in sizes)\r\n            {\r\n                if (size == null\r\n                    || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                {\r\n                    size = photoSize;\r\n                }\r\n            }\r\n\r\n            if (size != null)\r\n            {\r\n                var location = size.Location as TLFileLocation;\r\n                if (location != null)\r\n                {\r\n                    var timer = Stopwatch.StartNew();\r\n                    var image = DefaultPhotoConverter.ReturnImage(timer, location);\r\n                    if (image != null)\r\n                    {\r\n                        return image;\r\n                    }\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n\r\n    public class PhotoThumbConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            //return new DefaultPhotoConverter().Convert(value, targetType, parameter, culture);\r\n\r\n            BitmapImage image = null;\r\n\r\n            if (value != null)\r\n            {\r\n                var photoFile = value as PhotoFile;\r\n                if (photoFile != null)\r\n                {\r\n                    var thumbnail = photoFile.Thumbnail;\r\n                    if (thumbnail != null)\r\n                    {\r\n                        image = new BitmapImage();\r\n                        image.CreateOptions = BitmapCreateOptions.None;\r\n                        image.SetSource(thumbnail);\r\n\r\n                        Deployment.Current.Dispatcher.BeginInvoke(() => MultiImageEditorView.ImageOpened(photoFile));\r\n                    }\r\n                    else\r\n                    {\r\n                        //Task.Factory.StartNew(async () =>\r\n                        //{\r\n                        //    thumbnail = await photoFile.File.GetThumbnailAsync(ThumbnailMode.ListView, 99, ThumbnailOptions.None);\r\n                        //    photoFile.Thumbnail = thumbnail;\r\n                        //    Deployment.Current.Dispatcher.BeginInvoke(() => photoFile.RaisePropertyChanged(\"Self\"));\r\n                        //});\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n\r\n            return (image);\r\n        }\r\n\r\n        //public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        //{\r\n        //    throw new NotImplementedException();\r\n        //}\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n\r\n            //var thumbnail = await item.File.GetThumbnailAsync(ThumbnailMode.ListView, 99, ThumbnailOptions.None);\r\n            //item.Thumbnail = thumbnail;\r\n            //item.RaisePropertyChanged(\"Thumbnail\");\r\n        }\r\n    }\r\n\r\n    public class PhotoFileToTemplateConverter : IValueConverter\r\n    {\r\n        public DataTemplate PhotoTemplate { get; set; }\r\n\r\n        public DataTemplate ButtonTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var photoFile = value as PhotoFile;\r\n            if (photoFile != null)\r\n            {\r\n                return photoFile.IsButton ? ButtonTemplate : PhotoTemplate;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    /// To avoid memory leaks with ImageOpened, ImageFailed events\r\n    /// Check for details:\r\n    /// http://blogs.developpeur.org/kookiz/archive/2013/02/17/wpdev-memory-leak-with-bitmapimage.aspx \r\n    public class BitmapImageWrapper\r\n    {\r\n        public BitmapImage Image { get; protected set; }\r\n\r\n        public string FileName { get; protected set; }\r\n\r\n        private Action<BitmapImageWrapper> _imageOpened;\r\n\r\n        private Action<BitmapImageWrapper> _imageFailed;\r\n\r\n        public BitmapImageWrapper(string fileName, BitmapImage image)\r\n        {\r\n            FileName = fileName;\r\n            Image = image;\r\n        }\r\n\r\n        //~BitmapImageWrapper()\r\n        //{\r\n\r\n        //}\r\n\r\n        public void Subscribe(Action<BitmapImageWrapper> imageOpened, Action<BitmapImageWrapper> imageFailed = null)\r\n        {\r\n            Image.ImageOpened += OnImageOpened;\r\n            Image.ImageFailed += OnImageFailed;\r\n\r\n            _imageOpened = imageOpened;\r\n            _imageFailed = imageFailed;\r\n        }\r\n\r\n        private void OnImageFailed(object sender, ExceptionRoutedEventArgs e)\r\n        {\r\n            Image.ImageOpened -= OnImageOpened;\r\n            Image.ImageFailed -= OnImageFailed;\r\n\r\n            _imageFailed.SafeInvoke(this);\r\n        }\r\n\r\n        private void OnImageOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            Image.ImageOpened -= OnImageOpened;\r\n            Image.ImageFailed -= OnImageFailed;\r\n\r\n            _imageOpened.SafeInvoke(this);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/DialogCaptionConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\n//#if WP8\r\n//using PhoneNumbers;\r\n//#endif\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class DialogCaptionConverter : IValueConverter\r\n    {\r\n        public static string Convert(object value)\r\n        {\r\n            if (value == null) return null;\r\n\r\n            var channels = value as TLVector<TLChatBase>;\r\n            if (channels != null)\r\n            {\r\n                return AppResources.Feed;\r\n            }\r\n\r\n            var user = value as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                if (user.Index == 333000)\r\n                {\r\n                    return AppResources.AppName;\r\n                }\r\n\r\n                if (user.Index == Constants.TelegramNotificationsId)\r\n                {\r\n                    return AppResources.TelegramNotifications;\r\n                }\r\n\r\n                if (user.IsRequest)\r\n                {\r\n#if WP8\r\n                    //var phoneUtil = PhoneNumberUtil.GetInstance();\r\n                    //try\r\n                    //{\r\n                    //    return phoneUtil.Format(phoneUtil.Parse(\"+\" + user.Phone.Value, \"\"), PhoneNumberFormat.INTERNATIONAL);\r\n                    //}\r\n                    //catch (Exception e)\r\n                    {\r\n                        return \"+\" + user.Phone.Value;\r\n                    }\r\n#else\r\n                    return \"+\" + user.Phone.Value;\r\n#endif\r\n\r\n                }\r\n\r\n                if (user is TLUserEmpty\r\n                    || user.IsDeleted)\r\n                {\r\n                    \r\n                }\r\n\r\n                return user.FullName.Trim();\r\n            }\r\n\r\n            var chat = value as TLChatBase;\r\n            if (chat != null)\r\n            {\r\n                return chat.FullName.Trim();\r\n            }\r\n\r\n            var encryptedChat = value as TLEncryptedChatCommon;\r\n            if (encryptedChat != null)\r\n            {\r\n                var currentUserId = IoC.Get<IMTProtoService>().CurrentUserId;\r\n                var cache = IoC.Get<ICacheService>();\r\n\r\n                if (currentUserId.Value == encryptedChat.AdminId.Value)\r\n                {\r\n                    var cachedParticipant = cache.GetUser(encryptedChat.ParticipantId);\r\n                    return cachedParticipant != null ? cachedParticipant.FullName.Trim().ToUpperInvariant() : string.Empty;\r\n                }\r\n\r\n                var cachedAdmin = cache.GetUser(encryptedChat.AdminId);\r\n                return cachedAdmin != null ? cachedAdmin.FullName.Trim() : string.Empty;\r\n            }\r\n\r\n            return value != null? value.ToString() : string.Empty;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            bool uppercase = false;\r\n            if (parameter != null\r\n                && string.Equals(parameter.ToString(), \"uppercase\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                uppercase = true;\r\n            }\r\n\r\n            var result = Convert(value) ?? string.Empty;\r\n            if (uppercase)\r\n            {\r\n                return result.ToUpperInvariant();\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class ChatInviteSubtitleConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var chatInvite54 = value as TLChatInvite54;\r\n            if (chatInvite54 == null) return null;\r\n            string subtitleText;\r\n            if (chatInvite54.Participants != null && chatInvite54.Participants.Count > 0)\r\n            {\r\n                subtitleText = string.Format(AppResources.ChatInviteSubtitle, Utils.Language.Declension(\r\n                        chatInvite54.ParticipantsCount.Value,\r\n                        AppResources.CompanyNominativeSingular,\r\n                        AppResources.CompanyNominativePlural,\r\n                        AppResources.CompanyGenitiveSingular,\r\n                        AppResources.CompanyGenitivePlural))\r\n                        .ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n            else\r\n            {\r\n                subtitleText = Utils.Language.Declension(\r\n                    chatInvite54.ParticipantsCount.Value,\r\n                    AppResources.CompanyNominativeSingular,\r\n                    AppResources.CompanyNominativePlural,\r\n                    AppResources.CompanyGenitiveSingular,\r\n                    AppResources.CompanyGenitivePlural)\r\n                    .ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n\r\n            return subtitleText;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/DialogDetailsBackgroundConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class DialogDetailsBackgroundConverter : DependencyObject, IValueConverter\r\n    {\r\n        public static readonly DependencyProperty ImageTemplateProperty = DependencyProperty.Register(\r\n            \"ImageTemplate\", typeof (DataTemplate), typeof (DialogDetailsBackgroundConverter), new PropertyMetadata(default(DataTemplate)));\r\n\r\n        public DataTemplate ImageTemplate\r\n        {\r\n            get { return (DataTemplate) GetValue(ImageTemplateProperty); }\r\n            set { SetValue(ImageTemplateProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty AnimatedTemplateProperty = DependencyProperty.Register(\r\n            \"AnimatedTemplate\", typeof (DataTemplate), typeof (DialogDetailsBackgroundConverter), new PropertyMetadata(default(DataTemplate)));\r\n\r\n        public DataTemplate AnimatedTemplate\r\n        {\r\n            get { return (DataTemplate) GetValue(AnimatedTemplateProperty); }\r\n            set { SetValue(AnimatedTemplateProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty EmptyTemplateProperty = DependencyProperty.Register(\r\n            \"EmptyTemplate\", typeof (DataTemplate), typeof (DialogDetailsBackgroundConverter), new PropertyMetadata(default(DataTemplate)));\r\n\r\n        public DataTemplate EmptyTemplate\r\n        {\r\n            get { return (DataTemplate) GetValue(EmptyTemplateProperty); }\r\n            set { SetValue(EmptyTemplateProperty, value); }\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            //System.Diagnostics.Debug.WriteLine(\"DialogDetailsBackgroundConverter elapsed=\" + ShellViewModel.Timer.Elapsed);\r\n            var background = value as BackgroundItem;\r\n            if (background == null || background.Name == \"Empty\")\r\n            {\r\n                return ImageTemplate;\r\n            }\r\n\r\n            if (background.Name == Constants.AnimatedBackground1String)\r\n            {\r\n                return AnimatedTemplate;\r\n            }\r\n\r\n            return ImageTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/DialogMessageFromConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class DialogMessageFromConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var dialog = value as TLDialog;\r\n\r\n            if (dialog != null)\r\n            {\r\n                var dialog53 = dialog as TLDialog53;\r\n                if (dialog53 != null)\r\n                {\r\n                    var draft = dialog53.Draft as TLDraftMessage;\r\n                    if (draft != null && !TLString.IsNullOrEmpty(draft.Message))\r\n                    {\r\n                        var topMessage = dialog53.TopMessage;\r\n                        if (topMessage != null && topMessage.DateIndex < draft.Date.Value)\r\n                        {\r\n                            return string.Empty; //AppResources.Draft + \": \";\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var messageBase = dialog.TopMessage;\r\n                if (messageBase != null && messageBase.ShowFrom)\r\n                {\r\n                    var messageCommon = messageBase as TLMessageCommon;\r\n                    if (messageCommon != null)\r\n                    {\r\n                        var user = messageCommon.From as TLUserBase;\r\n                        if (user != null)\r\n                        {\r\n                            var currentUserId = IoC.Get<IStateService>().CurrentUserId;\r\n                            if (currentUserId == user.Index)\r\n                            {\r\n                                return AppResources.You + \": \";\r\n                            }\r\n\r\n                            var firstName = user.FirstName != null ? user.FirstName.ToString().Trim() : string.Empty;\r\n                            var lastName = user.LastName != null ? user.LastName.ToString().Trim() : string.Empty;\r\n\r\n                            if (string.IsNullOrEmpty(firstName) && string.IsNullOrEmpty(lastName))\r\n                            {\r\n                                return (user.Phone != null ? \"+\" + user.Phone : string.Empty) + \": \";\r\n                            }\r\n\r\n                            if (string.Equals(firstName, lastName, StringComparison.OrdinalIgnoreCase))\r\n                            {\r\n                                return firstName + \": \";\r\n                            }\r\n\r\n                            if (string.IsNullOrEmpty(firstName))\r\n                            {\r\n                                return lastName + \": \";\r\n                            }\r\n\r\n                            if (string.IsNullOrEmpty(lastName))\r\n                            {\r\n                                return firstName + \": \";\r\n                            }\r\n\r\n                            return firstName + \": \";\r\n                        }\r\n\r\n                        var peerChannel = messageCommon.ToId as TLPeerChannel;\r\n                        if (peerChannel != null\r\n                            && (messageCommon.FromId == null || messageCommon.FromId.Value == -1))\r\n                        {\r\n                            var channel = IoC.Get<ICacheService>().GetChat(peerChannel.Id) as TLChannel;\r\n\r\n                            if (channel != null)\r\n                            {\r\n                                return channel.FullName + \": \";\r\n                            }\r\n\r\n                            var channelForbidden = IoC.Get<ICacheService>().GetChat(peerChannel.Id) as TLChannelForbidden;\r\n                            if (channelForbidden != null)\r\n                            {\r\n                                return channelForbidden.FullName + \": \";\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/DistanceAwayConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class DistanceAwayConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is double)) return value;\r\n\r\n            var distance = (double) value;\r\n\r\n            if (distance < 1000)\r\n            {\r\n                return string.Format(AppResources.DistanceAway, (int) distance + AppResources.MetersShort);\r\n            }\r\n\r\n            return string.Format(AppResources.DistanceAway, String.Format(\"{0:0.#}\", distance / 1000) + AppResources.KilometersShort);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/EmptyDialogMessageConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class EmptyDialogMessageConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var userBase = value as TLUserBase;\r\n            if (userBase != null && userBase.Index == 333000)\r\n            {\r\n                return AppResources.GotAQuestionAboutTelegram;\r\n            }\r\n\r\n            var user = value as TLUser;\r\n            if (user != null && user.BotInfo != null)\r\n            {\r\n                var botInfo = user.BotInfo as TLBotInfo;\r\n                if (botInfo != null)\r\n                {\r\n                    return botInfo.Description;\r\n                }\r\n            }\r\n\r\n            return AppResources.NoMessagesYet;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/EmptyPhotoToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class EmptyChatPhotoToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isEmpty = value is TLChatPhotoEmpty;\r\n\r\n            if (parameter != null\r\n                && string.Equals(parameter.ToString(), \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                isEmpty = !isEmpty;\r\n            }\r\n\r\n            return isEmpty ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class EmptyUserProfilePhotoToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isEmpty = value is TLUserProfilePhotoEmpty;\r\n\r\n            if (parameter != null\r\n                && string.Equals(parameter.ToString(), \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                isEmpty = !isEmpty;\r\n            }\r\n\r\n            return isEmpty ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/EmptyStringToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class EmptyStringToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var visibility = value == null;\r\n\r\n            var s = value as string;\r\n            if (s != null)\r\n            {\r\n                visibility = string.IsNullOrEmpty(s);\r\n            }\r\n\r\n            if (string.Equals(System.Convert.ToString(parameter), \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                visibility = !visibility;\r\n            }\r\n\r\n            return visibility ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class EmptyTLStringToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var visibility = value == null;\r\n\r\n            var s = value as TLString;\r\n            if (s != null)\r\n            {\r\n                visibility = string.IsNullOrEmpty(s.ToString());\r\n            }\r\n\r\n            if (string.Equals(System.Convert.ToString(parameter), \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                visibility = !visibility;\r\n            }\r\n\r\n            return visibility ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/ExistsToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class ExistsToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isVisible = value != null;\r\n\r\n            if (parameter != null\r\n                && string.Equals(parameter.ToString(), \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                isVisible = !isVisible;\r\n            }\r\n\r\n            return isVisible ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/ExtendedImageConverter.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Windows.Data;\r\nusing ImageTools;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class ExtendedImageConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var imageSource = value as string;\r\n            if (imageSource != null)\r\n            {\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (store.FileExists(imageSource))\r\n                    {\r\n                        var file = store.OpenFile(imageSource, FileMode.Open, FileAccess.Read);\r\n                        {\r\n\r\n                            var image = new ExtendedImage();\r\n                            image.LoadingCompleted += (sender, args) =>\r\n                            {\r\n                                var count = image.Frames.Count;\r\n                            };\r\n                            image.LoadingFailed += (sender, args) =>\r\n                            {\r\n\r\n                            };\r\n                            image.SetSource(file);\r\n                            return image;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Converters/FileExtToColorConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class FileExtToColorConverter : IValueConverter\r\n    {\r\n        public Brush Yellow { get; set; }\r\n\r\n        public Brush Green { get; set; }\r\n\r\n        public Brush Red { get; set; }\r\n\r\n        public Brush Blue { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var fileExtColors = new []{Blue, Green, Red, Yellow}; \r\n\r\n            var document = value as TLDocument;\r\n            if (document == null) return fileExtColors[0];\r\n\r\n            var name = document.FileName.ToString();\r\n\r\n            if (name.Length != 0)\r\n            {\r\n                int color = -1;\r\n                if (name.EndsWith(\".doc\") || name.EndsWith(\".txt\") || name.EndsWith(\".psd\"))\r\n                {\r\n                    color = 0;\r\n                }\r\n                else if (name.EndsWith(\".xls\") || name.EndsWith(\".csv\"))\r\n                {\r\n                    color = 1;\r\n                }\r\n                else if (name.EndsWith(\".pdf\") || name.EndsWith(\".ppt\") || name.EndsWith(\".key\"))\r\n                {\r\n                    color = 2;\r\n                }\r\n                else if (name.EndsWith(\".zip\") || name.EndsWith(\".rar\") || name.EndsWith(\".ai\") || name.EndsWith(\".mp3\") || name.EndsWith(\".mov\") || name.EndsWith(\".avi\"))\r\n                {\r\n                    color = 3;\r\n                }\r\n                if (color == -1)\r\n                {\r\n                    int idx;\r\n                    var ext = (idx = name.LastIndexOf(\".\", StringComparison.Ordinal)) == -1 ? \"\" : name.Substring(idx + 1);\r\n                    if (ext.Length != 0)\r\n                    {\r\n                        color = ext[0] % fileExtColors.Length;\r\n                    }\r\n                    else\r\n                    {\r\n                        color = name[0] % fileExtColors.Length;\r\n                    }\r\n                }\r\n                return fileExtColors[color];\r\n            }\r\n            return fileExtColors[0];\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/FileNameConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class FileNameConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var mediaDocument = value as TLMessageMediaDocument;\r\n            if (mediaDocument == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var document = mediaDocument.Document as TLDocument;\r\n            if (document == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var fileName = document.FileName.ToString();\r\n            if (string.IsNullOrEmpty(fileName))\r\n            {\r\n                return AppResources.Document.ToLowerInvariant();\r\n            }\r\n\r\n            return fileName;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/FileSizeConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class FileSizeConverter : IValueConverter\r\n    {\r\n        public static string Convert(long bytesCount)\r\n        {\r\n            if (bytesCount < 1024)\r\n            {\r\n                return string.Format(\"{0} B\", bytesCount);\r\n            }\r\n\r\n            if (bytesCount < 1024 * 1024)\r\n            {\r\n                return string.Format(\"{0} KB\", ((double)bytesCount / 1024).ToString(\"0.0\", CultureInfo.InvariantCulture));\r\n            }\r\n\r\n            if (bytesCount < 1024 * 1024 * 1024)\r\n            {\r\n                return string.Format(\"{0} MB\", ((double)bytesCount / 1024 / 1024).ToString(\"0.0\", CultureInfo.InvariantCulture));\r\n            }\r\n\r\n            return string.Format(\"{0} GB\", ((double)bytesCount / 1024 / 1024 / 1024).ToString(\"0.0\", CultureInfo.InvariantCulture));\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value is long)\r\n            {\r\n                return Convert((long) value);\r\n            }\r\n\r\n            if (value is int)\r\n            {\r\n                return Convert((int) value);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class MessageViewsConverter : IValueConverter\r\n    {\r\n        public static string Convert(long viewsCount)\r\n        {\r\n#if DEBUG\r\n            return string.Format(\"{0}\", viewsCount);\r\n#endif\r\n\r\n            if (viewsCount < 1000)\r\n            {\r\n                return string.Format(\"{0}\", viewsCount);\r\n            }\r\n\r\n            if (viewsCount < 1000 * 1000)\r\n            {\r\n                return string.Format(\"{0}K\", ((double)viewsCount / 1000).ToString(\"0.0\", CultureInfo.InvariantCulture));\r\n            }\r\n\r\n            if (viewsCount < 1000 * 1000 * 1000)\r\n            {\r\n                return string.Format(\"{0}M\", ((double)viewsCount / 1000 / 1000).ToString(\"0.0\", CultureInfo.InvariantCulture));\r\n            }\r\n\r\n            return string.Format(\"{0}B\", ((double)viewsCount / 1000 / 1000 / 1000).ToString(\"0.0\", CultureInfo.InvariantCulture));\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value is TLInt)\r\n            {\r\n                return Convert(((TLInt)value).Value);\r\n            }\r\n\r\n            if (value is TLLong)\r\n            {\r\n                return Convert(((TLLong)value).Value);\r\n            }\r\n\r\n            if (value is long)\r\n            {\r\n                return Convert((long)value);\r\n            }\r\n\r\n            if (value is int)\r\n            {\r\n                return Convert((int)value);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/ForwardedMessageConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Utils;\r\nusing TelegramClient.Resources;\r\nusing Language = TelegramClient.Utils.Language;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class DeclensionConverter : DependencyObject, IValueConverter\r\n    {\r\n        public static readonly DependencyProperty NominativeSingularProperty = DependencyProperty.Register(\r\n            \"NominativeSingular\", typeof (string), typeof (DeclensionConverter), new PropertyMetadata(default(string)));\r\n\r\n        public string NominativeSingular\r\n        {\r\n            get { return (string) GetValue(NominativeSingularProperty); }\r\n            set { SetValue(NominativeSingularProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty NominativePluralProperty = DependencyProperty.Register(\r\n            \"NominativePlural\", typeof (string), typeof (DeclensionConverter), new PropertyMetadata(default(string)));\r\n\r\n        public string NominativePlural\r\n        {\r\n            get { return (string) GetValue(NominativePluralProperty); }\r\n            set { SetValue(NominativePluralProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty GenitiveSingularProperty = DependencyProperty.Register(\r\n            \"GenitiveSingular\", typeof (string), typeof (DeclensionConverter), new PropertyMetadata(default(string)));\r\n\r\n        public string GenitiveSingular\r\n        {\r\n            get { return (string) GetValue(GenitiveSingularProperty); }\r\n            set { SetValue(GenitiveSingularProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty GenitivePluralProperty = DependencyProperty.Register(\r\n            \"GenitivePlural\", typeof (string), typeof (DeclensionConverter), new PropertyMetadata(default(string)));\r\n\r\n        public string GenitivePlural\r\n        {\r\n            get { return (string) GetValue(GenitivePluralProperty); }\r\n            set { SetValue(GenitivePluralProperty, value); }\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            int count;\r\n            if (value is int)\r\n            {\r\n                count = (int) value;\r\n            }\r\n            else\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return Language.Declension(\r\n                count,\r\n                NominativeSingular,\r\n                NominativePlural,\r\n                GenitiveSingular,\r\n                GenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class InvoiceToDescriptionConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var mediaInvoice = value as TLMessageMediaInvoice;\r\n            if (mediaInvoice == null) return null;\r\n\r\n            if (mediaInvoice.ReceiptMsgId != null && mediaInvoice.ReceiptMsgId.Value >= 0)\r\n            {\r\n                return string.Format(\"{0} {1} {2}\", mediaInvoice.TotalAmount.Value / Math.Pow(10.0, Currency.GetPow(mediaInvoice.Currency.ToString())), Currency.GetSymbol(mediaInvoice.Currency.ToString()), AppResources.Receipt).ToUpperInvariant();        \r\n            }\r\n\r\n            return string.Format(\"{0} {1} {2}\", mediaInvoice.TotalAmount.Value / Math.Pow(10.0, Currency.GetPow(mediaInvoice.Currency.ToString())), Currency.GetSymbol(mediaInvoice.Currency.ToString()), mediaInvoice.Test ? AppResources.TestInvoice : AppResources.Invoice).ToUpperInvariant();\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class MessageToWebPageCaptionConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var message = value as TLMessage;\r\n            if (message != null)\r\n            {\r\n                if (!string.IsNullOrEmpty(message.WebPageTitle))\r\n                {\r\n                    return message.WebPageTitle;\r\n                }\r\n\r\n                var mediaWebPage = message.Media as TLMessageMediaWebPage;\r\n                if (mediaWebPage != null)\r\n                {\r\n                    var webPage = mediaWebPage.WebPage as TLWebPage;\r\n\r\n                    if (webPage != null)\r\n                    {\r\n                        var caption = webPage.Title ?? webPage.SiteName;// ?? webPage.DisplayUrl;\r\n                        if (!TLString.IsNullOrEmpty(caption))\r\n                        {\r\n                            return Language.CapitalizeFirstLetter(caption.ToString());\r\n                            \r\n                        }\r\n\r\n                        caption = webPage.DisplayUrl;\r\n                        if (!TLString.IsNullOrEmpty(caption))\r\n                        {\r\n                            var parts = caption.ToString().Split('.');\r\n                            if (parts.Length >= 2)\r\n                            {\r\n                                return Language.CapitalizeFirstLetter(parts[parts.Length - 2]);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class WebPageToCaptionConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var webPage = value as TLWebPage;\r\n\r\n            if (webPage != null)\r\n            {\r\n                return webPage.SiteName?? webPage.Title ?? webPage.DisplayUrl;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class WebPageToDescriptionConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var webPage = value as TLWebPage;\r\n\r\n            if (webPage != null)\r\n            {\r\n                return webPage.Description ?? webPage.Title;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class RecentItemToNameConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var user = value as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                return TLUserBase.GetFirstName(user.FirstName, user.LastName, user.Phone);\r\n            }\r\n\r\n            var chat = value as TLChatBase;\r\n            if (chat != null)\r\n            {\r\n                return chat.FullName;\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class MessageContainerToFromConverter : IValueConverter\r\n    {\r\n        public static string GetFirstName(TLMessage25 message)\r\n        {\r\n            var message48 = message as TLMessage48;\r\n            if (message48 != null)\r\n            {\r\n                if (message48.FwdHeader != null)\r\n                {\r\n                    var cacheService = InMemoryCacheService.Instance;\r\n                    var channelId = message48.FwdHeader.ChannelId;\r\n                    if (channelId != null)\r\n                    {\r\n                        var channel = cacheService.GetChat(message48.FwdHeader.ChannelId) as TLChannel;\r\n                        if (channel != null)\r\n                        {\r\n                            return channel.Title.ToString();\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        var userId = message48.FwdHeader.FromId;\r\n                        if (userId != null)\r\n                        {\r\n                            var fromUser = cacheService.GetUser(message48.FwdHeader.FromId);\r\n                            if (fromUser != null)\r\n                            {\r\n                                return TLUserBase.GetFirstName(fromUser.FirstName, fromUser.LastName, fromUser.Phone);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (message != null)\r\n            {\r\n                var fromUser = message.FwdFrom as TLUserBase;\r\n                if (fromUser != null)\r\n                {\r\n                    return TLUserBase.GetFirstName(fromUser.FirstName, fromUser.LastName, fromUser.Phone);\r\n                }\r\n\r\n                var fromChat = message.FwdFrom as TLChannel;\r\n                if (fromChat != null)\r\n                {\r\n                    return fromChat.Title.ToString();\r\n                }\r\n\r\n                var fromChatForbidden = message.FwdFrom as TLChannelForbidden;\r\n                if (fromChatForbidden != null)\r\n                {\r\n                    return fromChatForbidden.Title.ToString();\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var messagesContainer = value as TLMessagesContainter;\r\n\r\n            if (messagesContainer != null)\r\n            {\r\n                if (messagesContainer.FwdMessages != null)\r\n                {\r\n                    var usersCache = new Dictionary<int, TLMessage25>();\r\n                    var channelsCache = new Dictionary<int, TLMessage25>();\r\n\r\n                    for (var i = 0; i < messagesContainer.FwdMessages.Count; i++)\r\n                    {\r\n                        var message = messagesContainer.FwdMessages[i];\r\n                        if (message.FwdFromId != null)\r\n                        {\r\n                            if (!usersCache.ContainsKey(message.FwdFromId.Value))\r\n                            {\r\n                                usersCache[message.FwdFromId.Value] = message;\r\n                            }\r\n                        }\r\n\r\n                        var message48 = message as TLMessage48;\r\n                        if (message48 != null)\r\n                        {\r\n                            if (message48.FwdHeader != null)\r\n                            {\r\n                                var channelId = message48.FwdHeader.ChannelId;\r\n                                if (channelId != null)\r\n                                {\r\n                                    if (!channelsCache.ContainsKey(channelId.Value))\r\n                                    {\r\n                                        channelsCache[channelId.Value] = message;\r\n                                    }\r\n                                }\r\n                                else\r\n                                {\r\n                                    var userId = message48.FwdHeader.FromId;\r\n                                    if (userId != null)\r\n                                    {\r\n                                        if (!usersCache.ContainsKey(userId.Value))\r\n                                        {\r\n                                            usersCache[userId.Value] = message;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var message40 = message as TLMessage40;\r\n                        if (message40 != null)\r\n                        {\r\n                            if (message40.FwdFromPeer != null)\r\n                            {\r\n                                var peerUser = message40.FwdFromPeer as TLPeerUser;\r\n                                if (peerUser != null)\r\n                                {\r\n                                    if (!usersCache.ContainsKey(peerUser.Id.Value))\r\n                                    {\r\n                                        usersCache[peerUser.Id.Value] = message;\r\n                                    }\r\n                                }\r\n\r\n                                var peerChannel = message40.FwdFromPeer as TLPeerChannel;\r\n                                if (peerChannel != null)\r\n                                {\r\n                                    if (!channelsCache.ContainsKey(peerChannel.Id.Value))\r\n                                    {\r\n                                        channelsCache[peerChannel.Id.Value] = message;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    var count = usersCache.Count + channelsCache.Count;\r\n                    if (count == 1)\r\n                    {\r\n                        return GetFirstName(messagesContainer.FwdMessages[0]);\r\n                    } \r\n                    if (count == 2)\r\n                    {\r\n                        var list = usersCache.Values.Union(channelsCache.Values).ToList();\r\n\r\n                        var message1 = list[0];\r\n                        var message2 = list[1];\r\n\r\n                        return string.Format(\"{0}, {1}\", GetFirstName(message1), GetFirstName(message2));\r\n                    }\r\n                    if (count > 2)\r\n                    {\r\n                        return string.Format(\"{0} {1}\", GetFirstName(messagesContainer.FwdMessages[0]), string.Format(AppResources.AndOthers, count - 1).ToLowerInvariant());\r\n                    }\r\n                }\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class MessageContainerToContentConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var messagesContainer = value as TLMessagesContainter;\r\n\r\n            if (messagesContainer != null)\r\n            {\r\n                if (messagesContainer.FwdMessages != null)\r\n                {\r\n                    var count = messagesContainer.FwdMessages.Count;\r\n                    if (count == 1)\r\n                    {\r\n                        var mediaPhoto = messagesContainer.FwdMessages[0].Media as TLMessageMediaPhoto;\r\n                        if (mediaPhoto != null)\r\n                        {\r\n                            return AppResources.ForwardedPhotoNominativeSingular;\r\n                        }\r\n\r\n                        var mediaAudio = messagesContainer.FwdMessages[0].Media as TLMessageMediaAudio;\r\n                        if (mediaAudio != null)\r\n                        {\r\n                            return AppResources.ForwardedAudioNominativeSingular;\r\n                        }\r\n\r\n                        var mediaDocument = messagesContainer.FwdMessages[0].Media as TLMessageMediaDocument;\r\n                        if (mediaDocument != null)\r\n                        {\r\n                            if (messagesContainer.FwdMessages[0].IsVoice())\r\n                            {\r\n                                return AppResources.ForwardedVoiceMessageNominativeSingular;\r\n                            }\r\n\r\n                            if (messagesContainer.FwdMessages[0].IsVideo())\r\n                            {\r\n                                return AppResources.ForwardedVideoNominativeSingular;\r\n                            }\r\n\r\n                            if (messagesContainer.FwdMessages[0].IsGif())\r\n                            {\r\n                                return AppResources.ForwardedGifNominativeSingular;\r\n                            }\r\n\r\n                            if (messagesContainer.FwdMessages[0].IsSticker())\r\n                            {\r\n                                return AppResources.ForwardedStickerNominativeSingular;\r\n                            }\r\n\r\n                            return AppResources.ForwardedFileNominativeSingular;\r\n                        }\r\n\r\n                        var mediaVideo = messagesContainer.FwdMessages[0].Media as TLMessageMediaVideo;\r\n                        if (mediaVideo != null)\r\n                        {\r\n                            return AppResources.ForwardedVideoNominativeSingular;\r\n                        }\r\n\r\n                        var mediaLocation = messagesContainer.FwdMessages[0].Media as TLMessageMediaGeo;\r\n                        if (mediaLocation != null)\r\n                        {\r\n                            return AppResources.ForwardedLocationNominativeSingular;\r\n                        }\r\n\r\n                        var mediaContact = messagesContainer.FwdMessages[0].Media as TLMessageMediaContact;\r\n                        if (mediaContact != null)\r\n                        {\r\n                            return AppResources.ForwardedContactNominativeSingular;\r\n                        }\r\n\r\n                        return AppResources.ForwardedMessage;\r\n                    }\r\n                    if (count > 1)\r\n                    {\r\n                        var sameMedia = true;\r\n                        var media = messagesContainer.FwdMessages[0].Media;\r\n                        for (var i = 1; i < messagesContainer.FwdMessages.Count; i++)\r\n                        {\r\n                            if (messagesContainer.FwdMessages[i].Media.GetType() != media.GetType())\r\n                            {\r\n                                sameMedia = false;\r\n                                break;\r\n                            }\r\n                        }\r\n\r\n                        if (sameMedia)\r\n                        {\r\n                            if (media is TLMessageMediaPhoto)\r\n                            {\r\n                                return Language.Declension(\r\n                                    count,\r\n                                    AppResources.ForwardedPhotoNominativeSingular,\r\n                                    AppResources.ForwardedPhotoNominativePlural,\r\n                                    AppResources.ForwardedPhotoGenitiveSingular,\r\n                                    AppResources.ForwardedPhotoGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                            }\r\n\r\n                            if (media is TLMessageMediaAudio)\r\n                            {\r\n                                return Language.Declension(\r\n                                    count,\r\n                                    AppResources.ForwardedAudioNominativeSingular,\r\n                                    AppResources.ForwardedAudioNominativePlural,\r\n                                    AppResources.ForwardedAudioGenitiveSingular,\r\n                                    AppResources.ForwardedAudioGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                            }\r\n\r\n                            if (media is TLMessageMediaDocument)\r\n                            {\r\n                                if (messagesContainer.FwdMessages[0].IsVoice())\r\n                                {\r\n                                    return Language.Declension(\r\n                                       count,\r\n                                       AppResources.ForwardedVoiceMessageNominativeSingular,\r\n                                       AppResources.ForwardedVoiceMessageNominativePlural,\r\n                                       AppResources.ForwardedVoiceMessageGenitiveSingular,\r\n                                       AppResources.ForwardedVoiceMessageGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                                }\r\n\r\n                                if (messagesContainer.FwdMessages[0].IsVideo())\r\n                                {\r\n                                    return Language.Declension(\r\n                                       count,\r\n                                       AppResources.ForwardedVideoNominativeSingular,\r\n                                       AppResources.ForwardedVideoNominativePlural,\r\n                                       AppResources.ForwardedVideoGenitiveSingular,\r\n                                       AppResources.ForwardedVideoGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                                }\r\n\r\n                                if (messagesContainer.FwdMessages[0].IsGif())\r\n                                {\r\n                                    return Language.Declension(\r\n                                       count,\r\n                                       AppResources.ForwardedGifNominativeSingular,\r\n                                       AppResources.ForwardedGifNominativePlural,\r\n                                       AppResources.ForwardedGifGenitiveSingular,\r\n                                       AppResources.ForwardedGifGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                                }\r\n\r\n                                if (messagesContainer.FwdMessages[0].IsSticker())\r\n                                {\r\n                                    return Language.Declension(\r\n                                       count,\r\n                                       AppResources.ForwardedStickerNominativeSingular,\r\n                                       AppResources.ForwardedStickerNominativePlural,\r\n                                       AppResources.ForwardedStickerGenitiveSingular,\r\n                                       AppResources.ForwardedStickerGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                                }\r\n\r\n                                return Language.Declension(\r\n                                    count,\r\n                                    AppResources.ForwardedFileNominativeSingular,\r\n                                    AppResources.ForwardedFileNominativePlural,\r\n                                    AppResources.ForwardedFileGenitiveSingular,\r\n                                    AppResources.ForwardedFileGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                            }\r\n\r\n                            if (media is TLMessageMediaVideo)\r\n                            {\r\n                                return Language.Declension(\r\n                                    count,\r\n                                    AppResources.ForwardedVideoNominativeSingular,\r\n                                    AppResources.ForwardedVideoNominativePlural,\r\n                                    AppResources.ForwardedVideoGenitiveSingular,\r\n                                    AppResources.ForwardedVideoGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                            }\r\n\r\n                            if (media is TLMessageMediaGeo)\r\n                            {\r\n                                return Language.Declension(\r\n                                    count,\r\n                                    AppResources.ForwardedLocationNominativeSingular,\r\n                                    AppResources.ForwardedLocationNominativePlural,\r\n                                    AppResources.ForwardedLocationGenitiveSingular,\r\n                                    AppResources.ForwardedLocationGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                            }\r\n\r\n                            if (media is TLMessageMediaContact)\r\n                            {\r\n                                return Language.Declension(\r\n                                    count,\r\n                                    AppResources.ForwardedContactNominativeSingular,\r\n                                    AppResources.ForwardedContactNominativePlural,\r\n                                    AppResources.ForwardedContactGenitiveSingular,\r\n                                    AppResources.ForwardedContactGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                            }\r\n                        }\r\n\r\n                        return Language.Declension(\r\n                            count,\r\n                            AppResources.ForwardedMessageNominativeSingular,\r\n                            AppResources.ForwardedMessageNominativePlural,\r\n                            AppResources.ForwardedMessageGenitiveSingular,\r\n                            AppResources.ForwardedMessageGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                    }\r\n                }\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/GeoLocationToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class GeoLocationToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value is TLMessageMediaEmpty || value is TLMessageMediaWebPage)\r\n            {\r\n                return Visibility.Visible;\r\n            }\r\n            if (value is TLDecryptedMessageMediaEmpty || value is TLDecryptedMessageMediaWebPage)\r\n            {\r\n                return Visibility.Visible;\r\n            }\r\n\r\n            return Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/GeoPointToStaticGoogleMapsConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Imaging;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class GeoPointToStaticGoogleMapsConverter : IValueConverter\r\n    {\r\n        private const int DefaultWidth = 311;\r\n        private const int DefaultHeight = 150;\r\n\r\n        public int Width { get; set; }\r\n\r\n        public int Height { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var geoPoint = value as TLGeoPoint;\r\n\r\n            if (geoPoint == null) return null;\r\n\r\n            var width = Width != 0 ? Width : DefaultWidth;\r\n            var height = Height != 0 ? Height : DefaultHeight;\r\n            return string.Format(Constants.StaticGoogleMap, geoPoint.Lat.Value.ToString(new CultureInfo(\"en-US\")), geoPoint.Long.Value.ToString(new CultureInfo(\"en-US\")), width, height);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class GeoPointToStaticGoogleMapsConverter2 : IValueConverter\r\n    {\r\n        private static readonly Dictionary<string, WeakReference> _cachedSources = new Dictionary<string, WeakReference>();\r\n\r\n        public static BitmapSource ReturnOrEnqueueGeoPointImage(TLGeoPoint geoPoint, int width, int height, TLObject owner)\r\n        {\r\n            var destFileName = geoPoint.GetFileName();\r\n\r\n            BitmapSource imageSource;\r\n            WeakReference weakImageSource;\r\n            if (_cachedSources.TryGetValue(destFileName, out weakImageSource))\r\n            {\r\n                if (weakImageSource.IsAlive)\r\n                {\r\n                    imageSource = weakImageSource.Target as BitmapSource;\r\n\r\n                    return imageSource;\r\n                }\r\n            }\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(destFileName))\r\n                {\r\n                    var sourceUri = string.Format(Constants.StaticGoogleMap, geoPoint.Lat.Value.ToString(new CultureInfo(\"en-US\")), geoPoint.Long.Value.ToString(new CultureInfo(\"en-US\")), width, height);\r\n\r\n                    var fileManager = IoC.Get<IHttpDocumentFileManager>();\r\n\r\n                    fileManager.DownloadFileAsync(sourceUri, destFileName, owner, item =>\r\n                    {\r\n                        var messageMediaGeoPoint = owner as IMessageMediaGeoPoint;\r\n                        if (messageMediaGeoPoint != null)\r\n                        {\r\n                            var newGeoPoint = messageMediaGeoPoint.Geo as TLGeoPoint;\r\n                            if (newGeoPoint != null)\r\n                            {\r\n                                var newFileName = newGeoPoint.GetFileName();\r\n                                var oldFileName = destFileName;\r\n\r\n                                using (var store2 = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store2.FileExists(oldFileName))\r\n                                    {\r\n                                        if (!string.IsNullOrEmpty(oldFileName) && !string.Equals(oldFileName, newFileName, StringComparison.OrdinalIgnoreCase))\r\n                                        {\r\n                                            store2.CopyFile(oldFileName, newFileName, true);\r\n                                            store2.DeleteFile(oldFileName);\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                var messageMediaBase = owner as TLMessageMediaBase;\r\n                                if (messageMediaBase != null)\r\n                                {\r\n                                    messageMediaBase.NotifyOfPropertyChange(() => messageMediaBase.Self);\r\n                                }\r\n                                var decryptedMessageMediaBase = owner as TLDecryptedMessageMediaBase;\r\n                                if (decryptedMessageMediaBase != null)\r\n                                {\r\n                                    decryptedMessageMediaBase.NotifyOfPropertyChange(() => decryptedMessageMediaBase.Self);\r\n                                }\r\n                            });\r\n                        }\r\n                    });\r\n                }\r\n                else\r\n                {\r\n                    try\r\n                    {\r\n                        using (var stream = store.OpenFile(destFileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            stream.Seek(0, SeekOrigin.Begin);\r\n                            var image = new BitmapImage();\r\n                            image.SetSource(stream);\r\n                            imageSource = image;\r\n                        }\r\n\r\n                        _cachedSources[destFileName] = new WeakReference(imageSource);\r\n                    }\r\n                    catch (Exception)\r\n                    {\r\n                        return null;\r\n                    }\r\n\r\n                    return imageSource;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private const int DefaultWidth = 311;\r\n        private const int DefaultHeight = 150;\r\n\r\n        public int Width { get; set; }\r\n\r\n        public int Height { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var mediaGeo = value as TLMessageMediaGeo;\r\n            if (mediaGeo != null)\r\n            {\r\n                var geoPoint = mediaGeo.Geo as TLGeoPoint;\r\n                if (geoPoint == null) return null;\r\n\r\n                var width = Width != 0 ? Width : DefaultWidth;\r\n                var height = Height != 0 ? Height : DefaultHeight;\r\n\r\n                return ReturnOrEnqueueGeoPointImage(geoPoint, width, height, mediaGeo);\r\n            }\r\n\r\n            var decryptedMediaGeo = value as TLDecryptedMessageMediaGeoPoint;\r\n            if (decryptedMediaGeo != null)\r\n            {\r\n                var geoPoint = decryptedMediaGeo.Geo as TLGeoPoint;\r\n                if (geoPoint == null) return null;\r\n\r\n                var width = Width != 0 ? Width : DefaultWidth;\r\n                var height = Height != 0 ? Height : DefaultHeight;\r\n\r\n                return ReturnOrEnqueueGeoPointImage(geoPoint, width, height, decryptedMediaGeo);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class GeoPointToStaticGoogleMapsConverter3 : IValueConverter\r\n    {\r\n        private static readonly Dictionary<string, WeakReference> _cachedSources = new Dictionary<string, WeakReference>();\r\n\r\n        public static BitmapSource ReturnOrEnqueueGeoPointImage(TLGeoPoint geoPoint, int width, int height, TLObject owner)\r\n        {\r\n\r\n            var destFileName = geoPoint.GetFileName();\r\n\r\n            BitmapSource imageSource;\r\n            WeakReference weakImageSource;\r\n            if (_cachedSources.TryGetValue(destFileName, out weakImageSource))\r\n            {\r\n                if (weakImageSource.IsAlive)\r\n                {\r\n                    imageSource = weakImageSource.Target as BitmapSource;\r\n\r\n                    return imageSource;\r\n                }\r\n            }\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(destFileName))\r\n                {\r\n                    var config = IoC.Get<ICacheService>().GetConfig() as TLConfig82;\r\n                    if (config == null) return null;\r\n\r\n                    var fileManager = IoC.Get<IWebFileManager>();\r\n\r\n                    var geoPoint82 = geoPoint as TLGeoPoint82;\r\n                    var accessHash = geoPoint82 != null ? geoPoint82.AccessHash : new TLLong(0); \r\n\r\n                    var inputLocation = new TLInputWebFileGeoPointLocation\r\n                    {\r\n                        GeoPoint = new TLInputGeoPoint { Long = geoPoint.Long, Lat = geoPoint.Lat },\r\n                        AccessHash = accessHash,\r\n                        W = new TLInt(width),\r\n                        H = new TLInt(height),\r\n                        Zoom = new TLInt(15),\r\n                        Scale = new TLInt(2)\r\n                    };\r\n\r\n                    fileManager.DownloadFile(config.WebfileDCId, inputLocation, destFileName, owner, item =>\r\n                    {\r\n                        var messageMediaGeoPoint = owner as IMessageMediaGeoPoint;\r\n                        if (messageMediaGeoPoint != null)\r\n                        {\r\n                            var newGeoPoint = messageMediaGeoPoint.Geo as TLGeoPoint;\r\n                            if (newGeoPoint != null)\r\n                            {\r\n                                var newFileName = newGeoPoint.GetFileName();\r\n                                var oldFileName = destFileName;\r\n\r\n                                using (var store2 = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store2.FileExists(oldFileName))\r\n                                    {\r\n                                        if (!string.IsNullOrEmpty(oldFileName) && !string.Equals(oldFileName, newFileName, StringComparison.OrdinalIgnoreCase))\r\n                                        {\r\n                                            store2.CopyFile(oldFileName, newFileName, true);\r\n                                            store2.DeleteFile(oldFileName);\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                var messageMediaBase = owner as TLMessageMediaBase;\r\n                                if (messageMediaBase != null)\r\n                                {\r\n                                    messageMediaBase.NotifyOfPropertyChange(() => messageMediaBase.Self);\r\n                                }\r\n                                var decryptedMessageMediaBase = owner as TLDecryptedMessageMediaBase;\r\n                                if (decryptedMessageMediaBase != null)\r\n                                {\r\n                                    decryptedMessageMediaBase.NotifyOfPropertyChange(() => decryptedMessageMediaBase.Self);\r\n                                }\r\n                            });\r\n                        }\r\n                    });\r\n                }\r\n                else\r\n                {\r\n                    try\r\n                    {\r\n                        using (var stream = store.OpenFile(destFileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            stream.Seek(0, SeekOrigin.Begin);\r\n                            var image = new BitmapImage();\r\n                            image.SetSource(stream);\r\n                            imageSource = image;\r\n                        }\r\n\r\n                        _cachedSources[destFileName] = new WeakReference(imageSource);\r\n                    }\r\n                    catch (Exception)\r\n                    {\r\n                        return null;\r\n                    }\r\n\r\n                    return imageSource;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private const int DefaultWidth = 311;\r\n        private const int DefaultHeight = 150;\r\n\r\n        public int Width { get; set; }\r\n\r\n        public int Height { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var mediaGeo = value as TLMessageMediaGeo;\r\n            if (mediaGeo != null)\r\n            {\r\n                var geoPoint = mediaGeo.Geo as TLGeoPoint;\r\n                if (geoPoint == null) return null;\r\n\r\n                var width = Width != 0 ? Width : DefaultWidth;\r\n                var height = Height != 0 ? Height : DefaultHeight;\r\n\r\n                return ReturnOrEnqueueGeoPointImage(geoPoint, width, height, mediaGeo);\r\n            }\r\n\r\n            var decryptedMediaGeo = value as TLDecryptedMessageMediaGeoPoint;\r\n            if (decryptedMediaGeo != null)\r\n            {\r\n                var geoPoint = decryptedMediaGeo.Geo as TLGeoPoint;\r\n                if (geoPoint == null) return null;\r\n\r\n                var width = Width != 0 ? Width : DefaultWidth;\r\n                var height = Height != 0 ? Height : DefaultHeight;\r\n\r\n                return ReturnOrEnqueueGeoPointImage(geoPoint, width, height, decryptedMediaGeo);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/GroupToBackgroundBrushValueConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class GroupToBackgroundBrushValueConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var group = value as AlphaKeyGroup<TLUserBase>;\r\n            object result = null;\r\n\r\n            if (group != null)\r\n            {\r\n                if (group.Count == 0)\r\n                {\r\n                    result = Application.Current.Resources[\"PhoneChromeBrush\"];\r\n                }\r\n                else\r\n                {\r\n                    result = Application.Current.Resources[\"PhoneAccentBrush\"];\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class CountryGroupToBackgroundBrushValueConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var group = value as CountriesInGroup;\r\n            object result = null;\r\n\r\n            if (group != null)\r\n            {\r\n                if (group.Count == 0)\r\n                {\r\n                    result = Application.Current.Resources[\"PhoneChromeBrush\"];\r\n                }\r\n                else\r\n                {\r\n                    result = Application.Current.Resources[\"PhoneAccentBrush\"];\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/GroupToForegroundBrushValueConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class GroupToForegroundBrushValueConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var group = value as AlphaKeyGroup<TLUserBase>;\r\n            object result = null;\r\n\r\n            if (group != null)\r\n            {\r\n                if (group.Count == 0)\r\n                {\r\n                    result = Application.Current.Resources[\"PhoneDisabledBrush\"];\r\n                }\r\n                else\r\n                {\r\n                    result = new SolidColorBrush(Colors.White);\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class CountryGroupToForegroundBrushValueConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var group = value as CountriesInGroup;\r\n            object result = null;\r\n\r\n            if (group != null)\r\n            {\r\n                if (group.Count == 0)\r\n                {\r\n                    result = Application.Current.Resources[\"PhoneDisabledBrush\"];\r\n                }\r\n                else\r\n                {\r\n                    result = new SolidColorBrush(Colors.White);\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/IdToPlaceholderBackgroundConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Caliburn.Micro;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class IdToPlaceholderBackgroundConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            long index;\r\n            if (value is int)\r\n            {\r\n                index = (int)value;\r\n            }\r\n            else if (value is long)\r\n            {\r\n                index = (long)value;\r\n            }\r\n            else\r\n            {\r\n                return Application.Current.Resources[\"PhoneChromeBrush2\"];\r\n            }\r\n\r\n            if (index == 0)\r\n            {\r\n                return Application.Current.Resources[\"PhoneChromeBrush2\"];\r\n            }\r\n            if (index == -1)\r\n            {\r\n                return Application.Current.Resources[\"PhoneChromeBrush2\"];\r\n            }\r\n            if (index == -2)\r\n            {\r\n                return Application.Current.Resources[\"PhoneAccentBrush\"];\r\n            }\r\n\r\n            var currentUserId = IoC.Get<IStateService>().CurrentUserId;\r\n\r\n            var number = Math.Abs(MD5Core.GetHash(string.Format(\"{0}{1}\", value, currentUserId))[Math.Abs(index % 16)]) % 8;\r\n            //switch (number)\r\n            //{\r\n            //    case 0:\r\n            //        return Application.Current.Resources[\"Placeholder0Brush\"];\r\n            //    case 1:\r\n            //        return Application.Current.Resources[\"Placeholder1Brush\"];\r\n            //    case 2:\r\n            //        return Application.Current.Resources[\"Placeholder2Brush\"];\r\n            //    case 3:\r\n            //        return Application.Current.Resources[\"Placeholder3Brush\"];\r\n            //    case 4:\r\n            //        return Application.Current.Resources[\"Placeholder4Brush\"];\r\n            //    case 5:\r\n            //        return Application.Current.Resources[\"Placeholder5Brush\"];\r\n            //}\r\n            //var number = (int) value % 8;\r\n            switch (number)\r\n            {\r\n                case 0:\r\n                    return Application.Current.Resources[\"BlueBrush\"];\r\n                case 1:\r\n                    return Application.Current.Resources[\"CyanBrush\"];\r\n                case 2:\r\n                    return Application.Current.Resources[\"GreenBrush\"];\r\n                case 3:\r\n                    return Application.Current.Resources[\"OrangeBrush\"];\r\n                case 4:\r\n                    return Application.Current.Resources[\"PinkBrush\"];\r\n                case 5:\r\n                    return Application.Current.Resources[\"PurpleBrush\"];\r\n                case 6:\r\n                    return Application.Current.Resources[\"RedBrush\"];\r\n                case 7:\r\n                    return Application.Current.Resources[\"YellowBrush\"];\r\n            }\r\n\r\n            return Application.Current.Resources[\"PhoneChromeBrush2\"];\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/IntToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class IntToVisibilityConverter : IValueConverter\r\n    {\r\n        /// <summary>\r\n        /// Modifies the source data before passing it to the target for display in the UI.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the target dependency property.\r\n        /// </returns>\r\n        /// <param name=\"value\">The source data being passed to the target.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the target dependency property.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value == null || !(value is int) || parameter == null) return Visibility.Collapsed;\r\n            try\r\n            {\r\n                var count = int.Parse(parameter.ToString());\r\n\r\n                return count == (int) value ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n            catch(Exception)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Modifies the target data before passing it to the source object.  This method is called only in <see cref=\"F:System.Windows.Data.BindingMode.TwoWay\"/> bindings.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the source object.\r\n        /// </returns>\r\n        /// <param name=\"value\">The target data being passed to the source.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the source object.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/InvertBooleanConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class InvertVisibilityConverter : IValueConverter\r\n    {\r\n        #region Implementation of IValueConverter\r\n\r\n        /// <summary>\r\n        /// Modifies the source data before passing it to the target for display in the UI.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the target dependency property.\r\n        /// </returns>\r\n        /// <param name=\"value\">The source data being passed to the target.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the target dependency property.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return (Visibility) value == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Modifies the target data before passing it to the source object.  This method is called only in <see cref=\"F:System.Windows.Data.BindingMode.TwoWay\"/> bindings.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the source object.\r\n        /// </returns>\r\n        /// <param name=\"value\">The target data being passed to the source.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the source object.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        #endregion\r\n    }\r\n\r\n    /// <summary>   \r\n    /// Inverts boolean value. \r\n    /// </summary>\r\n    public class InvertBooleanConverter : IValueConverter\r\n    {\r\n        #region Implementation of IValueConverter\r\n\r\n        /// <summary>\r\n        /// Modifies the source data before passing it to the target for display in the UI.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the target dependency property.\r\n        /// </returns>\r\n        /// <param name=\"value\">The source data being passed to the target.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the target dependency property.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is bool)) return value;\r\n\r\n            return !(bool)value;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Modifies the target data before passing it to the source object.  This method is called only in <see cref=\"F:System.Windows.Data.BindingMode.TwoWay\"/> bindings.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the source object.\r\n        /// </returns>\r\n        /// <param name=\"value\">The target data being passed to the source.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the source object.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is bool)) return value;\r\n\r\n            return !(bool)value;\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/IsSelectedToBackgroundConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class IsSelectedToBackgroundConverter : IValueConverter\r\n    {\r\n        public Color SelectedColor = Color.FromArgb(0, 0, 0, 0);\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var notSelectedColor = (Color)Application.Current.Resources[\"PhoneBackgroundColor\"];\r\n            notSelectedColor.A = 80;\r\n\r\n            return (bool)value ? new SolidColorBrush(SelectedColor) : new SolidColorBrush(notSelectedColor);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/LowercaseConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class LowercaseConverter : IValueConverter\r\n    {\r\n        #region Implementation of IValueConverter\r\n\r\n        /// <summary>\r\n        /// Modifies the source data before passing it to the target for display in the UI.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the target dependency property.\r\n        /// </returns>\r\n        /// <param name=\"value\">The source data being passed to the target.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the target dependency property.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is string)) return null;\r\n\r\n            return Convert(value.ToString());\r\n        }\r\n\r\n        public static string Convert(string value)\r\n        {\r\n            return value.ToLowerInvariant();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Modifies the target data before passing it to the source object.  This method is called only in <see cref=\"F:System.Windows.Data.BindingMode.TwoWay\"/> bindings.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the source object.\r\n        /// </returns>\r\n        /// <param name=\"value\">The target data being passed to the source.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the source object.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/MaskConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class MaskConverter : DependencyObject, IValueConverter\r\n    {\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value == null) return null;\r\n\r\n            var str = value.ToString();\r\n\r\n            var mask = \"●\";\r\n\r\n            if (parameter != null)\r\n            {\r\n                mask = parameter.ToString();\r\n            }\r\n\r\n            var builder = new StringBuilder();\r\n            for (var i = 0; i < str.Length; i++)\r\n            {\r\n                builder.Append(mask);\r\n            }\r\n\r\n            return builder.ToString();\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Converters/MediaContactToPhotoConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows.Data;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class MediaContactToPhotoConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var mediaContact = value as TLMessageMediaContact;\r\n            if (mediaContact != null)\r\n            {\r\n                \r\n\r\n\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/MediaEmptyToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class MediaEmptyToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var visibility = value is TLMessageMediaEmpty || value is TLMessageMediaWebPage;\r\n            if (string.Equals((string) parameter, \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                visibility = !visibility;\r\n            }\r\n\r\n            return visibility ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class DownloadMessageToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var message = value as TLMessage;\r\n            if (message == null)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n\r\n            return DownloadMediaToVisibilityConverter.MediaFileExists(message.Media) ? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class DownloadMediaToVisibilityConverter : IValueConverter\r\n    {\r\n        public static bool MediaFileExists(TLMessageMediaBase value)\r\n        {\r\n            var mediaDocument = value as TLMessageMediaDocument;\r\n            if (mediaDocument == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (!string.IsNullOrEmpty(mediaDocument.IsoFileName))\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var document = mediaDocument.Document as TLDocument;\r\n            if (document == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (document.Size.Value == 0)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var fileName = document.GetFileName();\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (store.FileExists(fileName))\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return MediaFileExists(value as TLMessageMediaBase) ? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/MediaSizeConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class MediaSizeConverter : IValueConverter\r\n    {\r\n        public static string Convert(int bytesCount)\r\n        {\r\n            if (bytesCount < 1024)\r\n            {\r\n                return string.Format(\"{0} B\", bytesCount);\r\n            }\r\n\r\n            if (bytesCount < 1024 * 1024)\r\n            {\r\n                return string.Format(\"{0} KB\", ((double)bytesCount / 1024).ToString(\"0.0\", CultureInfo.InvariantCulture));\r\n            }\r\n\r\n            if (bytesCount < 1024 * 1024 * 1024)\r\n            {\r\n                return string.Format(\"{0} MB\", ((double)bytesCount / 1024 / 1024).ToString(\"0.0\", CultureInfo.InvariantCulture));\r\n            }\r\n\r\n            return string.Format(\"{0} GB\", ((double)bytesCount / 1024 / 1024 / 1024).ToString(\"0.0\", CultureInfo.InvariantCulture));\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is int)) return string.Empty;\r\n\r\n            var bytesCount = (int)value;\r\n\r\n            return Convert(bytesCount);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/MergeBrushesConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class MergeBrushesConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/MessageStateToForegroundConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class MessageStateToForegroundConverter : IValueConverter\r\n    {\r\n        #region Implementation of IValueConverter\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var accentColor = (Brush)Application.Current.Resources[\"TelegramBadgeAccentBrush\"];\r\n            var foregroundColor = (Brush)Application.Current.Resources[\"TelegramBadgeSubtleBrush\"];\r\n\r\n            var dialog = value as TLDialog;\r\n            if (dialog != null)\r\n            {\r\n                var notifySettings = dialog.NotifySettings as TLPeerNotifySettings;\r\n                if (notifySettings != null)\r\n                {\r\n                    var muteUntil = notifySettings.MuteUntil;\r\n                    if (muteUntil == null)\r\n                    {\r\n                        var alert = dialog.Peer is TLPeerUser\r\n                            ? IoC.Get<IStateService>().GetNotifySettings().ContactAlert\r\n                            : IoC.Get<IStateService>().GetNotifySettings().GroupAlert;\r\n\r\n                        return alert ? accentColor : foregroundColor;\r\n                    }\r\n\r\n                    var clientDelta = IoC.Get<IMTProtoService>().ClientTicksDelta;\r\n                    //var utc0SecsLong = notifySettings.MuteUntil.Value * 4294967296 - clientDelta;\r\n                    var utc0SecsInt = muteUntil.Value - clientDelta / 4294967296.0;\r\n\r\n                    var muteUntilDateTime = Telegram.Api.Helpers.Utils.UnixTimestampToDateTime(utc0SecsInt);\r\n\r\n                    if (muteUntilDateTime > DateTime.Now)\r\n                    {\r\n                        return foregroundColor;\r\n                    }\r\n                }\r\n\r\n                return accentColor;\r\n            }\r\n\r\n            return accentColor;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        #endregion\r\n    }\r\n\r\n    public class DialogToForegroundConverter : IValueConverter\r\n    {\r\n        #region Implementation of IValueConverter\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var accentColor = new SolidColorBrush((Color)Application.Current.Resources[\"PhoneAccentColor\"]);\r\n            var foregroundColor = new SolidColorBrush((Color)Application.Current.Resources[\"PhoneForegroundColor\"]);\r\n\r\n            var encryptedDialog = value as TLEncryptedDialog;\r\n            if (encryptedDialog != null)\r\n            {\r\n\r\n                return accentColor;\r\n            }\r\n\r\n            return foregroundColor;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/MessageStatusConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class MessageStatusConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value is MessageStatus)\r\n            {\r\n                var status = (MessageStatus) value;\r\n\r\n                if (status == MessageStatus.Failed)\r\n                    return string.Format(\"{0}\", AppResources.SendingFailed);\r\n\r\n                if (status == MessageStatus.Confirmed)\r\n                    return string.Empty;\r\n\r\n                if (status == MessageStatus.Sending)\r\n                    //return string.Format(\"{0}...\", AppResources.Sending);\r\n                    return string.Empty;\r\n\r\n                if (status == MessageStatus.Read)\r\n                    return string.Empty;\r\n\r\n                if (status == MessageStatus.Compressing)\r\n                    return string.Format(\"{0}...\", AppResources.Compressing);\r\n\r\n                if (status == MessageStatus.Broadcast)\r\n                    return string.Empty;\r\n\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/MessageToBriefInfoConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Themes.Default.Templates;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class DialogToBriefInfoConverter : IValueConverter\r\n    {\r\n        public static string Convert(TLDecryptedMessageBase value, bool showContent)\r\n        {\r\n            var serviceMessage = value as TLDecryptedMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                if (serviceMessage.Action is TLDecryptedMessageActionEmpty)\r\n                {\r\n                    return AppResources.SecretChatCreated;\r\n                }\r\n\r\n                return DecryptedServiceMessageToTextConverter.Convert(serviceMessage);\r\n            }\r\n\r\n            var message = value as TLDecryptedMessage;\r\n            if (message != null)\r\n            {\r\n                var canSendString = string.Empty;\r\n\r\n                if (message.Status == MessageStatus.Failed)\r\n                {\r\n                    canSendString = string.Format(\"{0}: \", AppResources.SendingFailed);\r\n                }\r\n\r\n                var message73 = message as TLDecryptedMessage73;\r\n                if (message73 != null && message73.GroupedId != null)\r\n                {\r\n                    return canSendString + AppResources.Album;\r\n                }\r\n\r\n                if (message.Media != null)\r\n                {\r\n                    var messageMediaWebPage = message.Media as TLDecryptedMessageMediaWebPage;\r\n                    if (messageMediaWebPage != null)\r\n                    {\r\n                        return canSendString + messageMediaWebPage.Url;\r\n                    }\r\n\r\n                    if (message.Media is TLDecryptedMessageMediaDocument)\r\n                    {\r\n                        if (message.IsVoice())\r\n                        {\r\n                            return canSendString + AppResources.VoiceMessage;\r\n                        }\r\n                        \r\n                        if (message.IsVideo())\r\n                        {\r\n                            return canSendString + AppResources.Video;\r\n                        }\r\n\r\n                        if (message.IsGif())\r\n                        {\r\n                            return canSendString + AppResources.Gif;\r\n                        }\r\n\r\n                        return canSendString + AppResources.Document;\r\n                    }\r\n\r\n                    if (message.Media is TLDecryptedMessageMediaContact)\r\n                    {\r\n                        return canSendString + AppResources.Contact;\r\n                    }\r\n\r\n                    if (message.Media is TLDecryptedMessageMediaGeoPoint)\r\n                    {\r\n                        return canSendString + AppResources.GeoPoint;\r\n                    }\r\n\r\n                    if (message.Media is TLDecryptedMessageMediaPhoto)\r\n                    {\r\n                        return canSendString + AppResources.Photo;\r\n                    }\r\n\r\n                    if (message.Media is TLDecryptedMessageMediaVideo)\r\n                    {\r\n                        return canSendString + AppResources.Video;\r\n                    }\r\n\r\n                    if (message.Media is TLDecryptedMessageMediaAudio)\r\n                    {\r\n                        return canSendString + AppResources.Audio;\r\n                    }\r\n\r\n                    if (message.Media is TLDecryptedMessageMediaExternalDocument)\r\n                    {\r\n                        if (message.IsSticker())\r\n                        {\r\n                            return canSendString + AppResources.Sticker;\r\n                        }\r\n\r\n                        return canSendString + AppResources.Document;\r\n                    }\r\n                }\r\n\r\n                if (message.Message != null)\r\n                {\r\n                    if (showContent)\r\n                    {\r\n                        var str = message.Message != null? message.Message.ToString() : string.Empty;\r\n                        return canSendString + str.Substring(0, Math.Min(str.Length, 40)).Replace(\"\\r\\n\", \"\\n\").Replace('\\n', ' ');\r\n                    }\r\n\r\n                    return canSendString + AppResources.Message;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static string Convert(TLMessageBase value, bool showContent)\r\n        {\r\n            var emptyMessage = value as TLMessageEmpty;\r\n            if (emptyMessage != null)\r\n            {\r\n                return AppResources.EmptyMessage;\r\n            }\r\n\r\n            //var forwardedMessage = value as TLMessageForwarded;\r\n            //if (forwardedMessage != null)\r\n            //{\r\n            //    return AppResources.ForwardedMessage;\r\n            //}\r\n\r\n            var serviceMessage = value as TLMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                return ServiceMessageToTextConverter.Convert(serviceMessage);\r\n\r\n                //return AppResources.ServiceMessage;\r\n            }\r\n               \r\n            var message = value as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var canSendString = string.Empty;\r\n\r\n                if (message.Status == MessageStatus.Failed)\r\n                {\r\n                    canSendString = string.Format(\"{0}: \", AppResources.SendingFailed);\r\n                }\r\n\r\n                var message73 = message as TLMessage73;\r\n                if (message73 != null && message73.GroupedId != null)\r\n                {\r\n                    return canSendString + AppResources.Album;\r\n                }\r\n\r\n                if (message.Media != null)\r\n                {\r\n                    var mediaInvoice = message.Media as TLMessageMediaInvoice;\r\n                    if (mediaInvoice != null)\r\n                    {\r\n                        var description = mediaInvoice.Description;\r\n                        if (!TLString.IsNullOrEmpty(description))\r\n                        {\r\n                            return canSendString + description;\r\n                        }\r\n\r\n                        return canSendString + AppResources.Invoice;\r\n                    }\r\n\r\n                    var mediaGame = message.Media as TLMessageMediaGame;\r\n                    if (mediaGame != null)\r\n                    {\r\n                        return canSendString + \"🎮 \" + mediaGame.Game.Title;\r\n                    }\r\n\r\n                    if (message.Media is TLMessageMediaDocument)\r\n                    {\r\n                        var captionString = string.Empty;\r\n                        var str = message.Message != null ? message.Message.ToString().Replace(\"\\r\\n\", \"\\n\").Replace('\\n', ' ') : string.Empty;\r\n                        if (!string.IsNullOrEmpty(str))\r\n                        {\r\n                            captionString = \", \" + str.Substring(0, Math.Min(str.Length, 40));\r\n                        }\r\n\r\n                        if (message.IsVoice())\r\n                        {\r\n                            return canSendString + AppResources.VoiceMessage + captionString;\r\n                        }\r\n\r\n                        if (message.IsRoundVideo())\r\n                        {\r\n                            return canSendString + AppResources.VideoMessage + captionString;\r\n                        }\r\n\r\n                        if (message.IsVideo())\r\n                        {\r\n                            return canSendString + AppResources.Video + captionString;\r\n                        }\r\n\r\n                        if (message.IsGif())\r\n                        {\r\n                            return canSendString + AppResources.Gif + captionString;\r\n                        }\r\n\r\n                        if (message.IsSticker())\r\n                        {\r\n                            return canSendString + AppResources.Sticker + captionString;\r\n                        }\r\n\r\n                        var mediaDocument = message.Media as TLMessageMediaDocument45;\r\n                        if (mediaDocument != null)\r\n                        {\r\n                            var document = mediaDocument.Document as TLDocument22;\r\n                            if (document != null && !string.IsNullOrEmpty(document.DocumentName))\r\n                            {\r\n                                return canSendString + document.DocumentName + captionString;\r\n                            }\r\n                        }\r\n\r\n                        return canSendString + AppResources.Document + captionString;\r\n                    }\r\n\r\n                    if (message.Media is TLMessageMediaContact)\r\n                    {\r\n                        return canSendString + AppResources.Contact;\r\n                    }\r\n\r\n                    if (message.Media is TLMessageMediaGeoLive)\r\n                    {\r\n                        return canSendString + AppResources.LiveLocation;\r\n                    }\r\n\r\n                    if (message.Media is TLMessageMediaGeo)\r\n                    {\r\n                        return canSendString + AppResources.GeoPoint;\r\n                    }\r\n\r\n                    if (message.Media is TLMessageMediaPhoto)\r\n                    {\r\n                        if (!TLString.IsNullOrEmpty(message.Message))\r\n                        {\r\n                            var str = message.Message.ToString().Replace(\"\\r\\n\", \"\\n\").Replace('\\n', ' ');\r\n                            if (!string.IsNullOrEmpty(str))\r\n                            {\r\n                                return canSendString + AppResources.Photo + \", \" + str.Substring(0, Math.Min(str.Length, 40));\r\n                            }\r\n                        }\r\n\r\n                        return canSendString + AppResources.Photo;\r\n                    }\r\n\r\n                    if (message.Media is TLMessageMediaVideo)\r\n                    {\r\n                        return canSendString + AppResources.Video;\r\n                    }\r\n\r\n                    if (message.Media is TLMessageMediaAudio)\r\n                    {\r\n                        return canSendString + AppResources.Audio;\r\n                    }\r\n\r\n                    if (message.Media is TLMessageMediaUnsupportedBase)\r\n                    {\r\n                        return canSendString + AppResources.UnsupportedMedia;\r\n                    }\r\n                }\r\n\r\n                if (message.Message != null)\r\n                {\r\n                    if (showContent)\r\n                    {\r\n                        var str = message.Message != null ? message.Message.ToString() : string.Empty;\r\n                        return canSendString + str.Substring(0, Math.Min(str.Length, 40)).Replace(\"\\r\\n\", \"\\n\").Replace('\\n', ' ');                  \r\n                    }\r\n\r\n                    return canSendString + AppResources.Message;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static bool ShowDraft(TLDialog53 dialog)\r\n        {\r\n            if (dialog == null) return false;\r\n\r\n            var draft = dialog.Draft as TLDraftMessage;\r\n            if (draft != null)\r\n            {\r\n                if (dialog.Peer is TLPeerChannel)\r\n                {\r\n                    var channel = dialog.With as TLChannel;\r\n                    if (channel != null && channel.IsBroadcast && !channel.Creator && !channel.IsEditor)\r\n                    {\r\n                        return false;\r\n                    }\r\n                }\r\n\r\n                var topMessage = dialog.TopMessage as TLMessageCommon;\r\n                if (topMessage != null && !topMessage.Out.Value && topMessage.Unread.Value)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var dialog = value as TLDialog;\r\n            var broadcast = value as TLBroadcastDialog;\r\n            if (dialog != null)\r\n            {\r\n                var dialog53 = dialog as TLDialog53;\r\n                if (dialog53 != null)\r\n                {\r\n                    if (ShowDraft(dialog53))\r\n                    {\r\n                        var draft = dialog53.Draft as TLDraftMessage;\r\n                        if (draft != null)\r\n                        {\r\n                            if (TLString.IsNullOrEmpty(draft.Message) \r\n                                && draft.ReplyToMsgId != null \r\n                                && draft.ReplyToMsgId.Value > 0)\r\n                            {\r\n                                return AppResources.Reply.ToLowerInvariant();\r\n                            }\r\n\r\n                            return draft.Message.ToString();\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var message = dialog.TopMessage;\r\n                if (message != null)\r\n                {\r\n                    return Convert(message, true);\r\n                }\r\n            }\r\n            else if (broadcast != null)\r\n            {\r\n                var message = broadcast.TopMessage;\r\n                if (message != null)\r\n                {\r\n                    return Convert(message, true);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                var encryptedDialog = value as TLEncryptedDialog;\r\n                if (encryptedDialog != null)\r\n                {\r\n                    var chatId = encryptedDialog.Peer.Id;\r\n                    var encryptedChat = IoC.Get<ICacheService>().GetEncryptedChat(chatId);\r\n                    var chatWaiting = encryptedChat as TLEncryptedChatWaiting;\r\n                    if (chatWaiting != null)\r\n                    {\r\n                        var participant = IoC.Get<ICacheService>().GetUser(chatWaiting.ParticipantId);\r\n                        return string.Format(AppResources.WaitingForUserToGetOnline, participant.FirstName);\r\n                    }\r\n\r\n                    var chatDiscarded = encryptedChat as TLEncryptedChatDiscarded;\r\n                    if (chatDiscarded != null)\r\n                    {\r\n                        return AppResources.SecretChatDiscarded;\r\n                    }\r\n\r\n                    var chatEmpty = encryptedChat as TLEncryptedChatEmpty;\r\n                    if (chatEmpty != null)\r\n                    {\r\n                        return AppResources.EmptySecretChat;\r\n                    }\r\n\r\n                    var chat = encryptedChat as TLEncryptedChat;\r\n                    if (chat != null)\r\n                    {\r\n                        if (TLUtils.IsDisplayedDecryptedMessage(encryptedDialog.TopMessage))\r\n                        {\r\n                            return Convert(encryptedDialog.TopMessage, true);\r\n                        }\r\n\r\n                        for (var i = 0; i < encryptedDialog.Messages.Count; i++)\r\n                        {\r\n                            if (TLUtils.IsDisplayedDecryptedMessage(encryptedDialog.Messages[i]))\r\n                            {\r\n                                return Convert(encryptedDialog.Messages[i], true);\r\n                            }\r\n                        }\r\n\r\n                        var currentUserId = IoC.Get<IStateService>().CurrentUserId;\r\n                        if (chat.AdminId.Value == currentUserId)\r\n                        {\r\n                            var cacheService = IoC.Get<ICacheService>();\r\n                            var user = cacheService.GetUser(chat.ParticipantId);\r\n                            if (user != null)\r\n                            {\r\n                                var userName = TLString.IsNullOrEmpty(user.FirstName) ? user.LastName : user.FirstName;\r\n                                return string.Format(AppResources.UserJoinedYourSecretChat, userName);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            return AppResources.YouJoinedTheSecretChat;\r\n                        }\r\n\r\n                        return AppResources.SecretChatCreated;\r\n                    }\r\n\r\n                    var chatRequested = encryptedChat as TLEncryptedChatRequested;\r\n                    if (chatRequested != null)\r\n                    {\r\n                        return AppResources.SecretChatRequested;\r\n                    }\r\n                }\r\n\r\n            }\r\n            \r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/MessageToFontFamilyConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Microsoft.Phone.Info;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class MessageToFontFamilyConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var message = value as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var emptyMedia = message.Media as TLMessageMediaEmpty;\r\n                if (emptyMedia != null)\r\n                {\r\n                    return Application.Current.Resources[\"PhoneFontFamilyNormal\"];\r\n                }\r\n\r\n                return Application.Current.Resources[\"PhoneFontFamilySemiBold\"];\r\n            }\r\n\r\n            return Application.Current.Resources[\"PhoneFontFamilyNormal\"];\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/MuteUntilToStringConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Utils;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class MuteUntilToStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is int))\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var muteUntil = (int)value;\r\n\r\n            // Enabled\r\n            if (muteUntil == 0)\r\n            {\r\n                return AppResources.Enabled;\r\n            }\r\n\r\n            // Disabled\r\n            if (muteUntil == int.MaxValue)\r\n            {\r\n                return AppResources.Disabled;\r\n            }\r\n\r\n            // Other\r\n            var clientDelta = IoC.Get<IMTProtoService>().ClientTicksDelta;\r\n            //var utc0SecsLong = muteUntil * 4294967296 - clientDelta;\r\n            var utc0SecsInt = muteUntil - clientDelta / 4294967296.0;\r\n\r\n            var muteUntilDateTime = Telegram.Api.Helpers.Utils.UnixTimestampToDateTime(utc0SecsInt);\r\n\r\n            var now = DateTime.Now;\r\n            var muteUntilTimeSpan = muteUntilDateTime - now;\r\n\r\n            // Enabled\r\n            if (muteUntilDateTime < now)\r\n            {\r\n                return AppResources.Enabled;\r\n            }\r\n\r\n            // Up to 1 hour\r\n            var totalMinutes = (int)Math.Ceiling(muteUntilTimeSpan.TotalMinutes);\r\n            if (totalMinutes < 60)\r\n            {\r\n                var minutes = Language.Declension(\r\n                    totalMinutes == 0 ? 1 : totalMinutes,\r\n                    AppResources.MinuteAccusative,\r\n                    null,\r\n                    AppResources.MinuteGenitiveSingular,\r\n                    AppResources.MinuteGenitivePlural,\r\n                    totalMinutes < 2\r\n                        ? string.Format(\"{1} {0}\", AppResources.MinuteNominativeSingular, 1).ToLowerInvariant()\r\n                        : string.Format(\"{1} {0}\", AppResources.MinuteNominativePlural, Math.Abs(totalMinutes))).ToLowerInvariant();\r\n\r\n                return string.Format(AppResources.UnmuteIn, minutes);\r\n            }\r\n\r\n            // Up to 1 day\r\n            var totalHours = (int)Math.Ceiling(muteUntilTimeSpan.TotalHours);\r\n            if (totalHours < 24)\r\n            {\r\n                var hours = Language.Declension(\r\n                    totalHours == 0 ? 1 : totalHours,\r\n                    AppResources.HourNominativeSingular,\r\n                    null,\r\n                    AppResources.HourGenitiveSingular,\r\n                    AppResources.HourGenitivePlural,\r\n                    totalHours < 2\r\n                        ? string.Format(\"{1} {0}\", AppResources.HourNominativeSingular, 1).ToLowerInvariant()\r\n                        : string.Format(\"{1} {0}\", AppResources.HourNominativePlural, Math.Abs(totalHours))).ToLowerInvariant();\r\n\r\n                return string.Format(AppResources.UnmuteIn, hours);\r\n            }\r\n\r\n            // Other\r\n            var totalDays = (int)Math.Ceiling(muteUntilTimeSpan.TotalDays);\r\n\r\n            if (totalDays >= 365)\r\n            {\r\n                return AppResources.Disabled;\r\n            }\r\n\r\n            var days = Language.Declension(\r\n                    totalDays == 0 ? 1 : totalDays,\r\n                    AppResources.DayNominativeSingular,\r\n                    null,\r\n                    AppResources.DayGenitiveSingular,\r\n                    AppResources.DayGenitivePlural,\r\n                    totalDays < 2\r\n                        ? string.Format(\"{1} {0}\", AppResources.DayNominativeSingular, 1).ToLowerInvariant()\r\n                        : string.Format(\"{1} {0}\", AppResources.DayNominativePlural, Math.Abs(totalDays))).ToLowerInvariant();\r\n\r\n            return string.Format(AppResources.UnmuteIn, days);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class MuteUntilToBoolConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is int))\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var muteUntil = (int)value;\r\n\r\n            // Enabled\r\n            if (muteUntil == 0)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            // Disabled\r\n            if (muteUntil == int.MaxValue)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            // Other\r\n            var clientDelta = IoC.Get<IMTProtoService>().ClientTicksDelta;\r\n            //var utc0SecsLong = muteUntil * 4294967296 - clientDelta;\r\n            var utc0SecsInt = muteUntil - clientDelta / 4294967296.0;\r\n\r\n            var muteUntilDateTime = Telegram.Api.Helpers.Utils.UnixTimestampToDateTime(utc0SecsInt);\r\n            var now = DateTime.Now;\r\n\r\n            // Enabled\r\n            if (muteUntilDateTime < now)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/NotServiceMessageToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class NotServiceMessageToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isServiceMessage = value is TLMessageService;\r\n\r\n            if (parameter != null\r\n                && string.Equals(parameter.ToString(), \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                isServiceMessage = !isServiceMessage;\r\n            }\r\n\r\n            return isServiceMessage ? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/NotifySettingsToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class DraftToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var dialog53 = value as TLDialog53;\r\n            if (dialog53 != null)\r\n            {\r\n                if (DialogToBriefInfoConverter.ShowDraft(dialog53))\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n            }\r\n\r\n            return Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class ShowFromVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var dialog = value as TLDialog;\r\n            if (dialog != null)\r\n            {\r\n                var dialog53 = value as TLDialog53;\r\n                if (dialog53 != null)\r\n                {\r\n                    if (DialogToBriefInfoConverter.ShowDraft(dialog53))\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n                }\r\n\r\n                var topMessage = dialog.TopMessage;\r\n                if (topMessage != null)\r\n                {\r\n                    return topMessage.ShowFrom ? Visibility.Visible : Visibility.Collapsed;\r\n                }\r\n            }\r\n\r\n            var encryptedDialog = value as TLEncryptedDialog;\r\n            if (encryptedDialog != null)\r\n            {\r\n                var topMessage = encryptedDialog.TopMessage;\r\n                if (topMessage != null)\r\n                {\r\n                    return topMessage.ShowFrom ? Visibility.Visible : Visibility.Collapsed;\r\n                }\r\n            }\r\n\r\n            return Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class DialogToMessageStatusVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var dialog = value as TLDialog;\r\n            if (dialog != null)\r\n            {\r\n                var dialog53 = value as TLDialog53;\r\n                if (dialog53 != null)\r\n                {\r\n                    if (DialogToBriefInfoConverter.ShowDraft(dialog53))\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n                }\r\n\r\n                var dialog71 = value as TLDialog71;\r\n                if (dialog71 != null)\r\n                {\r\n                    if (dialog71.IsPromo)\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n                }\r\n\r\n                var topMessage = dialog.TopMessage as TLMessageCommon;\r\n                if (topMessage != null)\r\n                {\r\n                    if (!topMessage.Out.Value)\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n\r\n                    var serviceMessage = topMessage as TLMessageService;\r\n                    if (serviceMessage != null && serviceMessage.Action is TLMessageActionClearHistory)\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var encryptedDialog = value as TLEncryptedDialog;\r\n            if (encryptedDialog != null)\r\n            {\r\n                var topMessageCommon = encryptedDialog.TopMessage;\r\n                if (topMessageCommon != null && !topMessageCommon.Out.Value)\r\n                {\r\n                    return Visibility.Collapsed;\r\n                }\r\n            }\r\n\r\n            return Visibility.Visible;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/OverlayAccentBrushConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class OverlayAccentBrushConverter : DependencyObject, IValueConverter\r\n    {\r\n        public static readonly DependencyProperty AccentColorProperty =\r\n            DependencyProperty.Register(\"AccentColor\", typeof (Color), typeof (OverlayAccentBrushConverter), new PropertyMetadata(default(Color)));\r\n\r\n        public Color AccentColor\r\n        {\r\n            get { return (Color) GetValue(AccentColorProperty); }\r\n            set { SetValue(AccentColorProperty, value); }\r\n        }\r\n\r\n        private Color? _prevColor;\r\n\r\n        private Brush _prevBrush;\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (_prevColor.HasValue && _prevColor.Value != AccentColor)\r\n            {\r\n                _prevBrush = null;\r\n            }\r\n\r\n            if (_prevBrush == null)\r\n            {\r\n                var prevMixColor = Utils.ColorUtils.MergeColors(AccentColor, Color.FromArgb(100, 0, 0, 0));\r\n                _prevBrush = new SolidColorBrush(prevMixColor);\r\n                _prevColor = AccentColor;\r\n            }\r\n\r\n            return _prevBrush;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/PhoneNumberConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n//#if WP8\r\n//using PhoneNumbers;\r\n//#endif\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Utils;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class SimplePhoneNumberConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var phone = value as TLString;\r\n            if (phone == null) return value;\r\n\r\n            var phoneString = phone.ToString();\r\n\r\n            return phoneString.StartsWith(\"+\") ? phoneString : \"+\" + phoneString ;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class PhoneNumberConverter : IValueConverter\r\n    {\r\n        public static string Convert(TLString phone)\r\n        {\r\n//#if WP8\r\n//            var phoneUtil = PhoneNumberUtil.GetInstance();\r\n//            try\r\n//            {\r\n//                return phoneUtil.Format(phoneUtil.Parse(\"+\" + phone.Value, \"\"), PhoneNumberFormat.INTERNATIONAL).Replace('-', ' ');\r\n//            }\r\n//            catch (Exception e)\r\n//            {\r\n//                return \"+\" + phone.Value;\r\n//            }\r\n\r\n//#endif\r\n            return \"+\" + phone.Value;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var phone = value as TLString;\r\n            if (phone == null) return value;\r\n\r\n            return Convert(phone);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class PhoneCallToTitleConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var messageService = value as TLMessageService;\r\n            if (messageService != null)\r\n            {\r\n                var actionPhoneCall = messageService.Action as TLMessageActionPhoneCall;\r\n                if (actionPhoneCall != null)\r\n                {\r\n                    var reason = actionPhoneCall.Reason;\r\n                    var duration = actionPhoneCall.Duration;\r\n                    if (duration != null)\r\n                    {\r\n                        return messageService.Out.Value\r\n                            ? AppResources.OutgoingCall\r\n                            : AppResources.IncomingCall;\r\n                    }\r\n\r\n                    var missed = reason as TLPhoneCallDiscardReasonMissed;\r\n                    if (missed != null)\r\n                    {\r\n                        if (messageService.Out.Value)\r\n                        {\r\n                            return AppResources.CanceledCall;\r\n                        }\r\n                        else\r\n                        {\r\n                            return AppResources.MissedCall;\r\n                        }\r\n                    }\r\n\r\n                    var busy = reason as TLPhoneCallDiscardReasonBusy;\r\n                    if (busy != null)\r\n                    {\r\n                        if (messageService.Out.Value)\r\n                        {\r\n                            return AppResources.OutgoingCall;\r\n                        }\r\n                        else\r\n                        {\r\n                            return AppResources.DeclinedCall;\r\n                        }\r\n                    }\r\n\r\n                    return messageService.Out.Value\r\n                        ? AppResources.OutgoingCall\r\n                        : AppResources.IncomingCall;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class PhoneCallToSubtitleConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var messageService = value as TLMessageService;\r\n            if (messageService != null)\r\n            {\r\n                var actionPhoneCall = messageService.Action as TLMessageActionPhoneCall;\r\n                if (actionPhoneCall != null)\r\n                {\r\n                    var duration = actionPhoneCall.Duration;\r\n                    var messageDateTimeConverter = (TLIntToDateTimeConverter)Application.Current.Resources[\"MessageDateTimeConverter\"];\r\n                    var timeString = messageDateTimeConverter.Convert(messageService.Date, null, null, null);\r\n                    var durationString = string.Empty;\r\n                    if (duration != null)\r\n                    {\r\n                        var durationTimeSpan = TimeSpan.FromSeconds(duration.Value);\r\n                        if (durationTimeSpan.TotalSeconds > 60.0)\r\n                        {\r\n                            durationString =\r\n                                Language.Declension(\r\n                                    (int)durationTimeSpan.TotalMinutes,\r\n                                    AppResources.MinuteNominativeSingular,\r\n                                    AppResources.MinuteNominativePlural,\r\n                                    AppResources.MinuteGenitiveSingular,\r\n                                    AppResources.MinuteGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                        }\r\n                        else\r\n                        {\r\n                            durationString =\r\n                                Language.Declension(\r\n                                    durationTimeSpan.Seconds,\r\n                                    AppResources.SecondNominativeSingular,\r\n                                    AppResources.SecondNominativePlural,\r\n                                    AppResources.SecondGenitiveSingular,\r\n                                    AppResources.SecondGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                        }\r\n                    }\r\n\r\n                    return timeString + (!string.IsNullOrEmpty(durationString) ? \", \" + durationString : string.Empty);\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/PhotoBytesToImageConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Imaging;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class PhotoBytesToImageConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var buffer = value as byte[];\r\n            if (buffer == null) return null;\r\n\r\n            BitmapImage imageSource;\r\n\r\n            try\r\n            {\r\n                using (var stream = new MemoryStream(buffer))\r\n                {\r\n                    stream.Seek(0, SeekOrigin.Begin);\r\n                    var b = new BitmapImage();\r\n                    b.SetSource(stream);\r\n                    imageSource = b;\r\n                }\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return imageSource;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/PhotoToDimensionConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows.Data;\r\nusing Telegram.Api;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class InvoiceToDimensionConverter : IValueConverter\r\n    {\r\n        public static double GetWebDocumentDimension(TLWebDocumentBase webDocument, bool isWidth)\r\n        {\r\n            const double width = Constants.DefaultMessageContentWidth;\r\n            if (isWidth)\r\n            {\r\n                return width;\r\n            }\r\n\r\n            var attributes = webDocument as IAttributes;\r\n            if (attributes == null)\r\n            {\r\n                return double.NaN;\r\n            }\r\n\r\n            return StickerToDimensionConverter.GetAttributesDimension(attributes, isWidth, width);\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isWidth = (string.Equals((string)parameter, \"Width\", StringComparison.OrdinalIgnoreCase));\r\n\r\n            var mediaInvoice = value as TLMessageMediaInvoice;\r\n            if (mediaInvoice == null) return null;\r\n\r\n            var webDocument = mediaInvoice.Photo;\r\n            if (webDocument == null) return null;\r\n\r\n            return GetWebDocumentDimension(webDocument, isWidth);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class GameToDimensionConverter : IValueConverter\r\n    {\r\n        public static double GetGameDimension(TLGame game, bool isWidth)\r\n        {\r\n            const double width = 311.0 - 12.0;\r\n            if (isWidth)\r\n            {\r\n                return width;\r\n            }\r\n\r\n            var photo = game.Photo as TLPhoto;\r\n            if (photo == null)\r\n            {\r\n                return double.NaN;\r\n            }\r\n\r\n            TLPhotoSize size = null;\r\n            var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n            foreach (var photoSize in sizes)\r\n            {\r\n                if (size == null\r\n                    || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                {\r\n                    size = photoSize;\r\n                }\r\n            }\r\n\r\n            if (size != null)\r\n            {\r\n                return width / size.W.Value * size.H.Value; //* 0.75;\r\n            }\r\n\r\n            return double.NaN;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isWidth = (string.Equals((string) parameter, \"Width\", StringComparison.OrdinalIgnoreCase));\r\n\r\n            var mediaGame = value as TLMessageMediaGame;\r\n            if (mediaGame == null) return null;\r\n\r\n            var game = mediaGame.Game;\r\n            if (game == null) return null;\r\n\r\n            return GetGameDimension(game, isWidth);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class WebPageToDimensionConverter : IValueConverter\r\n    {\r\n        public static double GetWebPageDimension(TLWebPage webPage, bool isWidth)\r\n        {\r\n            const double width = 311.0 - 12.0;\r\n            if (isWidth)\r\n            {\r\n                return width;\r\n            }\r\n\r\n            var photo = webPage.Photo as TLPhoto;\r\n            if (photo == null)\r\n            {\r\n                return double.NaN;\r\n            }\r\n\r\n            TLPhotoSize size = null;\r\n            var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n            foreach (var photoSize in sizes)\r\n            {\r\n                if (size == null\r\n                    || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                {\r\n                    size = photoSize;\r\n                }\r\n            }\r\n\r\n            if (size != null)\r\n            {\r\n                return width / size.W.Value * size.H.Value; //* 0.75;\r\n            }\r\n\r\n            return double.NaN;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isWidth = (string.Equals((string) parameter, \"Width\", StringComparison.OrdinalIgnoreCase));\r\n\r\n            var mediaWebPage = value as TLMessageMediaWebPage;\r\n            if (mediaWebPage == null) return null;\r\n\r\n            var webPage = mediaWebPage.WebPage as TLWebPage;\r\n            if (webPage == null) return null;\r\n\r\n            return GetWebPageDimension(webPage, isWidth);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class DocumentToDimensionConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            const double width = Constants.DefaultMessageContentWidth - 12.0;\r\n            if (string.Equals((string)parameter, \"Width\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return width;\r\n            }\r\n\r\n            var media = value as TLMessageMediaDocument;\r\n            if (media == null)\r\n            {\r\n                return double.NaN;\r\n            }\r\n\r\n            var document = media.Document as TLDocument;\r\n            if (document == null)\r\n            {\r\n                return double.NaN;\r\n            }\r\n\r\n            if (string.Equals(document.MimeType.ToString(), \"image/webp\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return double.NaN;\r\n            }\r\n\r\n            var size = document.Thumb as TLPhotoSize;\r\n            if (size != null)\r\n            {\r\n                return width / size.W.Value * size.H.Value;\r\n            }\r\n\r\n            var cachedSize = document.Thumb as TLPhotoCachedSize;\r\n            if (cachedSize != null)\r\n            {\r\n                return width / cachedSize.W.Value * cachedSize.H.Value;\r\n            }\r\n\r\n            return double.NaN;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class VideoToDimensionConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            const double width = Constants.DefaultMessageContentWidth;\r\n            if (string.Equals((string)parameter, \"Width\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return width;\r\n            }\r\n\r\n            var mediaDocument = value as TLMessageMediaDocument45;\r\n            if (mediaDocument != null)\r\n            {\r\n                var video = mediaDocument.Video as TLDocument22;\r\n                if (video == null)\r\n                {\r\n                    return double.NaN;\r\n                }\r\n\r\n                var size = video.Thumb as TLPhotoSize;\r\n                if (size != null)\r\n                {\r\n                    return width / size.W.Value * size.H.Value;\r\n                }\r\n\r\n                var cachedSize = video.Thumb as TLPhotoCachedSize;\r\n                if (cachedSize != null)\r\n                {\r\n                    return width / cachedSize.W.Value * cachedSize.H.Value;\r\n                }\r\n            }\r\n\r\n            var media = value as TLMessageMediaVideo;\r\n            if (media != null)\r\n            {\r\n                var video = media.Video as TLVideo;\r\n                if (video == null)\r\n                {\r\n                    return double.NaN;\r\n                }\r\n\r\n                var size = video.Thumb as TLPhotoSize;\r\n                if (size != null)\r\n                {\r\n                    return width / size.W.Value * size.H.Value;\r\n                }\r\n\r\n                var cachedSize = video.Thumb as TLPhotoCachedSize;\r\n                if (cachedSize != null)\r\n                {\r\n                    return width / cachedSize.W.Value * cachedSize.H.Value;\r\n                }\r\n            }\r\n\r\n            return double.NaN;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class PhotoToDimensionConverter : IValueConverter\r\n    {\r\n        private double _maxDimension = Constants.DefaultMessageContentWidth;\r\n\r\n        public double MaxDimension\r\n        {\r\n            get { return _maxDimension; }\r\n            set { _maxDimension = value; }\r\n        }\r\n\r\n        public bool IsScaledVerticalPhoto(double minRatio, TLInt heigth, TLInt width)\r\n        {\r\n            var ratio = (double)heigth.Value / width.Value;\r\n\r\n            return ratio > minRatio;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var minVerticalRatioToScale = 1.2;\r\n            var scale = 1.2; // must be less than minVerticalRatioToScale to avoid large square photos\r\n\r\n            if (string.Equals((string)parameter, \"Width\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                var decryptedMediaPhoto = value as TLDecryptedMessageMediaPhoto;\r\n                if (decryptedMediaPhoto != null)\r\n                {\r\n                    if (decryptedMediaPhoto.H.Value > decryptedMediaPhoto.W.Value)\r\n                    {\r\n                        if (IsScaledVerticalPhoto(minVerticalRatioToScale, decryptedMediaPhoto.H, decryptedMediaPhoto.W))\r\n                        {\r\n                            return scale * MaxDimension / decryptedMediaPhoto.H.Value * decryptedMediaPhoto.W.Value;\r\n                        }\r\n\r\n                        return MaxDimension / decryptedMediaPhoto.H.Value * decryptedMediaPhoto.W.Value;\r\n                    }\r\n\r\n                    return MaxDimension;\r\n                }\r\n\r\n                var mediaPhoto = value as TLMessageMediaPhoto;\r\n                if (mediaPhoto != null)\r\n                {\r\n                    value = mediaPhoto.Photo;                  \r\n                }\r\n\r\n                var photo = value as TLPhoto;\r\n                if (photo != null)\r\n                {\r\n                    IPhotoSize size = null;\r\n                    var sizes = photo.Sizes.OfType<IPhotoSize>();\r\n                    foreach (var photoSize in sizes)\r\n                    {\r\n                        if (size == null\r\n                            || Math.Abs(MaxDimension - size.H.Value) > Math.Abs(MaxDimension - photoSize.H.Value))\r\n                        {\r\n                            size = photoSize;\r\n                        }\r\n                    }\r\n\r\n                    if (size != null)\r\n                    {\r\n                        if (size.H.Value > size.W.Value)\r\n                        {\r\n                            if (IsScaledVerticalPhoto(minVerticalRatioToScale, size.H, size.W))\r\n                            {\r\n                                return scale * MaxDimension / size.H.Value * size.W.Value;\r\n                            }\r\n\r\n                            return MaxDimension / size.H.Value * size.W.Value;\r\n                        }\r\n\r\n                        return MaxDimension;\r\n                    }\r\n                }\r\n\r\n                var mediaDocument = value as TLMessageMediaDocument;\r\n                if (mediaDocument != null)\r\n                {\r\n                    return new VideoToDimensionConverter().Convert(value, targetType, parameter, culture);\r\n                }\r\n            }\r\n\r\n            {\r\n                var decryptedMediaPhoto = value as TLDecryptedMessageMediaPhoto;\r\n                if (decryptedMediaPhoto != null)\r\n                {\r\n                    if (decryptedMediaPhoto.H.Value > decryptedMediaPhoto.W.Value)\r\n                    {\r\n                        if (IsScaledVerticalPhoto(minVerticalRatioToScale, decryptedMediaPhoto.H, decryptedMediaPhoto.W))\r\n                        {\r\n                            return scale * MaxDimension;\r\n                        }\r\n\r\n                        return MaxDimension;\r\n                    }\r\n\r\n                    return MaxDimension / decryptedMediaPhoto.W.Value * decryptedMediaPhoto.H.Value;\r\n                }\r\n\r\n                var mediaPhoto = value as TLMessageMediaPhoto;\r\n                if (mediaPhoto != null)\r\n                {\r\n                    value = mediaPhoto.Photo;\r\n                }\r\n\r\n                var photo = value as TLPhoto;\r\n                if (photo != null)\r\n                {\r\n                    IPhotoSize size = null;\r\n                    var sizes = photo.Sizes.OfType<IPhotoSize>();\r\n                    foreach (var photoSize in sizes)\r\n                    {\r\n                        if (size == null\r\n                            || Math.Abs(MaxDimension - size.W.Value) > Math.Abs(MaxDimension - photoSize.W.Value))\r\n                        {\r\n                            size = photoSize;\r\n                        }\r\n                    }\r\n\r\n                    if (size != null)\r\n                    {\r\n                        if (size.H.Value > size.W.Value)\r\n                        {\r\n                            if (IsScaledVerticalPhoto(minVerticalRatioToScale, size.H, size.W))\r\n                            {\r\n                                return scale * MaxDimension;\r\n                            }\r\n\r\n                            return MaxDimension;\r\n                        }\r\n\r\n                        return MaxDimension / size.W.Value * size.H.Value;\r\n                    }\r\n                }\r\n\r\n                var mediaDocument = value as TLMessageMediaDocument;\r\n                if (mediaDocument != null)\r\n                {\r\n                    return new VideoToDimensionConverter().Convert(value, targetType, parameter, culture);\r\n                }\r\n            }\r\n\r\n            return double.NaN;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class StickerPreviewToDimensionConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            const double maxStickerDimension = 93.0;\r\n            var isWidth = string.Equals((string)parameter, \"Width\", StringComparison.OrdinalIgnoreCase);\r\n\r\n            var attributes = value as IAttributes;\r\n            if (attributes != null)\r\n            {\r\n                return StickerToDimensionConverter.GetAttributesDimension(attributes, isWidth, maxStickerDimension);\r\n            }\r\n\r\n            return isWidth ? double.NaN : maxStickerDimension;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class StickerToDimensionConverter : IValueConverter\r\n    {\r\n        public static double GetAttributesDimension(IAttributes sticker, bool isWidth, double maxStickerDimension)\r\n        {\r\n            TLDocumentAttributeImageSize imageSizeAttribute = null;\r\n            for (var i = 0; i < sticker.Attributes.Count; i++)\r\n            {\r\n                imageSizeAttribute = sticker.Attributes[i] as TLDocumentAttributeImageSize;\r\n                if (imageSizeAttribute != null)\r\n                {\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (imageSizeAttribute != null)\r\n            {\r\n                var width = imageSizeAttribute.W.Value;\r\n                var height = imageSizeAttribute.H.Value;\r\n\r\n                var maxDimension = Math.Max(width, height);\r\n                if (maxDimension > maxStickerDimension)\r\n                {\r\n                    var scaleFactor = maxStickerDimension / maxDimension;\r\n\r\n                    return isWidth ? scaleFactor * width : scaleFactor * height;\r\n                }\r\n\r\n                return isWidth ? width : height;\r\n            }\r\n\r\n            return isWidth ? double.NaN : maxStickerDimension;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isWidth = string.Equals((string) parameter, \"Width\", StringComparison.OrdinalIgnoreCase);\r\n            \r\n            var attributes = value as IAttributes;\r\n            if (attributes != null)\r\n            {\r\n                return GetAttributesDimension(attributes, isWidth, Constants.MaxStickerDimension);\r\n            }\r\n\r\n            return isWidth ? double.NaN : Constants.MaxStickerDimension;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class GifToDimensionConverter : IValueConverter\r\n    {\r\n        public static double GetGifDimension(double maxGifDimension, IPhotoSize thumb, IAttributes attributes, bool isWidth)\r\n        {\r\n            TLDocumentAttributeVideo videoAttribute = null;\r\n            if (attributes != null)\r\n            {\r\n                for (var i = 0; i < attributes.Attributes.Count; i++)\r\n                {\r\n                    videoAttribute = attributes.Attributes[i] as TLDocumentAttributeVideo;\r\n                    if (videoAttribute != null)\r\n                    {\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (videoAttribute != null)\r\n            {\r\n                var width = videoAttribute.W.Value;\r\n                var height = videoAttribute.H.Value;\r\n\r\n                var maxDimension = width;\r\n                if (maxDimension > 0)\r\n                {\r\n                    var scaleFactor = maxGifDimension / maxDimension;\r\n\r\n                    return isWidth ? scaleFactor * width : scaleFactor * height;\r\n                }\r\n            }\r\n\r\n            if (thumb != null)\r\n            {\r\n                var width = thumb.W.Value;\r\n                var height = thumb.H.Value;\r\n\r\n                var maxDimension = width;\r\n                if (maxDimension > 0)\r\n                {\r\n                    var scaleFactor = maxGifDimension / maxDimension;\r\n\r\n                    return isWidth ? scaleFactor * width : scaleFactor * height;\r\n                }\r\n            }\r\n\r\n            return maxGifDimension;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isWidth = string.Equals((string)parameter, \"Width\", StringComparison.OrdinalIgnoreCase);\r\n\r\n            var attributes = value as IAttributes;\r\n            var document = value as TLDocument;\r\n            var thumb = document != null ? document.Thumb as IPhotoSize : null;\r\n            return GetGifDimension(Constants.MaxGifDimension, thumb, attributes, isWidth);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class WebPageGifToDimensionConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isWidth = string.Equals((string)parameter, \"Width\", StringComparison.OrdinalIgnoreCase);\r\n\r\n            var attributes = value as IAttributes;\r\n            var document = value as TLDocument;\r\n            var thumb = document != null ? document.Thumb as IPhotoSize : null;\r\n            return GifToDimensionConverter.GetGifDimension(Constants.MaxGifDimension - 12.0 - 3.0 - 12.0, thumb, attributes, isWidth);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class InlineBotResultToWidthConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var result = value as TLBotInlineResult;\r\n            if (result != null)\r\n            {\r\n                if (result.W != null && result.H != null)\r\n                {\r\n                    var w = (double) result.W.Value;\r\n                    var h = (double) result.H.Value;\r\n                    if (w > 0.0 && h > 0.0)\r\n                    {\r\n                        return w / h * Constants.DeafultInlineBotResultHeight;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var mediaResult = value as TLBotInlineMediaResult;\r\n            if (mediaResult != null)\r\n            {\r\n                var photo = mediaResult.Photo as TLPhoto;\r\n                if (photo != null)\r\n                {\r\n                    var photoSize = photo.Sizes.FirstOrDefault(x => x is IPhotoSize) as IPhotoSize;\r\n                    if (photoSize != null)\r\n                    {\r\n                        var w = (double)photoSize.W.Value;\r\n                        var h = (double)photoSize.H.Value;\r\n                        if (w > 0.0 && h > 0.0)\r\n                        {\r\n                            return w / h * Constants.DeafultInlineBotResultHeight;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var document = mediaResult.Document as TLDocument22;\r\n                if (document != null)\r\n                {\r\n                    var videoAttribute = document.Attributes.FirstOrDefault(x => x is TLDocumentAttributeVideo) as TLDocumentAttributeVideo;\r\n                    if (videoAttribute != null)\r\n                    {\r\n                        var w = (double)videoAttribute.W.Value;\r\n                        var h = (double)videoAttribute.H.Value;\r\n                        if (w > 0.0 && h > 0.0)\r\n                        {\r\n                            return w / h * Constants.DeafultInlineBotResultHeight;\r\n                        }\r\n                    }\r\n\r\n                    var imageSizeAttribute = document.Attributes.FirstOrDefault(x => x is TLDocumentAttributeImageSize) as TLDocumentAttributeImageSize;\r\n                    if (imageSizeAttribute != null)\r\n                    {\r\n                        var w = (double)imageSizeAttribute.W.Value;\r\n                        var h = (double)imageSizeAttribute.H.Value;\r\n                        if (w > 0.0 && h > 0.0)\r\n                        {\r\n                            return w / h * Constants.DeafultInlineBotResultHeight;\r\n                        }\r\n                    }\r\n\r\n                    var thumb = document.Thumb as IPhotoSize;\r\n                    if (thumb != null)\r\n                    {\r\n                        var w = (double)thumb.W.Value;\r\n                        var h = (double)thumb.H.Value;\r\n                        if (w > 0.0 && h > 0.0)\r\n                        {\r\n                            return w / h * Constants.DeafultInlineBotResultHeight;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return double.NaN;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/PhotoToThumbConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Imaging;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class PhotoToThumbConverter : IValueConverter\r\n    {\r\n        public bool Secret { get; set; }\r\n\r\n        private readonly TelegramClient_WebP.ImageUtils _imageUtils = new TelegramClient_WebP.ImageUtils();\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isBlurEnabled = parameter == null || !string.Equals(parameter.ToString(), \"noblur\", StringComparison.OrdinalIgnoreCase);\r\n\r\n            var options = BitmapCreateOptions.DelayCreation | BitmapCreateOptions.BackgroundCreation;\r\n\r\n            var decryptedMediaPhoto = value as TLDecryptedMessageThumbMediaBase;\r\n            if (decryptedMediaPhoto != null)\r\n            {\r\n                var buffer = decryptedMediaPhoto.Thumb.Data;\r\n\r\n                if (buffer.Length > 0\r\n                    && decryptedMediaPhoto.ThumbW.Value > 0\r\n                    && decryptedMediaPhoto.ThumbH.Value > 0)\r\n                {\r\n                    if (!isBlurEnabled)\r\n                    {\r\n                        return ImageUtils.CreateImage(buffer, options);\r\n                    }\r\n                    else\r\n                    {\r\n                        try\r\n                        {\r\n                            var memoryStream = new MemoryStream(buffer);\r\n                            var bitmap = PictureDecoder.DecodeJpeg(memoryStream);\r\n\r\n                            BlurBitmap(bitmap, Secret);\r\n\r\n                            var blurredStream = new MemoryStream();\r\n                            bitmap.SaveJpeg(blurredStream, decryptedMediaPhoto.ThumbW.Value, decryptedMediaPhoto.ThumbH.Value, 0, 100);\r\n\r\n                            return ImageUtils.CreateImage(blurredStream, options);\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            \r\n                        }\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n\r\n            var mediaDocument = value as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                var document = mediaDocument.Document as TLDocument;\r\n                if (document != null)\r\n                {\r\n                    var size = document.Thumb as TLPhotoSize;\r\n                    if (size != null)\r\n                    {\r\n                        if (!string.IsNullOrEmpty(size.TempUrl))\r\n                        {\r\n                            return size.TempUrl;\r\n                        }\r\n\r\n                        var location = size.Location as TLFileLocation;\r\n                        if (location != null)\r\n                        {\r\n                            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                                location.VolumeId,\r\n                                location.LocalId,\r\n                                location.Secret);\r\n\r\n                            if (!isBlurEnabled)\r\n                            {\r\n                                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store.FileExists(fileName))\r\n                                    {\r\n                                        try\r\n                                        {\r\n                                            using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                            {\r\n                                                return ImageUtils.CreateImage(stream, options);\r\n                                            }\r\n                                        }\r\n                                        catch (Exception ex)\r\n                                        {\r\n\r\n                                        }\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        var fileManager = IoC.Get<IFileManager>();\r\n                                        fileManager.DownloadFile(location, document, size.Size,\r\n                                            item =>\r\n                                            {\r\n                                                mediaDocument.NotifyOfPropertyChange(() => mediaDocument.ThumbSelf);\r\n                                            });\r\n                                    }\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                BitmapImage preview;\r\n                                if (TryGetDocumentPreview(document.Id, out preview, options))\r\n                                {\r\n                                    return preview;\r\n                                }\r\n\r\n                                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store.FileExists(fileName))\r\n                                    {\r\n                                        try\r\n                                        {\r\n                                            using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                            {\r\n                                                var bitmap = PictureDecoder.DecodeJpeg(stream);\r\n\r\n                                                BlurBitmap(bitmap, Secret);\r\n\r\n                                                var blurredStream = new MemoryStream();\r\n                                                bitmap.SaveJpeg(blurredStream, size.W.Value, size.H.Value, 0, 100);\r\n\r\n                                                return bitmap;\r\n                                            }\r\n                                        }\r\n                                        catch (Exception ex)\r\n                                        {\r\n\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                var fileManager = IoC.Get<IFileManager>();\r\n                                fileManager.DownloadFile(location, document, size.Size,\r\n                                    item =>\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() =>\r\n                                        {\r\n                                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                            {\r\n                                                if (store.FileExists(fileName))\r\n                                                {\r\n                                                    try\r\n                                                    {\r\n                                                        using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                                        {\r\n                                                            var bitmap = PictureDecoder.DecodeJpeg(stream);\r\n\r\n                                                            BlurBitmap(bitmap, Secret);\r\n\r\n                                                            var blurredStream = new MemoryStream();\r\n                                                            bitmap.SaveJpeg(blurredStream, size.W.Value, size.H.Value, 0, 100);\r\n\r\n                                                            var previewfileName = string.Format(\"preview_document{0}.jpg\", document.Id);\r\n                                                            SaveFile(previewfileName, blurredStream);\r\n\r\n                                                            mediaDocument.NotifyOfPropertyChange(() => mediaDocument.ThumbSelf);\r\n                                                        }\r\n                                                    }\r\n                                                    catch (Exception ex)\r\n                                                    {\r\n\r\n                                                    }\r\n                                                }\r\n                                            }\r\n                                        });\r\n                                    });\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var cachedSize = document.Thumb as TLPhotoCachedSize;\r\n                    if (cachedSize != null)\r\n                    {\r\n                        if (!string.IsNullOrEmpty(cachedSize.TempUrl))\r\n                        {\r\n                            return cachedSize.TempUrl;\r\n                        }\r\n\r\n                        var buffer = cachedSize.Bytes.Data;\r\n\r\n                        if (buffer != null && buffer.Length > 0)\r\n                        {\r\n                            if (!isBlurEnabled)\r\n                            {\r\n                                return ImageUtils.CreateImage(buffer, options);\r\n                            }\r\n                            else\r\n                            {\r\n                                BitmapImage preview;\r\n                                if (TryGetDocumentPreview(document.Id, out preview, options))\r\n                                {\r\n                                    return preview;\r\n                                }\r\n\r\n                                try\r\n                                {\r\n                                    var bitmap = PictureDecoder.DecodeJpeg(new MemoryStream(buffer));\r\n\r\n                                    BlurBitmap(bitmap, Secret);\r\n\r\n                                    var blurredStream = new MemoryStream();\r\n                                    bitmap.SaveJpeg(blurredStream, cachedSize.W.Value, cachedSize.H.Value, 0, 100);\r\n\r\n                                    var fileName = string.Format(\"preview_document{0}.jpg\", document.Id);\r\n\r\n                                    Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => SaveFile(fileName, blurredStream));\r\n\r\n                                    return ImageUtils.CreateImage(blurredStream, options);\r\n                                }\r\n                                catch (Exception ex)\r\n                                {\r\n\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        return null;\r\n                    }\r\n\r\n                    return null;\r\n                }\r\n            }\r\n\r\n            var mediaPhoto = value as TLMessageMediaPhoto;\r\n            if (mediaPhoto != null)\r\n            {\r\n                var photo = mediaPhoto.Photo as TLPhoto;\r\n                if (photo != null)\r\n                {\r\n                    var size = photo.Sizes.FirstOrDefault(x => TLString.Equals(x.Type, new TLString(\"s\"), StringComparison.OrdinalIgnoreCase)) as TLPhotoSize;\r\n                    if (size != null)\r\n                    {\r\n                        if (!string.IsNullOrEmpty(size.TempUrl))\r\n                        {\r\n                            return size.TempUrl;\r\n                        }\r\n\r\n                        var location = size.Location as TLFileLocation;\r\n                        if (location != null)\r\n                        {\r\n                            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                                location.VolumeId,\r\n                                location.LocalId,\r\n                                location.Secret);\r\n\r\n                            if (!isBlurEnabled)\r\n                            {\r\n                                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store.FileExists(fileName))\r\n                                    {\r\n                                        try\r\n                                        {\r\n                                            using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                            {\r\n                                                return ImageUtils.CreateImage(stream, options);\r\n                                            }\r\n                                        }\r\n                                        catch (Exception ex)\r\n                                        {\r\n\r\n                                        }\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        var fileManager = IoC.Get<IFileManager>();\r\n                                        fileManager.DownloadFile(location, photo, size.Size,\r\n                                            item =>\r\n                                            {\r\n                                                mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.ThumbSelf);\r\n                                            });\r\n                                    }\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                BitmapImage preview;\r\n                                if (TryGetPhotoPreview(photo.Id, out preview, options))\r\n                                {\r\n                                    return preview;\r\n                                }\r\n\r\n                                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store.FileExists(fileName))\r\n                                    {\r\n                                        try\r\n                                        {\r\n                                            using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                            {\r\n                                                var bitmap = PictureDecoder.DecodeJpeg(stream);\r\n\r\n                                                BlurBitmap(bitmap, Secret);\r\n\r\n                                                var blurredStream = new MemoryStream();\r\n                                                bitmap.SaveJpeg(blurredStream, size.W.Value, size.H.Value, 0, 100);\r\n\r\n                                                return bitmap;\r\n                                            }\r\n                                        }\r\n                                        catch (Exception ex)\r\n                                        {\r\n\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                if (location.DCId.Value == 0) return null;\r\n\r\n                                var fileManager = IoC.Get<IFileManager>();\r\n                                fileManager.DownloadFile(location, photo, size.Size,\r\n                                    item =>\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() =>\r\n                                        {\r\n                                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                            {\r\n                                                if (store.FileExists(fileName))\r\n                                                {\r\n                                                    try\r\n                                                    {\r\n                                                        using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                                        {\r\n                                                            var bitmap = PictureDecoder.DecodeJpeg(stream);\r\n\r\n                                                            BlurBitmap(bitmap, Secret);\r\n\r\n                                                            var blurredStream = new MemoryStream();\r\n                                                            bitmap.SaveJpeg(blurredStream, size.W.Value, size.H.Value, 0, 100);\r\n\r\n                                                            var previewfileName = string.Format(\"preview{0}.jpg\", photo.Id);\r\n                                                            SaveFile(previewfileName, blurredStream);\r\n\r\n                                                            mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.ThumbSelf);\r\n                                                        }\r\n                                                    }\r\n                                                    catch (Exception ex)\r\n                                                    {\r\n\r\n                                                    }\r\n                                                }\r\n                                            }\r\n                                        });\r\n                                    });\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var cachedSize = (TLPhotoCachedSize)photo.Sizes.FirstOrDefault(x => x is TLPhotoCachedSize);\r\n                    if (cachedSize != null)\r\n                    {\r\n                        if (!string.IsNullOrEmpty(cachedSize.TempUrl))\r\n                        {\r\n                            return cachedSize.TempUrl;\r\n                        }\r\n\r\n                        var buffer = cachedSize.Bytes.Data;\r\n\r\n                        if (buffer != null && buffer.Length > 0)\r\n                        {\r\n                            if (!isBlurEnabled)\r\n                            {\r\n                                return ImageUtils.CreateImage(buffer, options);\r\n                            }\r\n                            else\r\n                            {\r\n                                BitmapImage preview;\r\n                                if (TryGetPhotoPreview(photo.Id, out preview, options))\r\n                                {\r\n                                    return preview;\r\n                                }\r\n\r\n                                try\r\n                                {\r\n                                    var bitmap = PictureDecoder.DecodeJpeg(new MemoryStream(buffer));\r\n\r\n                                    BlurBitmap(bitmap, Secret);\r\n\r\n                                    var blurredStream = new MemoryStream();\r\n                                    bitmap.SaveJpeg(blurredStream, cachedSize.W.Value, cachedSize.H.Value, 0, 100);\r\n\r\n                                    var fileName = string.Format(\"preview{0}.jpg\", photo.Id);\r\n\r\n                                    Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => SaveFile(fileName, blurredStream));\r\n\r\n                                    return ImageUtils.CreateImage(blurredStream, options);\r\n                                }\r\n                                catch (Exception ex)\r\n                                {\r\n\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        return null;\r\n                    }\r\n\r\n                    return null;\r\n                }\r\n            }\r\n\r\n            var mediaGame = value as TLMessageMediaGame;\r\n            if (mediaGame != null)\r\n            {\r\n                var photo = mediaGame.Photo as TLPhoto;\r\n                if (photo != null)\r\n                {\r\n                    var size = photo.Sizes.FirstOrDefault(x => TLString.Equals(x.Type, new TLString(\"s\"), StringComparison.OrdinalIgnoreCase)) as TLPhotoSize;\r\n                    if (size != null)\r\n                    {\r\n                        if (!string.IsNullOrEmpty(size.TempUrl))\r\n                        {\r\n                            return size.TempUrl;\r\n                        }\r\n\r\n                        var location = size.Location as TLFileLocation;\r\n                        if (location != null)\r\n                        {\r\n                            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                                location.VolumeId,\r\n                                location.LocalId,\r\n                                location.Secret);\r\n\r\n                            if (!isBlurEnabled)\r\n                            {\r\n                                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store.FileExists(fileName))\r\n                                    {\r\n                                        try\r\n                                        {\r\n                                            using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                            {\r\n                                                return ImageUtils.CreateImage(stream, options);\r\n                                            }\r\n                                        }\r\n                                        catch (Exception ex)\r\n                                        {\r\n\r\n                                        }\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        var fileManager = IoC.Get<IFileManager>();\r\n                                        fileManager.DownloadFile(location, photo, size.Size,\r\n                                            item =>\r\n                                            {\r\n                                                mediaGame.NotifyOfPropertyChange(() => mediaGame.ThumbSelf);\r\n                                            });\r\n                                    }\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                BitmapImage preview;\r\n                                if (TryGetPhotoPreview(photo.Id, out preview, options))\r\n                                {\r\n                                    return preview;\r\n                                }\r\n\r\n                                var fileManager = IoC.Get<IFileManager>();\r\n                                fileManager.DownloadFile(location, photo, size.Size,\r\n                                    item =>\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() =>\r\n                                        {\r\n                                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                            {\r\n                                                if (store.FileExists(fileName))\r\n                                                {\r\n                                                    try\r\n                                                    {\r\n                                                        using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                                        {\r\n                                                            var bitmap = PictureDecoder.DecodeJpeg(stream);\r\n\r\n                                                            BlurBitmap(bitmap, Secret);\r\n\r\n                                                            var blurredStream = new MemoryStream();\r\n                                                            bitmap.SaveJpeg(blurredStream, size.W.Value, size.H.Value, 0, 100);\r\n\r\n                                                            var previewfileName = string.Format(\"preview{0}.jpg\", photo.Id);\r\n                                                            SaveFile(previewfileName, blurredStream);\r\n\r\n                                                            mediaGame.NotifyOfPropertyChange(() => mediaGame.ThumbSelf);\r\n                                                        }\r\n                                                    }\r\n                                                    catch (Exception ex)\r\n                                                    {\r\n\r\n                                                    }\r\n                                                }\r\n                                            }\r\n                                        });\r\n                                    });\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var cachedSize = (TLPhotoCachedSize) photo.Sizes.FirstOrDefault(x => x is TLPhotoCachedSize);\r\n                    if (cachedSize != null)\r\n                    {\r\n                        if (!string.IsNullOrEmpty(cachedSize.TempUrl))\r\n                        {\r\n                            return cachedSize.TempUrl;\r\n                        }\r\n\r\n                        var buffer = cachedSize.Bytes.Data;\r\n\r\n                        if (buffer != null && buffer.Length > 0)\r\n                        {\r\n                            if (!isBlurEnabled)\r\n                            {\r\n                                return ImageUtils.CreateImage(buffer, options);\r\n                            }\r\n                            else\r\n                            {\r\n                                BitmapImage preview;\r\n                                if (TryGetPhotoPreview(photo.Id, out preview, options))\r\n                                {\r\n                                    return preview;\r\n                                }\r\n\r\n                                try\r\n                                {\r\n                                    var bitmap = PictureDecoder.DecodeJpeg(new MemoryStream(buffer));\r\n\r\n                                    BlurBitmap(bitmap, Secret);\r\n\r\n                                    var blurredStream = new MemoryStream();\r\n                                    bitmap.SaveJpeg(blurredStream, cachedSize.W.Value, cachedSize.H.Value, 0, 100);\r\n\r\n                                    var fileName = string.Format(\"preview{0}.jpg\", photo.Id);\r\n\r\n                                    Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => SaveFile(fileName, blurredStream));\r\n\r\n                                    return ImageUtils.CreateImage(blurredStream);\r\n                                }\r\n                                catch (Exception ex)\r\n                                {\r\n\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        return null;\r\n                    }\r\n\r\n                    return null;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static bool TryGetDocumentPreview(TLLong documentId, out BitmapImage preview, BitmapCreateOptions options)\r\n        {\r\n            preview = null;\r\n\r\n            var fileName = string.Format(\"preview_document{0}.jpg\", documentId);\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (store.FileExists(fileName))\r\n                {\r\n                    try\r\n                    {\r\n                        using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            preview = ImageUtils.CreateImage(stream, options);\r\n                            return true;\r\n                        }\r\n                    }\r\n                    catch (Exception)\r\n                    {\r\n\r\n                    }\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool TryGetPhotoPreview(TLLong photoId, out BitmapImage preview, BitmapCreateOptions options)\r\n        {\r\n            preview = null;\r\n\r\n            var fileName = string.Format(\"preview{0}.jpg\", photoId);\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (store.FileExists(fileName))\r\n                {\r\n                    try\r\n                    {\r\n                        using (var stream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            preview = ImageUtils.CreateImage(stream, options);\r\n                            return true;\r\n                        }\r\n                    }\r\n                    catch (Exception)\r\n                    {\r\n                        \r\n                    }\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public static void SaveFile(string fileName, MemoryStream blurredStream)\r\n        {\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                try\r\n                {\r\n                    using (var stream = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Write))\r\n                    {\r\n                        var buffer = blurredStream.ToArray();\r\n                        stream.Seek(0, SeekOrigin.Begin);\r\n                        stream.Write(buffer, 0, buffer.Length);\r\n                    }\r\n                }\r\n                catch (Exception)\r\n                {\r\n                }\r\n            }\r\n        }\r\n\r\n        public void BlurBitmap(WriteableBitmap bitmap, bool secret)\r\n        {\r\n            //bitmap.BoxBlur(7);\r\n            var pix = new byte[bitmap.Pixels.Length*4];\r\n            for (var j = 0; j < bitmap.Pixels.Length; j++)\r\n            {\r\n                pix[j*4] = (byte) bitmap.Pixels[j]; //r\r\n                pix[j*4 + 1] = (byte) (bitmap.Pixels[j] >> 8); //g\r\n                pix[j*4 + 2] = (byte) (bitmap.Pixels[j] >> 16); //b\r\n                pix[j*4 + 3] = (byte) (bitmap.Pixels[j] >> 24); //a\r\n            }\r\n            var pixels = secret\r\n                ? _imageUtils.FastSecretBlur(bitmap.PixelWidth, bitmap.PixelHeight, bitmap.PixelWidth * 4, pix)\r\n                : _imageUtils.FastBlur(bitmap.PixelWidth, bitmap.PixelHeight, bitmap.PixelWidth*4, pix);\r\n            for (var j = 0; j < bitmap.Pixels.Length; j++)\r\n            {\r\n                bitmap.Pixels[j] = pixels[j*4] + (pixels[j*4 + 1] << 8) + (pixels[j*4 + 2] << 16) + (pixels[j*4 + 3] << 24);\r\n            }\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/PlaceholderDefaultImageConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Telegram.Api;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class PlaceholderDefaultImageConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value == null) return null;\r\n\r\n            var user = value as TLUserBase;\r\n            if (user != null && user.Index == 333000)\r\n            {\r\n#if WP81\r\n                return new Uri(\"/ApplicationIcon106.png\", UriKind.Relative);\r\n#elif WP8\r\n                return new Uri(\"/ApplicationIcon210.png\", UriKind.Relative);\r\n#endif\r\n\r\n                return new Uri(\"/ApplicationIcon99.png\", UriKind.Relative);\r\n            }\r\n\r\n            if (value is TLBroadcastChat)\r\n            {\r\n                return new Uri(\"/Images/Placeholder/placeholder.broadcast.png\", UriKind.Relative);\r\n            }\r\n\r\n            return value is TLChatBase\r\n                ? new Uri(\"/Images/Placeholder/placeholder.group.transparent-WXGA.png\", UriKind.Relative)\r\n                : new Uri(\"/Images/Placeholder/placeholder.user.transparent-WXGA.png\", UriKind.Relative);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class PlaceholderDefaultTextConverter : IValueConverter\r\n    {\r\n        public static string GetText(TLObject value)\r\n        {\r\n            if (value == null) return null;\r\n\r\n            var word1 = string.Empty;\r\n            var word2 = string.Empty;\r\n\r\n            var user = value as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                word1 = user.FirstName != null ? user.FirstName.ToString() : string.Empty;\r\n                word2 = user.LastName != null ? user.LastName.ToString() : string.Empty;\r\n\r\n                if (word1.StartsWith(\"+\") && string.IsNullOrEmpty(word2))\r\n                {\r\n                    word2 = word1.Substring(1).Trim();\r\n                }\r\n                else if (word2.StartsWith(\"+\") && string.IsNullOrEmpty(word1))\r\n                {\r\n                    word1 = word2.Substring(1).Trim();\r\n                }\r\n            }\r\n\r\n            var broadcast = value as TLBroadcastChat;\r\n            if (broadcast != null)\r\n            {\r\n                var words = broadcast.FullName.Trim().Split(' ');\r\n\r\n                if (words.Length > 0)\r\n                {\r\n                    if (words.Length == 1)\r\n                    {\r\n                        var si = StringInfo.GetTextElementEnumerator(broadcast.FullName ?? string.Empty);\r\n\r\n                        word1 = si.MoveNext() ? si.GetTextElement() : string.Empty;\r\n                        word2 = si.MoveNext() ? si.GetTextElement() : string.Empty;\r\n                    }\r\n                    else\r\n                    {\r\n                        word1 = words[0];\r\n                        word2 = words[words.Length - 1];\r\n                    }\r\n                }\r\n            }\r\n\r\n            var chat = value as TLChatBase;\r\n            if (chat != null)\r\n            {\r\n                var words = chat.FullName.Trim().Split(' ');\r\n\r\n                if (words.Length > 0)\r\n                {\r\n                    if (words.Length == 1)\r\n                    {\r\n                        var si = StringInfo.GetTextElementEnumerator(chat.FullName ?? string.Empty);\r\n\r\n                        word1 = si.MoveNext() ? si.GetTextElement() : string.Empty;\r\n                        word2 = si.MoveNext() ? si.GetTextElement() : string.Empty;\r\n                    }\r\n                    else\r\n                    {\r\n                        word1 = words[0];\r\n                        word2 = words[words.Length - 1];\r\n                    }\r\n                }\r\n            }\r\n\r\n            var si1 = StringInfo.GetTextElementEnumerator(word1 ?? string.Empty);\r\n            var si2 = StringInfo.GetTextElementEnumerator(word2 ?? string.Empty);\r\n\r\n            word1 = si1.MoveNext() ? si1.GetTextElement() : string.Empty;\r\n            word2 = si2.MoveNext() ? si2.GetTextElement() : string.Empty;\r\n\r\n            return string.Format(\"{0}{1}\", word1, word2).Trim().ToUpperInvariant();\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            //System.Diagnostics.Debug.WriteLine(\"PlaceholderDefaultTextConverter elapsed=\" + ShellViewModel.Timer.Elapsed);\r\n            return GetText(value as TLObject);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class LinkDefaultTextConverter : IValueConverter\r\n    {   \r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value == null) return null;\r\n\r\n            var firstLetter = string.Empty;\r\n\r\n            var message = value as TLMessage;\r\n            if (message == null) return null;\r\n\r\n            var links = message.Links;\r\n            if (links != null && links.Count > 0)\r\n            {\r\n                firstLetter = GetFirstUrlLetter(links[0]);\r\n            }\r\n            else\r\n            {\r\n                var mediaWebPage = message.Media as TLMessageMediaWebPage;\r\n                if (mediaWebPage != null)\r\n                {\r\n                    var webPage = mediaWebPage.WebPage as TLWebPage;\r\n                    if (webPage != null)\r\n                    {\r\n                        if (!TLString.IsNullOrEmpty(webPage.DisplayUrl))\r\n                        {\r\n                            firstLetter = GetFirstUrlLetter(webPage.DisplayUrl.ToString());\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return firstLetter;\r\n        }\r\n\r\n        public static string GetFirstUrlLetter(string url)\r\n        {\r\n            url = url.Replace(\"http://\", string.Empty);\r\n            url = url.Replace(\"https://\", string.Empty);\r\n            url = url.Replace(\"www.\", string.Empty);\r\n\r\n            return GetFirstLetter(url);\r\n        }\r\n\r\n        public static string GetFirstLetter(string url)\r\n        {\r\n            var si = StringInfo.GetTextElementEnumerator(url);\r\n            var word1 = si.MoveNext() ? si.GetTextElement() : string.Empty;\r\n\r\n            return word1.Trim().ToUpperInvariant();\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class InlineResultDefaultTextConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value == null) return null;\r\n\r\n            var firstLetter = string.Empty;\r\n\r\n            var botInlineMediaResult = value as TLBotInlineMediaResult;\r\n            if (botInlineMediaResult != null)\r\n            {\r\n                var title = botInlineMediaResult.Title != null ? botInlineMediaResult.Title.ToString() : null;\r\n                if (!string.IsNullOrEmpty(title)) return LinkDefaultTextConverter.GetFirstLetter(title);\r\n\r\n                var description = botInlineMediaResult.Description != null? botInlineMediaResult.Description.ToString() : null;\r\n                if (!string.IsNullOrEmpty(description)) return LinkDefaultTextConverter.GetFirstLetter(description);\r\n\r\n                return null;\r\n            }\r\n\r\n            var botInlineResult = value as TLBotInlineResult;\r\n            if (botInlineResult != null)\r\n            {\r\n                var contentUrl = botInlineResult.ContentUrl != null ? botInlineResult.ContentUrl.ToString() : null;\r\n                if (!string.IsNullOrEmpty(contentUrl)) return LinkDefaultTextConverter.GetFirstUrlLetter(contentUrl);\r\n                \r\n                var title = botInlineResult.Title != null ? botInlineResult.Title.ToString() : null;\r\n                if (!string.IsNullOrEmpty(title)) return LinkDefaultTextConverter.GetFirstLetter(title);\r\n\r\n                var description = botInlineResult.Description != null ? botInlineResult.Description.ToString() : null;\r\n                if (!string.IsNullOrEmpty(description)) return LinkDefaultTextConverter.GetFirstLetter(description);\r\n            }\r\n\r\n            return firstLetter;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/PrivateBetaToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class PrivateBetaToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n#if PRIVATE_BETA\r\n            return Visibility.Visible;\r\n#else\r\n            return Visibility.Collapsed;\r\n#endif\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class PrivateBetaIdentityToVisibilityConverter : IValueConverter\r\n    {\r\n        public static bool IsPrivateBeta\r\n        {\r\n            get\r\n            {\r\n#if WP8\r\n                return Windows.ApplicationModel.Package.Current.Id.Name == \"TelegramMessengerLLP.TelegramMessengerPreview\";\r\n#else\r\n#if DEBUG\r\n                return true;\r\n#else\r\n                return false;\r\n#endif\r\n#endif\r\n            }\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return IsPrivateBeta ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class LogVisibilityConverter : IValueConverter\r\n    {\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return Telegram.Logs.Log.IsEnabled ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/ProgressToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class ProgressToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            bool isVisible;\r\n\r\n            if (!(value is double)) return Visibility.Collapsed;\r\n\r\n            var progress = (double)value;\r\n            if (Math.Abs(progress) < 0.00001)\r\n            {\r\n                isVisible = false;\r\n            }\r\n            else\r\n            {\r\n                isVisible = Math.Abs(progress - 1.0) > 0.00001;              \r\n            }\r\n\r\n            if (parameter is string\r\n                && string.Equals((string) parameter, \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                isVisible = !isVisible;\r\n            }\r\n\r\n            return isVisible ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class ProgressBetween0and1ToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            bool isVisible;\r\n\r\n            var progress = (double)value;\r\n            isVisible = progress > 0.0 && progress < 1.0;\r\n\r\n            if (parameter is string\r\n                && string.Equals((string)parameter, \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                isVisible = !isVisible;\r\n            }\r\n\r\n            return isVisible ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/ReplyMarkupButtonVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class ReplyMarkupButtonVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var isVisible = false;\r\n            var replyMarkup = value as TLReplyKeyboardMarkup;\r\n            if (replyMarkup != null)\r\n            {\r\n                isVisible = true;\r\n            }\r\n\r\n            if (parameter != null && string.Equals(parameter.ToString(), \"invert\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                isVisible = !isVisible;\r\n            }\r\n\r\n            return isVisible ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/SecretChatsAvailabilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class SecretChatsAvailabilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return true;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/SecretChatsForegroundConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class SecretChatsForegroundConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return Application.Current.Resources[\"PhoneForegroundBrush\"];\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/ServiceMessageToTextConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Utils;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views.Additional;\r\nusing Language = TelegramClient.Utils.Language;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class DecryptedServiceMessageToTextConverter : IValueConverter\r\n    {\r\n        private static readonly Dictionary<Type, Func<TLDecryptedMessageActionBase, int, string, string>> _actionsCache = new Dictionary<Type, Func<TLDecryptedMessageActionBase, int, string, string>>\r\n        {\r\n            { \r\n                typeof(TLDecryptedMessageActionAcceptKey), (action, fromUserId, fromUserFullName) =>\r\n                {\r\n#if DEBUG\r\n                    return \"TLDecryptedMessageActionAcceptKey exchange_id=\" + ((TLDecryptedMessageActionAcceptKey)action).ExchangeId;\r\n#endif\r\n                    return string.Empty;\r\n                } \r\n            },\r\n            { \r\n                typeof(TLDecryptedMessageActionRequestKey), (action, fromUserId, fromUserFullName) =>\r\n                {\r\n#if DEBUG\r\n                    return \"TLDecryptedMessageActionRequestKey exchange_id=\" + ((TLDecryptedMessageActionRequestKey)action).ExchangeId;\r\n#endif\r\n                    return string.Empty;\r\n                } \r\n            },\r\n            { \r\n                typeof(TLDecryptedMessageActionAbortKey), (action, fromUserId, fromUserFullName) =>\r\n                {\r\n#if DEBUG\r\n                    return \"TLDecryptedMessageActionAbortKey exchange_id=\" + ((TLDecryptedMessageActionAbortKey)action).ExchangeId;\r\n#endif\r\n                    return string.Empty;\r\n                } \r\n            },\r\n            { \r\n                typeof(TLDecryptedMessageActionCommitKey), (action, fromUserId, fromUserFullName) =>\r\n                {\r\n#if DEBUG\r\n                    return \"TLDecryptedMessageActionCommitKey exchange_id=\" + ((TLDecryptedMessageActionCommitKey)action).ExchangeId;\r\n#endif\r\n                    return string.Empty;\r\n                } \r\n            },\r\n            { \r\n                typeof(TLDecryptedMessageActionNoop), (action, fromUserId, fromUserFullName) =>\r\n                {\r\n#if DEBUG\r\n                    return \"TLDecryptedMessageActionNoop\";\r\n#endif\r\n                    return string.Empty;\r\n                } \r\n            },\r\n            { \r\n                typeof(TLDecryptedMessageActionEmpty), (action, fromUserId, fromUserFullName) =>\r\n                {\r\n#if DEBUG\r\n                    return AppResources.MessageActionEmpty;\r\n#endif\r\n                    return string.Empty;\r\n                } \r\n            },\r\n            {\r\n                typeof(TLDecryptedMessageActionSetMessageTTL), (action, fromUserId, fromUserFullName) =>\r\n                {\r\n                    var currentUserId = IoC.Get<IStateService>().CurrentUserId;\r\n                    var resourceActionSetMessageTTL = string.Format(AppResources.MessageActionSetMessageTTL, fromUserFullName, @\"{0}\");\r\n                    if (currentUserId == fromUserId)\r\n                    {\r\n                        resourceActionSetMessageTTL = AppResources.MessageActionYouSetMessageTTL;\r\n                    }\r\n\r\n                    var seconds = ((TLDecryptedMessageActionSetMessageTTL)action).TTLSeconds.Value;\r\n\r\n                    if (seconds == 0)\r\n                    {\r\n                        if (currentUserId == fromUserId)\r\n                        {\r\n                            return AppResources.MessageActionYouDisableMessageTTL;\r\n                        }\r\n\r\n                        return string.Format(AppResources.MessageActionDisableMessageTTL, fromUserFullName);\r\n                    }\r\n\r\n                    string secondsString;\r\n                    if (seconds < 60)\r\n                    {\r\n                        secondsString = Utils.Language.Declension(seconds, \r\n                            AppResources.SecondNominativeSingular,\r\n                            AppResources.SecondNominativePlural, \r\n                            AppResources.SecondGenitiveSingular,\r\n                            AppResources.SecondGenitivePlural);\r\n                    }\r\n                    else if (seconds < 60 * 60)\r\n                    {\r\n                        secondsString = Utils.Language.Declension(seconds / 60,\r\n                            AppResources.MinuteNominativeSingular,\r\n                            AppResources.MinuteNominativePlural,\r\n                            AppResources.MinuteGenitiveSingular,\r\n                            AppResources.MinuteGenitivePlural);\r\n                    }\r\n                    else if (seconds < TimeSpan.FromHours(24.0).TotalSeconds)\r\n                    {\r\n                        secondsString = Utils.Language.Declension((int)(seconds / TimeSpan.FromHours(1.0).TotalSeconds),\r\n                            AppResources.HourNominativeSingular,\r\n                            AppResources.HourNominativePlural,\r\n                            AppResources.HourGenitiveSingular,\r\n                            AppResources.HourGenitivePlural);\r\n                    }\r\n                    else if (seconds < TimeSpan.FromDays(7.0).TotalSeconds)\r\n                    {\r\n                        secondsString = Utils.Language.Declension((int)(seconds / TimeSpan.FromDays(1.0).TotalSeconds),\r\n                            AppResources.DayNominativeSingular,\r\n                            AppResources.DayNominativePlural,\r\n                            AppResources.DayGenitiveSingular,\r\n                            AppResources.DayGenitivePlural);\r\n                    }\r\n                    else if (seconds == TimeSpan.FromDays(7.0).TotalSeconds)\r\n                    {\r\n                        secondsString = Utils.Language.Declension(1,\r\n                            AppResources.WeekNominativeSingular,\r\n                            AppResources.WeekNominativePlural,\r\n                            AppResources.WeekGenitiveSingular,\r\n                            AppResources.WeekGenitivePlural);\r\n                    }\r\n                    else\r\n                    {\r\n                        secondsString = Utils.Language.Declension(seconds,\r\n                            AppResources.SecondNominativeSingular,\r\n                            AppResources.SecondNominativePlural,\r\n                            AppResources.SecondGenitiveSingular,\r\n                            AppResources.SecondGenitivePlural);\r\n                    }\r\n\r\n\r\n                    return string.Format(resourceActionSetMessageTTL, secondsString.ToLowerInvariant());\r\n                }\r\n            },\r\n            { typeof(TLDecryptedMessageActionScreenshotMessages), (action, fromUserId, fromUserFullName) =>\r\n                {\r\n                    var currentUserId = IoC.Get<IStateService>().CurrentUserId;\r\n                    var resourceActionScreenshortMessage = string.Format(AppResources.MessageActionScreenshotMessages, fromUserFullName, @\"{0}\");\r\n                    if (currentUserId == fromUserId)\r\n                    {\r\n                        resourceActionScreenshortMessage = AppResources.MessageActionYouScreenshotMessages;\r\n                    }\r\n\r\n                    return resourceActionScreenshortMessage;\r\n                }\r\n            },\r\n            { \r\n                typeof(TLDecryptedMessageActionReadMessages), (action, fromUserId, fromUserFullName) =>\r\n                {\r\n#if DEBUG\r\n                    return \"TLDecryptedMessageActionReadMessages random_id=\" + string.Join(\", \", ((TLDecryptedMessageActionReadMessages)action).RandomIds);\r\n#endif\r\n                    return string.Empty;\r\n                }\r\n            },\r\n            { \r\n                typeof(TLDecryptedMessageActionDeleteMessages), (action, fromUserId, fromUserFullName) => \r\n                {\r\n#if DEBUG\r\n                    return \"TLDecryptedMessageActionDeleteMessages random_id=\" + string.Join(\", \", ((TLDecryptedMessageActionDeleteMessages)action).RandomIds);\r\n#endif\r\n                    return string.Empty;\r\n                }\r\n            },\r\n            { \r\n                typeof(TLDecryptedMessageActionFlushHistory), (action, fromUserId, fromUserFullName) => \r\n                {\r\n#if DEBUG\r\n                    return \"TLDecryptedMessageActionFlushHistory\";\r\n#endif\r\n                    return string.Empty;\r\n                }\r\n            },\r\n            { \r\n                typeof(TLDecryptedMessageActionNotifyLayer), (action, fromUserId, fromUserFullName) => \r\n                {\r\n#if DEBUG\r\n                    return \"TLDecryptedMessageActionNotifyLayer layer=\" + ((TLDecryptedMessageActionNotifyLayer)action).Layer;\r\n#endif\r\n                    return string.Empty;\r\n                }\r\n            },\r\n        };\r\n\r\n        public static string Convert(TLDecryptedMessageService serviceMessage)\r\n        {\r\n            var fromId = serviceMessage.FromId;\r\n            var fromUser = IoC.Get<ICacheService>().GetUser(fromId);\r\n            var fromUserFullName = fromUser != null ? fromUser.FullName : AppResources.User;\r\n\r\n            var action = serviceMessage.Action;\r\n            if (action != null && _actionsCache.ContainsKey(action.GetType()))\r\n            {\r\n                return _actionsCache[action.GetType()](action, fromId.Value, fromUserFullName);\r\n            }\r\n\r\n#if DEBUG\r\n            return serviceMessage.GetType().Name;\r\n#endif\r\n\r\n            return AppResources.MessageActionEmpty;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var serviceMessage = value as TLDecryptedMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                return Convert(serviceMessage);\r\n            }\r\n\r\n            return AppResources.MessageActionEmpty;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class ServiceMessageToTextConverter : IValueConverter\r\n    {\r\n        public static TLGame GetGame(TLMessageService message)\r\n        {\r\n            var reply = message.Reply as TLMessage31;\r\n            if (reply != null)\r\n            {\r\n                var mediaGame = reply.Media as TLMessageMediaGame;\r\n                if (mediaGame != null)\r\n                {\r\n                    return mediaGame.Game;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static TLKeyboardButtonGame GetKeyboardButtonGame(TLMessageService message)\r\n        {\r\n            var reply = message.Reply as TLMessage31;\r\n            if (reply != null)\r\n            {\r\n                if (reply.ReplyMarkup != null)\r\n                {\r\n                    var replyKeyboardMarkup = reply.ReplyMarkup as TLReplyInlineMarkup;\r\n                    if (replyKeyboardMarkup != null)\r\n                    {\r\n                        foreach (var row in replyKeyboardMarkup.Rows)\r\n                        {\r\n                            foreach (var button in row.Buttons)\r\n                            {\r\n                                var keyboardButtonGame = button as TLKeyboardButtonGame;\r\n                                if (keyboardButtonGame != null)\r\n                                {\r\n                                    return keyboardButtonGame;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static readonly Dictionary<Type, Func<TLMessageBase, TLMessageActionBase, int, string, bool, bool, string>> _actionsCache = new Dictionary<Type, Func<TLMessageBase, TLMessageActionBase, int, string, bool, bool, string>>\r\n        { \r\n            { typeof(TLMessageActionEmpty), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) => AppResources.MessageActionEmpty },\r\n            { typeof(TLMessageActionSecureValuesSent), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n            {\r\n                var messageActionSecureValuesSent = action as TLMessageActionSecureValuesSent;\r\n                if (messageActionSecureValuesSent != null)\r\n                {\r\n                    var values = new List<string>();\r\n                    foreach (var type in messageActionSecureValuesSent.Types)\r\n                    {\r\n                        values.Add(SecureRequiredTypeToCaptionConverter.Convert(type));\r\n                    }\r\n\r\n                    return string.Format(AppResources.MessageActionSecureValuesSent, GetUserFullNameString(fromUserFullName, fromUserId, useActiveLinks, noName), string.Join(\", \", values));\r\n                }\r\n\r\n                return string.Empty;\r\n            } \r\n            },\r\n            { typeof(TLMessageActionSecureValuesSentMe), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n            {\r\n                return string.Empty;\r\n            } \r\n            },\r\n            { typeof(TLMessageActionBotAllowed), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n            {\r\n                var messageActionBotAllowed = action as TLMessageActionBotAllowed;\r\n                if (messageActionBotAllowed != null)\r\n                {\r\n                    return string.Format(AppResources.MessageActionBotAllowed, messageActionBotAllowed.Domain);\r\n                }\r\n\r\n                return string.Empty;\r\n            } \r\n            },\r\n            { typeof(TLMessageActionCustomAction), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n            {\r\n                var messageActionCustomAction = action as TLMessageActionCustomAction;\r\n                if (messageActionCustomAction != null)\r\n                {\r\n                    return messageActionCustomAction.Message.ToString();\r\n                }\r\n\r\n                return string.Empty;\r\n            } \r\n            },\r\n            { typeof(TLMessageActionPaymentSent), (message, action, fromfromUserId, fromUserFullName, useActiveLinks, noName) => GetPaymentSentString(action, message, fromUserFullName) },\r\n            { typeof(TLMessageActionPaymentSentMe), (message, action, fromfromUserId, fromUserFullName, useActiveLinks, noName) => GetPaymentSentString(action, message, fromUserFullName) },\r\n            { typeof(TLMessageActionPhoneCall), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n            {\r\n                var duration = ((TLMessageActionPhoneCall)action).Duration;\r\n                var reason = ((TLMessageActionPhoneCall)action).Reason;\r\n\r\n                var messageService = message as TLMessageService;\r\n                if (messageService != null)\r\n                {\r\n                    var messageDateTimeConverter = (TLIntToDateTimeConverter)Application.Current.Resources[\"MessageDateTimeConverter\"];\r\n                    var durationString = string.Empty;\r\n                    if (duration != null)\r\n                    {\r\n                        var durationTimeSpan = TimeSpan.FromSeconds(duration.Value);\r\n                        if (durationTimeSpan.TotalSeconds > 60.0)\r\n                        {\r\n                            durationString =\r\n                                Language.Declension(\r\n                                    (int) durationTimeSpan.TotalMinutes,\r\n                                    AppResources.MinuteNominativeSingular,\r\n                                    AppResources.MinuteNominativePlural,\r\n                                    AppResources.MinuteGenitiveSingular,\r\n                                    AppResources.MinuteGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                        }\r\n                        else\r\n                        {\r\n                            durationString = \r\n                                Language.Declension(\r\n                                    durationTimeSpan.Seconds,\r\n                                    AppResources.SecondNominativeSingular,\r\n                                    AppResources.SecondNominativePlural,\r\n                                    AppResources.SecondGenitiveSingular,\r\n                                    AppResources.SecondGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                        }\r\n                    }\r\n\r\n                    if (duration != null)\r\n                    {\r\n                        return messageService.Out.Value\r\n                            ? string.Format(AppResources.MessageActionOutgoingDurationCall, durationString)\r\n                            : string.Format(AppResources.MessageActionIncomingDurationCall, durationString);\r\n                    }\r\n\r\n                    var missed = reason as TLPhoneCallDiscardReasonMissed;\r\n                    if (missed != null)\r\n                    {\r\n                        if (messageService.Out.Value)\r\n                        {\r\n                            return AppResources.MessageActionCanceledCall;\r\n                        }\r\n                        else\r\n                        {\r\n                            return AppResources.MessageActionMissedCall;\r\n                        }\r\n                    }\r\n\r\n                    var busy2 = reason as TLPhoneCallDiscardReasonBusy;\r\n                    if (busy2 != null)\r\n                    {\r\n                        if (messageService.Out.Value)\r\n                        {\r\n                            return AppResources.MessageActionOutgoingCall;\r\n                        }\r\n                        else\r\n                        {\r\n                            return AppResources.MessageActionDeclinedCall;\r\n                        }\r\n                    }\r\n\r\n                    return messageService.Out.Value\r\n                        ? AppResources.MessageActionOutgoingCall\r\n                        : AppResources.MessageActionIncomingCall;    \r\n                }\r\n\r\n                return null;\r\n            } \r\n            },\r\n            { typeof(TLMessageActionGameScore), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n            {\r\n                var score = ((TLMessageActionGameScore)action).Score.Value;\r\n                var isPlural = score == 0 || score > 0;\r\n                var user = IoC.Get<ICacheService>().GetUser(new TLInt(fromUserId)) as TLUser;\r\n                var userFullName = GetUserFullName(user, useActiveLinks, noName);\r\n\r\n                var messageService = message as TLMessageService;\r\n                if (messageService != null)\r\n                {\r\n                    var game = GetGame(messageService);\r\n                    if (game != null)\r\n                    {\r\n                        var gameTitle = game.Title.ToString();\r\n                        var reply = messageService.Reply as TLMessageCommon;\r\n                        if (reply != null)\r\n                        {\r\n                            gameTitle = GetGameFullNameString(gameTitle, messageService.Index, messageService.ToId, useActiveLinks);\r\n                        }\r\n\r\n                        if (user != null)\r\n                        {\r\n                            if (user.IsSelf)\r\n                            {\r\n                                return string.Format(isPlural ? AppResources.YourScoredAtGamePlural : AppResources.YourScoredAtGame, GetBoldString(score.ToString(CultureInfo.InvariantCulture), useActiveLinks), gameTitle);\r\n                            }\r\n\r\n                            return string.Format(isPlural ? AppResources.UserScoredAtGamePlural : AppResources.UserScoredAtGame, userFullName, GetBoldString(score.ToString(CultureInfo.InvariantCulture), useActiveLinks), gameTitle);\r\n                        }\r\n\r\n                        return string.Format(isPlural ? AppResources.UserScoredAtGamePlural : AppResources.UserScoredAtGame, AppResources.UserNominativeSingular, GetBoldString(score.ToString(CultureInfo.InvariantCulture), useActiveLinks), gameTitle);\r\n                    }\r\n\r\n                    if (user != null)\r\n                    {\r\n                        if (user.IsSelf)\r\n                        {\r\n                            return string.Format(isPlural ? AppResources.YourScoredPlural : AppResources.YourScored, score);\r\n                        }\r\n\r\n                        return string.Format(isPlural ? AppResources.UserScoredPlural : AppResources.UserScored, userFullName, score);\r\n                    }\r\n                }\r\n\r\n                return string.Format(isPlural ? AppResources.UserScoredPlural : AppResources.UserScored, AppResources.UserNominativeSingular, score);\r\n            } \r\n            },\r\n            { typeof(TLMessageActionChatCreate), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) => string.Format(AppResources.MessageActionChatCreate, GetUserFullNameString(fromUserFullName, fromUserId, useActiveLinks, noName), ((TLMessageActionChatCreate) action).Title) },\r\n            //{ typeof(TLMessageActionChannelCreate), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) => string.Format(AppResources.MessageActionChannelCreate, GetFullNameString(fromUserFullName, fromUserId, useActiveLinks, noName), ((TLMessageActionChannelCreate) action).Title) },\r\n            { typeof(TLMessageActionChatEditPhoto), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) => string.Format(AppResources.MessageActionChatEditPhoto, GetUserFullNameString(fromUserFullName, fromUserId, useActiveLinks, noName)) },\r\n            { typeof(TLMessageActionChatEditTitle), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) => string.Format(AppResources.MessageActionChatEditTitle, GetUserFullNameString(fromUserFullName, fromUserId, useActiveLinks, noName), ((TLMessageActionChatEditTitle) action).Title) },\r\n            { typeof(TLMessageActionChatDeletePhoto), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) => string.Format(AppResources.MessageActionChatDeletePhoto, GetUserFullNameString(fromUserFullName, fromUserId, useActiveLinks, noName)) },\r\n            { typeof(TLMessageActionChatAddUser), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n                    var userId = ((TLMessageActionChatAddUser)action).UserId;\r\n                    var user = IoC.Get<ICacheService>().GetUser(userId);\r\n                    var userFullName = GetUserFullName(user, useActiveLinks, noName);\r\n\r\n                    if (userId.Value == fromUserId)\r\n                    {\r\n                        return string.Format(AppResources.MessageActionChatAddSelf, userFullName);\r\n                    }\r\n\r\n                    return string.Format(AppResources.MessageActionChatAddUser, GetUserFullNameString(fromUserFullName, fromUserId, useActiveLinks, noName), userFullName);\r\n                }\r\n            },\r\n            { typeof(TLMessageActionChatAddUser41), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n                    var users = ((TLMessageActionChatAddUser41)action).Users;\r\n\r\n                    var userFullName = new List<string>();\r\n                    foreach (var userId in users)\r\n                    {\r\n                        var user = IoC.Get<ICacheService>().GetUser(userId);\r\n                        if (user != null)\r\n                        {\r\n                            userFullName.Add(GetUserFullName(user, useActiveLinks, noName));\r\n                        }\r\n                    }\r\n\r\n                    if (users.Count == 1\r\n                        && users[0].Value == fromUserId)\r\n                    {\r\n                        return string.Format(AppResources.MessageActionChatAddSelf, string.Join(\", \", userFullName));\r\n                    }\r\n\r\n                    return string.Format(AppResources.MessageActionChatAddUser, GetUserFullNameString(fromUserFullName, fromUserId, useActiveLinks, noName), string.Join(\", \", userFullName));\r\n                }\r\n            },\r\n            { typeof(TLMessageActionScreenshotTaken), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n                    var currentUserId = IoC.Get<IStateService>().CurrentUserId;\r\n                    var resourceActionScreenshortMessage = string.Format(AppResources.MessageActionScreenshotMessages, fromUserFullName, @\"{0}\");\r\n                    if (currentUserId == fromUserId)\r\n                    {\r\n                        resourceActionScreenshortMessage = AppResources.MessageActionYouScreenshotMessages;\r\n                    }\r\n\r\n                    return resourceActionScreenshortMessage;\r\n                }\r\n            },\r\n            { typeof(TLMessageActionChatDeleteUser), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n                    var userId = ((TLMessageActionChatDeleteUser)action).UserId;\r\n                    var user = IoC.Get<ICacheService>().GetUser(userId);\r\n                    var userFullName = GetUserFullName(user, useActiveLinks, noName);\r\n\r\n                    if (userId.Value == fromUserId)\r\n                    {\r\n                        if (fromUserId == IoC.Get<IStateService>().CurrentUserId)\r\n                        {\r\n                            return AppResources.MessageActionLeftGroupSelf;\r\n                        }\r\n\r\n                        return string.Format(AppResources.MessageActionUserLeftGroup, GetUserFullNameString(fromUserFullName, fromUserId, useActiveLinks, noName));\r\n                    }\r\n\r\n                    return string.Format(AppResources.MessageActionChatDeleteUser, GetUserFullNameString(fromUserFullName, fromUserId, useActiveLinks, noName), userFullName);\r\n                }\r\n            },\r\n            { typeof(TLMessageActionUnreadMessages), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) => AppResources.UnreadMessages.ToLowerInvariant() },\r\n            { typeof(TLMessageActionContactRegistered), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n                    var userId = ((TLMessageActionContactRegistered)action).UserId;\r\n                    var user = IoC.Get<ICacheService>().GetUser(userId);\r\n                    var userFullName = user != null ? user.FirstName.ToString() : AppResources.User;\r\n\r\n                    if (string.IsNullOrEmpty(userFullName) && user != null)\r\n                    {\r\n                        userFullName = user.FullName;\r\n                    }\r\n\r\n                    return string.Format(AppResources.ContactRegistered, userFullName);\r\n                }\r\n            },\r\n\r\n\r\n            { typeof(TLMessageActionChatJoinedByLink), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n                    var userId = new TLInt(fromUserId);\r\n                    var user = IoC.Get<ICacheService>().GetUser(userId);\r\n                    var userFullName = user != null ? GetUserFullName(user, useActiveLinks, noName) : AppResources.User;\r\n\r\n                    if (string.IsNullOrEmpty(userFullName) && user != null)\r\n                    {\r\n                        userFullName = user.FullName;\r\n                    }\r\n\r\n                    return string.Format(AppResources.MessageActionChatJoinedByLink, userFullName);\r\n                }\r\n            },\r\n            { typeof(TLMessageActionMessageGroup), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n                    var count = ((TLMessageActionMessageGroup) action).Group.Count.Value;\r\n\r\n                    return Language.Declension(\r\n                        count,\r\n                        AppResources.CommentNominativeSingular,\r\n                        AppResources.CommentNominativePlural,\r\n                        AppResources.CommentGenitiveSingular,\r\n                        AppResources.CommentGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                }\r\n            },\r\n            { typeof(TLMessageActionChatMigrateTo), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n                    var channelId = ((TLMessageActionChatMigrateTo)action).ChannelId;\r\n                    var channel = IoC.Get<ICacheService>().GetChat(channelId) as TLChannel;\r\n                    var channelFullName = channel != null ? channel.FullName : string.Empty;\r\n\r\n                    return string.Format(AppResources.MessageActionChatMigrateTo, GetChannelFullNameString(channelFullName, channelId.Value, useActiveLinks));\r\n                }\r\n            },\r\n            { typeof(TLMessageActionChannelMigrateFrom), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n                    var chatId = ((TLMessageActionChannelMigrateFrom)action).ChatId;\r\n                    var chat = IoC.Get<ICacheService>().GetChat(chatId);\r\n                    var chatFullName = chat != null ? chat.FullName : string.Empty;\r\n\r\n                    return string.Format(AppResources.MessageActionChannelMigrateFrom, GetChatFullNameString(chatFullName, chatId.Value, useActiveLinks));\r\n                }\r\n            },\r\n            { typeof(TLMessageActionChatActivate), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n                    return AppResources.MessageActionChatActivate;\r\n                }\r\n            },\r\n            { typeof(TLMessageActionChatDeactivate), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n                    return AppResources.MessageActionChatDeactivate;\r\n                }\r\n            },\r\n            { typeof(TLMessageActionClearHistory), (message, action, fromUserId, fromUserFullName, useActiveLinks, noName) =>\r\n                {\r\n#if DEBUG\r\n                    return string.Format(\"{0}\", action != null ? action.GetType().Name : AppResources.MessageActionEmpty);\r\n#endif\r\n                    return string.Empty;\r\n                }\r\n            },\r\n        };\r\n\r\n        private static string GetPaymentSentString(TLMessageActionBase action, TLMessageBase message, string fromUserFullName)\r\n        {\r\n            var actionPaymentSent = action as TLMessageActionPaymentSentBase;\r\n            if (actionPaymentSent != null)\r\n            {\r\n                var serviceMessage49 = message as TLMessageService49;\r\n                if (serviceMessage49 != null)\r\n                {\r\n                    var replyToMsgId = serviceMessage49.ReplyToMsgId;\r\n                    if (replyToMsgId != null)\r\n                    {\r\n                        TLChannel channel = null;\r\n                        if (serviceMessage49.ToId is TLPeerChannel)\r\n                        {\r\n                            channel = IoC.Get<ICacheService>().GetChat(serviceMessage49.ToId.Id) as TLChannel;\r\n                        }\r\n\r\n                        var reply =\r\n                            IoC.Get<ICacheService>()\r\n                                .GetMessage(serviceMessage49.ReplyToMsgId, channel != null ? channel.Id : null) as TLMessage;\r\n                        if (reply != null)\r\n                        {\r\n                            var mediaInvoice = reply.Media as TLMessageMediaInvoice;\r\n                            if (mediaInvoice != null)\r\n                            {\r\n                                return string.Format(AppResources.MessageActionPaymentSentFor,\r\n                                    (actionPaymentSent.TotalAmount.Value / Math.Pow(10.0, Currency.GetPow(actionPaymentSent.Currency.ToString())) + \" \" + Currency.GetSymbol(actionPaymentSent.Currency.ToString())),\r\n                                    fromUserFullName, mediaInvoice.Title);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    return string.Format(AppResources.MessageActionPaymentSent,\r\n                        (actionPaymentSent.TotalAmount.Value / Math.Pow(10.0, Currency.GetPow(actionPaymentSent.Currency.ToString())) + \" \" + Currency.GetSymbol(actionPaymentSent.Currency.ToString())), fromUserFullName);\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static string GetBoldString(string score, bool useActiveLinks)\r\n        {\r\n            if (!useActiveLinks)\r\n            {\r\n                return score;\r\n            }\r\n\r\n            return '\\a' + \"bold\" + '\\b' + score + '\\a';\r\n        }\r\n\r\n        private static string GetGameFullNameString(string fullName, int msgId, TLPeerBase toId, bool useActiveLinks)\r\n        {\r\n            if (!useActiveLinks)\r\n            {\r\n                return fullName;\r\n            }\r\n\r\n            var channelIdString = toId is TLPeerChannel ? \"&channel_id=\" + toId.Id.Value : string.Empty;\r\n\r\n            return '\\a' + \"tlg://?action=game&msg_id=\" + msgId + channelIdString + '\\b' + fullName + '\\a';\r\n        }\r\n\r\n        private static string GetUserFullName(TLUserBase user, bool useActiveLinks, bool noName)\r\n        {\r\n            if (user == null) return AppResources.User;\r\n\r\n            return GetUserFullNameString(user.FullName2, user.Index, useActiveLinks, noName);\r\n        }\r\n\r\n        private static string GetUserFullNameString(string fullName, int userId, bool useActiveLinks, bool noName)\r\n        {\r\n            if (noName)\r\n            {\r\n                return string.Empty;\r\n            }\r\n\r\n            if (!useActiveLinks)\r\n            {\r\n                return fullName;\r\n            }\r\n\r\n            return '\\a' + \"tlg://?action=profile&user_id=\" + userId + '\\b' + fullName + '\\a';\r\n        }\r\n\r\n        private static string GetChatFullNameString(string fullName, int userId, bool useActiveLinks)\r\n        {\r\n            return fullName;\r\n\r\n            if (!useActiveLinks)\r\n            {\r\n                return fullName;\r\n            }\r\n\r\n            return '\\a' + \"tlg://?action=profile&chat_id=\" + userId + '\\b' + fullName + '\\a';\r\n        }\r\n\r\n        private static string GetChannelFullNameString(string fullName, int userId, bool useActiveLinks)\r\n        {\r\n            return fullName;\r\n\r\n            if (!useActiveLinks)\r\n            {\r\n                return fullName;\r\n            }\r\n\r\n            return '\\a' + \"tlg://?action=profile&channel_id=\" + userId + '\\b' + fullName + '\\a';\r\n        }\r\n\r\n        public static string Convert(TLMessageService serviceMessage, bool useActiveLinks = false, bool noName = false)\r\n        {\r\n\r\n            var fromId = serviceMessage.FromId;\r\n            var fromUser = IoC.Get<ICacheService>().GetUser(fromId);\r\n            var fromUserFullName = fromUser != null ? fromUser.FullName2 : AppResources.User;\r\n\r\n            //var stateService = IoC.Get<IStateService>();\r\n            //if (fromId.Value == stateService.CurrentUserId)\r\n            //{\r\n            //    fromUserFullName = AppResources.You;\r\n            //}\r\n\r\n            var action = serviceMessage.Action;\r\n\r\n            if (serviceMessage.ToId is TLPeerChannel)\r\n            {\r\n                var channel = IoC.Get<ICacheService>().GetChat(serviceMessage.ToId.Id) as TLChannel;\r\n                var isMegaGroup = channel != null && channel.IsMegaGroup;\r\n\r\n                var actionPinMessage = action as TLMessageActionPinMessage;\r\n                if (actionPinMessage != null)\r\n                {\r\n                    var serviceMessage49 = serviceMessage as TLMessageService49;\r\n                    if (serviceMessage49 != null)\r\n                    {\r\n                        var replyToMsgId = serviceMessage49.ReplyToMsgId;\r\n                        if (replyToMsgId != null && channel != null)\r\n                        {\r\n                            var reply = IoC.Get<ICacheService>().GetMessage(serviceMessage49.ReplyToMsgId, channel.Id) as TLMessage;\r\n                            if (reply != null)\r\n                            {\r\n                                if (!isMegaGroup && fromUser == null)\r\n                                {\r\n                                    useActiveLinks = false;\r\n                                    fromUserFullName = channel.FullName;\r\n                                }\r\n\r\n                                var mediaGame = reply.Media as TLMessageMediaGame;\r\n                                if (mediaGame != null)\r\n                                {\r\n                                    return string.Format(AppResources.MessageActionPinGame, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                }\r\n\r\n                                var text = reply.Message.ToString();\r\n                                if (text.Length > 0)\r\n                                {\r\n                                    if (text.Length > 20)\r\n                                    {\r\n                                        return string.Format(AppResources.MessageActionPinText, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName), text.Substring(0, 20).Replace(\"\\r\\n\", \"\\n\").Replace(\"\\n\", \" \") + \"...\");\r\n                                    }\r\n\r\n                                    return string.Format(AppResources.MessageActionPinText, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName), text);\r\n                                }\r\n\r\n                                var mediaPhoto = reply.Media as TLMessageMediaPhoto;\r\n                                if (mediaPhoto != null)\r\n                                {\r\n                                    return string.Format(AppResources.MessageActionPinPhoto, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                }\r\n\r\n                                var mediaDocument = reply.Media as TLMessageMediaDocument;\r\n                                if (mediaDocument != null)\r\n                                {\r\n                                    if (TLMessageBase.IsSticker(mediaDocument.Document))\r\n                                    {\r\n                                        return string.Format(AppResources.MessageActionPinSticker, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                    }\r\n\r\n                                    if (TLMessageBase.IsVoice(mediaDocument.Document))\r\n                                    {\r\n                                        return string.Format(AppResources.MessageActionPinVoiceMessage, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                    }\r\n\r\n                                    if (TLMessageBase.IsMusic(mediaDocument.Document))\r\n                                    {\r\n                                        return string.Format(AppResources.MessageActionPinTrack, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                    }\r\n\r\n                                    if (TLMessageBase.IsVideo(mediaDocument.Document))\r\n                                    {\r\n                                        return string.Format(AppResources.MessageActionPinVideo, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                    }\r\n\r\n                                    if (TLMessageBase.IsGif(mediaDocument.Document))\r\n                                    {\r\n                                        return string.Format(AppResources.MessageActionPinGif, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                    }\r\n\r\n                                    return string.Format(AppResources.MessageActionPinFile, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                }\r\n\r\n                                var mediaContact = reply.Media as TLMessageMediaContact;\r\n                                if (mediaContact != null)\r\n                                {\r\n                                    return string.Format(AppResources.MessageActionPinContact, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                }\r\n\r\n                                var mediaGeoLive = reply.Media as TLMessageMediaGeoLive;\r\n                                if (mediaGeoLive != null)\r\n                                {\r\n                                    return string.Format(AppResources.MessageActionPinGeoLive, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                }\r\n\r\n                                var mediaGeo = reply.Media as TLMessageMediaGeo;\r\n                                if (mediaGeo != null)\r\n                                {\r\n                                    return string.Format(AppResources.MessageActionPinMap, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                }\r\n\r\n                                var mediaAudio = reply.Media as TLMessageMediaAudio;\r\n                                if (mediaAudio != null)\r\n                                {\r\n                                    return string.Format(AppResources.MessageActionPinVoiceMessage, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                }\r\n\r\n                                var mediaVideo = reply.Media as TLMessageMediaVideo;\r\n                                if (mediaVideo != null)\r\n                                {\r\n                                    return string.Format(AppResources.MessageActionPinVideo, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        return string.Format(AppResources.MessageActionPinMessage, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName));\r\n                    }\r\n                }\r\n\r\n                var actionChatAddUser41 = action as TLMessageActionChatAddUser41;\r\n                if (actionChatAddUser41 != null)\r\n                {\r\n                    var users = ((TLMessageActionChatAddUser41)action).Users;\r\n\r\n                    var userFullName = new List<string>();\r\n                    foreach (var userId in users)\r\n                    {\r\n                        var user = IoC.Get<ICacheService>().GetUser(userId);\r\n                        if (user != null)\r\n                        {\r\n                            userFullName.Add(GetUserFullName(user, useActiveLinks, noName));\r\n                        }\r\n                    }\r\n\r\n                    if (users.Count == 1\r\n                        && users[0].Value == fromId.Value)\r\n                    {\r\n                        if (fromId.Value == IoC.Get<IStateService>().CurrentUserId)\r\n                        {\r\n                            return AppResources.MessageActionChatJoinSelf;\r\n                        }\r\n\r\n                        return string.Format(AppResources.MessageActionChatJoin, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName), string.Join(\", \", userFullName));\r\n                    }\r\n\r\n                    return string.Format(AppResources.MessageActionChatAddUser, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName), string.Join(\", \", userFullName));\r\n                }\r\n\r\n                var actionChannelCreate = action as TLMessageActionChannelCreate;\r\n                if (actionChannelCreate != null)\r\n                {\r\n                    return isMegaGroup\r\n                        ? string.Format(AppResources.MessageActionChatCreate, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName), ((TLMessageActionChannelCreate)action).Title)\r\n                        : string.Format(AppResources.MessageActionChannelCreate, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName), ((TLMessageActionChannelCreate) action).Title);\r\n                }\r\n\r\n                var actionChatEditPhoto = action as TLMessageActionChatEditPhoto;\r\n                if (actionChatEditPhoto != null)\r\n                {\r\n                    return isMegaGroup\r\n                        ? string.Format(AppResources.MessageActionChatEditPhoto, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName)) \r\n                        : AppResources.MessageActionChannelEditPhoto;\r\n                }\r\n\r\n                var actionChatDeletePhoto = action as TLMessageActionChatDeletePhoto;\r\n                if (actionChatDeletePhoto != null)\r\n                {\r\n                    return isMegaGroup\r\n                        ? string.Format(AppResources.MessageActionChatDeletePhoto, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName)) \r\n                        : AppResources.MessageActionChannelDeletePhoto;\r\n                }\r\n\r\n                var actionChantEditTitle = action as TLMessageActionChatEditTitle;\r\n                if (actionChantEditTitle != null)\r\n                {\r\n                    return isMegaGroup\r\n                        ? string.Format(AppResources.MessageActionChatEditTitle, GetUserFullNameString(fromUserFullName, fromId.Value, useActiveLinks, noName), actionChantEditTitle.Title)\r\n                        : string.Format(AppResources.MessageActionChannelEditTitle, actionChantEditTitle.Title);\r\n                }\r\n            }\r\n            if (action != null && _actionsCache.ContainsKey(action.GetType()))\r\n            {\r\n                return _actionsCache[action.GetType()](serviceMessage, action, fromId.Value, fromUserFullName, useActiveLinks, noName);\r\n            }\r\n\r\n#if DEBUG\r\n            return string.Format(\"{0} msg_id={1}\", action != null ? action.ToString() : AppResources.MessageActionEmpty, serviceMessage.Id);\r\n#endif\r\n\r\n            return AppResources.MessageActionEmpty;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var serviceMessage = value as TLMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                var useActiveLinks = false;\r\n                var noUser = false;\r\n                var p = parameter as string;\r\n                if (p != null)\r\n                {\r\n                    useActiveLinks = !p.StartsWith(\"nolinks\", StringComparison.OrdinalIgnoreCase);\r\n                    noUser = p.EndsWith(\"nouser\", StringComparison.OrdinalIgnoreCase);\r\n                } \r\n                return Convert(serviceMessage, useActiveLinks, noUser).Trim(' ');\r\n            }\r\n\r\n            return AppResources.MessageActionEmpty;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/StatusToImageConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class StatusToImageConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is MessageStatus)) return null;\r\n\r\n            var status = (MessageStatus) value;\r\n\r\n            if (status == MessageStatus.Sending)\r\n            {\r\n                return new Uri(\"/Images/Messages/message.state.sending-WXGA.png\", UriKind.Relative);\r\n            }\r\n\r\n            if (status == MessageStatus.Confirmed)\r\n            {\r\n                return new Uri(\"/Images/Messages/message.state.sent-WXGA.png\", UriKind.Relative);\r\n            }\r\n\r\n            if (status == MessageStatus.Read)\r\n            {\r\n                return new Uri(\"/Images/Messages/message.state.read-WXGA.png\", UriKind.Relative);\r\n            }\r\n\r\n            //if (status == MessageStatus.Broadcast)\r\n            //{\r\n            //    return new Uri(\"/Images/Messages/message.state.broadcast.png\", UriKind.Relative);\r\n            //}\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/StickerSetToCountStringConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class StickerSetToCountStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var set = value as TLStickerSet32;\r\n            if (set != null)\r\n            {\r\n                return Utils.Language.Declension(\r\n                    set.Count.Value,\r\n                    AppResources.StickerNominativeSingular,\r\n                    AppResources.StickerNominativePlural,\r\n                    AppResources.StickerGenitiveSingular,\r\n                    AppResources.StickerGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/StringEqualsToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class StringEqualsToVisibilityConverter : IValueConverter\r\n    {\r\n        public bool IsInvert { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var visibility = false;\r\n\r\n            if (value != null)\r\n            {\r\n                var values = ((string) parameter).Split(' ');\r\n\r\n                foreach (var s in values)\r\n                {\r\n                    if (string.Equals(value.ToString(), s, StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        visibility = true;\r\n                        break;\r\n                    }\r\n                }\r\n                \r\n                if (IsInvert)\r\n                {\r\n                    visibility = !visibility;\r\n                }\r\n            }\r\n\r\n            return visibility ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class DialogStatusEqualsToVisibilityConverter : IValueConverter\r\n    {\r\n        public bool IsInvert { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var visibility = false;\r\n\r\n            if (value != null)\r\n            {\r\n                var dialog = value as TLDialog;\r\n                var broadcastDialog = value as TLBroadcastDialog;\r\n                var encryptedDialog = value as TLEncryptedDialog;\r\n                if (dialog != null)\r\n                {\r\n                    var topMessage = dialog.TopMessage;\r\n                    if (topMessage != null)\r\n                    {\r\n                        value = topMessage.Status;\r\n                    }\r\n                }\r\n                else if (broadcastDialog != null)\r\n                {\r\n                    var topMessage = broadcastDialog.TopMessage;\r\n                    if (topMessage != null)\r\n                    {\r\n                        value = topMessage.Status;\r\n                    }\r\n                }\r\n                else if (encryptedDialog != null)\r\n                {\r\n                    var topMessage = encryptedDialog.TopMessage;\r\n                    if (topMessage != null\r\n                        && TLUtils.IsDisplayedDecryptedMessage(topMessage))\r\n                    {\r\n                        value = topMessage.Status;\r\n                    }\r\n                    else\r\n                    {\r\n                        for (var i = 0; i < encryptedDialog.Messages.Count; i++)\r\n                        {\r\n                            if (TLUtils.IsDisplayedDecryptedMessage(encryptedDialog.Messages[i]))\r\n                            {\r\n                                value = encryptedDialog.Messages[i].Status;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var values = ((string)parameter).Split(' ');\r\n\r\n                foreach (var s in values)\r\n                {\r\n                    if (string.Equals(value.ToString(), s, StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        visibility = true;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (IsInvert)\r\n                {\r\n                    visibility = !visibility;\r\n                }\r\n            }\r\n\r\n            return visibility ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/StringFormatConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class StringFormatConverter : DependencyObject, IValueConverter\r\n    {\r\n        public static readonly DependencyProperty StringProperty =\r\n            DependencyProperty.Register(\"String\", typeof (string), typeof (StringFormatConverter), new PropertyMetadata(default(string)));\r\n\r\n        public string String\r\n        {\r\n            get { return (string) GetValue(StringProperty); }\r\n            set { SetValue(StringProperty, value); }\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return string.Format(String, value);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/TLIntToDateTimeConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class TLIntToDateTimeConverter : DependencyObject, IValueConverter\r\n    {\r\n        public static readonly DependencyProperty TodayFormatProperty =\r\n            DependencyProperty.Register(\"TodayFormat\",\r\n                                        typeof(string), typeof(TLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string TodayFormat\r\n        {\r\n            get { return (string)GetValue(TodayFormatProperty); }\r\n            set { SetValue(TodayFormatProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty YesterdayStringProperty =\r\n            DependencyProperty.Register(\"YesterdayString\", typeof(string), typeof(TLIntToDateTimeConverter), new PropertyMetadata(default(string)));\r\n\r\n        public string YesterdayString\r\n        {\r\n            get { return (string)GetValue(YesterdayStringProperty); }\r\n            set { SetValue(YesterdayStringProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty YesterdayFormatProperty =\r\n            DependencyProperty.Register(\"YesterdayFormat\",\r\n                                        typeof(string), typeof(TLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string YesterdayFormat\r\n        {\r\n            get { return (string)GetValue(YesterdayFormatProperty); }\r\n            set { SetValue(YesterdayFormatProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty RegularFormatProperty =\r\n            DependencyProperty.Register(\"RegularFormat\",\r\n                                        typeof(string), typeof(TLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string RegularFormat\r\n        {\r\n            get { return (string)GetValue(RegularFormatProperty); }\r\n            set { SetValue(RegularFormatProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty LongRegularFormatProperty =\r\n            DependencyProperty.Register(\"LongRegularFormat\",\r\n                                        typeof(string), typeof(TLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string LongRegularFormat\r\n        {\r\n            get { return (string)GetValue(LongRegularFormatProperty); }\r\n            set { SetValue(LongRegularFormatProperty, value); }\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            //#if DEBUG\r\n            //            return value;\r\n            //#endif\r\n\r\n            if (!(value is TLInt)) return value;\r\n\r\n            var clientDelta = IoC.Get<IMTProtoService>().ClientTicksDelta;\r\n            //var utc0SecsLong = ((TLInt)value).Value * 4294967296 - clientDelta;\r\n            var utc0SecsInt = ((TLInt)value).Value - clientDelta / 4294967296.0;\r\n\r\n            var dateTime = Telegram.Api.Helpers.Utils.UnixTimestampToDateTime(utc0SecsInt);\r\n\r\n            //var tzi = TimeZoneInfo.Local;\r\n            //Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName;\r\n\r\n\r\n            var cultureInfo = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();\r\n            var shortTimePattern = UserStatusToStringConverter.GetShortTimePattern(ref cultureInfo);\r\n\r\n\r\n            //Today\r\n            if ((dateTime.Date == DateTime.Now.Date) && !string.IsNullOrEmpty(TodayFormat))\r\n                return dateTime.ToString(string.Format(TodayFormat, shortTimePattern), cultureInfo);\r\n\r\n            //Yesterday\r\n            if ((dateTime.Date.AddDays(1) == DateTime.Now.Date) && !string.IsNullOrEmpty(YesterdayString))\r\n                return YesterdayString;\r\n\r\n            if ((dateTime.Date.AddDays(1) == DateTime.Now.Date) && !string.IsNullOrEmpty(YesterdayFormat))\r\n                return dateTime.ToString(string.Format(YesterdayFormat, shortTimePattern), cultureInfo);\r\n\r\n            //Long time ago (no more than one year ago)\r\n            if (dateTime.Date.AddDays(365) >= DateTime.Now.Date && !string.IsNullOrEmpty(RegularFormat))\r\n                return dateTime.ToString(string.Format(RegularFormat, shortTimePattern), cultureInfo);\r\n\r\n            //Long long time ago\r\n            return dateTime.ToString(string.Format(LongRegularFormat, shortTimePattern), cultureInfo);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class DialogTLIntToDateTimeConverter : DependencyObject, IValueConverter\r\n    {\r\n        public static readonly DependencyProperty TodayFormatProperty =\r\n            DependencyProperty.Register(\"TodayFormat\",\r\n                                        typeof(string), typeof(DialogTLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string TodayFormat\r\n        {\r\n            get { return (string)GetValue(TodayFormatProperty); }\r\n            set { SetValue(TodayFormatProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty WeekFormatProperty =\r\n            DependencyProperty.Register(\"WeekFormat\",\r\n                                        typeof(string), typeof(DialogTLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string WeekFormat\r\n        {\r\n            get { return (string)GetValue(WeekFormatProperty); }\r\n            set { SetValue(WeekFormatProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty RegularFormatProperty =\r\n            DependencyProperty.Register(\"RegularFormat\",\r\n                                        typeof(string), typeof(DialogTLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string RegularFormat\r\n        {\r\n            get { return (string)GetValue(RegularFormatProperty); }\r\n            set { SetValue(RegularFormatProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty LongRegularFormatProperty =\r\n            DependencyProperty.Register(\"LongRegularFormat\",\r\n                                        typeof(string), typeof(DialogTLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string LongRegularFormat\r\n        {\r\n            get { return (string)GetValue(LongRegularFormatProperty); }\r\n            set { SetValue(LongRegularFormatProperty, value); }\r\n        }\r\n\r\n        public static string Convert(TLInt date, string TodayFormat, string WeekFormat, string RegularFormat, string LongRegularFormat)\r\n        {\r\n            var clientDelta = IoC.Get<IMTProtoService>().ClientTicksDelta;\r\n            //var utc0SecsLong = date.Value * 4294967296 - clientDelta;\r\n            var utc0SecsInt = date.Value - clientDelta / 4294967296.0;\r\n            var dateTime = Telegram.Api.Helpers.Utils.UnixTimestampToDateTime(utc0SecsInt);\r\n\r\n            var cultureInfo = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();\r\n            var shortTimePattern = UserStatusToStringConverter.GetShortTimePattern(ref cultureInfo);\r\n\r\n            //Today\r\n            if ((dateTime.Date == DateTime.Now.Date) && !string.IsNullOrEmpty(TodayFormat))\r\n                return dateTime.ToString(string.Format(TodayFormat, shortTimePattern), cultureInfo);\r\n\r\n            //Week\r\n            if (dateTime.Date.AddDays(7) >= DateTime.Now.Date && !string.IsNullOrEmpty(WeekFormat))\r\n                return dateTime.ToString(string.Format(WeekFormat, shortTimePattern), cultureInfo);\r\n\r\n            //Long time ago (no more than one year ago)\r\n            if (dateTime.Date.AddDays(365) >= DateTime.Now.Date && !string.IsNullOrEmpty(RegularFormat))\r\n                return dateTime.ToString(string.Format(RegularFormat, shortTimePattern), cultureInfo);\r\n\r\n            //Long long time ago\r\n            return dateTime.ToString(string.Format(LongRegularFormat, shortTimePattern), cultureInfo);\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is TLInt)) return value;\r\n\r\n            return Convert((TLInt)value, TodayFormat, WeekFormat, RegularFormat, LongRegularFormat);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n\r\n    public class DraftDialogTLIntToDateTimeConverter : DependencyObject, IValueConverter\r\n    {\r\n        public static readonly DependencyProperty TodayFormatProperty =\r\n            DependencyProperty.Register(\"TodayFormat\",\r\n                                        typeof(string), typeof(DraftDialogTLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string TodayFormat\r\n        {\r\n            get { return (string)GetValue(TodayFormatProperty); }\r\n            set { SetValue(TodayFormatProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty WeekFormatProperty =\r\n            DependencyProperty.Register(\"WeekFormat\",\r\n                                        typeof(string), typeof(DraftDialogTLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string WeekFormat\r\n        {\r\n            get { return (string)GetValue(WeekFormatProperty); }\r\n            set { SetValue(WeekFormatProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty RegularFormatProperty =\r\n            DependencyProperty.Register(\"RegularFormat\",\r\n                                        typeof(string), typeof(DraftDialogTLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string RegularFormat\r\n        {\r\n            get { return (string)GetValue(RegularFormatProperty); }\r\n            set { SetValue(RegularFormatProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty LongRegularFormatProperty =\r\n            DependencyProperty.Register(\"LongRegularFormat\",\r\n                                        typeof(string), typeof(DraftDialogTLIntToDateTimeConverter),\r\n                                        new PropertyMetadata(default(string)));\r\n\r\n        public string LongRegularFormat\r\n        {\r\n            get { return (string)GetValue(LongRegularFormatProperty); }\r\n            set { SetValue(LongRegularFormatProperty, value); }\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            TLInt date = null;\r\n            var dialog = value as TLDialog;\r\n            if (dialog != null)\r\n            {\r\n                var dialog71 = dialog as TLDialog71;\r\n                if (dialog71 != null && dialog71.IsPromo)\r\n                {\r\n                    return AppResources.ProxySponsor;\r\n                }\r\n\r\n                var dialog53 = dialog as TLDialog53;\r\n                if (dialog53 != null)\r\n                {\r\n                    var messageCommon = dialog.TopMessage as TLMessageCommon;\r\n                    if (messageCommon != null)\r\n                    {\r\n                        date = messageCommon.Date;\r\n                    }\r\n\r\n                    var draft = dialog53.Draft as TLDraftMessage;\r\n                    if (draft != null)\r\n                    {\r\n                        if (date == null || draft.Date.Value > date.Value)\r\n                        {\r\n                            date = draft.Date;\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    var messageCommon = dialog.TopMessage as TLMessageCommon;\r\n                    if (messageCommon != null)\r\n                    {\r\n                        date = messageCommon.Date;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var encryptedDialog = value as TLEncryptedDialog;\r\n            if (encryptedDialog != null)\r\n            {\r\n                var messageCommon = encryptedDialog.TopMessage;\r\n                if (messageCommon != null)\r\n                {\r\n                    date = messageCommon.Date;\r\n                }\r\n            }\r\n\r\n            if (date == null) return null;\r\n\r\n            return DialogTLIntToDateTimeConverter.Convert(date, TodayFormat, WeekFormat, RegularFormat, LongRegularFormat);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/TestBindingConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class TestBindingConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            TLUtils.WritePerformance(\"==TestBindingConverter\");\r\n\r\n            return value;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/TextMessageToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class TextMessageToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var message = value as TLMessage;\r\n            if (message == null) return Visibility.Collapsed;\r\n\r\n            if (TLString.IsNullOrEmpty(message.Message)) return Visibility.Collapsed;\r\n\r\n            return Visibility.Visible;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class MediaFileAvailableToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var message = value as TLMessage;\r\n            if (message == null) return Visibility.Collapsed;\r\n\r\n\r\n#if WP8\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                var file = mediaDocument.File;\r\n\r\n                if (file == null)\r\n                {\r\n                    var document = mediaDocument.Document as TLDocument;\r\n                    if (document != null)\r\n                    {\r\n                        var localFileName = document.GetFileName() ?? string.Empty;\r\n                        var globalFileName = mediaDocument.IsoFileName ?? string.Empty;\r\n                        var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                        if (store.FileExists(localFileName) || store.FileExists(globalFileName) \r\n#if WP81\r\n                            || File.Exists(globalFileName)\r\n#endif\r\n                            )\r\n                        {\r\n                            return Visibility.Visible;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return file != null? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n\r\n            var mediaVideo = message.Media as TLMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                var file = mediaVideo.File;\r\n\r\n                if (file == null)\r\n                {\r\n                    var video = mediaVideo.Video as TLVideo;\r\n                    if (video != null)\r\n                    {\r\n                        var localFileName = video.GetFileName() ?? string.Empty;\r\n                        var globalFileName = mediaVideo.IsoFileName ?? string.Empty;\r\n                        var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                        if (store.FileExists(localFileName) || store.FileExists(globalFileName) \r\n#if WP81\r\n                            || File.Exists(globalFileName)\r\n#endif\r\n                            )\r\n                        {\r\n                            return Visibility.Visible;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return file != null ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n#endif\r\n\r\n            return Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/TextSizeToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class TextSizeToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is int))\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n\r\n            return (int) value > 1500 ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/UnreadCountToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class UnreadCountToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var unreadCount = value as TLInt;\r\n            if (unreadCount == null) return Visibility.Collapsed;\r\n\r\n            return unreadCount.Value == 0 ? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/UnreadMessageConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class UnreadMessageConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var unread = value as TLBool;\r\n            if (unread != null)\r\n            {\r\n                return unread.Value ? \"U\" : \"R\";\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/UnregisteredUserIdToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class ContactToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var userBase = value as TLUserBase;\r\n            return userBase != null && (userBase.IsContact || userBase.IsSelf) ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class SearchResultStatusToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var userBase = value as TLUserBase;\r\n            if (userBase != null)\r\n            {\r\n                return Visibility.Visible;\r\n            }\r\n\r\n            var chat = value as TLChat;\r\n            if (chat != null)\r\n            {\r\n                return Visibility.Visible;\r\n            }\r\n\r\n            return Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/UppercaseConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class UppercaseConverter : IValueConverter\r\n    {\r\n        #region Implementation of IValueConverter\r\n\r\n        /// <summary>\r\n        /// Modifies the source data before passing it to the target for display in the UI.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the target dependency property.\r\n        /// </returns>\r\n        /// <param name=\"value\">The source data being passed to the target.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the target dependency property.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is string)) return null;\r\n\r\n            return Convert(value.ToString());\r\n        }\r\n\r\n\r\n        public static string Convert(string value)\r\n        {\r\n            return value.ToUpperInvariant();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Modifies the target data before passing it to the source object.  This method is called only in <see cref=\"F:System.Windows.Data.BindingMode.TwoWay\"/> bindings.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the source object.\r\n        /// </returns>\r\n        /// <param name=\"value\">The target data being passed to the source.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the source object.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/UserStatusToBrushConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class UserStatusToBrushConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var userBase = value as TLUserBase;\r\n            if (userBase == null) return Application.Current.Resources[\"PhoneSubtleBrush\"];\r\n\r\n            var user = userBase as TLUser;\r\n            if (user != null)\r\n            {\r\n                if (user.IsBot)\r\n                {\r\n                    return Application.Current.Resources[\"PhoneSubtleBrush\"];\r\n                }\r\n            }\r\n\r\n            var statusOnline = userBase.Status as TLUserStatusOnline;\r\n            if (statusOnline != null) return Application.Current.Resources[\"TelegramAccentBrush\"];\r\n\r\n            return Application.Current.Resources[\"PhoneSubtleBrush\"];\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/UserStatusToStringConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Threading;\r\nusing System.Windows.Data;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Utils;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class UserStatusToStringConverter : IValueConverter\r\n    {\r\n        public static string GetShortTimePattern(ref CultureInfo ci)\r\n        {\r\n            if (ci.DateTimeFormat.ShortTimePattern.Contains(\"H\"))\r\n            {\r\n                return \"H:mm\";\r\n            }\r\n\r\n            ci.DateTimeFormat.AMDesignator = \"am\";\r\n            ci.DateTimeFormat.PMDesignator = \"pm\";\r\n            return \"h:mmt\";\r\n        }\r\n\r\n        public static string Convert(TLUserStatus status)\r\n        {\r\n            if (status == null)\r\n            {\r\n                return AppResources.LastSeenLongTimeAgo;\r\n            }\r\n\r\n            if (!(status is TLUserStatusEmpty))\r\n            {\r\n                if (status is TLUserStatusOnline)\r\n                {\r\n                    return LowercaseConverter.Convert(AppResources.Online);\r\n                }\r\n\r\n                if (status is TLUserStatusRecently)\r\n                {\r\n                    return LowercaseConverter.Convert(AppResources.LastSeenRecently);\r\n                }\r\n\r\n                if (status is TLUserStatusLastMonth)\r\n                {\r\n                    return LowercaseConverter.Convert(AppResources.LastSeenWithinMonth);\r\n                }\r\n\r\n                if (status is TLUserStatusLastWeek)\r\n                {\r\n                    return LowercaseConverter.Convert(AppResources.LastSeenWithinWeek);\r\n                }\r\n\r\n                if (status is TLUserStatusOffline)\r\n                {\r\n                    var cultureInfo = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();\r\n                    var shortTimePattern = GetShortTimePattern(ref cultureInfo);\r\n\r\n                    var clientDelta = IoC.Get<IMTProtoService>().ClientTicksDelta;\r\n                    //var utc0SecsLong = (((TLUserStatusOffline)status).WasOnline).Value * 4294967296 - clientDelta;\r\n                    var utc0SecsInt = ((TLUserStatusOffline)status).WasOnline.Value - clientDelta / 4294967296.0;\r\n\r\n                    //var utc0SecsInt = (((TLUserStatusOffline) status).WasOnline).Value;\r\n                    var lastSeen = Telegram.Api.Helpers.Utils.UnixTimestampToDateTime(utc0SecsInt);\r\n\r\n                    var lastSeenTimeSpan = DateTime.Now - lastSeen;\r\n\r\n                    // Just now\r\n                    if (lastSeenTimeSpan.TotalMinutes <= 1)\r\n                    {\r\n                        return AppResources.LastSeenJustNow.ToLowerInvariant();\r\n                    }\r\n\r\n                    // Up to one hour\r\n                    if (lastSeenTimeSpan < TimeSpan.FromMinutes(60.0))\r\n                    {\r\n                        var minutes = Language.Declension(\r\n                            lastSeenTimeSpan.Minutes == 0 ? 1 : lastSeenTimeSpan.Minutes,\r\n                            AppResources.MinuteAccusative,\r\n                            null,\r\n                            AppResources.MinuteGenitiveSingular,\r\n                            AppResources.MinuteGenitivePlural,\r\n                            lastSeenTimeSpan.Minutes < 2\r\n                                ? string.Format(\"{1} {0}\", AppResources.MinuteNominativeSingular, 1).ToLowerInvariant()\r\n                                : string.Format(\"{1} {0}\", AppResources.MinuteNominativePlural, Math.Abs(lastSeenTimeSpan.Minutes))).ToLowerInvariant();\r\n\r\n                        return string.Format(AppResources.LastSeen, minutes).ToLowerInvariant();\r\n                    }\r\n\r\n                    // Today\r\n                    if (lastSeen.Date == DateTime.Now.Date)\r\n                    {\r\n                        return string.Format(\r\n                            AppResources.LastSeenTodayAt.ToLowerInvariant(),\r\n                            new DateTime(lastSeen.TimeOfDay.Ticks).ToString(shortTimePattern, cultureInfo));\r\n                    }\r\n\r\n                    // Yesterday\r\n                    if (lastSeen.Date.AddDays(1.0) == DateTime.Now.Date)\r\n                    {\r\n                        return string.Format(\r\n                            AppResources.LastSeenYesterdayAt.ToLowerInvariant(),\r\n                            new DateTime(lastSeen.TimeOfDay.Ticks).ToString(shortTimePattern, cultureInfo));\r\n                    }\r\n\r\n                    // this year\r\n                    if (lastSeen.Date.AddDays(365) >= DateTime.Now.Date)\r\n                    {\r\n                        return string.Format(\r\n                            AppResources.LastSeenAtDate.ToLowerInvariant(),\r\n                            lastSeen.ToString(AppResources.UserStatusDayFormat, cultureInfo),\r\n                            new DateTime(lastSeen.TimeOfDay.Ticks).ToString(shortTimePattern, cultureInfo));\r\n                    }\r\n\r\n                    return string.Format(\r\n                        AppResources.LastSeenAtDate.ToLowerInvariant(),\r\n                        lastSeen.ToString(AppResources.UserStatusYearDayFormat, cultureInfo),\r\n                        new DateTime(lastSeen.TimeOfDay.Ticks).ToString(shortTimePattern, cultureInfo));\r\n                }\r\n                \r\n            }\r\n\r\n            return LowercaseConverter.Convert(AppResources.LastSeenLongTimeAgo);\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var userBase = value as TLUserBase;\r\n            if (userBase == null) return null;\r\n\r\n            var user = userBase as TLUser;\r\n            if (user != null)\r\n            {\r\n                if (user.IsBot)\r\n                {\r\n                    if (user.IsBotAllHistory)\r\n                    {\r\n                        return AppResources.SeesAllMessages.ToLowerInvariant();\r\n                    }\r\n\r\n                    return AppResources.OnlySeesMessagesStartingWithSlash.ToLowerInvariant();\r\n                }\r\n\r\n                //if (user.IsSelf)\r\n                //{\r\n                //    return AppResources.ChatWithYourself.ToLowerInvariant();\r\n                //}\r\n            }\r\n\r\n            var status = userBase.Status;\r\n            if (status == null) return LowercaseConverter.Convert(AppResources.LastSeenLongTimeAgo);\r\n\r\n            return Convert(status);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class EditDateToStringConverter : IValueConverter\r\n    {\r\n        public static string GetShortTimePattern(ref CultureInfo ci)\r\n        {\r\n            if (ci.DateTimeFormat.ShortTimePattern.Contains(\"H\"))\r\n            {\r\n                return \"H:mm\";\r\n            }\r\n\r\n            ci.DateTimeFormat.AMDesignator = \"am\";\r\n            ci.DateTimeFormat.PMDesignator = \"pm\";\r\n            return \"h:mmt\";\r\n        }\r\n\r\n        public static string Convert(TLInt editDate)\r\n        {\r\n            if (editDate == null || editDate.Value == 0)\r\n            {\r\n                return AppResources.UpdatedJustNow.ToLowerInvariant();\r\n            }\r\n\r\n            var cultureInfo = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();\r\n            var shortTimePattern = GetShortTimePattern(ref cultureInfo);\r\n\r\n            var clientDelta = IoC.Get<IMTProtoService>().ClientTicksDelta;\r\n            //var utc0SecsLong = editDate.Value * 4294967296 - clientDelta;\r\n            var utc0SecsInt = editDate.Value - clientDelta / 4294967296.0;\r\n\r\n            //var utc0SecsInt = (((TLUserStatusOffline) status).WasOnline).Value;\r\n            var editDateTime = Telegram.Api.Helpers.Utils.UnixTimestampToDateTime(utc0SecsInt);\r\n\r\n            var editTimeSpan = DateTime.Now - editDateTime;\r\n\r\n            // Just now\r\n            if (editTimeSpan.TotalMinutes <= 1)\r\n            {\r\n                return AppResources.UpdatedJustNow.ToLowerInvariant();\r\n            }\r\n\r\n            // Up to one hour\r\n            if (editTimeSpan < TimeSpan.FromMinutes(60.0))\r\n            {\r\n                var minutes = Language.Declension(\r\n                    editTimeSpan.Minutes == 0 ? 1 : editTimeSpan.Minutes,\r\n                    AppResources.MinuteAccusative,\r\n                    null,\r\n                    AppResources.MinuteGenitiveSingular,\r\n                    AppResources.MinuteGenitivePlural,\r\n                    editTimeSpan.Minutes < 2\r\n                        ? string.Format(\"{1} {0}\", AppResources.MinuteNominativeSingular, 1).ToLowerInvariant()\r\n                        : string.Format(\"{1} {0}\", AppResources.MinuteNominativePlural, Math.Abs(editTimeSpan.Minutes))).ToLowerInvariant();\r\n\r\n                return string.Format(AppResources.UpdatedAgo, minutes).ToLowerInvariant();\r\n            }\r\n\r\n            // Today\r\n            if (editDateTime.Date == DateTime.Now.Date)\r\n            {\r\n                return string.Format(\r\n                    AppResources.UpdatedTodayAt,\r\n                    new DateTime(editDateTime.TimeOfDay.Ticks).ToString(shortTimePattern, cultureInfo)).ToLowerInvariant();\r\n            }\r\n\r\n            // Yesterday\r\n            if (editDateTime.Date.AddDays(1.0) == DateTime.Now.Date)\r\n            {\r\n                return string.Format(\r\n                    AppResources.UpdatedYesterdayAt,\r\n                    new DateTime(editDateTime.TimeOfDay.Ticks).ToString(shortTimePattern, cultureInfo)).ToLowerInvariant();\r\n            }\r\n\r\n            // this year\r\n            if (editDateTime.Date.AddDays(365) >= DateTime.Now.Date)\r\n            {\r\n                return string.Format(\r\n                    AppResources.UpdatedAtDate,\r\n                    editDateTime.ToString(AppResources.UserStatusDayFormat, cultureInfo),\r\n                    new DateTime(editDateTime.TimeOfDay.Ticks).ToString(shortTimePattern, cultureInfo)).ToLowerInvariant();\r\n            }\r\n\r\n            return string.Format(\r\n                AppResources.UpdatedAtDate,\r\n                editDateTime.ToString(AppResources.UserStatusYearDayFormat, cultureInfo),\r\n                new DateTime(editDateTime.TimeOfDay.Ticks).ToString(shortTimePattern, cultureInfo)).ToLowerInvariant();\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return Convert(value as TLInt);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class SearchResultStatusToStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var userBase = value as TLUserBase;\r\n            if (userBase != null)\r\n            {\r\n                var user = userBase as TLUser;\r\n                if (user != null)\r\n                {\r\n                    if (user.IsBot)\r\n                    {\r\n                        return AppResources.Bot.ToLowerInvariant();\r\n                    }\r\n                }\r\n\r\n                var status = userBase.Status;\r\n                if (status == null) return LowercaseConverter.Convert(AppResources.LastSeenLongTimeAgo);\r\n\r\n                return UserStatusToStringConverter.Convert(status);\r\n            }\r\n\r\n            var channel = value as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var chat = value as TLChat;\r\n            if (chat != null)\r\n            {\r\n                var participantsCount = chat.ParticipantsCount.Value;\r\n\r\n                return Language.Declension(\r\n                    participantsCount,\r\n                    AppResources.CompanyNominativeSingular,\r\n                    AppResources.CompanyNominativePlural,\r\n                    AppResources.CompanyGenitiveSingular,\r\n                    AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class ViaBotToStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var userBase = value as IUserName;\r\n            if (userBase == null) return null;\r\n\r\n            return string.Format(AppResources.Via.ToLowerInvariant(), \"@\" + userBase.UserName);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class DecryptedViaBotToStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var viaBot = value as TLString;\r\n            if (viaBot == null) return null;\r\n\r\n            return string.Format(AppResources.Via, \"@\" + viaBot).ToLowerInvariant();\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/UserStatusToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class UserStatusToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var statusOnline = value as TLUserStatusOnline;\r\n            if (statusOnline != null)\r\n            {\r\n                return Visibility.Visible;\r\n            }\r\n\r\n            return Visibility.Collapsed;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/UserToActionStringConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class UserToActionStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var userBase = value as TLUserBase;\r\n            if (userBase != null && userBase.IsRequest)\r\n            {\r\n                return AppResources.AddToContacts.ToUpperInvariant();\r\n            }\r\n\r\n            if (userBase != null && userBase.IsForeign)\r\n            {\r\n                return AppResources.ShareMyContactInfo.ToUpperInvariant();\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Converters/WP8VisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class WP8VisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n#if WP8\r\n            return Visibility.Visible;\r\n#else\r\n            return Visibility.Collapsed;\r\n#endif\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class WP81VisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n#if WP81\r\n            return Visibility.Visible;\r\n#else\r\n            return Visibility.Collapsed;\r\n#endif\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/EmojiKeyboardTemplateSelector.cs",
    "content": "using System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing TelegramClient.Views.Dialogs;\r\n\r\nnamespace TelegramClient\r\n{\r\n    public class EmojiKeyboardTemplateSelector : DependencyObject, IValueConverter\r\n    {\r\n        public static readonly DependencyProperty EmojiKeyboardTemplateProperty =\r\n            DependencyProperty.Register(\"EmojiKeyboardTemplate\", typeof (DataTemplate), typeof (EmojiKeyboardTemplateSelector), new PropertyMetadata(default(DataTemplate)));\r\n\r\n        public DataTemplate EmojiKeyboardTemplate\r\n        {\r\n            get { return (DataTemplate) GetValue(EmojiKeyboardTemplateProperty); }\r\n            set { SetValue(EmojiKeyboardTemplateProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty EmptyTemplateProperty =\r\n            DependencyProperty.Register(\"EmptyTemplate\", typeof (DataTemplate), typeof (EmojiKeyboardTemplateSelector), new PropertyMetadata(default(DataTemplate)));\r\n\r\n        public DataTemplate EmptyTemplate\r\n        {\r\n            get { return (DataTemplate) GetValue(EmptyTemplateProperty); }\r\n            set { SetValue(EmptyTemplateProperty, value); }\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return value is EmojiKeyboard ? EmojiKeyboardTemplate : EmptyTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/EmojiPanel/Controls/Emoji/EmojiControl.xaml",
    "content": "﻿<UserControl x:Class=\"Telegram.EmojiPanel.Controls.Emoji.EmojiControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:utilites=\"clr-namespace:Telegram.EmojiPanel.Controls.Utilites\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"Self\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <Style x:Key=\"CategoryButtonBaseStyle\" TargetType=\"Button\">\r\n            <Setter Property=\"Margin\" Value=\"3 0 3 0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid x:Name=\"ContentGrid\" Background=\"{TemplateBinding Background}\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ContentGrid\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n\r\n                            <ContentControl x:Name=\"ContentContainer\"\r\n                                            ContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n                                            Content=\"{TemplateBinding Content}\" />\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        \r\n        <Style x:Key=\"CategoryButtonDarkThemeStyle\" TargetType=\"Button\" BasedOn=\"{StaticResource CategoryButtonBaseStyle}\">\r\n            <Setter Property=\"Background\" Value=\"#FF474747\"/>\r\n        </Style>\r\n\r\n        <Style x:Key=\"CategoryButtonLightThemeStyle\" TargetType=\"Button\" BasedOn=\"{StaticResource CategoryButtonBaseStyle}\">\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        </Style>\r\n\r\n        <Style x:Key=\"RepeatButtonBaseStyle\" TargetType=\"RepeatButton\">\r\n            <Setter Property=\"Margin\" Value=\"3 0 3 0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"RepeatButton\">\r\n                        <Grid x:Name=\"ContentGrid\" Background=\"{TemplateBinding Background}\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ContentGrid\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n\r\n                            <ContentControl x:Name=\"ContentContainer\"\r\n                                            ContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n                                            Content=\"{TemplateBinding Content}\" />\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"RepeatButtonDarkThemeStyle\" TargetType=\"RepeatButton\" BasedOn=\"{StaticResource RepeatButtonBaseStyle}\">\r\n            <Setter Property=\"Background\" Value=\"#FF474747\"/>\r\n        </Style>\r\n\r\n        <Style x:Key=\"RepeatButtonLightThemeStyle\" TargetType=\"RepeatButton\" BasedOn=\"{StaticResource RepeatButtonBaseStyle}\">\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"EmojiContainer\"\r\n          Visibility=\"Visible\">\r\n        <Grid Background=\"{StaticResource PhoneChromeBrush}\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"*\" />\r\n                <RowDefinition Height=\"Auto\" />\r\n            </Grid.RowDefinitions>\r\n\r\n            <ProgressBar x:Name=\"LoadingProgressBar\" IsIndeterminate=\"True\"/>\r\n\r\n            <ScrollViewer Grid.Row=\"0\" Margin=\"0\" Padding=\"0\" x:Name=\"CSV\">\r\n                <utilites:MyVirtualizingPanel \r\n                    x:Name=\"VirtPanel\" \r\n                    Margin=\"0,3,0,0\"  \r\n                    VerticalAlignment=\"Top\" \r\n                    UseOptimizedManipulationRouting=\"False\"\r\n                    ManipulationStarted=\"StickerPanel_ManipulationStarted\"\r\n                    ManipulationDelta=\"StickerPanel_ManipulationDelta\"\r\n                    ManipulationCompleted=\"StickerPanel_ManipulationCompleted\"/>\r\n            </ScrollViewer>\r\n            <ScrollViewer Grid.Row=\"0\" Margin=\"0\" Padding=\"0\" x:Name=\"FeaturedStickersCSV\" Visibility=\"Collapsed\">\r\n                <utilites:MyVirtualizingPanel \r\n                    x:Name=\"FeaturedStickersVirtPanel\"\r\n                    Margin=\"0,3,0,0\"  \r\n                    VerticalAlignment=\"Top\" \r\n                    UseOptimizedManipulationRouting=\"False\"\r\n                    ManipulationStarted=\"FeaturedStickersPanel_ManipulationStarted\"\r\n                    ManipulationDelta=\"StickerPanel_ManipulationDelta\"\r\n                    ManipulationCompleted=\"StickerPanel_ManipulationCompleted\"/>\r\n            </ScrollViewer>\r\n            \r\n            <StackPanel Margin=\"0,116,0,0\" VerticalAlignment=\"Top\" x:Name=\"NoStickersPlaceholder\" Visibility=\"Collapsed\" IsHitTestVisible=\"False\">\r\n                <Border Background=\"{StaticResource PhoneSubtleBrush}\" Width=\"120\" Height=\"120\">\r\n                    <Border.OpacityMask>\r\n                        <ImageBrush ImageSource=\"/Assets/emoji.stickers_none.png\"/>\r\n                    </Border.OpacityMask>\r\n                </Border>\r\n                <TextBlock TextAlignment=\"Center\" Margin=\"18\" Text=\"{Binding Resources.NoStickersFound, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            </StackPanel>\r\n            \r\n            <Grid x:Name=\"Preview\" Grid.Row=\"0\" Visibility=\"Collapsed\" IsHitTestVisible=\"False\">\r\n                <Border Opacity=\"0.5\" Background=\"{StaticResource PhoneBackgroundBrush}\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"/>\r\n                <Grid x:Name=\"PreviewGrid\" RenderTransformOrigin=\"0.5,0.5\" Loaded=\"StickerPreviewGrid_OnLoaded\" Width=\"96\" Height=\"96\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                    <Grid.RenderTransform>\r\n                        <CompositeTransform ScaleX=\"2.6\" ScaleY=\"2.6\"/>\r\n                    </Grid.RenderTransform>\r\n                    <Image x:Name=\"PreviewImage\"/>\r\n                    <Image x:Name=\"Image\" Source=\"{Binding Document, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                </Grid>\r\n            </Grid>\r\n\r\n            <!-- recent panel-->\r\n            <Border Background=\"{StaticResource PhoneChromeBrush}\" Grid.Row=\"0\" Margin=\"0\" Padding=\"0\" x:Name=\"Recents\" Visibility=\"Collapsed\">\r\n                <ItemsControl ItemsSource=\"{Binding RecentItems, ElementName=Self}\" Margin=\"3,4,3,0\">\r\n                    <ItemsControl.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <Border \r\n                                MouseLeftButtonDown=\"UIElement_OnMouseLeftButtonDown\"\r\n                                MouseLeftButtonUp=\"UIElement_OnMouseLeftButtonUp\"\r\n                                MouseLeave=\"UIElement_OnMouseLeave\"\r\n                                Tap=\"EmojiButton_OnTap\" \r\n                                Width=\"77\" Height=\"68\" Margin=\"1\" \r\n                                Background=\"{Binding ButtonBackground, ElementName=Self}\">\r\n                                <Image Width=\"42\" Source=\"{Binding Uri}\">\r\n                                    <Image.RenderTransform>\r\n                                        <TranslateTransform Y=\"-1\"/>\r\n                                    </Image.RenderTransform>\r\n                                </Image>\r\n                            </Border>\r\n                        </DataTemplate>\r\n                    </ItemsControl.ItemTemplate>\r\n                    <ItemsControl.ItemsPanel>\r\n                        <ItemsPanelTemplate>\r\n                            <toolkit:WrapPanel/>\r\n                        </ItemsPanelTemplate>\r\n                    </ItemsControl.ItemsPanel>\r\n                    <ItemsControl.Template>\r\n                        <ControlTemplate TargetType=\"ItemsControl\">\r\n                            <ScrollViewer HorizontalScrollBarVisibility=\"Disabled\" VerticalScrollBarVisibility=\"Auto\">\r\n                                <ItemsPresenter Margin=\"0\"/>\r\n                            </ScrollViewer>\r\n                        </ControlTemplate>\r\n                    </ItemsControl.Template>\r\n                </ItemsControl>\r\n            </Border>\r\n\r\n            <Grid x:Name=\"ButtonsGrid\"\r\n                  Grid.Row=\"1\" \r\n                  Height=\"78\"\r\n                  Margin=\"0 6 0 0\"\r\n                  Background=\"{StaticResource PhoneChromeBrush}\">\r\n                <!-- Buttons are created code behind -->\r\n            </Grid>\r\n            <Grid x:Name=\"StickersGrid\"\r\n                  Visibility=\"Collapsed\"\r\n                  Grid.Row=\"1\" \r\n                  Height=\"78\"\r\n                  Margin=\"0 6 0 0\"\r\n                  Background=\"{StaticResource PhoneChromeBrush}\">\r\n                <ScrollViewer x:Name=\"StickersScrollViewer\" VerticalScrollBarVisibility=\"Disabled\" HorizontalScrollBarVisibility=\"Visible\">\r\n                    <StackPanel x:Name=\"StickersPanel\" Orientation=\"Horizontal\"/>\r\n                </ScrollViewer>\r\n                <!-- Buttons are created code behind -->\r\n            </Grid>\r\n            \r\n            <ContentPresenter x:Name=\"StickerPreviewMenuPlaceholder\" Grid.Row=\"0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Bottom\"/>\r\n        </Grid>\r\n\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/EmojiPanel/Controls/Emoji/EmojiControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Shapes;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Microsoft.Devices;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Info;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing Telegram.Controls.VirtualizedView;\r\nusing Telegram.EmojiPanel.Controls.Utilites;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.Views;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Binding = System.Windows.Data.Binding;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing UnreadCounter = Telegram.Controls.UnreadCounter;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Emoji\r\n{\r\n    public partial class EmojiControl\r\n    {\r\n        public static readonly DependencyProperty IsStickersPanelVisibleProperty = DependencyProperty.Register(\r\n            \"IsStickersPanelVisible\", typeof (bool), typeof (EmojiControl), new PropertyMetadata(OnIsStickersPanelVisible));\r\n\r\n        private static void OnIsStickersPanelVisible(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var emojiControl = d as EmojiControl;\r\n            if (emojiControl != null)\r\n            {\r\n                emojiControl.UpdateButtons((bool)e.NewValue);\r\n            }\r\n        }\r\n\r\n        public bool IsStickersPanelVisible\r\n        {\r\n            get { return (bool) GetValue(IsStickersPanelVisibleProperty); }\r\n            set { SetValue(IsStickersPanelVisibleProperty, value); }\r\n        }\r\n\r\n        private List<VListItemBase> _category1Sprites;\r\n        private List<VListItemBase> _category2Sprites;\r\n        private List<VListItemBase> _category3Sprites;\r\n        private List<VListItemBase> _category4Sprites;\r\n        private List<VListItemBase> _category5Sprites;\r\n\r\n        private List<VListItemBase> _recentStickersSprites;\r\n        private List<VListItemBase> _favedStickersSprites;\r\n        private List<VListItemBase> _groupStickersSprites;\r\n        private List<List<VListItemBase>> _stickersSprites;\r\n\r\n        public event EventHandler<IsOpenedEventArgs> IsOpenedChanged;\r\n\r\n        private void RaiseIsOpenedChanged(bool isOpened)\r\n        {\r\n            var eventHandler = IsOpenedChanged;\r\n\r\n            if (eventHandler != null)\r\n            {\r\n                eventHandler(this, new IsOpenedEventArgs { IsOpened = isOpened });\r\n            }\r\n        }\r\n\r\n        public event EventHandler SettingsButtonClick;\r\n\r\n        protected virtual void RaiseSettingsButtonClick()\r\n        {\r\n            var handler = SettingsButtonClick;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler<StickerSetAddedEventArgs> StickerSetAdded;\r\n\r\n        protected virtual void RaiseStickerSetAdded(StickerSetAddedEventArgs args)\r\n        {\r\n            var handler = StickerSetAdded;\r\n            if (handler != null) handler(this, args);\r\n        }\r\n\r\n        public TextBox TextBoxTarget { get; set; }\r\n\r\n        private const int FirstStickerSliceCount = 3;\r\n\r\n        private const int FeaturedStickersSliceCount = 10;\r\n\r\n        private const int AlbumOrientationHeight = 328;\r\n\r\n        public const int PortraitOrientationHeight100 = 408;\r\n\r\n        public const int PortraitOrientationHeight100WP10 = (int) 341.3333;\r\n\r\n        public const int PortraitOrientationHeight112 = 408;\r\n\r\n        public const int PortraitOrientationHeight112Software = 400;\r\n\r\n        public const int PortraitOrientationHeight150 = 408;\r\n\r\n        public const int PortraitOrientationHeight150Software = 400;\r\n\r\n        public const int PortraitOrientationHeight160 = 408;\r\n\r\n        public const int PortraitOrientationHeight160WP10 = (int) 341.6667;\r\n\r\n        public const int PortraitOrientationHeight225 = 332;\r\n\r\n        public static int PortraitOrientationHeight\r\n        {\r\n            get\r\n            {\r\n#if WP8\r\n                var deviceName = DeviceStatus.DeviceName;\r\n                var appBar = new ApplicationBar();\r\n                switch (Application.Current.Host.Content.ScaleFactor)\r\n                {\r\n                    case 100:   //Lumia 820             WVGA    480x800\r\n                        if (!string.IsNullOrEmpty(deviceName))\r\n                        {\r\n                            deviceName = deviceName.Replace(\"-\", string.Empty).ToLowerInvariant();\r\n\r\n                            //Lumia 640\r\n                            if (deviceName.StartsWith(\"rm1067\")         // 640XL 720x1280 scale=100 wp10\r\n                                )    \r\n                            {\r\n                                return PortraitOrientationHeight100WP10;\r\n                            }\r\n                        }\r\n\r\n                        return PortraitOrientationHeight100;\r\n                        break;\r\n                    case 112:   //Lumia 535             qHD     540x960\r\n                        // Software buttons //Lumia 535\r\n                        if (appBar.DefaultSize == 67.0)\r\n                        {\r\n                            return PortraitOrientationHeight112Software;\r\n                        }\r\n                        \r\n                        return PortraitOrientationHeight112;\r\n                        break;\r\n                    case 150:   //HTC 8X, 730, 830      720p    720x1280\r\n                        //Software buttons  //Lumia 730\r\n                        if (appBar.DefaultSize == 67.0)\r\n                        {\r\n                            return PortraitOrientationHeight150Software;\r\n                        }\r\n\r\n                        return PortraitOrientationHeight150;\r\n                        break;\r\n                    case 160:   //Lumia 925, 1020       WXGA    768x1280\r\n                        if (!string.IsNullOrEmpty(deviceName))\r\n                        {\r\n                            deviceName = deviceName.Replace(\"-\", string.Empty).ToLowerInvariant();\r\n\r\n                            //Lumia 950, 950XL    5,2 5,7 inch   QHD     2560x1440\r\n                            if (deviceName.StartsWith(\"rm1116\")         // 950XL dual sim\r\n                                || deviceName.StartsWith(\"rm1085\")      // 950XL single sim\r\n                                || deviceName.StartsWith(\"rm1118\")      // 950 dual sim\r\n                                || deviceName.StartsWith(\"rm1104\"))     // 950 single sim\r\n                            {\r\n                                return PortraitOrientationHeight160WP10;\r\n                            }\r\n                        }\r\n\r\n\r\n                        return PortraitOrientationHeight160;\r\n                        break;\r\n                    case 225:   // Lumia 1520, 930      1020p   1080x1920  \r\n                        \r\n                        if (!string.IsNullOrEmpty(deviceName))\r\n                        {\r\n                            deviceName = deviceName.Replace(\"-\", string.Empty).ToLowerInvariant();\r\n\r\n                            //Lumia 1520    6 inch 1020p\r\n                            if (deviceName.StartsWith(\"rm937\")\r\n                                || deviceName.StartsWith(\"rm938\")\r\n                                || deviceName.StartsWith(\"rm939\")\r\n                                || deviceName.StartsWith(\"rm940\"))\r\n                            {\r\n                                return PortraitOrientationHeight225;\r\n                            }\r\n                        }\r\n\r\n                        //Lumia 930 other 1020p\r\n                        return PortraitOrientationHeight100;\r\n                        break;\r\n                }\r\n#endif\r\n\r\n                return PortraitOrientationHeight100;\r\n            }\r\n        }\r\n\r\n        private bool _isOpen;\r\n        private bool _isPortrait = true;\r\n        private bool _isTextBoxTargetFocused;\r\n        private bool _isBlocked; // Block IsOpen during animation\r\n        private int _currentCategory;\r\n        private bool _wasRendered;\r\n        private readonly TranslateTransform _frameTransform;\r\n        private static EmojiControl _instance;\r\n\r\n        public static EmojiControl GetInstance()\r\n        {\r\n            return _instance ?? (_instance = new EmojiControl());\r\n        }\r\n\r\n        public static bool TryGetInstance(out EmojiControl instance)\r\n        {\r\n            instance = _instance;\r\n\r\n            return instance != null;\r\n        }\r\n\r\n        public static bool HasInstance\r\n        {\r\n            get { return _instance != null; }\r\n        }\r\n\r\n        public static readonly DependencyProperty RootFrameTransformProperty = DependencyProperty.Register(\r\n                \"RootFrameTransform\",\r\n                typeof(double),\r\n                typeof(EmojiControl),\r\n                new PropertyMetadata(OnRootFrameTransformChanged));\r\n\r\n        public EmojiControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            //var frame = (Frame)Application.Current.RootVisual;\r\n            //_frameTransform = ((TranslateTransform)((TransformGroup)frame.RenderTransform).Children[0]);\r\n            //var binding = new Binding(\"Y\")\r\n            //{\r\n            //    Source = _frameTransform\r\n            //};\r\n            //SetBinding(RootFrameTransformProperty, binding);\r\n\r\n            Preview.Margin = new Thickness(0.0, -(800.0 - PortraitOrientationHeight), 0.0, 0.0);\r\n\r\n\r\n            VirtPanel.InitializeWithScrollViewer(CSV);\r\n            VirtPanel.ScrollPositionChanged += VirtPanel_OnScrollPositionChanged;\r\n            VirtPanel.ScrollStateChanged += VirtPanel_OnScrollStateChanged;\r\n\r\n            FeaturedStickersVirtPanel.InitializeWithScrollViewer(FeaturedStickersCSV);\r\n            FeaturedStickersVirtPanel.ScrollPositionChanged += FeaturedStickersVirtPanel_OnScrollPositionChanged;\r\n            FeaturedStickersVirtPanel.ScrollStateChanged += FeaturedStickersVirtPanel_OnScrollStateChanged;\r\n            //SizeChanged += OnSizeChanged;\r\n            OnSizeChanged(null, null);\r\n\r\n            LoadButtons();\r\n            LoadCachedFeaturedStickersAsync();\r\n            CurrentCategory = 0;\r\n        }\r\n\r\n        private void VirtPanel_OnScrollStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            if (_searchSprite == null || string.IsNullOrEmpty(_searchSprite.Text)) return;\r\n\r\n            if (!e.NewValue)\r\n            {\r\n                var unreadStickerSets = new List<TLStickerSetBase>();\r\n\r\n                var height = CSV.VerticalOffset + CSV.ViewportHeight;\r\n                var lastInViewDisplacement = double.PositiveInfinity;\r\n                MyListItemBase lastInViewItem = null;\r\n                foreach (var child in VirtPanel.Children)\r\n                {\r\n                    var canvasTop = Canvas.GetTop(child);\r\n                    var displacement = Math.Abs(height - canvasTop);\r\n                    if (displacement <= lastInViewDisplacement && canvasTop < height)\r\n                    {\r\n                        var listItem = child as MyListItemBase;\r\n                        if (listItem != null)\r\n                        {\r\n                            lastInViewItem = listItem;\r\n                            lastInViewDisplacement = displacement;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (lastInViewItem != null)\r\n                {\r\n                    foreach (var item in VirtPanel.VirtItems)\r\n                    {\r\n                        var listItem = item.View;\r\n                        if (listItem != null)\r\n                        {\r\n                            var spriteItem = listItem.VirtSource as FeaturedStickerSpriteItem;\r\n                            if (spriteItem != null && spriteItem.StickerSet.Unread)\r\n                            {\r\n                                unreadStickerSets.Add(spriteItem.StickerSet);\r\n                            }\r\n                        }\r\n\r\n                        if (item.View == lastInViewItem)\r\n                        {\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (unreadStickerSets.Count > 0)\r\n                {\r\n                    var id = new TLVector<TLLong>();\r\n                    foreach (var unreadStickerSet in unreadStickerSets)\r\n                    {\r\n                        id.Add(unreadStickerSet.Id);\r\n                    }\r\n\r\n                    var mtProtoService = IoC.Get<IMTProtoService>();\r\n                    mtProtoService.ReadFeaturedStickersAsync(id,\r\n                        result =>\r\n                        {\r\n                            foreach (var unreadStickerSet in unreadStickerSets)\r\n                            {\r\n                                unreadStickerSet.Unread = false;\r\n                            }\r\n\r\n                            if (_featuredStickers != null)\r\n                            {\r\n                                for (var i = 0; i < id.Count; i++)\r\n                                {\r\n                                    for (var j = 0; j < _featuredStickers.Unread.Count; j++)\r\n                                    {\r\n                                        if (_featuredStickers.Unread[j].Value == id[i].Value)\r\n                                        {\r\n                                            _featuredStickers.Unread.RemoveAt(j);\r\n                                            break;\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                var cacheService = IoC.Get<IStateService>();\r\n                                cacheService.SaveFeaturedStickersAsync(_featuredStickers);\r\n                            }\r\n\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                foreach (var unreadStickerSet in unreadStickerSets)\r\n                                {\r\n                                    unreadStickerSet.NotifyOfPropertyChange(() => unreadStickerSet.Unread);\r\n                                }\r\n                                if (_featuredStickers != null && _featuredStickersCounter != null)\r\n                                {\r\n                                    _featuredStickersCounter.Counter = _featuredStickers.Unread.Count;\r\n                                }\r\n                            });\r\n                        },\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.readFeaturedStickers error=\" + error);\r\n                        }));\r\n                }\r\n\r\n            }\r\n        }\r\n\r\n        private void FeaturedStickersVirtPanel_OnScrollStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            if (CurrentCategory != FeaturedStickersCategoryIndex) return;\r\n\r\n            if (!e.NewValue)\r\n            {\r\n                var unreadStickerSets = new List<TLStickerSetBase>();\r\n\r\n                var height = FeaturedStickersCSV.VerticalOffset + FeaturedStickersCSV.ViewportHeight;\r\n                var lastInViewDisplacement = double.PositiveInfinity;\r\n                MyListItemBase lastInViewItem = null;\r\n                foreach (var child in FeaturedStickersVirtPanel.Children)\r\n                {\r\n                    var canvasTop = Canvas.GetTop(child);\r\n                    var displacement = Math.Abs(height - canvasTop);\r\n                    if (displacement <= lastInViewDisplacement && canvasTop < height)\r\n                    {\r\n                        var listItem = child as MyListItemBase;\r\n                        if (listItem != null)\r\n                        {\r\n                            lastInViewItem = listItem;\r\n                            lastInViewDisplacement = displacement;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (lastInViewItem != null)\r\n                {\r\n                    foreach (var item in FeaturedStickersVirtPanel.VirtItems)\r\n                    {\r\n                        var listItem = item.View;\r\n                        if (listItem != null)\r\n                        {\r\n                            var spriteItem = listItem.VirtSource as FeaturedStickerSpriteItem;\r\n                            if (spriteItem != null && spriteItem.StickerSet.Unread)\r\n                            {\r\n                                unreadStickerSets.Add(spriteItem.StickerSet);\r\n                            }\r\n                        }\r\n\r\n                        if (item.View == lastInViewItem)\r\n                        {\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (unreadStickerSets.Count > 0)\r\n                {\r\n                    var id = new TLVector<TLLong>();\r\n                    foreach (var unreadStickerSet in unreadStickerSets)\r\n                    {\r\n                        id.Add(unreadStickerSet.Id);\r\n                    }\r\n\r\n                    //Execute.ShowDebugMessage(\"message.readFeaturedStickers id=\" + string.Join(\", \", unreadStickerSets.Select(x => x.Id.Value)));\r\n\r\n                    var mtProtoService = IoC.Get<IMTProtoService>();\r\n                    mtProtoService.ReadFeaturedStickersAsync(id,\r\n                        result =>\r\n                        {\r\n                            foreach (var unreadStickerSet in unreadStickerSets)\r\n                            {\r\n                                unreadStickerSet.Unread = false;\r\n                            }\r\n\r\n                            if (_featuredStickers != null)\r\n                            {\r\n                                for (var i = 0; i < id.Count; i++)\r\n                                {\r\n                                    for (var j = 0; j < _featuredStickers.Unread.Count; j++)\r\n                                    {\r\n                                        if (_featuredStickers.Unread[j].Value == id[i].Value)\r\n                                        {\r\n                                            _featuredStickers.Unread.RemoveAt(j);\r\n                                            break;\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                var cacheService = IoC.Get<IStateService>();\r\n                                cacheService.SaveFeaturedStickersAsync(_featuredStickers);\r\n                            }\r\n\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                foreach (var unreadStickerSet in unreadStickerSets)\r\n                                {\r\n                                    unreadStickerSet.NotifyOfPropertyChange(() => unreadStickerSet.Unread);\r\n                                }\r\n                                if (_featuredStickers != null && _featuredStickersCounter != null)\r\n                                {\r\n                                    _featuredStickersCounter.Counter = _featuredStickers.Unread.Count;\r\n                                }\r\n                            });\r\n                        },\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.readFeaturedStickers error=\" + error);  \r\n                        }));\r\n                }\r\n                \r\n            }\r\n        }\r\n\r\n        public void BindTextBox(TextBox textBox, bool isStickersPanelVisible = false)\r\n        {\r\n            TextBoxTarget = textBox;\r\n            UpdateButtons(isStickersPanelVisible);\r\n            textBox.GotFocus += TextBoxOnGotFocus;\r\n            textBox.LostFocus += TextBoxOnLostFocus;\r\n        }\r\n\r\n        public void UnbindTextBox()\r\n        {\r\n            TextBoxTarget.GotFocus -= TextBoxOnGotFocus;\r\n            TextBoxTarget.LostFocus -= TextBoxOnLostFocus;\r\n            TextBoxTarget = null;\r\n        }\r\n\r\n        public bool IsOpen\r\n        {\r\n            get\r\n            {\r\n                return !_isTextBoxTargetFocused && _isOpen;\r\n            }\r\n            set\r\n            {\r\n                // Dont hide EmojiControl when keyboard is shown (or to be shown)\r\n                if (!_isTextBoxTargetFocused && _isOpen == value || _isBlocked) return;\r\n\r\n                if (value)\r\n                {\r\n                    Open();\r\n                }\r\n                else\r\n                {\r\n                    Hide();\r\n                }\r\n\r\n\r\n                RaiseIsOpenedChanged(value);\r\n            }\r\n        }\r\n\r\n        public void SetHeight(double height)\r\n        {\r\n            //return;\r\n            //EmojiContainer.MaxHeight = height;\r\n        }\r\n\r\n        private void Open()\r\n        {\r\n            _isOpen = true;\r\n\r\n            if (TextBoxTarget != null)\r\n            {\r\n                TextBoxTarget.Dispatcher.BeginInvoke(() => VisualStateManager.GoToState(TextBoxTarget, \"Focused\", false));\r\n            }\r\n\r\n            //var frame = (PhoneApplicationFrame)Application.Current.RootVisual;\r\n            EmojiContainer.Visibility = Visibility.Visible;\r\n            ButtonsGrid.Visibility = Visibility.Visible;\r\n            StickersGrid.Visibility = Visibility.Collapsed;\r\n            Deployment.Current.Dispatcher.BeginInvoke(() => LoadCategory(0));\r\n\r\n            //frame.BackKeyPress += OnBackKeyPress;\r\n\r\n            //if (!(EmojiContainer.RenderTransform is TranslateTransform))\r\n            //    EmojiContainer.RenderTransform = new TranslateTransform();\r\n            //var transform = (TranslateTransform)EmojiContainer.RenderTransform;\r\n\r\n            var offset = _isPortrait ? PortraitOrientationHeight : AlbumOrientationHeight;\r\n            SetHeight(offset);\r\n\r\n            //var from = 0;\r\n\r\n            //if (_frameTransform.Y < 0) // Keyboard is in view\r\n            //{\r\n            //    from = (int)_frameTransform.Y;\r\n            //    //_frameTransform.Y = -offset;\r\n            //    //transform.Y = offset;// -72;\r\n            //}\r\n            //transform.Y = offset;// -72\r\n\r\n            //if (from == offset) return;\r\n\r\n            //frame.IsHitTestVisible = false;\r\n            //_isBlocked = true;\r\n\r\n            //var storyboard = new Storyboard();\r\n            //var doubleTransformFrame = new DoubleAnimation\r\n            //{\r\n            //    From = from,\r\n            //    To = -offset,\r\n            //    Duration = TimeSpan.FromMilliseconds(440),\r\n            //    EasingFunction = new ExponentialEase\r\n            //    {\r\n            //        EasingMode = EasingMode.EaseOut,\r\n            //        Exponent = 6\r\n            //    }\r\n            //};\r\n            //storyboard.Children.Add(doubleTransformFrame);\r\n            //Storyboard.SetTarget(doubleTransformFrame, _frameTransform);\r\n            //Storyboard.SetTargetProperty(doubleTransformFrame, new PropertyPath(\"Y\"));\r\n\r\n            //EmojiContainer.Dispatcher.BeginInvoke(async () =>\r\n            //{\r\n            //    storyboard.Begin();\r\n\r\n            //    if (_frameTransform.Y < 0) // Keyboard is in view\r\n            //    {\r\n            //        Focus();\r\n            //        TextBoxTarget.Dispatcher.BeginInvoke(() // no effect without dispatcher\r\n            //            => VisualStateManager.GoToState(TextBoxTarget, \"Focused\", false));\r\n            //    }\r\n\r\n            //    if (_wasRendered) return;\r\n            //    await Task.Delay(50);\r\n            //    LoadCategory(0);\r\n            //});\r\n\r\n            //storyboard.Completed += (sender, args) =>\r\n            //{\r\n            //    frame.IsHitTestVisible = true;\r\n            //    _isBlocked = false;\r\n            //};\r\n        }\r\n\r\n        private void Hide()\r\n        {\r\n            _isOpen = false;\r\n\r\n            VisualStateManager.GoToState(TextBoxTarget, \"Unfocused\", false);\r\n            EmojiContainer.Visibility = Visibility.Collapsed;\r\n\r\n\r\n            //var frame = (PhoneApplicationFrame)Application.Current.RootVisual;\r\n            //frame.BackKeyPress -= OnBackKeyPress;\r\n\r\n            //if (_isTextBoxTargetFocused)\r\n            //{\r\n            //    _frameTransform.Y = 0;\r\n\r\n            //    EmojiContainer.Visibility = Visibility.Collapsed;\r\n\r\n            //    return;\r\n            //}\r\n\r\n            //VisualStateManager.GoToState(TextBoxTarget, \"Unfocused\", false);\r\n\r\n            //frame.IsHitTestVisible = false;\r\n            //_isBlocked = true;\r\n\r\n            //var transform = (TranslateTransform)EmojiContainer.RenderTransform;\r\n\r\n            //var storyboard = new Storyboard();\r\n            //var doubleTransformFrame = new DoubleAnimation\r\n            //{\r\n            //    From = -transform.Y,\r\n            //    To = 0,\r\n            //    Duration = TimeSpan.FromMilliseconds(440),\r\n            //    EasingFunction = new ExponentialEase\r\n            //    {\r\n            //        EasingMode = EasingMode.EaseOut,\r\n            //        Exponent = 6\r\n            //    }\r\n            //};\r\n            //storyboard.Children.Add(doubleTransformFrame);\r\n            //Storyboard.SetTarget(doubleTransformFrame, _frameTransform);\r\n            //Storyboard.SetTargetProperty(doubleTransformFrame, new PropertyPath(\"Y\"));\r\n            //storyboard.Begin();\r\n\r\n            //storyboard.Completed += (sender, args) =>\r\n            //{\r\n            //    EmojiContainer.Visibility = Visibility.Collapsed;\r\n\r\n            //    frame.IsHitTestVisible = true;\r\n            //    _isBlocked = false;\r\n            //    transform.Y = 0;\r\n            //};\r\n\r\n        }\r\n\r\n        #region _isTextBoxTargetFocused listeners\r\n        private void TextBoxOnGotFocus(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            _isTextBoxTargetFocused = true;\r\n        }\r\n        private void TextBoxOnLostFocus(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            _isTextBoxTargetFocused = false;\r\n        }\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Hide instance on pressing hardware Back button. Fires only when instance is opened.\r\n        /// </summary>\r\n        private void OnBackKeyPress(object sender, CancelEventArgs cancelEventArgs)\r\n        {\r\n            IsOpen = false;\r\n            cancelEventArgs.Cancel = true;\r\n        }\r\n\r\n        private void VirtPanel_OnScrollPositionChanged(object sender, MyVirtualizingPanel.ScrollPositionChangedEventAgrs args)\r\n        {\r\n            //System.Diagnostics.Debug.WriteLine(\"scroll_height=\" + scrollPositionChangedEventAgrs.ScrollHeight + \" current_position=\" + scrollPositionChangedEventAgrs.CurrentPosition);\r\n\r\n            EmojiSpriteItem.ClearCurrentHighlight();\r\n        }\r\n\r\n        private void FeaturedStickersVirtPanel_OnScrollPositionChanged(object sender, MyVirtualizingPanel.ScrollPositionChangedEventAgrs args)\r\n        {\r\n            if (CurrentCategory != FeaturedStickersCategoryIndex) return;\r\n\r\n            if (args.CurrentPosition + 2000.0 >= args.ScrollHeight)\r\n            {\r\n                LoadNextFeaturedStickersSlice();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Changes tabs in UI and _currentCategory property\r\n        /// </summary>\r\n        public int CurrentCategory\r\n        {\r\n            get { return _currentCategory; }\r\n            set\r\n            {\r\n                var previousCategory = GetCategoryButtonByIndex(_currentCategory);\r\n                var nextCategory = GetCategoryButtonByIndex(value);\r\n\r\n                if (previousCategory != null)\r\n                    previousCategory.Background = ButtonBackground;\r\n\r\n                nextCategory.Background = (Brush)Application.Current.Resources[\"TelegramBadgeAccentBrush\"];\r\n                _currentCategory = value;\r\n\r\n\r\n                CSV.Visibility = value != FeaturedStickersCategoryIndex\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n\r\n                FeaturedStickersCSV.Visibility = value == FeaturedStickersCategoryIndex\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public void RemoveStickerSet(TLInputStickerSetBase stickerSet)\r\n        {\r\n            var setId = stickerSet.Name;\r\n            if (_featuredStickers != null)\r\n            {\r\n                foreach (var featuredStickerSet in _featuredStickers.Sets)\r\n                {\r\n                    var stickerSet32 = featuredStickerSet as TLStickerSet32;\r\n                    if (stickerSet32 != null && string.Equals(stickerSet32.Id.Value.ToString(), stickerSet.Name))\r\n                    {\r\n                        stickerSet32.Installed = false;\r\n\r\n                        var stickerSet76 = stickerSet32 as TLStickerSet76;\r\n                        if (stickerSet76 != null)\r\n                        {\r\n                            stickerSet76.InstalledDate = null;\r\n                        }\r\n\r\n                        stickerSet32.NotifyOfPropertyChange(() => stickerSet32.Installed);\r\n                    }\r\n                }\r\n            }\r\n            \r\n            if (_stickerSets.ContainsKey(setId))\r\n            {\r\n                _stickerSets.Remove(setId);\r\n\r\n                var stateService = IoC.Get<IStateService>();\r\n                stateService.GetAllStickersAsync(cachedStickers =>\r\n                {\r\n                    var allStickers43 = cachedStickers as TLAllStickers43;\r\n                    if (allStickers43 != null && allStickers43.RecentStickers != null)\r\n                    {\r\n                        List<TLDocument22> recentStickers;\r\n                        if (_stickerSets.TryGetValue(@\"tlg/recentlyUsed\", out recentStickers))\r\n                        {\r\n                            var recentStickersCache = new Dictionary<long, long>();\r\n                            for (var i = 0; i < recentStickers.Count; i++)\r\n                            {\r\n                                if (recentStickers[i].StickerSet.Name == setId)\r\n                                {\r\n                                    recentStickersCache[recentStickers[i].Id.Value] = recentStickers[i].Id.Value;\r\n                                    recentStickers.RemoveAt(i--);\r\n\r\n                                    _reloadStickerSprites = true;\r\n                                }\r\n                            }\r\n\r\n                            for (var i = 0; i < allStickers43.RecentStickers.Documents.Count; i++)\r\n                            {\r\n                                var recentSticker = allStickers43.RecentStickers.Documents[i];\r\n                                if (recentStickersCache.ContainsKey(recentSticker.Id.Value))\r\n                                {\r\n                                    allStickers43.RecentStickers.Documents.RemoveAt(i--);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    stateService.SaveAllStickersAsync(cachedStickers);\r\n\r\n                    UpdateStickersPanel(CurrentCategory);\r\n                    //UpdateStickersPanel(StickerCategoryIndex);\r\n                });\r\n            }\r\n\r\n            //UpdateAllStickersAsync();\r\n        }\r\n\r\n        public void AddStickerSet(TLMessagesStickerSet stickerSet)\r\n        {\r\n            var stateService = IoC.Get<IStateService>();\r\n            stateService.GetAllStickersAsync(cachedStickers =>\r\n            {\r\n                CreateSetsAndUpdatePanel(_currentCategory, cachedStickers);\r\n            });\r\n            //var setId = stickerSet.Set.Id.ToString();\r\n            //if (_stickerSets.Count > 0\r\n            //    && !_stickerSets.ContainsKey(setId))\r\n            //{\r\n            //    var stickers = new List<TLDocument22>();\r\n            //    foreach (var document in stickerSet.Documents)\r\n            //    {\r\n            //        var document22 = document as TLDocument22;\r\n            //        if (document22 != null)\r\n            //        {\r\n            //            stickers.Add(document22);\r\n            //        }\r\n            //    }\r\n\r\n            //    _stickerSets[setId] = stickers;\r\n\r\n            //    UpdateStickersPanel(_currentCategory);\r\n            //}\r\n\r\n            //UpdateAllStickersAsync();\r\n        }\r\n\r\n        public void ReorderStickerSets()\r\n        {\r\n            var stateService = IoC.Get<IStateService>();\r\n            stateService.GetAllStickersAsync(cachedStickers =>\r\n            {\r\n                CreateSetsAndUpdatePanel(_currentCategory, cachedStickers);\r\n            });\r\n        }\r\n\r\n        private void UpdateStickersPanel(int index)\r\n        {\r\n            var hasUnreadFeaturedStickers = _featuredStickers != null && _featuredStickers.Unread.Count > 0;\r\n\r\n            StickersPanel.Children.Clear();\r\n            StickersPanel.Children.Add(_emojiButton);\r\n            if (hasUnreadFeaturedStickers)\r\n            {\r\n                if (_featuredStickers != null && _featuredStickersCounter != null)\r\n                {\r\n                    _featuredStickersCounter.Counter = _featuredStickers.Unread.Count;\r\n                }\r\n                StickersPanel.Children.Add(_featuredStickersGrid);\r\n            }\r\n            StickersPanel.Children.Add(_favedStickersButton);\r\n            StickersPanel.Children.Add(_recentStickersButton);\r\n            StickersPanel.Children.Add(_groupStickersButton);\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            var buttonStyleResourceKey = isLightTheme ? \"CategoryButtonLightThemeStyle\" : \"CategoryButtonDarkThemeStyle\";\r\n            var buttonStyle = (Style)Resources[buttonStyleResourceKey];\r\n\r\n            string previousKey = null;\r\n            if (index > RecentStickersCategoryIndex)\r\n            {\r\n                var previousCategory = GetCategoryButtonByIndex(_currentCategory);\r\n                if (previousCategory != null)\r\n                {\r\n                    previousKey = previousCategory.DataContext as string;\r\n                }\r\n            }\r\n\r\n            var secondSlice = new List<Button>();\r\n            _stickerSetButtons.Clear();\r\n            var allStickers = _allStickers as TLAllStickers29;\r\n            if (allStickers != null)\r\n            {\r\n                var firstSliceCount = 3;\r\n                var count = 0;\r\n                foreach (var stickerSet in allStickers.Sets)\r\n                {\r\n                    var key = stickerSet.Id.Value.ToString(CultureInfo.InvariantCulture);\r\n                    List<TLDocument22> stickers;\r\n                    if (_stickerSets.TryGetValue(key, out stickers))\r\n                    {\r\n                        var image = new Image { Width = 53.0, Height = 53.0, DataContext = new TLStickerItem { Document = stickers.FirstOrDefault() } };\r\n                        var binding = new Binding(\"Self\")\r\n                        {\r\n                            Converter = new DefaultPhotoConverter(),\r\n                            ConverterParameter = 64.0\r\n                        };\r\n                        image.SetBinding(Image.SourceProperty, binding);\r\n\r\n                        var button = new Button\r\n                        {\r\n                            Width = 78.0,\r\n                            Height = 78.0,\r\n                            ClickMode = ClickMode.Release,\r\n                            Style = buttonStyle,\r\n                            Content = image,\r\n                            DataContext = key\r\n                        };\r\n                        button.Click += StickerSetButtonOnClick;\r\n\r\n                        if (count < firstSliceCount)\r\n                        {\r\n                            StickersPanel.Children.Add(button);\r\n                            count++;\r\n                        }\r\n                        else\r\n                        {\r\n                            secondSlice.Add(button);\r\n                            count++;\r\n                        }\r\n\r\n                        _stickerSetButtons.Add(button);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var selectFavedStickers = false;\r\n            var selectRecentlyUsedStickers = false;\r\n            var selectFirstStickerSet = false;\r\n            if (index > RecentStickersCategoryIndex && index > FeaturedStickersCategoryIndex)\r\n            {\r\n                var nextIndex = GetStickerSetButtonByKey(previousKey);\r\n                if (nextIndex != -1)\r\n                {\r\n                    CurrentCategory = nextIndex;\r\n                }\r\n                else if (_favedStickersButton.Visibility == Visibility.Visible)\r\n                {\r\n                    selectFavedStickers = true;\r\n                }\r\n                else\r\n                {\r\n                    selectRecentlyUsedStickers = true;\r\n                }\r\n            }\r\n            else if (index == StickerCategoryIndex)\r\n            {\r\n                var allStickers43 = allStickers as TLAllStickers43;\r\n                if (allStickers43 != null && (allStickers43.RecentStickers == null || allStickers43.RecentStickers.Documents.Count == 0))\r\n                {\r\n                    if (index == StickerCategoryIndex && _stickerSetButtons.Count > 0)\r\n                    {\r\n                        selectFirstStickerSet = true;\r\n                    }\r\n                }\r\n\r\n                if (!selectFirstStickerSet)\r\n                {\r\n                    if (_favedStickersButton.Visibility == Visibility.Visible)\r\n                    {\r\n                        selectFavedStickers = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        selectRecentlyUsedStickers = true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (selectFirstStickerSet)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    StickerSetButtonOnClick(_stickerSetButtons[0], null);\r\n\r\n                    AddLastStickerButtons(secondSlice, hasUnreadFeaturedStickers);\r\n                });\r\n            }\r\n            else if (selectFavedStickers)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    FavedStickersButtonOnClick(null, null);\r\n\r\n                    AddLastStickerButtons(secondSlice, hasUnreadFeaturedStickers);\r\n                });\r\n            }\r\n            else if (selectRecentlyUsedStickers)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    RecentStickersButtonOnClick(null, null);\r\n\r\n                    AddLastStickerButtons(secondSlice, hasUnreadFeaturedStickers);\r\n                });\r\n            }\r\n            else\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    AddLastStickerButtons(secondSlice, hasUnreadFeaturedStickers);\r\n                });\r\n            }\r\n        }\r\n\r\n        private void AddLastStickerButtons(List<Button> secondSlice, bool hasUnreadFeaturedStickers)\r\n        {\r\n            if (secondSlice.Count > 0)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var button in secondSlice)\r\n                    {\r\n                        StickersPanel.Children.Add(button);\r\n                    }\r\n\r\n                    if (!hasUnreadFeaturedStickers)\r\n                    {\r\n                        StickersPanel.Children.Add(_featuredStickersGrid);\r\n                    }\r\n                    StickersPanel.Children.Add(_settingsButton);\r\n                });\r\n            }\r\n            else\r\n            {\r\n                if (!hasUnreadFeaturedStickers)\r\n                {\r\n                    StickersPanel.Children.Add(_featuredStickersGrid);\r\n                }\r\n                StickersPanel.Children.Add(_settingsButton);\r\n            }\r\n        }\r\n\r\n        private void StickerSetButtonOnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var button = sender as Button;\r\n            if (button == null) return;\r\n\r\n            var key = button.DataContext as string;\r\n            if (key == null) return;\r\n\r\n            List<TLDocument22> stickers;\r\n            if (_stickerSets.TryGetValue(key, out stickers))\r\n            {\r\n                LoadStickerSet(key, stickers);\r\n            }\r\n        }\r\n\r\n        private void LoadCachedFeaturedStickersAsync()\r\n        {\r\n            var stopwatch = Stopwatch.StartNew();\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var stateService = IoC.Get<IStateService>();\r\n                var mtProtoService = IoC.Get<IMTProtoService>();\r\n\r\n                stateService.GetFeaturedStickersAsync(cachedStickers =>\r\n                {\r\n                    System.Diagnostics.Debug.WriteLine(\"LoadCachedFeaturedStickersAsync 1 elapsed=\" + stopwatch.Elapsed);\r\n                    UpdateFeaturedSets(cachedStickers);\r\n\r\n                    System.Diagnostics.Debug.WriteLine(\"LoadCachedFeaturedStickersAsync 2 elapsed=\" + stopwatch.Elapsed);\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        _featuredStickers = cachedStickers;\r\n                        UpdateFeaturedStickersPosition();\r\n                    });\r\n                    var hash = cachedStickers != null ? cachedStickers.HashValue : new TLInt(0);\r\n                    //Execute.ShowDebugMessage(\"messages.getFeaturedStickers hash=\" + hash);\r\n                    mtProtoService.GetFeaturedStickersAsync(true, hash,\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            var featuredStickers = result as TLFeaturedStickers;\r\n                            if (featuredStickers != null)\r\n                            {\r\n                                UpdateFeaturedSets(featuredStickers);\r\n                                //Execute.ShowDebugMessage(string.Format(\"messages.getFeaturedStickers hash={0} result={1}\", featuredStickers.Hash, featuredStickers));\r\n                                _featuredStickers = featuredStickers;\r\n                                stateService.SaveFeaturedStickersAsync(featuredStickers);\r\n                            }\r\n                            else\r\n                            {\r\n                                //Execute.ShowDebugMessage(\"messages.getFeaturedStickers result=\" + result);\r\n                            }\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            //Execute.ShowDebugMessage(\"messages.getFeaturedStickers error \" + error);\r\n                        }));\r\n                });\r\n            });\r\n        }\r\n\r\n        private int _featuredStickersOffset;\r\n\r\n        private void LoadNextFeaturedStickersSlice()\r\n        {\r\n            if (_featuredStickers == null) return;\r\n            var sets = _featuredStickers.SetsCovered;\r\n            if (sets == null) return;\r\n\r\n            var setId = @\"tlg/featured\";\r\n            var sprites = new List<VListItemBase>();\r\n            List<VListItemBase> cachedSprites;\r\n            if (_stickerSetSprites.TryGetValue(setId, out cachedSprites))\r\n            {\r\n                if (FeaturedStickersVirtPanel.VirtItems.Count < cachedSprites.Count)\r\n                {\r\n                    for (var i = FeaturedStickersVirtPanel.VirtItems.Count; i < FeaturedStickersVirtPanel.VirtItems.Count + FeaturedStickersSliceCount && i < cachedSprites.Count; i++)\r\n                    {\r\n                        sprites.Add(cachedSprites[i]);\r\n                    }\r\n                    FeaturedStickersVirtPanel.AddItems(sprites);\r\n                    return;\r\n                }\r\n            }\r\n\r\n            for (var i = _featuredStickersOffset; i < sets.Count && i < _featuredStickersOffset + FeaturedStickersSliceCount; i++)\r\n            {\r\n                var sprite = GetCoveredStickerSprite(sets[i]);\r\n                if (sprite != null)\r\n                {\r\n                    sprites.Add(sprite);\r\n                }\r\n            }\r\n\r\n            if (sprites.Count == 0) return;\r\n\r\n            if (_stickerSetSprites.TryGetValue(setId, out cachedSprites))\r\n            {\r\n                foreach (var sprite in sprites)\r\n                {\r\n                    cachedSprites.Add(sprite);\r\n                }\r\n            }\r\n\r\n            _featuredStickersOffset += sprites.Count;\r\n\r\n            FeaturedStickersVirtPanel.AddItems(sprites);\r\n        }\r\n\r\n        private VListItemBase GetCoveredStickerSprite(TLStickerSetCoveredBase set)\r\n        {\r\n            var stickerPerRow = 5;\r\n\r\n            var stickers = new List<TLStickerItem>();\r\n\r\n            var stickerSetCovered = set as TLStickerSetCovered;\r\n            if (stickerSetCovered != null)\r\n            {\r\n                if (stickerSetCovered.StickerSet.Stickers != null\r\n                    && stickerSetCovered.StickerSet.Stickers.Count > 0)\r\n                {\r\n                    for (var j = 0; j < stickerSetCovered.StickerSet.Stickers.Count && stickers.Count < 5; j++)\r\n                    {\r\n                        var stickerItem = stickerSetCovered.StickerSet.Stickers[j] as TLStickerItem;\r\n                        if (stickerItem != null)\r\n                        {\r\n                            stickers.Add(stickerItem);\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    stickers.Add(new TLStickerItem { Document = stickerSetCovered.Cover });\r\n                }\r\n                var item = new FeaturedStickerSpriteItem(stickerSetCovered.StickerSet, stickerPerRow, new List<TLStickerItem>(stickers), 90.0, 472.0, StickerPanel_MouseEnter);\r\n                item.StickerSetAdded += OnStickerSetAdded;\r\n                item.StickerSetOpened += OnStickerSetOpened;\r\n                item.StickerSelected += OnFeaturedStickerSelected;\r\n\r\n                return item;\r\n            }\r\n\r\n            var stickerSetMultiCovered = set as TLStickerSetMultiCovered;\r\n            if (stickerSetMultiCovered != null)\r\n            {\r\n                for (var j = 0; j < stickerSetMultiCovered.Covers.Count && stickers.Count < 5; j++)\r\n                {\r\n                    stickers.Add(new TLStickerItem { Document = stickerSetMultiCovered.Covers[j] });\r\n                }\r\n                var item = new FeaturedStickerSpriteItem(stickerSetMultiCovered.StickerSet, stickerPerRow, new List<TLStickerItem>(stickers), 90.0, 472.0, StickerPanel_MouseEnter);\r\n                item.StickerSetAdded += OnStickerSetAdded;\r\n                item.StickerSetOpened += OnStickerSetOpened;\r\n                item.StickerSelected += OnFeaturedStickerSelected;\r\n\r\n                return item;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private void LoadFeaturedStickerSets(IList<TLStickerSetCoveredBase> sets)\r\n        {\r\n            var readFeaturedSets = false;\r\n\r\n            var setId = @\"tlg/featured\";\r\n            List<VListItemBase> sprites;\r\n            var created = false;\r\n            if (!_stickerSetSprites.TryGetValue(setId, out sprites))\r\n            {\r\n                created = true;\r\n                sprites = new List<VListItemBase>();\r\n                for (var i = 0; i < sets.Count && i < FeaturedStickersSliceCount; i++)\r\n                {\r\n                    if (sets[i].StickerSet.Unread)\r\n                    {\r\n                        readFeaturedSets = true;\r\n                    }\r\n\r\n                    var sprite = GetCoveredStickerSprite(sets[i]);\r\n                    if (sprite != null)\r\n                    {\r\n                        sprites.Add(sprite);\r\n                    }\r\n                }\r\n\r\n                _stickerSetSprites[setId] = sprites;\r\n            }\r\n\r\n            _featuredStickersOffset = sprites.Count;\r\n\r\n            CurrentSprites = sprites;\r\n\r\n            if (created)\r\n            {\r\n                var firstSlice = 3;\r\n                FeaturedStickersVirtPanel.ClearItems();\r\n                FeaturedStickersVirtPanel.AddItems(sprites.Take(firstSlice));\r\n                //LoadingProgressBar.Visibility = Visibility.Visible;\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    //LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                    FeaturedStickersVirtPanel.AddItems(sprites.Skip(firstSlice).Take(FeaturedStickersSliceCount - firstSlice));\r\n\r\n                    _runOnce = true;\r\n                });\r\n            }\r\n\r\n            CurrentCategory = FeaturedStickersCategoryIndex;\r\n\r\n            if (readFeaturedSets)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    FeaturedStickersVirtPanel_OnScrollStateChanged(this, new ScrollingStateChangedEventArgs(false, false));\r\n                });\r\n            }\r\n        }\r\n\r\n        private void OnStickerSetOpened(object sender, StickerSetOpenedEventArgs e)\r\n        {\r\n            if (e.Set == null) return;\r\n            var set32 = e.Set as TLStickerSet32;\r\n            if (set32 == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n                TelegramViewBase.ShowStickerSetMessageBox(false, set32.Installed && !set32.Archived, set32, prompt =>\r\n                {\r\n                    if (prompt == PopUpResult.Ok)\r\n                    {\r\n                        OnStickerSetAdded(sender, new StickerSetAddedEventArgs{ Set = set32 });\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private void OnStickerSetAdded(object sender, StickerSetAddedEventArgs e)\r\n        {\r\n            if (e.Set == null) return;\r\n            var set32 = e.Set as TLStickerSet32;\r\n            if (set32 == null) return;\r\n\r\n            var inputStickerSet = new TLInputStickerSetId { Id = e.Set.Id, AccessHash = e.Set.AccessHash };\r\n\r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n            mtProtoService.GetStickerSetAsync(inputStickerSet,\r\n                stickerSet => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var stickerSet32 = stickerSet.Set as TLStickerSet32;\r\n                    if (stickerSet32 == null) return;\r\n\r\n                    //if (stickerSet32.Installed && !stickerSet32.Archived)\r\n                    //{\r\n                    //    set32.Installed = true;\r\n                    //    set32.Archived = false;\r\n                        \r\n                    //    set32.NotifyOfPropertyChange(() => set32.Installed);\r\n\r\n                    //    return;\r\n                    //}\r\n\r\n                    stickerSet.Set = set32;\r\n\r\n                    stickerSet.Set.Stickers = new TLVector<TLObject>();\r\n                    for (var i = 0; i < stickerSet.Documents.Count; i++)\r\n                    {\r\n                        var document22 = stickerSet.Documents[i] as TLDocument22;\r\n                        if (document22 != null)\r\n                        {\r\n                            stickerSet.Set.Stickers.Add(new TLStickerItem { Document = document22 });\r\n                        }\r\n                    }\r\n                    if (stickerSet32.Installed && !stickerSet32.Archived)\r\n                    {\r\n                        mtProtoService.UninstallStickerSetAsync(inputStickerSet,\r\n                            result => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                set32.Installed = false;\r\n                                var set76 = set32 as TLStickerSet76;\r\n                                if (set76 != null)\r\n                                {\r\n                                    set76.InstalledDate = null;\r\n                                }\r\n\r\n                                set32.NotifyOfPropertyChange(() => stickerSet32.Installed);\r\n\r\n                                var shellViewModel = IoC.Get<ShellViewModel>();\r\n                                shellViewModel.RemoveStickerSet(set32, inputStickerSet);\r\n\r\n                                mtProtoService.SetMessageOnTime(2.0, AppResources.StickersRemoved);\r\n                            }),\r\n                            error => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                Execute.ShowDebugMessage(\"messages.uninstallStickerSet error \" + error);\r\n                            }));\r\n                    }\r\n                    else\r\n                    {\r\n                        mtProtoService.InstallStickerSetAsync(inputStickerSet, TLBool.False,\r\n                            result => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                var resultArchive = result as TLStickerSetInstallResultArchive;\r\n                                if (resultArchive != null)\r\n                                {\r\n                                    TelegramViewBase.ShowArchivedStickersMessageBox(resultArchive);\r\n                                }\r\n\r\n                                set32.Installed = true;\r\n                                var set76 = set32 as TLStickerSet76;\r\n                                if (set76 != null)\r\n                                {\r\n                                    set76.InstalledDate = TLUtils.DateToUniversalTimeTLInt(IoC.Get<IMTProtoService>().ClientTicksDelta, DateTime.Now);\r\n                                }\r\n\r\n                                set32.NotifyOfPropertyChange(() => stickerSet32.Installed);\r\n\r\n                                var shellViewModel = IoC.Get<ShellViewModel>();\r\n                                shellViewModel.Handle(new TLUpdateNewStickerSet { Stickerset = stickerSet });\r\n\r\n                                mtProtoService.SetMessageOnTime(2.0, AppResources.NewStickersAdded);\r\n                            }),\r\n                            error => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                                {\r\n                                    if (error.TypeEquals(ErrorType.STICKERSET_INVALID))\r\n                                    {\r\n                                        MessageBox.Show(AppResources.StickersNotFound, AppResources.Error,\r\n                                            MessageBoxButton.OK);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        Execute.ShowDebugMessage(\"messages.importChatInvite error \" + error);\r\n                                    }\r\n                                }\r\n                                else\r\n                                {\r\n                                    Execute.ShowDebugMessage(\"messages.importChatInvite error \" + error);\r\n                                }\r\n                            }));\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (error.TypeEquals(ErrorType.STICKERSET_INVALID))\r\n                        {\r\n                            MessageBox.Show(AppResources.StickersNotFound, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.getStickerSet error \" + error);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.getStickerSet error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private SearchSpriteItem _searchSprite;\r\n\r\n        private void LoadStickerSet(string key, List<TLDocument22> stickerSet)\r\n        {\r\n            var recentlyUsedKey = @\"tlg/recentlyUsed\";\r\n            var favedKey = @\"tlg/faved\";\r\n            var groupKey = @\"tlg/group\";\r\n            var stickerPerRow = 5;\r\n\r\n            var setId = key;\r\n            List<VListItemBase> sprites;\r\n            if (!_stickerSetSprites.TryGetValue(setId, out sprites)\r\n                || (key == recentlyUsedKey && _reloadStickerSprites)\r\n                || (key == favedKey && _reloadStickerSprites))\r\n            {\r\n                _reloadStickerSprites = false;\r\n                sprites = new List<VListItemBase>();\r\n                var stickers = new List<TLStickerItem>();\r\n                for (var i = 1; i <= stickerSet.Count; i++)\r\n                {\r\n                    stickers.Add(new TLStickerItem { Document = stickerSet[i - 1] });\r\n\r\n                    if (i % stickerPerRow == 0 || i == stickerSet.Count)\r\n                    {\r\n                        var item = new StickerSpriteItem(stickerPerRow, new List<TLStickerItem>(stickers), 90.0, 472.0, StickerPanel_MouseEnter);\r\n                        item.StickerSelected += OnStickerSelected;\r\n                        sprites.Add(item);\r\n                        stickers.Clear();\r\n                    }\r\n                }\r\n\r\n                _stickerSetSprites[setId] = sprites;\r\n            }\r\n\r\n            if (key == recentlyUsedKey)\r\n            {\r\n                _recentStickersSprites = sprites;\r\n            }\r\n            if (key == favedKey)\r\n            {\r\n                _favedStickersSprites = sprites;\r\n            }\r\n\r\n            CurrentSprites = sprites;\r\n\r\n            _searchSprite = new SearchSpriteItem(478.0);\r\n            _searchSprite.SearchText += OnSearchText;\r\n            _searchSprite.OpenFullScreen += OnOpenFullScreen;\r\n            _searchSprite.CloseFullScreen += OnCloseFullScreen;\r\n\r\n\r\n            var totalHeight = sprites.Sum(x => x.FixedHeight);\r\n            if (sprites.Count > 0\r\n                && CSV.ViewportHeight > totalHeight)\r\n            {\r\n                var footer = new StickerFooterSpriteItem(478.0);\r\n                footer.View.Height = (CSV.ViewportHeight - totalHeight);\r\n                footer.FixedHeight = footer.View.Height;\r\n\r\n                sprites.Add(footer);\r\n            }\r\n\r\n            var firstSlice = new List<VListItemBase> { _searchSprite };\r\n            var secondSlice = new List<VListItemBase>();\r\n            for (var i = 0; i < sprites.Count; i++)\r\n            {\r\n                if (i < FirstStickerSliceCount)\r\n                {\r\n                    firstSlice.Add(sprites[i]);\r\n                }\r\n                else\r\n                {\r\n                    secondSlice.Add(sprites[i]);\r\n                }\r\n            }\r\n\r\n            VirtPanel.ClearItems();\r\n            VirtPanel.AddItems(firstSlice);\r\n            CSV.UpdateLayout();\r\n            CSV.ScrollToVerticalOffset(_searchSprite.FixedHeight);\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                VirtPanel.AddItems(secondSlice);\r\n            });\r\n\r\n            if (key == favedKey)\r\n            {\r\n                CurrentCategory = FavedStickersCategoryIndex;\r\n            }\r\n            else if (key == groupKey)\r\n            {\r\n                CurrentCategory = GroupStickersCategoryIndex;\r\n            }\r\n            else if (key == recentlyUsedKey)\r\n            {\r\n                CurrentCategory = RecentStickersCategoryIndex;\r\n            }\r\n            else\r\n            {\r\n                var index = 0;\r\n                foreach (var button in _stickerSetButtons)\r\n                {\r\n                    var stickerSetKey = button.DataContext as string;\r\n                    if (stickerSetKey == key) break;\r\n                    index++;\r\n                }\r\n\r\n                CurrentCategory = RecentStickersCategoryIndex + index + 1;\r\n            }\r\n        }\r\n\r\n        public event EventHandler OpenFullScreen;\r\n\r\n        private void OnOpenFullScreen(object sender, EventArgs e)\r\n        {\r\n            var handler = OpenFullScreen;\r\n            if (handler != null)\r\n            {\r\n                handler.Invoke(sender, e);\r\n            }\r\n        }\r\n\r\n        public event EventHandler CloseFullScreen;\r\n\r\n        private void OnCloseFullScreen(object sender, EventArgs e)\r\n        {\r\n            var handler = CloseFullScreen;\r\n            if (handler != null)\r\n            {\r\n                handler.Invoke(sender, e);\r\n            }\r\n        }\r\n\r\n        private bool _isSearchOpened;\r\n\r\n        public void OpenSearch()\r\n        {\r\n            _isSearchOpened = true;\r\n\r\n            var firstSlice = new List<VListItemBase>{ _searchSprite }; \r\n\r\n            VirtPanel.ClearItems();\r\n            VirtPanel.AddItems(firstSlice);\r\n            CSV.UpdateLayout();\r\n            CSV.ScrollToVerticalOffset(0.0);\r\n            _searchSprite.Focus();\r\n            StickersGrid.Visibility = Visibility.Collapsed;\r\n            NoStickersPlaceholder.Visibility = Visibility.Collapsed;\r\n            CSV.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;\r\n        }\r\n\r\n        public void CloseSearch()\r\n        {\r\n            _isSearchOpened = false;\r\n\r\n            var sprites = CurrentSprites;\r\n\r\n            _searchSprite = new SearchSpriteItem(478.0);\r\n            _searchSprite.SearchText += OnSearchText;\r\n            _searchSprite.OpenFullScreen += OnOpenFullScreen;\r\n            _searchSprite.CloseFullScreen += OnCloseFullScreen;\r\n\r\n            var firstSlice = new List<VListItemBase> { _searchSprite };\r\n            var secondSlice = new List<VListItemBase>();\r\n            for (var i = 0; i < sprites.Count; i++)\r\n            {\r\n                if (i < FirstStickerSliceCount)\r\n                {\r\n                    firstSlice.Add(sprites[i]);\r\n                }\r\n                else\r\n                {\r\n                    secondSlice.Add(sprites[i]);\r\n                }\r\n            }\r\n\r\n            VirtPanel.ClearItems();\r\n            VirtPanel.AddItems(firstSlice);\r\n            CSV.UpdateLayout();\r\n            CSV.ScrollToVerticalOffset(0.0);\r\n            StickersGrid.Visibility = Visibility.Visible;\r\n            NoStickersPlaceholder.Visibility = Visibility.Collapsed;\r\n            CSV.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                VirtPanel.AddItems(secondSlice);\r\n            });\r\n        }\r\n\r\n        private void OnSearchText(object sender, SearchTextEventArgs e)\r\n        {\r\n            var sprites = new List<VListItemBase>();\r\n            var dict = new Dictionary<long, long>();\r\n\r\n            if (!string.IsNullOrEmpty(e.Text))\r\n            {\r\n                var stickerPerRow = 4;\r\n                var allStickers = _allStickers as TLAllStickers43;\r\n                if (allStickers != null)\r\n                {\r\n                    var sets = allStickers.Sets;\r\n                    if (sets != null)\r\n                    {\r\n                        for (var i = 0; i < sets.Count; i++)\r\n                        {\r\n                            var set = sets[i] as TLStickerSet32;\r\n                            if (set != null\r\n                                && !dict.ContainsKey(set.Id.Value)\r\n                                && (set.Title.ToString().IndexOf(e.Text, StringComparison.OrdinalIgnoreCase) != -1\r\n                                    || set.ShortName.ToString().IndexOf(e.Text, StringComparison.OrdinalIgnoreCase) != -1))\r\n                            {\r\n                                dict[set.Id.Value] = set.Id.Value;\r\n                                var setId = set.Id.ToString();\r\n                                List<VListItemBase> items;\r\n                                if (!_stickerSetSprites.TryGetValue(setId, out items))\r\n                                {\r\n                                    List<TLDocument22> documents;\r\n                                    if (_stickerSets.TryGetValue(setId, out documents))\r\n                                    {\r\n                                        items = new List<VListItemBase>();\r\n                                        var stickers = new List<TLStickerItem>();\r\n                                        for (var j = 1; j <= documents.Count; j++)\r\n                                        {\r\n                                            stickers.Add(new TLStickerItem { Document = documents[j - 1] });\r\n\r\n                                            if (j % stickerPerRow == 0 || j == documents.Count)\r\n                                            {\r\n                                                var item = new StickerSpriteItem(stickerPerRow, new List<TLStickerItem>(stickers), 90.0, 472.0, StickerPanel_MouseEnter);\r\n                                                item.StickerSelected += OnStickerSelected;\r\n                                                items.Add(item);\r\n                                                stickers.Clear();\r\n                                            }\r\n                                        }\r\n\r\n                                        _stickerSetSprites[setId] = items;\r\n                                    }\r\n                                }\r\n\r\n                                var header = new StickerHeaderSpriteItem(set, 478.0);\r\n                                sprites.Add(header);\r\n                                sprites.AddRange(items.Where(x => !(x is StickerFooterSpriteItem)));\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (_featuredStickers != null)\r\n                {\r\n                    var sets = _featuredStickers.SetsCovered;\r\n                    if (sets != null)\r\n                    {\r\n                        for (var i = 0; i < sets.Count; i++)\r\n                        {\r\n                            var set = sets[i].StickerSet;\r\n                            if (set != null\r\n                                && !dict.ContainsKey(set.Id.Value)\r\n                                && (set.Title.ToString().IndexOf(e.Text, StringComparison.OrdinalIgnoreCase) != -1\r\n                                    || set.ShortName.ToString().IndexOf(e.Text, StringComparison.OrdinalIgnoreCase) != -1))\r\n                            {\r\n                                dict[set.Id.Value] = set.Id.Value;\r\n                                var sprite = GetCoveredStickerSprite(sets[i]);\r\n                                if (sprite != null)\r\n                                {\r\n                                    sprites.Add(sprite);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            SearchSprites = sprites;\r\n\r\n            VirtPanel.ClearItems();\r\n            if (sprites.Count > 0)\r\n            {\r\n                NoStickersPlaceholder.Visibility = Visibility.Collapsed;\r\n                CSV.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;\r\n                var searchItem = _searchSprite;\r\n                var firstSlice = new List<VListItemBase> {_searchSprite};\r\n                var secondSlice = new List<VListItemBase>();\r\n                for (var i = 0; i < sprites.Count; i++)\r\n                {\r\n                    if (i < FirstStickerSliceCount)\r\n                    {\r\n                        firstSlice.Add(sprites[i]);\r\n                    }\r\n                    else\r\n                    {\r\n                        secondSlice.Add(sprites[i]);\r\n                    }\r\n                }\r\n\r\n                VirtPanel.AddItems(firstSlice);\r\n                searchItem.Focus();\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    VirtPanel.AddItems(secondSlice);\r\n\r\n                    SearchStickerSetsAsync(e.Text, dict);\r\n                });\r\n            }\r\n            else\r\n            {\r\n                var searchItem = _searchSprite;\r\n                var firstSlice = new List<VListItemBase> { _searchSprite };\r\n                VirtPanel.AddItems(firstSlice);\r\n                searchItem.Focus();\r\n\r\n                SearchStickerSetsAsync(e.Text, dict);\r\n            }\r\n        }\r\n\r\n        private void SearchStickerSetsAsync(string text, Dictionary<long, long> setsDict)\r\n        {\r\n            if (string.IsNullOrEmpty(text)) return;\r\n\r\n            IoC.Get<IMTProtoService>().SearchStickerSetsAsync(true, true, new TLString(text), new TLInt(0),\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var foundStickerSets = result as TLFoundStickerSets;\r\n                    if (foundStickerSets != null\r\n                        && _searchSprite != null \r\n                        && string.Equals(_searchSprite.Text, text))\r\n                    {\r\n                        UpdateFoundSets(foundStickerSets);\r\n\r\n                        var sets = foundStickerSets.SetsCovered;\r\n                        if (sets != null)\r\n                        {\r\n                            var sprites = new List<VListItemBase>();\r\n                            for (var i = 0; i < sets.Count; i++)\r\n                            {\r\n                                var set = sets[i].StickerSet;\r\n                                if (set != null && !setsDict.ContainsKey(set.Id.Value))\r\n                                {\r\n                                    setsDict[set.Id.Value] = set.Id.Value;\r\n                                    var sprite = GetCoveredStickerSprite(sets[i]);\r\n                                    if (sprite != null)\r\n                                    {\r\n                                        sprites.Add(sprite);\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            SearchSprites.AddRange(sprites);\r\n                            if (sprites.Count > 0)\r\n                            {\r\n                                NoStickersPlaceholder.Visibility = Visibility.Collapsed;\r\n                                CSV.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;\r\n                                var firstSlice = new List<VListItemBase>();\r\n                                var secondSlice = new List<VListItemBase>();\r\n                                for (var i = 0; i < sprites.Count; i++)\r\n                                {\r\n                                    if (i < FirstStickerSliceCount)\r\n                                    {\r\n                                        firstSlice.Add(sprites[i]);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        secondSlice.Add(sprites[i]);\r\n                                    }\r\n                                }\r\n\r\n                                VirtPanel.AddItems(firstSlice);\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    VirtPanel.AddItems(secondSlice);\r\n                                });\r\n                            }\r\n                            else\r\n                            {\r\n                                NoStickersPlaceholder.Visibility = VirtPanel.VirtItems.Count == 1 ? Visibility.Visible : Visibility.Collapsed;\r\n                                CSV.VerticalScrollBarVisibility = VirtPanel.VirtItems.Count == 1 ? ScrollBarVisibility.Hidden : ScrollBarVisibility.Auto;\r\n                            }\r\n                        }\r\n                    }\r\n                }),\r\n                error =>\r\n                {\r\n\r\n                });\r\n        }\r\n\r\n        public List<VListItemBase> CurrentSprites;\r\n\r\n        public List<VListItemBase> SearchSprites;\r\n\r\n        private TLFeaturedStickers _featuredStickers;\r\n        private TLFavedStickers _favedStickers;\r\n        private readonly Dictionary<string, List<TLDocument22>> _stickerSets = new Dictionary<string, List<TLDocument22>>();\r\n        private readonly Dictionary<string, List<VListItemBase>> _stickerSetSprites = new Dictionary<string, List<VListItemBase>>();\r\n        private TLAllStickers _allStickers;\r\n\r\n        public void LoadCategory(int index)\r\n        {\r\n            VirtPanel.ClearItems();\r\n\r\n            if (_currentCategory == RecentsCategoryIndex)\r\n                UnloadRecents();\r\n\r\n            if (index == RecentsCategoryIndex)\r\n            {\r\n                LoadRecents();\r\n                return;\r\n            }\r\n\r\n            List<VListItemBase> sprites = null;\r\n\r\n            switch (index)\r\n            {\r\n                case 0:\r\n                    sprites = _category1Sprites;\r\n                    break;\r\n                case 1:\r\n                    sprites = _category2Sprites;\r\n                    break;\r\n                case 2:\r\n                    sprites = _category3Sprites;\r\n                    break;\r\n                case 3:\r\n                    sprites = _category4Sprites;\r\n                    break;\r\n                case 4:\r\n                    sprites = _category5Sprites;\r\n                    break;\r\n                case StickerCategoryIndex:\r\n                    {\r\n                        var allStickers43 = _allStickers as TLAllStickers43;\r\n                        if (allStickers43 != null)\r\n                        {\r\n                            if (allStickers43.FavedStickers != null && allStickers43.FavedStickers.Documents.Count > 0)\r\n                            {\r\n                                sprites = _favedStickersSprites;\r\n                                index = FavedStickersCategoryIndex;\r\n                            }\r\n                            else if (allStickers43.RecentStickers != null && allStickers43.RecentStickers.Documents.Count > 0)\r\n                            {\r\n                                sprites = _recentStickersSprites;\r\n                                index = RecentStickersCategoryIndex;\r\n                            }\r\n                        }\r\n\r\n                        Button button = null;\r\n                        if (sprites == null && _stickerSetButtons.Count > 0)\r\n                        {\r\n                            button = _stickerSetButtons[0];\r\n                            var key = button.DataContext as string;\r\n\r\n                            List<VListItemBase> localSprites;\r\n                            if (key != null\r\n                                && _stickerSetSprites.TryGetValue(key, out localSprites))\r\n                            {\r\n                                sprites = localSprites;\r\n                                index = RecentStickersCategoryIndex + 1;\r\n                            }\r\n                        }\r\n\r\n                        UpdateFeaturedStickersPosition();\r\n\r\n                        if (sprites != null)\r\n                        {\r\n                            if (index == FavedStickersCategoryIndex)\r\n                            {\r\n                                FavedStickersButtonOnClick(null, null);\r\n                            }\r\n                            else if (index == RecentStickersCategoryIndex)\r\n                            {\r\n                                RecentStickersButtonOnClick(null, null);\r\n                            }\r\n                            else if (button != null)\r\n                            {\r\n                                StickerSetButtonOnClick(button, null);\r\n                            }\r\n                        }\r\n                    }\r\n                    break;\r\n            }\r\n\r\n            var firstSlice = new List<VListItemBase>();\r\n            var secondSlice = new List<VListItemBase>();\r\n            if (sprites == null)\r\n            {\r\n                sprites = new List<VListItemBase>();\r\n\r\n                if (index == StickerCategoryIndex)\r\n                {\r\n                    CurrentCategory = index;\r\n\r\n                    var stateService = IoC.Get<IStateService>();\r\n                    var mtProtoService = IoC.Get<IMTProtoService>();\r\n\r\n                    LoadingProgressBar.Visibility = Visibility.Visible;\r\n                    stateService.GetAllStickersAsync(cachedStickers =>\r\n                    {\r\n                        if (_reloadStickerSprites)\r\n                        {\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                _reloadStickerSprites = false;\r\n                                LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                                CreateSetsAndUpdatePanel(index, cachedStickers);\r\n                            });\r\n                            return;\r\n                        }\r\n\r\n                        var cachedStickers43 = cachedStickers as TLAllStickers43;\r\n                        if (cachedStickers43 != null\r\n                            && cachedStickers43.RecentStickers != null\r\n                            && cachedStickers43.FavedStickers != null)\r\n                        {\r\n                            LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                            CreateSetsAndUpdatePanel(index, cachedStickers);\r\n                        }\r\n                        else\r\n                        {\r\n                            var hash = cachedStickers != null ? cachedStickers.Hash : TLString.Empty;\r\n                            mtProtoService.GetAllStickersAsync(hash,\r\n                                result => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    var allStickers = result as TLAllStickers43;\r\n                                    if (allStickers != null)\r\n                                    {\r\n                                        var cachedStickers29 = cachedStickers as TLAllStickers29;\r\n                                        if (cachedStickers29 != null)\r\n                                        {\r\n                                            allStickers.ShowStickersTab = cachedStickers29.ShowStickersTab;\r\n                                            allStickers.RecentlyUsed = cachedStickers29.RecentlyUsed;\r\n                                            allStickers.Date = TLUtils.DateToUniversalTimeTLInt(0, DateTime.Now);\r\n                                        }\r\n\r\n                                        if (cachedStickers43 != null)\r\n                                        {\r\n                                            allStickers.RecentStickers = cachedStickers43.RecentStickers;\r\n                                            allStickers.FavedStickers = cachedStickers43.FavedStickers;\r\n                                        }\r\n\r\n                                        cachedStickers = allStickers;\r\n                                        stateService.SaveAllStickersAsync(cachedStickers);\r\n                                    }\r\n\r\n                                    var recentStickersHash = new TLInt(0);\r\n                                    var allStickers43 = cachedStickers as TLAllStickers43;\r\n                                    if (allStickers43 != null)\r\n                                    {\r\n                                        var recentStickers = allStickers43.RecentStickers;\r\n                                        if (recentStickers != null)\r\n                                        {\r\n                                            recentStickersHash = recentStickers.Hash;\r\n                                        }\r\n                                    }\r\n\r\n                                    mtProtoService.GetRecentStickersAsync(false, recentStickersHash,\r\n                                        result2 => Execute.BeginOnUIThread(() =>\r\n                                        {\r\n                                            var recentStickers = result2 as TLRecentStickers;\r\n                                            if (allStickers43 != null && recentStickers != null)\r\n                                            {\r\n                                                allStickers43.RecentStickers = recentStickers;\r\n                                                stateService.SaveAllStickersAsync(cachedStickers);\r\n                                            }\r\n\r\n                                            var favedStickersHash = new TLInt(0);\r\n                                            if (allStickers43 != null)\r\n                                            {\r\n                                                var favedStickers = allStickers43.FavedStickers;\r\n                                                if (favedStickers != null)\r\n                                                {\r\n                                                    favedStickersHash = favedStickers.Hash;\r\n                                                }\r\n                                            }\r\n                                            mtProtoService.GetFavedStickersAsync(favedStickersHash,\r\n                                                result3 => Execute.BeginOnUIThread(() =>\r\n                                                {\r\n                                                    var favedStickers = result3 as TLFavedStickers;\r\n                                                    if (allStickers43 != null && favedStickers != null)\r\n                                                    {\r\n                                                        allStickers43.FavedStickers = favedStickers;\r\n                                                        stateService.SaveAllStickersAsync(cachedStickers);\r\n                                                    }\r\n\r\n                                                    LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                                                    CreateSetsAndUpdatePanel(index, cachedStickers);\r\n                                                }),\r\n                                                error3 => Execute.BeginOnUIThread(() =>\r\n                                                {\r\n                                                    LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                                                    CreateSetsAndUpdatePanel(index, cachedStickers);\r\n\r\n                                                    Execute.ShowDebugMessage(\"messages.getFavedStickers error \" + error3);\r\n                                                }));\r\n                                        }),\r\n                                        error => Execute.BeginOnUIThread(() =>\r\n                                        {\r\n                                            LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                                            CreateSetsAndUpdatePanel(index, cachedStickers);\r\n\r\n                                            Execute.ShowDebugMessage(\"messages.getRecentStickers error \" + error);\r\n                                        }));\r\n                                }),\r\n                                error => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                                    CreateSetsAndUpdatePanel(index, cachedStickers);\r\n\r\n                                    Execute.ShowDebugMessage(\"messages.getAllStickers error \" + error);\r\n                                }));\r\n                        }\r\n                    });\r\n\r\n                    return;\r\n                }\r\n\r\n                for (var i = 0; i < EmojiData.SpritesByCategory[index].Length; i++)\r\n                {\r\n                    var item = new EmojiSpriteItem(EmojiData.SpritesByCategory[index][i], index, i);\r\n                    item.EmojiSelected += OnEmojiSelected;\r\n                    sprites.Add(item);\r\n                }\r\n\r\n                switch (index)\r\n                {\r\n                    case 0:\r\n                        _category1Sprites = sprites;\r\n                        break;\r\n                    case 1:\r\n                        _category2Sprites = sprites;\r\n                        break;\r\n                    case 2:\r\n                        _category3Sprites = sprites;\r\n                        break;\r\n                    case 3:\r\n                        _category4Sprites = sprites;\r\n                        break;\r\n                    case 4:\r\n                        _category5Sprites = sprites;\r\n                        break;\r\n                }\r\n            }\r\n\r\n            // only emoji category here\r\n            if (index < StickerCategoryIndex)\r\n            {\r\n                CurrentCategory = index;\r\n                var firstSliceCount = 1;\r\n                for (var i = 0; i < sprites.Count; i++)\r\n                {\r\n                    if (i < firstSliceCount)\r\n                    {\r\n                        firstSlice.Add(sprites[i]);\r\n                    }\r\n                    else\r\n                    {\r\n                        secondSlice.Add(sprites[i]);\r\n                    }\r\n                }\r\n\r\n                VirtPanel.AddItems(firstSlice); \r\n                CreateButtonsBackgrounds(index);\r\n                if (!_wasRendered)\r\n                {\r\n                    // Display LoadingProgressBar only once\r\n                    LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                    _wasRendered = true;\r\n                }\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (_currentCategory != index)\r\n                        return;\r\n\r\n                    VirtPanel.AddItems(secondSlice);\r\n                });\r\n            }\r\n        }\r\n\r\n        private void UpdateFeaturedStickersPosition()\r\n        {\r\n            if (_featuredStickers == null) return;\r\n\r\n            var hasUnreadFeaturedStickers = _featuredStickers.Unread.Count > 0;\r\n            var index = StickersPanel.Children.IndexOf(_featuredStickersGrid);\r\n\r\n            if (hasUnreadFeaturedStickers)\r\n            {\r\n                if (_featuredStickers != null && _featuredStickersCounter != null)\r\n                {\r\n                    _featuredStickersCounter.Counter = _featuredStickers.Unread.Count;\r\n                }\r\n                if (index == StickersPanel.Children.Count - 1 - 1)\r\n                {\r\n                    StickersPanel.Children.RemoveAt(index);\r\n                    StickersPanel.Children.Insert(1, _featuredStickersGrid);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (index == 1)\r\n                {\r\n                    StickersPanel.Children.RemoveAt(index);\r\n                    StickersPanel.Children.Insert(StickersPanel.Children.Count - 1, _featuredStickersGrid);\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void UpdateFoundSets(IStickers featuredStickers)\r\n        {\r\n            if (featuredStickers == null) return;\r\n\r\n            var stickerSets = new Dictionary<string, TLVector<TLStickerItem>>();\r\n\r\n            for (var i = 0; i < featuredStickers.Documents.Count; i++)\r\n            {\r\n                var document22 = featuredStickers.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        TLVector<TLStickerItem> stickers;\r\n                        if (stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(new TLStickerItem { Document = document22 });\r\n                        }\r\n                        else\r\n                        {\r\n                            stickerSets[setId] = new TLVector<TLStickerItem> { new TLStickerItem { Document = document22 } };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            for (var i = 0; i < featuredStickers.Sets.Count; i++)\r\n            {\r\n                var set = featuredStickers.Sets[i];\r\n\r\n                var setName = set.Id.ToString();\r\n                TLVector<TLStickerItem> stickers;\r\n                if (stickerSets.TryGetValue(setName, out stickers))\r\n                {\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        objects.Add(sticker);\r\n                    }\r\n\r\n                    set.Stickers = objects;\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void UpdateFeaturedSets(TLFeaturedStickers featuredStickers)\r\n        {\r\n            if (featuredStickers == null) return;\r\n\r\n            var stickerSets = new Dictionary<string, TLVector<TLStickerItem>>();\r\n            var unreadDict = new Dictionary<long, long>();\r\n            foreach (var unreadId in featuredStickers.Unread)\r\n            {\r\n                unreadDict[unreadId.Value] = unreadId.Value;\r\n            }\r\n\r\n            for (var i = 0; i < featuredStickers.Documents.Count; i++)\r\n            {\r\n                var document22 = featuredStickers.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        TLVector<TLStickerItem> stickers;\r\n                        if (stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(new TLStickerItem {Document = document22});\r\n                        }\r\n                        else\r\n                        {\r\n                            stickerSets[setId] = new TLVector<TLStickerItem> {new TLStickerItem {Document = document22}};\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            for (var i = 0; i < featuredStickers.Sets.Count; i++)\r\n            {\r\n                var set = featuredStickers.Sets[i];\r\n                if (unreadDict.ContainsKey(set.Id.Value))\r\n                {\r\n                    set.Unread = true;\r\n                }\r\n\r\n                var setName = set.Id.ToString();\r\n                TLVector<TLStickerItem> stickers;\r\n                if (stickerSets.TryGetValue(setName, out stickers))\r\n                {\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        objects.Add(sticker);\r\n                    }\r\n\r\n                    set.Stickers = objects;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void CreateSetsAndUpdatePanel(int index, TLAllStickers allStickers)\r\n        {\r\n            _allStickers = allStickers;\r\n            \r\n            CreateSets(allStickers);\r\n\r\n            UpdateStickersPanel(index);\r\n        }\r\n\r\n        private void CreateSets(TLAllStickers allStickers)\r\n        {\r\n            _stickerSets.Clear();\r\n            var recentlyUsedKey = @\"tlg/recentlyUsed\";\r\n            var favedKey = @\"tlg/faved\";\r\n            var groupKey = @\"tlg/group\";\r\n            _stickerSets[recentlyUsedKey] = new List<TLDocument22>();\r\n            _stickerSets[favedKey] = new List<TLDocument22>();\r\n            _stickerSets[groupKey] = new List<TLDocument22>();\r\n\r\n            if (_messagesStickerSet != null)\r\n            {\r\n                for (var i = 0; i < _messagesStickerSet.Documents.Count; i++)\r\n                {\r\n                    var document22 = _messagesStickerSet.Documents[i] as TLDocument22;\r\n                    if (document22 != null)\r\n                    {\r\n                        List<TLDocument22> stickers;\r\n                        if (_stickerSets.TryGetValue(groupKey, out stickers))\r\n                        {\r\n                            stickers.Add(document22);\r\n                        }\r\n                        else\r\n                        {\r\n                            _stickerSets[groupKey] = new List<TLDocument22> { document22 };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (allStickers == null) return;\r\n\r\n            for (var i = 0; i < allStickers.Documents.Count; i++)\r\n            {\r\n                var document22 = allStickers.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        List<TLDocument22> stickers;\r\n                        if (_stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(document22);\r\n                        }\r\n                        else\r\n                        {\r\n                            _stickerSets[setId] = new List<TLDocument22> {document22};\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var allStickers43 = allStickers as TLAllStickers43;\r\n            if (allStickers43 != null)\r\n            {\r\n                var favedStickersCache = new Dictionary<long, long>();\r\n                if (allStickers43.FavedStickers != null && allStickers43.FavedStickers.Documents.Count > 0)\r\n                {\r\n                    _favedStickersButton.Visibility = Visibility.Visible;\r\n                    var config = IoC.Get<ICacheService>().GetConfig() as TLConfig71;\r\n                    var stickersFavedLimit = config != null ? config.StickersFavedLimit.Value : 5;\r\n\r\n                    for (var i = 0; i < allStickers43.FavedStickers.Documents.Count && i < stickersFavedLimit; i++)\r\n                    {\r\n                        var document22 = allStickers43.FavedStickers.Documents[i] as TLDocument22;\r\n                        if (document22 != null)\r\n                        {\r\n                            favedStickersCache[document22.Index] = document22.Index;\r\n\r\n                            List<TLDocument22> stickers;\r\n                            if (_stickerSets.TryGetValue(favedKey, out stickers))\r\n                            {\r\n                                stickers.Add(document22);\r\n                            }\r\n                            else\r\n                            {\r\n                                _stickerSets[favedKey] = new List<TLDocument22> { document22 };\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    _favedStickersButton.Visibility = Visibility.Collapsed;\r\n                }\r\n\r\n                if (allStickers43.RecentStickers != null)\r\n                {\r\n                    for (var i = 0; i < allStickers43.RecentStickers.Documents.Count; i++)\r\n                    {\r\n                        var document22 = allStickers43.RecentStickers.Documents[i] as TLDocument22;\r\n                        if (document22 != null && !favedStickersCache.ContainsKey(document22.Index))\r\n                        {\r\n                            List<TLDocument22> stickers;\r\n                            if (_stickerSets.TryGetValue(recentlyUsedKey, out stickers))\r\n                            {\r\n                                stickers.Add(document22);\r\n                            }\r\n                            else\r\n                            {\r\n                                _stickerSets[recentlyUsedKey] = new List<TLDocument22> {document22};\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void OnRootFrameTransformChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((EmojiControl)source).OnRootFrameTransformChanged();\r\n        }\r\n\r\n        public void OnRootFrameTransformChanged()\r\n        {\r\n            if (!_isOpen) return;\r\n\r\n            var offset = _isPortrait ? -PortraitOrientationHeight : -AlbumOrientationHeight;\r\n            _frameTransform.Y = offset;\r\n        }\r\n\r\n        #region Recents\r\n\r\n        public static readonly DependencyProperty RecentItemsProperty = DependencyProperty.Register(\r\n            \"RecentItems\", typeof (IList<EmojiDataItem>), typeof (EmojiControl), new PropertyMetadata(default(IList<EmojiDataItem>)));\r\n\r\n        public IList<EmojiDataItem> RecentItems\r\n        {\r\n            get { return (IList<EmojiDataItem>) GetValue(RecentItemsProperty); }\r\n            set { SetValue(RecentItemsProperty, value); }\r\n        }\r\n\r\n        public void LoadRecents()\r\n        {\r\n            CurrentCategory = RecentsCategoryIndex;\r\n\r\n            if (EmojiData.Recents == null)\r\n            {\r\n                EmojiData.LoadRecents();\r\n            }\r\n\r\n            RecentItems = new ObservableCollection<EmojiDataItem>(EmojiData.Recents ?? new List<EmojiDataItem>());\r\n\r\n            CSV.IsHitTestVisible = false;\r\n            Recents.Visibility = Visibility.Visible;\r\n        }\r\n\r\n        public void UnloadRecents()\r\n        {\r\n            CSV.IsHitTestVisible = true;\r\n            Recents.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        #endregion Recents\r\n\r\n        private void OnEmojiSelected(object sender, EmojiSelectedEventArgs args)\r\n        {\r\n            TextBoxTarget.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                var selectionStart = TextBoxTarget.SelectionStart;\r\n                TextBoxTarget.Text = TextBoxTarget.Text.Insert(selectionStart, args.DataItem.String);\r\n                TextBoxTarget.Select(selectionStart + args.DataItem.String.Length, 0);\r\n            });\r\n\r\n            if (_currentCategory == RecentsCategoryIndex) return;\r\n\r\n            var that = args.DataItem;\r\n            ThreadPool.QueueUserWorkItem(state => EmojiData.AddToRecents(that));\r\n        }\r\n\r\n        public event EventHandler<StickerSelectedEventArgs> StickerSelected;\r\n\r\n        protected virtual void RaiseStickerSelected(StickerSelectedEventArgs e)\r\n        {\r\n            var handler = StickerSelected;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void OnStickerSelected(object sender, StickerSelectedEventArgs args)\r\n        {\r\n            UpdateRecentStickers(args);\r\n\r\n            RaiseStickerSelected(args);\r\n        }\r\n\r\n        private void OnFeaturedStickerSelected(object sender, StickerSelectedEventArgs args)\r\n        {\r\n            OnStickerSetOpened(sender, new StickerSetOpenedEventArgs{ Set = args.Set });\r\n        }\r\n\r\n        private bool _reloadStickerSprites;\r\n\r\n        public void UpdateRecentStickers(StickerSelectedEventArgs args)\r\n        {\r\n            if (args == null) return;\r\n            var stickerId = args.Sticker.Document.Id;\r\n\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var stateService = IoC.Get<IStateService>();\r\n                stateService.GetAllStickersAsync(cachedStickers =>\r\n                {\r\n                    var allStickers = cachedStickers as TLAllStickers43;\r\n                    if (allStickers != null)\r\n                    {\r\n                        var recentStickers = allStickers.RecentStickers.Documents;\r\n                        if (recentStickers != null)\r\n                        {\r\n                            var isAdded = false;\r\n                            for (var i = 0; i < recentStickers.Count; i++)\r\n                            {\r\n                                var recentlyUsedSticker = recentStickers[i];\r\n\r\n                                if (recentStickers[i].Id.Value == stickerId.Value)\r\n                                {\r\n                                    if (i != 0)\r\n                                    {\r\n                                        recentStickers.RemoveAt(i);\r\n                                        recentStickers.Insert(0, recentlyUsedSticker);\r\n\r\n                                        var recentStickers76 = allStickers.RecentStickers as TLRecentStickers76;\r\n                                        if (recentStickers76 != null)\r\n                                        {\r\n                                            recentStickers76.Dates.RemoveAt(i);\r\n                                            recentStickers76.Dates.Insert(0, TLUtils.DateToUniversalTimeTLInt(IoC.Get<IMTProtoService>().ClientTicksDelta, DateTime.Now));\r\n                                        }\r\n\r\n                                        _reloadStickerSprites = true;\r\n                                    }\r\n                                    isAdded = true;\r\n                                    break;\r\n                                }\r\n                            }\r\n\r\n                            if (!isAdded)\r\n                            {\r\n                                recentStickers.Insert(0, args.Sticker.Document);\r\n\r\n                                var recentStickers76 = allStickers.RecentStickers as TLRecentStickers76;\r\n                                if (recentStickers76 != null)\r\n                                {\r\n                                    recentStickers76.Dates.Insert(0, TLUtils.DateToUniversalTimeTLInt(IoC.Get<IMTProtoService>().ClientTicksDelta, DateTime.Now));\r\n                                }\r\n\r\n                                _reloadStickerSprites = true;\r\n                            }\r\n\r\n                            if (_stickerSets != null)\r\n                            {\r\n                                var recentlyUsedKey = @\"tlg/recentlyUsed\";\r\n                                _stickerSets[recentlyUsedKey] = new List<TLDocument22>();\r\n                                var favedStickersCache = new Dictionary<long, long>();\r\n                                if (allStickers.FavedStickers != null && allStickers.FavedStickers.Documents.Count > 0)\r\n                                {\r\n                                    var config = IoC.Get<ICacheService>().GetConfig() as TLConfig71;\r\n                                    var stickersFavedLimit = config != null ? config.StickersFavedLimit.Value : 5;\r\n                                    for (var i = 0; i < allStickers.FavedStickers.Documents.Count && i < stickersFavedLimit; i++)\r\n                                    {\r\n                                        var document22 = allStickers.FavedStickers.Documents[i] as TLDocument22;\r\n                                        if (document22 != null)\r\n                                        {\r\n                                            favedStickersCache[document22.Index] = document22.Index;\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                if (allStickers.RecentStickers != null)\r\n                                {\r\n                                    for (var i = 0; i < allStickers.RecentStickers.Documents.Count; i++)\r\n                                    {\r\n                                        var document22 = allStickers.RecentStickers.Documents[i] as TLDocument22;\r\n                                        if (document22 != null && !favedStickersCache.ContainsKey(document22.Index))\r\n                                        {\r\n                                            List<TLDocument22> stickers;\r\n                                            if (_stickerSets.TryGetValue(recentlyUsedKey, out stickers))\r\n                                            {\r\n                                                stickers.Add(document22);\r\n                                            }\r\n                                            else\r\n                                            {\r\n                                                _stickerSets[recentlyUsedKey] = new List<TLDocument22> { document22 };\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            stateService.SaveAllStickersAsync(cachedStickers);\r\n                        }\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n        private void BackspaceButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            var text = TextBoxTarget.Text;\r\n            var selectionStart = TextBoxTarget.SelectionStart;\r\n\r\n            if (text.Length <= 0) return;\r\n            if (selectionStart == 0) return;\r\n\r\n            int toSubstring;\r\n\r\n            if (text.Length > 1)\r\n            {\r\n                var prevSymbol = text[selectionStart - 2];\r\n                var prevBytes = BitConverter.GetBytes(prevSymbol);\r\n\r\n                var curSymbol = text[selectionStart - 1];\r\n                var curBytes = BitConverter.GetBytes(curSymbol);\r\n\r\n                if (prevBytes[1] == 0xD8 && (prevBytes[0] == 0x3D || prevBytes[0] == 0x3C))\r\n                    toSubstring = 2;\r\n                else if (curBytes[1] == 0x20 && curBytes[0] == 0xE3)\r\n                    toSubstring = 2;\r\n                else\r\n                    toSubstring = 1;\r\n            }\r\n            else\r\n            {\r\n                toSubstring = 1;\r\n            }\r\n\r\n            TextBoxTarget.Text = text.Remove(selectionStart - toSubstring, toSubstring);\r\n            TextBoxTarget.SelectionStart = selectionStart - toSubstring;\r\n        }\r\n\r\n        #region User Interface\r\n\r\n        private readonly Button _abcButton = new Button { ClickMode = ClickMode.Release };\r\n        private readonly Button _recentsButton = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat0Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat1Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat2Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat3Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _cat4Button = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _stickerButton = new Button { ClickMode = ClickMode.Press };\r\n        private readonly RepeatButton _backspaceButton = new RepeatButton { ClickMode = ClickMode.Release, Interval = 100 };\r\n\r\n        private readonly Button _emojiButton = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _favedStickersButton = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _recentStickersButton = new Button { ClickMode = ClickMode.Press };\r\n        private readonly Button _groupStickersButton = new Button { ClickMode = ClickMode.Release };\r\n        private readonly List<Button> _stickerSetButtons = new List<Button>();\r\n        private readonly Button _featuredStickersButton = new Button { ClickMode = ClickMode.Press };\r\n        private Grid _featuredStickersGrid;\r\n        private UnreadCounter _featuredStickersCounter;\r\n        private readonly Button _settingsButton = new Button { ClickMode = ClickMode.Release };\r\n\r\n        public const int RecentsCategoryIndex = 5;\r\n        public const int StickerCategoryIndex = 6;\r\n        public const int EmojiCategoryIndex = 7;\r\n        public const int FeaturedStickersCategoryIndex = 8;\r\n        public const int FavedStickersCategoryIndex = 9;\r\n        public const int GroupStickersCategoryIndex = 10;\r\n        public const int RecentStickersCategoryIndex = 11;\r\n\r\n        private int GetStickerSetButtonByKey(string key)\r\n        {\r\n            if (key == null)\r\n            {\r\n                return -1;\r\n            }\r\n\r\n            for (var i = 0; i < _stickerSetButtons.Count; i++)\r\n            {\r\n                if (string.Equals(key, _stickerSetButtons[i].DataContext.ToString(), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return RecentStickersCategoryIndex + i + 1;\r\n                }\r\n            }\r\n\r\n            return -1;\r\n        }\r\n\r\n        private Button GetCategoryButtonByIndex(int index)\r\n        {\r\n\r\n            switch (index)\r\n            {\r\n                case 0:\r\n                    return _cat0Button;\r\n                case 1:\r\n                    return _cat1Button;\r\n                case 2:\r\n                    return _cat2Button;\r\n                case 3:\r\n                    return _cat3Button;\r\n                case 4:\r\n                    return _cat4Button;\r\n                case RecentsCategoryIndex:\r\n                    return _recentsButton;\r\n                case StickerCategoryIndex:\r\n                    return _stickerButton;\r\n                case EmojiCategoryIndex:\r\n                    return _emojiButton;\r\n                case FeaturedStickersCategoryIndex:\r\n                    return _featuredStickersButton;\r\n                case FavedStickersCategoryIndex:\r\n                    return _favedStickersButton;\r\n                case GroupStickersCategoryIndex:\r\n                    return _groupStickersButton;\r\n                case RecentStickersCategoryIndex:\r\n                    return _recentStickersButton;\r\n                default:\r\n                    {\r\n                        if (index > RecentStickersCategoryIndex)\r\n                        {\r\n                            index -= RecentStickersCategoryIndex;\r\n                            if (index > 0\r\n                                && _stickerSetButtons.Count >= index)\r\n                            {\r\n                                return _stickerSetButtons[index - 1];\r\n                            }\r\n                        }\r\n\r\n                        return null;\r\n                    }\r\n            }\r\n        }\r\n\r\n        public Brush ButtonBackground\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                return isLightTheme\r\n                    ? new SolidColorBrush(Colors.White)\r\n                    : new SolidColorBrush(Color.FromArgb(255, 71, 71, 71));\r\n            }\r\n        }\r\n\r\n        private void UpdateButtons(bool isStickersPanelVisible)\r\n        {\r\n            IsStickersPanelVisible = isStickersPanelVisible;\r\n\r\n            ButtonsGrid.Children.Clear();\r\n            ButtonsGrid.ColumnDefinitions.Clear();\r\n\r\n            var columnsCount = IsStickersPanelVisible ? 9 : 8;\r\n            for (var i = 0; i < columnsCount; i++)\r\n            {\r\n                ButtonsGrid.ColumnDefinitions.Add(new ColumnDefinition());\r\n            }\r\n\r\n            ButtonsGrid.Children.Add(_abcButton);\r\n            ButtonsGrid.Children.Add(_recentsButton);\r\n            ButtonsGrid.Children.Add(_cat0Button);\r\n            ButtonsGrid.Children.Add(_cat1Button);\r\n            ButtonsGrid.Children.Add(_cat2Button);\r\n            ButtonsGrid.Children.Add(_cat3Button);\r\n            ButtonsGrid.Children.Add(_cat4Button);\r\n            if (IsStickersPanelVisible)\r\n            {\r\n                ButtonsGrid.Children.Add(_stickerButton);\r\n            }\r\n            ButtonsGrid.Children.Add(_backspaceButton);\r\n        }\r\n\r\n        public void LoadButtons()\r\n        {\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            var buttonStyleResourceKey = isLightTheme ? \"CategoryButtonLightThemeStyle\" : \"CategoryButtonDarkThemeStyle\";\r\n            var buttonStyle = (Style)Resources[buttonStyleResourceKey];\r\n\r\n            _abcButton.Style = buttonStyle;\r\n            _recentsButton.Style = buttonStyle;\r\n            _cat0Button.Style = buttonStyle;\r\n            _cat1Button.Style = buttonStyle;\r\n            _cat2Button.Style = buttonStyle;\r\n            _cat3Button.Style = buttonStyle;\r\n            _cat4Button.Style = buttonStyle;\r\n            _stickerButton.Style = buttonStyle;\r\n\r\n            _emojiButton.Style = buttonStyle;\r\n            _favedStickersButton.Style = buttonStyle;\r\n            _groupStickersButton.Style = buttonStyle;\r\n            _recentStickersButton.Style = buttonStyle;\r\n            _featuredStickersButton.Style = buttonStyle;\r\n            _settingsButton.Style = buttonStyle;\r\n\r\n            var repeatButtonStyleResourceKey = isLightTheme ? \"RepeatButtonLightThemeStyle\" : \"RepeatButtonDarkThemeStyle\";\r\n            _backspaceButton.Style = (Style)Resources[repeatButtonStyleResourceKey];\r\n\r\n            var prefix = isLightTheme ? \"light.\" : string.Empty;\r\n            _abcButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.abc\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _recentsButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.recent\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat0Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.category.1\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat1Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.category.2\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat2Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.category.3\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat3Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.category.4\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _cat4Button.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.category.5\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _stickerButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.sticker\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _backspaceButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.backspace\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n\r\n            Grid.SetColumn(_abcButton, 0);\r\n            Grid.SetColumn(_recentsButton, 1);\r\n            Grid.SetColumn(_cat0Button, 2);\r\n            Grid.SetColumn(_cat1Button, 3);\r\n            Grid.SetColumn(_cat2Button, 4);\r\n            Grid.SetColumn(_cat3Button, 5);\r\n            Grid.SetColumn(_cat4Button, 6);\r\n            Grid.SetColumn(_stickerButton, 7);\r\n            Grid.SetColumn(_backspaceButton, 8);\r\n\r\n            _emojiButton.Width = 47.0;\r\n            _emojiButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.category.1\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _featuredStickersButton.Width = 78.0;\r\n            _featuredStickersButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.featured\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _favedStickersButton.Width = 78.0;\r\n            _favedStickersButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.faved\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _groupStickersButton.Width = 78.0;\r\n            _groupStickersButton.Content = new ConversationTileControl\r\n            {\r\n                Size = 45,\r\n                LabelFontSize = 19\r\n            };\r\n            _recentStickersButton.Width = 78.0;\r\n            _recentStickersButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.recent\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _settingsButton.Width = 78.0;\r\n            _settingsButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Helpers.GetAssetUri(prefix + \"emoji.settings\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n\r\n            //Grid.SetColumn(_emojiButton, 0);\r\n            //Grid.SetColumn(_recentStickersButton, 1);\r\n\r\n            _abcButton.Click += AbcButtonOnClick;\r\n            _cat0Button.Click += CategoryButtonClick;\r\n            _cat1Button.Click += CategoryButtonClick;\r\n            _cat2Button.Click += CategoryButtonClick;\r\n            _cat3Button.Click += CategoryButtonClick;\r\n            _cat4Button.Click += CategoryButtonClick;\r\n            _stickerButton.Click += StickerButtonOnClick;\r\n            _recentsButton.Click += CategoryButtonClick;\r\n            _backspaceButton.Click += BackspaceButtonOnClick;\r\n\r\n            _emojiButton.Click += EmojiButtonOnClick;\r\n            _favedStickersButton.Click += FavedStickersButtonOnClick;\r\n            _groupStickersButton.Click += GroupStickersButtonOnClick;\r\n            _recentStickersButton.Click += RecentStickersButtonOnClick;\r\n            _featuredStickersButton.Click += FeaturedStickersButtonOnClick;\r\n            _settingsButton.Click += SettingsButtonOnClick;\r\n\r\n            StickersPanel.Children.Clear();\r\n            StickersPanel.Children.Add(_emojiButton);\r\n\r\n            var featuredStickersCounter = new UnreadCounter\r\n            {\r\n                BorderBackground = (Brush) new OverlayAccentBrushConverter{ AccentColor = ((SolidColorBrush)Application.Current.Resources[\"TelegramBadgeAccentBrush\"]).Color }.Convert(null, null, null, null),\r\n                Counter = 0,\r\n                Margin = new Thickness(6, 6, 9, 0),\r\n                HorizontalAlignment = HorizontalAlignment.Right,\r\n                IsHitTestVisible = false\r\n            };\r\n            var featuredStickersGrid = new Grid();\r\n            featuredStickersGrid.Children.Add(_featuredStickersButton);\r\n            featuredStickersGrid.Children.Add(featuredStickersCounter);\r\n            _featuredStickersGrid = featuredStickersGrid;\r\n            _featuredStickersCounter = featuredStickersCounter;\r\n            StickersPanel.Children.Add(_featuredStickersGrid);\r\n            StickersPanel.Children.Add(_favedStickersButton);\r\n            StickersPanel.Children.Add(_groupStickersButton);\r\n            StickersPanel.Children.Add(_recentStickersButton);\r\n\r\n            StickersPanel.Children.Add(_settingsButton);\r\n\r\n            UpdateButtons(IsStickersPanelVisible);\r\n        }\r\n\r\n        private void AbcButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            TextBoxTarget.Focus();\r\n        }\r\n\r\n        private void SettingsButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            RaiseSettingsButtonClick();\r\n        }\r\n\r\n        private void FeaturedStickersButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            if (_featuredStickers != null)\r\n            {\r\n                LoadFeaturedStickerSets(_featuredStickers.SetsCovered);\r\n            }\r\n            else\r\n            {\r\n                FeaturedStickersVirtPanel.ClearItems();\r\n                CurrentCategory = FeaturedStickersCategoryIndex;\r\n            }\r\n        }\r\n\r\n        private void GroupStickersButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            var key = @\"tlg/group\";\r\n            List<TLDocument22> stickerSet;\r\n            if (_stickerSets != null && _stickerSets.TryGetValue(@\"tlg/group\", out stickerSet))\r\n            {\r\n                LoadStickerSet(key, stickerSet);\r\n            }\r\n            else\r\n            {\r\n                VirtPanel.ClearItems();\r\n                _groupStickersSprites = new List<VListItemBase>();\r\n                CurrentCategory = GroupStickersCategoryIndex;\r\n            }\r\n        }\r\n\r\n        private void FavedStickersButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            var key = @\"tlg/faved\";\r\n            List<TLDocument22> stickerSet;\r\n            if (_stickerSets != null && _stickerSets.TryGetValue(@\"tlg/faved\", out stickerSet))\r\n            {\r\n                LoadStickerSet(key, stickerSet);\r\n            }\r\n            else\r\n            {\r\n                VirtPanel.ClearItems();\r\n                _favedStickersSprites = new List<VListItemBase>();\r\n                CurrentCategory = FavedStickersCategoryIndex;\r\n            }\r\n        }\r\n\r\n        private void RecentStickersButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            var key = @\"tlg/recentlyUsed\";\r\n            List<TLDocument22> stickerSet;\r\n            if (_stickerSets != null && _stickerSets.TryGetValue(@\"tlg/recentlyUsed\", out stickerSet))\r\n            {\r\n                LoadStickerSet(key, stickerSet);\r\n            }\r\n            else\r\n            {\r\n                VirtPanel.ClearItems();\r\n                _recentStickersSprites = new List<VListItemBase>();\r\n                CurrentCategory = RecentStickersCategoryIndex;\r\n            }\r\n        }\r\n\r\n        private void StickerButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            ButtonsGrid.Visibility = Visibility.Collapsed;\r\n            StickersGrid.Visibility = Visibility.Visible;\r\n            StickersScrollViewer.ScrollToHorizontalOffset(0.0);\r\n\r\n            LoadCategory(StickerCategoryIndex);\r\n        }\r\n\r\n        private void EmojiButtonOnClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            ButtonsGrid.Visibility = Visibility.Visible;\r\n            StickersGrid.Visibility = Visibility.Collapsed;\r\n\r\n            if (EmojiData.Recents == null)\r\n            {\r\n                EmojiData.LoadRecents();\r\n            }\r\n\r\n            if (EmojiData.Recents == null || EmojiData.Recents.Count == 0)\r\n            {\r\n                LoadCategory(0);\r\n            }\r\n            else\r\n            {\r\n                LoadCategory(RecentsCategoryIndex);\r\n            }\r\n        }\r\n\r\n        private void CategoryButtonClick(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            if (sender == _cat0Button)\r\n                LoadCategory(0);\r\n            else if (sender == _cat1Button)\r\n                LoadCategory(1);\r\n            else if (sender == _cat2Button)\r\n                LoadCategory(2);\r\n            else if (sender == _cat3Button)\r\n                LoadCategory(3);\r\n            else if (sender == _cat4Button)\r\n                LoadCategory(4);\r\n            else if (sender == _favedStickersButton)\r\n                LoadCategory(FavedStickersCategoryIndex);\r\n            else if (sender == _recentsButton)\r\n                LoadCategory(RecentsCategoryIndex);\r\n            else if (sender == _stickerButton)\r\n                LoadCategory(StickerCategoryIndex);\r\n        }\r\n\r\n        private void CreateButtonsBackgrounds(int categoryIndex)\r\n        {\r\n            var sprites = EmojiData.SpriteRowsCountByCategory[categoryIndex];\r\n            var buttonBackgroundColor = ButtonBackground;\r\n            for (var i = 0; i < sprites.Length; i++)\r\n            {\r\n                var rowsCount = sprites[i];\r\n\r\n                var block = new Rectangle\r\n                {\r\n                    Width = EmojiSpriteItem.SpriteWidth,\r\n                    Height = EmojiSpriteItem.RowHeight * rowsCount,\r\n                    Fill = buttonBackgroundColor,\r\n                    Margin = new Thickness(4, 0, 4, 0)\r\n                };\r\n                Canvas.SetTop(block, (EmojiSpriteItem.SpriteHeight) * i);\r\n                VirtPanel.Children.Insert(0, block);\r\n            }\r\n        }\r\n\r\n        private void InitializeOrientation(Orientation orientation)\r\n        {\r\n            switch (orientation)\r\n            {\r\n                case Orientation.Vertical:\r\n                    ButtonsGrid.Height = 78;\r\n                    ButtonsGrid.Margin = new Thickness(0, 6, 0, 0);\r\n                    SetHeight(PortraitOrientationHeight);\r\n                    //_frameTransform.Y = -PortraitOrientationHeight;\r\n                    break;\r\n\r\n                case Orientation.Horizontal:\r\n                    ButtonsGrid.Height = 58;\r\n                    ButtonsGrid.Margin = new Thickness(0, 6, 0, 3);\r\n                    SetHeight(AlbumOrientationHeight);\r\n                    //_frameTransform.Y = -AlbumOrientationHeight;\r\n                    break;\r\n            }\r\n        }\r\n\r\n        #endregion User Interface\r\n\r\n\r\n        /// <summary>\r\n        /// Orientation change handler\r\n        /// </summary>\r\n        private void OnSizeChanged(object sender, SizeChangedEventArgs sizeChangedEventArgs)\r\n        {\r\n            var currentOrientation = ((PhoneApplicationFrame)Application.Current.RootVisual).Orientation;\r\n            var isPortrait = currentOrientation == PageOrientation.PortraitUp ||\r\n                             currentOrientation == PageOrientation.PortraitDown ||\r\n                             currentOrientation == PageOrientation.Portrait;\r\n\r\n            if (_isPortrait == isPortrait && _wasRendered) return;\r\n\r\n            _isPortrait = isPortrait;\r\n            InitializeOrientation(isPortrait ? Orientation.Vertical : Orientation.Horizontal);\r\n        }\r\n\r\n        private void UIElement_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n\r\n            ((Border)sender).Background = (Brush)Application.Current.Resources[\"TelegramBadgeAccentBrush\"];\r\n        }\r\n\r\n        private void UIElement_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            ((Border) sender).Background = ButtonBackground;\r\n        }\r\n\r\n        private void UIElement_OnMouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            ((Border) sender).Background = ButtonBackground;\r\n        }\r\n\r\n        private void EmojiButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var button = (FrameworkElement)sender;\r\n            var emojiItem = (EmojiDataItem)button.DataContext;\r\n\r\n            OnEmojiSelected(sender, new EmojiSelectedEventArgs{DataItem = emojiItem});\r\n\r\n            ////RaiseEmojiAdded(new EmojiAddedEventArgs { Emoji = emojiItem.String });\r\n\r\n            //if (_currentCategory != RecentsCategoryIndex)\r\n            //{\r\n            //    var prevItem = RecentItems.FirstOrDefault(x => x.Code == emojiItem.Code);\r\n            //    if (prevItem != null)\r\n            //    {\r\n            //        RecentItems.Remove(prevItem);\r\n            //        RecentItems.Insert(0, prevItem);\r\n            //    }\r\n            //    else\r\n            //    {\r\n            //        RecentItems.Insert(0, emojiItem);\r\n            //        RecentItems = RecentItems.Take(30).ToList();\r\n            //    }\r\n            //}\r\n        }\r\n\r\n        public void ReloadStickerSprites()\r\n        {\r\n            if (_reloadStickerSprites)\r\n            {\r\n                _recentStickersSprites = null;\r\n            }\r\n        }\r\n\r\n        public void ClearRecentStickers()\r\n        {\r\n            _recentStickersSprites = null;\r\n        }\r\n\r\n        public void OpenStickerSprites()\r\n        {\r\n            if (_reloadStickerSprites)\r\n            {\r\n                if (_currentCategory == StickerCategoryIndex)\r\n                LoadCategory(_currentCategory);\r\n            }\r\n        }\r\n\r\n        public void ResetFavedStickers()\r\n        {\r\n            var allStickers43 = IoC.Get<IStateService>().GetAllStickers() as TLAllStickers43;\r\n            if (allStickers43 != null && allStickers43.FavedStickers != null)\r\n            {\r\n                var config = IoC.Get<ICacheService>().GetConfig() as TLConfig71;\r\n                var stickersFavedLimit = config != null ? config.StickersFavedLimit.Value : 5;\r\n\r\n                var favedKey = @\"tlg/faved\";\r\n                _stickerSets[favedKey] = new List<TLDocument22>();\r\n\r\n                if (allStickers43.FavedStickers.Documents.Count > 0)\r\n                {\r\n                    _favedStickersButton.Visibility = Visibility.Visible;\r\n\r\n                    var favedStickersCache = new Dictionary<long, long>();\r\n                    for (var i = 0; i < allStickers43.FavedStickers.Documents.Count && i < stickersFavedLimit; i++)\r\n                    {\r\n                        var document22 = allStickers43.FavedStickers.Documents[i] as TLDocument22;\r\n                        if (document22 != null)\r\n                        {\r\n                            favedStickersCache[document22.Index] = document22.Index;\r\n\r\n                            List<TLDocument22> stickers;\r\n                            if (_stickerSets.TryGetValue(favedKey, out stickers))\r\n                            {\r\n                                stickers.Add(document22);\r\n                            }\r\n                            else\r\n                            {\r\n                                _stickerSets[favedKey] = new List<TLDocument22> {document22};\r\n                            }\r\n                        }\r\n                    }\r\n                    _stickerSetSprites.Remove(favedKey);\r\n                    _favedStickersSprites = null;\r\n\r\n                    if (allStickers43.RecentStickers != null)\r\n                    {\r\n                        var recentKey = @\"tlg/recentlyUsed\";\r\n                        _stickerSets[recentKey] = new List<TLDocument22>();\r\n                        for (var i = 0; i < allStickers43.RecentStickers.Documents.Count; i++)\r\n                        {\r\n                            var document22 = allStickers43.RecentStickers.Documents[i] as TLDocument22;\r\n                            if (document22 != null && !favedStickersCache.ContainsKey(document22.Index))\r\n                            {\r\n                                List<TLDocument22> stickers;\r\n                                if (_stickerSets.TryGetValue(recentKey, out stickers))\r\n                                {\r\n                                    stickers.Add(document22);\r\n                                }\r\n                                else\r\n                                {\r\n                                    _stickerSets[recentKey] = new List<TLDocument22> { document22 };\r\n                                }\r\n                            }\r\n                        }\r\n                        _stickerSetSprites.Remove(recentKey);\r\n                        _recentStickersSprites = null;\r\n                    }\r\n\r\n                    if (CurrentCategory == FavedStickersCategoryIndex)\r\n                    {\r\n                        FavedStickersButtonOnClick(null, null);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    _favedStickersButton.Visibility = Visibility.Collapsed;\r\n                    if (CurrentCategory == FavedStickersCategoryIndex)\r\n                    {\r\n                        RecentStickersButtonOnClick(null, null);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ResetStickerSets()\r\n        {\r\n            var stateService = IoC.Get<IStateService>();\r\n            stateService.GetAllStickersAsync(cachedStickers =>\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    CreateSetsAndUpdatePanel(_currentCategory, cachedStickers);\r\n                    _recentStickersSprites = null;\r\n                });\r\n            });\r\n        }\r\n\r\n        public void ClearStickersOnLogOut()\r\n        {\r\n            CreateSetsAndUpdatePanel(_currentCategory, null);\r\n            _recentStickersSprites = null;\r\n            _stickerSets.Clear();\r\n            _stickerSetSprites.Clear();\r\n        }\r\n\r\n        #region Stickers preview\r\n\r\n        private static DateTime? _startTime;\r\n        private static FrameworkElement _fromItem;\r\n        private static Storyboard _storyboard;\r\n        private static FrameworkElement _lastMouseEnter;\r\n        //private static ScrollViewer ViewportControl;\r\n        //private static Canvas Canvas;\r\n        //private static Grid Preview;\r\n        //private static Grid PreviewGrid;\r\n        //private static Image PreviewImage;\r\n        //private static Image Image;\r\n        //private static TextBlock DebugText;\r\n\r\n        private void StickerPreviewGrid_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var fromItem = _fromItem;\r\n            if (fromItem == null) return;\r\n\r\n            var position = fromItem.TransformToVisual(Application.Current.RootVisual).Transform(new Point(fromItem.ActualWidth / 2.0, fromItem.ActualHeight / 2.0));\r\n            //DebugText.Text = position.ToString();\r\n\r\n            var position2 = new Point(240.0, 400.0); //PreviewImage.TransformToVisual(Application.Current.RootVisual).Transform(new Point(PreviewImage.ActualWidth / 2.0, PreviewImage.ActualHeight / 2.0));//\r\n            //DebugText.Text += Environment.NewLine + position2;\r\n\r\n            var duration = .75;\r\n            IEasingFunction easingFunction = new ElasticEase { Oscillations = 1, Springiness = 10.0, EasingMode = EasingMode.EaseOut };\r\n            var storyboard = new Storyboard();\r\n\r\n            var doubleAnimation = new DoubleAnimation();\r\n            doubleAnimation.From = position.X - position2.X;\r\n            doubleAnimation.To = 0.0;\r\n            doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(doubleAnimation);\r\n\r\n            var doubleAnimation2 = new DoubleAnimation();\r\n            doubleAnimation2.From = position.Y - position2.Y; //position.Y;\r\n            doubleAnimation2.To = 0.0;\r\n            doubleAnimation2.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation2.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation2, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(doubleAnimation2);\r\n\r\n            var doubleAnimation3 = new DoubleAnimation();\r\n            doubleAnimation3.From = .5;\r\n            doubleAnimation3.To = 1.0;\r\n            doubleAnimation3.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation3.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation3, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation3, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(doubleAnimation3);\r\n\r\n            var doubleAnimation4 = new DoubleAnimation();\r\n            doubleAnimation4.From = 1.0;\r\n            doubleAnimation4.To = 2.6;\r\n            doubleAnimation4.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation4.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation4, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation4, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleY)\"));\r\n            storyboard.Children.Add(doubleAnimation4);\r\n\r\n            var doubleAnimation5 = new DoubleAnimation();\r\n            doubleAnimation5.From = 1.0;\r\n            doubleAnimation5.To = 2.6;\r\n            doubleAnimation5.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation5.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation5, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation5, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleX)\"));\r\n            storyboard.Children.Add(doubleAnimation5);\r\n\r\n            storyboard.Begin();\r\n\r\n            if (_loadedStoryboard != null)\r\n            {\r\n                _loadedStoryboard.Begin();\r\n                _loadedStoryboard = null;\r\n            }\r\n\r\n            _storyboard = storyboard;\r\n        }\r\n\r\n        private DispatcherTimer _timer;\r\n\r\n        private void StickerPanel_MouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            if (Preview.Visibility == Visibility.Collapsed) return;\r\n\r\n            var st1 = GetScaleStoryboard(_lastMouseEnter ?? _fromItem, 1.0, 1.0);\r\n\r\n            _lastMouseEnter = e.OriginalSource as FrameworkElement;\r\n\r\n            RestartMenuTimer();\r\n\r\n            var stickerImage = e.OriginalSource as Image;\r\n            if (stickerImage != null)\r\n            {\r\n                PreviewImage.Source = stickerImage.Source;\r\n\r\n                var stickerItem = stickerImage.DataContext as TLStickerItem;\r\n                if (stickerItem != null)\r\n                {\r\n                    Image.DataContext = stickerItem;\r\n                }\r\n            }\r\n\r\n            var duration = .5;\r\n            var easingFunction = new ElasticEase { Oscillations = 1, Springiness = 10.0, EasingMode = EasingMode.EaseOut };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var doubleAnimation = new DoubleAnimation();\r\n            doubleAnimation.From = 0.0;\r\n            doubleAnimation.To = 0.0;\r\n            doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(doubleAnimation);\r\n\r\n            var doubleAnimation2 = new DoubleAnimation();\r\n            doubleAnimation2.From = 0.0; //position.Y;\r\n            doubleAnimation2.To = 0.0;\r\n            doubleAnimation2.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation2.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation2, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(doubleAnimation2);\r\n\r\n            var doubleAnimation3 = new DoubleAnimation();\r\n            doubleAnimation3.From = 1.0;\r\n            doubleAnimation3.To = 1.0;\r\n            doubleAnimation3.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation3.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation3, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation3, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(doubleAnimation3);\r\n\r\n            var doubleAnimation4 = new DoubleAnimation();\r\n            doubleAnimation4.From = 2.4;\r\n            doubleAnimation4.To = 2.6;\r\n            doubleAnimation4.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation4.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation4, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation4, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleY)\"));\r\n            storyboard.Children.Add(doubleAnimation4);\r\n\r\n            var doubleAnimation5 = new DoubleAnimation();\r\n            doubleAnimation5.From = 2.4;\r\n            doubleAnimation5.To = 2.6;\r\n            doubleAnimation5.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation5.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation5, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation5, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleX)\"));\r\n            storyboard.Children.Add(doubleAnimation5);\r\n\r\n            storyboard.Begin();\r\n\r\n            _storyboard = storyboard;\r\n\r\n            var st2 = GetScaleStoryboard(_lastMouseEnter, 0.85, 1.0);\r\n            if (st1 != null || st2 != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (st1 != null) st1.Begin();\r\n                    if (st2 != null) st2.Begin();\r\n                });\r\n            }\r\n        }\r\n\r\n        private void RestartMenuTimer()\r\n        {\r\n            if (!_isSearchOpened\r\n                && CurrentCategory != RecentStickersCategoryIndex \r\n                && CurrentCategory != FavedStickersCategoryIndex \r\n                && CurrentCategory != GroupStickersCategoryIndex\r\n                && CurrentCategory != FeaturedStickersCategoryIndex)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_timer == null)\r\n            {\r\n                _timer = new DispatcherTimer();\r\n                _timer.Interval = TimeSpan.FromSeconds(1.2);\r\n                _timer.Tick += Timer_OnTick;\r\n            }\r\n            _timer.Stop();\r\n            _timer.Start();\r\n        }\r\n\r\n        private void Timer_OnTick(object sender, EventArgs e)\r\n        {\r\n            _timer.Stop();\r\n\r\n            var item = _lastMouseEnter ?? _fromItem;\r\n            if (item == null) return;\r\n\r\n            var sticker = item.DataContext as TLStickerItem;\r\n            if (sticker == null) return;\r\n\r\n            var document22 = sticker.Document as TLDocument22;\r\n            if (document22 == null) return;\r\n\r\n            var stickerSet = document22.StickerSet;\r\n            if (stickerSet == null) return;\r\n\r\n            var stickerSetName = stickerSet.Name;\r\n            if (string.IsNullOrEmpty(stickerSetName)) return;\r\n\r\n            if (!_isSearchOpened\r\n                && CurrentCategory != RecentStickersCategoryIndex \r\n                && CurrentCategory != FavedStickersCategoryIndex \r\n                && CurrentCategory != GroupStickersCategoryIndex\r\n                && CurrentCategory != FeaturedStickersCategoryIndex) return;\r\n\r\n            if (Preview == null || Preview.Visibility == Visibility.Collapsed) return;\r\n\r\n            var stickerPreviewMenu = StickerPreviewMenuPlaceholder.Content as StickerPreviewMenu;\r\n            if (stickerPreviewMenu == null)\r\n            {\r\n                stickerPreviewMenu = new StickerPreviewMenu(Preview);\r\n\r\n                stickerPreviewMenu.Send += (o, args) =>\r\n                {\r\n                    StickerPanel_ManipulationCompleted(null, null);\r\n\r\n                    OnStickerSelected(this, args);\r\n                };\r\n                \r\n                stickerPreviewMenu.OpenPack += (o, args) =>\r\n                {\r\n                    StickerPanel_ManipulationCompleted(null, null);\r\n\r\n                    if (args.Button == null || _isSearchOpened)\r\n                    {\r\n                        var mtProtoService = IoC.Get<IMTProtoService>();\r\n                        mtProtoService.GetStickerSetAsync(stickerPreviewMenu.InputStickerSet, \r\n                            result => Execute.BeginOnUIThread(() =>                        \r\n                            {\r\n                                var stickerSet32 = result.Set as TLStickerSet32;\r\n                                if (stickerSet32 != null)\r\n                                {\r\n                                    stickerSet32.Stickers = new TLVector<TLObject>();\r\n                                    for (var i = 0; i < result.Documents.Count; i++)\r\n                                    {\r\n                                        var document = result.Documents[i] as TLDocument22;\r\n                                        if (document != null)\r\n                                        {\r\n                                            stickerSet32.Stickers.Add(new TLStickerItem { Document = document });\r\n                                        }\r\n                                    }\r\n\r\n                                    TelegramViewBase.ShowStickerSetMessageBox(false, stickerSet32.Installed, stickerSet32, prompt =>\r\n                                    {\r\n                                        if (prompt == PopUpResult.Ok)\r\n                                        {\r\n                                            OnStickerSetAdded(sender, new StickerSetAddedEventArgs { Set = stickerSet32 });\r\n                                        }\r\n                                    });\r\n                                }\r\n                            }));\r\n                    }\r\n                    else\r\n                    {\r\n                        StickerSetButtonOnClick(args.Button, null);\r\n\r\n                        StickersScrollViewer.ScrollIntoView(args.Button, (StickersScrollViewer.ActualWidth - args.Button.ActualWidth) / 2.0, 0.0, TimeSpan.Zero);\r\n                    }\r\n                };\r\n\r\n                stickerPreviewMenu.ChangeFaved += (o, args) =>\r\n                {\r\n                    StickerPanel_ManipulationCompleted(null, null);\r\n\r\n                    var document = args.Sticker.Document as TLDocument;\r\n                    if (document != null)\r\n                    {\r\n                        var allStickers = IoC.Get<IStateService>().GetAllStickers() as TLAllStickers43;\r\n                        if (allStickers != null)\r\n                        {\r\n                            var favedStickers = allStickers.FavedStickers;\r\n                            if (favedStickers != null)\r\n                            {\r\n                                var unfave = favedStickers.Documents.FirstOrDefault(x => x.Index == args.Sticker.Document.Index) != null;\r\n\r\n                                IoC.Get<IMTProtoService>().FaveStickerAsync(new TLInputDocument{ Id = document.Id, AccessHash = document.AccessHash }, new TLBool(unfave), \r\n                                    result => Execute.BeginOnUIThread(() =>\r\n                                    {\r\n                                        if (unfave)\r\n                                        {\r\n                                            favedStickers.RemoveSticker(args.Sticker.Document);\r\n                                        }\r\n                                        else\r\n                                        {\r\n                                            favedStickers.AddSticker(args.Sticker.Document);\r\n                                        }\r\n\r\n                                        allStickers.FavedStickers = favedStickers;\r\n                                        IoC.Get<IStateService>().SaveAllStickersAsync(allStickers);\r\n\r\n                                        if (unfave)\r\n                                        {\r\n                                            IoC.Get<IMTProtoService>().GetFavedStickersAsync(allStickers.FavedStickers.Hash,\r\n                                                result2 =>\r\n                                                {\r\n                                                    var favedStickers2 = result2 as TLFavedStickers;\r\n                                                    if (favedStickers2 != null)\r\n                                                    {\r\n                                                        allStickers.FavedStickers = favedStickers;\r\n                                                        IoC.Get<IStateService>().SaveAllStickersAsync(allStickers);\r\n\r\n                                                        Execute.BeginOnUIThread(() =>\r\n                                                        {\r\n                                                            ResetFavedStickers();\r\n                                                        });\r\n                                                    }\r\n                                                },\r\n                                                error2 =>\r\n                                                {\r\n\r\n                                                });\r\n                                        }\r\n\r\n\r\n                                        ResetFavedStickers();\r\n                                    }),\r\n                                    error =>\r\n                                    {\r\n                                        \r\n                                    });\r\n                            }\r\n                        }\r\n                    }\r\n                };\r\n                \r\n                stickerPreviewMenu.Closed += (o, args) =>\r\n                {\r\n                    StickerPanel_ManipulationCompleted(null, null);\r\n                };\r\n\r\n                StickerPreviewMenuPlaceholder.Content = stickerPreviewMenu;\r\n            }\r\n\r\n            stickerPreviewMenu.SetStickerItem(sticker);\r\n            stickerPreviewMenu.InputStickerSet = stickerSet;\r\n            var stickerSetButton = _stickerSetButtons.FirstOrDefault(x => (string)x.DataContext == stickerSetName);\r\n            //if (stickerSetButton == null) return;\r\n            stickerPreviewMenu.SetButton(stickerSetButton);\r\n\r\n            var stickers = IoC.Get<IStateService>().GetAllStickers() as TLAllStickers43;\r\n            if (stickers != null)\r\n            {\r\n                var favedStickers = stickers.FavedStickers;\r\n                if (favedStickers != null)\r\n                {\r\n                    var exists = favedStickers.Documents.FirstOrDefault(x => x.Index == sticker.Document.Index) != null;\r\n                    stickerPreviewMenu.SwitchFavedStickerLabel.Text = exists ? AppResources.DeleteFromFavorites.ToLowerInvariant() : AppResources.AddToFavorites.ToLowerInvariant();\r\n                }\r\n            }\r\n\r\n            VibrateController.Default.Start(TimeSpan.FromSeconds(0.01));\r\n            stickerPreviewMenu.Open();\r\n        }\r\n\r\n        public static Storyboard GetScaleStoryboard(FrameworkElement element, double scale, double duration)\r\n        {\r\n            if (element == null) return null;\r\n\r\n            var easingFunction = new ElasticEase { Oscillations = 1, Springiness = 10.0, EasingMode = EasingMode.EaseOut };\r\n\r\n            var previousAnimation = element.Tag as Storyboard;\r\n            if (previousAnimation != null)\r\n            {\r\n                previousAnimation.Pause();\r\n                element.Tag = null;\r\n            }\r\n\r\n            if (!(element.RenderTransform is CompositeTransform))\r\n            {\r\n                element.RenderTransformOrigin = new Point(0.5, 0.5);\r\n                element.RenderTransform = new CompositeTransform();\r\n            }\r\n\r\n            var scaleStoryboard = new Storyboard();\r\n            var scaleXAnimation = new DoubleAnimation();\r\n            scaleXAnimation.To = scale;\r\n            scaleXAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            scaleXAnimation.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(scaleXAnimation, element);\r\n            Storyboard.SetTargetProperty(scaleXAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleY)\"));\r\n            scaleStoryboard.Children.Add(scaleXAnimation);\r\n\r\n            var scaleYAnimation = new DoubleAnimation();\r\n            scaleYAnimation.To = scale;\r\n            scaleYAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            scaleYAnimation.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(scaleYAnimation, element);\r\n            Storyboard.SetTargetProperty(scaleYAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleX)\"));\r\n            scaleStoryboard.Children.Add(scaleYAnimation);\r\n            element.Tag = scaleStoryboard;\r\n            scaleStoryboard.Completed += (o, e) =>\r\n            {\r\n                element.Tag = null;\r\n            };\r\n\r\n            return scaleStoryboard;\r\n            //Deployment.Current.Dispatcher.BeginInvoke(\r\n            //    () =>\r\n            //    {\r\n            //        scaleStoryboard.Begin();\r\n            //}\r\n            //);\r\n        }\r\n\r\n        private bool _runOnce = true;\r\n\r\n        private void FeaturedStickersPanel_ManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (CurrentCategory != FeaturedStickersCategoryIndex) return;\r\n\r\n            if (_runOnce)\r\n            {\r\n                _runOnce = false;\r\n                LoadNextFeaturedStickersSlice();\r\n            }\r\n\r\n            StartTouchFrameReporting(e);\r\n        }\r\n\r\n        private ManipulationStartedEventArgs _manipulationStartedArgs;\r\n\r\n        private void StickerPanel_ManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (!_isSearchOpened && CurrentCategory < FavedStickersCategoryIndex) return;\r\n            if (!_isSearchOpened && CurrentCategory == RecentStickersCategoryIndex + _stickerSetButtons.Count + 1) return;\r\n\r\n            StartTouchFrameReporting(e);\r\n        }\r\n\r\n        private void StartTouchFrameReporting(ManipulationStartedEventArgs e)\r\n        {\r\n            _startTime = DateTime.Now;\r\n\r\n            _fromItem = e.OriginalSource as FrameworkElement;\r\n            _lastMouseEnter = null;\r\n\r\n            _manipulationStartedArgs = e;\r\n\r\n            Touch.FrameReported += Touch_FrameReported;\r\n        }\r\n\r\n        private Storyboard _loadedStoryboard;\r\n\r\n        private void Touch_FrameReported(object sender, TouchFrameEventArgs e)\r\n        {\r\n            if (_manipulationStartedArgs == null)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                return;\r\n            }\r\n\r\n            var point = e.GetPrimaryTouchPoint(null);\r\n            if (point.Action == TouchAction.Up)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                return;\r\n            }\r\n\r\n            var manipulationPoint = e.GetPrimaryTouchPoint(_manipulationStartedArgs.ManipulationContainer);\r\n            var length = Math.Pow(manipulationPoint.Position.X - _manipulationStartedArgs.ManipulationOrigin.X, 2.0)\r\n                + Math.Pow(manipulationPoint.Position.Y - _manipulationStartedArgs.ManipulationOrigin.Y, 2.0);\r\n            if (length > 30.0 * 30.0)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                return;\r\n            }\r\n\r\n            if (_startTime.HasValue && _startTime.Value.AddSeconds(0.5) <= DateTime.Now)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                VirtPanel.DisableVerticalScrolling();\r\n\r\n                _loadedStoryboard = GetScaleStoryboard(_fromItem, 0.85, 1.0);\r\n\r\n                Preview.Visibility = Visibility.Visible;\r\n                var stickerImage = _fromItem as Image;\r\n                if (stickerImage != null)\r\n                {\r\n                    PreviewImage.Source = stickerImage.Source;\r\n\r\n                    var stickerItem = stickerImage.DataContext as TLStickerItem;\r\n                    if (stickerItem != null)\r\n                    {\r\n                        Image.DataContext = stickerItem;\r\n                    }\r\n                }\r\n\r\n                var grid = Preview;\r\n                grid.Children.Remove(PreviewGrid);\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    PreviewGrid.RenderTransform = new CompositeTransform();\r\n                    PreviewGrid.Opacity = 0.0;\r\n                    grid.Children.Add(PreviewGrid);\r\n\r\n                    RestartMenuTimer();\r\n                });\r\n            }\r\n        }\r\n\r\n        private void StickerPanel_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            _startTime = null;\r\n        }\r\n\r\n        private void StickerPanel_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            var st = GetScaleStoryboard(_lastMouseEnter ?? _fromItem, 1.0, 1.0);\r\n            if (st != null)\r\n            {\r\n                Execute.BeginOnUIThread(st.Begin);\r\n            }\r\n\r\n            var stickerPreviewMenu = StickerPreviewMenuPlaceholder.Content as StickerPreviewMenu;\r\n            if (stickerPreviewMenu != null && stickerPreviewMenu.IsOpened)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _startTime = null;\r\n            _fromItem = null;\r\n            _lastMouseEnter = null;\r\n            if (_storyboard != null)\r\n            {\r\n                _storyboard.SkipToFill();\r\n            }\r\n            if (_timer != null)\r\n            {\r\n                _timer.Stop();\r\n            }\r\n\r\n            VirtPanel.EnableVerticalScrolling();\r\n            Preview.Visibility = Visibility.Collapsed;\r\n        }\r\n        #endregion\r\n\r\n        public void ClosePreview()\r\n        {\r\n            Touch.FrameReported -= Touch_FrameReported;\r\n\r\n            StickerPanel_ManipulationCompleted(null, null);\r\n        }\r\n\r\n        public bool IsPreviewMenuOpened\r\n        {\r\n            get\r\n            {\r\n                var stickerPreviewMenu = StickerPreviewMenuPlaceholder.Content as StickerPreviewMenu;\r\n                if (stickerPreviewMenu != null && stickerPreviewMenu.IsOpened)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public void ClosePreviewMenu()\r\n        {\r\n            var stickerPreviewMenu = StickerPreviewMenuPlaceholder.Content as StickerPreviewMenu;\r\n            if (stickerPreviewMenu != null && stickerPreviewMenu.IsOpened)\r\n            {\r\n                stickerPreviewMenu.Close();\r\n            }\r\n        }\r\n\r\n        private TLMessagesStickerSet _messagesStickerSet;\r\n\r\n        private TLStickerSetBase _stickerSet;\r\n\r\n        public void SetGroupStickers(TLChannel68 group, TLStickerSetBase stickerSet)\r\n        {\r\n            _stickerSet = stickerSet;\r\n\r\n            _groupStickersButton.Visibility = Visibility.Collapsed;\r\n            _messagesStickerSet = null;\r\n\r\n            if (_stickerSet != null)\r\n            {\r\n                _groupStickersButton.Visibility = Visibility.Visible;\r\n                var tileControl = _groupStickersButton.Content as ConversationTileControl;\r\n                if (tileControl != null)\r\n                {\r\n                    var textBinding = new Binding\r\n                    {\r\n                        Source = group,\r\n                        Converter = new PlaceholderDefaultTextConverter()\r\n                    };\r\n\r\n                    tileControl.SetBinding(ConversationTileControl.TextProperty, textBinding);\r\n\r\n                    var fillBinding = new Binding(\"Index\")\r\n                    {\r\n                        Source = group,\r\n                        Converter = new IdToPlaceholderBackgroundConverter()\r\n                    };\r\n\r\n                    tileControl.SetBinding(ConversationTileControl.FillProperty, fillBinding);\r\n\r\n                    var sourceBinding = new Binding(\"Photo\")\r\n                    {\r\n                        Source = group,\r\n                        Converter = new DefaultPhotoConverter()\r\n                    };\r\n\r\n                    tileControl.SetBinding(ConversationTileControl.SourceProperty, sourceBinding);\r\n                }\r\n\r\n                IoC.Get<IMTProtoService>()\r\n                    .GetStickerSetAsync(new TLInputStickerSetShortName { ShortName = stickerSet.ShortName },\r\n                        result =>\r\n                        {\r\n                            _messagesStickerSet = result;\r\n\r\n                            var groupKey = @\"tlg/group\";\r\n                            _stickerSets[groupKey] = new List<TLDocument22>();\r\n\r\n                            for (var i = 0; i < _messagesStickerSet.Documents.Count; i++)\r\n                            {\r\n                                var document22 = _messagesStickerSet.Documents[i] as TLDocument22;\r\n                                if (document22 != null)\r\n                                {\r\n                                    List<TLDocument22> stickers;\r\n                                    if (_stickerSets.TryGetValue(groupKey, out stickers))\r\n                                    {\r\n                                        stickers.Add(document22);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        _stickerSets[groupKey] = new List<TLDocument22> { document22 };\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            _stickerSetSprites.Remove(groupKey);\r\n\r\n                        },\r\n                        error =>\r\n                        {\r\n\r\n                        });\r\n            }\r\n        }\r\n    }\r\n\r\n    public class IsOpenedEventArgs : EventArgs\r\n    {\r\n        public bool IsOpened { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/EmojiPanel/Controls/Emoji/EmojiData.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Emoji\r\n{\r\n    public class EmojiDataItem\r\n    {\r\n        public EmojiDataItem() { }\r\n\r\n        public EmojiDataItem(string string2, ulong code)\r\n        {\r\n            String = string2;\r\n            Code = code;\r\n        }\r\n\r\n        public string String { get; set; }\r\n        public ulong Code { get; set; }\r\n        public Uri Uri { get; set; }\r\n\r\n        public static string BuildString(ulong code)\r\n        {\r\n            var bytes = BitConverter.GetBytes(code);\r\n\r\n            var char1 = BitConverter.ToChar(bytes, 6);\r\n            var char2 = BitConverter.ToChar(bytes, 4);\r\n            var char3 = BitConverter.ToChar(bytes, 2);\r\n            var char4 = BitConverter.ToChar(bytes, 0);\r\n\r\n            string text;\r\n\r\n            if (char1 != 0)\r\n            {\r\n                text = new string(new [] { char1, char2, char3, char4 });\r\n            }\r\n            else if (char3 != 0)\r\n            {\r\n                text = new string(new [] { char3, char4 });\r\n            }\r\n            else\r\n            {\r\n                text = char4.ToString();\r\n            }\r\n\r\n            return text;\r\n        }\r\n\r\n        public static string ConvertToHexString(byte[] bytes)\r\n        {\r\n            var sb = new StringBuilder();\r\n            for (var i = 0; i < bytes.Length; i++)\r\n            {\r\n                if (bytes[i] == 254\r\n                    && i < bytes.Length - 1\r\n                    && (bytes[i + 1] == 15 || bytes[i + 1] == 14))\r\n                {\r\n                    i++;\r\n                    continue;\r\n                }\r\n                sb = sb.Append(Convert.ToString(bytes[i], 16).PadLeft(2, '0'));\r\n            }\r\n\r\n            return sb.ToString().ToUpperInvariant();\r\n        }\r\n\r\n        public static Uri BuildUri(string string2)\r\n        {\r\n            var result = string.Empty;\r\n            var i = 0;\r\n            var textEnumerator = StringInfo.GetTextElementEnumerator(string2);\r\n            var cont = textEnumerator.MoveNext();\r\n            while (cont)\r\n            {\r\n                var text = textEnumerator.GetTextElement();\r\n                var bytes = Encoding.BigEndianUnicode.GetBytes(text);\r\n                var bytesStr = ConvertToHexString(bytes);\r\n\r\n                result += bytesStr;\r\n                cont = textEnumerator.MoveNext();\r\n            }\r\n\r\n            return new Uri(string.Format(\"/Assets/Emoji/Separated/{0}.png\", result), UriKind.Relative);\r\n        }\r\n\r\n        //public static Uri BuildUri(string string2)\r\n        //{\r\n        //    //var string3 = BitConverter.ToString(bytes.Take(4).Reverse().ToArray())\r\n        //    var string3 = string.Format(\"{0:X}\", (Int16) string2[0]);\r\n\r\n        //    switch (string2.Length)\r\n        //    {\r\n        //        case 2:\r\n        //            {\r\n        //                uint emoji = 0;\r\n        //                emoji |= (uint) string2[0] << 16;\r\n        //                emoji |= (uint) string2[1];\r\n\r\n        //                return new Uri(string.Format(\"/Assets/Emoji/Separated/{0:X8}.png\", emoji), UriKind.Relative);\r\n        //            }\r\n        //        case 4:\r\n        //            {\r\n        //                uint emoji1 = 0;\r\n        //                emoji1 |= (uint) string2[0] << 16;\r\n        //                emoji1 |= (uint) string2[1];\r\n\r\n        //                ulong emoji2 = 0;\r\n        //                emoji2 |= (uint) string2[2] << 16;\r\n        //                emoji2 |= (uint) string2[3];\r\n\r\n        //                return new Uri(string.Format(\"/Assets/Emoji/Separated/{0:X}{1:X}.png\", emoji1, emoji2), UriKind.Relative);\r\n        //            }\r\n        //        default:\r\n        //            return new Uri(string.Format(\"/Assets/Emoji/Separated/{0:X}.png\", (Int16) string2[0]), UriKind.Relative);\r\n        //    }\r\n        //}\r\n\r\n        public static EmojiDataItem GetByIndex(int categoryIndex, int spriteIndex, int itemIndex)\r\n        {\r\n\r\n            var category = EmojiData.CodesByCategory[categoryIndex];\r\n            var emojiIndex = spriteIndex * EmojiData.ItemsInSprite + itemIndex;\r\n\r\n            if (category.Length <= emojiIndex) return null; // out of bounds\r\n\r\n            ulong code = category[emojiIndex];\r\n\r\n            var result = new EmojiDataItem\r\n            {\r\n                Code = code,\r\n                String = BuildString(code)\r\n            };\r\n            result.Uri = BuildUri(result.String);\r\n\r\n            return result;\r\n        }\r\n    }\r\n\r\n    public static class EmojiData\r\n    {\r\n        public static List<EmojiDataItem> Recents;\r\n\r\n        public static void AddToRecents(EmojiDataItem emojiDataItem)\r\n        {\r\n            if (Recents == null)\r\n            {\r\n                LoadRecents();\r\n                if (Recents == null)\r\n                {\r\n                    Recents = new List<EmojiDataItem>();\r\n                }\r\n            }\r\n\r\n            var prevItem = Recents.FirstOrDefault(x => string.Equals(x.String, emojiDataItem.String));\r\n            if (prevItem != null)\r\n            {\r\n                Recents.Remove(prevItem);\r\n                Recents.Insert(0, prevItem);\r\n            }\r\n            else\r\n            {\r\n                Recents.Insert(0, emojiDataItem);\r\n                Recents = Recents.Take(42).ToList();\r\n            }\r\n\r\n            SaveRecents();\r\n        }\r\n\r\n        public static void LoadRecents()\r\n        {\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(\"EmojiRecents\")) return;\r\n                using (var stream = new IsolatedStorageFileStream(\"EmojiRecents\", FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite, store))\r\n                {\r\n                    if (stream.Length <= 0) return;\r\n\r\n                    using (var br = new BinaryReader(stream))\r\n                    {\r\n                        var count = br.ReadInt32();\r\n\r\n                        Recents = new List<EmojiDataItem>();\r\n\r\n                        for (var i = 0; i < count; i++)\r\n                        {\r\n                            var emoji = new EmojiDataItem(br.ReadString(), br.ReadUInt64());\r\n                            emoji.Uri = EmojiDataItem.BuildUri(emoji.String);\r\n                            Recents.Add(emoji);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static IList<EmojiDataItem> LoadDefaultRecents()\r\n        {\r\n            return new List<EmojiDataItem>\r\n            {\r\n                new EmojiDataItem{Code = 1, String = \"😂\"},\r\n                new EmojiDataItem{Code = 1, String = \"😘\"},\r\n                new EmojiDataItem{Code = 1, String = \"❤\"},\r\n                new EmojiDataItem{Code = 1, String = \"😍\"},\r\n                new EmojiDataItem{Code = 1, String = \"😊\"},\r\n                new EmojiDataItem{Code = 1, String = \"😁\"},\r\n                new EmojiDataItem{Code = 1, String = \"👍\"},\r\n                new EmojiDataItem{Code = 1, String = \"☺\"},\r\n                new EmojiDataItem{Code = 1, String = \"😔\"},\r\n                //new EmojiDataItem{Code = 1, String = \"😂 😘 ❤ 😍 😊 😁 👍 ☺ 😔 😄 😭 💋 😒 😳 😜 🙈 😉 😃 😢 😝 😱 😡 😏 😞 😅 😚 🙊 😌 😀 😋 😆 👌 😐 😕\"},\r\n            };\r\n        }\r\n\r\n        public static void SaveRecents()\r\n        {\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var stream = new IsolatedStorageFileStream(\"EmojiRecents\", FileMode.Create, FileAccess.Write, FileShare.ReadWrite, store))\r\n                {\r\n                    using (var bw = new BinaryWriter(stream))\r\n                    {\r\n                        var emojies = Recents.ToList();\r\n\r\n                        bw.Write(emojies.Count);\r\n\r\n                        foreach (var item in emojies)\r\n                        {\r\n                            bw.Write(item.String);\r\n                            bw.Write(item.Code);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public const int ItemsInRow = 6;\r\n        public const int ItemsInSprite = 36;\r\n\r\n        /// <summary>\r\n        /// Custom spaced sprites by category\r\n        /// </summary>\r\n        public static Uri[][] SpritesByCategory =\r\n        {\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part3.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part4.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat0_part5.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat1_part3.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part3.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part4.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part5.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat2_part6.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat3_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat3_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat3_part2.png\", UriKind.Relative),\r\n            },\r\n            new[]\r\n            {\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part0.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part1.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part2.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part3.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part4.png\", UriKind.Relative),\r\n                new Uri(\"/Assets/Emoji/SpacedSprites/sprite64_cat4_part5.png\", UriKind.Relative),\r\n            },\r\n        };\r\n\r\n        /// <summary>\r\n        /// Config of rows count for sprites in categories\r\n        /// </summary>\r\n        public static int[][] SpriteRowsCountByCategory = \r\n        {\r\n            new [] { 6, 6, 6, 6, 6, 2 },\r\n            new [] { 6, 6, 6, 2 },\r\n            new [] { 6, 6, 6, 6, 6, 6, 3 },\r\n            new [] { 6, 6, 5 }, \r\n            new [] { 6, 6, 6, 6, 6, 5 }\r\n        };\r\n\r\n        /// <summary>\r\n        /// Config of missing cells in last row for each last category's sprite\r\n        /// </summary>\r\n        public static int[] SpriteMissingCellsByCategory =\r\n        {\r\n            3, 4, 4, 1, 1\r\n        };\r\n\r\n        /// <summary>\r\n        /// Emoji codes combined into the groups corresponding to the categories in the interface\r\n        /// </summary>\r\n        public static ulong[][] CodesByCategory = {\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83DDE04L, 0x00000000D83DDE03L, 0x00000000D83DDE00L, 0x00000000D83DDE0AL, 0x000000000000263AL, 0x00000000D83DDE09L, 0x00000000D83DDE0DL,\r\n\t\t\t0x00000000D83DDE18L, 0x00000000D83DDE1AL, 0x00000000D83DDE17L, 0x00000000D83DDE19L, 0x00000000D83DDE1CL, 0x00000000D83DDE1DL, 0x00000000D83DDE1BL,\r\n\t\t\t0x00000000D83DDE33L, 0x00000000D83DDE01L, 0x00000000D83DDE14L, 0x00000000D83DDE0CL, 0x00000000D83DDE12L, 0x00000000D83DDE1EL, 0x00000000D83DDE23L,\r\n\t\t\t0x00000000D83DDE22L, 0x00000000D83DDE02L, 0x00000000D83DDE2DL, 0x00000000D83DDE2AL, 0x00000000D83DDE25L, 0x00000000D83DDE30L, 0x00000000D83DDE05L,\r\n\t\t\t0x00000000D83DDE13L, 0x00000000D83DDE29L, 0x00000000D83DDE2BL, 0x00000000D83DDE28L, 0x00000000D83DDE31L, 0x00000000D83DDE20L, 0x00000000D83DDE21L,\r\n\t\t\t0x00000000D83DDE24L, 0x00000000D83DDE16L, 0x00000000D83DDE06L, 0x00000000D83DDE0BL, 0x00000000D83DDE37L, 0x00000000D83DDE0EL, 0x00000000D83DDE34L,\r\n\t\t\t0x00000000D83DDE35L, 0x00000000D83DDE32L, 0x00000000D83DDE1FL, 0x00000000D83DDE26L, 0x00000000D83DDE27L, 0x00000000D83DDE08L, 0x00000000D83DDC7FL,\r\n\t\t\t0x00000000D83DDE2EL, 0x00000000D83DDE2CL, 0x00000000D83DDE10L, 0x00000000D83DDE15L, 0x00000000D83DDE2FL, 0x00000000D83DDE36L, 0x00000000D83DDE07L,\r\n\t\t\t0x00000000D83DDE0FL, 0x00000000D83DDE11L, 0x00000000D83DDC72L, 0x00000000D83DDC73L, 0x00000000D83DDC6EL, 0x00000000D83DDC77L, 0x00000000D83DDC82L,\r\n\t\t\t0x00000000D83DDC76L, 0x00000000D83DDC66L, 0x00000000D83DDC67L, 0x00000000D83DDC68L, 0x00000000D83DDC69L, 0x00000000D83DDC74L, 0x00000000D83DDC75L,\r\n\t\t\t0x00000000D83DDC71L, 0x00000000D83DDC7CL, 0x00000000D83DDC78L, 0x00000000D83DDE3AL, 0x00000000D83DDE38L, 0x00000000D83DDE3BL, 0x00000000D83DDE3DL,\r\n\t\t\t0x00000000D83DDE3CL, 0x00000000D83DDE40L, 0x00000000D83DDE3FL, 0x00000000D83DDE39L, 0x00000000D83DDE3EL, 0x00000000D83DDC79L, 0x00000000D83DDC7AL,\r\n\t\t\t0x00000000D83DDE48L, 0x00000000D83DDE49L, 0x00000000D83DDE4AL, 0x00000000D83DDC80L, 0x00000000D83DDC7DL, 0x00000000D83DDCA9L, 0x00000000D83DDD25L,\r\n\t\t\t0x0000000000002728L, 0x00000000D83CDF1FL, 0x00000000D83DDCABL, 0x00000000D83DDCA5L, 0x00000000D83DDCA2L, 0x00000000D83DDCA6L, 0x00000000D83DDCA7L,\r\n\t\t\t0x00000000D83DDCA4L, 0x00000000D83DDCA8L, 0x00000000D83DDC42L, 0x00000000D83DDC40L, 0x00000000D83DDC43L, 0x00000000D83DDC45L, 0x00000000D83DDC44L,\r\n\t\t\t0x00000000D83DDC4DL, 0x00000000D83DDC4EL, 0x00000000D83DDC4CL, 0x00000000D83DDC4AL, 0x000000000000270AL, 0x000000000000270CL, 0x00000000D83DDC4BL,\r\n\t\t\t0x000000000000270BL, 0x00000000D83DDC50L, 0x00000000D83DDC46L, 0x00000000D83DDC47L, 0x00000000D83DDC49L, 0x00000000D83DDC48L, 0x00000000D83DDE4CL,\r\n\t\t\t0x00000000D83DDE4FL, 0x000000000000261DL, 0x00000000D83DDC4FL, 0x00000000D83DDCAAL, 0x00000000D83DDEB6L, 0x00000000D83CDFC3L, 0x00000000D83DDC83L,\r\n\t\t\t0x00000000D83DDC6BL, 0x00000000D83DDC6AL, 0x00000000D83DDC6CL, 0x00000000D83DDC6DL, 0x00000000D83DDC8FL, 0x00000000D83DDC91L, 0x00000000D83DDC6FL,\r\n\t\t\t0x00000000D83DDE46L, 0x00000000D83DDE45L, 0x00000000D83DDC81L, 0x00000000D83DDE4BL, 0x00000000D83DDC86L, 0x00000000D83DDC87L, 0x00000000D83DDC85L,\r\n\t\t\t0x00000000D83DDC70L, 0x00000000D83DDE4EL, 0x00000000D83DDE4DL, 0x00000000D83DDE47L, 0x00000000D83CDFA9L, 0x00000000D83DDC51L, 0x00000000D83DDC52L,\r\n\t\t\t0x00000000D83DDC5FL, 0x00000000D83DDC5EL, 0x00000000D83DDC61L, 0x00000000D83DDC60L, 0x00000000D83DDC62L, 0x00000000D83DDC55L, 0x00000000D83DDC54L,\r\n\t\t\t0x00000000D83DDC5AL, 0x00000000D83DDC57L, 0x00000000D83CDFBDL, 0x00000000D83DDC56L, 0x00000000D83DDC58L, 0x00000000D83DDC59L, 0x00000000D83DDCBCL,\r\n\t\t\t0x00000000D83DDC5CL, 0x00000000D83DDC5DL, 0x00000000D83DDC5BL, 0x00000000D83DDC53L, 0x00000000D83CDF80L, 0x00000000D83CDF02L, 0x00000000D83DDC84L,\r\n\t\t\t0x00000000D83DDC9BL, 0x00000000D83DDC99L, 0x00000000D83DDC9CL, 0x00000000D83DDC9AL, 0x0000000000002764L, 0x00000000D83DDC94L, 0x00000000D83DDC97L,\r\n\t\t\t0x00000000D83DDC93L, 0x00000000D83DDC95L, 0x00000000D83DDC96L, 0x00000000D83DDC9EL, 0x00000000D83DDC98L, 0x00000000D83DDC8CL, 0x00000000D83DDC8BL,\r\n\t\t\t0x00000000D83DDC8DL, 0x00000000D83DDC8EL, 0x00000000D83DDC64L, 0x00000000D83DDC65L, 0x00000000D83DDCACL, 0x00000000D83DDC63L, 0x00000000D83DDCADL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83DDC36L, 0x00000000D83DDC3AL, 0x00000000D83DDC31L, 0x00000000D83DDC2DL, 0x00000000D83DDC39L, 0x00000000D83DDC30L, 0x00000000D83DDC38L, 0x00000000D83DDC2FL,\r\n\t\t\t0x00000000D83DDC28L, 0x00000000D83DDC3BL, 0x00000000D83DDC37L, 0x00000000D83DDC3DL, 0x00000000D83DDC2EL, 0x00000000D83DDC17L, 0x00000000D83DDC35L,\r\n\t\t\t0x00000000D83DDC12L, 0x00000000D83DDC34L, 0x00000000D83DDC11L, 0x00000000D83DDC18L, 0x00000000D83DDC3CL, 0x00000000D83DDC27L, 0x00000000D83DDC26L,\r\n\t\t\t0x00000000D83DDC24L, 0x00000000D83DDC25L, 0x00000000D83DDC23L, 0x00000000D83DDC14L, 0x00000000D83DDC0DL, 0x00000000D83DDC22L, 0x00000000D83DDC1BL,\r\n\t\t\t0x00000000D83DDC1DL, 0x00000000D83DDC1CL, 0x00000000D83DDC1EL, 0x00000000D83DDC0CL, 0x00000000D83DDC19L, 0x00000000D83DDC1AL, 0x00000000D83DDC20L,\r\n\t\t\t0x00000000D83DDC1FL, 0x00000000D83DDC2CL, 0x00000000D83DDC33L, 0x00000000D83DDC0BL, 0x00000000D83DDC04L, 0x00000000D83DDC0FL, 0x00000000D83DDC00L,\r\n\t\t\t0x00000000D83DDC03L, 0x00000000D83DDC05L, 0x00000000D83DDC07L, 0x00000000D83DDC09L, 0x00000000D83DDC0EL, 0x00000000D83DDC10L, 0x00000000D83DDC13L,\r\n\t\t\t0x00000000D83DDC15L, 0x00000000D83DDC16L, 0x00000000D83DDC01L, 0x00000000D83DDC02L, 0x00000000D83DDC32L, 0x00000000D83DDC21L, 0x00000000D83DDC0AL,\r\n\t\t\t0x00000000D83DDC2BL, 0x00000000D83DDC2AL, 0x00000000D83DDC06L, 0x00000000D83DDC08L, 0x00000000D83DDC29L, 0x00000000D83DDC3EL, 0x00000000D83DDC90L,\r\n\t\t\t0x00000000D83CDF38L, 0x00000000D83CDF37L, 0x00000000D83CDF40L, 0x00000000D83CDF39L, 0x00000000D83CDF3BL, 0x00000000D83CDF3AL, 0x00000000D83CDF41L,\r\n\t\t\t0x00000000D83CDF43L, 0x00000000D83CDF42L, 0x00000000D83CDF3FL, 0x00000000D83CDF3EL, 0x00000000D83CDF44L, 0x00000000D83CDF35L, 0x00000000D83CDF34L,\r\n\t\t\t0x00000000D83CDF32L, 0x00000000D83CDF33L, 0x00000000D83CDF30L, 0x00000000D83CDF31L, 0x00000000D83CDF3CL, 0x00000000D83CDF10L, 0x00000000D83CDF1EL,\r\n\t\t\t0x00000000D83CDF1DL, 0x00000000D83CDF1AL, 0x00000000D83CDF11L, 0x00000000D83CDF12L, 0x00000000D83CDF13L, 0x00000000D83CDF14L, 0x00000000D83CDF15L,\r\n\t\t\t0x00000000D83CDF16L, 0x00000000D83CDF17L, 0x00000000D83CDF18L, 0x00000000D83CDF1CL, 0x00000000D83CDF1BL, 0x00000000D83CDF19L, 0x00000000D83CDF0DL,\r\n\t\t\t0x00000000D83CDF0EL, 0x00000000D83CDF0FL, 0x00000000D83CDF0BL, 0x00000000D83CDF0CL, 0x00000000D83CDF20L, 0x0000000000002B50L, 0x0000000000002600L,\r\n\t\t\t0x00000000000026C5L, 0x0000000000002601L, 0x00000000000026A1L, 0x0000000000002614L, 0x0000000000002744L, 0x00000000000026C4L, 0x00000000D83CDF00L,\r\n\t\t\t0x00000000D83CDF01L, 0x00000000D83CDF08L, 0x00000000D83CDF0AL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83CDF8DL, 0x00000000D83DDC9DL, 0x00000000D83CDF8EL, 0x00000000D83CDF92L, 0x00000000D83CDF93L, 0x00000000D83CDF8FL, 0x00000000D83CDF86L, 0x00000000D83CDF87L,\r\n\t\t\t0x00000000D83CDF90L, 0x00000000D83CDF91L, 0x00000000D83CDF83L, 0x00000000D83DDC7BL, 0x00000000D83CDF85L, 0x00000000D83CDF84L, 0x00000000D83CDF81L,\r\n\t\t\t0x00000000D83CDF8BL, 0x00000000D83CDF89L, 0x00000000D83CDF8AL, 0x00000000D83CDF88L, 0x00000000D83CDF8CL, 0x00000000D83DDD2EL, 0x00000000D83CDFA5L,\r\n\t\t\t0x00000000D83DDCF7L, 0x00000000D83DDCF9L, 0x00000000D83DDCFCL, 0x00000000D83DDCBFL, 0x00000000D83DDCC0L, 0x00000000D83DDCBDL, 0x00000000D83DDCBEL,\r\n\t\t\t0x00000000D83DDCBBL, 0x00000000D83DDCF1L, 0x000000000000260EL, 0x00000000D83DDCDEL, 0x00000000D83DDCDFL, 0x00000000D83DDCE0L, 0x00000000D83DDCE1L,\r\n\t\t\t0x00000000D83DDCFAL, 0x00000000D83DDCFBL, 0x00000000D83DDD0AL, 0x00000000D83DDD09L, 0x00000000D83DDD08L, 0x00000000D83DDD07L, 0x00000000D83DDD14L,\r\n\t\t\t0x00000000D83DDD14L, 0x00000000D83DDCE2L, 0x00000000D83DDCE3L, 0x00000000000023F3L, 0x000000000000231BL, 0x00000000000023F0L, 0x000000000000231AL,\r\n\t\t\t0x00000000D83DDD13L, 0x00000000D83DDD12L, 0x00000000D83DDD0FL, 0x00000000D83DDD10L, 0x00000000D83DDD11L, 0x00000000D83DDD0EL, 0x00000000D83DDCA1L,\r\n\t\t\t0x00000000D83DDD26L, 0x00000000D83DDD06L, 0x00000000D83DDD05L, 0x00000000D83DDD0CL, 0x00000000D83DDD0BL, 0x00000000D83DDD0DL, 0x00000000D83DDEC1L /* was missing */, 0x00000000D83DDEC0L,\r\n\t\t\t0x00000000D83DDEBFL, 0x00000000D83DDEBDL, 0x00000000D83DDD27L, 0x00000000D83DDD29L, 0x00000000D83DDD28L, 0x00000000D83DDEAAL, 0x00000000D83DDEACL,\r\n\t\t\t0x00000000D83DDCA3L, 0x00000000D83DDD2BL, 0x00000000D83DDD2AL, 0x00000000D83DDC8AL, 0x00000000D83DDC89L, 0x00000000D83DDCB0L, 0x00000000D83DDCB4L,\r\n\t\t\t0x00000000D83DDCB5L, 0x00000000D83DDCB7L, 0x00000000D83DDCB6L, 0x00000000D83DDCB3L, 0x00000000D83DDCB8L, 0x00000000D83DDCF2L, 0x00000000D83DDCE7L,\r\n\t\t\t0x00000000D83DDCE5L, 0x00000000D83DDCE4L, 0x0000000000002709L, 0x00000000D83DDCE9L, 0x00000000D83DDCE8L, 0x00000000D83DDCEFL, 0x00000000D83DDCEBL,\r\n\t\t\t0x00000000D83DDCEAL, 0x00000000D83DDCECL, 0x00000000D83DDCEDL, 0x00000000D83DDCEEL, 0x00000000D83DDCE6L, 0x00000000D83DDCDDL, 0x00000000D83DDCC4L,\r\n\t\t\t0x00000000D83DDCC3L, 0x00000000D83DDCD1L, 0x00000000D83DDCCAL, 0x00000000D83DDCC8L, 0x00000000D83DDCC9L, 0x00000000D83DDCDCL, 0x00000000D83DDCCBL,\r\n\t\t\t0x00000000D83DDCC5L, 0x00000000D83DDCC6L, 0x00000000D83DDCC7L, 0x00000000D83DDCC1L, 0x00000000D83DDCC2L, 0x0000000000002702L, 0x00000000D83DDCCCL,\r\n\t\t\t0x00000000D83DDCCEL, 0x0000000000002712L, 0x000000000000270FL, 0x00000000D83DDCCFL, 0x00000000D83DDCD0L, 0x00000000D83DDCD5L, 0x00000000D83DDCD7L,\r\n\t\t\t0x00000000D83DDCD8L, 0x00000000D83DDCD9L, 0x00000000D83DDCD3L, 0x00000000D83DDCD4L, 0x00000000D83DDCD2L, 0x00000000D83DDCDAL, 0x00000000D83DDCD6L,\r\n\t\t\t0x00000000D83DDD16L, 0x00000000D83DDCDBL, 0x00000000D83DDD2CL, 0x00000000D83DDD2DL, 0x00000000D83DDCF0L, 0x00000000D83CDFA8L, 0x00000000D83CDFACL,\r\n\t\t\t0x00000000D83CDFA4L, 0x00000000D83CDFA7L, 0x00000000D83CDFBCL, 0x00000000D83CDFB5L, 0x00000000D83CDFB6L, 0x00000000D83CDFB9L, 0x00000000D83CDFBBL,\r\n\t\t\t0x00000000D83CDFBAL, 0x00000000D83CDFB7L, 0x00000000D83CDFB8L, 0x00000000D83DDC7EL, 0x00000000D83CDFAEL, 0x00000000D83CDCCFL, 0x00000000D83CDFB4L,\r\n\t\t\t0x00000000D83CDC04L, 0x00000000D83CDFB2L, 0x00000000D83CDFAFL, 0x00000000D83CDFC8L, 0x00000000D83CDFC0L, 0x00000000000026BDL, 0x00000000000026BEL,\r\n\t\t\t0x00000000D83CDFBEL, 0x00000000D83CDFB1L, 0x00000000D83CDFC9L, 0x00000000D83CDFB3L, 0x00000000000026F3L, 0x00000000D83DDEB5L, 0x00000000D83DDEB4L,\r\n\t\t\t0x00000000D83CDFC1L, 0x00000000D83CDFC7L, 0x00000000D83CDFC6L, 0x00000000D83CDFBFL, 0x00000000D83CDFC2L, 0x00000000D83CDFCAL, 0x00000000D83CDFC4L,\r\n\t\t\t0x00000000D83CDFA3L, 0x0000000000002615L, 0x00000000D83CDF75L, 0x00000000D83CDF76L, 0x00000000D83CDF7CL, 0x00000000D83CDF7AL, 0x00000000D83CDF7BL,\r\n\t\t\t0x00000000D83CDF78L, 0x00000000D83CDF79L, 0x00000000D83CDF77L, 0x00000000D83CDF74L, 0x00000000D83CDF55L, 0x00000000D83CDF54L, 0x00000000D83CDF5FL,\r\n\t\t\t0x00000000D83CDF57L, 0x00000000D83CDF56L, 0x00000000D83CDF5DL, 0x00000000D83CDF5BL, 0x00000000D83CDF64L, 0x00000000D83CDF71L, 0x00000000D83CDF63L,\r\n\t\t\t0x00000000D83CDF65L, 0x00000000D83CDF59L, 0x00000000D83CDF58L, 0x00000000D83CDF5AL, 0x00000000D83CDF5CL, 0x00000000D83CDF72L, 0x00000000D83CDF62L,\r\n\t\t\t0x00000000D83CDF61L, 0x00000000D83CDF73L, 0x00000000D83CDF5EL, 0x00000000D83CDF69L, 0x00000000D83CDF6EL, 0x00000000D83CDF66L, 0x00000000D83CDF68L,\r\n\t\t\t0x00000000D83CDF67L, 0x00000000D83CDF82L, 0x00000000D83CDF70L, 0x00000000D83CDF6AL, 0x00000000D83CDF6BL, 0x00000000D83CDF6CL, 0x00000000D83CDF6DL,\r\n\t\t\t0x00000000D83CDF6FL, 0x00000000D83CDF4EL, 0x00000000D83CDF4FL, 0x00000000D83CDF4AL, 0x00000000D83CDF4BL, 0x00000000D83CDF52L, 0x00000000D83CDF47L,\r\n\t\t\t0x00000000D83CDF49L, 0x00000000D83CDF53L, 0x00000000D83CDF51L, 0x00000000D83CDF48L, 0x00000000D83CDF4CL, 0x00000000D83CDF50L, 0x00000000D83CDF4DL,\r\n\t\t\t0x00000000D83CDF60L, 0x00000000D83CDF46L, 0x00000000D83CDF45L, 0x00000000D83CDF3DL},\r\n\t\t\tnew ulong[]{\r\n            0x00000000D83CDFE0L, 0x00000000D83CDFE1L, 0x00000000D83CDFEBL, 0x00000000D83CDFE2L, 0x00000000D83CDFE3L, 0x00000000D83CDFE5L, 0x00000000D83CDFE6L, 0x00000000D83CDFEAL,\r\n\t\t\t0x00000000D83CDFE9L, 0x00000000D83CDFE8L, 0x00000000D83DDC92L, 0x00000000000026EAL, 0x00000000D83CDFECL, 0x00000000D83CDFE4L, 0x00000000D83CDF07L,\r\n\t\t\t0x00000000D83CDF06L, 0x00000000D83CDFEFL, 0x00000000D83CDFF0L, 0x00000000000026FAL, 0x00000000D83CDFEDL, 0x00000000D83DDDFCL, 0x00000000D83DDDFEL,\r\n\t\t\t0x00000000D83DDDFBL, 0x00000000D83CDF04L, 0x00000000D83CDF05L, 0x00000000D83CDF03L, 0x00000000D83DDDFDL, 0x00000000D83CDF09L, 0x00000000D83CDFA0L,\r\n\t\t\t0x00000000D83CDFA1L, 0x00000000000026F2L, 0x00000000D83CDFA2L, 0x00000000D83DDEA2L, 0x00000000000026F5L, 0x00000000D83DDEA4L, 0x00000000D83DDEA3L,\r\n\t\t\t0x0000000000002693L, 0x00000000D83DDE80L, 0x0000000000002708L, 0x00000000D83DDCBAL, 0x00000000D83DDE81L, 0x00000000D83DDE82L, 0x00000000D83DDE8AL,\r\n\t\t\t0x00000000D83DDE89L, 0x00000000D83DDE9EL, 0x00000000D83DDE86L, 0x00000000D83DDE84L, 0x00000000D83DDE85L, 0x00000000D83DDE88L, 0x00000000D83DDE87L,\r\n\t\t\t0x00000000D83DDE9DL, 0x00000000D83DDE8BL, 0x00000000D83DDE83L, 0x00000000D83DDE8EL, 0x00000000D83DDE8CL, 0x00000000D83DDE8DL, 0x00000000D83DDE99L,\r\n\t\t\t0x00000000D83DDE98L, 0x00000000D83DDE97L, 0x00000000D83DDE95L, 0x00000000D83DDE96L, 0x00000000D83DDE9BL, 0x00000000D83DDE9AL, 0x00000000D83DDEA8L,\r\n\t\t\t0x00000000D83DDE93L, 0x00000000D83DDE94L, 0x00000000D83DDE92L, 0x00000000D83DDE91L, 0x00000000D83DDE90L, 0x00000000D83DDEB2L, 0x00000000D83DDEA1L,\r\n\t\t\t0x00000000D83DDE9FL, 0x00000000D83DDEA0L, 0x00000000D83DDE9CL, 0x00000000D83DDC88L, 0x00000000D83DDE8FL, 0x00000000D83CDFABL, 0x00000000D83DDEA6L,\r\n\t\t\t0x00000000D83DDEA5L, 0x00000000000026A0L, 0x00000000D83DDEA7L, 0x00000000D83DDD30L, 0x00000000000026FDL, 0x00000000D83CDFEEL, 0x00000000D83CDFB0L,\r\n\t\t\t0x0000000000002668L, 0x00000000D83DDDFFL, 0x00000000D83CDFAAL, 0x00000000D83CDFADL, 0x00000000D83DDCCDL, 0x00000000D83DDEA9L, 0xD83CDDEFD83CDDF5L,\r\n\t\t\t0xD83CDDF0D83CDDF7L, 0xD83CDDE9D83CDDEAL, 0xD83CDDE8D83CDDF3L, 0xD83CDDFAD83CDDF8L, 0xD83CDDEBD83CDDF7L, 0xD83CDDEAD83CDDF8L, 0xD83CDDEED83CDDF9L,\r\n\t\t\t0xD83CDDF7D83CDDFAL, 0xD83CDDECD83CDDE7L},\r\n\t\t\tnew ulong[]{\r\n            0x00000000003120E3L, 0x00000000003220E3L, 0x00000000003320E3L, 0x00000000003420E3L, 0x00000000003520E3L, 0x00000000003620E3L, 0x00000000003720E3L, 0x00000000003820E3L,\r\n\t\t\t0x00000000003920E3L, 0x00000000003020E3L, 0x00000000D83DDD1FL, 0x00000000D83DDD22L, 0x00000000002320E3L, 0x00000000D83DDD23L, 0x0000000000002B06L,\r\n\t\t\t0x0000000000002B07L, 0x0000000000002B05L, 0x00000000000027A1L, 0x00000000D83DDD20L, 0x00000000D83DDD21L, 0x00000000D83DDD24L, 0x0000000000002197L,\r\n\t\t\t0x0000000000002196L, 0x0000000000002198L, 0x0000000000002199L, 0x0000000000002194L, 0x0000000000002195L, 0x00000000D83DDD04L, 0x00000000000025C0L,\r\n\t\t\t0x00000000000025B6L, 0x00000000D83DDD3CL, 0x00000000D83DDD3DL, 0x00000000000021A9L, 0x00000000000021AAL, 0x0000000000002139L, 0x00000000000023EAL,\r\n\t\t\t0x00000000000023E9L, 0x00000000000023EBL, 0x00000000000023ECL, 0x0000000000002935L, 0x0000000000002934L, 0x00000000D83CDD97L, 0x00000000D83DDD00L,\r\n\t\t\t0x00000000D83DDD01L, 0x00000000D83DDD02L, 0x00000000D83CDD95L, 0x00000000D83CDD99L, 0x00000000D83CDD92L, 0x00000000D83CDD93L, 0x00000000D83CDD96L,\r\n\t\t\t0x00000000D83DDCF6L, 0x00000000D83CDFA6L, 0x00000000D83CDE01L, 0x00000000D83CDE2FL, 0x00000000D83CDE33L, 0x00000000D83CDE35L, 0x00000000D83CDE34L /* was missing */, 0x00000000D83CDE32L,\r\n\t\t\t0x00000000D83CDE50L /* //34 was wrong */, 0x00000000D83CDE39L /* //32 was duplicate */, /* removed 3 */  0x00000000D83CDE3AL, 0x00000000D83CDE36L, 0x00000000D83CDE1AL,\r\n\t\t\t0x00000000D83DDEBBL, 0x00000000D83DDEB9L, 0x00000000D83DDEBAL, 0x00000000D83DDEBCL, 0x00000000D83DDEBEL, 0x00000000D83DDEB0L, 0x00000000D83DDEAEL,\r\n\t\t\t0x00000000D83CDD7FL, 0x000000000000267FL, 0x00000000D83DDEADL, 0x00000000D83CDE37L, 0x00000000D83CDE38L, 0x00000000D83CDE02L, 0x00000000000024C2L,\r\n            /* missing 4 unicodes */\r\n            0x00000000D83DDEC2L, 0x00000000D83DDEC4L, 0x00000000D83DDEC5L, 0x00000000D83DDEC3L,\r\n\t\t\t0x00000000D83CDE51L, 0x0000000000003299L, 0x0000000000003297L, 0x00000000D83CDD91L, 0x00000000D83CDD98L, 0x00000000D83CDD94L, 0x00000000D83DDEABL,\r\n\t\t\t0x00000000D83DDD1EL, 0x00000000D83DDCF5L, 0x00000000D83DDEAFL, 0x00000000D83DDEB1L, 0x00000000D83DDEB3L, 0x00000000D83DDEB7L, 0x00000000D83DDEB8L,\r\n\t\t\t0x00000000000026D4L, 0x0000000000002733L, 0x0000000000002747L, 0x000000000000274EL, 0x0000000000002705L, 0x0000000000002734L, 0x00000000D83DDC9FL,\r\n\t\t\t0x00000000D83CDD9AL, 0x00000000D83DDCF3L, 0x00000000D83DDCF4L, 0x00000000D83CDD70L, 0x00000000D83CDD71L, 0x00000000D83CDD8EL, 0x00000000D83CDD7EL,\r\n\t\t\t0x00000000D83DDCA0L, 0x00000000000027BFL, 0x000000000000267BL, 0x0000000000002648L, 0x0000000000002649L, 0x000000000000264AL, 0x000000000000264BL,\r\n\t\t\t0x000000000000264CL, 0x000000000000264DL, 0x000000000000264EL, 0x000000000000264FL, 0x0000000000002650L, 0x0000000000002651L, 0x0000000000002652L,\r\n\t\t\t0x0000000000002653L, 0x00000000000026CEL, 0x00000000D83DDD2FL, 0x00000000D83CDFE7L, 0x00000000D83DDCB9L, 0x00000000D83DDCB2L, 0x00000000D83DDCB1L,\r\n\t\t\t0x00000000000000A9L, 0x00000000000000AEL, 0x0000000000002122L /* TM */, \r\n            /* was mixed, missing 2-3 */\r\n            0x000000000000274CL, 0x000000000000203CL, 0x0000000000002049L, 0x0000000000002757L, 0x0000000000002753L, 0x0000000000002755L, 0x0000000000002754L, 0x0000000000002B55L,\r\n            0x00000000D83DDD1DL, 0x00000000D83DDD1AL,\r\n\t\t\t0x00000000D83DDD19L, 0x00000000D83DDD1BL, 0x00000000D83DDD1CL,\r\n            0x00000000D83DDD03L, 0x00000000D83DDD5BL, 0x00000000D83DDD67L, 0x00000000D83DDD50L, 0x00000000D83DDD5CL,\r\n\t\t\t0x00000000D83DDD51L, 0x00000000D83DDD5DL, 0x00000000D83DDD52L, 0x00000000D83DDD5EL, 0x00000000D83DDD53L, 0x00000000D83DDD5FL, 0x00000000D83DDD54L,\r\n\t\t\t0x00000000D83DDD60L, 0x00000000D83DDD55L, 0x00000000D83DDD56L, 0x00000000D83DDD57L, 0x00000000D83DDD58L, 0x00000000D83DDD59L, 0x00000000D83DDD5AL,\r\n\t\t\t0x00000000D83DDD61L, 0x00000000D83DDD62L, 0x00000000D83DDD63L, 0x00000000D83DDD64L, 0x00000000D83DDD65L, 0x00000000D83DDD66L, 0x0000000000002716L,\r\n\t\t\t0x0000000000002795L, 0x0000000000002796L, 0x0000000000002797L, 0x0000000000002660L, 0x0000000000002665L, 0x0000000000002663L, 0x0000000000002666L,\r\n\t\t\t0x00000000D83DDCAEL, 0x00000000D83DDCAFL, 0x0000000000002714L, 0x0000000000002611L, 0x00000000D83DDD18L, 0x00000000D83DDD17L, 0x00000000000027B0L,\r\n            0x0000000000003030L, 0x000000000000303DL, 0x00000000D83DDD31L, \r\n            0x00000000000025FCL, 0x00000000000025FBL, 0x00000000000025FEL, 0x00000000000025FDL,\r\n\t\t\t0x00000000000025AAL, 0x00000000000025ABL,\r\n            0x00000000D83DDD3AL, 0x00000000D83DDD32L, 0x00000000D83DDD33L, 0x00000000000026ABL, 0x00000000000026AAL,\r\n\t\t\t0x00000000D83DDD34L, 0x00000000D83DDD35L, 0x00000000D83DDD3BL, 0x0000000000002B1CL, 0x0000000000002B1BL, 0x00000000D83DDD36L, 0x00000000D83DDD37L, 0x00000000D83DDD38L, 0x00000000D83DDD39L}};\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/EmojiPanel/Controls/Emoji/EmojiSpriteItem.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Shapes;\r\nusing Telegram.Controls.VirtualizedView;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Emoji\r\n{\r\n    public class EmojiSelectedEventArgs : EventArgs\r\n    {\r\n        public EmojiDataItem DataItem { get; set; }\r\n    }\r\n\r\n    public class EmojiSpriteItem : VListItemBase\r\n    {\r\n        public int CategoryIndex;\r\n        public int SpriteOffset;\r\n        public int Rows;\r\n\r\n        public EventHandler<EmojiSelectedEventArgs> EmojiSelected = delegate { };\r\n\r\n        public EmojiSpriteItem(int categoryIndex, int spriteOffset)\r\n        {\r\n            CategoryIndex = categoryIndex;\r\n            SpriteOffset = spriteOffset;\r\n            Rows = EmojiData.SpriteRowsCountByCategory[categoryIndex][spriteOffset];\r\n\r\n            var emojiInCategory = EmojiData.CodesByCategory[categoryIndex];\r\n            ulong[] emojis = null;\r\n            emojis = spriteOffset != 0 ? \r\n                emojiInCategory.Skip(spriteOffset*EmojiData.ItemsInSprite).Take(EmojiData.ItemsInSprite).ToArray() : \r\n                emojiInCategory.Take(EmojiData.ItemsInSprite).ToArray();\r\n\r\n            View.Width = SpriteWidth + 8;\r\n            var decodePixelWidth = SpriteWidth;\r\n            //switch (Application.Current.Host.Content.ScaleFactor)\r\n            //{\r\n            //    case 100:\r\n            //        break;\r\n            //    case 150:\r\n            //        decodePixelWidth = 711;\r\n            //        break;\r\n            //    case 160:\r\n            //        decodePixelWidth = 758;\r\n            //        break;\r\n            //}\r\n\r\n            var image = new Image\r\n            {\r\n                Width = SpriteWidth,\r\n                Source = new BitmapImage\r\n                {\r\n                    //DecodePixelWidth = decodePixelWidth,\r\n                    //DecodePixelType = DecodePixelType.Physical\r\n                    //UriSource = spriteUri\r\n                },\r\n                Margin = new Thickness(4, 1, 4, 1),\r\n                VerticalAlignment = VerticalAlignment.Top\r\n            };\r\n            Children.Add(image);\r\n\r\n            View.MouseLeftButtonDown += ViewOnMouseLeftButtonDown;\r\n            View.LostMouseCapture += ViewOnLostMouseCapture;\r\n            View.MouseLeftButtonUp += ViewOnLostMouseCapture;\r\n            View.MouseLeave += ViewOnLostMouseCapture;\r\n            View.Tap += ViewOnTap;\r\n\r\n            CreateBorders();\r\n        }\r\n\r\n        public EmojiSpriteItem(Uri spriteUri, int categoryIndex, int spriteOffset)\r\n        {\r\n            CategoryIndex = categoryIndex;\r\n            SpriteOffset = spriteOffset;\r\n            Rows = EmojiData.SpriteRowsCountByCategory[categoryIndex][spriteOffset];\r\n\r\n            View.Width = SpriteWidth + 8;\r\n            var decodePixelWidth = SpriteWidth;\r\n            //switch (Application.Current.Host.Content.ScaleFactor)\r\n            //{\r\n            //    case 100:\r\n            //        break;\r\n            //    case 150:\r\n            //        decodePixelWidth = 711;\r\n            //        break;\r\n            //    case 160:\r\n            //        decodePixelWidth = 758;\r\n            //        break;\r\n            //}\r\n\r\n            var image = new Image\r\n            {\r\n                Width = SpriteWidth,\r\n                Source = new BitmapImage\r\n                {\r\n                    //DecodePixelWidth = decodePixelWidth,\r\n                    //DecodePixelType = DecodePixelType.Physical,\r\n                    UriSource = spriteUri\r\n                },\r\n                Margin = new Thickness(4, 1, 4, 1),\r\n                VerticalAlignment = VerticalAlignment.Top\r\n            };\r\n            Children.Add(image);\r\n\r\n            View.MouseLeftButtonDown += ViewOnMouseLeftButtonDown;\r\n            View.LostMouseCapture += ViewOnLostMouseCapture;\r\n            View.MouseLeftButtonUp += ViewOnLostMouseCapture;\r\n            View.MouseLeave += ViewOnLostMouseCapture;\r\n            View.Tap += ViewOnTap;\r\n\r\n            CreateBorders();\r\n        }\r\n\r\n        private static void ViewOnLostMouseCapture(object sender, MouseEventArgs mouseEventArgs)\r\n        {\r\n            ClearCurrentHighlight();\r\n        }\r\n\r\n        public static void ClearCurrentHighlight()\r\n        {\r\n            if (_currentHighlight == null) return;\r\n\r\n            var parent = _currentHighlight.Parent as Grid;\r\n            if (parent != null)\r\n                parent.Children.Remove(_currentHighlight);\r\n\r\n            _currentHighlight = null;\r\n        }\r\n\r\n        private void ViewOnMouseLeftButtonDown(object sender, MouseButtonEventArgs args)\r\n        {\r\n            var point = args.GetPosition(View);\r\n            var column = (int) Math.Ceiling(point.X / ColumnWidth);\r\n            var row = (int) Math.Ceiling(point.Y / RowHeight);\r\n\r\n            if (column <= 0 || row <= 0) return;\r\n            if (Rows < MaxRowsInSprite && row == Rows)\r\n            {\r\n                if (EmojiData.ItemsInRow - EmojiData.SpriteMissingCellsByCategory[CategoryIndex] < column)\r\n                    return;\r\n            }\r\n\r\n            var emojiHoverBackground = new Rectangle\r\n            {\r\n                Width = ColumnWidth - 2, //width without 2px border\r\n                Height = RowHeight,\r\n                Fill = (Brush) Application.Current.Resources[\"TelegramBadgeAccentBrush\"],\r\n                Margin = new Thickness((column - 1) * 79 + 4, (row - 1) * 70 + 2, 0, 0),\r\n                HorizontalAlignment = HorizontalAlignment.Left,\r\n                VerticalAlignment = VerticalAlignment.Top\r\n            };\r\n            View.Children.Insert(0, emojiHoverBackground);\r\n\r\n            ClearCurrentHighlight();\r\n            _currentHighlight = emojiHoverBackground;\r\n        }\r\n\r\n        private void ViewOnTap(object sender, GestureEventArgs args)\r\n        {\r\n            var point = args.GetPosition(View);\r\n            var column = (int) Math.Ceiling(point.X / 79);\r\n            var row = (int) Math.Ceiling(point.Y / 70);\r\n\r\n            if (column <= 0 || row <= 0) return;\r\n\r\n            //Debug.WriteLine(\"{0}-{1}\", column, row);\r\n\r\n            var itemIndex = (row - 1) * EmojiData.ItemsInRow + (column - 1);\r\n\r\n            var emoji = EmojiDataItem.GetByIndex(CategoryIndex, SpriteOffset, itemIndex);\r\n            if (emoji != null)\r\n            {\r\n                EmojiSelected(this, new EmojiSelectedEventArgs{DataItem = emoji});\r\n            }\r\n        }\r\n\r\n        private static Rectangle _currentHighlight;\r\n\r\n        private void CreateBorders()\r\n        {\r\n            for (int i = 0; i < Rows + 1; i++)\r\n            {\r\n                var line = new Rectangle\r\n                {\r\n                    Width = SpriteWidth + 4,\r\n                    Height = 2,\r\n                    Fill = (Brush) Application.Current.Resources[\"PhoneChromeBrush\"],\r\n                    Margin = new Thickness(0, i * RowHeight, 0, 0),\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top\r\n                };\r\n                Children.Add(line);\r\n            }\r\n\r\n            for (int i = 0; i < 5; i++)\r\n            {\r\n                var line = new Rectangle\r\n                {\r\n                    Width = 2,\r\n                    Height = RowHeight * Rows,\r\n                    Fill = (Brush) Application.Current.Resources[\"PhoneChromeBrush\"],\r\n                    Margin = new Thickness((i + 1) * ColumnWidth + 2, 0, 0, 0),\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top\r\n                };\r\n                Children.Add(line);\r\n            }\r\n\r\n            if (Rows < MaxRowsInSprite)\r\n            {\r\n                var missingRows = EmojiData.SpriteMissingCellsByCategory[CategoryIndex];\r\n                var startIndex = EmojiData.ItemsInRow - missingRows;\r\n\r\n                var width = missingRows * ColumnWidth;\r\n                var horizontalOffset = startIndex * ColumnWidth + 4;\r\n\r\n                var rect = new Rectangle\r\n                {\r\n                    Fill = (Brush) Application.Current.Resources[\"PhoneChromeBrush\"],\r\n                    Width = width,\r\n                    Height = RowHeight,\r\n                    Margin = new Thickness(horizontalOffset, (Rows - 1) * RowHeight, 0, 0),\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top\r\n                };\r\n                Children.Add(rect);\r\n            }\r\n        }\r\n\r\n        public const int SpriteWidth = 472;\r\n        public const int SpriteHeight = 420;\r\n        public const int ColumnWidth = 79;\r\n        public const int RowHeight = 70; // 105 in pixel logic\r\n\r\n        public const int MaxRowsInSprite = 6;\r\n\r\n        public override double FixedHeight\r\n        {\r\n            get { return RowHeight * Rows; }\r\n            set { }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/EmojiPanel/Controls/Emoji/StickerSpriteItem.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.VirtualizedView;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Dialogs;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Emoji\r\n{\r\n    class SearchSpriteItem : VListItemBase\r\n    {\r\n        public override double FixedHeight\r\n        {\r\n            get { return 62.0; }\r\n            set { }\r\n        }\r\n\r\n        public string Text { get { return _searchBox.Text; } }\r\n\r\n        private WatermarkedTextBox _searchBox;\r\n\r\n        public SearchSpriteItem(double panelWidth)\r\n        {\r\n            var inputScope = new InputScope();\r\n            var searchNameValue = new InputScopeName {NameValue = InputScopeNameValue.Search};\r\n            inputScope.Names.Add(searchNameValue);\r\n            _searchBox = new WatermarkedTextBox { FontSize = 17.778, Watermark = AppResources.Search, InputScope = inputScope, Style = (Style)Application.Current.Resources[\"W10MWatermarkedTextBoxStyle\"] };\r\n            _searchBox.GotFocus += (sender, args) =>\r\n            {\r\n                RaiseOpenFullScreen();\r\n            };\r\n            _searchBox.LostFocus += (sender, args) =>\r\n            {\r\n                //RaiseCloseFullScreen();\r\n            };\r\n            _searchBox.KeyUp += (sender, args) =>\r\n            {\r\n                var text = _searchBox.Text;\r\n                Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    if (!string.Equals(text, _searchBox.Text)) return;\r\n\r\n                    RaiseSearchText(new SearchTextEventArgs{ Text = text});\r\n                });\r\n            };\r\n\r\n            Children.Add(_searchBox);\r\n\r\n            View.Width = panelWidth;\r\n        }\r\n\r\n        public event EventHandler OpenFullScreen;\r\n\r\n        protected virtual void RaiseOpenFullScreen()\r\n        {\r\n            var handler = OpenFullScreen;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler CloseFullScreen;\r\n\r\n        protected virtual void RaiseCloseFullScreen()\r\n        {\r\n            var handler = CloseFullScreen;\r\n            if (handler != null) handler(this, EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler<SearchTextEventArgs> SearchText;\r\n\r\n        protected virtual void RaiseSearchText(SearchTextEventArgs e)\r\n        {\r\n            var handler = SearchText;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public void Focus()\r\n        {\r\n            _searchBox.Focus();\r\n        }\r\n\r\n        public void Clear()\r\n        {\r\n            _searchBox.Text = string.Empty;\r\n        }\r\n    }\r\n\r\n    class FeaturedStickerSpriteItem : StickerSpriteItem\r\n    {\r\n        public override double FixedHeight\r\n        {\r\n            get { return 200.0; }\r\n            set { }\r\n        }\r\n\r\n        private readonly TLStickerSetBase _stickerSet;\r\n\r\n        public TLStickerSetBase StickerSet { get { return _stickerSet; } }\r\n\r\n        public event EventHandler<StickerSetAddedEventArgs> StickerSetAdded;\r\n\r\n        protected virtual void RaiseStickerSetAdded()\r\n        {\r\n            var handler = StickerSetAdded;\r\n            if (handler != null) handler(this, new StickerSetAddedEventArgs{ Set = _stickerSet });\r\n        }\r\n\r\n        public event EventHandler<StickerSetOpenedEventArgs> StickerSetOpened;\r\n\r\n        protected virtual void RaiseStickerSetOpened()\r\n        {\r\n            var handler = StickerSetOpened;\r\n            if (handler != null) handler(this, new StickerSetOpenedEventArgs { Set = _stickerSet });\r\n        }\r\n\r\n        public FeaturedStickerSpriteItem(TLStickerSetBase stickerSetBase, int columns, IList<TLStickerItem> stickers, double stickerHeight, double panelWidth, MouseEventHandler onStickerMouseEnter, bool showEmoji = false)\r\n        {\r\n            _stickerSet = stickerSetBase;\r\n\r\n            FeaturedStickerSetControl captionPanel = null;\r\n            var stickerSet32 = stickerSetBase as TLStickerSet32;\r\n            if (stickerSet32 != null)\r\n            {\r\n                captionPanel = new FeaturedStickerSetControl();\r\n                captionPanel.DataContext = stickerSetBase;\r\n                captionPanel.Added += (o, e) => RaiseStickerSetAdded();\r\n                captionPanel.Opened += (o, e) => RaiseStickerSetOpened();\r\n            }\r\n\r\n            Stickers = stickers;\r\n\r\n            _stickerHeight = stickerHeight;\r\n\r\n            var panelMargin = new Thickness(4.0, 0.0, 4.0, 0.0);\r\n            var panelActualWidth = panelWidth - panelMargin.Left - panelMargin.Right;\r\n            //472, 438\r\n\r\n            var stackPanel = new Grid { Width = panelActualWidth, Margin = panelMargin, Background = new SolidColorBrush(Colors.Transparent) };\r\n\r\n            for (var i = 0; i < columns; i++)\r\n            {\r\n                stackPanel.ColumnDefinitions.Add(new ColumnDefinition());\r\n            }\r\n\r\n            for (var i = 0; i < stickers.Count; i++)\r\n            {\r\n                var binding = new Binding\r\n                {\r\n                    Mode = BindingMode.OneWay,\r\n                    Path = new PropertyPath(\"Self\"),\r\n                    Converter = new DefaultPhotoConverter(),\r\n                    ConverterParameter = StickerHeight\r\n                };\r\n\r\n                var stickerImage = new Image\r\n                {\r\n                    Height = StickerHeight,\r\n                    Margin = new Thickness(0, 12, 0, 12),\r\n                    VerticalAlignment = VerticalAlignment.Top,\r\n                    CacheMode = new BitmapCache()\r\n                };\r\n                if (onStickerMouseEnter != null)\r\n                {\r\n                    stickerImage.MouseEnter += onStickerMouseEnter;\r\n                }\r\n                stickerImage.SetBinding(Image.SourceProperty, binding);\r\n                StickerImage = stickerImage;\r\n\r\n                var grid = new Grid();\r\n                grid.Children.Add(stickerImage);\r\n\r\n                if (showEmoji)\r\n                {\r\n                    var document22 = stickers[i].Document as TLDocument22;\r\n                    if (document22 != null)\r\n                    {\r\n                        var bytes = Encoding.BigEndianUnicode.GetBytes(document22.Emoticon);\r\n                        var bytesStr = BrowserNavigationService.ConvertToHexString(bytes);\r\n\r\n                        var emojiImage = new Image\r\n                        {\r\n                            Height = 32,\r\n                            Width = 32,\r\n                            Margin = new Thickness(12, 12, 12, 12),\r\n                            HorizontalAlignment = HorizontalAlignment.Right,\r\n                            VerticalAlignment = VerticalAlignment.Bottom,\r\n                            Source = new BitmapImage(new Uri(string.Format(\"/Assets/Emoji/Separated/{0}.png\", bytesStr), UriKind.RelativeOrAbsolute))\r\n                        };\r\n                        grid.Children.Add(emojiImage);\r\n                    }\r\n                }\r\n\r\n                var listBoxItem = new ListBoxItem { Content = grid, DataContext = stickers[i] };\r\n                Microsoft.Phone.Controls.TiltEffect.SetIsTiltEnabled(listBoxItem, true);\r\n                listBoxItem.Tap += FeaturedSticker_OnTap;\r\n                //grid.DataContext = stickers[i];\r\n                Grid.SetColumn(listBoxItem, i);\r\n                stackPanel.Children.Add(listBoxItem);\r\n            }\r\n\r\n            if (captionPanel != null)\r\n            {\r\n                var panel = new StackPanel();\r\n                panel.Children.Add(captionPanel);\r\n                panel.Children.Add(stackPanel);\r\n\r\n                Children.Add(panel);\r\n            }\r\n            else\r\n            {\r\n                Children.Add(stackPanel);\r\n            }\r\n\r\n            View.Width = panelWidth;\r\n        }\r\n\r\n        protected void FeaturedSticker_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var sticker = ((FrameworkElement)sender).DataContext as TLStickerItem;\r\n            if (sticker == null) return;\r\n\r\n            RaiseStickerSelected(new StickerSelectedEventArgs { Sticker = sticker, Set = StickerSet });\r\n        }\r\n    }\r\n\r\n    class StickerSpriteItem : VListItemBase\r\n    {\r\n//#if DEBUG\r\n//        ~StickerSpriteItem()\r\n//        {\r\n//            Api.Helpers.Execute.BeginOnUIThread(() => MessageBox.Show(\"Dispose\"));\r\n//        }\r\n//#endif\r\n\r\n        private double _fixedHeight = 120.0;\r\n\r\n        public override double FixedHeight\r\n        {\r\n            get { return _fixedHeight; }\r\n            set { _fixedHeight = value; }\r\n        }\r\n\r\n        protected double _stickerHeight = 96.0;\r\n\r\n        public double StickerHeight\r\n        {\r\n            get { return _stickerHeight; }\r\n        }\r\n\r\n        public IList<TLStickerItem> Stickers { get; set; } \r\n\r\n        public Image StickerImage { get; protected set; }\r\n\r\n        protected StickerSpriteItem()\r\n        {\r\n            \r\n        }\r\n\r\n        public StickerSpriteItem(int columns, IList<TLStickerItem> stickers, double stickerHeight, double panelWidth, MouseEventHandler onStickerMouseEnter, bool showEmoji = false)\r\n        {\r\n            Stickers = stickers;\r\n\r\n            _stickerHeight = stickerHeight;\r\n\r\n            var panelMargin = new Thickness(4.0, 0.0, 4.0, 0.0);\r\n            var panelActualWidth = panelWidth - panelMargin.Left - panelMargin.Right;\r\n            //472, 438\r\n            var stackPanel = new Grid{ Width = panelActualWidth, Margin = panelMargin, Background = new SolidColorBrush(Colors.Transparent) };\r\n\r\n            for (var i = 0; i < columns; i++)\r\n            {\r\n                stackPanel.ColumnDefinitions.Add(new ColumnDefinition());\r\n            }\r\n\r\n            for (var i = 0; i < stickers.Count; i++)\r\n            {\r\n                var binding = new Binding\r\n                {\r\n                    Mode = BindingMode.OneWay,\r\n                    Path = new PropertyPath(\"Self\"),\r\n                    Converter = new DefaultPhotoConverter(),\r\n                    ConverterParameter = StickerHeight\r\n                };\r\n\r\n                var stickerImage = new Image\r\n                {\r\n                    Height = StickerHeight,\r\n                    Margin = new Thickness(0, 12, 0, 12),\r\n                    VerticalAlignment = VerticalAlignment.Top,\r\n                    CacheMode = new BitmapCache()\r\n                };\r\n                if (onStickerMouseEnter != null)\r\n                {\r\n                    stickerImage.MouseEnter += onStickerMouseEnter;\r\n                }\r\n                stickerImage.SetBinding(Image.SourceProperty, binding);\r\n                StickerImage = stickerImage;\r\n\r\n                var grid = new Grid();\r\n                grid.Children.Add(stickerImage);\r\n\r\n                if (showEmoji)\r\n                {\r\n                    var document22 = stickers[i].Document as TLDocument22;\r\n                    if (document22 != null)\r\n                    {\r\n                        var bytes = Encoding.BigEndianUnicode.GetBytes(document22.Emoticon);\r\n                        var bytesStr = BrowserNavigationService.ConvertToHexString(bytes);\r\n\r\n                        var emojiImage = new Image\r\n                        {\r\n                            Height = 32,\r\n                            Width = 32,\r\n                            Margin = new Thickness(12, 12, 12, 12),\r\n                            HorizontalAlignment = HorizontalAlignment.Right,\r\n                            VerticalAlignment = VerticalAlignment.Bottom,\r\n                            Source = new BitmapImage(new Uri(string.Format(\"/Assets/Emoji/Separated/{0}.png\", bytesStr), UriKind.RelativeOrAbsolute))\r\n                        };\r\n                        grid.Children.Add(emojiImage);\r\n                    }\r\n                }\r\n\r\n                var listBoxItem = new ListBoxItem {Content = grid, DataContext = stickers[i]};\r\n                Microsoft.Phone.Controls.TiltEffect.SetIsTiltEnabled(listBoxItem, true);\r\n                listBoxItem.Tap += Sticker_OnTap;\r\n                //grid.DataContext = stickers[i];\r\n                Grid.SetColumn(listBoxItem, i);\r\n                stackPanel.Children.Add(listBoxItem);\r\n            }\r\n\r\n            Children.Add(stackPanel);\r\n\r\n            View.Width = panelWidth;\r\n        }\r\n\r\n        public event EventHandler<StickerSelectedEventArgs> StickerSelected;\r\n\r\n        protected virtual void RaiseStickerSelected(StickerSelectedEventArgs e)\r\n        {\r\n            var handler = StickerSelected;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        protected void Sticker_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var sticker = ((FrameworkElement) sender).DataContext as TLStickerItem;\r\n            if (sticker == null) return;\r\n\r\n            RaiseStickerSelected(new StickerSelectedEventArgs { Sticker = sticker });\r\n        }\r\n    }\r\n\r\n    class StickerHeaderSpriteItem : VListItemBase\r\n    {\r\n        public override double FixedHeight\r\n        {\r\n            get { return 23.65 + 6.0 + 6.0; }\r\n            set { }\r\n        }\r\n\r\n        public StickerHeaderSpriteItem(TLStickerSetBase stickerSetBase, double panelWidth)\r\n        {\r\n            var label = new TextBlock { FontSize = 17.778, Margin = new Thickness(12.0, 6.0, 12.0, 6.0), Text = stickerSetBase.Title.ToString(), Style = (Style) Application.Current.Resources[\"PhoneTextSubtleStyle\"] };\r\n            Children.Add(label);\r\n\r\n            View.Width = panelWidth;\r\n            View.IsHitTestVisible = false;\r\n        }\r\n    }\r\n\r\n    class StickerFooterSpriteItem : VListItemBase\r\n    {\r\n        public override double FixedHeight { get; set; }\r\n\r\n        public StickerFooterSpriteItem(double panelWidth)\r\n        {\r\n            View.Width = panelWidth;\r\n            View.IsHitTestVisible = false;\r\n        }\r\n    }\r\n\r\n    public class StickerSelectedEventArgs : EventArgs\r\n    {\r\n        public TLStickerItem Sticker { get; set; }\r\n\r\n        public TLStickerSetBase Set { get; set; }\r\n    }\r\n\r\n    public class StickerSetAddedEventArgs : EventArgs\r\n    {\r\n        public TLStickerSetBase Set { get; set; }\r\n    }\r\n\r\n    public class StickerSetOpenedEventArgs : EventArgs\r\n    {\r\n        public TLStickerSetBase Set { get; set; }\r\n    }\r\n\r\n    public class SearchTextEventArgs : EventArgs\r\n    {\r\n        public string Text { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/EmojiPanel/Controls/Utilities/DelayedExecutor.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Threading;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Utilites\r\n{\r\n    public class DelayedExecutor\r\n    {\r\n        class ExecutionInfo\r\n        {\r\n            public Action Action { get; set; }\r\n            public DateTime Timestamp { get; set; }\r\n        }\r\n\r\n        ExecutionInfo m_executionInfo;\r\n        Timer m_timer;\r\n        int m_delay;\r\n        bool m_timerIsActive;\r\n        object m_lockObj = new object();\r\n\r\n        public DelayedExecutor(int delay) // TO DO : add IDateTimeProvider dependency to remove dependency on DateTime\r\n        {\r\n            m_delay = delay;\r\n            m_timer = new Timer(TimerCallback);\r\n        }\r\n\r\n        public void AddToDelayedExecution(Action action)\r\n        {\r\n            lock (m_lockObj)\r\n            {\r\n                m_executionInfo = new ExecutionInfo() { Action = action, Timestamp = DateTime.Now };\r\n            }\r\n\r\n            ChangeTimer(true);\r\n        }\r\n\r\n        private void TimerCallback(object state)\r\n        {\r\n            Action executeAction = null;\r\n\r\n            lock (m_lockObj)\r\n            {\r\n                if (m_executionInfo != null)\r\n                {\r\n                    if (DateTime.Now - m_executionInfo.Timestamp >= TimeSpan.FromMilliseconds(m_delay))\r\n                    {\r\n                        Debug.WriteLine(\"Action is set to be executed.\");\r\n                        executeAction = m_executionInfo.Action;\r\n                        m_executionInfo = null;\r\n                        ChangeTimer(false);\r\n                    }\r\n                }\r\n            }\r\n            if (executeAction != null)\r\n            {\r\n                try\r\n                {\r\n                    executeAction();\r\n                }\r\n                catch (Exception exc)\r\n                {\r\n                    //Logger.Instance.Error(\"Exeption during delayed execution\", exc);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ChangeTimer(bool activate)\r\n        {\r\n            if (activate && !m_timerIsActive)\r\n            {\r\n                lock (m_timer)\r\n                {\r\n                    m_timerIsActive = true;\r\n                    m_timer.Change(m_delay, m_delay);\r\n                }\r\n            }\r\n            else if (!activate && m_timerIsActive)\r\n            {\r\n                lock (m_timer)\r\n                {\r\n                    m_timerIsActive = false;\r\n                    m_timer.Change(Timeout.Infinite, 0);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/EmojiPanel/Controls/Utilities/Helpers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Utilites\r\n{\r\n    public static class Helpers\r\n    {\r\n        public static Uri GetAssetUri(string assetName)\r\n        {\r\n            return new Uri(String.Format(\"/Assets/{0}-WXGA.png\", assetName), UriKind.Relative);\r\n\r\n            //switch (Application.Current.Host.Content.ScaleFactor)\r\n            //{\r\n            //    case 100:\r\n            //        return new Uri(String.Format(\"/Assets/{0}-WVGA.png\", assetName), UriKind.Relative);\r\n            //    case 160:\r\n            //        return new Uri(String.Format(\"/Assets/{0}-WXGA.png\", assetName), UriKind.Relative);\r\n            //    case 150:\r\n            //        return new Uri(String.Format(\"/Assets/{0}-720p.png\", assetName), UriKind.Relative);\r\n            //    default:\r\n            //        return new Uri(String.Format(\"/Assets/{0}-WVGA.png\", assetName), UriKind.Relative);\r\n            //}\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/EmojiPanel/Controls/Utilities/MyListItemBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows.Controls;\r\nusing Telegram.Controls.VirtualizedView;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Utilites\r\n{\r\n    public class MyListItemBase : Grid\r\n    {\r\n        //private Panel _contentPanel;\r\n        //public Panel ContentPanel\r\n        //{\r\n        //    get\r\n        //    {\r\n        //        return _contentPanel;\r\n        //    }\r\n        //    set\r\n        //    {\r\n        //        _contentPanel = value;\r\n        //        Content = _contentPanel;\r\n        //    }\r\n        //}\r\n\r\n        public VListItemBase VirtSource { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/EmojiPanel/Controls/Utilities/MyVirtualizingPanel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define USE_CANVAS_TOP\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.VirtualizedView;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Utilites\r\n{\r\n    public class MyVirtualizingPanel : Canvas\r\n    {\r\n        private const bool IsLogEnabled = false;\r\n\r\n        private static void Log(string str)\r\n        {\r\n            if (IsLogEnabled)\r\n            {\r\n                Debug.WriteLine(str);\r\n            }\r\n        }\r\n\r\n\r\n        private const double LoadUnloadThreshold = 500;\r\n        private const double LoadedHeightUpwards = 300;\r\n        private const double LoadedHeightDownwards = 900;\r\n        private const double LoadedHeightDownwardsNotScrolling = 800;\r\n\r\n        private bool _changingVerticalOffset = false;\r\n\r\n        readonly DependencyProperty _listVerticalOffsetProperty = DependencyProperty.Register(\r\n             \"ListVerticalOffset\",\r\n             typeof(double),\r\n             typeof(MyVirtualizingPanel),\r\n             new PropertyMetadata(new PropertyChangedCallback(OnListVerticalOffsetChanged)));\r\n\r\n        public double ListVerticalOffset\r\n        {\r\n            get { return (double)this.GetValue(_listVerticalOffsetProperty); }\r\n            set { this.SetValue(_listVerticalOffsetProperty, value); }\r\n        }\r\n\r\n        private static void OnListVerticalOffsetChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = (MyVirtualizingPanel)obj;\r\n            control.OnListVerticalOffsetChanged();\r\n        }\r\n\r\n        private ScrollViewer _scrollViewer;\r\n\r\n        public ScrollViewer ScrollViewer\r\n        {\r\n            get { return _scrollViewer; }\r\n        }\r\n\r\n        bool _isScrolling = false;\r\n\r\n        public bool IsScrolling\r\n        {\r\n            get { return _isScrolling; }\r\n        }\r\n\r\n        public void InitializeWithScrollViewer(ScrollViewer scrollViewer)\r\n        {\r\n            _scrollViewer = scrollViewer;\r\n            EnsureBoundToScrollViewer();\r\n        }\r\n\r\n        protected void EnsureBoundToScrollViewer()\r\n        {\r\n            Binding binding = new Binding\r\n            {\r\n                Source = _scrollViewer,\r\n                Path = new PropertyPath(\"VerticalOffset\"),\r\n                Mode = BindingMode.OneWay\r\n            };\r\n            this.SetBinding(_listVerticalOffsetProperty, binding);\r\n\r\n\r\n        }\r\n\r\n        bool _notReactToScroll = false;\r\n        private double _savedDelta;\r\n        //private DelayedExecutor _de = new DelayedExecutor(300);\r\n        //internal void PrepareForScrollToBottom()\r\n        //{\r\n        //    _notReactToScroll = true;\r\n        //    _savedDelta = DeltaOffset;\r\n        //    // load in the end\r\n        //    DeltaOffset = _scrollViewer.ExtentHeight - _scrollViewer.ViewportHeight - _scrollViewer.VerticalOffset;\r\n        //    Debug.WriteLine(\"PrepareForScrollToBottom\");\r\n        //    PerformLoadUnload2(VirtualizableState.LoadedPartially, false);\r\n        //    _de.AddToDelayedExecution(() =>\r\n        //        {\r\n        //            Execute.ExecuteOnUIThread(() => ScrollToBottomCompleted());\r\n        //        });\r\n        //}\r\n\r\n        //internal void ScrollToBottomCompleted()\r\n        //{\r\n        //    _notReactToScroll = false;\r\n        //    DeltaOffset = _savedDelta;\r\n        //    PerformLoadUnload(VirtualizableState.LoadedFully);\r\n        //    Debug.WriteLine(\"ScrolltoBottomCompleted\");\r\n        //}\r\n\r\n        private void group_CurrentStateChanging(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            if (e.NewState.Name == \"Scrolling\")\r\n            {\r\n                _isScrolling = true;\r\n\r\n                if (ScrollStateChanged != null) ScrollStateChanged(this, new ScrollingStateChangedEventArgs(false, true));\r\n            }\r\n            else\r\n            {\r\n                _isScrolling = false;\r\n                PerformLoadUnload(true);\r\n\r\n                if (ScrollStateChanged != null) ScrollStateChanged(this, new ScrollingStateChangedEventArgs(true, false));\r\n            }\r\n        }\r\n\r\n        private static VisualStateGroup FindVisualState(FrameworkElement element, string name)\r\n        {\r\n            if (element == null)\r\n                return null;\r\n\r\n            IList groups = VisualStateManager.GetVisualStateGroups(element);\r\n            foreach (VisualStateGroup group in groups)\r\n                if (group.Name == name)\r\n                    return group;\r\n\r\n            return null;\r\n        }\r\n\r\n        public class ScrollPositionChangedEventAgrs : EventArgs\r\n        {\r\n            public double CurrentPosition { get; private set; }\r\n            public double ScrollHeight { get; private set; }\r\n\r\n            public ScrollPositionChangedEventAgrs(double currentPosition,\r\n                double scrollHeight)\r\n            {\r\n                CurrentPosition = currentPosition;\r\n                ScrollHeight = scrollHeight;\r\n            }\r\n        }\r\n\r\n        public event EventHandler<ScrollingStateChangedEventArgs> ScrollStateChanged;\r\n\r\n        public event EventHandler<ScrollPositionChangedEventAgrs> ScrollPositionChanged;\r\n\r\n        private double _previousScrollOffset = 0;\r\n        private DateTime _previousScrollOffsetChangedTime = DateTime.MinValue;\r\n        private const double PixelsPerSecondThreshold = 200;\r\n\r\n        private void OnListVerticalOffsetChanged()\r\n        {\r\n            if (_notReactToScroll) return;\r\n\r\n            if (!_changingVerticalOffset)\r\n            {\r\n\r\n                var w = new Stopwatch();\r\n                w.Start();\r\n                PerformLoadUnload(true);\r\n                w.Stop();\r\n\r\n                Log(\"LOADUNLOAD performed in \" + w.ElapsedMilliseconds);\r\n\r\n                if (ScrollPositionChanged != null)\r\n                {\r\n                    ScrollPositionChanged(this, new ScrollPositionChangedEventAgrs(\r\n                        _scrollViewer.VerticalOffset,\r\n                        Height));\r\n                }\r\n\r\n                Log(\"Reported Offset: \" + _scrollViewer.VerticalOffset);\r\n            }\r\n        }\r\n\r\n        private bool DetermineIfScrollingIsFast()\r\n        {\r\n            var now = DateTime.Now;\r\n            var result = false;\r\n            if (_previousScrollOffsetChangedTime != DateTime.Now)\r\n            {\r\n                var scrolledPixels = Math.Abs(_scrollViewer.VerticalOffset - _previousScrollOffset);\r\n                var timeInSeconds = (now - _previousScrollOffsetChangedTime).TotalSeconds;\r\n\r\n                if (scrolledPixels != 0)\r\n                {\r\n                    var speedPixelsPerSecond = scrolledPixels / timeInSeconds;\r\n                    Log(String.Format(\"Speed of scroll {0} \", speedPixelsPerSecond));\r\n\r\n                    if (speedPixelsPerSecond > PixelsPerSecondThreshold)\r\n                    {\r\n                        result = true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            _previousScrollOffsetChangedTime = now;\r\n            _previousScrollOffset = _scrollViewer.VerticalOffset;\r\n            return result;\r\n        }\r\n\r\n        private readonly List<VListItemBase> _virtItems = new List<VListItemBase>();\r\n\r\n        // indexes of loaded items\r\n        private Segment _loadedSegment = new Segment();\r\n\r\n        // maps a point to its index in _virtItems\r\n        // covers only points 0, LoadUnloadThreshold, 2*LoadUnloadThreshold, etc\r\n        private readonly Dictionary<int, int> _thresholdPointIndexes = new Dictionary<int, int>();\r\n\r\n\r\n        // do not change through this property\r\n        public List<VListItemBase> VirtItems\r\n        {\r\n            get { return _virtItems; }\r\n        }\r\n\r\n        public MyVirtualizingPanel()\r\n        {\r\n            Loaded += MyVirtualizingPanel_Loaded;\r\n        }\r\n\r\n        void MyVirtualizingPanel_Loaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!DesignerProperties.GetIsInDesignMode(this))\r\n            {\r\n                // Visual States are always on the first child of the control template \r\n                FrameworkElement element = VisualTreeHelper.GetChild(_scrollViewer, 0) as FrameworkElement;\r\n                if (element != null)\r\n                {\r\n                    VisualStateGroup group = FindVisualState(element, \"ScrollStates\");\r\n                    if (group != null)\r\n                    {\r\n                        group.CurrentStateChanging += group_CurrentStateChanging;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void AddItems(IEnumerable<VListItemBase> _itemsToBeAdded)\r\n        {\r\n            var sw = new Stopwatch();\r\n            sw.Start();\r\n\r\n            double topMargin = 0;\r\n\r\n            if (_virtItems.Count > 0)\r\n            {\r\n                topMargin = _virtItems.Sum(vi => vi.FixedHeight);\r\n            }\r\n\r\n            foreach (var itemToBeAdded in _itemsToBeAdded)\r\n            {\r\n#if USE_CANVAS_TOP\r\n                itemToBeAdded.View.Margin = new Thickness(itemToBeAdded.Margin.Left, itemToBeAdded.Margin.Top, itemToBeAdded.Margin.Right, itemToBeAdded.Margin.Bottom);\r\n                Canvas.SetTop(itemToBeAdded.View, topMargin);\r\n                //Debug.WriteLine(itemToBeAdded.View.Margin + \" top_margin=\" + topMargin);\r\n#else\r\n                itemToBeAdded.View.Margin = new Thickness(itemToBeAdded.Margin.Left, itemToBeAdded.Margin.Top + topMargin, itemToBeAdded.Margin.Right, itemToBeAdded.Margin.Bottom);\r\n                //Debug.WriteLine(itemToBeAdded.View.Margin + \" top_margin=\" + topMargin);\r\n#endif\r\n\r\n                _virtItems.Add(itemToBeAdded);\r\n\r\n                var itemHeightIncludingMargin = itemToBeAdded.FixedHeight;\r\n\r\n                List<int> coveredPoints = GetCoveredPoints(topMargin, topMargin + itemHeightIncludingMargin);\r\n\r\n                foreach (var coveredPoint in coveredPoints)\r\n                {\r\n                    _thresholdPointIndexes[coveredPoint] = _virtItems.Count - 1; // index of the last\r\n                    //Debug.WriteLine(\" thresholdPointIndexes[{0}]={1}\", coveredPoint, _virtItems.Count - 1);\r\n                }\r\n\r\n                topMargin += itemHeightIncludingMargin;\r\n            }\r\n\r\n            PerformLoadUnload(true);\r\n\r\n            Height = topMargin;\r\n\r\n            sw.Stop();\r\n\r\n            Log(String.Format(\"MyVirtualizingPanel.AddItems {0}\", sw.ElapsedMilliseconds));\r\n        }\r\n\r\n\r\n        public void InsertRemoveItems(int index, List<VListItemBase> itemsToInsert, bool keepItemsBelowIndexFixed = false, VListItemBase itemToRemove = null)\r\n        {\r\n            bool needToAdjustScrollPositionAfterInsertion = false;\r\n\r\n            if (keepItemsBelowIndexFixed)\r\n            {\r\n                double totalHeightOfAllItemsBeforeIndex = 0;\r\n\r\n                for (int i = 0; i < index; i++)\r\n                {\r\n                    totalHeightOfAllItemsBeforeIndex += VirtItems[i].FixedHeight + VirtItems[i].Margin.Top + VirtItems[i].Margin.Bottom;\r\n                }\r\n\r\n                if (totalHeightOfAllItemsBeforeIndex < _scrollViewer.VerticalOffset + _scrollViewer.ViewportHeight)\r\n                {\r\n                    needToAdjustScrollPositionAfterInsertion = true;\r\n                }\r\n            }\r\n\r\n            //  UnloadItemsInSegment(_loadedSegment);\r\n            _loadedSegment = new Segment();\r\n\r\n            var totalHeight = itemsToInsert.Sum(i => i.FixedHeight + i.Margin.Top + i.Margin.Bottom);\r\n\r\n            _virtItems.InsertRange(index, itemsToInsert);\r\n\r\n            if (itemToRemove != null)\r\n            {\r\n                itemToRemove.IsVLoaded = false;\r\n                totalHeight -= itemToRemove.FixedHeight + itemToRemove.Margin.Top + itemToRemove.Margin.Bottom;\r\n                _virtItems.Remove(itemToRemove);\r\n            }\r\n\r\n\r\n            RearrangeAllItems();\r\n\r\n\r\n            if (needToAdjustScrollPositionAfterInsertion)\r\n            {\r\n                _changingVerticalOffset = true;\r\n                //Debug.WriteLine(\"SCROLLING TO \" + _scrollViewer.VerticalOffset + totalHeight + \" scroll height : \" + _scrollViewer.ExtentHeight);\r\n                _scrollViewer.ScrollToVerticalOffset(_scrollViewer.VerticalOffset + totalHeight);\r\n                _changingVerticalOffset = false;\r\n            }\r\n\r\n            PerformLoadUnload(true);\r\n        }\r\n\r\n        public void RemoveItem(VListItemBase itemToBeRemoved)\r\n        {\r\n            itemToBeRemoved.IsVLoaded = false;\r\n\r\n\r\n            _virtItems.Remove(itemToBeRemoved);\r\n            _loadedSegment = new Segment();\r\n            RearrangeAllItems();\r\n\r\n            PerformLoadUnload(true);\r\n        }\r\n\r\n        private void RearrangeAllItems()\r\n        {\r\n            double topMargin = 0;\r\n            _thresholdPointIndexes.Clear();\r\n            int ind = 0;\r\n            foreach (var item in _virtItems)\r\n            {\r\n#if USE_CANVAS_TOP\r\n                item.View.Margin = new Thickness(item.Margin.Left, item.Margin.Top, item.Margin.Right, item.Margin.Bottom);\r\n                Canvas.SetTop(item.View, topMargin);\r\n#else\r\n                item.View.Margin = new Thickness(item.Margin.Left, item.Margin.Top + topMargin, item.Margin.Right, item.Margin.Bottom);\r\n#endif\r\n\r\n                var itemHeightIncludingMargin = item.FixedHeight + item.Margin.Top + item.Margin.Bottom;\r\n\r\n                List<int> coveredPoints = GetCoveredPoints(topMargin, topMargin + itemHeightIncludingMargin);\r\n\r\n                foreach (var coveredPoint in coveredPoints)\r\n                {\r\n                    _thresholdPointIndexes[coveredPoint] = ind; // index of the last\r\n                }\r\n\r\n                topMargin += itemHeightIncludingMargin;\r\n                ind++;\r\n            }\r\n\r\n            Height = topMargin;\r\n            _scrollViewer.UpdateLayout();\r\n        }\r\n\r\n        private void PerformLoadUnload2(bool isToLoad, bool bypassUnload = false)\r\n        {\r\n            if (_virtItems.Count == 0)\r\n                return;\r\n\r\n            double currentOffset = GetRealOffset();\r\n\r\n            int lowestLoadedInd = 0;\r\n            int upperInd = 0;\r\n\r\n            bool triggerLoading = false;\r\n\r\n            if (isToLoad || _loadedSegment.IsEmpty)\r\n            {\r\n                triggerLoading = true;\r\n            }\r\n            else\r\n            {\r\n                lowestLoadedInd = _loadedSegment.LowerBound;\r\n                upperInd = _loadedSegment.UpperBound;\r\n\r\n#if USE_CANVAS_TOP\r\n                var top = Canvas.GetTop(_virtItems[lowestLoadedInd].View);\r\n                double topPoint = top + _virtItems[lowestLoadedInd].View.Margin.Top;\r\n\r\n                top = Canvas.GetTop(_virtItems[upperInd].View);\r\n                double bottomPoint = top + _virtItems[upperInd].View.Margin.Top + _virtItems[upperInd].FixedHeight;\r\n#else\r\n                double topPoint = _virtItems[lowestLoadedInd].View.Margin.Top;\r\n                double bottomPoint = _virtItems[upperInd].View.Margin.Top + _virtItems[upperInd].FixedHeight;\r\n#endif\r\n                if (currentOffset - topPoint < 500 ||\r\n                    bottomPoint - currentOffset < 1500)\r\n                {\r\n                    triggerLoading = true;\r\n                }\r\n            }\r\n\r\n            if (triggerLoading)\r\n            {\r\n                if (_scrollViewer.ExtentHeight < 3000 && _isScrolling)\r\n                {\r\n                    //Debug.WriteLine(\"Detected short scroll; loading all items\");\r\n                    // otherwise there are glitches in scrolling\r\n                    lowestLoadedInd = 0;\r\n                    upperInd = VirtItems.Count - 1;\r\n                    isToLoad = true;\r\n                }\r\n                else\r\n                {\r\n                    var threshold = (int)Math.Floor((currentOffset - (currentOffset % LoadUnloadThreshold)));\r\n\r\n                    int indexOfBaseItem = _thresholdPointIndexes.ContainsKey(threshold) ? _thresholdPointIndexes[threshold] : -1;\r\n\r\n                    lowestLoadedInd = upperInd = indexOfBaseItem < 0 ? 0 : indexOfBaseItem;\r\n\r\n                    double loadUpwards = LoadedHeightUpwards;\r\n                    double loadDownwards = _isScrolling ? LoadedHeightDownwards : LoadedHeightDownwardsNotScrolling;\r\n\r\n                    //if (_isScrolling)\r\n                    //{\r\n                    //    loadUpwards = LoadUpwardsWhenScrolling;\r\n                    //    loadDownwards = LoadDownwardsWhenScrolling;\r\n                    //}\r\n\r\n                    // count up from the lower point on view\r\n\r\n#if USE_CANVAS_TOP\r\n                    while (lowestLoadedInd > 0 && currentOffset - (Canvas.GetTop(_virtItems[lowestLoadedInd].View) + _virtItems[lowestLoadedInd].View.Margin.Top) < loadUpwards)\r\n                    {\r\n                        lowestLoadedInd--;\r\n                    }\r\n\r\n                    while (upperInd < _virtItems.Count - 1 && (Canvas.GetTop(_virtItems[upperInd].View) + _virtItems[upperInd].View.Margin.Top) - currentOffset < loadDownwards)\r\n                    {\r\n                        upperInd++;\r\n                    }\r\n#else\r\n                    while (lowestLoadedInd > 0 && currentOffset - (_virtItems[lowestLoadedInd].View.Margin.Top) < loadUpwards)\r\n                    {\r\n                        lowestLoadedInd--;\r\n                    }\r\n\r\n                    while (upperInd < _virtItems.Count - 1 && _virtItems[upperInd].View.Margin.Top - currentOffset < loadDownwards)\r\n                    {\r\n                        upperInd++;\r\n                    }\r\n#endif\r\n                }\r\n\r\n                SetLoadedBounds(lowestLoadedInd, upperInd, isToLoad, bypassUnload);\r\n\r\n\r\n                if (IsLogEnabled)\r\n                {\r\n                    string loadedIndexes = \"Loaded indexes : \";\r\n                    for (int i = 0; i < _virtItems.Count; i++)\r\n                    {\r\n                        if (_virtItems[i].IsVLoaded)\r\n                        {\r\n                            loadedIndexes += i + \",\";\r\n                        }\r\n                    }\r\n\r\n                    Log(loadedIndexes);\r\n                }\r\n            }\r\n\r\n        }\r\n\r\n        public double DeltaOffset\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        private double GetRealOffset()\r\n        {\r\n            //// it might throw exception\r\n            //try\r\n            //{\r\n            //    GeneralTransform childTransform = this.TransformToVisual(_listScrollViewer);\r\n\r\n            //    var p = childTransform.Transform(new Point(0, 0));\r\n\r\n            //    var delta = p.Y;\r\n            //    Debug.WriteLine(\"DELTA offset =\" + delta + \"; VerticalOffset=\" + _listScrollViewer.VerticalOffset);\r\n\r\n            //    return -delta;\r\n            //}\r\n            //catch (Exception exc)\r\n            //{\r\n            //    return _listScrollViewer.VerticalOffset;\r\n            //}\r\n\r\n            return _scrollViewer.VerticalOffset + DeltaOffset;\r\n        }\r\n\r\n        private void PerformLoadUnload(bool isToLoad)\r\n        {\r\n            PerformLoadUnload2(isToLoad);\r\n        }\r\n\r\n        private void SetLoadedBounds(int lowerBoundInd, int upperBoundInd, bool isToLoad, bool bypassUnload = false)\r\n        {\r\n            var newLoadedSegment = new Segment(lowerBoundInd, upperBoundInd);\r\n\r\n            Segment newMinusLoaded1;\r\n            Segment newMinusLoaded2;\r\n            Segment intersection;\r\n            Segment loadedMinusNew1;\r\n            Segment loadedMinusNew2;\r\n\r\n            newLoadedSegment.CompareToSegment(_loadedSegment,\r\n                out newMinusLoaded1,\r\n                out newMinusLoaded2,\r\n                out intersection,\r\n                out loadedMinusNew1,\r\n                out loadedMinusNew2);\r\n\r\n\r\n            Log(String.Format(\"LoadedSegment:{0}, NewSegment:{1}, NewMinusLoaded1:{2}, NewMinusLoaded2:{3}, loadedMinusNew1:{4}, loadedMinusNew2:{5}\",\r\n                _loadedSegment,\r\n                newLoadedSegment,\r\n                newMinusLoaded1,\r\n                newMinusLoaded2,\r\n                loadedMinusNew1,\r\n                loadedMinusNew2));\r\n\r\n            if (isToLoad)\r\n            {\r\n                // ensure items are loaded fully for the whole segment\r\n                LoadItemsInSegment(newLoadedSegment);\r\n            }\r\n\r\n            if (!bypassUnload)\r\n            {\r\n                UnloadItemsInSegment(loadedMinusNew1);\r\n                UnloadItemsInSegment(loadedMinusNew2);\r\n            }\r\n            _loadedSegment = newLoadedSegment;\r\n\r\n        }\r\n\r\n        private void UnloadItemsInSegment(Segment segment)\r\n        {\r\n            for (int i = segment.LowerBound; i <= segment.UpperBound; i++)\r\n            {\r\n                var item = _virtItems[i];\r\n\r\n                Children.Remove(item.View);\r\n\r\n                item.IsVLoaded = false;\r\n            }\r\n        }\r\n\r\n        private void LoadItemsInSegment(Segment segment)\r\n        {\r\n            for (int i = segment.LowerBound; i <= segment.UpperBound; i++)\r\n            {\r\n                var item = _virtItems[i];\r\n\r\n                item.IsVLoaded = true;\r\n\r\n                if (!Children.Contains(item.View))\r\n                {\r\n                    Children.Add(item.View);\r\n                }\r\n            }\r\n        }\r\n\r\n        private List<int> GetCoveredPoints(double from, double to)\r\n        {\r\n            var result = new List<int>();\r\n\r\n            var candidate = from - (from % LoadUnloadThreshold);\r\n\r\n            while (candidate <= to)\r\n            {\r\n                if (candidate >= from)\r\n                {\r\n                    result.Add((int)Math.Floor(candidate));\r\n                }\r\n                candidate += LoadUnloadThreshold;\r\n            }\r\n\r\n            //Debug.WriteLine(\"GetCoveredPoints from={0} to={1} result={2}\", from, to, string.Join(\",\", result));\r\n\r\n            return result;\r\n        }\r\n\r\n        public void ClearItems()\r\n        {\r\n            _virtItems.Clear();\r\n            Children.Clear();\r\n            _loadedSegment = new Segment();\r\n            _thresholdPointIndexes.Clear();\r\n            _scrollViewer.ScrollToVerticalOffset(0);\r\n            Height = 0;\r\n        }\r\n\r\n        private double _offset;\r\n\r\n        public void DisableVerticalScrolling()\r\n        {\r\n            if (_scrollViewer.VerticalScrollBarVisibility == ScrollBarVisibility.Auto)\r\n            {\r\n                _offset = _scrollViewer.VerticalOffset;\r\n                _scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;\r\n                foreach (var virtItem in _virtItems)\r\n                {\r\n                    {\r\n                        Canvas.SetTop(virtItem.View, Canvas.GetTop(virtItem.View) - _offset);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void EnableVerticalScrolling()\r\n        {\r\n            if (_scrollViewer.VerticalScrollBarVisibility == ScrollBarVisibility.Disabled)\r\n            {\r\n                foreach (var virtItem in _virtItems)\r\n                {\r\n                    Canvas.SetTop(virtItem.View, Canvas.GetTop(virtItem.View) + _offset);\r\n                }\r\n                _scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/EmojiPanel/Controls/Utilities/VListItemBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing Telegram.EmojiPanel.Controls.Utilites;\r\n\r\nnamespace Telegram.Controls.VirtualizedView\r\n{\r\n    public abstract class VListItemBase\r\n    {\r\n        private readonly List<FrameworkElement> _children = new List<FrameworkElement>();\r\n\r\n        public MyListItemBase View { get; private set; }\r\n\r\n        public List<FrameworkElement> Children\r\n        {\r\n            get { return _children; }\r\n        }\r\n\r\n        protected VListItemBase()\r\n        {\r\n            View = new MyListItemBase\r\n            {\r\n                VirtSource = this,\r\n                Width = 440\r\n            };\r\n        }\r\n        public abstract double FixedHeight { get; set; }\r\n\r\n        public Thickness Margin = new Thickness();\r\n\r\n        public virtual object ItemSource { get; set; }\r\n\r\n        private bool _isVLoaded;\r\n\r\n        public bool IsVLoaded\r\n        {\r\n            get { return _isVLoaded; }\r\n            set\r\n            {\r\n                if (value != IsVLoaded)\r\n                {\r\n                    if (value) Load();\r\n                    else Unload();\r\n                }\r\n                _isVLoaded = value;\r\n            }\r\n        }\r\n\r\n        public virtual void Load()\r\n        {\r\n            if (View.Children.Count == 0)\r\n                foreach (var child in _children)\r\n                    View.Children.Add(child);\r\n        }\r\n\r\n        public virtual void Unload()\r\n        {\r\n            View.Children.Clear();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/EmojiPanel/Controls/Utilities/VirtSegment.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace Telegram.EmojiPanel.Controls.Utilites\r\n{\r\n    public class Segment\r\n    {\r\n        public int LowerBound { get; private set; }\r\n        public int UpperBound { get; private set; }\r\n\r\n        public bool IsEmpty { get { return UpperBound < LowerBound; } }\r\n\r\n        public Segment(int lowerBound, int upperBound)\r\n        {\r\n            LowerBound = lowerBound;\r\n            UpperBound = upperBound;\r\n        }\r\n\r\n        public Segment()\r\n            : this(0, -1)\r\n        {\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            if (IsEmpty) return \"[]\";\r\n            return String.Format(\"[{0},{1}]\", LowerBound, UpperBound);\r\n        }\r\n\r\n        public void CompareToSegment(\r\n            Segment otherSegment,\r\n            out Segment thisMinusOther1,\r\n            out Segment thisMinusOther2,\r\n            out Segment intersection,\r\n            out Segment otherMinusThis1,\r\n            out Segment otherMinusThis2)\r\n        {\r\n\r\n            thisMinusOther1 = new Segment();\r\n            thisMinusOther2 = new Segment();\r\n            intersection = new Segment();\r\n            otherMinusThis1 = new Segment();\r\n            otherMinusThis2 = new Segment();\r\n\r\n\r\n            if (this.IsEmpty)\r\n            {\r\n                otherMinusThis1 = otherSegment;\r\n                return;\r\n            }\r\n\r\n            if (otherSegment.IsEmpty)\r\n            {\r\n                thisMinusOther1 = this;\r\n                return;\r\n            }\r\n\r\n            if (this.UpperBound < otherSegment.LowerBound)\r\n            {\r\n\r\n                // do not intersect\r\n\r\n                thisMinusOther1 = this;\r\n\r\n                otherMinusThis1 = otherSegment;\r\n\r\n                return;\r\n            }\r\n\r\n\r\n            if (this.LowerBound < otherSegment.LowerBound &&\r\n                this.UpperBound >= otherSegment.LowerBound &&\r\n                this.UpperBound <= otherSegment.UpperBound)\r\n            {\r\n                thisMinusOther1 = new Segment(this.LowerBound, otherSegment.LowerBound - 1);\r\n                intersection = new Segment(otherSegment.LowerBound, this.UpperBound);\r\n                otherMinusThis1 = new Segment(this.UpperBound + 1, otherSegment.UpperBound);\r\n                return;\r\n            }\r\n\r\n            if (this.LowerBound >= otherSegment.LowerBound &&\r\n                this.UpperBound <= otherSegment.UpperBound)\r\n            {\r\n                intersection = this;\r\n                otherMinusThis1 = new Segment(otherSegment.LowerBound, this.LowerBound - 1);\r\n                otherMinusThis2 = new Segment(this.UpperBound + 1, otherSegment.UpperBound);\r\n                return;\r\n            }\r\n\r\n            otherSegment.CompareToSegment(this,\r\n                out otherMinusThis1,\r\n                out otherMinusThis2,\r\n                out intersection,\r\n                out thisMinusOther1,\r\n                out thisMinusOther2);\r\n\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/EventArgs/UpdateChatTitleEventArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.EventArgs\r\n{\r\n    public class UpdateChatTitleEventArgs\r\n    {\r\n        public TLChatBase Chat { get; set; }\r\n\r\n        public string Title { get; set; }\r\n\r\n        public UpdateChatTitleEventArgs(TLChatBase chat, string title)\r\n        {\r\n            Chat = chat;\r\n            Title = title;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Extensions/ApplicationExtensions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing Microsoft.Phone.Controls;\r\n\r\nnamespace TelegramClient.Extensions\r\n{\r\n    public enum Theme\r\n    {\r\n        Light,\r\n        Dark\r\n    }\r\n\r\n    public static class ApplicationExtensions\r\n    {\r\n        private static readonly string PhoneLightThemeVisibility = \"PhoneLightThemeVisibility\";\r\n\r\n        private static bool _listeningToNavEvents;\r\n        private static bool _isNavigating;\r\n\r\n        public static Theme GetTheme(this Application application)\r\n        {\r\n            var visibility = (Visibility)Application.Current.Resources[PhoneLightThemeVisibility];\r\n            return (visibility == Visibility.Visible) ? Theme.Light : Theme.Dark;\r\n        }\r\n\r\n        public static bool IsDesignTime(this Application application)\r\n        {\r\n            return DesignerProperties.GetIsInDesignMode(Application.Current.RootVisual);\r\n        }\r\n\r\n        public static void GoBack(this Application application)\r\n        {\r\n            var frame = application.RootVisual as PhoneApplicationFrame;\r\n            EnsureListeningToNaviation(frame);\r\n\r\n            if (frame == null)\r\n                return;\r\n            else if (_isNavigating)\r\n                return;\r\n            else if (frame.CanGoBack)\r\n                frame.GoBack(); \r\n        }\r\n\r\n        public static void GoForward(this Application application)\r\n        {\r\n            var frame = application.RootVisual as PhoneApplicationFrame;\r\n            EnsureListeningToNaviation(frame);\r\n\r\n            if (frame == null)\r\n                return;\r\n            else if (_isNavigating)\r\n                return;\r\n            else if (frame.CanGoForward)\r\n                frame.GoForward();\r\n        }\r\n\r\n        public static void Navigate(this Application application, Uri uri)\r\n        {\r\n            var frame = application.RootVisual as PhoneApplicationFrame;\r\n            EnsureListeningToNaviation(frame);\r\n\r\n            //System.Diagnostics.Debug.WriteLine(string.Format(\"Navigating in App Extension. Frame Content: {0}, Current Source: {1}, Target: {2}, IsNavigating: {3}\", frame.Content.GetType().ToString(), frame.CurrentSource, uri, _isNavigating));\r\n\r\n            if (frame == null)\r\n                return;\r\n            if (uri == null)\r\n                return;\r\n            if (uri.OriginalString == frame.CurrentSource.OriginalString)\r\n                return;\r\n            if (_isNavigating)\r\n            {\r\n                //System.Diagnostics.Debug.WriteLine(\"Cancelling nav b/c we're currently navigating\");\r\n                return;\r\n            }\r\n            else\r\n            {\r\n                //System.Diagnostics.Debug.WriteLine(\"Calling frame.nav\");\r\n                frame.Navigate(uri);\r\n            }\r\n        }\r\n\r\n        public static void Navigate(this Application application, string uri)\r\n        {\r\n            Navigate(application, new Uri(uri, UriKind.Relative));\r\n        }\r\n\r\n        public static void Navigate(this Application application, string uri, object context)\r\n        {\r\n            FrameworkElement root = Application.Current.RootVisual as FrameworkElement;\r\n            root.DataContext = context;\r\n            Navigate(application, new Uri(uri, UriKind.Relative));\r\n        }\r\n\r\n        public static void Navigate(this Application application, Uri uri, object context)\r\n        {\r\n            FrameworkElement root = Application.Current.RootVisual as FrameworkElement;\r\n            root.DataContext = context;\r\n            Navigate(application, uri);\r\n        }\r\n\r\n        private static void EnsureListeningToNaviation(PhoneApplicationFrame frame)\r\n        {\r\n            if (!_listeningToNavEvents)\r\n            {\r\n                frame.Navigating += (sender, e) => _isNavigating = true;\r\n                frame.Navigated += (sender, e) => _isNavigating = false;\r\n                frame.NavigationStopped += (sender, e) => _isNavigating = false;\r\n                frame.NavigationFailed += (sender, e) => _isNavigating = false;\r\n                _listeningToNavEvents = true;\r\n            }\r\n        }\r\n\r\n        public static PhoneApplicationPage GetActivePage(this Application application)\r\n        {\r\n            PhoneApplicationPage content = null;\r\n            if (application != null)\r\n            {\r\n                PhoneApplicationFrame rootVisual = application.RootVisual as PhoneApplicationFrame;\r\n                if (rootVisual != null)\r\n                {\r\n                    content = rootVisual.Content as PhoneApplicationPage;\r\n                }\r\n            }\r\n            return content;\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Returns the first instance of a type implementing T from the Application's \r\n        /// ApplicationLifetimeObjects list, or null if one cannot be found.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The service's type.</typeparam>\r\n        /// <param name=\"application\"></param>\r\n        public static T GetService<T>(this Application application)\r\n        {\r\n            return application.ApplicationLifetimeObjects.OfType<T>().FirstOrDefault();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Extensions/CollectionExtensions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System;\r\nusing System.Reflection;\r\nusing System.Linq;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace TelegramClient.Extensions\r\n{\r\n    public static class CollectionExtensions\r\n    {\r\n\r\n\r\n        public static Collection<T> ToCollection<T>(this IEnumerable<T> enumerable)\r\n        {\r\n            var col1 = new Collection<T>();\r\n\r\n            foreach (var item in enumerable)\r\n            {\r\n                col1.Add(item);\r\n            }\r\n\r\n            return col1;\r\n        }\r\n\r\n\r\n        public static ICollection<T> AddRange<T>(this ICollection<T> collection, IEnumerable items, int maxCount = 0)\r\n        {\r\n            var count = 0;\r\n\r\n            foreach (var item in items.Cast<T>())\r\n            {\r\n                collection.Add(item);\r\n                count++;\r\n                if (maxCount != 0 && count == maxCount) break;\r\n            }\r\n\r\n            return collection;\r\n        }\r\n\r\n        public static Collection<T> ReplaceAll<T>(this Collection<T> collection, IEnumerable<T> items)\r\n        {\r\n            collection.Clear();\r\n            collection.AddRange(items);\r\n\r\n            return collection;\r\n        }\r\n\r\n        #region IEnumerable Extensions \r\n        public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> source)\r\n        {\r\n            ObservableCollection<T> result = new ObservableCollection<T>();\r\n\r\n            foreach (T item in source)\r\n                result.Add(item);\r\n\r\n            return result;\r\n        }\r\n\r\n        public static void ForEach<T>(this IEnumerable<T> source, Action<T> action)\r\n        {\r\n            foreach (var item in source)\r\n                action(item);\r\n        }\r\n\r\n        public static IEnumerable<T> OrderBy<T>(this IEnumerable<T> list, string sortExpression)\r\n        {\r\n            sortExpression += \"\";\r\n            string[] parts = sortExpression.Split(' ');\r\n            bool descending = false;\r\n            string property = \"\";\r\n\r\n            if (parts.Length > 0 && parts[0] != \"\")\r\n            {\r\n                property = parts[0];\r\n\r\n                if (parts.Length > 1)\r\n                {\r\n                    descending = parts[1].ToLower().Contains(\"esc\");\r\n                }\r\n\r\n                //PropertyInfo prop = typeof(T).GetProperty(property);\r\n                PropertyInfo prop = list.ElementAt(0).GetType().GetProperty(property);\r\n\r\n                if (prop == null)\r\n                {\r\n                    throw new Exception(\"No property '\" + property + \"' in + \" + typeof(T).Name + \"'\");\r\n                }\r\n\r\n                if (descending)\r\n                    return list.OrderByDescending(x => prop.GetValue(x, null));\r\n                else\r\n                    return list.OrderBy(x => prop.GetValue(x, null));\r\n            }\r\n\r\n            return list;\r\n        }\r\n\r\n         /// <summary>\r\n        /// Produces a sequence of items using a seed value and iteration \r\n        /// method.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"value\">The initial value.</param>\r\n        /// <param name=\"next\">The iteration function.</param>\r\n        /// <returns>A sequence of items using a seed value and iteration \r\n        /// method.</returns>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Used by at least one consumer of this class.\")]\r\n        public static IEnumerable<T> Iterate<T>(T value, Func<T, T> next)\r\n        {\r\n            do\r\n            {\r\n                yield return value;\r\n                value = next(value);\r\n            }\r\n            while (true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepend an item to a sequence.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"that\">The sequence to append the item to.</param>\r\n        /// <param name=\"value\">The item to append to the sequence.</param>\r\n        /// <returns>A new sequence.</returns>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Code is linked into multiple projects.\")]\r\n        public static IEnumerable<T> Prepend<T>(this IEnumerable<T> that, T value)\r\n        {\r\n            if (that == null)\r\n            {\r\n                throw new ArgumentNullException(\"that\");\r\n            }\r\n\r\n            yield return value;\r\n            foreach (T item in that)\r\n            {\r\n                yield return item;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Accepts two sequences and applies a function to the corresponding \r\n        /// values in the two sequences.\r\n        /// </summary>\r\n        /// <typeparam name=\"T0\">The type of the first sequence.</typeparam>\r\n        /// <typeparam name=\"T1\">The type of the second sequence.</typeparam>\r\n        /// <typeparam name=\"R\">The return type of the function.</typeparam>\r\n        /// <param name=\"enumerable0\">The first sequence.</param>\r\n        /// <param name=\"enumerable1\">The second sequence.</param>\r\n        /// <param name=\"func\">The function to apply to the corresponding values\r\n        /// from the two sequences.</param>\r\n        /// <returns>A sequence of transformed values from both sequences.</returns>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Code is linked into multiple projects.\")]\r\n        public static IEnumerable<R> Zip<T0, T1, R>(IEnumerable<T0> enumerable0, IEnumerable<T1> enumerable1, Func<T0, T1, R> func)\r\n        {\r\n            IEnumerator<T0> enumerator0 = enumerable0.GetEnumerator();\r\n            IEnumerator<T1> enumerator1 = enumerable1.GetEnumerator();\r\n            while (enumerator0.MoveNext() && enumerator1.MoveNext())\r\n            {\r\n                yield return func(enumerator0.Current, enumerator1.Current);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the maximum value in the stream based on the result of a\r\n        /// project function.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The stream type.</typeparam>\r\n        /// <param name=\"that\">The stream.</param>\r\n        /// <param name=\"projectionFunction\">The function that transforms the\r\n        /// item.</param>\r\n        /// <returns>The maximum value or null.</returns>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Used by at least one consumer of this class.\")]\r\n        public static T MaxOrNull<T>(this IEnumerable<T> that, Func<T, IComparable> projectionFunction)\r\n            where T : struct\r\n        {\r\n            IComparable result = null;\r\n            T maximum = default(T);\r\n            if (!that.Any())\r\n            {\r\n                return maximum;\r\n            }\r\n\r\n            maximum = that.First();\r\n            result = projectionFunction(maximum);\r\n            foreach (T item in that.Skip(1))\r\n            {\r\n                IComparable currentResult = projectionFunction(item);\r\n                if (result.CompareTo(currentResult) < 0)\r\n                {\r\n                    result = currentResult;\r\n                    maximum = item;\r\n                }\r\n            }\r\n\r\n            return maximum;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the maximum value or null if sequence is empty.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"that\">The sequence to retrieve the maximum value from.\r\n        /// </param>\r\n        /// <returns>The maximum value or null.</returns>\r\n        public static T? MaxOrNullable<T>(this IEnumerable<T> that)\r\n            where T : struct, IComparable\r\n        {\r\n            if (!that.Any())\r\n            {\r\n                return null;\r\n            }\r\n            return that.Max();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the minimum value or null if sequence is empty.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"that\">The sequence to retrieve the minimum value from.\r\n        /// </param>\r\n        /// <returns>The minimum value or null.</returns>\r\n        public static T? MinOrNullable<T>(this IEnumerable<T> that)\r\n            where T : struct, IComparable\r\n        {\r\n            if (!that.Any())\r\n            {\r\n                return null;\r\n            }\r\n            return that.Min();\r\n        }\r\n  \r\n        #endregion\r\n\r\n        #region ObservableCollection Extensions\r\n        public static void AddRange<T>(this ObservableCollection<T> oc, IEnumerable<T> collection)\r\n        {\r\n            if (collection == null)\r\n            {\r\n                throw new ArgumentNullException(\"collection\");\r\n            }\r\n\r\n            foreach (var item in collection)\r\n            {\r\n                oc.Add(item);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public static int Remove<T>(this ICollection<T> collection, Func<T, bool> predicate)\r\n        {\r\n            var removals = collection.Where(predicate).ToList();\r\n            removals.ForEach(r => collection.Remove(r));\r\n            return removals.Count;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/Clip.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Helpers\r\n{\r\n    public class Clip\r\n    {\r\n        public static bool GetToBounds(DependencyObject depObj)\r\n        {\r\n            return (bool)depObj.GetValue(ToBoundsProperty);\r\n        }\r\n\r\n        public static void SetToBounds(DependencyObject depObj, bool clipToBounds)\r\n        {\r\n            depObj.SetValue(ToBoundsProperty, clipToBounds);\r\n        }\r\n\r\n        public static readonly DependencyProperty ToBoundsProperty =\r\n            DependencyProperty.RegisterAttached(\"ToBounds\", typeof(bool),\r\n            typeof(Clip), new PropertyMetadata(false, OnToBoundsPropertyChanged));\r\n\r\n\r\n        private static void OnToBoundsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var fe = d as FrameworkElement;\r\n            if (fe != null)\r\n            {\r\n                ClipToBounds(fe);\r\n\r\n                // whenever the element which this property is attached to is loaded\r\n                // or re-sizes, we need to update its clipping geometry\r\n                fe.Loaded += FrameworkElement_Loaded;\r\n                fe.SizeChanged += FrameworkElement_SizeChanged;\r\n\r\n            }\r\n        }\r\n\r\n        private static void ClipToBounds(FrameworkElement fe)\r\n        {\r\n            if (GetToBounds(fe))\r\n            {\r\n                fe.Clip = new RectangleGeometry\r\n                {\r\n                    Rect = new Rect(0, 0, fe.ActualWidth, fe.ActualHeight)\r\n                };\r\n            }\r\n            else\r\n            {\r\n                fe.Clip = null;\r\n            }\r\n        }\r\n\r\n        static void FrameworkElement_SizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            ClipToBounds(sender as FrameworkElement);\r\n        }\r\n\r\n        static void FrameworkElement_Loaded(object sender, RoutedEventArgs e)\r\n        {\r\n            ClipToBounds(sender as FrameworkElement);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/CollectionHelper.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Reflection;\r\nusing System;\r\nusing TelegramClient.Extensions;\r\n\r\nnamespace TelegramClient.Helpers\r\n{\r\n    /// <summary>\r\n    /// A set of extension methods for manipulating collections.\r\n    /// </summary>\r\n    /// <QualityBand>Experimental</QualityBand>\r\n    internal static class CollectionHelper\r\n    {\r\n        /// <summary>\r\n        /// Returns a value indicating whether a collection is read-only.\r\n        /// </summary>\r\n        /// <param name=\"collection\">The collection to examine.</param>\r\n        /// <returns>A value indicating whether a collection is read-only.</returns>\r\n        public static bool IsReadOnly(this IEnumerable collection)\r\n        {\r\n            return\r\n                collection.GetType().IsArray\r\n                    || CollectionExtensions\r\n                        .Iterate(collection.GetType(), type => type.BaseType)\r\n                        .TakeWhile(type => type != null)\r\n                        .Any(type => type.FullName.StartsWith(\"System.Collections.ObjectModel.ReadOnlyCollection`1\", StringComparison.Ordinal));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a value Indicating whether an item can be inserted in a \r\n        /// collection.\r\n        /// </summary>\r\n        /// <param name=\"collection\">The collection.</param>\r\n        /// <param name=\"item\">The item to be inserted.</param>\r\n        /// <returns>A value Indicating whether an item can be inserted in a \r\n        /// collection.</returns>\r\n        public static bool CanInsert(this IEnumerable collection, object item)\r\n        {\r\n            ICollectionView collectionView = collection as ICollectionView;\r\n            if (collectionView != null)\r\n            {\r\n                return CanInsert(collectionView.SourceCollection, item);\r\n            }\r\n\r\n            if (IsReadOnly(collection))\r\n            {\r\n                return false;\r\n            }\r\n\r\n            Type genericListType = collection.GetType().GetInterfaces().Where(interfaceType => interfaceType.FullName.StartsWith(\"System.Collections.Generic.IList`1\", StringComparison.Ordinal)).FirstOrDefault();\r\n            if (genericListType != null)\r\n            {\r\n                return genericListType.GetGenericArguments()[0] == item.GetType();\r\n            }\r\n\r\n            if (collection is IList)\r\n            {\r\n                return true;\r\n            }\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Inserts an item into the collection at an index.\r\n        /// </summary>\r\n        /// <param name=\"collection\">The collection.</param>\r\n        /// <param name=\"index\">The index at which to insert the item.</param> \r\n        /// <param name=\"item\">The item to be inserted.</param>\r\n        public static void Insert(this IEnumerable collection, int index, object item)\r\n        {\r\n            ICollectionView collectionView = collection as ICollectionView;\r\n            if (collectionView != null)\r\n            {\r\n                Insert(collectionView.SourceCollection, index, item);\r\n            }\r\n            else\r\n            {\r\n                Type genericListType = collection.GetType().GetInterfaces().Where(interfaceType => interfaceType.FullName.StartsWith(\"System.Collections.Generic.IList`1\", StringComparison.Ordinal)).FirstOrDefault();\r\n                if (genericListType != null)\r\n                {\r\n                    genericListType.GetMethod(\"Insert\").Invoke(collection, new object[] { index, item });\r\n                }\r\n                else\r\n                {\r\n                    IList list = collection as IList;\r\n                    list.Insert(index, item);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the number of items in the collection.\r\n        /// </summary>\r\n        /// <param name=\"collection\">The collection.</param>\r\n        /// <returns>The number of items in the collection.</returns>\r\n        public static int Count(this IEnumerable collection)\r\n        {\r\n            ICollectionView collectionView = collection as ICollectionView;\r\n            if (collectionView != null)\r\n            {\r\n                return collectionView.SourceCollection.Count();\r\n            }\r\n            else\r\n            {\r\n                Type genericListType = collection.GetType().GetInterfaces().Where(interfaceType => interfaceType.FullName.StartsWith(\"System.Collections.Generic.ICollection`1\", StringComparison.Ordinal)).FirstOrDefault();\r\n                if (genericListType != null)\r\n                {\r\n                    return (int)genericListType.GetProperty(\"Count\").GetValue(collection, new object[] { });\r\n                }\r\n\r\n                IList list = collection as IList;\r\n                if (list != null)\r\n                {\r\n                    return list.Count;\r\n                }\r\n\r\n                return System.Linq.Enumerable.Count(collection.OfType<object>());\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds an item to the collection.\r\n        /// </summary>\r\n        /// <param name=\"collection\">The collection.</param>\r\n        /// <param name=\"item\">The item to be added.</param>\r\n        public static void Add(this IEnumerable collection, object item)\r\n        {\r\n            ICollectionView collectionView = collection as ICollectionView;\r\n            if (collectionView != null)\r\n            {\r\n                Add(collectionView.SourceCollection, item);\r\n            }\r\n            else\r\n            {\r\n                PropertyInfo countProperty = collection.GetType().GetProperty(\"Count\");\r\n                int count = (int)countProperty.GetValue(collection, new object[] { });\r\n                Insert(collection, count, item);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes an item from the collection.\r\n        /// </summary>\r\n        /// <param name=\"collection\">The collection.</param>\r\n        /// <param name=\"item\">The item to be removed.</param>\r\n        public static void Remove(this IEnumerable collection, object item)\r\n        {\r\n            ICollectionView collectionView = collection as ICollectionView;\r\n            if (collectionView != null)\r\n            {\r\n                collectionView.SourceCollection.Remove(item);\r\n            }\r\n            else\r\n            {\r\n                Type genericListType = collection.GetType().GetInterfaces().Where(interfaceType => interfaceType.FullName.StartsWith(\"System.Collections.Generic.IList`1\", StringComparison.Ordinal)).FirstOrDefault();\r\n                if (genericListType != null)\r\n                {\r\n                    int index = (int)genericListType.GetMethod(\"IndexOf\").Invoke(collection, new object[] { item });\r\n                    if (index != -1)\r\n                    {\r\n                        genericListType.GetMethod(\"RemoveAt\").Invoke(collection, new object[] { index });\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    IList list = collection as IList;\r\n                    list.Remove(item);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes an item at a given index from the collection.\r\n        /// </summary>\r\n        /// <param name=\"collection\">The collection.</param>\r\n        /// <param name=\"index\">The index of the item to be removed.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Code is linked into multiple projects.\")]\r\n        public static void RemoveAt(this IEnumerable collection, int index)\r\n        {\r\n            ICollectionView collectionView = collection as ICollectionView;\r\n            if (collectionView != null)\r\n            {\r\n                collectionView.SourceCollection.RemoveAt(index);\r\n            }\r\n            else\r\n            {\r\n                Type genericListType = collection.GetType().GetInterfaces().Where(interfaceType => interfaceType.FullName.StartsWith(\"System.Collections.Generic.IList`1\", StringComparison.Ordinal)).FirstOrDefault();\r\n                if (genericListType != null)\r\n                {\r\n                    genericListType.GetMethod(\"RemoveAt\").Invoke(collection, new object[] { index });\r\n                }\r\n                else\r\n                {\r\n                    IList list = collection as IList;\r\n                    list.RemoveAt(index);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Helpers/Execute.cs",
    "content": "﻿using System;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Helpers\r\n{\r\n    public static class Execute\r\n    {\r\n        public static void BeginOnThreadPool(Action action)\r\n        {\r\n            ThreadPool.QueueUserWorkItem(state =>\r\n            {\r\n                try\r\n                {\r\n                    action.SafeInvoke();\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n                }\r\n            });\r\n        }\r\n\r\n        public static void BeginOnUIThread(Action action)\r\n        {\r\n            Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                try\r\n                {\r\n                    action.SafeInvoke();\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n                }\r\n            });\r\n        }\r\n\r\n        public static void ShowDebugMessage(string message)\r\n        {\r\n#if DEBUG\r\n            BeginOnUIThread(() => MessageBox.Show(message));\r\n#endif\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/ImageUtils.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Windows.Media.Imaging;\r\nusing Microsoft.Phone;\r\n\r\nnamespace TelegramClient.Helpers\r\n{\r\n    public static class ImageUtils\r\n    {\r\n        public static BitmapImage CreateImage(Stream stream)\r\n        {\r\n            BitmapImage imageSource;\r\n\r\n            try\r\n            {\r\n                stream.Seek(0, SeekOrigin.Begin);\r\n                var image = new BitmapImage();\r\n                image.SetSource(stream);\r\n                imageSource = image;\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return imageSource;\r\n        }\r\n        public static BitmapImage CreateImage(Stream stream, BitmapCreateOptions options)\r\n        {\r\n            BitmapImage imageSource;\r\n\r\n            try\r\n            {\r\n                stream.Seek(0, SeekOrigin.Begin);\r\n                var image = new BitmapImage();\r\n                image.CreateOptions = options;\r\n                image.SetSource(stream);\r\n                imageSource = image;\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return imageSource;\r\n        }\r\n\r\n        public static BitmapImage CreateImage(byte[] buffer)\r\n        {\r\n            BitmapImage imageSource;\r\n\r\n            try\r\n            {\r\n                using (var stream = new MemoryStream(buffer))\r\n                {\r\n                    stream.Seek(0, SeekOrigin.Begin);\r\n                    var image = new BitmapImage();\r\n                    image.SetSource(stream);\r\n                    imageSource = image;\r\n                }\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return imageSource;\r\n        }\r\n\r\n        public static BitmapImage CreateImage(byte[] buffer, BitmapCreateOptions options)\r\n        {\r\n            BitmapImage imageSource;\r\n\r\n            try\r\n            {\r\n                using (var stream = new MemoryStream(buffer))\r\n                {\r\n                    stream.Seek(0, SeekOrigin.Begin);\r\n                    var image = new BitmapImage();\r\n                    image.CreateOptions = options;\r\n                    image.SetSource(stream);\r\n                    imageSource = image;\r\n                }\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return imageSource;\r\n        }\r\n\r\n        public static byte[] CreateThumb(byte[] image, int rectangleSize, int targetQuality, out int targetHeight, out int targetWidth)\r\n        {\r\n            try\r\n            {\r\n                var stream = new MemoryStream(image);\r\n                var writeableBitmap = PictureDecoder.DecodeJpeg(stream);\r\n\r\n                var maxDimension = Math.Max(writeableBitmap.PixelWidth, writeableBitmap.PixelHeight);\r\n                var scale = (double)rectangleSize / maxDimension;\r\n                targetHeight = (int)(writeableBitmap.PixelHeight * scale);\r\n                targetWidth = (int)(writeableBitmap.PixelWidth * scale);\r\n\r\n                var outStream = new MemoryStream();\r\n                writeableBitmap.SaveJpeg(outStream, targetWidth, targetHeight, 0, targetQuality);\r\n\r\n                return outStream.ToArray();\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                targetWidth = 0;\r\n                targetHeight = 0;\r\n            }\r\n\r\n            return new byte[0];\r\n        }\r\n\r\n        private static UInt64 GetColors(uint value)\r\n        {\r\n            var p = BitConverter.GetBytes(value);\r\n\r\n            return p[0] + ((UInt64)p[1] << 16) + ((UInt64)p[2] << 32);\r\n        }\r\n\r\n        public static void FastBlur(this WriteableBitmap wb)\r\n        {\r\n            var pixels = new byte[wb.Pixels.Length * 4];\r\n            for (var j = 0; j < wb.Pixels.Length; j++)\r\n            {\r\n                pixels[j * 4] = (byte) wb.Pixels[j];                //r\r\n                pixels[j * 4 + 1] = (byte) (wb.Pixels[j] >> 8);     //g\r\n                pixels[j * 4 + 2] = (byte) (wb.Pixels[j] >> 16);    //b\r\n                pixels[j * 4 + 3] = (byte) (wb.Pixels[j] >> 24);    //a\r\n            }\r\n\r\n            const int sizeFull = 8100;\r\n            uint w = (uint) wb.PixelWidth;\r\n            uint h = (uint) wb.PixelHeight;\r\n            uint radius = 7;\r\n            uint stride = w*4;\r\n            uint r1 = radius + 1;\r\n            uint div = radius*2 + 1;\r\n            if (radius > 15 || div >= w || div >= h || w*h >= sizeFull)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var rgb = new ulong[sizeFull];\r\n\r\n            int x, y, i;\r\n\r\n            Int64 yw = 0;\r\n            Int64 we = w - r1;\r\n            for (y = 0; y < h; y++) \r\n            {\r\n                UInt64 cur = GetColors (pixels[yw]);\r\n                UInt64 rgballsum = unchecked((ulong) - radius * cur);\r\n                UInt64 rgbsum = cur * ((r1 * (r1 + 1)) >> 1);\r\n\r\n                for (i = 1; i <= radius; i++) \r\n                {\r\n                    cur = GetColors (pixels[yw + i * 4]);\r\n                    rgbsum += cur * (UInt64) (r1 - i);\r\n                    rgballsum += cur;\r\n                }\r\n\r\n                x = 0;\r\n\r\n                while (x < r1) {\r\n                    //update (0, x, x + r1);\r\n                    rgb[y * w + x] = (rgbsum >> 6) & 0x00FF00FF00FF00FF;\r\n                    rgballsum += (GetColors(pixels[yw + (0) * 4]) \r\n                        - 2 * GetColors(pixels[yw + (x) * 4]) \r\n                        + GetColors(pixels[yw + (x + r1) * 4]));\r\n                    rgbsum += rgballsum;\r\n                    x++;      \r\n                }\r\n                while (x < we) \r\n                {\r\n                    //update (x - r1, x, x + r1);\r\n                    rgb[y * w + x] = (rgbsum >> 6) & 0x00FF00FF00FF00FF;\r\n                    rgballsum += (GetColors(pixels[yw + (x - r1) * 4])\r\n                        - 2 * GetColors(pixels[yw + (x) * 4])\r\n                        + GetColors(pixels[yw + (x + r1) * 4]));\r\n                    rgbsum += rgballsum;\r\n                    x++;  \r\n                }\r\n                while (x < w) \r\n                {\r\n                    //update (x - r1, x, w - 1);\r\n                    rgb[y * w + x] = (rgbsum >> 6) & 0x00FF00FF00FF00FF;\r\n                    rgballsum += (GetColors(pixels[yw + (x - r1) * 4])\r\n                        - 2 * GetColors(pixels[yw + (x) * 4])\r\n                        + GetColors(pixels[yw + (w - 1) * 4]));\r\n                    rgbsum += rgballsum;\r\n                    x++;  \r\n                }\r\n\r\n                yw += stride;\r\n            }\r\n\r\n            uint he = h - r1;\r\n            for (x = 0; x < w; x++)\r\n            {\r\n                UInt64 rgballsum = unchecked ((ulong) -radius*rgb[x]);\r\n                UInt64 rgbsum = rgb[x]*((r1*(r1 + 1)) >> 1);\r\n                for (i = 1; i <= radius; i++)\r\n                {\r\n                    rgbsum += rgb[i*w + x]*(UInt64) (r1 - i);\r\n                    rgballsum += rgb[i*w + x];\r\n                }\r\n\r\n                y = 0;\r\n                int yi = x*4;        \r\n                                             \r\n                yi += (int)stride;\r\n\r\n                while (y < r1)\r\n                {\r\n                    //update(0, y, y + r1);\r\n                    UInt64 res = rgbsum >> 6;\r\n                    pixels[yi] = (byte)res;\r\n                    pixels[yi + 1] = (byte)(res >> 16);\r\n                    pixels[yi + 2] = (byte)(res >> 32);\r\n                    rgballsum += rgb[x + (0) * w]\r\n                        - 2 * rgb[x + (y) * w]\r\n                        + rgb[x + (y + r1) * w];\r\n                    rgbsum += rgballsum;\r\n                    y++;\r\n                }\r\n                while (y < he)\r\n                {\r\n                    //update(y - r1, y, y + r1);\r\n                    UInt64 res = rgbsum >> 6;\r\n                    pixels[yi] = (byte)res;\r\n                    pixels[yi + 1] = (byte)(res >> 16);\r\n                    pixels[yi + 2] = (byte)(res >> 32);\r\n                    rgballsum += rgb[x + (y - r1) * w]\r\n                        - 2 * rgb[x + (y) * w]\r\n                        + rgb[x + (y + r1) * w];\r\n                    rgbsum += rgballsum;\r\n                    y++;\r\n                }\r\n                while (y < h)\r\n                {\r\n                    //update(y - r1, y, h - 1);\r\n                    UInt64 res = rgbsum >> 6;\r\n                    pixels[yi] = (byte)res;\r\n                    pixels[yi + 1] = (byte)(res >> 16);\r\n                    pixels[yi + 2] = (byte)(res >> 32);\r\n                    rgballsum += rgb[x + (y - r1) * w]\r\n                        - 2 * rgb[x + (y) * w]\r\n                        + rgb[x + (h - 1) * w];\r\n                    rgbsum += rgballsum;\r\n                    y++;\r\n                }\r\n            }\r\n\r\n            for (var j = 0; j < wb.Pixels.Length; j++)\r\n            {\r\n                wb.Pixels[j] = pixels[j*4] | (pixels[j*4 + 1] << 8) | (pixels[j*4 + 2] << 16) | (pixels[j*4 + 3] << 24);\r\n            }\r\n        }\r\n\r\n        public static void BoxBlur(this WriteableBitmap bmp, int range)\r\n        {\r\n            if ((range & 1) == 0)\r\n            {\r\n                throw new InvalidOperationException(\"Range must be odd!\");\r\n            }\r\n\r\n            bmp.BoxBlurHorizontal(range);\r\n            bmp.BoxBlurVertical(range);\r\n        }\r\n\r\n        public static void BoxBlurHorizontal(this WriteableBitmap bmp, int range)\r\n        {\r\n            int[] pixels = bmp.Pixels;\r\n            int w = bmp.PixelWidth;\r\n            int h = bmp.PixelHeight;\r\n            int halfRange = range / 2;\r\n            int index = 0;\r\n            int[] newColors = new int[w];\r\n\r\n            for (int y = 0; y < h; y++)\r\n            {\r\n                int hits = 0;\r\n                int r = 0;\r\n                int g = 0;\r\n                int b = 0;\r\n                for (int x = -halfRange; x < w; x++)\r\n                {\r\n                    int oldPixel = x - halfRange - 1;\r\n                    if (oldPixel >= 0)\r\n                    {\r\n                        int col = pixels[index + oldPixel];\r\n                        if (col != 0)\r\n                        {\r\n                            r -= ((byte)(col >> 16));\r\n                            g -= ((byte)(col >> 8));\r\n                            b -= ((byte)col);\r\n                        }\r\n                        hits--;\r\n                    }\r\n\r\n                    int newPixel = x + halfRange;\r\n                    if (newPixel < w)\r\n                    {\r\n                        int col = pixels[index + newPixel];\r\n                        if (col != 0)\r\n                        {\r\n                            r += ((byte)(col >> 16));\r\n                            g += ((byte)(col >> 8));\r\n                            b += ((byte)col);\r\n                        }\r\n                        hits++;\r\n                    }\r\n\r\n                    if (x >= 0)\r\n                    {\r\n                        int color =\r\n                            (255 << 24)\r\n                            | ((byte)(r / hits) << 16)\r\n                            | ((byte)(g / hits) << 8)\r\n                            | ((byte)(b / hits));\r\n\r\n                        newColors[x] = color;\r\n                    }\r\n                }\r\n\r\n                for (int x = 0; x < w; x++)\r\n                {\r\n                    pixels[index + x] = newColors[x];\r\n                }\r\n\r\n                index += w;\r\n            }\r\n        }\r\n\r\n        public static void BoxBlurVertical(this WriteableBitmap bmp, int range)\r\n        {\r\n            int[] pixels = bmp.Pixels;\r\n            int w = bmp.PixelWidth;\r\n            int h = bmp.PixelHeight;\r\n            int halfRange = range / 2;\r\n\r\n            int[] newColors = new int[h];\r\n            int oldPixelOffset = -(halfRange + 1) * w;\r\n            int newPixelOffset = (halfRange) * w;\r\n\r\n            for (int x = 0; x < w; x++)\r\n            {\r\n                int hits = 0;\r\n                int r = 0;\r\n                int g = 0;\r\n                int b = 0;\r\n                int index = -halfRange * w + x;\r\n                for (int y = -halfRange; y < h; y++)\r\n                {\r\n                    int oldPixel = y - halfRange - 1;\r\n                    if (oldPixel >= 0)\r\n                    {\r\n                        int col = pixels[index + oldPixelOffset];\r\n                        if (col != 0)\r\n                        {\r\n                            r -= ((byte)(col >> 16));\r\n                            g -= ((byte)(col >> 8));\r\n                            b -= ((byte)col);\r\n                        }\r\n                        hits--;\r\n                    }\r\n\r\n                    int newPixel = y + halfRange;\r\n                    if (newPixel < h)\r\n                    {\r\n                        int col = pixels[index + newPixelOffset];\r\n                        if (col != 0)\r\n                        {\r\n                            r += ((byte)(col >> 16));\r\n                            g += ((byte)(col >> 8));\r\n                            b += ((byte)col);\r\n                        }\r\n                        hits++;\r\n                    }\r\n\r\n                    if (y >= 0)\r\n                    {\r\n                        int color =\r\n                            (255 << 24)\r\n                            | ((byte)(r / hits) << 16)\r\n                            | ((byte)(g / hits) << 8)\r\n                            | ((byte)(b / hits));\r\n\r\n                        newColors[y] = color;\r\n                    }\r\n\r\n                    index += w;\r\n                }\r\n\r\n                for (int y = 0; y < h; y++)\r\n                {\r\n                    pixels[y * w + x] = newColors[y];\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/ItemsControlHelper.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing Telegram.Controls.Extensions;\r\n\r\nnamespace TelegramClient.Helpers\r\n{\r\n    /// <summary>\r\n    /// The ItemContainerGenerator provides useful utilities for ItemsControls.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public sealed partial class ItemsControlHelper\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the ItemsControl being tracked by the\r\n        /// ItemContainerGenerator.\r\n        /// </summary>\r\n        private ItemsControl ItemsControl { get; set; }\r\n\r\n        /// <summary>\r\n        /// A Panel that is used as the ItemsHost of the ItemsControl.  This\r\n        /// property will only be valid when the ItemsControl is live in the\r\n        /// tree and has generated containers for some of its items.\r\n        /// </summary>\r\n        private Panel _itemsHost;\r\n\r\n        /// <summary>\r\n        /// Gets a Panel that is used as the ItemsHost of the ItemsControl.\r\n        /// This property will only be valid when the ItemsControl is live in\r\n        /// the tree and has generated containers for some of its items.\r\n        /// </summary>\r\n        public Panel ItemsHost\r\n        {\r\n            get\r\n            {\r\n                // Lookup the ItemsHost if we haven't already cached it.\r\n                if (_itemsHost == null && ItemsControl != null && ItemsControl.ItemContainerGenerator != null)\r\n                {\r\n                    // Get any live container\r\n                    DependencyObject container = ItemsControl.ItemContainerGenerator.ContainerFromIndex(0);\r\n                    if (container != null)\r\n                    {\r\n                        // Get the parent of the container\r\n                        _itemsHost = VisualTreeHelper.GetParent(container) as Panel;\r\n                    }\r\n                    else\r\n                    {\r\n                        _itemsHost = ItemsControl.GetVisualDescendants().OfType<VirtualizingStackPanel>().FirstOrDefault();\r\n                    }\r\n                }\r\n\r\n                return _itemsHost;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// A ScrollViewer that is used to scroll the items in the ItemsHost.\r\n        /// </summary>\r\n        private ScrollViewer _scrollHost;\r\n\r\n        /// <summary>\r\n        /// Gets a ScrollViewer that is used to scroll the items in the\r\n        /// ItemsHost.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Code is linked into multiple projects.\")]\r\n        public ScrollViewer ScrollHost\r\n        {\r\n            get\r\n            {\r\n                if (_scrollHost == null)\r\n                {\r\n                    Panel itemsHost = ItemsHost;\r\n                    if (itemsHost != null)\r\n                    {\r\n                        for (DependencyObject obj = itemsHost; obj != ItemsControl && obj != null; obj = VisualTreeHelper.GetParent(obj))\r\n                        {\r\n                            ScrollViewer viewer = obj as ScrollViewer;\r\n                            if (viewer != null)\r\n                            {\r\n                                _scrollHost = viewer;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                return _scrollHost;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ItemContainerGenerator.\r\n        /// </summary>\r\n        /// <param name=\"control\">\r\n        /// The ItemsControl being tracked by the ItemContainerGenerator.\r\n        /// </param>\r\n        public ItemsControlHelper(ItemsControl control)\r\n        {\r\n            Debug.Assert(control != null, \"control cannot be null!\");\r\n            ItemsControl = control;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Apply a control template to the ItemsControl.\r\n        /// </summary>\r\n        public void OnApplyTemplate()\r\n        {\r\n            // Clear the cached ItemsHost, ScrollHost\r\n            _itemsHost = null;\r\n            _scrollHost = null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares the specified container to display the specified item.\r\n        /// </summary>\r\n        /// <param name=\"element\">\r\n        /// Container element used to display the specified item.\r\n        /// </param>\r\n        /// <param name=\"parentItemContainerStyle\">\r\n        /// The ItemContainerStyle for the parent ItemsControl.\r\n        /// </param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Code is linked into multiple projects.\")]\r\n        public static void PrepareContainerForItemOverride(DependencyObject element, Style parentItemContainerStyle)\r\n        {\r\n            // Apply the ItemContainerStyle to the item\r\n            Control control = element as Control;\r\n            if (parentItemContainerStyle != null && control != null && control.Style == null)\r\n            {\r\n                control.SetValue(Control.StyleProperty, parentItemContainerStyle);\r\n            }\r\n\r\n            // Note: WPF also does preparation for ContentPresenter,\r\n            // ContentControl, HeaderedContentControl, and ItemsControl.  Since\r\n            // we don't have any other ItemsControls using this\r\n            // ItemContainerGenerator, we've removed that code for now.  It\r\n            // should be added back later when necessary.\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the style of any generated items when the ItemContainerStyle\r\n        /// has been changed.\r\n        /// </summary>\r\n        /// <param name=\"itemContainerStyle\">The ItemContainerStyle.</param>\r\n        /// <remarks>\r\n        /// Silverlight does not support setting a Style multiple times, so we\r\n        /// only attempt to set styles on elements whose style hasn't already\r\n        /// been set.\r\n        /// </remarks>\r\n        public void UpdateItemContainerStyle(Style itemContainerStyle)\r\n        {\r\n            if (itemContainerStyle == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            Panel itemsHost = ItemsHost;\r\n            if (itemsHost == null || itemsHost.Children == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            foreach (UIElement element in itemsHost.Children)\r\n            {\r\n                FrameworkElement obj = element as FrameworkElement;\r\n                if (obj.Style == null)\r\n                {\r\n                    obj.Style = itemContainerStyle;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Scroll the desired element into the ScrollHost's viewport.\r\n        /// </summary>\r\n        /// <param name=\"element\">Element to scroll into view.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Media is linked across multiple projects and this method is used in some but not others.\")]\r\n        public void ScrollIntoView(FrameworkElement element)\r\n        {\r\n            // Get the ScrollHost\r\n            ScrollViewer scrollHost = ScrollHost;\r\n            if (scrollHost == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            // Get the position of the element relative to the ScrollHost\r\n            GeneralTransform transform = null;\r\n            try\r\n            {\r\n                transform = element.TransformToVisual(scrollHost);\r\n            }\r\n            catch (ArgumentException)\r\n            {\r\n                // Ignore failures when not in the visual tree\r\n                return;\r\n            }\r\n            Rect itemRect = new Rect(\r\n                transform.Transform(new Point()),\r\n                transform.Transform(new Point(element.ActualWidth, element.ActualHeight)));\r\n\r\n            // Scroll vertically\r\n            double verticalOffset = scrollHost.VerticalOffset;\r\n            double verticalDelta = 0;\r\n            double hostBottom = scrollHost.ViewportHeight;\r\n            double itemBottom = itemRect.Bottom;\r\n            if (hostBottom < itemBottom)\r\n            {\r\n                verticalDelta = itemBottom - hostBottom;\r\n                verticalOffset += verticalDelta;\r\n            }\r\n            double itemTop = itemRect.Top;\r\n            if (itemTop - verticalDelta < 0)\r\n            {\r\n                verticalOffset -= verticalDelta - itemTop;\r\n            }\r\n            scrollHost.ScrollToVerticalOffset(verticalOffset);\r\n\r\n            // Scroll horizontally\r\n            double horizontalOffset = scrollHost.HorizontalOffset;\r\n            double horizontalDelta = 0;\r\n            double hostRight = scrollHost.ViewportWidth;\r\n            double itemRight = itemRect.Right;\r\n            if (hostRight < itemRight)\r\n            {\r\n                horizontalDelta = itemRight - hostRight;\r\n                horizontalOffset += horizontalDelta;\r\n            }\r\n            double itemLeft = itemRect.Left;\r\n            if (itemLeft - horizontalDelta < 0)\r\n            {\r\n                horizontalOffset -= horizontalDelta - itemLeft;\r\n            }\r\n            scrollHost.ScrollToHorizontalOffset(horizontalOffset);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Helpers/PhoneHelper.cs",
    "content": "﻿using System;\r\nusing System.Threading;\r\nusing System.Xml;\r\nusing Microsoft.Phone.Info;\r\n\r\nnamespace TelegramClient.Helpers\r\n{\r\n    public class PhoneHelper\r\n    {\r\n        const string AppManifestName = \"WMAppManifest.xml\";\r\n        const string AppNodeName = \"App\";\r\n        public const string AppVersion = \"Version\";\r\n\r\n\r\n        public static bool IsLowMemoryDevice()\r\n        {\r\n            try\r\n            {\r\n                var result = (long)DeviceExtendedProperties.GetValue(\"ApplicationWorkingSetLimit\");\r\n\r\n                if (result < 94371840L)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n\r\n            catch (ArgumentOutOfRangeException)\r\n            {\r\n                // The device does not support querying for this value. This occurs\r\n                // on Windows Phone OS 7.1 and older phones without OS updates.\r\n\r\n                return true;\r\n            }\r\n        }\r\n\r\n        public static string GetOSVersion()\r\n        {\r\n            return Environment.OSVersion.Version.ToString();\r\n        }\r\n\r\n        public static string GetAppVersion()\r\n        {\r\n            return GetAppAttribute(AppVersion);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the value from the WMAppManifest in runtime\r\n        /// Example: PhoneHelper.GetAppAttribute(\"Title\");\r\n        /// \r\n        /// http://stackoverflow.com/questions/3411377/get-the-windows-phone-7-application-title-from-code\r\n        /// </summary>\r\n        /// <param name=\"attributeName\"></param>\r\n        /// <returns></returns>\r\n        public static string GetAppAttribute(string attributeName)\r\n        {\r\n            try\r\n            {\r\n                var settings = new XmlReaderSettings { XmlResolver = new XmlXapResolver() };\r\n\r\n                using (var rdr = XmlReader.Create(AppManifestName, settings))\r\n                {\r\n                    rdr.ReadToDescendant(AppNodeName);\r\n                    if (!rdr.IsStartElement())\r\n                    {\r\n                        throw new FormatException(AppManifestName + \" is missing \" + AppNodeName);\r\n                    }\r\n\r\n                    return rdr.GetAttribute(attributeName);\r\n                }\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return \"\";\r\n            }\r\n        }\r\n\r\n        public static string GetDeviceName()\r\n        {\r\n            return (string)DeviceExtendedProperties.GetValue(\"DeviceName\");\r\n        }\r\n\r\n        public static string GetDeviceFullName()\r\n        {\r\n            return GetDeviceManufacturer() + \" \" + GetDeviceName();\r\n        }\r\n\r\n        public static string GetDeviceUniqueId()\r\n        {\r\n            return DeviceExtendedProperties.GetValue(\"DeviceUniqueId\").ToString();\r\n        }\r\n\r\n        public static string GetDeviceHardwareVersion()\r\n        {\r\n            return DeviceExtendedProperties.GetValue(\"DeviceHardwareVersion\").ToString();\r\n        }\r\n\r\n        public static string GetDeviceFirmwareVersion()\r\n        {\r\n            return DeviceExtendedProperties.GetValue(\"DeviceFirmwareVersion\").ToString();\r\n        }\r\n\r\n        public static string GetDeviceManufacturer()\r\n        {\r\n            return DeviceExtendedProperties.GetValue(\"DeviceManufacturer\").ToString();\r\n        }\r\n\r\n        public static string GetLocation()\r\n        {\r\n            return Thread.CurrentThread.CurrentUICulture.ToString();\r\n        }\r\n\r\n        public static bool IsWiFiEnabled()\r\n        {\r\n            return Microsoft.Phone.Net.NetworkInformation.DeviceNetworkInformation.IsWiFiEnabled;\r\n        }\r\n\r\n        public static bool IsCellularDataEnabled()\r\n        {\r\n            return Microsoft.Phone.Net.NetworkInformation.DeviceNetworkInformation.IsCellularDataEnabled;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/Property.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Linq.Expressions;\r\n\r\nnamespace TelegramClient.Helpers\r\n{\r\n    public static class Property\r\n    {\r\n        public static bool NameEquals(string name1, string name2)\r\n        {\r\n            return string.Equals(name1, name2, StringComparison.OrdinalIgnoreCase);\r\n        }\r\n\r\n        public static bool NameEquals<T>(string name, Expression<Func<T>> propertySelector)  \r\n        {\r\n            var memberExpression = propertySelector.Body as MemberExpression;\r\n            if (memberExpression != null)\r\n            {\r\n                return NameEquals(name, memberExpression.Member.Name);\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool AnyNameEquals<T>(string name, params Expression<Func<T>>[] propertySelectors)\r\n        {\r\n            return propertySelectors.Select(propertySelector => propertySelector.Body as MemberExpression).Any(memberExpression => memberExpression != null && NameEquals(name, memberExpression.Member.Name));\r\n        }\r\n\r\n        public static bool NameEquals<T>(Expression<Func<T>> propertySelector, string name)\r\n        {\r\n            return NameEquals(name, propertySelector);\r\n        }\r\n\r\n\r\n        public static bool NameEquals<T1, T2>(Expression<Func<T1>> propertySelector1, Expression<Func<T2>> propertySelector2)\r\n        {\r\n            var memberExpression = propertySelector1.Body as MemberExpression;\r\n            if (memberExpression != null)\r\n            {\r\n                return NameEquals(memberExpression.Member.Name, propertySelector2);\r\n            }\r\n\r\n            return false;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/TemplateSelectors/DocumentTemplateSelector.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Helpers.TemplateSelectors\r\n{\r\n    public class DocumentTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate ThumbDocumentTemplate { get; set; }\r\n\r\n        public DataTemplate DocumentTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var mediaDocument = value as TLMessageMediaDocument;\r\n            if (mediaDocument == null)\r\n            {\r\n                var decryptedMediaDocument = value as TLDecryptedMessageMediaDocument;\r\n                if (decryptedMediaDocument != null)\r\n                {\r\n                    if (decryptedMediaDocument.Thumb.Data.Length == 0\r\n                        || (decryptedMediaDocument.ThumbH.Value == 0 && decryptedMediaDocument.ThumbW.Value == 0))\r\n                    {\r\n                        return DocumentTemplate;\r\n                    }\r\n\r\n                    return ThumbDocumentTemplate;\r\n                }\r\n\r\n                return null;\r\n            }\r\n\r\n            var document = mediaDocument.Document as TLDocument;\r\n            if (document != null)\r\n            {\r\n                var emptyThumb = document.Thumb as TLPhotoSizeEmpty;\r\n                if (emptyThumb != null)\r\n                {\r\n                    return DocumentTemplate;\r\n                }\r\n\r\n                if (string.Equals(document.MimeType.ToString(), \"image/webp\", StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return DocumentTemplate;\r\n                }\r\n\r\n                return ThumbDocumentTemplate;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class LinkTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate LinkTemplate { get; set; }\r\n\r\n        public DataTemplate EmptyLinkTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var messageBase = value as TLMessage;\r\n            if (messageBase != null)\r\n            {\r\n                var mediaWebPage = messageBase.Media as TLMessageMediaWebPage;\r\n                if (mediaWebPage != null)\r\n                {\r\n                    var webPage = mediaWebPage.WebPage as TLWebPage;\r\n                    if (webPage != null)\r\n                    {\r\n                        return LinkTemplate;\r\n                    }\r\n\r\n                    var webPagePending = mediaWebPage.WebPage as TLWebPagePending;\r\n                    if (webPagePending != null)\r\n                    {\r\n                        return EmptyLinkTemplate;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return EmptyLinkTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/TemplateSelectors/EmptyDialogToDescriptionConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Helpers.TemplateSelectors\r\n{\r\n    public class EmptyDialogToDescriptionConverter : IValueConverter\r\n    {\r\n        public DataTemplate UserSelfTemplate { get; set; }\r\n\r\n        public DataTemplate UserTemplate { get; set; }\r\n\r\n        public DataTemplate SupportTemplate { get; set; }\r\n\r\n        public DataTemplate BotTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var userBase = value as TLUserBase;\r\n            if (userBase != null)\r\n            {\r\n                if (userBase.Index == 333000)\r\n                {\r\n                    return SupportTemplate;\r\n                }\r\n                if (userBase.IsSelf)\r\n                {\r\n                    return UserSelfTemplate;\r\n                }\r\n            }\r\n\r\n            var user = value as TLUser;\r\n            if (user != null && user.IsBot)\r\n            {\r\n                var botInfo = user.BotInfo as TLBotInfo;\r\n                if (botInfo != null && !TLString.IsNullOrEmpty(botInfo.Description))\r\n                {\r\n                    return BotTemplate;\r\n                }\r\n\r\n                return new DataTemplate();\r\n            }\r\n\r\n            return UserTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/TemplateSelectors/ItemsPanelTemplateSelector.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.Helpers.TemplateSelectors\r\n{\r\n    public class ItemsPanelTemplateSelector : IValueConverter\r\n    {\r\n        public ItemsPanelTemplate NormalMemoryDeviceTemplate { get; set; }\r\n\r\n        public ItemsPanelTemplate LowMemoryDeviceTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var extendedDeviceInfoService = IoC.Get<IExtendedDeviceInfoService>();\r\n\r\n            if (extendedDeviceInfoService.IsLowMemoryDevice)\r\n            {\r\n                TLUtils.WritePerformance(\"  Select ItemsPanel for Low Memory Device\");\r\n                return LowMemoryDeviceTemplate;\r\n            }\r\n\r\n            TLUtils.WritePerformance(\"  Select ItemsPanel for Normal Memory Device\");\r\n            return NormalMemoryDeviceTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/TemplateSelectors/LocationTemplateSelector.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Helpers.TemplateSelectors\r\n{\r\n    public class LocationTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate StartSharingLiveGeoTemplate { get; set; }\r\n\r\n        public DataTemplate StopSharingLiveGeoTemplate { get; set; }\r\n\r\n        public DataTemplate GeoTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardedGeoTemplate { get; set; }\r\n\r\n        public DataTemplate VenueTemplate { get; set; }\r\n\r\n        public DataTemplate EmptyTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var emptyMessage = value as TLMessageEmpty;\r\n            if (emptyMessage != null)\r\n            {\r\n                return EmptyTemplate;\r\n            }\r\n\r\n            var message = value as TLMessage70;\r\n            if (message != null)\r\n            {\r\n                var messageFwdHeader = message.FwdFrom as TLMessageFwdHeader70;\r\n                if (messageFwdHeader != null && messageFwdHeader.From != null)\r\n                {\r\n                    return ForwardedGeoTemplate;\r\n                }\r\n\r\n                if (message.Media is TLMessageMediaVenue)\r\n                {\r\n                    return VenueTemplate;\r\n                }\r\n\r\n                var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                if (mediaGeoLive != null)\r\n                {\r\n                    mediaGeoLive.Date = message.Date;\r\n                    mediaGeoLive.EditDate = message.EditDate;\r\n\r\n                    return mediaGeoLive.Active\r\n                        ? StopSharingLiveGeoTemplate\r\n                        : StartSharingLiveGeoTemplate;\r\n                }\r\n\r\n                if (message.Media is TLMessageMediaGeo)\r\n                {\r\n                    return GeoTemplate;\r\n                }\r\n            }\r\n\r\n            var decryptedMessage = value as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                if (decryptedMessage.Media is TLDecryptedMessageMediaVenue)\r\n                {\r\n                    return VenueTemplate;\r\n                }\r\n\r\n                if (decryptedMessage.Media is TLDecryptedMessageMediaGeoPoint)\r\n                {\r\n                    return GeoTemplate;\r\n                }\r\n            }\r\n\r\n            return StartSharingLiveGeoTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class LiveLocationTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate StartSharingLiveGeoTemplate { get; set; }\r\n\r\n        public DataTemplate StopSharingLiveGeoTemplate { get; set; }\r\n\r\n        public DataTemplate EmptyTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var emptyMessage = value as TLMessageEmpty;\r\n            if (emptyMessage != null)\r\n            {\r\n                return EmptyTemplate;\r\n            }\r\n\r\n            var message = value as TLMessage25;\r\n            if (message != null)\r\n            {\r\n                var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                if (mediaGeoLive != null)\r\n                {\r\n                    return mediaGeoLive.Active\r\n                        ? StopSharingLiveGeoTemplate\r\n                        : StartSharingLiveGeoTemplate;\r\n                }\r\n            }\r\n\r\n            return StartSharingLiveGeoTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/TemplateSelectors/MediaTemplateSelector.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Helpers.TemplateSelectors\r\n{\r\n    public class DecryptedWebPageMediaTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate EmptyTemplate { get; set; }\r\n\r\n        public DataTemplate WebPageTextTemplate { get; set; }\r\n\r\n        public DataTemplate WebPageTemplate { get; set; }\r\n\r\n        public DataTemplate WebPageSmallPhotoTemplate { get; set; }\r\n\r\n        public DataTemplate WebPagePhotoTemplate { get; set; }\r\n\r\n        public DataTemplate WebPagePendingTemplate { get; set; }\r\n\r\n        public DataTemplate WebPageGifTemplate { get; set; }\r\n\r\n        public DataTemplate UnsupportedTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var webPageMedia = value as TLDecryptedMessageMediaWebPage;\r\n            if (webPageMedia != null)\r\n            {\r\n                var webPageEmpty = webPageMedia.WebPage as TLWebPageEmpty;\r\n                if (webPageEmpty != null)\r\n                {\r\n                    return EmptyTemplate;\r\n                }\r\n\r\n                var webPagePending = webPageMedia.WebPage as TLWebPagePending;\r\n                if (webPagePending != null)\r\n                {\r\n                    return EmptyTemplate;\r\n                }\r\n\r\n                var webPage = webPageMedia.WebPage as TLWebPage;\r\n                if (webPage != null)\r\n                {\r\n                    var webPage35 = webPage as TLWebPage35;\r\n                    if (webPage35 != null)\r\n                    {\r\n                        if (TLMessageBase.IsGif(webPage35.Document))\r\n                        {\r\n                            return WebPageGifTemplate;\r\n                        }\r\n                    }\r\n\r\n                    if (webPage.Photo != null\r\n                        && webPage.Type != null)\r\n                    {\r\n                        if (MediaTemplateSelector.IsWebPagePhotoTemplate(webPage))\r\n                        {\r\n                            return WebPagePhotoTemplate;\r\n                        }\r\n\r\n                        return WebPageSmallPhotoTemplate;\r\n                    }\r\n\r\n                    return WebPageTemplate;\r\n                }\r\n\r\n                return WebPageTextTemplate;\r\n            }\r\n\r\n            return UnsupportedTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class DecryptedMediaTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate StickerTemplate { get; set; }\r\n\r\n        public DataTemplate EmptyTemplate { get; set; }\r\n\r\n        public DataTemplate ContactTemplate { get; set; }\r\n\r\n        public DataTemplate PhotoTemplate { get; set; }\r\n\r\n        public DataTemplate SecretPhotoTemplate { get; set; }\r\n\r\n        public DataTemplate VideoTemplate { get; set; }\r\n\r\n        public DataTemplate GeoPointTemplate { get; set; }\r\n\r\n        public DataTemplate VenueTemplate { get; set; }\r\n\r\n        public DataTemplate DocumentTemplate { get; set; }\r\n\r\n        public DataTemplate GifTemplate { get; set; }\r\n\r\n        public DataTemplate AudioTemplate { get; set; }\r\n\r\n        public DataTemplate WebPageTemplate { get; set; }\r\n\r\n        public DataTemplate GroupTemplate { get; set; }\r\n\r\n        public DataTemplate UnsupportedTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            TLInt ttl = null;\r\n            var useSecretPhotos = false;\r\n            var decryptedMessage = value as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                ttl = decryptedMessage.TTL;\r\n                useSecretPhotos = decryptedMessage is TLDecryptedMessage17;\r\n                value = decryptedMessage.Media;\r\n            }\r\n\r\n            var emptyMedia = value as TLDecryptedMessageMediaEmpty;\r\n            if (emptyMedia != null)\r\n            {\r\n                return EmptyTemplate;\r\n            }\r\n\r\n            var contactMedia = value as TLDecryptedMessageMediaContact;\r\n            if (contactMedia != null)\r\n            {\r\n                return ContactTemplate;\r\n            }\r\n\r\n            var groupMedia = value as TLDecryptedMessageMediaGroup;\r\n            if (groupMedia != null)\r\n            {\r\n                return GroupTemplate;\r\n            }\r\n\r\n            var photoMedia = value as TLDecryptedMessageMediaPhoto;\r\n            if (photoMedia != null)\r\n            {\r\n                if (ttl != null && ttl.Value > 0 && ttl.Value <= 60.0 && useSecretPhotos)\r\n                {\r\n                    return SecretPhotoTemplate;\r\n                }\r\n\r\n                return PhotoTemplate;\r\n            }\r\n\r\n            var documentMedia = value as TLDecryptedMessageMediaDocument;\r\n            if (documentMedia != null)\r\n            {\r\n                var document = documentMedia.Document as TLDecryptedMessageMediaDocument45;\r\n                if (document != null)\r\n                {\r\n                    if (TLMessageBase.IsSticker(document, document.Size))\r\n                    {\r\n                        return StickerTemplate;\r\n                    }\r\n\r\n                    if (TLMessageBase.IsVoice(document, document.Size))\r\n                    {\r\n                        return AudioTemplate;\r\n                    }\r\n\r\n                    if (TLMessageBase.IsVideo(document, document.Size))\r\n                    {\r\n                        return VideoTemplate;\r\n                    }\r\n\r\n                    if (TLMessageBase.IsGif(document, document.Size))\r\n                    {\r\n                        return GifTemplate;\r\n                    }\r\n                }\r\n\r\n\r\n                //var documentExternal = documentMedia.Document as TLDocumentExternal;\r\n                //if (documentExternal != null)\r\n                //{\r\n                //    if (TLMessageBase.IsGif(documentExternal))\r\n                //    {\r\n                //        return GifTemplate;\r\n                //    }\r\n                //}\r\n\r\n                return DocumentTemplate;\r\n            }\r\n\r\n            var documentExternal = value as TLDecryptedMessageMediaExternalDocument;\r\n            if (documentExternal != null)\r\n            {\r\n                if (TLMessageBase.IsSticker(documentExternal, documentExternal.Size))\r\n                {\r\n                    return StickerTemplate;\r\n                }\r\n            }\r\n\r\n            var videoMedia = value as TLDecryptedMessageMediaVideo;\r\n            if (videoMedia != null)\r\n            {\r\n                return VideoTemplate;\r\n            }\r\n\r\n            var venueMedia = value as TLDecryptedMessageMediaVenue;\r\n            if (venueMedia != null)\r\n            {\r\n                return VenueTemplate;\r\n            }\r\n\r\n            var geoPointMedia = value as TLDecryptedMessageMediaGeoPoint;\r\n            if (geoPointMedia != null)\r\n            {\r\n                return GeoPointTemplate;\r\n            }\r\n\r\n            var audioMedia = value as TLDecryptedMessageMediaAudio;\r\n            if (audioMedia != null)\r\n            {\r\n                return AudioTemplate;\r\n            }\r\n\r\n            var webPageMedia = value as TLDecryptedMessageMediaWebPage;\r\n            if (webPageMedia != null)\r\n            {\r\n                var webPageEmpty = webPageMedia.WebPage as TLWebPageEmpty;\r\n                if (webPageEmpty != null)\r\n                {\r\n                    return EmptyTemplate;\r\n                }\r\n\r\n                var webPagePending = webPageMedia.WebPage as TLWebPagePending;\r\n                if (webPagePending != null)\r\n                {\r\n                    return EmptyTemplate;\r\n                }\r\n\r\n                var webPage = webPageMedia.WebPage as TLWebPage;\r\n                if (webPage != null)\r\n                {\r\n                    return WebPageTemplate;\r\n                }\r\n\r\n                return EmptyTemplate;\r\n            }\r\n\r\n            return UnsupportedTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class MediaTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate CallTemplate { get; set; }\r\n\r\n        public DataTemplate StickerTemplate { get; set; }\r\n\r\n        public DataTemplate VenueTemplate { get; set; }\r\n\r\n        public DataTemplate WebPageTemplate { get; set; }\r\n\r\n        public DataTemplate WebPageSmallPhotoTemplate { get; set; }\r\n\r\n        public DataTemplate WebPagePhotoTemplate { get; set; }\r\n\r\n        public DataTemplate WebPagePendingTemplate { get; set; }\r\n\r\n        public DataTemplate WebPageGifTemplate { get; set; }\r\n\r\n        public DataTemplate EmptyTemplate { get; set; }\r\n\r\n        public DataTemplate ContactTemplate { get; set; }\r\n\r\n        public DataTemplate PhoneContactTemplate { get; set; }\r\n\r\n        public DataTemplate SecretPhotoTemplate { get; set; }\r\n\r\n        public DataTemplate PhotoTemplate { get; set; }\r\n\r\n        public DataTemplate RoundVideoTemplate { get; set; }\r\n\r\n        public DataTemplate SecretVideoTemplate { get; set; }\r\n\r\n        public DataTemplate VideoTemplate { get; set; }\r\n\r\n        public DataTemplate GeoLiveTemplate { get; set; }\r\n\r\n        public DataTemplate GeoTemplate { get; set; }\r\n\r\n        public DataTemplate DocumentTemplate { get; set; }\r\n\r\n        public DataTemplate AudioTemplate { get; set; }\r\n\r\n        public DataTemplate GifTemplate { get; set; }\r\n\r\n        public DataTemplate GameTemplate { get; set; }\r\n\r\n        public DataTemplate GameGifTemplate { get; set; }\r\n\r\n        public DataTemplate InvoicePhotoTemplate { get; set; }\r\n\r\n        public DataTemplate InvoiceTemplate { get; set; }\r\n\r\n        public DataTemplate GroupTemplate { get; set; }\r\n\r\n        public DataTemplate UnsupportedTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var messageService = value as TLMessageService;\r\n            if (messageService != null)\r\n            {\r\n                return CallTemplate;\r\n            }\r\n\r\n            var emptyMedia = value as TLMessageMediaEmpty;\r\n            if (emptyMedia != null)\r\n            {\r\n                return EmptyTemplate;\r\n            }\r\n\r\n            var contactMedia = value as TLMessageMediaContact;\r\n            if (contactMedia != null)\r\n            {\r\n                if (contactMedia.UserId.Value <= 0)\r\n                {\r\n                    return PhoneContactTemplate;\r\n                }\r\n\r\n                return ContactTemplate;\r\n            }\r\n\r\n            var groupMedia = value as TLMessageMediaGroup;\r\n            if (groupMedia != null)\r\n            {\r\n                return GroupTemplate;\r\n            }\r\n\r\n            var photoMedia = value as TLMessageMediaPhoto;\r\n            if (photoMedia != null)\r\n            {\r\n                if (TLMessageBase.HasTTL(photoMedia) && photoMedia.Photo != null)\r\n                {\r\n                    return SecretPhotoTemplate;\r\n                }\r\n\r\n                return PhotoTemplate;\r\n            }\r\n\r\n            var documentMedia = value as TLMessageMediaDocument;\r\n            if (documentMedia != null)\r\n            {\r\n                var document = documentMedia.Document as TLDocument22;\r\n                if (document != null)\r\n                {\r\n                    if (TLMessageBase.HasTTL(documentMedia))\r\n                    {\r\n                        return SecretVideoTemplate;\r\n                    }\r\n                    if (TLMessageBase.IsSticker(document))\r\n                    {\r\n                        return StickerTemplate;\r\n                    }\r\n                    if (TLMessageBase.IsVoice(document))\r\n                    {\r\n                        return AudioTemplate;\r\n                    }\r\n                    if (TLMessageBase.IsRoundVideo(document))\r\n                    {\r\n                        return RoundVideoTemplate;\r\n                    }\r\n                    if (TLMessageBase.IsVideo(document))\r\n                    {\r\n                        return VideoTemplate;\r\n                    }\r\n                    if (TLMessageBase.IsGif(document))\r\n                    {\r\n                        return GifTemplate;\r\n                    }\r\n                }\r\n\r\n                var documentExternal = documentMedia.Document as TLDocumentExternal;\r\n                if (documentExternal != null)\r\n                {\r\n                    if (TLMessageBase.IsGif(documentExternal))\r\n                    {\r\n                        return GifTemplate;\r\n                    }\r\n                }\r\n\r\n                return DocumentTemplate;\r\n            }\r\n\r\n            var videoMedia = value as TLMessageMediaVideo;\r\n            if (videoMedia != null)\r\n            {\r\n                return VideoTemplate;\r\n            }\r\n\r\n            var geoLiveMedia = value as TLMessageMediaGeoLive;\r\n            if (geoLiveMedia != null)\r\n            {\r\n                return GeoLiveTemplate;\r\n            }\r\n\r\n            var venueMedia = value as TLMessageMediaVenue;\r\n            if (venueMedia != null)\r\n            {\r\n                return VenueTemplate;\r\n            }\r\n\r\n            var geoMedia = value as TLMessageMediaGeo;\r\n            if (geoMedia != null)\r\n            {\r\n                return GeoTemplate;\r\n            }\r\n\r\n            var audioMedia = value as TLMessageMediaAudio;\r\n            if (audioMedia != null)\r\n            {\r\n                return AudioTemplate;\r\n            }\r\n\r\n            var webPageMedia = value as TLMessageMediaWebPage;\r\n            if (webPageMedia != null)\r\n            {\r\n                var webPageEmpty = webPageMedia.WebPage as TLWebPageEmpty;\r\n                if (webPageEmpty != null)\r\n                {\r\n                    return EmptyTemplate;\r\n                }\r\n\r\n                var webPagePending = webPageMedia.WebPage as TLWebPagePending;\r\n                if (webPagePending != null)\r\n                {\r\n                    return EmptyTemplate;\r\n                }\r\n\r\n                var webPage = webPageMedia.WebPage as TLWebPage;\r\n                if (webPage != null)\r\n                {\r\n                    var webPage35 = webPage as TLWebPage35;\r\n                    if (webPage35 != null)\r\n                    {\r\n                        if (TLMessageBase.IsGif(webPage35.Document))\r\n                        {\r\n                            return WebPageGifTemplate;\r\n                        }\r\n                    }\r\n\r\n                    if (webPage.Photo != null\r\n                        && webPage.Type != null)\r\n                    {\r\n                        if (IsWebPagePhotoTemplate(webPage))\r\n                        {\r\n                            return WebPagePhotoTemplate;\r\n                        }\r\n\r\n                        return WebPageSmallPhotoTemplate;\r\n                    }\r\n                }\r\n\r\n                return WebPageTemplate;\r\n            }\r\n\r\n            var gameMedia = value as TLMessageMediaGame;\r\n            if (gameMedia != null)\r\n            {\r\n                if (TLMessageBase.IsGif(gameMedia.Document))\r\n                {\r\n                    return GameGifTemplate;\r\n                }\r\n\r\n                return GameTemplate;\r\n            }\r\n\r\n            var invoiceMedia = value as TLMessageMediaInvoice;\r\n            if (invoiceMedia != null)\r\n            {\r\n                if (invoiceMedia.Photo != null)\r\n                {\r\n                    return InvoicePhotoTemplate;\r\n                }\r\n\r\n                return InvoiceTemplate;\r\n            }\r\n\r\n            return UnsupportedTemplate;\r\n        }\r\n\r\n        public static bool IsWebPagePhotoTemplate(TLWebPage webPage)\r\n        {\r\n            if (webPage.Type != null)\r\n            {\r\n                var type = webPage.Type.ToString();\r\n                if (string.Equals(type, \"photo\", StringComparison.OrdinalIgnoreCase)\r\n                    || string.Equals(type, \"video\", StringComparison.OrdinalIgnoreCase)\r\n                    || (webPage.SiteName != null && string.Equals(webPage.SiteName.ToString(), \"twitter\", StringComparison.OrdinalIgnoreCase)))\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class MediaGridTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate EmptyTemplate { get; set; }\r\n\r\n        public DataTemplate PhotoTemplate { get; set; }\r\n\r\n        public DataTemplate VideoTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var message = value as TLMessage;\r\n            if (message == null)\r\n            {\r\n                return EmptyTemplate;\r\n            }\r\n\r\n            value = message.Media;\r\n\r\n            var emptyMedia = value as TLMessageMediaEmpty;\r\n            if (emptyMedia != null)\r\n            {\r\n                return EmptyTemplate;\r\n            }\r\n\r\n            var photoMedia = value as TLMessageMediaPhoto;\r\n            if (photoMedia != null)\r\n            {\r\n                return PhotoTemplate;\r\n            }\r\n\r\n            var documentMedia = value as TLMessageMediaDocument;\r\n            if (documentMedia != null && TLMessageBase.IsVideo(documentMedia.Document))\r\n            {\r\n                return VideoTemplate;\r\n            }\r\n\r\n            var videoMedia = value as TLMessageMediaVideo;\r\n            if (videoMedia != null)\r\n            {\r\n                return VideoTemplate;\r\n            }\r\n\r\n            return EmptyTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class ReplyTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate GameTemplate { get; set; }\r\n\r\n        public DataTemplate WebPageEmptyTemplate { get; set; }\r\n\r\n        public DataTemplate WebPagePendingTemplate { get; set; }\r\n\r\n        public DataTemplate WebPageTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardedMessagesTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardEmptyTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardTextTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardContactTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardInvoiceTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardGameTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardPhotoTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardVideoTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardRoundVideoTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardGeoPointTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardLiveGeoPointTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardDocumentTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardGifTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardStickerTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardAudioTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardVoiceMessageTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardUnsupportedTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyEmptyTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyLoadingTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyTextTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyContactTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyInvoiceTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyGameTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyPhotoTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyVideoTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyRoundVideoTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyGeoPointTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyLiveGeoPointTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyDocumentTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyGifTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyStickerTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyAudioTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyVoiceMessageTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyUnsupportedTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyServiceTextTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyServicePhotoTemplate { get; set; }\r\n\r\n        public DataTemplate EditTextTemplate { get; set; }\r\n\r\n        public DataTemplate EditContactTemplate { get; set; }\r\n\r\n        public DataTemplate EditPhotoTemplate { get; set; }\r\n\r\n        public DataTemplate EditVideoTemplate { get; set; }\r\n\r\n        public DataTemplate EditRoundVideoTemplate { get; set; }\r\n\r\n        public DataTemplate EditGeoPointTemplate { get; set; }\r\n\r\n        public DataTemplate EditLiveGeoPointTemplate { get; set; }\r\n\r\n        public DataTemplate EditDocumentTemplate { get; set; }\r\n\r\n        public DataTemplate EditGifTemplate { get; set; }\r\n\r\n        public DataTemplate EditStickerTemplate { get; set; }\r\n\r\n        public DataTemplate EditAudioTemplate { get; set; }\r\n\r\n        public DataTemplate EditVoiceMessageTemplate { get; set; }\r\n\r\n        public DataTemplate EditUnsupportedTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value == null) return null;\r\n\r\n            var info = value as ReplyInfo;\r\n            if (info == null)\r\n            {\r\n                if (value is TLMessageBase)\r\n                {\r\n                    return GetMessageTemplate(value as TLObject);\r\n                }\r\n\r\n                return ReplyUnsupportedTemplate;\r\n            }\r\n\r\n            if (info.Reply == null)\r\n            {\r\n                return ReplyLoadingTemplate;\r\n            }\r\n\r\n            var messagesContainter = info.Reply as TLMessagesContainter;\r\n            if (messagesContainter != null)\r\n            {\r\n                return GetMessagesContainerTemplate(messagesContainter);\r\n            }\r\n\r\n            if (info.ReplyToMsgId == null || info.ReplyToMsgId.Value == 0)\r\n            {\r\n                return ReplyUnsupportedTemplate;\r\n            }\r\n\r\n            return GetMessageTemplate(info.Reply);\r\n        }\r\n\r\n        private DataTemplate GetMessageTemplate(TLObject reply)\r\n        {\r\n            var message = reply as TLMessage;\r\n            if (message != null)\r\n            {\r\n                if (!TLString.IsNullOrEmpty(message.Message)\r\n                    && (message.Media is TLMessageMediaEmpty || message.Media is TLMessageMediaWebPage))\r\n                {\r\n                    return ReplyTextTemplate;\r\n                }\r\n\r\n                var value = message.Media;\r\n\r\n                if (value is TLMessageMediaInvoice)\r\n                {\r\n                    return ReplyInvoiceTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaGame)\r\n                {\r\n                    return ReplyGameTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaEmpty)\r\n                {\r\n                    return ReplyUnsupportedTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaContact)\r\n                {\r\n                    return ReplyContactTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaPhoto)\r\n                {\r\n                    return ReplyPhotoTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaDocument)\r\n                {\r\n                    if (message.IsVoice())\r\n                    {\r\n                        return ReplyVoiceMessageTemplate;\r\n                    }\r\n\r\n                    if (message.IsRoundVideo())\r\n                    {\r\n                        return ReplyRoundVideoTemplate;\r\n                    }\r\n\r\n                    if (message.IsVideo())\r\n                    {\r\n                        return ReplyVideoTemplate;\r\n                    }\r\n\r\n                    if (message.IsGif())\r\n                    {\r\n                        return ReplyGifTemplate;\r\n                    }\r\n\r\n                    if (message.IsSticker())\r\n                    {\r\n                        return ReplyStickerTemplate;\r\n                    }\r\n\r\n                    return ReplyDocumentTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaVideo)\r\n                {\r\n                    return ReplyVideoTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaGeoLive)\r\n                {\r\n                    return ReplyLiveGeoPointTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaGeo)\r\n                {\r\n                    return ReplyGeoPointTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaAudio)\r\n                {\r\n                    return ReplyAudioTemplate;\r\n                }\r\n            }\r\n\r\n            var messageService = reply as TLMessageService;\r\n            if (messageService != null)\r\n            {\r\n                var serviceAction = messageService.Action;\r\n\r\n                if (serviceAction is TLMessageActionChatEditPhoto)\r\n                {\r\n                    return ReplyServicePhotoTemplate;\r\n                }\r\n\r\n                return ReplyServiceTextTemplate;\r\n            }\r\n\r\n            var emptyMessage = reply as TLMessageEmpty;\r\n            if (emptyMessage != null)\r\n            {\r\n                return ReplyEmptyTemplate;\r\n            }\r\n\r\n            return ReplyUnsupportedTemplate;\r\n        }\r\n\r\n        private DataTemplate GetMessagesContainerTemplate(TLMessagesContainter container)\r\n        {\r\n            if (container.WebPageMedia != null)\r\n            {\r\n                var webPageMedia = container.WebPageMedia as TLMessageMediaWebPage;\r\n                if (webPageMedia != null)\r\n                {\r\n                    var webPagePending = webPageMedia.WebPage as TLWebPagePending;\r\n                    if (webPagePending != null)\r\n                    {\r\n                        return WebPagePendingTemplate;\r\n                    }\r\n\r\n                    var webPage = webPageMedia.WebPage as TLWebPage;\r\n                    if (webPage != null)\r\n                    {\r\n                        return WebPageTemplate;\r\n                    }\r\n\r\n                    var webPageEmpty = webPageMedia.WebPage as TLWebPageEmpty;\r\n                    if (webPageEmpty != null)\r\n                    {\r\n                        return WebPageEmptyTemplate;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (container.FwdMessages != null)\r\n            {\r\n                if (container.FwdMessages.Count == 1)\r\n                {\r\n                    var fwdMessage = container.FwdMessages[0];\r\n                    if (fwdMessage != null)\r\n                    {\r\n                        if (!TLString.IsNullOrEmpty(fwdMessage.Message)\r\n                            && (fwdMessage.Media is TLMessageMediaEmpty || fwdMessage.Media is TLMessageMediaWebPage))\r\n                        {\r\n                            return ForwardTextTemplate;\r\n                        }\r\n\r\n                        var media = container.FwdMessages[0].Media;\r\n                        if (media != null)\r\n                        {\r\n                            var mediaInvoice = media as TLMessageMediaInvoice;\r\n                            if (mediaInvoice != null)\r\n                            {\r\n                                return ForwardInvoiceTemplate;\r\n                            }\r\n\r\n                            var mediaGame = media as TLMessageMediaGame;\r\n                            if (mediaGame != null)\r\n                            {\r\n                                return ForwardGameTemplate;\r\n                            }\r\n\r\n                            var mediaPhoto = media as TLMessageMediaPhoto;\r\n                            if (mediaPhoto != null)\r\n                            {\r\n                                return ForwardPhotoTemplate;\r\n                            }\r\n\r\n                            var mediaAudio = media as TLMessageMediaAudio;\r\n                            if (mediaAudio != null)\r\n                            {\r\n                                return ForwardAudioTemplate;\r\n                            }\r\n\r\n                            var mediaDocument = media as TLMessageMediaDocument;\r\n                            if (mediaDocument != null)\r\n                            {\r\n                                if (fwdMessage.IsVoice())\r\n                                {\r\n                                    return ForwardVoiceMessageTemplate;\r\n                                }\r\n\r\n                                if (fwdMessage.IsRoundVideo())\r\n                                {\r\n                                    return ForwardRoundVideoTemplate;\r\n                                }\r\n\r\n                                if (fwdMessage.IsVideo())\r\n                                {\r\n                                    return ForwardVideoTemplate;\r\n                                }\r\n\r\n                                if (fwdMessage.IsGif())\r\n                                {\r\n                                    return ForwardGifTemplate;\r\n                                }\r\n\r\n                                if (fwdMessage.IsSticker())\r\n                                {\r\n                                    return ForwardStickerTemplate;\r\n                                }\r\n\r\n                                return ForwardDocumentTemplate;\r\n                            }\r\n\r\n                            var mediaVideo = media as TLMessageMediaVideo;\r\n                            if (mediaVideo != null)\r\n                            {\r\n                                return ForwardVideoTemplate;\r\n                            }\r\n\r\n                            var mediaGeoLive = media as TLMessageMediaGeoLive;\r\n                            if (mediaGeoLive != null)\r\n                            {\r\n                                return ForwardLiveGeoPointTemplate;\r\n                            }\r\n\r\n                            var mediaGeo = media as TLMessageMediaGeo;\r\n                            if (mediaGeo != null)\r\n                            {\r\n                                return ForwardGeoPointTemplate;\r\n                            }\r\n\r\n                            var mediaContact = media as TLMessageMediaContact;\r\n                            if (mediaContact != null)\r\n                            {\r\n                                return ForwardContactTemplate;\r\n                            }\r\n\r\n                            var mediaEmpty = media as TLMessageMediaEmpty;\r\n                            if (mediaEmpty != null)\r\n                            {\r\n                                return ForwardEmptyTemplate;\r\n                            }\r\n\r\n                            return ForwardUnsupportedTemplate;\r\n                        }\r\n\r\n                        var text = container.FwdMessages[0].Message;\r\n\r\n                        if (!string.IsNullOrEmpty(text.ToString()))\r\n                        {\r\n                            return ForwardTextTemplate;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return ForwardedMessagesTemplate;\r\n            }\r\n\r\n            if (container.EditMessage != null)\r\n            {\r\n                var editMessage = container.EditMessage as TLMessage;\r\n                if (editMessage != null)\r\n                {\r\n                    if (!TLString.IsNullOrEmpty(editMessage.Message)\r\n                        && (editMessage.Media is TLMessageMediaEmpty || editMessage.Media is TLMessageMediaWebPage))\r\n                    {\r\n                        return EditTextTemplate;\r\n                    }\r\n\r\n                    var value = editMessage.Media;\r\n\r\n                    if (value is TLMessageMediaEmpty)\r\n                    {\r\n                        return EditUnsupportedTemplate;\r\n                    }\r\n\r\n                    if (value is TLMessageMediaContact)\r\n                    {\r\n                        return EditContactTemplate;\r\n                    }\r\n\r\n                    if (value is TLMessageMediaPhoto)\r\n                    {\r\n                        return EditPhotoTemplate;\r\n                    }\r\n\r\n                    if (value is TLMessageMediaDocument)\r\n                    {\r\n                        if (editMessage.IsVoice())\r\n                        {\r\n                            return EditVoiceMessageTemplate;\r\n                        }\r\n\r\n                        if (editMessage.IsRoundVideo())\r\n                        {\r\n                            return EditRoundVideoTemplate;\r\n                        }\r\n\r\n                        if (editMessage.IsVideo())\r\n                        {\r\n                            return EditVideoTemplate;\r\n                        }\r\n\r\n                        if (editMessage.IsGif())\r\n                        {\r\n                            return EditGifTemplate;\r\n                        }\r\n\r\n                        if (editMessage.IsSticker())\r\n                        {\r\n                            return EditStickerTemplate;\r\n                        }\r\n\r\n                        return EditDocumentTemplate;\r\n                    }\r\n\r\n                    if (value is TLMessageMediaVideo)\r\n                    {\r\n                        return EditVideoTemplate;\r\n                    }\r\n\r\n                    if (value is TLMessageMediaGeoLive)\r\n                    {\r\n                        return EditLiveGeoPointTemplate;\r\n                    }\r\n\r\n                    if (value is TLMessageMediaGeo)\r\n                    {\r\n                        return EditGeoPointTemplate;\r\n                    }\r\n\r\n                    if (value is TLMessageMediaAudio)\r\n                    {\r\n                        return EditAudioTemplate;\r\n                    }\r\n                }\r\n\r\n                return EditUnsupportedTemplate;\r\n            }\r\n\r\n            return ReplyUnsupportedTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class DecryptedReplyTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate WebPageEmptyTemplate { get; set; }\r\n\r\n        public DataTemplate WebPagePendingTemplate { get; set; }\r\n\r\n        public DataTemplate WebPageTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardedMessagesTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardEmptyTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardTextTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardContactTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardPhotoTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardVideoTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardGeoPointTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardDocumentTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardGifTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardStickerTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardAudioTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardVoiceMessageTemplate { get; set; }\r\n\r\n        public DataTemplate ForwardUnsupportedTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyEmptyTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyLoadingTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyTextTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyWebPageTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyContactTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyPhotoTemplate { get; set; }\r\n\r\n        public DataTemplate ReplySecretPhotoTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyVideoTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyGeoPointTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyDocumentTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyGifTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyStickerTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyAudioTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyVoiceMessageTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyUnsupportedTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyServiceTextTemplate { get; set; }\r\n\r\n        public DataTemplate ReplyServicePhotoTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value == null) return null;\r\n\r\n            var info = value as ReplyInfo;\r\n            if (info == null)\r\n            {\r\n                return ReplyUnsupportedTemplate;\r\n            }\r\n\r\n            if (info.Reply == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var messagesContainter = info.Reply as TLDecryptedMessagesContainter;\r\n            if (messagesContainter != null)\r\n            {\r\n                return GetMessagesContainerTemplate(messagesContainter);\r\n            }\r\n\r\n            if (info.ReplyToRandomMsgId == null || info.ReplyToRandomMsgId.Value == 0)\r\n            {\r\n                return ReplyUnsupportedTemplate;\r\n            }\r\n\r\n            var messageService = info.Reply as TLDecryptedMessageService;\r\n            if (messageService != null)\r\n            {\r\n                return ReplyServiceTextTemplate;\r\n            }\r\n\r\n            var message = info.Reply as TLDecryptedMessage;\r\n            if (message != null)\r\n            {\r\n                var ttl = message.TTL;\r\n\r\n                if (!TLString.IsNullOrEmpty(message.Message)\r\n                    && (message.Media is TLDecryptedMessageMediaEmpty || message.Media is TLDecryptedMessageMediaWebPage))\r\n                {\r\n                    return ReplyTextTemplate;\r\n                }\r\n\r\n                value = message.Media;\r\n\r\n                if (value is TLDecryptedMessageMediaWebPage)\r\n                {\r\n                    return ReplyWebPageTemplate;\r\n                }\r\n\r\n                if (value is TLDecryptedMessageMediaEmpty)\r\n                {\r\n                    return ReplyUnsupportedTemplate;\r\n                }\r\n\r\n                if (value is TLDecryptedMessageMediaContact)\r\n                {\r\n                    return ReplyContactTemplate;\r\n                }\r\n\r\n                if (value is TLDecryptedMessageMediaPhoto)\r\n                {\r\n                    if (ttl != null && ttl.Value > 0 && ttl.Value < 60)\r\n                    {\r\n                        return ReplySecretPhotoTemplate;\r\n                    }\r\n\r\n                    return ReplyPhotoTemplate;\r\n                }\r\n\r\n                if (value is TLDecryptedMessageMediaDocument)\r\n                {\r\n                    if (message.IsVoice())\r\n                    {\r\n                        return ReplyVoiceMessageTemplate;\r\n                    }\r\n\r\n                    if (message.IsVideo())\r\n                    {\r\n                        return ReplyVideoTemplate;\r\n                    }\r\n\r\n                    if (message.IsGif())\r\n                    {\r\n                        return ReplyGifTemplate;\r\n                    }\r\n\r\n                    return ReplyDocumentTemplate;\r\n                }\r\n\r\n                if (value is TLDecryptedMessageMediaExternalDocument)\r\n                {\r\n                    if (message.IsSticker())\r\n                    {\r\n                        return ReplyStickerTemplate;\r\n                    }\r\n\r\n                    return ReplyDocumentTemplate;\r\n                }\r\n\r\n                if (value is TLDecryptedMessageMediaVideo)\r\n                {\r\n                    return ReplyVideoTemplate;\r\n                }\r\n\r\n                if (value is TLDecryptedMessageMediaGeoPoint)\r\n                {\r\n                    return ReplyGeoPointTemplate;\r\n                }\r\n\r\n                if (value is TLDecryptedMessageMediaAudio)\r\n                {\r\n                    return ReplyAudioTemplate;\r\n                }\r\n            }\r\n\r\n            return ReplyUnsupportedTemplate;\r\n        }\r\n\r\n        private DataTemplate GetMessagesContainerTemplate(TLDecryptedMessagesContainter container)\r\n        {\r\n            if (container.WebPageMedia != null)\r\n            {\r\n                var webPageMedia = container.WebPageMedia as TLMessageMediaWebPage;\r\n                if (webPageMedia != null)\r\n                {\r\n                    var webPagePending = webPageMedia.WebPage as TLWebPagePending;\r\n                    if (webPagePending != null)\r\n                    {\r\n                        return WebPagePendingTemplate;\r\n                    }\r\n\r\n                    var webPage = webPageMedia.WebPage as TLWebPage;\r\n                    if (webPage != null)\r\n                    {\r\n                        return WebPageTemplate;\r\n                    }\r\n\r\n                    var webPageEmpty = webPageMedia.WebPage as TLWebPageEmpty;\r\n                    if (webPageEmpty != null)\r\n                    {\r\n                        return WebPageEmptyTemplate;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return ReplyUnsupportedTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class InlineBotResultTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate ResultTemplate { get; set; }\r\n\r\n        public DataTemplate PhotoTemplate { get; set; }\r\n\r\n        public DataTemplate PhotoResultTemplate { get; set; }\r\n\r\n        public DataTemplate GifTemplate { get; set; }\r\n\r\n        public DataTemplate GifResultTemplate { get; set; }\r\n\r\n        public DataTemplate GeoResultTemplate { get; set; }\r\n\r\n        public DataTemplate VenueResultTemplate { get; set; }\r\n\r\n        public DataTemplate ContactResultTemplate { get; set; }\r\n\r\n        public DataTemplate StickerResultTemplate { get; set; }\r\n\r\n        public DataTemplate AudioResultTemplate { get; set; }\r\n\r\n        public DataTemplate GameResultTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var resultBase = value as TLBotInlineResultBase;\r\n            if (resultBase != null)\r\n            {\r\n                if (resultBase.SendMessage is TLBotInlineMessageMediaContact)\r\n                {\r\n                    return ContactResultTemplate;\r\n                }\r\n\r\n                if (resultBase.SendMessage is TLBotInlineMessageMediaVenue)\r\n                {\r\n                    return VenueResultTemplate;\r\n                }\r\n\r\n                if (resultBase.SendMessage is TLBotInlineMessageMediaGeo)\r\n                {\r\n                    return GeoResultTemplate;\r\n                }\r\n            }\r\n\r\n            var mediaResult = value as TLBotInlineMediaResult;\r\n            if (mediaResult != null)\r\n            {\r\n                if (TLString.Equals(mediaResult.Type, new TLString(\"photo\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return PhotoTemplate;\r\n                }\r\n\r\n                if (TLString.Equals(mediaResult.Type, new TLString(\"sticker\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return StickerResultTemplate;\r\n                }\r\n\r\n                if (TLString.Equals(mediaResult.Type, new TLString(\"gif\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return GifTemplate;\r\n                }\r\n\r\n                if (TLString.Equals(mediaResult.Type, new TLString(\"audio\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return AudioResultTemplate;\r\n                }\r\n\r\n                if (TLString.Equals(mediaResult.Type, new TLString(\"voice\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return AudioResultTemplate;\r\n                }\r\n\r\n                if (TLString.Equals(mediaResult.Type, new TLString(\"game\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return GameResultTemplate;\r\n                }\r\n            }\r\n\r\n            var result = value as TLBotInlineResult;\r\n            if (result != null)\r\n            {\r\n                if (TLString.Equals(result.Type, new TLString(\"photo\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return PhotoResultTemplate;\r\n                }\r\n\r\n                if (TLString.Equals(result.Type, new TLString(\"gif\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return GifResultTemplate;\r\n                }\r\n\r\n                if (TLString.Equals(result.Type, new TLString(\"audio\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return AudioResultTemplate;\r\n                }\r\n\r\n                if (TLString.Equals(result.Type, new TLString(\"voice\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    return AudioResultTemplate;\r\n                }\r\n            }\r\n\r\n            return ResultTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class PinnedMessageTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate PinnedEmptyTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedTextTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedContactTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedInvoiceTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedGameTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedPhotoTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedVideoTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedRoundVideoTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedGeoPointTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedLiveGeoPointTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedDocumentTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedGifTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedStickerTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedAudioTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedVoiceMessageTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedClearHistoryTemplate { get; set; }\r\n\r\n        public DataTemplate PinnedUnsupportedTemplate { get; set; }\r\n\r\n        private DataTemplate GetPinnedMessageTemplate(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message != null)\r\n            {\r\n                if (!TLString.IsNullOrEmpty(message.Message)\r\n                    && (message.Media is TLMessageMediaEmpty || message.Media is TLMessageMediaWebPage))\r\n                {\r\n                    return PinnedTextTemplate;\r\n                }\r\n\r\n                var value = message.Media;\r\n\r\n                if (value is TLMessageMediaEmpty)\r\n                {\r\n                    return PinnedUnsupportedTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaContact)\r\n                {\r\n                    return PinnedContactTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaPhoto)\r\n                {\r\n                    return PinnedPhotoTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaInvoice)\r\n                {\r\n                    return PinnedInvoiceTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaGame)\r\n                {\r\n                    return PinnedGameTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaDocument)\r\n                {\r\n                    if (message.IsVoice())\r\n                    {\r\n                        return PinnedVoiceMessageTemplate;\r\n                    }\r\n\r\n                    if (message.IsRoundVideo())\r\n                    {\r\n                        return PinnedVideoTemplate;\r\n                    }\r\n\r\n                    if (message.IsVideo())\r\n                    {\r\n                        return PinnedVideoTemplate;\r\n                    }\r\n\r\n                    if (message.IsGif())\r\n                    {\r\n                        return PinnedGifTemplate;\r\n                    }\r\n\r\n                    if (message.IsSticker())\r\n                    {\r\n                        return PinnedStickerTemplate;\r\n                    }\r\n\r\n                    return PinnedDocumentTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaVideo)\r\n                {\r\n                    return PinnedVideoTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaGeoLive)\r\n                {\r\n                    return PinnedLiveGeoPointTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaGeo)\r\n                {\r\n                    return PinnedGeoPointTemplate;\r\n                }\r\n\r\n                if (value is TLMessageMediaAudio)\r\n                {\r\n                    return PinnedAudioTemplate;\r\n                }\r\n            }\r\n\r\n            var serviceMessage = messageBase as TLMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                var clearHistoryAction = serviceMessage.Action as TLMessageActionClearHistory;\r\n                if (clearHistoryAction != null)\r\n                {\r\n                    return PinnedClearHistoryTemplate;\r\n                }\r\n            }\r\n\r\n            var emptyMessage = messageBase as TLMessageEmpty;\r\n            if (emptyMessage != null)\r\n            {\r\n                return PinnedEmptyTemplate;\r\n            }\r\n\r\n            return PinnedUnsupportedTemplate;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var message = value as TLMessageBase;\r\n\r\n            if (message != null)\r\n            {\r\n                return GetPinnedMessageTemplate(message);\r\n            }\r\n\r\n            return PinnedUnsupportedTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/TemplateSelectors/MessageTemplateSelector.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\n\r\nnamespace TelegramClient.Helpers.TemplateSelectors\r\n{\r\n    public class DecryptedMessageTemplateSelector : ITemplateSelector, IValueConverter\r\n    {\r\n        public DecryptedMessageTemplateSelector()\r\n        {\r\n            _templatesCache.Add(typeof(TLDecryptedMessageService), m => ServiceMessageTemplate ?? EmptyMessageTemplate);\r\n            _templatesCache.Add(typeof(TLDecryptedMessage), GenerateCommonMessageTemplate); \r\n            _templatesCache.Add(typeof(TLDecryptedMessageService17), m => ServiceMessageTemplate ?? EmptyMessageTemplate);\r\n            _templatesCache.Add(typeof(TLDecryptedMessage17), GenerateCommonMessageTemplate);\r\n            _templatesCache.Add(typeof(TLDecryptedMessage45), GenerateCommonMessageTemplate);\r\n        }\r\n\r\n        private DataTemplate GenerateCommonMessageTemplate(TLDecryptedMessageBase message)\r\n        {\r\n            if (message != null)\r\n            {\r\n                if (message.IsSticker())\r\n                {\r\n                    if (message.Out.Value)\r\n                    {\r\n                        return UserStickerTemplate ?? EmptyMessageTemplate;\r\n                    }\r\n\r\n                    return FriendStickerTemplate ?? EmptyMessageTemplate;\r\n                }\r\n\r\n                if (message.Out.Value)\r\n                {\r\n                    return UserMessageTemplate ?? EmptyMessageTemplate;\r\n                }\r\n\r\n                return FriendMessageTemplate ?? EmptyMessageTemplate;\r\n            }\r\n\r\n            return EmptyMessageTemplate;\r\n        }\r\n\r\n        private readonly Dictionary<Type, Func<TLDecryptedMessageBase, DataTemplate>> _templatesCache = new Dictionary<Type, Func<TLDecryptedMessageBase, DataTemplate>>();\r\n\r\n        protected DataTemplate EmptyMessageTemplate = new DataTemplate();\r\n\r\n        public DataTemplate UserMessageTemplate { get; set; }\r\n\r\n        public DataTemplate UserStickerTemplate { get; set; }\r\n\r\n        public DataTemplate FriendMessageTemplate { get; set; }\r\n\r\n        public DataTemplate FriendStickerTemplate { get; set; }\r\n\r\n        public DataTemplate ServiceMessageTemplate { get; set; }\r\n\r\n        public DataTemplate SelectTemplate(object item, DependencyObject container)\r\n        {\r\n            var message = item as TLDecryptedMessageBase;\r\n            if (message != null)\r\n            {\r\n                Func<TLDecryptedMessageBase, DataTemplate> dataTemplateFunc;\r\n                if (_templatesCache.TryGetValue(message.GetType(), out dataTemplateFunc))\r\n                {\r\n                    return dataTemplateFunc.Invoke(message);\r\n                }\r\n\r\n                return EmptyMessageTemplate;\r\n            }\r\n\r\n            return EmptyMessageTemplate;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return SelectTemplate(value, null);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class MessageTemplateSelector : ITemplateSelector, IValueConverter\r\n    {\r\n        public MessageTemplateSelector()\r\n        {\r\n            _templatesCache.Add(typeof(TLMessageEmpty), m => EmptyMessageTemplate);\r\n\r\n            _templatesCache.Add(typeof(TLMessageService), GenerateServiceMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessageService17), GenerateServiceMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessageService40), GenerateServiceMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessageService49), GenerateServiceMessageTemplate);\r\n\r\n            _templatesCache.Add(typeof(TLMessageForwarded), GenerateCommonMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessageForwarded17), GenerateCommonMessageTemplate);\r\n\r\n            _templatesCache.Add(typeof(TLMessage), GenerateCommonMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessage17), GenerateCommonMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessage25), GenerateCommonMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessage31), GenerateCommonMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessage34), GenerateCommonMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessage36), GenerateCommonMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessage40), GenerateCommonMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessage45), GenerateCommonMessageTemplate);\r\n            _templatesCache.Add(typeof(TLMessage48), GenerateCommonMessageTemplate);\r\n\r\n        }\r\n\r\n        private DataTemplate GenerateServiceMessageTemplate(TLMessageBase message)\r\n        {\r\n            var messageService = message as TLMessageService;\r\n            if (messageService != null)\r\n            {\r\n                var unreadMessagesAction = messageService.Action as TLMessageActionUnreadMessages;\r\n                if (unreadMessagesAction != null)\r\n                {\r\n                    return UnreadMessagesTemplate ?? ServiceMessageTemplate ?? EmptyMessageTemplate;\r\n                }\r\n\r\n                return ServiceMessageTemplate ?? EmptyMessageTemplate;\r\n            }\r\n\r\n            return EmptyMessageTemplate;\r\n        }\r\n\r\n        private DataTemplate GenerateCommonMessageTemplate(TLMessageBase m)\r\n        {\r\n            var messageCommon = m as TLMessageCommon;\r\n            if (messageCommon != null)\r\n            {\r\n                var message40 = messageCommon as TLMessage40;\r\n                if (message40 != null)\r\n                {\r\n                    if (message40.FromId == null || message40.FromId.Value < 0) // without signatures\r\n                    {\r\n                        if (message40.IsSticker())\r\n                        {\r\n                            return ChannelStickerTemplate;\r\n                        }\r\n\r\n                        return ChannelMessageTemplate;\r\n                    }\r\n\r\n                    if (message40.ToId is TLPeerChannel) // with signatures\r\n                    {\r\n                        var channel = IoC.Get<ICacheService>().GetChat(message40.ToId.Id) as TLChannel;\r\n                        if (channel != null && !channel.IsMegaGroup)\r\n                        {\r\n                            if (message40.IsSticker())\r\n                            {\r\n                                return ChannelStickerTemplate;\r\n                            }\r\n\r\n                            return ChannelMessageTemplate;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (messageCommon.IsSticker())\r\n                {\r\n                    if (messageCommon.Out.Value)\r\n                    {\r\n                        return UserStickerTemplate ?? EmptyMessageTemplate;\r\n                    }\r\n\r\n                    if (messageCommon.ToId is TLPeerChat || messageCommon.ToId is TLPeerBroadcast || messageCommon.ToId is TLPeerChannel)\r\n                    {\r\n                        return ChatFriendStickerTemplate ?? EmptyMessageTemplate;\r\n                    }\r\n\r\n                    return FriendStickerTemplate ?? EmptyMessageTemplate;\r\n                }\r\n                else\r\n                {\r\n                    if (messageCommon.Out.Value)\r\n                    {\r\n                        return UserMessageTemplate ?? EmptyMessageTemplate;\r\n                    }\r\n\r\n                    if (messageCommon.ToId is TLPeerChat || messageCommon.ToId is TLPeerBroadcast || messageCommon.ToId is TLPeerChannel)\r\n                    {\r\n                        return ChatFriendMessageTemplate ?? EmptyMessageTemplate;\r\n                    }\r\n\r\n                    return FriendMessageTemplate ?? EmptyMessageTemplate;\r\n                }\r\n\r\n                return EmptyMessageTemplate;\r\n            }\r\n\r\n            return EmptyMessageTemplate;\r\n        }\r\n\r\n        private readonly Dictionary<Type, Func<TLMessageBase, DataTemplate>> _templatesCache = new Dictionary<Type, Func<TLMessageBase, DataTemplate>>();\r\n\r\n        protected DataTemplate EmptyMessageTemplate = new DataTemplate();\r\n\r\n        public DataTemplate UserMessageTemplate { get; set; }\r\n\r\n        public DataTemplate FriendMessageTemplate { get; set; }\r\n\r\n        public DataTemplate ChatFriendMessageTemplate { get; set; }\r\n\r\n        public DataTemplate UserStickerTemplate { get; set; }\r\n\r\n        public DataTemplate FriendStickerTemplate { get; set; }\r\n\r\n        public DataTemplate ChatFriendStickerTemplate { get; set; }\r\n\r\n        public DataTemplate ServiceMessageTemplate { get; set; }\r\n\r\n        public DataTemplate UnreadMessagesTemplate { get; set; }\r\n\r\n        public DataTemplate ChannelMessageTemplate { get; set; }\r\n\r\n        public DataTemplate ChannelStickerTemplate { get; set; }\r\n\r\n        public DataTemplate SelectTemplate(object item, DependencyObject container)\r\n        {\r\n            var message = item as TLMessageBase;\r\n            if (message != null)\r\n            {\r\n                Func<TLMessageBase, DataTemplate> dataTemplateFunc;\r\n                if (_templatesCache.TryGetValue(message.GetType(), out dataTemplateFunc))\r\n                {\r\n                    return dataTemplateFunc.Invoke(message);\r\n                }\r\n\r\n                return EmptyMessageTemplate;\r\n            }\r\n\r\n            return EmptyMessageTemplate;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return SelectTemplate(value, null);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Helpers/TemplateSelectors/SearchContactsTemplateSelector.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Search;\r\n\r\nnamespace TelegramClient.Helpers.TemplateSelectors\r\n{\r\n    public class SearchTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate UserTemplate { get; set; }\r\n\r\n        public DataTemplate TextTemplate { get; set; }\r\n\r\n        public DataTemplate DialogTemplate { get; set; }\r\n\r\n        public DataTemplate MessageTemplate { get; set; }\r\n\r\n        public object Convert(object item, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(item is TLObject)) return null;\r\n\r\n            var serviceText = item as TLServiceText;\r\n            if (serviceText != null)\r\n            {\r\n                return TextTemplate;\r\n            }\r\n\r\n            var userBase = item as TLUserBase;\r\n            if (userBase != null && userBase.IsGlobalResult)\r\n            {\r\n                var username = userBase as IUserName;\r\n                if (username != null && !TLString.IsNullOrEmpty(username.UserName))\r\n                {\r\n                    return UserTemplate;\r\n                }\r\n\r\n                return DialogTemplate;\r\n            }\r\n\r\n            var chatBase = item as TLChatBase;\r\n            if (chatBase != null && chatBase.IsGlobalResult)\r\n            {\r\n                return UserTemplate;\r\n            }\r\n\r\n            var dialog = item as TLDialog;\r\n            if (dialog != null && dialog.TopMessage != null && dialog.Messages == null)\r\n            {\r\n                return MessageTemplate;\r\n            }\r\n\r\n            return DialogTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class SearchContactsTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate ContactTemplate { get; set; }\r\n\r\n        public DataTemplate UserStatusTemplate { get; set; }\r\n\r\n        public DataTemplate UserUsernameTemplate { get; set; }\r\n\r\n        public DataTemplate TextTemplate { get; set; }\r\n\r\n        public object Convert(object item, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(item is TLObject)) return null;\r\n\r\n            var serviceText = item as TLServiceText;\r\n            if (serviceText != null)\r\n            {\r\n                return TextTemplate;\r\n            }\r\n\r\n            var userBase = item as TLUserBase;\r\n            if (userBase != null && userBase.IsContact)\r\n            {\r\n                return ContactTemplate;\r\n            }\r\n\r\n            var username = userBase as IUserName;\r\n            if (username != null && !TLString.IsNullOrEmpty(username.UserName))\r\n            {\r\n                return UserUsernameTemplate;\r\n            }\r\n\r\n            return UserStatusTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Logs/Log.cs",
    "content": "﻿using System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Text;\r\nusing Telegram.Api.Extensions;\r\nusing Execute = Telegram.Api.Helpers.Execute; \r\n\r\nnamespace TelegramClient.Logs\r\n{\r\n    public class Log\r\n    {\r\n        public static bool IsEnabled\r\n        {\r\n            get\r\n            {\r\n#if DEBUG\r\n                return true;\r\n#else\r\n                return false;\r\n#endif\r\n            }\r\n        }\r\n\r\n        private static readonly object _fileSyncRoot = new object();\r\n\r\n        public static void Write(string str)\r\n        {\r\n            if (!IsEnabled)\r\n            {\r\n                return;\r\n            }\r\n\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var timestamp = DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture);\r\n\r\n                lock (_fileSyncRoot)\r\n                {\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.DirectoryExists(DirectoryName))\r\n                        {\r\n                            store.CreateDirectory(DirectoryName);\r\n                        }\r\n\r\n                        using (var file = store.OpenFile(Path.Combine(DirectoryName, FileName), FileMode.Append))\r\n                        {\r\n                            var bytes = Encoding.UTF8.GetBytes(string.Format(\"{0} {1}{2}\", timestamp, str, Environment.NewLine));\r\n                            file.Write(bytes, 0, bytes.Length);\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private const string DirectoryName = \"Logs\";\r\n\r\n        public static string FileName\r\n        {\r\n            get { return DateTime.Now.ToString(\"yyyy-MM-dd\", CultureInfo.InvariantCulture) + \".txt\"; }\r\n        }\r\n\r\n        public static void CopyTo(string fileName, Action<string> callback)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                lock (_fileSyncRoot)\r\n                {\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (store.FileExists(Path.Combine(DirectoryName, FileName)))\r\n                        {\r\n                            store.CopyFile(Path.Combine(DirectoryName, FileName), fileName);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                callback.SafeInvoke(fileName);\r\n            });\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Models/AlphaKeyGroup.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\n#if WP8\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing Microsoft.Phone.Globalization;\r\n#endif\r\nusing System.Globalization;\r\n\r\nnamespace TelegramClient.Models\r\n{\r\n    public class AlphaKeyGroup<T> : ObservableCollection<T>\r\n    {\r\n        /// <summary>\r\n        /// The delegate that is used to get the key information.\r\n        /// </summary>\r\n        /// <param name=\"item\">An object of type T</param>\r\n        /// <returns>The key value to use for this object</returns>\r\n        public delegate string GetKeyDelegate(T item);\r\n\r\n        /// <summary>\r\n        /// The Key of this group.\r\n        /// </summary>\r\n        public string Key { get; private set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Key + \" Count=\" + Count;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Public constructor.\r\n        /// </summary>\r\n        /// <param name=\"key\">The key for this group.</param>\r\n        public AlphaKeyGroup(string key)\r\n        {\r\n            Key = key;\r\n        }\r\n\r\n#if WP8\r\n\r\n        /// <summary>\r\n        /// Create a list of AlphaGroup<T> with keys set by a SortedLocaleGrouping.\r\n        /// </summary>\r\n        /// <param name=\"slg\">The </param>\r\n        /// <returns>Theitems source for a LongListSelector</returns>\r\n        private static List<AlphaKeyGroup<T>> CreateGroups(SortedLocaleGrouping slg)\r\n        {\r\n            List<AlphaKeyGroup<T>> list = new List<AlphaKeyGroup<T>>();\r\n\r\n            foreach (string key in slg.GroupDisplayNames)\r\n            {\r\n                list.Add(new AlphaKeyGroup<T>(key));\r\n            }\r\n\r\n            return list;\r\n        }\r\n#endif\r\n\r\n\r\n        /// <summary>\r\n        /// Create a list of AlphaGroup<T> with keys set by a SortedLocaleGrouping.\r\n        /// </summary>\r\n        /// <param name=\"items\">The items to place in the groups.</param>\r\n        /// <param name=\"ci\">The CultureInfo to group and sort by.</param>\r\n        /// <param name=\"getKey\">A delegate to get the key from an item.</param>\r\n        /// <param name=\"sort\">Will sort the data if true.</param>\r\n        /// <returns>An items source for a LongListSelector</returns>\r\n        public static List<AlphaKeyGroup<T>> CreateGroups(IEnumerable<T> items, CultureInfo ci, GetKeyDelegate getKey, bool sort)\r\n        {\r\n            List<AlphaKeyGroup<T>> list;\r\n#if WP8\r\n            var slg = new SortedLocaleGrouping(ci);\r\n            list = CreateGroups(slg);\r\n\r\n            foreach (T item in items)\r\n            {\r\n                int index = 0;\r\n                if (slg.SupportsPhonetics)\r\n                {\r\n                    //check if your database has yomi string for item\r\n                    //if it does not, then do you want to generate Yomi or ask the user for this item.\r\n                    //index = slg.GetGroupIndex(getKey(Yomiof(item)));\r\n                }\r\n                else\r\n                {\r\n                    index = slg.GetGroupIndex(getKey(item));\r\n                }\r\n                if (index >= 0 && index < list.Count)\r\n                {\r\n                    list[index].Add(item);\r\n                }\r\n            }\r\n\r\n            //if (sort)\r\n            //{\r\n            //    foreach (AlphaKeyGroup<T> group in list)\r\n            //    {\r\n            //        group.Sort((c0, c1) => { return ci.CompareInfo.Compare(getKey(c0), getKey(c1)); });\r\n            //    }\r\n            //}\r\n#else\r\n            list = new List<AlphaKeyGroup<T>>();\r\n#endif\r\n\r\n            return list;\r\n        }\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Models/ContactsByLastName.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Models\r\n{\r\n    public class ContactsByLastName : List<AlphaKeyGroup<TLUserBase>>\r\n    {\r\n        private const string Groups = \"абвгдеёжзийклмнопрстуфхцчшщъыьэюя#abcdefghijklmnopqrstuvwxyz\";\r\n\r\n        public ContactsByLastName(List<TLUserBase> contacts)\r\n        {\r\n            var people = contacts;\r\n            people.Sort(TLUserBase.CompareByLastName);\r\n\r\n            /*if (!people.Any())\r\n            {\r\n                people.Add(new User { FirstName = \"Андрей\", LastName = \"Рогозов\", PhoneFirstName = \"Андрей\", PhoneLastName = \"\" });\r\n                people.Add(new User { PhoneFirstName = \"Алексей\", PhoneLastName = \"Степанов\" });\r\n            }*/\r\n\r\n            var groups = new Dictionary<string, AlphaKeyGroup<TLUserBase>>();\r\n\r\n            foreach (var c in Groups)\r\n            {\r\n                var group = new AlphaKeyGroup<TLUserBase>(c.ToString());\r\n                Add(group);\r\n                groups[c.ToString()] = group;\r\n            }\r\n\r\n            foreach (var person in people)\r\n            {\r\n                groups[TLUserBase.GetLastNameKey(person)].Add(person);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Models/Country.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Runtime.Serialization;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Models\r\n{\r\n    [DataContract]\r\n    public class Country : TLObject\r\n    {\r\n        [DataMember(Name = \"code\")]\r\n        public string Code { get; set; }\r\n\r\n        [DataMember(Name = \"phoneCode\")]\r\n        public string PhoneCode { get; set; }\r\n\r\n        [DataMember(Name = \"name\")]\r\n        public string Name { get; set; }\r\n\r\n        public string GetKey()\r\n        {\r\n            return Name.Substring(0, 1).ToLowerInvariant();\r\n        } \r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Models/InAppNotifications.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Runtime.Serialization;\r\n\r\nnamespace TelegramClient.Models\r\n{\r\n    [DataContract]\r\n    public class InAppNotifications\r\n    {\r\n        [DataMember(Name = \"V\")]\r\n        public bool InAppVibration { get; set; }\r\n\r\n        [DataMember(Name = \"S\")]\r\n        public bool InAppSound { get; set; }\r\n\r\n        [DataMember(Name = \"P\")]\r\n        public bool InAppMessagePreview { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Models/Settings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq.Expressions;\r\nusing Telegram.Api.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Models\r\n{\r\n    public class Settings : TelegramPropertyChangedBase\r\n    {\r\n        public Settings()\r\n        {\r\n            IsNotifying = false;\r\n        }\r\n\r\n        protected bool SetField<T>(ref T field, T value, string propertyName)\r\n        {\r\n            if (EqualityComparer<T>.Default.Equals(field, value)) return false;\r\n            field = value;\r\n            NotifyOfPropertyChange(propertyName);\r\n            return true;\r\n        }\r\n\r\n        protected bool SetField<T>(ref T field, T value, Expression<Func<T>> selectorExpression)\r\n        {\r\n            if (EqualityComparer<T>.Default.Equals(field, value)) return false;\r\n            field = value;\r\n            NotifyOfPropertyChange(selectorExpression);\r\n            return true;\r\n        }\r\n\r\n        #region Message Notifications\r\n\r\n        public bool _contactAlert = true;\r\n\r\n        public bool ContactAlert\r\n        {\r\n            get { return _contactAlert; }\r\n            set { SetField(ref _contactAlert, value, () => ContactAlert); }\r\n        }\r\n\r\n        public bool _contactMessagePreview = true;\r\n\r\n        public bool ContactMessagePreview\r\n        {\r\n            get { return _contactMessagePreview; }\r\n            set { SetField(ref _contactMessagePreview, value, () => ContactMessagePreview); }\r\n        }\r\n\r\n        public string _contactSound;\r\n\r\n        public string ContactSound\r\n        {\r\n            get { return _contactSound; }\r\n            set { SetField(ref _contactSound, value, () => ContactSound); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Group Notifications\r\n\r\n        public bool _groupAlert = true;\r\n\r\n        public bool GroupAlert\r\n        {\r\n            get { return _groupAlert; }\r\n            set { SetField(ref _groupAlert, value, () => GroupAlert); }\r\n        }\r\n\r\n        public bool _groupMessagePreview = true;\r\n\r\n        public bool GroupMessagePreview\r\n        {\r\n            get { return _groupMessagePreview; }\r\n            set { SetField(ref _groupMessagePreview, value, () => GroupMessagePreview); }\r\n        }\r\n\r\n        public string _groupSound;\r\n\r\n        public string GroupSound\r\n        {\r\n            get { return _groupSound; }\r\n            set { SetField(ref _groupSound, value, () => GroupSound); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region In-App Notifications\r\n\r\n        public bool _inAppVibration = true;\r\n\r\n        public bool InAppVibration\r\n        {\r\n            get { return _inAppVibration; }\r\n            set { SetField(ref _inAppVibration, value, () => InAppVibration); }\r\n        }\r\n\r\n        public bool _inAppSound = true;\r\n\r\n        public bool InAppSound\r\n        {\r\n            get { return _inAppSound; }\r\n            set { SetField(ref _inAppSound, value, () => InAppSound); }\r\n        }\r\n\r\n        public bool _inAppMessagePreview = true;\r\n\r\n        public bool InAppMessagePreview\r\n        {\r\n            get { return _inAppMessagePreview; }\r\n            set { SetField(ref _inAppMessagePreview, value, () => InAppMessagePreview); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public bool _locationServices = false;\r\n\r\n        public bool LocationServices\r\n        {\r\n            get { return _locationServices; }\r\n            set { SetField(ref _locationServices, value, () => LocationServices); }\r\n        }\r\n\r\n        public bool _peopleHub = false;\r\n\r\n        public bool PeopleHub\r\n        {\r\n            get { return _peopleHub; }\r\n            set { SetField(ref _peopleHub, value, () => PeopleHub); }\r\n        }\r\n\r\n        public bool AskAllowingLocationServices = false;\r\n\r\n        public bool _saveIncomingPhotos = false;\r\n\r\n        public bool SaveIncomingPhotos\r\n        {\r\n            get { return _saveIncomingPhotos; }\r\n            set { SetField(ref _saveIncomingPhotos, value, () => SaveIncomingPhotos); }\r\n        }\r\n\r\n        public BackgroundItem _background;\r\n\r\n        public BackgroundItem Background\r\n        {\r\n            get { return _background; }\r\n            set { SetField(ref _background, value, () => Background); }\r\n        }\r\n\r\n        public bool SendByEnter { get; set; }\r\n\r\n        public bool InvisibleMode { get; set; }\r\n\r\n        public bool _contactJoined = true;\r\n\r\n        public bool ContactJoined\r\n        {\r\n            get { return _contactJoined; }\r\n            set { SetField(ref _contactJoined, value, () => ContactJoined); }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Models/UsersByFirstName.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n"
  },
  {
    "path": "TelegramClient/Models/UsersByLastName.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Models\r\n{\r\n    public class UsersByLastName : List<AlphaKeyGroup<TLUserBase>>\r\n    {\r\n        private readonly Dictionary<string, AlphaKeyGroup<TLUserBase>> _groups;\r\n\r\n        private const string Groups = \"абвгдеёжзийклмнопрстуфхцчшщъыьэюя#abcdefghijklmnopqrstuvwxyz\";\r\n\r\n        public int SumCount\r\n        {\r\n            get\r\n            {\r\n                var count = 0;\r\n                ForEach(x => count += x.Count);\r\n                return count;\r\n            }\r\n        }\r\n\r\n        public void AddUser(TLUserBase user)\r\n        {\r\n            var key = TLUserBase.GetLastNameKey(user);\r\n            var hasItem = _groups[key].IndexOf(user) != -1;\r\n            if (!hasItem)\r\n            {\r\n                _groups[key].Add(user);\r\n                //_groups[key].Sort(TLUserBase.CompareByLastName);\r\n            }\r\n        }\r\n\r\n        public void RemoveUser(TLUserBase user)\r\n        {\r\n            var key = TLUserBase.GetLastNameKey(user);\r\n            _groups[key].Remove(user);\r\n        }\r\n\r\n        public UsersByLastName(int hintsCount = 0, bool online = false, Dictionary<int, int> excludeUids = null)\r\n        {\r\n            var people = IoC.Get<ICacheService>().GetContacts();\r\n            people.Sort(TLUserBase.CompareByLastName);\r\n\r\n            _groups = new Dictionary<string, AlphaKeyGroup<TLUserBase>>();\r\n\r\n            //if (hintsCount > 0)\r\n            //{\r\n            //    var hints = people.Take(hintsCount).ToList();\r\n            //    var hintsGroup = new UsersInGroup(\"hints\");\r\n            //    Add(hintsGroup);\r\n            //    _groups[\"hints\"] = hintsGroup;\r\n            //    foreach (var hint in hints)\r\n            //    {\r\n            //        _groups[\"hints\"].Add(hint);\r\n            //    }\r\n            //}\r\n\r\n            foreach (var c in Groups)\r\n            {\r\n                var group = new AlphaKeyGroup<TLUserBase>(c.ToString());\r\n                Add(group);\r\n                _groups[c.ToString()] = group;\r\n            }\r\n\r\n            foreach (var person in people)\r\n            {\r\n                _groups[TLUserBase.GetLastNameKey(person)].Add(person);\r\n            }\r\n\r\n            //CacheService.Database.Storage.Commit();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Models/UsersInGroup.cs",
    "content": "﻿using System.Collections.Generic;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Models\r\n{\r\n    public class UsersInGroup : List<TLUserBase>\r\n    {\r\n        public UsersInGroup(string category)\r\n        {\r\n            Key = category;\r\n        }\r\n\r\n        public string Key { get; set; }\r\n\r\n        public bool HasItems { get { return Count > 0; } }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Properties/AppManifest.xml",
    "content": "﻿<Deployment xmlns=\"http://schemas.microsoft.com/client/2007/deployment\"\r\n        xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n>\r\n    <Deployment.Parts>\r\n    </Deployment.Parts>\r\n</Deployment>\r\n"
  },
  {
    "path": "TelegramClient/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Telegram\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"Telegram\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"eabe4ca4-103c-43cf-a229-51a20867cbcf\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en\")]\r\n"
  },
  {
    "path": "TelegramClient/Properties/WMAppManifest.Private.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2009/deployment\" AppPlatformVersion=\"7.1\">\r\n  <AppExtra xmlns=\"\" AppPlatformVersion=\"8.0\">\r\n    <Extra Name=\"Tiles\" />\r\n  </AppExtra>\r\n  <App xmlns=\"\" ProductID=\"{ce3550c4-15ba-4212-bb5f-a9af0059d775}\" Title=\"Telegram Private Beta\" RuntimeType=\"Silverlight\" Version=\"1.11.4.0\" Genre=\"apps.normal\" Author=\"Telegram Messenger LLC\" Description=\"Fast and secure messaging app\" Publisher=\"Telegram\">\r\n    <IconPath IsRelative=\"true\" IsResource=\"false\">ApplicationIcon99.png</IconPath>\r\n    <Capabilities>\r\n      <Capability Name=\"ID_CAP_GAMERSERVICES\" />\r\n      <Capability Name=\"ID_CAP_IDENTITY_DEVICE\" />\r\n      <Capability Name=\"ID_CAP_LOCATION\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB\" />\r\n      <Capability Name=\"ID_CAP_MICROPHONE\" />\r\n      <Capability Name=\"ID_CAP_NETWORKING\" />\r\n      <Capability Name=\"ID_CAP_PHONEDIALER\" />\r\n      <Capability Name=\"ID_CAP_PUSH_NOTIFICATION\" />\r\n      <Capability Name=\"ID_CAP_SENSORS\" />\r\n      <Capability Name=\"ID_CAP_WEBBROWSERCOMPONENT\" />\r\n      <Capability Name=\"ID_CAP_CONTACTS\" />\r\n      <Capability Name=\"ID_CAP_APPOINTMENTS\" />\r\n      <Capability Name=\"ID_CAP_ISV_CAMERA\" />\r\n    </Capabilities>\r\n    <Tasks>\r\n      <DefaultTask Name=\"_default\" NavigationPage=\"Views/ShellView.xaml\" />\r\n      <ExtendedTask Name=\"BackgroundTask\">\r\n        <BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"TelegramClient.ScheduledTaskAgent\" Source=\"TelegramClient.ScheduledTaskAgent\" Type=\"TelegramClient.ScheduledTaskAgent.ScheduledAgent\" />\r\n      </ExtendedTask>\r\n    </Tasks>\r\n    <Tokens>\r\n      <PrimaryToken TokenID=\"TelegramClientToken\" TaskName=\"_default\">\r\n        <TemplateType5>\r\n          <BackgroundImageURI IsRelative=\"true\" IsResource=\"false\">FlipCycleTileSmall159.png</BackgroundImageURI>\r\n          <Count>0</Count>\r\n          <Title>Telegram</Title>\r\n        </TemplateType5>\r\n      </PrimaryToken>\r\n    </Tokens>\r\n    <Extensions>\r\n      <Extension ExtensionName=\"Photos_Extra_Share\" ConsumerID=\"{5B04B775-356B-4AA0-AAF8-6491FFEA5632}\" TaskID=\"_default\" />\r\n    </Extensions>\r\n  </App>\r\n</Deployment>"
  },
  {
    "path": "TelegramClient/Properties/WMAppManifest.Public.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2009/deployment\" AppPlatformVersion=\"7.1\">\r\n  <AppExtra xmlns=\"\" AppPlatformVersion=\"8.0\">\r\n    <Extra Name=\"Tiles\" />\r\n  </AppExtra>\r\n  <App xmlns=\"\" ProductID=\"{ce3550c4-15ba-4212-bb5f-a9af0059d775}\" Title=\"Telegram Messenger Beta\" RuntimeType=\"Silverlight\" Version=\"1.11.4.0\" Genre=\"apps.normal\" Author=\"Telegram Messenger LLC\" Description=\"Fast and secure messaging app\" Publisher=\"Telegram\">\r\n    <IconPath IsRelative=\"true\" IsResource=\"false\">ApplicationIcon99.png</IconPath>\r\n    <Capabilities>\r\n      <Capability Name=\"ID_CAP_GAMERSERVICES\" />\r\n      <Capability Name=\"ID_CAP_IDENTITY_DEVICE\" />\r\n      <Capability Name=\"ID_CAP_LOCATION\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB\" />\r\n      <Capability Name=\"ID_CAP_MICROPHONE\" />\r\n      <Capability Name=\"ID_CAP_NETWORKING\" />\r\n      <Capability Name=\"ID_CAP_PHONEDIALER\" />\r\n      <Capability Name=\"ID_CAP_PUSH_NOTIFICATION\" />\r\n      <Capability Name=\"ID_CAP_SENSORS\" />\r\n      <Capability Name=\"ID_CAP_WEBBROWSERCOMPONENT\" />\r\n      <Capability Name=\"ID_CAP_CONTACTS\" />\r\n      <Capability Name=\"ID_CAP_APPOINTMENTS\" />\r\n      <Capability Name=\"ID_CAP_ISV_CAMERA\" />\r\n    </Capabilities>\r\n    <Tasks>\r\n      <DefaultTask Name=\"_default\" NavigationPage=\"Views/ShellView.xaml\" />\r\n      <ExtendedTask Name=\"BackgroundTask\">\r\n        <BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"TelegramClient.ScheduledTaskAgent\" Source=\"TelegramClient.ScheduledTaskAgent\" Type=\"TelegramClient.ScheduledTaskAgent.ScheduledAgent\" />\r\n      </ExtendedTask>\r\n    </Tasks>\r\n    <Tokens>\r\n      <PrimaryToken TokenID=\"TelegramClientToken\" TaskName=\"_default\">\r\n        <TemplateType5>\r\n          <BackgroundImageURI IsRelative=\"true\" IsResource=\"false\">FlipCycleTileSmall159.png</BackgroundImageURI>\r\n          <Count>0</Count>\r\n          <Title>Telegram</Title>\r\n        </TemplateType5>\r\n      </PrimaryToken>\r\n    </Tokens>\r\n    <Extensions>\r\n      <Extension ExtensionName=\"Photos_Extra_Share\" ConsumerID=\"{5B04B775-356B-4AA0-AAF8-6491FFEA5632}\" TaskID=\"_default\" />\r\n    </Extensions>\r\n  </App>\r\n</Deployment>"
  },
  {
    "path": "TelegramClient/Properties/WMAppManifest.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2009/deployment\" AppPlatformVersion=\"7.1\">\r\n  <AppExtra xmlns=\"\" AppPlatformVersion=\"8.0\">\r\n    <Extra Name=\"Tiles\" />\r\n  </AppExtra>\r\n  <App xmlns=\"\" ProductID=\"{ce3550c4-15ba-4212-bb5f-a9af0059d775}\" Title=\"Telegram Messenger Beta\" RuntimeType=\"Silverlight\" Version=\"1.11.4.0\" Genre=\"apps.normal\" Author=\"Telegram Messenger LLC\" Description=\"Fast and secure messaging app\" Publisher=\"Telegram\">\r\n    <IconPath IsRelative=\"true\" IsResource=\"false\">ApplicationIcon99.png</IconPath>\r\n    <Capabilities>\r\n      <Capability Name=\"ID_CAP_GAMERSERVICES\" />\r\n      <Capability Name=\"ID_CAP_IDENTITY_DEVICE\" />\r\n      <Capability Name=\"ID_CAP_LOCATION\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB\" />\r\n      <Capability Name=\"ID_CAP_MICROPHONE\" />\r\n      <Capability Name=\"ID_CAP_NETWORKING\" />\r\n      <Capability Name=\"ID_CAP_PHONEDIALER\" />\r\n      <Capability Name=\"ID_CAP_PUSH_NOTIFICATION\" />\r\n      <Capability Name=\"ID_CAP_SENSORS\" />\r\n      <Capability Name=\"ID_CAP_WEBBROWSERCOMPONENT\" />\r\n      <Capability Name=\"ID_CAP_CONTACTS\" />\r\n      <Capability Name=\"ID_CAP_APPOINTMENTS\" />\r\n      <Capability Name=\"ID_CAP_ISV_CAMERA\" />\r\n    </Capabilities>\r\n    <Tasks>\r\n      <DefaultTask Name=\"_default\" NavigationPage=\"Views/ShellView.xaml\" />\r\n      <ExtendedTask Name=\"BackgroundTask\">\r\n        <BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"TelegramClient.ScheduledTaskAgent\" Source=\"TelegramClient.ScheduledTaskAgent\" Type=\"TelegramClient.ScheduledTaskAgent.ScheduledAgent\" />\r\n      </ExtendedTask>\r\n    </Tasks>\r\n    <Tokens>\r\n      <PrimaryToken TokenID=\"TelegramClientToken\" TaskName=\"_default\">\r\n        <TemplateType5>\r\n          <BackgroundImageURI IsRelative=\"true\" IsResource=\"false\">FlipCycleTileSmall159.png</BackgroundImageURI>\r\n          <Count>0</Count>\r\n          <Title>Telegram</Title>\r\n        </TemplateType5>\r\n      </PrimaryToken>\r\n    </Tokens>\r\n    <Extensions>\r\n      <Extension ExtensionName=\"Photos_Extra_Share\" ConsumerID=\"{5B04B775-356B-4AA0-AAF8-6491FFEA5632}\" TaskID=\"_default\" />\r\n    </Extensions>\r\n  </App>\r\n</Deployment>"
  },
  {
    "path": "TelegramClient/Resources/AppResources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code was generated by a tool.\r\n//     Runtime Version:4.0.30319.42000\r\n//\r\n//     Changes to this file may cause incorrect behavior and will be lost if\r\n//     the code is regenerated.\r\n// </auto-generated>\r\n//------------------------------------------------------------------------------\r\n\r\nnamespace TelegramClient.Resources {\r\n    using System;\r\n    \r\n    \r\n    /// <summary>\r\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\r\n    /// </summary>\r\n    // This class was auto-generated by the StronglyTypedResourceBuilder\r\n    // class via a tool like ResGen or Visual Studio.\r\n    // To add or remove a member, edit your .ResX file then rerun ResGen\r\n    // with the /str option, or rebuild your VS project.\r\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"4.0.0.0\")]\r\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r\n    public class AppResources {\r\n        \r\n        private static global::System.Resources.ResourceManager resourceMan;\r\n        \r\n        private static global::System.Globalization.CultureInfo resourceCulture;\r\n        \r\n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n        internal AppResources() {\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Returns the cached ResourceManager instance used by this class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        public static global::System.Resources.ResourceManager ResourceManager {\r\n            get {\r\n                if (object.ReferenceEquals(resourceMan, null)) {\r\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"TelegramClient.Resources.AppResources\", typeof(AppResources).Assembly);\r\n                    resourceMan = temp;\r\n                }\r\n                return resourceMan;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Overrides the current thread's CurrentUICulture property for all\r\n        ///   resource lookups using this strongly typed resource class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        public static global::System.Globalization.CultureInfo Culture {\r\n            get {\r\n                return resourceCulture;\r\n            }\r\n            set {\r\n                resourceCulture = value;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Abort Two-Step Verification Setup.\r\n        /// </summary>\r\n        public static string AbortTwoStepVerificationSetup {\r\n            get {\r\n                return ResourceManager.GetString(\"AbortTwoStepVerificationSetup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to About.\r\n        /// </summary>\r\n        public static string About {\r\n            get {\r\n                return ResourceManager.GetString(\"About\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to About.\r\n        /// </summary>\r\n        public static string AboutApp {\r\n            get {\r\n                return ResourceManager.GetString(\"AboutApp\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can provide an optional description for your channel..\r\n        /// </summary>\r\n        public static string AboutDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"AboutDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Telegram Messenger is a messaging service with a focus on speed and security. It’s superfast, simple and free..\r\n        /// </summary>\r\n        public static string AboutText1 {\r\n            get {\r\n                return ResourceManager.GetString(\"AboutText1\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to For real-time support, please go to settings in Telegram and select “Ask a Question” to send a message directly to our support staff. You can also email us at support@telegram.org..\r\n        /// </summary>\r\n        public static string AboutText2 {\r\n            get {\r\n                return ResourceManager.GetString(\"AboutText2\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to A camera is not supported on this device..\r\n        /// </summary>\r\n        public static string ACameraIsNotSupportedOnThisDevice {\r\n            get {\r\n                return ResourceManager.GetString(\"ACameraIsNotSupportedOnThisDevice\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Can&apos;t access current camera.\r\n        /// </summary>\r\n        public static string AccessCameraException {\r\n            get {\r\n                return ResourceManager.GetString(\"AccessCameraException\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Access level.\r\n        /// </summary>\r\n        public static string AccessLevel {\r\n            get {\r\n                return ResourceManager.GetString(\"AccessLevel\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to If you do not come online at least once within this period, your account will be deleted along with all groups, messages and contacts..\r\n        /// </summary>\r\n        public static string AccountSelfDestrucsDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"AccountSelfDestrucsDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Account Self-Destructs.\r\n        /// </summary>\r\n        public static string AccountSelfDestructs {\r\n            get {\r\n                return ResourceManager.GetString(\"AccountSelfDestructs\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add.\r\n        /// </summary>\r\n        public static string Add {\r\n            get {\r\n                return ResourceManager.GetString(\"Add\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add administrator.\r\n        /// </summary>\r\n        public static string AddAdministrator {\r\n            get {\r\n                return ResourceManager.GetString(\"AddAdministrator\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This bot can&apos;t join groups..\r\n        /// </summary>\r\n        public static string AddBotToGroupsError {\r\n            get {\r\n                return ResourceManager.GetString(\"AddBotToGroupsError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add the bot to &quot;{0}&quot;?.\r\n        /// </summary>\r\n        public static string AddBotToTheGroup {\r\n            get {\r\n                return ResourceManager.GetString(\"AddBotToTheGroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add a caption....\r\n        /// </summary>\r\n        public static string AddCaption {\r\n            get {\r\n                return ResourceManager.GetString(\"AddCaption\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can&apos;t add this user because you have contacted too many non-contacts today. Please try again tomorrow. You can ask another member to add this user to the group..\r\n        /// </summary>\r\n        public static string AddChatUserFloodWait {\r\n            get {\r\n                return ResourceManager.GetString(\"AddChatUserFloodWait\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add.\r\n        /// </summary>\r\n        public static string AddContact {\r\n            get {\r\n                return ResourceManager.GetString(\"AddContact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to add {0} as editor?.\r\n        /// </summary>\r\n        public static string AddEditorConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"AddEditorConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add exceptions.\r\n        /// </summary>\r\n        public static string AddExceptions {\r\n            get {\r\n                return ResourceManager.GetString(\"AddExceptions\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add manager.\r\n        /// </summary>\r\n        public static string AddManager {\r\n            get {\r\n                return ResourceManager.GetString(\"AddManager\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to add {0} as moderator?.\r\n        /// </summary>\r\n        public static string AddModeratorConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"AddModeratorConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Who can add new members?.\r\n        /// </summary>\r\n        public static string AddNewMembers {\r\n            get {\r\n                return ResourceManager.GetString(\"AddNewMembers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add an optional comment.\r\n        /// </summary>\r\n        public static string AddOptionalComment {\r\n            get {\r\n                return ResourceManager.GetString(\"AddOptionalComment\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add member.\r\n        /// </summary>\r\n        public static string AddParticipant {\r\n            get {\r\n                return ResourceManager.GetString(\"AddParticipant\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add photo.\r\n        /// </summary>\r\n        public static string AddPhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"AddPhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add Proxy.\r\n        /// </summary>\r\n        public static string AddProxy {\r\n            get {\r\n                return ResourceManager.GetString(\"AddProxy\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Address 1 (Street).\r\n        /// </summary>\r\n        public static string Address1Street {\r\n            get {\r\n                return ResourceManager.GetString(\"Address1Street\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Address 2 (Street).\r\n        /// </summary>\r\n        public static string Address2Street {\r\n            get {\r\n                return ResourceManager.GetString(\"Address2Street\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Do you want to add stickers &apos;{0}&apos;?.\r\n        /// </summary>\r\n        public static string AddStickersConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"AddStickersConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add to contacts.\r\n        /// </summary>\r\n        public static string AddToContacts {\r\n            get {\r\n                return ResourceManager.GetString(\"AddToContacts\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add to Favorites.\r\n        /// </summary>\r\n        public static string AddToFavorites {\r\n            get {\r\n                return ResourceManager.GetString(\"AddToFavorites\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add to Group.\r\n        /// </summary>\r\n        public static string AddToGroup {\r\n            get {\r\n                return ResourceManager.GetString(\"AddToGroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add to Stickers.\r\n        /// </summary>\r\n        public static string AddToStickers {\r\n            get {\r\n                return ResourceManager.GetString(\"AddToStickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to make {0} an administrator?.\r\n        /// </summary>\r\n        public static string AddUserAsAdministrator {\r\n            get {\r\n                return ResourceManager.GetString(\"AddUserAsAdministrator\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add {0} to the group &quot;{1}&quot;?.\r\n        /// </summary>\r\n        public static string AddUserToTheGroup {\r\n            get {\r\n                return ResourceManager.GetString(\"AddUserToTheGroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Admin.\r\n        /// </summary>\r\n        public static string Admin {\r\n            get {\r\n                return ResourceManager.GetString(\"Admin\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Administration.\r\n        /// </summary>\r\n        public static string Administration {\r\n            get {\r\n                return ResourceManager.GetString(\"Administration\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Administrators.\r\n        /// </summary>\r\n        public static string Administrators {\r\n            get {\r\n                return ResourceManager.GetString(\"Administrators\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group admins can add and remove members, edit name and photo of the group.\r\n        /// </summary>\r\n        public static string AdminsDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"AdminsDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, too many adminstrators in this group..\r\n        /// </summary>\r\n        public static string AdminsTooMuch {\r\n            get {\r\n                return ResourceManager.GetString(\"AdminsTooMuch\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Album.\r\n        /// </summary>\r\n        public static string Album {\r\n            get {\r\n                return ResourceManager.GetString(\"Album\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Alert.\r\n        /// </summary>\r\n        public static string Alert {\r\n            get {\r\n                return ResourceManager.GetString(\"Alert\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to All contacts.\r\n        /// </summary>\r\n        public static string AllContacts {\r\n            get {\r\n                return ResourceManager.GetString(\"AllContacts\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to All members.\r\n        /// </summary>\r\n        public static string AllMembers {\r\n            get {\r\n                return ResourceManager.GetString(\"AllMembers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to All members are admins.\r\n        /// </summary>\r\n        public static string AllMembersAreAdmins {\r\n            get {\r\n                return ResourceManager.GetString(\"AllMembersAreAdmins\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Allow access to location?.\r\n        /// </summary>\r\n        public static string AllowLocationServicesTitle {\r\n            get {\r\n                return ResourceManager.GetString(\"AllowLocationServicesTitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Allow access to your current location? This can be changed later in app settings..\r\n        /// </summary>\r\n        public static string AllowLocationServiceText {\r\n            get {\r\n                return ResourceManager.GetString(\"AllowLocationServiceText\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to All sets.\r\n        /// </summary>\r\n        public static string AllSets {\r\n            get {\r\n                return ResourceManager.GetString(\"AllSets\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Almost there!.\r\n        /// </summary>\r\n        public static string AlmostThere {\r\n            get {\r\n                return ResourceManager.GetString(\"AlmostThere\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Always allow.\r\n        /// </summary>\r\n        public static string AlwaysAllow {\r\n            get {\r\n                return ResourceManager.GetString(\"AlwaysAllow\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Always Share.\r\n        /// </summary>\r\n        public static string AlwaysShare {\r\n            get {\r\n                return ResourceManager.GetString(\"AlwaysShare\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Always share with users....\r\n        /// </summary>\r\n        public static string AlwaysShareWirhUsers {\r\n            get {\r\n                return ResourceManager.GetString(\"AlwaysShareWirhUsers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Always Share With.\r\n        /// </summary>\r\n        public static string AlwaysShareWith {\r\n            get {\r\n                return ResourceManager.GetString(\"AlwaysShareWith\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to And {0} others.\r\n        /// </summary>\r\n        public static string AndOthers {\r\n            get {\r\n                return ResourceManager.GetString(\"AndOthers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Animated.\r\n        /// </summary>\r\n        public static string Animated {\r\n            get {\r\n                return ResourceManager.GetString(\"Animated\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Answer.\r\n        /// </summary>\r\n        public static string Answer {\r\n            get {\r\n                return ResourceManager.GetString(\"Answer\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Application background.\r\n        /// </summary>\r\n        public static string ApplicationBackground {\r\n            get {\r\n                return ResourceManager.GetString(\"ApplicationBackground\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Select background image for chats.\r\n        /// </summary>\r\n        public static string ApplicationBackgroundSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"ApplicationBackgroundSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Telegram.\r\n        /// </summary>\r\n        public static string AppName {\r\n            get {\r\n                return ResourceManager.GetString(\"AppName\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Archive.\r\n        /// </summary>\r\n        public static string Archive {\r\n            get {\r\n                return ResourceManager.GetString(\"Archive\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Archived stickers.\r\n        /// </summary>\r\n        public static string ArchivedStickers {\r\n            get {\r\n                return ResourceManager.GetString(\"ArchivedStickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Some of the your unused stickers have been archived to make room for the sets you&apos;ve activated..\r\n        /// </summary>\r\n        public static string ArchivedStickersAbout {\r\n            get {\r\n                return ResourceManager.GetString(\"ArchivedStickersAbout\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can have up to 200 sticker sets installed. Unused stickers are archived when you add more..\r\n        /// </summary>\r\n        public static string ArchivedStickersHeader {\r\n            get {\r\n                return ResourceManager.GetString(\"ArchivedStickersHeader\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are typing.\r\n        /// </summary>\r\n        public static string AreTyping {\r\n            get {\r\n                return ResourceManager.GetString(\"AreTyping\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Ask a Question.\r\n        /// </summary>\r\n        public static string AskAQuestion {\r\n            get {\r\n                return ResourceManager.GetString(\"AskAQuestion\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please note that Telegram Support is done by volunteers. We try to respond as quickly as possible, but it may take a while. Please take a look at the &lt;![CDATA[&lt;a href=&quot;https://telegram.org/faq#general&quot;&gt;Telegram FAQ&lt;/a&gt;]]&gt;: it has answers to most questions and important tips for &lt;![CDATA[&lt;a href=&quot;https://telegram.org/faq#troubleshooting&quot;&gt;troubleshooting&lt;/a&gt;]]&gt;..\r\n        /// </summary>\r\n        public static string AskAQuestionDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"AskAQuestionDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Ask a volunteer.\r\n        /// </summary>\r\n        public static string AskAVolunteer {\r\n            get {\r\n                return ResourceManager.GetString(\"AskAVolunteer\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Attach.\r\n        /// </summary>\r\n        public static string Attach {\r\n            get {\r\n                return ResourceManager.GetString(\"Attach\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Attach something.\r\n        /// </summary>\r\n        public static string AttachCaption {\r\n            get {\r\n                return ResourceManager.GetString(\"AttachCaption\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Attached stickers.\r\n        /// </summary>\r\n        public static string AttachedStickers {\r\n            get {\r\n                return ResourceManager.GetString(\"AttachedStickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sharing with {0}.\r\n        /// </summary>\r\n        public static string AttachLiveLocationIsSharing {\r\n            get {\r\n                return ResourceManager.GetString(\"AttachLiveLocationIsSharing\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Audio.\r\n        /// </summary>\r\n        public static string Audio {\r\n            get {\r\n                return ResourceManager.GetString(\"Audio\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Authorize.\r\n        /// </summary>\r\n        public static string Authorize {\r\n            get {\r\n                return ResourceManager.GetString(\"Authorize\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Auto.\r\n        /// </summary>\r\n        public static string Auto {\r\n            get {\r\n                return ResourceManager.GetString(\"Auto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Auto-lock.\r\n        /// </summary>\r\n        public static string Autolock {\r\n            get {\r\n                return ResourceManager.GetString(\"Autolock\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Disabled.\r\n        /// </summary>\r\n        public static string AutolockDisabled {\r\n            get {\r\n                return ResourceManager.GetString(\"AutolockDisabled\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Audio Auto-Download.\r\n        /// </summary>\r\n        public static string AutomaticAudioDownload {\r\n            get {\r\n                return ResourceManager.GetString(\"AutomaticAudioDownload\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to GIF Auto-Download.\r\n        /// </summary>\r\n        public static string AutomaticGifDownload {\r\n            get {\r\n                return ResourceManager.GetString(\"AutomaticGifDownload\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Photo Auto-Download.\r\n        /// </summary>\r\n        public static string AutomaticPhotoDownload {\r\n            get {\r\n                return ResourceManager.GetString(\"AutomaticPhotoDownload\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Autoplay GIFs.\r\n        /// </summary>\r\n        public static string AutoplayGifs {\r\n            get {\r\n                return ResourceManager.GetString(\"AutoplayGifs\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Available.\r\n        /// </summary>\r\n        public static string Available {\r\n            get {\r\n                return ResourceManager.GetString(\"Available\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Back.\r\n        /// </summary>\r\n        public static string Back {\r\n            get {\r\n                return ResourceManager.GetString(\"Back\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You disabled background task for Telegram Messenger. You will not receive Telegram message alerts when background task is disabled. Please allow app to run in the background..\r\n        /// </summary>\r\n        public static string BackgroudnTaskDisabledAlert {\r\n            get {\r\n                return ResourceManager.GetString(\"BackgroudnTaskDisabledAlert\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Background.\r\n        /// </summary>\r\n        public static string Background {\r\n            get {\r\n                return ResourceManager.GetString(\"Background\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Backgrounds.\r\n        /// </summary>\r\n        public static string Backgrounds {\r\n            get {\r\n                return ResourceManager.GetString(\"Backgrounds\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Ban user.\r\n        /// </summary>\r\n        public static string BanUser {\r\n            get {\r\n                return ResourceManager.GetString(\"BanUser\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your device is running in Battery Saver mode. You will not receive Telegram message alerts when Battery Saver mode is enabled. Please disable Battery Saver mode..\r\n        /// </summary>\r\n        public static string BatterySaverModeAlert {\r\n            get {\r\n                return ResourceManager.GetString(\"BatterySaverModeAlert\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Billing address.\r\n        /// </summary>\r\n        public static string BillingAddress {\r\n            get {\r\n                return ResourceManager.GetString(\"BillingAddress\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Bio.\r\n        /// </summary>\r\n        public static string Bio {\r\n            get {\r\n                return ResourceManager.GetString(\"Bio\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can add a few lines about yourself.\r\n        ///Anyone who opens your profile will see this text..\r\n        /// </summary>\r\n        public static string BioDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"BioDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Blacklist.\r\n        /// </summary>\r\n        public static string Blacklist {\r\n            get {\r\n                return ResourceManager.GetString(\"Blacklist\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Block.\r\n        /// </summary>\r\n        public static string BlockContact {\r\n            get {\r\n                return ResourceManager.GetString(\"BlockContact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to block this contact?.\r\n        /// </summary>\r\n        public static string BlockContactConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"BlockContactConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Blacklist.\r\n        /// </summary>\r\n        public static string BlockedUsers {\r\n            get {\r\n                return ResourceManager.GetString(\"BlockedUsers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Blocked users are removed from the group and can only come back if invited by an admin. Invite links don&apos;t work for them..\r\n        /// </summary>\r\n        public static string BlockedUsersDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"BlockedUsersDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Bot.\r\n        /// </summary>\r\n        public static string Bot {\r\n            get {\r\n                return ResourceManager.GetString(\"Bot\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The bot {0} asks for permission to share your Telegram name and profile picture with the owner of {1}..\r\n        /// </summary>\r\n        public static string BotOpenUrlConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"BotOpenUrlConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Bots.\r\n        /// </summary>\r\n        public static string Bots {\r\n            get {\r\n                return ResourceManager.GetString(\"Bots\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, too many bots in this group..\r\n        /// </summary>\r\n        public static string BotsTooMuch {\r\n            get {\r\n                return ResourceManager.GetString(\"BotsTooMuch\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cache.\r\n        /// </summary>\r\n        public static string Cache {\r\n            get {\r\n                return ResourceManager.GetString(\"Cache\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cache settings.\r\n        /// </summary>\r\n        public static string CacheSettings {\r\n            get {\r\n                return ResourceManager.GetString(\"CacheSettings\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Calculating.\r\n        /// </summary>\r\n        public static string Calculating {\r\n            get {\r\n                return ResourceManager.GetString(\"Calculating\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Call.\r\n        /// </summary>\r\n        public static string Call {\r\n            get {\r\n                return ResourceManager.GetString(\"Call\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Calling....\r\n        /// </summary>\r\n        public static string Calling {\r\n            get {\r\n                return ResourceManager.GetString(\"Calling\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You currently have an ongoing call with {0}..\r\n        /// </summary>\r\n        public static string CallInProgressNotification {\r\n            get {\r\n                return ResourceManager.GetString(\"CallInProgressNotification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Calls.\r\n        /// </summary>\r\n        public static string Calls {\r\n            get {\r\n                return ResourceManager.GetString(\"Calls\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Who can call me?.\r\n        /// </summary>\r\n        public static string CallsPrivacyDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"CallsPrivacyDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can restrict who can call you..\r\n        /// </summary>\r\n        public static string CallsPrivacyImportantNote {\r\n            get {\r\n                return ResourceManager.GetString(\"CallsPrivacyImportantNote\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to These users will or will not be able to call you regardless of the settings above..\r\n        /// </summary>\r\n        public static string CallsPrivacyOverrideNote {\r\n            get {\r\n                return ResourceManager.GetString(\"CallsPrivacyOverrideNote\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Camcorder.\r\n        /// </summary>\r\n        public static string Camcorder {\r\n            get {\r\n                return ResourceManager.GetString(\"Camcorder\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Camera.\r\n        /// </summary>\r\n        public static string Camera {\r\n            get {\r\n                return ResourceManager.GetString(\"Camera\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Camera Roll.\r\n        /// </summary>\r\n        public static string CameraRollFolder {\r\n            get {\r\n                return ResourceManager.GetString(\"CameraRollFolder\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Manage camera settings.\r\n        /// </summary>\r\n        public static string CameraSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"CameraSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cancel.\r\n        /// </summary>\r\n        public static string Cancel {\r\n            get {\r\n                return ResourceManager.GetString(\"Cancel\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cancel account reset.\r\n        /// </summary>\r\n        public static string CancelAccountReset {\r\n            get {\r\n                return ResourceManager.GetString(\"CancelAccountReset\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Somebody with access to your phone number **{0}** has requested to delete your Telegram account and reset your 2-Step Verification password. If this wasn’t you, please enter the code we’ve just sent you via SMS to your number **{0}**.\r\n        /// </summary>\r\n        public static string CancelAccountResetDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"CancelAccountResetDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Success! The deletion process was cancelled for your account {0}. You may close this window now..\r\n        /// </summary>\r\n        public static string CancelAccountResetSuccess {\r\n            get {\r\n                return ResourceManager.GetString(\"CancelAccountResetSuccess\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Canceled call.\r\n        /// </summary>\r\n        public static string CanceledCall {\r\n            get {\r\n                return ResourceManager.GetString(\"CanceledCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, can&apos;t find a Telegram user with username @{0}.\r\n        /// </summary>\r\n        public static string CantFindContactWithUsername {\r\n            get {\r\n                return ResourceManager.GetString(\"CantFindContactWithUsername\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Card Number.\r\n        /// </summary>\r\n        public static string CardNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"CardNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Change number.\r\n        /// </summary>\r\n        public static string ChangeNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"ChangeNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Change passcode.\r\n        /// </summary>\r\n        public static string ChangePasscode {\r\n            get {\r\n                return ResourceManager.GetString(\"ChangePasscode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to When you set up an additional passcode, a lock icon will appear on the chats page. Tap it to lock and unlock the app.\r\n        ///\r\n        ///Note: if you forget the passcode, you&apos;ll need to delete and reinstall the app. All secret chats will be lost..\r\n        /// </summary>\r\n        public static string ChangePasscodeHint {\r\n            get {\r\n                return ResourceManager.GetString(\"ChangePasscodeHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Change password.\r\n        /// </summary>\r\n        public static string ChangePassword {\r\n            get {\r\n                return ResourceManager.GetString(\"ChangePassword\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can set a password that will be required when you log in from a new device in addition to a pin number you will receive in an SMS..\r\n        /// </summary>\r\n        public static string ChangePasswordHint {\r\n            get {\r\n                return ResourceManager.GetString(\"ChangePasswordHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Set proxy.\r\n        /// </summary>\r\n        public static string ChangeProxy {\r\n            get {\r\n                return ResourceManager.GetString(\"ChangeProxy\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can change your proxy server later in the Settings..\r\n        /// </summary>\r\n        public static string ChangeProxyServerHint {\r\n            get {\r\n                return ResourceManager.GetString(\"ChangeProxyServerHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Change recovery e-mail.\r\n        /// </summary>\r\n        public static string ChangeRecoveryEmail {\r\n            get {\r\n                return ResourceManager.GetString(\"ChangeRecoveryEmail\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channel.\r\n        /// </summary>\r\n        public static string Channel {\r\n            get {\r\n                return ResourceManager.GetString(\"Channel\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can add administrators to help you manage your channel. Tap and hold to remove admins..\r\n        /// </summary>\r\n        public static string ChannelAdministratorsHint {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelAdministratorsHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channels.\r\n        /// </summary>\r\n        public static string ChannelGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channel.\r\n        /// </summary>\r\n        public static string ChannelGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this channel is no longer accessible..\r\n        /// </summary>\r\n        public static string ChannelIsNoLongerAccessible {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelIsNoLongerAccessible\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Only channel administrators can see this list..\r\n        /// </summary>\r\n        public static string ChannelMembersHint {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelMembersHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channel name.\r\n        /// </summary>\r\n        public static string ChannelName {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelName\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can choose a channel name on Telegram. If you do, other people will be able to find your channel by this username.\r\n        ///\r\n        ///You can use a-z, 0-9 and underscores. Minimum length is 5 characters..\r\n        /// </summary>\r\n        public static string ChannelNameDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelNameDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This link opens your channel in Telegram:.\r\n        /// </summary>\r\n        public static string ChannelNameDescription2 {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelNameDescription2\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this name is invalid..\r\n        /// </summary>\r\n        public static string ChannelNameInvalid {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelNameInvalid\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this name is already taken..\r\n        /// </summary>\r\n        public static string ChannelNameOccupied {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelNameOccupied\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channel names must have at least 5 characters..\r\n        /// </summary>\r\n        public static string ChannelNameShort {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelNameShort\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channel names can&apos;t start with a number..\r\n        /// </summary>\r\n        public static string ChannelNameStartsWithNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelNameStartsWithNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channels.\r\n        /// </summary>\r\n        public static string ChannelNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channel.\r\n        /// </summary>\r\n        public static string ChannelNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, you have reserved too many public usernames. You can revoke the link from one of your older groups or channels, or create a private entity instead..\r\n        /// </summary>\r\n        public static string ChannelsAdminPublicTooMuch {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelsAdminPublicTooMuch\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Too many public channels..\r\n        /// </summary>\r\n        public static string ChannelsAdminPublicTooMuchShort {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelsAdminPublicTooMuchShort\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, you have created or joined too many channels..\r\n        /// </summary>\r\n        public static string ChannelsTooMuch {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelsTooMuch\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channel Type.\r\n        /// </summary>\r\n        public static string ChannelType {\r\n            get {\r\n                return ResourceManager.GetString(\"ChannelType\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chat.\r\n        /// </summary>\r\n        public static string Chat {\r\n            get {\r\n                return ResourceManager.GetString(\"Chat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chats.\r\n        /// </summary>\r\n        public static string ChatGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chat.\r\n        /// </summary>\r\n        public static string ChatGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chat history for new members.\r\n        /// </summary>\r\n        public static string ChatHistoryCaption {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatHistoryCaption\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New members will not see previous messages.\r\n        /// </summary>\r\n        public static string ChatHistoryHidden {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatHistoryHidden\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New members will see full chat history.\r\n        /// </summary>\r\n        public static string ChatHistoryVisible {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatHistoryVisible\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0}, among them:.\r\n        /// </summary>\r\n        public static string ChatInviteSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatInviteSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You will be able to add more users after you finish creating the group and convert it to a supergroup..\r\n        /// </summary>\r\n        public static string ChatMaxSizeNotification {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatMaxSizeNotification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chats.\r\n        /// </summary>\r\n        public static string ChatNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chat.\r\n        /// </summary>\r\n        public static string ChatNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chat notifications.\r\n        /// </summary>\r\n        public static string ChatNotifications {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatNotifications\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chats and Contacts.\r\n        /// </summary>\r\n        public static string ChatsAndContacts {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatsAndContacts\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chat Settings.\r\n        /// </summary>\r\n        public static string ChatSettings {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatSettings\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Media, background, cache.\r\n        /// </summary>\r\n        public static string ChatSettingsSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatSettingsSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chat with yourself.\r\n        /// </summary>\r\n        public static string ChatWithYourself {\r\n            get {\r\n                return ResourceManager.GetString(\"ChatWithYourself\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Checking.\r\n        /// </summary>\r\n        public static string Checking {\r\n            get {\r\n                return ResourceManager.GetString(\"Checking\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Checking username....\r\n        /// </summary>\r\n        public static string CheckingUsername {\r\n            get {\r\n                return ResourceManager.GetString(\"CheckingUsername\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Checkout.\r\n        /// </summary>\r\n        public static string Checkout {\r\n            get {\r\n                return ResourceManager.GetString(\"Checkout\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Choose an item.\r\n        /// </summary>\r\n        public static string ChooseAnItem {\r\n            get {\r\n                return ResourceManager.GetString(\"ChooseAnItem\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Choose a different card.\r\n        /// </summary>\r\n        public static string ChooseDifferentCard {\r\n            get {\r\n                return ResourceManager.GetString(\"ChooseDifferentCard\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Choose from your stickers.\r\n        /// </summary>\r\n        public static string ChooseFromYourStickers {\r\n            get {\r\n                return ResourceManager.GetString(\"ChooseFromYourStickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Choose manually.\r\n        /// </summary>\r\n        public static string ChooseManually {\r\n            get {\r\n                return ResourceManager.GetString(\"ChooseManually\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please choose a link for your public channel, so that people can find it in search and share with others.\r\n        ///\r\n        ///If you&apos;re not interested, we suggest creating a private channel instead..\r\n        /// </summary>\r\n        public static string ChoosePublicChannelLinkNotification {\r\n            get {\r\n                return ResourceManager.GetString(\"ChoosePublicChannelLinkNotification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please choose a link for your public group, so that people can find it in search and share with others..\r\n        /// </summary>\r\n        public static string ChoosePublicGroupLinkNotification {\r\n            get {\r\n                return ResourceManager.GetString(\"ChoosePublicGroupLinkNotification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Choose your camera app.\r\n        /// </summary>\r\n        public static string ChooseYourCameraApp {\r\n            get {\r\n                return ResourceManager.GetString(\"ChooseYourCameraApp\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Choose your country.\r\n        /// </summary>\r\n        public static string ChooseYourCountry {\r\n            get {\r\n                return ResourceManager.GetString(\"ChooseYourCountry\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Choose your photo picker app.\r\n        /// </summary>\r\n        public static string ChooseYourPhotoPickerApp {\r\n            get {\r\n                return ResourceManager.GetString(\"ChooseYourPhotoPickerApp\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to City.\r\n        /// </summary>\r\n        public static string City {\r\n            get {\r\n                return ResourceManager.GetString(\"City\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Clear.\r\n        /// </summary>\r\n        public static string Clear {\r\n            get {\r\n                return ResourceManager.GetString(\"Clear\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Clear all.\r\n        /// </summary>\r\n        public static string ClearAll {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearAll\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Clear Cache.\r\n        /// </summary>\r\n        public static string ClearCache {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearCache\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete all cached text and media from this channel?.\r\n        /// </summary>\r\n        public static string ClearChannelConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearChannelConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Clear history.\r\n        /// </summary>\r\n        public static string ClearHistory {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearHistory\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to clear history?.\r\n        /// </summary>\r\n        public static string ClearHistoryConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearHistoryConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Clear cached text messages?.\r\n        /// </summary>\r\n        public static string ClearLocalDatabaseConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearLocalDatabaseConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Clearing the local database will delete the texts of cached messages and compress the database to save internal disk space. Telegram needs some data to work, so database size will not reach zero.\r\n        ///\r\n        ///This operation can take a few minutes to complete..\r\n        /// </summary>\r\n        public static string ClearLocalDatabaseDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearLocalDatabaseDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Clear Logs.\r\n        /// </summary>\r\n        public static string ClearLogs {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearLogs\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to clear painting?.\r\n        /// </summary>\r\n        public static string ClearPaintingConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearPaintingConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Clear recent stickers.\r\n        /// </summary>\r\n        public static string ClearRecentStickers {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearRecentStickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Clear search history?.\r\n        /// </summary>\r\n        public static string ClearSearchHistoryConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearSearchHistoryConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete all cached text and media from this supergroup?.\r\n        /// </summary>\r\n        public static string ClearSupergroupConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearSupergroupConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to clear all unread mentions?.\r\n        /// </summary>\r\n        public static string ClearUnreadMentionsConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ClearUnreadMentionsConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Close.\r\n        /// </summary>\r\n        public static string Close {\r\n            get {\r\n                return ResourceManager.GetString(\"Close\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cloud-Based.\r\n        /// </summary>\r\n        public static string CloudBased {\r\n            get {\r\n                return ResourceManager.GetString(\"CloudBased\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to **Telegram** lets you access your messages\r\n        ///from multiple devices..\r\n        /// </summary>\r\n        public static string CloudBasedMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"CloudBasedMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your cloud storage.\r\n        /// </summary>\r\n        public static string CloudStorage {\r\n            get {\r\n                return ResourceManager.GetString(\"CloudStorage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to • Forward messages here to save them\r\n        ///• Send media and files to store them\r\n        ///• Access this chat from any device\r\n        ///• Use search to quickly find things.\r\n        /// </summary>\r\n        public static string CloudStorageDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"CloudStorageDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Code.\r\n        /// </summary>\r\n        public static string Code {\r\n            get {\r\n                return ResourceManager.GetString(\"Code\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Codec was not found.\r\n        /// </summary>\r\n        public static string CodecWasNotFound {\r\n            get {\r\n                return ResourceManager.GetString(\"CodecWasNotFound\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to We&apos;ve sent the code to the **Telegram** app on your other device..\r\n        /// </summary>\r\n        public static string CodeSentToTelegramApp {\r\n            get {\r\n                return ResourceManager.GetString(\"CodeSentToTelegramApp\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to We are calling your phone **{0}** to dictate a code..\r\n        /// </summary>\r\n        public static string CodeSentViaCallingPhone {\r\n            get {\r\n                return ResourceManager.GetString(\"CodeSentViaCallingPhone\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Comments.\r\n        /// </summary>\r\n        public static string CommentGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"CommentGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Comment.\r\n        /// </summary>\r\n        public static string CommentGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"CommentGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Comments.\r\n        /// </summary>\r\n        public static string CommentNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"CommentNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Comment.\r\n        /// </summary>\r\n        public static string CommentNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"CommentNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Comments.\r\n        /// </summary>\r\n        public static string Comments {\r\n            get {\r\n                return ResourceManager.GetString(\"Comments\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to If you enable comments, members will be able to discuss your posts in the channel..\r\n        /// </summary>\r\n        public static string CommentsDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"CommentsDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Members.\r\n        /// </summary>\r\n        public static string CompanyGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"CompanyGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Member.\r\n        /// </summary>\r\n        public static string CompanyGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"CompanyGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Member.\r\n        /// </summary>\r\n        public static string CompanyNominative {\r\n            get {\r\n                return ResourceManager.GetString(\"CompanyNominative\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Members.\r\n        /// </summary>\r\n        public static string CompanyNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"CompanyNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Member.\r\n        /// </summary>\r\n        public static string CompanyNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"CompanyNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please check your e-mail (don&apos;t forget the spam folder) to complete Two-Step Verification setup..\r\n        /// </summary>\r\n        public static string CompletePasswordHint {\r\n            get {\r\n                return ResourceManager.GetString(\"CompletePasswordHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New.\r\n        /// </summary>\r\n        public static string ComposeMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"ComposeMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Compressing.\r\n        /// </summary>\r\n        public static string Compressing {\r\n            get {\r\n                return ResourceManager.GetString(\"Compressing\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Compress video.\r\n        /// </summary>\r\n        public static string CompressVideo {\r\n            get {\r\n                return ResourceManager.GetString(\"CompressVideo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Confirm.\r\n        /// </summary>\r\n        public static string Confirm {\r\n            get {\r\n                return ResourceManager.GetString(\"Confirm\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to By pressing OK button you confirm that you have at least 13 years old..\r\n        /// </summary>\r\n        public static string ConfirmAgeMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"ConfirmAgeMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Confirm your age.\r\n        /// </summary>\r\n        public static string ConfirmAgeTitle {\r\n            get {\r\n                return ResourceManager.GetString(\"ConfirmAgeTitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete contact?.\r\n        /// </summary>\r\n        public static string ConfirmDeleteContact {\r\n            get {\r\n                return ResourceManager.GetString(\"ConfirmDeleteContact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to We have sent an SMS with an activation code to your phone **{0}**.\r\n        /// </summary>\r\n        public static string ConfirmMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"ConfirmMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to We will send an SMS with a confirmation code to your new number..\r\n        /// </summary>\r\n        public static string ConfirmNewNumberMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"ConfirmNewNumberMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Confirm passcode.\r\n        /// </summary>\r\n        public static string ConfirmPasscode {\r\n            get {\r\n                return ResourceManager.GetString(\"ConfirmPasscode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Re-enter your password.\r\n        /// </summary>\r\n        public static string ConfirmPassword {\r\n            get {\r\n                return ResourceManager.GetString(\"ConfirmPassword\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Do you allow this application to use push notifications to alert of new messages?.\r\n        /// </summary>\r\n        public static string ConfirmPushMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"ConfirmPushMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Confirm push notifications.\r\n        /// </summary>\r\n        public static string ConfirmPushTitle {\r\n            get {\r\n                return ResourceManager.GetString(\"ConfirmPushTitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete {0} from suggestions?.\r\n        /// </summary>\r\n        public static string ConfirmResetTopPeerRating {\r\n            get {\r\n                return ResourceManager.GetString(\"ConfirmResetTopPeerRating\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Connected.\r\n        /// </summary>\r\n        public static string Connected {\r\n            get {\r\n                return ResourceManager.GetString(\"Connected\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Connected websites.\r\n        /// </summary>\r\n        public static string ConnectedWebsites {\r\n            get {\r\n                return ResourceManager.GetString(\"ConnectedWebsites\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can log in on websites that support signing in with Telegram..\r\n        /// </summary>\r\n        public static string ConnectedWebsitesHint {\r\n            get {\r\n                return ResourceManager.GetString(\"ConnectedWebsitesHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Connecting.\r\n        /// </summary>\r\n        public static string Connecting {\r\n            get {\r\n                return ResourceManager.GetString(\"Connecting\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Connecting to proxy.\r\n        /// </summary>\r\n        public static string ConnectingToProxy {\r\n            get {\r\n                return ResourceManager.GetString(\"ConnectingToProxy\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Connection.\r\n        /// </summary>\r\n        public static string Connection {\r\n            get {\r\n                return ResourceManager.GetString(\"Connection\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Connections.\r\n        /// </summary>\r\n        public static string Connections {\r\n            get {\r\n                return ResourceManager.GetString(\"Connections\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Connection Type.\r\n        /// </summary>\r\n        public static string ConnectionType {\r\n            get {\r\n                return ResourceManager.GetString(\"ConnectionType\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Contact.\r\n        /// </summary>\r\n        public static string Contact {\r\n            get {\r\n                return ResourceManager.GetString(\"Contact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Contact.\r\n        /// </summary>\r\n        public static string ContactAccusative {\r\n            get {\r\n                return ResourceManager.GetString(\"ContactAccusative\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Contact address.\r\n        /// </summary>\r\n        public static string ContactAddress {\r\n            get {\r\n                return ResourceManager.GetString(\"ContactAddress\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Contact joined Telegram.\r\n        /// </summary>\r\n        public static string ContactJoinedTelegram {\r\n            get {\r\n                return ResourceManager.GetString(\"ContactJoinedTelegram\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} joined Telegram!.\r\n        /// </summary>\r\n        public static string ContactRegistered {\r\n            get {\r\n                return ResourceManager.GetString(\"ContactRegistered\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Contacts.\r\n        /// </summary>\r\n        public static string Contacts {\r\n            get {\r\n                return ResourceManager.GetString(\"Contacts\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Conversation marked as spam. Delete and block user?.\r\n        /// </summary>\r\n        public static string ConversationMarkedAsSpamConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ConversationMarkedAsSpamConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chats.\r\n        /// </summary>\r\n        public static string Conversations {\r\n            get {\r\n                return ResourceManager.GetString(\"Conversations\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Convert to Supergroup.\r\n        /// </summary>\r\n        public static string ConvertToSupergroup {\r\n            get {\r\n                return ResourceManager.GetString(\"ConvertToSupergroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This action is irreversible. It is not possible to downgrade a supergroup to a regular group..\r\n        /// </summary>\r\n        public static string ConvertToSupergroupConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ConvertToSupergroupConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to **In supergroups**:\r\n        ///• New members can see the full message history\r\n        ///• Deleted messages will disappear for all members\r\n        ///• Admins can pin important messages\r\n        ///• Creator can set a public link for the group.\r\n        /// </summary>\r\n        public static string ConvertToSupergroupDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"ConvertToSupergroupDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to **Note**: this action can&apos;t be undone..\r\n        /// </summary>\r\n        public static string ConvertToSupergroupNote {\r\n            get {\r\n                return ResourceManager.GetString(\"ConvertToSupergroupNote\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Copy.\r\n        /// </summary>\r\n        public static string Copy {\r\n            get {\r\n                return ResourceManager.GetString(\"Copy\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Copy link.\r\n        /// </summary>\r\n        public static string CopyLink {\r\n            get {\r\n                return ResourceManager.GetString(\"CopyLink\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Link copied to clipboard.\r\n        /// </summary>\r\n        public static string CopyLinkHint {\r\n            get {\r\n                return ResourceManager.GetString(\"CopyLinkHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Copyright.\r\n        /// </summary>\r\n        public static string Copyright {\r\n            get {\r\n                return ResourceManager.GetString(\"Copyright\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Country.\r\n        /// </summary>\r\n        public static string Country {\r\n            get {\r\n                return ResourceManager.GetString(\"Country\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Create.\r\n        /// </summary>\r\n        public static string Create {\r\n            get {\r\n                return ResourceManager.GetString(\"Create\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please create a password to protect your payment info.\r\n        ///You&apos;ll be asked to enter it when you log in..\r\n        /// </summary>\r\n        public static string CreatePasswordHint {\r\n            get {\r\n                return ResourceManager.GetString(\"CreatePasswordHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Start Secret Chat.\r\n        /// </summary>\r\n        public static string CreateSecretChat {\r\n            get {\r\n                return ResourceManager.GetString(\"CreateSecretChat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can create your own custom sticker set using @stickers bot.\r\n        /// </summary>\r\n        public static string CreateStickerSetHint {\r\n            get {\r\n                return ResourceManager.GetString(\"CreateStickerSetHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Creator.\r\n        /// </summary>\r\n        public static string Creator {\r\n            get {\r\n                return ResourceManager.GetString(\"Creator\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Credentials (Optional).\r\n        /// </summary>\r\n        public static string CredentionalsOptional {\r\n            get {\r\n                return ResourceManager.GetString(\"CredentionalsOptional\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Current Session.\r\n        /// </summary>\r\n        public static string CurrentSession {\r\n            get {\r\n                return ResourceManager.GetString(\"CurrentSession\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Days.\r\n        /// </summary>\r\n        public static string DayGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"DayGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Day.\r\n        /// </summary>\r\n        public static string DayGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"DayGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Days.\r\n        /// </summary>\r\n        public static string DayNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"DayNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Day.\r\n        /// </summary>\r\n        public static string DayNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"DayNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Declined call.\r\n        /// </summary>\r\n        public static string DeclinedCall {\r\n            get {\r\n                return ResourceManager.GetString(\"DeclinedCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete.\r\n        /// </summary>\r\n        public static string Delete {\r\n            get {\r\n                return ResourceManager.GetString(\"Delete\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete All Cloud Drafts.\r\n        /// </summary>\r\n        public static string DeleteAllCloudDrafts {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteAllCloudDrafts\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to delete all cloud drafts?.\r\n        /// </summary>\r\n        public static string DeleteAllCloudDraftsConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteAllCloudDraftsConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete all from {0}.\r\n        /// </summary>\r\n        public static string DeleteAllFrom {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteAllFrom\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete and exit.\r\n        /// </summary>\r\n        public static string DeleteAndExit {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteAndExit\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to delete and leave this group?.\r\n        /// </summary>\r\n        public static string DeleteAndExitConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteAndExitConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete and Exit Group.\r\n        /// </summary>\r\n        public static string DeleteAndExitGroup {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteAndExitGroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete and stop.\r\n        /// </summary>\r\n        public static string DeleteAndStop {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteAndStop\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete Channel.\r\n        /// </summary>\r\n        public static string DeleteChannel {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteChannel\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Wait! Deleting this channel will remove all members and all messages will be lost. Delete the channel anyway?.\r\n        /// </summary>\r\n        public static string DeleteChannelConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteChannelConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete chat.\r\n        /// </summary>\r\n        public static string DeleteChat {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteChat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to delete this chat?.\r\n        /// </summary>\r\n        public static string DeleteChatConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteChatConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete.\r\n        /// </summary>\r\n        public static string DeleteContact {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteContact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Deleted account.\r\n        /// </summary>\r\n        public static string DeletedUser {\r\n            get {\r\n                return ResourceManager.GetString(\"DeletedUser\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete for {0}.\r\n        /// </summary>\r\n        public static string DeleteFor {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteFor\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete for all.\r\n        /// </summary>\r\n        public static string DeleteForAll {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteForAll\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete from Favorites.\r\n        /// </summary>\r\n        public static string DeleteFromFavorites {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteFromFavorites\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete Group.\r\n        /// </summary>\r\n        public static string DeleteGroup {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteGroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Wait! Deleting this group will remove all members and all messages will be lost. Delete the group anyway?.\r\n        /// </summary>\r\n        public static string DeleteGroupConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteGroupConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete history and exit group?.\r\n        /// </summary>\r\n        public static string DeleteHistoryAndExitGroupMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteHistoryAndExitGroupMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to delete this message?.\r\n        /// </summary>\r\n        public static string DeleteMessageConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteMessageConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This will delete it for everyone in this channel..\r\n        /// </summary>\r\n        public static string DeleteMessageForEveryoneInChannelHint {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteMessageForEveryoneInChannelHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This will delete it for everyone in this chat..\r\n        /// </summary>\r\n        public static string DeleteMessageForEveryoneInChatHint {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteMessageForEveryoneInChatHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This will delete it just for you..\r\n        /// </summary>\r\n        public static string DeleteMessageForYouHint {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteMessageForYouHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete messages.\r\n        /// </summary>\r\n        public static string DeleteMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to delete {0}?.\r\n        /// </summary>\r\n        public static string DeleteMessagesConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteMessagesConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This will delete them for everyone in this channel..\r\n        /// </summary>\r\n        public static string DeleteMessagesForEveryoneInChannelHint {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteMessagesForEveryoneInChannelHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This will delete them for everyone in this chat..\r\n        /// </summary>\r\n        public static string DeleteMessagesForEveryoneInChatHint {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteMessagesForEveryoneInChatHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This will delete them just for you..\r\n        /// </summary>\r\n        public static string DeleteMessagesForYouHint {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteMessagesForYouHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete Synced Contacts.\r\n        /// </summary>\r\n        public static string DeleteSyncedContacts {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteSyncedContacts\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This will remove your contacts from the Telegram servers. If &apos;Sync Contacts&apos; is enabled, contacts will be re-synced..\r\n        /// </summary>\r\n        public static string DeleteSyncedContactsConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"DeleteSyncedContactsConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Deleting contacts....\r\n        /// </summary>\r\n        public static string DeletingContacts {\r\n            get {\r\n                return ResourceManager.GetString(\"DeletingContacts\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Description.\r\n        /// </summary>\r\n        public static string Description {\r\n            get {\r\n                return ResourceManager.GetString(\"Description\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Description (optional).\r\n        /// </summary>\r\n        public static string DescriptionOptional {\r\n            get {\r\n                return ResourceManager.GetString(\"DescriptionOptional\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chats.\r\n        /// </summary>\r\n        public static string Dialogs {\r\n            get {\r\n                return ResourceManager.GetString(\"Dialogs\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Background.\r\n        /// </summary>\r\n        public static string DialogsBackground {\r\n            get {\r\n                return ResourceManager.GetString(\"DialogsBackground\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Didn&apos;t get the code?.\r\n        /// </summary>\r\n        public static string DidNotGetCode {\r\n            get {\r\n                return ResourceManager.GetString(\"DidNotGetCode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Directions.\r\n        /// </summary>\r\n        public static string Directions {\r\n            get {\r\n                return ResourceManager.GetString(\"Directions\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Disabled.\r\n        /// </summary>\r\n        public static string Disabled {\r\n            get {\r\n                return ResourceManager.GetString(\"Disabled\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to discard changes?.\r\n        /// </summary>\r\n        public static string DiscardChangesConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"DiscardChangesConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Discount.\r\n        /// </summary>\r\n        public static string Discount {\r\n            get {\r\n                return ResourceManager.GetString(\"Discount\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} away.\r\n        /// </summary>\r\n        public static string DistanceAway {\r\n            get {\r\n                return ResourceManager.GetString(\"DistanceAway\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to File.\r\n        /// </summary>\r\n        public static string Document {\r\n            get {\r\n                return ResourceManager.GetString(\"Document\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to File.\r\n        /// </summary>\r\n        public static string DocumentAccusative {\r\n            get {\r\n                return ResourceManager.GetString(\"DocumentAccusative\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Documents.\r\n        /// </summary>\r\n        public static string Documents {\r\n            get {\r\n                return ResourceManager.GetString(\"Documents\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Done.\r\n        /// </summary>\r\n        public static string Done {\r\n            get {\r\n                return ResourceManager.GetString(\"Done\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Do not allow forwarding.\r\n        /// </summary>\r\n        public static string DoNotAllowForwarding {\r\n            get {\r\n                return ResourceManager.GetString(\"DoNotAllowForwarding\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Download.\r\n        /// </summary>\r\n        public static string Download {\r\n            get {\r\n                return ResourceManager.GetString(\"Download\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Draft.\r\n        /// </summary>\r\n        public static string Draft {\r\n            get {\r\n                return ResourceManager.GetString(\"Draft\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Duplicate.\r\n        /// </summary>\r\n        public static string Duplicate {\r\n            get {\r\n                return ResourceManager.GetString(\"Duplicate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Edit.\r\n        /// </summary>\r\n        public static string Edit {\r\n            get {\r\n                return ResourceManager.GetString(\"Edit\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Edited.\r\n        /// </summary>\r\n        public static string Edited {\r\n            get {\r\n                return ResourceManager.GetString(\"Edited\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Edited video.\r\n        /// </summary>\r\n        public static string EditedVideo {\r\n            get {\r\n                return ResourceManager.GetString(\"EditedVideo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Edit message.\r\n        /// </summary>\r\n        public static string EditMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"EditMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, you can&apos;t edit this message..\r\n        /// </summary>\r\n        public static string EditMessageError {\r\n            get {\r\n                return ResourceManager.GetString(\"EditMessageError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Edit Name.\r\n        /// </summary>\r\n        public static string EditName {\r\n            get {\r\n                return ResourceManager.GetString(\"EditName\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Edit video.\r\n        /// </summary>\r\n        public static string EditVideo {\r\n            get {\r\n                return ResourceManager.GetString(\"EditVideo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Email.\r\n        /// </summary>\r\n        public static string Email {\r\n            get {\r\n                return ResourceManager.GetString(\"Email\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to E-Mail.\r\n        /// </summary>\r\n        public static string Email2 {\r\n            get {\r\n                return ResourceManager.GetString(\"Email2\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Code is empty. Please try again..\r\n        /// </summary>\r\n        public static string EmailCodeEmpty {\r\n            get {\r\n                return ResourceManager.GetString(\"EmailCodeEmpty\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Code expired. Please try again..\r\n        /// </summary>\r\n        public static string EmailCodeExpiredString {\r\n            get {\r\n                return ResourceManager.GetString(\"EmailCodeExpiredString\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You have entered an invalid code. Please try again..\r\n        /// </summary>\r\n        public static string EmailCodeInvalidString {\r\n            get {\r\n                return ResourceManager.GetString(\"EmailCodeInvalidString\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid email address.\r\n        /// </summary>\r\n        public static string EmailInvalid {\r\n            get {\r\n                return ResourceManager.GetString(\"EmailInvalid\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid email. Please try again..\r\n        /// </summary>\r\n        public static string EmailInvalidString {\r\n            get {\r\n                return ResourceManager.GetString(\"EmailInvalidString\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Emoji.\r\n        /// </summary>\r\n        public static string Emoji {\r\n            get {\r\n                return ResourceManager.GetString(\"Emoji\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to If these emoji are the same on {0}&apos;s screen, this call is 100% secure..\r\n        /// </summary>\r\n        public static string EmojiKeyDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"EmojiKeyDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Deleted message.\r\n        /// </summary>\r\n        public static string EmptyMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"EmptyMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Empty secret chat.\r\n        /// </summary>\r\n        public static string EmptySecretChat {\r\n            get {\r\n                return ResourceManager.GetString(\"EmptySecretChat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Deleted account.\r\n        /// </summary>\r\n        public static string EmptyUser {\r\n            get {\r\n                return ResourceManager.GetString(\"EmptyUser\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Enabled.\r\n        /// </summary>\r\n        public static string Enabled {\r\n            get {\r\n                return ResourceManager.GetString(\"Enabled\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to enable this proxy?.\r\n        /// </summary>\r\n        public static string EnableProxyConfigmation {\r\n            get {\r\n                return ResourceManager.GetString(\"EnableProxyConfigmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Encryption key.\r\n        /// </summary>\r\n        public static string EncryptionKey {\r\n            get {\r\n                return ResourceManager.GetString(\"EncryptionKey\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This image is a visualization of the encryption key for this secret chat with {0}..\r\n        /// </summary>\r\n        public static string EncryptionKeyDescription1 {\r\n            get {\r\n                return ResourceManager.GetString(\"EncryptionKeyDescription1\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to If this image looks the same on {0}&apos;s phone, your chat is 200% secure..\r\n        /// </summary>\r\n        public static string EncryptionKeyDescription2 {\r\n            get {\r\n                return ResourceManager.GetString(\"EncryptionKeyDescription2\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This image and text were derived from the encryption key for this secret chat with {0}..\r\n        /// </summary>\r\n        public static string EncryptionKeyExtendedDescription1 {\r\n            get {\r\n                return ResourceManager.GetString(\"EncryptionKeyExtendedDescription1\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to If they look the same on {0}&apos;s phone, end-to-end encryption is guaranteed..\r\n        /// </summary>\r\n        public static string EncryptionKeyExtendedDescription2 {\r\n            get {\r\n                return ResourceManager.GetString(\"EncryptionKeyExtendedDescription2\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to End Call.\r\n        /// </summary>\r\n        public static string EndCall {\r\n            get {\r\n                return ResourceManager.GetString(\"EndCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Enter your passcode.\r\n        /// </summary>\r\n        public static string EnterPasscode {\r\n            get {\r\n                return ResourceManager.GetString(\"EnterPasscode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Enter your password.\r\n        /// </summary>\r\n        public static string EnterPassword {\r\n            get {\r\n                return ResourceManager.GetString(\"EnterPassword\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Enter your password hint.\r\n        /// </summary>\r\n        public static string EnterPasswordHint {\r\n            get {\r\n                return ResourceManager.GetString(\"EnterPasswordHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Enter your E-Mail.\r\n        /// </summary>\r\n        public static string EnterRecoveryEmail {\r\n            get {\r\n                return ResourceManager.GetString(\"EnterRecoveryEmail\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please add your valid e-mail. It is the only way to recover a forgotten password..\r\n        /// </summary>\r\n        public static string EnterRecoveryEmailHint {\r\n            get {\r\n                return ResourceManager.GetString(\"EnterRecoveryEmailHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Enter your current passcode.\r\n        /// </summary>\r\n        public static string EnterYourCurrentPasscode {\r\n            get {\r\n                return ResourceManager.GetString(\"EnterYourCurrentPasscode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Enter your current password.\r\n        /// </summary>\r\n        public static string EnterYourCurrentPassword {\r\n            get {\r\n                return ResourceManager.GetString(\"EnterYourCurrentPassword\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Error.\r\n        /// </summary>\r\n        public static string Error {\r\n            get {\r\n                return ResourceManager.GetString(\"Error\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Events.\r\n        /// </summary>\r\n        public static string Events {\r\n            get {\r\n                return ResourceManager.GetString(\"Events\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Everybody.\r\n        /// </summary>\r\n        public static string Everybody {\r\n            get {\r\n                return ResourceManager.GetString(\"Everybody\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to External Camera.\r\n        /// </summary>\r\n        public static string ExternalCamera {\r\n            get {\r\n                return ResourceManager.GetString(\"ExternalCamera\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to External Photo Picker.\r\n        /// </summary>\r\n        public static string ExternalPhotoPicker {\r\n            get {\r\n                return ResourceManager.GetString(\"ExternalPhotoPicker\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Fast.\r\n        /// </summary>\r\n        public static string Fast {\r\n            get {\r\n                return ResourceManager.GetString(\"Fast\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to **Telegram** delivers messages faster than\r\n        ///any other application..\r\n        /// </summary>\r\n        public static string FastMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"FastMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Trending stickers.\r\n        /// </summary>\r\n        public static string FeaturedStickers {\r\n            get {\r\n                return ResourceManager.GetString(\"FeaturedStickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Feed.\r\n        /// </summary>\r\n        public static string Feed {\r\n            get {\r\n                return ResourceManager.GetString(\"Feed\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Files.\r\n        /// </summary>\r\n        public static string FileGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"FileGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to File.\r\n        /// </summary>\r\n        public static string FileGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"FileGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Files.\r\n        /// </summary>\r\n        public static string FileNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"FileNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to File.\r\n        /// </summary>\r\n        public static string FileNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"FileNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Files.\r\n        /// </summary>\r\n        public static string Files {\r\n            get {\r\n                return ResourceManager.GetString(\"Files\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to First Name.\r\n        /// </summary>\r\n        public static string FirstName {\r\n            get {\r\n                return ResourceManager.GetString(\"FirstName\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to First name is invalid. Please try again..\r\n        /// </summary>\r\n        public static string FirstNameInvalidString {\r\n            get {\r\n                return ResourceManager.GetString(\"FirstNameInvalidString\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Flood control. Please try again later..\r\n        /// </summary>\r\n        public static string FloodWaitString {\r\n            get {\r\n                return ResourceManager.GetString(\"FloodWaitString\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Join.\r\n        /// </summary>\r\n        public static string Follow {\r\n            get {\r\n                return ResourceManager.GetString(\"Follow\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to For 15 minutes.\r\n        /// </summary>\r\n        public static string For15Minutes {\r\n            get {\r\n                return ResourceManager.GetString(\"For15Minutes\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to For 1 hour.\r\n        /// </summary>\r\n        public static string For1Hour {\r\n            get {\r\n                return ResourceManager.GetString(\"For1Hour\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to For 8 hours.\r\n        /// </summary>\r\n        public static string For8Hours {\r\n            get {\r\n                return ResourceManager.GetString(\"For8Hours\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forever.\r\n        /// </summary>\r\n        public static string Forever {\r\n            get {\r\n                return ResourceManager.GetString(\"Forever\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forgot password?.\r\n        /// </summary>\r\n        public static string ForgotPassword {\r\n            get {\r\n                return ResourceManager.GetString(\"ForgotPassword\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forward.\r\n        /// </summary>\r\n        public static string Forward {\r\n            get {\r\n                return ResourceManager.GetString(\"Forward\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded audios.\r\n        /// </summary>\r\n        public static string ForwardedAudioGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedAudioGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded audio.\r\n        /// </summary>\r\n        public static string ForwardedAudioGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedAudioGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded audios.\r\n        /// </summary>\r\n        public static string ForwardedAudioNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedAudioNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded audio.\r\n        /// </summary>\r\n        public static string ForwardedAudioNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedAudioNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded contacts.\r\n        /// </summary>\r\n        public static string ForwardedContactGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedContactGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded contact.\r\n        /// </summary>\r\n        public static string ForwardedContactGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedContactGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded contacts.\r\n        /// </summary>\r\n        public static string ForwardedContactNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedContactNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded contact.\r\n        /// </summary>\r\n        public static string ForwardedContactNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedContactNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded files.\r\n        /// </summary>\r\n        public static string ForwardedFileGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedFileGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded file.\r\n        /// </summary>\r\n        public static string ForwardedFileGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedFileGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded files.\r\n        /// </summary>\r\n        public static string ForwardedFileNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedFileNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded file.\r\n        /// </summary>\r\n        public static string ForwardedFileNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedFileNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded games.\r\n        /// </summary>\r\n        public static string ForwardedGameGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedGameGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded game.\r\n        /// </summary>\r\n        public static string ForwardedGameGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedGameGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded games.\r\n        /// </summary>\r\n        public static string ForwardedGameNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedGameNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded game.\r\n        /// </summary>\r\n        public static string ForwardedGameNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedGameNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded GIFs.\r\n        /// </summary>\r\n        public static string ForwardedGifGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedGifGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded GIF.\r\n        /// </summary>\r\n        public static string ForwardedGifGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedGifGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded GIFs.\r\n        /// </summary>\r\n        public static string ForwardedGifNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedGifNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded GIF.\r\n        /// </summary>\r\n        public static string ForwardedGifNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedGifNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded locations.\r\n        /// </summary>\r\n        public static string ForwardedLocationGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedLocationGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded location.\r\n        /// </summary>\r\n        public static string ForwardedLocationGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedLocationGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded locations.\r\n        /// </summary>\r\n        public static string ForwardedLocationNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedLocationNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded location.\r\n        /// </summary>\r\n        public static string ForwardedLocationNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedLocationNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded from.\r\n        /// </summary>\r\n        public static string ForwardedMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded messages.\r\n        /// </summary>\r\n        public static string ForwardedMessageGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedMessageGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded message.\r\n        /// </summary>\r\n        public static string ForwardedMessageGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedMessageGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded messages.\r\n        /// </summary>\r\n        public static string ForwardedMessageNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedMessageNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded message.\r\n        /// </summary>\r\n        public static string ForwardedMessageNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedMessageNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded photos.\r\n        /// </summary>\r\n        public static string ForwardedPhotoGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedPhotoGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded photo.\r\n        /// </summary>\r\n        public static string ForwardedPhotoGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedPhotoGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded photos.\r\n        /// </summary>\r\n        public static string ForwardedPhotoNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedPhotoNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded photo.\r\n        /// </summary>\r\n        public static string ForwardedPhotoNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedPhotoNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded stickers.\r\n        /// </summary>\r\n        public static string ForwardedStickerGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedStickerGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded sticker.\r\n        /// </summary>\r\n        public static string ForwardedStickerGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedStickerGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded stickers.\r\n        /// </summary>\r\n        public static string ForwardedStickerNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedStickerNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded sticker.\r\n        /// </summary>\r\n        public static string ForwardedStickerNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedStickerNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded videos.\r\n        /// </summary>\r\n        public static string ForwardedVideoGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedVideoGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded video.\r\n        /// </summary>\r\n        public static string ForwardedVideoGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedVideoGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded videos.\r\n        /// </summary>\r\n        public static string ForwardedVideoNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedVideoNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded video.\r\n        /// </summary>\r\n        public static string ForwardedVideoNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedVideoNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded voice messages.\r\n        /// </summary>\r\n        public static string ForwardedVoiceMessageGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedVoiceMessageGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded voice message.\r\n        /// </summary>\r\n        public static string ForwardedVoiceMessageGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedVoiceMessageGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded voice messages.\r\n        /// </summary>\r\n        public static string ForwardedVoiceMessageNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedVoiceMessageNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forwarded voice message.\r\n        /// </summary>\r\n        public static string ForwardedVoiceMessageNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardedVoiceMessageNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forward message to this chat?.\r\n        /// </summary>\r\n        public static string ForwardeMessageToThisChat {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardeMessageToThisChat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forward here to save.\r\n        /// </summary>\r\n        public static string ForwardHereToSave {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardHereToSave\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Forward messages to this chat?.\r\n        /// </summary>\r\n        public static string ForwardMessagesToThisChat {\r\n            get {\r\n                return ResourceManager.GetString(\"ForwardMessagesToThisChat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Free.\r\n        /// </summary>\r\n        public static string Free {\r\n            get {\r\n                return ResourceManager.GetString(\"Free\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to **Telegram** is free forever. No ads.\r\n        ///No subscription fees..\r\n        /// </summary>\r\n        public static string FreeMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"FreeMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to From.\r\n        /// </summary>\r\n        public static string From {\r\n            get {\r\n                return ResourceManager.GetString(\"From\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Full Name.\r\n        /// </summary>\r\n        public static string FullName {\r\n            get {\r\n                return ResourceManager.GetString(\"FullName\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Game.\r\n        /// </summary>\r\n        public static string Game {\r\n            get {\r\n                return ResourceManager.GetString(\"Game\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Location.\r\n        /// </summary>\r\n        public static string GeoPoint {\r\n            get {\r\n                return ResourceManager.GetString(\"GeoPoint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Getting link info....\r\n        /// </summary>\r\n        public static string GettingLinkInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"GettingLinkInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to GIF.\r\n        /// </summary>\r\n        public static string Gif {\r\n            get {\r\n                return ResourceManager.GetString(\"Gif\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Global Search.\r\n        /// </summary>\r\n        public static string GlobalSearch {\r\n            get {\r\n                return ResourceManager.GetString(\"GlobalSearch\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Got a question about Telegram?.\r\n        /// </summary>\r\n        public static string GotAQuestionAboutTelegram {\r\n            get {\r\n                return ResourceManager.GetString(\"GotAQuestionAboutTelegram\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group.\r\n        /// </summary>\r\n        public static string Group {\r\n            get {\r\n                return ResourceManager.GetString(\"Group\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can add administrators to help you manage your group. Tap and hold to remove admins..\r\n        /// </summary>\r\n        public static string GroupAdministratorsHint {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupAdministratorsHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Conversation marked as spam. Delete and exit group?.\r\n        /// </summary>\r\n        public static string GroupConversationMarkedAsSpamConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupConversationMarkedAsSpamConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this group is already full..\r\n        /// </summary>\r\n        public static string GroupFullError {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupFullError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Groups.\r\n        /// </summary>\r\n        public static string GroupGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group.\r\n        /// </summary>\r\n        public static string GroupGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this group is no longer accessible..\r\n        /// </summary>\r\n        public static string GroupIsNoLongerAccessible {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupIsNoLongerAccessible\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group media into one message.\r\n        /// </summary>\r\n        public static string GroupMediaDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupMediaDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this name is invalid..\r\n        /// </summary>\r\n        public static string GroupNameInvalid {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupNameInvalid\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this name is already taken..\r\n        /// </summary>\r\n        public static string GroupNameOccupied {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupNameOccupied\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group names must have at least 5 characters..\r\n        /// </summary>\r\n        public static string GroupNameShort {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupNameShort\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group names can&apos;t start with a number..\r\n        /// </summary>\r\n        public static string GroupNameStartsWithNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupNameStartsWithNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group new channels.\r\n        /// </summary>\r\n        public static string GroupNewChannels {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupNewChannels\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this group is no longer accessible..\r\n        /// </summary>\r\n        public static string GroupNoLongerAccessible {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupNoLongerAccessible\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Groups.\r\n        /// </summary>\r\n        public static string GroupNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group.\r\n        /// </summary>\r\n        public static string GroupNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this chat does not seem to exist..\r\n        /// </summary>\r\n        public static string GroupNotExistsError {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupNotExistsError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group notifications.\r\n        /// </summary>\r\n        public static string GroupNotifications {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupNotifications\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Groups.\r\n        /// </summary>\r\n        public static string Groups {\r\n            get {\r\n                return ResourceManager.GetString(\"Groups\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Change who can add you to groups and channels.\r\n        /// </summary>\r\n        public static string GroupsDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupsDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can restrict who can add you to groups and channels with granular precision..\r\n        /// </summary>\r\n        public static string GroupsImportantNote {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupsImportantNote\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Groups in Common.\r\n        /// </summary>\r\n        public static string GroupsInCommon {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupsInCommon\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to These users will or will not be able to add you to groups and channels regardless of the settings above..\r\n        /// </summary>\r\n        public static string GroupsSettingsOverrideNote {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupsSettingsOverrideNote\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Groups and Channels.\r\n        /// </summary>\r\n        public static string GroupsShort {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupsShort\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group Stickers.\r\n        /// </summary>\r\n        public static string GroupStickers {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupStickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can choose sticker set which will be available for every member while in the group chat..\r\n        /// </summary>\r\n        public static string GroupStickersDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupStickersDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group Type.\r\n        /// </summary>\r\n        public static string GroupType {\r\n            get {\r\n                return ResourceManager.GetString(\"GroupType\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Have a self-destruct timer.\r\n        /// </summary>\r\n        public static string HaveASelfDestructTimer {\r\n            get {\r\n                return ResourceManager.GetString(\"HaveASelfDestructTimer\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Haven&apos;t received the code?.\r\n        /// </summary>\r\n        public static string HaveNotReceivedCode {\r\n            get {\r\n                return ResourceManager.GetString(\"HaveNotReceivedCode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Having trouble accessing your e-mail {0}?.\r\n        /// </summary>\r\n        public static string HavingTroubleAccessingEmailMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"HavingTroubleAccessingEmailMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Help.\r\n        /// </summary>\r\n        public static string Help {\r\n            get {\r\n                return ResourceManager.GetString(\"Help\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Hidden.\r\n        /// </summary>\r\n        public static string Hidden {\r\n            get {\r\n                return ResourceManager.GetString(\"Hidden\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Hide.\r\n        /// </summary>\r\n        public static string Hide {\r\n            get {\r\n                return ResourceManager.GetString(\"Hide\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Hint.\r\n        /// </summary>\r\n        public static string Hint {\r\n            get {\r\n                return ResourceManager.GetString(\"Hint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Hours.\r\n        /// </summary>\r\n        public static string HourGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"HourGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Hour.\r\n        /// </summary>\r\n        public static string HourGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"HourGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Hours.\r\n        /// </summary>\r\n        public static string HourNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"HourNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Hour.\r\n        /// </summary>\r\n        public static string HourNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"HourNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to h.\r\n        /// </summary>\r\n        public static string HourShort {\r\n            get {\r\n                return ResourceManager.GetString(\"HourShort\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Hybrid.\r\n        /// </summary>\r\n        public static string Hybrid {\r\n            get {\r\n                return ResourceManager.GetString(\"Hybrid\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to If you&apos;re away for.\r\n        /// </summary>\r\n        public static string IfYouAreAwayFor {\r\n            get {\r\n                return ResourceManager.GetString(\"IfYouAreAwayFor\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Ignore.\r\n        /// </summary>\r\n        public static string Ignore {\r\n            get {\r\n                return ResourceManager.GetString(\"Ignore\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to In-app Camera.\r\n        /// </summary>\r\n        public static string InAppCamera {\r\n            get {\r\n                return ResourceManager.GetString(\"InAppCamera\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to In-App Notifications.\r\n        /// </summary>\r\n        public static string InAppNotifications {\r\n            get {\r\n                return ResourceManager.GetString(\"InAppNotifications\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to In-app Photo Picker.\r\n        /// </summary>\r\n        public static string InAppPhotoPicker {\r\n            get {\r\n                return ResourceManager.GetString(\"InAppPhotoPicker\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to In-App Preview.\r\n        /// </summary>\r\n        public static string InAppPreview {\r\n            get {\r\n                return ResourceManager.GetString(\"InAppPreview\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to In-App Sounds.\r\n        /// </summary>\r\n        public static string InAppSounds {\r\n            get {\r\n                return ResourceManager.GetString(\"InAppSounds\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to In-App Vibrate.\r\n        /// </summary>\r\n        public static string InAppVibrate {\r\n            get {\r\n                return ResourceManager.GetString(\"InAppVibrate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invisible mode.\r\n        /// </summary>\r\n        public static string IncognitoMode {\r\n            get {\r\n                return ResourceManager.GetString(\"IncognitoMode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Incoming call.\r\n        /// </summary>\r\n        public static string IncomingCall {\r\n            get {\r\n                return ResourceManager.GetString(\"IncomingCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Incorrect passcode.\r\n        /// </summary>\r\n        public static string IncorrectPasscode {\r\n            get {\r\n                return ResourceManager.GetString(\"IncorrectPasscode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Info.\r\n        /// </summary>\r\n        public static string Info {\r\n            get {\r\n                return ResourceManager.GetString(\"Info\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please note that inline bots are provided by third-party developers. For the bot to work, the symbols you type after the bot&apos;s username are sent to the respective developer..\r\n        /// </summary>\r\n        public static string InlineBotsNotification {\r\n            get {\r\n                return ResourceManager.GetString(\"InlineBotsNotification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Installed stickers.\r\n        /// </summary>\r\n        public static string InstalledStickers {\r\n            get {\r\n                return ResourceManager.GetString(\"InstalledStickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, you have reached the maximum number of sticker sets..\r\n        /// </summary>\r\n        public static string InstallStickersetError {\r\n            get {\r\n                return ResourceManager.GetString(\"InstallStickersetError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Welcome to **Telegram** ―\r\n        ///the world&apos;s fastest messaging app.\r\n        ///It is free and secure..\r\n        /// </summary>\r\n        public static string Intro1Message {\r\n            get {\r\n                return ResourceManager.GetString(\"Intro1Message\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid country code.\r\n        /// </summary>\r\n        public static string InvalidCountryCode {\r\n            get {\r\n                return ResourceManager.GetString(\"InvalidCountryCode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invisible.\r\n        /// </summary>\r\n        public static string Invisible {\r\n            get {\r\n                return ResourceManager.GetString(\"Invisible\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} hasn&apos;t joined the channel yet. Do you want to invite them?.\r\n        /// </summary>\r\n        public static string InviteContactConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"InviteContactConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} hasn&apos;t joined the group yet. Do you want to invite them?.\r\n        /// </summary>\r\n        public static string InviteContactToGroupConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"InviteContactToGroupConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Hey, let&apos;s switch to Telegram http://telegram.org/dl.\r\n        /// </summary>\r\n        public static string InviteFriendMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"InviteFriendMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invite friends.\r\n        /// </summary>\r\n        public static string InviteFriends {\r\n            get {\r\n                return ResourceManager.GetString(\"InviteFriends\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invite to Group via Link.\r\n        /// </summary>\r\n        public static string InviteGroupViaLink {\r\n            get {\r\n                return ResourceManager.GetString(\"InviteGroupViaLink\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invite link.\r\n        /// </summary>\r\n        public static string InviteLink {\r\n            get {\r\n                return ResourceManager.GetString(\"InviteLink\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Anyone who has Telegram installed will be able to join your group by following this link..\r\n        /// </summary>\r\n        public static string InviteLinkHint {\r\n            get {\r\n                return ResourceManager.GetString(\"InviteLinkHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this user decided to leave this group, so you cannot invite them back here..\r\n        /// </summary>\r\n        public static string InviteUserBackError {\r\n            get {\r\n                return ResourceManager.GetString(\"InviteUserBackError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invite via link.\r\n        /// </summary>\r\n        public static string InviteViaLink {\r\n            get {\r\n                return ResourceManager.GetString(\"InviteViaLink\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invoice.\r\n        /// </summary>\r\n        public static string Invoice {\r\n            get {\r\n                return ResourceManager.GetString(\"Invoice\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Is playing a game.\r\n        /// </summary>\r\n        public static string IsPlayingGame {\r\n            get {\r\n                return ResourceManager.GetString(\"IsPlayingGame\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Is recording audio.\r\n        /// </summary>\r\n        public static string IsRecordingAudio {\r\n            get {\r\n                return ResourceManager.GetString(\"IsRecordingAudio\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Is recording video.\r\n        /// </summary>\r\n        public static string IsRecordingVideo {\r\n            get {\r\n                return ResourceManager.GetString(\"IsRecordingVideo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Is sending audio.\r\n        /// </summary>\r\n        public static string IsSendingAudio {\r\n            get {\r\n                return ResourceManager.GetString(\"IsSendingAudio\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Is sending file.\r\n        /// </summary>\r\n        public static string IsSendingFile {\r\n            get {\r\n                return ResourceManager.GetString(\"IsSendingFile\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Is sending photo.\r\n        /// </summary>\r\n        public static string IsSendingPhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"IsSendingPhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Is sending video.\r\n        /// </summary>\r\n        public static string IsSendingVideo {\r\n            get {\r\n                return ResourceManager.GetString(\"IsSendingVideo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Is typing.\r\n        /// </summary>\r\n        public static string IsTyping {\r\n            get {\r\n                return ResourceManager.GetString(\"IsTyping\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} selected.\r\n        /// </summary>\r\n        public static string ItemsSelectedPlural {\r\n            get {\r\n                return ResourceManager.GetString(\"ItemsSelectedPlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} selected.\r\n        /// </summary>\r\n        public static string ItemsSelectedSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"ItemsSelectedSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Join.\r\n        /// </summary>\r\n        public static string Join {\r\n            get {\r\n                return ResourceManager.GetString(\"Join\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Do you want to join the channel &apos;{0}&apos;?.\r\n        /// </summary>\r\n        public static string JoinChannelConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"JoinChannelConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Do you want to join the group &apos;{0}&apos;?.\r\n        /// </summary>\r\n        public static string JoinGroupConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"JoinGroupConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Jump to date.\r\n        /// </summary>\r\n        public static string JumpToDate {\r\n            get {\r\n                return ResourceManager.GetString(\"JumpToDate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Keep media.\r\n        /// </summary>\r\n        public static string KeepMedia {\r\n            get {\r\n                return ResourceManager.GetString(\"KeepMedia\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Photos, videos and other files from cloud chats that you have not accessed during this period will be removed from this device to save disk space.\r\n        ///\r\n        ///All media will stay in the Telegram cloud and can be re-downloaded if you need it again..\r\n        /// </summary>\r\n        public static string KeepMediaDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"KeepMediaDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to km.\r\n        /// </summary>\r\n        public static string KilometersShort {\r\n            get {\r\n                return ResourceManager.GetString(\"KilometersShort\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last Name (optional).\r\n        /// </summary>\r\n        public static string LastName {\r\n            get {\r\n                return ResourceManager.GetString(\"LastName\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last name is invalid. Please try again..\r\n        /// </summary>\r\n        public static string LastNameInvalidString {\r\n            get {\r\n                return ResourceManager.GetString(\"LastNameInvalidString\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last seen {0} ago.\r\n        /// </summary>\r\n        public static string LastSeen {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeen\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last seen {0} at {1}.\r\n        /// </summary>\r\n        public static string LastSeenAt {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenAt\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last seen {0} at {1}.\r\n        /// </summary>\r\n        public static string LastSeenAtDate {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenAtDate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Who can see your Last Seen time?.\r\n        /// </summary>\r\n        public static string LastSeenDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Who can see your Last Seen time?.\r\n        /// </summary>\r\n        public static string LastSeenDescription2 {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenDescription2\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Important: you won&apos;t be able to see Last Seen times for people with whom you don&apos;t share your Last Seen time. Approximate last seen will be shown instead (recently, within a week, within a month)..\r\n        /// </summary>\r\n        public static string LastSeenImportantNote {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenImportantNote\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last seen just now.\r\n        /// </summary>\r\n        public static string LastSeenJustNow {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenJustNow\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last seen a long time ago.\r\n        /// </summary>\r\n        public static string LastSeenLongTimeAgo {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenLongTimeAgo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last seen recently.\r\n        /// </summary>\r\n        public static string LastSeenRecently {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenRecently\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last Seen.\r\n        /// </summary>\r\n        public static string LastSeenShort {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenShort\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last seen today at {0}.\r\n        /// </summary>\r\n        public static string LastSeenTodayAt {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenTodayAt\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last seen within a month.\r\n        /// </summary>\r\n        public static string LastSeenWithinMonth {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenWithinMonth\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last seen within a week.\r\n        /// </summary>\r\n        public static string LastSeenWithinWeek {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenWithinWeek\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last seen yesterday at {0}.\r\n        /// </summary>\r\n        public static string LastSeenYesterdayAt {\r\n            get {\r\n                return ResourceManager.GetString(\"LastSeenYesterdayAt\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Learn more at .\r\n        /// </summary>\r\n        public static string LearnMoreAt {\r\n            get {\r\n                return ResourceManager.GetString(\"LearnMoreAt\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Leave channel.\r\n        /// </summary>\r\n        public static string LeaveChannel {\r\n            get {\r\n                return ResourceManager.GetString(\"LeaveChannel\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to leave the channel?.\r\n        /// </summary>\r\n        public static string LeaveChannelConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"LeaveChannelConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Leave group.\r\n        /// </summary>\r\n        public static string LeaveGroup {\r\n            get {\r\n                return ResourceManager.GetString(\"LeaveGroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to leave the group?.\r\n        /// </summary>\r\n        public static string LeaveGroupConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"LeaveGroupConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Leave no trace on our servers.\r\n        /// </summary>\r\n        public static string LeaveNoTraceOnOurServers {\r\n            get {\r\n                return ResourceManager.GetString(\"LeaveNoTraceOnOurServers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Link.\r\n        /// </summary>\r\n        public static string Link {\r\n            get {\r\n                return ResourceManager.GetString(\"Link\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Link copied to clipboard.\r\n        /// </summary>\r\n        public static string LinkCopiedToClipboard {\r\n            get {\r\n                return ResourceManager.GetString(\"LinkCopiedToClipboard\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Links.\r\n        /// </summary>\r\n        public static string LinkGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"LinkGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Link.\r\n        /// </summary>\r\n        public static string LinkGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"LinkGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Links.\r\n        /// </summary>\r\n        public static string LinkNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"LinkNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Link.\r\n        /// </summary>\r\n        public static string LinkNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"LinkNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Link previews.\r\n        /// </summary>\r\n        public static string LinkPreviews {\r\n            get {\r\n                return ResourceManager.GetString(\"LinkPreviews\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Link previews will be generated on Telegram servers. We do not store data about the links you send..\r\n        /// </summary>\r\n        public static string LinkPreviewsHint {\r\n            get {\r\n                return ResourceManager.GetString(\"LinkPreviewsHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Would you like to enable extended link previews in Secret Chats? Note that link previews are generated on Telegram servers..\r\n        /// </summary>\r\n        public static string LInkPreviewsNotification {\r\n            get {\r\n                return ResourceManager.GetString(\"LInkPreviewsNotification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Live Location.\r\n        /// </summary>\r\n        public static string LiveLocation {\r\n            get {\r\n                return ResourceManager.GetString(\"LiveLocation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Loading....\r\n        /// </summary>\r\n        public static string Loading {\r\n            get {\r\n                return ResourceManager.GetString(\"Loading\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Local Database.\r\n        /// </summary>\r\n        public static string LocalDatabase {\r\n            get {\r\n                return ResourceManager.GetString(\"LocalDatabase\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Location.\r\n        /// </summary>\r\n        public static string LocationAccusative {\r\n            get {\r\n                return ResourceManager.GetString(\"LocationAccusative\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Location services.\r\n        /// </summary>\r\n        public static string LocationServices {\r\n            get {\r\n                return ResourceManager.GetString(\"LocationServices\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your phone&apos;s location services are turned off..\r\n        /// </summary>\r\n        public static string LocationServicesDisabled {\r\n            get {\r\n                return ResourceManager.GetString(\"LocationServicesDisabled\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Location settings.\r\n        /// </summary>\r\n        public static string LocationSettings {\r\n            get {\r\n                return ResourceManager.GetString(\"LocationSettings\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Location Sharing Ended.\r\n        /// </summary>\r\n        public static string LocationSharingEnded {\r\n            get {\r\n                return ResourceManager.GetString(\"LocationSharingEnded\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Lock screen.\r\n        /// </summary>\r\n        public static string LockScreen {\r\n            get {\r\n                return ResourceManager.GetString(\"LockScreen\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add Telegram to the lock screen.\r\n        /// </summary>\r\n        public static string LockScreenSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"LockScreenSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Logged in with Telegram.\r\n        /// </summary>\r\n        public static string LoggedInWithTelegram {\r\n            get {\r\n                return ResourceManager.GetString(\"LoggedInWithTelegram\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Login.\r\n        /// </summary>\r\n        public static string Login {\r\n            get {\r\n                return ResourceManager.GetString(\"Login\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Log Out.\r\n        /// </summary>\r\n        public static string LogOut {\r\n            get {\r\n                return ResourceManager.GetString(\"LogOut\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Disconnect all websites.\r\n        /// </summary>\r\n        public static string LogOutAllApplications {\r\n            get {\r\n                return ResourceManager.GetString(\"LogOutAllApplications\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to disconnect all websites where you used Telegram to log in?.\r\n        /// </summary>\r\n        public static string LogOutAllApplicationsConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"LogOutAllApplicationsConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to .\r\n        /// </summary>\r\n        public static string LogOutAllApplicationsNote {\r\n            get {\r\n                return ResourceManager.GetString(\"LogOutAllApplicationsNote\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to log out?\r\n        ///Note that you can seamlessly use Telegram on all your devices at once.\r\n        ///Remember, logging out kills all your Secret Chats..\r\n        /// </summary>\r\n        public static string LogOutConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"LogOutConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to d.MM.yyyy.\r\n        /// </summary>\r\n        public static string LongRegularFormat {\r\n            get {\r\n                return ResourceManager.GetString(\"LongRegularFormat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Manage.\r\n        /// </summary>\r\n        public static string Manage {\r\n            get {\r\n                return ResourceManager.GetString(\"Manage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Management.\r\n        /// </summary>\r\n        public static string Management {\r\n            get {\r\n                return ResourceManager.GetString(\"Management\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Manage local cache.\r\n        /// </summary>\r\n        public static string ManagingLocalCache {\r\n            get {\r\n                return ResourceManager.GetString(\"ManagingLocalCache\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Map.\r\n        /// </summary>\r\n        public static string Map {\r\n            get {\r\n                return ResourceManager.GetString(\"Map\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to My location.\r\n        /// </summary>\r\n        public static string MapAccusative {\r\n            get {\r\n                return ResourceManager.GetString(\"MapAccusative\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mark as read.\r\n        /// </summary>\r\n        public static string MarkRead {\r\n            get {\r\n                return ResourceManager.GetString(\"MarkRead\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mark as unread.\r\n        /// </summary>\r\n        public static string MarkUnread {\r\n            get {\r\n                return ResourceManager.GetString(\"MarkUnread\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mask packs.\r\n        /// </summary>\r\n        public static string MaskPackGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"MaskPackGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mask pack.\r\n        /// </summary>\r\n        public static string MaskPackGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"MaskPackGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mask packs.\r\n        /// </summary>\r\n        public static string MaskPackNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"MaskPackNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mask pack.\r\n        /// </summary>\r\n        public static string MaskPackNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"MaskPackNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Masks.\r\n        /// </summary>\r\n        public static string Masks {\r\n            get {\r\n                return ResourceManager.GetString(\"Masks\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can add masks to photos you send. To do this, open the photo editor before sending a photo..\r\n        /// </summary>\r\n        public static string MasksHint {\r\n            get {\r\n                return ResourceManager.GetString(\"MasksHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Maximum file size exceeded. You can send files up to {0}..\r\n        /// </summary>\r\n        public static string MaximumFileSizeExceeded {\r\n            get {\r\n                return ResourceManager.GetString(\"MaximumFileSizeExceeded\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Maximum message length ({0} symbols) exceeded..\r\n        /// </summary>\r\n        public static string MaximumMessageLengthExceeded {\r\n            get {\r\n                return ResourceManager.GetString(\"MaximumMessageLengthExceeded\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Media.\r\n        /// </summary>\r\n        public static string Media {\r\n            get {\r\n                return ResourceManager.GetString(\"Media\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Members.\r\n        /// </summary>\r\n        public static string Members {\r\n            get {\r\n                return ResourceManager.GetString(\"Members\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Group members can add and remove members, edit name and photo of the group.\r\n        /// </summary>\r\n        public static string MembersDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"MembersDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Message.\r\n        /// </summary>\r\n        public static string Message {\r\n            get {\r\n                return ResourceManager.GetString(\"Message\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You allowed this bot to message you when you logged in on {0}.\r\n        /// </summary>\r\n        public static string MessageActionBotAllowed {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionBotAllowed\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} created the broadcast &quot;{1}&quot;.\r\n        /// </summary>\r\n        public static string MessageActionBroadcastCreate {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionBroadcastCreate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Canceled call.\r\n        /// </summary>\r\n        public static string MessageActionCanceledCall {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionCanceledCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channel created.\r\n        /// </summary>\r\n        public static string MessageActionChannelCreate {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChannelCreate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channel photo removed.\r\n        /// </summary>\r\n        public static string MessageActionChannelDeletePhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChannelDeletePhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channel photo updated.\r\n        /// </summary>\r\n        public static string MessageActionChannelEditPhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChannelEditPhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channel name changed to &quot;{0}&quot;.\r\n        /// </summary>\r\n        public static string MessageActionChannelEditTitle {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChannelEditTitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This group was upgraded to a supergroup.\r\n        /// </summary>\r\n        public static string MessageActionChannelMigrateFrom {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChannelMigrateFrom\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chat was activated.\r\n        /// </summary>\r\n        public static string MessageActionChatActivate {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatActivate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} returned to the group.\r\n        /// </summary>\r\n        public static string MessageActionChatAddSelf {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatAddSelf\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} invited {1}.\r\n        /// </summary>\r\n        public static string MessageActionChatAddUser {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatAddUser\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} created the group &quot;{1}&quot;.\r\n        /// </summary>\r\n        public static string MessageActionChatCreate {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatCreate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chat was deactivated.\r\n        /// </summary>\r\n        public static string MessageActionChatDeactivate {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatDeactivate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} removed group photo.\r\n        /// </summary>\r\n        public static string MessageActionChatDeletePhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatDeletePhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} kicked {1}.\r\n        /// </summary>\r\n        public static string MessageActionChatDeleteUser {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatDeleteUser\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} updated group photo.\r\n        /// </summary>\r\n        public static string MessageActionChatEditPhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatEditPhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} changed group name to &quot;{1}&quot;.\r\n        /// </summary>\r\n        public static string MessageActionChatEditTitle {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatEditTitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} joined the group.\r\n        /// </summary>\r\n        public static string MessageActionChatJoin {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatJoin\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} joined the group via invite link.\r\n        /// </summary>\r\n        public static string MessageActionChatJoinedByLink {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatJoinedByLink\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You joined the group.\r\n        /// </summary>\r\n        public static string MessageActionChatJoinSelf {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatJoinSelf\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Chat migrated to channel &quot;{0}&quot;.\r\n        /// </summary>\r\n        public static string MessageActionChatMigrateTo {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionChatMigrateTo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to History was cleared.\r\n        /// </summary>\r\n        public static string MessageActionClearHistory {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionClearHistory\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Declined call.\r\n        /// </summary>\r\n        public static string MessageActionDeclinedCall {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionDeclinedCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} disabled the self-destruct timer.\r\n        /// </summary>\r\n        public static string MessageActionDisableMessageTTL {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionDisableMessageTTL\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Empty service message.\r\n        /// </summary>\r\n        public static string MessageActionEmpty {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionEmpty\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Incoming call.\r\n        /// </summary>\r\n        public static string MessageActionIncomingCall {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionIncomingCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Incoming call ({0}).\r\n        /// </summary>\r\n        public static string MessageActionIncomingDurationCall {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionIncomingDurationCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You left the group.\r\n        /// </summary>\r\n        public static string MessageActionLeftGroupSelf {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionLeftGroupSelf\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Missed call.\r\n        /// </summary>\r\n        public static string MessageActionMissedCall {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionMissedCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Outgoing call.\r\n        /// </summary>\r\n        public static string MessageActionOutgoingCall {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionOutgoingCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Outgoing call ({0}).\r\n        /// </summary>\r\n        public static string MessageActionOutgoingDurationCall {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionOutgoingDurationCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You have just successfully transferred {0} to {1}.\r\n        /// </summary>\r\n        public static string MessageActionPaymentSent {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPaymentSent\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You have just successfully transferred {0} to {1} for {2}.\r\n        /// </summary>\r\n        public static string MessageActionPaymentSentFor {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPaymentSentFor\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Photo has expired.\r\n        /// </summary>\r\n        public static string MessageActionPhotoExpired {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPhotoExpired\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a contact.\r\n        /// </summary>\r\n        public static string MessageActionPinContact {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinContact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a file.\r\n        /// </summary>\r\n        public static string MessageActionPinFile {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinFile\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a game.\r\n        /// </summary>\r\n        public static string MessageActionPinGame {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinGame\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a live location.\r\n        /// </summary>\r\n        public static string MessageActionPinGeoLive {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinGeoLive\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a GIF.\r\n        /// </summary>\r\n        public static string MessageActionPinGif {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinGif\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a map.\r\n        /// </summary>\r\n        public static string MessageActionPinMap {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinMap\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a message.\r\n        /// </summary>\r\n        public static string MessageActionPinMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a photo.\r\n        /// </summary>\r\n        public static string MessageActionPinPhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinPhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a sticker.\r\n        /// </summary>\r\n        public static string MessageActionPinSticker {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinSticker\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned &quot;{1}&quot;.\r\n        /// </summary>\r\n        public static string MessageActionPinText {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinText\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a track.\r\n        /// </summary>\r\n        public static string MessageActionPinTrack {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinTrack\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a video.\r\n        /// </summary>\r\n        public static string MessageActionPinVideo {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinVideo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} pinned a voice message.\r\n        /// </summary>\r\n        public static string MessageActionPinVoiceMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionPinVoiceMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} took a screenshot!.\r\n        /// </summary>\r\n        public static string MessageActionScreenshotMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionScreenshotMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} received the following documents: {1}.\r\n        /// </summary>\r\n        public static string MessageActionSecureValuesSent {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionSecureValuesSent\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} set the self-destruct timer to {1}.\r\n        /// </summary>\r\n        public static string MessageActionSetMessageTTL {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionSetMessageTTL\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} left the group.\r\n        /// </summary>\r\n        public static string MessageActionUserLeftGroup {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionUserLeftGroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Video has expired.\r\n        /// </summary>\r\n        public static string MessageActionVideoExpired {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionVideoExpired\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You disabled the self-destruct timer.\r\n        /// </summary>\r\n        public static string MessageActionYouDisableMessageTTL {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionYouDisableMessageTTL\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You took a screenshot!.\r\n        /// </summary>\r\n        public static string MessageActionYouScreenshotMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionYouScreenshotMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You set the self-destruct timer to {0}.\r\n        /// </summary>\r\n        public static string MessageActionYouSetMessageTTL {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageActionYouSetMessageTTL\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Messages.\r\n        /// </summary>\r\n        public static string MessageGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Message.\r\n        /// </summary>\r\n        public static string MessageGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to yyyy d MMM, {0}.\r\n        /// </summary>\r\n        public static string MessageLongRegularFormat {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageLongRegularFormat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Messages.\r\n        /// </summary>\r\n        public static string MessageNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Message.\r\n        /// </summary>\r\n        public static string MessageNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Message notifications.\r\n        /// </summary>\r\n        public static string MessageNotifications {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageNotifications\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Message preview.\r\n        /// </summary>\r\n        public static string MessagePreview {\r\n            get {\r\n                return ResourceManager.GetString(\"MessagePreview\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to d MMM, {0}.\r\n        /// </summary>\r\n        public static string MessageRegularFormat {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageRegularFormat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Messages.\r\n        /// </summary>\r\n        public static string Messages {\r\n            get {\r\n                return ResourceManager.GetString(\"Messages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Message Search.\r\n        /// </summary>\r\n        public static string MessageSearch {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageSearch\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0}.\r\n        /// </summary>\r\n        public static string MessageTodayFormat {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageTodayFormat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Message {0}.\r\n        /// </summary>\r\n        public static string MessageUser {\r\n            get {\r\n                return ResourceManager.GetString(\"MessageUser\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to m.\r\n        /// </summary>\r\n        public static string MetersShort {\r\n            get {\r\n                return ResourceManager.GetString(\"MetersShort\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Microphone access denied.\r\n        /// </summary>\r\n        public static string MicrophoneAccessDenied {\r\n            get {\r\n                return ResourceManager.GetString(\"MicrophoneAccessDenied\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Telegram could not access the microphone. Please ensure that Telegram is allowed to use the microphone in Privacy Settings and restart the app..\r\n        /// </summary>\r\n        public static string MicrophoneAccessDeniedDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"MicrophoneAccessDeniedDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Minute.\r\n        /// </summary>\r\n        public static string MinuteAccusative {\r\n            get {\r\n                return ResourceManager.GetString(\"MinuteAccusative\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Minutes.\r\n        /// </summary>\r\n        public static string MinuteGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"MinuteGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Minute.\r\n        /// </summary>\r\n        public static string MinuteGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"MinuteGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Minutes.\r\n        /// </summary>\r\n        public static string MinuteNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"MinuteNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Minute.\r\n        /// </summary>\r\n        public static string MinuteNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"MinuteNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Missed call.\r\n        /// </summary>\r\n        public static string MissedCall {\r\n            get {\r\n                return ResourceManager.GetString(\"MissedCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to MM/YY.\r\n        /// </summary>\r\n        public static string MMYY {\r\n            get {\r\n                return ResourceManager.GetString(\"MMYY\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mobile.\r\n        /// </summary>\r\n        public static string Mobile {\r\n            get {\r\n                return ResourceManager.GetString(\"Mobile\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Moderator.\r\n        /// </summary>\r\n        public static string Moderator {\r\n            get {\r\n                return ResourceManager.GetString(\"Moderator\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Can remove user generated content..\r\n        /// </summary>\r\n        public static string ModeratorDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"ModeratorDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Months.\r\n        /// </summary>\r\n        public static string MonthGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"MonthGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Month.\r\n        /// </summary>\r\n        public static string MonthGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"MonthGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Months.\r\n        /// </summary>\r\n        public static string MonthNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"MonthNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Month.\r\n        /// </summary>\r\n        public static string MonthNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"MonthNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to More.\r\n        /// </summary>\r\n        public static string More {\r\n            get {\r\n                return ResourceManager.GetString(\"More\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to More info.\r\n        /// </summary>\r\n        public static string MoreInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"MoreInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to MTPROTO.\r\n        /// </summary>\r\n        public static string MTProto {\r\n            get {\r\n                return ResourceManager.GetString(\"MTProto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Music.\r\n        /// </summary>\r\n        public static string Music {\r\n            get {\r\n                return ResourceManager.GetString(\"Music\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mute.\r\n        /// </summary>\r\n        public static string Mute {\r\n            get {\r\n                return ResourceManager.GetString(\"Mute\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mute.\r\n        /// </summary>\r\n        public static string MuteAudio {\r\n            get {\r\n                return ResourceManager.GetString(\"MuteAudio\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Members will not be notified when you post.\r\n        /// </summary>\r\n        public static string MuteChannelPostHint {\r\n            get {\r\n                return ResourceManager.GetString(\"MuteChannelPostHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mute for {0}.\r\n        /// </summary>\r\n        public static string MuteFor {\r\n            get {\r\n                return ResourceManager.GetString(\"MuteFor\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to My Contacts.\r\n        /// </summary>\r\n        public static string MyContacts {\r\n            get {\r\n                return ResourceManager.GetString(\"MyContacts\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to My location.\r\n        /// </summary>\r\n        public static string MyLocation {\r\n            get {\r\n                return ResourceManager.GetString(\"MyLocation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to My sets.\r\n        /// </summary>\r\n        public static string MySets {\r\n            get {\r\n                return ResourceManager.GetString(\"MySets\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Name.\r\n        /// </summary>\r\n        public static string Name {\r\n            get {\r\n                return ResourceManager.GetString(\"Name\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Checking name....\r\n        /// </summary>\r\n        public static string NameChecking {\r\n            get {\r\n                return ResourceManager.GetString(\"NameChecking\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} is available..\r\n        /// </summary>\r\n        public static string NameIsAvailable {\r\n            get {\r\n                return ResourceManager.GetString(\"NameIsAvailable\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Name Surname.\r\n        /// </summary>\r\n        public static string NameSurname {\r\n            get {\r\n                return ResourceManager.GetString(\"NameSurname\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Nearby places.\r\n        /// </summary>\r\n        public static string NearbyPlaces {\r\n            get {\r\n                return ResourceManager.GetString(\"NearbyPlaces\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Never allow.\r\n        /// </summary>\r\n        public static string NeverAllow {\r\n            get {\r\n                return ResourceManager.GetString(\"NeverAllow\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Never Share.\r\n        /// </summary>\r\n        public static string NeverShare {\r\n            get {\r\n                return ResourceManager.GetString(\"NeverShare\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Never Share With.\r\n        /// </summary>\r\n        public static string NeverShareWith {\r\n            get {\r\n                return ResourceManager.GetString(\"NeverShareWith\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Never share with users....\r\n        /// </summary>\r\n        public static string NeverShareWithUsers {\r\n            get {\r\n                return ResourceManager.GetString(\"NeverShareWithUsers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0},\r\n        ///We detected a login into your account from a new device on {1}, {2} at {3}\r\n        ///\r\n        ///Device: {4}\r\n        ///Location: {5}\r\n        ///\r\n        ///If this wasn&apos;t you, you can go to Settings — Privacy and Security — Terminate all sessions.\r\n        ///\r\n        ///Thanks, The Telegram Team.\r\n        /// </summary>\r\n        public static string NewAuthorization {\r\n            get {\r\n                return ResourceManager.GetString(\"NewAuthorization\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New Broadcast List.\r\n        /// </summary>\r\n        public static string NewBroadcastList {\r\n            get {\r\n                return ResourceManager.GetString(\"NewBroadcastList\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New Channel.\r\n        /// </summary>\r\n        public static string NewChannel {\r\n            get {\r\n                return ResourceManager.GetString(\"NewChannel\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New chat.\r\n        /// </summary>\r\n        public static string NewChat {\r\n            get {\r\n                return ResourceManager.GetString(\"NewChat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} new.\r\n        /// </summary>\r\n        public static string NewFeaturedStickers {\r\n            get {\r\n                return ResourceManager.GetString(\"NewFeaturedStickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New Group.\r\n        /// </summary>\r\n        public static string NewGroup {\r\n            get {\r\n                return ResourceManager.GetString(\"NewGroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New number.\r\n        /// </summary>\r\n        public static string NewNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"NewNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to All your Telegram contacts will get your new number added to their address book, provided they had your old number and you haven&apos;t blocked them in Telegram..\r\n        /// </summary>\r\n        public static string NewNumberConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"NewNumberConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can change your Telegram number here. Your account and all your cloud data — messages, media, contacts, etc. will be moved to the new number.\r\n        ///\r\n        ///Important: all your Telegram contacts will get your new number added to their address book, provided they had your old number and you haven&apos;t blocked them in Telegram..\r\n        /// </summary>\r\n        public static string NewNumberDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"NewNumberDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The number {0} is already connected to a Telegram account. Please delete that account before migrating to the new number..\r\n        /// </summary>\r\n        public static string NewNumberTaken {\r\n            get {\r\n                return ResourceManager.GetString(\"NewNumberTaken\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New Secret Chat.\r\n        /// </summary>\r\n        public static string NewSecretChat {\r\n            get {\r\n                return ResourceManager.GetString(\"NewSecretChat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New sticker packs.\r\n        /// </summary>\r\n        public static string NewStickerPackGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"NewStickerPackGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New sticker pack.\r\n        /// </summary>\r\n        public static string NewStickerPackGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"NewStickerPackGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New sticker packs.\r\n        /// </summary>\r\n        public static string NewStickerPackNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"NewStickerPackNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New sticker pack.\r\n        /// </summary>\r\n        public static string NewStickerPackNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"NewStickerPackNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New sticker set added.\r\n        /// </summary>\r\n        public static string NewStickersAdded {\r\n            get {\r\n                return ResourceManager.GetString(\"NewStickersAdded\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Next.\r\n        /// </summary>\r\n        public static string Next {\r\n            get {\r\n                return ResourceManager.GetString(\"Next\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to If you can&apos;t restore access to your e-mail, your remaining options are either to remember your password or to reset your account..\r\n        /// </summary>\r\n        public static string NoAccessRecoveryEmailMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"NoAccessRecoveryEmailMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No active logins.\r\n        ///\r\n        ///You can log in on websites that support signing in with Telegram..\r\n        /// </summary>\r\n        public static string NoActiveLogins {\r\n            get {\r\n                return ResourceManager.GetString(\"NoActiveLogins\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Nobody.\r\n        /// </summary>\r\n        public static string Nobody {\r\n            get {\r\n                return ResourceManager.GetString(\"Nobody\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No calls here.\r\n        /// </summary>\r\n        public static string NoCallsHere {\r\n            get {\r\n                return ResourceManager.GetString(\"NoCallsHere\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No contacts here.\r\n        /// </summary>\r\n        public static string NoContactsHere {\r\n            get {\r\n                return ResourceManager.GetString(\"NoContactsHere\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No chats here.\r\n        /// </summary>\r\n        public static string NoDialogsHere {\r\n            get {\r\n                return ResourceManager.GetString(\"NoDialogsHere\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No files here.\r\n        /// </summary>\r\n        public static string NoFilesHere {\r\n            get {\r\n                return ResourceManager.GetString(\"NoFilesHere\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No groups here.\r\n        /// </summary>\r\n        public static string NoGroupsHere {\r\n            get {\r\n                return ResourceManager.GetString(\"NoGroupsHere\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No Internet connection.\r\n        /// </summary>\r\n        public static string NoInternetConnection {\r\n            get {\r\n                return ResourceManager.GetString(\"NoInternetConnection\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No items here.\r\n        /// </summary>\r\n        public static string NoItemsHere {\r\n            get {\r\n                return ResourceManager.GetString(\"NoItemsHere\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No media here.\r\n        /// </summary>\r\n        public static string NoMediaHere {\r\n            get {\r\n                return ResourceManager.GetString(\"NoMediaHere\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No messages here.\r\n        /// </summary>\r\n        public static string NoMessagesHere {\r\n            get {\r\n                return ResourceManager.GetString(\"NoMessagesHere\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No messages yet....\r\n        /// </summary>\r\n        public static string NoMessagesYet {\r\n            get {\r\n                return ResourceManager.GetString(\"NoMessagesYet\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to None.\r\n        /// </summary>\r\n        public static string None {\r\n            get {\r\n                return ResourceManager.GetString(\"None\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Since you haven&apos;t provided a recovery e-mail when setting up your password, your remaining options are either to remember your password or to reset your account..\r\n        /// </summary>\r\n        public static string NoRecoveryEmailMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"NoRecoveryEmailMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No results.\r\n        /// </summary>\r\n        public static string NoResults {\r\n            get {\r\n                return ResourceManager.GetString(\"NoResults\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No sets.\r\n        /// </summary>\r\n        public static string NoSets {\r\n            get {\r\n                return ResourceManager.GetString(\"NoSets\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No sets here.\r\n        /// </summary>\r\n        public static string NoSetsHere {\r\n            get {\r\n                return ResourceManager.GetString(\"NoSetsHere\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No such sticker set found.\r\n        /// </summary>\r\n        public static string NoStickerSetFound {\r\n            get {\r\n                return ResourceManager.GetString(\"NoStickerSetFound\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Try again or choose from the list below.\r\n        /// </summary>\r\n        public static string NoStickerSetFoundSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"NoStickerSetFoundSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No stickers found.\r\n        /// </summary>\r\n        public static string NoStickersFound {\r\n            get {\r\n                return ResourceManager.GetString(\"NoStickersFound\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Notifications.\r\n        /// </summary>\r\n        public static string Notifications {\r\n            get {\r\n                return ResourceManager.GetString(\"Notifications\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mute, message preview, chats.\r\n        /// </summary>\r\n        public static string NotificationsSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"NotificationsSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Notify all members.\r\n        /// </summary>\r\n        public static string NotifyAllMembers {\r\n            get {\r\n                return ResourceManager.GetString(\"NotifyAllMembers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Notify members.\r\n        /// </summary>\r\n        public static string NotifyMembers {\r\n            get {\r\n                return ResourceManager.GetString(\"NotifyMembers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Send Push-notifications every time admins post a message.\r\n        /// </summary>\r\n        public static string NotifyMembersDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"NotifyMembersDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No users.\r\n        /// </summary>\r\n        public static string NoUsers {\r\n            get {\r\n                return ResourceManager.GetString(\"NoUsers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No users here.\r\n        /// </summary>\r\n        public static string NoUsersHere {\r\n            get {\r\n                return ResourceManager.GetString(\"NoUsersHere\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Number of last messages to forward.\r\n        /// </summary>\r\n        public static string NumberOfForwardingMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"NumberOfForwardingMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Off.\r\n        /// </summary>\r\n        public static string Off {\r\n            get {\r\n                return ResourceManager.GetString(\"Off\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Off.\r\n        /// </summary>\r\n        public static string OffFeminine {\r\n            get {\r\n                return ResourceManager.GetString(\"OffFeminine\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Official app.\r\n        /// </summary>\r\n        public static string OfficialApp {\r\n            get {\r\n                return ResourceManager.GetString(\"OfficialApp\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Offline.\r\n        /// </summary>\r\n        public static string Offline {\r\n            get {\r\n                return ResourceManager.GetString(\"Offline\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Off.\r\n        /// </summary>\r\n        public static string OffMasculine {\r\n            get {\r\n                return ResourceManager.GetString(\"OffMasculine\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Off.\r\n        /// </summary>\r\n        public static string OffPlural {\r\n            get {\r\n                return ResourceManager.GetString(\"OffPlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Ok.\r\n        /// </summary>\r\n        public static string Ok {\r\n            get {\r\n                return ResourceManager.GetString(\"Ok\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to On.\r\n        /// </summary>\r\n        public static string On {\r\n            get {\r\n                return ResourceManager.GetString(\"On\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to On.\r\n        /// </summary>\r\n        public static string OnFeminine {\r\n            get {\r\n                return ResourceManager.GetString(\"OnFeminine\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Online.\r\n        /// </summary>\r\n        public static string Online {\r\n            get {\r\n                return ResourceManager.GetString(\"Online\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Only admins.\r\n        /// </summary>\r\n        public static string OnlyAdmins {\r\n            get {\r\n                return ResourceManager.GetString(\"OnlyAdmins\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Has no access to messages.\r\n        /// </summary>\r\n        public static string OnlySeesMessagesStartingWithSlash {\r\n            get {\r\n                return ResourceManager.GetString(\"OnlySeesMessagesStartingWithSlash\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to On.\r\n        /// </summary>\r\n        public static string OnMasculine {\r\n            get {\r\n                return ResourceManager.GetString(\"OnMasculine\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to On.\r\n        /// </summary>\r\n        public static string OnPlural {\r\n            get {\r\n                return ResourceManager.GetString(\"OnPlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Slide up to open inline bots.\r\n        /// </summary>\r\n        public static string OpenInlineBotsHint {\r\n            get {\r\n                return ResourceManager.GetString(\"OpenInlineBotsHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Open url {0}?.\r\n        /// </summary>\r\n        public static string OpenUrlConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"OpenUrlConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Allow {0} to pass your Telegram name and id (not your phone number) to the web pages you open with this bot?.\r\n        /// </summary>\r\n        public static string OpenWebPagesViaBotConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"OpenWebPagesViaBotConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Original video.\r\n        /// </summary>\r\n        public static string OriginalVideo {\r\n            get {\r\n                return ResourceManager.GetString(\"OriginalVideo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Other.\r\n        /// </summary>\r\n        public static string Other {\r\n            get {\r\n                return ResourceManager.GetString(\"Other\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Other files.\r\n        /// </summary>\r\n        public static string OtherFiles {\r\n            get {\r\n                return ResourceManager.GetString(\"OtherFiles\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Other Sessions.\r\n        /// </summary>\r\n        public static string OtherSessions {\r\n            get {\r\n                return ResourceManager.GetString(\"OtherSessions\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Outgoing call.\r\n        /// </summary>\r\n        public static string OutgoingCall {\r\n            get {\r\n                return ResourceManager.GetString(\"OutgoingCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to View pack.\r\n        /// </summary>\r\n        public static string Pack {\r\n            get {\r\n                return ResourceManager.GetString(\"Pack\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Passcode Lock.\r\n        /// </summary>\r\n        public static string Passcode {\r\n            get {\r\n                return ResourceManager.GetString(\"Passcode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Require passcode if away for a time..\r\n        /// </summary>\r\n        public static string PasscodeAutolockHint {\r\n            get {\r\n                return ResourceManager.GetString(\"PasscodeAutolockHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to In {0}.\r\n        /// </summary>\r\n        public static string PasscodeAutolockIn {\r\n            get {\r\n                return ResourceManager.GetString(\"PasscodeAutolockIn\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Passcode type.\r\n        /// </summary>\r\n        public static string PasscodeType {\r\n            get {\r\n                return ResourceManager.GetString(\"PasscodeType\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Passport.\r\n        /// </summary>\r\n        public static string Passport {\r\n            get {\r\n                return ResourceManager.GetString(\"Passport\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add Tenancy Agreement.\r\n        /// </summary>\r\n        public static string PassportAddAgreement {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddAgreement\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a scan of your tenancy agreement..\r\n        /// </summary>\r\n        public static string PassportAddAgreementInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddAgreementInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add Bank Statement.\r\n        /// </summary>\r\n        public static string PassportAddBank {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddBank\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a scan of your bank statement..\r\n        /// </summary>\r\n        public static string PassportAddBankInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddBankInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add Utility Bill.\r\n        /// </summary>\r\n        public static string PassportAddBill {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddBill\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a scan of your utility bill..\r\n        /// </summary>\r\n        public static string PassportAddBillInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddBillInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Passport Registration.\r\n        /// </summary>\r\n        public static string PassportAddPassportRegistration {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddPassportRegistration\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a scan of your passport registration page..\r\n        /// </summary>\r\n        public static string PassportAddPassportRegistrationInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddPassportRegistrationInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Address.\r\n        /// </summary>\r\n        public static string PassportAddress {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddress\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Address.\r\n        /// </summary>\r\n        public static string PassportAddressHeader {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddressHeader\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload proof of your address.\r\n        /// </summary>\r\n        public static string PassportAddressInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddressInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please provide your address.\r\n        /// </summary>\r\n        public static string PassportAddressNoUploadInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddressNoUploadInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a scan of your temporary registration..\r\n        /// </summary>\r\n        public static string PassportAddTemporaryRegistrationInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddTemporaryRegistrationInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload scans of a certified English translation of your tenancy agreement..\r\n        /// </summary>\r\n        public static string PassportAddTranslationAgreementInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddTranslationAgreementInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload scans of a certified English translation of your bank statement..\r\n        /// </summary>\r\n        public static string PassportAddTranslationBankInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddTranslationBankInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload scans of a certified English translation of your utility bill..\r\n        /// </summary>\r\n        public static string PassportAddTranslationBillInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddTranslationBillInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload scans of a certified English translation of your driver licence..\r\n        /// </summary>\r\n        public static string PassportAddTranslationDriverLicenceInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddTranslationDriverLicenceInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload scans of a certified English translation of your identity card..\r\n        /// </summary>\r\n        public static string PassportAddTranslationIdentityCardInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddTranslationIdentityCardInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload scans of a certified English translation of your internal passport..\r\n        /// </summary>\r\n        public static string PassportAddTranslationInternalPassportInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddTranslationInternalPassportInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload scans of a certified English translation of your passport..\r\n        /// </summary>\r\n        public static string PassportAddTranslationPassportInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddTranslationPassportInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload scans of a certified English translation of your passport registration page..\r\n        /// </summary>\r\n        public static string PassportAddTranslationPassportRegistrationInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddTranslationPassportRegistrationInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload scans of a certified English translation of your temporary registration..\r\n        /// </summary>\r\n        public static string PassportAddTranslationTemporaryRegistrationInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddTranslationTemporaryRegistrationInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload scans of a certified English translation of the document..\r\n        /// </summary>\r\n        public static string PassportAddTranslationUploadInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportAddTranslationUploadInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Bank Statement.\r\n        /// </summary>\r\n        public static string PassportBankStatement {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportBankStatement\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Date of Birth.\r\n        /// </summary>\r\n        public static string PassportBirthdate {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportBirthdate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Citizenship.\r\n        /// </summary>\r\n        public static string PassportCitizenship {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportCitizenship\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to City.\r\n        /// </summary>\r\n        public static string PassportCity {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportCity\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Tap to correct errors..\r\n        /// </summary>\r\n        public static string PassportCorrectErrors {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportCorrectErrors\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Country.\r\n        /// </summary>\r\n        public static string PassportCountry {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportCountry\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to It seems your Telegram Passport data was corrupted.\r\n        ///You can reset your Telegram Passport..\r\n        /// </summary>\r\n        public static string PassportDataCorrupted {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDataCorrupted\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete.\r\n        /// </summary>\r\n        public static string PassportDelete {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDelete\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to delete address details?.\r\n        /// </summary>\r\n        public static string PassportDeleteAddressAlert {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDeleteAddressAlert\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete address details.\r\n        /// </summary>\r\n        public static string PassportDeleteAddressDetails {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDeleteAddressDetails\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete Telegram Passport.\r\n        /// </summary>\r\n        public static string PassportDeleteAll {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDeleteAll\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to delete your Telegram Passport?.\r\n        /// </summary>\r\n        public static string PassportDeleteConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDeleteConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete document.\r\n        /// </summary>\r\n        public static string PassportDeleteDocument {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDeleteDocument\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to delete this document?.\r\n        /// </summary>\r\n        public static string PassportDeleteDocumentAlert {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDeleteDocumentAlert\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete personal details.\r\n        /// </summary>\r\n        public static string PassportDeleteDocumentPersonal {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDeleteDocumentPersonal\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to delete email?.\r\n        /// </summary>\r\n        public static string PassportDeleteEmailAlert {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDeleteEmailAlert\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to delete phone number?.\r\n        /// </summary>\r\n        public static string PassportDeletePhoneNumberAlert {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDeletePhoneNumberAlert\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Delete scan.\r\n        /// </summary>\r\n        public static string PassportDeleteScan {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDeleteScan\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to delete this scan?.\r\n        /// </summary>\r\n        public static string PassportDeleteScanAlert {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDeleteScanAlert\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Document Number.\r\n        /// </summary>\r\n        public static string PassportDocumentNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDocumentNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Scans.\r\n        /// </summary>\r\n        public static string PassportDocuments {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDocuments\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Driver Licence.\r\n        /// </summary>\r\n        public static string PassportDriverLicence {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportDriverLicence\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Email.\r\n        /// </summary>\r\n        public static string PassportEmail {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportEmail\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Email Address.\r\n        /// </summary>\r\n        public static string PassportEmailAddress {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportEmailAddress\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Enter your email address.\r\n        /// </summary>\r\n        public static string PassportEmailInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportEmailInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Note: You will receive a confirmation code on the email address you provide..\r\n        /// </summary>\r\n        public static string PassportEmailUploadInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportEmailUploadInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Use the same email as on Telegram..\r\n        /// </summary>\r\n        public static string PassportEmailUseSameInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportEmailUseSameInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please enter the confirmation code we&apos;ve just sent to {0}..\r\n        /// </summary>\r\n        public static string PassportEmailVerifyInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportEmailVerifyInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Expires.\r\n        /// </summary>\r\n        public static string PassportExpired {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportExpired\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Female.\r\n        /// </summary>\r\n        public static string PassportFemale {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportFemale\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Could not get authorization form..\r\n        /// </summary>\r\n        public static string PassportFormError {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportFormError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Front Side.\r\n        /// </summary>\r\n        public static string PassportFrontSide {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportFrontSide\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a photo of the front side of the document.\r\n        /// </summary>\r\n        public static string PassportFrontSideInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportFrontSideInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Gender.\r\n        /// </summary>\r\n        public static string PassportGender {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportGender\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} requests access to your personal data to sign you up to their services..\r\n        /// </summary>\r\n        public static string PassportHint {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Identity Card.\r\n        /// </summary>\r\n        public static string PassportIdentityCard {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportIdentityCard\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Identity Document.\r\n        /// </summary>\r\n        public static string PassportIdentityDocument {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportIdentityDocument\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a scan of your passport or other ID.\r\n        /// </summary>\r\n        public static string PassportIdentityDocumentInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportIdentityDocumentInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a scan of your driver&apos;s licence.\r\n        /// </summary>\r\n        public static string PassportIdentityDriverLicence {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportIdentityDriverLicence\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a scan of your identity card.\r\n        /// </summary>\r\n        public static string PassportIdentityID {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportIdentityID\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a scan of your internal passport.\r\n        /// </summary>\r\n        public static string PassportIdentityInternalPassport {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportIdentityInternalPassport\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a scan of your passport.\r\n        /// </summary>\r\n        public static string PassportIdentityPassport {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportIdentityPassport\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to With Telegram Passport you can easily sign up for websites and services that require identity verification.\r\n        ///\r\n        ///Your information, personal data, and documents are protected by end-to-end encryption. Nobody, including Telegram, can access them without your permission.\r\n        ///\r\n        ///You can visit our FAQ to learn more..\r\n        /// </summary>\r\n        public static string PassportInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to What is Telegram Passport?.\r\n        /// </summary>\r\n        public static string PassportInfoTitle {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportInfoTitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Internal Passport.\r\n        /// </summary>\r\n        public static string PassportInternal {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportInternal\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Main Page.\r\n        /// </summary>\r\n        public static string PassportMainPage {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportMainPage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a photo of the main page of the document.\r\n        /// </summary>\r\n        public static string PassportMainPageInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportMainPageInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Male.\r\n        /// </summary>\r\n        public static string PassportMale {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportMale\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Middle name.\r\n        /// </summary>\r\n        public static string PassportMidname {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportMidname\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Middle name ({0}).\r\n        /// </summary>\r\n        public static string PassportMidnameCountry {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportMidnameCountry\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Middle name (latin).\r\n        /// </summary>\r\n        public static string PassportMidnameLatin {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportMidnameLatin\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Name.\r\n        /// </summary>\r\n        public static string PassportName {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportName\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Name ({0}).\r\n        /// </summary>\r\n        public static string PassportNameCountry {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportNameCountry\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Name (latin).\r\n        /// </summary>\r\n        public static string PassportNameLatin {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportNameLatin\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your name.\r\n        /// </summary>\r\n        public static string PassportNativeHeader {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportNativeHeader\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your name in the language of your country of residence ({0})..\r\n        /// </summary>\r\n        public static string PassportNativeInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportNativeInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You have no documents yet.\r\n        /// </summary>\r\n        public static string PassportNoDocuments {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportNoDocuments\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add a Document.\r\n        /// </summary>\r\n        public static string PassportNoDocumentsAdd {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportNoDocumentsAdd\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can add your phone number, email address, identity document or residential address..\r\n        /// </summary>\r\n        public static string PassportNoDocumentsInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportNoDocumentsInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to None.\r\n        /// </summary>\r\n        public static string PassportNoExpireDate {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportNoExpireDate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You are sending your documents directly to {0} and allowing their {1} to send you messages..\r\n        /// </summary>\r\n        public static string PassportNoPolicy {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportNoPolicy\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} or {1}.\r\n        /// </summary>\r\n        public static string PassportOr {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportOr\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Personal Details.\r\n        /// </summary>\r\n        public static string PassportPersonal {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPersonal\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Personal details.\r\n        /// </summary>\r\n        public static string PassportPersonalDetails {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPersonalDetails\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Fill in your personal details.\r\n        /// </summary>\r\n        public static string PassportPersonalDetailsInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPersonalDetailsInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The document must contain your photograph, first and last name, date of birth, document number, country of issue, and expiry date..\r\n        /// </summary>\r\n        public static string PassportPersonalUploadInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPersonalUploadInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Phone Number.\r\n        /// </summary>\r\n        public static string PassportPhone {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPhone\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Enter your phone number.\r\n        /// </summary>\r\n        public static string PassportPhoneInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPhoneInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Phone Number.\r\n        /// </summary>\r\n        public static string PassportPhoneNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPhoneNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Note: You will receive a confirmation code on the phone number you provide..\r\n        /// </summary>\r\n        public static string PassportPhoneUploadInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPhoneUploadInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Or enter a new phone number.\r\n        /// </summary>\r\n        public static string PassportPhoneUseOther {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPhoneUseOther\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Use {0}.\r\n        /// </summary>\r\n        public static string PassportPhoneUseSame {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPhoneUseSame\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Use the same phone number as on Telegram..\r\n        /// </summary>\r\n        public static string PassportPhoneUseSameInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPhoneUseSameInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Postcode.\r\n        /// </summary>\r\n        public static string PassportPostcode {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportPostcode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Provided Information.\r\n        /// </summary>\r\n        public static string PassportProvidedInformation {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportProvidedInformation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Passport Registration.\r\n        /// </summary>\r\n        public static string PassportRegistration {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportRegistration\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Requested Information.\r\n        /// </summary>\r\n        public static string PassportRequestedInformation {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportRequestedInformation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please enter your Telegram Password to decrypt your data..\r\n        /// </summary>\r\n        public static string PassportRequestPasswordInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportRequestPasswordInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Required Documents.\r\n        /// </summary>\r\n        public static string PassportRequiredDocuments {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportRequiredDocuments\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Residence.\r\n        /// </summary>\r\n        public static string PassportResidence {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportResidence\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Residential Address.\r\n        /// </summary>\r\n        public static string PassportResidentialAddress {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportResidentialAddress\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Reverse Side.\r\n        /// </summary>\r\n        public static string PassportReverseSide {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportReverseSide\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a photo of the reverse side of the document.\r\n        /// </summary>\r\n        public static string PassportReverseSideInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportReverseSideInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Select Date.\r\n        /// </summary>\r\n        public static string PassportSelectDate {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportSelectDate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Select Gender.\r\n        /// </summary>\r\n        public static string PassportSelectGender {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportSelectGender\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Does not Expire.\r\n        /// </summary>\r\n        public static string PassportSelectNotExpire {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportSelectNotExpire\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Selfie.\r\n        /// </summary>\r\n        public static string PassportSelfie {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportSelfie\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload a selfie of yourself holding the document.\r\n        /// </summary>\r\n        public static string PassportSelfieInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportSelfieInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please enter your password to access your personal data..\r\n        /// </summary>\r\n        public static string PassportSelfRequest {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportSelfRequest\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to State/Region.\r\n        /// </summary>\r\n        public static string PassportState {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportState\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Street.\r\n        /// </summary>\r\n        public static string PassportStreet1 {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportStreet1\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Street.\r\n        /// </summary>\r\n        public static string PassportStreet2 {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportStreet2\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last name.\r\n        /// </summary>\r\n        public static string PassportSurname {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportSurname\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last name ({0}).\r\n        /// </summary>\r\n        public static string PassportSurnameCountry {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportSurnameCountry\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Last name (latin).\r\n        /// </summary>\r\n        public static string PassportSurnameLatin {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportSurnameLatin\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Temporary Registration.\r\n        /// </summary>\r\n        public static string PassportTemporaryRegistration {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportTemporaryRegistration\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Tenancy Agreement.\r\n        /// </summary>\r\n        public static string PassportTenancyAgreement {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportTenancyAgreement\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Translation.\r\n        /// </summary>\r\n        public static string PassportTranslation {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportTranslation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload additional scans.\r\n        /// </summary>\r\n        public static string PassportUploadAdditinalDocument {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportUploadAdditinalDocument\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upload scans.\r\n        /// </summary>\r\n        public static string PassportUploadDocument {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportUploadDocument\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can&apos;t upload more than {0} files..\r\n        /// </summary>\r\n        public static string PassportUploadMaxReached {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportUploadMaxReached\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please use latin characters only..\r\n        /// </summary>\r\n        public static string PassportUseLatinOnly {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportUseLatinOnly\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Utility Bill.\r\n        /// </summary>\r\n        public static string PassportUtilityBill {\r\n            get {\r\n                return ResourceManager.GetString(\"PassportUtilityBill\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Password.\r\n        /// </summary>\r\n        public static string Password {\r\n            get {\r\n                return ResourceManager.GetString(\"Password\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your password for Two-Step Verification is now active..\r\n        /// </summary>\r\n        public static string PasswordActive {\r\n            get {\r\n                return ResourceManager.GetString(\"PasswordActive\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Password deactivated.\r\n        /// </summary>\r\n        public static string PasswordDeactivated {\r\n            get {\r\n                return ResourceManager.GetString(\"PasswordDeactivated\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Password &amp; Email.\r\n        /// </summary>\r\n        public static string PasswordEmail {\r\n            get {\r\n                return ResourceManager.GetString(\"PasswordEmail\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Password hint.\r\n        /// </summary>\r\n        public static string PasswordHint {\r\n            get {\r\n                return ResourceManager.GetString(\"PasswordHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Hint must be different from your password.\r\n        /// </summary>\r\n        public static string PasswordHintError {\r\n            get {\r\n                return ResourceManager.GetString(\"PasswordHintError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please create a hint for your password.\r\n        /// </summary>\r\n        public static string PasswordHintLabel {\r\n            get {\r\n                return ResourceManager.GetString(\"PasswordHintLabel\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid password. Please try again..\r\n        /// </summary>\r\n        public static string PasswordInvalidString {\r\n            get {\r\n                return ResourceManager.GetString(\"PasswordInvalidString\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You have enabled Two-Step Verification, so your account is protected with an additional password..\r\n        /// </summary>\r\n        public static string PasswordMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"PasswordMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Password recovery.\r\n        /// </summary>\r\n        public static string PasswordRecovery {\r\n            get {\r\n                return ResourceManager.GetString(\"PasswordRecovery\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please check your e-mail and enter the 6-digit code we have sent here..\r\n        /// </summary>\r\n        public static string PasswordRecoveryHint {\r\n            get {\r\n                return ResourceManager.GetString(\"PasswordRecoveryHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Pause.\r\n        /// </summary>\r\n        public static string Pause {\r\n            get {\r\n                return ResourceManager.GetString(\"Pause\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Pay.\r\n        /// </summary>\r\n        public static string Pay {\r\n            get {\r\n                return ResourceManager.GetString(\"Pay\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Payment card.\r\n        /// </summary>\r\n        public static string PaymentCard {\r\n            get {\r\n                return ResourceManager.GetString(\"PaymentCard\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Payment info.\r\n        /// </summary>\r\n        public static string PaymentInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"PaymentInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Payment method.\r\n        /// </summary>\r\n        public static string PaymentMethod {\r\n            get {\r\n                return ResourceManager.GetString(\"PaymentMethod\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Payment provider.\r\n        /// </summary>\r\n        public static string PaymentProvider {\r\n            get {\r\n                return ResourceManager.GetString(\"PaymentProvider\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Payments.\r\n        /// </summary>\r\n        public static string Payments {\r\n            get {\r\n                return ResourceManager.GetString(\"Payments\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Clear payment &amp; shipping info.\r\n        /// </summary>\r\n        public static string PaymentsSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"PaymentsSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Payments will go directly to the developer of {0}. Telegram cannot provide any guarantees, so proceed at your own risk. In case of problems, please contact the developer of {0} or your bank..\r\n        /// </summary>\r\n        public static string PaymentsWarning {\r\n            get {\r\n                return ResourceManager.GetString(\"PaymentsWarning\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, you can only add mutual contacts to groups at the moment..\r\n        /// </summary>\r\n        public static string PeerFloodAddContact {\r\n            get {\r\n                return ResourceManager.GetString(\"PeerFloodAddContact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, you can only send messages to mutual contacts at the moment..\r\n        /// </summary>\r\n        public static string PeerFloodSendMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"PeerFloodSendMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Peer-to-Peer.\r\n        /// </summary>\r\n        public static string PeerToPeer {\r\n            get {\r\n                return ResourceManager.GetString(\"PeerToPeer\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Disabling peer-to-peer will relay all calls through Telegram servers to avoid revealing your IP address, but may slightly decrease audio quality..\r\n        /// </summary>\r\n        public static string PeerToPeerDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"PeerToPeerDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sync with People hub.\r\n        /// </summary>\r\n        public static string PeopleHubIntegration {\r\n            get {\r\n                return ResourceManager.GetString(\"PeopleHubIntegration\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} members.\r\n        /// </summary>\r\n        public static string PeopleInTheConversation {\r\n            get {\r\n                return ResourceManager.GetString(\"PeopleInTheConversation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Code is empty. Please try again..\r\n        /// </summary>\r\n        public static string PhoneCodeEmpty {\r\n            get {\r\n                return ResourceManager.GetString(\"PhoneCodeEmpty\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Code expired. Please try again..\r\n        /// </summary>\r\n        public static string PhoneCodeExpiredString {\r\n            get {\r\n                return ResourceManager.GetString(\"PhoneCodeExpiredString\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You have entered an invalid code. Please try again..\r\n        /// </summary>\r\n        public static string PhoneCodeInvalidString {\r\n            get {\r\n                return ResourceManager.GetString(\"PhoneCodeInvalidString\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Home.\r\n        /// </summary>\r\n        public static string PhoneKindHome {\r\n            get {\r\n                return ResourceManager.GetString(\"PhoneKindHome\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Mobile.\r\n        /// </summary>\r\n        public static string PhoneKindMobile {\r\n            get {\r\n                return ResourceManager.GetString(\"PhoneKindMobile\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Other.\r\n        /// </summary>\r\n        public static string PhoneKindOther {\r\n            get {\r\n                return ResourceManager.GetString(\"PhoneKindOther\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Work.\r\n        /// </summary>\r\n        public static string PhoneKindWork {\r\n            get {\r\n                return ResourceManager.GetString(\"PhoneKindWork\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Phone number.\r\n        /// </summary>\r\n        public static string PhoneNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"PhoneNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid phone number. Please try again..\r\n        /// </summary>\r\n        public static string PhoneNumberInvalidString {\r\n            get {\r\n                return ResourceManager.GetString(\"PhoneNumberInvalidString\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Photo.\r\n        /// </summary>\r\n        public static string Photo {\r\n            get {\r\n                return ResourceManager.GetString(\"Photo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Photo.\r\n        /// </summary>\r\n        public static string PhotoAccusative {\r\n            get {\r\n                return ResourceManager.GetString(\"PhotoAccusative\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Photos.\r\n        /// </summary>\r\n        public static string PhotoGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"PhotoGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Photo.\r\n        /// </summary>\r\n        public static string PhotoGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"PhotoGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Photos.\r\n        /// </summary>\r\n        public static string PhotoNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"PhotoNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Photo.\r\n        /// </summary>\r\n        public static string PhotoNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"PhotoNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Photo Picker.\r\n        /// </summary>\r\n        public static string PhotoPicker {\r\n            get {\r\n                return ResourceManager.GetString(\"PhotoPicker\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Manage photo picker settings.\r\n        /// </summary>\r\n        public static string PhotoPickerSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"PhotoPickerSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Photos.\r\n        /// </summary>\r\n        public static string Photos {\r\n            get {\r\n                return ResourceManager.GetString(\"Photos\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Picture.\r\n        /// </summary>\r\n        public static string PictureAccusative {\r\n            get {\r\n                return ResourceManager.GetString(\"PictureAccusative\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to PIN.\r\n        /// </summary>\r\n        public static string Pin {\r\n            get {\r\n                return ResourceManager.GetString(\"Pin\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Pin.\r\n        /// </summary>\r\n        public static string PinDialog {\r\n            get {\r\n                return ResourceManager.GetString(\"PinDialog\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Pin.\r\n        /// </summary>\r\n        public static string PinMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"PinMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Do you want to pin this message in this group?.\r\n        /// </summary>\r\n        public static string PinMessageConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"PinMessageConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Pinned message.\r\n        /// </summary>\r\n        public static string PinnedMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"PinnedMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Pin to Start.\r\n        /// </summary>\r\n        public static string PinToStart {\r\n            get {\r\n                return ResourceManager.GetString(\"PinToStart\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Play.\r\n        /// </summary>\r\n        public static string Play {\r\n            get {\r\n                return ResourceManager.GetString(\"Play\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Playback paused..\r\n        /// </summary>\r\n        public static string PlaybackPaused {\r\n            get {\r\n                return ResourceManager.GetString(\"PlaybackPaused\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Playback started..\r\n        /// </summary>\r\n        public static string PlaybackStarted {\r\n            get {\r\n                return ResourceManager.GetString(\"PlaybackStarted\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Playback stoped..\r\n        /// </summary>\r\n        public static string PlaybackStoped {\r\n            get {\r\n                return ResourceManager.GetString(\"PlaybackStoped\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Playing a game.\r\n        /// </summary>\r\n        public static string PlayingGame {\r\n            get {\r\n                return ResourceManager.GetString(\"PlayingGame\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please go to chat to forward message.\r\n        /// </summary>\r\n        public static string Please_go_to_chat_to_forward_message {\r\n            get {\r\n                return ResourceManager.GetString(\"Please go to chat to forward message\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please choose at least one participant.\r\n        /// </summary>\r\n        public static string PleaseChooseAtLeastOneParticipant {\r\n            get {\r\n                return ResourceManager.GetString(\"PleaseChooseAtLeastOneParticipant\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please enter subject of the group.\r\n        /// </summary>\r\n        public static string PleaseEnterGroupSubject {\r\n            get {\r\n                return ResourceManager.GetString(\"PleaseEnterGroupSubject\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please go to chat to forward message.\r\n        /// </summary>\r\n        public static string PleaseGoToChatToForwardMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"PleaseGoToChatToForwardMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please note that animated background consumes more battery resources.\r\n        /// </summary>\r\n        public static string PleaseNoteThatAnimatedBackgroundConsumesMoreBatteryResources {\r\n            get {\r\n                return ResourceManager.GetString(\"PleaseNoteThatAnimatedBackgroundConsumesMoreBatteryResources\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please wait....\r\n        /// </summary>\r\n        public static string PleaseWait {\r\n            get {\r\n                return ResourceManager.GetString(\"PleaseWait\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Pornography.\r\n        /// </summary>\r\n        public static string Pornography {\r\n            get {\r\n                return ResourceManager.GetString(\"Pornography\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Port.\r\n        /// </summary>\r\n        public static string Port {\r\n            get {\r\n                return ResourceManager.GetString(\"Port\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Postcode.\r\n        /// </summary>\r\n        public static string Postcode {\r\n            get {\r\n                return ResourceManager.GetString(\"Postcode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, you can&apos;t post to this channel..\r\n        /// </summary>\r\n        public static string PostToChannelError {\r\n            get {\r\n                return ResourceManager.GetString(\"PostToChannelError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Powered by.\r\n        /// </summary>\r\n        public static string PoweredBy {\r\n            get {\r\n                return ResourceManager.GetString(\"PoweredBy\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Powerful.\r\n        /// </summary>\r\n        public static string Powerful {\r\n            get {\r\n                return ResourceManager.GetString(\"Powerful\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to **Telegram** has no limits on the size of\r\n        ///your media and chats..\r\n        /// </summary>\r\n        public static string PowerfulMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"PowerfulMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Preparing viewfinder....\r\n        /// </summary>\r\n        public static string PreparingViewfinder {\r\n            get {\r\n                return ResourceManager.GetString(\"PreparingViewfinder\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Press back key to send video..\r\n        /// </summary>\r\n        public static string PressBackKeyToSendVideo {\r\n            get {\r\n                return ResourceManager.GetString(\"PressBackKeyToSendVideo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Privacy.\r\n        /// </summary>\r\n        public static string Privacy {\r\n            get {\r\n                return ResourceManager.GetString(\"Privacy\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Privacy and Security.\r\n        /// </summary>\r\n        public static string PrivacyAndSecurity {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivacyAndSecurity\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Privacy Policy.\r\n        /// </summary>\r\n        public static string PrivacyPolicy {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivacyPolicy\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Blocked users, last seen, sessions.\r\n        /// </summary>\r\n        public static string PrivacySecuritySubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivacySecuritySubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, too many requests. Unable to change privacy settings now, please wait..\r\n        /// </summary>\r\n        public static string PrivacySettingsError {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivacySettingsError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Privacy Statement.\r\n        /// </summary>\r\n        public static string PrivacyStatement {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivacyStatement\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This application uses your current location to improve the mapping experience. The location data may be stored and shared. Your privacy is important to us. You can disable this feature at any time.\r\n        ///\r\n        ///If you have questions, contact our .\r\n        /// </summary>\r\n        public static string PrivacyStatementText {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivacyStatementText\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Private Group.\r\n        /// </summary>\r\n        public static string Private {\r\n            get {\r\n                return ResourceManager.GetString(\"Private\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Private Channel.\r\n        /// </summary>\r\n        public static string PrivateChannel {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivateChannel\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Private channels can only be joined via an invite link..\r\n        /// </summary>\r\n        public static string PrivateChannelDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivateChannelDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Private chats.\r\n        /// </summary>\r\n        public static string PrivateChats {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivateChats\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Private groups can only be joined if you were invited or have an invite link..\r\n        /// </summary>\r\n        public static string PrivateGroupDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivateGroupDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to People can join your group by following this link. You can revoke the link any time..\r\n        /// </summary>\r\n        public static string PrivateGroupLinkDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivateGroupLinkDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to People can join your channel by following this link. You can revoke the link any time..\r\n        /// </summary>\r\n        public static string PrivateLinkDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivateLinkDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please note that if you choose a public link for your channel, anyone will be able to find it in search and join.\r\n        ///\r\n        ///Do not create this link if you want your channel to stay private..\r\n        /// </summary>\r\n        public static string PrivateToPublicChannelNotification {\r\n            get {\r\n                return ResourceManager.GetString(\"PrivateToPublicChannelNotification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Info.\r\n        /// </summary>\r\n        public static string Profile {\r\n            get {\r\n                return ResourceManager.GetString(\"Profile\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Video encoding profile is invalid.\r\n        /// </summary>\r\n        public static string ProfileIsInvalid {\r\n            get {\r\n                return ResourceManager.GetString(\"ProfileIsInvalid\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Promote to admin.\r\n        /// </summary>\r\n        public static string PromoteToAdmin {\r\n            get {\r\n                return ResourceManager.GetString(\"PromoteToAdmin\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Proxy Settings.\r\n        /// </summary>\r\n        public static string Proxy {\r\n            get {\r\n                return ResourceManager.GetString(\"Proxy\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The proxy you are using is not configured correctly and will be disabled. Please find another one..\r\n        /// </summary>\r\n        public static string ProxyDisabledNotification {\r\n            get {\r\n                return ResourceManager.GetString(\"ProxyDisabledNotification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Proxy sponsor.\r\n        /// </summary>\r\n        public static string ProxySponsor {\r\n            get {\r\n                return ResourceManager.GetString(\"ProxySponsor\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This channel is shown by your proxy server.\r\n        ///To remove this channel from your chats list,\r\n        ///disable the proxy in Telegram Settings..\r\n        /// </summary>\r\n        public static string ProxySponsorAbout {\r\n            get {\r\n                return ResourceManager.GetString(\"ProxySponsorAbout\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This proxy may display a sponsored channel in your chat list. This doesn&apos;t reveal any of your Telegram traffic..\r\n        /// </summary>\r\n        public static string ProxySponsorWarning {\r\n            get {\r\n                return ResourceManager.GetString(\"ProxySponsorWarning\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Public Group.\r\n        /// </summary>\r\n        public static string Public {\r\n            get {\r\n                return ResourceManager.GetString(\"Public\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Public Channel.\r\n        /// </summary>\r\n        public static string PublicChannel {\r\n            get {\r\n                return ResourceManager.GetString(\"PublicChannel\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Public channels can be found in search, anyone can join them..\r\n        /// </summary>\r\n        public static string PublicChannelDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"PublicChannelDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Public groups can be found in search, chat history is available to everyone and anyone can join..\r\n        /// </summary>\r\n        public static string PublicGroupDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"PublicGroupDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to People can share this link with others and find your group using Telegram search..\r\n        /// </summary>\r\n        public static string PublicGroupLinkDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"PublicGroupLinkDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to People can share this link with others and find your channel using Telegram search..\r\n        /// </summary>\r\n        public static string PublicLinkDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"PublicLinkDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Publisher.\r\n        /// </summary>\r\n        public static string Publisher {\r\n            get {\r\n                return ResourceManager.GetString(\"Publisher\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Can post as channel and add and delete content..\r\n        /// </summary>\r\n        public static string PublisherDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"PublisherDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Quality.\r\n        /// </summary>\r\n        public static string Quality {\r\n            get {\r\n                return ResourceManager.GetString(\"Quality\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please rate the quality of your Telegram call.\r\n        /// </summary>\r\n        public static string RateCallQuality {\r\n            get {\r\n                return ResourceManager.GetString(\"RateCallQuality\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Ready to record..\r\n        /// </summary>\r\n        public static string ReadyToRecord {\r\n            get {\r\n                return ResourceManager.GetString(\"ReadyToRecord\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Receipt.\r\n        /// </summary>\r\n        public static string Receipt {\r\n            get {\r\n                return ResourceManager.GetString(\"Receipt\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Receiver.\r\n        /// </summary>\r\n        public static string Receiver {\r\n            get {\r\n                return ResourceManager.GetString(\"Receiver\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Recent.\r\n        /// </summary>\r\n        public static string Recent {\r\n            get {\r\n                return ResourceManager.GetString(\"Recent\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Record.\r\n        /// </summary>\r\n        public static string Record {\r\n            get {\r\n                return ResourceManager.GetString(\"Record\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Recording....\r\n        /// </summary>\r\n        public static string Recording {\r\n            get {\r\n                return ResourceManager.GetString(\"Recording\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Recording audio.\r\n        /// </summary>\r\n        public static string RecordingAudio {\r\n            get {\r\n                return ResourceManager.GetString(\"RecordingAudio\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Recording video.\r\n        /// </summary>\r\n        public static string RecordingVideo {\r\n            get {\r\n                return ResourceManager.GetString(\"RecordingVideo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Recording voice message.\r\n        /// </summary>\r\n        public static string RecordingVoiceMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"RecordingVoiceMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Recovery e-mail.\r\n        /// </summary>\r\n        public static string RecoveryEmail {\r\n            get {\r\n                return ResourceManager.GetString(\"RecoveryEmail\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You have enabled Two-Step Verification.\r\n        ///You&apos;ll need the password you set up here to log in to your Telegram account..\r\n        /// </summary>\r\n        public static string RecoveryEmailComplete {\r\n            get {\r\n                return ResourceManager.GetString(\"RecoveryEmailComplete\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your recovery e-mail {0} is not yet active and pending confirmation..\r\n        /// </summary>\r\n        public static string RecoveryEmailPending {\r\n            get {\r\n                return ResourceManager.GetString(\"RecoveryEmailPending\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Refresh.\r\n        /// </summary>\r\n        public static string Refresh {\r\n            get {\r\n                return ResourceManager.GetString(\"Refresh\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to If you have any problems with the registration process or logging in to your account, please contact us at .\r\n        /// </summary>\r\n        public static string RegistrationProblemDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"RegistrationProblemDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to sms@telegram.org.\r\n        /// </summary>\r\n        public static string RegistrationProblemEmail {\r\n            get {\r\n                return ResourceManager.GetString(\"RegistrationProblemEmail\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to d MMM.\r\n        /// </summary>\r\n        public static string RegularFormat {\r\n            get {\r\n                return ResourceManager.GetString(\"RegularFormat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Remove.\r\n        /// </summary>\r\n        public static string Remove {\r\n            get {\r\n                return ResourceManager.GetString(\"Remove\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Remove.\r\n        /// </summary>\r\n        public static string RemoveStickers {\r\n            get {\r\n                return ResourceManager.GetString(\"RemoveStickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Reply.\r\n        /// </summary>\r\n        public static string Reply {\r\n            get {\r\n                return ResourceManager.GetString(\"Reply\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Report.\r\n        /// </summary>\r\n        public static string Report {\r\n            get {\r\n                return ResourceManager.GetString(\"Report\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Report Spam.\r\n        /// </summary>\r\n        public static string ReportSpam {\r\n            get {\r\n                return ResourceManager.GetString(\"ReportSpam\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Thank you!\r\n        ///Your report will be reviewed by our team very soon..\r\n        /// </summary>\r\n        public static string ReportSpamNotification {\r\n            get {\r\n                return ResourceManager.GetString(\"ReportSpamNotification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Reset.\r\n        /// </summary>\r\n        public static string Reset {\r\n            get {\r\n                return ResourceManager.GetString(\"Reset\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Reset account.\r\n        /// </summary>\r\n        public static string ResetAccount {\r\n            get {\r\n                return ResourceManager.GetString(\"ResetAccount\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Since the account **{0}** is active and protected by a password, we will delete it in 1 week for security purposes.\r\n        ///\r\n        ///You can cancel this process at any time..\r\n        /// </summary>\r\n        public static string ResetAccountDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"ResetAccountDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your recent attempts to reset this account have been cancelled by its active user. Please try again in 7 days..\r\n        /// </summary>\r\n        public static string ResetAccountError {\r\n            get {\r\n                return ResourceManager.GetString(\"ResetAccountError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You’ll be able to reset your account in:.\r\n        /// </summary>\r\n        public static string ResetAccountIn {\r\n            get {\r\n                return ResourceManager.GetString(\"ResetAccountIn\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Reset all notifications.\r\n        /// </summary>\r\n        public static string ResetAllNotifications {\r\n            get {\r\n                return ResourceManager.GetString(\"ResetAllNotifications\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Reset all notifications?.\r\n        /// </summary>\r\n        public static string ResetAllNotificationsMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"ResetAllNotificationsMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Undo all custom notification settings for all your contacts and groups.\r\n        /// </summary>\r\n        public static string ResetAllNotificationsSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"ResetAllNotificationsSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Reset my account.\r\n        /// </summary>\r\n        public static string ResetMyAccount {\r\n            get {\r\n                return ResourceManager.GetString(\"ResetMyAccount\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This action can not be undone.\r\n        ///\r\n        ///If you reset your account, all your messages and chats will be deleted..\r\n        /// </summary>\r\n        public static string ResetMyAccountConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ResetMyAccountConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You will lose all your chats and messages, along with any media and files you shared, \r\n        ///if you proceed with resetting your account..\r\n        /// </summary>\r\n        public static string ResetMyAccountHint {\r\n            get {\r\n                return ResourceManager.GetString(\"ResetMyAccountHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Restart.\r\n        /// </summary>\r\n        public static string Restart {\r\n            get {\r\n                return ResourceManager.GetString(\"Restart\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Restart bot.\r\n        /// </summary>\r\n        public static string RestartBot {\r\n            get {\r\n                return ResourceManager.GetString(\"RestartBot\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Retry.\r\n        /// </summary>\r\n        public static string Retry {\r\n            get {\r\n                return ResourceManager.GetString(\"Retry\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Review.\r\n        /// </summary>\r\n        public static string Review {\r\n            get {\r\n                return ResourceManager.GetString(\"Review\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Revoke.\r\n        /// </summary>\r\n        public static string Revoke {\r\n            get {\r\n                return ResourceManager.GetString(\"Revoke\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Revoke link.\r\n        /// </summary>\r\n        public static string RevokeLink {\r\n            get {\r\n                return ResourceManager.GetString(\"RevokeLink\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to revoke this link? Once you do, no one will be able to join the group using it..\r\n        /// </summary>\r\n        public static string RevokeLinkConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"RevokeLinkConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to revoke the link **{0}**?\r\n        ///\r\n        ///The group **&quot;{1}&quot;** will become private..\r\n        /// </summary>\r\n        public static string RevokeLinkConfirmation2 {\r\n            get {\r\n                return ResourceManager.GetString(\"RevokeLinkConfirmation2\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The previous invite link is now inactive. A new link has been generated..\r\n        /// </summary>\r\n        public static string RevokeLinkHint {\r\n            get {\r\n                return ResourceManager.GetString(\"RevokeLinkHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Ringing.\r\n        /// </summary>\r\n        public static string Ringing {\r\n            get {\r\n                return ResourceManager.GetString(\"Ringing\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Satellite.\r\n        /// </summary>\r\n        public static string Satellite {\r\n            get {\r\n                return ResourceManager.GetString(\"Satellite\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Save.\r\n        /// </summary>\r\n        public static string Save {\r\n            get {\r\n                return ResourceManager.GetString(\"Save\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your card {0} is on file. To pay with this card, please enter your 2-Step-Verification password..\r\n        /// </summary>\r\n        public static string SavedCardHint {\r\n            get {\r\n                return ResourceManager.GetString(\"SavedCardHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Saved Messages.\r\n        /// </summary>\r\n        public static string SavedMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"SavedMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Saved Pictures.\r\n        /// </summary>\r\n        public static string SavedPicturesFolder {\r\n            get {\r\n                return ResourceManager.GetString(\"SavedPicturesFolder\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The file has been saved successfully.\r\n        /// </summary>\r\n        public static string SaveFileMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"SaveFileMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Save incoming photos.\r\n        /// </summary>\r\n        public static string SaveIncomingPhotos {\r\n            get {\r\n                return ResourceManager.GetString(\"SaveIncomingPhotos\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Save Payment Information.\r\n        /// </summary>\r\n        public static string SavePaymentInformation {\r\n            get {\r\n                return ResourceManager.GetString(\"SavePaymentInformation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can save your payment info for future use..\r\n        /// </summary>\r\n        public static string SavePaymentInformationHint {\r\n            get {\r\n                return ResourceManager.GetString(\"SavePaymentInformationHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The photo has been saved successfully.\r\n        /// </summary>\r\n        public static string SavePhotoMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"SavePhotoMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Save Shipping Information.\r\n        /// </summary>\r\n        public static string SaveShippingInformation {\r\n            get {\r\n                return ResourceManager.GetString(\"SaveShippingInformation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can save your shipping info for future use..\r\n        /// </summary>\r\n        public static string SaveShippingInformationHint {\r\n            get {\r\n                return ResourceManager.GetString(\"SaveShippingInformationHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Screenshots.\r\n        /// </summary>\r\n        public static string ScreenshotsFolder {\r\n            get {\r\n                return ResourceManager.GetString(\"ScreenshotsFolder\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Search.\r\n        /// </summary>\r\n        public static string Search {\r\n            get {\r\n                return ResourceManager.GetString(\"Search\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Search among your chats.\r\n        /// </summary>\r\n        public static string SearchAmongYourChats {\r\n            get {\r\n                return ResourceManager.GetString(\"SearchAmongYourChats\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Search contacts.\r\n        /// </summary>\r\n        public static string SearchAmongYourContacts {\r\n            get {\r\n                return ResourceManager.GetString(\"SearchAmongYourContacts\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Search chats and messages.\r\n        /// </summary>\r\n        public static string SearchAmongYourDialogsAndMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"SearchAmongYourDialogsAndMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Search shared files.\r\n        /// </summary>\r\n        public static string SearchAmongYourFiles {\r\n            get {\r\n                return ResourceManager.GetString(\"SearchAmongYourFiles\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Search chats or messages.\r\n        /// </summary>\r\n        public static string SearchChatsOrMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"SearchChatsOrMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Search messages.\r\n        /// </summary>\r\n        public static string SearchMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"SearchMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Search shared links.\r\n        /// </summary>\r\n        public static string SearchSharedLinks {\r\n            get {\r\n                return ResourceManager.GetString(\"SearchSharedLinks\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Search shared music.\r\n        /// </summary>\r\n        public static string SearchSharedMusic {\r\n            get {\r\n                return ResourceManager.GetString(\"SearchSharedMusic\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Seconds.\r\n        /// </summary>\r\n        public static string SecondGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"SecondGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Second.\r\n        /// </summary>\r\n        public static string SecondGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"SecondGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Seconds.\r\n        /// </summary>\r\n        public static string SecondNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"SecondNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Second.\r\n        /// </summary>\r\n        public static string SecondNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"SecondNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Secret.\r\n        /// </summary>\r\n        public static string Secret {\r\n            get {\r\n                return ResourceManager.GetString(\"Secret\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Secret chat.\r\n        /// </summary>\r\n        public static string SecretChat {\r\n            get {\r\n                return ResourceManager.GetString(\"SecretChat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You have invited {0} to join a secret chat..\r\n        /// </summary>\r\n        public static string SecretChatCaption {\r\n            get {\r\n                return ResourceManager.GetString(\"SecretChatCaption\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} invited you to join a secret chat..\r\n        /// </summary>\r\n        public static string SecretChatCaption2 {\r\n            get {\r\n                return ResourceManager.GetString(\"SecretChatCaption2\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Secret chat created.\r\n        /// </summary>\r\n        public static string SecretChatCreated {\r\n            get {\r\n                return ResourceManager.GetString(\"SecretChatCreated\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Secret chat cancelled.\r\n        /// </summary>\r\n        public static string SecretChatDiscarded {\r\n            get {\r\n                return ResourceManager.GetString(\"SecretChatDiscarded\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Exchanging encryption keys....\r\n        /// </summary>\r\n        public static string SecretChatRequested {\r\n            get {\r\n                return ResourceManager.GetString(\"SecretChatRequested\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Secret Chats.\r\n        /// </summary>\r\n        public static string SecretChats {\r\n            get {\r\n                return ResourceManager.GetString(\"SecretChats\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Secret chats:\r\n        ///• Use end-to-end encryption\r\n        ///• Leave no trace on our servers\r\n        ///• Have a self-destruct timer\r\n        ///• Do not allow forwarding.\r\n        /// </summary>\r\n        public static string SecretChatsDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"SecretChatsDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Secret Photo.\r\n        /// </summary>\r\n        public static string SecretPhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"SecretPhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Secret Video.\r\n        /// </summary>\r\n        public static string SecretVideo {\r\n            get {\r\n                return ResourceManager.GetString(\"SecretVideo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Secure.\r\n        /// </summary>\r\n        public static string Secure {\r\n            get {\r\n                return ResourceManager.GetString(\"Secure\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to **Telegram** keeps your messages safe\r\n        ///from hacker attacks..\r\n        /// </summary>\r\n        public static string SecureMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"SecureMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Security.\r\n        /// </summary>\r\n        public static string Security {\r\n            get {\r\n                return ResourceManager.GetString(\"Security\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Security Code (CVV).\r\n        /// </summary>\r\n        public static string SecurityCode {\r\n            get {\r\n                return ResourceManager.GetString(\"SecurityCode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Has access to messages.\r\n        /// </summary>\r\n        public static string SeesAllMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"SeesAllMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Select.\r\n        /// </summary>\r\n        public static string Select {\r\n            get {\r\n                return ResourceManager.GetString(\"Select\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Select chat.\r\n        /// </summary>\r\n        public static string SelectChat {\r\n            get {\r\n                return ResourceManager.GetString(\"SelectChat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Self-destruct timer.\r\n        /// </summary>\r\n        public static string SelfDestructTimer {\r\n            get {\r\n                return ResourceManager.GetString(\"SelfDestructTimer\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to If you set a timer, the photo will self destruct after it was viewed..\r\n        /// </summary>\r\n        public static string SelfDestructTimerPhotoSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"SelfDestructTimerPhotoSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to If you set a timer, the video will self destruct after it was viewed..\r\n        /// </summary>\r\n        public static string SelfDestructTimerVideoSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"SelfDestructTimerVideoSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Send.\r\n        /// </summary>\r\n        public static string Send {\r\n            get {\r\n                return ResourceManager.GetString(\"Send\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Send Call Logs.\r\n        /// </summary>\r\n        public static string SendCallLogs {\r\n            get {\r\n                return ResourceManager.GetString(\"SendCallLogs\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sending.\r\n        /// </summary>\r\n        public static string Sending {\r\n            get {\r\n                return ResourceManager.GetString(\"Sending\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sending audio.\r\n        /// </summary>\r\n        public static string SendingAudio {\r\n            get {\r\n                return ResourceManager.GetString(\"SendingAudio\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Can&apos;t send.\r\n        /// </summary>\r\n        public static string SendingFailed {\r\n            get {\r\n                return ResourceManager.GetString(\"SendingFailed\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sending file.\r\n        /// </summary>\r\n        public static string SendingFile {\r\n            get {\r\n                return ResourceManager.GetString(\"SendingFile\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sending photo.\r\n        /// </summary>\r\n        public static string SendingPhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"SendingPhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sending video.\r\n        /// </summary>\r\n        public static string SendingVideo {\r\n            get {\r\n                return ResourceManager.GetString(\"SendingVideo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Share My Live Location for....\r\n        /// </summary>\r\n        public static string SendLiveLocation {\r\n            get {\r\n                return ResourceManager.GetString(\"SendLiveLocation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Updated in real time as you move.\r\n        /// </summary>\r\n        public static string SendLiveLocationSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"SendLiveLocationSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Send Logs.\r\n        /// </summary>\r\n        public static string SendLogs {\r\n            get {\r\n                return ResourceManager.GetString(\"SendLogs\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Send Message.\r\n        /// </summary>\r\n        public static string SendMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"SendMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Send messages by Enter.\r\n        /// </summary>\r\n        public static string SendMessageByEnter {\r\n            get {\r\n                return ResourceManager.GetString(\"SendMessageByEnter\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You have contacted too many non-contacts today, please try again tomorrow. You will be able to reply today if this user messages you first..\r\n        /// </summary>\r\n        public static string SendMessageFloodWait {\r\n            get {\r\n                return ResourceManager.GetString(\"SendMessageFloodWait\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Send sticker.\r\n        /// </summary>\r\n        public static string SendSticker {\r\n            get {\r\n                return ResourceManager.GetString(\"SendSticker\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Send My Location.\r\n        /// </summary>\r\n        public static string SendThisLocation {\r\n            get {\r\n                return ResourceManager.GetString(\"SendThisLocation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to We have sent a recovery code to the e-mail you provided: {0}.\r\n        /// </summary>\r\n        public static string SentRecoveryCodeMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"SentRecoveryCodeMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Server.\r\n        /// </summary>\r\n        public static string Server {\r\n            get {\r\n                return ResourceManager.GetString(\"Server\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Server error.\r\n        /// </summary>\r\n        public static string ServerError {\r\n            get {\r\n                return ResourceManager.GetString(\"ServerError\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Internal server error occurred. Please try again later..\r\n        /// </summary>\r\n        public static string ServerErrorMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"ServerErrorMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Service message.\r\n        /// </summary>\r\n        public static string ServiceMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"ServiceMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Service notifications.\r\n        /// </summary>\r\n        public static string ServiceNotifications {\r\n            get {\r\n                return ResourceManager.GetString(\"ServiceNotifications\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Active Sessions.\r\n        /// </summary>\r\n        public static string Sessions {\r\n            get {\r\n                return ResourceManager.GetString(\"Sessions\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Set.\r\n        /// </summary>\r\n        public static string Set {\r\n            get {\r\n                return ResourceManager.GetString(\"Set\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Set Admins.\r\n        /// </summary>\r\n        public static string SetAdmins {\r\n            get {\r\n                return ResourceManager.GetString(\"SetAdmins\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Set Channel Photo.\r\n        /// </summary>\r\n        public static string SetChannelPhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"SetChannelPhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sets.\r\n        /// </summary>\r\n        public static string SetGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"SetGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Set.\r\n        /// </summary>\r\n        public static string SetGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"SetGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sets.\r\n        /// </summary>\r\n        public static string SetNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"SetNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Set.\r\n        /// </summary>\r\n        public static string SetNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"SetNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Set Photo.\r\n        /// </summary>\r\n        public static string SetPhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"SetPhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Set Profile Photo.\r\n        /// </summary>\r\n        public static string SetProfilePhoto {\r\n            get {\r\n                return ResourceManager.GetString(\"SetProfilePhoto\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Set recovery e-mail.\r\n        /// </summary>\r\n        public static string SetRecoveryEmail {\r\n            get {\r\n                return ResourceManager.GetString(\"SetRecoveryEmail\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Set shared link.\r\n        /// </summary>\r\n        public static string SetSharedLink {\r\n            get {\r\n                return ResourceManager.GetString(\"SetSharedLink\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Settings.\r\n        /// </summary>\r\n        public static string Settings {\r\n            get {\r\n                return ResourceManager.GetString(\"Settings\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to These settings will override the values above..\r\n        /// </summary>\r\n        public static string SettingsOverrideNote {\r\n            get {\r\n                return ResourceManager.GetString(\"SettingsOverrideNote\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Set username.\r\n        /// </summary>\r\n        public static string SetUsername {\r\n            get {\r\n                return ResourceManager.GetString(\"SetUsername\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Share.\r\n        /// </summary>\r\n        public static string Share {\r\n            get {\r\n                return ResourceManager.GetString(\"Share\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Share contact.\r\n        /// </summary>\r\n        public static string ShareContact {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareContact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Shared contact.\r\n        /// </summary>\r\n        public static string SharedContact {\r\n            get {\r\n                return ResourceManager.GetString(\"SharedContact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Files.\r\n        /// </summary>\r\n        public static string SharedFiles {\r\n            get {\r\n                return ResourceManager.GetString(\"SharedFiles\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Links.\r\n        /// </summary>\r\n        public static string SharedLinks {\r\n            get {\r\n                return ResourceManager.GetString(\"SharedLinks\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Music.\r\n        /// </summary>\r\n        public static string SharedMusic {\r\n            get {\r\n                return ResourceManager.GetString(\"SharedMusic\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can send and receive files of any type up to 1.5 GB each and access them anywhere..\r\n        /// </summary>\r\n        public static string ShareFiles {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareFiles\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Share the game with {0}?.\r\n        /// </summary>\r\n        public static string ShareGameWith {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareGameWith\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Share link.\r\n        /// </summary>\r\n        public static string ShareLink {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareLink\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Share links in this chat and access them on any of your devices..\r\n        /// </summary>\r\n        public static string ShareLinks {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareLinks\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Choose for how long people in this chat will see your accurate location..\r\n        /// </summary>\r\n        public static string ShareLiveLocationToChatTimerSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareLiveLocationToChatTimerSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Choose for how long {0} will see your accurate location..\r\n        /// </summary>\r\n        public static string ShareLiveLocationToContactTimerSubtitle {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareLiveLocationToContactTimerSubtitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Share location.\r\n        /// </summary>\r\n        public static string ShareLocation {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareLocation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Share your location?.\r\n        /// </summary>\r\n        public static string ShareLocationCaption {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareLocationCaption\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This will send your current location to the bot..\r\n        /// </summary>\r\n        public static string ShareLocationConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareLocationConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This bot would like to know your location each time you send it a request. This can be used to provide location-specific results..\r\n        /// </summary>\r\n        public static string ShareLocationInlineConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareLocationInlineConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to All music shared in this chat will appear here..\r\n        /// </summary>\r\n        public static string ShareMusic {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareMusic\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Share My Contact Info.\r\n        /// </summary>\r\n        public static string ShareMyContactInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareMyContactInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Share your phone number?.\r\n        /// </summary>\r\n        public static string SharePhoneNumberCaption {\r\n            get {\r\n                return ResourceManager.GetString(\"SharePhoneNumberCaption\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The bot will know your phone number. This can be useful for integration with other services..\r\n        /// </summary>\r\n        public static string SharePhoneNumberConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"SharePhoneNumberConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No media files yet.\r\n        ///\r\n        ///Share photos and videos in this chat — or this paperclip stays unhappy..\r\n        /// </summary>\r\n        public static string SharePhotosAndVideos {\r\n            get {\r\n                return ResourceManager.GetString(\"SharePhotosAndVideos\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Share with {0}?.\r\n        /// </summary>\r\n        public static string ShareWith {\r\n            get {\r\n                return ResourceManager.GetString(\"ShareWith\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You are sharing your Live Location with {0}.\r\n        /// </summary>\r\n        public static string SharingLiveLocationTitle {\r\n            get {\r\n                return ResourceManager.GetString(\"SharingLiveLocationTitle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You and {0}.\r\n        /// </summary>\r\n        public static string SharingYouAndOtherName {\r\n            get {\r\n                return ResourceManager.GetString(\"SharingYouAndOtherName\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Shipping.\r\n        /// </summary>\r\n        public static string Shipping {\r\n            get {\r\n                return ResourceManager.GetString(\"Shipping\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Shipping address.\r\n        /// </summary>\r\n        public static string ShippingAddress {\r\n            get {\r\n                return ResourceManager.GetString(\"ShippingAddress\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Shipping info.\r\n        /// </summary>\r\n        public static string ShippingInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"ShippingInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Shipping information.\r\n        /// </summary>\r\n        public static string ShippingInformation {\r\n            get {\r\n                return ResourceManager.GetString(\"ShippingInformation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Shipping method.\r\n        /// </summary>\r\n        public static string ShippingMethod {\r\n            get {\r\n                return ResourceManager.GetString(\"ShippingMethod\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Shipping methods.\r\n        /// </summary>\r\n        public static string ShippingMethods {\r\n            get {\r\n                return ResourceManager.GetString(\"ShippingMethods\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Show.\r\n        /// </summary>\r\n        public static string Show {\r\n            get {\r\n                return ResourceManager.GetString(\"Show\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Show next.\r\n        /// </summary>\r\n        public static string ShowNext {\r\n            get {\r\n                return ResourceManager.GetString(\"ShowNext\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Show stickers tab.\r\n        /// </summary>\r\n        public static string ShowStickersTab {\r\n            get {\r\n                return ResourceManager.GetString(\"ShowStickersTab\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to A sticker icon will appear in the input field..\r\n        /// </summary>\r\n        public static string ShowStickersTabHint {\r\n            get {\r\n                return ResourceManager.GetString(\"ShowStickersTabHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sign In.\r\n        /// </summary>\r\n        public static string SignIn {\r\n            get {\r\n                return ResourceManager.GetString(\"SignIn\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please confirm your country code and enter your phone number..\r\n        /// </summary>\r\n        public static string SignInMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"SignInMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sign messages.\r\n        /// </summary>\r\n        public static string SignMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"SignMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Add names of the admins to the messages they post.\r\n        /// </summary>\r\n        public static string SignMessagesDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"SignMessagesDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Enter your name and add a profile picture..\r\n        /// </summary>\r\n        public static string SignUpMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"SignUpMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Simple passcode.\r\n        /// </summary>\r\n        public static string SimplePasscode {\r\n            get {\r\n                return ResourceManager.GetString(\"SimplePasscode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to A simple passcode is a 4 digit number..\r\n        /// </summary>\r\n        public static string SimplePasscodeHint {\r\n            get {\r\n                return ResourceManager.GetString(\"SimplePasscodeHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Skip.\r\n        /// </summary>\r\n        public static string Skip {\r\n            get {\r\n                return ResourceManager.GetString(\"Skip\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No, seriously.\r\n        ///\r\n        ///If you forget your password, you will be lose access to your Telegram account. There will be no way to restore it..\r\n        /// </summary>\r\n        public static string SkipRecoveryEmailHint {\r\n            get {\r\n                return ResourceManager.GetString(\"SkipRecoveryEmailHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Slide to cancel.\r\n        /// </summary>\r\n        public static string SlideToCancel {\r\n            get {\r\n                return ResourceManager.GetString(\"SlideToCancel\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sms.\r\n        /// </summary>\r\n        public static string Sms {\r\n            get {\r\n                return ResourceManager.GetString(\"Sms\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Social networks.\r\n        /// </summary>\r\n        public static string SocialNetworks {\r\n            get {\r\n                return ResourceManager.GetString(\"SocialNetworks\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to SOCKS5.\r\n        /// </summary>\r\n        public static string Socks5 {\r\n            get {\r\n                return ResourceManager.GetString(\"Socks5\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Songs.\r\n        /// </summary>\r\n        public static string SongGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"SongGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Song.\r\n        /// </summary>\r\n        public static string SongGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"SongGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Songs.\r\n        /// </summary>\r\n        public static string SongNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"SongNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Song.\r\n        /// </summary>\r\n        public static string SongNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"SongNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry.\r\n        /// </summary>\r\n        public static string Sorry {\r\n            get {\r\n                return ResourceManager.GetString(\"Sorry\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sound.\r\n        /// </summary>\r\n        public static string Sound {\r\n            get {\r\n                return ResourceManager.GetString(\"Sound\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Spam.\r\n        /// </summary>\r\n        public static string Spam {\r\n            get {\r\n                return ResourceManager.GetString(\"Spam\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Speaker.\r\n        /// </summary>\r\n        public static string Speaker {\r\n            get {\r\n                return ResourceManager.GetString(\"Speaker\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Special thanks.\r\n        /// </summary>\r\n        public static string SpecialThanks {\r\n            get {\r\n                return ResourceManager.GetString(\"SpecialThanks\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Start.\r\n        /// </summary>\r\n        public static string Start {\r\n            get {\r\n                return ResourceManager.GetString(\"Start\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Start messaging.\r\n        /// </summary>\r\n        public static string StartMessaging {\r\n            get {\r\n                return ResourceManager.GetString(\"StartMessaging\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to State.\r\n        /// </summary>\r\n        public static string State {\r\n            get {\r\n                return ResourceManager.GetString(\"State\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Static.\r\n        /// </summary>\r\n        public static string Static {\r\n            get {\r\n                return ResourceManager.GetString(\"Static\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please follow these steps to complete Two-Step Verification Setup\r\n        ///\r\n        ///1. Check your e-mail (don&apos;t forget the spam folder) {0}\r\n        ///\r\n        ///2. Click on the validation link..\r\n        /// </summary>\r\n        public static string StepsToCompleteToTwoStepsVerificationSetup {\r\n            get {\r\n                return ResourceManager.GetString(\"StepsToCompleteToTwoStepsVerificationSetup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sticker.\r\n        /// </summary>\r\n        public static string Sticker {\r\n            get {\r\n                return ResourceManager.GetString(\"Sticker\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Stickers.\r\n        /// </summary>\r\n        public static string StickerGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"StickerGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sticker.\r\n        /// </summary>\r\n        public static string StickerGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"StickerGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Stickers.\r\n        /// </summary>\r\n        public static string StickerNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"StickerNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sticker.\r\n        /// </summary>\r\n        public static string StickerNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"StickerNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sticker packs.\r\n        /// </summary>\r\n        public static string StickerPackGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"StickerPackGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sticker pack.\r\n        /// </summary>\r\n        public static string StickerPackGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"StickerPackGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sticker packs.\r\n        /// </summary>\r\n        public static string StickerPackNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"StickerPackNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sticker pack.\r\n        /// </summary>\r\n        public static string StickerPackNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"StickerPackNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Stickers.\r\n        /// </summary>\r\n        public static string Stickers {\r\n            get {\r\n                return ResourceManager.GetString(\"Stickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Artists are welcome to add their own sticker packs using our @stickers bot.\r\n        ///\r\n        ///Users can add stickers by tapping on them and choosing &quot;Add to Stickers&quot;..\r\n        /// </summary>\r\n        public static string StickersDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"StickersDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Artists are welcome to add their own sticker packs using our __@stickers__ bot.\r\n        ///\r\n        ///Users can add stickers by tapping on them and choosing &quot;Add to Stickers&quot;..\r\n        /// </summary>\r\n        public static string StickersHint {\r\n            get {\r\n                return ResourceManager.GetString(\"StickersHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Stickers not found.\r\n        /// </summary>\r\n        public static string StickersNotFound {\r\n            get {\r\n                return ResourceManager.GetString(\"StickersNotFound\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sticker set removed.\r\n        /// </summary>\r\n        public static string StickersRemoved {\r\n            get {\r\n                return ResourceManager.GetString(\"StickersRemoved\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Stop.\r\n        /// </summary>\r\n        public static string Stop {\r\n            get {\r\n                return ResourceManager.GetString(\"Stop\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Stop All.\r\n        /// </summary>\r\n        public static string StopAllLocationSharings {\r\n            get {\r\n                return ResourceManager.GetString(\"StopAllLocationSharings\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Stop.\r\n        /// </summary>\r\n        public static string StopBot {\r\n            get {\r\n                return ResourceManager.GetString(\"StopBot\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to stop sharing your live location?.\r\n        /// </summary>\r\n        public static string StopLiveLocationAlertAll {\r\n            get {\r\n                return ResourceManager.GetString(\"StopLiveLocationAlertAll\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to stop sharing live location with {0}?.\r\n        /// </summary>\r\n        public static string StopLiveLocationAlertToGroup {\r\n            get {\r\n                return ResourceManager.GetString(\"StopLiveLocationAlertToGroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to stop sharing live location with {0}?.\r\n        /// </summary>\r\n        public static string StopLiveLocationAlertToUser {\r\n            get {\r\n                return ResourceManager.GetString(\"StopLiveLocationAlertToUser\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Stop Sharing Location.\r\n        /// </summary>\r\n        public static string StopSharingLocation {\r\n            get {\r\n                return ResourceManager.GetString(\"StopSharingLocation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Subject.\r\n        /// </summary>\r\n        public static string Subject {\r\n            get {\r\n                return ResourceManager.GetString(\"Subject\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Subscribers.\r\n        /// </summary>\r\n        public static string SubscriberGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"SubscriberGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Subscriber.\r\n        /// </summary>\r\n        public static string SubscriberGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"SubscriberGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Subscribers.\r\n        /// </summary>\r\n        public static string SubscriberNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"SubscriberNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Subscriber.\r\n        /// </summary>\r\n        public static string SubscriberNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"SubscriberNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Subtotal.\r\n        /// </summary>\r\n        public static string Subtotal {\r\n            get {\r\n                return ResourceManager.GetString(\"Subtotal\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Success!.\r\n        /// </summary>\r\n        public static string Success {\r\n            get {\r\n                return ResourceManager.GetString(\"Success\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Suggest Frequent Contacts.\r\n        /// </summary>\r\n        public static string SuggestFrequentContacts {\r\n            get {\r\n                return ResourceManager.GetString(\"SuggestFrequentContacts\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Display people you message frequently at the top of the search section for quick access..\r\n        /// </summary>\r\n        public static string SuggestFrequentContactsAbout {\r\n            get {\r\n                return ResourceManager.GetString(\"SuggestFrequentContactsAbout\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This will delete all data about the people you message frequently as well the inline bots you are likely to use..\r\n        /// </summary>\r\n        public static string SuggestFrequentContactsNotification {\r\n            get {\r\n                return ResourceManager.GetString(\"SuggestFrequentContactsNotification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Suggest stickers by emoji.\r\n        /// </summary>\r\n        public static string SuggestStickersByEmoji {\r\n            get {\r\n                return ResourceManager.GetString(\"SuggestStickersByEmoji\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Supergroup.\r\n        /// </summary>\r\n        public static string Supergroup {\r\n            get {\r\n                return ResourceManager.GetString(\"Supergroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Supergroup name.\r\n        /// </summary>\r\n        public static string SupergroupName {\r\n            get {\r\n                return ResourceManager.GetString(\"SupergroupName\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can choose a supergroup name on Telegram. If you do, other people will be able to find your supergroup by this username.\r\n        ///\r\n        ///You can use a-z, 0-9 and underscores. Minimum length is 5 characters..\r\n        /// </summary>\r\n        public static string SupergroupNameDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"SupergroupNameDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This link opens your supergroup in Telegram:.\r\n        /// </summary>\r\n        public static string SupergroupNameDescription2 {\r\n            get {\r\n                return ResourceManager.GetString(\"SupergroupNameDescription2\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this name is invalid..\r\n        /// </summary>\r\n        public static string SupergroupNameInvalid {\r\n            get {\r\n                return ResourceManager.GetString(\"SupergroupNameInvalid\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this name is already taken..\r\n        /// </summary>\r\n        public static string SupergroupNameOccupied {\r\n            get {\r\n                return ResourceManager.GetString(\"SupergroupNameOccupied\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Supergroup names must have at least 5 characters..\r\n        /// </summary>\r\n        public static string SupergroupNameShort {\r\n            get {\r\n                return ResourceManager.GetString(\"SupergroupNameShort\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Supergroup names can&apos;t start with a number..\r\n        /// </summary>\r\n        public static string SupergroupNameStartsWithNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"SupergroupNameStartsWithNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Support.\r\n        /// </summary>\r\n        public static string Support {\r\n            get {\r\n                return ResourceManager.GetString(\"Support\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Switch mode.\r\n        /// </summary>\r\n        public static string SwitchMode {\r\n            get {\r\n                return ResourceManager.GetString(\"SwitchMode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sync Contacts.\r\n        /// </summary>\r\n        public static string SyncContacts {\r\n            get {\r\n                return ResourceManager.GetString(\"SyncContacts\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This will remove your contacts from the Telegram servers. If &apos;Sync Contacts&apos; is enabled, contacts will be re-synced..\r\n        /// </summary>\r\n        public static string SyncContactsDeleteInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"SyncContactsDeleteInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Turn on to continuously sync contacts from this device with your account..\r\n        /// </summary>\r\n        public static string SyncContactsInfoOff {\r\n            get {\r\n                return ResourceManager.GetString(\"SyncContactsInfoOff\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Contacts from this device will be added to your account..\r\n        /// </summary>\r\n        public static string SyncContactsInfoOn {\r\n            get {\r\n                return ResourceManager.GetString(\"SyncContactsInfoOn\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sync contacts ({0} of {1})....\r\n        /// </summary>\r\n        public static string SyncContactsProgress {\r\n            get {\r\n                return ResourceManager.GetString(\"SyncContactsProgress\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Tap and hold to record.\r\n        /// </summary>\r\n        public static string TapAndHoldToRecord {\r\n            get {\r\n                return ResourceManager.GetString(\"TapAndHoldToRecord\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Tap and hold to view.\r\n        /// </summary>\r\n        public static string TapAndHoldToView {\r\n            get {\r\n                return ResourceManager.GetString(\"TapAndHoldToView\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Tap record to start recording....\r\n        /// </summary>\r\n        public static string TapRecordToStartRecording {\r\n            get {\r\n                return ResourceManager.GetString(\"TapRecordToStartRecording\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Tap to disconnect from your Telegram account..\r\n        /// </summary>\r\n        public static string TapToDisconnectTelegramAccount {\r\n            get {\r\n                return ResourceManager.GetString(\"TapToDisconnectTelegramAccount\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Taxes.\r\n        /// </summary>\r\n        public static string Taxes {\r\n            get {\r\n                return ResourceManager.GetString(\"Taxes\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Telegram dialed your number.\r\n        /// </summary>\r\n        public static string TelegramDialedYourNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"TelegramDialedYourNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Telegram FAQ.\r\n        /// </summary>\r\n        public static string TelegramFAQ {\r\n            get {\r\n                return ResourceManager.GetString(\"TelegramFAQ\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Telegram.\r\n        /// </summary>\r\n        public static string TelegramNotifications {\r\n            get {\r\n                return ResourceManager.GetString(\"TelegramNotifications\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Telegram Passport.\r\n        /// </summary>\r\n        public static string TelegramPassport {\r\n            get {\r\n                return ResourceManager.GetString(\"TelegramPassport\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Create a password.\r\n        /// </summary>\r\n        public static string TelegramPassportCreatePassword {\r\n            get {\r\n                return ResourceManager.GetString(\"TelegramPassportCreatePassword\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please create a password to secure your personal data with end-to-end encryption.\r\n        ///\r\n        ///This password will also be required whenever you log in to Telegram on a new device..\r\n        /// </summary>\r\n        public static string TelegramPassportCreatePasswordInfo {\r\n            get {\r\n                return ResourceManager.GetString(\"TelegramPassportCreatePasswordInfo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Telegram.org.\r\n        /// </summary>\r\n        public static string TelegramWebsite {\r\n            get {\r\n                return ResourceManager.GetString(\"TelegramWebsite\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Terminate.\r\n        /// </summary>\r\n        public static string Terminate {\r\n            get {\r\n                return ResourceManager.GetString(\"Terminate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Logs out all devices except for this one.\r\n        /// </summary>\r\n        public static string TerminateAllOtherSessionsNote {\r\n            get {\r\n                return ResourceManager.GetString(\"TerminateAllOtherSessionsNote\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Terminate All Other Sessions.\r\n        /// </summary>\r\n        public static string TerminateAllSessions {\r\n            get {\r\n                return ResourceManager.GetString(\"TerminateAllSessions\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to terminate all other sessions?.\r\n        /// </summary>\r\n        public static string TerminateAllSessionsConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"TerminateAllSessionsConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Tap on a session to terminate..\r\n        /// </summary>\r\n        public static string TerminateSessionHint {\r\n            get {\r\n                return ResourceManager.GetString(\"TerminateSessionHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Terms of Service.\r\n        /// </summary>\r\n        public static string TermsOfService {\r\n            get {\r\n                return ResourceManager.GetString(\"TermsOfService\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to By signing up,\r\n        ///you agree to the *Terms of Service*..\r\n        /// </summary>\r\n        public static string TermsOfServiceLink {\r\n            get {\r\n                return ResourceManager.GetString(\"TermsOfServiceLink\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Test Checkout.\r\n        /// </summary>\r\n        public static string TestCheckout {\r\n            get {\r\n                return ResourceManager.GetString(\"TestCheckout\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Test Invoice.\r\n        /// </summary>\r\n        public static string TestInvoice {\r\n            get {\r\n                return ResourceManager.GetString(\"TestInvoice\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Test Receipt.\r\n        /// </summary>\r\n        public static string TestReceipt {\r\n            get {\r\n                return ResourceManager.GetString(\"TestReceipt\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Scheduled task to update number of unread messages on live tile..\r\n        /// </summary>\r\n        public static string TileUpdaterTaskDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"TileUpdaterTaskDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Timer.\r\n        /// </summary>\r\n        public static string Timer {\r\n            get {\r\n                return ResourceManager.GetString(\"Timer\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Title.\r\n        /// </summary>\r\n        public static string Title {\r\n            get {\r\n                return ResourceManager.GetString(\"Title\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Today.\r\n        /// </summary>\r\n        public static string Today {\r\n            get {\r\n                return ResourceManager.GetString(\"Today\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0}.\r\n        /// </summary>\r\n        public static string TodayFormat {\r\n            get {\r\n                return ResourceManager.GetString(\"TodayFormat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Total.\r\n        /// </summary>\r\n        public static string Total {\r\n            get {\r\n                return ResourceManager.GetString(\"Total\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Touch to return to call.\r\n        /// </summary>\r\n        public static string TouchToReturnToCall {\r\n            get {\r\n                return ResourceManager.GetString(\"TouchToReturnToCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Do you really want to transfer {0} to the {1} for {2}?.\r\n        /// </summary>\r\n        public static string TransactionConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"TransactionConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Transaction Review.\r\n        /// </summary>\r\n        public static string TransactionReview {\r\n            get {\r\n                return ResourceManager.GetString(\"TransactionReview\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please *turn on Two-Step Verification* to enable this..\r\n        /// </summary>\r\n        public static string TurnOnTwoStepVerification {\r\n            get {\r\n                return ResourceManager.GetString(\"TurnOnTwoStepVerification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Warning! All data saved in your Telegram Passport will be lost!.\r\n        /// </summary>\r\n        public static string TurnPasswordOffPassport {\r\n            get {\r\n                return ResourceManager.GetString(\"TurnPasswordOffPassport\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to disable your password?.\r\n        /// </summary>\r\n        public static string TurnPasswordOffQuestion {\r\n            get {\r\n                return ResourceManager.GetString(\"TurnPasswordOffQuestion\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Two-Step Verification.\r\n        /// </summary>\r\n        public static string TwoStepVerification {\r\n            get {\r\n                return ResourceManager.GetString(\"TwoStepVerification\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Typing.\r\n        /// </summary>\r\n        public static string Typing {\r\n            get {\r\n                return ResourceManager.GetString(\"Typing\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unable to access this file. Please choose another file to upload..\r\n        /// </summary>\r\n        public static string UnableToAccessDocument {\r\n            get {\r\n                return ResourceManager.GetString(\"UnableToAccessDocument\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to App was unable to determine your current location..\r\n        /// </summary>\r\n        public static string UnableToDetermineLocation {\r\n            get {\r\n                return ResourceManager.GetString(\"UnableToDetermineLocation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unavailable.\r\n        /// </summary>\r\n        public static string Unavailable {\r\n            get {\r\n                return ResourceManager.GetString(\"Unavailable\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unblock.\r\n        /// </summary>\r\n        public static string UnblockContact {\r\n            get {\r\n                return ResourceManager.GetString(\"UnblockContact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Are you sure you want to unblock this contact?.\r\n        /// </summary>\r\n        public static string UnblockContactConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"UnblockContactConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Ungroup.\r\n        /// </summary>\r\n        public static string Ungroup {\r\n            get {\r\n                return ResourceManager.GetString(\"Ungroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Show media as separate messages.\r\n        /// </summary>\r\n        public static string UngroupMediaDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"UngroupMediaDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unknown.\r\n        /// </summary>\r\n        public static string Unknown {\r\n            get {\r\n                return ResourceManager.GetString(\"Unknown\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unknown failure.\r\n        /// </summary>\r\n        public static string UnknownFailure {\r\n            get {\r\n                return ResourceManager.GetString(\"UnknownFailure\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unmute.\r\n        /// </summary>\r\n        public static string Unmute {\r\n            get {\r\n                return ResourceManager.GetString(\"Unmute\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Members will be notified when you post.\r\n        /// </summary>\r\n        public static string UnmuteChannelPostHint {\r\n            get {\r\n                return ResourceManager.GetString(\"UnmuteChannelPostHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to In {0}.\r\n        /// </summary>\r\n        public static string UnmuteIn {\r\n            get {\r\n                return ResourceManager.GetString(\"UnmuteIn\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unofficial app.\r\n        /// </summary>\r\n        public static string UnofficialApp {\r\n            get {\r\n                return ResourceManager.GetString(\"UnofficialApp\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unpin.\r\n        /// </summary>\r\n        public static string UnpinDialog {\r\n            get {\r\n                return ResourceManager.GetString(\"UnpinDialog\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unpin from start.\r\n        /// </summary>\r\n        public static string UnpinFromStart {\r\n            get {\r\n                return ResourceManager.GetString(\"UnpinFromStart\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unpin.\r\n        /// </summary>\r\n        public static string UnpinMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"UnpinMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Do you want to unpin this message?.\r\n        /// </summary>\r\n        public static string UnpinMessageConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"UnpinMessageConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unread.\r\n        /// </summary>\r\n        public static string Unread {\r\n            get {\r\n                return ResourceManager.GetString(\"Unread\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unread messages.\r\n        /// </summary>\r\n        public static string UnreadMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"UnreadMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unsupported.\r\n        /// </summary>\r\n        public static string Unsupported {\r\n            get {\r\n                return ResourceManager.GetString(\"Unsupported\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This message is not supported on your version of Telegram. Please update the app to view: http://telegram.org/update.\r\n        /// </summary>\r\n        public static string UnsupportedMedia {\r\n            get {\r\n                return ResourceManager.GetString(\"UnsupportedMedia\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Update app.\r\n        /// </summary>\r\n        public static string UpdateApp {\r\n            get {\r\n                return ResourceManager.GetString(\"UpdateApp\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, your Telegram app is out of date and can’t handle this request. Please update Telegram..\r\n        /// </summary>\r\n        public static string UpdateAppAlert {\r\n            get {\r\n                return ResourceManager.GetString(\"UpdateAppAlert\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Updated.\r\n        /// </summary>\r\n        public static string Updated {\r\n            get {\r\n                return ResourceManager.GetString(\"Updated\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Updated {0} ago.\r\n        /// </summary>\r\n        public static string UpdatedAgo {\r\n            get {\r\n                return ResourceManager.GetString(\"UpdatedAgo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Updated {0} at {1}.\r\n        /// </summary>\r\n        public static string UpdatedAtDate {\r\n            get {\r\n                return ResourceManager.GetString(\"UpdatedAtDate\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Updated just now.\r\n        /// </summary>\r\n        public static string UpdatedJustNow {\r\n            get {\r\n                return ResourceManager.GetString(\"UpdatedJustNow\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Updated today at {0}.\r\n        /// </summary>\r\n        public static string UpdatedTodayAt {\r\n            get {\r\n                return ResourceManager.GetString(\"UpdatedTodayAt\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Updated yesterday at {0}.\r\n        /// </summary>\r\n        public static string UpdatedYesterdayAt {\r\n            get {\r\n                return ResourceManager.GetString(\"UpdatedYesterdayAt\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Updating.\r\n        /// </summary>\r\n        public static string Updating {\r\n            get {\r\n                return ResourceManager.GetString(\"Updating\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Upgrade to Supergroup.\r\n        /// </summary>\r\n        public static string UpgradeToSupergroup {\r\n            get {\r\n                return ResourceManager.GetString(\"UpgradeToSupergroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Please note that group members will need to update their Telegram apps to the latest version to see your supergroup. Are you sure you want to upgrade this group?.\r\n        /// </summary>\r\n        public static string UpgradeToSupergroupConfirmation {\r\n            get {\r\n                return ResourceManager.GetString(\"UpgradeToSupergroupConfirmation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Members limit reached.\r\n        ///To go over the limit and get additional features, upgrade to a supergroup:\r\n        ///• Supergroups can get up to {0}\r\n        ///• New members see the entire chat history\r\n        ///• Admins delete messages for everyone\r\n        ///• Notifications are muted by default.\r\n        /// </summary>\r\n        public static string UpgradeToSupergroupDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"UpgradeToSupergroupDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Use end-to-end encryption.\r\n        /// </summary>\r\n        public static string UseEntToEndEncryption {\r\n            get {\r\n                return ResourceManager.GetString(\"UseEntToEndEncryption\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Use proxy settings.\r\n        /// </summary>\r\n        public static string UseProxy {\r\n            get {\r\n                return ResourceManager.GetString(\"UseProxy\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Use proxy for calls.\r\n        /// </summary>\r\n        public static string UseProxyForCalls {\r\n            get {\r\n                return ResourceManager.GetString(\"UseProxyForCalls\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Proxy servers may degrade the quality of your calls..\r\n        /// </summary>\r\n        public static string UseProxyForCallsHint {\r\n            get {\r\n                return ResourceManager.GetString(\"UseProxyForCallsHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to SOCKS5 proxy settings.\r\n        /// </summary>\r\n        public static string UseProxyHint {\r\n            get {\r\n                return ResourceManager.GetString(\"UseProxyHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to User.\r\n        /// </summary>\r\n        public static string User {\r\n            get {\r\n                return ResourceManager.GetString(\"User\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, you can&apos;t add this user to channels..\r\n        /// </summary>\r\n        public static string UserChannelsTooMuch {\r\n            get {\r\n                return ResourceManager.GetString(\"UserChannelsTooMuch\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Users.\r\n        /// </summary>\r\n        public static string UserGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"UserGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to User.\r\n        /// </summary>\r\n        public static string UserGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"UserGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} joined your secret chat.\r\n        /// </summary>\r\n        public static string UserJoinedYourSecretChat {\r\n            get {\r\n                return ResourceManager.GetString(\"UserJoinedYourSecretChat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Username.\r\n        /// </summary>\r\n        public static string Username {\r\n            get {\r\n                return ResourceManager.GetString(\"Username\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You can choose a username on Telegram. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\r\n        ///\r\n        ///You can use a-z, 0-9 and underscores. Minimum length is 5 characters..\r\n        /// </summary>\r\n        public static string UsernameDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"UsernameDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this username is not allowed..\r\n        /// </summary>\r\n        public static string UsernameInvalid {\r\n            get {\r\n                return ResourceManager.GetString(\"UsernameInvalid\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this username is already taken..\r\n        /// </summary>\r\n        public static string UsernameOccupied {\r\n            get {\r\n                return ResourceManager.GetString(\"UsernameOccupied\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to A username must have at least 5 characters..\r\n        /// </summary>\r\n        public static string UsernameShort {\r\n            get {\r\n                return ResourceManager.GetString(\"UsernameShort\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, a username can&apos;t start with a number..\r\n        /// </summary>\r\n        public static string UsernameStartsWithNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"UsernameStartsWithNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Users.\r\n        /// </summary>\r\n        public static string UserNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"UserNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to User.\r\n        /// </summary>\r\n        public static string UserNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"UserNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, you can&apos;t add this user to groups..\r\n        /// </summary>\r\n        public static string UserNotMutualContact {\r\n            get {\r\n                return ResourceManager.GetString(\"UserNotMutualContact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} scored {1}.\r\n        /// </summary>\r\n        public static string UserScored {\r\n            get {\r\n                return ResourceManager.GetString(\"UserScored\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} scored {1} at {2}.\r\n        /// </summary>\r\n        public static string UserScoredAtGame {\r\n            get {\r\n                return ResourceManager.GetString(\"UserScoredAtGame\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} scored {1} at {2}.\r\n        /// </summary>\r\n        public static string UserScoredAtGamePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"UserScoredAtGamePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to {0} scored {1}.\r\n        /// </summary>\r\n        public static string UserScoredPlural {\r\n            get {\r\n                return ResourceManager.GetString(\"UserScoredPlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to d MMM.\r\n        /// </summary>\r\n        public static string UserStatusDayFormat {\r\n            get {\r\n                return ResourceManager.GetString(\"UserStatusDayFormat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to h:mmt.\r\n        /// </summary>\r\n        public static string UserStatusTimeFormat {\r\n            get {\r\n                return ResourceManager.GetString(\"UserStatusTimeFormat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to d MMM yyyy.\r\n        /// </summary>\r\n        public static string UserStatusYearDayFormat {\r\n            get {\r\n                return ResourceManager.GetString(\"UserStatusYearDayFormat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Sorry, this group is full..\r\n        /// </summary>\r\n        public static string UsersTooMuch {\r\n            get {\r\n                return ResourceManager.GetString(\"UsersTooMuch\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Telegram proxy settings.\r\n        /// </summary>\r\n        public static string UseTelegramProxyHint {\r\n            get {\r\n                return ResourceManager.GetString(\"UseTelegramProxyHint\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Version.\r\n        /// </summary>\r\n        public static string Version {\r\n            get {\r\n                return ResourceManager.GetString(\"Version\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Via {0}.\r\n        /// </summary>\r\n        public static string Via {\r\n            get {\r\n                return ResourceManager.GetString(\"Via\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Video.\r\n        /// </summary>\r\n        public static string Video {\r\n            get {\r\n                return ResourceManager.GetString(\"Video\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Video.\r\n        /// </summary>\r\n        public static string VideoAccusative {\r\n            get {\r\n                return ResourceManager.GetString(\"VideoAccusative\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Videos.\r\n        /// </summary>\r\n        public static string VideoGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"VideoGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Video.\r\n        /// </summary>\r\n        public static string VideoGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"VideoGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Video message.\r\n        /// </summary>\r\n        public static string VideoMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"VideoMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Videos.\r\n        /// </summary>\r\n        public static string VideoNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"VideoNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Video.\r\n        /// </summary>\r\n        public static string VideoNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"VideoNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Video quality.\r\n        /// </summary>\r\n        public static string VideoQuality {\r\n            get {\r\n                return ResourceManager.GetString(\"VideoQuality\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Videos.\r\n        /// </summary>\r\n        public static string Videos {\r\n            get {\r\n                return ResourceManager.GetString(\"Videos\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to View contact.\r\n        /// </summary>\r\n        public static string ViewContact {\r\n            get {\r\n                return ResourceManager.GetString(\"ViewContact\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to View stickers.\r\n        /// </summary>\r\n        public static string ViewStickers {\r\n            get {\r\n                return ResourceManager.GetString(\"ViewStickers\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to View {0}.\r\n        /// </summary>\r\n        public static string ViewUser {\r\n            get {\r\n                return ResourceManager.GetString(\"ViewUser\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Violence.\r\n        /// </summary>\r\n        public static string Violence {\r\n            get {\r\n                return ResourceManager.GetString(\"Violence\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Visible.\r\n        /// </summary>\r\n        public static string Visible {\r\n            get {\r\n                return ResourceManager.GetString(\"Visible\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to group.\r\n        /// </summary>\r\n        public static string VKGroup {\r\n            get {\r\n                return ResourceManager.GetString(\"VKGroup\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Voice Call.\r\n        /// </summary>\r\n        public static string VoiceCall {\r\n            get {\r\n                return ResourceManager.GetString(\"VoiceCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Voice message.\r\n        /// </summary>\r\n        public static string VoiceMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"VoiceMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Voice messages.\r\n        /// </summary>\r\n        public static string VoiceMessages {\r\n            get {\r\n                return ResourceManager.GetString(\"VoiceMessages\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Busy.\r\n        /// </summary>\r\n        public static string VoipBusy {\r\n            get {\r\n                return ResourceManager.GetString(\"VoipBusy\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Connecting.\r\n        /// </summary>\r\n        public static string VoipConnecting {\r\n            get {\r\n                return ResourceManager.GetString(\"VoipConnecting\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Ended.\r\n        /// </summary>\r\n        public static string VoipEnded {\r\n            get {\r\n                return ResourceManager.GetString(\"VoipEnded\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Exchanging encryption keys.\r\n        /// </summary>\r\n        public static string VoipExchangingKeys {\r\n            get {\r\n                return ResourceManager.GetString(\"VoipExchangingKeys\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Failed.\r\n        /// </summary>\r\n        public static string VoipFailed {\r\n            get {\r\n                return ResourceManager.GetString(\"VoipFailed\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Hanging up.\r\n        /// </summary>\r\n        public static string VoipHangingUp {\r\n            get {\r\n                return ResourceManager.GetString(\"VoipHangingUp\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Incoming call.\r\n        /// </summary>\r\n        public static string VoipIncoming {\r\n            get {\r\n                return ResourceManager.GetString(\"VoipIncoming\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Requesting.\r\n        /// </summary>\r\n        public static string VoipRequesting {\r\n            get {\r\n                return ResourceManager.GetString(\"VoipRequesting\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Ringing.\r\n        /// </summary>\r\n        public static string VoipRinging {\r\n            get {\r\n                return ResourceManager.GetString(\"VoipRinging\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Waiting.\r\n        /// </summary>\r\n        public static string VoipWaiting {\r\n            get {\r\n                return ResourceManager.GetString(\"VoipWaiting\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Waiting for network.\r\n        /// </summary>\r\n        public static string WaitingForNetwork {\r\n            get {\r\n                return ResourceManager.GetString(\"WaitingForNetwork\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Waiting for {0} to get online.\r\n        /// </summary>\r\n        public static string WaitingForUserToGetOnline {\r\n            get {\r\n                return ResourceManager.GetString(\"WaitingForUserToGetOnline\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Warning.\r\n        /// </summary>\r\n        public static string Warning {\r\n            get {\r\n                return ResourceManager.GetString(\"Warning\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Weeks.\r\n        /// </summary>\r\n        public static string WeekGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"WeekGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Week.\r\n        /// </summary>\r\n        public static string WeekGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"WeekGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Weeks.\r\n        /// </summary>\r\n        public static string WeekNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"WeekNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Week.\r\n        /// </summary>\r\n        public static string WeekNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"WeekNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to We will call you in {0}.\r\n        /// </summary>\r\n        public static string WeWillCallYou {\r\n            get {\r\n                return ResourceManager.GetString(\"WeWillCallYou\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to What can this bot do?.\r\n        /// </summary>\r\n        public static string WhatCanThisBotDo {\r\n            get {\r\n                return ResourceManager.GetString(\"WhatCanThisBotDo\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to What is a channel?.\r\n        /// </summary>\r\n        public static string WhatIsChannel {\r\n            get {\r\n                return ResourceManager.GetString(\"WhatIsChannel\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Channels are a new tool for broadcasting your messages to large audiences..\r\n        /// </summary>\r\n        public static string WhatIsChannelDescription {\r\n            get {\r\n                return ResourceManager.GetString(\"WhatIsChannelDescription\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Years.\r\n        /// </summary>\r\n        public static string YearGenitivePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"YearGenitivePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Year.\r\n        /// </summary>\r\n        public static string YearGenitiveSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"YearGenitiveSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Years.\r\n        /// </summary>\r\n        public static string YearNominativePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"YearNominativePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Year.\r\n        /// </summary>\r\n        public static string YearNominativeSingular {\r\n            get {\r\n                return ResourceManager.GetString(\"YearNominativeSingular\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Yesterday.\r\n        /// </summary>\r\n        public static string Yesterday {\r\n            get {\r\n                return ResourceManager.GetString(\"Yesterday\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You.\r\n        /// </summary>\r\n        public static string You {\r\n            get {\r\n                return ResourceManager.GetString(\"You\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You have a new message.\r\n        /// </summary>\r\n        public static string YouHaveNewMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"YouHaveNewMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You joined the secret chat.\r\n        /// </summary>\r\n        public static string YouJoinedTheSecretChat {\r\n            get {\r\n                return ResourceManager.GetString(\"YouJoinedTheSecretChat\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your phone number.\r\n        /// </summary>\r\n        public static string Your_phone_number {\r\n            get {\r\n                return ResourceManager.GetString(\"Your phone number\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your cloud storage.\r\n        /// </summary>\r\n        public static string YourCloudStorage {\r\n            get {\r\n                return ResourceManager.GetString(\"YourCloudStorage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your code.\r\n        /// </summary>\r\n        public static string YourCode {\r\n            get {\r\n                return ResourceManager.GetString(\"YourCode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Type your message.\r\n        /// </summary>\r\n        public static string YourMessage {\r\n            get {\r\n                return ResourceManager.GetString(\"YourMessage\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your name.\r\n        /// </summary>\r\n        public static string YourName {\r\n            get {\r\n                return ResourceManager.GetString(\"YourName\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to New passcode.\r\n        /// </summary>\r\n        public static string YourPasscode {\r\n            get {\r\n                return ResourceManager.GetString(\"YourPasscode\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your password.\r\n        /// </summary>\r\n        public static string YourPassword {\r\n            get {\r\n                return ResourceManager.GetString(\"YourPassword\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your phone.\r\n        /// </summary>\r\n        public static string YourPhone {\r\n            get {\r\n                return ResourceManager.GetString(\"YourPhone\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Your phone number.\r\n        /// </summary>\r\n        public static string YourPhoneNumber {\r\n            get {\r\n                return ResourceManager.GetString(\"YourPhoneNumber\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You scored {0}.\r\n        /// </summary>\r\n        public static string YourScored {\r\n            get {\r\n                return ResourceManager.GetString(\"YourScored\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You scored {0} at {1}.\r\n        /// </summary>\r\n        public static string YourScoredAtGame {\r\n            get {\r\n                return ResourceManager.GetString(\"YourScoredAtGame\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You scored {0} at {1}.\r\n        /// </summary>\r\n        public static string YourScoredAtGamePlural {\r\n            get {\r\n                return ResourceManager.GetString(\"YourScoredAtGamePlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You scored {0}.\r\n        /// </summary>\r\n        public static string YourScoredPlural {\r\n            get {\r\n                return ResourceManager.GetString(\"YourScoredPlural\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to You where kicked from the group.\r\n        /// </summary>\r\n        public static string YouWhereKickedFromTheGroup {\r\n            get {\r\n                return ResourceManager.GetString(\"YouWhereKickedFromTheGroup\", resourceCulture);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Resources/AppResources.de.Designer.cs",
    "content": ""
  },
  {
    "path": "TelegramClient/Resources/AppResources.de.resx",
    "content": "﻿<?xml version='1.0' encoding='UTF-8'?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" id=\"root\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/>\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"AppName\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"BlockContact\" xml:space=\"preserve\">\n    <value>Blockieren</value>\n  </data>\n  <data name=\"BlockedUsers\" xml:space=\"preserve\">\n    <value>Blockierte Nutzer</value>\n  </data>\n  <data name=\"Call\" xml:space=\"preserve\">\n    <value>Anruf</value>\n  </data>\n  <data name=\"Contacts\" xml:space=\"preserve\">\n    <value>Kontakte</value>\n  </data>\n  <data name=\"Copy\" xml:space=\"preserve\">\n    <value>Kopieren</value>\n  </data>\n  <data name=\"Delete\" xml:space=\"preserve\">\n    <value>Löschen</value>\n  </data>\n  <data name=\"Dialogs\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"Forward\" xml:space=\"preserve\">\n    <value>Weiterleiten</value>\n  </data>\n  <data name=\"Loading\" xml:space=\"preserve\">\n    <value>Lade...</value>\n  </data>\n  <data name=\"Login\" xml:space=\"preserve\">\n    <value>Anmelden</value>\n  </data>\n  <data name=\"Refresh\" xml:space=\"preserve\">\n    <value>Aktualisieren</value>\n  </data>\n  <data name=\"Retry\" xml:space=\"preserve\">\n    <value>Wiederholen</value>\n  </data>\n  <data name=\"Send\" xml:space=\"preserve\">\n    <value>Senden</value>\n  </data>\n  <data name=\"Sending\" xml:space=\"preserve\">\n    <value>Sende</value>\n  </data>\n  <data name=\"SendingFailed\" xml:space=\"preserve\">\n    <value>Senden fehlgeschlagen.</value>\n  </data>\n  <data name=\"SendMessage\" xml:space=\"preserve\">\n    <value>Nachricht senden</value>\n  </data>\n  <data name=\"Settings\" xml:space=\"preserve\">\n    <value>Einstellungen</value>\n  </data>\n  <data name=\"ShareContact\" xml:space=\"preserve\">\n    <value>Kontakt teilen</value>\n  </data>\n  <data name=\"SignIn\" xml:space=\"preserve\">\n    <value>Anmelden</value>\n  </data>\n  <data name=\"UnblockContact\" xml:space=\"preserve\">\n    <value>Freigeben</value>\n  </data>\n  <data name=\"Yesterday\" xml:space=\"preserve\">\n    <value>Gestern</value>\n  </data>\n  <data name=\"YourMessage\" xml:space=\"preserve\">\n    <value>Schreibe Deine Nachricht</value>\n  </data>\n  <data name=\"LogOut\" xml:space=\"preserve\">\n    <value>Abmelden</value>\n  </data>\n  <data name=\"NoMessagesYet\" xml:space=\"preserve\">\n    <value>Noch keine Nachrichten...</value>\n  </data>\n  <data name=\"Confirm\" xml:space=\"preserve\">\n    <value>Bestätigen</value>\n  </data>\n  <data name=\"DeleteChatConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du wirklich diesen Chat löschen?</value>\n  </data>\n  <data name=\"Contact\" xml:space=\"preserve\">\n    <value>Kontakt</value>\n  </data>\n  <data name=\"EmptyMessage\" xml:space=\"preserve\">\n    <value>Gelöschte Nachricht</value>\n  </data>\n  <data name=\"ForwardedMessage\" xml:space=\"preserve\">\n    <value>Weitergeleitet von</value>\n  </data>\n  <data name=\"GeoPoint\" xml:space=\"preserve\">\n    <value>Standort</value>\n  </data>\n  <data name=\"Photo\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"Video\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"ComposeMessage\" xml:space=\"preserve\">\n    <value>Neu</value>\n  </data>\n  <data name=\"Search\" xml:space=\"preserve\">\n    <value>Suche</value>\n  </data>\n  <data name=\"ServiceMessage\" xml:space=\"preserve\">\n    <value>Dienstmitteilung</value>\n  </data>\n  <data name=\"UnsupportedMedia\" xml:space=\"preserve\">\n    <value>Diese Nachricht wird von deiner Telegram-Version nicht unterstützt. Bitte aktualisiere die App um sie zu sehen: http://telegram.org/update</value>\n  </data>\n  <data name=\"Unread\" xml:space=\"preserve\">\n    <value>Ungelesen</value>\n  </data>\n  <data name=\"IsTyping\" xml:space=\"preserve\">\n    <value>Tippt</value>\n  </data>\n  <data name=\"Online\" xml:space=\"preserve\">\n    <value>Online</value>\n  </data>\n  <data name=\"User\" xml:space=\"preserve\">\n    <value>Nutzer</value>\n  </data>\n  <data name=\"MessageActionChatCreate\" xml:space=\"preserve\">\n    <value>{0} hat die Gruppe \"{1}\" erstellt</value>\n  </data>\n  <data name=\"MessageActionChatEditTitle\" xml:space=\"preserve\">\n    <value>{0} hat den Gruppennamen zu \"{1}\" geändert</value>\n  </data>\n  <data name=\"MessageActionChatEditPhoto\" xml:space=\"preserve\">\n    <value>{0} hat das Gruppenbild geändert</value>\n  </data>\n  <data name=\"MessageActionChatDeletePhoto\" xml:space=\"preserve\">\n    <value>{0} hat das Gruppenfoto entfernt</value>\n  </data>\n  <data name=\"MessageActionChatAddUser\" xml:space=\"preserve\">\n    <value>{0} hat {1} hinzugefügt</value>\n  </data>\n  <data name=\"MessageActionChatDeleteUser\" xml:space=\"preserve\">\n    <value>{0} hat {1} entfernt</value>\n  </data>\n  <data name=\"MessageActionEmpty\" xml:space=\"preserve\">\n    <value>Leere Dienstmitteilung</value>\n  </data>\n  <data name=\"CompanyNominative\" xml:space=\"preserve\">\n    <value>Mitglied</value>\n  </data>\n  <data name=\"CompanyGenitivePlural\" xml:space=\"preserve\">\n    <value>Mitglieder</value>\n  </data>\n  <data name=\"CompanyGenitiveSingular\" xml:space=\"preserve\">\n    <value>Mitglied</value>\n  </data>\n  <data name=\"PeopleInTheConversation\" xml:space=\"preserve\">\n    <value>{0} Mitglieder</value>\n  </data>\n  <data name=\"Offline\" xml:space=\"preserve\">\n    <value>Offline</value>\n  </data>\n  <data name=\"Today\" xml:space=\"preserve\">\n    <value>Heute</value>\n  </data>\n  <data name=\"LastSeenAt\" xml:space=\"preserve\">\n    <value>Zuletzt online {0} um {1}</value>\n  </data>\n  <data name=\"LastSeen\" xml:space=\"preserve\">\n    <value>Zuletzt online vor {0}</value>\n  </data>\n  <data name=\"MinuteAccusative\" xml:space=\"preserve\">\n    <value>Minute</value>\n  </data>\n  <data name=\"MinuteGenitiveSingular\" xml:space=\"preserve\">\n    <value>Minute</value>\n  </data>\n  <data name=\"MinuteGenitivePlural\" xml:space=\"preserve\">\n    <value>Minuten</value>\n  </data>\n  <data name=\"Attach\" xml:space=\"preserve\">\n    <value>Anhängen</value>\n  </data>\n  <data name=\"Manage\" xml:space=\"preserve\">\n    <value>Auswählen</value>\n  </data>\n  <data name=\"Ok\" xml:space=\"preserve\">\n    <value>Ok</value>\n  </data>\n  <data name=\"Cancel\" xml:space=\"preserve\">\n    <value>Abbrechen</value>\n  </data>\n  <data name=\"Select\" xml:space=\"preserve\">\n    <value>Wählen</value>\n  </data>\n  <data name=\"MapAccusative\" xml:space=\"preserve\">\n    <value>Mein Standort</value>\n  </data>\n  <data name=\"PhotoAccusative\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"Add\" xml:space=\"preserve\">\n    <value>Hinzufügen</value>\n  </data>\n  <data name=\"NewGroup\" xml:space=\"preserve\">\n    <value>Neue Gruppe</value>\n  </data>\n  <data name=\"NewSecretChat\" xml:space=\"preserve\">\n    <value>Neuer Geheimer Chat</value>\n  </data>\n  <data name=\"TileUpdaterTaskDescription\" xml:space=\"preserve\">\n    <value>Geplante Aufgabe, um die Anzahl ungelesenen Nachrichten auf der Live-Kachel zu aktualisieren.</value>\n  </data>\n  <data name=\"Media\" xml:space=\"preserve\">\n    <value>Medien</value>\n  </data>\n  <data name=\"Profile\" xml:space=\"preserve\">\n    <value>Info</value>\n  </data>\n  <data name=\"Notifications\" xml:space=\"preserve\">\n    <value>Benachrichtigungen</value>\n  </data>\n  <data name=\"On\" xml:space=\"preserve\">\n    <value>Ein</value>\n  </data>\n  <data name=\"Off\" xml:space=\"preserve\">\n    <value>Aus</value>\n  </data>\n  <data name=\"Sound\" xml:space=\"preserve\">\n    <value>Sound</value>\n  </data>\n  <data name=\"CreateSecretChat\" xml:space=\"preserve\">\n    <value>Geheimen Chat starten</value>\n  </data>\n  <data name=\"MessageNotifications\" xml:space=\"preserve\">\n    <value>Chat-Benachrichtigungen</value>\n  </data>\n  <data name=\"ChatNotifications\" xml:space=\"preserve\">\n    <value>Chat-Benachrichtigungen</value>\n  </data>\n  <data name=\"NotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Stumm, Nachrichtenvorschau, Chats</value>\n  </data>\n  <data name=\"Support\" xml:space=\"preserve\">\n    <value>Support</value>\n  </data>\n  <data name=\"AskAQuestion\" xml:space=\"preserve\">\n    <value>Eine Frage stellen</value>\n  </data>\n  <data name=\"InAppNotifications\" xml:space=\"preserve\">\n    <value>In-App Benachrichtigungen</value>\n  </data>\n  <data name=\"OnPlural\" xml:space=\"preserve\">\n    <value>Ein</value>\n  </data>\n  <data name=\"OffPlural\" xml:space=\"preserve\">\n    <value>Aus</value>\n  </data>\n  <data name=\"OnFeminine\" xml:space=\"preserve\">\n    <value>Ein</value>\n  </data>\n  <data name=\"OffFeminine\" xml:space=\"preserve\">\n    <value>Aus</value>\n  </data>\n  <data name=\"InAppSounds\" xml:space=\"preserve\">\n    <value>In-App Sounds</value>\n  </data>\n  <data name=\"InAppVibrate\" xml:space=\"preserve\">\n    <value>In-App Vibration</value>\n  </data>\n  <data name=\"InAppPreview\" xml:space=\"preserve\">\n    <value>In-App Vorschau</value>\n  </data>\n  <data name=\"ResetAllNotifications\" xml:space=\"preserve\">\n    <value>Alle Benachrichtigungen zurücksetzen</value>\n  </data>\n  <data name=\"ResetAllNotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Alle benutzerdefinierten Benachrichtigungseinstellungen für alle Kontakte und Gruppen aufheben</value>\n  </data>\n  <data name=\"OnMasculine\" xml:space=\"preserve\">\n    <value>Ein</value>\n  </data>\n  <data name=\"OffMasculine\" xml:space=\"preserve\">\n    <value>Aus</value>\n  </data>\n  <data name=\"GroupNotifications\" xml:space=\"preserve\">\n    <value>Gruppenbenachrichtigungen</value>\n  </data>\n  <data name=\"Alert\" xml:space=\"preserve\">\n    <value>Alarm</value>\n  </data>\n  <data name=\"MessagePreview\" xml:space=\"preserve\">\n    <value>Nachrichtenvorschau</value>\n  </data>\n  <data name=\"SaveIncomingPhotos\" xml:space=\"preserve\">\n    <value>Empfangene Fotos speichern</value>\n  </data>\n  <data name=\"Create\" xml:space=\"preserve\">\n    <value>Erstellen</value>\n  </data>\n  <data name=\"Share\" xml:space=\"preserve\">\n    <value>Teilen</value>\n  </data>\n  <data name=\"Edit\" xml:space=\"preserve\">\n    <value>Bearbeiten</value>\n  </data>\n  <data name=\"CompanyNominativeSingular\" xml:space=\"preserve\">\n    <value>Mitglied</value>\n  </data>\n  <data name=\"CompanyNominativePlural\" xml:space=\"preserve\">\n    <value>Mitglieder</value>\n  </data>\n  <data name=\"PictureAccusative\" xml:space=\"preserve\">\n    <value>Bild</value>\n  </data>\n  <data name=\"ContactAccusative\" xml:space=\"preserve\">\n    <value>Kontakt</value>\n  </data>\n  <data name=\"DocumentAccusative\" xml:space=\"preserve\">\n    <value>Datei</value>\n  </data>\n  <data name=\"AttachCaption\" xml:space=\"preserve\">\n    <value>Etwas anhängen</value>\n  </data>\n  <data name=\"LocationAccusative\" xml:space=\"preserve\">\n    <value>Standort</value>\n  </data>\n  <data name=\"VideoAccusative\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"NoMediaHere\" xml:space=\"preserve\">\n    <value>Keine Medien</value>\n  </data>\n  <data name=\"ChooseAnItem\" xml:space=\"preserve\">\n    <value>Wähle ein Element</value>\n  </data>\n  <data name=\"NoUsersHere\" xml:space=\"preserve\">\n    <value>Keine Nutzer vorhanden</value>\n  </data>\n  <data name=\"NoContactsHere\" xml:space=\"preserve\">\n    <value>Keine Kontakte vorhanden</value>\n  </data>\n  <data name=\"Title\" xml:space=\"preserve\">\n    <value>Titel</value>\n  </data>\n  <data name=\"Done\" xml:space=\"preserve\">\n    <value>Fertig</value>\n  </data>\n  <data name=\"AddParticipant\" xml:space=\"preserve\">\n    <value>Kontakt hinzufügen</value>\n  </data>\n  <data name=\"DeleteAndExitGroup\" xml:space=\"preserve\">\n    <value>Löschen und Verlassen</value>\n  </data>\n  <data name=\"MessageActionUserLeftGroup\" xml:space=\"preserve\">\n    <value>{0} hat die Gruppe verlassen</value>\n  </data>\n  <data name=\"MessageUser\" xml:space=\"preserve\">\n    <value>Nachricht {0}</value>\n  </data>\n  <data name=\"ViewUser\" xml:space=\"preserve\">\n    <value>Ansicht {0}</value>\n  </data>\n  <data name=\"SearchAmongYourDialogsAndMessages\" xml:space=\"preserve\">\n    <value>Chats durchsuchen</value>\n  </data>\n  <data name=\"Messages\" xml:space=\"preserve\">\n    <value>Nachrichten</value>\n  </data>\n  <data name=\"NoMessagesHere\" xml:space=\"preserve\">\n    <value>Keine Nachrichten vorhanden</value>\n  </data>\n  <data name=\"NoResults\" xml:space=\"preserve\">\n    <value>Keine Ergebnisse</value>\n  </data>\n  <data name=\"Conversations\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"EditName\" xml:space=\"preserve\">\n    <value>Name bearbeiten</value>\n  </data>\n  <data name=\"Save\" xml:space=\"preserve\">\n    <value>Speichern</value>\n  </data>\n  <data name=\"About\" xml:space=\"preserve\">\n    <value>Info</value>\n  </data>\n  <data name=\"Version\" xml:space=\"preserve\">\n    <value>Version</value>\n  </data>\n  <data name=\"YourPhone\" xml:space=\"preserve\">\n    <value>Deine Rufnummer</value>\n  </data>\n  <data name=\"SignInMessage\" xml:space=\"preserve\">\n    <value>Bitte bestätige Deinen Ländercode und gib Deine Rufnummer ein.</value>\n  </data>\n  <data name=\"Your phone number\" xml:space=\"preserve\">\n    <value>Deine Rufnummer</value>\n  </data>\n  <data name=\"Next\" xml:space=\"preserve\">\n    <value>Weiter</value>\n  </data>\n  <data name=\"Country\" xml:space=\"preserve\">\n    <value>Land</value>\n  </data>\n  <data name=\"YourCode\" xml:space=\"preserve\">\n    <value>Dein Code</value>\n  </data>\n  <data name=\"ConfirmMessage\" xml:space=\"preserve\">\n    <value>Wir haben eine SMS mit einem Aktivierungscode an **{0}** gesendet.</value>\n  </data>\n  <data name=\"WeWillCallYou\" xml:space=\"preserve\">\n    <value>Wir rufen Dich in {0} an</value>\n  </data>\n  <data name=\"Code\" xml:space=\"preserve\">\n    <value>Code</value>\n  </data>\n  <data name=\"FirstName\" xml:space=\"preserve\">\n    <value>Vorname</value>\n  </data>\n  <data name=\"LastName\" xml:space=\"preserve\">\n    <value>Nachname (Optional)</value>\n  </data>\n  <data name=\"YourName\" xml:space=\"preserve\">\n    <value>Dein Name</value>\n  </data>\n  <data name=\"SignUpMessage\" xml:space=\"preserve\">\n    <value>Gib Deinen Namen ein und füge ein Profilbild hinzu.</value>\n  </data>\n  <data name=\"AddPhoto\" xml:space=\"preserve\">\n    <value>Foto hinzufügen</value>\n  </data>\n  <data name=\"NoDialogsHere\" xml:space=\"preserve\">\n    <value>Keine Chats </value>\n  </data>\n  <data name=\"StartMessaging\" xml:space=\"preserve\">\n    <value>Jetzt beginnen</value>\n  </data>\n  <data name=\"Intro1Message\" xml:space=\"preserve\">\n    <value>Willkommen bei **Telegram** ―\nder schnellsten Messenger App der Welt.\nKostenlos und sicher.</value>\n  </data>\n  <data name=\"Fast\" xml:space=\"preserve\">\n    <value>Schnell</value>\n  </data>\n  <data name=\"FastMessage\" xml:space=\"preserve\">\n    <value>**Telegram** übermittelt Nachrichten schneller\nals jede andere Anwendung.</value>\n  </data>\n  <data name=\"Free\" xml:space=\"preserve\">\n    <value>Kostenlos</value>\n  </data>\n  <data name=\"FreeMessage\" xml:space=\"preserve\">\n    <value>**Telegram** bleibt immer kostenlos. \nKeine Werbung. Keine Gebühren.</value>\n  </data>\n  <data name=\"Powerful\" xml:space=\"preserve\">\n    <value>Leistungsstark</value>\n  </data>\n  <data name=\"PowerfulMessage\" xml:space=\"preserve\">\n    <value>**Telegram** hat keine Begrenzungen auf\ndie Größe deiner Medien und Chats.</value>\n  </data>\n  <data name=\"Secure\" xml:space=\"preserve\">\n    <value>Sicher</value>\n  </data>\n  <data name=\"SecureMessage\" xml:space=\"preserve\">\n    <value>**Telegram** schützt deine Nachrichten\nvor Hacker-Angriffen.</value>\n  </data>\n  <data name=\"CloudBased\" xml:space=\"preserve\">\n    <value>Cloudbasiert</value>\n  </data>\n  <data name=\"CloudBasedMessage\" xml:space=\"preserve\">\n    <value>**Telegram** erlaubt den Zugriff auf deine Nachrichten\nvon mehreren Geräten.</value>\n  </data>\n  <data name=\"TelegramDialedYourNumber\" xml:space=\"preserve\">\n    <value>Telegram hat Deine Rufnummer gewählt</value>\n  </data>\n  <data name=\"Subject\" xml:space=\"preserve\">\n    <value>Betreff</value>\n  </data>\n  <data name=\"Members\" xml:space=\"preserve\">\n    <value>Mitglieder</value>\n  </data>\n  <data name=\"YourPhoneNumber\" xml:space=\"preserve\">\n    <value>Deine Rufnummer</value>\n  </data>\n  <data name=\"From\" xml:space=\"preserve\">\n    <value>Von</value>\n  </data>\n  <data name=\"You\" xml:space=\"preserve\">\n    <value>Du</value>\n  </data>\n  <data name=\"YouWhereKickedFromTheGroup\" xml:space=\"preserve\">\n    <value>Du wurdest aus der Gruppe entfernt</value>\n  </data>\n  <data name=\"SavePhotoMessage\" xml:space=\"preserve\">\n    <value>Das Foto wurde erfolgreich gespeichert</value>\n  </data>\n  <data name=\"SharedContact\" xml:space=\"preserve\">\n    <value>Geteilter Kontakt</value>\n  </data>\n  <data name=\"AllContacts\" xml:space=\"preserve\">\n    <value>Alle Kontakte</value>\n  </data>\n  <data name=\"Document\" xml:space=\"preserve\">\n    <value>Datei</value>\n  </data>\n  <data name=\"InviteFriends\" xml:space=\"preserve\">\n    <value>Freunde einladen</value>\n  </data>\n  <data name=\"MyLocation\" xml:space=\"preserve\">\n    <value>Mein Standort</value>\n  </data>\n  <data name=\"Satellite\" xml:space=\"preserve\">\n    <value>Satellit</value>\n  </data>\n  <data name=\"Hybrid\" xml:space=\"preserve\">\n    <value>Hybrid</value>\n  </data>\n  <data name=\"SwitchMode\" xml:space=\"preserve\">\n    <value>Modus umschalten</value>\n  </data>\n  <data name=\"DistanceAway\" xml:space=\"preserve\">\n    <value>{0} entfernt</value>\n  </data>\n  <data name=\"MetersShort\" xml:space=\"preserve\">\n    <value>m</value>\n  </data>\n  <data name=\"KilometersShort\" xml:space=\"preserve\">\n    <value>Km</value>\n  </data>\n  <data name=\"ShareLocation\" xml:space=\"preserve\">\n    <value>Standort teilen</value>\n  </data>\n  <data name=\"Emoji\" xml:space=\"preserve\">\n    <value>Emoji</value>\n  </data>\n  <data name=\"LogOutConfirmation\" xml:space=\"preserve\">\n    <value>Wirklich abmelden?\nDu kannst Telegram von all deinen Geräten gleichzeitig nutzen.\nWichtig: Abmelden löscht deine Geheimen Chats.</value>\n  </data>\n  <data name=\"GotAQuestionAboutTelegram\" xml:space=\"preserve\">\n    <value>Hast du eine Frage zu Telegram?</value>\n  </data>\n  <data name=\"InviteFriendMessage\" xml:space=\"preserve\">\n    <value>Hey, lass uns zu Telegram wechseln:\nhttp://telegram.org/dl</value>\n  </data>\n  <data name=\"ResetAllNotificationsMessage\" xml:space=\"preserve\">\n    <value>Alle Benachrichtigungen zurücksetzen?</value>\n  </data>\n  <data name=\"AreTyping\" xml:space=\"preserve\">\n    <value>Am Schreiben</value>\n  </data>\n  <data name=\"ClearHistory\" xml:space=\"preserve\">\n    <value>Verlauf löschen</value>\n  </data>\n  <data name=\"DeleteAndExit\" xml:space=\"preserve\">\n    <value>Löschen und beenden</value>\n  </data>\n  <data name=\"DeleteHistoryAndExitGroupMessage\" xml:space=\"preserve\">\n    <value>Verlauf löschen und Gruppe verlassen?</value>\n  </data>\n  <data name=\"NoUsers\" xml:space=\"preserve\">\n    <value>Keine Nutzer</value>\n  </data>\n  <data name=\"UserNominativeSingular\" xml:space=\"preserve\">\n    <value>Nutzer</value>\n  </data>\n  <data name=\"UserNominativePlural\" xml:space=\"preserve\">\n    <value>Nutzer</value>\n  </data>\n  <data name=\"UserGenitiveSingular\" xml:space=\"preserve\">\n    <value>Nutzer</value>\n  </data>\n  <data name=\"UserGenitivePlural\" xml:space=\"preserve\">\n    <value>Nutzer</value>\n  </data>\n  <data name=\"PleaseGoToChatToForwardMessage\" xml:space=\"preserve\">\n    <value>Bitte zum Chat wechseln um die Nachricht weiterzuleiten</value>\n  </data>\n  <data name=\"Info\" xml:space=\"preserve\">\n    <value>Info</value>\n  </data>\n  <data name=\"ForwardeMessageToThisChat\" xml:space=\"preserve\">\n    <value>Nachricht an diesen Chat weiterleiten?</value>\n  </data>\n  <data name=\"TodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"RegularFormat\" xml:space=\"preserve\">\n    <value>d. MMM</value>\n  </data>\n  <data name=\"LongRegularFormat\" xml:space=\"preserve\">\n    <value>d.MM.yyyy</value>\n  </data>\n  <data name=\"MessageTodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"MessageRegularFormat\" xml:space=\"preserve\">\n    <value>d. MMM, {0}</value>\n  </data>\n  <data name=\"MessageLongRegularFormat\" xml:space=\"preserve\">\n    <value>yyyy d. MMM, {0}</value>\n  </data>\n  <data name=\"UserStatusTimeFormat\" xml:space=\"preserve\">\n    <value>H:mmt</value>\n  </data>\n  <data name=\"UserStatusDayFormat\" xml:space=\"preserve\">\n    <value>d. MMM</value>\n  </data>\n  <data name=\"UserStatusYearDayFormat\" xml:space=\"preserve\">\n    <value>d. MMM yyyy</value>\n  </data>\n  <data name=\"PhoneNumberInvalidString\" xml:space=\"preserve\">\n    <value>Ungültige Rufnummer. Bitte versuche es erneut.</value>\n  </data>\n  <data name=\"Error\" xml:space=\"preserve\">\n    <value>Fehler</value>\n  </data>\n  <data name=\"FloodWaitString\" xml:space=\"preserve\">\n    <value>Zu viele Versuche. Probiere es bitte später erneut.</value>\n  </data>\n  <data name=\"PhoneCodeInvalidString\" xml:space=\"preserve\">\n    <value>Du hast einen ungültigen Code eingegeben. Bitte versuche es erneut.</value>\n  </data>\n  <data name=\"PhoneCodeExpiredString\" xml:space=\"preserve\">\n    <value>Code ist abgelaufen. Bitte versuche es erneut.</value>\n  </data>\n  <data name=\"PhoneCodeEmpty\" xml:space=\"preserve\">\n    <value>Code ist leer. Bitte versuche es erneut.</value>\n  </data>\n  <data name=\"FirstNameInvalidString\" xml:space=\"preserve\">\n    <value>Vorname ungültig. Bitte versuche es erneut.</value>\n  </data>\n  <data name=\"LastNameInvalidString\" xml:space=\"preserve\">\n    <value>Nachname ungültig. Bitte versuche es erneut.</value>\n  </data>\n  <data name=\"Message\" xml:space=\"preserve\">\n    <value>Nachricht</value>\n  </data>\n  <data name=\"LockScreen\" xml:space=\"preserve\">\n    <value>Sperrbildschirm</value>\n  </data>\n  <data name=\"LockScreenSubtitle\" xml:space=\"preserve\">\n    <value>Telegram zum Sperrbildschirm hinzufügen</value>\n  </data>\n  <data name=\"ConfirmAgeMessage\" xml:space=\"preserve\">\n    <value>Mit dem Drücken auf OK bestätigen, dass du mindestens 13 Jahre alt bist.</value>\n  </data>\n  <data name=\"ConfirmAgeTitle\" xml:space=\"preserve\">\n    <value>Bestätige dein Alter</value>\n  </data>\n  <data name=\"ConfirmPushMessage\" xml:space=\"preserve\">\n    <value>Erlaubst Du Telegram die Verwendung von Push-Benachrichtigungen, um dich über neue Nachrichten zu informieren?</value>\n  </data>\n  <data name=\"ConfirmPushTitle\" xml:space=\"preserve\">\n    <value>Push-Benachrichtigungen bestätigen</value>\n  </data>\n  <data name=\"PrivacyStatement\" xml:space=\"preserve\">\n    <value>Datenschutzerklärung</value>\n  </data>\n  <data name=\"PrivacyStatementText\" xml:space=\"preserve\">\n    <value>Diese Anwendung verwendet Deinen aktuellen Standort. Die Positionsdaten dürfen gespeichert und freigegeben werden. Privatsphäre ist uns wichtig. Du kannst diese Funktion jederzeit deaktivieren.\n\nWenn Du Fragen hast, kontaktiere uns bitte über:</value>\n  </data>\n  <data name=\"VKGroup\" xml:space=\"preserve\">\n    <value>Gruppe</value>\n  </data>\n  <data name=\"LocationServices\" xml:space=\"preserve\">\n    <value>Standortdienste</value>\n  </data>\n  <data name=\"AllowLocationServicesTitle\" xml:space=\"preserve\">\n    <value>Zugriff auf diesen Standort erlauben?</value>\n  </data>\n  <data name=\"AllowLocationServiceText\" xml:space=\"preserve\">\n    <value>Zugriff auf den aktuellen Standort erlauben? Dies kann später über die Einstellungen wieder geändert werden.</value>\n  </data>\n  <data name=\"AboutText1\" xml:space=\"preserve\">\n    <value>Der Telegram Messenger ist eine Messaging-App mit Fokus auf Geschwindigkeit und Sicherheit. Telegram ist schnell, einfach und kostenlos.</value>\n  </data>\n  <data name=\"AboutText2\" xml:space=\"preserve\">\n    <value>Für den Support-Chat gehe bitte in die Einstellungen und wähle dort \"Eine Frage stellen\";. Du kannst uns gerne auch eine E-Mail mit deinen Fragen an support@telegram.org senden.</value>\n  </data>\n  <data name=\"TapRecordToStartRecording\" xml:space=\"preserve\">\n    <value>Tippe auf Aufzeichnen zum Starten der Aufnahme...</value>\n  </data>\n  <data name=\"ACameraIsNotSupportedOnThisDevice\" xml:space=\"preserve\">\n    <value>Eine Kamera wird auf diesem Gerät nicht unterstützt.</value>\n  </data>\n  <data name=\"ReadyToRecord\" xml:space=\"preserve\">\n    <value>Bereit zur Aufnahme.</value>\n  </data>\n  <data name=\"PressBackKeyToSendVideo\" xml:space=\"preserve\">\n    <value>Drücken die Zurück-Taste um das Video zu senden.</value>\n  </data>\n  <data name=\"PlaybackStarted\" xml:space=\"preserve\">\n    <value>Wiedergabe gestartet.</value>\n  </data>\n  <data name=\"PlaybackPaused\" xml:space=\"preserve\">\n    <value>Wiedergabe angehalten.</value>\n  </data>\n  <data name=\"Recording\" xml:space=\"preserve\">\n    <value>Aufzeichnen...</value>\n  </data>\n  <data name=\"PreparingViewfinder\" xml:space=\"preserve\">\n    <value>Sucher wird vorbereitet...</value>\n  </data>\n  <data name=\"PlaybackStoped\" xml:space=\"preserve\">\n    <value>Wiedergabe gestoppt</value>\n  </data>\n  <data name=\"Record\" xml:space=\"preserve\">\n    <value>Aufnehmen</value>\n  </data>\n  <data name=\"Stop\" xml:space=\"preserve\">\n    <value>Stop</value>\n  </data>\n  <data name=\"Pause\" xml:space=\"preserve\">\n    <value>Pause</value>\n  </data>\n  <data name=\"Play\" xml:space=\"preserve\">\n    <value>Wiedergabe</value>\n  </data>\n  <data name=\"Review\" xml:space=\"preserve\">\n    <value>Bewerten</value>\n  </data>\n  <data name=\"PleaseEnterGroupSubject\" xml:space=\"preserve\">\n    <value>Bitte gebe einen Betreff für die Gruppe ein</value>\n  </data>\n  <data name=\"PleaseChooseAtLeastOneParticipant\" xml:space=\"preserve\">\n    <value>Bitte wähle mindestens einen Teilnehmer</value>\n  </data>\n  <data name=\"ForwardMessagesToThisChat\" xml:space=\"preserve\">\n    <value>Nachricht an diesen Chat weiterleiten?</value>\n  </data>\n  <data name=\"InvalidCountryCode\" xml:space=\"preserve\">\n    <value>Ungültiger Ländercode</value>\n  </data>\n  <data name=\"Typing\" xml:space=\"preserve\">\n    <value>Tippt</value>\n  </data>\n  <data name=\"MaximumMessageLengthExceeded\" xml:space=\"preserve\">\n    <value>Maximale Nachrichtenlänge um ({0} Zeichen) überschritten.</value>\n  </data>\n  <data name=\"Download\" xml:space=\"preserve\">\n    <value>Download</value>\n  </data>\n  <data name=\"Backgrounds\" xml:space=\"preserve\">\n    <value>Hintergründe</value>\n  </data>\n  <data name=\"Static\" xml:space=\"preserve\">\n    <value>Statisch</value>\n  </data>\n  <data name=\"Animated\" xml:space=\"preserve\">\n    <value>Animiert</value>\n  </data>\n  <data name=\"Background\" xml:space=\"preserve\">\n    <value>Hintergrund</value>\n  </data>\n  <data name=\"ApplicationBackgroundSubtitle\" xml:space=\"preserve\">\n    <value>Chat-Hintergrundbild</value>\n  </data>\n  <data name=\"ApplicationBackground\" xml:space=\"preserve\">\n    <value>App-Hintergrund</value>\n  </data>\n  <data name=\"DialogsBackground\" xml:space=\"preserve\">\n    <value>Hintergrund</value>\n  </data>\n  <data name=\"SpecialThanks\" xml:space=\"preserve\">\n    <value>besonderen Dank</value>\n  </data>\n  <data name=\"SendMessageByEnter\" xml:space=\"preserve\">\n    <value>Nachrichten mit ENTER senden</value>\n  </data>\n  <data name=\"PleaseNoteThatAnimatedBackgroundConsumesMoreBatteryResources\" xml:space=\"preserve\">\n    <value>Bitte beachte, dass animierte Hintergründe mehr Akku verbrauchen</value>\n  </data>\n  <data name=\"Please go to chat to forward message\" xml:space=\"preserve\">\n    <value>Gehe bitte auf Chat-Nachricht weiterleiten</value>\n  </data>\n  <data name=\"SecretChatCaption\" xml:space=\"preserve\">\n    <value>Du hast {0} zu einem geheimen Chat eingeladen.</value>\n  </data>\n  <data name=\"SecretChat\" xml:space=\"preserve\">\n    <value>Geheimer Chat</value>\n  </data>\n  <data name=\"UseEntToEndEncryption\" xml:space=\"preserve\">\n    <value>Verwenden Ende-Zu-Ende-Verschlüsselung </value>\n  </data>\n  <data name=\"LeaveNoTraceOnOurServers\" xml:space=\"preserve\">\n    <value>Hinterlassen keine Spuren auf unseren Servern \n</value>\n  </data>\n  <data name=\"HaveASelfDestructTimer\" xml:space=\"preserve\">\n    <value>Haben einen Selbstzerstörungs-Timer</value>\n  </data>\n  <data name=\"SecretChats\" xml:space=\"preserve\">\n    <value>Geheime Chats</value>\n  </data>\n  <data name=\"DoNotAllowForwarding\" xml:space=\"preserve\">\n    <value>keine Weiterleitung innerhalb von Telegram </value>\n  </data>\n  <data name=\"WaitingForUserToGetOnline\" xml:space=\"preserve\">\n    <value>Wartet bis {0} online geht</value>\n  </data>\n  <data name=\"SelfDestructTimer\" xml:space=\"preserve\">\n    <value>Selbstzerstörungs-Timer</value>\n  </data>\n  <data name=\"EncryptionKey\" xml:space=\"preserve\">\n    <value>Geheimer Schlüssel</value>\n  </data>\n  <data name=\"EncryptionKeyDescription1\" xml:space=\"preserve\">\n    <value>Die Abbildung zeigt den geheimen Schlüssel dieses geheimen Chats mit {0}.</value>\n  </data>\n  <data name=\"EncryptionKeyDescription2\" xml:space=\"preserve\">\n    <value>Wenn dieses Bild auf dem Gerät von {0} genau so aussieht, ist euer Chat zu 200% sicher.</value>\n  </data>\n  <data name=\"LearnMoreAt\" xml:space=\"preserve\">\n    <value>Mehr Infos bei </value>\n  </data>\n  <data name=\"TelegramWebsite\" xml:space=\"preserve\">\n    <value>Telegram.org</value>\n  </data>\n  <data name=\"LastSeenAtDate\" xml:space=\"preserve\">\n    <value>Zuletzt online {0} um {1}</value>\n  </data>\n  <data name=\"LastSeenJustNow\" xml:space=\"preserve\">\n    <value>Zuletzt online gerade eben</value>\n  </data>\n  <data name=\"SecretChatsDescription\" xml:space=\"preserve\">\n    <value>Geheime Chats:\n• Ende-zu-Ende Verschlüsselung\n• Keine Serverspeicherung\n• Selbstzerstörungs-Timer\n• Auf ein Gerät beschränkt</value>\n  </data>\n  <data name=\"Audio\" xml:space=\"preserve\">\n    <value>Audio</value>\n  </data>\n  <data name=\"IncognitoMode\" xml:space=\"preserve\">\n    <value>Unsichtbarkeitsmodus</value>\n  </data>\n  <data name=\"TelegramNotifications\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"Invisible\" xml:space=\"preserve\">\n    <value>Unsichtbar</value>\n  </data>\n  <data name=\"SecretChatDiscarded\" xml:space=\"preserve\">\n    <value>Geheimer Chat beendet</value>\n  </data>\n  <data name=\"SecretChatCreated\" xml:space=\"preserve\">\n    <value>Geheimen Chat erstellt</value>\n  </data>\n  <data name=\"EmptySecretChat\" xml:space=\"preserve\">\n    <value>Geheimen Chat leeren</value>\n  </data>\n  <data name=\"MessageActionSetMessageTTL\" xml:space=\"preserve\">\n    <value>{0} hat den Selbstzerstörungs-Timer auf {1} gestellt</value>\n  </data>\n  <data name=\"MessageActionYouSetMessageTTL\" xml:space=\"preserve\">\n    <value>Der Selbstzerstörungs-Timer wurde auf {0} gestellt</value>\n  </data>\n  <data name=\"MessageActionDisableMessageTTL\" xml:space=\"preserve\">\n    <value>{0} hat den Selbstzerstörungs-Timer deaktiviert</value>\n  </data>\n  <data name=\"MessageActionYouDisableMessageTTL\" xml:space=\"preserve\">\n    <value>Du hast den Selbstzerstörungs-Timer deaktiviert</value>\n  </data>\n  <data name=\"PleaseWait\" xml:space=\"preserve\">\n    <value>Bitte warten…</value>\n  </data>\n  <data name=\"SecretChatCaption2\" xml:space=\"preserve\">\n    <value>{0} hat Dich zu einem geheimen Chat eingeladen.</value>\n  </data>\n  <data name=\"YouJoinedTheSecretChat\" xml:space=\"preserve\">\n    <value>Du bist dem geheimen Chat beigetreten.</value>\n  </data>\n  <data name=\"UserJoinedYourSecretChat\" xml:space=\"preserve\">\n    <value>{0} ist dem geheimen Chat beigetreten.</value>\n  </data>\n  <data name=\"AddContact\" xml:space=\"preserve\">\n    <value>Hinzufügen</value>\n  </data>\n  <data name=\"DeleteContact\" xml:space=\"preserve\">\n    <value>Löschen</value>\n  </data>\n  <data name=\"ConfirmDeleteContact\" xml:space=\"preserve\">\n    <value>Kontakt löschen?</value>\n  </data>\n  <data name=\"RegistrationProblemDescription\" xml:space=\"preserve\">\n    <value>Falls du Probleme beim der Registrierung oder beim Anmelden bei Telegram hast, kontaktiere uns bitte per </value>\n  </data>\n  <data name=\"RegistrationProblemEmail\" xml:space=\"preserve\">\n    <value>sms@telegram.org</value>\n  </data>\n  <data name=\"ChooseYourCountry\" xml:space=\"preserve\">\n    <value>Wähle dein Land</value>\n  </data>\n  <data name=\"AskAVolunteer\" xml:space=\"preserve\">\n    <value>Frage einen Helfer</value>\n  </data>\n  <data name=\"PinToStart\" xml:space=\"preserve\">\n    <value>An Startseite heften</value>\n  </data>\n  <data name=\"TerminateAllSessions\" xml:space=\"preserve\">\n    <value>Alle anderen Sitzungen abmelden</value>\n  </data>\n  <data name=\"TerminateAllSessionsConfirmation\" xml:space=\"preserve\">\n    <value>Sicher, dass du alle anderen Geräte abmelden möchtest?</value>\n  </data>\n  <data name=\"SlideToCancel\" xml:space=\"preserve\">\n    <value>Wischen um abzubrechen</value>\n  </data>\n  <data name=\"Terminate\" xml:space=\"preserve\">\n    <value>Beenden</value>\n  </data>\n  <data name=\"TapAndHoldToRecord\" xml:space=\"preserve\">\n    <value>Festhalten um aufzunehmen</value>\n  </data>\n  <data name=\"NewBroadcastList\" xml:space=\"preserve\">\n    <value>Neue Broadcast Liste</value>\n  </data>\n  <data name=\"AddUserToTheGroup\" xml:space=\"preserve\">\n    <value>{0} zur Gruppe \"{1}\" hinzufügen?</value>\n  </data>\n  <data name=\"NumberOfForwardingMessages\" xml:space=\"preserve\">\n    <value>Anzahl letzter Nachrichten zum Weiterleiten</value>\n  </data>\n  <data name=\"AddToContacts\" xml:space=\"preserve\">\n    <value>Zu Kontakten hinzufügen</value>\n  </data>\n  <data name=\"ShareMyContactInfo\" xml:space=\"preserve\">\n    <value>Meine Kontaktdaten teilen</value>\n  </data>\n  <data name=\"Cache\" xml:space=\"preserve\">\n    <value>Cache</value>\n  </data>\n  <data name=\"ClearCache\" xml:space=\"preserve\">\n    <value>Cache leeren</value>\n  </data>\n  <data name=\"ManagingLocalCache\" xml:space=\"preserve\">\n    <value>Lokalen Cache verwalten</value>\n  </data>\n  <data name=\"Calculating\" xml:space=\"preserve\">\n    <value>Berechne</value>\n  </data>\n  <data name=\"SaveFileMessage\" xml:space=\"preserve\">\n    <value>Datei wurde erfolgreich gespeichert</value>\n  </data>\n  <data name=\"SocialNetworks\" xml:space=\"preserve\">\n    <value>Soziale Netzwerke</value>\n  </data>\n  <data name=\"Sms\" xml:space=\"preserve\">\n    <value>SMS</value>\n  </data>\n  <data name=\"Email\" xml:space=\"preserve\">\n    <value>Email</value>\n  </data>\n  <data name=\"Set\" xml:space=\"preserve\">\n    <value>Wählen</value>\n  </data>\n  <data name=\"SearchAmongYourContacts\" xml:space=\"preserve\">\n    <value>Kontakte durchsuchen</value>\n  </data>\n  <data name=\"Connecting\" xml:space=\"preserve\">\n    <value>Verbinde</value>\n  </data>\n  <data name=\"SetProfilePhoto\" xml:space=\"preserve\">\n    <value>Profilfoto festlegen</value>\n  </data>\n  <data name=\"BatterySaverModeAlert\" xml:space=\"preserve\">\n    <value>Dein Gerät läuft im Batteriesparmodus. Du erhältst keine Telegram Benachrichtigungen solange der Modus aktiv ist. Diesen bitte deaktivieren.</value>\n  </data>\n  <data name=\"Warning\" xml:space=\"preserve\">\n    <value>Warnung</value>\n  </data>\n  <data name=\"NoInternetConnection\" xml:space=\"preserve\">\n    <value>Keine Internetverbindung</value>\n  </data>\n  <data name=\"Updating\" xml:space=\"preserve\">\n    <value>Aktualisiere</value>\n  </data>\n  <data name=\"SetUsername\" xml:space=\"preserve\">\n    <value>Benutzername festlegen</value>\n  </data>\n  <data name=\"Username\" xml:space=\"preserve\">\n    <value>Benutzername</value>\n  </data>\n  <data name=\"ServerError\" xml:space=\"preserve\">\n    <value>Serverfehler</value>\n  </data>\n  <data name=\"ServerErrorMessage\" xml:space=\"preserve\">\n    <value>Ein interner Serverfehler ist aufgetreten. Bitte versuche es später wieder.</value>\n  </data>\n  <data name=\"UsernameDescription\" xml:space=\"preserve\">\n    <value>Benutzername wählen, damit du von anderen bei Telegram gefunden werden kannst - ohne, dass sie deine Nummer kennen müssen.\nErlaubt sind a-z, 0-9 und Unterstriche. Die Mindestlänge ist 5 Zeichen.</value>\n  </data>\n  <data name=\"UsernameOccupied\" xml:space=\"preserve\">\n    <value>Benutzername ist leider schon belegt.</value>\n  </data>\n  <data name=\"UsernameInvalid\" xml:space=\"preserve\">\n    <value>Tut uns leid, dieser Benutzername ist nicht erlaubt.</value>\n  </data>\n  <data name=\"WaitingForNetwork\" xml:space=\"preserve\">\n    <value>Warte auf Verbindung</value>\n  </data>\n  <data name=\"GlobalSearch\" xml:space=\"preserve\">\n    <value>Globale Suche</value>\n  </data>\n  <data name=\"UsernameShort\" xml:space=\"preserve\">\n    <value>Ein Benutzername benötigt mindestens 5 Zeichen.</value>\n  </data>\n  <data name=\"UsernameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Benutzernamen dürfen leider nicht mit einer Zahl anfangen.</value>\n  </data>\n  <data name=\"SelectChat\" xml:space=\"preserve\">\n    <value>Chat auswählen</value>\n  </data>\n  <data name=\"MaximumFileSizeExceeded\" xml:space=\"preserve\">\n    <value>Maximale Dateigrösse erreicht. Du kannst Dateien bis zu {0} senden.</value>\n  </data>\n  <data name=\"UnableToAccessDocument\" xml:space=\"preserve\">\n    <value>Darauf kann nicht zugegriffen werden, bitte wähle eine andere Datei.</value>\n  </data>\n  <data name=\"Camcorder\" xml:space=\"preserve\">\n    <value>Camcorder</value>\n  </data>\n  <data name=\"CompressVideo\" xml:space=\"preserve\">\n    <value>Komprimiere Video</value>\n  </data>\n  <data name=\"EditedVideo\" xml:space=\"preserve\">\n    <value>Bearbeitetes Video</value>\n  </data>\n  <data name=\"EditVideo\" xml:space=\"preserve\">\n    <value>Video bearbeiten</value>\n  </data>\n  <data name=\"OriginalVideo\" xml:space=\"preserve\">\n    <value>Original Video</value>\n  </data>\n  <data name=\"AccountSelfDestrucsDescription\" xml:space=\"preserve\">\n    <value>Wenn du dich innerhalb dieser Zeit nicht anmeldest, wird dein Konto mit allen Gruppen, Nachrichten und Kontakten gelöscht.</value>\n  </data>\n  <data name=\"AccountSelfDestructs\" xml:space=\"preserve\">\n    <value>Automatische Kontolöschung</value>\n  </data>\n  <data name=\"AddExceptions\" xml:space=\"preserve\">\n    <value>Ausnahmen hinzufügen</value>\n  </data>\n  <data name=\"AlwaysShare\" xml:space=\"preserve\">\n    <value>Immer Teilen</value>\n  </data>\n  <data name=\"AlwaysShareWirhUsers\" xml:space=\"preserve\">\n    <value>Immer mit Kontakten teilen...</value>\n  </data>\n  <data name=\"AlwaysShareWith\" xml:space=\"preserve\">\n    <value>Immer Teilen Mit</value>\n  </data>\n  <data name=\"CodecWasNotFound\" xml:space=\"preserve\">\n    <value>Codec nicht gefunden</value>\n  </data>\n  <data name=\"Everybody\" xml:space=\"preserve\">\n    <value>Jeder</value>\n  </data>\n  <data name=\"IfYouAreAwayFor\" xml:space=\"preserve\">\n    <value>Wenn inaktiv für</value>\n  </data>\n  <data name=\"LastSeenDescription\" xml:space=\"preserve\">\n    <value>Wer kann deinen \"zuletzt online\" Status sehen?</value>\n  </data>\n  <data name=\"LastSeenImportantNote\" xml:space=\"preserve\">\n    <value>Wichtig: Du kannst den \"zuletzt gesehen\" Status nur von Personen sehen, mit denen du auch deinen teilst. Ansonsten wird die ungefähre Zeit angezeigt (kürzlich, innerhalb einer Woche, innerhalb eines Monats).</value>\n  </data>\n  <data name=\"LastSeenLongTimeAgo\" xml:space=\"preserve\">\n    <value>Vor langer Zeit gesehen</value>\n  </data>\n  <data name=\"LastSeenRecently\" xml:space=\"preserve\">\n    <value>Zuletzt kürzlich gesehen</value>\n  </data>\n  <data name=\"LastSeenWithinMonth\" xml:space=\"preserve\">\n    <value>Innerhalb eines Monats</value>\n  </data>\n  <data name=\"LastSeenWithinWeek\" xml:space=\"preserve\">\n    <value>Innerhalb einer Woche</value>\n  </data>\n  <data name=\"MyContacts\" xml:space=\"preserve\">\n    <value>Meine Kontakte</value>\n  </data>\n  <data name=\"NeverShare\" xml:space=\"preserve\">\n    <value>Niemals Teilen</value>\n  </data>\n  <data name=\"NeverShareWith\" xml:space=\"preserve\">\n    <value>Niemals Teilen Mit</value>\n  </data>\n  <data name=\"NeverShareWithUsers\" xml:space=\"preserve\">\n    <value>Niemals mit Kontakten teilen...</value>\n  </data>\n  <data name=\"Nobody\" xml:space=\"preserve\">\n    <value>Niemand</value>\n  </data>\n  <data name=\"PrivacyAndSecurity\" xml:space=\"preserve\">\n    <value>Privatsphäre und Sicherheit</value>\n  </data>\n  <data name=\"PrivacySettingsError\" xml:space=\"preserve\">\n    <value>Du hast zu oft probiert, deine Einstellungen zu ändern; bitte warte kurz.</value>\n  </data>\n  <data name=\"ProfileIsInvalid\" xml:space=\"preserve\">\n    <value>Videoenkodierungsprofil ist ungültig</value>\n  </data>\n  <data name=\"SettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Diese Einstellung überschreibt die o.g. Angaben.</value>\n  </data>\n  <data name=\"UnknownFailure\" xml:space=\"preserve\">\n    <value>Unbekannter Fehler</value>\n  </data>\n  <data name=\"LastSeenShort\" xml:space=\"preserve\">\n    <value>Zuletzt gesehen</value>\n  </data>\n  <data name=\"PrivacySecuritySubtitle\" xml:space=\"preserve\">\n    <value>Blockierte Nutzer, zuletzt gesehen, Sitzungen</value>\n  </data>\n  <data name=\"MonthGenitivePlural\" xml:space=\"preserve\">\n    <value>Monate</value>\n  </data>\n  <data name=\"MonthGenitiveSingular\" xml:space=\"preserve\">\n    <value>Monat</value>\n  </data>\n  <data name=\"MonthNominativePlural\" xml:space=\"preserve\">\n    <value>Monate</value>\n  </data>\n  <data name=\"MonthNominativeSingular\" xml:space=\"preserve\">\n    <value>Monat</value>\n  </data>\n  <data name=\"YearGenitivePlural\" xml:space=\"preserve\">\n    <value>Jahre</value>\n  </data>\n  <data name=\"YearGenitiveSingular\" xml:space=\"preserve\">\n    <value>Jahr</value>\n  </data>\n  <data name=\"YearNominativePlural\" xml:space=\"preserve\">\n    <value>Jahre</value>\n  </data>\n  <data name=\"YearNominativeSingular\" xml:space=\"preserve\">\n    <value>Jahr</value>\n  </data>\n  <data name=\"LastSeenDescription2\" xml:space=\"preserve\">\n    <value>Wer kann deinen \"zuletzt online\" Status sehen?</value>\n  </data>\n  <data name=\"CheckingUsername\" xml:space=\"preserve\">\n    <value>Prüfe Benutzername...</value>\n  </data>\n  <data name=\"CantFindContactWithUsername\" xml:space=\"preserve\">\n    <value>Telegram Nutzer @{0} wurde nicht gefunden</value>\n  </data>\n  <data name=\"Compressing\" xml:space=\"preserve\">\n    <value>Komprimiere</value>\n  </data>\n  <data name=\"PeopleHubIntegration\" xml:space=\"preserve\">\n    <value>Kontakte synchronisieren</value>\n  </data>\n  <data name=\"SyncContactsProgress\" xml:space=\"preserve\">\n    <value>Synchronisiere Kontakte  ({0} of {1})...</value>\n  </data>\n  <data name=\"DeletingContacts\" xml:space=\"preserve\">\n    <value>Lösche Kontakte...</value>\n  </data>\n  <data name=\"ChangeNumber\" xml:space=\"preserve\">\n    <value>Nummer ändern</value>\n  </data>\n  <data name=\"ConfirmNewNumberMessage\" xml:space=\"preserve\">\n    <value>Der Bestätigungscode kommt per SMS an deine neue Nummer.</value>\n  </data>\n  <data name=\"NewNumber\" xml:space=\"preserve\">\n    <value>Neue Telefonnummer</value>\n  </data>\n  <data name=\"NewNumberConfirmation\" xml:space=\"preserve\">\n    <value>Deinen Kontakten wird deine neue Nummer ihrem Telefonbuch hinzugefügt, sofern sie deine alte Nummer gespeichert hatten und du sie nicht blockiert hattest.</value>\n  </data>\n  <data name=\"NewNumberDescription\" xml:space=\"preserve\">\n    <value>Du kannst deine Telefonnummer hier ändern. Dein Konto und alle Daten in der Telegram-Cloud, also Nachrichten, Medien, Kontakte, etc. werden auf das neue Konto übertragen.\n\nWichtig: Alle deine Kontakte erhalten deine neue Nummer ihrem Telefonbuch hinzugefügt, sofern sie deine alte Nummer gespeichert hatten und du sie nicht blockiert hattest.</value>\n  </data>\n  <data name=\"NewNumberTaken\" xml:space=\"preserve\">\n    <value>Die Telefonnummer {0} ist bereits ein Telegram Konto. Bitte lösche es, bevor du mit der Übertragung auf das neue Konto startest.</value>\n  </data>\n  <data name=\"MessageActionScreenshotMessages\" xml:space=\"preserve\">\n    <value>{0} hat ein Bildschirmfoto gemacht!</value>\n  </data>\n  <data name=\"MessageActionYouScreenshotMessages\" xml:space=\"preserve\">\n    <value>Du hast ein Bildschirmfoto gemacht!</value>\n  </data>\n  <data name=\"DayGenitivePlural\" xml:space=\"preserve\">\n    <value>Tage</value>\n  </data>\n  <data name=\"DayGenitiveSingular\" xml:space=\"preserve\">\n    <value>Tag</value>\n  </data>\n  <data name=\"DayNominativePlural\" xml:space=\"preserve\">\n    <value>Tage</value>\n  </data>\n  <data name=\"DayNominativeSingular\" xml:space=\"preserve\">\n    <value>Tag</value>\n  </data>\n  <data name=\"HourGenitivePlural\" xml:space=\"preserve\">\n    <value>Stunden</value>\n  </data>\n  <data name=\"HourGenitiveSingular\" xml:space=\"preserve\">\n    <value>Stunde</value>\n  </data>\n  <data name=\"HourNominativePlural\" xml:space=\"preserve\">\n    <value>Stunden</value>\n  </data>\n  <data name=\"HourNominativeSingular\" xml:space=\"preserve\">\n    <value>Stunde</value>\n  </data>\n  <data name=\"MinuteNominativePlural\" xml:space=\"preserve\">\n    <value>Minuten</value>\n  </data>\n  <data name=\"MinuteNominativeSingular\" xml:space=\"preserve\">\n    <value>Minute</value>\n  </data>\n  <data name=\"SecondGenitivePlural\" xml:space=\"preserve\">\n    <value>Sekunden</value>\n  </data>\n  <data name=\"SecondGenitiveSingular\" xml:space=\"preserve\">\n    <value>Sekunde</value>\n  </data>\n  <data name=\"SecondNominativePlural\" xml:space=\"preserve\">\n    <value>Sekunden</value>\n  </data>\n  <data name=\"SecondNominativeSingular\" xml:space=\"preserve\">\n    <value>Sekunde</value>\n  </data>\n  <data name=\"WeekGenitivePlural\" xml:space=\"preserve\">\n    <value>Wochen</value>\n  </data>\n  <data name=\"WeekGenitiveSingular\" xml:space=\"preserve\">\n    <value>Woche</value>\n  </data>\n  <data name=\"WeekNominativePlural\" xml:space=\"preserve\">\n    <value>Wochen</value>\n  </data>\n  <data name=\"WeekNominativeSingular\" xml:space=\"preserve\">\n    <value>Woche</value>\n  </data>\n  <data name=\"TapAndHoldToView\" xml:space=\"preserve\">\n    <value>Tippen und Halten</value>\n  </data>\n  <data name=\"Sticker\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"Files\" xml:space=\"preserve\">\n    <value>Dateien</value>\n  </data>\n  <data name=\"NoFilesHere\" xml:space=\"preserve\">\n    <value>Noch keine Dateien</value>\n  </data>\n  <data name=\"ShareFiles\" xml:space=\"preserve\">\n    <value>Du kannst jede Art Datei mit bis zu 1,5 GB auf all deinen Geräten senden und empfangen.</value>\n  </data>\n  <data name=\"SharePhotosAndVideos\" xml:space=\"preserve\">\n    <value>Noch keine Dateien.\n\nTeile Bilder und Videos in diesem Chat - dann freut sich die Büroklammer.</value>\n  </data>\n  <data name=\"Disabled\" xml:space=\"preserve\">\n    <value>Stummschalten</value>\n  </data>\n  <data name=\"Enabled\" xml:space=\"preserve\">\n    <value>Stumm Aus</value>\n  </data>\n  <data name=\"MuteFor\" xml:space=\"preserve\">\n    <value>Stumm für {0}</value>\n  </data>\n  <data name=\"UnmuteIn\" xml:space=\"preserve\">\n    <value>In {0}</value>\n  </data>\n  <data name=\"More\" xml:space=\"preserve\">\n    <value>Mehr</value>\n  </data>\n  <data name=\"SearchAmongYourChats\" xml:space=\"preserve\">\n    <value>Chats durchsuchen</value>\n  </data>\n  <data name=\"SearchAmongYourFiles\" xml:space=\"preserve\">\n    <value>Geteilte Dateien durchsuchen</value>\n  </data>\n  <data name=\"NewAuthorization\" xml:space=\"preserve\">\n    <value>{0},\nWir haben einen Zugriff auf dein Konto von einem neuen Gerät am {1}, {2} um {3} festgestellt. \n\nGerät: {4}\nStandort: {5}\n\nWenn du das nicht selbst gewesen bist, kannst du in den Telegram-Einstellungen unter Privatsphäre und Sicherheit alle Sitzungen beenden. \n\nDanke, Das Telegram Team</value>\n  </data>\n  <data name=\"Link\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"ContactRegistered\" xml:space=\"preserve\">\n    <value>{0} benutzt jetzt Telegram!</value>\n  </data>\n  <data name=\"UnreadMessages\" xml:space=\"preserve\">\n    <value>Ungelesene Nachrichten</value>\n  </data>\n  <data name=\"ChangePasscode\" xml:space=\"preserve\">\n    <value>Pincode ändern</value>\n  </data>\n  <data name=\"ChangePasscodeHint\" xml:space=\"preserve\">\n    <value>Wenn du die Code-Sperre aktivierst, erscheint ein Schloss-Symbol über der Chatliste. Tippe darauf, um deine Chats zu sperren und zu entsperren. \n\nÜbrigens: Wenn du den Pincode vergisst, musst du Telegram löschen und neu installieren. Dadurch verlierst du alle Geheimen Chats.</value>\n  </data>\n  <data name=\"ConfirmPasscode\" xml:space=\"preserve\">\n    <value>Pincode bestätigen</value>\n  </data>\n  <data name=\"EnterPasscode\" xml:space=\"preserve\">\n    <value>Pincode eingeben</value>\n  </data>\n  <data name=\"Passcode\" xml:space=\"preserve\">\n    <value>Pincode-Sperre</value>\n  </data>\n  <data name=\"SimplePasscode\" xml:space=\"preserve\">\n    <value>Einfacher Pincode</value>\n  </data>\n  <data name=\"SimplePasscodeHint\" xml:space=\"preserve\">\n    <value>Ein einfacher Pincode besteht aus 4 Ziffern.</value>\n  </data>\n  <data name=\"YourPasscode\" xml:space=\"preserve\">\n    <value>Neuer Pincode</value>\n  </data>\n  <data name=\"EnterYourCurrentPasscode\" xml:space=\"preserve\">\n    <value>Aktuellen Pincode eingeben</value>\n  </data>\n  <data name=\"PasscodeType\" xml:space=\"preserve\">\n    <value>Art des Pincodes</value>\n  </data>\n  <data name=\"Pin\" xml:space=\"preserve\">\n    <value>Pincode</value>\n  </data>\n  <data name=\"Privacy\" xml:space=\"preserve\">\n    <value>Privatsphäre</value>\n  </data>\n  <data name=\"Security\" xml:space=\"preserve\">\n    <value>Sicherheit</value>\n  </data>\n  <data name=\"YouHaveNewMessage\" xml:space=\"preserve\">\n    <value>Du hast eine neue Nachricht</value>\n  </data>\n  <data name=\"PasscodeAutolockHint\" xml:space=\"preserve\">\n    <value>Benötigt Pincode wenn lange inaktiv.</value>\n  </data>\n  <data name=\"PasscodeAutolockIn\" xml:space=\"preserve\">\n    <value>In {0}</value>\n  </data>\n  <data name=\"Autolock\" xml:space=\"preserve\">\n    <value>Auto-Sperre</value>\n  </data>\n  <data name=\"AutolockDisabled\" xml:space=\"preserve\">\n    <value>Deaktiviert</value>\n  </data>\n  <data name=\"IncorrectPasscode\" xml:space=\"preserve\">\n    <value>Ungültiger Pincode</value>\n  </data>\n  <data name=\"Reply\" xml:space=\"preserve\">\n    <value>Antworten</value>\n  </data>\n  <data name=\"AndOthers\" xml:space=\"preserve\">\n    <value>Und {0} andere</value>\n  </data>\n  <data name=\"ForwardedAudioGenitivePlural\" xml:space=\"preserve\">\n    <value>Audioanhänge</value>\n  </data>\n  <data name=\"ForwardedAudioGenitiveSingular\" xml:space=\"preserve\">\n    <value>Audioanhang</value>\n  </data>\n  <data name=\"ForwardedAudioNominativePlural\" xml:space=\"preserve\">\n    <value>Audioanhänge</value>\n  </data>\n  <data name=\"ForwardedAudioNominativeSingular\" xml:space=\"preserve\">\n    <value>Audioanhang</value>\n  </data>\n  <data name=\"ForwardedContactGenitivePlural\" xml:space=\"preserve\">\n    <value>Kontaktanhänge</value>\n  </data>\n  <data name=\"ForwardedContactGenitiveSingular\" xml:space=\"preserve\">\n    <value>Kontaktanhang</value>\n  </data>\n  <data name=\"ForwardedContactNominativePlural\" xml:space=\"preserve\">\n    <value>Kontaktanhänge</value>\n  </data>\n  <data name=\"ForwardedContactNominativeSingular\" xml:space=\"preserve\">\n    <value>Kontaktanhang</value>\n  </data>\n  <data name=\"ForwardedFileGenitivePlural\" xml:space=\"preserve\">\n    <value>Dateianhänge</value>\n  </data>\n  <data name=\"ForwardedFileGenitiveSingular\" xml:space=\"preserve\">\n    <value>Dateianhang</value>\n  </data>\n  <data name=\"ForwardedFileNominativePlural\" xml:space=\"preserve\">\n    <value>Dateianhänge</value>\n  </data>\n  <data name=\"ForwardedFileNominativeSingular\" xml:space=\"preserve\">\n    <value>Dateianhang</value>\n  </data>\n  <data name=\"ForwardedLocationGenitivePlural\" xml:space=\"preserve\">\n    <value>Standortanhänge</value>\n  </data>\n  <data name=\"ForwardedLocationGenitiveSingular\" xml:space=\"preserve\">\n    <value>Standortanhang</value>\n  </data>\n  <data name=\"ForwardedLocationNominativePlural\" xml:space=\"preserve\">\n    <value>Standortanhänge</value>\n  </data>\n  <data name=\"ForwardedLocationNominativeSingular\" xml:space=\"preserve\">\n    <value>Standortanhang</value>\n  </data>\n  <data name=\"ForwardedMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Nachrichtenanhänge</value>\n  </data>\n  <data name=\"ForwardedMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Nachrichtenanhang</value>\n  </data>\n  <data name=\"ForwardedMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Nachrichtenanhänge</value>\n  </data>\n  <data name=\"ForwardedMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Nachrichtenanhang</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Bilderanhänge</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bildanhang</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Bilderanhänge</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Bildanhang</value>\n  </data>\n  <data name=\"ForwardedStickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Stickeranhänge</value>\n  </data>\n  <data name=\"ForwardedStickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Stickeranhang</value>\n  </data>\n  <data name=\"ForwardedStickerNominativePlural\" xml:space=\"preserve\">\n    <value>Stickeranhänge</value>\n  </data>\n  <data name=\"ForwardedStickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Stickeranhang</value>\n  </data>\n  <data name=\"ForwardedVideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Videoanhänge</value>\n  </data>\n  <data name=\"ForwardedVideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Videoanhang</value>\n  </data>\n  <data name=\"ForwardedVideoNominativePlural\" xml:space=\"preserve\">\n    <value>Videoanhänge</value>\n  </data>\n  <data name=\"ForwardedVideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Videoanhang</value>\n  </data>\n  <data name=\"SearchMessages\" xml:space=\"preserve\">\n    <value>Nachrichten suchen</value>\n  </data>\n  <data name=\"Unsupported\" xml:space=\"preserve\">\n    <value>Nicht unterstützt</value>\n  </data>\n  <data name=\"EnterYourCurrentPassword\" xml:space=\"preserve\">\n    <value>Aktuelles Kennwort eingeben</value>\n  </data>\n  <data name=\"Password\" xml:space=\"preserve\">\n    <value>Kennwort</value>\n  </data>\n  <data name=\"PasswordInvalidString\" xml:space=\"preserve\">\n    <value>Kennwort falsch, bitte erneut versuchen.</value>\n  </data>\n  <data name=\"AlmostThere\" xml:space=\"preserve\">\n    <value>Fast geschafft!</value>\n  </data>\n  <data name=\"ChangePassword\" xml:space=\"preserve\">\n    <value>Kennwort ändern</value>\n  </data>\n  <data name=\"ChangePasswordHint\" xml:space=\"preserve\">\n    <value>Du kannst ein eigenes Kennwort festlegen, um dich an einem neuen Gerät anzumelden, zusätzlich zu einer PIN Nummer die du per SMS bekommst.</value>\n  </data>\n  <data name=\"ChangeRecoveryEmail\" xml:space=\"preserve\">\n    <value>E‑Mail-Adresse zur Wiederherstellung festlegen</value>\n  </data>\n  <data name=\"CompletePasswordHint\" xml:space=\"preserve\">\n    <value>Bitte überprüfe deine Mails (auch den Spam-Ordner) um die zweistufige Bestätigung abzuschließen.</value>\n  </data>\n  <data name=\"ConfirmPassword\" xml:space=\"preserve\">\n    <value>Kennwort nochmals eingeben</value>\n  </data>\n  <data name=\"EnterPassword\" xml:space=\"preserve\">\n    <value>Kennwort eingeben</value>\n  </data>\n  <data name=\"EnterRecoveryEmail\" xml:space=\"preserve\">\n    <value>Deine E-Mail eingeben</value>\n  </data>\n  <data name=\"EnterRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>Falls du dein Kennwort vergisst, benötigen wir deine richtige Email Adresse.</value>\n  </data>\n  <data name=\"RecoveryEmail\" xml:space=\"preserve\">\n    <value>Wiederherstellung</value>\n  </data>\n  <data name=\"SetRecoveryEmail\" xml:space=\"preserve\">\n    <value>E‑Mail-Adresse zur Wiederherstellung festlegen</value>\n  </data>\n  <data name=\"Skip\" xml:space=\"preserve\">\n    <value>Überspringen</value>\n  </data>\n  <data name=\"SkipRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>Im Ernst.\n\nWenn du dein Kennwort vergisst, verlierst du den Zugang zu deinem Telegram Konto. Für immer, ohne Ausnahme.</value>\n  </data>\n  <data name=\"TwoStepVerification\" xml:space=\"preserve\">\n    <value>Zweistufige Bestätigung</value>\n  </data>\n  <data name=\"YourPassword\" xml:space=\"preserve\">\n    <value>Dein Kennwort</value>\n  </data>\n  <data name=\"CurrentSession\" xml:space=\"preserve\">\n    <value>Aktuelle Sitzung</value>\n  </data>\n  <data name=\"OtherSessions\" xml:space=\"preserve\">\n    <value>Andere Sitzungen</value>\n  </data>\n  <data name=\"OfficialApp\" xml:space=\"preserve\">\n    <value>Offizielle App</value>\n  </data>\n  <data name=\"Sessions\" xml:space=\"preserve\">\n    <value>Sitzungen</value>\n  </data>\n  <data name=\"TerminateAllOtherSessionsNote\" xml:space=\"preserve\">\n    <value>Alle Geräte außer diesem werden abgemeldet.</value>\n  </data>\n  <data name=\"UnofficialApp\" xml:space=\"preserve\">\n    <value>Inoffizielle App</value>\n  </data>\n  <data name=\"EmailInvalid\" xml:space=\"preserve\">\n    <value>Ungültige E-Mail Adresse</value>\n  </data>\n  <data name=\"PasswordActive\" xml:space=\"preserve\">\n    <value>Dein Kennwort für die zweistufige Bestätigung ist jetzt aktiv.</value>\n  </data>\n  <data name=\"Success\" xml:space=\"preserve\">\n    <value>Geschafft!</value>\n  </data>\n  <data name=\"RecoveryEmailPending\" xml:space=\"preserve\">\n    <value>Deine E-Mail Adresse {0} wurde noch verifiziert und ist daher noch nicht aktiv.</value>\n  </data>\n  <data name=\"AbortTwoStepVerificationSetup\" xml:space=\"preserve\">\n    <value>Einrichtung der zweistufigen Bestätigung abbrechen</value>\n  </data>\n  <data name=\"StepsToCompleteToTwoStepsVerificationSetup\" xml:space=\"preserve\">\n    <value>Bitte folge diesen Schritten um die zweistufige Bestätigung abzuschließen:\n\n 1. Überprüfe deine Mails (auch den Spam-Ordner) {0}.\n\n2. Auf den Link klicken.</value>\n  </data>\n  <data name=\"Hint\" xml:space=\"preserve\">\n    <value>Hinweis</value>\n  </data>\n  <data name=\"PasswordHint\" xml:space=\"preserve\">\n    <value>Kennwort-Hinweis</value>\n  </data>\n  <data name=\"PasswordHintLabel\" xml:space=\"preserve\">\n    <value>Du brauchst einen Hinweis auf dein Kennwort</value>\n  </data>\n  <data name=\"ForgotPassword\" xml:space=\"preserve\">\n    <value>Kennwort vergessen?</value>\n  </data>\n  <data name=\"PasswordHintError\" xml:space=\"preserve\">\n    <value>Der Hinweis darf nicht das Kennwort sein.</value>\n  </data>\n  <data name=\"EnterPasswordHint\" xml:space=\"preserve\">\n    <value>Kennwort-Hinweis eingeben</value>\n  </data>\n  <data name=\"HavingTroubleAccessingEmailMessage\" xml:space=\"preserve\">\n    <value>Du hast keinen Zugang zu deiner Adresse {0}?</value>\n  </data>\n  <data name=\"NoAccessRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Wenn du nicht in deine Emails kommst, kannst du nur hoffen, dass dir dein Kennwort wieder einfällt oder du musst dein Telegram Konto zurückzusetzen.</value>\n  </data>\n  <data name=\"NoRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Da du keine E-Mail Adresse hinterlegt hast, kannst du nur noch hoffen, dass dir dein Kennwort wieder einfällt oder du musst tatsächlich dein Telegram Konto zurücksetzen.</value>\n  </data>\n  <data name=\"PasswordDeactivated\" xml:space=\"preserve\">\n    <value>Kennwort deaktiviert</value>\n  </data>\n  <data name=\"PasswordMessage\" xml:space=\"preserve\">\n    <value>Du hast die zweistufige Bestätigung aktiviert. Dein Konto ist mit einem zusätzlichem Kennwort geschützt.</value>\n  </data>\n  <data name=\"PasswordRecovery\" xml:space=\"preserve\">\n    <value>Kennwort Wiederherstellung</value>\n  </data>\n  <data name=\"PasswordRecoveryHint\" xml:space=\"preserve\">\n    <value>Überprüfe deine Mails und gib den 6-stelligen Code aus userer Email ein.</value>\n  </data>\n  <data name=\"SentRecoveryCodeMessage\" xml:space=\"preserve\">\n    <value>Wir haben den Wiederherstellungscode an deine hinterlegte E-Mail Adresse geschickt: {0}</value>\n  </data>\n  <data name=\"Sorry\" xml:space=\"preserve\">\n    <value>Tut uns leid</value>\n  </data>\n  <data name=\"RecoveryEmailComplete\" xml:space=\"preserve\">\n    <value>Du hast die zweistufige Bestätigung aktiviert.\nWenn du dich bei Telegram anmeldest, brauchst du dein Kennwort.</value>\n  </data>\n  <data name=\"TerminateSessionHint\" xml:space=\"preserve\">\n    <value>Auf das Gerät tippen, um es abzumelden.</value>\n  </data>\n  <data name=\"GettingLinkInfo\" xml:space=\"preserve\">\n    <value>Lade Linkvorschau...</value>\n  </data>\n  <data name=\"ResetMyAccount\" xml:space=\"preserve\">\n    <value>Konto zurücksetzen</value>\n  </data>\n  <data name=\"ResetMyAccountConfirmation\" xml:space=\"preserve\">\n    <value>Dies kann nicht rückgängig gemacht werden.\n\nWenn du dein Konto zurücksetzt, sind alle Chats gelöscht.</value>\n  </data>\n  <data name=\"ResetMyAccountHint\" xml:space=\"preserve\">\n    <value>Wenn du dein Konto zurücksetzt, verlierst du alle Chats und Nachrichten, ebenso deine geteilten Bilder und Videos.</value>\n  </data>\n  <data name=\"IsRecordingAudio\" xml:space=\"preserve\">\n    <value>Nimmt etwas auf</value>\n  </data>\n  <data name=\"IsSendingFile\" xml:space=\"preserve\">\n    <value>schickt Datei</value>\n  </data>\n  <data name=\"IsSendingPhoto\" xml:space=\"preserve\">\n    <value>schickt Bild</value>\n  </data>\n  <data name=\"IsSendingVideo\" xml:space=\"preserve\">\n    <value>schickt Video</value>\n  </data>\n  <data name=\"RecordingAudio\" xml:space=\"preserve\">\n    <value>Nimmt etwas auf</value>\n  </data>\n  <data name=\"SendingFile\" xml:space=\"preserve\">\n    <value>Schickt Datei</value>\n  </data>\n  <data name=\"SendingPhoto\" xml:space=\"preserve\">\n    <value>Schickt Bild</value>\n  </data>\n  <data name=\"SendingVideo\" xml:space=\"preserve\">\n    <value>Schickt Video</value>\n  </data>\n  <data name=\"AddCaption\" xml:space=\"preserve\">\n    <value>Beschriftung...</value>\n  </data>\n  <data name=\"CopyLink\" xml:space=\"preserve\">\n    <value>Link kopieren</value>\n  </data>\n  <data name=\"CopyLinkHint\" xml:space=\"preserve\">\n    <value>Link in die Zwischenablage kopiert</value>\n  </data>\n  <data name=\"GroupFullError\" xml:space=\"preserve\">\n    <value>Leider ist diese Gruppe schon voll.</value>\n  </data>\n  <data name=\"GroupNotExistsError\" xml:space=\"preserve\">\n    <value>Leider gibt es diesen Chat nicht.</value>\n  </data>\n  <data name=\"InviteGroupViaLink\" xml:space=\"preserve\">\n    <value>Per Link zur Gruppe einladen</value>\n  </data>\n  <data name=\"InviteLink\" xml:space=\"preserve\">\n    <value>Einladungslink</value>\n  </data>\n  <data name=\"InviteLinkHint\" xml:space=\"preserve\">\n    <value>Jeder, der Telegram installiert hat, kann anhand dieses Links in deine Gruppe.</value>\n  </data>\n  <data name=\"JoinGroupConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du der Gruppe '{0}' beitreten?</value>\n  </data>\n  <data name=\"MessageActionChatJoinedByLink\" xml:space=\"preserve\">\n    <value>{0} ist per Einladungslink der Gruppe beigetreten</value>\n  </data>\n  <data name=\"RevokeLink\" xml:space=\"preserve\">\n    <value>Link widerrufen</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation\" xml:space=\"preserve\">\n    <value>Bist du sicher, dass du diesen Link widerrufen willst? Dadurch kann ihn niemand mehr nutzen.</value>\n  </data>\n  <data name=\"RevokeLinkHint\" xml:space=\"preserve\">\n    <value>Der vorige Link ist nun inaktiv. Ein neuer Einladungslink wurde gerade erstellt.</value>\n  </data>\n  <data name=\"ShareLink\" xml:space=\"preserve\">\n    <value>Link teilen</value>\n  </data>\n  <data name=\"Directions\" xml:space=\"preserve\">\n    <value>Wegbeschreibung</value>\n  </data>\n  <data name=\"NearbyPlaces\" xml:space=\"preserve\">\n    <value>Orte in der Nähe</value>\n  </data>\n  <data name=\"SendThisLocation\" xml:space=\"preserve\">\n    <value>Meinen Standort senden</value>\n  </data>\n  <data name=\"PoweredBy\" xml:space=\"preserve\">\n    <value>Powered by</value>\n  </data>\n  <data name=\"LocationServicesDisabled\" xml:space=\"preserve\">\n    <value>Die Positionsdienste auf dem Telefon sind nicht aktiv.</value>\n  </data>\n  <data name=\"LocationSettings\" xml:space=\"preserve\">\n    <value>Standorteinstellungen</value>\n  </data>\n  <data name=\"Unknown\" xml:space=\"preserve\">\n    <value>Unbekannn</value>\n  </data>\n  <data name=\"AddStickersConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du Sticker '{0}' hinzufügen?</value>\n  </data>\n  <data name=\"NewStickersAdded\" xml:space=\"preserve\">\n    <value>Neue Sticker hinzugefügt</value>\n  </data>\n  <data name=\"StickersNotFound\" xml:space=\"preserve\">\n    <value>Sticker nicht gefunden</value>\n  </data>\n  <data name=\"ClearLogs\" xml:space=\"preserve\">\n    <value>Protokolldateien leeren</value>\n  </data>\n  <data name=\"Hide\" xml:space=\"preserve\">\n    <value>Ausblenden</value>\n  </data>\n  <data name=\"Remove\" xml:space=\"preserve\">\n    <value>Entfernen</value>\n  </data>\n  <data name=\"SendLogs\" xml:space=\"preserve\">\n    <value>Protokolldateien senden</value>\n  </data>\n  <data name=\"StickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"StickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"StickerNominativePlural\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"StickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"Stickers\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"StickersDescription\" xml:space=\"preserve\">\n    <value>Künstler können eigene Sticker-Pakete über unseren Sticker Bot (@stickers) einstellen.\n\nNutzer fügen Sticker durch Antippen eines Stickers und dann \"Sticker hinzufügen\" hinzu.</value>\n  </data>\n  <data name=\"LinkCopiedToClipboard\" xml:space=\"preserve\">\n    <value>Link in die Zwischenablage kopiert</value>\n  </data>\n  <data name=\"Close\" xml:space=\"preserve\">\n    <value>Schließen</value>\n  </data>\n  <data name=\"Show\" xml:space=\"preserve\">\n    <value>Zeigen</value>\n  </data>\n  <data name=\"AddToStickers\" xml:space=\"preserve\">\n    <value>Zu Sticker hinzufügen</value>\n  </data>\n  <data name=\"SecretChatRequested\" xml:space=\"preserve\">\n    <value>Tausche Schlüssel aus...</value>\n  </data>\n  <data name=\"Bot\" xml:space=\"preserve\">\n    <value>Bot</value>\n  </data>\n  <data name=\"OnlySeesMessagesStartingWithSlash\" xml:space=\"preserve\">\n    <value>keinen Zugriff auf Nachrichten</value>\n  </data>\n  <data name=\"SeesAllMessages\" xml:space=\"preserve\">\n    <value>hat Zugriff auf Nachrichten</value>\n  </data>\n  <data name=\"WhatCanThisBotDo\" xml:space=\"preserve\">\n    <value>Was kann dieser Bot?</value>\n  </data>\n  <data name=\"AddBotToGroupsError\" xml:space=\"preserve\">\n    <value>Keine Gruppen mit diesem Bot möglich.</value>\n  </data>\n  <data name=\"AddToGroup\" xml:space=\"preserve\">\n    <value>Zur Gruppe hinzufügen</value>\n  </data>\n  <data name=\"BlockContactConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du wirklich diesen Kontakt blockieren?</value>\n  </data>\n  <data name=\"Help\" xml:space=\"preserve\">\n    <value>Hilfe</value>\n  </data>\n  <data name=\"Start\" xml:space=\"preserve\">\n    <value>Starten</value>\n  </data>\n  <data name=\"UnblockContactConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du wirklich diesen Kontakt freigeben?</value>\n  </data>\n  <data name=\"SharedLinks\" xml:space=\"preserve\">\n    <value>Links</value>\n  </data>\n  <data name=\"BackgroudnTaskDisabledAlert\" xml:space=\"preserve\">\n    <value>Du hast den Hintergrunddienst für Telegram deaktiviert, daher erhältst du keinerlei Benachrichtigungen. Bitte aktiviere den Dienst wieder in den Windows Phone Einstellungen.</value>\n  </data>\n  <data name=\"SearchSharedLinks\" xml:space=\"preserve\">\n    <value>Geteilte Links durchsuchen</value>\n  </data>\n  <data name=\"SharedFiles\" xml:space=\"preserve\">\n    <value>Dateien</value>\n  </data>\n  <data name=\"ShareLinks\" xml:space=\"preserve\">\n    <value>Die hier geteilten Links kannst du von jedem deiner Geräte aufrufen.</value>\n  </data>\n  <data name=\"DeleteAndStop\" xml:space=\"preserve\">\n    <value>Löschen und Anhalten</value>\n  </data>\n  <data name=\"Restart\" xml:space=\"preserve\">\n    <value>Neu Starten</value>\n  </data>\n  <data name=\"RestartBot\" xml:space=\"preserve\">\n    <value>Bot Neu Starten</value>\n  </data>\n  <data name=\"StopBot\" xml:space=\"preserve\">\n    <value>Stopp</value>\n  </data>\n  <data name=\"ClearSearchHistoryConfirmation\" xml:space=\"preserve\">\n    <value>Suchverlauf löschen?</value>\n  </data>\n  <data name=\"Recent\" xml:space=\"preserve\">\n    <value>Letzte</value>\n  </data>\n  <data name=\"NewChannel\" xml:space=\"preserve\">\n    <value>Neuer Kanal</value>\n  </data>\n  <data name=\"MessageActionBroadcastCreate\" xml:space=\"preserve\">\n    <value>{0} hat den Kanal \"{1}\" erstellt</value>\n  </data>\n  <data name=\"MessageActionChannelCreate\" xml:space=\"preserve\">\n    <value>Kanal erstellt</value>\n  </data>\n  <data name=\"ReportSpam\" xml:space=\"preserve\">\n    <value>Spam melden</value>\n  </data>\n  <data name=\"ConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Als Spam markiert. Nutzer löschen und blockieren?</value>\n  </data>\n  <data name=\"GroupConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Als Spam markiert. Gruppe löschen und verlassen?</value>\n  </data>\n  <data name=\"PeerFloodAddContact\" xml:space=\"preserve\">\n    <value>Derzeit kannst du nur Kontakte hinzufügen, die auch deine Nummer haben.</value>\n  </data>\n  <data name=\"PeerFloodSendMessage\" xml:space=\"preserve\">\n    <value>Du kannst nur Kontakten schreiben, die auch deine Nummer haben.</value>\n  </data>\n  <data name=\"LeaveChannel\" xml:space=\"preserve\">\n    <value>Kanal verlassen</value>\n  </data>\n  <data name=\"AccessLevel\" xml:space=\"preserve\">\n    <value>Zugang</value>\n  </data>\n  <data name=\"AddManager\" xml:space=\"preserve\">\n    <value>Administrator hinzufügen</value>\n  </data>\n  <data name=\"Comments\" xml:space=\"preserve\">\n    <value>Kommentare</value>\n  </data>\n  <data name=\"CommentsDescription\" xml:space=\"preserve\">\n    <value>Wenn du Kommentare aktivierst, können sich alle an der Diskussion beteiligen.</value>\n  </data>\n  <data name=\"Creator\" xml:space=\"preserve\">\n    <value>Gründer</value>\n  </data>\n  <data name=\"Management\" xml:space=\"preserve\">\n    <value>Administratoren</value>\n  </data>\n  <data name=\"Moderator\" xml:space=\"preserve\">\n    <value>Administrator</value>\n  </data>\n  <data name=\"ModeratorDescription\" xml:space=\"preserve\">\n    <value>Kann Geschriebenes im Kanal löschen.</value>\n  </data>\n  <data name=\"Publisher\" xml:space=\"preserve\">\n    <value>Administrator</value>\n  </data>\n  <data name=\"PublisherDescription\" xml:space=\"preserve\">\n    <value>Können im Kanal veröffentlichen und Beiträge löschen.</value>\n  </data>\n  <data name=\"ChannelName\" xml:space=\"preserve\">\n    <value>Kanalname</value>\n  </data>\n  <data name=\"Description\" xml:space=\"preserve\">\n    <value>Beschreibung</value>\n  </data>\n  <data name=\"AboutDescription\" xml:space=\"preserve\">\n    <value>Beschreibe deinen Kanal (optional).</value>\n  </data>\n  <data name=\"Back\" xml:space=\"preserve\">\n    <value>Zurück</value>\n  </data>\n  <data name=\"ChannelType\" xml:space=\"preserve\">\n    <value>Kanalart</value>\n  </data>\n  <data name=\"Private\" xml:space=\"preserve\">\n    <value>Private Gruppe</value>\n  </data>\n  <data name=\"PrivateChannelDescription\" xml:space=\"preserve\">\n    <value>Kann man nur per Einladungslink finden</value>\n  </data>\n  <data name=\"Public\" xml:space=\"preserve\">\n    <value>Öffentliche Gruppe</value>\n  </data>\n  <data name=\"PublicChannelDescription\" xml:space=\"preserve\">\n    <value>Kann jeder über die Suche finden</value>\n  </data>\n  <data name=\"PrivateLinkDescription\" xml:space=\"preserve\">\n    <value>Alle Telegramnutzer können mit diesem Link deinem Kanal beitreten, du kannst ihn aber jederzeit widerrufen.</value>\n  </data>\n  <data name=\"PublicLinkDescription\" xml:space=\"preserve\">\n    <value>Jeder kann diesen Link teilen und deinen Kanal in der Telegramsuche finden.</value>\n  </data>\n  <data name=\"CommentGenitivePlural\" xml:space=\"preserve\">\n    <value>Kommentare</value>\n  </data>\n  <data name=\"CommentGenitiveSingular\" xml:space=\"preserve\">\n    <value>Kommentar</value>\n  </data>\n  <data name=\"CommentNominativePlural\" xml:space=\"preserve\">\n    <value>Kommentare</value>\n  </data>\n  <data name=\"CommentNominativeSingular\" xml:space=\"preserve\">\n    <value>Kommentar</value>\n  </data>\n  <data name=\"Blacklist\" xml:space=\"preserve\">\n    <value>Sperrliste</value>\n  </data>\n  <data name=\"Channel\" xml:space=\"preserve\">\n    <value>Kanal</value>\n  </data>\n  <data name=\"ChoosePublicChannelLinkNotification\" xml:space=\"preserve\">\n    <value>Bitte wähle einen Link für deinen öffentlichen Kanal, damit andere ihn finden und weiter verbreiten können.\n\nWenn du das nicht möchtest, empfehlen wir dir einen privaten Kanal.</value>\n  </data>\n  <data name=\"MessageActionChannelEditPhoto\" xml:space=\"preserve\">\n    <value>Bild geändert</value>\n  </data>\n  <data name=\"Mute\" xml:space=\"preserve\">\n    <value>Stumm</value>\n  </data>\n  <data name=\"SetChannelPhoto\" xml:space=\"preserve\">\n    <value>Kanalbild festlegen</value>\n  </data>\n  <data name=\"Unmute\" xml:space=\"preserve\">\n    <value>Stumm aus</value>\n  </data>\n  <data name=\"WhatIsChannel\" xml:space=\"preserve\">\n    <value>Was ist ein Kanal?</value>\n  </data>\n  <data name=\"WhatIsChannelDescription\" xml:space=\"preserve\">\n    <value>In einem Kanal kannst du deine Nachrichten an ein großes Publikum schicken.</value>\n  </data>\n  <data name=\"AddEditorConfirmation\" xml:space=\"preserve\">\n    <value>Soll {0} wirklich ein Editor werden?</value>\n  </data>\n  <data name=\"AddModeratorConfirmation\" xml:space=\"preserve\">\n    <value>Soll {0} wirklich ein Administrator werden?</value>\n  </data>\n  <data name=\"PrivateChannel\" xml:space=\"preserve\">\n    <value>Privater Kanal</value>\n  </data>\n  <data name=\"PrivateToPublicChannelNotification\" xml:space=\"preserve\">\n    <value>Wenn du einen öffentlichen Link für deinen Kanal festlegst, kann ihn jeder über die Suche finden und beitreten. \n\nWenn du das nicht möchtest, erstelle besser keinen Link.</value>\n  </data>\n  <data name=\"PublicChannel\" xml:space=\"preserve\">\n    <value>Öffentlicher Kanal</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuch\" xml:space=\"preserve\">\n    <value>Du hast leider zu viele öffentliche Benutzernamen erstellt. Du kannst jederzeit den Link einer älteren Gruppe oder eines Kanals entfernen.</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuchShort\" xml:space=\"preserve\">\n    <value>Zuviele öffentliche Kanäle.</value>\n  </data>\n  <data name=\"DeleteChannelConfirmation\" xml:space=\"preserve\">\n    <value>Wenn du diesen Kanal löschst, werden alle Mitglieder und alle Nachrichten entfernt. Wirklich löschen?</value>\n  </data>\n  <data name=\"Follow\" xml:space=\"preserve\">\n    <value>Beitreten</value>\n  </data>\n  <data name=\"Join\" xml:space=\"preserve\">\n    <value>Beitreten</value>\n  </data>\n  <data name=\"LeaveChannelConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du wirklich diesen Kanal verlassen?</value>\n  </data>\n  <data name=\"JoinChannelConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du dem Kanal '{0}' beitreten?</value>\n  </data>\n  <data name=\"Administration\" xml:space=\"preserve\">\n    <value>Administratoren</value>\n  </data>\n  <data name=\"Administrators\" xml:space=\"preserve\">\n    <value>Administratoren</value>\n  </data>\n  <data name=\"DeleteChannel\" xml:space=\"preserve\">\n    <value>Kanal löschen</value>\n  </data>\n  <data name=\"MessageActionChannelDeletePhoto\" xml:space=\"preserve\">\n    <value>Bild gelöscht</value>\n  </data>\n  <data name=\"MessageActionChannelEditTitle\" xml:space=\"preserve\">\n    <value>Kanalname zu \"{0}\" geändert</value>\n  </data>\n  <data name=\"SetSharedLink\" xml:space=\"preserve\">\n    <value>Link erstellen</value>\n  </data>\n  <data name=\"AddAdministrator\" xml:space=\"preserve\">\n    <value>Administrator hinzufügen</value>\n  </data>\n  <data name=\"ChannelAdministratorsHint\" xml:space=\"preserve\">\n    <value>Administratoren helfen dir, deinen Kanal zu verwalten. Tippen und halten um sie zu löschen.</value>\n  </data>\n  <data name=\"ChannelMembersHint\" xml:space=\"preserve\">\n    <value>Nur Administratoren sehen diese Liste.</value>\n  </data>\n  <data name=\"InviteViaLink\" xml:space=\"preserve\">\n    <value>Per Link einladen</value>\n  </data>\n  <data name=\"AddUserAsAdministrator\" xml:space=\"preserve\">\n    <value>Soll {0} wirklich ein Administrator werden?</value>\n  </data>\n  <data name=\"ChannelIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Dieser Kanal ist nicht mehr zugänglich.</value>\n  </data>\n  <data name=\"InviteContactConfirmation\" xml:space=\"preserve\">\n    <value>{0} ist noch nicht im Kanal. Willst du diesen Nutzer einladen?</value>\n  </data>\n  <data name=\"PostToChannelError\" xml:space=\"preserve\">\n    <value>Du darfst in diesem Kanal nichts schreiben.</value>\n  </data>\n  <data name=\"SearchSharedMusic\" xml:space=\"preserve\">\n    <value>Geteilte Musik durchsuchen</value>\n  </data>\n  <data name=\"SharedMusic\" xml:space=\"preserve\">\n    <value>Musik</value>\n  </data>\n  <data name=\"ShareMusic\" xml:space=\"preserve\">\n    <value>Alle geteilten Lieder findest du hier.</value>\n  </data>\n  <data name=\"AdminsDescription\" xml:space=\"preserve\">\n    <value>Admins können neue neue Leute hinzufügen und entfernen, den Gruppennamen und das Bild ändern</value>\n  </data>\n  <data name=\"AllMembersAreAdmins\" xml:space=\"preserve\">\n    <value>Alle Mitglieder sind Admins</value>\n  </data>\n  <data name=\"MembersDescription\" xml:space=\"preserve\">\n    <value>Gruppenmitglieder können neue Leute hinzufügen sowie den Gruppennamen und das Bild ändern</value>\n  </data>\n  <data name=\"SetAdmins\" xml:space=\"preserve\">\n    <value>Admins festlegen</value>\n  </data>\n  <data name=\"UpgradeToSupergroup\" xml:space=\"preserve\">\n    <value>In Supergruppe ändern</value>\n  </data>\n  <data name=\"UpgradeToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Gruppenmitglieder müssen ihre Telegram-App aktualisieren um diese Supergruppe benutzen zu können. Gruppe wirklich in eine Supergruppe ändern?</value>\n  </data>\n  <data name=\"UpgradeToSupergroupDescription\" xml:space=\"preserve\">\n    <value>Gruppenlimit erreicht.\nFür weitere Funktionen und um das Limit aufzuheben in Supergruppe ändern:\n• Bis zu {0} sind nun möglich\n• Neue Mitglieder sehen gesamten Verlauf\n• Mitteilungen sind standardmäßig stumm\n• Admins können alle Nachrichten löschen</value>\n  </data>\n  <data name=\"MessageActionChannelMigrateFrom\" xml:space=\"preserve\">\n    <value>Gruppe wurde in eine Supergruppe geändert</value>\n  </data>\n  <data name=\"MessageActionChatActivate\" xml:space=\"preserve\">\n    <value>Chat wurde aktiviert</value>\n  </data>\n  <data name=\"MessageActionChatDeactivate\" xml:space=\"preserve\">\n    <value>Chat wurde deaktiviert</value>\n  </data>\n  <data name=\"MessageActionChatMigrateTo\" xml:space=\"preserve\">\n    <value>Chat in Kanal \"{0} geändert</value>\n  </data>\n  <data name=\"DeleteGroup\" xml:space=\"preserve\">\n    <value>Gruppe löschen</value>\n  </data>\n  <data name=\"LeaveGroup\" xml:space=\"preserve\">\n    <value>Gruppe verlassen</value>\n  </data>\n  <data name=\"LeaveGroupConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du wirklich diese Gruppe verlassen?</value>\n  </data>\n  <data name=\"AdminsTooMuch\" xml:space=\"preserve\">\n    <value>Es gibt bereits zu viele Administratoren.</value>\n  </data>\n  <data name=\"BlockedUsersDescription\" xml:space=\"preserve\">\n    <value>Blockierte Nutzer können nur durch Admins erneut hinzugefügt werden. Einladungslinks funktionieren nicht.</value>\n  </data>\n  <data name=\"BotsTooMuch\" xml:space=\"preserve\">\n    <value>Es gibt bereits zu viele Bots.</value>\n  </data>\n  <data name=\"DeleteGroupConfirmation\" xml:space=\"preserve\">\n    <value>Wenn du diese Gruppe löschst, werden alle Mitglieder und alle Nachrichten entfernt. Wirklich löschen?</value>\n  </data>\n  <data name=\"GroupAdministratorsHint\" xml:space=\"preserve\">\n    <value>Administratoren helfen dir, deinen Kanal zu verwalten. Tippen und halten um sie zu löschen.</value>\n  </data>\n  <data name=\"GroupNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Diese Gruppe ist nicht mehr zugänglich.</value>\n  </data>\n  <data name=\"InviteUserBackError\" xml:space=\"preserve\">\n    <value>Dieser Nutzer hat die Gruppe verlassen, deshalb kannst du ihn nicht wieder einladen.</value>\n  </data>\n  <data name=\"MessageActionChatAddSelf\" xml:space=\"preserve\">\n    <value>{0} ist in die Gruppe zurückgekehrt</value>\n  </data>\n  <data name=\"PromoteToAdmin\" xml:space=\"preserve\">\n    <value>Zum Admin machen</value>\n  </data>\n  <data name=\"UserNotMutualContact\" xml:space=\"preserve\">\n    <value>Du kannst diesen Nutzer nicht hinzufügen.</value>\n  </data>\n  <data name=\"UsersTooMuch\" xml:space=\"preserve\">\n    <value>Leider ist diese Gruppe schon voll.</value>\n  </data>\n  <data name=\"GroupIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Diese Gruppe ist nicht mehr zugänglich.</value>\n  </data>\n  <data name=\"InviteContactToGroupConfirmation\" xml:space=\"preserve\">\n    <value>{0} ist noch nicht in der Gruppe. Willst du diesen Nutzer einladen?</value>\n  </data>\n  <data name=\"OpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>URL {0} öffnen?</value>\n  </data>\n  <data name=\"ServiceNotifications\" xml:space=\"preserve\">\n    <value>Servicemeldungen</value>\n  </data>\n  <data name=\"AutomaticAudioDownload\" xml:space=\"preserve\">\n    <value>Audio Auto-Download</value>\n  </data>\n  <data name=\"AutomaticPhotoDownload\" xml:space=\"preserve\">\n    <value>Bild Auto-Download</value>\n  </data>\n  <data name=\"CacheSettings\" xml:space=\"preserve\">\n    <value>Cache-Einstellungen</value>\n  </data>\n  <data name=\"ChatSettings\" xml:space=\"preserve\">\n    <value>Chat-Einstellungen</value>\n  </data>\n  <data name=\"ClearChannelConfirmation\" xml:space=\"preserve\">\n    <value>Cache des Kanals wirklich löschen?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseConfirmation\" xml:space=\"preserve\">\n    <value>Textnachrichten-Cache leeren?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseDescription\" xml:space=\"preserve\">\n    <value>Zwischengespeicherte Textnachrichten werden entfernt und die Datenbank optimiert um Speicherplatz zurückzuerhalten. Auf Null lässt sich die Größe jedoch nicht reduzieren, da die App einige Daten für den laufenden Betrieb benötigt.\n\nHinweis: Der Vorgang kann mehrere Minuten dauern.</value>\n  </data>\n  <data name=\"ClearSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Cache der Supergruppe wirklich löschen?</value>\n  </data>\n  <data name=\"Documents\" xml:space=\"preserve\">\n    <value>Dateien</value>\n  </data>\n  <data name=\"Forever\" xml:space=\"preserve\">\n    <value>Dauerhaft</value>\n  </data>\n  <data name=\"Groups\" xml:space=\"preserve\">\n    <value>Gruppen</value>\n  </data>\n  <data name=\"KeepMedia\" xml:space=\"preserve\">\n    <value>Medien behalten</value>\n  </data>\n  <data name=\"KeepMediaDescription\" xml:space=\"preserve\">\n    <value>Bilder, Videos und andere Dateien, auf die du während dieser Zeit nicht zugegriffen hast, werden von diesem Gerät gelöscht, um Speicherplatz zu sparen.\n\nAlle Medien bleiben in der Telegram Cloud gespeichert und können jederzeit wieder heruntergeladen werden.</value>\n  </data>\n  <data name=\"Music\" xml:space=\"preserve\">\n    <value>Musik</value>\n  </data>\n  <data name=\"Other\" xml:space=\"preserve\">\n    <value>Sonstiges</value>\n  </data>\n  <data name=\"OtherFiles\" xml:space=\"preserve\">\n    <value>Sonstige Dateien</value>\n  </data>\n  <data name=\"Photos\" xml:space=\"preserve\">\n    <value>Bilder</value>\n  </data>\n  <data name=\"PrivateChats\" xml:space=\"preserve\">\n    <value>Private Chats</value>\n  </data>\n  <data name=\"Videos\" xml:space=\"preserve\">\n    <value>Videos</value>\n  </data>\n  <data name=\"VoiceMessages\" xml:space=\"preserve\">\n    <value>Sprachnachrichten</value>\n  </data>\n  <data name=\"LocalDatabase\" xml:space=\"preserve\">\n    <value>Lokale Datenbank</value>\n  </data>\n  <data name=\"AutomaticGifDownload\" xml:space=\"preserve\">\n    <value>GIF Auto-Download</value>\n  </data>\n  <data name=\"ForwardedGifGenitivePlural\" xml:space=\"preserve\">\n    <value>GIF-Anhänge</value>\n  </data>\n  <data name=\"ForwardedGifGenitiveSingular\" xml:space=\"preserve\">\n    <value>GIF-Anhang</value>\n  </data>\n  <data name=\"ForwardedGifNominativePlural\" xml:space=\"preserve\">\n    <value>GIF-Anhänge</value>\n  </data>\n  <data name=\"ForwardedGifNominativeSingular\" xml:space=\"preserve\">\n    <value>GIF-Anhang</value>\n  </data>\n  <data name=\"Gif\" xml:space=\"preserve\">\n    <value>GIF</value>\n  </data>\n  <data name=\"AutoplayGifs\" xml:space=\"preserve\">\n    <value>GIFs autom. Abspielen</value>\n  </data>\n  <data name=\"Via\" xml:space=\"preserve\">\n    <value>Via {0}</value>\n  </data>\n  <data name=\"AddNewMembers\" xml:space=\"preserve\">\n    <value>Wer kann Mitglieder einladen?</value>\n  </data>\n  <data name=\"AllMembers\" xml:space=\"preserve\">\n    <value>Alle Mitglieder</value>\n  </data>\n  <data name=\"AlwaysAllow\" xml:space=\"preserve\">\n    <value>Immer erlauben</value>\n  </data>\n  <data name=\"GroupsDescription\" xml:space=\"preserve\">\n    <value>Ändere, wer dich in Gruppen und Kanäle einladen kann</value>\n  </data>\n  <data name=\"GroupsImportantNote\" xml:space=\"preserve\">\n    <value>Du kannst bestimmen, wer dich in Gruppen oder Kanäle einladen darf.</value>\n  </data>\n  <data name=\"GroupsSettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Hier kannst du Nutzer hinzufügen, für die eine Ausnahme gemacht werden soll.</value>\n  </data>\n  <data name=\"GroupsShort\" xml:space=\"preserve\">\n    <value>Gruppen und Kanäle</value>\n  </data>\n  <data name=\"NeverAllow\" xml:space=\"preserve\">\n    <value>Niemals erlauben</value>\n  </data>\n  <data name=\"OnlyAdmins\" xml:space=\"preserve\">\n    <value>Nur Admins</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Weitergeleitete Sprachnachricht</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Weitergeleitete Sprachnachricht</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Weitergeleitete Sprachnachricht</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Weitergeleitete Sprachnachricht</value>\n  </data>\n  <data name=\"RecordingVoiceMessage\" xml:space=\"preserve\">\n    <value>Nimmt etwas auf</value>\n  </data>\n  <data name=\"VoiceMessage\" xml:space=\"preserve\">\n    <value>Sprachnachricht</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription1\" xml:space=\"preserve\">\n    <value>Bild und Text zeigen den aktuellen Schlüssel dieses geheimen Chats mit {0}.</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription2\" xml:space=\"preserve\">\n    <value>Sehen sie auf dem Gerät von {0} genau so aus, ist eure Sicherheit garantiert.</value>\n  </data>\n  <data name=\"InlineBotsNotification\" xml:space=\"preserve\">\n    <value>Inline Bots werden von Drittentwicklern erstellt. Symbole, die du nach dem Botnamen eingibst, werden an den jeweiligen Entwickler geschickt, damit der Bot funktioniert.</value>\n  </data>\n  <data name=\"LinkPreviews\" xml:space=\"preserve\">\n    <value>Linkvorschau</value>\n  </data>\n  <data name=\"LInkPreviewsNotification\" xml:space=\"preserve\">\n    <value>Möchtest du die erweitere Linkvorschau in Geheimen Chats aktivieren? Die Vorschau wird auf den Telegram Servern generiert.</value>\n  </data>\n  <data name=\"ViewStickers\" xml:space=\"preserve\">\n    <value>Sticker anzeigen</value>\n  </data>\n  <data name=\"NotifyMembers\" xml:space=\"preserve\">\n    <value>Mitglieder benachrichtigen</value>\n  </data>\n  <data name=\"NotifyMembersDescription\" xml:space=\"preserve\">\n    <value>Zeigt für neue Nachrichten an, welcher Admin die Nachricht gesendet hat.</value>\n  </data>\n  <data name=\"SignMessages\" xml:space=\"preserve\">\n    <value>Nachrichten unterschreiben</value>\n  </data>\n  <data name=\"SignMessagesDescription\" xml:space=\"preserve\">\n    <value>Zeigt an, wer die Nachricht gesendet hat.</value>\n  </data>\n  <data name=\"ChannelNameDescription\" xml:space=\"preserve\">\n    <value>Du kannst einen Kanalnamen bei Telegram wählen, wenn du willst, dass dieser von anderen gefunden wird. \n\nErlaubt sind a-z, 0-9 und Unterstriche. Die Mindestlänge beträgt 5 Zeichen.</value>\n  </data>\n  <data name=\"ChannelNameDescription2\" xml:space=\"preserve\">\n    <value>Dieser Link öffnet deinen Kanal in Telegram:</value>\n  </data>\n  <data name=\"SupergroupNameDescription\" xml:space=\"preserve\">\n    <value>Du kannst einen Supergruppennamen bei Telegram wählen, wenn du willst, dass dieser von anderen gefunden wird. \n\nErlaubt sind a-z, 0-9 und Unterstriche. Die Mindestlänge beträgt 5 Zeichen.</value>\n  </data>\n  <data name=\"SupergroupNameDescription2\" xml:space=\"preserve\">\n    <value>Dieser Link öffnet deine Supergruppe in Telegram:</value>\n  </data>\n  <data name=\"SupergroupName\" xml:space=\"preserve\">\n    <value>Name der Supergruppe</value>\n  </data>\n  <data name=\"ChannelNameInvalid\" xml:space=\"preserve\">\n    <value>Der Name ist ungültig.</value>\n  </data>\n  <data name=\"ChannelNameOccupied\" xml:space=\"preserve\">\n    <value>Leider ist der Name schon belegt.</value>\n  </data>\n  <data name=\"ChannelNameShort\" xml:space=\"preserve\">\n    <value>Kanalnamen benötigen mindestens 5 Zeichen.</value>\n  </data>\n  <data name=\"ChannelNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Kanalnamen dürfen nicht mit einer Zahl anfangen.</value>\n  </data>\n  <data name=\"NameChecking\" xml:space=\"preserve\">\n    <value>Überprüfe Namen...</value>\n  </data>\n  <data name=\"NameIsAvailable\" xml:space=\"preserve\">\n    <value>{0} ist verfügbar.</value>\n  </data>\n  <data name=\"SupergroupNameInvalid\" xml:space=\"preserve\">\n    <value>Der Name ist ungültig.</value>\n  </data>\n  <data name=\"SupergroupNameOccupied\" xml:space=\"preserve\">\n    <value>Leider ist der Name schon belegt.</value>\n  </data>\n  <data name=\"SupergroupNameShort\" xml:space=\"preserve\">\n    <value>Supergruppen benötigen mindestens 5 Zeichen.</value>\n  </data>\n  <data name=\"SupergroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Supergruppen dürfen nicht mit einer Zahl anfangen.</value>\n  </data>\n  <data name=\"EditMessageError\" xml:space=\"preserve\">\n    <value>Du kannst diese Nachricht nicht bearbeiten.</value>\n  </data>\n  <data name=\"MuteChannelPostHint\" xml:space=\"preserve\">\n    <value>Mitglieder werden nicht benachrichtigt</value>\n  </data>\n  <data name=\"UnmuteChannelPostHint\" xml:space=\"preserve\">\n    <value>Mitglieder werden benachrichtigt</value>\n  </data>\n  <data name=\"PinMessage\" xml:space=\"preserve\">\n    <value>Anheften</value>\n  </data>\n  <data name=\"UnpinMessage\" xml:space=\"preserve\">\n    <value>Entfernen</value>\n  </data>\n  <data name=\"UnpinMessageConfirmation\" xml:space=\"preserve\">\n    <value>Angeheftete Nachricht wieder entfernen?</value>\n  </data>\n  <data name=\"ConvertToSupergroup\" xml:space=\"preserve\">\n    <value>In Supergruppe ändern</value>\n  </data>\n  <data name=\"ConvertToSupergroupNote\" xml:space=\"preserve\">\n    <value>**Wichtig**: Die Änderung kann nicht rückgängig gemacht werden.</value>\n  </data>\n  <data name=\"Supergroup\" xml:space=\"preserve\">\n    <value>Supergruppe</value>\n  </data>\n  <data name=\"ConvertToSupergroupDescription\" xml:space=\"preserve\">\n    <value>**In Supergruppen**:\n• Neue Mitglieder sehen gesamten Verlauf\n• Nachrichten sind bei allen löschbar\n• Admins können Nachrichten anheften\n• Gründer kann Gruppe öffentlich machen</value>\n  </data>\n  <data name=\"BanUser\" xml:space=\"preserve\">\n    <value>Nutzer sperren</value>\n  </data>\n  <data name=\"DeleteAllFrom\" xml:space=\"preserve\">\n    <value>Lösche alles von {0}</value>\n  </data>\n  <data name=\"DeleteMessageConfirmation\" xml:space=\"preserve\">\n    <value>Willst du diese Nachricht wirklich löschen?</value>\n  </data>\n  <data name=\"DeleteMessages\" xml:space=\"preserve\">\n    <value>Nachrichten löschen</value>\n  </data>\n  <data name=\"MessageActionPinMessage\" xml:space=\"preserve\">\n    <value>{0} hat eine Nachricht angeheftet</value>\n  </data>\n  <data name=\"MessageActionPinContact\" xml:space=\"preserve\">\n    <value>{0} hat einen Kontakt angeheftet</value>\n  </data>\n  <data name=\"MessageActionPinFile\" xml:space=\"preserve\">\n    <value>{0} hat eine Datei angeheftet</value>\n  </data>\n  <data name=\"MessageActionPinGif\" xml:space=\"preserve\">\n    <value>{0} hat ein GIF angeheftet</value>\n  </data>\n  <data name=\"MessageActionPinMap\" xml:space=\"preserve\">\n    <value>{0} hat einen Standort angeheftet</value>\n  </data>\n  <data name=\"MessageActionPinPhoto\" xml:space=\"preserve\">\n    <value>{0} hat ein Bild angeheftet</value>\n  </data>\n  <data name=\"MessageActionPinSticker\" xml:space=\"preserve\">\n    <value>{0} hat einen Sticker angeheftet</value>\n  </data>\n  <data name=\"MessageActionPinText\" xml:space=\"preserve\">\n    <value>{0} hat \"{1}\" angeheftet</value>\n  </data>\n  <data name=\"MessageActionPinTrack\" xml:space=\"preserve\">\n    <value>{0} hat ein Musikstück angeheftet</value>\n  </data>\n  <data name=\"MessageActionPinVideo\" xml:space=\"preserve\">\n    <value>{0} hat ein Video angeheftet</value>\n  </data>\n  <data name=\"MessageActionPinVoiceMessage\" xml:space=\"preserve\">\n    <value>{0} hat eine Sprachnachricht angeheftet</value>\n  </data>\n  <data name=\"PinnedMessage\" xml:space=\"preserve\">\n    <value>Hat Nachricht angeheftet</value>\n  </data>\n  <data name=\"ConvertToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Du kannst die Supergruppe nicht mehr in eine normale Gruppe ändern.</value>\n  </data>\n  <data name=\"NotifyAllMembers\" xml:space=\"preserve\">\n    <value>Mitglieder benachrichtigen</value>\n  </data>\n  <data name=\"PinMessageConfirmation\" xml:space=\"preserve\">\n    <value>Diese Nachricht in der Gruppe wirklich anheften?</value>\n  </data>\n  <data name=\"ChatMaxSizeNotification\" xml:space=\"preserve\">\n    <value>Sobald du diese Gruppe zu einer Supergruppe erweitert hast, kannst du mehr Nutzer einladen.</value>\n  </data>\n  <data name=\"Admin\" xml:space=\"preserve\">\n    <value>Admin</value>\n  </data>\n  <data name=\"ChoosePublicGroupLinkNotification\" xml:space=\"preserve\">\n    <value>Bitte wähle einen Link für deine öffentlichen Gruppe, damit andere ihn finden und weiter verbreiten können.</value>\n  </data>\n  <data name=\"GroupType\" xml:space=\"preserve\">\n    <value>Gruppenart</value>\n  </data>\n  <data name=\"PrivateGroupDescription\" xml:space=\"preserve\">\n    <value>Private Gruppen können nur durch direkte Einladungen oder einen Einladungslink betreten werden.</value>\n  </data>\n  <data name=\"PrivateGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Alle können mit diesem Link deiner Gruppe beitreten, du kannst ihn aber jederzeit widerrufen.</value>\n  </data>\n  <data name=\"PublicGroupDescription\" xml:space=\"preserve\">\n    <value>Öffentliche Gruppen kann jeder über die Suche finden, gesamter Chatverlauf ist für alle einsehbar und jeder kann der Gruppe beitreten.</value>\n  </data>\n  <data name=\"PublicGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Jeder kann diesen Link teilen und deine Gruppe in der Telegramsuche finden.</value>\n  </data>\n  <data name=\"Camera\" xml:space=\"preserve\">\n    <value>Kamera</value>\n  </data>\n  <data name=\"Pornography\" xml:space=\"preserve\">\n    <value>Pornografie</value>\n  </data>\n  <data name=\"Report\" xml:space=\"preserve\">\n    <value>Melden</value>\n  </data>\n  <data name=\"ReportSpamNotification\" xml:space=\"preserve\">\n    <value>Vielen Dank!\nUnser Team wird deine Meldung bald prüfen.</value>\n  </data>\n  <data name=\"Spam\" xml:space=\"preserve\">\n    <value>Spam</value>\n  </data>\n  <data name=\"Violence\" xml:space=\"preserve\">\n    <value>Gewalt</value>\n  </data>\n  <data name=\"ClearHistoryConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du wirklich den Verlauf löschen?</value>\n  </data>\n  <data name=\"DeleteAndExitConfirmation\" xml:space=\"preserve\">\n    <value>Diese Gruppe wirklich löschen und verlassen?</value>\n  </data>\n  <data name=\"DeleteChat\" xml:space=\"preserve\">\n    <value>Chat löschen</value>\n  </data>\n  <data name=\"MessageActionChatJoin\" xml:space=\"preserve\">\n    <value>{0} ist der Gruppe beigetreten</value>\n  </data>\n  <data name=\"MessageActionChatJoinSelf\" xml:space=\"preserve\">\n    <value>Du bist der Gruppe beigetreten</value>\n  </data>\n  <data name=\"MessageActionLeftGroupSelf\" xml:space=\"preserve\">\n    <value>Du hast die Gruppe verlassen</value>\n  </data>\n  <data name=\"CodeSentToTelegramApp\" xml:space=\"preserve\">\n    <value>Code wurde dir per **Telegram** an deine aktive App geschickt.</value>\n  </data>\n  <data name=\"CodeSentViaCallingPhone\" xml:space=\"preserve\">\n    <value>Wir rufen **{0}** an, um dir einen Code zu diktieren.</value>\n  </data>\n  <data name=\"DidNotGetCode\" xml:space=\"preserve\">\n    <value>Code nicht erhalten?</value>\n  </data>\n  <data name=\"HaveNotReceivedCode\" xml:space=\"preserve\">\n    <value>Code nicht erhalten?</value>\n  </data>\n  <data name=\"ShareLocationConfirmation\" xml:space=\"preserve\">\n    <value>Teilt deinen aktuellen Standort mit dem Bot.</value>\n  </data>\n  <data name=\"SharePhoneNumberConfirmation\" xml:space=\"preserve\">\n    <value>Der Bot wird deine Nummer sehen. Das kann für verschiedene Dienste nützlich sein.</value>\n  </data>\n  <data name=\"ChooseManually\" xml:space=\"preserve\">\n    <value>Selbst wählen</value>\n  </data>\n  <data name=\"ShareLocationCaption\" xml:space=\"preserve\">\n    <value>Deinen Standort teilen?</value>\n  </data>\n  <data name=\"SharePhoneNumberCaption\" xml:space=\"preserve\">\n    <value>Deine Telefonnummer teilen?</value>\n  </data>\n  <data name=\"UnableToDetermineLocation\" xml:space=\"preserve\">\n    <value>App kann deinen aktuellen Standort nicht bestimmen.</value>\n  </data>\n  <data name=\"ShareLocationInlineConfirmation\" xml:space=\"preserve\">\n    <value>Dieser Bot möchte bei jeder Anfrage deinen Standort wissen. Das kann für standortabhängig aufbereitete Informationen benutzt werden.</value>\n  </data>\n  <data name=\"MoreInfo\" xml:space=\"preserve\">\n    <value>Mehr Infos </value>\n  </data>\n  <data name=\"RemoveStickers\" xml:space=\"preserve\">\n    <value>Entfernen</value>\n  </data>\n  <data name=\"SendSticker\" xml:space=\"preserve\">\n    <value>Sticker senden</value>\n  </data>\n  <data name=\"StickersRemoved\" xml:space=\"preserve\">\n    <value>Sticker entfernt</value>\n  </data>\n  <data name=\"UnpinFromStart\" xml:space=\"preserve\">\n    <value>Von Start loslösen</value>\n  </data>\n  <data name=\"Bots\" xml:space=\"preserve\">\n    <value>Bots</value>\n  </data>\n  <data name=\"LastSeenYesterdayAt\" xml:space=\"preserve\">\n    <value>Zul. online gestern um {0}</value>\n  </data>\n  <data name=\"Clear\" xml:space=\"preserve\">\n    <value>Leeren</value>\n  </data>\n  <data name=\"Edited\" xml:space=\"preserve\">\n    <value>Bearbeitet</value>\n  </data>\n  <data name=\"EditMessage\" xml:space=\"preserve\">\n    <value>Nachricht bearbeiten</value>\n  </data>\n  <data name=\"LastSeenTodayAt\" xml:space=\"preserve\">\n    <value>zul. online heute um {0}</value>\n  </data>\n  <data name=\"OpenInlineBotsHint\" xml:space=\"preserve\">\n    <value>Hochwischen für Inline-Bots</value>\n  </data>\n  <data name=\"ConfirmResetTopPeerRating\" xml:space=\"preserve\">\n    <value>Lösche {0} aus Vorschlägen?</value>\n  </data>\n  <data name=\"Draft\" xml:space=\"preserve\">\n    <value>Entwurf</value>\n  </data>\n  <data name=\"FeaturedStickers\" xml:space=\"preserve\">\n    <value>Angesagte Sticker</value>\n  </data>\n  <data name=\"StickersHint\" xml:space=\"preserve\">\n    <value>Künstler können eigene Sticker-Pakete über unseren Sticker Bot __@stickers__  einstellen.\n\nNutzer fügen Sticker durch Antippen eines Stickers und dann \"Sticker hinzufügen\" hinzu.</value>\n  </data>\n  <data name=\"ClearRecentStickers\" xml:space=\"preserve\">\n    <value>Zuletzt benutzte Emoji leeren</value>\n  </data>\n  <data name=\"NewFeaturedStickers\" xml:space=\"preserve\">\n    <value>{0} neu</value>\n  </data>\n  <data name=\"InstallStickersetError\" xml:space=\"preserve\">\n    <value>Leider hast du die maximale Anzahl an Stickerpaketen erreicht.</value>\n  </data>\n  <data name=\"ChatInviteSubtitle\" xml:space=\"preserve\">\n    <value>{0}, darunter:</value>\n  </data>\n  <data name=\"InstalledStickers\" xml:space=\"preserve\">\n    <value>Installierte Sticker</value>\n  </data>\n  <data name=\"ShowStickersTab\" xml:space=\"preserve\">\n    <value>Sticker Tab anzeigen</value>\n  </data>\n  <data name=\"ShowStickersTabHint\" xml:space=\"preserve\">\n    <value>Ein Sticker-Symbol erscheint im Eingabefeld.</value>\n  </data>\n  <data name=\"ArchivedStickers\" xml:space=\"preserve\">\n    <value>Archivierte Sticker</value>\n  </data>\n  <data name=\"ArchivedStickersAbout\" xml:space=\"preserve\">\n    <value>Einige deiner Sticker wurden archiviert. Du kannst sie in den Sticker-Einstellungen erneut hinzufügen.</value>\n  </data>\n  <data name=\"ArchivedStickersHeader\" xml:space=\"preserve\">\n    <value>Bis zu 200 Sticker-Pakete kannst du installieren. Alle folgenden werden archiviert.</value>\n  </data>\n  <data name=\"NoSetsHere\" xml:space=\"preserve\">\n    <value>Noch keine Pakete</value>\n  </data>\n  <data name=\"NoSets\" xml:space=\"preserve\">\n    <value>Keine Pakete</value>\n  </data>\n  <data name=\"SetGenitivePlural\" xml:space=\"preserve\">\n    <value>Pakete</value>\n  </data>\n  <data name=\"SetGenitiveSingular\" xml:space=\"preserve\">\n    <value>Paket</value>\n  </data>\n  <data name=\"SetNominativePlural\" xml:space=\"preserve\">\n    <value>Pakete</value>\n  </data>\n  <data name=\"SetNominativeSingular\" xml:space=\"preserve\">\n    <value>Paket</value>\n  </data>\n  <data name=\"ChatWithYourself\" xml:space=\"preserve\">\n    <value>chatte mit dir selbst</value>\n  </data>\n  <data name=\"CloudStorageDescription\" xml:space=\"preserve\">\n    <value>• Speichere deine Lieblings-Chats\n• Sende Dateien jeglicher Art\n• Synchronisiert auf allen Geräten\n• Cloud-basierte Suchfunktion</value>\n  </data>\n  <data name=\"CloudStorage\" xml:space=\"preserve\">\n    <value>Dein Cloud-Speicher</value>\n  </data>\n  <data name=\"CancelAccountReset\" xml:space=\"preserve\">\n    <value>Zurücksetzung abbrechen</value>\n  </data>\n  <data name=\"CancelAccountResetDescription\" xml:space=\"preserve\">\n    <value>Jemand mit Zugang zu deiner Telefonnummer **{0}** hat die Kontolöschung und Zurücksetzung der zweistufige Bestätigung beantragt. Wenn du das nicht selbst gewesen bist, tippe den Code der SMS ein, den wir dir gerade an **{0}** gesendet haben.</value>\n  </data>\n  <data name=\"CancelAccountResetSuccess\" xml:space=\"preserve\">\n    <value>Löschvorgang für dein Konto {0} wurde abgebrochen. Du kannst das Fenster nun schließen.</value>\n  </data>\n  <data name=\"Reset\" xml:space=\"preserve\">\n    <value>Zurücksetzen</value>\n  </data>\n  <data name=\"ResetAccount\" xml:space=\"preserve\">\n    <value>Konto zurücksetzen</value>\n  </data>\n  <data name=\"ResetAccountDescription\" xml:space=\"preserve\">\n    <value>Da dein Konto **{0}** aktiv und durch ein Kennwort geschützt ist, löschen wir es aus Sicherheitsgründen in einer Woche.\n\nDu kannst den Vorgang jederzeit abbrechen.</value>\n  </data>\n  <data name=\"ResetAccountError\" xml:space=\"preserve\">\n    <value>Deine vorherigen Versuche das Konto zurückzusetzen wurden durch den aktiven Nutzer abgebrochen. Bitte in 7 Tagen erneut probieren.</value>\n  </data>\n  <data name=\"ResetAccountIn\" xml:space=\"preserve\">\n    <value>Du kann dein Konto zurücksetzen in:</value>\n  </data>\n  <data name=\"Archive\" xml:space=\"preserve\">\n    <value>Archivieren</value>\n  </data>\n  <data name=\"BotOpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>Der Bot {0} möchte deinen Anzeigenamen und dein Profilbild an den Eigentümer von {1} senden.</value>\n  </data>\n  <data name=\"IsRecordingVideo\" xml:space=\"preserve\">\n    <value>nimmt Video auf</value>\n  </data>\n  <data name=\"IsSendingAudio\" xml:space=\"preserve\">\n    <value>schickt Audio</value>\n  </data>\n  <data name=\"RecordingVideo\" xml:space=\"preserve\">\n    <value>nimmt Video auf</value>\n  </data>\n  <data name=\"SendingAudio\" xml:space=\"preserve\">\n    <value>schickt Audio</value>\n  </data>\n  <data name=\"Revoke\" xml:space=\"preserve\">\n    <value>Widerrufen</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation2\" xml:space=\"preserve\">\n    <value>Bist du sicher, dass du den Link **{0}** widerrufen willst?\n\nDie Gruppe **\"{1}\"** wird dann privat.</value>\n  </data>\n  <data name=\"AddBotToTheGroup\" xml:space=\"preserve\">\n    <value>Bot zu \"{0}\" hinzufügen?</value>\n  </data>\n  <data name=\"YourScored\" xml:space=\"preserve\">\n    <value>Du hast {0} Punkt erzielt</value>\n  </data>\n  <data name=\"ShareWith\" xml:space=\"preserve\">\n    <value>Mit {0} teilen?</value>\n  </data>\n  <data name=\"YourScoredAtGame\" xml:space=\"preserve\">\n    <value>Du hast {0} Punkt bei {1} erzielt</value>\n  </data>\n  <data name=\"MuteAudio\" xml:space=\"preserve\">\n    <value>Stumm</value>\n  </data>\n  <data name=\"OpenWebPagesViaBotConfirmation\" xml:space=\"preserve\">\n    <value>Darf {0} deinen Anzeigenamen und deine id (nicht deine Telefonnummer) mit Internetseiten teilen, die du mit diesem Bot öffnest?</value>\n  </data>\n  <data name=\"UserScored\" xml:space=\"preserve\">\n    <value>{0} erzielte {1} Punkt</value>\n  </data>\n  <data name=\"UserScoredAtGame\" xml:space=\"preserve\">\n    <value>{0} erzielte {1} Punkt bei {2}</value>\n  </data>\n  <data name=\"UserScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>{0} erzielte {1} Punkte bei {2}</value>\n  </data>\n  <data name=\"UserScoredPlural\" xml:space=\"preserve\">\n    <value>{0} erzielte {1} Punkte</value>\n  </data>\n  <data name=\"YourScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>Du hast {0} Punkte bei {1} erzielt</value>\n  </data>\n  <data name=\"YourScoredPlural\" xml:space=\"preserve\">\n    <value>Du hast {0} Punkte erzielt</value>\n  </data>\n  <data name=\"ForwardedGameGenitivePlural\" xml:space=\"preserve\">\n    <value>Weitergeleitete Spiele</value>\n  </data>\n  <data name=\"ForwardedGameGenitiveSingular\" xml:space=\"preserve\">\n    <value>Weitergeleitetes Spiel</value>\n  </data>\n  <data name=\"ForwardedGameNominativePlural\" xml:space=\"preserve\">\n    <value>Weitergeleitete Spiele</value>\n  </data>\n  <data name=\"ForwardedGameNominativeSingular\" xml:space=\"preserve\">\n    <value>Weitergeleitetes Spiel</value>\n  </data>\n  <data name=\"Game\" xml:space=\"preserve\">\n    <value>Spiel</value>\n  </data>\n  <data name=\"MessageActionPinGame\" xml:space=\"preserve\">\n    <value>{0} hat ein Spiel angeheftet</value>\n  </data>\n  <data name=\"ShareGameWith\" xml:space=\"preserve\">\n    <value>Das Spiel mit {0} teilen?</value>\n  </data>\n  <data name=\"IsPlayingGame\" xml:space=\"preserve\">\n    <value>Spielt ein Spiel</value>\n  </data>\n  <data name=\"PlayingGame\" xml:space=\"preserve\">\n    <value>Spielt ein Spiel</value>\n  </data>\n  <data name=\"YourCloudStorage\" xml:space=\"preserve\">\n    <value>Dein Cloud-Speicher</value>\n  </data>\n  <data name=\"Masks\" xml:space=\"preserve\">\n    <value>Masken</value>\n  </data>\n  <data name=\"MasksHint\" xml:space=\"preserve\">\n    <value>Masken lassen sich Bildern hinzufügen. Öffne dazu vor dem Versand einfach den Editor.</value>\n  </data>\n  <data name=\"GroupsInCommon\" xml:space=\"preserve\">\n    <value>Gemeinsame Gruppen</value>\n  </data>\n  <data name=\"GroupGenitivePlural\" xml:space=\"preserve\">\n    <value>Gruppen</value>\n  </data>\n  <data name=\"GroupGenitiveSingular\" xml:space=\"preserve\">\n    <value>Gruppe</value>\n  </data>\n  <data name=\"GroupNominativePlural\" xml:space=\"preserve\">\n    <value>Gruppen</value>\n  </data>\n  <data name=\"GroupNominativeSingular\" xml:space=\"preserve\">\n    <value>Gruppe</value>\n  </data>\n  <data name=\"NoGroupsHere\" xml:space=\"preserve\">\n    <value>Noch keine Gruppen</value>\n  </data>\n  <data name=\"AddChatUserFloodWait\" xml:space=\"preserve\">\n    <value>Du kannst diesen Nutzer nicht hinzufügen, weil du heute zu viele nicht-gemeinsame Kontakte angeschrieben hast. Bitte morgen wieder probieren oder einen anderen Teilnehmer der Gruppe fragen, den Nutzer hinzuzufügen.</value>\n  </data>\n  <data name=\"ClearAll\" xml:space=\"preserve\">\n    <value>Zurücksetzen</value>\n  </data>\n  <data name=\"ClearPaintingConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du die Zeichnung wirklich zurücksetzen?</value>\n  </data>\n  <data name=\"DiscardChangesConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du die Änderungen wirklich verwerfen?</value>\n  </data>\n  <data name=\"SendMessageFloodWait\" xml:space=\"preserve\">\n    <value>Du hast heute zu viele nicht-gemeinsame Kontakte angeschrieben, bitte probiere es morgen wieder. Du kannst auf Nachrichten antworten, wenn dir die Person zuerst geschrieben hat.</value>\n  </data>\n  <data name=\"AttachedStickers\" xml:space=\"preserve\">\n    <value>Angehängte Sticker</value>\n  </data>\n  <data name=\"JumpToDate\" xml:space=\"preserve\">\n    <value>Gehe zu Datum</value>\n  </data>\n  <data name=\"Pack\" xml:space=\"preserve\">\n    <value>Paket anzeigen</value>\n  </data>\n  <data name=\"ChatsAndContacts\" xml:space=\"preserve\">\n    <value>Chats und Kontakte</value>\n  </data>\n  <data name=\"MessageSearch\" xml:space=\"preserve\">\n    <value>Nachrichtensuche</value>\n  </data>\n  <data name=\"SearchChatsOrMessages\" xml:space=\"preserve\">\n    <value>Chats oder Nachrichten durchsuchen</value>\n  </data>\n  <data name=\"PrivacyPolicy\" xml:space=\"preserve\">\n    <value>Datenschutzerklärung</value>\n  </data>\n  <data name=\"TelegramFAQ\" xml:space=\"preserve\">\n    <value>Telegram FAQ</value>\n  </data>\n  <data name=\"ChatSettingsSubtitle\" xml:space=\"preserve\">\n    <value>Medien, Hintergrund, Cache</value>\n  </data>\n  <data name=\"Mobile\" xml:space=\"preserve\">\n    <value>Mobil</value>\n  </data>\n  <data name=\"ChannelsTooMuch\" xml:space=\"preserve\">\n    <value>Du bist leider schon in zu vielen Kanälen.</value>\n  </data>\n  <data name=\"UserChannelsTooMuch\" xml:space=\"preserve\">\n    <value>Du kannst diesen Nutzer leider nicht hinzufügen.</value>\n  </data>\n  <data name=\"ItemsSelectedSingular\" xml:space=\"preserve\">\n    <value>{0} ausgewählt</value>\n  </data>\n  <data name=\"NewChat\" xml:space=\"preserve\">\n    <value>Neuer Chat</value>\n  </data>\n  <data name=\"ItemsSelectedPlural\" xml:space=\"preserve\">\n    <value>{0} ausgewählt</value>\n  </data>\n  <data name=\"FileGenitivePlural\" xml:space=\"preserve\">\n    <value>Dateien</value>\n  </data>\n  <data name=\"FileGenitiveSingular\" xml:space=\"preserve\">\n    <value>Datei</value>\n  </data>\n  <data name=\"FileNominativePlural\" xml:space=\"preserve\">\n    <value>Dateien</value>\n  </data>\n  <data name=\"FileNominativeSingular\" xml:space=\"preserve\">\n    <value>Datei</value>\n  </data>\n  <data name=\"LinkGenitivePlural\" xml:space=\"preserve\">\n    <value>Links</value>\n  </data>\n  <data name=\"LinkGenitiveSingular\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"LinkNominativePlural\" xml:space=\"preserve\">\n    <value>Links</value>\n  </data>\n  <data name=\"LinkNominativeSingular\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"PhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Bilder</value>\n  </data>\n  <data name=\"PhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bild</value>\n  </data>\n  <data name=\"PhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Bilder</value>\n  </data>\n  <data name=\"PhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Bild</value>\n  </data>\n  <data name=\"SongGenitivePlural\" xml:space=\"preserve\">\n    <value>Audios</value>\n  </data>\n  <data name=\"SongGenitiveSingular\" xml:space=\"preserve\">\n    <value>Audio</value>\n  </data>\n  <data name=\"SongNominativePlural\" xml:space=\"preserve\">\n    <value>Audios</value>\n  </data>\n  <data name=\"SongNominativeSingular\" xml:space=\"preserve\">\n    <value>Audio</value>\n  </data>\n  <data name=\"VideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Videos</value>\n  </data>\n  <data name=\"VideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"VideoNominativePlural\" xml:space=\"preserve\">\n    <value>Videos</value>\n  </data>\n  <data name=\"VideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"PhoneNumber\" xml:space=\"preserve\">\n    <value>Telefonnummer</value>\n  </data>\n  <data name=\"SetPhoto\" xml:space=\"preserve\">\n    <value>Bild festlegen</value>\n  </data>\n  <data name=\"AskAQuestionDescription\" xml:space=\"preserve\">\n    <value>Bedenke bitte, dass der Telegram Support von Freiwilligen betreut wird. Alle versuchen so schnell wie möglich zu antworten, dies kann jedoch manchmal ein bisschen dauern. Bitte schau in den &lt;![CDATA[&lt;a href=\"https://telegram.org/faq/de\"&gt;Telegram FAQ&lt;/a&gt;]]&gt; nach. Dort findest du Antworten auf die meisten Fragen und wichtige Tipps zur &lt;![CDATA[&lt;a href=\"https://telegram.org/faq/de#problembehandlung\"&gt;Problembehandlung&lt;/a&gt;]]&gt;.</value>\n  </data>\n  <data name=\"MaskPackNominativePlural\" xml:space=\"preserve\">\n    <value>Masken-Pakete</value>\n  </data>\n  <data name=\"MaskPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Masken-Paket</value>\n  </data>\n  <data name=\"StickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Sticker-Pakete</value>\n  </data>\n  <data name=\"StickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Sticker-Paket</value>\n  </data>\n  <data name=\"NewStickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Neue Sticker-Pakete</value>\n  </data>\n  <data name=\"NewStickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Neues Sticker-Paket</value>\n  </data>\n  <data name=\"PinDialog\" xml:space=\"preserve\">\n    <value>Anheften</value>\n  </data>\n  <data name=\"UnpinDialog\" xml:space=\"preserve\">\n    <value>Entfernen</value>\n  </data>\n  <data name=\"DeleteFor\" xml:space=\"preserve\">\n    <value>Bei {0} löschen</value>\n  </data>\n  <data name=\"DeleteForAll\" xml:space=\"preserve\">\n    <value>Bei allen löschen</value>\n  </data>\n  <data name=\"DeleteMessageForYouHint\" xml:space=\"preserve\">\n    <value>Das wird es nur bei dir löschen.</value>\n  </data>\n  <data name=\"DeleteMessagesForYouHint\" xml:space=\"preserve\">\n    <value>Das wird sie nur bei dir löschen.</value>\n  </data>\n  <data name=\"MessageActionCanceledCall\" xml:space=\"preserve\">\n    <value>Abgebrochener Anruf</value>\n  </data>\n  <data name=\"MessageActionIncomingCall\" xml:space=\"preserve\">\n    <value>Eingehender Anruf</value>\n  </data>\n  <data name=\"MessageActionIncomingDurationCall\" xml:space=\"preserve\">\n    <value>Eingehender Anruf ({0})</value>\n  </data>\n  <data name=\"MessageActionMissedCall\" xml:space=\"preserve\">\n    <value>Verpasster Anruf</value>\n  </data>\n  <data name=\"MessageActionOutgoingCall\" xml:space=\"preserve\">\n    <value>Ausgehender Anruf</value>\n  </data>\n  <data name=\"MessageActionOutgoingDurationCall\" xml:space=\"preserve\">\n    <value>Ausgehener Anruf ({0})</value>\n  </data>\n  <data name=\"CanceledCall\" xml:space=\"preserve\">\n    <value>Abgebrochener Anruf</value>\n  </data>\n  <data name=\"IncomingCall\" xml:space=\"preserve\">\n    <value>Eingehender Anruf</value>\n  </data>\n  <data name=\"MissedCall\" xml:space=\"preserve\">\n    <value>Verpasster Anruf</value>\n  </data>\n  <data name=\"OutgoingCall\" xml:space=\"preserve\">\n    <value>Ausgehende Anrufe</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Das wird es bei allen im Kanal löschen.</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Das wird es bei allen im Chat löschen.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Das wird sie bei allen im Kanal löschen.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Das wird sie bei allen im Chat löschen.</value>\n  </data>\n  <data name=\"Invoice\" xml:space=\"preserve\">\n    <value>Rechnung</value>\n  </data>\n  <data name=\"TestInvoice\" xml:space=\"preserve\">\n    <value>Testrechnung</value>\n  </data>\n  <data name=\"MessageActionPaymentSent\" xml:space=\"preserve\">\n    <value>Du hast erfolgreich {0} an {1} übermittelt</value>\n  </data>\n  <data name=\"MessageActionPaymentSentFor\" xml:space=\"preserve\">\n    <value>Du hast erfolgreich {0} an {1} für {2} übermittelt</value>\n  </data>\n  <data name=\"PaymentInfo\" xml:space=\"preserve\">\n    <value>Zahlungsinformationen</value>\n  </data>\n  <data name=\"Receipt\" xml:space=\"preserve\">\n    <value>Beleg</value>\n  </data>\n  <data name=\"Address1Street\" xml:space=\"preserve\">\n    <value>Adresse 1 (Straße)</value>\n  </data>\n  <data name=\"Address2Street\" xml:space=\"preserve\">\n    <value>Adresse 2 (Straße)</value>\n  </data>\n  <data name=\"BillingAddress\" xml:space=\"preserve\">\n    <value>Rechnungsadresse</value>\n  </data>\n  <data name=\"CardNumber\" xml:space=\"preserve\">\n    <value>Kartennummer</value>\n  </data>\n  <data name=\"Checkout\" xml:space=\"preserve\">\n    <value>Kasse</value>\n  </data>\n  <data name=\"City\" xml:space=\"preserve\">\n    <value>Stadt</value>\n  </data>\n  <data name=\"ContactAddress\" xml:space=\"preserve\">\n    <value>Kontaktadresse</value>\n  </data>\n  <data name=\"Discount\" xml:space=\"preserve\">\n    <value>Rabatt</value>\n  </data>\n  <data name=\"FullName\" xml:space=\"preserve\">\n    <value>Vor- und Nachname</value>\n  </data>\n  <data name=\"MMYY\" xml:space=\"preserve\">\n    <value>MM/JJ</value>\n  </data>\n  <data name=\"NameSurname\" xml:space=\"preserve\">\n    <value>Vollständiger Name</value>\n  </data>\n  <data name=\"PaymentCard\" xml:space=\"preserve\">\n    <value>Zahlungskarte</value>\n  </data>\n  <data name=\"PaymentMethod\" xml:space=\"preserve\">\n    <value>Zahlungsart</value>\n  </data>\n  <data name=\"Postcode\" xml:space=\"preserve\">\n    <value>PLZ</value>\n  </data>\n  <data name=\"Receiver\" xml:space=\"preserve\">\n    <value>Empfänger</value>\n  </data>\n  <data name=\"SaveShippingInformation\" xml:space=\"preserve\">\n    <value>Versandinformationen speichern</value>\n  </data>\n  <data name=\"SaveShippingInformationHint\" xml:space=\"preserve\">\n    <value>Du kannst deine Versandinformationen für zukünftige Bestellungen speichern.</value>\n  </data>\n  <data name=\"SecurityCode\" xml:space=\"preserve\">\n    <value>Kartenprüfnummer (CVV)</value>\n  </data>\n  <data name=\"Shipping\" xml:space=\"preserve\">\n    <value>Versand</value>\n  </data>\n  <data name=\"ShippingAddress\" xml:space=\"preserve\">\n    <value>Versandadresse</value>\n  </data>\n  <data name=\"ShippingInformation\" xml:space=\"preserve\">\n    <value>Versand</value>\n  </data>\n  <data name=\"ShippingMethods\" xml:space=\"preserve\">\n    <value>Versandarten</value>\n  </data>\n  <data name=\"State\" xml:space=\"preserve\">\n    <value>Bundesland</value>\n  </data>\n  <data name=\"Subtotal\" xml:space=\"preserve\">\n    <value>Zwischensumme</value>\n  </data>\n  <data name=\"Taxes\" xml:space=\"preserve\">\n    <value>Steuern</value>\n  </data>\n  <data name=\"TestReceipt\" xml:space=\"preserve\">\n    <value>Test-Beleg</value>\n  </data>\n  <data name=\"Total\" xml:space=\"preserve\">\n    <value>Gesamtsumme</value>\n  </data>\n  <data name=\"TransactionConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du wirklich {0} an den {1} für {2} übermitteln?</value>\n  </data>\n  <data name=\"TransactionReview\" xml:space=\"preserve\">\n    <value>Überprüfung der Transaktion</value>\n  </data>\n  <data name=\"TestCheckout\" xml:space=\"preserve\">\n    <value>Test-Kasse</value>\n  </data>\n  <data name=\"ShippingMethod\" xml:space=\"preserve\">\n    <value>Versandart</value>\n  </data>\n  <data name=\"Name\" xml:space=\"preserve\">\n    <value>Name</value>\n  </data>\n  <data name=\"Pay\" xml:space=\"preserve\">\n    <value>Bezahlen</value>\n  </data>\n  <data name=\"Duplicate\" xml:space=\"preserve\">\n    <value>Klonen</value>\n  </data>\n  <data name=\"CameraSubtitle\" xml:space=\"preserve\">\n    <value>Kameraeinstellungen verwalten</value>\n  </data>\n  <data name=\"ChooseYourCameraApp\" xml:space=\"preserve\">\n    <value>Wähle deine Kamera-App</value>\n  </data>\n  <data name=\"ExternalCamera\" xml:space=\"preserve\">\n    <value>Externe Kamera</value>\n  </data>\n  <data name=\"InAppCamera\" xml:space=\"preserve\">\n    <value>In-App Kamera</value>\n  </data>\n  <data name=\"Calls\" xml:space=\"preserve\">\n    <value>Anrufe</value>\n  </data>\n  <data name=\"CallsPrivacyDescription\" xml:space=\"preserve\">\n    <value>Wer kann mich anrufen?</value>\n  </data>\n  <data name=\"CallsPrivacyImportantNote\" xml:space=\"preserve\">\n    <value>Du kannst bestimmen, wer dich anrufen darf.</value>\n  </data>\n  <data name=\"CallsPrivacyOverrideNote\" xml:space=\"preserve\">\n    <value>Hier kannst du Nutzer hinzufügen, für die eine Ausnahme gemacht werden soll.</value>\n  </data>\n  <data name=\"NoCallsHere\" xml:space=\"preserve\">\n    <value>Noch keine Anrufe</value>\n  </data>\n  <data name=\"VoiceCall\" xml:space=\"preserve\">\n    <value>Sprachanruf</value>\n  </data>\n  <data name=\"CameraRollFolder\" xml:space=\"preserve\">\n    <value>Eigene Aufnahmen</value>\n  </data>\n  <data name=\"SavedPicturesFolder\" xml:space=\"preserve\">\n    <value>Gespeicherte Bilder</value>\n  </data>\n  <data name=\"ScreenshotsFolder\" xml:space=\"preserve\">\n    <value>Screenshots</value>\n  </data>\n  <data name=\"AccessCameraException\" xml:space=\"preserve\">\n    <value>Kann auf aktuelle Kamera nicht zugreifen</value>\n  </data>\n  <data name=\"Answer\" xml:space=\"preserve\">\n    <value>Annehmen</value>\n  </data>\n  <data name=\"Calling\" xml:space=\"preserve\">\n    <value>Anrufen...</value>\n  </data>\n  <data name=\"EmojiKeyDescription\" xml:space=\"preserve\">\n    <value>Wenn diese Emoji genau so bei {0} aussehen, ist euer Anruf 100% sicher.</value>\n  </data>\n  <data name=\"EndCall\" xml:space=\"preserve\">\n    <value>Anruf beenden</value>\n  </data>\n  <data name=\"Speaker\" xml:space=\"preserve\">\n    <value>Lautsprecher</value>\n  </data>\n  <data name=\"TouchToReturnToCall\" xml:space=\"preserve\">\n    <value>Berühren, um Gespräch fortzuführen</value>\n  </data>\n  <data name=\"PaymentProvider\" xml:space=\"preserve\">\n    <value>Zahlungsbetreiber</value>\n  </data>\n  <data name=\"PaymentsWarning\" xml:space=\"preserve\">\n    <value>Zahlungen gehen direkt an den Entwickler von {0}. Telegram kann keine Haftung übernehmen, du handelst auf eigene Gefahr. Wende dich bei Problemen bitte direkt an den Entwickler von {0} oder an deine Bank.</value>\n  </data>\n  <data name=\"SavePaymentInformation\" xml:space=\"preserve\">\n    <value>Zahlungsinformationen speichern</value>\n  </data>\n  <data name=\"SavePaymentInformationHint\" xml:space=\"preserve\">\n    <value>Du kannst deine Zahlungsinformationen für zukünftige Bestellungen speichern.</value>\n  </data>\n  <data name=\"SavedCardHint\" xml:space=\"preserve\">\n    <value>Deine Karte {0} ist bereits gespeichert. Um mit dieser Karte zu bezahlen, tippe dein Kennwort der zweistufigen Bestätigung ein.</value>\n  </data>\n  <data name=\"ChooseDifferentCard\" xml:space=\"preserve\">\n    <value>Wähle eine andere Karte</value>\n  </data>\n  <data name=\"Payments\" xml:space=\"preserve\">\n    <value>Zahlungen</value>\n  </data>\n  <data name=\"PaymentsSubtitle\" xml:space=\"preserve\">\n    <value>Zahlungsinfo entfernen</value>\n  </data>\n  <data name=\"ShippingInfo\" xml:space=\"preserve\">\n    <value>Versandinformationen</value>\n  </data>\n  <data name=\"Ringing\" xml:space=\"preserve\">\n    <value>Es klingelt</value>\n  </data>\n  <data name=\"TurnOnTwoStepVerification\" xml:space=\"preserve\">\n    <value>Bitte *schalte die zweistufige Bestätigung ein*, um es zu aktivieren.</value>\n  </data>\n  <data name=\"ChooseYourPhotoPickerApp\" xml:space=\"preserve\">\n    <value>Wähle deine Foto-Browser-App</value>\n  </data>\n  <data name=\"ExternalPhotoPicker\" xml:space=\"preserve\">\n    <value>Externer Foto-Browser</value>\n  </data>\n  <data name=\"InAppPhotoPicker\" xml:space=\"preserve\">\n    <value>In-App Foto-Browser</value>\n  </data>\n  <data name=\"PhotoPicker\" xml:space=\"preserve\">\n    <value>Foto-Browser</value>\n  </data>\n  <data name=\"PhotoPickerSubtitle\" xml:space=\"preserve\">\n    <value>Foto-Browser Einstellungen verwalten</value>\n  </data>\n  <data name=\"Chat\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"Ignore\" xml:space=\"preserve\">\n    <value>Ignorieren</value>\n  </data>\n  <data name=\"AddOptionalComment\" xml:space=\"preserve\">\n    <value>Optionalen Kommentar hinzufügen</value>\n  </data>\n  <data name=\"RateCallQuality\" xml:space=\"preserve\">\n    <value>Bewerte bitte die Qualität deines Telegram-Anrufs</value>\n  </data>\n  <data name=\"VoipBusy\" xml:space=\"preserve\">\n    <value>Besetzt</value>\n  </data>\n  <data name=\"VoipConnecting\" xml:space=\"preserve\">\n    <value>Verbinde</value>\n  </data>\n  <data name=\"VoipEnded\" xml:space=\"preserve\">\n    <value>Beendet</value>\n  </data>\n  <data name=\"VoipExchangingKeys\" xml:space=\"preserve\">\n    <value>Tausche Schlüssel aus</value>\n  </data>\n  <data name=\"VoipFailed\" xml:space=\"preserve\">\n    <value>Fehlgeschlagen</value>\n  </data>\n  <data name=\"VoipHangingUp\" xml:space=\"preserve\">\n    <value>Wird beendet</value>\n  </data>\n  <data name=\"VoipIncoming\" xml:space=\"preserve\">\n    <value>Eingehender Anruf</value>\n  </data>\n  <data name=\"VoipRequesting\" xml:space=\"preserve\">\n    <value>Wird angefordert</value>\n  </data>\n  <data name=\"VoipRinging\" xml:space=\"preserve\">\n    <value>Es klingelt</value>\n  </data>\n  <data name=\"VoipWaiting\" xml:space=\"preserve\">\n    <value>Warte</value>\n  </data>\n  <data name=\"CallInProgressNotification\" xml:space=\"preserve\">\n    <value>Du bist mit {0} bereits im Gespräch.</value>\n  </data>\n  <data name=\"Connection\" xml:space=\"preserve\">\n    <value>Verbindung</value>\n  </data>\n  <data name=\"ConnectionType\" xml:space=\"preserve\">\n    <value>Verbindungsart</value>\n  </data>\n  <data name=\"CredentionalsOptional\" xml:space=\"preserve\">\n    <value>Zugangsdaten (Optional)</value>\n  </data>\n  <data name=\"Port\" xml:space=\"preserve\">\n    <value>Port</value>\n  </data>\n  <data name=\"Server\" xml:space=\"preserve\">\n    <value>Server</value>\n  </data>\n  <data name=\"Socks5\" xml:space=\"preserve\">\n    <value>SOCKS5</value>\n  </data>\n  <data name=\"UseProxy\" xml:space=\"preserve\">\n    <value>Proxy-Einstellungen benutzen</value>\n  </data>\n  <data name=\"Proxy\" xml:space=\"preserve\">\n    <value>Proxy-Einstellungen</value>\n  </data>\n  <data name=\"ConnectingToProxy\" xml:space=\"preserve\">\n    <value>Verbinde mit Proxy</value>\n  </data>\n  <data name=\"EnableProxyConfigmation\" xml:space=\"preserve\">\n    <value>Möchtest du wirklich diesen Proxy aktivieren?</value>\n  </data>\n  <data name=\"ChangeProxy\" xml:space=\"preserve\">\n    <value>Proxy benutzen</value>\n  </data>\n  <data name=\"ChangeProxyServerHint\" xml:space=\"preserve\">\n    <value>Du kann deinen Proxyserver später in den Einstellungen ändern.</value>\n  </data>\n  <data name=\"UseProxyHint\" xml:space=\"preserve\">\n    <value>SOCKS5 Proxy-Einstellungen</value>\n  </data>\n  <data name=\"DeclinedCall\" xml:space=\"preserve\">\n    <value>Abgelehnter Anruf</value>\n  </data>\n  <data name=\"MessageActionDeclinedCall\" xml:space=\"preserve\">\n    <value>Abgelehnter Anruf</value>\n  </data>\n  <data name=\"VideoMessage\" xml:space=\"preserve\">\n    <value>Videonachricht</value>\n  </data>\n  <data name=\"PeerToPeer\" xml:space=\"preserve\">\n    <value>Peer-to-Peer</value>\n  </data>\n  <data name=\"PeerToPeerDescription\" xml:space=\"preserve\">\n    <value>Deaktivierst du Peer-to-Peer, werden alle Anrufe über die Telegram Server geleitet. Dadurch ist deine IP-Adresse nicht mehr sichtbar, die Gesprächsqualität wird jedoch leicht abnehmen.</value>\n  </data>\n  <data name=\"Bio\" xml:space=\"preserve\">\n    <value>Bio</value>\n  </data>\n  <data name=\"BioDescription\" xml:space=\"preserve\">\n    <value>Hier kannst du etwas über dich schreiben.\nJeder der dein Profil öffnet, kann diesen Text lesen.</value>\n  </data>\n  <data name=\"MessageActionPhotoExpired\" xml:space=\"preserve\">\n    <value>Bild ist abgelaufen</value>\n  </data>\n  <data name=\"MessageActionVideoExpired\" xml:space=\"preserve\">\n    <value>Video ist abgelaufen</value>\n  </data>\n  <data name=\"Timer\" xml:space=\"preserve\">\n    <value>Timer</value>\n  </data>\n  <data name=\"SelfDestructTimerPhotoSubtitle\" xml:space=\"preserve\">\n    <value>Stelle den Timer, um das Bild nach dem Öffnen zerstören zu lassen.</value>\n  </data>\n  <data name=\"SelfDestructTimerVideoSubtitle\" xml:space=\"preserve\">\n    <value>Stelle den Timer, um das Video nach dem Öffnen zerstören zu lassen.</value>\n  </data>\n  <data name=\"SecretPhoto\" xml:space=\"preserve\">\n    <value>Geheimes Bild</value>\n  </data>\n  <data name=\"SecretVideo\" xml:space=\"preserve\">\n    <value>Geheimes Video</value>\n  </data>\n  <data name=\"ChooseFromYourStickers\" xml:space=\"preserve\">\n    <value>Sticker-Paket auswählen</value>\n  </data>\n  <data name=\"CreateStickerSetHint\" xml:space=\"preserve\">\n    <value>Erstelle dein eigenes Sticker-Paket mit dem @stickers Bot.</value>\n  </data>\n  <data name=\"GroupStickers\" xml:space=\"preserve\">\n    <value>Gruppen-Sticker</value>\n  </data>\n  <data name=\"GroupStickersDescription\" xml:space=\"preserve\">\n    <value>Paket wählen, welches alle in der Gruppe sehen können.</value>\n  </data>\n  <data name=\"AddToFavorites\" xml:space=\"preserve\">\n    <value>Zu Favoriten hinzufügen</value>\n  </data>\n  <data name=\"DeleteFromFavorites\" xml:space=\"preserve\">\n    <value>Aus Favoriten entfernen</value>\n  </data>\n  <data name=\"NoStickerSetFound\" xml:space=\"preserve\">\n    <value>Sticker-Paket nicht gefunden</value>\n  </data>\n  <data name=\"NoStickerSetFoundSubtitle\" xml:space=\"preserve\">\n    <value>Erneut probieren oder unten auswählen</value>\n  </data>\n  <data name=\"Auto\" xml:space=\"preserve\">\n    <value>Auto</value>\n  </data>\n  <data name=\"VideoQuality\" xml:space=\"preserve\">\n    <value>Videoqualität</value>\n  </data>\n  <data name=\"Quality\" xml:space=\"preserve\">\n    <value>Qualität</value>\n  </data>\n  <data name=\"ClearUnreadMentionsConfirmation\" xml:space=\"preserve\">\n    <value>Wirklich alle ungelesenen Erwähnungen entfernen? </value>\n  </data>\n  <data name=\"PasswordEmail\" xml:space=\"preserve\">\n    <value>Kennwort &amp; E-Mail</value>\n  </data>\n  <data name=\"CreatePasswordHint\" xml:space=\"preserve\">\n    <value>Um deine Zahlungsinformationen zu schützen, erstelle bitte ein Kennwort.\nDu brauchst dieses bei der Anmeldung.</value>\n  </data>\n  <data name=\"SendLiveLocation\" xml:space=\"preserve\">\n    <value>Meinen Live-Standort teilen</value>\n  </data>\n  <data name=\"SendLiveLocationSubtitle\" xml:space=\"preserve\">\n    <value>Aktualisiert sich bei Bewegung</value>\n  </data>\n  <data name=\"LiveLocation\" xml:space=\"preserve\">\n    <value>Live-Standort</value>\n  </data>\n  <data name=\"ShareLiveLocationToContactTimerSubtitle\" xml:space=\"preserve\">\n    <value>Wie lange darf {0} deinen genauen Standort sehen?</value>\n  </data>\n  <data name=\"ContactJoinedTelegram\" xml:space=\"preserve\">\n    <value>Kontakt ist Telegram beigetreten</value>\n  </data>\n  <data name=\"Events\" xml:space=\"preserve\">\n    <value>Ereignisse</value>\n  </data>\n  <data name=\"ChatHistoryCaption\" xml:space=\"preserve\">\n    <value>Chatverlauf für neue Mitglieder</value>\n  </data>\n  <data name=\"ChatHistoryHidden\" xml:space=\"preserve\">\n    <value>Neue Mitglieder sehen keine vorherigen Nachrichten.</value>\n  </data>\n  <data name=\"ChatHistoryVisible\" xml:space=\"preserve\">\n    <value>Neue Mitglieder sehen gesamten Verlauf</value>\n  </data>\n  <data name=\"DescriptionOptional\" xml:space=\"preserve\">\n    <value>Beschreibung (optional)</value>\n  </data>\n  <data name=\"Hidden\" xml:space=\"preserve\">\n    <value>Versteckt</value>\n  </data>\n  <data name=\"Visible\" xml:space=\"preserve\">\n    <value>Sichtbar</value>\n  </data>\n  <data name=\"LocationSharingEnded\" xml:space=\"preserve\">\n    <value>Standortfreigabe beendet</value>\n  </data>\n  <data name=\"Map\" xml:space=\"preserve\">\n    <value>Karte</value>\n  </data>\n  <data name=\"MessageActionPinGeoLive\" xml:space=\"preserve\">\n    <value>{0} hat einen Live-Standort angeheftet</value>\n  </data>\n  <data name=\"For15Minutes\" xml:space=\"preserve\">\n    <value>Für 15 Minuten</value>\n  </data>\n  <data name=\"For1Hour\" xml:space=\"preserve\">\n    <value>Für 1 Stunde</value>\n  </data>\n  <data name=\"For8Hours\" xml:space=\"preserve\">\n    <value>Für 8 Stunden</value>\n  </data>\n  <data name=\"MessageActionClearHistory\" xml:space=\"preserve\">\n    <value>Verlauf wurde geleert</value>\n  </data>\n  <data name=\"Updated\" xml:space=\"preserve\">\n    <value>Aktualisiert</value>\n  </data>\n  <data name=\"UpdatedAgo\" xml:space=\"preserve\">\n    <value>Vor {0} aktualisiert</value>\n  </data>\n  <data name=\"UpdatedAtDate\" xml:space=\"preserve\">\n    <value>Am {0} um {1} aktualisiert</value>\n  </data>\n  <data name=\"UpdatedJustNow\" xml:space=\"preserve\">\n    <value>Gerade aktualisiert</value>\n  </data>\n  <data name=\"UpdatedTodayAt\" xml:space=\"preserve\">\n    <value>Heute um {0} aktualisiert</value>\n  </data>\n  <data name=\"UpdatedYesterdayAt\" xml:space=\"preserve\">\n    <value>Gestern um {0} aktualisiert</value>\n  </data>\n  <data name=\"StopSharingLocation\" xml:space=\"preserve\">\n    <value>Freigabe beenden</value>\n  </data>\n  <data name=\"ShareLiveLocationToChatTimerSubtitle\" xml:space=\"preserve\">\n    <value>Wähle, wie lange Leute in diesem Chat deinen Live-Standort einsehen dürfen.</value>\n  </data>\n  <data name=\"NewStickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Neue Sticker-Pakete</value>\n  </data>\n  <data name=\"NewStickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Neues Sticker-Paket</value>\n  </data>\n  <data name=\"StickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Sticker-Pakete</value>\n  </data>\n  <data name=\"StickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Sticker-Paket</value>\n  </data>\n  <data name=\"MaskPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Masken-Pakete</value>\n  </data>\n  <data name=\"MaskPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Masken-Paket</value>\n  </data>\n  <data name=\"GroupNameInvalid\" xml:space=\"preserve\">\n    <value>Der Name ist ungültig.</value>\n  </data>\n  <data name=\"GroupNameOccupied\" xml:space=\"preserve\">\n    <value>Leider ist der Name schon belegt.</value>\n  </data>\n  <data name=\"GroupNameShort\" xml:space=\"preserve\">\n    <value>Gruppennamen benötigen mindestens 5 Zeichen.</value>\n  </data>\n  <data name=\"GroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Gruppen dürfen nicht mit einer Zahl anfangen.</value>\n  </data>\n  <data name=\"AttachLiveLocationIsSharing\" xml:space=\"preserve\">\n    <value>Mit {0} teilen?</value>\n  </data>\n  <data name=\"SharingLiveLocationTitle\" xml:space=\"preserve\">\n    <value>Du teilst deinen Live-Standort mit {0}</value>\n  </data>\n  <data name=\"SharingYouAndOtherName\" xml:space=\"preserve\">\n    <value>Du und {0}</value>\n  </data>\n  <data name=\"StopAllLocationSharings\" xml:space=\"preserve\">\n    <value>Alle beenden</value>\n  </data>\n  <data name=\"StopLiveLocationAlertAll\" xml:space=\"preserve\">\n    <value>Möchtest du deinen Live-Standort nicht mehr teilen?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToGroup\" xml:space=\"preserve\">\n    <value>Möchtest du deinen Live-Standort mit {0} nicht mehr teilen?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToUser\" xml:space=\"preserve\">\n    <value>Möchtest du deinen Live-Standort mit {0} nicht mehr teilen?</value>\n  </data>\n  <data name=\"HourShort\" xml:space=\"preserve\">\n    <value>h</value>\n  </data>\n  <data name=\"ChatGenitivePlural\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"ChatGenitiveSingular\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"ChatNominativePlural\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"ChatNominativeSingular\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\n    <value>Gespeichertes</value>\n  </data>\n  <data name=\"ForwardHereToSave\" xml:space=\"preserve\">\n    <value>Weiterleiten zum Speichern</value>\n  </data>\n  <data name=\"MicrophoneAccessDenied\" xml:space=\"preserve\">\n    <value>Mikrofonzugriff verweigert</value>\n  </data>\n  <data name=\"MicrophoneAccessDeniedDescription\" xml:space=\"preserve\">\n    <value>Telegram konnte nicht auf das Mikrofon zugreifen. Bitte stelle sicher, dass Telegram das Mikrofon in den Privatsphäre-Einstellungen verwenden darf und starte die App neu.</value>\n  </data>\n  <data name=\"SendCallLogs\" xml:space=\"preserve\">\n    <value>Anrufprotokolle senden</value>\n  </data>\n  <data name=\"GroupMediaDescription\" xml:space=\"preserve\">\n    <value>Zeigt alle Medien in einer Nachricht</value>\n  </data>\n  <data name=\"UngroupMediaDescription\" xml:space=\"preserve\">\n    <value>Zeigt Medien als einzelne Nachrichten</value>\n  </data>\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\n    <value>Gelöschtes Konto</value>\n  </data>\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\n    <value>Gelöschtes Konto</value>\n  </data>\n  <data name=\"Album\" xml:space=\"preserve\">\n    <value>Album</value>\n  </data>\n  <data name=\"DeleteMessagesConfirmation\" xml:space=\"preserve\">\n    <value>Sicher, dass du {0} löschen willst?</value>\n  </data>\n  <data name=\"MessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Nachrichten</value>\n  </data>\n  <data name=\"MessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Nachricht</value>\n  </data>\n  <data name=\"MessageNominativePlural\" xml:space=\"preserve\">\n    <value>Nachrichten</value>\n  </data>\n  <data name=\"MessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Nachricht</value>\n  </data>\n  <data name=\"SubscriberGenitivePlural\" xml:space=\"preserve\">\n    <value>Abonnenten</value>\n  </data>\n  <data name=\"SubscriberGenitiveSingular\" xml:space=\"preserve\">\n    <value>Abonnent</value>\n  </data>\n  <data name=\"SubscriberNominativePlural\" xml:space=\"preserve\">\n    <value>Abonnenten</value>\n  </data>\n  <data name=\"SubscriberNominativeSingular\" xml:space=\"preserve\">\n    <value>Abonnent</value>\n  </data>\n  <data name=\"LogOutAllApplications\" xml:space=\"preserve\">\n    <value>Alle Webseiten trennen</value>\n  </data>\n  <data name=\"LogOutAllApplicationsNote\" xml:space=\"preserve\">\n    <value/>\n  </data>\n  <data name=\"LoggedInWithTelegram\" xml:space=\"preserve\">\n    <value>Mit Telegram angemeldet</value>\n  </data>\n  <data name=\"LogOutAllApplicationsConfirmation\" xml:space=\"preserve\">\n    <value>Verbindung zu allen Webseiten trennen, auf denen du mit Telegram angemeldet bist?</value>\n  </data>\n  <data name=\"NoItemsHere\" xml:space=\"preserve\">\n    <value>Noch keine Objekte</value>\n  </data>\n  <data name=\"Group\" xml:space=\"preserve\">\n    <value>Feed</value>\n  </data>\n  <data name=\"Ungroup\" xml:space=\"preserve\">\n    <value>Trennen</value>\n  </data>\n  <data name=\"AboutApp\" xml:space=\"preserve\">\n    <value>Info</value>\n  </data>\n  <data name=\"NoActiveLogins\" xml:space=\"preserve\">\n    <value>Keine aktiven Anmeldungen.\n\nDu kannst dich auf unterstützten Webseiten mit deinem Telegram-Konto anmelden.</value>\n  </data>\n  <data name=\"Feed\" xml:space=\"preserve\">\n    <value>Feed</value>\n  </data>\n  <data name=\"ChannelGenitivePlural\" xml:space=\"preserve\">\n    <value>Kanäle</value>\n  </data>\n  <data name=\"ChannelGenitiveSingular\" xml:space=\"preserve\">\n    <value>Kanal</value>\n  </data>\n  <data name=\"ChannelNominativePlural\" xml:space=\"preserve\">\n    <value>Kanäle</value>\n  </data>\n  <data name=\"ChannelNominativeSingular\" xml:space=\"preserve\">\n    <value>Kanal</value>\n  </data>\n  <data name=\"ShowNext\" xml:space=\"preserve\">\n    <value>Nächste zeigen</value>\n  </data>\n  <data name=\"GroupNewChannels\" xml:space=\"preserve\">\n    <value>Neue Kanäle gruppieren</value>\n  </data>\n  <data name=\"MessageActionBotAllowed\" xml:space=\"preserve\">\n    <value>Du hast diesem Bot erlaubt dich anzuschreiben, wenn du dich bei {0} anmeldest.</value>\n  </data>\n  <data name=\"NoStickersFound\" xml:space=\"preserve\">\n    <value>Keine Sticker gefunden</value>\n  </data>\n  <data name=\"ConnectedWebsites\" xml:space=\"preserve\">\n    <value>Verbundene Webseiten</value>\n  </data>\n  <data name=\"ConnectedWebsitesHint\" xml:space=\"preserve\">\n    <value>Du kannst dich auf unterstützten Webseiten mit deinem Telegram-Konto anmelden.</value>\n  </data>\n  <data name=\"TapToDisconnectTelegramAccount\" xml:space=\"preserve\">\n    <value>Antippen, um dich mit deinem Telegram-Konto abzumelden.</value>\n  </data>\n  <data name=\"TelegramPassport\" xml:space=\"preserve\">\n    <value>Telegram Passport</value>\n  </data>\n  <data name=\"Authorize\" xml:space=\"preserve\">\n    <value>Autorisieren</value>\n  </data>\n  <data name=\"Email2\" xml:space=\"preserve\">\n    <value>E-Mail</value>\n  </data>\n  <data name=\"PassportPersonalDetailsInfo\" xml:space=\"preserve\">\n    <value>Deine persönlichen Daten eingeben</value>\n  </data>\n  <data name=\"PassportHint\" xml:space=\"preserve\">\n    <value>{0}verlangt Zugriff auf deine persönlichen Daten, damit du dich dort registrieren kannst.</value>\n  </data>\n  <data name=\"PassportAddress\" xml:space=\"preserve\">\n    <value>Adresse</value>\n  </data>\n  <data name=\"PassportAddressInfo\" xml:space=\"preserve\">\n    <value>Adressnachweis hochladen</value>\n  </data>\n  <data name=\"PassportNoPolicy\" xml:space=\"preserve\">\n    <value>Du sendest deine Dokumente direkt {0} und erlaubst dem {1} Bot, dir Nachrichten zu senden.</value>\n  </data>\n  <data name=\"AllSets\" xml:space=\"preserve\">\n    <value>Alle Pakete</value>\n  </data>\n  <data name=\"MySets\" xml:space=\"preserve\">\n    <value>Meine Pakete</value>\n  </data>\n  <data name=\"None\" xml:space=\"preserve\">\n    <value>Keine</value>\n  </data>\n  <data name=\"SuggestStickersByEmoji\" xml:space=\"preserve\">\n    <value>Sticker für Emoji vorschlagen</value>\n  </data>\n  <data name=\"MTProto\" xml:space=\"preserve\">\n    <value>MTPROTO</value>\n  </data>\n  <data name=\"UseProxyForCalls\" xml:space=\"preserve\">\n    <value>Proxy für Anrufe benutzen</value>\n  </data>\n  <data name=\"UseProxyForCallsHint\" xml:space=\"preserve\">\n    <value>Proxyserver können die Qualität von Anrufen beinflussen.</value>\n  </data>\n  <data name=\"Connections\" xml:space=\"preserve\">\n    <value>Verbindungen</value>\n  </data>\n  <data name=\"AddProxy\" xml:space=\"preserve\">\n    <value>Proxy hinzufügen</value>\n  </data>\n  <data name=\"Secret\" xml:space=\"preserve\">\n    <value>Schlüssel</value>\n  </data>\n  <data name=\"UseTelegramProxyHint\" xml:space=\"preserve\">\n    <value>Telegram Proxy-Einstellungen</value>\n  </data>\n  <data name=\"Available\" xml:space=\"preserve\">\n    <value>Verfügbar</value>\n  </data>\n  <data name=\"Checking\" xml:space=\"preserve\">\n    <value>Prüfe</value>\n  </data>\n  <data name=\"Connected\" xml:space=\"preserve\">\n    <value>Verbunden</value>\n  </data>\n  <data name=\"Unavailable\" xml:space=\"preserve\">\n    <value>Nicht verfügbar</value>\n  </data>\n  <data name=\"TermsOfService\" xml:space=\"preserve\">\n    <value>Nutzungsbedingungen</value>\n  </data>\n  <data name=\"TermsOfServiceLink\" xml:space=\"preserve\">\n    <value>Mit der Registrierung\nstimmst du den *Nutzungsbedingungen* zu.</value>\n  </data>\n  <data name=\"DeleteSyncedContacts\" xml:space=\"preserve\">\n    <value>Synchronisierte Kontakte löschen</value>\n  </data>\n  <data name=\"SyncContacts\" xml:space=\"preserve\">\n    <value>Kontakte synchronisieren</value>\n  </data>\n  <data name=\"SyncContactsDeleteInfo\" xml:space=\"preserve\">\n    <value>Das wird deine Kontakte von den Telegram-Servern entfernen. Wenn 'Kontakte synchronisieren' aktiviert ist, werden deine Kontakte erneut synchronisiert.</value>\n  </data>\n  <data name=\"SyncContactsInfoOff\" xml:space=\"preserve\">\n    <value>Aktiviere diese Option, um Kontakte von diesem Gerät durchgehend mit deinem Konto zu synchronisieren.</value>\n  </data>\n  <data name=\"SyncContactsInfoOn\" xml:space=\"preserve\">\n    <value>Kontakte dieses Gerätes werden deinem Konto hinzugefügt.</value>\n  </data>\n  <data name=\"LinkPreviewsHint\" xml:space=\"preserve\">\n    <value>Die Linkvorschau wird auf den Telegram-Servern generiert. Wir speichern keine Daten über die von dir gesendeten Links.</value>\n  </data>\n  <data name=\"DeleteSyncedContactsConfirmation\" xml:space=\"preserve\">\n    <value>Das wird deine Kontakte von den Telegram-Servern entfernen. Wenn 'Kontakte synchronisieren' aktiviert ist, werden deine Kontakte erneut synchronisiert.</value>\n  </data>\n  <data name=\"ProxyDisabledNotification\" xml:space=\"preserve\">\n    <value>Dein aktueller Proxy ist nicht korrekt konfiguriert und wird daher deaktiviert. Bitte suche dir einen anderen.</value>\n  </data>\n  <data name=\"ProxySponsor\" xml:space=\"preserve\">\n    <value>Proxy-Sponsor</value>\n  </data>\n  <data name=\"ProxySponsorAbout\" xml:space=\"preserve\">\n    <value>Dieser Kanal wird von deinem Proxyserver angezeigt.\nDeaktiviere den Proxy in den Einstellungen,\num den Kanal zu entfernen.</value>\n  </data>\n  <data name=\"ProxySponsorWarning\" xml:space=\"preserve\">\n    <value>Dieser Proxy könnte einen gesponserten Kanal in deiner Chatliste anzeigen. Das wird jedoch nicht deinen Telegram-Datenverkehr enthüllen.</value>\n  </data>\n  <data name=\"MarkRead\" xml:space=\"preserve\">\n    <value>Als gelesen markieren</value>\n  </data>\n  <data name=\"MarkUnread\" xml:space=\"preserve\">\n    <value>Als ungelesen markieren</value>\n  </data>\n  <data name=\"SuggestFrequentContacts\" xml:space=\"preserve\">\n    <value>Häufige Kontakte vorschlagen</value>\n  </data>\n  <data name=\"SuggestFrequentContactsAbout\" xml:space=\"preserve\">\n    <value>Zeigt Leute im oberen Bereich der Suche an, die du häufig kontaktiert hast.</value>\n  </data>\n  <data name=\"SuggestFrequentContactsNotification\" xml:space=\"preserve\">\n    <value>Das löscht alle Daten über Personen mit denen du häufig chattest, sowie Vorschläge für Inline-Bots.</value>\n  </data>\n  <data name=\"ViewContact\" xml:space=\"preserve\">\n    <value>Kontakt anzeigen</value>\n  </data>\n  <data name=\"PhoneKindHome\" xml:space=\"preserve\">\n    <value>Zuhause</value>\n  </data>\n  <data name=\"PhoneKindMobile\" xml:space=\"preserve\">\n    <value>Mobil</value>\n  </data>\n  <data name=\"PhoneKindOther\" xml:space=\"preserve\">\n    <value>Sonstiges</value>\n  </data>\n  <data name=\"PhoneKindWork\" xml:space=\"preserve\">\n    <value>Arbeit</value>\n  </data>\n  <data name=\"PassportAddAgreement\" xml:space=\"preserve\">\n    <value>Mietvertrag hinzufügen</value>\n  </data>\n  <data name=\"PassportAddAgreementInfo\" xml:space=\"preserve\">\n    <value>Scan deines Mietvertrages hochladen.</value>\n  </data>\n  <data name=\"PassportAddBank\" xml:space=\"preserve\">\n    <value>Kontoauszug hinzufügen</value>\n  </data>\n  <data name=\"PassportAddBankInfo\" xml:space=\"preserve\">\n    <value>Scan deines Kontoauszugs hochladen.</value>\n  </data>\n  <data name=\"PassportAddBill\" xml:space=\"preserve\">\n    <value>Versorgerrechnung hinzufügen</value>\n  </data>\n  <data name=\"PassportAddBillInfo\" xml:space=\"preserve\">\n    <value>Scan deiner Versorgerrechnung hochladen.</value>\n  </data>\n  <data name=\"PassportAddPassportRegistration\" xml:space=\"preserve\">\n    <value>Reisepass-Registrierung</value>\n  </data>\n  <data name=\"PassportAddPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>Scan deiner Reisepass-Registrierung hochladen.</value>\n  </data>\n  <data name=\"PassportAddressHeader\" xml:space=\"preserve\">\n    <value>Adresse</value>\n  </data>\n  <data name=\"PassportCity\" xml:space=\"preserve\">\n    <value>Stadt</value>\n  </data>\n  <data name=\"PassportCountry\" xml:space=\"preserve\">\n    <value>Land</value>\n  </data>\n  <data name=\"PassportDeleteDocument\" xml:space=\"preserve\">\n    <value>Dokument löschen</value>\n  </data>\n  <data name=\"PassportDeleteDocumentAlert\" xml:space=\"preserve\">\n    <value>Bist du sicher, dass du dieses Dokument wirklich löschen willst?</value>\n  </data>\n  <data name=\"PassportDeleteScan\" xml:space=\"preserve\">\n    <value>Scan löschen?</value>\n  </data>\n  <data name=\"PassportDocuments\" xml:space=\"preserve\">\n    <value>Scans</value>\n  </data>\n  <data name=\"PassportPostcode\" xml:space=\"preserve\">\n    <value>PLZ</value>\n  </data>\n  <data name=\"PassportState\" xml:space=\"preserve\">\n    <value>Bundesland</value>\n  </data>\n  <data name=\"PassportStreet1\" xml:space=\"preserve\">\n    <value>Straße</value>\n  </data>\n  <data name=\"PassportStreet2\" xml:space=\"preserve\">\n    <value>Straße</value>\n  </data>\n  <data name=\"PassportUploadAdditinalDocument\" xml:space=\"preserve\">\n    <value>Weitere Scans hochladen</value>\n  </data>\n  <data name=\"PassportUploadDocument\" xml:space=\"preserve\">\n    <value>Scans hochladen</value>\n  </data>\n  <data name=\"PassportDeleteScanAlert\" xml:space=\"preserve\">\n    <value>Möchtest du diesen Scan wirklich löschen?</value>\n  </data>\n  <data name=\"PassportEmailInfo\" xml:space=\"preserve\">\n    <value>Deine E-Mail Adresse eingeben</value>\n  </data>\n  <data name=\"PassportPhoneInfo\" xml:space=\"preserve\">\n    <value>Deine Telefonnummer eingeben</value>\n  </data>\n  <data name=\"UpdateApp\" xml:space=\"preserve\">\n    <value>App aktualisieren</value>\n  </data>\n  <data name=\"PassportPhone\" xml:space=\"preserve\">\n    <value>Telefonnummer</value>\n  </data>\n  <data name=\"PassportPhoneUploadInfo\" xml:space=\"preserve\">\n    <value>Dir wird ein Bestätigungscode an die Nummer gesendet.</value>\n  </data>\n  <data name=\"PassportPhoneUseOther\" xml:space=\"preserve\">\n    <value>Oder neue Telefonnummer eingeben</value>\n  </data>\n  <data name=\"PassportPhoneUseSame\" xml:space=\"preserve\">\n    <value>{0} verwenden</value>\n  </data>\n  <data name=\"PassportPhoneUseSameInfo\" xml:space=\"preserve\">\n    <value>Gleiche Telefonnummer wie bei Telegram verwenden.</value>\n  </data>\n  <data name=\"PassportDeletePhoneNumberAlert\" xml:space=\"preserve\">\n    <value>Wirklich diese Telefonnummer löschen?</value>\n  </data>\n  <data name=\"MessageActionSecureValuesSent\" xml:space=\"preserve\">\n    <value>{0} hat die folgenden Dokumente erhalten: {1}</value>\n  </data>\n  <data name=\"DeleteAllCloudDrafts\" xml:space=\"preserve\">\n    <value>Alle Cloud-Entwürfe löschen</value>\n  </data>\n  <data name=\"DeleteAllCloudDraftsConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du wirklich alle Cloud-Entwürfe löschen?</value>\n  </data>\n  <data name=\"PassportRequestPasswordInfo\" xml:space=\"preserve\">\n    <value>Dein Telegram-Kennwort wird benötigt, um deine Daten zu entschlüsseln.</value>\n  </data>\n  <data name=\"PassportSelfRequest\" xml:space=\"preserve\">\n    <value>Bitte dein Kennwort eingeben, damit du auf deine persönlichen Daten zugreifen kannst.</value>\n  </data>\n  <data name=\"PassportDelete\" xml:space=\"preserve\">\n    <value>Löschen</value>\n  </data>\n  <data name=\"PassportNoDocumentsAdd\" xml:space=\"preserve\">\n    <value>Dokument hinzufügen</value>\n  </data>\n  <data name=\"PassportEmail\" xml:space=\"preserve\">\n    <value>E-Mail</value>\n  </data>\n  <data name=\"PassportPersonal\" xml:space=\"preserve\">\n    <value>Persönliche Daten</value>\n  </data>\n  <data name=\"PassportUtilityBill\" xml:space=\"preserve\">\n    <value>Versorgerrechnung</value>\n  </data>\n  <data name=\"PassportProvidedInformation\" xml:space=\"preserve\">\n    <value>Hinterlegte Informationen</value>\n  </data>\n  <data name=\"PassportRequestedInformation\" xml:space=\"preserve\">\n    <value>Angeforderte Informationen</value>\n  </data>\n  <data name=\"PassportDeleteConfirmation\" xml:space=\"preserve\">\n    <value>Möchtest du wirklich deinen Telegram Passport löschen?</value>\n  </data>\n  <data name=\"Passport\" xml:space=\"preserve\">\n    <value>Passport</value>\n  </data>\n  <data name=\"PassportBankStatement\" xml:space=\"preserve\">\n    <value>Kontoauszug</value>\n  </data>\n  <data name=\"PassportDriverLicence\" xml:space=\"preserve\">\n    <value>Führerschein</value>\n  </data>\n  <data name=\"PassportEmailAddress\" xml:space=\"preserve\">\n    <value>E-Mail-Adresse</value>\n  </data>\n  <data name=\"PassportIdentityCard\" xml:space=\"preserve\">\n    <value>Personalausweis</value>\n  </data>\n  <data name=\"PassportInternal\" xml:space=\"preserve\">\n    <value>Nationaler Reisepass</value>\n  </data>\n  <data name=\"PassportPersonalDetails\" xml:space=\"preserve\">\n    <value>Persönliche Daten</value>\n  </data>\n  <data name=\"PassportPhoneNumber\" xml:space=\"preserve\">\n    <value>Telefonnummer</value>\n  </data>\n  <data name=\"PassportRegistration\" xml:space=\"preserve\">\n    <value>Reisepass-Registrierung</value>\n  </data>\n  <data name=\"PassportTemporaryRegistration\" xml:space=\"preserve\">\n    <value>Vorläufige Registrierung</value>\n  </data>\n  <data name=\"PassportTenancyAgreement\" xml:space=\"preserve\">\n    <value>Mietvertrag</value>\n  </data>\n  <data name=\"PassportDeleteEmailAlert\" xml:space=\"preserve\">\n    <value>Deine E-Mail löschen?</value>\n  </data>\n  <data name=\"PassportDeleteAll\" xml:space=\"preserve\">\n    <value>Telegram Passport löschen</value>\n  </data>\n  <data name=\"PassportDeleteAddressAlert\" xml:space=\"preserve\">\n    <value>Deine Adressinformationen wirklich löschen?</value>\n  </data>\n  <data name=\"PassportAddTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Scan deiner temporären Registrierung hochladen.</value>\n  </data>\n  <data name=\"PassportResidentialAddress\" xml:space=\"preserve\">\n    <value>Wohnsitzadresse</value>\n  </data>\n  <data name=\"PassportDeleteAddressDetails\" xml:space=\"preserve\">\n    <value>Adressinformationen löschen</value>\n  </data>\n  <data name=\"PassportUploadMaxReached\" xml:space=\"preserve\">\n    <value>Nicht mehr als {0} Dateien können hochgeladen werden.</value>\n  </data>\n  <data name=\"PassportCorrectErrors\" xml:space=\"preserve\">\n    <value>Antippen, um Fehler zu korrigieren.</value>\n  </data>\n  <data name=\"PassportUseLatinOnly\" xml:space=\"preserve\">\n    <value>Bitte nur lateinische Schriftzeichen benutzen.</value>\n  </data>\n  <data name=\"PassportInfo\" xml:space=\"preserve\">\n    <value>Mit Telegram Passport kannst du dich ganz einfach bei Webseiten und Diensten anmelden, die eine Identitätsprüfung erfordern.\n\nDeine Informationen, persönlichen Daten und Dokumente sind durch Ende-zu-Ende-Verschlüsselung geschützt. Niemand, einschließlich Telegram, kann ohne deine Erlaubnis darauf zugreifen.\n\nMehr dazu in unseren FAQs.</value>\n  </data>\n  <data name=\"PassportFormError\" xml:space=\"preserve\">\n    <value>Autorisierungsformular konnte nicht geladen werden.</value>\n  </data>\n  <data name=\"TurnPasswordOffPassport\" xml:space=\"preserve\">\n    <value>Warnung! Alle Daten in deinem Telegram Passport gehen verloren!</value>\n  </data>\n  <data name=\"TurnPasswordOffQuestion\" xml:space=\"preserve\">\n    <value>Sicher, dass du dein Kennwort deaktivieren willst?</value>\n  </data>\n  <data name=\"PassportNoDocuments\" xml:space=\"preserve\">\n    <value>Du hast noch keine Dokumente</value>\n  </data>\n  <data name=\"PassportNoDocumentsInfo\" xml:space=\"preserve\">\n    <value>Du kannst deine Telefonnummer, E-Mail-Adresse, Identitätsdokument oder Wohnadresse hinzufügen.</value>\n  </data>\n  <data name=\"TelegramPassportCreatePassword\" xml:space=\"preserve\">\n    <value>Ein Kennwort erstellen</value>\n  </data>\n  <data name=\"TelegramPassportCreatePasswordInfo\" xml:space=\"preserve\">\n    <value>Bitte Kennwort einrichten, um deine persönlichen Daten mit Ende-zu-Ende-Verschlüsselung zu schützen.\n\nDas Kennwort wird außerdem benötigt, wenn du dich mit Telegram von einem neuen Gerät verbindest.</value>\n  </data>\n  <data name=\"PassportEmailUploadInfo\" xml:space=\"preserve\">\n    <value>Du bekommst einen Bestätigungscode per E-Mail gesendet.</value>\n  </data>\n  <data name=\"PassportEmailUseSameInfo\" xml:space=\"preserve\">\n    <value>Gleiche E-Mail wie bei Telegram verwenden.</value>\n  </data>\n  <data name=\"EmailInvalidString\" xml:space=\"preserve\">\n    <value>Ungültige E-Mail-Adresse. Bitte erneut versuchen.</value>\n  </data>\n  <data name=\"PassportEmailVerifyInfo\" xml:space=\"preserve\">\n    <value>Bitte den Code eintippen, der dir gerade an {0} gesendet wurde.</value>\n  </data>\n  <data name=\"EmailCodeEmpty\" xml:space=\"preserve\">\n    <value>Code ist leer. Bitte erneut versuchen.</value>\n  </data>\n  <data name=\"EmailCodeExpiredString\" xml:space=\"preserve\">\n    <value>Code ist abgelaufen. Bitte erneut versuchen.</value>\n  </data>\n  <data name=\"EmailCodeInvalidString\" xml:space=\"preserve\">\n    <value>Du hast einen ungültigen Code eingegeben. Bitte erneut versuchen.</value>\n  </data>\n  <data name=\"PassportBirthdate\" xml:space=\"preserve\">\n    <value>Geburtsdatum</value>\n  </data>\n  <data name=\"PassportCitizenship\" xml:space=\"preserve\">\n    <value>Staatsangehörigkeit</value>\n  </data>\n  <data name=\"PassportFemale\" xml:space=\"preserve\">\n    <value>Weiblich</value>\n  </data>\n  <data name=\"PassportGender\" xml:space=\"preserve\">\n    <value>Geschlecht</value>\n  </data>\n  <data name=\"PassportMale\" xml:space=\"preserve\">\n    <value>Männlich</value>\n  </data>\n  <data name=\"PassportName\" xml:space=\"preserve\">\n    <value>Name</value>\n  </data>\n  <data name=\"PassportResidence\" xml:space=\"preserve\">\n    <value>Wohnsitz</value>\n  </data>\n  <data name=\"PassportSurname\" xml:space=\"preserve\">\n    <value>Nachname</value>\n  </data>\n  <data name=\"PassportSelectGender\" xml:space=\"preserve\">\n    <value>Geschlecht auswählen</value>\n  </data>\n  <data name=\"PassportSelectDate\" xml:space=\"preserve\">\n    <value>Datum auswählen</value>\n  </data>\n  <data name=\"PassportDocumentNumber\" xml:space=\"preserve\">\n    <value>Ausweisnummer</value>\n  </data>\n  <data name=\"PassportExpired\" xml:space=\"preserve\">\n    <value>Ablaufdatum</value>\n  </data>\n  <data name=\"PassportFrontSide\" xml:space=\"preserve\">\n    <value>Vorderseite</value>\n  </data>\n  <data name=\"PassportFrontSideInfo\" xml:space=\"preserve\">\n    <value>Foto der Vorderseite des Dokuments hochladen</value>\n  </data>\n  <data name=\"PassportPersonalUploadInfo\" xml:space=\"preserve\">\n    <value>Das Dokument muss dein Foto, Vor- und Nachname, Geburtsdatum, Ausweisnummer, Ausstellungsort und Ablaufdatum beinhalten.</value>\n  </data>\n  <data name=\"PassportRequiredDocuments\" xml:space=\"preserve\">\n    <value>Notwendige Dokumente</value>\n  </data>\n  <data name=\"PassportReverseSide\" xml:space=\"preserve\">\n    <value>Rückseite</value>\n  </data>\n  <data name=\"PassportReverseSideInfo\" xml:space=\"preserve\">\n    <value>Foto der Rückseite des Dokuments hochladen</value>\n  </data>\n  <data name=\"PassportSelfie\" xml:space=\"preserve\">\n    <value>Selfie</value>\n  </data>\n  <data name=\"PassportSelfieInfo\" xml:space=\"preserve\">\n    <value>Selfie von dir mit dem Dokument hochladen</value>\n  </data>\n  <data name=\"PassportSelectNotExpire\" xml:space=\"preserve\">\n    <value>Läuft nicht ab</value>\n  </data>\n  <data name=\"PassportDeleteDocumentPersonal\" xml:space=\"preserve\">\n    <value>Persönliche Daten löschen</value>\n  </data>\n  <data name=\"PassportMainPage\" xml:space=\"preserve\">\n    <value>Hauptseite</value>\n  </data>\n  <data name=\"PassportMainPageInfo\" xml:space=\"preserve\">\n    <value>Foto der Hauptseite des Dokuments hochladen</value>\n  </data>\n  <data name=\"PassportNoExpireDate\" xml:space=\"preserve\">\n    <value>Keines</value>\n  </data>\n  <data name=\"UpdateAppAlert\" xml:space=\"preserve\">\n    <value>Deine Telegram-App ist leider veraltet und kann diese Anfrage nicht verarbeiten. Bitte aktualisiere Telegram.</value>\n  </data>\n  <data name=\"PassportInfoTitle\" xml:space=\"preserve\">\n    <value>Was ist Telegram Passport?</value>\n  </data>\n  <data name=\"Copyright\" xml:space=\"preserve\">\n    <value>Copyright</value>\n  </data>\n  <data name=\"PassportAddTranslationDriverLicenceInfo\" xml:space=\"preserve\">\n    <value>Scans einer beglaubigten englischen Übersetzung deines Führerscheins hochladen.</value>\n  </data>\n  <data name=\"PassportAddTranslationIdentityCardInfo\" xml:space=\"preserve\">\n    <value>Scans einer beglaubigten englischen Übersetzung deines Personalausweises hochladen.</value>\n  </data>\n  <data name=\"PassportAddTranslationInternalPassportInfo\" xml:space=\"preserve\">\n    <value>Scans einer beglaubigten englischen Übersetzung deines nationalen Reisespasses hochladen.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportInfo\" xml:space=\"preserve\">\n    <value>Scans einer beglaubigten englischen Übersetzung deines Reisepasses hochladen.</value>\n  </data>\n  <data name=\"PassportAddTranslationAgreementInfo\" xml:space=\"preserve\">\n    <value>Scans einer beglaubigten englischen Übersetzung deines Mietvertrages hochladen.</value>\n  </data>\n  <data name=\"PassportAddTranslationBankInfo\" xml:space=\"preserve\">\n    <value>Scans einer beglaubigten englischen Übersetzung deines Kontoauszugs hochladen.</value>\n  </data>\n  <data name=\"PassportAddTranslationBillInfo\" xml:space=\"preserve\">\n    <value>Scans einer beglaubigten englischen Übersetzung deiner Versorgerrechnung hochladen.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>Scans einer beglaubigten englischen Übersetzung deiner Reisepass-Registrierungsseite hochladen.</value>\n  </data>\n  <data name=\"PassportAddTranslationTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Scans einer beglaubigten englischen Übersetzung deiner temporären Registrierung hochladen.</value>\n  </data>\n  <data name=\"PassportAddTranslationUploadInfo\" xml:space=\"preserve\">\n    <value>Scans einer beglaubigten englischen Übersetzung des Dokumentes hochladen.</value>\n  </data>\n  <data name=\"PassportTranslation\" xml:space=\"preserve\">\n    <value>Übersetzung</value>\n  </data>\n  <data name=\"PassportDataCorrupted\" xml:space=\"preserve\">\n    <value>Scheinbar wurden deine Telegram Passport Daten beschädigt.\nDu kannst dein Telegram Passport zurücksetzen.</value>\n  </data>\n  <data name=\"PassportOr\" xml:space=\"preserve\">\n    <value>{0} oder {1}</value>\n  </data>\n  <data name=\"PassportIdentityDocument\" xml:space=\"preserve\">\n    <value>Identitätsdokument</value>\n  </data>\n  <data name=\"PassportAddressNoUploadInfo\" xml:space=\"preserve\">\n    <value>Bitte Adresse eingeben</value>\n  </data>\n  <data name=\"PassportIdentityDocumentInfo\" xml:space=\"preserve\">\n    <value>Scan deines Ausweises hochladen</value>\n  </data>\n  <data name=\"PassportIdentityDriverLicence\" xml:space=\"preserve\">\n    <value>Scan deines Führerscheins hochladen</value>\n  </data>\n  <data name=\"PassportIdentityID\" xml:space=\"preserve\">\n    <value>Scan deines Personalausweises hochladen</value>\n  </data>\n  <data name=\"PassportIdentityInternalPassport\" xml:space=\"preserve\">\n    <value>Scan deines nationalen Reisepasses hochladen</value>\n  </data>\n  <data name=\"PassportIdentityPassport\" xml:space=\"preserve\">\n    <value>Scan deines Reisepasses hochladen</value>\n  </data>\n  <data name=\"PassportMidname\" xml:space=\"preserve\">\n    <value>Zwischenname</value>\n  </data>\n  <data name=\"PassportMidnameCountry\" xml:space=\"preserve\">\n    <value>Zwischenname ({0})</value>\n  </data>\n  <data name=\"PassportMidnameLatin\" xml:space=\"preserve\">\n    <value>Zwischenname (Latein)</value>\n  </data>\n  <data name=\"PassportNameCountry\" xml:space=\"preserve\">\n    <value>Name ({0})</value>\n  </data>\n  <data name=\"PassportNameLatin\" xml:space=\"preserve\">\n    <value>Name (Latein)</value>\n  </data>\n  <data name=\"PassportNativeHeader\" xml:space=\"preserve\">\n    <value>Dein Name</value>\n  </data>\n  <data name=\"PassportNativeInfo\" xml:space=\"preserve\">\n    <value>Dein Name in der Sprache deines Wohnsitzlandes ({0}).</value>\n  </data>\n  <data name=\"PassportSurnameCountry\" xml:space=\"preserve\">\n    <value>Nachname ({0})</value>\n  </data>\n  <data name=\"PassportSurnameLatin\" xml:space=\"preserve\">\n    <value>Nachname (Latein)</value>\n  </data>\n</root>\n"
  },
  {
    "path": "TelegramClient/Resources/AppResources.es.Designer.cs",
    "content": ""
  },
  {
    "path": "TelegramClient/Resources/AppResources.es.resx",
    "content": "﻿<?xml version='1.0' encoding='UTF-8'?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" id=\"root\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/>\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"AppName\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"BlockContact\" xml:space=\"preserve\">\n    <value>Bloquear</value>\n  </data>\n  <data name=\"BlockedUsers\" xml:space=\"preserve\">\n    <value>Bloqueados</value>\n  </data>\n  <data name=\"Call\" xml:space=\"preserve\">\n    <value>Llamar</value>\n  </data>\n  <data name=\"Contacts\" xml:space=\"preserve\">\n    <value>Contactos</value>\n  </data>\n  <data name=\"Copy\" xml:space=\"preserve\">\n    <value>Copiar</value>\n  </data>\n  <data name=\"Delete\" xml:space=\"preserve\">\n    <value>Eliminar</value>\n  </data>\n  <data name=\"Dialogs\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"Forward\" xml:space=\"preserve\">\n    <value>Reenviar</value>\n  </data>\n  <data name=\"Loading\" xml:space=\"preserve\">\n    <value>Cargando...</value>\n  </data>\n  <data name=\"Login\" xml:space=\"preserve\">\n    <value>Entrar</value>\n  </data>\n  <data name=\"Refresh\" xml:space=\"preserve\">\n    <value>Actualizar</value>\n  </data>\n  <data name=\"Retry\" xml:space=\"preserve\">\n    <value>Volver a intentar</value>\n  </data>\n  <data name=\"Send\" xml:space=\"preserve\">\n    <value>Enviar</value>\n  </data>\n  <data name=\"Sending\" xml:space=\"preserve\">\n    <value>Enviando</value>\n  </data>\n  <data name=\"SendingFailed\" xml:space=\"preserve\">\n    <value>No se puede enviar</value>\n  </data>\n  <data name=\"SendMessage\" xml:space=\"preserve\">\n    <value>Enviar mensaje</value>\n  </data>\n  <data name=\"Settings\" xml:space=\"preserve\">\n    <value>Ajustes</value>\n  </data>\n  <data name=\"ShareContact\" xml:space=\"preserve\">\n    <value>Compartir contacto</value>\n  </data>\n  <data name=\"SignIn\" xml:space=\"preserve\">\n    <value>Iniciar sesión</value>\n  </data>\n  <data name=\"UnblockContact\" xml:space=\"preserve\">\n    <value>Desbloquear</value>\n  </data>\n  <data name=\"Yesterday\" xml:space=\"preserve\">\n    <value>Ayer</value>\n  </data>\n  <data name=\"YourMessage\" xml:space=\"preserve\">\n    <value>Escribe tu mensaje</value>\n  </data>\n  <data name=\"LogOut\" xml:space=\"preserve\">\n    <value>Cerrar sesión</value>\n  </data>\n  <data name=\"NoMessagesYet\" xml:space=\"preserve\">\n    <value>No hay mensajes aún...</value>\n  </data>\n  <data name=\"Confirm\" xml:space=\"preserve\">\n    <value>Confirmar</value>\n  </data>\n  <data name=\"DeleteChatConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar este chat?</value>\n  </data>\n  <data name=\"Contact\" xml:space=\"preserve\">\n    <value>Contacto</value>\n  </data>\n  <data name=\"EmptyMessage\" xml:space=\"preserve\">\n    <value>Mensaje eliminado</value>\n  </data>\n  <data name=\"ForwardedMessage\" xml:space=\"preserve\">\n    <value>Reenviado desde</value>\n  </data>\n  <data name=\"GeoPoint\" xml:space=\"preserve\">\n    <value>Ubicación</value>\n  </data>\n  <data name=\"Photo\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"Video\" xml:space=\"preserve\">\n    <value>Vídeo</value>\n  </data>\n  <data name=\"ComposeMessage\" xml:space=\"preserve\">\n    <value>Nuevo mensaje</value>\n  </data>\n  <data name=\"Search\" xml:space=\"preserve\">\n    <value>Buscar</value>\n  </data>\n  <data name=\"ServiceMessage\" xml:space=\"preserve\">\n    <value>Mensaje de servicio</value>\n  </data>\n  <data name=\"UnsupportedMedia\" xml:space=\"preserve\">\n    <value>Tu versión de Telegram no soporta este mensaje. Por favor, actualiza tu app para verlo: http://telegram.org/update</value>\n  </data>\n  <data name=\"Unread\" xml:space=\"preserve\">\n    <value>No leído</value>\n  </data>\n  <data name=\"IsTyping\" xml:space=\"preserve\">\n    <value>Está escribiendo</value>\n  </data>\n  <data name=\"Online\" xml:space=\"preserve\">\n    <value>En línea</value>\n  </data>\n  <data name=\"User\" xml:space=\"preserve\">\n    <value>Usuario</value>\n  </data>\n  <data name=\"MessageActionChatCreate\" xml:space=\"preserve\">\n    <value>{0} creó el grupo \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionChatEditTitle\" xml:space=\"preserve\">\n    <value>{0} ha cambiado el nombre del grupo a \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionChatEditPhoto\" xml:space=\"preserve\">\n    <value>{0} actualizó la foto del grupo</value>\n  </data>\n  <data name=\"MessageActionChatDeletePhoto\" xml:space=\"preserve\">\n    <value>{0} ha eliminado la foto del grupo</value>\n  </data>\n  <data name=\"MessageActionChatAddUser\" xml:space=\"preserve\">\n    <value>{0} invitó a {1}</value>\n  </data>\n  <data name=\"MessageActionChatDeleteUser\" xml:space=\"preserve\">\n    <value>{0} ha eliminado a {1}</value>\n  </data>\n  <data name=\"MessageActionEmpty\" xml:space=\"preserve\">\n    <value>Mensaje de servicio vacío</value>\n  </data>\n  <data name=\"CompanyNominative\" xml:space=\"preserve\">\n    <value>Miembro</value>\n  </data>\n  <data name=\"CompanyGenitivePlural\" xml:space=\"preserve\">\n    <value>Miembros</value>\n  </data>\n  <data name=\"CompanyGenitiveSingular\" xml:space=\"preserve\">\n    <value>Miembro</value>\n  </data>\n  <data name=\"PeopleInTheConversation\" xml:space=\"preserve\">\n    <value>{0} miembros</value>\n  </data>\n  <data name=\"Offline\" xml:space=\"preserve\">\n    <value>Fuera de línea</value>\n  </data>\n  <data name=\"Today\" xml:space=\"preserve\">\n    <value>Hoy</value>\n  </data>\n  <data name=\"LastSeenAt\" xml:space=\"preserve\">\n    <value>Últ. vez el {0} a las {1}</value>\n  </data>\n  <data name=\"LastSeen\" xml:space=\"preserve\">\n    <value>últ. vez hace {0} </value>\n  </data>\n  <data name=\"MinuteAccusative\" xml:space=\"preserve\">\n    <value>minuto</value>\n  </data>\n  <data name=\"MinuteGenitiveSingular\" xml:space=\"preserve\">\n    <value>minuto</value>\n  </data>\n  <data name=\"MinuteGenitivePlural\" xml:space=\"preserve\">\n    <value>minutos</value>\n  </data>\n  <data name=\"Attach\" xml:space=\"preserve\">\n    <value>Adjuntar</value>\n  </data>\n  <data name=\"Manage\" xml:space=\"preserve\">\n    <value>Administrar</value>\n  </data>\n  <data name=\"Ok\" xml:space=\"preserve\">\n    <value>Ok</value>\n  </data>\n  <data name=\"Cancel\" xml:space=\"preserve\">\n    <value>Cancelar</value>\n  </data>\n  <data name=\"Select\" xml:space=\"preserve\">\n    <value>Seleccionar</value>\n  </data>\n  <data name=\"MapAccusative\" xml:space=\"preserve\">\n    <value>Mi ubicación</value>\n  </data>\n  <data name=\"PhotoAccusative\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"Add\" xml:space=\"preserve\">\n    <value>Añadir</value>\n  </data>\n  <data name=\"NewGroup\" xml:space=\"preserve\">\n    <value>Nuevo grupo</value>\n  </data>\n  <data name=\"NewSecretChat\" xml:space=\"preserve\">\n    <value>Nuevo chat secreto</value>\n  </data>\n  <data name=\"TileUpdaterTaskDescription\" xml:space=\"preserve\">\n    <value>Tarea programada para actualizar el número de mensajes no leídos en el live tile.</value>\n  </data>\n  <data name=\"Media\" xml:space=\"preserve\">\n    <value>Multimedia</value>\n  </data>\n  <data name=\"Profile\" xml:space=\"preserve\">\n    <value>Información</value>\n  </data>\n  <data name=\"Notifications\" xml:space=\"preserve\">\n    <value>Notificaciones</value>\n  </data>\n  <data name=\"On\" xml:space=\"preserve\">\n    <value>Activado</value>\n  </data>\n  <data name=\"Off\" xml:space=\"preserve\">\n    <value>Desactivado</value>\n  </data>\n  <data name=\"Sound\" xml:space=\"preserve\">\n    <value>Sonido</value>\n  </data>\n  <data name=\"CreateSecretChat\" xml:space=\"preserve\">\n    <value>Iniciar chat secreto</value>\n  </data>\n  <data name=\"MessageNotifications\" xml:space=\"preserve\">\n    <value>Notificaciones de mensajes</value>\n  </data>\n  <data name=\"ChatNotifications\" xml:space=\"preserve\">\n    <value>Notificaciones del chat</value>\n  </data>\n  <data name=\"NotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Silenciar, vista previa de mensajes, chats</value>\n  </data>\n  <data name=\"Support\" xml:space=\"preserve\">\n    <value>Soporte</value>\n  </data>\n  <data name=\"AskAQuestion\" xml:space=\"preserve\">\n    <value>Hacer una pregunta</value>\n  </data>\n  <data name=\"InAppNotifications\" xml:space=\"preserve\">\n    <value>Notificaciones en la app</value>\n  </data>\n  <data name=\"OnPlural\" xml:space=\"preserve\">\n    <value>Activadas</value>\n  </data>\n  <data name=\"OffPlural\" xml:space=\"preserve\">\n    <value>Desactivadas</value>\n  </data>\n  <data name=\"OnFeminine\" xml:space=\"preserve\">\n    <value>Activar</value>\n  </data>\n  <data name=\"OffFeminine\" xml:space=\"preserve\">\n    <value>Desactivar</value>\n  </data>\n  <data name=\"InAppSounds\" xml:space=\"preserve\">\n    <value>Sonidos en la app</value>\n  </data>\n  <data name=\"InAppVibrate\" xml:space=\"preserve\">\n    <value>Vibración en la app</value>\n  </data>\n  <data name=\"InAppPreview\" xml:space=\"preserve\">\n    <value>Vista previa en la app</value>\n  </data>\n  <data name=\"ResetAllNotifications\" xml:space=\"preserve\">\n    <value>Restablecer todas las notificaciones</value>\n  </data>\n  <data name=\"ResetAllNotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Deshacer las notificaciones personalizadas para todos tus usuarios y grupos</value>\n  </data>\n  <data name=\"OnMasculine\" xml:space=\"preserve\">\n    <value>Activado</value>\n  </data>\n  <data name=\"OffMasculine\" xml:space=\"preserve\">\n    <value>Desactivado</value>\n  </data>\n  <data name=\"GroupNotifications\" xml:space=\"preserve\">\n    <value>Notificaciones de grupo</value>\n  </data>\n  <data name=\"Alert\" xml:space=\"preserve\">\n    <value>Alerta</value>\n  </data>\n  <data name=\"MessagePreview\" xml:space=\"preserve\">\n    <value>Vista previa de mensajes</value>\n  </data>\n  <data name=\"SaveIncomingPhotos\" xml:space=\"preserve\">\n    <value>Guardar las fotos recibidas</value>\n  </data>\n  <data name=\"Create\" xml:space=\"preserve\">\n    <value>Crear</value>\n  </data>\n  <data name=\"Share\" xml:space=\"preserve\">\n    <value>Compartir</value>\n  </data>\n  <data name=\"Edit\" xml:space=\"preserve\">\n    <value>Editar</value>\n  </data>\n  <data name=\"CompanyNominativeSingular\" xml:space=\"preserve\">\n    <value>Miembro</value>\n  </data>\n  <data name=\"CompanyNominativePlural\" xml:space=\"preserve\">\n    <value>Miembros</value>\n  </data>\n  <data name=\"PictureAccusative\" xml:space=\"preserve\">\n    <value>Imagen</value>\n  </data>\n  <data name=\"ContactAccusative\" xml:space=\"preserve\">\n    <value>Contacto</value>\n  </data>\n  <data name=\"DocumentAccusative\" xml:space=\"preserve\">\n    <value>Archivo</value>\n  </data>\n  <data name=\"AttachCaption\" xml:space=\"preserve\">\n    <value>Adjuntar</value>\n  </data>\n  <data name=\"LocationAccusative\" xml:space=\"preserve\">\n    <value>Ubicación</value>\n  </data>\n  <data name=\"VideoAccusative\" xml:space=\"preserve\">\n    <value>Vídeo</value>\n  </data>\n  <data name=\"NoMediaHere\" xml:space=\"preserve\">\n    <value>No hay fotos ni vídeos</value>\n  </data>\n  <data name=\"ChooseAnItem\" xml:space=\"preserve\">\n    <value>Elegir</value>\n  </data>\n  <data name=\"NoUsersHere\" xml:space=\"preserve\">\n    <value>No hay usuarios</value>\n  </data>\n  <data name=\"NoContactsHere\" xml:space=\"preserve\">\n    <value>No hay contactos</value>\n  </data>\n  <data name=\"Title\" xml:space=\"preserve\">\n    <value>Nombre</value>\n  </data>\n  <data name=\"Done\" xml:space=\"preserve\">\n    <value>Hecho</value>\n  </data>\n  <data name=\"AddParticipant\" xml:space=\"preserve\">\n    <value>Añadir miembro</value>\n  </data>\n  <data name=\"DeleteAndExitGroup\" xml:space=\"preserve\">\n    <value>Eliminar y salir del grupo</value>\n  </data>\n  <data name=\"MessageActionUserLeftGroup\" xml:space=\"preserve\">\n    <value>{0} ha salido del grupo</value>\n  </data>\n  <data name=\"MessageUser\" xml:space=\"preserve\">\n    <value>Mensaje {0}</value>\n  </data>\n  <data name=\"ViewUser\" xml:space=\"preserve\">\n    <value>Ver {0}</value>\n  </data>\n  <data name=\"SearchAmongYourDialogsAndMessages\" xml:space=\"preserve\">\n    <value>Buscar chats y mensajes</value>\n  </data>\n  <data name=\"Messages\" xml:space=\"preserve\">\n    <value>Mensajes</value>\n  </data>\n  <data name=\"NoMessagesHere\" xml:space=\"preserve\">\n    <value>No hay mensajes</value>\n  </data>\n  <data name=\"NoResults\" xml:space=\"preserve\">\n    <value>No hay resultados</value>\n  </data>\n  <data name=\"Conversations\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"EditName\" xml:space=\"preserve\">\n    <value>Editar nombre</value>\n  </data>\n  <data name=\"Save\" xml:space=\"preserve\">\n    <value>Guardar</value>\n  </data>\n  <data name=\"About\" xml:space=\"preserve\">\n    <value>Acerca de</value>\n  </data>\n  <data name=\"Version\" xml:space=\"preserve\">\n    <value>Versión</value>\n  </data>\n  <data name=\"YourPhone\" xml:space=\"preserve\">\n    <value>Tu teléfono</value>\n  </data>\n  <data name=\"SignInMessage\" xml:space=\"preserve\">\n    <value>Por favor, confirma el código de país e introduce tu número de teléfono.</value>\n  </data>\n  <data name=\"Your phone number\" xml:space=\"preserve\">\n    <value>Tu número de teléfono</value>\n  </data>\n  <data name=\"Next\" xml:space=\"preserve\">\n    <value>Siguiente</value>\n  </data>\n  <data name=\"Country\" xml:space=\"preserve\">\n    <value>País</value>\n  </data>\n  <data name=\"YourCode\" xml:space=\"preserve\">\n    <value>Tu código</value>\n  </data>\n  <data name=\"ConfirmMessage\" xml:space=\"preserve\">\n    <value>Enviamos un SMS con el código de activación al número **{0}**</value>\n  </data>\n  <data name=\"WeWillCallYou\" xml:space=\"preserve\">\n    <value>Te llamaremos en {0}</value>\n  </data>\n  <data name=\"Code\" xml:space=\"preserve\">\n    <value>Código</value>\n  </data>\n  <data name=\"FirstName\" xml:space=\"preserve\">\n    <value>Nombre</value>\n  </data>\n  <data name=\"LastName\" xml:space=\"preserve\">\n    <value>Apellidos (opcional)</value>\n  </data>\n  <data name=\"YourName\" xml:space=\"preserve\">\n    <value>Tu nombre</value>\n  </data>\n  <data name=\"SignUpMessage\" xml:space=\"preserve\">\n    <value>Escribe tu nombre y añade una imagen de perfil.</value>\n  </data>\n  <data name=\"AddPhoto\" xml:space=\"preserve\">\n    <value>Añadir foto</value>\n  </data>\n  <data name=\"NoDialogsHere\" xml:space=\"preserve\">\n    <value>No hay chats aquí</value>\n  </data>\n  <data name=\"StartMessaging\" xml:space=\"preserve\">\n    <value>Empieza a chatear</value>\n  </data>\n  <data name=\"Intro1Message\" xml:space=\"preserve\">\n    <value>Te damos la bienvenida a **Telegram**, \nla aplicación de mensajería más rápida. \nEs gratis y segura.</value>\n  </data>\n  <data name=\"Fast\" xml:space=\"preserve\">\n    <value>Rápida</value>\n  </data>\n  <data name=\"FastMessage\" xml:space=\"preserve\">\n    <value>**Telegram** entrega mensajes más rápido\nque cualquier otra aplicación.</value>\n  </data>\n  <data name=\"Free\" xml:space=\"preserve\">\n    <value>Gratis</value>\n  </data>\n  <data name=\"FreeMessage\" xml:space=\"preserve\">\n    <value>**Telegram** es gratis para siempre. \nSin publicidad ni suscripciones.</value>\n  </data>\n  <data name=\"Powerful\" xml:space=\"preserve\">\n    <value>Poderosa</value>\n  </data>\n  <data name=\"PowerfulMessage\" xml:space=\"preserve\">\n    <value>**Telegram** no tiene límites en el \ntamaño de tus chats y archivos.</value>\n  </data>\n  <data name=\"Secure\" xml:space=\"preserve\">\n    <value>Segura</value>\n  </data>\n  <data name=\"SecureMessage\" xml:space=\"preserve\">\n    <value>**Telegram** mantiene tus mensajes \na salvo del ataque de hackers.</value>\n  </data>\n  <data name=\"CloudBased\" xml:space=\"preserve\">\n    <value>Basada en la nube</value>\n  </data>\n  <data name=\"CloudBasedMessage\" xml:space=\"preserve\">\n    <value>**Telegram** te permite acceder a tus mensajes \ndesde múltiples dispositivos.</value>\n  </data>\n  <data name=\"TelegramDialedYourNumber\" xml:space=\"preserve\">\n    <value>Telegram ha marcado tu número</value>\n  </data>\n  <data name=\"Subject\" xml:space=\"preserve\">\n    <value>Nombre del grupo</value>\n  </data>\n  <data name=\"Members\" xml:space=\"preserve\">\n    <value>Miembros</value>\n  </data>\n  <data name=\"YourPhoneNumber\" xml:space=\"preserve\">\n    <value>Tu número de teléfono</value>\n  </data>\n  <data name=\"From\" xml:space=\"preserve\">\n    <value>De</value>\n  </data>\n  <data name=\"You\" xml:space=\"preserve\">\n    <value>Tú</value>\n  </data>\n  <data name=\"YouWhereKickedFromTheGroup\" xml:space=\"preserve\">\n    <value>Te han eliminado de este grupo</value>\n  </data>\n  <data name=\"SavePhotoMessage\" xml:space=\"preserve\">\n    <value>La foto ha sido guardada</value>\n  </data>\n  <data name=\"SharedContact\" xml:space=\"preserve\">\n    <value>Contacto compartido</value>\n  </data>\n  <data name=\"AllContacts\" xml:space=\"preserve\">\n    <value>Todos los contactos</value>\n  </data>\n  <data name=\"Document\" xml:space=\"preserve\">\n    <value>Archivo</value>\n  </data>\n  <data name=\"InviteFriends\" xml:space=\"preserve\">\n    <value>Invitar a amigos</value>\n  </data>\n  <data name=\"MyLocation\" xml:space=\"preserve\">\n    <value>Mi ubicación</value>\n  </data>\n  <data name=\"Satellite\" xml:space=\"preserve\">\n    <value>Satélite</value>\n  </data>\n  <data name=\"Hybrid\" xml:space=\"preserve\">\n    <value>Híbrido</value>\n  </data>\n  <data name=\"SwitchMode\" xml:space=\"preserve\">\n    <value>Conmutador de modo</value>\n  </data>\n  <data name=\"DistanceAway\" xml:space=\"preserve\">\n    <value>{0} de distancia</value>\n  </data>\n  <data name=\"MetersShort\" xml:space=\"preserve\">\n    <value>m</value>\n  </data>\n  <data name=\"KilometersShort\" xml:space=\"preserve\">\n    <value>km</value>\n  </data>\n  <data name=\"ShareLocation\" xml:space=\"preserve\">\n    <value>Compartir ubicación</value>\n  </data>\n  <data name=\"Emoji\" xml:space=\"preserve\">\n    <value>Emoji</value>\n  </data>\n  <data name=\"LogOutConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres cerrar sesión?\nConsidera que puedes usar Telegram en todos tus dispositivos a la vez.\nRecuerda que, al cerrar sesión, eliminas tus chats secretos.</value>\n  </data>\n  <data name=\"GotAQuestionAboutTelegram\" xml:space=\"preserve\">\n    <value>¿Tienes preguntas sobre Telegram?</value>\n  </data>\n  <data name=\"InviteFriendMessage\" xml:space=\"preserve\">\n    <value>Hola, cambiémonos a Telegram http://telegram.org/dl</value>\n  </data>\n  <data name=\"ResetAllNotificationsMessage\" xml:space=\"preserve\">\n    <value>¿Restablecer todas las notificaciones?</value>\n  </data>\n  <data name=\"AreTyping\" xml:space=\"preserve\">\n    <value>Están escribiendo</value>\n  </data>\n  <data name=\"ClearHistory\" xml:space=\"preserve\">\n    <value>Borrar el historial</value>\n  </data>\n  <data name=\"DeleteAndExit\" xml:space=\"preserve\">\n    <value>Eliminar y salir</value>\n  </data>\n  <data name=\"DeleteHistoryAndExitGroupMessage\" xml:space=\"preserve\">\n    <value>¿Borrar el historial y salir del grupo?</value>\n  </data>\n  <data name=\"NoUsers\" xml:space=\"preserve\">\n    <value>No hay usuarios</value>\n  </data>\n  <data name=\"UserNominativeSingular\" xml:space=\"preserve\">\n    <value>Usuario</value>\n  </data>\n  <data name=\"UserNominativePlural\" xml:space=\"preserve\">\n    <value>Usuarios</value>\n  </data>\n  <data name=\"UserGenitiveSingular\" xml:space=\"preserve\">\n    <value>Usuario</value>\n  </data>\n  <data name=\"UserGenitivePlural\" xml:space=\"preserve\">\n    <value>Usuarios</value>\n  </data>\n  <data name=\"PleaseGoToChatToForwardMessage\" xml:space=\"preserve\">\n    <value>Por favor, ve al chat para reenviar el mensaje</value>\n  </data>\n  <data name=\"Info\" xml:space=\"preserve\">\n    <value>Información</value>\n  </data>\n  <data name=\"ForwardeMessageToThisChat\" xml:space=\"preserve\">\n    <value>¿Reenviar el mensaje a este chat?</value>\n  </data>\n  <data name=\"TodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"RegularFormat\" xml:space=\"preserve\">\n    <value>d MMM</value>\n  </data>\n  <data name=\"LongRegularFormat\" xml:space=\"preserve\">\n    <value>d.MM.yyyy</value>\n  </data>\n  <data name=\"MessageTodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"MessageRegularFormat\" xml:space=\"preserve\">\n    <value>d MMM, {0}</value>\n  </data>\n  <data name=\"MessageLongRegularFormat\" xml:space=\"preserve\">\n    <value>yyyy d MMM, {0}</value>\n  </data>\n  <data name=\"UserStatusTimeFormat\" xml:space=\"preserve\">\n    <value>H:mm</value>\n  </data>\n  <data name=\"UserStatusDayFormat\" xml:space=\"preserve\">\n    <value>d MMM</value>\n  </data>\n  <data name=\"UserStatusYearDayFormat\" xml:space=\"preserve\">\n    <value>d MMM yyyy</value>\n  </data>\n  <data name=\"PhoneNumberInvalidString\" xml:space=\"preserve\">\n    <value>Número de teléfono incorrecto. Por favor, inténtalo de nuevo.</value>\n  </data>\n  <data name=\"Error\" xml:space=\"preserve\">\n    <value>Error</value>\n  </data>\n  <data name=\"FloodWaitString\" xml:space=\"preserve\">\n    <value>Demasiados intentos. Por favor, reinténtalo más tarde.</value>\n  </data>\n  <data name=\"PhoneCodeInvalidString\" xml:space=\"preserve\">\n    <value>Has introducido un código inválido. Por favor, inténtalo de nuevo.</value>\n  </data>\n  <data name=\"PhoneCodeExpiredString\" xml:space=\"preserve\">\n    <value>Código caducado. Por favor, inténtalo de nuevo.</value>\n  </data>\n  <data name=\"PhoneCodeEmpty\" xml:space=\"preserve\">\n    <value>Código vacío. Por favor, inténtalo de nuevo.</value>\n  </data>\n  <data name=\"FirstNameInvalidString\" xml:space=\"preserve\">\n    <value>Nombre inválido. Por favor, inténtalo de nuevo.</value>\n  </data>\n  <data name=\"LastNameInvalidString\" xml:space=\"preserve\">\n    <value>Apellidos inválidos. Por favor, reinténtalo.</value>\n  </data>\n  <data name=\"Message\" xml:space=\"preserve\">\n    <value>Mensaje</value>\n  </data>\n  <data name=\"LockScreen\" xml:space=\"preserve\">\n    <value>Pantalla de bloqueo</value>\n  </data>\n  <data name=\"LockScreenSubtitle\" xml:space=\"preserve\">\n    <value>Configuración de contador de mensajes</value>\n  </data>\n  <data name=\"ConfirmAgeMessage\" xml:space=\"preserve\">\n    <value>Eligiendo OK estás confirmando que tienes, al menos, 13 años de edad.</value>\n  </data>\n  <data name=\"ConfirmAgeTitle\" xml:space=\"preserve\">\n    <value>Confirma tu edad</value>\n  </data>\n  <data name=\"ConfirmPushMessage\" xml:space=\"preserve\">\n    <value>¿Permites que esta aplicación utilice notificaciones pop-up para informarte de mensajes nuevos?</value>\n  </data>\n  <data name=\"ConfirmPushTitle\" xml:space=\"preserve\">\n    <value>Confirma notificaciones pop-up</value>\n  </data>\n  <data name=\"PrivacyStatement\" xml:space=\"preserve\">\n    <value>Declaración de privacidad</value>\n  </data>\n  <data name=\"PrivacyStatementText\" xml:space=\"preserve\">\n    <value>Esta aplicación utiliza tu ubicación actual para mejorar la experiencia de mapeo. Los datos de localización pueden ser almacenados y compartidos. Tu privacidad es importante para nosotros. Puedes desactivar esta función en cualquier momento. \n\nSi tienes alguna pregunta, contacta a nuestro</value>\n  </data>\n  <data name=\"VKGroup\" xml:space=\"preserve\">\n    <value>grupo</value>\n  </data>\n  <data name=\"LocationServices\" xml:space=\"preserve\">\n    <value>Servicios de ubicación</value>\n  </data>\n  <data name=\"AllowLocationServicesTitle\" xml:space=\"preserve\">\n    <value>¿Permitir acceso a la ubicación?</value>\n  </data>\n  <data name=\"AllowLocationServiceText\" xml:space=\"preserve\">\n    <value>¿Permitir acceso a tu ubicación actual? Esto se puede cambiar en los ajustes de la app.</value>\n  </data>\n  <data name=\"AboutText1\" xml:space=\"preserve\">\n    <value>Telegram Messenger es un cliente de Telegram enfocado en la velocidad y la seguridad. Es muy rápido, sencillo y gratis.</value>\n  </data>\n  <data name=\"AboutText2\" xml:space=\"preserve\">\n    <value>Para soporte en tiempo real, por favor ve a Ajustes, en Telegram, y elige “Hacer una pregunta” para enviar un mensaje al equipo de soporte. También puedes escribir a support@telegram.org.</value>\n  </data>\n  <data name=\"TapRecordToStartRecording\" xml:space=\"preserve\">\n    <value>Toca grabar para iniciar la grabación...</value>\n  </data>\n  <data name=\"ACameraIsNotSupportedOnThisDevice\" xml:space=\"preserve\">\n    <value>La cámara no es compatible con este dispositivo.</value>\n  </data>\n  <data name=\"ReadyToRecord\" xml:space=\"preserve\">\n    <value>Listo para grabar.</value>\n  </data>\n  <data name=\"PressBackKeyToSendVideo\" xml:space=\"preserve\">\n    <value>Toca la tecla atrás para enviar el vídeo.</value>\n  </data>\n  <data name=\"PlaybackStarted\" xml:space=\"preserve\">\n    <value>Reproducción iniciada.</value>\n  </data>\n  <data name=\"PlaybackPaused\" xml:space=\"preserve\">\n    <value>Reproducción en pausa.</value>\n  </data>\n  <data name=\"Recording\" xml:space=\"preserve\">\n    <value>Grabando...</value>\n  </data>\n  <data name=\"PreparingViewfinder\" xml:space=\"preserve\">\n    <value>Preparando visor...</value>\n  </data>\n  <data name=\"PlaybackStoped\" xml:space=\"preserve\">\n    <value>Reproducción detenida.</value>\n  </data>\n  <data name=\"Record\" xml:space=\"preserve\">\n    <value>Grabar</value>\n  </data>\n  <data name=\"Stop\" xml:space=\"preserve\">\n    <value>Detener</value>\n  </data>\n  <data name=\"Pause\" xml:space=\"preserve\">\n    <value>Pausa</value>\n  </data>\n  <data name=\"Play\" xml:space=\"preserve\">\n    <value>Reproducir</value>\n  </data>\n  <data name=\"Review\" xml:space=\"preserve\">\n    <value>Revisión</value>\n  </data>\n  <data name=\"PleaseEnterGroupSubject\" xml:space=\"preserve\">\n    <value>Por favor, introduce un nombre del grupo</value>\n  </data>\n  <data name=\"PleaseChooseAtLeastOneParticipant\" xml:space=\"preserve\">\n    <value>Por favor, elige, al menos, un participante</value>\n  </data>\n  <data name=\"ForwardMessagesToThisChat\" xml:space=\"preserve\">\n    <value>¿Reenviar mensajes a este chat?</value>\n  </data>\n  <data name=\"InvalidCountryCode\" xml:space=\"preserve\">\n    <value>Código de país inválido</value>\n  </data>\n  <data name=\"Typing\" xml:space=\"preserve\">\n    <value>Escribiendo</value>\n  </data>\n  <data name=\"MaximumMessageLengthExceeded\" xml:space=\"preserve\">\n    <value>Longitud máxima del mensaje ({0} símbolos) excedida.</value>\n  </data>\n  <data name=\"Download\" xml:space=\"preserve\">\n    <value>Descargar</value>\n  </data>\n  <data name=\"Backgrounds\" xml:space=\"preserve\">\n    <value>Fondos</value>\n  </data>\n  <data name=\"Static\" xml:space=\"preserve\">\n    <value>Estático</value>\n  </data>\n  <data name=\"Animated\" xml:space=\"preserve\">\n    <value>Animado</value>\n  </data>\n  <data name=\"Background\" xml:space=\"preserve\">\n    <value>Fondo</value>\n  </data>\n  <data name=\"ApplicationBackgroundSubtitle\" xml:space=\"preserve\">\n    <value>Selecciona una imagen de fondo para los chats</value>\n  </data>\n  <data name=\"ApplicationBackground\" xml:space=\"preserve\">\n    <value>Fondo de la aplicación</value>\n  </data>\n  <data name=\"DialogsBackground\" xml:space=\"preserve\">\n    <value>Fondo</value>\n  </data>\n  <data name=\"SpecialThanks\" xml:space=\"preserve\">\n    <value>Agradecimientos especiales</value>\n  </data>\n  <data name=\"SendMessageByEnter\" xml:space=\"preserve\">\n    <value>Enviar mensaje con Intro</value>\n  </data>\n  <data name=\"PleaseNoteThatAnimatedBackgroundConsumesMoreBatteryResources\" xml:space=\"preserve\">\n    <value>Ten en cuenta que el fondo animado consume más recursos de batería.</value>\n  </data>\n  <data name=\"Please go to chat to forward message\" xml:space=\"preserve\">\n    <value>Por favor, ve al chat para reenviar el mensaje</value>\n  </data>\n  <data name=\"SecretChatCaption\" xml:space=\"preserve\">\n    <value>Has invitado a {0} al chat secreto.</value>\n  </data>\n  <data name=\"SecretChat\" xml:space=\"preserve\">\n    <value>Chat secreto</value>\n  </data>\n  <data name=\"UseEntToEndEncryption\" xml:space=\"preserve\">\n    <value>Utilizan cifrado end-to-end</value>\n  </data>\n  <data name=\"LeaveNoTraceOnOurServers\" xml:space=\"preserve\">\n    <value>No dejan rastro en el servidor</value>\n  </data>\n  <data name=\"HaveASelfDestructTimer\" xml:space=\"preserve\">\n    <value>Tienen autodestrucción </value>\n  </data>\n  <data name=\"SecretChats\" xml:space=\"preserve\">\n    <value>Chats secretos</value>\n  </data>\n  <data name=\"DoNotAllowForwarding\" xml:space=\"preserve\">\n    <value>No reenvían mensajes</value>\n  </data>\n  <data name=\"WaitingForUserToGetOnline\" xml:space=\"preserve\">\n    <value>Esperando a {0}</value>\n  </data>\n  <data name=\"SelfDestructTimer\" xml:space=\"preserve\">\n    <value>Autodestrucción</value>\n  </data>\n  <data name=\"EncryptionKey\" xml:space=\"preserve\">\n    <value>Сlave de cifrado</value>\n  </data>\n  <data name=\"EncryptionKeyDescription1\" xml:space=\"preserve\">\n    <value>Esta imagen es una visualización de la clave de cifrado para el chat secreto con {0}</value>\n  </data>\n  <data name=\"EncryptionKeyDescription2\" xml:space=\"preserve\">\n    <value>Si esta imagen se ve igual en el teléfono de {0}, entonces su chat es 200 % seguro.</value>\n  </data>\n  <data name=\"LearnMoreAt\" xml:space=\"preserve\">\n    <value>Más información en </value>\n  </data>\n  <data name=\"TelegramWebsite\" xml:space=\"preserve\">\n    <value>Telegram.org</value>\n  </data>\n  <data name=\"LastSeenAtDate\" xml:space=\"preserve\">\n    <value>Últ. vez el {0} a las {1}</value>\n  </data>\n  <data name=\"LastSeenJustNow\" xml:space=\"preserve\">\n    <value>Últ. vez hace un momento</value>\n  </data>\n  <data name=\"SecretChatsDescription\" xml:space=\"preserve\">\n    <value>Los Сhats Secretos:\n• Usan cifrado end-to-end\n• No dejan rastro en el servidor\n• Tienen autodestrucción\n• No reenvían mensajes</value>\n  </data>\n  <data name=\"Audio\" xml:space=\"preserve\">\n    <value>Audio</value>\n  </data>\n  <data name=\"IncognitoMode\" xml:space=\"preserve\">\n    <value>Modo invisible</value>\n  </data>\n  <data name=\"TelegramNotifications\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"Invisible\" xml:space=\"preserve\">\n    <value>Invisible</value>\n  </data>\n  <data name=\"SecretChatDiscarded\" xml:space=\"preserve\">\n    <value>Chat secreto cancelado</value>\n  </data>\n  <data name=\"SecretChatCreated\" xml:space=\"preserve\">\n    <value>Chat secreto creado</value>\n  </data>\n  <data name=\"EmptySecretChat\" xml:space=\"preserve\">\n    <value>Chat secreto vacío</value>\n  </data>\n  <data name=\"MessageActionSetMessageTTL\" xml:space=\"preserve\">\n    <value>{0} activó la autodestrucción en {1}</value>\n  </data>\n  <data name=\"MessageActionYouSetMessageTTL\" xml:space=\"preserve\">\n    <value>Activaste la autodestrucción en {0}</value>\n  </data>\n  <data name=\"MessageActionDisableMessageTTL\" xml:space=\"preserve\">\n    <value>{0} ha desactivado la autodestrucción</value>\n  </data>\n  <data name=\"MessageActionYouDisableMessageTTL\" xml:space=\"preserve\">\n    <value>Has desactivado la autodestrucción</value>\n  </data>\n  <data name=\"PleaseWait\" xml:space=\"preserve\">\n    <value>Espera, por favor...</value>\n  </data>\n  <data name=\"SecretChatCaption2\" xml:space=\"preserve\">\n    <value>{0} te ha invitado a un chat secreto</value>\n  </data>\n  <data name=\"YouJoinedTheSecretChat\" xml:space=\"preserve\">\n    <value>Te uniste al chat secreto</value>\n  </data>\n  <data name=\"UserJoinedYourSecretChat\" xml:space=\"preserve\">\n    <value>{0} se unió a tu chat secreto</value>\n  </data>\n  <data name=\"AddContact\" xml:space=\"preserve\">\n    <value>Añadir</value>\n  </data>\n  <data name=\"DeleteContact\" xml:space=\"preserve\">\n    <value>Eliminar</value>\n  </data>\n  <data name=\"ConfirmDeleteContact\" xml:space=\"preserve\">\n    <value>¿Eliminar contacto?</value>\n  </data>\n  <data name=\"RegistrationProblemDescription\" xml:space=\"preserve\">\n    <value>Si tienes problemas para registrarte o iniciar la sesión, por favor, contáctanos en </value>\n  </data>\n  <data name=\"RegistrationProblemEmail\" xml:space=\"preserve\">\n    <value>sms@telegram.org</value>\n  </data>\n  <data name=\"ChooseYourCountry\" xml:space=\"preserve\">\n    <value>Elige tu país</value>\n  </data>\n  <data name=\"AskAVolunteer\" xml:space=\"preserve\">\n    <value>Preguntar</value>\n  </data>\n  <data name=\"PinToStart\" xml:space=\"preserve\">\n    <value>Agregar al inicio</value>\n  </data>\n  <data name=\"TerminateAllSessions\" xml:space=\"preserve\">\n    <value>Cerrar todas las otras sesiones</value>\n  </data>\n  <data name=\"TerminateAllSessionsConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres terminar todas las otras sesiones?</value>\n  </data>\n  <data name=\"SlideToCancel\" xml:space=\"preserve\">\n    <value>Cancelar</value>\n  </data>\n  <data name=\"Terminate\" xml:space=\"preserve\">\n    <value>Cerrar sesión</value>\n  </data>\n  <data name=\"TapAndHoldToRecord\" xml:space=\"preserve\">\n    <value>Mantén pulsado para grabar</value>\n  </data>\n  <data name=\"NewBroadcastList\" xml:space=\"preserve\">\n    <value>Nueva lista de difusión</value>\n  </data>\n  <data name=\"AddUserToTheGroup\" xml:space=\"preserve\">\n    <value>¿Añadir a {0} al grupo \"{1}\"?</value>\n  </data>\n  <data name=\"NumberOfForwardingMessages\" xml:space=\"preserve\">\n    <value>Número de últimos mensajes para reenviar</value>\n  </data>\n  <data name=\"AddToContacts\" xml:space=\"preserve\">\n    <value>Añadir a contactos</value>\n  </data>\n  <data name=\"ShareMyContactInfo\" xml:space=\"preserve\">\n    <value>Compartir mi número</value>\n  </data>\n  <data name=\"Cache\" xml:space=\"preserve\">\n    <value>Caché</value>\n  </data>\n  <data name=\"ClearCache\" xml:space=\"preserve\">\n    <value>Eliminar caché</value>\n  </data>\n  <data name=\"ManagingLocalCache\" xml:space=\"preserve\">\n    <value>Gestionar caché local</value>\n  </data>\n  <data name=\"Calculating\" xml:space=\"preserve\">\n    <value>Calculando</value>\n  </data>\n  <data name=\"SaveFileMessage\" xml:space=\"preserve\">\n    <value>El archivo ha sido guardado con éxito</value>\n  </data>\n  <data name=\"SocialNetworks\" xml:space=\"preserve\">\n    <value>Redes sociales</value>\n  </data>\n  <data name=\"Sms\" xml:space=\"preserve\">\n    <value>SMS</value>\n  </data>\n  <data name=\"Email\" xml:space=\"preserve\">\n    <value>Correo</value>\n  </data>\n  <data name=\"Set\" xml:space=\"preserve\">\n    <value>Establecer</value>\n  </data>\n  <data name=\"SearchAmongYourContacts\" xml:space=\"preserve\">\n    <value>Buscar contactos</value>\n  </data>\n  <data name=\"Connecting\" xml:space=\"preserve\">\n    <value>Conectando</value>\n  </data>\n  <data name=\"SetProfilePhoto\" xml:space=\"preserve\">\n    <value>Poner foto de perfil</value>\n  </data>\n  <data name=\"BatterySaverModeAlert\" xml:space=\"preserve\">\n    <value>Tienes el modo de ahorro de batería activado. No recibirás notificaciones de Telegram mientras este modo esté activado. Por favor, desactívalo.</value>\n  </data>\n  <data name=\"Warning\" xml:space=\"preserve\">\n    <value>Advertencia</value>\n  </data>\n  <data name=\"NoInternetConnection\" xml:space=\"preserve\">\n    <value>Sin conexión a internet</value>\n  </data>\n  <data name=\"Updating\" xml:space=\"preserve\">\n    <value>Actualizando</value>\n  </data>\n  <data name=\"SetUsername\" xml:space=\"preserve\">\n    <value>Establecer alias</value>\n  </data>\n  <data name=\"Username\" xml:space=\"preserve\">\n    <value>Alias</value>\n  </data>\n  <data name=\"ServerError\" xml:space=\"preserve\">\n    <value>Error del servidor</value>\n  </data>\n  <data name=\"ServerErrorMessage\" xml:space=\"preserve\">\n    <value>Error interno del servidor. Por favor, reinténtalo más tarde.</value>\n  </data>\n  <data name=\"UsernameDescription\" xml:space=\"preserve\">\n    <value>Puedes elegir un alias en Telegram. Si lo haces, otros usuarios te podrán encontrar por ese alias y contactarte sin necesidad de saber tu número.\nPuedes usar a-z, 0-9 y guión bajo. La longitud mínima es de 5 caracteres.</value>\n  </data>\n  <data name=\"UsernameOccupied\" xml:space=\"preserve\">\n    <value>Lo siento, este alias ya está ocupado.</value>\n  </data>\n  <data name=\"UsernameInvalid\" xml:space=\"preserve\">\n    <value>Lo siento, este alias no está permitido.</value>\n  </data>\n  <data name=\"WaitingForNetwork\" xml:space=\"preserve\">\n    <value>Esperando red</value>\n  </data>\n  <data name=\"GlobalSearch\" xml:space=\"preserve\">\n    <value>Búsqueda global</value>\n  </data>\n  <data name=\"UsernameShort\" xml:space=\"preserve\">\n    <value>Un alias debe tener al menos 5 caracteres.</value>\n  </data>\n  <data name=\"UsernameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Lo siento, un alias no puede comenzar con un número.</value>\n  </data>\n  <data name=\"SelectChat\" xml:space=\"preserve\">\n    <value>Elige el chat</value>\n  </data>\n  <data name=\"MaximumFileSizeExceeded\" xml:space=\"preserve\">\n    <value>Excediste el tamaño máximo de un archivo. Puedes enviar archivos de hasta {0}.</value>\n  </data>\n  <data name=\"UnableToAccessDocument\" xml:space=\"preserve\">\n    <value>No se puede acceder a este archivo. Por favor, elige otro para enviar.</value>\n  </data>\n  <data name=\"Camcorder\" xml:space=\"preserve\">\n    <value>Videocámara</value>\n  </data>\n  <data name=\"CompressVideo\" xml:space=\"preserve\">\n    <value>Comprimir vídeo</value>\n  </data>\n  <data name=\"EditedVideo\" xml:space=\"preserve\">\n    <value>Vídeo editado</value>\n  </data>\n  <data name=\"EditVideo\" xml:space=\"preserve\">\n    <value>Editar vídeo</value>\n  </data>\n  <data name=\"OriginalVideo\" xml:space=\"preserve\">\n    <value>Vídeo original</value>\n  </data>\n  <data name=\"AccountSelfDestrucsDescription\" xml:space=\"preserve\">\n    <value>Si no estás en línea durante este tiempo, al menos una vez, tu cuenta se eliminará con todos tus grupos, mensajes y contactos.</value>\n  </data>\n  <data name=\"AccountSelfDestructs\" xml:space=\"preserve\">\n    <value>Autodestrucción de la cuenta</value>\n  </data>\n  <data name=\"AddExceptions\" xml:space=\"preserve\">\n    <value>Añadir excepciones</value>\n  </data>\n  <data name=\"AlwaysShare\" xml:space=\"preserve\">\n    <value>Compartir siempre</value>\n  </data>\n  <data name=\"AlwaysShareWirhUsers\" xml:space=\"preserve\">\n    <value>Compartir siempre con usuarios...</value>\n  </data>\n  <data name=\"AlwaysShareWith\" xml:space=\"preserve\">\n    <value>Compartir siempre con</value>\n  </data>\n  <data name=\"CodecWasNotFound\" xml:space=\"preserve\">\n    <value>Códec no encontrado.</value>\n  </data>\n  <data name=\"Everybody\" xml:space=\"preserve\">\n    <value>Todos</value>\n  </data>\n  <data name=\"IfYouAreAwayFor\" xml:space=\"preserve\">\n    <value>Si estás ausente por</value>\n  </data>\n  <data name=\"LastSeenDescription\" xml:space=\"preserve\">\n    <value>¿Quién puede ver tu última conexión?</value>\n  </data>\n  <data name=\"LastSeenImportantNote\" xml:space=\"preserve\">\n    <value>Importante: No podrás ver la última conexión de las personas con las que no compartes la tuya. En su lugar, se mostrarán conexiones indeterminadas (recientemente, hace unos días, hace unas semanas).</value>\n  </data>\n  <data name=\"LastSeenLongTimeAgo\" xml:space=\"preserve\">\n    <value>últ. vez hace mucho tiempo</value>\n  </data>\n  <data name=\"LastSeenRecently\" xml:space=\"preserve\">\n    <value>últ. vez recientemente</value>\n  </data>\n  <data name=\"LastSeenWithinMonth\" xml:space=\"preserve\">\n    <value>últ. vez hace unas semanas</value>\n  </data>\n  <data name=\"LastSeenWithinWeek\" xml:space=\"preserve\">\n    <value>últ. vez hace unos días</value>\n  </data>\n  <data name=\"MyContacts\" xml:space=\"preserve\">\n    <value>Mis contactos</value>\n  </data>\n  <data name=\"NeverShare\" xml:space=\"preserve\">\n    <value>Nunca compartir</value>\n  </data>\n  <data name=\"NeverShareWith\" xml:space=\"preserve\">\n    <value>Nunca compartir con</value>\n  </data>\n  <data name=\"NeverShareWithUsers\" xml:space=\"preserve\">\n    <value>Nunca compartir con...</value>\n  </data>\n  <data name=\"Nobody\" xml:space=\"preserve\">\n    <value>Nadie</value>\n  </data>\n  <data name=\"PrivacyAndSecurity\" xml:space=\"preserve\">\n    <value>Privacidad y seguridad</value>\n  </data>\n  <data name=\"PrivacySettingsError\" xml:space=\"preserve\">\n    <value>Lo siento, hay demasiadas solicitudes. Es imposible cambiar los ajustes de privacidad ahora. Por favor, espera.</value>\n  </data>\n  <data name=\"ProfileIsInvalid\" xml:space=\"preserve\">\n    <value>Perfil de codificación no válido</value>\n  </data>\n  <data name=\"SettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Estos ajustes sobreescribirán los valores superiores.</value>\n  </data>\n  <data name=\"UnknownFailure\" xml:space=\"preserve\">\n    <value>Error desconocido</value>\n  </data>\n  <data name=\"LastSeenShort\" xml:space=\"preserve\">\n    <value>Última conexión</value>\n  </data>\n  <data name=\"PrivacySecuritySubtitle\" xml:space=\"preserve\">\n    <value>Usuarios bloqueados, última conexión, sesiones</value>\n  </data>\n  <data name=\"MonthGenitivePlural\" xml:space=\"preserve\">\n    <value>Meses</value>\n  </data>\n  <data name=\"MonthGenitiveSingular\" xml:space=\"preserve\">\n    <value>Mes</value>\n  </data>\n  <data name=\"MonthNominativePlural\" xml:space=\"preserve\">\n    <value>Meses</value>\n  </data>\n  <data name=\"MonthNominativeSingular\" xml:space=\"preserve\">\n    <value>Mes</value>\n  </data>\n  <data name=\"YearGenitivePlural\" xml:space=\"preserve\">\n    <value>Años</value>\n  </data>\n  <data name=\"YearGenitiveSingular\" xml:space=\"preserve\">\n    <value>Año</value>\n  </data>\n  <data name=\"YearNominativePlural\" xml:space=\"preserve\">\n    <value>Años</value>\n  </data>\n  <data name=\"YearNominativeSingular\" xml:space=\"preserve\">\n    <value>Año</value>\n  </data>\n  <data name=\"LastSeenDescription2\" xml:space=\"preserve\">\n    <value>¿Quién puede ver mi última conexión?</value>\n  </data>\n  <data name=\"CheckingUsername\" xml:space=\"preserve\">\n    <value>Revisando alias...</value>\n  </data>\n  <data name=\"CantFindContactWithUsername\" xml:space=\"preserve\">\n    <value>Lo siento, no se puede encontrar un usuario de Telegram con el alias @{0}</value>\n  </data>\n  <data name=\"Compressing\" xml:space=\"preserve\">\n    <value>Comprimiendo</value>\n  </data>\n  <data name=\"PeopleHubIntegration\" xml:space=\"preserve\">\n    <value>Sincronizar con el hub de contactos</value>\n  </data>\n  <data name=\"SyncContactsProgress\" xml:space=\"preserve\">\n    <value>Sincronizando contactos ({0} of {1})...</value>\n  </data>\n  <data name=\"DeletingContacts\" xml:space=\"preserve\">\n    <value>Eliminando contactos...</value>\n  </data>\n  <data name=\"ChangeNumber\" xml:space=\"preserve\">\n    <value>Cambiar número</value>\n  </data>\n  <data name=\"ConfirmNewNumberMessage\" xml:space=\"preserve\">\n    <value>Enviaremos un SMS con el código de confirmación a tu nuevo número.</value>\n  </data>\n  <data name=\"NewNumber\" xml:space=\"preserve\">\n    <value>Nuevo número</value>\n  </data>\n  <data name=\"NewNumberConfirmation\" xml:space=\"preserve\">\n    <value>Todos tus contactos de Telegram tendrán tu número nuevo añadido a sus agendas de contactos, siempre que hayan tenido tu número viejo y no los hayas bloqueado en Telegram.</value>\n  </data>\n  <data name=\"NewNumberDescription\" xml:space=\"preserve\">\n    <value>Puedes cambiar tu número de Telegram aquí. Tu cuenta y todos tus datos de la nube, mensajes, archivos, grupos, contactos, etc., se moverán al nuevo número. \n\nImportante: Todos tus contactos de Telegram tendrán tu **nuevo número** añadido a sus agendas de contactos, siempre que hayan tenido tu número viejo y no los hayas bloqueado en Telegram.</value>\n  </data>\n  <data name=\"NewNumberTaken\" xml:space=\"preserve\">\n    <value>El número {0} ya está vinculado a una cuenta de Telegram. Por favor, elimina esa cuenta antes de migrar al nuevo número.</value>\n  </data>\n  <data name=\"MessageActionScreenshotMessages\" xml:space=\"preserve\">\n    <value>¡{0} hizo una captura de pantalla!</value>\n  </data>\n  <data name=\"MessageActionYouScreenshotMessages\" xml:space=\"preserve\">\n    <value>¡Hiciste una captura de pantalla!</value>\n  </data>\n  <data name=\"DayGenitivePlural\" xml:space=\"preserve\">\n    <value>Días</value>\n  </data>\n  <data name=\"DayGenitiveSingular\" xml:space=\"preserve\">\n    <value>Día</value>\n  </data>\n  <data name=\"DayNominativePlural\" xml:space=\"preserve\">\n    <value>Días</value>\n  </data>\n  <data name=\"DayNominativeSingular\" xml:space=\"preserve\">\n    <value>Día</value>\n  </data>\n  <data name=\"HourGenitivePlural\" xml:space=\"preserve\">\n    <value>Horas</value>\n  </data>\n  <data name=\"HourGenitiveSingular\" xml:space=\"preserve\">\n    <value>Hora</value>\n  </data>\n  <data name=\"HourNominativePlural\" xml:space=\"preserve\">\n    <value>Horas</value>\n  </data>\n  <data name=\"HourNominativeSingular\" xml:space=\"preserve\">\n    <value>Hora</value>\n  </data>\n  <data name=\"MinuteNominativePlural\" xml:space=\"preserve\">\n    <value>Minutos</value>\n  </data>\n  <data name=\"MinuteNominativeSingular\" xml:space=\"preserve\">\n    <value>Minuto</value>\n  </data>\n  <data name=\"SecondGenitivePlural\" xml:space=\"preserve\">\n    <value>Segundos</value>\n  </data>\n  <data name=\"SecondGenitiveSingular\" xml:space=\"preserve\">\n    <value>Segundo</value>\n  </data>\n  <data name=\"SecondNominativePlural\" xml:space=\"preserve\">\n    <value>Segundos</value>\n  </data>\n  <data name=\"SecondNominativeSingular\" xml:space=\"preserve\">\n    <value>Segundo</value>\n  </data>\n  <data name=\"WeekGenitivePlural\" xml:space=\"preserve\">\n    <value>Semanas</value>\n  </data>\n  <data name=\"WeekGenitiveSingular\" xml:space=\"preserve\">\n    <value>Semana</value>\n  </data>\n  <data name=\"WeekNominativePlural\" xml:space=\"preserve\">\n    <value>Semanas</value>\n  </data>\n  <data name=\"WeekNominativeSingular\" xml:space=\"preserve\">\n    <value>Semana</value>\n  </data>\n  <data name=\"TapAndHoldToView\" xml:space=\"preserve\">\n    <value>Mantén pulsado para ver</value>\n  </data>\n  <data name=\"Sticker\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"Files\" xml:space=\"preserve\">\n    <value>Archivos</value>\n  </data>\n  <data name=\"NoFilesHere\" xml:space=\"preserve\">\n    <value>Sin archivos aquí</value>\n  </data>\n  <data name=\"ShareFiles\" xml:space=\"preserve\">\n    <value>Puedes enviar y recibir archivos de todo tipo, de hasta 1,5 GB cada uno y acceder a ellos desde cualquier sitio.</value>\n  </data>\n  <data name=\"SharePhotosAndVideos\" xml:space=\"preserve\">\n    <value>Sin multimedia todavía.\n\nComparte fotos y vídeos en este chat, o el clip seguirá triste.</value>\n  </data>\n  <data name=\"Disabled\" xml:space=\"preserve\">\n    <value>Desactivado</value>\n  </data>\n  <data name=\"Enabled\" xml:space=\"preserve\">\n    <value>Activado</value>\n  </data>\n  <data name=\"MuteFor\" xml:space=\"preserve\">\n    <value>Silenciar {0}</value>\n  </data>\n  <data name=\"UnmuteIn\" xml:space=\"preserve\">\n    <value>En {0}</value>\n  </data>\n  <data name=\"More\" xml:space=\"preserve\">\n    <value>Más</value>\n  </data>\n  <data name=\"SearchAmongYourChats\" xml:space=\"preserve\">\n    <value>Busca entre tus chats</value>\n  </data>\n  <data name=\"SearchAmongYourFiles\" xml:space=\"preserve\">\n    <value>Buscar archivos compartidos</value>\n  </data>\n  <data name=\"NewAuthorization\" xml:space=\"preserve\">\n    <value>{0}:\nDetectamos una conexión a tu cuenta desde un nuevo dispositivo el {1}, {2}, a las {3}.\n\nDispositivo: {4}\nUbicación: {5}\n\nSi no eras tú, puedes ir a Ajustes &gt; Privacidad y seguridad &gt; Cerrar todas las otras sesiones. \n\nAtentamente, el equipo de Telegram</value>\n  </data>\n  <data name=\"Link\" xml:space=\"preserve\">\n    <value>Enlace</value>\n  </data>\n  <data name=\"ContactRegistered\" xml:space=\"preserve\">\n    <value>¡{0} se unió a Telegram!</value>\n  </data>\n  <data name=\"UnreadMessages\" xml:space=\"preserve\">\n    <value>Mensajes sin leer</value>\n  </data>\n  <data name=\"ChangePasscode\" xml:space=\"preserve\">\n    <value>Cambiar código de acceso</value>\n  </data>\n  <data name=\"ChangePasscodeHint\" xml:space=\"preserve\">\n    <value>Cuando configuras un código, aparece un candado en la pantalla de chats. Toca sobre él para bloquear y desbloquear la aplicación.\n\nNota: si olvidas el código, tendrás que eliminar y reinstalar la aplicación. Perderás todos los chats secretos.</value>\n  </data>\n  <data name=\"ConfirmPasscode\" xml:space=\"preserve\">\n    <value>Confirmar código de acceso</value>\n  </data>\n  <data name=\"EnterPasscode\" xml:space=\"preserve\">\n    <value>Pon tu código de acceso</value>\n  </data>\n  <data name=\"Passcode\" xml:space=\"preserve\">\n    <value>Código de acceso</value>\n  </data>\n  <data name=\"SimplePasscode\" xml:space=\"preserve\">\n    <value>Código simple</value>\n  </data>\n  <data name=\"SimplePasscodeHint\" xml:space=\"preserve\">\n    <value>Un código simple es un número de 4 dígitos.</value>\n  </data>\n  <data name=\"YourPasscode\" xml:space=\"preserve\">\n    <value>Nuevo código de acceso</value>\n  </data>\n  <data name=\"EnterYourCurrentPasscode\" xml:space=\"preserve\">\n    <value>Pon tu código de acceso actual</value>\n  </data>\n  <data name=\"PasscodeType\" xml:space=\"preserve\">\n    <value>Tipo de código de acceso</value>\n  </data>\n  <data name=\"Pin\" xml:space=\"preserve\">\n    <value>PIN</value>\n  </data>\n  <data name=\"Privacy\" xml:space=\"preserve\">\n    <value>Privacidad</value>\n  </data>\n  <data name=\"Security\" xml:space=\"preserve\">\n    <value>Seguridad</value>\n  </data>\n  <data name=\"YouHaveNewMessage\" xml:space=\"preserve\">\n    <value>Tienes un mensaje nuevo</value>\n  </data>\n  <data name=\"PasscodeAutolockHint\" xml:space=\"preserve\">\n    <value>El bloqueo se activará transcurrido este tiempo.</value>\n  </data>\n  <data name=\"PasscodeAutolockIn\" xml:space=\"preserve\">\n    <value>En {0}</value>\n  </data>\n  <data name=\"Autolock\" xml:space=\"preserve\">\n    <value>Autobloqueo</value>\n  </data>\n  <data name=\"AutolockDisabled\" xml:space=\"preserve\">\n    <value>Desactivado</value>\n  </data>\n  <data name=\"IncorrectPasscode\" xml:space=\"preserve\">\n    <value>Código de acceso incorrecto</value>\n  </data>\n  <data name=\"Reply\" xml:space=\"preserve\">\n    <value>Responder</value>\n  </data>\n  <data name=\"AndOthers\" xml:space=\"preserve\">\n    <value>Y {0} más</value>\n  </data>\n  <data name=\"ForwardedAudioGenitivePlural\" xml:space=\"preserve\">\n    <value>Audios adjuntos</value>\n  </data>\n  <data name=\"ForwardedAudioGenitiveSingular\" xml:space=\"preserve\">\n    <value>Audio adjunto</value>\n  </data>\n  <data name=\"ForwardedAudioNominativePlural\" xml:space=\"preserve\">\n    <value>Audios adjuntos</value>\n  </data>\n  <data name=\"ForwardedAudioNominativeSingular\" xml:space=\"preserve\">\n    <value>Audio adjunto</value>\n  </data>\n  <data name=\"ForwardedContactGenitivePlural\" xml:space=\"preserve\">\n    <value>Contactos adjuntos</value>\n  </data>\n  <data name=\"ForwardedContactGenitiveSingular\" xml:space=\"preserve\">\n    <value>Contacto adjunto</value>\n  </data>\n  <data name=\"ForwardedContactNominativePlural\" xml:space=\"preserve\">\n    <value>Contactos adjuntos</value>\n  </data>\n  <data name=\"ForwardedContactNominativeSingular\" xml:space=\"preserve\">\n    <value>Contacto adjunto</value>\n  </data>\n  <data name=\"ForwardedFileGenitivePlural\" xml:space=\"preserve\">\n    <value>Archivos adjuntos</value>\n  </data>\n  <data name=\"ForwardedFileGenitiveSingular\" xml:space=\"preserve\">\n    <value>Archivo adjunto</value>\n  </data>\n  <data name=\"ForwardedFileNominativePlural\" xml:space=\"preserve\">\n    <value>Archivos adjuntos</value>\n  </data>\n  <data name=\"ForwardedFileNominativeSingular\" xml:space=\"preserve\">\n    <value>Archivo adjunto</value>\n  </data>\n  <data name=\"ForwardedLocationGenitivePlural\" xml:space=\"preserve\">\n    <value>Ubicaciones adjuntas</value>\n  </data>\n  <data name=\"ForwardedLocationGenitiveSingular\" xml:space=\"preserve\">\n    <value>Ubicación adjunta</value>\n  </data>\n  <data name=\"ForwardedLocationNominativePlural\" xml:space=\"preserve\">\n    <value>Ubicaciones adjuntas</value>\n  </data>\n  <data name=\"ForwardedLocationNominativeSingular\" xml:space=\"preserve\">\n    <value>Ubicación adjunta</value>\n  </data>\n  <data name=\"ForwardedMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Mensajes adjuntos</value>\n  </data>\n  <data name=\"ForwardedMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Mensaje adjunto</value>\n  </data>\n  <data name=\"ForwardedMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Mensajes adjuntos</value>\n  </data>\n  <data name=\"ForwardedMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Mensaje adjunto</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Fotos adjuntas</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Foto adjunta</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Fotos adjuntas</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Foto adjunta</value>\n  </data>\n  <data name=\"ForwardedStickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Stickers adjuntos</value>\n  </data>\n  <data name=\"ForwardedStickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Sticker adjunto</value>\n  </data>\n  <data name=\"ForwardedStickerNominativePlural\" xml:space=\"preserve\">\n    <value>Stickers adjuntos</value>\n  </data>\n  <data name=\"ForwardedStickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Sticker adjunto</value>\n  </data>\n  <data name=\"ForwardedVideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Vídeos adjuntos</value>\n  </data>\n  <data name=\"ForwardedVideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Vídeo adjunto</value>\n  </data>\n  <data name=\"ForwardedVideoNominativePlural\" xml:space=\"preserve\">\n    <value>Vídeos adjuntos</value>\n  </data>\n  <data name=\"ForwardedVideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Vídeo adjunto</value>\n  </data>\n  <data name=\"SearchMessages\" xml:space=\"preserve\">\n    <value>Buscar mensajes</value>\n  </data>\n  <data name=\"Unsupported\" xml:space=\"preserve\">\n    <value>No soportado</value>\n  </data>\n  <data name=\"EnterYourCurrentPassword\" xml:space=\"preserve\">\n    <value>Pon tu contraseña actual</value>\n  </data>\n  <data name=\"Password\" xml:space=\"preserve\">\n    <value>Contraseña</value>\n  </data>\n  <data name=\"PasswordInvalidString\" xml:space=\"preserve\">\n    <value>Contraseña inválida. Por favor, reinténtalo.</value>\n  </data>\n  <data name=\"AlmostThere\" xml:space=\"preserve\">\n    <value>¡Ya casi!</value>\n  </data>\n  <data name=\"ChangePassword\" xml:space=\"preserve\">\n    <value>Cambiar contraseña</value>\n  </data>\n  <data name=\"ChangePasswordHint\" xml:space=\"preserve\">\n    <value>Puedes poner una contraseña, que será requerida cuando inicies sesión en un nuevo dispositivo, además del código que recibes vía SMS.</value>\n  </data>\n  <data name=\"ChangeRecoveryEmail\" xml:space=\"preserve\">\n    <value>Cambiar correo de recuperación</value>\n  </data>\n  <data name=\"CompletePasswordHint\" xml:space=\"preserve\">\n    <value>Por favor, revisa tu correo (no olvides la carpeta de spam) para configurar la verificación en dos pasos.</value>\n  </data>\n  <data name=\"ConfirmPassword\" xml:space=\"preserve\">\n    <value>Pon, otra vez, tu contraseña</value>\n  </data>\n  <data name=\"EnterPassword\" xml:space=\"preserve\">\n    <value>Pon tu contraseña</value>\n  </data>\n  <data name=\"EnterRecoveryEmail\" xml:space=\"preserve\">\n    <value>Pon tu correo</value>\n  </data>\n  <data name=\"EnterRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>Por favor, añade un correo válido. Es la única forma de recuperar una contraseña olvidada.</value>\n  </data>\n  <data name=\"RecoveryEmail\" xml:space=\"preserve\">\n    <value>Correo de recuperación</value>\n  </data>\n  <data name=\"SetRecoveryEmail\" xml:space=\"preserve\">\n    <value>Poner correo de recuperación</value>\n  </data>\n  <data name=\"Skip\" xml:space=\"preserve\">\n    <value>Omitir</value>\n  </data>\n  <data name=\"SkipRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>En serio.\n\nSi olvidas tu contraseña, perderás el acceso a tu cuenta de Telegram. No habrá manera de recuperarla.</value>\n  </data>\n  <data name=\"TwoStepVerification\" xml:space=\"preserve\">\n    <value>Verificación en dos pasos</value>\n  </data>\n  <data name=\"YourPassword\" xml:space=\"preserve\">\n    <value>Tu contraseña</value>\n  </data>\n  <data name=\"CurrentSession\" xml:space=\"preserve\">\n    <value>Sesión actual</value>\n  </data>\n  <data name=\"OtherSessions\" xml:space=\"preserve\">\n    <value>Otras sesiones</value>\n  </data>\n  <data name=\"OfficialApp\" xml:space=\"preserve\">\n    <value>Aplicación oficial</value>\n  </data>\n  <data name=\"Sessions\" xml:space=\"preserve\">\n    <value>Sesiones activas</value>\n  </data>\n  <data name=\"TerminateAllOtherSessionsNote\" xml:space=\"preserve\">\n    <value>Cierra la sesión en todos los equipos, excepto este</value>\n  </data>\n  <data name=\"UnofficialApp\" xml:space=\"preserve\">\n    <value>Aplicación no oficial</value>\n  </data>\n  <data name=\"EmailInvalid\" xml:space=\"preserve\">\n    <value>Dirección de correo inválida</value>\n  </data>\n  <data name=\"PasswordActive\" xml:space=\"preserve\">\n    <value>Tu contraseña para la verificación en dos pasos está activada.</value>\n  </data>\n  <data name=\"Success\" xml:space=\"preserve\">\n    <value>¡Listo!</value>\n  </data>\n  <data name=\"RecoveryEmailPending\" xml:space=\"preserve\">\n    <value>Tu correo de recuperación {0} aún no está activo y su confirmación está pendiente.</value>\n  </data>\n  <data name=\"AbortTwoStepVerificationSetup\" xml:space=\"preserve\">\n    <value>Anular la configuración de la verificación en dos pasos</value>\n  </data>\n  <data name=\"StepsToCompleteToTwoStepsVerificationSetup\" xml:space=\"preserve\">\n    <value>Por favor, sigue estos pasos para configurar la verificación en dos pasos:\n\n1. Revisa tu correo (no olvides la carpeta de spam): {0}\n\n2. Haz clic sobre el enlace de validación.</value>\n  </data>\n  <data name=\"Hint\" xml:space=\"preserve\">\n    <value>Pista</value>\n  </data>\n  <data name=\"PasswordHint\" xml:space=\"preserve\">\n    <value>Pista para la contraseña</value>\n  </data>\n  <data name=\"PasswordHintLabel\" xml:space=\"preserve\">\n    <value>Por favor, crea una pista para tu contraseña</value>\n  </data>\n  <data name=\"ForgotPassword\" xml:space=\"preserve\">\n    <value>¿La olvidaste?</value>\n  </data>\n  <data name=\"PasswordHintError\" xml:space=\"preserve\">\n    <value>La pista debe ser diferente de tu contraseña</value>\n  </data>\n  <data name=\"EnterPasswordHint\" xml:space=\"preserve\">\n    <value>Pon la pista para tu contraseña</value>\n  </data>\n  <data name=\"HavingTroubleAccessingEmailMessage\" xml:space=\"preserve\">\n    <value>¿Tienes problemas para acceder a tu correo {0}?</value>\n  </data>\n  <data name=\"NoAccessRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Si no puedes acceder a tu e-mail, las opciones restantes son recordar tu contraseña o restablecer tu cuenta.</value>\n  </data>\n  <data name=\"NoRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Como no estableciste un correo de recuperación cuando configuraste tu contraseña, las opciones restantes son recordar tu contraseña o restablecer tu cuenta.</value>\n  </data>\n  <data name=\"PasswordDeactivated\" xml:space=\"preserve\">\n    <value>Contraseña desactivada</value>\n  </data>\n  <data name=\"PasswordMessage\" xml:space=\"preserve\">\n    <value>Activaste la verificación en dos pasos, así que tu cuenta está protegida con una contraseña adicional.</value>\n  </data>\n  <data name=\"PasswordRecovery\" xml:space=\"preserve\">\n    <value>Recuperar contraseña</value>\n  </data>\n  <data name=\"PasswordRecoveryHint\" xml:space=\"preserve\">\n    <value>Por favor, revisa tu correo y pon el código de 6 dígitos que te enviamos ahí.</value>\n  </data>\n  <data name=\"SentRecoveryCodeMessage\" xml:space=\"preserve\">\n    <value>Enviamos un código de recuperación al correo que nos diste: {0}</value>\n  </data>\n  <data name=\"Sorry\" xml:space=\"preserve\">\n    <value>Lo sentimos</value>\n  </data>\n  <data name=\"RecoveryEmailComplete\" xml:space=\"preserve\">\n    <value>Tienes activada la verificación en dos pasos.\nNecesitarás la contraseña que configuraste para iniciar tu sesión en Telegram.</value>\n  </data>\n  <data name=\"TerminateSessionHint\" xml:space=\"preserve\">\n    <value>Toca una sesión para cerrarla.</value>\n  </data>\n  <data name=\"GettingLinkInfo\" xml:space=\"preserve\">\n    <value>Obteniendo enlace...</value>\n  </data>\n  <data name=\"ResetMyAccount\" xml:space=\"preserve\">\n    <value>Restablecer mi cuenta</value>\n  </data>\n  <data name=\"ResetMyAccountConfirmation\" xml:space=\"preserve\">\n    <value>Esta acción no se puede deshacer.\n\nSi restableces tu cuenta, todos tus mensajes y chats se eliminarán.</value>\n  </data>\n  <data name=\"ResetMyAccountHint\" xml:space=\"preserve\">\n    <value>Si continúas con el reinicio de tu cuenta, perderás todos tus chats y mensajes, \n\njunto con toda la multimedia y archivos que compartiste.</value>\n  </data>\n  <data name=\"IsRecordingAudio\" xml:space=\"preserve\">\n    <value>está grabando un audio</value>\n  </data>\n  <data name=\"IsSendingFile\" xml:space=\"preserve\">\n    <value>está enviando un archivo</value>\n  </data>\n  <data name=\"IsSendingPhoto\" xml:space=\"preserve\">\n    <value>está enviando una foto</value>\n  </data>\n  <data name=\"IsSendingVideo\" xml:space=\"preserve\">\n    <value>está enviando un vídeo</value>\n  </data>\n  <data name=\"RecordingAudio\" xml:space=\"preserve\">\n    <value>está grabando un audio</value>\n  </data>\n  <data name=\"SendingFile\" xml:space=\"preserve\">\n    <value>Enviando archivo</value>\n  </data>\n  <data name=\"SendingPhoto\" xml:space=\"preserve\">\n    <value>Enviando foto</value>\n  </data>\n  <data name=\"SendingVideo\" xml:space=\"preserve\">\n    <value>Enviando vídeo</value>\n  </data>\n  <data name=\"AddCaption\" xml:space=\"preserve\">\n    <value>Añadir un comentario...</value>\n  </data>\n  <data name=\"CopyLink\" xml:space=\"preserve\">\n    <value>Copiar enlace</value>\n  </data>\n  <data name=\"CopyLinkHint\" xml:space=\"preserve\">\n    <value>Enlace copiado al portapapeles</value>\n  </data>\n  <data name=\"GroupFullError\" xml:space=\"preserve\">\n    <value>Lo sentimos. Este grupo está lleno.</value>\n  </data>\n  <data name=\"GroupNotExistsError\" xml:space=\"preserve\">\n    <value>Lo sentimos, este chat no existe.</value>\n  </data>\n  <data name=\"InviteGroupViaLink\" xml:space=\"preserve\">\n    <value>Invitar con un enlace</value>\n  </data>\n  <data name=\"InviteLink\" xml:space=\"preserve\">\n    <value>Enlace de invitación</value>\n  </data>\n  <data name=\"InviteLinkHint\" xml:space=\"preserve\">\n    <value>Cualquiera que tenga Telegram instalado podrá unirse a tu grupo siguiendo este enlace.</value>\n  </data>\n  <data name=\"JoinGroupConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres unirte al grupo \"{0}\"?</value>\n  </data>\n  <data name=\"MessageActionChatJoinedByLink\" xml:space=\"preserve\">\n    <value>{0} se unió al grupo con un enlace de invitación</value>\n  </data>\n  <data name=\"RevokeLink\" xml:space=\"preserve\">\n    <value>Anular enlace</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres anular este enlace? Una vez hecho, nadie podrá usarlo para unirse al grupo.</value>\n  </data>\n  <data name=\"RevokeLinkHint\" xml:space=\"preserve\">\n    <value>El enlace de invitación anterior está inactivo. Ha sido creado uno nuevo.</value>\n  </data>\n  <data name=\"ShareLink\" xml:space=\"preserve\">\n    <value>Compartir enlace</value>\n  </data>\n  <data name=\"Directions\" xml:space=\"preserve\">\n    <value>Direcciones</value>\n  </data>\n  <data name=\"NearbyPlaces\" xml:space=\"preserve\">\n    <value>Lugares cercanos</value>\n  </data>\n  <data name=\"SendThisLocation\" xml:space=\"preserve\">\n    <value>Enviar mi ubicación</value>\n  </data>\n  <data name=\"PoweredBy\" xml:space=\"preserve\">\n    <value>Proporcionado por</value>\n  </data>\n  <data name=\"LocationServicesDisabled\" xml:space=\"preserve\">\n    <value>Los servicios de ubicación de tu teléfono están apagados.</value>\n  </data>\n  <data name=\"LocationSettings\" xml:space=\"preserve\">\n    <value>Ajustes de ubicación</value>\n  </data>\n  <data name=\"Unknown\" xml:space=\"preserve\">\n    <value>Desconocido</value>\n  </data>\n  <data name=\"AddStickersConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres añadir los stickers \"{0}\"?</value>\n  </data>\n  <data name=\"NewStickersAdded\" xml:space=\"preserve\">\n    <value>Nuevo pack de stickers añadido</value>\n  </data>\n  <data name=\"StickersNotFound\" xml:space=\"preserve\">\n    <value>Stickers no encontrados</value>\n  </data>\n  <data name=\"ClearLogs\" xml:space=\"preserve\">\n    <value>Borrar registros</value>\n  </data>\n  <data name=\"Hide\" xml:space=\"preserve\">\n    <value>Ocultar</value>\n  </data>\n  <data name=\"Remove\" xml:space=\"preserve\">\n    <value>Eliminar</value>\n  </data>\n  <data name=\"SendLogs\" xml:space=\"preserve\">\n    <value>Enviar registros</value>\n  </data>\n  <data name=\"StickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Stickers</value>\n  </data>\n  <data name=\"StickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"StickerNominativePlural\" xml:space=\"preserve\">\n    <value>Stickers</value>\n  </data>\n  <data name=\"StickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"Stickers\" xml:space=\"preserve\">\n    <value>Stickers</value>\n  </data>\n  <data name=\"StickersDescription\" xml:space=\"preserve\">\n    <value>Los artistas pueden añadir sus propios packs de stickers usando el bot @stickers.\n\nLos usuarios pueden añadir stickers tocando sobre ellos y eligiendo \"Añadir stickers\".</value>\n  </data>\n  <data name=\"LinkCopiedToClipboard\" xml:space=\"preserve\">\n    <value>Enlace copiado al portapapeles</value>\n  </data>\n  <data name=\"Close\" xml:space=\"preserve\">\n    <value>Cerrar</value>\n  </data>\n  <data name=\"Show\" xml:space=\"preserve\">\n    <value>Mostrar</value>\n  </data>\n  <data name=\"AddToStickers\" xml:space=\"preserve\">\n    <value>Añadir a stickers</value>\n  </data>\n  <data name=\"SecretChatRequested\" xml:space=\"preserve\">\n    <value>Intercambiando claves de cifrado...</value>\n  </data>\n  <data name=\"Bot\" xml:space=\"preserve\">\n    <value>Bot</value>\n  </data>\n  <data name=\"OnlySeesMessagesStartingWithSlash\" xml:space=\"preserve\">\n    <value>No tiene acceso a los mensajes</value>\n  </data>\n  <data name=\"SeesAllMessages\" xml:space=\"preserve\">\n    <value>Tiene acceso a los mensajes</value>\n  </data>\n  <data name=\"WhatCanThisBotDo\" xml:space=\"preserve\">\n    <value>¿Qué puede hacer este bot?</value>\n  </data>\n  <data name=\"AddBotToGroupsError\" xml:space=\"preserve\">\n    <value>Este bot no puede unirse a grupos.</value>\n  </data>\n  <data name=\"AddToGroup\" xml:space=\"preserve\">\n    <value>Añadir al grupo</value>\n  </data>\n  <data name=\"BlockContactConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres bloquear este contacto?</value>\n  </data>\n  <data name=\"Help\" xml:space=\"preserve\">\n    <value>Ayuda</value>\n  </data>\n  <data name=\"Start\" xml:space=\"preserve\">\n    <value>Iniciar</value>\n  </data>\n  <data name=\"UnblockContactConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres desbloquear este contacto?</value>\n  </data>\n  <data name=\"SharedLinks\" xml:space=\"preserve\">\n    <value>Enlaces</value>\n  </data>\n  <data name=\"BackgroudnTaskDisabledAlert\" xml:space=\"preserve\">\n    <value>Desactivaste el proceso en segundo plano para Telegram Messenger. No recibirás notificaciones de Telegram mientras esté desactivado. Por favor, permite a Telegram funcionar en segundo plano.</value>\n  </data>\n  <data name=\"SearchSharedLinks\" xml:space=\"preserve\">\n    <value>Buscar enlaces compartidos</value>\n  </data>\n  <data name=\"SharedFiles\" xml:space=\"preserve\">\n    <value>Archivos</value>\n  </data>\n  <data name=\"ShareLinks\" xml:space=\"preserve\">\n    <value>Comparte enlaces en este chat y accede a ellos desde cualquiera de tus dispositivos.</value>\n  </data>\n  <data name=\"DeleteAndStop\" xml:space=\"preserve\">\n    <value>Eliminar y detener</value>\n  </data>\n  <data name=\"Restart\" xml:space=\"preserve\">\n    <value>Reiniciar</value>\n  </data>\n  <data name=\"RestartBot\" xml:space=\"preserve\">\n    <value>Reiniciar bot</value>\n  </data>\n  <data name=\"StopBot\" xml:space=\"preserve\">\n    <value>Detener</value>\n  </data>\n  <data name=\"ClearSearchHistoryConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres borrar el historial de búsqueda?</value>\n  </data>\n  <data name=\"Recent\" xml:space=\"preserve\">\n    <value>Recientes</value>\n  </data>\n  <data name=\"NewChannel\" xml:space=\"preserve\">\n    <value>Nuevo canal</value>\n  </data>\n  <data name=\"MessageActionBroadcastCreate\" xml:space=\"preserve\">\n    <value>{0} creó la difusión \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionChannelCreate\" xml:space=\"preserve\">\n    <value>Canal creado</value>\n  </data>\n  <data name=\"ReportSpam\" xml:space=\"preserve\">\n    <value>Reportar spam</value>\n  </data>\n  <data name=\"ConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Chat marcado como spam. ¿Eliminar y bloquear al usuario?</value>\n  </data>\n  <data name=\"GroupConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Chat marcado como spam. ¿Eliminar y salir del grupo?</value>\n  </data>\n  <data name=\"PeerFloodAddContact\" xml:space=\"preserve\">\n    <value>Lo sentimos, por ahora sólo puedes añadir a contactos mutuos a un grupo.</value>\n  </data>\n  <data name=\"PeerFloodSendMessage\" xml:space=\"preserve\">\n    <value>Lo sentimos, por ahora puedes enviar mensajes sólo a contactos mutuos.</value>\n  </data>\n  <data name=\"LeaveChannel\" xml:space=\"preserve\">\n    <value>Salir del canal</value>\n  </data>\n  <data name=\"AccessLevel\" xml:space=\"preserve\">\n    <value>Nivel de acceso</value>\n  </data>\n  <data name=\"AddManager\" xml:space=\"preserve\">\n    <value>Añadir administrador</value>\n  </data>\n  <data name=\"Comments\" xml:space=\"preserve\">\n    <value>Comentarios</value>\n  </data>\n  <data name=\"CommentsDescription\" xml:space=\"preserve\">\n    <value>Si activas los comentarios, los miembros podrán hablar de tu mensaje en el canal.</value>\n  </data>\n  <data name=\"Creator\" xml:space=\"preserve\">\n    <value>Creador</value>\n  </data>\n  <data name=\"Management\" xml:space=\"preserve\">\n    <value>Administración</value>\n  </data>\n  <data name=\"Moderator\" xml:space=\"preserve\">\n    <value>Moderador</value>\n  </data>\n  <data name=\"ModeratorDescription\" xml:space=\"preserve\">\n    <value>Puede eliminar el contenido generado por los usuarios.</value>\n  </data>\n  <data name=\"Publisher\" xml:space=\"preserve\">\n    <value>Administrador</value>\n  </data>\n  <data name=\"PublisherDescription\" xml:space=\"preserve\">\n    <value>Puede publicar a nombre del canal, añadir y eliminar contenido.</value>\n  </data>\n  <data name=\"ChannelName\" xml:space=\"preserve\">\n    <value>Nombre del canal</value>\n  </data>\n  <data name=\"Description\" xml:space=\"preserve\">\n    <value>Descripción</value>\n  </data>\n  <data name=\"AboutDescription\" xml:space=\"preserve\">\n    <value>Puedes poner una descripción para tu canal.</value>\n  </data>\n  <data name=\"Back\" xml:space=\"preserve\">\n    <value>Atrás</value>\n  </data>\n  <data name=\"ChannelType\" xml:space=\"preserve\">\n    <value>Tipo de canal</value>\n  </data>\n  <data name=\"Private\" xml:space=\"preserve\">\n    <value>Grupo privado</value>\n  </data>\n  <data name=\"PrivateChannelDescription\" xml:space=\"preserve\">\n    <value>Puedes unirte a canales privados sólo con enlaces de invitación.</value>\n  </data>\n  <data name=\"Public\" xml:space=\"preserve\">\n    <value>Grupo público</value>\n  </data>\n  <data name=\"PublicChannelDescription\" xml:space=\"preserve\">\n    <value>Cualquiera puede unirse a los canales públicos, tras encontrarlos en la búsqueda.</value>\n  </data>\n  <data name=\"PrivateLinkDescription\" xml:space=\"preserve\">\n    <value>Las personas pueden unirse a tu canal siguiendo este enlace. Puedes anular el enlace en cualquier momento.</value>\n  </data>\n  <data name=\"PublicLinkDescription\" xml:space=\"preserve\">\n    <value>Las personas pueden compartir este enlace con los demás y encontrar tu canal usando la búsqueda de Telegram.</value>\n  </data>\n  <data name=\"CommentGenitivePlural\" xml:space=\"preserve\">\n    <value>Comentarios</value>\n  </data>\n  <data name=\"CommentGenitiveSingular\" xml:space=\"preserve\">\n    <value>Comentario</value>\n  </data>\n  <data name=\"CommentNominativePlural\" xml:space=\"preserve\">\n    <value>Comentarios</value>\n  </data>\n  <data name=\"CommentNominativeSingular\" xml:space=\"preserve\">\n    <value>Comentario</value>\n  </data>\n  <data name=\"Blacklist\" xml:space=\"preserve\">\n    <value>Bloqueados</value>\n  </data>\n  <data name=\"Channel\" xml:space=\"preserve\">\n    <value>Canal</value>\n  </data>\n  <data name=\"ChoosePublicChannelLinkNotification\" xml:space=\"preserve\">\n    <value>Por favor, elige un enlace para tu canal público. Así, las personas podrán encontrarlo en la búsqueda y compartirlo con otros.\n\nSi no estás interesado, te sugerimos crear un canal privado.</value>\n  </data>\n  <data name=\"MessageActionChannelEditPhoto\" xml:space=\"preserve\">\n    <value>Foto del canal actualizada</value>\n  </data>\n  <data name=\"Mute\" xml:space=\"preserve\">\n    <value>Silenciar</value>\n  </data>\n  <data name=\"SetChannelPhoto\" xml:space=\"preserve\">\n    <value>Poner foto del canal</value>\n  </data>\n  <data name=\"Unmute\" xml:space=\"preserve\">\n    <value>No silenciar</value>\n  </data>\n  <data name=\"WhatIsChannel\" xml:space=\"preserve\">\n    <value>¿Qué es un canal?</value>\n  </data>\n  <data name=\"WhatIsChannelDescription\" xml:space=\"preserve\">\n    <value>Los canales son una nueva herramienta para difundir tus mensajes a grandes audiencias.</value>\n  </data>\n  <data name=\"AddEditorConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres añadir a {0} como editor?</value>\n  </data>\n  <data name=\"AddModeratorConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres añadir a {0} como moderador?</value>\n  </data>\n  <data name=\"PrivateChannel\" xml:space=\"preserve\">\n    <value>Canal privado</value>\n  </data>\n  <data name=\"PrivateToPublicChannelNotification\" xml:space=\"preserve\">\n    <value>Por favor, ten en cuenta que si eliges un enlace público para tu canal, cualquiera podrá encontrarlo en la búsqueda y unirse.\n\nNo crees este enlace si quieres que tu canal sea privado.</value>\n  </data>\n  <data name=\"PublicChannel\" xml:space=\"preserve\">\n    <value>Canal público</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuch\" xml:space=\"preserve\">\n    <value>Lo sentimos, tienes demasiados alias públicos. Puedes anular el enlace de uno de tus grupos o canales anteriores, o crear uno privado.</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuchShort\" xml:space=\"preserve\">\n    <value>Demasiados canales públicos.</value>\n  </data>\n  <data name=\"DeleteChannelConfirmation\" xml:space=\"preserve\">\n    <value>¡Espera! Al eliminar este canal, todos los miembros y los mensajes se perderán. ¿Quieres eliminarlo?</value>\n  </data>\n  <data name=\"Follow\" xml:space=\"preserve\">\n    <value>Unirme</value>\n  </data>\n  <data name=\"Join\" xml:space=\"preserve\">\n    <value>Unirme</value>\n  </data>\n  <data name=\"LeaveChannelConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres salir de este canal?</value>\n  </data>\n  <data name=\"JoinChannelConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres unirte al canal \"{0}\"?</value>\n  </data>\n  <data name=\"Administration\" xml:space=\"preserve\">\n    <value>Administración</value>\n  </data>\n  <data name=\"Administrators\" xml:space=\"preserve\">\n    <value>Administradores</value>\n  </data>\n  <data name=\"DeleteChannel\" xml:space=\"preserve\">\n    <value>Eliminar canal</value>\n  </data>\n  <data name=\"MessageActionChannelDeletePhoto\" xml:space=\"preserve\">\n    <value>Foto del canal eliminada</value>\n  </data>\n  <data name=\"MessageActionChannelEditTitle\" xml:space=\"preserve\">\n    <value>Nombre del canal cambiado a \"{0}\"</value>\n  </data>\n  <data name=\"SetSharedLink\" xml:space=\"preserve\">\n    <value>Crear enlace público</value>\n  </data>\n  <data name=\"AddAdministrator\" xml:space=\"preserve\">\n    <value>Añadir administrador</value>\n  </data>\n  <data name=\"ChannelAdministratorsHint\" xml:space=\"preserve\">\n    <value>Puedes añadir administradores para que te ayuden en el canal. Mantén pulsado para eliminar un administrador.</value>\n  </data>\n  <data name=\"ChannelMembersHint\" xml:space=\"preserve\">\n    <value>Sólo los administradores del canal pueden ver esta lista.</value>\n  </data>\n  <data name=\"InviteViaLink\" xml:space=\"preserve\">\n    <value>Invitar con un enlace</value>\n  </data>\n  <data name=\"AddUserAsAdministrator\" xml:space=\"preserve\">\n    <value>¿Quieres nombrar a {0} como administrador?</value>\n  </data>\n  <data name=\"ChannelIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Lo sentimos, este canal ya no es accesible.</value>\n  </data>\n  <data name=\"InviteContactConfirmation\" xml:space=\"preserve\">\n    <value>{0} aún no está en el canal. ¿Quieres enviarle una invitación?</value>\n  </data>\n  <data name=\"PostToChannelError\" xml:space=\"preserve\">\n    <value>Lo sentimos, no puedes publicar en este canal.</value>\n  </data>\n  <data name=\"SearchSharedMusic\" xml:space=\"preserve\">\n    <value>Buscar música compartida</value>\n  </data>\n  <data name=\"SharedMusic\" xml:space=\"preserve\">\n    <value>Música</value>\n  </data>\n  <data name=\"ShareMusic\" xml:space=\"preserve\">\n    <value>Aquí verás la música compartida en este chat.</value>\n  </data>\n  <data name=\"AdminsDescription\" xml:space=\"preserve\">\n    <value>Sólo los administradores pueden añadir y eliminar miembros, editar el nombre del grupo y la foto.</value>\n  </data>\n  <data name=\"AllMembersAreAdmins\" xml:space=\"preserve\">\n    <value>Todos son administradores</value>\n  </data>\n  <data name=\"MembersDescription\" xml:space=\"preserve\">\n    <value>Los miembros del grupo pueden añadir y eliminar miembros, editar el nombre y la foto del grupo.</value>\n  </data>\n  <data name=\"SetAdmins\" xml:space=\"preserve\">\n    <value>Nombrar administradores</value>\n  </data>\n  <data name=\"UpgradeToSupergroup\" xml:space=\"preserve\">\n    <value>Convertir en supergrupo</value>\n  </data>\n  <data name=\"UpgradeToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Por favor, ten en cuenta que los miembros del grupo tendrán que actualizar Telegram a la última versión para ver tu supergrupo. ¿Quieres convertir el grupo?</value>\n  </data>\n  <data name=\"UpgradeToSupergroupDescription\" xml:space=\"preserve\">\n    <value>Límite de miembros alcanzado.\nPara superar el límite y tener características adicionales, conviértelo en un supergrupo:\n• Permiten hasta {0}\n• Nuevos miembros ven todo el historial\n• Un admin. borra mensajes para todos\n• Notificaciones silenciadas por defecto</value>\n  </data>\n  <data name=\"MessageActionChannelMigrateFrom\" xml:space=\"preserve\">\n    <value>Este grupo fue convertido en un supergrupo</value>\n  </data>\n  <data name=\"MessageActionChatActivate\" xml:space=\"preserve\">\n    <value>Chat activado</value>\n  </data>\n  <data name=\"MessageActionChatDeactivate\" xml:space=\"preserve\">\n    <value>Chat desactivado</value>\n  </data>\n  <data name=\"MessageActionChatMigrateTo\" xml:space=\"preserve\">\n    <value>Chat trasladado a canal \"{0}\"</value>\n  </data>\n  <data name=\"DeleteGroup\" xml:space=\"preserve\">\n    <value>Eliminar grupo</value>\n  </data>\n  <data name=\"LeaveGroup\" xml:space=\"preserve\">\n    <value>Salir del grupo</value>\n  </data>\n  <data name=\"LeaveGroupConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres salir del grupo?</value>\n  </data>\n  <data name=\"AdminsTooMuch\" xml:space=\"preserve\">\n    <value>Lo sentimos, hay demasiados administradores en el grupo.</value>\n  </data>\n  <data name=\"BlockedUsersDescription\" xml:space=\"preserve\">\n    <value>Los usuarios bloqueados son eliminados del grupo y sólo pueden volver si son invitados por un administrador. Los enlaces de invitación no funcionan para ellos.</value>\n  </data>\n  <data name=\"BotsTooMuch\" xml:space=\"preserve\">\n    <value>Lo sentimos, hay demasiados bots en el grupo.</value>\n  </data>\n  <data name=\"DeleteGroupConfirmation\" xml:space=\"preserve\">\n    <value>¡Espera! Al eliminar este grupo, todos los miembros y los mensajes se perderán. ¿Quieres eliminarlo?</value>\n  </data>\n  <data name=\"GroupAdministratorsHint\" xml:space=\"preserve\">\n    <value>Puedes añadir administradores para que te ayuden a dirigir el canal. Mantén pulsado para eliminarlos.</value>\n  </data>\n  <data name=\"GroupNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Lo sentimos, este canal ya no es accesible.</value>\n  </data>\n  <data name=\"InviteUserBackError\" xml:space=\"preserve\">\n    <value>Lo sentimos, este usuario decidió salir del grupo, así que no puedes invitarlo otra vez.</value>\n  </data>\n  <data name=\"MessageActionChatAddSelf\" xml:space=\"preserve\">\n    <value>{0} volvió al grupo</value>\n  </data>\n  <data name=\"PromoteToAdmin\" xml:space=\"preserve\">\n    <value>Nombrar como administrador</value>\n  </data>\n  <data name=\"UserNotMutualContact\" xml:space=\"preserve\">\n    <value>Lo sentimos, no puedes añadir este usuario a grupos.</value>\n  </data>\n  <data name=\"UsersTooMuch\" xml:space=\"preserve\">\n    <value>Lo sentimos, el grupo está lleno.</value>\n  </data>\n  <data name=\"GroupIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Lo sentimos, este grupo ya no es accesible.</value>\n  </data>\n  <data name=\"InviteContactToGroupConfirmation\" xml:space=\"preserve\">\n    <value>{0} aún no está en el grupo. ¿Quieres enviarle una invitación?</value>\n  </data>\n  <data name=\"OpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>¿Abrir {0}?</value>\n  </data>\n  <data name=\"ServiceNotifications\" xml:space=\"preserve\">\n    <value>Servicio de notificaciones</value>\n  </data>\n  <data name=\"AutomaticAudioDownload\" xml:space=\"preserve\">\n    <value>Autodescarga de audio</value>\n  </data>\n  <data name=\"AutomaticPhotoDownload\" xml:space=\"preserve\">\n    <value>Autodescarga de fotos</value>\n  </data>\n  <data name=\"CacheSettings\" xml:space=\"preserve\">\n    <value>Ajustes de caché</value>\n  </data>\n  <data name=\"ChatSettings\" xml:space=\"preserve\">\n    <value>Ajustes de chat</value>\n  </data>\n  <data name=\"ClearChannelConfirmation\" xml:space=\"preserve\">\n    <value>¿Eliminar de la caché los mensajes y multimedia de este canal?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseConfirmation\" xml:space=\"preserve\">\n    <value>¿Borrar los mensajes en la caché?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseDescription\" xml:space=\"preserve\">\n    <value>Al borrar la base de datos se eliminarán los mensajes en la caché y se comprimirá la base de datos para liberar espacio de almacenamiento. Telegram requiere algunos datos para funcionar, así que la base de datos nunca podrá llegar a cero.\n\nEsto puede tardar algunos minutos.</value>\n  </data>\n  <data name=\"ClearSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>¿Eliminar de la caché los mensajes y multimedia de este supergrupo?</value>\n  </data>\n  <data name=\"Documents\" xml:space=\"preserve\">\n    <value>Archivos</value>\n  </data>\n  <data name=\"Forever\" xml:space=\"preserve\">\n    <value>Siempre</value>\n  </data>\n  <data name=\"Groups\" xml:space=\"preserve\">\n    <value>Grupos</value>\n  </data>\n  <data name=\"KeepMedia\" xml:space=\"preserve\">\n    <value>Conservar multimedia</value>\n  </data>\n  <data name=\"KeepMediaDescription\" xml:space=\"preserve\">\n    <value>Las fotos, vídeos y archivos de los chats en la nube, a los que **no ingreses** durante este periodo, se eliminarán del dispositivo para ahorrar almacenamiento.\n\nToda la multimedia permanecerá en la nube de Telegram y podrás volver a descargarla si la necesitas.</value>\n  </data>\n  <data name=\"Music\" xml:space=\"preserve\">\n    <value>Música</value>\n  </data>\n  <data name=\"Other\" xml:space=\"preserve\">\n    <value>Otro</value>\n  </data>\n  <data name=\"OtherFiles\" xml:space=\"preserve\">\n    <value>Otros archivos</value>\n  </data>\n  <data name=\"Photos\" xml:space=\"preserve\">\n    <value>Fotos</value>\n  </data>\n  <data name=\"PrivateChats\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"Videos\" xml:space=\"preserve\">\n    <value>Vídeos</value>\n  </data>\n  <data name=\"VoiceMessages\" xml:space=\"preserve\">\n    <value>Mensajes de voz</value>\n  </data>\n  <data name=\"LocalDatabase\" xml:space=\"preserve\">\n    <value>Base de datos local</value>\n  </data>\n  <data name=\"AutomaticGifDownload\" xml:space=\"preserve\">\n    <value>Autodescarga de GIF</value>\n  </data>\n  <data name=\"ForwardedGifGenitivePlural\" xml:space=\"preserve\">\n    <value>GIF reenviados</value>\n  </data>\n  <data name=\"ForwardedGifGenitiveSingular\" xml:space=\"preserve\">\n    <value>GIF reenviado</value>\n  </data>\n  <data name=\"ForwardedGifNominativePlural\" xml:space=\"preserve\">\n    <value>GIF reenviados</value>\n  </data>\n  <data name=\"ForwardedGifNominativeSingular\" xml:space=\"preserve\">\n    <value>GIF reenviado</value>\n  </data>\n  <data name=\"Gif\" xml:space=\"preserve\">\n    <value>GIF</value>\n  </data>\n  <data name=\"AutoplayGifs\" xml:space=\"preserve\">\n    <value>Autorreproducción de GIF</value>\n  </data>\n  <data name=\"Via\" xml:space=\"preserve\">\n    <value>Vía {0}</value>\n  </data>\n  <data name=\"AddNewMembers\" xml:space=\"preserve\">\n    <value>¿Quién puede añadir nuevos miembros?</value>\n  </data>\n  <data name=\"AllMembers\" xml:space=\"preserve\">\n    <value>Todos los miembros</value>\n  </data>\n  <data name=\"AlwaysAllow\" xml:space=\"preserve\">\n    <value>Permitir</value>\n  </data>\n  <data name=\"GroupsDescription\" xml:space=\"preserve\">\n    <value>Elige quién puede añadirte a grupos y canales</value>\n  </data>\n  <data name=\"GroupsImportantNote\" xml:space=\"preserve\">\n    <value>Puedes restringir quién puede añadirte a grupos o canales con gran precisión.</value>\n  </data>\n  <data name=\"GroupsSettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Estos usuarios podrán o no añadirte a grupos y canales, independiente de los ajustes de arriba.</value>\n  </data>\n  <data name=\"GroupsShort\" xml:space=\"preserve\">\n    <value>Grupos y canales</value>\n  </data>\n  <data name=\"NeverAllow\" xml:space=\"preserve\">\n    <value>No permitir</value>\n  </data>\n  <data name=\"OnlyAdmins\" xml:space=\"preserve\">\n    <value>Sólo los administradores</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Reenvió mensajes de voz</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Reenvió un mensaje de voz</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Mensajes de voz reenviados</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Mensaje de voz reenviado</value>\n  </data>\n  <data name=\"RecordingVoiceMessage\" xml:space=\"preserve\">\n    <value>Grabando mensaje de voz</value>\n  </data>\n  <data name=\"VoiceMessage\" xml:space=\"preserve\">\n    <value>Mensaje de voz</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription1\" xml:space=\"preserve\">\n    <value>El texto e imagen derivan de la clave de cifrado para el chat secreto creado con {0}.</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription2\" xml:space=\"preserve\">\n    <value>Si se ven igual en el dispositivo de {0}, el cifrado end-to-end está garantizado.</value>\n  </data>\n  <data name=\"InlineBotsNotification\" xml:space=\"preserve\">\n    <value>Ten en cuenta que los bots integrados son hechos por terceros. Para que funcione, los símbolos escritos después del alias del bot, son enviados al desarrollador respectivo.</value>\n  </data>\n  <data name=\"LinkPreviews\" xml:space=\"preserve\">\n    <value>Vista previa del enlace</value>\n  </data>\n  <data name=\"LInkPreviewsNotification\" xml:space=\"preserve\">\n    <value>¿Quieres permitir las vistas previas ampliadas en chats secretos? Ten en cuenta que son generadas en los servidores de Telegram.</value>\n  </data>\n  <data name=\"ViewStickers\" xml:space=\"preserve\">\n    <value>Ver stickers</value>\n  </data>\n  <data name=\"NotifyMembers\" xml:space=\"preserve\">\n    <value>Notificar a los miembros</value>\n  </data>\n  <data name=\"NotifyMembersDescription\" xml:space=\"preserve\">\n    <value>Enviar notificaciones push cuando un administrador publique un mensaje.</value>\n  </data>\n  <data name=\"SignMessages\" xml:space=\"preserve\">\n    <value>Firmar los mensajes</value>\n  </data>\n  <data name=\"SignMessagesDescription\" xml:space=\"preserve\">\n    <value>Añadir los nombres de los administradores a sus publicaciones.</value>\n  </data>\n  <data name=\"ChannelNameDescription\" xml:space=\"preserve\">\n    <value>Puedes elegir un nombre para el canal en Telegram. Si lo haces, otras personas podrán encontrar tu canal por ese nombre. \n\nPuedes usar a-z, 0-9 y guiones bajos. La longitud mínima es de 5 caracteres.</value>\n  </data>\n  <data name=\"ChannelNameDescription2\" xml:space=\"preserve\">\n    <value>Este enlace abre tu canal en Telegram:</value>\n  </data>\n  <data name=\"SupergroupNameDescription\" xml:space=\"preserve\">\n    <value>Puedes elegir un nombre para el supergrupo en Telegram. Si lo haces, otras personas podrán encontrar tu canal por ese nombre. \n\nPuedes usar a-z, 0-9 y guiones bajos. La longitud mínima es de 5 caracteres.</value>\n  </data>\n  <data name=\"SupergroupNameDescription2\" xml:space=\"preserve\">\n    <value>Este enlace abre tu supergrupo en Telegram:</value>\n  </data>\n  <data name=\"SupergroupName\" xml:space=\"preserve\">\n    <value>Nombre del supergrupo</value>\n  </data>\n  <data name=\"ChannelNameInvalid\" xml:space=\"preserve\">\n    <value>Lo sentimos, este nombre es inválido.</value>\n  </data>\n  <data name=\"ChannelNameOccupied\" xml:space=\"preserve\">\n    <value>Lo sentimos, este nombre ya está ocupado.</value>\n  </data>\n  <data name=\"ChannelNameShort\" xml:space=\"preserve\">\n    <value>El nombre del canal debe tener al menos 5 caracteres.</value>\n  </data>\n  <data name=\"ChannelNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>El nombre del canal no puede comenzar con un número.</value>\n  </data>\n  <data name=\"NameChecking\" xml:space=\"preserve\">\n    <value>Verificando nombre...</value>\n  </data>\n  <data name=\"NameIsAvailable\" xml:space=\"preserve\">\n    <value>{0} está disponible.</value>\n  </data>\n  <data name=\"SupergroupNameInvalid\" xml:space=\"preserve\">\n    <value>Lo sentimos, este nombre es inválido.</value>\n  </data>\n  <data name=\"SupergroupNameOccupied\" xml:space=\"preserve\">\n    <value>Lo sentimos, este nombre ya está ocupado.</value>\n  </data>\n  <data name=\"SupergroupNameShort\" xml:space=\"preserve\">\n    <value>El nombre del supergrupo debe tener al menos 5 caracteres.</value>\n  </data>\n  <data name=\"SupergroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>El nombre del supergrupo no puede comenzar con un número.</value>\n  </data>\n  <data name=\"EditMessageError\" xml:space=\"preserve\">\n    <value>Lo sentimos, no puedes editar este mensaje.</value>\n  </data>\n  <data name=\"MuteChannelPostHint\" xml:space=\"preserve\">\n    <value>Tu publicación no será notificada</value>\n  </data>\n  <data name=\"UnmuteChannelPostHint\" xml:space=\"preserve\">\n    <value>Tu publicación será notificada</value>\n  </data>\n  <data name=\"PinMessage\" xml:space=\"preserve\">\n    <value>Anclar</value>\n  </data>\n  <data name=\"UnpinMessage\" xml:space=\"preserve\">\n    <value>Desanclar</value>\n  </data>\n  <data name=\"UnpinMessageConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres desanclar este mensaje?</value>\n  </data>\n  <data name=\"ConvertToSupergroup\" xml:space=\"preserve\">\n    <value>Convertir en supergrupo</value>\n  </data>\n  <data name=\"ConvertToSupergroupNote\" xml:space=\"preserve\">\n    <value>**Importante**: Esta acción no se puede deshacer.</value>\n  </data>\n  <data name=\"Supergroup\" xml:space=\"preserve\">\n    <value>Supergrupo</value>\n  </data>\n  <data name=\"ConvertToSupergroupDescription\" xml:space=\"preserve\">\n    <value>**En los supergrupos:**\n• Los nuevos miembros ven todo el historial\n• Un mensaje eliminado desaparece para todos\n• Los administradores pueden anclar mensajes\n• El creador puede generar un enlace público</value>\n  </data>\n  <data name=\"BanUser\" xml:space=\"preserve\">\n    <value>Suspender usuario</value>\n  </data>\n  <data name=\"DeleteAllFrom\" xml:space=\"preserve\">\n    <value>Eliminar todo lo de {0}</value>\n  </data>\n  <data name=\"DeleteMessageConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar el mensaje?</value>\n  </data>\n  <data name=\"DeleteMessages\" xml:space=\"preserve\">\n    <value>Eliminar mensajes</value>\n  </data>\n  <data name=\"MessageActionPinMessage\" xml:space=\"preserve\">\n    <value>{0} ancló un mensaje</value>\n  </data>\n  <data name=\"MessageActionPinContact\" xml:space=\"preserve\">\n    <value>{0} ancló un contacto</value>\n  </data>\n  <data name=\"MessageActionPinFile\" xml:space=\"preserve\">\n    <value>{0} ancló un archivo</value>\n  </data>\n  <data name=\"MessageActionPinGif\" xml:space=\"preserve\">\n    <value>{0} ancló un GIF</value>\n  </data>\n  <data name=\"MessageActionPinMap\" xml:space=\"preserve\">\n    <value>{0} ancló un mapa</value>\n  </data>\n  <data name=\"MessageActionPinPhoto\" xml:space=\"preserve\">\n    <value>{0} ancló una foto</value>\n  </data>\n  <data name=\"MessageActionPinSticker\" xml:space=\"preserve\">\n    <value>{0} ancló un sticker</value>\n  </data>\n  <data name=\"MessageActionPinText\" xml:space=\"preserve\">\n    <value>{0} ancló \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionPinTrack\" xml:space=\"preserve\">\n    <value>{0} ancló una pista</value>\n  </data>\n  <data name=\"MessageActionPinVideo\" xml:space=\"preserve\">\n    <value>{0} ancló un vídeo</value>\n  </data>\n  <data name=\"MessageActionPinVoiceMessage\" xml:space=\"preserve\">\n    <value>{0} ancló un mensaje de voz</value>\n  </data>\n  <data name=\"PinnedMessage\" xml:space=\"preserve\">\n    <value>Mensaje anclado</value>\n  </data>\n  <data name=\"ConvertToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Esta acción es irreversible. No puedes convertir un supergrupo en un grupo normal.</value>\n  </data>\n  <data name=\"NotifyAllMembers\" xml:space=\"preserve\">\n    <value>Notificar a los miembros</value>\n  </data>\n  <data name=\"PinMessageConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres anclar este mensaje en el grupo?</value>\n  </data>\n  <data name=\"ChatMaxSizeNotification\" xml:space=\"preserve\">\n    <value>Podrás añadir más usuarios después de crear el grupo y convertirlo en un supergrupo.</value>\n  </data>\n  <data name=\"Admin\" xml:space=\"preserve\">\n    <value>Administrador</value>\n  </data>\n  <data name=\"ChoosePublicGroupLinkNotification\" xml:space=\"preserve\">\n    <value>Elige un enlace para tu grupo público. Así, las personas podrán encontrarlo en la búsqueda y compartirlo con otros.</value>\n  </data>\n  <data name=\"GroupType\" xml:space=\"preserve\">\n    <value>Tipo de grupo</value>\n  </data>\n  <data name=\"PrivateGroupDescription\" xml:space=\"preserve\">\n    <value>Puedes unirte a un grupo privado sólo si te invitan o tienes un enlace de invitación.</value>\n  </data>\n  <data name=\"PrivateGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Las personas pueden unirse a tu grupo siguiendo este enlace. Puedes anularlo cuando quieras.</value>\n  </data>\n  <data name=\"PublicGroupDescription\" xml:space=\"preserve\">\n    <value>Los grupos públicos pueden encontrarse en la búsqueda, su historial está disponible para todos y cualquiera puede unirse.</value>\n  </data>\n  <data name=\"PublicGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Las personas pueden compartir este enlace con los demás y encontrar tu grupo usando la búsqueda de Telegram.</value>\n  </data>\n  <data name=\"Camera\" xml:space=\"preserve\">\n    <value>Cámara</value>\n  </data>\n  <data name=\"Pornography\" xml:space=\"preserve\">\n    <value>Pornografía</value>\n  </data>\n  <data name=\"Report\" xml:space=\"preserve\">\n    <value>Reportar</value>\n  </data>\n  <data name=\"ReportSpamNotification\" xml:space=\"preserve\">\n    <value>¡Gracias!\nTu reporte será revisado muy pronto por nuestro equipo.</value>\n  </data>\n  <data name=\"Spam\" xml:space=\"preserve\">\n    <value>Spam</value>\n  </data>\n  <data name=\"Violence\" xml:space=\"preserve\">\n    <value>Violencia</value>\n  </data>\n  <data name=\"ClearHistoryConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar el historial?</value>\n  </data>\n  <data name=\"DeleteAndExitConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar y salir del grupo?</value>\n  </data>\n  <data name=\"DeleteChat\" xml:space=\"preserve\">\n    <value>Eliminar chat</value>\n  </data>\n  <data name=\"MessageActionChatJoin\" xml:space=\"preserve\">\n    <value>{0} se unió al grupo</value>\n  </data>\n  <data name=\"MessageActionChatJoinSelf\" xml:space=\"preserve\">\n    <value>Te uniste al grupo</value>\n  </data>\n  <data name=\"MessageActionLeftGroupSelf\" xml:space=\"preserve\">\n    <value>Dejaste el grupo</value>\n  </data>\n  <data name=\"CodeSentToTelegramApp\" xml:space=\"preserve\">\n    <value>Enviamos el código a **Telegram** en tu otro dispositivo.</value>\n  </data>\n  <data name=\"CodeSentViaCallingPhone\" xml:space=\"preserve\">\n    <value>Estamos llamando al número **{0}** para dictar un código.</value>\n  </data>\n  <data name=\"DidNotGetCode\" xml:space=\"preserve\">\n    <value>¿No recibiste el código?</value>\n  </data>\n  <data name=\"HaveNotReceivedCode\" xml:space=\"preserve\">\n    <value>¿No has recibido el código?</value>\n  </data>\n  <data name=\"ShareLocationConfirmation\" xml:space=\"preserve\">\n    <value>Esto enviará tu ubicación actual al bot.</value>\n  </data>\n  <data name=\"SharePhoneNumberConfirmation\" xml:space=\"preserve\">\n    <value>El bot sabrá tu número de teléfono. Puede ser útil para la integración con otros servicios.</value>\n  </data>\n  <data name=\"ChooseManually\" xml:space=\"preserve\">\n    <value>Elegir manualmente</value>\n  </data>\n  <data name=\"ShareLocationCaption\" xml:space=\"preserve\">\n    <value>¿Compartir tu ubicación?</value>\n  </data>\n  <data name=\"SharePhoneNumberCaption\" xml:space=\"preserve\">\n    <value>¿Compartir tu número de teléfono?</value>\n  </data>\n  <data name=\"UnableToDetermineLocation\" xml:space=\"preserve\">\n    <value>La aplicación no pudo determinar tu ubicación actual.</value>\n  </data>\n  <data name=\"ShareLocationInlineConfirmation\" xml:space=\"preserve\">\n    <value>Este bot podría querer saber tu ubicación cada vez que le envías una solicitud. Esto puede ser usado para entregar resultados específicos para tu ubicación.</value>\n  </data>\n  <data name=\"MoreInfo\" xml:space=\"preserve\">\n    <value>Más información</value>\n  </data>\n  <data name=\"RemoveStickers\" xml:space=\"preserve\">\n    <value>Eliminar</value>\n  </data>\n  <data name=\"SendSticker\" xml:space=\"preserve\">\n    <value>Enviar sticker</value>\n  </data>\n  <data name=\"StickersRemoved\" xml:space=\"preserve\">\n    <value>Pack de stickers eliminado</value>\n  </data>\n  <data name=\"UnpinFromStart\" xml:space=\"preserve\">\n    <value>Desanclar del inicio</value>\n  </data>\n  <data name=\"Bots\" xml:space=\"preserve\">\n    <value>Bots</value>\n  </data>\n  <data name=\"LastSeenYesterdayAt\" xml:space=\"preserve\">\n    <value>Últ. vez ayer a las {0}</value>\n  </data>\n  <data name=\"Clear\" xml:space=\"preserve\">\n    <value>Borrar</value>\n  </data>\n  <data name=\"Edited\" xml:space=\"preserve\">\n    <value>Editado</value>\n  </data>\n  <data name=\"EditMessage\" xml:space=\"preserve\">\n    <value>Editar mensaje</value>\n  </data>\n  <data name=\"LastSeenTodayAt\" xml:space=\"preserve\">\n    <value>Últ. vez hoy a las {0}</value>\n  </data>\n  <data name=\"OpenInlineBotsHint\" xml:space=\"preserve\">\n    <value>Desliza hacia arriba para abrir bots integrados</value>\n  </data>\n  <data name=\"ConfirmResetTopPeerRating\" xml:space=\"preserve\">\n    <value>¿Eliminar {0} de las sugerencias?</value>\n  </data>\n  <data name=\"Draft\" xml:space=\"preserve\">\n    <value>Borrador</value>\n  </data>\n  <data name=\"FeaturedStickers\" xml:space=\"preserve\">\n    <value>Stickers destacados</value>\n  </data>\n  <data name=\"StickersHint\" xml:space=\"preserve\">\n    <value>Los artistas pueden añadir sus propios packs de stickers usando el bot __@stickers__.\n\nLos usuarios pueden añadir stickers tocando sobre ellos y eligiendo \"Añadir stickers\".</value>\n  </data>\n  <data name=\"ClearRecentStickers\" xml:space=\"preserve\">\n    <value>Borrar los stickers recientes</value>\n  </data>\n  <data name=\"NewFeaturedStickers\" xml:space=\"preserve\">\n    <value>{0} nuevos</value>\n  </data>\n  <data name=\"InstallStickersetError\" xml:space=\"preserve\">\n    <value>Lo sentimos, alcanzaste el número máximo de packs de stickers.</value>\n  </data>\n  <data name=\"ChatInviteSubtitle\" xml:space=\"preserve\">\n    <value>{0}, entre ellos:</value>\n  </data>\n  <data name=\"InstalledStickers\" xml:space=\"preserve\">\n    <value>Stickers instalados</value>\n  </data>\n  <data name=\"ShowStickersTab\" xml:space=\"preserve\">\n    <value>Mostrar pestaña de stickers</value>\n  </data>\n  <data name=\"ShowStickersTabHint\" xml:space=\"preserve\">\n    <value>Aparecerá un icono en la zona de escritura.</value>\n  </data>\n  <data name=\"ArchivedStickers\" xml:space=\"preserve\">\n    <value>Stickers archivados</value>\n  </data>\n  <data name=\"ArchivedStickersAbout\" xml:space=\"preserve\">\n    <value>Algunos de tus packs de stickers, que no utilizas, fueron archivados para dar espacio a los que tienes activos.</value>\n  </data>\n  <data name=\"ArchivedStickersHeader\" xml:space=\"preserve\">\n    <value>Puedes instalar hasta 200 packs de stickers. Cuando instales más, se archivarán los que no usas.</value>\n  </data>\n  <data name=\"NoSetsHere\" xml:space=\"preserve\">\n    <value>No hay packs</value>\n  </data>\n  <data name=\"NoSets\" xml:space=\"preserve\">\n    <value>Sin packs</value>\n  </data>\n  <data name=\"SetGenitivePlural\" xml:space=\"preserve\">\n    <value>Packs</value>\n  </data>\n  <data name=\"SetGenitiveSingular\" xml:space=\"preserve\">\n    <value>Pack</value>\n  </data>\n  <data name=\"SetNominativePlural\" xml:space=\"preserve\">\n    <value>Packs</value>\n  </data>\n  <data name=\"SetNominativeSingular\" xml:space=\"preserve\">\n    <value>Pack</value>\n  </data>\n  <data name=\"ChatWithYourself\" xml:space=\"preserve\">\n    <value>Chat contigo</value>\n  </data>\n  <data name=\"CloudStorageDescription\" xml:space=\"preserve\">\n    <value>• Guarda mensajes reenviándolos aquí\n• Envía archivos para almacenarlos\n• Accede desde cualquier dispositivo\n• Encuentra tus cosas con la búsqueda</value>\n  </data>\n  <data name=\"CloudStorage\" xml:space=\"preserve\">\n    <value>Almacenamiento en la nube</value>\n  </data>\n  <data name=\"CancelAccountReset\" xml:space=\"preserve\">\n    <value>No restablecer la cuenta</value>\n  </data>\n  <data name=\"CancelAccountResetDescription\" xml:space=\"preserve\">\n    <value>Alguien, con acceso a tu número de teléfono **{0}**, solicitó eliminar tu cuenta de Telegram y restablecer tu contraseña de la verificación en dos pasos. Si no eras tú, por favor, inserta el código que enviamos por SMS a tu número **{0}**</value>\n  </data>\n  <data name=\"CancelAccountResetSuccess\" xml:space=\"preserve\">\n    <value>¡Listo! El proceso de eliminación de la cuenta {0} fue cancelado. Puedes cerrar esta ventana.</value>\n  </data>\n  <data name=\"Reset\" xml:space=\"preserve\">\n    <value>Restablecer</value>\n  </data>\n  <data name=\"ResetAccount\" xml:space=\"preserve\">\n    <value>Restablecer la cuenta</value>\n  </data>\n  <data name=\"ResetAccountDescription\" xml:space=\"preserve\">\n    <value>Como la cuenta **{0}** está activa y protegida con una contraseña, la eliminaremos en 1 semana, por motivos de seguridad.\n\nPuedes cancelar el proceso en cualquier momento.</value>\n  </data>\n  <data name=\"ResetAccountError\" xml:space=\"preserve\">\n    <value>Tus intentos recientes para restablecer la cuenta fueron cancelados por su usuario activo. Por favor, reinténtalo en 7 días.</value>\n  </data>\n  <data name=\"ResetAccountIn\" xml:space=\"preserve\">\n    <value>Podrás restablecer tu cuenta en:</value>\n  </data>\n  <data name=\"Archive\" xml:space=\"preserve\">\n    <value>Archivar</value>\n  </data>\n  <data name=\"BotOpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>El bot {0} solicita permiso para compartir tu nombre y foto de perfil de Telegram con el propietario de {1}.</value>\n  </data>\n  <data name=\"IsRecordingVideo\" xml:space=\"preserve\">\n    <value>Está grabando un vídeo</value>\n  </data>\n  <data name=\"IsSendingAudio\" xml:space=\"preserve\">\n    <value>Está enviando un audio</value>\n  </data>\n  <data name=\"RecordingVideo\" xml:space=\"preserve\">\n    <value>Grabando un vídeo</value>\n  </data>\n  <data name=\"SendingAudio\" xml:space=\"preserve\">\n    <value>Enviando un audio</value>\n  </data>\n  <data name=\"Revoke\" xml:space=\"preserve\">\n    <value>Anular</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation2\" xml:space=\"preserve\">\n    <value>¿Quieres anular el enlace **{0}**?\n\nEl grupo **\"{1}\"** pasará a ser privado.</value>\n  </data>\n  <data name=\"AddBotToTheGroup\" xml:space=\"preserve\">\n    <value>¿Añadir el bot a \"{0}\"?</value>\n  </data>\n  <data name=\"YourScored\" xml:space=\"preserve\">\n    <value>Has conseguido {0} punto</value>\n  </data>\n  <data name=\"ShareWith\" xml:space=\"preserve\">\n    <value>¿Compartir con {0}?</value>\n  </data>\n  <data name=\"YourScoredAtGame\" xml:space=\"preserve\">\n    <value>Has conseguido {0} punto en {1}</value>\n  </data>\n  <data name=\"MuteAudio\" xml:space=\"preserve\">\n    <value>Silenciar</value>\n  </data>\n  <data name=\"OpenWebPagesViaBotConfirmation\" xml:space=\"preserve\">\n    <value>¿Permites a {0} entregar tu nombre e id de Telegram (no tu número de teléfono) a los sitios web que abres a través de este bot?</value>\n  </data>\n  <data name=\"UserScored\" xml:space=\"preserve\">\n    <value>{0} ha conseguido {1} punto</value>\n  </data>\n  <data name=\"UserScoredAtGame\" xml:space=\"preserve\">\n    <value>{0} ha conseguido {1} punto en {2}</value>\n  </data>\n  <data name=\"UserScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>{0} ha conseguido {1} puntos en {2}</value>\n  </data>\n  <data name=\"UserScoredPlural\" xml:space=\"preserve\">\n    <value>{0} ha conseguido {1} puntos</value>\n  </data>\n  <data name=\"YourScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>Has conseguido {0} puntos en {1}</value>\n  </data>\n  <data name=\"YourScoredPlural\" xml:space=\"preserve\">\n    <value>Has conseguido {0} puntos</value>\n  </data>\n  <data name=\"ForwardedGameGenitivePlural\" xml:space=\"preserve\">\n    <value>Reenvió juegos</value>\n  </data>\n  <data name=\"ForwardedGameGenitiveSingular\" xml:space=\"preserve\">\n    <value>Reenvió un juego</value>\n  </data>\n  <data name=\"ForwardedGameNominativePlural\" xml:space=\"preserve\">\n    <value>Juegos reenviados</value>\n  </data>\n  <data name=\"ForwardedGameNominativeSingular\" xml:space=\"preserve\">\n    <value>Juego reenviado</value>\n  </data>\n  <data name=\"Game\" xml:space=\"preserve\">\n    <value>Juego</value>\n  </data>\n  <data name=\"MessageActionPinGame\" xml:space=\"preserve\">\n    <value>{0} ancló un juego</value>\n  </data>\n  <data name=\"ShareGameWith\" xml:space=\"preserve\">\n    <value>¿Compartir el juego con {0}?</value>\n  </data>\n  <data name=\"IsPlayingGame\" xml:space=\"preserve\">\n    <value>Está jugando</value>\n  </data>\n  <data name=\"PlayingGame\" xml:space=\"preserve\">\n    <value>Jugando</value>\n  </data>\n  <data name=\"YourCloudStorage\" xml:space=\"preserve\">\n    <value>almacenamiento en la nube</value>\n  </data>\n  <data name=\"Masks\" xml:space=\"preserve\">\n    <value>Máscaras</value>\n  </data>\n  <data name=\"MasksHint\" xml:space=\"preserve\">\n    <value>Puedes añadir máscaras a las fotos que envías. Para hacerlo, abre el editor de fotos antes de enviar una foto.</value>\n  </data>\n  <data name=\"GroupsInCommon\" xml:space=\"preserve\">\n    <value>Grupos en común</value>\n  </data>\n  <data name=\"GroupGenitivePlural\" xml:space=\"preserve\">\n    <value>Grupos</value>\n  </data>\n  <data name=\"GroupGenitiveSingular\" xml:space=\"preserve\">\n    <value>Grupo</value>\n  </data>\n  <data name=\"GroupNominativePlural\" xml:space=\"preserve\">\n    <value>Grupos</value>\n  </data>\n  <data name=\"GroupNominativeSingular\" xml:space=\"preserve\">\n    <value>Grupo</value>\n  </data>\n  <data name=\"NoGroupsHere\" xml:space=\"preserve\">\n    <value>No hay grupos</value>\n  </data>\n  <data name=\"AddChatUserFloodWait\" xml:space=\"preserve\">\n    <value>No puedes añadir a este usuario porque escribiste a demasiadas personas que no son tus contactos. Inténtalo de nuevo mañana. Puedes pedir a otro miembro del grupo que lo añada.</value>\n  </data>\n  <data name=\"ClearAll\" xml:space=\"preserve\">\n    <value>Borrar todo</value>\n  </data>\n  <data name=\"ClearPaintingConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres borrar lo que dibujaste?</value>\n  </data>\n  <data name=\"DiscardChangesConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres descartar los cambios?</value>\n  </data>\n  <data name=\"SendMessageFloodWait\" xml:space=\"preserve\">\n    <value>Escribiste a demasiados usuarios que no son tus contactos. Inténtalo de nuevo mañana. Podrás responder si ellos te escriben primero.</value>\n  </data>\n  <data name=\"AttachedStickers\" xml:space=\"preserve\">\n    <value>Stickers adjuntos</value>\n  </data>\n  <data name=\"JumpToDate\" xml:space=\"preserve\">\n    <value>Ir a la fecha</value>\n  </data>\n  <data name=\"Pack\" xml:space=\"preserve\">\n    <value>Ver pack</value>\n  </data>\n  <data name=\"ChatsAndContacts\" xml:space=\"preserve\">\n    <value>Chats y contactos</value>\n  </data>\n  <data name=\"MessageSearch\" xml:space=\"preserve\">\n    <value>Búsqueda de mensajes</value>\n  </data>\n  <data name=\"SearchChatsOrMessages\" xml:space=\"preserve\">\n    <value>Buscar chats o mensajes</value>\n  </data>\n  <data name=\"PrivacyPolicy\" xml:space=\"preserve\">\n    <value>Política de privacidad</value>\n  </data>\n  <data name=\"TelegramFAQ\" xml:space=\"preserve\">\n    <value>Preguntas frecuentes</value>\n  </data>\n  <data name=\"ChatSettingsSubtitle\" xml:space=\"preserve\">\n    <value>Multimedia, segundo plano, caché</value>\n  </data>\n  <data name=\"Mobile\" xml:space=\"preserve\">\n    <value>Móvil</value>\n  </data>\n  <data name=\"ChannelsTooMuch\" xml:space=\"preserve\">\n    <value>Lo sentimos, has creado o te has unido a demasiados canales.</value>\n  </data>\n  <data name=\"UserChannelsTooMuch\" xml:space=\"preserve\">\n    <value>Lo sentimos, no puedes añadir a este usuario a canales.</value>\n  </data>\n  <data name=\"ItemsSelectedSingular\" xml:space=\"preserve\">\n    <value>{0} seleccionado</value>\n  </data>\n  <data name=\"NewChat\" xml:space=\"preserve\">\n    <value>Nuevo chat</value>\n  </data>\n  <data name=\"ItemsSelectedPlural\" xml:space=\"preserve\">\n    <value>{0} seleccionados</value>\n  </data>\n  <data name=\"FileGenitivePlural\" xml:space=\"preserve\">\n    <value>Archivos</value>\n  </data>\n  <data name=\"FileGenitiveSingular\" xml:space=\"preserve\">\n    <value>Archivo</value>\n  </data>\n  <data name=\"FileNominativePlural\" xml:space=\"preserve\">\n    <value>Archivos</value>\n  </data>\n  <data name=\"FileNominativeSingular\" xml:space=\"preserve\">\n    <value>Archivo</value>\n  </data>\n  <data name=\"LinkGenitivePlural\" xml:space=\"preserve\">\n    <value>Enlaces</value>\n  </data>\n  <data name=\"LinkGenitiveSingular\" xml:space=\"preserve\">\n    <value>Enlace</value>\n  </data>\n  <data name=\"LinkNominativePlural\" xml:space=\"preserve\">\n    <value>Enlaces</value>\n  </data>\n  <data name=\"LinkNominativeSingular\" xml:space=\"preserve\">\n    <value>Enlace</value>\n  </data>\n  <data name=\"PhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Fotos</value>\n  </data>\n  <data name=\"PhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"PhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Fotos</value>\n  </data>\n  <data name=\"PhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"SongGenitivePlural\" xml:space=\"preserve\">\n    <value>Canciones</value>\n  </data>\n  <data name=\"SongGenitiveSingular\" xml:space=\"preserve\">\n    <value>Canción</value>\n  </data>\n  <data name=\"SongNominativePlural\" xml:space=\"preserve\">\n    <value>Canciones</value>\n  </data>\n  <data name=\"SongNominativeSingular\" xml:space=\"preserve\">\n    <value>Canción</value>\n  </data>\n  <data name=\"VideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Vídeos</value>\n  </data>\n  <data name=\"VideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Vídeo</value>\n  </data>\n  <data name=\"VideoNominativePlural\" xml:space=\"preserve\">\n    <value>Vídeos</value>\n  </data>\n  <data name=\"VideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Vídeo</value>\n  </data>\n  <data name=\"PhoneNumber\" xml:space=\"preserve\">\n    <value>Número de teléfono</value>\n  </data>\n  <data name=\"SetPhoto\" xml:space=\"preserve\">\n    <value>Poner foto</value>\n  </data>\n  <data name=\"AskAQuestionDescription\" xml:space=\"preserve\">\n    <value>Por favor, considera que el soporte de Telegram está hecho por voluntarios. Respondemos lo antes posible, pero puede tomar tiempo. Por favor, mira las &lt;![CDATA[&lt;a href=\"https://telegram.org/faq/es\"&gt;preguntas frecuentes de Telegram&lt;/a&gt;]]&gt;: tienen respuestas para la mayoría de las preguntas y &lt;![CDATA[&lt;a href=\"https://telegram.org/faq/es#solucin-de-problemas\"&gt;soluciones a problemas&lt;/a&gt;]]&gt;.</value>\n  </data>\n  <data name=\"MaskPackNominativePlural\" xml:space=\"preserve\">\n    <value>Packs de máscaras</value>\n  </data>\n  <data name=\"MaskPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Pack de máscaras</value>\n  </data>\n  <data name=\"StickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Packs de stickers</value>\n  </data>\n  <data name=\"StickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Pack de stickers</value>\n  </data>\n  <data name=\"NewStickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Nuevos packs de stickers</value>\n  </data>\n  <data name=\"NewStickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Nuevo pack de stickers</value>\n  </data>\n  <data name=\"PinDialog\" xml:space=\"preserve\">\n    <value>Anclar</value>\n  </data>\n  <data name=\"UnpinDialog\" xml:space=\"preserve\">\n    <value>Desanclar</value>\n  </data>\n  <data name=\"DeleteFor\" xml:space=\"preserve\">\n    <value>Eliminar para {0}</value>\n  </data>\n  <data name=\"DeleteForAll\" xml:space=\"preserve\">\n    <value>Eliminar para todos</value>\n  </data>\n  <data name=\"DeleteMessageForYouHint\" xml:space=\"preserve\">\n    <value>Será eliminado sólo para ti.</value>\n  </data>\n  <data name=\"DeleteMessagesForYouHint\" xml:space=\"preserve\">\n    <value>Serán eliminados sólo para ti.</value>\n  </data>\n  <data name=\"MessageActionCanceledCall\" xml:space=\"preserve\">\n    <value>Llamada cancelada</value>\n  </data>\n  <data name=\"MessageActionIncomingCall\" xml:space=\"preserve\">\n    <value>Llamada entrante</value>\n  </data>\n  <data name=\"MessageActionIncomingDurationCall\" xml:space=\"preserve\">\n    <value>Llamada entrante ({0})</value>\n  </data>\n  <data name=\"MessageActionMissedCall\" xml:space=\"preserve\">\n    <value>Llamada perdida</value>\n  </data>\n  <data name=\"MessageActionOutgoingCall\" xml:space=\"preserve\">\n    <value>Llamada saliente</value>\n  </data>\n  <data name=\"MessageActionOutgoingDurationCall\" xml:space=\"preserve\">\n    <value>Llamada saliente ({0})</value>\n  </data>\n  <data name=\"CanceledCall\" xml:space=\"preserve\">\n    <value>Llamada cancelada</value>\n  </data>\n  <data name=\"IncomingCall\" xml:space=\"preserve\">\n    <value>Llamada entrante</value>\n  </data>\n  <data name=\"MissedCall\" xml:space=\"preserve\">\n    <value>Llamada perdida</value>\n  </data>\n  <data name=\"OutgoingCall\" xml:space=\"preserve\">\n    <value>Llamada saliente</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Será eliminado para todos en este canal.</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Será eliminado para todos en este chat.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Serán eliminados para todos en este canal.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Serán eliminados para todos en este chat.</value>\n  </data>\n  <data name=\"Invoice\" xml:space=\"preserve\">\n    <value>Factura</value>\n  </data>\n  <data name=\"TestInvoice\" xml:space=\"preserve\">\n    <value>Probar factura</value>\n  </data>\n  <data name=\"MessageActionPaymentSent\" xml:space=\"preserve\">\n    <value>Has transferido satisfactoriamente {0} a {1}</value>\n  </data>\n  <data name=\"MessageActionPaymentSentFor\" xml:space=\"preserve\">\n    <value>Has transferido satisfactoriamente {0} a {1} por {2}</value>\n  </data>\n  <data name=\"PaymentInfo\" xml:space=\"preserve\">\n    <value>Información de pago</value>\n  </data>\n  <data name=\"Receipt\" xml:space=\"preserve\">\n    <value>Recibo</value>\n  </data>\n  <data name=\"Address1Street\" xml:space=\"preserve\">\n    <value>Dirección 1 (calle)</value>\n  </data>\n  <data name=\"Address2Street\" xml:space=\"preserve\">\n    <value>Dirección 2 (calle)</value>\n  </data>\n  <data name=\"BillingAddress\" xml:space=\"preserve\">\n    <value>Dirección de facturación</value>\n  </data>\n  <data name=\"CardNumber\" xml:space=\"preserve\">\n    <value>Número de tarjeta</value>\n  </data>\n  <data name=\"Checkout\" xml:space=\"preserve\">\n    <value>Caja</value>\n  </data>\n  <data name=\"City\" xml:space=\"preserve\">\n    <value>Ciudad</value>\n  </data>\n  <data name=\"ContactAddress\" xml:space=\"preserve\">\n    <value>Dirección de contacto</value>\n  </data>\n  <data name=\"Discount\" xml:space=\"preserve\">\n    <value>Descuento</value>\n  </data>\n  <data name=\"FullName\" xml:space=\"preserve\">\n    <value>Nombre completo</value>\n  </data>\n  <data name=\"MMYY\" xml:space=\"preserve\">\n    <value>MM/AA</value>\n  </data>\n  <data name=\"NameSurname\" xml:space=\"preserve\">\n    <value>Nombre Apellidos</value>\n  </data>\n  <data name=\"PaymentCard\" xml:space=\"preserve\">\n    <value>Tarjeta de pago</value>\n  </data>\n  <data name=\"PaymentMethod\" xml:space=\"preserve\">\n    <value>Forma de pago</value>\n  </data>\n  <data name=\"Postcode\" xml:space=\"preserve\">\n    <value>Código postal</value>\n  </data>\n  <data name=\"Receiver\" xml:space=\"preserve\">\n    <value>Destinatario</value>\n  </data>\n  <data name=\"SaveShippingInformation\" xml:space=\"preserve\">\n    <value>Guardar información de envío</value>\n  </data>\n  <data name=\"SaveShippingInformationHint\" xml:space=\"preserve\">\n    <value>Puedes guardar la información de envío para usarla más adelante.</value>\n  </data>\n  <data name=\"SecurityCode\" xml:space=\"preserve\">\n    <value>Código de seguridad (CVV)</value>\n  </data>\n  <data name=\"Shipping\" xml:space=\"preserve\">\n    <value>Envío</value>\n  </data>\n  <data name=\"ShippingAddress\" xml:space=\"preserve\">\n    <value>Dirección de envío</value>\n  </data>\n  <data name=\"ShippingInformation\" xml:space=\"preserve\">\n    <value>Información de envío</value>\n  </data>\n  <data name=\"ShippingMethods\" xml:space=\"preserve\">\n    <value>Forma de envío</value>\n  </data>\n  <data name=\"State\" xml:space=\"preserve\">\n    <value>Estado</value>\n  </data>\n  <data name=\"Subtotal\" xml:space=\"preserve\">\n    <value>Subtotal</value>\n  </data>\n  <data name=\"Taxes\" xml:space=\"preserve\">\n    <value>Impuestos</value>\n  </data>\n  <data name=\"TestReceipt\" xml:space=\"preserve\">\n    <value>Probar recibo</value>\n  </data>\n  <data name=\"Total\" xml:space=\"preserve\">\n    <value>Total</value>\n  </data>\n  <data name=\"TransactionConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres transferir {0} al bot {1} por {2}?</value>\n  </data>\n  <data name=\"TransactionReview\" xml:space=\"preserve\">\n    <value>Repaso de la transacción</value>\n  </data>\n  <data name=\"TestCheckout\" xml:space=\"preserve\">\n    <value>Probar caja</value>\n  </data>\n  <data name=\"ShippingMethod\" xml:space=\"preserve\">\n    <value>Forma de envío</value>\n  </data>\n  <data name=\"Name\" xml:space=\"preserve\">\n    <value>Nombre</value>\n  </data>\n  <data name=\"Pay\" xml:space=\"preserve\">\n    <value>Pagar</value>\n  </data>\n  <data name=\"Duplicate\" xml:space=\"preserve\">\n    <value>Duplicar</value>\n  </data>\n  <data name=\"CameraSubtitle\" xml:space=\"preserve\">\n    <value>Gestionar ajustes de cámara</value>\n  </data>\n  <data name=\"ChooseYourCameraApp\" xml:space=\"preserve\">\n    <value>Elige tu app de cámara</value>\n  </data>\n  <data name=\"ExternalCamera\" xml:space=\"preserve\">\n    <value>Cámara externa</value>\n  </data>\n  <data name=\"InAppCamera\" xml:space=\"preserve\">\n    <value>Cámara en la app</value>\n  </data>\n  <data name=\"Calls\" xml:space=\"preserve\">\n    <value>Llamadas</value>\n  </data>\n  <data name=\"CallsPrivacyDescription\" xml:space=\"preserve\">\n    <value>¿Quién puede llamarme?</value>\n  </data>\n  <data name=\"CallsPrivacyImportantNote\" xml:space=\"preserve\">\n    <value>Puedes restringir quién puede llamarte.</value>\n  </data>\n  <data name=\"CallsPrivacyOverrideNote\" xml:space=\"preserve\">\n    <value>Estos usuarios podrán o no podrán llamarte, a partir de los ajustes de arriba.</value>\n  </data>\n  <data name=\"NoCallsHere\" xml:space=\"preserve\">\n    <value>No hay llamadas aquí</value>\n  </data>\n  <data name=\"VoiceCall\" xml:space=\"preserve\">\n    <value>Llamada de voz</value>\n  </data>\n  <data name=\"CameraRollFolder\" xml:space=\"preserve\">\n    <value>Carrete</value>\n  </data>\n  <data name=\"SavedPicturesFolder\" xml:space=\"preserve\">\n    <value>Imágenes guardadas</value>\n  </data>\n  <data name=\"ScreenshotsFolder\" xml:space=\"preserve\">\n    <value>Capturas de pantalla</value>\n  </data>\n  <data name=\"AccessCameraException\" xml:space=\"preserve\">\n    <value>No se puede acceder a la cámara</value>\n  </data>\n  <data name=\"Answer\" xml:space=\"preserve\">\n    <value>Contestar</value>\n  </data>\n  <data name=\"Calling\" xml:space=\"preserve\">\n    <value>Llamando...</value>\n  </data>\n  <data name=\"EmojiKeyDescription\" xml:space=\"preserve\">\n    <value>Si los emojis son los mismos para {0}, la llamada es 100% segura.</value>\n  </data>\n  <data name=\"EndCall\" xml:space=\"preserve\">\n    <value>Finalizar llamada</value>\n  </data>\n  <data name=\"Speaker\" xml:space=\"preserve\">\n    <value>Altavoz</value>\n  </data>\n  <data name=\"TouchToReturnToCall\" xml:space=\"preserve\">\n    <value>Toca para volver a la llamada</value>\n  </data>\n  <data name=\"PaymentProvider\" xml:space=\"preserve\">\n    <value>Proveedor de pago</value>\n  </data>\n  <data name=\"PaymentsWarning\" xml:space=\"preserve\">\n    <value>Los pagos irán directamente al desarrollador de {0}. Telegram no puede entregar garantías, así que es bajo tu propio riesgo. En caso de problemas, contacta al desarrollador de {0} o a tu banco.</value>\n  </data>\n  <data name=\"SavePaymentInformation\" xml:space=\"preserve\">\n    <value>Guardar información de pago</value>\n  </data>\n  <data name=\"SavePaymentInformationHint\" xml:space=\"preserve\">\n    <value>Puedes guardar la información de pago para usarla más adelante.</value>\n  </data>\n  <data name=\"SavedCardHint\" xml:space=\"preserve\">\n    <value>Tu tarjeta {0} está archivada. Para pagar con esta tarjeta, por favor, pon tu contraseña de la verificación en dos pasos.</value>\n  </data>\n  <data name=\"ChooseDifferentCard\" xml:space=\"preserve\">\n    <value>Elige una tarjeta diferente</value>\n  </data>\n  <data name=\"Payments\" xml:space=\"preserve\">\n    <value>Pagos</value>\n  </data>\n  <data name=\"PaymentsSubtitle\" xml:space=\"preserve\">\n    <value>Eliminar información de pago</value>\n  </data>\n  <data name=\"ShippingInfo\" xml:space=\"preserve\">\n    <value>Información de envío</value>\n  </data>\n  <data name=\"Ringing\" xml:space=\"preserve\">\n    <value>Llamando</value>\n  </data>\n  <data name=\"TurnOnTwoStepVerification\" xml:space=\"preserve\">\n    <value>Por favor, *activa la verificación en dos pasos* para activar esto.</value>\n  </data>\n  <data name=\"ChooseYourPhotoPickerApp\" xml:space=\"preserve\">\n    <value>Elige tu app para escoger fotos</value>\n  </data>\n  <data name=\"ExternalPhotoPicker\" xml:space=\"preserve\">\n    <value>Selector de fotos externo</value>\n  </data>\n  <data name=\"InAppPhotoPicker\" xml:space=\"preserve\">\n    <value>Selector de fotos en la app</value>\n  </data>\n  <data name=\"PhotoPicker\" xml:space=\"preserve\">\n    <value>Selector de fotos</value>\n  </data>\n  <data name=\"PhotoPickerSubtitle\" xml:space=\"preserve\">\n    <value>Ajustes del selector de fotos</value>\n  </data>\n  <data name=\"Chat\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"Ignore\" xml:space=\"preserve\">\n    <value>Ignorar</value>\n  </data>\n  <data name=\"AddOptionalComment\" xml:space=\"preserve\">\n    <value>Añade un comentario opcional</value>\n  </data>\n  <data name=\"RateCallQuality\" xml:space=\"preserve\">\n    <value>Por favor, evalúa la calidad de tu llamada de Telegram</value>\n  </data>\n  <data name=\"VoipBusy\" xml:space=\"preserve\">\n    <value>Ocupado</value>\n  </data>\n  <data name=\"VoipConnecting\" xml:space=\"preserve\">\n    <value>Conectando</value>\n  </data>\n  <data name=\"VoipEnded\" xml:space=\"preserve\">\n    <value>Finalizada</value>\n  </data>\n  <data name=\"VoipExchangingKeys\" xml:space=\"preserve\">\n    <value>Intercambiando claves de cifrado</value>\n  </data>\n  <data name=\"VoipFailed\" xml:space=\"preserve\">\n    <value>Fallida</value>\n  </data>\n  <data name=\"VoipHangingUp\" xml:space=\"preserve\">\n    <value>Colgando</value>\n  </data>\n  <data name=\"VoipIncoming\" xml:space=\"preserve\">\n    <value>Llamada entrante</value>\n  </data>\n  <data name=\"VoipRequesting\" xml:space=\"preserve\">\n    <value>Solicitando</value>\n  </data>\n  <data name=\"VoipRinging\" xml:space=\"preserve\">\n    <value>Llamando</value>\n  </data>\n  <data name=\"VoipWaiting\" xml:space=\"preserve\">\n    <value>Esperando</value>\n  </data>\n  <data name=\"CallInProgressNotification\" xml:space=\"preserve\">\n    <value>Tienes una llamada en curso con {0}.</value>\n  </data>\n  <data name=\"Connection\" xml:space=\"preserve\">\n    <value>Conexión</value>\n  </data>\n  <data name=\"ConnectionType\" xml:space=\"preserve\">\n    <value>Tipo de conexión</value>\n  </data>\n  <data name=\"CredentionalsOptional\" xml:space=\"preserve\">\n    <value>Credenciales (Opcional)</value>\n  </data>\n  <data name=\"Port\" xml:space=\"preserve\">\n    <value>Puerto</value>\n  </data>\n  <data name=\"Server\" xml:space=\"preserve\">\n    <value>Servidor</value>\n  </data>\n  <data name=\"Socks5\" xml:space=\"preserve\">\n    <value>SOCKS5</value>\n  </data>\n  <data name=\"UseProxy\" xml:space=\"preserve\">\n    <value>Usar ajustes de proxy</value>\n  </data>\n  <data name=\"Proxy\" xml:space=\"preserve\">\n    <value>Ajustes de proxy</value>\n  </data>\n  <data name=\"ConnectingToProxy\" xml:space=\"preserve\">\n    <value>Conectando al proxy</value>\n  </data>\n  <data name=\"EnableProxyConfigmation\" xml:space=\"preserve\">\n    <value>¿Quieres activar este proxy?</value>\n  </data>\n  <data name=\"ChangeProxy\" xml:space=\"preserve\">\n    <value>Establecer proxy</value>\n  </data>\n  <data name=\"ChangeProxyServerHint\" xml:space=\"preserve\">\n    <value>Puedes cambiar tu servidor proxy más tarde en los Ajustes.</value>\n  </data>\n  <data name=\"UseProxyHint\" xml:space=\"preserve\">\n    <value>Ajustes de proxy SOCKS5</value>\n  </data>\n  <data name=\"DeclinedCall\" xml:space=\"preserve\">\n    <value>Llamada rechazada</value>\n  </data>\n  <data name=\"MessageActionDeclinedCall\" xml:space=\"preserve\">\n    <value>Llamada rechazada</value>\n  </data>\n  <data name=\"VideoMessage\" xml:space=\"preserve\">\n    <value>Videomensaje</value>\n  </data>\n  <data name=\"PeerToPeer\" xml:space=\"preserve\">\n    <value>Peer-to-Peer</value>\n  </data>\n  <data name=\"PeerToPeerDescription\" xml:space=\"preserve\">\n    <value>Al desactivar peer-to-peer todas las llamadas pasarán por los servidores de Telegram para evitar dar conocer tu dirección IP, pero disminuirá ligeramente la calidad de audio.</value>\n  </data>\n  <data name=\"Bio\" xml:space=\"preserve\">\n    <value>Biografía</value>\n  </data>\n  <data name=\"BioDescription\" xml:space=\"preserve\">\n    <value>Puedes añadir algunas palabras sobre ti.\nCualquiera que abra tu perfil verá este texto.</value>\n  </data>\n  <data name=\"MessageActionPhotoExpired\" xml:space=\"preserve\">\n    <value>La foto expiró</value>\n  </data>\n  <data name=\"MessageActionVideoExpired\" xml:space=\"preserve\">\n    <value>El vídeo expiró</value>\n  </data>\n  <data name=\"Timer\" xml:space=\"preserve\">\n    <value>Temporizador</value>\n  </data>\n  <data name=\"SelfDestructTimerPhotoSubtitle\" xml:space=\"preserve\">\n    <value>Si pones un temporizador, la foto se autodestruirá después de ser vista.</value>\n  </data>\n  <data name=\"SelfDestructTimerVideoSubtitle\" xml:space=\"preserve\">\n    <value>Si pones un temporizador, el vídeo se autodestruirá después de ser visto.</value>\n  </data>\n  <data name=\"SecretPhoto\" xml:space=\"preserve\">\n    <value>Foto secreta</value>\n  </data>\n  <data name=\"SecretVideo\" xml:space=\"preserve\">\n    <value>Vídeo secreto</value>\n  </data>\n  <data name=\"ChooseFromYourStickers\" xml:space=\"preserve\">\n    <value>Elige desde tus stickers</value>\n  </data>\n  <data name=\"CreateStickerSetHint\" xml:space=\"preserve\">\n    <value>Puedes crear tu pack de stickers personalizado usando el bot @stickers</value>\n  </data>\n  <data name=\"GroupStickers\" xml:space=\"preserve\">\n    <value>Stickers de grupo</value>\n  </data>\n  <data name=\"GroupStickersDescription\" xml:space=\"preserve\">\n    <value>Puedes elegir un pack para que los miembros del grupo lo utilicen en él.</value>\n  </data>\n  <data name=\"AddToFavorites\" xml:space=\"preserve\">\n    <value>Añadir a favoritos</value>\n  </data>\n  <data name=\"DeleteFromFavorites\" xml:space=\"preserve\">\n    <value>Eliminar de favoritos</value>\n  </data>\n  <data name=\"NoStickerSetFound\" xml:space=\"preserve\">\n    <value>El pack de stickers no ha sido encontrado</value>\n  </data>\n  <data name=\"NoStickerSetFoundSubtitle\" xml:space=\"preserve\">\n    <value>Reinténtalo o elige uno de la lista</value>\n  </data>\n  <data name=\"Auto\" xml:space=\"preserve\">\n    <value>Auto</value>\n  </data>\n  <data name=\"VideoQuality\" xml:space=\"preserve\">\n    <value>Calidad de vídeo</value>\n  </data>\n  <data name=\"Quality\" xml:space=\"preserve\">\n    <value>Calidad</value>\n  </data>\n  <data name=\"ClearUnreadMentionsConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar todas las menciones sin leer?</value>\n  </data>\n  <data name=\"PasswordEmail\" xml:space=\"preserve\">\n    <value>Correo y contraseña</value>\n  </data>\n  <data name=\"CreatePasswordHint\" xml:space=\"preserve\">\n    <value>Por favor, crea una contraseña para proteger tu información de pago.\nSerá requerida al iniciar sesión.</value>\n  </data>\n  <data name=\"SendLiveLocation\" xml:space=\"preserve\">\n    <value>Enviar mi ubicación durante...</value>\n  </data>\n  <data name=\"SendLiveLocationSubtitle\" xml:space=\"preserve\">\n    <value>Actualizada mientras te mueves</value>\n  </data>\n  <data name=\"LiveLocation\" xml:space=\"preserve\">\n    <value>Ubicación en directo</value>\n  </data>\n  <data name=\"ShareLiveLocationToContactTimerSubtitle\" xml:space=\"preserve\">\n    <value>Elige por cuánto tiempo {0} verá tu ubicación precisa.</value>\n  </data>\n  <data name=\"ContactJoinedTelegram\" xml:space=\"preserve\">\n    <value>Un contacto se unió a Telegram</value>\n  </data>\n  <data name=\"Events\" xml:space=\"preserve\">\n    <value>Eventos</value>\n  </data>\n  <data name=\"ChatHistoryCaption\" xml:space=\"preserve\">\n    <value>Historial para los nuevos miembros</value>\n  </data>\n  <data name=\"ChatHistoryHidden\" xml:space=\"preserve\">\n    <value>Los nuevos miembros no verán mensajes anteriores</value>\n  </data>\n  <data name=\"ChatHistoryVisible\" xml:space=\"preserve\">\n    <value>Los nuevos miembros verán todo el historial</value>\n  </data>\n  <data name=\"DescriptionOptional\" xml:space=\"preserve\">\n    <value>Descripción (opcional)</value>\n  </data>\n  <data name=\"Hidden\" xml:space=\"preserve\">\n    <value>Oculto</value>\n  </data>\n  <data name=\"Visible\" xml:space=\"preserve\">\n    <value>Visible</value>\n  </data>\n  <data name=\"LocationSharingEnded\" xml:space=\"preserve\">\n    <value>Envío de ubicación terminado</value>\n  </data>\n  <data name=\"Map\" xml:space=\"preserve\">\n    <value>Mapa</value>\n  </data>\n  <data name=\"MessageActionPinGeoLive\" xml:space=\"preserve\">\n    <value>{0} ancló una ubicación en directo</value>\n  </data>\n  <data name=\"For15Minutes\" xml:space=\"preserve\">\n    <value>Por 15 minutos</value>\n  </data>\n  <data name=\"For1Hour\" xml:space=\"preserve\">\n    <value>Por 1 hora</value>\n  </data>\n  <data name=\"For8Hours\" xml:space=\"preserve\">\n    <value>Por 8 horas</value>\n  </data>\n  <data name=\"MessageActionClearHistory\" xml:space=\"preserve\">\n    <value>Historial borrado</value>\n  </data>\n  <data name=\"Updated\" xml:space=\"preserve\">\n    <value>Actualizado</value>\n  </data>\n  <data name=\"UpdatedAgo\" xml:space=\"preserve\">\n    <value>Actualizada hace {0}</value>\n  </data>\n  <data name=\"UpdatedAtDate\" xml:space=\"preserve\">\n    <value>Actualizada el {0} a las {1}</value>\n  </data>\n  <data name=\"UpdatedJustNow\" xml:space=\"preserve\">\n    <value>Recién actualizada</value>\n  </data>\n  <data name=\"UpdatedTodayAt\" xml:space=\"preserve\">\n    <value>Actualizada hoy a las {0}</value>\n  </data>\n  <data name=\"UpdatedYesterdayAt\" xml:space=\"preserve\">\n    <value>Actualizada ayer a las {0}</value>\n  </data>\n  <data name=\"StopSharingLocation\" xml:space=\"preserve\">\n    <value>Dejar de enviar mi ubicación</value>\n  </data>\n  <data name=\"ShareLiveLocationToChatTimerSubtitle\" xml:space=\"preserve\">\n    <value>Elige por cuánto tiempo las personas del chat verán tu ubicación precisa.</value>\n  </data>\n  <data name=\"NewStickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Nuevos packs de stickers</value>\n  </data>\n  <data name=\"NewStickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Nuevo pack de stickers</value>\n  </data>\n  <data name=\"StickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Packs de stickers</value>\n  </data>\n  <data name=\"StickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Pack de stickers</value>\n  </data>\n  <data name=\"MaskPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Packs de máscaras</value>\n  </data>\n  <data name=\"MaskPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Pack de máscaras</value>\n  </data>\n  <data name=\"GroupNameInvalid\" xml:space=\"preserve\">\n    <value>Lo sentimos, este nombre es inválido.</value>\n  </data>\n  <data name=\"GroupNameOccupied\" xml:space=\"preserve\">\n    <value>Lo sentimos, este nombre ya está ocupado.</value>\n  </data>\n  <data name=\"GroupNameShort\" xml:space=\"preserve\">\n    <value>El nombre del grupo debe tener al menos 5 caracteres.</value>\n  </data>\n  <data name=\"GroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>El nombre del grupo no puede comenzar con un número.</value>\n  </data>\n  <data name=\"AttachLiveLocationIsSharing\" xml:space=\"preserve\">\n    <value>Compartida con {0}</value>\n  </data>\n  <data name=\"SharingLiveLocationTitle\" xml:space=\"preserve\">\n    <value>Estás enviando tu ubicación en directo a {0}</value>\n  </data>\n  <data name=\"SharingYouAndOtherName\" xml:space=\"preserve\">\n    <value>Tú y {0}</value>\n  </data>\n  <data name=\"StopAllLocationSharings\" xml:space=\"preserve\">\n    <value>Detener todo</value>\n  </data>\n  <data name=\"StopLiveLocationAlertAll\" xml:space=\"preserve\">\n    <value>¿Quieres dejar de enviar tu ubicación en directo?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToGroup\" xml:space=\"preserve\">\n    <value>¿Quieres dejar de enviar la ubicación en directo a {0}?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToUser\" xml:space=\"preserve\">\n    <value>¿Quieres dejar de enviar la ubicación en directo a {0}?</value>\n  </data>\n  <data name=\"HourShort\" xml:space=\"preserve\">\n    <value>h</value>\n  </data>\n  <data name=\"ChatGenitivePlural\" xml:space=\"preserve\">\n    <value>chats</value>\n  </data>\n  <data name=\"ChatGenitiveSingular\" xml:space=\"preserve\">\n    <value>chat</value>\n  </data>\n  <data name=\"ChatNominativePlural\" xml:space=\"preserve\">\n    <value>chats</value>\n  </data>\n  <data name=\"ChatNominativeSingular\" xml:space=\"preserve\">\n    <value>chat</value>\n  </data>\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\n    <value>Mensajes guardados</value>\n  </data>\n  <data name=\"ForwardHereToSave\" xml:space=\"preserve\">\n    <value>Reenvía aquí para guardar</value>\n  </data>\n  <data name=\"MicrophoneAccessDenied\" xml:space=\"preserve\">\n    <value>Acceso al micrófono denegado</value>\n  </data>\n  <data name=\"MicrophoneAccessDeniedDescription\" xml:space=\"preserve\">\n    <value>Telegram no pudo acceder al micrófono. Por favor, asegúrate de que Telegram tenga permitido usar el micrófono en los ajustes de privacidad y reinicia la app.</value>\n  </data>\n  <data name=\"SendCallLogs\" xml:space=\"preserve\">\n    <value>Enviar registros de llamadas</value>\n  </data>\n  <data name=\"GroupMediaDescription\" xml:space=\"preserve\">\n    <value>Agrupar multimedia en un mensaje</value>\n  </data>\n  <data name=\"UngroupMediaDescription\" xml:space=\"preserve\">\n    <value>Mostrar multimedia en mensajes por separado</value>\n  </data>\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\n    <value>Cuenta eliminada</value>\n  </data>\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\n    <value>Cuenta eliminada</value>\n  </data>\n  <data name=\"Album\" xml:space=\"preserve\">\n    <value>Álbum</value>\n  </data>\n  <data name=\"DeleteMessagesConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar {0}?</value>\n  </data>\n  <data name=\"MessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Mensajes</value>\n  </data>\n  <data name=\"MessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Mensaje</value>\n  </data>\n  <data name=\"MessageNominativePlural\" xml:space=\"preserve\">\n    <value>Mensajes</value>\n  </data>\n  <data name=\"MessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Mensaje</value>\n  </data>\n  <data name=\"SubscriberGenitivePlural\" xml:space=\"preserve\">\n    <value>Suscriptores</value>\n  </data>\n  <data name=\"SubscriberGenitiveSingular\" xml:space=\"preserve\">\n    <value>Suscriptor</value>\n  </data>\n  <data name=\"SubscriberNominativePlural\" xml:space=\"preserve\">\n    <value>Suscriptores</value>\n  </data>\n  <data name=\"SubscriberNominativeSingular\" xml:space=\"preserve\">\n    <value>Suscriptor</value>\n  </data>\n  <data name=\"LogOutAllApplications\" xml:space=\"preserve\">\n    <value>Desconectar de todos los sitios web</value>\n  </data>\n  <data name=\"LogOutAllApplicationsNote\" xml:space=\"preserve\">\n    <value/>\n  </data>\n  <data name=\"LoggedInWithTelegram\" xml:space=\"preserve\">\n    <value>Sesión iniciada con Telegram</value>\n  </data>\n  <data name=\"LogOutAllApplicationsConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres desconectarte de todos los sitios web en los que usaste Telegram para iniciar sesión?</value>\n  </data>\n  <data name=\"NoItemsHere\" xml:space=\"preserve\">\n    <value>No hay elementos</value>\n  </data>\n  <data name=\"Group\" xml:space=\"preserve\">\n    <value>Agrupar</value>\n  </data>\n  <data name=\"Ungroup\" xml:space=\"preserve\">\n    <value>Desagrupar</value>\n  </data>\n  <data name=\"AboutApp\" xml:space=\"preserve\">\n    <value>Acerca de</value>\n  </data>\n  <data name=\"NoActiveLogins\" xml:space=\"preserve\">\n    <value>Sin sesiones activas.\n\nPuedes iniciar sesiones en sitios web que permitan registrarse con Telegram.</value>\n  </data>\n  <data name=\"Feed\" xml:space=\"preserve\">\n    <value>Feed</value>\n  </data>\n  <data name=\"ChannelGenitivePlural\" xml:space=\"preserve\">\n    <value>Canales</value>\n  </data>\n  <data name=\"ChannelGenitiveSingular\" xml:space=\"preserve\">\n    <value>Canal</value>\n  </data>\n  <data name=\"ChannelNominativePlural\" xml:space=\"preserve\">\n    <value>Canales</value>\n  </data>\n  <data name=\"ChannelNominativeSingular\" xml:space=\"preserve\">\n    <value>Canal</value>\n  </data>\n  <data name=\"ShowNext\" xml:space=\"preserve\">\n    <value>Mostrar siguiente</value>\n  </data>\n  <data name=\"GroupNewChannels\" xml:space=\"preserve\">\n    <value>Agrupar nuevos canales</value>\n  </data>\n  <data name=\"MessageActionBotAllowed\" xml:space=\"preserve\">\n    <value>Autorizaste que este bot te envíe mensajes cuando iniciaste sesión en {0}</value>\n  </data>\n  <data name=\"NoStickersFound\" xml:space=\"preserve\">\n    <value>No se encontraron stickers</value>\n  </data>\n  <data name=\"ConnectedWebsites\" xml:space=\"preserve\">\n    <value>Sitios web conectados</value>\n  </data>\n  <data name=\"ConnectedWebsitesHint\" xml:space=\"preserve\">\n    <value>Puedes iniciar sesión en sitios web que permitan registrarse con Telegram.</value>\n  </data>\n  <data name=\"TapToDisconnectTelegramAccount\" xml:space=\"preserve\">\n    <value>Toca para desconectar de tu cuenta de Telegram.</value>\n  </data>\n  <data name=\"TelegramPassport\" xml:space=\"preserve\">\n    <value>Telegram Passport</value>\n  </data>\n  <data name=\"Authorize\" xml:space=\"preserve\">\n    <value>Autorizar</value>\n  </data>\n  <data name=\"Email2\" xml:space=\"preserve\">\n    <value>Correo</value>\n  </data>\n  <data name=\"PassportPersonalDetailsInfo\" xml:space=\"preserve\">\n    <value>Completa tus datos personales</value>\n  </data>\n  <data name=\"PassportHint\" xml:space=\"preserve\">\n    <value>{0} solicita acceso a tus datos personales para registrarte para sus servicios.</value>\n  </data>\n  <data name=\"PassportAddress\" xml:space=\"preserve\">\n    <value>Dirección</value>\n  </data>\n  <data name=\"PassportAddressInfo\" xml:space=\"preserve\">\n    <value>Sube una prueba de tu dirección</value>\n  </data>\n  <data name=\"PassportNoPolicy\" xml:space=\"preserve\">\n    <value>Estás enviando documentos directamente a {0} y permitiendo que {1} te envíe mensajes.</value>\n  </data>\n  <data name=\"AllSets\" xml:space=\"preserve\">\n    <value>Todos los packs</value>\n  </data>\n  <data name=\"MySets\" xml:space=\"preserve\">\n    <value>Mis packs</value>\n  </data>\n  <data name=\"None\" xml:space=\"preserve\">\n    <value>Ninguno</value>\n  </data>\n  <data name=\"SuggestStickersByEmoji\" xml:space=\"preserve\">\n    <value>Sugerir stickers por emoji</value>\n  </data>\n  <data name=\"MTProto\" xml:space=\"preserve\">\n    <value>MTPROTO</value>\n  </data>\n  <data name=\"UseProxyForCalls\" xml:space=\"preserve\">\n    <value>Usar proxy para llamadas</value>\n  </data>\n  <data name=\"UseProxyForCallsHint\" xml:space=\"preserve\">\n    <value>El proxy puede disminuir la calidad de tus llamadas.</value>\n  </data>\n  <data name=\"Connections\" xml:space=\"preserve\">\n    <value>Conexiones</value>\n  </data>\n  <data name=\"AddProxy\" xml:space=\"preserve\">\n    <value>Añadir proxy</value>\n  </data>\n  <data name=\"Secret\" xml:space=\"preserve\">\n    <value>Clave</value>\n  </data>\n  <data name=\"UseTelegramProxyHint\" xml:space=\"preserve\">\n    <value>Ajustes del proxy de Telegram</value>\n  </data>\n  <data name=\"Available\" xml:space=\"preserve\">\n    <value>Disponible</value>\n  </data>\n  <data name=\"Checking\" xml:space=\"preserve\">\n    <value>Comprobando</value>\n  </data>\n  <data name=\"Connected\" xml:space=\"preserve\">\n    <value>Conectado</value>\n  </data>\n  <data name=\"Unavailable\" xml:space=\"preserve\">\n    <value>No disponible</value>\n  </data>\n  <data name=\"TermsOfService\" xml:space=\"preserve\">\n    <value>Términos de servicio</value>\n  </data>\n  <data name=\"TermsOfServiceLink\" xml:space=\"preserve\">\n    <value>Al inscribirte,\naceptas los *términos de servicio*.</value>\n  </data>\n  <data name=\"DeleteSyncedContacts\" xml:space=\"preserve\">\n    <value>Eliminar contactos sincronizados</value>\n  </data>\n  <data name=\"SyncContacts\" xml:space=\"preserve\">\n    <value>Sincronizar contactos</value>\n  </data>\n  <data name=\"SyncContactsDeleteInfo\" xml:space=\"preserve\">\n    <value>Esto eliminará tus contactos de los servidores de Telegram. Si “Sincronizar contactos” está activado, los contactos se volverán a sincronizar.</value>\n  </data>\n  <data name=\"SyncContactsInfoOff\" xml:space=\"preserve\">\n    <value>Activa esta opción para sincronizar continuamente los contactos de este dispositivo con tu cuenta.</value>\n  </data>\n  <data name=\"SyncContactsInfoOn\" xml:space=\"preserve\">\n    <value>Los contactos de este dispositivo serán añadidos a esta cuenta.</value>\n  </data>\n  <data name=\"LinkPreviewsHint\" xml:space=\"preserve\">\n    <value>Las vistas previas serán generadas en los servidores de Telegram. No almacenamos datos sobre los enlaces que envías.</value>\n  </data>\n  <data name=\"DeleteSyncedContactsConfirmation\" xml:space=\"preserve\">\n    <value>Esto eliminará tus contactos de los servidores de Telegram. Si “Sincronizar contactos” está activado, los contactos se volverán a sincronizar.</value>\n  </data>\n  <data name=\"ProxyDisabledNotification\" xml:space=\"preserve\">\n    <value>El proxy que estás usando no está configurado correctamente y será desactivado. Por favor, encuentra otro.</value>\n  </data>\n  <data name=\"ProxySponsor\" xml:space=\"preserve\">\n    <value>Sponsor del proxy</value>\n  </data>\n  <data name=\"ProxySponsorAbout\" xml:space=\"preserve\">\n    <value>Este canal es mostrado por tu servidor proxy.\nPara eliminar este canal de tu lista de chats,\ndesactiva el proxy en los Ajustes de Telegram.</value>\n  </data>\n  <data name=\"ProxySponsorWarning\" xml:space=\"preserve\">\n    <value>Este proxy podría mostrar un canal patrocinado en tu lista de chats. Esto no revela tu tráfico en Telegram.</value>\n  </data>\n  <data name=\"MarkRead\" xml:space=\"preserve\">\n    <value>Marcar como leído</value>\n  </data>\n  <data name=\"MarkUnread\" xml:space=\"preserve\">\n    <value>Marcar como no leído</value>\n  </data>\n  <data name=\"SuggestFrequentContacts\" xml:space=\"preserve\">\n    <value>Sugerir contactos frecuentes</value>\n  </data>\n  <data name=\"SuggestFrequentContactsAbout\" xml:space=\"preserve\">\n    <value>Muestra a las personas con las que te comunicas frecuentemente en la parte de arriba de la sección de búsqueda para un acceso rápido.</value>\n  </data>\n  <data name=\"SuggestFrequentContactsNotification\" xml:space=\"preserve\">\n    <value>Esto eliminará todos los datos sobre las personas con las que conversas frecuentemente, así como los bots integrados que podrías utilizar.</value>\n  </data>\n  <data name=\"ViewContact\" xml:space=\"preserve\">\n    <value>Ver contacto</value>\n  </data>\n  <data name=\"PhoneKindHome\" xml:space=\"preserve\">\n    <value>Casa</value>\n  </data>\n  <data name=\"PhoneKindMobile\" xml:space=\"preserve\">\n    <value>Móvil</value>\n  </data>\n  <data name=\"PhoneKindOther\" xml:space=\"preserve\">\n    <value>Otro</value>\n  </data>\n  <data name=\"PhoneKindWork\" xml:space=\"preserve\">\n    <value>Trabajo</value>\n  </data>\n  <data name=\"PassportAddAgreement\" xml:space=\"preserve\">\n    <value>Añadir contrato de arrendamiento</value>\n  </data>\n  <data name=\"PassportAddAgreementInfo\" xml:space=\"preserve\">\n    <value>Subir un escaneo de tu contrato de arrendamiento.</value>\n  </data>\n  <data name=\"PassportAddBank\" xml:space=\"preserve\">\n    <value>Añadir extracto de cuenta</value>\n  </data>\n  <data name=\"PassportAddBankInfo\" xml:space=\"preserve\">\n    <value>Subir un escaneo de un extracto de cuenta bancaria.</value>\n  </data>\n  <data name=\"PassportAddBill\" xml:space=\"preserve\">\n    <value>Añadir factura de servicios</value>\n  </data>\n  <data name=\"PassportAddBillInfo\" xml:space=\"preserve\">\n    <value>Subir un escaneo de tu factura de servicios.</value>\n  </data>\n  <data name=\"PassportAddPassportRegistration\" xml:space=\"preserve\">\n    <value>Registro de pasaporte</value>\n  </data>\n  <data name=\"PassportAddPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>Subir un escaneo de la página de tu registro del pasaporte.</value>\n  </data>\n  <data name=\"PassportAddressHeader\" xml:space=\"preserve\">\n    <value>Dirección</value>\n  </data>\n  <data name=\"PassportCity\" xml:space=\"preserve\">\n    <value>Ciudad</value>\n  </data>\n  <data name=\"PassportCountry\" xml:space=\"preserve\">\n    <value>País</value>\n  </data>\n  <data name=\"PassportDeleteDocument\" xml:space=\"preserve\">\n    <value>Eliminar documento</value>\n  </data>\n  <data name=\"PassportDeleteDocumentAlert\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar este documento?</value>\n  </data>\n  <data name=\"PassportDeleteScan\" xml:space=\"preserve\">\n    <value>Eliminar escaneo</value>\n  </data>\n  <data name=\"PassportDocuments\" xml:space=\"preserve\">\n    <value>Escaneos</value>\n  </data>\n  <data name=\"PassportPostcode\" xml:space=\"preserve\">\n    <value>Código postal</value>\n  </data>\n  <data name=\"PassportState\" xml:space=\"preserve\">\n    <value>Estado/Provincia/Región</value>\n  </data>\n  <data name=\"PassportStreet1\" xml:space=\"preserve\">\n    <value>Calle</value>\n  </data>\n  <data name=\"PassportStreet2\" xml:space=\"preserve\">\n    <value>Calle</value>\n  </data>\n  <data name=\"PassportUploadAdditinalDocument\" xml:space=\"preserve\">\n    <value>Subir escaneos adicionales</value>\n  </data>\n  <data name=\"PassportUploadDocument\" xml:space=\"preserve\">\n    <value>Subir escaneos</value>\n  </data>\n  <data name=\"PassportDeleteScanAlert\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar este escaneo?</value>\n  </data>\n  <data name=\"PassportEmailInfo\" xml:space=\"preserve\">\n    <value>Pon tu dirección de correo electrónico</value>\n  </data>\n  <data name=\"PassportPhoneInfo\" xml:space=\"preserve\">\n    <value>Pon tu número de teléfono</value>\n  </data>\n  <data name=\"UpdateApp\" xml:space=\"preserve\">\n    <value>Actualizar aplicación</value>\n  </data>\n  <data name=\"PassportPhone\" xml:space=\"preserve\">\n    <value>Número de teléfono</value>\n  </data>\n  <data name=\"PassportPhoneUploadInfo\" xml:space=\"preserve\">\n    <value>Nota: Recibirás un código de confirmación en el número de teléfono que nos diste.</value>\n  </data>\n  <data name=\"PassportPhoneUseOther\" xml:space=\"preserve\">\n    <value>O pon un nuevo número de teléfono</value>\n  </data>\n  <data name=\"PassportPhoneUseSame\" xml:space=\"preserve\">\n    <value>Usar {0}</value>\n  </data>\n  <data name=\"PassportPhoneUseSameInfo\" xml:space=\"preserve\">\n    <value>Usar el mismo número de teléfono que en Telegram.</value>\n  </data>\n  <data name=\"PassportDeletePhoneNumberAlert\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar el número de teléfono?</value>\n  </data>\n  <data name=\"MessageActionSecureValuesSent\" xml:space=\"preserve\">\n    <value>{0} recibió los siguientes documentos: {1}</value>\n  </data>\n  <data name=\"DeleteAllCloudDrafts\" xml:space=\"preserve\">\n    <value>Eliminar todos los borradores</value>\n  </data>\n  <data name=\"DeleteAllCloudDraftsConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar todos los borradores de la nube?</value>\n  </data>\n  <data name=\"PassportRequestPasswordInfo\" xml:space=\"preserve\">\n    <value>Por favor, pon tu contraseña de Telegram para descifrar tus datos.</value>\n  </data>\n  <data name=\"PassportSelfRequest\" xml:space=\"preserve\">\n    <value>Por favor, pon tu contraseña para acceder a tus datos personales.</value>\n  </data>\n  <data name=\"PassportDelete\" xml:space=\"preserve\">\n    <value>Eliminar</value>\n  </data>\n  <data name=\"PassportNoDocumentsAdd\" xml:space=\"preserve\">\n    <value>Añadir un documento</value>\n  </data>\n  <data name=\"PassportEmail\" xml:space=\"preserve\">\n    <value>Correo electrónico</value>\n  </data>\n  <data name=\"PassportPersonal\" xml:space=\"preserve\">\n    <value>Datos personales</value>\n  </data>\n  <data name=\"PassportUtilityBill\" xml:space=\"preserve\">\n    <value>Factura de servicios</value>\n  </data>\n  <data name=\"PassportProvidedInformation\" xml:space=\"preserve\">\n    <value>Información entregada</value>\n  </data>\n  <data name=\"PassportRequestedInformation\" xml:space=\"preserve\">\n    <value>Información solicitada</value>\n  </data>\n  <data name=\"PassportDeleteConfirmation\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar tu Telegram Passport?</value>\n  </data>\n  <data name=\"Passport\" xml:space=\"preserve\">\n    <value>Passport</value>\n  </data>\n  <data name=\"PassportBankStatement\" xml:space=\"preserve\">\n    <value>Extracto de cuenta</value>\n  </data>\n  <data name=\"PassportDriverLicence\" xml:space=\"preserve\">\n    <value>Licencia de conducir</value>\n  </data>\n  <data name=\"PassportEmailAddress\" xml:space=\"preserve\">\n    <value>Dirección de correo</value>\n  </data>\n  <data name=\"PassportIdentityCard\" xml:space=\"preserve\">\n    <value>Tarjeta de identificación</value>\n  </data>\n  <data name=\"PassportInternal\" xml:space=\"preserve\">\n    <value>Pasaporte interno</value>\n  </data>\n  <data name=\"PassportPersonalDetails\" xml:space=\"preserve\">\n    <value>Datos personales</value>\n  </data>\n  <data name=\"PassportPhoneNumber\" xml:space=\"preserve\">\n    <value>Número de teléfono</value>\n  </data>\n  <data name=\"PassportRegistration\" xml:space=\"preserve\">\n    <value>Registro de pasaporte</value>\n  </data>\n  <data name=\"PassportTemporaryRegistration\" xml:space=\"preserve\">\n    <value>Registro temporal</value>\n  </data>\n  <data name=\"PassportTenancyAgreement\" xml:space=\"preserve\">\n    <value>Contrato de arrendamiento</value>\n  </data>\n  <data name=\"PassportDeleteEmailAlert\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar el correo electrónico?</value>\n  </data>\n  <data name=\"PassportDeleteAll\" xml:space=\"preserve\">\n    <value>Eliminar Telegram Passport</value>\n  </data>\n  <data name=\"PassportDeleteAddressAlert\" xml:space=\"preserve\">\n    <value>¿Quieres eliminar los datos de dirección?</value>\n  </data>\n  <data name=\"PassportAddTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Subir un escaneo de tu registro temporal.</value>\n  </data>\n  <data name=\"PassportResidentialAddress\" xml:space=\"preserve\">\n    <value>Dirección de residencia</value>\n  </data>\n  <data name=\"PassportDeleteAddressDetails\" xml:space=\"preserve\">\n    <value>Eliminar datos de dirección</value>\n  </data>\n  <data name=\"PassportUploadMaxReached\" xml:space=\"preserve\">\n    <value>No puedes subir más de {0} archivos.</value>\n  </data>\n  <data name=\"PassportCorrectErrors\" xml:space=\"preserve\">\n    <value>Toca para corregir errores.</value>\n  </data>\n  <data name=\"PassportUseLatinOnly\" xml:space=\"preserve\">\n    <value>Por favor, usa sólo caracteres latinos.</value>\n  </data>\n  <data name=\"PassportInfo\" xml:space=\"preserve\">\n    <value>Con Telegram Passport puedes registrarte fácilmente en sitios web y servicios que requieren una identificación.\n\nTu información, datos personales y documentos están protegidos con cifrado end-to-end. Nadie, incluyendo a Telegram, puede acceder a ellos sin tu permiso.\n\nPuedes visitar nuestras preguntas frecuentes para conocer más.</value>\n  </data>\n  <data name=\"PassportFormError\" xml:space=\"preserve\">\n    <value>No se pudo obtener el formulario de autorización.</value>\n  </data>\n  <data name=\"TurnPasswordOffPassport\" xml:space=\"preserve\">\n    <value>¡Advertencia! ¡Todos los datos guardados en tu Telegram Passport se perderán!</value>\n  </data>\n  <data name=\"TurnPasswordOffQuestion\" xml:space=\"preserve\">\n    <value>¿Quieres desactivar tu contraseña?</value>\n  </data>\n  <data name=\"PassportNoDocuments\" xml:space=\"preserve\">\n    <value>No tienes documentos aún</value>\n  </data>\n  <data name=\"PassportNoDocumentsInfo\" xml:space=\"preserve\">\n    <value>Puedes añadir un número de teléfono, dirección de correo, tarjeta de identificación o dirección residencial.</value>\n  </data>\n  <data name=\"TelegramPassportCreatePassword\" xml:space=\"preserve\">\n    <value>Crear una contraseña</value>\n  </data>\n  <data name=\"TelegramPassportCreatePasswordInfo\" xml:space=\"preserve\">\n    <value>Por favor, crea una contraseña para asegurar tus datos personales con cifrado end-to-end.\n\nEsta contraseña también será requerida cuando inicies sesión en Telegram en un nuevo dispositivo.</value>\n  </data>\n  <data name=\"PassportEmailUploadInfo\" xml:space=\"preserve\">\n    <value>Nota: Recibirás un código de confirmación en la dirección de correo que nos diste.</value>\n  </data>\n  <data name=\"PassportEmailUseSameInfo\" xml:space=\"preserve\">\n    <value>Usar la misma dirección de correo que en Telegram.</value>\n  </data>\n  <data name=\"EmailInvalidString\" xml:space=\"preserve\">\n    <value>Correo inválido. Por favor, reinténtalo.</value>\n  </data>\n  <data name=\"PassportEmailVerifyInfo\" xml:space=\"preserve\">\n    <value>Por favor, pon el código que hemos enviado a {0}.</value>\n  </data>\n  <data name=\"EmailCodeEmpty\" xml:space=\"preserve\">\n    <value>Código vacío. Por favor, reinténtalo.</value>\n  </data>\n  <data name=\"EmailCodeExpiredString\" xml:space=\"preserve\">\n    <value>Código expirado. Por favor, reinténtalo.</value>\n  </data>\n  <data name=\"EmailCodeInvalidString\" xml:space=\"preserve\">\n    <value>El código es inválido. Por favor, reinténtalo.</value>\n  </data>\n  <data name=\"PassportBirthdate\" xml:space=\"preserve\">\n    <value>Nacimiento</value>\n  </data>\n  <data name=\"PassportCitizenship\" xml:space=\"preserve\">\n    <value>Nacionalidad</value>\n  </data>\n  <data name=\"PassportFemale\" xml:space=\"preserve\">\n    <value>Femenino</value>\n  </data>\n  <data name=\"PassportGender\" xml:space=\"preserve\">\n    <value>Género</value>\n  </data>\n  <data name=\"PassportMale\" xml:space=\"preserve\">\n    <value>Masculino</value>\n  </data>\n  <data name=\"PassportName\" xml:space=\"preserve\">\n    <value>Nombre</value>\n  </data>\n  <data name=\"PassportResidence\" xml:space=\"preserve\">\n    <value>Residencia</value>\n  </data>\n  <data name=\"PassportSurname\" xml:space=\"preserve\">\n    <value>Apellidos</value>\n  </data>\n  <data name=\"PassportSelectGender\" xml:space=\"preserve\">\n    <value>Elegir género</value>\n  </data>\n  <data name=\"PassportSelectDate\" xml:space=\"preserve\">\n    <value>Elegir fecha de nacimiento</value>\n  </data>\n  <data name=\"PassportDocumentNumber\" xml:space=\"preserve\">\n    <value>Número de documento</value>\n  </data>\n  <data name=\"PassportExpired\" xml:space=\"preserve\">\n    <value>Vencimiento</value>\n  </data>\n  <data name=\"PassportFrontSide\" xml:space=\"preserve\">\n    <value>Lado delantero</value>\n  </data>\n  <data name=\"PassportFrontSideInfo\" xml:space=\"preserve\">\n    <value>Sube una foto del lado delantero del documento</value>\n  </data>\n  <data name=\"PassportPersonalUploadInfo\" xml:space=\"preserve\">\n    <value>El documento debe contener tu fotografía, nombre y apellidos, fecha de nacimiento, número de documento, país de emisión y fecha de vencimiento.</value>\n  </data>\n  <data name=\"PassportRequiredDocuments\" xml:space=\"preserve\">\n    <value>Documentos necesarios</value>\n  </data>\n  <data name=\"PassportReverseSide\" xml:space=\"preserve\">\n    <value>Reverso</value>\n  </data>\n  <data name=\"PassportReverseSideInfo\" xml:space=\"preserve\">\n    <value>Sube una foto del reverso del documento</value>\n  </data>\n  <data name=\"PassportSelfie\" xml:space=\"preserve\">\n    <value>Selfie</value>\n  </data>\n  <data name=\"PassportSelfieInfo\" xml:space=\"preserve\">\n    <value>Sube una selfie tuya sosteniendo el documento</value>\n  </data>\n  <data name=\"PassportSelectNotExpire\" xml:space=\"preserve\">\n    <value>No vence</value>\n  </data>\n  <data name=\"PassportDeleteDocumentPersonal\" xml:space=\"preserve\">\n    <value>Eliminar datos personales</value>\n  </data>\n  <data name=\"PassportMainPage\" xml:space=\"preserve\">\n    <value>Página principal</value>\n  </data>\n  <data name=\"PassportMainPageInfo\" xml:space=\"preserve\">\n    <value>Sube una foto de la página principal del documento</value>\n  </data>\n  <data name=\"PassportNoExpireDate\" xml:space=\"preserve\">\n    <value>No vence</value>\n  </data>\n  <data name=\"UpdateAppAlert\" xml:space=\"preserve\">\n    <value>Lo sentimos, tu aplicación de Telegram no está actualizada y no puede procesar esta solicitud. Por favor, actualiza Telegram.</value>\n  </data>\n  <data name=\"PassportInfoTitle\" xml:space=\"preserve\">\n    <value>¿Qué es Telegram Passport?</value>\n  </data>\n  <data name=\"Copyright\" xml:space=\"preserve\">\n    <value>Derechos de autor</value>\n  </data>\n  <data name=\"PassportAddTranslationDriverLicenceInfo\" xml:space=\"preserve\">\n    <value>Sube escaneos de una traducción certificada al inglés de tu licencia de conducir.</value>\n  </data>\n  <data name=\"PassportAddTranslationIdentityCardInfo\" xml:space=\"preserve\">\n    <value>Sube escaneos de una traducción certificada al inglés de tu tarjeta de identificación.</value>\n  </data>\n  <data name=\"PassportAddTranslationInternalPassportInfo\" xml:space=\"preserve\">\n    <value>Sube escaneos de una traducción certificada al inglés de tu pasaporte interno.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportInfo\" xml:space=\"preserve\">\n    <value>Sube escaneos de una traducción certificada al inglés de tu pasaporte.</value>\n  </data>\n  <data name=\"PassportAddTranslationAgreementInfo\" xml:space=\"preserve\">\n    <value>Sube escaneos de una traducción certificada al inglés de tu contrato de alquiler.</value>\n  </data>\n  <data name=\"PassportAddTranslationBankInfo\" xml:space=\"preserve\">\n    <value>Sube escaneos de una traducción certificada al inglés de tu extracto de cuenta.</value>\n  </data>\n  <data name=\"PassportAddTranslationBillInfo\" xml:space=\"preserve\">\n    <value>Sube escaneos de una traducción certificada al inglés de tu factura de servicios.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>Sube escaneos de una traducción certificada al inglés de la página de registro de tu pasaporte.</value>\n  </data>\n  <data name=\"PassportAddTranslationTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Sube escaneos de una traducción certificada al inglés de tu registro temporal.</value>\n  </data>\n  <data name=\"PassportAddTranslationUploadInfo\" xml:space=\"preserve\">\n    <value>Sube escaneos de una traducción certificada al inglés del documento.</value>\n  </data>\n  <data name=\"PassportTranslation\" xml:space=\"preserve\">\n    <value>Traducción</value>\n  </data>\n  <data name=\"PassportDataCorrupted\" xml:space=\"preserve\">\n    <value>Parece que los datos de tu Telegram Passport se han dañado.\nPuedes restablecer tu Telegram Passport.</value>\n  </data>\n  <data name=\"PassportOr\" xml:space=\"preserve\">\n    <value>{0} o {1}</value>\n  </data>\n  <data name=\"PassportIdentityDocument\" xml:space=\"preserve\">\n    <value>Documento de identidad</value>\n  </data>\n  <data name=\"PassportAddressNoUploadInfo\" xml:space=\"preserve\">\n    <value>Por favor, pon tu dirección</value>\n  </data>\n  <data name=\"PassportIdentityDocumentInfo\" xml:space=\"preserve\">\n    <value>Sube un escaneo de tu pasaporte u otra ID</value>\n  </data>\n  <data name=\"PassportIdentityDriverLicence\" xml:space=\"preserve\">\n    <value>Sube un escaneo de tu licencia de conducir</value>\n  </data>\n  <data name=\"PassportIdentityID\" xml:space=\"preserve\">\n    <value>Sube un escaneo de tu tarjeta de identificación</value>\n  </data>\n  <data name=\"PassportIdentityInternalPassport\" xml:space=\"preserve\">\n    <value>Sube un escaneo de tu pasaporte interno</value>\n  </data>\n  <data name=\"PassportIdentityPassport\" xml:space=\"preserve\">\n    <value>Sube un escaneo de tu pasaporte</value>\n  </data>\n  <data name=\"PassportMidname\" xml:space=\"preserve\">\n    <value>Segundo nombre</value>\n  </data>\n  <data name=\"PassportMidnameCountry\" xml:space=\"preserve\">\n    <value>Segundo nombre ({0})</value>\n  </data>\n  <data name=\"PassportMidnameLatin\" xml:space=\"preserve\">\n    <value>Segundo nombre (latino)</value>\n  </data>\n  <data name=\"PassportNameCountry\" xml:space=\"preserve\">\n    <value>Nombre ({0})</value>\n  </data>\n  <data name=\"PassportNameLatin\" xml:space=\"preserve\">\n    <value>Nombre (latino)</value>\n  </data>\n  <data name=\"PassportNativeHeader\" xml:space=\"preserve\">\n    <value>Tu nombre</value>\n  </data>\n  <data name=\"PassportNativeInfo\" xml:space=\"preserve\">\n    <value>Tu nombre en el idioma de tu país de residencia ({0}).</value>\n  </data>\n  <data name=\"PassportSurnameCountry\" xml:space=\"preserve\">\n    <value>Apellido ({0})</value>\n  </data>\n  <data name=\"PassportSurnameLatin\" xml:space=\"preserve\">\n    <value>Apellido (latino)</value>\n  </data>\n</root>\n"
  },
  {
    "path": "TelegramClient/Resources/AppResources.it.Designer.cs",
    "content": ""
  },
  {
    "path": "TelegramClient/Resources/AppResources.it.resx",
    "content": "﻿<?xml version='1.0' encoding='UTF-8'?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" id=\"root\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/>\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"AppName\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"BlockContact\" xml:space=\"preserve\">\n    <value>Blocca</value>\n  </data>\n  <data name=\"BlockedUsers\" xml:space=\"preserve\">\n    <value>Utenti bloccati</value>\n  </data>\n  <data name=\"Call\" xml:space=\"preserve\">\n    <value>Chiama</value>\n  </data>\n  <data name=\"Contacts\" xml:space=\"preserve\">\n    <value>Contatti</value>\n  </data>\n  <data name=\"Copy\" xml:space=\"preserve\">\n    <value>Copia</value>\n  </data>\n  <data name=\"Delete\" xml:space=\"preserve\">\n    <value>Elimina</value>\n  </data>\n  <data name=\"Dialogs\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"Forward\" xml:space=\"preserve\">\n    <value>Inoltra</value>\n  </data>\n  <data name=\"Loading\" xml:space=\"preserve\">\n    <value>Carico...</value>\n  </data>\n  <data name=\"Login\" xml:space=\"preserve\">\n    <value>Accedi</value>\n  </data>\n  <data name=\"Refresh\" xml:space=\"preserve\">\n    <value>Aggiorna</value>\n  </data>\n  <data name=\"Retry\" xml:space=\"preserve\">\n    <value>Riprova</value>\n  </data>\n  <data name=\"Send\" xml:space=\"preserve\">\n    <value>Invia</value>\n  </data>\n  <data name=\"Sending\" xml:space=\"preserve\">\n    <value>Invio in corso</value>\n  </data>\n  <data name=\"SendingFailed\" xml:space=\"preserve\">\n    <value>Impossibile inviare</value>\n  </data>\n  <data name=\"SendMessage\" xml:space=\"preserve\">\n    <value>Invia un messaggio</value>\n  </data>\n  <data name=\"Settings\" xml:space=\"preserve\">\n    <value>Impostazioni</value>\n  </data>\n  <data name=\"ShareContact\" xml:space=\"preserve\">\n    <value>Condividi contatto</value>\n  </data>\n  <data name=\"SignIn\" xml:space=\"preserve\">\n    <value>Accedi</value>\n  </data>\n  <data name=\"UnblockContact\" xml:space=\"preserve\">\n    <value>Sblocca</value>\n  </data>\n  <data name=\"Yesterday\" xml:space=\"preserve\">\n    <value>Ieri</value>\n  </data>\n  <data name=\"YourMessage\" xml:space=\"preserve\">\n    <value>Scrivi il tuo messaggio</value>\n  </data>\n  <data name=\"LogOut\" xml:space=\"preserve\">\n    <value>Esci</value>\n  </data>\n  <data name=\"NoMessagesYet\" xml:space=\"preserve\">\n    <value>Ancora nessun messaggio qui…</value>\n  </data>\n  <data name=\"Confirm\" xml:space=\"preserve\">\n    <value>Conferma</value>\n  </data>\n  <data name=\"DeleteChatConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler eliminare questa chat?</value>\n  </data>\n  <data name=\"Contact\" xml:space=\"preserve\">\n    <value>Contatto</value>\n  </data>\n  <data name=\"EmptyMessage\" xml:space=\"preserve\">\n    <value>Messaggio eliminato</value>\n  </data>\n  <data name=\"ForwardedMessage\" xml:space=\"preserve\">\n    <value>Messaggio inoltrato</value>\n  </data>\n  <data name=\"GeoPoint\" xml:space=\"preserve\">\n    <value>Posizione</value>\n  </data>\n  <data name=\"Photo\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"Video\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"ComposeMessage\" xml:space=\"preserve\">\n    <value>Nuovo</value>\n  </data>\n  <data name=\"Search\" xml:space=\"preserve\">\n    <value>Cerca</value>\n  </data>\n  <data name=\"ServiceMessage\" xml:space=\"preserve\">\n    <value>Messaggio di servizio</value>\n  </data>\n  <data name=\"UnsupportedMedia\" xml:space=\"preserve\">\n    <value>Questo messaggio non è supportato sulla tua versione di Telegram. Aggiorna l'applicazione per visualizzarlo: http://telegram.org/update</value>\n  </data>\n  <data name=\"Unread\" xml:space=\"preserve\">\n    <value>Non letto</value>\n  </data>\n  <data name=\"IsTyping\" xml:space=\"preserve\">\n    <value>Sta scrivendo</value>\n  </data>\n  <data name=\"Online\" xml:space=\"preserve\">\n    <value>In linea</value>\n  </data>\n  <data name=\"User\" xml:space=\"preserve\">\n    <value>Utente</value>\n  </data>\n  <data name=\"MessageActionChatCreate\" xml:space=\"preserve\">\n    <value>{0} ha creato il gruppo \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionChatEditTitle\" xml:space=\"preserve\">\n    <value>{0} ha cambiato il nome del gruppo in \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionChatEditPhoto\" xml:space=\"preserve\">\n    <value>{0} ha cambiato la foto del gruppo</value>\n  </data>\n  <data name=\"MessageActionChatDeletePhoto\" xml:space=\"preserve\">\n    <value>{0} ha eliminato la foto del gruppo</value>\n  </data>\n  <data name=\"MessageActionChatAddUser\" xml:space=\"preserve\">\n    <value>{0} ha invitato {1}</value>\n  </data>\n  <data name=\"MessageActionChatDeleteUser\" xml:space=\"preserve\">\n    <value>{0} ha rimosso {1}</value>\n  </data>\n  <data name=\"MessageActionEmpty\" xml:space=\"preserve\">\n    <value>Messaggio vuoto</value>\n  </data>\n  <data name=\"CompanyNominative\" xml:space=\"preserve\">\n    <value>Membro</value>\n  </data>\n  <data name=\"CompanyGenitivePlural\" xml:space=\"preserve\">\n    <value>Membri</value>\n  </data>\n  <data name=\"CompanyGenitiveSingular\" xml:space=\"preserve\">\n    <value>Membro</value>\n  </data>\n  <data name=\"PeopleInTheConversation\" xml:space=\"preserve\">\n    <value>{0} membri</value>\n  </data>\n  <data name=\"Offline\" xml:space=\"preserve\">\n    <value>Non in linea</value>\n  </data>\n  <data name=\"Today\" xml:space=\"preserve\">\n    <value>Oggi</value>\n  </data>\n  <data name=\"LastSeenAt\" xml:space=\"preserve\">\n    <value>Ultimo accesso {0} alle {1}</value>\n  </data>\n  <data name=\"LastSeen\" xml:space=\"preserve\">\n    <value>Ultimo accesso {0} fa</value>\n  </data>\n  <data name=\"MinuteAccusative\" xml:space=\"preserve\">\n    <value>Minuto</value>\n  </data>\n  <data name=\"MinuteGenitiveSingular\" xml:space=\"preserve\">\n    <value>Minuto</value>\n  </data>\n  <data name=\"MinuteGenitivePlural\" xml:space=\"preserve\">\n    <value>Minuti</value>\n  </data>\n  <data name=\"Attach\" xml:space=\"preserve\">\n    <value>Allega</value>\n  </data>\n  <data name=\"Manage\" xml:space=\"preserve\">\n    <value>Gestisci</value>\n  </data>\n  <data name=\"Ok\" xml:space=\"preserve\">\n    <value>Ok</value>\n  </data>\n  <data name=\"Cancel\" xml:space=\"preserve\">\n    <value>Annulla</value>\n  </data>\n  <data name=\"Select\" xml:space=\"preserve\">\n    <value>Seleziona</value>\n  </data>\n  <data name=\"MapAccusative\" xml:space=\"preserve\">\n    <value>La mia posizione</value>\n  </data>\n  <data name=\"PhotoAccusative\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"Add\" xml:space=\"preserve\">\n    <value>Aggiungi</value>\n  </data>\n  <data name=\"NewGroup\" xml:space=\"preserve\">\n    <value>Nuovo gruppo</value>\n  </data>\n  <data name=\"NewSecretChat\" xml:space=\"preserve\">\n    <value>Nuova chat segreta</value>\n  </data>\n  <data name=\"TileUpdaterTaskDescription\" xml:space=\"preserve\">\n    <value>Processo per aggiornare il numero di messaggi non letti sui tile.</value>\n  </data>\n  <data name=\"Media\" xml:space=\"preserve\">\n    <value>Media condivisi</value>\n  </data>\n  <data name=\"Profile\" xml:space=\"preserve\">\n    <value>Info</value>\n  </data>\n  <data name=\"Notifications\" xml:space=\"preserve\">\n    <value>Notifiche</value>\n  </data>\n  <data name=\"On\" xml:space=\"preserve\">\n    <value>Sì</value>\n  </data>\n  <data name=\"Off\" xml:space=\"preserve\">\n    <value>No</value>\n  </data>\n  <data name=\"Sound\" xml:space=\"preserve\">\n    <value>Suono</value>\n  </data>\n  <data name=\"CreateSecretChat\" xml:space=\"preserve\">\n    <value>Crea una chat segreta</value>\n  </data>\n  <data name=\"MessageNotifications\" xml:space=\"preserve\">\n    <value>Notifiche messaggio</value>\n  </data>\n  <data name=\"ChatNotifications\" xml:space=\"preserve\">\n    <value>Notifiche chat</value>\n  </data>\n  <data name=\"NotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Silenzia, anteprima messaggi, chat</value>\n  </data>\n  <data name=\"Support\" xml:space=\"preserve\">\n    <value>Supporto</value>\n  </data>\n  <data name=\"AskAQuestion\" xml:space=\"preserve\">\n    <value>Fai una domanda</value>\n  </data>\n  <data name=\"InAppNotifications\" xml:space=\"preserve\">\n    <value>Notifiche in-app</value>\n  </data>\n  <data name=\"OnPlural\" xml:space=\"preserve\">\n    <value>Sì</value>\n  </data>\n  <data name=\"OffPlural\" xml:space=\"preserve\">\n    <value>No</value>\n  </data>\n  <data name=\"OnFeminine\" xml:space=\"preserve\">\n    <value>Sì</value>\n  </data>\n  <data name=\"OffFeminine\" xml:space=\"preserve\">\n    <value>No</value>\n  </data>\n  <data name=\"InAppSounds\" xml:space=\"preserve\">\n    <value>Suoni in-app</value>\n  </data>\n  <data name=\"InAppVibrate\" xml:space=\"preserve\">\n    <value>Vibrazione in-app</value>\n  </data>\n  <data name=\"InAppPreview\" xml:space=\"preserve\">\n    <value>Anteprima in-app</value>\n  </data>\n  <data name=\"ResetAllNotifications\" xml:space=\"preserve\">\n    <value>Ripristina tutte le notifiche</value>\n  </data>\n  <data name=\"ResetAllNotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Annulla tutte le impostazioni di notifica personalizzate per tutti i tuoi gruppi e contatti.</value>\n  </data>\n  <data name=\"OnMasculine\" xml:space=\"preserve\">\n    <value>Sì</value>\n  </data>\n  <data name=\"OffMasculine\" xml:space=\"preserve\">\n    <value>No</value>\n  </data>\n  <data name=\"GroupNotifications\" xml:space=\"preserve\">\n    <value>Notifiche gruppi</value>\n  </data>\n  <data name=\"Alert\" xml:space=\"preserve\">\n    <value>Avviso</value>\n  </data>\n  <data name=\"MessagePreview\" xml:space=\"preserve\">\n    <value>Anteprima messaggio</value>\n  </data>\n  <data name=\"SaveIncomingPhotos\" xml:space=\"preserve\">\n    <value>Salva le foto in arrivo</value>\n  </data>\n  <data name=\"Create\" xml:space=\"preserve\">\n    <value>Crea</value>\n  </data>\n  <data name=\"Share\" xml:space=\"preserve\">\n    <value>Condividi</value>\n  </data>\n  <data name=\"Edit\" xml:space=\"preserve\">\n    <value>Modifica</value>\n  </data>\n  <data name=\"CompanyNominativeSingular\" xml:space=\"preserve\">\n    <value>Contatto</value>\n  </data>\n  <data name=\"CompanyNominativePlural\" xml:space=\"preserve\">\n    <value>Contatti</value>\n  </data>\n  <data name=\"PictureAccusative\" xml:space=\"preserve\">\n    <value>Immagine</value>\n  </data>\n  <data name=\"ContactAccusative\" xml:space=\"preserve\">\n    <value>Contatto</value>\n  </data>\n  <data name=\"DocumentAccusative\" xml:space=\"preserve\">\n    <value>File</value>\n  </data>\n  <data name=\"AttachCaption\" xml:space=\"preserve\">\n    <value>Allega qualcosa</value>\n  </data>\n  <data name=\"LocationAccusative\" xml:space=\"preserve\">\n    <value>Posizione</value>\n  </data>\n  <data name=\"VideoAccusative\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"NoMediaHere\" xml:space=\"preserve\">\n    <value>Nessun media</value>\n  </data>\n  <data name=\"ChooseAnItem\" xml:space=\"preserve\">\n    <value>Scegliere una voce</value>\n  </data>\n  <data name=\"NoUsersHere\" xml:space=\"preserve\">\n    <value>Nessun utente qui</value>\n  </data>\n  <data name=\"NoContactsHere\" xml:space=\"preserve\">\n    <value>Nessun contatto</value>\n  </data>\n  <data name=\"Title\" xml:space=\"preserve\">\n    <value>Titolo</value>\n  </data>\n  <data name=\"Done\" xml:space=\"preserve\">\n    <value>Fatto</value>\n  </data>\n  <data name=\"AddParticipant\" xml:space=\"preserve\">\n    <value>Aggiungi contatto</value>\n  </data>\n  <data name=\"DeleteAndExitGroup\" xml:space=\"preserve\">\n    <value>Elimina ed esci</value>\n  </data>\n  <data name=\"MessageActionUserLeftGroup\" xml:space=\"preserve\">\n    <value>{0} ha lasciato il gruppo</value>\n  </data>\n  <data name=\"MessageUser\" xml:space=\"preserve\">\n    <value>Invia un messaggio a {0}</value>\n  </data>\n  <data name=\"ViewUser\" xml:space=\"preserve\">\n    <value>Visualizza il profilo di {0}</value>\n  </data>\n  <data name=\"SearchAmongYourDialogsAndMessages\" xml:space=\"preserve\">\n    <value>Cerca chat e messaggi</value>\n  </data>\n  <data name=\"Messages\" xml:space=\"preserve\">\n    <value>Messaggi</value>\n  </data>\n  <data name=\"NoMessagesHere\" xml:space=\"preserve\">\n    <value>Nessun messaggio</value>\n  </data>\n  <data name=\"NoResults\" xml:space=\"preserve\">\n    <value>Nessun risultato</value>\n  </data>\n  <data name=\"Conversations\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"EditName\" xml:space=\"preserve\">\n    <value>Modifica nome</value>\n  </data>\n  <data name=\"Save\" xml:space=\"preserve\">\n    <value>Salva</value>\n  </data>\n  <data name=\"About\" xml:space=\"preserve\">\n    <value>Info</value>\n  </data>\n  <data name=\"Version\" xml:space=\"preserve\">\n    <value>Versione</value>\n  </data>\n  <data name=\"YourPhone\" xml:space=\"preserve\">\n    <value>Il tuo telefono</value>\n  </data>\n  <data name=\"SignInMessage\" xml:space=\"preserve\">\n    <value>Si prega di confermare il prefisso internazionale e di inserire il numero di telefono.</value>\n  </data>\n  <data name=\"Your phone number\" xml:space=\"preserve\">\n    <value>Il tuo numero di telefono</value>\n  </data>\n  <data name=\"Next\" xml:space=\"preserve\">\n    <value>Successivo</value>\n  </data>\n  <data name=\"Country\" xml:space=\"preserve\">\n    <value>Nazione</value>\n  </data>\n  <data name=\"YourCode\" xml:space=\"preserve\">\n    <value>Il tuo codice</value>\n  </data>\n  <data name=\"ConfirmMessage\" xml:space=\"preserve\">\n    <value>Abbiamo inviato un SMS con il codice di attivazione al tuo telefono **{0}**</value>\n  </data>\n  <data name=\"WeWillCallYou\" xml:space=\"preserve\">\n    <value>Ti telefoneremo tra {0}</value>\n  </data>\n  <data name=\"Code\" xml:space=\"preserve\">\n    <value>Codice</value>\n  </data>\n  <data name=\"FirstName\" xml:space=\"preserve\">\n    <value>Nome</value>\n  </data>\n  <data name=\"LastName\" xml:space=\"preserve\">\n    <value>Cognome (opzionale)</value>\n  </data>\n  <data name=\"YourName\" xml:space=\"preserve\">\n    <value>Il tuo nome</value>\n  </data>\n  <data name=\"SignUpMessage\" xml:space=\"preserve\">\n    <value>Inserisci il tuo nome e aggiungi una foto profilo.</value>\n  </data>\n  <data name=\"AddPhoto\" xml:space=\"preserve\">\n    <value>Aggiungi foto</value>\n  </data>\n  <data name=\"NoDialogsHere\" xml:space=\"preserve\">\n    <value>Nessuna chat qui</value>\n  </data>\n  <data name=\"StartMessaging\" xml:space=\"preserve\">\n    <value>Inizia a chattare</value>\n  </data>\n  <data name=\"Intro1Message\" xml:space=\"preserve\">\n    <value>Benvenuti su **Telegram** ―\nL'app di messaggistica più veloce al mondo.\nÈ gratuita e sicura.</value>\n  </data>\n  <data name=\"Fast\" xml:space=\"preserve\">\n    <value>Veloce</value>\n  </data>\n  <data name=\"FastMessage\" xml:space=\"preserve\">\n    <value>**Telegram** consegna i messaggi più \nvelocemente di qualsiasi altra applicazione.</value>\n  </data>\n  <data name=\"Free\" xml:space=\"preserve\">\n    <value>Gratis</value>\n  </data>\n  <data name=\"FreeMessage\" xml:space=\"preserve\">\n    <value>**Telegram** è gratis per sempre. \nNessuna pubblicità. Nessun abbonamento.</value>\n  </data>\n  <data name=\"Powerful\" xml:space=\"preserve\">\n    <value>Potente</value>\n  </data>\n  <data name=\"PowerfulMessage\" xml:space=\"preserve\">\n    <value>**Telegram** non ha limiti di dimensione\nper le tue chat e i file multimediali.</value>\n  </data>\n  <data name=\"Secure\" xml:space=\"preserve\">\n    <value>Sicuro</value>\n  </data>\n  <data name=\"SecureMessage\" xml:space=\"preserve\">\n    <value>**Telegram** protegge i tuoi messaggi \ndagli attacchi degli hacker.</value>\n  </data>\n  <data name=\"CloudBased\" xml:space=\"preserve\">\n    <value>Basato sul Cloud</value>\n  </data>\n  <data name=\"CloudBasedMessage\" xml:space=\"preserve\">\n    <value>**Telegram** ti consente di accedere ai \ntuoi messaggi da più dispositivi.</value>\n  </data>\n  <data name=\"TelegramDialedYourNumber\" xml:space=\"preserve\">\n    <value>Telegram ha contattato il tuo numero</value>\n  </data>\n  <data name=\"Subject\" xml:space=\"preserve\">\n    <value>Soggetto</value>\n  </data>\n  <data name=\"Members\" xml:space=\"preserve\">\n    <value>Membri</value>\n  </data>\n  <data name=\"YourPhoneNumber\" xml:space=\"preserve\">\n    <value>Il tuo numero di telefono</value>\n  </data>\n  <data name=\"From\" xml:space=\"preserve\">\n    <value>Da</value>\n  </data>\n  <data name=\"You\" xml:space=\"preserve\">\n    <value>Tu</value>\n  </data>\n  <data name=\"YouWhereKickedFromTheGroup\" xml:space=\"preserve\">\n    <value>Sei stato rimosso dal gruppo</value>\n  </data>\n  <data name=\"SavePhotoMessage\" xml:space=\"preserve\">\n    <value>La foto è stata salvata con successo</value>\n  </data>\n  <data name=\"SharedContact\" xml:space=\"preserve\">\n    <value>Contatto condiviso</value>\n  </data>\n  <data name=\"AllContacts\" xml:space=\"preserve\">\n    <value>Tutti i contatti</value>\n  </data>\n  <data name=\"Document\" xml:space=\"preserve\">\n    <value>File</value>\n  </data>\n  <data name=\"InviteFriends\" xml:space=\"preserve\">\n    <value>Invita amici</value>\n  </data>\n  <data name=\"MyLocation\" xml:space=\"preserve\">\n    <value>La mia posizione</value>\n  </data>\n  <data name=\"Satellite\" xml:space=\"preserve\">\n    <value>Satellite</value>\n  </data>\n  <data name=\"Hybrid\" xml:space=\"preserve\">\n    <value>Ibrido</value>\n  </data>\n  <data name=\"SwitchMode\" xml:space=\"preserve\">\n    <value>Cambia visuale</value>\n  </data>\n  <data name=\"DistanceAway\" xml:space=\"preserve\">\n    <value>distante {0}</value>\n  </data>\n  <data name=\"MetersShort\" xml:space=\"preserve\">\n    <value>m</value>\n  </data>\n  <data name=\"KilometersShort\" xml:space=\"preserve\">\n    <value>km</value>\n  </data>\n  <data name=\"ShareLocation\" xml:space=\"preserve\">\n    <value>Condividi posizione</value>\n  </data>\n  <data name=\"Emoji\" xml:space=\"preserve\">\n    <value>Emoji</value>\n  </data>\n  <data name=\"LogOutConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler uscire?\nNota che puoi usare Telegram su tutti i tuoi dispositivi contemporaneamente.\nRicorda, quando ti disconnetti, elimini tutte le Chat Segrete.</value>\n  </data>\n  <data name=\"GotAQuestionAboutTelegram\" xml:space=\"preserve\">\n    <value>Hai delle domande su Telegram?</value>\n  </data>\n  <data name=\"InviteFriendMessage\" xml:space=\"preserve\">\n    <value>Ehi, è il momento di passare a Telegram http://telegram.org/dl</value>\n  </data>\n  <data name=\"ResetAllNotificationsMessage\" xml:space=\"preserve\">\n    <value>Ripristinare tutte le notifiche?</value>\n  </data>\n  <data name=\"AreTyping\" xml:space=\"preserve\">\n    <value>Stanno scrivendo</value>\n  </data>\n  <data name=\"ClearHistory\" xml:space=\"preserve\">\n    <value>Cancella cronologia</value>\n  </data>\n  <data name=\"DeleteAndExit\" xml:space=\"preserve\">\n    <value>Elimina ed esci</value>\n  </data>\n  <data name=\"DeleteHistoryAndExitGroupMessage\" xml:space=\"preserve\">\n    <value>Vuoi eliminare la cronologia ed uscire dal gruppo?</value>\n  </data>\n  <data name=\"NoUsers\" xml:space=\"preserve\">\n    <value>Nessun utente</value>\n  </data>\n  <data name=\"UserNominativeSingular\" xml:space=\"preserve\">\n    <value>Utente</value>\n  </data>\n  <data name=\"UserNominativePlural\" xml:space=\"preserve\">\n    <value>Utenti</value>\n  </data>\n  <data name=\"UserGenitiveSingular\" xml:space=\"preserve\">\n    <value>Utente</value>\n  </data>\n  <data name=\"UserGenitivePlural\" xml:space=\"preserve\">\n    <value>Utenti</value>\n  </data>\n  <data name=\"PleaseGoToChatToForwardMessage\" xml:space=\"preserve\">\n    <value>Vai nella chat per inoltrare il messaggio</value>\n  </data>\n  <data name=\"Info\" xml:space=\"preserve\">\n    <value>Info</value>\n  </data>\n  <data name=\"ForwardeMessageToThisChat\" xml:space=\"preserve\">\n    <value>Inoltrare il messaggio a questa chat?</value>\n  </data>\n  <data name=\"TodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"RegularFormat\" xml:space=\"preserve\">\n    <value>d MMM</value>\n  </data>\n  <data name=\"LongRegularFormat\" xml:space=\"preserve\">\n    <value>d.MM.yyyy</value>\n  </data>\n  <data name=\"MessageTodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"MessageRegularFormat\" xml:space=\"preserve\">\n    <value>d MMM, {0}</value>\n  </data>\n  <data name=\"MessageLongRegularFormat\" xml:space=\"preserve\">\n    <value>yyyy d MMM, {0}</value>\n  </data>\n  <data name=\"UserStatusTimeFormat\" xml:space=\"preserve\">\n    <value>h:mmt</value>\n  </data>\n  <data name=\"UserStatusDayFormat\" xml:space=\"preserve\">\n    <value>d MMM</value>\n  </data>\n  <data name=\"UserStatusYearDayFormat\" xml:space=\"preserve\">\n    <value>d MMM yyyy</value>\n  </data>\n  <data name=\"PhoneNumberInvalidString\" xml:space=\"preserve\">\n    <value>Numero di telefono non valido. Riprova.</value>\n  </data>\n  <data name=\"Error\" xml:space=\"preserve\">\n    <value>Errore</value>\n  </data>\n  <data name=\"FloodWaitString\" xml:space=\"preserve\">\n    <value>Processo interrotto. Riprovare più tardi.</value>\n  </data>\n  <data name=\"PhoneCodeInvalidString\" xml:space=\"preserve\">\n    <value>Hai inserito un codice non valido. Riprova.</value>\n  </data>\n  <data name=\"PhoneCodeExpiredString\" xml:space=\"preserve\">\n    <value>Codice scaduto. Riprova.</value>\n  </data>\n  <data name=\"PhoneCodeEmpty\" xml:space=\"preserve\">\n    <value>Codice vuoto. Riprova.</value>\n  </data>\n  <data name=\"FirstNameInvalidString\" xml:space=\"preserve\">\n    <value>Nome non valido. Riprova.</value>\n  </data>\n  <data name=\"LastNameInvalidString\" xml:space=\"preserve\">\n    <value>Cognome non valido. Riprova.</value>\n  </data>\n  <data name=\"Message\" xml:space=\"preserve\">\n    <value>Messaggio</value>\n  </data>\n  <data name=\"LockScreen\" xml:space=\"preserve\">\n    <value>Schermata di blocco</value>\n  </data>\n  <data name=\"LockScreenSubtitle\" xml:space=\"preserve\">\n    <value>Aggiungi Telegram alla schermata di blocco</value>\n  </data>\n  <data name=\"ConfirmAgeMessage\" xml:space=\"preserve\">\n    <value>Premendo il tasto OK confermerai di avere almeno 13 anni.</value>\n  </data>\n  <data name=\"ConfirmAgeTitle\" xml:space=\"preserve\">\n    <value>Conferma la tua età</value>\n  </data>\n  <data name=\"ConfirmPushMessage\" xml:space=\"preserve\">\n    <value>Vuoi consentire a questa applicazione di utilizzare le notifiche push per avvisarti dei nuovi messaggi?</value>\n  </data>\n  <data name=\"ConfirmPushTitle\" xml:space=\"preserve\">\n    <value>Attivare le notifiche push</value>\n  </data>\n  <data name=\"PrivacyStatement\" xml:space=\"preserve\">\n    <value>Informativa sulla privacy</value>\n  </data>\n  <data name=\"PrivacyStatementText\" xml:space=\"preserve\">\n    <value>Questa applicazione utilizza la posizione corrente per migliorare l'esperienza di mappatura. I dati relativi all'ubicazione possono essere memorizzati e condivisi. La tua privacy è importante per noi. È possibile disattivare questa funzione in qualsiasi momento. \n\nSe hai domande, contattaci. </value>\n  </data>\n  <data name=\"VKGroup\" xml:space=\"preserve\">\n    <value>gruppo</value>\n  </data>\n  <data name=\"LocationServices\" xml:space=\"preserve\">\n    <value>Servizi di posizione</value>\n  </data>\n  <data name=\"AllowLocationServicesTitle\" xml:space=\"preserve\">\n    <value>Consentire l'accesso alla posizione?</value>\n  </data>\n  <data name=\"AllowLocationServiceText\" xml:space=\"preserve\">\n    <value>Consentire l'accesso alla tua posizione corrente? Questa impostazione può essere modificata successivamente.</value>\n  </data>\n  <data name=\"AboutText1\" xml:space=\"preserve\">\n    <value>Telegram Messenger è un'app di messaggistica focalizzata sulla velocità e sulla sicurezza, il tutto completamente gratis e facilmente fruibile.</value>\n  </data>\n  <data name=\"AboutText2\" xml:space=\"preserve\">\n    <value>Per supporto in tempo reale, vai nelle impostazione in Telegram e seleziona \"Fai una Domanda\" per inviare un messaggio direttamente al nostro staff di supporto. Puoi anche inviarci un email a support@telegram.org.</value>\n  </data>\n  <data name=\"TapRecordToStartRecording\" xml:space=\"preserve\">\n    <value>Premi registra per avviare la registrazione...</value>\n  </data>\n  <data name=\"ACameraIsNotSupportedOnThisDevice\" xml:space=\"preserve\">\n    <value>La fotocamera non è supportata su questo dispositivo.</value>\n  </data>\n  <data name=\"ReadyToRecord\" xml:space=\"preserve\">\n    <value>Pronti per la registrazione.</value>\n  </data>\n  <data name=\"PressBackKeyToSendVideo\" xml:space=\"preserve\">\n    <value>Premere il tasto indietro per inviare il video.</value>\n  </data>\n  <data name=\"PlaybackStarted\" xml:space=\"preserve\">\n    <value>Riproduzione avviata.</value>\n  </data>\n  <data name=\"PlaybackPaused\" xml:space=\"preserve\">\n    <value>Riproduzione in pausa.</value>\n  </data>\n  <data name=\"Recording\" xml:space=\"preserve\">\n    <value>Registrazione in corso...</value>\n  </data>\n  <data name=\"PreparingViewfinder\" xml:space=\"preserve\">\n    <value>Preparazione...</value>\n  </data>\n  <data name=\"PlaybackStoped\" xml:space=\"preserve\">\n    <value>Riproduzione interrotta.</value>\n  </data>\n  <data name=\"Record\" xml:space=\"preserve\">\n    <value>Registrazione</value>\n  </data>\n  <data name=\"Stop\" xml:space=\"preserve\">\n    <value>Stop</value>\n  </data>\n  <data name=\"Pause\" xml:space=\"preserve\">\n    <value>Pausa</value>\n  </data>\n  <data name=\"Play\" xml:space=\"preserve\">\n    <value>Play</value>\n  </data>\n  <data name=\"Review\" xml:space=\"preserve\">\n    <value>Vota e commenta</value>\n  </data>\n  <data name=\"PleaseEnterGroupSubject\" xml:space=\"preserve\">\n    <value>Inserisci il nome del gruppo</value>\n  </data>\n  <data name=\"PleaseChooseAtLeastOneParticipant\" xml:space=\"preserve\">\n    <value>Scegli almeno un partecipante</value>\n  </data>\n  <data name=\"ForwardMessagesToThisChat\" xml:space=\"preserve\">\n    <value>Vuoi inoltrare i messaggi a questa chat?</value>\n  </data>\n  <data name=\"InvalidCountryCode\" xml:space=\"preserve\">\n    <value>Codice paese non valido</value>\n  </data>\n  <data name=\"Typing\" xml:space=\"preserve\">\n    <value>Sta scrivendo</value>\n  </data>\n  <data name=\"MaximumMessageLengthExceeded\" xml:space=\"preserve\">\n    <value>Lunghezza massima del testo ({0} symbols) superata.</value>\n  </data>\n  <data name=\"Download\" xml:space=\"preserve\">\n    <value>Download</value>\n  </data>\n  <data name=\"Backgrounds\" xml:space=\"preserve\">\n    <value>Sfondi</value>\n  </data>\n  <data name=\"Static\" xml:space=\"preserve\">\n    <value>Statico</value>\n  </data>\n  <data name=\"Animated\" xml:space=\"preserve\">\n    <value>Animato</value>\n  </data>\n  <data name=\"Background\" xml:space=\"preserve\">\n    <value>Sfondo</value>\n  </data>\n  <data name=\"ApplicationBackgroundSubtitle\" xml:space=\"preserve\">\n    <value>Imposta l'immagine di sfondo per le chat</value>\n  </data>\n  <data name=\"ApplicationBackground\" xml:space=\"preserve\">\n    <value>Sfondo applicazione</value>\n  </data>\n  <data name=\"DialogsBackground\" xml:space=\"preserve\">\n    <value>Sfondo</value>\n  </data>\n  <data name=\"SpecialThanks\" xml:space=\"preserve\">\n    <value>Ringraziamenti Speciali</value>\n  </data>\n  <data name=\"SendMessageByEnter\" xml:space=\"preserve\">\n    <value>Invia con tasto invio</value>\n  </data>\n  <data name=\"PleaseNoteThatAnimatedBackgroundConsumesMoreBatteryResources\" xml:space=\"preserve\">\n    <value>Attenzione lo sfondo animato consuma più risorse di batteria</value>\n  </data>\n  <data name=\"Please go to chat to forward message\" xml:space=\"preserve\">\n    <value>Vai nella chat per inoltrare il messaggio</value>\n  </data>\n  <data name=\"SecretChatCaption\" xml:space=\"preserve\">\n    <value>Hai invitato {0} a unirsi ad una chat segreta.</value>\n  </data>\n  <data name=\"SecretChat\" xml:space=\"preserve\">\n    <value>Chat segreta</value>\n  </data>\n  <data name=\"UseEntToEndEncryption\" xml:space=\"preserve\">\n    <value>Crittografia end-to-end</value>\n  </data>\n  <data name=\"LeaveNoTraceOnOurServers\" xml:space=\"preserve\">\n    <value>Nessuna traccia sui server</value>\n  </data>\n  <data name=\"HaveASelfDestructTimer\" xml:space=\"preserve\">\n    <value>Timer di autodistruzione</value>\n  </data>\n  <data name=\"SecretChats\" xml:space=\"preserve\">\n    <value>Chat segrete</value>\n  </data>\n  <data name=\"DoNotAllowForwarding\" xml:space=\"preserve\">\n    <value>Nessun inoltro</value>\n  </data>\n  <data name=\"WaitingForUserToGetOnline\" xml:space=\"preserve\">\n    <value>Attendo che {0} si colleghi</value>\n  </data>\n  <data name=\"SelfDestructTimer\" xml:space=\"preserve\">\n    <value>Timer di autodistruzione</value>\n  </data>\n  <data name=\"EncryptionKey\" xml:space=\"preserve\">\n    <value>Chiave di crittografia</value>\n  </data>\n  <data name=\"EncryptionKeyDescription1\" xml:space=\"preserve\">\n    <value>L'immagine è una rappresentazione della chiave di crittografia di questa chat segreta con {0}.</value>\n  </data>\n  <data name=\"EncryptionKeyDescription2\" xml:space=\"preserve\">\n    <value>Se questa immagine è uguale sul telefono di {0}, la chat è sicura al 200%.</value>\n  </data>\n  <data name=\"LearnMoreAt\" xml:space=\"preserve\">\n    <value>Per ulteriori informazioni </value>\n  </data>\n  <data name=\"TelegramWebsite\" xml:space=\"preserve\">\n    <value>Telegram.org</value>\n  </data>\n  <data name=\"LastSeenAtDate\" xml:space=\"preserve\">\n    <value>Ultimo accesso {0} alle {1}</value>\n  </data>\n  <data name=\"LastSeenJustNow\" xml:space=\"preserve\">\n    <value>Ultimo accesso adesso</value>\n  </data>\n  <data name=\"SecretChatsDescription\" xml:space=\"preserve\">\n    <value>Le chat segrete: \n• Crittografia end-to-end \n• Nessuna traccia sui server \n• Timer di autodistruzione \n• Nessun inoltro</value>\n  </data>\n  <data name=\"Audio\" xml:space=\"preserve\">\n    <value>Audio</value>\n  </data>\n  <data name=\"IncognitoMode\" xml:space=\"preserve\">\n    <value>Modalità incognita</value>\n  </data>\n  <data name=\"TelegramNotifications\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"Invisible\" xml:space=\"preserve\">\n    <value>Invisible</value>\n  </data>\n  <data name=\"SecretChatDiscarded\" xml:space=\"preserve\">\n    <value>Chat segreta eliminata</value>\n  </data>\n  <data name=\"SecretChatCreated\" xml:space=\"preserve\">\n    <value>Chat segreta creata</value>\n  </data>\n  <data name=\"EmptySecretChat\" xml:space=\"preserve\">\n    <value>Chat segreta vuota</value>\n  </data>\n  <data name=\"MessageActionSetMessageTTL\" xml:space=\"preserve\">\n    <value>{0} ha impostato il timer di autodistruzione a {1}</value>\n  </data>\n  <data name=\"MessageActionYouSetMessageTTL\" xml:space=\"preserve\">\n    <value>Hai impostato il timer di autodistruzione a {0}</value>\n  </data>\n  <data name=\"MessageActionDisableMessageTTL\" xml:space=\"preserve\">\n    <value>{0} ha disattivato il timer di autodistruzione</value>\n  </data>\n  <data name=\"MessageActionYouDisableMessageTTL\" xml:space=\"preserve\">\n    <value>Hai disattivato il timer di autodistruzione</value>\n  </data>\n  <data name=\"PleaseWait\" xml:space=\"preserve\">\n    <value>Attendere prego...</value>\n  </data>\n  <data name=\"SecretChatCaption2\" xml:space=\"preserve\">\n    <value>{0} ti ha invitato ad unirti ad una chat segreta</value>\n  </data>\n  <data name=\"YouJoinedTheSecretChat\" xml:space=\"preserve\">\n    <value>Ti sei unito alla chat segreta</value>\n  </data>\n  <data name=\"UserJoinedYourSecretChat\" xml:space=\"preserve\">\n    <value>{0} si è unito alla tua chat segreta</value>\n  </data>\n  <data name=\"AddContact\" xml:space=\"preserve\">\n    <value>Aggiungi</value>\n  </data>\n  <data name=\"DeleteContact\" xml:space=\"preserve\">\n    <value>Elimina</value>\n  </data>\n  <data name=\"ConfirmDeleteContact\" xml:space=\"preserve\">\n    <value>Elimina contatto?</value>\n  </data>\n  <data name=\"RegistrationProblemDescription\" xml:space=\"preserve\">\n    <value>Se hai un qualsiasi problema col processo di registrazione o col login del tuo account, per favore contattaci a </value>\n  </data>\n  <data name=\"RegistrationProblemEmail\" xml:space=\"preserve\">\n    <value>sms@telegram.org</value>\n  </data>\n  <data name=\"ChooseYourCountry\" xml:space=\"preserve\">\n    <value>Seleziona il tuo Paese</value>\n  </data>\n  <data name=\"AskAVolunteer\" xml:space=\"preserve\">\n    <value>Chiedi a un volontario</value>\n  </data>\n  <data name=\"PinToStart\" xml:space=\"preserve\">\n    <value>Aggiungi a start</value>\n  </data>\n  <data name=\"TerminateAllSessions\" xml:space=\"preserve\">\n    <value>Termina le altre sessioni</value>\n  </data>\n  <data name=\"TerminateAllSessionsConfirmation\" xml:space=\"preserve\">\n    <value>Chiudere tutte le altre sessioni?</value>\n  </data>\n  <data name=\"SlideToCancel\" xml:space=\"preserve\">\n    <value>Annulla</value>\n  </data>\n  <data name=\"Terminate\" xml:space=\"preserve\">\n    <value>Termina</value>\n  </data>\n  <data name=\"TapAndHoldToRecord\" xml:space=\"preserve\">\n    <value>Tieni premuto per registrare</value>\n  </data>\n  <data name=\"NewBroadcastList\" xml:space=\"preserve\">\n    <value>Nuova lista broadcast</value>\n  </data>\n  <data name=\"AddUserToTheGroup\" xml:space=\"preserve\">\n    <value>Aggiungere {0} al gruppo \"{1}\"?</value>\n  </data>\n  <data name=\"NumberOfForwardingMessages\" xml:space=\"preserve\">\n    <value>Numero di ultimi messaggi da inoltrare</value>\n  </data>\n  <data name=\"AddToContacts\" xml:space=\"preserve\">\n    <value>Aggiungi ai contatti</value>\n  </data>\n  <data name=\"ShareMyContactInfo\" xml:space=\"preserve\">\n    <value>Condividi info contatto</value>\n  </data>\n  <data name=\"Cache\" xml:space=\"preserve\">\n    <value>Cache</value>\n  </data>\n  <data name=\"ClearCache\" xml:space=\"preserve\">\n    <value>Vuota la cache</value>\n  </data>\n  <data name=\"ManagingLocalCache\" xml:space=\"preserve\">\n    <value>Gestisci la cache locale</value>\n  </data>\n  <data name=\"Calculating\" xml:space=\"preserve\">\n    <value>Calcolando</value>\n  </data>\n  <data name=\"SaveFileMessage\" xml:space=\"preserve\">\n    <value>Questo file è stato salvato con successo</value>\n  </data>\n  <data name=\"SocialNetworks\" xml:space=\"preserve\">\n    <value>Social network</value>\n  </data>\n  <data name=\"Sms\" xml:space=\"preserve\">\n    <value>Sms</value>\n  </data>\n  <data name=\"Email\" xml:space=\"preserve\">\n    <value>Email</value>\n  </data>\n  <data name=\"Set\" xml:space=\"preserve\">\n    <value>Imposta</value>\n  </data>\n  <data name=\"SearchAmongYourContacts\" xml:space=\"preserve\">\n    <value>Cerca tra i tuoi contatti</value>\n  </data>\n  <data name=\"Connecting\" xml:space=\"preserve\">\n    <value>Connetto</value>\n  </data>\n  <data name=\"SetProfilePhoto\" xml:space=\"preserve\">\n    <value>Imposta foto profilo</value>\n  </data>\n  <data name=\"BatterySaverModeAlert\" xml:space=\"preserve\">\n    <value>Il tuo dispositivo è in modalità Risparmia Batteria. Non riceverai le notifiche di Telegram quando questa modalità è attiva. Per favore, disabilità il Risparmio Batteria.</value>\n  </data>\n  <data name=\"Warning\" xml:space=\"preserve\">\n    <value>Attenzione</value>\n  </data>\n  <data name=\"NoInternetConnection\" xml:space=\"preserve\">\n    <value>Nessuna connessione internet</value>\n  </data>\n  <data name=\"Updating\" xml:space=\"preserve\">\n    <value>Aggiorno</value>\n  </data>\n  <data name=\"SetUsername\" xml:space=\"preserve\">\n    <value>Imposta username</value>\n  </data>\n  <data name=\"Username\" xml:space=\"preserve\">\n    <value>Username</value>\n  </data>\n  <data name=\"ServerError\" xml:space=\"preserve\">\n    <value>Errore server</value>\n  </data>\n  <data name=\"ServerErrorMessage\" xml:space=\"preserve\">\n    <value>Errore interno del server. Per favore riprova tra poco.</value>\n  </data>\n  <data name=\"UsernameDescription\" xml:space=\"preserve\">\n    <value>Puoi scegliere un username su Telegram. Se lo fai, le altre persone potranno trovarti tramite questo username e contattarti senza conoscere il tuo numero di telefono.\n\nPuoi usare a-z, 0-9 e underscore. La lunghezza minima è di 5 caratteri.</value>\n  </data>\n  <data name=\"UsernameOccupied\" xml:space=\"preserve\">\n    <value>Spiacenti, questo username è già stato preso.</value>\n  </data>\n  <data name=\"UsernameInvalid\" xml:space=\"preserve\">\n    <value>Spiacenti, questo username non valido.</value>\n  </data>\n  <data name=\"WaitingForNetwork\" xml:space=\"preserve\">\n    <value>In attesa della rete</value>\n  </data>\n  <data name=\"GlobalSearch\" xml:space=\"preserve\">\n    <value>Ricerca globale</value>\n  </data>\n  <data name=\"UsernameShort\" xml:space=\"preserve\">\n    <value>Un username deve avere almeno 5 caratteri.</value>\n  </data>\n  <data name=\"UsernameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Spiacenti, un username non può iniziare con un numero.</value>\n  </data>\n  <data name=\"SelectChat\" xml:space=\"preserve\">\n    <value>Seleziona chat</value>\n  </data>\n  <data name=\"MaximumFileSizeExceeded\" xml:space=\"preserve\">\n    <value>Dimensione massima superata. Puoi inviare file fino a {0}.</value>\n  </data>\n  <data name=\"UnableToAccessDocument\" xml:space=\"preserve\">\n    <value>Impossibile accedere a questo file. Per favore seleziona un altro file da caricare.</value>\n  </data>\n  <data name=\"Camcorder\" xml:space=\"preserve\">\n    <value>Videocamera</value>\n  </data>\n  <data name=\"CompressVideo\" xml:space=\"preserve\">\n    <value>Comprimi video</value>\n  </data>\n  <data name=\"EditedVideo\" xml:space=\"preserve\">\n    <value>Video modificato</value>\n  </data>\n  <data name=\"EditVideo\" xml:space=\"preserve\">\n    <value>Modifica video</value>\n  </data>\n  <data name=\"OriginalVideo\" xml:space=\"preserve\">\n    <value>Video originale</value>\n  </data>\n  <data name=\"AccountSelfDestrucsDescription\" xml:space=\"preserve\">\n    <value>Se non ti connetti almeno una volta in questo periodo, il tuo account verrà eliminato insieme a tutti i gruppi, i messaggi e i contatti.</value>\n  </data>\n  <data name=\"AccountSelfDestructs\" xml:space=\"preserve\">\n    <value>Autodistruzione account</value>\n  </data>\n  <data name=\"AddExceptions\" xml:space=\"preserve\">\n    <value>Aggiungi eccezioni</value>\n  </data>\n  <data name=\"AlwaysShare\" xml:space=\"preserve\">\n    <value>Condividi sempre</value>\n  </data>\n  <data name=\"AlwaysShareWirhUsers\" xml:space=\"preserve\">\n    <value>Condividi con gli utenti</value>\n  </data>\n  <data name=\"AlwaysShareWith\" xml:space=\"preserve\">\n    <value>Condividi sempre con</value>\n  </data>\n  <data name=\"CodecWasNotFound\" xml:space=\"preserve\">\n    <value>Codec non trovato</value>\n  </data>\n  <data name=\"Everybody\" xml:space=\"preserve\">\n    <value>Tutti</value>\n  </data>\n  <data name=\"IfYouAreAwayFor\" xml:space=\"preserve\">\n    <value>Se lontano per</value>\n  </data>\n  <data name=\"LastSeenDescription\" xml:space=\"preserve\">\n    <value>Chi può vedere il tuo Ultimo Accesso?</value>\n  </data>\n  <data name=\"LastSeenImportantNote\" xml:space=\"preserve\">\n    <value>Importante: non potrai vedere l'ultimo accesso delle persone con cui non condividi l'ultimo accesso. Verrà mostrato un orario approssimativo (di recente, entro una settimana, entro un mese).</value>\n  </data>\n  <data name=\"LastSeenLongTimeAgo\" xml:space=\"preserve\">\n    <value>Ultimo accesso molto tempo fa</value>\n  </data>\n  <data name=\"LastSeenRecently\" xml:space=\"preserve\">\n    <value>Ultimo accesso di recente</value>\n  </data>\n  <data name=\"LastSeenWithinMonth\" xml:space=\"preserve\">\n    <value>Ultimo accesso entro un mese</value>\n  </data>\n  <data name=\"LastSeenWithinWeek\" xml:space=\"preserve\">\n    <value>Ultimo accesso entro una settimana</value>\n  </data>\n  <data name=\"MyContacts\" xml:space=\"preserve\">\n    <value>I miei contatti</value>\n  </data>\n  <data name=\"NeverShare\" xml:space=\"preserve\">\n    <value>Non condividere</value>\n  </data>\n  <data name=\"NeverShareWith\" xml:space=\"preserve\">\n    <value>Non condividere con</value>\n  </data>\n  <data name=\"NeverShareWithUsers\" xml:space=\"preserve\">\n    <value>Non condividere con gli utenti...</value>\n  </data>\n  <data name=\"Nobody\" xml:space=\"preserve\">\n    <value>Nessuno</value>\n  </data>\n  <data name=\"PrivacyAndSecurity\" xml:space=\"preserve\">\n    <value>Privacy e sicurezza</value>\n  </data>\n  <data name=\"PrivacySettingsError\" xml:space=\"preserve\">\n    <value>Spiacenti, troppe richieste. Impossibile cambiare le impostazioni di privacy ora, attendi.</value>\n  </data>\n  <data name=\"ProfileIsInvalid\" xml:space=\"preserve\">\n    <value>Profilo di codifica video non valido</value>\n  </data>\n  <data name=\"SettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Queste impostazioni annulleranno i valori precedenti.</value>\n  </data>\n  <data name=\"UnknownFailure\" xml:space=\"preserve\">\n    <value>Errore sconosciuto</value>\n  </data>\n  <data name=\"LastSeenShort\" xml:space=\"preserve\">\n    <value>Ultimo accesso</value>\n  </data>\n  <data name=\"PrivacySecuritySubtitle\" xml:space=\"preserve\">\n    <value>Utenti bloccati, ultimo accesso, sessioni</value>\n  </data>\n  <data name=\"MonthGenitivePlural\" xml:space=\"preserve\">\n    <value>Mesi</value>\n  </data>\n  <data name=\"MonthGenitiveSingular\" xml:space=\"preserve\">\n    <value>Mese</value>\n  </data>\n  <data name=\"MonthNominativePlural\" xml:space=\"preserve\">\n    <value>Mesi</value>\n  </data>\n  <data name=\"MonthNominativeSingular\" xml:space=\"preserve\">\n    <value>Mese</value>\n  </data>\n  <data name=\"YearGenitivePlural\" xml:space=\"preserve\">\n    <value>Anni</value>\n  </data>\n  <data name=\"YearGenitiveSingular\" xml:space=\"preserve\">\n    <value>Anno</value>\n  </data>\n  <data name=\"YearNominativePlural\" xml:space=\"preserve\">\n    <value>Anni</value>\n  </data>\n  <data name=\"YearNominativeSingular\" xml:space=\"preserve\">\n    <value>Anno</value>\n  </data>\n  <data name=\"LastSeenDescription2\" xml:space=\"preserve\">\n    <value>Chi può vedere il tuo Ultimo Accesso?</value>\n  </data>\n  <data name=\"CheckingUsername\" xml:space=\"preserve\">\n    <value>Controllo l'username...</value>\n  </data>\n  <data name=\"CantFindContactWithUsername\" xml:space=\"preserve\">\n    <value>Non riesco a trovare un utente Telegram con l'username @{0}</value>\n  </data>\n  <data name=\"Compressing\" xml:space=\"preserve\">\n    <value>Comprimo</value>\n  </data>\n  <data name=\"PeopleHubIntegration\" xml:space=\"preserve\">\n    <value>Sincronizza coi Contatti</value>\n  </data>\n  <data name=\"SyncContactsProgress\" xml:space=\"preserve\">\n    <value>Sincronizzazione contatti ({0} di {1})...</value>\n  </data>\n  <data name=\"DeletingContacts\" xml:space=\"preserve\">\n    <value>Elimino contatti...</value>\n  </data>\n  <data name=\"ChangeNumber\" xml:space=\"preserve\">\n    <value>Cambia numero</value>\n  </data>\n  <data name=\"ConfirmNewNumberMessage\" xml:space=\"preserve\">\n    <value>Invieremo un SMS con un codice di conferma al tuo nuovo numero.</value>\n  </data>\n  <data name=\"NewNumber\" xml:space=\"preserve\">\n    <value>Nuovo numero</value>\n  </data>\n  <data name=\"NewNumberConfirmation\" xml:space=\"preserve\">\n    <value>Tutti i tuoi contatti Telegram avranno il tuo nuovo numero tra i loro contatti, purché abbiano il tuo vecchio numero e tu non li abbia bloccati su Telegram.</value>\n  </data>\n  <data name=\"NewNumberDescription\" xml:space=\"preserve\">\n    <value>Puoi cambiare il tuo numero di telefono qui. Il tuo account e tutti i tuoi dati cloud — messaggi, file, contatti, etc. saranno trasferiti sul nuovo numero.\n\nImportante: a tutti i tuoi contatti di Telegram verrà aggiunto il tuo nuovo numero ai contatti, purché abbiano il tuo vecchio numero e tu non li abbia bloccati su Telegram.</value>\n  </data>\n  <data name=\"NewNumberTaken\" xml:space=\"preserve\">\n    <value>Il numero {0} è già connesso a un account Telegram. Per favore elimina quell'account prima di migrare ad un nuovo numero.</value>\n  </data>\n  <data name=\"MessageActionScreenshotMessages\" xml:space=\"preserve\">\n    <value>{0} ha fatto uno screenshot!</value>\n  </data>\n  <data name=\"MessageActionYouScreenshotMessages\" xml:space=\"preserve\">\n    <value>Hai fatto uno screenshot!</value>\n  </data>\n  <data name=\"DayGenitivePlural\" xml:space=\"preserve\">\n    <value>Giorni</value>\n  </data>\n  <data name=\"DayGenitiveSingular\" xml:space=\"preserve\">\n    <value>Giorno</value>\n  </data>\n  <data name=\"DayNominativePlural\" xml:space=\"preserve\">\n    <value>Giorni</value>\n  </data>\n  <data name=\"DayNominativeSingular\" xml:space=\"preserve\">\n    <value>Giorno</value>\n  </data>\n  <data name=\"HourGenitivePlural\" xml:space=\"preserve\">\n    <value>Ore</value>\n  </data>\n  <data name=\"HourGenitiveSingular\" xml:space=\"preserve\">\n    <value>Ora</value>\n  </data>\n  <data name=\"HourNominativePlural\" xml:space=\"preserve\">\n    <value>Ore</value>\n  </data>\n  <data name=\"HourNominativeSingular\" xml:space=\"preserve\">\n    <value>Ora</value>\n  </data>\n  <data name=\"MinuteNominativePlural\" xml:space=\"preserve\">\n    <value>Minuti</value>\n  </data>\n  <data name=\"MinuteNominativeSingular\" xml:space=\"preserve\">\n    <value>Minuto</value>\n  </data>\n  <data name=\"SecondGenitivePlural\" xml:space=\"preserve\">\n    <value>Secondi</value>\n  </data>\n  <data name=\"SecondGenitiveSingular\" xml:space=\"preserve\">\n    <value>Secondo</value>\n  </data>\n  <data name=\"SecondNominativePlural\" xml:space=\"preserve\">\n    <value>Secondi</value>\n  </data>\n  <data name=\"SecondNominativeSingular\" xml:space=\"preserve\">\n    <value>Secondo</value>\n  </data>\n  <data name=\"WeekGenitivePlural\" xml:space=\"preserve\">\n    <value>Settimane</value>\n  </data>\n  <data name=\"WeekGenitiveSingular\" xml:space=\"preserve\">\n    <value>Settimana</value>\n  </data>\n  <data name=\"WeekNominativePlural\" xml:space=\"preserve\">\n    <value>Settimane</value>\n  </data>\n  <data name=\"WeekNominativeSingular\" xml:space=\"preserve\">\n    <value>Settimana</value>\n  </data>\n  <data name=\"TapAndHoldToView\" xml:space=\"preserve\">\n    <value>Tieni premuto per vedere</value>\n  </data>\n  <data name=\"Sticker\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"Files\" xml:space=\"preserve\">\n    <value>File</value>\n  </data>\n  <data name=\"NoFilesHere\" xml:space=\"preserve\">\n    <value>Nessun file qui</value>\n  </data>\n  <data name=\"ShareFiles\" xml:space=\"preserve\">\n    <value>Puoi inviare e ricevere file di ogni tipo fino a 1.5GB e accedervi dovunque.</value>\n  </data>\n  <data name=\"SharePhotosAndVideos\" xml:space=\"preserve\">\n    <value>Nessun media.\n\nCondividi foto e video in questa chat — o questa graffetta rimarrà triste.</value>\n  </data>\n  <data name=\"Disabled\" xml:space=\"preserve\">\n    <value>Disabilitati</value>\n  </data>\n  <data name=\"Enabled\" xml:space=\"preserve\">\n    <value>Abilitati</value>\n  </data>\n  <data name=\"MuteFor\" xml:space=\"preserve\">\n    <value>Silenzia per {0}</value>\n  </data>\n  <data name=\"UnmuteIn\" xml:space=\"preserve\">\n    <value>tra {0}</value>\n  </data>\n  <data name=\"More\" xml:space=\"preserve\">\n    <value>Più</value>\n  </data>\n  <data name=\"SearchAmongYourChats\" xml:space=\"preserve\">\n    <value>Cerca tra le tue chat</value>\n  </data>\n  <data name=\"SearchAmongYourFiles\" xml:space=\"preserve\">\n    <value>Cerca tra i file condivisi</value>\n  </data>\n  <data name=\"NewAuthorization\" xml:space=\"preserve\">\n    <value>{0},\nAbbiamo rilevato un accesso al tuo account da un nuovo dispositivo {1}, {2} alle {3}\n\nDispositivo: {4}\nPosizione: {5}\n\nSe non sei tu, puoi andare nelle Impostazioni – Privacy e Sicurezza – Termina le altre sessioni. \n\nCordiali saluti, \nil team di Telegram</value>\n  </data>\n  <data name=\"Link\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"ContactRegistered\" xml:space=\"preserve\">\n    <value>{0} si è unito a Telegram</value>\n  </data>\n  <data name=\"UnreadMessages\" xml:space=\"preserve\">\n    <value>Messaggi non letti</value>\n  </data>\n  <data name=\"ChangePasscode\" xml:space=\"preserve\">\n    <value>Cambia codice</value>\n  </data>\n  <data name=\"ChangePasscodeHint\" xml:space=\"preserve\">\n    <value>Quando imposti un codice, apparirà un'icona col lucchetto nella pagina delle chat. Premila per bloccare e sbloccare l'app. \n\nNota: se ti dimentichi il codice, dovrai disinstallare e reinstallare l'app. Tutte le chat segrete verranno perse.</value>\n  </data>\n  <data name=\"ConfirmPasscode\" xml:space=\"preserve\">\n    <value>Conferma codice</value>\n  </data>\n  <data name=\"EnterPasscode\" xml:space=\"preserve\">\n    <value>Inserisci il tuo codice</value>\n  </data>\n  <data name=\"Passcode\" xml:space=\"preserve\">\n    <value>Codice di blocco</value>\n  </data>\n  <data name=\"SimplePasscode\" xml:space=\"preserve\">\n    <value>Codice semplice</value>\n  </data>\n  <data name=\"SimplePasscodeHint\" xml:space=\"preserve\">\n    <value>Un codice semplice è un numero a 4 cifre.</value>\n  </data>\n  <data name=\"YourPasscode\" xml:space=\"preserve\">\n    <value>Nuovo codice</value>\n  </data>\n  <data name=\"EnterYourCurrentPasscode\" xml:space=\"preserve\">\n    <value>Inserisci il tuo codice</value>\n  </data>\n  <data name=\"PasscodeType\" xml:space=\"preserve\">\n    <value>Tipo di codice</value>\n  </data>\n  <data name=\"Pin\" xml:space=\"preserve\">\n    <value>PIN</value>\n  </data>\n  <data name=\"Privacy\" xml:space=\"preserve\">\n    <value>Privacy</value>\n  </data>\n  <data name=\"Security\" xml:space=\"preserve\">\n    <value>Sicurezza</value>\n  </data>\n  <data name=\"YouHaveNewMessage\" xml:space=\"preserve\">\n    <value>Hai un nuovo messaggi</value>\n  </data>\n  <data name=\"PasscodeAutolockHint\" xml:space=\"preserve\">\n    <value>Richiedi codice se lontano per del tempo.</value>\n  </data>\n  <data name=\"PasscodeAutolockIn\" xml:space=\"preserve\">\n    <value>tra {0}</value>\n  </data>\n  <data name=\"Autolock\" xml:space=\"preserve\">\n    <value>Blocco automatico</value>\n  </data>\n  <data name=\"AutolockDisabled\" xml:space=\"preserve\">\n    <value>Disabilitato</value>\n  </data>\n  <data name=\"IncorrectPasscode\" xml:space=\"preserve\">\n    <value>Codice errato</value>\n  </data>\n  <data name=\"Reply\" xml:space=\"preserve\">\n    <value>Rispondi</value>\n  </data>\n  <data name=\"AndOthers\" xml:space=\"preserve\">\n    <value>E altri {0}</value>\n  </data>\n  <data name=\"ForwardedAudioGenitivePlural\" xml:space=\"preserve\">\n    <value>Audio inoltrati</value>\n  </data>\n  <data name=\"ForwardedAudioGenitiveSingular\" xml:space=\"preserve\">\n    <value>Audio inoltrato</value>\n  </data>\n  <data name=\"ForwardedAudioNominativePlural\" xml:space=\"preserve\">\n    <value>Audio inoltrati</value>\n  </data>\n  <data name=\"ForwardedAudioNominativeSingular\" xml:space=\"preserve\">\n    <value>Audio inoltrato</value>\n  </data>\n  <data name=\"ForwardedContactGenitivePlural\" xml:space=\"preserve\">\n    <value>Contatti inoltrati</value>\n  </data>\n  <data name=\"ForwardedContactGenitiveSingular\" xml:space=\"preserve\">\n    <value>Contatto inoltrato</value>\n  </data>\n  <data name=\"ForwardedContactNominativePlural\" xml:space=\"preserve\">\n    <value>Contatti inoltrati</value>\n  </data>\n  <data name=\"ForwardedContactNominativeSingular\" xml:space=\"preserve\">\n    <value>Contatto inoltrato</value>\n  </data>\n  <data name=\"ForwardedFileGenitivePlural\" xml:space=\"preserve\">\n    <value>File inoltrati</value>\n  </data>\n  <data name=\"ForwardedFileGenitiveSingular\" xml:space=\"preserve\">\n    <value>File inoltrato</value>\n  </data>\n  <data name=\"ForwardedFileNominativePlural\" xml:space=\"preserve\">\n    <value>File inoltrati</value>\n  </data>\n  <data name=\"ForwardedFileNominativeSingular\" xml:space=\"preserve\">\n    <value>File inoltrato</value>\n  </data>\n  <data name=\"ForwardedLocationGenitivePlural\" xml:space=\"preserve\">\n    <value>Posizioni inoltrate</value>\n  </data>\n  <data name=\"ForwardedLocationGenitiveSingular\" xml:space=\"preserve\">\n    <value>Posizione inoltrata</value>\n  </data>\n  <data name=\"ForwardedLocationNominativePlural\" xml:space=\"preserve\">\n    <value>Posizioni inoltrate</value>\n  </data>\n  <data name=\"ForwardedLocationNominativeSingular\" xml:space=\"preserve\">\n    <value>Posizione inoltrata</value>\n  </data>\n  <data name=\"ForwardedMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Messaggi inoltrati</value>\n  </data>\n  <data name=\"ForwardedMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Messaggio inoltrato</value>\n  </data>\n  <data name=\"ForwardedMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Messaggi inoltrati</value>\n  </data>\n  <data name=\"ForwardedMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Messaggio inoltrato</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Foto inoltrate</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Foto inoltrata</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Foto inoltrate</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Foto inoltrata</value>\n  </data>\n  <data name=\"ForwardedStickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Sticker inoltrati</value>\n  </data>\n  <data name=\"ForwardedStickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Sticker inoltrato</value>\n  </data>\n  <data name=\"ForwardedStickerNominativePlural\" xml:space=\"preserve\">\n    <value>Sticker inoltrati</value>\n  </data>\n  <data name=\"ForwardedStickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Sticker inoltrato</value>\n  </data>\n  <data name=\"ForwardedVideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Video inoltrati</value>\n  </data>\n  <data name=\"ForwardedVideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Video inoltrato</value>\n  </data>\n  <data name=\"ForwardedVideoNominativePlural\" xml:space=\"preserve\">\n    <value>Video inoltrati</value>\n  </data>\n  <data name=\"ForwardedVideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Video inoltrato</value>\n  </data>\n  <data name=\"SearchMessages\" xml:space=\"preserve\">\n    <value>Cerca messaggi</value>\n  </data>\n  <data name=\"Unsupported\" xml:space=\"preserve\">\n    <value>Non supportato</value>\n  </data>\n  <data name=\"EnterYourCurrentPassword\" xml:space=\"preserve\">\n    <value>Inserisci la tua password corrente</value>\n  </data>\n  <data name=\"Password\" xml:space=\"preserve\">\n    <value>Password</value>\n  </data>\n  <data name=\"PasswordInvalidString\" xml:space=\"preserve\">\n    <value>Password non valida. Per favore riprova.</value>\n  </data>\n  <data name=\"AlmostThere\" xml:space=\"preserve\">\n    <value>Ci siamo quasi!</value>\n  </data>\n  <data name=\"ChangePassword\" xml:space=\"preserve\">\n    <value>Cambia password</value>\n  </data>\n  <data name=\"ChangePasswordHint\" xml:space=\"preserve\">\n    <value>Puoi impostare una password che ti verrà richiesta quando ti connetti da un nuovo dispositivo in aggiunta al codice che riceverai via SMS.</value>\n  </data>\n  <data name=\"ChangeRecoveryEmail\" xml:space=\"preserve\">\n    <value>Cambia e-mail di recupero</value>\n  </data>\n  <data name=\"CompletePasswordHint\" xml:space=\"preserve\">\n    <value>Controlla la tua e-mail (anche lo spam) per completare la configurazione della verifica in due passaggi</value>\n  </data>\n  <data name=\"ConfirmPassword\" xml:space=\"preserve\">\n    <value>Reinserisci la tua password</value>\n  </data>\n  <data name=\"EnterPassword\" xml:space=\"preserve\">\n    <value>Inserisci la tua password</value>\n  </data>\n  <data name=\"EnterRecoveryEmail\" xml:space=\"preserve\">\n    <value>Inserisci la tua e-mail</value>\n  </data>\n  <data name=\"EnterRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>Inserisci un'e-mail valida. È l'unico modo per recuperare una password dimenticata.</value>\n  </data>\n  <data name=\"RecoveryEmail\" xml:space=\"preserve\">\n    <value>E-mail di recupero</value>\n  </data>\n  <data name=\"SetRecoveryEmail\" xml:space=\"preserve\">\n    <value>Imposta e-mail di recupero</value>\n  </data>\n  <data name=\"Skip\" xml:space=\"preserve\">\n    <value>Salta</value>\n  </data>\n  <data name=\"SkipRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>No, seriamente.\n\nSe dimentichi la tua password, perderai l'accesso al tuo account Telegram. Non ci sarà modo di ripristinarlo.</value>\n  </data>\n  <data name=\"TwoStepVerification\" xml:space=\"preserve\">\n    <value>Verifica in due passaggi</value>\n  </data>\n  <data name=\"YourPassword\" xml:space=\"preserve\">\n    <value>La tua password</value>\n  </data>\n  <data name=\"CurrentSession\" xml:space=\"preserve\">\n    <value>Sessione attuale</value>\n  </data>\n  <data name=\"OtherSessions\" xml:space=\"preserve\">\n    <value>Altre sessioni</value>\n  </data>\n  <data name=\"OfficialApp\" xml:space=\"preserve\">\n    <value>App ufficiale</value>\n  </data>\n  <data name=\"Sessions\" xml:space=\"preserve\">\n    <value>Sessioni attive</value>\n  </data>\n  <data name=\"TerminateAllOtherSessionsNote\" xml:space=\"preserve\">\n    <value>Esce da tutti i dispositivi tranne questo</value>\n  </data>\n  <data name=\"UnofficialApp\" xml:space=\"preserve\">\n    <value>App non ufficiale</value>\n  </data>\n  <data name=\"EmailInvalid\" xml:space=\"preserve\">\n    <value>E-mail non valida.</value>\n  </data>\n  <data name=\"PasswordActive\" xml:space=\"preserve\">\n    <value>La password per la verifica in due passaggi è ora attiva.</value>\n  </data>\n  <data name=\"Success\" xml:space=\"preserve\">\n    <value>Fatto!</value>\n  </data>\n  <data name=\"RecoveryEmailPending\" xml:space=\"preserve\">\n    <value>La tua e-mail di recupero {0} non è ancora attiva e attende la conferma.</value>\n  </data>\n  <data name=\"AbortTwoStepVerificationSetup\" xml:space=\"preserve\">\n    <value>Annulla configurazione verifica in due passaggi</value>\n  </data>\n  <data name=\"StepsToCompleteToTwoStepsVerificationSetup\" xml:space=\"preserve\">\n    <value>Per favore segui questi step per completare la configurazione della verifica in due passaggi\n\n1. Controlla la tua e-mail (anche lo spam) {0}\n\n2. Clicca sul link di conferma.</value>\n  </data>\n  <data name=\"Hint\" xml:space=\"preserve\">\n    <value>Suggerimento</value>\n  </data>\n  <data name=\"PasswordHint\" xml:space=\"preserve\">\n    <value>Suggerimento password</value>\n  </data>\n  <data name=\"PasswordHintLabel\" xml:space=\"preserve\">\n    <value>Crea un suggerimento per la tua password</value>\n  </data>\n  <data name=\"ForgotPassword\" xml:space=\"preserve\">\n    <value>Password dimenticata?</value>\n  </data>\n  <data name=\"PasswordHintError\" xml:space=\"preserve\">\n    <value>Il suggerimento deve essere diverso dalla password</value>\n  </data>\n  <data name=\"EnterPasswordHint\" xml:space=\"preserve\">\n    <value>Inserisci il suggerimento per la password</value>\n  </data>\n  <data name=\"HavingTroubleAccessingEmailMessage\" xml:space=\"preserve\">\n    <value>Hai problemi ad accedere alla tua e-mail {0}?</value>\n  </data>\n  <data name=\"NoAccessRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Se non puoi ripristinare l'accesso alla tua e-mail, non ti resta che ricordarti la password o ripristinare il tuo account.</value>\n  </data>\n  <data name=\"NoRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Siccome non hai fornito un'email di recupero quando hai impostato la  tua password, non ti resta che ricordarti la password o ripristinare il tuo account.</value>\n  </data>\n  <data name=\"PasswordDeactivated\" xml:space=\"preserve\">\n    <value>Password disattivata</value>\n  </data>\n  <data name=\"PasswordMessage\" xml:space=\"preserve\">\n    <value>Hai attivato la verifica in due passaggi, così il tuo account è protetto con una password aggiuntiva.</value>\n  </data>\n  <data name=\"PasswordRecovery\" xml:space=\"preserve\">\n    <value>Recupero password</value>\n  </data>\n  <data name=\"PasswordRecoveryHint\" xml:space=\"preserve\">\n    <value>Controlla la tua e-mail e inserisci il codice a 6 cifre che ti abbiamo inviato.</value>\n  </data>\n  <data name=\"SentRecoveryCodeMessage\" xml:space=\"preserve\">\n    <value>Abbiamo inviato un codice di ripristino alla e-mail che ci hai fornito: {0}</value>\n  </data>\n  <data name=\"Sorry\" xml:space=\"preserve\">\n    <value>Spiacenti</value>\n  </data>\n  <data name=\"RecoveryEmailComplete\" xml:space=\"preserve\">\n    <value>Hai attivato la verifica in due passaggi.\nAvrai bisogno della password che hai impostato per accedere al tuo account Telegram.</value>\n  </data>\n  <data name=\"TerminateSessionHint\" xml:space=\"preserve\">\n    <value>Premi su una sessione per terminarla.</value>\n  </data>\n  <data name=\"GettingLinkInfo\" xml:space=\"preserve\">\n    <value>Recupero le info del link...</value>\n  </data>\n  <data name=\"ResetMyAccount\" xml:space=\"preserve\">\n    <value>Ripristina il mio account</value>\n  </data>\n  <data name=\"ResetMyAccountConfirmation\" xml:space=\"preserve\">\n    <value>Questa azione non può essere annullata.\n\nSe ripristini il tuo account, tutti i tuoi messaggi e le tue chat saranno eliminate.</value>\n  </data>\n  <data name=\"ResetMyAccountHint\" xml:space=\"preserve\">\n    <value>Perderai tutte le tue chat e i tuoi messaggi, insieme a ogni media e file condiviso,\nse procedi a ripristinare il tuo account.</value>\n  </data>\n  <data name=\"IsRecordingAudio\" xml:space=\"preserve\">\n    <value>Sta registrando un audio</value>\n  </data>\n  <data name=\"IsSendingFile\" xml:space=\"preserve\">\n    <value>Sta inviando un file</value>\n  </data>\n  <data name=\"IsSendingPhoto\" xml:space=\"preserve\">\n    <value>Sta inviando una foto</value>\n  </data>\n  <data name=\"IsSendingVideo\" xml:space=\"preserve\">\n    <value>Sta inviando un video</value>\n  </data>\n  <data name=\"RecordingAudio\" xml:space=\"preserve\">\n    <value>Sta registrando un audio</value>\n  </data>\n  <data name=\"SendingFile\" xml:space=\"preserve\">\n    <value>Sta inviando un file</value>\n  </data>\n  <data name=\"SendingPhoto\" xml:space=\"preserve\">\n    <value>Sta inviando una foto</value>\n  </data>\n  <data name=\"SendingVideo\" xml:space=\"preserve\">\n    <value>Sta inviando un video</value>\n  </data>\n  <data name=\"AddCaption\" xml:space=\"preserve\">\n    <value>Aggiungi una didascalia...</value>\n  </data>\n  <data name=\"CopyLink\" xml:space=\"preserve\">\n    <value>Copia link</value>\n  </data>\n  <data name=\"CopyLinkHint\" xml:space=\"preserve\">\n    <value>Link copiato negli appunti</value>\n  </data>\n  <data name=\"GroupFullError\" xml:space=\"preserve\">\n    <value>Spiacenti, questo gruppo è già pieno.</value>\n  </data>\n  <data name=\"GroupNotExistsError\" xml:space=\"preserve\">\n    <value>Spiacenti, sembra che questa chat non esista.</value>\n  </data>\n  <data name=\"InviteGroupViaLink\" xml:space=\"preserve\">\n    <value>Invita nel gruppo tramite link</value>\n  </data>\n  <data name=\"InviteLink\" xml:space=\"preserve\">\n    <value>Link d'invito</value>\n  </data>\n  <data name=\"InviteLinkHint\" xml:space=\"preserve\">\n    <value>Chiunque abbia Telegram installato, potrà aggiungersi al tuo gruppo aprendo questo link.</value>\n  </data>\n  <data name=\"JoinGroupConfirmation\" xml:space=\"preserve\">\n    <value>Vuoi unirti al gruppo '{0}'?</value>\n  </data>\n  <data name=\"MessageActionChatJoinedByLink\" xml:space=\"preserve\">\n    <value>{0} si è unito al gruppo tramite link d'invito.</value>\n  </data>\n  <data name=\"RevokeLink\" xml:space=\"preserve\">\n    <value>Revoca link</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler revocare questo link? Una volta fatto, nessuno potrà unirsi al gruppo utilizzandolo.</value>\n  </data>\n  <data name=\"RevokeLinkHint\" xml:space=\"preserve\">\n    <value>Il precedente link d'invito è ora inattivo. Ne è stato creato uno nuovo.</value>\n  </data>\n  <data name=\"ShareLink\" xml:space=\"preserve\">\n    <value>Condividi link</value>\n  </data>\n  <data name=\"Directions\" xml:space=\"preserve\">\n    <value>Direzioni</value>\n  </data>\n  <data name=\"NearbyPlaces\" xml:space=\"preserve\">\n    <value>Luoghi nelle vicinanze</value>\n  </data>\n  <data name=\"SendThisLocation\" xml:space=\"preserve\">\n    <value>Invia la mia posizione</value>\n  </data>\n  <data name=\"PoweredBy\" xml:space=\"preserve\">\n    <value>Powered by</value>\n  </data>\n  <data name=\"LocationServicesDisabled\" xml:space=\"preserve\">\n    <value>I servizi di posizione del tuo telefono sono disattivati.</value>\n  </data>\n  <data name=\"LocationSettings\" xml:space=\"preserve\">\n    <value>Impostazioni di posizione</value>\n  </data>\n  <data name=\"Unknown\" xml:space=\"preserve\">\n    <value>Sconosciuto</value>\n  </data>\n  <data name=\"AddStickersConfirmation\" xml:space=\"preserve\">\n    <value>Vuoi aggiungere gli sticker '{0}'?</value>\n  </data>\n  <data name=\"NewStickersAdded\" xml:space=\"preserve\">\n    <value>Nuovo set di sticker aggiunto</value>\n  </data>\n  <data name=\"StickersNotFound\" xml:space=\"preserve\">\n    <value>Sticker non trovati</value>\n  </data>\n  <data name=\"ClearLogs\" xml:space=\"preserve\">\n    <value>Svuota i log</value>\n  </data>\n  <data name=\"Hide\" xml:space=\"preserve\">\n    <value>Nascondi</value>\n  </data>\n  <data name=\"Remove\" xml:space=\"preserve\">\n    <value>Rimuovi</value>\n  </data>\n  <data name=\"SendLogs\" xml:space=\"preserve\">\n    <value>Invia i log</value>\n  </data>\n  <data name=\"StickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"StickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"StickerNominativePlural\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"StickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"Stickers\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"StickersDescription\" xml:space=\"preserve\">\n    <value>Gli artisti sono invitati ad aggiungere i loro set di sticker usando il nostro bot @stickers.\n\nGli utenti possono aggiungere sticker premendo su di loro e scegliendo \"Aggiungi agli sticker\".</value>\n  </data>\n  <data name=\"LinkCopiedToClipboard\" xml:space=\"preserve\">\n    <value>Link copiato negli appunti</value>\n  </data>\n  <data name=\"Close\" xml:space=\"preserve\">\n    <value>Chiudi</value>\n  </data>\n  <data name=\"Show\" xml:space=\"preserve\">\n    <value>Mostra</value>\n  </data>\n  <data name=\"AddToStickers\" xml:space=\"preserve\">\n    <value>Aggiungi agli sticker</value>\n  </data>\n  <data name=\"SecretChatRequested\" xml:space=\"preserve\">\n    <value>Scambio chiavi di crittografia…</value>\n  </data>\n  <data name=\"Bot\" xml:space=\"preserve\">\n    <value>Bot</value>\n  </data>\n  <data name=\"OnlySeesMessagesStartingWithSlash\" xml:space=\"preserve\">\n    <value>Non ha accesso ai messaggi</value>\n  </data>\n  <data name=\"SeesAllMessages\" xml:space=\"preserve\">\n    <value>Ha accesso ai messaggi</value>\n  </data>\n  <data name=\"WhatCanThisBotDo\" xml:space=\"preserve\">\n    <value>Cosa può fare questo bot?</value>\n  </data>\n  <data name=\"AddBotToGroupsError\" xml:space=\"preserve\">\n    <value>Questo bot non può unirsi ai gruppi.</value>\n  </data>\n  <data name=\"AddToGroup\" xml:space=\"preserve\">\n    <value>Aggiungi a un gruppo</value>\n  </data>\n  <data name=\"BlockContactConfirmation\" xml:space=\"preserve\">\n    <value>Bloccare questo contatto?</value>\n  </data>\n  <data name=\"Help\" xml:space=\"preserve\">\n    <value>Aiuto</value>\n  </data>\n  <data name=\"Start\" xml:space=\"preserve\">\n    <value>Avvia</value>\n  </data>\n  <data name=\"UnblockContactConfirmation\" xml:space=\"preserve\">\n    <value>Sbloccare questo contatto?</value>\n  </data>\n  <data name=\"SharedLinks\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"BackgroudnTaskDisabledAlert\" xml:space=\"preserve\">\n    <value>Hai disattivato le attività in background per Telegram Messenger. Non riceverai le notifiche di Telegram quando questa opzione è disattivata. Per favore, autorizza l'app a funzionare in background.</value>\n  </data>\n  <data name=\"SearchSharedLinks\" xml:space=\"preserve\">\n    <value>Cerca link condivisi</value>\n  </data>\n  <data name=\"SharedFiles\" xml:space=\"preserve\">\n    <value>File</value>\n  </data>\n  <data name=\"ShareLinks\" xml:space=\"preserve\">\n    <value>Condividi link in questa chat ed accedi ad essi da ogni tuo dispositivo.</value>\n  </data>\n  <data name=\"DeleteAndStop\" xml:space=\"preserve\">\n    <value>Elimina e arresta</value>\n  </data>\n  <data name=\"Restart\" xml:space=\"preserve\">\n    <value>Riavvia</value>\n  </data>\n  <data name=\"RestartBot\" xml:space=\"preserve\">\n    <value>Riavvia bot</value>\n  </data>\n  <data name=\"StopBot\" xml:space=\"preserve\">\n    <value>Arresta</value>\n  </data>\n  <data name=\"ClearSearchHistoryConfirmation\" xml:space=\"preserve\">\n    <value>Cancellare la cronologia di ricerca?</value>\n  </data>\n  <data name=\"Recent\" xml:space=\"preserve\">\n    <value>Recenti</value>\n  </data>\n  <data name=\"NewChannel\" xml:space=\"preserve\">\n    <value>Nuovo canale</value>\n  </data>\n  <data name=\"MessageActionBroadcastCreate\" xml:space=\"preserve\">\n    <value>{0} ha creato il canale \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionChannelCreate\" xml:space=\"preserve\">\n    <value>Canale creato</value>\n  </data>\n  <data name=\"ReportSpam\" xml:space=\"preserve\">\n    <value>Segnala spam</value>\n  </data>\n  <data name=\"ConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Conversazione segnalata come spam. Eliminare e bloccare l'utente?</value>\n  </data>\n  <data name=\"GroupConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Conversazione segnalata come spam. Eliminare e uscire dal gruppo?</value>\n  </data>\n  <data name=\"PeerFloodAddContact\" xml:space=\"preserve\">\n    <value>Spiacenti, al momento puoi aggiungere ai gruppi solo i contatti reciproci.</value>\n  </data>\n  <data name=\"PeerFloodSendMessage\" xml:space=\"preserve\">\n    <value>Spiacenti, al momento puoi scrivere solo ai contatti reciproci.</value>\n  </data>\n  <data name=\"LeaveChannel\" xml:space=\"preserve\">\n    <value>Lascia il canale</value>\n  </data>\n  <data name=\"AccessLevel\" xml:space=\"preserve\">\n    <value>Livello di accesso</value>\n  </data>\n  <data name=\"AddManager\" xml:space=\"preserve\">\n    <value>Aggiungi manager</value>\n  </data>\n  <data name=\"Comments\" xml:space=\"preserve\">\n    <value>Commenti</value>\n  </data>\n  <data name=\"CommentsDescription\" xml:space=\"preserve\">\n    <value>Se attivi i commenti, i membri potranno discutere quello che pubblichi nel canale.</value>\n  </data>\n  <data name=\"Creator\" xml:space=\"preserve\">\n    <value>Creatore</value>\n  </data>\n  <data name=\"Management\" xml:space=\"preserve\">\n    <value>Gestione</value>\n  </data>\n  <data name=\"Moderator\" xml:space=\"preserve\">\n    <value>Moderatore</value>\n  </data>\n  <data name=\"ModeratorDescription\" xml:space=\"preserve\">\n    <value>Può rimuovere il contenuto generato dagli utenti.</value>\n  </data>\n  <data name=\"Publisher\" xml:space=\"preserve\">\n    <value>Editore</value>\n  </data>\n  <data name=\"PublisherDescription\" xml:space=\"preserve\">\n    <value>Può pubblicare come canale e aggiungere ed eliminare contenuti.</value>\n  </data>\n  <data name=\"ChannelName\" xml:space=\"preserve\">\n    <value>Nome del canale</value>\n  </data>\n  <data name=\"Description\" xml:space=\"preserve\">\n    <value>Descrizione</value>\n  </data>\n  <data name=\"AboutDescription\" xml:space=\"preserve\">\n    <value>Puoi inserire una descrizione opzionale per il tuo canale.</value>\n  </data>\n  <data name=\"Back\" xml:space=\"preserve\">\n    <value>Indietro</value>\n  </data>\n  <data name=\"ChannelType\" xml:space=\"preserve\">\n    <value>Tipo canale</value>\n  </data>\n  <data name=\"Private\" xml:space=\"preserve\">\n    <value>Gruppo privato</value>\n  </data>\n  <data name=\"PrivateChannelDescription\" xml:space=\"preserve\">\n    <value>È possibile unirsi ai canali privati solo tramite link d'invito.</value>\n  </data>\n  <data name=\"Public\" xml:space=\"preserve\">\n    <value>Gruppo pubblico</value>\n  </data>\n  <data name=\"PublicChannelDescription\" xml:space=\"preserve\">\n    <value>I canali pubblici possono essere trovati nella ricerca, chiunque può unirsi.</value>\n  </data>\n  <data name=\"PrivateLinkDescription\" xml:space=\"preserve\">\n    <value>Le persone possono unirsi al tuo canale tramite questo link. Puoi revocare il link in ogni momento.</value>\n  </data>\n  <data name=\"PublicLinkDescription\" xml:space=\"preserve\">\n    <value>Le persone possono condividere questo link con gli altri e trovare il tuo canale usando la ricerca di Telegram.</value>\n  </data>\n  <data name=\"CommentGenitivePlural\" xml:space=\"preserve\">\n    <value>Commenti</value>\n  </data>\n  <data name=\"CommentGenitiveSingular\" xml:space=\"preserve\">\n    <value>Commento</value>\n  </data>\n  <data name=\"CommentNominativePlural\" xml:space=\"preserve\">\n    <value>Commenti</value>\n  </data>\n  <data name=\"CommentNominativeSingular\" xml:space=\"preserve\">\n    <value>Commento</value>\n  </data>\n  <data name=\"Blacklist\" xml:space=\"preserve\">\n    <value>Lista nera</value>\n  </data>\n  <data name=\"Channel\" xml:space=\"preserve\">\n    <value>Canale</value>\n  </data>\n  <data name=\"ChoosePublicChannelLinkNotification\" xml:space=\"preserve\">\n    <value>Per favore scegli un link per il tuo canale pubblico, in modo che possa essere trovato nella ricerca e condiviso con altri.\n\nSe non sei interessato, ti consigliamo di creare un canale privato.</value>\n  </data>\n  <data name=\"MessageActionChannelEditPhoto\" xml:space=\"preserve\">\n    <value>Foto del canale aggiornata</value>\n  </data>\n  <data name=\"Mute\" xml:space=\"preserve\">\n    <value>Silenzia</value>\n  </data>\n  <data name=\"SetChannelPhoto\" xml:space=\"preserve\">\n    <value>Imposta la foto del canale</value>\n  </data>\n  <data name=\"Unmute\" xml:space=\"preserve\">\n    <value>Suona</value>\n  </data>\n  <data name=\"WhatIsChannel\" xml:space=\"preserve\">\n    <value>Cos'è un canale?</value>\n  </data>\n  <data name=\"WhatIsChannelDescription\" xml:space=\"preserve\">\n    <value>I canali sono un nuovo strumento per diffondere i tuoi messaggi a un grande pubblico.</value>\n  </data>\n  <data name=\"AddEditorConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di aggiungere {0} come editore?</value>\n  </data>\n  <data name=\"AddModeratorConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di aggiungere {0} come moderatore?</value>\n  </data>\n  <data name=\"PrivateChannel\" xml:space=\"preserve\">\n    <value>Canale privato</value>\n  </data>\n  <data name=\"PrivateToPublicChannelNotification\" xml:space=\"preserve\">\n    <value>Per favore ricorda che se scegli un link pubblico per il tuo canale, chiunque potrà trovarlo con la ricerca e unirsi.\n\nNon creare questo link se vuoi che il tuo canale rimanga privato.</value>\n  </data>\n  <data name=\"PublicChannel\" xml:space=\"preserve\">\n    <value>Canale pubblico</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuch\" xml:space=\"preserve\">\n    <value>Spiacenti, hai riservato troppi username pubblici. Puoi revocare il link da uno dei tuoi gruppi o canali più vecchi, o creare invece delle entità private.</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuchShort\" xml:space=\"preserve\">\n    <value>Troppi canali pubblici</value>\n  </data>\n  <data name=\"DeleteChannelConfirmation\" xml:space=\"preserve\">\n    <value>Aspetta! Eliminando il canale rimuoverai tutti i membri e tutti i messaggi saranno persi. Vuoi comunque eliminare il canale?</value>\n  </data>\n  <data name=\"Follow\" xml:space=\"preserve\">\n    <value>Unisciti</value>\n  </data>\n  <data name=\"Join\" xml:space=\"preserve\">\n    <value>Unisciti</value>\n  </data>\n  <data name=\"LeaveChannelConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler lasciare il canale?</value>\n  </data>\n  <data name=\"JoinChannelConfirmation\" xml:space=\"preserve\">\n    <value>Vuoi unirti al canale '{0}'?</value>\n  </data>\n  <data name=\"Administration\" xml:space=\"preserve\">\n    <value>Amministrazione</value>\n  </data>\n  <data name=\"Administrators\" xml:space=\"preserve\">\n    <value>Amministratori</value>\n  </data>\n  <data name=\"DeleteChannel\" xml:space=\"preserve\">\n    <value>Elimina canale</value>\n  </data>\n  <data name=\"MessageActionChannelDeletePhoto\" xml:space=\"preserve\">\n    <value>Foto del canale rimossa</value>\n  </data>\n  <data name=\"MessageActionChannelEditTitle\" xml:space=\"preserve\">\n    <value>Nome del canale cambiato in \"{0}\"</value>\n  </data>\n  <data name=\"SetSharedLink\" xml:space=\"preserve\">\n    <value>Imposta link condiviso</value>\n  </data>\n  <data name=\"AddAdministrator\" xml:space=\"preserve\">\n    <value>Aggiungi amministratore</value>\n  </data>\n  <data name=\"ChannelAdministratorsHint\" xml:space=\"preserve\">\n    <value>Puoi aggiungere amministratori per farti aiutare a gestire il tuo canale. Tieni premuto per rimuovere gli amministratori.</value>\n  </data>\n  <data name=\"ChannelMembersHint\" xml:space=\"preserve\">\n    <value>Solo gli amministratori del canale possono vedere questa lista.</value>\n  </data>\n  <data name=\"InviteViaLink\" xml:space=\"preserve\">\n    <value>Invita tramite link</value>\n  </data>\n  <data name=\"AddUserAsAdministrator\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler rendere {0} un amministratore?</value>\n  </data>\n  <data name=\"ChannelIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Spiacenti, questo canale non è più accessibile.</value>\n  </data>\n  <data name=\"InviteContactConfirmation\" xml:space=\"preserve\">\n    <value>{0} non si è ancora unito al canale. Vuoi invitarlo?</value>\n  </data>\n  <data name=\"PostToChannelError\" xml:space=\"preserve\">\n    <value>Spiacenti, non puoi pubblicare in questo canale.</value>\n  </data>\n  <data name=\"SearchSharedMusic\" xml:space=\"preserve\">\n    <value>Cerca musica condivisa</value>\n  </data>\n  <data name=\"SharedMusic\" xml:space=\"preserve\">\n    <value>Musica</value>\n  </data>\n  <data name=\"ShareMusic\" xml:space=\"preserve\">\n    <value>Tutta la musica condivisa in questa chat apparirà qui.</value>\n  </data>\n  <data name=\"AdminsDescription\" xml:space=\"preserve\">\n    <value>Gli amministratori del gruppo possono aggiungere e rimuovere membri e modificare nome e foto del gruppo.</value>\n  </data>\n  <data name=\"AllMembersAreAdmins\" xml:space=\"preserve\">\n    <value>Tutti sono amministratori</value>\n  </data>\n  <data name=\"MembersDescription\" xml:space=\"preserve\">\n    <value>I membri del gruppo possono aggiungere nuovi membri e modificare nome e foto del gruppo.</value>\n  </data>\n  <data name=\"SetAdmins\" xml:space=\"preserve\">\n    <value>Imposta amministratori</value>\n  </data>\n  <data name=\"UpgradeToSupergroup\" xml:space=\"preserve\">\n    <value>Aggiorna a supergruppo</value>\n  </data>\n  <data name=\"UpgradeToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Per favore ricorda che i membri del gruppo dovranno aggiornare Telegram all'ultima versione per vedere il tuo supergruppo. Sei sicuro di voler aggiornare questo gruppo?</value>\n  </data>\n  <data name=\"UpgradeToSupergroupDescription\" xml:space=\"preserve\">\n    <value>Limite membri raggiunto.\nPuoi convertire il tuo gruppo in un supergruppo per superare il limite e sbloccare nuove funzioni:\n• Il supergruppi hanno massimo {0}\n• I nuovi membri vedono tutta la cronologia\n• Gli amministratori eliminano i messaggi per tutti\n• Le notifiche sono disattivate di default</value>\n  </data>\n  <data name=\"MessageActionChannelMigrateFrom\" xml:space=\"preserve\">\n    <value>Questo gruppo è stato aggiornato a supergruppo.</value>\n  </data>\n  <data name=\"MessageActionChatActivate\" xml:space=\"preserve\">\n    <value>La chat è stata attivata</value>\n  </data>\n  <data name=\"MessageActionChatDeactivate\" xml:space=\"preserve\">\n    <value>La chat è stata disattivata</value>\n  </data>\n  <data name=\"MessageActionChatMigrateTo\" xml:space=\"preserve\">\n    <value>Chat migrata nel canale \"{0}\"</value>\n  </data>\n  <data name=\"DeleteGroup\" xml:space=\"preserve\">\n    <value>Elimina gruppo</value>\n  </data>\n  <data name=\"LeaveGroup\" xml:space=\"preserve\">\n    <value>Lascia il gruppo</value>\n  </data>\n  <data name=\"LeaveGroupConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler lasciare il gruppo?</value>\n  </data>\n  <data name=\"AdminsTooMuch\" xml:space=\"preserve\">\n    <value>Spiacenti, troppi amministratori in questo gruppo.</value>\n  </data>\n  <data name=\"BlockedUsersDescription\" xml:space=\"preserve\">\n    <value>Gli utenti in lista nera sono rimossi dal gruppo e possono tornare solo se invitati da un amministratore. I link d'invito non funzionano per loro.</value>\n  </data>\n  <data name=\"BotsTooMuch\" xml:space=\"preserve\">\n    <value>Spiacenti, troppi bot in questo gruppo.</value>\n  </data>\n  <data name=\"DeleteGroupConfirmation\" xml:space=\"preserve\">\n    <value>Aspetta! Eliminando il gruppo rimuoverai tutti i membri e tutti i messaggi saranno persi. Vuoi comunque eliminare il gruppo?</value>\n  </data>\n  <data name=\"GroupAdministratorsHint\" xml:space=\"preserve\">\n    <value>Puoi aggiungere amministratori per farti aiutare a gestire il tuo gruppo. Tieni premuto per rimuoverli.</value>\n  </data>\n  <data name=\"GroupNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Spiacenti, questa chat non è più accessibile.</value>\n  </data>\n  <data name=\"InviteUserBackError\" xml:space=\"preserve\">\n    <value>Spiacenti, questo utente ha deciso di lasciare il gruppo, quindi non puoi reinvitarlo.</value>\n  </data>\n  <data name=\"MessageActionChatAddSelf\" xml:space=\"preserve\">\n    <value>{0} è tornato nel gruppo</value>\n  </data>\n  <data name=\"PromoteToAdmin\" xml:space=\"preserve\">\n    <value>Rendi amministratore</value>\n  </data>\n  <data name=\"UserNotMutualContact\" xml:space=\"preserve\">\n    <value>Spiacenti, non puoi aggiungere questo utente ai gruppi.</value>\n  </data>\n  <data name=\"UsersTooMuch\" xml:space=\"preserve\">\n    <value>Spiacenti, questo gruppo è pieno.</value>\n  </data>\n  <data name=\"GroupIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Spiacenti, questa gruppo non è più accessibile.</value>\n  </data>\n  <data name=\"InviteContactToGroupConfirmation\" xml:space=\"preserve\">\n    <value>{0} non è ancora nel gruppo. Vuoi invitarlo?</value>\n  </data>\n  <data name=\"OpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>Aprire url {0}?</value>\n  </data>\n  <data name=\"ServiceNotifications\" xml:space=\"preserve\">\n    <value>Notifiche di servizio</value>\n  </data>\n  <data name=\"AutomaticAudioDownload\" xml:space=\"preserve\">\n    <value>Download automatico audio</value>\n  </data>\n  <data name=\"AutomaticPhotoDownload\" xml:space=\"preserve\">\n    <value>Download automatico foto</value>\n  </data>\n  <data name=\"CacheSettings\" xml:space=\"preserve\">\n    <value>Impostazioni cache</value>\n  </data>\n  <data name=\"ChatSettings\" xml:space=\"preserve\">\n    <value>Impostazioni chat</value>\n  </data>\n  <data name=\"ClearChannelConfirmation\" xml:space=\"preserve\">\n    <value>Eliminare tutti i messaggi e i media salvati nella cache per questo canale?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseConfirmation\" xml:space=\"preserve\">\n    <value>Cancellare i messaggi salvati nella cache?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseDescription\" xml:space=\"preserve\">\n    <value>Eliminando il database locale, verranno cancellati i messaggi nella cache e il database verrà compresso per occupare meno spazio. Telegram ha bisogno di alcuni dati per funzionare, quindi il database non sarà azzerato.\n\nQuesta operazione può richiedere alcuni minuti.</value>\n  </data>\n  <data name=\"ClearSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Eliminare tutti i messaggi e i media salvati nella cache per questo supergruppo?</value>\n  </data>\n  <data name=\"Documents\" xml:space=\"preserve\">\n    <value>Documenti</value>\n  </data>\n  <data name=\"Forever\" xml:space=\"preserve\">\n    <value>Per sempre</value>\n  </data>\n  <data name=\"Groups\" xml:space=\"preserve\">\n    <value>Gruppi</value>\n  </data>\n  <data name=\"KeepMedia\" xml:space=\"preserve\">\n    <value>Mantieni media</value>\n  </data>\n  <data name=\"KeepMediaDescription\" xml:space=\"preserve\">\n    <value>Foto, video e altri file dalle chat nel cloud che non hai aperto in questo periodo verranno eliminati dal dispositivo per preservare la spazio sul disco.\n\nTutti i media rimarranno nel cloud di Telegram e potranno essere riscaricati ogni volta che ne avrai bisogno.</value>\n  </data>\n  <data name=\"Music\" xml:space=\"preserve\">\n    <value>Musica</value>\n  </data>\n  <data name=\"Other\" xml:space=\"preserve\">\n    <value>Altro</value>\n  </data>\n  <data name=\"OtherFiles\" xml:space=\"preserve\">\n    <value>Altri file</value>\n  </data>\n  <data name=\"Photos\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"PrivateChats\" xml:space=\"preserve\">\n    <value>Chat private</value>\n  </data>\n  <data name=\"Videos\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"VoiceMessages\" xml:space=\"preserve\">\n    <value>Messaggi vocali</value>\n  </data>\n  <data name=\"LocalDatabase\" xml:space=\"preserve\">\n    <value>Database locale</value>\n  </data>\n  <data name=\"AutomaticGifDownload\" xml:space=\"preserve\">\n    <value>Download automatico GIF</value>\n  </data>\n  <data name=\"ForwardedGifGenitivePlural\" xml:space=\"preserve\">\n    <value>GIF inoltrate</value>\n  </data>\n  <data name=\"ForwardedGifGenitiveSingular\" xml:space=\"preserve\">\n    <value>GIF inoltrata</value>\n  </data>\n  <data name=\"ForwardedGifNominativePlural\" xml:space=\"preserve\">\n    <value>GIF inoltrate</value>\n  </data>\n  <data name=\"ForwardedGifNominativeSingular\" xml:space=\"preserve\">\n    <value>GIF inoltrata</value>\n  </data>\n  <data name=\"Gif\" xml:space=\"preserve\">\n    <value>GIF</value>\n  </data>\n  <data name=\"AutoplayGifs\" xml:space=\"preserve\">\n    <value>Autoriproduzione GIF</value>\n  </data>\n  <data name=\"Via\" xml:space=\"preserve\">\n    <value>Tramite {0}</value>\n  </data>\n  <data name=\"AddNewMembers\" xml:space=\"preserve\">\n    <value>Chi può aggiungere nuovi membri?</value>\n  </data>\n  <data name=\"AllMembers\" xml:space=\"preserve\">\n    <value>Tutti i membri</value>\n  </data>\n  <data name=\"AlwaysAllow\" xml:space=\"preserve\">\n    <value>Consenti sempre</value>\n  </data>\n  <data name=\"GroupsDescription\" xml:space=\"preserve\">\n    <value>Cambia chi può aggiungerti a gruppi e canali.</value>\n  </data>\n  <data name=\"GroupsImportantNote\" xml:space=\"preserve\">\n    <value>Puoi decidere chi può aggiungerti a gruppi e canali con precisione granulare.</value>\n  </data>\n  <data name=\"GroupsSettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Questi utenti potranno o non potranno aggiungerti a gruppi e canali indipendentemente dalle impostazioni precedenti.</value>\n  </data>\n  <data name=\"GroupsShort\" xml:space=\"preserve\">\n    <value>Gruppi e canali</value>\n  </data>\n  <data name=\"NeverAllow\" xml:space=\"preserve\">\n    <value>Non consentire mai</value>\n  </data>\n  <data name=\"OnlyAdmins\" xml:space=\"preserve\">\n    <value>Solo gli amministratori</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Messaggi vocali inoltrati</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Messaggio vocale inoltrato</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Messaggi vocali inoltrati</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Messaggio vocale inoltrato</value>\n  </data>\n  <data name=\"RecordingVoiceMessage\" xml:space=\"preserve\">\n    <value>Sta registrando un audio</value>\n  </data>\n  <data name=\"VoiceMessage\" xml:space=\"preserve\">\n    <value>Messaggio vocale</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription1\" xml:space=\"preserve\">\n    <value>L'immagine e il testo sono una rappresentazione della chiave di crittografia di questa chat segreta con {0}.</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription2\" xml:space=\"preserve\">\n    <value>Se sono gli stessi sul telefono di {0}, la crittografia end-to-end è garantita.</value>\n  </data>\n  <data name=\"InlineBotsNotification\" xml:space=\"preserve\">\n    <value>Per favore ricorda che i bot inline sono forniti da sviluppatori di terze parti. Per far funzionare il bot, i simboli che digiti dopo l'username del bot sono inviati al rispettivo sviluppatore.</value>\n  </data>\n  <data name=\"LinkPreviews\" xml:space=\"preserve\">\n    <value>Anteprime link</value>\n  </data>\n  <data name=\"LInkPreviewsNotification\" xml:space=\"preserve\">\n    <value>Vuoi attivare le anteprime estese per i link nelle Chat Segrete? Ricorda che le anteprime dei link sono generate sui server di Telegram.</value>\n  </data>\n  <data name=\"ViewStickers\" xml:space=\"preserve\">\n    <value>Visualizza sticker</value>\n  </data>\n  <data name=\"NotifyMembers\" xml:space=\"preserve\">\n    <value>Notifica i membri</value>\n  </data>\n  <data name=\"NotifyMembersDescription\" xml:space=\"preserve\">\n    <value>Invia notifiche push ogni volta che un amministratore pubblica un messaggio.</value>\n  </data>\n  <data name=\"SignMessages\" xml:space=\"preserve\">\n    <value>Firma messaggi</value>\n  </data>\n  <data name=\"SignMessagesDescription\" xml:space=\"preserve\">\n    <value> Aggiungi i nomi degli amministratori nei messaggi da loro pubblicati.</value>\n  </data>\n  <data name=\"ChannelNameDescription\" xml:space=\"preserve\">\n    <value>Puoi scegliere un nome per il canale su Telegram. Se lo fai, le altre persone potranno trovare il tuo canale tramite questo nome.\n\nPuoi usare a-z, 0-9 e underscore. La lunghezza minima è di 5 caratteri.</value>\n  </data>\n  <data name=\"ChannelNameDescription2\" xml:space=\"preserve\">\n    <value>Questo link apre il tuo canale su Telegram:</value>\n  </data>\n  <data name=\"SupergroupNameDescription\" xml:space=\"preserve\">\n    <value>Puoi scegliere un nome per il supergruppo su Telegram. Se lo fai, le altre persone potranno trovare il tuo canale tramite questo nome.\n\nPuoi usare a-z, 0-9 e underscore. La lunghezza minima è di 5 caratteri.</value>\n  </data>\n  <data name=\"SupergroupNameDescription2\" xml:space=\"preserve\">\n    <value>Questo link apre il tuo supergruppo su Telegram:</value>\n  </data>\n  <data name=\"SupergroupName\" xml:space=\"preserve\">\n    <value>Nome del supergruppo</value>\n  </data>\n  <data name=\"ChannelNameInvalid\" xml:space=\"preserve\">\n    <value>Spiacenti, questo nome non è valido.</value>\n  </data>\n  <data name=\"ChannelNameOccupied\" xml:space=\"preserve\">\n    <value>Spiacenti, questo nome è già stato preso.</value>\n  </data>\n  <data name=\"ChannelNameShort\" xml:space=\"preserve\">\n    <value>I nomi dei canali devono avere almeno 5 caratteri.</value>\n  </data>\n  <data name=\"ChannelNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>I nomi dei canali non possono iniziare con un numero.</value>\n  </data>\n  <data name=\"NameChecking\" xml:space=\"preserve\">\n    <value>Controllo il nome...</value>\n  </data>\n  <data name=\"NameIsAvailable\" xml:space=\"preserve\">\n    <value>{0} è disponibile</value>\n  </data>\n  <data name=\"SupergroupNameInvalid\" xml:space=\"preserve\">\n    <value>Spiacenti, questo nome non è valido.</value>\n  </data>\n  <data name=\"SupergroupNameOccupied\" xml:space=\"preserve\">\n    <value>Spiacenti, questo nome è già stato preso.</value>\n  </data>\n  <data name=\"SupergroupNameShort\" xml:space=\"preserve\">\n    <value>I nomi dei supergruppi devono avere almeno 5 caratteri.</value>\n  </data>\n  <data name=\"SupergroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>I nomi dei supergruppi non possono iniziare con un numero.</value>\n  </data>\n  <data name=\"EditMessageError\" xml:space=\"preserve\">\n    <value>Spiacenti, non puoi modificare questo messaggio.</value>\n  </data>\n  <data name=\"MuteChannelPostHint\" xml:space=\"preserve\">\n    <value>I post non saranno notificati ai membri</value>\n  </data>\n  <data name=\"UnmuteChannelPostHint\" xml:space=\"preserve\">\n    <value>I post saranno notificati ai membri</value>\n  </data>\n  <data name=\"PinMessage\" xml:space=\"preserve\">\n    <value>Fissa</value>\n  </data>\n  <data name=\"UnpinMessage\" xml:space=\"preserve\">\n    <value>Togli</value>\n  </data>\n  <data name=\"UnpinMessageConfirmation\" xml:space=\"preserve\">\n    <value>Vuoi togliere questo messaggio?</value>\n  </data>\n  <data name=\"ConvertToSupergroup\" xml:space=\"preserve\">\n    <value>Converti in supergruppo</value>\n  </data>\n  <data name=\"ConvertToSupergroupNote\" xml:space=\"preserve\">\n    <value>**Nota**: questa azione non può essere annullata.</value>\n  </data>\n  <data name=\"Supergroup\" xml:space=\"preserve\">\n    <value>Supergruppo</value>\n  </data>\n  <data name=\"ConvertToSupergroupDescription\" xml:space=\"preserve\">\n    <value>**Nei supergruppi:**\n• I nuovi membri vedono tutta la cronologia\n• I messaggi eliminati scompaiono per tutti\n• Gli admin possono fissare i messaggi importanti\n• Il creatore può creare un link pubblico per il gruppo</value>\n  </data>\n  <data name=\"BanUser\" xml:space=\"preserve\">\n    <value>Rimuovi utente</value>\n  </data>\n  <data name=\"DeleteAllFrom\" xml:space=\"preserve\">\n    <value>Elimina tutto da {0}</value>\n  </data>\n  <data name=\"DeleteMessageConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler eliminare questo messaggio?</value>\n  </data>\n  <data name=\"DeleteMessages\" xml:space=\"preserve\">\n    <value>Elimina messaggi</value>\n  </data>\n  <data name=\"MessageActionPinMessage\" xml:space=\"preserve\">\n    <value>{0} ha fissato un messaggio</value>\n  </data>\n  <data name=\"MessageActionPinContact\" xml:space=\"preserve\">\n    <value>{0} ha fissato un contatto</value>\n  </data>\n  <data name=\"MessageActionPinFile\" xml:space=\"preserve\">\n    <value>{0} ha fissato un file</value>\n  </data>\n  <data name=\"MessageActionPinGif\" xml:space=\"preserve\">\n    <value>{0} ha fissato una GIF</value>\n  </data>\n  <data name=\"MessageActionPinMap\" xml:space=\"preserve\">\n    <value>{0} ha fissato una posizione</value>\n  </data>\n  <data name=\"MessageActionPinPhoto\" xml:space=\"preserve\">\n    <value>{0} ha fissato una foto</value>\n  </data>\n  <data name=\"MessageActionPinSticker\" xml:space=\"preserve\">\n    <value>{0} ha fissato uno sticker</value>\n  </data>\n  <data name=\"MessageActionPinText\" xml:space=\"preserve\">\n    <value>{0} ha fissato \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionPinTrack\" xml:space=\"preserve\">\n    <value>{0} ha fissato una traccia</value>\n  </data>\n  <data name=\"MessageActionPinVideo\" xml:space=\"preserve\">\n    <value>{0} ha fissato un video</value>\n  </data>\n  <data name=\"MessageActionPinVoiceMessage\" xml:space=\"preserve\">\n    <value>{0} ha fissato un messaggio vocale</value>\n  </data>\n  <data name=\"PinnedMessage\" xml:space=\"preserve\">\n    <value>Messaggio fissato</value>\n  </data>\n  <data name=\"ConvertToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Questa azione è irreversibile. Non è possibile trasformare un supergruppo in un gruppo normale.</value>\n  </data>\n  <data name=\"NotifyAllMembers\" xml:space=\"preserve\">\n    <value>Notifica tutti i membri</value>\n  </data>\n  <data name=\"PinMessageConfirmation\" xml:space=\"preserve\">\n    <value>Vuoi fissare questo messaggio in questo gruppo?</value>\n  </data>\n  <data name=\"ChatMaxSizeNotification\" xml:space=\"preserve\">\n    <value>Potrai aggiungere più utenti dopo aver creato il gruppo e averlo convertito in supergruppo.</value>\n  </data>\n  <data name=\"Admin\" xml:space=\"preserve\">\n    <value>Amministratore</value>\n  </data>\n  <data name=\"ChoosePublicGroupLinkNotification\" xml:space=\"preserve\">\n    <value>Per favore scegli un link per il tuo gruppo pubblico, in modo che possa essere trovato nella ricerca e condiviso con altri.</value>\n  </data>\n  <data name=\"GroupType\" xml:space=\"preserve\">\n    <value>Tipo di gruppo</value>\n  </data>\n  <data name=\"PrivateGroupDescription\" xml:space=\"preserve\">\n    <value>È possibile unirsi ai gruppi privati solo se sei stato invitato o se hai un link d'invito.</value>\n  </data>\n  <data name=\"PrivateGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Le persone possono unirsi al tuo gruppo seguendo questo link. Puoi revocare il link in ogni momento.</value>\n  </data>\n  <data name=\"PublicGroupDescription\" xml:space=\"preserve\">\n    <value>I gruppi pubblici possono essere trovati nella ricerca, la cronologia è disponibile per tutti e chiunque può unirsi.</value>\n  </data>\n  <data name=\"PublicGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Le persone possono condividere questo link con gli altri e trovare il tuo gruppo usando la ricerca di Telegram.</value>\n  </data>\n  <data name=\"Camera\" xml:space=\"preserve\">\n    <value>Fotocamera</value>\n  </data>\n  <data name=\"Pornography\" xml:space=\"preserve\">\n    <value>Pornografia</value>\n  </data>\n  <data name=\"Report\" xml:space=\"preserve\">\n    <value>Segnala</value>\n  </data>\n  <data name=\"ReportSpamNotification\" xml:space=\"preserve\">\n    <value>Grazie!\nLa tua segnalazione sarà presto esaminata dal nostro team.</value>\n  </data>\n  <data name=\"Spam\" xml:space=\"preserve\">\n    <value>Spam</value>\n  </data>\n  <data name=\"Violence\" xml:space=\"preserve\">\n    <value>Violenza</value>\n  </data>\n  <data name=\"ClearHistoryConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler eliminare la cronologia?</value>\n  </data>\n  <data name=\"DeleteAndExitConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler eliminare e lasciare questo gruppo?</value>\n  </data>\n  <data name=\"DeleteChat\" xml:space=\"preserve\">\n    <value>Elimina chat</value>\n  </data>\n  <data name=\"MessageActionChatJoin\" xml:space=\"preserve\">\n    <value>{0} si è unito al gruppo</value>\n  </data>\n  <data name=\"MessageActionChatJoinSelf\" xml:space=\"preserve\">\n    <value>Ti sei unito al gruppo</value>\n  </data>\n  <data name=\"MessageActionLeftGroupSelf\" xml:space=\"preserve\">\n    <value>Hai lasciato il gruppo</value>\n  </data>\n  <data name=\"CodeSentToTelegramApp\" xml:space=\"preserve\">\n    <value>Abbiamo inviato il codice su **Telegram** nell'altro tuo dispositivo.</value>\n  </data>\n  <data name=\"CodeSentViaCallingPhone\" xml:space=\"preserve\">\n    <value>Stiamo chiamando il tuo numero **{0}** per dettarti un codice.</value>\n  </data>\n  <data name=\"DidNotGetCode\" xml:space=\"preserve\">\n    <value>Non hai ricevuto il codice?</value>\n  </data>\n  <data name=\"HaveNotReceivedCode\" xml:space=\"preserve\">\n    <value>Non hai ricevuto il codice?</value>\n  </data>\n  <data name=\"ShareLocationConfirmation\" xml:space=\"preserve\">\n    <value>Questo invierà la tua posizione corrente al bot.</value>\n  </data>\n  <data name=\"SharePhoneNumberConfirmation\" xml:space=\"preserve\">\n    <value>Il bot saprà il tuo numero di telefono. Questo può essere utile per l'integrazione con altri servizi.</value>\n  </data>\n  <data name=\"ChooseManually\" xml:space=\"preserve\">\n    <value>Scegli manualmente</value>\n  </data>\n  <data name=\"ShareLocationCaption\" xml:space=\"preserve\">\n    <value>Condividere la tua posizione?</value>\n  </data>\n  <data name=\"SharePhoneNumberCaption\" xml:space=\"preserve\">\n    <value>Condividere il tuo numero di telefono?</value>\n  </data>\n  <data name=\"UnableToDetermineLocation\" xml:space=\"preserve\">\n    <value>L'app non è riuscita a determinare la tua posizione corrente.</value>\n  </data>\n  <data name=\"ShareLocationInlineConfirmation\" xml:space=\"preserve\">\n    <value>Questo bot vorrebbe sapere la tua posizione ogni volta che invii una richiesta. Questo può essere usato per fornire risultati specifici per la posizione.</value>\n  </data>\n  <data name=\"MoreInfo\" xml:space=\"preserve\">\n    <value>Maggiori info</value>\n  </data>\n  <data name=\"RemoveStickers\" xml:space=\"preserve\">\n    <value>Rimuovi</value>\n  </data>\n  <data name=\"SendSticker\" xml:space=\"preserve\">\n    <value>Invia sticker</value>\n  </data>\n  <data name=\"StickersRemoved\" xml:space=\"preserve\">\n    <value>Set di sticker rimosso</value>\n  </data>\n  <data name=\"UnpinFromStart\" xml:space=\"preserve\">\n    <value>Rimuovi da start</value>\n  </data>\n  <data name=\"Bots\" xml:space=\"preserve\">\n    <value>Bot</value>\n  </data>\n  <data name=\"LastSeenYesterdayAt\" xml:space=\"preserve\">\n    <value>Ultimo accesso ieri alle {0}</value>\n  </data>\n  <data name=\"Clear\" xml:space=\"preserve\">\n    <value>Cancella</value>\n  </data>\n  <data name=\"Edited\" xml:space=\"preserve\">\n    <value>Modificato</value>\n  </data>\n  <data name=\"EditMessage\" xml:space=\"preserve\">\n    <value>Modifica messaggio</value>\n  </data>\n  <data name=\"LastSeenTodayAt\" xml:space=\"preserve\">\n    <value>Ultimo accesso oggi alle {0}</value>\n  </data>\n  <data name=\"OpenInlineBotsHint\" xml:space=\"preserve\">\n    <value>Scorri vero l'alto per aprire i bot inline</value>\n  </data>\n  <data name=\"ConfirmResetTopPeerRating\" xml:space=\"preserve\">\n    <value>Eliminare {0} dai suggerimenti?</value>\n  </data>\n  <data name=\"Draft\" xml:space=\"preserve\">\n    <value>Bozza</value>\n  </data>\n  <data name=\"FeaturedStickers\" xml:space=\"preserve\">\n    <value>Sticker in primo piano</value>\n  </data>\n  <data name=\"StickersHint\" xml:space=\"preserve\">\n    <value>Gli artisti sono invitati ad aggiungere i loro set di sticker usando il nostro bot __@stickers__.\n\nGli utenti possono aggiungere sticker premendo su di loro e scegliendo \"Aggiungi agli sticker\".</value>\n  </data>\n  <data name=\"ClearRecentStickers\" xml:space=\"preserve\">\n    <value>Cancella sticker recenti</value>\n  </data>\n  <data name=\"NewFeaturedStickers\" xml:space=\"preserve\">\n    <value>{0} nuovi</value>\n  </data>\n  <data name=\"InstallStickersetError\" xml:space=\"preserve\">\n    <value>Spiacenti, hai raggiunto il numero massimo di set di sticker.</value>\n  </data>\n  <data name=\"ChatInviteSubtitle\" xml:space=\"preserve\">\n    <value>{0}, tra cui:</value>\n  </data>\n  <data name=\"InstalledStickers\" xml:space=\"preserve\">\n    <value>Sticker installati</value>\n  </data>\n  <data name=\"ShowStickersTab\" xml:space=\"preserve\">\n    <value>Mostra pannello sticker</value>\n  </data>\n  <data name=\"ShowStickersTabHint\" xml:space=\"preserve\">\n    <value>Un'icona sticker apparirà nel campo di scrittura.</value>\n  </data>\n  <data name=\"ArchivedStickers\" xml:space=\"preserve\">\n    <value>Sticker archiviati</value>\n  </data>\n  <data name=\"ArchivedStickersAbout\" xml:space=\"preserve\">\n    <value>Alcuni dei tuoi set di sticker più vecchi sono stati stati archiviati per fare spazio ai tuoi set attivi.</value>\n  </data>\n  <data name=\"ArchivedStickersHeader\" xml:space=\"preserve\">\n    <value>Puoi avere fino a 200 set di sticker installati. Gli sticker non usati saranno archiviati quando ne aggiungerai altri.</value>\n  </data>\n  <data name=\"NoSetsHere\" xml:space=\"preserve\">\n    <value>Nessun set qui</value>\n  </data>\n  <data name=\"NoSets\" xml:space=\"preserve\">\n    <value>Nessun set</value>\n  </data>\n  <data name=\"SetGenitivePlural\" xml:space=\"preserve\">\n    <value>Set</value>\n  </data>\n  <data name=\"SetGenitiveSingular\" xml:space=\"preserve\">\n    <value>Set</value>\n  </data>\n  <data name=\"SetNominativePlural\" xml:space=\"preserve\">\n    <value>Set</value>\n  </data>\n  <data name=\"SetNominativeSingular\" xml:space=\"preserve\">\n    <value>Set</value>\n  </data>\n  <data name=\"ChatWithYourself\" xml:space=\"preserve\">\n    <value>chat con te stesso</value>\n  </data>\n  <data name=\"CloudStorageDescription\" xml:space=\"preserve\">\n    <value>• Inoltra i messaggi qui per salvarli\n• Invia media e file per archiviarli\n• Accedi alla chat da ogni dispositivo\n• Trova le tue cose con la ricerca</value>\n  </data>\n  <data name=\"CloudStorage\" xml:space=\"preserve\">\n    <value>Il tuo archivio cloud</value>\n  </data>\n  <data name=\"CancelAccountReset\" xml:space=\"preserve\">\n    <value>Annulla ripristino account</value>\n  </data>\n  <data name=\"CancelAccountResetDescription\" xml:space=\"preserve\">\n    <value>Qualcuno con accesso al tuo numero di telefono **{0}** ha richiesto l'eliminazione del tuo account Telegram e il ripristino della password della verifica in due passaggi. Se non sei stato tu, per favore inserisci il codice che abbiamo appena inviato tramite SMS al tuo numero **{0}** .</value>\n  </data>\n  <data name=\"CancelAccountResetSuccess\" xml:space=\"preserve\">\n    <value>Fatto! Il processo di eliminazione per il tuo account {0} è stato annullato. Puoi chiudere questa finestra ora.</value>\n  </data>\n  <data name=\"Reset\" xml:space=\"preserve\">\n    <value>Ripristina</value>\n  </data>\n  <data name=\"ResetAccount\" xml:space=\"preserve\">\n    <value>Ripristino account</value>\n  </data>\n  <data name=\"ResetAccountDescription\" xml:space=\"preserve\">\n    <value>Dato che l'account **{0}** è attivo e protetto da una password, lo elimineremo tra 1 settimana per motivi di sicurezza.\n\nPuoi annullare questo processo in qualsiasi momento.</value>\n  </data>\n  <data name=\"ResetAccountError\" xml:space=\"preserve\">\n    <value>I tuoi tentativi recenti di ripristinare questo account sono stati annullati dal suo utente attivo. Per favore riprova tra 7 giorni.</value>\n  </data>\n  <data name=\"ResetAccountIn\" xml:space=\"preserve\">\n    <value>Potrai ripristinare il tuo account tra:</value>\n  </data>\n  <data name=\"Archive\" xml:space=\"preserve\">\n    <value>Archivia</value>\n  </data>\n  <data name=\"BotOpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>Il bot {0} chiede il permesso di condividere il tuo nome e la tua foto profilo di Telegram con il proprietario di {1}.</value>\n  </data>\n  <data name=\"IsRecordingVideo\" xml:space=\"preserve\">\n    <value>Sta registrando un video</value>\n  </data>\n  <data name=\"IsSendingAudio\" xml:space=\"preserve\">\n    <value>Sta inviando un audio</value>\n  </data>\n  <data name=\"RecordingVideo\" xml:space=\"preserve\">\n    <value>Registrando un video</value>\n  </data>\n  <data name=\"SendingAudio\" xml:space=\"preserve\">\n    <value>Inviando un audio</value>\n  </data>\n  <data name=\"Revoke\" xml:space=\"preserve\">\n    <value>Revoca</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation2\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler revocare il link **{0}**?\n\nIl gruppo **\"{1}\"**  diventerà privato.</value>\n  </data>\n  <data name=\"AddBotToTheGroup\" xml:space=\"preserve\">\n    <value>Aggiungere il bot a \"{0}\"?</value>\n  </data>\n  <data name=\"YourScored\" xml:space=\"preserve\">\n    <value>Hai totalizzato {0} punto</value>\n  </data>\n  <data name=\"ShareWith\" xml:space=\"preserve\">\n    <value>Condividere con {0}?</value>\n  </data>\n  <data name=\"YourScoredAtGame\" xml:space=\"preserve\">\n    <value>Hai totalizzato {0} punto a {1}</value>\n  </data>\n  <data name=\"MuteAudio\" xml:space=\"preserve\">\n    <value>Silenzia</value>\n  </data>\n  <data name=\"OpenWebPagesViaBotConfirmation\" xml:space=\"preserve\">\n    <value>Consentire a {0} di trasmettere il tuo nome e id Telegram (non il tuo numero di telefono) alle pagine che apri tramite questo bot?</value>\n  </data>\n  <data name=\"UserScored\" xml:space=\"preserve\">\n    <value>{0} ha totalizzato {1} punto</value>\n  </data>\n  <data name=\"UserScoredAtGame\" xml:space=\"preserve\">\n    <value>{0} ha totalizzato {1} punto a {2}</value>\n  </data>\n  <data name=\"UserScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>{0} ha totalizzato {1} punti a {2}</value>\n  </data>\n  <data name=\"UserScoredPlural\" xml:space=\"preserve\">\n    <value>{0} ha totalizzato {1} punti</value>\n  </data>\n  <data name=\"YourScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>Hai totalizzato {0} punti a {1}</value>\n  </data>\n  <data name=\"YourScoredPlural\" xml:space=\"preserve\">\n    <value>Hai totalizzato {0} punti</value>\n  </data>\n  <data name=\"ForwardedGameGenitivePlural\" xml:space=\"preserve\">\n    <value>Giochi inoltrati</value>\n  </data>\n  <data name=\"ForwardedGameGenitiveSingular\" xml:space=\"preserve\">\n    <value>Gioco inoltrato</value>\n  </data>\n  <data name=\"ForwardedGameNominativePlural\" xml:space=\"preserve\">\n    <value>Giochi inoltrati</value>\n  </data>\n  <data name=\"ForwardedGameNominativeSingular\" xml:space=\"preserve\">\n    <value>Gioco inoltrato</value>\n  </data>\n  <data name=\"Game\" xml:space=\"preserve\">\n    <value>Gioco</value>\n  </data>\n  <data name=\"MessageActionPinGame\" xml:space=\"preserve\">\n    <value>{0} ha fissato un gioco</value>\n  </data>\n  <data name=\"ShareGameWith\" xml:space=\"preserve\">\n    <value>Condividere il gioco con {0}?</value>\n  </data>\n  <data name=\"IsPlayingGame\" xml:space=\"preserve\">\n    <value>Sta giocando a un gioco</value>\n  </data>\n  <data name=\"PlayingGame\" xml:space=\"preserve\">\n    <value>Sta giocando a un gioco</value>\n  </data>\n  <data name=\"YourCloudStorage\" xml:space=\"preserve\">\n    <value>Il tuo archivio cloud</value>\n  </data>\n  <data name=\"Masks\" xml:space=\"preserve\">\n    <value>Maschere</value>\n  </data>\n  <data name=\"MasksHint\" xml:space=\"preserve\">\n    <value>Puoi aggiungere maschere alle foto che invii. Per farlo, apri l'editor fotografico prima di inviare una foto.</value>\n  </data>\n  <data name=\"GroupsInCommon\" xml:space=\"preserve\">\n    <value>Gruppi in comune</value>\n  </data>\n  <data name=\"GroupGenitivePlural\" xml:space=\"preserve\">\n    <value>Gruppi</value>\n  </data>\n  <data name=\"GroupGenitiveSingular\" xml:space=\"preserve\">\n    <value>Gruppo</value>\n  </data>\n  <data name=\"GroupNominativePlural\" xml:space=\"preserve\">\n    <value>Gruppi</value>\n  </data>\n  <data name=\"GroupNominativeSingular\" xml:space=\"preserve\">\n    <value>Gruppo</value>\n  </data>\n  <data name=\"NoGroupsHere\" xml:space=\"preserve\">\n    <value>Nessun gruppo qui</value>\n  </data>\n  <data name=\"AddChatUserFloodWait\" xml:space=\"preserve\">\n    <value>Non puoi aggiungere questo utente perché hai scritto a troppi non-contatti oggi. Per favore riprova domani. Puoi chiedere a un altro membro di aggiungere questo utente al gruppo.</value>\n  </data>\n  <data name=\"ClearAll\" xml:space=\"preserve\">\n    <value>Pulisci tutto</value>\n  </data>\n  <data name=\"ClearPaintingConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler cancellare il disegno?</value>\n  </data>\n  <data name=\"DiscardChangesConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler annullare tutte le modifiche?</value>\n  </data>\n  <data name=\"SendMessageFloodWait\" xml:space=\"preserve\">\n    <value>Oggi hai scritto a troppi non-contatti, per favore riprova domani. Potrai rispondere oggi se questo utente ti contatta per primo.</value>\n  </data>\n  <data name=\"AttachedStickers\" xml:space=\"preserve\">\n    <value>Sticker allegati</value>\n  </data>\n  <data name=\"JumpToDate\" xml:space=\"preserve\">\n    <value>Vai alla data</value>\n  </data>\n  <data name=\"Pack\" xml:space=\"preserve\">\n    <value>Visualizza pacchetto</value>\n  </data>\n  <data name=\"ChatsAndContacts\" xml:space=\"preserve\">\n    <value>Chat e contatti</value>\n  </data>\n  <data name=\"MessageSearch\" xml:space=\"preserve\">\n    <value>Ricerca messaggi</value>\n  </data>\n  <data name=\"SearchChatsOrMessages\" xml:space=\"preserve\">\n    <value>Cerca chat o messaggi</value>\n  </data>\n  <data name=\"PrivacyPolicy\" xml:space=\"preserve\">\n    <value>Informativa sulla privacy</value>\n  </data>\n  <data name=\"TelegramFAQ\" xml:space=\"preserve\">\n    <value>Domande frequenti</value>\n  </data>\n  <data name=\"ChatSettingsSubtitle\" xml:space=\"preserve\">\n    <value>Media, sfondo, cache</value>\n  </data>\n  <data name=\"Mobile\" xml:space=\"preserve\">\n    <value>Cellulare</value>\n  </data>\n  <data name=\"ChannelsTooMuch\" xml:space=\"preserve\">\n    <value>Spiacenti, hai creato o ti sei unito a troppi canali.</value>\n  </data>\n  <data name=\"UserChannelsTooMuch\" xml:space=\"preserve\">\n    <value>Spiacenti, non puoi aggiungere questo utente ai canali.</value>\n  </data>\n  <data name=\"ItemsSelectedSingular\" xml:space=\"preserve\">\n    <value>{0} selezionato</value>\n  </data>\n  <data name=\"NewChat\" xml:space=\"preserve\">\n    <value>Nuova chat</value>\n  </data>\n  <data name=\"ItemsSelectedPlural\" xml:space=\"preserve\">\n    <value>{0} selezionati</value>\n  </data>\n  <data name=\"FileGenitivePlural\" xml:space=\"preserve\">\n    <value>File</value>\n  </data>\n  <data name=\"FileGenitiveSingular\" xml:space=\"preserve\">\n    <value>File</value>\n  </data>\n  <data name=\"FileNominativePlural\" xml:space=\"preserve\">\n    <value>File</value>\n  </data>\n  <data name=\"FileNominativeSingular\" xml:space=\"preserve\">\n    <value>File</value>\n  </data>\n  <data name=\"LinkGenitivePlural\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"LinkGenitiveSingular\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"LinkNominativePlural\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"LinkNominativeSingular\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"PhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"PhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"PhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"PhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"SongGenitivePlural\" xml:space=\"preserve\">\n    <value>Canzon</value>\n  </data>\n  <data name=\"SongGenitiveSingular\" xml:space=\"preserve\">\n    <value>Canzone</value>\n  </data>\n  <data name=\"SongNominativePlural\" xml:space=\"preserve\">\n    <value>Canzoni</value>\n  </data>\n  <data name=\"SongNominativeSingular\" xml:space=\"preserve\">\n    <value>Canzone</value>\n  </data>\n  <data name=\"VideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"VideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"VideoNominativePlural\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"VideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"PhoneNumber\" xml:space=\"preserve\">\n    <value>Numero di telefono</value>\n  </data>\n  <data name=\"SetPhoto\" xml:space=\"preserve\">\n    <value>Imposta foto</value>\n  </data>\n  <data name=\"AskAQuestionDescription\" xml:space=\"preserve\">\n    <value>Per favore nota che l'assistenza di Telegram è fornita da volontari. Proviamo a rispondere quanto prima, ma potrebbe volerci del tempo. Dai un'occhiata alle &lt;![CDATA[&lt;a href=\"https://telegram.org/faq/it#domande-generali\"&gt;domande frequenti di Telegram&lt;/a&gt;]]&gt;: contengono suggerimenti importanti per &lt;![CDATA[&lt;a href=\"https://telegram.org/faq/it#risoluzione-dei-problemi\"&gt;risolvere i  problemi&lt;/a&gt;]]&gt; e risposte a quasi tutte le domande.</value>\n  </data>\n  <data name=\"MaskPackNominativePlural\" xml:space=\"preserve\">\n    <value>Set di maschere</value>\n  </data>\n  <data name=\"MaskPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Set di maschere</value>\n  </data>\n  <data name=\"StickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Set di sticker</value>\n  </data>\n  <data name=\"StickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Set di sticker</value>\n  </data>\n  <data name=\"NewStickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Nuovi set di sticker</value>\n  </data>\n  <data name=\"NewStickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Nuovo set di sticker</value>\n  </data>\n  <data name=\"PinDialog\" xml:space=\"preserve\">\n    <value>Fissa</value>\n  </data>\n  <data name=\"UnpinDialog\" xml:space=\"preserve\">\n    <value>Togli</value>\n  </data>\n  <data name=\"DeleteFor\" xml:space=\"preserve\">\n    <value>Elimina per {0}</value>\n  </data>\n  <data name=\"DeleteForAll\" xml:space=\"preserve\">\n    <value>Elimina per tutti</value>\n  </data>\n  <data name=\"DeleteMessageForYouHint\" xml:space=\"preserve\">\n    <value>Questo lo eliminerà solo per te.</value>\n  </data>\n  <data name=\"DeleteMessagesForYouHint\" xml:space=\"preserve\">\n    <value>Questo li eliminerà solo per te.</value>\n  </data>\n  <data name=\"MessageActionCanceledCall\" xml:space=\"preserve\">\n    <value>Chiamata annullata</value>\n  </data>\n  <data name=\"MessageActionIncomingCall\" xml:space=\"preserve\">\n    <value>Chiamata in entrata</value>\n  </data>\n  <data name=\"MessageActionIncomingDurationCall\" xml:space=\"preserve\">\n    <value>Chiamata in entrata ({0})</value>\n  </data>\n  <data name=\"MessageActionMissedCall\" xml:space=\"preserve\">\n    <value>Chiamata persa</value>\n  </data>\n  <data name=\"MessageActionOutgoingCall\" xml:space=\"preserve\">\n    <value>Chiamate in uscita</value>\n  </data>\n  <data name=\"MessageActionOutgoingDurationCall\" xml:space=\"preserve\">\n    <value>Chiamata in uscita ({0})</value>\n  </data>\n  <data name=\"CanceledCall\" xml:space=\"preserve\">\n    <value>Chiamata annullata</value>\n  </data>\n  <data name=\"IncomingCall\" xml:space=\"preserve\">\n    <value>Chiamata in entrata</value>\n  </data>\n  <data name=\"MissedCall\" xml:space=\"preserve\">\n    <value>Chiamata persa</value>\n  </data>\n  <data name=\"OutgoingCall\" xml:space=\"preserve\">\n    <value>Chiamate in uscita</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Questo lo eliminerà per chiunque in questo canale.</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Questo lo eliminerà per chiunque in questa chat.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Questo li eliminerà per chiunque in questa canale.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Questo li eliminerà per chiunque in questa chat.</value>\n  </data>\n  <data name=\"Invoice\" xml:space=\"preserve\">\n    <value>Fattura</value>\n  </data>\n  <data name=\"TestInvoice\" xml:space=\"preserve\">\n    <value>Fattura di test</value>\n  </data>\n  <data name=\"MessageActionPaymentSent\" xml:space=\"preserve\">\n    <value>Hai appena trasferito con successo {0} a {1}</value>\n  </data>\n  <data name=\"MessageActionPaymentSentFor\" xml:space=\"preserve\">\n    <value>Hai appena trasferito con successo {0} a {1} per {2}</value>\n  </data>\n  <data name=\"PaymentInfo\" xml:space=\"preserve\">\n    <value>Info di pagamento</value>\n  </data>\n  <data name=\"Receipt\" xml:space=\"preserve\">\n    <value>Ricevuta</value>\n  </data>\n  <data name=\"Address1Street\" xml:space=\"preserve\">\n    <value>Indirizzo 1 (Via)</value>\n  </data>\n  <data name=\"Address2Street\" xml:space=\"preserve\">\n    <value>Indirizzo 2 (Via)</value>\n  </data>\n  <data name=\"BillingAddress\" xml:space=\"preserve\">\n    <value>Indirizzo di fatturazione</value>\n  </data>\n  <data name=\"CardNumber\" xml:space=\"preserve\">\n    <value>Numero della carta</value>\n  </data>\n  <data name=\"Checkout\" xml:space=\"preserve\">\n    <value>Cassa</value>\n  </data>\n  <data name=\"City\" xml:space=\"preserve\">\n    <value>Città</value>\n  </data>\n  <data name=\"ContactAddress\" xml:space=\"preserve\">\n    <value>Indirizzo di contatto</value>\n  </data>\n  <data name=\"Discount\" xml:space=\"preserve\">\n    <value>Sconto</value>\n  </data>\n  <data name=\"FullName\" xml:space=\"preserve\">\n    <value>Nome completo</value>\n  </data>\n  <data name=\"MMYY\" xml:space=\"preserve\">\n    <value>MM/YY</value>\n  </data>\n  <data name=\"NameSurname\" xml:space=\"preserve\">\n    <value>Nome e cognome</value>\n  </data>\n  <data name=\"PaymentCard\" xml:space=\"preserve\">\n    <value>Carta di credito</value>\n  </data>\n  <data name=\"PaymentMethod\" xml:space=\"preserve\">\n    <value>Metodo di pagamento</value>\n  </data>\n  <data name=\"Postcode\" xml:space=\"preserve\">\n    <value>Codice postale</value>\n  </data>\n  <data name=\"Receiver\" xml:space=\"preserve\">\n    <value>Destinatario</value>\n  </data>\n  <data name=\"SaveShippingInformation\" xml:space=\"preserve\">\n    <value>Salva info di spedizione</value>\n  </data>\n  <data name=\"SaveShippingInformationHint\" xml:space=\"preserve\">\n    <value>Puoi salvare le tue info di spedizione per uso futuro.</value>\n  </data>\n  <data name=\"SecurityCode\" xml:space=\"preserve\">\n    <value>Codice di sicurezza (CVV)</value>\n  </data>\n  <data name=\"Shipping\" xml:space=\"preserve\">\n    <value>Spedizione</value>\n  </data>\n  <data name=\"ShippingAddress\" xml:space=\"preserve\">\n    <value>Indirizzo di spedizione</value>\n  </data>\n  <data name=\"ShippingInformation\" xml:space=\"preserve\">\n    <value>Info di spedizione</value>\n  </data>\n  <data name=\"ShippingMethods\" xml:space=\"preserve\">\n    <value>Metodi di spedizione</value>\n  </data>\n  <data name=\"State\" xml:space=\"preserve\">\n    <value>Provincia</value>\n  </data>\n  <data name=\"Subtotal\" xml:space=\"preserve\">\n    <value>Subtotale</value>\n  </data>\n  <data name=\"Taxes\" xml:space=\"preserve\">\n    <value>Tasse</value>\n  </data>\n  <data name=\"TestReceipt\" xml:space=\"preserve\">\n    <value>Ricevuta di test</value>\n  </data>\n  <data name=\"Total\" xml:space=\"preserve\">\n    <value>Totale</value>\n  </data>\n  <data name=\"TransactionConfirmation\" xml:space=\"preserve\">\n    <value>Vuoi davvero trasferire {0} a {1} per {2}?</value>\n  </data>\n  <data name=\"TransactionReview\" xml:space=\"preserve\">\n    <value>Riepilogo transazione</value>\n  </data>\n  <data name=\"TestCheckout\" xml:space=\"preserve\">\n    <value>Cassa di test</value>\n  </data>\n  <data name=\"ShippingMethod\" xml:space=\"preserve\">\n    <value>Metodo di spedizione</value>\n  </data>\n  <data name=\"Name\" xml:space=\"preserve\">\n    <value>Nome</value>\n  </data>\n  <data name=\"Pay\" xml:space=\"preserve\">\n    <value>Paga</value>\n  </data>\n  <data name=\"Duplicate\" xml:space=\"preserve\">\n    <value>Duplica</value>\n  </data>\n  <data name=\"CameraSubtitle\" xml:space=\"preserve\">\n    <value>Gestisci impostazioni della fotocamera</value>\n  </data>\n  <data name=\"ChooseYourCameraApp\" xml:space=\"preserve\">\n    <value>Scegli la tua fotocamera</value>\n  </data>\n  <data name=\"ExternalCamera\" xml:space=\"preserve\">\n    <value>Fotocamera esterna</value>\n  </data>\n  <data name=\"InAppCamera\" xml:space=\"preserve\">\n    <value>Fotocamera in-app</value>\n  </data>\n  <data name=\"Calls\" xml:space=\"preserve\">\n    <value>Chiamate</value>\n  </data>\n  <data name=\"CallsPrivacyDescription\" xml:space=\"preserve\">\n    <value>Chi può chiamarmi?</value>\n  </data>\n  <data name=\"CallsPrivacyImportantNote\" xml:space=\"preserve\">\n    <value>Puoi decidere chi può chiamarti.</value>\n  </data>\n  <data name=\"CallsPrivacyOverrideNote\" xml:space=\"preserve\">\n    <value>Questi utenti potranno o non potranno chiamarti indipendentemente dalle impostazioni precedenti.</value>\n  </data>\n  <data name=\"NoCallsHere\" xml:space=\"preserve\">\n    <value>Nessuna chiamata qui</value>\n  </data>\n  <data name=\"VoiceCall\" xml:space=\"preserve\">\n    <value>Chiamata vocale</value>\n  </data>\n  <data name=\"CameraRollFolder\" xml:space=\"preserve\">\n    <value>Rullino</value>\n  </data>\n  <data name=\"SavedPicturesFolder\" xml:space=\"preserve\">\n    <value>Foto salvate</value>\n  </data>\n  <data name=\"ScreenshotsFolder\" xml:space=\"preserve\">\n    <value>Schermate</value>\n  </data>\n  <data name=\"AccessCameraException\" xml:space=\"preserve\">\n    <value>Impossibile accedere alla fotocamera selezionata</value>\n  </data>\n  <data name=\"Answer\" xml:space=\"preserve\">\n    <value>Rispondi</value>\n  </data>\n  <data name=\"Calling\" xml:space=\"preserve\">\n    <value>Chiamo...</value>\n  </data>\n  <data name=\"EmojiKeyDescription\" xml:space=\"preserve\">\n    <value>Se le emoji sono uguali sullo schermo di {0}, la chiamata è sicura al 100%.</value>\n  </data>\n  <data name=\"EndCall\" xml:space=\"preserve\">\n    <value>Termina chiamata</value>\n  </data>\n  <data name=\"Speaker\" xml:space=\"preserve\">\n    <value>Altoparlante</value>\n  </data>\n  <data name=\"TouchToReturnToCall\" xml:space=\"preserve\">\n    <value>Tocca per tornare alla chiamata</value>\n  </data>\n  <data name=\"PaymentProvider\" xml:space=\"preserve\">\n    <value>Fornitore del pagamento</value>\n  </data>\n  <data name=\"PaymentsWarning\" xml:space=\"preserve\">\n    <value>I pagamenti saranno inviati direttamente allo sviluppatore di {0}. Telegram non può fornire alcuna garanzia, per cui procedi a tuo rischio. In caso di problemi, per favore contatta lo sviluppatore di {0} o la tua banca.</value>\n  </data>\n  <data name=\"SavePaymentInformation\" xml:space=\"preserve\">\n    <value>Salva info di pagamento</value>\n  </data>\n  <data name=\"SavePaymentInformationHint\" xml:space=\"preserve\">\n    <value>Puoi salvare le tue info di pagamento per uso futuro.</value>\n  </data>\n  <data name=\"SavedCardHint\" xml:space=\"preserve\">\n    <value>La tua carta {0} è registrata. Per pagare con questa carta, per favore inserisci la tua password della verifica in due passaggi.</value>\n  </data>\n  <data name=\"ChooseDifferentCard\" xml:space=\"preserve\">\n    <value>Scegli una carta differente</value>\n  </data>\n  <data name=\"Payments\" xml:space=\"preserve\">\n    <value>Pagamenti</value>\n  </data>\n  <data name=\"PaymentsSubtitle\" xml:space=\"preserve\">\n    <value>Cancella info di pagamento</value>\n  </data>\n  <data name=\"ShippingInfo\" xml:space=\"preserve\">\n    <value>Info di spedizione</value>\n  </data>\n  <data name=\"Ringing\" xml:space=\"preserve\">\n    <value>Squillo</value>\n  </data>\n  <data name=\"TurnOnTwoStepVerification\" xml:space=\"preserve\">\n    <value>Per favore *attiva la verifica in due passaggi* per abilitare questo.</value>\n  </data>\n  <data name=\"ChooseYourPhotoPickerApp\" xml:space=\"preserve\">\n    <value>Scegli il tuo selettore foto</value>\n  </data>\n  <data name=\"ExternalPhotoPicker\" xml:space=\"preserve\">\n    <value>Selettore foto estern</value>\n  </data>\n  <data name=\"InAppPhotoPicker\" xml:space=\"preserve\">\n    <value>Selettore foto in-app</value>\n  </data>\n  <data name=\"PhotoPicker\" xml:space=\"preserve\">\n    <value>Selettore foto</value>\n  </data>\n  <data name=\"PhotoPickerSubtitle\" xml:space=\"preserve\">\n    <value>Gestisci le impostazioni del selettore foto</value>\n  </data>\n  <data name=\"Chat\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"Ignore\" xml:space=\"preserve\">\n    <value>Ignora</value>\n  </data>\n  <data name=\"AddOptionalComment\" xml:space=\"preserve\">\n    <value>Aggiungi un commento opzionale</value>\n  </data>\n  <data name=\"RateCallQuality\" xml:space=\"preserve\">\n    <value>Per favore valuta la qualità della tua chiamata Telegram</value>\n  </data>\n  <data name=\"VoipBusy\" xml:space=\"preserve\">\n    <value>Occupato</value>\n  </data>\n  <data name=\"VoipConnecting\" xml:space=\"preserve\">\n    <value>Connetto</value>\n  </data>\n  <data name=\"VoipEnded\" xml:space=\"preserve\">\n    <value>Terminata</value>\n  </data>\n  <data name=\"VoipExchangingKeys\" xml:space=\"preserve\">\n    <value>Scambio delle chiavi di crittografia</value>\n  </data>\n  <data name=\"VoipFailed\" xml:space=\"preserve\">\n    <value>Fallita</value>\n  </data>\n  <data name=\"VoipHangingUp\" xml:space=\"preserve\">\n    <value>Riattacco</value>\n  </data>\n  <data name=\"VoipIncoming\" xml:space=\"preserve\">\n    <value>Chiamata in entrata</value>\n  </data>\n  <data name=\"VoipRequesting\" xml:space=\"preserve\">\n    <value>Richiedo</value>\n  </data>\n  <data name=\"VoipRinging\" xml:space=\"preserve\">\n    <value>Squillo</value>\n  </data>\n  <data name=\"VoipWaiting\" xml:space=\"preserve\">\n    <value>Attendo</value>\n  </data>\n  <data name=\"CallInProgressNotification\" xml:space=\"preserve\">\n    <value>Al momento hai una chiamata in corso con {0}.</value>\n  </data>\n  <data name=\"Connection\" xml:space=\"preserve\">\n    <value>Connessione</value>\n  </data>\n  <data name=\"ConnectionType\" xml:space=\"preserve\">\n    <value>Tipo di connessione</value>\n  </data>\n  <data name=\"CredentionalsOptional\" xml:space=\"preserve\">\n    <value>Credenziali (opzionali)</value>\n  </data>\n  <data name=\"Port\" xml:space=\"preserve\">\n    <value>Porta</value>\n  </data>\n  <data name=\"Server\" xml:space=\"preserve\">\n    <value>Server</value>\n  </data>\n  <data name=\"Socks5\" xml:space=\"preserve\">\n    <value>SOCKS5</value>\n  </data>\n  <data name=\"UseProxy\" xml:space=\"preserve\">\n    <value>Usa impostazioni proxy</value>\n  </data>\n  <data name=\"Proxy\" xml:space=\"preserve\">\n    <value>Impostazioni proxy</value>\n  </data>\n  <data name=\"ConnectingToProxy\" xml:space=\"preserve\">\n    <value>Connetto al proxy</value>\n  </data>\n  <data name=\"EnableProxyConfigmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler attivare questo proxy?</value>\n  </data>\n  <data name=\"ChangeProxy\" xml:space=\"preserve\">\n    <value>Imposta proxy</value>\n  </data>\n  <data name=\"ChangeProxyServerHint\" xml:space=\"preserve\">\n    <value>Puoi cambiare il tuo server proxy più tardi nelle Impostazioni.</value>\n  </data>\n  <data name=\"UseProxyHint\" xml:space=\"preserve\">\n    <value>Impostazioni proxy SOCKS5</value>\n  </data>\n  <data name=\"DeclinedCall\" xml:space=\"preserve\">\n    <value>Chiamata rifiutata</value>\n  </data>\n  <data name=\"MessageActionDeclinedCall\" xml:space=\"preserve\">\n    <value>Chiamata rifiutata</value>\n  </data>\n  <data name=\"VideoMessage\" xml:space=\"preserve\">\n    <value>Videomessaggio</value>\n  </data>\n  <data name=\"PeerToPeer\" xml:space=\"preserve\">\n    <value>Peer-to-Peer</value>\n  </data>\n  <data name=\"PeerToPeerDescription\" xml:space=\"preserve\">\n    <value>Disattivando il peer-to-peer, tutte le chiamate verranno inviate tramite i server di Telegram per evitare di rivelare l'indirizzo IP, ma la qualità audio diminuirà leggermente.</value>\n  </data>\n  <data name=\"Bio\" xml:space=\"preserve\">\n    <value>Bio</value>\n  </data>\n  <data name=\"BioDescription\" xml:space=\"preserve\">\n    <value>Puoi aggiungere qualche riga su di te.\nChiunque apra il tuo profilo vedrà questo testo.</value>\n  </data>\n  <data name=\"MessageActionPhotoExpired\" xml:space=\"preserve\">\n    <value>La foto è scaduta</value>\n  </data>\n  <data name=\"MessageActionVideoExpired\" xml:space=\"preserve\">\n    <value>Il video è scaduto</value>\n  </data>\n  <data name=\"Timer\" xml:space=\"preserve\">\n    <value>Timer</value>\n  </data>\n  <data name=\"SelfDestructTimerPhotoSubtitle\" xml:space=\"preserve\">\n    <value>Se imposti un timer, la foto si autodistruggerà dopo essere stata vista.</value>\n  </data>\n  <data name=\"SelfDestructTimerVideoSubtitle\" xml:space=\"preserve\">\n    <value>Se imposti un timer, il video si autodistruggerà dopo essere stato visto.</value>\n  </data>\n  <data name=\"SecretPhoto\" xml:space=\"preserve\">\n    <value>Foto segreta</value>\n  </data>\n  <data name=\"SecretVideo\" xml:space=\"preserve\">\n    <value>Video segreto</value>\n  </data>\n  <data name=\"ChooseFromYourStickers\" xml:space=\"preserve\">\n    <value>Scegli dai tuoi sticker</value>\n  </data>\n  <data name=\"CreateStickerSetHint\" xml:space=\"preserve\">\n    <value>Puoi creare i tuoi set di sticker personalizzati tramite il bot @stickers.</value>\n  </data>\n  <data name=\"GroupStickers\" xml:space=\"preserve\">\n    <value>Sticker del gruppo</value>\n  </data>\n  <data name=\"GroupStickersDescription\" xml:space=\"preserve\">\n    <value>Puoi rendere un set di sticker disponibile a tutti i membri che scrivono all'interno di questo gruppo.</value>\n  </data>\n  <data name=\"AddToFavorites\" xml:space=\"preserve\">\n    <value>Aggiungi ai preferiti</value>\n  </data>\n  <data name=\"DeleteFromFavorites\" xml:space=\"preserve\">\n    <value>Rimuovi dai preferiti</value>\n  </data>\n  <data name=\"NoStickerSetFound\" xml:space=\"preserve\">\n    <value>Nessun set di sticker trovato</value>\n  </data>\n  <data name=\"NoStickerSetFoundSubtitle\" xml:space=\"preserve\">\n    <value>Riprova o scegli dalla lista seguente</value>\n  </data>\n  <data name=\"Auto\" xml:space=\"preserve\">\n    <value>Auto</value>\n  </data>\n  <data name=\"VideoQuality\" xml:space=\"preserve\">\n    <value>Qualità video</value>\n  </data>\n  <data name=\"Quality\" xml:space=\"preserve\">\n    <value>Qualità</value>\n  </data>\n  <data name=\"ClearUnreadMentionsConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler cancellare tutte le menzioni non lette?</value>\n  </data>\n  <data name=\"PasswordEmail\" xml:space=\"preserve\">\n    <value>Password e email</value>\n  </data>\n  <data name=\"CreatePasswordHint\" xml:space=\"preserve\">\n    <value>Per favore crea una password per proteggere le tue info di pagamento.\nTi verrà chiesta durante l'accesso</value>\n  </data>\n  <data name=\"SendLiveLocation\" xml:space=\"preserve\">\n    <value>Condividi posizione in diretta</value>\n  </data>\n  <data name=\"SendLiveLocationSubtitle\" xml:space=\"preserve\">\n    <value>Aggiornata in tempo reale</value>\n  </data>\n  <data name=\"LiveLocation\" xml:space=\"preserve\">\n    <value>Posizione in diretta</value>\n  </data>\n  <data name=\"ShareLiveLocationToContactTimerSubtitle\" xml:space=\"preserve\">\n    <value>Scegli per quanto tempo {0} vedrà la tua posizione precisa.</value>\n  </data>\n  <data name=\"ContactJoinedTelegram\" xml:space=\"preserve\">\n    <value>Un contatto si è unito a Telegram</value>\n  </data>\n  <data name=\"Events\" xml:space=\"preserve\">\n    <value>Eventi</value>\n  </data>\n  <data name=\"ChatHistoryCaption\" xml:space=\"preserve\">\n    <value>Cronologia chat per i nuovi membri</value>\n  </data>\n  <data name=\"ChatHistoryHidden\" xml:space=\"preserve\">\n    <value>I nuovi membri non vedranno i messaggi precedenti</value>\n  </data>\n  <data name=\"ChatHistoryVisible\" xml:space=\"preserve\">\n    <value>I nuovi membri vedranno tutta la cronologia</value>\n  </data>\n  <data name=\"DescriptionOptional\" xml:space=\"preserve\">\n    <value>Descrizione (opzionale)</value>\n  </data>\n  <data name=\"Hidden\" xml:space=\"preserve\">\n    <value>Nascosta</value>\n  </data>\n  <data name=\"Visible\" xml:space=\"preserve\">\n    <value>Visibile</value>\n  </data>\n  <data name=\"LocationSharingEnded\" xml:space=\"preserve\">\n    <value>Condivisione posizione terminata</value>\n  </data>\n  <data name=\"Map\" xml:space=\"preserve\">\n    <value>Mappa</value>\n  </data>\n  <data name=\"MessageActionPinGeoLive\" xml:space=\"preserve\">\n    <value>{0} ha fissato una posizione in diretta</value>\n  </data>\n  <data name=\"For15Minutes\" xml:space=\"preserve\">\n    <value>Per 15 minuti</value>\n  </data>\n  <data name=\"For1Hour\" xml:space=\"preserve\">\n    <value>Per 1 ora</value>\n  </data>\n  <data name=\"For8Hours\" xml:space=\"preserve\">\n    <value>Per 8 ore</value>\n  </data>\n  <data name=\"MessageActionClearHistory\" xml:space=\"preserve\">\n    <value>Cronologia eliminata</value>\n  </data>\n  <data name=\"Updated\" xml:space=\"preserve\">\n    <value>Aggiornata</value>\n  </data>\n  <data name=\"UpdatedAgo\" xml:space=\"preserve\">\n    <value>Aggiornata {0} fa</value>\n  </data>\n  <data name=\"UpdatedAtDate\" xml:space=\"preserve\">\n    <value>Aggiornata {0} alle {1}</value>\n  </data>\n  <data name=\"UpdatedJustNow\" xml:space=\"preserve\">\n    <value>Aggiornata adesso</value>\n  </data>\n  <data name=\"UpdatedTodayAt\" xml:space=\"preserve\">\n    <value>Aggiornata oggi alle {0}</value>\n  </data>\n  <data name=\"UpdatedYesterdayAt\" xml:space=\"preserve\">\n    <value>Aggiornata ieri alle {0}</value>\n  </data>\n  <data name=\"StopSharingLocation\" xml:space=\"preserve\">\n    <value>Termina condivisione posizione</value>\n  </data>\n  <data name=\"ShareLiveLocationToChatTimerSubtitle\" xml:space=\"preserve\">\n    <value>Scegli per quanto tempo le persone in questa chat vedranno la tua posizione precisa.</value>\n  </data>\n  <data name=\"NewStickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Nuovi set di sticker</value>\n  </data>\n  <data name=\"NewStickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Nuovo set di sticker</value>\n  </data>\n  <data name=\"StickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Set di sticker</value>\n  </data>\n  <data name=\"StickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Set di sticker</value>\n  </data>\n  <data name=\"MaskPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Set di maschere</value>\n  </data>\n  <data name=\"MaskPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Set di maschere</value>\n  </data>\n  <data name=\"GroupNameInvalid\" xml:space=\"preserve\">\n    <value>Spiacenti, questo nome non è valido.</value>\n  </data>\n  <data name=\"GroupNameOccupied\" xml:space=\"preserve\">\n    <value>Spiacenti, questo nome è già stato preso.</value>\n  </data>\n  <data name=\"GroupNameShort\" xml:space=\"preserve\">\n    <value>I nomi dei gruppi devono avere almeno 5 caratteri.</value>\n  </data>\n  <data name=\"GroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>I nomi dei gruppi non possono iniziare con un numero.</value>\n  </data>\n  <data name=\"AttachLiveLocationIsSharing\" xml:space=\"preserve\">\n    <value>Condivisa con {0}</value>\n  </data>\n  <data name=\"SharingLiveLocationTitle\" xml:space=\"preserve\">\n    <value>Stai condividendo la tua posizione attuale con {0}</value>\n  </data>\n  <data name=\"SharingYouAndOtherName\" xml:space=\"preserve\">\n    <value>Tu e {0}</value>\n  </data>\n  <data name=\"StopAllLocationSharings\" xml:space=\"preserve\">\n    <value>Arresta tutto</value>\n  </data>\n  <data name=\"StopLiveLocationAlertAll\" xml:space=\"preserve\">\n    <value>Vuoi terminare la condivisione della tua posizione attuale?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToGroup\" xml:space=\"preserve\">\n    <value>Vuoi terminare la condivisione della tua posizione attuale con {0}?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToUser\" xml:space=\"preserve\">\n    <value>Vuoi terminare la condivisione della tua posizione attuale con {0}?</value>\n  </data>\n  <data name=\"HourShort\" xml:space=\"preserve\">\n    <value>h</value>\n  </data>\n  <data name=\"ChatGenitivePlural\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"ChatGenitiveSingular\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"ChatNominativePlural\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"ChatNominativeSingular\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\n    <value>Messaggi salvati</value>\n  </data>\n  <data name=\"ForwardHereToSave\" xml:space=\"preserve\">\n    <value>Inoltra qui per salvare</value>\n  </data>\n  <data name=\"MicrophoneAccessDenied\" xml:space=\"preserve\">\n    <value>Accesso negato al microfono</value>\n  </data>\n  <data name=\"MicrophoneAccessDeniedDescription\" xml:space=\"preserve\">\n    <value>Telegram non è stato in grado di accedere al microfono. Per favore assicurati che Telegram possa usare il microfono nelle Impostazioni di privacy e riavvia l'app.</value>\n  </data>\n  <data name=\"SendCallLogs\" xml:space=\"preserve\">\n    <value>Invia log di chiamata</value>\n  </data>\n  <data name=\"GroupMediaDescription\" xml:space=\"preserve\">\n    <value>Mostra i media come messaggio unico</value>\n  </data>\n  <data name=\"UngroupMediaDescription\" xml:space=\"preserve\">\n    <value>Mostra i media come messaggi separati</value>\n  </data>\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\n    <value>Account eliminato</value>\n  </data>\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\n    <value>Account eliminato</value>\n  </data>\n  <data name=\"Album\" xml:space=\"preserve\">\n    <value>Album</value>\n  </data>\n  <data name=\"DeleteMessagesConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler eliminare {0}?</value>\n  </data>\n  <data name=\"MessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Messaggi</value>\n  </data>\n  <data name=\"MessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Messaggio</value>\n  </data>\n  <data name=\"MessageNominativePlural\" xml:space=\"preserve\">\n    <value>Messaggi</value>\n  </data>\n  <data name=\"MessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Messaggio</value>\n  </data>\n  <data name=\"SubscriberGenitivePlural\" xml:space=\"preserve\">\n    <value>Iscritti</value>\n  </data>\n  <data name=\"SubscriberGenitiveSingular\" xml:space=\"preserve\">\n    <value>Iscritto</value>\n  </data>\n  <data name=\"SubscriberNominativePlural\" xml:space=\"preserve\">\n    <value>Iscritti</value>\n  </data>\n  <data name=\"SubscriberNominativeSingular\" xml:space=\"preserve\">\n    <value>Iscritto</value>\n  </data>\n  <data name=\"LogOutAllApplications\" xml:space=\"preserve\">\n    <value>Disconnetti tutti i siti web</value>\n  </data>\n  <data name=\"LogOutAllApplicationsNote\" xml:space=\"preserve\">\n    <value/>\n  </data>\n  <data name=\"LoggedInWithTelegram\" xml:space=\"preserve\">\n    <value>Connessi con Telegram</value>\n  </data>\n  <data name=\"LogOutAllApplicationsConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler disconnettere tutti i siti web in cui hai usato Telegram per accedere?</value>\n  </data>\n  <data name=\"NoItemsHere\" xml:space=\"preserve\">\n    <value>Nessun oggetto qui</value>\n  </data>\n  <data name=\"Group\" xml:space=\"preserve\">\n    <value>Raggruppa</value>\n  </data>\n  <data name=\"Ungroup\" xml:space=\"preserve\">\n    <value>Separa</value>\n  </data>\n  <data name=\"AboutApp\" xml:space=\"preserve\">\n    <value>Info</value>\n  </data>\n  <data name=\"NoActiveLogins\" xml:space=\"preserve\">\n    <value>Nessun accesso attivo.\n\nPuoi accedere ai siti web che supportano l'iscrizione tramite Telegram.</value>\n  </data>\n  <data name=\"Feed\" xml:space=\"preserve\">\n    <value>Feed</value>\n  </data>\n  <data name=\"ChannelGenitivePlural\" xml:space=\"preserve\">\n    <value>Canali</value>\n  </data>\n  <data name=\"ChannelGenitiveSingular\" xml:space=\"preserve\">\n    <value>Canale</value>\n  </data>\n  <data name=\"ChannelNominativePlural\" xml:space=\"preserve\">\n    <value>Canali</value>\n  </data>\n  <data name=\"ChannelNominativeSingular\" xml:space=\"preserve\">\n    <value>Canale</value>\n  </data>\n  <data name=\"ShowNext\" xml:space=\"preserve\">\n    <value>Mostra il prossimo</value>\n  </data>\n  <data name=\"GroupNewChannels\" xml:space=\"preserve\">\n    <value>Raggruppa nuovi canali</value>\n  </data>\n  <data name=\"MessageActionBotAllowed\" xml:space=\"preserve\">\n    <value>Hai consentito a questo bot di scriverti quando ti sei collegato su {0}</value>\n  </data>\n  <data name=\"NoStickersFound\" xml:space=\"preserve\">\n    <value>Nessuno sticker trovato</value>\n  </data>\n  <data name=\"ConnectedWebsites\" xml:space=\"preserve\">\n    <value>Siti web connessi</value>\n  </data>\n  <data name=\"ConnectedWebsitesHint\" xml:space=\"preserve\">\n    <value>Puoi accedere ai siti web che supportano l'iscrizione tramite Telegram.</value>\n  </data>\n  <data name=\"TapToDisconnectTelegramAccount\" xml:space=\"preserve\">\n    <value>Tocca per disconnettere dal tuo account Telegram.</value>\n  </data>\n  <data name=\"TelegramPassport\" xml:space=\"preserve\">\n    <value>Telegram Passport</value>\n  </data>\n  <data name=\"Authorize\" xml:space=\"preserve\">\n    <value>Autorizza</value>\n  </data>\n  <data name=\"Email2\" xml:space=\"preserve\">\n    <value>E-Mail</value>\n  </data>\n  <data name=\"PassportPersonalDetailsInfo\" xml:space=\"preserve\">\n    <value>Inserisci i tuoi dettagli personali</value>\n  </data>\n  <data name=\"PassportHint\" xml:space=\"preserve\">\n    <value>{0} richiede l'accesso ai tuoi dati personali per l'iscrizione ai suoi servizi.</value>\n  </data>\n  <data name=\"PassportAddress\" xml:space=\"preserve\">\n    <value>Indirizzo</value>\n  </data>\n  <data name=\"PassportAddressInfo\" xml:space=\"preserve\">\n    <value>Carica una prova del tuo indirizzo</value>\n  </data>\n  <data name=\"PassportNoPolicy\" xml:space=\"preserve\">\n    <value>Stai inviando i tuoi documenti direttamente a {0} e autorizzi il loro {1} a inviarti messaggi.</value>\n  </data>\n  <data name=\"AllSets\" xml:space=\"preserve\">\n    <value>Tutti i set</value>\n  </data>\n  <data name=\"MySets\" xml:space=\"preserve\">\n    <value>I miei set</value>\n  </data>\n  <data name=\"None\" xml:space=\"preserve\">\n    <value>Nessuno</value>\n  </data>\n  <data name=\"SuggestStickersByEmoji\" xml:space=\"preserve\">\n    <value>Suggerisci da emoji</value>\n  </data>\n  <data name=\"MTProto\" xml:space=\"preserve\">\n    <value>MTPROTO</value>\n  </data>\n  <data name=\"UseProxyForCalls\" xml:space=\"preserve\">\n    <value>Usa il proxy per le chiamate</value>\n  </data>\n  <data name=\"UseProxyForCallsHint\" xml:space=\"preserve\">\n    <value>I server proxy potrebbero ridurre la qualità delle tue chiamate.</value>\n  </data>\n  <data name=\"Connections\" xml:space=\"preserve\">\n    <value>Connessioni</value>\n  </data>\n  <data name=\"AddProxy\" xml:space=\"preserve\">\n    <value>Aggiungi proxy</value>\n  </data>\n  <data name=\"Secret\" xml:space=\"preserve\">\n    <value>Segreto</value>\n  </data>\n  <data name=\"UseTelegramProxyHint\" xml:space=\"preserve\">\n    <value>Impostazioni proxy Telegram</value>\n  </data>\n  <data name=\"Available\" xml:space=\"preserve\">\n    <value>Disponibile</value>\n  </data>\n  <data name=\"Checking\" xml:space=\"preserve\">\n    <value>Controllo</value>\n  </data>\n  <data name=\"Connected\" xml:space=\"preserve\">\n    <value>Connesso</value>\n  </data>\n  <data name=\"Unavailable\" xml:space=\"preserve\">\n    <value>Non disponibile</value>\n  </data>\n  <data name=\"TermsOfService\" xml:space=\"preserve\">\n    <value>Termini di servizio</value>\n  </data>\n  <data name=\"TermsOfServiceLink\" xml:space=\"preserve\">\n    <value>Iscrivendoti,\naccetti i *Termini di servizio*.</value>\n  </data>\n  <data name=\"DeleteSyncedContacts\" xml:space=\"preserve\">\n    <value>Elimina contatti sincronizzati</value>\n  </data>\n  <data name=\"SyncContacts\" xml:space=\"preserve\">\n    <value>Sincronizza contatti</value>\n  </data>\n  <data name=\"SyncContactsDeleteInfo\" xml:space=\"preserve\">\n    <value>Questo rimuoverà i tuoi contatti dai server di Telegram. Se 'Sincronizza contatti' è attivo, i contatti saranno risincronizzati.</value>\n  </data>\n  <data name=\"SyncContactsInfoOff\" xml:space=\"preserve\">\n    <value>Attiva per mantenere sincronizzati i contatti da questo dispositivo con il tuo account.</value>\n  </data>\n  <data name=\"SyncContactsInfoOn\" xml:space=\"preserve\">\n    <value>I contatti da questo dispositivo sono stati aggiunti al tuo account.</value>\n  </data>\n  <data name=\"LinkPreviewsHint\" xml:space=\"preserve\">\n    <value>Le anteprime dei link saranno generate dai server di Telegram. Non archiviamo dati sui link che invii.</value>\n  </data>\n  <data name=\"DeleteSyncedContactsConfirmation\" xml:space=\"preserve\">\n    <value>Questo rimuoverà i tuoi contatti dai server di Telegram. Se 'Sincronizza contatti' è attivo, i contatti saranno risincronizzati.</value>\n  </data>\n  <data name=\"ProxyDisabledNotification\" xml:space=\"preserve\">\n    <value>Il proxy che stai usando non è configurato correttamente e sarà disattivato. Per favore trovane un altro.</value>\n  </data>\n  <data name=\"ProxySponsor\" xml:space=\"preserve\">\n    <value>Sponsor del proxy</value>\n  </data>\n  <data name=\"ProxySponsorAbout\" xml:space=\"preserve\">\n    <value>Questo canale è mostrato dal tuo server proxy.\nPer rimuovere questo canale dalla tua lista chat,\ndisattiva il proxy nelle Impostazioni di Telegram.</value>\n  </data>\n  <data name=\"ProxySponsorWarning\" xml:space=\"preserve\">\n    <value>Questo proxy potrebbe mostrare un canale sponsorizzato nella tua lista chat. Questo non rivela nulla del tuo traffico Telegram.</value>\n  </data>\n  <data name=\"MarkRead\" xml:space=\"preserve\">\n    <value>Segna come letto</value>\n  </data>\n  <data name=\"MarkUnread\" xml:space=\"preserve\">\n    <value>Segna come non letto</value>\n  </data>\n  <data name=\"SuggestFrequentContacts\" xml:space=\"preserve\">\n    <value>Suggerisci contatti frequenti</value>\n  </data>\n  <data name=\"SuggestFrequentContactsAbout\" xml:space=\"preserve\">\n    <value>Visualizza le persone che contatti di frequente nella parte superiore della sezione di ricerca per un accesso rapido.</value>\n  </data>\n  <data name=\"SuggestFrequentContactsNotification\" xml:space=\"preserve\">\n    <value>Questo eliminerà tutti i dati delle persone che contatti di frequente e dei bot inline che usi di solito.</value>\n  </data>\n  <data name=\"ViewContact\" xml:space=\"preserve\">\n    <value>Visualizza contatto</value>\n  </data>\n  <data name=\"PhoneKindHome\" xml:space=\"preserve\">\n    <value>Casa</value>\n  </data>\n  <data name=\"PhoneKindMobile\" xml:space=\"preserve\">\n    <value>Mobile</value>\n  </data>\n  <data name=\"PhoneKindOther\" xml:space=\"preserve\">\n    <value>Altro</value>\n  </data>\n  <data name=\"PhoneKindWork\" xml:space=\"preserve\">\n    <value>Lavoro</value>\n  </data>\n  <data name=\"PassportAddAgreement\" xml:space=\"preserve\">\n    <value>Aggiungi contratto di locazione</value>\n  </data>\n  <data name=\"PassportAddAgreementInfo\" xml:space=\"preserve\">\n    <value>Carica una scansione del tuo contratto di locazione.</value>\n  </data>\n  <data name=\"PassportAddBank\" xml:space=\"preserve\">\n    <value>Aggiungi estratto conto</value>\n  </data>\n  <data name=\"PassportAddBankInfo\" xml:space=\"preserve\">\n    <value>Carica una scansione del tuo estratto conto.</value>\n  </data>\n  <data name=\"PassportAddBill\" xml:space=\"preserve\">\n    <value>Aggiungi bolletta</value>\n  </data>\n  <data name=\"PassportAddBillInfo\" xml:space=\"preserve\">\n    <value>Carica una scansione della tua bolletta.</value>\n  </data>\n  <data name=\"PassportAddPassportRegistration\" xml:space=\"preserve\">\n    <value>Registrazione passaporto</value>\n  </data>\n  <data name=\"PassportAddPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>Carica una scansione della pagina di registrazione del tuo passaporto.</value>\n  </data>\n  <data name=\"PassportAddressHeader\" xml:space=\"preserve\">\n    <value>Indirizzo</value>\n  </data>\n  <data name=\"PassportCity\" xml:space=\"preserve\">\n    <value>Città</value>\n  </data>\n  <data name=\"PassportCountry\" xml:space=\"preserve\">\n    <value>Paese</value>\n  </data>\n  <data name=\"PassportDeleteDocument\" xml:space=\"preserve\">\n    <value>Elimina documento</value>\n  </data>\n  <data name=\"PassportDeleteDocumentAlert\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler eliminare questo documento?</value>\n  </data>\n  <data name=\"PassportDeleteScan\" xml:space=\"preserve\">\n    <value>Elimina scansione</value>\n  </data>\n  <data name=\"PassportDocuments\" xml:space=\"preserve\">\n    <value>Scansioni</value>\n  </data>\n  <data name=\"PassportPostcode\" xml:space=\"preserve\">\n    <value>Codice postale</value>\n  </data>\n  <data name=\"PassportState\" xml:space=\"preserve\">\n    <value>Provincia</value>\n  </data>\n  <data name=\"PassportStreet1\" xml:space=\"preserve\">\n    <value>Via</value>\n  </data>\n  <data name=\"PassportStreet2\" xml:space=\"preserve\">\n    <value>Via</value>\n  </data>\n  <data name=\"PassportUploadAdditinalDocument\" xml:space=\"preserve\">\n    <value>Aggiungi scansioni aggiuntive</value>\n  </data>\n  <data name=\"PassportUploadDocument\" xml:space=\"preserve\">\n    <value>Carica scansioni</value>\n  </data>\n  <data name=\"PassportDeleteScanAlert\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler eliminare questa scansione?</value>\n  </data>\n  <data name=\"PassportEmailInfo\" xml:space=\"preserve\">\n    <value>Inserisci il tuo indirizzo email</value>\n  </data>\n  <data name=\"PassportPhoneInfo\" xml:space=\"preserve\">\n    <value>Inserisci il tuo numero di telefono</value>\n  </data>\n  <data name=\"UpdateApp\" xml:space=\"preserve\">\n    <value>Aggiorna app</value>\n  </data>\n  <data name=\"PassportPhone\" xml:space=\"preserve\">\n    <value>Numero di telefono</value>\n  </data>\n  <data name=\"PassportPhoneUploadInfo\" xml:space=\"preserve\">\n    <value>Nota: riceverai un codice di conferma al numero di telefono fornito.</value>\n  </data>\n  <data name=\"PassportPhoneUseOther\" xml:space=\"preserve\">\n    <value>O inserisci un nuovo numero di telefono</value>\n  </data>\n  <data name=\"PassportPhoneUseSame\" xml:space=\"preserve\">\n    <value>Usa {0}</value>\n  </data>\n  <data name=\"PassportPhoneUseSameInfo\" xml:space=\"preserve\">\n    <value>Usa lo stesso numero di telefono di Telegram. </value>\n  </data>\n  <data name=\"PassportDeletePhoneNumberAlert\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler eliminare il numero di telefono?</value>\n  </data>\n  <data name=\"MessageActionSecureValuesSent\" xml:space=\"preserve\">\n    <value>{0} ha ricevuto i seguenti documenti: {1}</value>\n  </data>\n  <data name=\"DeleteAllCloudDrafts\" xml:space=\"preserve\">\n    <value>Elimina tutte le bozze</value>\n  </data>\n  <data name=\"DeleteAllCloudDraftsConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler eliminare tutte le bozze?</value>\n  </data>\n  <data name=\"PassportRequestPasswordInfo\" xml:space=\"preserve\">\n    <value>Per favore inserisci la tua password di Telegram per decriptare i tuoi dati.</value>\n  </data>\n  <data name=\"PassportSelfRequest\" xml:space=\"preserve\">\n    <value>Per favore inserisci la tua password per accedere ai tuoi dati personali.</value>\n  </data>\n  <data name=\"PassportDelete\" xml:space=\"preserve\">\n    <value>Elimina</value>\n  </data>\n  <data name=\"PassportNoDocumentsAdd\" xml:space=\"preserve\">\n    <value>Aggiungi un documento</value>\n  </data>\n  <data name=\"PassportEmail\" xml:space=\"preserve\">\n    <value>Email</value>\n  </data>\n  <data name=\"PassportPersonal\" xml:space=\"preserve\">\n    <value>Dettagli personali</value>\n  </data>\n  <data name=\"PassportUtilityBill\" xml:space=\"preserve\">\n    <value>Bolletta</value>\n  </data>\n  <data name=\"PassportProvidedInformation\" xml:space=\"preserve\">\n    <value>Informazioni fornite</value>\n  </data>\n  <data name=\"PassportRequestedInformation\" xml:space=\"preserve\">\n    <value>Informazioni richieste</value>\n  </data>\n  <data name=\"PassportDeleteConfirmation\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler eliminare il tuo Telegram Passport?</value>\n  </data>\n  <data name=\"Passport\" xml:space=\"preserve\">\n    <value>Telegram Passport</value>\n  </data>\n  <data name=\"PassportBankStatement\" xml:space=\"preserve\">\n    <value>Estratto conto</value>\n  </data>\n  <data name=\"PassportDriverLicence\" xml:space=\"preserve\">\n    <value>Patente di guida</value>\n  </data>\n  <data name=\"PassportEmailAddress\" xml:space=\"preserve\">\n    <value>Indirizzo emai</value>\n  </data>\n  <data name=\"PassportIdentityCard\" xml:space=\"preserve\">\n    <value>Carta d'identità</value>\n  </data>\n  <data name=\"PassportInternal\" xml:space=\"preserve\">\n    <value>Passaporto nazionale</value>\n  </data>\n  <data name=\"PassportPersonalDetails\" xml:space=\"preserve\">\n    <value>Dettagli personali</value>\n  </data>\n  <data name=\"PassportPhoneNumber\" xml:space=\"preserve\">\n    <value>Numero di telefono</value>\n  </data>\n  <data name=\"PassportRegistration\" xml:space=\"preserve\">\n    <value>Registrazione passaporto</value>\n  </data>\n  <data name=\"PassportTemporaryRegistration\" xml:space=\"preserve\">\n    <value>Registrazione temporanea</value>\n  </data>\n  <data name=\"PassportTenancyAgreement\" xml:space=\"preserve\">\n    <value>Contratto di locazione</value>\n  </data>\n  <data name=\"PassportDeleteEmailAlert\" xml:space=\"preserve\">\n    <value>Se sicuro di voler eliminare l'email?</value>\n  </data>\n  <data name=\"PassportDeleteAll\" xml:space=\"preserve\">\n    <value>Elimina Telegram Passport</value>\n  </data>\n  <data name=\"PassportDeleteAddressAlert\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler eliminare i dettagli dell'indirizzo?</value>\n  </data>\n  <data name=\"PassportAddTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Carica una scansione della tua registrazione temporanea.</value>\n  </data>\n  <data name=\"PassportResidentialAddress\" xml:space=\"preserve\">\n    <value>Indirizzo di residenza</value>\n  </data>\n  <data name=\"PassportDeleteAddressDetails\" xml:space=\"preserve\">\n    <value>Elimina dettagli indirizzo</value>\n  </data>\n  <data name=\"PassportUploadMaxReached\" xml:space=\"preserve\">\n    <value>Non puoi caricare più di {0} file.</value>\n  </data>\n  <data name=\"PassportCorrectErrors\" xml:space=\"preserve\">\n    <value>Tocca per correggere gli errori.</value>\n  </data>\n  <data name=\"PassportUseLatinOnly\" xml:space=\"preserve\">\n    <value>Usare solo caratteri latini.</value>\n  </data>\n  <data name=\"PassportInfo\" xml:space=\"preserve\">\n    <value>Con Telegram Passport puoi iscriverti facilmente ai siti web e ai servizi che richiedono la verifica dell'identità.\n\nLe tue informazioni, i tuoi dati personali e i tuoi documenti sono protetti da crittografia end-to-end. Nessuno, incluso Telegram, può accedervi senza il tuo permesso.\n\nPuoi visitare le nostre FAQ per saperne di più.</value>\n  </data>\n  <data name=\"PassportFormError\" xml:space=\"preserve\">\n    <value>Impossibile ottenere il modulo di autorizzazione.</value>\n  </data>\n  <data name=\"TurnPasswordOffPassport\" xml:space=\"preserve\">\n    <value>Attenzione! Tutti i dati salvati nel tuo Telegram Passport andranno persi!</value>\n  </data>\n  <data name=\"TurnPasswordOffQuestion\" xml:space=\"preserve\">\n    <value>Sei sicuro di voler disattivare la tua password?</value>\n  </data>\n  <data name=\"PassportNoDocuments\" xml:space=\"preserve\">\n    <value>Non hai ancora documenti</value>\n  </data>\n  <data name=\"PassportNoDocumentsInfo\" xml:space=\"preserve\">\n    <value>Puoi aggiungere il tuo numero di telefono, indirizzo email, documento d'identità o indirizzo di residenza.</value>\n  </data>\n  <data name=\"TelegramPassportCreatePassword\" xml:space=\"preserve\">\n    <value>Crea una password</value>\n  </data>\n  <data name=\"TelegramPassportCreatePasswordInfo\" xml:space=\"preserve\">\n    <value>Per favore crea una password per rendere sicuri i tuoi dati personali tramite crittografia end-to-end.\n\nQuesta password sarà inoltre richiesta ogni volta che accedi a Telegram su un nuovo dispositivo.</value>\n  </data>\n  <data name=\"PassportEmailUploadInfo\" xml:space=\"preserve\">\n    <value>Nota: riceverai un codice di conferma all'indirizzo email fornito.</value>\n  </data>\n  <data name=\"PassportEmailUseSameInfo\" xml:space=\"preserve\">\n    <value>Usa la stessa email di Telegram. </value>\n  </data>\n  <data name=\"EmailInvalidString\" xml:space=\"preserve\">\n    <value>Email non valida. Per favore riprova.</value>\n  </data>\n  <data name=\"PassportEmailVerifyInfo\" xml:space=\"preserve\">\n    <value>Per favore inserisci il codice di conferma che abbiamo appena inviato a {0}.</value>\n  </data>\n  <data name=\"EmailCodeEmpty\" xml:space=\"preserve\">\n    <value>Codice vuoto. Per favore riprova.</value>\n  </data>\n  <data name=\"EmailCodeExpiredString\" xml:space=\"preserve\">\n    <value>Codice scaduto. Per favore riprova.</value>\n  </data>\n  <data name=\"EmailCodeInvalidString\" xml:space=\"preserve\">\n    <value>Hai inserito un codice non valido. Per favore riprova.</value>\n  </data>\n  <data name=\"PassportBirthdate\" xml:space=\"preserve\">\n    <value>Data di nascita</value>\n  </data>\n  <data name=\"PassportCitizenship\" xml:space=\"preserve\">\n    <value>Cittadinanza</value>\n  </data>\n  <data name=\"PassportFemale\" xml:space=\"preserve\">\n    <value>Donna</value>\n  </data>\n  <data name=\"PassportGender\" xml:space=\"preserve\">\n    <value>Genere</value>\n  </data>\n  <data name=\"PassportMale\" xml:space=\"preserve\">\n    <value>Uomo</value>\n  </data>\n  <data name=\"PassportName\" xml:space=\"preserve\">\n    <value>Nome</value>\n  </data>\n  <data name=\"PassportResidence\" xml:space=\"preserve\">\n    <value>Residenza</value>\n  </data>\n  <data name=\"PassportSurname\" xml:space=\"preserve\">\n    <value>Cognome</value>\n  </data>\n  <data name=\"PassportSelectGender\" xml:space=\"preserve\">\n    <value>Seleziona genere</value>\n  </data>\n  <data name=\"PassportSelectDate\" xml:space=\"preserve\">\n    <value>Seleziona data</value>\n  </data>\n  <data name=\"PassportDocumentNumber\" xml:space=\"preserve\">\n    <value>Numero documento</value>\n  </data>\n  <data name=\"PassportExpired\" xml:space=\"preserve\">\n    <value>Data di scadenza</value>\n  </data>\n  <data name=\"PassportFrontSide\" xml:space=\"preserve\">\n    <value>Lato frontale</value>\n  </data>\n  <data name=\"PassportFrontSideInfo\" xml:space=\"preserve\">\n    <value>Carica una foto del lato frontale del documento</value>\n  </data>\n  <data name=\"PassportPersonalUploadInfo\" xml:space=\"preserve\">\n    <value>Il documento deve contenere la tua foto, il nome, il cognome, la data di nascita, il numero del documento, il paese di emissione e la data di scadenza.</value>\n  </data>\n  <data name=\"PassportRequiredDocuments\" xml:space=\"preserve\">\n    <value>Documenti richiesti</value>\n  </data>\n  <data name=\"PassportReverseSide\" xml:space=\"preserve\">\n    <value>Lato posteriore</value>\n  </data>\n  <data name=\"PassportReverseSideInfo\" xml:space=\"preserve\">\n    <value>Carica una scansione del lato posteriore del documento</value>\n  </data>\n  <data name=\"PassportSelfie\" xml:space=\"preserve\">\n    <value>Selfie</value>\n  </data>\n  <data name=\"PassportSelfieInfo\" xml:space=\"preserve\">\n    <value>Carica un tuo selfie mentre reggi il documento.</value>\n  </data>\n  <data name=\"PassportSelectNotExpire\" xml:space=\"preserve\">\n    <value>Non scade</value>\n  </data>\n  <data name=\"PassportDeleteDocumentPersonal\" xml:space=\"preserve\">\n    <value>Elimina dettagli personali</value>\n  </data>\n  <data name=\"PassportMainPage\" xml:space=\"preserve\">\n    <value>Pagina principale</value>\n  </data>\n  <data name=\"PassportMainPageInfo\" xml:space=\"preserve\">\n    <value>Carica una foto della pagina principale del documento</value>\n  </data>\n  <data name=\"PassportNoExpireDate\" xml:space=\"preserve\">\n    <value>Nessuna</value>\n  </data>\n  <data name=\"UpdateAppAlert\" xml:space=\"preserve\">\n    <value>Spiacenti, la tua app Telegram è obsoleta e non può gestire la richiesta. Per favore aggiorna Telegram.</value>\n  </data>\n  <data name=\"PassportInfoTitle\" xml:space=\"preserve\">\n    <value>Cos'è Telegram Passport?</value>\n  </data>\n  <data name=\"Copyright\" xml:space=\"preserve\">\n    <value>Copyright</value>\n  </data>\n  <data name=\"PassportAddTranslationDriverLicenceInfo\" xml:space=\"preserve\">\n    <value>Carica le scansioni di una traduzione inglese verificata della tua patente.</value>\n  </data>\n  <data name=\"PassportAddTranslationIdentityCardInfo\" xml:space=\"preserve\">\n    <value>Carica le scansioni di una traduzione inglese verificata della tua carta d'identità.</value>\n  </data>\n  <data name=\"PassportAddTranslationInternalPassportInfo\" xml:space=\"preserve\">\n    <value>Carica le scansioni di una traduzione inglese verificata del tuo passaporto nazionale.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportInfo\" xml:space=\"preserve\">\n    <value>Carica le scansioni di una traduzione inglese verificata del tuo passaporto.</value>\n  </data>\n  <data name=\"PassportAddTranslationAgreementInfo\" xml:space=\"preserve\">\n    <value>Carica le scansioni di una traduzione inglese verificata del tuo contratto di locazione.</value>\n  </data>\n  <data name=\"PassportAddTranslationBankInfo\" xml:space=\"preserve\">\n    <value>Carica le scansioni di una traduzione inglese verificata del tuo estratto conto.</value>\n  </data>\n  <data name=\"PassportAddTranslationBillInfo\" xml:space=\"preserve\">\n    <value>Carica le scansioni di una traduzione inglese verificata della tua bolletta.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>Carica le scansioni di una traduzione inglese verificata della pagina di registrazione del passaporto.</value>\n  </data>\n  <data name=\"PassportAddTranslationTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Carica le scansioni di una traduzione inglese verificata della tua registrazione temporanea.</value>\n  </data>\n  <data name=\"PassportAddTranslationUploadInfo\" xml:space=\"preserve\">\n    <value>Carica le scansioni di una traduzione inglese verificata del documento.</value>\n  </data>\n  <data name=\"PassportTranslation\" xml:space=\"preserve\">\n    <value>Traduzione</value>\n  </data>\n  <data name=\"PassportDataCorrupted\" xml:space=\"preserve\">\n    <value>Sembra che i dati del tuo Telegram Passport siano corrotti.\nPuoi ripristinare il tuo Telegram Passport.</value>\n  </data>\n  <data name=\"PassportOr\" xml:space=\"preserve\">\n    <value>{0} o {1}</value>\n  </data>\n  <data name=\"PassportIdentityDocument\" xml:space=\"preserve\">\n    <value>Documento d'identità</value>\n  </data>\n  <data name=\"PassportAddressNoUploadInfo\" xml:space=\"preserve\">\n    <value>Per favore fornisci il tuo indirizzo</value>\n  </data>\n  <data name=\"PassportIdentityDocumentInfo\" xml:space=\"preserve\">\n    <value>Carica una scansione del tuo passaporto o di un altro documento</value>\n  </data>\n  <data name=\"PassportIdentityDriverLicence\" xml:space=\"preserve\">\n    <value>Carica una scansione della tua patente</value>\n  </data>\n  <data name=\"PassportIdentityID\" xml:space=\"preserve\">\n    <value>Carica una scansione della tua carta d'identità</value>\n  </data>\n  <data name=\"PassportIdentityInternalPassport\" xml:space=\"preserve\">\n    <value>Carica una scansione del tuo passaporto nazionale</value>\n  </data>\n  <data name=\"PassportIdentityPassport\" xml:space=\"preserve\">\n    <value>Carica una scansione del tuo passaporto</value>\n  </data>\n  <data name=\"PassportMidname\" xml:space=\"preserve\">\n    <value>Secondo nome</value>\n  </data>\n  <data name=\"PassportMidnameCountry\" xml:space=\"preserve\">\n    <value>Secondo nome ({0})</value>\n  </data>\n  <data name=\"PassportMidnameLatin\" xml:space=\"preserve\">\n    <value>Secondo nome (latino)</value>\n  </data>\n  <data name=\"PassportNameCountry\" xml:space=\"preserve\">\n    <value>Nome ({0})</value>\n  </data>\n  <data name=\"PassportNameLatin\" xml:space=\"preserve\">\n    <value>Nome (latino)</value>\n  </data>\n  <data name=\"PassportNativeHeader\" xml:space=\"preserve\">\n    <value>Il tuo nome</value>\n  </data>\n  <data name=\"PassportNativeInfo\" xml:space=\"preserve\">\n    <value>Il tuo nome nella lingua del tuo Paese di residenza ({0}).</value>\n  </data>\n  <data name=\"PassportSurnameCountry\" xml:space=\"preserve\">\n    <value>Cognome ({0})</value>\n  </data>\n  <data name=\"PassportSurnameLatin\" xml:space=\"preserve\">\n    <value>Cognome (latino)</value>\n  </data>\n</root>\n"
  },
  {
    "path": "TelegramClient/Resources/AppResources.nl.Designer.cs",
    "content": ""
  },
  {
    "path": "TelegramClient/Resources/AppResources.nl.resx",
    "content": "﻿<?xml version='1.0' encoding='UTF-8'?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" id=\"root\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/>\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"AppName\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"BlockContact\" xml:space=\"preserve\">\n    <value>Blokkeer</value>\n  </data>\n  <data name=\"BlockedUsers\" xml:space=\"preserve\">\n    <value>Blacklist</value>\n  </data>\n  <data name=\"Call\" xml:space=\"preserve\">\n    <value>Bel</value>\n  </data>\n  <data name=\"Contacts\" xml:space=\"preserve\">\n    <value>Contacten</value>\n  </data>\n  <data name=\"Copy\" xml:space=\"preserve\">\n    <value>Kopieer</value>\n  </data>\n  <data name=\"Delete\" xml:space=\"preserve\">\n    <value>Verwijder</value>\n  </data>\n  <data name=\"Dialogs\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"Forward\" xml:space=\"preserve\">\n    <value>Doorsturen</value>\n  </data>\n  <data name=\"Loading\" xml:space=\"preserve\">\n    <value>Laden</value>\n  </data>\n  <data name=\"Login\" xml:space=\"preserve\">\n    <value>Inloggen</value>\n  </data>\n  <data name=\"Refresh\" xml:space=\"preserve\">\n    <value>Vernieuwen</value>\n  </data>\n  <data name=\"Retry\" xml:space=\"preserve\">\n    <value>Opnieuw proberen</value>\n  </data>\n  <data name=\"Send\" xml:space=\"preserve\">\n    <value>Stuur</value>\n  </data>\n  <data name=\"Sending\" xml:space=\"preserve\">\n    <value>Versturen</value>\n  </data>\n  <data name=\"SendingFailed\" xml:space=\"preserve\">\n    <value>Kan niet versturen</value>\n  </data>\n  <data name=\"SendMessage\" xml:space=\"preserve\">\n    <value>Bericht sturen</value>\n  </data>\n  <data name=\"Settings\" xml:space=\"preserve\">\n    <value>Instellingen</value>\n  </data>\n  <data name=\"ShareContact\" xml:space=\"preserve\">\n    <value>Contact delen</value>\n  </data>\n  <data name=\"SignIn\" xml:space=\"preserve\">\n    <value>Inloggen</value>\n  </data>\n  <data name=\"UnblockContact\" xml:space=\"preserve\">\n    <value>Deblokkeer</value>\n  </data>\n  <data name=\"Yesterday\" xml:space=\"preserve\">\n    <value>Gisteren</value>\n  </data>\n  <data name=\"YourMessage\" xml:space=\"preserve\">\n    <value>Voer je bericht in</value>\n  </data>\n  <data name=\"LogOut\" xml:space=\"preserve\">\n    <value>Uitloggen</value>\n  </data>\n  <data name=\"NoMessagesYet\" xml:space=\"preserve\">\n    <value>Nog geen berichten</value>\n  </data>\n  <data name=\"Confirm\" xml:space=\"preserve\">\n    <value>Bevestigen</value>\n  </data>\n  <data name=\"DeleteChatConfirmation\" xml:space=\"preserve\">\n    <value>Chat echt verwijderen?</value>\n  </data>\n  <data name=\"Contact\" xml:space=\"preserve\">\n    <value>Contact</value>\n  </data>\n  <data name=\"EmptyMessage\" xml:space=\"preserve\">\n    <value>Verwijderd bericht</value>\n  </data>\n  <data name=\"ForwardedMessage\" xml:space=\"preserve\">\n    <value>Doorgestuurd van</value>\n  </data>\n  <data name=\"GeoPoint\" xml:space=\"preserve\">\n    <value>Locatie</value>\n  </data>\n  <data name=\"Photo\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"Video\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"ComposeMessage\" xml:space=\"preserve\">\n    <value>Nieuw</value>\n  </data>\n  <data name=\"Search\" xml:space=\"preserve\">\n    <value>Zoeken</value>\n  </data>\n  <data name=\"ServiceMessage\" xml:space=\"preserve\">\n    <value>Servicebericht</value>\n  </data>\n  <data name=\"UnsupportedMedia\" xml:space=\"preserve\">\n    <value>Dit bericht wordt niet ondersteund door jouw versie van Telegram. Werk Telegram bij om dit bericht te bekijken: http://telegram.org/update</value>\n  </data>\n  <data name=\"Unread\" xml:space=\"preserve\">\n    <value>Ongelezen</value>\n  </data>\n  <data name=\"IsTyping\" xml:space=\"preserve\">\n    <value>Is aan het typen</value>\n  </data>\n  <data name=\"Online\" xml:space=\"preserve\">\n    <value>Online</value>\n  </data>\n  <data name=\"User\" xml:space=\"preserve\">\n    <value>Gebruiker</value>\n  </data>\n  <data name=\"MessageActionChatCreate\" xml:space=\"preserve\">\n    <value>{0} heeft de groep \"{1}\" gemaakt</value>\n  </data>\n  <data name=\"MessageActionChatEditTitle\" xml:space=\"preserve\">\n    <value>{0} heeft de groepsnaam gewijzigd naar \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionChatEditPhoto\" xml:space=\"preserve\">\n    <value>{0} heeft de groepsafbeelding gewijzigd</value>\n  </data>\n  <data name=\"MessageActionChatDeletePhoto\" xml:space=\"preserve\">\n    <value>{0} heeft de groepsafbeelding verwijderd</value>\n  </data>\n  <data name=\"MessageActionChatAddUser\" xml:space=\"preserve\">\n    <value>{0} heeft {1} uitgenodigd</value>\n  </data>\n  <data name=\"MessageActionChatDeleteUser\" xml:space=\"preserve\">\n    <value>{0} heeft {1} verwijderd</value>\n  </data>\n  <data name=\"MessageActionEmpty\" xml:space=\"preserve\">\n    <value>Leeg servicebericht</value>\n  </data>\n  <data name=\"CompanyNominative\" xml:space=\"preserve\">\n    <value>Lid</value>\n  </data>\n  <data name=\"CompanyGenitivePlural\" xml:space=\"preserve\">\n    <value>Leden</value>\n  </data>\n  <data name=\"CompanyGenitiveSingular\" xml:space=\"preserve\">\n    <value>Lid</value>\n  </data>\n  <data name=\"PeopleInTheConversation\" xml:space=\"preserve\">\n    <value>{0} leden</value>\n  </data>\n  <data name=\"Offline\" xml:space=\"preserve\">\n    <value>Offline</value>\n  </data>\n  <data name=\"Today\" xml:space=\"preserve\">\n    <value>Vandaag</value>\n  </data>\n  <data name=\"LastSeenAt\" xml:space=\"preserve\">\n    <value>Laatst gezien {0} op {1}</value>\n  </data>\n  <data name=\"LastSeen\" xml:space=\"preserve\">\n    <value>Laatst gezien {0} geleden</value>\n  </data>\n  <data name=\"MinuteAccusative\" xml:space=\"preserve\">\n    <value>Minuut</value>\n  </data>\n  <data name=\"MinuteGenitiveSingular\" xml:space=\"preserve\">\n    <value>Minuut</value>\n  </data>\n  <data name=\"MinuteGenitivePlural\" xml:space=\"preserve\">\n    <value>Minuten</value>\n  </data>\n  <data name=\"Attach\" xml:space=\"preserve\">\n    <value>Bijvoegen</value>\n  </data>\n  <data name=\"Manage\" xml:space=\"preserve\">\n    <value>Beheren</value>\n  </data>\n  <data name=\"Ok\" xml:space=\"preserve\">\n    <value>Ok</value>\n  </data>\n  <data name=\"Cancel\" xml:space=\"preserve\">\n    <value>Annuleren</value>\n  </data>\n  <data name=\"Select\" xml:space=\"preserve\">\n    <value>Selecteren</value>\n  </data>\n  <data name=\"MapAccusative\" xml:space=\"preserve\">\n    <value>Mijn locatie</value>\n  </data>\n  <data name=\"PhotoAccusative\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"Add\" xml:space=\"preserve\">\n    <value>Toevoegen</value>\n  </data>\n  <data name=\"NewGroup\" xml:space=\"preserve\">\n    <value>Nieuwe groep</value>\n  </data>\n  <data name=\"NewSecretChat\" xml:space=\"preserve\">\n    <value>Nieuwe geheime chat</value>\n  </data>\n  <data name=\"TileUpdaterTaskDescription\" xml:space=\"preserve\">\n    <value>Geplande taak om aantal ongelezen berichten op live-tegel bij te werken.</value>\n  </data>\n  <data name=\"Media\" xml:space=\"preserve\">\n    <value>Media</value>\n  </data>\n  <data name=\"Profile\" xml:space=\"preserve\">\n    <value>Info</value>\n  </data>\n  <data name=\"Notifications\" xml:space=\"preserve\">\n    <value>Berichtgeving</value>\n  </data>\n  <data name=\"On\" xml:space=\"preserve\">\n    <value>Aan</value>\n  </data>\n  <data name=\"Off\" xml:space=\"preserve\">\n    <value>Uit</value>\n  </data>\n  <data name=\"Sound\" xml:space=\"preserve\">\n    <value>Geluid</value>\n  </data>\n  <data name=\"CreateSecretChat\" xml:space=\"preserve\">\n    <value>Geheime chat starten</value>\n  </data>\n  <data name=\"MessageNotifications\" xml:space=\"preserve\">\n    <value>Berichtmeldingen</value>\n  </data>\n  <data name=\"ChatNotifications\" xml:space=\"preserve\">\n    <value>Chatmeldingen</value>\n  </data>\n  <data name=\"NotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Stil, voorbeeld, chats</value>\n  </data>\n  <data name=\"Support\" xml:space=\"preserve\">\n    <value>Ondersteuning</value>\n  </data>\n  <data name=\"AskAQuestion\" xml:space=\"preserve\">\n    <value>Stel een vraag</value>\n  </data>\n  <data name=\"InAppNotifications\" xml:space=\"preserve\">\n    <value>In-app meldingen</value>\n  </data>\n  <data name=\"OnPlural\" xml:space=\"preserve\">\n    <value>Aan</value>\n  </data>\n  <data name=\"OffPlural\" xml:space=\"preserve\">\n    <value>Uit</value>\n  </data>\n  <data name=\"OnFeminine\" xml:space=\"preserve\">\n    <value>Aan</value>\n  </data>\n  <data name=\"OffFeminine\" xml:space=\"preserve\">\n    <value>Uit</value>\n  </data>\n  <data name=\"InAppSounds\" xml:space=\"preserve\">\n    <value>Geluiden</value>\n  </data>\n  <data name=\"InAppVibrate\" xml:space=\"preserve\">\n    <value>Trillen</value>\n  </data>\n  <data name=\"InAppPreview\" xml:space=\"preserve\">\n    <value>In-App voorbeeld</value>\n  </data>\n  <data name=\"ResetAllNotifications\" xml:space=\"preserve\">\n    <value>Meldingen gereset</value>\n  </data>\n  <data name=\"ResetAllNotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Aangepaste meldingsinstellingen wissen voor contacten en groepen.</value>\n  </data>\n  <data name=\"OnMasculine\" xml:space=\"preserve\">\n    <value>Aan</value>\n  </data>\n  <data name=\"OffMasculine\" xml:space=\"preserve\">\n    <value>Uit</value>\n  </data>\n  <data name=\"GroupNotifications\" xml:space=\"preserve\">\n    <value>Groepsmeldingen</value>\n  </data>\n  <data name=\"Alert\" xml:space=\"preserve\">\n    <value>Waarschuwing</value>\n  </data>\n  <data name=\"MessagePreview\" xml:space=\"preserve\">\n    <value>Voorbeeld</value>\n  </data>\n  <data name=\"SaveIncomingPhotos\" xml:space=\"preserve\">\n    <value>Ontvangen foto's opslaan</value>\n  </data>\n  <data name=\"Create\" xml:space=\"preserve\">\n    <value>Maak</value>\n  </data>\n  <data name=\"Share\" xml:space=\"preserve\">\n    <value>Delen</value>\n  </data>\n  <data name=\"Edit\" xml:space=\"preserve\">\n    <value>Wijzig</value>\n  </data>\n  <data name=\"CompanyNominativeSingular\" xml:space=\"preserve\">\n    <value>Lid</value>\n  </data>\n  <data name=\"CompanyNominativePlural\" xml:space=\"preserve\">\n    <value>Leden</value>\n  </data>\n  <data name=\"PictureAccusative\" xml:space=\"preserve\">\n    <value>Afbeelding</value>\n  </data>\n  <data name=\"ContactAccusative\" xml:space=\"preserve\">\n    <value>Contact</value>\n  </data>\n  <data name=\"DocumentAccusative\" xml:space=\"preserve\">\n    <value>Bestand</value>\n  </data>\n  <data name=\"AttachCaption\" xml:space=\"preserve\">\n    <value>Iets bijvoegen</value>\n  </data>\n  <data name=\"LocationAccusative\" xml:space=\"preserve\">\n    <value>Locatie</value>\n  </data>\n  <data name=\"VideoAccusative\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"NoMediaHere\" xml:space=\"preserve\">\n    <value>Geen media hier</value>\n  </data>\n  <data name=\"ChooseAnItem\" xml:space=\"preserve\">\n    <value>Selecteer een item</value>\n  </data>\n  <data name=\"NoUsersHere\" xml:space=\"preserve\">\n    <value>Geen gebruikers hier</value>\n  </data>\n  <data name=\"NoContactsHere\" xml:space=\"preserve\">\n    <value>Geen contacten hier</value>\n  </data>\n  <data name=\"Title\" xml:space=\"preserve\">\n    <value>Titel</value>\n  </data>\n  <data name=\"Done\" xml:space=\"preserve\">\n    <value>Gereed</value>\n  </data>\n  <data name=\"AddParticipant\" xml:space=\"preserve\">\n    <value>Lid toevoegen</value>\n  </data>\n  <data name=\"DeleteAndExitGroup\" xml:space=\"preserve\">\n    <value>Verwijder en verlaat</value>\n  </data>\n  <data name=\"MessageActionUserLeftGroup\" xml:space=\"preserve\">\n    <value>{0} heeft de groep verlaten</value>\n  </data>\n  <data name=\"MessageUser\" xml:space=\"preserve\">\n    <value>Bericht {0}</value>\n  </data>\n  <data name=\"ViewUser\" xml:space=\"preserve\">\n    <value>Bekijk {0}</value>\n  </data>\n  <data name=\"SearchAmongYourDialogsAndMessages\" xml:space=\"preserve\">\n    <value>Zoek door chats en berichten</value>\n  </data>\n  <data name=\"Messages\" xml:space=\"preserve\">\n    <value>Berichten</value>\n  </data>\n  <data name=\"NoMessagesHere\" xml:space=\"preserve\">\n    <value>Geen berichten hier</value>\n  </data>\n  <data name=\"NoResults\" xml:space=\"preserve\">\n    <value>Geen resultaten</value>\n  </data>\n  <data name=\"Conversations\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"EditName\" xml:space=\"preserve\">\n    <value>Naam wijzigen</value>\n  </data>\n  <data name=\"Save\" xml:space=\"preserve\">\n    <value>Opslaan</value>\n  </data>\n  <data name=\"About\" xml:space=\"preserve\">\n    <value>Over</value>\n  </data>\n  <data name=\"Version\" xml:space=\"preserve\">\n    <value>Versie</value>\n  </data>\n  <data name=\"YourPhone\" xml:space=\"preserve\">\n    <value>Je telefoon</value>\n  </data>\n  <data name=\"SignInMessage\" xml:space=\"preserve\">\n    <value>Bevestig je landnummer en voer je telefoonnummer in.</value>\n  </data>\n  <data name=\"Your phone number\" xml:space=\"preserve\">\n    <value>Je telefoonnummer</value>\n  </data>\n  <data name=\"Next\" xml:space=\"preserve\">\n    <value>Volgende</value>\n  </data>\n  <data name=\"Country\" xml:space=\"preserve\">\n    <value>Land</value>\n  </data>\n  <data name=\"YourCode\" xml:space=\"preserve\">\n    <value>Je code</value>\n  </data>\n  <data name=\"ConfirmMessage\" xml:space=\"preserve\">\n    <value>We hebben een sms-bericht met activatiecode verstuurd naar het nummer **{0}**</value>\n  </data>\n  <data name=\"WeWillCallYou\" xml:space=\"preserve\">\n    <value>We bellen je over {0}</value>\n  </data>\n  <data name=\"Code\" xml:space=\"preserve\">\n    <value>Code</value>\n  </data>\n  <data name=\"FirstName\" xml:space=\"preserve\">\n    <value>Voornaam</value>\n  </data>\n  <data name=\"LastName\" xml:space=\"preserve\">\n    <value>Achternaam (optioneel)</value>\n  </data>\n  <data name=\"YourName\" xml:space=\"preserve\">\n    <value>Je naam</value>\n  </data>\n  <data name=\"SignUpMessage\" xml:space=\"preserve\">\n    <value>Voer je naam in en voeg een profielfoto toe.</value>\n  </data>\n  <data name=\"AddPhoto\" xml:space=\"preserve\">\n    <value>Foto toevoegen</value>\n  </data>\n  <data name=\"NoDialogsHere\" xml:space=\"preserve\">\n    <value>Nog geen chats</value>\n  </data>\n  <data name=\"StartMessaging\" xml:space=\"preserve\">\n    <value>Begin met chatten</value>\n  </data>\n  <data name=\"Intro1Message\" xml:space=\"preserve\">\n    <value>Welkom bij **Telegram** ―\n's werelds snelste berichtendienst.\nHet is gratis en veilig.</value>\n  </data>\n  <data name=\"Fast\" xml:space=\"preserve\">\n    <value>Snel</value>\n  </data>\n  <data name=\"FastMessage\" xml:space=\"preserve\">\n    <value>**Telegram** bezorgt berichten\nsneller dan elke andere applicatie.</value>\n  </data>\n  <data name=\"Free\" xml:space=\"preserve\">\n    <value>Gratis</value>\n  </data>\n  <data name=\"FreeMessage\" xml:space=\"preserve\">\n    <value>**Telegram** is altijd gratis. Geen ads.\nGeen abonnementskosten.</value>\n  </data>\n  <data name=\"Powerful\" xml:space=\"preserve\">\n    <value>Krachtig</value>\n  </data>\n  <data name=\"PowerfulMessage\" xml:space=\"preserve\">\n    <value>**Telegram** beperkt je niet \nin de grootte van je media of chats. </value>\n  </data>\n  <data name=\"Secure\" xml:space=\"preserve\">\n    <value>Veilig</value>\n  </data>\n  <data name=\"SecureMessage\" xml:space=\"preserve\">\n    <value>**Telegram** beveiligt uw berichten\ntegen aanvallen van hackers.</value>\n  </data>\n  <data name=\"CloudBased\" xml:space=\"preserve\">\n    <value>In de cloud</value>\n  </data>\n  <data name=\"CloudBasedMessage\" xml:space=\"preserve\">\n    <value>**Telegram** biedt toegang tot je berichten\nvanaf meerdere apparaten.</value>\n  </data>\n  <data name=\"TelegramDialedYourNumber\" xml:space=\"preserve\">\n    <value>Telegram heeft je nummer gebeld</value>\n  </data>\n  <data name=\"Subject\" xml:space=\"preserve\">\n    <value>Onderwerp</value>\n  </data>\n  <data name=\"Members\" xml:space=\"preserve\">\n    <value>Leden</value>\n  </data>\n  <data name=\"YourPhoneNumber\" xml:space=\"preserve\">\n    <value>Je telefoonnummer</value>\n  </data>\n  <data name=\"From\" xml:space=\"preserve\">\n    <value>Van</value>\n  </data>\n  <data name=\"You\" xml:space=\"preserve\">\n    <value>Jij</value>\n  </data>\n  <data name=\"YouWhereKickedFromTheGroup\" xml:space=\"preserve\">\n    <value>Je bent verwijderd uit de groep</value>\n  </data>\n  <data name=\"SavePhotoMessage\" xml:space=\"preserve\">\n    <value>De foto is succesvol opgeslagen</value>\n  </data>\n  <data name=\"SharedContact\" xml:space=\"preserve\">\n    <value>Gedeeld contact</value>\n  </data>\n  <data name=\"AllContacts\" xml:space=\"preserve\">\n    <value>Alle contacten</value>\n  </data>\n  <data name=\"Document\" xml:space=\"preserve\">\n    <value>Bestand</value>\n  </data>\n  <data name=\"InviteFriends\" xml:space=\"preserve\">\n    <value>Vrienden uitnodigen</value>\n  </data>\n  <data name=\"MyLocation\" xml:space=\"preserve\">\n    <value>Mijn locatie</value>\n  </data>\n  <data name=\"Satellite\" xml:space=\"preserve\">\n    <value>Satelliet</value>\n  </data>\n  <data name=\"Hybrid\" xml:space=\"preserve\">\n    <value>Hybride</value>\n  </data>\n  <data name=\"SwitchMode\" xml:space=\"preserve\">\n    <value>Verander mode</value>\n  </data>\n  <data name=\"DistanceAway\" xml:space=\"preserve\">\n    <value>{0} hiervandaan</value>\n  </data>\n  <data name=\"MetersShort\" xml:space=\"preserve\">\n    <value>m</value>\n  </data>\n  <data name=\"KilometersShort\" xml:space=\"preserve\">\n    <value>km</value>\n  </data>\n  <data name=\"ShareLocation\" xml:space=\"preserve\">\n    <value>Deel locatie</value>\n  </data>\n  <data name=\"Emoji\" xml:space=\"preserve\">\n    <value>Emoji</value>\n  </data>\n  <data name=\"LogOutConfirmation\" xml:space=\"preserve\">\n    <value>Weet je zeker dat je wilt uitloggen?\nTelegram kun je naadloos op al je apparaten tegelijkertijd gebruiken.\nAls je uitlogt worden al je geheime chats verwijderd.</value>\n  </data>\n  <data name=\"GotAQuestionAboutTelegram\" xml:space=\"preserve\">\n    <value>Heb je een vraag over Telegram?</value>\n  </data>\n  <data name=\"InviteFriendMessage\" xml:space=\"preserve\">\n    <value>Hey! Zullen we overstappen op Telegram? http://telegram.org/dl</value>\n  </data>\n  <data name=\"ResetAllNotificationsMessage\" xml:space=\"preserve\">\n    <value>Meldingen resetten?</value>\n  </data>\n  <data name=\"AreTyping\" xml:space=\"preserve\">\n    <value>Zijn aan het typen</value>\n  </data>\n  <data name=\"ClearHistory\" xml:space=\"preserve\">\n    <value>Verwijder geschiedenis</value>\n  </data>\n  <data name=\"DeleteAndExit\" xml:space=\"preserve\">\n    <value>Verwijder en verlaat</value>\n  </data>\n  <data name=\"DeleteHistoryAndExitGroupMessage\" xml:space=\"preserve\">\n    <value>Verwijderen en de groep verlaten?</value>\n  </data>\n  <data name=\"NoUsers\" xml:space=\"preserve\">\n    <value>Geen gebruikers</value>\n  </data>\n  <data name=\"UserNominativeSingular\" xml:space=\"preserve\">\n    <value>Gebruiker</value>\n  </data>\n  <data name=\"UserNominativePlural\" xml:space=\"preserve\">\n    <value>Gebruikers</value>\n  </data>\n  <data name=\"UserGenitiveSingular\" xml:space=\"preserve\">\n    <value>Gebruiker</value>\n  </data>\n  <data name=\"UserGenitivePlural\" xml:space=\"preserve\">\n    <value>Gebruikers</value>\n  </data>\n  <data name=\"PleaseGoToChatToForwardMessage\" xml:space=\"preserve\">\n    <value>Ga naar de chat om het bericht door te sturen</value>\n  </data>\n  <data name=\"Info\" xml:space=\"preserve\">\n    <value>Info</value>\n  </data>\n  <data name=\"ForwardeMessageToThisChat\" xml:space=\"preserve\">\n    <value>Bericht doorsturen naar deze chat?</value>\n  </data>\n  <data name=\"TodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"RegularFormat\" xml:space=\"preserve\">\n    <value>d MMM</value>\n  </data>\n  <data name=\"LongRegularFormat\" xml:space=\"preserve\">\n    <value>d.MM.yyyy</value>\n  </data>\n  <data name=\"MessageTodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"MessageRegularFormat\" xml:space=\"preserve\">\n    <value>d MMM, {0}</value>\n  </data>\n  <data name=\"MessageLongRegularFormat\" xml:space=\"preserve\">\n    <value>d MMM yyyy, {0}</value>\n  </data>\n  <data name=\"UserStatusTimeFormat\" xml:space=\"preserve\">\n    <value>H:mm</value>\n  </data>\n  <data name=\"UserStatusDayFormat\" xml:space=\"preserve\">\n    <value>d MMM</value>\n  </data>\n  <data name=\"UserStatusYearDayFormat\" xml:space=\"preserve\">\n    <value>d MMM yyyy</value>\n  </data>\n  <data name=\"PhoneNumberInvalidString\" xml:space=\"preserve\">\n    <value>Ongeldig telefoonnummer. Probeer opnieuw.</value>\n  </data>\n  <data name=\"Error\" xml:space=\"preserve\">\n    <value>Fout</value>\n  </data>\n  <data name=\"FloodWaitString\" xml:space=\"preserve\">\n    <value>Te druk. Probeer later opnieuw.</value>\n  </data>\n  <data name=\"PhoneCodeInvalidString\" xml:space=\"preserve\">\n    <value>Je hebt een ongeldige code ingevoerd. Probeer het opnieuw.</value>\n  </data>\n  <data name=\"PhoneCodeExpiredString\" xml:space=\"preserve\">\n    <value>Code verlopen. Probeer opnieuw.</value>\n  </data>\n  <data name=\"PhoneCodeEmpty\" xml:space=\"preserve\">\n    <value>Code is leeg. Probeer opnieuw.</value>\n  </data>\n  <data name=\"FirstNameInvalidString\" xml:space=\"preserve\">\n    <value>Voornaam is ongeldig. Probeer opnieuw.</value>\n  </data>\n  <data name=\"LastNameInvalidString\" xml:space=\"preserve\">\n    <value>Achternaam is ongeldig. Probeer opnieuw.</value>\n  </data>\n  <data name=\"Message\" xml:space=\"preserve\">\n    <value>Bericht</value>\n  </data>\n  <data name=\"LockScreen\" xml:space=\"preserve\">\n    <value>Vergrendelscherm</value>\n  </data>\n  <data name=\"LockScreenSubtitle\" xml:space=\"preserve\">\n    <value>Telegram toevoegen aan het vergrendelscherm</value>\n  </data>\n  <data name=\"ConfirmAgeMessage\" xml:space=\"preserve\">\n    <value>Druk op de OK-knop om te bevestigen dat je tenminste 13 jaar oud bent.</value>\n  </data>\n  <data name=\"ConfirmAgeTitle\" xml:space=\"preserve\">\n    <value>Bevestig je leeftijd</value>\n  </data>\n  <data name=\"ConfirmPushMessage\" xml:space=\"preserve\">\n    <value>Wil je deze applicatie toestaan om pushberichten te sturen?</value>\n  </data>\n  <data name=\"ConfirmPushTitle\" xml:space=\"preserve\">\n    <value>Bevestig pushberichten</value>\n  </data>\n  <data name=\"PrivacyStatement\" xml:space=\"preserve\">\n    <value>Privacyverklaring</value>\n  </data>\n  <data name=\"PrivacyStatementText\" xml:space=\"preserve\">\n    <value>Deze applicatie gebruikt je huidige locatie om de gebruikerservaring te verbeteren. De locatie data kan worden opgeslagen en gedeeld. Je privacy is belangrijk voor ons. Je kunt deze functie op elk gewenst moment uitschakelen.\n\nAls je vragen hebt, neem dan contact met ons op</value>\n  </data>\n  <data name=\"VKGroup\" xml:space=\"preserve\">\n    <value>groep</value>\n  </data>\n  <data name=\"LocationServices\" xml:space=\"preserve\">\n    <value>Locatieservices</value>\n  </data>\n  <data name=\"AllowLocationServicesTitle\" xml:space=\"preserve\">\n    <value>Toegang tot locatie toestaan?</value>\n  </data>\n  <data name=\"AllowLocationServiceText\" xml:space=\"preserve\">\n    <value>Toegang tot je huidige locatie toestaan? Dit kan later worden aangepast in de appinstellingen.</value>\n  </data>\n  <data name=\"AboutText1\" xml:space=\"preserve\">\n    <value>Telegram Messenger is een Telegram client met de focus op snelheid en veiligheid. Het is supersnel, eenvoudig en gratis.</value>\n  </data>\n  <data name=\"AboutText2\" xml:space=\"preserve\">\n    <value>Voor persoonlijke ondersteuning ga je naar Instellingen in Telegram en selecteer je \"Een vraag stellen\" om een vraag rechtstreeks aan onze ondersteuningsafdeling te stellen. Je kunt ook een e-mail sturen naar support@telegram.org.</value>\n  </data>\n  <data name=\"TapRecordToStartRecording\" xml:space=\"preserve\">\n    <value>Druk opnemen om te beginnen met opnemen</value>\n  </data>\n  <data name=\"ACameraIsNotSupportedOnThisDevice\" xml:space=\"preserve\">\n    <value>Een camera wordt op dit apparaat niet ondersteund.</value>\n  </data>\n  <data name=\"ReadyToRecord\" xml:space=\"preserve\">\n    <value>Klaar om op te nemen.</value>\n  </data>\n  <data name=\"PressBackKeyToSendVideo\" xml:space=\"preserve\">\n    <value>Druk op de terug knop om de video te versturen</value>\n  </data>\n  <data name=\"PlaybackStarted\" xml:space=\"preserve\">\n    <value>Afspelen gestart.</value>\n  </data>\n  <data name=\"PlaybackPaused\" xml:space=\"preserve\">\n    <value>Afspelen gepauzeerd.</value>\n  </data>\n  <data name=\"Recording\" xml:space=\"preserve\">\n    <value>Opnemen</value>\n  </data>\n  <data name=\"PreparingViewfinder\" xml:space=\"preserve\">\n    <value>Voorbereiden zoeker</value>\n  </data>\n  <data name=\"PlaybackStoped\" xml:space=\"preserve\">\n    <value>Afspelen gestopt.</value>\n  </data>\n  <data name=\"Record\" xml:space=\"preserve\">\n    <value>Opnemen</value>\n  </data>\n  <data name=\"Stop\" xml:space=\"preserve\">\n    <value>Stop</value>\n  </data>\n  <data name=\"Pause\" xml:space=\"preserve\">\n    <value>Pauze</value>\n  </data>\n  <data name=\"Play\" xml:space=\"preserve\">\n    <value>Afspelen</value>\n  </data>\n  <data name=\"Review\" xml:space=\"preserve\">\n    <value>Reviewen</value>\n  </data>\n  <data name=\"PleaseEnterGroupSubject\" xml:space=\"preserve\">\n    <value>Voer onderwerp van de groep in</value>\n  </data>\n  <data name=\"PleaseChooseAtLeastOneParticipant\" xml:space=\"preserve\">\n    <value>Kies tenminste één lid</value>\n  </data>\n  <data name=\"ForwardMessagesToThisChat\" xml:space=\"preserve\">\n    <value>Berichten doorsturen naar deze chat?</value>\n  </data>\n  <data name=\"InvalidCountryCode\" xml:space=\"preserve\">\n    <value>Ongeldige landcode</value>\n  </data>\n  <data name=\"Typing\" xml:space=\"preserve\">\n    <value>Aan het typen</value>\n  </data>\n  <data name=\"MaximumMessageLengthExceeded\" xml:space=\"preserve\">\n    <value>Maximale berichtlengte ({0} tekens) bereikt.</value>\n  </data>\n  <data name=\"Download\" xml:space=\"preserve\">\n    <value>Downloaden</value>\n  </data>\n  <data name=\"Backgrounds\" xml:space=\"preserve\">\n    <value>Achtergronden</value>\n  </data>\n  <data name=\"Static\" xml:space=\"preserve\">\n    <value>Statisch</value>\n  </data>\n  <data name=\"Animated\" xml:space=\"preserve\">\n    <value>Geanimeerd</value>\n  </data>\n  <data name=\"Background\" xml:space=\"preserve\">\n    <value>Achtergrond</value>\n  </data>\n  <data name=\"ApplicationBackgroundSubtitle\" xml:space=\"preserve\">\n    <value>Achtergrond kiezen</value>\n  </data>\n  <data name=\"ApplicationBackground\" xml:space=\"preserve\">\n    <value>Achtergrond</value>\n  </data>\n  <data name=\"DialogsBackground\" xml:space=\"preserve\">\n    <value>Achtergrond</value>\n  </data>\n  <data name=\"SpecialThanks\" xml:space=\"preserve\">\n    <value>Speciale dank</value>\n  </data>\n  <data name=\"SendMessageByEnter\" xml:space=\"preserve\">\n    <value>Versturen met Enter</value>\n  </data>\n  <data name=\"PleaseNoteThatAnimatedBackgroundConsumesMoreBatteryResources\" xml:space=\"preserve\">\n    <value>Hou er rekening mee dat geanimeerde achtergronden meer batterij capaciteit gebruiken</value>\n  </data>\n  <data name=\"Please go to chat to forward message\" xml:space=\"preserve\">\n    <value>Ga naar de chat om het bericht door te sturen</value>\n  </data>\n  <data name=\"SecretChatCaption\" xml:space=\"preserve\">\n    <value>Je hebt {0} uitgenodigd om deel te nemen aan een geheime chat.</value>\n  </data>\n  <data name=\"SecretChat\" xml:space=\"preserve\">\n    <value>Geheime chat</value>\n  </data>\n  <data name=\"UseEntToEndEncryption\" xml:space=\"preserve\">\n    <value>End-to-end-encryptie</value>\n  </data>\n  <data name=\"LeaveNoTraceOnOurServers\" xml:space=\"preserve\">\n    <value>Geen serveropslag</value>\n  </data>\n  <data name=\"HaveASelfDestructTimer\" xml:space=\"preserve\">\n    <value>Zelfvernietigingstimers</value>\n  </data>\n  <data name=\"SecretChats\" xml:space=\"preserve\">\n    <value>Geheime chats</value>\n  </data>\n  <data name=\"DoNotAllowForwarding\" xml:space=\"preserve\">\n    <value>Doorstuurbescherming</value>\n  </data>\n  <data name=\"WaitingForUserToGetOnline\" xml:space=\"preserve\">\n    <value>Wacht tot {0} online komt</value>\n  </data>\n  <data name=\"SelfDestructTimer\" xml:space=\"preserve\">\n    <value>Zelfvernietigingstimer</value>\n  </data>\n  <data name=\"EncryptionKey\" xml:space=\"preserve\">\n    <value>Encryptiesleutel</value>\n  </data>\n  <data name=\"EncryptionKeyDescription1\" xml:space=\"preserve\">\n    <value>Deze afbeelding is een weergave van de encryptiesleutel voor deze geheime chat met {0}.</value>\n  </data>\n  <data name=\"EncryptionKeyDescription2\" xml:space=\"preserve\">\n    <value>Als deze afbeelding er bij {0} hetzelfde uitziet, is jullie chat 200% beveiligd.</value>\n  </data>\n  <data name=\"LearnMoreAt\" xml:space=\"preserve\">\n    <value>Lees meer op</value>\n  </data>\n  <data name=\"TelegramWebsite\" xml:space=\"preserve\">\n    <value>Telegram.org</value>\n  </data>\n  <data name=\"LastSeenAtDate\" xml:space=\"preserve\">\n    <value>Laatst gezien {0} op {1}</value>\n  </data>\n  <data name=\"LastSeenJustNow\" xml:space=\"preserve\">\n    <value>Laatst gezien zojuist</value>\n  </data>\n  <data name=\"SecretChatsDescription\" xml:space=\"preserve\">\n    <value>Geheime chat functies:\n• End-to-end-encryptie\n• Geen serveropslag\n• Zelfvernietigingstimers\n• Doorstuurbescherming</value>\n  </data>\n  <data name=\"Audio\" xml:space=\"preserve\">\n    <value>Geluidsbestand</value>\n  </data>\n  <data name=\"IncognitoMode\" xml:space=\"preserve\">\n    <value>Onzichtbare modus</value>\n  </data>\n  <data name=\"TelegramNotifications\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"Invisible\" xml:space=\"preserve\">\n    <value>Invisible</value>\n  </data>\n  <data name=\"SecretChatDiscarded\" xml:space=\"preserve\">\n    <value>Geheime chat geannuleerd</value>\n  </data>\n  <data name=\"SecretChatCreated\" xml:space=\"preserve\">\n    <value>Geheime chat aangemaakt</value>\n  </data>\n  <data name=\"EmptySecretChat\" xml:space=\"preserve\">\n    <value>Lege geheime chat</value>\n  </data>\n  <data name=\"MessageActionSetMessageTTL\" xml:space=\"preserve\">\n    <value>{0} heeft de zelfvernietigingstimer ingesteld op {1}</value>\n  </data>\n  <data name=\"MessageActionYouSetMessageTTL\" xml:space=\"preserve\">\n    <value>Je hebt de zelfvernietigingstimer ingesteld op {0}</value>\n  </data>\n  <data name=\"MessageActionDisableMessageTTL\" xml:space=\"preserve\">\n    <value>{0} heeft de zelfvernietigingstimer uitgeschakeld</value>\n  </data>\n  <data name=\"MessageActionYouDisableMessageTTL\" xml:space=\"preserve\">\n    <value>Je hebt de zelfvernietigingstimer uitgeschakeld</value>\n  </data>\n  <data name=\"PleaseWait\" xml:space=\"preserve\">\n    <value>Een ogenblik geduld</value>\n  </data>\n  <data name=\"SecretChatCaption2\" xml:space=\"preserve\">\n    <value>{0} heeft je uitgenodigd voor een geheime chat.</value>\n  </data>\n  <data name=\"YouJoinedTheSecretChat\" xml:space=\"preserve\">\n    <value>Toegevoegd aan de geheime chat.</value>\n  </data>\n  <data name=\"UserJoinedYourSecretChat\" xml:space=\"preserve\">\n    <value>{0} neemt deel aan je geheime chat.</value>\n  </data>\n  <data name=\"AddContact\" xml:space=\"preserve\">\n    <value>Voeg toe</value>\n  </data>\n  <data name=\"DeleteContact\" xml:space=\"preserve\">\n    <value>Verwijder</value>\n  </data>\n  <data name=\"ConfirmDeleteContact\" xml:space=\"preserve\">\n    <value>Contact verwijderen?</value>\n  </data>\n  <data name=\"RegistrationProblemDescription\" xml:space=\"preserve\">\n    <value>Als je een probleem hebt tijdens het registreren of inloggen van je account, neem dan contact met ons op </value>\n  </data>\n  <data name=\"RegistrationProblemEmail\" xml:space=\"preserve\">\n    <value>sms@telegram.org</value>\n  </data>\n  <data name=\"ChooseYourCountry\" xml:space=\"preserve\">\n    <value>Kies je land</value>\n  </data>\n  <data name=\"AskAVolunteer\" xml:space=\"preserve\">\n    <value>Vraag een vrijwilliger</value>\n  </data>\n  <data name=\"PinToStart\" xml:space=\"preserve\">\n    <value>Vastmaken aan start</value>\n  </data>\n  <data name=\"TerminateAllSessions\" xml:space=\"preserve\">\n    <value>Beëindig alle andere sessies</value>\n  </data>\n  <data name=\"TerminateAllSessionsConfirmation\" xml:space=\"preserve\">\n    <value>Alle apparaten behalve het huidige apparaat uitloggen?</value>\n  </data>\n  <data name=\"SlideToCancel\" xml:space=\"preserve\">\n    <value>Sleep om te annuleren</value>\n  </data>\n  <data name=\"Terminate\" xml:space=\"preserve\">\n    <value>Beëindig</value>\n  </data>\n  <data name=\"TapAndHoldToRecord\" xml:space=\"preserve\">\n    <value>Indrukken en vasthouden om op te nemen</value>\n  </data>\n  <data name=\"NewBroadcastList\" xml:space=\"preserve\">\n    <value>Nieuwe verzendlijst</value>\n  </data>\n  <data name=\"AddUserToTheGroup\" xml:space=\"preserve\">\n    <value>{0} toevoegen aan de groep \"{1}\"?</value>\n  </data>\n  <data name=\"NumberOfForwardingMessages\" xml:space=\"preserve\">\n    <value>Aantal recente berichten om door te sturen</value>\n  </data>\n  <data name=\"AddToContacts\" xml:space=\"preserve\">\n    <value>Toevoegen aan contacten</value>\n  </data>\n  <data name=\"ShareMyContactInfo\" xml:space=\"preserve\">\n    <value>Mijn contactgegevens delen</value>\n  </data>\n  <data name=\"Cache\" xml:space=\"preserve\">\n    <value>Cache</value>\n  </data>\n  <data name=\"ClearCache\" xml:space=\"preserve\">\n    <value>Cache opschonen</value>\n  </data>\n  <data name=\"ManagingLocalCache\" xml:space=\"preserve\">\n    <value>Lokale cache beheren</value>\n  </data>\n  <data name=\"Calculating\" xml:space=\"preserve\">\n    <value>Berekenen</value>\n  </data>\n  <data name=\"SaveFileMessage\" xml:space=\"preserve\">\n    <value>Het bestand is succesvol opgeslagen</value>\n  </data>\n  <data name=\"SocialNetworks\" xml:space=\"preserve\">\n    <value>Sociale media</value>\n  </data>\n  <data name=\"Sms\" xml:space=\"preserve\">\n    <value>Sms-bericht</value>\n  </data>\n  <data name=\"Email\" xml:space=\"preserve\">\n    <value>E-mail</value>\n  </data>\n  <data name=\"Set\" xml:space=\"preserve\">\n    <value>Stel in</value>\n  </data>\n  <data name=\"SearchAmongYourContacts\" xml:space=\"preserve\">\n    <value>In contacten zoeken</value>\n  </data>\n  <data name=\"Connecting\" xml:space=\"preserve\">\n    <value>Verbinden</value>\n  </data>\n  <data name=\"SetProfilePhoto\" xml:space=\"preserve\">\n    <value>Stel profielfoto in</value>\n  </data>\n  <data name=\"BatterySaverModeAlert\" xml:space=\"preserve\">\n    <value>Batterijbesparing staat aan, als batterijbesparing aan staat zul je geen Telegram berichtmeldingen ontvangen. Schakel batterijbesparing uit om berichtmeldingen te ontvangen.</value>\n  </data>\n  <data name=\"Warning\" xml:space=\"preserve\">\n    <value>Waarschuwing</value>\n  </data>\n  <data name=\"NoInternetConnection\" xml:space=\"preserve\">\n    <value>Geen internetverbinding</value>\n  </data>\n  <data name=\"Updating\" xml:space=\"preserve\">\n    <value>Bijwerken</value>\n  </data>\n  <data name=\"SetUsername\" xml:space=\"preserve\">\n    <value>Gebruikersnaam instellen</value>\n  </data>\n  <data name=\"Username\" xml:space=\"preserve\">\n    <value>Gebruikersnaam</value>\n  </data>\n  <data name=\"ServerError\" xml:space=\"preserve\">\n    <value>Serverfout</value>\n  </data>\n  <data name=\"ServerErrorMessage\" xml:space=\"preserve\">\n    <value>Er is een interne serverfout opgetreden. Probeer het later nog eens.</value>\n  </data>\n  <data name=\"UsernameDescription\" xml:space=\"preserve\">\n    <value>Je kunt een gebruikersnaam kiezen voor **Telegram**. Hiermee kunnen anderen je vinden en contact met je opnemen zonder je telefoonnummer te weten.\n\nJe mag **a-z**, **0-9** en liggend streepje gebruiken. De minimale lengte is **5** tekens.</value>\n  </data>\n  <data name=\"UsernameOccupied\" xml:space=\"preserve\">\n    <value>Sorry, deze gebruikersnaam is al bezet.</value>\n  </data>\n  <data name=\"UsernameInvalid\" xml:space=\"preserve\">\n    <value>Sorry, deze gebruikersnaam is niet toegestaan.</value>\n  </data>\n  <data name=\"WaitingForNetwork\" xml:space=\"preserve\">\n    <value>Wachten op netwerk</value>\n  </data>\n  <data name=\"GlobalSearch\" xml:space=\"preserve\">\n    <value>Wereldwijd zoeken</value>\n  </data>\n  <data name=\"UsernameShort\" xml:space=\"preserve\">\n    <value>Je naam moet minimaal 5 tekens hebben.</value>\n  </data>\n  <data name=\"UsernameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Sorry, begincijfers zijn niet toegestaan.</value>\n  </data>\n  <data name=\"SelectChat\" xml:space=\"preserve\">\n    <value>Kies chat</value>\n  </data>\n  <data name=\"MaximumFileSizeExceeded\" xml:space=\"preserve\">\n    <value>Het bestand is te groot. Je kunt bestanden tot {0} versturen.</value>\n  </data>\n  <data name=\"UnableToAccessDocument\" xml:space=\"preserve\">\n    <value>Kan bestand niet openen. Kies een ander bestand om te uploaden.</value>\n  </data>\n  <data name=\"Camcorder\" xml:space=\"preserve\">\n    <value>Videocamera</value>\n  </data>\n  <data name=\"CompressVideo\" xml:space=\"preserve\">\n    <value>Video comprimeren</value>\n  </data>\n  <data name=\"EditedVideo\" xml:space=\"preserve\">\n    <value>Bewerkte video</value>\n  </data>\n  <data name=\"EditVideo\" xml:space=\"preserve\">\n    <value>Video bewerken</value>\n  </data>\n  <data name=\"OriginalVideo\" xml:space=\"preserve\">\n    <value>Originele video</value>\n  </data>\n  <data name=\"AccountSelfDestrucsDescription\" xml:space=\"preserve\">\n    <value>Als je binnen deze periode niet minimaal één keer ingelogd bent geweest zal je account worden verwijderd, inclusief alle groepen, berichten en contacten.</value>\n  </data>\n  <data name=\"AccountSelfDestructs\" xml:space=\"preserve\">\n    <value>Account verwijderen</value>\n  </data>\n  <data name=\"AddExceptions\" xml:space=\"preserve\">\n    <value>Uitzonderingen toevoegen</value>\n  </data>\n  <data name=\"AlwaysShare\" xml:space=\"preserve\">\n    <value>Altijd delen</value>\n  </data>\n  <data name=\"AlwaysShareWirhUsers\" xml:space=\"preserve\">\n    <value>Altijd delen met gebruikers</value>\n  </data>\n  <data name=\"AlwaysShareWith\" xml:space=\"preserve\">\n    <value>Altijd delen met</value>\n  </data>\n  <data name=\"CodecWasNotFound\" xml:space=\"preserve\">\n    <value>Codec niet gevonden</value>\n  </data>\n  <data name=\"Everybody\" xml:space=\"preserve\">\n    <value>Iedereen</value>\n  </data>\n  <data name=\"IfYouAreAwayFor\" xml:space=\"preserve\">\n    <value>Indien afwezig voor</value>\n  </data>\n  <data name=\"LastSeenDescription\" xml:space=\"preserve\">\n    <value>Wie kan mijn laatst gezien tijd zien?</value>\n  </data>\n  <data name=\"LastSeenImportantNote\" xml:space=\"preserve\">\n    <value>Let op: van mensen waarmee je je laatst gezien tijd niet deelt is deze voor jou ook niet zichtbaar. In plaats daarvan krijg je tijden bij benadering te zien (recent, afgelopen week, afgelopen maand). </value>\n  </data>\n  <data name=\"LastSeenLongTimeAgo\" xml:space=\"preserve\">\n    <value>lang geleden gezien</value>\n  </data>\n  <data name=\"LastSeenRecently\" xml:space=\"preserve\">\n    <value>recent gezien</value>\n  </data>\n  <data name=\"LastSeenWithinMonth\" xml:space=\"preserve\">\n    <value>afgelopen maand gezien</value>\n  </data>\n  <data name=\"LastSeenWithinWeek\" xml:space=\"preserve\">\n    <value>afgelopen week gezien</value>\n  </data>\n  <data name=\"MyContacts\" xml:space=\"preserve\">\n    <value>Mijn contacten</value>\n  </data>\n  <data name=\"NeverShare\" xml:space=\"preserve\">\n    <value>Nooit delen</value>\n  </data>\n  <data name=\"NeverShareWith\" xml:space=\"preserve\">\n    <value>Nooit delen met</value>\n  </data>\n  <data name=\"NeverShareWithUsers\" xml:space=\"preserve\">\n    <value>Nooit delen met gebruikers</value>\n  </data>\n  <data name=\"Nobody\" xml:space=\"preserve\">\n    <value>Niemand</value>\n  </data>\n  <data name=\"PrivacyAndSecurity\" xml:space=\"preserve\">\n    <value>Privacy en veiligheid</value>\n  </data>\n  <data name=\"PrivacySettingsError\" xml:space=\"preserve\">\n    <value>Sorry, te veel verzoeken. Momenteel is het niet mogelijk om de privacyinstellingen te wijzigen, even geduld alsjeblieft.</value>\n  </data>\n  <data name=\"ProfileIsInvalid\" xml:space=\"preserve\">\n    <value>Ongeldig videocoderingsprofiel</value>\n  </data>\n  <data name=\"SettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Deze instelling overschrijft de bovenstaande.</value>\n  </data>\n  <data name=\"UnknownFailure\" xml:space=\"preserve\">\n    <value>Onbekende fout</value>\n  </data>\n  <data name=\"LastSeenShort\" xml:space=\"preserve\">\n    <value>Laatst gezien</value>\n  </data>\n  <data name=\"PrivacySecuritySubtitle\" xml:space=\"preserve\">\n    <value>Blokkeren, laatst gezien, sessies</value>\n  </data>\n  <data name=\"MonthGenitivePlural\" xml:space=\"preserve\">\n    <value>Maanden</value>\n  </data>\n  <data name=\"MonthGenitiveSingular\" xml:space=\"preserve\">\n    <value>Maand</value>\n  </data>\n  <data name=\"MonthNominativePlural\" xml:space=\"preserve\">\n    <value>Maanden</value>\n  </data>\n  <data name=\"MonthNominativeSingular\" xml:space=\"preserve\">\n    <value>Maand</value>\n  </data>\n  <data name=\"YearGenitivePlural\" xml:space=\"preserve\">\n    <value>Jaren</value>\n  </data>\n  <data name=\"YearGenitiveSingular\" xml:space=\"preserve\">\n    <value>Jaar</value>\n  </data>\n  <data name=\"YearNominativePlural\" xml:space=\"preserve\">\n    <value>Jaren</value>\n  </data>\n  <data name=\"YearNominativeSingular\" xml:space=\"preserve\">\n    <value>Jaar</value>\n  </data>\n  <data name=\"LastSeenDescription2\" xml:space=\"preserve\">\n    <value>Wie kan mijn laatst gezien tijd zien?</value>\n  </data>\n  <data name=\"CheckingUsername\" xml:space=\"preserve\">\n    <value>Gebruikersnaam controleren.</value>\n  </data>\n  <data name=\"CantFindContactWithUsername\" xml:space=\"preserve\">\n    <value>Telegram-gebruiker met gebruikersnaam @{0} niet gevonden. </value>\n  </data>\n  <data name=\"Compressing\" xml:space=\"preserve\">\n    <value>comprimeren</value>\n  </data>\n  <data name=\"PeopleHubIntegration\" xml:space=\"preserve\">\n    <value>Synchroniseren met contacten</value>\n  </data>\n  <data name=\"SyncContactsProgress\" xml:space=\"preserve\">\n    <value>Contact ({0} van {1}) synchroniseren.</value>\n  </data>\n  <data name=\"DeletingContacts\" xml:space=\"preserve\">\n    <value>Contacten verwijderen. </value>\n  </data>\n  <data name=\"ChangeNumber\" xml:space=\"preserve\">\n    <value>Nummer wijzigen</value>\n  </data>\n  <data name=\"ConfirmNewNumberMessage\" xml:space=\"preserve\">\n    <value>We sturen een sms-bericht met verificatiecode naar je nieuwe nummer.</value>\n  </data>\n  <data name=\"NewNumber\" xml:space=\"preserve\">\n    <value>Nieuw nummer</value>\n  </data>\n  <data name=\"NewNumberConfirmation\" xml:space=\"preserve\">\n    <value>Al je Telegram contacten krijgen je nieuwe nummer in hun adresboek, ervan uitgaande dat ze je oude nummer hadden en je hen niet had geblokkeerd in Telegram.</value>\n  </data>\n  <data name=\"NewNumberDescription\" xml:space=\"preserve\">\n    <value>Je kan je telefoonnummer hier wijzigen. Al je clouddata — berichten, bestanden, groepen, contacten, etc. zullen worden gekopieërd naar je nieuwe nummer. \n\n**Let op**: al je Telegram-contacten krijgen je nieuwe nummer in hun adresboek,  ervan uitgaande dat ze je oude nummer hadden en je hen niet had geblokkeerd in Telegram. </value>\n  </data>\n  <data name=\"NewNumberTaken\" xml:space=\"preserve\">\n    <value>Aan telefoonnummer {0} is al een Telegram-account gekoppeld. Verwijder het account om te kunnen migreren naar het nieuwe nummer.</value>\n  </data>\n  <data name=\"MessageActionScreenshotMessages\" xml:space=\"preserve\">\n    <value>{0} heeft een schermafdruk gemaakt!</value>\n  </data>\n  <data name=\"MessageActionYouScreenshotMessages\" xml:space=\"preserve\">\n    <value>Schermafdruk gemaakt!</value>\n  </data>\n  <data name=\"DayGenitivePlural\" xml:space=\"preserve\">\n    <value>Dagen</value>\n  </data>\n  <data name=\"DayGenitiveSingular\" xml:space=\"preserve\">\n    <value>Dag</value>\n  </data>\n  <data name=\"DayNominativePlural\" xml:space=\"preserve\">\n    <value>Dagen</value>\n  </data>\n  <data name=\"DayNominativeSingular\" xml:space=\"preserve\">\n    <value>Dag</value>\n  </data>\n  <data name=\"HourGenitivePlural\" xml:space=\"preserve\">\n    <value>Uur</value>\n  </data>\n  <data name=\"HourGenitiveSingular\" xml:space=\"preserve\">\n    <value>Uur</value>\n  </data>\n  <data name=\"HourNominativePlural\" xml:space=\"preserve\">\n    <value>Uur</value>\n  </data>\n  <data name=\"HourNominativeSingular\" xml:space=\"preserve\">\n    <value>Uur</value>\n  </data>\n  <data name=\"MinuteNominativePlural\" xml:space=\"preserve\">\n    <value>Minuten</value>\n  </data>\n  <data name=\"MinuteNominativeSingular\" xml:space=\"preserve\">\n    <value>Minuut</value>\n  </data>\n  <data name=\"SecondGenitivePlural\" xml:space=\"preserve\">\n    <value>Seconden</value>\n  </data>\n  <data name=\"SecondGenitiveSingular\" xml:space=\"preserve\">\n    <value>Seconde</value>\n  </data>\n  <data name=\"SecondNominativePlural\" xml:space=\"preserve\">\n    <value>Seconden</value>\n  </data>\n  <data name=\"SecondNominativeSingular\" xml:space=\"preserve\">\n    <value>Seconde</value>\n  </data>\n  <data name=\"WeekGenitivePlural\" xml:space=\"preserve\">\n    <value>Weken</value>\n  </data>\n  <data name=\"WeekGenitiveSingular\" xml:space=\"preserve\">\n    <value>Week</value>\n  </data>\n  <data name=\"WeekNominativePlural\" xml:space=\"preserve\">\n    <value>Weken</value>\n  </data>\n  <data name=\"WeekNominativeSingular\" xml:space=\"preserve\">\n    <value>Week</value>\n  </data>\n  <data name=\"TapAndHoldToView\" xml:space=\"preserve\">\n    <value>Druk en houd ingedrukt</value>\n  </data>\n  <data name=\"Sticker\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"Files\" xml:space=\"preserve\">\n    <value>Bestanden</value>\n  </data>\n  <data name=\"NoFilesHere\" xml:space=\"preserve\">\n    <value>Geen bestanden hier</value>\n  </data>\n  <data name=\"ShareFiles\" xml:space=\"preserve\">\n    <value>Je kunt willekeurige bestanden tot 1.5 GB versturen en ontvangen en deze overal benaderen.</value>\n  </data>\n  <data name=\"SharePhotosAndVideos\" xml:space=\"preserve\">\n    <value>Nog geen bestanden. \n\nDeel foto's en video's in deze chat —  of deze paperclip blijft verdrietig.</value>\n  </data>\n  <data name=\"Disabled\" xml:space=\"preserve\">\n    <value>Uitschakelen</value>\n  </data>\n  <data name=\"Enabled\" xml:space=\"preserve\">\n    <value>Inschakelen</value>\n  </data>\n  <data name=\"MuteFor\" xml:space=\"preserve\">\n    <value>{0} stil</value>\n  </data>\n  <data name=\"UnmuteIn\" xml:space=\"preserve\">\n    <value>Over {0}</value>\n  </data>\n  <data name=\"More\" xml:space=\"preserve\">\n    <value>Meer</value>\n  </data>\n  <data name=\"SearchAmongYourChats\" xml:space=\"preserve\">\n    <value>In chats zoeken</value>\n  </data>\n  <data name=\"SearchAmongYourFiles\" xml:space=\"preserve\">\n    <value>In gedeelde bestanden zoeken</value>\n  </data>\n  <data name=\"NewAuthorization\" xml:space=\"preserve\">\n    <value>{0},\nEr is op je account ingelogd vanaf een nieuw apparaat op {1}, {2} om {3}\nApparaat: {4}\nLocatie: {5}\n\nAls jij dit niet was, kun je alle sessies beëindigen via Instellingen – Privacy en veiligheid – Beëindig alle andere sessies.\n\nBedankt,\nHet Telegram-team</value>\n  </data>\n  <data name=\"Link\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"ContactRegistered\" xml:space=\"preserve\">\n    <value>{0} heeft nu Telegram!</value>\n  </data>\n  <data name=\"UnreadMessages\" xml:space=\"preserve\">\n    <value>Ongelezen berichten</value>\n  </data>\n  <data name=\"ChangePasscode\" xml:space=\"preserve\">\n    <value>Toegangscode wijzigen</value>\n  </data>\n  <data name=\"ChangePasscodeHint\" xml:space=\"preserve\">\n    <value>Als je een toegangscode instelt verschijnt er een slotje op de chatspagina. Tik erop om Telegram te vergrendelen of te ontgrendelen.\n\nLet op: vergeet je de toegangscode dan zul je de app moeten verwijderen en herinstalleren. Alle geheime chats gaan daarbij verloren.</value>\n  </data>\n  <data name=\"ConfirmPasscode\" xml:space=\"preserve\">\n    <value>Toegangscode bevestigen</value>\n  </data>\n  <data name=\"EnterPasscode\" xml:space=\"preserve\">\n    <value>Toegangscode invoeren</value>\n  </data>\n  <data name=\"Passcode\" xml:space=\"preserve\">\n    <value>Toegangscode-vergrendeling</value>\n  </data>\n  <data name=\"SimplePasscode\" xml:space=\"preserve\">\n    <value>Eenvoudige toegangscode</value>\n  </data>\n  <data name=\"SimplePasscodeHint\" xml:space=\"preserve\">\n    <value>Eenvoudige toegangcodes zijn 4-cijferig.</value>\n  </data>\n  <data name=\"YourPasscode\" xml:space=\"preserve\">\n    <value>Nieuwe toegangscode</value>\n  </data>\n  <data name=\"EnterYourCurrentPasscode\" xml:space=\"preserve\">\n    <value>Huidige toegangscode invoeren</value>\n  </data>\n  <data name=\"PasscodeType\" xml:space=\"preserve\">\n    <value>Toegangscodetype</value>\n  </data>\n  <data name=\"Pin\" xml:space=\"preserve\">\n    <value>PIN</value>\n  </data>\n  <data name=\"Privacy\" xml:space=\"preserve\">\n    <value>Privacy</value>\n  </data>\n  <data name=\"Security\" xml:space=\"preserve\">\n    <value>Veiligheid</value>\n  </data>\n  <data name=\"YouHaveNewMessage\" xml:space=\"preserve\">\n    <value>Je hebt een nieuw bericht</value>\n  </data>\n  <data name=\"PasscodeAutolockHint\" xml:space=\"preserve\">\n    <value>Vraag om toegangscode indien afwezig</value>\n  </data>\n  <data name=\"PasscodeAutolockIn\" xml:space=\"preserve\">\n    <value>Over {0}</value>\n  </data>\n  <data name=\"Autolock\" xml:space=\"preserve\">\n    <value>Automatisch vergrendelen</value>\n  </data>\n  <data name=\"AutolockDisabled\" xml:space=\"preserve\">\n    <value>Uitgeschakeld</value>\n  </data>\n  <data name=\"IncorrectPasscode\" xml:space=\"preserve\">\n    <value>Ongeldige toegangscode</value>\n  </data>\n  <data name=\"Reply\" xml:space=\"preserve\">\n    <value>Antwoord</value>\n  </data>\n  <data name=\"AndOthers\" xml:space=\"preserve\">\n    <value>en {0} anderen</value>\n  </data>\n  <data name=\"ForwardedAudioGenitivePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: geluidsbestanden</value>\n  </data>\n  <data name=\"ForwardedAudioGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bijlage: geluidsbestand</value>\n  </data>\n  <data name=\"ForwardedAudioNominativePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: geluidsbestanden</value>\n  </data>\n  <data name=\"ForwardedAudioNominativeSingular\" xml:space=\"preserve\">\n    <value>Bijlage: geluidsbestand</value>\n  </data>\n  <data name=\"ForwardedContactGenitivePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: contacten</value>\n  </data>\n  <data name=\"ForwardedContactGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bijlage: contact</value>\n  </data>\n  <data name=\"ForwardedContactNominativePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: contacten</value>\n  </data>\n  <data name=\"ForwardedContactNominativeSingular\" xml:space=\"preserve\">\n    <value>Bijlage: contact</value>\n  </data>\n  <data name=\"ForwardedFileGenitivePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: bestanden</value>\n  </data>\n  <data name=\"ForwardedFileGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bijlage: bestand</value>\n  </data>\n  <data name=\"ForwardedFileNominativePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: bestanden</value>\n  </data>\n  <data name=\"ForwardedFileNominativeSingular\" xml:space=\"preserve\">\n    <value>Bijlage: bestand</value>\n  </data>\n  <data name=\"ForwardedLocationGenitivePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: locaties</value>\n  </data>\n  <data name=\"ForwardedLocationGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bijlage: locatie</value>\n  </data>\n  <data name=\"ForwardedLocationNominativePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: locaties</value>\n  </data>\n  <data name=\"ForwardedLocationNominativeSingular\" xml:space=\"preserve\">\n    <value>Bijlage: locatie</value>\n  </data>\n  <data name=\"ForwardedMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: berichten</value>\n  </data>\n  <data name=\"ForwardedMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bijlage: bericht</value>\n  </data>\n  <data name=\"ForwardedMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: berichten</value>\n  </data>\n  <data name=\"ForwardedMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Bijlage: bericht</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: foto's</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bijlage: foto</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: foto's</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Bijlage: foto</value>\n  </data>\n  <data name=\"ForwardedStickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: stickers</value>\n  </data>\n  <data name=\"ForwardedStickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bijlage: sticker</value>\n  </data>\n  <data name=\"ForwardedStickerNominativePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: stickers</value>\n  </data>\n  <data name=\"ForwardedStickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Bijlage: sticker</value>\n  </data>\n  <data name=\"ForwardedVideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: video's</value>\n  </data>\n  <data name=\"ForwardedVideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bijlage: video</value>\n  </data>\n  <data name=\"ForwardedVideoNominativePlural\" xml:space=\"preserve\">\n    <value>Bijlagen: video's</value>\n  </data>\n  <data name=\"ForwardedVideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Bijlage: video</value>\n  </data>\n  <data name=\"SearchMessages\" xml:space=\"preserve\">\n    <value>Zoek door berichten</value>\n  </data>\n  <data name=\"Unsupported\" xml:space=\"preserve\">\n    <value>Niet ondersteund</value>\n  </data>\n  <data name=\"EnterYourCurrentPassword\" xml:space=\"preserve\">\n    <value>Wachtwoord invoeren</value>\n  </data>\n  <data name=\"Password\" xml:space=\"preserve\">\n    <value>Wachtwoord</value>\n  </data>\n  <data name=\"PasswordInvalidString\" xml:space=\"preserve\">\n    <value>Ongeldig wachtwoord. Probeer het nog eens.</value>\n  </data>\n  <data name=\"AlmostThere\" xml:space=\"preserve\">\n    <value>Bijna klaar!</value>\n  </data>\n  <data name=\"ChangePassword\" xml:space=\"preserve\">\n    <value>Wachtwoord wijzigen</value>\n  </data>\n  <data name=\"ChangePasswordHint\" xml:space=\"preserve\">\n    <value>Naast de code die je per SMS ontvangt kun je een extra wachtwoord instellen voor als je inlogt op een nieuw apparaat.</value>\n  </data>\n  <data name=\"ChangeRecoveryEmail\" xml:space=\"preserve\">\n    <value>Herstel-e-mailadres wijzigen</value>\n  </data>\n  <data name=\"CompletePasswordHint\" xml:space=\"preserve\">\n    <value>Controleer je e-mail om de twee-staps-verificatie in te schakelen. Kijk voor de zekerheid ook in de ongewenste post.</value>\n  </data>\n  <data name=\"ConfirmPassword\" xml:space=\"preserve\">\n    <value>Wachtwoord opnieuw invoeren</value>\n  </data>\n  <data name=\"EnterPassword\" xml:space=\"preserve\">\n    <value>Wachtwoord invoeren</value>\n  </data>\n  <data name=\"EnterRecoveryEmail\" xml:space=\"preserve\">\n    <value>E-mail invoeren</value>\n  </data>\n  <data name=\"EnterRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>Voeg je geldige e-mailadres toe. Het is de enige manier om je wachtwoord te herstellen.</value>\n  </data>\n  <data name=\"RecoveryEmail\" xml:space=\"preserve\">\n    <value>Herstel-e-mailadres</value>\n  </data>\n  <data name=\"SetRecoveryEmail\" xml:space=\"preserve\">\n    <value>Herstel-e-mailadres instellen</value>\n  </data>\n  <data name=\"Skip\" xml:space=\"preserve\">\n    <value>Overslaan</value>\n  </data>\n  <data name=\"SkipRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>Let op:\n\nAls je je wachtwoord vergeet verlies je toegang tot je Telegram-account. Er is geen optie om dit te herstellen.</value>\n  </data>\n  <data name=\"TwoStepVerification\" xml:space=\"preserve\">\n    <value>Twee-staps-verificatie</value>\n  </data>\n  <data name=\"YourPassword\" xml:space=\"preserve\">\n    <value>Je wachtwoord</value>\n  </data>\n  <data name=\"CurrentSession\" xml:space=\"preserve\">\n    <value>Huidige sessie</value>\n  </data>\n  <data name=\"OtherSessions\" xml:space=\"preserve\">\n    <value>Andere sessies</value>\n  </data>\n  <data name=\"OfficialApp\" xml:space=\"preserve\">\n    <value>Officiële app</value>\n  </data>\n  <data name=\"Sessions\" xml:space=\"preserve\">\n    <value>Actieve sessies</value>\n  </data>\n  <data name=\"TerminateAllOtherSessionsNote\" xml:space=\"preserve\">\n    <value>Logt alle apparaten behalve deze uit.</value>\n  </data>\n  <data name=\"UnofficialApp\" xml:space=\"preserve\">\n    <value>Onofficiële app</value>\n  </data>\n  <data name=\"EmailInvalid\" xml:space=\"preserve\">\n    <value>Ongeldig e-mailadres.</value>\n  </data>\n  <data name=\"PasswordActive\" xml:space=\"preserve\">\n    <value>Je wachtwoord voor twee-staps-verificatie is nu actief.</value>\n  </data>\n  <data name=\"Success\" xml:space=\"preserve\">\n    <value>Gelukt!</value>\n  </data>\n  <data name=\"RecoveryEmailPending\" xml:space=\"preserve\">\n    <value>Je herstel-e-mailadres {0} is nog niet actief en in afwachting van bevestiging. </value>\n  </data>\n  <data name=\"AbortTwoStepVerificationSetup\" xml:space=\"preserve\">\n    <value>Twee-staps-verificatie annuleren</value>\n  </data>\n  <data name=\"StepsToCompleteToTwoStepsVerificationSetup\" xml:space=\"preserve\">\n    <value>Volg deze stappen om twee-staps-verificatie in te schakelen\n\n1. Controleer je e-mail (kijk voor de zekerheid ook in de ongewenste post) {0}\n\n2. Klik op de bevestigingslink.</value>\n  </data>\n  <data name=\"Hint\" xml:space=\"preserve\">\n    <value>Hint</value>\n  </data>\n  <data name=\"PasswordHint\" xml:space=\"preserve\">\n    <value>Wachtwoordhint</value>\n  </data>\n  <data name=\"PasswordHintLabel\" xml:space=\"preserve\">\n    <value>Stel een hint voor je wachtwoord in</value>\n  </data>\n  <data name=\"ForgotPassword\" xml:space=\"preserve\">\n    <value>Wachtwoord vergeten?</value>\n  </data>\n  <data name=\"PasswordHintError\" xml:space=\"preserve\">\n    <value>De hint moet anders zijn dan je wachtwoord</value>\n  </data>\n  <data name=\"EnterPasswordHint\" xml:space=\"preserve\">\n    <value>Wachtwoordhint invoeren</value>\n  </data>\n  <data name=\"HavingTroubleAccessingEmailMessage\" xml:space=\"preserve\">\n    <value>Kun je je e-mail niet benaderen {0}?</value>\n  </data>\n  <data name=\"NoAccessRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Als je geen toegang meer hebt tot je e-mail en je ingestelde wachtwoord zul je je account moeten resetten.</value>\n  </data>\n  <data name=\"NoRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Omdat je geen herstel-e-mailadres hebt opgegeven voor je wachtwoord zul je bij verlies van je wachtwoord je account moeten resetten.</value>\n  </data>\n  <data name=\"PasswordDeactivated\" xml:space=\"preserve\">\n    <value>Wachtwoord uitgeschakeld</value>\n  </data>\n  <data name=\"PasswordMessage\" xml:space=\"preserve\">\n    <value>Twee-staps-verificatie ingeschakeld. Je account is met een extra wachtwoord beveiligd.</value>\n  </data>\n  <data name=\"PasswordRecovery\" xml:space=\"preserve\">\n    <value>Wachtwoordherstel</value>\n  </data>\n  <data name=\"PasswordRecoveryHint\" xml:space=\"preserve\">\n    <value>Controleer je e-mail en geef de 6-cijferige code in die we je hebben gestuurd.</value>\n  </data>\n  <data name=\"SentRecoveryCodeMessage\" xml:space=\"preserve\">\n    <value>We hebben een herstelcode naar je opgegeven e-mailadres gestuurd: {0}</value>\n  </data>\n  <data name=\"Sorry\" xml:space=\"preserve\">\n    <value>Sorry</value>\n  </data>\n  <data name=\"RecoveryEmailComplete\" xml:space=\"preserve\">\n    <value>Je hebt twee-staps-verificatie ingeschakeld.\nAls je inlogt op je Telegram-account heb je het ingestelde wachtwoord nodig.</value>\n  </data>\n  <data name=\"TerminateSessionHint\" xml:space=\"preserve\">\n    <value>Tik op een sessie om deze te beëindigen.</value>\n  </data>\n  <data name=\"GettingLinkInfo\" xml:space=\"preserve\">\n    <value>Link-preview ophalen...</value>\n  </data>\n  <data name=\"ResetMyAccount\" xml:space=\"preserve\">\n    <value>Reset mijn account</value>\n  </data>\n  <data name=\"ResetMyAccountConfirmation\" xml:space=\"preserve\">\n    <value>Je kunt dit niet ongedaan maken.\n\nAl je chats, berichten en data gaan verloren als je je account reset.</value>\n  </data>\n  <data name=\"ResetMyAccountHint\" xml:space=\"preserve\">\n    <value>Al je chats, berichten en alle andere data gaan verloren als je verder gaat met de account-reset.</value>\n  </data>\n  <data name=\"IsRecordingAudio\" xml:space=\"preserve\">\n    <value>Neemt geluid op</value>\n  </data>\n  <data name=\"IsSendingFile\" xml:space=\"preserve\">\n    <value>Verstuurt een bestand</value>\n  </data>\n  <data name=\"IsSendingPhoto\" xml:space=\"preserve\">\n    <value>Verstuurt een foto</value>\n  </data>\n  <data name=\"IsSendingVideo\" xml:space=\"preserve\">\n    <value>Verstuurt een video</value>\n  </data>\n  <data name=\"RecordingAudio\" xml:space=\"preserve\">\n    <value>Geluid opnemen</value>\n  </data>\n  <data name=\"SendingFile\" xml:space=\"preserve\">\n    <value>Bestand versturen</value>\n  </data>\n  <data name=\"SendingPhoto\" xml:space=\"preserve\">\n    <value>Foto versturen</value>\n  </data>\n  <data name=\"SendingVideo\" xml:space=\"preserve\">\n    <value>Video versturen</value>\n  </data>\n  <data name=\"AddCaption\" xml:space=\"preserve\">\n    <value>Onderschrift toevoegen</value>\n  </data>\n  <data name=\"CopyLink\" xml:space=\"preserve\">\n    <value>Uitnodigingslink kopiëren</value>\n  </data>\n  <data name=\"CopyLinkHint\" xml:space=\"preserve\">\n    <value>Link gekopieerd naar klembord</value>\n  </data>\n  <data name=\"GroupFullError\" xml:space=\"preserve\">\n    <value>Sorry, deze groep is al vol.</value>\n  </data>\n  <data name=\"GroupNotExistsError\" xml:space=\"preserve\">\n    <value>Sorry, deze chat bestaat niet.</value>\n  </data>\n  <data name=\"InviteGroupViaLink\" xml:space=\"preserve\">\n    <value>Uitnodigingslink sturen</value>\n  </data>\n  <data name=\"InviteLink\" xml:space=\"preserve\">\n    <value>Uitnodigingslink</value>\n  </data>\n  <data name=\"InviteLinkHint\" xml:space=\"preserve\">\n    <value>Andere Telegram-gebruikers kunnen lid worden van je groep door deze link te openen.</value>\n  </data>\n  <data name=\"JoinGroupConfirmation\" xml:space=\"preserve\">\n    <value>Wil je lid worden van de groep '{0}'?</value>\n  </data>\n  <data name=\"MessageActionChatJoinedByLink\" xml:space=\"preserve\">\n    <value>{0} is nu lid van de groep via uitnodigingslink</value>\n  </data>\n  <data name=\"RevokeLink\" xml:space=\"preserve\">\n    <value>Link intrekken</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation\" xml:space=\"preserve\">\n    <value>Deze link echt intrekken? Na intrekken kan niemand meer lid worden met de oude link.</value>\n  </data>\n  <data name=\"RevokeLinkHint\" xml:space=\"preserve\">\n    <value>De oude link is nu inactief. Een nieuwe link is aangemaakt.</value>\n  </data>\n  <data name=\"ShareLink\" xml:space=\"preserve\">\n    <value>Link delen</value>\n  </data>\n  <data name=\"Directions\" xml:space=\"preserve\">\n    <value>Routebeschrijving</value>\n  </data>\n  <data name=\"NearbyPlaces\" xml:space=\"preserve\">\n    <value>Plekken in de buurt</value>\n  </data>\n  <data name=\"SendThisLocation\" xml:space=\"preserve\">\n    <value>Mijn locatie sturen</value>\n  </data>\n  <data name=\"PoweredBy\" xml:space=\"preserve\">\n    <value>Powered by</value>\n  </data>\n  <data name=\"LocationServicesDisabled\" xml:space=\"preserve\">\n    <value>Locatieservices zijn uitgeschakeld.</value>\n  </data>\n  <data name=\"LocationSettings\" xml:space=\"preserve\">\n    <value>Locatie-instellingen</value>\n  </data>\n  <data name=\"Unknown\" xml:space=\"preserve\">\n    <value>Onbekend</value>\n  </data>\n  <data name=\"AddStickersConfirmation\" xml:space=\"preserve\">\n    <value>Wil je de stickers '{0}' toevoegen?</value>\n  </data>\n  <data name=\"NewStickersAdded\" xml:space=\"preserve\">\n    <value>Nieuwe stickers toegevoegd</value>\n  </data>\n  <data name=\"StickersNotFound\" xml:space=\"preserve\">\n    <value>Stickers niet gevonden</value>\n  </data>\n  <data name=\"ClearLogs\" xml:space=\"preserve\">\n    <value>Logs wissen</value>\n  </data>\n  <data name=\"Hide\" xml:space=\"preserve\">\n    <value>Verbergen</value>\n  </data>\n  <data name=\"Remove\" xml:space=\"preserve\">\n    <value>Verwijder</value>\n  </data>\n  <data name=\"SendLogs\" xml:space=\"preserve\">\n    <value>Logs sturen</value>\n  </data>\n  <data name=\"StickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Stickers</value>\n  </data>\n  <data name=\"StickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"StickerNominativePlural\" xml:space=\"preserve\">\n    <value>Stickers</value>\n  </data>\n  <data name=\"StickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"Stickers\" xml:space=\"preserve\">\n    <value>Stickers</value>\n  </data>\n  <data name=\"StickersDescription\" xml:space=\"preserve\">\n    <value>Ontwerpers kunnen stickerbundels toevoegen via onze bot: @stickers. \n\nGebruikers kunnen met een tik stickers toevoegen via \"Toevoegen aan stickers\".</value>\n  </data>\n  <data name=\"LinkCopiedToClipboard\" xml:space=\"preserve\">\n    <value>Link gekopieerd naar klembord</value>\n  </data>\n  <data name=\"Close\" xml:space=\"preserve\">\n    <value>Sluit</value>\n  </data>\n  <data name=\"Show\" xml:space=\"preserve\">\n    <value>Weergeven</value>\n  </data>\n  <data name=\"AddToStickers\" xml:space=\"preserve\">\n    <value>Toevoegen aan stickers</value>\n  </data>\n  <data name=\"SecretChatRequested\" xml:space=\"preserve\">\n    <value>Encryptiesleutels uitwisselen</value>\n  </data>\n  <data name=\"Bot\" xml:space=\"preserve\">\n    <value>Bot</value>\n  </data>\n  <data name=\"OnlySeesMessagesStartingWithSlash\" xml:space=\"preserve\">\n    <value>geen toegang tot berichten</value>\n  </data>\n  <data name=\"SeesAllMessages\" xml:space=\"preserve\">\n    <value>toegang tot berichten</value>\n  </data>\n  <data name=\"WhatCanThisBotDo\" xml:space=\"preserve\">\n    <value>Wat kan deze bot? </value>\n  </data>\n  <data name=\"AddBotToGroupsError\" xml:space=\"preserve\">\n    <value>Deze bot kan geen groepslid worden.</value>\n  </data>\n  <data name=\"AddToGroup\" xml:space=\"preserve\">\n    <value>Groepslid maken</value>\n  </data>\n  <data name=\"BlockContactConfirmation\" xml:space=\"preserve\">\n    <value>Weet je zeker dat je deze persoon wilt blokkeren?</value>\n  </data>\n  <data name=\"Help\" xml:space=\"preserve\">\n    <value>Help</value>\n  </data>\n  <data name=\"Start\" xml:space=\"preserve\">\n    <value>Begin</value>\n  </data>\n  <data name=\"UnblockContactConfirmation\" xml:space=\"preserve\">\n    <value>Weet je zeker dat je deze persoon wilt deblokkeren?</value>\n  </data>\n  <data name=\"SharedLinks\" xml:space=\"preserve\">\n    <value>Links</value>\n  </data>\n  <data name=\"BackgroudnTaskDisabledAlert\" xml:space=\"preserve\">\n    <value>Draaien op de achtergrond is uitgeschakeld voor Telegram, je ontvangt geen berichtmeldingen meer. Sta draaien op de achtergrond toe om berichtmeldingen te ontvangen.</value>\n  </data>\n  <data name=\"SearchSharedLinks\" xml:space=\"preserve\">\n    <value>Gedeelde links zoeken</value>\n  </data>\n  <data name=\"SharedFiles\" xml:space=\"preserve\">\n    <value>Bestanden</value>\n  </data>\n  <data name=\"ShareLinks\" xml:space=\"preserve\">\n    <value>Deel links in deze chat om ze op al je apparaten te kunnen benaderen.</value>\n  </data>\n  <data name=\"DeleteAndStop\" xml:space=\"preserve\">\n    <value>Verwijder en stop</value>\n  </data>\n  <data name=\"Restart\" xml:space=\"preserve\">\n    <value>Herstart</value>\n  </data>\n  <data name=\"RestartBot\" xml:space=\"preserve\">\n    <value>Bot herstarten</value>\n  </data>\n  <data name=\"StopBot\" xml:space=\"preserve\">\n    <value>Stop</value>\n  </data>\n  <data name=\"ClearSearchHistoryConfirmation\" xml:space=\"preserve\">\n    <value>Zoekgeschiedenis wissen?</value>\n  </data>\n  <data name=\"Recent\" xml:space=\"preserve\">\n    <value>Recent</value>\n  </data>\n  <data name=\"NewChannel\" xml:space=\"preserve\">\n    <value>Nieuw kanaal</value>\n  </data>\n  <data name=\"MessageActionBroadcastCreate\" xml:space=\"preserve\">\n    <value>{0} heeft het kanaal \"{1}\" gemaakt</value>\n  </data>\n  <data name=\"MessageActionChannelCreate\" xml:space=\"preserve\">\n    <value>Kanaal gemaakt</value>\n  </data>\n  <data name=\"ReportSpam\" xml:space=\"preserve\">\n    <value>Spam melden</value>\n  </data>\n  <data name=\"ConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Spam van deze gebruiker echt melden? </value>\n  </data>\n  <data name=\"GroupConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Spam van deze groep echt melden? </value>\n  </data>\n  <data name=\"PeerFloodAddContact\" xml:space=\"preserve\">\n    <value>Je kunt momenteel alleen onderlinge contacten aan groepen toevoegen</value>\n  </data>\n  <data name=\"PeerFloodSendMessage\" xml:space=\"preserve\">\n    <value>Je kunt momenteel alleen berichten sturen aan onderlingen contacten.</value>\n  </data>\n  <data name=\"LeaveChannel\" xml:space=\"preserve\">\n    <value>Kanaal verlaten</value>\n  </data>\n  <data name=\"AccessLevel\" xml:space=\"preserve\">\n    <value>Toegangsniveau</value>\n  </data>\n  <data name=\"AddManager\" xml:space=\"preserve\">\n    <value>Beheerder toevoegen</value>\n  </data>\n  <data name=\"Comments\" xml:space=\"preserve\">\n    <value>Reacties</value>\n  </data>\n  <data name=\"CommentsDescription\" xml:space=\"preserve\">\n    <value>Als je reacties inschakelt kunnen leden reageren op je bericht in het kanaal.</value>\n  </data>\n  <data name=\"Creator\" xml:space=\"preserve\">\n    <value>Maker</value>\n  </data>\n  <data name=\"Management\" xml:space=\"preserve\">\n    <value>Beheer</value>\n  </data>\n  <data name=\"Moderator\" xml:space=\"preserve\">\n    <value>Moderator</value>\n  </data>\n  <data name=\"ModeratorDescription\" xml:space=\"preserve\">\n    <value>Kunnen reacties verwijderen</value>\n  </data>\n  <data name=\"Publisher\" xml:space=\"preserve\">\n    <value>Beheerder</value>\n  </data>\n  <data name=\"PublisherDescription\" xml:space=\"preserve\">\n    <value>Kunnen berichten plaatsen en verwijderen.</value>\n  </data>\n  <data name=\"ChannelName\" xml:space=\"preserve\">\n    <value>Kanaalnaam</value>\n  </data>\n  <data name=\"Description\" xml:space=\"preserve\">\n    <value>Beschrijving</value>\n  </data>\n  <data name=\"AboutDescription\" xml:space=\"preserve\">\n    <value>Optioneel kun je een kanaalbeschrijving geven.</value>\n  </data>\n  <data name=\"Back\" xml:space=\"preserve\">\n    <value>Vorige</value>\n  </data>\n  <data name=\"ChannelType\" xml:space=\"preserve\">\n    <value>Kanaaltype</value>\n  </data>\n  <data name=\"Private\" xml:space=\"preserve\">\n    <value>Privé-groep</value>\n  </data>\n  <data name=\"PrivateChannelDescription\" xml:space=\"preserve\">\n    <value>Lid worden van privé-kanalen kan alleen via de uitnodigingslink.</value>\n  </data>\n  <data name=\"Public\" xml:space=\"preserve\">\n    <value>Publieke groep</value>\n  </data>\n  <data name=\"PublicChannelDescription\" xml:space=\"preserve\">\n    <value>Publieke kanalen zijn te vinden via de zoekfunctie, iedereen kan er lid van worden.</value>\n  </data>\n  <data name=\"PrivateLinkDescription\" xml:space=\"preserve\">\n    <value>Lid worden van je kanaal kan door deze link te volgen, je kunt de link altijd intrekken.</value>\n  </data>\n  <data name=\"PublicLinkDescription\" xml:space=\"preserve\">\n    <value>Deze link kan gedeeld worden met anderen en je kanaal kan worden gevonden via de zoekfunctie.</value>\n  </data>\n  <data name=\"CommentGenitivePlural\" xml:space=\"preserve\">\n    <value>Reacties</value>\n  </data>\n  <data name=\"CommentGenitiveSingular\" xml:space=\"preserve\">\n    <value>Reactie</value>\n  </data>\n  <data name=\"CommentNominativePlural\" xml:space=\"preserve\">\n    <value>Reacties</value>\n  </data>\n  <data name=\"CommentNominativeSingular\" xml:space=\"preserve\">\n    <value>Reactie</value>\n  </data>\n  <data name=\"Blacklist\" xml:space=\"preserve\">\n    <value>Blacklist</value>\n  </data>\n  <data name=\"Channel\" xml:space=\"preserve\">\n    <value>Kanaal</value>\n  </data>\n  <data name=\"ChoosePublicChannelLinkNotification\" xml:space=\"preserve\">\n    <value>Stel een link in voor je publieke kanaal, om deze vindbaar te maken via de zoekfunctie en te delen met anderen.\n\nWil je dit niet dan kun je een privé-kanaal aanmaken.</value>\n  </data>\n  <data name=\"MessageActionChannelEditPhoto\" xml:space=\"preserve\">\n    <value>Kanaalfoto bijgewerkt</value>\n  </data>\n  <data name=\"Mute\" xml:space=\"preserve\">\n    <value>Geluid uit</value>\n  </data>\n  <data name=\"SetChannelPhoto\" xml:space=\"preserve\">\n    <value>Kanaalfoto instellen</value>\n  </data>\n  <data name=\"Unmute\" xml:space=\"preserve\">\n    <value>Geluid aan</value>\n  </data>\n  <data name=\"WhatIsChannel\" xml:space=\"preserve\">\n    <value>Wat is een kanaal?</value>\n  </data>\n  <data name=\"WhatIsChannelDescription\" xml:space=\"preserve\">\n    <value>Kanalen zijn een nieuwe functie om berichten naar een groot publiek te sturen.</value>\n  </data>\n  <data name=\"AddEditorConfirmation\" xml:space=\"preserve\">\n    <value>{0} echt als beheerder toevoegen?</value>\n  </data>\n  <data name=\"AddModeratorConfirmation\" xml:space=\"preserve\">\n    <value>{0} echt als moderator toevoegen?</value>\n  </data>\n  <data name=\"PrivateChannel\" xml:space=\"preserve\">\n    <value>Privé-kanaal</value>\n  </data>\n  <data name=\"PrivateToPublicChannelNotification\" xml:space=\"preserve\">\n    <value>Als je een publieke link voor je kanaal instelt kan iedereen deze vinden en lid worden via de zoekfunctie.\n\nStel geen link in als je je kanaal privé wilt houden.</value>\n  </data>\n  <data name=\"PublicChannel\" xml:space=\"preserve\">\n    <value>Publiek kanaal</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuch\" xml:space=\"preserve\">\n    <value>Het maximale aantal publieke gebruikersnamen is bereikt. Trek eerst een link van één van je oudere groepen of kanalen in, of gebruik de privé-variant.</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuchShort\" xml:space=\"preserve\">\n    <value>Teveel publieke kanalen.</value>\n  </data>\n  <data name=\"DeleteChannelConfirmation\" xml:space=\"preserve\">\n    <value>Kanaal echt verwijderen? Berichten worden gewist en alle leden verwijderd.</value>\n  </data>\n  <data name=\"Follow\" xml:space=\"preserve\">\n    <value>Lid worden</value>\n  </data>\n  <data name=\"Join\" xml:space=\"preserve\">\n    <value>Lid worden</value>\n  </data>\n  <data name=\"LeaveChannelConfirmation\" xml:space=\"preserve\">\n    <value>Kanaal echt verlaten?</value>\n  </data>\n  <data name=\"JoinChannelConfirmation\" xml:space=\"preserve\">\n    <value>Lid worden van kanaal '{0}'?</value>\n  </data>\n  <data name=\"Administration\" xml:space=\"preserve\">\n    <value>Beheerders</value>\n  </data>\n  <data name=\"Administrators\" xml:space=\"preserve\">\n    <value>Beheerders</value>\n  </data>\n  <data name=\"DeleteChannel\" xml:space=\"preserve\">\n    <value>Kanaal verwijderen</value>\n  </data>\n  <data name=\"MessageActionChannelDeletePhoto\" xml:space=\"preserve\">\n    <value>Kanaalfoto verwijderd</value>\n  </data>\n  <data name=\"MessageActionChannelEditTitle\" xml:space=\"preserve\">\n    <value>Kanaalnaam gewijzigd naar \"{0}\"</value>\n  </data>\n  <data name=\"SetSharedLink\" xml:space=\"preserve\">\n    <value>Gedeelde link instellen</value>\n  </data>\n  <data name=\"AddAdministrator\" xml:space=\"preserve\">\n    <value>Beheerder toevoegen</value>\n  </data>\n  <data name=\"ChannelAdministratorsHint\" xml:space=\"preserve\">\n    <value>Je kunt beheerders toevoegen om je te helpen je kanaal te beheren. Druk en houd ingedrukt om beheerders te verwijderen.</value>\n  </data>\n  <data name=\"ChannelMembersHint\" xml:space=\"preserve\">\n    <value>Alleen kanaal-beheerders zien deze lijst.</value>\n  </data>\n  <data name=\"InviteViaLink\" xml:space=\"preserve\">\n    <value>Uitnodigen via link</value>\n  </data>\n  <data name=\"AddUserAsAdministrator\" xml:space=\"preserve\">\n    <value>{0} echt als beheerder toevoegen?</value>\n  </data>\n  <data name=\"ChannelIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Sorry, dit kanaal is niet beschikbaar.</value>\n  </data>\n  <data name=\"InviteContactConfirmation\" xml:space=\"preserve\">\n    <value>{0} is nog geen lid, uitnodigen?</value>\n  </data>\n  <data name=\"PostToChannelError\" xml:space=\"preserve\">\n    <value>Je hebt alleen leesrechten in dit kanaal.</value>\n  </data>\n  <data name=\"SearchSharedMusic\" xml:space=\"preserve\">\n    <value>Gedeelde muziek zoeken</value>\n  </data>\n  <data name=\"SharedMusic\" xml:space=\"preserve\">\n    <value>Muziek</value>\n  </data>\n  <data name=\"ShareMusic\" xml:space=\"preserve\">\n    <value>Gedeelde muziek verschijnt hier.</value>\n  </data>\n  <data name=\"AdminsDescription\" xml:space=\"preserve\">\n    <value>Beheerders mogen leden beheren en de groepsfoto of naam wijzigen.</value>\n  </data>\n  <data name=\"AllMembersAreAdmins\" xml:space=\"preserve\">\n    <value>Iedereen is beheerder</value>\n  </data>\n  <data name=\"MembersDescription\" xml:space=\"preserve\">\n    <value>Iedereen mag leden toevoegen en de groepsfoto of naam wijzigen.</value>\n  </data>\n  <data name=\"SetAdmins\" xml:space=\"preserve\">\n    <value>Beheerders instellen</value>\n  </data>\n  <data name=\"UpgradeToSupergroup\" xml:space=\"preserve\">\n    <value>Opwaarderen naar supergroep</value>\n  </data>\n  <data name=\"UpgradeToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Groepsleden moeten updaten naar de meest recente Telegram om je supergroep te kunnen zien. Groep echt opwaarderen?</value>\n  </data>\n  <data name=\"UpgradeToSupergroupDescription\" xml:space=\"preserve\">\n    <value>Ledenlimiet bereikt.\nWil je extra functies en een hogere limiet? Waardeer op naar een supergroep:\n•  Nieuwe leden zien de hele geschiedenis\n•  Beheerder wist berichten voor iedereen\n•  Supergroepen hebben tot {0}\n•  Meldingen staan standaard uit</value>\n  </data>\n  <data name=\"MessageActionChannelMigrateFrom\" xml:space=\"preserve\">\n    <value>Deze groep is opgewaardeerd naar een supergroep</value>\n  </data>\n  <data name=\"MessageActionChatActivate\" xml:space=\"preserve\">\n    <value>Chat ingeschakeld</value>\n  </data>\n  <data name=\"MessageActionChatDeactivate\" xml:space=\"preserve\">\n    <value>Chat uitgeschakeld</value>\n  </data>\n  <data name=\"MessageActionChatMigrateTo\" xml:space=\"preserve\">\n    <value>Chat omgezet naar kanaal \"{0}\"</value>\n  </data>\n  <data name=\"DeleteGroup\" xml:space=\"preserve\">\n    <value>Groep verwijderen</value>\n  </data>\n  <data name=\"LeaveGroup\" xml:space=\"preserve\">\n    <value>Groep verlaten</value>\n  </data>\n  <data name=\"LeaveGroupConfirmation\" xml:space=\"preserve\">\n    <value>Groep echt verlaten?</value>\n  </data>\n  <data name=\"AdminsTooMuch\" xml:space=\"preserve\">\n    <value>Maximaal aantal beheerders bereikt.</value>\n  </data>\n  <data name=\"BlockedUsersDescription\" xml:space=\"preserve\">\n    <value>Geblokkeerde gebruikers kunnen alleen worden uitgenodigd door beheerders, uitnodigingslinks werken niet voor hen.</value>\n  </data>\n  <data name=\"BotsTooMuch\" xml:space=\"preserve\">\n    <value>Maximaal aantal bots bereikt.</value>\n  </data>\n  <data name=\"DeleteGroupConfirmation\" xml:space=\"preserve\">\n    <value>Groep echt verwijderen? Berichten worden gewist en alle leden verwijderd.</value>\n  </data>\n  <data name=\"GroupAdministratorsHint\" xml:space=\"preserve\">\n    <value>Je kunt beheerders toevoegen om je te helpen je groep te beheren. Druk en houd ingedrukt om beheerders te verwijderen.</value>\n  </data>\n  <data name=\"GroupNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Sorry, deze groep is niet beschikbaar.</value>\n  </data>\n  <data name=\"InviteUserBackError\" xml:space=\"preserve\">\n    <value>Deze gebruiker heeft de groep verlaten. Je kunt hem/haar niet meer uitnodigen.</value>\n  </data>\n  <data name=\"MessageActionChatAddSelf\" xml:space=\"preserve\">\n    <value>{0} is teruggekeerd naar de groep</value>\n  </data>\n  <data name=\"PromoteToAdmin\" xml:space=\"preserve\">\n    <value>Promoveren tot beheerder</value>\n  </data>\n  <data name=\"UserNotMutualContact\" xml:space=\"preserve\">\n    <value>Je kunt deze gebruiker niet toevoegen aan groepen.</value>\n  </data>\n  <data name=\"UsersTooMuch\" xml:space=\"preserve\">\n    <value>Sorry, deze groep is vol.</value>\n  </data>\n  <data name=\"GroupIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Sorry, deze groep is niet beschikbaar.</value>\n  </data>\n  <data name=\"InviteContactToGroupConfirmation\" xml:space=\"preserve\">\n    <value>{0} is nog geen lid, uitnodigen?</value>\n  </data>\n  <data name=\"OpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>URL {0} openen?</value>\n  </data>\n  <data name=\"ServiceNotifications\" xml:space=\"preserve\">\n    <value>servicemeldingen</value>\n  </data>\n  <data name=\"AutomaticAudioDownload\" xml:space=\"preserve\">\n    <value>Audio Auto-Download</value>\n  </data>\n  <data name=\"AutomaticPhotoDownload\" xml:space=\"preserve\">\n    <value>Foto Auto-Download</value>\n  </data>\n  <data name=\"CacheSettings\" xml:space=\"preserve\">\n    <value>Cache-instellingen</value>\n  </data>\n  <data name=\"ChatSettings\" xml:space=\"preserve\">\n    <value>Chatinstellingen</value>\n  </data>\n  <data name=\"ClearChannelConfirmation\" xml:space=\"preserve\">\n    <value>Kanaalcache opschonen?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseConfirmation\" xml:space=\"preserve\">\n    <value>Gecachet tekstberichten wissen?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseDescription\" xml:space=\"preserve\">\n    <value>Het opschonen van de lokale database zal de tekst van gecachet berichten verwijderen en de database comprimeren om ruimte te besparen. Telegram heeft wat ruimte nodig om te kunnen functioneren, dus de databasegrootte zal nooit nul worden.\n\nDit kan enkele minuten duren.</value>\n  </data>\n  <data name=\"ClearSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Supergroepcache echt opschonen?</value>\n  </data>\n  <data name=\"Documents\" xml:space=\"preserve\">\n    <value>Bestanden</value>\n  </data>\n  <data name=\"Forever\" xml:space=\"preserve\">\n    <value>Voor altijd</value>\n  </data>\n  <data name=\"Groups\" xml:space=\"preserve\">\n    <value>Groepen</value>\n  </data>\n  <data name=\"KeepMedia\" xml:space=\"preserve\">\n    <value>Media bewaren</value>\n  </data>\n  <data name=\"KeepMediaDescription\" xml:space=\"preserve\">\n    <value>Foto's, video's en andere bestanden uit chats die je niet hebt geraadpleegd gedurende deze periode zullen worden verwijderd om ruimte te besparen.\n\nMedia blijven bewaard in de Telegram-cloud en kunnen opnieuw worden gedownload.</value>\n  </data>\n  <data name=\"Music\" xml:space=\"preserve\">\n    <value>Muziek</value>\n  </data>\n  <data name=\"Other\" xml:space=\"preserve\">\n    <value>Overig</value>\n  </data>\n  <data name=\"OtherFiles\" xml:space=\"preserve\">\n    <value>Overige bestanden</value>\n  </data>\n  <data name=\"Photos\" xml:space=\"preserve\">\n    <value>Foto's</value>\n  </data>\n  <data name=\"PrivateChats\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"Videos\" xml:space=\"preserve\">\n    <value>Video's</value>\n  </data>\n  <data name=\"VoiceMessages\" xml:space=\"preserve\">\n    <value>Spraakberichten</value>\n  </data>\n  <data name=\"LocalDatabase\" xml:space=\"preserve\">\n    <value>Lokale database</value>\n  </data>\n  <data name=\"AutomaticGifDownload\" xml:space=\"preserve\">\n    <value>GIF Auto-Download</value>\n  </data>\n  <data name=\"ForwardedGifGenitivePlural\" xml:space=\"preserve\">\n    <value>Doorgestuurde GIF's</value>\n  </data>\n  <data name=\"ForwardedGifGenitiveSingular\" xml:space=\"preserve\">\n    <value>Doorgestuurde GIF</value>\n  </data>\n  <data name=\"ForwardedGifNominativePlural\" xml:space=\"preserve\">\n    <value>Doorgestuurde GIF's</value>\n  </data>\n  <data name=\"ForwardedGifNominativeSingular\" xml:space=\"preserve\">\n    <value>Doorgestuurde GIF</value>\n  </data>\n  <data name=\"Gif\" xml:space=\"preserve\">\n    <value>GIF</value>\n  </data>\n  <data name=\"AutoplayGifs\" xml:space=\"preserve\">\n    <value>GIF's automatisch afspelen</value>\n  </data>\n  <data name=\"Via\" xml:space=\"preserve\">\n    <value>Via {0}</value>\n  </data>\n  <data name=\"AddNewMembers\" xml:space=\"preserve\">\n    <value>Wie kan leden toevoegen?</value>\n  </data>\n  <data name=\"AllMembers\" xml:space=\"preserve\">\n    <value>Alle leden</value>\n  </data>\n  <data name=\"AlwaysAllow\" xml:space=\"preserve\">\n    <value>Altijd toestaan</value>\n  </data>\n  <data name=\"GroupsDescription\" xml:space=\"preserve\">\n    <value>Wijzig wie je aan groepen en kanalen kan toevoegen.</value>\n  </data>\n  <data name=\"GroupsImportantNote\" xml:space=\"preserve\">\n    <value>Je kunt nauwkeurig bepalen wie je aan groepen en kanalen mag toevoegen.</value>\n  </data>\n  <data name=\"GroupsSettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Deze gebruikers altijd toestaan of verbieden je aan groepen en kanalen toe te voegen.</value>\n  </data>\n  <data name=\"GroupsShort\" xml:space=\"preserve\">\n    <value>Groepen en Kanalen</value>\n  </data>\n  <data name=\"NeverAllow\" xml:space=\"preserve\">\n    <value>Nooit toestaan</value>\n  </data>\n  <data name=\"OnlyAdmins\" xml:space=\"preserve\">\n    <value>Alleen beheerders</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Bijlage: 1 spraakbericht</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bijlage: 1 spraakbericht</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Bijlage: 1 spraakbericht</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Bijlage: 1 spraakbericht</value>\n  </data>\n  <data name=\"RecordingVoiceMessage\" xml:space=\"preserve\">\n    <value>neemt een spraakbericht op...</value>\n  </data>\n  <data name=\"VoiceMessage\" xml:space=\"preserve\">\n    <value>Spraakbericht</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription1\" xml:space=\"preserve\">\n    <value>Deze afbeelding en tekst zijn afgeleid van de encryptiesleutel voor deze geheime chat met {0}.</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription2\" xml:space=\"preserve\">\n    <value>Als dit er hetzelfde uitziet op het apparaat van {0}, dan is end-to-end-encryptie gegarandeerd.</value>\n  </data>\n  <data name=\"InlineBotsNotification\" xml:space=\"preserve\">\n    <value>Let op: inline-bots worden aangeboden door externe ontwikkelaars. Voor de werking van de bot worden de karakters die je na de botnaam typt naar deze ontwikkelaar verstuurd.</value>\n  </data>\n  <data name=\"LinkPreviews\" xml:space=\"preserve\">\n    <value>Link-voorbeelden</value>\n  </data>\n  <data name=\"LInkPreviewsNotification\" xml:space=\"preserve\">\n    <value>Wil je uitgebreide link-voorbeelden inschakelen voor geheime chats? Let op: deze worden gegenereerd op onze servers.</value>\n  </data>\n  <data name=\"ViewStickers\" xml:space=\"preserve\">\n    <value>Stickers bekijken</value>\n  </data>\n  <data name=\"NotifyMembers\" xml:space=\"preserve\">\n    <value>Berichtgeving voor leden</value>\n  </data>\n  <data name=\"NotifyMembersDescription\" xml:space=\"preserve\">\n    <value>Berichtgeving voor alle uitgaande berichten</value>\n  </data>\n  <data name=\"SignMessages\" xml:space=\"preserve\">\n    <value>Ondertekenen</value>\n  </data>\n  <data name=\"SignMessagesDescription\" xml:space=\"preserve\">\n    <value>Beheerdersnaam bij alle uitgaande berichten.</value>\n  </data>\n  <data name=\"ChannelNameDescription\" xml:space=\"preserve\">\n    <value>Je kunt een kanaalnaam kiezen voor Telegram. Hiermee kunnen anderen je kanaal vinden.\n\nJe mag **a-z**, **0-9** en liggend streepje gebruiken. De minimale lengte is **5** tekens.</value>\n  </data>\n  <data name=\"ChannelNameDescription2\" xml:space=\"preserve\">\n    <value>Deze link opent je kanaal in Telegram:</value>\n  </data>\n  <data name=\"SupergroupNameDescription\" xml:space=\"preserve\">\n    <value>Je kunt een supergroepnaam kiezen voor Telegram. Hiermee kunnen anderen je supergroep vinden.\n\nJe mag **a-z**, **0-9** en liggend streepje gebruiken. De minimale lengte is **5** tekens.</value>\n  </data>\n  <data name=\"SupergroupNameDescription2\" xml:space=\"preserve\">\n    <value>Deze link opent je supergroep in Telegram:</value>\n  </data>\n  <data name=\"SupergroupName\" xml:space=\"preserve\">\n    <value>Supergroepnaam</value>\n  </data>\n  <data name=\"ChannelNameInvalid\" xml:space=\"preserve\">\n    <value>Sorry, deze naam is ongeldig.</value>\n  </data>\n  <data name=\"ChannelNameOccupied\" xml:space=\"preserve\">\n    <value>Deze naam is bezet.</value>\n  </data>\n  <data name=\"ChannelNameShort\" xml:space=\"preserve\">\n    <value>Een kanaalnaam moet minimaal 5 tekens hebben.</value>\n  </data>\n  <data name=\"ChannelNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Begincijfers zijn niet toegestaan.</value>\n  </data>\n  <data name=\"NameChecking\" xml:space=\"preserve\">\n    <value>Naam controleren...</value>\n  </data>\n  <data name=\"NameIsAvailable\" xml:space=\"preserve\">\n    <value>{0} is beschikbaar.</value>\n  </data>\n  <data name=\"SupergroupNameInvalid\" xml:space=\"preserve\">\n    <value>Sorry, deze naam is ongeldig.</value>\n  </data>\n  <data name=\"SupergroupNameOccupied\" xml:space=\"preserve\">\n    <value>Deze naam is bezet.</value>\n  </data>\n  <data name=\"SupergroupNameShort\" xml:space=\"preserve\">\n    <value>Een supergroepnaam moet minimaal 5 tekens hebben.</value>\n  </data>\n  <data name=\"SupergroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Begincijfers zijn niet toegestaan.</value>\n  </data>\n  <data name=\"EditMessageError\" xml:space=\"preserve\">\n    <value>Je mag dit bericht niet bewerken.</value>\n  </data>\n  <data name=\"MuteChannelPostHint\" xml:space=\"preserve\">\n    <value>Geen berichtgeving voor leden</value>\n  </data>\n  <data name=\"UnmuteChannelPostHint\" xml:space=\"preserve\">\n    <value>Berichtgeving voor leden</value>\n  </data>\n  <data name=\"PinMessage\" xml:space=\"preserve\">\n    <value>Vastzetten</value>\n  </data>\n  <data name=\"UnpinMessage\" xml:space=\"preserve\">\n    <value>Losmaken</value>\n  </data>\n  <data name=\"UnpinMessageConfirmation\" xml:space=\"preserve\">\n    <value>Wil je dit bericht losmaken?</value>\n  </data>\n  <data name=\"ConvertToSupergroup\" xml:space=\"preserve\">\n    <value>Opwaarderen naar supergroep</value>\n  </data>\n  <data name=\"ConvertToSupergroupNote\" xml:space=\"preserve\">\n    <value>**Let op**: Je kunt dit niet ongedaan maken.</value>\n  </data>\n  <data name=\"Supergroup\" xml:space=\"preserve\">\n    <value>Supergroep</value>\n  </data>\n  <data name=\"ConvertToSupergroupDescription\" xml:space=\"preserve\">\n    <value>**Supergroepen:**\n• Nieuwe leden zien de hele geschiedenis\n• Gewiste berichten gelden voor iedereen\n• Beheerders kunnen berichten vastzetten\n• Maker kan een publieke groepslink instellen</value>\n  </data>\n  <data name=\"BanUser\" xml:space=\"preserve\">\n    <value>Blacklist gebruiker</value>\n  </data>\n  <data name=\"DeleteAllFrom\" xml:space=\"preserve\">\n    <value>Alles verwijderen van {0}</value>\n  </data>\n  <data name=\"DeleteMessageConfirmation\" xml:space=\"preserve\">\n    <value>Bericht echt verwijderen?</value>\n  </data>\n  <data name=\"DeleteMessages\" xml:space=\"preserve\">\n    <value>Verwijder berichten</value>\n  </data>\n  <data name=\"MessageActionPinMessage\" xml:space=\"preserve\">\n    <value>{0} heeft bericht vastgezet</value>\n  </data>\n  <data name=\"MessageActionPinContact\" xml:space=\"preserve\">\n    <value>{0} heeft contact vastgezet</value>\n  </data>\n  <data name=\"MessageActionPinFile\" xml:space=\"preserve\">\n    <value>{0} heeft bestand vastgezet</value>\n  </data>\n  <data name=\"MessageActionPinGif\" xml:space=\"preserve\">\n    <value>{0} heeft GIF vastgezet</value>\n  </data>\n  <data name=\"MessageActionPinMap\" xml:space=\"preserve\">\n    <value>{0} heeft locatie vastgezet</value>\n  </data>\n  <data name=\"MessageActionPinPhoto\" xml:space=\"preserve\">\n    <value>{0} heeft foto vastgezet</value>\n  </data>\n  <data name=\"MessageActionPinSticker\" xml:space=\"preserve\">\n    <value>{0} heeft sticker vastgezet</value>\n  </data>\n  <data name=\"MessageActionPinText\" xml:space=\"preserve\">\n    <value>{0} heeft {1} vastgezet</value>\n  </data>\n  <data name=\"MessageActionPinTrack\" xml:space=\"preserve\">\n    <value>{0} heeft muziekbestand vastgezet</value>\n  </data>\n  <data name=\"MessageActionPinVideo\" xml:space=\"preserve\">\n    <value>{0} heeft video vastgezet</value>\n  </data>\n  <data name=\"MessageActionPinVoiceMessage\" xml:space=\"preserve\">\n    <value>{0} heeft spraakbericht vastgezet</value>\n  </data>\n  <data name=\"PinnedMessage\" xml:space=\"preserve\">\n    <value>Vastgezet bericht</value>\n  </data>\n  <data name=\"ConvertToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Groep echt omzetten naar supergroep? Je kunt dit niet ongedaan maken.</value>\n  </data>\n  <data name=\"NotifyAllMembers\" xml:space=\"preserve\">\n    <value>Alle leden informeren</value>\n  </data>\n  <data name=\"PinMessageConfirmation\" xml:space=\"preserve\">\n    <value>Wil je dit bericht vastzetten?</value>\n  </data>\n  <data name=\"ChatMaxSizeNotification\" xml:space=\"preserve\">\n    <value>Nadat je de groep hebt aangemaakt kun je meer gebruikers toevoegen en omzetten naar een supergroep.</value>\n  </data>\n  <data name=\"Admin\" xml:space=\"preserve\">\n    <value>Beheerder</value>\n  </data>\n  <data name=\"ChoosePublicGroupLinkNotification\" xml:space=\"preserve\">\n    <value>Stel een link in voor je publieke groep, om deze vindbaar te maken via de zoekfunctie en te delen met anderen.</value>\n  </data>\n  <data name=\"GroupType\" xml:space=\"preserve\">\n    <value>Groepsvorm</value>\n  </data>\n  <data name=\"PrivateGroupDescription\" xml:space=\"preserve\">\n    <value>Deelnemen aan privé-groepen kan alleen via uitnodiging of per uitnodigingslink.</value>\n  </data>\n  <data name=\"PrivateGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Lid worden van je groep kan door deze link te volgen, je kunt de link altijd intrekken.</value>\n  </data>\n  <data name=\"PublicGroupDescription\" xml:space=\"preserve\">\n    <value>Publieke groepen zijn te vinden via de zoekfunctie, iedereen kan er lid van worden en de geschiedenis zien.</value>\n  </data>\n  <data name=\"PublicGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Deze link kan gedeeld worden met anderen en je groep kan worden gevonden via de zoekfunctie.</value>\n  </data>\n  <data name=\"Camera\" xml:space=\"preserve\">\n    <value>Camera</value>\n  </data>\n  <data name=\"Pornography\" xml:space=\"preserve\">\n    <value>Pornografie</value>\n  </data>\n  <data name=\"Report\" xml:space=\"preserve\">\n    <value>Melden</value>\n  </data>\n  <data name=\"ReportSpamNotification\" xml:space=\"preserve\">\n    <value>Bedankt!\nJe melding zal zo spoedig mogen worden gecontroleerd.</value>\n  </data>\n  <data name=\"Spam\" xml:space=\"preserve\">\n    <value>Spam</value>\n  </data>\n  <data name=\"Violence\" xml:space=\"preserve\">\n    <value>Geweld</value>\n  </data>\n  <data name=\"ClearHistoryConfirmation\" xml:space=\"preserve\">\n    <value>Geschiedenis echt wissen? </value>\n  </data>\n  <data name=\"DeleteAndExitConfirmation\" xml:space=\"preserve\">\n    <value>Verwijderen en de groep verlaten?</value>\n  </data>\n  <data name=\"DeleteChat\" xml:space=\"preserve\">\n    <value>Chat verwijderen</value>\n  </data>\n  <data name=\"MessageActionChatJoin\" xml:space=\"preserve\">\n    <value>{0} is nu lid van de groep</value>\n  </data>\n  <data name=\"MessageActionChatJoinSelf\" xml:space=\"preserve\">\n    <value>Je bent nu lid van deze groep</value>\n  </data>\n  <data name=\"MessageActionLeftGroupSelf\" xml:space=\"preserve\">\n    <value>Je hebt de groep verlaten</value>\n  </data>\n  <data name=\"CodeSentToTelegramApp\" xml:space=\"preserve\">\n    <value>We hebben de code naar je andere Telegram-app gestuurd.</value>\n  </data>\n  <data name=\"CodeSentViaCallingPhone\" xml:space=\"preserve\">\n    <value>We bellen je op **{0}** om een code te dicteren.</value>\n  </data>\n  <data name=\"DidNotGetCode\" xml:space=\"preserve\">\n    <value>Geen code ontvangen?</value>\n  </data>\n  <data name=\"HaveNotReceivedCode\" xml:space=\"preserve\">\n    <value>Geen code ontvangen?</value>\n  </data>\n  <data name=\"ShareLocationConfirmation\" xml:space=\"preserve\">\n    <value>Huidige locatie naar deze bot sturen?</value>\n  </data>\n  <data name=\"SharePhoneNumberConfirmation\" xml:space=\"preserve\">\n    <value>De bot krijgt je telefoonnummer, dit kan handig zijn voor de integratie met andere diensten.</value>\n  </data>\n  <data name=\"ChooseManually\" xml:space=\"preserve\">\n    <value>Handmatig kiezen</value>\n  </data>\n  <data name=\"ShareLocationCaption\" xml:space=\"preserve\">\n    <value>Locatie delen?</value>\n  </data>\n  <data name=\"SharePhoneNumberCaption\" xml:space=\"preserve\">\n    <value>Telefoonnummer delen?</value>\n  </data>\n  <data name=\"UnableToDetermineLocation\" xml:space=\"preserve\">\n    <value>Huidige locatie kon niet worden vastgesteld</value>\n  </data>\n  <data name=\"ShareLocationInlineConfirmation\" xml:space=\"preserve\">\n    <value>Deze bot wil toegang tot je locatie voor ieder verzoek dat je stuurt. Dit kan gebruikt worden voor locatiespecifieke resultaten.</value>\n  </data>\n  <data name=\"MoreInfo\" xml:space=\"preserve\">\n    <value>Meer informatie</value>\n  </data>\n  <data name=\"RemoveStickers\" xml:space=\"preserve\">\n    <value>Verwijder</value>\n  </data>\n  <data name=\"SendSticker\" xml:space=\"preserve\">\n    <value>Sticker sturen</value>\n  </data>\n  <data name=\"StickersRemoved\" xml:space=\"preserve\">\n    <value>Stickers verwijderd</value>\n  </data>\n  <data name=\"UnpinFromStart\" xml:space=\"preserve\">\n    <value>Van start losmaken</value>\n  </data>\n  <data name=\"Bots\" xml:space=\"preserve\">\n    <value>Bots</value>\n  </data>\n  <data name=\"LastSeenYesterdayAt\" xml:space=\"preserve\">\n    <value>laatst gezien gisteren om {0}</value>\n  </data>\n  <data name=\"Clear\" xml:space=\"preserve\">\n    <value>Wissen</value>\n  </data>\n  <data name=\"Edited\" xml:space=\"preserve\">\n    <value>Gewijzigd</value>\n  </data>\n  <data name=\"EditMessage\" xml:space=\"preserve\">\n    <value>Bericht wijzigen</value>\n  </data>\n  <data name=\"LastSeenTodayAt\" xml:space=\"preserve\">\n    <value>laatst gezien vandaag om {0}</value>\n  </data>\n  <data name=\"OpenInlineBotsHint\" xml:space=\"preserve\">\n    <value>Veeg omhoog voor inline bots</value>\n  </data>\n  <data name=\"ConfirmResetTopPeerRating\" xml:space=\"preserve\">\n    <value>{0} uit suggesties verwijderen?</value>\n  </data>\n  <data name=\"Draft\" xml:space=\"preserve\">\n    <value>Concept</value>\n  </data>\n  <data name=\"FeaturedStickers\" xml:space=\"preserve\">\n    <value>Populaire stickers</value>\n  </data>\n  <data name=\"StickersHint\" xml:space=\"preserve\">\n    <value>Ontwerpers kunnen stickerbundels toevoegen via onze bot __@stickers__. \n\nGebruikers kunnen met een tik stickers toevoegen via \"Toevoegen aan stickers\".</value>\n  </data>\n  <data name=\"ClearRecentStickers\" xml:space=\"preserve\">\n    <value>Recente stickers wissen?</value>\n  </data>\n  <data name=\"NewFeaturedStickers\" xml:space=\"preserve\">\n    <value>{0} nieuw</value>\n  </data>\n  <data name=\"InstallStickersetError\" xml:space=\"preserve\">\n    <value>Je hebt het maximale aantal stickerbundels bereikt.</value>\n  </data>\n  <data name=\"ChatInviteSubtitle\" xml:space=\"preserve\">\n    <value>{0}, waaronder:</value>\n  </data>\n  <data name=\"InstalledStickers\" xml:space=\"preserve\">\n    <value>Geïnstalleerde stickers</value>\n  </data>\n  <data name=\"ShowStickersTab\" xml:space=\"preserve\">\n    <value>Stickerpaneel weergeven</value>\n  </data>\n  <data name=\"ShowStickersTabHint\" xml:space=\"preserve\">\n    <value>Een stickericoon verschijnt in het invoerveld.</value>\n  </data>\n  <data name=\"ArchivedStickers\" xml:space=\"preserve\">\n    <value>Gearchiveerde stickers</value>\n  </data>\n  <data name=\"ArchivedStickersAbout\" xml:space=\"preserve\">\n    <value>Een aantal ongebruikte stickerbundels zijn gearchiveerd.</value>\n  </data>\n  <data name=\"ArchivedStickersHeader\" xml:space=\"preserve\">\n    <value>Je kunt 200 stickerbundels tegelijk installeren,\ndaarboven archiveren we ongebruikte stickers.</value>\n  </data>\n  <data name=\"NoSetsHere\" xml:space=\"preserve\">\n    <value>Nog geen bundels</value>\n  </data>\n  <data name=\"NoSets\" xml:space=\"preserve\">\n    <value>Geen bundels</value>\n  </data>\n  <data name=\"SetGenitivePlural\" xml:space=\"preserve\">\n    <value>Bundels</value>\n  </data>\n  <data name=\"SetGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bundel</value>\n  </data>\n  <data name=\"SetNominativePlural\" xml:space=\"preserve\">\n    <value>Bundels</value>\n  </data>\n  <data name=\"SetNominativeSingular\" xml:space=\"preserve\">\n    <value>Bundel</value>\n  </data>\n  <data name=\"ChatWithYourself\" xml:space=\"preserve\">\n    <value>Je Cloudopslag</value>\n  </data>\n  <data name=\"CloudStorageDescription\" xml:space=\"preserve\">\n    <value>• Berichten naartoe door te sturen\n• Media en bestanden te bewaren\n• Te gebruiken op al je apparaten\n• Snel dingen in op te zoeken</value>\n  </data>\n  <data name=\"CloudStorage\" xml:space=\"preserve\">\n    <value>Je Cloudopslag is er om:</value>\n  </data>\n  <data name=\"CancelAccountReset\" xml:space=\"preserve\">\n    <value>Account reset annuleren</value>\n  </data>\n  <data name=\"CancelAccountResetDescription\" xml:space=\"preserve\">\n    <value>Iemand met toegang tot nummer **{0}** heeft geprobeerd om je Telegram account te verwijderen en je twee-staps-verificatie wachtwoord te resetten. Als jij dit niet was, geef dan de code in die we zojuist per SMS hebben gestuurd.</value>\n  </data>\n  <data name=\"CancelAccountResetSuccess\" xml:space=\"preserve\">\n    <value>De verwijdering van account: {0} is geannuleerd. Je kunt dit venster sluiten.</value>\n  </data>\n  <data name=\"Reset\" xml:space=\"preserve\">\n    <value>Resetten</value>\n  </data>\n  <data name=\"ResetAccount\" xml:space=\"preserve\">\n    <value>Account resetten</value>\n  </data>\n  <data name=\"ResetAccountDescription\" xml:space=\"preserve\">\n    <value>Account **{0}** is actief en beveiligd met een wachtwoord, het verwijderen stellen we daarom 1 week uit.\n\nJe kunt dit proces ieder moment annuleren.</value>\n  </data>\n  <data name=\"ResetAccountError\" xml:space=\"preserve\">\n    <value>De actieve gebruiker heeft de recente poging om dit account te resetten geannuleerd. Probeer het over 7 dagen nog eens.</value>\n  </data>\n  <data name=\"ResetAccountIn\" xml:space=\"preserve\">\n    <value>Je account kan gereset worden over:</value>\n  </data>\n  <data name=\"Archive\" xml:space=\"preserve\">\n    <value>Archiveer</value>\n  </data>\n  <data name=\"BotOpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>Bot {0} vraagt toestemming om je Telegram naam en profielfoto te delen met de eigenaar van {1}.</value>\n  </data>\n  <data name=\"IsRecordingVideo\" xml:space=\"preserve\">\n    <value>Neemt een video op</value>\n  </data>\n  <data name=\"IsSendingAudio\" xml:space=\"preserve\">\n    <value>Neemt geluid op</value>\n  </data>\n  <data name=\"RecordingVideo\" xml:space=\"preserve\">\n    <value>Video opnemen</value>\n  </data>\n  <data name=\"SendingAudio\" xml:space=\"preserve\">\n    <value>Audio versturen</value>\n  </data>\n  <data name=\"Revoke\" xml:space=\"preserve\">\n    <value>Intrekken</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation2\" xml:space=\"preserve\">\n    <value>Deze link echt intrekken **{0}**?\n\nGroep **\"{1}\"** is daarna privé.</value>\n  </data>\n  <data name=\"AddBotToTheGroup\" xml:space=\"preserve\">\n    <value>Bot toevoegen aan \"{0}\"?</value>\n  </data>\n  <data name=\"YourScored\" xml:space=\"preserve\">\n    <value>Je hebt {0} punt behaald</value>\n  </data>\n  <data name=\"ShareWith\" xml:space=\"preserve\">\n    <value>Delen met {0}?</value>\n  </data>\n  <data name=\"YourScoredAtGame\" xml:space=\"preserve\">\n    <value>Je hebt met {1} {0} punt behaald</value>\n  </data>\n  <data name=\"MuteAudio\" xml:space=\"preserve\">\n    <value>Geluid uit</value>\n  </data>\n  <data name=\"OpenWebPagesViaBotConfirmation\" xml:space=\"preserve\">\n    <value>Wil je {0} toestaan om je naam en ID (niet je telefoonnummer) door te geven aan webpagina's die je opent via deze bot?</value>\n  </data>\n  <data name=\"UserScored\" xml:space=\"preserve\">\n    <value>{0} heeft {1} punt behaald</value>\n  </data>\n  <data name=\"UserScoredAtGame\" xml:space=\"preserve\">\n    <value>{0} heeft met {2} {1} punt behaald</value>\n  </data>\n  <data name=\"UserScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>{0} heeft met {2} {1} punten behaald</value>\n  </data>\n  <data name=\"UserScoredPlural\" xml:space=\"preserve\">\n    <value>{0} heeft {1} punten behaald</value>\n  </data>\n  <data name=\"YourScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>Je hebt met {1} {0} punten behaald</value>\n  </data>\n  <data name=\"YourScoredPlural\" xml:space=\"preserve\">\n    <value>Je hebt {0} punten behaald</value>\n  </data>\n  <data name=\"ForwardedGameGenitivePlural\" xml:space=\"preserve\">\n    <value>Doorgestuurde spellen</value>\n  </data>\n  <data name=\"ForwardedGameGenitiveSingular\" xml:space=\"preserve\">\n    <value>Doorgestuurd spel</value>\n  </data>\n  <data name=\"ForwardedGameNominativePlural\" xml:space=\"preserve\">\n    <value>Doorgestuurde spellen</value>\n  </data>\n  <data name=\"ForwardedGameNominativeSingular\" xml:space=\"preserve\">\n    <value>Doorgestuurd spel</value>\n  </data>\n  <data name=\"Game\" xml:space=\"preserve\">\n    <value>Spel</value>\n  </data>\n  <data name=\"MessageActionPinGame\" xml:space=\"preserve\">\n    <value>{0} heeft een spel vastgezet</value>\n  </data>\n  <data name=\"ShareGameWith\" xml:space=\"preserve\">\n    <value>Spel delen met {0}?</value>\n  </data>\n  <data name=\"IsPlayingGame\" xml:space=\"preserve\">\n    <value>speelt een spel</value>\n  </data>\n  <data name=\"PlayingGame\" xml:space=\"preserve\">\n    <value>speelt een spel</value>\n  </data>\n  <data name=\"YourCloudStorage\" xml:space=\"preserve\">\n    <value>Je Cloudopslag</value>\n  </data>\n  <data name=\"Masks\" xml:space=\"preserve\">\n    <value>Maskers</value>\n  </data>\n  <data name=\"MasksHint\" xml:space=\"preserve\">\n    <value>Je kunt maskers toevoegen aan foto's , gebruik de fotobewerkingsoptie en verstuur ze.</value>\n  </data>\n  <data name=\"GroupsInCommon\" xml:space=\"preserve\">\n    <value>Gedeelde groepen</value>\n  </data>\n  <data name=\"GroupGenitivePlural\" xml:space=\"preserve\">\n    <value>Groepen</value>\n  </data>\n  <data name=\"GroupGenitiveSingular\" xml:space=\"preserve\">\n    <value>Groep</value>\n  </data>\n  <data name=\"GroupNominativePlural\" xml:space=\"preserve\">\n    <value>Groepen</value>\n  </data>\n  <data name=\"GroupNominativeSingular\" xml:space=\"preserve\">\n    <value>Groep</value>\n  </data>\n  <data name=\"NoGroupsHere\" xml:space=\"preserve\">\n    <value>Nog geen groepen</value>\n  </data>\n  <data name=\"AddChatUserFloodWait\" xml:space=\"preserve\">\n    <value>Je kunt deze gebruiker niet toevoegen omdat je vandaag teveel mensen hebt aangeschreven die niet in je contacten staan, probeer het morgen nog eens. Je kunt een ander lid vragen om deze gebruiker aan de groep toe te voegen.</value>\n  </data>\n  <data name=\"ClearAll\" xml:space=\"preserve\">\n    <value>Alles wissen</value>\n  </data>\n  <data name=\"ClearPaintingConfirmation\" xml:space=\"preserve\">\n    <value>Bewerkingen echt ongedaan maken?</value>\n  </data>\n  <data name=\"DiscardChangesConfirmation\" xml:space=\"preserve\">\n    <value>Wijzigingen echt ongedaan maken?</value>\n  </data>\n  <data name=\"SendMessageFloodWait\" xml:space=\"preserve\">\n    <value>Je hebt vandaag teveel mensen aangeschreven die niet in je contacten staan, probeer het morgen nog eens. Je kunt wel antwoorden als deze gebruiker eerst contact met jou opneemt,</value>\n  </data>\n  <data name=\"AttachedStickers\" xml:space=\"preserve\">\n    <value>Bijgevoegde stickers</value>\n  </data>\n  <data name=\"JumpToDate\" xml:space=\"preserve\">\n    <value>Ga naar datum</value>\n  </data>\n  <data name=\"Pack\" xml:space=\"preserve\">\n    <value>Bundel bekijken</value>\n  </data>\n  <data name=\"ChatsAndContacts\" xml:space=\"preserve\">\n    <value>Chats en contacten</value>\n  </data>\n  <data name=\"MessageSearch\" xml:space=\"preserve\">\n    <value>Zoek bericht</value>\n  </data>\n  <data name=\"SearchChatsOrMessages\" xml:space=\"preserve\">\n    <value>Zoek door chats en berichten</value>\n  </data>\n  <data name=\"PrivacyPolicy\" xml:space=\"preserve\">\n    <value>Privacybeleid</value>\n  </data>\n  <data name=\"TelegramFAQ\" xml:space=\"preserve\">\n    <value>Veelgestelde vragen</value>\n  </data>\n  <data name=\"ChatSettingsSubtitle\" xml:space=\"preserve\">\n    <value>Media, achtergrond, cache</value>\n  </data>\n  <data name=\"Mobile\" xml:space=\"preserve\">\n    <value>Mobiel</value>\n  </data>\n  <data name=\"ChannelsTooMuch\" xml:space=\"preserve\">\n    <value>Je bent lid van teveel kanalen of hebt er teveel aangemaakt.</value>\n  </data>\n  <data name=\"UserChannelsTooMuch\" xml:space=\"preserve\">\n    <value>Je kunt deze gebruiker niet toevoegen aan kanalen.</value>\n  </data>\n  <data name=\"ItemsSelectedSingular\" xml:space=\"preserve\">\n    <value>{0} geselecteerd</value>\n  </data>\n  <data name=\"NewChat\" xml:space=\"preserve\">\n    <value>Nieuwe chat</value>\n  </data>\n  <data name=\"ItemsSelectedPlural\" xml:space=\"preserve\">\n    <value>{0} geselecteerd</value>\n  </data>\n  <data name=\"FileGenitivePlural\" xml:space=\"preserve\">\n    <value>Bestanden</value>\n  </data>\n  <data name=\"FileGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bestand</value>\n  </data>\n  <data name=\"FileNominativePlural\" xml:space=\"preserve\">\n    <value>Bestanden</value>\n  </data>\n  <data name=\"FileNominativeSingular\" xml:space=\"preserve\">\n    <value>Bestand</value>\n  </data>\n  <data name=\"LinkGenitivePlural\" xml:space=\"preserve\">\n    <value>Links</value>\n  </data>\n  <data name=\"LinkGenitiveSingular\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"LinkNominativePlural\" xml:space=\"preserve\">\n    <value>Links</value>\n  </data>\n  <data name=\"LinkNominativeSingular\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"PhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Foto's</value>\n  </data>\n  <data name=\"PhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"PhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Foto's</value>\n  </data>\n  <data name=\"PhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"SongGenitivePlural\" xml:space=\"preserve\">\n    <value>Audio</value>\n  </data>\n  <data name=\"SongGenitiveSingular\" xml:space=\"preserve\">\n    <value>Audio</value>\n  </data>\n  <data name=\"SongNominativePlural\" xml:space=\"preserve\">\n    <value>Audio</value>\n  </data>\n  <data name=\"SongNominativeSingular\" xml:space=\"preserve\">\n    <value>Audio</value>\n  </data>\n  <data name=\"VideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Video's</value>\n  </data>\n  <data name=\"VideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"VideoNominativePlural\" xml:space=\"preserve\">\n    <value>Video's</value>\n  </data>\n  <data name=\"VideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Video</value>\n  </data>\n  <data name=\"PhoneNumber\" xml:space=\"preserve\">\n    <value>Telefoonnummer</value>\n  </data>\n  <data name=\"SetPhoto\" xml:space=\"preserve\">\n    <value>Stel foto in</value>\n  </data>\n  <data name=\"AskAQuestionDescription\" xml:space=\"preserve\">\n    <value>De ondersteuning van Telegram wordt gedaan door vrijwilligers. We doen ons best om zo snel mogelijk te antwoorden. Bekijk ook de &lt;![CDATA[&lt;a href=\"https://telegram.org/faq#general\"&gt;veelgestelde vragen&lt;/a&gt;]]&gt;: Hier staan de antwoorden op de meeste vragen en belangrijke tips voor &lt;![CDATA[&lt;a href=\"https://telegram.org/faq#troubleshooting\"&gt;het oplossen van problemen&lt;/a&gt;]]&gt;.</value>\n  </data>\n  <data name=\"MaskPackNominativePlural\" xml:space=\"preserve\">\n    <value>Maskerbundels</value>\n  </data>\n  <data name=\"MaskPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Maskerbundel</value>\n  </data>\n  <data name=\"StickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Stickerbundels</value>\n  </data>\n  <data name=\"StickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Stickerbundel</value>\n  </data>\n  <data name=\"NewStickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Nieuwe stickerbundels</value>\n  </data>\n  <data name=\"NewStickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Nieuwe stickerbundel</value>\n  </data>\n  <data name=\"PinDialog\" xml:space=\"preserve\">\n    <value>Vastzetten</value>\n  </data>\n  <data name=\"UnpinDialog\" xml:space=\"preserve\">\n    <value>Losmaken</value>\n  </data>\n  <data name=\"DeleteFor\" xml:space=\"preserve\">\n    <value>Verwijder voor {0}</value>\n  </data>\n  <data name=\"DeleteForAll\" xml:space=\"preserve\">\n    <value>Verwijder voor iedereen</value>\n  </data>\n  <data name=\"DeleteMessageForYouHint\" xml:space=\"preserve\">\n    <value>Verwijder alleen voor jou</value>\n  </data>\n  <data name=\"DeleteMessagesForYouHint\" xml:space=\"preserve\">\n    <value>Verwijder alleen voor jou</value>\n  </data>\n  <data name=\"MessageActionCanceledCall\" xml:space=\"preserve\">\n    <value>Oproep geannuleerd</value>\n  </data>\n  <data name=\"MessageActionIncomingCall\" xml:space=\"preserve\">\n    <value>Inkomende oproep</value>\n  </data>\n  <data name=\"MessageActionIncomingDurationCall\" xml:space=\"preserve\">\n    <value>Inkomende oproep ({0})</value>\n  </data>\n  <data name=\"MessageActionMissedCall\" xml:space=\"preserve\">\n    <value>Gemiste oproep</value>\n  </data>\n  <data name=\"MessageActionOutgoingCall\" xml:space=\"preserve\">\n    <value>Uitgaande oproep</value>\n  </data>\n  <data name=\"MessageActionOutgoingDurationCall\" xml:space=\"preserve\">\n    <value>Uitgaande oproep ({0})</value>\n  </data>\n  <data name=\"CanceledCall\" xml:space=\"preserve\">\n    <value>Oproep geannuleerd</value>\n  </data>\n  <data name=\"IncomingCall\" xml:space=\"preserve\">\n    <value>Inkomende oproep</value>\n  </data>\n  <data name=\"MissedCall\" xml:space=\"preserve\">\n    <value>Gemiste oproep</value>\n  </data>\n  <data name=\"OutgoingCall\" xml:space=\"preserve\">\n    <value>Uitgaande oproep</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Verwijder voor iedereen.</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Verwijder voor iedereen.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Verwijder voor iedereen.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Verwijder voor iedereen.</value>\n  </data>\n  <data name=\"Invoice\" xml:space=\"preserve\">\n    <value>Factuur</value>\n  </data>\n  <data name=\"TestInvoice\" xml:space=\"preserve\">\n    <value>Test Factuur</value>\n  </data>\n  <data name=\"MessageActionPaymentSent\" xml:space=\"preserve\">\n    <value>Je hebt {0} overgemaakt naar {1}</value>\n  </data>\n  <data name=\"MessageActionPaymentSentFor\" xml:space=\"preserve\">\n    <value>Je hebt {0} overgemaakt naar {1} voor {2}</value>\n  </data>\n  <data name=\"PaymentInfo\" xml:space=\"preserve\">\n    <value>Betaalinformatie</value>\n  </data>\n  <data name=\"Receipt\" xml:space=\"preserve\">\n    <value>Betalingsbewijs</value>\n  </data>\n  <data name=\"Address1Street\" xml:space=\"preserve\">\n    <value>Adres 1 (Straat)</value>\n  </data>\n  <data name=\"Address2Street\" xml:space=\"preserve\">\n    <value>Adres 2 (Straat)</value>\n  </data>\n  <data name=\"BillingAddress\" xml:space=\"preserve\">\n    <value>Factuuradres</value>\n  </data>\n  <data name=\"CardNumber\" xml:space=\"preserve\">\n    <value>Kaartnummer</value>\n  </data>\n  <data name=\"Checkout\" xml:space=\"preserve\">\n    <value>Afrekenen</value>\n  </data>\n  <data name=\"City\" xml:space=\"preserve\">\n    <value>Stad</value>\n  </data>\n  <data name=\"ContactAddress\" xml:space=\"preserve\">\n    <value>Contactadres</value>\n  </data>\n  <data name=\"Discount\" xml:space=\"preserve\">\n    <value>Korting</value>\n  </data>\n  <data name=\"FullName\" xml:space=\"preserve\">\n    <value>Naam</value>\n  </data>\n  <data name=\"MMYY\" xml:space=\"preserve\">\n    <value>MM/JJ</value>\n  </data>\n  <data name=\"NameSurname\" xml:space=\"preserve\">\n    <value>Achternaam</value>\n  </data>\n  <data name=\"PaymentCard\" xml:space=\"preserve\">\n    <value>Betaalkaart</value>\n  </data>\n  <data name=\"PaymentMethod\" xml:space=\"preserve\">\n    <value>Betalingsmethode</value>\n  </data>\n  <data name=\"Postcode\" xml:space=\"preserve\">\n    <value>Postcode</value>\n  </data>\n  <data name=\"Receiver\" xml:space=\"preserve\">\n    <value>Ontvanger</value>\n  </data>\n  <data name=\"SaveShippingInformation\" xml:space=\"preserve\">\n    <value>Verzendinformatie opslaan</value>\n  </data>\n  <data name=\"SaveShippingInformationHint\" xml:space=\"preserve\">\n    <value>Je kunt je verzendinformatie opslaan voor toekomstig gebruik.</value>\n  </data>\n  <data name=\"SecurityCode\" xml:space=\"preserve\">\n    <value>Veiligheidscode (CVV)</value>\n  </data>\n  <data name=\"Shipping\" xml:space=\"preserve\">\n    <value>Verzending</value>\n  </data>\n  <data name=\"ShippingAddress\" xml:space=\"preserve\">\n    <value>Verzendadres</value>\n  </data>\n  <data name=\"ShippingInformation\" xml:space=\"preserve\">\n    <value>Verzendinformatie</value>\n  </data>\n  <data name=\"ShippingMethods\" xml:space=\"preserve\">\n    <value>Verzendmethodes</value>\n  </data>\n  <data name=\"State\" xml:space=\"preserve\">\n    <value>Provincie</value>\n  </data>\n  <data name=\"Subtotal\" xml:space=\"preserve\">\n    <value>Subtotaal</value>\n  </data>\n  <data name=\"Taxes\" xml:space=\"preserve\">\n    <value>Belastingen</value>\n  </data>\n  <data name=\"TestReceipt\" xml:space=\"preserve\">\n    <value>Test Betalingsbewijs</value>\n  </data>\n  <data name=\"Total\" xml:space=\"preserve\">\n    <value>Totaal</value>\n  </data>\n  <data name=\"TransactionConfirmation\" xml:space=\"preserve\">\n    <value>Echt {0} overmaken naar de {1} voor {2}?</value>\n  </data>\n  <data name=\"TransactionReview\" xml:space=\"preserve\">\n    <value>Transactie-overzicht</value>\n  </data>\n  <data name=\"TestCheckout\" xml:space=\"preserve\">\n    <value>Test Afrekenen</value>\n  </data>\n  <data name=\"ShippingMethod\" xml:space=\"preserve\">\n    <value>Verzendmethode</value>\n  </data>\n  <data name=\"Name\" xml:space=\"preserve\">\n    <value>Naam</value>\n  </data>\n  <data name=\"Pay\" xml:space=\"preserve\">\n    <value>Betalen</value>\n  </data>\n  <data name=\"Duplicate\" xml:space=\"preserve\">\n    <value>Klonen</value>\n  </data>\n  <data name=\"CameraSubtitle\" xml:space=\"preserve\">\n    <value>Camera-instellingen</value>\n  </data>\n  <data name=\"ChooseYourCameraApp\" xml:space=\"preserve\">\n    <value>Kies je camera-app</value>\n  </data>\n  <data name=\"ExternalCamera\" xml:space=\"preserve\">\n    <value>Externe Camera</value>\n  </data>\n  <data name=\"InAppCamera\" xml:space=\"preserve\">\n    <value>In-app Camera</value>\n  </data>\n  <data name=\"Calls\" xml:space=\"preserve\">\n    <value>Oproepen</value>\n  </data>\n  <data name=\"CallsPrivacyDescription\" xml:space=\"preserve\">\n    <value>Wie kan mij bellen?</value>\n  </data>\n  <data name=\"CallsPrivacyImportantNote\" xml:space=\"preserve\">\n    <value>Je kunt inperken wie jou mag bellen.</value>\n  </data>\n  <data name=\"CallsPrivacyOverrideNote\" xml:space=\"preserve\">\n    <value>Deze gebruikers altijd toestaan of verbieden om je te bellen.</value>\n  </data>\n  <data name=\"NoCallsHere\" xml:space=\"preserve\">\n    <value>Nog geen oproepen</value>\n  </data>\n  <data name=\"VoiceCall\" xml:space=\"preserve\">\n    <value>Spraakoproep</value>\n  </data>\n  <data name=\"CameraRollFolder\" xml:space=\"preserve\">\n    <value>Filmrol</value>\n  </data>\n  <data name=\"SavedPicturesFolder\" xml:space=\"preserve\">\n    <value>Opgeslagen Foto's</value>\n  </data>\n  <data name=\"ScreenshotsFolder\" xml:space=\"preserve\">\n    <value>Schermafdrukken</value>\n  </data>\n  <data name=\"AccessCameraException\" xml:space=\"preserve\">\n    <value>Geen toegang tot camera</value>\n  </data>\n  <data name=\"Answer\" xml:space=\"preserve\">\n    <value>Opnemen</value>\n  </data>\n  <data name=\"Calling\" xml:space=\"preserve\">\n    <value>Bellen... </value>\n  </data>\n  <data name=\"EmojiKeyDescription\" xml:space=\"preserve\">\n    <value>Als deze emoji's er bij {0} hetzelfde uitzien is deze oproep 100% veilig.</value>\n  </data>\n  <data name=\"EndCall\" xml:space=\"preserve\">\n    <value>Oproep beëindigen</value>\n  </data>\n  <data name=\"Speaker\" xml:space=\"preserve\">\n    <value>Luidspreker</value>\n  </data>\n  <data name=\"TouchToReturnToCall\" xml:space=\"preserve\">\n    <value>Terugkeren naar oproep</value>\n  </data>\n  <data name=\"PaymentProvider\" xml:space=\"preserve\">\n    <value>Betalingsprovider</value>\n  </data>\n  <data name=\"PaymentsWarning\" xml:space=\"preserve\">\n    <value>Betalingen gaan direct naar de ontwikkelaar van {0}.  Telegram kan geen garanties afgeven, doorgaan is op eigen risico. Bij problemen kun je contact opnemen met de ontwikkelaar van {0}  of je bank.</value>\n  </data>\n  <data name=\"SavePaymentInformation\" xml:space=\"preserve\">\n    <value>Betalingsinformatie opslaan</value>\n  </data>\n  <data name=\"SavePaymentInformationHint\" xml:space=\"preserve\">\n    <value>Je kunt je betalingsinformatie voor toekomstig gebruik opslaan.</value>\n  </data>\n  <data name=\"SavedCardHint\" xml:space=\"preserve\">\n    <value>Kaartinformatie {0} is opgeslagen. Geef je 2-staps-verificatie-wachtwoord in om met deze kaart te betalen.</value>\n  </data>\n  <data name=\"ChooseDifferentCard\" xml:space=\"preserve\">\n    <value>Kies een andere kaart</value>\n  </data>\n  <data name=\"Payments\" xml:space=\"preserve\">\n    <value>Betalingen</value>\n  </data>\n  <data name=\"PaymentsSubtitle\" xml:space=\"preserve\">\n    <value>Betaal- en verzendinfo wissen</value>\n  </data>\n  <data name=\"ShippingInfo\" xml:space=\"preserve\">\n    <value>Verzendinformatie</value>\n  </data>\n  <data name=\"Ringing\" xml:space=\"preserve\">\n    <value>Gaat over</value>\n  </data>\n  <data name=\"TurnOnTwoStepVerification\" xml:space=\"preserve\">\n    <value>Activeer \"twee-staps-verificatie\" om deze functie te gebruiken. </value>\n  </data>\n  <data name=\"ChooseYourPhotoPickerApp\" xml:space=\"preserve\">\n    <value>Kies je fotokiezer-app</value>\n  </data>\n  <data name=\"ExternalPhotoPicker\" xml:space=\"preserve\">\n    <value>Externe fotokiezer</value>\n  </data>\n  <data name=\"InAppPhotoPicker\" xml:space=\"preserve\">\n    <value>In-app fotokiezer</value>\n  </data>\n  <data name=\"PhotoPicker\" xml:space=\"preserve\">\n    <value>Fotokiezer</value>\n  </data>\n  <data name=\"PhotoPickerSubtitle\" xml:space=\"preserve\">\n    <value>Fotokiezer instellingen</value>\n  </data>\n  <data name=\"Chat\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"Ignore\" xml:space=\"preserve\">\n    <value>Negeren</value>\n  </data>\n  <data name=\"AddOptionalComment\" xml:space=\"preserve\">\n    <value>Opmerking toevoegen</value>\n  </data>\n  <data name=\"RateCallQuality\" xml:space=\"preserve\">\n    <value>Beoordeel de kwaliteit van je Telegram-oproep.</value>\n  </data>\n  <data name=\"VoipBusy\" xml:space=\"preserve\">\n    <value>In gesprek</value>\n  </data>\n  <data name=\"VoipConnecting\" xml:space=\"preserve\">\n    <value>Verbinden</value>\n  </data>\n  <data name=\"VoipEnded\" xml:space=\"preserve\">\n    <value>Beëindigd</value>\n  </data>\n  <data name=\"VoipExchangingKeys\" xml:space=\"preserve\">\n    <value>Encryptiesleutels uitwisselen</value>\n  </data>\n  <data name=\"VoipFailed\" xml:space=\"preserve\">\n    <value>Mislukt</value>\n  </data>\n  <data name=\"VoipHangingUp\" xml:space=\"preserve\">\n    <value>Ophangen</value>\n  </data>\n  <data name=\"VoipIncoming\" xml:space=\"preserve\">\n    <value>Inkomende oproep</value>\n  </data>\n  <data name=\"VoipRequesting\" xml:space=\"preserve\">\n    <value>Aanvragen</value>\n  </data>\n  <data name=\"VoipRinging\" xml:space=\"preserve\">\n    <value>Gaat over</value>\n  </data>\n  <data name=\"VoipWaiting\" xml:space=\"preserve\">\n    <value>Wachten</value>\n  </data>\n  <data name=\"CallInProgressNotification\" xml:space=\"preserve\">\n    <value>Oproep actief met {0}.</value>\n  </data>\n  <data name=\"Connection\" xml:space=\"preserve\">\n    <value>Verbinding</value>\n  </data>\n  <data name=\"ConnectionType\" xml:space=\"preserve\">\n    <value>Verbindingstype</value>\n  </data>\n  <data name=\"CredentionalsOptional\" xml:space=\"preserve\">\n    <value>Referenties (optioneel)</value>\n  </data>\n  <data name=\"Port\" xml:space=\"preserve\">\n    <value>Poort</value>\n  </data>\n  <data name=\"Server\" xml:space=\"preserve\">\n    <value>Hostnaam</value>\n  </data>\n  <data name=\"Socks5\" xml:space=\"preserve\">\n    <value>SOCKS5</value>\n  </data>\n  <data name=\"UseProxy\" xml:space=\"preserve\">\n    <value>proxyinstellingen gebruiken</value>\n  </data>\n  <data name=\"Proxy\" xml:space=\"preserve\">\n    <value>Proxy-instellingen</value>\n  </data>\n  <data name=\"ConnectingToProxy\" xml:space=\"preserve\">\n    <value>Verbinden met proxy</value>\n  </data>\n  <data name=\"EnableProxyConfigmation\" xml:space=\"preserve\">\n    <value>Proxy echt inschakelen</value>\n  </data>\n  <data name=\"ChangeProxy\" xml:space=\"preserve\">\n    <value>Proxy instellen</value>\n  </data>\n  <data name=\"ChangeProxyServerHint\" xml:space=\"preserve\">\n    <value>Je kunt de proxy-server aanpassen via Instellingen.</value>\n  </data>\n  <data name=\"UseProxyHint\" xml:space=\"preserve\">\n    <value>SOCKS5 proxy-instellingen</value>\n  </data>\n  <data name=\"DeclinedCall\" xml:space=\"preserve\">\n    <value>Geweigerde oproep</value>\n  </data>\n  <data name=\"MessageActionDeclinedCall\" xml:space=\"preserve\">\n    <value>Geweigerde oproep</value>\n  </data>\n  <data name=\"VideoMessage\" xml:space=\"preserve\">\n    <value>Videobericht</value>\n  </data>\n  <data name=\"PeerToPeer\" xml:space=\"preserve\">\n    <value>Peer-to-Peer</value>\n  </data>\n  <data name=\"PeerToPeerDescription\" xml:space=\"preserve\">\n    <value>peer-to-peer uitschakelen zorgt ervoor dat alle gesprekken verlopen via Telegram-servers, dit voorkomt dat je IP-adres zichtbaar is maar verlaagt de audio-kwaliteit enigszins.</value>\n  </data>\n  <data name=\"Bio\" xml:space=\"preserve\">\n    <value>Bio</value>\n  </data>\n  <data name=\"BioDescription\" xml:space=\"preserve\">\n    <value>Je kunt hier wat over jezelf vertellen.\nIedereen die je profiel opent kan deze tekst zien.</value>\n  </data>\n  <data name=\"MessageActionPhotoExpired\" xml:space=\"preserve\">\n    <value>Foto is verlopen</value>\n  </data>\n  <data name=\"MessageActionVideoExpired\" xml:space=\"preserve\">\n    <value>Video is verlopen</value>\n  </data>\n  <data name=\"Timer\" xml:space=\"preserve\">\n    <value>Timer</value>\n  </data>\n  <data name=\"SelfDestructTimerPhotoSubtitle\" xml:space=\"preserve\">\n    <value>Als je een timer instelt vernietigt de foto zichzelf na het bekijken.</value>\n  </data>\n  <data name=\"SelfDestructTimerVideoSubtitle\" xml:space=\"preserve\">\n    <value>Als je een timer instelt vernietigt de video zichzelf na het bekijken.</value>\n  </data>\n  <data name=\"SecretPhoto\" xml:space=\"preserve\">\n    <value>Geheime foto</value>\n  </data>\n  <data name=\"SecretVideo\" xml:space=\"preserve\">\n    <value>Geheime video</value>\n  </data>\n  <data name=\"ChooseFromYourStickers\" xml:space=\"preserve\">\n    <value>Kies uit je stickers</value>\n  </data>\n  <data name=\"CreateStickerSetHint\" xml:space=\"preserve\">\n    <value>Je kunt persoonlijke stickerbundels maken via de bot @stickers.</value>\n  </data>\n  <data name=\"GroupStickers\" xml:space=\"preserve\">\n    <value>Groepsstickers</value>\n  </data>\n  <data name=\"GroupStickersDescription\" xml:space=\"preserve\">\n    <value>Je kunt een stickerbundel kiezen die voor iedereen in de groepschat beschikbaar is.</value>\n  </data>\n  <data name=\"AddToFavorites\" xml:space=\"preserve\">\n    <value>Toevoegen aan favorieten</value>\n  </data>\n  <data name=\"DeleteFromFavorites\" xml:space=\"preserve\">\n    <value>Verwijder uit favorieten</value>\n  </data>\n  <data name=\"NoStickerSetFound\" xml:space=\"preserve\">\n    <value>Stickerbundel niet gevonden</value>\n  </data>\n  <data name=\"NoStickerSetFoundSubtitle\" xml:space=\"preserve\">\n    <value>Probeer opnieuw of kies uit de lijst</value>\n  </data>\n  <data name=\"Auto\" xml:space=\"preserve\">\n    <value>Automatisch</value>\n  </data>\n  <data name=\"VideoQuality\" xml:space=\"preserve\">\n    <value>Videokwaliteit</value>\n  </data>\n  <data name=\"Quality\" xml:space=\"preserve\">\n    <value>Kwaliteit</value>\n  </data>\n  <data name=\"ClearUnreadMentionsConfirmation\" xml:space=\"preserve\">\n    <value>Echt alle ongelezen vermeldingen wissen?</value>\n  </data>\n  <data name=\"PasswordEmail\" xml:space=\"preserve\">\n    <value>Wachtwoord &amp; email</value>\n  </data>\n  <data name=\"CreatePasswordHint\" xml:space=\"preserve\">\n    <value>Bescherm je betaalinformatie met een wachtwoord.\nWe vragen hierom als je inlogt.</value>\n  </data>\n  <data name=\"SendLiveLocation\" xml:space=\"preserve\">\n    <value>Mijn live-locatie delen</value>\n  </data>\n  <data name=\"SendLiveLocationSubtitle\" xml:space=\"preserve\">\n    <value>Bijgewerkt terwijl je je verplaatst</value>\n  </data>\n  <data name=\"LiveLocation\" xml:space=\"preserve\">\n    <value>Live-locatie</value>\n  </data>\n  <data name=\"ShareLiveLocationToContactTimerSubtitle\" xml:space=\"preserve\">\n    <value>Kies hoelang je je live-locatie wilt delen met {0}</value>\n  </data>\n  <data name=\"ContactJoinedTelegram\" xml:space=\"preserve\">\n    <value>Contact is nu lid van Telegram</value>\n  </data>\n  <data name=\"Events\" xml:space=\"preserve\">\n    <value>Gebeurtenissen</value>\n  </data>\n  <data name=\"ChatHistoryCaption\" xml:space=\"preserve\">\n    <value>Geschiedenis voor nieuwe leden</value>\n  </data>\n  <data name=\"ChatHistoryHidden\" xml:space=\"preserve\">\n    <value>Nieuwe leden zien oudere berichten niet</value>\n  </data>\n  <data name=\"ChatHistoryVisible\" xml:space=\"preserve\">\n    <value>Nieuwe leden zien de volledige geschiedenis</value>\n  </data>\n  <data name=\"DescriptionOptional\" xml:space=\"preserve\">\n    <value>Beschrijving (optioneel)</value>\n  </data>\n  <data name=\"Hidden\" xml:space=\"preserve\">\n    <value>Verborgen</value>\n  </data>\n  <data name=\"Visible\" xml:space=\"preserve\">\n    <value>Zichtbaar</value>\n  </data>\n  <data name=\"LocationSharingEnded\" xml:space=\"preserve\">\n    <value>Locatie delen beëindigd</value>\n  </data>\n  <data name=\"Map\" xml:space=\"preserve\">\n    <value>Kaart</value>\n  </data>\n  <data name=\"MessageActionPinGeoLive\" xml:space=\"preserve\">\n    <value>{0} heeft live-locatie vastgezet</value>\n  </data>\n  <data name=\"For15Minutes\" xml:space=\"preserve\">\n    <value>15 minuten</value>\n  </data>\n  <data name=\"For1Hour\" xml:space=\"preserve\">\n    <value>1 uur</value>\n  </data>\n  <data name=\"For8Hours\" xml:space=\"preserve\">\n    <value>8 uur</value>\n  </data>\n  <data name=\"MessageActionClearHistory\" xml:space=\"preserve\">\n    <value>Geschiedenis gewist</value>\n  </data>\n  <data name=\"Updated\" xml:space=\"preserve\">\n    <value>Bijgewerkt!</value>\n  </data>\n  <data name=\"UpdatedAgo\" xml:space=\"preserve\">\n    <value>{0} geleden bijgewerkt</value>\n  </data>\n  <data name=\"UpdatedAtDate\" xml:space=\"preserve\">\n    <value>{0} om {1} bijgewerkt</value>\n  </data>\n  <data name=\"UpdatedJustNow\" xml:space=\"preserve\">\n    <value>Zojuist bijgewerkt</value>\n  </data>\n  <data name=\"UpdatedTodayAt\" xml:space=\"preserve\">\n    <value>Vandaag om {0} bijgewerkt</value>\n  </data>\n  <data name=\"UpdatedYesterdayAt\" xml:space=\"preserve\">\n    <value>Gisteren om {0} bijgewerkt</value>\n  </data>\n  <data name=\"StopSharingLocation\" xml:space=\"preserve\">\n    <value>Locatie delen beëindigen</value>\n  </data>\n  <data name=\"ShareLiveLocationToChatTimerSubtitle\" xml:space=\"preserve\">\n    <value>Kies hoelang je nauwkeurige locatie zichtbaar is voor deze chat.</value>\n  </data>\n  <data name=\"NewStickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Nieuwe stickerbundels</value>\n  </data>\n  <data name=\"NewStickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Nieuwe stickerbundel</value>\n  </data>\n  <data name=\"StickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Stickerbundels</value>\n  </data>\n  <data name=\"StickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Stickerbundel</value>\n  </data>\n  <data name=\"MaskPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Maskerbundels</value>\n  </data>\n  <data name=\"MaskPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Maskerbundel</value>\n  </data>\n  <data name=\"GroupNameInvalid\" xml:space=\"preserve\">\n    <value>Sorry, deze naam is ongeldig.</value>\n  </data>\n  <data name=\"GroupNameOccupied\" xml:space=\"preserve\">\n    <value>Deze naam is bezet.</value>\n  </data>\n  <data name=\"GroupNameShort\" xml:space=\"preserve\">\n    <value>Een groepsnaam moet minimaal 5 tekens hebben.</value>\n  </data>\n  <data name=\"GroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Begincijfers zijn niet toegestaan.</value>\n  </data>\n  <data name=\"AttachLiveLocationIsSharing\" xml:space=\"preserve\">\n    <value>Delen met {0}</value>\n  </data>\n  <data name=\"SharingLiveLocationTitle\" xml:space=\"preserve\">\n    <value>Je deelt je live-locatie met {0}</value>\n  </data>\n  <data name=\"SharingYouAndOtherName\" xml:space=\"preserve\">\n    <value>Jij en {0}</value>\n  </data>\n  <data name=\"StopAllLocationSharings\" xml:space=\"preserve\">\n    <value>Alles stoppen</value>\n  </data>\n  <data name=\"StopLiveLocationAlertAll\" xml:space=\"preserve\">\n    <value>Echt het delen van je live-locatie stoppen?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToGroup\" xml:space=\"preserve\">\n    <value>Echt het delen van je live-locatie met {0} stoppen?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToUser\" xml:space=\"preserve\">\n    <value>Echt het delen van je live-locatie met {0} stoppen?</value>\n  </data>\n  <data name=\"HourShort\" xml:space=\"preserve\">\n    <value>u</value>\n  </data>\n  <data name=\"ChatGenitivePlural\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"ChatGenitiveSingular\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"ChatNominativePlural\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"ChatNominativeSingular\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\n    <value>Bewaarde berichten</value>\n  </data>\n  <data name=\"ForwardHereToSave\" xml:space=\"preserve\">\n    <value>Hierheen doorsturen om op te slaan</value>\n  </data>\n  <data name=\"MicrophoneAccessDenied\" xml:space=\"preserve\">\n    <value>Toegang tot microfoon geweigerd</value>\n  </data>\n  <data name=\"MicrophoneAccessDeniedDescription\" xml:space=\"preserve\">\n    <value>Telegram heeft geen toegang tot je microfoon. Zorg ervoor dat Telegram je microfoon kan via de privacy instellingen van je toestel en herstart de app.</value>\n  </data>\n  <data name=\"SendCallLogs\" xml:space=\"preserve\">\n    <value>Oproep-logbestand sturen</value>\n  </data>\n  <data name=\"GroupMediaDescription\" xml:space=\"preserve\">\n    <value>Geef media als een enkel bericht weer</value>\n  </data>\n  <data name=\"UngroupMediaDescription\" xml:space=\"preserve\">\n    <value>Geef media als aparte berichten weer</value>\n  </data>\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\n    <value>Verwijderd account</value>\n  </data>\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\n    <value>Verwijderd account</value>\n  </data>\n  <data name=\"Album\" xml:space=\"preserve\">\n    <value>Album</value>\n  </data>\n  <data name=\"DeleteMessagesConfirmation\" xml:space=\"preserve\">\n    <value>{0} echt verwijderen?</value>\n  </data>\n  <data name=\"MessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Berichten</value>\n  </data>\n  <data name=\"MessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Bericht</value>\n  </data>\n  <data name=\"MessageNominativePlural\" xml:space=\"preserve\">\n    <value>Berichten</value>\n  </data>\n  <data name=\"MessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Bericht</value>\n  </data>\n  <data name=\"SubscriberGenitivePlural\" xml:space=\"preserve\">\n    <value>Abonnees</value>\n  </data>\n  <data name=\"SubscriberGenitiveSingular\" xml:space=\"preserve\">\n    <value>Abonnee</value>\n  </data>\n  <data name=\"SubscriberNominativePlural\" xml:space=\"preserve\">\n    <value>Abonnees</value>\n  </data>\n  <data name=\"SubscriberNominativeSingular\" xml:space=\"preserve\">\n    <value>Abonnee</value>\n  </data>\n  <data name=\"LogOutAllApplications\" xml:space=\"preserve\">\n    <value>Verbinding met alle websites verbreken</value>\n  </data>\n  <data name=\"LogOutAllApplicationsNote\" xml:space=\"preserve\">\n    <value/>\n  </data>\n  <data name=\"LoggedInWithTelegram\" xml:space=\"preserve\">\n    <value>Ingelogd met Telegram</value>\n  </data>\n  <data name=\"LogOutAllApplicationsConfirmation\" xml:space=\"preserve\">\n    <value>Verbinding met alle websites waar je via Telegram bent ingelogd verbreken?</value>\n  </data>\n  <data name=\"NoItemsHere\" xml:space=\"preserve\">\n    <value>Nog geen items</value>\n  </data>\n  <data name=\"Group\" xml:space=\"preserve\">\n    <value>Groeperen</value>\n  </data>\n  <data name=\"Ungroup\" xml:space=\"preserve\">\n    <value>Loskoppelen</value>\n  </data>\n  <data name=\"AboutApp\" xml:space=\"preserve\">\n    <value>Over</value>\n  </data>\n  <data name=\"NoActiveLogins\" xml:space=\"preserve\">\n    <value>Geen actieve verbindingen\n\nJe kunt inloggen op websites die authenticatie via Telegram ondersteunen.</value>\n  </data>\n  <data name=\"Feed\" xml:space=\"preserve\">\n    <value>Feed</value>\n  </data>\n  <data name=\"ChannelGenitivePlural\" xml:space=\"preserve\">\n    <value>Kanalen</value>\n  </data>\n  <data name=\"ChannelGenitiveSingular\" xml:space=\"preserve\">\n    <value>Kanaal</value>\n  </data>\n  <data name=\"ChannelNominativePlural\" xml:space=\"preserve\">\n    <value>Kanalen</value>\n  </data>\n  <data name=\"ChannelNominativeSingular\" xml:space=\"preserve\">\n    <value>Kanaal</value>\n  </data>\n  <data name=\"ShowNext\" xml:space=\"preserve\">\n    <value>Volgende</value>\n  </data>\n  <data name=\"GroupNewChannels\" xml:space=\"preserve\">\n    <value>Nieuwe kanalen groeperen</value>\n  </data>\n  <data name=\"MessageActionBotAllowed\" xml:space=\"preserve\">\n    <value>Je hebt deze bot toegestaan je berichten te sturen door in te loggen op {0}</value>\n  </data>\n  <data name=\"NoStickersFound\" xml:space=\"preserve\">\n    <value>Geen stickers gevonden</value>\n  </data>\n  <data name=\"ConnectedWebsites\" xml:space=\"preserve\">\n    <value>Verbonden websites</value>\n  </data>\n  <data name=\"ConnectedWebsitesHint\" xml:space=\"preserve\">\n    <value>Je kunt inloggen op websites die authenticatie via Telegram ondersteunen.</value>\n  </data>\n  <data name=\"TapToDisconnectTelegramAccount\" xml:space=\"preserve\">\n    <value>Tik om deze verbinding met je Telegram account te verbreken.</value>\n  </data>\n  <data name=\"TelegramPassport\" xml:space=\"preserve\">\n    <value>Telegram Passport</value>\n  </data>\n  <data name=\"Authorize\" xml:space=\"preserve\">\n    <value>Autoriseren</value>\n  </data>\n  <data name=\"Email2\" xml:space=\"preserve\">\n    <value>E-mailadres</value>\n  </data>\n  <data name=\"PassportPersonalDetailsInfo\" xml:space=\"preserve\">\n    <value>Vul je persoonsgegevens in</value>\n  </data>\n  <data name=\"PassportHint\" xml:space=\"preserve\">\n    <value>{0} vraagt om toegang tot je persoonlijke gegevens om je aan te melden voor de door hen aangeboden diensten.</value>\n  </data>\n  <data name=\"PassportAddress\" xml:space=\"preserve\">\n    <value>Adres</value>\n  </data>\n  <data name=\"PassportAddressInfo\" xml:space=\"preserve\">\n    <value>Upload bewijs van je adres</value>\n  </data>\n  <data name=\"PassportNoPolicy\" xml:space=\"preserve\">\n    <value>Je stuurt je documenten direct naar {0} en staat {1} toe je berichten te sturen.</value>\n  </data>\n  <data name=\"AllSets\" xml:space=\"preserve\">\n    <value>Alle bundels</value>\n  </data>\n  <data name=\"MySets\" xml:space=\"preserve\">\n    <value>Mijn bundels</value>\n  </data>\n  <data name=\"None\" xml:space=\"preserve\">\n    <value>Geen</value>\n  </data>\n  <data name=\"SuggestStickersByEmoji\" xml:space=\"preserve\">\n    <value>Stickersuggesties</value>\n  </data>\n  <data name=\"MTProto\" xml:space=\"preserve\">\n    <value>MTPROTO</value>\n  </data>\n  <data name=\"UseProxyForCalls\" xml:space=\"preserve\">\n    <value>Proxy voor oproepen gebruiken</value>\n  </data>\n  <data name=\"UseProxyForCallsHint\" xml:space=\"preserve\">\n    <value>Proxyservers kunnen de kwaliteit van je oproep beinvloeden.</value>\n  </data>\n  <data name=\"Connections\" xml:space=\"preserve\">\n    <value>Verbindingen</value>\n  </data>\n  <data name=\"AddProxy\" xml:space=\"preserve\">\n    <value>Proxy toevoegen</value>\n  </data>\n  <data name=\"Secret\" xml:space=\"preserve\">\n    <value>Sleutel</value>\n  </data>\n  <data name=\"UseTelegramProxyHint\" xml:space=\"preserve\">\n    <value>Telegram-proxyinstellingen</value>\n  </data>\n  <data name=\"Available\" xml:space=\"preserve\">\n    <value>Beschikbaar</value>\n  </data>\n  <data name=\"Checking\" xml:space=\"preserve\">\n    <value>Controleren</value>\n  </data>\n  <data name=\"Connected\" xml:space=\"preserve\">\n    <value>Verbonden</value>\n  </data>\n  <data name=\"Unavailable\" xml:space=\"preserve\">\n    <value>Niet beschikbaar</value>\n  </data>\n  <data name=\"TermsOfService\" xml:space=\"preserve\">\n    <value>Gebruiksvoorwaarden</value>\n  </data>\n  <data name=\"TermsOfServiceLink\" xml:space=\"preserve\">\n    <value>Door aan te melden ga je akkoord \nmet onze *Gebruiksvoorwaarden*.</value>\n  </data>\n  <data name=\"DeleteSyncedContacts\" xml:space=\"preserve\">\n    <value>Gesynchroniseerde contacten wissen</value>\n  </data>\n  <data name=\"SyncContacts\" xml:space=\"preserve\">\n    <value>Contacten synchroniseren</value>\n  </data>\n  <data name=\"SyncContactsDeleteInfo\" xml:space=\"preserve\">\n    <value>Hiermee verwijder je je contacten van de Telegram-servers.\nals 'Contacten Synchroniseren' is ingeschakeld worden je contacten opnieuw gesynchroniseerd.</value>\n  </data>\n  <data name=\"SyncContactsInfoOff\" xml:space=\"preserve\">\n    <value>Inschakelen om contacten continu naar je account te synchroniseren</value>\n  </data>\n  <data name=\"SyncContactsInfoOn\" xml:space=\"preserve\">\n    <value>Contacten van dit apparaat worden toegevoegd aan je account.</value>\n  </data>\n  <data name=\"LinkPreviewsHint\" xml:space=\"preserve\">\n    <value>Link-voorvertoningen worden gegenereerd op de servers van Telegram. We slaan geen data op over de verstuurde links</value>\n  </data>\n  <data name=\"DeleteSyncedContactsConfirmation\" xml:space=\"preserve\">\n    <value>Hiermee verwijder je je contacten van de Telegram-servers. Als 'Contacten Synchroniseren' is ingeschakeld worden je contacten opnieuw gesynchroniseerd.</value>\n  </data>\n  <data name=\"ProxyDisabledNotification\" xml:space=\"preserve\">\n    <value>De door jou ingestelde proxy is niet correct geconfigureerd en zal daarom worden uitgeschakeld. Probeer een andere Proxy.</value>\n  </data>\n  <data name=\"ProxySponsor\" xml:space=\"preserve\">\n    <value>Proxy-sponsor</value>\n  </data>\n  <data name=\"ProxySponsorAbout\" xml:space=\"preserve\">\n    <value>Dit kanaal is zichtbaar omdat je een proxy-server gebruikt, \nom dit kanaal te verwijderen uit je chatoverzicht kun je de \nproxy uitschakelen via de instellingen van Telegram.</value>\n  </data>\n  <data name=\"ProxySponsorWarning\" xml:space=\"preserve\">\n    <value>De proxy die je gebruikt kan een gesponsord kanaal weergeven in je chatoverzicht, maar heeft geen inzage in je Telegram-verkeer.</value>\n  </data>\n  <data name=\"MarkRead\" xml:space=\"preserve\">\n    <value>Markeren als gelezen</value>\n  </data>\n  <data name=\"MarkUnread\" xml:space=\"preserve\">\n    <value>Markeren als ongelezen</value>\n  </data>\n  <data name=\"SuggestFrequentContacts\" xml:space=\"preserve\">\n    <value>Veelgebruikte contacten voorstellen</value>\n  </data>\n  <data name=\"SuggestFrequentContactsAbout\" xml:space=\"preserve\">\n    <value>Mensen die je vaak een bericht stuurt bovenaan de zoeksectie weergeven voor snelle toegang.</value>\n  </data>\n  <data name=\"SuggestFrequentContactsNotification\" xml:space=\"preserve\">\n    <value>Hiermee verwijder je alle gegevens van mensen die je vaak berichten stuurt, inclusief inline-bots die je veel gebruikt.</value>\n  </data>\n  <data name=\"ViewContact\" xml:space=\"preserve\">\n    <value>Contact bekijken</value>\n  </data>\n  <data name=\"PhoneKindHome\" xml:space=\"preserve\">\n    <value>Thuis</value>\n  </data>\n  <data name=\"PhoneKindMobile\" xml:space=\"preserve\">\n    <value>Mobiel</value>\n  </data>\n  <data name=\"PhoneKindOther\" xml:space=\"preserve\">\n    <value>Overig</value>\n  </data>\n  <data name=\"PhoneKindWork\" xml:space=\"preserve\">\n    <value>Werk</value>\n  </data>\n  <data name=\"PassportAddAgreement\" xml:space=\"preserve\">\n    <value>Huurovereenkomst toevoegen</value>\n  </data>\n  <data name=\"PassportAddAgreementInfo\" xml:space=\"preserve\">\n    <value>Upload een scan van je huurovereenkomst</value>\n  </data>\n  <data name=\"PassportAddBank\" xml:space=\"preserve\">\n    <value>Bankafschrift toevoegen</value>\n  </data>\n  <data name=\"PassportAddBankInfo\" xml:space=\"preserve\">\n    <value>Upload een scan van je bankafschrift</value>\n  </data>\n  <data name=\"PassportAddBill\" xml:space=\"preserve\">\n    <value>Energierekening toevoegen</value>\n  </data>\n  <data name=\"PassportAddBillInfo\" xml:space=\"preserve\">\n    <value>Upload een scan van je energierekening</value>\n  </data>\n  <data name=\"PassportAddPassportRegistration\" xml:space=\"preserve\">\n    <value>Paspoortregistratie</value>\n  </data>\n  <data name=\"PassportAddPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>Upload een scan van je paspoortregistratiepagina</value>\n  </data>\n  <data name=\"PassportAddressHeader\" xml:space=\"preserve\">\n    <value>Adres</value>\n  </data>\n  <data name=\"PassportCity\" xml:space=\"preserve\">\n    <value>Stad</value>\n  </data>\n  <data name=\"PassportCountry\" xml:space=\"preserve\">\n    <value>Land</value>\n  </data>\n  <data name=\"PassportDeleteDocument\" xml:space=\"preserve\">\n    <value>Document verwijderen</value>\n  </data>\n  <data name=\"PassportDeleteDocumentAlert\" xml:space=\"preserve\">\n    <value>Document echt verwijderen?</value>\n  </data>\n  <data name=\"PassportDeleteScan\" xml:space=\"preserve\">\n    <value>Scan verwijderen</value>\n  </data>\n  <data name=\"PassportDocuments\" xml:space=\"preserve\">\n    <value>Scans</value>\n  </data>\n  <data name=\"PassportPostcode\" xml:space=\"preserve\">\n    <value>Postcode</value>\n  </data>\n  <data name=\"PassportState\" xml:space=\"preserve\">\n    <value>Provincie</value>\n  </data>\n  <data name=\"PassportStreet1\" xml:space=\"preserve\">\n    <value>Straat</value>\n  </data>\n  <data name=\"PassportStreet2\" xml:space=\"preserve\">\n    <value>Straat</value>\n  </data>\n  <data name=\"PassportUploadAdditinalDocument\" xml:space=\"preserve\">\n    <value>Upload extra scans</value>\n  </data>\n  <data name=\"PassportUploadDocument\" xml:space=\"preserve\">\n    <value>Scans uploaden</value>\n  </data>\n  <data name=\"PassportDeleteScanAlert\" xml:space=\"preserve\">\n    <value>Scan echt verwijderen?</value>\n  </data>\n  <data name=\"PassportEmailInfo\" xml:space=\"preserve\">\n    <value>Voer je E-mailadres in</value>\n  </data>\n  <data name=\"PassportPhoneInfo\" xml:space=\"preserve\">\n    <value>Voer je telefoonnummer in</value>\n  </data>\n  <data name=\"UpdateApp\" xml:space=\"preserve\">\n    <value>App bijwerken</value>\n  </data>\n  <data name=\"PassportPhone\" xml:space=\"preserve\">\n    <value>Telefoonnummer</value>\n  </data>\n  <data name=\"PassportPhoneUploadInfo\" xml:space=\"preserve\">\n    <value>Let op: Je ontvangt de bevestigingscode op het opgegeven telefoonnummer.</value>\n  </data>\n  <data name=\"PassportPhoneUseOther\" xml:space=\"preserve\">\n    <value>Of geef een nieuw telefoonnummer op</value>\n  </data>\n  <data name=\"PassportPhoneUseSame\" xml:space=\"preserve\">\n    <value>Gebruik {0}</value>\n  </data>\n  <data name=\"PassportPhoneUseSameInfo\" xml:space=\"preserve\">\n    <value>Gebruik hetzelfde telefoonnummer als op Telegram</value>\n  </data>\n  <data name=\"PassportDeletePhoneNumberAlert\" xml:space=\"preserve\">\n    <value>Telefoonnummer echt verwijderen?</value>\n  </data>\n  <data name=\"MessageActionSecureValuesSent\" xml:space=\"preserve\">\n    <value>{0} heeft de volgende documenten ontvangen: {1}</value>\n  </data>\n  <data name=\"DeleteAllCloudDrafts\" xml:space=\"preserve\">\n    <value>Verwijder alle Cloud-conceptberichten</value>\n  </data>\n  <data name=\"DeleteAllCloudDraftsConfirmation\" xml:space=\"preserve\">\n    <value>Echt alle Cloud-conceptberichten wissen?</value>\n  </data>\n  <data name=\"PassportRequestPasswordInfo\" xml:space=\"preserve\">\n    <value>Voer je Telegram-wachtwoord in om je gegevens te ontsleutelen.</value>\n  </data>\n  <data name=\"PassportSelfRequest\" xml:space=\"preserve\">\n    <value>Voer je wachtwoord in voor toegang tot je persoonsgegevens</value>\n  </data>\n  <data name=\"PassportDelete\" xml:space=\"preserve\">\n    <value>Verwijder</value>\n  </data>\n  <data name=\"PassportNoDocumentsAdd\" xml:space=\"preserve\">\n    <value>Document toevoegen</value>\n  </data>\n  <data name=\"PassportEmail\" xml:space=\"preserve\">\n    <value>E-mailadres</value>\n  </data>\n  <data name=\"PassportPersonal\" xml:space=\"preserve\">\n    <value>Persoonlijke gegevens</value>\n  </data>\n  <data name=\"PassportUtilityBill\" xml:space=\"preserve\">\n    <value>Energierekening</value>\n  </data>\n  <data name=\"PassportProvidedInformation\" xml:space=\"preserve\">\n    <value>Opgegeven informatie</value>\n  </data>\n  <data name=\"PassportRequestedInformation\" xml:space=\"preserve\">\n    <value>Gevraagde informatie</value>\n  </data>\n  <data name=\"PassportDeleteConfirmation\" xml:space=\"preserve\">\n    <value>Telegram Passport echt verwijderen?</value>\n  </data>\n  <data name=\"Passport\" xml:space=\"preserve\">\n    <value>Paspoort</value>\n  </data>\n  <data name=\"PassportBankStatement\" xml:space=\"preserve\">\n    <value>Bankafschrift</value>\n  </data>\n  <data name=\"PassportDriverLicence\" xml:space=\"preserve\">\n    <value>Rijbewijs</value>\n  </data>\n  <data name=\"PassportEmailAddress\" xml:space=\"preserve\">\n    <value>E-mailadres</value>\n  </data>\n  <data name=\"PassportIdentityCard\" xml:space=\"preserve\">\n    <value>Identiteitskaart</value>\n  </data>\n  <data name=\"PassportInternal\" xml:space=\"preserve\">\n    <value>Nationaal paspoort</value>\n  </data>\n  <data name=\"PassportPersonalDetails\" xml:space=\"preserve\">\n    <value>Persoonsgegevens</value>\n  </data>\n  <data name=\"PassportPhoneNumber\" xml:space=\"preserve\">\n    <value>Telefoonnummer</value>\n  </data>\n  <data name=\"PassportRegistration\" xml:space=\"preserve\">\n    <value>Paspoortregistratie</value>\n  </data>\n  <data name=\"PassportTemporaryRegistration\" xml:space=\"preserve\">\n    <value>Tijdelijk identiteitsbewijs</value>\n  </data>\n  <data name=\"PassportTenancyAgreement\" xml:space=\"preserve\">\n    <value>Huurovereenkomst</value>\n  </data>\n  <data name=\"PassportDeleteEmailAlert\" xml:space=\"preserve\">\n    <value>E-mailadres echt verwijderen?</value>\n  </data>\n  <data name=\"PassportDeleteAll\" xml:space=\"preserve\">\n    <value>Telegram Passport verwijderen</value>\n  </data>\n  <data name=\"PassportDeleteAddressAlert\" xml:space=\"preserve\">\n    <value>Adresgegevens echt verwijderen?</value>\n  </data>\n  <data name=\"PassportAddTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Upload een scan van je tijdelijke identiteitsbewijs</value>\n  </data>\n  <data name=\"PassportResidentialAddress\" xml:space=\"preserve\">\n    <value>Woonadres</value>\n  </data>\n  <data name=\"PassportDeleteAddressDetails\" xml:space=\"preserve\">\n    <value>Adresgegevens verwijderen</value>\n  </data>\n  <data name=\"PassportUploadMaxReached\" xml:space=\"preserve\">\n    <value>Je kunt maximaal {0} bestanden uploaden.</value>\n  </data>\n  <data name=\"PassportCorrectErrors\" xml:space=\"preserve\">\n    <value>Tik om fouten te corrigeren.</value>\n  </data>\n  <data name=\"PassportUseLatinOnly\" xml:space=\"preserve\">\n    <value>Controleer of je naam geen ongeldige tekens bevat.</value>\n  </data>\n  <data name=\"PassportInfo\" xml:space=\"preserve\">\n    <value>Met Telegram Passport kun je je makkelijk aanmelden voor websites en diensten die identiteitsverificatie vereisen.\n\nJe informatie, persoonsgegevens en documenten zijn beschermd middels end-to-end-versleuteling. Niemand heeft toegang tot deze gegevens zonder je toestemming, inclusief Telegram.\n\nJe kunt onze veelgestelde vragen bekijken voor meer informatie.</value>\n  </data>\n  <data name=\"PassportFormError\" xml:space=\"preserve\">\n    <value>Autorisatieformulier ophalen mislukt</value>\n  </data>\n  <data name=\"TurnPasswordOffPassport\" xml:space=\"preserve\">\n    <value>Let op! Alle opgeslagen gegevens in je Telegram Passport gaan verloren!</value>\n  </data>\n  <data name=\"TurnPasswordOffQuestion\" xml:space=\"preserve\">\n    <value>Weet je zeker dat je je wachtwoord wilt uitschakelen?</value>\n  </data>\n  <data name=\"PassportNoDocuments\" xml:space=\"preserve\">\n    <value>Nog geen documenten</value>\n  </data>\n  <data name=\"PassportNoDocumentsInfo\" xml:space=\"preserve\">\n    <value>Je kunt je telefoonnummer, E-mailadres, identiteitsbewijs of woonadres toevoegen.</value>\n  </data>\n  <data name=\"TelegramPassportCreatePassword\" xml:space=\"preserve\">\n    <value>Wachtwoord instellen</value>\n  </data>\n  <data name=\"TelegramPassportCreatePasswordInfo\" xml:space=\"preserve\">\n    <value>Stel een wachtwoord in om je betaalinformatie te beschermen. \n\nTijdens het inloggen vragen we je om dit wachtwoord.</value>\n  </data>\n  <data name=\"PassportEmailUploadInfo\" xml:space=\"preserve\">\n    <value>Let op: Je ontvangt een bevestigingscode op het door jou opgegeven E-mailadres.</value>\n  </data>\n  <data name=\"PassportEmailUseSameInfo\" xml:space=\"preserve\">\n    <value>Gebruik hetzelfde E-mailadres als op Telegram</value>\n  </data>\n  <data name=\"EmailInvalidString\" xml:space=\"preserve\">\n    <value>Ongeldig e-mailadres</value>\n  </data>\n  <data name=\"PassportEmailVerifyInfo\" xml:space=\"preserve\">\n    <value>Voer de bevestigingscode in die we hebben verstuurd naar {0}.</value>\n  </data>\n  <data name=\"EmailCodeEmpty\" xml:space=\"preserve\">\n    <value>Code is leeg. Probeer opnieuw.</value>\n  </data>\n  <data name=\"EmailCodeExpiredString\" xml:space=\"preserve\">\n    <value>Code is verlopen. Probeer het opnieuw.</value>\n  </data>\n  <data name=\"EmailCodeInvalidString\" xml:space=\"preserve\">\n    <value>Je hebt een ongeldige code ingevoerd. Probeer het opnieuw.</value>\n  </data>\n  <data name=\"PassportBirthdate\" xml:space=\"preserve\">\n    <value>Geboortedatum</value>\n  </data>\n  <data name=\"PassportCitizenship\" xml:space=\"preserve\">\n    <value>Burgerschap</value>\n  </data>\n  <data name=\"PassportFemale\" xml:space=\"preserve\">\n    <value>Vrouwelijk</value>\n  </data>\n  <data name=\"PassportGender\" xml:space=\"preserve\">\n    <value>Geslacht</value>\n  </data>\n  <data name=\"PassportMale\" xml:space=\"preserve\">\n    <value>Mannelijk</value>\n  </data>\n  <data name=\"PassportName\" xml:space=\"preserve\">\n    <value>Naam</value>\n  </data>\n  <data name=\"PassportResidence\" xml:space=\"preserve\">\n    <value>Vestigingsplaats</value>\n  </data>\n  <data name=\"PassportSurname\" xml:space=\"preserve\">\n    <value>Achternaam</value>\n  </data>\n  <data name=\"PassportSelectGender\" xml:space=\"preserve\">\n    <value>Geslacht kiezen</value>\n  </data>\n  <data name=\"PassportSelectDate\" xml:space=\"preserve\">\n    <value>Datum kiezen</value>\n  </data>\n  <data name=\"PassportDocumentNumber\" xml:space=\"preserve\">\n    <value>Documentnummer</value>\n  </data>\n  <data name=\"PassportExpired\" xml:space=\"preserve\">\n    <value>Verloopt</value>\n  </data>\n  <data name=\"PassportFrontSide\" xml:space=\"preserve\">\n    <value>Voorkant</value>\n  </data>\n  <data name=\"PassportFrontSideInfo\" xml:space=\"preserve\">\n    <value>Upload een foto van de voorkant van het document</value>\n  </data>\n  <data name=\"PassportPersonalUploadInfo\" xml:space=\"preserve\">\n    <value>Dit document moet je foto, voor en achternaam, geboortedatum, documentnummer, land van uitgifte en verloopdatum bevatten.</value>\n  </data>\n  <data name=\"PassportRequiredDocuments\" xml:space=\"preserve\">\n    <value>Vereiste documenten</value>\n  </data>\n  <data name=\"PassportReverseSide\" xml:space=\"preserve\">\n    <value>Achterkant</value>\n  </data>\n  <data name=\"PassportReverseSideInfo\" xml:space=\"preserve\">\n    <value>Upload een foto van de achterkant van het document</value>\n  </data>\n  <data name=\"PassportSelfie\" xml:space=\"preserve\">\n    <value>Selfie</value>\n  </data>\n  <data name=\"PassportSelfieInfo\" xml:space=\"preserve\">\n    <value>Upload een selfie waarop je het document vasthoudt</value>\n  </data>\n  <data name=\"PassportSelectNotExpire\" xml:space=\"preserve\">\n    <value>Verloopt niet</value>\n  </data>\n  <data name=\"PassportDeleteDocumentPersonal\" xml:space=\"preserve\">\n    <value>Persoonsgegevens verwijderen</value>\n  </data>\n  <data name=\"PassportMainPage\" xml:space=\"preserve\">\n    <value>Hoofdpagina</value>\n  </data>\n  <data name=\"PassportMainPageInfo\" xml:space=\"preserve\">\n    <value>Upload een foto van de hoofdpagina van het document</value>\n  </data>\n  <data name=\"PassportNoExpireDate\" xml:space=\"preserve\">\n    <value>Geen</value>\n  </data>\n  <data name=\"UpdateAppAlert\" xml:space=\"preserve\">\n    <value>Je gebruikt een verouderde versie van Telegram, deze kan dit verzoek niet verwerken. Werk Telegram bij.</value>\n  </data>\n  <data name=\"PassportInfoTitle\" xml:space=\"preserve\">\n    <value>Wat is Telegram Passport?</value>\n  </data>\n  <data name=\"Copyright\" xml:space=\"preserve\">\n    <value>Auteursrechten</value>\n  </data>\n  <data name=\"PassportAddTranslationDriverLicenceInfo\" xml:space=\"preserve\">\n    <value>Upload scans van een gecertificeerde Engelse vertaling van je rijbewijs.</value>\n  </data>\n  <data name=\"PassportAddTranslationIdentityCardInfo\" xml:space=\"preserve\">\n    <value>Upload scans van een gecertificeerde Engelse vertaling van je identiteitsbewijs.</value>\n  </data>\n  <data name=\"PassportAddTranslationInternalPassportInfo\" xml:space=\"preserve\">\n    <value>Upload scans van een gecertificeerde Engelse vertaling van je nationale paspoort.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportInfo\" xml:space=\"preserve\">\n    <value>Upload scans van een gecertificeerde Engelse vertaling van je paspoort.</value>\n  </data>\n  <data name=\"PassportAddTranslationAgreementInfo\" xml:space=\"preserve\">\n    <value>Upload scans van een gecertificeerde Engelse vertaling van je huurovereenkomst.</value>\n  </data>\n  <data name=\"PassportAddTranslationBankInfo\" xml:space=\"preserve\">\n    <value>Upload scans van een gecertificeerde Engelse vertaling van je bankafschrift.</value>\n  </data>\n  <data name=\"PassportAddTranslationBillInfo\" xml:space=\"preserve\">\n    <value>Upload scans van een gecertificeerde Engelse vertaling van je energierekening.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>Upload scans van een gecertificeerde Engelse vertaling van je paspoortregistratiepagina.</value>\n  </data>\n  <data name=\"PassportAddTranslationTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Upload scans van een gecertificeerde Engelse vertaling van je tijdelijke identiteitsbewijs.</value>\n  </data>\n  <data name=\"PassportAddTranslationUploadInfo\" xml:space=\"preserve\">\n    <value>Upload scans van een gecertificeerde Engelse vertaling van het document.</value>\n  </data>\n  <data name=\"PassportTranslation\" xml:space=\"preserve\">\n    <value>Vertaling</value>\n  </data>\n  <data name=\"PassportDataCorrupted\" xml:space=\"preserve\">\n    <value>Je Telegram Passport-gegevens zijn corrupt geraakt.\nJe kunt je Telegram Passport resetten.</value>\n  </data>\n  <data name=\"PassportOr\" xml:space=\"preserve\">\n    <value>{0} of {1}</value>\n  </data>\n  <data name=\"PassportIdentityDocument\" xml:space=\"preserve\">\n    <value>Identiteitsbewijs</value>\n  </data>\n  <data name=\"PassportAddressNoUploadInfo\" xml:space=\"preserve\">\n    <value>Voer je adres in</value>\n  </data>\n  <data name=\"PassportIdentityDocumentInfo\" xml:space=\"preserve\">\n    <value>Upload een scan van je paspoort of ander identiteitsbewijs.</value>\n  </data>\n  <data name=\"PassportIdentityDriverLicence\" xml:space=\"preserve\">\n    <value>Upload een scan van je rijbewijs</value>\n  </data>\n  <data name=\"PassportIdentityID\" xml:space=\"preserve\">\n    <value>Upload een scan van je identiteitsbewijs</value>\n  </data>\n  <data name=\"PassportIdentityInternalPassport\" xml:space=\"preserve\">\n    <value>Upload een scan van je nationale paspoort</value>\n  </data>\n  <data name=\"PassportIdentityPassport\" xml:space=\"preserve\">\n    <value>Upload een scan van je paspoort</value>\n  </data>\n  <data name=\"PassportMidname\" xml:space=\"preserve\">\n    <value>Tweede naam</value>\n  </data>\n  <data name=\"PassportMidnameCountry\" xml:space=\"preserve\">\n    <value>Tweede naam ({0})</value>\n  </data>\n  <data name=\"PassportMidnameLatin\" xml:space=\"preserve\">\n    <value>Tweede naam (Latijns alfabet)</value>\n  </data>\n  <data name=\"PassportNameCountry\" xml:space=\"preserve\">\n    <value>Naam ({0})</value>\n  </data>\n  <data name=\"PassportNameLatin\" xml:space=\"preserve\">\n    <value>Naam (Latijns alfabet)</value>\n  </data>\n  <data name=\"PassportNativeHeader\" xml:space=\"preserve\">\n    <value>Je naam</value>\n  </data>\n  <data name=\"PassportNativeInfo\" xml:space=\"preserve\">\n    <value>Je naam in de taal van het land van residentie ({0}).</value>\n  </data>\n  <data name=\"PassportSurnameCountry\" xml:space=\"preserve\">\n    <value>Achternaam ({0})</value>\n  </data>\n  <data name=\"PassportSurnameLatin\" xml:space=\"preserve\">\n    <value>Achternaam (Latijns alfabet)</value>\n  </data>\n</root>\n"
  },
  {
    "path": "TelegramClient/Resources/AppResources.pt.Designer.cs",
    "content": ""
  },
  {
    "path": "TelegramClient/Resources/AppResources.pt.resx",
    "content": "﻿<?xml version='1.0' encoding='UTF-8'?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" id=\"root\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/>\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"AppName\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"BlockContact\" xml:space=\"preserve\">\n    <value>Bloquear</value>\n  </data>\n  <data name=\"BlockedUsers\" xml:space=\"preserve\">\n    <value>Lista Negra</value>\n  </data>\n  <data name=\"Call\" xml:space=\"preserve\">\n    <value>Ligar</value>\n  </data>\n  <data name=\"Contacts\" xml:space=\"preserve\">\n    <value>Contatos</value>\n  </data>\n  <data name=\"Copy\" xml:space=\"preserve\">\n    <value>Copiar</value>\n  </data>\n  <data name=\"Delete\" xml:space=\"preserve\">\n    <value>Apagar</value>\n  </data>\n  <data name=\"Dialogs\" xml:space=\"preserve\">\n    <value>Conversas</value>\n  </data>\n  <data name=\"Forward\" xml:space=\"preserve\">\n    <value>Encaminhar</value>\n  </data>\n  <data name=\"Loading\" xml:space=\"preserve\">\n    <value>Carregando...</value>\n  </data>\n  <data name=\"Login\" xml:space=\"preserve\">\n    <value>Entrar</value>\n  </data>\n  <data name=\"Refresh\" xml:space=\"preserve\">\n    <value>Atualizar</value>\n  </data>\n  <data name=\"Retry\" xml:space=\"preserve\">\n    <value>Tentar de novo</value>\n  </data>\n  <data name=\"Send\" xml:space=\"preserve\">\n    <value>Enviar</value>\n  </data>\n  <data name=\"Sending\" xml:space=\"preserve\">\n    <value>Enviando</value>\n  </data>\n  <data name=\"SendingFailed\" xml:space=\"preserve\">\n    <value>Falha no envio</value>\n  </data>\n  <data name=\"SendMessage\" xml:space=\"preserve\">\n    <value>Enviar Mensagem</value>\n  </data>\n  <data name=\"Settings\" xml:space=\"preserve\">\n    <value>Configurações</value>\n  </data>\n  <data name=\"ShareContact\" xml:space=\"preserve\">\n    <value>Compartilhar contato</value>\n  </data>\n  <data name=\"SignIn\" xml:space=\"preserve\">\n    <value>Entrar</value>\n  </data>\n  <data name=\"UnblockContact\" xml:space=\"preserve\">\n    <value>Desbloquear</value>\n  </data>\n  <data name=\"Yesterday\" xml:space=\"preserve\">\n    <value>Ontem</value>\n  </data>\n  <data name=\"YourMessage\" xml:space=\"preserve\">\n    <value>Digite sua mensagem</value>\n  </data>\n  <data name=\"LogOut\" xml:space=\"preserve\">\n    <value>Sair</value>\n  </data>\n  <data name=\"NoMessagesYet\" xml:space=\"preserve\">\n    <value>Ainda sem mensagens...</value>\n  </data>\n  <data name=\"Confirm\" xml:space=\"preserve\">\n    <value>Confirmar</value>\n  </data>\n  <data name=\"DeleteChatConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja apagar esta conversa?</value>\n  </data>\n  <data name=\"Contact\" xml:space=\"preserve\">\n    <value>Contato</value>\n  </data>\n  <data name=\"EmptyMessage\" xml:space=\"preserve\">\n    <value>Mensagem apagada</value>\n  </data>\n  <data name=\"ForwardedMessage\" xml:space=\"preserve\">\n    <value>Encaminhado de</value>\n  </data>\n  <data name=\"GeoPoint\" xml:space=\"preserve\">\n    <value>Localização</value>\n  </data>\n  <data name=\"Photo\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"Video\" xml:space=\"preserve\">\n    <value>Vídeo</value>\n  </data>\n  <data name=\"ComposeMessage\" xml:space=\"preserve\">\n    <value>Novo</value>\n  </data>\n  <data name=\"Search\" xml:space=\"preserve\">\n    <value>Busca</value>\n  </data>\n  <data name=\"ServiceMessage\" xml:space=\"preserve\">\n    <value>Mensagem do serviço</value>\n  </data>\n  <data name=\"UnsupportedMedia\" xml:space=\"preserve\">\n    <value>Esta mensagem não é suportada na sua versão do Telegram. Para visualiza-la atualize seu aplicativo em http://telegram.org/update</value>\n  </data>\n  <data name=\"Unread\" xml:space=\"preserve\">\n    <value>Não lido</value>\n  </data>\n  <data name=\"IsTyping\" xml:space=\"preserve\">\n    <value>Está digitando</value>\n  </data>\n  <data name=\"Online\" xml:space=\"preserve\">\n    <value>Conectado</value>\n  </data>\n  <data name=\"User\" xml:space=\"preserve\">\n    <value>Usuário</value>\n  </data>\n  <data name=\"MessageActionChatCreate\" xml:space=\"preserve\">\n    <value>{0} criou o grupo \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionChatEditTitle\" xml:space=\"preserve\">\n    <value>{0} mudou o nome do grupo para \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionChatEditPhoto\" xml:space=\"preserve\">\n    <value>{0} atualizou a foto do grupo</value>\n  </data>\n  <data name=\"MessageActionChatDeletePhoto\" xml:space=\"preserve\">\n    <value>{0} removeu a foto do grupo</value>\n  </data>\n  <data name=\"MessageActionChatAddUser\" xml:space=\"preserve\">\n    <value>{0} convidou {1}</value>\n  </data>\n  <data name=\"MessageActionChatDeleteUser\" xml:space=\"preserve\">\n    <value>{0} removeu {1}</value>\n  </data>\n  <data name=\"MessageActionEmpty\" xml:space=\"preserve\">\n    <value>Mensagem de serviço vazia</value>\n  </data>\n  <data name=\"CompanyNominative\" xml:space=\"preserve\">\n    <value>Membro</value>\n  </data>\n  <data name=\"CompanyGenitivePlural\" xml:space=\"preserve\">\n    <value>Membros</value>\n  </data>\n  <data name=\"CompanyGenitiveSingular\" xml:space=\"preserve\">\n    <value>Membro</value>\n  </data>\n  <data name=\"PeopleInTheConversation\" xml:space=\"preserve\">\n    <value>{0} membros</value>\n  </data>\n  <data name=\"Offline\" xml:space=\"preserve\">\n    <value>Desconectado</value>\n  </data>\n  <data name=\"Today\" xml:space=\"preserve\">\n    <value>Hoje</value>\n  </data>\n  <data name=\"LastSeenAt\" xml:space=\"preserve\">\n    <value>Visto {0} às {1}</value>\n  </data>\n  <data name=\"LastSeen\" xml:space=\"preserve\">\n    <value>Visto {0} atrás</value>\n  </data>\n  <data name=\"MinuteAccusative\" xml:space=\"preserve\">\n    <value>Minuto</value>\n  </data>\n  <data name=\"MinuteGenitiveSingular\" xml:space=\"preserve\">\n    <value>Minuto</value>\n  </data>\n  <data name=\"MinuteGenitivePlural\" xml:space=\"preserve\">\n    <value>Minutos</value>\n  </data>\n  <data name=\"Attach\" xml:space=\"preserve\">\n    <value>Anexar</value>\n  </data>\n  <data name=\"Manage\" xml:space=\"preserve\">\n    <value>Selecionar mensagens</value>\n  </data>\n  <data name=\"Ok\" xml:space=\"preserve\">\n    <value>Ok</value>\n  </data>\n  <data name=\"Cancel\" xml:space=\"preserve\">\n    <value>Cancelar</value>\n  </data>\n  <data name=\"Select\" xml:space=\"preserve\">\n    <value>Selecionar</value>\n  </data>\n  <data name=\"MapAccusative\" xml:space=\"preserve\">\n    <value>Minha localização</value>\n  </data>\n  <data name=\"PhotoAccusative\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"Add\" xml:space=\"preserve\">\n    <value>Adicionar</value>\n  </data>\n  <data name=\"NewGroup\" xml:space=\"preserve\">\n    <value>Novo grupo</value>\n  </data>\n  <data name=\"NewSecretChat\" xml:space=\"preserve\">\n    <value>Novo Chat Secreto</value>\n  </data>\n  <data name=\"TileUpdaterTaskDescription\" xml:space=\"preserve\">\n    <value>Tarefa agendada para atualizar a contagem de mensagens novas no bloco dinâmico.</value>\n  </data>\n  <data name=\"Media\" xml:space=\"preserve\">\n    <value>Mídia</value>\n  </data>\n  <data name=\"Profile\" xml:space=\"preserve\">\n    <value>Informações</value>\n  </data>\n  <data name=\"Notifications\" xml:space=\"preserve\">\n    <value>Notificações</value>\n  </data>\n  <data name=\"On\" xml:space=\"preserve\">\n    <value>Ligado</value>\n  </data>\n  <data name=\"Off\" xml:space=\"preserve\">\n    <value>Desligado</value>\n  </data>\n  <data name=\"Sound\" xml:space=\"preserve\">\n    <value>Som</value>\n  </data>\n  <data name=\"CreateSecretChat\" xml:space=\"preserve\">\n    <value>Iniciar Chat Secreto</value>\n  </data>\n  <data name=\"MessageNotifications\" xml:space=\"preserve\">\n    <value>Avisos sobre mensagens</value>\n  </data>\n  <data name=\"ChatNotifications\" xml:space=\"preserve\">\n    <value>Notificações sobre conversas</value>\n  </data>\n  <data name=\"NotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Silenciar, preview de mensagens, conversas</value>\n  </data>\n  <data name=\"Support\" xml:space=\"preserve\">\n    <value>Suporte</value>\n  </data>\n  <data name=\"AskAQuestion\" xml:space=\"preserve\">\n    <value>Fazer uma Pergunta</value>\n  </data>\n  <data name=\"InAppNotifications\" xml:space=\"preserve\">\n    <value>Notificações dentro do aplicativo</value>\n  </data>\n  <data name=\"OnPlural\" xml:space=\"preserve\">\n    <value>Ligados</value>\n  </data>\n  <data name=\"OffPlural\" xml:space=\"preserve\">\n    <value>Desligados</value>\n  </data>\n  <data name=\"OnFeminine\" xml:space=\"preserve\">\n    <value>Ligado</value>\n  </data>\n  <data name=\"OffFeminine\" xml:space=\"preserve\">\n    <value>Desligado</value>\n  </data>\n  <data name=\"InAppSounds\" xml:space=\"preserve\">\n    <value>Alertas sonoros dentro do aplicativo</value>\n  </data>\n  <data name=\"InAppVibrate\" xml:space=\"preserve\">\n    <value>Alertas vibratórios dentro do aplicativo</value>\n  </data>\n  <data name=\"InAppPreview\" xml:space=\"preserve\">\n    <value>Exibir notificações dentro do aplicativo</value>\n  </data>\n  <data name=\"ResetAllNotifications\" xml:space=\"preserve\">\n    <value>Reajustar todas as notificações</value>\n  </data>\n  <data name=\"ResetAllNotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Desfazer todas as personalizações para todos contatos e grupos</value>\n  </data>\n  <data name=\"OnMasculine\" xml:space=\"preserve\">\n    <value>Ligado</value>\n  </data>\n  <data name=\"OffMasculine\" xml:space=\"preserve\">\n    <value>Desligado</value>\n  </data>\n  <data name=\"GroupNotifications\" xml:space=\"preserve\">\n    <value>Notificações de grupos</value>\n  </data>\n  <data name=\"Alert\" xml:space=\"preserve\">\n    <value>Alerta</value>\n  </data>\n  <data name=\"MessagePreview\" xml:space=\"preserve\">\n    <value>Exibir as mensagens nas notificações</value>\n  </data>\n  <data name=\"SaveIncomingPhotos\" xml:space=\"preserve\">\n    <value>Salvar imagens recebidas</value>\n  </data>\n  <data name=\"Create\" xml:space=\"preserve\">\n    <value>Criar</value>\n  </data>\n  <data name=\"Share\" xml:space=\"preserve\">\n    <value>Compartilhar</value>\n  </data>\n  <data name=\"Edit\" xml:space=\"preserve\">\n    <value>Editar</value>\n  </data>\n  <data name=\"CompanyNominativeSingular\" xml:space=\"preserve\">\n    <value>Membro</value>\n  </data>\n  <data name=\"CompanyNominativePlural\" xml:space=\"preserve\">\n    <value>Membros</value>\n  </data>\n  <data name=\"PictureAccusative\" xml:space=\"preserve\">\n    <value>Imagem</value>\n  </data>\n  <data name=\"ContactAccusative\" xml:space=\"preserve\">\n    <value>Contato</value>\n  </data>\n  <data name=\"DocumentAccusative\" xml:space=\"preserve\">\n    <value>Arquivo</value>\n  </data>\n  <data name=\"AttachCaption\" xml:space=\"preserve\">\n    <value>Anexar algo</value>\n  </data>\n  <data name=\"LocationAccusative\" xml:space=\"preserve\">\n    <value>Localização</value>\n  </data>\n  <data name=\"VideoAccusative\" xml:space=\"preserve\">\n    <value>Vídeo</value>\n  </data>\n  <data name=\"NoMediaHere\" xml:space=\"preserve\">\n    <value>Nenhuma mídia aqui</value>\n  </data>\n  <data name=\"ChooseAnItem\" xml:space=\"preserve\">\n    <value>Escolher um item</value>\n  </data>\n  <data name=\"NoUsersHere\" xml:space=\"preserve\">\n    <value>Nenhum usuário aqui</value>\n  </data>\n  <data name=\"NoContactsHere\" xml:space=\"preserve\">\n    <value>Sem contatos aqui</value>\n  </data>\n  <data name=\"Title\" xml:space=\"preserve\">\n    <value>Título</value>\n  </data>\n  <data name=\"Done\" xml:space=\"preserve\">\n    <value>Feito</value>\n  </data>\n  <data name=\"AddParticipant\" xml:space=\"preserve\">\n    <value>Adicionar membro</value>\n  </data>\n  <data name=\"DeleteAndExitGroup\" xml:space=\"preserve\">\n    <value>Apagar e Sair do Grupo</value>\n  </data>\n  <data name=\"MessageActionUserLeftGroup\" xml:space=\"preserve\">\n    <value>{0} deixou o grupo</value>\n  </data>\n  <data name=\"MessageUser\" xml:space=\"preserve\">\n    <value>Mensagem {0}</value>\n  </data>\n  <data name=\"ViewUser\" xml:space=\"preserve\">\n    <value>Ver {0}</value>\n  </data>\n  <data name=\"SearchAmongYourDialogsAndMessages\" xml:space=\"preserve\">\n    <value>Buscar chats e mensagens</value>\n  </data>\n  <data name=\"Messages\" xml:space=\"preserve\">\n    <value>Mensagens</value>\n  </data>\n  <data name=\"NoMessagesHere\" xml:space=\"preserve\">\n    <value>Nenhuma mensagem aqui</value>\n  </data>\n  <data name=\"NoResults\" xml:space=\"preserve\">\n    <value>Sem resultados</value>\n  </data>\n  <data name=\"Conversations\" xml:space=\"preserve\">\n    <value>Chats</value>\n  </data>\n  <data name=\"EditName\" xml:space=\"preserve\">\n    <value>Editar Nome</value>\n  </data>\n  <data name=\"Save\" xml:space=\"preserve\">\n    <value>Salvar</value>\n  </data>\n  <data name=\"About\" xml:space=\"preserve\">\n    <value>Sobre</value>\n  </data>\n  <data name=\"Version\" xml:space=\"preserve\">\n    <value>Versão</value>\n  </data>\n  <data name=\"YourPhone\" xml:space=\"preserve\">\n    <value>Seu telefone</value>\n  </data>\n  <data name=\"SignInMessage\" xml:space=\"preserve\">\n    <value>Por favor, confirme o código de seu país e preencha seu número de telefone com código de área.</value>\n  </data>\n  <data name=\"Your phone number\" xml:space=\"preserve\">\n    <value>Seu número de telefone</value>\n  </data>\n  <data name=\"Next\" xml:space=\"preserve\">\n    <value>Seguinte</value>\n  </data>\n  <data name=\"Country\" xml:space=\"preserve\">\n    <value>País</value>\n  </data>\n  <data name=\"YourCode\" xml:space=\"preserve\">\n    <value>Seu código</value>\n  </data>\n  <data name=\"ConfirmMessage\" xml:space=\"preserve\">\n    <value>Enviamos uma SMS com um código de ativação para o seu telefone **{0}**</value>\n  </data>\n  <data name=\"WeWillCallYou\" xml:space=\"preserve\">\n    <value>Vamos ligar em {0}</value>\n  </data>\n  <data name=\"Code\" xml:space=\"preserve\">\n    <value>Código</value>\n  </data>\n  <data name=\"FirstName\" xml:space=\"preserve\">\n    <value>Primeiro nome</value>\n  </data>\n  <data name=\"LastName\" xml:space=\"preserve\">\n    <value>Sobrenome (opcional)</value>\n  </data>\n  <data name=\"YourName\" xml:space=\"preserve\">\n    <value>Seu nome</value>\n  </data>\n  <data name=\"SignUpMessage\" xml:space=\"preserve\">\n    <value>Preencha seu nome e adicione uma foto de perfil.</value>\n  </data>\n  <data name=\"AddPhoto\" xml:space=\"preserve\">\n    <value>Adiconar foto</value>\n  </data>\n  <data name=\"NoDialogsHere\" xml:space=\"preserve\">\n    <value>Ainda não há conversas</value>\n  </data>\n  <data name=\"StartMessaging\" xml:space=\"preserve\">\n    <value>Começar a conversar</value>\n  </data>\n  <data name=\"Intro1Message\" xml:space=\"preserve\">\n    <value>Bem-vindo ao **Telegram** ―\no mais rápido aplicativo de mensagens do mundo.\nÉ livre e seguro.</value>\n  </data>\n  <data name=\"Fast\" xml:space=\"preserve\">\n    <value>Rápido</value>\n  </data>\n  <data name=\"FastMessage\" xml:space=\"preserve\">\n    <value>**Telegram** entrega mensagens mais rápido\nque qualquer outro aplicativo.</value>\n  </data>\n  <data name=\"Free\" xml:space=\"preserve\">\n    <value>Gratuito</value>\n  </data>\n  <data name=\"FreeMessage\" xml:space=\"preserve\">\n    <value>**Telegram** é grátis para sempre.\nSem anúncios. Sem taxas.</value>\n  </data>\n  <data name=\"Powerful\" xml:space=\"preserve\">\n    <value>Poderoso</value>\n  </data>\n  <data name=\"PowerfulMessage\" xml:space=\"preserve\">\n    <value>**Telegram** não tem limites de tamanho\npara suas conversas e mídias</value>\n  </data>\n  <data name=\"Secure\" xml:space=\"preserve\">\n    <value>Seguro</value>\n  </data>\n  <data name=\"SecureMessage\" xml:space=\"preserve\">\n    <value>**Telegram** mantém suas mensagens\nseguras contra ataques de hackers</value>\n  </data>\n  <data name=\"CloudBased\" xml:space=\"preserve\">\n    <value>Baseado na nuvem</value>\n  </data>\n  <data name=\"CloudBasedMessage\" xml:space=\"preserve\">\n    <value>**Telegram** permite acessar suas\nmensagens de vários dispositivos</value>\n  </data>\n  <data name=\"TelegramDialedYourNumber\" xml:space=\"preserve\">\n    <value>O Telegram discou seu número</value>\n  </data>\n  <data name=\"Subject\" xml:space=\"preserve\">\n    <value>Assunto</value>\n  </data>\n  <data name=\"Members\" xml:space=\"preserve\">\n    <value>Membros</value>\n  </data>\n  <data name=\"YourPhoneNumber\" xml:space=\"preserve\">\n    <value>Seu número de telefone</value>\n  </data>\n  <data name=\"From\" xml:space=\"preserve\">\n    <value>De</value>\n  </data>\n  <data name=\"You\" xml:space=\"preserve\">\n    <value>Você</value>\n  </data>\n  <data name=\"YouWhereKickedFromTheGroup\" xml:space=\"preserve\">\n    <value>Você foi removido do grupo</value>\n  </data>\n  <data name=\"SavePhotoMessage\" xml:space=\"preserve\">\n    <value>A foto foi salva com sucesso</value>\n  </data>\n  <data name=\"SharedContact\" xml:space=\"preserve\">\n    <value>Contato compartilhado</value>\n  </data>\n  <data name=\"AllContacts\" xml:space=\"preserve\">\n    <value>Todos os contatos</value>\n  </data>\n  <data name=\"Document\" xml:space=\"preserve\">\n    <value>Arquivo</value>\n  </data>\n  <data name=\"InviteFriends\" xml:space=\"preserve\">\n    <value>Convidar amigos</value>\n  </data>\n  <data name=\"MyLocation\" xml:space=\"preserve\">\n    <value>Minha localização</value>\n  </data>\n  <data name=\"Satellite\" xml:space=\"preserve\">\n    <value>Satélite</value>\n  </data>\n  <data name=\"Hybrid\" xml:space=\"preserve\">\n    <value>Híbrido</value>\n  </data>\n  <data name=\"SwitchMode\" xml:space=\"preserve\">\n    <value>Trocar de modo</value>\n  </data>\n  <data name=\"DistanceAway\" xml:space=\"preserve\">\n    <value>{0} distante</value>\n  </data>\n  <data name=\"MetersShort\" xml:space=\"preserve\">\n    <value>m</value>\n  </data>\n  <data name=\"KilometersShort\" xml:space=\"preserve\">\n    <value>km</value>\n  </data>\n  <data name=\"ShareLocation\" xml:space=\"preserve\">\n    <value>Compartilhar localização</value>\n  </data>\n  <data name=\"Emoji\" xml:space=\"preserve\">\n    <value>Emoticon</value>\n  </data>\n  <data name=\"LogOutConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que desejar sair?\nSaiba que você pode usar o Telegram em vários dispositivos de uma vez.\nLembre-se, sair apaga todos os seus Chats Secretos.</value>\n  </data>\n  <data name=\"GotAQuestionAboutTelegram\" xml:space=\"preserve\">\n    <value>Tem uma pergunta sobre o Telegram?</value>\n  </data>\n  <data name=\"InviteFriendMessage\" xml:space=\"preserve\">\n    <value>Ei, vamos mudar para o Telegram http://telegram.org/dl</value>\n  </data>\n  <data name=\"ResetAllNotificationsMessage\" xml:space=\"preserve\">\n    <value>Reajustar todas as notificações?</value>\n  </data>\n  <data name=\"AreTyping\" xml:space=\"preserve\">\n    <value>Está digitando</value>\n  </data>\n  <data name=\"ClearHistory\" xml:space=\"preserve\">\n    <value>Limpar histórico</value>\n  </data>\n  <data name=\"DeleteAndExit\" xml:space=\"preserve\">\n    <value>Apagar e sair</value>\n  </data>\n  <data name=\"DeleteHistoryAndExitGroupMessage\" xml:space=\"preserve\">\n    <value>Apagar histórico e sair do grupo?</value>\n  </data>\n  <data name=\"NoUsers\" xml:space=\"preserve\">\n    <value>Nenhum</value>\n  </data>\n  <data name=\"UserNominativeSingular\" xml:space=\"preserve\">\n    <value>Usuário</value>\n  </data>\n  <data name=\"UserNominativePlural\" xml:space=\"preserve\">\n    <value>Usuários</value>\n  </data>\n  <data name=\"UserGenitiveSingular\" xml:space=\"preserve\">\n    <value>Usuário</value>\n  </data>\n  <data name=\"UserGenitivePlural\" xml:space=\"preserve\">\n    <value>Usuários</value>\n  </data>\n  <data name=\"PleaseGoToChatToForwardMessage\" xml:space=\"preserve\">\n    <value>Por favor, vá para a conversa para encaminhar a mensagem</value>\n  </data>\n  <data name=\"Info\" xml:space=\"preserve\">\n    <value>Informações</value>\n  </data>\n  <data name=\"ForwardeMessageToThisChat\" xml:space=\"preserve\">\n    <value>Encaminhar mensagem para essa conversa?</value>\n  </data>\n  <data name=\"TodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"RegularFormat\" xml:space=\"preserve\">\n    <value>d MMM</value>\n  </data>\n  <data name=\"LongRegularFormat\" xml:space=\"preserve\">\n    <value>d.MM.yyyy</value>\n  </data>\n  <data name=\"MessageTodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"MessageRegularFormat\" xml:space=\"preserve\">\n    <value>d MMM, {0}</value>\n  </data>\n  <data name=\"MessageLongRegularFormat\" xml:space=\"preserve\">\n    <value>yyyy d MMM, {0}</value>\n  </data>\n  <data name=\"UserStatusTimeFormat\" xml:space=\"preserve\">\n    <value>H:mm</value>\n  </data>\n  <data name=\"UserStatusDayFormat\" xml:space=\"preserve\">\n    <value>d MMM</value>\n  </data>\n  <data name=\"UserStatusYearDayFormat\" xml:space=\"preserve\">\n    <value>d MMM yyyy</value>\n  </data>\n  <data name=\"PhoneNumberInvalidString\" xml:space=\"preserve\">\n    <value>Número inválido. Por favor, tente de novo.</value>\n  </data>\n  <data name=\"Error\" xml:space=\"preserve\">\n    <value>Erro</value>\n  </data>\n  <data name=\"FloodWaitString\" xml:space=\"preserve\">\n    <value>Em fluxo controlado. Por favor, tende de novo mais tarde.</value>\n  </data>\n  <data name=\"PhoneCodeInvalidString\" xml:space=\"preserve\">\n    <value>Você informou um código inválido. Por favor, tente de novo.</value>\n  </data>\n  <data name=\"PhoneCodeExpiredString\" xml:space=\"preserve\">\n    <value>Código expirado. Por favor, tente de novo.</value>\n  </data>\n  <data name=\"PhoneCodeEmpty\" xml:space=\"preserve\">\n    <value>Código vazio. Por favor, tente de novo.</value>\n  </data>\n  <data name=\"FirstNameInvalidString\" xml:space=\"preserve\">\n    <value>Primeiro nome inválido. Por favor, tente de novo.</value>\n  </data>\n  <data name=\"LastNameInvalidString\" xml:space=\"preserve\">\n    <value>Sobrenome inválido. Por favor, tente de novo.</value>\n  </data>\n  <data name=\"Message\" xml:space=\"preserve\">\n    <value>Mensagem</value>\n  </data>\n  <data name=\"LockScreen\" xml:space=\"preserve\">\n    <value>Bloquear tela</value>\n  </data>\n  <data name=\"LockScreenSubtitle\" xml:space=\"preserve\">\n    <value>Configurar contador de mensagens</value>\n  </data>\n  <data name=\"ConfirmAgeMessage\" xml:space=\"preserve\">\n    <value>Ao tocar em OK, você declara ter ao menos 13 anos..</value>\n  </data>\n  <data name=\"ConfirmAgeTitle\" xml:space=\"preserve\">\n    <value>Confirme sua idade</value>\n  </data>\n  <data name=\"ConfirmPushMessage\" xml:space=\"preserve\">\n    <value>Você permite que esse aplicativo use avisos imediatos sobre novas mensagens?</value>\n  </data>\n  <data name=\"ConfirmPushTitle\" xml:space=\"preserve\">\n    <value>Confirmar avisos imediatos</value>\n  </data>\n  <data name=\"PrivacyStatement\" xml:space=\"preserve\">\n    <value>Declaração de privacidade</value>\n  </data>\n  <data name=\"PrivacyStatementText\" xml:space=\"preserve\">\n    <value>Esse aplicativo usa a sua localização atual para melhorar a experiência de mapeamento. Esses dados pode ser armazenados e compartilhados. Sua privacidade é importante para nós. Você pode desativar essas funcionalidade quando quiser.\n\nSe tiver perguntas, contate nosso</value>\n  </data>\n  <data name=\"VKGroup\" xml:space=\"preserve\">\n    <value>grupo</value>\n  </data>\n  <data name=\"LocationServices\" xml:space=\"preserve\">\n    <value>Serviços de localização</value>\n  </data>\n  <data name=\"AllowLocationServicesTitle\" xml:space=\"preserve\">\n    <value>Permitir acesso a localização?</value>\n  </data>\n  <data name=\"AllowLocationServiceText\" xml:space=\"preserve\">\n    <value>Permitir acesso a sua localização? Isso pode ser modificado depois nas configurações do aplicativo.</value>\n  </data>\n  <data name=\"AboutText1\" xml:space=\"preserve\">\n    <value>Telegram Messenger é um cliente para o Telegram focado em velocidade e segurança. É muito rápido, simples e gratuito.</value>\n  </data>\n  <data name=\"AboutText2\" xml:space=\"preserve\">\n    <value>Para suporte em tempo real, por favor, vá no menu configurações do Telegram e selecione \"Fazer uma pergunta\" para enviar uma mensagem diretamente para nossa equipe de suporte. Você também pode enviar um email para support@telegram.org.</value>\n  </data>\n  <data name=\"TapRecordToStartRecording\" xml:space=\"preserve\">\n    <value>Toque \"gravar\" para começar</value>\n  </data>\n  <data name=\"ACameraIsNotSupportedOnThisDevice\" xml:space=\"preserve\">\n    <value>Uma câmera não é suportada nesse dispositivo.</value>\n  </data>\n  <data name=\"ReadyToRecord\" xml:space=\"preserve\">\n    <value>Pronto para gravar.</value>\n  </data>\n  <data name=\"PressBackKeyToSendVideo\" xml:space=\"preserve\">\n    <value>Toque o botão de voltar para enviar o vídeo.</value>\n  </data>\n  <data name=\"PlaybackStarted\" xml:space=\"preserve\">\n    <value>Reprodução iniciada.</value>\n  </data>\n  <data name=\"PlaybackPaused\" xml:space=\"preserve\">\n    <value>Reprodução pausada.</value>\n  </data>\n  <data name=\"Recording\" xml:space=\"preserve\">\n    <value>Gravando...</value>\n  </data>\n  <data name=\"PreparingViewfinder\" xml:space=\"preserve\">\n    <value>Preparando câmera para capturar vídeo...</value>\n  </data>\n  <data name=\"PlaybackStoped\" xml:space=\"preserve\">\n    <value>Reprodução parada.</value>\n  </data>\n  <data name=\"Record\" xml:space=\"preserve\">\n    <value>Gravar</value>\n  </data>\n  <data name=\"Stop\" xml:space=\"preserve\">\n    <value>Parar</value>\n  </data>\n  <data name=\"Pause\" xml:space=\"preserve\">\n    <value>Pausar</value>\n  </data>\n  <data name=\"Play\" xml:space=\"preserve\">\n    <value>Reproduzir</value>\n  </data>\n  <data name=\"Review\" xml:space=\"preserve\">\n    <value>Avaliar</value>\n  </data>\n  <data name=\"PleaseEnterGroupSubject\" xml:space=\"preserve\">\n    <value>Por favor, informe o assunto do grupo</value>\n  </data>\n  <data name=\"PleaseChooseAtLeastOneParticipant\" xml:space=\"preserve\">\n    <value>Por favor, escolha ao menos um participante</value>\n  </data>\n  <data name=\"ForwardMessagesToThisChat\" xml:space=\"preserve\">\n    <value>Encaminhar mensagens para essa conversa?</value>\n  </data>\n  <data name=\"InvalidCountryCode\" xml:space=\"preserve\">\n    <value>Código de país inválido</value>\n  </data>\n  <data name=\"Typing\" xml:space=\"preserve\">\n    <value>Digitando</value>\n  </data>\n  <data name=\"MaximumMessageLengthExceeded\" xml:space=\"preserve\">\n    <value>Extensão máxima da mensagem excedida em {0} símbolos.</value>\n  </data>\n  <data name=\"Download\" xml:space=\"preserve\">\n    <value>Baixar</value>\n  </data>\n  <data name=\"Backgrounds\" xml:space=\"preserve\">\n    <value>Papéis de parede</value>\n  </data>\n  <data name=\"Static\" xml:space=\"preserve\">\n    <value>Estático</value>\n  </data>\n  <data name=\"Animated\" xml:space=\"preserve\">\n    <value>Animado</value>\n  </data>\n  <data name=\"Background\" xml:space=\"preserve\">\n    <value>Papel de parede</value>\n  </data>\n  <data name=\"ApplicationBackgroundSubtitle\" xml:space=\"preserve\">\n    <value>Selecionar plano de fundo para chats</value>\n  </data>\n  <data name=\"ApplicationBackground\" xml:space=\"preserve\">\n    <value>Plano de fundo</value>\n  </data>\n  <data name=\"DialogsBackground\" xml:space=\"preserve\">\n    <value>Papel de parede</value>\n  </data>\n  <data name=\"SpecialThanks\" xml:space=\"preserve\">\n    <value>Agradecimentos especiais</value>\n  </data>\n  <data name=\"SendMessageByEnter\" xml:space=\"preserve\">\n    <value>Enviar mensagens ao tocar Enter</value>\n  </data>\n  <data name=\"PleaseNoteThatAnimatedBackgroundConsumesMoreBatteryResources\" xml:space=\"preserve\">\n    <value>Por favor, note que papéis de parede animados consomem muito mais bateria.</value>\n  </data>\n  <data name=\"Please go to chat to forward message\" xml:space=\"preserve\">\n    <value>Por favor, para encaminhar a mensagem vá para a conversa</value>\n  </data>\n  <data name=\"SecretChatCaption\" xml:space=\"preserve\">\n    <value>Você convidou {0} para uma conversa secreta.</value>\n  </data>\n  <data name=\"SecretChat\" xml:space=\"preserve\">\n    <value>Conversa secreta</value>\n  </data>\n  <data name=\"UseEntToEndEncryption\" xml:space=\"preserve\">\n    <value>Usam criptografia de ponta a ponta</value>\n  </data>\n  <data name=\"LeaveNoTraceOnOurServers\" xml:space=\"preserve\">\n    <value>Não deixam rastros em nossos servidores</value>\n  </data>\n  <data name=\"HaveASelfDestructTimer\" xml:space=\"preserve\">\n    <value>têm um temporizador de autodestruição</value>\n  </data>\n  <data name=\"SecretChats\" xml:space=\"preserve\">\n    <value>Chats Secretos</value>\n  </data>\n  <data name=\"DoNotAllowForwarding\" xml:space=\"preserve\">\n    <value>não permitem encaminhamento</value>\n  </data>\n  <data name=\"WaitingForUserToGetOnline\" xml:space=\"preserve\">\n    <value>Aguardando que {0} se conecte</value>\n  </data>\n  <data name=\"SelfDestructTimer\" xml:space=\"preserve\">\n    <value>Temporizador de autodestruição</value>\n  </data>\n  <data name=\"EncryptionKey\" xml:space=\"preserve\">\n    <value>Chave de criptografia</value>\n  </data>\n  <data name=\"EncryptionKeyDescription1\" xml:space=\"preserve\">\n    <value>Essa imagem é uma visualização da chave de criptografia para essa conversa secreta com {0}.</value>\n  </data>\n  <data name=\"EncryptionKeyDescription2\" xml:space=\"preserve\">\n    <value>Se essa imagem parece a mesma no telefone de {0}, essa conversa é 200% segura.</value>\n  </data>\n  <data name=\"LearnMoreAt\" xml:space=\"preserve\">\n    <value>Saiba mais em </value>\n  </data>\n  <data name=\"TelegramWebsite\" xml:space=\"preserve\">\n    <value>Telegram.org</value>\n  </data>\n  <data name=\"LastSeenAtDate\" xml:space=\"preserve\">\n    <value>Visto em {0} às {1}</value>\n  </data>\n  <data name=\"LastSeenJustNow\" xml:space=\"preserve\">\n    <value>Visto agora mesmo</value>\n  </data>\n  <data name=\"SecretChatsDescription\" xml:space=\"preserve\">\n    <value>Conversas secretas:\n• Usam criptografia de ponta a ponta\n• Não deixam rastros em nossos servidores\n• Têm um temporizador de autodestruição\n• Não permitem encaminhamento</value>\n  </data>\n  <data name=\"Audio\" xml:space=\"preserve\">\n    <value>Audio</value>\n  </data>\n  <data name=\"IncognitoMode\" xml:space=\"preserve\">\n    <value>Modo incógnito</value>\n  </data>\n  <data name=\"TelegramNotifications\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"Invisible\" xml:space=\"preserve\">\n    <value>Invisible</value>\n  </data>\n  <data name=\"SecretChatDiscarded\" xml:space=\"preserve\">\n    <value>Conversa secreta descartada</value>\n  </data>\n  <data name=\"SecretChatCreated\" xml:space=\"preserve\">\n    <value>Conversa secreta criada</value>\n  </data>\n  <data name=\"EmptySecretChat\" xml:space=\"preserve\">\n    <value>Conversa secreta vazia</value>\n  </data>\n  <data name=\"MessageActionSetMessageTTL\" xml:space=\"preserve\">\n    <value>{0} configurou o temporizador de autodestruição para {1} </value>\n  </data>\n  <data name=\"MessageActionYouSetMessageTTL\" xml:space=\"preserve\">\n    <value>Você configurou o temporizador de autodestruição para {0}</value>\n  </data>\n  <data name=\"MessageActionDisableMessageTTL\" xml:space=\"preserve\">\n    <value>{0} desabilitou o temporizador de autodestruição</value>\n  </data>\n  <data name=\"MessageActionYouDisableMessageTTL\" xml:space=\"preserve\">\n    <value>Você desabilitou o temporizador de autodestruição</value>\n  </data>\n  <data name=\"PleaseWait\" xml:space=\"preserve\">\n    <value>Por favor, espere...</value>\n  </data>\n  <data name=\"SecretChatCaption2\" xml:space=\"preserve\">\n    <value>{0} te convidou para uma conversa secreta.</value>\n  </data>\n  <data name=\"YouJoinedTheSecretChat\" xml:space=\"preserve\">\n    <value>Você entrou no chat secreto</value>\n  </data>\n  <data name=\"UserJoinedYourSecretChat\" xml:space=\"preserve\">\n    <value>{0} entrou na conversa secreta.</value>\n  </data>\n  <data name=\"AddContact\" xml:space=\"preserve\">\n    <value>Adicionar</value>\n  </data>\n  <data name=\"DeleteContact\" xml:space=\"preserve\">\n    <value>Apagar</value>\n  </data>\n  <data name=\"ConfirmDeleteContact\" xml:space=\"preserve\">\n    <value>Delete contact?</value>\n  </data>\n  <data name=\"RegistrationProblemDescription\" xml:space=\"preserve\">\n    <value>Se você tiver problemas com o cadastro ou a autenticação, por favor, contacte-nos em </value>\n  </data>\n  <data name=\"RegistrationProblemEmail\" xml:space=\"preserve\">\n    <value>sms@telegram.org</value>\n  </data>\n  <data name=\"ChooseYourCountry\" xml:space=\"preserve\">\n    <value>Escolha seu país</value>\n  </data>\n  <data name=\"AskAVolunteer\" xml:space=\"preserve\">\n    <value>Pergunte a um voluntário</value>\n  </data>\n  <data name=\"PinToStart\" xml:space=\"preserve\">\n    <value>Fixar no Início</value>\n  </data>\n  <data name=\"TerminateAllSessions\" xml:space=\"preserve\">\n    <value>Encerrar Todas as Outras Sessões</value>\n  </data>\n  <data name=\"TerminateAllSessionsConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja terminar todas as outras sessões?</value>\n  </data>\n  <data name=\"SlideToCancel\" xml:space=\"preserve\">\n    <value>Cancelar</value>\n  </data>\n  <data name=\"Terminate\" xml:space=\"preserve\">\n    <value>Encerrado</value>\n  </data>\n  <data name=\"TapAndHoldToRecord\" xml:space=\"preserve\">\n    <value>Toque e segure para gravar</value>\n  </data>\n  <data name=\"NewBroadcastList\" xml:space=\"preserve\">\n    <value>Nova Lista de Transmissão</value>\n  </data>\n  <data name=\"AddUserToTheGroup\" xml:space=\"preserve\">\n    <value>Adicionar {0} ao grupo \"{1}\"?</value>\n  </data>\n  <data name=\"NumberOfForwardingMessages\" xml:space=\"preserve\">\n    <value>Número de mensagens antigas visíveis</value>\n  </data>\n  <data name=\"AddToContacts\" xml:space=\"preserve\">\n    <value>Adicionar aos contatos</value>\n  </data>\n  <data name=\"ShareMyContactInfo\" xml:space=\"preserve\">\n    <value>Compartilhar Meu Contato</value>\n  </data>\n  <data name=\"Cache\" xml:space=\"preserve\">\n    <value>Cache</value>\n  </data>\n  <data name=\"ClearCache\" xml:space=\"preserve\">\n    <value>Limpar Cache</value>\n  </data>\n  <data name=\"ManagingLocalCache\" xml:space=\"preserve\">\n    <value>Gerenciar cache local</value>\n  </data>\n  <data name=\"Calculating\" xml:space=\"preserve\">\n    <value>Calculando</value>\n  </data>\n  <data name=\"SaveFileMessage\" xml:space=\"preserve\">\n    <value>O arquivo foi salvo com sucesso</value>\n  </data>\n  <data name=\"SocialNetworks\" xml:space=\"preserve\">\n    <value>Redes sociais</value>\n  </data>\n  <data name=\"Sms\" xml:space=\"preserve\">\n    <value>Sms</value>\n  </data>\n  <data name=\"Email\" xml:space=\"preserve\">\n    <value>Email</value>\n  </data>\n  <data name=\"Set\" xml:space=\"preserve\">\n    <value>Aplicar</value>\n  </data>\n  <data name=\"SearchAmongYourContacts\" xml:space=\"preserve\">\n    <value>Buscar contatos</value>\n  </data>\n  <data name=\"Connecting\" xml:space=\"preserve\">\n    <value>Conectando</value>\n  </data>\n  <data name=\"SetProfilePhoto\" xml:space=\"preserve\">\n    <value>Definir Foto do Perfil</value>\n  </data>\n  <data name=\"BatterySaverModeAlert\" xml:space=\"preserve\">\n    <value>Seu aparelho está em modo de Economia de Energia. Você não receberá notificações do Telegram enquanto o modo de Economia de Energia estiver ativo. Por favor desabilite o modo de Economia de Energia.</value>\n  </data>\n  <data name=\"Warning\" xml:space=\"preserve\">\n    <value>Aviso</value>\n  </data>\n  <data name=\"NoInternetConnection\" xml:space=\"preserve\">\n    <value>Sem  conexão à Internet </value>\n  </data>\n  <data name=\"Updating\" xml:space=\"preserve\">\n    <value>Atualizando</value>\n  </data>\n  <data name=\"SetUsername\" xml:space=\"preserve\">\n    <value>Seu Nome de Usuário</value>\n  </data>\n  <data name=\"Username\" xml:space=\"preserve\">\n    <value>Nome de Usuário</value>\n  </data>\n  <data name=\"ServerError\" xml:space=\"preserve\">\n    <value>Erro no servidor</value>\n  </data>\n  <data name=\"ServerErrorMessage\" xml:space=\"preserve\">\n    <value>Ocorreu um erro no servidor. Por favor tente novamente mais tarde.</value>\n  </data>\n  <data name=\"UsernameDescription\" xml:space=\"preserve\">\n    <value>Você pode escolher um nome de usuário no Telegram. Assim, outras pessoas poderão te encontrar pelo nome de usuário e entrar em contato sem precisar saber seu telefone. Você pode usar a–z, 0–9 e underline. O tamanho mínimo é 5 caracteres.</value>\n  </data>\n  <data name=\"UsernameOccupied\" xml:space=\"preserve\">\n    <value>Desculpe, este usuário já existe.</value>\n  </data>\n  <data name=\"UsernameInvalid\" xml:space=\"preserve\">\n    <value>Desculpe, este usuário é inválido.</value>\n  </data>\n  <data name=\"WaitingForNetwork\" xml:space=\"preserve\">\n    <value>Aguardando rede</value>\n  </data>\n  <data name=\"GlobalSearch\" xml:space=\"preserve\">\n    <value>Busca global</value>\n  </data>\n  <data name=\"UsernameShort\" xml:space=\"preserve\">\n    <value>O nome de usuário deve ter pelo menos 5 caracteres.</value>\n  </data>\n  <data name=\"UsernameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Desculpe, o nome de usuário não pode começar com um número.</value>\n  </data>\n  <data name=\"SelectChat\" xml:space=\"preserve\">\n    <value>Selecione o Chat</value>\n  </data>\n  <data name=\"MaximumFileSizeExceeded\" xml:space=\"preserve\">\n    <value>Tamanho máximo excedido. Você pode enviar arquivos de até {0}.</value>\n  </data>\n  <data name=\"UnableToAccessDocument\" xml:space=\"preserve\">\n    <value>Documento inacessível. Por favor escolha outro arquivo para enviar.</value>\n  </data>\n  <data name=\"Camcorder\" xml:space=\"preserve\">\n    <value>Câmera</value>\n  </data>\n  <data name=\"CompressVideo\" xml:space=\"preserve\">\n    <value>Comprimir vídeo</value>\n  </data>\n  <data name=\"EditedVideo\" xml:space=\"preserve\">\n    <value>Vídeo editado</value>\n  </data>\n  <data name=\"EditVideo\" xml:space=\"preserve\">\n    <value>Editar vídeo</value>\n  </data>\n  <data name=\"OriginalVideo\" xml:space=\"preserve\">\n    <value>Vídeo original</value>\n  </data>\n  <data name=\"AccountSelfDestrucsDescription\" xml:space=\"preserve\">\n    <value>Se você não ficar online ao menos uma vez nesse período, sua conta será apagada junto com seus grupos, mensagens e contatos.</value>\n  </data>\n  <data name=\"AccountSelfDestructs\" xml:space=\"preserve\">\n    <value>Auto-destruição da Conta</value>\n  </data>\n  <data name=\"AddExceptions\" xml:space=\"preserve\">\n    <value>Adicionar exceções</value>\n  </data>\n  <data name=\"AlwaysShare\" xml:space=\"preserve\">\n    <value>Sempre Mostrar</value>\n  </data>\n  <data name=\"AlwaysShareWirhUsers\" xml:space=\"preserve\">\n    <value>Sempre compartilhar com usuários</value>\n  </data>\n  <data name=\"AlwaysShareWith\" xml:space=\"preserve\">\n    <value>Sempre Mostrar Para</value>\n  </data>\n  <data name=\"CodecWasNotFound\" xml:space=\"preserve\">\n    <value>Codec não encontrado</value>\n  </data>\n  <data name=\"Everybody\" xml:space=\"preserve\">\n    <value>Todos</value>\n  </data>\n  <data name=\"IfYouAreAwayFor\" xml:space=\"preserve\">\n    <value>Se você estiver ausente por</value>\n  </data>\n  <data name=\"LastSeenDescription\" xml:space=\"preserve\">\n    <value>Quem pode ver o seu Último Acesso?</value>\n  </data>\n  <data name=\"LastSeenImportantNote\" xml:space=\"preserve\">\n    <value>Importante: você não poderá ver o Último Acesso das pessoas com as quais você não compartilha o horário do seu Último Acesso. Serão mostrados tempos aproximados para o Último Acesso (recentemente, na última semana, no último mês). </value>\n  </data>\n  <data name=\"LastSeenLongTimeAgo\" xml:space=\"preserve\">\n    <value>Visto há muito tempo</value>\n  </data>\n  <data name=\"LastSeenRecently\" xml:space=\"preserve\">\n    <value>Visto recentemente</value>\n  </data>\n  <data name=\"LastSeenWithinMonth\" xml:space=\"preserve\">\n    <value>Visto no último mês</value>\n  </data>\n  <data name=\"LastSeenWithinWeek\" xml:space=\"preserve\">\n    <value>Visto na última semana</value>\n  </data>\n  <data name=\"MyContacts\" xml:space=\"preserve\">\n    <value>Meus Contatos</value>\n  </data>\n  <data name=\"NeverShare\" xml:space=\"preserve\">\n    <value>Nunca Mostrar</value>\n  </data>\n  <data name=\"NeverShareWith\" xml:space=\"preserve\">\n    <value>Nunca Mostrar Para</value>\n  </data>\n  <data name=\"NeverShareWithUsers\" xml:space=\"preserve\">\n    <value>Nunca compartilhar com usuários...</value>\n  </data>\n  <data name=\"Nobody\" xml:space=\"preserve\">\n    <value>Ninguém</value>\n  </data>\n  <data name=\"PrivacyAndSecurity\" xml:space=\"preserve\">\n    <value>Privacidade e Segurança</value>\n  </data>\n  <data name=\"PrivacySettingsError\" xml:space=\"preserve\">\n    <value>Desculpe, Impossível de mudar as configurações de privacidade agora, por favor espere.</value>\n  </data>\n  <data name=\"ProfileIsInvalid\" xml:space=\"preserve\">\n    <value>Perfil de codificação de vídeo inválido</value>\n  </data>\n  <data name=\"SettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Essas configurações sobrescreverão os valores acima. </value>\n  </data>\n  <data name=\"UnknownFailure\" xml:space=\"preserve\">\n    <value>Erro desconhecido</value>\n  </data>\n  <data name=\"LastSeenShort\" xml:space=\"preserve\">\n    <value>Último Acesso</value>\n  </data>\n  <data name=\"PrivacySecuritySubtitle\" xml:space=\"preserve\">\n    <value>Usuários bloqueados, visto por último, encerrar sessões</value>\n  </data>\n  <data name=\"MonthGenitivePlural\" xml:space=\"preserve\">\n    <value>Meses</value>\n  </data>\n  <data name=\"MonthGenitiveSingular\" xml:space=\"preserve\">\n    <value>Mês</value>\n  </data>\n  <data name=\"MonthNominativePlural\" xml:space=\"preserve\">\n    <value>Meses</value>\n  </data>\n  <data name=\"MonthNominativeSingular\" xml:space=\"preserve\">\n    <value>Mês</value>\n  </data>\n  <data name=\"YearGenitivePlural\" xml:space=\"preserve\">\n    <value>Anos</value>\n  </data>\n  <data name=\"YearGenitiveSingular\" xml:space=\"preserve\">\n    <value>Ano</value>\n  </data>\n  <data name=\"YearNominativePlural\" xml:space=\"preserve\">\n    <value>Anos</value>\n  </data>\n  <data name=\"YearNominativeSingular\" xml:space=\"preserve\">\n    <value>Ano</value>\n  </data>\n  <data name=\"LastSeenDescription2\" xml:space=\"preserve\">\n    <value>Quem pode ver o seu Último Acesso?</value>\n  </data>\n  <data name=\"CheckingUsername\" xml:space=\"preserve\">\n    <value>Verificando nome de usuário...</value>\n  </data>\n  <data name=\"CantFindContactWithUsername\" xml:space=\"preserve\">\n    <value>Desculpe, não foi encontrado um usuário do Telegram com o nome de usuário @{0}</value>\n  </data>\n  <data name=\"Compressing\" xml:space=\"preserve\">\n    <value>Compactando</value>\n  </data>\n  <data name=\"PeopleHubIntegration\" xml:space=\"preserve\">\n    <value>Sincronizando com o Hub Pessoas</value>\n  </data>\n  <data name=\"SyncContactsProgress\" xml:space=\"preserve\">\n    <value>Sincronizando contatos ({0} of {1})...</value>\n  </data>\n  <data name=\"DeletingContacts\" xml:space=\"preserve\">\n    <value>Deletando contatos...</value>\n  </data>\n  <data name=\"ChangeNumber\" xml:space=\"preserve\">\n    <value>Trocar número</value>\n  </data>\n  <data name=\"ConfirmNewNumberMessage\" xml:space=\"preserve\">\n    <value>Vamos enviar uma SMS com um código de confirmação para o seu novo número.</value>\n  </data>\n  <data name=\"NewNumber\" xml:space=\"preserve\">\n    <value>Novo número</value>\n  </data>\n  <data name=\"NewNumberConfirmation\" xml:space=\"preserve\">\n    <value>todos os contatos do Telegram terão seu novo número adicionado às suas listas de contatos, desde que eles tenham seu antigo número e você não os tenha bloqueado no Telegram.</value>\n  </data>\n  <data name=\"NewNumberDescription\" xml:space=\"preserve\">\n    <value>Você pode trocar seu número do Telegram aqui. Sua conta e todos os seus dados — mensagens, mídia, contatos, etc. serão movidos para o novo número.\n\nImportante: todos os contatos do Telegram terá seu novo número adicionado às suas listas de contatos, desde que eles tenham seu antigo número e você não os tenha bloqueado no Telegram.</value>\n  </data>\n  <data name=\"NewNumberTaken\" xml:space=\"preserve\">\n    <value>O número {0} já possui uma conta do Telegram. Por favor, delete esta conta antes de migrar para o novo número.</value>\n  </data>\n  <data name=\"MessageActionScreenshotMessages\" xml:space=\"preserve\">\n    <value>{0} salvou a tela!</value>\n  </data>\n  <data name=\"MessageActionYouScreenshotMessages\" xml:space=\"preserve\">\n    <value>Você salvou a tela!</value>\n  </data>\n  <data name=\"DayGenitivePlural\" xml:space=\"preserve\">\n    <value>Dias</value>\n  </data>\n  <data name=\"DayGenitiveSingular\" xml:space=\"preserve\">\n    <value>Dia</value>\n  </data>\n  <data name=\"DayNominativePlural\" xml:space=\"preserve\">\n    <value>Dias</value>\n  </data>\n  <data name=\"DayNominativeSingular\" xml:space=\"preserve\">\n    <value>Dia</value>\n  </data>\n  <data name=\"HourGenitivePlural\" xml:space=\"preserve\">\n    <value>Horas</value>\n  </data>\n  <data name=\"HourGenitiveSingular\" xml:space=\"preserve\">\n    <value>Hora</value>\n  </data>\n  <data name=\"HourNominativePlural\" xml:space=\"preserve\">\n    <value>Horas</value>\n  </data>\n  <data name=\"HourNominativeSingular\" xml:space=\"preserve\">\n    <value>Hora</value>\n  </data>\n  <data name=\"MinuteNominativePlural\" xml:space=\"preserve\">\n    <value>Minutos</value>\n  </data>\n  <data name=\"MinuteNominativeSingular\" xml:space=\"preserve\">\n    <value>Minuto</value>\n  </data>\n  <data name=\"SecondGenitivePlural\" xml:space=\"preserve\">\n    <value>Segundos</value>\n  </data>\n  <data name=\"SecondGenitiveSingular\" xml:space=\"preserve\">\n    <value>Segundo</value>\n  </data>\n  <data name=\"SecondNominativePlural\" xml:space=\"preserve\">\n    <value>Segundos</value>\n  </data>\n  <data name=\"SecondNominativeSingular\" xml:space=\"preserve\">\n    <value>Segundo</value>\n  </data>\n  <data name=\"WeekGenitivePlural\" xml:space=\"preserve\">\n    <value>Semanas</value>\n  </data>\n  <data name=\"WeekGenitiveSingular\" xml:space=\"preserve\">\n    <value>Semana</value>\n  </data>\n  <data name=\"WeekNominativePlural\" xml:space=\"preserve\">\n    <value>Semanas</value>\n  </data>\n  <data name=\"WeekNominativeSingular\" xml:space=\"preserve\">\n    <value>Semana</value>\n  </data>\n  <data name=\"TapAndHoldToView\" xml:space=\"preserve\">\n    <value>Toque e segure para ver</value>\n  </data>\n  <data name=\"Sticker\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"Files\" xml:space=\"preserve\">\n    <value>Arquivos</value>\n  </data>\n  <data name=\"NoFilesHere\" xml:space=\"preserve\">\n    <value>Nenhum arquivo aqui</value>\n  </data>\n  <data name=\"ShareFiles\" xml:space=\"preserve\">\n    <value>Você pode enviar e receber arquivos de todos os tipos até 1.5 GB e acessá-los de onde estiver.</value>\n  </data>\n  <data name=\"SharePhotosAndVideos\" xml:space=\"preserve\">\n    <value>Nenhum arquivo de mídia ainda.\n\nCompartilhe fotos e vídeos nesse chat — ou esse clipe de papel continuará infeliz.</value>\n  </data>\n  <data name=\"Disabled\" xml:space=\"preserve\">\n    <value>Desativado</value>\n  </data>\n  <data name=\"Enabled\" xml:space=\"preserve\">\n    <value>Ativado</value>\n  </data>\n  <data name=\"MuteFor\" xml:space=\"preserve\">\n    <value>Silenciar por {0}</value>\n  </data>\n  <data name=\"UnmuteIn\" xml:space=\"preserve\">\n    <value>Em {0}</value>\n  </data>\n  <data name=\"More\" xml:space=\"preserve\">\n    <value>Mais</value>\n  </data>\n  <data name=\"SearchAmongYourChats\" xml:space=\"preserve\">\n    <value>Buscar nos seus chats</value>\n  </data>\n  <data name=\"SearchAmongYourFiles\" xml:space=\"preserve\">\n    <value>Buscar arquivos compartilhados</value>\n  </data>\n  <data name=\"NewAuthorization\" xml:space=\"preserve\">\n    <value>{0},\nDetectamos um acesso à sua conta de um novo dispositivo em {1}, {2} em {3}\n\nDispositivo: {4} \nLocalização: {5} \n\nCaso não tenha sido você, vá em Configurações – Privacidade e Segurança – Encerrar todas as outras sessões. \n\nObrigado, Equipe Telegram</value>\n  </data>\n  <data name=\"Link\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"ContactRegistered\" xml:space=\"preserve\">\n    <value>{0} entrou para o Telegram</value>\n  </data>\n  <data name=\"UnreadMessages\" xml:space=\"preserve\">\n    <value>Mensagens não lidas</value>\n  </data>\n  <data name=\"ChangePasscode\" xml:space=\"preserve\">\n    <value>Alterar Senha</value>\n  </data>\n  <data name=\"ChangePasscodeHint\" xml:space=\"preserve\">\n    <value>Quando você definir uma senha adicional, um ícone de cadeado aparecerá na página de chats. Clique para bloquear e desbloquear o app.\n\nNota: se você esquecer a sua senha, terá de excluir e reinstalar o app. Todos os chats secretos serão perdidos.</value>\n  </data>\n  <data name=\"ConfirmPasscode\" xml:space=\"preserve\">\n    <value>Confirme a senha</value>\n  </data>\n  <data name=\"EnterPasscode\" xml:space=\"preserve\">\n    <value>Insira sua senha</value>\n  </data>\n  <data name=\"Passcode\" xml:space=\"preserve\">\n    <value>Senha de Bloqueio</value>\n  </data>\n  <data name=\"SimplePasscode\" xml:space=\"preserve\">\n    <value>Senha simples</value>\n  </data>\n  <data name=\"SimplePasscodeHint\" xml:space=\"preserve\">\n    <value>A senha simples é um número com 4 dígitos.</value>\n  </data>\n  <data name=\"YourPasscode\" xml:space=\"preserve\">\n    <value>Nova senha</value>\n  </data>\n  <data name=\"EnterYourCurrentPasscode\" xml:space=\"preserve\">\n    <value>Digite a sua senha atual do Telegram</value>\n  </data>\n  <data name=\"PasscodeType\" xml:space=\"preserve\">\n    <value>Tipo de senha</value>\n  </data>\n  <data name=\"Pin\" xml:space=\"preserve\">\n    <value>PIN</value>\n  </data>\n  <data name=\"Privacy\" xml:space=\"preserve\">\n    <value>Privacidade</value>\n  </data>\n  <data name=\"Security\" xml:space=\"preserve\">\n    <value>Segurança</value>\n  </data>\n  <data name=\"YouHaveNewMessage\" xml:space=\"preserve\">\n    <value>Você tem uma nova mensagem</value>\n  </data>\n  <data name=\"PasscodeAutolockHint\" xml:space=\"preserve\">\n    <value>Requisitar senha se estiver ausente por muito tempo.</value>\n  </data>\n  <data name=\"PasscodeAutolockIn\" xml:space=\"preserve\">\n    <value>Em {0}</value>\n  </data>\n  <data name=\"Autolock\" xml:space=\"preserve\">\n    <value>Auto-bloquear</value>\n  </data>\n  <data name=\"AutolockDisabled\" xml:space=\"preserve\">\n    <value>Desativado</value>\n  </data>\n  <data name=\"IncorrectPasscode\" xml:space=\"preserve\">\n    <value>Senha incorreta</value>\n  </data>\n  <data name=\"Reply\" xml:space=\"preserve\">\n    <value>Responder</value>\n  </data>\n  <data name=\"AndOthers\" xml:space=\"preserve\">\n    <value>E {0} outros</value>\n  </data>\n  <data name=\"ForwardedAudioGenitivePlural\" xml:space=\"preserve\">\n    <value>Áudios encaminhados</value>\n  </data>\n  <data name=\"ForwardedAudioGenitiveSingular\" xml:space=\"preserve\">\n    <value>Áudio encaminhado</value>\n  </data>\n  <data name=\"ForwardedAudioNominativePlural\" xml:space=\"preserve\">\n    <value>Áudios encaminhados</value>\n  </data>\n  <data name=\"ForwardedAudioNominativeSingular\" xml:space=\"preserve\">\n    <value>Áudio encaminhado</value>\n  </data>\n  <data name=\"ForwardedContactGenitivePlural\" xml:space=\"preserve\">\n    <value>Contatos encaminhados</value>\n  </data>\n  <data name=\"ForwardedContactGenitiveSingular\" xml:space=\"preserve\">\n    <value>Contato encaminhado</value>\n  </data>\n  <data name=\"ForwardedContactNominativePlural\" xml:space=\"preserve\">\n    <value>Contatos encaminhados</value>\n  </data>\n  <data name=\"ForwardedContactNominativeSingular\" xml:space=\"preserve\">\n    <value>Contato encaminhado</value>\n  </data>\n  <data name=\"ForwardedFileGenitivePlural\" xml:space=\"preserve\">\n    <value>Arquivos encaminhados</value>\n  </data>\n  <data name=\"ForwardedFileGenitiveSingular\" xml:space=\"preserve\">\n    <value>Arquivo encaminhado</value>\n  </data>\n  <data name=\"ForwardedFileNominativePlural\" xml:space=\"preserve\">\n    <value>Arquivos encaminhados</value>\n  </data>\n  <data name=\"ForwardedFileNominativeSingular\" xml:space=\"preserve\">\n    <value>Arquivo encaminhado</value>\n  </data>\n  <data name=\"ForwardedLocationGenitivePlural\" xml:space=\"preserve\">\n    <value>Localizações encaminhadas</value>\n  </data>\n  <data name=\"ForwardedLocationGenitiveSingular\" xml:space=\"preserve\">\n    <value>Localização encaminhada</value>\n  </data>\n  <data name=\"ForwardedLocationNominativePlural\" xml:space=\"preserve\">\n    <value>Localizações encaminhadas</value>\n  </data>\n  <data name=\"ForwardedLocationNominativeSingular\" xml:space=\"preserve\">\n    <value>Localização encaminhada</value>\n  </data>\n  <data name=\"ForwardedMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Mensagens encaminhadas</value>\n  </data>\n  <data name=\"ForwardedMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Mensagem encaminhada</value>\n  </data>\n  <data name=\"ForwardedMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Mensagens encaminhadas</value>\n  </data>\n  <data name=\"ForwardedMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Mensagem encaminhada</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Fotos encaminhadas</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Foto encaminhada</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Fotos encaminhadas</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Foto encaminhada</value>\n  </data>\n  <data name=\"ForwardedStickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Stickers encaminhados</value>\n  </data>\n  <data name=\"ForwardedStickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Sticker encaminhado</value>\n  </data>\n  <data name=\"ForwardedStickerNominativePlural\" xml:space=\"preserve\">\n    <value>Stickers encaminhados</value>\n  </data>\n  <data name=\"ForwardedStickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Sticker encaminhado</value>\n  </data>\n  <data name=\"ForwardedVideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Vídeos encaminhados</value>\n  </data>\n  <data name=\"ForwardedVideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Vídeo encaminhado</value>\n  </data>\n  <data name=\"ForwardedVideoNominativePlural\" xml:space=\"preserve\">\n    <value>Vídeos encaminhados</value>\n  </data>\n  <data name=\"ForwardedVideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Vídeo encaminhado</value>\n  </data>\n  <data name=\"SearchMessages\" xml:space=\"preserve\">\n    <value>Buscar mensagens</value>\n  </data>\n  <data name=\"Unsupported\" xml:space=\"preserve\">\n    <value>Não suportado</value>\n  </data>\n  <data name=\"EnterYourCurrentPassword\" xml:space=\"preserve\">\n    <value>Insira sua senha atual</value>\n  </data>\n  <data name=\"Password\" xml:space=\"preserve\">\n    <value>Senha</value>\n  </data>\n  <data name=\"PasswordInvalidString\" xml:space=\"preserve\">\n    <value>Senha inválida. Por favor tente novamente.</value>\n  </data>\n  <data name=\"AlmostThere\" xml:space=\"preserve\">\n    <value>Quase lá!</value>\n  </data>\n  <data name=\"ChangePassword\" xml:space=\"preserve\">\n    <value>Alterar senha</value>\n  </data>\n  <data name=\"ChangePasswordHint\" xml:space=\"preserve\">\n    <value>Você pode configurar uma senha que será requisitada quando você entrar em um novo aparelho, além do código que você receberá por SMS. </value>\n  </data>\n  <data name=\"ChangeRecoveryEmail\" xml:space=\"preserve\">\n    <value>Alterar e-mail de recuperação</value>\n  </data>\n  <data name=\"CompletePasswordHint\" xml:space=\"preserve\">\n    <value>Por favor, verifique o seu e-mail (não esqueça da pasta spam) para completar a configuração da verificação em duas etapas.</value>\n  </data>\n  <data name=\"ConfirmPassword\" xml:space=\"preserve\">\n    <value>Insira sua senha novamente</value>\n  </data>\n  <data name=\"EnterPassword\" xml:space=\"preserve\">\n    <value>Insira sua senha</value>\n  </data>\n  <data name=\"EnterRecoveryEmail\" xml:space=\"preserve\">\n    <value>Insira seu e-maill</value>\n  </data>\n  <data name=\"EnterRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>Por favor, adicione um e-mail válido. Essa é a única forma de recuperar uma senha esquecida.</value>\n  </data>\n  <data name=\"RecoveryEmail\" xml:space=\"preserve\">\n    <value>E-mail de recuperação</value>\n  </data>\n  <data name=\"SetRecoveryEmail\" xml:space=\"preserve\">\n    <value>Definir e-mail de recuperação</value>\n  </data>\n  <data name=\"Skip\" xml:space=\"preserve\">\n    <value>Pular</value>\n  </data>\n  <data name=\"SkipRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>É sério!\n\nSe você esquecer a sua senha, você perderá o acesso a sua conta do Telegram. Não há nenhuma forma de recuperá-la.</value>\n  </data>\n  <data name=\"TwoStepVerification\" xml:space=\"preserve\">\n    <value>Verificação em Duas Etapas</value>\n  </data>\n  <data name=\"YourPassword\" xml:space=\"preserve\">\n    <value>Sua senha</value>\n  </data>\n  <data name=\"CurrentSession\" xml:space=\"preserve\">\n    <value>Sessão Atual</value>\n  </data>\n  <data name=\"OtherSessions\" xml:space=\"preserve\">\n    <value>Outras Sessões</value>\n  </data>\n  <data name=\"OfficialApp\" xml:space=\"preserve\">\n    <value>App oficial</value>\n  </data>\n  <data name=\"Sessions\" xml:space=\"preserve\">\n    <value>Sessões Ativas</value>\n  </data>\n  <data name=\"TerminateAllOtherSessionsNote\" xml:space=\"preserve\">\n    <value>Sair de todos os dispositivos exceto este</value>\n  </data>\n  <data name=\"UnofficialApp\" xml:space=\"preserve\">\n    <value>App não-oficial</value>\n  </data>\n  <data name=\"EmailInvalid\" xml:space=\"preserve\">\n    <value>E-mail inválido</value>\n  </data>\n  <data name=\"PasswordActive\" xml:space=\"preserve\">\n    <value>A sua senha para a verificação em duas etapas foi ativada.</value>\n  </data>\n  <data name=\"Success\" xml:space=\"preserve\">\n    <value>Sucesso!</value>\n  </data>\n  <data name=\"RecoveryEmailPending\" xml:space=\"preserve\">\n    <value>O seu e-mail de recuperação {0} ainda não está ativo e aguarda confirmação.</value>\n  </data>\n  <data name=\"AbortTwoStepVerificationSetup\" xml:space=\"preserve\">\n    <value>Cancelar a configuração da verificação em duas etapas</value>\n  </data>\n  <data name=\"StepsToCompleteToTwoStepsVerificationSetup\" xml:space=\"preserve\">\n    <value>Por favor, siga os seguintes passos para completar a configuração da verificação em duas etapas:\n\n1. Verifique seu e-mail (não esqueça da pasta spam) {0}\n\n2. Clique no link de validação.</value>\n  </data>\n  <data name=\"Hint\" xml:space=\"preserve\">\n    <value>Dica</value>\n  </data>\n  <data name=\"PasswordHint\" xml:space=\"preserve\">\n    <value>Dica de senha</value>\n  </data>\n  <data name=\"PasswordHintLabel\" xml:space=\"preserve\">\n    <value>Por favor, crie uma dica para a sua senha</value>\n  </data>\n  <data name=\"ForgotPassword\" xml:space=\"preserve\">\n    <value>Esqueceu sua senha?</value>\n  </data>\n  <data name=\"PasswordHintError\" xml:space=\"preserve\">\n    <value>A dica deve ser diferente da sua senha</value>\n  </data>\n  <data name=\"EnterPasswordHint\" xml:space=\"preserve\">\n    <value>Insira sua dica de senha</value>\n  </data>\n  <data name=\"HavingTroubleAccessingEmailMessage\" xml:space=\"preserve\">\n    <value>Está tendo problemas para acessar seu e-mail {0}?</value>\n  </data>\n  <data name=\"NoAccessRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Se você não puder acessar o seu e-mail, as suas únicas opções são são lembrar a senha ou limpar a sua conta.</value>\n  </data>\n  <data name=\"NoRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Como você não indicou um e-mail de recuperação quando configurou a sua senha, as únicas opções restantes são lembrar a senha ou apagar a sua conta.</value>\n  </data>\n  <data name=\"PasswordDeactivated\" xml:space=\"preserve\">\n    <value>Senha desativada</value>\n  </data>\n  <data name=\"PasswordMessage\" xml:space=\"preserve\">\n    <value>Você habilitou a verificação em duas etapas, a sua conta está protegida com uma senha adicional.</value>\n  </data>\n  <data name=\"PasswordRecovery\" xml:space=\"preserve\">\n    <value>Recuperação de senha</value>\n  </data>\n  <data name=\"PasswordRecoveryHint\" xml:space=\"preserve\">\n    <value>Por favor, verifique o seu e-mail e digite aqui o código de 6 dígitos recebido.</value>\n  </data>\n  <data name=\"SentRecoveryCodeMessage\" xml:space=\"preserve\">\n    <value>O código de recuperação foi enviado para o e-mail fornecido: {0}</value>\n  </data>\n  <data name=\"Sorry\" xml:space=\"preserve\">\n    <value>Desculpe</value>\n  </data>\n  <data name=\"RecoveryEmailComplete\" xml:space=\"preserve\">\n    <value>Você habilitou a verificação em duas etapas.\nSerá preciso a senha definida aqui para entrar em sua conta do Telegram.</value>\n  </data>\n  <data name=\"TerminateSessionHint\" xml:space=\"preserve\">\n    <value>Toque em uma sessão para encerrá-la.</value>\n  </data>\n  <data name=\"GettingLinkInfo\" xml:space=\"preserve\">\n    <value>Obtendo informações...</value>\n  </data>\n  <data name=\"ResetMyAccount\" xml:space=\"preserve\">\n    <value>Apagar conta</value>\n  </data>\n  <data name=\"ResetMyAccountConfirmation\" xml:space=\"preserve\">\n    <value>Essa ação não pode ser desfeita.\n\nSe você apagar a sua conta, você perderá todos os seus chats e mensagens.</value>\n  </data>\n  <data name=\"ResetMyAccountHint\" xml:space=\"preserve\">\n    <value>Você perderá todos os seus chats e mensagens, assim como suas mídias e arquivos,\nse você prosseguir e apagar a sua conta.</value>\n  </data>\n  <data name=\"IsRecordingAudio\" xml:space=\"preserve\">\n    <value>está gravando áudio</value>\n  </data>\n  <data name=\"IsSendingFile\" xml:space=\"preserve\">\n    <value>está enviando arquivo</value>\n  </data>\n  <data name=\"IsSendingPhoto\" xml:space=\"preserve\">\n    <value>está enviando foto</value>\n  </data>\n  <data name=\"IsSendingVideo\" xml:space=\"preserve\">\n    <value>está enviando vídeo</value>\n  </data>\n  <data name=\"RecordingAudio\" xml:space=\"preserve\">\n    <value>Gravando áudio</value>\n  </data>\n  <data name=\"SendingFile\" xml:space=\"preserve\">\n    <value>Enviando arquivo</value>\n  </data>\n  <data name=\"SendingPhoto\" xml:space=\"preserve\">\n    <value>Enviando foto</value>\n  </data>\n  <data name=\"SendingVideo\" xml:space=\"preserve\">\n    <value>Enviando vídeo</value>\n  </data>\n  <data name=\"AddCaption\" xml:space=\"preserve\">\n    <value>Adicionar legenda...</value>\n  </data>\n  <data name=\"CopyLink\" xml:space=\"preserve\">\n    <value>Copiar link</value>\n  </data>\n  <data name=\"CopyLinkHint\" xml:space=\"preserve\">\n    <value>Link copiado para área de transferência</value>\n  </data>\n  <data name=\"GroupFullError\" xml:space=\"preserve\">\n    <value>Desculpe, este grupo está lotado.</value>\n  </data>\n  <data name=\"GroupNotExistsError\" xml:space=\"preserve\">\n    <value>Desculpe, esse chat não existe.</value>\n  </data>\n  <data name=\"InviteGroupViaLink\" xml:space=\"preserve\">\n    <value>Convidar ao Grupo via Link</value>\n  </data>\n  <data name=\"InviteLink\" xml:space=\"preserve\">\n    <value>Link de convite</value>\n  </data>\n  <data name=\"InviteLinkHint\" xml:space=\"preserve\">\n    <value>Qualquer um com Telegram instalado poderá entrar no seu grupo abrindo este link.</value>\n  </data>\n  <data name=\"JoinGroupConfirmation\" xml:space=\"preserve\">\n    <value>Você deseja entrar no grupo '{0}'?</value>\n  </data>\n  <data name=\"MessageActionChatJoinedByLink\" xml:space=\"preserve\">\n    <value>{0} entrou no grupo via link de convite</value>\n  </data>\n  <data name=\"RevokeLink\" xml:space=\"preserve\">\n    <value>Desativar link</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja desativar o link? Uma vez feito, ninguém conseguirá entrar no grupo usando-o.</value>\n  </data>\n  <data name=\"RevokeLinkHint\" xml:space=\"preserve\">\n    <value>Este link de convite está inativo. Um novo link foi gerado.</value>\n  </data>\n  <data name=\"ShareLink\" xml:space=\"preserve\">\n    <value>Compartilhar link</value>\n  </data>\n  <data name=\"Directions\" xml:space=\"preserve\">\n    <value>Direções</value>\n  </data>\n  <data name=\"NearbyPlaces\" xml:space=\"preserve\">\n    <value>Lugares perto</value>\n  </data>\n  <data name=\"SendThisLocation\" xml:space=\"preserve\">\n    <value>Enviar Minha Localização</value>\n  </data>\n  <data name=\"PoweredBy\" xml:space=\"preserve\">\n    <value>Distribuído por</value>\n  </data>\n  <data name=\"LocationServicesDisabled\" xml:space=\"preserve\">\n    <value>O serviço de localização do telefone está desativado.</value>\n  </data>\n  <data name=\"LocationSettings\" xml:space=\"preserve\">\n    <value>Configurações de Localização</value>\n  </data>\n  <data name=\"Unknown\" xml:space=\"preserve\">\n    <value>Desconhecido</value>\n  </data>\n  <data name=\"AddStickersConfirmation\" xml:space=\"preserve\">\n    <value>Você deseja adicionar aos stickers '{0}'?</value>\n  </data>\n  <data name=\"NewStickersAdded\" xml:space=\"preserve\">\n    <value>Novos stickers adicionados</value>\n  </data>\n  <data name=\"StickersNotFound\" xml:space=\"preserve\">\n    <value>Stickers não encontrados</value>\n  </data>\n  <data name=\"ClearLogs\" xml:space=\"preserve\">\n    <value>Limpar Logs</value>\n  </data>\n  <data name=\"Hide\" xml:space=\"preserve\">\n    <value>Esconder</value>\n  </data>\n  <data name=\"Remove\" xml:space=\"preserve\">\n    <value>Remover</value>\n  </data>\n  <data name=\"SendLogs\" xml:space=\"preserve\">\n    <value>Enviar Logs</value>\n  </data>\n  <data name=\"StickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Stickers</value>\n  </data>\n  <data name=\"StickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"StickerNominativePlural\" xml:space=\"preserve\">\n    <value>Stickers</value>\n  </data>\n  <data name=\"StickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Sticker</value>\n  </data>\n  <data name=\"Stickers\" xml:space=\"preserve\">\n    <value>Stickers</value>\n  </data>\n  <data name=\"StickersDescription\" xml:space=\"preserve\">\n    <value>Artistas são bem vindos a adicionar seus próprios pacotes de stickers usando o @stickers bot.\n\nUsuários podem adicionar stickers clicando sobre ele e escolhendo — \"Adicionar Stickers\".</value>\n  </data>\n  <data name=\"LinkCopiedToClipboard\" xml:space=\"preserve\">\n    <value>Link copiado para área de transferência</value>\n  </data>\n  <data name=\"Close\" xml:space=\"preserve\">\n    <value>Fechar</value>\n  </data>\n  <data name=\"Show\" xml:space=\"preserve\">\n    <value>Mostrar</value>\n  </data>\n  <data name=\"AddToStickers\" xml:space=\"preserve\">\n    <value>Adicionar aos Stickers</value>\n  </data>\n  <data name=\"SecretChatRequested\" xml:space=\"preserve\">\n    <value>Trocando chaves criptográficas...</value>\n  </data>\n  <data name=\"Bot\" xml:space=\"preserve\">\n    <value>Bot</value>\n  </data>\n  <data name=\"OnlySeesMessagesStartingWithSlash\" xml:space=\"preserve\">\n    <value>Não tem acesso às mensagens</value>\n  </data>\n  <data name=\"SeesAllMessages\" xml:space=\"preserve\">\n    <value>Tem acesso às mensagens</value>\n  </data>\n  <data name=\"WhatCanThisBotDo\" xml:space=\"preserve\">\n    <value>O que esse bot pode fazer?</value>\n  </data>\n  <data name=\"AddBotToGroupsError\" xml:space=\"preserve\">\n    <value>Esse bot não pode entrar em grupos.</value>\n  </data>\n  <data name=\"AddToGroup\" xml:space=\"preserve\">\n    <value>Adicionar ao Grupo</value>\n  </data>\n  <data name=\"BlockContactConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja bloquear este contato?</value>\n  </data>\n  <data name=\"Help\" xml:space=\"preserve\">\n    <value>Ajuda</value>\n  </data>\n  <data name=\"Start\" xml:space=\"preserve\">\n    <value>Iniciar</value>\n  </data>\n  <data name=\"UnblockContactConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja desbloquear este contato?</value>\n  </data>\n  <data name=\"SharedLinks\" xml:space=\"preserve\">\n    <value>Links</value>\n  </data>\n  <data name=\"BackgroudnTaskDisabledAlert\" xml:space=\"preserve\">\n    <value>Você desabilitou o segundo plano para o Telegram Messenger. Você não receberá alertas de mensagens do Telegram enquanto ele estiver desabilitado. Por favor, permita ao app rodar em segundo plano.</value>\n  </data>\n  <data name=\"SearchSharedLinks\" xml:space=\"preserve\">\n    <value>Buscar links compartilhados</value>\n  </data>\n  <data name=\"SharedFiles\" xml:space=\"preserve\">\n    <value>Arquivos</value>\n  </data>\n  <data name=\"ShareLinks\" xml:space=\"preserve\">\n    <value>Compartilhe links nesse chat e os acesse de qualquer um de seus dispositivos.</value>\n  </data>\n  <data name=\"DeleteAndStop\" xml:space=\"preserve\">\n    <value>Apagar e parar</value>\n  </data>\n  <data name=\"Restart\" xml:space=\"preserve\">\n    <value>Reiniciar</value>\n  </data>\n  <data name=\"RestartBot\" xml:space=\"preserve\">\n    <value>Reiniciar bot</value>\n  </data>\n  <data name=\"StopBot\" xml:space=\"preserve\">\n    <value>Parar</value>\n  </data>\n  <data name=\"ClearSearchHistoryConfirmation\" xml:space=\"preserve\">\n    <value>Limpar histórico de busca?</value>\n  </data>\n  <data name=\"Recent\" xml:space=\"preserve\">\n    <value>Recente</value>\n  </data>\n  <data name=\"NewChannel\" xml:space=\"preserve\">\n    <value>Novo Canal</value>\n  </data>\n  <data name=\"MessageActionBroadcastCreate\" xml:space=\"preserve\">\n    <value>{0} criou a transmissão \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionChannelCreate\" xml:space=\"preserve\">\n    <value>Canal criado</value>\n  </data>\n  <data name=\"ReportSpam\" xml:space=\"preserve\">\n    <value>Reportar Spam</value>\n  </data>\n  <data name=\"ConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Conversa marcada como spam. Apagar e bloquear usuário?</value>\n  </data>\n  <data name=\"GroupConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Conversa marcada como spam. Apagar e sair do grupo?</value>\n  </data>\n  <data name=\"PeerFloodAddContact\" xml:space=\"preserve\">\n    <value>Desculpe, você só pode adicionar contatos mútuos à grupos no momento.</value>\n  </data>\n  <data name=\"PeerFloodSendMessage\" xml:space=\"preserve\">\n    <value>Desculpe, você pode enviar mensagens somente para contatos mútuos no momento.</value>\n  </data>\n  <data name=\"LeaveChannel\" xml:space=\"preserve\">\n    <value>Sair do Canal</value>\n  </data>\n  <data name=\"AccessLevel\" xml:space=\"preserve\">\n    <value>Etapa de acesso</value>\n  </data>\n  <data name=\"AddManager\" xml:space=\"preserve\">\n    <value>Adicionar administrador</value>\n  </data>\n  <data name=\"Comments\" xml:space=\"preserve\">\n    <value>Comentários</value>\n  </data>\n  <data name=\"CommentsDescription\" xml:space=\"preserve\">\n    <value>Se você habilitar comentários, membros poderão discutir suas postagens no canal.</value>\n  </data>\n  <data name=\"Creator\" xml:space=\"preserve\">\n    <value>Criador</value>\n  </data>\n  <data name=\"Management\" xml:space=\"preserve\">\n    <value>Gerenciamento</value>\n  </data>\n  <data name=\"Moderator\" xml:space=\"preserve\">\n    <value>Administrador</value>\n  </data>\n  <data name=\"ModeratorDescription\" xml:space=\"preserve\">\n    <value>Pode remover conteúdo gerado por usuário.</value>\n  </data>\n  <data name=\"Publisher\" xml:space=\"preserve\">\n    <value>Administrador</value>\n  </data>\n  <data name=\"PublisherDescription\" xml:space=\"preserve\">\n    <value>Pode postar como canal e adicionar ou apagar conteúdo.</value>\n  </data>\n  <data name=\"ChannelName\" xml:space=\"preserve\">\n    <value>Nome do canal</value>\n  </data>\n  <data name=\"Description\" xml:space=\"preserve\">\n    <value>Descrição</value>\n  </data>\n  <data name=\"AboutDescription\" xml:space=\"preserve\">\n    <value>Você pode providenciar uma descrição opcional para o seu canal.</value>\n  </data>\n  <data name=\"Back\" xml:space=\"preserve\">\n    <value>Voltar</value>\n  </data>\n  <data name=\"ChannelType\" xml:space=\"preserve\">\n    <value>Tipo de Canal</value>\n  </data>\n  <data name=\"Private\" xml:space=\"preserve\">\n    <value>Grupo Privado</value>\n  </data>\n  <data name=\"PrivateChannelDescription\" xml:space=\"preserve\">\n    <value>Canais privados só podem ser aderidos através de um link de convite.</value>\n  </data>\n  <data name=\"Public\" xml:space=\"preserve\">\n    <value>Grupo Público</value>\n  </data>\n  <data name=\"PublicChannelDescription\" xml:space=\"preserve\">\n    <value>Canais públicos podem ser encontrados na busca, qualquer um pode entrar.</value>\n  </data>\n  <data name=\"PrivateLinkDescription\" xml:space=\"preserve\">\n    <value>Pessoas podem entrar em seu canal com este link. Você pode desativar o link quando quiser.</value>\n  </data>\n  <data name=\"PublicLinkDescription\" xml:space=\"preserve\">\n    <value>Pessoas podem compartilhar esse link com outros e encontrar o seu canal usando a busca do Telegram</value>\n  </data>\n  <data name=\"CommentGenitivePlural\" xml:space=\"preserve\">\n    <value>Comentários</value>\n  </data>\n  <data name=\"CommentGenitiveSingular\" xml:space=\"preserve\">\n    <value>Comentário</value>\n  </data>\n  <data name=\"CommentNominativePlural\" xml:space=\"preserve\">\n    <value>Comentários</value>\n  </data>\n  <data name=\"CommentNominativeSingular\" xml:space=\"preserve\">\n    <value>Comentário</value>\n  </data>\n  <data name=\"Blacklist\" xml:space=\"preserve\">\n    <value>Lista negra</value>\n  </data>\n  <data name=\"Channel\" xml:space=\"preserve\">\n    <value>Canal</value>\n  </data>\n  <data name=\"ChoosePublicChannelLinkNotification\" xml:space=\"preserve\">\n    <value>Por favor, escolha um link para o seu canal público, assim as pessoas poderão encontrá-lo na busca e compartilhar com outros.\n\nSe não estiver interessado, em vez disso sugerimos criar um canal privado.</value>\n  </data>\n  <data name=\"MessageActionChannelEditPhoto\" xml:space=\"preserve\">\n    <value>Foto do canal atualizada</value>\n  </data>\n  <data name=\"Mute\" xml:space=\"preserve\">\n    <value>Silenciar</value>\n  </data>\n  <data name=\"SetChannelPhoto\" xml:space=\"preserve\">\n    <value>Definir Foto do Canal</value>\n  </data>\n  <data name=\"Unmute\" xml:space=\"preserve\">\n    <value>Restaurar Som</value>\n  </data>\n  <data name=\"WhatIsChannel\" xml:space=\"preserve\">\n    <value>O que é um Canal?</value>\n  </data>\n  <data name=\"WhatIsChannelDescription\" xml:space=\"preserve\">\n    <value>Canais são uma nova ferramenta para transmissão de suas mensagens para grandes audiências.</value>\n  </data>\n  <data name=\"AddEditorConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja adicionar {0} como administrador?</value>\n  </data>\n  <data name=\"AddModeratorConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja adicionar {0} como administrador?</value>\n  </data>\n  <data name=\"PrivateChannel\" xml:space=\"preserve\">\n    <value>Canal Privado</value>\n  </data>\n  <data name=\"PrivateToPublicChannelNotification\" xml:space=\"preserve\">\n    <value>Note que ao escolher um link público para o canal, qualquer um poderá encontrá-lo na busca e entrar.\n\nNão crie esse link se você deseja que seu canal seja privado.</value>\n  </data>\n  <data name=\"PublicChannel\" xml:space=\"preserve\">\n    <value>Canal Público</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuch\" xml:space=\"preserve\">\n    <value>Desculpe, você reservou muitos nomes públicos. Você pode remover o link público de um de seus grupos ou canais, ou criar de forma privada.</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuchShort\" xml:space=\"preserve\">\n    <value>Muitos canais públicos.</value>\n  </data>\n  <data name=\"DeleteChannelConfirmation\" xml:space=\"preserve\">\n    <value>Espere! Apagando esse canal removerá todos os membros e todas as mensagens serão perdidas. Apagar assim mesmo?</value>\n  </data>\n  <data name=\"Follow\" xml:space=\"preserve\">\n    <value>Entrar</value>\n  </data>\n  <data name=\"Join\" xml:space=\"preserve\">\n    <value>Entrar</value>\n  </data>\n  <data name=\"LeaveChannelConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja sair do canal?</value>\n  </data>\n  <data name=\"JoinChannelConfirmation\" xml:space=\"preserve\">\n    <value>Você deseja entrar no canal '{0}'?</value>\n  </data>\n  <data name=\"Administration\" xml:space=\"preserve\">\n    <value>Administrador</value>\n  </data>\n  <data name=\"Administrators\" xml:space=\"preserve\">\n    <value>Administradores</value>\n  </data>\n  <data name=\"DeleteChannel\" xml:space=\"preserve\">\n    <value>Deletar Canal</value>\n  </data>\n  <data name=\"MessageActionChannelDeletePhoto\" xml:space=\"preserve\">\n    <value>Foto do canal removida</value>\n  </data>\n  <data name=\"MessageActionChannelEditTitle\" xml:space=\"preserve\">\n    <value>Nome do canal alterado para \"{0}\"</value>\n  </data>\n  <data name=\"SetSharedLink\" xml:space=\"preserve\">\n    <value>Definir link compartilhado</value>\n  </data>\n  <data name=\"AddAdministrator\" xml:space=\"preserve\">\n    <value>Adicionar administrador</value>\n  </data>\n  <data name=\"ChannelAdministratorsHint\" xml:space=\"preserve\">\n    <value>Você pode adicionar administradores para ajudar você a gerenciar seu canal. Aperte e segure para removê-los.</value>\n  </data>\n  <data name=\"ChannelMembersHint\" xml:space=\"preserve\">\n    <value>Somente os administradores do canal podem ver essa lista.</value>\n  </data>\n  <data name=\"InviteViaLink\" xml:space=\"preserve\">\n    <value>Convidar via link</value>\n  </data>\n  <data name=\"AddUserAsAdministrator\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja colocar {0} como adiministrador?</value>\n  </data>\n  <data name=\"ChannelIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Desculpe, esse canal não é mais acessível.</value>\n  </data>\n  <data name=\"InviteContactConfirmation\" xml:space=\"preserve\">\n    <value>{0} não entrou no seu canal ainda. Você deseja enviar um convite?</value>\n  </data>\n  <data name=\"PostToChannelError\" xml:space=\"preserve\">\n    <value>Desculpe, você não pode postar nesse canal.</value>\n  </data>\n  <data name=\"SearchSharedMusic\" xml:space=\"preserve\">\n    <value>Buscar músicas compartilhadas</value>\n  </data>\n  <data name=\"SharedMusic\" xml:space=\"preserve\">\n    <value>Música</value>\n  </data>\n  <data name=\"ShareMusic\" xml:space=\"preserve\">\n    <value>Todas as músicas compartilhadas no chat aparecerão aqui.</value>\n  </data>\n  <data name=\"AdminsDescription\" xml:space=\"preserve\">\n    <value>Administradores podem adicionar e remover membros, editar nome ou foto do grupo.</value>\n  </data>\n  <data name=\"AllMembersAreAdmins\" xml:space=\"preserve\">\n    <value>Todos são administradores</value>\n  </data>\n  <data name=\"MembersDescription\" xml:space=\"preserve\">\n    <value>Membros podem adicionar e remover novos membros, editar o nome e a foto do grupo.</value>\n  </data>\n  <data name=\"SetAdmins\" xml:space=\"preserve\">\n    <value>Definir Administradores</value>\n  </data>\n  <data name=\"UpgradeToSupergroup\" xml:space=\"preserve\">\n    <value>Converter a Supergrupo</value>\n  </data>\n  <data name=\"UpgradeToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Note que os membros do grupo precisarão atualizar o aplicativo do Telegram até a última versão para verem seu supergrupo. Você tem certeza que deseja converter este grupo?</value>\n  </data>\n  <data name=\"UpgradeToSupergroupDescription\" xml:space=\"preserve\">\n    <value>Limite de membros atingido.\nPara ir além do limite e ter funções adcionais, converta para um supergrupo:\n• Supergrupos podem ter até {0}\n• Novos membros veêm todo o histórico de conversas\n• Administradores deletam mensagens para todos\n• Notificações são silenciadas por padrão</value>\n  </data>\n  <data name=\"MessageActionChannelMigrateFrom\" xml:space=\"preserve\">\n    <value>Este grupo foi convertido para um supergrupo</value>\n  </data>\n  <data name=\"MessageActionChatActivate\" xml:space=\"preserve\">\n    <value>Chat ativado</value>\n  </data>\n  <data name=\"MessageActionChatDeactivate\" xml:space=\"preserve\">\n    <value>Chat desativado</value>\n  </data>\n  <data name=\"MessageActionChatMigrateTo\" xml:space=\"preserve\">\n    <value>Chat migrado do canal \"{0}\"</value>\n  </data>\n  <data name=\"DeleteGroup\" xml:space=\"preserve\">\n    <value>Deletar Grupo</value>\n  </data>\n  <data name=\"LeaveGroup\" xml:space=\"preserve\">\n    <value>Deixar grupo</value>\n  </data>\n  <data name=\"LeaveGroupConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja sair do grupo?</value>\n  </data>\n  <data name=\"AdminsTooMuch\" xml:space=\"preserve\">\n    <value>Desculpe, há administradores demais neste grupo.</value>\n  </data>\n  <data name=\"BlockedUsersDescription\" xml:space=\"preserve\">\n    <value>Usuários bloqueados são removidos do grupo e só podem voltar se convidados por um administrador. Convites por link não funcionam para eles.</value>\n  </data>\n  <data name=\"BotsTooMuch\" xml:space=\"preserve\">\n    <value>Desculpe, há bots demais neste grupo.</value>\n  </data>\n  <data name=\"DeleteGroupConfirmation\" xml:space=\"preserve\">\n    <value>Espere! Apagar este grupo removerá todos os membros e todas as mensagens serão perdidas. Apagar o grupo mesmo assim?</value>\n  </data>\n  <data name=\"GroupAdministratorsHint\" xml:space=\"preserve\">\n    <value>Você pode adicionar administradores para ajudar você a gerenciar seu grupo. Toque e segure para removê-los.</value>\n  </data>\n  <data name=\"GroupNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Desculpe, esse grupo não é mais acessível.</value>\n  </data>\n  <data name=\"InviteUserBackError\" xml:space=\"preserve\">\n    <value>Desculpe, esse usuário decidiu sair do grupo, você não pode adicioná-lo novamente.</value>\n  </data>\n  <data name=\"MessageActionChatAddSelf\" xml:space=\"preserve\">\n    <value>{0} retornou ao grupo</value>\n  </data>\n  <data name=\"PromoteToAdmin\" xml:space=\"preserve\">\n    <value>Promover a administrador</value>\n  </data>\n  <data name=\"UserNotMutualContact\" xml:space=\"preserve\">\n    <value>Desculpe, você não pode adicionar esse usuário em grupos.</value>\n  </data>\n  <data name=\"UsersTooMuch\" xml:space=\"preserve\">\n    <value>Desculpe, o grupo está lotado.</value>\n  </data>\n  <data name=\"GroupIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Desculpe, esse grupo não é mais acessível.</value>\n  </data>\n  <data name=\"InviteContactToGroupConfirmation\" xml:space=\"preserve\">\n    <value>{0} não entrou no grupo ainda. Você deseja enviar um convite?</value>\n  </data>\n  <data name=\"OpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>Abrir URL {0}?</value>\n  </data>\n  <data name=\"ServiceNotifications\" xml:space=\"preserve\">\n    <value>Notificações de serviço</value>\n  </data>\n  <data name=\"AutomaticAudioDownload\" xml:space=\"preserve\">\n    <value>Baixar Áudios Automaticamente</value>\n  </data>\n  <data name=\"AutomaticPhotoDownload\" xml:space=\"preserve\">\n    <value>Baixar Fotos Automaticamente:</value>\n  </data>\n  <data name=\"CacheSettings\" xml:space=\"preserve\">\n    <value>Configurações de cache</value>\n  </data>\n  <data name=\"ChatSettings\" xml:space=\"preserve\">\n    <value>Configurações de Conversas</value>\n  </data>\n  <data name=\"ClearChannelConfirmation\" xml:space=\"preserve\">\n    <value>Apagar todos os textos e mídias em cache desse canal?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseConfirmation\" xml:space=\"preserve\">\n    <value>Limpar todos os textos em cache?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseDescription\" xml:space=\"preserve\">\n    <value>Limpar o banco de dados local apagará todos os textos das mensagens em cache e compactará o banco de dados para economizar espaço. O Telegram precisa de alguns dados para trabalhar, então o tamanho do banco não vai chegar a zero.\n\nEssa operação pode demorar alguns minutos para ser concluída.</value>\n  </data>\n  <data name=\"ClearSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Apagar todos os textos e mídias em cache desse supergrupo?</value>\n  </data>\n  <data name=\"Documents\" xml:space=\"preserve\">\n    <value>Documentos</value>\n  </data>\n  <data name=\"Forever\" xml:space=\"preserve\">\n    <value>Permanentemente</value>\n  </data>\n  <data name=\"Groups\" xml:space=\"preserve\">\n    <value>Grupos</value>\n  </data>\n  <data name=\"KeepMedia\" xml:space=\"preserve\">\n    <value>Manter Mídias</value>\n  </data>\n  <data name=\"KeepMediaDescription\" xml:space=\"preserve\">\n    <value>Fotos, vídeos e outros arquivos dos chats na nuvem que você não acessou durante este período serão removidos deste dispositivo para economizar espaço.\n\nTodas as mídias permanecerão na nuvem do Telegram e podem ser baixadas novamente sempre que necessitar.</value>\n  </data>\n  <data name=\"Music\" xml:space=\"preserve\">\n    <value>Música</value>\n  </data>\n  <data name=\"Other\" xml:space=\"preserve\">\n    <value>Outros</value>\n  </data>\n  <data name=\"OtherFiles\" xml:space=\"preserve\">\n    <value>Outros arquivos</value>\n  </data>\n  <data name=\"Photos\" xml:space=\"preserve\">\n    <value>Fotos</value>\n  </data>\n  <data name=\"PrivateChats\" xml:space=\"preserve\">\n    <value>Conversas Privadas</value>\n  </data>\n  <data name=\"Videos\" xml:space=\"preserve\">\n    <value>Vídeos</value>\n  </data>\n  <data name=\"VoiceMessages\" xml:space=\"preserve\">\n    <value>Mensagens de voz</value>\n  </data>\n  <data name=\"LocalDatabase\" xml:space=\"preserve\">\n    <value>Banco de Dados Local</value>\n  </data>\n  <data name=\"AutomaticGifDownload\" xml:space=\"preserve\">\n    <value>Baixar GIFs Automaticamente</value>\n  </data>\n  <data name=\"ForwardedGifGenitivePlural\" xml:space=\"preserve\">\n    <value>GIFs encaminhados</value>\n  </data>\n  <data name=\"ForwardedGifGenitiveSingular\" xml:space=\"preserve\">\n    <value>GIF encaminhado</value>\n  </data>\n  <data name=\"ForwardedGifNominativePlural\" xml:space=\"preserve\">\n    <value>GIFs encaminhados</value>\n  </data>\n  <data name=\"ForwardedGifNominativeSingular\" xml:space=\"preserve\">\n    <value>GIF encaminhado</value>\n  </data>\n  <data name=\"Gif\" xml:space=\"preserve\">\n    <value>GIF</value>\n  </data>\n  <data name=\"AutoplayGifs\" xml:space=\"preserve\">\n    <value>Auto-Reproduzir GIFs</value>\n  </data>\n  <data name=\"Via\" xml:space=\"preserve\">\n    <value>Via {0}</value>\n  </data>\n  <data name=\"AddNewMembers\" xml:space=\"preserve\">\n    <value>Quem pode adicionar novos membros?</value>\n  </data>\n  <data name=\"AllMembers\" xml:space=\"preserve\">\n    <value>Todos os membros</value>\n  </data>\n  <data name=\"AlwaysAllow\" xml:space=\"preserve\">\n    <value>Sempre permitir</value>\n  </data>\n  <data name=\"GroupsDescription\" xml:space=\"preserve\">\n    <value>Alterar quem pode adicioná-lo a grupos e canais.</value>\n  </data>\n  <data name=\"GroupsImportantNote\" xml:space=\"preserve\">\n    <value>Você pode restringir quem pode te adicionar em grupos ou canais com precisão.</value>\n  </data>\n  <data name=\"GroupsSettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Esses usuários poderão ou não te adicionar em grupos e canais, dependendo de suas configurações.</value>\n  </data>\n  <data name=\"GroupsShort\" xml:space=\"preserve\">\n    <value>Grupos e Canais</value>\n  </data>\n  <data name=\"NeverAllow\" xml:space=\"preserve\">\n    <value>Nunca permitir</value>\n  </data>\n  <data name=\"OnlyAdmins\" xml:space=\"preserve\">\n    <value>Somente administradores</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Mensagens de voz encaminhadas</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Mensagem de voz encaminhada</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Mensagens de voz encaminhadas</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Mensagem de voz encaminhada</value>\n  </data>\n  <data name=\"RecordingVoiceMessage\" xml:space=\"preserve\">\n    <value>Gravando mensagem de voz</value>\n  </data>\n  <data name=\"VoiceMessage\" xml:space=\"preserve\">\n    <value>Mensagem de voz</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription1\" xml:space=\"preserve\">\n    <value>Essa imagem é uma visualização da chave de criptografia para essa conversa secreta com {0}.</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription2\" xml:space=\"preserve\">\n    <value>Se essa imagem parece a mesma no telefone de {0}, essa conversa é 200% segura.</value>\n  </data>\n  <data name=\"InlineBotsNotification\" xml:space=\"preserve\">\n    <value>Os bots integrados são fornecidos por desenvolvedores terceiros. Para o bot funcionar, os símbolos que você digita depois do nome de usuário do bot são enviados para o respectivo desenvolvedor.</value>\n  </data>\n  <data name=\"LinkPreviews\" xml:space=\"preserve\">\n    <value>Prévia do link</value>\n  </data>\n  <data name=\"LInkPreviewsNotification\" xml:space=\"preserve\">\n    <value>Você gostaria de ativar a pré-visualização estendida de links em Chats Secretos? Note que a pré-visualização é gerada nos servidores do Telegram.</value>\n  </data>\n  <data name=\"ViewStickers\" xml:space=\"preserve\">\n    <value>Ver stickers</value>\n  </data>\n  <data name=\"NotifyMembers\" xml:space=\"preserve\">\n    <value>Notificar membros</value>\n  </data>\n  <data name=\"NotifyMembersDescription\" xml:space=\"preserve\">\n    <value>Enviar notificações a cada postagem de um administrador</value>\n  </data>\n  <data name=\"SignMessages\" xml:space=\"preserve\">\n    <value>Assinar mensagens</value>\n  </data>\n  <data name=\"SignMessagesDescription\" xml:space=\"preserve\">\n    <value>Adicionar nomes dos administradores nas mensagens postadas.</value>\n  </data>\n  <data name=\"ChannelNameDescription\" xml:space=\"preserve\">\n    <value>Você pode escolher um nome de canal no Telegram. Se você fizer, outras pessoas poderão encontrar seu canal pelo nome de usuário.\n\nVocê pode usar a-z, 0-9 e underline. O tamanho mínimo é de 5 caracteres.</value>\n  </data>\n  <data name=\"ChannelNameDescription2\" xml:space=\"preserve\">\n    <value>Esse link abre o seu canal no Telegram:</value>\n  </data>\n  <data name=\"SupergroupNameDescription\" xml:space=\"preserve\">\n    <value>Você pode escolher um nome para o supergrupo no Telegram. Se você fizer, outras pessoas poderão encontrar seu canal pelo nome de usuário.\n\nVocê pode usar a-z, 0-9 e underline. O tamanho mínimo é de 5 caracteres.</value>\n  </data>\n  <data name=\"SupergroupNameDescription2\" xml:space=\"preserve\">\n    <value>Esse link abre o seu supergrupo no Telegram:</value>\n  </data>\n  <data name=\"SupergroupName\" xml:space=\"preserve\">\n    <value>Nome do supergrupo</value>\n  </data>\n  <data name=\"ChannelNameInvalid\" xml:space=\"preserve\">\n    <value>Desculpe, esse nome é inválido.</value>\n  </data>\n  <data name=\"ChannelNameOccupied\" xml:space=\"preserve\">\n    <value>Desculpe, nome já está em uso.</value>\n  </data>\n  <data name=\"ChannelNameShort\" xml:space=\"preserve\">\n    <value>Nome do canal deve ter pelo menos 5 caracteres.</value>\n  </data>\n  <data name=\"ChannelNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Nome do canal não pode iniciar com número.</value>\n  </data>\n  <data name=\"NameChecking\" xml:space=\"preserve\">\n    <value>Verificando nome...</value>\n  </data>\n  <data name=\"NameIsAvailable\" xml:space=\"preserve\">\n    <value>{0} está disponível.</value>\n  </data>\n  <data name=\"SupergroupNameInvalid\" xml:space=\"preserve\">\n    <value>Desculpe, esse nome é inválido.</value>\n  </data>\n  <data name=\"SupergroupNameOccupied\" xml:space=\"preserve\">\n    <value>Desculpe, nome já está em uso.</value>\n  </data>\n  <data name=\"SupergroupNameShort\" xml:space=\"preserve\">\n    <value>Nome do supergrupo deve ter pelo menos 5 caracteres.</value>\n  </data>\n  <data name=\"SupergroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Nome do supergrupo não pode iniciar com número.</value>\n  </data>\n  <data name=\"EditMessageError\" xml:space=\"preserve\">\n    <value>Desculpe, você não pode editar essa mensagem.</value>\n  </data>\n  <data name=\"MuteChannelPostHint\" xml:space=\"preserve\">\n    <value>Os membros não serão notificados quando você postar</value>\n  </data>\n  <data name=\"UnmuteChannelPostHint\" xml:space=\"preserve\">\n    <value>Os membros serão notificados quando você postar</value>\n  </data>\n  <data name=\"PinMessage\" xml:space=\"preserve\">\n    <value>Fixar</value>\n  </data>\n  <data name=\"UnpinMessage\" xml:space=\"preserve\">\n    <value>Desafixar</value>\n  </data>\n  <data name=\"UnpinMessageConfirmation\" xml:space=\"preserve\">\n    <value>Você deseja desafixar essa mensagem?</value>\n  </data>\n  <data name=\"ConvertToSupergroup\" xml:space=\"preserve\">\n    <value>Converter a Supergrupo</value>\n  </data>\n  <data name=\"ConvertToSupergroupNote\" xml:space=\"preserve\">\n    <value>**Nota**: Essa ação não pode ser desfeita.</value>\n  </data>\n  <data name=\"Supergroup\" xml:space=\"preserve\">\n    <value>Supergrupo</value>\n  </data>\n  <data name=\"ConvertToSupergroupDescription\" xml:space=\"preserve\">\n    <value>**Em supergrupos**:\n• Novos membros podem visualizar todo o histórico\n• Mensagens apagadas desaparecerão para todos\n• Administradores podem fixar mensagens importantes\n• Criador pode definir um link público para o grupo</value>\n  </data>\n  <data name=\"BanUser\" xml:space=\"preserve\">\n    <value>Banir usuário</value>\n  </data>\n  <data name=\"DeleteAllFrom\" xml:space=\"preserve\">\n    <value>Apagar tudo de {0}</value>\n  </data>\n  <data name=\"DeleteMessageConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja apagar esta mensagem?</value>\n  </data>\n  <data name=\"DeleteMessages\" xml:space=\"preserve\">\n    <value>Apagar mensagens</value>\n  </data>\n  <data name=\"MessageActionPinMessage\" xml:space=\"preserve\">\n    <value>{0} fixou uma mensagem</value>\n  </data>\n  <data name=\"MessageActionPinContact\" xml:space=\"preserve\">\n    <value>{0} fixou um contato </value>\n  </data>\n  <data name=\"MessageActionPinFile\" xml:space=\"preserve\">\n    <value>{0} fixou um arquivo</value>\n  </data>\n  <data name=\"MessageActionPinGif\" xml:space=\"preserve\">\n    <value>{0} fixou um GIF</value>\n  </data>\n  <data name=\"MessageActionPinMap\" xml:space=\"preserve\">\n    <value>{0} fixou um mapa</value>\n  </data>\n  <data name=\"MessageActionPinPhoto\" xml:space=\"preserve\">\n    <value>{0} fixou uma foto</value>\n  </data>\n  <data name=\"MessageActionPinSticker\" xml:space=\"preserve\">\n    <value>{0} fixou um sticker</value>\n  </data>\n  <data name=\"MessageActionPinText\" xml:space=\"preserve\">\n    <value>{0} fixou \"{1}\"</value>\n  </data>\n  <data name=\"MessageActionPinTrack\" xml:space=\"preserve\">\n    <value>{0} fixou uma música</value>\n  </data>\n  <data name=\"MessageActionPinVideo\" xml:space=\"preserve\">\n    <value>{0} fixou um vídeo</value>\n  </data>\n  <data name=\"MessageActionPinVoiceMessage\" xml:space=\"preserve\">\n    <value>{0} fixou uma mensagem de voz </value>\n  </data>\n  <data name=\"PinnedMessage\" xml:space=\"preserve\">\n    <value>Mensagem fixada</value>\n  </data>\n  <data name=\"ConvertToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Essa ação é irreversível. Não é possível voltar de um supergrupo para um grupo normal.</value>\n  </data>\n  <data name=\"NotifyAllMembers\" xml:space=\"preserve\">\n    <value>Notificar todos os membros</value>\n  </data>\n  <data name=\"PinMessageConfirmation\" xml:space=\"preserve\">\n    <value>Você deseja fixar essa mensagem no grupo?</value>\n  </data>\n  <data name=\"ChatMaxSizeNotification\" xml:space=\"preserve\">\n    <value>Você poderá adicionar mais usuários após finalizar a criação do grupo e convertê-lo em um supergrupo.</value>\n  </data>\n  <data name=\"Admin\" xml:space=\"preserve\">\n    <value>Administrador</value>\n  </data>\n  <data name=\"ChoosePublicGroupLinkNotification\" xml:space=\"preserve\">\n    <value>Por favor, escolha um link para o seu canal público, assim as pessoas poderão encontrá-lo na busca e compartilhar com outros.</value>\n  </data>\n  <data name=\"GroupType\" xml:space=\"preserve\">\n    <value>Tipo de Grupo</value>\n  </data>\n  <data name=\"PrivateGroupDescription\" xml:space=\"preserve\">\n    <value>Grupos privados só podem ser aderidos através de um link de convite.</value>\n  </data>\n  <data name=\"PrivateGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Pessoas podem entrar em seu canal com este link. Você pode desativar o link quando quiser.</value>\n  </data>\n  <data name=\"PublicGroupDescription\" xml:space=\"preserve\">\n    <value>Grupos públicos podem ser encontrados na busca, o histórico é disponível para todos e qualquer um pode entrar.</value>\n  </data>\n  <data name=\"PublicGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Pessoas podem compartilhar esse link com outros e encontrar o seu grupo usando a busca do Telegram.</value>\n  </data>\n  <data name=\"Camera\" xml:space=\"preserve\">\n    <value>Câmera</value>\n  </data>\n  <data name=\"Pornography\" xml:space=\"preserve\">\n    <value>Pornografia</value>\n  </data>\n  <data name=\"Report\" xml:space=\"preserve\">\n    <value>Reportar</value>\n  </data>\n  <data name=\"ReportSpamNotification\" xml:space=\"preserve\">\n    <value>Obrigado!\nO relatório será revisado pela nossa equipe em breve.</value>\n  </data>\n  <data name=\"Spam\" xml:space=\"preserve\">\n    <value>Spam</value>\n  </data>\n  <data name=\"Violence\" xml:space=\"preserve\">\n    <value>Violência</value>\n  </data>\n  <data name=\"ClearHistoryConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja limpar o histórico?</value>\n  </data>\n  <data name=\"DeleteAndExitConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que apagar e sair do grupo?</value>\n  </data>\n  <data name=\"DeleteChat\" xml:space=\"preserve\">\n    <value>Apagar conversa</value>\n  </data>\n  <data name=\"MessageActionChatJoin\" xml:space=\"preserve\">\n    <value>{0} entrou no grupo</value>\n  </data>\n  <data name=\"MessageActionChatJoinSelf\" xml:space=\"preserve\">\n    <value>Você entrou no grupo</value>\n  </data>\n  <data name=\"MessageActionLeftGroupSelf\" xml:space=\"preserve\">\n    <value>Você saiu do grupo</value>\n  </data>\n  <data name=\"CodeSentToTelegramApp\" xml:space=\"preserve\">\n    <value>Nós enviamos o código para o aplicativo do **Telegram** em seu outro dispositivo.</value>\n  </data>\n  <data name=\"CodeSentViaCallingPhone\" xml:space=\"preserve\">\n    <value>Nós te ligaremos em **{0}** para ditar o código.</value>\n  </data>\n  <data name=\"DidNotGetCode\" xml:space=\"preserve\">\n    <value>Não recebeu o código?</value>\n  </data>\n  <data name=\"HaveNotReceivedCode\" xml:space=\"preserve\">\n    <value>Não recebeu o código?</value>\n  </data>\n  <data name=\"ShareLocationConfirmation\" xml:space=\"preserve\">\n    <value>Isso irá enviar sua localização atual ao bot.</value>\n  </data>\n  <data name=\"SharePhoneNumberConfirmation\" xml:space=\"preserve\">\n    <value>O bot saberá seu número de telefone. Isso pode ser útil para a integração com outros serviços.</value>\n  </data>\n  <data name=\"ChooseManually\" xml:space=\"preserve\">\n    <value>Escolher manualmente</value>\n  </data>\n  <data name=\"ShareLocationCaption\" xml:space=\"preserve\">\n    <value>Compartilhar sua localização?</value>\n  </data>\n  <data name=\"SharePhoneNumberCaption\" xml:space=\"preserve\">\n    <value>Compartilhar seu número de telefone?</value>\n  </data>\n  <data name=\"UnableToDetermineLocation\" xml:space=\"preserve\">\n    <value>O aplicativo foi impossibilitado de determinar sua localização atual.</value>\n  </data>\n  <data name=\"ShareLocationInlineConfirmation\" xml:space=\"preserve\">\n    <value>Esse bot gostaria de saber sua localização todas as vezes que você enviá-lo uma mensagem. Isso pode ser utilizado para providenciar resultados específicos de localização.</value>\n  </data>\n  <data name=\"MoreInfo\" xml:space=\"preserve\">\n    <value>Mais info</value>\n  </data>\n  <data name=\"RemoveStickers\" xml:space=\"preserve\">\n    <value>Remover</value>\n  </data>\n  <data name=\"SendSticker\" xml:space=\"preserve\">\n    <value>Enviar sticker</value>\n  </data>\n  <data name=\"StickersRemoved\" xml:space=\"preserve\">\n    <value>Stickers removidos</value>\n  </data>\n  <data name=\"UnpinFromStart\" xml:space=\"preserve\">\n    <value>Desafixar da tela inicial</value>\n  </data>\n  <data name=\"Bots\" xml:space=\"preserve\">\n    <value>Bots</value>\n  </data>\n  <data name=\"LastSeenYesterdayAt\" xml:space=\"preserve\">\n    <value>Visto por último ontem às {0}</value>\n  </data>\n  <data name=\"Clear\" xml:space=\"preserve\">\n    <value>Limpar</value>\n  </data>\n  <data name=\"Edited\" xml:space=\"preserve\">\n    <value>Editado</value>\n  </data>\n  <data name=\"EditMessage\" xml:space=\"preserve\">\n    <value>Editar mensagem</value>\n  </data>\n  <data name=\"LastSeenTodayAt\" xml:space=\"preserve\">\n    <value>Visto por último hoje às {0}</value>\n  </data>\n  <data name=\"OpenInlineBotsHint\" xml:space=\"preserve\">\n    <value>Deslize para cima para abrir os bots</value>\n  </data>\n  <data name=\"ConfirmResetTopPeerRating\" xml:space=\"preserve\">\n    <value>Apagar {0} das sugestões?</value>\n  </data>\n  <data name=\"Draft\" xml:space=\"preserve\">\n    <value>Rascunho</value>\n  </data>\n  <data name=\"FeaturedStickers\" xml:space=\"preserve\">\n    <value>Stickers populares</value>\n  </data>\n  <data name=\"StickersHint\" xml:space=\"preserve\">\n    <value>Artistas são bem vindos a adicionar seus próprios pacotes de stickers usando o __@stickers__ bot.\n\nUsuários podem adicionar stickers tocando sobre eles e então \"Adicionar aos Stickers\".</value>\n  </data>\n  <data name=\"ClearRecentStickers\" xml:space=\"preserve\">\n    <value>Limpar stickers recentes</value>\n  </data>\n  <data name=\"NewFeaturedStickers\" xml:space=\"preserve\">\n    <value>{0} novos</value>\n  </data>\n  <data name=\"InstallStickersetError\" xml:space=\"preserve\">\n    <value>Desculpe, você chegou ao número máximo de pacotes de sticker.</value>\n  </data>\n  <data name=\"ChatInviteSubtitle\" xml:space=\"preserve\">\n    <value>{0}, entre eles:</value>\n  </data>\n  <data name=\"InstalledStickers\" xml:space=\"preserve\">\n    <value>Stickers instalados</value>\n  </data>\n  <data name=\"ShowStickersTab\" xml:space=\"preserve\">\n    <value>Mostrar aba de stickers</value>\n  </data>\n  <data name=\"ShowStickersTabHint\" xml:space=\"preserve\">\n    <value>Um ícone aparecerá no campo de digitação.</value>\n  </data>\n  <data name=\"ArchivedStickers\" xml:space=\"preserve\">\n    <value>Stickers arquivados</value>\n  </data>\n  <data name=\"ArchivedStickersAbout\" xml:space=\"preserve\">\n    <value>Alguns de seus pacotes de sticker antigos foram arquivados para você poder adicionar novos stickers.</value>\n  </data>\n  <data name=\"ArchivedStickersHeader\" xml:space=\"preserve\">\n    <value>Você pode ter até 200 pacotes de sticker instalados. Stickers não usados são arquivados quando você adicionar mais.</value>\n  </data>\n  <data name=\"NoSetsHere\" xml:space=\"preserve\">\n    <value>Nenhum pacote</value>\n  </data>\n  <data name=\"NoSets\" xml:space=\"preserve\">\n    <value>Nenhum pacote</value>\n  </data>\n  <data name=\"SetGenitivePlural\" xml:space=\"preserve\">\n    <value>Pacotes</value>\n  </data>\n  <data name=\"SetGenitiveSingular\" xml:space=\"preserve\">\n    <value>Pacote</value>\n  </data>\n  <data name=\"SetNominativePlural\" xml:space=\"preserve\">\n    <value>Pacotes</value>\n  </data>\n  <data name=\"SetNominativeSingular\" xml:space=\"preserve\">\n    <value>Pacote</value>\n  </data>\n  <data name=\"ChatWithYourself\" xml:space=\"preserve\">\n    <value>Chat consigo mesmo</value>\n  </data>\n  <data name=\"CloudStorageDescription\" xml:space=\"preserve\">\n    <value>• Encaminhe mensagens aqui para salvá-las\n• Envie mídias e arquivos aqui para salvá-los\n• Acesse esse chat de qualquer dispositivo\n• Use a busca para encontrar suas coisas</value>\n  </data>\n  <data name=\"CloudStorage\" xml:space=\"preserve\">\n    <value>Sua nuvem de armazenamento</value>\n  </data>\n  <data name=\"CancelAccountReset\" xml:space=\"preserve\">\n    <value>Cancelar exclusão da conta</value>\n  </data>\n  <data name=\"CancelAccountResetDescription\" xml:space=\"preserve\">\n    <value>Alguém com acesso ao seu número de telefone **{0}** solicitou a exclusão de sua conta do Telegram e redefiniu sua senha de Verificação em Duas Etapas. Se não foi você, por favor insira o código que te enviamos via SMS para o seu número **{0}**</value>\n  </data>\n  <data name=\"CancelAccountResetSuccess\" xml:space=\"preserve\">\n    <value>Sucesso! O processo de exclusão foi cancelado em sua conta {0}. Você pode fechar essa janela agora.</value>\n  </data>\n  <data name=\"Reset\" xml:space=\"preserve\">\n    <value>Apagar</value>\n  </data>\n  <data name=\"ResetAccount\" xml:space=\"preserve\">\n    <value>Apagar conta</value>\n  </data>\n  <data name=\"ResetAccountDescription\" xml:space=\"preserve\">\n    <value>Uma vez que a conta {0} está ativa e protegida por senha, nós iremos desativá-la em 1 semana, por questões de segurança.\n\nVocê pode cancelar esse processo a qualquer momento.</value>\n  </data>\n  <data name=\"ResetAccountError\" xml:space=\"preserve\">\n    <value>Suas tentativas recentes de restaurar essa conta foram canceladas pelo usuário ativo. Tente novamente em 7 dias.</value>\n  </data>\n  <data name=\"ResetAccountIn\" xml:space=\"preserve\">\n    <value>Você poderá restaurar sua conta em:</value>\n  </data>\n  <data name=\"Archive\" xml:space=\"preserve\">\n    <value>Arquivar</value>\n  </data>\n  <data name=\"BotOpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>O bot {0} pede sua permissão para compartilhar o seu nome do Telegram e foto de perfil com o dono de {1}.</value>\n  </data>\n  <data name=\"IsRecordingVideo\" xml:space=\"preserve\">\n    <value>Está gravando um vídeo</value>\n  </data>\n  <data name=\"IsSendingAudio\" xml:space=\"preserve\">\n    <value>Está enviando um áudio</value>\n  </data>\n  <data name=\"RecordingVideo\" xml:space=\"preserve\">\n    <value>Gravando vídeo</value>\n  </data>\n  <data name=\"SendingAudio\" xml:space=\"preserve\">\n    <value>Enviando áudio</value>\n  </data>\n  <data name=\"Revoke\" xml:space=\"preserve\">\n    <value>Desativar</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation2\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja remover o link **{0}**?\n\nO grupo **\"{1}\"** se tornará privado.</value>\n  </data>\n  <data name=\"AddBotToTheGroup\" xml:space=\"preserve\">\n    <value>Adicionar o bot em \"{0}\"?</value>\n  </data>\n  <data name=\"YourScored\" xml:space=\"preserve\">\n    <value>Você marcou {0}</value>\n  </data>\n  <data name=\"ShareWith\" xml:space=\"preserve\">\n    <value>Compartilhar com {0}?</value>\n  </data>\n  <data name=\"YourScoredAtGame\" xml:space=\"preserve\">\n    <value>Você marcou {0} em {1}</value>\n  </data>\n  <data name=\"MuteAudio\" xml:space=\"preserve\">\n    <value>Silenciar</value>\n  </data>\n  <data name=\"OpenWebPagesViaBotConfirmation\" xml:space=\"preserve\">\n    <value>Permitir ao {0} passar seu nome do Telegram e id (não o seu número de telefone) para páginas que você abrir com esse bot?</value>\n  </data>\n  <data name=\"UserScored\" xml:space=\"preserve\">\n    <value>{0} marcou {1} ponto</value>\n  </data>\n  <data name=\"UserScoredAtGame\" xml:space=\"preserve\">\n    <value>{0} marcou {1} ponto em {2}</value>\n  </data>\n  <data name=\"UserScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>{0} marcou {1} pontos em {2}</value>\n  </data>\n  <data name=\"UserScoredPlural\" xml:space=\"preserve\">\n    <value>{0} marcou {1} pontos</value>\n  </data>\n  <data name=\"YourScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>Você marcou {0} pontos em {1}</value>\n  </data>\n  <data name=\"YourScoredPlural\" xml:space=\"preserve\">\n    <value>Você marcou {0} pontos</value>\n  </data>\n  <data name=\"ForwardedGameGenitivePlural\" xml:space=\"preserve\">\n    <value>Jogos encaminhados</value>\n  </data>\n  <data name=\"ForwardedGameGenitiveSingular\" xml:space=\"preserve\">\n    <value>Jogo encaminhado</value>\n  </data>\n  <data name=\"ForwardedGameNominativePlural\" xml:space=\"preserve\">\n    <value>Jogos encaminhados</value>\n  </data>\n  <data name=\"ForwardedGameNominativeSingular\" xml:space=\"preserve\">\n    <value>Jogo encaminhado</value>\n  </data>\n  <data name=\"Game\" xml:space=\"preserve\">\n    <value>Jogar</value>\n  </data>\n  <data name=\"MessageActionPinGame\" xml:space=\"preserve\">\n    <value>{0} fixou um jogo</value>\n  </data>\n  <data name=\"ShareGameWith\" xml:space=\"preserve\">\n    <value>Compartilhar o jogo com {0}?</value>\n  </data>\n  <data name=\"IsPlayingGame\" xml:space=\"preserve\">\n    <value>Está jogando</value>\n  </data>\n  <data name=\"PlayingGame\" xml:space=\"preserve\">\n    <value>Jogando</value>\n  </data>\n  <data name=\"YourCloudStorage\" xml:space=\"preserve\">\n    <value>Sua nuvem de armazenamento</value>\n  </data>\n  <data name=\"Masks\" xml:space=\"preserve\">\n    <value>Máscaras</value>\n  </data>\n  <data name=\"MasksHint\" xml:space=\"preserve\">\n    <value>Você pode adicionar máscaras em fotos que você envia. Para isso, abra o editor de fotos antes de enviar uma foto.</value>\n  </data>\n  <data name=\"GroupsInCommon\" xml:space=\"preserve\">\n    <value>Grupos em Comum</value>\n  </data>\n  <data name=\"GroupGenitivePlural\" xml:space=\"preserve\">\n    <value>Grupos</value>\n  </data>\n  <data name=\"GroupGenitiveSingular\" xml:space=\"preserve\">\n    <value>Grupo</value>\n  </data>\n  <data name=\"GroupNominativePlural\" xml:space=\"preserve\">\n    <value>Grupos</value>\n  </data>\n  <data name=\"GroupNominativeSingular\" xml:space=\"preserve\">\n    <value>Grupo</value>\n  </data>\n  <data name=\"NoGroupsHere\" xml:space=\"preserve\">\n    <value>Nenhum grupo</value>\n  </data>\n  <data name=\"AddChatUserFloodWait\" xml:space=\"preserve\">\n    <value>Você não pode adicionar esse usuário porque você contatou muitos não-contatos hoje. Tente novamente amanhã. Você pode pedir para outro membro adicionar este usuário ao grupo.</value>\n  </data>\n  <data name=\"ClearAll\" xml:space=\"preserve\">\n    <value>Limpar tudo</value>\n  </data>\n  <data name=\"ClearPaintingConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja limpar sua pintura?</value>\n  </data>\n  <data name=\"DiscardChangesConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja descartar as alterações?</value>\n  </data>\n  <data name=\"SendMessageFloodWait\" xml:space=\"preserve\">\n    <value>Você contatou muitos não-contatos hoje, tente novamente amanhã. Hoje você poderá responder se esse usuário te enviar uma mensagem primeiro.</value>\n  </data>\n  <data name=\"AttachedStickers\" xml:space=\"preserve\">\n    <value>Stickers anexados</value>\n  </data>\n  <data name=\"JumpToDate\" xml:space=\"preserve\">\n    <value>Ir para data</value>\n  </data>\n  <data name=\"Pack\" xml:space=\"preserve\">\n    <value>Ver Pacote</value>\n  </data>\n  <data name=\"ChatsAndContacts\" xml:space=\"preserve\">\n    <value>Chats e Contatos</value>\n  </data>\n  <data name=\"MessageSearch\" xml:space=\"preserve\">\n    <value>Buscar Mensagem</value>\n  </data>\n  <data name=\"SearchChatsOrMessages\" xml:space=\"preserve\">\n    <value>Buscar chats ou mensagens</value>\n  </data>\n  <data name=\"PrivacyPolicy\" xml:space=\"preserve\">\n    <value>Política de Privacidade</value>\n  </data>\n  <data name=\"TelegramFAQ\" xml:space=\"preserve\">\n    <value>Perguntas Frequentes</value>\n  </data>\n  <data name=\"ChatSettingsSubtitle\" xml:space=\"preserve\">\n    <value>Mídia, plano de fundo, cache</value>\n  </data>\n  <data name=\"Mobile\" xml:space=\"preserve\">\n    <value>Celular</value>\n  </data>\n  <data name=\"ChannelsTooMuch\" xml:space=\"preserve\">\n    <value>Desculpe, você criou ou entrou em muitos canais.</value>\n  </data>\n  <data name=\"UserChannelsTooMuch\" xml:space=\"preserve\">\n    <value>Desculpe, você não pode adicionar esse usuário em canais.</value>\n  </data>\n  <data name=\"ItemsSelectedSingular\" xml:space=\"preserve\">\n    <value>{0} selecionado</value>\n  </data>\n  <data name=\"NewChat\" xml:space=\"preserve\">\n    <value>Nova conversa</value>\n  </data>\n  <data name=\"ItemsSelectedPlural\" xml:space=\"preserve\">\n    <value>{0} selecionados</value>\n  </data>\n  <data name=\"FileGenitivePlural\" xml:space=\"preserve\">\n    <value>Arquivos</value>\n  </data>\n  <data name=\"FileGenitiveSingular\" xml:space=\"preserve\">\n    <value>Arquivo</value>\n  </data>\n  <data name=\"FileNominativePlural\" xml:space=\"preserve\">\n    <value>Arquivos</value>\n  </data>\n  <data name=\"FileNominativeSingular\" xml:space=\"preserve\">\n    <value>Arquivo</value>\n  </data>\n  <data name=\"LinkGenitivePlural\" xml:space=\"preserve\">\n    <value>Links</value>\n  </data>\n  <data name=\"LinkGenitiveSingular\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"LinkNominativePlural\" xml:space=\"preserve\">\n    <value>Links</value>\n  </data>\n  <data name=\"LinkNominativeSingular\" xml:space=\"preserve\">\n    <value>Link</value>\n  </data>\n  <data name=\"PhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Fotos</value>\n  </data>\n  <data name=\"PhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"PhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Fotos</value>\n  </data>\n  <data name=\"PhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Foto</value>\n  </data>\n  <data name=\"SongGenitivePlural\" xml:space=\"preserve\">\n    <value>Músicas</value>\n  </data>\n  <data name=\"SongGenitiveSingular\" xml:space=\"preserve\">\n    <value>Música</value>\n  </data>\n  <data name=\"SongNominativePlural\" xml:space=\"preserve\">\n    <value>Músicas</value>\n  </data>\n  <data name=\"SongNominativeSingular\" xml:space=\"preserve\">\n    <value>Música</value>\n  </data>\n  <data name=\"VideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Vídeos</value>\n  </data>\n  <data name=\"VideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Vídeo</value>\n  </data>\n  <data name=\"VideoNominativePlural\" xml:space=\"preserve\">\n    <value>Vídeos</value>\n  </data>\n  <data name=\"VideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Vídeo</value>\n  </data>\n  <data name=\"PhoneNumber\" xml:space=\"preserve\">\n    <value>Número de telefone</value>\n  </data>\n  <data name=\"SetPhoto\" xml:space=\"preserve\">\n    <value>Definir Foto</value>\n  </data>\n  <data name=\"AskAQuestionDescription\" xml:space=\"preserve\">\n    <value>Note que o suporte do Telegram é feito por voluntários. Tentaremos responder o mais rápido possível, mas poderemos demorar um pouco. Por favor verifique a página de &lt;![CDATA[&lt;a href=\"https://telegram.org/faq/br#questes-gerais\"&gt;Perguntas Frequentes&lt;/a&gt;]]&gt;: há dicas e respostas para a maioria das &lt;![CDATA[&lt;a href=\"https://telegram.org/faq/br#soluo-de-problemas\"&gt;perguntas&lt;/a&gt;]]&gt;.</value>\n  </data>\n  <data name=\"MaskPackNominativePlural\" xml:space=\"preserve\">\n    <value>Pacotes de máscaras</value>\n  </data>\n  <data name=\"MaskPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Pacotes de máscaras</value>\n  </data>\n  <data name=\"StickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Pacotes de stickers</value>\n  </data>\n  <data name=\"StickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Pacote de stickers</value>\n  </data>\n  <data name=\"NewStickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Novos pacotes de stickers</value>\n  </data>\n  <data name=\"NewStickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Novo pacote de stickers</value>\n  </data>\n  <data name=\"PinDialog\" xml:space=\"preserve\">\n    <value>Fixar</value>\n  </data>\n  <data name=\"UnpinDialog\" xml:space=\"preserve\">\n    <value>Desafixar</value>\n  </data>\n  <data name=\"DeleteFor\" xml:space=\"preserve\">\n    <value>Apagar para {0}</value>\n  </data>\n  <data name=\"DeleteForAll\" xml:space=\"preserve\">\n    <value>Apagar para todos</value>\n  </data>\n  <data name=\"DeleteMessageForYouHint\" xml:space=\"preserve\">\n    <value>Isso será apagado apenas para você.</value>\n  </data>\n  <data name=\"DeleteMessagesForYouHint\" xml:space=\"preserve\">\n    <value>Isso irá apagar somente para você.</value>\n  </data>\n  <data name=\"MessageActionCanceledCall\" xml:space=\"preserve\">\n    <value>Chamada cancelada</value>\n  </data>\n  <data name=\"MessageActionIncomingCall\" xml:space=\"preserve\">\n    <value>Chamada recebida</value>\n  </data>\n  <data name=\"MessageActionIncomingDurationCall\" xml:space=\"preserve\">\n    <value>Chamada recebida (às {0})</value>\n  </data>\n  <data name=\"MessageActionMissedCall\" xml:space=\"preserve\">\n    <value>Chamada perdida</value>\n  </data>\n  <data name=\"MessageActionOutgoingCall\" xml:space=\"preserve\">\n    <value>Chamada efetuada</value>\n  </data>\n  <data name=\"MessageActionOutgoingDurationCall\" xml:space=\"preserve\">\n    <value>Chada efetuada ({0})</value>\n  </data>\n  <data name=\"CanceledCall\" xml:space=\"preserve\">\n    <value>Chamada cancelada</value>\n  </data>\n  <data name=\"IncomingCall\" xml:space=\"preserve\">\n    <value>Chamada recebida</value>\n  </data>\n  <data name=\"MissedCall\" xml:space=\"preserve\">\n    <value>Chamada perdida</value>\n  </data>\n  <data name=\"OutgoingCall\" xml:space=\"preserve\">\n    <value>Chamada efetuada</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Isso apagará para todos nesse canal.</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Isso apagará para todos nessa conversa.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Isso apagará para todos nesse canal.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Isso apagará para todos nessa conversa.</value>\n  </data>\n  <data name=\"Invoice\" xml:space=\"preserve\">\n    <value>Fatura</value>\n  </data>\n  <data name=\"TestInvoice\" xml:space=\"preserve\">\n    <value>Fatura Teste</value>\n  </data>\n  <data name=\"MessageActionPaymentSent\" xml:space=\"preserve\">\n    <value>Você transferiu com sucesso {0} para {1}</value>\n  </data>\n  <data name=\"MessageActionPaymentSentFor\" xml:space=\"preserve\">\n    <value>Você transferiu com sucesso {0} para {1} por {2}</value>\n  </data>\n  <data name=\"PaymentInfo\" xml:space=\"preserve\">\n    <value>Dados de pagamento</value>\n  </data>\n  <data name=\"Receipt\" xml:space=\"preserve\">\n    <value>Recibo</value>\n  </data>\n  <data name=\"Address1Street\" xml:space=\"preserve\">\n    <value>Endereço 1 (Rua)</value>\n  </data>\n  <data name=\"Address2Street\" xml:space=\"preserve\">\n    <value>Endereço 2 (Rua)</value>\n  </data>\n  <data name=\"BillingAddress\" xml:space=\"preserve\">\n    <value>Endereço de cobrança</value>\n  </data>\n  <data name=\"CardNumber\" xml:space=\"preserve\">\n    <value>Número do Cartão</value>\n  </data>\n  <data name=\"Checkout\" xml:space=\"preserve\">\n    <value>Finalizar</value>\n  </data>\n  <data name=\"City\" xml:space=\"preserve\">\n    <value>Cidade</value>\n  </data>\n  <data name=\"ContactAddress\" xml:space=\"preserve\">\n    <value>Endereço de contato</value>\n  </data>\n  <data name=\"Discount\" xml:space=\"preserve\">\n    <value>Desconto</value>\n  </data>\n  <data name=\"FullName\" xml:space=\"preserve\">\n    <value>Nome Completo</value>\n  </data>\n  <data name=\"MMYY\" xml:space=\"preserve\">\n    <value>MM/AA</value>\n  </data>\n  <data name=\"NameSurname\" xml:space=\"preserve\">\n    <value>Nome Sobrenome</value>\n  </data>\n  <data name=\"PaymentCard\" xml:space=\"preserve\">\n    <value>Cartão de pagamento</value>\n  </data>\n  <data name=\"PaymentMethod\" xml:space=\"preserve\">\n    <value>Método de pagamento</value>\n  </data>\n  <data name=\"Postcode\" xml:space=\"preserve\">\n    <value>Código postal</value>\n  </data>\n  <data name=\"Receiver\" xml:space=\"preserve\">\n    <value>Destinatário</value>\n  </data>\n  <data name=\"SaveShippingInformation\" xml:space=\"preserve\">\n    <value>Salvar Dados de Envio</value>\n  </data>\n  <data name=\"SaveShippingInformationHint\" xml:space=\"preserve\">\n    <value>Você pode salvar seus dados de envio para uso futuro.</value>\n  </data>\n  <data name=\"SecurityCode\" xml:space=\"preserve\">\n    <value>Código de Segurança (CVV)</value>\n  </data>\n  <data name=\"Shipping\" xml:space=\"preserve\">\n    <value>Envio</value>\n  </data>\n  <data name=\"ShippingAddress\" xml:space=\"preserve\">\n    <value>Endereço do envio</value>\n  </data>\n  <data name=\"ShippingInformation\" xml:space=\"preserve\">\n    <value>Dados de envio</value>\n  </data>\n  <data name=\"ShippingMethods\" xml:space=\"preserve\">\n    <value>Métodos de envio</value>\n  </data>\n  <data name=\"State\" xml:space=\"preserve\">\n    <value>Estado</value>\n  </data>\n  <data name=\"Subtotal\" xml:space=\"preserve\">\n    <value>Subtotal</value>\n  </data>\n  <data name=\"Taxes\" xml:space=\"preserve\">\n    <value>Taxas</value>\n  </data>\n  <data name=\"TestReceipt\" xml:space=\"preserve\">\n    <value>Recibo Teste</value>\n  </data>\n  <data name=\"Total\" xml:space=\"preserve\">\n    <value>Total</value>\n  </data>\n  <data name=\"TransactionConfirmation\" xml:space=\"preserve\">\n    <value>Você realmente deseja transferir {0} para o bot {1} por {2}?</value>\n  </data>\n  <data name=\"TransactionReview\" xml:space=\"preserve\">\n    <value>Revisão da Transação</value>\n  </data>\n  <data name=\"TestCheckout\" xml:space=\"preserve\">\n    <value>Finalizar Teste</value>\n  </data>\n  <data name=\"ShippingMethod\" xml:space=\"preserve\">\n    <value>Método de envio</value>\n  </data>\n  <data name=\"Name\" xml:space=\"preserve\">\n    <value>Nome</value>\n  </data>\n  <data name=\"Pay\" xml:space=\"preserve\">\n    <value>Pagar</value>\n  </data>\n  <data name=\"Duplicate\" xml:space=\"preserve\">\n    <value>Duplicar</value>\n  </data>\n  <data name=\"CameraSubtitle\" xml:space=\"preserve\">\n    <value>Gerenciar configurações da câmera</value>\n  </data>\n  <data name=\"ChooseYourCameraApp\" xml:space=\"preserve\">\n    <value>Escolha seu app de câmera</value>\n  </data>\n  <data name=\"ExternalCamera\" xml:space=\"preserve\">\n    <value>Câmera Externa</value>\n  </data>\n  <data name=\"InAppCamera\" xml:space=\"preserve\">\n    <value>Câmera no App</value>\n  </data>\n  <data name=\"Calls\" xml:space=\"preserve\">\n    <value>Chamadas</value>\n  </data>\n  <data name=\"CallsPrivacyDescription\" xml:space=\"preserve\">\n    <value>Quem pode me ligar?</value>\n  </data>\n  <data name=\"CallsPrivacyImportantNote\" xml:space=\"preserve\">\n    <value>Você pode restringir quem pode te ligar.</value>\n  </data>\n  <data name=\"CallsPrivacyOverrideNote\" xml:space=\"preserve\">\n    <value>Esses usuários poderão ou não te ligar dependendo de suas configurações.</value>\n  </data>\n  <data name=\"NoCallsHere\" xml:space=\"preserve\">\n    <value>Ainda não há chamadas</value>\n  </data>\n  <data name=\"VoiceCall\" xml:space=\"preserve\">\n    <value>Chamada de Voz</value>\n  </data>\n  <data name=\"CameraRollFolder\" xml:space=\"preserve\">\n    <value>Rolo da Câmera</value>\n  </data>\n  <data name=\"SavedPicturesFolder\" xml:space=\"preserve\">\n    <value>Imagens Salvas</value>\n  </data>\n  <data name=\"ScreenshotsFolder\" xml:space=\"preserve\">\n    <value>Capturas de Tela</value>\n  </data>\n  <data name=\"AccessCameraException\" xml:space=\"preserve\">\n    <value>Câmera atual não pôde ser acessada</value>\n  </data>\n  <data name=\"Answer\" xml:space=\"preserve\">\n    <value>Atender</value>\n  </data>\n  <data name=\"Calling\" xml:space=\"preserve\">\n    <value>Ligando...</value>\n  </data>\n  <data name=\"EmojiKeyDescription\" xml:space=\"preserve\">\n    <value>Se esses emojis são os mesmos na tela de {0}, essa chamada é 100%% segura.</value>\n  </data>\n  <data name=\"EndCall\" xml:space=\"preserve\">\n    <value>Encerrar Chamada</value>\n  </data>\n  <data name=\"Speaker\" xml:space=\"preserve\">\n    <value>Alto-falante</value>\n  </data>\n  <data name=\"TouchToReturnToCall\" xml:space=\"preserve\">\n    <value>Toque para retornar à chamada</value>\n  </data>\n  <data name=\"PaymentProvider\" xml:space=\"preserve\">\n    <value>Provedor do pagamento</value>\n  </data>\n  <data name=\"PaymentsWarning\" xml:space=\"preserve\">\n    <value>Pagamentos irão diretamente para o desenvolvedor de {0}. O Telegram não pode prover qualquer garantia, então proceda por sua conta e risco. Em caso de problemas, contate o desenvolvedor de {0} ou o seu banco.</value>\n  </data>\n  <data name=\"SavePaymentInformation\" xml:space=\"preserve\">\n    <value>Salvar Dados de Pagamento</value>\n  </data>\n  <data name=\"SavePaymentInformationHint\" xml:space=\"preserve\">\n    <value>Você pode salvar seus dados de pagamento para uso futuro.</value>\n  </data>\n  <data name=\"SavedCardHint\" xml:space=\"preserve\">\n    <value>Seu cartão {0} está no arquivo. Para pagar com este cartão, insira sua senha da Verificação em Duas Etapas.</value>\n  </data>\n  <data name=\"ChooseDifferentCard\" xml:space=\"preserve\">\n    <value>Escolher um cartão diferente</value>\n  </data>\n  <data name=\"Payments\" xml:space=\"preserve\">\n    <value>Pagamentos</value>\n  </data>\n  <data name=\"PaymentsSubtitle\" xml:space=\"preserve\">\n    <value>Limpar dados de pagamento e envio</value>\n  </data>\n  <data name=\"ShippingInfo\" xml:space=\"preserve\">\n    <value>Dados de envio</value>\n  </data>\n  <data name=\"Ringing\" xml:space=\"preserve\">\n    <value>Tocando</value>\n  </data>\n  <data name=\"TurnOnTwoStepVerification\" xml:space=\"preserve\">\n    <value>Por favor, *ative a Verificação em Duas Etapas* para habilitar isso.</value>\n  </data>\n  <data name=\"ChooseYourPhotoPickerApp\" xml:space=\"preserve\">\n    <value>Escolha seu app de galeria</value>\n  </data>\n  <data name=\"ExternalPhotoPicker\" xml:space=\"preserve\">\n    <value>Galeria Externa</value>\n  </data>\n  <data name=\"InAppPhotoPicker\" xml:space=\"preserve\">\n    <value>Galeria Interna</value>\n  </data>\n  <data name=\"PhotoPicker\" xml:space=\"preserve\">\n    <value>Galeria</value>\n  </data>\n  <data name=\"PhotoPickerSubtitle\" xml:space=\"preserve\">\n    <value>Gerenciar configurações de galeria</value>\n  </data>\n  <data name=\"Chat\" xml:space=\"preserve\">\n    <value>Chat</value>\n  </data>\n  <data name=\"Ignore\" xml:space=\"preserve\">\n    <value>Ignorar</value>\n  </data>\n  <data name=\"AddOptionalComment\" xml:space=\"preserve\">\n    <value>Adicionar um comentário opcional</value>\n  </data>\n  <data name=\"RateCallQuality\" xml:space=\"preserve\">\n    <value>Avalie a qualidade de sua chamada do Telegram</value>\n  </data>\n  <data name=\"VoipBusy\" xml:space=\"preserve\">\n    <value>Ocupado</value>\n  </data>\n  <data name=\"VoipConnecting\" xml:space=\"preserve\">\n    <value>Conectando</value>\n  </data>\n  <data name=\"VoipEnded\" xml:space=\"preserve\">\n    <value>Encerrada</value>\n  </data>\n  <data name=\"VoipExchangingKeys\" xml:space=\"preserve\">\n    <value>Trocando chaves criptográficas</value>\n  </data>\n  <data name=\"VoipFailed\" xml:space=\"preserve\">\n    <value>Falhou</value>\n  </data>\n  <data name=\"VoipHangingUp\" xml:space=\"preserve\">\n    <value>Desligando</value>\n  </data>\n  <data name=\"VoipIncoming\" xml:space=\"preserve\">\n    <value>Chamada recebida</value>\n  </data>\n  <data name=\"VoipRequesting\" xml:space=\"preserve\">\n    <value>Solicitando</value>\n  </data>\n  <data name=\"VoipRinging\" xml:space=\"preserve\">\n    <value>Tocando</value>\n  </data>\n  <data name=\"VoipWaiting\" xml:space=\"preserve\">\n    <value>Aguardando</value>\n  </data>\n  <data name=\"CallInProgressNotification\" xml:space=\"preserve\">\n    <value>Você possui uma ligação em andamento com {0}.</value>\n  </data>\n  <data name=\"Connection\" xml:space=\"preserve\">\n    <value>Conexão</value>\n  </data>\n  <data name=\"ConnectionType\" xml:space=\"preserve\">\n    <value>Tipo de Conexão</value>\n  </data>\n  <data name=\"CredentionalsOptional\" xml:space=\"preserve\">\n    <value>Credenciais (Opcional)</value>\n  </data>\n  <data name=\"Port\" xml:space=\"preserve\">\n    <value>Porta</value>\n  </data>\n  <data name=\"Server\" xml:space=\"preserve\">\n    <value>Servidor</value>\n  </data>\n  <data name=\"Socks5\" xml:space=\"preserve\">\n    <value>SOCKS5</value>\n  </data>\n  <data name=\"UseProxy\" xml:space=\"preserve\">\n    <value>Usar configurações de proxy</value>\n  </data>\n  <data name=\"Proxy\" xml:space=\"preserve\">\n    <value>Configurações de Proxy</value>\n  </data>\n  <data name=\"ConnectingToProxy\" xml:space=\"preserve\">\n    <value>Conetando ao proxy</value>\n  </data>\n  <data name=\"EnableProxyConfigmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que deseja habilitar esse proxy?</value>\n  </data>\n  <data name=\"ChangeProxy\" xml:space=\"preserve\">\n    <value>Definir Proxy</value>\n  </data>\n  <data name=\"ChangeProxyServerHint\" xml:space=\"preserve\">\n    <value>Você pode alterar seu servidor proxy nas Configurações.</value>\n  </data>\n  <data name=\"UseProxyHint\" xml:space=\"preserve\">\n    <value>Configuração de proxy SOCKS5</value>\n  </data>\n  <data name=\"DeclinedCall\" xml:space=\"preserve\">\n    <value>Chamada rejeitada</value>\n  </data>\n  <data name=\"MessageActionDeclinedCall\" xml:space=\"preserve\">\n    <value>Chamada rejeitada</value>\n  </data>\n  <data name=\"VideoMessage\" xml:space=\"preserve\">\n    <value>Mensagem de vídeo</value>\n  </data>\n  <data name=\"PeerToPeer\" xml:space=\"preserve\">\n    <value>Ponta a Ponta</value>\n  </data>\n  <data name=\"PeerToPeerDescription\" xml:space=\"preserve\">\n    <value>Desativar o ponta a ponta irá transmitir as chamadas através dos servidores do Telegram, para evitar revelar o seu endereço de IP, mas pode diminuir a qualidade do áudio.</value>\n  </data>\n  <data name=\"Bio\" xml:space=\"preserve\">\n    <value>Bio</value>\n  </data>\n  <data name=\"BioDescription\" xml:space=\"preserve\">\n    <value>Você pode adicionar algumas linhas sobre você.\nQualquer um que abrir seu perfil verá esse texto.</value>\n  </data>\n  <data name=\"MessageActionPhotoExpired\" xml:space=\"preserve\">\n    <value>Foto expirou</value>\n  </data>\n  <data name=\"MessageActionVideoExpired\" xml:space=\"preserve\">\n    <value>Vídeo expirou</value>\n  </data>\n  <data name=\"Timer\" xml:space=\"preserve\">\n    <value>Temporizador</value>\n  </data>\n  <data name=\"SelfDestructTimerPhotoSubtitle\" xml:space=\"preserve\">\n    <value>Se você definiu o temporizador, a foto será destruída após ser visualizada.</value>\n  </data>\n  <data name=\"SelfDestructTimerVideoSubtitle\" xml:space=\"preserve\">\n    <value>Se você definiu o temporizador, o vídeo será destruído após ser visualizado.</value>\n  </data>\n  <data name=\"SecretPhoto\" xml:space=\"preserve\">\n    <value>Foto Secreta</value>\n  </data>\n  <data name=\"SecretVideo\" xml:space=\"preserve\">\n    <value>Vídeo Secreto</value>\n  </data>\n  <data name=\"ChooseFromYourStickers\" xml:space=\"preserve\">\n    <value>Escolher de seus stickers</value>\n  </data>\n  <data name=\"CreateStickerSetHint\" xml:space=\"preserve\">\n    <value>Você pode criar seu próprio pacote de sticker usando o bot @stickers</value>\n  </data>\n  <data name=\"GroupStickers\" xml:space=\"preserve\">\n    <value>Stickers do Grupo</value>\n  </data>\n  <data name=\"GroupStickersDescription\" xml:space=\"preserve\">\n    <value>Você pode escolher o pacote de stickers que estará disponível aos membros do grupo.</value>\n  </data>\n  <data name=\"AddToFavorites\" xml:space=\"preserve\">\n    <value>Add aos Favoritos</value>\n  </data>\n  <data name=\"DeleteFromFavorites\" xml:space=\"preserve\">\n    <value>Deletar dos Favoritos</value>\n  </data>\n  <data name=\"NoStickerSetFound\" xml:space=\"preserve\">\n    <value>Pacote de stickers não encontrado</value>\n  </data>\n  <data name=\"NoStickerSetFoundSubtitle\" xml:space=\"preserve\">\n    <value>Tente novamente ou escolha da lista abaixo</value>\n  </data>\n  <data name=\"Auto\" xml:space=\"preserve\">\n    <value>Auto</value>\n  </data>\n  <data name=\"VideoQuality\" xml:space=\"preserve\">\n    <value>Qualidade do vídeo</value>\n  </data>\n  <data name=\"Quality\" xml:space=\"preserve\">\n    <value>Qualidade</value>\n  </data>\n  <data name=\"ClearUnreadMentionsConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza de que deseja limpar todas as menções não lidas?</value>\n  </data>\n  <data name=\"PasswordEmail\" xml:space=\"preserve\">\n    <value>Senha &amp; Email</value>\n  </data>\n  <data name=\"CreatePasswordHint\" xml:space=\"preserve\">\n    <value>Por favor, crie uma senha para proteger seus dados de pagamento.\nVocê deverá digitar a senha quando fizer o login.</value>\n  </data>\n  <data name=\"SendLiveLocation\" xml:space=\"preserve\">\n    <value>Compartilhar Minha Localização por...</value>\n  </data>\n  <data name=\"SendLiveLocationSubtitle\" xml:space=\"preserve\">\n    <value>Atualizada em tempo real enquanto você se move</value>\n  </data>\n  <data name=\"LiveLocation\" xml:space=\"preserve\">\n    <value>Localização em Tempo Real</value>\n  </data>\n  <data name=\"ShareLiveLocationToContactTimerSubtitle\" xml:space=\"preserve\">\n    <value>Escolha por quanto tempo {0} verá sua localização precisa.</value>\n  </data>\n  <data name=\"ContactJoinedTelegram\" xml:space=\"preserve\">\n    <value>Contato entrou para o Telegram</value>\n  </data>\n  <data name=\"Events\" xml:space=\"preserve\">\n    <value>Eventos</value>\n  </data>\n  <data name=\"ChatHistoryCaption\" xml:space=\"preserve\">\n    <value>Histórico do chat para novos membros</value>\n  </data>\n  <data name=\"ChatHistoryHidden\" xml:space=\"preserve\">\n    <value>Novos membros não irão ver mensagens anteriores</value>\n  </data>\n  <data name=\"ChatHistoryVisible\" xml:space=\"preserve\">\n    <value>Novos membros irão ver todas as mensagens</value>\n  </data>\n  <data name=\"DescriptionOptional\" xml:space=\"preserve\">\n    <value>Descrição (opcional)</value>\n  </data>\n  <data name=\"Hidden\" xml:space=\"preserve\">\n    <value>Oculto</value>\n  </data>\n  <data name=\"Visible\" xml:space=\"preserve\">\n    <value>Visível</value>\n  </data>\n  <data name=\"LocationSharingEnded\" xml:space=\"preserve\">\n    <value>Compartilhamento de Localização Finalizado</value>\n  </data>\n  <data name=\"Map\" xml:space=\"preserve\">\n    <value>Mapa</value>\n  </data>\n  <data name=\"MessageActionPinGeoLive\" xml:space=\"preserve\">\n    <value>{0} fixou uma localização em tempo real</value>\n  </data>\n  <data name=\"For15Minutes\" xml:space=\"preserve\">\n    <value>Por 15 minutos</value>\n  </data>\n  <data name=\"For1Hour\" xml:space=\"preserve\">\n    <value>Por 1 hora</value>\n  </data>\n  <data name=\"For8Hours\" xml:space=\"preserve\">\n    <value>Por 8 horas</value>\n  </data>\n  <data name=\"MessageActionClearHistory\" xml:space=\"preserve\">\n    <value>O histórico foi apagado</value>\n  </data>\n  <data name=\"Updated\" xml:space=\"preserve\">\n    <value>Atualizado</value>\n  </data>\n  <data name=\"UpdatedAgo\" xml:space=\"preserve\">\n    <value>Atualizado {0} atrás</value>\n  </data>\n  <data name=\"UpdatedAtDate\" xml:space=\"preserve\">\n    <value>Atualizado {0} às {1}</value>\n  </data>\n  <data name=\"UpdatedJustNow\" xml:space=\"preserve\">\n    <value>Atualizado agora</value>\n  </data>\n  <data name=\"UpdatedTodayAt\" xml:space=\"preserve\">\n    <value>Atualizado hoje às {0}</value>\n  </data>\n  <data name=\"UpdatedYesterdayAt\" xml:space=\"preserve\">\n    <value>Atualizado ontem às {0}</value>\n  </data>\n  <data name=\"StopSharingLocation\" xml:space=\"preserve\">\n    <value>Parar Compartilhamento de Localização</value>\n  </data>\n  <data name=\"ShareLiveLocationToChatTimerSubtitle\" xml:space=\"preserve\">\n    <value>Escolha por quanto tempo as pessoas nesse chat verão sua localização precisa.</value>\n  </data>\n  <data name=\"NewStickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Novos pacotes de stickers</value>\n  </data>\n  <data name=\"NewStickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Novo pacote de stickers</value>\n  </data>\n  <data name=\"StickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Pacotes de stickers</value>\n  </data>\n  <data name=\"StickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Pacote de stickers</value>\n  </data>\n  <data name=\"MaskPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Pacotes de máscaras</value>\n  </data>\n  <data name=\"MaskPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Pacote de máscaras</value>\n  </data>\n  <data name=\"GroupNameInvalid\" xml:space=\"preserve\">\n    <value>Desculpe, esse nome é inválido.</value>\n  </data>\n  <data name=\"GroupNameOccupied\" xml:space=\"preserve\">\n    <value>Desculpe, esse nome já está em uso.</value>\n  </data>\n  <data name=\"GroupNameShort\" xml:space=\"preserve\">\n    <value>Nomes de grupos devem ter, pelo menos, 5 caracteres.</value>\n  </data>\n  <data name=\"GroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Nomes de grupos não podem começar com um número.</value>\n  </data>\n  <data name=\"AttachLiveLocationIsSharing\" xml:space=\"preserve\">\n    <value>Compartilhando com {0}</value>\n  </data>\n  <data name=\"SharingLiveLocationTitle\" xml:space=\"preserve\">\n    <value>Você está compartilhando sua Localização em Tempo Real com {0}</value>\n  </data>\n  <data name=\"SharingYouAndOtherName\" xml:space=\"preserve\">\n    <value>Você e {0}</value>\n  </data>\n  <data name=\"StopAllLocationSharings\" xml:space=\"preserve\">\n    <value>Parar Tudo</value>\n  </data>\n  <data name=\"StopLiveLocationAlertAll\" xml:space=\"preserve\">\n    <value>Tem certeza de que deseja encerrar o compartilhamento de localização?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToGroup\" xml:space=\"preserve\">\n    <value>Tem certeza de que deseja encerrar o compartilhamento de localização com {0}?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToUser\" xml:space=\"preserve\">\n    <value>Tem certeza de que deseja encerrar o compartilhamento de localização com {0}?</value>\n  </data>\n  <data name=\"HourShort\" xml:space=\"preserve\">\n    <value>h</value>\n  </data>\n  <data name=\"ChatGenitivePlural\" xml:space=\"preserve\">\n    <value>Conversas</value>\n  </data>\n  <data name=\"ChatGenitiveSingular\" xml:space=\"preserve\">\n    <value>Conversa</value>\n  </data>\n  <data name=\"ChatNominativePlural\" xml:space=\"preserve\">\n    <value>Conversas</value>\n  </data>\n  <data name=\"ChatNominativeSingular\" xml:space=\"preserve\">\n    <value>Conversa</value>\n  </data>\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\n    <value>Mensagens Salvas</value>\n  </data>\n  <data name=\"ForwardHereToSave\" xml:space=\"preserve\">\n    <value>Encaminhe aqui para salvar.</value>\n  </data>\n  <data name=\"MicrophoneAccessDenied\" xml:space=\"preserve\">\n    <value>Acesso ao microfone negado</value>\n  </data>\n  <data name=\"MicrophoneAccessDeniedDescription\" xml:space=\"preserve\">\n    <value>Telegram não pôde acessar o microfone. Por favor, certifique-se de que Telegram tem permissão para usar o microfone nas Configurações de Privacidade e reinicie o app.</value>\n  </data>\n  <data name=\"SendCallLogs\" xml:space=\"preserve\">\n    <value>Enviar Logs de Chamadas</value>\n  </data>\n  <data name=\"GroupMediaDescription\" xml:space=\"preserve\">\n    <value>Agrupar mídia em uma mensagem</value>\n  </data>\n  <data name=\"UngroupMediaDescription\" xml:space=\"preserve\">\n    <value>Mostrar mídia como mensagens separadas</value>\n  </data>\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\n    <value>Conta excluída</value>\n  </data>\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\n    <value>Conta excluída</value>\n  </data>\n  <data name=\"Album\" xml:space=\"preserve\">\n    <value>Álbum</value>\n  </data>\n  <data name=\"DeleteMessagesConfirmation\" xml:space=\"preserve\">\n    <value>Você tem certeza que quer remover {0}?</value>\n  </data>\n  <data name=\"MessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Mensagens</value>\n  </data>\n  <data name=\"MessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Mensagem</value>\n  </data>\n  <data name=\"MessageNominativePlural\" xml:space=\"preserve\">\n    <value>Mensagens</value>\n  </data>\n  <data name=\"MessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Mensagem</value>\n  </data>\n  <data name=\"SubscriberGenitivePlural\" xml:space=\"preserve\">\n    <value>Inscritos</value>\n  </data>\n  <data name=\"SubscriberGenitiveSingular\" xml:space=\"preserve\">\n    <value>Inscrito</value>\n  </data>\n  <data name=\"SubscriberNominativePlural\" xml:space=\"preserve\">\n    <value>Inscritos</value>\n  </data>\n  <data name=\"SubscriberNominativeSingular\" xml:space=\"preserve\">\n    <value>Inscrito</value>\n  </data>\n  <data name=\"LogOutAllApplications\" xml:space=\"preserve\">\n    <value>Desconectar todos os sites</value>\n  </data>\n  <data name=\"LogOutAllApplicationsNote\" xml:space=\"preserve\">\n    <value/>\n  </data>\n  <data name=\"LoggedInWithTelegram\" xml:space=\"preserve\">\n    <value>Logado com o Telegram</value>\n  </data>\n  <data name=\"LogOutAllApplicationsConfirmation\" xml:space=\"preserve\">\n    <value>Tem certeza que deseja desconectar de todos os sites onde você logou usando o Telegram?</value>\n  </data>\n  <data name=\"NoItemsHere\" xml:space=\"preserve\">\n    <value>Nenhum item aqui</value>\n  </data>\n  <data name=\"Group\" xml:space=\"preserve\">\n    <value>Agrupar</value>\n  </data>\n  <data name=\"Ungroup\" xml:space=\"preserve\">\n    <value>Desagrupar</value>\n  </data>\n  <data name=\"AboutApp\" xml:space=\"preserve\">\n    <value>Sobre</value>\n  </data>\n  <data name=\"NoActiveLogins\" xml:space=\"preserve\">\n    <value>Nenhum login ativo.\n\nVocê pode entrar em sites que suportam o login com o Telegram.</value>\n  </data>\n  <data name=\"Feed\" xml:space=\"preserve\">\n    <value>Feed</value>\n  </data>\n  <data name=\"ChannelGenitivePlural\" xml:space=\"preserve\">\n    <value>Canais</value>\n  </data>\n  <data name=\"ChannelGenitiveSingular\" xml:space=\"preserve\">\n    <value>Canal</value>\n  </data>\n  <data name=\"ChannelNominativePlural\" xml:space=\"preserve\">\n    <value>Canais</value>\n  </data>\n  <data name=\"ChannelNominativeSingular\" xml:space=\"preserve\">\n    <value>Canal</value>\n  </data>\n  <data name=\"ShowNext\" xml:space=\"preserve\">\n    <value>Mostrar mais</value>\n  </data>\n  <data name=\"GroupNewChannels\" xml:space=\"preserve\">\n    <value>Agrupar novos canais</value>\n  </data>\n  <data name=\"MessageActionBotAllowed\" xml:space=\"preserve\">\n    <value>Você permitiu que este bot te enviasse mensagens quando logou em {0}</value>\n  </data>\n  <data name=\"NoStickersFound\" xml:space=\"preserve\">\n    <value>Nenhum sticker encontrado</value>\n  </data>\n  <data name=\"ConnectedWebsites\" xml:space=\"preserve\">\n    <value>Sites conectados</value>\n  </data>\n  <data name=\"ConnectedWebsitesHint\" xml:space=\"preserve\">\n    <value>Você pode entrar em sites que suportam o login com o Telegram.</value>\n  </data>\n  <data name=\"TapToDisconnectTelegramAccount\" xml:space=\"preserve\">\n    <value>Toque para desconectar de sua conta do Telegram.</value>\n  </data>\n  <data name=\"TelegramPassport\" xml:space=\"preserve\">\n    <value>Telegram Passport</value>\n  </data>\n  <data name=\"Authorize\" xml:space=\"preserve\">\n    <value>Autorizar</value>\n  </data>\n  <data name=\"Email2\" xml:space=\"preserve\">\n    <value>E-Mail</value>\n  </data>\n  <data name=\"PassportPersonalDetailsInfo\" xml:space=\"preserve\">\n    <value>Preencha seus detalhes pessoais</value>\n  </data>\n  <data name=\"PassportHint\" xml:space=\"preserve\">\n    <value>{0} requer acesso aos seus dados pessoais para registrar você no serviço deles</value>\n  </data>\n  <data name=\"PassportAddress\" xml:space=\"preserve\">\n    <value>Endereço</value>\n  </data>\n  <data name=\"PassportAddressInfo\" xml:space=\"preserve\">\n    <value>Upload proof of your address</value>\n  </data>\n  <data name=\"PassportNoPolicy\" xml:space=\"preserve\">\n    <value>Você está enviando seus documentos diretamente para {0} e permitindo que {1} envie mensagens para você.</value>\n  </data>\n  <data name=\"AllSets\" xml:space=\"preserve\">\n    <value>Todos os Pacotes</value>\n  </data>\n  <data name=\"MySets\" xml:space=\"preserve\">\n    <value>Meus Pacotes</value>\n  </data>\n  <data name=\"None\" xml:space=\"preserve\">\n    <value>Nenhum</value>\n  </data>\n  <data name=\"SuggestStickersByEmoji\" xml:space=\"preserve\">\n    <value>Sugerir stickers por emoji</value>\n  </data>\n  <data name=\"MTProto\" xml:space=\"preserve\">\n    <value>MTPROTO</value>\n  </data>\n  <data name=\"UseProxyForCalls\" xml:space=\"preserve\">\n    <value>Usar proxy para chamadas</value>\n  </data>\n  <data name=\"UseProxyForCallsHint\" xml:space=\"preserve\">\n    <value>Servidores de proxy podem diminuir a qualidade das chamadas.</value>\n  </data>\n  <data name=\"Connections\" xml:space=\"preserve\">\n    <value>Conexões</value>\n  </data>\n  <data name=\"AddProxy\" xml:space=\"preserve\">\n    <value>Adicionar Proxy</value>\n  </data>\n  <data name=\"Secret\" xml:space=\"preserve\">\n    <value>Secreto</value>\n  </data>\n  <data name=\"UseTelegramProxyHint\" xml:space=\"preserve\">\n    <value>Configurações de proxy do Telegram</value>\n  </data>\n  <data name=\"Available\" xml:space=\"preserve\">\n    <value>Disponível</value>\n  </data>\n  <data name=\"Checking\" xml:space=\"preserve\">\n    <value>Verificando</value>\n  </data>\n  <data name=\"Connected\" xml:space=\"preserve\">\n    <value>Conectado</value>\n  </data>\n  <data name=\"Unavailable\" xml:space=\"preserve\">\n    <value>Indisponível</value>\n  </data>\n  <data name=\"TermsOfService\" xml:space=\"preserve\">\n    <value>Termos de Serviço</value>\n  </data>\n  <data name=\"TermsOfServiceLink\" xml:space=\"preserve\">\n    <value>Ao se inscrever,\nvocê concorda com os *Termos de Serviço*.</value>\n  </data>\n  <data name=\"DeleteSyncedContacts\" xml:space=\"preserve\">\n    <value>Deletar Contatos Sincronizados</value>\n  </data>\n  <data name=\"SyncContacts\" xml:space=\"preserve\">\n    <value>Sincronizar Contatos</value>\n  </data>\n  <data name=\"SyncContactsDeleteInfo\" xml:space=\"preserve\">\n    <value>Isso irá remover seus contatos dos servidores do Telegram. Se \"Sincronizar Contatos\" estiver ativado, eles serão sincronizados novamente.</value>\n  </data>\n  <data name=\"SyncContactsInfoOff\" xml:space=\"preserve\">\n    <value>Ative para sincronizar continuamente os contatos deste dispositivo com sua conta.</value>\n  </data>\n  <data name=\"SyncContactsInfoOn\" xml:space=\"preserve\">\n    <value>Contatos deste dispositivo serão adicionados à sua conta.</value>\n  </data>\n  <data name=\"LinkPreviewsHint\" xml:space=\"preserve\">\n    <value>As visualizações de links serão geradas nos servidores do Telegram. Nós não armazenamos dados sobre os links que você envia.</value>\n  </data>\n  <data name=\"DeleteSyncedContactsConfirmation\" xml:space=\"preserve\">\n    <value>Isso removerá seus contatos dos servidores do Telegram. Se 'Sincronizar Contatos' estiver ativado, os contatos serão sincronizados novamente.</value>\n  </data>\n  <data name=\"ProxyDisabledNotification\" xml:space=\"preserve\">\n    <value>O proxy que você está usando não está configurado corretamente e será desativado. Por favor, encontre outro.</value>\n  </data>\n  <data name=\"ProxySponsor\" xml:space=\"preserve\">\n    <value>Patrocinador do proxy</value>\n  </data>\n  <data name=\"ProxySponsorAbout\" xml:space=\"preserve\">\n    <value>Este canal é mostrado pelo seu servidor proxy.\nPara remover este canal da sua lista de bate-papos,\ndesative o proxy nas configurações do Telegram.</value>\n  </data>\n  <data name=\"ProxySponsorWarning\" xml:space=\"preserve\">\n    <value>Este proxy pode exibir um canal patrocinado em sua lista de bate-papo. Isso não revela nada do seu tráfego no Telegram.</value>\n  </data>\n  <data name=\"MarkRead\" xml:space=\"preserve\">\n    <value>Marcar como lido</value>\n  </data>\n  <data name=\"MarkUnread\" xml:space=\"preserve\">\n    <value>Marcar como não-lido</value>\n  </data>\n  <data name=\"SuggestFrequentContacts\" xml:space=\"preserve\">\n    <value>Sugerir Contatos Frequentes</value>\n  </data>\n  <data name=\"SuggestFrequentContactsAbout\" xml:space=\"preserve\">\n    <value>Exiba as pessoas com quem você conversa bastante no topo da seção de pesquisa para acesso rápido.</value>\n  </data>\n  <data name=\"SuggestFrequentContactsNotification\" xml:space=\"preserve\">\n    <value>Isso excluirá todos os dados sobre as pessoas com quem você conversa com frequência, bem como os bots in-line que você provavelmente usaria.</value>\n  </data>\n  <data name=\"ViewContact\" xml:space=\"preserve\">\n    <value>Ver contato</value>\n  </data>\n  <data name=\"PhoneKindHome\" xml:space=\"preserve\">\n    <value>Casa</value>\n  </data>\n  <data name=\"PhoneKindMobile\" xml:space=\"preserve\">\n    <value>Móvel</value>\n  </data>\n  <data name=\"PhoneKindOther\" xml:space=\"preserve\">\n    <value>Outro</value>\n  </data>\n  <data name=\"PhoneKindWork\" xml:space=\"preserve\">\n    <value>Trabalho</value>\n  </data>\n  <data name=\"PassportAddAgreement\" xml:space=\"preserve\">\n    <value>Adicionar Contrato de Aluguel</value>\n  </data>\n  <data name=\"PassportAddAgreementInfo\" xml:space=\"preserve\">\n    <value>Envie a digitalização do seu contrato de locação</value>\n  </data>\n  <data name=\"PassportAddBank\" xml:space=\"preserve\">\n    <value>Adicionar Extrato Bancário</value>\n  </data>\n  <data name=\"PassportAddBankInfo\" xml:space=\"preserve\">\n    <value>Envie a digitalização do seu extrato bancário</value>\n  </data>\n  <data name=\"PassportAddBill\" xml:space=\"preserve\">\n    <value>Adicionar Fatura de Serviço</value>\n  </data>\n  <data name=\"PassportAddBillInfo\" xml:space=\"preserve\">\n    <value>Envie a digitalização de uma fatura de serviço</value>\n  </data>\n  <data name=\"PassportAddPassportRegistration\" xml:space=\"preserve\">\n    <value>Registro do Passaporte</value>\n  </data>\n  <data name=\"PassportAddPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>Envie uma digitalização da página de registro do passaporte.</value>\n  </data>\n  <data name=\"PassportAddressHeader\" xml:space=\"preserve\">\n    <value>Endereço</value>\n  </data>\n  <data name=\"PassportCity\" xml:space=\"preserve\">\n    <value>Cidade</value>\n  </data>\n  <data name=\"PassportCountry\" xml:space=\"preserve\">\n    <value>País</value>\n  </data>\n  <data name=\"PassportDeleteDocument\" xml:space=\"preserve\">\n    <value>Deletar documento</value>\n  </data>\n  <data name=\"PassportDeleteDocumentAlert\" xml:space=\"preserve\">\n    <value>Tem certeza de que deseja deletar este documento?</value>\n  </data>\n  <data name=\"PassportDeleteScan\" xml:space=\"preserve\">\n    <value>Delete scan</value>\n  </data>\n  <data name=\"PassportDocuments\" xml:space=\"preserve\">\n    <value>Digitalizações</value>\n  </data>\n  <data name=\"PassportPostcode\" xml:space=\"preserve\">\n    <value>CEP</value>\n  </data>\n  <data name=\"PassportState\" xml:space=\"preserve\">\n    <value>Estado</value>\n  </data>\n  <data name=\"PassportStreet1\" xml:space=\"preserve\">\n    <value>Rua</value>\n  </data>\n  <data name=\"PassportStreet2\" xml:space=\"preserve\">\n    <value>Rua</value>\n  </data>\n  <data name=\"PassportUploadAdditinalDocument\" xml:space=\"preserve\">\n    <value>Enviar Digitalizações Adicionais</value>\n  </data>\n  <data name=\"PassportUploadDocument\" xml:space=\"preserve\">\n    <value>Enviar Digitalizações</value>\n  </data>\n  <data name=\"PassportDeleteScanAlert\" xml:space=\"preserve\">\n    <value>Tem certeza de que deseja excluir esta verificação?</value>\n  </data>\n  <data name=\"PassportEmailInfo\" xml:space=\"preserve\">\n    <value>Digite seu endereço de email</value>\n  </data>\n  <data name=\"PassportPhoneInfo\" xml:space=\"preserve\">\n    <value>Digite seu número de telefone</value>\n  </data>\n  <data name=\"UpdateApp\" xml:space=\"preserve\">\n    <value>Atualizar app</value>\n  </data>\n  <data name=\"PassportPhone\" xml:space=\"preserve\">\n    <value>Número de telefone</value>\n  </data>\n  <data name=\"PassportPhoneUploadInfo\" xml:space=\"preserve\">\n    <value>Nota: Você irá receber um código de confirmação no telefone que você fornecer.</value>\n  </data>\n  <data name=\"PassportPhoneUseOther\" xml:space=\"preserve\">\n    <value>Ou digite um novo número de telefone</value>\n  </data>\n  <data name=\"PassportPhoneUseSame\" xml:space=\"preserve\">\n    <value>Usar {0}</value>\n  </data>\n  <data name=\"PassportPhoneUseSameInfo\" xml:space=\"preserve\">\n    <value>Usar o mesmo número de telefone do Telegram.</value>\n  </data>\n  <data name=\"PassportDeletePhoneNumberAlert\" xml:space=\"preserve\">\n    <value>Tem certeza de que deseja apagar o número de telefone?</value>\n  </data>\n  <data name=\"MessageActionSecureValuesSent\" xml:space=\"preserve\">\n    <value>{0} recebeu os seguintes documentos: {1}</value>\n  </data>\n  <data name=\"DeleteAllCloudDrafts\" xml:space=\"preserve\">\n    <value>Deletar Rascunhos da Nuvem</value>\n  </data>\n  <data name=\"DeleteAllCloudDraftsConfirmation\" xml:space=\"preserve\">\n    <value>Tem certeza de que deseja deletar todos os rascunhos da nuvem?</value>\n  </data>\n  <data name=\"PassportRequestPasswordInfo\" xml:space=\"preserve\">\n    <value>Por favor, digite sua senha do Telegram para descriptografar seus dados.</value>\n  </data>\n  <data name=\"PassportSelfRequest\" xml:space=\"preserve\">\n    <value>Por favor, digite sua senha para acessar seus dados pessoais.</value>\n  </data>\n  <data name=\"PassportDelete\" xml:space=\"preserve\">\n    <value>Deletar</value>\n  </data>\n  <data name=\"PassportNoDocumentsAdd\" xml:space=\"preserve\">\n    <value>Adicionar um Documento</value>\n  </data>\n  <data name=\"PassportEmail\" xml:space=\"preserve\">\n    <value>Email</value>\n  </data>\n  <data name=\"PassportPersonal\" xml:space=\"preserve\">\n    <value>Detalhes Pessoais</value>\n  </data>\n  <data name=\"PassportUtilityBill\" xml:space=\"preserve\">\n    <value>Fatura de Serviço</value>\n  </data>\n  <data name=\"PassportProvidedInformation\" xml:space=\"preserve\">\n    <value>Informação Fornecida</value>\n  </data>\n  <data name=\"PassportRequestedInformation\" xml:space=\"preserve\">\n    <value>Informação Requerida</value>\n  </data>\n  <data name=\"PassportDeleteConfirmation\" xml:space=\"preserve\">\n    <value>Tem certeza de que deseja excluir seu Telegram Passport?</value>\n  </data>\n  <data name=\"Passport\" xml:space=\"preserve\">\n    <value>Passaporte</value>\n  </data>\n  <data name=\"PassportBankStatement\" xml:space=\"preserve\">\n    <value>Extrato Bancário</value>\n  </data>\n  <data name=\"PassportDriverLicence\" xml:space=\"preserve\">\n    <value>Carteira de motorista</value>\n  </data>\n  <data name=\"PassportEmailAddress\" xml:space=\"preserve\">\n    <value>Endereço de e-mail</value>\n  </data>\n  <data name=\"PassportIdentityCard\" xml:space=\"preserve\">\n    <value>Carteira de Identidade</value>\n  </data>\n  <data name=\"PassportInternal\" xml:space=\"preserve\">\n    <value>Passaporte Interno</value>\n  </data>\n  <data name=\"PassportPersonalDetails\" xml:space=\"preserve\">\n    <value>Detalhes pessoais</value>\n  </data>\n  <data name=\"PassportPhoneNumber\" xml:space=\"preserve\">\n    <value>Número de Telefone</value>\n  </data>\n  <data name=\"PassportRegistration\" xml:space=\"preserve\">\n    <value>Registro do Passaporte</value>\n  </data>\n  <data name=\"PassportTemporaryRegistration\" xml:space=\"preserve\">\n    <value>Registro Temporário</value>\n  </data>\n  <data name=\"PassportTenancyAgreement\" xml:space=\"preserve\">\n    <value>Contrato de Locação</value>\n  </data>\n  <data name=\"PassportDeleteEmailAlert\" xml:space=\"preserve\">\n    <value>Tem certeza de que deseja excluir o e-mail?</value>\n  </data>\n  <data name=\"PassportDeleteAll\" xml:space=\"preserve\">\n    <value>Apagar Passport</value>\n  </data>\n  <data name=\"PassportDeleteAddressAlert\" xml:space=\"preserve\">\n    <value>Tem certeza de que deseja excluir os detalhes do endereço?</value>\n  </data>\n  <data name=\"PassportAddTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Envie uma digitalização do seu registro temporário.</value>\n  </data>\n  <data name=\"PassportResidentialAddress\" xml:space=\"preserve\">\n    <value>Endereço Residencial</value>\n  </data>\n  <data name=\"PassportDeleteAddressDetails\" xml:space=\"preserve\">\n    <value>Excluir detalhes do endereço</value>\n  </data>\n  <data name=\"PassportUploadMaxReached\" xml:space=\"preserve\">\n    <value>Você não pode enviar mais do que {0} arquivos.</value>\n  </data>\n  <data name=\"PassportCorrectErrors\" xml:space=\"preserve\">\n    <value>Toque para corrigir erros.</value>\n  </data>\n  <data name=\"PassportUseLatinOnly\" xml:space=\"preserve\">\n    <value>Por favor, use apenas caracteres latinos.</value>\n  </data>\n  <data name=\"PassportInfo\" xml:space=\"preserve\">\n    <value>Com o Telegram Passport, você pode facilmente se inscrever em sites e serviços que exigem verificação de identidade.\n\nSuas informações, dados pessoais e documentos são protegidos por criptografia de ponta a ponta. Ninguém, incluindo o Telegram, pode acessá-las sem sua permissão.\n\nVocê pode visitar nosso FAQ para saber mais.</value>\n  </data>\n  <data name=\"PassportFormError\" xml:space=\"preserve\">\n    <value>Não foi possível obter o formulário de autorização.</value>\n  </data>\n  <data name=\"TurnPasswordOffPassport\" xml:space=\"preserve\">\n    <value>Atenção! Todos os dados salvos no seu Telegram Passport serão perdidos!</value>\n  </data>\n  <data name=\"TurnPasswordOffQuestion\" xml:space=\"preserve\">\n    <value>Tem certeza de que deseja desativar sua senha?</value>\n  </data>\n  <data name=\"PassportNoDocuments\" xml:space=\"preserve\">\n    <value>Você ainda não tem documentos</value>\n  </data>\n  <data name=\"PassportNoDocumentsInfo\" xml:space=\"preserve\">\n    <value>Você pode adicionar seu número de telefone, endereço de e-mail, documento de identidade ou endereço residencial.</value>\n  </data>\n  <data name=\"TelegramPassportCreatePassword\" xml:space=\"preserve\">\n    <value>Crie uma senha</value>\n  </data>\n  <data name=\"TelegramPassportCreatePasswordInfo\" xml:space=\"preserve\">\n    <value>Por favor, crie uma senha para proteger seus dados pessoais com criptografia de ponta a ponta.\n\nEssa senha também será necessária sempre que você fizer login no Telegram em um novo dispositivo.</value>\n  </data>\n  <data name=\"PassportEmailUploadInfo\" xml:space=\"preserve\">\n    <value>Nota: Você receberá um código de confirmação no endereço de e-mail fornecido.</value>\n  </data>\n  <data name=\"PassportEmailUseSameInfo\" xml:space=\"preserve\">\n    <value>Use o mesmo email que o do Telegram.</value>\n  </data>\n  <data name=\"EmailInvalidString\" xml:space=\"preserve\">\n    <value>E-mail inválido. Por favor, tente novamente.</value>\n  </data>\n  <data name=\"PassportEmailVerifyInfo\" xml:space=\"preserve\">\n    <value>Por favor, insira o código de confirmação que enviamos para {0}.</value>\n  </data>\n  <data name=\"EmailCodeEmpty\" xml:space=\"preserve\">\n    <value>Código está vazio. Por favor, tente novamente.</value>\n  </data>\n  <data name=\"EmailCodeExpiredString\" xml:space=\"preserve\">\n    <value>Código expirado. Por favor, tente novamente.</value>\n  </data>\n  <data name=\"EmailCodeInvalidString\" xml:space=\"preserve\">\n    <value>Você inseriu um código inválido. Por favor, tente novamente.</value>\n  </data>\n  <data name=\"PassportBirthdate\" xml:space=\"preserve\">\n    <value>Data de Nascimento</value>\n  </data>\n  <data name=\"PassportCitizenship\" xml:space=\"preserve\">\n    <value>Cidadania</value>\n  </data>\n  <data name=\"PassportFemale\" xml:space=\"preserve\">\n    <value>Feminino</value>\n  </data>\n  <data name=\"PassportGender\" xml:space=\"preserve\">\n    <value>Gênero</value>\n  </data>\n  <data name=\"PassportMale\" xml:space=\"preserve\">\n    <value>Masculino</value>\n  </data>\n  <data name=\"PassportName\" xml:space=\"preserve\">\n    <value>Nome</value>\n  </data>\n  <data name=\"PassportResidence\" xml:space=\"preserve\">\n    <value>Residência</value>\n  </data>\n  <data name=\"PassportSurname\" xml:space=\"preserve\">\n    <value>Last name</value>\n  </data>\n  <data name=\"PassportSelectGender\" xml:space=\"preserve\">\n    <value>Gênero</value>\n  </data>\n  <data name=\"PassportSelectDate\" xml:space=\"preserve\">\n    <value>Select Date</value>\n  </data>\n  <data name=\"PassportDocumentNumber\" xml:space=\"preserve\">\n    <value>Número do Documento</value>\n  </data>\n  <data name=\"PassportExpired\" xml:space=\"preserve\">\n    <value>Expira</value>\n  </data>\n  <data name=\"PassportFrontSide\" xml:space=\"preserve\">\n    <value>Frente</value>\n  </data>\n  <data name=\"PassportFrontSideInfo\" xml:space=\"preserve\">\n    <value>Envie uma foto da frente do documento</value>\n  </data>\n  <data name=\"PassportPersonalUploadInfo\" xml:space=\"preserve\">\n    <value>O documento deve conter sua foto, nome e sobrenome, data de nascimento, número do documento, país de emissão e data de validade.</value>\n  </data>\n  <data name=\"PassportRequiredDocuments\" xml:space=\"preserve\">\n    <value>Documentos Requeridos</value>\n  </data>\n  <data name=\"PassportReverseSide\" xml:space=\"preserve\">\n    <value>Verso</value>\n  </data>\n  <data name=\"PassportReverseSideInfo\" xml:space=\"preserve\">\n    <value>Envie uma foto do verso do documento</value>\n  </data>\n  <data name=\"PassportSelfie\" xml:space=\"preserve\">\n    <value>Selfie</value>\n  </data>\n  <data name=\"PassportSelfieInfo\" xml:space=\"preserve\">\n    <value>Envie uma selfie de você segurando o documento</value>\n  </data>\n  <data name=\"PassportSelectNotExpire\" xml:space=\"preserve\">\n    <value>Não Expira</value>\n  </data>\n  <data name=\"PassportDeleteDocumentPersonal\" xml:space=\"preserve\">\n    <value>Deletar detalhes pessoais</value>\n  </data>\n  <data name=\"PassportMainPage\" xml:space=\"preserve\">\n    <value>Página Principal</value>\n  </data>\n  <data name=\"PassportMainPageInfo\" xml:space=\"preserve\">\n    <value>Envie uma foto da página principal do documento</value>\n  </data>\n  <data name=\"PassportNoExpireDate\" xml:space=\"preserve\">\n    <value>Nenhum</value>\n  </data>\n  <data name=\"UpdateAppAlert\" xml:space=\"preserve\">\n    <value>Desculpe, seu aplicativo do Telegram está desatualizado e não pode atender a essa solicitação. Por favor, atualize o Telegram.</value>\n  </data>\n  <data name=\"PassportInfoTitle\" xml:space=\"preserve\">\n    <value>O que é o Telegram Passport?</value>\n  </data>\n  <data name=\"Copyright\" xml:space=\"preserve\">\n    <value>Copyright</value>\n  </data>\n  <data name=\"PassportAddTranslationDriverLicenceInfo\" xml:space=\"preserve\">\n    <value>Upload scans of a certified English translation of your driver licence.</value>\n  </data>\n  <data name=\"PassportAddTranslationIdentityCardInfo\" xml:space=\"preserve\">\n    <value>Upload scans of a certified English translation of your identity card.</value>\n  </data>\n  <data name=\"PassportAddTranslationInternalPassportInfo\" xml:space=\"preserve\">\n    <value>Upload scans of a certified English translation of your internal passport.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportInfo\" xml:space=\"preserve\">\n    <value>Upload scans of a certified English translation of your passport.</value>\n  </data>\n  <data name=\"PassportAddTranslationAgreementInfo\" xml:space=\"preserve\">\n    <value>Upload scans of a certified English translation of your tenancy agreement.</value>\n  </data>\n  <data name=\"PassportAddTranslationBankInfo\" xml:space=\"preserve\">\n    <value>Upload scans of a certified English translation of your bank statement.</value>\n  </data>\n  <data name=\"PassportAddTranslationBillInfo\" xml:space=\"preserve\">\n    <value>Upload scans of a certified English translation of your utility bill.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>Upload scans of a certified English translation of your passport registration page.</value>\n  </data>\n  <data name=\"PassportAddTranslationTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Upload scans of a certified English translation of your temporary registration.</value>\n  </data>\n  <data name=\"PassportAddTranslationUploadInfo\" xml:space=\"preserve\">\n    <value>Upload scans of a certified English translation of the document.</value>\n  </data>\n  <data name=\"PassportTranslation\" xml:space=\"preserve\">\n    <value>Translation</value>\n  </data>\n  <data name=\"PassportDataCorrupted\" xml:space=\"preserve\">\n    <value>It seems your Telegram Passport data was corrupted.\nYou can reset your Telegram Passport.</value>\n  </data>\n  <data name=\"PassportOr\" xml:space=\"preserve\">\n    <value>{0} or {1}</value>\n  </data>\n  <data name=\"PassportIdentityDocument\" xml:space=\"preserve\">\n    <value>Identity Document</value>\n  </data>\n  <data name=\"PassportAddressNoUploadInfo\" xml:space=\"preserve\">\n    <value>Please provide your address</value>\n  </data>\n  <data name=\"PassportIdentityDocumentInfo\" xml:space=\"preserve\">\n    <value>Upload a scan of your passport or other ID</value>\n  </data>\n  <data name=\"PassportIdentityDriverLicence\" xml:space=\"preserve\">\n    <value>Upload a scan of your driver's licence</value>\n  </data>\n  <data name=\"PassportIdentityID\" xml:space=\"preserve\">\n    <value>Upload a scan of your identity card</value>\n  </data>\n  <data name=\"PassportIdentityInternalPassport\" xml:space=\"preserve\">\n    <value>Upload a scan of your internal passport</value>\n  </data>\n  <data name=\"PassportIdentityPassport\" xml:space=\"preserve\">\n    <value>Upload a scan of your passport</value>\n  </data>\n  <data name=\"PassportMidname\" xml:space=\"preserve\">\n    <value>Middle name</value>\n  </data>\n  <data name=\"PassportMidnameCountry\" xml:space=\"preserve\">\n    <value>Middle name ({0})</value>\n  </data>\n  <data name=\"PassportMidnameLatin\" xml:space=\"preserve\">\n    <value>Middle name (latin)</value>\n  </data>\n  <data name=\"PassportNameCountry\" xml:space=\"preserve\">\n    <value>Name ({0})</value>\n  </data>\n  <data name=\"PassportNameLatin\" xml:space=\"preserve\">\n    <value>Name (latin)</value>\n  </data>\n  <data name=\"PassportNativeHeader\" xml:space=\"preserve\">\n    <value>Your name</value>\n  </data>\n  <data name=\"PassportNativeInfo\" xml:space=\"preserve\">\n    <value>Your name in the language of your country of residence ({0}).</value>\n  </data>\n  <data name=\"PassportSurnameCountry\" xml:space=\"preserve\">\n    <value>Last name ({0})</value>\n  </data>\n  <data name=\"PassportSurnameLatin\" xml:space=\"preserve\">\n    <value>Last name (latin)</value>\n  </data>\n</root>\n"
  },
  {
    "path": "TelegramClient/Resources/AppResources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"AppName\" xml:space=\"preserve\">\r\n    <value>Telegram</value>\r\n  </data>\r\n  <data name=\"BlockContact\" xml:space=\"preserve\">\r\n    <value>Block</value>\r\n  </data>\r\n  <data name=\"BlockedUsers\" xml:space=\"preserve\">\r\n    <value>Blacklist</value>\r\n  </data>\r\n  <data name=\"Call\" xml:space=\"preserve\">\r\n    <value>Call</value>\r\n  </data>\r\n  <data name=\"Contacts\" xml:space=\"preserve\">\r\n    <value>Contacts</value>\r\n  </data>\r\n  <data name=\"Copy\" xml:space=\"preserve\">\r\n    <value>Copy</value>\r\n  </data>\r\n  <data name=\"Delete\" xml:space=\"preserve\">\r\n    <value>Delete</value>\r\n  </data>\r\n  <data name=\"Dialogs\" xml:space=\"preserve\">\r\n    <value>Chats</value>\r\n  </data>\r\n  <data name=\"Forward\" xml:space=\"preserve\">\r\n    <value>Forward</value>\r\n  </data>\r\n  <data name=\"Loading\" xml:space=\"preserve\">\r\n    <value>Loading...</value>\r\n  </data>\r\n  <data name=\"Login\" xml:space=\"preserve\">\r\n    <value>Login</value>\r\n  </data>\r\n  <data name=\"Refresh\" xml:space=\"preserve\">\r\n    <value>Refresh</value>\r\n  </data>\r\n  <data name=\"Retry\" xml:space=\"preserve\">\r\n    <value>Retry</value>\r\n  </data>\r\n  <data name=\"Send\" xml:space=\"preserve\">\r\n    <value>Send</value>\r\n  </data>\r\n  <data name=\"Sending\" xml:space=\"preserve\">\r\n    <value>Sending</value>\r\n  </data>\r\n  <data name=\"SendingFailed\" xml:space=\"preserve\">\r\n    <value>Can't send</value>\r\n  </data>\r\n  <data name=\"SendMessage\" xml:space=\"preserve\">\r\n    <value>Send Message</value>\r\n  </data>\r\n  <data name=\"Settings\" xml:space=\"preserve\">\r\n    <value>Settings</value>\r\n  </data>\r\n  <data name=\"ShareContact\" xml:space=\"preserve\">\r\n    <value>Share contact</value>\r\n  </data>\r\n  <data name=\"SignIn\" xml:space=\"preserve\">\r\n    <value>Sign In</value>\r\n  </data>\r\n  <data name=\"UnblockContact\" xml:space=\"preserve\">\r\n    <value>Unblock</value>\r\n  </data>\r\n  <data name=\"Yesterday\" xml:space=\"preserve\">\r\n    <value>Yesterday</value>\r\n  </data>\r\n  <data name=\"YourMessage\" xml:space=\"preserve\">\r\n    <value>Type your message</value>\r\n  </data>\r\n  <data name=\"LogOut\" xml:space=\"preserve\">\r\n    <value>Log Out</value>\r\n  </data>\r\n  <data name=\"NoMessagesYet\" xml:space=\"preserve\">\r\n    <value>No messages yet...</value>\r\n  </data>\r\n  <data name=\"Confirm\" xml:space=\"preserve\">\r\n    <value>Confirm</value>\r\n  </data>\r\n  <data name=\"DeleteChatConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to delete this chat?</value>\r\n  </data>\r\n  <data name=\"Contact\" xml:space=\"preserve\">\r\n    <value>Contact</value>\r\n  </data>\r\n  <data name=\"EmptyMessage\" xml:space=\"preserve\">\r\n    <value>Deleted message</value>\r\n  </data>\r\n  <data name=\"ForwardedMessage\" xml:space=\"preserve\">\r\n    <value>Forwarded from</value>\r\n  </data>\r\n  <data name=\"GeoPoint\" xml:space=\"preserve\">\r\n    <value>Location</value>\r\n  </data>\r\n  <data name=\"Photo\" xml:space=\"preserve\">\r\n    <value>Photo</value>\r\n  </data>\r\n  <data name=\"Video\" xml:space=\"preserve\">\r\n    <value>Video</value>\r\n  </data>\r\n  <data name=\"ComposeMessage\" xml:space=\"preserve\">\r\n    <value>New</value>\r\n  </data>\r\n  <data name=\"Search\" xml:space=\"preserve\">\r\n    <value>Search</value>\r\n  </data>\r\n  <data name=\"ServiceMessage\" xml:space=\"preserve\">\r\n    <value>Service message</value>\r\n  </data>\r\n  <data name=\"UnsupportedMedia\" xml:space=\"preserve\">\r\n    <value>This message is not supported on your version of Telegram. Please update the app to view: http://telegram.org/update</value>\r\n  </data>\r\n  <data name=\"Unread\" xml:space=\"preserve\">\r\n    <value>Unread</value>\r\n  </data>\r\n  <data name=\"IsTyping\" xml:space=\"preserve\">\r\n    <value>Is typing</value>\r\n  </data>\r\n  <data name=\"Online\" xml:space=\"preserve\">\r\n    <value>Online</value>\r\n  </data>\r\n  <data name=\"User\" xml:space=\"preserve\">\r\n    <value>User</value>\r\n  </data>\r\n  <data name=\"MessageActionChatCreate\" xml:space=\"preserve\">\r\n    <value>{0} created the group \"{1}\"</value>\r\n  </data>\r\n  <data name=\"MessageActionChatEditTitle\" xml:space=\"preserve\">\r\n    <value>{0} changed group name to \"{1}\"</value>\r\n  </data>\r\n  <data name=\"MessageActionChatEditPhoto\" xml:space=\"preserve\">\r\n    <value>{0} updated group photo</value>\r\n  </data>\r\n  <data name=\"MessageActionChatDeletePhoto\" xml:space=\"preserve\">\r\n    <value>{0} removed group photo</value>\r\n  </data>\r\n  <data name=\"MessageActionChatAddUser\" xml:space=\"preserve\">\r\n    <value>{0} invited {1}</value>\r\n  </data>\r\n  <data name=\"MessageActionChatDeleteUser\" xml:space=\"preserve\">\r\n    <value>{0} kicked {1}</value>\r\n  </data>\r\n  <data name=\"MessageActionEmpty\" xml:space=\"preserve\">\r\n    <value>Empty service message</value>\r\n  </data>\r\n  <data name=\"CompanyNominative\" xml:space=\"preserve\">\r\n    <value>Member</value>\r\n  </data>\r\n  <data name=\"CompanyGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Members</value>\r\n  </data>\r\n  <data name=\"CompanyGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Member</value>\r\n  </data>\r\n  <data name=\"PeopleInTheConversation\" xml:space=\"preserve\">\r\n    <value>{0} members</value>\r\n  </data>\r\n  <data name=\"Offline\" xml:space=\"preserve\">\r\n    <value>Offline</value>\r\n  </data>\r\n  <data name=\"Today\" xml:space=\"preserve\">\r\n    <value>Today</value>\r\n  </data>\r\n  <data name=\"LastSeenAt\" xml:space=\"preserve\">\r\n    <value>Last seen {0} at {1}</value>\r\n  </data>\r\n  <data name=\"LastSeen\" xml:space=\"preserve\">\r\n    <value>Last seen {0} ago</value>\r\n  </data>\r\n  <data name=\"MinuteAccusative\" xml:space=\"preserve\">\r\n    <value>Minute</value>\r\n  </data>\r\n  <data name=\"MinuteGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Minute</value>\r\n  </data>\r\n  <data name=\"MinuteGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Minutes</value>\r\n  </data>\r\n  <data name=\"Attach\" xml:space=\"preserve\">\r\n    <value>Attach</value>\r\n  </data>\r\n  <data name=\"Manage\" xml:space=\"preserve\">\r\n    <value>Manage</value>\r\n  </data>\r\n  <data name=\"Ok\" xml:space=\"preserve\">\r\n    <value>Ok</value>\r\n  </data>\r\n  <data name=\"Cancel\" xml:space=\"preserve\">\r\n    <value>Cancel</value>\r\n  </data>\r\n  <data name=\"Select\" xml:space=\"preserve\">\r\n    <value>Select</value>\r\n  </data>\r\n  <data name=\"MapAccusative\" xml:space=\"preserve\">\r\n    <value>My location</value>\r\n  </data>\r\n  <data name=\"PhotoAccusative\" xml:space=\"preserve\">\r\n    <value>Photo</value>\r\n  </data>\r\n  <data name=\"Add\" xml:space=\"preserve\">\r\n    <value>Add</value>\r\n  </data>\r\n  <data name=\"NewGroup\" xml:space=\"preserve\">\r\n    <value>New Group</value>\r\n  </data>\r\n  <data name=\"NewSecretChat\" xml:space=\"preserve\">\r\n    <value>New Secret Chat</value>\r\n  </data>\r\n  <data name=\"TileUpdaterTaskDescription\" xml:space=\"preserve\">\r\n    <value>Scheduled task to update number of unread messages on live tile.</value>\r\n  </data>\r\n  <data name=\"Media\" xml:space=\"preserve\">\r\n    <value>Media</value>\r\n  </data>\r\n  <data name=\"Profile\" xml:space=\"preserve\">\r\n    <value>Info</value>\r\n  </data>\r\n  <data name=\"Notifications\" xml:space=\"preserve\">\r\n    <value>Notifications</value>\r\n  </data>\r\n  <data name=\"On\" xml:space=\"preserve\">\r\n    <value>On</value>\r\n  </data>\r\n  <data name=\"Off\" xml:space=\"preserve\">\r\n    <value>Off</value>\r\n  </data>\r\n  <data name=\"Sound\" xml:space=\"preserve\">\r\n    <value>Sound</value>\r\n  </data>\r\n  <data name=\"CreateSecretChat\" xml:space=\"preserve\">\r\n    <value>Start Secret Chat</value>\r\n  </data>\r\n  <data name=\"MessageNotifications\" xml:space=\"preserve\">\r\n    <value>Message notifications</value>\r\n  </data>\r\n  <data name=\"ChatNotifications\" xml:space=\"preserve\">\r\n    <value>Chat notifications</value>\r\n  </data>\r\n  <data name=\"NotificationsSubtitle\" xml:space=\"preserve\">\r\n    <value>Mute, message preview, chats</value>\r\n  </data>\r\n  <data name=\"Support\" xml:space=\"preserve\">\r\n    <value>Support</value>\r\n  </data>\r\n  <data name=\"AskAQuestion\" xml:space=\"preserve\">\r\n    <value>Ask a Question</value>\r\n  </data>\r\n  <data name=\"InAppNotifications\" xml:space=\"preserve\">\r\n    <value>In-App Notifications</value>\r\n  </data>\r\n  <data name=\"OnPlural\" xml:space=\"preserve\">\r\n    <value>On</value>\r\n  </data>\r\n  <data name=\"OffPlural\" xml:space=\"preserve\">\r\n    <value>Off</value>\r\n  </data>\r\n  <data name=\"OnFeminine\" xml:space=\"preserve\">\r\n    <value>On</value>\r\n  </data>\r\n  <data name=\"OffFeminine\" xml:space=\"preserve\">\r\n    <value>Off</value>\r\n  </data>\r\n  <data name=\"InAppSounds\" xml:space=\"preserve\">\r\n    <value>In-App Sounds</value>\r\n  </data>\r\n  <data name=\"InAppVibrate\" xml:space=\"preserve\">\r\n    <value>In-App Vibrate</value>\r\n  </data>\r\n  <data name=\"InAppPreview\" xml:space=\"preserve\">\r\n    <value>In-App Preview</value>\r\n  </data>\r\n  <data name=\"ResetAllNotifications\" xml:space=\"preserve\">\r\n    <value>Reset all notifications</value>\r\n  </data>\r\n  <data name=\"ResetAllNotificationsSubtitle\" xml:space=\"preserve\">\r\n    <value>Undo all custom notification settings for all your contacts and groups</value>\r\n  </data>\r\n  <data name=\"OnMasculine\" xml:space=\"preserve\">\r\n    <value>On</value>\r\n  </data>\r\n  <data name=\"OffMasculine\" xml:space=\"preserve\">\r\n    <value>Off</value>\r\n  </data>\r\n  <data name=\"GroupNotifications\" xml:space=\"preserve\">\r\n    <value>Group notifications</value>\r\n  </data>\r\n  <data name=\"Alert\" xml:space=\"preserve\">\r\n    <value>Alert</value>\r\n  </data>\r\n  <data name=\"MessagePreview\" xml:space=\"preserve\">\r\n    <value>Message preview</value>\r\n  </data>\r\n  <data name=\"SaveIncomingPhotos\" xml:space=\"preserve\">\r\n    <value>Save incoming photos</value>\r\n  </data>\r\n  <data name=\"Create\" xml:space=\"preserve\">\r\n    <value>Create</value>\r\n  </data>\r\n  <data name=\"Share\" xml:space=\"preserve\">\r\n    <value>Share</value>\r\n  </data>\r\n  <data name=\"Edit\" xml:space=\"preserve\">\r\n    <value>Edit</value>\r\n  </data>\r\n  <data name=\"CompanyNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Member</value>\r\n  </data>\r\n  <data name=\"CompanyNominativePlural\" xml:space=\"preserve\">\r\n    <value>Members</value>\r\n  </data>\r\n  <data name=\"PictureAccusative\" xml:space=\"preserve\">\r\n    <value>Picture</value>\r\n  </data>\r\n  <data name=\"ContactAccusative\" xml:space=\"preserve\">\r\n    <value>Contact</value>\r\n  </data>\r\n  <data name=\"DocumentAccusative\" xml:space=\"preserve\">\r\n    <value>File</value>\r\n  </data>\r\n  <data name=\"AttachCaption\" xml:space=\"preserve\">\r\n    <value>Attach something</value>\r\n  </data>\r\n  <data name=\"LocationAccusative\" xml:space=\"preserve\">\r\n    <value>Location</value>\r\n  </data>\r\n  <data name=\"VideoAccusative\" xml:space=\"preserve\">\r\n    <value>Video</value>\r\n  </data>\r\n  <data name=\"NoMediaHere\" xml:space=\"preserve\">\r\n    <value>No media here</value>\r\n  </data>\r\n  <data name=\"ChooseAnItem\" xml:space=\"preserve\">\r\n    <value>Choose an item</value>\r\n  </data>\r\n  <data name=\"NoUsersHere\" xml:space=\"preserve\">\r\n    <value>No users here</value>\r\n  </data>\r\n  <data name=\"NoContactsHere\" xml:space=\"preserve\">\r\n    <value>No contacts here</value>\r\n  </data>\r\n  <data name=\"Title\" xml:space=\"preserve\">\r\n    <value>Title</value>\r\n  </data>\r\n  <data name=\"Done\" xml:space=\"preserve\">\r\n    <value>Done</value>\r\n  </data>\r\n  <data name=\"AddParticipant\" xml:space=\"preserve\">\r\n    <value>Add member</value>\r\n  </data>\r\n  <data name=\"DeleteAndExitGroup\" xml:space=\"preserve\">\r\n    <value>Delete and Exit Group</value>\r\n  </data>\r\n  <data name=\"MessageActionUserLeftGroup\" xml:space=\"preserve\">\r\n    <value>{0} left the group</value>\r\n  </data>\r\n  <data name=\"MessageUser\" xml:space=\"preserve\">\r\n    <value>Message {0}</value>\r\n  </data>\r\n  <data name=\"ViewUser\" xml:space=\"preserve\">\r\n    <value>View {0}</value>\r\n  </data>\r\n  <data name=\"SearchAmongYourDialogsAndMessages\" xml:space=\"preserve\">\r\n    <value>Search chats and messages</value>\r\n  </data>\r\n  <data name=\"Messages\" xml:space=\"preserve\">\r\n    <value>Messages</value>\r\n  </data>\r\n  <data name=\"NoMessagesHere\" xml:space=\"preserve\">\r\n    <value>No messages here</value>\r\n  </data>\r\n  <data name=\"NoResults\" xml:space=\"preserve\">\r\n    <value>No results</value>\r\n  </data>\r\n  <data name=\"Conversations\" xml:space=\"preserve\">\r\n    <value>Chats</value>\r\n  </data>\r\n  <data name=\"EditName\" xml:space=\"preserve\">\r\n    <value>Edit Name</value>\r\n  </data>\r\n  <data name=\"Save\" xml:space=\"preserve\">\r\n    <value>Save</value>\r\n  </data>\r\n  <data name=\"About\" xml:space=\"preserve\">\r\n    <value>About</value>\r\n  </data>\r\n  <data name=\"Version\" xml:space=\"preserve\">\r\n    <value>Version</value>\r\n  </data>\r\n  <data name=\"YourPhone\" xml:space=\"preserve\">\r\n    <value>Your phone</value>\r\n  </data>\r\n  <data name=\"SignInMessage\" xml:space=\"preserve\">\r\n    <value>Please confirm your country code and enter your phone number.</value>\r\n  </data>\r\n  <data name=\"Your phone number\" xml:space=\"preserve\">\r\n    <value>Your phone number</value>\r\n  </data>\r\n  <data name=\"Next\" xml:space=\"preserve\">\r\n    <value>Next</value>\r\n  </data>\r\n  <data name=\"Country\" xml:space=\"preserve\">\r\n    <value>Country</value>\r\n  </data>\r\n  <data name=\"YourCode\" xml:space=\"preserve\">\r\n    <value>Your code</value>\r\n  </data>\r\n  <data name=\"ConfirmMessage\" xml:space=\"preserve\">\r\n    <value>We have sent an SMS with an activation code to your phone **{0}**</value>\r\n  </data>\r\n  <data name=\"WeWillCallYou\" xml:space=\"preserve\">\r\n    <value>We will call you in {0}</value>\r\n  </data>\r\n  <data name=\"Code\" xml:space=\"preserve\">\r\n    <value>Code</value>\r\n  </data>\r\n  <data name=\"FirstName\" xml:space=\"preserve\">\r\n    <value>First Name</value>\r\n  </data>\r\n  <data name=\"LastName\" xml:space=\"preserve\">\r\n    <value>Last Name (optional)</value>\r\n  </data>\r\n  <data name=\"YourName\" xml:space=\"preserve\">\r\n    <value>Your name</value>\r\n  </data>\r\n  <data name=\"SignUpMessage\" xml:space=\"preserve\">\r\n    <value>Enter your name and add a profile picture.</value>\r\n  </data>\r\n  <data name=\"AddPhoto\" xml:space=\"preserve\">\r\n    <value>Add photo</value>\r\n  </data>\r\n  <data name=\"NoDialogsHere\" xml:space=\"preserve\">\r\n    <value>No chats here</value>\r\n  </data>\r\n  <data name=\"StartMessaging\" xml:space=\"preserve\">\r\n    <value>Start messaging</value>\r\n  </data>\r\n  <data name=\"Intro1Message\" xml:space=\"preserve\">\r\n    <value>Welcome to **Telegram** ―\r\nthe world's fastest messaging app.\r\nIt is free and secure.</value>\r\n  </data>\r\n  <data name=\"Fast\" xml:space=\"preserve\">\r\n    <value>Fast</value>\r\n  </data>\r\n  <data name=\"FastMessage\" xml:space=\"preserve\">\r\n    <value>**Telegram** delivers messages faster than\r\nany other application.</value>\r\n  </data>\r\n  <data name=\"Free\" xml:space=\"preserve\">\r\n    <value>Free</value>\r\n  </data>\r\n  <data name=\"FreeMessage\" xml:space=\"preserve\">\r\n    <value>**Telegram** is free forever. No ads.\r\nNo subscription fees.</value>\r\n  </data>\r\n  <data name=\"Powerful\" xml:space=\"preserve\">\r\n    <value>Powerful</value>\r\n  </data>\r\n  <data name=\"PowerfulMessage\" xml:space=\"preserve\">\r\n    <value>**Telegram** has no limits on the size of\r\nyour media and chats.</value>\r\n  </data>\r\n  <data name=\"Secure\" xml:space=\"preserve\">\r\n    <value>Secure</value>\r\n  </data>\r\n  <data name=\"SecureMessage\" xml:space=\"preserve\">\r\n    <value>**Telegram** keeps your messages safe\r\nfrom hacker attacks.</value>\r\n  </data>\r\n  <data name=\"CloudBased\" xml:space=\"preserve\">\r\n    <value>Cloud-Based</value>\r\n  </data>\r\n  <data name=\"CloudBasedMessage\" xml:space=\"preserve\">\r\n    <value>**Telegram** lets you access your messages\r\nfrom multiple devices.</value>\r\n  </data>\r\n  <data name=\"TelegramDialedYourNumber\" xml:space=\"preserve\">\r\n    <value>Telegram dialed your number</value>\r\n  </data>\r\n  <data name=\"Subject\" xml:space=\"preserve\">\r\n    <value>Subject</value>\r\n  </data>\r\n  <data name=\"Members\" xml:space=\"preserve\">\r\n    <value>Members</value>\r\n  </data>\r\n  <data name=\"YourPhoneNumber\" xml:space=\"preserve\">\r\n    <value>Your phone number</value>\r\n  </data>\r\n  <data name=\"From\" xml:space=\"preserve\">\r\n    <value>From</value>\r\n  </data>\r\n  <data name=\"You\" xml:space=\"preserve\">\r\n    <value>You</value>\r\n  </data>\r\n  <data name=\"YouWhereKickedFromTheGroup\" xml:space=\"preserve\">\r\n    <value>You where kicked from the group</value>\r\n  </data>\r\n  <data name=\"SavePhotoMessage\" xml:space=\"preserve\">\r\n    <value>The photo has been saved successfully</value>\r\n  </data>\r\n  <data name=\"SharedContact\" xml:space=\"preserve\">\r\n    <value>Shared contact</value>\r\n  </data>\r\n  <data name=\"AllContacts\" xml:space=\"preserve\">\r\n    <value>All contacts</value>\r\n  </data>\r\n  <data name=\"Document\" xml:space=\"preserve\">\r\n    <value>File</value>\r\n  </data>\r\n  <data name=\"InviteFriends\" xml:space=\"preserve\">\r\n    <value>Invite friends</value>\r\n  </data>\r\n  <data name=\"MyLocation\" xml:space=\"preserve\">\r\n    <value>My location</value>\r\n  </data>\r\n  <data name=\"Satellite\" xml:space=\"preserve\">\r\n    <value>Satellite</value>\r\n  </data>\r\n  <data name=\"Hybrid\" xml:space=\"preserve\">\r\n    <value>Hybrid</value>\r\n  </data>\r\n  <data name=\"SwitchMode\" xml:space=\"preserve\">\r\n    <value>Switch mode</value>\r\n  </data>\r\n  <data name=\"DistanceAway\" xml:space=\"preserve\">\r\n    <value>{0} away</value>\r\n  </data>\r\n  <data name=\"MetersShort\" xml:space=\"preserve\">\r\n    <value>m</value>\r\n  </data>\r\n  <data name=\"KilometersShort\" xml:space=\"preserve\">\r\n    <value>km</value>\r\n  </data>\r\n  <data name=\"ShareLocation\" xml:space=\"preserve\">\r\n    <value>Share location</value>\r\n  </data>\r\n  <data name=\"Emoji\" xml:space=\"preserve\">\r\n    <value>Emoji</value>\r\n  </data>\r\n  <data name=\"LogOutConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to log out?\r\nNote that you can seamlessly use Telegram on all your devices at once.\r\nRemember, logging out kills all your Secret Chats.</value>\r\n  </data>\r\n  <data name=\"GotAQuestionAboutTelegram\" xml:space=\"preserve\">\r\n    <value>Got a question about Telegram?</value>\r\n  </data>\r\n  <data name=\"InviteFriendMessage\" xml:space=\"preserve\">\r\n    <value>Hey, let's switch to Telegram http://telegram.org/dl</value>\r\n  </data>\r\n  <data name=\"ResetAllNotificationsMessage\" xml:space=\"preserve\">\r\n    <value>Reset all notifications?</value>\r\n  </data>\r\n  <data name=\"AreTyping\" xml:space=\"preserve\">\r\n    <value>Are typing</value>\r\n  </data>\r\n  <data name=\"ClearHistory\" xml:space=\"preserve\">\r\n    <value>Clear history</value>\r\n  </data>\r\n  <data name=\"DeleteAndExit\" xml:space=\"preserve\">\r\n    <value>Delete and exit</value>\r\n  </data>\r\n  <data name=\"DeleteHistoryAndExitGroupMessage\" xml:space=\"preserve\">\r\n    <value>Delete history and exit group?</value>\r\n  </data>\r\n  <data name=\"NoUsers\" xml:space=\"preserve\">\r\n    <value>No users</value>\r\n  </data>\r\n  <data name=\"UserNominativeSingular\" xml:space=\"preserve\">\r\n    <value>User</value>\r\n  </data>\r\n  <data name=\"UserNominativePlural\" xml:space=\"preserve\">\r\n    <value>Users</value>\r\n  </data>\r\n  <data name=\"UserGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>User</value>\r\n  </data>\r\n  <data name=\"UserGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Users</value>\r\n  </data>\r\n  <data name=\"PleaseGoToChatToForwardMessage\" xml:space=\"preserve\">\r\n    <value>Please go to chat to forward message</value>\r\n  </data>\r\n  <data name=\"Info\" xml:space=\"preserve\">\r\n    <value>Info</value>\r\n  </data>\r\n  <data name=\"ForwardeMessageToThisChat\" xml:space=\"preserve\">\r\n    <value>Forward message to this chat?</value>\r\n  </data>\r\n  <data name=\"TodayFormat\" xml:space=\"preserve\">\r\n    <value>{0}</value>\r\n  </data>\r\n  <data name=\"RegularFormat\" xml:space=\"preserve\">\r\n    <value>d MMM</value>\r\n  </data>\r\n  <data name=\"LongRegularFormat\" xml:space=\"preserve\">\r\n    <value>d.MM.yyyy</value>\r\n  </data>\r\n  <data name=\"MessageTodayFormat\" xml:space=\"preserve\">\r\n    <value>{0}</value>\r\n  </data>\r\n  <data name=\"MessageRegularFormat\" xml:space=\"preserve\">\r\n    <value>d MMM, {0}</value>\r\n  </data>\r\n  <data name=\"MessageLongRegularFormat\" xml:space=\"preserve\">\r\n    <value>yyyy d MMM, {0}</value>\r\n  </data>\r\n  <data name=\"UserStatusTimeFormat\" xml:space=\"preserve\">\r\n    <value>h:mmt</value>\r\n  </data>\r\n  <data name=\"UserStatusDayFormat\" xml:space=\"preserve\">\r\n    <value>d MMM</value>\r\n  </data>\r\n  <data name=\"UserStatusYearDayFormat\" xml:space=\"preserve\">\r\n    <value>d MMM yyyy</value>\r\n  </data>\r\n  <data name=\"PhoneNumberInvalidString\" xml:space=\"preserve\">\r\n    <value>Invalid phone number. Please try again.</value>\r\n  </data>\r\n  <data name=\"Error\" xml:space=\"preserve\">\r\n    <value>Error</value>\r\n  </data>\r\n  <data name=\"FloodWaitString\" xml:space=\"preserve\">\r\n    <value>Flood control. Please try again later.</value>\r\n  </data>\r\n  <data name=\"PhoneCodeInvalidString\" xml:space=\"preserve\">\r\n    <value>You have entered an invalid code. Please try again.</value>\r\n  </data>\r\n  <data name=\"PhoneCodeExpiredString\" xml:space=\"preserve\">\r\n    <value>Code expired. Please try again.</value>\r\n  </data>\r\n  <data name=\"PhoneCodeEmpty\" xml:space=\"preserve\">\r\n    <value>Code is empty. Please try again.</value>\r\n  </data>\r\n  <data name=\"FirstNameInvalidString\" xml:space=\"preserve\">\r\n    <value>First name is invalid. Please try again.</value>\r\n  </data>\r\n  <data name=\"LastNameInvalidString\" xml:space=\"preserve\">\r\n    <value>Last name is invalid. Please try again.</value>\r\n  </data>\r\n  <data name=\"Message\" xml:space=\"preserve\">\r\n    <value>Message</value>\r\n  </data>\r\n  <data name=\"LockScreen\" xml:space=\"preserve\">\r\n    <value>Lock screen</value>\r\n  </data>\r\n  <data name=\"LockScreenSubtitle\" xml:space=\"preserve\">\r\n    <value>Add Telegram to the lock screen</value>\r\n  </data>\r\n  <data name=\"ConfirmAgeMessage\" xml:space=\"preserve\">\r\n    <value>By pressing OK button you confirm that you have at least 13 years old.</value>\r\n  </data>\r\n  <data name=\"ConfirmAgeTitle\" xml:space=\"preserve\">\r\n    <value>Confirm your age</value>\r\n  </data>\r\n  <data name=\"ConfirmPushMessage\" xml:space=\"preserve\">\r\n    <value>Do you allow this application to use push notifications to alert of new messages?</value>\r\n  </data>\r\n  <data name=\"ConfirmPushTitle\" xml:space=\"preserve\">\r\n    <value>Confirm push notifications</value>\r\n  </data>\r\n  <data name=\"PrivacyStatement\" xml:space=\"preserve\">\r\n    <value>Privacy Statement</value>\r\n  </data>\r\n  <data name=\"PrivacyStatementText\" xml:space=\"preserve\">\r\n    <value>This application uses your current location to improve the mapping experience. The location data may be stored and shared. Your privacy is important to us. You can disable this feature at any time.\r\n\r\nIf you have questions, contact our </value>\r\n  </data>\r\n  <data name=\"VKGroup\" xml:space=\"preserve\">\r\n    <value>group</value>\r\n  </data>\r\n  <data name=\"LocationServices\" xml:space=\"preserve\">\r\n    <value>Location services</value>\r\n  </data>\r\n  <data name=\"AllowLocationServicesTitle\" xml:space=\"preserve\">\r\n    <value>Allow access to location?</value>\r\n  </data>\r\n  <data name=\"AllowLocationServiceText\" xml:space=\"preserve\">\r\n    <value>Allow access to your current location? This can be changed later in app settings.</value>\r\n  </data>\r\n  <data name=\"AboutText1\" xml:space=\"preserve\">\r\n    <value>Telegram Messenger is a messaging service with a focus on speed and security. It’s superfast, simple and free.</value>\r\n  </data>\r\n  <data name=\"AboutText2\" xml:space=\"preserve\">\r\n    <value>For real-time support, please go to settings in Telegram and select “Ask a Question” to send a message directly to our support staff. You can also email us at support@telegram.org.</value>\r\n  </data>\r\n  <data name=\"TapRecordToStartRecording\" xml:space=\"preserve\">\r\n    <value>Tap record to start recording...</value>\r\n  </data>\r\n  <data name=\"ACameraIsNotSupportedOnThisDevice\" xml:space=\"preserve\">\r\n    <value>A camera is not supported on this device.</value>\r\n  </data>\r\n  <data name=\"ReadyToRecord\" xml:space=\"preserve\">\r\n    <value>Ready to record.</value>\r\n  </data>\r\n  <data name=\"PressBackKeyToSendVideo\" xml:space=\"preserve\">\r\n    <value>Press back key to send video.</value>\r\n  </data>\r\n  <data name=\"PlaybackStarted\" xml:space=\"preserve\">\r\n    <value>Playback started.</value>\r\n  </data>\r\n  <data name=\"PlaybackPaused\" xml:space=\"preserve\">\r\n    <value>Playback paused.</value>\r\n  </data>\r\n  <data name=\"Recording\" xml:space=\"preserve\">\r\n    <value>Recording...</value>\r\n  </data>\r\n  <data name=\"PreparingViewfinder\" xml:space=\"preserve\">\r\n    <value>Preparing viewfinder...</value>\r\n  </data>\r\n  <data name=\"PlaybackStoped\" xml:space=\"preserve\">\r\n    <value>Playback stoped.</value>\r\n  </data>\r\n  <data name=\"Record\" xml:space=\"preserve\">\r\n    <value>Record</value>\r\n  </data>\r\n  <data name=\"Stop\" xml:space=\"preserve\">\r\n    <value>Stop</value>\r\n  </data>\r\n  <data name=\"Pause\" xml:space=\"preserve\">\r\n    <value>Pause</value>\r\n  </data>\r\n  <data name=\"Play\" xml:space=\"preserve\">\r\n    <value>Play</value>\r\n  </data>\r\n  <data name=\"Review\" xml:space=\"preserve\">\r\n    <value>Review</value>\r\n  </data>\r\n  <data name=\"PleaseEnterGroupSubject\" xml:space=\"preserve\">\r\n    <value>Please enter subject of the group</value>\r\n  </data>\r\n  <data name=\"PleaseChooseAtLeastOneParticipant\" xml:space=\"preserve\">\r\n    <value>Please choose at least one participant</value>\r\n  </data>\r\n  <data name=\"ForwardMessagesToThisChat\" xml:space=\"preserve\">\r\n    <value>Forward messages to this chat?</value>\r\n  </data>\r\n  <data name=\"InvalidCountryCode\" xml:space=\"preserve\">\r\n    <value>Invalid country code</value>\r\n  </data>\r\n  <data name=\"Typing\" xml:space=\"preserve\">\r\n    <value>Typing</value>\r\n  </data>\r\n  <data name=\"MaximumMessageLengthExceeded\" xml:space=\"preserve\">\r\n    <value>Maximum message length ({0} symbols) exceeded.</value>\r\n  </data>\r\n  <data name=\"Download\" xml:space=\"preserve\">\r\n    <value>Download</value>\r\n  </data>\r\n  <data name=\"Backgrounds\" xml:space=\"preserve\">\r\n    <value>Backgrounds</value>\r\n  </data>\r\n  <data name=\"Static\" xml:space=\"preserve\">\r\n    <value>Static</value>\r\n  </data>\r\n  <data name=\"Animated\" xml:space=\"preserve\">\r\n    <value>Animated</value>\r\n  </data>\r\n  <data name=\"Background\" xml:space=\"preserve\">\r\n    <value>Background</value>\r\n  </data>\r\n  <data name=\"ApplicationBackgroundSubtitle\" xml:space=\"preserve\">\r\n    <value>Select background image for chats</value>\r\n  </data>\r\n  <data name=\"ApplicationBackground\" xml:space=\"preserve\">\r\n    <value>Application background</value>\r\n  </data>\r\n  <data name=\"DialogsBackground\" xml:space=\"preserve\">\r\n    <value>Background</value>\r\n  </data>\r\n  <data name=\"SpecialThanks\" xml:space=\"preserve\">\r\n    <value>Special thanks</value>\r\n  </data>\r\n  <data name=\"SendMessageByEnter\" xml:space=\"preserve\">\r\n    <value>Send messages by Enter</value>\r\n  </data>\r\n  <data name=\"PleaseNoteThatAnimatedBackgroundConsumesMoreBatteryResources\" xml:space=\"preserve\">\r\n    <value>Please note that animated background consumes more battery resources</value>\r\n  </data>\r\n  <data name=\"Please go to chat to forward message\" xml:space=\"preserve\">\r\n    <value>Please go to chat to forward message</value>\r\n  </data>\r\n  <data name=\"SecretChatCaption\" xml:space=\"preserve\">\r\n    <value>You have invited {0} to join a secret chat.</value>\r\n  </data>\r\n  <data name=\"SecretChat\" xml:space=\"preserve\">\r\n    <value>Secret chat</value>\r\n  </data>\r\n  <data name=\"UseEntToEndEncryption\" xml:space=\"preserve\">\r\n    <value>Use end-to-end encryption</value>\r\n  </data>\r\n  <data name=\"LeaveNoTraceOnOurServers\" xml:space=\"preserve\">\r\n    <value>Leave no trace on our servers</value>\r\n  </data>\r\n  <data name=\"HaveASelfDestructTimer\" xml:space=\"preserve\">\r\n    <value>Have a self-destruct timer</value>\r\n  </data>\r\n  <data name=\"SecretChats\" xml:space=\"preserve\">\r\n    <value>Secret Chats</value>\r\n  </data>\r\n  <data name=\"DoNotAllowForwarding\" xml:space=\"preserve\">\r\n    <value>Do not allow forwarding</value>\r\n  </data>\r\n  <data name=\"WaitingForUserToGetOnline\" xml:space=\"preserve\">\r\n    <value>Waiting for {0} to get online</value>\r\n  </data>\r\n  <data name=\"SelfDestructTimer\" xml:space=\"preserve\">\r\n    <value>Self-destruct timer</value>\r\n  </data>\r\n  <data name=\"EncryptionKey\" xml:space=\"preserve\">\r\n    <value>Encryption key</value>\r\n  </data>\r\n  <data name=\"EncryptionKeyDescription1\" xml:space=\"preserve\">\r\n    <value>This image is a visualization of the encryption key for this secret chat with {0}.</value>\r\n  </data>\r\n  <data name=\"EncryptionKeyDescription2\" xml:space=\"preserve\">\r\n    <value>If this image looks the same on {0}'s phone, your chat is 200% secure.</value>\r\n  </data>\r\n  <data name=\"LearnMoreAt\" xml:space=\"preserve\">\r\n    <value>Learn more at </value>\r\n  </data>\r\n  <data name=\"TelegramWebsite\" xml:space=\"preserve\">\r\n    <value>Telegram.org</value>\r\n  </data>\r\n  <data name=\"LastSeenAtDate\" xml:space=\"preserve\">\r\n    <value>Last seen {0} at {1}</value>\r\n  </data>\r\n  <data name=\"LastSeenJustNow\" xml:space=\"preserve\">\r\n    <value>Last seen just now</value>\r\n  </data>\r\n  <data name=\"SecretChatsDescription\" xml:space=\"preserve\">\r\n    <value>Secret chats:\r\n• Use end-to-end encryption\r\n• Leave no trace on our servers\r\n• Have a self-destruct timer\r\n• Do not allow forwarding</value>\r\n  </data>\r\n  <data name=\"Audio\" xml:space=\"preserve\">\r\n    <value>Audio</value>\r\n  </data>\r\n  <data name=\"IncognitoMode\" xml:space=\"preserve\">\r\n    <value>Invisible mode</value>\r\n  </data>\r\n  <data name=\"TelegramNotifications\" xml:space=\"preserve\">\r\n    <value>Telegram</value>\r\n  </data>\r\n  <data name=\"Invisible\" xml:space=\"preserve\">\r\n    <value>Invisible</value>\r\n  </data>\r\n  <data name=\"SecretChatDiscarded\" xml:space=\"preserve\">\r\n    <value>Secret chat cancelled</value>\r\n  </data>\r\n  <data name=\"SecretChatCreated\" xml:space=\"preserve\">\r\n    <value>Secret chat created</value>\r\n  </data>\r\n  <data name=\"EmptySecretChat\" xml:space=\"preserve\">\r\n    <value>Empty secret chat</value>\r\n  </data>\r\n  <data name=\"MessageActionSetMessageTTL\" xml:space=\"preserve\">\r\n    <value>{0} set the self-destruct timer to {1}</value>\r\n  </data>\r\n  <data name=\"MessageActionYouSetMessageTTL\" xml:space=\"preserve\">\r\n    <value>You set the self-destruct timer to {0}</value>\r\n  </data>\r\n  <data name=\"MessageActionDisableMessageTTL\" xml:space=\"preserve\">\r\n    <value>{0} disabled the self-destruct timer</value>\r\n  </data>\r\n  <data name=\"MessageActionYouDisableMessageTTL\" xml:space=\"preserve\">\r\n    <value>You disabled the self-destruct timer</value>\r\n  </data>\r\n  <data name=\"PleaseWait\" xml:space=\"preserve\">\r\n    <value>Please wait...</value>\r\n  </data>\r\n  <data name=\"SecretChatCaption2\" xml:space=\"preserve\">\r\n    <value>{0} invited you to join a secret chat.</value>\r\n  </data>\r\n  <data name=\"YouJoinedTheSecretChat\" xml:space=\"preserve\">\r\n    <value>You joined the secret chat</value>\r\n  </data>\r\n  <data name=\"UserJoinedYourSecretChat\" xml:space=\"preserve\">\r\n    <value>{0} joined your secret chat</value>\r\n  </data>\r\n  <data name=\"AddContact\" xml:space=\"preserve\">\r\n    <value>Add</value>\r\n  </data>\r\n  <data name=\"DeleteContact\" xml:space=\"preserve\">\r\n    <value>Delete</value>\r\n  </data>\r\n  <data name=\"ConfirmDeleteContact\" xml:space=\"preserve\">\r\n    <value>Delete contact?</value>\r\n  </data>\r\n  <data name=\"RegistrationProblemDescription\" xml:space=\"preserve\">\r\n    <value>If you have any problems with the registration process or logging in to your account, please contact us at </value>\r\n  </data>\r\n  <data name=\"RegistrationProblemEmail\" xml:space=\"preserve\">\r\n    <value>sms@telegram.org</value>\r\n  </data>\r\n  <data name=\"ChooseYourCountry\" xml:space=\"preserve\">\r\n    <value>Choose your country</value>\r\n  </data>\r\n  <data name=\"AskAVolunteer\" xml:space=\"preserve\">\r\n    <value>Ask a volunteer</value>\r\n  </data>\r\n  <data name=\"PinToStart\" xml:space=\"preserve\">\r\n    <value>Pin to Start</value>\r\n  </data>\r\n  <data name=\"TerminateAllSessions\" xml:space=\"preserve\">\r\n    <value>Terminate All Other Sessions</value>\r\n  </data>\r\n  <data name=\"TerminateAllSessionsConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to terminate all other sessions?</value>\r\n  </data>\r\n  <data name=\"SlideToCancel\" xml:space=\"preserve\">\r\n    <value>Slide to cancel</value>\r\n  </data>\r\n  <data name=\"Terminate\" xml:space=\"preserve\">\r\n    <value>Terminate</value>\r\n  </data>\r\n  <data name=\"TapAndHoldToRecord\" xml:space=\"preserve\">\r\n    <value>Tap and hold to record</value>\r\n  </data>\r\n  <data name=\"NewBroadcastList\" xml:space=\"preserve\">\r\n    <value>New Broadcast List</value>\r\n  </data>\r\n  <data name=\"AddUserToTheGroup\" xml:space=\"preserve\">\r\n    <value>Add {0} to the group \"{1}\"?</value>\r\n  </data>\r\n  <data name=\"NumberOfForwardingMessages\" xml:space=\"preserve\">\r\n    <value>Number of last messages to forward</value>\r\n  </data>\r\n  <data name=\"AddToContacts\" xml:space=\"preserve\">\r\n    <value>Add to contacts</value>\r\n  </data>\r\n  <data name=\"ShareMyContactInfo\" xml:space=\"preserve\">\r\n    <value>Share My Contact Info</value>\r\n  </data>\r\n  <data name=\"Cache\" xml:space=\"preserve\">\r\n    <value>Cache</value>\r\n  </data>\r\n  <data name=\"ClearCache\" xml:space=\"preserve\">\r\n    <value>Clear Cache</value>\r\n  </data>\r\n  <data name=\"ManagingLocalCache\" xml:space=\"preserve\">\r\n    <value>Manage local cache</value>\r\n  </data>\r\n  <data name=\"Calculating\" xml:space=\"preserve\">\r\n    <value>Calculating</value>\r\n  </data>\r\n  <data name=\"SaveFileMessage\" xml:space=\"preserve\">\r\n    <value>The file has been saved successfully</value>\r\n  </data>\r\n  <data name=\"SocialNetworks\" xml:space=\"preserve\">\r\n    <value>Social networks</value>\r\n  </data>\r\n  <data name=\"Sms\" xml:space=\"preserve\">\r\n    <value>Sms</value>\r\n  </data>\r\n  <data name=\"Email\" xml:space=\"preserve\">\r\n    <value>Email</value>\r\n  </data>\r\n  <data name=\"Set\" xml:space=\"preserve\">\r\n    <value>Set</value>\r\n  </data>\r\n  <data name=\"SearchAmongYourContacts\" xml:space=\"preserve\">\r\n    <value>Search contacts</value>\r\n  </data>\r\n  <data name=\"Connecting\" xml:space=\"preserve\">\r\n    <value>Connecting</value>\r\n  </data>\r\n  <data name=\"SetProfilePhoto\" xml:space=\"preserve\">\r\n    <value>Set Profile Photo</value>\r\n  </data>\r\n  <data name=\"BatterySaverModeAlert\" xml:space=\"preserve\">\r\n    <value>Your device is running in Battery Saver mode. You will not receive Telegram message alerts when Battery Saver mode is enabled. Please disable Battery Saver mode.</value>\r\n  </data>\r\n  <data name=\"Warning\" xml:space=\"preserve\">\r\n    <value>Warning</value>\r\n  </data>\r\n  <data name=\"NoInternetConnection\" xml:space=\"preserve\">\r\n    <value>No Internet connection</value>\r\n  </data>\r\n  <data name=\"Updating\" xml:space=\"preserve\">\r\n    <value>Updating</value>\r\n  </data>\r\n  <data name=\"SetUsername\" xml:space=\"preserve\">\r\n    <value>Set username</value>\r\n  </data>\r\n  <data name=\"Username\" xml:space=\"preserve\">\r\n    <value>Username</value>\r\n  </data>\r\n  <data name=\"ServerError\" xml:space=\"preserve\">\r\n    <value>Server error</value>\r\n  </data>\r\n  <data name=\"ServerErrorMessage\" xml:space=\"preserve\">\r\n    <value>Internal server error occurred. Please try again later.</value>\r\n  </data>\r\n  <data name=\"UsernameDescription\" xml:space=\"preserve\">\r\n    <value>You can choose a username on Telegram. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\r\n\r\nYou can use a-z, 0-9 and underscores. Minimum length is 5 characters.</value>\r\n  </data>\r\n  <data name=\"UsernameOccupied\" xml:space=\"preserve\">\r\n    <value>Sorry, this username is already taken.</value>\r\n  </data>\r\n  <data name=\"UsernameInvalid\" xml:space=\"preserve\">\r\n    <value>Sorry, this username is not allowed.</value>\r\n  </data>\r\n  <data name=\"WaitingForNetwork\" xml:space=\"preserve\">\r\n    <value>Waiting for network</value>\r\n  </data>\r\n  <data name=\"GlobalSearch\" xml:space=\"preserve\">\r\n    <value>Global Search</value>\r\n  </data>\r\n  <data name=\"UsernameShort\" xml:space=\"preserve\">\r\n    <value>A username must have at least 5 characters.</value>\r\n  </data>\r\n  <data name=\"UsernameStartsWithNumber\" xml:space=\"preserve\">\r\n    <value>Sorry, a username can't start with a number.</value>\r\n  </data>\r\n  <data name=\"SelectChat\" xml:space=\"preserve\">\r\n    <value>Select chat</value>\r\n  </data>\r\n  <data name=\"MaximumFileSizeExceeded\" xml:space=\"preserve\">\r\n    <value>Maximum file size exceeded. You can send files up to {0}.</value>\r\n  </data>\r\n  <data name=\"UnableToAccessDocument\" xml:space=\"preserve\">\r\n    <value>Unable to access this file. Please choose another file to upload.</value>\r\n  </data>\r\n  <data name=\"Camcorder\" xml:space=\"preserve\">\r\n    <value>Camcorder</value>\r\n  </data>\r\n  <data name=\"CompressVideo\" xml:space=\"preserve\">\r\n    <value>Compress video</value>\r\n  </data>\r\n  <data name=\"EditedVideo\" xml:space=\"preserve\">\r\n    <value>Edited video</value>\r\n  </data>\r\n  <data name=\"EditVideo\" xml:space=\"preserve\">\r\n    <value>Edit video</value>\r\n  </data>\r\n  <data name=\"OriginalVideo\" xml:space=\"preserve\">\r\n    <value>Original video</value>\r\n  </data>\r\n  <data name=\"AccountSelfDestrucsDescription\" xml:space=\"preserve\">\r\n    <value>If you do not come online at least once within this period, your account will be deleted along with all groups, messages and contacts.</value>\r\n  </data>\r\n  <data name=\"AccountSelfDestructs\" xml:space=\"preserve\">\r\n    <value>Account Self-Destructs</value>\r\n  </data>\r\n  <data name=\"AddExceptions\" xml:space=\"preserve\">\r\n    <value>Add exceptions</value>\r\n  </data>\r\n  <data name=\"AlwaysShare\" xml:space=\"preserve\">\r\n    <value>Always Share</value>\r\n  </data>\r\n  <data name=\"AlwaysShareWirhUsers\" xml:space=\"preserve\">\r\n    <value>Always share with users...</value>\r\n  </data>\r\n  <data name=\"AlwaysShareWith\" xml:space=\"preserve\">\r\n    <value>Always Share With</value>\r\n  </data>\r\n  <data name=\"CodecWasNotFound\" xml:space=\"preserve\">\r\n    <value>Codec was not found</value>\r\n  </data>\r\n  <data name=\"Everybody\" xml:space=\"preserve\">\r\n    <value>Everybody</value>\r\n  </data>\r\n  <data name=\"IfYouAreAwayFor\" xml:space=\"preserve\">\r\n    <value>If you're away for</value>\r\n  </data>\r\n  <data name=\"LastSeenDescription\" xml:space=\"preserve\">\r\n    <value>Who can see your Last Seen time?</value>\r\n  </data>\r\n  <data name=\"LastSeenImportantNote\" xml:space=\"preserve\">\r\n    <value>Important: you won't be able to see Last Seen times for people with whom you don't share your Last Seen time. Approximate last seen will be shown instead (recently, within a week, within a month).</value>\r\n  </data>\r\n  <data name=\"LastSeenLongTimeAgo\" xml:space=\"preserve\">\r\n    <value>Last seen a long time ago</value>\r\n  </data>\r\n  <data name=\"LastSeenRecently\" xml:space=\"preserve\">\r\n    <value>Last seen recently</value>\r\n  </data>\r\n  <data name=\"LastSeenWithinMonth\" xml:space=\"preserve\">\r\n    <value>Last seen within a month</value>\r\n  </data>\r\n  <data name=\"LastSeenWithinWeek\" xml:space=\"preserve\">\r\n    <value>Last seen within a week</value>\r\n  </data>\r\n  <data name=\"MyContacts\" xml:space=\"preserve\">\r\n    <value>My Contacts</value>\r\n  </data>\r\n  <data name=\"NeverShare\" xml:space=\"preserve\">\r\n    <value>Never Share</value>\r\n  </data>\r\n  <data name=\"NeverShareWith\" xml:space=\"preserve\">\r\n    <value>Never Share With</value>\r\n  </data>\r\n  <data name=\"NeverShareWithUsers\" xml:space=\"preserve\">\r\n    <value>Never share with users...</value>\r\n  </data>\r\n  <data name=\"Nobody\" xml:space=\"preserve\">\r\n    <value>Nobody</value>\r\n  </data>\r\n  <data name=\"PrivacyAndSecurity\" xml:space=\"preserve\">\r\n    <value>Privacy and Security</value>\r\n  </data>\r\n  <data name=\"PrivacySettingsError\" xml:space=\"preserve\">\r\n    <value>Sorry, too many requests. Unable to change privacy settings now, please wait.</value>\r\n  </data>\r\n  <data name=\"ProfileIsInvalid\" xml:space=\"preserve\">\r\n    <value>Video encoding profile is invalid</value>\r\n  </data>\r\n  <data name=\"SettingsOverrideNote\" xml:space=\"preserve\">\r\n    <value>These settings will override the values above.</value>\r\n  </data>\r\n  <data name=\"UnknownFailure\" xml:space=\"preserve\">\r\n    <value>Unknown failure</value>\r\n  </data>\r\n  <data name=\"LastSeenShort\" xml:space=\"preserve\">\r\n    <value>Last Seen</value>\r\n  </data>\r\n  <data name=\"PrivacySecuritySubtitle\" xml:space=\"preserve\">\r\n    <value>Blocked users, last seen, sessions</value>\r\n  </data>\r\n  <data name=\"MonthGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Months</value>\r\n  </data>\r\n  <data name=\"MonthGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Month</value>\r\n  </data>\r\n  <data name=\"MonthNominativePlural\" xml:space=\"preserve\">\r\n    <value>Months</value>\r\n  </data>\r\n  <data name=\"MonthNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Month</value>\r\n  </data>\r\n  <data name=\"YearGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Years</value>\r\n  </data>\r\n  <data name=\"YearGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Year</value>\r\n  </data>\r\n  <data name=\"YearNominativePlural\" xml:space=\"preserve\">\r\n    <value>Years</value>\r\n  </data>\r\n  <data name=\"YearNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Year</value>\r\n  </data>\r\n  <data name=\"LastSeenDescription2\" xml:space=\"preserve\">\r\n    <value>Who can see your Last Seen time?</value>\r\n  </data>\r\n  <data name=\"CheckingUsername\" xml:space=\"preserve\">\r\n    <value>Checking username...</value>\r\n  </data>\r\n  <data name=\"CantFindContactWithUsername\" xml:space=\"preserve\">\r\n    <value>Sorry, can't find a Telegram user with username @{0}</value>\r\n  </data>\r\n  <data name=\"Compressing\" xml:space=\"preserve\">\r\n    <value>Compressing</value>\r\n  </data>\r\n  <data name=\"PeopleHubIntegration\" xml:space=\"preserve\">\r\n    <value>Sync with People hub</value>\r\n  </data>\r\n  <data name=\"SyncContactsProgress\" xml:space=\"preserve\">\r\n    <value>Sync contacts ({0} of {1})...</value>\r\n  </data>\r\n  <data name=\"DeletingContacts\" xml:space=\"preserve\">\r\n    <value>Deleting contacts...</value>\r\n  </data>\r\n  <data name=\"ChangeNumber\" xml:space=\"preserve\">\r\n    <value>Change number</value>\r\n  </data>\r\n  <data name=\"ConfirmNewNumberMessage\" xml:space=\"preserve\">\r\n    <value>We will send an SMS with a confirmation code to your new number.</value>\r\n  </data>\r\n  <data name=\"NewNumber\" xml:space=\"preserve\">\r\n    <value>New number</value>\r\n  </data>\r\n  <data name=\"NewNumberConfirmation\" xml:space=\"preserve\">\r\n    <value>All your Telegram contacts will get your new number added to their address book, provided they had your old number and you haven't blocked them in Telegram.</value>\r\n  </data>\r\n  <data name=\"NewNumberDescription\" xml:space=\"preserve\">\r\n    <value>You can change your Telegram number here. Your account and all your cloud data — messages, media, contacts, etc. will be moved to the new number.\r\n\r\nImportant: all your Telegram contacts will get your new number added to their address book, provided they had your old number and you haven't blocked them in Telegram.</value>\r\n  </data>\r\n  <data name=\"NewNumberTaken\" xml:space=\"preserve\">\r\n    <value>The number {0} is already connected to a Telegram account. Please delete that account before migrating to the new number.</value>\r\n  </data>\r\n  <data name=\"MessageActionScreenshotMessages\" xml:space=\"preserve\">\r\n    <value>{0} took a screenshot!</value>\r\n  </data>\r\n  <data name=\"MessageActionYouScreenshotMessages\" xml:space=\"preserve\">\r\n    <value>You took a screenshot!</value>\r\n  </data>\r\n  <data name=\"DayGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Days</value>\r\n  </data>\r\n  <data name=\"DayGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Day</value>\r\n  </data>\r\n  <data name=\"DayNominativePlural\" xml:space=\"preserve\">\r\n    <value>Days</value>\r\n  </data>\r\n  <data name=\"DayNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Day</value>\r\n  </data>\r\n  <data name=\"HourGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Hours</value>\r\n  </data>\r\n  <data name=\"HourGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Hour</value>\r\n  </data>\r\n  <data name=\"HourNominativePlural\" xml:space=\"preserve\">\r\n    <value>Hours</value>\r\n  </data>\r\n  <data name=\"HourNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Hour</value>\r\n  </data>\r\n  <data name=\"MinuteNominativePlural\" xml:space=\"preserve\">\r\n    <value>Minutes</value>\r\n  </data>\r\n  <data name=\"MinuteNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Minute</value>\r\n  </data>\r\n  <data name=\"SecondGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Seconds</value>\r\n  </data>\r\n  <data name=\"SecondGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Second</value>\r\n  </data>\r\n  <data name=\"SecondNominativePlural\" xml:space=\"preserve\">\r\n    <value>Seconds</value>\r\n  </data>\r\n  <data name=\"SecondNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Second</value>\r\n  </data>\r\n  <data name=\"WeekGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Weeks</value>\r\n  </data>\r\n  <data name=\"WeekGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Week</value>\r\n  </data>\r\n  <data name=\"WeekNominativePlural\" xml:space=\"preserve\">\r\n    <value>Weeks</value>\r\n  </data>\r\n  <data name=\"WeekNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Week</value>\r\n  </data>\r\n  <data name=\"TapAndHoldToView\" xml:space=\"preserve\">\r\n    <value>Tap and hold to view</value>\r\n  </data>\r\n  <data name=\"Sticker\" xml:space=\"preserve\">\r\n    <value>Sticker</value>\r\n  </data>\r\n  <data name=\"Files\" xml:space=\"preserve\">\r\n    <value>Files</value>\r\n  </data>\r\n  <data name=\"NoFilesHere\" xml:space=\"preserve\">\r\n    <value>No files here</value>\r\n  </data>\r\n  <data name=\"ShareFiles\" xml:space=\"preserve\">\r\n    <value>You can send and receive files of any type up to 1.5 GB each and access them anywhere.</value>\r\n  </data>\r\n  <data name=\"SharePhotosAndVideos\" xml:space=\"preserve\">\r\n    <value>No media files yet.\r\n\r\nShare photos and videos in this chat — or this paperclip stays unhappy.</value>\r\n  </data>\r\n  <data name=\"Disabled\" xml:space=\"preserve\">\r\n    <value>Disabled</value>\r\n  </data>\r\n  <data name=\"Enabled\" xml:space=\"preserve\">\r\n    <value>Enabled</value>\r\n  </data>\r\n  <data name=\"MuteFor\" xml:space=\"preserve\">\r\n    <value>Mute for {0}</value>\r\n  </data>\r\n  <data name=\"UnmuteIn\" xml:space=\"preserve\">\r\n    <value>In {0}</value>\r\n  </data>\r\n  <data name=\"More\" xml:space=\"preserve\">\r\n    <value>More</value>\r\n  </data>\r\n  <data name=\"SearchAmongYourChats\" xml:space=\"preserve\">\r\n    <value>Search among your chats</value>\r\n  </data>\r\n  <data name=\"SearchAmongYourFiles\" xml:space=\"preserve\">\r\n    <value>Search shared files</value>\r\n  </data>\r\n  <data name=\"NewAuthorization\" xml:space=\"preserve\">\r\n    <value>{0},\r\nWe detected a login into your account from a new device on {1}, {2} at {3}\r\n\r\nDevice: {4}\r\nLocation: {5}\r\n\r\nIf this wasn't you, you can go to Settings — Privacy and Security — Terminate all sessions.\r\n\r\nThanks, The Telegram Team</value>\r\n  </data>\r\n  <data name=\"Link\" xml:space=\"preserve\">\r\n    <value>Link</value>\r\n  </data>\r\n  <data name=\"ContactRegistered\" xml:space=\"preserve\">\r\n    <value>{0} joined Telegram!</value>\r\n  </data>\r\n  <data name=\"UnreadMessages\" xml:space=\"preserve\">\r\n    <value>Unread messages</value>\r\n  </data>\r\n  <data name=\"ChangePasscode\" xml:space=\"preserve\">\r\n    <value>Change passcode</value>\r\n  </data>\r\n  <data name=\"ChangePasscodeHint\" xml:space=\"preserve\">\r\n    <value>When you set up an additional passcode, a lock icon will appear on the chats page. Tap it to lock and unlock the app.\r\n\r\nNote: if you forget the passcode, you'll need to delete and reinstall the app. All secret chats will be lost.</value>\r\n  </data>\r\n  <data name=\"ConfirmPasscode\" xml:space=\"preserve\">\r\n    <value>Confirm passcode</value>\r\n  </data>\r\n  <data name=\"EnterPasscode\" xml:space=\"preserve\">\r\n    <value>Enter your passcode</value>\r\n  </data>\r\n  <data name=\"Passcode\" xml:space=\"preserve\">\r\n    <value>Passcode Lock</value>\r\n  </data>\r\n  <data name=\"SimplePasscode\" xml:space=\"preserve\">\r\n    <value>Simple passcode</value>\r\n  </data>\r\n  <data name=\"SimplePasscodeHint\" xml:space=\"preserve\">\r\n    <value>A simple passcode is a 4 digit number.</value>\r\n  </data>\r\n  <data name=\"YourPasscode\" xml:space=\"preserve\">\r\n    <value>New passcode</value>\r\n  </data>\r\n  <data name=\"EnterYourCurrentPasscode\" xml:space=\"preserve\">\r\n    <value>Enter your current passcode</value>\r\n  </data>\r\n  <data name=\"PasscodeType\" xml:space=\"preserve\">\r\n    <value>Passcode type</value>\r\n  </data>\r\n  <data name=\"Pin\" xml:space=\"preserve\">\r\n    <value>PIN</value>\r\n  </data>\r\n  <data name=\"Privacy\" xml:space=\"preserve\">\r\n    <value>Privacy</value>\r\n  </data>\r\n  <data name=\"Security\" xml:space=\"preserve\">\r\n    <value>Security</value>\r\n  </data>\r\n  <data name=\"YouHaveNewMessage\" xml:space=\"preserve\">\r\n    <value>You have a new message</value>\r\n  </data>\r\n  <data name=\"PasscodeAutolockHint\" xml:space=\"preserve\">\r\n    <value>Require passcode if away for a time.</value>\r\n  </data>\r\n  <data name=\"PasscodeAutolockIn\" xml:space=\"preserve\">\r\n    <value>In {0}</value>\r\n  </data>\r\n  <data name=\"Autolock\" xml:space=\"preserve\">\r\n    <value>Auto-lock</value>\r\n  </data>\r\n  <data name=\"AutolockDisabled\" xml:space=\"preserve\">\r\n    <value>Disabled</value>\r\n  </data>\r\n  <data name=\"IncorrectPasscode\" xml:space=\"preserve\">\r\n    <value>Incorrect passcode</value>\r\n  </data>\r\n  <data name=\"Reply\" xml:space=\"preserve\">\r\n    <value>Reply</value>\r\n  </data>\r\n  <data name=\"AndOthers\" xml:space=\"preserve\">\r\n    <value>And {0} others</value>\r\n  </data>\r\n  <data name=\"ForwardedAudioGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded audios</value>\r\n  </data>\r\n  <data name=\"ForwardedAudioGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded audio</value>\r\n  </data>\r\n  <data name=\"ForwardedAudioNominativePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded audios</value>\r\n  </data>\r\n  <data name=\"ForwardedAudioNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded audio</value>\r\n  </data>\r\n  <data name=\"ForwardedContactGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded contacts</value>\r\n  </data>\r\n  <data name=\"ForwardedContactGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded contact</value>\r\n  </data>\r\n  <data name=\"ForwardedContactNominativePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded contacts</value>\r\n  </data>\r\n  <data name=\"ForwardedContactNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded contact</value>\r\n  </data>\r\n  <data name=\"ForwardedFileGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded files</value>\r\n  </data>\r\n  <data name=\"ForwardedFileGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded file</value>\r\n  </data>\r\n  <data name=\"ForwardedFileNominativePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded files</value>\r\n  </data>\r\n  <data name=\"ForwardedFileNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded file</value>\r\n  </data>\r\n  <data name=\"ForwardedLocationGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded locations</value>\r\n  </data>\r\n  <data name=\"ForwardedLocationGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded location</value>\r\n  </data>\r\n  <data name=\"ForwardedLocationNominativePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded locations</value>\r\n  </data>\r\n  <data name=\"ForwardedLocationNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded location</value>\r\n  </data>\r\n  <data name=\"ForwardedMessageGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded messages</value>\r\n  </data>\r\n  <data name=\"ForwardedMessageGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded message</value>\r\n  </data>\r\n  <data name=\"ForwardedMessageNominativePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded messages</value>\r\n  </data>\r\n  <data name=\"ForwardedMessageNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded message</value>\r\n  </data>\r\n  <data name=\"ForwardedPhotoGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded photos</value>\r\n  </data>\r\n  <data name=\"ForwardedPhotoGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded photo</value>\r\n  </data>\r\n  <data name=\"ForwardedPhotoNominativePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded photos</value>\r\n  </data>\r\n  <data name=\"ForwardedPhotoNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded photo</value>\r\n  </data>\r\n  <data name=\"ForwardedStickerGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded stickers</value>\r\n  </data>\r\n  <data name=\"ForwardedStickerGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded sticker</value>\r\n  </data>\r\n  <data name=\"ForwardedStickerNominativePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded stickers</value>\r\n  </data>\r\n  <data name=\"ForwardedStickerNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded sticker</value>\r\n  </data>\r\n  <data name=\"ForwardedVideoGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded videos</value>\r\n  </data>\r\n  <data name=\"ForwardedVideoGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded video</value>\r\n  </data>\r\n  <data name=\"ForwardedVideoNominativePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded videos</value>\r\n  </data>\r\n  <data name=\"ForwardedVideoNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded video</value>\r\n  </data>\r\n  <data name=\"SearchMessages\" xml:space=\"preserve\">\r\n    <value>Search messages</value>\r\n  </data>\r\n  <data name=\"Unsupported\" xml:space=\"preserve\">\r\n    <value>Unsupported</value>\r\n  </data>\r\n  <data name=\"EnterYourCurrentPassword\" xml:space=\"preserve\">\r\n    <value>Enter your current password</value>\r\n  </data>\r\n  <data name=\"Password\" xml:space=\"preserve\">\r\n    <value>Password</value>\r\n  </data>\r\n  <data name=\"PasswordInvalidString\" xml:space=\"preserve\">\r\n    <value>Invalid password. Please try again.</value>\r\n  </data>\r\n  <data name=\"AlmostThere\" xml:space=\"preserve\">\r\n    <value>Almost there!</value>\r\n  </data>\r\n  <data name=\"ChangePassword\" xml:space=\"preserve\">\r\n    <value>Change password</value>\r\n  </data>\r\n  <data name=\"ChangePasswordHint\" xml:space=\"preserve\">\r\n    <value>You can set a password that will be required when you log in from a new device in addition to a pin number you will receive in an SMS.</value>\r\n  </data>\r\n  <data name=\"ChangeRecoveryEmail\" xml:space=\"preserve\">\r\n    <value>Change recovery e-mail</value>\r\n  </data>\r\n  <data name=\"CompletePasswordHint\" xml:space=\"preserve\">\r\n    <value>Please check your e-mail (don't forget the spam folder) to complete Two-Step Verification setup.</value>\r\n  </data>\r\n  <data name=\"ConfirmPassword\" xml:space=\"preserve\">\r\n    <value>Re-enter your password</value>\r\n  </data>\r\n  <data name=\"EnterPassword\" xml:space=\"preserve\">\r\n    <value>Enter your password</value>\r\n  </data>\r\n  <data name=\"EnterRecoveryEmail\" xml:space=\"preserve\">\r\n    <value>Enter your E-Mail</value>\r\n  </data>\r\n  <data name=\"EnterRecoveryEmailHint\" xml:space=\"preserve\">\r\n    <value>Please add your valid e-mail. It is the only way to recover a forgotten password.</value>\r\n  </data>\r\n  <data name=\"RecoveryEmail\" xml:space=\"preserve\">\r\n    <value>Recovery e-mail</value>\r\n  </data>\r\n  <data name=\"SetRecoveryEmail\" xml:space=\"preserve\">\r\n    <value>Set recovery e-mail</value>\r\n  </data>\r\n  <data name=\"Skip\" xml:space=\"preserve\">\r\n    <value>Skip</value>\r\n  </data>\r\n  <data name=\"SkipRecoveryEmailHint\" xml:space=\"preserve\">\r\n    <value>No, seriously.\r\n\r\nIf you forget your password, you will be lose access to your Telegram account. There will be no way to restore it.</value>\r\n  </data>\r\n  <data name=\"TwoStepVerification\" xml:space=\"preserve\">\r\n    <value>Two-Step Verification</value>\r\n  </data>\r\n  <data name=\"YourPassword\" xml:space=\"preserve\">\r\n    <value>Your password</value>\r\n  </data>\r\n  <data name=\"CurrentSession\" xml:space=\"preserve\">\r\n    <value>Current Session</value>\r\n  </data>\r\n  <data name=\"OtherSessions\" xml:space=\"preserve\">\r\n    <value>Other Sessions</value>\r\n  </data>\r\n  <data name=\"OfficialApp\" xml:space=\"preserve\">\r\n    <value>Official app</value>\r\n  </data>\r\n  <data name=\"Sessions\" xml:space=\"preserve\">\r\n    <value>Active Sessions</value>\r\n  </data>\r\n  <data name=\"TerminateAllOtherSessionsNote\" xml:space=\"preserve\">\r\n    <value>Logs out all devices except for this one</value>\r\n  </data>\r\n  <data name=\"UnofficialApp\" xml:space=\"preserve\">\r\n    <value>Unofficial app</value>\r\n  </data>\r\n  <data name=\"EmailInvalid\" xml:space=\"preserve\">\r\n    <value>Invalid email address</value>\r\n  </data>\r\n  <data name=\"PasswordActive\" xml:space=\"preserve\">\r\n    <value>Your password for Two-Step Verification is now active.</value>\r\n  </data>\r\n  <data name=\"Success\" xml:space=\"preserve\">\r\n    <value>Success!</value>\r\n  </data>\r\n  <data name=\"RecoveryEmailPending\" xml:space=\"preserve\">\r\n    <value>Your recovery e-mail {0} is not yet active and pending confirmation.</value>\r\n  </data>\r\n  <data name=\"AbortTwoStepVerificationSetup\" xml:space=\"preserve\">\r\n    <value>Abort Two-Step Verification Setup</value>\r\n  </data>\r\n  <data name=\"StepsToCompleteToTwoStepsVerificationSetup\" xml:space=\"preserve\">\r\n    <value>Please follow these steps to complete Two-Step Verification Setup\r\n\r\n1. Check your e-mail (don't forget the spam folder) {0}\r\n\r\n2. Click on the validation link.</value>\r\n  </data>\r\n  <data name=\"Hint\" xml:space=\"preserve\">\r\n    <value>Hint</value>\r\n  </data>\r\n  <data name=\"PasswordHint\" xml:space=\"preserve\">\r\n    <value>Password hint</value>\r\n  </data>\r\n  <data name=\"PasswordHintLabel\" xml:space=\"preserve\">\r\n    <value>Please create a hint for your password</value>\r\n  </data>\r\n  <data name=\"ForgotPassword\" xml:space=\"preserve\">\r\n    <value>Forgot password?</value>\r\n  </data>\r\n  <data name=\"PasswordHintError\" xml:space=\"preserve\">\r\n    <value>Hint must be different from your password</value>\r\n  </data>\r\n  <data name=\"EnterPasswordHint\" xml:space=\"preserve\">\r\n    <value>Enter your password hint</value>\r\n  </data>\r\n  <data name=\"HavingTroubleAccessingEmailMessage\" xml:space=\"preserve\">\r\n    <value>Having trouble accessing your e-mail {0}?</value>\r\n  </data>\r\n  <data name=\"NoAccessRecoveryEmailMessage\" xml:space=\"preserve\">\r\n    <value>If you can't restore access to your e-mail, your remaining options are either to remember your password or to reset your account.</value>\r\n  </data>\r\n  <data name=\"NoRecoveryEmailMessage\" xml:space=\"preserve\">\r\n    <value>Since you haven't provided a recovery e-mail when setting up your password, your remaining options are either to remember your password or to reset your account.</value>\r\n  </data>\r\n  <data name=\"PasswordDeactivated\" xml:space=\"preserve\">\r\n    <value>Password deactivated</value>\r\n  </data>\r\n  <data name=\"PasswordMessage\" xml:space=\"preserve\">\r\n    <value>You have enabled Two-Step Verification, so your account is protected with an additional password.</value>\r\n  </data>\r\n  <data name=\"PasswordRecovery\" xml:space=\"preserve\">\r\n    <value>Password recovery</value>\r\n  </data>\r\n  <data name=\"PasswordRecoveryHint\" xml:space=\"preserve\">\r\n    <value>Please check your e-mail and enter the 6-digit code we have sent here.</value>\r\n  </data>\r\n  <data name=\"SentRecoveryCodeMessage\" xml:space=\"preserve\">\r\n    <value>We have sent a recovery code to the e-mail you provided: {0}</value>\r\n  </data>\r\n  <data name=\"Sorry\" xml:space=\"preserve\">\r\n    <value>Sorry</value>\r\n  </data>\r\n  <data name=\"RecoveryEmailComplete\" xml:space=\"preserve\">\r\n    <value>You have enabled Two-Step Verification.\r\nYou'll need the password you set up here to log in to your Telegram account.</value>\r\n  </data>\r\n  <data name=\"TerminateSessionHint\" xml:space=\"preserve\">\r\n    <value>Tap on a session to terminate.</value>\r\n  </data>\r\n  <data name=\"GettingLinkInfo\" xml:space=\"preserve\">\r\n    <value>Getting link info...</value>\r\n  </data>\r\n  <data name=\"ResetMyAccount\" xml:space=\"preserve\">\r\n    <value>Reset my account</value>\r\n  </data>\r\n  <data name=\"ResetMyAccountConfirmation\" xml:space=\"preserve\">\r\n    <value>This action can not be undone.\r\n\r\nIf you reset your account, all your messages and chats will be deleted.</value>\r\n  </data>\r\n  <data name=\"ResetMyAccountHint\" xml:space=\"preserve\">\r\n    <value>You will lose all your chats and messages, along with any media and files you shared, \r\nif you proceed with resetting your account.</value>\r\n  </data>\r\n  <data name=\"IsRecordingAudio\" xml:space=\"preserve\">\r\n    <value>Is recording audio</value>\r\n  </data>\r\n  <data name=\"IsSendingFile\" xml:space=\"preserve\">\r\n    <value>Is sending file</value>\r\n  </data>\r\n  <data name=\"IsSendingPhoto\" xml:space=\"preserve\">\r\n    <value>Is sending photo</value>\r\n  </data>\r\n  <data name=\"IsSendingVideo\" xml:space=\"preserve\">\r\n    <value>Is sending video</value>\r\n  </data>\r\n  <data name=\"RecordingAudio\" xml:space=\"preserve\">\r\n    <value>Recording audio</value>\r\n  </data>\r\n  <data name=\"SendingFile\" xml:space=\"preserve\">\r\n    <value>Sending file</value>\r\n  </data>\r\n  <data name=\"SendingPhoto\" xml:space=\"preserve\">\r\n    <value>Sending photo</value>\r\n  </data>\r\n  <data name=\"SendingVideo\" xml:space=\"preserve\">\r\n    <value>Sending video</value>\r\n  </data>\r\n  <data name=\"AddCaption\" xml:space=\"preserve\">\r\n    <value>Add a caption...</value>\r\n  </data>\r\n  <data name=\"CopyLink\" xml:space=\"preserve\">\r\n    <value>Copy link</value>\r\n  </data>\r\n  <data name=\"CopyLinkHint\" xml:space=\"preserve\">\r\n    <value>Link copied to clipboard</value>\r\n  </data>\r\n  <data name=\"GroupFullError\" xml:space=\"preserve\">\r\n    <value>Sorry, this group is already full.</value>\r\n  </data>\r\n  <data name=\"GroupNotExistsError\" xml:space=\"preserve\">\r\n    <value>Sorry, this chat does not seem to exist.</value>\r\n  </data>\r\n  <data name=\"InviteGroupViaLink\" xml:space=\"preserve\">\r\n    <value>Invite to Group via Link</value>\r\n  </data>\r\n  <data name=\"InviteLink\" xml:space=\"preserve\">\r\n    <value>Invite link</value>\r\n  </data>\r\n  <data name=\"InviteLinkHint\" xml:space=\"preserve\">\r\n    <value>Anyone who has Telegram installed will be able to join your group by following this link.</value>\r\n  </data>\r\n  <data name=\"JoinGroupConfirmation\" xml:space=\"preserve\">\r\n    <value>Do you want to join the group '{0}'?</value>\r\n  </data>\r\n  <data name=\"MessageActionChatJoinedByLink\" xml:space=\"preserve\">\r\n    <value>{0} joined the group via invite link</value>\r\n  </data>\r\n  <data name=\"RevokeLink\" xml:space=\"preserve\">\r\n    <value>Revoke link</value>\r\n  </data>\r\n  <data name=\"RevokeLinkConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to revoke this link? Once you do, no one will be able to join the group using it.</value>\r\n  </data>\r\n  <data name=\"RevokeLinkHint\" xml:space=\"preserve\">\r\n    <value>The previous invite link is now inactive. A new link has been generated.</value>\r\n  </data>\r\n  <data name=\"ShareLink\" xml:space=\"preserve\">\r\n    <value>Share link</value>\r\n  </data>\r\n  <data name=\"Directions\" xml:space=\"preserve\">\r\n    <value>Directions</value>\r\n  </data>\r\n  <data name=\"NearbyPlaces\" xml:space=\"preserve\">\r\n    <value>Nearby places</value>\r\n  </data>\r\n  <data name=\"SendThisLocation\" xml:space=\"preserve\">\r\n    <value>Send My Location</value>\r\n  </data>\r\n  <data name=\"PoweredBy\" xml:space=\"preserve\">\r\n    <value>Powered by</value>\r\n  </data>\r\n  <data name=\"LocationServicesDisabled\" xml:space=\"preserve\">\r\n    <value>Your phone's location services are turned off.</value>\r\n  </data>\r\n  <data name=\"LocationSettings\" xml:space=\"preserve\">\r\n    <value>Location settings</value>\r\n  </data>\r\n  <data name=\"Unknown\" xml:space=\"preserve\">\r\n    <value>Unknown</value>\r\n  </data>\r\n  <data name=\"AddStickersConfirmation\" xml:space=\"preserve\">\r\n    <value>Do you want to add stickers '{0}'?</value>\r\n  </data>\r\n  <data name=\"NewStickersAdded\" xml:space=\"preserve\">\r\n    <value>New sticker set added</value>\r\n  </data>\r\n  <data name=\"StickersNotFound\" xml:space=\"preserve\">\r\n    <value>Stickers not found</value>\r\n  </data>\r\n  <data name=\"ClearLogs\" xml:space=\"preserve\">\r\n    <value>Clear Logs</value>\r\n  </data>\r\n  <data name=\"Hide\" xml:space=\"preserve\">\r\n    <value>Hide</value>\r\n  </data>\r\n  <data name=\"Remove\" xml:space=\"preserve\">\r\n    <value>Remove</value>\r\n  </data>\r\n  <data name=\"SendLogs\" xml:space=\"preserve\">\r\n    <value>Send Logs</value>\r\n  </data>\r\n  <data name=\"StickerGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Stickers</value>\r\n  </data>\r\n  <data name=\"StickerGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Sticker</value>\r\n  </data>\r\n  <data name=\"StickerNominativePlural\" xml:space=\"preserve\">\r\n    <value>Stickers</value>\r\n  </data>\r\n  <data name=\"StickerNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Sticker</value>\r\n  </data>\r\n  <data name=\"Stickers\" xml:space=\"preserve\">\r\n    <value>Stickers</value>\r\n  </data>\r\n  <data name=\"StickersDescription\" xml:space=\"preserve\">\r\n    <value>Artists are welcome to add their own sticker packs using our @stickers bot.\r\n\r\nUsers can add stickers by tapping on them and choosing \"Add to Stickers\".</value>\r\n  </data>\r\n  <data name=\"LinkCopiedToClipboard\" xml:space=\"preserve\">\r\n    <value>Link copied to clipboard</value>\r\n  </data>\r\n  <data name=\"Close\" xml:space=\"preserve\">\r\n    <value>Close</value>\r\n  </data>\r\n  <data name=\"Show\" xml:space=\"preserve\">\r\n    <value>Show</value>\r\n  </data>\r\n  <data name=\"AddToStickers\" xml:space=\"preserve\">\r\n    <value>Add to Stickers</value>\r\n  </data>\r\n  <data name=\"SecretChatRequested\" xml:space=\"preserve\">\r\n    <value>Exchanging encryption keys...</value>\r\n  </data>\r\n  <data name=\"Bot\" xml:space=\"preserve\">\r\n    <value>Bot</value>\r\n  </data>\r\n  <data name=\"OnlySeesMessagesStartingWithSlash\" xml:space=\"preserve\">\r\n    <value>Has no access to messages</value>\r\n  </data>\r\n  <data name=\"SeesAllMessages\" xml:space=\"preserve\">\r\n    <value>Has access to messages</value>\r\n  </data>\r\n  <data name=\"WhatCanThisBotDo\" xml:space=\"preserve\">\r\n    <value>What can this bot do?</value>\r\n  </data>\r\n  <data name=\"AddBotToGroupsError\" xml:space=\"preserve\">\r\n    <value>This bot can't join groups.</value>\r\n  </data>\r\n  <data name=\"AddToGroup\" xml:space=\"preserve\">\r\n    <value>Add to Group</value>\r\n  </data>\r\n  <data name=\"BlockContactConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to block this contact?</value>\r\n  </data>\r\n  <data name=\"Help\" xml:space=\"preserve\">\r\n    <value>Help</value>\r\n  </data>\r\n  <data name=\"Start\" xml:space=\"preserve\">\r\n    <value>Start</value>\r\n  </data>\r\n  <data name=\"UnblockContactConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to unblock this contact?</value>\r\n  </data>\r\n  <data name=\"SharedLinks\" xml:space=\"preserve\">\r\n    <value>Links</value>\r\n  </data>\r\n  <data name=\"BackgroudnTaskDisabledAlert\" xml:space=\"preserve\">\r\n    <value>You disabled background task for Telegram Messenger. You will not receive Telegram message alerts when background task is disabled. Please allow app to run in the background.</value>\r\n  </data>\r\n  <data name=\"SearchSharedLinks\" xml:space=\"preserve\">\r\n    <value>Search shared links</value>\r\n  </data>\r\n  <data name=\"SharedFiles\" xml:space=\"preserve\">\r\n    <value>Files</value>\r\n  </data>\r\n  <data name=\"ShareLinks\" xml:space=\"preserve\">\r\n    <value>Share links in this chat and access them on any of your devices.</value>\r\n  </data>\r\n  <data name=\"DeleteAndStop\" xml:space=\"preserve\">\r\n    <value>Delete and stop</value>\r\n  </data>\r\n  <data name=\"Restart\" xml:space=\"preserve\">\r\n    <value>Restart</value>\r\n  </data>\r\n  <data name=\"RestartBot\" xml:space=\"preserve\">\r\n    <value>Restart bot</value>\r\n  </data>\r\n  <data name=\"StopBot\" xml:space=\"preserve\">\r\n    <value>Stop</value>\r\n  </data>\r\n  <data name=\"ClearSearchHistoryConfirmation\" xml:space=\"preserve\">\r\n    <value>Clear search history?</value>\r\n  </data>\r\n  <data name=\"Recent\" xml:space=\"preserve\">\r\n    <value>Recent</value>\r\n  </data>\r\n  <data name=\"NewChannel\" xml:space=\"preserve\">\r\n    <value>New Channel</value>\r\n  </data>\r\n  <data name=\"MessageActionBroadcastCreate\" xml:space=\"preserve\">\r\n    <value>{0} created the broadcast \"{1}\"</value>\r\n  </data>\r\n  <data name=\"MessageActionChannelCreate\" xml:space=\"preserve\">\r\n    <value>Channel created</value>\r\n  </data>\r\n  <data name=\"ReportSpam\" xml:space=\"preserve\">\r\n    <value>Report Spam</value>\r\n  </data>\r\n  <data name=\"ConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\r\n    <value>Conversation marked as spam. Delete and block user?</value>\r\n  </data>\r\n  <data name=\"GroupConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\r\n    <value>Conversation marked as spam. Delete and exit group?</value>\r\n  </data>\r\n  <data name=\"PeerFloodAddContact\" xml:space=\"preserve\">\r\n    <value>Sorry, you can only add mutual contacts to groups at the moment.</value>\r\n  </data>\r\n  <data name=\"PeerFloodSendMessage\" xml:space=\"preserve\">\r\n    <value>Sorry, you can only send messages to mutual contacts at the moment.</value>\r\n  </data>\r\n  <data name=\"LeaveChannel\" xml:space=\"preserve\">\r\n    <value>Leave channel</value>\r\n  </data>\r\n  <data name=\"AccessLevel\" xml:space=\"preserve\">\r\n    <value>Access level</value>\r\n  </data>\r\n  <data name=\"AddManager\" xml:space=\"preserve\">\r\n    <value>Add manager</value>\r\n  </data>\r\n  <data name=\"Comments\" xml:space=\"preserve\">\r\n    <value>Comments</value>\r\n  </data>\r\n  <data name=\"CommentsDescription\" xml:space=\"preserve\">\r\n    <value>If you enable comments, members will be able to discuss your posts in the channel.</value>\r\n  </data>\r\n  <data name=\"Creator\" xml:space=\"preserve\">\r\n    <value>Creator</value>\r\n  </data>\r\n  <data name=\"Management\" xml:space=\"preserve\">\r\n    <value>Management</value>\r\n  </data>\r\n  <data name=\"Moderator\" xml:space=\"preserve\">\r\n    <value>Moderator</value>\r\n  </data>\r\n  <data name=\"ModeratorDescription\" xml:space=\"preserve\">\r\n    <value>Can remove user generated content.</value>\r\n  </data>\r\n  <data name=\"Publisher\" xml:space=\"preserve\">\r\n    <value>Publisher</value>\r\n  </data>\r\n  <data name=\"PublisherDescription\" xml:space=\"preserve\">\r\n    <value>Can post as channel and add and delete content.</value>\r\n  </data>\r\n  <data name=\"ChannelName\" xml:space=\"preserve\">\r\n    <value>Channel name</value>\r\n  </data>\r\n  <data name=\"Description\" xml:space=\"preserve\">\r\n    <value>Description</value>\r\n  </data>\r\n  <data name=\"AboutDescription\" xml:space=\"preserve\">\r\n    <value>You can provide an optional description for your channel.</value>\r\n  </data>\r\n  <data name=\"Back\" xml:space=\"preserve\">\r\n    <value>Back</value>\r\n  </data>\r\n  <data name=\"ChannelType\" xml:space=\"preserve\">\r\n    <value>Channel Type</value>\r\n  </data>\r\n  <data name=\"Private\" xml:space=\"preserve\">\r\n    <value>Private Group</value>\r\n  </data>\r\n  <data name=\"PrivateChannelDescription\" xml:space=\"preserve\">\r\n    <value>Private channels can only be joined via an invite link.</value>\r\n  </data>\r\n  <data name=\"Public\" xml:space=\"preserve\">\r\n    <value>Public Group</value>\r\n  </data>\r\n  <data name=\"PublicChannelDescription\" xml:space=\"preserve\">\r\n    <value>Public channels can be found in search, anyone can join them.</value>\r\n  </data>\r\n  <data name=\"PrivateLinkDescription\" xml:space=\"preserve\">\r\n    <value>People can join your channel by following this link. You can revoke the link any time.</value>\r\n  </data>\r\n  <data name=\"PublicLinkDescription\" xml:space=\"preserve\">\r\n    <value>People can share this link with others and find your channel using Telegram search.</value>\r\n  </data>\r\n  <data name=\"CommentGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Comments</value>\r\n  </data>\r\n  <data name=\"CommentGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Comment</value>\r\n  </data>\r\n  <data name=\"CommentNominativePlural\" xml:space=\"preserve\">\r\n    <value>Comments</value>\r\n  </data>\r\n  <data name=\"CommentNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Comment</value>\r\n  </data>\r\n  <data name=\"Blacklist\" xml:space=\"preserve\">\r\n    <value>Blacklist</value>\r\n  </data>\r\n  <data name=\"Channel\" xml:space=\"preserve\">\r\n    <value>Channel</value>\r\n  </data>\r\n  <data name=\"ChoosePublicChannelLinkNotification\" xml:space=\"preserve\">\r\n    <value>Please choose a link for your public channel, so that people can find it in search and share with others.\r\n\r\nIf you're not interested, we suggest creating a private channel instead.</value>\r\n  </data>\r\n  <data name=\"MessageActionChannelEditPhoto\" xml:space=\"preserve\">\r\n    <value>Channel photo updated</value>\r\n  </data>\r\n  <data name=\"Mute\" xml:space=\"preserve\">\r\n    <value>Mute</value>\r\n  </data>\r\n  <data name=\"SetChannelPhoto\" xml:space=\"preserve\">\r\n    <value>Set Channel Photo</value>\r\n  </data>\r\n  <data name=\"Unmute\" xml:space=\"preserve\">\r\n    <value>Unmute</value>\r\n  </data>\r\n  <data name=\"WhatIsChannel\" xml:space=\"preserve\">\r\n    <value>What is a channel?</value>\r\n  </data>\r\n  <data name=\"WhatIsChannelDescription\" xml:space=\"preserve\">\r\n    <value>Channels are a new tool for broadcasting your messages to large audiences.</value>\r\n  </data>\r\n  <data name=\"AddEditorConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to add {0} as editor?</value>\r\n  </data>\r\n  <data name=\"AddModeratorConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to add {0} as moderator?</value>\r\n  </data>\r\n  <data name=\"PrivateChannel\" xml:space=\"preserve\">\r\n    <value>Private Channel</value>\r\n  </data>\r\n  <data name=\"PrivateToPublicChannelNotification\" xml:space=\"preserve\">\r\n    <value>Please note that if you choose a public link for your channel, anyone will be able to find it in search and join.\r\n\r\nDo not create this link if you want your channel to stay private.</value>\r\n  </data>\r\n  <data name=\"PublicChannel\" xml:space=\"preserve\">\r\n    <value>Public Channel</value>\r\n  </data>\r\n  <data name=\"ChannelsAdminPublicTooMuch\" xml:space=\"preserve\">\r\n    <value>Sorry, you have reserved too many public usernames. You can revoke the link from one of your older groups or channels, or create a private entity instead.</value>\r\n  </data>\r\n  <data name=\"ChannelsAdminPublicTooMuchShort\" xml:space=\"preserve\">\r\n    <value>Too many public channels.</value>\r\n  </data>\r\n  <data name=\"DeleteChannelConfirmation\" xml:space=\"preserve\">\r\n    <value>Wait! Deleting this channel will remove all members and all messages will be lost. Delete the channel anyway?</value>\r\n  </data>\r\n  <data name=\"Follow\" xml:space=\"preserve\">\r\n    <value>Join</value>\r\n  </data>\r\n  <data name=\"Join\" xml:space=\"preserve\">\r\n    <value>Join</value>\r\n  </data>\r\n  <data name=\"LeaveChannelConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to leave the channel?</value>\r\n  </data>\r\n  <data name=\"JoinChannelConfirmation\" xml:space=\"preserve\">\r\n    <value>Do you want to join the channel '{0}'?</value>\r\n  </data>\r\n  <data name=\"Administration\" xml:space=\"preserve\">\r\n    <value>Administration</value>\r\n  </data>\r\n  <data name=\"Administrators\" xml:space=\"preserve\">\r\n    <value>Administrators</value>\r\n  </data>\r\n  <data name=\"DeleteChannel\" xml:space=\"preserve\">\r\n    <value>Delete Channel</value>\r\n  </data>\r\n  <data name=\"MessageActionChannelDeletePhoto\" xml:space=\"preserve\">\r\n    <value>Channel photo removed</value>\r\n  </data>\r\n  <data name=\"MessageActionChannelEditTitle\" xml:space=\"preserve\">\r\n    <value>Channel name changed to \"{0}\"</value>\r\n  </data>\r\n  <data name=\"SetSharedLink\" xml:space=\"preserve\">\r\n    <value>Set shared link</value>\r\n  </data>\r\n  <data name=\"AddAdministrator\" xml:space=\"preserve\">\r\n    <value>Add administrator</value>\r\n  </data>\r\n  <data name=\"ChannelAdministratorsHint\" xml:space=\"preserve\">\r\n    <value>You can add administrators to help you manage your channel. Tap and hold to remove admins.</value>\r\n  </data>\r\n  <data name=\"ChannelMembersHint\" xml:space=\"preserve\">\r\n    <value>Only channel administrators can see this list.</value>\r\n  </data>\r\n  <data name=\"InviteViaLink\" xml:space=\"preserve\">\r\n    <value>Invite via link</value>\r\n  </data>\r\n  <data name=\"AddUserAsAdministrator\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to make {0} an administrator?</value>\r\n  </data>\r\n  <data name=\"ChannelIsNoLongerAccessible\" xml:space=\"preserve\">\r\n    <value>Sorry, this channel is no longer accessible.</value>\r\n  </data>\r\n  <data name=\"InviteContactConfirmation\" xml:space=\"preserve\">\r\n    <value>{0} hasn't joined the channel yet. Do you want to invite them?</value>\r\n  </data>\r\n  <data name=\"PostToChannelError\" xml:space=\"preserve\">\r\n    <value>Sorry, you can't post to this channel.</value>\r\n  </data>\r\n  <data name=\"SearchSharedMusic\" xml:space=\"preserve\">\r\n    <value>Search shared music</value>\r\n  </data>\r\n  <data name=\"SharedMusic\" xml:space=\"preserve\">\r\n    <value>Music</value>\r\n  </data>\r\n  <data name=\"ShareMusic\" xml:space=\"preserve\">\r\n    <value>All music shared in this chat will appear here.</value>\r\n  </data>\r\n  <data name=\"AdminsDescription\" xml:space=\"preserve\">\r\n    <value>Group admins can add and remove members, edit name and photo of the group</value>\r\n  </data>\r\n  <data name=\"AllMembersAreAdmins\" xml:space=\"preserve\">\r\n    <value>All members are admins</value>\r\n  </data>\r\n  <data name=\"MembersDescription\" xml:space=\"preserve\">\r\n    <value>Group members can add and remove members, edit name and photo of the group</value>\r\n  </data>\r\n  <data name=\"SetAdmins\" xml:space=\"preserve\">\r\n    <value>Set Admins</value>\r\n  </data>\r\n  <data name=\"UpgradeToSupergroup\" xml:space=\"preserve\">\r\n    <value>Upgrade to Supergroup</value>\r\n  </data>\r\n  <data name=\"UpgradeToSupergroupConfirmation\" xml:space=\"preserve\">\r\n    <value>Please note that group members will need to update their Telegram apps to the latest version to see your supergroup. Are you sure you want to upgrade this group?</value>\r\n  </data>\r\n  <data name=\"UpgradeToSupergroupDescription\" xml:space=\"preserve\">\r\n    <value>Members limit reached.\r\nTo go over the limit and get additional features, upgrade to a supergroup:\r\n• Supergroups can get up to {0}\r\n• New members see the entire chat history\r\n• Admins delete messages for everyone\r\n• Notifications are muted by default</value>\r\n  </data>\r\n  <data name=\"MessageActionChannelMigrateFrom\" xml:space=\"preserve\">\r\n    <value>This group was upgraded to a supergroup</value>\r\n  </data>\r\n  <data name=\"MessageActionChatActivate\" xml:space=\"preserve\">\r\n    <value>Chat was activated</value>\r\n  </data>\r\n  <data name=\"MessageActionChatDeactivate\" xml:space=\"preserve\">\r\n    <value>Chat was deactivated</value>\r\n  </data>\r\n  <data name=\"MessageActionChatMigrateTo\" xml:space=\"preserve\">\r\n    <value>Chat migrated to channel \"{0}\"</value>\r\n  </data>\r\n  <data name=\"DeleteGroup\" xml:space=\"preserve\">\r\n    <value>Delete Group</value>\r\n  </data>\r\n  <data name=\"LeaveGroup\" xml:space=\"preserve\">\r\n    <value>Leave group</value>\r\n  </data>\r\n  <data name=\"LeaveGroupConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to leave the group?</value>\r\n  </data>\r\n  <data name=\"AdminsTooMuch\" xml:space=\"preserve\">\r\n    <value>Sorry, too many adminstrators in this group.</value>\r\n  </data>\r\n  <data name=\"BlockedUsersDescription\" xml:space=\"preserve\">\r\n    <value>Blocked users are removed from the group and can only come back if invited by an admin. Invite links don't work for them.</value>\r\n  </data>\r\n  <data name=\"BotsTooMuch\" xml:space=\"preserve\">\r\n    <value>Sorry, too many bots in this group.</value>\r\n  </data>\r\n  <data name=\"DeleteGroupConfirmation\" xml:space=\"preserve\">\r\n    <value>Wait! Deleting this group will remove all members and all messages will be lost. Delete the group anyway?</value>\r\n  </data>\r\n  <data name=\"GroupAdministratorsHint\" xml:space=\"preserve\">\r\n    <value>You can add administrators to help you manage your group. Tap and hold to remove admins.</value>\r\n  </data>\r\n  <data name=\"GroupNoLongerAccessible\" xml:space=\"preserve\">\r\n    <value>Sorry, this group is no longer accessible.</value>\r\n  </data>\r\n  <data name=\"InviteUserBackError\" xml:space=\"preserve\">\r\n    <value>Sorry, this user decided to leave this group, so you cannot invite them back here.</value>\r\n  </data>\r\n  <data name=\"MessageActionChatAddSelf\" xml:space=\"preserve\">\r\n    <value>{0} returned to the group</value>\r\n  </data>\r\n  <data name=\"PromoteToAdmin\" xml:space=\"preserve\">\r\n    <value>Promote to admin</value>\r\n  </data>\r\n  <data name=\"UserNotMutualContact\" xml:space=\"preserve\">\r\n    <value>Sorry, you can't add this user to groups.</value>\r\n  </data>\r\n  <data name=\"UsersTooMuch\" xml:space=\"preserve\">\r\n    <value>Sorry, this group is full.</value>\r\n  </data>\r\n  <data name=\"GroupIsNoLongerAccessible\" xml:space=\"preserve\">\r\n    <value>Sorry, this group is no longer accessible.</value>\r\n  </data>\r\n  <data name=\"InviteContactToGroupConfirmation\" xml:space=\"preserve\">\r\n    <value>{0} hasn't joined the group yet. Do you want to invite them?</value>\r\n  </data>\r\n  <data name=\"OpenUrlConfirmation\" xml:space=\"preserve\">\r\n    <value>Open url {0}?</value>\r\n  </data>\r\n  <data name=\"ServiceNotifications\" xml:space=\"preserve\">\r\n    <value>Service notifications</value>\r\n  </data>\r\n  <data name=\"AutomaticAudioDownload\" xml:space=\"preserve\">\r\n    <value>Audio Auto-Download</value>\r\n  </data>\r\n  <data name=\"AutomaticPhotoDownload\" xml:space=\"preserve\">\r\n    <value>Photo Auto-Download</value>\r\n  </data>\r\n  <data name=\"CacheSettings\" xml:space=\"preserve\">\r\n    <value>Cache settings</value>\r\n  </data>\r\n  <data name=\"ChatSettings\" xml:space=\"preserve\">\r\n    <value>Chat Settings</value>\r\n  </data>\r\n  <data name=\"ClearChannelConfirmation\" xml:space=\"preserve\">\r\n    <value>Delete all cached text and media from this channel?</value>\r\n  </data>\r\n  <data name=\"ClearLocalDatabaseConfirmation\" xml:space=\"preserve\">\r\n    <value>Clear cached text messages?</value>\r\n  </data>\r\n  <data name=\"ClearLocalDatabaseDescription\" xml:space=\"preserve\">\r\n    <value>Clearing the local database will delete the texts of cached messages and compress the database to save internal disk space. Telegram needs some data to work, so database size will not reach zero.\r\n\r\nThis operation can take a few minutes to complete.</value>\r\n  </data>\r\n  <data name=\"ClearSupergroupConfirmation\" xml:space=\"preserve\">\r\n    <value>Delete all cached text and media from this supergroup?</value>\r\n  </data>\r\n  <data name=\"Documents\" xml:space=\"preserve\">\r\n    <value>Documents</value>\r\n  </data>\r\n  <data name=\"Forever\" xml:space=\"preserve\">\r\n    <value>Forever</value>\r\n  </data>\r\n  <data name=\"Groups\" xml:space=\"preserve\">\r\n    <value>Groups</value>\r\n  </data>\r\n  <data name=\"KeepMedia\" xml:space=\"preserve\">\r\n    <value>Keep media</value>\r\n  </data>\r\n  <data name=\"KeepMediaDescription\" xml:space=\"preserve\">\r\n    <value>Photos, videos and other files from cloud chats that you have not accessed during this period will be removed from this device to save disk space.\r\n\r\nAll media will stay in the Telegram cloud and can be re-downloaded if you need it again.</value>\r\n  </data>\r\n  <data name=\"Music\" xml:space=\"preserve\">\r\n    <value>Music</value>\r\n  </data>\r\n  <data name=\"Other\" xml:space=\"preserve\">\r\n    <value>Other</value>\r\n  </data>\r\n  <data name=\"OtherFiles\" xml:space=\"preserve\">\r\n    <value>Other files</value>\r\n  </data>\r\n  <data name=\"Photos\" xml:space=\"preserve\">\r\n    <value>Photos</value>\r\n  </data>\r\n  <data name=\"PrivateChats\" xml:space=\"preserve\">\r\n    <value>Private chats</value>\r\n  </data>\r\n  <data name=\"Videos\" xml:space=\"preserve\">\r\n    <value>Videos</value>\r\n  </data>\r\n  <data name=\"VoiceMessages\" xml:space=\"preserve\">\r\n    <value>Voice messages</value>\r\n  </data>\r\n  <data name=\"LocalDatabase\" xml:space=\"preserve\">\r\n    <value>Local Database</value>\r\n  </data>\r\n  <data name=\"AutomaticGifDownload\" xml:space=\"preserve\">\r\n    <value>GIF Auto-Download</value>\r\n  </data>\r\n  <data name=\"ForwardedGifGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded GIFs</value>\r\n  </data>\r\n  <data name=\"ForwardedGifGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded GIF</value>\r\n  </data>\r\n  <data name=\"ForwardedGifNominativePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded GIFs</value>\r\n  </data>\r\n  <data name=\"ForwardedGifNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded GIF</value>\r\n  </data>\r\n  <data name=\"Gif\" xml:space=\"preserve\">\r\n    <value>GIF</value>\r\n  </data>\r\n  <data name=\"AutoplayGifs\" xml:space=\"preserve\">\r\n    <value>Autoplay GIFs</value>\r\n  </data>\r\n  <data name=\"Via\" xml:space=\"preserve\">\r\n    <value>Via {0}</value>\r\n  </data>\r\n  <data name=\"AddNewMembers\" xml:space=\"preserve\">\r\n    <value>Who can add new members?</value>\r\n  </data>\r\n  <data name=\"AllMembers\" xml:space=\"preserve\">\r\n    <value>All members</value>\r\n  </data>\r\n  <data name=\"AlwaysAllow\" xml:space=\"preserve\">\r\n    <value>Always allow</value>\r\n  </data>\r\n  <data name=\"GroupsDescription\" xml:space=\"preserve\">\r\n    <value>Change who can add you to groups and channels</value>\r\n  </data>\r\n  <data name=\"GroupsImportantNote\" xml:space=\"preserve\">\r\n    <value>You can restrict who can add you to groups and channels with granular precision.</value>\r\n  </data>\r\n  <data name=\"GroupsSettingsOverrideNote\" xml:space=\"preserve\">\r\n    <value>These users will or will not be able to add you to groups and channels regardless of the settings above.</value>\r\n  </data>\r\n  <data name=\"GroupsShort\" xml:space=\"preserve\">\r\n    <value>Groups and Channels</value>\r\n  </data>\r\n  <data name=\"NeverAllow\" xml:space=\"preserve\">\r\n    <value>Never allow</value>\r\n  </data>\r\n  <data name=\"OnlyAdmins\" xml:space=\"preserve\">\r\n    <value>Only admins</value>\r\n  </data>\r\n  <data name=\"ForwardedVoiceMessageGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded voice messages</value>\r\n  </data>\r\n  <data name=\"ForwardedVoiceMessageGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded voice message</value>\r\n  </data>\r\n  <data name=\"ForwardedVoiceMessageNominativePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded voice messages</value>\r\n  </data>\r\n  <data name=\"ForwardedVoiceMessageNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded voice message</value>\r\n  </data>\r\n  <data name=\"RecordingVoiceMessage\" xml:space=\"preserve\">\r\n    <value>Recording voice message</value>\r\n  </data>\r\n  <data name=\"VoiceMessage\" xml:space=\"preserve\">\r\n    <value>Voice message</value>\r\n  </data>\r\n  <data name=\"EncryptionKeyExtendedDescription1\" xml:space=\"preserve\">\r\n    <value>This image and text were derived from the encryption key for this secret chat with {0}.</value>\r\n  </data>\r\n  <data name=\"EncryptionKeyExtendedDescription2\" xml:space=\"preserve\">\r\n    <value>If they look the same on {0}'s phone, end-to-end encryption is guaranteed.</value>\r\n  </data>\r\n  <data name=\"InlineBotsNotification\" xml:space=\"preserve\">\r\n    <value>Please note that inline bots are provided by third-party developers. For the bot to work, the symbols you type after the bot's username are sent to the respective developer.</value>\r\n  </data>\r\n  <data name=\"LinkPreviews\" xml:space=\"preserve\">\r\n    <value>Link previews</value>\r\n  </data>\r\n  <data name=\"LInkPreviewsNotification\" xml:space=\"preserve\">\r\n    <value>Would you like to enable extended link previews in Secret Chats? Note that link previews are generated on Telegram servers.</value>\r\n  </data>\r\n  <data name=\"ViewStickers\" xml:space=\"preserve\">\r\n    <value>View stickers</value>\r\n  </data>\r\n  <data name=\"NotifyMembers\" xml:space=\"preserve\">\r\n    <value>Notify members</value>\r\n  </data>\r\n  <data name=\"NotifyMembersDescription\" xml:space=\"preserve\">\r\n    <value>Send Push-notifications every time admins post a message</value>\r\n  </data>\r\n  <data name=\"SignMessages\" xml:space=\"preserve\">\r\n    <value>Sign messages</value>\r\n  </data>\r\n  <data name=\"SignMessagesDescription\" xml:space=\"preserve\">\r\n    <value>Add names of the admins to the messages they post</value>\r\n  </data>\r\n  <data name=\"ChannelNameDescription\" xml:space=\"preserve\">\r\n    <value>You can choose a channel name on Telegram. If you do, other people will be able to find your channel by this username.\r\n\r\nYou can use a-z, 0-9 and underscores. Minimum length is 5 characters.</value>\r\n  </data>\r\n  <data name=\"ChannelNameDescription2\" xml:space=\"preserve\">\r\n    <value>This link opens your channel in Telegram:</value>\r\n  </data>\r\n  <data name=\"SupergroupNameDescription\" xml:space=\"preserve\">\r\n    <value>You can choose a supergroup name on Telegram. If you do, other people will be able to find your supergroup by this username.\r\n\r\nYou can use a-z, 0-9 and underscores. Minimum length is 5 characters.</value>\r\n  </data>\r\n  <data name=\"SupergroupNameDescription2\" xml:space=\"preserve\">\r\n    <value>This link opens your supergroup in Telegram:</value>\r\n  </data>\r\n  <data name=\"SupergroupName\" xml:space=\"preserve\">\r\n    <value>Supergroup name</value>\r\n  </data>\r\n  <data name=\"ChannelNameInvalid\" xml:space=\"preserve\">\r\n    <value>Sorry, this name is invalid.</value>\r\n  </data>\r\n  <data name=\"ChannelNameOccupied\" xml:space=\"preserve\">\r\n    <value>Sorry, this name is already taken.</value>\r\n  </data>\r\n  <data name=\"ChannelNameShort\" xml:space=\"preserve\">\r\n    <value>Channel names must have at least 5 characters.</value>\r\n  </data>\r\n  <data name=\"ChannelNameStartsWithNumber\" xml:space=\"preserve\">\r\n    <value>Channel names can't start with a number.</value>\r\n  </data>\r\n  <data name=\"NameChecking\" xml:space=\"preserve\">\r\n    <value>Checking name...</value>\r\n  </data>\r\n  <data name=\"NameIsAvailable\" xml:space=\"preserve\">\r\n    <value>{0} is available.</value>\r\n  </data>\r\n  <data name=\"SupergroupNameInvalid\" xml:space=\"preserve\">\r\n    <value>Sorry, this name is invalid.</value>\r\n  </data>\r\n  <data name=\"SupergroupNameOccupied\" xml:space=\"preserve\">\r\n    <value>Sorry, this name is already taken.</value>\r\n  </data>\r\n  <data name=\"SupergroupNameShort\" xml:space=\"preserve\">\r\n    <value>Supergroup names must have at least 5 characters.</value>\r\n  </data>\r\n  <data name=\"SupergroupNameStartsWithNumber\" xml:space=\"preserve\">\r\n    <value>Supergroup names can't start with a number.</value>\r\n  </data>\r\n  <data name=\"EditMessageError\" xml:space=\"preserve\">\r\n    <value>Sorry, you can't edit this message.</value>\r\n  </data>\r\n  <data name=\"MuteChannelPostHint\" xml:space=\"preserve\">\r\n    <value>Members will not be notified when you post</value>\r\n  </data>\r\n  <data name=\"UnmuteChannelPostHint\" xml:space=\"preserve\">\r\n    <value>Members will be notified when you post</value>\r\n  </data>\r\n  <data name=\"PinMessage\" xml:space=\"preserve\">\r\n    <value>Pin</value>\r\n  </data>\r\n  <data name=\"UnpinMessage\" xml:space=\"preserve\">\r\n    <value>Unpin</value>\r\n  </data>\r\n  <data name=\"UnpinMessageConfirmation\" xml:space=\"preserve\">\r\n    <value>Do you want to unpin this message?</value>\r\n  </data>\r\n  <data name=\"ConvertToSupergroup\" xml:space=\"preserve\">\r\n    <value>Convert to Supergroup</value>\r\n  </data>\r\n  <data name=\"ConvertToSupergroupNote\" xml:space=\"preserve\">\r\n    <value>**Note**: this action can't be undone.</value>\r\n  </data>\r\n  <data name=\"Supergroup\" xml:space=\"preserve\">\r\n    <value>Supergroup</value>\r\n  </data>\r\n  <data name=\"ConvertToSupergroupDescription\" xml:space=\"preserve\">\r\n    <value>**In supergroups**:\r\n• New members can see the full message history\r\n• Deleted messages will disappear for all members\r\n• Admins can pin important messages\r\n• Creator can set a public link for the group</value>\r\n  </data>\r\n  <data name=\"BanUser\" xml:space=\"preserve\">\r\n    <value>Ban user</value>\r\n  </data>\r\n  <data name=\"DeleteAllFrom\" xml:space=\"preserve\">\r\n    <value>Delete all from {0}</value>\r\n  </data>\r\n  <data name=\"DeleteMessageConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to delete this message?</value>\r\n  </data>\r\n  <data name=\"DeleteMessages\" xml:space=\"preserve\">\r\n    <value>Delete messages</value>\r\n  </data>\r\n  <data name=\"MessageActionPinMessage\" xml:space=\"preserve\">\r\n    <value>{0} pinned a message</value>\r\n  </data>\r\n  <data name=\"MessageActionPinContact\" xml:space=\"preserve\">\r\n    <value>{0} pinned a contact</value>\r\n  </data>\r\n  <data name=\"MessageActionPinFile\" xml:space=\"preserve\">\r\n    <value>{0} pinned a file</value>\r\n  </data>\r\n  <data name=\"MessageActionPinGif\" xml:space=\"preserve\">\r\n    <value>{0} pinned a GIF</value>\r\n  </data>\r\n  <data name=\"MessageActionPinMap\" xml:space=\"preserve\">\r\n    <value>{0} pinned a map</value>\r\n  </data>\r\n  <data name=\"MessageActionPinPhoto\" xml:space=\"preserve\">\r\n    <value>{0} pinned a photo</value>\r\n  </data>\r\n  <data name=\"MessageActionPinSticker\" xml:space=\"preserve\">\r\n    <value>{0} pinned a sticker</value>\r\n  </data>\r\n  <data name=\"MessageActionPinText\" xml:space=\"preserve\">\r\n    <value>{0} pinned \"{1}\"</value>\r\n  </data>\r\n  <data name=\"MessageActionPinTrack\" xml:space=\"preserve\">\r\n    <value>{0} pinned a track</value>\r\n  </data>\r\n  <data name=\"MessageActionPinVideo\" xml:space=\"preserve\">\r\n    <value>{0} pinned a video</value>\r\n  </data>\r\n  <data name=\"MessageActionPinVoiceMessage\" xml:space=\"preserve\">\r\n    <value>{0} pinned a voice message</value>\r\n  </data>\r\n  <data name=\"PinnedMessage\" xml:space=\"preserve\">\r\n    <value>Pinned message</value>\r\n  </data>\r\n  <data name=\"ConvertToSupergroupConfirmation\" xml:space=\"preserve\">\r\n    <value>This action is irreversible. It is not possible to downgrade a supergroup to a regular group.</value>\r\n  </data>\r\n  <data name=\"NotifyAllMembers\" xml:space=\"preserve\">\r\n    <value>Notify all members</value>\r\n  </data>\r\n  <data name=\"PinMessageConfirmation\" xml:space=\"preserve\">\r\n    <value>Do you want to pin this message in this group?</value>\r\n  </data>\r\n  <data name=\"ChatMaxSizeNotification\" xml:space=\"preserve\">\r\n    <value>You will be able to add more users after you finish creating the group and convert it to a supergroup.</value>\r\n  </data>\r\n  <data name=\"Admin\" xml:space=\"preserve\">\r\n    <value>Admin</value>\r\n  </data>\r\n  <data name=\"ChoosePublicGroupLinkNotification\" xml:space=\"preserve\">\r\n    <value>Please choose a link for your public group, so that people can find it in search and share with others.</value>\r\n  </data>\r\n  <data name=\"GroupType\" xml:space=\"preserve\">\r\n    <value>Group Type</value>\r\n  </data>\r\n  <data name=\"PrivateGroupDescription\" xml:space=\"preserve\">\r\n    <value>Private groups can only be joined if you were invited or have an invite link.</value>\r\n  </data>\r\n  <data name=\"PrivateGroupLinkDescription\" xml:space=\"preserve\">\r\n    <value>People can join your group by following this link. You can revoke the link any time.</value>\r\n  </data>\r\n  <data name=\"PublicGroupDescription\" xml:space=\"preserve\">\r\n    <value>Public groups can be found in search, chat history is available to everyone and anyone can join.</value>\r\n  </data>\r\n  <data name=\"PublicGroupLinkDescription\" xml:space=\"preserve\">\r\n    <value>People can share this link with others and find your group using Telegram search.</value>\r\n  </data>\r\n  <data name=\"Camera\" xml:space=\"preserve\">\r\n    <value>Camera</value>\r\n  </data>\r\n  <data name=\"Pornography\" xml:space=\"preserve\">\r\n    <value>Pornography</value>\r\n  </data>\r\n  <data name=\"Report\" xml:space=\"preserve\">\r\n    <value>Report</value>\r\n  </data>\r\n  <data name=\"ReportSpamNotification\" xml:space=\"preserve\">\r\n    <value>Thank you!\r\nYour report will be reviewed by our team very soon.</value>\r\n  </data>\r\n  <data name=\"Spam\" xml:space=\"preserve\">\r\n    <value>Spam</value>\r\n  </data>\r\n  <data name=\"Violence\" xml:space=\"preserve\">\r\n    <value>Violence</value>\r\n  </data>\r\n  <data name=\"ClearHistoryConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to clear history?</value>\r\n  </data>\r\n  <data name=\"DeleteAndExitConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to delete and leave this group?</value>\r\n  </data>\r\n  <data name=\"DeleteChat\" xml:space=\"preserve\">\r\n    <value>Delete chat</value>\r\n  </data>\r\n  <data name=\"MessageActionChatJoin\" xml:space=\"preserve\">\r\n    <value>{0} joined the group</value>\r\n  </data>\r\n  <data name=\"MessageActionChatJoinSelf\" xml:space=\"preserve\">\r\n    <value>You joined the group</value>\r\n  </data>\r\n  <data name=\"MessageActionLeftGroupSelf\" xml:space=\"preserve\">\r\n    <value>You left the group</value>\r\n  </data>\r\n  <data name=\"CodeSentToTelegramApp\" xml:space=\"preserve\">\r\n    <value>We've sent the code to the **Telegram** app on your other device.</value>\r\n  </data>\r\n  <data name=\"CodeSentViaCallingPhone\" xml:space=\"preserve\">\r\n    <value>We are calling your phone **{0}** to dictate a code.</value>\r\n  </data>\r\n  <data name=\"DidNotGetCode\" xml:space=\"preserve\">\r\n    <value>Didn't get the code?</value>\r\n  </data>\r\n  <data name=\"HaveNotReceivedCode\" xml:space=\"preserve\">\r\n    <value>Haven't received the code?</value>\r\n  </data>\r\n  <data name=\"ShareLocationConfirmation\" xml:space=\"preserve\">\r\n    <value>This will send your current location to the bot.</value>\r\n  </data>\r\n  <data name=\"SharePhoneNumberConfirmation\" xml:space=\"preserve\">\r\n    <value>The bot will know your phone number. This can be useful for integration with other services.</value>\r\n  </data>\r\n  <data name=\"ChooseManually\" xml:space=\"preserve\">\r\n    <value>Choose manually</value>\r\n  </data>\r\n  <data name=\"ShareLocationCaption\" xml:space=\"preserve\">\r\n    <value>Share your location?</value>\r\n  </data>\r\n  <data name=\"SharePhoneNumberCaption\" xml:space=\"preserve\">\r\n    <value>Share your phone number?</value>\r\n  </data>\r\n  <data name=\"UnableToDetermineLocation\" xml:space=\"preserve\">\r\n    <value>App was unable to determine your current location.</value>\r\n  </data>\r\n  <data name=\"ShareLocationInlineConfirmation\" xml:space=\"preserve\">\r\n    <value>This bot would like to know your location each time you send it a request. This can be used to provide location-specific results.</value>\r\n  </data>\r\n  <data name=\"MoreInfo\" xml:space=\"preserve\">\r\n    <value>More info</value>\r\n  </data>\r\n  <data name=\"RemoveStickers\" xml:space=\"preserve\">\r\n    <value>Remove</value>\r\n  </data>\r\n  <data name=\"SendSticker\" xml:space=\"preserve\">\r\n    <value>Send sticker</value>\r\n  </data>\r\n  <data name=\"StickersRemoved\" xml:space=\"preserve\">\r\n    <value>Sticker set removed</value>\r\n  </data>\r\n  <data name=\"UnpinFromStart\" xml:space=\"preserve\">\r\n    <value>Unpin from start</value>\r\n  </data>\r\n  <data name=\"Bots\" xml:space=\"preserve\">\r\n    <value>Bots</value>\r\n  </data>\r\n  <data name=\"LastSeenYesterdayAt\" xml:space=\"preserve\">\r\n    <value>Last seen yesterday at {0}</value>\r\n  </data>\r\n  <data name=\"Clear\" xml:space=\"preserve\">\r\n    <value>Clear</value>\r\n  </data>\r\n  <data name=\"Edited\" xml:space=\"preserve\">\r\n    <value>Edited</value>\r\n  </data>\r\n  <data name=\"EditMessage\" xml:space=\"preserve\">\r\n    <value>Edit message</value>\r\n  </data>\r\n  <data name=\"LastSeenTodayAt\" xml:space=\"preserve\">\r\n    <value>Last seen today at {0}</value>\r\n  </data>\r\n  <data name=\"OpenInlineBotsHint\" xml:space=\"preserve\">\r\n    <value>Slide up to open inline bots</value>\r\n  </data>\r\n  <data name=\"ConfirmResetTopPeerRating\" xml:space=\"preserve\">\r\n    <value>Delete {0} from suggestions?</value>\r\n  </data>\r\n  <data name=\"Draft\" xml:space=\"preserve\">\r\n    <value>Draft</value>\r\n  </data>\r\n  <data name=\"FeaturedStickers\" xml:space=\"preserve\">\r\n    <value>Trending stickers</value>\r\n  </data>\r\n  <data name=\"StickersHint\" xml:space=\"preserve\">\r\n    <value>Artists are welcome to add their own sticker packs using our __@stickers__ bot.\r\n\r\nUsers can add stickers by tapping on them and choosing \"Add to Stickers\".</value>\r\n  </data>\r\n  <data name=\"ClearRecentStickers\" xml:space=\"preserve\">\r\n    <value>Clear recent stickers</value>\r\n  </data>\r\n  <data name=\"NewFeaturedStickers\" xml:space=\"preserve\">\r\n    <value>{0} new</value>\r\n  </data>\r\n  <data name=\"InstallStickersetError\" xml:space=\"preserve\">\r\n    <value>Sorry, you have reached the maximum number of sticker sets.</value>\r\n  </data>\r\n  <data name=\"ChatInviteSubtitle\" xml:space=\"preserve\">\r\n    <value>{0}, among them:</value>\r\n  </data>\r\n  <data name=\"InstalledStickers\" xml:space=\"preserve\">\r\n    <value>Installed stickers</value>\r\n  </data>\r\n  <data name=\"ShowStickersTab\" xml:space=\"preserve\">\r\n    <value>Show stickers tab</value>\r\n  </data>\r\n  <data name=\"ShowStickersTabHint\" xml:space=\"preserve\">\r\n    <value>A sticker icon will appear in the input field.</value>\r\n  </data>\r\n  <data name=\"ArchivedStickers\" xml:space=\"preserve\">\r\n    <value>Archived stickers</value>\r\n  </data>\r\n  <data name=\"ArchivedStickersAbout\" xml:space=\"preserve\">\r\n    <value>Some of the your unused stickers have been archived to make room for the sets you've activated.</value>\r\n  </data>\r\n  <data name=\"ArchivedStickersHeader\" xml:space=\"preserve\">\r\n    <value>You can have up to 200 sticker sets installed. Unused stickers are archived when you add more.</value>\r\n  </data>\r\n  <data name=\"NoSetsHere\" xml:space=\"preserve\">\r\n    <value>No sets here</value>\r\n  </data>\r\n  <data name=\"NoSets\" xml:space=\"preserve\">\r\n    <value>No sets</value>\r\n  </data>\r\n  <data name=\"SetGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Sets</value>\r\n  </data>\r\n  <data name=\"SetGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Set</value>\r\n  </data>\r\n  <data name=\"SetNominativePlural\" xml:space=\"preserve\">\r\n    <value>Sets</value>\r\n  </data>\r\n  <data name=\"SetNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Set</value>\r\n  </data>\r\n  <data name=\"ChatWithYourself\" xml:space=\"preserve\">\r\n    <value>Chat with yourself</value>\r\n  </data>\r\n  <data name=\"CloudStorageDescription\" xml:space=\"preserve\">\r\n    <value>• Forward messages here to save them\r\n• Send media and files to store them\r\n• Access this chat from any device\r\n• Use search to quickly find things</value>\r\n  </data>\r\n  <data name=\"CloudStorage\" xml:space=\"preserve\">\r\n    <value>Your cloud storage</value>\r\n  </data>\r\n  <data name=\"CancelAccountReset\" xml:space=\"preserve\">\r\n    <value>Cancel account reset</value>\r\n  </data>\r\n  <data name=\"CancelAccountResetDescription\" xml:space=\"preserve\">\r\n    <value>Somebody with access to your phone number **{0}** has requested to delete your Telegram account and reset your 2-Step Verification password. If this wasn’t you, please enter the code we’ve just sent you via SMS to your number **{0}**</value>\r\n  </data>\r\n  <data name=\"CancelAccountResetSuccess\" xml:space=\"preserve\">\r\n    <value>Success! The deletion process was cancelled for your account {0}. You may close this window now.</value>\r\n  </data>\r\n  <data name=\"Reset\" xml:space=\"preserve\">\r\n    <value>Reset</value>\r\n  </data>\r\n  <data name=\"ResetAccount\" xml:space=\"preserve\">\r\n    <value>Reset account</value>\r\n  </data>\r\n  <data name=\"ResetAccountDescription\" xml:space=\"preserve\">\r\n    <value>Since the account **{0}** is active and protected by a password, we will delete it in 1 week for security purposes.\r\n\r\nYou can cancel this process at any time.</value>\r\n  </data>\r\n  <data name=\"ResetAccountError\" xml:space=\"preserve\">\r\n    <value>Your recent attempts to reset this account have been cancelled by its active user. Please try again in 7 days.</value>\r\n  </data>\r\n  <data name=\"ResetAccountIn\" xml:space=\"preserve\">\r\n    <value>You’ll be able to reset your account in:</value>\r\n  </data>\r\n  <data name=\"Archive\" xml:space=\"preserve\">\r\n    <value>Archive</value>\r\n  </data>\r\n  <data name=\"BotOpenUrlConfirmation\" xml:space=\"preserve\">\r\n    <value>The bot {0} asks for permission to share your Telegram name and profile picture with the owner of {1}.</value>\r\n  </data>\r\n  <data name=\"IsRecordingVideo\" xml:space=\"preserve\">\r\n    <value>Is recording video</value>\r\n  </data>\r\n  <data name=\"IsSendingAudio\" xml:space=\"preserve\">\r\n    <value>Is sending audio</value>\r\n  </data>\r\n  <data name=\"RecordingVideo\" xml:space=\"preserve\">\r\n    <value>Recording video</value>\r\n  </data>\r\n  <data name=\"SendingAudio\" xml:space=\"preserve\">\r\n    <value>Sending audio</value>\r\n  </data>\r\n  <data name=\"Revoke\" xml:space=\"preserve\">\r\n    <value>Revoke</value>\r\n  </data>\r\n  <data name=\"RevokeLinkConfirmation2\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to revoke the link **{0}**?\r\n\r\nThe group **\"{1}\"** will become private.</value>\r\n  </data>\r\n  <data name=\"AddBotToTheGroup\" xml:space=\"preserve\">\r\n    <value>Add the bot to \"{0}\"?</value>\r\n  </data>\r\n  <data name=\"YourScored\" xml:space=\"preserve\">\r\n    <value>You scored {0}</value>\r\n  </data>\r\n  <data name=\"ShareWith\" xml:space=\"preserve\">\r\n    <value>Share with {0}?</value>\r\n  </data>\r\n  <data name=\"YourScoredAtGame\" xml:space=\"preserve\">\r\n    <value>You scored {0} at {1}</value>\r\n  </data>\r\n  <data name=\"MuteAudio\" xml:space=\"preserve\">\r\n    <value>Mute</value>\r\n  </data>\r\n  <data name=\"OpenWebPagesViaBotConfirmation\" xml:space=\"preserve\">\r\n    <value>Allow {0} to pass your Telegram name and id (not your phone number) to the web pages you open with this bot?</value>\r\n  </data>\r\n  <data name=\"UserScored\" xml:space=\"preserve\">\r\n    <value>{0} scored {1}</value>\r\n  </data>\r\n  <data name=\"UserScoredAtGame\" xml:space=\"preserve\">\r\n    <value>{0} scored {1} at {2}</value>\r\n  </data>\r\n  <data name=\"UserScoredAtGamePlural\" xml:space=\"preserve\">\r\n    <value>{0} scored {1} at {2}</value>\r\n  </data>\r\n  <data name=\"UserScoredPlural\" xml:space=\"preserve\">\r\n    <value>{0} scored {1}</value>\r\n  </data>\r\n  <data name=\"YourScoredAtGamePlural\" xml:space=\"preserve\">\r\n    <value>You scored {0} at {1}</value>\r\n  </data>\r\n  <data name=\"YourScoredPlural\" xml:space=\"preserve\">\r\n    <value>You scored {0}</value>\r\n  </data>\r\n  <data name=\"ForwardedGameGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded games</value>\r\n  </data>\r\n  <data name=\"ForwardedGameGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded game</value>\r\n  </data>\r\n  <data name=\"ForwardedGameNominativePlural\" xml:space=\"preserve\">\r\n    <value>Forwarded games</value>\r\n  </data>\r\n  <data name=\"ForwardedGameNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Forwarded game</value>\r\n  </data>\r\n  <data name=\"Game\" xml:space=\"preserve\">\r\n    <value>Game</value>\r\n  </data>\r\n  <data name=\"MessageActionPinGame\" xml:space=\"preserve\">\r\n    <value>{0} pinned a game</value>\r\n  </data>\r\n  <data name=\"ShareGameWith\" xml:space=\"preserve\">\r\n    <value>Share the game with {0}?</value>\r\n  </data>\r\n  <data name=\"IsPlayingGame\" xml:space=\"preserve\">\r\n    <value>Is playing a game</value>\r\n  </data>\r\n  <data name=\"PlayingGame\" xml:space=\"preserve\">\r\n    <value>Playing a game</value>\r\n  </data>\r\n  <data name=\"YourCloudStorage\" xml:space=\"preserve\">\r\n    <value>Your cloud storage</value>\r\n  </data>\r\n  <data name=\"Masks\" xml:space=\"preserve\">\r\n    <value>Masks</value>\r\n  </data>\r\n  <data name=\"MasksHint\" xml:space=\"preserve\">\r\n    <value>You can add masks to photos you send. To do this, open the photo editor before sending a photo.</value>\r\n  </data>\r\n  <data name=\"GroupsInCommon\" xml:space=\"preserve\">\r\n    <value>Groups in Common</value>\r\n  </data>\r\n  <data name=\"GroupGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Groups</value>\r\n  </data>\r\n  <data name=\"GroupGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Group</value>\r\n  </data>\r\n  <data name=\"GroupNominativePlural\" xml:space=\"preserve\">\r\n    <value>Groups</value>\r\n  </data>\r\n  <data name=\"GroupNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Group</value>\r\n  </data>\r\n  <data name=\"NoGroupsHere\" xml:space=\"preserve\">\r\n    <value>No groups here</value>\r\n  </data>\r\n  <data name=\"AddChatUserFloodWait\" xml:space=\"preserve\">\r\n    <value>You can't add this user because you have contacted too many non-contacts today. Please try again tomorrow. You can ask another member to add this user to the group.</value>\r\n  </data>\r\n  <data name=\"ClearAll\" xml:space=\"preserve\">\r\n    <value>Clear all</value>\r\n  </data>\r\n  <data name=\"ClearPaintingConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to clear painting?</value>\r\n  </data>\r\n  <data name=\"DiscardChangesConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to discard changes?</value>\r\n  </data>\r\n  <data name=\"SendMessageFloodWait\" xml:space=\"preserve\">\r\n    <value>You have contacted too many non-contacts today, please try again tomorrow. You will be able to reply today if this user messages you first.</value>\r\n  </data>\r\n  <data name=\"AttachedStickers\" xml:space=\"preserve\">\r\n    <value>Attached stickers</value>\r\n  </data>\r\n  <data name=\"JumpToDate\" xml:space=\"preserve\">\r\n    <value>Jump to date</value>\r\n  </data>\r\n  <data name=\"Pack\" xml:space=\"preserve\">\r\n    <value>View pack</value>\r\n  </data>\r\n  <data name=\"ChatsAndContacts\" xml:space=\"preserve\">\r\n    <value>Chats and Contacts</value>\r\n  </data>\r\n  <data name=\"MessageSearch\" xml:space=\"preserve\">\r\n    <value>Message Search</value>\r\n  </data>\r\n  <data name=\"SearchChatsOrMessages\" xml:space=\"preserve\">\r\n    <value>Search chats or messages</value>\r\n  </data>\r\n  <data name=\"PrivacyPolicy\" xml:space=\"preserve\">\r\n    <value>Privacy Policy</value>\r\n  </data>\r\n  <data name=\"TelegramFAQ\" xml:space=\"preserve\">\r\n    <value>Telegram FAQ</value>\r\n  </data>\r\n  <data name=\"ChatSettingsSubtitle\" xml:space=\"preserve\">\r\n    <value>Media, background, cache</value>\r\n  </data>\r\n  <data name=\"Mobile\" xml:space=\"preserve\">\r\n    <value>Mobile</value>\r\n  </data>\r\n  <data name=\"ChannelsTooMuch\" xml:space=\"preserve\">\r\n    <value>Sorry, you have created or joined too many channels.</value>\r\n  </data>\r\n  <data name=\"UserChannelsTooMuch\" xml:space=\"preserve\">\r\n    <value>Sorry, you can't add this user to channels.</value>\r\n  </data>\r\n  <data name=\"ItemsSelectedSingular\" xml:space=\"preserve\">\r\n    <value>{0} selected</value>\r\n  </data>\r\n  <data name=\"NewChat\" xml:space=\"preserve\">\r\n    <value>New chat</value>\r\n  </data>\r\n  <data name=\"ItemsSelectedPlural\" xml:space=\"preserve\">\r\n    <value>{0} selected</value>\r\n  </data>\r\n  <data name=\"FileGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Files</value>\r\n  </data>\r\n  <data name=\"FileGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>File</value>\r\n  </data>\r\n  <data name=\"FileNominativePlural\" xml:space=\"preserve\">\r\n    <value>Files</value>\r\n  </data>\r\n  <data name=\"FileNominativeSingular\" xml:space=\"preserve\">\r\n    <value>File</value>\r\n  </data>\r\n  <data name=\"LinkGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Links</value>\r\n  </data>\r\n  <data name=\"LinkGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Link</value>\r\n  </data>\r\n  <data name=\"LinkNominativePlural\" xml:space=\"preserve\">\r\n    <value>Links</value>\r\n  </data>\r\n  <data name=\"LinkNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Link</value>\r\n  </data>\r\n  <data name=\"PhotoGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Photos</value>\r\n  </data>\r\n  <data name=\"PhotoGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Photo</value>\r\n  </data>\r\n  <data name=\"PhotoNominativePlural\" xml:space=\"preserve\">\r\n    <value>Photos</value>\r\n  </data>\r\n  <data name=\"PhotoNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Photo</value>\r\n  </data>\r\n  <data name=\"SongGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Songs</value>\r\n  </data>\r\n  <data name=\"SongGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Song</value>\r\n  </data>\r\n  <data name=\"SongNominativePlural\" xml:space=\"preserve\">\r\n    <value>Songs</value>\r\n  </data>\r\n  <data name=\"SongNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Song</value>\r\n  </data>\r\n  <data name=\"VideoGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Videos</value>\r\n  </data>\r\n  <data name=\"VideoGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Video</value>\r\n  </data>\r\n  <data name=\"VideoNominativePlural\" xml:space=\"preserve\">\r\n    <value>Videos</value>\r\n  </data>\r\n  <data name=\"VideoNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Video</value>\r\n  </data>\r\n  <data name=\"PhoneNumber\" xml:space=\"preserve\">\r\n    <value>Phone number</value>\r\n  </data>\r\n  <data name=\"SetPhoto\" xml:space=\"preserve\">\r\n    <value>Set Photo</value>\r\n  </data>\r\n  <data name=\"AskAQuestionDescription\" xml:space=\"preserve\">\r\n    <value>Please note that Telegram Support is done by volunteers. We try to respond as quickly as possible, but it may take a while. Please take a look at the &lt;![CDATA[&lt;a href=\"https://telegram.org/faq#general\"&gt;Telegram FAQ&lt;/a&gt;]]&gt;: it has answers to most questions and important tips for &lt;![CDATA[&lt;a href=\"https://telegram.org/faq#troubleshooting\"&gt;troubleshooting&lt;/a&gt;]]&gt;.</value>\r\n  </data>\r\n  <data name=\"MaskPackNominativePlural\" xml:space=\"preserve\">\r\n    <value>Mask packs</value>\r\n  </data>\r\n  <data name=\"MaskPackNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Mask pack</value>\r\n  </data>\r\n  <data name=\"StickerPackNominativePlural\" xml:space=\"preserve\">\r\n    <value>Sticker packs</value>\r\n  </data>\r\n  <data name=\"StickerPackNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Sticker pack</value>\r\n  </data>\r\n  <data name=\"NewStickerPackNominativePlural\" xml:space=\"preserve\">\r\n    <value>New sticker packs</value>\r\n  </data>\r\n  <data name=\"NewStickerPackNominativeSingular\" xml:space=\"preserve\">\r\n    <value>New sticker pack</value>\r\n  </data>\r\n  <data name=\"PinDialog\" xml:space=\"preserve\">\r\n    <value>Pin</value>\r\n  </data>\r\n  <data name=\"UnpinDialog\" xml:space=\"preserve\">\r\n    <value>Unpin</value>\r\n  </data>\r\n  <data name=\"DeleteFor\" xml:space=\"preserve\">\r\n    <value>Delete for {0}</value>\r\n  </data>\r\n  <data name=\"DeleteForAll\" xml:space=\"preserve\">\r\n    <value>Delete for all</value>\r\n  </data>\r\n  <data name=\"DeleteMessageForYouHint\" xml:space=\"preserve\">\r\n    <value>This will delete it just for you.</value>\r\n  </data>\r\n  <data name=\"DeleteMessagesForYouHint\" xml:space=\"preserve\">\r\n    <value>This will delete them just for you.</value>\r\n  </data>\r\n  <data name=\"MessageActionCanceledCall\" xml:space=\"preserve\">\r\n    <value>Canceled call</value>\r\n  </data>\r\n  <data name=\"MessageActionIncomingCall\" xml:space=\"preserve\">\r\n    <value>Incoming call</value>\r\n  </data>\r\n  <data name=\"MessageActionIncomingDurationCall\" xml:space=\"preserve\">\r\n    <value>Incoming call ({0})</value>\r\n  </data>\r\n  <data name=\"MessageActionMissedCall\" xml:space=\"preserve\">\r\n    <value>Missed call</value>\r\n  </data>\r\n  <data name=\"MessageActionOutgoingCall\" xml:space=\"preserve\">\r\n    <value>Outgoing call</value>\r\n  </data>\r\n  <data name=\"MessageActionOutgoingDurationCall\" xml:space=\"preserve\">\r\n    <value>Outgoing call ({0})</value>\r\n  </data>\r\n  <data name=\"CanceledCall\" xml:space=\"preserve\">\r\n    <value>Canceled call</value>\r\n  </data>\r\n  <data name=\"IncomingCall\" xml:space=\"preserve\">\r\n    <value>Incoming call</value>\r\n  </data>\r\n  <data name=\"MissedCall\" xml:space=\"preserve\">\r\n    <value>Missed call</value>\r\n  </data>\r\n  <data name=\"OutgoingCall\" xml:space=\"preserve\">\r\n    <value>Outgoing call</value>\r\n  </data>\r\n  <data name=\"DeleteMessageForEveryoneInChannelHint\" xml:space=\"preserve\">\r\n    <value>This will delete it for everyone in this channel.</value>\r\n  </data>\r\n  <data name=\"DeleteMessageForEveryoneInChatHint\" xml:space=\"preserve\">\r\n    <value>This will delete it for everyone in this chat.</value>\r\n  </data>\r\n  <data name=\"DeleteMessagesForEveryoneInChannelHint\" xml:space=\"preserve\">\r\n    <value>This will delete them for everyone in this channel.</value>\r\n  </data>\r\n  <data name=\"DeleteMessagesForEveryoneInChatHint\" xml:space=\"preserve\">\r\n    <value>This will delete them for everyone in this chat.</value>\r\n  </data>\r\n  <data name=\"Invoice\" xml:space=\"preserve\">\r\n    <value>Invoice</value>\r\n  </data>\r\n  <data name=\"TestInvoice\" xml:space=\"preserve\">\r\n    <value>Test Invoice</value>\r\n  </data>\r\n  <data name=\"MessageActionPaymentSent\" xml:space=\"preserve\">\r\n    <value>You have just successfully transferred {0} to {1}</value>\r\n  </data>\r\n  <data name=\"MessageActionPaymentSentFor\" xml:space=\"preserve\">\r\n    <value>You have just successfully transferred {0} to {1} for {2}</value>\r\n  </data>\r\n  <data name=\"PaymentInfo\" xml:space=\"preserve\">\r\n    <value>Payment info</value>\r\n  </data>\r\n  <data name=\"Receipt\" xml:space=\"preserve\">\r\n    <value>Receipt</value>\r\n  </data>\r\n  <data name=\"Address1Street\" xml:space=\"preserve\">\r\n    <value>Address 1 (Street)</value>\r\n  </data>\r\n  <data name=\"Address2Street\" xml:space=\"preserve\">\r\n    <value>Address 2 (Street)</value>\r\n  </data>\r\n  <data name=\"BillingAddress\" xml:space=\"preserve\">\r\n    <value>Billing address</value>\r\n  </data>\r\n  <data name=\"CardNumber\" xml:space=\"preserve\">\r\n    <value>Card Number</value>\r\n  </data>\r\n  <data name=\"Checkout\" xml:space=\"preserve\">\r\n    <value>Checkout</value>\r\n  </data>\r\n  <data name=\"City\" xml:space=\"preserve\">\r\n    <value>City</value>\r\n  </data>\r\n  <data name=\"ContactAddress\" xml:space=\"preserve\">\r\n    <value>Contact address</value>\r\n  </data>\r\n  <data name=\"Discount\" xml:space=\"preserve\">\r\n    <value>Discount</value>\r\n  </data>\r\n  <data name=\"FullName\" xml:space=\"preserve\">\r\n    <value>Full Name</value>\r\n  </data>\r\n  <data name=\"MMYY\" xml:space=\"preserve\">\r\n    <value>MM/YY</value>\r\n  </data>\r\n  <data name=\"NameSurname\" xml:space=\"preserve\">\r\n    <value>Name Surname</value>\r\n  </data>\r\n  <data name=\"PaymentCard\" xml:space=\"preserve\">\r\n    <value>Payment card</value>\r\n  </data>\r\n  <data name=\"PaymentMethod\" xml:space=\"preserve\">\r\n    <value>Payment method</value>\r\n  </data>\r\n  <data name=\"Postcode\" xml:space=\"preserve\">\r\n    <value>Postcode</value>\r\n  </data>\r\n  <data name=\"Receiver\" xml:space=\"preserve\">\r\n    <value>Receiver</value>\r\n  </data>\r\n  <data name=\"SaveShippingInformation\" xml:space=\"preserve\">\r\n    <value>Save Shipping Information</value>\r\n  </data>\r\n  <data name=\"SaveShippingInformationHint\" xml:space=\"preserve\">\r\n    <value>You can save your shipping info for future use.</value>\r\n  </data>\r\n  <data name=\"SecurityCode\" xml:space=\"preserve\">\r\n    <value>Security Code (CVV)</value>\r\n  </data>\r\n  <data name=\"Shipping\" xml:space=\"preserve\">\r\n    <value>Shipping</value>\r\n  </data>\r\n  <data name=\"ShippingAddress\" xml:space=\"preserve\">\r\n    <value>Shipping address</value>\r\n  </data>\r\n  <data name=\"ShippingInformation\" xml:space=\"preserve\">\r\n    <value>Shipping information</value>\r\n  </data>\r\n  <data name=\"ShippingMethods\" xml:space=\"preserve\">\r\n    <value>Shipping methods</value>\r\n  </data>\r\n  <data name=\"State\" xml:space=\"preserve\">\r\n    <value>State</value>\r\n  </data>\r\n  <data name=\"Subtotal\" xml:space=\"preserve\">\r\n    <value>Subtotal</value>\r\n  </data>\r\n  <data name=\"Taxes\" xml:space=\"preserve\">\r\n    <value>Taxes</value>\r\n  </data>\r\n  <data name=\"TestReceipt\" xml:space=\"preserve\">\r\n    <value>Test Receipt</value>\r\n  </data>\r\n  <data name=\"Total\" xml:space=\"preserve\">\r\n    <value>Total</value>\r\n  </data>\r\n  <data name=\"TransactionConfirmation\" xml:space=\"preserve\">\r\n    <value>Do you really want to transfer {0} to the {1} for {2}?</value>\r\n  </data>\r\n  <data name=\"TransactionReview\" xml:space=\"preserve\">\r\n    <value>Transaction Review</value>\r\n  </data>\r\n  <data name=\"TestCheckout\" xml:space=\"preserve\">\r\n    <value>Test Checkout</value>\r\n  </data>\r\n  <data name=\"ShippingMethod\" xml:space=\"preserve\">\r\n    <value>Shipping method</value>\r\n  </data>\r\n  <data name=\"Name\" xml:space=\"preserve\">\r\n    <value>Name</value>\r\n  </data>\r\n  <data name=\"Pay\" xml:space=\"preserve\">\r\n    <value>Pay</value>\r\n  </data>\r\n  <data name=\"Duplicate\" xml:space=\"preserve\">\r\n    <value>Duplicate</value>\r\n  </data>\r\n  <data name=\"CameraSubtitle\" xml:space=\"preserve\">\r\n    <value>Manage camera settings</value>\r\n  </data>\r\n  <data name=\"ChooseYourCameraApp\" xml:space=\"preserve\">\r\n    <value>Choose your camera app</value>\r\n  </data>\r\n  <data name=\"ExternalCamera\" xml:space=\"preserve\">\r\n    <value>External Camera</value>\r\n  </data>\r\n  <data name=\"InAppCamera\" xml:space=\"preserve\">\r\n    <value>In-app Camera</value>\r\n  </data>\r\n  <data name=\"Calls\" xml:space=\"preserve\">\r\n    <value>Calls</value>\r\n  </data>\r\n  <data name=\"CallsPrivacyDescription\" xml:space=\"preserve\">\r\n    <value>Who can call me?</value>\r\n  </data>\r\n  <data name=\"CallsPrivacyImportantNote\" xml:space=\"preserve\">\r\n    <value>You can restrict who can call you.</value>\r\n  </data>\r\n  <data name=\"CallsPrivacyOverrideNote\" xml:space=\"preserve\">\r\n    <value>These users will or will not be able to call you regardless of the settings above.</value>\r\n  </data>\r\n  <data name=\"NoCallsHere\" xml:space=\"preserve\">\r\n    <value>No calls here</value>\r\n  </data>\r\n  <data name=\"VoiceCall\" xml:space=\"preserve\">\r\n    <value>Voice Call</value>\r\n  </data>\r\n  <data name=\"CameraRollFolder\" xml:space=\"preserve\">\r\n    <value>Camera Roll</value>\r\n  </data>\r\n  <data name=\"SavedPicturesFolder\" xml:space=\"preserve\">\r\n    <value>Saved Pictures</value>\r\n  </data>\r\n  <data name=\"ScreenshotsFolder\" xml:space=\"preserve\">\r\n    <value>Screenshots</value>\r\n  </data>\r\n  <data name=\"AccessCameraException\" xml:space=\"preserve\">\r\n    <value>Can't access current camera</value>\r\n  </data>\r\n  <data name=\"Answer\" xml:space=\"preserve\">\r\n    <value>Answer</value>\r\n  </data>\r\n  <data name=\"Calling\" xml:space=\"preserve\">\r\n    <value>Calling...</value>\r\n  </data>\r\n  <data name=\"EmojiKeyDescription\" xml:space=\"preserve\">\r\n    <value>If these emoji are the same on {0}'s screen, this call is 100% secure.</value>\r\n  </data>\r\n  <data name=\"EndCall\" xml:space=\"preserve\">\r\n    <value>End Call</value>\r\n  </data>\r\n  <data name=\"Speaker\" xml:space=\"preserve\">\r\n    <value>Speaker</value>\r\n  </data>\r\n  <data name=\"TouchToReturnToCall\" xml:space=\"preserve\">\r\n    <value>Touch to return to call</value>\r\n  </data>\r\n  <data name=\"PaymentProvider\" xml:space=\"preserve\">\r\n    <value>Payment provider</value>\r\n  </data>\r\n  <data name=\"PaymentsWarning\" xml:space=\"preserve\">\r\n    <value>Payments will go directly to the developer of {0}. Telegram cannot provide any guarantees, so proceed at your own risk. In case of problems, please contact the developer of {0} or your bank.</value>\r\n  </data>\r\n  <data name=\"SavePaymentInformation\" xml:space=\"preserve\">\r\n    <value>Save Payment Information</value>\r\n  </data>\r\n  <data name=\"SavePaymentInformationHint\" xml:space=\"preserve\">\r\n    <value>You can save your payment info for future use.</value>\r\n  </data>\r\n  <data name=\"SavedCardHint\" xml:space=\"preserve\">\r\n    <value>Your card {0} is on file. To pay with this card, please enter your 2-Step-Verification password.</value>\r\n  </data>\r\n  <data name=\"ChooseDifferentCard\" xml:space=\"preserve\">\r\n    <value>Choose a different card</value>\r\n  </data>\r\n  <data name=\"Payments\" xml:space=\"preserve\">\r\n    <value>Payments</value>\r\n  </data>\r\n  <data name=\"PaymentsSubtitle\" xml:space=\"preserve\">\r\n    <value>Clear payment &amp; shipping info</value>\r\n  </data>\r\n  <data name=\"ShippingInfo\" xml:space=\"preserve\">\r\n    <value>Shipping info</value>\r\n  </data>\r\n  <data name=\"Ringing\" xml:space=\"preserve\">\r\n    <value>Ringing</value>\r\n  </data>\r\n  <data name=\"TurnOnTwoStepVerification\" xml:space=\"preserve\">\r\n    <value>Please *turn on Two-Step Verification* to enable this.</value>\r\n  </data>\r\n  <data name=\"ChooseYourPhotoPickerApp\" xml:space=\"preserve\">\r\n    <value>Choose your photo picker app</value>\r\n  </data>\r\n  <data name=\"ExternalPhotoPicker\" xml:space=\"preserve\">\r\n    <value>External Photo Picker</value>\r\n  </data>\r\n  <data name=\"InAppPhotoPicker\" xml:space=\"preserve\">\r\n    <value>In-app Photo Picker</value>\r\n  </data>\r\n  <data name=\"PhotoPicker\" xml:space=\"preserve\">\r\n    <value>Photo Picker</value>\r\n  </data>\r\n  <data name=\"PhotoPickerSubtitle\" xml:space=\"preserve\">\r\n    <value>Manage photo picker settings</value>\r\n  </data>\r\n  <data name=\"Chat\" xml:space=\"preserve\">\r\n    <value>Chat</value>\r\n  </data>\r\n  <data name=\"Ignore\" xml:space=\"preserve\">\r\n    <value>Ignore</value>\r\n  </data>\r\n  <data name=\"AddOptionalComment\" xml:space=\"preserve\">\r\n    <value>Add an optional comment</value>\r\n  </data>\r\n  <data name=\"RateCallQuality\" xml:space=\"preserve\">\r\n    <value>Please rate the quality of your Telegram call</value>\r\n  </data>\r\n  <data name=\"VoipBusy\" xml:space=\"preserve\">\r\n    <value>Busy</value>\r\n  </data>\r\n  <data name=\"VoipConnecting\" xml:space=\"preserve\">\r\n    <value>Connecting</value>\r\n  </data>\r\n  <data name=\"VoipEnded\" xml:space=\"preserve\">\r\n    <value>Ended</value>\r\n  </data>\r\n  <data name=\"VoipExchangingKeys\" xml:space=\"preserve\">\r\n    <value>Exchanging encryption keys</value>\r\n  </data>\r\n  <data name=\"VoipFailed\" xml:space=\"preserve\">\r\n    <value>Failed</value>\r\n  </data>\r\n  <data name=\"VoipHangingUp\" xml:space=\"preserve\">\r\n    <value>Hanging up</value>\r\n  </data>\r\n  <data name=\"VoipIncoming\" xml:space=\"preserve\">\r\n    <value>Incoming call</value>\r\n  </data>\r\n  <data name=\"VoipRequesting\" xml:space=\"preserve\">\r\n    <value>Requesting</value>\r\n  </data>\r\n  <data name=\"VoipRinging\" xml:space=\"preserve\">\r\n    <value>Ringing</value>\r\n  </data>\r\n  <data name=\"VoipWaiting\" xml:space=\"preserve\">\r\n    <value>Waiting</value>\r\n  </data>\r\n  <data name=\"CallInProgressNotification\" xml:space=\"preserve\">\r\n    <value>You currently have an ongoing call with {0}.</value>\r\n  </data>\r\n  <data name=\"Connection\" xml:space=\"preserve\">\r\n    <value>Connection</value>\r\n  </data>\r\n  <data name=\"ConnectionType\" xml:space=\"preserve\">\r\n    <value>Connection Type</value>\r\n  </data>\r\n  <data name=\"CredentionalsOptional\" xml:space=\"preserve\">\r\n    <value>Credentials (Optional)</value>\r\n  </data>\r\n  <data name=\"Port\" xml:space=\"preserve\">\r\n    <value>Port</value>\r\n  </data>\r\n  <data name=\"Server\" xml:space=\"preserve\">\r\n    <value>Server</value>\r\n  </data>\r\n  <data name=\"Socks5\" xml:space=\"preserve\">\r\n    <value>SOCKS5</value>\r\n  </data>\r\n  <data name=\"UseProxy\" xml:space=\"preserve\">\r\n    <value>Use proxy settings</value>\r\n  </data>\r\n  <data name=\"Proxy\" xml:space=\"preserve\">\r\n    <value>Proxy Settings</value>\r\n  </data>\r\n  <data name=\"ConnectingToProxy\" xml:space=\"preserve\">\r\n    <value>Connecting to proxy</value>\r\n  </data>\r\n  <data name=\"EnableProxyConfigmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to enable this proxy?</value>\r\n  </data>\r\n  <data name=\"ChangeProxy\" xml:space=\"preserve\">\r\n    <value>Set proxy</value>\r\n  </data>\r\n  <data name=\"ChangeProxyServerHint\" xml:space=\"preserve\">\r\n    <value>You can change your proxy server later in the Settings.</value>\r\n  </data>\r\n  <data name=\"UseProxyHint\" xml:space=\"preserve\">\r\n    <value>SOCKS5 proxy settings</value>\r\n  </data>\r\n  <data name=\"DeclinedCall\" xml:space=\"preserve\">\r\n    <value>Declined call</value>\r\n  </data>\r\n  <data name=\"MessageActionDeclinedCall\" xml:space=\"preserve\">\r\n    <value>Declined call</value>\r\n  </data>\r\n  <data name=\"VideoMessage\" xml:space=\"preserve\">\r\n    <value>Video message</value>\r\n  </data>\r\n  <data name=\"PeerToPeer\" xml:space=\"preserve\">\r\n    <value>Peer-to-Peer</value>\r\n  </data>\r\n  <data name=\"PeerToPeerDescription\" xml:space=\"preserve\">\r\n    <value>Disabling peer-to-peer will relay all calls through Telegram servers to avoid revealing your IP address, but may slightly decrease audio quality.</value>\r\n  </data>\r\n  <data name=\"Bio\" xml:space=\"preserve\">\r\n    <value>Bio</value>\r\n  </data>\r\n  <data name=\"BioDescription\" xml:space=\"preserve\">\r\n    <value>You can add a few lines about yourself.\r\nAnyone who opens your profile will see this text.</value>\r\n  </data>\r\n  <data name=\"MessageActionPhotoExpired\" xml:space=\"preserve\">\r\n    <value>Photo has expired</value>\r\n  </data>\r\n  <data name=\"MessageActionVideoExpired\" xml:space=\"preserve\">\r\n    <value>Video has expired</value>\r\n  </data>\r\n  <data name=\"Timer\" xml:space=\"preserve\">\r\n    <value>Timer</value>\r\n  </data>\r\n  <data name=\"SelfDestructTimerPhotoSubtitle\" xml:space=\"preserve\">\r\n    <value>If you set a timer, the photo will self destruct after it was viewed.</value>\r\n  </data>\r\n  <data name=\"SelfDestructTimerVideoSubtitle\" xml:space=\"preserve\">\r\n    <value>If you set a timer, the video will self destruct after it was viewed.</value>\r\n  </data>\r\n  <data name=\"SecretPhoto\" xml:space=\"preserve\">\r\n    <value>Secret Photo</value>\r\n  </data>\r\n  <data name=\"SecretVideo\" xml:space=\"preserve\">\r\n    <value>Secret Video</value>\r\n  </data>\r\n  <data name=\"ChooseFromYourStickers\" xml:space=\"preserve\">\r\n    <value>Choose from your stickers</value>\r\n  </data>\r\n  <data name=\"CreateStickerSetHint\" xml:space=\"preserve\">\r\n    <value>You can create your own custom sticker set using @stickers bot</value>\r\n  </data>\r\n  <data name=\"GroupStickers\" xml:space=\"preserve\">\r\n    <value>Group Stickers</value>\r\n  </data>\r\n  <data name=\"GroupStickersDescription\" xml:space=\"preserve\">\r\n    <value>You can choose sticker set which will be available for every member while in the group chat.</value>\r\n  </data>\r\n  <data name=\"AddToFavorites\" xml:space=\"preserve\">\r\n    <value>Add to Favorites</value>\r\n  </data>\r\n  <data name=\"DeleteFromFavorites\" xml:space=\"preserve\">\r\n    <value>Delete from Favorites</value>\r\n  </data>\r\n  <data name=\"NoStickerSetFound\" xml:space=\"preserve\">\r\n    <value>No such sticker set found</value>\r\n  </data>\r\n  <data name=\"NoStickerSetFoundSubtitle\" xml:space=\"preserve\">\r\n    <value>Try again or choose from the list below</value>\r\n  </data>\r\n  <data name=\"Auto\" xml:space=\"preserve\">\r\n    <value>Auto</value>\r\n  </data>\r\n  <data name=\"VideoQuality\" xml:space=\"preserve\">\r\n    <value>Video quality</value>\r\n  </data>\r\n  <data name=\"Quality\" xml:space=\"preserve\">\r\n    <value>Quality</value>\r\n  </data>\r\n  <data name=\"ClearUnreadMentionsConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to clear all unread mentions?</value>\r\n  </data>\r\n  <data name=\"PasswordEmail\" xml:space=\"preserve\">\r\n    <value>Password &amp; Email</value>\r\n  </data>\r\n  <data name=\"CreatePasswordHint\" xml:space=\"preserve\">\r\n    <value>Please create a password to protect your payment info.\r\nYou'll be asked to enter it when you log in.</value>\r\n  </data>\r\n  <data name=\"SendLiveLocation\" xml:space=\"preserve\">\r\n    <value>Share My Live Location for...</value>\r\n  </data>\r\n  <data name=\"SendLiveLocationSubtitle\" xml:space=\"preserve\">\r\n    <value>Updated in real time as you move</value>\r\n  </data>\r\n  <data name=\"LiveLocation\" xml:space=\"preserve\">\r\n    <value>Live Location</value>\r\n  </data>\r\n  <data name=\"ShareLiveLocationToContactTimerSubtitle\" xml:space=\"preserve\">\r\n    <value>Choose for how long {0} will see your accurate location.</value>\r\n  </data>\r\n  <data name=\"ContactJoinedTelegram\" xml:space=\"preserve\">\r\n    <value>Contact joined Telegram</value>\r\n  </data>\r\n  <data name=\"Events\" xml:space=\"preserve\">\r\n    <value>Events</value>\r\n  </data>\r\n  <data name=\"ChatHistoryCaption\" xml:space=\"preserve\">\r\n    <value>Chat history for new members</value>\r\n  </data>\r\n  <data name=\"ChatHistoryHidden\" xml:space=\"preserve\">\r\n    <value>New members will not see previous messages</value>\r\n  </data>\r\n  <data name=\"ChatHistoryVisible\" xml:space=\"preserve\">\r\n    <value>New members will see full chat history</value>\r\n  </data>\r\n  <data name=\"DescriptionOptional\" xml:space=\"preserve\">\r\n    <value>Description (optional)</value>\r\n  </data>\r\n  <data name=\"Hidden\" xml:space=\"preserve\">\r\n    <value>Hidden</value>\r\n  </data>\r\n  <data name=\"Visible\" xml:space=\"preserve\">\r\n    <value>Visible</value>\r\n  </data>\r\n  <data name=\"LocationSharingEnded\" xml:space=\"preserve\">\r\n    <value>Location Sharing Ended</value>\r\n  </data>\r\n  <data name=\"Map\" xml:space=\"preserve\">\r\n    <value>Map</value>\r\n  </data>\r\n  <data name=\"MessageActionPinGeoLive\" xml:space=\"preserve\">\r\n    <value>{0} pinned a live location</value>\r\n  </data>\r\n  <data name=\"For15Minutes\" xml:space=\"preserve\">\r\n    <value>For 15 minutes</value>\r\n  </data>\r\n  <data name=\"For1Hour\" xml:space=\"preserve\">\r\n    <value>For 1 hour</value>\r\n  </data>\r\n  <data name=\"For8Hours\" xml:space=\"preserve\">\r\n    <value>For 8 hours</value>\r\n  </data>\r\n  <data name=\"MessageActionClearHistory\" xml:space=\"preserve\">\r\n    <value>History was cleared</value>\r\n  </data>\r\n  <data name=\"Updated\" xml:space=\"preserve\">\r\n    <value>Updated</value>\r\n  </data>\r\n  <data name=\"UpdatedAgo\" xml:space=\"preserve\">\r\n    <value>Updated {0} ago</value>\r\n  </data>\r\n  <data name=\"UpdatedAtDate\" xml:space=\"preserve\">\r\n    <value>Updated {0} at {1}</value>\r\n  </data>\r\n  <data name=\"UpdatedJustNow\" xml:space=\"preserve\">\r\n    <value>Updated just now</value>\r\n  </data>\r\n  <data name=\"UpdatedTodayAt\" xml:space=\"preserve\">\r\n    <value>Updated today at {0}</value>\r\n  </data>\r\n  <data name=\"UpdatedYesterdayAt\" xml:space=\"preserve\">\r\n    <value>Updated yesterday at {0}</value>\r\n  </data>\r\n  <data name=\"StopSharingLocation\" xml:space=\"preserve\">\r\n    <value>Stop Sharing Location</value>\r\n  </data>\r\n  <data name=\"ShareLiveLocationToChatTimerSubtitle\" xml:space=\"preserve\">\r\n    <value>Choose for how long people in this chat will see your accurate location.</value>\r\n  </data>\r\n  <data name=\"NewStickerPackGenitivePlural\" xml:space=\"preserve\">\r\n    <value>New sticker packs</value>\r\n  </data>\r\n  <data name=\"NewStickerPackGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>New sticker pack</value>\r\n  </data>\r\n  <data name=\"StickerPackGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Sticker packs</value>\r\n  </data>\r\n  <data name=\"StickerPackGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Sticker pack</value>\r\n  </data>\r\n  <data name=\"MaskPackGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Mask packs</value>\r\n  </data>\r\n  <data name=\"MaskPackGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Mask pack</value>\r\n  </data>\r\n  <data name=\"GroupNameInvalid\" xml:space=\"preserve\">\r\n    <value>Sorry, this name is invalid.</value>\r\n  </data>\r\n  <data name=\"GroupNameOccupied\" xml:space=\"preserve\">\r\n    <value>Sorry, this name is already taken.</value>\r\n  </data>\r\n  <data name=\"GroupNameShort\" xml:space=\"preserve\">\r\n    <value>Group names must have at least 5 characters.</value>\r\n  </data>\r\n  <data name=\"GroupNameStartsWithNumber\" xml:space=\"preserve\">\r\n    <value>Group names can't start with a number.</value>\r\n  </data>\r\n  <data name=\"AttachLiveLocationIsSharing\" xml:space=\"preserve\">\r\n    <value>Sharing with {0}</value>\r\n  </data>\r\n  <data name=\"SharingLiveLocationTitle\" xml:space=\"preserve\">\r\n    <value>You are sharing your Live Location with {0}</value>\r\n  </data>\r\n  <data name=\"SharingYouAndOtherName\" xml:space=\"preserve\">\r\n    <value>You and {0}</value>\r\n  </data>\r\n  <data name=\"StopAllLocationSharings\" xml:space=\"preserve\">\r\n    <value>Stop All</value>\r\n  </data>\r\n  <data name=\"StopLiveLocationAlertAll\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to stop sharing your live location?</value>\r\n  </data>\r\n  <data name=\"StopLiveLocationAlertToGroup\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to stop sharing live location with {0}?</value>\r\n  </data>\r\n  <data name=\"StopLiveLocationAlertToUser\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to stop sharing live location with {0}?</value>\r\n  </data>\r\n  <data name=\"HourShort\" xml:space=\"preserve\">\r\n    <value>h</value>\r\n  </data>\r\n  <data name=\"ChatGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Chats</value>\r\n  </data>\r\n  <data name=\"ChatGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Chat</value>\r\n  </data>\r\n  <data name=\"ChatNominativePlural\" xml:space=\"preserve\">\r\n    <value>Chats</value>\r\n  </data>\r\n  <data name=\"ChatNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Chat</value>\r\n  </data>\r\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\r\n    <value>Saved Messages</value>\r\n  </data>\r\n  <data name=\"ForwardHereToSave\" xml:space=\"preserve\">\r\n    <value>Forward here to save</value>\r\n  </data>\r\n  <data name=\"MicrophoneAccessDenied\" xml:space=\"preserve\">\r\n    <value>Microphone access denied</value>\r\n  </data>\r\n  <data name=\"MicrophoneAccessDeniedDescription\" xml:space=\"preserve\">\r\n    <value>Telegram could not access the microphone. Please ensure that Telegram is allowed to use the microphone in Privacy Settings and restart the app.</value>\r\n  </data>\r\n  <data name=\"SendCallLogs\" xml:space=\"preserve\">\r\n    <value>Send Call Logs</value>\r\n  </data>\r\n  <data name=\"GroupMediaDescription\" xml:space=\"preserve\">\r\n    <value>Group media into one message</value>\r\n  </data>\r\n  <data name=\"UngroupMediaDescription\" xml:space=\"preserve\">\r\n    <value>Show media as separate messages</value>\r\n  </data>\r\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\r\n    <value>Deleted account</value>\r\n  </data>\r\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\r\n    <value>Deleted account</value>\r\n  </data>\r\n  <data name=\"Album\" xml:space=\"preserve\">\r\n    <value>Album</value>\r\n  </data>\r\n  <data name=\"DeleteMessagesConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to delete {0}?</value>\r\n  </data>\r\n  <data name=\"MessageGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Messages</value>\r\n  </data>\r\n  <data name=\"MessageGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Message</value>\r\n  </data>\r\n  <data name=\"MessageNominativePlural\" xml:space=\"preserve\">\r\n    <value>Messages</value>\r\n  </data>\r\n  <data name=\"MessageNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Message</value>\r\n  </data>\r\n  <data name=\"SubscriberGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Subscribers</value>\r\n  </data>\r\n  <data name=\"SubscriberGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Subscriber</value>\r\n  </data>\r\n  <data name=\"SubscriberNominativePlural\" xml:space=\"preserve\">\r\n    <value>Subscribers</value>\r\n  </data>\r\n  <data name=\"SubscriberNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Subscriber</value>\r\n  </data>\r\n  <data name=\"LogOutAllApplications\" xml:space=\"preserve\">\r\n    <value>Disconnect all websites</value>\r\n  </data>\r\n  <data name=\"LogOutAllApplicationsNote\" xml:space=\"preserve\">\r\n    <value />\r\n  </data>\r\n  <data name=\"LoggedInWithTelegram\" xml:space=\"preserve\">\r\n    <value>Logged in with Telegram</value>\r\n  </data>\r\n  <data name=\"LogOutAllApplicationsConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to disconnect all websites where you used Telegram to log in?</value>\r\n  </data>\r\n  <data name=\"NoItemsHere\" xml:space=\"preserve\">\r\n    <value>No items here</value>\r\n  </data>\r\n  <data name=\"Group\" xml:space=\"preserve\">\r\n    <value>Group</value>\r\n  </data>\r\n  <data name=\"Ungroup\" xml:space=\"preserve\">\r\n    <value>Ungroup</value>\r\n  </data>\r\n  <data name=\"AboutApp\" xml:space=\"preserve\">\r\n    <value>About</value>\r\n  </data>\r\n  <data name=\"NoActiveLogins\" xml:space=\"preserve\">\r\n    <value>No active logins.\r\n\r\nYou can log in on websites that support signing in with Telegram.</value>\r\n  </data>\r\n  <data name=\"Feed\" xml:space=\"preserve\">\r\n    <value>Feed</value>\r\n  </data>\r\n  <data name=\"ChannelGenitivePlural\" xml:space=\"preserve\">\r\n    <value>Channels</value>\r\n  </data>\r\n  <data name=\"ChannelGenitiveSingular\" xml:space=\"preserve\">\r\n    <value>Channel</value>\r\n  </data>\r\n  <data name=\"ChannelNominativePlural\" xml:space=\"preserve\">\r\n    <value>Channels</value>\r\n  </data>\r\n  <data name=\"ChannelNominativeSingular\" xml:space=\"preserve\">\r\n    <value>Channel</value>\r\n  </data>\r\n  <data name=\"ShowNext\" xml:space=\"preserve\">\r\n    <value>Show next</value>\r\n  </data>\r\n  <data name=\"GroupNewChannels\" xml:space=\"preserve\">\r\n    <value>Group new channels</value>\r\n  </data>\r\n  <data name=\"MessageActionBotAllowed\" xml:space=\"preserve\">\r\n    <value>You allowed this bot to message you when you logged in on {0}</value>\r\n  </data>\r\n  <data name=\"NoStickersFound\" xml:space=\"preserve\">\r\n    <value>No stickers found</value>\r\n  </data>\r\n  <data name=\"ConnectedWebsites\" xml:space=\"preserve\">\r\n    <value>Connected websites</value>\r\n  </data>\r\n  <data name=\"ConnectedWebsitesHint\" xml:space=\"preserve\">\r\n    <value>You can log in on websites that support signing in with Telegram.</value>\r\n  </data>\r\n  <data name=\"TapToDisconnectTelegramAccount\" xml:space=\"preserve\">\r\n    <value>Tap to disconnect from your Telegram account.</value>\r\n  </data>\r\n  <data name=\"TelegramPassport\" xml:space=\"preserve\">\r\n    <value>Telegram Passport</value>\r\n  </data>\r\n  <data name=\"Authorize\" xml:space=\"preserve\">\r\n    <value>Authorize</value>\r\n  </data>\r\n  <data name=\"Email2\" xml:space=\"preserve\">\r\n    <value>E-Mail</value>\r\n  </data>\r\n  <data name=\"PassportPersonalDetailsInfo\" xml:space=\"preserve\">\r\n    <value>Fill in your personal details</value>\r\n  </data>\r\n  <data name=\"PassportHint\" xml:space=\"preserve\">\r\n    <value>{0} requests access to your personal data to sign you up to their services.</value>\r\n  </data>\r\n  <data name=\"PassportAddress\" xml:space=\"preserve\">\r\n    <value>Address</value>\r\n  </data>\r\n  <data name=\"PassportAddressInfo\" xml:space=\"preserve\">\r\n    <value>Upload proof of your address</value>\r\n  </data>\r\n  <data name=\"PassportNoPolicy\" xml:space=\"preserve\">\r\n    <value>You are sending your documents directly to {0} and allowing their {1} to send you messages.</value>\r\n  </data>\r\n  <data name=\"AllSets\" xml:space=\"preserve\">\r\n    <value>All sets</value>\r\n  </data>\r\n  <data name=\"MySets\" xml:space=\"preserve\">\r\n    <value>My sets</value>\r\n  </data>\r\n  <data name=\"None\" xml:space=\"preserve\">\r\n    <value>None</value>\r\n  </data>\r\n  <data name=\"SuggestStickersByEmoji\" xml:space=\"preserve\">\r\n    <value>Suggest stickers by emoji</value>\r\n  </data>\r\n  <data name=\"MTProto\" xml:space=\"preserve\">\r\n    <value>MTPROTO</value>\r\n  </data>\r\n  <data name=\"UseProxyForCalls\" xml:space=\"preserve\">\r\n    <value>Use proxy for calls</value>\r\n  </data>\r\n  <data name=\"UseProxyForCallsHint\" xml:space=\"preserve\">\r\n    <value>Proxy servers may degrade the quality of your calls.</value>\r\n  </data>\r\n  <data name=\"Connections\" xml:space=\"preserve\">\r\n    <value>Connections</value>\r\n  </data>\r\n  <data name=\"AddProxy\" xml:space=\"preserve\">\r\n    <value>Add Proxy</value>\r\n  </data>\r\n  <data name=\"Secret\" xml:space=\"preserve\">\r\n    <value>Secret</value>\r\n  </data>\r\n  <data name=\"UseTelegramProxyHint\" xml:space=\"preserve\">\r\n    <value>Telegram proxy settings</value>\r\n  </data>\r\n  <data name=\"Available\" xml:space=\"preserve\">\r\n    <value>Available</value>\r\n  </data>\r\n  <data name=\"Checking\" xml:space=\"preserve\">\r\n    <value>Checking</value>\r\n  </data>\r\n  <data name=\"Connected\" xml:space=\"preserve\">\r\n    <value>Connected</value>\r\n  </data>\r\n  <data name=\"Unavailable\" xml:space=\"preserve\">\r\n    <value>Unavailable</value>\r\n  </data>\r\n  <data name=\"TermsOfService\" xml:space=\"preserve\">\r\n    <value>Terms of Service</value>\r\n  </data>\r\n  <data name=\"TermsOfServiceLink\" xml:space=\"preserve\">\r\n    <value>By signing up,\r\nyou agree to the *Terms of Service*.</value>\r\n  </data>\r\n  <data name=\"DeleteSyncedContacts\" xml:space=\"preserve\">\r\n    <value>Delete Synced Contacts</value>\r\n  </data>\r\n  <data name=\"SyncContacts\" xml:space=\"preserve\">\r\n    <value>Sync Contacts</value>\r\n  </data>\r\n  <data name=\"SyncContactsDeleteInfo\" xml:space=\"preserve\">\r\n    <value>This will remove your contacts from the Telegram servers. If 'Sync Contacts' is enabled, contacts will be re-synced.</value>\r\n  </data>\r\n  <data name=\"SyncContactsInfoOff\" xml:space=\"preserve\">\r\n    <value>Turn on to continuously sync contacts from this device with your account.</value>\r\n  </data>\r\n  <data name=\"SyncContactsInfoOn\" xml:space=\"preserve\">\r\n    <value>Contacts from this device will be added to your account.</value>\r\n  </data>\r\n  <data name=\"LinkPreviewsHint\" xml:space=\"preserve\">\r\n    <value>Link previews will be generated on Telegram servers. We do not store data about the links you send.</value>\r\n  </data>\r\n  <data name=\"DeleteSyncedContactsConfirmation\" xml:space=\"preserve\">\r\n    <value>This will remove your contacts from the Telegram servers. If 'Sync Contacts' is enabled, contacts will be re-synced.</value>\r\n  </data>\r\n  <data name=\"ProxyDisabledNotification\" xml:space=\"preserve\">\r\n    <value>The proxy you are using is not configured correctly and will be disabled. Please find another one.</value>\r\n  </data>\r\n  <data name=\"ProxySponsor\" xml:space=\"preserve\">\r\n    <value>Proxy sponsor</value>\r\n  </data>\r\n  <data name=\"ProxySponsorAbout\" xml:space=\"preserve\">\r\n    <value>This channel is shown by your proxy server.\r\nTo remove this channel from your chats list,\r\ndisable the proxy in Telegram Settings.</value>\r\n  </data>\r\n  <data name=\"ProxySponsorWarning\" xml:space=\"preserve\">\r\n    <value>This proxy may display a sponsored channel in your chat list. This doesn't reveal any of your Telegram traffic.</value>\r\n  </data>\r\n  <data name=\"MarkRead\" xml:space=\"preserve\">\r\n    <value>Mark as read</value>\r\n  </data>\r\n  <data name=\"MarkUnread\" xml:space=\"preserve\">\r\n    <value>Mark as unread</value>\r\n  </data>\r\n  <data name=\"SuggestFrequentContacts\" xml:space=\"preserve\">\r\n    <value>Suggest Frequent Contacts</value>\r\n  </data>\r\n  <data name=\"SuggestFrequentContactsAbout\" xml:space=\"preserve\">\r\n    <value>Display people you message frequently at the top of the search section for quick access.</value>\r\n  </data>\r\n  <data name=\"SuggestFrequentContactsNotification\" xml:space=\"preserve\">\r\n    <value>This will delete all data about the people you message frequently as well the inline bots you are likely to use.</value>\r\n  </data>\r\n  <data name=\"ViewContact\" xml:space=\"preserve\">\r\n    <value>View contact</value>\r\n  </data>\r\n  <data name=\"PhoneKindHome\" xml:space=\"preserve\">\r\n    <value>Home</value>\r\n  </data>\r\n  <data name=\"PhoneKindMobile\" xml:space=\"preserve\">\r\n    <value>Mobile</value>\r\n  </data>\r\n  <data name=\"PhoneKindOther\" xml:space=\"preserve\">\r\n    <value>Other</value>\r\n  </data>\r\n  <data name=\"PhoneKindWork\" xml:space=\"preserve\">\r\n    <value>Work</value>\r\n  </data>\r\n  <data name=\"PassportAddAgreement\" xml:space=\"preserve\">\r\n    <value>Add Tenancy Agreement</value>\r\n  </data>\r\n  <data name=\"PassportAddAgreementInfo\" xml:space=\"preserve\">\r\n    <value>Upload a scan of your tenancy agreement.</value>\r\n  </data>\r\n  <data name=\"PassportAddBank\" xml:space=\"preserve\">\r\n    <value>Add Bank Statement</value>\r\n  </data>\r\n  <data name=\"PassportAddBankInfo\" xml:space=\"preserve\">\r\n    <value>Upload a scan of your bank statement.</value>\r\n  </data>\r\n  <data name=\"PassportAddBill\" xml:space=\"preserve\">\r\n    <value>Add Utility Bill</value>\r\n  </data>\r\n  <data name=\"PassportAddBillInfo\" xml:space=\"preserve\">\r\n    <value>Upload a scan of your utility bill.</value>\r\n  </data>\r\n  <data name=\"PassportAddPassportRegistration\" xml:space=\"preserve\">\r\n    <value>Passport Registration</value>\r\n  </data>\r\n  <data name=\"PassportAddPassportRegistrationInfo\" xml:space=\"preserve\">\r\n    <value>Upload a scan of your passport registration page.</value>\r\n  </data>\r\n  <data name=\"PassportAddressHeader\" xml:space=\"preserve\">\r\n    <value>Address</value>\r\n  </data>\r\n  <data name=\"PassportCity\" xml:space=\"preserve\">\r\n    <value>City</value>\r\n  </data>\r\n  <data name=\"PassportCountry\" xml:space=\"preserve\">\r\n    <value>Country</value>\r\n  </data>\r\n  <data name=\"PassportDeleteDocument\" xml:space=\"preserve\">\r\n    <value>Delete document</value>\r\n  </data>\r\n  <data name=\"PassportDeleteDocumentAlert\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to delete this document?</value>\r\n  </data>\r\n  <data name=\"PassportDeleteScan\" xml:space=\"preserve\">\r\n    <value>Delete scan</value>\r\n  </data>\r\n  <data name=\"PassportDocuments\" xml:space=\"preserve\">\r\n    <value>Scans</value>\r\n  </data>\r\n  <data name=\"PassportPostcode\" xml:space=\"preserve\">\r\n    <value>Postcode</value>\r\n  </data>\r\n  <data name=\"PassportState\" xml:space=\"preserve\">\r\n    <value>State/Region</value>\r\n  </data>\r\n  <data name=\"PassportStreet1\" xml:space=\"preserve\">\r\n    <value>Street</value>\r\n  </data>\r\n  <data name=\"PassportStreet2\" xml:space=\"preserve\">\r\n    <value>Street</value>\r\n  </data>\r\n  <data name=\"PassportUploadAdditinalDocument\" xml:space=\"preserve\">\r\n    <value>Upload additional scans</value>\r\n  </data>\r\n  <data name=\"PassportUploadDocument\" xml:space=\"preserve\">\r\n    <value>Upload scans</value>\r\n  </data>\r\n  <data name=\"PassportDeleteScanAlert\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to delete this scan?</value>\r\n  </data>\r\n  <data name=\"PassportEmailInfo\" xml:space=\"preserve\">\r\n    <value>Enter your email address</value>\r\n  </data>\r\n  <data name=\"PassportPhoneInfo\" xml:space=\"preserve\">\r\n    <value>Enter your phone number</value>\r\n  </data>\r\n  <data name=\"UpdateApp\" xml:space=\"preserve\">\r\n    <value>Update app</value>\r\n  </data>\r\n  <data name=\"PassportPhone\" xml:space=\"preserve\">\r\n    <value>Phone Number</value>\r\n  </data>\r\n  <data name=\"PassportPhoneUploadInfo\" xml:space=\"preserve\">\r\n    <value>Note: You will receive a confirmation code on the phone number you provide.</value>\r\n  </data>\r\n  <data name=\"PassportPhoneUseOther\" xml:space=\"preserve\">\r\n    <value>Or enter a new phone number</value>\r\n  </data>\r\n  <data name=\"PassportPhoneUseSame\" xml:space=\"preserve\">\r\n    <value>Use {0}</value>\r\n  </data>\r\n  <data name=\"PassportPhoneUseSameInfo\" xml:space=\"preserve\">\r\n    <value>Use the same phone number as on Telegram.</value>\r\n  </data>\r\n  <data name=\"PassportDeletePhoneNumberAlert\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to delete phone number?</value>\r\n  </data>\r\n  <data name=\"MessageActionSecureValuesSent\" xml:space=\"preserve\">\r\n    <value>{0} received the following documents: {1}</value>\r\n  </data>\r\n  <data name=\"DeleteAllCloudDrafts\" xml:space=\"preserve\">\r\n    <value>Delete All Cloud Drafts</value>\r\n  </data>\r\n  <data name=\"DeleteAllCloudDraftsConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to delete all cloud drafts?</value>\r\n  </data>\r\n  <data name=\"PassportRequestPasswordInfo\" xml:space=\"preserve\">\r\n    <value>Please enter your Telegram Password to decrypt your data.</value>\r\n  </data>\r\n  <data name=\"PassportSelfRequest\" xml:space=\"preserve\">\r\n    <value>Please enter your password to access your personal data.</value>\r\n  </data>\r\n  <data name=\"PassportDelete\" xml:space=\"preserve\">\r\n    <value>Delete</value>\r\n  </data>\r\n  <data name=\"PassportNoDocumentsAdd\" xml:space=\"preserve\">\r\n    <value>Add a Document</value>\r\n  </data>\r\n  <data name=\"PassportEmail\" xml:space=\"preserve\">\r\n    <value>Email</value>\r\n  </data>\r\n  <data name=\"PassportPersonal\" xml:space=\"preserve\">\r\n    <value>Personal Details</value>\r\n  </data>\r\n  <data name=\"PassportUtilityBill\" xml:space=\"preserve\">\r\n    <value>Utility Bill</value>\r\n  </data>\r\n  <data name=\"PassportProvidedInformation\" xml:space=\"preserve\">\r\n    <value>Provided Information</value>\r\n  </data>\r\n  <data name=\"PassportRequestedInformation\" xml:space=\"preserve\">\r\n    <value>Requested Information</value>\r\n  </data>\r\n  <data name=\"PassportDeleteConfirmation\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to delete your Telegram Passport?</value>\r\n  </data>\r\n  <data name=\"Passport\" xml:space=\"preserve\">\r\n    <value>Passport</value>\r\n  </data>\r\n  <data name=\"PassportBankStatement\" xml:space=\"preserve\">\r\n    <value>Bank Statement</value>\r\n  </data>\r\n  <data name=\"PassportDriverLicence\" xml:space=\"preserve\">\r\n    <value>Driver Licence</value>\r\n  </data>\r\n  <data name=\"PassportEmailAddress\" xml:space=\"preserve\">\r\n    <value>Email Address</value>\r\n  </data>\r\n  <data name=\"PassportIdentityCard\" xml:space=\"preserve\">\r\n    <value>Identity Card</value>\r\n  </data>\r\n  <data name=\"PassportInternal\" xml:space=\"preserve\">\r\n    <value>Internal Passport</value>\r\n  </data>\r\n  <data name=\"PassportPersonalDetails\" xml:space=\"preserve\">\r\n    <value>Personal details</value>\r\n  </data>\r\n  <data name=\"PassportPhoneNumber\" xml:space=\"preserve\">\r\n    <value>Phone Number</value>\r\n  </data>\r\n  <data name=\"PassportRegistration\" xml:space=\"preserve\">\r\n    <value>Passport Registration</value>\r\n  </data>\r\n  <data name=\"PassportTemporaryRegistration\" xml:space=\"preserve\">\r\n    <value>Temporary Registration</value>\r\n  </data>\r\n  <data name=\"PassportTenancyAgreement\" xml:space=\"preserve\">\r\n    <value>Tenancy Agreement</value>\r\n  </data>\r\n  <data name=\"PassportDeleteEmailAlert\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to delete email?</value>\r\n  </data>\r\n  <data name=\"PassportDeleteAll\" xml:space=\"preserve\">\r\n    <value>Delete Telegram Passport</value>\r\n  </data>\r\n  <data name=\"PassportDeleteAddressAlert\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to delete address details?</value>\r\n  </data>\r\n  <data name=\"PassportAddTemporaryRegistrationInfo\" xml:space=\"preserve\">\r\n    <value>Upload a scan of your temporary registration.</value>\r\n  </data>\r\n  <data name=\"PassportResidentialAddress\" xml:space=\"preserve\">\r\n    <value>Residential Address</value>\r\n  </data>\r\n  <data name=\"PassportDeleteAddressDetails\" xml:space=\"preserve\">\r\n    <value>Delete address details</value>\r\n  </data>\r\n  <data name=\"PassportUploadMaxReached\" xml:space=\"preserve\">\r\n    <value>You can't upload more than {0} files.</value>\r\n  </data>\r\n  <data name=\"PassportCorrectErrors\" xml:space=\"preserve\">\r\n    <value>Tap to correct errors.</value>\r\n  </data>\r\n  <data name=\"PassportUseLatinOnly\" xml:space=\"preserve\">\r\n    <value>Please use latin characters only.</value>\r\n  </data>\r\n  <data name=\"PassportInfo\" xml:space=\"preserve\">\r\n    <value>With Telegram Passport you can easily sign up for websites and services that require identity verification.\r\n\r\nYour information, personal data, and documents are protected by end-to-end encryption. Nobody, including Telegram, can access them without your permission.\r\n\r\nYou can visit our FAQ to learn more.</value>\r\n  </data>\r\n  <data name=\"PassportFormError\" xml:space=\"preserve\">\r\n    <value>Could not get authorization form.</value>\r\n  </data>\r\n  <data name=\"TurnPasswordOffPassport\" xml:space=\"preserve\">\r\n    <value>Warning! All data saved in your Telegram Passport will be lost!</value>\r\n  </data>\r\n  <data name=\"TurnPasswordOffQuestion\" xml:space=\"preserve\">\r\n    <value>Are you sure you want to disable your password?</value>\r\n  </data>\r\n  <data name=\"PassportNoDocuments\" xml:space=\"preserve\">\r\n    <value>You have no documents yet</value>\r\n  </data>\r\n  <data name=\"PassportNoDocumentsInfo\" xml:space=\"preserve\">\r\n    <value>You can add your phone number, email address, identity document or residential address.</value>\r\n  </data>\r\n  <data name=\"TelegramPassportCreatePassword\" xml:space=\"preserve\">\r\n    <value>Create a password</value>\r\n  </data>\r\n  <data name=\"TelegramPassportCreatePasswordInfo\" xml:space=\"preserve\">\r\n    <value>Please create a password to secure your personal data with end-to-end encryption.\r\n\r\nThis password will also be required whenever you log in to Telegram on a new device.</value>\r\n  </data>\r\n  <data name=\"PassportEmailUploadInfo\" xml:space=\"preserve\">\r\n    <value>Note: You will receive a confirmation code on the email address you provide.</value>\r\n  </data>\r\n  <data name=\"PassportEmailUseSameInfo\" xml:space=\"preserve\">\r\n    <value>Use the same email as on Telegram.</value>\r\n  </data>\r\n  <data name=\"EmailInvalidString\" xml:space=\"preserve\">\r\n    <value>Invalid email. Please try again.</value>\r\n  </data>\r\n  <data name=\"PassportEmailVerifyInfo\" xml:space=\"preserve\">\r\n    <value>Please enter the confirmation code we've just sent to {0}.</value>\r\n  </data>\r\n  <data name=\"EmailCodeEmpty\" xml:space=\"preserve\">\r\n    <value>Code is empty. Please try again.</value>\r\n  </data>\r\n  <data name=\"EmailCodeExpiredString\" xml:space=\"preserve\">\r\n    <value>Code expired. Please try again.</value>\r\n  </data>\r\n  <data name=\"EmailCodeInvalidString\" xml:space=\"preserve\">\r\n    <value>You have entered an invalid code. Please try again.</value>\r\n  </data>\r\n  <data name=\"PassportBirthdate\" xml:space=\"preserve\">\r\n    <value>Date of Birth</value>\r\n  </data>\r\n  <data name=\"PassportCitizenship\" xml:space=\"preserve\">\r\n    <value>Citizenship</value>\r\n  </data>\r\n  <data name=\"PassportFemale\" xml:space=\"preserve\">\r\n    <value>Female</value>\r\n  </data>\r\n  <data name=\"PassportGender\" xml:space=\"preserve\">\r\n    <value>Gender</value>\r\n  </data>\r\n  <data name=\"PassportMale\" xml:space=\"preserve\">\r\n    <value>Male</value>\r\n  </data>\r\n  <data name=\"PassportName\" xml:space=\"preserve\">\r\n    <value>Name</value>\r\n  </data>\r\n  <data name=\"PassportResidence\" xml:space=\"preserve\">\r\n    <value>Residence</value>\r\n  </data>\r\n  <data name=\"PassportSurname\" xml:space=\"preserve\">\r\n    <value>Last name</value>\r\n  </data>\r\n  <data name=\"PassportSelectGender\" xml:space=\"preserve\">\r\n    <value>Select Gender</value>\r\n  </data>\r\n  <data name=\"PassportSelectDate\" xml:space=\"preserve\">\r\n    <value>Select Date</value>\r\n  </data>\r\n  <data name=\"PassportDocumentNumber\" xml:space=\"preserve\">\r\n    <value>Document Number</value>\r\n  </data>\r\n  <data name=\"PassportExpired\" xml:space=\"preserve\">\r\n    <value>Expires</value>\r\n  </data>\r\n  <data name=\"PassportFrontSide\" xml:space=\"preserve\">\r\n    <value>Front Side</value>\r\n  </data>\r\n  <data name=\"PassportFrontSideInfo\" xml:space=\"preserve\">\r\n    <value>Upload a photo of the front side of the document</value>\r\n  </data>\r\n  <data name=\"PassportPersonalUploadInfo\" xml:space=\"preserve\">\r\n    <value>The document must contain your photograph, first and last name, date of birth, document number, country of issue, and expiry date.</value>\r\n  </data>\r\n  <data name=\"PassportRequiredDocuments\" xml:space=\"preserve\">\r\n    <value>Required Documents</value>\r\n  </data>\r\n  <data name=\"PassportReverseSide\" xml:space=\"preserve\">\r\n    <value>Reverse Side</value>\r\n  </data>\r\n  <data name=\"PassportReverseSideInfo\" xml:space=\"preserve\">\r\n    <value>Upload a photo of the reverse side of the document</value>\r\n  </data>\r\n  <data name=\"PassportSelfie\" xml:space=\"preserve\">\r\n    <value>Selfie</value>\r\n  </data>\r\n  <data name=\"PassportSelfieInfo\" xml:space=\"preserve\">\r\n    <value>Upload a selfie of yourself holding the document</value>\r\n  </data>\r\n  <data name=\"PassportSelectNotExpire\" xml:space=\"preserve\">\r\n    <value>Does not Expire</value>\r\n  </data>\r\n  <data name=\"PassportDeleteDocumentPersonal\" xml:space=\"preserve\">\r\n    <value>Delete personal details</value>\r\n  </data>\r\n  <data name=\"PassportMainPage\" xml:space=\"preserve\">\r\n    <value>Main Page</value>\r\n  </data>\r\n  <data name=\"PassportMainPageInfo\" xml:space=\"preserve\">\r\n    <value>Upload a photo of the main page of the document</value>\r\n  </data>\r\n  <data name=\"PassportNoExpireDate\" xml:space=\"preserve\">\r\n    <value>None</value>\r\n  </data>\r\n  <data name=\"UpdateAppAlert\" xml:space=\"preserve\">\r\n    <value>Sorry, your Telegram app is out of date and can’t handle this request. Please update Telegram.</value>\r\n  </data>\r\n  <data name=\"PassportInfoTitle\" xml:space=\"preserve\">\r\n    <value>What is Telegram Passport?</value>\r\n  </data>\r\n  <data name=\"Copyright\" xml:space=\"preserve\">\r\n    <value>Copyright</value>\r\n  </data>\r\n  <data name=\"PassportAddTranslationDriverLicenceInfo\" xml:space=\"preserve\">\r\n    <value>Upload scans of a certified English translation of your driver licence.</value>\r\n  </data>\r\n  <data name=\"PassportAddTranslationIdentityCardInfo\" xml:space=\"preserve\">\r\n    <value>Upload scans of a certified English translation of your identity card.</value>\r\n  </data>\r\n  <data name=\"PassportAddTranslationInternalPassportInfo\" xml:space=\"preserve\">\r\n    <value>Upload scans of a certified English translation of your internal passport.</value>\r\n  </data>\r\n  <data name=\"PassportAddTranslationPassportInfo\" xml:space=\"preserve\">\r\n    <value>Upload scans of a certified English translation of your passport.</value>\r\n  </data>\r\n  <data name=\"PassportAddTranslationAgreementInfo\" xml:space=\"preserve\">\r\n    <value>Upload scans of a certified English translation of your tenancy agreement.</value>\r\n  </data>\r\n  <data name=\"PassportAddTranslationBankInfo\" xml:space=\"preserve\">\r\n    <value>Upload scans of a certified English translation of your bank statement.</value>\r\n  </data>\r\n  <data name=\"PassportAddTranslationBillInfo\" xml:space=\"preserve\">\r\n    <value>Upload scans of a certified English translation of your utility bill.</value>\r\n  </data>\r\n  <data name=\"PassportAddTranslationPassportRegistrationInfo\" xml:space=\"preserve\">\r\n    <value>Upload scans of a certified English translation of your passport registration page.</value>\r\n  </data>\r\n  <data name=\"PassportAddTranslationTemporaryRegistrationInfo\" xml:space=\"preserve\">\r\n    <value>Upload scans of a certified English translation of your temporary registration.</value>\r\n  </data>\r\n  <data name=\"PassportAddTranslationUploadInfo\" xml:space=\"preserve\">\r\n    <value>Upload scans of a certified English translation of the document.</value>\r\n  </data>\r\n  <data name=\"PassportTranslation\" xml:space=\"preserve\">\r\n    <value>Translation</value>\r\n  </data>\r\n  <data name=\"PassportDataCorrupted\" xml:space=\"preserve\">\r\n    <value>It seems your Telegram Passport data was corrupted.\r\nYou can reset your Telegram Passport.</value>\r\n  </data>\r\n  <data name=\"PassportOr\" xml:space=\"preserve\">\r\n    <value>{0} or {1}</value>\r\n  </data>\r\n  <data name=\"PassportIdentityDocument\" xml:space=\"preserve\">\r\n    <value>Identity Document</value>\r\n  </data>\r\n  <data name=\"PassportAddressNoUploadInfo\" xml:space=\"preserve\">\r\n    <value>Please provide your address</value>\r\n  </data>\r\n  <data name=\"PassportIdentityDocumentInfo\" xml:space=\"preserve\">\r\n    <value>Upload a scan of your passport or other ID</value>\r\n  </data>\r\n  <data name=\"PassportIdentityDriverLicence\" xml:space=\"preserve\">\r\n    <value>Upload a scan of your driver's licence</value>\r\n  </data>\r\n  <data name=\"PassportIdentityID\" xml:space=\"preserve\">\r\n    <value>Upload a scan of your identity card</value>\r\n  </data>\r\n  <data name=\"PassportIdentityInternalPassport\" xml:space=\"preserve\">\r\n    <value>Upload a scan of your internal passport</value>\r\n  </data>\r\n  <data name=\"PassportIdentityPassport\" xml:space=\"preserve\">\r\n    <value>Upload a scan of your passport</value>\r\n  </data>\r\n  <data name=\"PassportMidname\" xml:space=\"preserve\">\r\n    <value>Middle name</value>\r\n  </data>\r\n  <data name=\"PassportMidnameCountry\" xml:space=\"preserve\">\r\n    <value>Middle name ({0})</value>\r\n  </data>\r\n  <data name=\"PassportMidnameLatin\" xml:space=\"preserve\">\r\n    <value>Middle name (latin)</value>\r\n  </data>\r\n  <data name=\"PassportNameCountry\" xml:space=\"preserve\">\r\n    <value>Name ({0})</value>\r\n  </data>\r\n  <data name=\"PassportNameLatin\" xml:space=\"preserve\">\r\n    <value>Name (latin)</value>\r\n  </data>\r\n  <data name=\"PassportNativeHeader\" xml:space=\"preserve\">\r\n    <value>Your name</value>\r\n  </data>\r\n  <data name=\"PassportNativeInfo\" xml:space=\"preserve\">\r\n    <value>Your name in the language of your country of residence ({0}).</value>\r\n  </data>\r\n  <data name=\"PassportSurnameCountry\" xml:space=\"preserve\">\r\n    <value>Last name ({0})</value>\r\n  </data>\r\n  <data name=\"PassportSurnameLatin\" xml:space=\"preserve\">\r\n    <value>Last name (latin)</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "TelegramClient/Resources/AppResources.ru.Designer.cs",
    "content": ""
  },
  {
    "path": "TelegramClient/Resources/AppResources.ru.resx",
    "content": "﻿<?xml version='1.0' encoding='UTF-8'?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" id=\"root\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/>\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"AppName\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"BlockContact\" xml:space=\"preserve\">\n    <value>Заблокировать</value>\n  </data>\n  <data name=\"BlockedUsers\" xml:space=\"preserve\">\n    <value>Черный список</value>\n  </data>\n  <data name=\"Call\" xml:space=\"preserve\">\n    <value>Позвонить</value>\n  </data>\n  <data name=\"Contacts\" xml:space=\"preserve\">\n    <value>Контакты</value>\n  </data>\n  <data name=\"Copy\" xml:space=\"preserve\">\n    <value>Копировать</value>\n  </data>\n  <data name=\"Delete\" xml:space=\"preserve\">\n    <value>Удалить</value>\n  </data>\n  <data name=\"Dialogs\" xml:space=\"preserve\">\n    <value>Чаты</value>\n  </data>\n  <data name=\"Forward\" xml:space=\"preserve\">\n    <value>Переслать</value>\n  </data>\n  <data name=\"Loading\" xml:space=\"preserve\">\n    <value>Загрузка...</value>\n  </data>\n  <data name=\"Login\" xml:space=\"preserve\">\n    <value>Вход</value>\n  </data>\n  <data name=\"Refresh\" xml:space=\"preserve\">\n    <value>Обновить</value>\n  </data>\n  <data name=\"Retry\" xml:space=\"preserve\">\n    <value>Повторить</value>\n  </data>\n  <data name=\"Send\" xml:space=\"preserve\">\n    <value>Отправить</value>\n  </data>\n  <data name=\"Sending\" xml:space=\"preserve\">\n    <value>Отправка</value>\n  </data>\n  <data name=\"SendingFailed\" xml:space=\"preserve\">\n    <value>Не отправить</value>\n  </data>\n  <data name=\"SendMessage\" xml:space=\"preserve\">\n    <value>Отправить сообщение</value>\n  </data>\n  <data name=\"Settings\" xml:space=\"preserve\">\n    <value>Настройки</value>\n  </data>\n  <data name=\"ShareContact\" xml:space=\"preserve\">\n    <value>Отправить контакт</value>\n  </data>\n  <data name=\"SignIn\" xml:space=\"preserve\">\n    <value>Войти</value>\n  </data>\n  <data name=\"UnblockContact\" xml:space=\"preserve\">\n    <value>Разблокировать</value>\n  </data>\n  <data name=\"Yesterday\" xml:space=\"preserve\">\n    <value>Вчера</value>\n  </data>\n  <data name=\"YourMessage\" xml:space=\"preserve\">\n    <value>Введите сообщение...</value>\n  </data>\n  <data name=\"LogOut\" xml:space=\"preserve\">\n    <value>Выйти</value>\n  </data>\n  <data name=\"NoMessagesYet\" xml:space=\"preserve\">\n    <value>Нет сообщений...</value>\n  </data>\n  <data name=\"Confirm\" xml:space=\"preserve\">\n    <value>Подтвердить</value>\n  </data>\n  <data name=\"DeleteChatConfirmation\" xml:space=\"preserve\">\n    <value>Вы уверены, что хотите удалить этот чат?</value>\n  </data>\n  <data name=\"Contact\" xml:space=\"preserve\">\n    <value>Контакт</value>\n  </data>\n  <data name=\"EmptyMessage\" xml:space=\"preserve\">\n    <value>Удаленное сообщение</value>\n  </data>\n  <data name=\"ForwardedMessage\" xml:space=\"preserve\">\n    <value>Переслано от:</value>\n  </data>\n  <data name=\"GeoPoint\" xml:space=\"preserve\">\n    <value>Карта</value>\n  </data>\n  <data name=\"Photo\" xml:space=\"preserve\">\n    <value>Фото</value>\n  </data>\n  <data name=\"Video\" xml:space=\"preserve\">\n    <value>Видео</value>\n  </data>\n  <data name=\"ComposeMessage\" xml:space=\"preserve\">\n    <value>Новый контакт</value>\n  </data>\n  <data name=\"Search\" xml:space=\"preserve\">\n    <value>Поиск</value>\n  </data>\n  <data name=\"ServiceMessage\" xml:space=\"preserve\">\n    <value>Сервисное сообщение</value>\n  </data>\n  <data name=\"UnsupportedMedia\" xml:space=\"preserve\">\n    <value>Это сообщение не поддерживается в вашей версии Telegram. Обновите приложение для просмотра: http://telegram.org/update</value>\n  </data>\n  <data name=\"Unread\" xml:space=\"preserve\">\n    <value>Не прочитано</value>\n  </data>\n  <data name=\"IsTyping\" xml:space=\"preserve\">\n    <value>Набирает сообщение</value>\n  </data>\n  <data name=\"Online\" xml:space=\"preserve\">\n    <value>Online</value>\n  </data>\n  <data name=\"User\" xml:space=\"preserve\">\n    <value>Пользователь</value>\n  </data>\n  <data name=\"MessageActionChatCreate\" xml:space=\"preserve\">\n    <value>{0} создал(а) группу «{1}»</value>\n  </data>\n  <data name=\"MessageActionChatEditTitle\" xml:space=\"preserve\">\n    <value>{0} изменил(а) имя чата на «{1}»</value>\n  </data>\n  <data name=\"MessageActionChatEditPhoto\" xml:space=\"preserve\">\n    <value>{0} изменил(а) фото группы</value>\n  </data>\n  <data name=\"MessageActionChatDeletePhoto\" xml:space=\"preserve\">\n    <value>{0} удалил(а) фото группы</value>\n  </data>\n  <data name=\"MessageActionChatAddUser\" xml:space=\"preserve\">\n    <value>{0} пригласил(а) {1}</value>\n  </data>\n  <data name=\"MessageActionChatDeleteUser\" xml:space=\"preserve\">\n    <value>{0} исключил(а) {1}</value>\n  </data>\n  <data name=\"MessageActionEmpty\" xml:space=\"preserve\">\n    <value>Пустое сервисное сообщение</value>\n  </data>\n  <data name=\"CompanyNominative\" xml:space=\"preserve\">\n    <value>Участник</value>\n  </data>\n  <data name=\"CompanyGenitivePlural\" xml:space=\"preserve\">\n    <value>Участников</value>\n  </data>\n  <data name=\"CompanyGenitiveSingular\" xml:space=\"preserve\">\n    <value>Участника</value>\n  </data>\n  <data name=\"PeopleInTheConversation\" xml:space=\"preserve\">\n    <value>Участников: {0}</value>\n  </data>\n  <data name=\"Offline\" xml:space=\"preserve\">\n    <value>Offline</value>\n  </data>\n  <data name=\"Today\" xml:space=\"preserve\">\n    <value>Сегодня</value>\n  </data>\n  <data name=\"LastSeenAt\" xml:space=\"preserve\">\n    <value>Был(а) в сети {0} в {1}</value>\n  </data>\n  <data name=\"LastSeen\" xml:space=\"preserve\">\n    <value>Был(а) в сети {0} назад</value>\n  </data>\n  <data name=\"MinuteAccusative\" xml:space=\"preserve\">\n    <value>Минуту </value>\n  </data>\n  <data name=\"MinuteGenitiveSingular\" xml:space=\"preserve\">\n    <value>Минуты</value>\n  </data>\n  <data name=\"MinuteGenitivePlural\" xml:space=\"preserve\">\n    <value>Минут</value>\n  </data>\n  <data name=\"Attach\" xml:space=\"preserve\">\n    <value>Прикрепить</value>\n  </data>\n  <data name=\"Manage\" xml:space=\"preserve\">\n    <value>Управлять</value>\n  </data>\n  <data name=\"Ok\" xml:space=\"preserve\">\n    <value>Ок</value>\n  </data>\n  <data name=\"Cancel\" xml:space=\"preserve\">\n    <value>Отмена</value>\n  </data>\n  <data name=\"Select\" xml:space=\"preserve\">\n    <value>Выбрать</value>\n  </data>\n  <data name=\"MapAccusative\" xml:space=\"preserve\">\n    <value>Моё местоположение</value>\n  </data>\n  <data name=\"PhotoAccusative\" xml:space=\"preserve\">\n    <value>Фото</value>\n  </data>\n  <data name=\"Add\" xml:space=\"preserve\">\n    <value>Добавить</value>\n  </data>\n  <data name=\"NewGroup\" xml:space=\"preserve\">\n    <value>Новая группа</value>\n  </data>\n  <data name=\"NewSecretChat\" xml:space=\"preserve\">\n    <value>Новый секретный чат</value>\n  </data>\n  <data name=\"TileUpdaterTaskDescription\" xml:space=\"preserve\">\n    <value>Периодически обновляет количество непрочитанных сообщений на живой плитке.</value>\n  </data>\n  <data name=\"Media\" xml:space=\"preserve\">\n    <value>Медиа</value>\n  </data>\n  <data name=\"Profile\" xml:space=\"preserve\">\n    <value>Информация</value>\n  </data>\n  <data name=\"Notifications\" xml:space=\"preserve\">\n    <value>Уведомления</value>\n  </data>\n  <data name=\"On\" xml:space=\"preserve\">\n    <value>Включено</value>\n  </data>\n  <data name=\"Off\" xml:space=\"preserve\">\n    <value>Выключено</value>\n  </data>\n  <data name=\"Sound\" xml:space=\"preserve\">\n    <value>Сигнал сообщения</value>\n  </data>\n  <data name=\"CreateSecretChat\" xml:space=\"preserve\">\n    <value>Начать секретный чат</value>\n  </data>\n  <data name=\"MessageNotifications\" xml:space=\"preserve\">\n    <value>Уведомления о сообщениях</value>\n  </data>\n  <data name=\"ChatNotifications\" xml:space=\"preserve\">\n    <value>Уведомления в чатах</value>\n  </data>\n  <data name=\"NotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Отключение, предпросмотр, чаты</value>\n  </data>\n  <data name=\"Support\" xml:space=\"preserve\">\n    <value>Поддержка</value>\n  </data>\n  <data name=\"AskAQuestion\" xml:space=\"preserve\">\n    <value>Задать вопрос</value>\n  </data>\n  <data name=\"InAppNotifications\" xml:space=\"preserve\">\n    <value>В приложении</value>\n  </data>\n  <data name=\"OnPlural\" xml:space=\"preserve\">\n    <value>Включены</value>\n  </data>\n  <data name=\"OffPlural\" xml:space=\"preserve\">\n    <value>Выключены</value>\n  </data>\n  <data name=\"OnFeminine\" xml:space=\"preserve\">\n    <value>Включена</value>\n  </data>\n  <data name=\"OffFeminine\" xml:space=\"preserve\">\n    <value>Выключена</value>\n  </data>\n  <data name=\"InAppSounds\" xml:space=\"preserve\">\n    <value>Сигнал</value>\n  </data>\n  <data name=\"InAppVibrate\" xml:space=\"preserve\">\n    <value>Вибрация</value>\n  </data>\n  <data name=\"InAppPreview\" xml:space=\"preserve\">\n    <value>Предпросмотр сообщения</value>\n  </data>\n  <data name=\"ResetAllNotifications\" xml:space=\"preserve\">\n    <value>Сбросить уведомления</value>\n  </data>\n  <data name=\"ResetAllNotificationsSubtitle\" xml:space=\"preserve\">\n    <value>Сброс всех пользовательских настроек уведомлений для контактов и чатов</value>\n  </data>\n  <data name=\"OnMasculine\" xml:space=\"preserve\">\n    <value>Включен</value>\n  </data>\n  <data name=\"OffMasculine\" xml:space=\"preserve\">\n    <value>Выключен</value>\n  </data>\n  <data name=\"GroupNotifications\" xml:space=\"preserve\">\n    <value>Групповые уведомления</value>\n  </data>\n  <data name=\"Alert\" xml:space=\"preserve\">\n    <value>Сигнал</value>\n  </data>\n  <data name=\"MessagePreview\" xml:space=\"preserve\">\n    <value>Предпросмотр сообщения</value>\n  </data>\n  <data name=\"SaveIncomingPhotos\" xml:space=\"preserve\">\n    <value>Сохранять поступающие фото</value>\n  </data>\n  <data name=\"Create\" xml:space=\"preserve\">\n    <value>Создать</value>\n  </data>\n  <data name=\"Share\" xml:space=\"preserve\">\n    <value>Поделиться</value>\n  </data>\n  <data name=\"Edit\" xml:space=\"preserve\">\n    <value>Редактировать</value>\n  </data>\n  <data name=\"CompanyNominativeSingular\" xml:space=\"preserve\">\n    <value>Участник</value>\n  </data>\n  <data name=\"CompanyNominativePlural\" xml:space=\"preserve\">\n    <value>Участники</value>\n  </data>\n  <data name=\"PictureAccusative\" xml:space=\"preserve\">\n    <value>Фото</value>\n  </data>\n  <data name=\"ContactAccusative\" xml:space=\"preserve\">\n    <value>Контакт</value>\n  </data>\n  <data name=\"DocumentAccusative\" xml:space=\"preserve\">\n    <value>Файл</value>\n  </data>\n  <data name=\"AttachCaption\" xml:space=\"preserve\">\n    <value>Прикрепите</value>\n  </data>\n  <data name=\"LocationAccusative\" xml:space=\"preserve\">\n    <value>Карта</value>\n  </data>\n  <data name=\"VideoAccusative\" xml:space=\"preserve\">\n    <value>Видео</value>\n  </data>\n  <data name=\"NoMediaHere\" xml:space=\"preserve\">\n    <value>Медиафайлы отсутствуют</value>\n  </data>\n  <data name=\"ChooseAnItem\" xml:space=\"preserve\">\n    <value>Выберите</value>\n  </data>\n  <data name=\"NoUsersHere\" xml:space=\"preserve\">\n    <value>Нет пользователей</value>\n  </data>\n  <data name=\"NoContactsHere\" xml:space=\"preserve\">\n    <value>Нет контактов</value>\n  </data>\n  <data name=\"Title\" xml:space=\"preserve\">\n    <value>Название</value>\n  </data>\n  <data name=\"Done\" xml:space=\"preserve\">\n    <value>Готово</value>\n  </data>\n  <data name=\"AddParticipant\" xml:space=\"preserve\">\n    <value>Добавить участника</value>\n  </data>\n  <data name=\"DeleteAndExitGroup\" xml:space=\"preserve\">\n    <value>Удалить и выйти</value>\n  </data>\n  <data name=\"MessageActionUserLeftGroup\" xml:space=\"preserve\">\n    <value>{0} покинул(а) чат</value>\n  </data>\n  <data name=\"MessageUser\" xml:space=\"preserve\">\n    <value>Сообщение для {0}</value>\n  </data>\n  <data name=\"ViewUser\" xml:space=\"preserve\">\n    <value>Посмотреть {0}</value>\n  </data>\n  <data name=\"SearchAmongYourDialogsAndMessages\" xml:space=\"preserve\">\n    <value>Поиск по чатам и сообщениям</value>\n  </data>\n  <data name=\"Messages\" xml:space=\"preserve\">\n    <value>Сообщения</value>\n  </data>\n  <data name=\"NoMessagesHere\" xml:space=\"preserve\">\n    <value>Нет сообщений</value>\n  </data>\n  <data name=\"NoResults\" xml:space=\"preserve\">\n    <value>Нет результатов</value>\n  </data>\n  <data name=\"Conversations\" xml:space=\"preserve\">\n    <value>Чаты</value>\n  </data>\n  <data name=\"EditName\" xml:space=\"preserve\">\n    <value>Изменить имя</value>\n  </data>\n  <data name=\"Save\" xml:space=\"preserve\">\n    <value>Сохранить</value>\n  </data>\n  <data name=\"About\" xml:space=\"preserve\">\n    <value>Описание</value>\n  </data>\n  <data name=\"Version\" xml:space=\"preserve\">\n    <value>Версия</value>\n  </data>\n  <data name=\"YourPhone\" xml:space=\"preserve\">\n    <value>Ваш телефон</value>\n  </data>\n  <data name=\"SignInMessage\" xml:space=\"preserve\">\n    <value>Проверьте код страны и введите номер Вашего телефона.</value>\n  </data>\n  <data name=\"Your phone number\" xml:space=\"preserve\">\n    <value>Ваш номер телефона</value>\n  </data>\n  <data name=\"Next\" xml:space=\"preserve\">\n    <value>Далее</value>\n  </data>\n  <data name=\"Country\" xml:space=\"preserve\">\n    <value>Страна</value>\n  </data>\n  <data name=\"YourCode\" xml:space=\"preserve\">\n    <value>Ваш код</value>\n  </data>\n  <data name=\"ConfirmMessage\" xml:space=\"preserve\">\n    <value>Мы отправили SMS с кодом активации на ваш телефон **{0}**</value>\n  </data>\n  <data name=\"WeWillCallYou\" xml:space=\"preserve\">\n    <value>Мы позвоним вам через {0}</value>\n  </data>\n  <data name=\"Code\" xml:space=\"preserve\">\n    <value>Код</value>\n  </data>\n  <data name=\"FirstName\" xml:space=\"preserve\">\n    <value>Имя</value>\n  </data>\n  <data name=\"LastName\" xml:space=\"preserve\">\n    <value>Фамилия (не обязательно)</value>\n  </data>\n  <data name=\"YourName\" xml:space=\"preserve\">\n    <value>Ваше имя</value>\n  </data>\n  <data name=\"SignUpMessage\" xml:space=\"preserve\">\n    <value>Пожалуйста, добавьте имя и фотографию.</value>\n  </data>\n  <data name=\"AddPhoto\" xml:space=\"preserve\">\n    <value>Добавить фото</value>\n  </data>\n  <data name=\"NoDialogsHere\" xml:space=\"preserve\">\n    <value>Чатов пока нет</value>\n  </data>\n  <data name=\"StartMessaging\" xml:space=\"preserve\">\n    <value>Начать общение</value>\n  </data>\n  <data name=\"Intro1Message\" xml:space=\"preserve\">\n    <value>Добро пожаловать в **Telegram** ― \nсамое быстрое в мире приложение для обмена сообщениями.\nБесплатное и безопасное.</value>\n  </data>\n  <data name=\"Fast\" xml:space=\"preserve\">\n    <value>Быстрый</value>\n  </data>\n  <data name=\"FastMessage\" xml:space=\"preserve\">\n    <value>**Telegram** доставляет сообщения\nбыстрее любого другого мессенджера.</value>\n  </data>\n  <data name=\"Free\" xml:space=\"preserve\">\n    <value>Бесплатный</value>\n  </data>\n  <data name=\"FreeMessage\" xml:space=\"preserve\">\n    <value>**Telegram** всегда будет бесплатным!\nНикакой рекламы. Никаких подписок.</value>\n  </data>\n  <data name=\"Powerful\" xml:space=\"preserve\">\n    <value>Мощный</value>\n  </data>\n  <data name=\"PowerfulMessage\" xml:space=\"preserve\">\n    <value>В **Telegram** нет никаких \nограничений по размерам.</value>\n  </data>\n  <data name=\"Secure\" xml:space=\"preserve\">\n    <value>Безопасный</value>\n  </data>\n  <data name=\"SecureMessage\" xml:space=\"preserve\">\n    <value>**Telegram** защитит Вашу\nпереписку от злоумышленников.</value>\n  </data>\n  <data name=\"CloudBased\" xml:space=\"preserve\">\n    <value>Облачный</value>\n  </data>\n  <data name=\"CloudBasedMessage\" xml:space=\"preserve\">\n    <value>Переписываться в  **Telegram** можно\nс любого количества разных устройств.</value>\n  </data>\n  <data name=\"TelegramDialedYourNumber\" xml:space=\"preserve\">\n    <value>Telegram набирает ваш номер</value>\n  </data>\n  <data name=\"Subject\" xml:space=\"preserve\">\n    <value>Тема</value>\n  </data>\n  <data name=\"Members\" xml:space=\"preserve\">\n    <value>Участники</value>\n  </data>\n  <data name=\"YourPhoneNumber\" xml:space=\"preserve\">\n    <value>Ваш номер телефона</value>\n  </data>\n  <data name=\"From\" xml:space=\"preserve\">\n    <value>От:</value>\n  </data>\n  <data name=\"You\" xml:space=\"preserve\">\n    <value>Вы</value>\n  </data>\n  <data name=\"YouWhereKickedFromTheGroup\" xml:space=\"preserve\">\n    <value>Вы были исключены из группы</value>\n  </data>\n  <data name=\"SavePhotoMessage\" xml:space=\"preserve\">\n    <value>Фото успешно сохранено</value>\n  </data>\n  <data name=\"SharedContact\" xml:space=\"preserve\">\n    <value>Контакт</value>\n  </data>\n  <data name=\"AllContacts\" xml:space=\"preserve\">\n    <value>Все контакты</value>\n  </data>\n  <data name=\"Document\" xml:space=\"preserve\">\n    <value>Файл</value>\n  </data>\n  <data name=\"InviteFriends\" xml:space=\"preserve\">\n    <value>Пригласить друзей</value>\n  </data>\n  <data name=\"MyLocation\" xml:space=\"preserve\">\n    <value>Моё местоположение</value>\n  </data>\n  <data name=\"Satellite\" xml:space=\"preserve\">\n    <value>Спутник</value>\n  </data>\n  <data name=\"Hybrid\" xml:space=\"preserve\">\n    <value>Гибрид</value>\n  </data>\n  <data name=\"SwitchMode\" xml:space=\"preserve\">\n    <value>Переключить вид</value>\n  </data>\n  <data name=\"DistanceAway\" xml:space=\"preserve\">\n    <value>{0} отсюда</value>\n  </data>\n  <data name=\"MetersShort\" xml:space=\"preserve\">\n    <value>м</value>\n  </data>\n  <data name=\"KilometersShort\" xml:space=\"preserve\">\n    <value>км</value>\n  </data>\n  <data name=\"ShareLocation\" xml:space=\"preserve\">\n    <value>Поделиться местом</value>\n  </data>\n  <data name=\"Emoji\" xml:space=\"preserve\">\n    <value>Emoji</value>\n  </data>\n  <data name=\"LogOutConfirmation\" xml:space=\"preserve\">\n    <value>Уверены, что хотите выйти?\nВы можете пользоваться Telegram на всех устройствах одновременно.\nВажно: если вы разлогинитесь, все секретные чаты на этом устройстве пропадут.</value>\n  </data>\n  <data name=\"GotAQuestionAboutTelegram\" xml:space=\"preserve\">\n    <value>Есть вопросы о Telegram?</value>\n  </data>\n  <data name=\"InviteFriendMessage\" xml:space=\"preserve\">\n    <value>Предлагаю попробовать Telegram: https://telegram.org/dl</value>\n  </data>\n  <data name=\"ResetAllNotificationsMessage\" xml:space=\"preserve\">\n    <value>Сбросить настройки оповещений?</value>\n  </data>\n  <data name=\"AreTyping\" xml:space=\"preserve\">\n    <value>Набирают сообщение</value>\n  </data>\n  <data name=\"ClearHistory\" xml:space=\"preserve\">\n    <value>Очистить историю</value>\n  </data>\n  <data name=\"DeleteAndExit\" xml:space=\"preserve\">\n    <value>Удалить и выйти</value>\n  </data>\n  <data name=\"DeleteHistoryAndExitGroupMessage\" xml:space=\"preserve\">\n    <value>Удалить историю и выйти из беседы?</value>\n  </data>\n  <data name=\"NoUsers\" xml:space=\"preserve\">\n    <value>Нет пользователей</value>\n  </data>\n  <data name=\"UserNominativeSingular\" xml:space=\"preserve\">\n    <value>Пользователь</value>\n  </data>\n  <data name=\"UserNominativePlural\" xml:space=\"preserve\">\n    <value>Пользователи</value>\n  </data>\n  <data name=\"UserGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пользователя</value>\n  </data>\n  <data name=\"UserGenitivePlural\" xml:space=\"preserve\">\n    <value>Пользователей</value>\n  </data>\n  <data name=\"PleaseGoToChatToForwardMessage\" xml:space=\"preserve\">\n    <value>Пожалуйста, перейдите в чат, в который нужно переслать сообщение</value>\n  </data>\n  <data name=\"Info\" xml:space=\"preserve\">\n    <value>Информация</value>\n  </data>\n  <data name=\"ForwardeMessageToThisChat\" xml:space=\"preserve\">\n    <value>Переслать сообщения в этот чат?</value>\n  </data>\n  <data name=\"TodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"RegularFormat\" xml:space=\"preserve\">\n    <value>d MMM</value>\n  </data>\n  <data name=\"LongRegularFormat\" xml:space=\"preserve\">\n    <value>d.MM.yyyy</value>\n  </data>\n  <data name=\"MessageTodayFormat\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"MessageRegularFormat\" xml:space=\"preserve\">\n    <value>d MMM, {0}</value>\n  </data>\n  <data name=\"MessageLongRegularFormat\" xml:space=\"preserve\">\n    <value>yyyy d MMM, {0}</value>\n  </data>\n  <data name=\"UserStatusTimeFormat\" xml:space=\"preserve\">\n    <value>h:mmt</value>\n  </data>\n  <data name=\"UserStatusDayFormat\" xml:space=\"preserve\">\n    <value>d MMM</value>\n  </data>\n  <data name=\"UserStatusYearDayFormat\" xml:space=\"preserve\">\n    <value>d MMM yyyy</value>\n  </data>\n  <data name=\"PhoneNumberInvalidString\" xml:space=\"preserve\">\n    <value>Неверный номер телефона. Пожалуйста, попробуйте ещё раз.</value>\n  </data>\n  <data name=\"Error\" xml:space=\"preserve\">\n    <value>Ошибка</value>\n  </data>\n  <data name=\"FloodWaitString\" xml:space=\"preserve\">\n    <value>Лимит попыток превышен. Попробуйте ещё раз позже.</value>\n  </data>\n  <data name=\"PhoneCodeInvalidString\" xml:space=\"preserve\">\n    <value>Вы ввели неправильный код. Попробуйте ещё раз.</value>\n  </data>\n  <data name=\"PhoneCodeExpiredString\" xml:space=\"preserve\">\n    <value>Время действия кода истекло. Попробуйте ещё раз.</value>\n  </data>\n  <data name=\"PhoneCodeEmpty\" xml:space=\"preserve\">\n    <value>Код устарел. Пожалуйста, повторите попытку.</value>\n  </data>\n  <data name=\"FirstNameInvalidString\" xml:space=\"preserve\">\n    <value>Некорректное имя. Попробуйте ещё раз.</value>\n  </data>\n  <data name=\"LastNameInvalidString\" xml:space=\"preserve\">\n    <value>Некорректная фамилия. Попробуйте ещё раз.</value>\n  </data>\n  <data name=\"Message\" xml:space=\"preserve\">\n    <value>Сообщение</value>\n  </data>\n  <data name=\"LockScreen\" xml:space=\"preserve\">\n    <value>Экран блокировки</value>\n  </data>\n  <data name=\"LockScreenSubtitle\" xml:space=\"preserve\">\n    <value>Добавить Telegram на экран блокировки</value>\n  </data>\n  <data name=\"ConfirmAgeMessage\" xml:space=\"preserve\">\n    <value>Нажатием на кнопку ОК вы подтверждаете, что ваш возраст не менее 13 лет.</value>\n  </data>\n  <data name=\"ConfirmAgeTitle\" xml:space=\"preserve\">\n    <value>Подтвердите ваш возраст</value>\n  </data>\n  <data name=\"ConfirmPushMessage\" xml:space=\"preserve\">\n    <value>Вы разрешаете этому приложению использовать всплывающие уведомления о новых сообщениях?</value>\n  </data>\n  <data name=\"ConfirmPushTitle\" xml:space=\"preserve\">\n    <value>Подтвердите</value>\n  </data>\n  <data name=\"PrivacyStatement\" xml:space=\"preserve\">\n    <value>Заявление о конфиденциальности</value>\n  </data>\n  <data name=\"PrivacyStatementText\" xml:space=\"preserve\">\n    <value>Данное приложение использует информацию о вашем местоположении для работы с картами. Эти данные могут быть сохранены и доступны другим пользователям. Ваша конфиденциальность важна для нас. Вы можете отключить данную функцию в любое время.\n\nЕсли у вас возникли какие-либо вопросы, вы можете задать их в нашей </value>\n  </data>\n  <data name=\"VKGroup\" xml:space=\"preserve\">\n    <value>группе</value>\n  </data>\n  <data name=\"LocationServices\" xml:space=\"preserve\">\n    <value>Службы определения \nместоположения</value>\n  </data>\n  <data name=\"AllowLocationServicesTitle\" xml:space=\"preserve\">\n    <value>Открыть доступ к местоположению?</value>\n  </data>\n  <data name=\"AllowLocationServiceText\" xml:space=\"preserve\">\n    <value>Открыть доступ к текущему местоположению? Выбор может быть изменен позже в настройках приложения.</value>\n  </data>\n  <data name=\"AboutText1\" xml:space=\"preserve\">\n    <value>Telegram Messenger ― это клиент сервиса Telegram с акцентом на скорости и безопасности. Он очень быстрый, простой и бесплатный.</value>\n  </data>\n  <data name=\"AboutText2\" xml:space=\"preserve\">\n    <value>Для получения поддержки, пожалуйста, перейдите в настройки Telegram и выберите “Задать вопрос”. Вы также можете связаться с нами по почте support@telegram.org.</value>\n  </data>\n  <data name=\"TapRecordToStartRecording\" xml:space=\"preserve\">\n    <value>Нажмите Запись, чтобы начать...</value>\n  </data>\n  <data name=\"ACameraIsNotSupportedOnThisDevice\" xml:space=\"preserve\">\n    <value>Камера не поддерживается на данном устройстве.</value>\n  </data>\n  <data name=\"ReadyToRecord\" xml:space=\"preserve\">\n    <value>Готов к записи.</value>\n  </data>\n  <data name=\"PressBackKeyToSendVideo\" xml:space=\"preserve\">\n    <value>Нажмите Назад, чтобы отправить видео.</value>\n  </data>\n  <data name=\"PlaybackStarted\" xml:space=\"preserve\">\n    <value>Вопроизведение начато.</value>\n  </data>\n  <data name=\"PlaybackPaused\" xml:space=\"preserve\">\n    <value>Воспроизведение приостановлено.</value>\n  </data>\n  <data name=\"Recording\" xml:space=\"preserve\">\n    <value>Запись...</value>\n  </data>\n  <data name=\"PreparingViewfinder\" xml:space=\"preserve\">\n    <value>Подготовка видеоискателя...</value>\n  </data>\n  <data name=\"PlaybackStoped\" xml:space=\"preserve\">\n    <value>Воспроизведение остановлено.</value>\n  </data>\n  <data name=\"Record\" xml:space=\"preserve\">\n    <value>Запись</value>\n  </data>\n  <data name=\"Stop\" xml:space=\"preserve\">\n    <value>Стоп</value>\n  </data>\n  <data name=\"Pause\" xml:space=\"preserve\">\n    <value>Пауза</value>\n  </data>\n  <data name=\"Play\" xml:space=\"preserve\">\n    <value>Воспроизвести</value>\n  </data>\n  <data name=\"Review\" xml:space=\"preserve\">\n    <value>Отзыв</value>\n  </data>\n  <data name=\"PleaseEnterGroupSubject\" xml:space=\"preserve\">\n    <value>Пожалуйста, введите тему беседы</value>\n  </data>\n  <data name=\"PleaseChooseAtLeastOneParticipant\" xml:space=\"preserve\">\n    <value>Пожалуйста, выберите по крайней мере одного участника беседы</value>\n  </data>\n  <data name=\"ForwardMessagesToThisChat\" xml:space=\"preserve\">\n    <value>Переслать сообщения в этот чат?</value>\n  </data>\n  <data name=\"InvalidCountryCode\" xml:space=\"preserve\">\n    <value>Неверный код страны</value>\n  </data>\n  <data name=\"Typing\" xml:space=\"preserve\">\n    <value>Набирает сообщение</value>\n  </data>\n  <data name=\"MaximumMessageLengthExceeded\" xml:space=\"preserve\">\n    <value>Превышена максимальная длина сообщения ({0} символов).</value>\n  </data>\n  <data name=\"Download\" xml:space=\"preserve\">\n    <value>Загрузить</value>\n  </data>\n  <data name=\"Backgrounds\" xml:space=\"preserve\">\n    <value>Фоны</value>\n  </data>\n  <data name=\"Static\" xml:space=\"preserve\">\n    <value>Статический</value>\n  </data>\n  <data name=\"Animated\" xml:space=\"preserve\">\n    <value>Анимированный</value>\n  </data>\n  <data name=\"Background\" xml:space=\"preserve\">\n    <value>Фон</value>\n  </data>\n  <data name=\"ApplicationBackgroundSubtitle\" xml:space=\"preserve\">\n    <value>Установить фон</value>\n  </data>\n  <data name=\"ApplicationBackground\" xml:space=\"preserve\">\n    <value>Фон приложения</value>\n  </data>\n  <data name=\"DialogsBackground\" xml:space=\"preserve\">\n    <value>Фон диалога</value>\n  </data>\n  <data name=\"SpecialThanks\" xml:space=\"preserve\">\n    <value>Особая благодарность</value>\n  </data>\n  <data name=\"SendMessageByEnter\" xml:space=\"preserve\">\n    <value>Отправлять сообщение по Enter</value>\n  </data>\n  <data name=\"PleaseNoteThatAnimatedBackgroundConsumesMoreBatteryResources\" xml:space=\"preserve\">\n    <value>Пожалуйста, примите во внимание, что анимированный фон больше потребляет батарею телефона.</value>\n  </data>\n  <data name=\"Please go to chat to forward message\" xml:space=\"preserve\">\n    <value>Пожалуйста, перейдите в чат, в который нужно переслать сообщение</value>\n  </data>\n  <data name=\"SecretChatCaption\" xml:space=\"preserve\">\n    <value>Вы пригласили {0} в секретный чат.</value>\n  </data>\n  <data name=\"SecretChat\" xml:space=\"preserve\">\n    <value>Секретный чат</value>\n  </data>\n  <data name=\"UseEntToEndEncryption\" xml:space=\"preserve\">\n    <value>Используют end-to-end шифрование</value>\n  </data>\n  <data name=\"LeaveNoTraceOnOurServers\" xml:space=\"preserve\">\n    <value>Не оставляют никаких следов на наших серверах</value>\n  </data>\n  <data name=\"HaveASelfDestructTimer\" xml:space=\"preserve\">\n    <value>Имеют таймер самоуничтожения сообщений</value>\n  </data>\n  <data name=\"SecretChats\" xml:space=\"preserve\">\n    <value>Секретные чаты</value>\n  </data>\n  <data name=\"DoNotAllowForwarding\" xml:space=\"preserve\">\n    <value>Не позволяют пересылать сообщения</value>\n  </data>\n  <data name=\"WaitingForUserToGetOnline\" xml:space=\"preserve\">\n    <value>Ожидаем появления {0} в сети</value>\n  </data>\n  <data name=\"SelfDestructTimer\" xml:space=\"preserve\">\n    <value>Таймер самоуничтожения сообщений</value>\n  </data>\n  <data name=\"EncryptionKey\" xml:space=\"preserve\">\n    <value>Ключ шифрования</value>\n  </data>\n  <data name=\"EncryptionKeyDescription1\" xml:space=\"preserve\">\n    <value>Это изображение является визуализацией ключа шифрования для данного секретного чата с {0}</value>\n  </data>\n  <data name=\"EncryptionKeyDescription2\" xml:space=\"preserve\">\n    <value>Если оно выглядит так же на телефоне {0}, то ваш чат на 200% безопасен.</value>\n  </data>\n  <data name=\"LearnMoreAt\" xml:space=\"preserve\">\n    <value>Узнайте больше на </value>\n  </data>\n  <data name=\"TelegramWebsite\" xml:space=\"preserve\">\n    <value>Telegram.org</value>\n  </data>\n  <data name=\"LastSeenAtDate\" xml:space=\"preserve\">\n    <value>Был(а) в сети {0} в {1}</value>\n  </data>\n  <data name=\"LastSeenJustNow\" xml:space=\"preserve\">\n    <value>Был(а) в сети только что</value>\n  </data>\n  <data name=\"SecretChatsDescription\" xml:space=\"preserve\">\n    <value>Секретные чаты:\n• Используют end-to-end шифрование\n• Не оставляют следов на наших серверах\n• Имеют таймер самоуничтожения сообщений\n• Не позволяют пересылать сообщения</value>\n  </data>\n  <data name=\"Audio\" xml:space=\"preserve\">\n    <value>Аудио</value>\n  </data>\n  <data name=\"IncognitoMode\" xml:space=\"preserve\">\n    <value>Режим невидимости</value>\n  </data>\n  <data name=\"TelegramNotifications\" xml:space=\"preserve\">\n    <value>Telegram</value>\n  </data>\n  <data name=\"Invisible\" xml:space=\"preserve\">\n    <value>Невидимый</value>\n  </data>\n  <data name=\"SecretChatDiscarded\" xml:space=\"preserve\">\n    <value>Секретный чат отменен</value>\n  </data>\n  <data name=\"SecretChatCreated\" xml:space=\"preserve\">\n    <value>Секретный чат создан</value>\n  </data>\n  <data name=\"EmptySecretChat\" xml:space=\"preserve\">\n    <value>Пустой секретный чат</value>\n  </data>\n  <data name=\"MessageActionSetMessageTTL\" xml:space=\"preserve\">\n    <value>{0} установил таймер самоуничтожения сообщений на {1}</value>\n  </data>\n  <data name=\"MessageActionYouSetMessageTTL\" xml:space=\"preserve\">\n    <value>Вы установили таймер самоуничтожения сообщений на {0}</value>\n  </data>\n  <data name=\"MessageActionDisableMessageTTL\" xml:space=\"preserve\">\n    <value>{0} выключил таймер самоуничтожения сообщений</value>\n  </data>\n  <data name=\"MessageActionYouDisableMessageTTL\" xml:space=\"preserve\">\n    <value>Вы выключили таймер самоуничтожения сообщений</value>\n  </data>\n  <data name=\"PleaseWait\" xml:space=\"preserve\">\n    <value>Пожалуйста, подождите...</value>\n  </data>\n  <data name=\"SecretChatCaption2\" xml:space=\"preserve\">\n    <value>{0} пригласил вас в секретный чат.</value>\n  </data>\n  <data name=\"YouJoinedTheSecretChat\" xml:space=\"preserve\">\n    <value>Вы присоединились к секретному чату.</value>\n  </data>\n  <data name=\"UserJoinedYourSecretChat\" xml:space=\"preserve\">\n    <value>{0} присоединился к вашему секретному чату.</value>\n  </data>\n  <data name=\"AddContact\" xml:space=\"preserve\">\n    <value>Добавить контакт</value>\n  </data>\n  <data name=\"DeleteContact\" xml:space=\"preserve\">\n    <value>Удалить контакт</value>\n  </data>\n  <data name=\"ConfirmDeleteContact\" xml:space=\"preserve\">\n    <value>Удалить контакт?</value>\n  </data>\n  <data name=\"RegistrationProblemDescription\" xml:space=\"preserve\">\n    <value>Если у Вас возникли проблемы с регистрацией или входом в аккаунт, пожалуйста, свяжитесь с нами по почте </value>\n  </data>\n  <data name=\"RegistrationProblemEmail\" xml:space=\"preserve\">\n    <value>sms@telegram.org</value>\n  </data>\n  <data name=\"ChooseYourCountry\" xml:space=\"preserve\">\n    <value>Выберите вашу страну</value>\n  </data>\n  <data name=\"AskAVolunteer\" xml:space=\"preserve\">\n    <value>Спросить волонтера</value>\n  </data>\n  <data name=\"PinToStart\" xml:space=\"preserve\">\n    <value>Закрепить в Пуск</value>\n  </data>\n  <data name=\"TerminateAllSessions\" xml:space=\"preserve\">\n    <value>Завершить все остальные сессии</value>\n  </data>\n  <data name=\"TerminateAllSessionsConfirmation\" xml:space=\"preserve\">\n    <value>Вы действительно хотите завершить все остальные сессии?</value>\n  </data>\n  <data name=\"SlideToCancel\" xml:space=\"preserve\">\n    <value>Отмена</value>\n  </data>\n  <data name=\"Terminate\" xml:space=\"preserve\">\n    <value>Завершить</value>\n  </data>\n  <data name=\"TapAndHoldToRecord\" xml:space=\"preserve\">\n    <value>Нажмите и удерживайте для записи</value>\n  </data>\n  <data name=\"NewBroadcastList\" xml:space=\"preserve\">\n    <value>Список рассылки</value>\n  </data>\n  <data name=\"AddUserToTheGroup\" xml:space=\"preserve\">\n    <value>Добавить пользователя {0} в группу {1}?</value>\n  </data>\n  <data name=\"NumberOfForwardingMessages\" xml:space=\"preserve\">\n    <value>Количество последних сообщений для пересылки:</value>\n  </data>\n  <data name=\"AddToContacts\" xml:space=\"preserve\">\n    <value>Добавить в контакты</value>\n  </data>\n  <data name=\"ShareMyContactInfo\" xml:space=\"preserve\">\n    <value>Поделиться своей контактной информацией</value>\n  </data>\n  <data name=\"Cache\" xml:space=\"preserve\">\n    <value>Кеш</value>\n  </data>\n  <data name=\"ClearCache\" xml:space=\"preserve\">\n    <value>Очистить кеш</value>\n  </data>\n  <data name=\"ManagingLocalCache\" xml:space=\"preserve\">\n    <value>Управление локальным кешем</value>\n  </data>\n  <data name=\"Calculating\" xml:space=\"preserve\">\n    <value>Вычисление</value>\n  </data>\n  <data name=\"SaveFileMessage\" xml:space=\"preserve\">\n    <value>Файл успешно сохранен </value>\n  </data>\n  <data name=\"SocialNetworks\" xml:space=\"preserve\">\n    <value>Социальные сети</value>\n  </data>\n  <data name=\"Sms\" xml:space=\"preserve\">\n    <value>Sms</value>\n  </data>\n  <data name=\"Email\" xml:space=\"preserve\">\n    <value>Email</value>\n  </data>\n  <data name=\"Set\" xml:space=\"preserve\">\n    <value>Установить</value>\n  </data>\n  <data name=\"SearchAmongYourContacts\" xml:space=\"preserve\">\n    <value>Ищите среди ваших контактов</value>\n  </data>\n  <data name=\"Connecting\" xml:space=\"preserve\">\n    <value>Соединение</value>\n  </data>\n  <data name=\"SetProfilePhoto\" xml:space=\"preserve\">\n    <value>Изменить фото профиля</value>\n  </data>\n  <data name=\"BatterySaverModeAlert\" xml:space=\"preserve\">\n    <value>На вашем устройстве активирован Режим энергосбережения. Вы не сможет получать уведомлений о сообщения в Telegram, пока данный режим активирован. Пожалуйста, выключите Режим энергосбережения.</value>\n  </data>\n  <data name=\"Warning\" xml:space=\"preserve\">\n    <value>Внимание</value>\n  </data>\n  <data name=\"NoInternetConnection\" xml:space=\"preserve\">\n    <value>Нет подключения к интернету</value>\n  </data>\n  <data name=\"Updating\" xml:space=\"preserve\">\n    <value>Обновление</value>\n  </data>\n  <data name=\"SetUsername\" xml:space=\"preserve\">\n    <value>Изменить имя пользователя</value>\n  </data>\n  <data name=\"Username\" xml:space=\"preserve\">\n    <value>Имя пользователя</value>\n  </data>\n  <data name=\"ServerError\" xml:space=\"preserve\">\n    <value>Ошибка сервера</value>\n  </data>\n  <data name=\"ServerErrorMessage\" xml:space=\"preserve\">\n    <value>Внутренняя ошибка сервера. Попробуйте повторить позже.</value>\n  </data>\n  <data name=\"UsernameDescription\" xml:space=\"preserve\">\n    <value>Вы можете выбрать себе имя пользователя в Telegram. Когда вы сделаете это, другие люди смогут находить вас с его помощью и связываться с вами, не зная номера вашего телефона.\n\n\nИмя пользователя может содержать только латинские буквы (a-z), цифры (0-9) и символы подчёркивания. Минимальная допустимая длина имени — 5 символов.</value>\n  </data>\n  <data name=\"UsernameOccupied\" xml:space=\"preserve\">\n    <value>К сожалению, это имя уже занято.</value>\n  </data>\n  <data name=\"UsernameInvalid\" xml:space=\"preserve\">\n    <value>Выбранное имя некорректно.</value>\n  </data>\n  <data name=\"WaitingForNetwork\" xml:space=\"preserve\">\n    <value>Ожидание сети</value>\n  </data>\n  <data name=\"GlobalSearch\" xml:space=\"preserve\">\n    <value>Глобальный поиск</value>\n  </data>\n  <data name=\"UsernameShort\" xml:space=\"preserve\">\n    <value>Имя пользователя должно содержать минимум 5 символов.</value>\n  </data>\n  <data name=\"UsernameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Извините, имя пользователя не может начинаться с цифры.</value>\n  </data>\n  <data name=\"SelectChat\" xml:space=\"preserve\">\n    <value>Выберите чат</value>\n  </data>\n  <data name=\"MaximumFileSizeExceeded\" xml:space=\"preserve\">\n    <value>Максимальный размер файла превышен. Вы можете отправлять файлы до {0}.</value>\n  </data>\n  <data name=\"UnableToAccessDocument\" xml:space=\"preserve\">\n    <value>Невозможно открыть документ. Пожалуйста, выберите другой файл для загрузки.</value>\n  </data>\n  <data name=\"Camcorder\" xml:space=\"preserve\">\n    <value>Видеокамера</value>\n  </data>\n  <data name=\"CompressVideo\" xml:space=\"preserve\">\n    <value>Сжать видео</value>\n  </data>\n  <data name=\"EditedVideo\" xml:space=\"preserve\">\n    <value>Отредактированное видео</value>\n  </data>\n  <data name=\"EditVideo\" xml:space=\"preserve\">\n    <value>Редактировать видео</value>\n  </data>\n  <data name=\"OriginalVideo\" xml:space=\"preserve\">\n    <value>Оригинальное видео</value>\n  </data>\n  <data name=\"AccountSelfDestrucsDescription\" xml:space=\"preserve\">\n    <value>Если вы ни разу не появитесь в сети в течение этого времени, аккаунт будет удалён вместе со всеми группами, сообщениями и контактами.</value>\n  </data>\n  <data name=\"AccountSelfDestructs\" xml:space=\"preserve\">\n    <value>Самоуничтожение аккаунта</value>\n  </data>\n  <data name=\"AddExceptions\" xml:space=\"preserve\">\n    <value>Добавить исключения</value>\n  </data>\n  <data name=\"AlwaysShare\" xml:space=\"preserve\">\n    <value>Всегда делиться</value>\n  </data>\n  <data name=\"AlwaysShareWirhUsers\" xml:space=\"preserve\">\n    <value>Всегда делиться с...</value>\n  </data>\n  <data name=\"AlwaysShareWith\" xml:space=\"preserve\">\n    <value>Всегда делиться с</value>\n  </data>\n  <data name=\"CodecWasNotFound\" xml:space=\"preserve\">\n    <value>Кодек не найден</value>\n  </data>\n  <data name=\"Everybody\" xml:space=\"preserve\">\n    <value>Все</value>\n  </data>\n  <data name=\"IfYouAreAwayFor\" xml:space=\"preserve\">\n    <value>Если вас не было</value>\n  </data>\n  <data name=\"LastSeenDescription\" xml:space=\"preserve\">\n    <value>Кто может видеть время Вашего последнего посещения?</value>\n  </data>\n  <data name=\"LastSeenImportantNote\" xml:space=\"preserve\">\n    <value>Важно: вы не сможете увидеть время последней активности людей, с которыми вы не поделились своим временем последней активности. Вместо этого будет отображаться приблизительное время (недавно, в течение недели, в течение месяца).</value>\n  </data>\n  <data name=\"LastSeenLongTimeAgo\" xml:space=\"preserve\">\n    <value>был(а) в сети очень давно</value>\n  </data>\n  <data name=\"LastSeenRecently\" xml:space=\"preserve\">\n    <value>был(а) в сети недавно</value>\n  </data>\n  <data name=\"LastSeenWithinMonth\" xml:space=\"preserve\">\n    <value>был(а) в сети в течение месяца</value>\n  </data>\n  <data name=\"LastSeenWithinWeek\" xml:space=\"preserve\">\n    <value>был(а) в сети в течение недели</value>\n  </data>\n  <data name=\"MyContacts\" xml:space=\"preserve\">\n    <value>Мои контакты</value>\n  </data>\n  <data name=\"NeverShare\" xml:space=\"preserve\">\n    <value>Никогда не делиться</value>\n  </data>\n  <data name=\"NeverShareWith\" xml:space=\"preserve\">\n    <value>Никогда не делиться с</value>\n  </data>\n  <data name=\"NeverShareWithUsers\" xml:space=\"preserve\">\n    <value>Никогда не делиться с...</value>\n  </data>\n  <data name=\"Nobody\" xml:space=\"preserve\">\n    <value>Никто</value>\n  </data>\n  <data name=\"PrivacyAndSecurity\" xml:space=\"preserve\">\n    <value>Настройки безопасности</value>\n  </data>\n  <data name=\"PrivacySettingsError\" xml:space=\"preserve\">\n    <value>Извините, слишком много запросов. Невозможно изменить настройки безопасности прямо сейчас, пожалуйста подождите.</value>\n  </data>\n  <data name=\"ProfileIsInvalid\" xml:space=\"preserve\">\n    <value>Профиль кодирования видео является недопустимым</value>\n  </data>\n  <data name=\"SettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Эти настройки переопределят значения выше.</value>\n  </data>\n  <data name=\"UnknownFailure\" xml:space=\"preserve\">\n    <value>Неизвестная ошибка</value>\n  </data>\n  <data name=\"LastSeenShort\" xml:space=\"preserve\">\n    <value>Последняя активность</value>\n  </data>\n  <data name=\"PrivacySecuritySubtitle\" xml:space=\"preserve\">\n    <value>Черный список, статус, сессии </value>\n  </data>\n  <data name=\"MonthGenitivePlural\" xml:space=\"preserve\">\n    <value>Месяцев</value>\n  </data>\n  <data name=\"MonthGenitiveSingular\" xml:space=\"preserve\">\n    <value>Месяца</value>\n  </data>\n  <data name=\"MonthNominativePlural\" xml:space=\"preserve\">\n    <value>Месяцы</value>\n  </data>\n  <data name=\"MonthNominativeSingular\" xml:space=\"preserve\">\n    <value>Месяц</value>\n  </data>\n  <data name=\"YearGenitivePlural\" xml:space=\"preserve\">\n    <value>Годов</value>\n  </data>\n  <data name=\"YearGenitiveSingular\" xml:space=\"preserve\">\n    <value>Года</value>\n  </data>\n  <data name=\"YearNominativePlural\" xml:space=\"preserve\">\n    <value>Годы</value>\n  </data>\n  <data name=\"YearNominativeSingular\" xml:space=\"preserve\">\n    <value>Год</value>\n  </data>\n  <data name=\"LastSeenDescription2\" xml:space=\"preserve\">\n    <value>Кто может видеть время Вашего последнего посещения?</value>\n  </data>\n  <data name=\"CheckingUsername\" xml:space=\"preserve\">\n    <value>Проверка имени пользователя…</value>\n  </data>\n  <data name=\"CantFindContactWithUsername\" xml:space=\"preserve\">\n    <value>Извините, пользователь Telegram c ником @{0} не найден.</value>\n  </data>\n  <data name=\"Compressing\" xml:space=\"preserve\">\n    <value>Сжатие</value>\n  </data>\n  <data name=\"PeopleHubIntegration\" xml:space=\"preserve\">\n    <value>Синхронизировать с хабом Люди</value>\n  </data>\n  <data name=\"SyncContactsProgress\" xml:space=\"preserve\">\n    <value>Синхронизированы ({0} контактов из {1})...</value>\n  </data>\n  <data name=\"DeletingContacts\" xml:space=\"preserve\">\n    <value>Удаление контактов...</value>\n  </data>\n  <data name=\"ChangeNumber\" xml:space=\"preserve\">\n    <value>Смена номера</value>\n  </data>\n  <data name=\"ConfirmNewNumberMessage\" xml:space=\"preserve\">\n    <value>Мы отправим SMS с кодом подтверждения на ваш новый номер.</value>\n  </data>\n  <data name=\"NewNumber\" xml:space=\"preserve\">\n    <value>Новый номер</value>\n  </data>\n  <data name=\"NewNumberConfirmation\" xml:space=\"preserve\">\n    <value>Всем вашим контактам Telegram ваш новый номер будет автоматически добавлен в адресную книгу, при условии, что у них был ваш старый номер и вы не блокировали их в Telegram.</value>\n  </data>\n  <data name=\"NewNumberDescription\" xml:space=\"preserve\">\n    <value>Здесь вы можете сменить ваш номер Telegram. Ваш аккаунт и все ваши данные (сообщения, медиа, контакты и т. д.) будут перенесены на новый номер.\n\nВажно: всем вашим контактам Telegram ваш новый номер будет автоматически добавлен в адресную книгу, при условии, что у них был ваш старый номер и вы не блокировали их в Telegram.</value>\n  </data>\n  <data name=\"NewNumberTaken\" xml:space=\"preserve\">\n    <value>Номер {0} уже привязан к аккаунту Telegram. Пожалуйста, удалите этот аккаунт, прежде чем перейти на новый номер.</value>\n  </data>\n  <data name=\"MessageActionScreenshotMessages\" xml:space=\"preserve\">\n    <value>{0} сделал(а) скриншот!</value>\n  </data>\n  <data name=\"MessageActionYouScreenshotMessages\" xml:space=\"preserve\">\n    <value>Вы сделали скриншот!</value>\n  </data>\n  <data name=\"DayGenitivePlural\" xml:space=\"preserve\">\n    <value>Дней</value>\n  </data>\n  <data name=\"DayGenitiveSingular\" xml:space=\"preserve\">\n    <value>Дня</value>\n  </data>\n  <data name=\"DayNominativePlural\" xml:space=\"preserve\">\n    <value>Дни</value>\n  </data>\n  <data name=\"DayNominativeSingular\" xml:space=\"preserve\">\n    <value>День</value>\n  </data>\n  <data name=\"HourGenitivePlural\" xml:space=\"preserve\">\n    <value>Часов</value>\n  </data>\n  <data name=\"HourGenitiveSingular\" xml:space=\"preserve\">\n    <value>Часа</value>\n  </data>\n  <data name=\"HourNominativePlural\" xml:space=\"preserve\">\n    <value>Часы</value>\n  </data>\n  <data name=\"HourNominativeSingular\" xml:space=\"preserve\">\n    <value>Час</value>\n  </data>\n  <data name=\"MinuteNominativePlural\" xml:space=\"preserve\">\n    <value>Минуты</value>\n  </data>\n  <data name=\"MinuteNominativeSingular\" xml:space=\"preserve\">\n    <value>Минута</value>\n  </data>\n  <data name=\"SecondGenitivePlural\" xml:space=\"preserve\">\n    <value>Секунд</value>\n  </data>\n  <data name=\"SecondGenitiveSingular\" xml:space=\"preserve\">\n    <value>Секунды</value>\n  </data>\n  <data name=\"SecondNominativePlural\" xml:space=\"preserve\">\n    <value>Секунды</value>\n  </data>\n  <data name=\"SecondNominativeSingular\" xml:space=\"preserve\">\n    <value>Секунда</value>\n  </data>\n  <data name=\"WeekGenitivePlural\" xml:space=\"preserve\">\n    <value>Недель</value>\n  </data>\n  <data name=\"WeekGenitiveSingular\" xml:space=\"preserve\">\n    <value>Недели</value>\n  </data>\n  <data name=\"WeekNominativePlural\" xml:space=\"preserve\">\n    <value>Недели</value>\n  </data>\n  <data name=\"WeekNominativeSingular\" xml:space=\"preserve\">\n    <value>Неделя</value>\n  </data>\n  <data name=\"TapAndHoldToView\" xml:space=\"preserve\">\n    <value>Нажмите и удерживайте для просмотра</value>\n  </data>\n  <data name=\"Sticker\" xml:space=\"preserve\">\n    <value>Стикер</value>\n  </data>\n  <data name=\"Files\" xml:space=\"preserve\">\n    <value>Файлы</value>\n  </data>\n  <data name=\"NoFilesHere\" xml:space=\"preserve\">\n    <value>Файлов пока нет</value>\n  </data>\n  <data name=\"ShareFiles\" xml:space=\"preserve\">\n    <value>Вы можете отправлять и получать файлы любого типа до 1,5 Гб каждый и обращаться к ним отовсюду.</value>\n  </data>\n  <data name=\"SharePhotosAndVideos\" xml:space=\"preserve\">\n    <value>Этой скрепке очень грустно, ведь в этот чат ещё никто не отправлял фотографии или видео.</value>\n  </data>\n  <data name=\"Disabled\" xml:space=\"preserve\">\n    <value>Выкл.</value>\n  </data>\n  <data name=\"Enabled\" xml:space=\"preserve\">\n    <value>Вкл.</value>\n  </data>\n  <data name=\"MuteFor\" xml:space=\"preserve\">\n    <value>Отключить на {0}</value>\n  </data>\n  <data name=\"UnmuteIn\" xml:space=\"preserve\">\n    <value>Через {0}</value>\n  </data>\n  <data name=\"More\" xml:space=\"preserve\">\n    <value>Ещё</value>\n  </data>\n  <data name=\"SearchAmongYourChats\" xml:space=\"preserve\">\n    <value>Ищите среди ваших бесед</value>\n  </data>\n  <data name=\"SearchAmongYourFiles\" xml:space=\"preserve\">\n    <value>Ищите среди файлов</value>\n  </data>\n  <data name=\"NewAuthorization\" xml:space=\"preserve\">\n    <value>{0},\nмы обнаружили вход с вашего аккаунта на новом устройстве. \n\nДата: {1}, {2}, {3}\nУстройство: {4}\nМестоположение: {5}\n\nЕсли это были не вы, зайдите в Настройки &gt; Безопасность &gt;  Завершить все другие сеансы. \n\nИскренне ваша,\nКоманда Телеграма</value>\n  </data>\n  <data name=\"Link\" xml:space=\"preserve\">\n    <value>Ссылка</value>\n  </data>\n  <data name=\"ContactRegistered\" xml:space=\"preserve\">\n    <value>{0} теперь в Телеграме!</value>\n  </data>\n  <data name=\"UnreadMessages\" xml:space=\"preserve\">\n    <value>Непрочитанные сообщения</value>\n  </data>\n  <data name=\"ChangePasscode\" xml:space=\"preserve\">\n    <value>Сменить код доступа</value>\n  </data>\n  <data name=\"ChangePasscodeHint\" xml:space=\"preserve\">\n    <value>После установки кода-пароля в списке чатов появится иконка замка для блокировки и разблокировки приложения.\n\nВажно: если вы забудете код доступа, вам придётся переустановить приложение, и все секретные чаты будут утеряны.</value>\n  </data>\n  <data name=\"ConfirmPasscode\" xml:space=\"preserve\">\n    <value>Подтвердить код доступа</value>\n  </data>\n  <data name=\"EnterPasscode\" xml:space=\"preserve\">\n    <value>Введите код доступа</value>\n  </data>\n  <data name=\"Passcode\" xml:space=\"preserve\">\n    <value>Код доступа</value>\n  </data>\n  <data name=\"SimplePasscode\" xml:space=\"preserve\">\n    <value>Простой код доступа</value>\n  </data>\n  <data name=\"SimplePasscodeHint\" xml:space=\"preserve\">\n    <value>Простой код доступа — 4-значное число.</value>\n  </data>\n  <data name=\"YourPasscode\" xml:space=\"preserve\">\n    <value>Новый код доступа</value>\n  </data>\n  <data name=\"EnterYourCurrentPasscode\" xml:space=\"preserve\">\n    <value>Введите текущий код доступа</value>\n  </data>\n  <data name=\"PasscodeType\" xml:space=\"preserve\">\n    <value>Тип кода доступа</value>\n  </data>\n  <data name=\"Pin\" xml:space=\"preserve\">\n    <value>ПИН-код</value>\n  </data>\n  <data name=\"Privacy\" xml:space=\"preserve\">\n    <value>Приватность</value>\n  </data>\n  <data name=\"Security\" xml:space=\"preserve\">\n    <value>Безопасность</value>\n  </data>\n  <data name=\"YouHaveNewMessage\" xml:space=\"preserve\">\n    <value>У вас новое сообщение</value>\n  </data>\n  <data name=\"PasscodeAutolockHint\" xml:space=\"preserve\">\n    <value>Запрашивать код доступа, если какое-то время не было активности.</value>\n  </data>\n  <data name=\"PasscodeAutolockIn\" xml:space=\"preserve\">\n    <value>Через {0}</value>\n  </data>\n  <data name=\"Autolock\" xml:space=\"preserve\">\n    <value>Автоблокировка</value>\n  </data>\n  <data name=\"AutolockDisabled\" xml:space=\"preserve\">\n    <value>Выкл.</value>\n  </data>\n  <data name=\"IncorrectPasscode\" xml:space=\"preserve\">\n    <value>Неверный код доступа</value>\n  </data>\n  <data name=\"Reply\" xml:space=\"preserve\">\n    <value>Ответить</value>\n  </data>\n  <data name=\"AndOthers\" xml:space=\"preserve\">\n    <value>и {0} других</value>\n  </data>\n  <data name=\"ForwardedAudioGenitivePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых аудио</value>\n  </data>\n  <data name=\"ForwardedAudioGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пересылаемых аудио</value>\n  </data>\n  <data name=\"ForwardedAudioNominativePlural\" xml:space=\"preserve\">\n    <value>Пересылаемые аудио</value>\n  </data>\n  <data name=\"ForwardedAudioNominativeSingular\" xml:space=\"preserve\">\n    <value>Пересылаемое аудио</value>\n  </data>\n  <data name=\"ForwardedContactGenitivePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых контактов</value>\n  </data>\n  <data name=\"ForwardedContactGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пересылаемых контакта</value>\n  </data>\n  <data name=\"ForwardedContactNominativePlural\" xml:space=\"preserve\">\n    <value>Пересылаемые контакты</value>\n  </data>\n  <data name=\"ForwardedContactNominativeSingular\" xml:space=\"preserve\">\n    <value>Пересылаемый контакт</value>\n  </data>\n  <data name=\"ForwardedFileGenitivePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых файлов</value>\n  </data>\n  <data name=\"ForwardedFileGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пересылаемых файла</value>\n  </data>\n  <data name=\"ForwardedFileNominativePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых файла</value>\n  </data>\n  <data name=\"ForwardedFileNominativeSingular\" xml:space=\"preserve\">\n    <value>Пересылаемый файл</value>\n  </data>\n  <data name=\"ForwardedLocationGenitivePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых карт</value>\n  </data>\n  <data name=\"ForwardedLocationGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пересылаемых карты</value>\n  </data>\n  <data name=\"ForwardedLocationNominativePlural\" xml:space=\"preserve\">\n    <value>Пересылаемые карты</value>\n  </data>\n  <data name=\"ForwardedLocationNominativeSingular\" xml:space=\"preserve\">\n    <value>Пересылаемая карта</value>\n  </data>\n  <data name=\"ForwardedMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых сообщений</value>\n  </data>\n  <data name=\"ForwardedMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пересылаемых сообщения</value>\n  </data>\n  <data name=\"ForwardedMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Пересылаемые сообщения</value>\n  </data>\n  <data name=\"ForwardedMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Пересылаемое сообщение</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых фото</value>\n  </data>\n  <data name=\"ForwardedPhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пересылаемых фото</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Пересылаемые фото</value>\n  </data>\n  <data name=\"ForwardedPhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Пересылаемое фото</value>\n  </data>\n  <data name=\"ForwardedStickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых стикеров</value>\n  </data>\n  <data name=\"ForwardedStickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пересылаемых стикера</value>\n  </data>\n  <data name=\"ForwardedStickerNominativePlural\" xml:space=\"preserve\">\n    <value>Пересылаемые стикеры</value>\n  </data>\n  <data name=\"ForwardedStickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Пересылаемый стикер</value>\n  </data>\n  <data name=\"ForwardedVideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых видео</value>\n  </data>\n  <data name=\"ForwardedVideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пересылаемых видео</value>\n  </data>\n  <data name=\"ForwardedVideoNominativePlural\" xml:space=\"preserve\">\n    <value>Пересылаемые видео</value>\n  </data>\n  <data name=\"ForwardedVideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Пересылаемое видео</value>\n  </data>\n  <data name=\"SearchMessages\" xml:space=\"preserve\">\n    <value>Поиск по сообщениям</value>\n  </data>\n  <data name=\"Unsupported\" xml:space=\"preserve\">\n    <value>Не поддерживается</value>\n  </data>\n  <data name=\"EnterYourCurrentPassword\" xml:space=\"preserve\">\n    <value>Введите текущий пароль</value>\n  </data>\n  <data name=\"Password\" xml:space=\"preserve\">\n    <value>Пароль</value>\n  </data>\n  <data name=\"PasswordInvalidString\" xml:space=\"preserve\">\n    <value>Неверный пароль. Попробуйте ещё раз.</value>\n  </data>\n  <data name=\"AlmostThere\" xml:space=\"preserve\">\n    <value>Почти готово!</value>\n  </data>\n  <data name=\"ChangePassword\" xml:space=\"preserve\">\n    <value>Сменить пароль</value>\n  </data>\n  <data name=\"ChangePasswordHint\" xml:space=\"preserve\">\n    <value>Вы можете установить пароль, который будет использоваться для входа с новых устройств в дополнение к проверочному кода из SMS.</value>\n  </data>\n  <data name=\"ChangeRecoveryEmail\" xml:space=\"preserve\">\n    <value>Сменить адрес электронной почты</value>\n  </data>\n  <data name=\"CompletePasswordHint\" xml:space=\"preserve\">\n    <value>Пожалуйста, проверь вашу электронную почту (не забудьте о папке со спамом) для завершения настройки двухэтапной аутентификации.</value>\n  </data>\n  <data name=\"ConfirmPassword\" xml:space=\"preserve\">\n    <value>Ещё раз введите пароль</value>\n  </data>\n  <data name=\"EnterPassword\" xml:space=\"preserve\">\n    <value>Введите пароль</value>\n  </data>\n  <data name=\"EnterRecoveryEmail\" xml:space=\"preserve\">\n    <value>Введите адрес электронной почты</value>\n  </data>\n  <data name=\"EnterRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>Пожалуйста, укажите верный адрес вашей электронной почты. Это единственный способ восстановить забытый пароль.</value>\n  </data>\n  <data name=\"RecoveryEmail\" xml:space=\"preserve\">\n    <value>Резервный email</value>\n  </data>\n  <data name=\"SetRecoveryEmail\" xml:space=\"preserve\">\n    <value>Задать адрес электронной почты</value>\n  </data>\n  <data name=\"Skip\" xml:space=\"preserve\">\n    <value>Пропустить</value>\n  </data>\n  <data name=\"SkipRecoveryEmailHint\" xml:space=\"preserve\">\n    <value>Внимание!\n\nЕсли вы забудете пароль, Вы навсегда потеряете доступ к Вашему аккаунту в Телеграме без возможности восстановления.</value>\n  </data>\n  <data name=\"TwoStepVerification\" xml:space=\"preserve\">\n    <value>Двухэтапная аутентификация</value>\n  </data>\n  <data name=\"YourPassword\" xml:space=\"preserve\">\n    <value>Ваш пароль</value>\n  </data>\n  <data name=\"CurrentSession\" xml:space=\"preserve\">\n    <value>Текущий сеанс</value>\n  </data>\n  <data name=\"OtherSessions\" xml:space=\"preserve\">\n    <value>Другие сеансы</value>\n  </data>\n  <data name=\"OfficialApp\" xml:space=\"preserve\">\n    <value>Официальное приложение</value>\n  </data>\n  <data name=\"Sessions\" xml:space=\"preserve\">\n    <value>Активные сессии</value>\n  </data>\n  <data name=\"TerminateAllOtherSessionsNote\" xml:space=\"preserve\">\n    <value>Выйти на всех устройствах, кроме этого.</value>\n  </data>\n  <data name=\"UnofficialApp\" xml:space=\"preserve\">\n    <value>Неофициальное приложение</value>\n  </data>\n  <data name=\"EmailInvalid\" xml:space=\"preserve\">\n    <value>Неверный адрес электронной почты</value>\n  </data>\n  <data name=\"PasswordActive\" xml:space=\"preserve\">\n    <value>Ваш пароль для двухэтапной аутентификации активен.</value>\n  </data>\n  <data name=\"Success\" xml:space=\"preserve\">\n    <value>Готово!</value>\n  </data>\n  <data name=\"RecoveryEmailPending\" xml:space=\"preserve\">\n    <value>Ваш адрес электронной почты для восстановления {0} ещё не активирован и ожидает подтверждения.</value>\n  </data>\n  <data name=\"AbortTwoStepVerificationSetup\" xml:space=\"preserve\">\n    <value>Отменить двухфакторную аутентификацию</value>\n  </data>\n  <data name=\"StepsToCompleteToTwoStepsVerificationSetup\" xml:space=\"preserve\">\n    <value>Пожалуйста, выполните эти шаги для завершения настройки двухэтапной аутентификации\n\n1. Проверьте вашу электронную почту (не забудьте о папке со спамом): {0}\n\n2. Перейдите по ссылке для подтверждения.</value>\n  </data>\n  <data name=\"Hint\" xml:space=\"preserve\">\n    <value>Подсказка</value>\n  </data>\n  <data name=\"PasswordHint\" xml:space=\"preserve\">\n    <value>Подсказка</value>\n  </data>\n  <data name=\"PasswordHintLabel\" xml:space=\"preserve\">\n    <value>Придумайте подсказку для пароля</value>\n  </data>\n  <data name=\"ForgotPassword\" xml:space=\"preserve\">\n    <value>Забыли пароль?</value>\n  </data>\n  <data name=\"PasswordHintError\" xml:space=\"preserve\">\n    <value>Подсказка должна отличаться от пароля</value>\n  </data>\n  <data name=\"EnterPasswordHint\" xml:space=\"preserve\">\n    <value>Введите подсказку для пароля</value>\n  </data>\n  <data name=\"HavingTroubleAccessingEmailMessage\" xml:space=\"preserve\">\n    <value>Проблема с доступом к электронной почте {0}?</value>\n  </data>\n  <data name=\"NoAccessRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Если вы не можете восстановить доступ к вашей электронной почте, то оставшиеся варианты — вспомнить пароль или сбросить аккаунт.</value>\n  </data>\n  <data name=\"NoRecoveryEmailMessage\" xml:space=\"preserve\">\n    <value>Так как вы не указали адрес электронной почты для восстановления пароля, то оставшиеся варианты — вспомнить пароль или сбросить аккаунт.</value>\n  </data>\n  <data name=\"PasswordDeactivated\" xml:space=\"preserve\">\n    <value>Пароль отключён</value>\n  </data>\n  <data name=\"PasswordMessage\" xml:space=\"preserve\">\n    <value>Включена двухэтапная аутентификация, ваш аккаунт защищён дополнительным паролем.</value>\n  </data>\n  <data name=\"PasswordRecovery\" xml:space=\"preserve\">\n    <value>Восстановление пароля</value>\n  </data>\n  <data name=\"PasswordRecoveryHint\" xml:space=\"preserve\">\n    <value>Проверьте свою электронную почту и введите шестизначный код, который мы отправили вам.</value>\n  </data>\n  <data name=\"SentRecoveryCodeMessage\" xml:space=\"preserve\">\n    <value>Мы отправили код восстановления на указанную почту: {0}</value>\n  </data>\n  <data name=\"Sorry\" xml:space=\"preserve\">\n    <value>Извините</value>\n  </data>\n  <data name=\"RecoveryEmailComplete\" xml:space=\"preserve\">\n    <value>Вы включили двухэтапную аутентификацию.\nДля входа в свой аккаунт Telegram вам нужно будет вводить установленный здесь пароль.</value>\n  </data>\n  <data name=\"TerminateSessionHint\" xml:space=\"preserve\">\n    <value>Нажмите на сеанс для завершения.</value>\n  </data>\n  <data name=\"GettingLinkInfo\" xml:space=\"preserve\">\n    <value>Получение информации о ссылке...</value>\n  </data>\n  <data name=\"ResetMyAccount\" xml:space=\"preserve\">\n    <value>Сбросить аккаунт</value>\n  </data>\n  <data name=\"ResetMyAccountConfirmation\" xml:space=\"preserve\">\n    <value>Это действие невозможно отменить.\n\nЕсли вы сбросите аккаунт, все ваши сообщения и чаты будут удалены.</value>\n  </data>\n  <data name=\"ResetMyAccountHint\" xml:space=\"preserve\">\n    <value>Вы потеряете все свои чаты и сообщения, а также все отправленные вами файлы, если вы выполните сброс аккаунта.</value>\n  </data>\n  <data name=\"IsRecordingAudio\" xml:space=\"preserve\">\n    <value>записывает аудио</value>\n  </data>\n  <data name=\"IsSendingFile\" xml:space=\"preserve\">\n    <value>отправляет файл</value>\n  </data>\n  <data name=\"IsSendingPhoto\" xml:space=\"preserve\">\n    <value>отправляет фото</value>\n  </data>\n  <data name=\"IsSendingVideo\" xml:space=\"preserve\">\n    <value>отправляет видео</value>\n  </data>\n  <data name=\"RecordingAudio\" xml:space=\"preserve\">\n    <value>записывает аудио</value>\n  </data>\n  <data name=\"SendingFile\" xml:space=\"preserve\">\n    <value>отправляет файл</value>\n  </data>\n  <data name=\"SendingPhoto\" xml:space=\"preserve\">\n    <value>отправляет фото</value>\n  </data>\n  <data name=\"SendingVideo\" xml:space=\"preserve\">\n    <value>отправляет видео</value>\n  </data>\n  <data name=\"AddCaption\" xml:space=\"preserve\">\n    <value>Добавить подпись...</value>\n  </data>\n  <data name=\"CopyLink\" xml:space=\"preserve\">\n    <value>Копировать ссылку</value>\n  </data>\n  <data name=\"CopyLinkHint\" xml:space=\"preserve\">\n    <value>Ссылка скопирована в буфер обмена.</value>\n  </data>\n  <data name=\"GroupFullError\" xml:space=\"preserve\">\n    <value>К сожалению, эта группа переполнена.</value>\n  </data>\n  <data name=\"GroupNotExistsError\" xml:space=\"preserve\">\n    <value>Похоже, такого чата не существует.</value>\n  </data>\n  <data name=\"InviteGroupViaLink\" xml:space=\"preserve\">\n    <value>Пригласить в группу по ссылке</value>\n  </data>\n  <data name=\"InviteLink\" xml:space=\"preserve\">\n    <value>Ссылка-приглашение</value>\n  </data>\n  <data name=\"InviteLinkHint\" xml:space=\"preserve\">\n    <value>Любой пользователь Telegram сможет вступить в вашу группу по этой ссылке.</value>\n  </data>\n  <data name=\"JoinGroupConfirmation\" xml:space=\"preserve\">\n    <value>Вы точно хотите вступить в группу «{0}»?</value>\n  </data>\n  <data name=\"MessageActionChatJoinedByLink\" xml:space=\"preserve\">\n    <value>{0} вступил(а) в группу при помощи ссылки-приглашения</value>\n  </data>\n  <data name=\"RevokeLink\" xml:space=\"preserve\">\n    <value>Аннулировать ссылку</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation\" xml:space=\"preserve\">\n    <value>Вы точно хотите аннулировать эту ссылку? Больше никто не сможет присоединиться к группе с её помощью.</value>\n  </data>\n  <data name=\"RevokeLinkHint\" xml:space=\"preserve\">\n    <value>Прежняя ссылка-пришлашение не активна. Сгенерирована новая.</value>\n  </data>\n  <data name=\"ShareLink\" xml:space=\"preserve\">\n    <value>Поделиться ссылкой</value>\n  </data>\n  <data name=\"Directions\" xml:space=\"preserve\">\n    <value>Направления</value>\n  </data>\n  <data name=\"NearbyPlaces\" xml:space=\"preserve\">\n    <value>Места поблизости</value>\n  </data>\n  <data name=\"SendThisLocation\" xml:space=\"preserve\">\n    <value>Отправить геопозицию</value>\n  </data>\n  <data name=\"PoweredBy\" xml:space=\"preserve\">\n    <value>Powered by</value>\n  </data>\n  <data name=\"LocationServicesDisabled\" xml:space=\"preserve\">\n    <value>Определение геопозиции отключено.</value>\n  </data>\n  <data name=\"LocationSettings\" xml:space=\"preserve\">\n    <value>Настройки карты</value>\n  </data>\n  <data name=\"Unknown\" xml:space=\"preserve\">\n    <value>Неизвестно</value>\n  </data>\n  <data name=\"AddStickersConfirmation\" xml:space=\"preserve\">\n    <value>Вы действительно хотите добавить стикеры «{0}»?</value>\n  </data>\n  <data name=\"NewStickersAdded\" xml:space=\"preserve\">\n    <value>Добавлены новые стикеры</value>\n  </data>\n  <data name=\"StickersNotFound\" xml:space=\"preserve\">\n    <value>Стикеры не найдены</value>\n  </data>\n  <data name=\"ClearLogs\" xml:space=\"preserve\">\n    <value>Очистить логи</value>\n  </data>\n  <data name=\"Hide\" xml:space=\"preserve\">\n    <value>Скрыть</value>\n  </data>\n  <data name=\"Remove\" xml:space=\"preserve\">\n    <value>Удалить</value>\n  </data>\n  <data name=\"SendLogs\" xml:space=\"preserve\">\n    <value>Отправить логи</value>\n  </data>\n  <data name=\"StickerGenitivePlural\" xml:space=\"preserve\">\n    <value>Стикеров</value>\n  </data>\n  <data name=\"StickerGenitiveSingular\" xml:space=\"preserve\">\n    <value>Стикера</value>\n  </data>\n  <data name=\"StickerNominativePlural\" xml:space=\"preserve\">\n    <value>Стикеры</value>\n  </data>\n  <data name=\"StickerNominativeSingular\" xml:space=\"preserve\">\n    <value>Стикер</value>\n  </data>\n  <data name=\"Stickers\" xml:space=\"preserve\">\n    <value>Стикеры</value>\n  </data>\n  <data name=\"StickersDescription\" xml:space=\"preserve\">\n    <value>Приглашаем художников добавлять свои собственные наборы стикеров с помощью нашего бота @stickers\n\nПользователи могут добавлять себе стикеры, нажимая на них и выбирая «Добавить в Стикеры».</value>\n  </data>\n  <data name=\"LinkCopiedToClipboard\" xml:space=\"preserve\">\n    <value>Ссылка скопирована в буфер обмена.</value>\n  </data>\n  <data name=\"Close\" xml:space=\"preserve\">\n    <value>Закрыть</value>\n  </data>\n  <data name=\"Show\" xml:space=\"preserve\">\n    <value>Показать</value>\n  </data>\n  <data name=\"AddToStickers\" xml:space=\"preserve\">\n    <value>Добавить в стикеры</value>\n  </data>\n  <data name=\"SecretChatRequested\" xml:space=\"preserve\">\n    <value>Обмен ключами шифрования…</value>\n  </data>\n  <data name=\"Bot\" xml:space=\"preserve\">\n    <value>Бот</value>\n  </data>\n  <data name=\"OnlySeesMessagesStartingWithSlash\" xml:space=\"preserve\">\n    <value>не имеет доступа к сообщениям</value>\n  </data>\n  <data name=\"SeesAllMessages\" xml:space=\"preserve\">\n    <value>имеет доступ к сообщениям</value>\n  </data>\n  <data name=\"WhatCanThisBotDo\" xml:space=\"preserve\">\n    <value>Что умеет этот бот?</value>\n  </data>\n  <data name=\"AddBotToGroupsError\" xml:space=\"preserve\">\n    <value>Этот бот не может вступать в группы.</value>\n  </data>\n  <data name=\"AddToGroup\" xml:space=\"preserve\">\n    <value>Добавить в группу</value>\n  </data>\n  <data name=\"BlockContactConfirmation\" xml:space=\"preserve\">\n    <value>Уверены, что хотите заблокировать контакт?</value>\n  </data>\n  <data name=\"Help\" xml:space=\"preserve\">\n    <value>Справка</value>\n  </data>\n  <data name=\"Start\" xml:space=\"preserve\">\n    <value>Начать</value>\n  </data>\n  <data name=\"UnblockContactConfirmation\" xml:space=\"preserve\">\n    <value>Уверены, что хотите разблокировать контакт?</value>\n  </data>\n  <data name=\"SharedLinks\" xml:space=\"preserve\">\n    <value>Ссылки</value>\n  </data>\n  <data name=\"BackgroudnTaskDisabledAlert\" xml:space=\"preserve\">\n    <value>Вы не сможете получать уведомления о новых сообщениях, так как отключили фоновую задачу для Telegram Messenger. Пожалуйста, разрешите приложению работать в фоне.</value>\n  </data>\n  <data name=\"SearchSharedLinks\" xml:space=\"preserve\">\n    <value>Поиск по общим ссылкам</value>\n  </data>\n  <data name=\"SharedFiles\" xml:space=\"preserve\">\n    <value>Файлы</value>\n  </data>\n  <data name=\"ShareLinks\" xml:space=\"preserve\">\n    <value>Делитесь ссылками в этом чате и получайте доступ к ним с любого из ваших устройств.</value>\n  </data>\n  <data name=\"DeleteAndStop\" xml:space=\"preserve\">\n    <value>Удалить и остановить</value>\n  </data>\n  <data name=\"Restart\" xml:space=\"preserve\">\n    <value>Перезапустить</value>\n  </data>\n  <data name=\"RestartBot\" xml:space=\"preserve\">\n    <value>Перезапустить бота</value>\n  </data>\n  <data name=\"StopBot\" xml:space=\"preserve\">\n    <value>Остановить</value>\n  </data>\n  <data name=\"ClearSearchHistoryConfirmation\" xml:space=\"preserve\">\n    <value>Очистить историю поиска?</value>\n  </data>\n  <data name=\"Recent\" xml:space=\"preserve\">\n    <value>Недавние</value>\n  </data>\n  <data name=\"NewChannel\" xml:space=\"preserve\">\n    <value>Новый канал</value>\n  </data>\n  <data name=\"MessageActionBroadcastCreate\" xml:space=\"preserve\">\n    <value>{0} создал(а) группу «{1}»</value>\n  </data>\n  <data name=\"MessageActionChannelCreate\" xml:space=\"preserve\">\n    <value>Канал создан</value>\n  </data>\n  <data name=\"ReportSpam\" xml:space=\"preserve\">\n    <value>Сообщить о спаме</value>\n  </data>\n  <data name=\"ConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Беседа помечена как спам. Вы хотите удалить и заблокировать пользователя?</value>\n  </data>\n  <data name=\"GroupConversationMarkedAsSpamConfirmation\" xml:space=\"preserve\">\n    <value>Беседа помечена как спам. Вы хотите удалить историю и выйти из группы?</value>\n  </data>\n  <data name=\"PeerFloodAddContact\" xml:space=\"preserve\">\n    <value>Извините, в данный момент вы можете добавлять в группы только взаимные контакты.</value>\n  </data>\n  <data name=\"PeerFloodSendMessage\" xml:space=\"preserve\">\n    <value>Извините, в данный момент вы можете отправлять сообщения только взаимным контактам.</value>\n  </data>\n  <data name=\"LeaveChannel\" xml:space=\"preserve\">\n    <value>Покинуть канал</value>\n  </data>\n  <data name=\"AccessLevel\" xml:space=\"preserve\">\n    <value>Уровень доступа</value>\n  </data>\n  <data name=\"AddManager\" xml:space=\"preserve\">\n    <value>Добавить</value>\n  </data>\n  <data name=\"Comments\" xml:space=\"preserve\">\n    <value>Комментарии</value>\n  </data>\n  <data name=\"CommentsDescription\" xml:space=\"preserve\">\n    <value>Если вы включите комментарии, люди смогут обсуждать ваши записи на канале.</value>\n  </data>\n  <data name=\"Creator\" xml:space=\"preserve\">\n    <value>Создатель</value>\n  </data>\n  <data name=\"Management\" xml:space=\"preserve\">\n    <value>Управление</value>\n  </data>\n  <data name=\"Moderator\" xml:space=\"preserve\">\n    <value>Модератор</value>\n  </data>\n  <data name=\"ModeratorDescription\" xml:space=\"preserve\">\n    <value>Может удалять пользовательский контент.</value>\n  </data>\n  <data name=\"Publisher\" xml:space=\"preserve\">\n    <value>Издатель</value>\n  </data>\n  <data name=\"PublisherDescription\" xml:space=\"preserve\">\n    <value>Может публиковать от имени канала, добавлять и удалять пользователей,</value>\n  </data>\n  <data name=\"ChannelName\" xml:space=\"preserve\">\n    <value>Название канала</value>\n  </data>\n  <data name=\"Description\" xml:space=\"preserve\">\n    <value>Описание</value>\n  </data>\n  <data name=\"AboutDescription\" xml:space=\"preserve\">\n    <value>Можно указать дополнительное описание вашего канала.</value>\n  </data>\n  <data name=\"Back\" xml:space=\"preserve\">\n    <value>Назад</value>\n  </data>\n  <data name=\"ChannelType\" xml:space=\"preserve\">\n    <value>Тип канала</value>\n  </data>\n  <data name=\"Private\" xml:space=\"preserve\">\n    <value>Приватная группа</value>\n  </data>\n  <data name=\"PrivateChannelDescription\" xml:space=\"preserve\">\n    <value>К приватным каналам можно присоединиться только по пригласительной ссылке.</value>\n  </data>\n  <data name=\"Public\" xml:space=\"preserve\">\n    <value>Публичная группа</value>\n  </data>\n  <data name=\"PublicChannelDescription\" xml:space=\"preserve\">\n    <value>Публичные каналы могут быть найдены через поиск, любой желающий может присоединиться к ним.</value>\n  </data>\n  <data name=\"PrivateLinkDescription\" xml:space=\"preserve\">\n    <value>По этой ссылке можно подписаться на ваш канал. Вы можете сбросить ссылку в любой момент.</value>\n  </data>\n  <data name=\"PublicLinkDescription\" xml:space=\"preserve\">\n    <value>Люди могут делиться этой ссылкой с другими и находить ваш канал через поиск в Telegram.</value>\n  </data>\n  <data name=\"CommentGenitivePlural\" xml:space=\"preserve\">\n    <value>Комментариев</value>\n  </data>\n  <data name=\"CommentGenitiveSingular\" xml:space=\"preserve\">\n    <value>Комментария</value>\n  </data>\n  <data name=\"CommentNominativePlural\" xml:space=\"preserve\">\n    <value>Комментарии</value>\n  </data>\n  <data name=\"CommentNominativeSingular\" xml:space=\"preserve\">\n    <value>Комментарий</value>\n  </data>\n  <data name=\"Blacklist\" xml:space=\"preserve\">\n    <value>Чёрный список</value>\n  </data>\n  <data name=\"Channel\" xml:space=\"preserve\">\n    <value>Канал</value>\n  </data>\n  <data name=\"ChoosePublicChannelLinkNotification\" xml:space=\"preserve\">\n    <value>Выберите ссылку для вашего публичного канала, чтобы люди могли найти её через поиск и поделиться с другими.\n\nЕсли вы в этом не заинтересованы, предлагаем создать приватный канал.</value>\n  </data>\n  <data name=\"MessageActionChannelEditPhoto\" xml:space=\"preserve\">\n    <value>Фото канала изменено</value>\n  </data>\n  <data name=\"Mute\" xml:space=\"preserve\">\n    <value>Выключить уведомления</value>\n  </data>\n  <data name=\"SetChannelPhoto\" xml:space=\"preserve\">\n    <value>Установить фото канала</value>\n  </data>\n  <data name=\"Unmute\" xml:space=\"preserve\">\n    <value>Включить уведомления</value>\n  </data>\n  <data name=\"WhatIsChannel\" xml:space=\"preserve\">\n    <value>Что такое канал?</value>\n  </data>\n  <data name=\"WhatIsChannelDescription\" xml:space=\"preserve\">\n    <value>Каналы — новый инструмент публикации ваших сообщений большой аудитории.</value>\n  </data>\n  <data name=\"AddEditorConfirmation\" xml:space=\"preserve\">\n    <value>Уверены, что хотите добавить {0} редактором?</value>\n  </data>\n  <data name=\"AddModeratorConfirmation\" xml:space=\"preserve\">\n    <value>Уверены, что хотите добавить {0} модератором?</value>\n  </data>\n  <data name=\"PrivateChannel\" xml:space=\"preserve\">\n    <value>Приватный канал</value>\n  </data>\n  <data name=\"PrivateToPublicChannelNotification\" xml:space=\"preserve\">\n    <value>Пожалуйста, обратите внимание, что если Вы создадите публичную ссылку на ваш канал, любой желающий сможет найти его через поиск и присоединиться к нему.\n\nНе создавайте ссылку, если хотите, чтобы ваш канал оставался приватным.</value>\n  </data>\n  <data name=\"PublicChannel\" xml:space=\"preserve\">\n    <value>Публичный канал</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuch\" xml:space=\"preserve\">\n    <value>К сожалению, вы заняли слишком много публичных имён. Вы можете сбросить одну из старых публичных ссылок или использовать приватную ссылку в этот раз.</value>\n  </data>\n  <data name=\"ChannelsAdminPublicTooMuchShort\" xml:space=\"preserve\">\n    <value>Слишком много публичных каналов.</value>\n  </data>\n  <data name=\"DeleteChannelConfirmation\" xml:space=\"preserve\">\n    <value>Подождите! Удаление этого канала также исключит всех участников и все сообщения будут утрачены. Всё равно удалить?</value>\n  </data>\n  <data name=\"Follow\" xml:space=\"preserve\">\n    <value>Присоединиться</value>\n  </data>\n  <data name=\"Join\" xml:space=\"preserve\">\n    <value>Присоединиться</value>\n  </data>\n  <data name=\"LeaveChannelConfirmation\" xml:space=\"preserve\">\n    <value>Вы уверены, что хотите покинуть канал?</value>\n  </data>\n  <data name=\"JoinChannelConfirmation\" xml:space=\"preserve\">\n    <value>Хотите подписаться на канал «{0}»?</value>\n  </data>\n  <data name=\"Administration\" xml:space=\"preserve\">\n    <value>Администрирование</value>\n  </data>\n  <data name=\"Administrators\" xml:space=\"preserve\">\n    <value>Администраторы</value>\n  </data>\n  <data name=\"DeleteChannel\" xml:space=\"preserve\">\n    <value>Удалить канал</value>\n  </data>\n  <data name=\"MessageActionChannelDeletePhoto\" xml:space=\"preserve\">\n    <value>Фото канала удалено</value>\n  </data>\n  <data name=\"MessageActionChannelEditTitle\" xml:space=\"preserve\">\n    <value>Имя канала изменено на «{0}»</value>\n  </data>\n  <data name=\"SetSharedLink\" xml:space=\"preserve\">\n    <value>Установить общую ссылку</value>\n  </data>\n  <data name=\"AddAdministrator\" xml:space=\"preserve\">\n    <value>Добавить администратора</value>\n  </data>\n  <data name=\"ChannelAdministratorsHint\" xml:space=\"preserve\">\n    <value>Вы можете добавлять администраторов для помощи в управлении каналом. Нажмите и удерживайте, чтобы удалить администраторов.</value>\n  </data>\n  <data name=\"ChannelMembersHint\" xml:space=\"preserve\">\n    <value>Только администраторы канала могут видеть этот список.</value>\n  </data>\n  <data name=\"InviteViaLink\" xml:space=\"preserve\">\n    <value>Пригласить по ссылке</value>\n  </data>\n  <data name=\"AddUserAsAdministrator\" xml:space=\"preserve\">\n    <value>Уверены, что хотите назначить {0} администратором?</value>\n  </data>\n  <data name=\"ChannelIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Увы, но этот канал больше недоступен.</value>\n  </data>\n  <data name=\"InviteContactConfirmation\" xml:space=\"preserve\">\n    <value>{0} еще не подписан(а) на канал. Пригласить этого пользователя?</value>\n  </data>\n  <data name=\"PostToChannelError\" xml:space=\"preserve\">\n    <value>Простите, но вы не можете отправлять сообщения в этот канал.</value>\n  </data>\n  <data name=\"SearchSharedMusic\" xml:space=\"preserve\">\n    <value>Ищите среди музыки</value>\n  </data>\n  <data name=\"SharedMusic\" xml:space=\"preserve\">\n    <value>Музыка</value>\n  </data>\n  <data name=\"ShareMusic\" xml:space=\"preserve\">\n    <value>Вся общая музыка в этом чате будет показана тут.</value>\n  </data>\n  <data name=\"AdminsDescription\" xml:space=\"preserve\">\n    <value>Только администраторы могут добавлять и исключать участников, изменять название и фото группы.</value>\n  </data>\n  <data name=\"AllMembersAreAdmins\" xml:space=\"preserve\">\n    <value>Все участники являются администраторами</value>\n  </data>\n  <data name=\"MembersDescription\" xml:space=\"preserve\">\n    <value>Участники группы могут добавлять новых участников, редактировать название и фотографию этой группы.</value>\n  </data>\n  <data name=\"SetAdmins\" xml:space=\"preserve\">\n    <value>Назначить администраторов</value>\n  </data>\n  <data name=\"UpgradeToSupergroup\" xml:space=\"preserve\">\n    <value>Сделать супергруппой</value>\n  </data>\n  <data name=\"UpgradeToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Пожалуйста, обратите внимание, что все участники группы должны обновить свои приложения Telegram до последней версии, чтобы видеть вашу супергруппу. Уверены, что хотите преобразовать эту группу?</value>\n  </data>\n  <data name=\"UpgradeToSupergroupDescription\" xml:space=\"preserve\">\n    <value>Достигнут лимит участников.\nЧтобы обойти лимит и получить дополнительные возможности, преобразуйте группу в супергруппу:\n• Супергруппы могут достигать {0} участников\n• Новые участники могут видеть всю историю сообщений\n• Администраторы имеют возможность удалять любые сообщения\n• Уведомления отключены по умолчанию</value>\n  </data>\n  <data name=\"MessageActionChannelMigrateFrom\" xml:space=\"preserve\">\n    <value>Эта группа была преобразована в супергруппу.</value>\n  </data>\n  <data name=\"MessageActionChatActivate\" xml:space=\"preserve\">\n    <value>Чат включен</value>\n  </data>\n  <data name=\"MessageActionChatDeactivate\" xml:space=\"preserve\">\n    <value>Чат отлючен</value>\n  </data>\n  <data name=\"MessageActionChatMigrateTo\" xml:space=\"preserve\">\n    <value>Чат был преобразован в канал «{0}»</value>\n  </data>\n  <data name=\"DeleteGroup\" xml:space=\"preserve\">\n    <value>Удалить группу</value>\n  </data>\n  <data name=\"LeaveGroup\" xml:space=\"preserve\">\n    <value>Покинуть группу</value>\n  </data>\n  <data name=\"LeaveGroupConfirmation\" xml:space=\"preserve\">\n    <value>Вы уверены, что хотите покинуть эту группу?</value>\n  </data>\n  <data name=\"AdminsTooMuch\" xml:space=\"preserve\">\n    <value>К сожалению, в этой группе слишком много администраторов.</value>\n  </data>\n  <data name=\"BlockedUsersDescription\" xml:space=\"preserve\">\n    <value>Заблокированные пользователи исключены из группы и могут вернуться обратно только по приглашению администратора. Пригласительные ссылки для них не работают.</value>\n  </data>\n  <data name=\"BotsTooMuch\" xml:space=\"preserve\">\n    <value>К сожалению, в этой группе слишком много ботов.</value>\n  </data>\n  <data name=\"DeleteGroupConfirmation\" xml:space=\"preserve\">\n    <value>Подождите! Удаление этой группы также исключит всех участников и все сообщения будут утрачены. Всё равно удалить?</value>\n  </data>\n  <data name=\"GroupAdministratorsHint\" xml:space=\"preserve\">\n    <value>Вы можете добавлять администраторов для помощи в управлении каналом. Нажмите и удерживайте, чтобы удалить администраторов.</value>\n  </data>\n  <data name=\"GroupNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Увы, но этот канал больше недоступен.</value>\n  </data>\n  <data name=\"InviteUserBackError\" xml:space=\"preserve\">\n    <value>К сожалению, пользователь решил покинуть эту группу, поэтому вы не можете пригласить его обратно.</value>\n  </data>\n  <data name=\"MessageActionChatAddSelf\" xml:space=\"preserve\">\n    <value>{0} снова в группе</value>\n  </data>\n  <data name=\"PromoteToAdmin\" xml:space=\"preserve\">\n    <value>Назначить администратором</value>\n  </data>\n  <data name=\"UserNotMutualContact\" xml:space=\"preserve\">\n    <value>К сожалению, вы не можете добавлять этого пользователя в группы.</value>\n  </data>\n  <data name=\"UsersTooMuch\" xml:space=\"preserve\">\n    <value>К сожалению, эта группа переполнена.</value>\n  </data>\n  <data name=\"GroupIsNoLongerAccessible\" xml:space=\"preserve\">\n    <value>Увы, но этот канал больше недоступен.</value>\n  </data>\n  <data name=\"InviteContactToGroupConfirmation\" xml:space=\"preserve\">\n    <value>{0} еще не присоединился к каналу. Хотите пригласить?</value>\n  </data>\n  <data name=\"OpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>Открыть URL {0}?</value>\n  </data>\n  <data name=\"ServiceNotifications\" xml:space=\"preserve\">\n    <value>Служебные уведомления</value>\n  </data>\n  <data name=\"AutomaticAudioDownload\" xml:space=\"preserve\">\n    <value>Автозагрузка аудио</value>\n  </data>\n  <data name=\"AutomaticPhotoDownload\" xml:space=\"preserve\">\n    <value>Автозагрузка фото</value>\n  </data>\n  <data name=\"CacheSettings\" xml:space=\"preserve\">\n    <value>Настройки кеша</value>\n  </data>\n  <data name=\"ChatSettings\" xml:space=\"preserve\">\n    <value>Настройки чатов</value>\n  </data>\n  <data name=\"ClearChannelConfirmation\" xml:space=\"preserve\">\n    <value>Удалить из кеша текст и медиа этого канала?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseConfirmation\" xml:space=\"preserve\">\n    <value>Очистить кеш текстовых сообщений?</value>\n  </data>\n  <data name=\"ClearLocalDatabaseDescription\" xml:space=\"preserve\">\n    <value>Очистка локальной базы данных удалит кеш сообщений и сожмёт базу данных для экономии места на внутреннем накопителе. Некоторые данные нужны для работы Telegram, поэтому размер базы данных останется больше нуля.\nЭта операция может занять несколько минут.</value>\n  </data>\n  <data name=\"ClearSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Удалить весь кешированный текст и медиа этой супергруппы?</value>\n  </data>\n  <data name=\"Documents\" xml:space=\"preserve\">\n    <value>Документы</value>\n  </data>\n  <data name=\"Forever\" xml:space=\"preserve\">\n    <value>Всегда</value>\n  </data>\n  <data name=\"Groups\" xml:space=\"preserve\">\n    <value>Группы</value>\n  </data>\n  <data name=\"KeepMedia\" xml:space=\"preserve\">\n    <value>Срок хранения медиа</value>\n  </data>\n  <data name=\"KeepMediaDescription\" xml:space=\"preserve\">\n    <value>Фото, видео и другие файлы из чатов могут быть удалены с этого устройства при установке ограничения на хранение в целях экономии свободного места.\n\nВсе файлы останутся в облаке Telegram и могут быть повторно загружены в случае необходимости.</value>\n  </data>\n  <data name=\"Music\" xml:space=\"preserve\">\n    <value>Музыка</value>\n  </data>\n  <data name=\"Other\" xml:space=\"preserve\">\n    <value>Другое</value>\n  </data>\n  <data name=\"OtherFiles\" xml:space=\"preserve\">\n    <value>Другие файлы</value>\n  </data>\n  <data name=\"Photos\" xml:space=\"preserve\">\n    <value>Фотографии</value>\n  </data>\n  <data name=\"PrivateChats\" xml:space=\"preserve\">\n    <value>Приватные чаты</value>\n  </data>\n  <data name=\"Videos\" xml:space=\"preserve\">\n    <value>Видео</value>\n  </data>\n  <data name=\"VoiceMessages\" xml:space=\"preserve\">\n    <value>Голосовые сообщения</value>\n  </data>\n  <data name=\"LocalDatabase\" xml:space=\"preserve\">\n    <value>Локальная база данных</value>\n  </data>\n  <data name=\"AutomaticGifDownload\" xml:space=\"preserve\">\n    <value>Автозагрузка GIF</value>\n  </data>\n  <data name=\"ForwardedGifGenitivePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых GIF</value>\n  </data>\n  <data name=\"ForwardedGifGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пересылаемых GIF</value>\n  </data>\n  <data name=\"ForwardedGifNominativePlural\" xml:space=\"preserve\">\n    <value>Пересылаемые GIF</value>\n  </data>\n  <data name=\"ForwardedGifNominativeSingular\" xml:space=\"preserve\">\n    <value>Пересылаемый GIF</value>\n  </data>\n  <data name=\"Gif\" xml:space=\"preserve\">\n    <value>GIF</value>\n  </data>\n  <data name=\"AutoplayGifs\" xml:space=\"preserve\">\n    <value>Автозапуск GIF</value>\n  </data>\n  <data name=\"Via\" xml:space=\"preserve\">\n    <value>via {0}</value>\n  </data>\n  <data name=\"AddNewMembers\" xml:space=\"preserve\">\n    <value>Кто может добавлять новых участников?</value>\n  </data>\n  <data name=\"AllMembers\" xml:space=\"preserve\">\n    <value>Все участники</value>\n  </data>\n  <data name=\"AlwaysAllow\" xml:space=\"preserve\">\n    <value>Всегда разрешать</value>\n  </data>\n  <data name=\"GroupsDescription\" xml:space=\"preserve\">\n    <value>Выберите, кто может приглашать вас в группы и каналы.</value>\n  </data>\n  <data name=\"GroupsImportantNote\" xml:space=\"preserve\">\n    <value>Вы можете выбрать, кому разрешаете приглашать вас в группы и каналы.</value>\n  </data>\n  <data name=\"GroupsSettingsOverrideNote\" xml:space=\"preserve\">\n    <value>Этим пользователям будет разрешено или запрещено приглашать вас в группы и каналы независимо от настроек выше.</value>\n  </data>\n  <data name=\"GroupsShort\" xml:space=\"preserve\">\n    <value>Группы и каналы</value>\n  </data>\n  <data name=\"NeverAllow\" xml:space=\"preserve\">\n    <value>Всегда запрещать</value>\n  </data>\n  <data name=\"OnlyAdmins\" xml:space=\"preserve\">\n    <value>Только администраторы</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых голосовых сообщений</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пересылаемых голосовых сообщения</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativePlural\" xml:space=\"preserve\">\n    <value>Пересылаемые голосовые сообщения</value>\n  </data>\n  <data name=\"ForwardedVoiceMessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Пересылаемое голосовое сообщение</value>\n  </data>\n  <data name=\"RecordingVoiceMessage\" xml:space=\"preserve\">\n    <value>записывает голосовое сообщение</value>\n  </data>\n  <data name=\"VoiceMessage\" xml:space=\"preserve\">\n    <value>Голосовое сообщение</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription1\" xml:space=\"preserve\">\n    <value>Это изображение является визуализацией ключа шифрования для данного секретного чата с {0}</value>\n  </data>\n  <data name=\"EncryptionKeyExtendedDescription2\" xml:space=\"preserve\">\n    <value>Если оно выглядит так же на телефоне {0}, то ваш чат на 200% безопасен.</value>\n  </data>\n  <data name=\"InlineBotsNotification\" xml:space=\"preserve\">\n    <value>Обратите внимание, что инлайн-боты создаются сторонними разработчиками. Всё, что вы введёте после имени бота, будет отправлено его разработчику.</value>\n  </data>\n  <data name=\"LinkPreviews\" xml:space=\"preserve\">\n    <value>Предпросмотр ссылок</value>\n  </data>\n  <data name=\"LInkPreviewsNotification\" xml:space=\"preserve\">\n    <value>Включить предпросмотр ссылок в секретных чатах? Учтите, что предпросмотр генерируется на серверах Telegram.</value>\n  </data>\n  <data name=\"ViewStickers\" xml:space=\"preserve\">\n    <value>Посмотреть стикеры</value>\n  </data>\n  <data name=\"NotifyMembers\" xml:space=\"preserve\">\n    <value>Уведомлять участников</value>\n  </data>\n  <data name=\"NotifyMembersDescription\" xml:space=\"preserve\">\n    <value>Отправлять пуш уведомления каждый раз, когда администраторы публикуют сообщения</value>\n  </data>\n  <data name=\"SignMessages\" xml:space=\"preserve\">\n    <value>Подписывать сообщения</value>\n  </data>\n  <data name=\"SignMessagesDescription\" xml:space=\"preserve\">\n    <value>Добавлять к сообщениям имя автора записи.</value>\n  </data>\n  <data name=\"ChannelNameDescription\" xml:space=\"preserve\">\n    <value>Вы можете установить короткое имя для Вашего канала. Если это сделать, другие люди смогут находить Ваш канал в поиске по этому имени.\n\nКороткое имя может содержать только латинские буквы a-z, цифры 0-9 и символы подчёркивания. Минимальная допустимая длина имени — 5 символов.</value>\n  </data>\n  <data name=\"ChannelNameDescription2\" xml:space=\"preserve\">\n    <value>Эта ссылка откроет Ваш канал в Telegram:</value>\n  </data>\n  <data name=\"SupergroupNameDescription\" xml:space=\"preserve\">\n    <value>Вы можете выбрать короткое имя для Вашей группы. Если сделать это, другие люди смогут найти вашу группу в поиске.\n\nКороткое имя может содержать только латинские буквы a-z, цифры 0-9 и символы подчёркивания. Минимальная допустимая длина имени — 5 символов.</value>\n  </data>\n  <data name=\"SupergroupNameDescription2\" xml:space=\"preserve\">\n    <value>Эта ссылка откроет Вашу группу в Telegram:</value>\n  </data>\n  <data name=\"SupergroupName\" xml:space=\"preserve\">\n    <value>Имя супергруппы</value>\n  </data>\n  <data name=\"ChannelNameInvalid\" xml:space=\"preserve\">\n    <value>К сожалению, это имя недоступно.</value>\n  </data>\n  <data name=\"ChannelNameOccupied\" xml:space=\"preserve\">\n    <value>К сожалению, это имя занято.</value>\n  </data>\n  <data name=\"ChannelNameShort\" xml:space=\"preserve\">\n    <value>Имена каналов должны содержать как минимум 5 символов.</value>\n  </data>\n  <data name=\"ChannelNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Имена каналов не могут начинаться с цифр.</value>\n  </data>\n  <data name=\"NameChecking\" xml:space=\"preserve\">\n    <value>Проверка имени…</value>\n  </data>\n  <data name=\"NameIsAvailable\" xml:space=\"preserve\">\n    <value>Имя {0} доступно.</value>\n  </data>\n  <data name=\"SupergroupNameInvalid\" xml:space=\"preserve\">\n    <value>Увы, данное имя недоступно.</value>\n  </data>\n  <data name=\"SupergroupNameOccupied\" xml:space=\"preserve\">\n    <value>К сожалению, это имя занято.</value>\n  </data>\n  <data name=\"SupergroupNameShort\" xml:space=\"preserve\">\n    <value>Имена групп должны содержать не менее 5 символов.</value>\n  </data>\n  <data name=\"SupergroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Имена групп не могут начинаться с цифры.</value>\n  </data>\n  <data name=\"EditMessageError\" xml:space=\"preserve\">\n    <value>К сожалению, вы не можете изменить это сообщение.</value>\n  </data>\n  <data name=\"MuteChannelPostHint\" xml:space=\"preserve\">\n    <value>Участники не будут уведомляться о ваших публикациях</value>\n  </data>\n  <data name=\"UnmuteChannelPostHint\" xml:space=\"preserve\">\n    <value>Участники будут уведомляться о ваших публикациях</value>\n  </data>\n  <data name=\"PinMessage\" xml:space=\"preserve\">\n    <value>Закрепить</value>\n  </data>\n  <data name=\"UnpinMessage\" xml:space=\"preserve\">\n    <value>Открепить</value>\n  </data>\n  <data name=\"UnpinMessageConfirmation\" xml:space=\"preserve\">\n    <value>Вы уверены, что хотите открепить это сообщение?</value>\n  </data>\n  <data name=\"ConvertToSupergroup\" xml:space=\"preserve\">\n    <value>Сделать супергруппой</value>\n  </data>\n  <data name=\"ConvertToSupergroupNote\" xml:space=\"preserve\">\n    <value>**Внимание:** это действие не может быть отменено.</value>\n  </data>\n  <data name=\"Supergroup\" xml:space=\"preserve\">\n    <value>Супергруппа</value>\n  </data>\n  <data name=\"ConvertToSupergroupDescription\" xml:space=\"preserve\">\n    <value>**В супергруппах:**\n• Новые участники могут видеть полную историю сообщений\n• Удалённые сообщения исчезают у всех участников\n• Администраторы могут закреплять важные сообщения\n• Создатель может установить публичную ссылку на группу</value>\n  </data>\n  <data name=\"BanUser\" xml:space=\"preserve\">\n    <value>Заблокировать пользователя</value>\n  </data>\n  <data name=\"DeleteAllFrom\" xml:space=\"preserve\">\n    <value>Удалить всё от пользователя {0}</value>\n  </data>\n  <data name=\"DeleteMessageConfirmation\" xml:space=\"preserve\">\n    <value>Удалить это сообщение?</value>\n  </data>\n  <data name=\"DeleteMessages\" xml:space=\"preserve\">\n    <value>Удалить собщения</value>\n  </data>\n  <data name=\"MessageActionPinMessage\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) сообщение</value>\n  </data>\n  <data name=\"MessageActionPinContact\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) контакт</value>\n  </data>\n  <data name=\"MessageActionPinFile\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) файл</value>\n  </data>\n  <data name=\"MessageActionPinGif\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) GIF</value>\n  </data>\n  <data name=\"MessageActionPinMap\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) карту</value>\n  </data>\n  <data name=\"MessageActionPinPhoto\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) фото</value>\n  </data>\n  <data name=\"MessageActionPinSticker\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) стикер</value>\n  </data>\n  <data name=\"MessageActionPinText\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) «{1}»</value>\n  </data>\n  <data name=\"MessageActionPinTrack\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) трек</value>\n  </data>\n  <data name=\"MessageActionPinVideo\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) видео</value>\n  </data>\n  <data name=\"MessageActionPinVoiceMessage\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) голосовое сообщение</value>\n  </data>\n  <data name=\"PinnedMessage\" xml:space=\"preserve\">\n    <value>Закреплённое сообщение</value>\n  </data>\n  <data name=\"ConvertToSupergroupConfirmation\" xml:space=\"preserve\">\n    <value>Это действие нельзя будет отменить. Супергруппу нельзя снова сделать обычной группой.</value>\n  </data>\n  <data name=\"NotifyAllMembers\" xml:space=\"preserve\">\n    <value>Уведомлять всех участников</value>\n  </data>\n  <data name=\"PinMessageConfirmation\" xml:space=\"preserve\">\n    <value>Хотите закрепить это сообщение в группе?</value>\n  </data>\n  <data name=\"ChatMaxSizeNotification\" xml:space=\"preserve\">\n    <value>Вы сможете добавить больше участников, если сделаете из неё супергруппу после создания.</value>\n  </data>\n  <data name=\"Admin\" xml:space=\"preserve\">\n    <value>Админ</value>\n  </data>\n  <data name=\"ChoosePublicGroupLinkNotification\" xml:space=\"preserve\">\n    <value>Пожалуйста, придумайте короткое имя для группы, чтобы люди могли найти её в поиске.</value>\n  </data>\n  <data name=\"GroupType\" xml:space=\"preserve\">\n    <value>Тип группы</value>\n  </data>\n  <data name=\"PrivateGroupDescription\" xml:space=\"preserve\">\n    <value>В приватные группы можно вступить только по приглашению или пригласительной ссылке.</value>\n  </data>\n  <data name=\"PrivateGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Люди могут вступать в вашу группу, следуя по этой ссылке. Вы можете аннулировать эту ссылку в любое время.</value>\n  </data>\n  <data name=\"PublicGroupDescription\" xml:space=\"preserve\">\n    <value>Публичные группы можно найти через поиск, история чата доступна всем, и присоединиться может любой пользователь.</value>\n  </data>\n  <data name=\"PublicGroupLinkDescription\" xml:space=\"preserve\">\n    <value>Люди смогут делиться этой ссылкой, а также найти вашу группу в поиске Telegram.</value>\n  </data>\n  <data name=\"Camera\" xml:space=\"preserve\">\n    <value>Камера</value>\n  </data>\n  <data name=\"Pornography\" xml:space=\"preserve\">\n    <value>Порнография</value>\n  </data>\n  <data name=\"Report\" xml:space=\"preserve\">\n    <value>Пожаловаться</value>\n  </data>\n  <data name=\"ReportSpamNotification\" xml:space=\"preserve\">\n    <value>Спасибо!\nМы постараемся рассмотреть Вашу жалобу как можно скорее.</value>\n  </data>\n  <data name=\"Spam\" xml:space=\"preserve\">\n    <value>Спам</value>\n  </data>\n  <data name=\"Violence\" xml:space=\"preserve\">\n    <value>Насилие</value>\n  </data>\n  <data name=\"ClearHistoryConfirmation\" xml:space=\"preserve\">\n    <value>Уверены, что хотите очистить историю?</value>\n  </data>\n  <data name=\"DeleteAndExitConfirmation\" xml:space=\"preserve\">\n    <value>Уверены, что хотите удалить и покинуть эту группу?</value>\n  </data>\n  <data name=\"DeleteChat\" xml:space=\"preserve\">\n    <value>Удалить беседу</value>\n  </data>\n  <data name=\"MessageActionChatJoin\" xml:space=\"preserve\">\n    <value>{0} вступил(а) в группу</value>\n  </data>\n  <data name=\"MessageActionChatJoinSelf\" xml:space=\"preserve\">\n    <value>Вы вступили в эту группу</value>\n  </data>\n  <data name=\"MessageActionLeftGroupSelf\" xml:space=\"preserve\">\n    <value>Вы покинули эту группу</value>\n  </data>\n  <data name=\"CodeSentToTelegramApp\" xml:space=\"preserve\">\n    <value>Код для входа отправлен через **Telegram** на ваши другие устройства.</value>\n  </data>\n  <data name=\"CodeSentViaCallingPhone\" xml:space=\"preserve\">\n    <value>Наш робот звонит на номер **{0}**, чтобы продиктовать код.</value>\n  </data>\n  <data name=\"DidNotGetCode\" xml:space=\"preserve\">\n    <value>Не получили код?</value>\n  </data>\n  <data name=\"HaveNotReceivedCode\" xml:space=\"preserve\">\n    <value>Не пришёл код?</value>\n  </data>\n  <data name=\"ShareLocationConfirmation\" xml:space=\"preserve\">\n    <value>Это отправит боту вашу текущую геопозицию.</value>\n  </data>\n  <data name=\"SharePhoneNumberConfirmation\" xml:space=\"preserve\">\n    <value>Бот будет знать номер Вашего телефона. Это может быть полезно для интеграции с другими сервисами.</value>\n  </data>\n  <data name=\"ChooseManually\" xml:space=\"preserve\">\n    <value>Выбрать вручную</value>\n  </data>\n  <data name=\"ShareLocationCaption\" xml:space=\"preserve\">\n    <value>Поделиться геопозицией?</value>\n  </data>\n  <data name=\"SharePhoneNumberCaption\" xml:space=\"preserve\">\n    <value>Поделиться номером телефона?</value>\n  </data>\n  <data name=\"UnableToDetermineLocation\" xml:space=\"preserve\">\n    <value>Приложению не удалось определить вашу геопозицию</value>\n  </data>\n  <data name=\"ShareLocationInlineConfirmation\" xml:space=\"preserve\">\n    <value>Этот бот хотел бы знать ваше расположение каждый раз, когда вы отправляете ему запрос. Это может использоваться для выдачи результатов, связанных с расположением.</value>\n  </data>\n  <data name=\"MoreInfo\" xml:space=\"preserve\">\n    <value>Подробнее</value>\n  </data>\n  <data name=\"RemoveStickers\" xml:space=\"preserve\">\n    <value>Удалить</value>\n  </data>\n  <data name=\"SendSticker\" xml:space=\"preserve\">\n    <value>Отправить стикер</value>\n  </data>\n  <data name=\"StickersRemoved\" xml:space=\"preserve\">\n    <value>Стикеры удалены</value>\n  </data>\n  <data name=\"UnpinFromStart\" xml:space=\"preserve\">\n    <value>Открепить в Пуск</value>\n  </data>\n  <data name=\"Bots\" xml:space=\"preserve\">\n    <value>Боты</value>\n  </data>\n  <data name=\"LastSeenYesterdayAt\" xml:space=\"preserve\">\n    <value>Был(а) в сети вчера в {0}</value>\n  </data>\n  <data name=\"Clear\" xml:space=\"preserve\">\n    <value>Очистить</value>\n  </data>\n  <data name=\"Edited\" xml:space=\"preserve\">\n    <value>Изменено</value>\n  </data>\n  <data name=\"EditMessage\" xml:space=\"preserve\">\n    <value>Редактировать сообщение</value>\n  </data>\n  <data name=\"LastSeenTodayAt\" xml:space=\"preserve\">\n    <value>Был(а) в сети сегодня в {0}</value>\n  </data>\n  <data name=\"OpenInlineBotsHint\" xml:space=\"preserve\">\n    <value>Потяните вверх, чтобы увидеть ботов</value>\n  </data>\n  <data name=\"ConfirmResetTopPeerRating\" xml:space=\"preserve\">\n    <value>Удалить {0} из подсказок?</value>\n  </data>\n  <data name=\"Draft\" xml:space=\"preserve\">\n    <value>Черновик</value>\n  </data>\n  <data name=\"FeaturedStickers\" xml:space=\"preserve\">\n    <value>Популярные стикеры</value>\n  </data>\n  <data name=\"StickersHint\" xml:space=\"preserve\">\n    <value>Приглашаем художников добавлять свои собственные наборы стикеров с помощью нашего бота __@stickers__.\nПользователи могут добавлять себе стикеры, нажимая на них и выбирая «Добавить в стикеры».</value>\n  </data>\n  <data name=\"ClearRecentStickers\" xml:space=\"preserve\">\n    <value>Удалить недавние стикеры?</value>\n  </data>\n  <data name=\"NewFeaturedStickers\" xml:space=\"preserve\">\n    <value>{0} new</value>\n  </data>\n  <data name=\"InstallStickersetError\" xml:space=\"preserve\">\n    <value>Извините, вы достигли максимального количества наборов стикеров.</value>\n  </data>\n  <data name=\"ChatInviteSubtitle\" xml:space=\"preserve\">\n    <value>{0}, среди них:</value>\n  </data>\n  <data name=\"InstalledStickers\" xml:space=\"preserve\">\n    <value>Установленные стикеры</value>\n  </data>\n  <data name=\"ShowStickersTab\" xml:space=\"preserve\">\n    <value>Показывать вкладку стикеров</value>\n  </data>\n  <data name=\"ShowStickersTabHint\" xml:space=\"preserve\">\n    <value>Иконка стикера появится в поле ввода сообщений.</value>\n  </data>\n  <data name=\"ArchivedStickers\" xml:space=\"preserve\">\n    <value>Архивные стикеры</value>\n  </data>\n  <data name=\"ArchivedStickersAbout\" xml:space=\"preserve\">\n    <value>Некоторые из старых наборов стикеров были архивированы. Вы можете снова активировать их в настройках стикеров.</value>\n  </data>\n  <data name=\"ArchivedStickersHeader\" xml:space=\"preserve\">\n    <value>У вас может быть до 200 установленных наборов стикеров. При установке новых наборов неиспользуемые стикеры архивируются.</value>\n  </data>\n  <data name=\"NoSetsHere\" xml:space=\"preserve\">\n    <value>Наборов пока нет</value>\n  </data>\n  <data name=\"NoSets\" xml:space=\"preserve\">\n    <value>Наборов нет</value>\n  </data>\n  <data name=\"SetGenitivePlural\" xml:space=\"preserve\">\n    <value>Наборов</value>\n  </data>\n  <data name=\"SetGenitiveSingular\" xml:space=\"preserve\">\n    <value>Набора</value>\n  </data>\n  <data name=\"SetNominativePlural\" xml:space=\"preserve\">\n    <value>Наборы</value>\n  </data>\n  <data name=\"SetNominativeSingular\" xml:space=\"preserve\">\n    <value>Набор</value>\n  </data>\n  <data name=\"ChatWithYourself\" xml:space=\"preserve\">\n    <value>Чат с собой</value>\n  </data>\n  <data name=\"CloudStorageDescription\" xml:space=\"preserve\">\n    <value>• Переправляйте сообщения сюда, чтобы сохранить их\n• Отправляйте медиа и файлы для хранения\n• Получайте доступ к этому чату с любого устройства\n• Используйте поиск, чтобы быстро находить сообщения</value>\n  </data>\n  <data name=\"CloudStorage\" xml:space=\"preserve\">\n    <value>Ваше облачное хранилище</value>\n  </data>\n  <data name=\"CancelAccountReset\" xml:space=\"preserve\">\n    <value>Отмена сброса аккаунта</value>\n  </data>\n  <data name=\"CancelAccountResetDescription\" xml:space=\"preserve\">\n    <value>Кто-то с доступом к Вашему номеру телефона **{0}** запросил удаление вашего аккаунта в Telegram и сброс пароля для двухфакторной аутентификации. Если это были не вы, пожалуйста, введите код, который мы только что отправили по SMS на ваш номер **{0}**.</value>\n  </data>\n  <data name=\"CancelAccountResetSuccess\" xml:space=\"preserve\">\n    <value>Удаление вашего аккаунта {0} отменено. Это окно можно закрыть.</value>\n  </data>\n  <data name=\"Reset\" xml:space=\"preserve\">\n    <value>Сбросить</value>\n  </data>\n  <data name=\"ResetAccount\" xml:space=\"preserve\">\n    <value>Сбросить аккаунт</value>\n  </data>\n  <data name=\"ResetAccountDescription\" xml:space=\"preserve\">\n    <value>Поскольку аккаунт **{0}** активен и защищён паролем, в целях безопасности, мы удалим его только через 1 неделю.\n\nВы можете в любой момент отменить этот процесс.</value>\n  </data>\n  <data name=\"ResetAccountError\" xml:space=\"preserve\">\n    <value>Ваши недавние попытки сбросить аккаунт были отменены его активным пользователем. Попробуйте снова через 7 дней.</value>\n  </data>\n  <data name=\"ResetAccountIn\" xml:space=\"preserve\">\n    <value>Вы сможете сбросить аккаунт через:</value>\n  </data>\n  <data name=\"Archive\" xml:space=\"preserve\">\n    <value>Архивировать</value>\n  </data>\n  <data name=\"BotOpenUrlConfirmation\" xml:space=\"preserve\">\n    <value>Бот {0} запрашивает разрешение поделиться вашим именем Telegram и фото профиля с владельцем {1}.</value>\n  </data>\n  <data name=\"IsRecordingVideo\" xml:space=\"preserve\">\n    <value>записывает видео</value>\n  </data>\n  <data name=\"IsSendingAudio\" xml:space=\"preserve\">\n    <value>отправляет аудио</value>\n  </data>\n  <data name=\"RecordingVideo\" xml:space=\"preserve\">\n    <value>записывает видео</value>\n  </data>\n  <data name=\"SendingAudio\" xml:space=\"preserve\">\n    <value>отправляет аудио</value>\n  </data>\n  <data name=\"Revoke\" xml:space=\"preserve\">\n    <value>Отозвать</value>\n  </data>\n  <data name=\"RevokeLinkConfirmation2\" xml:space=\"preserve\">\n    <value>Уверены, что хотите сбросить ссылку ***{0}*?\n\nГруппа \"{1}\" станет приватной.</value>\n  </data>\n  <data name=\"AddBotToTheGroup\" xml:space=\"preserve\">\n    <value>Добавить бота в группу «{0}»?</value>\n  </data>\n  <data name=\"YourScored\" xml:space=\"preserve\">\n    <value>Вы набрали {0} очков</value>\n  </data>\n  <data name=\"ShareWith\" xml:space=\"preserve\">\n    <value>Поделиться с пользователем {0}?</value>\n  </data>\n  <data name=\"YourScoredAtGame\" xml:space=\"preserve\">\n    <value>Вы набрали {0} очков в {1}</value>\n  </data>\n  <data name=\"MuteAudio\" xml:space=\"preserve\">\n    <value>Выключить уведомления</value>\n  </data>\n  <data name=\"OpenWebPagesViaBotConfirmation\" xml:space=\"preserve\">\n    <value>Разрешить боту {0} передавать ваше имя и id в Telegram (не номер телефона) тем страницам, которые вы через него откроете?</value>\n  </data>\n  <data name=\"UserScored\" xml:space=\"preserve\">\n    <value>{0} набрал(а) {1} очков</value>\n  </data>\n  <data name=\"UserScoredAtGame\" xml:space=\"preserve\">\n    <value>{0} набрал(а) {1} очков в {2}</value>\n  </data>\n  <data name=\"UserScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>{0} набрал(а) {1} очков в {2}</value>\n  </data>\n  <data name=\"UserScoredPlural\" xml:space=\"preserve\">\n    <value>{0} набрал(а) {1} очков</value>\n  </data>\n  <data name=\"YourScoredAtGamePlural\" xml:space=\"preserve\">\n    <value>Вы набрали {0} очков в {1}</value>\n  </data>\n  <data name=\"YourScoredPlural\" xml:space=\"preserve\">\n    <value>Вы набрали {0} очков</value>\n  </data>\n  <data name=\"ForwardedGameGenitivePlural\" xml:space=\"preserve\">\n    <value>Пересылаемых игр</value>\n  </data>\n  <data name=\"ForwardedGameGenitiveSingular\" xml:space=\"preserve\">\n    <value>Пересылаемые игры</value>\n  </data>\n  <data name=\"ForwardedGameNominativePlural\" xml:space=\"preserve\">\n    <value>Пересылаемые игры</value>\n  </data>\n  <data name=\"ForwardedGameNominativeSingular\" xml:space=\"preserve\">\n    <value>Пересылаемая игра</value>\n  </data>\n  <data name=\"Game\" xml:space=\"preserve\">\n    <value>Игра</value>\n  </data>\n  <data name=\"MessageActionPinGame\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) карту</value>\n  </data>\n  <data name=\"ShareGameWith\" xml:space=\"preserve\">\n    <value>Поделиться игрой с {0}?</value>\n  </data>\n  <data name=\"IsPlayingGame\" xml:space=\"preserve\">\n    <value>играет в игру</value>\n  </data>\n  <data name=\"PlayingGame\" xml:space=\"preserve\">\n    <value>играет в игру</value>\n  </data>\n  <data name=\"YourCloudStorage\" xml:space=\"preserve\">\n    <value>Ваше облачное хранилище</value>\n  </data>\n  <data name=\"Masks\" xml:space=\"preserve\">\n    <value>Маски</value>\n  </data>\n  <data name=\"MasksHint\" xml:space=\"preserve\">\n    <value>Вы можете добавлять маски на отправляемые фото. Для этого перед отправкой откройте визуальный редактор.</value>\n  </data>\n  <data name=\"GroupsInCommon\" xml:space=\"preserve\">\n    <value>Общие группы</value>\n  </data>\n  <data name=\"GroupGenitivePlural\" xml:space=\"preserve\">\n    <value>Групп</value>\n  </data>\n  <data name=\"GroupGenitiveSingular\" xml:space=\"preserve\">\n    <value>Группы</value>\n  </data>\n  <data name=\"GroupNominativePlural\" xml:space=\"preserve\">\n    <value>Группы</value>\n  </data>\n  <data name=\"GroupNominativeSingular\" xml:space=\"preserve\">\n    <value>Группа</value>\n  </data>\n  <data name=\"NoGroupsHere\" xml:space=\"preserve\">\n    <value>Нет групп</value>\n  </data>\n  <data name=\"AddChatUserFloodWait\" xml:space=\"preserve\">\n    <value>Вы не можете добавить пользователя, так как сегодня вы связались со многими, кого нет в вашем списке контактов. Пожалуйста, попробуйте снова завтра. Вы можете попросить другого участника добавить этого пользователя в группу.</value>\n  </data>\n  <data name=\"ClearAll\" xml:space=\"preserve\">\n    <value>Очистить всё</value>\n  </data>\n  <data name=\"ClearPaintingConfirmation\" xml:space=\"preserve\">\n    <value>Вы уверены, что хотите очистить холст?</value>\n  </data>\n  <data name=\"DiscardChangesConfirmation\" xml:space=\"preserve\">\n    <value>Вы уверены, что хотите отменить изменения?</value>\n  </data>\n  <data name=\"SendMessageFloodWait\" xml:space=\"preserve\">\n    <value>Сегодня вы связались со многими, кого нет в вашем списке контактов. Пожалуйста, попробуйте снова завтра. Вы сможете ответить сегодня, если этот пользователь напишет вам первым.</value>\n  </data>\n  <data name=\"AttachedStickers\" xml:space=\"preserve\">\n    <value>Прикрепленные стикеры</value>\n  </data>\n  <data name=\"JumpToDate\" xml:space=\"preserve\">\n    <value>Перейти к дате</value>\n  </data>\n  <data name=\"Pack\" xml:space=\"preserve\">\n    <value>Посмотреть набор</value>\n  </data>\n  <data name=\"ChatsAndContacts\" xml:space=\"preserve\">\n    <value>Диалоги и контакты</value>\n  </data>\n  <data name=\"MessageSearch\" xml:space=\"preserve\">\n    <value>Поиск по сообщениям</value>\n  </data>\n  <data name=\"SearchChatsOrMessages\" xml:space=\"preserve\">\n    <value>Поиск по чатам и сообщениям</value>\n  </data>\n  <data name=\"PrivacyPolicy\" xml:space=\"preserve\">\n    <value>Политика конфиденциальности</value>\n  </data>\n  <data name=\"TelegramFAQ\" xml:space=\"preserve\">\n    <value>Вопросы и ответы о Telegram</value>\n  </data>\n  <data name=\"ChatSettingsSubtitle\" xml:space=\"preserve\">\n    <value>Медиа, фон, кеш</value>\n  </data>\n  <data name=\"Mobile\" xml:space=\"preserve\">\n    <value>Номер телефона</value>\n  </data>\n  <data name=\"ChannelsTooMuch\" xml:space=\"preserve\">\n    <value>Извините, вы создали или вступили в слишком большое количество каналов.</value>\n  </data>\n  <data name=\"UserChannelsTooMuch\" xml:space=\"preserve\">\n    <value>К сожалению, вы не можете приглашать пользователя в каналы.</value>\n  </data>\n  <data name=\"ItemsSelectedSingular\" xml:space=\"preserve\">\n    <value>Выбрано: {0}</value>\n  </data>\n  <data name=\"NewChat\" xml:space=\"preserve\">\n    <value>Новый чат</value>\n  </data>\n  <data name=\"ItemsSelectedPlural\" xml:space=\"preserve\">\n    <value>Выбрано: {0}</value>\n  </data>\n  <data name=\"FileGenitivePlural\" xml:space=\"preserve\">\n    <value>Файлов</value>\n  </data>\n  <data name=\"FileGenitiveSingular\" xml:space=\"preserve\">\n    <value>Файла</value>\n  </data>\n  <data name=\"FileNominativePlural\" xml:space=\"preserve\">\n    <value>Файлы</value>\n  </data>\n  <data name=\"FileNominativeSingular\" xml:space=\"preserve\">\n    <value>Файл</value>\n  </data>\n  <data name=\"LinkGenitivePlural\" xml:space=\"preserve\">\n    <value>Ссылок</value>\n  </data>\n  <data name=\"LinkGenitiveSingular\" xml:space=\"preserve\">\n    <value>Ссылки</value>\n  </data>\n  <data name=\"LinkNominativePlural\" xml:space=\"preserve\">\n    <value>Ссылки</value>\n  </data>\n  <data name=\"LinkNominativeSingular\" xml:space=\"preserve\">\n    <value>Ссылка</value>\n  </data>\n  <data name=\"PhotoGenitivePlural\" xml:space=\"preserve\">\n    <value>Фото</value>\n  </data>\n  <data name=\"PhotoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Фото</value>\n  </data>\n  <data name=\"PhotoNominativePlural\" xml:space=\"preserve\">\n    <value>Фото</value>\n  </data>\n  <data name=\"PhotoNominativeSingular\" xml:space=\"preserve\">\n    <value>Фото</value>\n  </data>\n  <data name=\"SongGenitivePlural\" xml:space=\"preserve\">\n    <value>Песен</value>\n  </data>\n  <data name=\"SongGenitiveSingular\" xml:space=\"preserve\">\n    <value>Песни</value>\n  </data>\n  <data name=\"SongNominativePlural\" xml:space=\"preserve\">\n    <value>Песни</value>\n  </data>\n  <data name=\"SongNominativeSingular\" xml:space=\"preserve\">\n    <value>Песня</value>\n  </data>\n  <data name=\"VideoGenitivePlural\" xml:space=\"preserve\">\n    <value>Видео</value>\n  </data>\n  <data name=\"VideoGenitiveSingular\" xml:space=\"preserve\">\n    <value>Видео</value>\n  </data>\n  <data name=\"VideoNominativePlural\" xml:space=\"preserve\">\n    <value>Видео</value>\n  </data>\n  <data name=\"VideoNominativeSingular\" xml:space=\"preserve\">\n    <value>Видео</value>\n  </data>\n  <data name=\"PhoneNumber\" xml:space=\"preserve\">\n    <value>Номер телефона</value>\n  </data>\n  <data name=\"SetPhoto\" xml:space=\"preserve\">\n    <value>Установить фото</value>\n  </data>\n  <data name=\"AskAQuestionDescription\" xml:space=\"preserve\">\n    <value>Пожалуйста, обратите внимание, что поддержка Telegram осуществляется добровольцами. Мы постараемся ответить как можно быстрее, но это может занять некоторое время. Пожалуйста, ознакомьтесь с &lt;![CDATA[&lt;a href=\"https://telegram.org/faq#general\"&gt;вопросами и ответами о Telegram&lt;/a&gt;]]&gt;: там есть ответы на большинство вопросов и важные советы по &lt;![CDATA[&lt;a href=\"https://telegram.org/faq#troubleshooting\"&gt;устранению неполадок&lt;/a&gt;]]&gt;.</value>\n  </data>\n  <data name=\"MaskPackNominativePlural\" xml:space=\"preserve\">\n    <value>Наборы масок</value>\n  </data>\n  <data name=\"MaskPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Набор масок</value>\n  </data>\n  <data name=\"StickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Стикерпаки</value>\n  </data>\n  <data name=\"StickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Стикерпак</value>\n  </data>\n  <data name=\"NewStickerPackNominativePlural\" xml:space=\"preserve\">\n    <value>Новые стикерпаки</value>\n  </data>\n  <data name=\"NewStickerPackNominativeSingular\" xml:space=\"preserve\">\n    <value>Новый стикерпак</value>\n  </data>\n  <data name=\"PinDialog\" xml:space=\"preserve\">\n    <value>Закрепить</value>\n  </data>\n  <data name=\"UnpinDialog\" xml:space=\"preserve\">\n    <value>Открепить</value>\n  </data>\n  <data name=\"DeleteFor\" xml:space=\"preserve\">\n    <value>Удалить для пользователя {0}</value>\n  </data>\n  <data name=\"DeleteForAll\" xml:space=\"preserve\">\n    <value>Удалить у всех</value>\n  </data>\n  <data name=\"DeleteMessageForYouHint\" xml:space=\"preserve\">\n    <value>Оно будет удалено только для вас.</value>\n  </data>\n  <data name=\"DeleteMessagesForYouHint\" xml:space=\"preserve\">\n    <value>Они будут удалены только для вас.</value>\n  </data>\n  <data name=\"MessageActionCanceledCall\" xml:space=\"preserve\">\n    <value>Отменённый вызов</value>\n  </data>\n  <data name=\"MessageActionIncomingCall\" xml:space=\"preserve\">\n    <value>Входящий вызов</value>\n  </data>\n  <data name=\"MessageActionIncomingDurationCall\" xml:space=\"preserve\">\n    <value>Входящий вызов ({0})</value>\n  </data>\n  <data name=\"MessageActionMissedCall\" xml:space=\"preserve\">\n    <value>Пропущенный вызов</value>\n  </data>\n  <data name=\"MessageActionOutgoingCall\" xml:space=\"preserve\">\n    <value>Исходящий вызов</value>\n  </data>\n  <data name=\"MessageActionOutgoingDurationCall\" xml:space=\"preserve\">\n    <value>Исходящий вызов ({0})</value>\n  </data>\n  <data name=\"CanceledCall\" xml:space=\"preserve\">\n    <value>Отменённый вызов</value>\n  </data>\n  <data name=\"IncomingCall\" xml:space=\"preserve\">\n    <value>Входящий вызов</value>\n  </data>\n  <data name=\"MissedCall\" xml:space=\"preserve\">\n    <value>Пропущенный вызов</value>\n  </data>\n  <data name=\"OutgoingCall\" xml:space=\"preserve\">\n    <value>Исходящий вызов</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Оно будет удалено для всех в этом канале.</value>\n  </data>\n  <data name=\"DeleteMessageForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Оно будет удалено для всех в этом чате.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChannelHint\" xml:space=\"preserve\">\n    <value>Они будут удалены для всех в этом канале.</value>\n  </data>\n  <data name=\"DeleteMessagesForEveryoneInChatHint\" xml:space=\"preserve\">\n    <value>Они будут удалены для всех в этом чате.</value>\n  </data>\n  <data name=\"Invoice\" xml:space=\"preserve\">\n    <value>Счёт</value>\n  </data>\n  <data name=\"TestInvoice\" xml:space=\"preserve\">\n    <value>Тестовый счёт</value>\n  </data>\n  <data name=\"MessageActionPaymentSent\" xml:space=\"preserve\">\n    <value>Вы успешно перевели {0} для {1}</value>\n  </data>\n  <data name=\"MessageActionPaymentSentFor\" xml:space=\"preserve\">\n    <value>Вы успешно перевели {0} пользователю {1} за {2}</value>\n  </data>\n  <data name=\"PaymentInfo\" xml:space=\"preserve\">\n    <value>Платёжная информация</value>\n  </data>\n  <data name=\"Receipt\" xml:space=\"preserve\">\n    <value>Квитанция</value>\n  </data>\n  <data name=\"Address1Street\" xml:space=\"preserve\">\n    <value>Адрес 1 (улица)</value>\n  </data>\n  <data name=\"Address2Street\" xml:space=\"preserve\">\n    <value>Адрес 2 (улица)</value>\n  </data>\n  <data name=\"BillingAddress\" xml:space=\"preserve\">\n    <value>Платёжный адрес</value>\n  </data>\n  <data name=\"CardNumber\" xml:space=\"preserve\">\n    <value>Номер карты</value>\n  </data>\n  <data name=\"Checkout\" xml:space=\"preserve\">\n    <value>Оплатить</value>\n  </data>\n  <data name=\"City\" xml:space=\"preserve\">\n    <value>Город</value>\n  </data>\n  <data name=\"ContactAddress\" xml:space=\"preserve\">\n    <value>Контактный адрес</value>\n  </data>\n  <data name=\"Discount\" xml:space=\"preserve\">\n    <value>Скидка</value>\n  </data>\n  <data name=\"FullName\" xml:space=\"preserve\">\n    <value>Имя полностью</value>\n  </data>\n  <data name=\"MMYY\" xml:space=\"preserve\">\n    <value>ММ/ГГ</value>\n  </data>\n  <data name=\"NameSurname\" xml:space=\"preserve\">\n    <value>Имя и фамилия</value>\n  </data>\n  <data name=\"PaymentCard\" xml:space=\"preserve\">\n    <value>Платёжная карта</value>\n  </data>\n  <data name=\"PaymentMethod\" xml:space=\"preserve\">\n    <value>Способ оплаты</value>\n  </data>\n  <data name=\"Postcode\" xml:space=\"preserve\">\n    <value>Почтовый индекс</value>\n  </data>\n  <data name=\"Receiver\" xml:space=\"preserve\">\n    <value>Получатель</value>\n  </data>\n  <data name=\"SaveShippingInformation\" xml:space=\"preserve\">\n    <value>Сохранить адрес доставки</value>\n  </data>\n  <data name=\"SaveShippingInformationHint\" xml:space=\"preserve\">\n    <value>Вы можете сохранить эти данные, чтобы в будущем использовать их для доставки.</value>\n  </data>\n  <data name=\"SecurityCode\" xml:space=\"preserve\">\n    <value>Код безопасности (CVV)</value>\n  </data>\n  <data name=\"Shipping\" xml:space=\"preserve\">\n    <value>Доставка</value>\n  </data>\n  <data name=\"ShippingAddress\" xml:space=\"preserve\">\n    <value>Адрес доставки</value>\n  </data>\n  <data name=\"ShippingInformation\" xml:space=\"preserve\">\n    <value>Информация о доставке</value>\n  </data>\n  <data name=\"ShippingMethods\" xml:space=\"preserve\">\n    <value>Способы доставки</value>\n  </data>\n  <data name=\"State\" xml:space=\"preserve\">\n    <value>Область</value>\n  </data>\n  <data name=\"Subtotal\" xml:space=\"preserve\">\n    <value>Подытог</value>\n  </data>\n  <data name=\"Taxes\" xml:space=\"preserve\">\n    <value>Налоги</value>\n  </data>\n  <data name=\"TestReceipt\" xml:space=\"preserve\">\n    <value>Тестовая квитанция</value>\n  </data>\n  <data name=\"Total\" xml:space=\"preserve\">\n    <value>Итого</value>\n  </data>\n  <data name=\"TransactionConfirmation\" xml:space=\"preserve\">\n    <value>Вы действительно хотите перевести {0} боту {1} за {2}?</value>\n  </data>\n  <data name=\"TransactionReview\" xml:space=\"preserve\">\n    <value>Ваша транзакция</value>\n  </data>\n  <data name=\"TestCheckout\" xml:space=\"preserve\">\n    <value>Тестовая оплата</value>\n  </data>\n  <data name=\"ShippingMethod\" xml:space=\"preserve\">\n    <value>Способ доставки</value>\n  </data>\n  <data name=\"Name\" xml:space=\"preserve\">\n    <value>Имя</value>\n  </data>\n  <data name=\"Pay\" xml:space=\"preserve\">\n    <value>Оплатить</value>\n  </data>\n  <data name=\"Duplicate\" xml:space=\"preserve\">\n    <value>Дублировать</value>\n  </data>\n  <data name=\"CameraSubtitle\" xml:space=\"preserve\">\n    <value>Настройки камеры</value>\n  </data>\n  <data name=\"ChooseYourCameraApp\" xml:space=\"preserve\">\n    <value>Выберите приложение камеры</value>\n  </data>\n  <data name=\"ExternalCamera\" xml:space=\"preserve\">\n    <value>Внешняя камера</value>\n  </data>\n  <data name=\"InAppCamera\" xml:space=\"preserve\">\n    <value>Камера приложения</value>\n  </data>\n  <data name=\"Calls\" xml:space=\"preserve\">\n    <value>Звонки</value>\n  </data>\n  <data name=\"CallsPrivacyDescription\" xml:space=\"preserve\">\n    <value>Кто может мне звонить?</value>\n  </data>\n  <data name=\"CallsPrivacyImportantNote\" xml:space=\"preserve\">\n    <value>Вы можете выбрать, кому разрешаете позвонить вам.</value>\n  </data>\n  <data name=\"CallsPrivacyOverrideNote\" xml:space=\"preserve\">\n    <value>Этим пользователям будет разрешено или запрещено звонить вам вне зависимости от настроек выше.</value>\n  </data>\n  <data name=\"NoCallsHere\" xml:space=\"preserve\">\n    <value>Нет звонков</value>\n  </data>\n  <data name=\"VoiceCall\" xml:space=\"preserve\">\n    <value>Голосовой вызов</value>\n  </data>\n  <data name=\"CameraRollFolder\" xml:space=\"preserve\">\n    <value>Фотопоток</value>\n  </data>\n  <data name=\"SavedPicturesFolder\" xml:space=\"preserve\">\n    <value>Сохраненные фото</value>\n  </data>\n  <data name=\"ScreenshotsFolder\" xml:space=\"preserve\">\n    <value>Снимки экрана</value>\n  </data>\n  <data name=\"AccessCameraException\" xml:space=\"preserve\">\n    <value>Нет доступа к камере</value>\n  </data>\n  <data name=\"Answer\" xml:space=\"preserve\">\n    <value>Ответить</value>\n  </data>\n  <data name=\"Calling\" xml:space=\"preserve\">\n    <value>Звоним...</value>\n  </data>\n  <data name=\"EmojiKeyDescription\" xml:space=\"preserve\">\n    <value>Если {0} видит те же эмодзи, что и вы, звонок на 100% защищён.</value>\n  </data>\n  <data name=\"EndCall\" xml:space=\"preserve\">\n    <value>Завершить звонок</value>\n  </data>\n  <data name=\"Speaker\" xml:space=\"preserve\">\n    <value>Динамик</value>\n  </data>\n  <data name=\"TouchToReturnToCall\" xml:space=\"preserve\">\n    <value>Нажмите, чтобы вернуться к разговору</value>\n  </data>\n  <data name=\"PaymentProvider\" xml:space=\"preserve\">\n    <value>Платёжный провайдер</value>\n  </data>\n  <data name=\"PaymentsWarning\" xml:space=\"preserve\">\n    <value>Платежи будут отправляться напрямую разработчику {0}. Telegram не предоставляет никаких гарантий, поэтому вы действуете на свой страх и риск. В случае каких-либо проблем, пожалуйста, свяжитесь с разработчиком {0} или с вашим банком.</value>\n  </data>\n  <data name=\"SavePaymentInformation\" xml:space=\"preserve\">\n    <value>Сохранить платёжную информацию</value>\n  </data>\n  <data name=\"SavePaymentInformationHint\" xml:space=\"preserve\">\n    <value>Вы можете сохранить эти данные, чтобы в будущем использовать их для оплаты.</value>\n  </data>\n  <data name=\"SavedCardHint\" xml:space=\"preserve\">\n    <value>У Вас есть сохранённая карта {0}. Чтобы оплатить этой картой, пожалуйста, введите Ваш пароль двухфакторной аутентификации.</value>\n  </data>\n  <data name=\"ChooseDifferentCard\" xml:space=\"preserve\">\n    <value>Выберите другую карту</value>\n  </data>\n  <data name=\"Payments\" xml:space=\"preserve\">\n    <value>Платежи</value>\n  </data>\n  <data name=\"PaymentsSubtitle\" xml:space=\"preserve\">\n    <value>Очистить информацию о платежах и доставке</value>\n  </data>\n  <data name=\"ShippingInfo\" xml:space=\"preserve\">\n    <value>Информация о доставке</value>\n  </data>\n  <data name=\"Ringing\" xml:space=\"preserve\">\n    <value>Вызов</value>\n  </data>\n  <data name=\"TurnOnTwoStepVerification\" xml:space=\"preserve\">\n    <value>Чтобы сделать это, пожалуйста, *настройте двухэтапную аутентификацию*.</value>\n  </data>\n  <data name=\"ChooseYourPhotoPickerApp\" xml:space=\"preserve\">\n    <value>Выберите приложение для выбора фото</value>\n  </data>\n  <data name=\"ExternalPhotoPicker\" xml:space=\"preserve\">\n    <value>Внешнее приложение</value>\n  </data>\n  <data name=\"InAppPhotoPicker\" xml:space=\"preserve\">\n    <value>Внутреннее приложение</value>\n  </data>\n  <data name=\"PhotoPicker\" xml:space=\"preserve\">\n    <value>Выбор фото</value>\n  </data>\n  <data name=\"PhotoPickerSubtitle\" xml:space=\"preserve\">\n    <value>Управление настройками выбора фото</value>\n  </data>\n  <data name=\"Chat\" xml:space=\"preserve\">\n    <value>Чат</value>\n  </data>\n  <data name=\"Ignore\" xml:space=\"preserve\">\n    <value>Игнорировать</value>\n  </data>\n  <data name=\"AddOptionalComment\" xml:space=\"preserve\">\n    <value>Оставьте комментарий (необязательно)</value>\n  </data>\n  <data name=\"RateCallQuality\" xml:space=\"preserve\">\n    <value>Пожалуйста, оцените качество звонка</value>\n  </data>\n  <data name=\"VoipBusy\" xml:space=\"preserve\">\n    <value>Занято</value>\n  </data>\n  <data name=\"VoipConnecting\" xml:space=\"preserve\">\n    <value>Соединение</value>\n  </data>\n  <data name=\"VoipEnded\" xml:space=\"preserve\">\n    <value>Вызов завершён</value>\n  </data>\n  <data name=\"VoipExchangingKeys\" xml:space=\"preserve\">\n    <value>Обмен ключами шифрования</value>\n  </data>\n  <data name=\"VoipFailed\" xml:space=\"preserve\">\n    <value>Вызов не удался</value>\n  </data>\n  <data name=\"VoipHangingUp\" xml:space=\"preserve\">\n    <value>Завершение</value>\n  </data>\n  <data name=\"VoipIncoming\" xml:space=\"preserve\">\n    <value>Входящий звонок</value>\n  </data>\n  <data name=\"VoipRequesting\" xml:space=\"preserve\">\n    <value>Запрос</value>\n  </data>\n  <data name=\"VoipRinging\" xml:space=\"preserve\">\n    <value>Вызов</value>\n  </data>\n  <data name=\"VoipWaiting\" xml:space=\"preserve\">\n    <value>Ожидание</value>\n  </data>\n  <data name=\"CallInProgressNotification\" xml:space=\"preserve\">\n    <value>У вас есть текущий звонок с {0}.</value>\n  </data>\n  <data name=\"Connection\" xml:space=\"preserve\">\n    <value>Соединение</value>\n  </data>\n  <data name=\"ConnectionType\" xml:space=\"preserve\">\n    <value>Тип соединения</value>\n  </data>\n  <data name=\"CredentionalsOptional\" xml:space=\"preserve\">\n    <value>Учетные данные (не обязательно)</value>\n  </data>\n  <data name=\"Port\" xml:space=\"preserve\">\n    <value>Порт</value>\n  </data>\n  <data name=\"Server\" xml:space=\"preserve\">\n    <value>Сервер</value>\n  </data>\n  <data name=\"Socks5\" xml:space=\"preserve\">\n    <value>SOCKS5</value>\n  </data>\n  <data name=\"UseProxy\" xml:space=\"preserve\">\n    <value>Использовать настройки прокси</value>\n  </data>\n  <data name=\"Proxy\" xml:space=\"preserve\">\n    <value>Настройки прокси</value>\n  </data>\n  <data name=\"ConnectingToProxy\" xml:space=\"preserve\">\n    <value>Соединение с прокси</value>\n  </data>\n  <data name=\"EnableProxyConfigmation\" xml:space=\"preserve\">\n    <value>Вы уверены, что хотите включить этот прокси?</value>\n  </data>\n  <data name=\"ChangeProxy\" xml:space=\"preserve\">\n    <value>Прокси</value>\n  </data>\n  <data name=\"ChangeProxyServerHint\" xml:space=\"preserve\">\n    <value>Вы всегда можете изменить прокси-сервер в настройках.</value>\n  </data>\n  <data name=\"UseProxyHint\" xml:space=\"preserve\">\n    <value>Настройки SOCKS5-прокси</value>\n  </data>\n  <data name=\"DeclinedCall\" xml:space=\"preserve\">\n    <value>Отклонённый вызов</value>\n  </data>\n  <data name=\"MessageActionDeclinedCall\" xml:space=\"preserve\">\n    <value>Отклонённый вызов</value>\n  </data>\n  <data name=\"VideoMessage\" xml:space=\"preserve\">\n    <value>Видеосообщение</value>\n  </data>\n  <data name=\"PeerToPeer\" xml:space=\"preserve\">\n    <value>Peer-to-Peer</value>\n  </data>\n  <data name=\"PeerToPeerDescription\" xml:space=\"preserve\">\n    <value>Если выключить peer-to-peer, все звонки будут идти через серверы Telegram. Собеседник не сможет узнать ваш IP-адрес, но качество звука немного ухудшится.</value>\n  </data>\n  <data name=\"Bio\" xml:space=\"preserve\">\n    <value>Био</value>\n  </data>\n  <data name=\"BioDescription\" xml:space=\"preserve\">\n    <value>Добавьте пару строк о себе. Любой кто откроет профиль, увидит этот текст.</value>\n  </data>\n  <data name=\"MessageActionPhotoExpired\" xml:space=\"preserve\">\n    <value>Срок жизни фотографии истёк</value>\n  </data>\n  <data name=\"MessageActionVideoExpired\" xml:space=\"preserve\">\n    <value>Срок жизни видео истёк</value>\n  </data>\n  <data name=\"Timer\" xml:space=\"preserve\">\n    <value>Таймер</value>\n  </data>\n  <data name=\"SelfDestructTimerPhotoSubtitle\" xml:space=\"preserve\">\n    <value>Если вы поставите таймер, фотография самоуничтожится после просмотра.</value>\n  </data>\n  <data name=\"SelfDestructTimerVideoSubtitle\" xml:space=\"preserve\">\n    <value>Если вы поставите таймер, видео самоуничтожится после просмотра.</value>\n  </data>\n  <data name=\"SecretPhoto\" xml:space=\"preserve\">\n    <value>Секретное фото</value>\n  </data>\n  <data name=\"SecretVideo\" xml:space=\"preserve\">\n    <value>Секретное видео</value>\n  </data>\n  <data name=\"ChooseFromYourStickers\" xml:space=\"preserve\">\n    <value>Выберите из своих стикеров</value>\n  </data>\n  <data name=\"CreateStickerSetHint\" xml:space=\"preserve\">\n    <value>Вы можете создать свои собственные наборы стикеров, используя бота @stickers.</value>\n  </data>\n  <data name=\"GroupStickers\" xml:space=\"preserve\">\n    <value>Групповые стикеры</value>\n  </data>\n  <data name=\"GroupStickersDescription\" xml:space=\"preserve\">\n    <value>Вы можете выбрать набор стикеров, чтобы все участники могли отправлять эти стикеры в группу.</value>\n  </data>\n  <data name=\"AddToFavorites\" xml:space=\"preserve\">\n    <value>Добавить в Избранное</value>\n  </data>\n  <data name=\"DeleteFromFavorites\" xml:space=\"preserve\">\n    <value>Удалить из Избранного</value>\n  </data>\n  <data name=\"NoStickerSetFound\" xml:space=\"preserve\">\n    <value>Набор стикеров не найден</value>\n  </data>\n  <data name=\"NoStickerSetFoundSubtitle\" xml:space=\"preserve\">\n    <value>Попробуйте ещё раз или выберите из списка ниже</value>\n  </data>\n  <data name=\"Auto\" xml:space=\"preserve\">\n    <value>Авто</value>\n  </data>\n  <data name=\"VideoQuality\" xml:space=\"preserve\">\n    <value>Качество видео</value>\n  </data>\n  <data name=\"Quality\" xml:space=\"preserve\">\n    <value>Качество</value>\n  </data>\n  <data name=\"ClearUnreadMentionsConfirmation\" xml:space=\"preserve\">\n    <value>Вы уверены, что хотите очистить все непрочитанные упоминания?</value>\n  </data>\n  <data name=\"PasswordEmail\" xml:space=\"preserve\">\n    <value>Пароль и E-mail</value>\n  </data>\n  <data name=\"CreatePasswordHint\" xml:space=\"preserve\">\n    <value>Пожалуйста, создайте пароль для защиты своей платёжной информации. При каждом входе его будут у вас спрашивать.</value>\n  </data>\n  <data name=\"SendLiveLocation\" xml:space=\"preserve\">\n    <value>Транслировать геопозицию...</value>\n  </data>\n  <data name=\"SendLiveLocationSubtitle\" xml:space=\"preserve\">\n    <value>Обновляется в реальном времени</value>\n  </data>\n  <data name=\"LiveLocation\" xml:space=\"preserve\">\n    <value>Трансляция геопозиции</value>\n  </data>\n  <data name=\"ShareLiveLocationToContactTimerSubtitle\" xml:space=\"preserve\">\n    <value>Выберите, как долго делиться точным местоположением с {0}.</value>\n  </data>\n  <data name=\"ContactJoinedTelegram\" xml:space=\"preserve\">\n    <value>Контакт присоединился к Telegram</value>\n  </data>\n  <data name=\"Events\" xml:space=\"preserve\">\n    <value>События</value>\n  </data>\n  <data name=\"ChatHistoryCaption\" xml:space=\"preserve\">\n    <value>История чата для новых участников</value>\n  </data>\n  <data name=\"ChatHistoryHidden\" xml:space=\"preserve\">\n    <value>Новые участники не будут видеть старые сообщения</value>\n  </data>\n  <data name=\"ChatHistoryVisible\" xml:space=\"preserve\">\n    <value>Новые участники будут видеть всю историю чата</value>\n  </data>\n  <data name=\"DescriptionOptional\" xml:space=\"preserve\">\n    <value>Описание (не обязательно)</value>\n  </data>\n  <data name=\"Hidden\" xml:space=\"preserve\">\n    <value>Скрыта</value>\n  </data>\n  <data name=\"Visible\" xml:space=\"preserve\">\n    <value>Видна</value>\n  </data>\n  <data name=\"LocationSharingEnded\" xml:space=\"preserve\">\n    <value>Показ местоположения завершён</value>\n  </data>\n  <data name=\"Map\" xml:space=\"preserve\">\n    <value>Карта</value>\n  </data>\n  <data name=\"MessageActionPinGeoLive\" xml:space=\"preserve\">\n    <value>{0} закрепил(а) текущее местоположение</value>\n  </data>\n  <data name=\"For15Minutes\" xml:space=\"preserve\">\n    <value>15 минут</value>\n  </data>\n  <data name=\"For1Hour\" xml:space=\"preserve\">\n    <value>1 час</value>\n  </data>\n  <data name=\"For8Hours\" xml:space=\"preserve\">\n    <value>8 часов</value>\n  </data>\n  <data name=\"MessageActionClearHistory\" xml:space=\"preserve\">\n    <value>История была очищена</value>\n  </data>\n  <data name=\"Updated\" xml:space=\"preserve\">\n    <value>Обновлена</value>\n  </data>\n  <data name=\"UpdatedAgo\" xml:space=\"preserve\">\n    <value>Обновлена {0} назад</value>\n  </data>\n  <data name=\"UpdatedAtDate\" xml:space=\"preserve\">\n    <value>Обновлена {0} в {1}</value>\n  </data>\n  <data name=\"UpdatedJustNow\" xml:space=\"preserve\">\n    <value>Обновлена только что</value>\n  </data>\n  <data name=\"UpdatedTodayAt\" xml:space=\"preserve\">\n    <value>Обновлена сегодня в {0}</value>\n  </data>\n  <data name=\"UpdatedYesterdayAt\" xml:space=\"preserve\">\n    <value>Обновлена вчера в {0}</value>\n  </data>\n  <data name=\"StopSharingLocation\" xml:space=\"preserve\">\n    <value>Остановить трансляцию</value>\n  </data>\n  <data name=\"ShareLiveLocationToChatTimerSubtitle\" xml:space=\"preserve\">\n    <value>Выберите, как долго люди из этого чата будут видеть ваше точное местоположение.</value>\n  </data>\n  <data name=\"NewStickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Новых стикерпаков</value>\n  </data>\n  <data name=\"NewStickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Новых стикерпака</value>\n  </data>\n  <data name=\"StickerPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Стикерпаков</value>\n  </data>\n  <data name=\"StickerPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Стикерпака</value>\n  </data>\n  <data name=\"MaskPackGenitivePlural\" xml:space=\"preserve\">\n    <value>Наборов масок</value>\n  </data>\n  <data name=\"MaskPackGenitiveSingular\" xml:space=\"preserve\">\n    <value>Набора масок</value>\n  </data>\n  <data name=\"GroupNameInvalid\" xml:space=\"preserve\">\n    <value>Извините, такое имя недопустимо.</value>\n  </data>\n  <data name=\"GroupNameOccupied\" xml:space=\"preserve\">\n    <value>Извините, это имя уже занято.</value>\n  </data>\n  <data name=\"GroupNameShort\" xml:space=\"preserve\">\n    <value>Имена групп должны содержать не менее 5 символов.</value>\n  </data>\n  <data name=\"GroupNameStartsWithNumber\" xml:space=\"preserve\">\n    <value>Имена групп не могут начинаться с цифры.</value>\n  </data>\n  <data name=\"AttachLiveLocationIsSharing\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"SharingLiveLocationTitle\" xml:space=\"preserve\">\n    <value>Вы транслируете свое местоположение в {0}</value>\n  </data>\n  <data name=\"SharingYouAndOtherName\" xml:space=\"preserve\">\n    <value>Вы и {0}</value>\n  </data>\n  <data name=\"StopAllLocationSharings\" xml:space=\"preserve\">\n    <value>Прекратить</value>\n  </data>\n  <data name=\"StopLiveLocationAlertAll\" xml:space=\"preserve\">\n    <value>Вы точно хотите прекратить транслировать свою геопозицию?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToGroup\" xml:space=\"preserve\">\n    <value>Вы точно хотите прекратить транслировать свою геопозицию в чат {0}?</value>\n  </data>\n  <data name=\"StopLiveLocationAlertToUser\" xml:space=\"preserve\">\n    <value>Прекратить делиться текущим местоположением с пользователем {0}?</value>\n  </data>\n  <data name=\"HourShort\" xml:space=\"preserve\">\n    <value>ч</value>\n  </data>\n  <data name=\"ChatGenitivePlural\" xml:space=\"preserve\">\n    <value>Чатов</value>\n  </data>\n  <data name=\"ChatGenitiveSingular\" xml:space=\"preserve\">\n    <value>Чата</value>\n  </data>\n  <data name=\"ChatNominativePlural\" xml:space=\"preserve\">\n    <value>Чаты</value>\n  </data>\n  <data name=\"ChatNominativeSingular\" xml:space=\"preserve\">\n    <value>Чат</value>\n  </data>\n  <data name=\"SavedMessages\" xml:space=\"preserve\">\n    <value>Избранное</value>\n  </data>\n  <data name=\"ForwardHereToSave\" xml:space=\"preserve\">\n    <value>Сохранить на память</value>\n  </data>\n  <data name=\"MicrophoneAccessDenied\" xml:space=\"preserve\">\n    <value>Доступ к микрофону запрещен</value>\n  </data>\n  <data name=\"MicrophoneAccessDeniedDescription\" xml:space=\"preserve\">\n    <value>Telegram не может получить доступ к микрофону. Пожалуйста, проверьте, что вы разрешили Telegram использовать микрофон в настойках безопасности и перезапустите приложение.</value>\n  </data>\n  <data name=\"SendCallLogs\" xml:space=\"preserve\">\n    <value>Отправить лог звонков</value>\n  </data>\n  <data name=\"GroupMediaDescription\" xml:space=\"preserve\">\n    <value>Объединить фотографии в альбом</value>\n  </data>\n  <data name=\"UngroupMediaDescription\" xml:space=\"preserve\">\n    <value>Не группировать фотографии</value>\n  </data>\n  <data name=\"DeletedUser\" xml:space=\"preserve\">\n    <value>Удаленный аккаунт</value>\n  </data>\n  <data name=\"EmptyUser\" xml:space=\"preserve\">\n    <value>Удаленный аккаунт</value>\n  </data>\n  <data name=\"Album\" xml:space=\"preserve\">\n    <value>Альбом</value>\n  </data>\n  <data name=\"DeleteMessagesConfirmation\" xml:space=\"preserve\">\n    <value>Вы действительно хотите удалить {0}?</value>\n  </data>\n  <data name=\"MessageGenitivePlural\" xml:space=\"preserve\">\n    <value>Сообщений</value>\n  </data>\n  <data name=\"MessageGenitiveSingular\" xml:space=\"preserve\">\n    <value>Сообщения</value>\n  </data>\n  <data name=\"MessageNominativePlural\" xml:space=\"preserve\">\n    <value>Сообщения</value>\n  </data>\n  <data name=\"MessageNominativeSingular\" xml:space=\"preserve\">\n    <value>Сообщение</value>\n  </data>\n  <data name=\"SubscriberGenitivePlural\" xml:space=\"preserve\">\n    <value>Подписчиков</value>\n  </data>\n  <data name=\"SubscriberGenitiveSingular\" xml:space=\"preserve\">\n    <value>Подписчика</value>\n  </data>\n  <data name=\"SubscriberNominativePlural\" xml:space=\"preserve\">\n    <value>Подписчики</value>\n  </data>\n  <data name=\"SubscriberNominativeSingular\" xml:space=\"preserve\">\n    <value>Подписчик</value>\n  </data>\n  <data name=\"LogOutAllApplications\" xml:space=\"preserve\">\n    <value>Отключить все сайты</value>\n  </data>\n  <data name=\"LogOutAllApplicationsNote\" xml:space=\"preserve\">\n    <value/>\n  </data>\n  <data name=\"LoggedInWithTelegram\" xml:space=\"preserve\">\n    <value>Авторизованные сайты</value>\n  </data>\n  <data name=\"LogOutAllApplicationsConfirmation\" xml:space=\"preserve\">\n    <value>Вы действительно хотите отключить все сайты, где авторизованы через Telegram?</value>\n  </data>\n  <data name=\"NoItemsHere\" xml:space=\"preserve\">\n    <value>Нет элементов</value>\n  </data>\n  <data name=\"Group\" xml:space=\"preserve\">\n    <value>Группировать</value>\n  </data>\n  <data name=\"Ungroup\" xml:space=\"preserve\">\n    <value>Разгруппировать</value>\n  </data>\n  <data name=\"AboutApp\" xml:space=\"preserve\">\n    <value>О приложении</value>\n  </data>\n  <data name=\"NoActiveLogins\" xml:space=\"preserve\">\n    <value>Нет активных авторизаций.\n\nВы можете использовать свой аккаунт для авторизации на сайтах, которые поддерживают вход через Telegram.</value>\n  </data>\n  <data name=\"Feed\" xml:space=\"preserve\">\n    <value>Лента</value>\n  </data>\n  <data name=\"ChannelGenitivePlural\" xml:space=\"preserve\">\n    <value>Каналов</value>\n  </data>\n  <data name=\"ChannelGenitiveSingular\" xml:space=\"preserve\">\n    <value>Канала</value>\n  </data>\n  <data name=\"ChannelNominativePlural\" xml:space=\"preserve\">\n    <value>Каналы</value>\n  </data>\n  <data name=\"ChannelNominativeSingular\" xml:space=\"preserve\">\n    <value>Канал</value>\n  </data>\n  <data name=\"ShowNext\" xml:space=\"preserve\">\n    <value>Следующий</value>\n  </data>\n  <data name=\"GroupNewChannels\" xml:space=\"preserve\">\n    <value>Группировать новые каналы</value>\n  </data>\n  <data name=\"MessageActionBotAllowed\" xml:space=\"preserve\">\n    <value>Вы разрешили этому боту писать вам, когда авторизовались на {0}.</value>\n  </data>\n  <data name=\"NoStickersFound\" xml:space=\"preserve\">\n    <value>Стикеры не найдены</value>\n  </data>\n  <data name=\"ConnectedWebsites\" xml:space=\"preserve\">\n    <value>Подключенные сайты</value>\n  </data>\n  <data name=\"ConnectedWebsitesHint\" xml:space=\"preserve\">\n    <value>Вы можете использовать свой аккаунт для авторизации на сайтах, которые поддерживают вход через Telegram.</value>\n  </data>\n  <data name=\"TapToDisconnectTelegramAccount\" xml:space=\"preserve\">\n    <value>Нажмите на сайт, чтобы отключить его.</value>\n  </data>\n  <data name=\"TelegramPassport\" xml:space=\"preserve\">\n    <value>Telegram Passport</value>\n  </data>\n  <data name=\"Authorize\" xml:space=\"preserve\">\n    <value>Авторизоваться</value>\n  </data>\n  <data name=\"Email2\" xml:space=\"preserve\">\n    <value>Электронная почта</value>\n  </data>\n  <data name=\"PassportPersonalDetailsInfo\" xml:space=\"preserve\">\n    <value>Укажите данные о себе</value>\n  </data>\n  <data name=\"PassportHint\" xml:space=\"preserve\">\n    <value>Для регистрации {0} запрашивает доступ к вашей личной информации.</value>\n  </data>\n  <data name=\"PassportAddress\" xml:space=\"preserve\">\n    <value>Адрес</value>\n  </data>\n  <data name=\"PassportAddressInfo\" xml:space=\"preserve\">\n    <value>Загрузите подтверждение адреса</value>\n  </data>\n  <data name=\"PassportNoPolicy\" xml:space=\"preserve\">\n    <value>Вы отправите документы напрямую {0} и разрешите их боту {1} писать вам сообщения.</value>\n  </data>\n  <data name=\"AllSets\" xml:space=\"preserve\">\n    <value>Все</value>\n  </data>\n  <data name=\"MySets\" xml:space=\"preserve\">\n    <value>Свои наборы</value>\n  </data>\n  <data name=\"None\" xml:space=\"preserve\">\n    <value>Нет</value>\n  </data>\n  <data name=\"SuggestStickersByEmoji\" xml:space=\"preserve\">\n    <value>Подсказка при вводе эмодзи</value>\n  </data>\n  <data name=\"MTProto\" xml:space=\"preserve\">\n    <value>MTPROTO</value>\n  </data>\n  <data name=\"UseProxyForCalls\" xml:space=\"preserve\">\n    <value>Использовать прокси для звонков</value>\n  </data>\n  <data name=\"UseProxyForCallsHint\" xml:space=\"preserve\">\n    <value>Использование прокси может ухудшить качество звонков.</value>\n  </data>\n  <data name=\"Connections\" xml:space=\"preserve\">\n    <value>Подключения</value>\n  </data>\n  <data name=\"AddProxy\" xml:space=\"preserve\">\n    <value>Добавить прокси</value>\n  </data>\n  <data name=\"Secret\" xml:space=\"preserve\">\n    <value>Ключ</value>\n  </data>\n  <data name=\"UseTelegramProxyHint\" xml:space=\"preserve\">\n    <value>Настройки прокси MTProto</value>\n  </data>\n  <data name=\"Available\" xml:space=\"preserve\">\n    <value>Доступен</value>\n  </data>\n  <data name=\"Checking\" xml:space=\"preserve\">\n    <value>Проверка</value>\n  </data>\n  <data name=\"Connected\" xml:space=\"preserve\">\n    <value>Подключен</value>\n  </data>\n  <data name=\"Unavailable\" xml:space=\"preserve\">\n    <value>Недоступен</value>\n  </data>\n  <data name=\"TermsOfService\" xml:space=\"preserve\">\n    <value>Пользовательское соглашение</value>\n  </data>\n  <data name=\"TermsOfServiceLink\" xml:space=\"preserve\">\n    <value>Регистрируясь,\nВы принимаете *Пользовательское соглашение*.</value>\n  </data>\n  <data name=\"DeleteSyncedContacts\" xml:space=\"preserve\">\n    <value>Удалить импортированные контакты</value>\n  </data>\n  <data name=\"SyncContacts\" xml:space=\"preserve\">\n    <value>Синхронизировать контакты</value>\n  </data>\n  <data name=\"SyncContactsDeleteInfo\" xml:space=\"preserve\">\n    <value>В этом случае ваши контакты будут удалены с серверов Telegram. Если включена опция «Синхронизировать контакты», контакты синхронизируются заново.</value>\n  </data>\n  <data name=\"SyncContactsInfoOff\" xml:space=\"preserve\">\n    <value>Включите, чтобы добавлять контакты с этого устройства к Вашему аккаунту.</value>\n  </data>\n  <data name=\"SyncContactsInfoOn\" xml:space=\"preserve\">\n    <value>Контакты с этого устройства будут импортироваться для этого аккаунта.</value>\n  </data>\n  <data name=\"LinkPreviewsHint\" xml:space=\"preserve\">\n    <value>Предпросмотр для ссылок создается на серверах Telegram. Мы не храним данные об отправленных Вами ссылках.</value>\n  </data>\n  <data name=\"DeleteSyncedContactsConfirmation\" xml:space=\"preserve\">\n    <value>В этом случае ваши контакты будут удалены с серверов Telegram. Если включена опция «Синхронизировать контакты», контакты синхронизируются заново.</value>\n  </data>\n  <data name=\"ProxyDisabledNotification\" xml:space=\"preserve\">\n    <value>Подключенный вами прокси-сервер использует некорректные настройки и будет выключен. Пожалуйста, выберите другой.</value>\n  </data>\n  <data name=\"ProxySponsor\" xml:space=\"preserve\">\n    <value>Спонсор прокси</value>\n  </data>\n  <data name=\"ProxySponsorAbout\" xml:space=\"preserve\">\n    <value>Этот канал показан прокси-сервером. Чтобы убрать канал из списка чатов, отключите прокси в настройках Telegram.</value>\n  </data>\n  <data name=\"ProxySponsorWarning\" xml:space=\"preserve\">\n    <value>Этот прокси-сервер может показывать канал спонсора в списке ваших чатов. Это не раскрывает ваш трафик.</value>\n  </data>\n  <data name=\"MarkRead\" xml:space=\"preserve\">\n    <value>Пометить как прочитанное</value>\n  </data>\n  <data name=\"MarkUnread\" xml:space=\"preserve\">\n    <value>Пометить как непрочитанное</value>\n  </data>\n  <data name=\"SuggestFrequentContacts\" xml:space=\"preserve\">\n    <value>Подсказка людей при поиске</value>\n  </data>\n  <data name=\"SuggestFrequentContactsAbout\" xml:space=\"preserve\">\n    <value>Показывать пользователей, которым вы часто пишете, вверху в разделе поиска.</value>\n  </data>\n  <data name=\"SuggestFrequentContactsNotification\" xml:space=\"preserve\">\n    <value>В этом случае информация о том, каким пользователям вы часто пишете и какими ботами обычно пользуетесь, будет удалена.</value>\n  </data>\n  <data name=\"ViewContact\" xml:space=\"preserve\">\n    <value>Просмотр контакта</value>\n  </data>\n  <data name=\"PhoneKindHome\" xml:space=\"preserve\">\n    <value>Дом</value>\n  </data>\n  <data name=\"PhoneKindMobile\" xml:space=\"preserve\">\n    <value>Телефон</value>\n  </data>\n  <data name=\"PhoneKindOther\" xml:space=\"preserve\">\n    <value>Другое</value>\n  </data>\n  <data name=\"PhoneKindWork\" xml:space=\"preserve\">\n    <value>Работа</value>\n  </data>\n  <data name=\"PassportAddAgreement\" xml:space=\"preserve\">\n    <value>Добавить договор об аренде</value>\n  </data>\n  <data name=\"PassportAddAgreementInfo\" xml:space=\"preserve\">\n    <value>Загрузите скан договора об аренде.</value>\n  </data>\n  <data name=\"PassportAddBank\" xml:space=\"preserve\">\n    <value>Добавить справку из банка</value>\n  </data>\n  <data name=\"PassportAddBankInfo\" xml:space=\"preserve\">\n    <value>Загрузите скан справки из банка</value>\n  </data>\n  <data name=\"PassportAddBill\" xml:space=\"preserve\">\n    <value>Добавить коммунальный счёт</value>\n  </data>\n  <data name=\"PassportAddBillInfo\" xml:space=\"preserve\">\n    <value>Загрузите скан коммунального платежа.</value>\n  </data>\n  <data name=\"PassportAddPassportRegistration\" xml:space=\"preserve\">\n    <value>Прописка</value>\n  </data>\n  <data name=\"PassportAddPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>Загрузите скан страницы паспорта с пропиской</value>\n  </data>\n  <data name=\"PassportAddressHeader\" xml:space=\"preserve\">\n    <value>Адрес</value>\n  </data>\n  <data name=\"PassportCity\" xml:space=\"preserve\">\n    <value>Город</value>\n  </data>\n  <data name=\"PassportCountry\" xml:space=\"preserve\">\n    <value>Страна</value>\n  </data>\n  <data name=\"PassportDeleteDocument\" xml:space=\"preserve\">\n    <value>Удалить документ</value>\n  </data>\n  <data name=\"PassportDeleteDocumentAlert\" xml:space=\"preserve\">\n    <value>Вы точно хотите удалить этот документ?</value>\n  </data>\n  <data name=\"PassportDeleteScan\" xml:space=\"preserve\">\n    <value>Удалить скан</value>\n  </data>\n  <data name=\"PassportDocuments\" xml:space=\"preserve\">\n    <value>Сканы</value>\n  </data>\n  <data name=\"PassportPostcode\" xml:space=\"preserve\">\n    <value>Индекс</value>\n  </data>\n  <data name=\"PassportState\" xml:space=\"preserve\">\n    <value>Область</value>\n  </data>\n  <data name=\"PassportStreet1\" xml:space=\"preserve\">\n    <value>Улица</value>\n  </data>\n  <data name=\"PassportStreet2\" xml:space=\"preserve\">\n    <value>Улица</value>\n  </data>\n  <data name=\"PassportUploadAdditinalDocument\" xml:space=\"preserve\">\n    <value>Загрузить дополнительные сканы</value>\n  </data>\n  <data name=\"PassportUploadDocument\" xml:space=\"preserve\">\n    <value>Загрузить сканы</value>\n  </data>\n  <data name=\"PassportDeleteScanAlert\" xml:space=\"preserve\">\n    <value>Вы точно хотите удалить этот скан?</value>\n  </data>\n  <data name=\"PassportEmailInfo\" xml:space=\"preserve\">\n    <value>Укажите свой адрес электронной почты</value>\n  </data>\n  <data name=\"PassportPhoneInfo\" xml:space=\"preserve\">\n    <value>Укажите свой номер телефона</value>\n  </data>\n  <data name=\"UpdateApp\" xml:space=\"preserve\">\n    <value>Обновить приложение</value>\n  </data>\n  <data name=\"PassportPhone\" xml:space=\"preserve\">\n    <value>Номер телефона</value>\n  </data>\n  <data name=\"PassportPhoneUploadInfo\" xml:space=\"preserve\">\n    <value>Обратите внимание: на указанный вами номер телефона придет код подтверждения.</value>\n  </data>\n  <data name=\"PassportPhoneUseOther\" xml:space=\"preserve\">\n    <value>Или введите другой номер телефона</value>\n  </data>\n  <data name=\"PassportPhoneUseSame\" xml:space=\"preserve\">\n    <value>Использовать {0}</value>\n  </data>\n  <data name=\"PassportPhoneUseSameInfo\" xml:space=\"preserve\">\n    <value>Используйте тот же номер телефона, что и в Telegram.</value>\n  </data>\n  <data name=\"PassportDeletePhoneNumberAlert\" xml:space=\"preserve\">\n    <value>Вы действительно хотите удалить номер телефона?</value>\n  </data>\n  <data name=\"MessageActionSecureValuesSent\" xml:space=\"preserve\">\n    <value>{0} получил следующие документы: {1}</value>\n  </data>\n  <data name=\"DeleteAllCloudDrafts\" xml:space=\"preserve\">\n    <value>Удалить черновики</value>\n  </data>\n  <data name=\"DeleteAllCloudDraftsConfirmation\" xml:space=\"preserve\">\n    <value>Вы действительно хотите удалить все черновики сообщений, сохраненные в облаке?</value>\n  </data>\n  <data name=\"PassportRequestPasswordInfo\" xml:space=\"preserve\">\n    <value>Для расшифровки данных введите свой пароль от Telegram.</value>\n  </data>\n  <data name=\"PassportSelfRequest\" xml:space=\"preserve\">\n    <value>Для доступа к личной информации, пожалуйста, введите свой пароль.</value>\n  </data>\n  <data name=\"PassportDelete\" xml:space=\"preserve\">\n    <value>Удалить</value>\n  </data>\n  <data name=\"PassportNoDocumentsAdd\" xml:space=\"preserve\">\n    <value>Добавить документ</value>\n  </data>\n  <data name=\"PassportEmail\" xml:space=\"preserve\">\n    <value>Email</value>\n  </data>\n  <data name=\"PassportPersonal\" xml:space=\"preserve\">\n    <value>Личная информация</value>\n  </data>\n  <data name=\"PassportUtilityBill\" xml:space=\"preserve\">\n    <value>Коммунальный счёт</value>\n  </data>\n  <data name=\"PassportProvidedInformation\" xml:space=\"preserve\">\n    <value>Предоставленная информация</value>\n  </data>\n  <data name=\"PassportRequestedInformation\" xml:space=\"preserve\">\n    <value>Необходимая информация</value>\n  </data>\n  <data name=\"PassportDeleteConfirmation\" xml:space=\"preserve\">\n    <value>Вы точно хотите удалить свой Telegram Passport?</value>\n  </data>\n  <data name=\"Passport\" xml:space=\"preserve\">\n    <value>Паспорт</value>\n  </data>\n  <data name=\"PassportBankStatement\" xml:space=\"preserve\">\n    <value>Справка из банка</value>\n  </data>\n  <data name=\"PassportDriverLicence\" xml:space=\"preserve\">\n    <value>Водительские права</value>\n  </data>\n  <data name=\"PassportEmailAddress\" xml:space=\"preserve\">\n    <value>Электронная почта</value>\n  </data>\n  <data name=\"PassportIdentityCard\" xml:space=\"preserve\">\n    <value>Удостоверение личности</value>\n  </data>\n  <data name=\"PassportInternal\" xml:space=\"preserve\">\n    <value>Внутренний паспорт</value>\n  </data>\n  <data name=\"PassportPersonalDetails\" xml:space=\"preserve\">\n    <value>Личная информация</value>\n  </data>\n  <data name=\"PassportPhoneNumber\" xml:space=\"preserve\">\n    <value>Номер телефона</value>\n  </data>\n  <data name=\"PassportRegistration\" xml:space=\"preserve\">\n    <value>Прописка</value>\n  </data>\n  <data name=\"PassportTemporaryRegistration\" xml:space=\"preserve\">\n    <value>Временная прописка</value>\n  </data>\n  <data name=\"PassportTenancyAgreement\" xml:space=\"preserve\">\n    <value>Договор об аренде</value>\n  </data>\n  <data name=\"PassportDeleteEmailAlert\" xml:space=\"preserve\">\n    <value>Вы действительно хотите удалить почту?</value>\n  </data>\n  <data name=\"PassportDeleteAll\" xml:space=\"preserve\">\n    <value>Удалить Telegram Passport</value>\n  </data>\n  <data name=\"PassportDeleteAddressAlert\" xml:space=\"preserve\">\n    <value>Вы точно хотите удалить данные об адресе?</value>\n  </data>\n  <data name=\"PassportAddTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Загрузитe скан временной прописки.</value>\n  </data>\n  <data name=\"PassportResidentialAddress\" xml:space=\"preserve\">\n    <value>Адрес проживания</value>\n  </data>\n  <data name=\"PassportDeleteAddressDetails\" xml:space=\"preserve\">\n    <value>Удалить данные об адресе</value>\n  </data>\n  <data name=\"PassportUploadMaxReached\" xml:space=\"preserve\">\n    <value>Невозможно загрузить больше {0} файлов.</value>\n  </data>\n  <data name=\"PassportCorrectErrors\" xml:space=\"preserve\">\n    <value>Нажмите, чтобы внести исправления.</value>\n  </data>\n  <data name=\"PassportUseLatinOnly\" xml:space=\"preserve\">\n    <value>Пожалуйста, используйте только латиницу.</value>\n  </data>\n  <data name=\"PassportInfo\" xml:space=\"preserve\">\n    <value>С помощью Telegram Passport можно зарегистрироваться на сайтах и сервисах, где требуется идентификация личности.\n\nВаша информация, персональные данные и документы защищены оконечным шифрованием (end-to-end). Никто, включая Telegram, не сможет получить к ним доступ без Вашего согласия.\n\nПочитать об этом подробнее можно в нашем FAQ.</value>\n  </data>\n  <data name=\"PassportFormError\" xml:space=\"preserve\">\n    <value>Не получить форму авторизации.</value>\n  </data>\n  <data name=\"TurnPasswordOffPassport\" xml:space=\"preserve\">\n    <value>Внимание! Все данные, сохранённые в вашем Telegram Passport, будут потеряны!</value>\n  </data>\n  <data name=\"TurnPasswordOffQuestion\" xml:space=\"preserve\">\n    <value>Вы точно хотите отключить пароль?</value>\n  </data>\n  <data name=\"PassportNoDocuments\" xml:space=\"preserve\">\n    <value>Вы пока не загружали документы</value>\n  </data>\n  <data name=\"PassportNoDocumentsInfo\" xml:space=\"preserve\">\n    <value>Вы можете добавить свой номер телефона, email, удостоверение личности или адрес проживания.</value>\n  </data>\n  <data name=\"TelegramPassportCreatePassword\" xml:space=\"preserve\">\n    <value>Задать пароль</value>\n  </data>\n  <data name=\"TelegramPassportCreatePasswordInfo\" xml:space=\"preserve\">\n    <value>Чтобы защитить свои данные оконечным шифрованием, пожалуйста, задайте пароль.\n\nЭтот пароль также будет запрашиваться при входе в Telegram с нового устройства.</value>\n  </data>\n  <data name=\"PassportEmailUploadInfo\" xml:space=\"preserve\">\n    <value>Обратите внимание: на указанную вами электронную почту придет код подтверждения.</value>\n  </data>\n  <data name=\"PassportEmailUseSameInfo\" xml:space=\"preserve\">\n    <value>Используйте тот же адрес электронной почты, что и в Telegram.</value>\n  </data>\n  <data name=\"EmailInvalidString\" xml:space=\"preserve\">\n    <value>Неправильный адрес электронной почты. Пожалуйста, попробуйте снова.</value>\n  </data>\n  <data name=\"PassportEmailVerifyInfo\" xml:space=\"preserve\">\n    <value>Введите код подтверждения, который был только что отправлен на {0}.</value>\n  </data>\n  <data name=\"EmailCodeEmpty\" xml:space=\"preserve\">\n    <value>Код пустой. Пожалуйста, попробуйте снова.</value>\n  </data>\n  <data name=\"EmailCodeExpiredString\" xml:space=\"preserve\">\n    <value>Код устарел. Пожалуйста, попробуйте снова.</value>\n  </data>\n  <data name=\"EmailCodeInvalidString\" xml:space=\"preserve\">\n    <value>Вы ввели неправильный код. Пожалуйста, попробуйте снова.</value>\n  </data>\n  <data name=\"PassportBirthdate\" xml:space=\"preserve\">\n    <value>Дата рождения</value>\n  </data>\n  <data name=\"PassportCitizenship\" xml:space=\"preserve\">\n    <value>Гражданство</value>\n  </data>\n  <data name=\"PassportFemale\" xml:space=\"preserve\">\n    <value>Женский</value>\n  </data>\n  <data name=\"PassportGender\" xml:space=\"preserve\">\n    <value>Пол</value>\n  </data>\n  <data name=\"PassportMale\" xml:space=\"preserve\">\n    <value>Мужской</value>\n  </data>\n  <data name=\"PassportName\" xml:space=\"preserve\">\n    <value>Имя</value>\n  </data>\n  <data name=\"PassportResidence\" xml:space=\"preserve\">\n    <value>Местожительство</value>\n  </data>\n  <data name=\"PassportSurname\" xml:space=\"preserve\">\n    <value>Фамилия</value>\n  </data>\n  <data name=\"PassportSelectGender\" xml:space=\"preserve\">\n    <value>Выберите пол</value>\n  </data>\n  <data name=\"PassportSelectDate\" xml:space=\"preserve\">\n    <value>Выберите дату</value>\n  </data>\n  <data name=\"PassportDocumentNumber\" xml:space=\"preserve\">\n    <value>Номер документа</value>\n  </data>\n  <data name=\"PassportExpired\" xml:space=\"preserve\">\n    <value>Срок действия</value>\n  </data>\n  <data name=\"PassportFrontSide\" xml:space=\"preserve\">\n    <value>Лицевая сторона</value>\n  </data>\n  <data name=\"PassportFrontSideInfo\" xml:space=\"preserve\">\n    <value>Загрузите фотографию лицевой стороны документа</value>\n  </data>\n  <data name=\"PassportPersonalUploadInfo\" xml:space=\"preserve\">\n    <value>В документе должны быть ваша фотография, имя и фамилия, дата рождения, номер документа, страна получения и срок действия.</value>\n  </data>\n  <data name=\"PassportRequiredDocuments\" xml:space=\"preserve\">\n    <value>Необходимые документы</value>\n  </data>\n  <data name=\"PassportReverseSide\" xml:space=\"preserve\">\n    <value>Обратная сторона</value>\n  </data>\n  <data name=\"PassportReverseSideInfo\" xml:space=\"preserve\">\n    <value>Загрузите фотографию обратной стороны документа</value>\n  </data>\n  <data name=\"PassportSelfie\" xml:space=\"preserve\">\n    <value>Селфи</value>\n  </data>\n  <data name=\"PassportSelfieInfo\" xml:space=\"preserve\">\n    <value>Загрузите фотографию, где вы держите свой документ</value>\n  </data>\n  <data name=\"PassportSelectNotExpire\" xml:space=\"preserve\">\n    <value>Не истекает</value>\n  </data>\n  <data name=\"PassportDeleteDocumentPersonal\" xml:space=\"preserve\">\n    <value>Удалить личную информацию</value>\n  </data>\n  <data name=\"PassportMainPage\" xml:space=\"preserve\">\n    <value>Главная страница</value>\n  </data>\n  <data name=\"PassportMainPageInfo\" xml:space=\"preserve\">\n    <value>Загрузить фотографию главной страницы документа</value>\n  </data>\n  <data name=\"PassportNoExpireDate\" xml:space=\"preserve\">\n    <value>Нет</value>\n  </data>\n  <data name=\"UpdateAppAlert\" xml:space=\"preserve\">\n    <value>К сожалению, ваша версия приложения устарела и не может обработать этот запрос. Пожалуйста, обновите Telegram.</value>\n  </data>\n  <data name=\"PassportInfoTitle\" xml:space=\"preserve\">\n    <value>Что такое Telegram Passport?</value>\n  </data>\n  <data name=\"Copyright\" xml:space=\"preserve\">\n    <value>Авторские права</value>\n  </data>\n  <data name=\"PassportAddTranslationDriverLicenceInfo\" xml:space=\"preserve\">\n    <value>Загрузите сканы заверенного перевода для своих водительских прав.</value>\n  </data>\n  <data name=\"PassportAddTranslationIdentityCardInfo\" xml:space=\"preserve\">\n    <value>Загрузите сканы заверенного перевода для своего удостоверения личности.</value>\n  </data>\n  <data name=\"PassportAddTranslationInternalPassportInfo\" xml:space=\"preserve\">\n    <value>Загрузите сканы заверенного перевода для своего внутреннего паспорта.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportInfo\" xml:space=\"preserve\">\n    <value>Загрузите сканы заверенного перевода для своего паспорта.</value>\n  </data>\n  <data name=\"PassportAddTranslationAgreementInfo\" xml:space=\"preserve\">\n    <value>Загрузите сканы заверенного перевода для своего договора об аренде.</value>\n  </data>\n  <data name=\"PassportAddTranslationBankInfo\" xml:space=\"preserve\">\n    <value>Загрузите сканы заверенного перевода для своей справки из банка.</value>\n  </data>\n  <data name=\"PassportAddTranslationBillInfo\" xml:space=\"preserve\">\n    <value>Загрузите сканы заверенного перевода для своего коммунального счёта.</value>\n  </data>\n  <data name=\"PassportAddTranslationPassportRegistrationInfo\" xml:space=\"preserve\">\n    <value>агрузите сканы заверенного перевода для страницы паспорта с пропиской.</value>\n  </data>\n  <data name=\"PassportAddTranslationTemporaryRegistrationInfo\" xml:space=\"preserve\">\n    <value>Загрузите сканы заверенного перевода для документа о временной прописке.</value>\n  </data>\n  <data name=\"PassportAddTranslationUploadInfo\" xml:space=\"preserve\">\n    <value>Пожалуйста, загрузите сканы заверенного перевода для выбранного документа.</value>\n  </data>\n  <data name=\"PassportTranslation\" xml:space=\"preserve\">\n    <value>Перевод</value>\n  </data>\n  <data name=\"PassportDataCorrupted\" xml:space=\"preserve\">\n    <value>Ваши данные Telegram Passport были повреждены.\nВы можете сбросить ваш Telegram Passport.</value>\n  </data>\n  <data name=\"PassportOr\" xml:space=\"preserve\">\n    <value>{0} или {1}</value>\n  </data>\n  <data name=\"PassportIdentityDocument\" xml:space=\"preserve\">\n    <value>Удостоверение личности</value>\n  </data>\n  <data name=\"PassportAddressNoUploadInfo\" xml:space=\"preserve\">\n    <value>Укажите свой адрес</value>\n  </data>\n  <data name=\"PassportIdentityDocumentInfo\" xml:space=\"preserve\">\n    <value>Загрузить скан паспорта или другого удостоверения личности</value>\n  </data>\n  <data name=\"PassportIdentityDriverLicence\" xml:space=\"preserve\">\n    <value>Загрузите скан своих водительских прав</value>\n  </data>\n  <data name=\"PassportIdentityID\" xml:space=\"preserve\">\n    <value>Загрузите скан своего удостоверения личности</value>\n  </data>\n  <data name=\"PassportIdentityInternalPassport\" xml:space=\"preserve\">\n    <value>Загрузите скан внутреннего паспорта</value>\n  </data>\n  <data name=\"PassportIdentityPassport\" xml:space=\"preserve\">\n    <value>Загрузите скан своего паспорта</value>\n  </data>\n  <data name=\"PassportMidname\" xml:space=\"preserve\">\n    <value>Отчество</value>\n  </data>\n  <data name=\"PassportMidnameCountry\" xml:space=\"preserve\">\n    <value>Отчество ({0})</value>\n  </data>\n  <data name=\"PassportMidnameLatin\" xml:space=\"preserve\">\n    <value>Отчество (латиницей)</value>\n  </data>\n  <data name=\"PassportNameCountry\" xml:space=\"preserve\">\n    <value>Имя ({0})</value>\n  </data>\n  <data name=\"PassportNameLatin\" xml:space=\"preserve\">\n    <value>Имя (латиницей)</value>\n  </data>\n  <data name=\"PassportNativeHeader\" xml:space=\"preserve\">\n    <value>Имя</value>\n  </data>\n  <data name=\"PassportNativeInfo\" xml:space=\"preserve\">\n    <value>Ваше имя на языке страны проживания ({0}).</value>\n  </data>\n  <data name=\"PassportSurnameCountry\" xml:space=\"preserve\">\n    <value>Фамилия ({0})</value>\n  </data>\n  <data name=\"PassportSurnameLatin\" xml:space=\"preserve\">\n    <value>Фамилия (латиницей)</value>\n  </data>\n</root>\n"
  },
  {
    "path": "TelegramClient/Resources/LocalizationConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Resources\r\n{\r\n\r\n    /// <summary>   \r\n    /// Values that represent type of localized string. \r\n    /// </summary>\r\n    public enum StringType\r\n    { \r\n        Normal,\r\n        UpperCase,\r\n        LowerCase\r\n    }\r\n\r\n    /// <summary>   \r\n    /// Localizes string from resources. \r\n    /// </summary>\r\n    public class LocalizationConverter : IValueConverter\r\n    {\r\n        public StringType Type { get; set; }\r\n\r\n        #region Implementation of IValueConverter\r\n\r\n        /// <summary>\r\n        /// Modifies the source data before passing it to the target for display in the UI.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the target dependency property.\r\n        /// </returns>\r\n        /// <param name=\"value\">The source data being passed to the target.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the target dependency property.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value == null) return null;\r\n\r\n            var localizedString = AppResources.ResourceManager.GetString(value.ToString());\r\n            if (localizedString == null) return null;\r\n\r\n            if (Type == StringType.UpperCase) return localizedString.ToUpper();\r\n            if (Type == StringType.LowerCase) return localizedString.ToLower();\r\n\r\n            return localizedString;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Modifies the target data before passing it to the source object.  This method is called only in <see cref=\"F:System.Windows.Data.BindingMode.TwoWay\"/> bindings.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The value to be passed to the source object.\r\n        /// </returns>\r\n        /// <param name=\"value\">The target data being passed to the source.</param><param name=\"targetType\">The <see cref=\"T:System.Type\"/> of data expected by the source object.</param><param name=\"parameter\">An optional parameter to be used in the converter logic.</param><param name=\"culture\">The culture of the conversion.</param>\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Resources/LocalizedStrings.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Globalization;\r\nusing System.Resources;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Microsoft.Phone.Info;\r\nusing Telegram.Api.Services;\r\nusing Telegram.EmojiPanel;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\n#if WP81\r\nusing Windows.UI.ViewManagement;\r\n#endif\r\nusing Caliburn.Micro;\r\n\r\nnamespace TelegramClient.Resources\r\n{\r\n    public class LocalizedStrings : TelegramPropertyChangedBase\r\n    {\r\n        private static readonly AppResources _resources = new AppResources();\r\n\r\n        public AppResources Resources { get { return _resources; } }\r\n\r\n        public void SetLanguage(CultureInfo culture)\r\n        {\r\n            Thread.CurrentThread.CurrentCulture = culture;\r\n            Thread.CurrentThread.CurrentUICulture = culture;\r\n\r\n            NotifyOfPropertyChange(() => Resources);\r\n        }\r\n    }\r\n\r\n    public class ScaledText : TelegramPropertyChangedBase\r\n    {\r\n#if WP81\r\n        private UISettings _settings;\r\n\r\n        public UISettings Settings\r\n        {\r\n            get\r\n            {\r\n                if (_settings == null)\r\n                {\r\n                    _settings = new UISettings();\r\n                    _settings.TextScaleFactorChanged += OnTextScaleFactorChanged;\r\n                }\r\n\r\n                return _settings; \r\n                \r\n            }\r\n        }\r\n\r\n        private void OnTextScaleFactorChanged(UISettings sender, object args)\r\n        {\r\n            BrowserNavigationService.FontScaleFactor = TextScaleFactor;\r\n            NotifyOfPropertyChange(() => TextScaleFactor);\r\n        }\r\n\r\n#endif\r\n\r\n        public double ApplicationBarHeight\r\n        {\r\n            get\r\n            {\r\n#if WP8\r\n                if (Application.Current.Host.Content.ScaleFactor == 225)\r\n                {\r\n                    return 56.0;\r\n                }\r\n#endif\r\n\r\n                return 72.0;\r\n            }\r\n        }\r\n\r\n        public double TextScaleFactor\r\n        {\r\n            get\r\n            {\r\n                var textScaleFactor = 1.0;\r\n\r\n#if WP81\r\n                textScaleFactor = Settings.TextScaleFactor;\r\n#endif\r\n\r\n                return textScaleFactor;\r\n            }\r\n        }\r\n\r\n        public double DefaultFontSizeLarge\r\n        {\r\n            get { return DefaultFontSize / 23.0 * 27.0; }\r\n        }\r\n\r\n        public double DefaultFontSizeSmall\r\n        {\r\n            get { return DefaultFontSize / 23.0 * 20.0; }\r\n        }\r\n\r\n        private double? _defaultFontSize;\r\n\r\n        public double DefaultFontSize\r\n        {\r\n            get\r\n            {\r\n                if (_defaultFontSize != null)\r\n                {\r\n                    return _defaultFontSize.Value;\r\n                }\r\n\r\n                const double defaultFontSize = 23.0;\r\n\r\n#if WP8\r\n                var deviceName = DeviceStatus.DeviceName;\r\n                switch (Application.Current.Host.Content.ScaleFactor)\r\n                {\r\n                    case 100:   //Lumia 820\r\n                        return defaultFontSize;\r\n                        break;\r\n                    case 150:   //HTC 8X\r\n                        return 20;\r\n                        break;\r\n                    case 160:   //Lumia 925\r\n                        if (!string.IsNullOrEmpty(deviceName))\r\n                        {\r\n                            deviceName = deviceName.Replace(\"-\", string.Empty).ToLowerInvariant();\r\n\r\n                            //Lumia 950, 950XL    5,2 5,7 inch   QHD     2560x1440\r\n                            if (deviceName.StartsWith(\"rm1116\")         // 950XL dual sim\r\n                                || deviceName.StartsWith(\"rm1085\")      // 950XL single sim\r\n                                || deviceName.StartsWith(\"rm1118\")      // 950 dual sim\r\n                                || deviceName.StartsWith(\"rm1104\"))     // 950 single sim\r\n                            {\r\n                                return 17.778;\r\n                            }\r\n                        }\r\n\r\n                        return 20;\r\n                        break;\r\n                    case 225:   // Lumia 1520, Lumia 930\r\n                        return 17.667;\r\n                        break;\r\n                }\r\n#endif\r\n\r\n                _defaultFontSize = defaultFontSize;\r\n\r\n                return _defaultFontSize.Value;\r\n            }\r\n        }\r\n\r\n        public double DefaultSystemSegoeUISymbolFontSize\r\n        {\r\n            get { return DefaultSystemFontSize - 3.0; }\r\n        }\r\n\r\n        public double DefaultSystemFontSize\r\n        {\r\n            get\r\n            {\r\n                const double defaultFontSize = 20;\r\n\r\n#if WP8\r\n                var deviceName = DeviceStatus.DeviceName;\r\n                switch (Application.Current.Host.Content.ScaleFactor)\r\n                {\r\n                    case 100:   //Lumia 820\r\n                        return defaultFontSize;\r\n                        break;\r\n                    case 150:   //HTC 8X\r\n                        return 20;\r\n                        break;\r\n                    case 160:   //Lumia 925\r\n                        if (!string.IsNullOrEmpty(deviceName))\r\n                        {\r\n                            deviceName = deviceName.Replace(\"-\", string.Empty).ToLowerInvariant();\r\n\r\n                            //Lumia 950, 950XL    5,2 5,7 inch   QHD     2560x1440\r\n                            if (deviceName.StartsWith(\"rm1116\")         // 950XL dual sim\r\n                                || deviceName.StartsWith(\"rm1085\")      // 950XL single sim\r\n                                || deviceName.StartsWith(\"rm1118\")      // 950 dual sim\r\n                                || deviceName.StartsWith(\"rm1104\"))     // 950 single sim\r\n                            {\r\n                                return 14;\r\n                            }\r\n                        }\r\n\r\n                        return 20;\r\n                        break;\r\n                    case 225:   // Lumia 1520, Lumia 930\r\n                        return 17.667;\r\n                        break;\r\n                }\r\n#endif\r\n\r\n                return defaultFontSize;\r\n            }\r\n        }\r\n\r\n        public double DefaultSystemIconSize\r\n        {\r\n            get\r\n            {\r\n                const double defaultFontSize = 15;\r\n\r\n#if WP8\r\n                var deviceName = DeviceStatus.DeviceName;\r\n                switch (Application.Current.Host.Content.ScaleFactor)\r\n                {\r\n                    case 100:   //Lumia 820\r\n                        return defaultFontSize;\r\n                        break;\r\n                    case 150:   //HTC 8X\r\n                        return 15;\r\n                        break;\r\n                    case 160:   //Lumia 925\r\n                        if (!string.IsNullOrEmpty(deviceName))\r\n                        {\r\n                            deviceName = deviceName.Replace(\"-\", string.Empty).ToLowerInvariant();\r\n\r\n                            //Lumia 950, 950XL    5,2 5,7 inch   QHD     2560x1440\r\n                            if (deviceName.StartsWith(\"rm1116\")         // 950XL dual sim\r\n                                || deviceName.StartsWith(\"rm1085\")      // 950XL single sim\r\n                                || deviceName.StartsWith(\"rm1118\")      // 950 dual sim\r\n                                || deviceName.StartsWith(\"rm1104\"))     // 950 single sim\r\n                            {\r\n                                return 9.3;\r\n                            }\r\n                        }\r\n\r\n                        return 15;\r\n                        break;\r\n                    case 225:   // Lumia 1520, Lumia 930\r\n                        return 12;\r\n                        break;\r\n                }\r\n#endif\r\n\r\n                return defaultFontSize;\r\n            }\r\n        }\r\n\r\n        public double DefaultSystemIconWidth\r\n        {\r\n            get { return DefaultSystemFontSize*34/29; }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Services/CommonErrorHandler.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public class CommonErrorHandler : ICommonErrorHandler\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Services/HttpDocumentFileManager.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Threading;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public interface IHttpDocumentFileManager\r\n    {\r\n        void DownloadFileAsync(string sourceUri, string destFileName, TLObject owner, Action<DownloadableItem> callback, Action<DownloadableItem> faultCallback = null);\r\n        void CancelAsync(TLObject owner);\r\n    }\r\n\r\n    public class HttpDocumentFileManager : IHttpDocumentFileManager\r\n    {\r\n        private readonly List<Worker> _workers = new List<Worker>(Telegram.Api.Constants.WorkersNumber);\r\n\r\n        private readonly object _itemsSyncRoot = new object();\r\n\r\n        private readonly List<DownloadableItem> _items = new List<DownloadableItem>();\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        public HttpDocumentFileManager(ITelegramEventAggregator eventAggregator)\r\n        {\r\n            _eventAggregator = eventAggregator;\r\n\r\n            for (var i = 0; i < 1; i++)\r\n            {\r\n                var worker = new Worker(OnDownloading, \"httpDocumentDownloader\" + i);\r\n                _workers.Add(worker);\r\n            }\r\n        }\r\n\r\n        private void OnDownloading(object state)\r\n        {\r\n            DownloadablePart part = null;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                for (var i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Canceled)\r\n                    {\r\n                        _items.RemoveAt(i--);\r\n                    }\r\n                }\r\n\r\n                foreach (var item in _items)\r\n                {\r\n                    part = item.Parts.FirstOrDefault(x => x.Status == PartStatus.Ready);\r\n                    if (part != null)\r\n                    {\r\n                        part.Status = PartStatus.Processing;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (part == null)\r\n            {\r\n                var currentWorker = (Worker)state;\r\n                currentWorker.Stop();\r\n                return;\r\n            }\r\n\r\n\r\n            var fileName = part.ParentItem.DestFileName;\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            long? length = null;\r\n\r\n            var webClient = new WebClient();\r\n            webClient.OpenReadAsync(new Uri(part.ParentItem.SourceUri, UriKind.Absolute));\r\n            webClient.OpenReadCompleted += (sender, args) =>\r\n            {\r\n                if (args.Cancelled)\r\n                {\r\n                    Thread.Sleep(TimeSpan.FromSeconds(part.ParentItem.Timeout));\r\n                    part.ParentItem.IncreaseTimeout();\r\n                    part.Status = PartStatus.Ready;\r\n                    manualResetEvent.Set();\r\n\r\n                    return;\r\n                }\r\n\r\n                if (args.Error != null)\r\n                {\r\n                    var webException = args.Error as WebException;\r\n                    if (webException != null)\r\n                    {\r\n                        var response = webException.Response as HttpWebResponse;\r\n                        if (response != null)\r\n                        {\r\n                            if (response.StatusCode == HttpStatusCode.Forbidden \r\n                                || response.StatusCode == HttpStatusCode.NotFound)\r\n                            {\r\n                                part.HttpErrorsCount++;\r\n                                if (part.HttpErrorsCount >= 5)\r\n                                {\r\n                                    lock (_itemsSyncRoot)\r\n                                    {\r\n                                        part.ParentItem.Canceled = true;\r\n                                    }\r\n                                }\r\n                                else\r\n                                {\r\n                                    Thread.Sleep(TimeSpan.FromSeconds(part.ParentItem.Timeout));\r\n                                    part.ParentItem.IncreaseTimeout();\r\n                                    part.Status = PartStatus.Ready;\r\n\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                lock (_itemsSyncRoot)\r\n                                {\r\n                                    part.ParentItem.Canceled = true;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    manualResetEvent.Set();\r\n                    return;\r\n                }\r\n\r\n                try\r\n                {\r\n                    length = args.Result.Length;\r\n                    using (var stream = args.Result)\r\n                    {\r\n                        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                        {\r\n                            using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read))\r\n                            {\r\n                                if (store.FileExists(fileName))\r\n                                {\r\n                                    //if (file.Position > file.Position)\r\n                                    //{\r\n                                    //    stream.Seek(file.Position, SeekOrigin.Begin);\r\n                                    //}\r\n                                    //else\r\n                                    {\r\n                                        file.Seek(0, SeekOrigin.Begin);\r\n                                        stream.Seek(0, SeekOrigin.Begin);\r\n                                    }\r\n                                }\r\n\r\n                                const int BUFFER_SIZE = 128 * 1024;\r\n                                var buf = new byte[BUFFER_SIZE];\r\n\r\n                                int bytesRead;\r\n                                while ((bytesRead = stream.Read(buf, 0, BUFFER_SIZE)) > 0)\r\n                                {\r\n                                    file.Seek(0, SeekOrigin.End);\r\n                                    file.Write(buf, 0, bytesRead);\r\n\r\n                                    lock (_itemsSyncRoot)\r\n                                    {\r\n                                        if (part.ParentItem.Canceled)\r\n                                        {\r\n                                            break;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    manualResetEvent.Set();\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    manualResetEvent.Set();\r\n                }\r\n            };\r\n\r\n            manualResetEvent.WaitOne();\r\n\r\n            // indicate progress\r\n            // indicate complete\r\n            bool isComplete;\r\n            bool isCanceled;\r\n            lock (_itemsSyncRoot)\r\n            {\r\n                long? fileLength = null;\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (store.FileExists(fileName))\r\n                    {\r\n                        using (var file = store.OpenFile(fileName, FileMode.Open, FileAccess.Read, FileShare.Read))\r\n                        {\r\n                            fileLength = file.Length;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                isCanceled = part.ParentItem.Canceled;\r\n                isComplete = length.HasValue && fileLength.HasValue && fileLength == length;\r\n\r\n                if (isComplete)\r\n                {\r\n                    part.Status = PartStatus.Processed;\r\n                    _items.Remove(part.ParentItem);\r\n                }\r\n            }\r\n\r\n            if (!isCanceled)\r\n            {\r\n                if (isComplete)\r\n                {\r\n                    part.ParentItem.IsoFileName = fileName;\r\n                    if (part.ParentItem.Callback != null)\r\n                    {\r\n                        Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            part.ParentItem.Callback(part.ParentItem);\r\n                            if (part.ParentItem.Callbacks != null)\r\n                            {\r\n                                foreach (var callback in part.ParentItem.Callbacks)\r\n                                {\r\n                                    callback.SafeInvoke(part.ParentItem);\r\n                                }\r\n                            }\r\n                        });\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (part.ParentItem.FaultCallback != null)\r\n                {\r\n                    Execute.BeginOnThreadPool(() =>\r\n                    {\r\n                        part.ParentItem.FaultCallback(part.ParentItem);\r\n                        if (part.ParentItem.FaultCallbacks != null)\r\n                        {\r\n                            foreach (var callback in part.ParentItem.FaultCallbacks)\r\n                            {\r\n                                callback.SafeInvoke(part.ParentItem);\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public void DownloadFileAsync(string sourceUri, string destFileName, TLObject owner, Action<DownloadableItem> callback, Action<DownloadableItem> faultCallback = null)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var downloadableItem = GetDownloadableItem(sourceUri, destFileName, owner, callback, faultCallback);\r\n\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    var addFile = true;\r\n                    foreach (var item in _items)\r\n                    {\r\n                        if (item.SourceUri == sourceUri)\r\n                        {\r\n                            //if (item.Owner == owner)\r\n                            //{\r\n                            //    addFile = false;\r\n                            //    break;\r\n                            //}\r\n\r\n                            if (callback != null)\r\n                            {\r\n                                if (item.Callbacks == null)\r\n                                {\r\n                                    item.Callbacks = new List<Action<DownloadableItem>>();\r\n                                }\r\n                                item.Callbacks.Add(callback);\r\n                            }\r\n\r\n                            if (faultCallback != null)\r\n                            {\r\n                                if (item.FaultCallbacks == null)\r\n                                {\r\n                                    item.FaultCallbacks = new List<Action<DownloadableItem>>();\r\n                                }\r\n                                item.FaultCallbacks.Add(faultCallback);\r\n                            }\r\n\r\n                            addFile = false;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (addFile)\r\n                    {\r\n                        _items.Add(downloadableItem);\r\n                    }\r\n                }\r\n\r\n                StartAwaitingWorkers();\r\n            });\r\n        }\r\n\r\n        private DownloadableItem GetDownloadableItem(string sourceUri, string destFileName, TLObject owner, Action<DownloadableItem> callback, Action<DownloadableItem> faultCallback)\r\n        {\r\n            var item = new DownloadableItem\r\n            {\r\n                SourceUri = sourceUri,\r\n                DestFileName = destFileName,\r\n                Owner = owner,\r\n                Callback = callback,\r\n                FaultCallback = faultCallback,\r\n                Timeout = 4.0\r\n            };\r\n            item.Parts = GetItemParts(item);\r\n\r\n            return item;\r\n        }\r\n\r\n        private void StartAwaitingWorkers()\r\n        {\r\n            var awaitingWorkers = _workers.Where(x => x.IsWaiting);\r\n\r\n            foreach (var awaitingWorker in awaitingWorkers)\r\n            {\r\n                awaitingWorker.Start();\r\n            }\r\n        }\r\n\r\n        private List<DownloadablePart> GetItemParts(DownloadableItem item)\r\n        {\r\n            return new List<DownloadablePart> { new DownloadablePart(item, new TLInt(0), new TLInt(0), 0) };\r\n        }\r\n\r\n        public void CancelAsync(TLObject owner)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                lock (_itemsSyncRoot)\r\n                {\r\n                    var items = _items.Where(x => x.Owner == owner);\r\n\r\n                    foreach (var item in items)\r\n                    {\r\n                        item.Canceled = true;\r\n                    }\r\n                }\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Services/ICommonErrorHandler.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public interface ICommonErrorHandler\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Services/IPushService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Services\r\n{\r\n    public interface IPushService\r\n    {\r\n        string GetPushChannelUri();\r\n        void RegisterDeviceAsync(System.Action callback);\r\n        void UnregisterDeviceAsync(System.Action callback);\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Services/IStateService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Device.Location;\r\nusing System.IO;\r\nusing System.Windows.Media.Imaging;\r\nusing OpenCVComponent;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Payments;\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nusing ImageTools;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.ViewModels.Passport;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public interface IStateService\r\n    {\r\n        TLProxyBase Proxy { get; set; }\r\n        TLString CurrentEmail { get; set; }\r\n        TLSentEmailCode SentEmailCode { get; set; }\r\n        SecureRequiredType SecureRequiredType { get; set; }\r\n        TLSecureValueTypeBase SecureType { get; set; }\r\n        TLSecureValue SecureValue { get; set; }\r\n        IList<TLSecureValue> SecureValues { get; set; }\r\n        TLAuthorizationForm AuthorizationForm { get; set; }\r\n        TLVector<TLChatBase> CurrentFeed { get; set; }\r\n\r\n        TLInt MessageId { get; set; }\r\n        bool SuppressProxySharing { get; set; }\r\n        string PhoneCallId { get; set; }\r\n        bool RemoveCheckoutAndCardView { get; set; }\r\n        bool ShowScrollDownButton { get; set; }\r\n        bool HideCountryCode { get; set; }\r\n        bool ResidenceCountry { get; set; }\r\n        PaymentInfo PaymentInfo { get; set; }\r\n        TLVector<TLWallPaperBase> Wallpapers { get; set; }\r\n        Settings Settings { get; set; }\r\n        string GameString { get; set; }\r\n        TLInputPeerBase InputPeer { get; set; }\r\n        TLGame Game { get; set; }\r\n        TLBotCallbackAnswer BotCallbackAnswer { get; set; }\r\n        TLObject SwitchPMWith { get; set; }\r\n        TLInlineBotSwitchPM SwitchPM { get; set; }\r\n        TLKeyboardButtonSwitchInline SwitchInlineButton { get; set; }\r\n        bool UpdateSubtitle { get; set; }\r\n        bool UpdateChannelAdministrators { get; set; }\r\n        string Post { get; set; }\r\n        bool LinkPreviews { get; set; }\r\n        string Url { get; set; }\r\n        string UrlText { get; set; }\r\n\r\n        TLChannelAdminRights CurrentAdminRights { get; set; }\r\n        TLChannelParticipantRoleBase CurrentRole { get; set; }\r\n        TLChannel NewChannel { get; set; }\r\n\r\n        int SelectedAutolockTimeout { get; set; }\r\n        string LogFileName { get; set; }\r\n        GeoCoordinate GeoCoordinate { get; set; }\r\n        bool AnimateTitle { get; set; }\r\n\r\n        string ShareCaption { get; set; }\r\n        string ShareLink { get; set; }\r\n        string ShareMessage { get; set; }\r\n\r\n        string Hashtag { get; set; }\r\n\r\n        bool FirstRun { get; set; }\r\n        TLString PhoneNumber { get; set; }\r\n        TLString PhoneCode { get; set; }\r\n        TLString PhoneCodeHash { get; set; }\r\n        TLInt SendCallTimeout { get; set; }\r\n        TLBool PhoneRegistered { get; set; }\r\n        TLSentCodeTypeBase Type { get; set; }\r\n        TLCodeTypeBase NextType { get; set; }\r\n        bool ClearNavigationStack { get; set; }\r\n        TLUserBase CurrentContact { get; set; }\r\n        TLString CurrentContactPhone { get; set; }\r\n        int CurrentUserId { get; set; }\r\n        TLObject With { get; set; }\r\n        bool RemoveBackEntry { get; set; }\r\n        bool RemoveBackEntries { get; set; }\r\n        TLMessage MediaMessage { get; set; }\r\n        TLDecryptedMessage DecryptedMediaMessage { get; set; }\r\n        Photo Photo { get; set; }\r\n        string FileId { get; set; }\r\n        Photo Document { get; set; }\r\n        byte[] ProfilePhotoBytes { get; set; }\r\n        TLChatBase CurrentChat { get; set; }\r\n        IInputPeer CurrentInputPeer { get; set; }\r\n\r\n        List<string> Sounds { get; }\r\n        TLUserBase Participant { get; set; }\r\n        TLMessage CurrentPhotoMessage { get; set; }\r\n        TLDecryptedMessage CurrentDecryptedPhotoMessage { get; set; }\r\n        int CurrentMediaMessageId { get; set; }\r\n        IList<TLMessage> CurrentMediaMessages { get; set; }\r\n        IList<TLDecryptedMessage> CurrentDecryptedMediaMessages { get; set; }\r\n        TLPhotoBase CurrentPhoto { get; set; }\r\n\r\n\r\n\r\n        void GetNotifySettingsAsync(Action<Settings> callback);\r\n        Settings GetNotifySettings();\r\n        void SaveNotifySettingsAsync(Settings settings);\r\n\r\n\r\n        void GetServerFilesAsync(Action<TLVector<TLServerFile>> callback);\r\n        void SaveServerFilesAsync(TLVector<TLServerFile> serverFiles);\r\n\r\n\r\n        bool IsMainViewOpened { get; set; }\r\n        //bool IsDialogOpened { get; set; }\r\n        TLObject ActiveDialog { get; set; }\r\n        TLUserBase SharedContact { get; set; }\r\n        TLMessageMediaContact SharedContactMedia { get; set; }\r\n        string IsoFileName { get; set; }\r\n        Country SelectedCountry { get; set; }\r\n        Country SelectedResidenceCountry { get; set; }\r\n        bool FocusOnInputMessage { get; set; }\r\n        string VideoIsoFileName { get; set; }\r\n        long Duration { get; set; }\r\n        RecordedVideo RecordedVideo { get; set; }\r\n        IList<TLUserBase> RemovedUsers { get; set; }\r\n        List<TLMessageBase> ForwardMessages { get; set; }\r\n        bool WithMyScore { get; set; }\r\n        bool SuppressNotifications { get; set; }\r\n        string PhoneNumberString { get; set; }\r\n        IList<TLMessageBase> DialogMessages { get; set; }\r\n        IList<TLDialogBase> LoadedDialogs { get; set; }\r\n        BackgroundItem CurrentBackground { get; set; }\r\n        bool IsEmptyBackground { get; }\r\n        bool SendByEnter { get; set; }\r\n\r\n        string Passcode { get; set; }\r\n        bool IsSimplePasscode { get; set; }\r\n        DateTime CloseTime { get; set; }\r\n        bool Locked { get; set; }\r\n        int AutolockTimeout { get; set; }\r\n\r\n        void ResetPasscode();\r\n\r\n        WriteableBitmap ActiveBitmap { get; set; }\r\n        bool CreateSecretChat { get; set; }\r\n        TLString CurrentKey { get; set; }\r\n        TLLong CurrentKeyFingerprint { get; set; }\r\n        bool MediaTab { get; set; }\r\n        TLEncryptedChatBase CurrentEncryptedChat { get; set; }\r\n        bool Tombstoning { get; set; }\r\n        string UserId { get; set; }\r\n        string ChatId { get; set; }\r\n        string BroadcastId { get; set; }\r\n        int ForwardingMessagesCount { get; set; }\r\n        bool RequestForwardingCount { get; set; }\r\n        ExtendedImage ExtendedImage { get; set; }\r\n        int AccountDaysTTL { get; set; }\r\n        TLPrivacyRules PrivacyRules { get; set; }\r\n        IPrivacyValueUsersRule UsersRule { get; set; }\r\n\r\n        IList<TLUserBase> SelectedUsers { get; set; }\r\n        IList<TLInt> SelectedUserIds { get; set; }\r\n        bool NavigateToDialogDetails { get; set; }\r\n        bool NavigateToSecretChat { get; set; }\r\n        string Domain { get; set; }\r\n        bool ChangePhoneNumber { get; set; }\r\n        TimerSpan SelectedTimerSpan { get; set; }\r\n        List<TimerSpan> TimerSpans { get; set; }\r\n        bool IsEncryptedTimer { get; set; }\r\n        TLDCOption DCOption { get; set; }\r\n        TLDHConfig DHConfig { get; set; }\r\n        List<TLMessageBase> Source { get; set; }\r\n        TLDialogBase Dialog { get; set; }\r\n        TLPasswordBase Password { get; set; }\r\n        TLPasswordInputSettings NewPasswordSettings { get; set; }\r\n        bool IsInviteVisible { get; set; }\r\n        string AccessToken { get; set; }\r\n        TLUserBase Bot { get; set; }\r\n        Uri WebLink { get; set; }\r\n        IReadOnlyList<IStorageItem> StorageItems { get; set; }\r\n        TLMessageBase Message { get; set; }\r\n        IList<TLMessageBase> Messages { get; set; }\r\n        int ConfirmWait { get; set; }\r\n        TLSentCodeBase SentCode { get; set; }\r\n        bool CollapseSearchControl { get; set; }\r\n        TLMessageMediaContact PhoneContact { get; set; }\r\n        //bool SearchDialogs { get; set; }\r\n\r\n        //void GetRecentStickersAsync(Action<TLRecentStickers> callback);\r\n        //void SaveRecentStickersAsync(TLRecentStickers recentStickers);\r\n        //void ClearResentStickersAsync();\r\n\r\n        void GetFeaturedStickersAsync(Action<TLFeaturedStickers> callback);\r\n        TLFeaturedStickers GetFeaturedStickers();\r\n        void SaveFeaturedStickersAsync(TLFeaturedStickers featuredStickers);\r\n        void ClearFeaturedStickersAsync();\r\n\r\n        void GetArchivedStickersAsync(Action<TLArchivedStickers> callback);\r\n        TLArchivedStickers GetArchivedStickers();\r\n        void SaveArchivedStickersAsync(TLArchivedStickers archivedStickers);\r\n        void ClearArchivedStickersAsync();\r\n\r\n        void GetAllStickersAsync(Action<TLAllStickers> callback);\r\n        TLAllStickers GetAllStickers();\r\n        void SaveAllStickersAsync(TLAllStickers allStickers);\r\n        void ClearAllStickersAsync();\r\n\r\n        void GetMasksAsync(Action<TLAllStickers> callback);\r\n        TLAllStickers GetMasks();\r\n        void SaveMasksAsync(TLAllStickers allStickers);\r\n        void ClearMasksAsync();\r\n\r\n        void GetWallpapersAsync(Action<TLVector<TLWallPaperBase>> callback);\r\n        TLVector<TLWallPaperBase> GetWallpapers();\r\n        void SaveWallpapersAsync(TLVector<TLWallPaperBase> allStickers);\r\n        void ClearWallpapersAsync();\r\n\r\n        TLChatSettings GetChatSettings();\r\n        void SaveChatSettings(TLChatSettings chatSettings);\r\n\r\n        TLContactsSettings GetContactsSettings();\r\n        void SaveContactsSettings(TLContactsSettings contactsSettings);\r\n\r\n        TLCameraSettings GetCameraSettings();\r\n        void SaveCameraSettings(TLCameraSettings cameraSettings);\r\n\r\n        TLPhotoPickerSettings GetPhotoPickerSettings();\r\n        void SavePhotoPickerSettings(TLPhotoPickerSettings photoPickerSettings);\r\n\r\n        TLTmpPassword GetTmpPassword();\r\n        void SaveTmpPassword(TLTmpPassword tmpPassword);\r\n\r\n        TLTopPeersBase GetTopPeers();\r\n        void SaveTopPeers(TLTopPeersBase topPeers);\r\n\r\n        TLPassportConfig GetPassportConfig();\r\n        void SavePassportConfig(TLPassportConfig passportConfig);\r\n\r\n        TLCallsSecurity GetCallsSecurity(bool defaultP2PContacts);\r\n        void SaveCallsSecurity(TLCallsSecurity callsSecurity);\r\n\r\n        event PropertyChangedEventHandler PropertyChanged;\r\n    }\r\n\r\n    public class Photo\r\n    {\r\n        public string FileName { get; set; }\r\n\r\n        public byte[] Bytes { get; set; }\r\n\r\n#if WP8\r\n        public StorageFile File { get; set; }\r\n#endif\r\n\r\n        public byte[] PreviewBytes { get; set; }\r\n\r\n        public int Width { get; set; }\r\n\r\n        public int Height { get; set; }\r\n    }\r\n\r\n    public class PhotoFile : TelegramPropertyChangedBase\r\n    {\r\n        private TimerSpan _timerSpan;\r\n\r\n        public TimerSpan TimerSpan\r\n        {\r\n            get { return _timerSpan; }\r\n            set\r\n            {\r\n                if (value != _timerSpan)\r\n                {\r\n                    _timerSpan = value;\r\n                    NotifyOfPropertyChange(() => TimerSpan);\r\n                }\r\n            }\r\n        }\r\n\r\n        public StorageFile File { get; set; }\r\n\r\n        public Stream Thumbnail { get; set; }\r\n\r\n        public TLMessage Message { get; set; }\r\n\r\n        public Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject> DecryptedTuple { get; set; }\r\n\r\n        public object Object\r\n        {\r\n            get { return (TLObject)Message ?? (DecryptedTuple != null ? DecryptedTuple.Item1 : null); }\r\n            set\r\n            {\r\n                if (value is TLMessage) Message = (TLMessage)value;\r\n                if (value is Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>) DecryptedTuple = (Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>)value;\r\n            }\r\n        }\r\n\r\n        public TLInt Date\r\n        {\r\n            get\r\n            {\r\n                if (Message != null) return Message.Date;\r\n                if (DecryptedTuple != null) return DecryptedTuple.Item1.Date;\r\n\r\n                return null;\r\n            }\r\n            set\r\n            {\r\n                if (Message != null) Message.Date = value;\r\n                if (DecryptedTuple != null) DecryptedTuple.Item1.Date = value;\r\n            }\r\n        }\r\n\r\n        public PhotoFile Self { get { return this; } }\r\n\r\n        public bool IsButton { get; set; }\r\n\r\n        private bool _isSelected;\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return _isSelected; }\r\n            set\r\n            {\r\n                if (value != _isSelected)\r\n                {\r\n                    _isSelected = value;\r\n                    NotifyOfPropertyChange(() => IsSelected);\r\n                }\r\n            }\r\n        }\r\n\r\n        public FacesImage FacesImage { get; set; }\r\n\r\n        public List<TLUserBase> Mentions { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Services/IUploadService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public interface IUploadService\r\n    {\r\n        void Handle(UploadableItem item);\r\n\r\n        void AddGroup(TLObject message);\r\n\r\n        void Remove(TLObject message);\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Services/PhoneInfoService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Xml;\r\nusing Microsoft.Phone.Info;\r\nusing Telegram.Api.Services.DeviceInfo;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public interface IExtendedDeviceInfoService : IDeviceInfoService\r\n    {\r\n        bool IsLowMemoryDevice { get; }\r\n        bool IsWiFiEnabled { get; }\r\n        bool IsCellularDataEnabled { get; }\r\n    }\r\n\r\n    public abstract class PhoneInfoServiceBase : IDeviceInfoService\r\n    {\r\n        private const string AppManifestName = \"WMAppManifest.xml\";\r\n        private const string AppNodeName = \"App\";\r\n\r\n        public static string GetAppAttribute(string attributeName)\r\n        {\r\n            try\r\n            {\r\n                var settings = new XmlReaderSettings { XmlResolver = new XmlXapResolver() };\r\n\r\n                using (var rdr = XmlReader.Create(AppManifestName, settings))\r\n                {\r\n                    rdr.ReadToDescendant(AppNodeName);\r\n                    if (!rdr.IsStartElement())\r\n                    {\r\n                        throw new FormatException(AppManifestName + \" is missing \" + AppNodeName);\r\n                    }\r\n\r\n                    return rdr.GetAttribute(attributeName);\r\n                }\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return String.Empty;\r\n            }\r\n        }\r\n\r\n        public abstract string Model { get; }\r\n        public abstract string AppVersion { get; }\r\n        public abstract string SystemVersion { get; }\r\n        public abstract bool IsBackground { get; }\r\n        public abstract string BackgroundTaskName { get; }\r\n        public abstract int BackgroundTaskId { get; }\r\n    }\r\n\r\n    public class PhoneInfoService : PhoneInfoServiceBase, IExtendedDeviceInfoService\r\n    {\r\n        public override bool IsBackground { get { return false; } }\r\n        public override string BackgroundTaskName { get { return string.Empty; } }\r\n        public override int BackgroundTaskId { get { return default(int); } }\r\n\r\n        public override string Model\r\n        {\r\n            get\r\n            {\r\n                var model = (string) DeviceExtendedProperties.GetValue(\"DeviceName\");\r\n\r\n                return GetShortModel(model) ?? model;\r\n            }\r\n        }\r\n\r\n        public override string AppVersion { get { return GetAppAttribute(\"Version\"); } }\r\n\r\n        public override string SystemVersion { get { return Environment.OSVersion.Version.ToString(); } }\r\n\r\n        public bool IsLowMemoryDevice\r\n        {\r\n            get\r\n            {\r\n                try\r\n                {\r\n                    var result = (long)DeviceExtendedProperties.GetValue(\"ApplicationWorkingSetLimit\");\r\n                    if (result < 94371840L)\r\n                    {\r\n                        return true;\r\n                    }\r\n\r\n                    return false;\r\n                }\r\n\r\n                catch (ArgumentOutOfRangeException)\r\n                {\r\n                    // The device does not support querying for this value. This occurs\r\n                    // on Windows Phone OS 7.1 and older phones without OS updates.\r\n\r\n                    return true;\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsWiFiEnabled { get { return Microsoft.Phone.Net.NetworkInformation.DeviceNetworkInformation.IsWiFiEnabled; } }\r\n\r\n        public bool IsCellularDataEnabled { get { return Microsoft.Phone.Net.NetworkInformation.DeviceNetworkInformation.IsCellularDataEnabled; } }\r\n\r\n        private static string GetShortModel(string phoneCode)\r\n        {\r\n            var cleanCode = phoneCode.Replace(\"-\", string.Empty).ToLowerInvariant();\r\n\r\n            foreach (var model in _models)\r\n            {\r\n                if (cleanCode.StartsWith(model.Key))\r\n                {\r\n                    return model.Value;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static readonly Dictionary<string, string> _models = new Dictionary<string, string>\r\n        {\r\n            {\"rm923\", \"Lumia505\"},\r\n            {\"rm898\", \"Lumia510\"},\r\n            {\"rm889\", \"Lumia510\"},\r\n            {\"rm915\", \"Lumia520\"},\r\n            {\"rm917\", \"Lumia521\"},\r\n            {\"rm998\", \"Lumia525\"},\r\n            {\"rm997\", \"Lumia526\"},\r\n            {\"rm1017\", \"Lumia530\"},\r\n            {\"rm1018\", \"Lumia530\"},\r\n            {\"rm1019\", \"Lumia530\"},\r\n            {\"rm1020\", \"Lumia530\"},\r\n            {\"rm1090\", \"Lumia535\"},\r\n            {\"rm836\", \"Lumia610\"},\r\n            {\"rm849\", \"Lumia610\"},\r\n            {\"rm846\", \"Lumia620\"},\r\n            {\"rm941\", \"Lumia625\"},\r\n            {\"rm942\", \"Lumia625\"},\r\n            {\"rm943\", \"Lumia625\"},\r\n            {\"rm974\", \"Lumia630\"},\r\n            {\"rm976\", \"Lumia630\"},\r\n            {\"rm977\", \"Lumia630\"},\r\n            {\"rm978\", \"Lumia630\"},\r\n            {\"rm975\", \"Lumia635\"},\r\n            {\"rm803\", \"Lumia710\"},\r\n            {\"rm809\", \"Lumia710\"},\r\n            {\"rm885\", \"Lumia720\"},\r\n            {\"rm887\", \"Lumia720\"},\r\n            {\"rm1038\", \"Lumia730\"},\r\n            {\"rm801\", \"Lumia800\"},\r\n            {\"rm802\", \"Lumia800\"},\r\n            {\"rm819\", \"Lumia800\"},\r\n            {\"rm878\", \"Lumia810\"},\r\n            {\"rm824\", \"Lumia820\"},\r\n            {\"rm825\", \"Lumia820\"},\r\n            {\"rm826\", \"Lumia820\"},\r\n            {\"rm845\", \"Lumia822\"},\r\n            {\"rm983\", \"Lumia830\"},\r\n            {\"rm984\", \"Lumia830\"},\r\n            {\"rm985\", \"Lumia830\"},\r\n            {\"rm808\", \"Lumia900\"},\r\n            {\"rm823\", \"Lumia900\"},\r\n            {\"rm820\", \"Lumia920\"},\r\n            {\"rm821\", \"Lumia920\"},\r\n            {\"rm822\", \"Lumia920\"},\r\n            {\"rm867\", \"Lumia920\"},\r\n            {\"rm892\", \"Lumia925\"},\r\n            {\"rm893\", \"Lumia925\"},\r\n            {\"rm910\", \"Lumia925\"},\r\n            {\"rm955\", \"Lumia925\"},\r\n            {\"rm860\", \"Lumia928\"},\r\n            {\"rm1045\", \"Lumia930\"},\r\n            {\"rm875\", \"Lumia1020\"},\r\n            {\"rm876\", \"Lumia1020\"},\r\n            {\"rm877\", \"Lumia1020\"},\r\n            {\"rm994\", \"Lumia1320\"},\r\n            {\"rm995\", \"Lumia1320\"},\r\n            {\"rm996\", \"Lumia1320\"},\r\n            {\"rm937\", \"Lumia1520\"},\r\n            {\"rm938\", \"Lumia1520\"},\r\n            {\"rm939\", \"Lumia1520\"},\r\n            {\"rm940\", \"Lumia1520\"},\r\n            {\"rm927\", \"LumiaIcon\"},\r\n            {\"rm1116\", \"Lumia950XL\"},\r\n            {\"rm1085\", \"Lumia950XL\"},\r\n            {\"rm1118\", \"Lumia950\"},\r\n            {\"rm1104\", \"Lumia950\"},\r\n\r\n        };\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Services/PushService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\n#if WP81 && WNS_PUSH_SERVICE\r\nusing Windows.Networking.PushNotifications;\r\n#endif\r\nusing Microsoft.Phone.Notification;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n#if WP81 && WNS_PUSH_SERVICE\r\n    public class WNSPushService : PushServiceBase\r\n    {\r\n        protected override TLInt TokenType\r\n        {\r\n            get { return new TLInt(Constants.WNSTokenType); }\r\n        }\r\n\r\n        private PushNotificationChannel _pushChannel;\r\n\r\n        public WNSPushService(IMTProtoService service) : base(service)\r\n        {\r\n            LoadOrCreateChannelAsync();\r\n        }\r\n\r\n        private void LoadOrCreateChannelAsync(Action callback = null)\r\n        {\r\n            Execute.BeginOnThreadPool(async () =>\r\n            {\r\n                try\r\n                {\r\n                    var pushChannel = HttpNotificationChannel.Find(Constants.ToastNotificationChannelName);\r\n\r\n                    if (pushChannel != null)\r\n                    {\r\n                        pushChannel.UnbindToShellTile();\r\n                        pushChannel.UnbindToShellToast();\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Telegram.Logs.Log.Write(\"WNSPushService start creating channel ex \" + ex);\r\n\r\n                    Execute.ShowDebugMessage(\"WNSPushService.LoadOrCreateChannelAsync ex \" + ex);\r\n                }\r\n\r\n                Telegram.Logs.Log.Write(\"WNSPushService start creating channel\");\r\n                _pushChannel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();\r\n                _pushChannel.PushNotificationReceived += OnPushNotificationReceived;\r\n                Telegram.Logs.Log.Write(\"WNSPushService stop creating channel\");\r\n\r\n                callback.SafeInvoke();\r\n            });\r\n        }\r\n\r\n        private void OnPushNotificationReceived(PushNotificationChannel sender, PushNotificationReceivedEventArgs args)\r\n        {\r\n            //Execute.ShowDebugMessage(\"WNSPushService.OnPushNotificationReceived \" + args);\r\n        }\r\n\r\n        public override string GetPushChannelUri()\r\n        {\r\n            return _pushChannel != null ? _pushChannel.Uri : null;\r\n        }\r\n    }\r\n#endif\r\n\r\n    public class PushService : PushServiceBase\r\n    {\r\n        protected override TLInt TokenType\r\n        {\r\n            get { return new TLInt(Constants.VoIPMPNSTokenType); }\r\n        }\r\n\r\n        public override string GetPushChannelUri()\r\n        {\r\n            return _pushChannel != null && _pushChannel.ChannelUri != null ? _pushChannel.ChannelUri.ToString() : null;\r\n        }\r\n\r\n        private HttpNotificationChannel _pushChannel;\r\n\r\n        public PushService(IMTProtoService service) : base(service)\r\n        {\r\n            LoadOrCreateChannelAsync();\r\n        }\r\n\r\n        private void LoadOrCreateChannelAsync(Action callback = null)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _pushChannel = HttpNotificationChannel.Find(Constants.ToastNotificationChannelName);\r\n                Telegram.Logs.Log.Write(string.Format(\"PushService.Find channelUri=\" + (_pushChannel != null ? _pushChannel.ChannelUri : null)));\r\n\r\n                if (_pushChannel == null)\r\n                {\r\n                    try\r\n                    {\r\n                        _pushChannel = new HttpNotificationChannel(Constants.ToastNotificationChannelName);\r\n                        Telegram.Logs.Log.Write(string.Format(\"PushService.Create channelUri=\" + (_pushChannel != null ? _pushChannel.ChannelUri : null)));\r\n\r\n                        _pushChannel.HttpNotificationReceived += OnHttpNotificationReceived;\r\n                        _pushChannel.ChannelUriUpdated += OnChannelUriUpdated;\r\n                        _pushChannel.ErrorOccurred += OnErrorOccurred;\r\n                        _pushChannel.ShellToastNotificationReceived += OnShellToastNotificationReceived;\r\n                        _pushChannel.ConnectionStatusChanged += OnConnectionStatusChanged;\r\n\r\n                        _pushChannel.Open();\r\n                        _pushChannel.BindToShellToast();\r\n                        _pushChannel.BindToShellTile();\r\n                        Telegram.Logs.Log.Write(string.Format(\"PushService.OpenBind channelUri=\" + (_pushChannel != null ? _pushChannel.ChannelUri : null)));\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        TLUtils.WriteException(\"PushService\", e);\r\n                    }\r\n\r\n                    if (_pushChannel != null && _pushChannel.ChannelUri != null)\r\n                    {\r\n                        Debug.WriteLine(_pushChannel.ChannelUri.ToString());\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    try\r\n                    {\r\n                        _pushChannel.HttpNotificationReceived += OnHttpNotificationReceived;\r\n                        _pushChannel.ChannelUriUpdated += OnChannelUriUpdated;\r\n                        _pushChannel.ErrorOccurred += OnErrorOccurred;\r\n                        _pushChannel.ShellToastNotificationReceived += OnShellToastNotificationReceived;\r\n                        _pushChannel.ConnectionStatusChanged += OnConnectionStatusChanged;\r\n\r\n                        if (!_pushChannel.IsShellToastBound)\r\n                        {\r\n                            _pushChannel.BindToShellToast();\r\n                        }\r\n                        if (!_pushChannel.IsShellTileBound)\r\n                        {\r\n                            _pushChannel.BindToShellTile();\r\n                        }\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        TLUtils.WriteException(\"PushService\", e);\r\n                    }\r\n                }\r\n\r\n                callback.SafeInvoke();\r\n            });\r\n        }\r\n\r\n        private void OnConnectionStatusChanged(object sender, NotificationChannelConnectionEventArgs e)\r\n        {\r\n            Telegram.Logs.Log.Write(string.Format(\"PushService.OnConnectionStatusChanged status={0}\", e.ConnectionStatus));\r\n        }\r\n\r\n        private void OnHttpNotificationReceived(object sender, HttpNotificationEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        private void OnShellToastNotificationReceived(object sender, NotificationEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void OnErrorOccurred(object sender, NotificationChannelErrorEventArgs e)\r\n        {\r\n            var message = string.Format(\"A push notification {0} error occurred.  {1} ({2}) {3}\", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData);\r\n            Execute.ShowDebugMessage(message);\r\n            TLUtils.WriteLine(message);\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"PushService.OnErrorOccurred message={0}\", message));\r\n            LoadOrCreateChannelAsync(() => RegisterDeviceAsync(() => { }));\r\n        }\r\n\r\n        private void OnChannelUriUpdated(object sender, NotificationChannelUriEventArgs e)\r\n        {\r\n            Debug.WriteLine(e.ChannelUri.ToString());\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"PushService.OnChannelUriUpdated\\nnewUri={0}\\noldUri={1}\", e.ChannelUri, (_pushChannel != null ? _pushChannel.ChannelUri : null)));\r\n            RegisterDeviceAsync(() => { });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Services/PushServiceBase.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public abstract class PushServiceBase : IPushService\r\n    {\r\n        protected abstract TLInt TokenType { get; }\r\n\r\n        protected readonly IMTProtoService Service;\r\n\r\n        protected PushServiceBase(IMTProtoService service)\r\n        {\r\n            Service = service;\r\n        }\r\n\r\n        public abstract string GetPushChannelUri();\r\n\r\n        private string _lastRegisteredUri;\r\n\r\n        private readonly object _lastRegisteredUriRoot = new object();\r\n\r\n        public virtual void RegisterDeviceAsync(Action callback)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var channelUri = GetPushChannelUri();\r\n\r\n                if (string.IsNullOrEmpty(channelUri))\r\n                {\r\n                    Telegram.Logs.Log.Write(\"PushServiceBase.RegisterDeviceAsync channelUri=null\");\r\n                    return;\r\n                }\r\n\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (!isAuthorized)\r\n                {\r\n                    Telegram.Logs.Log.Write(\"PushServiceBase.RegisterDeviceAsync isAuthorized=false\");\r\n                    return;\r\n                }\r\n\r\n                lock (_lastRegisteredUriRoot)\r\n                {\r\n                    if (string.Equals(_lastRegisteredUri, channelUri))\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"PushServiceBase.RegisterDeviceAsync lastRegisteredUri=channelUri \" + channelUri);\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                Service.RegisterDeviceAsync(\r\n                    TokenType,\r\n                    new TLString(channelUri),\r\n                    result =>\r\n                    {\r\n                        lock (_lastRegisteredUriRoot)\r\n                        {\r\n                            _lastRegisteredUri = channelUri;\r\n                        }\r\n\r\n                        //Execute.ShowDebugMessage(\"account.registerDevice result \" + result);\r\n                        TLUtils.WriteLine(\"account.registerDevice result \" + result);\r\n\r\n                        callback.SafeInvoke();\r\n                    },\r\n                    error =>\r\n                    {\r\n                        //Execute.ShowDebugMessage(\"account.registerDevice error \" + error);\r\n                        TLUtils.WriteLine(\"account.registerDevice error \" + error);\r\n                    });\r\n            });\r\n        }\r\n\r\n        public virtual void UnregisterDeviceAsync(Action callback)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var channelUri = GetPushChannelUri();\r\n\r\n                if (string.IsNullOrEmpty(channelUri))\r\n                {\r\n                    Telegram.Logs.Log.Write(\"PushServiceBase.UnregisterDeviceAsync channelUri=null\");\r\n                    callback.SafeInvoke();\r\n                    return;\r\n                }\r\n\r\n                Service.UnregisterDeviceAsync(\r\n                    TokenType,\r\n                    new TLString(channelUri),\r\n                    result =>\r\n                    {\r\n                        lock (_lastRegisteredUriRoot)\r\n                        {\r\n                            _lastRegisteredUri = null;\r\n                        }\r\n                        TLUtils.WriteLine(\"account.unregisterDevice result \" + result);\r\n                        callback.SafeInvoke();\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"account.unregisterDevice error \" + error);\r\n                        TLUtils.WriteLine(\"account.unregisterDevice error \" + error);\r\n                        callback.SafeInvoke();\r\n                    });\r\n            });\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Services/StateService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Device.Location;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Payments;\r\nusing TelegramClient.Views.Dialogs;\r\n#if WP81\r\nusing Windows.Storage;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing ImageTools;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.ViewModels.Passport;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public class StateService : TelegramPropertyChangedBase, IStateService\r\n    {\r\n        public TLString CurrentEmail { get; set; }\r\n        public TLSentEmailCode SentEmailCode { get; set; }\r\n        public SecureRequiredType SecureRequiredType { get; set; }\r\n        public TLSecureValueTypeBase SecureType { get; set; }\r\n        public TLSecureValue SecureValue { get; set; }\r\n        public IList<TLSecureValue> SecureValues { get; set; }\r\n        public TLProxyBase Proxy { get; set; }\r\n        public TLAuthorizationForm AuthorizationForm { get; set; }\r\n        public TLVector<TLChatBase> CurrentFeed { get; set; }\r\n        public TLInt MessageId { get; set; }\r\n        public bool SuppressProxySharing { get; set; }\r\n        public string PhoneCallId { get; set; }\r\n        public bool RemoveCheckoutAndCardView { get; set; }\r\n        public bool ShowScrollDownButton { get; set; }\r\n        public bool HideCountryCode { get; set; }\r\n        public bool ResidenceCountry { get; set; }\r\n        public PaymentInfo PaymentInfo { get; set; }\r\n        public bool CollapseSearchControl { get; set; }\r\n        public TLMessageMediaContact PhoneContact { get; set; }\r\n        public TLVector<TLWallPaperBase> Wallpapers { get; set; }\r\n        public Settings Settings { get; set; }\r\n        public string GameString { get; set; }\r\n        public TLInputPeerBase InputPeer { get; set; }\r\n        public TLGame Game { get; set; }\r\n        public TLBotCallbackAnswer BotCallbackAnswer { get; set; }\r\n        public TLSentCodeBase SentCode { get; set; }\r\n        public int ConfirmWait { get; set; }\r\n        public TLObject SwitchPMWith { get; set; }\r\n        public TLInlineBotSwitchPM SwitchPM { get; set; }\r\n        public TLKeyboardButtonSwitchInline SwitchInlineButton { get; set; }\r\n        public bool UpdateSubtitle { get; set; }\r\n        public bool UpdateChannelAdministrators { get; set; }\r\n        public string Post { get; set; }\r\n        public bool LinkPreviews { get; set; }\r\n        public string Url { get; set; }\r\n        public string UrlText { get; set; }\r\n\r\n        public TLChannelAdminRights CurrentAdminRights { get; set; }\r\n        public TLChannelParticipantRoleBase CurrentRole { get; set; }\r\n        public TLChannel NewChannel { get; set; }\r\n\r\n        public TLMessageBase Message { get; set; }\r\n        public IList<TLMessageBase> Messages { get; set; }\r\n        public Uri WebLink { get; set; }\r\n        public IReadOnlyList<IStorageItem> StorageItems { get; set; }\r\n        public string AccessToken { get; set; }\r\n        public TLUserBase Bot { get; set; }\r\n        public int SelectedAutolockTimeout { get; set; }\r\n        public string LogFileName { get; set; }\r\n\r\n        public GeoCoordinate GeoCoordinate { get; set; }\r\n\r\n        public bool AnimateTitle { get; set; }\r\n        public string ShareCaption { get; set; }\r\n        public string ShareLink { get; set; }\r\n        public string ShareMessage { get; set; }\r\n\r\n        public bool IsInviteVisible { get; set; }\r\n\r\n        public TLPasswordBase Password { get; set; }\r\n        public TLPasswordInputSettings NewPasswordSettings { get; set; }\r\n\r\n        public string Hashtag { get; set; }\r\n\r\n        public TLDialogBase Dialog { get; set; }\r\n\r\n        public bool FirstRun { get; set; }\r\n        public TLString PhoneNumber { get; set; }\r\n        public string PhoneNumberString { get; set; }\r\n        public TLString PhoneCode { get; set; }\r\n        public TLString PhoneCodeHash { get; set; }\r\n        public TLInt SendCallTimeout { get; set; }\r\n        public TLBool PhoneRegistered { get; set; }\r\n        public TLSentCodeTypeBase Type { get; set; }\r\n        public TLCodeTypeBase NextType { get; set; }\r\n        public bool ClearNavigationStack { get; set; }\r\n        public TLUserBase CurrentContact { get; set; }\r\n        public TLString CurrentContactPhone { get; set; }\r\n\r\n        private int? _currentUserId;\r\n\r\n        public int CurrentUserId\r\n        {\r\n            get\r\n            {\r\n                if (_currentUserId == null)\r\n                {\r\n                    _currentUserId = SettingsHelper.GetValue<int>(Constants.CurrentUserKey);\r\n                }\r\n                return _currentUserId.Value;\r\n            }\r\n            set\r\n            {\r\n                var mtProtoService = IoC.Get<IMTProtoService>();\r\n                mtProtoService.CurrentUserId = new TLInt(value);\r\n                _currentUserId = value;\r\n\r\n                SettingsHelper.CrossThreadAccess(\r\n                    settings =>\r\n                    {\r\n                        settings[Constants.CurrentUserKey] = value;\r\n                        settings.Save();\r\n                    });\r\n            }\r\n        }\r\n\r\n        private Color? _currentBackgroundColor;\r\n\r\n        public Color CurrentBackgroundColor\r\n        {\r\n            get\r\n            {\r\n                if (_currentBackgroundColor.HasValue)\r\n                {\r\n                    return _currentBackgroundColor.Value;\r\n                }\r\n\r\n                var background = CurrentBackground;\r\n\r\n                var color = Colors.Black;\r\n                color.A = 153;  //99000000\r\n\r\n                var blackTransparent = Colors.Black;\r\n                blackTransparent.A = 0;\r\n\r\n                _currentBackgroundColor = background != null && background.Name != \"Empty\" ? color : blackTransparent;\r\n\r\n                return _currentBackgroundColor.Value;\r\n            }\r\n        }\r\n\r\n        private Brush _currentForegroundBrush;\r\n\r\n        public Brush CurrentForegroundBrush\r\n        {\r\n            get\r\n            {\r\n                if (_currentForegroundBrush != null)\r\n                {\r\n                    return _currentForegroundBrush;\r\n                }\r\n\r\n                var background = CurrentBackground;\r\n\r\n                var brush = new SolidColorBrush(Colors.White);\r\n                var defaultBrush = (Brush)Application.Current.Resources[\"PhoneForegroundBrush\"];\r\n\r\n                _currentForegroundBrush = background != null && background.Name != \"Empty\" ? brush : defaultBrush;\r\n\r\n                return _currentForegroundBrush;\r\n            }\r\n        }\r\n\r\n        private Brush _currentForegroundSubtleBrush;\r\n\r\n        public Brush CurrentForegroundSubtleBrush\r\n        {\r\n            get\r\n            {\r\n                if (_currentForegroundSubtleBrush != null)\r\n                {\r\n                    return _currentForegroundSubtleBrush;\r\n                }\r\n\r\n                var background = CurrentBackground;\r\n\r\n                var brush = new SolidColorBrush(Colors.White) { Opacity = 0.7 };\r\n\r\n                var defaultBrush = (Brush)Application.Current.Resources[\"PhoneSubtleBrush\"];\r\n\r\n                _currentForegroundSubtleBrush = background != null && background.Name != \"Empty\" ? brush : defaultBrush;\r\n\r\n                return _currentForegroundSubtleBrush;\r\n            }\r\n        }\r\n\r\n        private BackgroundItem _currentBackground;\r\n\r\n        public BackgroundItem CurrentBackground\r\n        {\r\n            get\r\n            {\r\n                if (_currentBackground == null)\r\n                {\r\n                    var currentBackground = SettingsHelper.GetValue<BackgroundItem>(Constants.CurrentBackgroundKey);\r\n                    if (currentBackground == null)\r\n                    {\r\n                        _currentBackground = new BackgroundItem { Name = \"Empty\" };\r\n                    }\r\n                    else\r\n                    {\r\n                        _currentBackground = currentBackground;\r\n                    }\r\n                }\r\n\r\n                return _currentBackground;\r\n            }\r\n            set\r\n            {\r\n                _currentBackground = value;\r\n\r\n                SettingsHelper.CrossThreadAccess(\r\n                    settings =>\r\n                    {\r\n                        settings[Constants.CurrentBackgroundKey] = value;\r\n                        settings.Save();\r\n\r\n                        _currentBackgroundColor = null;\r\n                        _currentForegroundBrush = null;\r\n                        _currentForegroundSubtleBrush = null;\r\n\r\n                        NotifyOfPropertyChange(() => CurrentBackground);\r\n                    });\r\n            }\r\n        }\r\n\r\n        public bool IsEmptyBackground\r\n        {\r\n            get { return CurrentBackground == null || CurrentBackground.Name == \"Empty\"; }\r\n        }\r\n\r\n        public bool SendByEnter\r\n        {\r\n            get\r\n            {\r\n                return SettingsHelper.GetValue<bool>(Constants.SendByEnterKey);\r\n            }\r\n            set\r\n            {\r\n                SettingsHelper.CrossThreadAccess(\r\n                    settings =>\r\n                    {\r\n                        settings[Constants.SendByEnterKey] = value;\r\n                        settings.Save();\r\n                        NotifyOfPropertyChange(() => SendByEnter);\r\n                    });\r\n            }\r\n        }\r\n\r\n        public void ResetPasscode()\r\n        {\r\n            PasscodeUtils.Reset();\r\n        }\r\n\r\n        public DateTime CloseTime\r\n        {\r\n            get\r\n            {\r\n                return SettingsHelper.GetValue<DateTime>(Constants.AppCloseTimeKey);\r\n            }\r\n            set\r\n            {\r\n                SettingsHelper.CrossThreadAccess(\r\n                    settings =>\r\n                    {\r\n                        settings[Constants.AppCloseTimeKey] = value;\r\n                        settings.Save();\r\n                    });\r\n\r\n                NotifyOfPropertyChange(() => CloseTime);\r\n            }\r\n        }\r\n\r\n        public string Passcode\r\n        {\r\n            get\r\n            {\r\n                return SettingsHelper.GetValue<string>(Constants.PasscodeKey);\r\n            }\r\n            set\r\n            {\r\n                SettingsHelper.CrossThreadAccess(\r\n                    settings =>\r\n                    {\r\n                        settings[Constants.PasscodeKey] = value;\r\n                        settings.Save();\r\n                    });\r\n\r\n                NotifyOfPropertyChange(() => Passcode);\r\n            }\r\n        }\r\n\r\n        public bool IsSimplePasscode\r\n        {\r\n            get\r\n            {\r\n                return SettingsHelper.GetValue<bool>(Constants.IsSimplePasscodeKey);\r\n            }\r\n            set\r\n            {\r\n                SettingsHelper.CrossThreadAccess(\r\n                    settings =>\r\n                    {\r\n                        settings[Constants.IsSimplePasscodeKey] = value;\r\n                        settings.Save();\r\n                    });\r\n\r\n                NotifyOfPropertyChange(() => IsSimplePasscode);\r\n            }\r\n        }\r\n\r\n        public bool Locked\r\n        {\r\n            get\r\n            {\r\n                return SettingsHelper.GetValue<bool>(Constants.IsPasscodeEnabledKey);\r\n            }\r\n            set\r\n            {\r\n                SettingsHelper.CrossThreadAccess(\r\n                    settings =>\r\n                    {\r\n                        settings[Constants.IsPasscodeEnabledKey] = value;\r\n                        settings.Save();\r\n                    });\r\n\r\n                NotifyOfPropertyChange(() => Locked);\r\n            }\r\n        }\r\n\r\n        public int AutolockTimeout\r\n        {\r\n            get\r\n            {\r\n                return SettingsHelper.GetValue<int>(Constants.PasscodeAutolockKey);\r\n            }\r\n            set\r\n            {\r\n                SettingsHelper.CrossThreadAccess(\r\n                    settings =>\r\n                    {\r\n                        settings[Constants.PasscodeAutolockKey] = value;\r\n                        settings.Save();\r\n                    });\r\n\r\n                NotifyOfPropertyChange(() => AutolockTimeout);\r\n            }\r\n        }\r\n\r\n        public WriteableBitmap ActiveBitmap { get; set; }\r\n\r\n        public bool CreateSecretChat { get; set; }\r\n        public TLEncryptedChatBase CurrentEncryptedChat { get; set; }\r\n        public TLString CurrentKey { get; set; }\r\n        public TLLong CurrentKeyFingerprint { get; set; }\r\n        public bool MediaTab { get; set; }\r\n\r\n        public TLObject With { get; set; }\r\n        public IList<TLMessageBase> DialogMessages { get; set; }\r\n        public IList<TLDialogBase> LoadedDialogs { get; set; }\r\n        public bool RemoveBackEntry { get; set; }\r\n        public bool RemoveBackEntries { get; set; }\r\n        public TLMessage MediaMessage { get; set; }\r\n        public TLDecryptedMessage DecryptedMediaMessage { get; set; }\r\n\r\n        public Photo Photo { get; set; }\r\n        public string FileId { get; set; }\r\n        public Photo Document { get; set; }\r\n        public byte[] ProfilePhotoBytes { get; set; }\r\n        public TLChatBase CurrentChat { get; set; }\r\n        public IInputPeer CurrentInputPeer { get; set; }\r\n\r\n        private readonly List<string> _sounds = new List<string> { \"Default\", \"Sound1\", \"Sound2\", \"Sound3\", \"Sound4\", \"Sound5\", \"Sound6\" };\r\n\r\n        public List<string> Sounds\r\n        {\r\n            get { return _sounds; }\r\n        }\r\n\r\n        public TLUserBase Participant { get; set; }\r\n\r\n        public TLMessage CurrentPhotoMessage { get; set; }\r\n        public TLDecryptedMessage CurrentDecryptedPhotoMessage { get; set; }\r\n        public int CurrentMediaMessageId { get; set; }\r\n        public IList<TLMessage> CurrentMediaMessages { get; set; }\r\n        public IList<TLDecryptedMessage> CurrentDecryptedMediaMessages { get; set; }\r\n\r\n        public TLPhotoBase CurrentPhoto { get; set; }\r\n\r\n\r\n        // public bool InAppVibration { get; set; }\r\n        // public bool InAppSound { get; set; }\r\n        // public bool InAppMessagePreview { get; set; }\r\n\r\n\r\n        public bool IsMainViewOpened { get; set; }\r\n        public bool IsDialogOpened { get; set; }\r\n        public TLObject ActiveDialog { get; set; }\r\n\r\n        public TLUserBase SharedContact { get; set; }\r\n        public TLMessageMediaContact SharedContactMedia { get; set; }\r\n        public string IsoFileName { get; set; }\r\n        public Country SelectedCountry { get; set; }\r\n        public Country SelectedResidenceCountry { get; set; }\r\n        public bool FocusOnInputMessage { get; set; }\r\n        public string VideoIsoFileName { get; set; }\r\n        public long Duration { get; set; }\r\n        public RecordedVideo RecordedVideo { get; set; }\r\n        public IList<TLUserBase> RemovedUsers { get; set; }\r\n        public List<TLMessageBase> ForwardMessages { get; set; }\r\n        public bool WithMyScore { get; set; }\r\n\r\n        public bool SuppressNotifications { get; set; }\r\n\r\n        public bool Tombstoning { get; set; }\r\n\r\n        public string UserId { get; set; }\r\n        public string ChatId { get; set; }\r\n        public string BroadcastId { get; set; }\r\n\r\n        public int ForwardingMessagesCount { get; set; }\r\n        public bool RequestForwardingCount { get; set; }\r\n\r\n        public ExtendedImage ExtendedImage { get; set; }\r\n\r\n#if WP81\r\n        public CompressingVideoFile CompressingVideoFile { get; set; }\r\n#endif\r\n        public int AccountDaysTTL { get; set; }\r\n        public TLPrivacyRules PrivacyRules { get; set; }\r\n        public IPrivacyValueUsersRule UsersRule { get; set; }\r\n\r\n\r\n        public IList<TLUserBase> SelectedUsers { get; set; }\r\n        public IList<TLInt> SelectedUserIds { get; set; }\r\n        public bool NavigateToDialogDetails { get; set; }\r\n        public bool NavigateToSecretChat { get; set; }\r\n        public string Domain { get; set; }\r\n        public bool ChangePhoneNumber { get; set; }\r\n        public TimerSpan SelectedTimerSpan { get; set; }\r\n        public List<TimerSpan> TimerSpans { get; set; }\r\n        public bool IsEncryptedTimer { get; set; }\r\n        public TLDCOption DCOption { get; set; }\r\n        public TLDHConfig DHConfig { get; set; }\r\n        public List<TLMessageBase> Source { get; set; }\r\n        //public bool SearchDialogs { get; set; }\r\n\r\n        #region Settings\r\n\r\n        private readonly object _settingsRoot = new object();\r\n\r\n        private Settings _settings;\r\n\r\n        public void GetNotifySettingsAsync(Action<Settings> callback)\r\n        {\r\n            if (_settings != null)\r\n            {\r\n                callback(_settings);\r\n                return;\r\n            }\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _settings = TLUtils.OpenObjectFromFile<Settings>(_settingsRoot, Constants.CommonNotifySettingsFileName) ?? new Settings();\r\n                _settings.IsNotifying = true;\r\n                callback(_settings);\r\n            });\r\n        }\r\n\r\n        public Settings GetNotifySettings()\r\n        {\r\n            if (_settings != null)\r\n            {\r\n                return _settings;\r\n            }\r\n\r\n            _settings = TLUtils.OpenObjectFromFile<Settings>(_settingsRoot, Constants.CommonNotifySettingsFileName) ?? new Settings();\r\n            _settings.IsNotifying = true;\r\n            return _settings;\r\n        }\r\n\r\n        public void SaveNotifySettingsAsync(Settings settings)\r\n        {\r\n            TLUtils.SaveObjectToFile(_settingsRoot, Constants.CommonNotifySettingsFileName, settings);\r\n        }\r\n\r\n        #endregion\r\n\r\n        private readonly object _serverFilesRoot = new object();\r\n\r\n        private TLVector<TLServerFile> _serverFiles;\r\n\r\n        public void GetServerFilesAsync(Action<TLVector<TLServerFile>> callback)\r\n        {\r\n            if (_serverFiles != null)\r\n            {\r\n                callback(_serverFiles);\r\n                return;\r\n            }\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _serverFiles = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLServerFile>>(_serverFilesRoot, Constants.CachedServerFilesFileName) ?? new TLVector<TLServerFile>();\r\n                callback(_serverFiles);\r\n            });\r\n        }\r\n\r\n        public void SaveServerFilesAsync(TLVector<TLServerFile> serverFiles)\r\n        {\r\n            TLUtils.SaveObjectToMTProtoFile(_serverFilesRoot, Constants.CachedServerFilesFileName, serverFiles);\r\n        }\r\n\r\n        private readonly object _archivedStickersRoot = new object();\r\n\r\n        private TLArchivedStickers _archivedStickers;\r\n\r\n        public void GetArchivedStickersAsync(Action<TLArchivedStickers> callback)\r\n        {\r\n            if (_archivedStickers != null)\r\n            {\r\n                callback(_archivedStickers);\r\n                return;\r\n            }\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _archivedStickers = TLUtils.OpenObjectFromMTProtoFile<TLArchivedStickers>(_archivedStickersRoot, Constants.ArchivedStickersFileName);\r\n                callback(_archivedStickers);\r\n            });\r\n        }\r\n\r\n        public TLArchivedStickers GetArchivedStickers()\r\n        {\r\n            if (_archivedStickers != null)\r\n            {\r\n                return _archivedStickers;\r\n            }\r\n\r\n            _archivedStickers = TLUtils.OpenObjectFromMTProtoFile<TLArchivedStickers>(_archivedStickersRoot, Constants.ArchivedStickersFileName);\r\n            return _archivedStickers;\r\n        }\r\n\r\n        public void SaveArchivedStickersAsync(TLArchivedStickers archivedStickers)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _archivedStickers = archivedStickers;\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_archivedStickersRoot, Constants.ArchivedStickersFileName, archivedStickers);\r\n            });\r\n        }\r\n\r\n        public void ClearArchivedStickersAsync()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _archivedStickers = null;\r\n\r\n                FileUtils.Delete(_archivedStickersRoot, Constants.ArchivedStickersFileName);\r\n            });\r\n        }\r\n\r\n        private readonly object _featuredStickersRoot = new object();\r\n\r\n        private TLFeaturedStickers _featuredStickers;\r\n\r\n        public void GetFeaturedStickersAsync(Action<TLFeaturedStickers> callback)\r\n        {\r\n            if (_featuredStickers != null)\r\n            {\r\n                callback(_featuredStickers);\r\n                return;\r\n            }\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _featuredStickers = TLUtils.OpenObjectFromMTProtoFile<TLFeaturedStickers>(_featuredStickersRoot, Constants.FeaturedStickersFileName);\r\n\r\n                ProcessFeaturedStickers(_featuredStickers);\r\n\r\n                callback(_featuredStickers);\r\n            });\r\n        }\r\n\r\n        public TLFeaturedStickers GetFeaturedStickers()\r\n        {\r\n            if (_featuredStickers != null)\r\n            {\r\n                return _featuredStickers;\r\n            }\r\n\r\n            _featuredStickers = TLUtils.OpenObjectFromMTProtoFile<TLFeaturedStickers>(_featuredStickersRoot, Constants.FeaturedStickersFileName);\r\n\r\n            ProcessFeaturedStickers(_featuredStickers);\r\n\r\n            return _featuredStickers;\r\n        }\r\n\r\n        private void ProcessFeaturedStickers(TLFeaturedStickers featuredStickers)\r\n        {\r\n            if (featuredStickers == null) return;\r\n#if DEBUG\r\n            featuredStickers.Unread.Clear();\r\n            foreach (var set in featuredStickers.Sets)\r\n            {\r\n                featuredStickers.Unread.Add(set.Id);\r\n            }\r\n#endif\r\n\r\n            var stickerSets = new Dictionary<string, TLVector<TLStickerItem>>();\r\n            var unreadDict = new Dictionary<long, long>();\r\n            foreach (var unreadId in featuredStickers.Unread)\r\n            {\r\n                unreadDict[unreadId.Value] = unreadId.Value;\r\n            }\r\n\r\n            for (var i = 0; i < featuredStickers.Documents.Count; i++)\r\n            {\r\n                var document22 = featuredStickers.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        TLVector<TLStickerItem> stickers;\r\n                        if (stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(new TLStickerItem { Document = document22 });\r\n                        }\r\n                        else\r\n                        {\r\n                            stickerSets[setId] = new TLVector<TLStickerItem> { new TLStickerItem { Document = document22 } };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            for (var i = 0; i < featuredStickers.Sets.Count; i++)\r\n            {\r\n                var set = featuredStickers.Sets[i];\r\n                if (unreadDict.ContainsKey(set.Id.Value))\r\n                {\r\n                    set.Unread = true;\r\n                }\r\n\r\n                var setName = set.Id.ToString();\r\n                TLVector<TLStickerItem> stickers;\r\n                if (stickerSets.TryGetValue(setName, out stickers))\r\n                {\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        objects.Add(sticker);\r\n                    }\r\n\r\n                    set.Stickers = objects;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void SaveFeaturedStickersAsync(TLFeaturedStickers featuredStickers)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _featuredStickers = featuredStickers;\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_featuredStickersRoot, Constants.FeaturedStickersFileName, featuredStickers);\r\n            });\r\n        }\r\n\r\n        public void ClearFeaturedStickersAsync()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _featuredStickers = null;\r\n\r\n                FileUtils.Delete(_featuredStickersRoot, Constants.FeaturedStickersFileName);\r\n            });\r\n        }\r\n\r\n\r\n        private readonly object _masksRoot = new object();\r\n\r\n        private TLAllStickers _masks;\r\n\r\n        public void GetMasksAsync(Action<TLAllStickers> callback)\r\n        {\r\n            if (_masks != null)\r\n            {\r\n                callback(_masks);\r\n                return;\r\n            }\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _masks = TLUtils.OpenObjectFromMTProtoFile<TLAllStickers>(_masksRoot, Constants.MasksFileName);\r\n\r\n                callback(_masks);\r\n            });\r\n        }\r\n\r\n        public TLAllStickers GetMasks()\r\n        {\r\n            if (_masks != null)\r\n            {\r\n                return _masks;\r\n            }\r\n\r\n            _masks = TLUtils.OpenObjectFromMTProtoFile<TLAllStickers>(_masksRoot, Constants.MasksFileName);\r\n\r\n            return _masks;\r\n        }\r\n\r\n        public void SaveMasksAsync(TLAllStickers masks)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _masks = masks;\r\n                if (masks != null)\r\n                {\r\n                    var allStickers29 = masks as TLAllStickers29;\r\n                    if (allStickers29 != null && allStickers29.RecentlyUsed != null)\r\n                    {\r\n                        allStickers29.RecentlyUsed = new TLVector<TLRecentlyUsedSticker>(allStickers29.RecentlyUsed.Take(20).ToList());\r\n                    }\r\n                }\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_masksRoot, Constants.MasksFileName, masks);\r\n            });\r\n        }\r\n\r\n        public void ClearMasksAsync()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _masks = null;\r\n\r\n                FileUtils.Delete(_masksRoot, Constants.MasksFileName);\r\n            });\r\n        }\r\n\r\n        private readonly object _allStickersRoot = new object();\r\n\r\n        private TLAllStickers _allStickers;\r\n\r\n        public void GetAllStickersAsync(Action<TLAllStickers> callback)\r\n        {\r\n            if (_allStickers != null)\r\n            {\r\n                callback(_allStickers);\r\n                return;\r\n            }\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _allStickers = TLUtils.OpenObjectFromMTProtoFile<TLAllStickers>(_allStickersRoot, Constants.AllStickersFileName);\r\n\r\n                ProcessAllStickers();\r\n\r\n                callback(_allStickers);\r\n            });\r\n        }\r\n\r\n        private void ProcessAllStickers()\r\n        {\r\n            return;\r\n#if DEBUG\r\n            var allStickers43 = _allStickers as TLAllStickers43;\r\n            if (allStickers43 != null)\r\n            {\r\n                allStickers43.RecentStickers = new TLRecentStickers\r\n                {\r\n                    Hash = new TLInt(0),\r\n                    Documents = new TLVector<TLDocumentBase>()\r\n                };\r\n            }\r\n#endif\r\n        }\r\n\r\n        public TLAllStickers GetAllStickers()\r\n        {\r\n            if (_allStickers != null)\r\n            {\r\n                return _allStickers;\r\n            }\r\n\r\n            _allStickers = TLUtils.OpenObjectFromMTProtoFile<TLAllStickers>(_allStickersRoot, Constants.AllStickersFileName);\r\n\r\n            ProcessAllStickers();\r\n\r\n            return _allStickers;\r\n        }\r\n\r\n        public void SaveAllStickersAsync(TLAllStickers allStickers)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _allStickers = allStickers;\r\n                if (allStickers != null)\r\n                {\r\n                    var allStickers29 = allStickers as TLAllStickers29;\r\n                    if (allStickers29 != null && allStickers29.RecentlyUsed != null)\r\n                    {\r\n                        allStickers29.RecentlyUsed = new TLVector<TLRecentlyUsedSticker>(allStickers29.RecentlyUsed.Take(20).ToList());\r\n                    }\r\n                }\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_allStickersRoot, Constants.AllStickersFileName, allStickers);\r\n            });\r\n        }\r\n\r\n        public void ClearAllStickersAsync()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _allStickers = null;\r\n\r\n                FileUtils.Delete(_allStickersRoot, Constants.AllStickersFileName);\r\n            });\r\n        }\r\n\r\n        private TLChatSettings _chatSettings;\r\n\r\n        private readonly object _chatSettingsSyncRoot = new object();\r\n\r\n        public TLChatSettings GetChatSettings()\r\n        {\r\n            if (_chatSettings != null)\r\n            {\r\n                return _chatSettings;\r\n            }\r\n\r\n            _chatSettings = TLUtils.OpenObjectFromMTProtoFile<TLChatSettings>(_chatSettingsSyncRoot, Constants.ChatSettingsFileName)\r\n                ?? new TLChatSettings { AutoDownloadPhotoPrivateChats = true, AutoDownloadPhotoGroups = true, AutoDownloadAudioPrivateChats = true, AutoDownloadAudioGroups = true };\r\n\r\n            return _chatSettings;\r\n        }\r\n\r\n        public void SaveChatSettings(TLChatSettings chatSettings)\r\n        {\r\n            _chatSettings = chatSettings;\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_chatSettingsSyncRoot, Constants.ChatSettingsFileName, chatSettings);\r\n        }\r\n\r\n        private TLContactsSettings _contactsSettings;\r\n\r\n        private readonly object _contactsSettingsSyncRoot = new object();\r\n\r\n        public TLContactsSettings GetContactsSettings()\r\n        {\r\n            if (_contactsSettings != null)\r\n            {\r\n                return _contactsSettings;\r\n            }\r\n\r\n            _contactsSettings = TLUtils.OpenObjectFromMTProtoFile<TLContactsSettings>(_contactsSettingsSyncRoot, Constants.ContactsSettingsFileName)\r\n                ?? new TLContactsSettings { Flags = new TLLong(0) };\r\n\r\n            return _contactsSettings;\r\n        }\r\n\r\n        public void SaveContactsSettings(TLContactsSettings contactsSettings)\r\n        {\r\n            _contactsSettings = contactsSettings;\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_contactsSettingsSyncRoot, Constants.ContactsSettingsFileName, contactsSettings);\r\n        }\r\n\r\n        private TLCameraSettings _cameraSettings;\r\n\r\n        private readonly object _cameraSettingsSyncRoot = new object();\r\n\r\n        public TLCameraSettings GetCameraSettings()\r\n        {\r\n            if (_cameraSettings != null)\r\n            {\r\n                return _cameraSettings;\r\n            }\r\n\r\n            _cameraSettings = TLUtils.OpenObjectFromMTProtoFile<TLCameraSettings>(_cameraSettingsSyncRoot, Constants.CameraSettingsFileName)\r\n                ?? new TLCameraSettings { External = false };\r\n\r\n            return _cameraSettings;\r\n        }\r\n\r\n        public void SaveCameraSettings(TLCameraSettings cameraSettings)\r\n        {\r\n            _cameraSettings = cameraSettings;\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_cameraSettingsSyncRoot, Constants.CameraSettingsFileName, cameraSettings);\r\n        }\r\n\r\n        private TLPhotoPickerSettings _photoPickerSettings;\r\n\r\n        private readonly object _photoPickerSettingsSyncRoot = new object();\r\n\r\n        public TLPhotoPickerSettings GetPhotoPickerSettings()\r\n        {\r\n            if (_photoPickerSettings != null)\r\n            {\r\n                return _photoPickerSettings;\r\n            }\r\n\r\n            _photoPickerSettings = TLUtils.OpenObjectFromMTProtoFile<TLPhotoPickerSettings>(_photoPickerSettingsSyncRoot, Constants.PhotoPickerSettingsFileName)\r\n                ?? new TLPhotoPickerSettings { External = false };\r\n\r\n            return _photoPickerSettings;\r\n        }\r\n\r\n        public void SavePhotoPickerSettings(TLPhotoPickerSettings photoPickerSettings)\r\n        {\r\n            _photoPickerSettings = photoPickerSettings;\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_photoPickerSettingsSyncRoot, Constants.PhotoPickerSettingsFileName, photoPickerSettings);\r\n        }\r\n\r\n        private TLTmpPassword _tmpPassword;\r\n\r\n        private readonly object _tmpPasswordSyncRoot = new object();\r\n\r\n        public TLTmpPassword GetTmpPassword()\r\n        {\r\n            if (_tmpPassword != null)\r\n            {\r\n                return _tmpPassword;\r\n            }\r\n\r\n            _tmpPassword = TLUtils.OpenObjectFromMTProtoFile<TLTmpPassword>(_tmpPasswordSyncRoot, Constants.TmpPasswordFileName);\r\n\r\n            return _tmpPassword;\r\n        }\r\n\r\n        public void SaveTmpPassword(TLTmpPassword tmpPassword)\r\n        {\r\n            _tmpPassword = tmpPassword;\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_tmpPasswordSyncRoot, Constants.TmpPasswordFileName, tmpPassword);\r\n        }\r\n\r\n        private readonly object _wallpapersRoot = new object();\r\n\r\n        private TLVector<TLWallPaperBase> _wallpapers;\r\n\r\n        public void GetWallpapersAsync(Action<TLVector<TLWallPaperBase>> callback)\r\n        {\r\n            if (_wallpapers != null)\r\n            {\r\n                callback(_wallpapers);\r\n                return;\r\n            }\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _wallpapers = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLWallPaperBase>>(_wallpapersRoot, Constants.WallpapersFileName);\r\n\r\n                callback(_wallpapers);\r\n            });\r\n        }\r\n\r\n        public TLVector<TLWallPaperBase> GetWallpapers()\r\n        {\r\n            if (_wallpapers != null)\r\n            {\r\n                return _wallpapers;\r\n            }\r\n\r\n            _wallpapers = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLWallPaperBase>>(_wallpapersRoot, Constants.WallpapersFileName);\r\n\r\n            return _wallpapers;\r\n        }\r\n\r\n        public void SaveWallpapersAsync(TLVector<TLWallPaperBase> wallpapers)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _wallpapers = wallpapers;\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_wallpapersRoot, Constants.WallpapersFileName, wallpapers);\r\n            });\r\n        }\r\n\r\n        public void ClearWallpapersAsync()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _wallpapers = null;\r\n\r\n                FileUtils.Delete(_wallpapersRoot, Constants.WallpapersFileName);\r\n            });\r\n        }\r\n\r\n        private static readonly object _topPeersSyncRoot = new object();\r\n\r\n        private static TLTopPeersBase _topPeers;\r\n\r\n        public TLTopPeersBase GetTopPeers()\r\n        {\r\n            if (_topPeers != null)\r\n            {\r\n                return _topPeers;\r\n            }\r\n\r\n            _topPeers = TLUtils.OpenObjectFromMTProtoFile<TLTopPeersBase>(_topPeersSyncRoot, Constants.TopPeersFileName) as TLTopPeers;\r\n\r\n            return _topPeers;\r\n        }\r\n\r\n        public void SaveTopPeers(TLTopPeersBase topPeers)\r\n        {\r\n            _topPeers = topPeers;\r\n\r\n            if (topPeers == null)\r\n            {\r\n                FileUtils.Delete(_topPeersSyncRoot, Constants.TopPeersFileName);\r\n            }\r\n            else\r\n            {\r\n                TLUtils.SaveObjectToMTProtoFile(_topPeersSyncRoot, Constants.TopPeersFileName, topPeers);\r\n            }\r\n        }\r\n\r\n        private static readonly object _passportConfigSyncRoot = new object();\r\n\r\n        private static TLPassportConfig _passportConfig;\r\n\r\n        public TLPassportConfig GetPassportConfig()\r\n        {\r\n            if (_passportConfig != null)\r\n            {\r\n                return _passportConfig;\r\n            }\r\n\r\n            _passportConfig = TLUtils.OpenObjectFromMTProtoFile<TLPassportConfig>(_passportConfigSyncRoot, Constants.PassportConfigFileName) as TLPassportConfig;\r\n\r\n            return _passportConfig;\r\n        }\r\n\r\n        public void SavePassportConfig(TLPassportConfig passportConfig)\r\n        {\r\n            _passportConfig = passportConfig;\r\n\r\n            if (passportConfig == null)\r\n            {\r\n                FileUtils.Delete(_passportConfigSyncRoot, Constants.PassportConfigFileName);\r\n            }\r\n            else\r\n            {\r\n                TLUtils.SaveObjectToMTProtoFile(_passportConfigSyncRoot, Constants.PassportConfigFileName, passportConfig);\r\n            }\r\n        }\r\n\r\n        private static readonly object _callsSecuritySyncRoot = new object();\r\n\r\n        private static TLCallsSecurity _callsSecurity;\r\n\r\n        public TLCallsSecurity GetCallsSecurity(bool defaultP2PContacts)\r\n        {\r\n            if (_callsSecurity != null)\r\n            {\r\n                return _callsSecurity;\r\n            }\r\n\r\n            _callsSecurity = TLUtils.OpenObjectFromMTProtoFile<TLCallsSecurity>(_callsSecuritySyncRoot, Constants.CallsSecurityFileName) ?? new TLCallsSecurity{ PeerToPeer = true };\r\n            _callsSecurity.Update(defaultP2PContacts);\r\n\r\n            return _callsSecurity;\r\n        }\r\n\r\n        public void SaveCallsSecurity(TLCallsSecurity callsSecurity)\r\n        {\r\n            _callsSecurity = callsSecurity;\r\n\r\n            if (callsSecurity == null)\r\n            {\r\n                FileUtils.Delete(_callsSecuritySyncRoot, Constants.CallsSecurityFileName);\r\n            }\r\n            else\r\n            {\r\n                TLUtils.SaveObjectToMTProtoFile(_callsSecuritySyncRoot, Constants.CallsSecurityFileName, _callsSecurity);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Services/UploadService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.Services.Location;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views;\r\nusing TelegramClient.Views.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public class UploadService : IUploadService, Telegram.Api.Aggregator.IHandle<UploadableItem>\r\n    {\r\n        private IStateService _stateService;\r\n\r\n        private IStateService StateService\r\n        {\r\n            get { return _stateService ?? (_stateService = IoC.Get<IStateService>()); }\r\n        }\r\n\r\n        private IMTProtoService _mtProtoService;\r\n\r\n        private IMTProtoService MTProtoService\r\n        {\r\n            get { return _mtProtoService ?? (_mtProtoService = IoC.Get<IMTProtoService>()); }\r\n        }\r\n\r\n        private ICacheService _cacheService;\r\n\r\n        private ICacheService CacheService\r\n        {\r\n            get { return _cacheService ?? (_cacheService = IoC.Get<ICacheService>()); }\r\n        }\r\n\r\n        public UploadService(ITelegramEventAggregator eventAggregator)\r\n        {\r\n            eventAggregator.Subscribe(this);\r\n        }\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var mediaDocument = item.Owner as TLMessageMediaDocument;\r\n                if (mediaDocument != null)\r\n                {\r\n\r\n                    var m = CacheService.GetSendingMessages()\r\n                            .OfType<TLMessage>()\r\n                            .FirstOrDefault(x => x.Media == mediaDocument);\r\n\r\n                    if (m == null)\r\n                    {\r\n                        Execute.ShowDebugMessage(\"ShellViewModel.Handl UploadableItem sending message=null\");\r\n                        return;\r\n                    }\r\n\r\n                    try\r\n                    {\r\n                        var document = (TLDocument)((TLMessageMediaDocument)m.Media).Document;\r\n\r\n                        var caption = document.FileName;\r\n                        var uploadedThumb = new TLInputFile\r\n                        {\r\n                            Id = item.FileId,\r\n                            MD5Checksum = new TLString(\"\"),\r\n                            Name = new TLString(caption + \".jpg\"),\r\n                            Parts = new TLInt(item.Parts.Count)\r\n                        };\r\n\r\n                        ((TLDocument)((TLMessageMediaDocument)m.Media).Document).ThumbInputFile = uploadedThumb;\r\n\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n\r\n                    }\r\n                }\r\n\r\n                var mediaVideo = item.Owner as TLMessageMediaVideo;\r\n                if (mediaVideo != null)\r\n                {\r\n\r\n                    var m = CacheService.GetSendingMessages()\r\n                        .OfType<TLMessage>()\r\n                        .FirstOrDefault(x => x.Media == mediaVideo);\r\n\r\n                    if (m == null) return;\r\n\r\n                    var caption = ((TLVideo)((TLMessageMediaVideo)m.Media).Video).Caption;\r\n                    var uploadedThumb = new TLInputFile\r\n                    {\r\n                        Id = item.FileId,\r\n                        //MD5Checksum = new TLString(MD5Core.GetHashString(item.Bytes).ToLowerInvariant()),\r\n                        MD5Checksum = new TLString(\"\"),\r\n                        Name = new TLString(caption + \".jpg\"),\r\n                        Parts = new TLInt(item.Parts.Count)\r\n                    };\r\n\r\n                    ((TLVideo)((TLMessageMediaVideo)m.Media).Video).ThumbInputFile = uploadedThumb;\r\n                }\r\n            });\r\n\r\n            var message = item.Owner as TLMessage34;\r\n            if (message != null)\r\n            {\r\n                Telegram.Logs.Log.Write(\"ShellViewModel.HandleUploadableItem rnd_id=\" + message.RandomId);\r\n                HandleUploadableItemInternal(item, message);\r\n            }\r\n\r\n            var decryptedMessage = item.Owner as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                HandleUploadableEncryptedItemInternal(item, decryptedMessage);\r\n            }\r\n\r\n            var decryptedMessageLayer17 = item.Owner as TLDecryptedMessageLayer17;\r\n            if (decryptedMessageLayer17 != null)\r\n            {\r\n                HandleUploadableEncryptedItemInternal(item, decryptedMessageLayer17);\r\n            }\r\n        }\r\n\r\n        private void HandleUploadableItemInternal(UploadableItem item, TLMessage34 message)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (item.FileNotFound)\r\n                {\r\n                    message.Media.UploadingProgress = 1.0;\r\n                    message.Status = MessageStatus.Failed;\r\n\r\n                    Telegram.Logs.Log.Write(\"ShellViewModel.HandleUploadableItemInternal item.FileNotFound\");\r\n                    return;\r\n                }\r\n\r\n                if (message.Status == MessageStatus.Failed)\r\n                {\r\n                    Telegram.Logs.Log.Write(\"ShellViewModel.HandleUploadableItemInternal message.Status==Failed rnd_id=\" + message.RandomIndex);\r\n                    return;\r\n                }\r\n\r\n                message.Media.UploadingProgress = 1.0;\r\n\r\n                var audioMedia = message.Media as TLMessageMediaAudio;\r\n                if (audioMedia != null)\r\n                {\r\n                    var audio = audioMedia.Audio as TLAudio;\r\n                    if (audio == null)\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"ShellViewModel.HandleUploadableItemInternal audio==null rnd_id=\" + message.RandomIndex);\r\n                        return;\r\n                    }\r\n\r\n                    var uploadedAudio = new TLInputMediaUploadedAudio\r\n                    {\r\n                        Duration = audio.Duration,\r\n                        File = new TLInputFile\r\n                        {\r\n                            Id = item.FileId,\r\n                            MD5Checksum = TLString.Empty,\r\n                            Name = new TLString(audioMedia.IsoFileName),\r\n                            Parts = new TLInt(item.Parts.Count)\r\n                        },\r\n                        MimeType = audio.MimeType\r\n                    };\r\n\r\n                    message.InputMedia = uploadedAudio;\r\n                    SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n                    return;\r\n                }\r\n\r\n                var mediaDocument = message.Media as TLMessageMediaDocument70;\r\n                if (mediaDocument != null)\r\n                {\r\n                    var document = mediaDocument.Document as TLDocument;\r\n                    if (document == null)\r\n                    {\r\n\r\n                        Telegram.Logs.Log.Write(\"ShellViewModel.HandleUploadableItemInternal document==null rnd_id=\" + message.RandomIndex);\r\n                        return;\r\n                    }\r\n\r\n                    TLInputFileBase file;\r\n                    if (item.IsSmallFile || message.IsVoice())\r\n                    {\r\n                        file = new TLInputFile\r\n                        {\r\n                            Id = item.FileId,\r\n                            MD5Checksum = TLString.Empty,\r\n                            Name = document.FileName,\r\n                            Parts = new TLInt(item.Parts.Count)\r\n                        };\r\n                    }\r\n                    else\r\n                    {\r\n                        file = new TLInputFileBig\r\n                        {\r\n                            Id = item.FileId,\r\n                            Name = document.FileName,\r\n                            Parts = new TLInt(item.Parts.Count)\r\n                        };\r\n                    }\r\n\r\n                    TLInputMediaBase uploadedDocument;\r\n                    if (document.ThumbInputFile != null)\r\n                    {\r\n                        uploadedDocument = new TLInputMediaUploadedDocument75\r\n                        {\r\n                            MD5Hash = new byte[0],\r\n                            Flags = new TLInt(0),\r\n                            Attributes = new TLVector<TLDocumentAttributeBase> { new TLDocumentAttributeFileName { FileName = document.FileName } },\r\n                            MimeType = document.MimeType,\r\n                            File = file,\r\n                            Thumb = document.ThumbInputFile,\r\n                            Caption = TLString.Empty,\r\n                            Stickers = null,\r\n                            TTLSeconds = mediaDocument.TTLSeconds\r\n                        };\r\n                    }\r\n                    else\r\n                    {\r\n                        uploadedDocument = new TLInputMediaUploadedDocument75\r\n                        {\r\n                            MD5Hash = new byte[] { },\r\n                            Flags = new TLInt(0),\r\n                            Attributes = new TLVector<TLDocumentAttributeBase> { new TLDocumentAttributeFileName { FileName = document.FileName } },\r\n                            MimeType = document.MimeType,\r\n                            File = file,\r\n                            Caption = TLString.Empty,\r\n                            Stickers = null,\r\n                            TTLSeconds = mediaDocument.TTLSeconds\r\n                        };\r\n                    }\r\n\r\n                    var attributes = uploadedDocument as IAttributes;\r\n                    if (attributes != null)\r\n                    {\r\n                        var document22 = document as TLDocument22;\r\n                        if (document22 != null)\r\n                        {\r\n                            if (message.IsVoice())\r\n                            {\r\n                                var audioAttribute = document22.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio) as TLDocumentAttributeAudio;\r\n                                if (audioAttribute != null)\r\n                                {\r\n                                    attributes.Attributes.Add(audioAttribute);\r\n                                }\r\n                            }\r\n\r\n                            if (message.IsMusic())\r\n                            {\r\n                                var audioAttribute = document22.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio) as TLDocumentAttributeAudio;\r\n                                if (audioAttribute != null)\r\n                                {\r\n                                    attributes.Attributes.Add(audioAttribute);\r\n                                }\r\n                            }\r\n\r\n                            if (message.IsVideo())\r\n                            {\r\n                                var videoAttribute = document22.Attributes.FirstOrDefault(x => x is TLDocumentAttributeVideo) as TLDocumentAttributeVideo;\r\n                                if (videoAttribute != null)\r\n                                {\r\n                                    attributes.Attributes.Add(videoAttribute);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    message.InputMedia = uploadedDocument;\r\n                    SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n                    return;\r\n                }\r\n\r\n                var photoMedia = message.Media as TLMessageMediaPhoto70;\r\n                if (photoMedia != null)\r\n                {\r\n                    var message73 = message as TLMessage73;\r\n                    TLObject groupedMessage;\r\n                    if (message73 != null && message73.GroupedId != null && _group.TryGetValue(message73.GroupedId.Value, out groupedMessage))\r\n                    {\r\n                        var groupedMessage73 = groupedMessage as TLMessage73;\r\n                        if (groupedMessage73 != null)\r\n                        {\r\n                            var uploadedPhoto = new TLInputMediaUploadedPhoto75\r\n                            {\r\n                                Flags = new TLInt(0),\r\n                                MD5Hash = new byte[] { },\r\n                                File = new TLInputFile\r\n                                {\r\n                                    Id = item.FileId,\r\n                                    MD5Checksum = TLString.Empty,\r\n                                    Name = new TLString(\"file\" + message73.RandomId + \".jpg\"),\r\n                                    Parts = new TLInt(item.Parts.Count)\r\n                                },\r\n                                Caption = TLString.Empty,\r\n                                Stickers = GetStickers(message),\r\n                                TTLSeconds = photoMedia.TTLSeconds\r\n                            };\r\n\r\n                            MTProtoService.UploadMediaAsync(DialogDetailsViewModel.PeerToInputPeer(message.ToId), uploadedPhoto,\r\n                                result =>\r\n                                {\r\n                                    var mediaPhoto = result as TLMessageMediaPhoto70;\r\n                                    if (mediaPhoto != null)\r\n                                    {\r\n                                        var photo = mediaPhoto.Photo as TLPhoto56;\r\n                                        if (photo != null)\r\n                                        {\r\n                                            var inputPhoto = new TLInputPhoto\r\n                                            {\r\n                                                Id = photo.Id,\r\n                                                AccessHash = photo.AccessHash\r\n                                            };\r\n\r\n                                            var inputMediaPhoto = new TLInputMediaPhoto75\r\n                                            {\r\n                                                Flags = new TLInt(0),\r\n                                                Id = inputPhoto,\r\n                                                Caption = TLString.Empty,\r\n                                                TTLSeconds = photoMedia.TTLSeconds\r\n                                            };\r\n\r\n                                            var singleMedia = new TLInputSingleMedia76\r\n                                            {\r\n                                                Flags = new TLInt(0),\r\n                                                MD5Hash = new byte[] { },\r\n                                                RandomId = message73.RandomId,\r\n                                                Media = inputMediaPhoto,\r\n                                                Message = message.Message,\r\n                                                Entities = message.Entities != null && message.Entities.Count > 0 ? message.Entities : null\r\n                                            };\r\n\r\n                                            var groupUploaded = false;\r\n                                            var inputMedia = new TLVector<TLInputSingleMedia>();\r\n                                            lock (groupedMessage)\r\n                                            {\r\n                                                message.InputMedia = singleMedia;\r\n                                                var mediaGroup = groupedMessage73.Media as TLMessageMediaGroup;\r\n                                                if (mediaGroup != null && mediaGroup.Group.OfType<TLMessage>().All(x => x.InputMedia != null))\r\n                                                {\r\n                                                    foreach (var m in mediaGroup.Group.OfType<TLMessage>())\r\n                                                    {\r\n                                                        singleMedia = m.InputMedia as TLInputSingleMedia76;\r\n                                                        if (singleMedia == null)\r\n                                                        {\r\n                                                            break;\r\n                                                        }\r\n                                                        inputMedia.Add(singleMedia);\r\n                                                    }\r\n                                                    groupUploaded = true;\r\n                                                }\r\n                                            }\r\n\r\n                                            if (groupUploaded)\r\n                                            {\r\n                                                SendMultiMediaInternal(inputMedia, (TLMessage25)groupedMessage, MTProtoService, StateService, CacheService);\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                },\r\n                                error => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    Telegram.Logs.Log.Write(\"ShellViewModel.UploadMediaAsync error=\" + error);\r\n                                    if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                                    {\r\n                                        ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodSendMessage, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                                            result =>\r\n                                            {\r\n                                                if (result == CustomMessageBoxResult.RightButton)\r\n                                                {\r\n                                                    TelegramViewBase.NavigateToUsername(MTProtoService, Constants.SpambotUsername, null, null, null);\r\n                                                }\r\n                                            });\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        Execute.ShowDebugMessage(\"messages.uploadMedia error \" + error);\r\n                                    }\r\n                                    if (groupedMessage73.Status == MessageStatus.Sending)\r\n                                    {\r\n                                        groupedMessage73.Status = groupedMessage73.Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                                    }\r\n                                }));\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        var uploadedPhoto = new TLInputMediaUploadedPhoto75\r\n                        {\r\n                            Flags = new TLInt(0),\r\n                            MD5Hash = new byte[] { },\r\n                            File = new TLInputFile\r\n                            {\r\n                                Id = item.FileId,\r\n                                MD5Checksum = TLString.Empty,\r\n                                Name = new TLString(\"file.jpg\"),\r\n                                Parts = new TLInt(item.Parts.Count)\r\n                            },\r\n                            Caption = TLString.Empty,\r\n                            Stickers = GetStickers(message),\r\n                            TTLSeconds = photoMedia.TTLSeconds\r\n                        };\r\n                        message.InputMedia = uploadedPhoto;\r\n                        SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private TLVector<TLInputDocumentBase> GetStickers(TLMessage25 message)\r\n        {\r\n            var stickers = new TLVector<TLInputDocumentBase>();\r\n            var message48 = message as TLMessage48;\r\n            if (message48 != null)\r\n            {\r\n                if (message48.Documents != null)\r\n                {\r\n                    foreach (var documentBase in message48.Documents)\r\n                    {\r\n                        var document = documentBase as TLDocument;\r\n                        if (document != null)\r\n                        {\r\n                            stickers.Add(new TLInputDocument{ Id = document.Id, AccessHash = document.AccessHash });\r\n                        }\r\n                    }\r\n\r\n                    if (stickers.Count > 0)\r\n                    {\r\n                        return stickers;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static void SendMultiMediaInternal(TLVector<TLInputSingleMedia> inputMedia, TLMessage25 message, IMTProtoService mtProtoService, IStateService stateService, ICacheService cacheService)\r\n        {\r\n            Telegram.Logs.Log.Write(\"ShellViewModel.SendMultiMediaInternal rnd_id=\" + message.RandomId);\r\n\r\n            var inputPeer = DialogDetailsViewModel.PeerToInputPeer(message.ToId);\r\n\r\n            TLPhotoSize[] photo = null;\r\n            TLDocument[] document = null;\r\n            var mediaGroup = message.Media as TLMessageMediaGroup;\r\n            if (mediaGroup != null)\r\n            {\r\n                photo = new TLPhotoSize[mediaGroup.Group.Count];\r\n                document = new TLDocument[mediaGroup.Group.Count];\r\n\r\n                for (var i = 0; i < mediaGroup.Group.Count; i++)\r\n                {\r\n                    photo[i] = GetPhotoSize(mediaGroup.Group[i]);\r\n                    document[i] = GetDocument(mediaGroup.Group[i]);\r\n                }\r\n            }\r\n\r\n            Telegram.Logs.Log.Write(\"ShellViewModel.SendMultiMediaAsync rnd_id=\" + message.RandomId);\r\n            mtProtoService.SendMultiMediaAsync(\r\n                inputPeer, inputMedia, message,\r\n                updates =>\r\n                {\r\n                    Telegram.Logs.Log.Write(\"ShellViewModel.SendMultiMediaAsync result=\" + updates);\r\n                    if (mediaGroup != null && photo != null && document != null)\r\n                    {\r\n                        for (var i = 0; i < mediaGroup.Group.Count; i++)\r\n                        {\r\n                            ProcessSentPhoto(mediaGroup.Group[i], photo[i], stateService);\r\n                            ProcessSentDocument(mediaGroup.Group[i], photo[i], document[i], stateService);\r\n                        }\r\n                    }\r\n                },\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Telegram.Logs.Log.Write(\"ShellViewModel.SendMultiMediaAsync error=\" + error);\r\n                    if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodSendMessage, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                            result =>\r\n                            {\r\n                                if (result == CustomMessageBoxResult.RightButton)\r\n                                {\r\n                                    TelegramViewBase.NavigateToUsername(mtProtoService, Constants.SpambotUsername, null, null, null);\r\n                                }\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.sendMultiMedia error \" + error);\r\n                    }\r\n                    if (message.Status == MessageStatus.Sending)\r\n                    {\r\n                        message.Status = message.Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                        if (mediaGroup != null && photo != null && document != null)\r\n                        {\r\n                            for (var i = 0; i < mediaGroup.Group.Count; i++)\r\n                            {\r\n                                mediaGroup.Group[i].Status = mediaGroup.Group[i].Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                            }\r\n                        }\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public static void SendMediaInternal(TLMessage34 message, IMTProtoService mtProtoService, IStateService stateService, ICacheService cacheService)\r\n        {\r\n            Telegram.Logs.Log.Write(\"ShellViewModel.SendMediaInternal rnd_id=\" + message.RandomId);\r\n\r\n            var inputPeer = DialogDetailsViewModel.PeerToInputPeer(message.ToId);\r\n\r\n            if (inputPeer is TLInputPeerBroadcast && !(inputPeer is TLInputPeerChannel))\r\n            {\r\n                var broadcast = IoC.Get<ICacheService>().GetBroadcast(message.ToId.Id);\r\n                var contacts = new TLVector<TLInputUserBase>();\r\n\r\n                foreach (var participantId in broadcast.ParticipantIds)\r\n                {\r\n                    var contact = IoC.Get<ICacheService>().GetUser(participantId);\r\n                    contacts.Add(contact.ToInputUser());\r\n                }\r\n\r\n                mtProtoService.SendBroadcastAsync(contacts, message.InputMedia, message,\r\n                    result =>\r\n                    {\r\n                        message.Status = MessageStatus.Confirmed;\r\n                    },\r\n                    () =>\r\n                    {\r\n                        message.Status = MessageStatus.Confirmed;\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.sendBroadcast error \" + error);\r\n                        if (message.Status == MessageStatus.Broadcast)\r\n                        {\r\n                            message.Status = message.Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                        }\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                var photoSize = GetPhotoSize(message);\r\n                var document = GetDocument(message);\r\n                Telegram.Logs.Log.Write(\"ShellViewModel.SendMediaAsync rnd_id=\" + message.RandomId);\r\n                mtProtoService.SendMediaAsync(\r\n                    inputPeer, message.InputMedia, message,\r\n                    updates =>\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"ShellViewModel.SendMediaAsync result=\" + updates);\r\n                        ProcessSentPhoto(message, photoSize, stateService);\r\n                        ProcessSentDocument(message, photoSize, document, stateService);\r\n                        ProcessSentAudio(message);\r\n                        ProcessSentGeoPoint(message);\r\n                    },\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"ShellViewModel.SendMediaAsync error=\" + error);\r\n                        if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                        {\r\n                            ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodSendMessage, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                                result =>\r\n                                {\r\n                                    if (result == CustomMessageBoxResult.RightButton)\r\n                                    {\r\n                                        TelegramViewBase.NavigateToUsername(mtProtoService, Constants.SpambotUsername, null, null, null);\r\n                                    }\r\n                                });\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.sendMedia error: \" + error);\r\n                        }\r\n                        if (message.Status == MessageStatus.Sending)\r\n                        {\r\n                            message.Status = message.Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                        }\r\n                    }));\r\n            }\r\n        }\r\n\r\n        private static void ProcessSentGeoPoint(TLMessage25 m)\r\n        {\r\n            var message70 = m as TLMessage70;\r\n            if (message70 != null)\r\n            {\r\n                var mediaGeoLive = m.Media as TLMessageMediaGeoLive;\r\n                if (mediaGeoLive != null)\r\n                {\r\n                    var liveLocationsService = IoC.Get<ILiveLocationService>();\r\n\r\n                    liveLocationsService.Add(message70);\r\n                } \r\n            }\r\n        }\r\n\r\n        private static TLDocument GetDocument(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var mediaDocument = message.Media as TLMessageMediaDocument;\r\n                if (mediaDocument != null)\r\n                {\r\n                    var document = mediaDocument.Document as TLDocument;\r\n                    if (document != null)\r\n                    {\r\n                        return document;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static void ProcessSentPhoto(TLMessageBase messageBase, TLPhotoSize oldPhotoSize, IStateService stateService)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message != null && message.InputMedia != null && message.InputMedia.MD5Hash != null)\r\n            {\r\n                var mediaPhoto = message.Media as TLMessageMediaPhoto;\r\n                if (mediaPhoto != null)\r\n                {\r\n                    var photo = mediaPhoto.Photo as TLPhoto;\r\n                    if (photo != null)\r\n                    {\r\n                        Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            if (oldPhotoSize != null)\r\n                            {\r\n                                var newPhotoSizeM = photo.Sizes.FirstOrDefault(x => TLString.Equals(x.Type, new TLString(\"m\"), StringComparison.OrdinalIgnoreCase)) as TLPhotoSize;\r\n                                var newPhotoSizeX = photo.Sizes.FirstOrDefault(x => TLString.Equals(x.Type, new TLString(\"x\"), StringComparison.OrdinalIgnoreCase)) as TLPhotoSize;\r\n\r\n                                var oldFileLocation = string.Format(\"{0}_{1}_{2}.jpg\", oldPhotoSize.Location.VolumeId, oldPhotoSize.Location.LocalId, oldPhotoSize.Location.Secret);\r\n                                var newFileLocationM = newPhotoSizeM != null ? string.Format(\"{0}_{1}_{2}.jpg\", newPhotoSizeM.Location.VolumeId, newPhotoSizeM.Location.LocalId, newPhotoSizeM.Location.Secret) : string.Empty;\r\n                                var newFileLocationX = newPhotoSizeX != null ? string.Format(\"{0}_{1}_{2}.jpg\", newPhotoSizeX.Location.VolumeId, newPhotoSizeX.Location.LocalId, newPhotoSizeX.Location.Secret) : string.Empty;\r\n                                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store.FileExists(oldFileLocation))\r\n                                    {\r\n                                        if (!string.IsNullOrEmpty(newFileLocationM) && !string.Equals(oldFileLocation, newFileLocationM, StringComparison.OrdinalIgnoreCase)) store.CopyFile(oldFileLocation, newFileLocationM, true);\r\n                                        if (!string.IsNullOrEmpty(newFileLocationX) && !string.Equals(oldFileLocation, newFileLocationX, StringComparison.OrdinalIgnoreCase)) store.CopyFile(oldFileLocation, newFileLocationX, true);\r\n                                        store.DeleteFile(oldFileLocation);\r\n                                    }\r\n                                }\r\n                            }\r\n                        });\r\n\r\n                        if (message.InputMedia.MD5Hash.Length > 0)\r\n                        {\r\n                            AddServerFileAsync(stateService, new TLServerFile\r\n                            {\r\n                                MD5Checksum = new TLLong(BitConverter.ToInt64(message.InputMedia.MD5Hash, 0)),\r\n                                Media = new TLInputMediaPhoto75 { Flags = new TLInt(0), Id = new TLInputPhoto { Id = photo.Id, AccessHash = photo.AccessHash }, Caption = TLString.Empty }\r\n                            });\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void AddServerFileAsync(IStateService stateService, TLServerFile file)\r\n        {\r\n            stateService.GetServerFilesAsync(\r\n                results =>\r\n                {\r\n                    results.Add(file);\r\n                    stateService.SaveServerFilesAsync(results);\r\n                });\r\n        }\r\n\r\n        private static void ProcessSentDocument(TLMessageBase messageBase, TLPhotoSize oldPhotoSize, TLDocument oldDocument, IStateService stateService)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message != null && message.InputMedia != null && message.InputMedia.MD5Hash != null)\r\n            {\r\n                var mediaDocument = message.Media as TLMessageMediaDocument;\r\n                if (mediaDocument != null)\r\n                {\r\n                    var newDocument = mediaDocument.Document as TLDocument;\r\n                    if (newDocument != null)\r\n                    {\r\n                        Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            if (message.IsGif())\r\n                            {\r\n                                if (oldDocument != null)\r\n                                {\r\n                                    var oldDocumentFileName = oldDocument.GetFileName();\r\n                                    var newDocumentFileName = newDocument.GetFileName();\r\n                                    if (!string.Equals(oldDocumentFileName, newDocumentFileName, StringComparison.OrdinalIgnoreCase))\r\n                                    {\r\n                                        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                        {\r\n                                            if (store.FileExists(oldDocumentFileName))\r\n                                            {\r\n                                                if (!string.IsNullOrEmpty(newDocumentFileName))\r\n                                                {\r\n                                                    store.CopyFile(oldDocumentFileName, newDocumentFileName, true);\r\n                                                }\r\n\r\n                                                Execute.BeginOnUIThread(() =>\r\n                                                {\r\n                                                    message.NotifyOfPropertyChange(() => message.Media);\r\n\r\n                                                    //Execute.BeginOnThreadPool(TimeSpan.FromSeconds(2.0), () =>\r\n                                                    //{\r\n                                                    //    using (var store2 = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                                    //    {\r\n                                                    //        store2.DeleteFile(oldDocumentFileName);\r\n                                                    //    }\r\n                                                    //});\r\n                                                });\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            if (oldPhotoSize != null)\r\n                            {\r\n                                var newPhotoSize = newDocument.Thumb as TLPhotoSize;\r\n\r\n                                var oldFileLocation = string.Format(\"{0}_{1}_{2}.jpg\", oldPhotoSize.Location.VolumeId, oldPhotoSize.Location.LocalId, oldPhotoSize.Location.Secret);\r\n                                var newFileLocation = newPhotoSize != null ? string.Format(\"{0}_{1}_{2}.jpg\", newPhotoSize.Location.VolumeId, newPhotoSize.Location.LocalId, newPhotoSize.Location.Secret) : string.Empty;\r\n                                if (!string.Equals(oldFileLocation, newFileLocation, StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                    {\r\n                                        if (store.FileExists(oldFileLocation))\r\n                                        {\r\n                                            if (!string.IsNullOrEmpty(newFileLocation)) store.CopyFile(oldFileLocation, newFileLocation, true);\r\n                                            store.DeleteFile(oldFileLocation);\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                        });\r\n\r\n                        if (message.InputMedia.MD5Hash.Length >= 8)\r\n                        {\r\n                            AddServerFileAsync(stateService, new TLServerFile\r\n                            {\r\n                                MD5Checksum = new TLLong(BitConverter.ToInt64(message.InputMedia.MD5Hash, 0)),\r\n                                Media = new TLInputMediaDocument75 { Flags = new TLInt(0), Id = new TLInputDocument { Id = newDocument.Id, AccessHash = newDocument.AccessHash }, Caption = TLString.Empty }\r\n                                //Media = m.InputMedia\r\n                            });\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void ProcessSentAudio(TLMessage message)\r\n        {\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument != null\r\n                && (TLMessageBase.IsMusic(mediaDocument.Document) || TLMessageBase.IsVoice(mediaDocument.Document)))\r\n            {\r\n\r\n                // иначе в UI остается в качестве DataContext отправляетмый TLAudio с рандомным Id, AccessHash\r\n                message.NotifyOfPropertyChange(() => message.Media);\r\n\r\n                // rename local copy of uploaded media\r\n                var sourceFileName = message.Media.IsoFileName;\r\n                if (string.IsNullOrEmpty(sourceFileName)) return;\r\n\r\n                var wavSourceFileName = Path.GetFileNameWithoutExtension(sourceFileName) + \".wav\";\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (store.FileExists(sourceFileName))\r\n                    {\r\n                        store.DeleteFile(sourceFileName);\r\n                    }\r\n\r\n                    if (store.FileExists(wavSourceFileName))\r\n                    {\r\n                        var audio = mediaDocument.Document as TLDocument;\r\n                        if (audio != null)\r\n                        {\r\n                            var destinationFileName = string.Format(\"audio{0}_{1}.mp3\", audio.Id, audio.AccessHash);//audio.GetFileName());\r\n\r\n                            if (!string.IsNullOrEmpty(destinationFileName))\r\n                            {\r\n                                var wavDestinationFileName = Path.GetFileNameWithoutExtension(destinationFileName) + \".wav\";\r\n                                store.MoveFile(wavSourceFileName, wavDestinationFileName);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                return;\r\n            }\r\n\r\n            var mediaAudio = message.Media as TLMessageMediaAudio;\r\n            if (mediaAudio != null)\r\n            {\r\n\r\n                // иначе в UI остается в качестве DataContext отправляетмый TLAudio с рандомным Id, AccessHash\r\n                message.NotifyOfPropertyChange(() => message.Media);\r\n\r\n                // rename local copy of uploaded media\r\n                var sourceFileName = message.Media.IsoFileName;\r\n                if (string.IsNullOrEmpty(sourceFileName)) return;\r\n\r\n                var wavSourceFileName = Path.GetFileNameWithoutExtension(sourceFileName) + \".wav\";\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (store.FileExists(sourceFileName))\r\n                    {\r\n                        store.DeleteFile(sourceFileName);\r\n                    }\r\n\r\n                    if (store.FileExists(wavSourceFileName))\r\n                    {\r\n                        var audio = mediaAudio.Audio as TLAudio;\r\n                        if (audio != null)\r\n                        {\r\n                            var destinationFileName = audio.GetFileName();\r\n\r\n                            if (!string.IsNullOrEmpty(destinationFileName))\r\n                            {\r\n                                var wavDestinationFileName = Path.GetFileNameWithoutExtension(destinationFileName) + \".wav\";\r\n                                store.MoveFile(wavSourceFileName, wavDestinationFileName);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                return;\r\n            }\r\n        }\r\n\r\n        private static TLPhotoSize GetPhotoSize(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var mediaPhoto = message.Media as TLMessageMediaPhoto;\r\n                if (mediaPhoto != null)\r\n                {\r\n                    var photo = mediaPhoto.Photo as TLPhoto;\r\n                    if (photo != null)\r\n                    {\r\n                        return photo.Sizes.FirstOrDefault() as TLPhotoSize;\r\n                    }\r\n                }\r\n\r\n                var mediaDocument = message.Media as TLMessageMediaDocument;\r\n                if (mediaDocument != null)\r\n                {\r\n                    var document = mediaDocument.Document as TLDocument;\r\n                    if (document != null)\r\n                    {\r\n                        return document.Thumb as TLPhotoSize;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private void HandleUploadableEncryptedItemInternal(UploadableItem item, TLObject obj)\r\n        {\r\n            var message = SecretDialogDetailsViewModel.GetDecryptedMessage(obj);\r\n            if (message == null) return;\r\n\r\n            var mediaPhoto = message.Media as TLDecryptedMessageMediaPhoto;\r\n            if (mediaPhoto != null)\r\n            {\r\n                mediaPhoto.UploadingProgress = 1.0;\r\n\r\n                var fileLocation = mediaPhoto.File as TLEncryptedFile;\r\n                if (fileLocation == null) return;\r\n\r\n                message.InputFile = item.IsSmallFile ?\r\n                    GetInputFile(item.FileId, new TLInt(item.Parts.Count), mediaPhoto.Key, mediaPhoto.IV) :\r\n                    GetInputFileBig(item.FileId, new TLInt(item.Parts.Count), mediaPhoto.Key, mediaPhoto.IV);\r\n\r\n                var chatId = message.ChatId;\r\n                if (chatId == null) return;\r\n\r\n                var chat = CacheService.GetEncryptedChat(chatId) as TLEncryptedChat;\r\n                if (chat == null)\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                    return;\r\n                }\r\n\r\n                var groupHandled = false;\r\n                var message73 = message as TLDecryptedMessage73;\r\n                if (message73 != null && message73.GroupedId != null)\r\n                {\r\n                    TLObject groupedMessage;\r\n                    if (_group.TryGetValue(message73.GroupedId.Value, out groupedMessage))\r\n                    {\r\n                        var groupedMessage73 = groupedMessage as TLDecryptedMessage73;\r\n                        if (groupedMessage73 != null)\r\n                        {\r\n                            groupHandled = true;\r\n\r\n                            var mediaGroup = groupedMessage73.Media as TLDecryptedMessageMediaGroup;\r\n                            if (mediaGroup != null && mediaGroup.Group.OfType<TLDecryptedMessage>().All(x => x.InputFile != null))\r\n                            {\r\n                                SecretDialogDetailsViewModel.SendEncryptedMultiMediaInternal(chat, groupedMessage73, MTProtoService, CacheService);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (!groupHandled)\r\n                {\r\n                    SecretDialogDetailsViewModel.SendEncryptedMediaInternal(chat, obj, MTProtoService, CacheService);\r\n                }\r\n            }\r\n\r\n            var mediaDocument = message.Media as TLDecryptedMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                mediaDocument.UploadingProgress = 1.0;\r\n\r\n                var fileLocation = mediaDocument.File as TLEncryptedFile;\r\n                if (fileLocation == null) return;\r\n\r\n                message.InputFile = item.IsSmallFile || message.IsVoice() ?\r\n                    GetInputFile(item.FileId, new TLInt(item.Parts.Count), mediaDocument.Key, mediaDocument.IV) :\r\n                    GetInputFileBig(item.FileId, new TLInt(item.Parts.Count), mediaDocument.Key, mediaDocument.IV);\r\n\r\n                var chatId = message.ChatId;\r\n                if (chatId == null) return;\r\n\r\n                var chat = CacheService.GetEncryptedChat(chatId) as TLEncryptedChat;\r\n                if (chat == null)\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                    return;\r\n                }\r\n\r\n                var groupHandled = false;\r\n                var message73 = message as TLDecryptedMessage73;\r\n                if (message73 != null && message73.GroupedId != null)\r\n                {\r\n                    TLObject groupedMessage;\r\n                    if (_group.TryGetValue(message73.GroupedId.Value, out groupedMessage))\r\n                    {\r\n                        var groupedMessage73 = groupedMessage as TLDecryptedMessage73;\r\n                        if (groupedMessage73 != null)\r\n                        {\r\n                            groupHandled = true;\r\n\r\n                            var mediaGroup = groupedMessage73.Media as TLDecryptedMessageMediaGroup;\r\n                            if (mediaGroup != null && mediaGroup.Group.OfType<TLDecryptedMessage>().All(x => x.InputFile != null))\r\n                            {\r\n                                SecretDialogDetailsViewModel.SendEncryptedMultiMediaInternal(chat, groupedMessage73, MTProtoService, CacheService);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (!groupHandled)\r\n                {\r\n                    SecretDialogDetailsViewModel.SendEncryptedMediaInternal(chat, obj, MTProtoService, CacheService);\r\n                }\r\n            }\r\n\r\n            var mediaVideo = message.Media as TLDecryptedMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                mediaVideo.UploadingProgress = 1.0;\r\n\r\n                var fileLocation = mediaVideo.File as TLEncryptedFile;\r\n                if (fileLocation == null) return;\r\n\r\n                message.InputFile = GetInputFileBig(item.FileId, new TLInt(item.Parts.Count), mediaVideo.Key, mediaVideo.IV);\r\n\r\n                var chatId = message.ChatId;\r\n                if (chatId == null) return;\r\n\r\n                var chat = CacheService.GetEncryptedChat(chatId) as TLEncryptedChat;\r\n                if (chat == null)\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                    return;\r\n                }\r\n\r\n                SecretDialogDetailsViewModel.SendEncryptedMediaInternal(chat, obj, MTProtoService, CacheService);\r\n            }\r\n\r\n            var mediaAudio = message.Media as TLDecryptedMessageMediaAudio;\r\n            if (mediaAudio != null)\r\n            {\r\n                mediaAudio.UploadingProgress = 1.0;\r\n\r\n                var fileLocation = mediaAudio.File as TLEncryptedFile;\r\n                if (fileLocation == null) return;\r\n\r\n                message.InputFile = GetInputFile(item.FileId, new TLInt(item.Parts.Count), mediaAudio.Key, mediaAudio.IV);\r\n\r\n                var chatId = message.ChatId;\r\n                if (chatId == null) return;\r\n\r\n                var chat = CacheService.GetEncryptedChat(chatId) as TLEncryptedChat;\r\n                if (chat == null)\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                    return;\r\n                }\r\n\r\n                SecretDialogDetailsViewModel.SendEncryptedMediaInternal(chat, obj, MTProtoService, CacheService);\r\n            }\r\n        }\r\n\r\n        private static TLInputEncryptedFileBase GetInputFile(TLLong fileId, TLInt partsCount, TLString key, TLString iv)\r\n        {\r\n            var keyData = key.Data;\r\n            var ivData = iv.Data;\r\n            var digest = Telegram.Api.Helpers.Utils.ComputeMD5(TLUtils.Combine(keyData, ivData));\r\n            var fingerprint = new byte[4];\r\n            var sub1 = digest.SubArray(0, 4);\r\n            var sub2 = digest.SubArray(4, 4);\r\n            for (var i = 0; i < 4; i++)\r\n            {\r\n                fingerprint[i] = (byte)(sub1[i] ^ sub2[i]);\r\n            }\r\n\r\n            var uploadedFile = new TLInputEncryptedFileUploaded\r\n            {\r\n                Id = fileId,\r\n                MD5Checksum = TLString.Empty,\r\n                KeyFingerprint = new TLInt(BitConverter.ToInt32(fingerprint, 0)),\r\n                Parts = partsCount //new TLInt(item.Parts.Count)\r\n            };\r\n\r\n            return uploadedFile;\r\n        }\r\n\r\n        private static TLInputEncryptedFileBase GetInputFileBig(TLLong fileId, TLInt partsCount, TLString key, TLString iv)\r\n        {\r\n            var keyData = key.Data;\r\n            var ivData = iv.Data;\r\n            var digest = Telegram.Api.Helpers.Utils.ComputeMD5(TLUtils.Combine(keyData, ivData));\r\n            var fingerprint = new byte[4];\r\n            var sub1 = digest.SubArray(0, 4);\r\n            var sub2 = digest.SubArray(4, 4);\r\n            for (var i = 0; i < 4; i++)\r\n            {\r\n                fingerprint[i] = (byte)(sub1[i] ^ sub2[i]);\r\n            }\r\n\r\n            var uploadedFile = new TLInputEncryptedFileBigUploaded\r\n            {\r\n                Id = fileId,\r\n                KeyFingerprint = new TLInt(BitConverter.ToInt32(fingerprint, 0)),\r\n                Parts = partsCount\r\n            };\r\n\r\n            return uploadedFile;\r\n        }\r\n\r\n        private readonly Dictionary<long, TLObject> _group = new Dictionary<long, TLObject>();\r\n\r\n        public void AddGroup(TLObject obj)\r\n        {\r\n            if (obj == null) return;\r\n\r\n            var message = obj as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var mediaGroup = message.Media as TLMessageMediaGroup;\r\n                if (mediaGroup != null)\r\n                {\r\n                    var m = mediaGroup.Group.FirstOrDefault() as TLMessage73;\r\n                    if (m != null && m.GroupedId != null)\r\n                    {\r\n                        _group[m.GroupedId.Value] = message;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var decryptedMessage = obj as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                var mediaGroup = decryptedMessage.Media as TLDecryptedMessageMediaGroup;\r\n                if (mediaGroup != null)\r\n                {\r\n                    var m = mediaGroup.Group.FirstOrDefault() as TLDecryptedMessage73;\r\n                    if (m != null && m.GroupedId != null)\r\n                    {\r\n                        _group[m.GroupedId.Value] = decryptedMessage;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Remove(TLObject obj)\r\n        {\r\n            if (obj == null) return;\r\n\r\n            var message73 = obj as TLMessage73;\r\n            if (message73 != null)\r\n            {\r\n                if (message73.GroupedId == null) return;\r\n\r\n                TLObject groupedMessage;\r\n                if (_group.TryGetValue(message73.GroupedId.Value, out groupedMessage))\r\n                {\r\n                    var groupedMessage73 = groupedMessage as TLMessage73;\r\n                    if (groupedMessage73 != null)\r\n                    {\r\n                        var mediaGroup = groupedMessage73.Media as TLMessageMediaGroup;\r\n                        if (mediaGroup != null)\r\n                        {\r\n                            mediaGroup.Group.Remove(message73);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var decryptedMessage73 = obj as TLDecryptedMessage73;\r\n            if (decryptedMessage73 != null)\r\n            {\r\n                if (decryptedMessage73.GroupedId == null) return;\r\n\r\n                TLObject groupedMessage;\r\n                if (_group.TryGetValue(decryptedMessage73.GroupedId.Value, out groupedMessage))\r\n                {\r\n                    var groupedMessage73 = groupedMessage as TLDecryptedMessage73;\r\n                    if (groupedMessage73 != null)\r\n                    {\r\n                        var mediaGroup = groupedMessage73.Media as TLDecryptedMessageMediaGroup;\r\n                        if (mediaGroup != null)\r\n                        {\r\n                            mediaGroup.Group.Remove(decryptedMessage73);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/TelegramClient.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{CE3550C4-15BA-4212-BB5F-A9AF0059D775}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>TelegramClient</RootNamespace>\r\n    <AssemblyName>TelegramClient</AssemblyName>\r\n    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>\r\n    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>\r\n    <SilverlightApplication>true</SilverlightApplication>\r\n    <SupportedCultures>de;es;pt;nl;it</SupportedCultures>\r\n    <XapOutputs>true</XapOutputs>\r\n    <GenerateSilverlightManifest>true</GenerateSilverlightManifest>\r\n    <XapFilename>Telegram_1.11.0.0_wp7.xap</XapFilename>\r\n    <SilverlightManifestTemplate>Properties\\AppManifest.xml</SilverlightManifestTemplate>\r\n    <SilverlightAppEntry>TelegramClient.App</SilverlightAppEntry>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;LOG_REGISTRATION</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;LOG_REGISTRATION</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug Private Beta|AnyCPU'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\Debug Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;PRIVATE_BETA;</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release Private Beta|AnyCPU'\">\r\n    <OutputPath>bin\\Release Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;PRIVATE_BETA;LOG_REGISTRATION;</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"BugSense, Version=0.9.8.0, Culture=neutral, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\Libraries\\BugSense.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Caliburn.Micro\">\r\n      <HintPath>..\\packages\\Caliburn.Micro.1.5.2\\lib\\wp71\\Caliburn.Micro.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Caliburn.Micro.Extensions\">\r\n      <HintPath>..\\packages\\Caliburn.Micro.1.5.2\\lib\\wp71\\Caliburn.Micro.Extensions.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Coding4Fun.Toolkit.Controls\">\r\n      <HintPath>..\\packages\\Coding4Fun.Toolkit.Controls.2.0.7\\lib\\wp71\\Coding4Fun.Toolkit.Controls.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Google.WebAnalytics, Version=1.4.11.0, Culture=neutral, processorArchitecture=MSIL\">\r\n      <HintPath>..\\Libraries\\Google.WebAnalytics.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ICSharpCode.SharpZLib.Phone\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ICSharpCode.SharpZLib.Phone.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Id3\">\r\n      <HintPath>..\\packages\\ID3.0.3.0\\lib\\sl4-wp71\\Id3.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.Controls\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.Controls.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.Filtering\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.Filtering.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.IO.Bmp\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.IO.Bmp.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.IO.Gif\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.IO.Gif.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.IO.Png\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.IO.Png.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.Utils\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.Utils.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"LayoutTransformer\">\r\n      <HintPath>..\\Libraries\\LayoutTransformer.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Expression.Interactions, Version=3.8.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"Microsoft.Phone\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls.Maps, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls.Toolkit, Version=7.0.1.0, Culture=neutral, PublicKeyToken=b772ad94eb9ca604, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\WPtoolkit.4.2013.08.16\\lib\\sl4-windowsphone71\\Microsoft.Phone.Controls.Toolkit.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Phone.Interop\" />\r\n    <Reference Include=\"Microsoft.SilverlightMediaFramework.Compatibility.Phone, Version=2.2011.1101.0, Culture=neutral, processorArchitecture=MSIL\">\r\n      <HintPath>..\\Libraries\\Microsoft.SilverlightMediaFramework.Compatibility.Phone.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.WebAnalytics, Version=1.4.8.0, Culture=neutral, processorArchitecture=MSIL\">\r\n      <HintPath>..\\Libraries\\Microsoft.WebAnalytics.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.WebAnalytics.Behaviors, Version=1.4.8.0, Culture=neutral, processorArchitecture=MSIL\">\r\n      <HintPath>..\\Libraries\\Microsoft.WebAnalytics.Behaviors.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Xna.Framework\" />\r\n    <Reference Include=\"PhoneCodeContractsAssemblies\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\PhoneCodeContractsAssemblies.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Device\" />\r\n    <Reference Include=\"System.Net\" />\r\n    <Reference Include=\"System.Observable\" />\r\n    <Reference Include=\"System.Reactive.Core\">\r\n      <HintPath>..\\packages\\Rx-Core.2.2.2\\lib\\windowsphone71\\System.Reactive.Core.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Interfaces\">\r\n      <HintPath>..\\packages\\Rx-Interfaces.2.2.2\\lib\\windowsphone71\\System.Reactive.Interfaces.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Linq\">\r\n      <HintPath>..\\packages\\Rx-Linq.2.2.2\\lib\\windowsphone71\\System.Reactive.Linq.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.PlatformServices\">\r\n      <HintPath>..\\packages\\Rx-PlatformServices.2.2.2\\lib\\windowsphone71\\System.Reactive.PlatformServices.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Windows.Threading\">\r\n      <HintPath>..\\packages\\Rx-XAML.2.2.2\\lib\\windowsphone71\\System.Reactive.Windows.Threading.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Runtime.Serialization\" />\r\n    <Reference Include=\"System.Servicemodel.Web\" />\r\n    <Reference Include=\"System.Windows\" />\r\n    <Reference Include=\"system\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Windows.Interactivity, Version=3.8.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <HintPath>..\\packages\\Caliburn.Micro.1.5.2\\lib\\wp71\\System.Windows.Interactivity.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"Analytics\\AnalyticsProperties.cs\" />\r\n    <Compile Include=\"Analytics\\AnalyticsService.cs\" />\r\n    <Compile Include=\"Analytics\\AnalyticsTracker.cs\" />\r\n    <Compile Include=\"Analytics\\ReviewRequester.cs\" />\r\n    <Compile Include=\"Animation\\LinqToVisualTree.cs\" />\r\n    <Compile Include=\"Animation\\MetroInMotion.cs\" />\r\n    <Compile Include=\"Animation\\Navigation\\AnimatedBasePage.cs\" />\r\n    <Compile Include=\"Animation\\Navigation\\AnimatorHelperBase.cs\" />\r\n    <Compile Include=\"Animation\\Navigation\\ContinuumAnimator.cs\" />\r\n    <Compile Include=\"Animation\\Navigation\\SlideAnimator.cs\" />\r\n    <Compile Include=\"Animation\\Navigation\\Storyboards.cs\" />\r\n    <Compile Include=\"Animation\\Navigation\\SwivelAnimator.cs\" />\r\n    <Compile Include=\"Animation\\Navigation\\TurnstileAnimator.cs\" />\r\n    <Compile Include=\"Animation\\Navigation\\TurnstileFeatherAnimator.cs\" />\r\n    <Compile Include=\"App.xaml.cs\">\r\n      <DependentUpon>App.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Behaviors\\MarkTapAsHandledBehavior.cs\" />\r\n    <Compile Include=\"Behaviors\\PanAndZoomBehavior.cs\" />\r\n    <Compile Include=\"Behaviors\\ProgressBarSmoother.cs\" />\r\n    <Compile Include=\"Behaviors\\SelectionBehavior.cs\" />\r\n    <Compile Include=\"Behaviors\\ThemeToStateBehavior.cs\" />\r\n    <Compile Include=\"Behaviors\\ToggleSwitchLocalizedContentBehavior.cs\" />\r\n    <Compile Include=\"Behaviors\\UpdateTextBindingBehavior.cs\" />\r\n    <Compile Include=\"Bootstrapper.cs\" />\r\n    <Compile Include=\"CapabilityPlaceholder.cs\" />\r\n    <Compile Include=\"Commands.cs\" />\r\n    <Compile Include=\"Constants.cs\" />\r\n    <Compile Include=\"Controls\\BrowserNavigationService.cs\" />\r\n    <Compile Include=\"Controls\\TelegramNavigationInTransition.cs\" />\r\n    <Compile Include=\"Controls\\TelegramNavigationOutTransition.cs\" />\r\n    <Compile Include=\"Controls\\TelegramNavigationTransition.cs\" />\r\n    <Compile Include=\"Controls\\TelegramRichTextBox.cs\" />\r\n    <Compile Include=\"Controls\\TelegramTransitionFrame.cs\" />\r\n    <Compile Include=\"Controls\\TelegramTransitionService.cs\" />\r\n    <Compile Include=\"Controls\\TelegramTurnstileTransition.cs\" />\r\n    <Compile Include=\"Controls\\TestScrollableTextBlock.cs\" />\r\n    <Compile Include=\"Controls\\TransitionFrame.cs\" />\r\n    <Compile Include=\"Converters\\BackgroundImageConverter.cs\" />\r\n    <Compile Include=\"Converters\\BooleanToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\ChatForbiddenToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\ChatToMaxHeight.cs\" />\r\n    <Compile Include=\"Converters\\ChatToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\CountToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\DebugVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\DefaultPhotoConverter.cs\" />\r\n    <Compile Include=\"Converters\\DialogCaptionConverter.cs\" />\r\n    <Compile Include=\"Converters\\DialogDetailsBackgroundConverter.cs\" />\r\n    <Compile Include=\"Converters\\DialogMessageFromConverter.cs\" />\r\n    <Compile Include=\"Converters\\DistanceAwayConverter.cs\" />\r\n    <Compile Include=\"Converters\\EmptyDialogMessageConverter.cs\" />\r\n    <Compile Include=\"Converters\\EmptyPhotoToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\ExistsToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\FileExtToColorConverter.cs\" />\r\n    <Compile Include=\"Converters\\FileNameConverter.cs\" />\r\n    <Compile Include=\"Converters\\FileSizeConverter.cs\" />\r\n    <Compile Include=\"Converters\\ForwardedMessageConverter.cs\" />\r\n    <Compile Include=\"Converters\\GeoLocationToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\GroupToBackgroundBrushValueConverter.cs\" />\r\n    <Compile Include=\"Converters\\GroupToForegroundBrushValueConverter.cs\" />\r\n    <Compile Include=\"Converters\\IdToPlaceholderBackgroundConverter.cs\" />\r\n    <Compile Include=\"Converters\\IntToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\InvertBooleanConverter.cs\" />\r\n    <Compile Include=\"Converters\\BooleanToValueConverter.cs\" />\r\n    <Compile Include=\"Converters\\GeoPointToStaticGoogleMapsConverter.cs\" />\r\n    <Compile Include=\"Converters\\IsSelectedToBackgroundConverter.cs\" />\r\n    <Compile Include=\"Converters\\LowercaseConverter.cs\" />\r\n    <Compile Include=\"Converters\\MaskConverter.cs\" />\r\n    <Compile Include=\"Converters\\MediaContactToPhotoConverter.cs\" />\r\n    <Compile Include=\"Converters\\MediaEmptyToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\MediaSizeConverter.cs\" />\r\n    <Compile Include=\"Converters\\MessageToFontFamilyConverter.cs\" />\r\n    <Compile Include=\"Converters\\MergeBrushesConverter.cs\" />\r\n    <Compile Include=\"Converters\\MessageStateToForegroundConverter.cs\" />\r\n    <Compile Include=\"Converters\\MessageStatusConverter.cs\" />\r\n    <Compile Include=\"Converters\\MessageToBriefInfoConverter.cs\" />\r\n    <Compile Include=\"Converters\\MuteUntilToStringConverter.cs\" />\r\n    <Compile Include=\"Converters\\NotifySettingsToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\NotServiceMessageToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\OverlayAccentBrushConverter.cs\" />\r\n    <Compile Include=\"Converters\\PhoneNumberConverter.cs\" />\r\n    <Compile Include=\"Converters\\PhotoBytesToImageConverter.cs\" />\r\n    <Compile Include=\"Converters\\PhotoToDimensionConverter.cs\" />\r\n    <Compile Include=\"Converters\\PhotoToThumbConverter.cs\" />\r\n    <Compile Include=\"Converters\\PlaceholderDefaultImageConverter.cs\" />\r\n    <Compile Include=\"Converters\\PrivateBetaToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\ProgressToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\ReplyMarkupButtonVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\SecretChatsAvailabilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\SecretChatsForegroundConverter.cs\" />\r\n    <Compile Include=\"Converters\\ServiceMessageToTextConverter.cs\" />\r\n    <Compile Include=\"Converters\\StatusToImageConverter.cs\" />\r\n    <Compile Include=\"Converters\\StickerSetToCountStringConverter.cs\" />\r\n    <Compile Include=\"Converters\\StringEqualsToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\StringFormatConverter.cs\" />\r\n    <Compile Include=\"Converters\\EmptyStringToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\TestBindingConverter.cs\" />\r\n    <Compile Include=\"Converters\\TextMessageToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\TextSizeToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\TLIntToDateTimeConverter.cs\" />\r\n    <Compile Include=\"Converters\\UnreadCountToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\UnreadMessageConverter.cs\" />\r\n    <Compile Include=\"Converters\\UnregisteredUserIdToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\UppercaseConverter.cs\" />\r\n    <Compile Include=\"Converters\\UserStatusToBrushConverter.cs\" />\r\n    <Compile Include=\"Converters\\UserStatusToStringConverter.cs\" />\r\n    <Compile Include=\"Converters\\UserStatusToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Converters\\UserToActionStringConverter.cs\" />\r\n    <Compile Include=\"Converters\\WP8VisibilityConverter.cs\" />\r\n    <Compile Include=\"EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml.cs\" />\r\n    <Compile Include=\"EmojiPanel\\Controls\\Emoji\\EmojiData.cs\" />\r\n    <Compile Include=\"EmojiPanel\\Controls\\Emoji\\EmojiSpriteItem.cs\" />\r\n    <Compile Include=\"EmojiPanel\\Controls\\Emoji\\StickerSpriteItem.cs\" />\r\n    <Compile Include=\"EmojiPanel\\Controls\\Utilities\\DelayedExecutor.cs\" />\r\n    <Compile Include=\"EmojiPanel\\Controls\\Utilities\\Helpers.cs\" />\r\n    <Compile Include=\"EmojiPanel\\Controls\\Utilities\\MyListItemBase.cs\" />\r\n    <Compile Include=\"EmojiPanel\\Controls\\Utilities\\MyVirtualizingPanel.cs\" />\r\n    <Compile Include=\"EmojiPanel\\Controls\\Utilities\\VirtSegment.cs\" />\r\n    <Compile Include=\"EmojiPanel\\Controls\\Utilities\\VListItemBase.cs\" />\r\n    <Compile Include=\"EventArgs\\UpdateChatTitleEventArgs.cs\" />\r\n    <Compile Include=\"Converters\\ExtendedImageConverter.cs\" />\r\n    <Compile Include=\"Extensions\\ApplicationExtensions.cs\" />\r\n    <Compile Include=\"Extensions\\CollectionExtensions.cs\" />\r\n    <Compile Include=\"Helpers\\Clip.cs\" />\r\n    <Compile Include=\"Helpers\\CollectionHelper.cs\" />\r\n    <Compile Include=\"Helpers\\ImageUtils.cs\" />\r\n    <Compile Include=\"Helpers\\ItemsControlHelper.cs\" />\r\n    <Compile Include=\"Helpers\\Property.cs\" />\r\n    <Compile Include=\"Helpers\\TemplateSelectors\\DocumentTemplateSelector.cs\" />\r\n    <Compile Include=\"Helpers\\TemplateSelectors\\EmptyDialogToDescriptionConverter.cs\" />\r\n    <Compile Include=\"Helpers\\TemplateSelectors\\ItemsPanelTemplateSelector.cs\" />\r\n    <Compile Include=\"Helpers\\TemplateSelectors\\LocationTemplateSelector.cs\" />\r\n    <Compile Include=\"Helpers\\TemplateSelectors\\MediaTemplateSelector.cs\" />\r\n    <Compile Include=\"Helpers\\TemplateSelectors\\MessageTemplateSelector.cs\" />\r\n    <Compile Include=\"Helpers\\TemplateSelectors\\SearchContactsTemplateSelector.cs\" />\r\n    <Compile Include=\"Models\\AlphaKeyGroup.cs\" />\r\n    <Compile Include=\"Models\\ContactsByLastName.cs\" />\r\n    <Compile Include=\"Models\\Country.cs\" />\r\n    <Compile Include=\"Models\\InAppNotifications.cs\" />\r\n    <Compile Include=\"Models\\Settings.cs\" />\r\n    <Compile Include=\"Models\\UsersByFirstName.cs\" />\r\n    <Compile Include=\"Models\\UsersByLastName.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"Resources\\AppResources.Designer.cs\">\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n      <DependentUpon>AppResources.resx</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\AppResources.de.Designer.cs\">\r\n      <DependentUpon>AppResources.de.resx</DependentUpon>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\AppResources.es.Designer.cs\">\r\n      <DependentUpon>AppResources.es.resx</DependentUpon>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\AppResources.pt.Designer.cs\">\r\n      <DependentUpon>AppResources.pt.resx</DependentUpon>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\AppResources.nl.Designer.cs\">\r\n      <DependentUpon>AppResources.nl.resx</DependentUpon>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\AppResources.it.Designer.cs\">\r\n      <DependentUpon>AppResources.it.resx</DependentUpon>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n    </Compile>\r\n    <Compile Include=\"Resources\\LocalizationConverter.cs\" />\r\n    <Compile Include=\"Resources\\LocalizedStrings.cs\" />\r\n    <Compile Include=\"Services\\CommonErrorHandler.cs\" />\r\n    <Compile Include=\"Services\\ICommonErrorHandler.cs\" />\r\n    <Compile Include=\"Services\\IPushService.cs\" />\r\n    <Compile Include=\"Services\\IStateService.cs\" />\r\n    <Compile Include=\"Services\\PhoneInfoService.cs\" />\r\n    <Compile Include=\"Services\\PushService.cs\" />\r\n    <Compile Include=\"Services\\PushServiceBase.cs\" />\r\n    <Compile Include=\"Services\\StateService.cs\" />\r\n    <Compile Include=\"Utils\\Color.cs\" />\r\n    <Compile Include=\"Utils\\Language.cs\" />\r\n    <Compile Include=\"Utils\\TelegramUriMapper.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\AboutViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\AccountSelfDestructsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\AllowUsersViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\AskQuestionConfirmationViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\BlockedContactsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\CacheViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChangePasswordEmailViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChangePasscodeViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChangePasswordHintViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChangePasswordViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChangePhoneNumberViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChooseAttachmentViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChooseBackgroundViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChooseCountryViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\AddChatParticipantConfirmationViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChooseNotificationSpanViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChooseTTLViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\EditCurrentUserViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\EditUsernameViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\EncryptionKeyViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\EnterPasscodeViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\EnterPasswordViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\LastSeenViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\EditPhoneNumberViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\LockscreenViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\NotificationsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\PasscodeViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\PasswordRecoveryViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\PasswordViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\PrivacySecureViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\PrivacyStatementViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\SelectMultipleUsersViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\SessionsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\SettingsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ShareViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\SnapshotsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\SpecialThanksViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\StartupViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\StickersViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Auth\\ConfirmPasswordViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Auth\\ConfirmViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Auth\\SignUpViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Chats\\AddChannelManagerViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Chats\\AddChatParticipantViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Chats\\AddSecretChatParticipantViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Chats\\Chat2ViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Chats\\ChatDetailsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Chats\\ChatViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Chats\\EditChatViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Chats\\InviteLinkViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Contacts\\ContactDetailsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Contacts\\ContactInfoViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Contacts\\ContactsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Contacts\\ContactViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Contacts\\EditContactViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Contacts\\SecretContactDetailsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Contacts\\SecretContactViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Contacts\\ShareContactViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Debug\\LogViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Debug\\LongPollViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Debug\\DebugViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Debug\\PerformanceViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\ChooseDialogViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\ChooseParticipantsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\CommandHintsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\CreateBroadcastViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\CreateChannelViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\CreateDialogViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsMode.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Channel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Document.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.GeoPoint.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Handle.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Media.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Photo.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Reply.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Search.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogsViewModel.Common.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Auth\\SignInViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\HashtagHintsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\MessageViewerViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogSearchMessagesViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\SecretChatDebugViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\SecretDialogDetailsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Document.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\SecretDialogDetailsViewModel.GeoPoint.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Media.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Text.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Video.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Handle.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\UserActionViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\UsernameHintsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\ItemDetailsViewModelBase.cs\" />\r\n    <Compile Include=\"ViewModels\\ItemsViewModelBase.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\AnimatedImageViewerViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\LinksViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\DecryptedImageViewerViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\FilesViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\FullMediaViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\ImageEditorViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\ImageViewerViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\MapViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\MediaViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\PivotImageViewerViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\ProfilePhotoViewerViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\SecretMediaViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\VideoCaptureViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\VideoPlayerViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Search\\ISearch.cs\" />\r\n    <Compile Include=\"ViewModels\\Search\\SearchContactsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Search\\SearchDialogsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Search\\SearchFilesViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Search\\SearchItemsViewModelBase.cs\" />\r\n    <Compile Include=\"ViewModels\\Search\\SearchLinksViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Search\\SearchMessagesViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Search\\SearchShellViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Search\\SearchVenuesViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\ShellViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\ViewModelBase.cs\" />\r\n    <Compile Include=\"Views\\Additional\\AboutView.xaml.cs\">\r\n      <DependentUpon>AboutView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\AccountSelfDestructsView.xaml.cs\">\r\n      <DependentUpon>AccountSelfDestructsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\AllowUsersView.xaml.cs\">\r\n      <DependentUpon>AllowUsersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\AskQuestionConfirmationView.xaml.cs\">\r\n      <DependentUpon>AskQuestionConfirmationView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\BlockedContactsView.xaml.cs\">\r\n      <DependentUpon>BlockedContactsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\BubbleBackgroundControl.xaml.cs\">\r\n      <DependentUpon>BubbleBackgroundControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\CacheView.xaml.cs\">\r\n      <DependentUpon>CacheView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChangePasswordEmailView.xaml.cs\">\r\n      <DependentUpon>ChangePasswordEmailView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChangePasswordHintView.xaml.cs\">\r\n      <DependentUpon>ChangePasswordHintView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChangePasswordView.xaml.cs\">\r\n      <DependentUpon>ChangePasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChangePhoneNumberView.xaml.cs\">\r\n      <DependentUpon>ChangePhoneNumberView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChooseAttachmentView.xaml.cs\">\r\n      <DependentUpon>ChooseAttachmentView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChooseBackgroundView.xaml.cs\">\r\n      <DependentUpon>ChooseBackgroundView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChooseCountryView.xaml.cs\">\r\n      <DependentUpon>ChooseCountryView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\AddChatParticipantConfirmationView.xaml.cs\">\r\n      <DependentUpon>AddChatParticipantConfirmationView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChooseNotificationSpanView.xaml.cs\">\r\n      <DependentUpon>ChooseNotificationSpanView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChooseTTLView.xaml.cs\">\r\n      <DependentUpon>ChooseTTLView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChangePasscodeView.xaml.cs\">\r\n      <DependentUpon>ChangePasscodeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\EnterPasswordView.xaml.cs\">\r\n      <DependentUpon>EnterPasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\EditCurrentUserView.xaml.cs\">\r\n      <DependentUpon>EditCurrentUserView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\EditUsernameView.xaml.cs\">\r\n      <DependentUpon>EditUsernameView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\EncryptionKeyView.xaml.cs\">\r\n      <DependentUpon>EncryptionKeyView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\EnterPasscodeView.xaml.cs\">\r\n      <DependentUpon>EnterPasscodeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\FallingSnowControl.xaml.cs\">\r\n      <DependentUpon>FallingSnowControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\LastSeenView.xaml.cs\">\r\n      <DependentUpon>LastSeenView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\EditPhoneNumberView.xaml.cs\">\r\n      <DependentUpon>EditPhoneNumberView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\LockscreenView.xaml.cs\">\r\n      <DependentUpon>LockscreenView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\NotificationsView.xaml.cs\">\r\n      <DependentUpon>NotificationsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\NumericKeyboard.xaml.cs\">\r\n      <DependentUpon>NumericKeyboard.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\PasscodeView.xaml.cs\">\r\n      <DependentUpon>PasscodeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\PasswordRecoveryView.xaml.cs\">\r\n      <DependentUpon>PasswordRecoveryView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\PasswordView.xaml.cs\">\r\n      <DependentUpon>PasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\PrivacySecurityView.xaml.cs\">\r\n      <DependentUpon>PrivacySecurityView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\PrivacyStatementView.xaml.cs\">\r\n      <DependentUpon>PrivacyStatementView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\SelectMultipleUsersView.xaml.cs\">\r\n      <DependentUpon>SelectMultipleUsersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\SessionsView.xaml.cs\">\r\n      <DependentUpon>SessionsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ShareView.xaml.cs\">\r\n      <DependentUpon>ShareView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\SnapshotsView.xaml.cs\">\r\n      <DependentUpon>SnapshotsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\SpecialThanksView.xaml.cs\">\r\n      <DependentUpon>SpecialThanksView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\StartupView.xaml.cs\">\r\n      <DependentUpon>StartupView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\StickersView.xaml.cs\">\r\n      <DependentUpon>StickersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\TelegramPasswordBox.xaml.cs\">\r\n      <DependentUpon>TelegramPasswordBox.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Auth\\ConfirmPasswordView.xaml.cs\">\r\n      <DependentUpon>ConfirmPasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Auth\\ConfirmView.xaml.cs\">\r\n      <DependentUpon>ConfirmView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Auth\\SignUpView.xaml.cs\">\r\n      <DependentUpon>SignUpView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Chats\\AddChannelManagerView.xaml.cs\">\r\n      <DependentUpon>AddChannelManagerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Chats\\AddChatParticipantView.xaml.cs\">\r\n      <DependentUpon>AddChatParticipantView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Chats\\AddSecretChatParticipantView.xaml.cs\">\r\n      <DependentUpon>AddSecretChatParticipantView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Chats\\Chat2View.xaml.cs\">\r\n      <DependentUpon>Chat2View.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Chats\\ChatDetailsView.xaml.cs\">\r\n      <DependentUpon>ChatDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Chats\\ChatView.xaml.cs\">\r\n      <DependentUpon>ChatView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Chats\\EditChatView.xaml.cs\">\r\n      <DependentUpon>EditChatView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Chats\\InviteLinkView.xaml.cs\">\r\n      <DependentUpon>InviteLinkView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Contacts\\ContactDetailsView.xaml.cs\">\r\n      <DependentUpon>ContactDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Contacts\\ContactInfoView.xaml.cs\">\r\n      <DependentUpon>ContactInfoView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Contacts\\ContactView.xaml.cs\">\r\n      <DependentUpon>ContactView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Contacts\\EditContactView.xaml.cs\">\r\n      <DependentUpon>EditContactView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Contacts\\SecretContactDetailsView.xaml.cs\">\r\n      <DependentUpon>SecretContactDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Contacts\\SecretContactView.xaml.cs\">\r\n      <DependentUpon>SecretContactView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Contacts\\ShareContactView.xaml.cs\">\r\n      <DependentUpon>ShareContactView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\MainTitleControl.xaml.cs\">\r\n      <DependentUpon>MainTitleControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\ConversationTileControl.xaml.cs\">\r\n      <DependentUpon>ConversationTileControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\MessagePlayerControl.xaml.cs\">\r\n      <DependentUpon>MessagePlayerControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\MessageStatusControl.xaml.cs\">\r\n      <DependentUpon>MessageStatusControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\PieSlice.cs\" />\r\n    <Compile Include=\"Views\\Controls\\SecretPhotoPlaceholder.xaml.cs\">\r\n      <DependentUpon>SecretPhotoPlaceholder.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Debug\\DebugView.xaml.cs\">\r\n      <DependentUpon>DebugView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Debug\\LongPollView.xaml.cs\">\r\n      <DependentUpon>LongPollView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Debug\\PerformanceView.xaml.cs\">\r\n      <DependentUpon>PerformanceView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\ChooseDialogView.xaml.cs\">\r\n      <DependentUpon>ChooseDialogView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\ChooseParticipantsView.xaml.cs\">\r\n      <DependentUpon>ChooseParticipantsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\CommandHintsView.xaml.cs\">\r\n      <DependentUpon>CommandHintsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\CommandsControl.xaml.cs\">\r\n      <DependentUpon>CommandsControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\CreateBroadcastView.xaml.cs\">\r\n      <DependentUpon>CreateBroadcastView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\CreateChannelView.xaml.cs\">\r\n      <DependentUpon>CreateChannelView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\CreateDialogView.xaml.cs\">\r\n      <DependentUpon>CreateDialogView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\DialogDetailsView.xaml.cs\">\r\n      <DependentUpon>DialogDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\DialogsView.xaml.cs\">\r\n      <DependentUpon>DialogsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Contacts\\ContactsView.xaml.cs\">\r\n      <DependentUpon>ContactsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Auth\\SignInView.xaml.cs\">\r\n      <DependentUpon>SignInView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\SettingsView.xaml.cs\">\r\n      <DependentUpon>SettingsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\EmojiKeyboardControl.xaml.cs\">\r\n      <DependentUpon>EmojiKeyboardControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\HashtagHintsView.xaml.cs\">\r\n      <DependentUpon>HashtagHintsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\MessageViewerView.xaml.cs\">\r\n      <DependentUpon>MessageViewerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\DialogSearchMessagesView.xaml.cs\">\r\n      <DependentUpon>DialogSearchMessagesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\SecretChatDebugView.xaml.cs\">\r\n      <DependentUpon>SecretChatDebugView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\SecretDialogDetailsView.xaml.cs\">\r\n      <DependentUpon>SecretDialogDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\UserActionView.xaml.cs\">\r\n      <DependentUpon>UserActionView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\UsernameHintsView.xaml.cs\">\r\n      <DependentUpon>UsernameHintsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\AnimatedImageViewerView.xaml.cs\">\r\n      <DependentUpon>AnimatedImageViewerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\LinksView.xaml.cs\">\r\n      <DependentUpon>LinksView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\DecryptedImageViewerView.xaml.cs\">\r\n      <DependentUpon>DecryptedImageViewerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\FilesView.xaml.cs\">\r\n      <DependentUpon>FilesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\FullMediaView.xaml.cs\">\r\n      <DependentUpon>FullMediaView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\ImageEditorView.xaml.cs\">\r\n      <DependentUpon>ImageEditorView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\ImageViewerView.xaml.cs\">\r\n      <DependentUpon>ImageViewerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\MapTileSources\\GoogleMapsTileSource.cs\" />\r\n    <Compile Include=\"Views\\Media\\MapTileSources\\OpenAeralMapTileSource.cs\" />\r\n    <Compile Include=\"Views\\Media\\MapTileSources\\OpenStreetMapTileSource.cs\" />\r\n    <Compile Include=\"Views\\Media\\MapView.xaml.cs\">\r\n      <DependentUpon>MapView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\MediaView.xaml.cs\">\r\n      <DependentUpon>MediaView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\ProfilePhotoViewerView.xaml.cs\">\r\n      <DependentUpon>ProfilePhotoViewerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\SecretMediaView.xaml.cs\">\r\n      <DependentUpon>SecretMediaView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\VideoCaptureView.xaml.cs\">\r\n      <DependentUpon>VideoCaptureView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\VideoPlayerView.xaml.cs\">\r\n      <DependentUpon>VideoPlayerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Search\\SearchContactsView.xaml.cs\">\r\n      <DependentUpon>SearchContactsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Search\\SearchDialogsView.xaml.cs\">\r\n      <DependentUpon>SearchDialogsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Search\\SearchFilesView.xaml.cs\">\r\n      <DependentUpon>SearchFilesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Search\\SearchLinksView.xaml.cs\">\r\n      <DependentUpon>SearchLinksView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Search\\SearchMessagesView.xaml.cs\">\r\n      <DependentUpon>SearchMessagesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Search\\SearchShellView.xaml.cs\">\r\n      <DependentUpon>SearchShellView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Search\\SearchVenuesView.xaml.cs\">\r\n      <DependentUpon>SearchVenuesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\ShellView.xaml.cs\">\r\n      <DependentUpon>ShellView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\TelegramViewBase.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ApplicationDefinition Include=\"App.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </ApplicationDefinition>\r\n    <Page Include=\"EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\Button.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\CheckBox.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\ToggleSwitch.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\ListBox.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\LongListSelector.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\ScrollViewer.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\Slider.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\Templates\\DataTemplates.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\Templates\\ItemsPanel.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\Templates\\Media.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\TextBlock.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\TextBox.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\Theme.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\ToggleButton.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\Transitions.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <ApplicationDefinition Include=\"Themes\\Generic.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </ApplicationDefinition>\r\n    <Page Include=\"Views\\Additional\\AboutView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\AccountSelfDestructsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\AllowUsersView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\AskQuestionConfirmationView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\BlockedContactsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\BubbleBackgroundControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\CacheView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ChangePasswordEmailView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ChangePasswordHintView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ChangePasswordView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ChangePhoneNumberView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ChooseAttachmentView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <ApplicationDefinition Include=\"Views\\Additional\\ChooseBackgroundView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </ApplicationDefinition>\r\n    <Page Include=\"Views\\Additional\\ChooseCountryView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\AddChatParticipantConfirmationView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ChooseNotificationSpanView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ChooseTTLView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ChangePasscodeView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\EnterPasswordView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\EditCurrentUserView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\EditUsernameView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\EncryptionKeyView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\EnterPasscodeView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\FallingSnowControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\LastSeenView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\EditPhoneNumberView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\LockscreenView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\NotificationsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\NumericKeyboard.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\PasscodeView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\PasswordRecoveryView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\PasswordView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\PrivacySecurityView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\PrivacyStatementView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\SelectMultipleUsersView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\SessionsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ShareView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\SnapshotsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\SpecialThanksView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\StartupView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\StickersView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\TelegramPasswordBox.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Auth\\ConfirmPasswordView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Auth\\ConfirmView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Auth\\SignUpView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Chats\\AddChannelManagerView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Chats\\AddChatParticipantView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Chats\\AddSecretChatParticipantView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Chats\\Chat2View.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Chats\\ChatDetailsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Chats\\ChatView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Chats\\EditChatView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Chats\\InviteLinkView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Contacts\\ContactDetailsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Contacts\\ContactInfoView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Contacts\\ContactView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Contacts\\EditContactView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Contacts\\SecretContactDetailsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Contacts\\SecretContactView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Contacts\\ShareContactView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\MainTitleControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\ConversationTileControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\MessagePlayerControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\MessageStatusControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\SecretPhotoPlaceholder.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Debug\\DebugView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Debug\\LongPollView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Debug\\PerformanceView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\ChooseDialogView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\ChooseParticipantsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\CommandHintsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\CommandsControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\CreateBroadcastView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\CreateChannelView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\CreateDialogView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\DialogDetailsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\DialogsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Contacts\\ContactsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Auth\\SignInView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\SettingsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\EmojiKeyboardControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\HashtagHintsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\MessageViewerView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\DialogSearchMessagesView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\SecretChatDebugView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\SecretDialogDetailsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\UserActionView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\UsernameHintsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\AnimatedImageViewerView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\LinksView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\DecryptedImageViewerView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\FilesView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\FullMediaView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\ImageEditorView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\ImageViewerView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\MapView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\MediaView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\ProfilePhotoViewerView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\SecretMediaView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\VideoCaptureView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\VideoPlayerView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Search\\SearchContactsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Search\\SearchDialogsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Search\\SearchFilesView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Search\\SearchLinksView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Search\\SearchMessagesView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Search\\SearchShellView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Search\\SearchVenuesView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\ShellView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"packages.config\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n    <None Include=\"Properties\\AppManifest.xml\" />\r\n    <None Include=\"Properties\\WMAppManifest.xml\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Actions.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Video.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Photo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"ApplicationIcon99.png\" />\r\n    <Content Include=\"Assets\\emoji.abc-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.backspace-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.1-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.2-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.3-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.4-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.category.5-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.recent-WXGA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\002320E3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003020E3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003120E3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003220E3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003320E3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003420E3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003520E3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003620E3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003720E3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003820E3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\003920E3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\00a9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\00ae.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\203C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2049.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2122.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2139.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2194.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2195.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2196.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2197.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2198.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2199.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\21A9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\21AA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\231A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\231B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23e9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23ea.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23eb.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23ec.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23f0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\23f3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\24C2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25AA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25AB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25B6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25C0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25FB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25FC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25FD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\25FE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2600.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2601.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2602.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2603.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2604.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\260E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2611.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2614.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2615.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2618.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\261D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\261DD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\261DD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\261DD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\261DD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\261DD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2620.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\263A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2648.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2649.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\264F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2650.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2651.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2652.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2653.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2660.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2663.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2665.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2666.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2668.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\267B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\267F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2692.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2693.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2694.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2696.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2697.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2699.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26A0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26A1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26AA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26AB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26B0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26B1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26BD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26BE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26C4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26C5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26C8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26ce.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26CF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26D1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26D3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26D4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26E9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26EA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F9D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F9D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F9D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F9D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26F9D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26FA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\26FD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2702.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2705.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2708.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2709.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270a.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270AD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270AD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270AD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270AD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270AD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270b.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270BD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270BD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270BD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270BD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270BD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270CD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270CD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270CD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270CD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270CD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270DD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270DD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270DD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270DD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270DD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\270F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2712.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2714.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2716.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2728.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2733.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2734.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2744.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2747.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\274c.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\274e.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2753.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2754.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2755.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2757.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2764.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2795.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2796.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2797.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\27A1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\27b0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\27bf.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2934.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2935.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B05.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B06.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B07.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B1B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B1C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B50.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\2B55.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\3030.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\303D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\3297.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\3299.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDC04.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDCCF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD70.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD71.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD7E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD7F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD8E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD91.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD92.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD93.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD94.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD95.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD96.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD97.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD98.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD99.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDD9A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDE8D83CDDF3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDE9D83CDDEA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDEAD83CDDF8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDEBD83CDDF7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDECD83CDDE7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDEED83CDDF9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDEFD83CDDF5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDF0D83CDDF7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDF7D83CDDFA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDDFAD83CDDF8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE01.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE02.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE1A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE2F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE32.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE33.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE34.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE35.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE36.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE37.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE38.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE39.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE3A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE50.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDE51.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF00.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF01.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF02.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF03.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF04.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF05.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF06.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF07.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF08.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF09.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF0F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF10.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF11.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF12.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF13.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF14.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF15.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF16.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF17.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF18.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF19.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF1F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF20.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF21.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF24.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF25.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF26.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF27.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF28.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF29.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF2A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF2B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF2C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF2D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF2E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF2F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF30.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF31.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF32.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF33.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF34.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF35.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF36.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF37.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF38.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF39.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF3F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF40.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF41.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF42.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF43.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF44.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF45.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF46.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF47.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF48.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF49.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF4F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF50.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF51.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF52.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF53.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF54.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF55.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF56.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF57.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF58.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF59.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF5F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF60.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF61.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF62.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF63.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF64.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF65.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF66.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF67.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF68.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF69.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF6F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF70.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF71.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF72.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF73.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF74.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF75.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF76.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF77.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF78.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF79.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF7A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF7B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF7C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF7D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF7E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF7F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF80.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF81.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF82.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF83.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF84.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF85.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF85D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF85D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF85D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF85D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF85D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF86.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF87.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF88.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF89.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF8F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF90.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF91.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF92.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF93.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF96.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF97.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDF9F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFA9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFAF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFB9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFBF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC3D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC3D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC3D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC3D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC3D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC4D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC4D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC4D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC4D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC4D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC7D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC7D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC7D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC7D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC7D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFC9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCAD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCAD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCAD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCAD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCAD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCBD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCBD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCBD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCBD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCBD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFCF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFD0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFD1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFD2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFD3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFD4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFD5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFD6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFD7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFD8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFD9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFDA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFDB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFDC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFDD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFDE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFDF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFE9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFEA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFEB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFEC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFED.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFEE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFEF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFF0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFF3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFF4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFF5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFF7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFF8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFF9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83CDFFA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC00.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC01.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC02.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC03.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC04.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC05.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC06.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC07.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC08.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC09.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC0F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC10.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC11.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC12.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC13.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC14.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC15.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC16.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC17.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC18.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC19.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC1F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC20.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC21.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC22.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC23.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC24.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC25.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC26.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC27.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC28.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC29.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC2F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC30.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC31.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC32.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC33.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC34.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC35.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC36.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC37.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC38.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC39.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC3A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC3B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC3C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC3D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC3E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC3F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC40.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC41.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC42.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC42D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC42D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC42D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC42D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC42D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC43.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC43D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC43D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC43D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC43D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC43D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC44.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC45.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC46.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC46D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC46D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC46D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC46D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC46D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC47.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC47D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC47D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC47D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC47D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC47D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC48.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC48D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC48D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC48D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC48D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC48D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC49.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC49D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC49D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC49D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC49D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC49D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4AD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4AD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4AD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4AD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4AD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4BD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4BD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4BD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4BD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4BD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4CD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4CD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4CD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4CD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4CD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4DD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4DD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4DD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4DD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4DD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4ED83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4ED83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4ED83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4ED83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4ED83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4FD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4FD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4FD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4FD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC4FD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC50.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC50D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC50D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC50D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC50D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC50D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC51.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC52.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC53.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC54.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC55.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC56.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC57.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC58.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC59.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC5F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC60.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC61.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC62.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC63.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC64.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC65.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC66.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC66D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC66D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC66D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC66D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC66D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC67.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC67D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC67D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC67D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC67D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC67D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC68.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC68D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC68D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC68D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC68D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC68D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC69.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC69D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC69D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC69D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC69D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC69D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6ED83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6ED83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6ED83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6ED83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6ED83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC6F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC70.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC70D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC70D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC70D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC70D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC70D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC71.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC71D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC71D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC71D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC71D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC71D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC72.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC72D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC72D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC72D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC72D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC72D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC73.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC73D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC73D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC73D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC73D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC73D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC74.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC74D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC74D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC74D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC74D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC74D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC75.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC75D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC75D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC75D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC75D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC75D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC76.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC76D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC76D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC76D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC76D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC76D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC77.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC77D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC77D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC77D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC77D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC77D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC78.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC78D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC78D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC78D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC78D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC78D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC79.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7CD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7CD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7CD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7CD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7CD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC7F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC80.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC81.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC81D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC81D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC81D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC81D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC81D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC82.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC82D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC82D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC82D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC82D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC82D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC83.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC83D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC83D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC83D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC83D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC83D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC84.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC85.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC85D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC85D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC85D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC85D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC85D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC86.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC86D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC86D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC86D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC86D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC86D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC87.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC87D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC87D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC87D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC87D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC87D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC88.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC89.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC8F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC90.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC91.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC92.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC93.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC94.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC95.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC96.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC97.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC98.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC99.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDC9F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCA9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAAD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAAD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAAD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAAD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAAD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCAF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCB9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCBF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCC9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCCF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCD9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCDF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCE9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCEA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCEB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCEC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCED.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCEE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCEF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCF9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCFA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDCFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD00.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD01.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD02.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD03.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD04.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD05.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD06.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD07.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD08.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD09.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD0F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD10.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD11.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD12.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD13.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD14.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD15.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD16.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD17.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD18.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD19.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD1F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD20.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD21.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD22.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD23.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD24.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD25.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD26.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD27.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD28.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD29.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD2F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD30.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD31.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD32.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD33.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD34.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD35.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD36.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD37.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD38.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD39.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD3A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD3B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD3C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD3D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD4A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD4B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD4C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD4D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD50.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD51.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD52.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD53.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD54.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD55.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD56.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD57.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD58.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD59.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD5F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD60.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD61.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD62.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD63.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD64.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD65.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD66.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD67.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD6F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD73.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD74.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD75.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD76.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD77.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD78.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD87.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD8A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD8B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD8C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD8D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD90.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD90D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD90D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD90D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD90D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD90D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD95.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD95D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD95D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD95D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD95D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD95D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD96.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD96D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD96D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD96D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD96D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDD96D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDBC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDC2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDC3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDC4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDD1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDD2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDD3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDDD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDDE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDE1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDE3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDF3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDFA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDDFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE00.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE01.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE02.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE03.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE04.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE05.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE06.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE07.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE08.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE09.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE0F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE10.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE11.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE12.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE13.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE14.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE15.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE16.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE17.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE18.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE19.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE1F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE20.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE21.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE22.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE23.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE24.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE25.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE26.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE27.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE28.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE29.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE2F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE30.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE31.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE32.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE33.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE34.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE35.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE36.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE37.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE38.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE39.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE3F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE40.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE45.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE45D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE45D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE45D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE45D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE45D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE46.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE46D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE46D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE46D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE46D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE46D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE47.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE47D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE47D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE47D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE47D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE47D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE48.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE49.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4BD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4BD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4BD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4BD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4BD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4CD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4CD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4CD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4CD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4CD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4DD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4DD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4DD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4DD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4DD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4ED83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4ED83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4ED83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4ED83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4ED83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4FD83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4FD83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4FD83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4FD83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE4FD83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE80.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE81.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE82.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE83.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE84.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE85.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE86.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE87.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE88.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE89.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE8F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE90.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE91.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE92.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE93.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE94.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE95.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE96.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE97.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE98.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE99.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9A.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9B.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9C.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9D.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9E.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDE9F.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA3D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA3D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA3D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA3D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA3D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEA9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEAF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB4D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB4D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB4D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB4D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB4D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB5D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB5D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB5D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB5D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB5D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB6D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB6D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB6D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB6D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB6D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB7.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB8.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEB9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBA.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEBF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC0D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC0D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC0D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC0D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC0D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEC5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDECB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDECC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDECD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDECE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDECF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEE0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEE1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEE2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEE3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEE4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEE5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEE9.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEEB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEEC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEF0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83DDEF3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83EDD18D83CDFFB.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83EDD18D83CDFFC.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83EDD18D83CDFFD.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83EDD18D83CDFFE.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83EDD18D83CDFFF.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83EDD80.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83EDD81.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83EDD82.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83EDD83.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83EDD84.png\" />\r\n    <Content Include=\"Assets\\Emoji\\Separated\\D83EDDC0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part5.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part6.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part0.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part1.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part2.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part3.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part4.png\" />\r\n    <Content Include=\"Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part5.png\" />\r\n    <Content Include=\"Assets\\light.emoji.abc-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.backspace-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.category.1-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.category.2-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.category.3-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.category.4-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.category.5-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.recent-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.sticker-WXGA.png\" />\r\n    <Content Include=\"Assets\\emoji.sticker-WXGA.png\" />\r\n    <Content Include=\"FlipCycleTileMedium336.png\" />\r\n    <Content Include=\"FlipCycleTileSmall159.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.add.rest.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.attach.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.cancel.rest.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.check.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.delete.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.edit.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.feature.search.rest.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.feature.video.rest.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.forwardmessage.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.manage.rest.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.map.centerme.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.map.checkin.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.refresh.rest.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.save.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.send.text.rest.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.share.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.smile.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.stop.rest.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.next.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.transport.play.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.basecircle.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.next.light.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\appbar.map.direction.png\" />\r\n    <Content Include=\"Images\\Audio\\appbar.basecircle.rest.png\" />\r\n    <Content Include=\"Images\\Audio\\appbar.download.rest.png\" />\r\n    <Content Include=\"Images\\Audio\\appbar.transport.pause.rest.png\" />\r\n    <Content Include=\"Images\\Audio\\appbar.transport.play.rest.png\" />\r\n    <Content Include=\"Images\\Backgrounds\\gallery_WXGA.png\" />\r\n    <Content Include=\"Images\\Backgrounds\\wallpapercheck_WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\broadcast-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\chat.check-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\chat.gas-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\chat.mute-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\chat.commands-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\chat.keyboard-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\chat.customkeyboard-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\passcode.close-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\group-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\passcode.open-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\secretchat-WXGA.png\" />\r\n    <Content Include=\"Images\\LockScreen\\lockscreen.logo.png\" />\r\n    <Content Include=\"Images\\LockScreen\\lockscreen.logo.white.png\" />\r\n    <Content Include=\"Images\\Maps\\4SQ.png\" />\r\n    <Content Include=\"Images\\Messages\\channel.broadcast-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\chat_doc-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\message.state.views-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\file.black-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\file.white-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\link.png\" />\r\n    <Content Include=\"Images\\Messages\\media.black-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\media.download-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\media.white-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\message.state.broadcast.png\" />\r\n    <Content Include=\"Images\\Dialogs\\chat.state.read-black-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\chat.state.sent-black-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\secretchat-black-WXGA.png\" />\r\n    <Content Include=\"Images\\Dialogs\\secretchat-white-WXGA.png\" />\r\n    <Content Include=\"Images\\LockScreen\\lockscreen.png\" />\r\n    <Content Include=\"Images\\Maps\\attach-location-black.png\" />\r\n    <Content Include=\"Images\\Maps\\Map_Pin.png\" />\r\n    <Content Include=\"Images\\Messages\\chat.nomessages-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\chat.nomessages-white-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\message.state.read-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\message.state.sending-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\message.state.sent-WXGA.png\" />\r\n    <Content Include=\"Images\\Messages\\unreadmessages.png\" />\r\n    <Content Include=\"Images\\Messages\\message.deletereply.png\" />\r\n    <Content Include=\"Images\\NumericKeyboard\\back.png\" />\r\n    <Content Include=\"Images\\NumericKeyboard\\back.white.png\" />\r\n    <Content Include=\"Images\\PhoneNumber\\changenumber_2x.png\" />\r\n    <Content Include=\"Images\\Placeholder\\placeholder.broadcast.png\" />\r\n    <Content Include=\"Images\\Placeholder\\placeholder.group.transparent-WXGA.png\" />\r\n    <Content Include=\"Images\\Placeholder\\placeholder.user.transparent-WXGA.png\" />\r\n    <Content Include=\"Images\\Startup\\intro.1-720p.png\" />\r\n    <Content Include=\"Images\\Startup\\intro.2-WXGA.png\" />\r\n    <Content Include=\"Images\\Startup\\intro.3-WXGA.png\" />\r\n    <Content Include=\"Images\\Startup\\intro.4-WXGA.png\" />\r\n    <Content Include=\"Images\\Startup\\intro.5-WXGA.png\" />\r\n    <Content Include=\"Images\\Startup\\intro.6-WXGA.png\" />\r\n    <None Include=\"Properties\\WMAppManifest.Private.xml\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n    <None Include=\"Properties\\WMAppManifest.Public.xml\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n    <Content Include=\"Sounds\\Sound2.wav\" />\r\n    <Content Include=\"Sounds\\Sound1.wav\" />\r\n    <Content Include=\"Sounds\\Default.wav\" />\r\n    <Content Include=\"Sounds\\Sound3.wav\" />\r\n    <Content Include=\"Sounds\\Sound4.wav\" />\r\n    <Content Include=\"Sounds\\Sound5.wav\" />\r\n    <Content Include=\"Sounds\\Sound6.wav\" />\r\n    <Content Include=\"SplashScreenImage.jpg\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Contact.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\ExifLib\\ExifLib.csproj\">\r\n      <Project>{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}</Project>\r\n      <Name>ExifLib</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\Telegram.Api\\Telegram.Api.csproj\">\r\n      <Project>{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}</Project>\r\n      <Name>Telegram.Api</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\Telegram.Controls\\Telegram.Controls.csproj\">\r\n      <Project>{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}</Project>\r\n      <Name>Telegram.Controls</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\TelegramClient.ScheduledTaskAgent\\TelegramClient.ScheduledTaskAgent.csproj\">\r\n      <Project>{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}</Project>\r\n      <Name>TelegramClient.ScheduledTaskAgent</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.resx\">\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources1.Designer.cs</LastGenOutput>\r\n      <SubType>Designer</SubType>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.de.resx\">\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.de.Designer.cs</LastGenOutput>\r\n      <SubType>Designer</SubType>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.es.resx\">\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.es.Designer.cs</LastGenOutput>\r\n      <SubType>Designer</SubType>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.pt.resx\">\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.pt.Designer.cs</LastGenOutput>\r\n      <SubType>Designer</SubType>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.nl.resx\">\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.nl.Designer.cs</LastGenOutput>\r\n      <SubType>Designer</SubType>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"Resources\\AppResources.it.resx\">\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.it.Designer.cs</LastGenOutput>\r\n      <SubType>Designer</SubType>\r\n    </EmbeddedResource>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"Images\\Backgrounds\\Dark\\\" />\r\n    <Folder Include=\"Images\\Backgrounds\\Light\\\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n  <Target Name=\"BeforeBuild\">\r\n    <Delete Files=\"Properties\\WMAppManifest.xml\" />\r\n    <Copy SourceFiles=\"Properties\\WMAppManifest.Private.xml\" DestinationFiles=\"Properties\\WMAppManifest.xml\" OverwriteReadOnlyFiles=\"True\" Condition=\" '$(Configuration)' == 'Release Private Beta' Or '$(Configuration)' == 'Debug Private Beta'\" />\r\n    <Copy SourceFiles=\"Properties\\WMAppManifest.Public.xml\" DestinationFiles=\"Properties\\WMAppManifest.xml\" OverwriteReadOnlyFiles=\"True\" Condition=\" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Debug'\" />\r\n  </Target>\r\n  <ProjectExtensions />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\nuget.targets\" />\r\n</Project>"
  },
  {
    "path": "TelegramClient/Themes/Default/Button.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\">\r\n\r\n    <Style TargetType=\"toolkit:CustomMessageBox\">\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeNormal}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneChromeBrush}\"/>\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkit:CustomMessageBox\">\r\n                    <Grid Background=\"{TemplateBinding Background}\" HorizontalAlignment=\"Stretch\">\r\n                        <Grid.RenderTransform>\r\n                            <TranslateTransform Y=\"-32\"/>\r\n                        </Grid.RenderTransform>\r\n                        <Grid HorizontalAlignment=\"Left\" Width=\"480\" Margin=\"0,32,0,0\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <StackPanel Grid.ColumnSpan=\"2\" Margin=\"0,0,0,18\">\r\n                                <TextBlock x:Name=\"TitleTextBlock\" Foreground=\"{TemplateBinding Foreground}\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" Margin=\"24,16,24,-6\" Text=\"{TemplateBinding Title}\" Visibility=\"Collapsed\"/>\r\n                                <TextBlock x:Name=\"CaptionTextBlock\" Foreground=\"{TemplateBinding Foreground}\" FontSize=\"{StaticResource PhoneFontSizeLarge}\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" HorizontalAlignment=\"Left\" Margin=\"24,8,24,0\" TextWrapping=\"Wrap\" Text=\"{TemplateBinding Caption}\" Visibility=\"Collapsed\"/>\r\n                                <TextBlock x:Name=\"MessageTextBlock\" Foreground=\"{TemplateBinding Foreground}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" HorizontalAlignment=\"Left\" Margin=\"24,11,24,0\" TextWrapping=\"Wrap\" Text=\"{TemplateBinding Message}\" Visibility=\"Collapsed\"/>\r\n                                <ContentPresenter Margin=\"12,0,0,0\"/>\r\n                            </StackPanel>\r\n                            <Button x:Name=\"LeftButton\" Content=\"{TemplateBinding LeftButtonContent}\" Grid.Column=\"0\" Foreground=\"{TemplateBinding Foreground}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" IsEnabled=\"{TemplateBinding IsLeftButtonEnabled}\" Margin=\"12,0,0,12\" Grid.Row=\"1\" Visibility=\"Collapsed\"/>\r\n                            <Button x:Name=\"RightButton\" Content=\"{TemplateBinding RightButtonContent}\" Grid.Column=\"1\" Foreground=\"{TemplateBinding Foreground}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" IsEnabled=\"{TemplateBinding IsRightButtonEnabled}\" Margin=\"0,0,12,12\" Grid.Row=\"1\" Visibility=\"Collapsed\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"CustomMessageBoxFullHDStyle\" TargetType=\"toolkit:CustomMessageBox\">\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"17.667\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneChromeBrush}\"/>\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkit:CustomMessageBox\">\r\n                    <Grid Background=\"{TemplateBinding Background}\" HorizontalAlignment=\"Stretch\">\r\n                        <Grid.RenderTransform>\r\n                            <TranslateTransform Y=\"-32\"/>\r\n                        </Grid.RenderTransform>\r\n                        <Grid HorizontalAlignment=\"Left\" Width=\"480\" Margin=\"0,32,0,0\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <StackPanel Grid.ColumnSpan=\"2\" Margin=\"0,0,0,18\">\r\n                                <TextBlock x:Name=\"TitleTextBlock\" Foreground=\"{TemplateBinding Foreground}\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" Margin=\"24,16,24,-6\" Text=\"{TemplateBinding Title}\" Visibility=\"Collapsed\"/>\r\n                                <TextBlock x:Name=\"CaptionTextBlock\" Foreground=\"{TemplateBinding Foreground}\" FontSize=\"25\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" HorizontalAlignment=\"Left\" Margin=\"24,8,24,0\" TextWrapping=\"Wrap\" Text=\"{TemplateBinding Caption}\" Visibility=\"Collapsed\"/>\r\n                                <TextBlock x:Name=\"MessageTextBlock\" Foreground=\"{TemplateBinding Foreground}\" FontSize=\"17.667\" HorizontalAlignment=\"Left\" Margin=\"24,11,24,0\" TextWrapping=\"Wrap\" Text=\"{TemplateBinding Message}\" Visibility=\"Collapsed\"/>\r\n                                <ContentPresenter Margin=\"12,0,12,0\" />\r\n                            </StackPanel>\r\n                            <Button x:Name=\"LeftButton\" FontSize=\"17.667\" Content=\"{TemplateBinding LeftButtonContent}\" BorderThickness=\"2\" Grid.Column=\"0\" Foreground=\"{TemplateBinding Foreground}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" IsEnabled=\"{TemplateBinding IsLeftButtonEnabled}\" Margin=\"7,0,-3,12\" Padding=\"10,3,10,5\" Grid.Row=\"1\" Visibility=\"Collapsed\"/>\r\n                            <Button x:Name=\"RightButton\" FontSize=\"17.667\" Content=\"{TemplateBinding RightButtonContent}\" BorderThickness=\"2\" Grid.Column=\"1\" Foreground=\"{TemplateBinding Foreground}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" IsEnabled=\"{TemplateBinding IsRightButtonEnabled}\" Margin=\"-3,0,7,12\" Padding=\"10,3,10,5\" Grid.Row=\"1\" Visibility=\"Collapsed\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ScrollButtonStyle\" TargetType=\"Button\">\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"#FFDEE3EA\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"#FFDEE3EA\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ButtonBackground\" \r\n                                Width=\"64\" Height=\"64\" CornerRadius=\"32\" \r\n                                BorderBrush=\"{TemplateBinding BorderBrush}\" \r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\" \r\n                                Background=\"{TemplateBinding Background}\" \r\n                                Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <ContentControl \r\n                                x:Name=\"ContentContainer\" \r\n                                FontWeight=\"{TemplateBinding FontWeight}\" \r\n                                ContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n                                Content=\"{TemplateBinding Content}\" \r\n                                Foreground=\"{TemplateBinding Foreground}\" \r\n                                HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                Padding=\"{TemplateBinding Padding}\" \r\n                                VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"Button\" x:Key=\"ReplyKeyboardButtonStyle\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <!--<Setter Property=\"Padding\" Value=\"10,3,10,5\"/>-->\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ButtonBase\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"0,12\">\r\n                            <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"PhoneButtonBase\" TargetType=\"ButtonBase\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <Setter Property=\"Padding\" Value=\"10,3,10,5\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ButtonBase\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"DialogDetailsCaptionButtonStyle\" TargetType=\"Button\">\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <Setter Property=\"Padding\" Value=\"12,12,0,12\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"0\">\r\n                            <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"LogoutButtonStyle\" TargetType=\"Button\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <Setter Property=\"Padding\" Value=\"10,3,10,5\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"StatusMarker\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"LightGreen\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"StatusMarker\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Gray\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <Ellipse x:Name=\"StatusMarker\" Fill=\"Gray\" Height=\"12\" Width=\"12\" Margin=\"0,0,19,0\" />\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ProfileButtonStyle\" TargetType=\"Button\">\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"FontSize\" Value=\"36.667\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"WhiteProfileButtonStyle\" BasedOn=\"{StaticResource ProfileButtonStyle}\" TargetType=\"Button\">\r\n        <Setter Property=\"Foreground\" Value=\"White\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"HiddenButtonStyle\" TargetType=\"Button\">\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"FontSize\" Value=\"36.667\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Padding=\"9,10\">\r\n                            <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"SelectableButtonStyle\" TargetType=\"Button\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Pressed\" GeneratedDuration=\"0:0:1\" To=\"Normal\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"Marker\">\r\n                                                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                <EasingDoubleKeyFrame KeyTime=\"0:0:1\" Value=\"0\"/>\r\n                                            </DoubleAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"Marker\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualTransition>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"Marker\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\">\r\n                            <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Border>\r\n                        <Border x:Name=\"Marker\" Width=\"24\" HorizontalAlignment=\"Left\" Background=\"Transparent\" />\r\n\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>\r\n\r\n\r\n"
  },
  {
    "path": "TelegramClient/Themes/Default/CheckBox.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"Button.xaml\"/>\r\n    </ResourceDictionary.MergedDictionaries>\r\n\r\n    <Style x:Key=\"PhoneRadioButtonCheckBoxBase\" BasedOn=\"{StaticResource PhoneButtonBase}\" TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneRadioCheckBoxBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneRadioCheckBoxBrush}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n    </Style>\r\n    \r\n    <Style x:Key=\"PasswordVisibilityCheckBox\" BasedOn=\"{StaticResource PhoneRadioButtonCheckBoxBase}\" TargetType=\"CheckBox\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CheckBox\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"CheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneRadioCheckBoxDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"CheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"CheckMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneRadioCheckBoxCheckDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"IndeterminateMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneRadioCheckBoxCheckDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"CheckMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneRadioCheckBoxCheckBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"CheckMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Gray\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Indeterminate\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Margin=\"{StaticResource PhoneTouchTargetLargeOverhang}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"32\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Path x:Name=\"CheckMark\" Width=\"26\" Height=\"16\" Canvas.Left=\"11\" Canvas.Top=\"16\" Stretch=\"Fill\" Fill=\"{TemplateBinding Background}\" Data=\"F1 M 24,21C 25.6569,21 27,22.3431 27,24C 27,25.6569 25.6569,27 24,27C 22.3431,27 21,25.6569 21,24C 21,22.3431 22.3431,21 24,21 Z M 24,16C 31,16 37,21 37,24C 37,27 31,32 24,32C 17,32 11,27 11,24C 11,21 17,16 24,16 Z M 24,18.5C 20.9624,18.5 18.5,20.9624 18.5,24C 18.5,27.0376 20.9624,29.5 24,29.5C 27.0376,29.5 29.5,27.0376 29.5,24C 29.5,20.9624 27.0376,18.5 24,18.5 Z \"/>\r\n                            <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"12,0,0,0\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>\r\n\r\n\r\n"
  },
  {
    "path": "TelegramClient/Themes/Default/ListBox.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\">\r\n    \r\n    <Style TargetType=\"ListBoxItem\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBoxItem\">\r\n                    <Border x:Name=\"LayoutRoot\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"LayoutRoot\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TransparentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation Duration=\"0\" To=\".5\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ContentContainer\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"LazyListBoxStyle\" TargetType=\"controls:LazyListBox\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"LazyItemsControlStyle\" TargetType=\"controls:LazyItemsControl\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n    </Style>\r\n    \r\n    <Style x:Key=\"LazyListBoxInverseStyle\" TargetType=\"controls:LazyListBox\" BasedOn=\"{StaticResource LazyListBoxStyle}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"controls:LazyListBox\">\r\n                    <ScrollViewer x:Name=\"ScrollViewer\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" Padding=\"{TemplateBinding Padding}\" Style=\"{StaticResource ScrollViewerInverseStyle}\">\r\n                        <ItemsPresenter/>\r\n                    </ScrollViewer>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--<Style TargetType=\"toolkit:ListPickerItem\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Padding\" Value=\"8 10\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkit:ListPickerItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames\r\n                                            Storyboard.TargetName=\"ContentContainer\"\r\n                                            Storyboard.TargetProperty=\"Foreground\"\r\n                                            Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame\r\n                                                Value=\"{StaticResource PhoneAccentBrush}\"\r\n                                                KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ContentControl\r\n                            x:Name=\"ContentContainer\"\r\n                            Content=\"{TemplateBinding Content}\"\r\n                            ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                            VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                            HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                            Margin=\"{TemplateBinding Padding}\"/>\r\n                        --><!--Foreground=\"{TemplateBinding Foreground}\"--><!--\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>-->\r\n\r\n    <!--<Style TargetType=\"toolkit:ListPicker\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"Margin\" Value=\"{StaticResource PhoneTouchTargetOverhang}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkit:ListPicker\">\r\n                    <StackPanel>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"PickerStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Highlighted\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames\r\n                                            Storyboard.TargetName=\"UserControl\"\r\n                                            Storyboard.TargetProperty=\"Foreground\"\r\n                                            Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame\r\n                                                Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"\r\n                                                KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames\r\n                                            Storyboard.TargetName=\"Border\"\r\n                                            Storyboard.TargetProperty=\"Background\"\r\n                                            Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame\r\n                                                Value=\"{StaticResource PhoneTextBoxEditBackgroundColor}\"\r\n                                                KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames\r\n                                            Storyboard.TargetName=\"Border\"\r\n                                            Storyboard.TargetProperty=\"BorderBrush\"\r\n                                            Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame\r\n                                                Value=\"{StaticResource PhoneTextBoxEditBorderBrush}\"\r\n                                                KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames\r\n                                            Storyboard.TargetName=\"Border\"\r\n                                            Storyboard.TargetProperty=\"Background\"\r\n                                            Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame\r\n                                                Value=\"{StaticResource TransparentBrush}\"\r\n                                                KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames\r\n                                            Storyboard.TargetName=\"Border\"\r\n                                            Storyboard.TargetProperty=\"BorderBrush\"\r\n                                            Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame\r\n                                                Value=\"{StaticResource PhoneDisabledBrush}\"\r\n                                                KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames\r\n                                            Storyboard.TargetName=\"UserControl\"\r\n                                            Storyboard.TargetProperty=\"Foreground\"\r\n                                            Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame\r\n                                                Value=\"{StaticResource PhoneDisabledBrush}\"\r\n                                                KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ContentControl\r\n                            Content=\"{TemplateBinding Header}\"\r\n                            ContentTemplate=\"{TemplateBinding HeaderTemplate}\"\r\n                            Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                            FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                            HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                            Margin=\"0 0 0 8\"/>\r\n                        <Grid>\r\n                            <Border x:Name=\"Border\"\r\n                                    Background=\"{TemplateBinding Background}\"\r\n                                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                    BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                                <UserControl x:Name=\"UserControl\" Foreground=\"{TemplateBinding Foreground}\">\r\n                                    <StackPanel>\r\n                                        <TextBlock x:Name=\"MultipleSelectionModeSummary\" Margin=\"8 8 0 8\" />\r\n                                        <Canvas x:Name=\"ItemsPresenterHost\" MinHeight=\"46\">\r\n                                            <ItemsPresenter x:Name=\"ItemsPresenter\">\r\n                                                <ItemsPresenter.RenderTransform>\r\n                                                    <TranslateTransform x:Name=\"ItemsPresenterTranslateTransform\"/>\r\n                                                </ItemsPresenter.RenderTransform>\r\n                                            </ItemsPresenter>\r\n                                        </Canvas>\r\n                                    </StackPanel>\r\n                                </UserControl>\r\n                            </Border>\r\n                        </Grid>\r\n                    </StackPanel>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>-->\r\n</ResourceDictionary>\r\n\r\n\r\n"
  },
  {
    "path": "TelegramClient/Themes/Default/LongListSelector.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\">\r\n\r\n\r\n\r\n    \r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "TelegramClient/Themes/Default/ScrollViewer.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n\r\n    <Style TargetType=\"ScrollViewer\">\r\n        <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollViewer\" >\r\n                    <Grid Margin=\"{TemplateBinding Padding}\" Background=\"{TemplateBinding Background}\">\r\n                        <Grid.Triggers>\r\n                            <EventTrigger RoutedEvent=\"Grid.Loaded\">\r\n                                <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"00:00:01.5\" From=\"1\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n                                        <DoubleAnimation Duration=\"00:00:01.5\" From=\"1\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalScrollBar\"/>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </EventTrigger>\r\n                        </Grid.Triggers>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Scrolling\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalScrollBar\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"NotScrolling\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"VerticalCompression\">\r\n                                <VisualState x:Name=\"NoVerticalCompression\"/>\r\n                                <VisualState x:Name=\"CompressionTop\"/>\r\n                                <VisualState x:Name=\"CompressionBottom\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"HorizontalCompression\">\r\n                                <VisualState x:Name=\"NoHorizontalCompression\"/>\r\n                                <VisualState x:Name=\"CompressionLeft\"/>\r\n                                <VisualState x:Name=\"CompressionRight\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ScrollContentPresenter x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\"/>\r\n                        <ScrollBar x:Name=\"VerticalScrollBar\" HorizontalAlignment=\"Right\" Height=\"Auto\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Vertical\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{TemplateBinding VerticalOffset}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" VerticalAlignment=\"Stretch\" Width=\"5\"/>\r\n                        <ScrollBar x:Name=\"HorizontalScrollBar\" HorizontalAlignment=\"Stretch\" Height=\"5\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Horizontal\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{TemplateBinding HorizontalOffset}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" VerticalAlignment=\"Bottom\" Width=\"Auto\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ScrollViewerInverseStyle\" TargetType=\"ScrollViewer\">\r\n    \t<Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n    \t<Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n    \t<Setter Property=\"Background\" Value=\"Transparent\"/>\r\n    \t<Setter Property=\"Padding\" Value=\"0\"/>\r\n    \t<Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n    \t<Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n    \t<Setter Property=\"Template\">\r\n    \t\t<Setter.Value>\r\n    \t\t\t<ControlTemplate TargetType=\"ScrollViewer\" >\r\n    \t\t\t\t<Grid Margin=\"{TemplateBinding Padding}\" Background=\"{TemplateBinding Background}\">\r\n    \t\t\t\t\t<Grid.Triggers>\r\n    \t\t\t\t\t\t<EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n    \t\t\t\t\t\t\t<BeginStoryboard>\r\n    \t\t\t\t\t\t\t\t<Storyboard>\r\n    \t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"00:00:01.5\" From=\"1\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n    \t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"00:00:01.5\" From=\"1\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalScrollBar\"/>\r\n    \t\t\t\t\t\t\t\t</Storyboard>\r\n    \t\t\t\t\t\t\t</BeginStoryboard>\r\n    \t\t\t\t\t\t</EventTrigger>\r\n    \t\t\t\t\t</Grid.Triggers>\r\n    \t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n    \t\t\t\t\t\t<VisualStateGroup x:Name=\"ScrollStates\">\r\n    \t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n    \t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n    \t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n    \t\t\t\t\t\t\t<VisualState x:Name=\"Scrolling\">\r\n    \t\t\t\t\t\t\t\t<Storyboard>\r\n    \t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n    \t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalScrollBar\"/>\r\n    \t\t\t\t\t\t\t\t</Storyboard>\r\n    \t\t\t\t\t\t\t</VisualState>\r\n    \t\t\t\t\t\t\t<VisualState x:Name=\"NotScrolling\"/>\r\n    \t\t\t\t\t\t</VisualStateGroup>\r\n    \t\t\t\t\t\t<VisualStateGroup x:Name=\"VerticalCompression\">\r\n    \t\t\t\t\t\t\t<VisualState x:Name=\"NoVerticalCompression\"/>\r\n    \t\t\t\t\t\t\t<VisualState x:Name=\"CompressionTop\"/>\r\n    \t\t\t\t\t\t\t<VisualState x:Name=\"CompressionBottom\"/>\r\n    \t\t\t\t\t\t</VisualStateGroup>\r\n    \t\t\t\t\t\t<VisualStateGroup x:Name=\"HorizontalCompression\">\r\n    \t\t\t\t\t\t\t<VisualState x:Name=\"NoHorizontalCompression\"/>\r\n    \t\t\t\t\t\t\t<VisualState x:Name=\"CompressionLeft\"/>\r\n    \t\t\t\t\t\t\t<VisualState x:Name=\"CompressionRight\"/>\r\n    \t\t\t\t\t\t</VisualStateGroup>\r\n    \t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n    \t\t\t\t\t<ScrollContentPresenter x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\"/>\r\n    \t\t\t\t\t<ScrollBar x:Name=\"VerticalScrollBar\" HorizontalAlignment=\"Left\" Height=\"Auto\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Vertical\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{TemplateBinding VerticalOffset}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" VerticalAlignment=\"Stretch\" Width=\"5\"/>\r\n    \t\t\t\t\t<ScrollBar x:Name=\"HorizontalScrollBar\" HorizontalAlignment=\"Stretch\" Height=\"5\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Horizontal\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{TemplateBinding HorizontalOffset}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" VerticalAlignment=\"Top\" Width=\"Auto\"/>\r\n    \t\t\t\t</Grid>\r\n    \t\t\t</ControlTemplate>\r\n    \t\t</Setter.Value>\r\n    \t</Setter>\r\n    </Style>\r\n</ResourceDictionary>\r\n\r\n\r\n"
  },
  {
    "path": "TelegramClient/Themes/Default/Slider.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n\t<ControlTemplate x:Key=\"PhoneSimpleRepeatButton\" TargetType=\"RepeatButton\">\r\n\t\t<Rectangle Fill=\"Transparent\"/>\r\n\t</ControlTemplate>\r\n\r\n    <Style x:Name=\"FriendSlider\" TargetType=\"Slider\">\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Maximum\" Value=\"10\"/>\r\n        <Setter Property=\"Minimum\" Value=\"0\"/>\r\n        <Setter Property=\"Value\" Value=\"0\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneContrastBackgroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Slider\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalTrack\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalTrack\"/>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"HorizontalFill\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"VerticalFill\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalTemplate\" Margin=\"{StaticResource PhoneHorizontalMargin}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"12\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle x:Name=\"HorizontalFill\" Fill=\"{TemplateBinding Foreground}\" Height=\"12\" IsHitTestVisible=\"False\" Margin=\"0,22,0,50\"/>\r\n                            <Border x:Name=\"HorizontalTrack2\" Width=\"{Binding Width, ElementName=HorizontalTrack}\" Grid.Column=\"0\" Background=\"Black\" Height=\"12\" IsHitTestVisible=\"False\" Margin=\"0,22,0,50\" Opacity=\"0.4\"/>\r\n                            <Rectangle x:Name=\"HorizontalTrack\" Grid.Column=\"2\" Fill=\"{TemplateBinding Background}\" Height=\"12\" IsHitTestVisible=\"False\" Margin=\"0,22,0,50\" Opacity=\"0.2\"/>\r\n                            <RepeatButton x:Name=\"HorizontalTrackLargeChangeDecreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n                            <RepeatButton x:Name=\"HorizontalTrackLargeChangeIncreaseRepeatButton\" Grid.Column=\"2\" IsTabStop=\"False\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n                            <Thumb x:Name=\"HorizontalThumb\" Grid.Column=\"1\" Height=\"12\" Margin=\"0,22,0,50\" Width=\"12\">\r\n                                <Thumb.Template>\r\n                                    <ControlTemplate>\r\n                                        <Canvas Background=\"{StaticResource PhoneForegroundBrush}\" Height=\"12\" Width=\"12\">\r\n                                            <Rectangle Fill=\"Transparent\" Height=\"84\" IsHitTestVisible=\"True\" Canvas.Left=\"-24\" Canvas.Top=\"-22\" Width=\"60\"/>\r\n                                        </Canvas>\r\n                                    </ControlTemplate>\r\n                                </Thumb.Template>\r\n                            </Thumb>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalTemplate\" Margin=\"{StaticResource PhoneVerticalMargin}\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"12\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle x:Name=\"VerticalFill\" Fill=\"{TemplateBinding Foreground}\" IsHitTestVisible=\"False\" Margin=\"18,0,18,0\" Grid.Row=\"2\" Width=\"12\"/>\r\n                            <Rectangle x:Name=\"VerticalTrack\" Fill=\"{TemplateBinding Background}\" IsHitTestVisible=\"False\" Margin=\"18,0,18,0\" Opacity=\"0.2\" Width=\"12\"/>\r\n                            <RepeatButton x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\" IsTabStop=\"False\" Grid.Row=\"2\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n                            <RepeatButton x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n                            <Thumb x:Name=\"VerticalThumb\" Height=\"12\" Margin=\"18,0\" Grid.Row=\"1\" Width=\"12\">\r\n                                <Thumb.Template>\r\n                                    <ControlTemplate>\r\n                                        <Canvas Background=\"{StaticResource PhoneForegroundBrush}\" Height=\"12\" Width=\"12\">\r\n                                            <Rectangle Fill=\"Transparent\" Height=\"72\" IsHitTestVisible=\"True\" Canvas.Left=\"-18\" Canvas.Top=\"-30\" Width=\"48\"/>\r\n                                        </Canvas>\r\n                                    </ControlTemplate>\r\n                                </Thumb.Template>\r\n                            </Thumb>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Name=\"UserSlider\" TargetType=\"Slider\">\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Maximum\" Value=\"10\"/>\r\n        <Setter Property=\"Minimum\" Value=\"0\"/>\r\n        <Setter Property=\"Value\" Value=\"0\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneContrastBackgroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Slider\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalTrack\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalTrack\"/>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"HorizontalFill\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"VerticalFill\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalTemplate\" Margin=\"{StaticResource PhoneHorizontalMargin}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"12\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle x:Name=\"HorizontalFill\" Fill=\"{TemplateBinding Foreground}\" Height=\"12\" IsHitTestVisible=\"False\" Margin=\"0,22,0,50\"/>\r\n                            <Rectangle x:Name=\"HorizontalTrack\" Grid.Column=\"2\" Fill=\"{TemplateBinding Background}\" Height=\"12\" IsHitTestVisible=\"False\" Margin=\"0,22,0,50\" Opacity=\"0.2\"/>\r\n                            <RepeatButton x:Name=\"HorizontalTrackLargeChangeDecreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n                            <RepeatButton x:Name=\"HorizontalTrackLargeChangeIncreaseRepeatButton\" Grid.Column=\"2\" IsTabStop=\"False\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n                            <Thumb x:Name=\"HorizontalThumb\" Grid.Column=\"1\" Height=\"12\" Margin=\"0,22,0,50\" Width=\"12\">\r\n                                <Thumb.Template>\r\n                                    <ControlTemplate>\r\n                                        <Canvas Background=\"{StaticResource PhoneForegroundBrush}\" Height=\"12\" Width=\"12\">\r\n                                            <Rectangle Fill=\"Transparent\" Height=\"84\" IsHitTestVisible=\"True\" Canvas.Left=\"-24\" Canvas.Top=\"-22\" Width=\"60\"/>\r\n                                        </Canvas>\r\n                                    </ControlTemplate>\r\n                                </Thumb.Template>\r\n                            </Thumb>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalTemplate\" Margin=\"{StaticResource PhoneVerticalMargin}\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"12\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle x:Name=\"VerticalFill\" Fill=\"{TemplateBinding Foreground}\" IsHitTestVisible=\"False\" Margin=\"18,0,18,0\" Grid.Row=\"2\" Width=\"12\"/>\r\n                            <Rectangle x:Name=\"VerticalTrack\" Fill=\"{TemplateBinding Background}\" IsHitTestVisible=\"False\" Margin=\"18,0,18,0\" Opacity=\"0.2\" Width=\"12\"/>\r\n                            <RepeatButton x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\" IsTabStop=\"False\" Grid.Row=\"2\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n                            <RepeatButton x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n                            <Thumb x:Name=\"VerticalThumb\" Height=\"12\" Margin=\"18,0\" Grid.Row=\"1\" Width=\"12\">\r\n                                <Thumb.Template>\r\n                                    <ControlTemplate>\r\n                                        <Canvas Background=\"{StaticResource PhoneForegroundBrush}\" Height=\"12\" Width=\"12\">\r\n                                            <Rectangle Fill=\"Transparent\" Height=\"72\" IsHitTestVisible=\"True\" Canvas.Left=\"-18\" Canvas.Top=\"-30\" Width=\"48\"/>\r\n                                        </Canvas>\r\n                                    </ControlTemplate>\r\n                                </Thumb.Template>\r\n                            </Thumb>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <!--<Style TargetType=\"Slider\">\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n\t\t<Setter Property=\"Maximum\" Value=\"10\"/>\r\n\t\t<Setter Property=\"Minimum\" Value=\"0\"/>\r\n\t\t<Setter Property=\"Value\" Value=\"0\"/>\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource PhoneContrastBackgroundBrush}\"/>\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"Slider\">\r\n\t\t\t\t\t<Grid Background=\"Transparent\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\"/>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\"/>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"0.1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalTrack\"/>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"0.1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalTrack\"/>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"HorizontalFill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"VerticalFill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Grid x:Name=\"HorizontalTemplate\" Margin=\"{StaticResource PhoneHorizontalMargin}\">\r\n\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\"/>\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"12\"/>\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\"/>\r\n\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"HorizontalFill\" Fill=\"{TemplateBinding Foreground}\" Height=\"12\" IsHitTestVisible=\"False\" Margin=\"0,22,0,50\"/>\r\n\t\t\t\t\t\t\t<Border x:Name=\"HorizontalTrack2\" Width=\"{Binding Width, ElementName=HorizontalTrack}\" Grid.Column=\"0\" Background=\"Black\" Height=\"12\" IsHitTestVisible=\"False\" Margin=\"0,22,0,50\" Opacity=\"0.4\"/>\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"HorizontalTrack\" Grid.Column=\"2\" Fill=\"{TemplateBinding Background}\" Height=\"12\" IsHitTestVisible=\"False\" Margin=\"0,22,0,50\" Opacity=\"0.2\"/>\r\n\t\t\t\t\t\t\t<RepeatButton x:Name=\"HorizontalTrackLargeChangeDecreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n\t\t\t\t\t\t\t<RepeatButton x:Name=\"HorizontalTrackLargeChangeIncreaseRepeatButton\" Grid.Column=\"2\" IsTabStop=\"False\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n\t\t\t\t\t\t\t<Thumb x:Name=\"HorizontalThumb\" Grid.Column=\"1\" Height=\"12\" Margin=\"0,22,0,50\" Width=\"12\">\r\n\t\t\t\t\t\t\t\t<Thumb.Template>\r\n\t\t\t\t\t\t\t\t\t<ControlTemplate>\r\n\t\t\t\t\t\t\t\t\t\t<Canvas Background=\"{StaticResource PhoneForegroundBrush}\" Height=\"12\" Width=\"12\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"Transparent\" Height=\"84\" IsHitTestVisible=\"True\" Canvas.Left=\"-24\" Canvas.Top=\"-22\" Width=\"60\"/>\r\n\t\t\t\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t\t\t</ControlTemplate>\r\n\t\t\t\t\t\t\t\t</Thumb.Template>\r\n\t\t\t\t\t\t\t</Thumb>\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t<Grid x:Name=\"VerticalTemplate\" Margin=\"{StaticResource PhoneVerticalMargin}\">\r\n\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"*\"/>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"12\"/>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\"/>\r\n\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"VerticalFill\" Fill=\"{TemplateBinding Foreground}\" IsHitTestVisible=\"False\" Margin=\"18,0,18,0\" Grid.Row=\"2\" Width=\"12\"/>\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"VerticalTrack\" Fill=\"{TemplateBinding Background}\" IsHitTestVisible=\"False\" Margin=\"18,0,18,0\" Opacity=\"0.2\" Width=\"12\"/>\r\n\t\t\t\t\t\t\t<RepeatButton x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\" IsTabStop=\"False\" Grid.Row=\"2\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n\t\t\t\t\t\t\t<RepeatButton x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource PhoneSimpleRepeatButton}\"/>\r\n\t\t\t\t\t\t\t<Thumb x:Name=\"VerticalThumb\" Height=\"12\" Margin=\"18,0\" Grid.Row=\"1\" Width=\"12\">\r\n\t\t\t\t\t\t\t\t<Thumb.Template>\r\n\t\t\t\t\t\t\t\t\t<ControlTemplate>\r\n\t\t\t\t\t\t\t\t\t\t<Canvas Background=\"{StaticResource PhoneForegroundBrush}\" Height=\"12\" Width=\"12\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"Transparent\" Height=\"72\" IsHitTestVisible=\"True\" Canvas.Left=\"-18\" Canvas.Top=\"-30\" Width=\"48\"/>\r\n\t\t\t\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t\t\t</ControlTemplate>\r\n\t\t\t\t\t\t\t\t</Thumb.Template>\r\n\t\t\t\t\t\t\t</Thumb>\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>-->\r\n\r\n</ResourceDictionary>\r\n\r\n\r\n"
  },
  {
    "path": "TelegramClient/Themes/Default/Templates/DataTemplates.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:eim=\"clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\">\r\n\r\n\r\n    <DataTemplate x:Key=\"AnimatedBackgroundTemplate\">\r\n        <additional:BubbleBackgroundControl Width=\"480\" Height=\"800\"/>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EmptyTemplate\"/>\r\n\r\n\r\n    <converters:BackgroundImageConverter x:Key=\"BackgroundImageConverter\"/>\r\n    <converters:BackgroundBrushConverter x:Key=\"BackgroundBrushConverter\"/>\r\n    <DataTemplate x:Key=\"ImageBackgroundTemplate\">\r\n        <Grid>\r\n            <Grid.Resources>\r\n                <Storyboard x:Name=\"FadeInStoryboard\">\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"BackgroundImage\">\r\n                        <EasingDoubleKeyFrame KeyTime=\"0:0:0.0\" Value=\"0\"/>\r\n                        <EasingDoubleKeyFrame KeyTime=\"0:0:0.35\" Value=\"1\" >\r\n                            <EasingDoubleKeyFrame.EasingFunction>\r\n                                <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                            </EasingDoubleKeyFrame.EasingFunction>\r\n                        </EasingDoubleKeyFrame>\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                </Storyboard>\r\n            </Grid.Resources>\r\n            <Image x:Name=\"BackgroundImage\" Opacity=\"0\" Source=\"{Binding CurrentBackground, Converter={StaticResource BackgroundImageConverter}, ConverterParameter=480}\" Stretch=\"UniformToFill\">\r\n                <i:Interaction.Triggers>\r\n                    <i:EventTrigger EventName=\"Loaded\">\r\n                        <eim:ControlStoryboardAction Storyboard=\"{StaticResource FadeInStoryboard}\"/>\r\n                    </i:EventTrigger>\r\n                </i:Interaction.Triggers>\r\n            </Image>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"SearchUserItemTemplate\">\r\n        <ListBoxItem>\r\n            <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action UserAction($DataContext)]\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"72\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n\r\n                <views:ConversationTileControl \r\n                    Size=\"72\"\r\n                    Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                    Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                    Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                    Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                            Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                            Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                            Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </ListBoxItem>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"UserItemTemplate\">\r\n        <ListBoxItem>\r\n            <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action UserAction($DataContext)]\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"72\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <views:ConversationTileControl \r\n                    Size=\"72\"\r\n                    Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                    Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                    Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                    Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,-8\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Margin=\"18,10,0,0\" \r\n                            Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                            Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                            Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </ListBoxItem>\r\n    </DataTemplate>\r\n</ResourceDictionary>\r\n\r\n\r\n"
  },
  {
    "path": "TelegramClient/Themes/Default/Templates/ItemsPanel.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n\r\n    <ItemsPanelTemplate x:Key=\"NormalMemoryDeviceTemplate\">\r\n        <StackPanel/>\r\n    </ItemsPanelTemplate>\r\n\r\n    <ItemsPanelTemplate x:Key=\"LowMemoryDeviceTemplate\">\r\n        <VirtualizingStackPanel/>\r\n    </ItemsPanelTemplate>\r\n</ResourceDictionary>\r\n\r\n\r\n"
  },
  {
    "path": "TelegramClient/Themes/Default/Templates/Media.xaml",
    "content": "﻿<ResourceDictionary\r\n    x:Class=\"TelegramClient.Themes.Default.Templates.Media\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:themes=\"clr-namespace:TelegramClient.Themes\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:media=\"clr-namespace:TelegramClient.Views.Media\">\r\n\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <themes:SharedResourceDictionary Source=\"/TelegramClient.WP8;component/Themes/Default/W10MCommon.xaml\"/>\r\n    </ResourceDictionary.MergedDictionaries>\r\n\r\n    <converters:TTLMediaToVisibilityConverter x:Key=\"TTLMediaToVisibilityConverter\"/>\r\n    <converters:TTLMediaToTimerStringConverter x:Key=\"TTLMediaToTimerStringConverter\"/>\r\n\r\n    <Style x:Key=\"ReplyCaptionStyle\" TargetType=\"TextBlock\">\r\n        <Setter Property=\"Margin\" Value=\"10,-6,0,0\"/>\r\n        <Setter Property=\"TextTrimming\" Value=\"WordEllipsis\"/>\r\n        <Setter Property=\"FontWeight\" Value=\"SemiBold\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource TelegramAccentBrush}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"20\"/>\r\n        <Setter Property=\"MaxHeight\" Value=\"27\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ReplyBodyStyle\" TargetType=\"TextBlock\">\r\n        <Setter Property=\"Margin\" Value=\"10,0,0,0\"/>\r\n        <Setter Property=\"TextTrimming\" Value=\"WordEllipsis\"/>\r\n        <Setter Property=\"TextWrapping\" Value=\"NoWrap\"/>\r\n        <Setter Property=\"FontSize\" Value=\"20\"/>\r\n        <Setter Property=\"MaxHeight\" Value=\"27\"/>\r\n    </Style>\r\n\r\n    <DataTemplate x:Key=\"GroupTemplate\">\r\n        <Grid Margin=\"-11,-5,-11,1\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <controls:GroupedMessageControl\r\n                Media=\"{Binding}\">\r\n            </controls:GroupedMessageControl>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"InvoiceTemplate\">\r\n        <Grid Margin=\"-10,3,-10,1\" Width=\"323\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <!--<Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>-->\r\n            <Grid Grid.Column=\"1\" >\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid Grid.Row=\"0\" Background=\"Transparent\">\r\n                    <i:Interaction.Triggers>\r\n                        <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                            <micro:ActionMessage MethodName=\"OpenInvoice\">\r\n                                <micro:ActionMessage.Parameters>\r\n                                    <micro:Parameter Value=\"{Binding}\"/>\r\n                                </micro:ActionMessage.Parameters>\r\n                            </micro:ActionMessage>\r\n                        </behaviors:HandledEventTrigger>\r\n                    </i:Interaction.Triggers>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Margin=\"12,-2,12,0\" Grid.Row=\"0\" TextWrapping=\"NoWrap\" Text=\"{Binding Title}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" FontWeight=\"SemiBold\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                    <emojiPanel:TelegramRichTextBox Margin=\"0,-2,0,0\" Grid.Row=\"1\" Text=\"{Binding Description}\" Visibility=\"{Binding DescriptionVisibility}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\" />\r\n                    <TextBlock Margin=\"12,-2,12,0\" Grid.Row=\"2\" TextWrapping=\"NoWrap\" Text=\"{Binding Self, Converter={StaticResource InvoiceToDescriptionConverter}}\" TextTrimming=\"WordEllipsis\" Opacity=\"0.6\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"InvoicePhotoTemplate\">\r\n        <Grid Margin=\"-10,3,-10,1\" Width=\"323\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <!--<Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>-->\r\n            <Grid Grid.Column=\"1\" >\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid Grid.Row=\"0\" Background=\"Transparent\">\r\n                    <i:Interaction.Triggers>\r\n                        <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                            <micro:ActionMessage MethodName=\"OpenInvoice\">\r\n                                <micro:ActionMessage.Parameters>\r\n                                    <micro:Parameter Value=\"{Binding}\"/>\r\n                                </micro:ActionMessage.Parameters>\r\n                            </micro:ActionMessage>\r\n                        </behaviors:HandledEventTrigger>\r\n                    </i:Interaction.Triggers>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Margin=\"12,-2,12,0\" Grid.Row=\"0\" TextWrapping=\"NoWrap\" Text=\"{Binding Title}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" FontWeight=\"SemiBold\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                    <emojiPanel:TelegramRichTextBox Margin=\"0,-2,0,0\" Grid.Row=\"2\" Text=\"{Binding Description}\" Visibility=\"{Binding DescriptionVisibility}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\" />\r\n                </Grid>\r\n                <Grid Margin=\"0,6,0,0\" Grid.Row=\"1\" Background=\"Transparent\"\r\n                      Width=\"{Binding ConverterParameter=Width, Converter={StaticResource InvoiceToDimensionConverter}}\"\r\n\t\t\t          Height=\"{Binding ConverterParameter=Height, Converter={StaticResource InvoiceToDimensionConverter}}\" MaxHeight=\"250\">\r\n                    <i:Interaction.Triggers>\r\n                        <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                            <micro:ActionMessage MethodName=\"OpenInvoice\">\r\n                                <micro:ActionMessage.Parameters>\r\n                                    <micro:Parameter Value=\"{Binding}\"/>\r\n                                </micro:ActionMessage.Parameters>\r\n                            </micro:ActionMessage>\r\n                        </behaviors:HandledEventTrigger>\r\n                    </i:Interaction.Triggers>\r\n                    <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                    <Image Source=\"{Binding Photo.Uri}\" Stretch=\"UniformToFill\"/>\r\n\r\n                    <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Margin=\"12\" IsHitTestVisible=\"False\">\r\n                        <Border Margin=\"-3\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.5\"/>\r\n                        <TextBlock Margin=\"3,-2,3,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeSmall}\" Text=\"{Binding Converter={StaticResource InvoiceToDescriptionConverter}}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"StickerTemplate\">\r\n        <Image Margin=\"-6,0\"\r\n            Stretch=\"Fill\" \r\n            Source=\"{Binding Document, Converter={StaticResource DefaultPhotoConverter}}\"\r\n            Height=\"{Binding Document, Converter={StaticResource StickerToDimensionConverter}, ConverterParameter=Height}\"\r\n            Width=\"{Binding Document, Converter={StaticResource StickerToDimensionConverter}, ConverterParameter=Width}\"/>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"GameGifTemplate\">\r\n        <Grid Margin=\"0,0,0,0\" Width=\"311\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" >\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid Grid.Row=\"0\" Background=\"Transparent\">\r\n                    <i:Interaction.Triggers>\r\n                        <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                            <micro:ActionMessage MethodName=\"OpenGame\">\r\n                                <micro:ActionMessage.Parameters>\r\n                                    <micro:Parameter Value=\"{Binding}\"/>\r\n                                </micro:ActionMessage.Parameters>\r\n                            </micro:ActionMessage>\r\n                        </behaviors:HandledEventTrigger>\r\n                    </i:Interaction.Triggers>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Margin=\"12,-2,0,0\" Grid.Row=\"0\" TextWrapping=\"NoWrap\" Text=\"{Binding Game.Title}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" FontWeight=\"SemiBold\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                    <emojiPanel:TelegramRichTextBox Margin=\"0,-2,0,0\" Grid.Row=\"1\" emojiPanel:BrowserNavigationService.Message=\"{Binding SourceMessage}\" Text=\"{Binding Message}\" Visibility=\"{Binding MessageVisibility}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\" />\r\n                    <emojiPanel:TelegramRichTextBox Margin=\"0,-2,0,0\" Grid.Row=\"2\" Text=\"{Binding Game.Description}\" Visibility=\"{Binding DescriptionVisibility}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\" />\r\n                </Grid>\r\n                <Grid Grid.Row=\"1\" Margin=\"12,6,0,0\">\r\n                    <additional:GifPlayerControl\r\n                        Width=\"{Binding Game.Document, ConverterParameter=Width, Converter={StaticResource WebPageGifToDimensionConverter}}\" \r\n                        Height=\"{Binding Game.Document, ConverterParameter=Height, Converter={StaticResource WebPageGifToDimensionConverter}}\"\r\n                        Media=\"{Binding ThumbSelf}\"\r\n                        Progress=\"{Binding DownloadingProgress}\"\r\n                        micro:Message.Attach=\"[Event CancelDownload] = [Action CancelDocumentDownloading($DataContext)]\"/>\r\n\r\n                    <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Margin=\"12\" IsHitTestVisible=\"False\">\r\n                        <Border Margin=\"-3\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.5\"/>\r\n                        <TextBlock Margin=\"3,-2,3,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeSmall}\" Text=\"{Binding Resources.Game, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"GameTemplate\">\r\n        <Grid Margin=\"0,0,0,0\" Width=\"311\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" >\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid Grid.Row=\"0\" Background=\"Transparent\">\r\n                    <i:Interaction.Triggers>\r\n                        <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                            <micro:ActionMessage MethodName=\"OpenGame\">\r\n                                <micro:ActionMessage.Parameters>\r\n                                    <micro:Parameter Value=\"{Binding}\"/>\r\n                                </micro:ActionMessage.Parameters>\r\n                            </micro:ActionMessage>\r\n                        </behaviors:HandledEventTrigger>\r\n                    </i:Interaction.Triggers>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Margin=\"12,-2,0,0\" Grid.Row=\"0\" TextWrapping=\"NoWrap\" Text=\"{Binding Game.Title}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" FontWeight=\"SemiBold\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                    <emojiPanel:TelegramRichTextBox Margin=\"0,-2,0,0\" Grid.Row=\"1\" emojiPanel:BrowserNavigationService.Message=\"{Binding SourceMessage}\" Text=\"{Binding Message}\" Visibility=\"{Binding MessageVisibility}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\" />\r\n                    <emojiPanel:TelegramRichTextBox Margin=\"0,-2,0,0\" Grid.Row=\"2\" Text=\"{Binding Game.Description}\" Visibility=\"{Binding DescriptionVisibility}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\" />\r\n                </Grid>\r\n                <Grid Margin=\"12,6,0,0\" Grid.Row=\"1\" Background=\"Transparent\"\r\n                      Width=\"{Binding ConverterParameter=Width, Converter={StaticResource GameToDimensionConverter}}\"\r\n\t\t\t          Height=\"{Binding ConverterParameter=Height, Converter={StaticResource GameToDimensionConverter}}\" MaxHeight=\"250\">\r\n                    <i:Interaction.Triggers>\r\n                        <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                            <micro:ActionMessage MethodName=\"OpenGame\">\r\n                                <micro:ActionMessage.Parameters>\r\n                                    <micro:Parameter Value=\"{Binding}\"/>\r\n                                </micro:ActionMessage.Parameters>\r\n                            </micro:ActionMessage>\r\n                        </behaviors:HandledEventTrigger>\r\n                    </i:Interaction.Triggers>\r\n                    <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                    <Image Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=90}\" Stretch=\"UniformToFill\"/>\r\n                    <Image Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n\r\n                    <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Margin=\"12\" IsHitTestVisible=\"False\">\r\n                        <Border Margin=\"-3\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.5\"/>\r\n                        <TextBlock Margin=\"3,-2,3,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeSmall}\" Text=\"{Binding Resources.Game, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"WebPageGifMediaTemplate\">\r\n        <Grid Width=\"311\" Margin=\"0,3,0,0\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Border Width=\"4\" Grid.RowSpan=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Margin=\"12,-2,0,0\" Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding WebPage.SiteName}\" Visibility=\"{Binding WebPage.SiteNameVisibility}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" FontWeight=\"SemiBold\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n            <TextBlock Margin=\"12,-2,0,0\" Grid.Column=\"1\" Grid.Row=\"2\" Text=\"{Binding WebPage.Title}\" Visibility=\"{Binding WebPage.TitleVisibility}\" TextTrimming=\"WordEllipsis\" TextWrapping=\"Wrap\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n            <additional:GifPlayerControl  \r\n                Grid.Column=\"1\" Grid.Row=\"3\" Margin=\"12,0,0,0\"\r\n                Width=\"{Binding WebPage.Document, ConverterParameter=Width, Converter={StaticResource WebPageGifToDimensionConverter}}\" \r\n                Height=\"{Binding WebPage.Document, ConverterParameter=Height, Converter={StaticResource WebPageGifToDimensionConverter}}\"\r\n                Media=\"{Binding ThumbSelf}\"\r\n                Progress=\"{Binding DownloadingProgress}\"\r\n                micro:Message.Attach=\"[Event CancelDownload] = [Action CancelDocumentDownloading($DataContext)]\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"WebPageSmallPhotoMediaTemplate\">\r\n        <Grid Margin=\"0,3,0,1\" Width=\"311\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width =\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Grid Width=\"50\" Height=\"50\" Margin=\"8,0,0,0\" Grid.Column=\"1\" Grid.Row=\"1\" Grid.RowSpan=\"4\" VerticalAlignment=\"Top\">\r\n                    <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                    <Image Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}}\" HorizontalAlignment=\"Center\" Stretch=\"UniformToFill\"/>\r\n                </Grid>\r\n                <TextBlock Margin=\"12,-2,0,0\" Grid.Column=\"0\" Grid.Row=\"0\" Text=\"{Binding WebPage.SiteName}\" Visibility=\"{Binding WebPage.SiteNameVisibility}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" FontWeight=\"SemiBold\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                <TextBlock Margin=\"12,-2,0,0\" Grid.Column=\"0\" Grid.Row=\"1\" Text=\"{Binding WebPage.Author}\" Visibility=\"{Binding WebPage.AuthorVisibility}\" TextTrimming=\"WordEllipsis\" TextWrapping=\"Wrap\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                <TextBlock Margin=\"12,-2,0,0\" Grid.Column=\"0\" Grid.Row=\"2\" Text=\"{Binding WebPage.Title}\" Visibility=\"{Binding WebPage.TitleVisibility}\" TextTrimming=\"WordEllipsis\" TextWrapping=\"Wrap\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                <emojiPanel:TelegramRichTextBox Margin=\"0,-2,0,0\" Grid.Column=\"0\" Grid.Row=\"3\" Text=\"{Binding WebPage.Description}\" Visibility=\"{Binding WebPage.DescriptionVisibility}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\" />\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"WebPagePhotoMediaTemplate\">\r\n        <Grid Margin=\"0,3,0,1\" Width=\"311\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" >\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <TextBlock Margin=\"12,-2,0,0\" Grid.Row=\"0\" TextWrapping=\"NoWrap\" Text=\"{Binding WebPage.SiteName}\" Visibility=\"{Binding WebPage.SiteNameVisibility}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" FontWeight=\"SemiBold\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                <TextBlock Margin=\"12,-2,0,0\" Grid.Row=\"1\" TextWrapping=\"NoWrap\" Text=\"{Binding WebPage.Author}\" Visibility=\"{Binding WebPage.AuthorVisibility}\" TextTrimming=\"WordEllipsis\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                <TextBlock Margin=\"12,-2,0,0\" Grid.Row=\"2\" TextWrapping=\"Wrap\" Text=\"{Binding WebPage.Title}\" Visibility=\"{Binding WebPage.TitleVisibility}\" TextTrimming=\"WordEllipsis\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                <emojiPanel:TelegramRichTextBox Margin=\"0,-2,0,0\" Grid.Row=\"3\" Text=\"{Binding WebPage.Description}\" Visibility=\"{Binding WebPage.DescriptionVisibility}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\" />\r\n\r\n                <Grid Margin=\"12,6,0,0\" Grid.Row=\"4\" Width=\"{Binding ConverterParameter=Width, Converter={StaticResource WebPageToDimensionConverter}}\"\r\n\t\t\t        Height=\"{Binding ConverterParameter=Height, Converter={StaticResource WebPageToDimensionConverter}}\" MaxHeight=\"250\">\r\n                    <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                    <Image Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=90}\" Stretch=\"UniformToFill\"/>\r\n                    <Image Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n\r\n                    <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Visibility=\"{Binding WebPage.Type, Converter={StaticResource StringEqualsToVisibilityConverter}, ConverterParameter=video}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Image VerticalAlignment=\"Center\"\r\n\t\t\t\t\t        Width=\"48\" Height=\"48\" Margin=\"-4,3,-4,0\"\r\n\t\t\t\t\t        Source=\"/Images/Audio/appbar.transport.play.rest.png\"/>\r\n                        <TextBlock Grid.Column=\"1\"\r\n\t\t\t\t\t        VerticalAlignment=\"Center\" Margin=\"0\"\r\n\t\t\t\t\t        Text=\"{Binding WebPage.DurationString}\"\r\n\t\t\t\t\t        Foreground=\"White\"\r\n\t\t\t\t\t        Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"WebPageMediaTemplate\">\r\n        <Grid Margin=\"0,3,0,0\" Width=\"311\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" >\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <TextBlock Margin=\"12,-2,0,0\" Text=\"{Binding WebPage.SiteName}\" Visibility=\"{Binding WebPage.SiteNameVisibility}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" FontWeight=\"SemiBold\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                <TextBlock Margin=\"12,-2,0,0\" Grid.Row=\"1\" TextWrapping=\"Wrap\" Text=\"{Binding WebPage.Author}\" Visibility=\"{Binding WebPage.AuthorVisibility}\" TextTrimming=\"WordEllipsis\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                <TextBlock Margin=\"12,-2,0,0\" Grid.Row=\"2\" TextWrapping=\"Wrap\" Text=\"{Binding WebPage.Title}\" Visibility=\"{Binding WebPage.TitleVisibility}\" TextTrimming=\"WordEllipsis\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n                <emojiPanel:TelegramRichTextBox Margin=\"0,-2,0,0\" Grid.Row=\"3\" Text=\"{Binding WebPage.Description}\" Visibility=\"{Binding WebPage.DescriptionVisibility}\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"{StaticResource PhoneFontSizeSmall}\"/>\r\n\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"WebPagePendingMediaTemplate\">\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Height=\"46\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" >\r\n                <TextBlock Margin=\"12,-2,0,0\" VerticalAlignment=\"Center\" TextWrapping=\"NoWrap\" Text=\"{Binding Resources.GettingLinkInfo, Source={StaticResource Strings}}\" TextTrimming=\"WordEllipsis\" Foreground=\"White\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"MediaEmptyTemplate\"/>\r\n\r\n    <DataTemplate x:Key=\"ContactTemplate\">\r\n        <Grid Margin=\"0,6\" MaxWidth=\"311\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <views:ConversationTileControl Size=\"64\" \r\n                Margin=\"0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                Source=\"{Binding User.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                Fill=\"{Binding User.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                Text=\"{Binding User, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"16,0,0,0\" TextWrapping=\"NoWrap\" TextTrimming=\"WordEllipsis\" VerticalAlignment=\"Bottom\" Text=\"{Binding}\" FontWeight=\"SemiBold\" FontSize=\"20\" MaxHeight=\"27\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Margin=\"16,0,0,0\" TextWrapping=\"NoWrap\" TextTrimming=\"WordEllipsis\" VerticalAlignment=\"Top\" Text=\"{Binding PhoneNumber, Converter={StaticResource SimplePhoneNumberConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PhoneContactTemplate\">\r\n        <Grid Margin=\"0,6\" Width=\"311\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <views:ConversationTileControl Size=\"64\" \r\n                Margin=\"0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                Source=\"{Binding User.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                Fill=\"{Binding User.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                Text=\"{Binding User, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"16,0,0,0\" TextWrapping=\"NoWrap\" TextTrimming=\"WordEllipsis\" VerticalAlignment=\"Bottom\" Text=\"{Binding}\" FontWeight=\"SemiBold\" FontSize=\"20\" MaxHeight=\"27\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Margin=\"16,0,0,0\" TextWrapping=\"NoWrap\" TextTrimming=\"WordEllipsis\" VerticalAlignment=\"Top\" Text=\"{Binding PhoneNumber, Converter={StaticResource SimplePhoneNumberConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n\r\n            <Button Grid.Column=\"0\" Grid.Row=\"2\" Grid.ColumnSpan=\"2\" FontSize=\"17.774\" BorderThickness=\"1\" Content=\"{Binding Resources.ViewContact, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Margin=\"-12,0,-12,-12\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"CallTemplate\">\r\n        <Grid Margin=\"0,0,0,6\" Width=\"284\" Background=\"Transparent\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <TextBlock Grid.Column=\"0\" Grid.Row=\"0\" Margin=\"0,0,18,0\" TextTrimming=\"WordEllipsis\" Text=\"{Binding Converter={StaticResource PhoneCallToTitleConverter}}\" FontWeight=\"SemiBold\" FontSize=\"20\"/>\r\n                <TextBlock Grid.Column=\"0\" Grid.Row=\"1\" Margin=\"0,0,18,0\" Text=\"{Binding Converter={StaticResource PhoneCallToSubtitleConverter}}\" TextTrimming=\"WordEllipsis\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n\r\n                <Image\r\n                    Grid.Column=\"1\"\r\n                    Grid.RowSpan=\"2\"\r\n                    Margin=\"0\"\r\n                    Width=\"40\" Height=\"40\"\r\n                    Source=\"/Images/W10M/ic_call_answer_blue_2x.png\"/>\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"DocumentTemplate\">\r\n        <Grid Margin=\"0,6,0,12\" Width=\"{Binding ConverterParameter=Width, Converter={StaticResource DocumentToDimensionConverter}}\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <dialogs:DocumentTileControl \r\n                    Grid.RowSpan=\"2\" \r\n                    Width=\"64\" Height=\"64\"\r\n                    DownloadIconVisibility=\"{Binding Self, Converter={StaticResource DownloadMediaToVisibilityConverter}}\"\r\n                    Text=\"{Binding Document.FileExt, Converter={StaticResource Lowercase}}\"\r\n                    Source=\"{Binding Document, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                    Music=\"{Binding Document.Music}\"\r\n                    DownloadingProgress=\"{Binding DownloadingProgress}\"\r\n                    UploadingProgress=\"{Binding UploadingProgress}\"/>\r\n\r\n                <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,6,0\" TextTrimming=\"WordEllipsis\" Text=\"{Binding Document.DocumentName, Converter={StaticResource NonBreakingStringConverter}}\" FontWeight=\"SemiBold\" FontSize=\"20\"/>\r\n                <TextBlock Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"18,0,6,0\" Text=\"{Binding Document.Size.Value, Converter={StaticResource FileSizeConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n\r\n                <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Background=\"Transparent\"\r\n\t\t\t\t    Visibility=\"{Binding DownloadingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\">\r\n                    <i:Interaction.Triggers>\r\n                        <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                            <micro:ActionMessage MethodName=\"CancelDocumentDownloading\">\r\n                                <micro:ActionMessage.Parameters>\r\n                                    <micro:Parameter Value=\"{Binding}\"/>\r\n                                </micro:ActionMessage.Parameters>\r\n                            </micro:ActionMessage>\r\n                        </behaviors:HandledEventTrigger>\r\n                    </i:Interaction.Triggers>\r\n                </Grid>\r\n\r\n                <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Background=\"Transparent\"\r\n\t\t\t\t    Visibility=\"{Binding UploadingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\">\r\n                    <i:Interaction.Triggers>\r\n                        <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                            <micro:ActionMessage MethodName=\"CancelUploading\">\r\n                                <micro:ActionMessage.Parameters>\r\n                                    <micro:Parameter Value=\"{Binding}\"/>\r\n                                </micro:ActionMessage.Parameters>\r\n                            </micro:ActionMessage>\r\n                        </behaviors:HandledEventTrigger>\r\n                    </i:Interaction.Triggers>\r\n                </Grid>\r\n            </Grid>\r\n\r\n            <emojiPanel:TelegramRichTextBox\r\n                Grid.Row=\"1\"\r\n                MaxWidth=\"335\"\r\n                Margin=\"-6,0\"\r\n                MaxHeight=\"400\"\r\n                Visibility=\"{Binding Caption, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\"\r\n                Text=\"{Binding Caption}\"\r\n                HorizontalAlignment=\"Stretch\"\r\n                Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"\r\n                TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"GifTemplate\">\r\n        <Grid Margin=\"-10,-4,-10,2\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <additional:GifPlayerControl\r\n                Width=\"{Binding Document, ConverterParameter=Width, Converter={StaticResource GifToDimensionConverter}}\"\r\n                Height=\"{Binding Document, ConverterParameter=Height, Converter={StaticResource GifToDimensionConverter}}\"\r\n                Media=\"{Binding ThumbSelf}\"\r\n                Progress=\"{Binding DownloadingProgress}\"\r\n                UploadingProgress=\"{Binding UploadingProgress}\"\r\n                micro:Message.Attach=\"[Event CancelDownload] = [Action CancelDocumentDownloading($DataContext)]\"/>\r\n\r\n            <!--<TextBlock Text=\"{Binding UploadingProgress}\"/>-->\r\n            <emojiPanel:TelegramRichTextBox\r\n                Grid.Row=\"1\"\r\n                Width=\"335\"\r\n                Margin=\"-6,0\"\r\n                MaxHeight=\"400\"\r\n                Visibility=\"{Binding Caption, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\"\r\n                Text=\"{Binding Caption}\"\r\n                HorizontalAlignment=\"Stretch\"\r\n                Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"\r\n                TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n\r\n            <!--<controls:Progress Value=\"{Binding DownloadingProgress}\" CancelVisibility=\"Collapsed\" Width=\"48\" Height=\"48\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>-->\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"AudioTemplate\">\r\n        <Grid Margin=\"0,6,0,12\" Width=\"284\">\r\n            <controls:MessagePlayerControl \r\n                ManipulationStarted=\"HandledManipulationStarted\"\r\n                Margin=\"0,0,0,1\" \r\n                Media=\"{Binding ThumbSelf}\"\r\n                Waveform=\"{Binding Waveform}\"\r\n                Progress=\"{Binding DownloadingProgress}\"\r\n                UploadingProgress=\"{Binding UploadingProgress}\"\r\n                NotListened=\"{Binding NotListened}\"\r\n                micro:Message.Attach=\"[Event CancelDownload] = [Action CancelAudioDownloading($DataContext)]\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"SecretPhotoTemplate\">\r\n        <Grid Margin=\"-10,-4,-10,2\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <Grid Width=\"256\" Height=\"256\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <Grid Grid.Row=\"1\" Width=\"256\" Height=\"256\" Background=\"#66000000\">\r\n                    <Image Source=\"{Binding Self, Converter={StaticResource ForcePhotoConverter}}\" Opacity=\"0\" Stretch=\"UniformToFill\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Margin=\"1\"/>\r\n                    <Image Source=\"{Binding ThumbSelf, Converter={StaticResource SecretPhotoToThumbConverter}}\" Stretch=\"UniformToFill\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n                    <controls:SecretPhotoPlaceholder\r\n                        Width=\"256\" Height=\"256\" \r\n                        ShowHint=\"False\"\r\n                        TTLParams=\"{Binding TTLParams}\"\r\n                        DownloadingProgress=\"{Binding DownloadingProgress}\"\r\n                        UploadingProgress=\"{Binding UploadingProgress}\"\r\n                        micro:Message.Attach=\"[Event CancelUploading] = [Action CancelUploading($DataContext)]; [Event CancelDownloading] = [Action CancelPhotoDownloading($DataContext)]\"/>\r\n\r\n                    <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Margin=\"4\" Background=\"#7F000000\">\r\n                        <TextBlock Margin=\"6,1,6,2\"\r\n\t\t\t\t\t        Text=\"{Binding TTLSeconds, Converter={StaticResource TTLMediaToTimerStringConverter}}\"\r\n\t\t\t\t\t        Foreground=\"White\"\r\n\t\t\t\t\t        FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </Grid>\r\n\r\n            <emojiPanel:TelegramRichTextBox\r\n                    Grid.Row=\"1\"\r\n                    Width=\"256\"\r\n                    Margin=\"-6,0\"\r\n                    MaxHeight=\"400\"\r\n                    Visibility=\"{Binding Caption, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\"\r\n                    Text=\"{Binding Caption}\"\r\n                    HorizontalAlignment=\"Stretch\"\r\n                    Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"\r\n                    TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                    FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                    Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PhotoTemplate\">\r\n        <Grid Margin=\"-10,-4,-10,2\" Width=\"{Binding ConverterParameter=Width, Converter={StaticResource PhotoToDimensionConverter}}\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <controls:MediaPhotoControl\r\n                Height=\"{Binding ConverterParameter=Height, Converter={StaticResource PhotoToDimensionConverter}}\"\r\n                Media=\"{Binding}\"\r\n                Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                PreviewSource=\"{Binding ThumbSelf, Converter={StaticResource PhotoToThumbConverter}}\"              \r\n                DownloadingProgress=\"{Binding DownloadingProgress}\"\r\n                UploadingProgress=\"{Binding UploadingProgress}\"\r\n                micro:Message.Attach=\"[Event CancelUploading] = [Action CancelUploading($DataContext)]; [Event CancelDownloading] = [Action CancelPhotoDownloading($DataContext)]\">\r\n            </controls:MediaPhotoControl>\r\n\r\n            <emojiPanel:TelegramRichTextBox\r\n                Grid.Row=\"1\"\r\n                Margin=\"-6,0\"\r\n                MaxHeight=\"400\"\r\n                Visibility=\"{Binding Caption, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\"\r\n                Text=\"{Binding Caption}\"\r\n                HorizontalAlignment=\"Stretch\"\r\n                Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"\r\n                TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"SecretVideoTemplate\">\r\n        <Grid Margin=\"-10,-4,-10,2\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <Grid Width=\"256\" Height=\"256\" Background=\"#66000000\">\r\n                <Image Source=\"{Binding ThumbSelf, Converter={StaticResource SecretPhotoToThumbConverter}}\" Stretch=\"UniformToFill\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n                <controls:SecretPhotoPlaceholder\r\n                        Width=\"256\" Height=\"256\" \r\n                        ShowHint=\"False\"\r\n                        TTLParams=\"{Binding TTLParams}\"\r\n                        UploadingProgress=\"{Binding UploadingProgress}\"\r\n                        DownloadingProgress=\"{Binding DownloadingProgress}\"\r\n                        micro:Message.Attach=\"[Event CancelUploading] = [Action CancelUploading($DataContext)]; [Event CancelDownloading] = [Action CancelVideoDownloading($DataContext)]\"/>\r\n\r\n                <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Margin=\"4\" Background=\"#7F000000\">\r\n                    <TextBlock Margin=\"6,1,6,2\"\r\n\t\t\t\t\t        Text=\"{Binding TTLSeconds, Converter={StaticResource TTLMediaToTimerStringConverter}}\"\r\n\t\t\t\t\t        Foreground=\"White\"\r\n\t\t\t\t\t        FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"/>\r\n                </Grid>\r\n            </Grid>\r\n\r\n            <emojiPanel:TelegramRichTextBox\r\n                    Grid.Row=\"1\"\r\n                    Width=\"256\"\r\n                    Margin=\"-6,0\"\r\n                    MaxHeight=\"400\"\r\n                    Visibility=\"{Binding Caption, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\"\r\n                    Text=\"{Binding Caption}\"\r\n                    HorizontalAlignment=\"Stretch\"\r\n                    Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"\r\n                    TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                    FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                    Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"VideoTemplate\">\r\n        <Grid Margin=\"-10,-4,-10,2\" >\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <controls:MediaVideoControl\r\n                Width=\"230\" Height=\"154\"\r\n                Source=\"{Binding ThumbSelf, Converter={StaticResource PhotoToThumbConverter}}\"\r\n                DownloadIconVisibility=\"{Binding Self, Converter={StaticResource DownloadMediaToVisibilityConverter}}\"\r\n                DownloadingProgress=\"{Binding DownloadingProgress}\"\r\n                UploadingProgress=\"{Binding UploadingProgress}\"\r\n                micro:Message.Attach=\"[Event CancelUploading] = [Action CancelUploading($DataContext)]; [Event CancelDownloading] = [Action CancelVideoDownloading($DataContext)]\"/>\r\n\r\n            <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Margin=\"4\" Background=\"#7F000000\" IsHitTestVisible=\"False\">\r\n                <StackPanel Margin=\"6,1,6,2\" Orientation=\"Horizontal\">\r\n                    <TextBlock\r\n\t\t\t\t\t        Text=\"{Binding Video.DurationString}\"\r\n\t\t\t\t\t        Foreground=\"White\"\r\n\t\t\t\t\t        FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"/>\r\n                    <TextBlock \r\n                            Text=\"{Binding Video.Size.Value, Converter={StaticResource FileSizeConverter}, StringFormat=', \\{0\\}'}\"\r\n                            Foreground=\"White\" \r\n\t\t\t\t\t        FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"/>\r\n                    <TextBlock Visibility=\"{Binding CompressingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\"\r\n                            Text=\"{Binding CompressingProgress, StringFormat=', \\{0:P\\}'}\"\r\n                            Foreground=\"White\" \r\n\t\t\t\t\t        FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"/>\r\n                </StackPanel>\r\n            </Grid>\r\n\r\n            <emojiPanel:TelegramRichTextBox\r\n                Grid.Row=\"1\"\r\n                Width=\"230\"\r\n                Margin=\"-6,0\"\r\n                MaxHeight=\"400\"\r\n                Visibility=\"{Binding Caption, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\"\r\n                Text=\"{Binding Caption}\"\r\n                HorizontalAlignment=\"Stretch\"\r\n                Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"\r\n                TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"RoundVideoTemplate\">\r\n        <Grid Margin=\"-10,-4,-10,2\" >\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <additional:GifPlayerControl\r\n                Mode=\"RoundVideo\"\r\n                Width=\"240\"\r\n                Height=\"240\"\r\n                Media=\"{Binding ThumbSelf}\"\r\n                Progress=\"{Binding DownloadingProgress}\"\r\n                UploadingProgress=\"{Binding UploadingProgress}\"\r\n                micro:Message.Attach=\"[Event CancelDownload] = [Action CancelDocumentDownloading($DataContext)]\">\r\n                <additional:GifPlayerControl.FrameClip>\r\n                    <EllipseGeometry x:Name=\"ImageClipGeometry\" Center=\"120,120\" RadiusX=\"120\" RadiusY=\"120\"/>\r\n                </additional:GifPlayerControl.FrameClip>\r\n            </additional:GifPlayerControl>\r\n\r\n            <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Margin=\"4\" Background=\"#49496A95\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <TextBlock Margin=\"6,-1,6,2\"\r\n\t\t\t\t\t    Text=\"{Binding Video.DurationString}\"\r\n\t\t\t\t\t    Foreground=\"White\"\r\n\t\t\t\t\t    FontSize=\"18\"/>\r\n                <Ellipse x:Name=\"NotListenedIndicator\" Visibility=\"{Binding NotListened, Converter={StaticResource BooleanToVisibilityConverter}}\" Grid.Column=\"1\" Margin=\"0,1,6,2\" Width=\"8\" Height=\"8\" Fill=\"White\"/>\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"LiveGeoPointTemplate\">\r\n        <Grid Width=\"320\" Margin=\"-10,-4,-10,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid Width=\"320\" Height=\"188\" Margin=\"0,0,0,2\">\r\n                <Border Background=\"Black\" Opacity=\"0.4\"/>\r\n                <media:StaticMapControl Source=\"{Binding Self, Converter={StaticResource GeoPointToStaticGoogleMapsConverter3}}\" ManipulationStarted=\"HandledManipulationStarted\"/>\r\n\r\n                <Grid VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                    <Grid.RenderTransform>\r\n                        <TranslateTransform Y=\"-40\"/>\r\n                    </Grid.RenderTransform>\r\n                    <Border Width=\"76\" Height=\"76\" CornerRadius=\"38\" Background=\"#33000000\">\r\n                        <Border.RenderTransform>\r\n                            <CompositeTransform TranslateY=\"1\" TranslateX=\"1\"/>\r\n                        </Border.RenderTransform>\r\n                    </Border>\r\n                    <Border Width=\"36\" Height=\"36\" Background=\"#33000000\" RenderTransformOrigin=\"0.5,0.5\">\r\n                        <Border.RenderTransform>\r\n                            <CompositeTransform TranslateY=\"21\" TranslateX=\"0.5\" Rotation=\"45\"/>\r\n                        </Border.RenderTransform>\r\n                    </Border>\r\n\r\n                    <Border Background=\"#33000000\" Width=\"12\" Height=\"12\" CornerRadius=\"6\">\r\n                        <Border.RenderTransform>\r\n                            <CompositeTransform TranslateY=\"53\" TranslateX=\"1\" />\r\n                        </Border.RenderTransform>\r\n                    </Border>\r\n\r\n                    <Border Background=\"White\" Width=\"76\" Height=\"76\" CornerRadius=\"38\"/>\r\n                    <Border Width=\"36\" Height=\"36\" Background=\"White\" RenderTransformOrigin=\"0.5,0.5\">\r\n                        <Border.RenderTransform>\r\n                            <CompositeTransform TranslateY=\"20\" Rotation=\"45\"/>\r\n                        </Border.RenderTransform>\r\n                    </Border>\r\n                    <views:ConversationTileControl Size=\"72\"\r\n                        Margin=\"3\" Grid.RowSpan=\"2\"\r\n                        Source=\"{Binding From.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding From, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                    <Border BorderThickness=\"2\" BorderBrush=\"White\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" Width=\"12\" Height=\"12\" CornerRadius=\"6\">\r\n                        <Border.RenderTransform>\r\n                            <CompositeTransform TranslateY=\"52\" />\r\n                        </Border.RenderTransform>\r\n                    </Border>\r\n                </Grid>\r\n            </Grid>\r\n\r\n            <Grid Grid.Row=\"1\" Margin=\"10,10,10,12\" Visibility=\"{Binding Active, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n\r\n                <!--<Border Grid.Column=\"0\" Grid.RowSpan=\"2\" Background=\"#FFFF6464\" CornerRadius=\"32\" Width=\"64\" Height=\"64\">\r\n                    <Image Height=\"26\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Source=\"/Images/W10M/ic_livelocation_2x.png\"/>\r\n                </Border>-->\r\n\r\n                <Grid Grid.Column=\"0\" VerticalAlignment=\"Center\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition/>\r\n                        <RowDefinition/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"0,-4,0,0\" Text=\"{Binding Resources.LiveLocation, Source={StaticResource Strings}}\" FontWeight=\"SemiBold\" FontSize=\"20\"/>\r\n                    <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Margin=\"0,0,0,0\" Text=\"{Binding EditDate, Converter={StaticResource EditDateToStringConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                </Grid>\r\n\r\n                <controls:LiveLocationProgress \r\n                    Grid.Column=\"1\"\r\n                    Media=\"{Binding }\"\r\n                    micro:Message.Attach=\"[Event Completed] = [Action LiveLocationCompleted($DataContext)]\">\r\n\r\n                </controls:LiveLocationProgress>\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"GeoPointTemplate\">\r\n        <Grid Margin=\"-10,-4,-10,2\" Width=\"320\" Height=\"188\">\r\n            <Border Background=\"Black\" Opacity=\"0.4\"/>\r\n\r\n            <media:StaticMapControl Source=\"{Binding Self, Converter={StaticResource GeoPointToStaticGoogleMapsConverter3}}\" ManipulationStarted=\"HandledManipulationStarted\"/>\r\n            \r\n            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\">\r\n                <Grid.RenderTransform>\r\n                    <TranslateTransform X=\"0\" Y=\"-20\"/>\r\n                </Grid.RenderTransform>\r\n                <Path Fill=\"#60B0E8\" Data=\"M14,0 C6.26,0 0,6.26 0,14 C0,24.5 14,40 14,40 C14,40 28,24.5 28,14 C28,6.26 21.74,0 14,0 L14,0 Z M14,19 C11.24,19 9,16.76 9,14 C9,11.24 11.24,9 14,9 C16.76,9 19,11.24 19,14 C19,16.76 16.76,19 14,19 L14,19 Z\"/>\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"VenueTemplate\">\r\n        <Grid Width=\"320\" Margin=\"-10,-4,-10,2\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Grid Width=\"96\" Height=\"96\" Margin=\"0\">\r\n                <Border Background=\"Black\" Opacity=\"0.4\"/>\r\n\r\n                <media:StaticMapControl Source=\"{Binding Self, Converter={StaticResource VenueToStaticGoogleMapsConverter2}}\" ManipulationStarted=\"HandledManipulationStarted\"/>\r\n                \r\n                <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\">\r\n                    <Grid.RenderTransform>\r\n                        <TranslateTransform X=\"0\" Y=\"-20\"/>\r\n                    </Grid.RenderTransform>\r\n                    <Path Fill=\"#60B0E8\" Data=\"M14,0 C6.26,0 0,6.26 0,14 C0,24.5 14,40 14,40 C14,40 28,24.5 28,14 C28,6.26 21.74,0 14,0 L14,0 Z M14,19 C11.24,19 9,16.76 9,14 C9,11.24 11.24,9 14,9 C16.76,9 19,11.24 19,14 C19,16.76 16.76,19 14,19 L14,19 Z\"/>\r\n                </Grid>\r\n            </Grid>\r\n\r\n            <Grid Grid.Column=\"1\" Margin=\"0,-2,0,0\"  VerticalAlignment=\"Center\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition/>\r\n                    <RowDefinition/>\r\n                </Grid.RowDefinitions>\r\n                <TextBlock Margin=\"12,0\" TextTrimming=\"WordEllipsis\" Text=\"{Binding Title}\" FontWeight=\"SemiBold\" FontSize=\"20\"/>\r\n                <TextBlock Grid.Row=\"1\" Margin=\"12,0\" Text=\"{Binding Address}\" Visibility=\"{Binding Address, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert}\" TextWrapping=\"NoWrap\" TextTrimming=\"WordEllipsis\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n            </Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"UnsupportedTemplate\">\r\n        <emojiPanel:TelegramRichTextBox \r\n            Margin=\"-12,0,-12,0\"\r\n            Width=\"335\"\r\n            Text=\"{Binding Resources.UnsupportedMedia, Source={StaticResource Strings}}\"\r\n            HorizontalAlignment=\"Stretch\"\r\n            TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n            FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n            Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyServiceTextTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Converter={StaticResource ServiceMessageToTextConverter}, ConverterParameter='nolinksnouser'}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyServicePhotoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Action.Photo, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=100}\" Stretch=\"UniformToFill\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Converter={StaticResource ServiceMessageToTextConverter}, ConverterParameter='nolinksnouser'}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedEmptyTemplate\">\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Height=\"48\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.EmptyMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyEmptyTemplate\">\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Height=\"48\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.EmptyMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardEmptyTemplate\">\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Height=\"48\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.EmptyMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedUnsupportedTemplate\">\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Height=\"48\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.Unsupported, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyUnsupportedTemplate\">\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Height=\"48\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.Unsupported, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditUnsupportedTemplate\">\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Height=\"48\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.Unsupported, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardUnsupportedTemplate\">\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Height=\"48\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.Unsupported, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyLoadingTemplate\">\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Height=\"48\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.Loading, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"WebPageEmptyTemplate\">\r\n        <Grid>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"WebPageTemplate\">\r\n        <Grid Margin=\"0,3,0,1\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding WebPageMedia.WebPage, Converter={StaticResource WebPageToCaptionConverter}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding WebPageMedia.WebPage, Converter={StaticResource WebPageToDescriptionConverter}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"WebPagePendingTemplate\">\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Height=\"48\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.GettingLinkInfo, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardedMessagesTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Converter={StaticResource MessageContainerToFromConverter}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Converter={StaticResource MessageContainerToContentConverter}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyWebPageTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Media.Url}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedTextTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Message}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyTextTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Message}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditTextTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Resources.EditMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Margin=\"0,-6,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Message}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardTextTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Message}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedInvoiceTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Media.Description}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyInvoiceTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Media.Description}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardInvoiceTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Media.Description}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplySecretPhotoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.Photo, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedGameTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}, ConverterParameter=noblur}\" Stretch=\"UniformToFill\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Media.Game.Title}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyGameTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}, ConverterParameter=noblur}\" Stretch=\"UniformToFill\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Media.Game.Title}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardGameTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}, ConverterParameter=noblur}\" Stretch=\"UniformToFill\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Media.Game.Title}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedPhotoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\" Visibility=\"{Binding Media, Converter={StaticResource TTLMediaToVisibilityConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}, ConverterParameter=noblur}\" Stretch=\"UniformToFill\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Photo, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyPhotoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\" Visibility=\"{Binding Media, Converter={StaticResource TTLMediaToVisibilityConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}, ConverterParameter=noblur}\" Stretch=\"UniformToFill\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Photo, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditPhotoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\" Visibility=\"{Binding Media, Converter={StaticResource TTLMediaToVisibilityConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}, ConverterParameter=noblur}\" Stretch=\"UniformToFill\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.EditMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"3\" Grid.Row=\"0\" Margin=\"0,-6,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Photo, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardPhotoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\" Visibility=\"{Binding Media, Converter={StaticResource TTLMediaToVisibilityConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}, ConverterParameter=noblur}\" Stretch=\"UniformToFill\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Photo, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedVideoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\" Visibility=\"{Binding Media, Converter={StaticResource TTLMediaToVisibilityConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Media.Video, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                <Image VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n\t\t\t\t\t    Width=\"48\" Height=\"48\"\r\n\t\t\t\t\t    Source=\"/Images/Audio/appbar.transport.play.rest.png\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Video, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedRoundVideoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\" CornerRadius=\"24\"/>\r\n                <Image Source=\"{Binding Media.Video, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\">\r\n                    <Image.Clip>\r\n                        <EllipseGeometry x:Name=\"ImageClipGeometry\" Center=\"24,24\" RadiusX=\"24\" RadiusY=\"24\"/>\r\n                    </Image.Clip>\r\n                </Image>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.VideoMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyVideoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\" Visibility=\"{Binding Media, Converter={StaticResource TTLMediaToVisibilityConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Media.Video, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                <Image VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n\t\t\t\t\t    Width=\"48\" Height=\"48\"\r\n\t\t\t\t\t    Source=\"/Images/Audio/appbar.transport.play.rest.png\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Video, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyRoundVideoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\" Visibility=\"{Binding Media, Converter={StaticResource TTLMediaToVisibilityConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\" CornerRadius=\"24\"/>\r\n                <Image Source=\"{Binding Media.Video, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\">\r\n                    <Image.Clip>\r\n                        <EllipseGeometry x:Name=\"ImageClipGeometry\" Center=\"24,24\" RadiusX=\"24\" RadiusY=\"24\"/>\r\n                    </Image.Clip>\r\n                </Image>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.VideoMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditVideoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\" Visibility=\"{Binding Media, Converter={StaticResource TTLMediaToVisibilityConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Media.Video, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                <Image VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n\t\t\t\t\t    Width=\"48\" Height=\"48\"\r\n\t\t\t\t\t    Source=\"/Images/Audio/appbar.transport.play.rest.png\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.EditMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"3\" Grid.Row=\"0\" Margin=\"0,-6,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Video, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditRoundVideoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\" Visibility=\"{Binding Media, Converter={StaticResource TTLMediaToVisibilityConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\" CornerRadius=\"24\"/>\r\n                <Image Source=\"{Binding Media.Video, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\">\r\n                    <Image.Clip>\r\n                        <EllipseGeometry x:Name=\"ImageClipGeometry\" Center=\"24,24\" RadiusX=\"24\" RadiusY=\"24\"/>\r\n                    </Image.Clip>\r\n                </Image>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.EditMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"3\" Grid.Row=\"0\" Margin=\"0,-6,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.VideoMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardVideoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\" Visibility=\"{Binding Media, Converter={StaticResource TTLMediaToVisibilityConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Media.Video, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                <Image VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n\t\t\t\t\t    Width=\"48\" Height=\"48\"\r\n\t\t\t\t\t    Source=\"/Images/Audio/appbar.transport.play.rest.png\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Video, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardRoundVideoTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" VerticalAlignment=\"Bottom\" Visibility=\"{Binding Media, Converter={StaticResource TTLMediaToVisibilityConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\" CornerRadius=\"24\"/>\r\n                <Image Source=\"{Binding Media.Video, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\">\r\n                    <Image.Clip>\r\n                        <EllipseGeometry x:Name=\"ImageClipGeometry\" Center=\"24,24\" RadiusX=\"24\" RadiusY=\"24\"/>\r\n                    </Image.Clip>\r\n                </Image>\r\n            </Grid>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Video, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedContactTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.Contact, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyContactTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.Contact, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditContactTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Margin=\"0,-6,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Contact, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardContactTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.Contact, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedLiveGeoPointTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.LiveLocation, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyLiveGeoPointTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.LiveLocation, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditLiveGeoPointTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.EditMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"3\" Grid.Row=\"0\" Margin=\"0,-6,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.LiveLocation, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardLiveGeoPointTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.LiveLocation, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedGeoPointTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.GeoPoint, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyGeoPointTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.GeoPoint, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditGeoPointTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.EditMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"3\" Grid.Row=\"0\" Margin=\"0,-6,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.GeoPoint, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardGeoPointTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.GeoPoint, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedDocumentTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <!--<Image Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" Source=\"/Images/Messages/chat_doc-WXGA.png\" Stretch=\"Uniform\" VerticalAlignment=\"Bottom\"/>-->\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Media, Converter={StaticResource FileNameConverter}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyDocumentTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <!--<Image Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" Source=\"/Images/Messages/chat_doc-WXGA.png\" Stretch=\"Uniform\" VerticalAlignment=\"Bottom\"/>-->\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Media, Converter={StaticResource FileNameConverter}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditDocumentTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <!--<Image Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" Source=\"/Images/Messages/chat_doc-WXGA.png\" Stretch=\"Uniform\" VerticalAlignment=\"Bottom\"/>-->\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.EditMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"3\" Grid.Row=\"0\" Margin=\"0,-2,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Media, Converter={StaticResource FileNameConverter}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardDocumentTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <!--<Image Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" Source=\"/Images/Messages/chat_doc-WXGA.png\" Stretch=\"Uniform\" VerticalAlignment=\"Bottom\"/>-->\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Media, Converter={StaticResource FileNameConverter}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedGifTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <!--<Image Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" Source=\"/Images/Messages/chat_doc-WXGA.png\" Stretch=\"Uniform\" VerticalAlignment=\"Bottom\"/>-->\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Gif, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyGifTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <!--<Image Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" Source=\"/Images/Messages/chat_doc-WXGA.png\" Stretch=\"Uniform\" VerticalAlignment=\"Bottom\"/>-->\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Gif, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditGifTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <!--<Image Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" Source=\"/Images/Messages/chat_doc-WXGA.png\" Stretch=\"Uniform\" VerticalAlignment=\"Bottom\"/>-->\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Resources.EditMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"3\" Grid.Row=\"0\" Margin=\"0,-2,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Gif, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardGifTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <!--<Image Grid.Column=\"1\" Grid.RowSpan=\"2\" Width=\"48\" Height=\"48\" Margin=\"10,-6,0,0\" Source=\"/Images/Messages/chat_doc-WXGA.png\" Stretch=\"Uniform\" VerticalAlignment=\"Bottom\"/>-->\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Gif, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedAudioTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.Audio, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyAudioTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.Audio, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditAudioTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Resources.EditMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Margin=\"0,-6,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Audio, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardAudioTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.Audio, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedVoiceMessageTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.VoiceMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyVoiceMessageTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.VoiceMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditVoiceMessageTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Resources.EditMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Margin=\"0,-6,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.VoiceMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardVoiceMessageTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.VoiceMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedStickerTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.Sticker, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ReplyStickerTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.Sticker, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"EditStickerTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Resources.EditMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Margin=\"0,-6,0,0\" Text=\"{Binding EditTimerString, StringFormat=' \\{0\\}'}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" Text=\"{Binding Resources.Sticker, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"ForwardStickerTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding From.FullName2}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.Sticker, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n\r\n    <DataTemplate x:Key=\"PinnedClearHistoryTemplate\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width =\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border Grid.RowSpan=\"2\" Width=\"4\" Margin=\"0\" BorderThickness=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Resources.PinnedMessage, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Text=\"{Binding Resources.MessageActionClearHistory, Source={StaticResource Strings}}\" Style=\"{StaticResource ReplyBodyStyle}\"/>\r\n        </Grid>\r\n    </DataTemplate>\r\n</ResourceDictionary>\r\n\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "TelegramClient/Themes/Default/Templates/Media.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.Location;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Views.Controls;\r\n\r\nnamespace TelegramClient.Themes.Default.Templates\r\n{\r\n    public partial class Media : ResourceDictionary\r\n    {\r\n        public Media() \r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void Grid_Tap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void HandledManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void LiveLocationProgress_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            var liveLocationProgress = sender as LiveLocationProgress;\r\n            if (liveLocationProgress != null)\r\n            {\r\n                var messageMediaGeoLive = liveLocationProgress.Media as TLMessageMediaGeoLive;\r\n                if (messageMediaGeoLive != null)\r\n                {\r\n                    messageMediaGeoLive.Period.Value = 0;\r\n                    messageMediaGeoLive.NotifyOfPropertyChange(() => messageMediaGeoLive.Active);\r\n\r\n                    var liveLocationService = IoC.Get<ILiveLocationService>();\r\n\r\n                    liveLocationService.UpdateAll();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Themes/Default/TextBlock.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\">\r\n    \r\n    <Style x:Key=\"ApplicationTitleStyle\" TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextBlockBase}\">\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\"/>\r\n        <Setter Property=\"FontSize\" Value=\"23\"/>\r\n        <Setter Property=\"MaxHeight\" Value=\"31\"/>\r\n        <Setter Property=\"Margin\" Value=\"6,3,0,0\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"PhoneTextTelegramTitle1Style\" TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextTitle1Style}\">\r\n        <Setter Property=\"FontSize\" Value=\"54\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"MessageBodyTextStyle\" TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextBlockBase}\">\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiLight}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"24\"/>\r\n        <Setter Property=\"TextWrapping\" Value=\"Wrap\"/>\r\n        <Setter Property=\"Foreground\" Value=\"White\"/>\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"MessageBodyScrollableTextStyle\" TargetType=\"controls:ScrollableTextBlock\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"24\"/>\r\n        <Setter Property=\"Foreground\" Value=\"White\"/>\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"InfiniteMessageBodyTelegramRichTextStyle\" TargetType=\"emojiPanel:TelegramRichTextBox\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n        <Setter Property=\"TextScaleFactor\" Value=\"1\"/>\r\n        <Setter Property=\"Margin\" Value=\"12,0\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"MessageBodyTelegramRichTextStyle\" TargetType=\"emojiPanel:TelegramRichTextBox\" BasedOn=\"{StaticResource InfiniteMessageBodyTelegramRichTextStyle}\">\r\n        <Setter Property=\"MaxHeight\" Value=\"1500\"/>\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n    </Style>\r\n</ResourceDictionary>\r\n\r\n\r\n"
  },
  {
    "path": "TelegramClient/Themes/Default/TextBox.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n                    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n                    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n                    mc:Ignorable=\"d\">\r\n\t<ControlTemplate x:Key=\"PhoneDisabledTextBoxTemplate\" TargetType=\"TextBox\">\r\n\t\t<ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n\t</ControlTemplate>\r\n\r\n    <SolidColorBrush x:Key=\"HiddenCaretBrush\" Color=\"{StaticResource PhoneForegroundColor}\"/>\r\n\r\n    <Style x:Key=\"HiddenSmallTextBoxStyle\" TargetType=\"TextBox\">\r\n        <Setter Property=\"CaretBrush\" Value=\"{StaticResource HiddenCaretBrush}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"SelectionBackground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n        <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"Padding\" Value=\"12,0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBorderBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"0\">\r\n                            <ContentControl x:Name=\"ContentElement\" Content=\"|Test\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"HiddenTextBoxStyle\" TargetType=\"TextBox\">\r\n        <Setter Property=\"CaretBrush\" Value=\"{StaticResource HiddenCaretBrush}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"SelectionBackground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n        <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"Padding\" Value=\"12,0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledOrReadonlyContent\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBorderBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <ContentControl x:Name=\"ContentElement\" Content=\"|Test\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledOrReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                            <TextBox x:Name=\"DisabledOrReadonlyContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\" FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" IsReadOnly=\"True\" SelectionForeground=\"{TemplateBinding SelectionForeground}\" SelectionBackground=\"{TemplateBinding SelectionBackground}\" TextAlignment=\"{TemplateBinding TextAlignment}\" TextWrapping=\"{TemplateBinding TextWrapping}\" Text=\"{TemplateBinding Text}\" Template=\"{StaticResource PhoneDisabledTextBoxTemplate}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"MessageTextBoxStyle\"  TargetType=\"controls:WatermarkedTextBox\">\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n        <Setter Property=\"SelectionBackground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n        <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"Padding\" Value=\"11,2\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"controls:WatermarkedTextBox\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder2\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder2\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledOrReadonlyContent\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"White\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder2\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"White\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder2\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBorderBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"EnableBorderCorner\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBorderBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"EnableBorderCorner\" Storyboard.TargetProperty=\"Fill\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ValidationStates\">\r\n                                <VisualState x:Name=\"InvalidFocused\"/>\r\n                                <VisualState x:Name=\"Valid\"/>\r\n                                <VisualState x:Name=\"InvalidUnfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid>\r\n                            <Border x:Name=\"EnabledBorder\" \r\n                                BorderBrush=\"{TemplateBinding BorderBrush}\" \r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\" \r\n                                Background=\"{TemplateBinding Background}\" \r\n                                Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <Grid>\r\n                                    <Border Background=\"Transparent\" x:Name=\"WatermarkInlineContentBorder\">\r\n                                        <ContentControl \r\n                                        x:Name=\"WatermarkInlineContent\"\r\n                                        Margin=\"0,4\" VerticalAlignment=\"Top\"\r\n                                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                        Foreground=\"{TemplateBinding WatermarkForeground}\" \r\n                                        Style=\"{TemplateBinding WatermarkStyle}\" \r\n                                        Content=\"{TemplateBinding InlineWatermark}\" \r\n                                        Background=\"Transparent\" Opacity=\"0.5\"/>\r\n                                    </Border>\r\n                                    <ContentControl \r\n                                    x:Name=\"WatermarkContent\" \r\n                                    Margin=\"12,4\" \r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                    Foreground=\"{TemplateBinding WatermarkForeground}\" \r\n                                    Style=\"{TemplateBinding WatermarkStyle}\" \r\n                                    Content=\"{TemplateBinding Watermark}\" \r\n                                    Background=\"Transparent\" Opacity=\"0.5\"/>\r\n                                    <ScrollViewer \r\n                                    x:Name=\"ContentElement\"\r\n                                    BorderThickness=\"0\" \r\n                                    HorizontalContentAlignment=\"Stretch\" \r\n                                    Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" \r\n                                    Padding=\"{TemplateBinding Padding}\" \r\n                                    VerticalContentAlignment=\"Stretch\"/>\r\n                                </Grid>\r\n                            </Border>\r\n                            <Border \r\n                                x:Name=\"EnabledBorder2\"\r\n                                HorizontalAlignment=\"Stretch\" \r\n                                VerticalAlignment=\"Stretch\" \r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\" \r\n                                BorderBrush=\"Transparent\"\r\n                                Margin=\"{StaticResource PhoneTouchTargetOverhang}\"/>\r\n                        </Grid>\r\n\r\n                        <!--<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\"/>-->\r\n                        <!--Start Bottom corner-->\r\n\r\n                        <Path x:Name=\"EnableBorderCorner\" HorizontalAlignment=\"Right\" Margin=\"0,0,24,0\" VerticalAlignment=\"Bottom\" Data=\"F1 M0,0 L1,1 L1,0\" Width=\"12\" Height=\"12\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\"/>\r\n\r\n                        <!--End Bottom corner-->\r\n                        <Border x:Name=\"DisabledOrReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                            <TextBox x:Name=\"DisabledOrReadonlyContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\"\r\n\t\t\t\t\t\t\t\tFontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontSize=\"{TemplateBinding FontSize}\"\r\n\t\t\t\t\t\t\t\tFontFamily=\"{TemplateBinding FontFamily}\" IsReadOnly=\"True\" SelectionForeground=\"{TemplateBinding SelectionForeground}\" \r\n\t\t\t\t\t\t\t\tSelectionBackground=\"{TemplateBinding SelectionBackground}\" TextAlignment=\"{TemplateBinding TextAlignment}\" \r\n\t\t\t\t\t\t\t\tTextWrapping=\"{TemplateBinding TextWrapping}\" Text=\"{TemplateBinding Text}\" Template=\"{StaticResource PhoneDisabledTextBoxTemplate}\" />\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "TelegramClient/Themes/Default/Theme.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:res=\"using:TelegramClient.Themes.Default.Templates\"\r\n    xmlns:templates=\"clr-namespace:TelegramClient.Themes.Default.Templates\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\">\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary />\r\n        <ResourceDictionary Source=\"Transitions.xaml\"/>\r\n        <ResourceDictionary Source=\"ScrollViewer.xaml\"/>\r\n        <ResourceDictionary Source=\"CheckBox.xaml\"/>\r\n        <ResourceDictionary Source=\"ListBox.xaml\"/>\r\n        <ResourceDictionary Source=\"LongListSelector.xaml\"/>\r\n        <ResourceDictionary Source=\"Button.xaml\"/>\r\n        <ResourceDictionary Source=\"TextBox.xaml\"/>\r\n        <ResourceDictionary Source=\"TextBlock.xaml\"/>\r\n        <ResourceDictionary Source=\"Slider.xaml\"/>\r\n        <ResourceDictionary Source=\"ToggleButton.xaml\"/>\r\n        <ResourceDictionary Source=\"ToggleSwitch.xaml\"/>\r\n        <templates:Media/>\r\n        <ResourceDictionary Source=\"Templates\\ItemsPanel.xaml\"/>\r\n        <ResourceDictionary Source=\"Templates\\DataTemplates.xaml\"/>\r\n        <ResourceDictionary Source=\"W10M.xaml\"/>\r\n    </ResourceDictionary.MergedDictionaries>\r\n\r\n    <DataTemplate x:Key=\"FullHDPivotHeaderTemplate\">\r\n        <TextBlock Text=\"{Binding DisplayName, Converter={StaticResource Uppercase}}\" Margin=\"-4,10,0,30\" FontSize=\"23\" FontFamily=\"Segoe WP Bold\"/>\r\n    </DataTemplate>\r\n</ResourceDictionary>\r\n\r\n\r\n"
  },
  {
    "path": "TelegramClient/Themes/Default/ToggleButton.xaml",
    "content": "﻿<ResourceDictionary\r\n\txmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n\txmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n\txmlns:toolkitPrimitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit\">\r\n\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"Button.xaml\"/>\r\n    </ResourceDictionary.MergedDictionaries>\r\n\r\n    <Style x:Key=\"DialogPlayerToggleButtonStyle\" BasedOn=\"{StaticResource PhoneButtonBase}\" TargetType=\"ToggleButton\">\r\n        <Setter Property=\"FlowDirection\" Value=\"LeftToRight\"/>\r\n\t\t<Setter Property=\"Padding\" Value=\"0\"/>\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FFFFFFFF\"/>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ToggleButton\">\r\n\t\t\t\t\t<Grid Background=\"Transparent\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\"/>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Collapsed</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"Play\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"Pause\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Collapsed</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"Download\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                    </Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledContent\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"Pause\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"Play\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Collapsed</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"Download\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                    </Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"Play\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Collapsed</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"Pause\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Collapsed</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"Download\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                    </Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"EnabledBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\">\r\n                            <Grid Width=\"64\" Height=\"64\">\r\n                                <Path x:Name=\"Play\" Fill=\"{TemplateBinding Foreground}\" Data=\"F1 M0,0 L0,30 L23,15\" Margin=\"7,0,0,0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                                <Path x:Name=\"Pause\" Fill=\"{TemplateBinding Foreground}\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                                    <Path.Data>\r\n                                        <GeometryGroup FillRule=\"Nonzero\">\r\n                                            <RectangleGeometry Rect=\"0,0,8,24\"/>\r\n                                            <RectangleGeometry Rect=\"16,0,8,24\"/>\r\n                                        </GeometryGroup>\r\n                                    </Path.Data>\r\n                                </Path>\r\n                                <ContentControl x:Name=\"EnabledContent\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Border x:Name=\"DisabledBackground\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\">\r\n                            <Grid Width=\"64\" Height=\"64\">\r\n                                <!--<Image x:Name=\"Download\" Source=\"/Images/Audio/appbar.download.rest.png\" />-->\r\n                                <Grid x:Name=\"Download\">\r\n                                    <Rectangle Width=\"4\" Height=\"24\" Fill=\"White\"/>\r\n                                    <Polyline StrokeThickness=\"3.5\" Stroke=\"White\" Margin=\"1,0,0,0\" Points=\"0 15 10 25 20 15\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                                </Grid>\r\n                                <ContentControl x:Name=\"DisabledContent\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{StaticResource PhoneDisabledBrush}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Grid>\r\n                        </Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\t<!-- Resource dictionary entries should be defined here. -->\r\n</ResourceDictionary>"
  },
  {
    "path": "TelegramClient/Themes/Default/ToggleSwitch.xaml",
    "content": "﻿<ResourceDictionary\r\n\txmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n\txmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "TelegramClient/Themes/Default/Transitions.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:notifications=\"clr-namespace:Telegram.Controls.Notifications;assembly=Telegram.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\">\r\n\r\n    <Style TargetType=\"controls:TransitionFrame\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"controls:TransitionFrame\">\r\n                    <Border x:Name=\"ClientArea\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Margin=\"{TemplateBinding Margin}\">\r\n                        <Grid>\r\n                            <ContentPresenter x:Name=\"FirstContentPresenter\" Opacity=\"0.5\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            <ContentPresenter x:Name=\"SecondContentPresenter\" Opacity=\"0.5\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"  VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"controls:TelegramTransitionFrame\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"controls:TelegramTransitionFrame\">\r\n                    <Border x:Name=\"ClientArea\" IsHitTestVisible=\"True\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Margin=\"{TemplateBinding Margin}\">\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <MediaElement x:Name=\"Element\" Grid.RowSpan=\"2\" AutoPlay=\"False\" Visibility=\"Collapsed\"/>\r\n\r\n                            <ContentControl Grid.Row=\"0\" x:Name=\"CallPlaceholder\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n                            <ContentPresenter Grid.Row=\"1\" x:Name=\"FirstContentPresenter\" Opacity=\"0.5\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            <ContentPresenter Grid.Row=\"1\" x:Name=\"SecondContentPresenter\" Opacity=\"0.5\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"  VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n\r\n                            <Border Grid.RowSpan=\"2\" x:Name=\"BlockingProgress\" Visibility=\"Collapsed\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.7\"/>\r\n                            <StackPanel Grid.RowSpan=\"2\" x:Name=\"BlockingPanel\" Visibility=\"Collapsed\" VerticalAlignment=\"Center\">\r\n                                <ProgressBar IsIndeterminate=\"True\"/>\r\n                                <TextBlock x:Name=\"ProgressText\" HorizontalAlignment=\"Center\" Text=\"{TemplateBinding Title}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                            </StackPanel>\r\n\r\n                            <Border Grid.RowSpan=\"2\" x:Name=\"Player\" Visibility=\"Collapsed\" UseOptimizedManipulationRouting=\"False\" Margin=\"0,200,0,0\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Top\" CacheMode=\"BitmapCache\" CornerRadius=\"80\" Width=\"160\" Height=\"160\"/>\r\n\r\n                            <additional:LockscreenView Grid.RowSpan=\"2\" x:Name=\"PasscodePanel\" Visibility=\"Collapsed\"/>\r\n\r\n                            <ContentControl x:Name=\"BlockingPlaceholder\" Grid.RowSpan=\"2\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" Visibility=\"Collapsed\"/>\r\n\r\n                            <!--<Grid Grid.RowSpan=\"2\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Margin=\"0,32,0,0\" Visibility=\"Visible\" IsHitTestVisible=\"True\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"300\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Grid.ColumnSpan=\"2\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.9\" IsHitTestVisible=\"False\"/>\r\n                                <TextBlock x:Name=\"DebugInfo\" Grid.Column=\"0\" Foreground=\"GreenYellow\" FontSize=\"10\" IsHitTestVisible=\"False\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                                <ListBox x:Name=\"DebugList\" Grid.Column=\"1\" MaxHeight=\"150\" Foreground=\"GreenYellow\" VerticalAlignment=\"Top\" IsHitTestVisible=\"True\" FontSize=\"10\"/>\r\n                            </Grid>-->\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"toolkit:TransitionFrame\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkit:TransitionFrame\">\r\n                    <Border x:Name=\"ClientArea\" IsHitTestVisible=\"True\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Margin=\"{TemplateBinding Margin}\">\r\n                        <Grid>\r\n                            <ContentPresenter x:Name=\"FirstContentPresenter\" Opacity=\"0.5\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            <ContentPresenter x:Name=\"SecondContentPresenter\" Opacity=\"0.5\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"  VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            <!--<Border Background=\"Transparent\" Opacity=\"0.3\"/>-->\r\n                            <!--<additional:LockscreenView/>-->\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>\r\n\r\n\r\n"
  },
  {
    "path": "TelegramClient/Themes/Generic.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\">\r\n\r\n    <Style TargetType=\"emojiPanel:TestScrollableTextBlock\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"emojiPanel:TestScrollableTextBlock\">\r\n                    <StackPanel x:Name=\"StackPanel\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"emojiPanel:TelegramRichTextBox\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n        <Setter Property=\"Padding\" Value=\"12,0\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"emojiPanel:TelegramRichTextBox\">\r\n                    <StackPanel Orientation=\"Vertical\" x:Name=\"StackPanel\"/>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "TelegramClient/Utils/Color.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Utils\r\n{\r\n    public static class ColorUtils\r\n    {\r\n        public static Color MergeColors(this Color c1, Color c2)\r\n        {\r\n            return MixColors(c1, c2);\r\n        }\r\n\r\n        private static Color MixColors(Color c1, Color c2)\r\n        {\r\n            var c1a = c1.A / 255.0;\r\n            var c2a = c2.A / 255.0;\r\n            var alp = AlphaBlend(c1a, c2a);\r\n\r\n            var a = alp * 255;\r\n            var r = ColorBlend(c1.R, c1a, c2.R, c2a, alp);\r\n            var g = ColorBlend(c1.G, c1a, c2.G, c2a, alp);\r\n            var b = ColorBlend(c1.B, c1a, c2.B, c2a, alp);\r\n\r\n            return Color.FromArgb(Convert.ToByte(a), Convert.ToByte(r), Convert.ToByte(g), Convert.ToByte(b));\r\n        }\r\n\r\n\r\n        private static double ColorBlend(byte c1r, double c1a, byte c2r, double c2a, double alp)\r\n        {\r\n            return (c2r * c2a + c1r * c1a * (1 - c2a)) / alp;\r\n        }\r\n\r\n        private static double AlphaBlend(double alphaBelow, double alphaAbove)\r\n        {\r\n            return alphaBelow + (1.0 - alphaBelow) * alphaAbove;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Utils/Language.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace TelegramClient.Utils\r\n{\r\n    public enum Gender\r\n    {\r\n        Female,\r\n        Male\r\n    }\r\n\r\n    public static class Language\r\n    {\r\n        public static string CapitalizeFirstLetter(string data)\r\n        {\r\n            var chars = data.ToCharArray();\r\n\r\n            // Find the Index of the first letter\r\n            var charac = data.FirstOrDefault(char.IsLetter);\r\n            if (charac == default(char)) return data;\r\n            var i = data.IndexOf(charac);\r\n\r\n            // capitalize that letter\r\n            chars[i] = char.ToUpper(chars[i]);\r\n\r\n            return new string(chars);\r\n        }\r\n\r\n        private static readonly Dictionary<char, string> _ruEnTable = new Dictionary<char, string>\r\n        {\r\n            {'а', \"a\"}, {'б', \"b\"}, \r\n            {'в', \"v\"}, {'г', \"g\"}, \r\n            {'д', \"d\"}, {'е', \"e\"},\r\n            {'ё', \"e\"}, {'ж', \"zh\"}, \r\n            {'з', \"z\"}, {'и', \"i\"}, \r\n            {'й', \"j\"}, {'к', \"k\"},\r\n            {'л', \"l\"}, {'м', \"m\"}, \r\n            {'н', \"n\"}, {'о', \"o\"}, \r\n            {'п', \"p\"}, {'р', \"r\"},\r\n            {'с', \"s\"}, {'т', \"t\"}, \r\n            {'у', \"u\"}, {'ф', \"f\"}, \r\n            {'х', \"kh\"}, {'ц', \"tc\"},\r\n            {'ч', \"ch\"}, {'ш', \"sh\"}, \r\n            {'щ', \"shch\"}, {'ъ', \"\"}, \r\n            {'ы', \"y\"}, {'ь', \"\"},\r\n            {'э', \"e\"}, {'ю', \"iu\"}, \r\n            {'я', \"ia\"}\r\n        };\r\n\r\n        private static readonly Dictionary<char, string> _enRuTable = new Dictionary<char, string>\r\n        {\r\n            {'a', \"а\"}, {'b', \"б\"}, \r\n            {'c', \"ц\"}, {'d', \"д\"}, \r\n            {'e', \"е\"}, {'f', \"ф\"},\r\n            {'g', \"г\"}, {'h', \"х\"}, \r\n            {'i', \"и\"}, {'j', \"й\"}, \r\n            {'k', \"к\"}, {'l', \"л\"},\r\n            {'m', \"м\"}, {'n', \"н\"}, \r\n            {'o', \"о\"}, {'p', \"п\"}, \r\n            {'q', \"к\"}, {'r', \"р\"},\r\n            {'s', \"с\"}, {'t', \"т\"}, \r\n            {'u', \"ю\"}, {'v', \"в\"}, \r\n            {'w', \"в\"}, {'x', \"х\"},\r\n            {'y', \"й\"}, {'z', \"з\"}\r\n        };\r\n\r\n        public static string Transliterate(string str)\r\n        {\r\n            var enCount = 0;\r\n            var ruCount = 0;\r\n            var count = 0;\r\n            const int maxCount = 7;\r\n            foreach (var alpha in str)\r\n            {\r\n                if (count > maxCount) break;\r\n                if (_enRuTable.ContainsKey(alpha))\r\n                {\r\n                    enCount++;\r\n                }\r\n                else if (_ruEnTable.ContainsKey(alpha))\r\n                {\r\n                    ruCount++;\r\n                }\r\n                count++;\r\n            }\r\n\r\n            if (enCount > ruCount)\r\n            {\r\n                return TransliterateToRussian(str);\r\n            }\r\n\r\n            return TransliterateToEnglish(str);\r\n        }\r\n\r\n        public static string TransliterateToRussian(string str)\r\n        {\r\n            var enStr = new StringBuilder();\r\n            foreach (var alpha in str)\r\n            {\r\n                if (_enRuTable.ContainsKey(alpha))\r\n                {\r\n                    enStr.Append(_enRuTable[alpha]);\r\n                }\r\n            }\r\n\r\n            return enStr.ToString();\r\n        }\r\n\r\n        public static string TransliterateToEnglish(string str)\r\n        {\r\n            var enStr = new StringBuilder();\r\n            foreach (var alpha in str)\r\n            {\r\n                if (_ruEnTable.ContainsKey(alpha))\r\n                {\r\n                    enStr.Append(_ruEnTable[alpha]);\r\n                }\r\n            }\r\n\r\n            return enStr.ToString();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Does a word declension after a number.\r\n        /// </summary>\r\n        /// <param name=\"number\">           Number </param>\r\n        /// <param name=\"nominative\">       Nominative (собеседник, участник)  </param>\r\n        /// <param name=\"genitiveSingular\"> Genitive singular (собеседника, участника) </param>\r\n        /// <param name=\"genitivePlural\">   Genitive plural (собеседников, участников) </param>\r\n        /// <returns></returns>   \r\n        public static string RuDeclension(int number, string nominative, string genitiveSingular, string genitivePlural, string format)\r\n        {\r\n            var lastDigit = number%10;\r\n            var lastTwoDigits = number%100;\r\n\r\n            if (lastDigit == 1 && lastTwoDigits != 11)\r\n            {\r\n                return string.Format(\"{0} {1}\", number, nominative);\r\n            }\r\n\r\n            if (lastDigit == 2 && lastTwoDigits != 12 || lastDigit == 3 && lastTwoDigits != 13 ||\r\n                lastDigit == 4 && lastTwoDigits != 14)\r\n            {\r\n                return string.Format(\"{2}{0}{2} {1}\", number, genitiveSingular, format);\r\n            }\r\n\r\n            return string.Format(\"{2}{0}{2} {1}\", number, genitivePlural, format);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Does a word declension after a number.\r\n        /// </summary>\r\n        /// <param name=\"number\">      Number </param>\r\n        /// <param name=\"singular\">    Singular (company) </param>\r\n        /// <param name=\"plural\">      Plural (companies) </param>\r\n        /// <returns></returns>   \r\n        public static string EnDeclension(int number, string singular, string plural, string format)\r\n        {\r\n            return string.Format(\"{2}{0}{2} {1}\", number, number == 1 || number == 0 ? singular : plural, format);\r\n        }\r\n\r\n        public static string Declension(int number, string nominativeSingular, string nominativePlural, string genitiveSingular, string genitivePlural, string enException = null, string format = null)\r\n        {\r\n            var culture = CultureInfo.CurrentUICulture;\r\n            var languageName = culture.IsNeutralCulture ? culture.EnglishName : culture.Parent.EnglishName;\r\n            if (string.Equals(languageName, \"Russian\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return RuDeclension(number, nominativeSingular, genitiveSingular, genitivePlural, format);\r\n            }\r\n\r\n            if (!string.IsNullOrEmpty(enException)) return enException;\r\n\r\n            return EnDeclension(number, nominativeSingular, nominativePlural, format);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Does a word declension after a number.\r\n        /// </summary>\r\n        /// <param name=\"number\">           Number </param>\r\n        /// <param name=\"nominative\">       Nominative (собеседник, участник)  </param>\r\n        /// <param name=\"genitiveSingular\"> Genitive singular (собеседника, участника) </param>\r\n        /// <param name=\"genitivePlural\">   Genitive plural (собеседников, участников) </param>\r\n        /// <returns></returns>   \r\n        public static string RuDeclension2(int number, string nominative, string genitiveSingular, string genitivePlural)\r\n        {\r\n            var lastDigit = number % 10;\r\n            var lastTwoDigits = number % 100;\r\n\r\n            if (lastDigit == 1 && lastTwoDigits != 11)\r\n            {\r\n                return string.Format(\"{0}\", nominative);\r\n            }\r\n\r\n            if (lastDigit == 2 && lastTwoDigits != 12 || lastDigit == 3 && lastTwoDigits != 13 ||\r\n                lastDigit == 4 && lastTwoDigits != 14)\r\n            {\r\n                return string.Format(\"{0}\", genitiveSingular);\r\n            }\r\n\r\n            return string.Format(\"{0}\", genitivePlural);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Does a word declension after a number.\r\n        /// </summary>\r\n        /// <param name=\"number\">      Number </param>\r\n        /// <param name=\"singular\">    Singular (company) </param>\r\n        /// <param name=\"plural\">      Plural (companies) </param>\r\n        /// <returns></returns>   \r\n        public static string EnDeclension2(int number, string singular, string plural)\r\n        {\r\n            return string.Format(\"{0}\", number == 1 || number == 0 ? singular : plural);\r\n        }\r\n\r\n        public static string Declension2(int number, string nominativeSingular, string nominativePlural, string genitiveSingular, string genitivePlural, string enException = null)\r\n        {\r\n            var culture = CultureInfo.CurrentUICulture;\r\n            var languageName = culture.IsNeutralCulture ? culture.EnglishName : culture.Parent.EnglishName;\r\n            if (string.Equals(languageName, \"Russian\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return RuDeclension2(number, nominativeSingular, genitiveSingular, genitivePlural);\r\n            }\r\n\r\n            if (!string.IsNullOrEmpty(enException)) return enException;\r\n\r\n            return EnDeclension2(number, nominativeSingular, nominativePlural);\r\n        }\r\n\r\n        public static string GenderString(Gender gender, string maleString, string femaleString)\r\n        {\r\n            return gender == Gender.Male ? maleString : femaleString;\r\n        }\r\n\r\n        public static void Test()\r\n        {\r\n            for (var i = 0; i < 105; i++)\r\n            {\r\n                Debug.WriteLine(RuDeclension(i, \"собеседник\", \"собеседника\", \"собеседников\", null));\r\n            }\r\n\r\n            Console.ReadLine();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Utils/TelegramUriMapper.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Navigation;\r\nusing Windows.ApplicationModel.DataTransfer;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.Utils\r\n{\r\n    public class TelegramUriMapper : UriMapperBase\r\n    {\r\n        public override Uri MapUri(Uri uri)\r\n        {\r\n#if WP81\r\n            var op = ((App)Application.Current).ShareOperation;\r\n            if (op != null)\r\n            {\r\n                ((App)Application.Current).ShareOperation = null;\r\n                if (op.Data.Contains(StandardDataFormats.WebLink))\r\n                {\r\n                    IoC.Get<IStateService>().WebLink = op.Data.GetWebLinkAsync().GetResults();\r\n                    //IoC.Get<INavigationService>().Navigate(new Uri(\"/Views/Dialogs/ChooseDialogView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative));\r\n                }\r\n                else if (op.Data.Contains(StandardDataFormats.StorageItems))\r\n                {\r\n                    IoC.Get<IStateService>().StorageItems = op.Data.GetStorageItemsAsync().GetResults();\r\n                    //IoC.Get<INavigationService>().Navigate(new Uri(\"/Views/Dialogs/ChooseDialogView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative));\r\n                }\r\n            }\r\n#endif\r\n\r\n            var tempUri = HttpUtility.UrlDecode(uri.ToString());          \r\n            if (tempUri.Contains(\"msg_id\") || tempUri.Contains(\"SecondaryTile\"))\r\n            {\r\n                var uriParams = ParseQueryString(tempUri);\r\n\r\n                if (tempUri.Contains(\"from_id\"))\r\n                {\r\n                    IoC.Get<IStateService>().RemoveBackEntries = true;\r\n                    IoC.Get<IStateService>().UserId = uriParams[\"from_id\"];\r\n                }\r\n                else if (tempUri.Contains(\"encryptedchat_id\") && tempUri.Contains(\"encrypteduser_id\"))\r\n                {\r\n                    IoC.Get<IStateService>().ChatId = uriParams[\"encryptedchat_id\"];\r\n                    IoC.Get<IStateService>().UserId = uriParams[\"encrypteduser_id\"];\r\n                    return new Uri(\"/Views/Dialogs/SecretDialogDetailsView.xaml\", UriKind.Relative);\r\n                }\r\n                else if (tempUri.Contains(\"chat_id\"))\r\n                {\r\n                    IoC.Get<IStateService>().RemoveBackEntries = true;\r\n                    IoC.Get<IStateService>().ChatId = uriParams[\"chat_id\"];\r\n                }\r\n                else if (tempUri.Contains(\"channel_id\"))\r\n                {\r\n                    IoC.Get<IStateService>().RemoveBackEntries = true;\r\n                    IoC.Get<IStateService>().ChatId = uriParams[\"channel_id\"];\r\n                }\r\n                else if (tempUri.Contains(\"broadcast_id\"))\r\n                {\r\n                    IoC.Get<IStateService>().RemoveBackEntries = true;\r\n                    IoC.Get<IStateService>().BroadcastId = uriParams[\"broadcast_id\"];\r\n                }\r\n                else\r\n                {\r\n                    return uri;\r\n                }\r\n\r\n                return new Uri(\"/Views/Dialogs/DialogDetailsView.xaml\", UriKind.Relative);\r\n            }\r\n            \r\n            if (tempUri.StartsWith(\"/Protocol?encodedLaunchUri\"))\r\n            {\r\n                return new Uri(\"/Views/ShellView.xaml\", UriKind.Relative);\r\n            }\r\n\r\n            if (tempUri.StartsWith(\"/PeopleExtension?action\"))\r\n            {\r\n                return new Uri(\"/Views/ShellView.xaml\", UriKind.Relative);\r\n            }\r\n\r\n            if (tempUri.Contains(\"Action=ENCRYPTED_MESSAGE\"))\r\n            {\r\n                IoC.Get<IStateService>().ClearNavigationStack = true;\r\n                return uri;\r\n            }\r\n\r\n            if (tempUri.Contains(\"phone_call_id\"))\r\n            {\r\n                var uriParams = ParseQueryString(tempUri);\r\n                IoC.Get<IStateService>().PhoneCallId = uriParams[\"phone_call_id\"];\r\n                return uri;\r\n            }\r\n            // check ShellView.xaml.cs OnNavigatedTo\r\n            //if (tempUri.Contains(\"FileId\"))\r\n            //{\r\n                //var uriParams = ParseQueryString(tempUri);\r\n                \r\n                //IoC.Get<IStateService>().FileId = uriParams[\"FileId\"];\r\n                //IoC.Get<IStateService>().ClearNavigationStack = true;\r\n\r\n                //return new Uri(\"/Views/ShellView.xaml\", UriKind.Relative);\r\n            //}\r\n\r\n\r\n            // Otherwise perform normal launch.\r\n            return uri;\r\n        }\r\n\r\n        public static Dictionary<string, string> ParseQueryString(string uri)\r\n        {\r\n\r\n            string substring = uri.Substring(((uri.LastIndexOf('?') == -1) ? 0 : uri.LastIndexOf('?') + 1));\r\n\r\n            string[] pairs = substring.Split('&');\r\n\r\n            var output = new Dictionary<string, string>();\r\n\r\n            foreach (string piece in pairs)\r\n            {\r\n                string[] pair = piece.Split('=');\r\n                if (pair.Length > 1)\r\n                {\r\n                    output.Add(pair[0], pair[1]);\r\n                }\r\n            }\r\n\r\n            return output;\r\n\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/AboutViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class AboutViewModel : ViewModelBase\r\n    {\r\n        public Uri ApplicationIconSource\r\n        {\r\n            get\r\n            {\r\n#if WP81\r\n                return new Uri(\"/ApplicationIcon106.png\", UriKind.Relative);\r\n#elif WP8\r\n                return new Uri(\"/ApplicationIcon210.png\", UriKind.Relative);\r\n#endif\r\n                return new Uri(\"/ApplicationIcon99.png\", UriKind.Relative);\r\n            }\r\n        }\r\n\r\n        public string Version\r\n        {\r\n            get\r\n            {\r\n                return _extendedDeviceInfoService.AppVersion\r\n#if WP81\r\n                +\" WP8.1\";\r\n#elif WP8\r\n                + \" WP8\";\r\n#else\r\n                + \" WP7\";\r\n#endif\r\n            }\r\n        }\r\n\r\n        private readonly IExtendedDeviceInfoService _extendedDeviceInfoService;\r\n\r\n        public AboutViewModel(IExtendedDeviceInfoService extendedDeviceInfoService, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _extendedDeviceInfoService = extendedDeviceInfoService;\r\n\r\n            var datePicker = new DatePicker();\r\n        }\r\n\r\n        public void OpenPrivacyStatement()\r\n        {\r\n            NavigationService.UriFor<PrivacyStatementViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenSpecialThanks()\r\n        {\r\n            NavigationService.UriFor<SpecialThanksViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/AccountSelfDestructsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class AccountSelfDestructsViewModel : ViewModelBase\r\n    {\r\n        private Period _selectedPeriod;\r\n\r\n        public Period SelectedPeriod\r\n        {\r\n            get { return _selectedPeriod; }\r\n            set { SetField(ref _selectedPeriod, value, () => SelectedPeriod); }\r\n        }\r\n\r\n        public List<Period> Periods { get; set; }\r\n\r\n        private int _accountDaysTTL;\r\n\r\n        public AccountSelfDestructsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _accountDaysTTL = StateService.AccountDaysTTL;\r\n            StateService.AccountDaysTTL = 0;\r\n\r\n            Periods = new List<Period>\r\n            {\r\n                new Period{Label = Language.Declension(\r\n                    1,\r\n                    AppResources.MonthNominativeSingular,\r\n                    AppResources.MonthNominativePlural,\r\n                    AppResources.MonthGenitiveSingular,\r\n                    AppResources.MonthGenitivePlural).ToLower(CultureInfo.CurrentUICulture), Days = 30},\r\n                new Period{Label = Language.Declension(\r\n                    3,\r\n                    AppResources.MonthNominativeSingular,\r\n                    AppResources.MonthNominativePlural,\r\n                    AppResources.MonthGenitiveSingular,\r\n                    AppResources.MonthGenitivePlural).ToLower(CultureInfo.CurrentUICulture), Days = 90},\r\n                new Period{Label = Language.Declension(\r\n                    6,\r\n                    AppResources.MonthNominativeSingular,\r\n                    AppResources.MonthNominativePlural,\r\n                    AppResources.MonthGenitiveSingular,\r\n                    AppResources.MonthGenitivePlural).ToLower(CultureInfo.CurrentUICulture), Days = 180},\r\n                new Period{Label = Language.Declension(\r\n                    1,\r\n                    AppResources.YearNominativeSingular,\r\n                    AppResources.YearNominativePlural,\r\n                    AppResources.YearGenitiveSingular,\r\n                    AppResources.YearGenitivePlural).ToLower(CultureInfo.CurrentUICulture), Days = 365},\r\n            };\r\n            _selectedPeriod = GetSelectedPeriod(Periods, _accountDaysTTL, Periods[2]);\r\n\r\n            PropertyChanged += OnPropertyChanged;\r\n        }\r\n\r\n        private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => SelectedPeriod) && SelectedPeriod != null)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.SetAccountTTLAsync(\r\n                    new TLAccountDaysTTL{Days = new TLInt(SelectedPeriod.Days)},\r\n                    result =>\r\n                    {\r\n                        IsWorking = false;\r\n                    },\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n                        if (error.CodeEquals(ErrorCode.FLOOD))\r\n                        {\r\n                            MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.setAccountTTL error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        private static Period GetSelectedPeriod(IList<Period> periods, int accountDaysTTL, Period defaultPeriod)\r\n        {\r\n            if (accountDaysTTL == 0)\r\n            {\r\n                return defaultPeriod;\r\n            }\r\n\r\n            var diff = int.MaxValue;\r\n            Period selectedPeriod = null;\r\n            foreach (var period in periods)\r\n            {\r\n                var nextdDiff = Math.Abs(accountDaysTTL - period.Days);\r\n                if (nextdDiff < diff)\r\n                {\r\n                    diff = nextdDiff;\r\n                    selectedPeriod = period;\r\n                }\r\n            }\r\n\r\n            return selectedPeriod ?? defaultPeriod;\r\n        }\r\n    }\r\n\r\n    public class Period\r\n    {\r\n        public string Label { get; set; }\r\n\r\n        public int Days { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Label;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/AddChatParticipantConfirmationViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class AddChatParticipantConfirmationViewModel : TelegramPropertyChangedBase\r\n    {\r\n        private int _forwardingMessagesCount = Constants.DefaultForwardingMessagesCount;\r\n\r\n        public int ForwardingMessagesCount\r\n        {\r\n            get { return _forwardingMessagesCount; }\r\n            set\r\n            {\r\n                _forwardingMessagesCount = value;\r\n                NotifyOfPropertyChange(() => ForwardingMessagesCount);\r\n            }\r\n        }\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen\r\n        {\r\n            get { return _isOpen; }\r\n            protected set\r\n            {\r\n                if (_isOpen != value)\r\n                {\r\n                    _isOpen = value;\r\n                    NotifyOfPropertyChange(() => IsOpen);\r\n                }\r\n            }\r\n        }\r\n\r\n        private Action<AddChatParticipantBoxResult> _callback;\r\n\r\n        public string AddUserToTheGroupString { get; set; }\r\n\r\n        public void Open(TLUserBase user, TLChatBase chat, Action<AddChatParticipantBoxResult> callback)\r\n        {\r\n            var userName = user.FirstName;\r\n            if (TLString.IsNullOrEmpty(userName))\r\n            {\r\n                userName = user.LastName;\r\n            }\r\n\r\n            AddUserToTheGroupString = string.Format(AppResources.AddUserToTheGroup, userName, chat.FullName);\r\n            NotifyOfPropertyChange(() => AddUserToTheGroupString);\r\n\r\n            IsOpen = true;\r\n            _callback = callback;\r\n        }\r\n\r\n        public void Close(MessageBoxResult result)\r\n        {\r\n            IsOpen = false;\r\n            _callback.SafeInvoke(new AddChatParticipantBoxResult{ ForwardingMessagesCount = ForwardingMessagesCount, Result = result });\r\n        }\r\n    }\r\n\r\n    public class AddChatParticipantBoxResult\r\n    {\r\n        public int ForwardingMessagesCount { get; set; }\r\n\r\n        public MessageBoxResult Result { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/AllowUsersViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class AllowUsersViewModel :ItemsViewModelBase<TLUserBase>\r\n    {\r\n        private IPrivacyValueUsersRule _usersRule;\r\n\r\n        public string Title { get; protected set; }\r\n\r\n        public AllowUsersViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            if (StateService.UsersRule is TLPrivacyValueAllowUsers)\r\n            {\r\n                Title = AppResources.AlwaysShare.ToLowerInvariant();\r\n            }\r\n            else\r\n            {\r\n                Title = AppResources.NeverShare.ToLowerInvariant();\r\n            }\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                _usersRule = StateService.UsersRule;\r\n                StateService.UsersRule = null;\r\n\r\n                if (_usersRule != null)\r\n                {\r\n                    foreach (var userId in _usersRule.Users)\r\n                    {\r\n                        var user = CacheService.GetUser(userId);\r\n                        if (user != null)\r\n                        {\r\n                            Items.Add(user);\r\n                        }\r\n                    }\r\n\r\n                    Status = Items.Count > 0 || LazyItems.Count > 0 ? string.Empty : string.Format(\"{0}\", AppResources.NoUsersHere);\r\n                }\r\n            });\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                if (StateService.Participant != null)\r\n                {\r\n                    var participant = StateService.Participant;\r\n                    StateService.Participant = null;\r\n                    var addedUsers = new List<TLUserBase> { participant };\r\n\r\n\r\n                    if (_usersRule != null)\r\n                    {\r\n                        var usersCache = new Dictionary<int, int>();\r\n                        foreach (var userId in _usersRule.Users)\r\n                        {\r\n                            usersCache[userId.Value] = userId.Value;\r\n                        }\r\n\r\n                        foreach (var addedUser in addedUsers)\r\n                        {\r\n                            if (!usersCache.ContainsKey(addedUser.Index))\r\n                            {\r\n                                _usersRule.Users.Add(addedUser.Id);\r\n                                Items.Add(addedUser);\r\n                            }\r\n                        }\r\n\r\n                        Status = Items.Count > 0 || LazyItems.Count > 0 ? string.Empty : string.Format(\"{0}\", AppResources.NoUsersHere);\r\n                    }\r\n                }\r\n            });\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void DeleteUser(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n            if (_usersRule == null) return;\r\n\r\n            Items.Remove(user);\r\n\r\n            for (var i = 0; i < _usersRule.Users.Count; i++)\r\n            {\r\n                if (_usersRule.Users[i].Value == user.Index)\r\n                {\r\n                    _usersRule.Users.RemoveAt(i);\r\n                    break;\r\n                }\r\n            }\r\n\r\n            Status = Items.Count > 0 || LazyItems.Count > 0 ? string.Empty : string.Format(\"{0}\", AppResources.NoUsersHere);\r\n        }\r\n\r\n        public void OpenUserDetails(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            StateService.CurrentContact = user;\r\n            NavigationService.UriFor<ContactViewModel>().Navigate();\r\n        }\r\n\r\n        public void SelectUsers()\r\n        {\r\n            if (_usersRule == null) return;\r\n\r\n            StateService.SelectedUserIds = _usersRule.Users.Items;\r\n            NavigationService.UriFor<AddChatParticipantViewModel>().Navigate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            StateService.UsersRule = _usersRule;\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ArchivedStickersViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ArchivedStickersViewModel : ItemsViewModelBase<TLStickerSetBase>//,\r\n        //Telegram.Api.Aggregator.IHandle<DownloadableItem>,\r\n        //Telegram.Api.Aggregator.IHandle<UpdateStickerSetsOrderEventArgs>,\r\n        //Telegram.Api.Aggregator.IHandle<UpdateStickerSetsEventArgs>,\r\n        //Telegram.Api.Aggregator.IHandle<UpdateNewStickerSetEventArgs>\r\n    {\r\n        public ArchivedStickersViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Status = AppResources.Loading;\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            StateService.GetArchivedStickersAsync(result => BeginOnUIThread(() =>\r\n            {\r\n                if (result != null)\r\n                {\r\n                    _messagesStickerSets = result.MessagesStickerSets;\r\n\r\n                    UpdateSets(result);\r\n                    Status = result.Sets.Count > 0? string.Empty : AppResources.Loading;\r\n                }\r\n\r\n                UpdateStickersAsync(result);\r\n            }));\r\n        }\r\n\r\n        private void UpdateStickersAsync(TLArchivedStickers cachedStickers)\r\n        {\r\n            IsWorking = true;\r\n            MTProtoService.GetArchivedStickersAsync(true, new TLLong(0), new TLInt(100), \r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    Status = result.Sets.Count > 0 ? string.Empty : AppResources.NoSetsHere;\r\n                    IsWorking = false;\r\n\r\n                    var archivedStickers = result;\r\n                    if (archivedStickers != null)\r\n                    {\r\n                        _messagesStickerSets = archivedStickers.MessagesStickerSets;\r\n\r\n                        Items.Clear();\r\n\r\n                        cachedStickers = archivedStickers;\r\n                        StateService.SaveArchivedStickersAsync(cachedStickers);\r\n\r\n                        UpdateSets(archivedStickers);\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n\r\n                    Execute.ShowDebugMessage(\"messages.getArchivedStickers error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            //if (IsWorking) return;\r\n\r\n            //IsWorking = true;\r\n            //MTProtoService.GetArchivedStickersAsync(new TLLong(0), new TLInt(100),\r\n            //    result => BeginOnUIThread(() =>\r\n            //    {\r\n            //        Status = string.Empty;\r\n            //        IsWorking = false;\r\n\r\n            //        var archivedStickers = result;\r\n            //        if (archivedStickers != null)\r\n            //        {\r\n            //            _messagesStickerSets = archivedStickers.MessagesStickerSets;\r\n\r\n            //            Items.Clear();\r\n\r\n            //            cachedStickers = archivedStickers;\r\n            //            StateService.SaveArchivedStickersAsync(cachedStickers);\r\n\r\n            //            UpdateSets(archivedStickers);\r\n            //        }\r\n            //    }),\r\n            //    error => BeginOnUIThread(() =>\r\n            //    {\r\n            //        Status = string.Empty;\r\n            //        IsWorking = false;\r\n            //        Execute.ShowDebugMessage(\"messages.getArchivedStickers error \" + error);\r\n            //    }));\r\n        }\r\n\r\n        private readonly Dictionary<string, TLVector<TLStickerItem>> _stickerSets = new Dictionary<string, TLVector<TLStickerItem>>();\r\n\r\n        private readonly Dictionary<long, string> _emoticons = new Dictionary<long, string>();\r\n\r\n        private IStickers _stickers;\r\n\r\n        private TLVector<TLMessagesStickerSet> _messagesStickerSets;\r\n\r\n        private void UpdateSets(IStickers iStickers)\r\n        {\r\n            _stickers = iStickers;\r\n\r\n            _emoticons.Clear();\r\n            _stickerSets.Clear();\r\n\r\n            //for (var i = 0; i < iStickers.Packs.Count; i++)\r\n            //{\r\n            //    var emoticon = iStickers.Packs[i].Emoticon.ToString();\r\n            //    foreach (var document in iStickers.Packs[i].Documents)\r\n            //    {\r\n            //        _emoticons[document.Value] = emoticon;\r\n            //    }\r\n            //}\r\n\r\n            for (var i = 0; i < iStickers.Documents.Count; i++)\r\n            {\r\n                var document22 = iStickers.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    //string emoticon;\r\n                    //if (_emoticons.TryGetValue(document22.Id.Value, out emoticon))\r\n                    //{\r\n                    //    document22.Emoticon = emoticon;\r\n                    //}\r\n\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        TLVector<TLStickerItem> stickers;\r\n                        if (_stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(new TLStickerItem { Document = document22 });\r\n                        }\r\n                        else\r\n                        {\r\n                            _stickerSets[setId] = new TLVector<TLStickerItem> { new TLStickerItem { Document = document22 } };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            Items.Clear();\r\n\r\n            var firstChunkSize = 10;\r\n            var count = 0;\r\n            var delayedItems = new List<TLStickerSetBase>();\r\n            for (var i = 0; i < iStickers.Sets.Count; i++)\r\n            {\r\n                var set = iStickers.Sets[i];\r\n\r\n                var setName = set.Id.ToString();\r\n                TLVector<TLStickerItem> stickers;\r\n                if (_stickerSets.TryGetValue(setName, out stickers))\r\n                {\r\n\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        objects.Add(sticker);\r\n                    }\r\n\r\n                    set.Stickers = objects;\r\n                    if (set.Stickers.Count > 0)\r\n                    {\r\n                        if (count < firstChunkSize)\r\n                        {\r\n                            Items.Add(set);\r\n                            count++;\r\n                        }\r\n                        else\r\n                        {\r\n                            delayedItems.Add(set);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                foreach (var set in delayedItems)\r\n                {\r\n                    Items.Add(set);\r\n                }\r\n            });\r\n        }\r\n\r\n        public void AddRemoveStickerSet(TLStickerSet32 set)\r\n        {\r\n            if (set == null) return;\r\n\r\n            var messagesStickerSet = _messagesStickerSets.FirstOrDefault(x => x.Set.Id.Value == set.Id.Value);\r\n            if (messagesStickerSet == null) return;\r\n\r\n            var stickerSetExists = set.Installed && !set.Archived;\r\n            var inputStickerSet = new TLInputStickerSetId{ Id = set.Id, AccessHash = set.AccessHash };\r\n            if (!stickerSetExists)\r\n            {\r\n                MTProtoService.InstallStickerSetAsync(inputStickerSet, TLBool.False,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        Items.Remove(set);\r\n\r\n                        var archivedStickers = StateService.GetArchivedStickers();\r\n\r\n                        var resultArchive = result as TLStickerSetInstallResultArchive;\r\n                        if (resultArchive != null)\r\n                        {\r\n                            Execute.BeginOnUIThread(() => TelegramViewBase.ShowArchivedStickersMessageBox(resultArchive));\r\n\r\n                            var allStickers = StateService.GetAllStickers() as TLAllStickers43;\r\n                            if (allStickers != null)\r\n                            {\r\n                                for (var i = 0; i < resultArchive.Sets.Count; i++)\r\n                                {\r\n                                    TLUtils.RemoveStickerSet(allStickers, resultArchive.Sets[i]);\r\n                                }\r\n\r\n                                StateService.SaveAllStickersAsync(allStickers);\r\n                            }\r\n\r\n                            if (archivedStickers != null)\r\n                            {\r\n                                for (var i = resultArchive.MessagesStickerSets.Count - 1; i >= 0; i--)\r\n                                {\r\n                                    TLUtils.AddStickerSetCovered(archivedStickers, resultArchive.MessagesStickerSets[i], archivedStickers.SetsCovered, resultArchive.SetsCovered[i]);\r\n\r\n                                    for (var j = 0; j < _messagesStickerSets.Count; j++)\r\n                                    {\r\n                                        if (_messagesStickerSets[j].Set.Id.Value == resultArchive.MessagesStickerSets[i].Set.Id.Value)\r\n                                        {\r\n                                            _messagesStickerSets.RemoveAt(j);\r\n                                            break;\r\n                                        }\r\n                                    }\r\n\r\n                                    _messagesStickerSets.Insert(0, resultArchive.MessagesStickerSets[i]);\r\n                                }\r\n                            }\r\n                        }\r\n                        \r\n                        if (archivedStickers != null)\r\n                        {\r\n                            TLUtils.RemoveStickerSetCovered(archivedStickers, set, archivedStickers.SetsCovered);\r\n\r\n                            StateService.SaveArchivedStickersAsync(archivedStickers);\r\n                        }\r\n\r\n                        if (resultArchive != null)\r\n                        {\r\n                            UpdateSets(archivedStickers);\r\n                        }\r\n                        else\r\n                        {\r\n                            set.Installed = true;\r\n                            var set76 = set as TLStickerSet76;\r\n                            if (set76 != null)\r\n                            {\r\n                                set76.InstalledDate = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n                            }\r\n                            set.NotifyOfPropertyChange(() => set.Installed);\r\n\r\n                            set.Archived = false;\r\n                            set.NotifyOfPropertyChange(() => set.Archived);\r\n                        }\r\n\r\n                        var shellViewModel = IoC.Get<ShellViewModel>();\r\n                        shellViewModel.Handle(new TLUpdateNewStickerSet { Stickerset = messagesStickerSet });\r\n\r\n                        MTProtoService.SetMessageOnTime(2.0, AppResources.NewStickersAdded);\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                        {\r\n                            if (error.TypeEquals(ErrorType.STICKERSET_INVALID))\r\n                            {\r\n                                MessageBox.Show(AppResources.StickersNotFound, AppResources.Error, MessageBoxButton.OK);\r\n                            }\r\n                            else\r\n                            {\r\n                                Execute.ShowDebugMessage(\"messages.installStickerSet error \" + error);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.installStickerSet error \" + error);\r\n                        }\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                MTProtoService.UninstallStickerSetAsync(inputStickerSet,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        set.Installed = false;\r\n                        var set76 = set as TLStickerSet76;\r\n                        if (set76 != null)\r\n                        {\r\n                            set76.InstalledDate = null;\r\n                        }\r\n                        set.NotifyOfPropertyChange(() => set.Installed);\r\n\r\n                        set.Archived = false;\r\n                        set.NotifyOfPropertyChange(() => set.Archived);\r\n\r\n                        var shellViewModel = IoC.Get<ShellViewModel>();\r\n                        shellViewModel.RemoveStickerSet(set, inputStickerSet);\r\n\r\n                        var eventAggregator = EventAggregator;\r\n                        eventAggregator.Publish(new UpdateRemoveStickerSetEventArgs(set));\r\n\r\n                        MTProtoService.SetMessageOnTime(2.0, AppResources.StickersRemoved);\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.uninstallStickerSet error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public void CopyLink(TLStickerSet set)\r\n        {\r\n            if (set == null) return;\r\n\r\n            var shortName = set.ShortName.ToString();\r\n            if (string.IsNullOrEmpty(shortName)) return;\r\n\r\n            var addStickersLink = string.Format(Constants.AddStickersLinkPlaceholder, shortName);\r\n\r\n            Clipboard.SetText(addStickersLink);\r\n            MTProtoService.SetMessageOnTime(2.0, AppResources.LinkCopiedToClipboard);\r\n        }\r\n\r\n        public void Share(TLStickerSet set)\r\n        {\r\n            if (set == null) return;\r\n\r\n            var shortName = set.ShortName.ToString();\r\n            if (string.IsNullOrEmpty(shortName)) return;\r\n\r\n            var addStickersLink = string.Format(Constants.AddStickersLinkPlaceholder, shortName);\r\n\r\n            StateService.ShareLink = addStickersLink;\r\n            StateService.ShareMessage = addStickersLink;\r\n            StateService.ShareCaption = AppResources.Share;\r\n            NavigationService.UriFor<ShareViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/AskQuestionConfirmationViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class AskQuestionConfirmationViewModel : TelegramPropertyChangedBase\r\n    {\r\n        public string TelegramFaq\r\n        {\r\n            get { return Constants.TelegramFaq; }\r\n        }\r\n\r\n        public string TelegramTroubleshooting\r\n        {\r\n            get { return Constants.TelegramTroubleshooting; }\r\n        }\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen\r\n        {\r\n            get { return _isOpen; }\r\n            protected set\r\n            {\r\n                if (_isOpen != value)\r\n                {\r\n                    _isOpen = value;\r\n                    NotifyOfPropertyChange(() => IsOpen);\r\n                }\r\n            }\r\n        }\r\n\r\n        private Action<MessageBoxResult> _callback;\r\n\r\n        public void Open(Action<MessageBoxResult> callback)\r\n        {\r\n            IsOpen = true;\r\n            _callback = callback;\r\n        }\r\n\r\n        public void Close(MessageBoxResult result)\r\n        {\r\n            IsOpen = false;\r\n            _callback.SafeInvoke(result);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/BlockedContactsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class BlockedContactsViewModel : ItemsViewModelBase<TLUserBase>, Telegram.Api.Aggregator.IHandle<TLUpdateUserBlocked>\r\n    {\r\n        public BlockedContactsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            eventAggregator.Subscribe(this);\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            if (StateService.Participant != null)\r\n            {\r\n                var blockedUser = StateService.Participant;\r\n                StateService.Participant = null;\r\n\r\n                MTProtoService.BlockAsync(blockedUser.ToInputUser(),\r\n                    result =>\r\n                    {\r\n                        Items.Add(blockedUser);\r\n                        Status = Items.Count > 0 || LazyItems.Count > 0 ? string.Empty : string.Format(\"{0}\", AppResources.NoUsersHere);\r\n                    });\r\n            }\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            Status = AppResources.Loading;\r\n            MTProtoService.GetBlockedAsync(new TLInt(0), new TLInt(int.MaxValue),\r\n                result =>\r\n                {\r\n                    var contacts = result as TLContactsBlocked;\r\n                    if (contacts != null)\r\n                    {\r\n                        foreach (var user in contacts.Users)\r\n                        {\r\n                            var cachedUser = CacheService.GetUser(new TLInt(user.Index));\r\n                            if (cachedUser != null)\r\n                            {\r\n                                LazyItems.Add(cachedUser);\r\n                            }\r\n                            else\r\n                            {\r\n                                LazyItems.Add(user);\r\n                            }\r\n                        }\r\n\r\n                        Status = Items.Count > 0 || LazyItems.Count > 0? string.Empty : string.Format(\"{0}\", AppResources.NoUsersHere);\r\n                        BeginOnUIThread(PopulateItems);\r\n                    }\r\n                },\r\n                error => BeginOnUIThread(() => Status = string.Empty));\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        public void UnblockContact(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            var inputUser = user.ToInputUser();\r\n            MTProtoService.UnblockAsync(\r\n                inputUser,\r\n                result =>\r\n                {\r\n                    Items.Remove(user);\r\n\r\n                    Status = Items.Count > 0 || LazyItems.Count > 0 ? string.Empty : string.Format(\"{0}\", AppResources.NoUsersHere);\r\n                },\r\n                error =>\r\n                {\r\n                    \r\n                });\r\n        }\r\n\r\n        public void UserAction(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            OpenContactDetails(user);\r\n        }\r\n\r\n        public void OpenContactDetails(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            StateService.CurrentContact = user;\r\n            NavigationService.UriFor<ContactViewModel>().Navigate();\r\n        }\r\n\r\n        public void AddContact()\r\n        {\r\n            StateService.RemovedUsers = Items;\r\n            NavigationService.UriFor<AddChatParticipantViewModel>().Navigate();\r\n        }\r\n\r\n        public void Handle(TLUpdateUserBlocked update)\r\n        {\r\n            var user = CacheService.GetUser(update.UserId);\r\n            if (user != null)\r\n            {\r\n                UpdateBlockedList(user, update);\r\n            }\r\n            else\r\n            {\r\n                MTProtoService.GetFullUserAsync(\r\n                    new TLInputUser { UserId = update.UserId, AccessHash = new TLLong(0) }, \r\n                    fullUser => UpdateBlockedList(fullUser.User, update));\r\n            }\r\n        }\r\n\r\n        private void UpdateBlockedList(TLUserBase user, TLUpdateUserBlocked update)\r\n        {\r\n            if (update.Blocked.Value)\r\n            {\r\n                Items.Add(user);\r\n            }\r\n            else\r\n            {\r\n                Items.Remove(user);\r\n            }\r\n            Status = Items.Count > 0 || LazyItems.Count > 0 ? string.Empty : string.Format(\"{0}\", AppResources.NoUsersHere);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/CacheViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Telegram.Api.Aggregator;\r\nusing TelegramClient.ViewModels.Contacts;\r\n#if WP8\r\nusing Windows.Storage;\r\nusing Windows.System;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class CacheViewModel : ViewModelBase\r\n    {\r\n        private string _status = AppResources.Calculating + \"...\";\r\n\r\n        public string Status\r\n        {\r\n            get { return _status; }\r\n            set { SetField(ref _status, value, () => Status); }\r\n        }\r\n\r\n        private string _localDatabaseStatus = AppResources.Calculating + \"...\";\r\n\r\n        public string LocalDatabaseStatus\r\n        {\r\n            get { return _localDatabaseStatus; }\r\n            set { SetField(ref _localDatabaseStatus, value, () => LocalDatabaseStatus); }\r\n        }\r\n\r\n        private TimerSpan _selectedSpan;\r\n\r\n        public TimerSpan SelectedSpan\r\n        {\r\n            get { return _selectedSpan; }\r\n            set\r\n            {\r\n                _selectedSpan = value;\r\n\r\n                //if (_selectedSpan != null)\r\n                //{\r\n                //    if (_selectedSpan.Seconds == 0\r\n                //        || _selectedSpan.Seconds == int.MaxValue)\r\n                //    {\r\n                //        MuteUntil = _selectedSpan.Seconds;\r\n                //    }\r\n                //    else\r\n                //    {\r\n                //        var now = DateTime.Now;\r\n                //        var muteUntil = now.AddSeconds(_selectedSpan.Seconds);\r\n\r\n                //        MuteUntil = muteUntil < now ? 0 : TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, muteUntil).Value;\r\n                //    }\r\n                //}\r\n            }\r\n        }\r\n\r\n        public IList<TimerSpan> Spans { get; protected set; } \r\n\r\n\r\n        readonly DispatcherTimer _timer = new DispatcherTimer();\r\n\r\n        private volatile bool _isCalculating;\r\n\r\n        public ClearCacheSettingsViewModel ClearCacheSettings { get; set; }\r\n\r\n        private readonly ClearCacheSettings _settings = new ClearCacheSettings();\r\n\r\n        public CacheViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Spans = new List<TimerSpan>\r\n            {\r\n                new TimerSpan(AppResources.WeekNominativeSingular,  \"1\", (int)TimeSpan.FromDays(7.0).TotalSeconds, string.Format(\"{0} {1}\", \"1\", AppResources.WeekNominativeSingular).ToLowerInvariant()),\r\n                new TimerSpan(AppResources.MonthNominativeSingular,  \"1\", (int)TimeSpan.FromDays(30.0).TotalSeconds, string.Format(\"{0} {1}\", \"1\", AppResources.MonthNominativeSingular).ToLowerInvariant()),\r\n                new TimerSpan(AppResources.Forever, string.Empty, int.MaxValue, AppResources.Forever),\r\n            };\r\n            _selectedSpan = Spans[2];\r\n\r\n\r\n            Files = new ObservableCollection<TelegramFileInfo>();\r\n\r\n            _timer.Interval = TimeSpan.FromSeconds(30.0);\r\n            _timer.Tick += OnTimerTick;\r\n\r\n            CalculateCacheSizeAsync((size1, size2) => BeginOnUIThread(() =>\r\n            {\r\n                Status = FileSizeConverter.Convert(size1);\r\n                LocalDatabaseStatus = FileSizeConverter.Convert(size2);\r\n                _settings.NotifyOfPropertyChange(() => _settings.Self);\r\n            }));\r\n\r\n            PropertyChanged += (sender, e) =>\r\n            {\r\n                if (Property.NameEquals(e.PropertyName, () => IsWorking))\r\n                {\r\n                    NotifyOfPropertyChange(() => CanClearCache);\r\n                }\r\n            };\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n#if !DEBUG\r\n            _timer.Start();\r\n#endif\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n#if !DEBUG\r\n            _timer.Stop();\r\n#endif\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        private void OnTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            if (_isCalculating) return;\r\n\r\n            CalculateCacheSizeAsync((result1, result2) => BeginOnUIThread(() =>\r\n            {\r\n                Status = FileSizeConverter.Convert(result1);\r\n                LocalDatabaseStatus = FileSizeConverter.Convert(result2);\r\n                _settings.NotifyOfPropertyChange(() => _settings.Self);\r\n            }));\r\n        }\r\n\r\n        public ObservableCollection<TelegramFileInfo> Files { get; set; } \r\n\r\n        private void CalculateCacheSizeAsync(Action<long, long> callback)\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                _isCalculating = true;\r\n\r\n                var length1 = 0L;\r\n                var length2 = 0L;\r\n                var files = new List<TelegramFileInfo>();\r\n                _settings.Clear();\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    var fileNames = store.GetFileNames();\r\n\r\n                    foreach (var fileName in fileNames)\r\n                    {\r\n                        if (fileName.StartsWith(\"staticmap\"))\r\n                        {\r\n                            \r\n                        }\r\n\r\n                        try\r\n                        {\r\n                            var fileInfo = new TelegramFileInfo {Name = fileName};\r\n                            if (store.FileExists(fileName))\r\n                            {\r\n                                using (var file = new IsolatedStorageFileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read, store))\r\n                                {\r\n                                    fileInfo.Length = file.Length;\r\n                                    if (IsValidCacheFileName(fileName))\r\n                                    {\r\n                                        if (IsValidPhotoFileName(fileName))\r\n                                        {\r\n                                            _settings.PhotosLength += file.Length;\r\n                                        }\r\n                                        else if (IsValidMusicFileName(fileName))\r\n                                        {\r\n                                            _settings.MusicLength += file.Length;\r\n                                        }\r\n                                        else if (IsValidVideoFileName(fileName))\r\n                                        {\r\n                                            _settings.VideoLength += file.Length;\r\n                                        }\r\n                                        else if (IsValidVoiceMessageFileName(fileName))\r\n                                        {\r\n                                            _settings.VoiceMessagesLength += file.Length;\r\n                                        }\r\n                                        else if (IsValidDocumentFileName(fileName))\r\n                                        {\r\n                                            _settings.DocumentsLength += file.Length;\r\n                                        }\r\n                                        else if (IsValidOtherFileName(fileName))\r\n                                        {\r\n                                            _settings.OtherFilesLength += file.Length;\r\n                                        }\r\n\r\n                                        length1 += file.Length;\r\n                                        fileInfo.IsValidCacheFileName = true;\r\n                                    }\r\n                                }\r\n                            }\r\n                            files.Add(fileInfo);\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            TLUtils.WriteException(\"CalculateCacheSizeAsync OpenFile: \" + fileName, ex);\r\n                        }\r\n                    }\r\n\r\n                    var directoryNames = store.GetDirectoryNames();\r\n                    foreach (var fileName in directoryNames)\r\n                    {\r\n                        try\r\n                        {\r\n                            var fileInfo = new TelegramFileInfo { Name = fileName, Length = -1};\r\n                            files.Add(fileInfo);\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            TLUtils.WriteException(\"CalculateCacheSizeAsync OpenFile: \" + fileName, ex);\r\n                        }\r\n                    }\r\n\r\n                    length2 = GetDatabaseLength(store, files);\r\n                }\r\n\r\n                _isCalculating = false; \r\n\r\n                callback.SafeInvoke(length1, length2);\r\n\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    Files.Clear();\r\n                    foreach (var file in files)\r\n                    {\r\n                        Files.Add(file);\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n        private long GetDatabaseLength(IsolatedStorageFile store, List<TelegramFileInfo> files)\r\n        {\r\n            long length2 = 0L;\r\n            var databaseFileNames = GetDatabaseFileNames();\r\n            foreach (var fileName in databaseFileNames)\r\n            {\r\n                try\r\n                {\r\n                    var fileInfo = new TelegramFileInfo {Name = fileName};\r\n                    if (store.FileExists(fileName))\r\n                    {\r\n                        using (\r\n                            var file = new IsolatedStorageFileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read,\r\n                                store))\r\n                        {\r\n                            var lastAccessTime = store.GetLastAccessTime(fileName);\r\n                            var lastWriteTime = store.GetLastWriteTime(fileName);\r\n                            fileInfo.Length = file.Length;\r\n                            //if (IsValidCacheFileName(fileName))\r\n                            {\r\n                                length2 += file.Length;\r\n                                fileInfo.IsValidCacheFileName = true;\r\n                            }\r\n                        }\r\n                    }\r\n                    files.Add(fileInfo);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(\"CalculateCacheSizeAsync OpenFile: \" + fileName, ex);\r\n                }\r\n            }\r\n\r\n            return length2;\r\n        }\r\n\r\n        private IEnumerable<string> GetDatabaseFileNames()\r\n        {\r\n            yield return InMemoryDatabase.BroadcastsMTProtoFileName;\r\n            yield return InMemoryDatabase.ChatsMTProtoFileName;\r\n            yield return InMemoryDatabase.DialogsMTProtoFileName;\r\n            yield return InMemoryDatabase.EncryptedChatsMTProtoFileName;\r\n            yield return InMemoryDatabase.UsersMTProtoFileName;\r\n\r\n            yield return Telegram.Api.Constants.DifferenceFileName;\r\n            yield return Telegram.Api.Constants.TempDifferenceFileName;\r\n            yield return Telegram.Api.Constants.DifferenceTimeFileName;\r\n        }\r\n\r\n        public bool CanClearCache\r\n        {\r\n            get { return !IsWorking; }\r\n        }\r\n\r\n        private static bool IsValidCacheFileName(string fileName)\r\n        {\r\n            if (fileName == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (fileName.EndsWith(\".dat\") || fileName.EndsWith(\".temp\"))\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (IsValidPhotoFileName(fileName)\r\n                || IsValidVideoFileName(fileName)\r\n                || IsValidMusicFileName(fileName)\r\n                || IsValidVoiceMessageFileName(fileName)\r\n                || IsValidDocumentFileName(fileName)\r\n                || IsValidOtherFileName(fileName))\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static bool IsValidPhotoFileName(string fileName)\r\n        {\r\n            return fileName.EndsWith(\".jpg\") || fileName.EndsWith(\".png\");\r\n        }\r\n\r\n        private static bool IsValidMusicFileName(string fileName)\r\n        {\r\n            return fileName.EndsWith(\".mp3\");\r\n        }\r\n\r\n        private static bool IsValidVideoFileName(string fileName)\r\n        {\r\n            return fileName.StartsWith(\"video\");\r\n        }\r\n\r\n        private static bool IsValidVoiceMessageFileName(string fileName)\r\n        {\r\n            return fileName.StartsWith(\"audio\");\r\n        }\r\n\r\n        private static bool IsValidDocumentFileName(string fileName)\r\n        {\r\n            return fileName.StartsWith(\"document\") \r\n                || fileName.EndsWith(\".mp4\");   // http gif\r\n        }\r\n\r\n        private static bool IsValidOtherFileName(string fileName)\r\n        {\r\n            return fileName.StartsWith(\"encrypted\");\r\n        }\r\n\r\n        public void ClearCache()\r\n        {\r\n            if (_settings == null || _settings.TotalLength() == 0L) return;\r\n\r\n            if (ClearCacheSettings == null)\r\n            {\r\n                ClearCacheSettings = new ClearCacheSettingsViewModel(_settings, ClearCacheInternal);\r\n                NotifyOfPropertyChange(() => ClearCacheSettings);\r\n            }\r\n\r\n            _settings.SelectAll();\r\n            _settings.NotifyOfPropertyChange(() => _settings.Self);\r\n            BeginOnUIThread(() => ClearCacheSettings.Open());\r\n        }\r\n\r\n        public void ClearLocalDatabase()\r\n        {\r\n            var result = MessageBox.Show(AppResources.ClearLocalDatabaseConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n\r\n            if (result == MessageBoxResult.OK)\r\n            {\r\n                IsWorking = true;\r\n                CacheService.CompressAsync(() =>\r\n                {\r\n                    long newLength;\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        var files = new List<TelegramFileInfo>();\r\n                        newLength = GetDatabaseLength(store, files);\r\n                            \r\n                    }\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        LocalDatabaseStatus = FileSizeConverter.Convert(newLength);\r\n\r\n                        EventAggregator.Publish(new ClearLocalDatabaseEventArgs());\r\n                    });\r\n                });\r\n            }\r\n        }\r\n\r\n        private void ClearCacheInternal()\r\n        {\r\n            if (_isCalculating) return;\r\n            if (_settings == null) return;\r\n            if (IsWorking) return;\r\n\r\n            IsWorking = true;\r\n            BeginOnThreadPool(() =>\r\n            {\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    var fileNames = store.GetFileNames();\r\n                    foreach (var fileName in fileNames)\r\n                    {\r\n                        if (IsValidCacheFileName(fileName))\r\n                        {\r\n                            if (_settings.Photos && IsValidPhotoFileName(fileName))\r\n                            {\r\n                                DeleteFile(store, fileName);\r\n                            }\r\n                            else if (_settings.Music && IsValidMusicFileName(fileName))\r\n                            {\r\n                                DeleteFile(store, fileName);\r\n                            }\r\n                            else if (_settings.Video && IsValidVideoFileName(fileName))\r\n                            {\r\n                                DeleteFile(store, fileName);\r\n                            }\r\n                            else if (_settings.VoiceMessages && IsValidVoiceMessageFileName(fileName))\r\n                            {\r\n                                DeleteFile(store, fileName);\r\n                            }\r\n                            else if (_settings.Documents && IsValidDocumentFileName(fileName))\r\n                            {\r\n                                DeleteFile(store, fileName);\r\n                            }\r\n                            else if (_settings.OtherFiles && IsValidOtherFileName(fileName))\r\n                            {\r\n                                DeleteFile(store, fileName);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (_settings.Music \r\n                    || _settings.Video \r\n                    || _settings.VoiceMessages \r\n                    || _settings.Documents \r\n                    || _settings.OtherFiles)\r\n                {\r\n                    CacheService.ClearLocalFileNames();\r\n                }\r\n\r\n\r\n                EventAggregator.Publish(new ClearCacheEventArgs());\r\n                var length = _settings.RecalculateLength();                \r\n                Status = FileSizeConverter.Convert(length);\r\n                IsWorking = false;\r\n            });\r\n        }\r\n\r\n        private static void DeleteFile(IsolatedStorageFile store, string fileName)\r\n        {\r\n            try\r\n            {\r\n                store.DeleteFile(fileName);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                TLUtils.WriteException(ex);\r\n            }\r\n        }\r\n\r\n#if WP8\r\n        public async void OpenFile(TelegramFileInfo fileInfo)\r\n        {\r\n            var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n            if (store.FileExists(fileInfo.Name))\r\n            {\r\n                var file = await ApplicationData.Current.LocalFolder.GetFileAsync(fileInfo.Name);\r\n\r\n                if (file != null)\r\n                {\r\n                    Launcher.LaunchFileAsync(file);\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n#endif\r\n    }\r\n\r\n    public class ClearCacheEventArgs\r\n    {\r\n\r\n    }\r\n\r\n    public class ClearLocalDatabaseEventArgs\r\n    {\r\n\r\n    }\r\n\r\n    public class TelegramFileInfo\r\n    {\r\n        public string Name { get; set; }\r\n\r\n        public long Length { get; set; }\r\n\r\n        public bool IsValidCacheFileName { get; set; }\r\n    }\r\n\r\n    public class ClearCacheSettings : TelegramPropertyChangedBase\r\n    {\r\n        public bool Photos { get; set; }\r\n\r\n        public long PhotosLength { get; set; }\r\n\r\n        public Visibility PhotosVisibility { get { return PhotosLength > 0? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        public bool Video { get; set; }\r\n\r\n        public long VideoLength { get; set; }\r\n\r\n        public Visibility VideoVisibility { get { return VideoLength > 0 ? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        public bool Documents { get; set; }\r\n\r\n        public long DocumentsLength { get; set; }\r\n\r\n        public Visibility DocumentsVisibility { get { return DocumentsLength > 0 ? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        public bool Music { get; set; }\r\n\r\n        public long MusicLength { get; set; }\r\n\r\n        public Visibility MusicVisibility { get { return MusicLength > 0 ? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        public bool VoiceMessages { get; set; }\r\n\r\n        public long VoiceMessagesLength { get; set; }\r\n\r\n        public Visibility VoiceMessagesVisibility { get { return VoiceMessagesLength > 0 ? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        public bool OtherFiles { get; set; }\r\n\r\n        public long OtherFilesLength { get; set; }\r\n\r\n        public Visibility OtherFilesVisibility { get { return OtherFilesLength > 0 ? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        public ClearCacheSettings Self { get { return this; } }\r\n\r\n        public ClearCacheSettings()\r\n        {\r\n            Clear();\r\n        }\r\n\r\n        public long TotalLength()\r\n        {\r\n            return PhotosLength + VideoLength + DocumentsLength + MusicLength + VoiceMessagesLength + OtherFilesLength;\r\n        }\r\n\r\n        public long RecalculateLength()\r\n        {\r\n            if (Photos) PhotosLength = 0L;\r\n            if (Video) VideoLength = 0L;\r\n            if (Documents) DocumentsLength = 0L;\r\n            if (Music) MusicLength = 0L;\r\n            if (VoiceMessages) VoiceMessagesLength = 0L;\r\n            if (OtherFiles) OtherFilesLength = 0L;\r\n\r\n            var length = (!Photos ? PhotosLength : 0)\r\n                + (!Video ? VideoLength : 0) \r\n                + (!Documents ? DocumentsLength : 0) \r\n                + (!Music ? MusicLength : 0) \r\n                + (!VoiceMessages ? VoiceMessagesLength : 0) \r\n                + (!OtherFiles ? OtherFilesLength : 0);\r\n\r\n            return length;\r\n        }\r\n\r\n        public void SelectAll()\r\n        {\r\n            Photos = true;\r\n            Video = true;\r\n            Documents = true;\r\n            Music = true;\r\n            VoiceMessages = true;\r\n            OtherFiles = true;\r\n        }\r\n\r\n        public void Clear()\r\n        {\r\n            SelectAll();\r\n\r\n            PhotosLength = 0L;\r\n            VideoLength = 0L;\r\n            DocumentsLength = 0L;\r\n            MusicLength = 0L;\r\n            VoiceMessagesLength = 0L;\r\n            OtherFilesLength = 0L;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChangePasscodeViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChangePasscodeViewModel : ViewModelBase\r\n    {\r\n        private string _passcode;\r\n\r\n        public string Passcode\r\n        {\r\n            get { return _passcode; }\r\n            set\r\n            {\r\n                SetField(ref _passcode, value, () => Passcode);\r\n                NotifyOfPropertyChange(() => IsPasscodeValid);\r\n            }\r\n        }\r\n\r\n        private string _confirmPasscode;\r\n\r\n        public string ConfirmPasscode\r\n        {\r\n            get { return _confirmPasscode; }\r\n            set\r\n            {\r\n                SetField(ref _confirmPasscode, value, () => ConfirmPasscode);\r\n                NotifyOfPropertyChange(() => IsPasscodeValid);\r\n            }\r\n        }\r\n\r\n        private PasscodeTypeItem _selectedPasscodeType;\r\n\r\n        public PasscodeTypeItem SelectedPasscodeType\r\n        {\r\n            get { return _selectedPasscodeType; }\r\n            set\r\n            {\r\n                SetField(ref _selectedPasscodeType, value, () => SelectedPasscodeType);\r\n                NotifyOfPropertyChange(() => IsPasscodeValid);\r\n                NotifyOfPropertyChange(() => Simple);\r\n            }\r\n        }\r\n\r\n        public bool Simple\r\n        {\r\n            get { return _selectedPasscodeType != null && _selectedPasscodeType.Type == PasscodeType.Pin; }\r\n        }\r\n\r\n        public IList<PasscodeTypeItem> PasscodeTypes { get; set; } \r\n\r\n        public bool IsPasscodeValid\r\n        {\r\n            get\r\n            {\r\n                return\r\n                    CheckPasscode(Passcode)\r\n                    && string.Equals(Passcode, ConfirmPasscode);\r\n            }\r\n        }\r\n\r\n        public bool CheckPasscode(string passcode)\r\n        {\r\n            if (string.IsNullOrEmpty(passcode))\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (Simple)\r\n            {\r\n                return PasscodeUtils.CheckSimple(passcode);\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private int _selectedAutolockTimeout;\r\n\r\n        public ChangePasscodeViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            PasscodeTypes = new List<PasscodeTypeItem>();\r\n            PasscodeTypes.Add(new PasscodeTypeItem(AppResources.Pin, PasscodeType.Pin));\r\n            PasscodeTypes.Add(new PasscodeTypeItem(AppResources.Passcode, PasscodeType.Passcode));\r\n\r\n            _selectedPasscodeType = PasscodeTypes.First();\r\n            _selectedAutolockTimeout = StateService.SelectedAutolockTimeout;\r\n            StateService.SelectedAutolockTimeout = 0;\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (!IsPasscodeValid) return;\r\n\r\n            var isSimplePasscode = _selectedPasscodeType != null && _selectedPasscodeType.Type == PasscodeType.Pin;\r\n            if (isSimplePasscode)\r\n            {\r\n                isSimplePasscode = PasscodeUtils.CheckSimple(Passcode);\r\n            }\r\n\r\n            PasscodeUtils.SetParams(Passcode, isSimplePasscode, _selectedAutolockTimeout);\r\n            UpdateDeviceLockedAsync();\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        private void UpdateDeviceLockedAsync()\r\n        {\r\n            var shellViewModel = IoC.Get<ShellViewModel>();\r\n            if (shellViewModel != null)\r\n            {\r\n                shellViewModel.UpdateDeviceLockedAsync();\r\n            }\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n    }\r\n\r\n    public class PasscodeTypeItem\r\n    {\r\n        public string Caption { get; set; }\r\n\r\n        public PasscodeType Type { get; set; }\r\n\r\n        public PasscodeTypeItem(string caption, PasscodeType type)\r\n        {\r\n            Caption = caption;\r\n            Type = type;\r\n        }\r\n    }\r\n\r\n    public enum PasscodeType\r\n    {\r\n        Pin,\r\n        Passcode\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChangePasswordEmailViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.Text.RegularExpressions;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChangePasswordEmailViewModel : ChangePasswordViewModelBase\r\n    {\r\n        public Visibility SkipRecoveryEmailVisibility\r\n        {\r\n            get { return _newPasswordSettings != null ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        private string _recoveryEmail;\r\n\r\n        public string RecoveryEmail\r\n        {\r\n            get { return _recoveryEmail; }\r\n            set\r\n            {\r\n                SetField(ref _recoveryEmail, value, () => RecoveryEmail);\r\n                NotifyOfPropertyChange(() => CanChangeRecoveryEmail);\r\n            }\r\n        }\r\n\r\n        public ChangePasswordEmailViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public static bool IsValidEmail(string email)\r\n        {\r\n            if (string.IsNullOrEmpty(email)) return false;\r\n\r\n            var regex = new Regex(@\"^([\\w\\.\\-]+)@([\\w\\-]+)((\\.(\\w){2,6})+)$\");\r\n            var match = regex.Match(email);\r\n\r\n            return match.Success;\r\n        }\r\n\r\n        public bool CanChangeRecoveryEmail\r\n        {\r\n            get { return IsValidEmail(_recoveryEmail); }\r\n        }\r\n\r\n        public void ChangeRecoveryEmail()\r\n        {\r\n            if (IsWorking) return;\r\n            if (!CanChangeRecoveryEmail) return;\r\n\r\n            var password84 = _passwordBase as TLPassword84;\r\n            if (password84 == null) return;\r\n\r\n            TLPasswordInputSettings newSettings;\r\n            if (_newPasswordSettings != null)\r\n            {\r\n                newSettings = _newPasswordSettings;\r\n                newSettings.Email = new TLString(RecoveryEmail);\r\n            }\r\n            else\r\n            {\r\n                newSettings = new TLPasswordInputSettings83\r\n                {\r\n                    Flags = new TLInt(0),\r\n                    Email = new TLString(RecoveryEmail)\r\n                };\r\n            }\r\n\r\n           UpdatePasswordSettings(password84, newSettings);\r\n        }\r\n\r\n        public void SkipRecoveryEmail()\r\n        {\r\n            if (IsWorking) return;\r\n            if (_newPasswordSettings == null) return;\r\n\r\n            var password84 = _passwordBase as TLPassword84;\r\n            if (password84 == null) return;\r\n\r\n            var result = MessageBox.Show(AppResources.SkipRecoveryEmailHint, AppResources.AppName, MessageBoxButton.OKCancel);\r\n            if (result == MessageBoxResult.OK)\r\n            {\r\n                \r\n                UpdatePasswordSettings(password84, _newPasswordSettings);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChangePasswordHintViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChangePasswordHintViewModel : ChangePasswordViewModelBase\r\n    {\r\n        private string _passwordHint;\r\n\r\n        public string PasswordHint\r\n        {\r\n            get { return _passwordHint; }\r\n            set\r\n            {\r\n                SetField(ref _passwordHint, value, () => PasswordHint);\r\n                NotifyOfPropertyChange(() => CanChangePasswordHint);\r\n            }\r\n        }\r\n\r\n        public ChangePasswordHintViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            var password = PasswordViewModel.TempNewPassword;\r\n            if (!string.IsNullOrEmpty(password) && password.Length > 2)\r\n            {\r\n                PasswordHint = string.Format(\"{0}{1}{2}\",\r\n                    password[0],\r\n                    new string('*', password.Length - 2),\r\n                    password[password.Length - 1]);\r\n            }\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public bool CanChangePasswordHint\r\n        {\r\n            get\r\n            {\r\n                return !string.Equals(PasswordViewModel.TempNewPassword, PasswordHint);\r\n            }\r\n        }\r\n\r\n        public void ChangePasswordHint()\r\n        {\r\n            if (_passwordBase == null) return;\r\n            if (_newPasswordSettings == null) return;\r\n            if (!CanChangePasswordHint)\r\n            {\r\n                HasError = true;\r\n                Error = AppResources.PasswordHintError;\r\n                return;\r\n            }\r\n\r\n            HasError = false;\r\n            Error = string.Empty;\r\n\r\n            var newSettings = _newPasswordSettings;\r\n            newSettings.Hint = new TLString(PasswordHint);\r\n\r\n            var password = _passwordBase as TLPassword84;\r\n            if (password != null && password.HasRecovery.Value)\r\n            {\r\n                UpdatePasswordSettings(password, newSettings);\r\n\r\n                return;\r\n            }\r\n\r\n            StateService.Password = _passwordBase;\r\n            StateService.NewPasswordSettings = newSettings;\r\n            StateService.RemoveBackEntry = true;\r\n            StateService.AuthorizationForm = _authorizationForm;\r\n            StateService.SecureValues = _secureValues;\r\n            NavigationService.UriFor<ChangePasswordEmailViewModel>().Navigate();\r\n        }\r\n\r\n        \r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChangePasswordViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChangePasswordViewModel : ChangePasswordViewModelBase\r\n    {\r\n        private string _password;\r\n\r\n        public string Password\r\n        {\r\n            get { return _password; }\r\n            set\r\n            {\r\n                SetField(ref _password, value, () => Password);\r\n                NotifyOfPropertyChange(() => CanChangePassword);\r\n            }\r\n        }\r\n\r\n        private string _confirmPassword;\r\n\r\n        public string ConfirmPassword\r\n        {\r\n            get { return _confirmPassword; }\r\n            set\r\n            {\r\n                SetField(ref _confirmPassword, value, () => ConfirmPassword);\r\n                NotifyOfPropertyChange(() => CanChangePassword);\r\n            }\r\n        }\r\n\r\n        public ChangePasswordViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public bool CanChangePassword\r\n        {\r\n            get { return !string.IsNullOrEmpty(_password) && string.Equals(_password, _confirmPassword); }\r\n        }\r\n\r\n        public void ChangePassword()\r\n        {\r\n            if (!CanChangePassword) return;\r\n\r\n            var password84 = _passwordBase as TLPassword84;\r\n            if (password84 == null) return;\r\n\r\n            var newAlgo = password84.NewAlgo as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n            if (newAlgo == null) return;\r\n\r\n            Utils.Password.AddClientSalt(newAlgo);\r\n\r\n            //var newPasswordHash = SRP.GetX(new TLString(_password), newAlgo);\r\n            //var newPasswordInputHash = SRP.GetVBytes(new TLString(_password), newAlgo);\r\n            //Utils.Password.GetHash(newSalt, new TLString(_password));\r\n\r\n            var inputSettings = new TLPasswordInputSettings83\r\n            {\r\n                Flags = new TLInt(0),\r\n                NewAlgo = newAlgo,\r\n                NewPasswordHash = null,\r\n                Hint = TLString.Empty,\r\n                NewPassword = _password\r\n            };\r\n\r\n            // reencrypt secure_secret\r\n            var passwordSecret = _passwordBase as IPasswordSecret;\r\n            if (passwordSecret != null)\r\n            {\r\n                TLPasswordSettings83 passwordSettings = null;\r\n                var password = _passwordBase as TLPassword81;\r\n                if (password != null)\r\n                {\r\n                    passwordSettings = password.Settings as TLPasswordSettings83;\r\n                }\r\n                if (passwordSettings == null || passwordSettings.SecureSettings == null)\r\n                {\r\n                    Utils.Password.AddRandomSecureSecret(inputSettings, passwordSecret, new TLString(_password));\r\n                }\r\n                else\r\n                {\r\n                    var secret = Utils.Passport.DecryptSecureSecret(passwordSettings.SecureSettings.SecureSecret, new TLString(PasswordViewModel.Password), passwordSettings.SecureSettings.SecureAlgo);\r\n                    Utils.Password.AddSecureSecret(secret, inputSettings, passwordSecret, new TLString(_password));\r\n                }\r\n            }\r\n\r\n            PasswordViewModel.TempNewPassword = Password;\r\n\r\n            StateService.Password = _passwordBase;\r\n            StateService.NewPasswordSettings = inputSettings;\r\n            StateService.RemoveBackEntry = true;\r\n            StateService.AuthorizationForm = _authorizationForm;\r\n            StateService.SecureValues = _secureValues;\r\n            NavigationService.UriFor<ChangePasswordHintViewModel>().Navigate();\r\n\r\n            return;\r\n        }\r\n    }\r\n\r\n    public abstract class ChangePasswordViewModelBase : ViewModelBase\r\n    {\r\n\r\n        private bool _hasError;\r\n\r\n        public bool HasError\r\n        {\r\n            get { return _hasError; }\r\n            set { SetField(ref _hasError, value, () => HasError); }\r\n        }\r\n\r\n        private string _error;\r\n\r\n        public string Error\r\n        {\r\n            get { return _error; }\r\n            set { SetField(ref _error, value, () => Error); }\r\n        }\r\n\r\n        protected TLPasswordInputSettings _newPasswordSettings;\r\n\r\n        protected TLPasswordBase _passwordBase;\r\n\r\n        protected TLAuthorizationForm _authorizationForm;\r\n\r\n        protected IList<TLSecureValue> _secureValues;\r\n\r\n        protected ChangePasswordViewModelBase(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _passwordBase = StateService.Password;\r\n            StateService.Password = null;\r\n\r\n            _newPasswordSettings = StateService.NewPasswordSettings;\r\n            StateService.NewPasswordSettings = null;\r\n\r\n            _authorizationForm = StateService.AuthorizationForm;\r\n            StateService.AuthorizationForm = null;\r\n\r\n            _secureValues = StateService.SecureValues;\r\n            StateService.SecureValues = null;\r\n        }\r\n\r\n        protected void UpdatePasswordSettings(TLPassword84 password, TLPasswordInputSettings newSettings)\r\n        {\r\n            IsWorking = true;\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                MTProtoService.GetPasswordAsync(\r\n                    result1 =>\r\n                    {\r\n                        var srpParams = result1 as IPasswordSRPParams;\r\n                        if (srpParams == null)\r\n                        {\r\n                            BeginOnUIThread(() => IsWorking = false);\r\n                            return;\r\n                        }\r\n\r\n                        var newSettings83 = newSettings as TLPasswordInputSettings83;\r\n                        if (newSettings83 == null) return;\r\n\r\n                        // calculate new password hash if password will be changed\r\n                        TLString newPasswordHash = null;\r\n                        var newAlgo = newSettings83.NewAlgo as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n                        if (newAlgo != null)\r\n                        {\r\n                            if (string.IsNullOrEmpty(newSettings83.NewPassword)) return;\r\n\r\n                            newPasswordHash = SRP.GetX(new TLString(newSettings83.NewPassword), newAlgo); \r\n\r\n                            newSettings83.NewPasswordHash = SRP.GetVBytes(new TLString(newSettings83.NewPassword), newAlgo);\r\n                        }\r\n\r\n                        var currentPasswordHash = password.CurrentPasswordHash ?? TLString.Empty;\r\n                        MTProtoService.UpdatePasswordSettingsAsync(SRP.GetCheck(currentPasswordHash, srpParams.SRPId, srpParams.SRPB, srpParams.CurrentAlgo), newSettings,\r\n                           result2 =>\r\n                           {\r\n                               IsWorking = false;\r\n                               MTProtoService.GetPasswordAsync(\r\n                                   result3 => BeginOnUIThread(() =>\r\n                                   {\r\n                                       EventAggregator.Publish(result3);\r\n\r\n                                       var password84 = result3 as TLPassword84;\r\n                                       if (password84 != null)\r\n                                       {\r\n                                           password84.CurrentPasswordHash = newPasswordHash ?? password84.CurrentPasswordHash;\r\n                                       }\r\n\r\n                                       MessageBox.Show(AppResources.PasswordActive, AppResources.Success, MessageBoxButton.OK);\r\n\r\n                                       if (password84 != null && (_authorizationForm != null || _secureValues != null))\r\n                                       {\r\n                                           MTProtoService.GetPasswordSettingsAsync(SRP.GetCheck(password84.CurrentPasswordHash, password84.SRPId, password84.SRPB, password84.CurrentAlgo),\r\n                                               result4 => BeginOnUIThread(() =>\r\n                                               {\r\n                                                   Passport.EnterPasswordViewModel.NavigateToPassportCommon(\r\n                                                       result4, password84, new TLString(PasswordViewModel.TempNewPassword),\r\n                                                       _authorizationForm, _secureValues,\r\n                                                       MTProtoService, StateService, NavigationService);\r\n                                               }),\r\n                                               error4 => BeginOnUIThread(() =>\r\n                                               {\r\n                                                   if (error4.TypeEquals(ErrorType.PASSWORD_HASH_INVALID))\r\n                                                   {\r\n                                                       StateService.AuthorizationForm = _authorizationForm;\r\n                                                       StateService.Password = password84;\r\n                                                       NavigationService.UriFor<Passport.EnterPasswordViewModel>().WithParam(x => x.RandomParam, Guid.NewGuid().ToString()).Navigate();\r\n                                                   }\r\n                                               }));\r\n                                       }\r\n                                       else\r\n                                       {\r\n                                           StateService.Password = result3;\r\n                                           NavigationService.GoBack();\r\n                                       }\r\n                                   }),\r\n                                   error3 => BeginOnUIThread(() =>\r\n                                   {\r\n                                       Execute.ShowDebugMessage(\"account.getPassword error \" + error3);\r\n                                   }));\r\n                           },\r\n                           error2 => BeginOnUIThread(() =>\r\n                           {\r\n                               IsWorking = false;\r\n                               var messageBuilder = new StringBuilder();\r\n                               //messageBuilder.AppendLine(AppResources.Error);\r\n                               //messageBuilder.AppendLine();\r\n                               messageBuilder.AppendLine(\"Method: account.updatePasswordSettings\");\r\n                               messageBuilder.AppendLine(\"Result: \" + error2);\r\n\r\n                               if (TLRPCError.CodeEquals(error2, ErrorCode.FLOOD))\r\n                               {\r\n                                   HasError = true;\r\n                                   Error = AppResources.FloodWaitString;\r\n                                   Telegram.Api.Helpers.Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.FloodWaitString, AppResources.Error, MessageBoxButton.OK));\r\n                               }\r\n                               else if (TLRPCError.CodeEquals(error2, ErrorCode.INTERNAL))\r\n                               {\r\n                                   HasError = true;\r\n                                   Error = AppResources.ServerError;\r\n                                   Telegram.Api.Helpers.Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK));\r\n                               }\r\n                               else if (TLRPCError.CodeEquals(error2, ErrorCode.BAD_REQUEST))\r\n                               {\r\n                                   if (TLRPCError.TypeEquals(error2, ErrorType.PASSWORD_HASH_INVALID))\r\n                                   {\r\n                                       HasError = true;\r\n                                       Error = string.Format(\"{0} {1}\", error2.Code, error2.Message);\r\n                                       Telegram.Api.Helpers.Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                   }\r\n                                   else if (TLRPCError.TypeEquals(error2, ErrorType.NEW_PASSWORD_BAD))\r\n                                   {\r\n                                       HasError = true;\r\n                                       Error = string.Format(\"{0} {1}\", error2.Code, error2.Message);\r\n                                       Telegram.Api.Helpers.Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                   }\r\n                                   else if (TLRPCError.TypeEquals(error2, ErrorType.NEW_SALT_INVALID))\r\n                                   {\r\n                                       HasError = true;\r\n                                       Error = string.Format(\"{0} {1}\", error2.Code, error2.Message);\r\n                                       Telegram.Api.Helpers.Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                   }\r\n                                   else if (TLRPCError.TypeEquals(error2, ErrorType.EMAIL_INVALID))\r\n                                   {\r\n                                       HasError = true;\r\n                                       Error = AppResources.EmailInvalid;\r\n                                       Telegram.Api.Helpers.Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.EmailInvalid, AppResources.Error, MessageBoxButton.OK));\r\n                                   }\r\n                                   else if (TLRPCError.TypeEquals(error2, ErrorType.EMAIL_UNCONFIRMED))\r\n                                   {\r\n                                       HasError = false;\r\n                                       Error = string.Empty;\r\n                                       MTProtoService.GetPasswordAsync(\r\n                                            result3 => BeginOnUIThread(() =>\r\n                                            {\r\n                                                IsWorking = false;\r\n                                                password = result3 as TLPassword84;\r\n                                                if (password != null)\r\n                                                {\r\n                                                    password.CurrentPasswordHash = currentPasswordHash; //EMAIL_UNCONFIRMED - new settings are not active yet\r\n                                                }\r\n\r\n                                                MessageBox.Show(AppResources.CompletePasswordHint, AppResources.AlmostThere, MessageBoxButton.OK);\r\n\r\n                                                if (_authorizationForm != null || _secureValues != null)\r\n                                                {\r\n                                                    StateService.AuthorizationForm = _authorizationForm;\r\n                                                    StateService.SecureValues = _secureValues;\r\n                                                    StateService.Password = result3;\r\n                                                    StateService.RemoveBackEntry = true;\r\n                                                    NavigationService.UriFor<PasswordViewModel>().Navigate();\r\n                                                }\r\n                                                else\r\n                                                {\r\n                                                    StateService.Password = result3;\r\n                                                    NavigationService.GoBack();\r\n                                                }\r\n                                            }),\r\n                                            error3 => Execute.BeginOnUIThread(() =>\r\n                                            {\r\n                                                IsWorking = false;\r\n                                                Execute.ShowDebugMessage(\"account.getPassword error \" + error3);\r\n                                            }));\r\n                                   }\r\n                                   else\r\n                                   {\r\n                                       HasError = true;\r\n                                       Error = string.Format(\"{0} {1}\", error2.Code, error2.Message);\r\n                                       Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                   }\r\n                               }\r\n                               else\r\n                               {\r\n                                   HasError = true;\r\n                                   Error = string.Empty;\r\n                                   Execute.ShowDebugMessage(\"account.updatePasswordSettings error \" + error2);\r\n                               }\r\n                           }));\r\n                    },\r\n                    error1 => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                    }));\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChangePhoneNumberViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChangePhoneNumberViewModel\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChannelBlockedContactsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChannelBlockedContactsViewModel : ItemsViewModelBase<TLUserBase>\r\n    {\r\n        private bool _isEmptyList = true;\r\n\r\n        public bool IsEmptyList\r\n        {\r\n            get { return _isEmptyList; }\r\n            set { SetField(ref _isEmptyList, value, () => IsEmptyList); }\r\n        }\r\n\r\n        public TLChannel Channel { get; set; }\r\n\r\n        public ChannelBlockedContactsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Channel = StateService.CurrentChat as TLChannel;\r\n            StateService.CurrentChat = null;\r\n\r\n            eventAggregator.Subscribe(this);\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            if (Channel == null) return;\r\n\r\n            //Status = AppResources.Loading;\r\n            IsWorking = true;\r\n            MTProtoService.GetParticipantsAsync(Channel.ToInputChannel(), new TLChannelParticipantsKicked68 { Q = TLString.Empty }, new TLInt(0), new TLInt(100), new TLInt(0),\r\n                result =>\r\n                {\r\n                    var channelParticipants = result as TLChannelParticipants;\r\n                    if (channelParticipants != null)\r\n                    {\r\n\r\n                        var kickedParticipants = new Dictionary<int, int>();\r\n                        foreach (var participant in channelParticipants.Participants)\r\n                        {\r\n                            var kickedParticipant = participant as TLChannelParticipantBanned;\r\n                            if (kickedParticipant != null)\r\n                            {\r\n                                kickedParticipants[kickedParticipant.UserId.Value] = kickedParticipant.UserId.Value;\r\n                            }\r\n                        }\r\n\r\n                        var contacts = channelParticipants;\r\n                        foreach (var user in contacts.Users)\r\n                        {\r\n                            if (kickedParticipants.ContainsKey(user.Index))\r\n                            {\r\n                                var cachedUser = CacheService.GetUser(new TLInt(user.Index));\r\n                                if (cachedUser != null)\r\n                                {\r\n                                    LazyItems.Add(cachedUser);\r\n                                }\r\n                                else\r\n                                {\r\n                                    LazyItems.Add(user);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            IsEmptyList = Items.Count == 0 && LazyItems.Count == 0;\r\n                            Status = string.Empty;\r\n                            PopulateItems();\r\n                        });\r\n                    }\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n                }));\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        public void UnblockContact(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.KickFromChannelAsync(Channel,\r\n                user.ToInputUser(),\r\n                TLBool.False,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    Items.Remove(user);\r\n\r\n                    IsWorking = false;\r\n                    IsEmptyList = Items.Count == 0 && LazyItems.Count == 0;\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                }));\r\n        }\r\n\r\n        public void UserAction(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            OpenContactDetails(user);\r\n        }\r\n\r\n        public void OpenContactDetails(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            StateService.CurrentContact = user;\r\n            NavigationService.UriFor<ContactViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChatInviteViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChatInviteViewModel : IHandle<DownloadableItem>\r\n    {\r\n        public TLChatInvite54 ChatInvite { get; set; }\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        public ChatInviteViewModel(ITelegramEventAggregator eventAggregator)\r\n        {\r\n            _eventAggregator = eventAggregator;\r\n\r\n            _eventAggregator.Subscribe(this);\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var chatPhoto = item.Owner as TLChatPhoto;\r\n            if (chatPhoto != null && chatPhoto == ChatInvite.Photo)\r\n            {\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    ChatInvite.NotifyOfPropertyChange(() => ChatInvite.Photo);\r\n                });\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChatSettingsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Threading.Tasks;\r\nusing Windows.Phone.PersonalInformation;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChatSettingsViewModel : ViewModelBase\r\n    {\r\n        private bool _locationServices;\r\n\r\n        public bool LocationServices\r\n        {\r\n            get { return _locationServices; }\r\n            set\r\n            {\r\n                SetField(ref _locationServices, value, () => LocationServices);\r\n                StateService.GetNotifySettingsAsync(settings =>\r\n                {\r\n                    settings.LocationServices = value;\r\n                    StateService.SaveNotifySettingsAsync(settings);\r\n                });\r\n            }\r\n        }\r\n\r\n        private bool _isPeopleHubEnabled = true;\r\n\r\n        public bool IsPeopleHubEnabled\r\n        {\r\n            get { return _isPeopleHubEnabled; }\r\n            set { SetField(ref _isPeopleHubEnabled, value, () => IsPeopleHubEnabled); }\r\n        }\r\n\r\n        private bool _peopleHub;\r\n\r\n        public bool PeopleHub\r\n        {\r\n            get { return _peopleHub; }\r\n            set\r\n            {\r\n                SetField(ref _peopleHub, value, () => PeopleHub);\r\n                StateService.GetNotifySettingsAsync(settings =>\r\n                {\r\n                    settings.PeopleHub = value;\r\n                    StateService.SaveNotifySettingsAsync(settings);\r\n                });\r\n            }\r\n        }\r\n\r\n        private readonly TLChatSettings _chatSettings;\r\n\r\n        public bool AutoDownloadPhotoPrivateChats\r\n        {\r\n            get { return _chatSettings.AutoDownloadPhotoPrivateChats; }\r\n            set { _chatSettings.AutoDownloadPhotoPrivateChats = value; }\r\n        }\r\n\r\n        public bool AutoDownloadPhotoGroups\r\n        {\r\n            get { return _chatSettings.AutoDownloadPhotoGroups; }\r\n            set { _chatSettings.AutoDownloadPhotoGroups = value; }\r\n        }\r\n\r\n        public bool AutoDownloadAudioPrivateChats\r\n        {\r\n            get { return _chatSettings.AutoDownloadAudioPrivateChats; }\r\n            set { _chatSettings.AutoDownloadAudioPrivateChats = value; }\r\n        }\r\n\r\n        public bool AutoDownloadAudioGroups\r\n        {\r\n            get { return _chatSettings.AutoDownloadAudioGroups; }\r\n            set { _chatSettings.AutoDownloadAudioGroups = value; }\r\n        }\r\n\r\n        public bool AutoDownloadGifPrivateChats\r\n        {\r\n            get { return _chatSettings.AutoDownloadGifPrivateChats; }\r\n            set { _chatSettings.AutoDownloadGifPrivateChats = value; }\r\n        }\r\n\r\n        public bool AutoDownloadGifGroups\r\n        {\r\n            get { return _chatSettings.AutoDownloadGifGroups; }\r\n            set { _chatSettings.AutoDownloadGifGroups = value; }\r\n        }\r\n\r\n        public bool AutoPlayGif\r\n        {\r\n            get { return _chatSettings.AutoPlayGif; }\r\n            set { _chatSettings.AutoPlayGif = value; }\r\n        }\r\n\r\n        private IFileManager DownloadManager\r\n        {\r\n            get { return IoC.Get<IFileManager>(); }\r\n        }\r\n\r\n        public ChatSettingsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _chatSettings = StateService.GetChatSettings();\r\n\r\n\r\n            StateService.GetNotifySettingsAsync(\r\n                settings =>\r\n                {\r\n                    _locationServices = settings.LocationServices;\r\n                    _peopleHub = settings.PeopleHub;\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        NotifyOfPropertyChange(() => LocationServices);\r\n                    });\r\n                });\r\n\r\n            PropertyChanged += OnPropertyChanged;\r\n        }\r\n\r\n        public static ContactsOperationToken PreviousToken;\r\n\r\n        private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => PeopleHub))\r\n            {\r\n#if WP8\r\n                if (PreviousToken != null)\r\n                {\r\n                    PreviousToken.IsCanceled = true;\r\n                }\r\n\r\n                if (PeopleHub)\r\n                {\r\n                    var contacts = CacheService.GetContacts().Where(x => x != null && x.IsContact).ToList();\r\n                    var token = new ContactsOperationToken();\r\n\r\n                    PreviousToken = token;\r\n                    ContactsHelper.ImportContactsAsync(DownloadManager, token, contacts,\r\n                        tuple =>\r\n                        {\r\n                            var importedCount = tuple.Item1;\r\n                            var totalCount = tuple.Item2;\r\n\r\n                            var isComplete = importedCount == totalCount;\r\n                            if (isComplete)\r\n                            {\r\n                                PreviousToken = null;\r\n                            }\r\n\r\n                            var duration = isComplete ? 0.5 : 2.0;\r\n                            MTProtoService.SetMessageOnTime(duration,\r\n                                string.Format(AppResources.SyncContactsProgress, importedCount, totalCount));\r\n                        },\r\n                        () =>\r\n                        {\r\n                            MTProtoService.SetMessageOnTime(0.0, string.Empty);\r\n                        });\r\n                }\r\n                else\r\n                {\r\n                    IsPeopleHubEnabled = false;\r\n                    MTProtoService.SetMessageOnTime(25.0, AppResources.DeletingContacts);\r\n                    ContactsHelper.DeleteContactsAsync(() =>\r\n                    {\r\n                        IsPeopleHubEnabled = true;\r\n                        MTProtoService.SetMessageOnTime(0.0, string.Empty);\r\n                    });\r\n                }\r\n#endif\r\n            }\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            base.OnDeactivate(close);\r\n\r\n            StateService.SaveChatSettings(_chatSettings);\r\n        }\r\n\r\n        public void OpenBackgrounds()\r\n        {\r\n            StateService.GetWallpapersAsync(result => BeginOnUIThread(() =>\r\n            {\r\n                StateService.Wallpapers = result;\r\n                NavigationService.UriFor<ChooseBackgroundViewModel>().Navigate();\r\n            }));\r\n        }\r\n\r\n        public void OpenCacheSettings()\r\n        {\r\n            NavigationService.UriFor<CacheViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenCameraSettings()\r\n        {\r\n            var settings = StateService.GetCameraSettings();\r\n            NavigationService.UriFor<CameraViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenPhotoPickerSettings()\r\n        {\r\n            var settings = StateService.GetPhotoPickerSettings();\r\n            NavigationService.UriFor<PhotoPickerViewModel>().Navigate();\r\n        }\r\n    }\r\n\r\n    public class ContactsOperationToken\r\n    {\r\n        public volatile bool IsCanceled;\r\n    }\r\n\r\n    public static class ContactsHelper\r\n    {\r\n        private static readonly object _delayedContactsSyncRoot = new object();\r\n\r\n        private static TLVector<TLInt> _delayedContacts;\r\n\r\n        public static void GetDelayedContactsAsync(Action<TLVector<TLInt>> callback)\r\n        {\r\n            if (_delayedContacts != null)\r\n            {\r\n                callback.SafeInvoke(_delayedContacts);\r\n            }\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _delayedContacts = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLInt>>(_delayedContactsSyncRoot, Constants.DelayedContactsFileName) ?? new TLVector<TLInt>();\r\n                callback.SafeInvoke(_delayedContacts);\r\n            });\r\n        }\r\n\r\n        public static void SaveDelayedContactsAsync(TLVector<TLInt> contacts)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                TLUtils.SaveObjectToMTProtoFile(_delayedContactsSyncRoot, Constants.DelayedContactsFileName, contacts);\r\n            });\r\n        }\r\n\r\n        public static void UpdateDelayedContactsAsync(ICacheService cacheService, IMTProtoService mtProtoService)\r\n        {\r\n#if WP8\r\n            GetDelayedContactsAsync(contactIds =>\r\n            {\r\n                var contacts = new List<TLUserBase>();\r\n                foreach (var contactId in contactIds)\r\n                {\r\n                    var userBase = cacheService.GetUser(contactId);\r\n                    if (userBase != null && userBase.IsContact)\r\n                    {\r\n                        contacts.Add(userBase);\r\n                    }\r\n                }\r\n\r\n                if (contacts.Count > 0)\r\n                {\r\n                    var token = new ContactsOperationToken();\r\n                    var fileManager = IoC.Get<IFileManager>();\r\n                    ChatSettingsViewModel.PreviousToken = token;\r\n                    ImportContactsAsync(fileManager, token, contacts,\r\n                        tuple =>\r\n                        {\r\n                            var importedCount = tuple.Item1;\r\n                            var totalCount = tuple.Item2;\r\n\r\n                            var isComplete = importedCount == totalCount;\r\n                            if (isComplete)\r\n                            {\r\n                                ChatSettingsViewModel.PreviousToken = null;\r\n                            }\r\n\r\n                            var duration = isComplete ? 0.5 : 2.0;\r\n                            mtProtoService.SetMessageOnTime(duration,\r\n                                string.Format(AppResources.SyncContactsProgress, importedCount, totalCount));\r\n                        },\r\n                        () =>\r\n                        {\r\n                            mtProtoService.SetMessageOnTime(0.0, string.Empty);\r\n                        });\r\n                }\r\n            });\r\n#endif\r\n        }\r\n\r\n        public static void UpdateContactAsync(IFileManager fileManager, IStateService stateService, TLUserBase contact)\r\n        {\r\n#if WP8\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                stateService.GetNotifySettingsAsync(\r\n                async settings =>\r\n                {\r\n                    if (settings.PeopleHub)\r\n                    {\r\n                        var store = await ContactStore.CreateOrOpenAsync();\r\n                        var delayedContact = await UpdateContactInternalAsync(contact, fileManager, store, false);\r\n                        if (delayedContact != null)\r\n                        {\r\n                            GetDelayedContactsAsync(contacts =>\r\n                            {\r\n                                contacts.Add(delayedContact.Id);\r\n                                SaveDelayedContactsAsync(contacts);\r\n                            });\r\n                        }\r\n                    }\r\n                }));\r\n#endif\r\n        }\r\n\r\n        public static void DeleteContactAsync(IStateService stateService, TLInt userId)\r\n        {\r\n#if WP8\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                stateService.GetNotifySettingsAsync(\r\n                async settings =>\r\n                {\r\n                    if (settings.PeopleHub)\r\n                    {\r\n                        var store = await ContactStore.CreateOrOpenAsync();\r\n                        var phoneContact = await store.FindContactByRemoteIdAsync(userId.ToString());\r\n                        await store.DeleteContactAsync(phoneContact.Id);\r\n                    }\r\n                }));\r\n#endif\r\n        }\r\n\r\n        public static void CreateContactAsync(IFileManager fileManager, IStateService stateService, TLUserBase contact)\r\n        {\r\n#if WP8\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                stateService.GetNotifySettingsAsync(\r\n                async settings =>\r\n                {\r\n                    if (settings.PeopleHub)\r\n                    {\r\n                        var store = await ContactStore.CreateOrOpenAsync();\r\n                        var delayedContact = await UpdateContactInternalAsync(contact, fileManager, store, true);\r\n                        if (delayedContact != null)\r\n                        {\r\n                            GetDelayedContactsAsync(contacts =>\r\n                            {\r\n                                contacts.Add(delayedContact.Id);\r\n                                SaveDelayedContactsAsync(contacts);\r\n                            });\r\n                        }\r\n                    }\r\n                }));\r\n#endif\r\n        }\r\n\r\n        public static void DeleteContactsAsync(System.Action callback)\r\n        {\r\n#if WP8\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(\r\n                async () =>\r\n                {\r\n                    var store = await ContactStore.CreateOrOpenAsync();\r\n                    try\r\n                    {\r\n                        await store.DeleteAsync();\r\n                        FileUtils.Delete(_delayedContactsSyncRoot, Constants.DelayedContactsFileName);\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"store.DeleteAsync ex \" + ex);\r\n                    }\r\n                    finally\r\n                    {\r\n                        callback.SafeInvoke();\r\n                    }\r\n                });\r\n#endif\r\n        }\r\n\r\n#if WP8\r\n        public static async Task<TLUserBase> UpdateContactInternalAsync(TLUserBase contact, IFileManager fileManager, ContactStore store, bool updateOrCreate)\r\n        {\r\n            TLUserBase delayedContact = null;\r\n            var remoteId = contact.Index.ToString(CultureInfo.InvariantCulture);\r\n            var phoneContact = await store.FindContactByRemoteIdAsync(remoteId);\r\n\r\n            if (updateOrCreate)\r\n            {\r\n                phoneContact = phoneContact ?? new StoredContact(store);\r\n            }\r\n\r\n            if (phoneContact == null)\r\n            {\r\n                return delayedContact;\r\n            }\r\n\r\n            phoneContact.RemoteId = remoteId;\r\n            phoneContact.GivenName = contact.FirstName.ToString(); //FirstName\r\n            phoneContact.FamilyName = contact.LastName.ToString(); //LastName\r\n\r\n            var userProfilePhoto = contact.Photo as TLUserProfilePhoto;\r\n            if (userProfilePhoto != null)\r\n            {\r\n                var location = userProfilePhoto.PhotoSmall as TLFileLocation;\r\n                if (location != null)\r\n                {\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.VolumeId,\r\n                        location.LocalId,\r\n                        location.Secret);\r\n                    using (var isoStore = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (isoStore.FileExists(fileName))\r\n                        {\r\n                            using (var file = isoStore.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                            {\r\n                                await phoneContact.SetDisplayPictureAsync(file.AsInputStream());\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            fileManager.DownloadFile(location, userProfilePhoto, new TLInt(0));\r\n                            delayedContact = contact;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var emptyPhoto = contact.Photo as TLPhotoEmpty;\r\n            if (emptyPhoto != null)\r\n            {\r\n                try\r\n                {\r\n                    await phoneContact.SetDisplayPictureAsync(null);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n\r\n                }\r\n            }\r\n\r\n            var props = await phoneContact.GetPropertiesAsync();\r\n            var mobilePhone = contact.Phone.ToString();\r\n            if (mobilePhone.Length > 0)\r\n            {\r\n                props[KnownContactProperties.MobileTelephone] = mobilePhone.StartsWith(\"+\")\r\n                    ? mobilePhone\r\n                    : \"+\" + mobilePhone;\r\n            }\r\n\r\n            var usernameContact = contact as IUserName;\r\n            if (usernameContact != null)\r\n            {\r\n                var username = usernameContact.UserName.ToString();\r\n\r\n                if (username.Length > 0)\r\n                {\r\n                    props[KnownContactProperties.Nickname] = username;\r\n                }\r\n            }\r\n\r\n            await phoneContact.SaveAsync();\r\n\r\n            return delayedContact;\r\n        }\r\n#endif\r\n\r\n        public static void ImportContactsAsync(IFileManager fileManager, ContactsOperationToken token, IList<TLUserBase> contacts, Action<Telegram.Api.WindowsPhone.Tuple<int, int>> progressCallback, System.Action cancelCallback)\r\n        {\r\n#if WP8\r\n            Execute.BeginOnThreadPool(async () =>\r\n            {\r\n                //var contacts = _cacheService.GetContacts();\r\n                var totalCount = contacts.Count;\r\n                if (totalCount == 0) return;\r\n\r\n\r\n                var store = await ContactStore.CreateOrOpenAsync();\r\n                var importedCount = 0;\r\n                var delayedContacts = new TLVector<TLInt>();\r\n                foreach (var contact in contacts)\r\n                {\r\n\r\n                    if (token.IsCanceled)\r\n                    {\r\n                        cancelCallback.SafeInvoke();\r\n                        return;\r\n                    }\r\n\r\n                    try\r\n                    {\r\n                        var delayedContact = await UpdateContactInternalAsync(contact, fileManager, store, true);\r\n                        if (delayedContact != null)\r\n                        {\r\n                            delayedContacts.Add(delayedContact.Id);\r\n                        }\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        // continue import after failed contact\r\n                    }\r\n                    //Thread.Sleep(100);\r\n                    importedCount++;\r\n                    progressCallback.SafeInvoke(new Telegram.Api.WindowsPhone.Tuple<int, int>(importedCount, totalCount));\r\n                    //var duration = importedCount == totalCount ? 0.5 : 2.0;\r\n                    //_mtProtoService.SetMessageOnTime(duration, string.Format(\"Sync contacts ({0} of {1})...\", importedCount, totalCount));\r\n                }\r\n\r\n                var result = new TLVector<TLInt>();\r\n                foreach (var delayedContact in delayedContacts)\r\n                {\r\n                    result.Add(delayedContact);\r\n                }\r\n                SaveDelayedContactsAsync(result);\r\n            });\r\n#endif\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChooseAttachmentViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define INAPP_CAMERA\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Reflection;\r\nusing System.ServiceModel.Channels;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Media.Imaging;\r\nusing Windows.ApplicationModel.Activation;\r\nusing Windows.Storage;\r\nusing Windows.Storage.Pickers;\r\nusing Windows.Storage.Streams;\r\nusing Microsoft.Phone;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.DeviceInfo;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Extensions;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Search;\r\nusing TelegramClient.Views.Additional;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Dialogs;\r\n#if WP81\r\nusing Windows.Graphics.Imaging;\r\nusing Windows.Storage.Pickers;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views.Media;\r\nusing Binding = System.Windows.Data.Binding;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing PhotoFile = TelegramClient.Views.Controls.PhotoFile;\r\nusing TaskResult = Microsoft.Phone.Tasks.TaskResult;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChooseAttachmentViewModel : ViewAware\r\n    {\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen\r\n        {\r\n            get { return _isOpen; }\r\n            set\r\n            {\r\n                if (_isOpen != value)\r\n                {\r\n                    _isOpen = value;\r\n                    NotifyOfPropertyChange(() => IsOpen);\r\n                }\r\n            }\r\n        }\r\n\r\n        private readonly bool _contactEnabled;\r\n\r\n        public Visibility OpenContactVisibility\r\n        {\r\n            get\r\n            {\r\n                return _contactEnabled ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public Visibility OpenCamcorderVisibility\r\n        {\r\n            get\r\n            {\r\n#if WP81\r\n                return _contactEnabled ? Visibility.Visible : Visibility.Collapsed;\r\n#else\r\n                return Visibility.Collapsed;\r\n#endif\r\n            }\r\n        }\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        private readonly INavigationService _navigationService;\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        private readonly TLObject _with;\r\n\r\n        public ObservableCollection<TLUserBase> InlineBots { get; set; }\r\n\r\n        private readonly Action<TLUserBase> _openInlineBotAction;\r\n\r\n        private readonly Action<StorageFile> _sendDocumentAction;\r\n\r\n        private readonly Action<StorageFile> _sendVideoAction;\r\n\r\n        private readonly Action<IReadOnlyList<StorageFile>> _sendPhotosAction;\r\n\r\n        private readonly System.Action _sendLocationAction;\r\n\r\n        private readonly System.Action _sendContactAction;\r\n\r\n        public ChooseAttachmentViewModel(TLObject with,\r\n            Action<TLUserBase> openInlineBotAction,\r\n            Action<StorageFile> sendDocumentAction,\r\n            Action<StorageFile> sendVideoAction,\r\n            Action<IReadOnlyList<StorageFile>> sendPhotosAction,\r\n            System.Action sendLocationAction,\r\n            System.Action sendContactAction,\r\n            ICacheService cacheService, ITelegramEventAggregator eventAggregator, INavigationService navigationService, IStateService stateService, bool contactEnabled = true)\r\n        {\r\n            InlineBots = new ObservableCollection<TLUserBase>();\r\n\r\n            _with = with;\r\n            _openInlineBotAction = openInlineBotAction;\r\n            _sendDocumentAction = sendDocumentAction;\r\n            _sendVideoAction = sendVideoAction;\r\n            _sendPhotosAction = sendPhotosAction;\r\n            _sendLocationAction = sendLocationAction;\r\n            _sendContactAction = sendContactAction;\r\n\r\n            _cacheService = cacheService;\r\n            _stateService = stateService;\r\n            _navigationService = navigationService;\r\n            _eventAggregator = eventAggregator;\r\n\r\n            _contactEnabled = contactEnabled;\r\n            _eventAggregator.Subscribe(this);\r\n        }\r\n\r\n        public void OpenLocation()\r\n        {\r\n            IsOpen = false;\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            {\r\n                _sendLocationAction.SafeInvoke();\r\n            });\r\n        }\r\n\r\n        public void OpenCamera()\r\n        {\r\n            IsOpen = false;\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), async () =>\r\n            {\r\n                var cameraSettings = IoC.Get<IStateService>().GetCameraSettings();\r\n                if (cameraSettings != null && !cameraSettings.External)\r\n                {\r\n\r\n                    SystemTray.IsVisible = false;\r\n                    var frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n\r\n                    double width = 0.0;\r\n                    double height = 0.0;\r\n                    PhoneApplicationPage page = null;\r\n                    if (frame != null)\r\n                    {\r\n                        page = frame.Content as PhoneApplicationPage;\r\n                        if (page != null)\r\n                        {\r\n                            width = page.ActualWidth;\r\n                            height = page.ActualHeight;\r\n                            page.IsHitTestVisible = false;\r\n                            //page.Visibility = Visibility.Collapsed;\r\n                            page.SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;\r\n                        }\r\n                    }\r\n\r\n                    var cameraPage = new CameraPage();\r\n\r\n                    var binding = new Binding();\r\n                    binding.Source = page;\r\n                    binding.Path = new PropertyPath(\"Orientation\");\r\n                    cameraPage.SetBinding(CameraPage.ParentPageOrientationProperty, binding);\r\n\r\n                    cameraPage.Width = width;\r\n                    cameraPage.Height = height;\r\n\r\n                    var telegramMessageBox = new TelegramMessageBox { IsFullScreen = true };\r\n                    telegramMessageBox.Content = cameraPage;\r\n\r\n                    var photoCaptured = false;\r\n                    cameraPage.PhotoCaptured += (sender, args) =>\r\n                    {\r\n                        if (args.File != null)\r\n                        {\r\n                            _sendPhotosAction.SafeInvoke(new ReadOnlyCollection<StorageFile>(new[] { args.File }));\r\n                        }\r\n                        else\r\n                        {\r\n                            photoCaptured = true;\r\n                            telegramMessageBox.Dismiss();\r\n                        }\r\n                    };\r\n                    cameraPage.VideoCaptured += (sender, args) =>\r\n                    {\r\n                        telegramMessageBox.Dismiss();\r\n\r\n                        var dialogDetails = page as IDialogDetailsView;\r\n                        if (dialogDetails != null)\r\n                        {\r\n                            dialogDetails.CreateBitmapCache(() => { });\r\n                        }\r\n\r\n                        Execute.BeginOnUIThread(TimeSpan.FromSeconds(1.0), () => _sendVideoAction.SafeInvoke(args.File));\r\n                    };\r\n                    telegramMessageBox.Show();\r\n                    telegramMessageBox.Dismissing += (sender, args) =>\r\n                    {\r\n\r\n                    };\r\n                    telegramMessageBox.Dismissed += (sender, args) =>\r\n                    {\r\n                        SystemTray.IsVisible = true;\r\n\r\n                        frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n                        if (frame != null)\r\n                        {\r\n                            page = frame.Content as PhoneApplicationPage;\r\n                            if (page != null)\r\n                            {\r\n                                page.IsHitTestVisible = true;\r\n                                //page.Visibility = Visibility.Visible;\r\n                                page.SupportedOrientations = SupportedPageOrientation.Portrait;\r\n                            }\r\n                        }\r\n\r\n                        cameraPage.ClearValue(CameraPage.ParentPageOrientationProperty);\r\n                        if (!photoCaptured) cameraPage.Dispose();\r\n                    };\r\n                }\r\n                else\r\n                {\r\n                    if (Environment.OSVersion.Version.Major >= 10)\r\n                    {\r\n                        object ccu = null;\r\n                        var _type10 = Type.GetType(\"Windows.Media.Capture.CameraCaptureUI, Windows, ContentType=WindowsRuntime\");\r\n                        if (_type10 != null)\r\n                        {\r\n                            ccu = Activator.CreateInstance(_type10);\r\n                        }\r\n                        if (ccu == null) return;\r\n                        var mode = CameraCaptureUIMode.Photo;\r\n                        var modeType = Type.GetType(\"Windows.Media.Capture.CameraCaptureUIMode, Windows, ContentType=WindowsRuntime\");\r\n                        object modeVal = Enum.ToObject(modeType, mode);\r\n                        try\r\n                        {\r\n                            var file = await (Windows.Foundation.IAsyncOperation<StorageFile>)_type10.GetRuntimeMethod(\"CaptureFileAsync\", new Type[] { modeType }).Invoke(ccu, new object[] { modeVal });\r\n                            if (file != null)\r\n                            {\r\n                                _sendPhotosAction.SafeInvoke(new ReadOnlyCollection<StorageFile>(new[] { file }));\r\n                            }\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            Execute.ShowDebugMessage(\"CameraCaptureTask.OnCompleted ex \" + ex);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        ((App)Application.Current).ChooseFileInfo = new ChooseFileInfo(DateTime.Now);\r\n                        var task = new CameraCaptureTask();\r\n                        task.Completed += (o, e) =>\r\n                        {\r\n                            if (e.TaskResult != TaskResult.OK)\r\n                            {\r\n                                return;\r\n                            }\r\n\r\n                            try\r\n                            {\r\n                                var getFileTask = StorageFile.GetFileFromPathAsync(e.OriginalFileName).AsTask();\r\n                                var file = getFileTask.Result;\r\n                                App.Photos = new ReadOnlyCollection<StorageFile>(new[] { file });\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                Execute.ShowDebugMessage(\"CameraCaptureTask.OnCompleted ex \" + ex);\r\n                            }\r\n                        };\r\n                        task.Show();\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void OpenPhoto()\r\n        {\r\n            IsOpen = false;\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), async () =>\r\n            {\r\n#if WP81\r\n                var photoPickerSettings = IoC.Get<IStateService>().GetPhotoPickerSettings();\r\n                if (photoPickerSettings != null && photoPickerSettings.External)\r\n                {\r\n                    var from = _contactEnabled ? \"DialogDetailsView\" : \"SecretDialogDetailsView\";\r\n\r\n                    ((App)Application.Current).ChooseFileInfo = new ChooseFileInfo(DateTime.Now);\r\n                    var fileOpenPicker = new FileOpenPicker();\r\n                    fileOpenPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;\r\n                    fileOpenPicker.ViewMode = PickerViewMode.Thumbnail;\r\n                    fileOpenPicker.FileTypeFilter.Clear();\r\n                    fileOpenPicker.FileTypeFilter.Add(\".bmp\");\r\n                    fileOpenPicker.FileTypeFilter.Add(\".png\");\r\n                    fileOpenPicker.FileTypeFilter.Add(\".jpeg\");\r\n                    fileOpenPicker.FileTypeFilter.Add(\".jpg\");\r\n                    fileOpenPicker.ContinuationData.Add(\"From\", from);\r\n                    fileOpenPicker.ContinuationData.Add(\"Type\", \"Image\");\r\n\r\n                    if (Environment.OSVersion.Version.Major >= 10)\r\n                    {\r\n                        var result = await fileOpenPicker.PickMultipleFilesAsync();\r\n                        if (result.Count > 0)\r\n                        {\r\n                            Execute.BeginOnThreadPool(() =>\r\n                            {\r\n                                _sendPhotosAction.SafeInvoke(result);\r\n                            });\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        fileOpenPicker.PickMultipleFilesAndContinue();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    OpenPhotoPicker(false, (r1, r2) => _sendPhotosAction.SafeInvoke(r1));\r\n                }\r\n#else\r\n                        ((App) Application.Current).ChooseFileInfo = new ChooseFileInfo(DateTime.Now);\r\n                        var task = new PhotoChooserTask { ShowCamera = true };\r\n                        task.Completed += (o, e) => Handle(_stateService, e.ChosenPhoto, e.OriginalFileName);\r\n                        task.Show();\r\n#endif\r\n            });\r\n        }\r\n\r\n        private static OpenPhotoPicker _openPhotoPicker;\r\n\r\n        public static void OpenPhotoPicker(bool isSingleItem, Action<IReadOnlyList<StorageFile>, IReadOnlyCollection<PhotoFile>> callback)\r\n        {\r\n            var isVisible = false;\r\n            var frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            PhoneApplicationPage page = null;\r\n            if (frame != null)\r\n            {\r\n                page = frame.Content as PhoneApplicationPage;\r\n                if (page != null)\r\n                {\r\n                    page.IsHitTestVisible = false;\r\n                    var applicationBar = page.ApplicationBar;\r\n                    if (applicationBar != null)\r\n                    {\r\n                        isVisible = applicationBar.IsVisible;\r\n                        applicationBar.IsVisible = false;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (page == null) return;\r\n\r\n            var popup = new Popup();\r\n            var photoPicker = new OpenPhotoPicker\r\n            {\r\n                IsSingleItem = isSingleItem,\r\n                Width = page.ActualWidth,\r\n                Height = page.ActualHeight\r\n            };\r\n            _openPhotoPicker = photoPicker;\r\n            page.SizeChanged += Page_SizeChanged;\r\n\r\n            photoPicker.Close += (sender, args) =>\r\n            {\r\n                _openPhotoPicker = null;\r\n                popup.IsOpen = false;\r\n                popup.Child = null;\r\n\r\n                frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n                if (frame != null)\r\n                {\r\n                    page = frame.Content as PhoneApplicationPage;\r\n                    if (page != null)\r\n                    {\r\n                        page.SizeChanged -= Page_SizeChanged;\r\n                        page.IsHitTestVisible = true;\r\n                        var applicationBar = page.ApplicationBar;\r\n                        if (applicationBar != null)\r\n                        {\r\n                            applicationBar.IsVisible = isVisible;\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            photoPicker.Pick += (sender, args) =>\r\n            {\r\n                callback.SafeInvoke(args.Files, args.PhotoFiles);\r\n\r\n                photoPicker.TryClose();\r\n            };\r\n\r\n            popup.Child = photoPicker;\r\n            popup.IsOpen = true;\r\n        }\r\n\r\n        private static void Page_SizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            if (_openPhotoPicker != null)\r\n            {\r\n                _openPhotoPicker.Width = e.NewSize.Width;\r\n                _openPhotoPicker.Height = e.NewSize.Height;\r\n            }\r\n        }\r\n\r\n        public void OpenVideo()\r\n        {\r\n            IsOpen = false;\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), async () =>\r\n            {\r\n#if WP81\r\n                if (_contactEnabled)\r\n                {\r\n                    ((App)Application.Current).ChooseFileInfo = new ChooseFileInfo(DateTime.Now);\r\n                    var fileOpenPicker = new FileOpenPicker();\r\n                    fileOpenPicker.ViewMode = PickerViewMode.Thumbnail;\r\n                    fileOpenPicker.FileTypeFilter.Add(\".wmv\");\r\n                    fileOpenPicker.FileTypeFilter.Add(\".mp4\");\r\n                    fileOpenPicker.FileTypeFilter.Add(\".avi\");\r\n\r\n                    fileOpenPicker.ContinuationData.Add(\"From\", \"DialogDetailsView\");\r\n                    fileOpenPicker.ContinuationData.Add(\"Type\", \"Video\");\r\n\r\n                    if (Environment.OSVersion.Version.Major >= 10)\r\n                    {\r\n                        var result = await fileOpenPicker.PickSingleFileAsync();\r\n                        if (result != null)\r\n                        {\r\n                            Execute.BeginOnThreadPool(() =>\r\n                            {\r\n                                _sendVideoAction.SafeInvoke(result);\r\n                            });\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        fileOpenPicker.PickSingleFileAndContinue();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    _navigationService.UriFor<VideoCaptureViewModel>().Navigate();\r\n                }\r\n#else\r\n                _navigationService.UriFor<VideoCaptureViewModel>().Navigate();\r\n#endif\r\n            });\r\n        }\r\n\r\n        public void OpenCamcorder()\r\n        {\r\n            IsOpen = false;\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            {\r\n                _navigationService.UriFor<VideoCaptureViewModel>().Navigate();\r\n            });\r\n        }\r\n\r\n        public void OpenContact()\r\n        {\r\n            IsOpen = false;\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            {\r\n                _sendContactAction.SafeInvoke();\r\n            });\r\n        }\r\n\r\n        public void OpenDocument()\r\n        {\r\n            IsOpen = false;\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), async () =>\r\n            {\r\n#if WP81\r\n                if (_contactEnabled)\r\n                {\r\n                    ((App)Application.Current).ChooseFileInfo = new ChooseFileInfo(DateTime.Now);\r\n                    var fileOpenPicker = new FileOpenPicker();\r\n                    //fileOpenPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;\r\n                    fileOpenPicker.FileTypeFilter.Add(\"*\");\r\n                    fileOpenPicker.ContinuationData.Add(\"From\", \"DialogDetailsView\");\r\n                    fileOpenPicker.ContinuationData.Add(\"Type\", \"Document\");\r\n\r\n                    if (Environment.OSVersion.Version.Major >= 10)\r\n                    {\r\n                        var result = await fileOpenPicker.PickSingleFileAsync();\r\n                        if (result != null)\r\n                        {\r\n                            Execute.BeginOnThreadPool(() =>\r\n                            {\r\n                                _sendDocumentAction.SafeInvoke(result);\r\n                            });\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        fileOpenPicker.PickSingleFileAndContinue();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    ((App)Application.Current).ChooseFileInfo = new ChooseFileInfo(DateTime.Now);\r\n                    var fileOpenPicker = new FileOpenPicker();\r\n                    //fileOpenPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;\r\n                    fileOpenPicker.FileTypeFilter.Add(\"*\");\r\n                    fileOpenPicker.ContinuationData.Add(\"From\", \"SecretDialogDetailsView\");\r\n                    fileOpenPicker.ContinuationData.Add(\"Type\", \"Document\");\r\n\r\n                    if (Environment.OSVersion.Version.Major >= 10)\r\n                    {\r\n                        var result = await fileOpenPicker.PickSingleFileAsync();\r\n                        if (result != null)\r\n                        {\r\n                            Execute.BeginOnThreadPool(() =>\r\n                            {\r\n                                _sendDocumentAction.SafeInvoke(result);\r\n                            });\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        fileOpenPicker.PickSingleFileAndContinue();\r\n                    }\r\n                }\r\n#else\r\n                    ((App) Application.Current).ChooseFileInfo = new ChooseFileInfo(DateTime.Now);\r\n                    var task = new PhotoChooserTask { ShowCamera = true };\r\n                    task.Completed += (o, e) => Handle(_stateService, e.ChosenPhoto, e.OriginalFileName);\r\n                    task.Show();\r\n#endif\r\n            });\r\n        }\r\n\r\n        //private static bool GetAngleFromExif(Stream imageStream, out int angle)\r\n        //{\r\n        //    angle = 0;\r\n        //    var position = imageStream.Position;\r\n\r\n        //    imageStream.Position = 0;\r\n        //    var info = ExifReader.ReadJpeg(imageStream);\r\n        //    imageStream.Position = position;\r\n\r\n        //    if (!info.IsValid)\r\n        //    {\r\n        //        return false;\r\n        //    }\r\n\r\n        //    var orientation = info.Orientation;\r\n        //    switch (orientation)\r\n        //    {\r\n        //        case ExifOrientation.TopRight:\r\n        //            angle = 90;\r\n        //            break;\r\n        //        case ExifOrientation.BottomRight:\r\n        //            angle = 180;\r\n        //            break;\r\n        //        case ExifOrientation.BottomLeft:\r\n        //            angle = 270;\r\n        //            break;\r\n        //        case ExifOrientation.TopLeft:\r\n        //        case ExifOrientation.Undefined:\r\n        //        default:\r\n        //            angle = 0;\r\n        //            break;\r\n        //    }\r\n\r\n        //    return true;\r\n        //}\r\n\r\n        private static WriteableBitmap RotateBitmap(WriteableBitmap source, int width, int height, int angle)\r\n        {\r\n            var target = new WriteableBitmap(width, height);\r\n            int sourceIndex = 0;\r\n            int targetIndex = 0;\r\n            for (int x = 0; x < source.PixelWidth; x++)\r\n            {\r\n                for (int y = 0; y < source.PixelHeight; y++)\r\n                {\r\n                    sourceIndex = x + y * source.PixelWidth;\r\n                    switch (angle)\r\n                    {\r\n                        case 90:\r\n                            targetIndex = (source.PixelHeight - y - 1)\r\n                                + x * target.PixelWidth;\r\n                            break;\r\n                        case 180:\r\n                            targetIndex = (source.PixelWidth - x - 1)\r\n                                + (source.PixelHeight - y - 1) * source.PixelWidth;\r\n                            break;\r\n                        case 270:\r\n                            targetIndex = y + (source.PixelWidth - x - 1)\r\n                                * target.PixelWidth;\r\n                            break;\r\n                    }\r\n                    target.Pixels[targetIndex] = source.Pixels[sourceIndex];\r\n                }\r\n            }\r\n            return target;\r\n        }\r\n\r\n        private static WriteableBitmap DecodeImage(Stream imageStream, int angle)\r\n        {\r\n            var source = PictureDecoder.DecodeJpeg(imageStream);\r\n\r\n            switch (angle)\r\n            {\r\n                case 90:\r\n                case 270:\r\n                    return RotateBitmap(source, source.PixelHeight, source.PixelWidth, angle);\r\n                case 180:\r\n                    return RotateBitmap(source, source.PixelWidth, source.PixelHeight, angle);\r\n                default:\r\n                    return source;\r\n            }\r\n        }\r\n\r\n\r\n#if WP81\r\n\r\n        public static async Task<Photo> ResizeJpeg(IRandomAccessStream stream, uint size, string originalFileName)\r\n        {\r\n            Photo photo;\r\n            using (var sourceStream = stream)\r\n            {\r\n                var decoder = await BitmapDecoder.CreateAsync(sourceStream);\r\n\r\n                if (decoder.DecoderInformation != null\r\n                    && decoder.DecoderInformation.CodecId == BitmapDecoder.JpegDecoderId)\r\n                {\r\n                    var maxDimension = Math.Max(decoder.PixelWidth, decoder.PixelHeight);\r\n                    var scale = (double)size / maxDimension;\r\n                    var orientedScaledHeight = (uint)(decoder.OrientedPixelHeight * scale);\r\n                    var orientedScaledWidth = (uint)(decoder.OrientedPixelWidth * scale);\r\n                    var scaledHeight = (uint)(decoder.PixelHeight * scale);\r\n                    var scaledWidth = (uint)(decoder.PixelWidth * scale);\r\n\r\n                    var transform = new BitmapTransform { ScaledHeight = scaledHeight, ScaledWidth = scaledWidth, InterpolationMode = BitmapInterpolationMode.Fant };\r\n                    var pixelData = await decoder.GetPixelDataAsync(\r\n                        decoder.BitmapPixelFormat,\r\n                        decoder.BitmapAlphaMode,\r\n                        transform,\r\n                        ExifOrientationMode.RespectExifOrientation,\r\n                        ColorManagementMode.DoNotColorManage);\r\n\r\n                    using (var destinationStream = new InMemoryRandomAccessStream())\r\n                    {\r\n                        var encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.JpegEncoderId, destinationStream);\r\n                        encoder.SetPixelData(decoder.BitmapPixelFormat, decoder.BitmapAlphaMode, orientedScaledWidth, orientedScaledHeight, decoder.DpiX, decoder.DpiY, pixelData.DetachPixelData());\r\n                        await encoder.FlushAsync();\r\n\r\n                        var reader = new DataReader(destinationStream.GetInputStreamAt(0));\r\n                        var bytes = new byte[destinationStream.Size];\r\n                        await reader.LoadAsync((uint)destinationStream.Size);\r\n                        reader.ReadBytes(bytes);\r\n\r\n                        photo = new Photo\r\n                        {\r\n                            Bytes = bytes,\r\n                            Width = (int)orientedScaledWidth,\r\n                            Height = (int)orientedScaledHeight,\r\n                            FileName = originalFileName\r\n                        };\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    var reader = new DataReader(stream.GetInputStreamAt(0));\r\n                    var bytes = new byte[stream.Size];\r\n                    await reader.LoadAsync((uint)stream.Size);\r\n                    reader.ReadBytes(bytes);\r\n\r\n                    photo = new Photo\r\n                    {\r\n                        Bytes = bytes,\r\n                        Width = (int)decoder.OrientedPixelWidth,\r\n                        Height = (int)decoder.OrientedPixelHeight,\r\n                        FileName = originalFileName\r\n                    };\r\n                }\r\n            }\r\n\r\n            return photo;\r\n        }\r\n\r\n        public static async Task Handle(IStateService stateService, IRandomAccessStream chosenPhoto, string originalFileName)\r\n        {\r\n\r\n            var log = new StringBuilder();\r\n            var stopwatch = Stopwatch.StartNew();\r\n\r\n            var photo = await ResizeJpeg(chosenPhoto, 1280, originalFileName);\r\n            log.AppendLine(\"save_jpeg \" + stopwatch.Elapsed);\r\n            stateService.Photo = photo;\r\n\r\n            //Execute.ShowDebugMessage(log.ToString());\r\n        }\r\n\r\n#endif\r\n\r\n        public static void Handle(IStateService stateService, Stream chosenPhoto, string originalFileName)\r\n        {\r\n            //var log = new StringBuilder();\r\n            //var stopwatch = Stopwatch.StartNew();\r\n            //WriteableBitmap writeableBitmap;\r\n            //int angle;\r\n            //var result = GetAngleFromExif(chosenPhoto, out angle);\r\n            //log.AppendLine(\"get_angle result=\" + angle + \" \" + stopwatch.Elapsed);\r\n            //if (result)\r\n            //{\r\n            //    writeableBitmap = DecodeImage(chosenPhoto, angle);\r\n            //    log.AppendLine(\"decode_image \" + stopwatch.Elapsed);\r\n            //}\r\n            //else\r\n            //{\r\n            //    var bitmap = new BitmapImage { CreateOptions = BitmapCreateOptions.None };\r\n            //    bitmap.SetSource(chosenPhoto);\r\n            //    writeableBitmap = new WriteableBitmap(bitmap);\r\n            //    log.AppendLine(\"writeable_bitmap \" + stopwatch.Elapsed);\r\n            //}\r\n\r\n            //var maxDimension = Math.Max(writeableBitmap.PixelWidth, writeableBitmap.PixelHeight);\r\n            //var scale = 1280.0 / maxDimension;\r\n            //var newHeight = writeableBitmap.PixelHeight * scale;\r\n            //var newWidth = writeableBitmap.PixelWidth * scale;\r\n            //var ms = new MemoryStream();\r\n            //writeableBitmap.SaveJpeg(ms, (int)newWidth, (int)newHeight, 0, 87);\r\n\r\n            //log.AppendLine(\"save_jpeg \" + stopwatch.Elapsed);\r\n\r\n            //stateService.Photo = new Photo\r\n            //{\r\n            //    FileName = originalFileName,\r\n            //    Bytes = ms.ToArray(),\r\n            //    Width = (int)newWidth,\r\n            //    Height = (int)newHeight\r\n            //};\r\n\r\n            //Execute.ShowDebugMessage(log.ToString());\r\n        }\r\n\r\n        public void Open()\r\n        {\r\n            IsOpen = true;\r\n\r\n            var frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            if (frame != null)\r\n            {\r\n                var view = frame.Content as IDialogDetailsView;\r\n                if (view != null)\r\n                {\r\n                    view.PauseChatPlayers();\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Close()\r\n        {\r\n            IsOpen = false;\r\n        }\r\n\r\n        public void OpenInlineBot(TLUserBase bot)\r\n        {\r\n            IsOpen = false;\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () => _openInlineBotAction.SafeInvoke(bot));\r\n        }\r\n\r\n        private static DateTime? _lastUpdateTopPeerTime;\r\n\r\n        public bool LoadInlineBots(System.Action callback)\r\n        {\r\n            var topPeers = IoC.Get<IStateService>().GetTopPeers() as TLTopPeers;\r\n            if (topPeers != null)\r\n            {\r\n                if (_lastUpdateTopPeerTime == null || _lastUpdateTopPeerTime.Value.AddSeconds(300.0) < DateTime.Now)\r\n                {\r\n                    SearchViewModel.UpdateTopCommon(IoC.Get<IMTProtoService>(), IoC.Get<IStateService>(), result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        _lastUpdateTopPeerTime = DateTime.Now;\r\n                    }));\r\n                }\r\n            }\r\n\r\n            if (InlineBots.Count > 0) return false;\r\n\r\n            if (topPeers != null)\r\n            {\r\n                LoadInlineBotsInternal(topPeers);\r\n                return false;\r\n            }\r\n            else\r\n            {\r\n                SearchViewModel.UpdateTopCommon(IoC.Get<IMTProtoService>(), IoC.Get<IStateService>(), result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    _lastUpdateTopPeerTime = DateTime.Now;\r\n                    LoadInlineBotsInternal(result, callback);\r\n                }));\r\n                return true;\r\n            }\r\n        }\r\n\r\n        private void LoadInlineBotsInternal(TLTopPeers topPeers, System.Action callback = null)\r\n        {\r\n            var inlineBotsCategory = topPeers.Categories.FirstOrDefault(x => x.Category is TLTopPeerCategoryBotsInline);\r\n            if (inlineBotsCategory != null)\r\n            {\r\n                var inlineBots = new List<TLUserBase>();\r\n                foreach (var peer in inlineBotsCategory.Peers)\r\n                {\r\n                    var user = IoC.Get<ICacheService>().GetUser(peer.Peer.Id);\r\n                    if (user != null)\r\n                    {\r\n                        inlineBots.Add(user);\r\n                    }\r\n                }\r\n\r\n                const int firstSliceCount = 5;\r\n                for (var i = 0; i < inlineBots.Count && InlineBots.Count < firstSliceCount; i++)\r\n                {\r\n                    InlineBots.Add(inlineBots[i]);\r\n                }\r\n\r\n                var view = GetView() as IChooseAttachmentView;\r\n                if (view != null)\r\n                {\r\n                    view.HideInlineBots();\r\n                    view.ShowHint(AppResources.OpenInlineBotsHint);\r\n                }\r\n\r\n                callback.SafeInvoke();\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    for (var i = firstSliceCount; i < inlineBots.Count; i++)\r\n                    {\r\n                        InlineBots.Add(inlineBots[i]);\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        public void ResetTopPeerRating(TLObject obj)\r\n        {\r\n            var user = obj as TLUser;\r\n            if (user == null) return;\r\n\r\n            var confirmation = MessageBox.Show(string.Format(AppResources.ConfirmResetTopPeerRating, user.FullName), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            var topPeerCategory = new TLTopPeerCategoryBotsInline();\r\n\r\n            IoC.Get<IMTProtoService>().ResetTopPeerRatingAsync(topPeerCategory, user.ToInputPeer(),\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var topPeers = IoC.Get<IStateService>().GetTopPeers() as TLTopPeers;\r\n                    if (topPeers != null)\r\n                    {\r\n                        var category = topPeers.Categories.FirstOrDefault(x => x.Category.GetType() == topPeerCategory.GetType());\r\n                        if (category != null)\r\n                        {\r\n                            for (var i = 0; i < category.Peers.Count; i++)\r\n                            {\r\n                                if (category.Peers[i].Peer.Id.Value == user.Index)\r\n                                {\r\n                                    category.Peers.RemoveAt(i);\r\n                                    break;\r\n                                }\r\n                            }\r\n\r\n                            for (var i = 0; i < topPeers.Users.Count; i++)\r\n                            {\r\n                                if (topPeers.Users[i].Index == user.Index)\r\n                                {\r\n                                    topPeers.Users.RemoveAt(i);\r\n                                    break;\r\n                                }\r\n                            }\r\n\r\n                            for (var i = 0; i < InlineBots.Count; i++)\r\n                            {\r\n                                var topUser = InlineBots[i];\r\n                                if (topUser != null)\r\n                                {\r\n                                    if (topUser.Index == user.Index)\r\n                                    {\r\n                                        InlineBots.RemoveAt(i);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            IoC.Get<IStateService>().SaveTopPeers(topPeers);\r\n                        }\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"contacts.resetTopPeerRating error \" + error);\r\n                }));\r\n        }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Determines whether the user interface for capturing from the attached camera allows capture of photos, videos, or both photos and videos.\r\n    /// </summary>\r\n    public enum CameraCaptureUIMode\r\n    {\r\n        /// <summary>\r\n        /// Either a photo or video can be captured.\r\n        /// </summary>\r\n        PhotoOrVideo = 0,\r\n\r\n        /// <summary>\r\n        /// The user can only capture a photo.\r\n        /// </summary>\r\n        Photo = 1,\r\n\r\n        /// <summary>\r\n        /// The user can only capture a video. \r\n        /// </summary>\r\n        Video = 2,\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChooseBackgroundViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Runtime.Serialization;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TaskResult = Microsoft.Phone.Tasks.TaskResult;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChooseBackgroundViewModel : ViewModelBase, Telegram.Api.Aggregator.IHandle<DownloadableItem>\r\n    {\r\n        public ObservableCollection<BackgroundItem> Static { get; set; }\r\n\r\n        private readonly BackgroundItem _emptyBackground;\r\n\r\n        private readonly BackgroundItem _libraryBackground;\r\n\r\n        public  BackgroundItem AnimatedBackground1 { get; protected set; }\r\n\r\n        private static TLVector<TLWallPaperBase> _cachedWallpapers;\r\n\r\n        public BackgroundItem GalleryItem { get { return _libraryBackground; } }\r\n\r\n        public BackgroundItem EmptyItem { get { return _emptyBackground; } }\r\n\r\n        public ChooseBackgroundViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Static = new ObservableCollection<BackgroundItem>();\r\n\r\n            var currentBackground = StateService.CurrentBackground;\r\n\r\n            if (currentBackground != null \r\n                && currentBackground.Name == Constants.EmptyBackgroundString)\r\n            {\r\n                _emptyBackground = currentBackground;\r\n                _emptyBackground.IsSelected = true;\r\n            }\r\n            else\r\n            {\r\n                _emptyBackground = new BackgroundItem\r\n                {\r\n                    Name = Constants.EmptyBackgroundString,\r\n                    SourceString = string.Empty,\r\n                    IsSelected = currentBackground == null\r\n                };\r\n            }\r\n\r\n            if (currentBackground != null\r\n                && currentBackground.Name == Constants.LibraryBackgroundString)\r\n            {\r\n                _libraryBackground = currentBackground;\r\n                _libraryBackground.IsSelected = true;\r\n            }\r\n            else\r\n            {\r\n                _libraryBackground = new BackgroundItem\r\n                {\r\n                    Name = Constants.LibraryBackgroundString,\r\n                    SourceString = \"/Images/Backgrounds/gallery_WXGA.png\"\r\n                };\r\n            }\r\n\r\n            _cachedWallpapers = StateService.Wallpapers;\r\n            StateService.Wallpapers = null;\r\n\r\n            _userCachedWallpapers = _cachedWallpapers != null;\r\n            if (!_userCachedWallpapers)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.GetWallpapersAsync(\r\n                    results =>\r\n                    {\r\n                        StateService.SaveWallpapersAsync(results);\r\n\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            _cachedWallpapers = results;\r\n\r\n                            if (_forwardInAnimationComplete)\r\n                            {\r\n                                OnGetWallpapers(results, 0, results.Count);\r\n                            }\r\n                            else\r\n                            {\r\n                                _wallpapers = results;\r\n                                //OnGetWallpapers(results, 0, 4);\r\n                            }\r\n                        });\r\n                    },\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.getWallpapers error \" + error);\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                OnGetWallpapers(_cachedWallpapers, 0, 4);\r\n            }\r\n            \r\n\r\n            eventAggregator.Subscribe(this);\r\n        }\r\n\r\n        private TLVector<TLWallPaperBase> _wallpapers;\r\n\r\n        private bool _forwardInAnimationComplete;\r\n\r\n        private readonly bool _userCachedWallpapers;\r\n\r\n        public void OnForwardInAnimationComplete()\r\n        {\r\n            if (_userCachedWallpapers)\r\n            {\r\n                OnGetWallpapers(_cachedWallpapers, Static.Count, _cachedWallpapers.Count - Static.Count);\r\n            }\r\n            else\r\n            {\r\n                if (_wallpapers != null)\r\n                {\r\n                    OnGetWallpapers(_wallpapers, Static.Count, _wallpapers.Count - Static.Count);\r\n                }\r\n            }\r\n\r\n            _forwardInAnimationComplete = true;\r\n        }\r\n\r\n        private void OnGetWallpapers(TLVector<TLWallPaperBase> results, int skip, int take)\r\n        {\r\n\r\n            var currentItem = StateService.CurrentBackground;\r\n            foreach (var result in results.Skip(skip).Take(take))\r\n            {\r\n                var wallpaper = result as TLWallPaper;\r\n                if (wallpaper == null) continue;\r\n\r\n                var size = BackgroundImageConverter.GetPhotoSize(wallpaper.Sizes, 480.0);\r\n                if (size != null)\r\n                {\r\n                    var location = size.Location as TLFileLocation;\r\n                    if (location != null)\r\n                    {\r\n                        var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                            location.VolumeId,\r\n                            location.LocalId,\r\n                            location.Secret);\r\n\r\n                        BackgroundItem item;\r\n                        var isSelected = currentItem != null && \"telegram\" + wallpaper.Id == currentItem.Name;\r\n                        if (isSelected)\r\n                        {\r\n                            item = currentItem;\r\n                            item.IsSelected = true;\r\n                        }\r\n                        else\r\n                        {\r\n                            item = new BackgroundItem\r\n                            {\r\n                                Name = \"telegram\" + wallpaper.Id,\r\n                                Wallpaper = wallpaper,\r\n                                IsoFileName = fileName\r\n                            };\r\n                        } \r\n                        Static.Add(item);\r\n                    }\r\n                }\r\n            }\r\n            \r\n        }\r\n\r\n#if DEBUG\r\n        /// <summary>\r\n        /// Add a finalizer to check for memory leaks\r\n        /// </summary>\r\n        //~ChooseBackgroundViewModel()\r\n        //{\r\n        //    TLUtils.WritePerformance(\"++ChooseBackgroundViewModel dstr\");\r\n        //}\r\n#endif\r\n\r\n        public void Choose(BackgroundItem item)\r\n        {\r\n            if (item == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (item == _libraryBackground)\r\n            {\r\n                var task = new PhotoChooserTask\r\n                {\r\n                    PixelHeight = 800, \r\n                    PixelWidth = 480, \r\n                    ShowCamera = true\r\n                };\r\n                task.Completed += (sender, result) =>\r\n                {\r\n                    if (result.TaskResult != TaskResult.OK)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    byte[] bytes;\r\n                    var sourceStream = result.ChosenPhoto;\r\n                    var fileName = Path.GetFileName(result.OriginalFileName);\r\n\r\n                    if (string.IsNullOrEmpty(fileName))\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    using (var memoryStream = new MemoryStream())\r\n                    {\r\n                        sourceStream.CopyTo(memoryStream);\r\n                        bytes = memoryStream.ToArray();\r\n                    }\r\n\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        using (var file = store.OpenFile(fileName, FileMode.CreateNew))\r\n                        {\r\n                            file.Write(bytes, 0, bytes.Length);\r\n                        }\r\n                    }\r\n\r\n                    _libraryBackground.IsoFileName = fileName;\r\n\r\n                    ReplaceBackgroundItem(_libraryBackground);\r\n                };\r\n                task.Show();\r\n\r\n                return;\r\n            }\r\n\r\n            if (item == AnimatedBackground1)\r\n            {\r\n                MessageBox.Show(AppResources.PleaseNoteThatAnimatedBackgroundConsumesMoreBatteryResources);\r\n            }\r\n\r\n            ReplaceBackgroundItem(item);\r\n        }\r\n\r\n        private void ReplaceBackgroundItem(BackgroundItem item)\r\n        {\r\n            var currentItem = StateService.CurrentBackground;\r\n            if (currentItem != null)\r\n            {\r\n                currentItem.IsSelected = false;\r\n                currentItem.NotifyOfPropertyChange(\"IsSelected\");\r\n            }\r\n            else\r\n            {\r\n                _emptyBackground.IsSelected = false;\r\n                _emptyBackground.NotifyOfPropertyChange(\"IsSelected\");\r\n            }\r\n\r\n            item.IsSelected = true;\r\n            item.NotifyOfPropertyChange(\"IsSelected\");\r\n            StateService.CurrentBackground = item;\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            if (item.Owner is TLWallPaper)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var backgroundItem in Static)\r\n                    {\r\n                        if (backgroundItem.Wallpaper == item.Owner)\r\n                        {\r\n                            backgroundItem.NotifyOfPropertyChange(\"Self\");\r\n                            break;\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n    }\r\n    \r\n    public class BackgroundItem : INotifyPropertyChanged\r\n    {\r\n        public string Name { get; set; }\r\n\r\n        public string SourceString { get; set; }\r\n\r\n        public string IsoFileName { get; set; }\r\n\r\n        [IgnoreDataMember]\r\n        public TLWallPaper Wallpaper { get; set; }\r\n\r\n        public BackgroundItem Self { get { return this; } }\r\n\r\n        public string ThemeSourceString\r\n        {\r\n            get\r\n            {\r\n                if (string.Equals(Name, \"Library\"))\r\n                {\r\n                    return SourceString;\r\n                }\r\n\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                var themeString = \"Dark/\";\r\n                if (isLightTheme)\r\n                {\r\n                    themeString = \"Light/\";\r\n                }\r\n\r\n                return SourceString + themeString + Name;\r\n            }\r\n        }\r\n\r\n        public bool IsSelected { get; set; }\r\n\r\n        public event PropertyChangedEventHandler PropertyChanged;\r\n\r\n        public virtual void NotifyOfPropertyChange(string propertyName = null)\r\n        {\r\n            var handler = PropertyChanged;\r\n            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChooseCountryViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChooseCountryViewModel : ItemsViewModelBase<CountriesInGroup>\r\n    {\r\n        private string _text;\r\n\r\n        public string Text\r\n        {\r\n            get { return _text; }\r\n            set\r\n            {\r\n                if (value != _text)\r\n                {\r\n                    _text = value;\r\n                    NotifyOfPropertyChange(() => Text);\r\n                    Search();\r\n                }\r\n            }\r\n        }\r\n\r\n        public ObservableCollection<CountriesInGroup> Countries { get; protected set; }\r\n\r\n        public bool HideCountryCode { get; set; }\r\n\r\n        private bool _isSearching;\r\n\r\n        public bool IsSearching\r\n        {\r\n            get { return _isSearching; }\r\n            set { SetField(ref _isSearching, value, () => IsSearching); }\r\n        }\r\n\r\n        public ObservableCollection<Country> SearchItems { get; set; }\r\n\r\n        public List<Country> LazySearchItems { get; set; }\r\n\r\n        private readonly bool _residenceCountry;\r\n\r\n        public ChooseCountryViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            const string Groups = \"abcdefghijklmnopqrstuvwxyz\";\r\n            Items = new ObservableCollection<CountriesInGroup>();\r\n\r\n            SearchItems = new ObservableCollection<Country>();\r\n            LazySearchItems = new List<Country>();\r\n\r\n            var countries = new List<CountriesInGroup>(Groups.Length);\r\n            var groups = new Dictionary<string, CountriesInGroup>();\r\n\r\n            foreach (var c in Groups)\r\n            {\r\n                var group = new CountriesInGroup(c.ToString(CultureInfo.InvariantCulture));\r\n                countries.Add(group);\r\n                groups[c.ToString(CultureInfo.InvariantCulture)] = group;\r\n            }\r\n\r\n            foreach (var country in CountryUtils.CountriesSource)\r\n            {\r\n                groups[country.GetKey()].Add(country);\r\n            }\r\n\r\n            var count = 1;\r\n\r\n            for (var i = 0; i < count; i++)\r\n            {\r\n                Items.Add(countries[i]);\r\n            }\r\n\r\n            for (var i = count; i < countries.Count; i++)\r\n            {\r\n                LazyItems.Add(countries[i]);\r\n            }\r\n\r\n            if (StateService.HideCountryCode)\r\n            {\r\n                StateService.HideCountryCode = false;\r\n                HideCountryCode = true;\r\n            }\r\n\r\n            _residenceCountry = StateService.ResidenceCountry;\r\n            StateService.ResidenceCountry = false;\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => IsSearching))\r\n                {\r\n                    if (!IsSearching)\r\n                    {\r\n                        Text = string.Empty;\r\n                    }\r\n                }\r\n            };\r\n        }\r\n\r\n        public void SelectCountry(Country country)\r\n        {\r\n            if (country == null) return;\r\n\r\n            if (_residenceCountry) StateService.SelectedResidenceCountry = country;\r\n            else StateService.SelectedCountry = country;\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            foreach (var lazyItem in LazyItems)\r\n            {\r\n                Items.Add(lazyItem);\r\n            }\r\n\r\n            LazyItems.Clear();\r\n        }\r\n\r\n        private SearchCountriesRequest _lastSearchRequest;\r\n\r\n        private readonly LRUCache<string, SearchCountriesRequest> _searchResultsCache = new LRUCache<string, SearchCountriesRequest>(Constants.MaxCacheCapacity);\r\n\r\n        private IList<Country> _source;\r\n\r\n        public void Search()\r\n        {\r\n            var text = Text;\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                SearchItems.Clear();\r\n                LazySearchItems.Clear();\r\n                return;\r\n            }\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n            {\r\n                if (!string.Equals(text, Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                SearchInternal(Text);\r\n            });\r\n        }\r\n\r\n        private void SearchInternal(string text)\r\n        {\r\n            if (_lastSearchRequest != null)\r\n            {\r\n                _lastSearchRequest.Cancel();\r\n            }\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                LazySearchItems.Clear();\r\n                SearchItems.Clear();\r\n\r\n                foreach (var contact in _source)\r\n                {\r\n                    SearchItems.Add(contact);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var nextSearchRequest = CreateSearchRequest(text);\r\n\r\n            IsWorking = true;\r\n            nextSearchRequest.ProcessAsync(results =>\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (nextSearchRequest.IsCanceled) return;\r\n\r\n                    SearchItems.Clear();\r\n                    LazySearchItems.Clear();\r\n\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        if (i < 8)\r\n                        {\r\n                            SearchItems.Add(results[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            LazySearchItems.Add(results[i]);\r\n                        }\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (!String.Equals(text, Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                        foreach (var lazySearchItem in LazySearchItems)\r\n                        {\r\n                            SearchItems.Add(lazySearchItem);\r\n                        }\r\n                        LazySearchItems.Clear();\r\n                    });\r\n                }));\r\n\r\n            _searchResultsCache[nextSearchRequest.Text] = nextSearchRequest;\r\n            _lastSearchRequest = nextSearchRequest;\r\n        }\r\n\r\n        private SearchCountriesRequest CreateSearchRequest(string text)\r\n        {\r\n            SearchCountriesRequest request;\r\n            if (!_searchResultsCache.TryGetValue(text, out request))\r\n            {\r\n                IList<Country> source;\r\n\r\n                if (_lastSearchRequest != null\r\n                    && text.IndexOf(_lastSearchRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    source = _lastSearchRequest.Source;\r\n                }\r\n                else\r\n                {\r\n                    _source = _source ?? CountryUtils.CountriesSource;\r\n\r\n                    source = _source;\r\n                }\r\n\r\n                request = new SearchCountriesRequest(text, source);\r\n            }\r\n            return request;\r\n        }\r\n    }\r\n\r\n    public class SearchCountriesRequest\r\n    {\r\n        public volatile bool IsCanceled;\r\n\r\n        public string Text { get; private set; }\r\n\r\n        public IList<Country> Source { get; private set; }\r\n\r\n        public IList<Country> Results { get; private set; }\r\n\r\n        public IList<TLObject> GlobalResults { get; set; }\r\n\r\n        public SearchCountriesRequest(string text, IList<Country> source)\r\n        {\r\n            Text = text;\r\n            Source = source;\r\n        }\r\n\r\n        public void ProcessAsync(Action<IList<Country>> callback)\r\n        {\r\n            if (Results != null)\r\n            {\r\n                IsCanceled = false;\r\n                callback.SafeInvoke(Results);\r\n                return;\r\n            }\r\n\r\n            var source = Source;\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var items = new List<Country>(source.Count);\r\n                foreach (var country in source)\r\n                {\r\n                    if (country.Name.StartsWith(Text, StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        items.Add(country);\r\n                    }\r\n                }\r\n\r\n                Results = items;\r\n                callback.SafeInvoke(Results);\r\n            });\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            IsCanceled = true;\r\n        }\r\n\r\n        public void CancelAsync()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(Cancel);\r\n        }\r\n    }\r\n\r\n    public class CountriesInGroup : List<Country>\r\n    {\r\n        public CountriesInGroup(string category)\r\n        {\r\n            Key = category;\r\n        }\r\n\r\n        public string Key { get; set; }\r\n\r\n        public bool HasItems { get { return Count > 0; } }\r\n    }\r\n\r\n    public static class CountryUtils\r\n    {\r\n        private static Dictionary<string, Country> _dict;\r\n\r\n        public static Country GetCountryByCode(string code)\r\n        {\r\n            if (string.IsNullOrEmpty(code))\r\n            {\r\n                return null;\r\n            }\r\n\r\n            if (_dict == null)\r\n            {\r\n                _dict = new Dictionary<string, Country>();\r\n                foreach (var item in CountriesSource)\r\n                {\r\n                    _dict[item.Code] = item;\r\n                }\r\n            }\r\n\r\n            Country country;\r\n            return _dict.TryGetValue(code.ToLowerInvariant(), out country) ? country : null;\r\n        }\r\n\r\n        public static string GetCountriesByCode()\r\n        {\r\n            var sb = new StringBuilder();\r\n\r\n            var source = CountriesSource.OrderBy(x => x.Name).ToList();\r\n\r\n            foreach (var item in source)\r\n            {\r\n                sb.AppendLine(string.Format(\"new Country {3}Code = \\\"{0}\\\", PhoneCode = \\\"{1}\\\", Name = \\\"{2}\\\"{4},\", item.PhoneCode.ToLowerInvariant(), item.Code, item.Name, \"{\", \"}\"));\r\n            }\r\n\r\n            return sb.ToString();\r\n        }\r\n\r\n        public static readonly IList<Country> CountriesSource = new List<Country>\r\n        {\r\n            new Country {Code = \"af\", PhoneCode = \"93\", Name = \"Afghanistan\"},\r\n            new Country {Code = \"al\", PhoneCode = \"355\", Name = \"Albania\"},\r\n            new Country {Code = \"dz\", PhoneCode = \"213\", Name = \"Algeria\"},\r\n            new Country {Code = \"as\", PhoneCode = \"1684\", Name = \"American Samoa\"},\r\n            new Country {Code = \"ad\", PhoneCode = \"376\", Name = \"Andorra\"},\r\n            new Country {Code = \"ao\", PhoneCode = \"244\", Name = \"Angola\"},\r\n            new Country {Code = \"ai\", PhoneCode = \"1264\", Name = \"Anguilla\"},\r\n            new Country {Code = \"ag\", PhoneCode = \"1268\", Name = \"Antigua & Barbuda\"},\r\n            new Country {Code = \"ar\", PhoneCode = \"54\", Name = \"Argentina\"},\r\n            new Country {Code = \"am\", PhoneCode = \"374\", Name = \"Armenia\"},\r\n            new Country {Code = \"aw\", PhoneCode = \"297\", Name = \"Aruba\"},\r\n            new Country {Code = \"au\", PhoneCode = \"61\", Name = \"Australia\"},\r\n            new Country {Code = \"at\", PhoneCode = \"43\", Name = \"Austria\"},\r\n            new Country {Code = \"az\", PhoneCode = \"994\", Name = \"Azerbaijan\"},\r\n            new Country {Code = \"bs\", PhoneCode = \"1242\", Name = \"Bahamas\"},\r\n            new Country {Code = \"bh\", PhoneCode = \"973\", Name = \"Bahrain\"},\r\n            new Country {Code = \"bd\", PhoneCode = \"880\", Name = \"Bangladesh\"},\r\n            new Country {Code = \"bb\", PhoneCode = \"1246\", Name = \"Barbados\"},\r\n            new Country {Code = \"by\", PhoneCode = \"375\", Name = \"Belarus\"},\r\n            new Country {Code = \"be\", PhoneCode = \"32\", Name = \"Belgium\"},\r\n            new Country {Code = \"bz\", PhoneCode = \"501\", Name = \"Belize\"},\r\n            new Country {Code = \"bj\", PhoneCode = \"229\", Name = \"Benin\"},\r\n            new Country {Code = \"bm\", PhoneCode = \"1441\", Name = \"Bermuda\"},\r\n            new Country {Code = \"bt\", PhoneCode = \"975\", Name = \"Bhutan\"},\r\n            new Country {Code = \"bo\", PhoneCode = \"591\", Name = \"Bolivia\"},\r\n            new Country {Code = \"bq\", PhoneCode = \"599\", Name = \"Bonaire, Sint Eustatius & Saba\"},\r\n            new Country {Code = \"ba\", PhoneCode = \"387\", Name = \"Bosnia & Herzegovina\"},\r\n            new Country {Code = \"bw\", PhoneCode = \"267\", Name = \"Botswana\"},\r\n            new Country {Code = \"br\", PhoneCode = \"55\", Name = \"Brazil\"},\r\n            new Country {Code = \"vg\", PhoneCode = \"1284\", Name = \"British Virgin Islands\"},\r\n            new Country {Code = \"bn\", PhoneCode = \"673\", Name = \"Brunei Darussalam\"},\r\n            new Country {Code = \"bg\", PhoneCode = \"359\", Name = \"Bulgaria\"},\r\n            new Country {Code = \"bf\", PhoneCode = \"226\", Name = \"Burkina Faso\"},\r\n            new Country {Code = \"bi\", PhoneCode = \"257\", Name = \"Burundi\"},\r\n            new Country {Code = \"kh\", PhoneCode = \"855\", Name = \"Cambodia\"},\r\n            new Country {Code = \"cm\", PhoneCode = \"237\", Name = \"Cameroon\"},\r\n            new Country {Code = \"ca\", PhoneCode = \"1\", Name = \"Canada\"},\r\n            new Country {Code = \"cv\", PhoneCode = \"238\", Name = \"Cape Verde\"},\r\n            new Country {Code = \"ky\", PhoneCode = \"1345\", Name = \"Cayman Islands\"},\r\n            new Country {Code = \"cf\", PhoneCode = \"236\", Name = \"Central African Rep.\"},\r\n            new Country {Code = \"td\", PhoneCode = \"235\", Name = \"Chad\"},\r\n            new Country {Code = \"cl\", PhoneCode = \"56\", Name = \"Chile\"},\r\n            new Country {Code = \"cn\", PhoneCode = \"86\", Name = \"China\"},\r\n            new Country {Code = \"co\", PhoneCode = \"57\", Name = \"Colombia\"},\r\n            new Country {Code = \"km\", PhoneCode = \"269\", Name = \"Comoros\"},\r\n            new Country {Code = \"cd\", PhoneCode = \"243\", Name = \"Congo (Dem. Rep.)\"},\r\n            new Country {Code = \"cg\", PhoneCode = \"242\", Name = \"Congo (Rep.)\"},\r\n            new Country {Code = \"ck\", PhoneCode = \"682\", Name = \"Cook Islands\"},\r\n            new Country {Code = \"cr\", PhoneCode = \"506\", Name = \"Costa Rica\"},\r\n            new Country {Code = \"ci\", PhoneCode = \"225\", Name = \"Côte d`Ivoire\"},\r\n            new Country {Code = \"hr\", PhoneCode = \"385\", Name = \"Croatia\"},\r\n            new Country {Code = \"cu\", PhoneCode = \"53\", Name = \"Cuba\"},\r\n            new Country {Code = \"cw\", PhoneCode = \"599\", Name = \"Curaçao\"},\r\n            new Country {Code = \"cy\", PhoneCode = \"357\", Name = \"Cyprus\"},\r\n            new Country {Code = \"cz\", PhoneCode = \"420\", Name = \"Czech Republic\"},\r\n            new Country {Code = \"dk\", PhoneCode = \"45\", Name = \"Denmark\"},\r\n            new Country {Code = \"io\", PhoneCode = \"246\", Name = \"Diego Garcia\"},\r\n            new Country {Code = \"dj\", PhoneCode = \"253\", Name = \"Djibouti\"},\r\n            new Country {Code = \"dm\", PhoneCode = \"1767\", Name = \"Dominica\"},\r\n            new Country {Code = \"do\", PhoneCode = \"1\", Name = \"Dominican Rep.\"},\r\n            new Country {Code = \"ec\", PhoneCode = \"593\", Name = \"Ecuador\"},\r\n            new Country {Code = \"eg\", PhoneCode = \"20\", Name = \"Egypt\"},\r\n            new Country {Code = \"sv\", PhoneCode = \"503\", Name = \"El Salvador\"},\r\n            new Country {Code = \"gq\", PhoneCode = \"240\", Name = \"Equatorial Guinea\"},\r\n            new Country {Code = \"er\", PhoneCode = \"291\", Name = \"Eritrea\"},\r\n            new Country {Code = \"ee\", PhoneCode = \"372\", Name = \"Estonia\"},\r\n            new Country {Code = \"et\", PhoneCode = \"251\", Name = \"Ethiopia\"},\r\n            new Country {Code = \"fk\", PhoneCode = \"500\", Name = \"Falkland Islands\"},\r\n            new Country {Code = \"fo\", PhoneCode = \"298\", Name = \"Faroe Islands\"},\r\n            new Country {Code = \"fj\", PhoneCode = \"679\", Name = \"Fiji\"},\r\n            new Country {Code = \"fi\", PhoneCode = \"358\", Name = \"Finland\"},\r\n            new Country {Code = \"fr\", PhoneCode = \"33\", Name = \"France\"},\r\n            new Country {Code = \"gf\", PhoneCode = \"594\", Name = \"French Guiana\"},\r\n            new Country {Code = \"pf\", PhoneCode = \"689\", Name = \"French Polynesia\"},\r\n            new Country {Code = \"ga\", PhoneCode = \"241\", Name = \"Gabon\"},\r\n            new Country {Code = \"gm\", PhoneCode = \"220\", Name = \"Gambia\"},\r\n            new Country {Code = \"ge\", PhoneCode = \"995\", Name = \"Georgia\"},\r\n            new Country {Code = \"de\", PhoneCode = \"49\", Name = \"Germany\"},\r\n            new Country {Code = \"gh\", PhoneCode = \"233\", Name = \"Ghana\"},\r\n            new Country {Code = \"gi\", PhoneCode = \"350\", Name = \"Gibraltar\"},\r\n            new Country {Code = \"gr\", PhoneCode = \"30\", Name = \"Greece\"},\r\n            new Country {Code = \"gl\", PhoneCode = \"299\", Name = \"Greenland\"},\r\n            new Country {Code = \"gd\", PhoneCode = \"1473\", Name = \"Grenada\"},\r\n            new Country {Code = \"gp\", PhoneCode = \"590\", Name = \"Guadeloupe\"},\r\n            new Country {Code = \"gu\", PhoneCode = \"1671\", Name = \"Guam\"},\r\n            new Country {Code = \"gt\", PhoneCode = \"502\", Name = \"Guatemala\"},\r\n            new Country {Code = \"gn\", PhoneCode = \"224\", Name = \"Guinea\"},\r\n            new Country {Code = \"gw\", PhoneCode = \"245\", Name = \"Guinea-Bissau\"},\r\n            new Country {Code = \"gy\", PhoneCode = \"592\", Name = \"Guyana\"},\r\n            new Country {Code = \"ht\", PhoneCode = \"509\", Name = \"Haiti\"},\r\n            new Country {Code = \"hn\", PhoneCode = \"504\", Name = \"Honduras\"},\r\n            new Country {Code = \"hk\", PhoneCode = \"852\", Name = \"Hong Kong\"},\r\n            new Country {Code = \"hu\", PhoneCode = \"36\", Name = \"Hungary\"},\r\n            new Country {Code = \"ic\", PhoneCode = \"354\", Name = \"Iceland\"},\r\n            new Country {Code = \"in\", PhoneCode = \"91\", Name = \"India\"},\r\n            new Country {Code = \"id\", PhoneCode = \"62\", Name = \"Indonesia\"},\r\n            new Country {Code = \"ir\", PhoneCode = \"98\", Name = \"Iran\"},\r\n            new Country {Code = \"iq\", PhoneCode = \"964\", Name = \"Iraq\"},\r\n            new Country {Code = \"ie\", PhoneCode = \"353\", Name = \"Ireland\"},\r\n            new Country {Code = \"il\", PhoneCode = \"972\", Name = \"Israel\"},\r\n            new Country {Code = \"it\", PhoneCode = \"39\", Name = \"Italy\"},\r\n            new Country {Code = \"jm\", PhoneCode = \"1876\", Name = \"Jamaica\"},\r\n            new Country {Code = \"jp\", PhoneCode = \"81\", Name = \"Japan\"},\r\n            new Country {Code = \"jo\", PhoneCode = \"962\", Name = \"Jordan\"},\r\n            new Country {Code = \"kz\", PhoneCode = \"7\", Name = \"Kazakhstan\"},\r\n            new Country {Code = \"ke\", PhoneCode = \"254\", Name = \"Kenya\"},\r\n            new Country {Code = \"ki\", PhoneCode = \"686\", Name = \"Kiribati\"},\r\n            new Country {Code = \"xk\", PhoneCode = \"383\", Name = \"Kosovo\"},\r\n            new Country {Code = \"kw\", PhoneCode = \"965\", Name = \"Kuwait\"},\r\n            new Country {Code = \"kg\", PhoneCode = \"996\", Name = \"Kyrgyzstan\"},\r\n            new Country {Code = \"la\", PhoneCode = \"856\", Name = \"Laos\"},\r\n            new Country {Code = \"lv\", PhoneCode = \"371\", Name = \"Latvia\"},\r\n            new Country {Code = \"lb\", PhoneCode = \"961\", Name = \"Lebanon\"},\r\n            new Country {Code = \"ls\", PhoneCode = \"266\", Name = \"Lesotho\"},\r\n            new Country {Code = \"lr\", PhoneCode = \"231\", Name = \"Liberia\"},\r\n            new Country {Code = \"ly\", PhoneCode = \"218\", Name = \"Libya\"},\r\n            new Country {Code = \"li\", PhoneCode = \"423\", Name = \"Liechtenstein\"},\r\n            new Country {Code = \"lt\", PhoneCode = \"370\", Name = \"Lithuania\"},\r\n            new Country {Code = \"lu\", PhoneCode = \"352\", Name = \"Luxembourg\"},\r\n            new Country {Code = \"mo\", PhoneCode = \"853\", Name = \"Macau\"},\r\n            new Country {Code = \"mk\", PhoneCode = \"389\", Name = \"Macedonia\"},\r\n            new Country {Code = \"mg\", PhoneCode = \"261\", Name = \"Madagascar\"},\r\n            new Country {Code = \"mw\", PhoneCode = \"265\", Name = \"Malawi\"},\r\n            new Country {Code = \"my\", PhoneCode = \"60\", Name = \"Malaysia\"},\r\n            new Country {Code = \"mv\", PhoneCode = \"960\", Name = \"Maldives\"},\r\n            new Country {Code = \"ml\", PhoneCode = \"223\", Name = \"Mali\"},\r\n            new Country {Code = \"mt\", PhoneCode = \"356\", Name = \"Malta\"},\r\n            new Country {Code = \"mh\", PhoneCode = \"692\", Name = \"Marshall Islands\"},\r\n            new Country {Code = \"mq\", PhoneCode = \"596\", Name = \"Martinique\"},\r\n            new Country {Code = \"mr\", PhoneCode = \"222\", Name = \"Mauritania\"},\r\n            new Country {Code = \"mu\", PhoneCode = \"230\", Name = \"Mauritius\"},\r\n            new Country {Code = \"mx\", PhoneCode = \"52\", Name = \"Mexico\"},\r\n            new Country {Code = \"fm\", PhoneCode = \"691\", Name = \"Micronesia\"},\r\n            new Country {Code = \"md\", PhoneCode = \"373\", Name = \"Moldova\"},\r\n            new Country {Code = \"mc\", PhoneCode = \"377\", Name = \"Monaco\"},\r\n            new Country {Code = \"mn\", PhoneCode = \"976\", Name = \"Mongolia\"},\r\n            new Country {Code = \"me\", PhoneCode = \"382\", Name = \"Montenegro\"},\r\n            new Country {Code = \"ms\", PhoneCode = \"1664\", Name = \"Montserrat\"},\r\n            new Country {Code = \"ma\", PhoneCode = \"212\", Name = \"Morocco\"},\r\n            new Country {Code = \"mz\", PhoneCode = \"258\", Name = \"Mozambique\"},\r\n            new Country {Code = \"mm\", PhoneCode = \"95\", Name = \"Myanmar\"},\r\n            new Country {Code = \"na\", PhoneCode = \"264\", Name = \"Namibia\"},\r\n            new Country {Code = \"nr\", PhoneCode = \"674\", Name = \"Nauru\"},\r\n            new Country {Code = \"np\", PhoneCode = \"977\", Name = \"Nepal\"},\r\n            new Country {Code = \"nl\", PhoneCode = \"31\", Name = \"Netherlands\"},\r\n            new Country {Code = \"nc\", PhoneCode = \"687\", Name = \"New Caledonia\"},\r\n            new Country {Code = \"nz\", PhoneCode = \"64\", Name = \"New Zealand\"},\r\n            new Country {Code = \"ni\", PhoneCode = \"505\", Name = \"Nicaragua\"},\r\n            new Country {Code = \"ne\", PhoneCode = \"227\", Name = \"Niger\"},\r\n            new Country {Code = \"ng\", PhoneCode = \"234\", Name = \"Nigeria\"},\r\n            new Country {Code = \"nu\", PhoneCode = \"683\", Name = \"Niue\"},\r\n            new Country {Code = \"nf\", PhoneCode = \"672\", Name = \"Norfolk Island\"},\r\n            new Country {Code = \"kp\", PhoneCode = \"850\", Name = \"North Korea\"},\r\n            new Country {Code = \"mp\", PhoneCode = \"1670\", Name = \"Northern Mariana Islands\"},\r\n            new Country {Code = \"no\", PhoneCode = \"47\", Name = \"Norway\"},\r\n            new Country {Code = \"om\", PhoneCode = \"968\", Name = \"Oman\"},\r\n            new Country {Code = \"pk\", PhoneCode = \"92\", Name = \"Pakistan\"},\r\n            new Country {Code = \"pw\", PhoneCode = \"680\", Name = \"Palau\"},\r\n            new Country {Code = \"ps\", PhoneCode = \"970\", Name = \"Palestine\"},\r\n            new Country {Code = \"pa\", PhoneCode = \"507\", Name = \"Panama\"},\r\n            new Country {Code = \"pg\", PhoneCode = \"675\", Name = \"Papua New Guinea\"},\r\n            new Country {Code = \"py\", PhoneCode = \"595\", Name = \"Paraguay\"},\r\n            new Country {Code = \"pe\", PhoneCode = \"51\", Name = \"Peru\"},\r\n            new Country {Code = \"ph\", PhoneCode = \"63\", Name = \"Philippines\"},\r\n            new Country {Code = \"pl\", PhoneCode = \"48\", Name = \"Poland\"},\r\n            new Country {Code = \"pt\", PhoneCode = \"351\", Name = \"Portugal\"},\r\n            new Country {Code = \"pr\", PhoneCode = \"1\", Name = \"Puerto Rico\"},\r\n            new Country {Code = \"qa\", PhoneCode = \"974\", Name = \"Qatar\"},\r\n            new Country {Code = \"re\", PhoneCode = \"262\", Name = \"Réunion\"},\r\n            new Country {Code = \"ro\", PhoneCode = \"40\", Name = \"Romania\"},\r\n            new Country {Code = \"ru\", PhoneCode = \"7\", Name = \"Russian Federation\"},\r\n            new Country {Code = \"rw\", PhoneCode = \"250\", Name = \"Rwanda\"},\r\n            new Country {Code = \"sh\", PhoneCode = \"290\", Name = \"Saint Helena\"},\r\n            new Country {Code = \"sh\", PhoneCode = \"247\", Name = \"Saint Helena\"},\r\n            new Country {Code = \"kn\", PhoneCode = \"1869\", Name = \"Saint Kitts & Nevis\"},\r\n            new Country {Code = \"lc\", PhoneCode = \"1758\", Name = \"Saint Lucia\"},\r\n            new Country {Code = \"pm\", PhoneCode = \"508\", Name = \"Saint Pierre & Miquelon\"},\r\n            new Country {Code = \"vc\", PhoneCode = \"1784\", Name = \"Saint Vincent & the Grenadines\"},\r\n            new Country {Code = \"ws\", PhoneCode = \"685\", Name = \"Samoa\"},\r\n            new Country {Code = \"sm\", PhoneCode = \"378\", Name = \"San Marino\"},\r\n            new Country {Code = \"st\", PhoneCode = \"239\", Name = \"São Tomé & Príncipe\"},\r\n            new Country {Code = \"sa\", PhoneCode = \"966\", Name = \"Saudi Arabia\"},\r\n            new Country {Code = \"sn\", PhoneCode = \"221\", Name = \"Senegal\"},\r\n            new Country {Code = \"rs\", PhoneCode = \"381\", Name = \"Serbia\"},\r\n            new Country {Code = \"sc\", PhoneCode = \"248\", Name = \"Seychelles\"},\r\n            new Country {Code = \"sl\", PhoneCode = \"232\", Name = \"Sierra Leone\"},\r\n            new Country {Code = \"sg\", PhoneCode = \"65\", Name = \"Singapore\"},\r\n            new Country {Code = \"sx\", PhoneCode = \"1721\", Name = \"Sint Maarten\"},\r\n            new Country {Code = \"sk\", PhoneCode = \"421\", Name = \"Slovakia\"},\r\n            new Country {Code = \"si\", PhoneCode = \"386\", Name = \"Slovenia\"},\r\n            new Country {Code = \"sb\", PhoneCode = \"677\", Name = \"Solomon Islands\"},\r\n            new Country {Code = \"so\", PhoneCode = \"252\", Name = \"Somalia\"},\r\n            new Country {Code = \"za\", PhoneCode = \"27\", Name = \"South Africa\"},\r\n            new Country {Code = \"kr\", PhoneCode = \"82\", Name = \"South Korea\"},\r\n            new Country {Code = \"ss\", PhoneCode = \"211\", Name = \"South Sudan\"},\r\n            new Country {Code = \"es\", PhoneCode = \"34\", Name = \"Spain\"},\r\n            new Country {Code = \"lk\", PhoneCode = \"94\", Name = \"Sri Lanka\"},\r\n            new Country {Code = \"sd\", PhoneCode = \"249\", Name = \"Sudan\"},\r\n            new Country {Code = \"sr\", PhoneCode = \"597\", Name = \"Suriname\"},\r\n            new Country {Code = \"sz\", PhoneCode = \"268\", Name = \"Swaziland\"},\r\n            new Country {Code = \"se\", PhoneCode = \"46\", Name = \"Sweden\"},\r\n            new Country {Code = \"ch\", PhoneCode = \"41\", Name = \"Switzerland\"},\r\n            new Country {Code = \"sy\", PhoneCode = \"963\", Name = \"Syrian Arab Republic\"},\r\n            new Country {Code = \"tw\", PhoneCode = \"886\", Name = \"Taiwan\"},\r\n            new Country {Code = \"tj\", PhoneCode = \"992\", Name = \"Tajikistan\"},\r\n            new Country {Code = \"tz\", PhoneCode = \"255\", Name = \"Tanzania\"},\r\n            new Country {Code = \"th\", PhoneCode = \"66\", Name = \"Thailand\"},\r\n            new Country {Code = \"tl\", PhoneCode = \"670\", Name = \"Timor-leste\"},\r\n            new Country {Code = \"tg\", PhoneCode = \"228\", Name = \"Togo\"},\r\n            new Country {Code = \"tk\", PhoneCode = \"690\", Name = \"Tokelau\"},\r\n            new Country {Code = \"to\", PhoneCode = \"676\", Name = \"Tonga\"},\r\n            new Country {Code = \"tt\", PhoneCode = \"1868\", Name = \"Trinidad & Tobago\"},\r\n            new Country {Code = \"tn\", PhoneCode = \"216\", Name = \"Tunisia\"},\r\n            new Country {Code = \"tr\", PhoneCode = \"90\", Name = \"Turkey\"},\r\n            new Country {Code = \"tm\", PhoneCode = \"993\", Name = \"Turkmenistan\"},\r\n            new Country {Code = \"tc\", PhoneCode = \"1649\", Name = \"Turks & Caicos Islands\"},\r\n            new Country {Code = \"tv\", PhoneCode = \"688\", Name = \"Tuvalu\"},\r\n            new Country {Code = \"ug\", PhoneCode = \"256\", Name = \"Uganda\"},\r\n            new Country {Code = \"ua\", PhoneCode = \"380\", Name = \"Ukraine\"},\r\n            new Country {Code = \"ae\", PhoneCode = \"971\", Name = \"United Arab Emirates\"},\r\n            new Country {Code = \"gb\", PhoneCode = \"44\", Name = \"United Kingdom\"},\r\n            new Country {Code = \"us\", PhoneCode = \"1\", Name = \"United States\"},\r\n            new Country {Code = \"uy\", PhoneCode = \"598\", Name = \"Uruguay\"},\r\n            new Country {Code = \"vi\", PhoneCode = \"1340\", Name = \"US Virgin Islands\"},\r\n            new Country {Code = \"uz\", PhoneCode = \"998\", Name = \"Uzbekistan\"},\r\n            new Country {Code = \"vu\", PhoneCode = \"678\", Name = \"Vanuatu\"},\r\n            new Country {Code = \"ve\", PhoneCode = \"58\", Name = \"Venezuela\"},\r\n            new Country {Code = \"vn\", PhoneCode = \"84\", Name = \"Vietnam\"},\r\n            new Country {Code = \"wf\", PhoneCode = \"681\", Name = \"Wallis & Futuna\"},\r\n            new Country {Code = \"ye\", PhoneCode = \"967\", Name = \"Yemen\"},\r\n            new Country {Code = \"zm\", PhoneCode = \"260\", Name = \"Zambia\"},\r\n            new Country {Code = \"zw\", PhoneCode = \"263\", Name = \"Zimbabwe\"},\r\n\r\n        };\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChooseNotificationSpanViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChooseNotificationSpanViewModel : ViewModelBase\r\n    {\r\n         public LoopingObservableCollection<TimerSpan> Items { get; private set; }\r\n\r\n         public ChooseNotificationSpanViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) : \r\n            base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Items = new LoopingObservableCollection<TimerSpan>\r\n            {\r\n                new TimerSpan(AppResources.Enabled, string.Empty, 0),\r\n                new TimerSpan(AppResources.HourNominativeSingular,  \"1\", (int)TimeSpan.FromHours(1.0).TotalSeconds),\r\n                new TimerSpan(AppResources.HourGenitivePlural, \"8\", (int)TimeSpan.FromHours(8.0).TotalSeconds),\r\n                new TimerSpan(AppResources.DayNominativePlural, \"2\", (int)TimeSpan.FromDays(2.0).TotalSeconds),\r\n                new TimerSpan(AppResources.Disabled, string.Empty, int.MaxValue),\r\n            };\r\n\r\n            if (StateService.SelectedTimerSpan == null)\r\n            {\r\n                Items.SelectedItem = Items[0];\r\n            }\r\n            else\r\n            {\r\n                var selectedItem = Items.FirstOrDefault(x => x.Seconds == StateService.SelectedTimerSpan.Seconds);\r\n                Items.SelectedItem = selectedItem ?? Items[0];\r\n            }\r\n            StateService.SelectedTimerSpan = null;\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            StateService.SelectedTimerSpan = (TimerSpan)Items.SelectedItem;\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ChooseTTLViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Windows.Controls;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls.Primitives;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChooseTTLViewModel : Screen\r\n    {\r\n        public LoopingObservableCollection<TimerSpan> Items { get; private set; }\r\n\r\n        private readonly INavigationService _navigationService;\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        public string Subtitle { get; set; }\r\n\r\n        public ChooseTTLViewModel(INavigationService navigationService, IStateService stateService)\r\n        {\r\n            _navigationService = navigationService;\r\n            _stateService = stateService;\r\n\r\n            var isEncryptedTimer = _stateService.IsEncryptedTimer;\r\n            _stateService.IsEncryptedTimer = false;\r\n\r\n            var selectedTimerSpan = _stateService.SelectedTimerSpan;\r\n            _stateService.SelectedTimerSpan = null;\r\n\r\n            Items = new LoopingObservableCollection<TimerSpan>();\r\n            TimerSpan defaultSpan = null;\r\n            if (isEncryptedTimer)\r\n            {\r\n                Items.Add(new TimerSpan(AppResources.OffMasculine, string.Empty, 0));\r\n                for (var i = 1; i <= 15; i++)\r\n                {\r\n                    Items.Add( new TimerSpan(\r\n                        Language.Declension2(\r\n                                i,\r\n                                AppResources.SecondNominativeSingular,\r\n                                AppResources.SecondNominativePlural,\r\n                                AppResources.SecondGenitiveSingular,\r\n                                AppResources.SecondGenitivePlural),  \r\n                                i.ToString(), i));\r\n                }\r\n                Items.Add(new TimerSpan(AppResources.SecondGenitivePlural, \"30\", 30));\r\n                Items.Add(new TimerSpan(AppResources.MinuteNominativeSingular, \"1\", 60));\r\n                Items.Add(new TimerSpan(AppResources.HourNominativeSingular, \"1\", (int) TimeSpan.FromHours(1.0).TotalSeconds));\r\n                Items.Add(new TimerSpan(AppResources.DayNominativeSingular, \"1\", (int) TimeSpan.FromDays(1.0).TotalSeconds));\r\n                Items.Add(new TimerSpan(AppResources.WeekNominativeSingular, \"1\", (int) TimeSpan.FromDays(7.0).TotalSeconds));\r\n\r\n                defaultSpan = Items[0];\r\n            }\r\n            else\r\n            {\r\n                Items.Add(new TimerSpan(AppResources.OffMasculine, string.Empty, 0));\r\n                for (var i = 1; i <= 30; i++)\r\n                {\r\n                    Items.Add(new TimerSpan(\r\n                        Language.Declension2(\r\n                                i,\r\n                                AppResources.SecondNominativeSingular,\r\n                                AppResources.SecondNominativePlural,\r\n                                AppResources.SecondGenitiveSingular,\r\n                                AppResources.SecondGenitivePlural), \r\n                                i.ToString(), i));\r\n                }\r\n                Items.Add(new TimerSpan(AppResources.SecondGenitivePlural, \"35\", 35));\r\n                Items.Add(new TimerSpan(AppResources.SecondGenitivePlural, \"40\", 40));\r\n                Items.Add(new TimerSpan(AppResources.SecondGenitivePlural, \"45\", 45));\r\n                Items.Add(new TimerSpan(AppResources.SecondGenitivePlural, \"50\", 50));\r\n                Items.Add(new TimerSpan(AppResources.SecondGenitivePlural, \"55\", 55));\r\n                Items.Add(new TimerSpan(AppResources.MinuteNominativeSingular, \"1\", 60));\r\n\r\n                defaultSpan = Items[10];\r\n            }\r\n\r\n            if (selectedTimerSpan != null)\r\n            {\r\n                Items.SelectedItem = Items.FirstOrDefault(x => x.Seconds == selectedTimerSpan.Seconds);\r\n            }\r\n            if (Items.SelectedItem == null)\r\n            {\r\n                Items.SelectedItem = defaultSpan;\r\n            }\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            _stateService.SelectedTimerSpan = (TimerSpan)Items.SelectedItem;\r\n            _navigationService.GoBack();\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            _navigationService.GoBack();\r\n        }\r\n    }\r\n\r\n    public class LoopingObservableCollection<T> : ObservableCollection<T>, ILoopingSelectorDataSource\r\n    {\r\n        public object GetNext(object relativeTo)\r\n        {\r\n\r\n            if (relativeTo == null) return this[0];\r\n\r\n            var item = (T)relativeTo;\r\n            var position = IndexOf(item);\r\n            if (position + 1 == Count)\r\n            {\r\n                return this[0];\r\n            }\r\n\r\n            return this[position + 1];\r\n        }\r\n\r\n        public object GetPrevious(object relativeTo)\r\n        {\r\n            if (relativeTo == null) return this[Count - 1];\r\n\r\n            var item = (T)relativeTo;\r\n            var position = IndexOf(item);\r\n            if (position == 0)\r\n            {\r\n                return this[Count - 1];\r\n            }\r\n\r\n            return this[position - 1];\r\n        }\r\n\r\n        public object SelectedItem { get; set; }\r\n\r\n        public event EventHandler<SelectionChangedEventArgs> SelectionChanged;\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ClearCacheSettingsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ClearCacheSettingsViewModel : TelegramPropertyChangedBase\r\n    {\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen\r\n        {\r\n            get { return _isOpen; }\r\n            set\r\n            {\r\n                if (_isOpen != value)\r\n                {\r\n                    _isOpen = value;\r\n                    NotifyOfPropertyChange(() => IsOpen);\r\n                }\r\n            }\r\n        }\r\n\r\n        private readonly System.Action _clearCacheAction;\r\n\r\n        public ClearCacheSettings Settings { get; set; }\r\n\r\n        public ClearCacheSettingsViewModel(ClearCacheSettings settings, System.Action clearCacheAction)\r\n        {\r\n            _clearCacheAction = clearCacheAction;\r\n            Settings = settings;\r\n        }\r\n\r\n        public void ClearCache()\r\n        {\r\n            _clearCacheAction.SafeInvoke();\r\n            Close();\r\n        }\r\n\r\n        public void Open()\r\n        {\r\n            IsOpen = true;\r\n        }\r\n\r\n        public void Close()\r\n        {\r\n            IsOpen = false;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/EditChatUsernameViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeniy Nadymov, 2013-2018.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class EditChatUsernameViewModel : ViewModelBase\r\n    {\r\n        private readonly TLChannel _currentItem;\r\n\r\n        public bool IsMegaGroup\r\n        {\r\n            get { return (_currentItem != null && _currentItem.IsMegaGroup); }\r\n        }\r\n\r\n        public string Caption\r\n        {\r\n            get\r\n            {\r\n                if (IsMegaGroup)\r\n                {\r\n                    return AppResources.SupergroupName;\r\n                }\r\n\r\n                return AppResources.ChannelName;\r\n            }\r\n        }\r\n\r\n        public string Description\r\n        {\r\n            get\r\n            {\r\n                if (IsMegaGroup)\r\n                {\r\n                    return AppResources.SupergroupNameDescription;\r\n                }\r\n\r\n                return AppResources.ChannelNameDescription;\r\n            }\r\n        }\r\n\r\n        public string Description2\r\n        {\r\n            get\r\n            {\r\n                if (IsMegaGroup)\r\n                {\r\n                    return AppResources.SupergroupNameDescription2;\r\n                }\r\n\r\n                return AppResources.ChannelNameDescription2;\r\n            }\r\n        }\r\n\r\n        public string Link\r\n        {\r\n            get { return Environment.NewLine + string.Format(Constants.UsernameLinkPlaceholder, Username); }\r\n        }\r\n\r\n        private string _username;\r\n\r\n        public string Username\r\n        {\r\n            get { return _username; }\r\n            set { SetField(ref _username, value, () => Username); }\r\n        }\r\n\r\n        private bool _hasError;\r\n\r\n        public bool HasError\r\n        {\r\n            get { return _hasError; }\r\n            set\r\n            {\r\n                SetField(ref _hasError, value, () => HasError);\r\n                NotifyOfPropertyChange(() => ErrorBrush);\r\n            }\r\n        }\r\n\r\n        private string _error = \" \";\r\n\r\n        public string Error\r\n        {\r\n            get { return _error; }\r\n            set { SetField(ref _error, value, () => Error); }\r\n        }\r\n\r\n        public SolidColorBrush ErrorBrush\r\n        {\r\n            get { return HasError ? new SolidColorBrush(Color.FromArgb(255, 178, 54, 46)) : new SolidColorBrush(Colors.Green); }\r\n        }\r\n\r\n        public EditChatUsernameViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _currentItem = StateService.CurrentChat as TLChannel;\r\n            StateService.CurrentChat = null;\r\n\r\n            var userName = _currentItem as IUserName;\r\n            if (userName != null && userName.UserName != null)\r\n            {\r\n                Username = userName.UserName.ToString();\r\n            }\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Username))\r\n                {\r\n                    NotifyOfPropertyChange(() => Link);\r\n                }\r\n            };\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (_currentItem == null) return;\r\n\r\n            if (IsWorking) return;\r\n\r\n            var username = Username;\r\n            if (username != null\r\n                && username.StartsWith(\"@\"))\r\n            {\r\n                username = username.Substring(1, username.Length - 1);\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.UpdateUsernameAsync(_currentItem.ToInputChannel(), new TLString(username),\r\n                user => BeginOnUIThread(() =>\r\n                {\r\n                    var userName = _currentItem as IUserName;\r\n                    if (userName != null)\r\n                    {\r\n                        userName.UserName = new TLString(username);\r\n                        CacheService.Commit();\r\n\r\n                        EventAggregator.Publish(new ChannelNameChangedEventArgs(_currentItem));\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    NavigationService.GoBack();\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                    {\r\n                        HasError = true;\r\n                        Error = AppResources.FloodWaitString;\r\n                        MessageBox.Show(AppResources.FloodWaitString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                    {\r\n                        var messageBuilder = new StringBuilder();\r\n                        messageBuilder.AppendLine(AppResources.ServerErrorMessage);\r\n                        messageBuilder.AppendLine();\r\n                        messageBuilder.AppendLine(\"Method: account.updateUsername\");\r\n                        messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                        HasError = true;\r\n                        Error = AppResources.ServerError;\r\n                        MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK);\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_NOT_MODIFIED))\r\n                        {\r\n                            HasError = false;\r\n                            Error = \" \";\r\n                            NavigationService.GoBack();\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.CHANNELS_ADMIN_PUBLIC_TOO_MUCH))\r\n                        {\r\n                            var message = AppResources.ChannelsAdminPublicTooMuchShort;\r\n                            HasError = true;\r\n                            Error = message;\r\n                            MessageBox.Show(message, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_INVALID))\r\n                        {\r\n                            var message = IsMegaGroup\r\n                                ? AppResources.SupergroupNameInvalid\r\n                                : AppResources.ChannelNameInvalid;\r\n                            HasError = true;\r\n                            Error = message;\r\n                            MessageBox.Show(message, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_OCCUPIED))\r\n                        {\r\n                            var message = IsMegaGroup\r\n                                ? AppResources.SupergroupNameOccupied\r\n                                : AppResources.ChannelNameOccupied;\r\n                            HasError = true;\r\n                            Error = message;\r\n                            MessageBox.Show(message, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else\r\n                        {\r\n                            HasError = true;\r\n                            Error = error.ToString();\r\n                            //Execute.BeginOnUIThread(() => NavigationService.GoBack());\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        HasError = true;\r\n                        Error = string.Empty;\r\n                        Execute.ShowDebugMessage(\"channel.updateUsername error \" + error);\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                }));\r\n        }\r\n\r\n        private static bool IsValidSymbol(char symbol)\r\n        {\r\n            if ((symbol >= 'a' && symbol <= 'z')\r\n                || (symbol >= 'A' && symbol <= 'Z')\r\n                || (symbol >= '0' && symbol <= '9')\r\n                || symbol == '_')\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public void Check()\r\n        {\r\n            var local = Username;\r\n            var username = Username;\r\n            if (username != null\r\n                && username.StartsWith(\"@\"))\r\n            {\r\n                username = username.Substring(1, username.Length - 1);\r\n            }\r\n\r\n            if (string.IsNullOrEmpty(username))\r\n            {\r\n                HasError = false;\r\n                //Error = string.Empty;\r\n                return;\r\n            }\r\n\r\n            var isValidSymbols = username.All(IsValidSymbol);\r\n            if (!isValidSymbols)\r\n            {\r\n                var message = IsMegaGroup ? AppResources.SupergroupNameInvalid : AppResources.ChannelNameInvalid;\r\n                HasError = true;\r\n                Error = message;\r\n                return;\r\n            }\r\n\r\n            if (username[0] >= '0' && username[0] <= '9')\r\n            {\r\n                var message = IsMegaGroup ? AppResources.SupergroupNameStartsWithNumber : AppResources.ChannelNameStartsWithNumber;\r\n                HasError = true;\r\n                Error = message;\r\n                return;\r\n            }\r\n\r\n            if (username.Length < Constants.UsernameMinLength)\r\n            {\r\n                var message = IsMegaGroup ? AppResources.SupergroupNameShort : AppResources.ChannelNameShort;\r\n                HasError = true;\r\n                Error = message;\r\n                return;\r\n            }\r\n\r\n            if (_currentItem == null) return;\r\n\r\n            MTProtoService.CheckUsernameAsync(_currentItem.ToInputChannel(), new TLString(username),\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (local != Username) return;\r\n\r\n                    HasError = !result.Value;\r\n                    if (HasError)\r\n                    {\r\n                        Error = AppResources.UsernameOccupied;\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    HasError = true;\r\n                    if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                    {\r\n                        Error = AppResources.FloodWaitString;\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                    {\r\n                        var messageBuilder = new StringBuilder();\r\n                        messageBuilder.AppendLine(AppResources.ServerErrorMessage);\r\n                        messageBuilder.AppendLine();\r\n                        messageBuilder.AppendLine(\"Method: channel.checkUsername\");\r\n                        messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                        Error = AppResources.ServerError;\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_INVALID))\r\n                        {\r\n                            var message = IsMegaGroup\r\n                                ? AppResources.SupergroupNameInvalid\r\n                                : AppResources.ChannelNameInvalid;\r\n                            Error = message;\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.CHANNELS_ADMIN_PUBLIC_TOO_MUCH))\r\n                        {\r\n                            var message = AppResources.ChannelsAdminPublicTooMuchShort;\r\n                            Error = message;\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_OCCUPIED))\r\n                        {\r\n                            var message = IsMegaGroup\r\n                                ? AppResources.SupergroupNameOccupied\r\n                                : AppResources.ChannelNameOccupied;\r\n                            Error = message;\r\n                        }\r\n                        else\r\n                        {\r\n                            Error = error.ToString();\r\n                            //Execute.BeginOnUIThread(() => NavigationService.GoBack());\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Error = string.Empty;\r\n                        Execute.ShowDebugMessage(\"channel.updateUsername error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void CopyLink()\r\n        {\r\n            if (string.IsNullOrEmpty(Username)) return;\r\n\r\n            Clipboard.SetText(Link.Trim());\r\n            MessageBox.Show(AppResources.CopyLinkHint, AppResources.AppName, MessageBoxButton.OK);\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n    }\r\n\r\n    public class ChannelNameChangedEventArgs\r\n    {\r\n        public TLChannel Channel { get; set; }\r\n\r\n        public ChannelNameChangedEventArgs(TLChannel channel)\r\n        {\r\n            Channel = channel;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/EditCurrentUserViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls.Primitives;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views.Controls;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing TaskResult = Microsoft.Phone.Tasks.TaskResult;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class EditCurrentUserViewModel :\r\n        ItemDetailsViewModelBase, Telegram.Api.Aggregator.IHandle<UploadableItem>\r\n    {\r\n        private string _firstName;\r\n\r\n        public string FirstName\r\n        {\r\n            get { return _firstName; }\r\n            set { SetField(ref _firstName, value, () => FirstName); }\r\n        }\r\n\r\n        private string _lastName;\r\n\r\n        public string LastName\r\n        {\r\n            get { return _lastName; }\r\n            set { SetField(ref _lastName, value, () => LastName); }\r\n        }\r\n\r\n        private readonly IUploadFileManager _uploadManager;\r\n\r\n        public EditCurrentUserViewModel(IUploadFileManager uploadManager, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) : \r\n            base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            _uploadManager = uploadManager;\r\n\r\n            CurrentItem = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n\r\n            FirstName = ((TLUserBase)CurrentItem).FirstName.Value;\r\n            LastName = ((TLUserBase)CurrentItem).LastName.Value;\r\n        }\r\n\r\n        //~EditCurrentUserViewModel()\r\n        //{\r\n            \r\n        //}\r\n\r\n        public void SetProfilePhoto()\r\n        {\r\n            EditCurrentUserActions.EditPhoto(photo =>\r\n            {\r\n                var fileId = TLLong.Random();\r\n                IsWorking = true;\r\n                _uploadManager.UploadFile(fileId, new TLUser66{ IsSelf = true }, photo);\r\n            });\r\n        }\r\n\r\n        public void DeletePhoto()\r\n        {\r\n            MTProtoService.UpdateProfilePhotoAsync(new TLInputPhotoEmpty(), \r\n                result =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"photos.updateProfilePhoto result \" + result);\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"photos.updateProfilePhoto error \" + error);\r\n                });\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.UpdateProfileAsync(new TLString(FirstName), new TLString(LastName), null,\r\n                statedMessage => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    var user = CurrentItem as TLUserBase;\r\n                    if (user != null) user.NotifyOfPropertyChange(() => user.FullName2);\r\n\r\n                    NavigationService.GoBack();\r\n                }),\r\n                error => BeginOnUIThread(() => \r\n                {\r\n                    Execute.ShowDebugMessage(\"account.updateProfile error \" + error);\r\n\r\n                    IsWorking = false;\r\n                    NavigationService.GoBack();\r\n                }));\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n            var userBase = item.Owner as TLUserBase;\r\n            if (userBase != null && userBase.IsSelf)\r\n            {\r\n                IsWorking = false;\r\n            }\r\n        }\r\n    }\r\n\r\n    public static class EditCurrentUserActions\r\n    {\r\n        private static CropControl _cropControl;\r\n\r\n        public static void EditPhoto(Action<byte[]> callback)\r\n        {\r\n            var photoPickerSettings = IoC.Get<IStateService>().GetPhotoPickerSettings();\r\n            if (photoPickerSettings != null && photoPickerSettings.External)\r\n            {\r\n                var photoChooserTask = new PhotoChooserTask { ShowCamera = true, PixelHeight = 800, PixelWidth = 800 };\r\n\r\n                photoChooserTask.Completed += (o, e) =>\r\n                {\r\n                    if (e.TaskResult == TaskResult.OK)\r\n                    {\r\n                        byte[] bytes;\r\n                        var sourceStream = e.ChosenPhoto;\r\n                        using (var memoryStream = new MemoryStream())\r\n                        {\r\n                            sourceStream.CopyTo(memoryStream);\r\n                            bytes = memoryStream.ToArray();\r\n                        }\r\n\r\n                        callback.SafeInvoke(bytes);\r\n                    }\r\n                };\r\n\r\n                photoChooserTask.Show();\r\n            }\r\n            else\r\n            {\r\n                ChooseAttachmentViewModel.OpenPhotoPicker(true, (result1, result2) =>\r\n                {\r\n                    Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.4), () =>\r\n                    {\r\n                        var isVisible = false;\r\n                        var frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n                        PhoneApplicationPage page = null;\r\n                        if (frame != null)\r\n                        {\r\n                            page = frame.Content as PhoneApplicationPage;\r\n                            if (page != null)\r\n                            {\r\n                                var applicationBar = page.ApplicationBar;\r\n                                if (applicationBar != null)\r\n                                {\r\n                                    isVisible = applicationBar.IsVisible;\r\n                                    applicationBar.IsVisible = false;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        if (page == null) return;\r\n\r\n                        var popup = new Popup();\r\n                        var cropControl = new CropControl\r\n                        {\r\n                            Width = page.ActualWidth,\r\n                            Height = page.ActualHeight\r\n                        };\r\n                        _cropControl = cropControl;\r\n                        page.SizeChanged += PageOnSizeChanged;\r\n\r\n                        cropControl.Close += (sender, args) =>\r\n                        {\r\n                            _cropControl = null;\r\n                            popup.IsOpen = false;\r\n                            popup.Child = null;\r\n\r\n                            frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n                            if (frame != null)\r\n                            {\r\n                                page = frame.Content as PhoneApplicationPage;\r\n                                if (page != null)\r\n                                {\r\n                                    page.SizeChanged -= PageOnSizeChanged;\r\n                                    var applicationBar = page.ApplicationBar;\r\n                                    if (applicationBar != null)\r\n                                    {\r\n                                        applicationBar.IsVisible = isVisible;\r\n                                    }\r\n                                }\r\n                            }\r\n                        };\r\n                        cropControl.Crop += (sender, args) =>\r\n                        {\r\n                            callback.SafeInvoke(args.File);\r\n\r\n                            cropControl.TryClose();\r\n                        };\r\n                        cropControl.SetFile(result1.FirstOrDefault(), result2.FirstOrDefault());\r\n\r\n                        popup.Child = cropControl;\r\n                        popup.IsOpen = true;\r\n                    });\r\n                });\r\n            }\r\n        }\r\n\r\n        private static void PageOnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            if (_cropControl != null)\r\n            {\r\n                _cropControl.Width = e.NewSize.Width;\r\n                _cropControl.Height = e.NewSize.Height;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/EditPhoneNumberViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Auth;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class EditPhoneNumberViewModel : ItemDetailsViewModelBase\r\n    {\r\n        public EditPhoneNumberViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            if (StateService.CurrentContact != null)\r\n            {\r\n                CurrentItem = StateService.CurrentContact;\r\n                StateService.CurrentContact = null;\r\n            }\r\n        }\r\n\r\n        public void ChangePhoneNumber()\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var result = MessageBox.Show(AppResources.NewNumberConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                if (result == MessageBoxResult.OK)\r\n                {\r\n                    StateService.RemoveBackEntry = true;\r\n                    StateService.ChangePhoneNumber = true;\r\n                    NavigationService.UriFor<SignInViewModel>().Navigate();\r\n                }\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/EditUsernameViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class EditUsernameViewModel : ViewModelBase\r\n    {\r\n        private string _username;\r\n\r\n        public string Username\r\n        {\r\n            get { return _username; }\r\n            set { SetField(ref _username, value, () => Username); }\r\n        }\r\n\r\n        private bool _isUsernameAvailable;\r\n\r\n        public bool IsUsernameAvailable\r\n        {\r\n            get { return _isUsernameAvailable; }\r\n            set { SetField(ref _isUsernameAvailable, value, () => IsUsernameAvailable); }\r\n        }\r\n\r\n        private string _usernameAvailableString;\r\n\r\n        public string UsernameAvailableString\r\n        {\r\n            get { return _usernameAvailableString; }\r\n            set { SetField(ref _usernameAvailableString, value, () => UsernameAvailableString); }\r\n        }\r\n\r\n        private bool _hasError;\r\n\r\n        public bool HasError\r\n        {\r\n            get { return _hasError; }\r\n            set\r\n            {\r\n                SetField(ref _hasError, value, () => HasError);\r\n                if (value)\r\n                {\r\n                    IsUsernameAvailable = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        private string _error = \" \";\r\n\r\n        public string Error\r\n        {\r\n            get { return _error; }\r\n            set { SetField(ref _error, value, () => Error); }\r\n        }\r\n\r\n        public EditUsernameViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            var currentUser = CacheService.GetUser(new TLInt(StateService.CurrentUserId)) as IUserName;\r\n\r\n            if (currentUser != null\r\n                && currentUser.UserName != null)\r\n            {\r\n                _username = currentUser.UserName.ToString();\r\n            }\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Username))\r\n                {\r\n                    var userName = Username;\r\n                    BeginOnUIThread(TimeSpan.FromSeconds(0.3), () =>\r\n                    {\r\n                        if (string.Equals(userName, Username))\r\n                        {\r\n                            Check();\r\n                        }\r\n                    });\r\n                }\r\n            };\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            var username = Username;\r\n            if (username != null\r\n                && username.StartsWith(\"@\"))\r\n            {\r\n                username = username.Substring(1, username.Length - 1);\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.UpdateUsernameAsync(new TLString(username),\r\n                user =>\r\n                {\r\n                    CacheService.SyncUser(user, result => EventAggregator.Publish(new UserNameChangedEventArgs(result)));\r\n\r\n                    IsWorking = false;\r\n                    BeginOnUIThread(() => NavigationService.GoBack());\r\n                },\r\n                error => Execute.BeginOnUIThread(() => \r\n                {\r\n                    if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                    {\r\n                        HasError = true;\r\n                        Error = AppResources.FloodWaitString;\r\n                        MessageBox.Show(AppResources.FloodWaitString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                    {\r\n                        var messageBuilder = new StringBuilder();\r\n                        messageBuilder.AppendLine(AppResources.ServerErrorMessage);\r\n                        messageBuilder.AppendLine();\r\n                        messageBuilder.AppendLine(\"Method: account.updateUsername\");\r\n                        messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                        HasError = true;\r\n                        Error = AppResources.ServerError;\r\n                        MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK);\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_INVALID))\r\n                        {\r\n                            HasError = true;\r\n                            Error = AppResources.UsernameInvalid;\r\n                            MessageBox.Show(AppResources.UsernameInvalid, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_OCCUPIED))\r\n                        {\r\n                            HasError = true;\r\n                            Error = AppResources.UsernameOccupied;\r\n                            MessageBox.Show(AppResources.UsernameOccupied, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_NOT_MODIFIED))\r\n                        {\r\n                            HasError = false;\r\n                            Error = string.Empty;\r\n                            NavigationService.GoBack();\r\n                        }\r\n                        else\r\n                        {\r\n                            HasError = true;\r\n                            Error = error.ToString();\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        HasError = true;\r\n                        Error = string.Empty;\r\n                        Execute.ShowDebugMessage(\"account.updateUsername error \" + error);\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                }));\r\n        }\r\n\r\n        private static bool IsValidSymbol(char symbol)\r\n        {\r\n            if ((symbol >= 'a' && symbol <= 'z')\r\n                || (symbol >= 'A' && symbol <= 'Z')\r\n                || (symbol >= '0' && symbol <= '9')\r\n                || symbol == '_')\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public void Check()\r\n        {\r\n            var checkedUsername = Username;\r\n\r\n            var username = Username;\r\n            if (username != null\r\n                && username.StartsWith(\"@\"))\r\n            {\r\n                username = username.Substring(1, username.Length - 1);\r\n            }\r\n\r\n            if (string.IsNullOrEmpty(username))\r\n            {\r\n                HasError = false;\r\n                IsUsernameAvailable = false;\r\n                //Error = string.Empty;\r\n                return;\r\n            }\r\n\r\n            var isValidSymbols = username.All(IsValidSymbol);\r\n            if (!isValidSymbols)\r\n            {\r\n                HasError = true;\r\n                Error = AppResources.UsernameInvalid;\r\n                return;\r\n            }\r\n\r\n            if (username[0] >= '0' && username[0] <= '9')\r\n            {\r\n                HasError = true;\r\n                Error = AppResources.UsernameStartsWithNumber;\r\n                return;\r\n            }\r\n\r\n            if (username.Length < Constants.UsernameMinLength)\r\n            {\r\n                HasError = true;\r\n                Error = AppResources.UsernameShort;\r\n                return;\r\n            }\r\n\r\n            HasError = false;\r\n            IsUsernameAvailable = false;\r\n\r\n            MTProtoService.CheckUsernameAsync(new TLString(username),\r\n                result =>\r\n                {\r\n                    HasError = !result.Value;\r\n                    if (HasError)\r\n                    {\r\n                        Error = AppResources.UsernameOccupied;\r\n                    }\r\n\r\n                    if (string.Equals(checkedUsername, Username) && result.Value)\r\n                    {\r\n                        IsUsernameAvailable = true;\r\n                        UsernameAvailableString = string.Format(AppResources.NameIsAvailable, checkedUsername);\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n                    HasError = true;\r\n                    if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                    {\r\n                        Error = AppResources.FloodWaitString;\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                    {\r\n                        var messageBuilder = new StringBuilder();\r\n                        messageBuilder.AppendLine(AppResources.ServerErrorMessage);\r\n                        messageBuilder.AppendLine();\r\n                        messageBuilder.AppendLine(\"Method: account.checkUsername\");\r\n                        messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                        Error = AppResources.ServerError;\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_INVALID))\r\n                        {\r\n                            Error = AppResources.UsernameInvalid;\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_OCCUPIED))\r\n                        {\r\n                            Error = AppResources.UsernameOccupied;\r\n                        }\r\n                        else\r\n                        {\r\n                            Error = error.ToString();\r\n                            //Execute.BeginOnUIThread(() => NavigationService.GoBack());\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Error = string.Empty;\r\n                        Execute.ShowDebugMessage(\"account.checkUsername error \" + error);\r\n                    }\r\n                });\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n    }\r\n\r\n    public class UserNameChangedEventArgs\r\n    {\r\n        public TLUserBase User { get; set; }\r\n\r\n        public UserNameChangedEventArgs(TLUserBase user)\r\n        {\r\n            User = user;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/EncryptionKeyViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Windows.Media.Imaging;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class EncryptionKeyViewModel  : TelegramPropertyChangedBase\r\n    {\r\n        private readonly TLString _key;\r\n        private readonly TLUserBase _contact;\r\n        private readonly TLEncryptedChatBase _chat;\r\n\r\n        public string VisualizationTime { get; set; }\r\n\r\n        public WriteableBitmap Bitmap { get; set; }\r\n\r\n        public string EncryptionKeyDescription1\r\n        {\r\n            get\r\n            {\r\n                var chat17 = _chat as TLEncryptedChat17;\r\n                var extended = chat17 != null\r\n                    && chat17.Layer.Value >= Constants.MinSecretChatWithExtendedKeyVisualizationLayer\r\n                    && chat17.ExtendedKey != null;\r\n                \r\n                if (extended)\r\n                {\r\n                    return string.Format(AppResources.EncryptionKeyExtendedDescription1, _contact.FirstName);\r\n                }\r\n\r\n                return string.Format(AppResources.EncryptionKeyDescription1, _contact.FirstName);\r\n            }\r\n        }\r\n\r\n        public string EncryptionKeyDescription2\r\n        {\r\n            get\r\n            {\r\n                var chat17 = _chat as TLEncryptedChat17;\r\n                var extended = chat17 != null\r\n                    && chat17.Layer.Value >= Constants.MinSecretChatWithExtendedKeyVisualizationLayer\r\n                    && chat17.ExtendedKey != null;\r\n\r\n                if (extended)\r\n                {\r\n                    return string.Format(AppResources.EncryptionKeyExtendedDescription2, _contact.FirstName);\r\n                }\r\n\r\n                return string.Format(AppResources.EncryptionKeyDescription2, _contact.FirstName);\r\n            }\r\n        }\r\n\r\n        public string EncriptionKeyString\r\n        {\r\n            get\r\n            {\r\n                var chat17 = _chat as TLEncryptedChat17;\r\n                var extended = chat17 != null \r\n                    && chat17.Layer.Value >= Constants.MinSecretChatWithExtendedKeyVisualizationLayer\r\n                    && chat17.ExtendedKey != null;\r\n\r\n                if (!extended) return string.Empty;\r\n\r\n                var key = _chat.OriginalKey ?? _chat.Key;\r\n                var extendedKey = _chat.ExtendedKey;\r\n\r\n                if (key == null || key.Data == null) return string.Empty;\r\n\r\n                var sha1Hash = Telegram.Api.Helpers.Utils.ComputeSHA1(key.Data);\r\n                var sha256Hash = Telegram.Api.Helpers.Utils.ComputeSHA256(extendedKey.Data);\r\n\r\n                return string.Format(\"{0}  {1}\\n{2}  {3}\\n{4}  {5}\\n{6}  {7}\",\r\n                    BitConverter.ToString(sha1Hash.SubArray(0, 4)).Replace('-', ' '),\r\n                    BitConverter.ToString(sha1Hash.SubArray(4, 4)).Replace('-', ' '), \r\n                    BitConverter.ToString(sha1Hash.SubArray(8, 4)).Replace('-', ' '),\r\n                    BitConverter.ToString(sha1Hash.SubArray(12, 4)).Replace('-', ' '),\r\n                    BitConverter.ToString(sha256Hash.SubArray(0, 4)).Replace('-', ' '),\r\n                    BitConverter.ToString(sha256Hash.SubArray(4, 4)).Replace('-', ' '), \r\n                    BitConverter.ToString(sha256Hash.SubArray(8, 4)).Replace('-', ' '),\r\n                    BitConverter.ToString(sha256Hash.SubArray(12, 4)).Replace('-', ' '));\r\n            }\r\n        }\r\n\r\n        public EncryptionKeyViewModel(IStateService stateService)\r\n        {\r\n            _key = stateService.CurrentKey;\r\n            stateService.CurrentKey = null;\r\n\r\n            _contact = stateService.CurrentContact;\r\n            stateService.CurrentContact = null;\r\n\r\n            _chat = stateService.CurrentEncryptedChat;\r\n            stateService.CurrentEncryptedChat = null;\r\n\r\n            var timer = Stopwatch.StartNew();\r\n            Bitmap = CreateKeyBitmap(_chat);\r\n            VisualizationTime = timer.Elapsed.ToString();\r\n        }\r\n\r\n        public void AnimationComplete()\r\n        {\r\n            \r\n            //NotifyOfPropertyChange(() => VisualizationTime);\r\n            //NotifyOfPropertyChange(() => Visualization);\r\n        }\r\n\r\n        public static void DrawFilledRectangle(WriteableBitmap bmp, int x1, int y1, int x2, int y2, int color)\r\n        {\r\n            // Use refs for faster access (really important!) speeds up a lot!\r\n            int w = bmp.PixelWidth;\r\n            int h = bmp.PixelHeight;\r\n            int[] pixels = bmp.Pixels;\r\n\r\n            // Check boundaries\r\n            if (x1 < 0) { x1 = 0; }\r\n            if (y1 < 0) { y1 = 0; }\r\n            if (x2 < 0) { x2 = 0; }\r\n            if (y2 < 0) { y2 = 0; }\r\n            if (x1 >= w) { x1 = w - 1; }\r\n            if (y1 >= h) { y1 = h - 1; }\r\n            if (x2 >= w) { x2 = w; }\r\n            if (y2 >= h) { y2 = h; }\r\n\r\n            int i = y1 * w;\r\n            for (int y = y1; y < y2; y++)\r\n            {\r\n                int i2 = i + x1;\r\n                while (i2 < i + x2)\r\n                {\r\n                    pixels[i2++] = color;\r\n                }\r\n                i += w;\r\n            }\r\n        }\r\n\r\n        private WriteableBitmap CreateKeyBitmap(TLEncryptedChatBase chat)\r\n        {\r\n            var key = chat.OriginalKey ?? chat.Key;\r\n            if (key == null) return null;\r\n            var data = key.Data;\r\n\r\n            var chat17 = chat as TLEncryptedChat17;\r\n\r\n            var extended = chat17 != null \r\n                && chat17.Layer.Value >= Constants.MinSecretChatWithExtendedKeyVisualizationLayer\r\n                && chat17.ExtendedKey != null;\r\n\r\n            var count = extended ? 12 : 8;\r\n            var length = extended ? 25 : 40;\r\n            var bitmap = new WriteableBitmap(count * length, count * length);\r\n            \r\n            var hash = Telegram.Api.Helpers.Utils.ComputeSHA1(data);\r\n            var colors = new []{\r\n                    0xffffffff,\r\n                    0xffd5e6f3,\r\n                    0xff2d5775,\r\n                    0xff2f99c9};\r\n\r\n            if (extended)\r\n            {\r\n                var extendedData = chat17.ExtendedKey.Data;\r\n\r\n                for (var i = 0; i < 64; i++)\r\n                {\r\n                    var index = (hash[i / 4] >> (2 * (i % 4))) & 0x3;\r\n\r\n                    var x = i % 12;\r\n                    var y = i / 12;\r\n                    DrawFilledRectangle(bitmap, x * length, y * length, (x + 1) * length, (y + 1) * length, (int)colors[index]);\r\n                }\r\n\r\n                var hash256 = Telegram.Api.Helpers.Utils.ComputeSHA256(extendedData);\r\n                for (var i = 0; i < 80; i++)\r\n                {\r\n                    var index = (hash256[i/4] >> (2*(i%4))) & 0x3;\r\n\r\n                    var local = i + 64;\r\n                    var x = local % 12;\r\n                    var y = local / 12;\r\n                    DrawFilledRectangle(bitmap, x*length, y*length, (x + 1)*length, (y + 1)*length, (int) colors[index]);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                for (int i = 0; i < 64; i++)\r\n                {\r\n                    int index = (hash[i / 4] >> (2 * (i % 4))) & 0x3;\r\n\r\n                    var x = i % 8;\r\n                    var y = i / 8;\r\n                    DrawFilledRectangle(bitmap, x * length, y * length, (x + 1) * length, (y + 1) * length, (int)colors[index]);\r\n                }\r\n            }\r\n\r\n\r\n            return bitmap;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/EnterPasscodeViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class EnterPasscodeViewModel : ViewModelBase\r\n    {\r\n        private string _passcode;\r\n\r\n        public string Passcode\r\n        {\r\n            get { return _passcode; }\r\n            set\r\n            {\r\n                SetField(ref _passcode, value, () => Passcode);\r\n                NotifyOfPropertyChange(() => IsPasscodeValid);\r\n            }\r\n        }\r\n\r\n        public bool Simple\r\n        {\r\n            get { return PasscodeUtils.IsSimple; }\r\n        }\r\n\r\n        public bool IsPasscodeValid\r\n        {\r\n            get { return PasscodeUtils.Check(Passcode); }\r\n        }\r\n\r\n        public EnterPasscodeViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Passcode))\r\n                {\r\n                    if (PasscodeUtils.IsEnabled && PasscodeUtils.IsSimple)\r\n                    {\r\n                        Done();\r\n                    }\r\n                }\r\n            };\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (!IsPasscodeValid) return;\r\n\r\n            StateService.RemoveBackEntry = true;\r\n            NavigationService.UriFor<PasscodeViewModel>().Navigate();\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/EnterPasswordViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public abstract class PasswordViewModelBase : ViewModelBase\r\n    {\r\n        private string _password;\r\n\r\n        public string Password\r\n        {\r\n            get { return _password; }\r\n            set\r\n            {\r\n                SetField(ref _password, value, () => Password);\r\n                NotifyOfPropertyChange(() => CanDone);\r\n            }\r\n        }\r\n\r\n        public string PasswordHint { get; set; }\r\n\r\n        protected TLPassword PasswordBase;\r\n\r\n        private TLString _email;\r\n\r\n        protected PasswordViewModelBase(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            PasswordBase = StateService.Password as TLPassword;\r\n\r\n            if (PasswordBase != null)\r\n            {\r\n                PasswordHint = !TLString.IsNullOrEmpty(PasswordBase.Hint) ? PasswordBase.Hint.ToString() : string.Empty;\r\n            }\r\n        }\r\n\r\n        public bool CanDone\r\n        {\r\n            get { return !string.IsNullOrEmpty(Password); }\r\n        }\r\n\r\n        protected virtual void OnSucceded(TLPasswordSettings passwordSettings)\r\n        {\r\n            \r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            var password84 = PasswordBase as TLPassword84;\r\n            if (password84 == null) return;\r\n\r\n            var algo = password84.CurrentAlgo as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n            if (algo == null) return;\r\n\r\n            IsWorking = true;\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var passwordHash = SRP.GetX(new TLString(_password), algo);\r\n\r\n                MTProtoService.GetPasswordSettingsAsync(SRP.GetCheck(passwordHash, password84.SRPId, password84.SRPB, algo),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        PasswordViewModel.Password = _password;\r\n\r\n                        PasswordBase.CurrentPasswordHash = passwordHash;\r\n                        PasswordBase.Settings = result;\r\n\r\n                        OnSucceded(result);\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        if (error.TypeEquals(ErrorType.PASSWORD_HASH_INVALID))\r\n                        {\r\n                            MTProtoService.GetPasswordAsync(\r\n                                result1 => BeginOnUIThread(() =>\r\n                                {\r\n                                    PasswordBase = result1 as TLPassword84;\r\n                                    MessageBox.Show(AppResources.PasswordInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                                }),\r\n                                error1 => BeginOnUIThread(() =>\r\n                                {\r\n                                    MessageBox.Show(AppResources.PasswordInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                                }));\r\n                        }\r\n                        else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                        {\r\n                            MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (error.TypeEquals(ErrorType.SRP_ID_INVALID))\r\n                        {\r\n                            IsWorking = true;\r\n                            MTProtoService.GetPasswordAsync(\r\n                                result1 => BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                    PasswordBase = result1 as TLPassword84;\r\n                                    Done();\r\n                                }),\r\n                                error1 => BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                }));\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"account.checkPassword error \" + error);\r\n                        }\r\n                    }));\r\n            });\r\n        }\r\n\r\n        public void ForgotPassword()\r\n        {\r\n            if (PasswordBase == null) return;\r\n\r\n            if (PasswordBase.HasRecovery.Value)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.RequestPasswordRecoveryAsync(\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        PasswordBase.EmailUnconfirmedPattern = result.EmailPattern;\r\n\r\n                        MessageBox.Show(string.Format(AppResources.SentRecoveryCodeMessage, result.EmailPattern), AppResources.AppName, MessageBoxButton.OK);\r\n\r\n                        StateService.Password = PasswordBase;\r\n                        StateService.RemoveBackEntry = true;\r\n                        NavigationService.UriFor<PasswordRecoveryViewModel>().Navigate();\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        var messageBuilder = new StringBuilder();\r\n                        messageBuilder.AppendLine(AppResources.Error);\r\n                        messageBuilder.AppendLine();\r\n                        messageBuilder.AppendLine(\"Method: account.requestPasswordRecovery\");\r\n                        messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                        if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                        {\r\n                            Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n                        else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                        {\r\n                            Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK));\r\n                        }\r\n                        else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                        {\r\n                            if (TLRPCError.TypeEquals(error, ErrorType.PASSWORD_EMPTY))\r\n                            {\r\n                                Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                            }\r\n                            else if (TLRPCError.TypeEquals(error, ErrorType.PASSWORD_RECOVERY_NA))\r\n                            {\r\n                                Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                            }\r\n                            else\r\n                            {\r\n                                Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"account.requestPasswordRecovery error \" + error);\r\n                        }\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                MessageBox.Show(AppResources.NoRecoveryEmailMessage, AppResources.Sorry, MessageBoxButton.OK);\r\n            }\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n    }\r\n\r\n    public class EnterPasswordViewModel : PasswordViewModelBase\r\n    {\r\n        public EnterPasswordViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n        }\r\n\r\n        protected override void OnSucceded(TLPasswordSettings passwordSettings)\r\n        {\r\n            StateService.RemoveBackEntry = true;\r\n            StateService.Password = PasswordBase;\r\n            NavigationService.UriFor<PasswordViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/FeaturedStickersViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class FeaturedStickersViewModel : ItemsViewModelBase<TLStickerSetBase>//,\r\n        //Telegram.Api.Aggregator.IHandle<UpdateReadFeaturedStickersEventArgs>\r\n        //Telegram.Api.Aggregator.IHandle<DownloadableItem>,\r\n        //Telegram.Api.Aggregator.IHandle<UpdateStickerSetsOrderEventArgs>,\r\n        //Telegram.Api.Aggregator.IHandle<UpdateStickerSetsEventArgs>,\r\n        //Telegram.Api.Aggregator.IHandle<UpdateNewStickerSetEventArgs>\r\n    {\r\n        public FeaturedStickersViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Status = AppResources.Loading;\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            foreach (var item in Items)\r\n            {\r\n                item.Unread = false;\r\n            }\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            StateService.GetFeaturedStickersAsync(result => BeginOnUIThread(() =>\r\n            {\r\n                if (result != null)\r\n                {\r\n                    UpdateSets(result, result.Unread);\r\n                    Status = result.Sets.Count > 0 ? string.Empty : AppResources.Loading;\r\n                }\r\n\r\n                UpdateStickersAsync(result);\r\n            }));\r\n        }\r\n\r\n        private void UpdateStickersAsync(TLFeaturedStickers cachedStickers)\r\n        {\r\n            var hash = cachedStickers != null ? cachedStickers.HashValue : new TLInt(0);\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetFeaturedStickersAsync(true, hash,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n\r\n                    var featuredStickers = result as TLFeaturedStickers;\r\n                    if (featuredStickers != null)\r\n                    {\r\n                        Status = featuredStickers.Sets.Count > 0 ? string.Empty : AppResources.NoSetsHere;\r\n\r\n                        Items.Clear();\r\n\r\n                        cachedStickers = featuredStickers;\r\n                        StateService.SaveFeaturedStickersAsync(cachedStickers);\r\n\r\n                        UpdateSets(featuredStickers, featuredStickers.Unread);\r\n                    }\r\n\r\n                    ReadFeaturedStickersAsync(featuredStickers ?? cachedStickers);\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.getFeaturedStickers error \" + error);\r\n                }));\r\n        }\r\n\r\n        private void ReadFeaturedStickersAsync(TLFeaturedStickers featuredStickers)\r\n        {\r\n            if (featuredStickers == null) return;\r\n            if (featuredStickers.Unread.Count == 0) return;\r\n\r\n            MTProtoService.ReadFeaturedStickersAsync(\r\n                featuredStickers.Unread,\r\n                result2 => BeginOnUIThread(() =>\r\n                {\r\n                    featuredStickers.Unread = new TLVector<TLLong>();\r\n\r\n                    StateService.SaveFeaturedStickersAsync(featuredStickers);\r\n\r\n                    EventAggregator.Publish(new UpdateReadFeaturedStickersEventArgs(featuredStickers));\r\n                }),\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.readFeaturedStickers error \" + error);\r\n                });\r\n        }\r\n\r\n        private readonly Dictionary<string, TLVector<TLStickerItem>> _stickerSets = new Dictionary<string, TLVector<TLStickerItem>>();\r\n\r\n        private readonly Dictionary<long, string> _emoticons = new Dictionary<long, string>();\r\n\r\n        private IStickers _stickers;\r\n\r\n        private void UpdateSets(IStickers featuredStickers, IList<TLLong> unread)\r\n        {\r\n            _stickers = featuredStickers;\r\n\r\n            _emoticons.Clear();\r\n            _stickerSets.Clear();\r\n\r\n            var unreadDict = new Dictionary<long, long>();\r\n            foreach (var unreadId in unread)\r\n            {\r\n                unreadDict[unreadId.Value] = unreadId.Value;\r\n            }\r\n\r\n            for (var i = 0; i < featuredStickers.Documents.Count; i++)\r\n            {\r\n                var document22 = featuredStickers.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        TLVector<TLStickerItem> stickers;\r\n                        if (_stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(new TLStickerItem { Document = document22 });\r\n                        }\r\n                        else\r\n                        {\r\n                            _stickerSets[setId] = new TLVector<TLStickerItem> { new TLStickerItem { Document = document22 } };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            Items.Clear();\r\n\r\n            var firstChunkSize = 10;\r\n            var count = 0;\r\n            var delayedItems = new List<TLStickerSetBase>();\r\n            for (var i = 0; i < featuredStickers.Sets.Count; i++)\r\n            {\r\n                var set = featuredStickers.Sets[i];\r\n                if (unreadDict.ContainsKey(set.Id.Value))\r\n                {\r\n                    set.Unread = true;\r\n                }\r\n\r\n                var setName = set.Id.ToString();\r\n                TLVector<TLStickerItem> stickers;\r\n                if (_stickerSets.TryGetValue(setName, out stickers))\r\n                {\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        objects.Add(sticker);\r\n                    }\r\n\r\n                    set.Stickers = objects;\r\n                    if (set.Stickers.Count > 0)\r\n                    {\r\n                        if (count < firstChunkSize)\r\n                        {\r\n                            Items.Add(set);\r\n                            count++;\r\n                        }\r\n                        else\r\n                        {\r\n                            delayedItems.Add(set);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                foreach (var set in delayedItems)\r\n                {\r\n                    Items.Add(set);\r\n                }\r\n            });\r\n        }\r\n\r\n        public void AddRemoveStickerSet(TLStickerSet32 set)\r\n        {\r\n            if (set == null) return;\r\n\r\n            var featuredStickers = _stickers as TLFeaturedStickers;\r\n            if (featuredStickers == null) return;\r\n\r\n            var messagesStickerSet = featuredStickers.MessagesStickerSets.FirstOrDefault(x => x.Set.Id.Value == set.Id.Value);\r\n            if (messagesStickerSet == null) return;\r\n\r\n            var stickerSetExists = set.Installed;\r\n            var inputStickerSet = new TLInputStickerSetId{ Id = set.Id, AccessHash = set.AccessHash };\r\n            if (!stickerSetExists)\r\n            {\r\n                MTProtoService.InstallStickerSetAsync(inputStickerSet, TLBool.False,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        var resultArchive = result as TLStickerSetInstallResultArchive;\r\n                        if (resultArchive != null)\r\n                        {\r\n                            TelegramViewBase.ShowArchivedStickersMessageBox(resultArchive);\r\n                        }\r\n\r\n                        set.Installed = true;\r\n                        var set76 = set as TLStickerSet76;\r\n                        if (set76 != null)\r\n                        {\r\n                            set76.InstalledDate = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n                        }\r\n                        set.NotifyOfPropertyChange(() => set.Installed);\r\n\r\n                        var shellViewModel = IoC.Get<ShellViewModel>();\r\n                        shellViewModel.Handle(new TLUpdateNewStickerSet { Stickerset = messagesStickerSet });\r\n\r\n                        MTProtoService.SetMessageOnTime(2.0, AppResources.NewStickersAdded);\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                        {\r\n                            if (error.TypeEquals(ErrorType.STICKERSET_INVALID))\r\n                            {\r\n                                MessageBox.Show(AppResources.StickersNotFound, AppResources.Error, MessageBoxButton.OK);\r\n                            }\r\n                            else\r\n                            {\r\n                                Execute.ShowDebugMessage(\"messages.importChatInvite error \" + error);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.importChatInvite error \" + error);\r\n                        }\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                MTProtoService.UninstallStickerSetAsync(inputStickerSet,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        set.Installed = false;\r\n                        var set76 = set as TLStickerSet76;\r\n                        if (set76 != null)\r\n                        {\r\n                            set76.InstalledDate = null;\r\n                        }\r\n                        set.NotifyOfPropertyChange(() => set.Installed);\r\n\r\n                        var shellViewModel = IoC.Get<ShellViewModel>();\r\n                        shellViewModel.RemoveStickerSet(set, inputStickerSet);\r\n\r\n                        var eventAggregator = EventAggregator;\r\n                        eventAggregator.Publish(new UpdateRemoveStickerSetEventArgs(set));\r\n\r\n                        MTProtoService.SetMessageOnTime(2.0, AppResources.StickersRemoved);\r\n                    }),\r\n                    error =>\r\n                    Execute.BeginOnUIThread(\r\n                    () => { Execute.ShowDebugMessage(\"messages.uninstallStickerSet error \" + error); }));\r\n            }\r\n        }\r\n\r\n        public void CopyLink(TLStickerSet set)\r\n        {\r\n            if (set == null) return;\r\n\r\n            var shortName = set.ShortName.ToString();\r\n            if (string.IsNullOrEmpty(shortName)) return;\r\n\r\n            var addStickersLink = string.Format(Constants.AddStickersLinkPlaceholder, shortName);\r\n\r\n            Clipboard.SetText(addStickersLink);\r\n            MTProtoService.SetMessageOnTime(2.0, AppResources.LinkCopiedToClipboard);\r\n        }\r\n\r\n        public void Share(TLStickerSet set)\r\n        {\r\n            if (set == null) return;\r\n\r\n            var shortName = set.ShortName.ToString();\r\n            if (string.IsNullOrEmpty(shortName)) return;\r\n\r\n            var addStickersLink = string.Format(Constants.AddStickersLinkPlaceholder, shortName);\r\n\r\n            StateService.ShareLink = addStickersLink;\r\n            StateService.ShareMessage = addStickersLink;\r\n            StateService.ShareCaption = AppResources.Share;\r\n            NavigationService.UriFor<ShareViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/GroupsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing Language = TelegramClient.Utils.Language;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class GroupsViewModel : ViewModelBase, Telegram.Api.Aggregator.IHandle<TLUpdatePrivacy>\r\n    {\r\n        private string _allowUsersSubtitle = AppResources.NoUsers;\r\n\r\n        public string AllowUsersSubtitle\r\n        {\r\n            get { return _allowUsersSubtitle; }\r\n            set { SetField(ref _allowUsersSubtitle, value, () => AllowUsersSubtitle); }\r\n        }\r\n\r\n        private Visibility _allowUsersVisibility;\r\n\r\n        public Visibility AllowUsersVisibility\r\n        {\r\n            get { return _allowUsersVisibility; }\r\n            set { SetField(ref _allowUsersVisibility, value, () => AllowUsersVisibility); }\r\n        }\r\n\r\n        private string _disallowUsersSubtitle = AppResources.NoUsers;\r\n\r\n        public string DisallowUsersSubtitle\r\n        {\r\n            get { return _disallowUsersSubtitle; }\r\n            set { SetField(ref _disallowUsersSubtitle, value, () => DisallowUsersSubtitle); }\r\n        }\r\n\r\n        private Visibility _disallowUsersVisibility;\r\n\r\n        public Visibility DisallowUsersVisibility\r\n        {\r\n            get { return _disallowUsersVisibility; }\r\n            set { SetField(ref _disallowUsersVisibility, value, () => DisallowUsersVisibility); }\r\n        }\r\n\r\n        private TLPrivacyRuleBase _selectedMainRule;\r\n\r\n        public TLPrivacyRuleBase SelectedMainRule\r\n        {\r\n            get { return _selectedMainRule; }\r\n            set { SetField(ref _selectedMainRule, value, () => SelectedMainRule); }\r\n        }\r\n\r\n        public List<TLPrivacyRuleBase> MainRules { get; set; }\r\n\r\n        private TLPrivacyRules _rules;\r\n        private TLPrivacyValueAllowUsers _selectedAllowUsers;\r\n        private TLPrivacyValueDisallowUsers _selectedDisallowUsers;\r\n\r\n        public GroupsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            _rules = StateService.PrivacyRules;\r\n            StateService.PrivacyRules = null;\r\n\r\n            MainRules = new List<TLPrivacyRuleBase>\r\n            {\r\n                new TLPrivacyValueAllowAll{ Label = AppResources.Everybody },\r\n                new TLPrivacyValueAllowContacts{ Label = AppResources.MyContacts }\r\n            };\r\n\r\n            _selectedMainRule = GetSelectedMainRule(MainRules, _rules, MainRules[0], MainRules[1]);\r\n            _selectedMainRule.IsChecked = true;\r\n            _selectedAllowUsers = GetSelectedRule<TLPrivacyValueAllowUsers>(_rules) ?? new TLPrivacyValueAllowUsers { Users = new TLVector<TLInt>() };\r\n            _selectedDisallowUsers = GetSelectedRule<TLPrivacyValueDisallowUsers>(_rules) ?? new TLPrivacyValueDisallowUsers { Users = new TLVector<TLInt>() };\r\n            SwitchUsersVisibility(true);\r\n            PropertyChanged += OnPropertyChanged;\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                if (StateService.UsersRule != null)\r\n                {\r\n                    var allowUsersRule = StateService.UsersRule as TLPrivacyValueAllowUsers;\r\n                    if (allowUsersRule != null)\r\n                    {\r\n                        _selectedAllowUsers = allowUsersRule;\r\n\r\n                        CleanupUsers(_selectedAllowUsers, _selectedDisallowUsers);\r\n                    }\r\n                    var disallowUsersRule = StateService.UsersRule as TLPrivacyValueDisallowUsers;\r\n                    if (disallowUsersRule != null)\r\n                    {\r\n                        _selectedDisallowUsers = disallowUsersRule;\r\n\r\n                        CleanupUsers(_selectedDisallowUsers, _selectedAllowUsers);\r\n                    }\r\n                    StateService.UsersRule = null;\r\n                }\r\n\r\n                UpdateSubtitles();\r\n            });\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        private void CleanupUsers(IPrivacyValueUsersRule sourceList, IPrivacyValueUsersRule cleaningList)\r\n        {\r\n            var sourceDict = new Dictionary<int, int>();\r\n            foreach (var userId in sourceList.Users)\r\n            {\r\n                sourceDict[userId.Value] = userId.Value;\r\n            }\r\n\r\n            for (var i = 0; i < cleaningList.Users.Count; i++)\r\n            {\r\n                if (sourceDict.ContainsKey(cleaningList.Users[i].Value))\r\n                {\r\n                    cleaningList.Users.RemoveAt(i--);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UpdateSubtitles()\r\n        {\r\n            var allowCount = _selectedAllowUsers.Users.Count;\r\n\r\n            AllowUsersSubtitle = allowCount == 0\r\n                ? AppResources.NoUsers\r\n                : Language.Declension(\r\n                    allowCount,\r\n                    AppResources.UserNominativeSingular,\r\n                    AppResources.UserNominativePlural,\r\n                    AppResources.UserGenitiveSingular,\r\n                    AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n\r\n            var disallowCount = _selectedDisallowUsers.Users.Count;\r\n\r\n            DisallowUsersSubtitle = disallowCount == 0\r\n                ? AppResources.NoUsers\r\n                : Language.Declension(\r\n                    disallowCount,\r\n                    AppResources.UserNominativeSingular,\r\n                    AppResources.UserNominativePlural,\r\n                    AppResources.UserGenitiveSingular,\r\n                    AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n        }\r\n\r\n        private T GetSelectedRule<T>(TLPrivacyRules rules) where T : TLPrivacyRuleBase\r\n        {\r\n            T allowUsers = null;\r\n            if (_rules != null)\r\n            {\r\n                allowUsers = (T)rules.Rules.FirstOrDefault(x => x is T);\r\n            }\r\n\r\n            return allowUsers;\r\n        }\r\n\r\n        private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => SelectedMainRule))\r\n            {\r\n                SwitchUsersVisibility(false);\r\n            }\r\n        }\r\n\r\n        private void SwitchUsersVisibility(bool silent)\r\n        {\r\n            if (SelectedMainRule is TLPrivacyValueAllowAll)\r\n            {\r\n                _allowUsersVisibility = Visibility.Collapsed;\r\n                _disallowUsersVisibility = Visibility.Visible;\r\n            }\r\n\r\n            if (SelectedMainRule is TLPrivacyValueAllowContacts)\r\n            {\r\n                _allowUsersVisibility = Visibility.Visible;\r\n                _disallowUsersVisibility = Visibility.Visible;\r\n            }\r\n\r\n            if (SelectedMainRule is TLPrivacyValueDisallowAll)\r\n            {\r\n                _allowUsersVisibility = Visibility.Visible;\r\n                _disallowUsersVisibility = Visibility.Collapsed;\r\n            }\r\n\r\n            if (!silent)\r\n            {\r\n                NotifyOfPropertyChange(() => AllowUsersVisibility);\r\n                NotifyOfPropertyChange(() => DisallowUsersVisibility);\r\n            }\r\n        }\r\n\r\n        public void OpenAllowUsers()\r\n        {\r\n            var allowUsersRule = _rules != null ? _rules.Rules.FirstOrDefault(x => x is TLPrivacyValueAllowUsers) : null;\r\n\r\n            //if (allowUsersRule == null)\r\n            //{\r\n            //    NavigationService.UriFor<SelectMultipleUsersViewModel>().Navigate();\r\n            //}\r\n            //else\r\n            {\r\n                StateService.UsersRule = _selectedAllowUsers;\r\n                NavigationService.UriFor<AllowUsersViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void OpenDisallowUsers()\r\n        {\r\n            var disallowUsersRule = _rules != null ? _rules.Rules.FirstOrDefault(x => x is TLPrivacyValueDisallowUsers) : null;\r\n\r\n            //if (allowUsersRule == null)\r\n            //{\r\n            //    NavigationService.UriFor<SelectMultipleUsersViewModel>().Navigate();\r\n            //}\r\n            //else\r\n            {\r\n                StateService.UsersRule = _selectedDisallowUsers;\r\n                NavigationService.UriFor<AllowUsersViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        private TLPrivacyRuleBase GetSelectedMainRule(List<TLPrivacyRuleBase> mainRules, TLPrivacyRules rules, TLPrivacyRuleBase defaultRule, TLPrivacyRuleBase noRules)\r\n        {\r\n            if (rules == null)\r\n            {\r\n\r\n            }\r\n            else\r\n            {\r\n                foreach (var rule in rules.Rules)\r\n                {\r\n                    var mainRule = mainRules.FirstOrDefault(x => x.GetType() == rule.GetType());\r\n                    if (mainRule != null)\r\n                    {\r\n                        return mainRule;\r\n                    }\r\n                }\r\n\r\n                return noRules;\r\n            }\r\n\r\n            return defaultRule;\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (SelectedMainRule == null) return;\r\n\r\n            var rules = new TLVector<TLInputPrivacyRuleBase>();\r\n\r\n            if (_selectedDisallowUsers != null\r\n                && _selectedDisallowUsers.Users != null\r\n                && _selectedDisallowUsers.Users.Count > 0)\r\n            {\r\n                var inputDisallowUsers = (TLInputPrivacyValueDisallowUsers)_selectedDisallowUsers.ToInputRule();\r\n\r\n                foreach (var userId in _selectedDisallowUsers.Users)\r\n                {\r\n                    var user = CacheService.GetUser(userId);\r\n\r\n                    if (user != null)\r\n                    {\r\n                        inputDisallowUsers.Users.Add(user.ToInputUser());\r\n                    }\r\n                }\r\n\r\n                rules.Add(inputDisallowUsers);\r\n            }\r\n\r\n            if (_selectedAllowUsers != null\r\n                && _selectedAllowUsers.Users != null\r\n                && _selectedAllowUsers.Users.Count > 0)\r\n            {\r\n                var inputAllowUsers = (TLInputPrivacyValueAllowUsers)_selectedAllowUsers.ToInputRule();\r\n\r\n                foreach (var userId in _selectedAllowUsers.Users)\r\n                {\r\n                    var user = CacheService.GetUser(userId);\r\n\r\n                    if (user != null)\r\n                    {\r\n                        inputAllowUsers.Users.Add(user.ToInputUser());\r\n                    }\r\n                }\r\n\r\n                rules.Add(inputAllowUsers);\r\n            }\r\n\r\n            var inputMainRule = SelectedMainRule.ToInputRule();\r\n            rules.Add(inputMainRule);\r\n\r\n            IsWorking = true;\r\n            MTProtoService.SetPrivacyAsync(new TLInputPrivacyKeyChatInvite(), \r\n                rules,\r\n                result =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    //EventAggregator.Publish(new TLUpdatePrivacy{Key = new TLPrivacyKeyStatusTimestamp(), Rules = result.Rules});\r\n                    BeginOnUIThread(() => NavigationService.GoBack());\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n\r\n                    Execute.ShowDebugMessage(\"account.setPrivacy error \" + error);\r\n                });\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        public void Handle(TLUpdatePrivacy privacy)\r\n        {\r\n            if (privacy.Key is TLPrivacyKeyChatInvite)\r\n            {\r\n                _rules = new TLPrivacyRules { Rules = privacy.Rules };\r\n\r\n                SelectedMainRule = GetSelectedMainRule(MainRules, _rules, MainRules[0], MainRules[1]);\r\n                _selectedAllowUsers = GetSelectedRule<TLPrivacyValueAllowUsers>(_rules) ?? new TLPrivacyValueAllowUsers { Users = new TLVector<TLInt>() };\r\n                _selectedDisallowUsers = GetSelectedRule<TLPrivacyValueDisallowUsers>(_rules) ?? new TLPrivacyValueDisallowUsers { Users = new TLVector<TLInt>() };\r\n                SwitchUsersVisibility(false);\r\n\r\n                UpdateSubtitles();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/LastSeenViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing Language = TelegramClient.Utils.Language;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class LastSeenViewModel : ViewModelBase, Telegram.Api.Aggregator.IHandle<TLUpdatePrivacy>\r\n    {\r\n        private string _allowUsersSubtitle = AppResources.NoUsers;\r\n\r\n        public string AllowUsersSubtitle\r\n        {\r\n            get { return _allowUsersSubtitle; }\r\n            set { SetField(ref _allowUsersSubtitle, value, () => AllowUsersSubtitle); }\r\n        }\r\n\r\n        private Visibility _allowUsersVisibility;\r\n\r\n        public Visibility AllowUsersVisibility\r\n        {\r\n            get { return _allowUsersVisibility; }\r\n            set { SetField(ref _allowUsersVisibility, value, () => AllowUsersVisibility); }\r\n        }\r\n\r\n        private string _disallowUsersSubtitle = AppResources.NoUsers;\r\n\r\n        public string DisallowUsersSubtitle\r\n        {\r\n            get { return _disallowUsersSubtitle; }\r\n            set { SetField(ref _disallowUsersSubtitle, value, () => DisallowUsersSubtitle); }\r\n        }\r\n\r\n        private Visibility _disallowUsersVisibility;\r\n\r\n        public Visibility DisallowUsersVisibility\r\n        {\r\n            get { return _disallowUsersVisibility; }\r\n            set { SetField(ref _disallowUsersVisibility, value, () => DisallowUsersVisibility); }\r\n        }\r\n\r\n        private TLPrivacyRuleBase _selectedMainRule;\r\n\r\n        public TLPrivacyRuleBase SelectedMainRule\r\n        {\r\n            get { return _selectedMainRule; }\r\n            set { SetField(ref _selectedMainRule, value, () => SelectedMainRule); }\r\n        }\r\n\r\n        public List<TLPrivacyRuleBase> MainRules { get; set; }\r\n\r\n        private TLPrivacyRules _rules;\r\n        private TLPrivacyValueAllowUsers _selectedAllowUsers;\r\n        private TLPrivacyValueDisallowUsers _selectedDisallowUsers;\r\n\r\n        public LastSeenViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            _rules = StateService.PrivacyRules;\r\n            StateService.PrivacyRules = null;\r\n\r\n            MainRules = new List<TLPrivacyRuleBase>\r\n            {\r\n                new TLPrivacyValueAllowAll{ Label = AppResources.Everybody },\r\n                new TLPrivacyValueAllowContacts{ Label = AppResources.MyContacts },\r\n                new TLPrivacyValueDisallowAll{ Label = AppResources.Nobody }\r\n            };\r\n\r\n            _selectedMainRule = GetSelectedMainRule(MainRules, _rules, MainRules[0], MainRules[2]);\r\n            _selectedMainRule.IsChecked = true;\r\n            _selectedAllowUsers = GetSelectedRule<TLPrivacyValueAllowUsers>(_rules) ?? new TLPrivacyValueAllowUsers { Users = new TLVector<TLInt>() };\r\n            _selectedDisallowUsers = GetSelectedRule<TLPrivacyValueDisallowUsers>(_rules) ?? new TLPrivacyValueDisallowUsers { Users = new TLVector<TLInt>() };\r\n            SwitchUsersVisibility(true);\r\n            PropertyChanged += OnPropertyChanged;\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                if (StateService.UsersRule != null)\r\n                {\r\n                    var allowUsersRule = StateService.UsersRule as TLPrivacyValueAllowUsers;\r\n                    if (allowUsersRule != null)\r\n                    {\r\n                        _selectedAllowUsers = allowUsersRule;\r\n\r\n                        CleanupUsers(_selectedAllowUsers, _selectedDisallowUsers);\r\n                    }\r\n                    var disallowUsersRule = StateService.UsersRule as TLPrivacyValueDisallowUsers;\r\n                    if (disallowUsersRule != null)\r\n                    {\r\n                        _selectedDisallowUsers = disallowUsersRule;\r\n\r\n                        CleanupUsers(_selectedDisallowUsers, _selectedAllowUsers);\r\n                    }\r\n                    StateService.UsersRule = null;\r\n                }\r\n\r\n                UpdateSubtitles();\r\n            });\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        private void CleanupUsers(IPrivacyValueUsersRule sourceList, IPrivacyValueUsersRule cleaningList)\r\n        {\r\n            var sourceDict = new Dictionary<int, int>();\r\n            foreach (var userId in sourceList.Users)\r\n            {\r\n                sourceDict[userId.Value] = userId.Value;\r\n            }\r\n\r\n            for (var i = 0; i < cleaningList.Users.Count; i++)\r\n            {\r\n                if (sourceDict.ContainsKey(cleaningList.Users[i].Value))\r\n                {\r\n                    cleaningList.Users.RemoveAt(i--);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UpdateSubtitles()\r\n        {\r\n            var allowCount = _selectedAllowUsers.Users.Count;\r\n\r\n            AllowUsersSubtitle = allowCount == 0\r\n                ? AppResources.NoUsers\r\n                : Language.Declension(\r\n                    allowCount,\r\n                    AppResources.UserNominativeSingular,\r\n                    AppResources.UserNominativePlural,\r\n                    AppResources.UserGenitiveSingular,\r\n                    AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n\r\n            var disallowCount = _selectedDisallowUsers.Users.Count;\r\n\r\n            DisallowUsersSubtitle = disallowCount == 0\r\n                ? AppResources.NoUsers\r\n                : Language.Declension(\r\n                    disallowCount,\r\n                    AppResources.UserNominativeSingular,\r\n                    AppResources.UserNominativePlural,\r\n                    AppResources.UserGenitiveSingular,\r\n                    AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n        }\r\n\r\n        private T GetSelectedRule<T>(TLPrivacyRules rules) where T : TLPrivacyRuleBase\r\n        {\r\n            T allowUsers = null;\r\n            if (_rules != null)\r\n            {\r\n                allowUsers = (T)rules.Rules.FirstOrDefault(x => x is T);\r\n            }\r\n\r\n            return allowUsers;\r\n        }\r\n\r\n        private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => SelectedMainRule))\r\n            {\r\n                SwitchUsersVisibility(false);\r\n            }\r\n        }\r\n\r\n        private void SwitchUsersVisibility(bool silent)\r\n        {\r\n            if (SelectedMainRule is TLPrivacyValueAllowAll)\r\n            {\r\n                _allowUsersVisibility = Visibility.Collapsed;\r\n                _disallowUsersVisibility = Visibility.Visible;\r\n            }\r\n\r\n            if (SelectedMainRule is TLPrivacyValueAllowContacts)\r\n            {\r\n                _allowUsersVisibility = Visibility.Visible;\r\n                _disallowUsersVisibility = Visibility.Visible;\r\n            }\r\n\r\n            if (SelectedMainRule is TLPrivacyValueDisallowAll)\r\n            {\r\n                _allowUsersVisibility = Visibility.Visible;\r\n                _disallowUsersVisibility = Visibility.Collapsed;\r\n            }\r\n\r\n            if (!silent)\r\n            {\r\n                NotifyOfPropertyChange(() => AllowUsersVisibility);\r\n                NotifyOfPropertyChange(() => DisallowUsersVisibility);\r\n            }\r\n        }\r\n\r\n        public void OpenAllowUsers()\r\n        {\r\n            var allowUsersRule = _rules != null ? _rules.Rules.FirstOrDefault(x => x is TLPrivacyValueAllowUsers) : null;\r\n\r\n            //if (allowUsersRule == null)\r\n            //{\r\n            //    NavigationService.UriFor<SelectMultipleUsersViewModel>().Navigate();\r\n            //}\r\n            //else\r\n            {\r\n                StateService.UsersRule = _selectedAllowUsers;\r\n                NavigationService.UriFor<AllowUsersViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void OpenDisallowUsers()\r\n        {\r\n            var disallowUsersRule = _rules != null ? _rules.Rules.FirstOrDefault(x => x is TLPrivacyValueDisallowUsers) : null;\r\n\r\n            //if (allowUsersRule == null)\r\n            //{\r\n            //    NavigationService.UriFor<SelectMultipleUsersViewModel>().Navigate();\r\n            //}\r\n            //else\r\n            {\r\n                StateService.UsersRule = _selectedDisallowUsers;\r\n                NavigationService.UriFor<AllowUsersViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        private TLPrivacyRuleBase GetSelectedMainRule(List<TLPrivacyRuleBase> mainRules, TLPrivacyRules rules, TLPrivacyRuleBase defaultRule, TLPrivacyRuleBase noRules)\r\n        {\r\n            if (rules == null)\r\n            {\r\n\r\n            }\r\n            else\r\n            {\r\n                foreach (var rule in rules.Rules)\r\n                {\r\n                    var mainRule = mainRules.FirstOrDefault(x => x.GetType() == rule.GetType());\r\n                    if (mainRule != null)\r\n                    {\r\n                        return mainRule;\r\n                    }\r\n                }\r\n\r\n                return noRules;\r\n            }\r\n\r\n            return defaultRule;\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (SelectedMainRule == null) return;\r\n\r\n            var rules = new TLVector<TLInputPrivacyRuleBase>();\r\n\r\n            if (_selectedDisallowUsers != null\r\n                && _selectedDisallowUsers.Users != null\r\n                && _selectedDisallowUsers.Users.Count > 0)\r\n            {\r\n                var inputDisallowUsers = (TLInputPrivacyValueDisallowUsers)_selectedDisallowUsers.ToInputRule();\r\n\r\n                foreach (var userId in _selectedDisallowUsers.Users)\r\n                {\r\n                    var user = CacheService.GetUser(userId);\r\n\r\n                    if (user != null)\r\n                    {\r\n                        inputDisallowUsers.Users.Add(user.ToInputUser());\r\n                    }\r\n                }\r\n\r\n                rules.Add(inputDisallowUsers);\r\n            }\r\n\r\n            if (_selectedAllowUsers != null\r\n                && _selectedAllowUsers.Users != null\r\n                && _selectedAllowUsers.Users.Count > 0)\r\n            {\r\n                var inputAllowUsers = (TLInputPrivacyValueAllowUsers)_selectedAllowUsers.ToInputRule();\r\n\r\n                foreach (var userId in _selectedAllowUsers.Users)\r\n                {\r\n                    var user = CacheService.GetUser(userId);\r\n\r\n                    if (user != null)\r\n                    {\r\n                        inputAllowUsers.Users.Add(user.ToInputUser());\r\n                    }\r\n                }\r\n\r\n                rules.Add(inputAllowUsers);\r\n            }\r\n\r\n            var inputMainRule = SelectedMainRule.ToInputRule();\r\n            rules.Add(inputMainRule);\r\n\r\n            IsWorking = true;\r\n            MTProtoService.SetPrivacyAsync(new TLInputPrivacyKeyStatusTimestamp(), \r\n                rules,\r\n                result =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    //EventAggregator.Publish(new TLUpdatePrivacy{Key = new TLPrivacyKeyStatusTimestamp(), Rules = result.Rules});\r\n                    BeginOnUIThread(() => NavigationService.GoBack());\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n\r\n                    Execute.ShowDebugMessage(\"account.setPrivacy error \" + error);\r\n                });\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        public void Handle(TLUpdatePrivacy privacy)\r\n        {\r\n            if (privacy.Key is TLPrivacyKeyStatusTimestamp)\r\n            {\r\n                _rules = new TLPrivacyRules { Rules = privacy.Rules };\r\n\r\n                SelectedMainRule = GetSelectedMainRule(MainRules, _rules, MainRules[0], MainRules[2]);\r\n                _selectedAllowUsers = GetSelectedRule<TLPrivacyValueAllowUsers>(_rules) ?? new TLPrivacyValueAllowUsers { Users = new TLVector<TLInt>() };\r\n                _selectedDisallowUsers = GetSelectedRule<TLPrivacyValueDisallowUsers>(_rules) ?? new TLPrivacyValueDisallowUsers { Users = new TLVector<TLInt>() };\r\n                SwitchUsersVisibility(false);\r\n\r\n                UpdateSubtitles();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/LockscreenViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Security.Cryptography;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class LockscreenViewModel : TelegramPropertyChangedBase\r\n    {\r\n        public string EmptyDialogImageSource\r\n        {\r\n            get\r\n            {\r\n                if (StateService.CurrentBackground != null)\r\n                {\r\n                    return \"/Images/LockScreen/lockscreen.logo.png\";\r\n                }\r\n\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    return \"/Images/LockScreen/lockscreen.logo.white.png\";\r\n                }\r\n\r\n                return \"/Images/LockScreen/lockscreen.logo.png\";\r\n            }\r\n        }\r\n\r\n        public double LogoOpacity\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    return 1.0;\r\n                }\r\n\r\n                if (StateService.CurrentBackground == null)\r\n                {\r\n                    return 0.5;\r\n                }\r\n\r\n                return 1.0;\r\n            }\r\n        }\r\n\r\n        private string _passcode;\r\n\r\n        public string Passcode\r\n        {\r\n            get { return _passcode; }\r\n            set\r\n            {\r\n                if (_passcode != value)\r\n                {\r\n                    _passcode = value;\r\n                    NotifyOfPropertyChange(() => Passcode);\r\n                }\r\n            }\r\n        }\r\n\r\n        public IStateService StateService\r\n        {\r\n            get { return IoC.Get<IStateService>(); }\r\n        }\r\n\r\n        public bool Simple\r\n        {\r\n            get { return IsSimple(StateService); }\r\n        }\r\n\r\n        public static bool IsSimple(IStateService stateService)\r\n        {\r\n            return PasscodeUtils.IsSimple;\r\n        }\r\n\r\n        public LockscreenViewModel()\r\n        {\r\n            PropertyChanged += LockscreenViewModel_PropertyChanged;\r\n        }\r\n\r\n        void LockscreenViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => Passcode))\r\n            {\r\n                if (Simple && Passcode.Length == 4)\r\n                {\r\n                    Done();\r\n                }\r\n            }\r\n        }\r\n\r\n        public event EventHandler PasscodeIncorrect;\r\n\r\n        protected virtual void RaisePasscodeIncorrect()\r\n        {\r\n            var handler = PasscodeIncorrect;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n\r\n        public void Done()\r\n        {\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.1), () =>\r\n            {\r\n                if (!PasscodeUtils.Check(Passcode))\r\n                {\r\n                    Passcode = string.Empty;\r\n                    RaisePasscodeIncorrect();\r\n\r\n                    return;\r\n                }\r\n\r\n                var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                if (frame != null)\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        frame.CloseLockscreen();\r\n                        PasscodeUtils.Unlock();     // will not invoke here ShellViewModel.UpdateDeviceLockedAsync()\r\n                        var shellViewModel = IoC.Get<ShellViewModel>();\r\n                        if (shellViewModel != null)\r\n                        {\r\n                            shellViewModel.NotifyOfPropertyChange(() => shellViewModel.PasscodeImageBrush);\r\n                            shellViewModel.NotifyOfPropertyChange(() => shellViewModel.PasscodeImageSource);\r\n                            shellViewModel.UpdateDeviceLockedAsync();\r\n                        }\r\n\r\n                        Passcode = string.Empty;\r\n                    });\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    public static class PasscodeUtils\r\n    {\r\n        private static readonly object PasscodeParamsFileSyncRoot = new object();\r\n\r\n        private static TLPasscodeParams _cachedParams;\r\n\r\n        private static bool _readOnce;\r\n\r\n        public static TLPasscodeParams GetParams()\r\n        {\r\n            if (_cachedParams != null)\r\n            {\r\n                return _cachedParams;\r\n            }\r\n\r\n            if (!_readOnce)\r\n            {\r\n                _readOnce = true; \r\n                _cachedParams = TLUtils.OpenObjectFromMTProtoFile<TLPasscodeParams>(PasscodeParamsFileSyncRoot, Constants.PasscodeParamsFileName);\r\n            }\r\n\r\n            return _cachedParams;\r\n        }\r\n\r\n        public static bool IsEnabled\r\n        {\r\n            get\r\n            {\r\n                var passcodeParams = GetParams();\r\n                if (passcodeParams != null)\r\n                {\r\n                    return !TLString.IsNullOrEmpty(passcodeParams.Hash);\r\n                }\r\n\r\n                var stateService = IoC.Get<IStateService>();\r\n                return !string.IsNullOrEmpty(stateService.Passcode);\r\n            }\r\n        }\r\n\r\n        public static bool IsSimple\r\n        {\r\n            get\r\n            {\r\n                var passcodeParams = GetParams();\r\n                if (passcodeParams != null)\r\n                {\r\n                    return passcodeParams.IsSimple.Value;\r\n                }\r\n\r\n                var stateService = IoC.Get<IStateService>();\r\n                return stateService.IsSimplePasscode;\r\n            }\r\n        }\r\n\r\n        public static bool Locked\r\n        {\r\n            get\r\n            {\r\n                var passcodeParams = GetParams();\r\n                if (passcodeParams != null)\r\n                {\r\n                    return passcodeParams.Locked.Value;\r\n                }\r\n\r\n                var stateService = IoC.Get<IStateService>();\r\n                return stateService.Locked;\r\n            }\r\n        }\r\n\r\n        public static DateTime CloseTime\r\n        {\r\n            get\r\n            {\r\n                var passcodeParams = GetParams();\r\n                if (passcodeParams != null)\r\n                {\r\n                    return TLUtils.ToDateTime(passcodeParams.CloseTime);\r\n                }\r\n\r\n                var stateService = IoC.Get<IStateService>();\r\n                return stateService.CloseTime;\r\n            }\r\n            set\r\n            {\r\n                var passcodeParams = GetParams();\r\n                if (passcodeParams != null)\r\n                {\r\n                    passcodeParams.CloseTime = TLUtils.ToTLInt(value);\r\n                    Save();\r\n                }\r\n            }\r\n        }\r\n\r\n        public static int AutolockTimeout\r\n        {\r\n            get\r\n            {\r\n                var passcodeParams = GetParams();\r\n                if (passcodeParams != null)\r\n                {\r\n                    return passcodeParams.AutolockTimeout.Value;\r\n                }\r\n\r\n                var stateService = IoC.Get<IStateService>();\r\n                return stateService.AutolockTimeout;\r\n            }\r\n            set\r\n            {\r\n                var passcodeParams = GetParams();\r\n                if (passcodeParams != null)\r\n                {\r\n                    passcodeParams.AutolockTimeout = new TLInt(value);\r\n                    Save();\r\n                }\r\n            }\r\n        }\r\n\r\n        public static bool IsLockscreenRequired\r\n        {\r\n            get\r\n            {\r\n                return IsEnabled\r\n                    && (DateTime.Now > CloseTime.AddSeconds(AutolockTimeout) || Locked);\r\n            }\r\n        }\r\n\r\n        public static void Lock()\r\n        {\r\n            var passcodeParams = GetParams();\r\n            if (passcodeParams != null)\r\n            {\r\n                passcodeParams.Locked = TLBool.True;\r\n                Save();\r\n            }\r\n        }\r\n\r\n        public static void Unlock()\r\n        {\r\n            var passcodeParams = GetParams();\r\n            if (passcodeParams != null)\r\n            {\r\n                passcodeParams.Locked = TLBool.False;\r\n                Save();\r\n            }\r\n        }\r\n\r\n        public static void ChangeLocked()\r\n        {\r\n            var passcodeParams = GetParams();\r\n            if (passcodeParams != null)\r\n            {\r\n                if (passcodeParams.Locked.Value)\r\n                {\r\n                    Unlock();\r\n                }\r\n                else\r\n                {\r\n                    Lock();\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void Save()\r\n        {\r\n            if (_cachedParams != null)\r\n            {\r\n                TLUtils.SaveObjectToMTProtoFile(PasscodeParamsFileSyncRoot, Constants.PasscodeParamsFileName, _cachedParams);\r\n            }\r\n        }\r\n\r\n        public static void SetParams(string passcode, bool isSimple, int autolockTimeout)\r\n        {\r\n            var salt = new byte[256];\r\n            var secureRandom = new RNGCryptoServiceProvider();\r\n            secureRandom.GetBytes(salt);\r\n            var hash = Telegram.Api.Helpers.Utils.ComputeSHA1(TLUtils.Combine(salt, new TLString(passcode).Data, salt));\r\n            var passcodeParams = new TLPasscodeParams\r\n            {\r\n                Hash = TLString.FromBigEndianData(hash),\r\n                Salt = TLString.FromBigEndianData(salt),\r\n                IsSimple = new TLBool(isSimple),\r\n                AutolockTimeout = new TLInt(autolockTimeout),\r\n                CloseTime = new TLInt(0),\r\n                Locked = TLBool.False\r\n            };\r\n\r\n            _cachedParams = passcodeParams;\r\n            Save();\r\n        }\r\n\r\n        public static bool CheckSimple(string passcode)\r\n        {\r\n            return passcode != null && passcode.Length == 4 && passcode.All(x => x >= '0' && x <= '9');\r\n        }\r\n\r\n        [MethodImpl(MethodImplOptions.NoOptimization)]\r\n        public static byte[] ComputeHash(TLString salt, TLString passcode)\r\n        {\r\n            var bytes = TLUtils.Combine(salt.Data, passcode.Data, salt.Data);\r\n\r\n            for (var i = 0; i < Constants.PasscodeHashIterations; i++)\r\n            {\r\n                var tempBytes = TLUtils.Combine(BitConverter.GetBytes(i), bytes);\r\n                Telegram.Api.Helpers.Utils.ComputeSHA1(tempBytes);\r\n            }\r\n\r\n            return Telegram.Api.Helpers.Utils.ComputeSHA1(bytes);\r\n        }\r\n\r\n        public static bool Check(string passcode)\r\n        {\r\n            var passcodeParams = GetParams();\r\n            if (passcodeParams == null)\r\n            {\r\n                var stateService = IoC.Get<IStateService>();\r\n                var result = String.Equals(stateService.Passcode, passcode);\r\n\r\n                if (result)\r\n                {\r\n                    SetParams(stateService.Passcode, stateService.IsSimplePasscode, stateService.AutolockTimeout);\r\n                    RemovePasscodeKeys();\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            var computedHash = ComputeHash(passcodeParams.Salt, new TLString(passcode));\r\n\r\n            return TLUtils.ByteArraysEqual(computedHash, passcodeParams.Hash.Data);\r\n        }\r\n\r\n        public static void Reset()\r\n        {\r\n            FileUtils.Delete(PasscodeParamsFileSyncRoot, Constants.PasscodeParamsFileName);\r\n            _cachedParams = null;\r\n\r\n            RemovePasscodeKeys();\r\n        }\r\n\r\n        private static void RemovePasscodeKeys()\r\n        {\r\n            SettingsHelper.CrossThreadAccess(\r\n                settings =>\r\n                {\r\n                    settings.Remove(Constants.PasscodeKey);\r\n                    settings.Remove(Constants.IsSimplePasscodeKey);\r\n                    settings.Remove(Constants.IsPasscodeEnabledKey);\r\n                    settings.Remove(Constants.AppCloseTimeKey);\r\n                    settings.Remove(Constants.PasscodeAutolockKey);\r\n                });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/MasksViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class MasksViewModel : ItemsViewModelBase<TLStickerSetBase>, \r\n        Telegram.Api.Aggregator.IHandle<DownloadableItem>, \r\n        Telegram.Api.Aggregator.IHandle<UpdateStickerSetsOrderEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UpdateStickerSetsEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UpdateNewStickerSetEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UpdateRemoveStickerSetEventArgs>\r\n    {\r\n        public MasksViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Status = AppResources.Loading;\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            StateService.GetMasksAsync(cachedMasks => BeginOnUIThread(() =>\r\n            {\r\n                _masks = cachedMasks;\r\n\r\n                var masks43 = _masks as TLAllStickers43;\r\n                if (masks43 != null)\r\n                {\r\n                    UpdateSets(masks43, () => UpdateMasksAsync(masks43));\r\n                    Status = string.Empty;\r\n                }\r\n                else\r\n                {\r\n                    UpdateMasksAsync(null);\r\n                }\r\n            }));\r\n        }\r\n\r\n        public void ReorderStickerSets()\r\n        {\r\n            if (_masks == null) return;\r\n\r\n            var oldHash = TLUtils.ToTLInt(_masks.Hash);\r\n            var newHash = TLUtils.GetAllStickersHash(Items);\r\n\r\n            if (oldHash.Value != newHash)\r\n            {\r\n                var order = new TLVector<TLLong>();\r\n                foreach (var item in Items)\r\n                {\r\n                    order.Add(item.Id);\r\n                }\r\n\r\n                Execute.ShowDebugMessage(\"ReorderStickers\");\r\n                IsWorking = true;\r\n                MTProtoService.ReorderStickerSetsAsync(true, order,\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        var masks = _masks as TLAllStickers32;\r\n                        if (masks != null)\r\n                        {\r\n                            masks.Hash = new TLString(newHash.ToString(CultureInfo.InvariantCulture));\r\n                            masks.Sets = new TLVector<TLStickerSetBase>(Items);\r\n                            var sets = new Dictionary<long, TLVector<TLDocumentBase>>();\r\n                            for (var i = 0; i < masks.Documents.Count; i++)\r\n                            {\r\n                                var document22 = masks.Documents[i] as TLDocument22;\r\n                                if (document22 != null)\r\n                                {\r\n                                    var stickerSetId = document22.StickerSet as TLInputStickerSetId;\r\n                                    if (stickerSetId != null)\r\n                                    {\r\n                                        TLVector<TLDocumentBase> stickers;\r\n                                        if (sets.TryGetValue(stickerSetId.Id.Value, out stickers))\r\n                                        {\r\n                                            stickers.Add(document22);\r\n                                        }\r\n                                        else\r\n                                        {\r\n                                            sets[stickerSetId.Id.Value] = new TLVector<TLDocumentBase>{ document22 };\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                            var documents = new TLVector<TLDocumentBase>();\r\n                            for (var i = 0; i < masks.Sets.Count; i++)\r\n                            {\r\n                                TLVector<TLDocumentBase> stickers;\r\n                                if (sets.TryGetValue(masks.Sets[i].Id.Value, out stickers))\r\n                                {\r\n                                    foreach (var sticker in stickers)\r\n                                    {\r\n                                        documents.Add(sticker);\r\n                                    }\r\n                                }\r\n                            }\r\n                            masks.Documents = documents;\r\n\r\n                            //EmojiControl emojiControl;\r\n                            //if (EmojiControl.TryGetInstance(out emojiControl))\r\n                            //{\r\n                            //    emojiControl.ReorderStickerSets();\r\n                            //}\r\n\r\n                            StateService.SaveMasksAsync(masks);\r\n                        }\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"messages.reorderStickerSets error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            BrowserNavigationService.MentionNavigated += OnMentionNavigated;\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            BrowserNavigationService.MentionNavigated -= OnMentionNavigated;\r\n\r\n            ReorderStickerSets();\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        private void OnMentionNavigated(object sender, TelegramMentionEventArgs e)\r\n        {\r\n            if (!string.IsNullOrEmpty(e.Mention))\r\n            {\r\n                var usernameStartIndex = e.Mention.LastIndexOf(\"@\", StringComparison.OrdinalIgnoreCase);\r\n                if (usernameStartIndex != -1)\r\n                {\r\n                    var username = e.Mention.Substring(usernameStartIndex).TrimStart('@');\r\n\r\n                    if (!string.IsNullOrEmpty(username))\r\n                    {\r\n                        TelegramViewBase.NavigateToUsername(MTProtoService, username, string.Empty, string.Empty, string.Empty);\r\n                    }\r\n                }\r\n            }\r\n            else if (e.UserId >= 0)\r\n            {\r\n                var user = CacheService.GetUser(new TLInt(e.UserId));\r\n                if (user != null)\r\n                {\r\n                    TelegramViewBase.NavigateToUser(user, null, PageKind.Profile);\r\n                }\r\n            }\r\n            else if (e.ChatId >= 0)\r\n            {\r\n                var chat = CacheService.GetChat(new TLInt(e.ChatId));\r\n                if (chat != null)\r\n                {\r\n                    TelegramViewBase.NavigateToChat(chat, string.Empty);\r\n                }\r\n            }\r\n            else if (e.ChannelId >= 0)\r\n            {\r\n                var channel = CacheService.GetChat(new TLInt(e.ChatId)) as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    TelegramViewBase.NavigateToChat(channel, string.Empty);\r\n                }\r\n            }\r\n        }\r\n\r\n        private readonly Dictionary<string, TLVector<TLStickerItem>> _stickerSets = new Dictionary<string, TLVector<TLStickerItem>>();\r\n\r\n        private readonly Dictionary<long, string> _emoticons = new Dictionary<long, string>();\r\n\r\n        private TLAllStickers _masks;\r\n\r\n        private void UpdateMasksAsync(TLAllStickers cachedMasks)\r\n        {\r\n            var hash = cachedMasks != null ? cachedMasks.Hash : TLString.Empty;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetMaskStickersAsync(hash,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(result.ToString());\r\n\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n\r\n                    var masks = result as TLAllStickers43;\r\n                    if (masks != null)\r\n                    {\r\n                        Items.Clear();\r\n\r\n                        var cachedMasks29 = cachedMasks as TLAllStickers29;\r\n                        if (cachedMasks29 != null)\r\n                        {\r\n                            masks.ShowStickersTab = cachedMasks29.ShowStickersTab;\r\n                            masks.RecentlyUsed = cachedMasks29.RecentlyUsed;\r\n                            masks.Date = TLUtils.DateToUniversalTimeTLInt(0, DateTime.Now);\r\n                        }\r\n                        var cachedMasks43 = cachedMasks as TLAllStickers43;\r\n                        if (cachedMasks43 != null)\r\n                        {\r\n                            masks.RecentStickers = cachedMasks43.RecentStickers;\r\n                        }\r\n\r\n                        cachedMasks = masks;\r\n                        StateService.SaveMasksAsync(cachedMasks);\r\n\r\n                        UpdateSets(masks, () => { });\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.getMaskStickers error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void Remove(TLStickerSet set)\r\n        {\r\n            if (set == null) return;\r\n            var inputSet = new TLInputStickerSetId { Id = set.Id, AccessHash = set.AccessHash };\r\n\r\n            IsWorking = true;\r\n            MTProtoService.UninstallStickerSetAsync(inputSet,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Items.Remove(set);\r\n\r\n                    var shellViewModel = IoC.Get<ShellViewModel>();\r\n                    shellViewModel.RemoveMaskSet(set, inputSet);\r\n\r\n                    MTProtoService.SetMessageOnTime(2.0, AppResources.StickersRemoved);\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.uninstallStickerSet error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void Archive(TLStickerSet set)\r\n        {\r\n            var set32 = set as TLStickerSet32;\r\n            if (set32 == null) return;\r\n\r\n            var inputStickerSet = new TLInputStickerSetId { Id = set32.Id, AccessHash = set32.AccessHash };\r\n            IsWorking = true;\r\n            MTProtoService.InstallStickerSetAsync(inputStickerSet, TLBool.True,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    set32.Archived = true;\r\n                    Items.Remove(set32);\r\n\r\n                    var masks43 = StateService.GetMasks() as TLAllStickers43;\r\n                    TLMessagesStickerSet messagesSet = null;\r\n                    if (masks43 != null)\r\n                    {\r\n                        messagesSet = TLUtils.RemoveStickerSet(masks43, set32);\r\n                        StateService.SaveMasksAsync(masks43);\r\n                    }\r\n\r\n                    if (messagesSet != null)\r\n                    {\r\n                        var archivedStickers = StateService.GetArchivedStickers();\r\n                        if (archivedStickers != null)\r\n                        {\r\n                            TLUtils.AddStickerSetCovered(archivedStickers, messagesSet, archivedStickers.SetsCovered, new TLStickerSetCovered{ Cover = messagesSet.Documents.FirstOrDefault() ?? new TLDocumentEmpty { Id = new TLLong(0) }, StickerSet = messagesSet.Set });\r\n                            archivedStickers.Count.Value = archivedStickers.Sets.Count;\r\n\r\n                            StateService.SaveArchivedStickersAsync(archivedStickers);\r\n                        }\r\n                    }\r\n\r\n                    //EventAggregator.Publish(new UpdateStickerSetsEventArgs(allStickers43));\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.installStickerSet error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void CopyLink(TLStickerSet set)\r\n        {\r\n            if (set == null) return;\r\n\r\n            var shortName = set.ShortName.ToString();\r\n            if (string.IsNullOrEmpty(shortName)) return;\r\n\r\n            var addStickersLink = string.Format(Constants.AddStickersLinkPlaceholder, shortName);\r\n\r\n            Clipboard.SetText(addStickersLink);\r\n            MTProtoService.SetMessageOnTime(2.0, AppResources.LinkCopiedToClipboard);\r\n        }\r\n\r\n        public void Share(TLStickerSet set)\r\n        {\r\n            if (set == null) return;\r\n\r\n            var shortName = set.ShortName.ToString();\r\n            if (string.IsNullOrEmpty(shortName)) return;\r\n\r\n            var addStickersLink = string.Format(Constants.AddStickersLinkPlaceholder, shortName);\r\n\r\n            StateService.ShareLink = addStickersLink;\r\n            StateService.ShareMessage = addStickersLink;\r\n            StateService.ShareCaption = AppResources.Share;\r\n            NavigationService.UriFor<ShareViewModel>().Navigate();\r\n        }\r\n\r\n        private void UpdateSets(TLAllStickers29 masks, System.Action callback)\r\n        {\r\n            _masks = masks;\r\n\r\n            _emoticons.Clear();\r\n            _stickerSets.Clear();\r\n\r\n            for (var i = 0; i < masks.Documents.Count; i++)\r\n            {\r\n                var document22 = masks.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        TLVector<TLStickerItem> stickers;\r\n                        if (_stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(new TLStickerItem { Document = document22 });\r\n                        }\r\n                        else\r\n                        {\r\n                            _stickerSets[setId] = new TLVector<TLStickerItem> { new TLStickerItem { Document = document22 } };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            Items.Clear();\r\n\r\n            var firstChunkSize = 10;\r\n            var count = 0;\r\n            var delayedItems = new List<TLStickerSetBase>();\r\n            for (var i = 0; i < masks.Sets.Count; i++)\r\n            {\r\n                var set = masks.Sets[i];\r\n                var setName = set.Id.ToString();\r\n                TLVector<TLStickerItem> stickers;\r\n                if (_stickerSets.TryGetValue(setName, out stickers))\r\n                {\r\n\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        objects.Add(sticker);\r\n                    }\r\n\r\n                    set.Stickers = objects;\r\n                    if (set.Stickers.Count > 0)\r\n                    {\r\n                        if (count < firstChunkSize)\r\n                        {\r\n                            Items.Add(set);\r\n                            count++;\r\n                        }\r\n                        else\r\n                        {\r\n                            delayedItems.Add(set);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            AddItemsChunk(25, delayedItems, callback);\r\n        }\r\n\r\n        private void AddItemsChunk(int chunkSize, List<TLStickerSetBase> delayedItems, System.Action callback)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < delayedItems.Count && i < chunkSize; i++)\r\n                {\r\n                    Items.Add(delayedItems[0]);\r\n                    delayedItems.RemoveAt(0);\r\n                }\r\n\r\n                if (delayedItems.Count > 0)\r\n                {\r\n                    AddItemsChunk(25, delayedItems, callback);\r\n                }\r\n                else\r\n                {\r\n                    callback.SafeInvoke();\r\n                }\r\n            });\r\n        }\r\n\r\n        public void ClearRecentStickers()\r\n        {\r\n            IsWorking = true;\r\n            MTProtoService.ClearRecentStickersAsync(\r\n                false,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    MTProtoService.SetMessageOnTime(2.0, AppResources.Done);\r\n\r\n                    var masks = StateService.GetMasks();\r\n                    if (masks != null)\r\n                    {\r\n                        var masks29 = masks as TLAllStickers29;\r\n                        if (masks29 != null)\r\n                        {\r\n                            masks29.RecentlyUsed = new TLVector<TLRecentlyUsedSticker>();\r\n                            //EmojiControl emojiControl;\r\n                            //if (EmojiControl.TryGetInstance(out emojiControl))\r\n                            //{\r\n                            //    emojiControl.ClearRecentStickers();\r\n                            //}\r\n                            StateService.SaveMasksAsync(masks29);\r\n                        }\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.clearRecentStickers error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var sticker = item.Owner as TLStickerItem;\r\n            if (sticker != null)\r\n            {\r\n                sticker.NotifyOfPropertyChange(() => sticker.Self);\r\n            }\r\n        }\r\n\r\n        public void Handle(UpdateStickerSetsOrderEventArgs args)\r\n        {\r\n            if (!args.Masks) return;\r\n\r\n            // ui thread\r\n            UpdateSets(args.AllStickers, () => { });\r\n        }\r\n\r\n        public void Handle(UpdateStickerSetsEventArgs args)\r\n        {\r\n            if (!args.Masks) return;\r\n\r\n            // ui thread\r\n            UpdateSets(args.AllStickers, () => { });\r\n        }\r\n\r\n        public void Handle(UpdateNewStickerSetEventArgs args)\r\n        {\r\n            if (!args.Masks) return;\r\n\r\n            // ui thread\r\n            UpdateSets(args.AllStickers, () => { });\r\n        }\r\n\r\n        public void Handle(UpdateRemoveStickerSetEventArgs args)\r\n        {\r\n            // ui thread\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (Items[i].Id.Value == args.StickerSet.Id.Value)\r\n                {\r\n                    Items.RemoveAt(i);\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/MassDeleteReportSpamViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class MassDeleteReportSpamViewModel : TelegramPropertyChangedBase\r\n    {\r\n        private bool _deleteMessages;\r\n\r\n        public bool DeleteMessages\r\n        {\r\n            get { return _deleteMessages; }\r\n            set\r\n            {\r\n                if (_deleteMessages != value)\r\n                {\r\n                    _deleteMessages = value;\r\n                    NotifyOfPropertyChange(() => DeleteMessages);\r\n                }\r\n            }\r\n        }\r\n        \r\n        private bool _banUser;\r\n\r\n        public bool BanUser\r\n        {\r\n            get { return _banUser; }\r\n            set\r\n            {\r\n                if (_banUser != value)\r\n                {\r\n                    _banUser = value;\r\n                    NotifyOfPropertyChange(() => BanUser);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _reportSpam;\r\n\r\n        public bool ReportSpam\r\n        {\r\n            get { return _reportSpam; }\r\n            set\r\n            {\r\n                if (_reportSpam != value)\r\n                {\r\n                    _reportSpam = value;\r\n                    NotifyOfPropertyChange(() => ReportSpam);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _deleteAllMessages;\r\n\r\n        public bool DeleteAllMessages\r\n        {\r\n            get { return _deleteAllMessages; }\r\n            set\r\n            {\r\n                if (_deleteAllMessages != value)\r\n                {\r\n                    _deleteAllMessages = value;\r\n                    NotifyOfPropertyChange(() => DeleteAllMessages);\r\n                }\r\n            }\r\n        }\r\n\r\n        public string DeleteAllFromString\r\n        {\r\n            get\r\n            {\r\n                var user = _with as TLUserBase;\r\n                if (user != null)\r\n                {\r\n                    return string.Format(AppResources.DeleteAllFrom.ToLowerInvariant(), user.FullName);\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen\r\n        {\r\n            get { return _isOpen; }\r\n            set\r\n            {\r\n                if (_isOpen != value)\r\n                {\r\n                    _isOpen = value;\r\n                    NotifyOfPropertyChange(() => IsOpen);\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool CanDone\r\n        {\r\n            get { return DeleteMessages || ReportSpam || BanUser || DeleteAllMessages; }\r\n        }\r\n\r\n        private readonly TLObject _with;\r\n\r\n        public MassDeleteReportSpamViewModel(TLObject with)\r\n        {\r\n            _with = with;\r\n\r\n            PropertyChanged += (sender, e) =>\r\n            {\r\n                if (Property.NameEquals(e.PropertyName, () => DeleteMessages)\r\n                    || Property.NameEquals(e.PropertyName, () => ReportSpam)\r\n                    || Property.NameEquals(e.PropertyName, () => BanUser)\r\n                    || Property.NameEquals(e.PropertyName, () => DeleteAllMessages))\r\n                {\r\n                    NotifyOfPropertyChange(() => CanDone);\r\n                }\r\n            };\r\n        }\r\n\r\n        public void Open()\r\n        {\r\n            IsOpen = true;\r\n            DeleteMessages = true;\r\n            BanUser = false;\r\n            ReportSpam = false;\r\n            DeleteAllMessages = false;\r\n        }\r\n\r\n        public void Close()\r\n        {\r\n            IsOpen = false;\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            Close();\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (!CanDone) return;\r\n            \r\n            Close();\r\n\r\n            RaiseCompleted();\r\n        }\r\n\r\n        public event EventHandler Completed;\r\n\r\n        protected virtual void RaiseCompleted()\r\n        {\r\n            var handler = Completed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/NotificationsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Devices;\r\nusing Microsoft.Xna.Framework;\r\nusing Microsoft.Xna.Framework.Audio;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class NotificationsViewModel : ViewModelBase\r\n    {\r\n        private Settings _settings;\r\n\r\n        public Settings Settings\r\n        {\r\n            get { return _settings; }\r\n            set { SetField(ref _settings, value, () => Settings); }\r\n        }\r\n\r\n        private volatile bool _suppressUpdating;\r\n\r\n        public NotificationsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            var settings = StateService.Settings;\r\n            StateService.Settings = null;\r\n\r\n            var sound = StateService.Sounds.FirstOrDefault(x => string.Equals(x, settings.ContactSound, StringComparison.OrdinalIgnoreCase));\r\n            settings.ContactSound = sound ?? StateService.Sounds[0];\r\n\r\n            sound = StateService.Sounds.FirstOrDefault(x => string.Equals(x, settings.GroupSound, StringComparison.OrdinalIgnoreCase));\r\n            settings.GroupSound = sound ?? StateService.Sounds[0];\r\n\r\n            _settings = settings;\r\n\r\n            settings.PropertyChanged += OnSettingsChanged;\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                MTProtoService.GetNotifySettingsAsync(new TLInputNotifyUsers(),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        _suppressUpdating = true;\r\n\r\n                        var notifySettings = result as TLPeerNotifySettings;\r\n                        if (notifySettings != null)\r\n                        {\r\n                            Settings.ContactAlert = notifySettings.MuteUntil == null || notifySettings.MuteUntil.Value == 0;\r\n                            Settings.ContactMessagePreview = notifySettings.ShowPreviews != null && notifySettings.ShowPreviews.Value;\r\n\r\n                            sound = notifySettings.Sound == null ? null : StateService.Sounds.FirstOrDefault(x => string.Equals(x, notifySettings.Sound.Value, StringComparison.OrdinalIgnoreCase));\r\n                            Settings.ContactSound = sound ?? StateService.Sounds[0];\r\n                        }\r\n\r\n                        _suppressUpdating = false;\r\n\r\n                        SaveSettings();\r\n                    }));\r\n\r\n                MTProtoService.GetNotifySettingsAsync(new TLInputNotifyChats(),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        _suppressUpdating = true;\r\n\r\n                        var notifySettings = result as TLPeerNotifySettings;\r\n                        if (notifySettings != null)\r\n                        {\r\n                            Settings.GroupAlert = notifySettings.MuteUntil == null || notifySettings.MuteUntil.Value == 0;\r\n                            Settings.GroupMessagePreview = notifySettings.ShowPreviews != null && notifySettings.ShowPreviews.Value;\r\n\r\n                            sound = notifySettings.Sound == null ? null : StateService.Sounds.FirstOrDefault(x => string.Equals(x, notifySettings.Sound.Value, StringComparison.OrdinalIgnoreCase));\r\n                            Settings.GroupSound = sound ?? StateService.Sounds[0];\r\n                        }\r\n\r\n                        _suppressUpdating = false;\r\n\r\n                        SaveSettings();\r\n                    }));\r\n\r\n                SaveSettings();\r\n            });\r\n        }\r\n\r\n#if DEBUG\r\n        //~NotificationsViewModel()\r\n        //{\r\n\r\n        //}\r\n#endif\r\n        private void OnSettingsChanged(object sender, PropertyChangedEventArgs args)\r\n        {\r\n            if (_suppressUpdating) return;\r\n\r\n            SaveSettings();\r\n\r\n            if (Property.NameEquals(args.PropertyName, () => Settings.InAppVibration)\r\n                && Settings.InAppVibration)\r\n            {\r\n                VibrateController.Default.Start(TimeSpan.FromMilliseconds(300));\r\n            }\r\n\r\n            if (Property.NameEquals(args.PropertyName, () => Settings.ContactAlert)\r\n                || Property.NameEquals(args.PropertyName, () => Settings.ContactMessagePreview)\r\n                || Property.NameEquals(args.PropertyName, () => Settings.ContactSound))\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Settings.ContactSound)\r\n                    && !string.IsNullOrEmpty(Settings.ContactSound))\r\n                {\r\n                    PlaySound(Settings.ContactSound);\r\n                }\r\n                IsWorking = true;\r\n                MTProtoService.UpdateNotifySettingsAsync(new TLInputNotifyUsers(),\r\n                    new TLInputPeerNotifySettings78\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        MuteUntil = Settings.ContactAlert ? new TLInt(0) : new TLInt(int.MaxValue),\r\n                        ShowPreviews = new TLBool(Settings.ContactMessagePreview),\r\n                        Sound = new TLString(Settings.ContactSound)\r\n                    },\r\n                    r =>\r\n                    {\r\n                        IsWorking = false;\r\n                    },\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n                    });\r\n\r\n                return;\r\n            }\r\n\r\n            if (Property.NameEquals(args.PropertyName, () => Settings.GroupAlert)\r\n                || Property.NameEquals(args.PropertyName, () => Settings.GroupMessagePreview)\r\n                || Property.NameEquals(args.PropertyName, () => Settings.GroupSound))\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Settings.GroupSound)\r\n                    && !string.IsNullOrEmpty(Settings.GroupSound))\r\n                {\r\n                    PlaySound(Settings.GroupSound);\r\n                }\r\n                IsWorking = true;\r\n                MTProtoService.UpdateNotifySettingsAsync(new TLInputNotifyChats(),\r\n                    new TLInputPeerNotifySettings78\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        MuteUntil = Settings.GroupAlert ? new TLInt(0) : new TLInt(int.MaxValue),\r\n                        ShowPreviews = new TLBool(Settings.GroupMessagePreview),\r\n                        Sound = new TLString(Settings.GroupSound)\r\n                    },\r\n                    result =>\r\n                    {\r\n                        IsWorking = false;\r\n                    },\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n                    });\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        public static void PlaySound(string sound)\r\n        {\r\n            var s = \"Sounds/\" + sound + \".wav\";\r\n\r\n            if (Telegram.Api.Helpers.Utils.XapContentFileExists(s))\r\n            {\r\n                var stream = TitleContainer.OpenStream(s);\r\n                var effect = SoundEffect.FromStream(stream);\r\n\r\n                FrameworkDispatcher.Update();\r\n                effect.Play();\r\n            }\r\n        }\r\n\r\n        private void SaveSettings()\r\n        {\r\n            StateService.SaveNotifySettingsAsync(_settings);\r\n        }\r\n\r\n        public void Reset()\r\n        {\r\n            var r = MessageBox.Show(AppResources.ResetAllNotificationsMessage, AppResources.Confirm,\r\n                MessageBoxButton.OKCancel);\r\n\r\n            if (r != MessageBoxResult.OK) return;\r\n\r\n            _suppressUpdating = true;\r\n\r\n            Settings.ContactAlert = true;\r\n            Settings.ContactMessagePreview = true;\r\n            Settings.ContactSound = StateService.Sounds[0];\r\n\r\n            Settings.GroupAlert = true;\r\n            Settings.GroupMessagePreview = true;\r\n            Settings.GroupSound = StateService.Sounds[0];\r\n\r\n            Settings.InAppSound = true;\r\n            Settings.InAppMessagePreview = true;\r\n            Settings.InAppVibration = true;\r\n\r\n            _suppressUpdating = false;\r\n            SaveSettings();\r\n\r\n            IsWorking = true;\r\n            MTProtoService.ResetNotifySettingsAsync(\r\n                result =>\r\n                {\r\n                    IsWorking = false;\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                });\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            base.OnDeactivate(close);\r\n\r\n            SaveSettings();\r\n        }\r\n\r\n        public void OnBackKeyPress()\r\n        {\r\n            if (Notifications.IsDisabled)\r\n            {\r\n                var result = MessageBox.Show(\r\n                    AppResources.ConfirmPushMessage,\r\n                    AppResources.ConfirmPushTitle,\r\n                    MessageBoxButton.OKCancel);\r\n\r\n                if (result != MessageBoxResult.OK)\r\n                {\r\n                    Notifications.Disable();\r\n                }\r\n                else\r\n                {\r\n                    Notifications.Enable();\r\n                }\r\n            }\r\n\r\n            Settings.PropertyChanged -= OnSettingsChanged;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/PasscodeViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class PasscodeViewModel : ViewModelBase\r\n    {\r\n        private TimerSpan _selectedAutolockSpan;\r\n\r\n        public TimerSpan SelectedAutolockSpan\r\n        {\r\n            get { return _selectedAutolockSpan; }\r\n            set\r\n            {\r\n                if (value != null)\r\n                {\r\n                    PasscodeUtils.AutolockTimeout = value.Seconds;\r\n                }\r\n                SetField(ref _selectedAutolockSpan, value, () => SelectedAutolockSpan);\r\n            }\r\n        }\r\n\r\n        public IList<TimerSpan> AutolockSpans { get; protected set; } \r\n\r\n        private bool _passcodeEnabled;\r\n\r\n        public bool PasscodeEnabled\r\n        {\r\n            get { return _passcodeEnabled; }\r\n            set { SetField(ref _passcodeEnabled, value, () => PasscodeEnabled); }\r\n        }\r\n\r\n        private const int AutolockSpanDefaultIndex = 3;\r\n\r\n        public PasscodeViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            AutolockSpans = new List<TimerSpan>\r\n            {\r\n                new TimerSpan(AppResources.AutolockDisabled, string.Empty, int.MaxValue, AppResources.Disabled),\r\n                new TimerSpan(AppResources.MinuteNominativeSingular,  \"1\", (int)TimeSpan.FromMinutes(1.0).TotalSeconds, string.Format(AppResources.PasscodeAutolockIn, string.Format(\"{0} {1}\", \"1\", AppResources.MinuteNominativeSingular).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.MinuteGenitivePlural, \"5\", (int)TimeSpan.FromMinutes(5.0).TotalSeconds, string.Format(AppResources.PasscodeAutolockIn, string.Format(\"{0} {1}\", \"5\", AppResources.MinuteGenitivePlural).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.HourNominativeSingular,  \"1\", (int)TimeSpan.FromHours(1.0).TotalSeconds, string.Format(AppResources.PasscodeAutolockIn, string.Format(\"{0} {1}\", \"1\", AppResources.HourNominativeSingular).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.HourGenitivePlural, \"5\", (int)TimeSpan.FromHours(5.0).TotalSeconds, string.Format(AppResources.PasscodeAutolockIn, string.Format(\"{0} {1}\", \"5\", AppResources.HourGenitivePlural).ToLowerInvariant())),               \r\n            };\r\n            _selectedAutolockSpan = AutolockSpans.FirstOrDefault(x => x.Seconds == PasscodeUtils.AutolockTimeout) ?? AutolockSpans[AutolockSpanDefaultIndex];\r\n\r\n            _passcodeEnabled = PasscodeUtils.IsEnabled;\r\n\r\n            PropertyChanged += (o, e) =>\r\n            {\r\n                if (Property.NameEquals(e.PropertyName, () => PasscodeEnabled))\r\n                {\r\n                    if (PasscodeEnabled)\r\n                    {\r\n                        ChangePasscode();\r\n\r\n                        if (!PasscodeUtils.IsEnabled)\r\n                        {\r\n                            PasscodeUtils.Reset();\r\n                            SelectedAutolockSpan = AutolockSpans[AutolockSpanDefaultIndex];\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        PasscodeUtils.Reset();\r\n                        UpdateDeviceLockedAsync();\r\n                    }\r\n                }\r\n                else if (Property.NameEquals(e.PropertyName, () => SelectedAutolockSpan))\r\n                {\r\n                    UpdateDeviceLockedAsync();\r\n                }\r\n            };\r\n        }\r\n\r\n        private void UpdateDeviceLockedAsync()\r\n        {\r\n            var shellViewModel = IoC.Get<ShellViewModel>();\r\n            if (shellViewModel != null)\r\n            {\r\n                shellViewModel.UpdateDeviceLockedAsync();\r\n            }\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            PasscodeEnabled = PasscodeUtils.IsEnabled;\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            if (!PasscodeEnabled)\r\n            {\r\n                PasscodeUtils.Reset();\r\n            } \r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        public void ChangePasscode()\r\n        {\r\n            StateService.SelectedAutolockTimeout = _selectedAutolockSpan != null ? _selectedAutolockSpan.Seconds : AutolockSpans[AutolockSpanDefaultIndex].Seconds;\r\n            \r\n            BeginOnUIThread(TimeSpan.FromSeconds(0.25), () => NavigationService.UriFor<ChangePasscodeViewModel>().Navigate());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/PasswordRecoveryViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.Text;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Auth;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class PasswordRecoveryViewModel : ViewModelBase\r\n    {\r\n        private string _code;\r\n\r\n        public string Code\r\n        {\r\n            get { return _code; }\r\n            set\r\n            {\r\n                SetField(ref _code, value, () => Code);\r\n                NotifyOfPropertyChange(() => CanRecoverPassword);\r\n            }\r\n        }\r\n\r\n        private bool _hasError;\r\n\r\n        public bool HasError\r\n        {\r\n            get { return _hasError; }\r\n            set { SetField(ref _hasError, value, () => HasError); }\r\n        }\r\n\r\n        private string _error;\r\n\r\n        public string Error\r\n        {\r\n            get { return _error; }\r\n            set { SetField(ref _error, value, () => Error); }\r\n        }\r\n\r\n        public string PasswordRecoveryHint { get; set; }\r\n\r\n        public string HavingTroubleHint { get; set; }\r\n\r\n        private readonly TLPassword _passwordBase;\r\n\r\n        public PasswordRecoveryViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _passwordBase = StateService.Password as TLPassword;\r\n            StateService.Password = null;\r\n\r\n            if (_passwordBase != null)\r\n            {\r\n                PasswordRecoveryHint = string.Format(AppResources.PasswordRecoveryHint, _passwordBase.EmailUnconfirmedPattern);\r\n                HavingTroubleHint = string.Format(AppResources.HavingTroubleAccessingEmailMessage, _passwordBase.EmailUnconfirmedPattern);\r\n            }\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public bool CanRecoverPassword\r\n        {\r\n            get { return !string.IsNullOrEmpty(Code) && Code.Length == Constants.PasswordRecoveryCodeLength; }\r\n        }\r\n\r\n        public void RecoverPassword()\r\n        {\r\n            if (_passwordBase == null) return;\r\n            if (IsWorking) return;\r\n\r\n            HasError = false;\r\n            Error = string.Empty;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.RecoverPasswordAsync(new TLString(Code), \r\n                auth => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    if (!_passwordBase.IsAuthRecovery)\r\n                    {\r\n                        MTProtoService.GetPasswordAsync(\r\n                            passwordResult => BeginOnUIThread(() =>\r\n                            {\r\n                                MessageBox.Show(AppResources.PasswordDeactivated, AppResources.AppName, MessageBoxButton.OK);\r\n\r\n                                StateService.RemoveBackEntry = true;\r\n                                StateService.Password = passwordResult;\r\n                                NavigationService.UriFor<PasswordViewModel>().Navigate();\r\n                            }),\r\n                            error2 =>\r\n                            {\r\n                                Execute.ShowDebugMessage(\"account.getPassword error \" + error2);\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        _passwordBase.IsAuthRecovery = false;\r\n#if LOG_REGISTRATION\r\n                        TLUtils.WriteLog(\"auth.recoverPassword result \" + auth);\r\n                        TLUtils.WriteLog(\"TLUtils.IsLogEnabled=false\");\r\n#endif\r\n\r\n                        TLUtils.IsLogEnabled = false;\r\n                        TLUtils.LogItems.Clear();\r\n\r\n                        var result = MessageBox.Show(\r\n                            AppResources.ConfirmPushMessage,\r\n                            AppResources.ConfirmPushTitle,\r\n                            MessageBoxButton.OKCancel);\r\n\r\n                        if (result != MessageBoxResult.OK)\r\n                        {\r\n                            Notifications.Disable();\r\n                        }\r\n                        else\r\n                        {\r\n                            Notifications.Enable();\r\n                        }\r\n\r\n                        ConfirmViewModel.UpdateNotificationsAsync(MTProtoService, StateService);\r\n\r\n                        MTProtoService.SetInitState();\r\n                        StateService.CurrentUserId = auth.User.Index;\r\n                        StateService.FirstRun = true;\r\n                        SettingsHelper.SetValue(Constants.IsAuthorizedKey, true);\r\n\r\n                        ShellViewModel.Navigate(NavigationService);\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var messageBuilder = new StringBuilder();\r\n                    //messageBuilder.AppendLine(AppResources.Error);\r\n                    //messageBuilder.AppendLine();\r\n                    messageBuilder.AppendLine(\"Method: account.recoveryPassword\");\r\n                    messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                    if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                    {\r\n                        HasError = true;\r\n                        Error = AppResources.FloodWaitString;\r\n                        Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.FloodWaitString, AppResources.Error, MessageBoxButton.OK));\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                    {\r\n                        HasError = true;\r\n                        Error = AppResources.ServerError;\r\n                        Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK));\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (TLRPCError.TypeEquals(error, ErrorType.CODE_EMPTY))\r\n                        {\r\n                            HasError = true;\r\n                            Error = string.Format(\"{0} {1}\", error.Code, error.Message);\r\n                            Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.CODE_INVALID))\r\n                        {\r\n                            HasError = true;\r\n                            Error = string.Format(\"{0} {1}\", error.Code, error.Message);\r\n                            Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.PASSWORD_EMPTY))\r\n                        {\r\n                            HasError = true;\r\n                            Error = string.Format(\"{0} {1}\", error.Code, error.Message);\r\n                            Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.PASSWORD_RECOVERY_NA))\r\n                        {\r\n                            HasError = true;\r\n                            Error = AppResources.EmailInvalid;\r\n                            Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.EmailInvalid, AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.PASSWORD_RECOVERY_EXPIRED))\r\n                        {\r\n                            HasError = true;\r\n                            Error = string.Format(\"{0} {1}\", error.Code, error.Message);\r\n                            Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.EmailInvalid, AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n                        else\r\n                        {\r\n                            HasError = true;\r\n                            Error = string.Format(\"{0} {1}\", error.Code, error.Message);\r\n                            Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        HasError = true;\r\n                        Error = string.Empty;\r\n                        Execute.ShowDebugMessage(\"account.recoveryPassword error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void ForgotPassword()\r\n        {\r\n            MessageBox.Show(AppResources.NoAccessRecoveryEmailMessage, AppResources.Sorry, MessageBoxButton.OK);\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/PasswordViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class PasswordViewModel : ViewModelBase\r\n    {\r\n        public Visibility ChangePasswordVisibility\r\n        {\r\n            get\r\n            {\r\n                if (_password is TLPassword && _password.HasPassword)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                if (_password is TLPassword && !_password.HasPassword && TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern))\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public Visibility CompletePasswordVisibility\r\n        {\r\n            get\r\n            {\r\n                if (_password is TLPassword && _password.HasPassword)\r\n                {\r\n                    return Visibility.Collapsed;\r\n                }\r\n\r\n                if (_password is TLPassword && !_password.HasPassword && TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern))\r\n                {\r\n                    return Visibility.Collapsed;\r\n                }\r\n\r\n                return Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        private TLPasswordBase _password;\r\n\r\n        private bool _passwordEnabled;\r\n\r\n        public bool PasswordEnabled\r\n        {\r\n            get { return _passwordEnabled; }\r\n            set { SetField(ref _passwordEnabled, value, () => PasswordEnabled); }\r\n        }\r\n\r\n        private Visibility _recoveryEmailUnconfirmedVisibility;\r\n\r\n        public Visibility RecoveryEmailUnconfirmedVisibility\r\n        {\r\n            get { return _recoveryEmailUnconfirmedVisibility; }\r\n            set\r\n            {\r\n                SetField(ref _recoveryEmailUnconfirmedVisibility, value, () => RecoveryEmailUnconfirmedVisibility);\r\n                NotifyOfPropertyChange(() => RecoveryEmailUnconfirmedHint);\r\n            }\r\n        }\r\n\r\n        public string RecoveryEmailUnconfirmedHint\r\n        {\r\n            get\r\n            {\r\n                if (!TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern))\r\n                {\r\n                    return string.Format(AppResources.RecoveryEmailPending, _password.EmailUnconfirmedPattern);\r\n                }\r\n\r\n                var password = _password as TLPassword;\r\n                if (password != null && password.HasRecovery.Value)\r\n                {\r\n                    return AppResources.RecoveryEmailComplete;\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public string CompletePasswordLabel\r\n        {\r\n            get\r\n            {\r\n                if (!TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern))\r\n                {\r\n                    return string.Format(AppResources.StepsToCompleteToTwoStepsVerificationSetup, _password.EmailUnconfirmedPattern);\r\n                }\r\n\r\n                return AppResources.StepsToCompleteToTwoStepsVerificationSetup;\r\n            }\r\n        }\r\n\r\n        public string RecoveryEmailLabel\r\n        {\r\n            get\r\n            {\r\n                if (_password != null)\r\n                {\r\n                    if (!TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern))\r\n                    {\r\n                        return AppResources.ChangeRecoveryEmail;\r\n                    }\r\n\r\n                    var password = _password as TLPassword;\r\n                    if (password != null && password.HasRecovery.Value)\r\n                    {\r\n                        return AppResources.ChangeRecoveryEmail;\r\n                    }\r\n                }\r\n                return AppResources.SetRecoveryEmail;\r\n            }\r\n        }\r\n\r\n        private bool _suppressPasswordEnabled;\r\n\r\n        private readonly DispatcherTimer _checkPasswordSettingsTimer = new DispatcherTimer();\r\n\r\n        private void StartTimer()\r\n        {\r\n            if (!TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern))\r\n            {\r\n                _checkPasswordSettingsTimer.Start();\r\n            }\r\n        }\r\n\r\n        private void StopTimer()\r\n        {\r\n            _checkPasswordSettingsTimer.Stop();\r\n        }\r\n\r\n        private readonly TLAuthorizationForm _authorizationForm;\r\n\r\n        private readonly IList<TLSecureValue> _secureValues;\r\n\r\n        public static string Password { get; set; }\r\n\r\n        public static string TempNewPassword { get; set; }\r\n\r\n        public static TLString Secret { get; protected set; }\r\n\r\n        public PasswordViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _checkPasswordSettingsTimer.Tick += OnCheckPasswordSettings;\r\n            _checkPasswordSettingsTimer.Interval = TimeSpan.FromSeconds(5.0);\r\n\r\n            _password = StateService.Password;\r\n            StateService.Password = null;\r\n\r\n            _authorizationForm = StateService.AuthorizationForm;\r\n            StateService.AuthorizationForm = null;\r\n\r\n            _secureValues = StateService.SecureValues;\r\n            StateService.SecureValues = null;\r\n\r\n            if (_password != null)\r\n            {\r\n                PasswordEnabled = _password.IsAvailable;\r\n                RecoveryEmailUnconfirmedVisibility = !TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern) || (_password is TLPassword && ((TLPassword)_password).HasRecovery.Value)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n\r\n            PropertyChanged += (o, e) =>\r\n            {\r\n                if (Property.NameEquals(e.PropertyName, () => PasswordEnabled) && !_suppressPasswordEnabled)\r\n                {\r\n                    if (PasswordEnabled)\r\n                    {\r\n                        ChangePassword();\r\n                    }\r\n                    else\r\n                    {\r\n                        ClearPassword();\r\n                    }\r\n                }\r\n            };\r\n        }\r\n\r\n        public void ChangePasswordEnabled()\r\n        {\r\n            if (!PasswordEnabled)\r\n            {\r\n                PasswordEnabled = true;\r\n                return;\r\n            }\r\n\r\n            var message = AppResources.TurnPasswordOffQuestion;\r\n            var password = _password as TLPassword81;\r\n            if (password != null && password.HasSecureValues)\r\n            {\r\n                message = string.Format(\"{0}\\n\\n{1}\", message, AppResources.TurnPasswordOffPassport);\r\n            }\r\n\r\n            ShellViewModel.ShowCustomMessageBox(\r\n                message, AppResources.AppName,\r\n                AppResources.Ok, AppResources.Cancel,\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        PasswordEnabled = false;\r\n                    }\r\n                });\r\n        }\r\n\r\n        private void OnCheckPasswordSettings(object sender, System.EventArgs e)\r\n        {\r\n            Execute.ShowDebugMessage(\"account.getPasswordSettings\");\r\n\r\n            MTProtoService.GetPasswordAsync(\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    var password84 = result as TLPassword84;\r\n                    if (password84 != null && password84.HasRecovery.Value)\r\n                    {\r\n                        var algo = password84.CurrentAlgo as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n                        if (algo == null) return;\r\n\r\n                        password84.CurrentPasswordHash = SRP.GetX(new TLString(TempNewPassword), algo);\r\n                        //password.CurrentPasswordHash = Utils.Password.GetHash(password.CurrentSalt, new TLString(TempNewPassword));\r\n\r\n                        _password = password84;\r\n\r\n                        RecoveryEmailUnconfirmedVisibility = !TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern) || (_password is TLPassword && ((TLPassword)_password).HasRecovery.Value)\r\n                            ? Visibility.Visible\r\n                            : Visibility.Collapsed;\r\n                        NotifyOfPropertyChange(() => RecoveryEmailLabel);\r\n                        NotifyOfPropertyChange(() => CompletePasswordLabel);\r\n                        NotifyOfPropertyChange(() => ChangePasswordVisibility);\r\n                        NotifyOfPropertyChange(() => CompletePasswordVisibility);\r\n\r\n                        StopTimer();\r\n\r\n                        if (_authorizationForm != null || _secureValues != null)\r\n                        {\r\n                            MTProtoService.GetPasswordSettingsAsync(SRP.GetCheck(password84.CurrentPasswordHash, password84.SRPId, password84.SRPB, algo),\r\n                                result2 => BeginOnUIThread(() =>\r\n                                {\r\n                                    Passport.EnterPasswordViewModel.NavigateToPassportCommon(\r\n                                        result2, password84, new TLString(TempNewPassword), \r\n                                        _authorizationForm, _secureValues, \r\n                                        MTProtoService, StateService, NavigationService);\r\n                                }),\r\n                                error => BeginOnUIThread(() =>\r\n                                {\r\n                                    if (error.TypeEquals(ErrorType.PASSWORD_HASH_INVALID))\r\n                                    {\r\n                                        StateService.AuthorizationForm = _authorizationForm;\r\n                                        StateService.Password = result;\r\n                                        NavigationService.UriFor<Passport.EnterPasswordViewModel>().WithParam(x => x.RandomParam, Guid.NewGuid().ToString()).Navigate();\r\n                                    }\r\n                                }));\r\n                        }\r\n                    }\r\n                }),\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"account.getPasswordSettings error \" + error);\r\n                });\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            StartTimer();\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            if (StateService.Password == null)\r\n            {\r\n                _suppressPasswordEnabled = true;\r\n                if (_password != null)\r\n                {\r\n                    PasswordEnabled = _password.IsAvailable;\r\n                    RecoveryEmailUnconfirmedVisibility = !TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern) || (_password is TLPassword && ((TLPassword)_password).HasRecovery.Value)\r\n                        ? Visibility.Visible\r\n                        : Visibility.Collapsed;\r\n                    NotifyOfPropertyChange(() => RecoveryEmailLabel);\r\n                    NotifyOfPropertyChange(() => CompletePasswordLabel);\r\n                    NotifyOfPropertyChange(() => ChangePasswordVisibility);\r\n                    NotifyOfPropertyChange(() => CompletePasswordVisibility);\r\n                }\r\n                _suppressPasswordEnabled = false;\r\n            }\r\n            else\r\n            {\r\n                _password = StateService.Password;\r\n                StateService.Password = null; \r\n\r\n                StartTimer();\r\n\r\n                RecoveryEmailUnconfirmedVisibility = !TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern) || (_password is TLPassword && ((TLPassword)_password).HasRecovery.Value)\r\n                     ? Visibility.Visible\r\n                     : Visibility.Collapsed;\r\n                NotifyOfPropertyChange(() => RecoveryEmailLabel);\r\n                NotifyOfPropertyChange(() => CompletePasswordLabel);\r\n                NotifyOfPropertyChange(() => ChangePasswordVisibility);\r\n                NotifyOfPropertyChange(() => CompletePasswordVisibility);\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            StopTimer();\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        private void ClearPassword()\r\n        {\r\n            var password = _password as TLPassword84;\r\n            if (password == null) return;\r\n\r\n            IsWorking = true;\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var newSettings = new TLPasswordInputSettings83\r\n                {\r\n                    Flags = new TLInt(0),\r\n                    NewAlgo = new TLPasswordKdfAlgoUnknown(),\r\n                    NewPasswordHash = TLString.Empty,\r\n                    Hint = TLString.Empty,\r\n                    Email = TLString.Empty\r\n                };\r\n\r\n                MTProtoService.GetPasswordAsync(\r\n                    result1 => \r\n                    {\r\n                        var srpParams = result1 as IPasswordSRPParams;\r\n                        if (srpParams == null)\r\n                        {\r\n                            BeginOnUIThread(() => IsWorking = false);\r\n                            return;\r\n                        }\r\n\r\n                        var currentPasswordHash = password.CurrentPasswordHash ?? TLString.Empty;\r\n                        MTProtoService.UpdatePasswordSettingsAsync(SRP.GetCheck(currentPasswordHash, srpParams.SRPId, srpParams.SRPB, srpParams.CurrentAlgo), newSettings,\r\n                            result => BeginOnUIThread(() =>\r\n                            {\r\n                                StopTimer();\r\n\r\n                                IsWorking = false;\r\n                                var noPassword = new TLPassword84\r\n                                {\r\n                                    Flags = new TLInt(0),\r\n                                    EmailUnconfirmedPattern = TLString.Empty,\r\n                                    NewSecureSalt = TLString.Empty,\r\n                                    SecretRandom = TLString.Empty\r\n                                };\r\n\r\n                                var password81 = _password as TLPassword84;\r\n                                if (password81 != null)\r\n                                {\r\n                                    noPassword.NewAlgo = password81.NewAlgo;\r\n                                    noPassword.NewSecureSalt = password81.NewSecureSalt;\r\n                                    noPassword.SecretRandom = password81.SecretRandom;\r\n                                }\r\n\r\n                                _password = noPassword;\r\n                                if (_password != null)\r\n                                {\r\n                                    PasswordEnabled = _password.IsAvailable;\r\n                                    RecoveryEmailUnconfirmedVisibility = !TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern) || (_password is TLPassword && ((TLPassword)_password).HasRecovery.Value)\r\n                                        ? Visibility.Visible\r\n                                        : Visibility.Collapsed;\r\n                                    NotifyOfPropertyChange(() => RecoveryEmailLabel);\r\n                                    NotifyOfPropertyChange(() => CompletePasswordLabel);\r\n                                    NotifyOfPropertyChange(() => ChangePasswordVisibility);\r\n                                    NotifyOfPropertyChange(() => CompletePasswordVisibility);\r\n                                }\r\n                                EventAggregator.Publish(_password);\r\n                            }),\r\n                            error => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                var messageBuilder = new StringBuilder();\r\n                                //messageBuilder.AppendLine(AppResources.ServerErrorMessage);\r\n                                //messageBuilder.AppendLine();\r\n                                messageBuilder.AppendLine(\"Method: account.updatePasswordSettings\");\r\n                                messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                                if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                                {\r\n                                    Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.FloodWaitString, AppResources.Error, MessageBoxButton.OK));\r\n                                }\r\n                                else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                                {\r\n                                    Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK));\r\n                                }\r\n                                else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                                {\r\n                                    if (TLRPCError.TypeEquals(error, ErrorType.PASSWORD_HASH_INVALID))\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                    }\r\n                                    else if (TLRPCError.TypeEquals(error, ErrorType.NEW_PASSWORD_BAD))\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                    }\r\n                                    else if (TLRPCError.TypeEquals(error, ErrorType.NEW_SALT_INVALID))\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                    }\r\n                                    else if (TLRPCError.TypeEquals(error, ErrorType.EMAIL_INVALID))\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.EmailInvalid, AppResources.Error, MessageBoxButton.OK));\r\n                                    }\r\n                                    else if (TLRPCError.TypeEquals(error, ErrorType.EMAIL_UNCONFIRMED))\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                    }\r\n                                }\r\n                                else\r\n                                {\r\n                                    Execute.ShowDebugMessage(\"account.updatePasswordSettings error \" + error);\r\n                                }\r\n                            }));\r\n                    },\r\n                    error1 => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                    }));\r\n            });\r\n        }\r\n\r\n        public void AbortPassword()\r\n        {\r\n            ClearPassword();\r\n        }\r\n\r\n        public void ChangePassword()\r\n        {\r\n            StateService.Password = _password;\r\n            NavigationService.UriFor<ChangePasswordViewModel>().Navigate();\r\n        }\r\n\r\n        public void ChangeRecoveryEmail()\r\n        {\r\n            StateService.Password = _password;\r\n            NavigationService.UriFor<ChangePasswordEmailViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/PrivacySecureViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Windows.Controls;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Passport;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class PrivacySecurityViewModel : ViewModelBase, Telegram.Api.Aggregator.IHandle<TLUpdateUserBlocked>, Telegram.Api.Aggregator.IHandle<TLUpdatePrivacy>\r\n    {\r\n        private bool _isSecretChatsEnabled;\r\n\r\n        public bool IsSecretChatsEnabled\r\n        {\r\n            get { return _isSecretChatsEnabled; }\r\n            set { SetField(ref _isSecretChatsEnabled, value, () => IsSecretChatsEnabled); }\r\n        }\r\n\r\n        private int _blockedUsersCount;\r\n\r\n        private string _blockedUsersSubtitle = \" \";\r\n\r\n        public string BlockedUsersSubtitle\r\n        {\r\n            get { return _blockedUsersSubtitle; }\r\n            set { SetField(ref _blockedUsersSubtitle, value, () => BlockedUsersSubtitle); }\r\n        }\r\n\r\n        private TLPrivacyRules _lastSeenPrivacyRules;\r\n\r\n        private string _lastSeenSubtitle = \" \";\r\n\r\n        public string LastSeenSubtitle\r\n        {\r\n            get { return _lastSeenSubtitle; }\r\n            set { SetField(ref _lastSeenSubtitle, value, () => LastSeenSubtitle); }\r\n        }\r\n\r\n        private TLPrivacyRules _phoneCallsPrivacyRules;\r\n\r\n        private string _phoneCallsSubtitle = \" \";\r\n\r\n        public string PhoneCallsSubtitle\r\n        {\r\n            get { return _phoneCallsSubtitle; }\r\n            set { SetField(ref _phoneCallsSubtitle, value, () => PhoneCallsSubtitle); }\r\n        }\r\n\r\n        private TLPrivacyRules _chatInvitePrivacyRules;\r\n\r\n        private string _groupsSubtitle = \" \";\r\n\r\n        public string GroupsSubtitle\r\n        {\r\n            get { return _groupsSubtitle; }\r\n            set { SetField(ref _groupsSubtitle, value, () => GroupsSubtitle); }\r\n        }\r\n\r\n        private int _accountDaysTTL;\r\n\r\n        private string _accountSelfDestructsSubtitle = \" \";\r\n\r\n        public string AccountSelfDestructsSubtitle\r\n        {\r\n            get { return _accountSelfDestructsSubtitle; }\r\n            set { SetField(ref _accountSelfDestructsSubtitle, value, () => AccountSelfDestructsSubtitle); }\r\n        }\r\n\r\n        public PrivacySecurityViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n        }\r\n\r\n        private bool _secretChatsEnabled;\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            MTProtoService.GetBlockedAsync(new TLInt(0), new TLInt(int.MaxValue),\r\n                result =>\r\n                {\r\n                    var contacts = result as TLContactsBlocked;\r\n                    if (contacts != null)\r\n                    {\r\n                        var count = contacts.Blocked.Count;\r\n\r\n                        UpdateBlockedUsersString(count);\r\n                    }\r\n                },\r\n                error => Execute.ShowDebugMessage(\"contacts.getBlocked error \" + error));\r\n\r\n            MTProtoService.GetAccountTTLAsync(\r\n                result =>\r\n                {\r\n                    var days = result.Days.Value;\r\n\r\n                    UpdateAccountTTLString(days);\r\n                },\r\n                error => Execute.ShowDebugMessage(\"account.getAccountTTL error \" + error));\r\n\r\n            MTProtoService.GetPrivacyAsync(new TLInputPrivacyKeyStatusTimestamp(),\r\n                result =>\r\n                {\r\n                    LastSeenSubtitle = GetPrivacyString(result, out _lastSeenPrivacyRules);\r\n                },\r\n                error => Execute.ShowDebugMessage(\"account.getPrivacy error \" + error));\r\n\r\n            MTProtoService.GetPrivacyAsync(new TLInputPrivacyKeyPhoneCall(),\r\n                result =>\r\n                {\r\n                    PhoneCallsSubtitle = GetPrivacyString(result, out _phoneCallsPrivacyRules);\r\n                },\r\n                error => Execute.ShowDebugMessage(\"account.getPrivacy error \" + error));\r\n\r\n            MTProtoService.GetPrivacyAsync(new TLInputPrivacyKeyChatInvite(),\r\n                result =>\r\n                {\r\n                    GroupsSubtitle = GetPrivacyString(result, out _chatInvitePrivacyRules);\r\n                },\r\n                error => Execute.ShowDebugMessage(\"account.getPrivacy error \" + error));\r\n\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var isSecretChatEnabled = TLUtils.OpenObjectFromMTProtoFile<TLBool>(SecretChatsViewModel.LinkPreviewsSyncRoot, Constants.WebPagePreviewsFileName);\r\n\r\n                if (isSecretChatEnabled == null || !isSecretChatEnabled.Value)\r\n                {\r\n                    _secretChatsEnabled = true;\r\n                    IsSecretChatsEnabled = true;\r\n                }\r\n                else\r\n                {\r\n                    _secretChatsEnabled = false;\r\n                }\r\n            });\r\n        }\r\n\r\n        private string GetPrivacyString(TLPrivacyRules rules, out TLPrivacyRules currentRules)\r\n        {\r\n            currentRules = rules;\r\n\r\n            TLPrivacyRuleBase mainRule = null;\r\n            var mainRuleString = string.Empty;\r\n            var minusCount = 0;\r\n            var plusCount = 0;\r\n            foreach (var rule in rules.Rules)\r\n            {\r\n                if (rule is TLPrivacyValueAllowAll)\r\n                {\r\n                    mainRule = rule;\r\n                    mainRuleString = AppResources.Everybody;\r\n                }\r\n\r\n                if (rule is TLPrivacyValueAllowContacts)\r\n                {\r\n                    mainRule = rule;\r\n                    mainRuleString = AppResources.MyContacts;\r\n                }\r\n\r\n                if (rule is TLPrivacyValueDisallowAll)\r\n                {\r\n                    mainRule = rule;\r\n                    mainRuleString = AppResources.Nobody;\r\n                }\r\n\r\n                if (rule is TLPrivacyValueDisallowUsers)\r\n                {\r\n                    minusCount += ((TLPrivacyValueDisallowUsers)rule).Users.Count;\r\n                }\r\n\r\n                if (rule is TLPrivacyValueAllowUsers)\r\n                {\r\n                    plusCount += ((TLPrivacyValueAllowUsers)rule).Users.Count;\r\n                }\r\n            }\r\n\r\n            if (mainRule == null)\r\n            {\r\n                mainRule = new TLPrivacyValueDisallowAll();\r\n                mainRuleString = AppResources.Nobody;\r\n            }\r\n\r\n            var countStrings = new List<string>();\r\n            if (minusCount > 0)\r\n            {\r\n                countStrings.Add(\"-\" + minusCount);\r\n            }\r\n            if (plusCount > 0)\r\n            {\r\n                countStrings.Add(\"+\" + plusCount);\r\n            }\r\n            if (countStrings.Count > 0)\r\n            {\r\n                mainRuleString += string.Format(\" ({0})\", string.Join(\", \", countStrings));\r\n            }\r\n\r\n            return mainRuleString;\r\n        }\r\n\r\n        public void OpenBlockedUsers()\r\n        {\r\n            NavigationService.UriFor<BlockedContactsViewModel>().Navigate();\r\n        }\r\n\r\n        private void UpdateBlockedUsersString(int count)\r\n        {\r\n            _blockedUsersCount = count;\r\n            if (count == 0)\r\n            {\r\n                BlockedUsersSubtitle = AppResources.NoUsers;\r\n            }\r\n            else if (count > 0)\r\n            {\r\n                BlockedUsersSubtitle = Language.Declension(\r\n                    count,\r\n                    AppResources.UserNominativeSingular,\r\n                    AppResources.UserNominativePlural,\r\n                    AppResources.UserGenitiveSingular,\r\n                    AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n        }\r\n\r\n        private void UpdateAccountTTLString(int days)\r\n        {\r\n            _accountDaysTTL = days;\r\n            if (days >= 365)\r\n            {\r\n                var years = days / 365;\r\n                var yearsString = Language.Declension(\r\n                    years,\r\n                    AppResources.YearNominativeSingular,\r\n                    AppResources.YearNominativePlural,\r\n                    AppResources.YearGenitiveSingular,\r\n                    AppResources.YearGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                AccountSelfDestructsSubtitle = string.Format(\"{0} {1}\", AppResources.IfYouAreAwayFor, yearsString);\r\n            }\r\n            else\r\n            {\r\n                var months = days / 30;\r\n\r\n                var monthsString = Language.Declension(\r\n                    months,\r\n                    AppResources.MonthNominativeSingular,\r\n                    AppResources.MonthNominativePlural,\r\n                    AppResources.MonthGenitiveSingular,\r\n                    AppResources.MonthGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                AccountSelfDestructsSubtitle = string.Format(\"{0} {1}\", AppResources.IfYouAreAwayFor, monthsString);\r\n            }\r\n        }\r\n\r\n        public void Sessions()\r\n        {\r\n            NavigationService.UriFor<SessionsViewModel>().Navigate();\r\n        }\r\n\r\n        public void LoggedIn()\r\n        {\r\n            NavigationService.UriFor<LoggedInViewModel>().Navigate();\r\n        }\r\n\r\n        public void Contacts()\r\n        {\r\n            StateService.GetContactsSettings();\r\n            NavigationService.UriFor<ContactsSecurityViewModel>().Navigate();\r\n        }\r\n\r\n        public void LastSeen()\r\n        {\r\n            StateService.PrivacyRules = _lastSeenPrivacyRules;\r\n            NavigationService.UriFor<LastSeenViewModel>().Navigate();\r\n        }\r\n\r\n        public void CallsPrivacy()\r\n        {\r\n            StateService.PrivacyRules = _phoneCallsPrivacyRules;\r\n            NavigationService.UriFor<CallsPrivacyViewModel>().Navigate();\r\n        }\r\n\r\n        public void CallsSecurity()\r\n        {\r\n            CacheService.GetConfigAsync(\r\n                config =>\r\n                {\r\n                    var config82 = config as TLConfig82;\r\n                    var defaultP2PContacts = config82 == null || config82.DefaultP2PContacts;\r\n                    StateService.GetCallsSecurity(defaultP2PContacts);\r\n\r\n                    NavigationService.UriFor<CallsSecurityViewModel>().Navigate();\r\n                });\r\n        }\r\n\r\n        public void SecretChats()\r\n        {\r\n            StateService.LinkPreviews = !_secretChatsEnabled;\r\n            NavigationService.UriFor<SecretChatsViewModel>().Navigate();\r\n        }\r\n\r\n        public void Groups()\r\n        {\r\n            StateService.PrivacyRules = _chatInvitePrivacyRules;\r\n            NavigationService.UriFor<GroupsViewModel>().Navigate();\r\n        }\r\n\r\n        public void AccountSelfDestructs()\r\n        {\r\n            StateService.AccountDaysTTL = _accountDaysTTL;\r\n            NavigationService.UriFor<AccountSelfDestructsViewModel>().Navigate();\r\n        }\r\n\r\n        public void Passcode()\r\n        {\r\n            if (!PasscodeUtils.IsEnabled)\r\n            {\r\n                NavigationService.UriFor<PasscodeViewModel>().Navigate();\r\n            }\r\n            else\r\n            {\r\n                NavigationService.UriFor<EnterPasscodeViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void TwoStepVerification()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetPasswordAsync(\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (result.HasPassword)\r\n                    {\r\n                        StateService.Password = result;\r\n                        NavigationService.UriFor<EnterPasswordViewModel>().Navigate();\r\n                        return;\r\n                    }\r\n\r\n                    StateService.Password = result;\r\n                    NavigationService.UriFor<PasswordViewModel>().Navigate();\r\n                }),\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"account.getPassword error \" + error);\r\n                });\r\n        }\r\n\r\n        public void Payments()\r\n        {\r\n            var content = new StackPanel();\r\n\r\n            var shippingInfo = new CheckBox { Content = AppResources.ShippingInfo, IsChecked = true };\r\n            var paymentInfo = new CheckBox { Content = AppResources.PaymentInfo, IsChecked = true };\r\n\r\n            content.Children.Add(shippingInfo);\r\n            content.Children.Add(paymentInfo);\r\n\r\n            ShellViewModel.ShowCustomMessageBox(string.Empty, string.Empty, AppResources.Clear.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                r =>\r\n                {\r\n                    if (r == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        var credentials = paymentInfo.IsChecked.HasValue && paymentInfo.IsChecked.Value;\r\n                        var info = shippingInfo.IsChecked.HasValue && shippingInfo.IsChecked.Value;\r\n\r\n                        if (!info && !credentials) return;\r\n\r\n                        IsWorking = true;\r\n                        MTProtoService.ClearSavedInfoAsync(credentials, info,\r\n                            result => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                            }),\r\n                            error => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                            }));\r\n                    }\r\n                },\r\n                content);\r\n        }\r\n\r\n        public void Passport()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            var passportConfig = StateService.GetPassportConfig();\r\n            var passportConfigHash = passportConfig != null ? passportConfig.Hash : new TLInt(0);\r\n\r\n            MTProtoService.GetPassportDataAsync(\r\n                (result1, result2) => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (result1.HasPassword)\r\n                    {\r\n                        StateService.Password = result1;\r\n                        StateService.SecureValues = result2;\r\n                        NavigationService.UriFor<Passport.EnterPasswordViewModel>().Navigate();\r\n                        return;\r\n                    }\r\n\r\n                    if (!result1.HasPassword)\r\n                    {\r\n                        if (!TLString.IsNullOrEmpty(result1.EmailUnconfirmedPattern))\r\n                        {\r\n                            StateService.Password = result1;\r\n                            StateService.SecureValues = result2;\r\n                            NavigationService.UriFor<PasswordViewModel>().Navigate();\r\n                        }\r\n                        else\r\n                        {\r\n                            StateService.Password = result1;\r\n                            StateService.SecureValues = result2;\r\n                            NavigationService.UriFor<PasswordIntroViewModel>().Navigate();\r\n                        }\r\n                        return;\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false; \r\n                    Execute.ShowDebugMessage(\"passport.container error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void DeleteAllCloudDrafts()\r\n        {\r\n            ShellViewModel.ShowCustomMessageBox(\r\n                AppResources.DeleteAllCloudDraftsConfirmation, AppResources.AppName,\r\n                AppResources.Delete, AppResources.Cancel,\r\n                dismissed =>\r\n                {\r\n                    MTProtoService.ClearAllDraftsAsync(\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            var dialogs = CacheService.GetDialogs();\r\n                            foreach (var dialogBase in dialogs)\r\n                            {\r\n                                var dialog = dialogBase as TLDialog71;\r\n                                if (dialog != null)\r\n                                {\r\n                                    dialog.Draft = null;\r\n                                    dialog.NotifyOfPropertyChange(() => dialog.Draft);\r\n                                }\r\n                            }\r\n                        }));\r\n                });\r\n        }\r\n\r\n        public void Handle(TLUpdateUserBlocked update)\r\n        {\r\n            var count = _blockedUsersCount;\r\n            if (update.Blocked.Value)\r\n            {\r\n                _blockedUsersCount++;\r\n                count++;\r\n            }\r\n            else if (count > 0)\r\n            {\r\n                _blockedUsersCount--;\r\n                count--;\r\n            }\r\n\r\n            UpdateBlockedUsersString(count);\r\n        }\r\n\r\n        public void Handle(TLUpdatePrivacy privacy)\r\n        {\r\n            var result = new TLPrivacyRules { Rules = privacy.Rules };\r\n            if (privacy.Key is TLPrivacyKeyStatusTimestamp)\r\n            {\r\n                LastSeenSubtitle = GetPrivacyString(result, out _lastSeenPrivacyRules);\r\n            }\r\n            else if (privacy.Key is TLPrivacyKeyPhoneCall)\r\n            {\r\n                PhoneCallsSubtitle = GetPrivacyString(result, out _phoneCallsPrivacyRules);\r\n            }\r\n            else if (privacy.Key is TLPrivacyKeyChatInvite)\r\n            {\r\n                GroupsSubtitle = GetPrivacyString(result, out _chatInvitePrivacyRules);\r\n            }\r\n            else\r\n            {\r\n                Execute.ShowDebugMessage(\"PrivacySecureViewModel.Handle TLUpdatePrivacy unknown key=\" + privacy.Key);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/PrivacyStatementViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class PrivacyStatementViewModel\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/SecretChatsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class SecretChatsViewModel : ViewModelBase\r\n    {\r\n        public static readonly object LinkPreviewsSyncRoot = new object();\r\n\r\n        private bool _linkPreviews;\r\n\r\n        public bool LinkPreviews\r\n        {\r\n            get { return _linkPreviews; }\r\n            set { SetField(ref _linkPreviews, value, () => LinkPreviews); }\r\n        }\r\n\r\n        public SecretChatsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _linkPreviews = StateService.LinkPreviews;\r\n            StateService.LinkPreviews = false;\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => LinkPreviews))\r\n                {\r\n                    TLUtils.SaveObjectToMTProtoFile(LinkPreviewsSyncRoot, Constants.WebPagePreviewsFileName, new TLBool(LinkPreviews));\r\n                }\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/SelectMultipleUsersViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    class SelectMultipleUsersViewModel\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/SessionsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class SessionsViewModel : ItemsViewModelBase<TLAccountAuthorization>, Telegram.Api.Aggregator.IHandle<TLUpdateNewAuthorization>\r\n    {\r\n        public TLAccountAuthorization Current { get; set; }\r\n\r\n        private readonly DispatcherTimer _getAuthorizationsTimer = new DispatcherTimer();\r\n\r\n        private void StartTimer()\r\n        {\r\n            _getAuthorizationsTimer.Start();\r\n        }\r\n\r\n        private void StopTimer()\r\n        {\r\n            _getAuthorizationsTimer.Stop();\r\n        }\r\n\r\n        public SessionsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _getAuthorizationsTimer.Tick += OnGetAuthorizations;\r\n            _getAuthorizationsTimer.Interval = TimeSpan.FromSeconds(10.0);\r\n\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Status = AppResources.Loading;\r\n\r\n            UpdateSessionsAsync();\r\n        }\r\n\r\n        private void ProcessAuthorization(TLAccountAuthorization authorization)\r\n        {\r\n            var description = new StringBuilder();\r\n            description.Append(authorization.DeviceFullName);\r\n            if (!authorization.IsOfficialApp)\r\n            {\r\n                description.Append(\", \");\r\n                description.Append(AppResources.UnofficialApp);\r\n                description.Append(string.Format(\" (ID:{0})\", authorization.ApiId));\r\n            }\r\n\r\n            authorization.Description = description.ToString();\r\n        }\r\n\r\n        private void OnGetAuthorizations(object sender, System.EventArgs e)\r\n        {\r\n            UpdateSessionsAsync();\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            StartTimer();\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            StopTimer();\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        private Dictionary<long, TLAccountAuthorization> _authorizationsCache = new Dictionary<long, TLAccountAuthorization>(); \r\n\r\n        private void UpdateSessionsAsync()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetAuthorizationsAsync(\r\n                accountAuthorizations => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n\r\n                    var firstRun = Current == null;\r\n                    if (firstRun)\r\n                    {\r\n                        Items.Clear();\r\n                        var firstChunkSize = 4;\r\n                        var count = 0;\r\n                        var delayedItems = new List<TLAccountAuthorization>();\r\n                        for (var i = 0; i < accountAuthorizations.Authorizations.Count; i++)\r\n                        {\r\n                            var authorization = accountAuthorizations.Authorizations[i];\r\n                            ProcessAuthorization(authorization);\r\n                            _authorizationsCache[authorization.Hash.Value] = authorization;\r\n                            if (authorization.IsCurrent)\r\n                            {\r\n                                Current = authorization;\r\n                                NotifyOfPropertyChange(() => Current);\r\n                            }\r\n                            else\r\n                            {\r\n                                if (count < firstChunkSize)\r\n                                {\r\n                                    Items.Add(authorization);\r\n                                    count++;\r\n                                }\r\n                                else\r\n                                {\r\n                                    delayedItems.Add(authorization);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n                        {\r\n                            foreach (var authorization in delayedItems)\r\n                            {\r\n                                Items.Add(authorization);\r\n                            }\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        var newAuthorizationsCache = new Dictionary<long, TLAccountAuthorization>();\r\n                        var itemsToAdd = new List<TLAccountAuthorization>();\r\n                        for (var i = 0; i < accountAuthorizations.Authorizations.Count; i++)\r\n                        {\r\n                            var authorization = accountAuthorizations.Authorizations[i];\r\n                            ProcessAuthorization(authorization);\r\n                            TLAccountAuthorization cachedAuthorization;\r\n                            if (!_authorizationsCache.TryGetValue(authorization.Hash.Value, out cachedAuthorization))\r\n                            {\r\n                                itemsToAdd.Add(authorization);\r\n                                newAuthorizationsCache[authorization.Hash.Value] = authorization;\r\n                            }\r\n                            else\r\n                            {\r\n                                cachedAuthorization.Update(authorization);\r\n                                cachedAuthorization.NotifyOfPropertyChange(() => cachedAuthorization.AppFullName);\r\n                                cachedAuthorization.NotifyOfPropertyChange(() => cachedAuthorization.DateActive);\r\n                                cachedAuthorization.NotifyOfPropertyChange(() => cachedAuthorization.DeviceFullName);\r\n                                cachedAuthorization.NotifyOfPropertyChange(() => cachedAuthorization.ApiId);\r\n                                cachedAuthorization.NotifyOfPropertyChange(() => cachedAuthorization.IsOfficialApp);\r\n\r\n                                newAuthorizationsCache[authorization.Hash.Value] = cachedAuthorization;\r\n                            }\r\n                        }\r\n\r\n                        for (var i = 0; i < Items.Count; i++)\r\n                        {\r\n                            if (!newAuthorizationsCache.ContainsKey(Items[i].Hash.Value))\r\n                            {\r\n                                Items.RemoveAt(i--);\r\n                            }\r\n                        }\r\n\r\n\r\n                        for (var i = 0; i < itemsToAdd.Count; i++)\r\n                        {\r\n                            var added = false;\r\n                            for (var j = 0; j < Items.Count; j++)\r\n                            {\r\n                                if (Items[j].DateActive.Value < itemsToAdd[i].DateActive.Value)\r\n                                {\r\n                                    Items.Insert(j, itemsToAdd[i]);\r\n                                    added = true;\r\n                                    break;\r\n                                }\r\n                            }\r\n                            if (!added)\r\n                            {\r\n                                Items.Add(itemsToAdd[i]);\r\n                            }\r\n                        }\r\n\r\n                        _authorizationsCache = newAuthorizationsCache;\r\n                    }\r\n\r\n                }),\r\n                error =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"account.getAuthorizations error \" + error);\r\n                });\r\n        }\r\n\r\n        public void Terminate(TLAccountAuthorization authorization)\r\n        {\r\n            if (authorization == null) return;\r\n\r\n            if (authorization.IsCurrent)\r\n            {\r\n                var result = MessageBox.Show(AppResources.LogOutConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                if (result != MessageBoxResult.OK) return;\r\n\r\n\r\n                var updatesService = IoC.Get<IUpdatesService>();\r\n                var pushService = IoC.Get<IPushService>();\r\n\r\n                pushService.UnregisterDeviceAsync(() =>\r\n                    MTProtoService.LogOutAsync(() =>\r\n                    {\r\n                        ContactsHelper.DeleteContactsAsync(null);\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            foreach (var activeTile in ShellTile.ActiveTiles)\r\n                            {\r\n                                if (activeTile.NavigationUri.ToString().Contains(\"Action=SecondaryTile\"))\r\n                                {\r\n                                    activeTile.Delete();\r\n                                }\r\n                            }\r\n                        });\r\n                    }));\r\n\r\n                Telegram.Logs.Log.Write(\"StartupViewModel SessionsViewModel.Terminate\");\r\n                SettingsViewModel.LogOutCommon(EventAggregator, MTProtoService, updatesService, CacheService, StateService, pushService, NavigationService);\r\n            }\r\n            else\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.ResetAuthorizationAsync(\r\n                    authorization.Hash,\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Items.Remove(authorization);\r\n                    }),\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"account.resetAuthotization error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        public void TerminateOtherSessions()\r\n        {\r\n            var confirmation = MessageBox.Show(AppResources.TerminateAllSessionsConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK)\r\n            {\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.ResetAuthorizationsAsync(\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Items.Clear();\r\n                }),\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"auth.resetAuthotizations error \" + error);\r\n                });\r\n        }\r\n\r\n        public void Handle(TLUpdateNewAuthorization update)\r\n        {\r\n            UpdateSessionsAsync();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/SettingsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define DISABLE_INVISIBLEMODE\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Media;\r\nusing Windows.Data.Xml.Dom;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Transport;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.ViewModels.Search;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.Services.Location;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Auth;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class SettingsViewModel :\r\n        ViewModelBase,\r\n        Telegram.Api.Aggregator.IHandle<UploadableItem>,\r\n        Telegram.Api.Aggregator.IHandle<UserNameChangedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<ProxyChangedEventArgs>\r\n    {\r\n        public string CloudStorageImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    return \"/Images/Messages/chat.cloudstorage-white-WXGA.png\";\r\n                }\r\n\r\n                return \"/Images/Messages/chat.cloudstorage-WXGA.png.png\";\r\n            }\r\n        }\r\n\r\n        private TLUserBase _currentItem;\r\n\r\n        public TLUserBase CurrentItem\r\n        {\r\n            get { return _currentItem; }\r\n            set { SetField(ref _currentItem, value, () => CurrentItem); }\r\n        }\r\n\r\n        private IUpdatesService UpdateService\r\n        {\r\n            get { return IoC.Get<IUpdatesService>(); }\r\n        }\r\n\r\n        private IPushService PushService\r\n        {\r\n            get { return IoC.Get<IPushService>(); }\r\n        }\r\n\r\n        private IUploadFileManager UploadManager\r\n        {\r\n            get { return IoC.Get<IUploadFileManager>(); }\r\n        }\r\n\r\n        private string _stickersSubtitle;\r\n\r\n        public string StickersSubtitle\r\n        {\r\n            get { return _stickersSubtitle; }\r\n            set { SetField(ref _stickersSubtitle, value, () => StickersSubtitle); }\r\n        }\r\n\r\n        private string _proxySubtitle;\r\n\r\n        public string ProxySubtitle\r\n        {\r\n            get { return _proxySubtitle; }\r\n            set { SetField(ref _proxySubtitle, value, () => ProxySubtitle); }\r\n        }\r\n\r\n        private TLAllStickers29 _allStickers;\r\n\r\n        private TLAllStickers29 _masks;\r\n\r\n        private TLFeaturedStickers _featuredStickers;\r\n\r\n        public ProfilePhotoViewerViewModel ProfilePhotoViewer { get; set; }\r\n\r\n        public ITransportService TransportService { get; protected set; }\r\n\r\n        public SettingsViewModel(ITransportService transportService, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            eventAggregator.Subscribe(this);\r\n\r\n            TransportService = transportService;\r\n\r\n            SuppressUpdateStatus = true;\r\n\r\n            //tombstoning\r\n            if (stateService.CurrentContact == null)\r\n            {\r\n                ShellViewModel.Navigate(NavigationService);\r\n                return;\r\n            }\r\n\r\n            UpdateProxySubtitle(TransportService.GetProxyConfig());\r\n\r\n            CurrentItem = stateService.CurrentContact;\r\n            stateService.CurrentContact = null;\r\n\r\n            _allStickers = StateService.GetAllStickers() as TLAllStickers29;\r\n            _masks = StateService.GetMasks() as TLAllStickers29;\r\n            _featuredStickers = StateService.GetFeaturedStickers();\r\n            if (_featuredStickers != null) UpdateSets(_featuredStickers, _featuredStickers.Unread);\r\n            UpdateStickersSubtitle(_featuredStickers, _allStickers, _masks);\r\n\r\n            StateService.GetNotifySettingsAsync(\r\n                settings =>\r\n                {\r\n                    _saveIncomingPhotos = settings.SaveIncomingPhotos;\r\n                    _invisibleMode = settings.InvisibleMode;\r\n#if DISABLE_INVISIBLEMODE\r\n                    _invisibleMode = false;\r\n#endif\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        NotifyOfPropertyChange(() => SaveIncomingPhotos);\r\n                        NotifyOfPropertyChange(() => InvisibleMode);\r\n                    });\r\n                });\r\n\r\n            if (CurrentItem == null || CurrentItem.NotifySettings == null)\r\n            {\r\n                BeginOnThreadPool(() =>\r\n                {\r\n                    MTProtoService.GetFullUserAsync(new TLInputUserSelf(),\r\n                        userFull =>\r\n                        {\r\n                            CurrentItem = userFull.User;\r\n\r\n                            BeginOnUIThread(() =>\r\n                            {\r\n                                var user = CurrentItem as TLUser66;\r\n                                if (user != null)\r\n                                {\r\n                                    user.NotifyOfPropertyChange(() => user.About);\r\n                                }\r\n                            });\r\n                        });\r\n                });\r\n            }\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            UpdateStickersAsync(_featuredStickers);\r\n        }\r\n\r\n        private void UpdateProxySubtitle(TLProxyConfigBase proxyConfig)\r\n        {\r\n            var proxy = proxyConfig != null && proxyConfig.IsEnabled.Value && !proxyConfig.IsEmpty\r\n                ? proxyConfig.GetProxy()\r\n                : null;\r\n\r\n            ProxySubtitle = proxy == null ? AppResources.Disabled : (proxy is TLSocks5Proxy ? AppResources.Socks5 : AppResources.MTProto);\r\n        }\r\n\r\n        private void UpdateStickersSubtitle(TLFeaturedStickers featuredStickers, TLAllStickers29 allStickers, TLAllStickers29 masks)\r\n        {\r\n            if (featuredStickers != null && featuredStickers.Unread.Count > 0)\r\n            {\r\n                var count = featuredStickers.Unread.Count;\r\n                StickersSubtitle = Language.Declension(\r\n                    count == 0 ? 1 : count,\r\n                    AppResources.NewStickerPackNominativeSingular,\r\n                    null,\r\n                    AppResources.NewStickerPackGenitiveSingular,\r\n                    AppResources.NewStickerPackGenitivePlural,\r\n                    count < 2\r\n                        ? string.Format(\"{1} {0}\", AppResources.NewStickerPackNominativeSingular, 1).ToLowerInvariant()\r\n                        : string.Format(\"{1} {0}\", AppResources.NewStickerPackNominativePlural, Math.Abs(count))).ToLowerInvariant();\r\n            }\r\n            else if (allStickers != null || masks != null)\r\n            {\r\n                var parts = new List<string>();\r\n                if (allStickers != null)\r\n                {\r\n                    var count = allStickers.Sets.Count;\r\n                    var part = Language.Declension(\r\n                        count == 0 ? 1 : count,\r\n                        AppResources.StickerPackNominativeSingular,\r\n                        null,\r\n                        AppResources.StickerPackGenitiveSingular,\r\n                        AppResources.StickerPackGenitivePlural,\r\n                        count < 2\r\n                            ? string.Format(\"{1} {0}\", AppResources.StickerPackNominativeSingular, 1).ToLowerInvariant()\r\n                            : string.Format(\"{1} {0}\", AppResources.StickerPackNominativePlural, Math.Abs(count))).ToLowerInvariant();\r\n\r\n                    parts.Add(part);\r\n\r\n                }\r\n                if (masks != null)\r\n                {\r\n                    var count = masks.Sets.Count;\r\n                    var part = Language.Declension(\r\n                        count == 0 ? 1 : count,\r\n                        AppResources.MaskPackNominativePlural,\r\n                        null,\r\n                        AppResources.MaskPackGenitiveSingular,\r\n                        AppResources.MaskPackGenitivePlural,\r\n                        count < 2\r\n                            ? string.Format(\"{1} {0}\", AppResources.MaskPackNominativeSingular, 1).ToLowerInvariant()\r\n                            : string.Format(\"{1} {0}\", AppResources.MaskPackNominativePlural, Math.Abs(count))).ToLowerInvariant();\r\n\r\n                    parts.Add(part);\r\n\r\n                }\r\n                StickersSubtitle = string.Join(\", \", parts);\r\n            }\r\n        }\r\n\r\n        private void UpdateStickersAsync(TLFeaturedStickers cachedStickers)\r\n        {\r\n            var hash = cachedStickers != null ? cachedStickers.HashValue : new TLInt(0);\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetFeaturedStickersAsync(true, hash,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var featuredStickers = result as TLFeaturedStickers;\r\n                    if (featuredStickers != null)\r\n                    {\r\n                        UpdateSets(featuredStickers, featuredStickers.Unread);\r\n                        UpdateStickersSubtitle(featuredStickers, _allStickers, _masks);\r\n\r\n                        StateService.SaveFeaturedStickersAsync(featuredStickers);\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.getFeaturedStickers error \" + error);\r\n                }));\r\n        }\r\n\r\n        private void UpdateSets(TLFeaturedStickers result, TLVector<TLLong> unread)\r\n        {\r\n\r\n\r\n            var unreadDict = new Dictionary<long, long>();\r\n            foreach (var unreadId in unread)\r\n            {\r\n                unreadDict[unreadId.Value] = unreadId.Value;\r\n            }\r\n\r\n            for (var i = 0; i < result.Sets.Count; i++)\r\n            {\r\n                var set = result.Sets[i];\r\n                if (unreadDict.ContainsKey(set.Id.Value))\r\n                {\r\n                    set.Unread = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _saveIncomingPhotos;\r\n\r\n        public bool SaveIncomingPhotos\r\n        {\r\n            get { return _saveIncomingPhotos; }\r\n            set\r\n            {\r\n                SetField(ref _saveIncomingPhotos, value, () => SaveIncomingPhotos);\r\n                StateService.GetNotifySettingsAsync(settings =>\r\n                {\r\n                    settings.SaveIncomingPhotos = value;\r\n                    StateService.SaveNotifySettingsAsync(settings);\r\n                });\r\n            }\r\n        }\r\n\r\n        private bool _invisibleMode;\r\n\r\n        public bool InvisibleMode\r\n        {\r\n            get { return _invisibleMode; }\r\n            set\r\n            {\r\n                SetField(ref _invisibleMode, value, () => InvisibleMode);\r\n                StateService.GetNotifySettingsAsync(settings =>\r\n                {\r\n                    settings.InvisibleMode = value;\r\n                    StateService.SaveNotifySettingsAsync(settings);\r\n                });\r\n            }\r\n        }\r\n\r\n        private AskQuestionConfirmationViewModel _askQuestion;\r\n\r\n        public AskQuestionConfirmationViewModel AskQuestion\r\n        {\r\n            get\r\n            {\r\n                return _askQuestion = _askQuestion ?? new AskQuestionConfirmationViewModel();\r\n            }\r\n        }\r\n\r\n\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.DCOption != null)\r\n            {\r\n                var option = StateService.DCOption;\r\n                StateService.DCOption = null;\r\n                Execute.ShowDebugMessage(\"New DCOption=\" + option);\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void OpenCloudStorage()\r\n        {\r\n            StateService.With = CurrentItem;\r\n            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenNotifications()\r\n        {\r\n            StateService.GetNotifySettingsAsync(\r\n                s =>\r\n                {\r\n                    StateService.Settings = s;\r\n                    NavigationService.UriFor<NotificationsViewModel>().Navigate();\r\n                });\r\n        }\r\n\r\n        public static RichTextBox GetRichText(string richText)\r\n        {\r\n            var richTextBox = new RichTextBox();\r\n            var paragraph = new Paragraph();\r\n            var doc = new XmlDocument();\r\n            doc.LoadXml(\"<section>\" + richText + \"</section>\");\r\n            if (doc.FirstChild != null)\r\n            {\r\n                foreach (var childNode in doc.FirstChild.ChildNodes)\r\n                {\r\n                    System.Diagnostics.Debug.WriteLine(childNode.InnerText);\r\n                    var xmlText = childNode as XmlText;\r\n                    if (xmlText != null)\r\n                    {\r\n                        if (!string.IsNullOrEmpty(childNode.InnerText))\r\n                        {\r\n                            paragraph.Inlines.Add(new Run { Text = childNode.InnerText });\r\n                        }\r\n                    }\r\n                    var cdataNode = childNode as XmlCDataSection;\r\n                    if (cdataNode != null)\r\n                    {\r\n                        var d = new XmlDocument();\r\n                        try\r\n                        {\r\n                            d.LoadXml(\"<innerSection>\" + cdataNode.InnerText + \"</innerSection>\");\r\n                            if (d.FirstChild != null)\r\n                            {\r\n                                foreach (var c in d.FirstChild.ChildNodes)\r\n                                {\r\n                                    if (c.NodeName == \"a\")\r\n                                    {\r\n                                        var hyperlink = new Hyperlink { TargetName = \"_blank\" };\r\n                                        foreach (var attribute in c.Attributes)\r\n                                        {\r\n                                            if (attribute.NodeName == \"href\")\r\n                                            {\r\n                                                var nodeInnerValue = attribute.NodeValue as string;\r\n                                                if (!string.IsNullOrEmpty(nodeInnerValue))\r\n                                                {\r\n                                                    hyperlink.NavigateUri = new Uri(nodeInnerValue, UriKind.Absolute);\r\n                                                }\r\n                                            }\r\n                                        }\r\n\r\n                                        xmlText = c.FirstChild as XmlText;\r\n                                        if (xmlText != null)\r\n                                        {\r\n                                            if (!string.IsNullOrEmpty(xmlText.InnerText))\r\n                                            {\r\n                                                hyperlink.Inlines.Add(new Run { Text = xmlText.InnerText, Foreground = (Brush)Application.Current.Resources[\"TelegramBadgeAccentBrush\"] });\r\n                                                paragraph.Inlines.Add(hyperlink);\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            Execute.ShowDebugMessage(ex.ToString());\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            richTextBox.Blocks.Add(paragraph);\r\n\r\n            return richTextBox;\r\n        }\r\n\r\n        public void Support()\r\n        {\r\n            var content = GetRichText(AppResources.AskAQuestionDescription);\r\n            content.Padding = new Thickness(0.0);\r\n            content.IsReadOnly = true;\r\n            content.Margin = new Thickness(0.0, 40.0, 0.0, 40.0);\r\n\r\n            ShellViewModel.ShowCustomMessageBox(null, null,\r\n                AppResources.Ok.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.GetSupportAsync(support =>\r\n                        {\r\n                            IsWorking = false;\r\n                            StateService.With = support.User;\r\n                            BeginOnUIThread(() => NavigationService.UriFor<DialogDetailsViewModel>().Navigate());\r\n                        },\r\n                        error =>\r\n                        {\r\n                            IsWorking = false;\r\n                        });\r\n                    }\r\n                },\r\n                content);\r\n        }\r\n\r\n        public void OpenFAQ()\r\n        {\r\n            OpenUrl(Constants.TelegramFaq);\r\n        }\r\n\r\n        public void OpenPrivacyPolicy()\r\n        {\r\n            OpenUrl(Constants.TelegramPrivacyPolicy);\r\n        }\r\n\r\n        private static void OpenUrl(string url)\r\n        {\r\n            var task = new WebBrowserTask { URL = HttpUtility.UrlEncode(url) };\r\n            task.Show();\r\n        }\r\n\r\n        public void OpenPhoto()\r\n        {\r\n            var user = CurrentItem;\r\n            if (user != null)\r\n            {\r\n                var photo = user.Photo as TLUserProfilePhoto;\r\n                if (photo != null)\r\n                {\r\n                    StateService.CurrentPhoto = photo;\r\n                    StateService.CurrentContact = CurrentItem;\r\n\r\n                    if (ProfilePhotoViewer == null)\r\n                    {\r\n                        ProfilePhotoViewer = new ProfilePhotoViewerViewModel(StateService, MTProtoService);\r\n                        NotifyOfPropertyChange(() => ProfilePhotoViewer);\r\n                    }\r\n\r\n                    BeginOnUIThread(() => ProfilePhotoViewer.OpenViewer());\r\n                }\r\n\r\n                var photoEmpty = user.Photo as TLUserProfilePhotoEmpty;\r\n                if (photoEmpty != null)\r\n                {\r\n                    EditCurrentUserActions.EditPhoto(result =>\r\n                    {\r\n                        var fileId = TLLong.Random();\r\n                        IsWorking = true;\r\n                        UploadManager.UploadFile(fileId, new TLUser66 { IsSelf = true }, result);\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public void LogOut()\r\n        {\r\n            var result = MessageBox.Show(AppResources.LogOutConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (result != MessageBoxResult.OK) return;\r\n\r\n\r\n            Telegram.Logs.Log.Write(\"SettingsViewModel.LogOut\");\r\n            PushService.UnregisterDeviceAsync(() =>\r\n                MTProtoService.LogOutAsync(logOutResult =>\r\n                {\r\n                    ContactsHelper.DeleteContactsAsync(null);\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        foreach (var activeTile in ShellTile.ActiveTiles)\r\n                        {\r\n                            if (activeTile.NavigationUri.ToString().Contains(\"Action=SecondaryTile\"))\r\n                            {\r\n                                activeTile.Delete();\r\n                            }\r\n                        }\r\n                    });\r\n\r\n                    //MTProtoService.LogOutTransportsAsync(\r\n                    //    () =>\r\n                    //    {\r\n\r\n                    //    },\r\n                    //    errors =>\r\n                    //    {\r\n\r\n                    //    });\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"account.logOut error \" + error);\r\n                }));\r\n\r\n            LogOutCommon(EventAggregator, MTProtoService, UpdateService, CacheService, StateService, PushService, NavigationService);\r\n        }\r\n\r\n        public void OpenSnapshots()\r\n        {\r\n            NavigationService.UriFor<SnapshotsViewModel>().Navigate();\r\n        }\r\n\r\n        public static void LogOutCommon(ITelegramEventAggregator eventAggregator, IMTProtoService mtProtoService, IUpdatesService updateService, ICacheService cacheService, IStateService stateService, IPushService pushService, INavigationService navigationService)\r\n        {\r\n            eventAggregator.Publish(Commands.LogOutCommand);\r\n\r\n            SettingsHelper.SetValue(Constants.IsAuthorizedKey, false);\r\n            SettingsHelper.RemoveValue(Constants.CurrentUserKey);\r\n            mtProtoService.ClearQueue();\r\n            updateService.ClearState();\r\n            cacheService.ClearAsync();\r\n            stateService.ResetPasscode();\r\n\r\n            stateService.ClearAllStickersAsync();\r\n            stateService.ClearFeaturedStickersAsync();\r\n            stateService.ClearArchivedStickersAsync();\r\n\r\n            EmojiControl emojiControl;\r\n            if (EmojiControl.TryGetInstance(out emojiControl))\r\n            {\r\n                emojiControl.ClearStickersOnLogOut();\r\n            }\r\n\r\n            cacheService.ClearConfigImportAsync();\r\n            SearchViewModel.DeleteRecentAsync();\r\n\r\n            Bootstrapper.UpdateMainTile();\r\n\r\n            DialogDetailsViewModel.DeleteInlineBots();\r\n            FileUtils.Delete(new object(), Constants.InlineBotsNotificationFileName);\r\n            FileUtils.Delete(new object(), Constants.WebPagePreviewsFileName);\r\n\r\n            var liveLocationService = IoC.Get<ILiveLocationService>();\r\n            liveLocationService.Clear();\r\n\r\n            if (navigationService.CurrentSource == navigationService.UriFor<StartupViewModel>().BuildUri()\r\n                || navigationService.CurrentSource == navigationService.UriFor<SignInViewModel>().BuildUri()\r\n                || navigationService.CurrentSource == navigationService.UriFor<ConfirmViewModel>().BuildUri()\r\n                || navigationService.CurrentSource == navigationService.UriFor<SignUpViewModel>().BuildUri())\r\n            {\r\n                return;\r\n            }\r\n\r\n            stateService.ClearNavigationStack = true;\r\n            Telegram.Logs.Log.Write(\"StartupViewModel SettingsViewModel.LogOutCommon\");\r\n            navigationService.UriFor<StartupViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenPrivacySecurity()\r\n        {\r\n            NavigationService.UriFor<PrivacySecurityViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenLockScreenSettings()\r\n        {\r\n#if WP8\r\n            Windows.System.Launcher.LaunchUriAsync(new Uri(\"ms-settings-lock:\"));\r\n#endif\r\n        }\r\n\r\n        public void OpenStickers()\r\n        {\r\n            NavigationService.UriFor<StickersViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenProxy()\r\n        {\r\n            NavigationService.UriFor<ProxyListViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenChatSettings()\r\n        {\r\n            NavigationService.UriFor<ChatSettingsViewModel>().Navigate();\r\n        }\r\n\r\n        public void EditProfile()\r\n        {\r\n            NavigationService.UriFor<EditCurrentUserViewModel>().Navigate();\r\n        }\r\n\r\n        public void EditProfilePhoto()\r\n        {\r\n            EditCurrentUserActions.EditPhoto(photo =>\r\n            {\r\n                var fileId = TLLong.Random();\r\n                IsWorking = true;\r\n                UploadManager.UploadFile(fileId, new TLUser66 { IsSelf = true }, photo);\r\n            });\r\n        }\r\n\r\n        public void EditPhoneNumber()\r\n        {\r\n            var currentUser = CurrentItem;\r\n            if (currentUser == null) return;\r\n\r\n            StateService.CurrentContact = currentUser;\r\n            NavigationService.UriFor<EditPhoneNumberViewModel>().Navigate();\r\n        }\r\n\r\n        public void EditUsername()\r\n        {\r\n            NavigationService.UriFor<EditUsernameViewModel>().Navigate();\r\n        }\r\n\r\n        public void EditBio()\r\n        {\r\n            StateService.CurrentContact = CurrentItem;\r\n            NavigationService.UriFor<BioViewModel>().Navigate();\r\n        }\r\n\r\n        public void SendLogs()\r\n        {\r\n            var fileName = \"log_\" + DateTime.Now.ToString(\"yyyy-MM-dd_HH-mm-ss.fff\", CultureInfo.InvariantCulture) + \".txt\";\r\n\r\n            Telegram.Logs.Log.CopyTo(fileName,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    StateService.LogFileName = result;\r\n                    NavigationService.UriFor<ChooseDialogViewModel>().Navigate();\r\n                }));\r\n        }\r\n\r\n        public void SendCallLogs()\r\n        {\r\n            var fileName = \"tgvoip.logFile.txt\";\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                StateService.LogFileName = fileName;\r\n                NavigationService.UriFor<ChooseDialogViewModel>().Navigate();\r\n            });\r\n        }\r\n\r\n        public void ClearLogs()\r\n        {\r\n            Telegram.Logs.Log.Clear(\r\n                () => BeginOnUIThread(() =>\r\n                {\r\n                    MessageBox.Show(\"Complete\");\r\n                }));\r\n        }\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n            var userBase = item.Owner as TLUserBase;\r\n            if (userBase != null && userBase.IsSelf)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    CurrentItem.NotifyOfPropertyChange(() => CurrentItem.Photo);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(UserNameChangedEventArgs args)\r\n        {\r\n            var currentUser = CurrentItem;\r\n            var userName = args.User as IUserName;\r\n\r\n            if (currentUser != null\r\n                && userName != null\r\n                && args.User.Index == currentUser.Index)\r\n            {\r\n                CurrentItem = args.User;\r\n                CurrentItem.NotifyOfPropertyChange(() => userName.UserName);\r\n            }\r\n        }\r\n\r\n        public void Handle(ProxyChangedEventArgs args)\r\n        {\r\n            UpdateProxySubtitle(args.ProxyConfig);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/ShareViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Microsoft.Phone.Tasks;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ShareViewModel\r\n    {\r\n        public string Caption { get; protected set; }\r\n\r\n        public ShareViewModel(IStateService stateService)\r\n        {\r\n            _shareLink = stateService.ShareLink;\r\n            stateService.ShareLink = null;\r\n\r\n            _shareMessage = stateService.ShareMessage;\r\n            stateService.ShareMessage = null;\r\n\r\n            Caption = stateService.ShareCaption;\r\n            stateService.ShareCaption = null;\r\n        }\r\n\r\n        private readonly string _shareLink;\r\n\r\n        private readonly string _shareMessage;\r\n\r\n        public void ShareLink()\r\n        {\r\n            if (string.IsNullOrEmpty(_shareLink)) return;\r\n\r\n            var task = new ShareLinkTask\r\n            {\r\n                Title = AppResources.AppName,\r\n                LinkUri = new Uri(_shareLink, UriKind.Absolute),\r\n                Message = _shareMessage\r\n            };\r\n            task.Show();\r\n        }\r\n\r\n        public void ComposeSMS()\r\n        {\r\n            if (string.IsNullOrEmpty(_shareMessage)) return;\r\n\r\n            var task = new SmsComposeTask\r\n            {\r\n                Body = _shareMessage\r\n            };\r\n            task.Show();\r\n        }\r\n\r\n        public void ComposeEmail()\r\n        {\r\n            if (string.IsNullOrEmpty(_shareMessage)) return;\r\n\r\n            var task = new EmailComposeTask\r\n            {\r\n                Subject = AppResources.AppName,\r\n                Body = _shareMessage\r\n            };\r\n            task.Show();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/SnapshotsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class SnapshotsViewModel : TelegramPropertyChangedBase\r\n    {\r\n        public TLState State { get; set; }\r\n\r\n        public TLVector<TLDifferenceBase> Difference { get; set; } \r\n\r\n        public IList<SnapshotItem> Items { get; set; }\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        private readonly IUpdatesService _updateService;\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        public SnapshotsViewModel(ICacheService cacheService, IUpdatesService updateService, ITelegramEventAggregator eventAggregator)\r\n        {\r\n            Items = new ObservableCollection<SnapshotItem>();\r\n\r\n            _cacheService = cacheService;\r\n            _updateService = updateService;\r\n            _eventAggregator = eventAggregator;\r\n\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                try\r\n                {\r\n                    var currentState = _updateService.GetState();\r\n                    State = currentState;\r\n                    NotifyOfPropertyChange(() => State);\r\n\r\n                    var tempDifference = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLDifferenceBase>>(new object(), Telegram.Api.Constants.DifferenceFileName);\r\n                    Difference = tempDifference;\r\n                    NotifyOfPropertyChange(() => Difference);\r\n\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (store.DirectoryExists(Constants.SnapshotsDirectoryName))\r\n                        {\r\n                            foreach (var directory in store.GetDirectoryNames(Constants.SnapshotsDirectoryName + \"/*\"))\r\n                            {\r\n                                var item = new SnapshotItem {Name = directory};\r\n\r\n                                var stateFullFileName = Path.Combine(Path.Combine(Constants.SnapshotsDirectoryName, directory), Telegram.Api.Constants.StateFileName);\r\n                                if (store.FileExists(stateFullFileName))\r\n                                {\r\n                                    var state = TLUtils.OpenObjectFromMTProtoFile<TLState>(new object(), stateFullFileName);\r\n                                    item.State = state;\r\n                                }\r\n\r\n                                var differenceFullFileName = Path.Combine(Path.Combine(Constants.SnapshotsDirectoryName, directory), Telegram.Api.Constants.DifferenceFileName);\r\n                                if (store.FileExists(differenceFullFileName))\r\n                                {\r\n                                    long length;\r\n                                    var difference = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLDifferenceBase>>(new object(), differenceFullFileName, out length);\r\n                                    item.Difference = difference;\r\n                                    item.DifferenceLength = length;\r\n                                }\r\n\r\n                                Execute.BeginOnUIThread(() => Items.Add(item));\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Create()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var newSnapshotDirectoryName = DateTime.Now.ToString(\"dd-MM-yyyy_HH-mm-ss.fff\", CultureInfo.InvariantCulture);\r\n                var newSnapshotDirectoryFullName = Path.Combine(Constants.SnapshotsDirectoryName, newSnapshotDirectoryName);\r\n                var stateFullFileName = Path.Combine(newSnapshotDirectoryFullName, Telegram.Api.Constants.StateFileName);\r\n                try\r\n                {\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.DirectoryExists(Constants.SnapshotsDirectoryName))\r\n                        {\r\n                            store.CreateDirectory(Constants.SnapshotsDirectoryName);\r\n                        }\r\n                        store.CreateDirectory(newSnapshotDirectoryFullName);\r\n                    }\r\n\r\n                    _updateService.SaveStateSnapshot(newSnapshotDirectoryFullName);\r\n                    _cacheService.SaveSnapshot(newSnapshotDirectoryFullName);\r\n\r\n                    var state = TLUtils.OpenObjectFromMTProtoFile<TLState>(new object(), stateFullFileName);\r\n\r\n                    Execute.ShowDebugMessage(\"Snapshot has been successfully created\");\r\n                    Execute.BeginOnUIThread(() => Items.Add(new SnapshotItem{Name = newSnapshotDirectoryName, State = state}));\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    DeleteDirectory(newSnapshotDirectoryFullName);\r\n                }\r\n            });\r\n        }\r\n\r\n        public void CreateTemp()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var newSnapshotDirectoryName = DateTime.Now.ToString(\"dd-MM-yyyy_HH-mm-ss.fff\", CultureInfo.InvariantCulture);\r\n                var newSnapshotDirectoryFullName = Path.Combine(Constants.SnapshotsDirectoryName, newSnapshotDirectoryName);\r\n                var stateFullFileName = Path.Combine(newSnapshotDirectoryFullName, Telegram.Api.Constants.StateFileName);\r\n                var differenceFullFileName = Path.Combine(newSnapshotDirectoryFullName, Telegram.Api.Constants.DifferenceFileName);\r\n                try\r\n                {\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.DirectoryExists(Constants.SnapshotsDirectoryName))\r\n                        {\r\n                            store.CreateDirectory(Constants.SnapshotsDirectoryName);\r\n                        }\r\n                        store.CreateDirectory(newSnapshotDirectoryFullName);\r\n                    }\r\n\r\n                    _updateService.SaveStateSnapshot(newSnapshotDirectoryFullName);\r\n                    _cacheService.SaveTempSnapshot(newSnapshotDirectoryFullName);\r\n\r\n                    var state = TLUtils.OpenObjectFromMTProtoFile<TLState>(new object(), stateFullFileName);\r\n\r\n                    long length;\r\n                    var difference = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLDifferenceBase>>(new object(), differenceFullFileName, out length);\r\n\r\n                    Execute.ShowDebugMessage(\"Snapshot has been successfully created\");\r\n                    Execute.BeginOnUIThread(() => Items.Add(new SnapshotItem { Name = newSnapshotDirectoryName, State = state, Difference = difference, DifferenceLength = length }));\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    DeleteDirectory(newSnapshotDirectoryFullName);\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Apply(SnapshotItem item)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var snapshotDirectoryName = item.Name;\r\n                var snapshotDirectoryFullName = Path.Combine(Constants.SnapshotsDirectoryName, snapshotDirectoryName);\r\n                var stateFullFileName = Path.Combine(snapshotDirectoryFullName, Telegram.Api.Constants.StateFileName);\r\n                try\r\n                {\r\n                    _updateService.LoadStateSnapshot(snapshotDirectoryFullName);\r\n                    _cacheService.LoadSnapshot(snapshotDirectoryFullName);\r\n\r\n                    var currentState = _updateService.GetState();\r\n                    State = currentState;\r\n                    NotifyOfPropertyChange(() => State);\r\n\r\n                    Difference = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLDifferenceBase>>(new object(), Telegram.Api.Constants.DifferenceFileName);\r\n                    NotifyOfPropertyChange(() => Difference);\r\n\r\n                    _eventAggregator.Publish(new UpdateCompletedEventArgs());\r\n\r\n                    Execute.ShowDebugMessage(\"Snapshot has been successfully applied\");\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    \r\n                }\r\n            });\r\n        }\r\n\r\n        public void Delete(SnapshotItem item)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var deletingSnapshotDirectoryName = item.Name;\r\n                var deletingSnapshotDirectoryFullName = Path.Combine(Constants.SnapshotsDirectoryName, deletingSnapshotDirectoryName);\r\n\r\n                DeleteDirectory(deletingSnapshotDirectoryFullName);\r\n\r\n                Execute.BeginOnUIThread(() => Items.Remove(item));\r\n            });\r\n        }\r\n\r\n        private static void DeleteDirectory(string directory)\r\n        {\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (store.DirectoryExists(directory))\r\n                {\r\n                    foreach (var fileName in store.GetFileNames(directory + \"/*\"))\r\n                    {\r\n                        store.DeleteFile(Path.Combine(directory, fileName));\r\n                    }\r\n                    store.DeleteDirectory(directory);\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class SnapshotItem\r\n    {\r\n        public string Name { get; set; }\r\n\r\n        public TLState State { get; set; }\r\n\r\n        public TLVector<TLDifferenceBase> Difference { get; set; }\r\n\r\n        public long DifferenceLength { get; set; }\r\n\r\n        public string DifferenceString\r\n        {\r\n            get\r\n            {\r\n                if (Difference == null) return null;\r\n\r\n                return string.Format(\"{0} {1} bytes\", Difference.Count, DifferenceLength);\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return Name;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/SpecialThanksViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class SpecialThanksViewModel\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/StartupViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Auth;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class StartupViewModel : Screen\r\n    {\r\n        private readonly INavigationService _navigationService;\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        public StartupViewModel(INavigationService navigationService, IStateService stateService)\r\n        {\r\n            _navigationService = navigationService;\r\n            _stateService = stateService;\r\n        }\r\n\r\n        public void StartMessaging()\r\n        {\r\n            _stateService.ClearNavigationStack = true;\r\n            _navigationService.UriFor<SignInViewModel>().Navigate();\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;\r\n\r\n            if (_stateService.ClearNavigationStack)\r\n            {\r\n                _stateService.ClearNavigationStack = false;\r\n                while (_navigationService.RemoveBackEntry() != null) { }\r\n            }\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Enabled;\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/StickersViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.Views;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class StickersViewModel : ItemsViewModelBase<TLStickerSetBase>, \r\n        Telegram.Api.Aggregator.IHandle<DownloadableItem>, \r\n        Telegram.Api.Aggregator.IHandle<UpdateStickerSetsOrderEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UpdateStickerSetsEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UpdateNewStickerSetEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UpdateRemoveStickerSetEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UpdateReadFeaturedStickersEventArgs>\r\n    {\r\n        public StickersViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Status = AppResources.Loading;\r\n        }\r\n\r\n        private void UpdateShowStickersByEmojiSubtitle(ShowStickersByEmoji showStickers)\r\n        {\r\n            switch (showStickers)\r\n            {\r\n                case Telegram.Api.TL.ShowStickersByEmoji.AllSets:\r\n                    ShowStickersByEmojiSubtitle = AppResources.AllSets;\r\n                    break;\r\n                case Telegram.Api.TL.ShowStickersByEmoji.MySets:\r\n                    ShowStickersByEmojiSubtitle = AppResources.MySets;\r\n                    break;\r\n                case Telegram.Api.TL.ShowStickersByEmoji.None:\r\n                    ShowStickersByEmojiSubtitle = AppResources.None;\r\n                    break;\r\n            }\r\n        }\r\n\r\n        private void UpdateFeaturedSetsString(int count)\r\n        {\r\n            if (count == 0)\r\n            {\r\n                FeaturedStickersSubtitle = string.Empty;\r\n            }\r\n            if (count > 0)\r\n            {\r\n                FeaturedStickersSubtitle = string.Format(AppResources.NewFeaturedStickers, count);\r\n            }\r\n        }\r\n\r\n        private void UpdateArchivedSetsString(int count)\r\n        {\r\n            if (count == 0)\r\n            {\r\n                ArchivedStickersSubtitle = LowercaseConverter.Convert(AppResources.NoSets);\r\n            }\r\n            else if (count > 0)\r\n            {\r\n                ArchivedStickersSubtitle = Language.Declension(\r\n                    count,\r\n                    AppResources.SetNominativeSingular,\r\n                    AppResources.SetNominativePlural,\r\n                    AppResources.SetGenitiveSingular,\r\n                    AppResources.SetGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n        }\r\n\r\n        private string _showStickersByEmojiSubtitle = \" \";\r\n\r\n        public string ShowStickersByEmojiSubtitle\r\n        {\r\n            get { return _showStickersByEmojiSubtitle; }\r\n            set { SetField(ref _showStickersByEmojiSubtitle, value, () => ShowStickersByEmojiSubtitle); }\r\n        }\r\n\r\n        private string _featuredStickersSubtitle = \" \";\r\n\r\n        public string FeaturedStickersSubtitle\r\n        {\r\n            get { return _featuredStickersSubtitle; }\r\n            set { SetField(ref _featuredStickersSubtitle, value, () => FeaturedStickersSubtitle); }\r\n        }\r\n\r\n        private string _archivedStickersSubtitle = \" \";\r\n\r\n        public string ArchivedStickersSubtitle\r\n        {\r\n            get { return _archivedStickersSubtitle; }\r\n            set { SetField(ref _archivedStickersSubtitle, value, () => ArchivedStickersSubtitle); }\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            StateService.GetAllStickersAsync(cachedAllStickers => BeginOnUIThread(() =>\r\n            {\r\n                _allStickers = cachedAllStickers;\r\n\r\n                var allStickers = _allStickers as TLAllStickers43;\r\n                if (allStickers != null)\r\n                {\r\n                    UpdateShowStickersByEmojiSubtitle(allStickers.ShowStickersByEmoji);\r\n\r\n                    UpdateSets(allStickers, () => UpdateAllStickersAsync(allStickers));\r\n                    Status = string.Empty;\r\n                }\r\n                else\r\n                {\r\n                    UpdateAllStickersAsync(null);\r\n                }\r\n            }));\r\n\r\n            StateService.GetFeaturedStickersAsync(cachedFeaturedStickers => BeginOnUIThread(() =>\r\n            {\r\n                if (cachedFeaturedStickers != null)\r\n                {\r\n                    UpdateFeaturedSetsString(cachedFeaturedStickers.Unread.Count);\r\n                }\r\n\r\n                _featuredStickers = cachedFeaturedStickers;\r\n                \r\n                var featuredStickersHash = _featuredStickers != null\r\n                    ? _featuredStickers.HashValue\r\n                    : new TLInt(0);\r\n\r\n                MTProtoService.GetFeaturedStickersAsync(false, featuredStickersHash,\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        var featuredStickers = result as TLFeaturedStickers;\r\n                        if (featuredStickers != null)\r\n                        {\r\n                            if (_featuredStickers != null)\r\n                            {\r\n                                _featuredStickers.Unread = featuredStickers.Unread;\r\n                            }\r\n                            UpdateFeaturedSetsString(featuredStickers.Unread.Count);\r\n                        }\r\n                    }),\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.getFeaturedStickers error \" + error);\r\n                    });\r\n            }));\r\n\r\n            StateService.GetArchivedStickersAsync(cachedArchivedStickers => BeginOnUIThread(() =>\r\n            {\r\n                if (cachedArchivedStickers != null)\r\n                {\r\n                    UpdateArchivedSetsString(cachedArchivedStickers.Count.Value);\r\n                }\r\n\r\n                _archivedStickers = cachedArchivedStickers;\r\n\r\n                MTProtoService.GetArchivedStickersAsync(false, new TLLong(0), new TLInt(0),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        UpdateArchivedSetsString(result.Count.Value);\r\n                    }),\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.getArchivedStickers error \" + error);\r\n                    });\r\n            }));\r\n        }\r\n\r\n        public void ReorderStickerSets()\r\n        {\r\n            if (_allStickers == null) return;\r\n            if (_delayedItems != null && _delayedItems.Count > 0) return;\r\n\r\n            var oldHash = TLUtils.ToTLInt(_allStickers.Hash);\r\n            var newHash = TLUtils.GetAllStickersHash(Items);\r\n\r\n            if (oldHash.Value != newHash)\r\n            {\r\n                var order = new TLVector<TLLong>();\r\n                foreach (var item in Items)\r\n                {\r\n                    order.Add(item.Id);\r\n                }\r\n\r\n                Execute.ShowDebugMessage(\"ReorderStickers\");\r\n                IsWorking = true;\r\n                MTProtoService.ReorderStickerSetsAsync(false, order,\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        var allStickers = _allStickers as TLAllStickers32;\r\n                        if (allStickers != null)\r\n                        {\r\n                            allStickers.Hash = new TLString(newHash.ToString(CultureInfo.InvariantCulture));\r\n                            allStickers.Sets = new TLVector<TLStickerSetBase>(Items);\r\n                            var sets = new Dictionary<long, TLVector<TLDocumentBase>>();\r\n                            for (var i = 0; i < allStickers.Documents.Count; i++)\r\n                            {\r\n                                var document22 = allStickers.Documents[i] as TLDocument22;\r\n                                if (document22 != null)\r\n                                {\r\n                                    var stickerSetId = document22.StickerSet as TLInputStickerSetId;\r\n                                    if (stickerSetId != null)\r\n                                    {\r\n                                        TLVector<TLDocumentBase> stickers;\r\n                                        if (sets.TryGetValue(stickerSetId.Id.Value, out stickers))\r\n                                        {\r\n                                            stickers.Add(document22);\r\n                                        }\r\n                                        else\r\n                                        {\r\n                                            sets[stickerSetId.Id.Value] = new TLVector<TLDocumentBase>{ document22 };\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                            var documents = new TLVector<TLDocumentBase>();\r\n                            for (var i = 0; i < allStickers.Sets.Count; i++)\r\n                            {\r\n                                TLVector<TLDocumentBase> stickers;\r\n                                if (sets.TryGetValue(allStickers.Sets[i].Id.Value, out stickers))\r\n                                {\r\n                                    foreach (var sticker in stickers)\r\n                                    {\r\n                                        documents.Add(sticker);\r\n                                    }\r\n                                }\r\n                            }\r\n                            allStickers.Documents = documents;\r\n\r\n                            EmojiControl emojiControl;\r\n                            if (EmojiControl.TryGetInstance(out emojiControl))\r\n                            {\r\n                                emojiControl.ReorderStickerSets();\r\n                            }\r\n\r\n                            StateService.SaveAllStickersAsync(allStickers);\r\n                        }\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"messages.reorderStickerSets error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            BrowserNavigationService.MentionNavigated += OnMentionNavigated;\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            BrowserNavigationService.MentionNavigated -= OnMentionNavigated;\r\n\r\n            ReorderStickerSets();\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        private void OnMentionNavigated(object sender, TelegramMentionEventArgs e)\r\n        {\r\n            if (!string.IsNullOrEmpty(e.Mention))\r\n            {\r\n                var usernameStartIndex = e.Mention.LastIndexOf(\"@\", StringComparison.OrdinalIgnoreCase);\r\n                if (usernameStartIndex != -1)\r\n                {\r\n                    var username = e.Mention.Substring(usernameStartIndex).TrimStart('@');\r\n\r\n                    if (!string.IsNullOrEmpty(username))\r\n                    {\r\n                        TelegramViewBase.NavigateToUsername(MTProtoService, username, string.Empty, string.Empty, string.Empty);\r\n                    }\r\n                }\r\n            }\r\n            else if (e.UserId >= 0)\r\n            {\r\n                var user = CacheService.GetUser(new TLInt(e.UserId));\r\n                if (user != null)\r\n                {\r\n                    TelegramViewBase.NavigateToUser(user, null, PageKind.Profile);\r\n                }\r\n            }\r\n            else if (e.ChatId >= 0)\r\n            {\r\n                var chat = CacheService.GetChat(new TLInt(e.ChatId));\r\n                if (chat != null)\r\n                {\r\n                    TelegramViewBase.NavigateToChat(chat, string.Empty);\r\n                }\r\n            }\r\n            else if (e.ChannelId >= 0)\r\n            {\r\n                var channel = CacheService.GetChat(new TLInt(e.ChatId)) as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    TelegramViewBase.NavigateToChat(channel, string.Empty);\r\n                }\r\n            }\r\n        }\r\n\r\n        private readonly Dictionary<string, TLVector<TLStickerItem>> _stickerSets = new Dictionary<string, TLVector<TLStickerItem>>();\r\n\r\n        private readonly Dictionary<long, string> _emoticons = new Dictionary<long, string>();\r\n\r\n        private TLAllStickers _allStickers;\r\n\r\n        private TLFeaturedStickers _featuredStickers;\r\n\r\n        private TLArchivedStickers _archivedStickers;\r\n\r\n        private List<TLStickerSetBase> _delayedItems;\r\n\r\n        private void UpdateAllStickersAsync(TLAllStickers cachedStickers)\r\n        {\r\n            var hash = cachedStickers != null ? cachedStickers.Hash : TLString.Empty;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetAllStickersAsync(hash,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(result.ToString());\r\n\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n\r\n                    var allStickers = result as TLAllStickers43;\r\n                    if (allStickers != null)\r\n                    {\r\n                        Items.Clear();\r\n\r\n                        var cachedStickers29 = cachedStickers as TLAllStickers29;\r\n                        if (cachedStickers29 != null)\r\n                        {\r\n                            allStickers.ShowStickersTab = cachedStickers29.ShowStickersTab;\r\n                            allStickers.RecentlyUsed = cachedStickers29.RecentlyUsed;\r\n                            allStickers.Date = TLUtils.DateToUniversalTimeTLInt(0, DateTime.Now);\r\n                        }\r\n                        var cachedStickers43 = cachedStickers as TLAllStickers43;\r\n                        if (cachedStickers43 != null)\r\n                        {\r\n                            allStickers.RecentStickers = cachedStickers43.RecentStickers;\r\n                            allStickers.FavedStickers = cachedStickers43.FavedStickers;\r\n                        }\r\n\r\n                        cachedStickers = allStickers;\r\n                        StateService.SaveAllStickersAsync(cachedStickers);\r\n\r\n                        UpdateSets(allStickers, () => { });\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.getAllStickers error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void Remove(TLStickerSet set)\r\n        {\r\n            if (set == null) return;\r\n            var inputSet = new TLInputStickerSetId { Id = set.Id, AccessHash = set.AccessHash };\r\n\r\n            IsWorking = true;\r\n            MTProtoService.UninstallStickerSetAsync(inputSet,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Items.Remove(set);\r\n\r\n                    var shellViewModel = IoC.Get<ShellViewModel>();\r\n                    shellViewModel.RemoveStickerSet(set, inputSet);\r\n\r\n                    MTProtoService.SetMessageOnTime(2.0, AppResources.StickersRemoved);\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.uninstallStickerSet error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void Archive(TLStickerSet set)\r\n        {\r\n            var set32 = set as TLStickerSet32;\r\n            if (set32 == null) return;\r\n\r\n            var inputStickerSet = new TLInputStickerSetId { Id = set32.Id, AccessHash = set32.AccessHash };\r\n            IsWorking = true;\r\n            MTProtoService.InstallStickerSetAsync(inputStickerSet, TLBool.True,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    set32.Archived = true;\r\n                    Items.Remove(set32);\r\n\r\n                    var allStickers43 = StateService.GetAllStickers() as TLAllStickers43;\r\n                    TLMessagesStickerSet messagesSet = null;\r\n                    if (allStickers43 != null)\r\n                    {\r\n                        messagesSet = TLUtils.RemoveStickerSet(allStickers43, set32);\r\n                        StateService.SaveAllStickersAsync(allStickers43);\r\n                    }\r\n\r\n                    if (messagesSet != null)\r\n                    {\r\n                        var archivedStickers = StateService.GetArchivedStickers();\r\n                        if (archivedStickers != null)\r\n                        {\r\n                            TLUtils.AddStickerSetCovered(archivedStickers, messagesSet, archivedStickers.SetsCovered, new TLStickerSetCovered{ Cover = messagesSet.Documents.FirstOrDefault() ?? new TLDocumentEmpty { Id = new TLLong(0) }, StickerSet = messagesSet.Set });\r\n                            archivedStickers.Count.Value = archivedStickers.Sets.Count;\r\n\r\n                            UpdateArchivedSetsString(archivedStickers.Count.Value);\r\n\r\n                            StateService.SaveArchivedStickersAsync(archivedStickers);\r\n                        }\r\n                    }\r\n\r\n                    //EventAggregator.Publish(new UpdateStickerSetsEventArgs(allStickers43));\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.installStickerSet error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void CopyLink(TLStickerSet set)\r\n        {\r\n            if (set == null) return;\r\n\r\n            var shortName = set.ShortName.ToString();\r\n            if (string.IsNullOrEmpty(shortName)) return;\r\n\r\n            var addStickersLink = string.Format(Constants.AddStickersLinkPlaceholder, shortName);\r\n\r\n            Clipboard.SetText(addStickersLink);\r\n            MTProtoService.SetMessageOnTime(2.0, AppResources.LinkCopiedToClipboard);\r\n        }\r\n\r\n        public void Share(TLStickerSet set)\r\n        {\r\n            if (set == null) return;\r\n\r\n            var shortName = set.ShortName.ToString();\r\n            if (string.IsNullOrEmpty(shortName)) return;\r\n\r\n            var addStickersLink = string.Format(Constants.AddStickersLinkPlaceholder, shortName);\r\n\r\n            StateService.ShareLink = addStickersLink;\r\n            StateService.ShareMessage = addStickersLink;\r\n            StateService.ShareCaption = AppResources.Share;\r\n            NavigationService.UriFor<ShareViewModel>().Navigate();\r\n        }\r\n\r\n        private void UpdateSets(TLAllStickers29 allStickers, System.Action callback)\r\n        {\r\n            _allStickers = allStickers;\r\n\r\n            _emoticons.Clear();\r\n            _stickerSets.Clear();\r\n\r\n            for (var i = 0; i < allStickers.Documents.Count; i++)\r\n            {\r\n                var document22 = allStickers.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        TLVector<TLStickerItem> stickers;\r\n                        if (_stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(new TLStickerItem { Document = document22 });\r\n                        }\r\n                        else\r\n                        {\r\n                            _stickerSets[setId] = new TLVector<TLStickerItem> { new TLStickerItem { Document = document22 } };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            Items.Clear();\r\n\r\n            var firstChunkSize = 10;\r\n            var count = 0;\r\n            _delayedItems = new List<TLStickerSetBase>();\r\n            for (var i = 0; i < allStickers.Sets.Count; i++)\r\n            {\r\n                var set = allStickers.Sets[i];\r\n                var setName = set.Id.ToString();\r\n                TLVector<TLStickerItem> stickers;\r\n                if (_stickerSets.TryGetValue(setName, out stickers))\r\n                {\r\n\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        objects.Add(sticker);\r\n                    }\r\n\r\n                    set.Stickers = objects;\r\n                    if (set.Stickers.Count > 0)\r\n                    {\r\n                        if (count < firstChunkSize)\r\n                        {\r\n                            Items.Add(set);\r\n                            count++;\r\n                        }\r\n                        else\r\n                        {\r\n                            _delayedItems.Add(set);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            AddItemsChunk(25, _delayedItems, callback);\r\n        }\r\n\r\n        private void AddItemsChunk(int chunkSize, List<TLStickerSetBase> delayedItems, System.Action callback)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < delayedItems.Count && i < chunkSize; i++)\r\n                {\r\n                    Items.Add(delayedItems[0]);\r\n                    delayedItems.RemoveAt(0);\r\n                }\r\n\r\n                if (delayedItems.Count > 0)\r\n                {\r\n                    AddItemsChunk(25, delayedItems, callback);\r\n                }\r\n                else\r\n                {\r\n                    callback.SafeInvoke();\r\n                }\r\n            });\r\n        }\r\n\r\n        public void ShowStickersByEmoji()\r\n        {\r\n            var content = new StackPanel();\r\n\r\n            var allStickers = _allStickers as TLAllStickers43;\r\n\r\n            var allSets = new RadioButton { Content = AppResources.AllSets, IsChecked = allStickers != null && allStickers.ShowStickersByEmoji == Telegram.Api.TL.ShowStickersByEmoji.AllSets };\r\n            var mySets = new RadioButton { Content = AppResources.MySets, IsChecked = allStickers != null && allStickers.ShowStickersByEmoji == Telegram.Api.TL.ShowStickersByEmoji.MySets };\r\n            var none = new RadioButton { Content = AppResources.None, IsChecked = allStickers != null && allStickers.ShowStickersByEmoji == Telegram.Api.TL.ShowStickersByEmoji.None };\r\n\r\n            content.Children.Add(allSets);\r\n            content.Children.Add(mySets);\r\n            content.Children.Add(none);\r\n\r\n            ShellViewModel.ShowCustomMessageBox(string.Empty, AppResources.SuggestStickersByEmoji, AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                r =>\r\n                {\r\n                    if (r == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        if (allStickers != null)\r\n                        {\r\n                            if (allSets.IsChecked == true)\r\n                            {\r\n                                allStickers.ShowStickersByEmoji = Telegram.Api.TL.ShowStickersByEmoji.AllSets;\r\n                            }\r\n                            else if (mySets.IsChecked == true)\r\n                            {\r\n                                allStickers.ShowStickersByEmoji = Telegram.Api.TL.ShowStickersByEmoji.MySets;\r\n                            }\r\n                            else\r\n                            {\r\n                                allStickers.ShowStickersByEmoji = Telegram.Api.TL.ShowStickersByEmoji.None;\r\n                            }\r\n\r\n                            UpdateShowStickersByEmojiSubtitle(allStickers.ShowStickersByEmoji);\r\n\r\n                            StateService.SaveAllStickersAsync(allStickers);\r\n                        }\r\n                    }\r\n                },\r\n                content);\r\n        }\r\n\r\n        public void OpenFeaturedStickers()\r\n        {\r\n            NavigationService.UriFor<FeaturedStickersViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenMasks()\r\n        {\r\n            NavigationService.UriFor<MasksViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenArchivedStickers()\r\n        {\r\n            NavigationService.UriFor<ArchivedStickersViewModel>().Navigate();\r\n        }\r\n\r\n        public void ClearRecentStickers()\r\n        {\r\n            IsWorking = true;\r\n            MTProtoService.ClearRecentStickersAsync(\r\n                false,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    MTProtoService.SetMessageOnTime(2.0, AppResources.Done);\r\n\r\n                    var allStickers = StateService.GetAllStickers();\r\n                    if (allStickers != null)\r\n                    {\r\n                        var allStickers29 = allStickers as TLAllStickers29;\r\n                        if (allStickers29 != null)\r\n                        {\r\n                            allStickers29.RecentlyUsed = new TLVector<TLRecentlyUsedSticker>();\r\n                            EmojiControl emojiControl;\r\n                            if (EmojiControl.TryGetInstance(out emojiControl))\r\n                            {\r\n                                emojiControl.ClearRecentStickers();\r\n                            }\r\n                            StateService.SaveAllStickersAsync(allStickers29);\r\n                        }\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.clearRecentStickers error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var sticker = item.Owner as TLStickerItem;\r\n            if (sticker != null)\r\n            {\r\n                sticker.NotifyOfPropertyChange(() => sticker.Self);\r\n            }\r\n        }\r\n\r\n        public void Handle(UpdateStickerSetsOrderEventArgs args)\r\n        {\r\n            if (args.Masks) return;\r\n\r\n            // ui thread\r\n            UpdateSets(args.AllStickers, () => { });\r\n        }\r\n\r\n        public void Handle(UpdateStickerSetsEventArgs args)\r\n        {\r\n            if (args.Masks) return;\r\n\r\n            // ui thread\r\n            UpdateSets(args.AllStickers, () => { });\r\n        }\r\n\r\n        public void Handle(UpdateNewStickerSetEventArgs args)\r\n        {\r\n            if (args.Masks) return;\r\n\r\n            // ui thread\r\n            UpdateSets(args.AllStickers, () => { });\r\n        }\r\n\r\n        public void Handle(UpdateRemoveStickerSetEventArgs args)\r\n        {\r\n            // ui thread\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (Items[i].Id.Value == args.StickerSet.Id.Value)\r\n                {\r\n                    Items.RemoveAt(i);\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(UpdateReadFeaturedStickersEventArgs args)\r\n        {\r\n            // ui thread\r\n            UpdateFeaturedSetsString(0);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Additional/WebViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Windows.Data.Json;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class WebViewModel : Screen\r\n    {\r\n        public Uri Url { get; set; }\r\n\r\n        public string GameTitle { get; set; }\r\n\r\n        public string Subtitle { get; set; }\r\n\r\n        private readonly TLUser _sharedContact;\r\n\r\n        private readonly List<TLMessageBase> _forwardMessages;\r\n\r\n        private readonly TLBotCallbackAnswer _botCallbackAnswer;\r\n\r\n        private readonly TLGame _game;\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        private readonly INavigationService _navigationService;\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        private readonly TLInputPeerBase _inputPeer;\r\n\r\n        private OutputTypingManager _gamePlayingManager;\r\n\r\n        public OutputTypingManager GamePlayingManager\r\n        {\r\n            get\r\n            {\r\n                return _gamePlayingManager =\r\n                    _gamePlayingManager ??\r\n                    new OutputTypingManager(_inputPeer, Constants.SetTypingIntervalInSeconds,\r\n                        action => _mtProtoService.SetTypingAsync(_inputPeer, action ?? new TLSendMessageGamePlayAction(), result => { }),\r\n                        () => _mtProtoService.SetTypingAsync(_inputPeer, new TLSendMessageCancelAction(), result => { }));\r\n            }\r\n        }\r\n\r\n        private readonly Timer _timer;\r\n\r\n        public WebViewModel(IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService)\r\n        {\r\n            _stateService = stateService;\r\n            _navigationService = navigationService;\r\n            _mtProtoService = mtProtoService;\r\n\r\n            _sharedContact = stateService.SharedContact as TLUser;\r\n            stateService.SharedContact = null;\r\n\r\n            var userName = _sharedContact as IUserName;\r\n            if (userName != null && !TLString.IsNullOrEmpty(userName.UserName))\r\n            {\r\n                Subtitle = \"@\" + userName.UserName;\r\n            }\r\n\r\n            _botCallbackAnswer = stateService.BotCallbackAnswer;\r\n            stateService.BotCallbackAnswer = null;\r\n\r\n            _forwardMessages = stateService.ForwardMessages;\r\n            stateService.ForwardMessages = null;\r\n\r\n            var botCallbackAnswer54 = _botCallbackAnswer as TLBotCallbackAnswer54;\r\n            if (botCallbackAnswer54 != null)\r\n            {\r\n                Url = new Uri(botCallbackAnswer54.Url.ToString(), UriKind.RelativeOrAbsolute);\r\n#if DEBUG\r\n\r\n                Clipboard.SetText(botCallbackAnswer54.Url.ToString());\r\n                MessageBox.Show(botCallbackAnswer54.Url.ToString());\r\n#endif\r\n            }\r\n\r\n            _game = stateService.Game;\r\n            stateService.Game = null;\r\n\r\n            if (_game != null)\r\n            {\r\n                GameTitle = _game.Title.ToString();\r\n            }\r\n\r\n            _inputPeer = stateService.InputPeer;\r\n            stateService.InputPeer = null;\r\n\r\n            _timer = new Timer(OnTimerTick);\r\n        }\r\n\r\n        private void OnTimerTick(object state)\r\n        {\r\n            GamePlayingManager.SetTyping();\r\n\r\n            _timer.Change(TimeSpan.FromSeconds(8.0), Timeout.InfiniteTimeSpan);\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            OnTimerTick(_timer);\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            _timer.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);\r\n\r\n            GamePlayingManager.CancelTyping();\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        public void ScriptNotify(string value)\r\n        {\r\n            try\r\n            {\r\n                var obj = JsonObject.Parse(value);\r\n                IJsonValue eventType;\r\n                if (obj.TryGetValue(\"eventType\", out eventType))\r\n                {\r\n                    IJsonValue eventData;\r\n                    if (obj.TryGetValue(\"eventData\", out eventData))\r\n                    {\r\n\r\n                    }\r\n\r\n                    if (string.Equals(eventType.GetString(), \"share_game\", StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        if (_sharedContact == null) return;\r\n                        if (_game == null) return;\r\n\r\n                        _stateService.GameString = _game.ShortName.ToString();\r\n                        _stateService.SharedContact = _sharedContact;\r\n                        _navigationService.UriFor<ChooseDialogViewModel>().Navigate();\r\n\r\n                        return;\r\n                    }\r\n\r\n                    if (string.Equals(eventType.GetString(), \"share_score\", StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        Share();\r\n\r\n                        return;\r\n                    }\r\n\r\n                    if (string.Equals(eventType.GetString(), \"game_over\", StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        MessageBox.Show(\"Game over!\");\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                MessageBox.Show(value);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"WebViewModel.ScriptNotify {0} exception {1}\", value, ex));\r\n            }\r\n        }\r\n\r\n        public void Share()\r\n        {\r\n            if (_forwardMessages == null) return;\r\n\r\n            _stateService.WithMyScore = true;\r\n            _stateService.ForwardMessages = _forwardMessages;\r\n            _navigationService.UriFor<ChooseDialogViewModel>().Navigate();\r\n        }\r\n\r\n        public void CopyLink()\r\n        {\r\n            if (_sharedContact == null || TLString.IsNullOrEmpty(_sharedContact.UserName)) return;\r\n\r\n            var link = string.Format(Constants.UsernameLinkPlaceholder, _sharedContact.UserName);\r\n            if (_game != null\r\n                && !TLString.IsNullOrEmpty(_game.ShortName))\r\n            {\r\n                link += \"?game=\" + _game.ShortName;\r\n            }\r\n\r\n            Clipboard.SetText(link);\r\n            MessageBox.Show(AppResources.CopyLinkHint);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Auth/CancelConfirmResetViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing ErrorType = Telegram.Api.TL.ErrorType;\r\n\r\nnamespace TelegramClient.ViewModels.Auth\r\n{\r\n    public class CancelConfirmResetViewModel : ViewModelBase, Telegram.Api.Aggregator.IHandle<string>\r\n    {\r\n        private DateTime _startTime;\r\n\r\n        private readonly DispatcherTimer _callTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(0.5) };\r\n\r\n        private int _timeCounter = Constants.SendCallDefaultTimeout;\r\n\r\n        public int TimeCounter\r\n        {\r\n            get { return _timeCounter; }\r\n            set\r\n            {\r\n                SetField(ref _timeCounter, value, () => TimeCounter);\r\n            }\r\n        }\r\n\r\n        private string _timeCounterString = \" \";\r\n\r\n        public string TimeCounterString\r\n        {\r\n            get { return _timeCounterString; }\r\n            set { SetField(ref _timeCounterString, value, () => TimeCounterString); }\r\n        }\r\n\r\n        private string _code;\r\n\r\n        public string Code\r\n        {\r\n            get { return _code; }\r\n            set { SetField(ref _code, value, () => Code); }\r\n        }\r\n\r\n        private Visibility _helpVisibility = Visibility.Collapsed;\r\n\r\n        public Visibility HelpVisibility\r\n        {\r\n            get { return _helpVisibility; }\r\n            set { SetField(ref _helpVisibility, value, () => HelpVisibility); }\r\n        }\r\n\r\n        private Visibility _resendCodeVisibility = Visibility.Collapsed;\r\n\r\n        public Visibility ResendCodeVisibility\r\n        {\r\n            get { return _resendCodeVisibility; }\r\n            set { SetField(ref _resendCodeVisibility, value, () => ResendCodeVisibility); }\r\n        }\r\n\r\n        public string Subtitle { get; set; }\r\n\r\n        public DebugViewModel Debug { get; private set; }\r\n\r\n        public TLInt Timeout { get; set; }\r\n\r\n        private bool _changePhoneNumber;\r\n\r\n        private IExtendedDeviceInfoService _extendedDeviceInfoService;\r\n\r\n        public int CodeLength { get; set; }\r\n\r\n        private TLSentCodeTypeBase _type;\r\n\r\n        private TLCodeTypeBase _nextType;\r\n\r\n        private string _debugString;\r\n\r\n        public string DebugString\r\n        {\r\n            get { return _debugString; }\r\n            set { SetField(ref _debugString, value, () => DebugString); }\r\n        }\r\n\r\n        private TLSentCodeBase _sentCode;\r\n\r\n        public CancelConfirmResetViewModel(IExtendedDeviceInfoService extendedDeviceInfoService, DebugViewModel debug, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _extendedDeviceInfoService = extendedDeviceInfoService;\r\n#if DEBUG\r\n            HelpVisibility = Visibility.Visible;\r\n#endif\r\n            _type = stateService.Type;\r\n            stateService.Type = null;\r\n            _nextType = stateService.NextType;\r\n            stateService.NextType = null;\r\n            Subtitle = GetSubtitle();\r\n\r\n            var length = _type as ILength;\r\n            CodeLength = length != null ? length.Length.Value : Constants.DefaultCodeLength;\r\n\r\n            Timeout = stateService.SendCallTimeout;\r\n            ResendCodeVisibility = stateService.SendCallTimeout != null && stateService.SendCallTimeout.Value > 0\r\n                ? Visibility.Collapsed\r\n                : Visibility.Visible;\r\n\r\n            UpdateDebugString();\r\n\r\n            EventAggregator.Subscribe(this);\r\n            SuppressUpdateStatus = true;\r\n\r\n            Debug = debug;\r\n\r\n            if (StateService.ChangePhoneNumber)\r\n            {\r\n                _changePhoneNumber = true;\r\n                StateService.ChangePhoneNumber = false;\r\n            }\r\n\r\n            _sentCode = StateService.SentCode;\r\n            StateService.SentCode = null;\r\n\r\n            //_updatesService = updatesService;\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Code))\r\n                {\r\n                    NotifyOfPropertyChange(() => CanConfirm);\r\n\r\n                    if (!string.IsNullOrEmpty(Code) && Code.Length == CodeLength)\r\n                    {\r\n                        Confirm();\r\n                    }\r\n                }\r\n            };\r\n\r\n            _callTimer.Tick += (sender, args) =>\r\n            {\r\n                _timeCounter = Timeout == null ? 0 : (int)(Timeout.Value - (DateTime.Now - _startTime).TotalSeconds);\r\n\r\n                if (_timeCounter > 0)\r\n                {\r\n#if DEBUG\r\n                    TimeCounterString = _timeCounter.ToString(CultureInfo.InvariantCulture);\r\n#endif\r\n\r\n                    if (_nextType is TLCodeTypeCall)\r\n                    {\r\n                        TimeCounterString = string.Format(AppResources.WeWillCallYou, TimeSpan.FromSeconds(TimeCounter).ToString(@\"m\\:ss\"));\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    _timeCounter = 0;\r\n                    if (_nextType is TLCodeTypeCall)\r\n                    {\r\n                        TimeCounterString = AppResources.TelegramDialedYourNumber;\r\n                    }\r\n\r\n                    HelpVisibility = Visibility.Visible;\r\n                    ResendCodeVisibility = Visibility.Visible;\r\n                    _callTimer.Stop();\r\n                }\r\n\r\n                NotifyOfPropertyChange(() => TimeCounter);\r\n            };\r\n        }\r\n\r\n        private bool _isResending;\r\n\r\n        public void Resend()\r\n        {\r\n            if (_isResending)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_nextType == null)\r\n            {\r\n                SendMail();\r\n                return;\r\n            }\r\n\r\n            _isResending = true;\r\n            IsWorking = true;\r\n            MTProtoService.ResendCodeAsync(StateService.PhoneNumber, StateService.PhoneCodeHash,\r\n                sentCode => BeginOnUIThread(() =>\r\n                {\r\n                    _isResending = false;\r\n                    IsWorking = false;\r\n\r\n                    _sentCode = sentCode;\r\n                    StateService.PhoneCodeHash = sentCode.PhoneCodeHash;\r\n                    StateService.PhoneRegistered = sentCode.PhoneRegistered;\r\n\r\n                    Timeout = sentCode.SendCallTimeout;\r\n                    ResendCodeVisibility = Timeout != null && Timeout.Value > 0\r\n                        ? Visibility.Collapsed\r\n                        : Visibility.Visible;\r\n\r\n                    var sentCode50 = sentCode as TLSentCode50;\r\n                    if (sentCode50 != null)\r\n                    {\r\n                        _type = sentCode50.Type;\r\n                        _nextType = sentCode50.NextType;\r\n\r\n                        Subtitle = GetSubtitle();\r\n                        NotifyOfPropertyChange(() => Subtitle);\r\n\r\n                        var length = _type as ILength;\r\n                        CodeLength = length != null ? length.Length.Value : Constants.DefaultCodeLength;\r\n                        NotifyOfPropertyChange(() => CodeLength);\r\n                    }\r\n\r\n                    UpdateDebugString();\r\n\r\n                    _startTime = DateTime.Now;\r\n                    _callTimer.Start();\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _isResending = false;\r\n                    IsWorking = false;\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"auth.resendCode error \" + error);\r\n                }));\r\n        }\r\n\r\n        private void UpdateDebugString()\r\n        {\r\n#if DEBUG\r\n            DebugString = string.Format(\"next_type={0} timeout={1} code_length={2}\", _nextType, Timeout, CodeLength);\r\n#endif\r\n        }\r\n\r\n        private string GetSubtitle()\r\n        {\r\n            var user = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n            if (user == null) return string.Empty;\r\n\r\n            return string.Format(AppResources.CancelAccountResetDescription, \"+\" + user.Phone);\r\n        }\r\n\r\n        public bool CanConfirm\r\n        {\r\n            get { return !string.IsNullOrEmpty(Code); }\r\n        }\r\n\r\n        private TLRPCError _lastError;\r\n\r\n        public void Confirm()\r\n        {\r\n            if (_changePhoneNumber)\r\n            {\r\n                ConfirmChangePhoneNumber();\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            StateService.PhoneCode = new TLString(Code);\r\n\r\n            MTProtoService.ConfirmPhoneAsync(\r\n                StateService.PhoneCodeHash, StateService.PhoneCode,\r\n                auth => BeginOnUIThread(() =>\r\n                {\r\n                    var currentUser = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n                    if (currentUser != null)\r\n                    {\r\n                        MessageBox.Show(string.Format(AppResources.CancelAccountResetSuccess, \"+\" + currentUser.Phone), AppResources.Success, MessageBoxButton.OK);\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    NavigationService.GoBack();\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _lastError = error;\r\n                    IsWorking = false;\r\n                    if (error.TypeEquals(ErrorType.PHONE_NUMBER_UNOCCUPIED))\r\n                    {\r\n                        _callTimer.Stop();\r\n                        StateService.ClearNavigationStack = true;\r\n                        StateService.SentCode = _sentCode;\r\n                        NavigationService.UriFor<SignUpViewModel>().Navigate();\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_INVALID))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_EMPTY))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeEmpty, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_EXPIRED))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeExpiredString, AppResources.Error, MessageBoxButton.OK);\r\n                        OnBackKeyPress();\r\n                        NavigationService.GoBack();\r\n                    }\r\n                    else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.signIn error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private void ConfirmChangePhoneNumber()\r\n        {\r\n            IsWorking = true;\r\n            StateService.PhoneCode = new TLString(Code);\r\n\r\n            MTProtoService.ChangePhoneAsync(\r\n                StateService.PhoneNumber, StateService.PhoneCodeHash, StateService.PhoneCode,\r\n                auth => BeginOnUIThread(() =>\r\n                {\r\n                    TLUtils.IsLogEnabled = false;\r\n                    TLUtils.LogItems.Clear();\r\n\r\n                    TimeCounterString = string.Empty;\r\n                    HelpVisibility = Visibility.Collapsed;\r\n                    _callTimer.Stop();\r\n\r\n\r\n                    _isProcessing = false;\r\n                    auth.NotifyOfPropertyChange(() => auth.Phone);\r\n                    NavigationService.RemoveBackEntry();\r\n                    NavigationService.GoBack();\r\n                    IsWorking = false;\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _lastError = error;\r\n                    IsWorking = false;\r\n                    if (error.TypeEquals(ErrorType.PHONE_NUMBER_UNOCCUPIED))\r\n                    {\r\n                        _callTimer.Stop();\r\n                        StateService.ClearNavigationStack = true;\r\n                        StateService.SentCode = _sentCode;\r\n                        NavigationService.UriFor<SignUpViewModel>().Navigate();\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_INVALID))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_EMPTY))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeEmpty, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_EXPIRED))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeExpiredString, AppResources.Error, MessageBoxButton.OK);\r\n                        OnBackKeyPress();\r\n                        NavigationService.GoBack();\r\n                    }\r\n                    else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else\r\n                    {\r\n#if DEBUG\r\n                        MessageBox.Show(error.ToString());\r\n#endif\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void Handle(string command)\r\n        {\r\n            if (string.Equals(command, Commands.LogOutCommand))\r\n            {\r\n                Code = string.Empty;\r\n                IsWorking = false;\r\n                HelpVisibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        private bool _isProcessing;\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (_isProcessing) return;\r\n\r\n            _isProcessing = true;\r\n\r\n            Subtitle = GetSubtitle();\r\n\r\n            if (Timeout != null)\r\n            {\r\n                TimeCounter = Timeout.Value;\r\n            }\r\n            _startTime = DateTime.Now;\r\n            _callTimer.Start();\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void OnBackKeyPress()\r\n        {\r\n            _isProcessing = false;\r\n            Code = string.Empty;\r\n            _callTimer.Stop();\r\n            TimeCounterString = \" \";\r\n#if DEBUG\r\n            HelpVisibility = Visibility.Visible;\r\n#else\r\n            HelpVisibility = Visibility.Collapsed;\r\n#endif\r\n        }\r\n\r\n        public string Email\r\n        {\r\n            get { return Constants.LogEmail; }\r\n        }\r\n\r\n        public void SendMail()\r\n        {\r\n            var logBuilder = new StringBuilder();\r\n            foreach (var item in TLUtils.LogItems)\r\n            {\r\n                logBuilder.AppendLine(item);\r\n            }\r\n\r\n            var body = new StringBuilder();\r\n            body.AppendLine();\r\n            body.AppendLine();\r\n            body.AppendLine(\"Page: Confirm Code\");\r\n            body.AppendLine(\"Phone: \" + \"+\" + StateService.PhoneNumber);\r\n            body.AppendLine(\"App version: \" + _extendedDeviceInfoService.AppVersion);\r\n            body.AppendLine(\"OS version: \" + _extendedDeviceInfoService.SystemVersion);\r\n            body.AppendLine(\"Device Name: \" + _extendedDeviceInfoService.Model);\r\n            body.AppendLine(\"Location: \" + Telegram.Api.Helpers.Utils.CurrentUICulture());\r\n            body.AppendLine(\"Wi-Fi: \" + _extendedDeviceInfoService.IsWiFiEnabled);\r\n            body.AppendLine(\"Mobile Network: \" + _extendedDeviceInfoService.IsCellularDataEnabled);\r\n            body.AppendLine(\"Last error: \" + ((_lastError != null) ? _lastError.ToString() : null));\r\n            body.AppendLine(\"Log\" + Environment.NewLine + logBuilder);\r\n\r\n            var task = new EmailComposeTask();\r\n            task.Body = body.ToString();\r\n            task.To = Constants.LogEmail;\r\n            task.Subject = \"WP registration/login issue (\" + _extendedDeviceInfoService.AppVersion + \", Code) \" + StateService.PhoneNumber;\r\n            task.Show();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            //_callTimer.Stop();\r\n            base.OnDeactivate(close);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Auth/ConfirmPasswordViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Security.Cryptography;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Auth\r\n{\r\n    public class ConfirmPasswordViewModel : ViewModelBase\r\n    {\r\n        private Visibility _resetAccountVisibility = Visibility.Collapsed;\r\n\r\n        public Visibility ResetAccountVisibility\r\n        {\r\n            get { return _resetAccountVisibility; }\r\n            set { SetField(ref _resetAccountVisibility, value, () => ResetAccountVisibility); }\r\n        }\r\n\r\n        private string _code;\r\n\r\n        public string Code\r\n        {\r\n            get { return _code; }\r\n            set { SetField(ref _code, value, () => Code); }\r\n        }\r\n\r\n        private TLPassword _password;\r\n\r\n        public string PasswordHint { get; set; }\r\n\r\n        private readonly TLSentCodeBase _sentCode;\r\n\r\n        public ConfirmPasswordViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _password = StateService.Password as TLPassword;\r\n            StateService.Password = null;\r\n\r\n            _sentCode = StateService.SentCode;\r\n            StateService.SentCode = null;\r\n\r\n            if (_password != null)\r\n            {\r\n                PasswordHint = !TLString.IsNullOrEmpty(_password.Hint) ? _password.Hint.ToString() : string.Empty;\r\n            }\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Code))\r\n                {\r\n                    NotifyOfPropertyChange(() => CanConfirm);\r\n                }\r\n            };\r\n        }\r\n\r\n        public bool CanConfirm\r\n        {\r\n            get { return !string.IsNullOrEmpty(Code); }\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n\r\n        public void Confirm()\r\n        {\r\n            if (_password == null) return;\r\n            if (!CanConfirm) return;\r\n\r\n            var password84 = _password as TLPassword84;\r\n            if (password84 == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var algo = password84.CurrentAlgo as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n            if (algo == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"auth.checkPassword\");\r\n#endif\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                //var passwordHash = Utils.Password.GetHash(_password.CurrentSalt, new TLString(Code));\r\n                var passwordHash = SRP.GetX(new TLString(Code), algo);\r\n                var password = SRP.GetCheck(passwordHash, password84.SRPId, password84.SRPB, algo);\r\n\r\n                MTProtoService.CheckPasswordAsync(\r\n                    password,\r\n                    auth => BeginOnUIThread(() =>\r\n                    {\r\n#if LOG_REGISTRATION\r\n                        TLUtils.WriteLog(\"auth.checkPassword result \" + auth);\r\n                        TLUtils.WriteLog(\"TLUtils.IsLogEnabled=false\");\r\n#endif\r\n\r\n                        TLUtils.IsLogEnabled = false;\r\n                        TLUtils.LogItems.Clear();\r\n\r\n                        var result = MessageBox.Show(\r\n                            AppResources.ConfirmPushMessage,\r\n                            AppResources.ConfirmPushTitle,\r\n                            MessageBoxButton.OKCancel);\r\n\r\n                        if (result != MessageBoxResult.OK)\r\n                        {\r\n                            Notifications.Disable();\r\n                        }\r\n                        else\r\n                        {\r\n                            Notifications.Enable();\r\n                        }\r\n\r\n                        ConfirmViewModel.UpdateNotificationsAsync(MTProtoService, StateService);\r\n\r\n                        MTProtoService.SetInitState();\r\n                        StateService.CurrentUserId = auth.User.Index;\r\n                        StateService.FirstRun = true;\r\n                        SettingsHelper.SetValue(Constants.IsAuthorizedKey, true);\r\n\r\n                        ShellViewModel.Navigate(NavigationService);\r\n\r\n                        IsWorking = false;\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n#if LOG_REGISTRATION\r\n                        TLUtils.WriteLog(\"auth.checkPassword error \" + error);\r\n#endif\r\n                        IsWorking = false;\r\n                        if (error.TypeEquals(ErrorType.PASSWORD_HASH_INVALID))\r\n                        {\r\n                            MTProtoService.GetPasswordAsync(\r\n                                result1 => BeginOnUIThread(() =>\r\n                                {\r\n                                    _password = result1 as TLPassword84;\r\n                                    MessageBox.Show(AppResources.PasswordInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                                }),\r\n                                error1 => BeginOnUIThread(() =>\r\n                                {\r\n                                    MessageBox.Show(AppResources.PasswordInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                                }));\r\n                        }\r\n                        else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                        {\r\n                            MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (error.TypeEquals(ErrorType.SRP_ID_INVALID))\r\n                        {\r\n                            IsWorking = true;\r\n                            MTProtoService.GetPasswordAsync(\r\n                                result1 => BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                    _password = result1 as TLPassword84;\r\n                                    Confirm();\r\n                                }),\r\n                                error1 => BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                }));\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"account.checkPassword error \" + error);\r\n                        }\r\n                    }));\r\n            });\r\n        }\r\n\r\n        public void ResetAccount()\r\n        {\r\n            BeginOnUIThread(TimeSpan.FromSeconds(0.1), () =>\r\n            {\r\n                var r = MessageBox.Show(AppResources.ResetMyAccountConfirmation, AppResources.Warning, MessageBoxButton.OKCancel);\r\n                if (r != MessageBoxResult.OK) return;\r\n\r\n                IsWorking = true;\r\n                MTProtoService.DeleteAccountAsync(\r\n                    new TLString(\"Forgot password\"),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        StateService.RemoveBackEntry = true;\r\n                        StateService.SentCode = _sentCode;\r\n                        NavigationService.UriFor<SignUpViewModel>().Navigate();\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        if (error.TypeEquals(\"2FA_RECENT_CONFIRM\"))\r\n                        {\r\n                            MessageBox.Show(AppResources.ResetAccountError, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (error.TypeStarsWith(\"2FA_CONFIRM_WAIT\"))\r\n                        {\r\n                            var message = error.Message.ToString().Replace(\"2FA_CONFIRM_WAIT_\", string.Empty);\r\n                            try\r\n                            {\r\n                                var confirmWait = Convert.ToInt32(message);\r\n                                StateService.ConfirmWait = confirmWait;\r\n                                StateService.SentCode = _sentCode;\r\n                                NavigationService.UriFor<ResetAccountViewModel>().Navigate();\r\n                            }\r\n                            catch (Exception e)\r\n                            {\r\n\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"account.deleteAccount error \" + error);\r\n                        }\r\n                    }));\r\n            });\r\n        }\r\n\r\n        public void ForgotPassword()\r\n        {\r\n            if (_password == null) return;\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                if (_password.HasRecovery.Value)\r\n                {\r\n                    IsWorking = true;\r\n                    MTProtoService.RequestPasswordRecoveryAsync(\r\n                        result => BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            _password.EmailUnconfirmedPattern = result.EmailPattern;\r\n                            _password.IsAuthRecovery = true;\r\n\r\n                            MessageBox.Show(string.Format(AppResources.SentRecoveryCodeMessage, result.EmailPattern), AppResources.AppName, MessageBoxButton.OK);\r\n\r\n                            StateService.Password = _password;\r\n                            StateService.RemoveBackEntry = true;\r\n                            NavigationService.UriFor<PasswordRecoveryViewModel>().Navigate();\r\n\r\n                            ResetAccountVisibility = Visibility.Visible;\r\n                        }),\r\n                        error => BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n\r\n                            var messageBuilder = new StringBuilder();\r\n                            messageBuilder.AppendLine(AppResources.Error);\r\n                            messageBuilder.AppendLine();\r\n                            messageBuilder.AppendLine(\"Method: account.requestPasswordRecovery\");\r\n                            messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                            if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                            {\r\n                                Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK));\r\n                            }\r\n                            else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                            {\r\n                                Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK));\r\n                            }\r\n                            else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                            {\r\n                                if (TLRPCError.TypeEquals(error, ErrorType.PASSWORD_EMPTY))\r\n                                {\r\n                                    Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                }\r\n                                else if (TLRPCError.TypeEquals(error, ErrorType.PASSWORD_RECOVERY_NA))\r\n                                {\r\n                                    Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                }\r\n                                else\r\n                                {\r\n                                    Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                Execute.ShowDebugMessage(\"account.requestPasswordRecovery error \" + error);\r\n                            }\r\n\r\n                            ResetAccountVisibility = Visibility.Visible;\r\n                        }));\r\n                }\r\n                else\r\n                {\r\n                    MessageBox.Show(AppResources.NoRecoveryEmailMessage, AppResources.Sorry, MessageBoxButton.OK);\r\n                    ResetAccountVisibility = Visibility.Visible;\r\n                }\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Auth/ConfirmViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing ErrorType = Telegram.Api.TL.ErrorType;\r\n\r\nnamespace TelegramClient.ViewModels.Auth\r\n{\r\n    public class ConfirmViewModel : ViewModelBase, Telegram.Api.Aggregator.IHandle<string>\r\n    {\r\n        private DateTime _startTime;\r\n\r\n        private readonly DispatcherTimer _callTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(0.5) };\r\n\r\n        private int _timeCounter = Constants.SendCallDefaultTimeout;\r\n\r\n        public int TimeCounter\r\n        {\r\n            get { return _timeCounter; }\r\n            set\r\n            {\r\n                SetField(ref _timeCounter, value, () => TimeCounter);\r\n            }\r\n        }\r\n\r\n        private string _timeCounterString = \" \";\r\n\r\n        public string TimeCounterString\r\n        {\r\n            get { return _timeCounterString; }\r\n            set { SetField(ref _timeCounterString, value, () => TimeCounterString); }\r\n        }\r\n\r\n        private string _code;\r\n\r\n        public string Code\r\n        {\r\n            get { return _code; }\r\n            set { SetField(ref _code, value, () => Code); }\r\n        }\r\n\r\n        private Visibility _helpVisibility = Visibility.Collapsed;\r\n\r\n        public Visibility HelpVisibility\r\n        {\r\n            get { return _helpVisibility; }\r\n            set { SetField(ref _helpVisibility, value, () => HelpVisibility); }\r\n        }\r\n\r\n        private Visibility _resendCodeVisibility = Visibility.Collapsed;\r\n\r\n        public Visibility ResendCodeVisibility\r\n        {\r\n            get { return _resendCodeVisibility; }\r\n            set { SetField(ref _resendCodeVisibility, value, () => ResendCodeVisibility); }\r\n        }\r\n\r\n        public string Subtitle { get; set; }\r\n\r\n        public DebugViewModel Debug { get; private set; }\r\n\r\n        public TLInt Timeout { get; set; }\r\n\r\n        private bool _changePhoneNumber;\r\n\r\n        private IExtendedDeviceInfoService _extendedDeviceInfoService;\r\n\r\n        public int CodeLength { get; set; }\r\n\r\n        private TLSentCodeTypeBase _type;\r\n\r\n        private TLCodeTypeBase _nextType;\r\n\r\n        private string _debugString;\r\n\r\n        public string DebugString\r\n        {\r\n            get { return _debugString; }\r\n            set { SetField(ref _debugString, value, () => DebugString); }\r\n        }\r\n\r\n        public string Caption\r\n        {\r\n            get { return TLString.IsNullOrEmpty(StateService.PhoneNumber) ? null : \"+\" + StateService.PhoneNumber; }\r\n        }\r\n\r\n        private TLSentCodeBase _sentCode;\r\n\r\n        public ConfirmViewModel(IExtendedDeviceInfoService extendedDeviceInfoService, DebugViewModel debug, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _extendedDeviceInfoService = extendedDeviceInfoService;\r\n#if DEBUG\r\n            HelpVisibility = Visibility.Visible;\r\n#endif\r\n            _type = stateService.Type;\r\n            stateService.Type = null;\r\n            _nextType = stateService.NextType;\r\n            stateService.NextType = null;\r\n            Subtitle = GetSubtitle();\r\n\r\n            var length = _type as ILength;\r\n            CodeLength = length != null ? length.Length.Value : Constants.DefaultCodeLength;\r\n\r\n            Timeout = stateService.SendCallTimeout;\r\n            ResendCodeVisibility = stateService.SendCallTimeout != null && stateService.SendCallTimeout.Value > 0\r\n                ? Visibility.Collapsed\r\n                : Visibility.Visible;\r\n\r\n            UpdateDebugString();\r\n\r\n            EventAggregator.Subscribe(this);\r\n            SuppressUpdateStatus = true;\r\n\r\n            Debug = debug;\r\n\r\n            if (StateService.ChangePhoneNumber)\r\n            {\r\n                _changePhoneNumber = true;\r\n                StateService.ChangePhoneNumber = false;\r\n            }\r\n\r\n            _sentCode = StateService.SentCode;\r\n            StateService.SentCode = null;\r\n\r\n            //_updatesService = updatesService;\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Code))\r\n                {\r\n                    NotifyOfPropertyChange(() => CanConfirm);\r\n\r\n                    if (!string.IsNullOrEmpty(Code) && Code.Length == CodeLength)\r\n                    {\r\n                        Confirm();\r\n                    }\r\n                }\r\n            };\r\n\r\n            _callTimer.Tick += (sender, args) =>\r\n            {\r\n                _timeCounter = Timeout == null ? 0 : (int)(Timeout.Value - (DateTime.Now - _startTime).TotalSeconds);\r\n\r\n                if (_timeCounter > 0)\r\n                {\r\n#if DEBUG\r\n                    TimeCounterString = _timeCounter.ToString(CultureInfo.InvariantCulture);\r\n#endif\r\n\r\n                    if (_nextType is TLCodeTypeCall)\r\n                    {\r\n                        TimeCounterString = string.Format(AppResources.WeWillCallYou, TimeSpan.FromSeconds(TimeCounter).ToString(@\"m\\:ss\"));\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    _timeCounter = 0;\r\n                    if (_nextType is TLCodeTypeCall)\r\n                    {\r\n                        TimeCounterString = AppResources.TelegramDialedYourNumber;\r\n                    }\r\n\r\n                    HelpVisibility = Visibility.Visible;\r\n                    ResendCodeVisibility = Visibility.Visible;\r\n                    _callTimer.Stop();\r\n                }\r\n\r\n                NotifyOfPropertyChange(() => TimeCounter);\r\n            };\r\n        }\r\n\r\n        private bool _isResending;\r\n\r\n        public void Resend()\r\n        {\r\n            if (_isResending)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_nextType == null)\r\n            {\r\n                SendMail();\r\n                return;\r\n            }\r\n\r\n            _isResending = true;\r\n            IsWorking = true;\r\n            MTProtoService.ResendCodeAsync(StateService.PhoneNumber, StateService.PhoneCodeHash,\r\n                sentCode => BeginOnUIThread(() =>\r\n                {\r\n                    _sentCode = sentCode;\r\n                    _isResending = false;\r\n                    IsWorking = false;\r\n\r\n                    StateService.PhoneCodeHash = sentCode.PhoneCodeHash;\r\n                    StateService.PhoneRegistered = sentCode.PhoneRegistered;\r\n\r\n                    Timeout = sentCode.SendCallTimeout;\r\n                    ResendCodeVisibility = Timeout != null && Timeout.Value > 0\r\n                        ? Visibility.Collapsed\r\n                        : Visibility.Visible;\r\n\r\n                    var sentCode50 = sentCode as TLSentCode50;\r\n                    if (sentCode50 != null)\r\n                    {\r\n                        _type = sentCode50.Type;\r\n                        _nextType = sentCode50.NextType;\r\n\r\n                        Subtitle = GetSubtitle();\r\n                        NotifyOfPropertyChange(() => Subtitle);\r\n\r\n                        var length = _type as ILength;\r\n                        CodeLength = length != null ? length.Length.Value : Constants.DefaultCodeLength;\r\n                        NotifyOfPropertyChange(() => CodeLength);\r\n                    }\r\n\r\n                    UpdateDebugString();\r\n\r\n                    _startTime = DateTime.Now;\r\n                    _callTimer.Start();\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _isResending = false;\r\n                    IsWorking = false;\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"auth.resendCode error \" + error);\r\n                }));\r\n        }\r\n\r\n        private void UpdateDebugString()\r\n        {\r\n#if DEBUG\r\n            DebugString = string.Format(\"next_type={0} timeout={1} code_length={2}\", _nextType, Timeout, CodeLength);\r\n#endif\r\n        }\r\n\r\n        private string GetSubtitle()\r\n        {\r\n            if (_type is TLSentCodeTypeApp)\r\n            {\r\n                return AppResources.CodeSentToTelegramApp;\r\n            }\r\n\r\n            if (_type is TLSentCodeTypeSms)\r\n            {\r\n                return string.Format(AppResources.ConfirmMessage, PhoneNumberConverter.Convert(StateService.PhoneNumber));\r\n            }\r\n\r\n            if (_type is TLSentCodeTypeCall)\r\n            {\r\n                return string.Format(AppResources.CodeSentViaCallingPhone, PhoneNumberConverter.Convert(StateService.PhoneNumber));\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public bool CanConfirm\r\n        {\r\n            get { return !string.IsNullOrEmpty(Code); }\r\n        }\r\n\r\n        private TLRPCError _lastError;\r\n\r\n        public void Confirm()\r\n        {\r\n            if (_changePhoneNumber)\r\n            {\r\n                ConfirmChangePhoneNumber();\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            StateService.PhoneCode = new TLString(Code);\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"auth.signIn\");\r\n#endif\r\n            MTProtoService.SignInAsync(\r\n                StateService.PhoneNumber, StateService.PhoneCodeHash, StateService.PhoneCode,\r\n                auth => BeginOnUIThread(() =>\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\"auth.signIn result \" + auth);\r\n                    TLUtils.WriteLog(\"TLUtils.IsLogEnabled=false\");\r\n#endif\r\n\r\n                    TLUtils.IsLogEnabled = false;\r\n                    TLUtils.LogItems.Clear();\r\n\r\n                    TimeCounterString = string.Empty;\r\n                    HelpVisibility = Visibility.Collapsed;\r\n                    _callTimer.Stop();\r\n\r\n                    var result = MessageBox.Show(\r\n                        AppResources.ConfirmPushMessage,\r\n                        AppResources.ConfirmPushTitle,\r\n                        MessageBoxButton.OKCancel);\r\n\r\n                    if (result != MessageBoxResult.OK)\r\n                    {\r\n                        Notifications.Disable();\r\n                    }\r\n                    else\r\n                    {\r\n                        Notifications.Enable();\r\n                    }\r\n\r\n                    UpdateNotificationsAsync(MTProtoService, StateService);\r\n\r\n                    MTProtoService.SetInitState();\r\n                    CacheService.ClearConfigImportAsync();\r\n                    //_updatesService.SetCurrentUser(auth.User);\r\n                    _isProcessing = false;\r\n                    StateService.CurrentUserId = auth.User.Index;\r\n                    StateService.FirstRun = true;\r\n                    SettingsHelper.SetValue(Constants.IsAuthorizedKey, true);\r\n\r\n                    ShellViewModel.Navigate(NavigationService);\r\n\r\n                    IsWorking = false;\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\"auth.signIn error \" + error);\r\n#endif\r\n                    _lastError = error;\r\n                    IsWorking = false;\r\n                    if (error.TypeEquals(ErrorType.PHONE_NUMBER_UNOCCUPIED))\r\n                    {\r\n                        _callTimer.Stop();\r\n                        StateService.SentCode = _sentCode;\r\n                        StateService.ClearNavigationStack = true;\r\n                        NavigationService.UriFor<SignUpViewModel>().Navigate();\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_INVALID))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_EMPTY))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeEmpty, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_EXPIRED))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeExpiredString, AppResources.Error, MessageBoxButton.OK);\r\n                        OnBackKeyPress();\r\n                        NavigationService.GoBack();\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.SESSION_PASSWORD_NEEDED))\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.GetPasswordAsync(\r\n                            password => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                _callTimer.Stop();\r\n                                StateService.Password = password;\r\n                                StateService.RemoveBackEntry = true;\r\n                                NavigationService.UriFor<ConfirmPasswordViewModel>().Navigate();\r\n                            }),\r\n                            error2 =>\r\n                            {\r\n                                IsWorking = false;\r\n                                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.getPassword error \" + error);\r\n                            });\r\n                    }\r\n                    else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.signIn error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n\r\n        public static void UpdateNotificationsAsync(IMTProtoService mtProtoService, IStateService stateService)\r\n        {\r\n            stateService.GetNotifySettingsAsync(s =>\r\n            {\r\n                mtProtoService.GetNotifySettingsAsync(new TLInputNotifyUsers(),\r\n                    settings =>\r\n                    {\r\n                        var notifySettings = settings as TLPeerNotifySettings;\r\n                        if (notifySettings != null)\r\n                        {\r\n                            s.ContactAlert = notifySettings.MuteUntil == null || notifySettings.MuteUntil.Value == 0;\r\n                            s.ContactMessagePreview = notifySettings.ShowPreviews != null && notifySettings.ShowPreviews.Value;\r\n\r\n                            var sound = notifySettings.Sound == null ? null : stateService.Sounds.FirstOrDefault(x => string.Equals(x, notifySettings.Sound.Value, StringComparison.OrdinalIgnoreCase));\r\n                            s.ContactSound = sound ?? stateService.Sounds[0];\r\n\r\n                            stateService.SaveNotifySettingsAsync(s);\r\n                        }\r\n                    },\r\n                    error =>\r\n                    {\r\n\r\n                    });\r\n\r\n                mtProtoService.GetNotifySettingsAsync(new TLInputNotifyChats(),\r\n                    settings =>\r\n                    {\r\n                        var notifySettings = settings as TLPeerNotifySettings;\r\n                        if (notifySettings != null)\r\n                        {\r\n                            s.GroupAlert = notifySettings.MuteUntil == null || notifySettings.MuteUntil.Value == 0;\r\n                            s.GroupMessagePreview = notifySettings.ShowPreviews != null && notifySettings.ShowPreviews.Value;\r\n\r\n                            var sound = notifySettings.Sound == null ? null : stateService.Sounds.FirstOrDefault(x => string.Equals(x, notifySettings.Sound.Value, StringComparison.OrdinalIgnoreCase));\r\n                            s.GroupSound = sound ?? stateService.Sounds[0];\r\n\r\n                            stateService.SaveNotifySettingsAsync(s);\r\n                        }\r\n                    },\r\n                    error =>\r\n                    {\r\n\r\n                    });\r\n            });\r\n        }\r\n\r\n        private void ConfirmChangePhoneNumber()\r\n        {\r\n            IsWorking = true;\r\n            StateService.PhoneCode = new TLString(Code);\r\n\r\n            MTProtoService.ChangePhoneAsync(\r\n                StateService.PhoneNumber, StateService.PhoneCodeHash, StateService.PhoneCode,\r\n                auth => BeginOnUIThread(() =>\r\n                {\r\n                    TLUtils.IsLogEnabled = false;\r\n                    TLUtils.LogItems.Clear();\r\n\r\n                    TimeCounterString = string.Empty;\r\n                    HelpVisibility = Visibility.Collapsed;\r\n                    _callTimer.Stop();\r\n\r\n\r\n                    _isProcessing = false;\r\n                    auth.NotifyOfPropertyChange(() => auth.Phone);\r\n                    NavigationService.RemoveBackEntry();\r\n                    NavigationService.GoBack();\r\n                    IsWorking = false;\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _lastError = error;\r\n                    IsWorking = false;\r\n                    if (error.TypeEquals(ErrorType.PHONE_NUMBER_UNOCCUPIED))\r\n                    {\r\n                        _callTimer.Stop();\r\n                        StateService.SentCode = _sentCode;\r\n                        StateService.ClearNavigationStack = true;\r\n                        NavigationService.UriFor<SignUpViewModel>().Navigate();\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_INVALID))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_EMPTY))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeEmpty, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_EXPIRED))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeExpiredString, AppResources.Error, MessageBoxButton.OK);\r\n                        OnBackKeyPress();\r\n                        NavigationService.GoBack();\r\n                    }\r\n                    else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else\r\n                    {\r\n#if DEBUG\r\n                        MessageBox.Show(error.ToString());\r\n#endif\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void Handle(string command)\r\n        {\r\n            if (string.Equals(command, Commands.LogOutCommand))\r\n            {\r\n                Code = string.Empty;\r\n                IsWorking = false;\r\n                HelpVisibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        private bool _isProcessing;\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (_isProcessing) return;\r\n\r\n            _isProcessing = true;\r\n\r\n            Subtitle = GetSubtitle();\r\n\r\n            if (Timeout != null)\r\n            {\r\n                TimeCounter = Timeout.Value;\r\n            }\r\n            _startTime = DateTime.Now;\r\n            _callTimer.Start();\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void OnBackKeyPress()\r\n        {\r\n            _isProcessing = false;\r\n            Code = string.Empty;\r\n            _callTimer.Stop();\r\n            TimeCounterString = \" \";\r\n#if DEBUG\r\n            HelpVisibility = Visibility.Visible;\r\n#else\r\n            HelpVisibility = Visibility.Collapsed;\r\n#endif\r\n        }\r\n\r\n        public string Email\r\n        {\r\n            get { return Constants.LogEmail; }\r\n        }\r\n\r\n        public void SendMail()\r\n        {\r\n            var logBuilder = new StringBuilder();\r\n            foreach (var item in TLUtils.LogItems)\r\n            {\r\n                logBuilder.AppendLine(item);\r\n            }\r\n\r\n            var body = new StringBuilder();\r\n            body.AppendLine();\r\n            body.AppendLine();\r\n            body.AppendLine(\"Page: Confirm Code\");\r\n            body.AppendLine(\"Phone: \" + \"+\" + StateService.PhoneNumber);\r\n            body.AppendLine(\"App version: \" + _extendedDeviceInfoService.AppVersion);\r\n            body.AppendLine(\"OS version: \" + _extendedDeviceInfoService.SystemVersion);\r\n            body.AppendLine(\"Device Name: \" + _extendedDeviceInfoService.Model);\r\n            body.AppendLine(\"Location: \" + Telegram.Api.Helpers.Utils.CurrentUICulture());\r\n            body.AppendLine(\"Wi-Fi: \" + _extendedDeviceInfoService.IsWiFiEnabled);\r\n            body.AppendLine(\"Mobile Network: \" + _extendedDeviceInfoService.IsCellularDataEnabled);\r\n            body.AppendLine(\"Last error: \" + ((_lastError != null) ? _lastError.ToString() : null));\r\n            body.AppendLine(\"Log\" + Environment.NewLine + logBuilder);\r\n\r\n            var task = new EmailComposeTask();\r\n            task.Body = body.ToString();\r\n            task.To = Constants.LogEmail;\r\n            task.Subject = \"WP registration/login issue (\" + _extendedDeviceInfoService.AppVersion + \", Code) \" + StateService.PhoneNumber;\r\n            task.Show();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            //_callTimer.Stop();\r\n            base.OnDeactivate(close);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Auth/ResetAccountViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Language = TelegramClient.Utils.Language;\r\n\r\nnamespace TelegramClient.ViewModels.Auth\r\n{\r\n    public class ResetAccountViewModel : ViewModelBase\r\n    {\r\n        private bool _isTimerVisible = true;\r\n\r\n        public bool IsTimerVisible\r\n        {\r\n            get { return _isTimerVisible; }\r\n            set { _isTimerVisible = value; }\r\n        }\r\n\r\n        public string ConfirmWaitString { get; set; }\r\n\r\n        public string Subtitle\r\n        {\r\n            get { return string.Format(AppResources.ResetAccountDescription, PhoneNumberConverter.Convert(StateService.PhoneNumber)); }\r\n        }\r\n\r\n        private TimeSpan _confirmWait;\r\n\r\n        private DateTime _startTime;\r\n\r\n        private readonly DispatcherTimer _timer = new DispatcherTimer();\r\n\r\n        private readonly TLSentCodeBase _sentCode;\r\n\r\n        public ResetAccountViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _timer.Tick += OnTimerTick;\r\n\r\n            var confirmWait = StateService.ConfirmWait;\r\n            StateService.ConfirmWait = 0;\r\n\r\n            _sentCode = StateService.SentCode;\r\n            StateService.SentCode = null;\r\n\r\n            UpdateInterval(confirmWait);\r\n        }\r\n\r\n        private void UpdateInterval(int interval)\r\n        {\r\n            if (interval > 0)\r\n            {\r\n                IsTimerVisible = true;\r\n                NotifyOfPropertyChange(() => IsTimerVisible);\r\n            }\r\n\r\n            _confirmWait = TimeSpan.FromSeconds(interval);\r\n            _timer.Interval = interval < 3600.0 ? TimeSpan.FromSeconds(0.25) : TimeSpan.FromSeconds(1.0);\r\n\r\n            _startTime = DateTime.Now;\r\n\r\n            UpdateConfirmWaitString();\r\n        }\r\n\r\n        private void OnTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            UpdateConfirmWaitString();\r\n        }\r\n\r\n        private void UpdateConfirmWaitString()\r\n        {\r\n            var interval = _confirmWait.TotalSeconds - (DateTime.Now - _startTime).TotalSeconds;\r\n            if (interval <= 1.0)\r\n            {\r\n                IsTimerVisible = false;\r\n                NotifyOfPropertyChange(() => IsTimerVisible);\r\n            }\r\n            else if (interval < 0.0)\r\n            {\r\n                interval = 0.0;\r\n                _timer.Stop();\r\n            }\r\n            else if (interval < 3600.0)\r\n            {\r\n                _timer.Interval = TimeSpan.FromSeconds(0.25);\r\n            }\r\n\r\n            var confirmWait = TimeSpan.FromSeconds(interval);\r\n\r\n            var builder = new StringBuilder();\r\n            if (confirmWait.Days > 0)\r\n            {\r\n                var days = Language.Declension(\r\n                    confirmWait.Days,\r\n                    AppResources.DayNominativeSingular,\r\n                    AppResources.DayNominativePlural,\r\n                    AppResources.DayGenitiveSingular,\r\n                    AppResources.DayGenitivePlural,\r\n                    confirmWait.Days < 2\r\n                        ? string.Format(\"**{1}** {0}\", AppResources.DayNominativeSingular, Math.Abs(confirmWait.Days)).ToLowerInvariant()\r\n                        : string.Format(\"**{1}** {0}\", AppResources.DayNominativePlural, Math.Abs(confirmWait.Days))).ToLowerInvariant();\r\n\r\n                builder.Append(string.Format(\"{0} \", days));\r\n            }\r\n            if (confirmWait.Hours > 0 || confirmWait.Days > 0)\r\n            {\r\n                var hours = Language.Declension(\r\n                    confirmWait.Hours,\r\n                    AppResources.HourNominativeSingular,\r\n                    AppResources.HourNominativePlural,\r\n                    AppResources.HourGenitiveSingular,\r\n                    AppResources.HourGenitivePlural,\r\n                    confirmWait.Hours < 2\r\n                        ? string.Format(\"**{1}** {0}\", AppResources.HourNominativeSingular, Math.Abs(confirmWait.Hours)).ToLowerInvariant()\r\n                        : string.Format(\"**{1}** {0}\", AppResources.HourNominativePlural, Math.Abs(confirmWait.Hours))).ToLowerInvariant();\r\n\r\n                builder.Append(string.Format(\"{0} \", hours));\r\n            }\r\n            if (confirmWait.Minutes > 0 || confirmWait.Hours > 0 || confirmWait.Days > 0)\r\n            {\r\n                var minutes = Language.Declension(\r\n                    confirmWait.Minutes,\r\n                    AppResources.MinuteNominativeSingular,\r\n                    AppResources.MinuteNominativePlural,\r\n                    AppResources.MinuteGenitiveSingular,\r\n                    AppResources.MinuteGenitivePlural,\r\n                    confirmWait.Minutes < 2\r\n                        ? string.Format(\"**{1}** {0}\", AppResources.MinuteNominativeSingular, Math.Abs(confirmWait.Minutes)).ToLowerInvariant()\r\n                        : string.Format(\"**{1}** {0}\", AppResources.MinuteNominativePlural, Math.Abs(confirmWait.Minutes))).ToLowerInvariant();\r\n\r\n                builder.Append(string.Format(\"{0} \", minutes));\r\n            }\r\n            if (confirmWait.TotalSeconds < 3600)\r\n            {\r\n                var seconds = Language.Declension(\r\n                    confirmWait.Seconds,\r\n                    AppResources.SecondNominativeSingular,\r\n                    AppResources.SecondNominativePlural,\r\n                    AppResources.SecondGenitiveSingular,\r\n                    AppResources.SecondGenitivePlural,\r\n                    confirmWait.Seconds < 2\r\n                        ? string.Format(\"**{1}** {0}\", AppResources.SecondNominativeSingular, Math.Abs(confirmWait.Seconds)).ToLowerInvariant()\r\n                        : string.Format(\"**{1}** {0}\", AppResources.SecondNominativePlural, Math.Abs(confirmWait.Seconds))).ToLowerInvariant();\r\n\r\n                builder.Append(string.Format(\"{0} \", seconds));\r\n            }\r\n\r\n            ConfirmWaitString = builder.ToString();\r\n            NotifyOfPropertyChange(() => ConfirmWaitString);\r\n            NotifyOfPropertyChange(() => CanResetAccount);\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            _timer.Start();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            _timer.Stop();\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        public bool CanResetAccount\r\n        {\r\n            get { return (DateTime.Now - _startTime).TotalSeconds >= _confirmWait.TotalSeconds; }\r\n        }\r\n\r\n        public void ResetAccount()\r\n        {\r\n            IsWorking = true;\r\n            MTProtoService.DeleteAccountAsync(\r\n                new TLString(\"Forgot password\"),\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    StateService.RemoveBackEntry = true;\r\n                    StateService.SentCode = _sentCode;\r\n                    NavigationService.UriFor<SignUpViewModel>().Navigate();\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    if (error.TypeEquals(\"2FA_RECENT_CONFIRM\"))\r\n                    {\r\n                        MessageBox.Show(AppResources.ResetAccountError, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeStarsWith(\"2FA_CONFIRM_WAIT\"))\r\n                    {\r\n                        var message = error.Message.ToString().Replace(\"2FA_CONFIRM_WAIT_\", string.Empty);\r\n                        try\r\n                        {\r\n                            var confirmWait = Convert.ToInt32(message);\r\n                            UpdateInterval(confirmWait);\r\n                            _timer.Start();\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.deleteAccount error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void LogOut()\r\n        {\r\n            StateService.ClearNavigationStack = true;\r\n            NavigationService.UriFor<SignInViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Auth/SignInViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Media;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing ErrorType = Telegram.Api.TL.ErrorType;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Auth\r\n{\r\n    public class SignInViewModel : ViewModelBase, Telegram.Api.Aggregator.IHandle<string>\r\n    {\r\n        private bool _isLoadingCountryInfo;\r\n\r\n        public bool IsLoadingCountryInfo\r\n        {\r\n            get { return _isLoadingCountryInfo; }\r\n            set { SetField(ref _isLoadingCountryInfo, value, () => IsLoadingCountryInfo); }\r\n        }\r\n\r\n        public bool IsInProgress\r\n        {\r\n            get { return _isLoadingCountryInfo || IsWorking; }\r\n        }\r\n\r\n        private DateTime? _startTime;\r\n\r\n        private int _timeCounter;\r\n\r\n        private readonly DispatcherTimer _showHelpTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(2.0) };\r\n\r\n        private Country _selectedCountry;\r\n\r\n        public Country SelectedCountry\r\n        {\r\n            get { return _selectedCountry; }\r\n            set { SetField(ref _selectedCountry, value, () => SelectedCountry); }\r\n        }\r\n\r\n        public bool IsPhoneCodeInvalid\r\n        {\r\n            get { return string.IsNullOrEmpty(PhoneCode) || CountryUtils.CountriesSource.FirstOrDefault(x => x.PhoneCode == PhoneCode) == null; }\r\n        }\r\n\r\n        private string _phoneCode;\r\n\r\n        public string PhoneCode\r\n        {\r\n            get { return _phoneCode; }\r\n            set\r\n            {\r\n                SetField(ref _phoneCode, value, () => PhoneCode);\r\n                Country country = null;\r\n                foreach (var c in CountryUtils.CountriesSource)\r\n                {\r\n                    if (c.PhoneCode == PhoneCode)\r\n                    {\r\n                        if (c.PhoneCode == \"1\" && c.Code != \"us\")\r\n                        {\r\n                            continue;\r\n                        }\r\n\r\n                        if (c.PhoneCode == \"7\" && c.Code != \"ru\")\r\n                        {\r\n                            continue;\r\n                        }\r\n\r\n                        country = c;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (country != null)\r\n                {\r\n                    SelectedCountry = country;\r\n                }\r\n\r\n                NotifyOfPropertyChange(() => IsPhoneCodeInvalid);\r\n            }\r\n        }\r\n\r\n        private string _phoneNumber;\r\n\r\n        public string PhoneNumber\r\n        {\r\n            get { return _phoneNumber; }\r\n            set { SetField(ref _phoneNumber, value, () => PhoneNumber); }\r\n        }\r\n\r\n        private string _status;\r\n\r\n        public string Status\r\n        {\r\n            get { return _status; }\r\n            set { SetField(ref _status, value, () => Status); }\r\n        }\r\n\r\n        private Visibility _helpVisibility = Visibility.Collapsed;\r\n\r\n        public Visibility HelpVisibility\r\n        {\r\n            get { return _helpVisibility; }\r\n            set { SetField(ref _helpVisibility, value, () => HelpVisibility); }\r\n        }\r\n\r\n        public LogViewModel Log { get; private set; }\r\n\r\n        private IExtendedDeviceInfoService _extendedDeviceInfoService;\r\n\r\n        public SignInViewModel(\r\n            IExtendedDeviceInfoService extendedDeviceInfoService,\r\n#if PRIVATE_BETA\r\n            LogViewModel log, \r\n#endif\r\n ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _extendedDeviceInfoService = extendedDeviceInfoService;\r\n\r\n            HelpVisibility = PrivateBetaIdentityToVisibilityConverter.IsPrivateBeta\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n\r\n            EventAggregator.Subscribe(this);\r\n            SuppressUpdateStatus = true;\r\n\r\n#if PRIVATE_BETA\r\n            Log = log;\r\n#endif\r\n\r\n            if (StateService.ChangePhoneNumber)\r\n            {\r\n                _changePhoneNumber = true;\r\n                StateService.ChangePhoneNumber = false;\r\n            }\r\n\r\n            _showHelpTimer.Tick += (sender, args) =>\r\n            {\r\n                if (!_startTime.HasValue)\r\n                {\r\n                    _showHelpTimer.Stop();\r\n                    return;\r\n                }\r\n\r\n                _timeCounter = (int)(Constants.ShowHelpTimeInSeconds - (DateTime.Now - _startTime.Value).TotalSeconds);\r\n                if (_timeCounter <= 0)\r\n                {\r\n                    _timeCounter = 0;\r\n                    HelpVisibility = Visibility.Visible;\r\n                    _showHelpTimer.Stop();\r\n                }\r\n            };\r\n\r\n            if (!string.IsNullOrEmpty(MTProtoService.Country))\r\n            {\r\n                OnGotUserCountry(this, new CountryEventArgs { Country = MTProtoService.Country });\r\n            }\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => PhoneNumber)\r\n                    || Property.NameEquals(args.PropertyName, () => PhoneCode))\r\n                {\r\n                    NotifyOfPropertyChange(() => CanSignIn);\r\n                }\r\n                else if (Property.NameEquals(args.PropertyName, () => IsLoadingCountryInfo)\r\n                    || Property.NameEquals(args.PropertyName, () => IsWorking))\r\n                {\r\n                    NotifyOfPropertyChange(() => IsInProgress);\r\n                }\r\n            };\r\n        }\r\n\r\n        private void OnGotUserCountry(object sender, CountryEventArgs args)\r\n        {\r\n            Country country = null;\r\n            foreach (var c in CountryUtils.CountriesSource)\r\n            {\r\n                if (string.Equals(c.Code, args.Country, StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    country = c;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (country != null && SelectedCountry == null && string.IsNullOrEmpty(PhoneNumber))\r\n            {\r\n                OnCountrySelected(country);\r\n            }\r\n        }\r\n\r\n        public bool CanSignIn\r\n        {\r\n            get\r\n            {\r\n                var phoneNumberLength = string.IsNullOrEmpty(PhoneNumber) ? 0 : PhoneNumber.Length;\r\n                var phoneCodeLength = string.IsNullOrEmpty(PhoneCode) ? 0 : PhoneCode.Length;\r\n                return !IsWorking && (phoneNumberLength + phoneCodeLength) >= 3;\r\n            }\r\n        }\r\n\r\n        private TLRPCError _lastError;\r\n\r\n        private TLSentCodeBase _sentCode;\r\n\r\n        private bool _changePhoneNumber;\r\n\r\n        public void SignIn()\r\n        {\r\n            if (_changePhoneNumber)\r\n            {\r\n                ChangePhoneNumber();\r\n                return;\r\n            }\r\n\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"auth.sendCode\");\r\n#endif\r\n\r\n            IsWorking = true;\r\n            NotifyOfPropertyChange(() => CanSignIn);\r\n\r\n            var phoneNumber = PhoneCode + PhoneNumber;\r\n            _startTime = DateTime.Now;\r\n            _showHelpTimer.Start();\r\n\r\n            MTProtoService.SendCodeAsync(new TLString(phoneNumber), null,\r\n                sentCode => BeginOnUIThread(() =>\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\"auth.sendCode result: \" + sentCode);\r\n#endif\r\n                    _sentCode = sentCode;\r\n\r\n                    _showHelpTimer.Stop();\r\n\r\n                    StateService.SentCode = sentCode;\r\n                    StateService.PhoneNumber = new TLString(phoneNumber);\r\n                    StateService.PhoneNumberString = string.Format(AppResources.ConfirmMessage, PhoneNumberConverter.Convert(StateService.PhoneNumber));\r\n                    StateService.PhoneCodeHash = sentCode.PhoneCodeHash;\r\n                    StateService.PhoneRegistered = sentCode.PhoneRegistered;\r\n                    StateService.SendCallTimeout = sentCode.SendCallTimeout;\r\n                    var sentCode50 = sentCode as TLSentCode50;\r\n                    if (sentCode50 != null)\r\n                    {\r\n                        StateService.Type = sentCode50.Type;\r\n                        StateService.NextType = sentCode50.NextType;\r\n                    }\r\n\r\n                    NavigationService.UriFor<ConfirmViewModel>().Navigate();\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => CanSignIn);\r\n                }),\r\n                attemptNumber => BeginOnUIThread(() =>\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\"auth.sendCode attempt failed \" + attemptNumber);\r\n#endif\r\n                    Execute.ShowDebugMessage(\"auth.sendCode attempt failed \" + attemptNumber);\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n#if LOG_REGISTRATION\r\n                    TLUtils.WriteLog(\"auth.sendCode error \" + error);\r\n#endif\r\n\r\n                    _lastError = error;\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => CanSignIn);\r\n\r\n                    if (error.TypeEquals(ErrorType.PHONE_NUMBER_INVALID))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneNumberInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.ShowDebugMessage(\"auth.sendCode error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private void ChangePhoneNumber()\r\n        {\r\n            IsWorking = true;\r\n            NotifyOfPropertyChange(() => CanSignIn);\r\n            var phoneNumber = PhoneCode + PhoneNumber;\r\n\r\n            _startTime = DateTime.Now;\r\n            _showHelpTimer.Start();\r\n            MTProtoService.SendChangePhoneCodeAsync(new TLString(phoneNumber), null,\r\n                sentCode => BeginOnUIThread(() =>\r\n                {\r\n                    _showHelpTimer.Stop();\r\n                    StateService.SentCode = sentCode;\r\n                    StateService.PhoneNumber = new TLString(phoneNumber);\r\n                    StateService.PhoneNumberString = string.Format(AppResources.ConfirmMessage, PhoneNumberConverter.Convert(StateService.PhoneNumber));\r\n                    StateService.PhoneCodeHash = sentCode.PhoneCodeHash;\r\n                    StateService.PhoneRegistered = new TLBool(false);\r\n                    StateService.SendCallTimeout = sentCode.SendCallTimeout;\r\n                    StateService.ChangePhoneNumber = true;\r\n                    var sentCode50 = sentCode as TLSentCode50;\r\n                    if (sentCode50 != null)\r\n                    {\r\n                        StateService.Type = sentCode50.Type;\r\n                        StateService.NextType = sentCode50.NextType;\r\n                    }\r\n\r\n                    NavigationService.UriFor<ConfirmViewModel>().Navigate();\r\n\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => CanSignIn);\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _lastError = error;\r\n\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => CanSignIn);\r\n\r\n                    if (error.TypeEquals(ErrorType.PHONE_NUMBER_INVALID))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneNumberInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_NUMBER_OCCUPIED))\r\n                    {\r\n                        MessageBox.Show(string.Format(AppResources.NewNumberTaken, \"+\" + phoneNumber), AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.ShowDebugMessage(\"account.sendChangePhoneCode error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void SelectCountry()\r\n        {\r\n            NavigationService.UriFor<ChooseCountryViewModel>().Navigate();\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;\r\n\r\n            MTProtoService.GotUserCountry += OnGotUserCountry;\r\n\r\n            if (StateService.ClearNavigationStack)\r\n            {\r\n                PhoneNumber = string.Empty;\r\n                StateService.ClearNavigationStack = false;\r\n                while (NavigationService.RemoveBackEntry() != null) { }\r\n            }\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            if (StateService.SelectedCountry != null)\r\n            {\r\n                var country = StateService.SelectedCountry;\r\n                StateService.SelectedCountry = null;\r\n                OnCountrySelected(country);\r\n            }\r\n\r\n            _showHelpTimer.Start();\r\n            base.OnActivate();\r\n        }\r\n\r\n        private void OnCountrySelected(Country country)\r\n        {\r\n            SelectedCountry = country;\r\n            _phoneCode = SelectedCountry.PhoneCode;\r\n            NotifyOfPropertyChange(() => PhoneCode);\r\n            NotifyOfPropertyChange(() => IsPhoneCodeInvalid);\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Enabled;\r\n\r\n            MTProtoService.GotUserCountry -= OnGotUserCountry;\r\n\r\n            _showHelpTimer.Stop();\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        public void OnBackKeyPressed(CancelEventArgs args)\r\n        {\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"SignInViewModel.OnBackKeyPressed\");\r\n#endif\r\n\r\n            if (IsWorking)\r\n            {\r\n                args.Cancel = true;\r\n                IsWorking = false;\r\n                MTProtoService.CancelSignInAsync();\r\n                MTProtoService.ClearHistory(\"SignInViewModel\", false);\r\n                NotifyOfPropertyChange(() => CanSignIn);\r\n            }\r\n        }\r\n\r\n        public string Email\r\n        {\r\n            get { return Constants.LogEmail; }\r\n        }\r\n\r\n        public void SendMail()\r\n        {\r\n            var logBuilder = new StringBuilder();\r\n            foreach (var item in TLUtils.LogItems)\r\n            {\r\n                logBuilder.AppendLine(item);\r\n            }\r\n\r\n            var body = new StringBuilder();\r\n            body.AppendLine();\r\n            body.AppendLine();\r\n            body.AppendLine(\"Page: Your Phone\");\r\n            body.AppendLine(\"Phone: \" + \"+\" + PhoneCode + PhoneNumber);\r\n            body.AppendLine(\"App version: \" + _extendedDeviceInfoService.AppVersion);\r\n            body.AppendLine(\"OS version: \" + _extendedDeviceInfoService.SystemVersion);\r\n            body.AppendLine(\"Device Name: \" + _extendedDeviceInfoService.Model);\r\n            body.AppendLine(\"Location: \" + Telegram.Api.Helpers.Utils.CurrentUICulture());\r\n            body.AppendLine(\"Wi-Fi: \" + _extendedDeviceInfoService.IsWiFiEnabled);\r\n            body.AppendLine(\"Mobile Network: \" + _extendedDeviceInfoService.IsCellularDataEnabled);\r\n            body.AppendLine(\"Last error: \" + ((_lastError != null) ? _lastError.ToString() : null));\r\n            body.AppendLine(\"Log\" + Environment.NewLine + logBuilder);\r\n\r\n            var appVersionBuilder = new StringBuilder();\r\n            appVersionBuilder.Append(_extendedDeviceInfoService.AppVersion);\r\n            if (_sentCode != null)\r\n            {\r\n                appVersionBuilder.Append(\", Code\");\r\n            }\r\n\r\n            var task = new EmailComposeTask();\r\n            task.Body = body.ToString();\r\n            task.To = Constants.LogEmail;\r\n            task.Subject = string.Format(\"WP registration/login issue ({0}) {1}{2}\", appVersionBuilder, PhoneCode, PhoneNumber);\r\n            task.Show();\r\n        }\r\n\r\n        public void ChangeProxy()\r\n        {\r\n            StateService.SuppressProxySharing = true;\r\n            NavigationService.UriFor<ProxyListViewModel>().Navigate();\r\n        }\r\n\r\n        public void Handle(string command)\r\n        {\r\n            if (string.Equals(command, Commands.LogOutCommand))\r\n            {\r\n                _startTime = null;\r\n                HelpVisibility = Visibility.Collapsed;\r\n                SelectedCountry = null;\r\n                NotifyOfPropertyChange(() => IsPhoneCodeInvalid);\r\n                PhoneNumber = string.Empty;\r\n                IsWorking = false;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Auth/SignUpViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Auth\r\n{\r\n    public class SignUpViewModel : ViewModelBase, Telegram.Api.Aggregator.IHandle<UploadableItem>, Telegram.Api.Aggregator.IHandle<string>\r\n    {\r\n        public byte[] PhotoBytes { get; set; }\r\n\r\n        private string _firstName;\r\n\r\n        public string FirstName\r\n        {\r\n            get { return _firstName; }\r\n            set { SetField(ref _firstName, value, () => FirstName); }\r\n        }\r\n\r\n        private string _lastName;\r\n\r\n        public string LastName\r\n        {\r\n            get { return _lastName; }\r\n            set { SetField(ref _lastName, value, () => LastName); }\r\n        }\r\n\r\n        public IUploadFileManager FileManager { get; private set; }\r\n\r\n        public TLSentCodeBase SentCode { get; private set; }\r\n\r\n        public SignUpViewModel(IUploadFileManager fileManager, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            SentCode = StateService.SentCode;\r\n            StateService.SentCode = null;\r\n\r\n            SuppressUpdateStatus = true;\r\n\r\n            FileManager = fileManager;\r\n            EventAggregator.Subscribe(this);\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => FirstName)\r\n                    || Property.NameEquals(args.PropertyName, () => LastName))\r\n                {\r\n                    NotifyOfPropertyChange(() => CanSignUp);\r\n                }\r\n            };\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.ClearNavigationStack)\r\n            {\r\n                StateService.ClearNavigationStack = false;\r\n                while (NavigationService.RemoveBackEntry() != null) { }\r\n            }\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public bool CanSignUp\r\n        {\r\n            get\r\n            {\r\n                return !IsWorking\r\n                    && FirstName != null && FirstName.Length >= 2;\r\n            }\r\n        }\r\n\r\n        public void ChoosePhoto()\r\n        {\r\n            EditCurrentUserActions.EditPhoto(bytes =>\r\n            {\r\n                StateService.ProfilePhotoBytes = bytes;\r\n                PhotoBytes = bytes;\r\n                NotifyOfPropertyChange(() => PhotoBytes);\r\n            });\r\n        }\r\n\r\n        public void SignUp()\r\n        {\r\n            var result = MessageBox.Show(\r\n                AppResources.ConfirmAgeMessage,\r\n                AppResources.ConfirmAgeTitle,\r\n                MessageBoxButton.OKCancel);\r\n\r\n            if (result != MessageBoxResult.OK) return;\r\n\r\n            IsWorking = true;\r\n            NotifyOfPropertyChange(() => CanSignUp);\r\n            MTProtoService.SignUpAsync(\r\n                StateService.PhoneNumber, StateService.PhoneCodeHash, StateService.PhoneCode,\r\n                new TLString(FirstName), new TLString(LastName),\r\n                auth => BeginOnUIThread(() =>\r\n                {\r\n                    TLUtils.IsLogEnabled = false;\r\n                    TLUtils.LogItems.Clear();\r\n\r\n                    result = MessageBox.Show(\r\n                        AppResources.ConfirmPushMessage,\r\n                        AppResources.ConfirmPushTitle,\r\n                        MessageBoxButton.OKCancel);\r\n\r\n                    if (result != MessageBoxResult.OK)\r\n                    {\r\n                        Notifications.Disable();\r\n                    }\r\n                    else\r\n                    {\r\n                        Notifications.Enable();\r\n                    }\r\n\r\n                    ConfirmViewModel.UpdateNotificationsAsync(MTProtoService, StateService);\r\n\r\n                    MTProtoService.SetInitState();\r\n\r\n                    StateService.CurrentUserId = auth.User.Index;\r\n                    StateService.FirstRun = true;\r\n                    SettingsHelper.SetValue(Constants.IsAuthorizedKey, true);\r\n\r\n                    ShellViewModel.Navigate(NavigationService);\r\n\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => CanSignUp);\r\n\r\n                    if (StateService.ProfilePhotoBytes != null)\r\n                    {\r\n                        var bytes = StateService.ProfilePhotoBytes;\r\n                        StateService.ProfilePhotoBytes = null;\r\n                        var fileId = TLLong.Random();\r\n                        FileManager.UploadFile(fileId, new TLUser66 { IsSelf = true }, bytes);\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => CanSignUp);\r\n\r\n                    if (error.TypeEquals(ErrorType.PHONE_NUMBER_INVALID))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneNumberInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_INVALID))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_EMPTY))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeEmpty, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_EXPIRED))\r\n                    {\r\n                        MessageBox.Show(AppResources.PhoneCodeExpiredString, AppResources.Error, MessageBoxButton.OK);\r\n                        ClearViewModel();\r\n                        NavigationService.GoBack();\r\n                    }\r\n                    else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        MessageBox.Show(AppResources.FloodWaitString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.FIRSTNAME_INVALID))\r\n                    {\r\n                        MessageBox.Show(AppResources.FirstNameInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.LASTNAME_INVALID))\r\n                    {\r\n                        MessageBox.Show(AppResources.LastNameInvalidString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"auth.signUp error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void OpenTermsOfService()\r\n        {\r\n            var sentCode80 = SentCode as TLSentCode80;\r\n            if (sentCode80 == null) return;\r\n\r\n            var termsOfService = sentCode80.TermsOfService as TLTermsOfService80;\r\n            if (termsOfService == null) return;\r\n\r\n            ShowTermsOfService(termsOfService);\r\n            return;\r\n            if (IsWorking) return;\r\n\r\n            var countryISO2 = new TLString(\"en\");\r\n            IsWorking = true;\r\n            MTProtoService.GetTermsOfServiceAsync(countryISO2,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    ShowTermsOfService(result);\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                }));\r\n        }\r\n\r\n        public void ShowTermsOfService(TLTermsOfService termsOfService)\r\n        {\r\n            var termsOfService80 = termsOfService as TLTermsOfService80;\r\n            var entities = termsOfService80 != null ? termsOfService80.Entities : null;\r\n            var content = new TelegramRichTextBox\r\n            {\r\n                FontSize = 17.776,\r\n                Margin = new Thickness(0.0, 11.0, 0.0, 0.0),\r\n                TextWrapping = TextWrapping.Wrap,\r\n                DataContext = new TLMessage73 { Flags = new TLInt(0), Message = termsOfService.Text, Entities = entities },\r\n                Text = termsOfService.Text.ToString()\r\n            };\r\n\r\n            ShellViewModel.ShowCustomMessageBox(\r\n                string.Empty, AppResources.TermsOfService,\r\n                AppResources.Ok.ToLowerInvariant(), null,\r\n                dismissed =>\r\n                {\r\n\r\n                },\r\n                content);\r\n        }\r\n\r\n        public void Handle(string command)\r\n        {\r\n            if (string.Equals(command, Commands.LogOutCommand))\r\n            {\r\n                ClearViewModel();\r\n            }\r\n        }\r\n\r\n        private void ClearViewModel()\r\n        {\r\n            FirstName = string.Empty;\r\n            LastName = string.Empty;\r\n            PhotoBytes = null;\r\n            IsWorking = false;\r\n        }\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/AddAdminsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Search;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class AddAdminsViewModel :\r\n        ItemsViewModelBase<TLUserBase>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChatParticipants>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChatAdmins>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChatParticipantAdmin>\r\n    {\r\n        private string _text;\r\n\r\n        public string Text\r\n        {\r\n            get { return _text; }\r\n            set { SetField(ref _text, value, () => Text); }\r\n        }\r\n\r\n        private bool _adminsEnabled;\r\n\r\n        public bool AdminsEnabled\r\n        {\r\n            get { return _adminsEnabled; }\r\n            set\r\n            {\r\n                SetField(ref _adminsEnabled, value, () => AdminsEnabled);\r\n                ToggleChatAdmins();\r\n            }\r\n        }\r\n\r\n        public bool IsEnabled\r\n        {\r\n            get { return !IsWorking; }\r\n        }\r\n\r\n        public string AddAdminsDescription\r\n        {\r\n            get { return IsEnabled ? AppResources.AdminsDescription : AppResources.MembersDescription; }\r\n        }\r\n\r\n        private readonly TLChatBase _currentChat;\r\n\r\n        public AddAdminsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Status = AppResources.Loading;\r\n\r\n            _currentChat = StateService.CurrentChat;\r\n            StateService.CurrentChat = null;\r\n\r\n            var chat = _currentChat as TLChat40;\r\n            _adminsEnabled = chat != null && chat.AdminsEnabled.Value;\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => AdminsEnabled))\r\n                {\r\n                    if (!AdminsEnabled)\r\n                    {\r\n                        foreach (var item in Items)\r\n                        {\r\n                            item.IsSelected = !AdminsEnabled;\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        UpdateAdmins(_currentChat.Participants as IChatParticipants);\r\n                    }\r\n\r\n                    NotifyOfPropertyChange(() => AddAdminsDescription);\r\n                }\r\n            };\r\n        }\r\n\r\n        public void ToggleChatAdmins()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"messages.toggleChatAdmins chat_id={0} enabled={1}\", _currentChat.Id, AdminsEnabled));\r\n            IsWorking = true;\r\n            NotifyOfPropertyChange(() => IsEnabled);\r\n            MTProtoService.ToggleChatAdminsAsync(_currentChat.Id, new TLBool(AdminsEnabled), \r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => IsEnabled);\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => IsEnabled);\r\n\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.toggleChatAdmins error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void EditChatAdmin(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n            if (user.Index == StateService.CurrentUserId) return;\r\n            if (!AdminsEnabled) return;\r\n\r\n            IsWorking = true;\r\n            user.IsSelected = !user.IsSelected;\r\n            Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"messages.editChatAdmin chat_id={0} user_id={1} is_admin={2}\", _currentChat.Id, user.Index, user.IsSelected));\r\n            MTProtoService.EditChatAdminAsync(_currentChat.Id, user.ToInputUser(), new TLBool(user.IsSelected),\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.editChatAdmin error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            Items.Clear();\r\n            LazyItems.Clear();\r\n\r\n            var chat = _currentChat;\r\n            if (chat != null)\r\n            {\r\n                var participants = chat.Participants as TLChatParticipants40;\r\n                if (participants != null)\r\n                {\r\n                    var users = new List<TLUserBase>(participants.Participants.Count);\r\n                    foreach (var participant in participants.Participants)\r\n                    {\r\n                        var user = CacheService.GetUser(participant.UserId);\r\n                        if (user != null)\r\n                        {\r\n                            var canDeleteUserFromChat = false;\r\n\r\n                            var inviter = participant as IInviter;\r\n                            if (inviter != null\r\n                                && inviter.InviterId.Value == StateService.CurrentUserId)\r\n                            {\r\n                                canDeleteUserFromChat = true;\r\n                            }\r\n\r\n                            var creator = participant as TLChatParticipantCreator;\r\n                            if (creator != null\r\n                                && creator.UserId.Value == StateService.CurrentUserId)\r\n                            {\r\n                                canDeleteUserFromChat = true;\r\n                            }\r\n\r\n                            if (participant.UserId.Value == StateService.CurrentUserId)\r\n                            {\r\n                                canDeleteUserFromChat = true;\r\n                            }\r\n\r\n                            user.DeleteActionVisibility = canDeleteUserFromChat\r\n                                ? Visibility.Visible\r\n                                : Visibility.Collapsed;\r\n                            if (AdminsEnabled)\r\n                            {\r\n                                user.IsSelected = participant is TLChatParticipantAdmin ||\r\n                                                  participant is TLChatParticipantCreator;\r\n                            }\r\n                            else\r\n                            {\r\n                                user.IsSelected = true;\r\n                            }\r\n                            users.Add(user);\r\n                        }\r\n                    }\r\n                    users = users.OrderByDescending(x => x.StatusValue).ToList();\r\n\r\n                    UpdateUsers(users, UpdateItems);\r\n\r\n                    return;\r\n                }\r\n                else\r\n                {\r\n                    UpdateItems();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UpdateUsers(List<TLUserBase> users, System.Action callback)\r\n        {\r\n            const int firstSliceCount = 3;\r\n            var secondSlice = new List<TLUserBase>();\r\n            for (var i = 0; i < users.Count; i++)\r\n            {\r\n                if (i < firstSliceCount)\r\n                {\r\n                    Items.Add(users[i]);\r\n                }\r\n                else\r\n                {\r\n                    secondSlice.Add(users[i]);\r\n                }\r\n            }\r\n            Status = Items.Count > 0 ? string.Empty : AppResources.Loading;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                foreach (var user in secondSlice)\r\n                {\r\n                    Items.Add(user);\r\n                }\r\n                callback.SafeInvoke();\r\n            });\r\n        }\r\n\r\n        private void UpdateItems()\r\n        {\r\n            if (_currentChat == null) return;\r\n\r\n            IsWorking = true;\r\n            Status = Items.Count > 0 ? string.Empty : AppResources.Loading;\r\n            MTProtoService.GetFullChatAsync(_currentChat.Id,\r\n                chatFull =>\r\n                {\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n\r\n                    var newUsersCache = new Dictionary<int, TLUserBase>();\r\n                    foreach (var user in chatFull.Users)\r\n                    {\r\n                        newUsersCache[user.Index] = user;\r\n                    }\r\n\r\n                    var participants = chatFull.FullChat.Participants as IChatParticipants;\r\n                    if (participants != null)\r\n                    {\r\n                        var usersCache = Items.ToDictionary(x => x.Index);\r\n\r\n                        var onlineUsers = 0;\r\n                        foreach (var participant in participants.Participants)\r\n                        {\r\n                            var user = newUsersCache[participant.UserId.Value];\r\n                            if (user.Status is TLUserStatusOnline)\r\n                            {\r\n                                onlineUsers++;\r\n                            }\r\n\r\n                            if (AdminsEnabled)\r\n                            {\r\n                                user.IsSelected = participant is TLChatParticipantAdmin ||\r\n                                                  participant is TLChatParticipantCreator;\r\n                            }\r\n                            else\r\n                            {\r\n                                user.IsSelected = true;\r\n                            }\r\n                            if (!usersCache.ContainsKey(user.Index))\r\n                            {\r\n                                BeginOnUIThread(() => InsertInDescOrder(Items, user));\r\n                            }\r\n                        }\r\n                        _currentChat.UsersOnline = onlineUsers;\r\n                    }\r\n\r\n                    var chatFull28 = chatFull.FullChat as TLChatFull28;\r\n                    if (chatFull28 != null)\r\n                    {\r\n                        _currentChat.ExportedInvite = chatFull28.ExportedInvite;\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n                });\r\n        }\r\n\r\n        private void InsertInDescOrder(IList<TLUserBase> users, TLUserBase user)\r\n        {\r\n            var added = false;\r\n            for (var i = 0; i < users.Count; i++)\r\n            {\r\n                if (users[i].StatusValue <= user.StatusValue)\r\n                {\r\n                    users.Insert(i, user);\r\n                    added = true;\r\n                    break;\r\n                }\r\n            }\r\n            if (!added)\r\n            {\r\n                users.Add(user);\r\n            }\r\n        }\r\n\r\n\r\n\r\n        #region Searching\r\n\r\n        private SearchUsersRequest _lastUsersRequest;\r\n\r\n        private List<TLUserBase> _source;\r\n\r\n        private readonly LRUCache<string, SearchUsersRequest> _searchResultsCache = new LRUCache<string, SearchUsersRequest>(Constants.MaxCacheCapacity);\r\n\r\n        public void Search()\r\n        {\r\n            if (_lastUsersRequest != null)\r\n            {\r\n                _lastUsersRequest.Cancel();\r\n            }\r\n\r\n            var text = Text.Trim();\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                LazyItems.Clear();\r\n                Items.Clear();\r\n                foreach (var item in _source)\r\n                {\r\n                    Items.Add(item);\r\n                }\r\n                //Status = string.IsNullOrEmpty(Text) ? AppResources.SearchAmongYourContacts : AppResources.NoResults;\r\n                return;\r\n            }\r\n\r\n            SearchUsersRequest nextUsersRequest;\r\n            if (!_searchResultsCache.TryGetValue(text, out nextUsersRequest))\r\n            {\r\n                IList<TLUserBase> source;\r\n\r\n                if (_lastUsersRequest != null\r\n                    && text.IndexOf(_lastUsersRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    source = _lastUsersRequest.Source;\r\n                }\r\n                else\r\n                {\r\n                    _source = _source ??\r\n                        Items\r\n                        .OrderBy(x => x.FullName)\r\n                        .ToList();\r\n\r\n                    source = _source;\r\n                }\r\n\r\n                nextUsersRequest = new SearchUsersRequest(text, source);\r\n            }\r\n\r\n            IsWorking = true;\r\n            nextUsersRequest.ProcessAsync(results =>\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (nextUsersRequest.IsCanceled) return;\r\n\r\n                    //Status = string.Empty;\r\n                    Items.Clear();\r\n                    LazyItems.Clear();\r\n                    if (results.Count > 0)\r\n                    {\r\n                        //Items.Add(new TLServiceText { Text = AppResources.Contacts });\r\n                    }\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        if (i < 6)\r\n                        {\r\n                            Items.Add(results[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            LazyItems.Add(results[i]);\r\n                        }\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    //Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n\r\n                    //return;\r\n\r\n                    if (LazyItems.Count > 0)\r\n                    {\r\n                        PopulateItems();\r\n                    }\r\n                }));\r\n            _searchResultsCache[nextUsersRequest.Text] = nextUsersRequest;\r\n            _lastUsersRequest = nextUsersRequest;\r\n        }\r\n\r\n        #endregion\r\n\r\n\r\n\r\n\r\n        public void Handle(TLUpdateChatParticipants updateChatParticipants)\r\n        {\r\n            if (_currentChat.Index != updateChatParticipants.Participants.ChatId.Value)\r\n            {\r\n                return;\r\n            }\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                UpdateAdmins(updateChatParticipants.Participants as IChatParticipants);\r\n            });\r\n        }\r\n\r\n        private void UpdateAdmins(IChatParticipants participants)\r\n        {\r\n            if (participants == null) return;\r\n            \r\n            var admins = new Dictionary<int, bool>();\r\n            foreach (var participant in participants.Participants)\r\n            {\r\n                if (participant is TLChatParticipant)\r\n                {\r\n                    admins[participant.UserId.Value] = false;\r\n                }\r\n                else\r\n                {\r\n                    admins[participant.UserId.Value] = true;\r\n                }\r\n            }\r\n\r\n            foreach (var item in Items)\r\n            {\r\n                bool isAdmin;\r\n                if (admins.TryGetValue(item.Index, out isAdmin))\r\n                {\r\n                    item.IsSelected = isAdmin;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateChatAdmins updateChatAdmins)\r\n        {\r\n            if (_currentChat.Index != updateChatAdmins.ChatId.Value)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _adminsEnabled = updateChatAdmins.Enabled.Value;\r\n            NotifyOfPropertyChange(() => AdminsEnabled);            \r\n        }\r\n\r\n        public void Handle(TLUpdateChatParticipantAdmin updateChatParticipantAdmin)\r\n        {\r\n            if (_currentChat.Index != updateChatParticipantAdmin.ChatId.Value)\r\n            {\r\n                return;\r\n            }\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                foreach (var item in Items)\r\n                {\r\n                    if (item.Index == updateChatParticipantAdmin.UserId.Value)\r\n                    {\r\n                        item.IsSelected = updateChatParticipantAdmin.IsAdmin.Value;\r\n                        break;\r\n                    }\r\n                }\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/AddChannelManagerViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class AddChannelManagerViewModel : ViewModelBase\r\n    {\r\n        private TLUserBase _manager;\r\n\r\n        public AddChannelManagerViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _manager = StateService.Participant;\r\n            StateService.Participant = null;\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (_manager == null) return;\r\n\r\n            StateService.Participant = _manager;\r\n            NavigationService.GoBack();        \r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/AddChatParticipantViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Search;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class AddChatParticipantViewModel : ItemsViewModelBase<TLUserBase>\r\n    {\r\n        private Visibility _inviteVisibility;\r\n\r\n        public Visibility InviteVisibility\r\n        {\r\n            get { return _inviteVisibility; }\r\n            set { SetField(ref _inviteVisibility, value, () => InviteVisibility); }\r\n        }\r\n\r\n        private AddChatParticipantConfirmationViewModel _confirmation;\r\n\r\n        public AddChatParticipantConfirmationViewModel Confirmation\r\n        {\r\n            get { return _confirmation = _confirmation ?? new AddChatParticipantConfirmationViewModel(); }\r\n        }\r\n\r\n        private readonly bool _requestForwardingCount;\r\n\r\n        private readonly Dictionary<int, TLUserBase> _removedUsers = new Dictionary<int, TLUserBase>();\r\n\r\n        private readonly TLChatBase _currentChat;\r\n\r\n        private readonly TLChannelAdminRights _currentAdminRights;\r\n\r\n        private readonly TLChannelParticipantRoleBase _currentRole;\r\n\r\n        public AddChatParticipantViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            if (StateService.CurrentAdminRights != null)\r\n            {\r\n                _currentAdminRights = StateService.CurrentAdminRights;\r\n                StateService.CurrentAdminRights = null;\r\n            }\r\n\r\n            if (StateService.CurrentRole != null)\r\n            {\r\n                _currentRole = StateService.CurrentRole;\r\n                StateService.CurrentRole = null;\r\n            }\r\n\r\n            if (StateService.CurrentChat != null)\r\n            {\r\n                _currentChat = StateService.CurrentChat;\r\n                StateService.CurrentChat = null;\r\n            }\r\n\r\n            if (StateService.RemovedUsers != null)\r\n            {\r\n                foreach (var user in StateService.RemovedUsers)\r\n                {\r\n                    _removedUsers[user.Index] = user;\r\n                }\r\n                StateService.RemovedUsers = null;\r\n            }\r\n\r\n            if (StateService.RequestForwardingCount)\r\n            {\r\n                _requestForwardingCount = true;\r\n                StateService.RequestForwardingCount = false;\r\n            }\r\n\r\n            _inviteVisibility = StateService.IsInviteVisible ? Visibility.Visible : Visibility.Collapsed;\r\n            StateService.IsInviteVisible = false;\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var firstSlice = new List<TLUserBase>();\r\n                var secondSlice = new List<TLUserBase>();\r\n                var firstSliceCount = 10;\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (isAuthorized)\r\n                {\r\n                    var contacts = CacheService.GetContacts();\r\n                    foreach (var contact in contacts.OrderBy(x => x.FullName))\r\n                    {\r\n                        if (!(contact is TLUserEmpty) && contact.Index != StateService.CurrentUserId && !_removedUsers.ContainsKey(contact.Index))\r\n                        {\r\n                            if (firstSlice.Count < firstSliceCount)\r\n                            {\r\n                                firstSlice.Add(contact);\r\n                            }\r\n                            else\r\n                            {\r\n                                secondSlice.Add(contact);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    Status = string.Empty;\r\n                    Items.Clear();\r\n                    foreach (var user in firstSlice)\r\n                    {\r\n                        Items.Add(user);\r\n                    }\r\n                    if (secondSlice.Count > 0)\r\n                    {\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            foreach (var user in secondSlice)\r\n                            {\r\n                                Items.Add(user);\r\n                            }\r\n                        });\r\n                    }\r\n\r\n                    if (StateService.RemoveBackEntry)\r\n                    {\r\n                        NavigationService.RemoveBackEntry();\r\n                        StateService.RemoveBackEntry = false;\r\n                    }\r\n\r\n                });\r\n            });\r\n        }\r\n\r\n        public void InviteGroupViaLink()\r\n        {\r\n            if (_currentChat == null) return;\r\n\r\n            StateService.CurrentChat = _currentChat;\r\n            NavigationService.UriFor<InviteLinkViewModel>().Navigate();\r\n        }\r\n\r\n        public void UserAction(TLUserBase userBase)\r\n        {\r\n            if (userBase == null) return;\r\n\r\n            var user = userBase as TLUser;\r\n            if (user != null && user.IsBot)\r\n            {\r\n                if (user.IsBotGroupsBlocked)\r\n                {\r\n                    MessageBox.Show(AppResources.AddBotToGroupsError, AppResources.Error, MessageBoxButton.OK);\r\n                    return;\r\n                }\r\n\r\n                var userName = user.FirstName;\r\n                if (TLString.IsNullOrEmpty(userName))\r\n                {\r\n                    userName = user.LastName;\r\n                }\r\n\r\n                var confirmation = MessageBox.Show(string.Format(AppResources.AddUserToTheGroup, userName, _currentChat.FullName), AppResources.AppName, MessageBoxButton.OKCancel);\r\n                if (confirmation == MessageBoxResult.OK)\r\n                {\r\n                    NavigateBackward(userBase);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n\r\n            var channel = _currentChat as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.GetParticipantAsync(channel.ToInputChannel(), userBase.ToInputUser(),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        var participantKicked = result.Participant as TLChannelParticipantBanned;\r\n                        var participant = result.Participant as TLChannelParticipant;\r\n                        if (participant != null || participantKicked != null)\r\n                        {\r\n                            //if (_currentRole is TLChannelRoleEditor)\r\n                            {\r\n                                if (participantKicked != null)\r\n                                {\r\n                                    var confirmation = channel.IsMegaGroup \r\n                                        ? MessageBox.Show(string.Format(AppResources.InviteContactToGroupConfirmation, userBase.FullName), AppResources.AppName, MessageBoxButton.OKCancel)\r\n                                        : MessageBox.Show(string.Format(AppResources.InviteContactConfirmation, userBase.FullName), AppResources.AppName, MessageBoxButton.OKCancel);\r\n                                    if (confirmation != MessageBoxResult.OK)\r\n                                    {\r\n                                        return;\r\n                                    }\r\n                                }\r\n\r\n                                NavigateBackward(userBase);\r\n                            }\r\n                        }\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"channels.getParticipant error \" + error);\r\n\r\n                        if (error.TypeEquals(ErrorType.USER_NOT_PARTICIPANT))\r\n                        {\r\n                            if (_currentAdminRights != null \r\n                                && (_currentAdminRights.InviteUsers || _currentAdminRights.InviteLinks))\r\n                            {\r\n                                var confirmation = channel.IsMegaGroup\r\n                                        ? MessageBox.Show(string.Format(AppResources.InviteContactToGroupConfirmation, userBase.FullName), AppResources.AppName, MessageBoxButton.OKCancel)\r\n                                        : MessageBox.Show(string.Format(AppResources.InviteContactConfirmation, userBase.FullName), AppResources.AppName, MessageBoxButton.OKCancel);\r\n                                if (confirmation != MessageBoxResult.OK)\r\n                                {\r\n                                    return;\r\n                                }\r\n                            }\r\n\r\n                            NavigateBackward(userBase);\r\n                        }\r\n                    }));\r\n\r\n                return;\r\n            }\r\n\r\n            if (_requestForwardingCount)\r\n            {\r\n                _confirmation.Open(userBase, _currentChat,\r\n                    result =>\r\n                    {\r\n                        if (result.Result == MessageBoxResult.OK)\r\n                        {\r\n                            NavigateBackward(userBase, result.ForwardingMessagesCount);\r\n                        }\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                NavigateBackward(userBase);\r\n            }\r\n        }\r\n\r\n        private void NavigateBackward(TLUserBase user, int forwardingMessagesCount = 0)\r\n        {\r\n            StateService.Participant = user;\r\n            StateService.ForwardingMessagesCount = forwardingMessagesCount;\r\n            NavigationService.GoBack(); \r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            StateService.CurrentChat = _currentChat;\r\n            StateService.CurrentAdminRights = _currentAdminRights;\r\n            StateService.CurrentRole = _currentRole;\r\n            StateService.RemoveBackEntry = true;\r\n            StateService.RequestForwardingCount = _requestForwardingCount;\r\n            NavigationService.UriFor<SearchContactsViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/AddSecretChatParticipantViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Logs;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class AddSecretChatParticipantViewModel : ItemsViewModelBase<TLUserBase>\r\n    {\r\n        public bool IsNotWorking { get { return !IsWorking; } }\r\n\r\n        public Visibility ProgressVisibility { get { return IsWorking ? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        public AddSecretChatParticipantViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (isAuthorized)\r\n                {\r\n                    var contacts = CacheService.GetContacts()\r\n                        .Where(x => !(x is TLUserEmpty) && x.Index != StateService.CurrentUserId)\r\n                        .OrderBy(x => x.FullName)\r\n                        .ToList();\r\n                    \r\n                    Status = string.Empty;\r\n\r\n                    var count = 0;\r\n                    const int firstSliceCount = 10;\r\n                    var secondSlice = new List<TLUserBase>();\r\n                    foreach (var contact in contacts)\r\n                    {\r\n                        if (count < firstSliceCount)\r\n                        {\r\n                            LazyItems.Add(contact);\r\n                        }\r\n                        else\r\n                        {\r\n                            secondSlice.Add(contact);\r\n                        }\r\n                        count++;\r\n                    }\r\n\r\n                    BeginOnUIThread(() => PopulateItems(() =>\r\n                    {\r\n                        foreach (var item in secondSlice)\r\n                        {\r\n                            Items.Add(item);\r\n                        }\r\n                    }));\r\n                }\r\n\r\n                GetDHConfig();\r\n            });\r\n        }\r\n\r\n        private volatile bool _isGettingConfig;\r\n\r\n        public void GetDHConfig()\r\n        {\r\n            if (_dhConfig != null) return;\r\n\r\n            _isGettingConfig = true;\r\n            MTProtoService.GetDHConfigAsync(new TLInt(0), new TLInt(0),\r\n                result =>\r\n                {\r\n                    var dhConfig = result as TLDHConfig;\r\n                    if (dhConfig == null) return;\r\n                    if (!TLUtils.CheckPrime(dhConfig.P.Data, dhConfig.G.Value))\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    var aBytes = new byte[256];\r\n                    var random = new SecureRandom();\r\n                    random.NextBytes(aBytes);\r\n                    \r\n                    var gaBytes = Telegram.Api.Services.MTProtoService.GetGB(aBytes, dhConfig.G, dhConfig.P);\r\n\r\n                    dhConfig.A = TLString.FromBigEndianData(aBytes);\r\n                    dhConfig.GA = TLString.FromBigEndianData(gaBytes);\r\n\r\n                    _isGettingConfig = false;\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        _dhConfig = dhConfig;\r\n\r\n                        if (_contact != null)\r\n                        {\r\n                            UserAction(_contact);\r\n                        }\r\n                    });\r\n                },\r\n                error =>\r\n                {\r\n                    _isGettingConfig = false;\r\n\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => IsNotWorking);\r\n                    NotifyOfPropertyChange(() => ProgressVisibility);\r\n                    Execute.ShowDebugMessage(\"messages.getDhConfig error: \" + error);\r\n                }); \r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        private TLDHConfig _dhConfig;\r\n        private TLUserBase _contact;\r\n\r\n        public TLUserBase Contact { get { return _contact; } }\r\n\r\n        public void CancelSecretChat()\r\n        {\r\n            _contact = null;\r\n\r\n            IsWorking = false;\r\n            NotifyOfPropertyChange(() => IsNotWorking);\r\n            NotifyOfPropertyChange(() => ProgressVisibility);\r\n        }\r\n\r\n        public void UserAction(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            if (_dhConfig == null)\r\n            {\r\n                IsWorking = true;\r\n                NotifyOfPropertyChange(() => IsNotWorking);\r\n                NotifyOfPropertyChange(() => ProgressVisibility);\r\n                _contact = user;\r\n\r\n                //try to get dhConfig once again\r\n                if (!_isGettingConfig)\r\n                {\r\n                    GetDHConfig();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            IsWorking = false;\r\n            NotifyOfPropertyChange(() => IsNotWorking);\r\n            NotifyOfPropertyChange(() => ProgressVisibility);\r\n\r\n            _contact = null;\r\n            CreateSecretChatCommon(user, _dhConfig, MTProtoService, CacheService, NavigationService, StateService, EventAggregator);\r\n        }\r\n\r\n        public static void CreateSecretChatCommon(TLUserBase user, TLDHConfig dhConfig, IMTProtoService mtProtoService, ICacheService cacheService, INavigationService navigationService, IStateService stateService, ITelegramEventAggregator eventAggregator)\r\n        {\r\n            if (user == null) return;\r\n\r\n            var random = new Random();\r\n            var randomId = random.Next();\r\n\r\n            mtProtoService.RequestEncryptionAsync(user.ToInputUser(), new TLInt(randomId), dhConfig.GA,\r\n                encryptedChat =>\r\n                {\r\n                    var chatWaiting = encryptedChat as TLEncryptedChatWaiting;\r\n\r\n                    if (chatWaiting != null)\r\n                    {\r\n                        var action = new TLMessageActionChatCreate();\r\n                        action.Title = TLString.Empty;\r\n                        action.Users = new TLVector<TLInt> { Items = new List<TLInt> { user.Id } };\r\n\r\n                        var dialog = new TLDialog53();\r\n                        dialog.Flags = new TLInt(0);\r\n                        dialog.ReadOutboxMaxId = new TLInt(0);\r\n                        dialog.ReadInboxMaxId = new TLInt(0);\r\n                        dialog.With = user;\r\n                        dialog.Peer = new TLPeerUser { Id = user.Id };\r\n\r\n                        var topMessage = new TLMessageService17();\r\n                        topMessage.Date = chatWaiting.Date;\r\n                        topMessage.FromId = chatWaiting.AdminId;\r\n                        topMessage.ToId = new TLPeerUser { Id = user.Id };\r\n                        topMessage.Out = new TLBool(true);\r\n                        topMessage.Action = action;\r\n                        topMessage.SetUnread(new TLBool(false));\r\n\r\n                        chatWaiting.A = dhConfig.A;\r\n                        chatWaiting.P = dhConfig.P;\r\n                        chatWaiting.G = dhConfig.G;\r\n                    }\r\n\r\n                    stateService.RemoveBackEntry = true;\r\n                    stateService.With = chatWaiting;\r\n                    stateService.Participant = user;\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        stateService.AnimateTitle = true;\r\n                        navigationService.UriFor<SecretDialogDetailsViewModel>().Navigate();\r\n                    });\r\n\r\n\r\n                    //syncing chat and message\r\n                    cacheService.SyncEncryptedChat(chatWaiting, eventAggregator.Publish);\r\n\r\n                    var message = new TLDecryptedMessageService17\r\n                    {\r\n                        RandomId = TLLong.Random(),\r\n                        //RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n                        ChatId = chatWaiting.Id,\r\n                        Action = new TLDecryptedMessageActionEmpty(),\r\n                        FromId = new TLInt(stateService.CurrentUserId),\r\n                        Date = chatWaiting.Date,\r\n                        Out = new TLBool(false),\r\n                        Unread = new TLBool(false),\r\n                        Status = MessageStatus.Read\r\n                    };\r\n\r\n                    cacheService.SyncDecryptedMessage(message, chatWaiting, result => { });\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.requestEncryption error \" + error);\r\n                });\r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            StateService.RemoveBackEntry = true;\r\n            StateService.NavigateToSecretChat = true;\r\n            StateService.DHConfig = _dhConfig;\r\n            NavigationService.UriFor<SearchContactsViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/ChannelAdministratorsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class ChannelAdministratorsViewModel : ItemDetailsViewModelBase\r\n    {\r\n        public ObservableCollection<TLUserBase> Items { get; set; }\r\n\r\n        private string _status;\r\n\r\n        public string Status\r\n        {\r\n            get { return _status; }\r\n            set { SetField(ref _status, value, () => Status); }\r\n        }\r\n\r\n        public string AddAdministratorHint\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && channel.IsMegaGroup\r\n                    ? AppResources.GroupAdministratorsHint\r\n                    : AppResources.ChannelAdministratorsHint;\r\n            }\r\n        }\r\n\r\n        private string _selectedChatInviteItem;\r\n\r\n        public string SelectedChatInviteItem\r\n        {\r\n            get { return _selectedChatInviteItem; }\r\n            set { SetField(ref _selectedChatInviteItem, value, () => SelectedChatInviteItem); }\r\n        }\r\n\r\n        public void SetSelectedSound(string sound)\r\n        {\r\n            _selectedChatInviteItem = sound;\r\n        }\r\n\r\n        public List<string> ChatInviteItems { get; protected set; }\r\n\r\n        public ChannelAdministratorsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            CurrentItem = StateService.CurrentChat;\r\n            StateService.CurrentChat = null;\r\n\r\n            ChatInviteItems = new List<string>\r\n            {\r\n                AppResources.AllMembers.ToLowerInvariant(),\r\n                AppResources.OnlyAdmins.ToLowerInvariant()\r\n            };\r\n            var channel = CurrentItem as TLChannel44;\r\n            _selectedChatInviteItem = channel != null && channel.IsDemocracy? ChatInviteItems[0] : ChatInviteItems[1];\r\n\r\n            Items = new ObservableCollection<TLUserBase>();\r\n\r\n            Status = AppResources.Loading;\r\n\r\n            PropertyChanged += (sender, e) =>\r\n            {\r\n                if (Property.NameEquals(e.PropertyName, () => SelectedChatInviteItem))\r\n                {\r\n                    channel = CurrentItem as TLChannel44;\r\n                    if (channel == null) return;\r\n                    var enabled = SelectedChatInviteItem == ChatInviteItems[0];\r\n                    IsWorking = true;\r\n                    MTProtoService.ToggleInvitesAsync(channel.ToInputChannel(), new TLBool(enabled), \r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            Execute.ShowDebugMessage(\"channels.toggleInvites error \" + error);\r\n                        }));\r\n                }\r\n            };\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            base.OnDeactivate(close);\r\n\r\n            StateService.UpdateChannelAdministrators = true;\r\n        }\r\n\r\n        public static TLChannelAdminRights GetDefaultAdminRights(bool supergroup, TLChannelParticipantRoleBase role)\r\n        {\r\n            if (role is TLChannelRoleEditor)\r\n            {\r\n                var rights = new TLChannelAdminRights { Flags = new TLInt(0) };\r\n                if (supergroup)\r\n                {\r\n                    rights.ChannelInfo = true;\r\n                    rights.DeleteMessages = true;\r\n                    rights.BanUsers = true;\r\n                    rights.InviteLinks = true;\r\n                    rights.PinMessages = true;\r\n                    rights.AddAdmins = false;\r\n                }\r\n                else\r\n                {\r\n                    rights.ChannelInfo = true;\r\n                    rights.PostMessages = true;\r\n                    rights.EditMessages = true;\r\n                    rights.DeleteMessages = true;\r\n                    rights.InviteUsers = true;\r\n                    rights.AddAdmins = false;\r\n                }\r\n            }\r\n\r\n            return new TLChannelAdminRights{Flags = new TLInt(0)};\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            UpdateItems();\r\n\r\n            if (StateService.Participant != null)\r\n            {\r\n                var participant = StateService.Participant;\r\n                StateService.Participant = null;\r\n\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel == null) return;\r\n\r\n                var rights = GetDefaultAdminRights(channel.IsMegaGroup, new TLChannelRoleEditor());\r\n\r\n                IsWorking = true;\r\n                MTProtoService.EditAdminAsync(channel, participant.ToInputUser(), rights,\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        var updates = result as TLUpdates;\r\n                        if (updates != null)\r\n                        {\r\n                            var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewChannelMessage) as TLUpdateNewChannelMessage;\r\n                            if (updateNewMessage != null)\r\n                            {\r\n                                EventAggregator.Publish(updateNewMessage.Message);\r\n                            }\r\n                        }\r\n                        Items.Insert(0, participant);\r\n                        var channelParticipants = channel.ChannelParticipants;\r\n                        if (channelParticipants != null)\r\n                        {\r\n                            var user = channelParticipants.Users.FirstOrDefault(x => x.Index == participant.Index);\r\n                            if (user == null)\r\n                            {\r\n                                channelParticipants.Users.Add(participant);\r\n                                channelParticipants.Participants.Add(new TLChannelParticipantAdmin\r\n                                {\r\n                                    Flags = new TLInt(0),\r\n                                    CanEdit = true,\r\n                                    UserId = participant.Id,\r\n                                    InviterId = new TLInt(StateService.CurrentUserId),\r\n                                    PromotedById = new TLInt(StateService.CurrentUserId),\r\n                                    Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                                    AdminRights = rights\r\n                                });\r\n                                channelParticipants.Count = new TLInt(channelParticipants.Count.Value + 1);\r\n                            }\r\n                        }\r\n                        Status = Items.Count > 0 ? string.Empty : AppResources.NoUsersHere;\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                        {\r\n                            if (error.TypeEquals(ErrorType.ADMINS_TOO_MUCH))\r\n                            {\r\n                                MessageBox.Show(AppResources.AdminsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                            }\r\n                        }\r\n\r\n                        Execute.ShowDebugMessage(\"channels.editAdmin error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private void UpdateItems()\r\n        {\r\n            if (_once) return;\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null) return;\r\n\r\n            IsWorking = true;\r\n            Status = Items.Count > 0? string.Empty : AppResources.Loading;\r\n            MTProtoService.GetParticipantsAsync(channel.ToInputChannel(), new TLChannelParticipantsAdmins(), new TLInt(0), new TLInt(200), new TLInt(0),\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    var channelParticipants = result as TLChannelParticipants;\r\n                    if (channelParticipants != null)\r\n                    {\r\n                        _once = true;\r\n                        IsWorking = false;\r\n\r\n                        Items.Clear();\r\n                        foreach (var user in channelParticipants.Users)\r\n                        {\r\n                            Items.Add(user);\r\n                        }\r\n                        Status = Items.Count > 0 ? string.Empty : AppResources.NoUsersHere;\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n                    Execute.ShowDebugMessage(\"channels.getParticipants error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void AddMember()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null || channel.IsForbidden) return;\r\n\r\n            StateService.IsInviteVisible = false;\r\n            StateService.CurrentChat = channel;\r\n            StateService.CurrentRole = new TLChannelRoleEditor();\r\n            StateService.CurrentAdminRights = GetDefaultAdminRights(channel.IsMegaGroup, new TLChannelRoleEditor());\r\n            StateService.RemovedUsers = Items;\r\n            StateService.RequestForwardingCount = false;\r\n            NavigationService.UriFor<AddChatParticipantViewModel>().Navigate();\r\n        }\r\n\r\n        public void DeleteMember(TLUserBase user)\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null) return;\r\n\r\n            if (user == null) return;\r\n\r\n            var rights = new TLChannelAdminRights{ Flags = new TLInt(0) };\r\n\r\n            IsWorking = true;\r\n            MTProtoService.EditAdminAsync(channel, user.ToInputUser(), rights, \r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    Items.Remove(user);\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    Execute.ShowDebugMessage(\"channels.editAdmin error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void Invite()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null || channel.IsForbidden) return;\r\n\r\n            StateService.CurrentChat = channel;\r\n            NavigationService.UriFor<InviteLinkViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/ChannelIntroViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class ChannelIntroViewModel : Screen\r\n    {\r\n        public Uri ImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                return isLightTheme ?\r\n                    new Uri(\"/Images/Startup/intro.channel.white-WXGA.png\", UriKind.Relative) :\r\n                    new Uri(\"/Images/Startup/intro.channel.black-WXGA.png\", UriKind.Relative);\r\n            }\r\n        }\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        private readonly INavigationService _navigationService;\r\n\r\n        private static readonly object _channelIntroFileSyncRoot = new object();\r\n\r\n        public ChannelIntroViewModel(IStateService stateService, INavigationService navigationService)\r\n        {\r\n            _stateService = stateService;\r\n            _navigationService = navigationService;\r\n        }\r\n\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            if (_stateService.RemoveBackEntry)\r\n            {\r\n                _stateService.RemoveBackEntry = false;\r\n                _navigationService.RemoveBackEntry();\r\n            }\r\n        }\r\n\r\n        public void CreateChannel()\r\n        {\r\n            _stateService.RemoveBackEntry = true;\r\n            _navigationService.UriFor<CreateChannelStep1ViewModel>().Navigate();\r\n\r\n            SetIntroDisabledAsync();\r\n        }\r\n\r\n        private static void SetIntroDisabledAsync()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                lock (_channelIntroFileSyncRoot)\r\n                {\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        store.CreateFile(Constants.ChannelIntroFileName);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public static void CheckIntroEnabledAsync(Action<bool> callback)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n\r\n                var exists = false;\r\n\r\n                try\r\n                {\r\n                    lock (_channelIntroFileSyncRoot)\r\n                    {\r\n                        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                        {\r\n                            exists = store.FileExists(Constants.ChannelIntroFileName);\r\n                        }\r\n                    }\r\n                }\r\n                catch (Exception e)\r\n                {\r\n\r\n                }\r\n\r\n                callback.SafeInvoke(!exists); \r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/ChannelMembersViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.ObjectModel;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class ChannelMembersViewModel : ItemDetailsViewModelBase\r\n    {\r\n        public bool IsPublic\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n\r\n                return channel != null && channel.IsPublic;\r\n            }\r\n        }\r\n\r\n        public ObservableCollection<TLUserBase> Items { get; set; }\r\n\r\n        private string _status;\r\n\r\n        public string Status\r\n        {\r\n            get { return _status; }\r\n            set { SetField(ref _status, value, () => Status); }\r\n        }\r\n\r\n        public ChannelMembersViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            CurrentItem = StateService.CurrentChat;\r\n            StateService.CurrentChat = null;\r\n\r\n            Items = new ObservableCollection<TLUserBase>();\r\n\r\n            Status = AppResources.Loading;\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            UpdateItems();\r\n\r\n            if (StateService.Participant != null)\r\n            {\r\n                var participant = StateService.Participant;\r\n                StateService.Participant = null;\r\n\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel == null) return;\r\n\r\n                IsWorking = true;\r\n                MTProtoService.InviteToChannelAsync(channel.ToInputChannel(), new TLVector<TLInputUserBase>{ participant.ToInputUser() }, \r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (channel.ParticipantsCount != null)\r\n                        {\r\n                            channel.ParticipantsCount = new TLInt(channel.ParticipantsCount.Value + 1);\r\n                        }\r\n                        CacheService.Commit();\r\n\r\n                        IsWorking = false;\r\n\r\n                        Items.Insert(0, participant);\r\n                        Status = Items.Count > 0 ? string.Empty : AppResources.NoUsersHere;\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                        {\r\n                            //MessageBox.Show(AppResources.PeerFloodAddContact, AppResources.Error, MessageBoxButton.OK);\r\n                            ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodAddContact, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                                result =>\r\n                                {\r\n                                    if (result == CustomMessageBoxResult.RightButton)\r\n                                    {\r\n                                        TelegramViewBase.NavigateToUsername(MTProtoService, Constants.SpambotUsername, null, null, null);\r\n                                    }\r\n                                });\r\n                        }\r\n                        else if (error.TypeEquals(ErrorType.USERS_TOO_MUCH))\r\n                        {\r\n                            MessageBox.Show(AppResources.UsersTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (error.TypeEquals(ErrorType.USER_CHANNELS_TOO_MUCH))\r\n                        {\r\n                            MessageBox.Show(AppResources.UserChannelsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (error.TypeEquals(ErrorType.BOTS_TOO_MUCH))\r\n                        {\r\n                            MessageBox.Show(AppResources.BotsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (error.TypeEquals(ErrorType.USER_NOT_MUTUAL_CONTACT))\r\n                        {\r\n                            MessageBox.Show(AppResources.UserNotMutualContact, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n\r\n                        Execute.ShowDebugMessage(\"channels.inviteToChannel error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private void UpdateItems()\r\n        {\r\n            if (_once) return;\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null) return;\r\n\r\n            IsWorking = true;\r\n            Status = Items.Count > 0 ? string.Empty : AppResources.Loading;\r\n            MTProtoService.GetParticipantsAsync(channel.ToInputChannel(), new TLChannelParticipantsRecent(), new TLInt(0), new TLInt(200), new TLInt(0), \r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var channelParticipants = result as TLChannelParticipants;\r\n                    if (channelParticipants != null)\r\n                    {\r\n                        _once = true;\r\n                        IsWorking = false;\r\n                        Items.Clear();\r\n                        foreach (var user in channelParticipants.Users)\r\n                        {\r\n                            Items.Add(user);\r\n                        }\r\n                        Status = Items.Count > 0 ? string.Empty : AppResources.NoUsersHere;\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n\r\n                    Execute.ShowDebugMessage(\"channels.getParticipants error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void AddMember()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null || channel.IsForbidden) return;\r\n\r\n            StateService.IsInviteVisible = false;\r\n            StateService.CurrentChat = channel;\r\n            StateService.RemovedUsers = Items;\r\n            StateService.RequestForwardingCount = false;\r\n            NavigationService.UriFor<AddChatParticipantViewModel>().Navigate();\r\n        }\r\n\r\n        public void DeleteMember(TLUserBase user)\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null || channel.IsForbidden) return;\r\n\r\n            if (user == null) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.KickFromChannelAsync(channel, user.ToInputUser(), TLBool.True,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    Items.Remove(user);\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    Execute.ShowDebugMessage(\"channels.getParticipants error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void Invite()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null || channel.IsForbidden) return;\r\n\r\n            StateService.CurrentChat = channel;\r\n            NavigationService.UriFor<InviteLinkViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/Chat2ViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class Chat2ViewModel\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/ChatDetailsViewModel.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing System.Linq;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Action = System.Action;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing TiltEffect = Microsoft.Phone.Controls.TiltEffect;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class ChatDetailsViewModel : ItemsViewModelBase<TLUserBase>, \r\n        Telegram.Api.Aggregator.IHandle<TLMessageBase>,\r\n        Telegram.Api.Aggregator.IHandle<UploadableItem>, \r\n        Telegram.Api.Aggregator.IHandle<TLUpdateNotifySettings>, \r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChannel>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChatParticipants>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChatAdmins>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChatParticipantAdmin>,\r\n        Telegram.Api.Aggregator.IHandle<TLChannel>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserStatus>\r\n    {\r\n\r\n        public bool IsUpgradeAvailable { get; set; }\r\n\r\n        public bool IsActivateAvailable\r\n        {\r\n            get\r\n            {\r\n                var chat = CurrentItem as TLChat40;\r\n                return chat != null && chat.Creator && chat.Deactivated;\r\n            }\r\n        }\r\n\r\n        public string UpgradeDescription\r\n        {\r\n            get { return string.Format(AppResources.UpgradeToSupergroupDescription, 1000); }\r\n        }\r\n\r\n        public string MembersSubtitle\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    var count = channel.ParticipantsCount;\r\n                    if (count != null)\r\n                    {\r\n                        return count.Value == 0\r\n                            ? AppResources.NoUsers.ToLowerInvariant()\r\n                            : Language.Declension(\r\n                                count.Value,\r\n                                AppResources.UserNominativeSingular,\r\n                                AppResources.UserNominativePlural,\r\n                                AppResources.UserGenitiveSingular,\r\n                                AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public string AdministratorsSubtitle\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    var count = channel.AdminsCount;\r\n                    if (count != null)\r\n                    {\r\n                        return count.Value == 0\r\n                            ? AppResources.NoUsers.ToLowerInvariant()\r\n                            : Language.Declension(\r\n                                count.Value,\r\n                                AppResources.UserNominativeSingular,\r\n                                AppResources.UserNominativePlural,\r\n                                AppResources.UserGenitiveSingular,\r\n                                AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public string KickedUsersSubtitle\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    var count = channel.KickedCount;\r\n                    if (count != null)\r\n                    {\r\n                        return count.Value == 0\r\n                            ? AppResources.NoUsers.ToLowerInvariant()\r\n                            : Language.Declension(\r\n                                count.Value,\r\n                                AppResources.UserNominativeSingular,\r\n                                AppResources.UserNominativePlural,\r\n                                AppResources.UserGenitiveSingular,\r\n                                AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public string DeleteAndExitGroupString\r\n        {\r\n            get\r\n            {\r\n                if (IsMegaGroup) return AppResources.LeaveGroup;\r\n                if (IsChannel) return AppResources.LeaveChannel;\r\n\r\n                return AppResources.DeleteAndExitGroup;\r\n            }\r\n        }\r\n\r\n        public bool IsDeleteAndExitVisible\r\n        {\r\n            get\r\n            {\r\n                var channel = _currentItem as TLChannel;\r\n                if (channel != null && !channel.Creator && !channel.Left.Value)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                var broadcast = _currentItem as TLBroadcastChat;\r\n                if (broadcast == null)\r\n                {\r\n                    return true;\r\n                }\r\n                \r\n                return false;\r\n            }\r\n        }\r\n\r\n        private TimerSpan _selectedSpan;\r\n\r\n        public TimerSpan SelectedSpan\r\n        {\r\n            get { return _selectedSpan; }\r\n            set\r\n            {\r\n                _selectedSpan = value;\r\n\r\n                if (_selectedSpan != null)\r\n                {\r\n                    if (_selectedSpan.Seconds == 0\r\n                        || _selectedSpan.Seconds == int.MaxValue)\r\n                    {\r\n                        MuteUntil = _selectedSpan.Seconds;\r\n                    }\r\n                    else\r\n                    {\r\n                        var now = DateTime.Now;\r\n                        var muteUntil = now.AddSeconds(_selectedSpan.Seconds);\r\n\r\n                        MuteUntil = muteUntil < now ? 0 : TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, muteUntil).Value;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public IList<TimerSpan> Spans { get; protected set; } \r\n\r\n        private TLChatBase _currentItem;\r\n\r\n        public TLChatBase CurrentItem\r\n        {\r\n            get { return _currentItem; }\r\n            set { SetField(ref _currentItem, value, () => CurrentItem); }\r\n        }\r\n\r\n        public bool IsChannel\r\n        {\r\n            get { return CurrentItem is TLChannel; }\r\n        }\r\n\r\n        public bool IsMegaGroup\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return (channel != null && channel.IsMegaGroup);\r\n            }\r\n        }\r\n\r\n        public bool CanViewParticipants\r\n        {\r\n            get\r\n            {\r\n                return !IsChannel || IsMegaGroup;\r\n            }\r\n        }\r\n\r\n        public bool IsChannelAdministrator\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && (channel.Creator || channel.IsEditor);\r\n            }\r\n        }\r\n\r\n        public bool IsChannelParticipantsButtonEnabled\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && !channel.IsMegaGroup && (channel.Creator || channel.IsEditor);\r\n            }\r\n        }\r\n\r\n        public bool IsReportButtonEnabled\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && !TLString.IsNullOrEmpty(channel.UserName) && !channel.Creator ;\r\n            }\r\n        }\r\n\r\n        public bool CanEditChat\r\n        {\r\n            get\r\n            {\r\n                var chat = CurrentItem as TLChat40;\r\n\r\n                return chat != null && (chat.Creator || chat.Admin.Value || !chat.AdminsEnabled.Value);\r\n            }\r\n        }\r\n\r\n        public bool CanAddChatParticipants\r\n        {\r\n            get\r\n            {\r\n                var chat = CurrentItem as TLChat40;\r\n\r\n                return chat != null && (chat.Creator || chat.Admin.Value || !chat.AdminsEnabled.Value);\r\n            }\r\n        }\r\n\r\n        public bool CanEditChannel\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && (channel.Creator || (channel.IsMegaGroup && channel.IsEditor));\r\n            }\r\n        }\r\n\r\n        public bool CanAddChannelParticipants\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && (channel.Creator || channel.IsDemocracy || (channel.IsMegaGroup && channel.IsEditor));\r\n            }\r\n        }\r\n\r\n        public string Link\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null && !TLString.IsNullOrEmpty(channel.UserName))\r\n                {\r\n                    return \"t.me/\" + channel.UserName;\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        private bool _suppressUpdating = true;\r\n\r\n        private int _muteUntil;\r\n\r\n        public int MuteUntil\r\n        {\r\n            get { return _muteUntil; }\r\n            set { SetField(ref _muteUntil, value, () => MuteUntil); }\r\n        }\r\n\r\n        private string _selectedSound;\r\n\r\n        public string SelectedSound\r\n        {\r\n            get { return _selectedSound; }\r\n            set { SetField(ref _selectedSound, value, () => SelectedSound); }\r\n        }\r\n\r\n        public void SetSelectedSound(string sound)\r\n        {\r\n            _selectedSound = sound;\r\n        }\r\n\r\n        public List<string> Sounds { get; protected set; }\r\n\r\n        private string _subtitle;\r\n\r\n        public string Subtitle\r\n        {\r\n            get { return _subtitle; }\r\n            set { SetField(ref _subtitle, value, () => Subtitle); }\r\n        }\r\n\r\n        private string _subtitle2;\r\n\r\n        public string Subtitle2\r\n        {\r\n            get { return _subtitle2; }\r\n            set { SetField(ref _subtitle2, value, () => Subtitle2); }\r\n        }\r\n\r\n        private string _subtitle3;\r\n\r\n        public string Subtitle3\r\n        {\r\n            get { return _subtitle3; }\r\n            set { SetField(ref _subtitle3, value, () => Subtitle3); }\r\n        }\r\n\r\n        private readonly IUploadFileManager _uploadManager;\r\n\r\n        public ProfilePhotoViewerViewModel ProfilePhotoViewer { get; set; }\r\n\r\n        public ChatDetailsViewModel(IUploadFileManager uploadManager, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Spans = new List<TimerSpan>\r\n            {\r\n                new TimerSpan(AppResources.Enabled, string.Empty, 0, AppResources.Enabled),\r\n                new TimerSpan(AppResources.HourNominativeSingular,  \"1\", (int)TimeSpan.FromHours(1.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"1\", AppResources.HourNominativeSingular).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.HourGenitivePlural, \"8\", (int)TimeSpan.FromHours(8.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"8\", AppResources.HourGenitivePlural).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.DayNominativePlural, \"2\", (int)TimeSpan.FromDays(2.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"2\", AppResources.DayNominativePlural).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.Disabled, string.Empty, int.MaxValue, AppResources.Disabled),\r\n            };\r\n            _selectedSpan = Spans[0];\r\n\r\n            _notificationTimer = new DispatcherTimer();\r\n            _notificationTimer.Interval = TimeSpan.FromSeconds(Constants.NotificationTimerInterval);\r\n            _notificationTimer.Tick += OnNotificationTimerTick;\r\n\r\n            _uploadManager = uploadManager;\r\n            eventAggregator.Subscribe(this);\r\n\r\n            DisplayName = LowercaseConverter.Convert(AppResources.Profile);\r\n            \r\n            Items = new ObservableCollection<TLUserBase>();\r\n\r\n\r\n            UpdateNotificationSettings();\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => MuteUntil)\r\n                    && !_suppressUpdating)\r\n                {\r\n                    UpdateNotifySettingsAsync();\r\n                }\r\n\r\n                if (Property.NameEquals(args.PropertyName, () => SelectedSound)\r\n                   && !_suppressUpdating)\r\n                {\r\n                    NotificationsViewModel.PlaySound(SelectedSound);\r\n\r\n                    UpdateNotifySettingsAsync();\r\n                }\r\n            };\r\n        }\r\n\r\n        public void CopyLink()\r\n        {\r\n            if (string.IsNullOrEmpty(Link)) return;\r\n\r\n            Clipboard.SetText(\"https://\" + Link);\r\n        }\r\n\r\n        private void UpdateUsers(List<TLUserBase> users, Action callback)\r\n        {\r\n            const int firstSliceCount = 3;\r\n            var secondSlice = new List<TLUserBase>();\r\n            for (var i = 0; i < users.Count; i++)\r\n            {\r\n                if (i < firstSliceCount)\r\n                {\r\n                    //users[i].IsAdmin = false;\r\n                    Items.Add(users[i]);\r\n                }\r\n                else\r\n                {\r\n                    secondSlice.Add(users[i]);\r\n                }\r\n            }\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                foreach (var user in secondSlice)\r\n                {\r\n                    //user.IsAdmin = false;\r\n                    Items.Add(user);\r\n                }\r\n                callback.SafeInvoke();\r\n            });\r\n        }\r\n\r\n        private void UpdateNotifySettingsAsync()\r\n        {\r\n            if (CurrentItem == null) return;\r\n\r\n            var notifySettings = new TLInputPeerNotifySettings48\r\n            {\r\n                EventsMask = new TLInt(1),\r\n                MuteUntil = new TLInt(MuteUntil),\r\n                ShowPreviews = new TLBool(true),\r\n                Sound = string.IsNullOrEmpty(SelectedSound) ? new TLString(\"default\") : new TLString(SelectedSound)\r\n            };\r\n\r\n            IsWorking = true;\r\n            MTProtoService.UpdateNotifySettingsAsync(\r\n                CurrentItem.ToInputNotifyPeer(), notifySettings,\r\n                result =>\r\n                {\r\n                    IsWorking = false;\r\n                    CurrentItem.NotifySettings = new TLPeerNotifySettings48\r\n                    {\r\n                        EventsMask = new TLInt(1),\r\n                        MuteUntil = new TLInt(MuteUntil),\r\n                        ShowPreviews = notifySettings.ShowPreviews,\r\n                        Sound = notifySettings.Sound\r\n                    };\r\n\r\n                    var channel = CurrentItem as TLChannel;\r\n                    var peer = channel != null\r\n                        ? (TLPeerBase) new TLPeerChannel {Id = CurrentItem.Id}\r\n                        : new TLPeerChat {Id = CurrentItem.Id};\r\n                    var dialog = CacheService.GetDialog(peer);\r\n\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog.NotifySettings = CurrentItem.NotifySettings;\r\n                        dialog.NotifyOfPropertyChange(() => dialog.NotifySettings);\r\n                        dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                        var settings = dialog.With as INotifySettings;\r\n                        if (settings != null)\r\n                        {\r\n                            settings.NotifySettings = CurrentItem.NotifySettings;\r\n                        }\r\n                    }\r\n\r\n                    CacheService.Commit();\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"account.updateNotifySettings error: \" + error);\r\n                });\r\n        }\r\n\r\n        public void UpdateChannelAdministrators(TLChannel channel)\r\n        {\r\n            StateService.UpdateSubtitle = true;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetParticipantsAsync(channel.ToInputChannel(), new TLChannelParticipantsAdmins(), new TLInt(0), new TLInt(200), new TLInt(0),\r\n                result =>\r\n                {\r\n                    var channelParticipants = result as TLChannelParticipants;\r\n                    if (channelParticipants != null)\r\n                    {\r\n                        var admins = new Dictionary<int, int>();\r\n\r\n                        foreach (var participant in channelParticipants.Participants)\r\n                        {\r\n                            var creator = participant as TLChannelParticipantCreator;\r\n                            if (creator != null)\r\n                            {\r\n                                admins[creator.UserId.Value] = creator.UserId.Value;\r\n                            }\r\n\r\n                            var editor = participant as TLChannelParticipantAdmin;\r\n                            if (editor != null)\r\n                            {\r\n                                admins[editor.UserId.Value] = editor.UserId.Value;\r\n                            }\r\n                        }\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            foreach (var user in Items)\r\n                            {\r\n                                user.IsAdmin = admins.ContainsKey(user.Index);\r\n                                user.NotifyOfPropertyChange(() => user.IsAdmin);\r\n                            }\r\n\r\n                            var usersCache = new Dictionary<int, int>();\r\n                            foreach (var item in Items)\r\n                            {\r\n                                usersCache[item.Index] = item.Index;\r\n                            }\r\n\r\n                            foreach (var admin in channelParticipants.Users)\r\n                            {\r\n                                if (!usersCache.ContainsKey(admin.Index))\r\n                                {\r\n                                    admin.IsAdmin = true;\r\n\r\n                                    InsertInDescOrder(Items, admin);\r\n                                }\r\n                            }\r\n\r\n                            Status = Items.Count > 0 ? string.Empty : AppResources.NoUsersHere;\r\n                        });\r\n                    }\r\n                },\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n\r\n                    Execute.ShowDebugMessage(\"channels.getParticipants error \" + error);\r\n                }));\r\n        }\r\n\r\n        private readonly object _participantsSyncRoot = new object();\r\n\r\n        public void UpdateChannelItems(TLChannel channel)\r\n        {\r\n            IsWorking = true;\r\n            MTProtoService.GetParticipantsAsync(channel.ToInputChannel(), new TLChannelParticipantsRecent(), new TLInt(0), new TLInt(200), new TLInt(0),\r\n                result =>\r\n                {\r\n                    var channelParticipants = result as TLChannelParticipants;\r\n                    if (channelParticipants != null)\r\n                    {\r\n                        channel.ChannelParticipants = channelParticipants;\r\n\r\n                        var admins = new Dictionary<int, int>();\r\n\r\n                        foreach (var participant in channelParticipants.Participants)\r\n                        {\r\n                            var creator = participant as TLChannelParticipantCreator;\r\n                            if (creator != null)\r\n                            {\r\n                                admins[creator.UserId.Value] = creator.UserId.Value;\r\n                            }\r\n\r\n                            var editor = participant as TLChannelParticipantAdmin;\r\n                            if (editor != null)\r\n                            {\r\n                                admins[editor.UserId.Value] = editor.UserId.Value;\r\n                            }\r\n                        }\r\n\r\n                        var users = channelParticipants.Users.OrderByDescending(x => x.StatusValue).ToList();\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            Items.Clear();\r\n                            foreach (var user in users)\r\n                            {\r\n                                user.IsAdmin = admins.ContainsKey(user.Index);\r\n                                Items.Add(user);\r\n                            }\r\n                            Status = Items.Count > 0 ? string.Empty : AppResources.NoUsersHere;\r\n\r\n                            UpdateNotificationSettings();\r\n                            UpdateTitles();\r\n                        });\r\n                    }\r\n                },\r\n                error => \r\n                {\r\n                    if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST)\r\n                        && TLRPCError.TypeEquals(error, ErrorType.CHAT_ADMIN_REQUIRED))\r\n                    {\r\n                        channel.ChannelParticipants = null;\r\n                        FileUtils.Delete(_participantsSyncRoot, channel.ChannelParticipantsFileName);\r\n                    }\r\n                    \r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Status = string.Empty;\r\n\r\n                        Execute.ShowDebugMessage(\"channels.getParticipants error \" + error);\r\n                    });\r\n                });\r\n        }\r\n\r\n        private void UpdateItems()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null && channel.IsMegaGroup)\r\n            {\r\n                UpdateChannelItems(channel);\r\n\r\n                return;\r\n            }\r\n\r\n            if (CurrentItem is TLBroadcastChat)\r\n            {\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetFullChatAsync(CurrentItem.Id,\r\n                chatFull =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var newUsersCache = new Dictionary<int, TLUserBase>();\r\n                    foreach (var user in chatFull.Users)\r\n                    {\r\n                        newUsersCache[user.Index] = user;\r\n                    }\r\n\r\n                    var participants = chatFull.FullChat.Participants as IChatParticipants;\r\n                    if (participants != null)\r\n                    {\r\n                        var usersCache = Items.ToDictionary(x => x.Index);\r\n\r\n                        var onlineUsers = 0;\r\n\r\n                        var chat40 = CurrentItem as TLChat40;\r\n                        var adminsEnabled = chat40 != null && chat40.AdminsEnabled.Value;\r\n                        foreach (var participant in participants.Participants)\r\n                        {\r\n                            var user = newUsersCache[participant.UserId.Value];\r\n\r\n                            user.IsAdmin = IsChatAdmin(participant, adminsEnabled);\r\n\r\n                            if (user.Status is TLUserStatusOnline)\r\n                            {\r\n                                onlineUsers++;\r\n                            }\r\n\r\n                            if (!usersCache.ContainsKey(user.Index))\r\n                            {\r\n                                BeginOnUIThread(() => InsertInDescOrder(Items, user));\r\n                            }\r\n                        }\r\n                        CurrentItem.UsersOnline = onlineUsers;\r\n                    }\r\n\r\n                    var chatFull28 = chatFull.FullChat as TLChatFull28;\r\n                    if (chatFull28 != null)\r\n                    {\r\n                        CurrentItem.ExportedInvite = chatFull28.ExportedInvite;\r\n                    }\r\n\r\n                    UpdateNotificationSettings();\r\n                    UpdateTitles();\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                });\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        private void InsertInDescOrder(IList<TLUserBase> users, TLUserBase user)\r\n        {\r\n            var added = false;\r\n            for (var i = 0; i < users.Count; i++)\r\n            {\r\n                if (users[i].StatusValue <= user.StatusValue)\r\n                {\r\n                    users.Insert(i, user);\r\n                    added = true;\r\n                    break;\r\n                }\r\n            }\r\n            if (!added)\r\n            {\r\n                users.Add(user);\r\n            }\r\n        }\r\n\r\n        private string GetChatSubtitle3()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (!TLString.IsNullOrEmpty(channel.About))\r\n                {\r\n                    return channel.About.ToString();\r\n                }\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        private string GetChatSubtitle2()\r\n        {\r\n            if (IsChannel)\r\n            {\r\n                return string.Empty;\r\n            }\r\n\r\n            var usersCount = Items.Count;\r\n            var onlineUsersCount = Items.Count(x => x.Status is TLUserStatusOnline);\r\n\r\n            var currentUser = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n            var isCurrentUserOnline = currentUser != null && currentUser.Status is TLUserStatusOnline;\r\n            if (usersCount == 1 || (onlineUsersCount == 1 && isCurrentUserOnline))\r\n            {\r\n                onlineUsersCount = 0;\r\n            }\r\n\r\n            return onlineUsersCount > 0 ? string.Format(\"{0} {1}\", onlineUsersCount, AppResources.Online.ToLowerInvariant()) : string.Empty;\r\n        }\r\n\r\n        private string GetChatSubtitle()\r\n        {\r\n            //if (IsChannel)\r\n            //{\r\n            //    return \"channel\";\r\n            //}\r\n\r\n            var chat = CurrentItem as TLChat;\r\n            if (chat != null)\r\n            {\r\n                var participantsCount = chat.ParticipantsCount.Value;\r\n                \r\n                return Language.Declension(\r\n                    participantsCount,\r\n                    AppResources.CompanyNominativeSingular,\r\n                    AppResources.CompanyNominativePlural,\r\n                    AppResources.CompanyGenitiveSingular,\r\n                    AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n\r\n\r\n                if (channel.ParticipantsCount != null)\r\n                {\r\n                    var participantsCount = channel.ParticipantsCount.Value;\r\n\r\n                    return Language.Declension(\r\n                        participantsCount,\r\n                        AppResources.CompanyNominativeSingular,\r\n                        AppResources.CompanyNominativePlural,\r\n                        AppResources.CompanyGenitiveSingular,\r\n                        AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                }\r\n\r\n                if (channel.ChannelParticipants != null)\r\n                {\r\n                    var participantsCount = channel.ChannelParticipants.Count.Value;\r\n\r\n                    return Language.Declension(\r\n                        participantsCount,\r\n                        AppResources.CompanyNominativeSingular,\r\n                        AppResources.CompanyNominativePlural,\r\n                        AppResources.CompanyGenitiveSingular,\r\n                        AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                }\r\n\r\n                if (channel.IsMegaGroup)\r\n                {\r\n                    return AppResources.Loading.ToLowerInvariant();\r\n                }\r\n\r\n                return channel.IsPublic\r\n                    ? AppResources.PublicChannel.ToLowerInvariant()\r\n                    : AppResources.PrivateChannel.ToLowerInvariant();\r\n            }\r\n\r\n\r\n            var broadcastChat = CurrentItem as TLBroadcastChat;\r\n            if (broadcastChat != null)\r\n            {\r\n                var participantsCount = broadcastChat.ParticipantIds.Count;\r\n\r\n                return Language.Declension(\r\n                    participantsCount,\r\n                    AppResources.CompanyNominativeSingular,\r\n                    AppResources.CompanyNominativePlural,\r\n                    AppResources.CompanyGenitiveSingular,\r\n                    AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n\r\n\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public void UpdateNotificationSettings()\r\n        {\r\n\r\n            var chat = CurrentItem;\r\n            if (chat != null && chat.NotifySettings != null)\r\n            {\r\n                var notifySettings = chat.NotifySettings as TLPeerNotifySettings;\r\n                if (notifySettings != null)\r\n                {\r\n                    _suppressUpdating = true;\r\n\r\n                    MuteUntil = notifySettings.MuteUntil.Value;\r\n\r\n                    var sound = StateService.Sounds.FirstOrDefault(x => string.Equals(x, notifySettings.Sound.Value, StringComparison.OrdinalIgnoreCase));\r\n                    SelectedSound = sound ?? StateService.Sounds[0];\r\n\r\n                    _suppressUpdating = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        #region Notification timer\r\n        private readonly DispatcherTimer _notificationTimer;\r\n\r\n        public void StartTimer()\r\n        {\r\n            _notificationTimer.Start();\r\n        }\r\n\r\n        public void StopTimer()\r\n        {\r\n            _notificationTimer.Stop();\r\n        }\r\n\r\n        private void OnNotificationTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            if (MuteUntil > 0 && MuteUntil < int.MaxValue)\r\n            {\r\n                NotifyOfPropertyChange(() => MuteUntil);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region Actions\r\n\r\n        public void SelectSpan(TimerSpan selectedSpan)\r\n        {\r\n            SelectedSpan = selectedSpan;\r\n        }\r\n\r\n        public void SelectNotificationSpan()\r\n        {\r\n            //StateService.SelectedTimerSpan = SelectedSpan;\r\n            NavigationService.UriFor<ChooseNotificationSpanViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenLink()\r\n        {\r\n            StateService.ShareLink = \"https://\" + Link;\r\n            StateService.ShareMessage = \"https://\" + Link;\r\n            StateService.ShareCaption = AppResources.Share;\r\n            NavigationService.UriFor<ShareViewModel>().Navigate();\r\n        }\r\n\r\n        public void AddParticipant()\r\n        {\r\n            if (CurrentItem.IsForbidden) return;\r\n\r\n            var chat = CurrentItem as TLChat40;\r\n            var channel = CurrentItem as TLChannel;\r\n            \r\n            StateService.IsInviteVisible = (chat != null && chat.Creator) || (channel != null && channel.IsMegaGroup && channel.Creator);\r\n            StateService.CurrentChat = CurrentItem;\r\n            StateService.RemovedUsers = Items;\r\n            StateService.RequestForwardingCount = CurrentItem is TLChat;\r\n            NavigationService.UriFor<AddChatParticipantViewModel>().Navigate();\r\n        }\r\n\r\n        public void DeleteParticipant(TLUserBase user)\r\n        {\r\n            if (CurrentItem.IsForbidden) return;\r\n            if (user == null) return;\r\n\r\n            var broadcast = CurrentItem as TLBroadcastChat;\r\n            var channel = CurrentItem as TLChannel;\r\n            if (broadcast != null && channel == null)\r\n            {\r\n                var broadcastChat = (TLBroadcastChat) CurrentItem;\r\n\r\n                var serviceMessage = new TLMessageService17\r\n                {\r\n                    ToId = new TLPeerBroadcast {Id = broadcastChat.Id},\r\n                    FromId = new TLInt(StateService.CurrentUserId),\r\n                    Out = new TLBool(true),\r\n                    Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                    Action = new TLMessageActionChatDeleteUser {UserId = user.Id}\r\n                };\r\n                serviceMessage.SetUnread(new TLBool(false));\r\n\r\n                for (var i = 0; i < broadcastChat.ParticipantIds.Count; i++)\r\n                {\r\n                    if (user.Id.Value == broadcastChat.ParticipantIds[i].Value)\r\n                    {\r\n                        broadcastChat.ParticipantIds.RemoveAt(i);\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                broadcastChat.ParticipantIds.Remove(user.Id);\r\n\r\n                CacheService.SyncBroadcast(broadcastChat, \r\n                    result =>\r\n                    {\r\n                        EventAggregator.Publish(serviceMessage);\r\n                        UpdateTitles();            \r\n                    });\r\n            }\r\n            else\r\n            {\r\n                if (user.Index == StateService.CurrentUserId)\r\n                {\r\n                    DeleteAndExitGroup();\r\n                    return;\r\n                }\r\n\r\n                if (channel != null)\r\n                {\r\n                    IsWorking = true;\r\n                    MTProtoService.KickFromChannelAsync(channel, user.ToInputUser(), TLBool.True,\r\n                        updatesBase =>\r\n                        {\r\n                            IsWorking = false;\r\n                            BeginOnUIThread(() => Items.Remove(user));\r\n\r\n                            var updates = updatesBase as TLUpdates;\r\n                            if (updates != null)\r\n                            {\r\n                                var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewChannelMessage) as TLUpdateNewChannelMessage;\r\n                                if (updateNewMessage != null)\r\n                                {\r\n                                    EventAggregator.Publish(updateNewMessage.Message);\r\n                                }\r\n                            }\r\n                            UpdateTitles();\r\n                        },\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.deleteChatUser error \" + error);\r\n                            IsWorking = false;\r\n                        });\r\n                    return;\r\n                }\r\n\r\n                IsWorking = true;\r\n                MTProtoService.DeleteChatUserAsync(CurrentItem.Id, user.ToInputUser(),\r\n                    statedMessage =>\r\n                    {\r\n                        IsWorking = false;\r\n                        BeginOnUIThread(() => Items.Remove(user));\r\n\r\n                        var updates = statedMessage as TLUpdates;\r\n                        if (updates != null)\r\n                        {\r\n                            var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                            if (updateNewMessage != null)\r\n                            {\r\n                                EventAggregator.Publish(updateNewMessage.Message);\r\n                            }\r\n                        }\r\n                        UpdateTitles();\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.deleteChatUser error \" + error);\r\n                        IsWorking = false;\r\n                    });\r\n            }\r\n        }\r\n\r\n        public void MessageUser(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            StateService.With = user;\r\n            StateService.RemoveBackEntries = true;\r\n            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n        }\r\n\r\n        public void ViewUser(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            StateService.CurrentContact = user;\r\n            NavigationService.UriFor<ContactViewModel>().Navigate();\r\n        }\r\n\r\n        private TLPhotoBase GetPhoto()\r\n        {\r\n            var chat = CurrentItem as TLChat;\r\n            if (chat != null) return chat.Photo;\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null) return channel.Photo;\r\n\r\n            return null;\r\n        }\r\n\r\n        public void OpenPhoto()\r\n        {\r\n            var chat = CurrentItem as TLChat;\r\n            var channel = CurrentItem as TLChannel;\r\n            if (chat == null && channel == null) return;\r\n\r\n            var photoBase = GetPhoto();\r\n\r\n            var photo = photoBase as TLChatPhoto;\r\n            if (photo != null)\r\n            {\r\n                StateService.CurrentPhoto = photo;\r\n                StateService.CurrentChat = CurrentItem;\r\n\r\n                if (ProfilePhotoViewer == null)\r\n                {\r\n                    ProfilePhotoViewer = new ProfilePhotoViewerViewModel(StateService, MTProtoService);\r\n                    NotifyOfPropertyChange(() => ProfilePhotoViewer);\r\n                }\r\n\r\n                BeginOnUIThread(() => ProfilePhotoViewer.OpenViewer());\r\n                return;\r\n            }\r\n\r\n            var photoEmpty = photoBase as TLChatPhotoEmpty;\r\n            if (photoEmpty != null)\r\n            {\r\n                if ((chat != null && !chat.Left.Value)\r\n                    || (channel != null && channel.Creator))\r\n                {\r\n                    EditChatActions.EditPhoto(result =>\r\n                    {\r\n                        var fileId = TLLong.Random();\r\n                        IsWorking = true;\r\n                        _uploadManager.UploadFile(fileId, CurrentItem, result);\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public void SetPhoto()\r\n        {\r\n            var chat = CurrentItem as TLChat;\r\n            var channel = CurrentItem as TLChannel;\r\n            if (chat == null && channel == null) return;\r\n\r\n            if ((chat != null && !chat.Left.Value)\r\n                || (channel != null && channel.Creator))\r\n            {\r\n                EditChatActions.EditPhoto(result =>\r\n                {\r\n                    var fileId = TLLong.Random();\r\n                    IsWorking = true;\r\n                    _uploadManager.UploadFile(fileId, CurrentItem, result);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void OpenMedia()\r\n        {\r\n            if (CurrentItem == null) return;\r\n\r\n            StateService.CurrentInputPeer = CurrentItem;\r\n            NavigationService.UriFor<FullMediaViewModel>().Navigate();\r\n        }\r\n\r\n        public void Report()\r\n        {\r\n            Report(CurrentItem.ToInputPeer());\r\n        }\r\n\r\n        public void OpenMembers()\r\n        {\r\n            StateService.CurrentChat = CurrentItem;\r\n            NavigationService.UriFor<ChannelMembersViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenAdministrators()\r\n        {\r\n            StateService.CurrentChat = CurrentItem;\r\n            NavigationService.UriFor<ChannelAdministratorsViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenKickedUsers()\r\n        {\r\n            StateService.CurrentChat = CurrentItem;\r\n            NavigationService.UriFor<ChannelBlockedContactsViewModel>().Navigate();\r\n        }\r\n\r\n        public void UpgradeGroup()\r\n        {\r\n            var confirmation = MessageBox.Show(AppResources.UpgradeToSupergroupConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.MigrateChatAsync(\r\n                CurrentItem.Id,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var updates = result as TLUpdates;\r\n                    if (updates != null)\r\n                    {\r\n                        var channel = updates.Chats.FirstOrDefault(x => x is TLChannel) as TLChannel;\r\n                        if (channel != null)\r\n                        {\r\n                            var migratedFromMaxId = new TLInt(0);\r\n                            var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                            if (updateNewMessage != null)\r\n                            {\r\n                                migratedFromMaxId = updateNewMessage.Message.Id;\r\n                            }\r\n                            channel.MigratedFromChatId = CurrentItem.Id;\r\n                            channel.MigratedFromMaxId = migratedFromMaxId;\r\n\r\n                            var addedChannel = CacheService.GetDialog(new TLPeerChannel {Id = channel.Id});\r\n                            if (addedChannel != null)\r\n                            {\r\n                                EventAggregator.Publish(new DialogAddedEventArgs(addedChannel));\r\n                            }\r\n                            var removedChat = CacheService.GetDialog(new TLPeerChat {Id = CurrentItem.Id});\r\n                            if (removedChat != null)\r\n                            {\r\n                                EventAggregator.Publish(new DialogRemovedEventArgs(removedChat));\r\n                            }\r\n\r\n                            StateService.With = channel;\r\n                            StateService.RemoveBackEntries = true;\r\n                            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n                        }\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.migrateChat error \" + error);\r\n                }));\r\n\r\n            return;\r\n        }\r\n\r\n        public void DeleteAndExitGroup()\r\n        {\r\n            MessageBoxResult confirmation;\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                confirmation = IsMegaGroup\r\n                    ? MessageBox.Show(AppResources.LeaveGroupConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel)\r\n                    : MessageBox.Show(AppResources.LeaveChannelConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                if (confirmation != MessageBoxResult.OK) return;\r\n\r\n                IsWorking = true;\r\n                MTProtoService.LeaveChannelAsync(\r\n                    channel,\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        NavigationService.RemoveBackEntry();\r\n\r\n                        var dialog = CacheService.GetDialog(new TLPeerChannel { Id = CurrentItem.Id });\r\n                        if (dialog != null)\r\n                        {\r\n                            CacheService.DeleteDialog(dialog);\r\n                            DialogsViewModel.UnpinFromStart(dialog);\r\n                            EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                        }\r\n\r\n                        NavigationService.GoBack();\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        if (error.TypeEquals(ErrorType.CHANNEL_PRIVATE)\r\n                            || error.TypeEquals(ErrorType.USER_NOT_PARTICIPANT))\r\n                        {\r\n                            NavigationService.RemoveBackEntry();\r\n\r\n                            var dialog = CacheService.GetDialog(new TLPeerChannel { Id = CurrentItem.Id });\r\n                            if (dialog != null)\r\n                            {\r\n                                CacheService.DeleteDialog(dialog);\r\n                                DialogsViewModel.UnpinFromStart(dialog);\r\n                                EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                            }\r\n\r\n                            NavigationService.GoBack();\r\n                        }\r\n                        Execute.ShowDebugMessage(\"cnannels.leaveChannel error \" + error);\r\n                    }));\r\n\r\n                return;\r\n            }\r\n\r\n            confirmation = MessageBox.Show(AppResources.DeleteAndExitConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            DialogsViewModel.DeleteAndExitDialogCommon(\r\n                CurrentItem,\r\n                MTProtoService,\r\n                () => BeginOnUIThread(() =>\r\n                {\r\n                    NavigationService.RemoveBackEntry();\r\n\r\n                    var dialog = CacheService.GetDialog(new TLPeerChat { Id = CurrentItem.Id });\r\n                    if (dialog != null)\r\n                    {\r\n                        CacheService.DeleteDialog(dialog);\r\n                        DialogsViewModel.UnpinFromStart(dialog);\r\n                        EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                    }\r\n                    NavigationService.GoBack();\r\n                }),\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"DeleteAndExitGroupCommon error \" + error);\r\n                });\r\n        }\r\n\r\n        public void UpdateTitles()\r\n        {\r\n            NotifyOfPropertyChange(() => MembersSubtitle);\r\n            NotifyOfPropertyChange(() => AdministratorsSubtitle);\r\n            NotifyOfPropertyChange(() => KickedUsersSubtitle);\r\n        }\r\n\r\n        public void UpdateSubtitles()\r\n        {\r\n            Subtitle = GetChatSubtitle();\r\n            Subtitle2 = GetChatSubtitle2();\r\n            Subtitle3 = GetChatSubtitle3();\r\n        }\r\n        #endregion\r\n\r\n        public void Handle(TLMessageBase message)\r\n        {\r\n            var serviceMessage = message as TLMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null && channel.Index == serviceMessage.ToId.Id.Value)\r\n                {\r\n                    var chatDeletePhotoAction = serviceMessage.Action as TLMessageActionChatDeletePhoto;\r\n                    if (chatDeletePhotoAction != null)\r\n                    {\r\n                        channel.NotifyOfPropertyChange(() => channel.Photo);\r\n                        return;\r\n                    }\r\n\r\n                    var chatDeleteUserAction = serviceMessage.Action as TLMessageActionChatDeleteUser;\r\n                    if (chatDeleteUserAction != null)\r\n                    {\r\n                        HandleDeleteUserAction(chatDeleteUserAction);\r\n                        return;\r\n                    }\r\n\r\n                    var chatAddUserAction = serviceMessage.Action as TLMessageActionChatAddUser41;\r\n                    if (chatAddUserAction != null)\r\n                    {\r\n                        HandleAddUserAction(chatAddUserAction);\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var chat = CurrentItem as TLChat;\r\n                if (chat != null && chat.Index == serviceMessage.ToId.Id.Value)\r\n                {\r\n                    var chatDeletePhotoAction = serviceMessage.Action as TLMessageActionChatDeletePhoto;\r\n                    if (chatDeletePhotoAction != null)\r\n                    {\r\n                        chat.NotifyOfPropertyChange(() => chat.Photo);\r\n                        return;\r\n                    }\r\n\r\n                    var chatDeleteUserAction = serviceMessage.Action as TLMessageActionChatDeleteUser;\r\n                    if (chatDeleteUserAction != null)\r\n                    {\r\n                        HandleDeleteUserAction(chatDeleteUserAction);\r\n                        return;\r\n                    }\r\n\r\n                    var chatAddUserAction = serviceMessage.Action as TLMessageActionChatAddUser41;\r\n                    if (chatAddUserAction != null)\r\n                    {\r\n                        HandleAddUserAction(chatAddUserAction);\r\n                        return;\r\n                    }\r\n                }\r\n\r\n\r\n                var broadcastChat = CurrentItem as TLBroadcastChat;\r\n                if (broadcastChat != null && broadcastChat.Index == serviceMessage.ToId.Id.Value)\r\n                {\r\n                    var chatDeleteUserAction = serviceMessage.Action as TLMessageActionChatDeleteUser;\r\n                    if (chatDeleteUserAction != null)\r\n                    {\r\n                        HandleDeleteUserAction(chatDeleteUserAction);\r\n                        return;\r\n                    }\r\n\r\n                    var chatAddUserAction = serviceMessage.Action as TLMessageActionChatAddUser41;\r\n                    if (chatAddUserAction != null)\r\n                    {\r\n                        HandleAddUserAction(chatAddUserAction);\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void HandleAddUserAction(TLMessageActionChatAddUser41 chatAddUserAction)\r\n        {\r\n            var cachedUsers = new List<TLUserBase>();\r\n            foreach (var userId in chatAddUserAction.Users)\r\n            {\r\n                var cachedUser = CacheService.GetUser(userId);\r\n                if (cachedUser != null)\r\n                {\r\n                    cachedUsers.Add(cachedUser);\r\n                }\r\n            }\r\n\r\n            if (cachedUsers.Count > 0)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var cachedUser in cachedUsers)\r\n                    {\r\n                        InsertInDescOrder(Items, cachedUser);\r\n                    }\r\n                    UpdateTitles();\r\n                });\r\n            }\r\n        }\r\n\r\n        private void HandleDeleteUserAction(TLMessageActionChatDeleteUser chatDeleteUserAction)\r\n        {\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (Items[i].Index == chatDeleteUserAction.UserId.Value)\r\n                {\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        Items.RemoveAt(i);\r\n                        UpdateTitles();\r\n                    });\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n            if (item.Owner == CurrentItem)\r\n            {\r\n                IsWorking = false;\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateNotifySettings updateNotifySettings)\r\n        {\r\n            var notifyPeer = updateNotifySettings.Peer as TLNotifyPeer;\r\n            if (notifyPeer != null)\r\n            {\r\n                var peer = notifyPeer.Peer;\r\n                if (peer is TLPeerChat\r\n                    && peer.Id.Value == CurrentItem.Index)\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        CurrentItem.NotifySettings = updateNotifySettings.NotifySettings;\r\n                        var notifySettings = updateNotifySettings.NotifySettings as TLPeerNotifySettings;\r\n                        if (notifySettings != null)\r\n                        {\r\n                            _suppressUpdating = true;\r\n                            MuteUntil = notifySettings.MuteUntil.Value;\r\n                            _suppressUpdating = false;\r\n                        }\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            Items.Clear();\r\n            LazyItems.Clear();\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null && channel.IsMegaGroup)\r\n            {\r\n                var participants = channel.ChannelParticipants;\r\n                if (participants != null)\r\n                {\r\n                    var admins = new Dictionary<int, int>();\r\n\r\n                    foreach (var participant in participants.Participants)\r\n                    {\r\n                        var creator = participant as TLChannelParticipantCreator;\r\n                        if (creator != null)\r\n                        {\r\n                            admins[creator.UserId.Value] = creator.UserId.Value;\r\n                        }\r\n\r\n                        var editor = participant as TLChannelParticipantAdmin;\r\n                        if (editor != null)\r\n                        {\r\n                            admins[editor.UserId.Value] = editor.UserId.Value;\r\n                        }\r\n                    }\r\n\r\n                    var users = new List<TLUserBase>();\r\n                    foreach (var user in participants.Users)\r\n                    {\r\n                        user.IsAdmin = admins.ContainsKey(user.Index);\r\n                        users.Add(user);\r\n                    }\r\n                    users = users.OrderByDescending(x => x.StatusValue).ToList();\r\n\r\n                    UpdateUsers(users, UpdateItems);\r\n\r\n                    return;\r\n                }\r\n                else\r\n                {\r\n                    UpdateItems();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var chat = CurrentItem;\r\n            if (chat != null)\r\n            {\r\n                var participants = chat.Participants as TLChatParticipants40;\r\n                if (participants != null)\r\n                {\r\n                    var users = new List<TLUserBase>(participants.Participants.Count);\r\n                    var chat40 = CurrentItem as TLChat40;\r\n                    var adminsEnabled = chat40 != null && chat40.AdminsEnabled.Value;\r\n                    foreach (var participant in participants.Participants)\r\n                    {\r\n                        var user = CacheService.GetUser(participant.UserId);\r\n                        if (user != null)\r\n                        {\r\n                            user.IsAdmin = IsChatAdmin(participant, adminsEnabled);\r\n\r\n                            var canDeleteUserFromChat = false;\r\n\r\n                            var inviter = participant as IInviter;\r\n                            if (inviter != null\r\n                                && inviter.InviterId.Value == StateService.CurrentUserId)\r\n                            {\r\n                                canDeleteUserFromChat = true;\r\n                            }\r\n\r\n                            var creator = participant as TLChatParticipantCreator;\r\n                            if (creator != null\r\n                                && creator.UserId.Value == StateService.CurrentUserId)\r\n                            {\r\n                                canDeleteUserFromChat = true;\r\n                            }\r\n\r\n                            if (participant.UserId.Value == StateService.CurrentUserId)\r\n                            {\r\n                                canDeleteUserFromChat = true;\r\n                            }\r\n\r\n                            user.DeleteActionVisibility = canDeleteUserFromChat\r\n                                ? Visibility.Visible\r\n                                : Visibility.Collapsed;\r\n\r\n                            users.Add(user);\r\n                        }\r\n                    }\r\n                    users = users.OrderByDescending(x => x.StatusValue).ToList();\r\n\r\n                    UpdateUsers(users, UpdateItems);\r\n\r\n                    return;\r\n                }\r\n                else\r\n                {\r\n                    UpdateItems();\r\n                }\r\n            }\r\n\r\n            var broadcastChat = CurrentItem as TLBroadcastChat;\r\n            if (broadcastChat != null && channel == null)\r\n            {\r\n                var users = new List<TLUserBase>(broadcastChat.ParticipantIds.Count);\r\n                var count = 0;\r\n                foreach (var participantId in broadcastChat.ParticipantIds)\r\n                {\r\n                    var user = CacheService.GetUser(participantId);\r\n                    if (user != null)\r\n                    {\r\n                        user.DeleteActionVisibility = Visibility.Visible;\r\n                        if (count < 4)\r\n                        {\r\n                            user.IsAdmin = false;\r\n                            Items.Add(user);\r\n                            count++;\r\n                        }\r\n                        else\r\n                        {\r\n                            users.Add(user);\r\n                        }\r\n                    }\r\n                }\r\n                users = users.OrderByDescending(x => x.StatusValue).ToList();\r\n\r\n                UpdateUsers(users, UpdateItems);\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateChannel updateChannel)\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (channel.Id.Value == updateChannel.ChannelId.Value)\r\n                {\r\n                    NotifyOfPropertyChange(() => IsChannelAdministrator);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateChatParticipants updateChatParticipants)\r\n        {\r\n            if (updateChatParticipants.Participants.ChatId.Value == CurrentItem.Index)\r\n            {\r\n                var chat40 = CurrentItem as TLChat40;\r\n                var adminsEnabled = chat40 != null && chat40.AdminsEnabled.Value;\r\n\r\n                var adminsCache = GetAdminsCache(updateChatParticipants.Participants, adminsEnabled);\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var item in Items)\r\n                    {\r\n                        item.IsAdmin = adminsCache.ContainsKey(item.Index);\r\n                        item.NotifyOfPropertyChange(() => item.IsAdmin);\r\n                    }\r\n\r\n                    NotifyOfPropertyChange(() => CanEditChat);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateChatAdmins updateChatAdmins)\r\n        {\r\n            if (updateChatAdmins.ChatId.Value == CurrentItem.Index)\r\n            {\r\n                var adminsCache = GetAdminsCache(CurrentItem.Participants, updateChatAdmins.Enabled.Value);\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var item in Items)\r\n                    {\r\n                        item.IsAdmin = adminsCache.ContainsKey(item.Index);\r\n                        item.NotifyOfPropertyChange(() => item.IsAdmin);\r\n                    }\r\n\r\n                    NotifyOfPropertyChange(() => CanEditChat);\r\n                });\r\n            }\r\n        }\r\n\r\n        private Dictionary<int, int> GetAdminsCache(TLChatParticipantsBase participants, bool adminsEnabled)\r\n        {\r\n            var adminsCache = new Dictionary<int, int>();\r\n            var chatParticipants = participants as TLChatParticipants40;\r\n            if (chatParticipants != null)\r\n            {\r\n                foreach (var participant in chatParticipants.Participants)\r\n                {\r\n                    if (IsChatAdmin(participant, adminsEnabled))\r\n                    {\r\n                        adminsCache[participant.UserId.Value] = participant.UserId.Value;\r\n                    }\r\n                }\r\n            }\r\n            return adminsCache;\r\n        }\r\n\r\n        private static bool IsChatAdmin(TLChatParticipantBase participant, bool adminsEnabled)\r\n        {\r\n            if (adminsEnabled)\r\n            {\r\n                if (participant is TLChatParticipantAdmin || participant is TLChatParticipantCreator)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (participant is TLChatParticipantCreator)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public void Handle(TLUpdateChatParticipantAdmin updateChatParticipantAdmin)\r\n        {\r\n            if (updateChatParticipantAdmin.ChatId.Value == CurrentItem.Index)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var user = Items.FirstOrDefault(x => x.Index == updateChatParticipantAdmin.UserId.Value);\r\n                    if (user != null)\r\n                    {\r\n                        var chat40 = CurrentItem as TLChat40;\r\n                        var adminsEnabled = chat40 != null && chat40.AdminsEnabled.Value;\r\n                        if (adminsEnabled)\r\n                        {\r\n                            user.IsAdmin = updateChatParticipantAdmin.IsAdmin.Value;\r\n                            user.NotifyOfPropertyChange(() => user.IsAdmin);\r\n                        }\r\n                        else\r\n                        {\r\n                            user.IsAdmin = false;\r\n                            user.NotifyOfPropertyChange(() => user.IsAdmin);\r\n                        }\r\n                    }\r\n\r\n                    NotifyOfPropertyChange(() => CanEditChat);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLChannel channel)\r\n        {\r\n            if (CurrentItem is TLChannel && CurrentItem.Index == channel.Index)\r\n            {\r\n                Execute.BeginOnUIThread(UpdateTitles);\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateUserStatus updateUserStatus)\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null && channel.IsMegaGroup)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    TLUserBase user = null;\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (Items[i].Index == updateUserStatus.UserId.Value)\r\n                        {\r\n                            user = Items[i];\r\n                            user._status = updateUserStatus.Status;\r\n\r\n                            Items.RemoveAt(i);\r\n                            UpdateTitles();\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (user != null)\r\n                    {\r\n                        InsertInDescOrder(Items, user);\r\n                        user.NotifyOfPropertyChange(() => user.StatusCommon);\r\n                    }\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            var chat41 = CurrentItem as TLChat41;\r\n            if (chat41 != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    TLUserBase user = null;\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (Items[i].Index == updateUserStatus.UserId.Value)\r\n                        {\r\n                            user = Items[i];\r\n                            user._status = updateUserStatus.Status;\r\n\r\n                            Items.RemoveAt(i);\r\n                            UpdateTitles();\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (user != null)\r\n                    {\r\n                        InsertInDescOrder(Items, user);\r\n                        user.NotifyOfPropertyChange(() => user.StatusCommon);\r\n                    }\r\n                });\r\n\r\n                return;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/ChatViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views;\r\nusing TelegramClient.Views.Contacts;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class ChatViewModel : ItemsViewModelBase<TLUserBase>,\r\n        Telegram.Api.Aggregator.IHandle<TLMessageBase>,\r\n        Telegram.Api.Aggregator.IHandle<UploadableItem>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateNotifySettings>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChannel>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChatParticipants>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChatAdmins>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChatParticipantAdmin>,\r\n        Telegram.Api.Aggregator.IHandle<TLChannel>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserStatus>\r\n    {\r\n        public bool IsUpgradeAvailable { get; set; }\r\n\r\n        public bool IsActivateAvailable\r\n        {\r\n            get\r\n            {\r\n                var chat = CurrentItem as TLChat40;\r\n                return chat != null && chat.Creator && chat.Deactivated;\r\n            }\r\n        }\r\n\r\n        public string UpgradeDescription\r\n        {\r\n            get { return string.Format(AppResources.UpgradeToSupergroupDescription, 1000); }\r\n        }\r\n\r\n        public string MembersSubtitle\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    var count = channel.ParticipantsCount;\r\n                    if (count != null)\r\n                    {\r\n                        return count.Value == 0\r\n                            ? AppResources.NoUsers.ToLowerInvariant()\r\n                            : Language.Declension(\r\n                                count.Value,\r\n                                AppResources.UserNominativeSingular,\r\n                                AppResources.UserNominativePlural,\r\n                                AppResources.UserGenitiveSingular,\r\n                                AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public string AdministratorsSubtitle\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    var count = channel.AdminsCount;\r\n                    if (count != null)\r\n                    {\r\n                        return count.Value == 0\r\n                            ? AppResources.NoUsers.ToLowerInvariant()\r\n                            : Language.Declension(\r\n                                count.Value,\r\n                                AppResources.UserNominativeSingular,\r\n                                AppResources.UserNominativePlural,\r\n                                AppResources.UserGenitiveSingular,\r\n                                AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public string KickedUsersSubtitle\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    var count = channel.KickedCount;\r\n                    if (count != null)\r\n                    {\r\n                        return count.Value == 0\r\n                            ? AppResources.NoUsers.ToLowerInvariant()\r\n                            : Language.Declension(\r\n                                count.Value,\r\n                                AppResources.UserNominativeSingular,\r\n                                AppResources.UserNominativePlural,\r\n                                AppResources.UserGenitiveSingular,\r\n                                AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public string DeleteAndExitGroupString\r\n        {\r\n            get\r\n            {\r\n                if (IsMegaGroup) return AppResources.LeaveGroup;\r\n                if (IsChannel) return AppResources.LeaveChannel;\r\n\r\n                return AppResources.DeleteAndExitGroup;\r\n            }\r\n        }\r\n\r\n        public bool IsDeleteAndExitVisible\r\n        {\r\n            get\r\n            {\r\n                var channel = _currentItem as TLChannel;\r\n                if (channel != null && !channel.Creator && !channel.Left.Value)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                var broadcast = _currentItem as TLBroadcastChat;\r\n                if (broadcast == null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        private TimerSpan _selectedSpan;\r\n\r\n        public TimerSpan SelectedSpan\r\n        {\r\n            get { return _selectedSpan; }\r\n            set\r\n            {\r\n                _selectedSpan = value;\r\n\r\n                if (_selectedSpan != null)\r\n                {\r\n                    if (_selectedSpan.Seconds == 0\r\n                        || _selectedSpan.Seconds == int.MaxValue)\r\n                    {\r\n                        MuteUntil = _selectedSpan.Seconds;\r\n                    }\r\n                    else\r\n                    {\r\n                        var now = DateTime.Now;\r\n                        var muteUntil = now.AddSeconds(_selectedSpan.Seconds);\r\n\r\n                        MuteUntil = muteUntil < now ? 0 : TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, muteUntil).Value;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public IList<TimerSpan> Spans { get; protected set; }\r\n\r\n        private TLChatBase _currentItem;\r\n\r\n        public TLChatBase CurrentItem\r\n        {\r\n            get { return _currentItem; }\r\n            set { SetField(ref _currentItem, value, () => CurrentItem); }\r\n        }\r\n\r\n        public bool IsChannel\r\n        {\r\n            get { return CurrentItem is TLChannel; }\r\n        }\r\n\r\n        public bool IsMegaGroup\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return (channel != null && channel.IsMegaGroup);\r\n            }\r\n        }\r\n\r\n        public bool CanViewParticipants\r\n        {\r\n            get\r\n            {\r\n                return !IsChannel || IsMegaGroup;\r\n            }\r\n        }\r\n\r\n        public bool IsChannelAdministrator\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && (channel.Creator || channel.IsEditor);\r\n            }\r\n        }\r\n\r\n        public bool IsChannelParticipantsButtonEnabled\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && !channel.IsMegaGroup && (channel.Creator || channel.IsEditor);\r\n            }\r\n        }\r\n\r\n        public bool IsReportButtonEnabled\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && !TLString.IsNullOrEmpty(channel.UserName) && !channel.Creator;\r\n            }\r\n        }\r\n\r\n        public bool CanEditChat\r\n        {\r\n            get\r\n            {\r\n                var chat = CurrentItem as TLChat40;\r\n\r\n                return chat != null && (chat.Creator || chat.Admin.Value || !chat.AdminsEnabled.Value);\r\n            }\r\n        }\r\n\r\n        public bool CanAddChatParticipants\r\n        {\r\n            get\r\n            {\r\n                var chat = CurrentItem as TLChat40;\r\n\r\n                return chat != null && (chat.Creator || chat.Admin.Value || !chat.AdminsEnabled.Value);\r\n            }\r\n        }\r\n\r\n        public bool CanEditChannel\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && (channel.Creator || (channel.IsMegaGroup && channel.IsEditor));\r\n            }\r\n        }\r\n\r\n        public bool CanAddChannelParticipants\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && (channel.Creator || channel.IsDemocracy || (channel.IsMegaGroup && channel.IsEditor));\r\n            }\r\n        }\r\n\r\n        public string Link\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null && !TLString.IsNullOrEmpty(channel.UserName))\r\n                {\r\n                    return \"t.me/\" + channel.UserName;\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        private bool _suppressUpdating = true;\r\n\r\n        private int _muteUntil;\r\n\r\n        public int MuteUntil\r\n        {\r\n            get { return _muteUntil; }\r\n            set { SetField(ref _muteUntil, value, () => MuteUntil); }\r\n        }\r\n\r\n        private string _selectedSound;\r\n\r\n        public string SelectedSound\r\n        {\r\n            get { return _selectedSound; }\r\n            set { SetField(ref _selectedSound, value, () => SelectedSound); }\r\n        }\r\n\r\n        public void SetSelectedSound(string sound)\r\n        {\r\n            _selectedSound = sound;\r\n        }\r\n\r\n        public List<string> Sounds { get; protected set; }\r\n\r\n        private string _subtitle;\r\n\r\n        public string Subtitle\r\n        {\r\n            get { return _subtitle; }\r\n            set { SetField(ref _subtitle, value, () => Subtitle); }\r\n        }\r\n\r\n        private string _subtitle2;\r\n\r\n        public string Subtitle2\r\n        {\r\n            get { return _subtitle2; }\r\n            set { SetField(ref _subtitle2, value, () => Subtitle2); }\r\n        }\r\n\r\n        private string _subtitle3;\r\n\r\n        public string Subtitle3\r\n        {\r\n            get { return _subtitle3; }\r\n            set { SetField(ref _subtitle3, value, () => Subtitle3); }\r\n        }\r\n\r\n        private readonly IUploadFileManager _uploadManager;\r\n\r\n        public ProfilePhotoViewerViewModel ProfilePhotoViewer { get; set; }\r\n\r\n        public bool IsViewerOpen\r\n        {\r\n            get { return ProfilePhotoViewer != null && ProfilePhotoViewer.IsOpen; }\r\n        }\r\n\r\n        public TLChatBase Chat { get { return _currentItem; } }\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        private readonly INavigationService _navigationService;\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        public ChatViewModel(\r\n            IUploadFileManager uploadManager, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService,\r\n            INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            //tombstoning\r\n            if (stateService.CurrentChat == null)\r\n            {\r\n                ShellViewModel.Navigate(navigationService);\r\n                return;\r\n            }\r\n\r\n            _currentItem = stateService.CurrentChat;\r\n            stateService.CurrentChat = null;\r\n\r\n            _stateService = stateService;\r\n            _navigationService = navigationService;\r\n            _eventAggregator = eventAggregator;\r\n            _mtProtoService = mtProtoService;\r\n            _cacheService = cacheService;\r\n\r\n            _eventAggregator.Subscribe(this);\r\n\r\n            Execute.BeginOnThreadPool(() => _cacheService.GetConfigAsync(result =>\r\n            {\r\n                var config = result as TLConfig41;\r\n                if (config != null)\r\n                {\r\n                    var chat41 = Chat as TLChat41;\r\n\r\n                    if (chat41 != null && chat41.Creator && !chat41.IsMigrated\r\n#if !DEBUG\r\n                        && chat41.ParticipantsCount.Value >= config.BroadcastSizeMax.Value\r\n#endif\r\n)\r\n                    {\r\n                        IsUpgradeAvailable = true;\r\n                        NotifyOfPropertyChange(() => IsUpgradeAvailable);\r\n                    }\r\n                }\r\n            }));\r\n\r\n\r\n            Spans = new List<TimerSpan>\r\n            {\r\n                new TimerSpan(AppResources.Enabled, string.Empty, 0, AppResources.Enabled),\r\n                new TimerSpan(AppResources.HourNominativeSingular,  \"1\", (int)TimeSpan.FromHours(1.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"1\", AppResources.HourNominativeSingular).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.HourGenitivePlural, \"8\", (int)TimeSpan.FromHours(8.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"8\", AppResources.HourGenitivePlural).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.DayNominativePlural, \"2\", (int)TimeSpan.FromDays(2.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"2\", AppResources.DayNominativePlural).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.Disabled, string.Empty, int.MaxValue, AppResources.Disabled),\r\n            };\r\n            _selectedSpan = Spans[0];\r\n\r\n            _notificationTimer = new DispatcherTimer();\r\n            _notificationTimer.Interval = TimeSpan.FromSeconds(Constants.NotificationTimerInterval);\r\n            _notificationTimer.Tick += OnNotificationTimerTick;\r\n\r\n            _uploadManager = uploadManager;\r\n            eventAggregator.Subscribe(this);\r\n\r\n            DisplayName = LowercaseConverter.Convert(AppResources.Profile);\r\n\r\n            Items = new ObservableCollection<TLUserBase>();\r\n\r\n\r\n            UpdateNotificationSettings();\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => MuteUntil)\r\n                    && !_suppressUpdating)\r\n                {\r\n                    UpdateNotifySettingsAsync();\r\n                }\r\n\r\n                if (Property.NameEquals(args.PropertyName, () => SelectedSound)\r\n                   && !_suppressUpdating)\r\n                {\r\n                    NotificationsViewModel.PlaySound(SelectedSound);\r\n\r\n                    UpdateNotifySettingsAsync();\r\n                }\r\n            };\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (_stateService != null\r\n                && _stateService.Participant != null)\r\n            {\r\n                var participant = _stateService.Participant;\r\n                _stateService.Participant = null;\r\n\r\n                var forwardingMessagesCount = _stateService.ForwardingMessagesCount;\r\n                _stateService.ForwardingMessagesCount = 0;\r\n\r\n                var broadcastChat = Chat as TLBroadcastChat;\r\n                var channel = Chat as TLChannel;\r\n                if (broadcastChat != null && channel == null)\r\n                {\r\n                    var serviceMessage = new TLMessageService17();\r\n                    serviceMessage.ToId = new TLPeerBroadcast { Id = Chat.Id };\r\n                    serviceMessage.FromId = new TLInt(_stateService.CurrentUserId);\r\n                    serviceMessage.Out = new TLBool(true);\r\n                    serviceMessage.SetUnread(new TLBool(false));\r\n                    serviceMessage.Date = TLUtils.DateToUniversalTimeTLInt(_mtProtoService.ClientTicksDelta, DateTime.Now);\r\n                    serviceMessage.Action = new TLMessageActionChatAddUser41 { Users = new TLVector<TLInt> { participant.Id } };\r\n\r\n                    broadcastChat.ParticipantIds.Add(participant.Id);\r\n\r\n                    _cacheService.SyncBroadcast(broadcastChat,\r\n                        result =>\r\n                        {\r\n                            _eventAggregator.Publish(serviceMessage);\r\n                        });\r\n                    //ChatDetails.UpdateTitles();\r\n                }\r\n                else\r\n                {\r\n                    if (channel != null)\r\n                    {\r\n                        _mtProtoService.InviteToChannelAsync(channel.ToInputChannel(), new TLVector<TLInputUserBase> { participant.ToInputUser() },\r\n                            statedMessage => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                var updates = statedMessage as TLUpdates;\r\n                                if (updates != null)\r\n                                {\r\n                                    var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewChannelMessage) as TLUpdateNewChannelMessage;\r\n                                    if (updateNewMessage != null)\r\n                                    {\r\n                                        _eventAggregator.Publish(updateNewMessage.Message);\r\n                                    }\r\n                                }\r\n\r\n                                UpdateTitles();\r\n                            }),\r\n                            error => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                                {\r\n                                    //MessageBox.Show(AppResources.PeerFloodAddContact, AppResources.Error, MessageBoxButton.OK);\r\n                                    ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodAddContact, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                                        result =>\r\n                                        {\r\n                                            if (result == CustomMessageBoxResult.RightButton)\r\n                                            {\r\n                                                TelegramViewBase.NavigateToUsername(_mtProtoService, Constants.SpambotUsername, null, null, null);\r\n                                            }\r\n                                        });\r\n                                }\r\n                                else if (error.TypeEquals(ErrorType.USERS_TOO_MUCH))\r\n                                {\r\n                                    MessageBox.Show(AppResources.UsersTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                                }\r\n                                else if (error.TypeEquals(ErrorType.USER_CHANNELS_TOO_MUCH))\r\n                                {\r\n                                    MessageBox.Show(AppResources.UserChannelsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                                }\r\n                                else if (error.TypeEquals(ErrorType.BOTS_TOO_MUCH))\r\n                                {\r\n                                    MessageBox.Show(AppResources.BotsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                                }\r\n                                else if (error.TypeEquals(ErrorType.USER_NOT_MUTUAL_CONTACT))\r\n                                {\r\n                                    MessageBox.Show(AppResources.UserNotMutualContact, AppResources.Error, MessageBoxButton.OK);\r\n                                }\r\n\r\n                                Execute.ShowDebugMessage(\"channels.inviteToChannel error \" + error);\r\n                            }));\r\n\r\n                        return;\r\n                    }\r\n\r\n                    _mtProtoService.AddChatUserAsync(Chat.Id, participant.ToInputUser(), new TLInt(forwardingMessagesCount),\r\n                        statedMessage =>\r\n                        {\r\n                            var updates = statedMessage as TLUpdates;\r\n                            if (updates != null)\r\n                            {\r\n                                var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                                if (updateNewMessage != null)\r\n                                {\r\n                                    _eventAggregator.Publish(updateNewMessage.Message);\r\n                                }\r\n                            }\r\n\r\n                            UpdateTitles();\r\n                        },\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                            {\r\n                                //MessageBox.Show(AppResources.PeerFloodAddContact, AppResources.Error, MessageBoxButton.OK);\r\n\r\n                                ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodAddContact, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                                    result =>\r\n                                    {\r\n                                        if (result == CustomMessageBoxResult.RightButton)\r\n                                        {\r\n                                            TelegramViewBase.NavigateToUsername(_mtProtoService, Constants.SpambotUsername, null, null, null);\r\n                                        }\r\n                                    });\r\n                            }\r\n\r\n                            Execute.ShowDebugMessage(\"messages.addChatUser error \" + error);\r\n                        }));\r\n                }\r\n            }\r\n\r\n            if (_stateService != null\r\n                && _stateService.SelectedTimerSpan != null)\r\n            {\r\n                SelectedSpan = _stateService.SelectedTimerSpan;\r\n                _stateService.SelectedTimerSpan = null;\r\n            }\r\n\r\n            if (_stateService != null && _stateService.UpdateChannelAdministrators)\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null && channel.IsMegaGroup)\r\n                {\r\n                    UpdateChannelAdministrators(channel);\r\n                    UpdateSubtitles();\r\n                    return;\r\n                }\r\n                _stateService.UpdateChannelAdministrators = false;\r\n            }\r\n\r\n            StartTimer();\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            StopTimer();\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        public void Edit()\r\n        {\r\n            _stateService.CurrentChat = Chat;\r\n            _navigationService.UriFor<EditChatViewModel>().Navigate();\r\n        }\r\n\r\n        public void SetAdmins()\r\n        {\r\n            _stateService.CurrentChat = Chat;\r\n            _navigationService.UriFor<AddAdminsViewModel>().Navigate();\r\n        }\r\n\r\n        public void ConvertToSupergroup()\r\n        {\r\n            _stateService.CurrentChat = Chat;\r\n            _navigationService.UriFor<ConvertToSupergroupViewModel>().Navigate();\r\n        }\r\n\r\n        public void CopyLink()\r\n        {\r\n            if (string.IsNullOrEmpty(Link)) return;\r\n\r\n            Clipboard.SetText(\"https://\" + Link);\r\n        }\r\n\r\n        private void UpdateUsers(List<TLUserBase> users, System.Action callback)\r\n        {\r\n            const int firstSliceCount = 3;\r\n            var secondSlice = new List<TLUserBase>();\r\n            for (var i = 0; i < users.Count; i++)\r\n            {\r\n                if (i < firstSliceCount)\r\n                {\r\n                    //users[i].IsAdmin = false;\r\n                    Items.Add(users[i]);\r\n                }\r\n                else\r\n                {\r\n                    secondSlice.Add(users[i]);\r\n                }\r\n            }\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                foreach (var user in secondSlice)\r\n                {\r\n                    //user.IsAdmin = false;\r\n                    Items.Add(user);\r\n                }\r\n                callback.SafeInvoke();\r\n            });\r\n        }\r\n\r\n        private void UpdateNotifySettingsAsync()\r\n        {\r\n            if (CurrentItem == null) return;\r\n\r\n            var notifySettings = new TLInputPeerNotifySettings78\r\n            {\r\n                Flags = new TLInt(0),\r\n                MuteUntil = new TLInt(MuteUntil),\r\n                ShowPreviews = TLBool.True,\r\n                Sound = string.IsNullOrEmpty(SelectedSound) ? new TLString(\"default\") : new TLString(SelectedSound)\r\n            };\r\n\r\n            IsWorking = true;\r\n            MTProtoService.UpdateNotifySettingsAsync(\r\n                CurrentItem.ToInputNotifyPeer(), notifySettings,\r\n                result =>\r\n                {\r\n                    IsWorking = false;\r\n                    CurrentItem.NotifySettings = new TLPeerNotifySettings78\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        MuteUntil = new TLInt(MuteUntil),\r\n                        ShowPreviews = notifySettings.ShowPreviews,\r\n                        Sound = notifySettings.Sound\r\n                    };\r\n\r\n                    var channel = CurrentItem as TLChannel;\r\n                    var peer = channel != null\r\n                        ? (TLPeerBase)new TLPeerChannel { Id = CurrentItem.Id }\r\n                        : new TLPeerChat { Id = CurrentItem.Id };\r\n                    var dialog = CacheService.GetDialog(peer);\r\n\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog.NotifySettings = CurrentItem.NotifySettings;\r\n                        dialog.NotifyOfPropertyChange(() => dialog.NotifySettings);\r\n                        dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                        var settings = dialog.With as INotifySettings;\r\n                        if (settings != null)\r\n                        {\r\n                            settings.NotifySettings = CurrentItem.NotifySettings;\r\n                        }\r\n                    }\r\n\r\n                    CacheService.Commit();\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"account.updateNotifySettings error: \" + error);\r\n                });\r\n        }\r\n\r\n        public void UpdateChannelAdministrators(TLChannel channel)\r\n        {\r\n            StateService.UpdateSubtitle = true;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetParticipantsAsync(channel.ToInputChannel(), new TLChannelParticipantsAdmins(), new TLInt(0), new TLInt(200), new TLInt(0),\r\n                result =>\r\n                {\r\n                    var channelParticipants = result as TLChannelParticipants;\r\n                    if (channelParticipants != null)\r\n                    {\r\n                        var admins = new Dictionary<int, int>();\r\n\r\n                        foreach (var participant in channelParticipants.Participants)\r\n                        {\r\n                            var creator = participant as TLChannelParticipantCreator;\r\n                            if (creator != null)\r\n                            {\r\n                                admins[creator.UserId.Value] = creator.UserId.Value;\r\n                            }\r\n\r\n                            var editor = participant as TLChannelParticipantAdmin;\r\n                            if (editor != null)\r\n                            {\r\n                                admins[editor.UserId.Value] = editor.UserId.Value;\r\n                            }\r\n                        }\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            foreach (var user in Items)\r\n                            {\r\n                                user.IsAdmin = admins.ContainsKey(user.Index);\r\n                                user.NotifyOfPropertyChange(() => user.IsAdmin);\r\n                            }\r\n\r\n                            var usersCache = new Dictionary<int, int>();\r\n                            foreach (var item in Items)\r\n                            {\r\n                                usersCache[item.Index] = item.Index;\r\n                            }\r\n\r\n                            foreach (var admin in channelParticipants.Users)\r\n                            {\r\n                                if (!usersCache.ContainsKey(admin.Index))\r\n                                {\r\n                                    admin.IsAdmin = true;\r\n\r\n                                    InsertInDescOrder(Items, admin);\r\n                                }\r\n                            }\r\n\r\n                            Status = Items.Count > 0 ? string.Empty : AppResources.NoUsersHere;\r\n                        });\r\n                    }\r\n                },\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n\r\n                    Execute.ShowDebugMessage(\"channels.getParticipants error \" + error);\r\n                }));\r\n        }\r\n\r\n        private readonly object _participantsSyncRoot = new object();\r\n\r\n        public void UpdateChannelItems(TLChannel channel)\r\n        {\r\n            IsWorking = true;\r\n            MTProtoService.GetParticipantsAsync(channel.ToInputChannel(), new TLChannelParticipantsRecent(), new TLInt(0), new TLInt(200), new TLInt(0),\r\n                result =>\r\n                {\r\n                    var channelParticipants = result as TLChannelParticipants;\r\n                    if (channelParticipants != null)\r\n                    {\r\n                        channel.ChannelParticipants = channelParticipants;\r\n\r\n                        var admins = new Dictionary<int, int>();\r\n\r\n                        foreach (var participant in channelParticipants.Participants)\r\n                        {\r\n                            var creator = participant as TLChannelParticipantCreator;\r\n                            if (creator != null)\r\n                            {\r\n                                admins[creator.UserId.Value] = creator.UserId.Value;\r\n                            }\r\n\r\n                            var editor = participant as TLChannelParticipantAdmin;\r\n                            if (editor != null)\r\n                            {\r\n                                admins[editor.UserId.Value] = editor.UserId.Value;\r\n                            }\r\n                        }\r\n\r\n                        var users = channelParticipants.Users.OrderByDescending(x => x.StatusValue).ToList();\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            Items.Clear();\r\n                            foreach (var user in users)\r\n                            {\r\n                                user.IsAdmin = admins.ContainsKey(user.Index);\r\n                                Items.Add(user);\r\n                            }\r\n                            Status = Items.Count > 0 ? string.Empty : AppResources.NoUsersHere;\r\n\r\n                            UpdateNotificationSettings();\r\n                            UpdateTitles();\r\n                        });\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n                    if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST)\r\n                        && TLRPCError.TypeEquals(error, ErrorType.CHAT_ADMIN_REQUIRED))\r\n                    {\r\n                        channel.ChannelParticipants = null;\r\n                        FileUtils.Delete(_participantsSyncRoot, channel.ChannelParticipantsFileName);\r\n                    }\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Status = string.Empty;\r\n\r\n                        Execute.ShowDebugMessage(\"channels.getParticipants error \" + error);\r\n                    });\r\n                });\r\n        }\r\n\r\n        private void UpdateItems()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null && channel.IsMegaGroup)\r\n            {\r\n                UpdateChannelItems(channel);\r\n\r\n                return;\r\n            }\r\n\r\n            if (CurrentItem is TLBroadcastChat)\r\n            {\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetFullChatAsync(CurrentItem.Id,\r\n                chatFull =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var newUsersCache = new Dictionary<int, TLUserBase>();\r\n                    foreach (var user in chatFull.Users)\r\n                    {\r\n                        newUsersCache[user.Index] = user;\r\n                    }\r\n\r\n                    var participants = chatFull.FullChat.Participants as IChatParticipants;\r\n                    if (participants != null)\r\n                    {\r\n                        var usersCache = Items.ToDictionary(x => x.Index);\r\n\r\n                        var onlineUsers = 0;\r\n\r\n                        var chat40 = CurrentItem as TLChat40;\r\n                        var adminsEnabled = chat40 != null && chat40.AdminsEnabled.Value;\r\n                        foreach (var participant in participants.Participants)\r\n                        {\r\n                            var user = newUsersCache[participant.UserId.Value];\r\n\r\n                            user.IsAdmin = IsChatAdmin(participant, adminsEnabled);\r\n\r\n                            if (user.Status is TLUserStatusOnline)\r\n                            {\r\n                                onlineUsers++;\r\n                            }\r\n\r\n                            if (!usersCache.ContainsKey(user.Index))\r\n                            {\r\n                                BeginOnUIThread(() => InsertInDescOrder(Items, user));\r\n                            }\r\n                        }\r\n                        CurrentItem.UsersOnline = onlineUsers;\r\n                    }\r\n\r\n                    var chatFull28 = chatFull.FullChat as TLChatFull28;\r\n                    if (chatFull28 != null)\r\n                    {\r\n                        CurrentItem.ExportedInvite = chatFull28.ExportedInvite;\r\n                    }\r\n\r\n                    UpdateNotificationSettings();\r\n                    UpdateTitles();\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                });\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            if (Chat == null) return;\r\n\r\n            UpdateNotificationSettings();\r\n            UpdateSubtitles();\r\n\r\n            var notifySettings = Chat.NotifySettings as TLPeerNotifySettings;\r\n            if (notifySettings != null)\r\n            {\r\n                var sound = notifySettings.Sound == null ? null : _stateService.Sounds.FirstOrDefault(x => string.Equals(x, notifySettings.Sound.Value, StringComparison.OrdinalIgnoreCase));\r\n                SetSelectedSound(sound ?? _stateService.Sounds[0]);\r\n            }\r\n            NotifyOfPropertyChange(() => Chat);\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        private void InsertInDescOrder(IList<TLUserBase> users, TLUserBase user)\r\n        {\r\n            var added = false;\r\n            for (var i = 0; i < users.Count; i++)\r\n            {\r\n                if (users[i].StatusValue <= user.StatusValue)\r\n                {\r\n                    users.Insert(i, user);\r\n                    added = true;\r\n                    break;\r\n                }\r\n            }\r\n            if (!added)\r\n            {\r\n                users.Add(user);\r\n            }\r\n        }\r\n\r\n        private string GetChatSubtitle3()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (!TLString.IsNullOrEmpty(channel.About))\r\n                {\r\n                    return channel.About.ToString();\r\n                }\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        private string GetChatSubtitle2()\r\n        {\r\n            if (IsChannel)\r\n            {\r\n                return string.Empty;\r\n            }\r\n\r\n            var usersCount = Items.Count;\r\n            var onlineUsersCount = Items.Count(x => x.Status is TLUserStatusOnline);\r\n\r\n            var currentUser = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n            var isCurrentUserOnline = currentUser != null && currentUser.Status is TLUserStatusOnline;\r\n            if (usersCount == 1 || (onlineUsersCount == 1 && isCurrentUserOnline))\r\n            {\r\n                onlineUsersCount = 0;\r\n            }\r\n\r\n            return onlineUsersCount > 0 ? string.Format(\"{0} {1}\", onlineUsersCount, AppResources.Online.ToLowerInvariant()) : string.Empty;\r\n        }\r\n\r\n        private string GetChatSubtitle()\r\n        {\r\n            //if (IsChannel)\r\n            //{\r\n            //    return \"channel\";\r\n            //}\r\n\r\n            var chat = CurrentItem as TLChat;\r\n            if (chat != null)\r\n            {\r\n                var participantsCount = chat.ParticipantsCount.Value;\r\n\r\n                return Language.Declension(\r\n                    participantsCount,\r\n                    AppResources.CompanyNominativeSingular,\r\n                    AppResources.CompanyNominativePlural,\r\n                    AppResources.CompanyGenitiveSingular,\r\n                    AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (channel.ParticipantsCount != null)\r\n                {\r\n                    var participantsCount = channel.ParticipantsCount.Value;\r\n\r\n                    return Language.Declension(\r\n                        participantsCount,\r\n                        AppResources.CompanyNominativeSingular,\r\n                        AppResources.CompanyNominativePlural,\r\n                        AppResources.CompanyGenitiveSingular,\r\n                        AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                }\r\n\r\n                if (channel.ChannelParticipants != null)\r\n                {\r\n                    var participantsCount = channel.ChannelParticipants.Count.Value;\r\n\r\n                    return Language.Declension(\r\n                        participantsCount,\r\n                        AppResources.CompanyNominativeSingular,\r\n                        AppResources.CompanyNominativePlural,\r\n                        AppResources.CompanyGenitiveSingular,\r\n                        AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                }\r\n\r\n                if (channel.IsMegaGroup)\r\n                {\r\n                    return AppResources.Loading.ToLowerInvariant();\r\n                }\r\n\r\n                return channel.IsPublic\r\n                    ? AppResources.PublicChannel.ToLowerInvariant()\r\n                    : AppResources.PrivateChannel.ToLowerInvariant();\r\n            }\r\n\r\n            var broadcastChat = CurrentItem as TLBroadcastChat;\r\n            if (broadcastChat != null)\r\n            {\r\n                var participantsCount = broadcastChat.ParticipantIds.Count;\r\n\r\n                return Language.Declension(\r\n                    participantsCount,\r\n                    AppResources.CompanyNominativeSingular,\r\n                    AppResources.CompanyNominativePlural,\r\n                    AppResources.CompanyGenitiveSingular,\r\n                    AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n\r\n\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public void UpdateNotificationSettings()\r\n        {\r\n            var chat = CurrentItem;\r\n            if (chat != null && chat.NotifySettings != null)\r\n            {\r\n                var notifySettings = chat.NotifySettings as TLPeerNotifySettings;\r\n                if (notifySettings != null)\r\n                {\r\n                    _suppressUpdating = true;\r\n\r\n                    MuteUntil = notifySettings.MuteUntil != null ? notifySettings.MuteUntil.Value : (StateService.GetNotifySettings().GroupAlert ? 0 : int.MaxValue);\r\n                    var sound = notifySettings.Sound == null ? null : StateService.Sounds.FirstOrDefault(x => string.Equals(x, notifySettings.Sound.Value, StringComparison.OrdinalIgnoreCase));\r\n                    SelectedSound = sound ?? StateService.Sounds[0];\r\n\r\n                    _suppressUpdating = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        #region Notification timer\r\n        private readonly DispatcherTimer _notificationTimer;\r\n\r\n        public void StartTimer()\r\n        {\r\n            _notificationTimer.Start();\r\n        }\r\n\r\n        public void StopTimer()\r\n        {\r\n            _notificationTimer.Stop();\r\n        }\r\n\r\n        private void OnNotificationTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            if (MuteUntil > 0 && MuteUntil < int.MaxValue)\r\n            {\r\n                NotifyOfPropertyChange(() => MuteUntil);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region Actions\r\n\r\n        public void SelectSpan(TimerSpan selectedSpan)\r\n        {\r\n            SelectedSpan = selectedSpan;\r\n        }\r\n\r\n        public void SelectNotificationSpan()\r\n        {\r\n            //StateService.SelectedTimerSpan = SelectedSpan;\r\n            NavigationService.UriFor<ChooseNotificationSpanViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenLink()\r\n        {\r\n            StateService.ShareLink = \"https://\" + Link;\r\n            StateService.ShareMessage = \"https://\" + Link;\r\n            StateService.ShareCaption = AppResources.Share;\r\n            NavigationService.UriFor<ShareViewModel>().Navigate();\r\n        }\r\n\r\n        public void AddParticipant()\r\n        {\r\n            if (CurrentItem.IsForbidden) return;\r\n\r\n            var chat = CurrentItem as TLChat40;\r\n            var channel = CurrentItem as TLChannel;\r\n\r\n            StateService.IsInviteVisible = (chat != null && chat.Creator) || (channel != null && channel.IsMegaGroup && channel.Creator);\r\n            StateService.CurrentChat = CurrentItem;\r\n            StateService.RemovedUsers = Items;\r\n            StateService.RequestForwardingCount = CurrentItem is TLChat;\r\n            NavigationService.UriFor<AddChatParticipantViewModel>().Navigate();\r\n        }\r\n\r\n        public void DeleteParticipant(TLUserBase user)\r\n        {\r\n            if (CurrentItem.IsForbidden) return;\r\n            if (user == null) return;\r\n\r\n            var broadcast = CurrentItem as TLBroadcastChat;\r\n            var channel = CurrentItem as TLChannel;\r\n            if (broadcast != null && channel == null)\r\n            {\r\n                var broadcastChat = (TLBroadcastChat)CurrentItem;\r\n\r\n                var serviceMessage = new TLMessageService17\r\n                {\r\n                    ToId = new TLPeerBroadcast { Id = broadcastChat.Id },\r\n                    FromId = new TLInt(StateService.CurrentUserId),\r\n                    Out = new TLBool(true),\r\n                    Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                    Action = new TLMessageActionChatDeleteUser { UserId = user.Id }\r\n                };\r\n                serviceMessage.SetUnread(new TLBool(false));\r\n\r\n                for (var i = 0; i < broadcastChat.ParticipantIds.Count; i++)\r\n                {\r\n                    if (user.Id.Value == broadcastChat.ParticipantIds[i].Value)\r\n                    {\r\n                        broadcastChat.ParticipantIds.RemoveAt(i);\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                broadcastChat.ParticipantIds.Remove(user.Id);\r\n\r\n                CacheService.SyncBroadcast(broadcastChat,\r\n                    result =>\r\n                    {\r\n                        EventAggregator.Publish(serviceMessage);\r\n                        UpdateTitles();\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                if (user.Index == StateService.CurrentUserId)\r\n                {\r\n                    DeleteAndExitGroup();\r\n                    return;\r\n                }\r\n\r\n                if (channel != null)\r\n                {\r\n                    IsWorking = true;\r\n                    MTProtoService.KickFromChannelAsync(channel, user.ToInputUser(), TLBool.True,\r\n                        updatesBase =>\r\n                        {\r\n                            IsWorking = false;\r\n                            BeginOnUIThread(() => Items.Remove(user));\r\n\r\n                            var updates = updatesBase as TLUpdates;\r\n                            if (updates != null)\r\n                            {\r\n                                var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewChannelMessage) as TLUpdateNewChannelMessage;\r\n                                if (updateNewMessage != null)\r\n                                {\r\n                                    EventAggregator.Publish(updateNewMessage.Message);\r\n                                }\r\n                            }\r\n                            UpdateTitles();\r\n                        },\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.deleteChatUser error \" + error);\r\n                            IsWorking = false;\r\n                        });\r\n                    return;\r\n                }\r\n\r\n                IsWorking = true;\r\n                MTProtoService.DeleteChatUserAsync(CurrentItem.Id, user.ToInputUser(),\r\n                    statedMessage =>\r\n                    {\r\n                        IsWorking = false;\r\n                        BeginOnUIThread(() => Items.Remove(user));\r\n\r\n                        var updates = statedMessage as TLUpdates;\r\n                        if (updates != null)\r\n                        {\r\n                            var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                            if (updateNewMessage != null)\r\n                            {\r\n                                EventAggregator.Publish(updateNewMessage.Message);\r\n                            }\r\n                        }\r\n                        UpdateTitles();\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.deleteChatUser error \" + error);\r\n                        IsWorking = false;\r\n                    });\r\n            }\r\n        }\r\n\r\n        public void MessageUser(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            StateService.With = user;\r\n            StateService.RemoveBackEntries = true;\r\n            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n        }\r\n\r\n        public void ViewUser(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            StateService.CurrentContact = user;\r\n            NavigationService.UriFor<ContactViewModel>().Navigate();\r\n        }\r\n\r\n        private TLPhotoBase GetPhoto()\r\n        {\r\n            var chat = CurrentItem as TLChat;\r\n            if (chat != null) return chat.Photo;\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null) return channel.Photo;\r\n\r\n            return null;\r\n        }\r\n\r\n        public void OpenPhoto()\r\n        {\r\n            var chat = CurrentItem as TLChat;\r\n            var channel = CurrentItem as TLChannel;\r\n            if (chat == null && channel == null) return;\r\n\r\n            var photoBase = GetPhoto();\r\n\r\n            var photo = photoBase as TLChatPhoto;\r\n            if (photo != null)\r\n            {\r\n                StateService.CurrentPhoto = photo;\r\n                StateService.CurrentChat = CurrentItem;\r\n\r\n                if (ProfilePhotoViewer == null)\r\n                {\r\n                    ProfilePhotoViewer = new ProfilePhotoViewerViewModel(StateService, MTProtoService);\r\n                    NotifyOfPropertyChange(() => ProfilePhotoViewer);\r\n                }\r\n\r\n                BeginOnUIThread(() => ProfilePhotoViewer.OpenViewer());\r\n                return;\r\n            }\r\n\r\n            var photoEmpty = photoBase as TLChatPhotoEmpty;\r\n            if (photoEmpty != null)\r\n            {\r\n                if ((chat != null && !chat.Left.Value)\r\n                    || (channel != null && channel.Creator))\r\n                {\r\n                    EditChatActions.EditPhoto(result =>\r\n                    {\r\n                        var fileId = TLLong.Random();\r\n                        IsWorking = true;\r\n                        _uploadManager.UploadFile(fileId, CurrentItem, result);\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public void SetPhoto()\r\n        {\r\n            var chat = CurrentItem as TLChat;\r\n            var channel = CurrentItem as TLChannel;\r\n            if (chat == null && channel == null) return;\r\n\r\n            if ((chat != null && !chat.Left.Value)\r\n                || (channel != null && channel.Creator))\r\n            {\r\n                EditChatActions.EditPhoto(result =>\r\n                {\r\n                    var fileId = TLLong.Random();\r\n                    IsWorking = true;\r\n                    _uploadManager.UploadFile(fileId, CurrentItem, result);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void OpenMedia()\r\n        {\r\n            if (CurrentItem == null) return;\r\n\r\n            StateService.CurrentInputPeer = CurrentItem;\r\n            NavigationService.UriFor<FullMediaViewModel>().Navigate();\r\n        }\r\n\r\n        public void Report()\r\n        {\r\n            Report(CurrentItem.ToInputPeer());\r\n        }\r\n\r\n        public void OpenMembers()\r\n        {\r\n            StateService.CurrentChat = CurrentItem;\r\n            NavigationService.UriFor<ChannelMembersViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenAdministrators()\r\n        {\r\n            StateService.CurrentChat = CurrentItem;\r\n            NavigationService.UriFor<ChannelAdministratorsViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenKickedUsers()\r\n        {\r\n            StateService.CurrentChat = CurrentItem;\r\n            NavigationService.UriFor<ChannelBlockedContactsViewModel>().Navigate();\r\n        }\r\n\r\n        public void UpgradeGroup()\r\n        {\r\n            var confirmation = MessageBox.Show(AppResources.UpgradeToSupergroupConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.MigrateChatAsync(\r\n                CurrentItem.Id,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var updates = result as TLUpdates;\r\n                    if (updates != null)\r\n                    {\r\n                        var channel = updates.Chats.FirstOrDefault(x => x is TLChannel) as TLChannel;\r\n                        if (channel != null)\r\n                        {\r\n                            var migratedFromMaxId = new TLInt(0);\r\n                            var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                            if (updateNewMessage != null)\r\n                            {\r\n                                migratedFromMaxId = updateNewMessage.Message.Id;\r\n                            }\r\n                            channel.MigratedFromChatId = CurrentItem.Id;\r\n                            channel.MigratedFromMaxId = migratedFromMaxId;\r\n\r\n                            var addedChannel = CacheService.GetDialog(new TLPeerChannel { Id = channel.Id });\r\n                            if (addedChannel != null)\r\n                            {\r\n                                EventAggregator.Publish(new DialogAddedEventArgs(addedChannel));\r\n                            }\r\n                            var removedChat = CacheService.GetDialog(new TLPeerChat { Id = CurrentItem.Id });\r\n                            if (removedChat != null)\r\n                            {\r\n                                EventAggregator.Publish(new DialogRemovedEventArgs(removedChat));\r\n                            }\r\n\r\n                            StateService.With = channel;\r\n                            StateService.RemoveBackEntries = true;\r\n                            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n                        }\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.migrateChat error \" + error);\r\n                }));\r\n\r\n            return;\r\n        }\r\n\r\n        public void DeleteAndExitGroup()\r\n        {\r\n            MessageBoxResult confirmation;\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                confirmation = IsMegaGroup\r\n                    ? MessageBox.Show(AppResources.LeaveGroupConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel)\r\n                    : MessageBox.Show(AppResources.LeaveChannelConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                if (confirmation != MessageBoxResult.OK) return;\r\n\r\n                IsWorking = true;\r\n                MTProtoService.LeaveChannelAsync(\r\n                    channel,\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        NavigationService.RemoveBackEntry();\r\n\r\n                        var dialog = CacheService.GetDialog(new TLPeerChannel { Id = CurrentItem.Id });\r\n                        if (dialog != null)\r\n                        {\r\n                            CacheService.DeleteDialog(dialog);\r\n                            DialogsViewModel.UnpinFromStart(dialog);\r\n                            EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                        }\r\n\r\n                        NavigationService.GoBack();\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        if (error.TypeEquals(ErrorType.CHANNEL_PRIVATE)\r\n                            || error.TypeEquals(ErrorType.USER_NOT_PARTICIPANT))\r\n                        {\r\n                            NavigationService.RemoveBackEntry();\r\n\r\n                            var dialog = CacheService.GetDialog(new TLPeerChannel { Id = CurrentItem.Id });\r\n                            if (dialog != null)\r\n                            {\r\n                                CacheService.DeleteDialog(dialog);\r\n                                DialogsViewModel.UnpinFromStart(dialog);\r\n                                EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                            }\r\n\r\n                            NavigationService.GoBack();\r\n                        }\r\n                        Execute.ShowDebugMessage(\"cnannels.leaveChannel error \" + error);\r\n                    }));\r\n\r\n                return;\r\n            }\r\n\r\n            confirmation = MessageBox.Show(AppResources.DeleteAndExitConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            DialogsViewModel.DeleteAndExitDialogCommon(\r\n                CurrentItem,\r\n                MTProtoService,\r\n                () => BeginOnUIThread(() =>\r\n                {\r\n                    NavigationService.RemoveBackEntry();\r\n\r\n                    var dialog = CacheService.GetDialog(new TLPeerChat { Id = CurrentItem.Id });\r\n                    if (dialog != null)\r\n                    {\r\n                        CacheService.DeleteDialog(dialog);\r\n                        DialogsViewModel.UnpinFromStart(dialog);\r\n                        EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                    }\r\n                    NavigationService.GoBack();\r\n                }),\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"DeleteAndExitGroupCommon error \" + error);\r\n                });\r\n        }\r\n\r\n        public void UpdateTitles()\r\n        {\r\n            NotifyOfPropertyChange(() => MembersSubtitle);\r\n            NotifyOfPropertyChange(() => AdministratorsSubtitle);\r\n            NotifyOfPropertyChange(() => KickedUsersSubtitle);\r\n        }\r\n\r\n        public void UpdateSubtitles()\r\n        {\r\n            Subtitle = GetChatSubtitle();\r\n            Subtitle2 = GetChatSubtitle2();\r\n            Subtitle3 = GetChatSubtitle3();\r\n        }\r\n        #endregion\r\n\r\n        public void Handle(TLMessageBase message)\r\n        {\r\n            var serviceMessage = message as TLMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                var editTitleAction = serviceMessage.Action as TLMessageActionChatEditTitle;\r\n                if (editTitleAction != null && serviceMessage.ToId.Id.Value == Chat.Index)\r\n                {\r\n                    NotifyOfPropertyChange(() => Chat);\r\n                }\r\n\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null && channel.Index == serviceMessage.ToId.Id.Value)\r\n                {\r\n                    var chatDeletePhotoAction = serviceMessage.Action as TLMessageActionChatDeletePhoto;\r\n                    if (chatDeletePhotoAction != null)\r\n                    {\r\n                        channel.NotifyOfPropertyChange(() => channel.Photo);\r\n                        return;\r\n                    }\r\n\r\n                    var chatDeleteUserAction = serviceMessage.Action as TLMessageActionChatDeleteUser;\r\n                    if (chatDeleteUserAction != null)\r\n                    {\r\n                        HandleDeleteUserAction(chatDeleteUserAction);\r\n                        return;\r\n                    }\r\n\r\n                    var chatAddUserAction = serviceMessage.Action as TLMessageActionChatAddUser41;\r\n                    if (chatAddUserAction != null)\r\n                    {\r\n                        HandleAddUserAction(chatAddUserAction);\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var chat = CurrentItem as TLChat;\r\n                if (chat != null && chat.Index == serviceMessage.ToId.Id.Value)\r\n                {\r\n                    var chatDeletePhotoAction = serviceMessage.Action as TLMessageActionChatDeletePhoto;\r\n                    if (chatDeletePhotoAction != null)\r\n                    {\r\n                        chat.NotifyOfPropertyChange(() => chat.Photo);\r\n                        return;\r\n                    }\r\n\r\n                    var chatDeleteUserAction = serviceMessage.Action as TLMessageActionChatDeleteUser;\r\n                    if (chatDeleteUserAction != null)\r\n                    {\r\n                        HandleDeleteUserAction(chatDeleteUserAction);\r\n                        return;\r\n                    }\r\n\r\n                    var chatAddUserAction = serviceMessage.Action as TLMessageActionChatAddUser41;\r\n                    if (chatAddUserAction != null)\r\n                    {\r\n                        HandleAddUserAction(chatAddUserAction);\r\n                        return;\r\n                    }\r\n                }\r\n\r\n\r\n                var broadcastChat = CurrentItem as TLBroadcastChat;\r\n                if (broadcastChat != null && broadcastChat.Index == serviceMessage.ToId.Id.Value)\r\n                {\r\n                    var chatDeleteUserAction = serviceMessage.Action as TLMessageActionChatDeleteUser;\r\n                    if (chatDeleteUserAction != null)\r\n                    {\r\n                        HandleDeleteUserAction(chatDeleteUserAction);\r\n                        return;\r\n                    }\r\n\r\n                    var chatAddUserAction = serviceMessage.Action as TLMessageActionChatAddUser41;\r\n                    if (chatAddUserAction != null)\r\n                    {\r\n                        HandleAddUserAction(chatAddUserAction);\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void HandleAddUserAction(TLMessageActionChatAddUser41 chatAddUserAction)\r\n        {\r\n            var cachedUsers = new List<TLUserBase>();\r\n            foreach (var userId in chatAddUserAction.Users)\r\n            {\r\n                var cachedUser = CacheService.GetUser(userId);\r\n                if (cachedUser != null)\r\n                {\r\n                    cachedUsers.Add(cachedUser);\r\n                }\r\n            }\r\n\r\n            if (cachedUsers.Count > 0)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var cachedUser in cachedUsers)\r\n                    {\r\n                        InsertInDescOrder(Items, cachedUser);\r\n                    }\r\n                    UpdateTitles();\r\n                });\r\n            }\r\n        }\r\n\r\n        private void HandleDeleteUserAction(TLMessageActionChatDeleteUser chatDeleteUserAction)\r\n        {\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (Items[i].Index == chatDeleteUserAction.UserId.Value)\r\n                {\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        Items.RemoveAt(i);\r\n                        UpdateTitles();\r\n                    });\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n            if (item.Owner == CurrentItem)\r\n            {\r\n                IsWorking = false;\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateNotifySettings updateNotifySettings)\r\n        {\r\n            var notifyPeer = updateNotifySettings.Peer as TLNotifyPeer;\r\n            if (notifyPeer != null)\r\n            {\r\n                var peer = notifyPeer.Peer;\r\n                if (peer is TLPeerChat\r\n                    && peer.Id.Value == CurrentItem.Index)\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        CurrentItem.NotifySettings = updateNotifySettings.NotifySettings;\r\n                        var notifySettings = updateNotifySettings.NotifySettings as TLPeerNotifySettings;\r\n                        if (notifySettings != null)\r\n                        {\r\n                            _suppressUpdating = true;\r\n                            MuteUntil = notifySettings.MuteUntil != null ? notifySettings.MuteUntil.Value : (StateService.GetNotifySettings().GroupAlert ? 0 : int.MaxValue);\r\n                            _suppressUpdating = false;\r\n                        }\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            Items.Clear();\r\n            LazyItems.Clear();\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null && channel.IsMegaGroup)\r\n            {\r\n                var participants = channel.ChannelParticipants;\r\n                if (participants != null)\r\n                {\r\n                    var admins = new Dictionary<int, int>();\r\n\r\n                    foreach (var participant in participants.Participants)\r\n                    {\r\n                        var creator = participant as TLChannelParticipantCreator;\r\n                        if (creator != null)\r\n                        {\r\n                            admins[creator.UserId.Value] = creator.UserId.Value;\r\n                        }\r\n\r\n                        var editor = participant as TLChannelParticipantAdmin;\r\n                        if (editor != null)\r\n                        {\r\n                            admins[editor.UserId.Value] = editor.UserId.Value;\r\n                        }\r\n                    }\r\n\r\n                    var users = new List<TLUserBase>();\r\n                    foreach (var user in participants.Users)\r\n                    {\r\n                        user.IsAdmin = admins.ContainsKey(user.Index);\r\n                        users.Add(user);\r\n                    }\r\n                    users = users.OrderByDescending(x => x.StatusValue).ToList();\r\n\r\n                    UpdateUsers(users, UpdateItems);\r\n\r\n                    return;\r\n                }\r\n                else\r\n                {\r\n                    UpdateItems();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var chat = CurrentItem;\r\n            if (chat != null)\r\n            {\r\n                var participants = chat.Participants as TLChatParticipants40;\r\n                if (participants != null)\r\n                {\r\n                    var users = new List<TLUserBase>(participants.Participants.Count);\r\n                    var chat40 = CurrentItem as TLChat40;\r\n                    var adminsEnabled = chat40 != null && chat40.AdminsEnabled.Value;\r\n                    foreach (var participant in participants.Participants)\r\n                    {\r\n                        var user = CacheService.GetUser(participant.UserId);\r\n                        if (user != null)\r\n                        {\r\n                            user.IsAdmin = IsChatAdmin(participant, adminsEnabled);\r\n\r\n                            var canDeleteUserFromChat = false;\r\n\r\n                            var inviter = participant as IInviter;\r\n                            if (inviter != null\r\n                                && inviter.InviterId.Value == StateService.CurrentUserId)\r\n                            {\r\n                                canDeleteUserFromChat = true;\r\n                            }\r\n\r\n                            var creator = participant as TLChatParticipantCreator;\r\n                            if (creator != null\r\n                                && creator.UserId.Value == StateService.CurrentUserId)\r\n                            {\r\n                                canDeleteUserFromChat = true;\r\n                            }\r\n\r\n                            if (participant.UserId.Value == StateService.CurrentUserId)\r\n                            {\r\n                                canDeleteUserFromChat = true;\r\n                            }\r\n\r\n                            user.DeleteActionVisibility = canDeleteUserFromChat\r\n                                ? Visibility.Visible\r\n                                : Visibility.Collapsed;\r\n\r\n                            users.Add(user);\r\n                        }\r\n                    }\r\n                    users = users.OrderByDescending(x => x.StatusValue).ToList();\r\n\r\n                    UpdateUsers(users, UpdateItems);\r\n\r\n                    return;\r\n                }\r\n                else\r\n                {\r\n                    UpdateItems();\r\n                }\r\n            }\r\n\r\n            var broadcastChat = CurrentItem as TLBroadcastChat;\r\n            if (broadcastChat != null && channel == null)\r\n            {\r\n                var users = new List<TLUserBase>(broadcastChat.ParticipantIds.Count);\r\n                var count = 0;\r\n                foreach (var participantId in broadcastChat.ParticipantIds)\r\n                {\r\n                    var user = CacheService.GetUser(participantId);\r\n                    if (user != null)\r\n                    {\r\n                        user.DeleteActionVisibility = Visibility.Visible;\r\n                        if (count < 4)\r\n                        {\r\n                            user.IsAdmin = false;\r\n                            Items.Add(user);\r\n                            count++;\r\n                        }\r\n                        else\r\n                        {\r\n                            users.Add(user);\r\n                        }\r\n                    }\r\n                }\r\n                users = users.OrderByDescending(x => x.StatusValue).ToList();\r\n\r\n                UpdateUsers(users, UpdateItems);\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateChannel updateChannel)\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (channel.Id.Value == updateChannel.ChannelId.Value)\r\n                {\r\n                    NotifyOfPropertyChange(() => IsChannelAdministrator);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateChatParticipants updateChatParticipants)\r\n        {\r\n            if (updateChatParticipants.Participants.ChatId.Value == CurrentItem.Index)\r\n            {\r\n                var chat40 = CurrentItem as TLChat40;\r\n                var adminsEnabled = chat40 != null && chat40.AdminsEnabled.Value;\r\n\r\n                var adminsCache = GetAdminsCache(updateChatParticipants.Participants, adminsEnabled);\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var item in Items)\r\n                    {\r\n                        item.IsAdmin = adminsCache.ContainsKey(item.Index);\r\n                        item.NotifyOfPropertyChange(() => item.IsAdmin);\r\n                    }\r\n\r\n                    NotifyOfPropertyChange(() => CanEditChat);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateChatAdmins updateChatAdmins)\r\n        {\r\n            if (updateChatAdmins.ChatId.Value == CurrentItem.Index)\r\n            {\r\n                var adminsCache = GetAdminsCache(CurrentItem.Participants, updateChatAdmins.Enabled.Value);\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var item in Items)\r\n                    {\r\n                        item.IsAdmin = adminsCache.ContainsKey(item.Index);\r\n                        item.NotifyOfPropertyChange(() => item.IsAdmin);\r\n                    }\r\n\r\n                    NotifyOfPropertyChange(() => CanEditChat);\r\n                });\r\n            }\r\n        }\r\n\r\n        private Dictionary<int, int> GetAdminsCache(TLChatParticipantsBase participants, bool adminsEnabled)\r\n        {\r\n            var adminsCache = new Dictionary<int, int>();\r\n            var chatParticipants = participants as TLChatParticipants40;\r\n            if (chatParticipants != null)\r\n            {\r\n                foreach (var participant in chatParticipants.Participants)\r\n                {\r\n                    if (IsChatAdmin(participant, adminsEnabled))\r\n                    {\r\n                        adminsCache[participant.UserId.Value] = participant.UserId.Value;\r\n                    }\r\n                }\r\n            }\r\n            return adminsCache;\r\n        }\r\n\r\n        private static bool IsChatAdmin(TLChatParticipantBase participant, bool adminsEnabled)\r\n        {\r\n            if (adminsEnabled)\r\n            {\r\n                if (participant is TLChatParticipantAdmin || participant is TLChatParticipantCreator)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (participant is TLChatParticipantCreator)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public void Handle(TLUpdateChatParticipantAdmin updateChatParticipantAdmin)\r\n        {\r\n            if (updateChatParticipantAdmin.ChatId.Value == CurrentItem.Index)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var user = Items.FirstOrDefault(x => x.Index == updateChatParticipantAdmin.UserId.Value);\r\n                    if (user != null)\r\n                    {\r\n                        var chat40 = CurrentItem as TLChat40;\r\n                        var adminsEnabled = chat40 != null && chat40.AdminsEnabled.Value;\r\n                        if (adminsEnabled)\r\n                        {\r\n                            user.IsAdmin = updateChatParticipantAdmin.IsAdmin.Value;\r\n                            user.NotifyOfPropertyChange(() => user.IsAdmin);\r\n                        }\r\n                        else\r\n                        {\r\n                            user.IsAdmin = false;\r\n                            user.NotifyOfPropertyChange(() => user.IsAdmin);\r\n                        }\r\n                    }\r\n\r\n                    NotifyOfPropertyChange(() => CanEditChat);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLChannel channel)\r\n        {\r\n            if (CurrentItem is TLChannel && CurrentItem.Index == channel.Index)\r\n            {\r\n                Execute.BeginOnUIThread(UpdateTitles);\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateUserStatus updateUserStatus)\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null && channel.IsMegaGroup)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    TLUserBase user = null;\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (Items[i].Index == updateUserStatus.UserId.Value)\r\n                        {\r\n                            user = Items[i];\r\n                            user._status = updateUserStatus.Status;\r\n\r\n                            Items.RemoveAt(i);\r\n                            UpdateTitles();\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (user != null)\r\n                    {\r\n                        InsertInDescOrder(Items, user);\r\n                        user.NotifyOfPropertyChange(() => user.StatusCommon);\r\n                    }\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            var chat41 = CurrentItem as TLChat41;\r\n            if (chat41 != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    TLUserBase user = null;\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (Items[i].Index == updateUserStatus.UserId.Value)\r\n                        {\r\n                            user = Items[i];\r\n                            user._status = updateUserStatus.Status;\r\n\r\n                            Items.RemoveAt(i);\r\n                            UpdateTitles();\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (user != null)\r\n                    {\r\n                        InsertInDescOrder(Items, user);\r\n                        user.NotifyOfPropertyChange(() => user.StatusCommon);\r\n                    }\r\n                });\r\n\r\n                return;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/ConvertToSupergroupViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class ConvertToSupergroupViewModel : ViewModelBase\r\n    {\r\n        private TLChatBase CurrentItem { get; set; }\r\n\r\n        public ConvertToSupergroupViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            CurrentItem = StateService.CurrentChat;\r\n            StateService.CurrentChat = null;\r\n        }\r\n\r\n        public void ConvertToSupergroup()\r\n        {\r\n            if (CurrentItem == null) return;\r\n            if (IsWorking) return;\r\n\r\n            var confirmation = MessageBox.Show(AppResources.ConvertToSupergroupConfirmation, AppResources.Warning, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.MigrateChatAsync(\r\n                CurrentItem.Id,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var updates = result as TLUpdates;\r\n                    if (updates != null)\r\n                    {\r\n                        var channel = updates.Chats.FirstOrDefault(x => x is TLChannel) as TLChannel;\r\n                        if (channel != null)\r\n                        {\r\n                            var migratedFromMaxId = new TLInt(0);\r\n                            var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                            if (updateNewMessage != null)\r\n                            {\r\n                                migratedFromMaxId = updateNewMessage.Message.Id;\r\n                            }\r\n                            channel.MigratedFromChatId = CurrentItem.Id;\r\n                            channel.MigratedFromMaxId = migratedFromMaxId;\r\n\r\n                            var addedChannel = CacheService.GetDialog(new TLPeerChannel { Id = channel.Id });\r\n                            if (addedChannel != null)\r\n                            {\r\n                                EventAggregator.Publish(new DialogAddedEventArgs(addedChannel));\r\n                            }\r\n                            var removedChat = CacheService.GetDialog(new TLPeerChat { Id = CurrentItem.Id });\r\n                            if (removedChat != null)\r\n                            {\r\n                                EventAggregator.Publish(new DialogRemovedEventArgs(removedChat));\r\n                            }\r\n\r\n                            StateService.With = channel;\r\n                            StateService.RemoveBackEntries = true;\r\n                            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n                        }\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.migrateChat error \" + error);\r\n                }));\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/EditChatViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls.Primitives;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Controls;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing TaskResult = Microsoft.Phone.Tasks.TaskResult;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class EditChatViewModel : ItemDetailsViewModelBase, Telegram.Api.Aggregator.IHandle<UploadableItem>\r\n    {\r\n        public string TypeDescription\r\n        {\r\n            get { return !IsMegaGroup ? AppResources.ChannelType : AppResources.GroupType; }\r\n        }\r\n\r\n        public string PublicTypeDescription\r\n        {\r\n            get { return !IsMegaGroup ? AppResources.PublicChannel : AppResources.Public; }\r\n        }\r\n\r\n        public string PrivateTypeDescription\r\n        {\r\n            get { return !IsMegaGroup ? AppResources.PrivateChannel : AppResources.Private; }\r\n        }\r\n\r\n        public bool CanSetStickers\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel68;\r\n                return channel != null && channel.CanSetStickers;\r\n            }\r\n        }\r\n\r\n        private bool _notifyMembers = true;\r\n\r\n        public bool NotifyMembers\r\n        {\r\n            get { return _notifyMembers; }\r\n            set { SetField(ref _notifyMembers, value, () => NotifyMembers); }\r\n        }\r\n\r\n        private bool _signMessages;\r\n\r\n        public bool SignMessages\r\n        {\r\n            get { return _signMessages; }\r\n            set { SetField(ref _signMessages, value, () => SignMessages); }\r\n        }\r\n\r\n        private string _title;\r\n\r\n        public string Title\r\n        {\r\n            get { return _title; }\r\n            set { SetField(ref _title, value, () => Title); }\r\n        }\r\n\r\n        private string _about;\r\n\r\n        public string About\r\n        {\r\n            get { return _about; }\r\n            set { SetField(ref _about, value, () => About); }\r\n        }\r\n\r\n        public string DeleteChannelString\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && channel.IsMegaGroup\r\n                    ? AppResources.DeleteGroup\r\n                    : AppResources.DeleteChannel;\r\n            }\r\n        }\r\n\r\n        public bool IsChannel { get { return CurrentItem is TLChannel; } }\r\n\r\n        public bool IsMegaGroup \r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel44;\r\n                return channel != null && channel.IsMegaGroup;\r\n            }\r\n        }\r\n\r\n        public bool IsChannelAdmin\r\n        {\r\n            get\r\n            {\r\n                var channel = CurrentItem as TLChannel;\r\n                return channel != null && channel.Creator;\r\n            }\r\n        }\r\n\r\n        private bool _hiddenPrehistory;\r\n\r\n        public bool HiddenPrehistory\r\n        {\r\n            get { return _hiddenPrehistory; }\r\n            set { SetField(ref _hiddenPrehistory, value, () => HiddenPrehistory); }\r\n        }\r\n\r\n        private readonly IUploadFileManager _uploadManager;\r\n\r\n        //public ObservableCollection<TLUserBase> Items { get; set; } \r\n\r\n        public EditChatViewModel(IUploadFileManager uploadManager, ICacheService cacheService,\r\n            ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService,\r\n            IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            _uploadManager = uploadManager;\r\n\r\n            CurrentItem = StateService.CurrentChat;\r\n            StateService.CurrentChat = null;\r\n            var chat = CurrentItem as TLChat;\r\n            if (chat != null)\r\n            {\r\n                Title = chat.Title.ToString();\r\n            }\r\n            var broadcastChat = CurrentItem as TLBroadcastChat;\r\n            if (broadcastChat != null)\r\n            {\r\n                Title = broadcastChat.Title.ToString();\r\n            }\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                Title = channel.Title.ToString();\r\n                About = channel.About != null ? channel.About.ToString() : string.Empty;\r\n            }\r\n\r\n            var channel44 = CurrentItem as TLChannel44;\r\n            if (channel44 != null)\r\n            {\r\n                _signMessages = channel44.Signatures;\r\n            }\r\n\r\n            var channel68 = CurrentItem as TLChannel68;\r\n            if (channel68 != null)\r\n            {\r\n                _hiddenPrehistory = channel68.HiddenPrehistory;\r\n            }\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => SignMessages))\r\n                {\r\n                    if (channel44 == null) return;\r\n\r\n                    MTProtoService.ToggleSignaturesAsync(channel44.ToInputChannel(), new TLBool(SignMessages),\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"channels.toggleComments error \" + error);\r\n                        }));\r\n                }\r\n                else if (Property.NameEquals(args.PropertyName, () => HiddenPrehistory))\r\n                {\r\n                    if (channel44 == null) return;\r\n\r\n                    MTProtoService.TogglePreHistoryHiddenAsync(channel44.ToInputChannel(), new TLBool(HiddenPrehistory),\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            MTProtoService.GetFullChannelAsync(channel44.ToInputChannel(), result2 =>\r\n                            {\r\n                                \r\n                            });\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"channels.toggleComments error \" + error);\r\n                        }));\r\n                }\r\n            };\r\n        }\r\n\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n\r\n        }\r\n\r\n        public void EditPublicLink()\r\n        {\r\n            StateService.CurrentChat = CurrentItem as TLChatBase;\r\n            NavigationService.UriFor<EditGroupTypeViewModel>().Navigate();\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            var chat = CurrentItem as TLChat;\r\n            if (chat != null)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.EditChatTitleAsync(chat.Id, new TLString(Title),\r\n                    statedMessage =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        var updates = statedMessage as TLUpdates;\r\n                        if (updates != null)\r\n                        {\r\n                            var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                            if (updateNewMessage != null)\r\n                            {\r\n                                EventAggregator.Publish(updateNewMessage.Message);\r\n                                BeginOnUIThread(() => NavigationService.GoBack());\r\n                            }\r\n                        }\r\n\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.editChatTitle error \" + error);\r\n\r\n                        IsWorking = false;\r\n                        BeginOnUIThread(() => NavigationService.GoBack());\r\n                    });\r\n                return;\r\n            }\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                EditChannelAboutAsync(channel, new TLString(About),\r\n                    () => EditChannelTitleAsync(channel, new TLString(Title), \r\n                        () => NavigationService.GoBack()));\r\n\r\n                return;\r\n            }\r\n\r\n            var broadcastChat = CurrentItem as TLBroadcastChat;\r\n            if (broadcastChat != null)\r\n            {\r\n                broadcastChat.Title = new TLString(Title);\r\n                CacheService.SyncBroadcast(broadcastChat, result => BeginOnUIThread(() => NavigationService.GoBack()));\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void DeleteChannel()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null || !channel.Creator) return;\r\n\r\n            var confirmationString = channel.IsMegaGroup\r\n                ? AppResources.DeleteGroupConfirmation\r\n                : AppResources.DeleteChannelConfirmation;\r\n\r\n            var confirmation = MessageBox.Show(confirmationString, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.DeleteChannelAsync(channel, \r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    ContinueDeleteChannel(channel);\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"channels.deleteChannel error \" + error);\r\n\r\n                    IsWorking = false;\r\n\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST)\r\n                        && error.TypeEquals(ErrorType.CHANNEL_PRIVATE))\r\n                    {\r\n                        ContinueDeleteChannel(channel);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private void ContinueDeleteChannel(TLChannel channel)\r\n        {\r\n            var dialog = CacheService.GetDialog(new TLPeerChannel {Id = channel.Id});\r\n            \r\n            if (dialog != null)\r\n            {\r\n                CacheService.DeleteDialog(dialog);\r\n                DialogsViewModel.UnpinFromStart(dialog);\r\n                EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n            }\r\n\r\n            NavigationService.RemoveBackEntry();\r\n            NavigationService.RemoveBackEntry();\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        public void EditChannelTitleAsync(TLChannel channel, TLString title, System.Action callback)\r\n        {\r\n            if (TLString.Equals(title, channel.Title, StringComparison.Ordinal))\r\n            {\r\n                callback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.EditTitleAsync(channel, title,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var updates = result as TLUpdates;\r\n                    if (updates != null)\r\n                    {\r\n                        var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewChannelMessage) as TLUpdateNewChannelMessage;\r\n                        if (updateNewMessage != null)\r\n                        {\r\n                            EventAggregator.Publish(updateNewMessage.Message);\r\n                            \r\n                        }\r\n                    } \r\n\r\n                    callback.SafeInvoke();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"channels.editTitle error \" + error);\r\n\r\n                    IsWorking = false;\r\n\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST) \r\n                        && error.TypeEquals(ErrorType.CHAT_NOT_MODIFIED))\r\n                    {\r\n\r\n                    } \r\n                    callback.SafeInvoke();\r\n                }));\r\n        }\r\n\r\n        public void EditChannelAboutAsync(TLChannel channel, TLString about, System.Action callback)\r\n        {\r\n            if (TLString.Equals(about, channel.About, StringComparison.Ordinal))\r\n            {\r\n                callback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.EditAboutAsync(channel, about,\r\n                statedMessage => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    channel.About = about;\r\n                    CacheService.Commit();\r\n\r\n                    callback.SafeInvoke();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"channels.editAbout error \" + error);\r\n\r\n                    IsWorking = false;\r\n\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST) \r\n                        && error.TypeEquals(ErrorType.CHAT_ABOUT_NOT_MODIFIED))\r\n                    {\r\n\r\n                    }\r\n                    callback.SafeInvoke();\r\n                }));\r\n        }\r\n\r\n        public void ReplacePhoto()\r\n        {\r\n            if (CurrentItem is TLChat || CurrentItem is TLChannel)\r\n            {\r\n                EditChatActions.EditPhoto(photo =>\r\n                {\r\n                    var fileId = TLLong.Random();\r\n                    IsWorking = true;\r\n                    _uploadManager.UploadFile(fileId, CurrentItem, photo);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void DeletePhoto()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                //IsWorking = true;\r\n                MTProtoService.EditPhotoAsync(channel, new TLInputChatPhotoEmpty(),\r\n                    result => { },\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        //IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"channels.editPhoto error \" + error);\r\n                    }));\r\n            }\r\n\r\n            var chat = CurrentItem as TLChat;\r\n            if (chat != null)\r\n            {\r\n                //IsWorking = true;\r\n                MTProtoService.EditChatPhotoAsync(chat.Id, new TLInputChatPhotoEmpty(),\r\n                    result => { },\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        //IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"messages.editChatPhoto error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public void AddManager()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null || channel.IsForbidden) return;\r\n\r\n            StateService.IsInviteVisible = false;\r\n            StateService.CurrentChat = channel;\r\n            //StateService.RemovedUsers = Items;\r\n            StateService.RequestForwardingCount = false;\r\n            NavigationService.UriFor<AddChatParticipantViewModel>().Navigate();\r\n        }\r\n\r\n        public void GroupStickers()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null || channel.IsForbidden) return;\r\n\r\n            StateService.CurrentChat = channel;\r\n            NavigationService.UriFor<GroupStickersViewModel>().Navigate();\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n            if (item.Owner == CurrentItem)\r\n            {\r\n                IsWorking = false;\r\n            }\r\n        }\r\n    }\r\n\r\n    public static class EditChatActions\r\n    {\r\n        private static CropControl _cropControl;\r\n\r\n        public static void EditPhoto(Action<byte[]> callback)\r\n        {\r\n            var photoPickerSettings = IoC.Get<IStateService>().GetPhotoPickerSettings();\r\n            if (photoPickerSettings != null && photoPickerSettings.External)\r\n            {\r\n                var photoChooserTask = new PhotoChooserTask\r\n                {\r\n                    ShowCamera = true,\r\n                    PixelHeight = 800,\r\n                    PixelWidth = 800\r\n                };\r\n\r\n                photoChooserTask.Completed += (o, e) =>\r\n                {\r\n                    if (e.TaskResult == TaskResult.OK)\r\n                    {\r\n                        byte[] bytes;\r\n                        var sourceStream = e.ChosenPhoto;\r\n                        using (var memoryStream = new MemoryStream())\r\n                        {\r\n                            sourceStream.CopyTo(memoryStream);\r\n                            bytes = memoryStream.ToArray();\r\n                        }\r\n                        callback.SafeInvoke(bytes);\r\n                    }\r\n                };\r\n\r\n                photoChooserTask.Show();\r\n            }\r\n            else\r\n            {\r\n                ChooseAttachmentViewModel.OpenPhotoPicker(true, (result1, result2) =>\r\n                {\r\n                    Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.4), () =>\r\n                    {\r\n                        var frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n                        PhoneApplicationPage page = null;\r\n                        if (frame != null)\r\n                        {\r\n                            page = frame.Content as PhoneApplicationPage;\r\n                            if (page != null)\r\n                            {\r\n                                var applicationBar = page.ApplicationBar;\r\n                                if (applicationBar != null)\r\n                                {\r\n                                    applicationBar.IsVisible = false;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        if (page == null) return;\r\n\r\n                        var popup = new Popup();\r\n                        var cropControl = new CropControl\r\n                        {\r\n                            Width = page.ActualWidth,\r\n                            Height = page.ActualHeight\r\n                        };\r\n                        _cropControl = cropControl;\r\n                        page.SizeChanged += PageOnSizeChanged;\r\n\r\n                        cropControl.Close += (sender, args) =>\r\n                        {\r\n                            _cropControl = null;\r\n                            popup.IsOpen = false;\r\n                            popup.Child = null;\r\n\r\n                            frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n                            if (frame != null)\r\n                            {\r\n                                page = frame.Content as PhoneApplicationPage;\r\n                                if (page != null)\r\n                                {\r\n                                    page.SizeChanged -= PageOnSizeChanged;\r\n                                    var applicationBar = page.ApplicationBar;\r\n                                    if (applicationBar != null)\r\n                                    {\r\n                                        applicationBar.IsVisible = true;\r\n                                    }\r\n                                }\r\n                            }\r\n                        };\r\n                        cropControl.Crop += (sender, args) =>\r\n                        {\r\n                            callback.SafeInvoke(args.File);\r\n\r\n                            cropControl.TryClose();\r\n                        };\r\n                        cropControl.SetFile(result1.FirstOrDefault(), result2.FirstOrDefault());\r\n\r\n                        popup.Child = cropControl;\r\n                        popup.IsOpen = true;\r\n                    });\r\n                });\r\n            }\r\n        }\r\n\r\n        private static void PageOnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            if (_cropControl != null)\r\n            {\r\n                _cropControl.Width = e.NewSize.Width;\r\n                _cropControl.Height = e.NewSize.Height;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/EditGroupTypeViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views.Chats;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class EditGroupTypeViewModel : ViewModelBase\r\n    {\r\n        public string TypeCaption\r\n        {\r\n            get\r\n            {\r\n                return IsMegaGroup ? AppResources.GroupType : AppResources.ChannelType;\r\n            }\r\n        }\r\n\r\n        public string PublicTypeTitle\r\n        {\r\n            get\r\n            {\r\n                return IsMegaGroup ? AppResources.Public : AppResources.PublicChannel;\r\n            }\r\n        }\r\n\r\n        public string PublicTypeDescription\r\n        {\r\n            get\r\n            {\r\n                return IsMegaGroup ? AppResources.PublicGroupDescription : AppResources.PublicChannelDescription;\r\n            }\r\n        }\r\n\r\n        public string PrivateTypeTitle\r\n        {\r\n            get\r\n            {\r\n                return IsMegaGroup ? AppResources.Private : AppResources.PrivateChannel;\r\n            }\r\n        }\r\n\r\n        public string PrivateTypeDescription\r\n        {\r\n            get\r\n            {\r\n                return IsMegaGroup ? AppResources.PrivateGroupDescription : AppResources.PrivateChannelDescription;\r\n            }\r\n        }\r\n\r\n        public string PublicLinkDescription\r\n        {\r\n            get\r\n            {\r\n                return IsMegaGroup ? AppResources.PublicGroupLinkDescription : AppResources.PublicLinkDescription;\r\n            }\r\n        }\r\n\r\n        public string PrivateLinkDescription\r\n        {\r\n            get\r\n            {\r\n                return IsMegaGroup ? AppResources.PrivateGroupLinkDescription : AppResources.PrivateLinkDescription;\r\n            }\r\n        }\r\n\r\n        public bool IsMegaGroup\r\n        {\r\n            get { return _newChannel != null && _newChannel.IsMegaGroup; }\r\n        }\r\n\r\n        public ObservableCollection<TLChatBase> AdminedPublicChannels { get; set; }\r\n\r\n        private bool _tooMuchUsernames;\r\n\r\n        public bool TooMuchUsernames\r\n        {\r\n            get { return _tooMuchUsernames; }\r\n            set { SetField(ref _tooMuchUsernames, value, () => TooMuchUsernames); }\r\n        }\r\n\r\n        private bool _isPublic = true;\r\n\r\n        public bool IsPublic\r\n        {\r\n            get { return _isPublic; }\r\n            set\r\n            {\r\n                SetField(ref _isPublic, value, () => IsPublic);\r\n                NotifyOfPropertyChange(() => ChannelTypeDescription);\r\n                NotifyOfPropertyChange(() => ChannelLinkDescription);\r\n            }\r\n        }\r\n\r\n        public string ChannelTypeDescription\r\n        {\r\n            get { return IsPublic ? AppResources.PublicGroupDescription : AppResources.PrivateGroupDescription; }\r\n        }\r\n\r\n        private string _userName;\r\n\r\n        public string UserName\r\n        {\r\n            get { return _userName; }\r\n            set { SetField(ref _userName, value, () => UserName); }\r\n        }\r\n\r\n        private bool _isUsernameAvailable;\r\n\r\n        public bool IsUsernameAvailable\r\n        {\r\n            get { return _isUsernameAvailable; }\r\n            set { SetField(ref _isUsernameAvailable, value, () => IsUsernameAvailable); }\r\n        }\r\n\r\n        private string _usernameAvailableString;\r\n\r\n        public string UsernameAvailableString\r\n        {\r\n            get { return _usernameAvailableString; }\r\n            set { SetField(ref _usernameAvailableString, value, () => UsernameAvailableString); }\r\n        }\r\n\r\n        private bool _hasError;\r\n\r\n        public bool HasError\r\n        {\r\n            get { return _hasError; }\r\n            set\r\n            {\r\n                SetField(ref _hasError, value, () => HasError);\r\n                if (value)\r\n                {\r\n                    IsUsernameAvailable = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        private string _error = \" \";\r\n\r\n        public string Error\r\n        {\r\n            get { return _error; }\r\n            set { SetField(ref _error, value, () => Error); }\r\n        }\r\n\r\n        public string ChannelLinkDescription\r\n        {\r\n            get { return IsPublic ? AppResources.PublicGroupLinkDescription : AppResources.PrivateGroupLinkDescription; }\r\n        }\r\n\r\n        public TLExportedChatInvite Invite { get; set; }\r\n\r\n\r\n        private string _inviteLink;\r\n\r\n        public string InviteLink\r\n        {\r\n            get { return _inviteLink; }\r\n            set { SetField(ref _inviteLink, value, () => InviteLink); }\r\n        }\r\n\r\n        private readonly TLChannel _newChannel;\r\n\r\n        public EditGroupTypeViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            AdminedPublicChannels = new ObservableCollection<TLChatBase>();\r\n\r\n            InviteLink = AppResources.Loading;\r\n\r\n            _newChannel = StateService.CurrentChat as TLChannel;\r\n            StateService.CurrentChat = null;\r\n\r\n            if (_newChannel != null)\r\n            {\r\n                if (!TLString.IsNullOrEmpty(_newChannel.UserName))\r\n                {\r\n                    _userName = _newChannel.UserName.ToString();\r\n                }\r\n                var chatInviteExported = _newChannel.ExportedInvite as TLChatInviteExported;\r\n                if (chatInviteExported != null)\r\n                {\r\n                    InviteLink = chatInviteExported.Link.ToString();\r\n                }\r\n\r\n                if (TLString.IsNullOrEmpty(_newChannel.UserName))\r\n                {\r\n                    MTProtoService.CheckUsernameAsync(new TLInputChannelEmpty(), new TLString(\"username\"), \r\n                        result => BeginOnUIThread(() =>\r\n                        {\r\n                            TooMuchUsernames = false;\r\n                        }),\r\n                        error => BeginOnUIThread(() =>\r\n                        {\r\n                            if (TLRPCError.TypeEquals(error, ErrorType.CHANNELS_ADMIN_PUBLIC_TOO_MUCH))\r\n                            {\r\n                                HasError = true;\r\n                                Error = AppResources.ChannelsAdminPublicTooMuchShort;\r\n                                TooMuchUsernames = true;\r\n                                GetAdminedPublichChannelsAsync();\r\n                            }\r\n                        }));\r\n                }\r\n            }\r\n\r\n            IsPublic = !string.IsNullOrEmpty(UserName);\r\n            if (!IsPublic && InviteLink == AppResources.Loading)\r\n            {\r\n                ExportInvite();\r\n            }\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => IsPublic))\r\n                {\r\n                    if (!IsPublic && Invite == null)\r\n                    {\r\n                        ExportInvite();\r\n                    }\r\n                }\r\n                else if (Property.NameEquals(args.PropertyName, () => UserName))\r\n                {\r\n                    var userName = UserName;\r\n                    BeginOnUIThread(TimeSpan.FromSeconds(0.3), () =>\r\n                    {\r\n                        if (string.Equals(userName, UserName))\r\n                        {\r\n                            Check();\r\n                        }\r\n                    });\r\n                }\r\n            };\r\n        }\r\n\r\n        private void GetAdminedPublichChannelsAsync()\r\n        {\r\n            if (AdminedPublicChannels.Count > 0) return;\r\n\r\n            MTProtoService.GetAdminedPublicChannelsAsync(\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    AdminedPublicChannels.Clear();\r\n                    foreach (var chat in result.Chats)\r\n                    {\r\n                        AdminedPublicChannels.Add(chat);\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"channels.getAdminedPublicChannels error \" + error);\r\n                }));\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n        }\r\n\r\n        private static bool IsValidSymbol(char symbol)\r\n        {\r\n            if ((symbol >= 'a' && symbol <= 'z')\r\n                || (symbol >= 'A' && symbol <= 'Z')\r\n                || (symbol >= '0' && symbol <= '9')\r\n                || symbol == '_')\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public void Check()\r\n        {\r\n            var checkedUsername = UserName;\r\n            \r\n            var username = UserName;\r\n            if (username != null\r\n                && username.StartsWith(\"@\"))\r\n            {\r\n                username = username.Substring(1, username.Length - 1);\r\n            }\r\n\r\n            if (string.IsNullOrEmpty(username))\r\n            {\r\n                HasError = false;\r\n                IsUsernameAvailable = false;\r\n                //Error = string.Empty;\r\n                return;\r\n            }\r\n\r\n            var isValidSymbols = username.All(IsValidSymbol);\r\n            if (!isValidSymbols)\r\n            {\r\n                HasError = true;\r\n                Error =  IsMegaGroup ? AppResources.GroupNameInvalid : AppResources.ChannelNameInvalid;\r\n                return;\r\n            }\r\n\r\n            if (username[0] >= '0' && username[0] <= '9')\r\n            {\r\n                HasError = true;\r\n                Error = IsMegaGroup ? AppResources.GroupNameStartsWithNumber : AppResources.ChannelNameStartsWithNumber;\r\n                return;\r\n            }\r\n\r\n            if (username.Length < Constants.UsernameMinLength)\r\n            {\r\n                HasError = true;\r\n                Error = IsMegaGroup ? AppResources.GroupNameShort : AppResources.ChannelNameShort;\r\n                return;\r\n            }\r\n\r\n            HasError = false;\r\n            IsUsernameAvailable = false;\r\n            //if (string.Equals(username, _newChannel.UserName.ToString()))\r\n\r\n            MTProtoService.CheckUsernameAsync(_newChannel.ToInputChannel(), new TLString(username),\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    HasError = !result.Value;\r\n                    if (HasError)\r\n                    {\r\n                        Error = IsMegaGroup ? AppResources.GroupNameOccupied : AppResources.ChannelNameOccupied;\r\n                    }\r\n\r\n                    if (string.Equals(checkedUsername, UserName) && result.Value)\r\n                    {\r\n                        IsUsernameAvailable = true;\r\n                        UsernameAvailableString = string.Format(AppResources.NameIsAvailable, checkedUsername);\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    HasError = true;\r\n                    if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                    {\r\n                        Error = AppResources.FloodWaitString;\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                    {\r\n                        var messageBuilder = new StringBuilder();\r\n                        messageBuilder.AppendLine(AppResources.ServerErrorMessage);\r\n                        messageBuilder.AppendLine();\r\n                        messageBuilder.AppendLine(\"Method: channels.checkUsername\");\r\n                        messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                        Error = AppResources.ServerError;\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_INVALID))\r\n                        {\r\n                            Error = IsMegaGroup ? AppResources.GroupNameInvalid : AppResources.ChannelNameInvalid;\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_OCCUPIED))\r\n                        {\r\n                            Error = IsMegaGroup ? AppResources.GroupNameOccupied : AppResources.ChannelNameOccupied;\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.CHANNELS_ADMIN_PUBLIC_TOO_MUCH))\r\n                        {\r\n                            MessageBox.Show(AppResources.ChannelsAdminPublicTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n\r\n                            Error = AppResources.ChannelsAdminPublicTooMuchShort;\r\n                            TooMuchUsernames = true;\r\n                            GetAdminedPublichChannelsAsync();\r\n                        }\r\n                        else \r\n                        {\r\n                            Error = error.ToString();\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Error = string.Empty;\r\n                        Execute.ShowDebugMessage(\"channels.checkUsername error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void RevokeLink(TLChatBase chat)\r\n        {\r\n            var channel = chat as TLChannel;\r\n            if (channel == null) return;\r\n\r\n            var richTextBox = new RichTextBox{ TextWrapping = TextWrapping.Wrap };\r\n            ConvertToSupergroupView.SetFormattedText(richTextBox, string.Format(AppResources.RevokeLinkConfirmation2, \"t.me/\" + channel.UserName, channel.FullName));\r\n#if WP8\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n            if (isFullHD)\r\n            {\r\n                richTextBox.FontSize = 17.667;\r\n            }\r\n#endif\r\n            ShellViewModel.ShowCustomMessageBox(null, AppResources.RevokeLink,\r\n                AppResources.Cancel.ToLowerInvariant(), AppResources.Revoke.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.LeftButton)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.UpdateUsernameAsync(channel.ToInputChannel(), TLString.Empty,\r\n                            user => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n\r\n                                channel.UserName = TLString.Empty;\r\n                                channel.NotifyOfPropertyChange(() => channel.UserName);\r\n\r\n                                TooMuchUsernames = false;\r\n                                HasError = false;\r\n                                Error = string.Empty;\r\n                                Check();\r\n                            }),\r\n                            error => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                                {\r\n                                    //HasError = true;\r\n                                    //Error = AppResources.FloodWaitString;\r\n                                    MessageBox.Show(AppResources.FloodWaitString, AppResources.Error, MessageBoxButton.OK);\r\n                                }\r\n                                else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                                {\r\n                                    var messageBuilder = new StringBuilder();\r\n                                    messageBuilder.AppendLine(AppResources.ServerErrorMessage);\r\n                                    messageBuilder.AppendLine();\r\n                                    messageBuilder.AppendLine(\"Method: channels.updateUsername\");\r\n                                    messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                                    //HasError = true;\r\n                                    //Error = AppResources.ServerError;\r\n                                    MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK);\r\n                                }\r\n                                else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                                {\r\n                                    if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_NOT_MODIFIED))\r\n                                    {\r\n                                        channel.UserName = TLString.Empty;\r\n                                        channel.NotifyOfPropertyChange(() => channel.UserName);\r\n\r\n                                        HasError = false;\r\n                                        Error = string.Empty;\r\n                                        Check();\r\n                                        return;\r\n                                    }\r\n                                    else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_INVALID))\r\n                                    {\r\n                                        //HasError = true;\r\n                                        //Error = AppResources.UsernameInvalid;\r\n                                        MessageBox.Show(IsMegaGroup ? AppResources.GroupNameInvalid : AppResources.ChannelNameInvalid, AppResources.Error, MessageBoxButton.OK);\r\n                                    }\r\n                                    else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_OCCUPIED))\r\n                                    {\r\n                                        //HasError = true;\r\n                                        //Error = AppResources.UsernameOccupied;\r\n                                        MessageBox.Show(IsMegaGroup ? AppResources.GroupNameOccupied : AppResources.ChannelNameOccupied, AppResources.Error, MessageBoxButton.OK);\r\n                                    }\r\n                                    else if (TLRPCError.TypeEquals(error, ErrorType.CHANNELS_ADMIN_PUBLIC_TOO_MUCH))\r\n                                    {\r\n                                        //HasError = true;\r\n                                        //Error = AppResources.ChannelsAdminPublicTooMuchShort;\r\n                                        MessageBox.Show(AppResources.ChannelsAdminPublicTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        //HasError = true;\r\n                                        //Error = error.ToString();\r\n                                        Execute.ShowDebugMessage(\"channels.updateUsername error \" + error);\r\n                                    }\r\n                                }\r\n                                else\r\n                                {\r\n                                    //HasError = true;\r\n                                    //Error = string.Empty;\r\n                                    Execute.ShowDebugMessage(\"channels.updateUsername error \" + error);\r\n                                }\r\n                            }));\r\n                    }\r\n                },\r\n                richTextBox);\r\n        }\r\n\r\n        private void ExportInvite()\r\n        {\r\n            if (IsWorking) return;\r\n            if (Invite != null) return;\r\n            if (_newChannel.ExportedInvite is TLChatInviteExported) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.ExportInviteAsync(_newChannel.ToInputChannel(),\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    _newChannel.ExportedInvite = result;\r\n\r\n                    IsWorking = false;\r\n                    Invite = result;\r\n                    var inviteExported = Invite as TLChatInviteExported;\r\n                    if (inviteExported != null)\r\n                    {\r\n                        if (!TLString.IsNullOrEmpty(inviteExported.Link))\r\n                        {\r\n                            InviteLink = inviteExported.Link.ToString();\r\n                        }\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"channels.exportInvite error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void CopyInvite()\r\n        {\r\n            var inviteExported = Invite as TLChatInviteExported;\r\n            if (inviteExported != null)\r\n            {\r\n                if (!TLString.IsNullOrEmpty(inviteExported.Link))\r\n                {\r\n                    Clipboard.SetText(inviteExported.Link.ToString());\r\n                }\r\n            }\r\n        }\r\n\r\n        public event EventHandler EmptyUserName;\r\n\r\n        protected virtual void RaiseEmptyUserName()\r\n        {\r\n            var handler = EmptyUserName;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            var username = IsPublic? UserName : string.Empty;\r\n            if (username != null\r\n                && username.StartsWith(\"@\"))\r\n            {\r\n                username = username.Substring(1, username.Length - 1);\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.UpdateUsernameAsync(_newChannel.ToInputChannel(), new TLString(username),\r\n                user => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    _newChannel.UserName = new TLString(username);\r\n                    _newChannel.NotifyOfPropertyChange(() => _newChannel.UserName);\r\n                    NavigationService.GoBack();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                    {\r\n                        HasError = true;\r\n                        Error = AppResources.FloodWaitString;\r\n                        MessageBox.Show(AppResources.FloodWaitString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                    {\r\n                        var messageBuilder = new StringBuilder();\r\n                        messageBuilder.AppendLine(AppResources.ServerErrorMessage);\r\n                        messageBuilder.AppendLine();\r\n                        messageBuilder.AppendLine(\"Method: channels.updateUsername\");\r\n                        messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                        HasError = true;\r\n                        Error = AppResources.ServerError;\r\n                        MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK);\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_NOT_MODIFIED))\r\n                        {\r\n                            _newChannel.UserName = new TLString(username);\r\n                            _newChannel.NotifyOfPropertyChange(() => _newChannel.UserName);\r\n\r\n                            HasError = false;\r\n                            Error = string.Empty;\r\n                            NavigationService.GoBack();\r\n                            return;\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_INVALID))\r\n                        {\r\n                            HasError = true;\r\n                            Error = IsMegaGroup ? AppResources.GroupNameInvalid : AppResources.ChannelNameInvalid;\r\n                            MessageBox.Show(IsMegaGroup ? AppResources.GroupNameInvalid : AppResources.ChannelNameInvalid, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_OCCUPIED))\r\n                        {\r\n                            HasError = true;\r\n                            Error = IsMegaGroup ? AppResources.GroupNameOccupied : AppResources.ChannelNameOccupied;\r\n                            MessageBox.Show(IsMegaGroup ? AppResources.GroupNameOccupied : AppResources.ChannelNameOccupied, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.CHANNELS_ADMIN_PUBLIC_TOO_MUCH))\r\n                        {\r\n                            HasError = true;\r\n                            Error = AppResources.ChannelsAdminPublicTooMuchShort;\r\n                            MessageBox.Show(AppResources.ChannelsAdminPublicTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else\r\n                        {\r\n                            HasError = true;\r\n                            Error = error.ToString();\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        HasError = true;\r\n                        Error = string.Empty;\r\n                        Execute.ShowDebugMessage(\"channels.updateUsername error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void Next()\r\n        {\r\n            if (IsPublic)\r\n            {\r\n                if (string.IsNullOrEmpty(UserName))\r\n                {\r\n                    MessageBox.Show(AppResources.ChoosePublicGroupLinkNotification);\r\n\r\n                    RaiseEmptyUserName();\r\n\r\n                    return;\r\n                }\r\n\r\n                Done();\r\n\r\n                return;\r\n            }\r\n            else\r\n            {\r\n                Done();\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/GroupsInCommonViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class GroupsInCommonViewModel : ItemsViewModelBase<TLChatBase>, Telegram.Api.Aggregator.IHandle<DownloadableItem>\r\n    {\r\n        private readonly TLUserBase _currentUser;\r\n\r\n        private readonly Dictionary<int, TLChatBase> _resultsDict = new Dictionary<int, TLChatBase>(); \r\n\r\n        public GroupsInCommonViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            _currentUser = StateService.CurrentContact;\r\n            StateService.CurrentContact = null;\r\n\r\n            Status = AppResources.Loading;\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                if (_currentUser == null) return;\r\n\r\n                MTProtoService.GetCommonChatsAsync(_currentUser.ToInputUser(), new TLInt(0), new TLInt(100),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        Status = result.Chats.Count > 0 ? string.Empty : AppResources.NoGroupsHere;\r\n\r\n                        const int firstSliceCount = 11;\r\n                        var firstSlice = new List<TLChatBase>();\r\n                        var secondSlice = new List<TLChatBase>();\r\n\r\n                        for (var i = 0; i < result.Chats.Count; i++)\r\n                        {\r\n                            _resultsDict[result.Chats[i].Index] = result.Chats[i];\r\n\r\n                            if (i < firstSliceCount)\r\n                            {\r\n                                firstSlice.Add(result.Chats[i]);\r\n                            }\r\n                            else\r\n                            {\r\n                                secondSlice.Add(result.Chats[i]);\r\n                            }\r\n                        }\r\n\r\n                        Items.Clear();\r\n                        foreach (var chat in firstSlice)\r\n                        {\r\n                            Items.Add(chat);\r\n                        }\r\n\r\n                        if (secondSlice.Count > 0)\r\n                        {\r\n                            BeginOnUIThread(() =>\r\n                            {\r\n                                foreach (var chat in secondSlice)\r\n                                {\r\n                                    Items.Add(chat);\r\n                                }\r\n                            });\r\n                        }\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        Status = AppResources.NoGroupsHere;\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.getCommonChats error=\" + error);\r\n                    }));\r\n            });\r\n        }\r\n\r\n        public void ChatAction(TLChatBase chatBase)\r\n        {\r\n            if (chatBase == null) return;\r\n\r\n            StateService.With = chatBase;\r\n            StateService.RemoveBackEntries = true;\r\n            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            \r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Chats/InviteLinkViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class InviteLinkViewModel : ViewModelBase\r\n    {\r\n        private string _link;\r\n\r\n        public string Link\r\n        {\r\n            get { return _link; }\r\n            set { SetField(ref _link, value, () => Link); }\r\n        }\r\n\r\n        private readonly TLChatBase _chat;\r\n\r\n        public InviteLinkViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            if (StateService.CurrentChat != null)\r\n            {\r\n                _chat = StateService.CurrentChat;\r\n                StateService.CurrentChat = null;\r\n            }\r\n\r\n            if (_chat == null) return;\r\n\r\n            var chatInviteExported = _chat.ExportedInvite as TLChatInviteExported;\r\n            if (chatInviteExported != null)\r\n            {\r\n                _link = chatInviteExported.Link.ToString();\r\n            }\r\n            else\r\n            {\r\n                ExportChatInviteAsync();\r\n            }\r\n        }\r\n\r\n        public void CopyLink()\r\n        {\r\n            if (string.IsNullOrEmpty(Link)) return;\r\n\r\n            Clipboard.SetText(Link);\r\n            MessageBox.Show(AppResources.CopyLinkHint);\r\n        }\r\n\r\n        public void RevokeLink()\r\n        {\r\n            if (_chat == null) return;\r\n\r\n            var result = MessageBox.Show(AppResources.RevokeLinkConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n\r\n            if (result == MessageBoxResult.OK)\r\n            {\r\n                ExportChatInviteAsync();\r\n            }\r\n        }\r\n\r\n        private void ExportChatInviteAsync()\r\n        {\r\n            var channel = _chat as TLChannel;\r\n            if (channel != null)\r\n            {\r\n\r\n                IsWorking = true;\r\n                MTProtoService.ExportInviteAsync(channel.ToInputChannel(),\r\n                    chatInviteBase => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        var chatInviteExported = chatInviteBase as TLChatInviteExported;\r\n                        if (chatInviteExported != null)\r\n                        {\r\n                            Link = chatInviteExported.Link.ToString();\r\n                        }\r\n                        else\r\n                        {\r\n                            Link = string.Empty;\r\n                        }\r\n\r\n                        _chat.ExportedInvite = chatInviteExported;\r\n                        CacheService.Commit();\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                    }));\r\n\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.ExportChatInviteAsync(_chat.Id,\r\n                chatInviteBase => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    var chatInviteExported = chatInviteBase as TLChatInviteExported;\r\n                    if (chatInviteExported != null)\r\n                    {\r\n                        Link = chatInviteExported.Link.ToString();\r\n                    }\r\n                    else\r\n                    {\r\n                        Link = string.Empty;\r\n                    }\r\n\r\n                    _chat.ExportedInvite = chatInviteExported;\r\n                    CacheService.Commit();\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                }));\r\n        }\r\n\r\n        public void ShareLink()\r\n        {\r\n            if (string.IsNullOrEmpty(Link)) return;\r\n\r\n            StateService.ShareLink = Link;\r\n            StateService.ShareMessage = Link;\r\n            StateService.ShareCaption = AppResources.InviteFriends;\r\n            NavigationService.UriFor<ShareViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Contacts/ContactDetailsViewModel.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Windows.Data.Json;\r\nusing Windows.Phone.Networking.Voip;\r\nusing Windows.Storage;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Microsoft.Phone.Tasks;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Calls;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views.Calls;\r\nusing TelegramClient.Views.Controls;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Contacts\r\n{\r\n    public class ContactDetailsViewModel : ItemDetailsViewModelBase, \r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserBlocked>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateNotifySettings>\r\n    {\r\n        public string Link\r\n        {\r\n            get\r\n            {\r\n                var userName = CurrentItem as IUserName;\r\n                if (userName != null && !TLString.IsNullOrEmpty(userName.UserName))\r\n                {\r\n                    return \"t.me/\" + userName.UserName;\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public string GroupsInCommonSubtitle\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentItem as TLUser45;\r\n                if (user != null && user.CommonChatsCount != null && user.CommonChatsCount.Value > 0)\r\n                {\r\n                    return Utils.Language.Declension(\r\n                    user.CommonChatsCount.Value,\r\n                    AppResources.GroupNominativeSingular,\r\n                    AppResources.GroupNominativePlural,\r\n                    AppResources.GroupGenitiveSingular,\r\n                    AppResources.GroupGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public Visibility GroupsInCommonVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentItem as TLUser45;\r\n                if (user != null && user.CommonChatsCount != null && user.CommonChatsCount.Value > 0)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public Visibility AddToGroupVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentItem as TLUser;\r\n                if (user != null && user.IsBot && !user.IsBotGroupsBlocked)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public Visibility NotificationsVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentContact as TLUser;\r\n                if (user != null)\r\n                {\r\n                    if (user.IsSelf)\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n                }\r\n\r\n                return Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        public Visibility SecretChatVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentContact as TLUser;\r\n                if (user != null)\r\n                {\r\n                    if (user.IsSelf || user.IsBot)\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n                }\r\n\r\n                return Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        public Visibility VoiceCallVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentContact as TLUser;\r\n                if (user != null && !user.IsSelf && !user.IsBot)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        private TimerSpan _selectedSpan;\r\n\r\n        public TimerSpan SelectedSpan\r\n        {\r\n            get { return _selectedSpan; }\r\n            set\r\n            {\r\n                _selectedSpan = value;\r\n\r\n                if (_selectedSpan != null)\r\n                {\r\n                    if (_selectedSpan.Seconds == 0\r\n                        || _selectedSpan.Seconds == int.MaxValue)\r\n                    {\r\n                        MuteUntil = _selectedSpan.Seconds;\r\n                    }\r\n                    else\r\n                    {\r\n                        var now = DateTime.Now;\r\n                        var muteUntil = now.AddSeconds(_selectedSpan.Seconds);\r\n\r\n                        MuteUntil = muteUntil < now ? 0 : TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, muteUntil).Value;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public IList<TimerSpan> Spans { get; protected set; } \r\n\r\n        public TLUserBase CurrentContact { get { return CurrentItem as TLUserBase; } }\r\n\r\n        public bool IsBot\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentContact as TLUser;\r\n                return user != null && user.IsBot;\r\n            }\r\n        }\r\n\r\n        public TLString CurrentPhone { get; set; }\r\n\r\n        public string Phone\r\n        {\r\n            get\r\n            {\r\n                if (CurrentContact != null && CurrentContact.HasPhone) return CurrentContact.Phone.ToString();\r\n\r\n                if (CurrentPhone != null) return CurrentPhone.ToString();\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public bool HasPhone { get { return CurrentContact != null && CurrentContact.HasPhone || CurrentPhone != null; } }\r\n\r\n        public bool HasBio\r\n        {\r\n            get\r\n            {\r\n                var user45 = CurrentContact as TLUser45;\r\n\r\n                return user45 != null && !user45.IsBot && !TLString.IsNullOrEmpty(user45.About);\r\n            }\r\n        }\r\n\r\n        public string BioSubtitle\r\n        {\r\n            get\r\n            {\r\n                var user45 = CurrentContact as TLUser45;\r\n\r\n                return user45 != null && !user45.IsBot && !TLString.IsNullOrEmpty(user45.About) ? user45.About.ToString() : string.Empty;\r\n            }\r\n        }\r\n\r\n\r\n        public int PreviousUserId { get; set; }\r\n\r\n        private bool _suppressUpdating = true;\r\n\r\n        private int _muteUntil;\r\n        \r\n        public int MuteUntil\r\n        {\r\n            get { return _muteUntil; }\r\n            set { SetField(ref _muteUntil, value, () => MuteUntil); }\r\n        }\r\n\r\n        private string _selectedSound;\r\n\r\n        public string SelectedSound\r\n        {\r\n            get { return _selectedSound; }\r\n            set\r\n            {\r\n                SetField(ref _selectedSound, value, () => SelectedSound);\r\n            }\r\n        }\r\n\r\n        public void SetSelectedSound(string sound)\r\n        {\r\n            _selectedSound = sound;\r\n        }\r\n\r\n        public List<string> Sounds { get; protected set; }\r\n\r\n        private string _subtitle;\r\n\r\n        public string Subtitle\r\n        {\r\n            get { return _subtitle; }\r\n            set { SetField(ref _subtitle, value, () => Subtitle); }\r\n        }\r\n\r\n        private string _subtitle3;\r\n\r\n        public string Subtitle3\r\n        {\r\n            get { return _subtitle3; }\r\n            set { SetField(ref _subtitle3, value, () => Subtitle3); }\r\n        }\r\n\r\n        public bool IsReportButtonEnabled\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentItem as TLUser;\r\n                return user != null && user.IsBot;\r\n            }\r\n        }\r\n\r\n        private readonly IFileManager _fileManager;\r\n\r\n        private readonly IVoIPService _voipService;\r\n\r\n        public ProfilePhotoViewerViewModel ProfilePhotoViewer { get; set; }\r\n\r\n        public ContactDetailsViewModel(IVoIPService voipService, IFileManager fileManager, ICacheService cacheService, ICommonErrorHandler errorHandler,\r\n            IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService,\r\n            ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _voipService = voipService;\r\n            Spans = new List<TimerSpan>\r\n            {\r\n                new TimerSpan(AppResources.Enabled, string.Empty, 0, AppResources.Enabled),\r\n                new TimerSpan(AppResources.HourNominativeSingular,  \"1\", (int)TimeSpan.FromHours(1.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"1\", AppResources.HourNominativeSingular).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.HourGenitivePlural, \"8\", (int)TimeSpan.FromHours(8.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"8\", AppResources.HourGenitivePlural).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.DayNominativePlural, \"2\", (int)TimeSpan.FromDays(2.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"2\", AppResources.DayNominativePlural).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.Disabled, string.Empty, int.MaxValue, AppResources.Disabled),\r\n            };\r\n            _selectedSpan = Spans[0];\r\n\r\n            _notificationTimer = new DispatcherTimer();\r\n            _notificationTimer.Interval = TimeSpan.FromSeconds(Constants.NotificationTimerInterval);\r\n            _notificationTimer.Tick += OnNotificationTimerTick;\r\n\r\n            _fileManager = fileManager;\r\n\r\n            EventAggregator.Subscribe(this);\r\n            DisplayName = LowercaseConverter.Convert(AppResources.Profile);\r\n\r\n            Sounds = new List<string>();\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => MuteUntil)\r\n                    && !_suppressUpdating)\r\n                {\r\n                    UpdateNotifySettingsAsync();\r\n                }\r\n\r\n                if (Property.NameEquals(args.PropertyName, () => SelectedSound)\r\n                    && !_suppressUpdating)\r\n                {\r\n                    NotificationsViewModel.PlaySound(SelectedSound);\r\n\r\n                    UpdateNotifySettingsAsync();\r\n                }\r\n            };\r\n\r\n            CalculateSecretChatParamsAsync();\r\n        }\r\n\r\n        private void UpdateNotifySettingsAsync()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var notifySettings = new TLInputPeerNotifySettings48\r\n            {\r\n                EventsMask = new TLInt(1),\r\n                MuteUntil = new TLInt(MuteUntil),\r\n                ShowPreviews = new TLBool(true),\r\n                Sound = string.IsNullOrEmpty(SelectedSound) ? new TLString(\"default\") : new TLString(SelectedSound)\r\n            };\r\n\r\n            IsWorking = true;\r\n            MTProtoService.UpdateNotifySettingsAsync(\r\n                CurrentContact.ToInputNotifyPeer(), notifySettings,\r\n                result =>\r\n                {\r\n                    IsWorking = false;\r\n                    CurrentContact.NotifySettings = new TLPeerNotifySettings48\r\n                    {\r\n                        EventsMask = new TLInt(1),\r\n                        MuteUntil = new TLInt(MuteUntil),\r\n                        ShowPreviews = notifySettings.ShowPreviews,\r\n                        Sound = notifySettings.Sound\r\n                    };\r\n\r\n                    var dialog = CacheService.GetDialog(new TLPeerUser { Id = CurrentContact.Id });\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog.NotifySettings = CurrentContact.NotifySettings;\r\n                        dialog.NotifyOfPropertyChange(() => dialog.NotifySettings);\r\n                        dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                        var settings = dialog.With as INotifySettings;\r\n                        if (settings != null)\r\n                        {\r\n                            settings.NotifySettings = CurrentContact.NotifySettings;\r\n                        }\r\n                    }\r\n\r\n                    CacheService.Commit();\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"account.updateNotifySettings error: \" + error);\r\n                });\r\n        }\r\n\r\n        private string GetChatSubtitle3()\r\n        {\r\n            var user = CurrentItem as TLUser;\r\n            if (user != null && user.IsBot)\r\n            {\r\n                var botInfo = user.BotInfo as TLBotInfo;\r\n                if (botInfo != null\r\n                    && !TLString.IsNullOrEmpty(botInfo.Description))\r\n                {\r\n                    return botInfo.Description.ToString();\r\n                }\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public void UpdateSubtitles()\r\n        {\r\n            Subtitle3 = GetChatSubtitle3();\r\n        }\r\n\r\n        public event EventHandler<BlockedEventArgs> BlockedStatusChanged;\r\n\r\n        protected virtual void RaiseBlockedStatusChanged(BlockedEventArgs e)\r\n        {\r\n            var handler = BlockedStatusChanged;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public event EventHandler<ImportEventArgs> ImportStatusChanged;\r\n\r\n        protected virtual void RaiseImportStatusChanged(ImportEventArgs e)\r\n        {\r\n            var handler = ImportStatusChanged;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            Subtitle = DialogDetailsViewModel.GetUserStatus(CurrentContact);\r\n\r\n            Execute.BeginOnThreadPool(TimeSpan.FromSeconds(0.5), () =>\r\n            {\r\n                UpdateNotificationSettings();\r\n\r\n                IsWorking = true;\r\n                MTProtoService.GetFullUserAsync(\r\n                    CurrentContact.ToInputUser(),\r\n                    userFull =>\r\n                    {\r\n                        IsWorking = false;\r\n                        UpdateNotificationSettings();\r\n                        Subtitle = DialogDetailsViewModel.GetUserStatus(CurrentContact);\r\n\r\n                        RaiseBlockedStatusChanged(new BlockedEventArgs { Blocked = userFull.Blocked.Value });\r\n                    },\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"users.getFullUser error: \" + error);\r\n                    });\r\n            });\r\n            \r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        public void UpdateNotificationSettings()\r\n        {\r\n            if (CurrentContact != null && CurrentContact.NotifySettings != null)\r\n            {\r\n                _suppressUpdating = true;\r\n\r\n                var notifySettings = CurrentContact.NotifySettings as TLPeerNotifySettings;\r\n                if (notifySettings != null)\r\n                {\r\n                    MuteUntil = notifySettings.MuteUntil.Value;\r\n                    var sound = StateService.Sounds.FirstOrDefault(x => string.Equals(x, notifySettings.Sound.Value, StringComparison.OrdinalIgnoreCase));\r\n                    SelectedSound = sound ?? StateService.Sounds[0];\r\n\r\n                    _suppressUpdating = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        #region Notification timer\r\n        private readonly DispatcherTimer _notificationTimer;\r\n\r\n        public void StartTimer()\r\n        {\r\n            _notificationTimer.Start();\r\n        }\r\n\r\n        public void StopTimer()\r\n        {\r\n            _notificationTimer.Stop();\r\n        }\r\n\r\n        private void OnNotificationTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            if (MuteUntil > 0 && MuteUntil < int.MaxValue)\r\n            {\r\n                NotifyOfPropertyChange(() => MuteUntil);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region Actions\r\n\r\n        public void SelectSpan(TimerSpan selectedSpan)\r\n        {\r\n            SelectedSpan = selectedSpan;\r\n        }\r\n\r\n        public void SelectNotificationSpan()\r\n        {\r\n            //StateService.SelectedTimerSpan = SelectedSpan;\r\n            NavigationService.UriFor<ChooseNotificationSpanViewModel>().Navigate();\r\n        }\r\n\r\n        public void AddToGroup()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var user = CurrentContact as TLUser;\r\n            if (user != null && user.IsBot && !user.IsBotGroupsBlocked)\r\n            {\r\n                StateService.Bot = CurrentContact;\r\n                NavigationService.UriFor<ChooseDialogViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void BlockContact()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var confirmation = IsBot\r\n                ? MessageBoxResult.OK\r\n                : MessageBox.Show(AppResources.BlockContactConfirmation, AppResources.AppName, MessageBoxButton.OKCancel);\r\n                \r\n            if (confirmation == MessageBoxResult.OK)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.BlockAsync(CurrentContact.ToInputUser(),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        CurrentContact.Blocked = TLBool.True;\r\n                        CacheService.Commit();\r\n                        EventAggregator.Publish(new TLUpdateUserBlocked { UserId = CurrentContact.Id, Blocked = TLBool.True });\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"contacts.block error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public void UnblockContact()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var confirmation = IsBot\r\n                ? MessageBoxResult.OK\r\n                : MessageBox.Show(AppResources.UnblockContactConfirmation, AppResources.AppName, MessageBoxButton.OKCancel);\r\n\r\n            if (confirmation == MessageBoxResult.OK)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.UnblockAsync(CurrentContact.ToInputUser(),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        CurrentContact.Blocked = TLBool.False;\r\n                        CacheService.Commit();\r\n                        EventAggregator.Publish(new TLUpdateUserBlocked { UserId = CurrentContact.Id, Blocked = TLBool.False });\r\n\r\n                        if (IsBot)\r\n                        {\r\n                            NavigationService.GoBack();\r\n                        }\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"contacts.unblock error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public void AddContact()\r\n        {\r\n            if (CurrentContact == null) return;\r\n            if (!HasPhone) return;\r\n\r\n            var userPhone = new TLString(Phone);\r\n            if (TLString.IsNullOrEmpty(userPhone)) return;\r\n\r\n            IsWorking = true;\r\n            ImportContactAsync(CurrentContact, userPhone, MTProtoService,\r\n                result =>\r\n                {\r\n                    if (result.Users.Count > 0)\r\n                    {\r\n                        EventAggregator.Publish(new TLUpdateContactLink24 { UserId = result.Users[0].Id, MyLink = new TLContactLink(), ForeignLink = new TLContactLinkUnknown() });\r\n                        \r\n                        var userBase = result.Users[0];\r\n                        if (userBase != null && userBase.IsContact)\r\n                        {\r\n                            ContactsHelper.CreateContactAsync(_fileManager, StateService, userBase);\r\n                        }\r\n\r\n                        RaiseImportStatusChanged(new ImportEventArgs { Imported = true });\r\n                    }\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        NotifyOfPropertyChange(() => HasPhone);\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"contacts.importContacts error \" + error);\r\n                }));\r\n        }\r\n\r\n        public static void ImportContactAsync(TLUserBase contact, TLString phone, IMTProtoService mtProtoService, Action<TLImportedContacts> callback, Action<TLRPCError> faultCallback)\r\n        {\r\n            var importedContacts = new TLVector<TLInputContactBase>\r\n            {\r\n                new TLInputContact\r\n                {\r\n                    Phone = phone,\r\n                    FirstName = contact.FirstName,\r\n                    LastName = contact.LastName,\r\n                    ClientId = new TLLong(contact.Id.Value)\r\n                }\r\n            };\r\n\r\n            mtProtoService.ImportContactsAsync(\r\n                importedContacts,\r\n                callback.SafeInvoke,\r\n                error =>\r\n                {\r\n                    faultCallback.SafeInvoke(error);\r\n                    Execute.ShowDebugMessage(\"contacts.importContacts error: \" + error);\r\n                });\r\n        }\r\n\r\n        public void DeleteContact()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var messageBoxResult = MessageBox.Show(AppResources.ConfirmDeleteContact, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (messageBoxResult != MessageBoxResult.OK)\r\n            {\r\n                return;\r\n            }\r\n            \r\n            IsWorking = true;\r\n            MTProtoService.DeleteContactAsync(\r\n                CurrentContact.ToInputUser(),\r\n                result =>\r\n                {\r\n                    var link24 = result as TLLink24;\r\n                    if (link24 != null)\r\n                    {\r\n                        EventAggregator.Publish(new TLUpdateContactLink24 { UserId = link24.User.Id, MyLink = link24.MyLink, ForeignLink = link24.ForeignLink });\r\n                    }\r\n\r\n                    RaiseImportStatusChanged(new ImportEventArgs { Imported = false });\r\n\r\n                    ContactsHelper.DeleteContactAsync(StateService, CurrentContact.Id);\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        NotifyOfPropertyChange(() => HasPhone);\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"contacts.deleteContact error: \" + error);\r\n                }));\r\n        }\r\n\r\n        public void SendMessage()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            StateService.FocusOnInputMessage = true;\r\n            if (PreviousUserId != 0 && PreviousUserId == CurrentContact.Index)\r\n            {\r\n                NavigationService.GoBack();\r\n            }\r\n            else\r\n            {\r\n                StateService.RemoveBackEntries = true;\r\n                StateService.With = CurrentContact;\r\n                NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void OpenPhoto()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var photo = CurrentContact.Photo as TLUserProfilePhoto;\r\n            if (photo != null)\r\n            {\r\n                StateService.CurrentPhoto = photo;\r\n                StateService.CurrentContact = CurrentContact;\r\n\r\n                if (ProfilePhotoViewer == null)\r\n                {\r\n                    ProfilePhotoViewer = new ProfilePhotoViewerViewModel(StateService, MTProtoService);\r\n                    NotifyOfPropertyChange(() => ProfilePhotoViewer);\r\n                }\r\n\r\n                BeginOnUIThread(() => ProfilePhotoViewer.OpenViewer());\r\n            }\r\n        }\r\n\r\n        public void OpenMedia()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            StateService.CurrentInputPeer = CurrentContact;\r\n            NavigationService.UriFor<FullMediaViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenGroupsInCommon()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            StateService.CurrentContact = CurrentContact;\r\n            NavigationService.UriFor<GroupsInCommonViewModel>().Navigate();\r\n        }\r\n\r\n        public void Report()\r\n        {\r\n            var userBase = CurrentItem as TLUserBase;\r\n            if (userBase == null) return;\r\n\r\n            Report(userBase.ToInputPeer());\r\n        }\r\n\r\n        public void Call()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var phone = CurrentContact.Phone ?? CurrentPhone;\r\n            if (phone == null) return;\r\n\r\n            var task = new PhoneCallTask();\r\n            task.DisplayName = CurrentContact.FullName;\r\n            task.PhoneNumber = \"+\" + phone;\r\n            task.Show();\r\n        }\r\n        #endregion\r\n\r\n        #region Secret chats\r\n\r\n        public Visibility ProgressVisibility { get { return IsWorking ? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        private TLString _a;\r\n        private TLInt _g;\r\n        private TLString _p;\r\n        private TLString _ga;\r\n        private volatile bool _invokeDelayedUserAction;\r\n\r\n        public void CreateSecretChat()\r\n        {\r\n            var user = CurrentItem as TLUserBase;\r\n            if (user == null) return;\r\n\r\n            if (_a == null\r\n                || _g == null\r\n                || _p == null\r\n                || _ga == null)\r\n            {\r\n                IsWorking = true;\r\n                NotifyOfPropertyChange(() => ProgressVisibility);\r\n                _invokeDelayedUserAction = true;\r\n                return;\r\n            }\r\n\r\n            IsWorking = false;\r\n            NotifyOfPropertyChange(() => ProgressVisibility);\r\n\r\n            var random = new Random();\r\n            var randomId = random.Next();\r\n\r\n            MTProtoService.RequestEncryptionAsync(user.ToInputUser(), new TLInt(randomId), _ga,\r\n                encryptedChat =>\r\n                {\r\n                    var chatWaiting = encryptedChat as TLEncryptedChatWaiting;\r\n                    if (chatWaiting == null) return;\r\n\r\n                    chatWaiting.A = _a;\r\n                    chatWaiting.P = _p;\r\n                    chatWaiting.G = _g;\r\n\r\n                    StateService.With = chatWaiting;\r\n                    StateService.Participant = user;\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        StateService.RemoveBackEntries = true;\r\n                        NavigationService.UriFor<SecretDialogDetailsViewModel>().Navigate();\r\n                    });\r\n\r\n                    CacheService.SyncEncryptedChat(chatWaiting, result => EventAggregator.Publish(result));\r\n\r\n                    var message = new TLDecryptedMessageService17\r\n                    {\r\n                        RandomId = TLLong.Random(),\r\n                        //RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n                        ChatId = chatWaiting.Id,\r\n                        Action = new TLDecryptedMessageActionEmpty(),\r\n                        FromId = new TLInt(StateService.CurrentUserId),\r\n                        Date = chatWaiting.Date,\r\n                        Out = new TLBool(false),\r\n                        Unread = new TLBool(false),\r\n                        Status = MessageStatus.Read\r\n                    };\r\n\r\n                    CacheService.SyncDecryptedMessage(message, chatWaiting, result => { });\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.requestEncryption error \" + error);\r\n                });\r\n        }\r\n\r\n        private void CalculateSecretChatParamsAsync()\r\n        {\r\n            MTProtoService.GetDHConfigAsync(new TLInt(0), new TLInt(0),\r\n                result =>\r\n                {\r\n                    var dhConfig = (TLDHConfig)result;\r\n                    if (!TLUtils.CheckPrime(dhConfig.P.Data, dhConfig.G.Value))\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    var aBytes = new byte[256];\r\n                    var random = new SecureRandom();\r\n                    random.NextBytes(aBytes);\r\n                    _a = TLString.FromBigEndianData(aBytes);\r\n                    _p = dhConfig.P;\r\n                    _g = dhConfig.G;\r\n#if DEBUG\r\n                    //Thread.Sleep(15000);\r\n#endif\r\n                    var gaBytes = Telegram.Api.Services.MTProtoService.GetGB(aBytes, dhConfig.G, dhConfig.P);\r\n                    _ga = TLString.FromBigEndianData(gaBytes);\r\n                    if (_invokeDelayedUserAction)\r\n                    {\r\n                        _invokeDelayedUserAction = false;\r\n                        CreateSecretChat();\r\n                    }\r\n\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.getDhConfig error: \" + error);\r\n                });\r\n        }\r\n#endregion\r\n\r\n        public void Handle(TLUpdateUserBlocked update)\r\n        {\r\n            RaiseBlockedStatusChanged(new BlockedEventArgs { Blocked = update.Blocked.Value });\r\n        }\r\n\r\n        public void Handle(TLUpdateNotifySettings updateNotifySettings)\r\n        {\r\n            var notifyPeer = updateNotifySettings.Peer as TLNotifyPeer;\r\n            if (notifyPeer != null)\r\n            {\r\n                var peer = notifyPeer.Peer;\r\n                if (peer is TLPeerChat\r\n                    && peer.Id.Value == CurrentContact.Index)\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        CurrentContact.NotifySettings = updateNotifySettings.NotifySettings;\r\n                        var notifySettings = updateNotifySettings.NotifySettings as TLPeerNotifySettings;\r\n                        if (notifySettings != null)\r\n                        {\r\n                            _suppressUpdating = true;\r\n                            MuteUntil = notifySettings.MuteUntil.Value;\r\n                            _suppressUpdating = false;\r\n                        }\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public void CopyLink()\r\n        {\r\n            if (string.IsNullOrEmpty(Link)) return;\r\n\r\n            Clipboard.SetText(\"https://\" + Link);\r\n        }\r\n\r\n        public void CopyPhone()\r\n        {\r\n            if (string.IsNullOrEmpty(Phone)) return;\r\n\r\n            Clipboard.SetText(\"+\" + Phone);\r\n        }\r\n\r\n        public void CopyBio()\r\n        {\r\n            if (!HasBio) return;\r\n\r\n            Clipboard.SetText(BioSubtitle);\r\n        }\r\n\r\n        public void CopyBotInfo()\r\n        {\r\n            if (string.IsNullOrEmpty(Subtitle3)) return;\r\n\r\n            Clipboard.SetText(Subtitle3);\r\n        }\r\n\r\n        public void StartVoiceCall()\r\n        {\r\n            ShellViewModel.StartVoiceCall(CurrentItem as TLUser, _voipService, IoC.Get<ICacheService>());\r\n        }\r\n    }\r\n\r\n    public class BlockedEventArgs : System.EventArgs\r\n    {\r\n        public bool Blocked { get; set; }\r\n    }\r\n\r\n    public class ImportEventArgs : System.EventArgs\r\n    {\r\n        public bool Imported { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Contacts/ContactInfoViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq.Expressions;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Contacts\r\n{\r\n    public class ContactInfoViewModel : TelegramPropertyChangedBase\r\n    {\r\n        protected bool SetField<T>(ref T field, T value, string propertyName)\r\n        {\r\n            if (EqualityComparer<T>.Default.Equals(field, value)) return false;\r\n            field = value;\r\n            NotifyOfPropertyChange(propertyName);\r\n            return true;\r\n        }\r\n\r\n        protected bool SetField<T>(ref T field, T value, Expression<Func<T>> selectorExpression)\r\n        {\r\n            if (EqualityComparer<T>.Default.Equals(field, value)) return false;\r\n            field = value;\r\n            NotifyOfPropertyChange(selectorExpression);\r\n            return true;\r\n        }\r\n        \r\n        private bool _isWorking;\r\n\r\n        public bool IsWorking\r\n        {\r\n            get { return _isWorking; }\r\n            set { SetField(ref _isWorking, value, () => IsWorking); }\r\n        }\r\n\r\n        public TLUserBase CurrentItem { get; protected set; }\r\n\r\n        public TLString ContactPhone { get; protected set; }\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        public IStateService StateService\r\n        {\r\n            get { return _stateService; }\r\n        }\r\n\r\n        private readonly INavigationService _navigationService;\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator; \r\n\r\n        private TimerSpan _selectedSpan;\r\n\r\n        public TimerSpan SelectedSpan\r\n        {\r\n            get { return _selectedSpan; }\r\n            set\r\n            {\r\n                _selectedSpan = value;\r\n\r\n                if (_selectedSpan != null)\r\n                {\r\n                    if (_selectedSpan.Seconds == 0\r\n                        || _selectedSpan.Seconds == int.MaxValue)\r\n                    {\r\n                        MuteUntil = _selectedSpan.Seconds;\r\n                    }\r\n                    else\r\n                    {\r\n                        var now = DateTime.Now;\r\n                        var muteUntil = now.AddSeconds(_selectedSpan.Seconds);\r\n\r\n                        MuteUntil = muteUntil < now ? 0 : TLUtils.DateToUniversalTimeTLInt(_mtProtoService.ClientTicksDelta, muteUntil).Value;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public IList<TimerSpan> Spans { get; protected set; }\r\n\r\n        private int _muteUntil;\r\n\r\n        public int MuteUntil\r\n        {\r\n            get { return _muteUntil; }\r\n            set { SetField(ref _muteUntil, value, () => MuteUntil); }\r\n        }\r\n\r\n        private string _selectedSound;\r\n\r\n        public string SelectedSound\r\n        {\r\n            get { return _selectedSound; }\r\n            set { SetField(ref _selectedSound, value, () => SelectedSound); }\r\n        }\r\n\r\n        public List<string> Sounds { get; protected set; }\r\n\r\n        private string _subtitle;\r\n\r\n        public string Subtitle\r\n        {\r\n            get { return _subtitle; }\r\n            set { SetField(ref _subtitle, value, () => Subtitle); }\r\n        }\r\n\r\n        public ContactInfoViewModel(IMTProtoService mtProtoService, ICacheService cacheService, IStateService stateService, ITelegramEventAggregator eventAggregator, INavigationService navigationService)\r\n        {\r\n            Spans = new List<TimerSpan>\r\n            {\r\n                new TimerSpan(AppResources.Enabled, string.Empty, 0, AppResources.Enabled),\r\n                new TimerSpan(AppResources.HourNominativeSingular,  \"1\", (int)TimeSpan.FromHours(1.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"1\", AppResources.HourNominativeSingular).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.HourGenitivePlural, \"8\", (int)TimeSpan.FromHours(8.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"8\", AppResources.HourGenitivePlural).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.DayNominativePlural, \"2\", (int)TimeSpan.FromDays(2.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"2\", AppResources.DayNominativePlural).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.Disabled, string.Empty, int.MaxValue, AppResources.Disabled),\r\n            };\r\n            _selectedSpan = Spans[0];\r\n\r\n\r\n            if (stateService.CurrentContact == null)\r\n            {\r\n                ShellViewModel.Navigate(navigationService);\r\n                return;\r\n            }\r\n\r\n            CurrentItem = stateService.CurrentContact;\r\n            stateService.CurrentContact = null;\r\n\r\n            ContactPhone = stateService.CurrentContactPhone;\r\n            stateService.CurrentContactPhone = null;\r\n\r\n            _cacheService = cacheService;\r\n            _eventAggregator = eventAggregator;\r\n            _mtProtoService = mtProtoService;\r\n            _stateService = stateService;\r\n            _navigationService = navigationService;\r\n        }\r\n\r\n        #region Secret chats\r\n\r\n        public Visibility ProgressVisibility { get { return IsWorking ? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        private TLString _a;\r\n        private TLInt _g;\r\n        private TLString _p;\r\n        private TLString _ga;\r\n        private volatile bool _invokeDelayedUserAction;\r\n\r\n        public void CreateSecretChat()\r\n        {\r\n            var user = CurrentItem as TLUserBase;\r\n            if (user == null) return;\r\n\r\n            if (_a == null\r\n                || _g == null\r\n                || _p == null\r\n                || _ga == null)\r\n            {\r\n                IsWorking = true;\r\n                NotifyOfPropertyChange(() => ProgressVisibility);\r\n                _invokeDelayedUserAction = true;\r\n                return;\r\n            }\r\n\r\n            IsWorking = false;\r\n            NotifyOfPropertyChange(() => ProgressVisibility);\r\n\r\n            var random = new Random();\r\n            var randomId = random.Next();\r\n\r\n            _mtProtoService.RequestEncryptionAsync(user.ToInputUser(), new TLInt(randomId), _ga,\r\n                encryptedChat =>\r\n                {\r\n                    var chatWaiting = encryptedChat as TLEncryptedChatWaiting;\r\n                    if (chatWaiting == null) return;\r\n\r\n                    chatWaiting.A = _a;\r\n                    chatWaiting.P = _p;\r\n                    chatWaiting.G = _g;\r\n\r\n                    StateService.With = chatWaiting;\r\n                    StateService.Participant = user;\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        StateService.RemoveBackEntries = true;\r\n                        _navigationService.UriFor<SecretDialogDetailsViewModel>().Navigate();\r\n                    });\r\n\r\n                    _cacheService.SyncEncryptedChat(chatWaiting, result => _eventAggregator.Publish(result));\r\n\r\n                    var message = new TLDecryptedMessageService17\r\n                    {\r\n                        RandomId = TLLong.Random(),\r\n                        //RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n                        ChatId = chatWaiting.Id,\r\n                        Action = new TLDecryptedMessageActionEmpty(),\r\n                        FromId = new TLInt(StateService.CurrentUserId),\r\n                        Date = chatWaiting.Date,\r\n                        Out = new TLBool(false),\r\n                        Unread = new TLBool(false),\r\n                        Status = MessageStatus.Read\r\n                    };\r\n\r\n                    _cacheService.SyncDecryptedMessage(message, chatWaiting, result => { });\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.requestEncryption error: \" + error);\r\n                });\r\n        }\r\n\r\n        private void CalculateSecretChatParamsAsync()\r\n        {\r\n            _mtProtoService.GetDHConfigAsync(new TLInt(0), new TLInt(0),\r\n                result =>\r\n                {\r\n                    var dhConfig = (TLDHConfig)result;\r\n                    if (!TLUtils.CheckPrime(dhConfig.P.Data, dhConfig.G.Value))\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    var aBytes = new byte[256];\r\n                    var random = new SecureRandom();\r\n                    random.NextBytes(aBytes);\r\n                    _a = TLString.FromBigEndianData(aBytes);\r\n                    _p = dhConfig.P;\r\n                    _g = dhConfig.G;\r\n#if DEBUG\r\n                    //Thread.Sleep(15000);\r\n#endif\r\n                    var gaBytes = MTProtoService.GetGB(aBytes, dhConfig.G, dhConfig.P);\r\n                    _ga = TLString.FromBigEndianData(gaBytes);\r\n                    if (_invokeDelayedUserAction)\r\n                    {\r\n                        _invokeDelayedUserAction = false;\r\n                        CreateSecretChat();\r\n                    }\r\n\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.getDhConfig error: \" + error);\r\n                });\r\n        }\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Contacts/ContactViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Contacts\r\n{\r\n    public class ContactViewModel : ItemDetailsViewModelBase,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserBlocked>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateNotifySettings>\r\n    {\r\n        public string Link\r\n        {\r\n            get\r\n            {\r\n                var userName = CurrentItem as IUserName;\r\n                if (userName != null && !TLString.IsNullOrEmpty(userName.UserName))\r\n                {\r\n                    return \"t.me/\" + userName.UserName;\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public string GroupsInCommonSubtitle\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentItem as TLUser45;\r\n                if (user != null && user.CommonChatsCount != null && user.CommonChatsCount.Value > 0)\r\n                {\r\n                    return Utils.Language.Declension(\r\n                    user.CommonChatsCount.Value,\r\n                    AppResources.GroupNominativeSingular,\r\n                    AppResources.GroupNominativePlural,\r\n                    AppResources.GroupGenitiveSingular,\r\n                    AppResources.GroupGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public Visibility GroupsInCommonVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentItem as TLUser45;\r\n                if (user != null && user.CommonChatsCount != null && user.CommonChatsCount.Value > 0)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public Visibility AddToGroupVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentItem as TLUser;\r\n                if (user != null && user.IsBot && !user.IsBotGroupsBlocked)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public Visibility NotificationsVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentContact as TLUser;\r\n                if (user != null)\r\n                {\r\n                    if (user.IsSelf)\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n                }\r\n\r\n                return Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        public Visibility SecretChatVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentContact as TLUser;\r\n                if (user != null)\r\n                {\r\n                    if (user.IsSelf || user.IsBot)\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n                }\r\n\r\n                return Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        public Visibility VoiceCallVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentContact as TLUser;\r\n                if (user != null && !user.IsSelf && !user.IsBot)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        private TimerSpan _selectedSpan;\r\n\r\n        public TimerSpan SelectedSpan\r\n        {\r\n            get { return _selectedSpan; }\r\n            set\r\n            {\r\n                _selectedSpan = value;\r\n\r\n                if (_selectedSpan != null)\r\n                {\r\n                    if (_selectedSpan.Seconds == 0\r\n                        || _selectedSpan.Seconds == int.MaxValue)\r\n                    {\r\n                        MuteUntil = _selectedSpan.Seconds;\r\n                    }\r\n                    else\r\n                    {\r\n                        var now = DateTime.Now;\r\n                        var muteUntil = now.AddSeconds(_selectedSpan.Seconds);\r\n\r\n                        MuteUntil = muteUntil < now ? 0 : TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, muteUntil).Value;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public IList<TimerSpan> Spans { get; protected set; }\r\n\r\n        public TLUserBase CurrentContact { get { return CurrentItem as TLUserBase; } }\r\n\r\n        public bool IsBot\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentContact as TLUser;\r\n                return user != null && user.IsBot;\r\n            }\r\n        }\r\n\r\n        public TLString CurrentPhone { get; set; }\r\n\r\n        public string Phone\r\n        {\r\n            get\r\n            {\r\n                if (CurrentContact != null && CurrentContact.HasPhone) return CurrentContact.Phone.ToString();\r\n\r\n                if (CurrentPhone != null) return CurrentPhone.ToString();\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public bool HasPhone { get { return CurrentContact != null && CurrentContact.HasPhone || CurrentPhone != null; } }\r\n\r\n        public bool HasBio\r\n        {\r\n            get\r\n            {\r\n                var user45 = CurrentContact as TLUser45;\r\n\r\n                return user45 != null && !user45.IsBot && !TLString.IsNullOrEmpty(user45.About);\r\n            }\r\n        }\r\n\r\n        public string BioSubtitle\r\n        {\r\n            get\r\n            {\r\n                var user45 = CurrentContact as TLUser45;\r\n\r\n                return user45 != null && !user45.IsBot && !TLString.IsNullOrEmpty(user45.About) ? user45.About.ToString() : string.Empty;\r\n            }\r\n        }\r\n\r\n\r\n        public int PreviousUserId { get; set; }\r\n\r\n        private bool _suppressUpdating = true;\r\n\r\n        private int _muteUntil;\r\n\r\n        public int MuteUntil\r\n        {\r\n            get { return _muteUntil; }\r\n            set { SetField(ref _muteUntil, value, () => MuteUntil); }\r\n        }\r\n\r\n        private string _selectedSound;\r\n\r\n        public string SelectedSound\r\n        {\r\n            get { return _selectedSound; }\r\n            set\r\n            {\r\n                SetField(ref _selectedSound, value, () => SelectedSound);\r\n            }\r\n        }\r\n\r\n        public void SetSelectedSound(string sound)\r\n        {\r\n            _selectedSound = sound;\r\n        }\r\n\r\n        public List<string> Sounds { get; protected set; }\r\n\r\n        private string _subtitle;\r\n\r\n        public string Subtitle\r\n        {\r\n            get { return _subtitle; }\r\n            set { SetField(ref _subtitle, value, () => Subtitle); }\r\n        }\r\n\r\n        private string _subtitle3;\r\n\r\n        public string Subtitle3\r\n        {\r\n            get { return _subtitle3; }\r\n            set { SetField(ref _subtitle3, value, () => Subtitle3); }\r\n        }\r\n\r\n        public bool IsReportButtonEnabled\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentItem as TLUser;\r\n                return user != null && user.IsBot;\r\n            }\r\n        }\r\n\r\n        private readonly IFileManager _fileManager;\r\n\r\n        private readonly IVoIPService _voipService;\r\n\r\n        public ProfilePhotoViewerViewModel ProfilePhotoViewer { get; set; }\r\n\r\n        public bool IsViewerOpen\r\n        {\r\n            get { return ProfilePhotoViewer != null && ProfilePhotoViewer.IsOpen; }\r\n        }\r\n\r\n        public TLString ContactPhone { get; protected set; }\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        private readonly INavigationService _navigationService;\r\n\r\n        public ContactViewModel(\r\n            IVoIPService voipService, IFileManager fileManager, ICacheService cacheService, ICommonErrorHandler errorHandler,\r\n            IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            //tombstoning\r\n            if (stateService.CurrentContact == null)\r\n            {\r\n                ShellViewModel.Navigate(navigationService);\r\n                return;\r\n            }\r\n\r\n            CurrentItem = stateService.CurrentContact;\r\n            stateService.CurrentContact = null;\r\n\r\n            ContactPhone = stateService.CurrentContactPhone;\r\n            stateService.CurrentContactPhone = null;\r\n\r\n            _stateService = stateService;\r\n            _navigationService = navigationService;\r\n\r\n            _voipService = voipService;\r\n            Spans = new List<TimerSpan>\r\n            {\r\n                new TimerSpan(AppResources.Enabled, string.Empty, 0, AppResources.Enabled),\r\n                new TimerSpan(AppResources.HourNominativeSingular,  \"1\", (int)TimeSpan.FromHours(1.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"1\", AppResources.HourNominativeSingular).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.HourGenitivePlural, \"8\", (int)TimeSpan.FromHours(8.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"8\", AppResources.HourGenitivePlural).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.DayNominativePlural, \"2\", (int)TimeSpan.FromDays(2.0).TotalSeconds, string.Format(AppResources.MuteFor, string.Format(\"{0} {1}\", \"2\", AppResources.DayNominativePlural).ToLowerInvariant())),\r\n                new TimerSpan(AppResources.Disabled, string.Empty, int.MaxValue, AppResources.Disabled),\r\n            };\r\n            _selectedSpan = Spans[0];\r\n\r\n            _notificationTimer = new DispatcherTimer();\r\n            _notificationTimer.Interval = TimeSpan.FromSeconds(Constants.NotificationTimerInterval);\r\n            _notificationTimer.Tick += OnNotificationTimerTick;\r\n\r\n            _fileManager = fileManager;\r\n\r\n            EventAggregator.Subscribe(this);\r\n            DisplayName = LowercaseConverter.Convert(AppResources.Profile);\r\n\r\n            Sounds = new List<string>();\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => MuteUntil)\r\n                    && !_suppressUpdating)\r\n                {\r\n                    UpdateNotifySettingsAsync();\r\n                }\r\n\r\n                if (Property.NameEquals(args.PropertyName, () => SelectedSound)\r\n                    && !_suppressUpdating)\r\n                {\r\n                    NotificationsViewModel.PlaySound(SelectedSound);\r\n\r\n                    UpdateNotifySettingsAsync();\r\n                }\r\n            };\r\n\r\n            CalculateSecretChatParamsAsync();\r\n        }\r\n\r\n        private void UpdateNotifySettingsAsync()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var notifySettings = new TLInputPeerNotifySettings78\r\n            {\r\n                Flags = new TLInt(0),\r\n                MuteUntil = new TLInt(MuteUntil),\r\n                ShowPreviews = TLBool.True,\r\n                Sound = string.IsNullOrEmpty(SelectedSound) ? new TLString(\"default\") : new TLString(SelectedSound)\r\n            };\r\n\r\n            IsWorking = true;\r\n            MTProtoService.UpdateNotifySettingsAsync(\r\n                CurrentContact.ToInputNotifyPeer(), notifySettings,\r\n                result =>\r\n                {\r\n                    IsWorking = false;\r\n                    CurrentContact.NotifySettings = new TLPeerNotifySettings78\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        MuteUntil = new TLInt(MuteUntil),\r\n                        ShowPreviews = notifySettings.ShowPreviews,\r\n                        Sound = notifySettings.Sound\r\n                    };\r\n\r\n                    var dialog = CacheService.GetDialog(new TLPeerUser { Id = CurrentContact.Id });\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog.NotifySettings = CurrentContact.NotifySettings;\r\n                        dialog.NotifyOfPropertyChange(() => dialog.NotifySettings);\r\n                        dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                        var settings = dialog.With as INotifySettings;\r\n                        if (settings != null)\r\n                        {\r\n                            settings.NotifySettings = CurrentContact.NotifySettings;\r\n                        }\r\n                    }\r\n\r\n                    CacheService.Commit();\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"account.updateNotifySettings error: \" + error);\r\n                });\r\n        }\r\n\r\n        private string GetChatSubtitle3()\r\n        {\r\n            var user = CurrentItem as TLUser;\r\n            if (user != null && user.IsBot)\r\n            {\r\n                var botInfo = user.BotInfo as TLBotInfo;\r\n                if (botInfo != null\r\n                    && !TLString.IsNullOrEmpty(botInfo.Description))\r\n                {\r\n                    return botInfo.Description.ToString();\r\n                }\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public void UpdateSubtitles()\r\n        {\r\n            Subtitle3 = GetChatSubtitle3();\r\n        }\r\n\r\n        public event EventHandler<BlockedEventArgs> BlockedStatusChanged;\r\n\r\n        protected virtual void RaiseBlockedStatusChanged(BlockedEventArgs e)\r\n        {\r\n            var handler = BlockedStatusChanged;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public event EventHandler<ImportEventArgs> ImportStatusChanged;\r\n\r\n        protected virtual void RaiseImportStatusChanged(ImportEventArgs e)\r\n        {\r\n            var handler = ImportStatusChanged;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public void UpdateNotificationSettings()\r\n        {\r\n            if (CurrentContact != null && CurrentContact.NotifySettings != null)\r\n            {\r\n                _suppressUpdating = true;\r\n\r\n                var notifySettings = CurrentContact.NotifySettings as TLPeerNotifySettings;\r\n                if (notifySettings != null)\r\n                {\r\n                    MuteUntil = notifySettings.MuteUntil != null ? notifySettings.MuteUntil.Value : (StateService.GetNotifySettings().ContactAlert ? 0 : int.MaxValue);\r\n                    var sound = notifySettings.Sound == null ? null : StateService.Sounds.FirstOrDefault(x => string.Equals(x, notifySettings.Sound.Value, StringComparison.OrdinalIgnoreCase));\r\n                    SelectedSound = sound ?? StateService.Sounds[0];\r\n\r\n                    _suppressUpdating = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        #region Notification timer\r\n        private readonly DispatcherTimer _notificationTimer;\r\n\r\n        public void StartTimer()\r\n        {\r\n            _notificationTimer.Start();\r\n        }\r\n\r\n        public void StopTimer()\r\n        {\r\n            _notificationTimer.Stop();\r\n        }\r\n\r\n        private void OnNotificationTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            if (MuteUntil > 0 && MuteUntil < int.MaxValue)\r\n            {\r\n                NotifyOfPropertyChange(() => MuteUntil);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region Actions\r\n\r\n        public void SelectSpan(TimerSpan selectedSpan)\r\n        {\r\n            SelectedSpan = selectedSpan;\r\n        }\r\n\r\n        public void SelectNotificationSpan()\r\n        {\r\n            //StateService.SelectedTimerSpan = SelectedSpan;\r\n            NavigationService.UriFor<ChooseNotificationSpanViewModel>().Navigate();\r\n        }\r\n\r\n        public void AddToGroup()\r\n        {\r\n            var user = CurrentContact as TLUser;\r\n            if (user != null && user.IsBot && !user.IsBotGroupsBlocked)\r\n            {\r\n                StateService.Bot = CurrentContact;\r\n                NavigationService.UriFor<ChooseDialogViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void BlockContact()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var confirmation = IsBot\r\n                ? MessageBoxResult.OK\r\n                : MessageBox.Show(AppResources.BlockContactConfirmation, AppResources.AppName, MessageBoxButton.OKCancel);\r\n\r\n            if (confirmation == MessageBoxResult.OK)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.BlockAsync(CurrentContact.ToInputUser(),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        CurrentContact.Blocked = TLBool.True;\r\n                        CacheService.Commit();\r\n                        EventAggregator.Publish(new TLUpdateUserBlocked { UserId = CurrentContact.Id, Blocked = TLBool.True });\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"contacts.block error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public void UnblockContact()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var confirmation = IsBot\r\n                ? MessageBoxResult.OK\r\n                : MessageBox.Show(AppResources.UnblockContactConfirmation, AppResources.AppName, MessageBoxButton.OKCancel);\r\n\r\n            if (confirmation == MessageBoxResult.OK)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.UnblockAsync(CurrentContact.ToInputUser(),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        CurrentContact.Blocked = TLBool.False;\r\n                        CacheService.Commit();\r\n                        EventAggregator.Publish(new TLUpdateUserBlocked { UserId = CurrentContact.Id, Blocked = TLBool.False });\r\n\r\n                        if (IsBot)\r\n                        {\r\n                            NavigationService.GoBack();\r\n                        }\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"contacts.unblock error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public void AddContact()\r\n        {\r\n            if (CurrentContact == null) return;\r\n            if (!HasPhone) return;\r\n\r\n            var userPhone = new TLString(Phone);\r\n            if (TLString.IsNullOrEmpty(userPhone)) return;\r\n\r\n            IsWorking = true;\r\n            ImportContactAsync(CurrentContact, userPhone, MTProtoService,\r\n                result =>\r\n                {\r\n                    if (result.Users.Count > 0)\r\n                    {\r\n                        EventAggregator.Publish(new TLUpdateContactLink24 { UserId = result.Users[0].Id, MyLink = new TLContactLink(), ForeignLink = new TLContactLinkUnknown() });\r\n\r\n                        var userBase = result.Users[0];\r\n                        if (userBase != null && userBase.IsContact)\r\n                        {\r\n                            ContactsHelper.CreateContactAsync(_fileManager, StateService, userBase);\r\n                        }\r\n\r\n                        RaiseImportStatusChanged(new ImportEventArgs { Imported = true });\r\n                    }\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        NotifyOfPropertyChange(() => HasPhone);\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"contacts.importContacts error \" + error);\r\n                }));\r\n        }\r\n\r\n        public static void ImportContactAsync(TLUserBase contact, TLString phone, IMTProtoService mtProtoService, Action<TLImportedContacts> callback, Action<TLRPCError> faultCallback)\r\n        {\r\n            var importedContacts = new TLVector<TLInputContactBase>\r\n            {\r\n                new TLInputContact\r\n                {\r\n                    Phone = phone,\r\n                    FirstName = contact.FirstName,\r\n                    LastName = contact.LastName,\r\n                    ClientId = new TLLong(contact.Id.Value)\r\n                }\r\n            };\r\n\r\n            mtProtoService.ImportContactsAsync(\r\n                importedContacts,\r\n                callback.SafeInvoke,\r\n                error =>\r\n                {\r\n                    faultCallback.SafeInvoke(error);\r\n                    Execute.ShowDebugMessage(\"contacts.importContacts error: \" + error);\r\n                });\r\n        }\r\n\r\n        public void DeleteContact()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var messageBoxResult = MessageBox.Show(AppResources.ConfirmDeleteContact, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (messageBoxResult != MessageBoxResult.OK)\r\n            {\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.DeleteContactAsync(\r\n                CurrentContact.ToInputUser(),\r\n                result =>\r\n                {\r\n                    var link24 = result as TLLink24;\r\n                    if (link24 != null)\r\n                    {\r\n                        EventAggregator.Publish(new TLUpdateContactLink24 { UserId = link24.User.Id, MyLink = link24.MyLink, ForeignLink = link24.ForeignLink });\r\n                    }\r\n\r\n                    RaiseImportStatusChanged(new ImportEventArgs { Imported = false });\r\n\r\n                    ContactsHelper.DeleteContactAsync(StateService, CurrentContact.Id);\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        NotifyOfPropertyChange(() => HasPhone);\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"contacts.deleteContact error: \" + error);\r\n                }));\r\n        }\r\n\r\n        public void SendMessage()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            StateService.FocusOnInputMessage = true;\r\n            if (PreviousUserId != 0 && PreviousUserId == CurrentContact.Index)\r\n            {\r\n                NavigationService.GoBack();\r\n            }\r\n            else\r\n            {\r\n                StateService.RemoveBackEntries = true;\r\n                StateService.With = CurrentContact;\r\n                NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void OpenPhoto()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var photo = CurrentContact.Photo as TLUserProfilePhoto;\r\n            if (photo != null)\r\n            {\r\n                StateService.CurrentPhoto = photo;\r\n                StateService.CurrentContact = CurrentContact;\r\n\r\n                if (ProfilePhotoViewer == null)\r\n                {\r\n                    ProfilePhotoViewer = new ProfilePhotoViewerViewModel(StateService, MTProtoService);\r\n                    NotifyOfPropertyChange(() => ProfilePhotoViewer);\r\n                }\r\n\r\n                BeginOnUIThread(() => ProfilePhotoViewer.OpenViewer());\r\n            }\r\n        }\r\n\r\n        public void OpenMedia()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            StateService.CurrentInputPeer = CurrentContact;\r\n            NavigationService.UriFor<FullMediaViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenGroupsInCommon()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            StateService.CurrentContact = CurrentContact;\r\n            NavigationService.UriFor<GroupsInCommonViewModel>().Navigate();\r\n        }\r\n\r\n        public void Report()\r\n        {\r\n            var userBase = CurrentItem as TLUserBase;\r\n            if (userBase == null) return;\r\n\r\n            Report(userBase.ToInputPeer());\r\n        }\r\n\r\n        public void Call()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            var phone = CurrentContact.Phone ?? CurrentPhone;\r\n            if (phone == null) return;\r\n\r\n            var task = new PhoneCallTask\r\n            {\r\n                DisplayName = CurrentContact.FullName,\r\n                PhoneNumber = \"+\" + phone\r\n            };\r\n            task.Show();\r\n        }\r\n        #endregion\r\n\r\n        #region Secret chats\r\n\r\n        public Visibility ProgressVisibility { get { return IsWorking ? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        private TLString _a;\r\n        private TLInt _g;\r\n        private TLString _p;\r\n        private TLString _ga;\r\n        private volatile bool _invokeDelayedUserAction;\r\n\r\n        public void CreateSecretChat()\r\n        {\r\n            var user = CurrentItem as TLUserBase;\r\n            if (user == null) return;\r\n\r\n            if (_a == null\r\n                || _g == null\r\n                || _p == null\r\n                || _ga == null)\r\n            {\r\n                IsWorking = true;\r\n                NotifyOfPropertyChange(() => ProgressVisibility);\r\n                _invokeDelayedUserAction = true;\r\n                return;\r\n            }\r\n\r\n            IsWorking = false;\r\n            NotifyOfPropertyChange(() => ProgressVisibility);\r\n\r\n            var random = new Random();\r\n            var randomId = random.Next();\r\n\r\n            MTProtoService.RequestEncryptionAsync(user.ToInputUser(), new TLInt(randomId), _ga,\r\n                encryptedChat =>\r\n                {\r\n                    var chatWaiting = encryptedChat as TLEncryptedChatWaiting;\r\n                    if (chatWaiting == null) return;\r\n\r\n                    chatWaiting.A = _a;\r\n                    chatWaiting.P = _p;\r\n                    chatWaiting.G = _g;\r\n\r\n                    StateService.With = chatWaiting;\r\n                    StateService.Participant = user;\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        StateService.RemoveBackEntries = true;\r\n                        NavigationService.UriFor<SecretDialogDetailsViewModel>().Navigate();\r\n                    });\r\n\r\n                    CacheService.SyncEncryptedChat(chatWaiting, result => EventAggregator.Publish(result));\r\n\r\n                    var message = new TLDecryptedMessageService17\r\n                    {\r\n                        RandomId = TLLong.Random(),\r\n                        //RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n                        ChatId = chatWaiting.Id,\r\n                        Action = new TLDecryptedMessageActionEmpty(),\r\n                        FromId = new TLInt(StateService.CurrentUserId),\r\n                        Date = chatWaiting.Date,\r\n                        Out = new TLBool(false),\r\n                        Unread = new TLBool(false),\r\n                        Status = MessageStatus.Read\r\n                    };\r\n\r\n                    CacheService.SyncDecryptedMessage(message, chatWaiting, result => { });\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.requestEncryption error \" + error);\r\n                });\r\n        }\r\n\r\n        private void CalculateSecretChatParamsAsync()\r\n        {\r\n            MTProtoService.GetDHConfigAsync(new TLInt(0), new TLInt(0),\r\n                result =>\r\n                {\r\n                    var dhConfig = (TLDHConfig)result;\r\n                    if (!TLUtils.CheckPrime(dhConfig.P.Data, dhConfig.G.Value))\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    var aBytes = new byte[256];\r\n                    var random = new SecureRandom();\r\n                    random.NextBytes(aBytes);\r\n                    _a = TLString.FromBigEndianData(aBytes);\r\n                    _p = dhConfig.P;\r\n                    _g = dhConfig.G;\r\n\r\n                    var gaBytes = Telegram.Api.Services.MTProtoService.GetGB(aBytes, dhConfig.G, dhConfig.P);\r\n                    _ga = TLString.FromBigEndianData(gaBytes);\r\n                    if (_invokeDelayedUserAction)\r\n                    {\r\n                        _invokeDelayedUserAction = false;\r\n                        CreateSecretChat();\r\n                    }\r\n\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.getDhConfig error: \" + error);\r\n                });\r\n        }\r\n        #endregion\r\n\r\n        public void Handle(TLUpdateUserBlocked update)\r\n        {\r\n            RaiseBlockedStatusChanged(new BlockedEventArgs { Blocked = update.Blocked.Value });\r\n        }\r\n\r\n        public void Handle(TLUpdateNotifySettings updateNotifySettings)\r\n        {\r\n            var notifyPeer = updateNotifySettings.Peer as TLNotifyPeer;\r\n            if (notifyPeer != null)\r\n            {\r\n                var peer = notifyPeer.Peer;\r\n                if (peer is TLPeerChat\r\n                    && peer.Id.Value == CurrentContact.Index)\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        CurrentContact.NotifySettings = updateNotifySettings.NotifySettings;\r\n                        var notifySettings = updateNotifySettings.NotifySettings as TLPeerNotifySettings;\r\n                        if (notifySettings != null)\r\n                        {\r\n                            _suppressUpdating = true;\r\n                            MuteUntil = notifySettings.MuteUntil != null ? notifySettings.MuteUntil.Value : (StateService.GetNotifySettings().ContactAlert ? 0 : int.MaxValue);\r\n                            _suppressUpdating = false;\r\n                        }\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public void CopyLink()\r\n        {\r\n            if (string.IsNullOrEmpty(Link)) return;\r\n\r\n            Clipboard.SetText(\"https://\" + Link);\r\n        }\r\n\r\n        public void CopyPhone()\r\n        {\r\n            if (string.IsNullOrEmpty(Phone)) return;\r\n\r\n            Clipboard.SetText(\"+\" + Phone);\r\n        }\r\n\r\n        public void CopyBio()\r\n        {\r\n            if (!HasBio) return;\r\n\r\n            Clipboard.SetText(BioSubtitle);\r\n        }\r\n\r\n        public void CopyBotInfo()\r\n        {\r\n            if (string.IsNullOrEmpty(Subtitle3)) return;\r\n\r\n            Clipboard.SetText(Subtitle3);\r\n        }\r\n\r\n        public void StartVoiceCall()\r\n        {\r\n            ShellViewModel.StartVoiceCall(CurrentItem as TLUser, _voipService, IoC.Get<ICacheService>());\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            if (CurrentContact == null) return;\r\n\r\n            UpdateNotificationSettings();\r\n            UpdateSubtitles();\r\n\r\n            NotifyOfPropertyChange(() => CurrentContact);\r\n\r\n            if (CurrentContact == null) return;\r\n\r\n            Subtitle = DialogDetailsViewModel.GetUserStatus(CurrentContact);\r\n\r\n            Execute.BeginOnThreadPool(TimeSpan.FromSeconds(0.5), () =>\r\n            {\r\n                UpdateNotificationSettings();\r\n\r\n                IsWorking = true;\r\n                MTProtoService.GetFullUserAsync(\r\n                    CurrentContact.ToInputUser(),\r\n                    userFull =>\r\n                    {\r\n                        IsWorking = false;\r\n                        UpdateNotificationSettings();\r\n                        Subtitle = DialogDetailsViewModel.GetUserStatus(CurrentContact);\r\n\r\n                        RaiseBlockedStatusChanged(new BlockedEventArgs { Blocked = userFull.Blocked.Value });\r\n                    },\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"users.getFullUser error: \" + error);\r\n                    });\r\n            });\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (_stateService.SelectedTimerSpan != null)\r\n            {\r\n                SelectedSpan = _stateService.SelectedTimerSpan;\r\n                _stateService.SelectedTimerSpan = null;\r\n            }\r\n\r\n            StartTimer();\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            StopTimer();\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        public void Edit()\r\n        {\r\n            _stateService.CurrentContact = CurrentContact;\r\n            _navigationService.UriFor<EditContactViewModel>().Navigate();\r\n        }\r\n\r\n        public void Share()\r\n        {\r\n            _stateService.SharedContact = CurrentContact;\r\n            _navigationService.UriFor<ChooseDialogViewModel>().Navigate();\r\n        }\r\n\r\n        public void OnBackKeyPressed()\r\n        {\r\n            _stateService.SharedContact = null;\r\n        }\r\n    }\r\n\r\n    public class BlockedEventArgs : System.EventArgs\r\n    {\r\n        public bool Blocked { get; set; }\r\n    }\r\n\r\n    public class ImportEventArgs : System.EventArgs\r\n    {\r\n        public bool Imported { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Contacts/ContactsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Windows.ApplicationModel.Contacts;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing TaskResult = Microsoft.Phone.Tasks.TaskResult;\r\n\r\nnamespace TelegramClient.ViewModels.Contacts\r\n{\r\n    public class ContactsViewModel : ItemsViewModelBase<TLUserBase>,\r\n        Telegram.Api.Aggregator.IHandle<string>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateContactLinkBase>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserStatus>,\r\n        Telegram.Api.Aggregator.IHandle<InvokeImportContacts>,\r\n        Telegram.Api.Aggregator.IHandle<InvokeDeleteContacts>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdatePrivacy>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserName>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserPhoto>\r\n    {\r\n        private ObservableCollection<AlphaKeyGroup<TLUserBase>> _contacts;\r\n\r\n        public ObservableCollection<AlphaKeyGroup<TLUserBase>> Contacts\r\n        {\r\n            get { return _contacts; }\r\n            set { SetField(ref _contacts, value, () => Contacts); }\r\n        }\r\n\r\n        public bool FirstRun { get; set; }\r\n\r\n        public TLUserBase Self { get; set; }\r\n\r\n        private IFileManager _downloadFileManager;\r\n\r\n        public IFileManager DownloadFileManager\r\n        {\r\n            get { return _downloadFileManager ?? (_downloadFileManager = IoC.Get<IFileManager>()); }\r\n        }\r\n\r\n        public ContactsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            App.Log(\"start ContactsViewModel.ctor \");\r\n\r\n            Items = new AlphaKeyGroup<TLUserBase>(\"@\");\r\n\r\n            _contacts = new ObservableCollection<AlphaKeyGroup<TLUserBase>> { (AlphaKeyGroup<TLUserBase>)Items };\r\n\r\n            DisplayName = LowercaseConverter.Convert(AppResources.Contacts);\r\n            Status = AppResources.Loading;\r\n\r\n            EventAggregator.Subscribe(this);\r\n\r\n            App.Log(\"end ContactsViewModel.ctor\");\r\n        }\r\n\r\n        private readonly object _savedCountSyncRoot = new object();\r\n\r\n        public void GetContactsAsync(System.Action callback)\r\n        {\r\n            var savedCount = TLUtils.OpenObjectFromMTProtoFile<TLInt>(_savedCountSyncRoot, Constants.SavedCountFileName);\r\n            var hash = TLUtils.GetContactsHash(savedCount, CacheService.GetContacts().Where(x => x.IsContact).OrderBy(x => x.Index).ToList());\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetContactsAsync(new TLInt(hash),\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(result.ToString());\r\n\r\n                    IsWorking = false;\r\n                    var contacts = result as TLContacts71;\r\n                    if (contacts != null)\r\n                    {\r\n                        TLUtils.SaveObjectToMTProtoFile(_savedCountSyncRoot, Constants.SavedCountFileName, contacts.SavedCount);\r\n                        InsertContacts(contacts.Users);\r\n                    }\r\n\r\n                    var contactsNotModified = result as TLContactsNotModified;\r\n                    if (contactsNotModified != null)\r\n                    {\r\n\r\n                    }\r\n\r\n                    callback.SafeInvoke();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"contacts.getContacts error: \" + error);\r\n\r\n                    callback.SafeInvoke();\r\n                }));\r\n        }\r\n\r\n        private bool _runOnce = true;\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            if (!_runOnce)\r\n            {\r\n                UpdateStatusesAsync();\r\n\r\n                return;\r\n            }\r\n            _runOnce = false;\r\n\r\n            LoadCacheAsync();\r\n        }\r\n\r\n        private void LoadCache()\r\n        {\r\n            var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n            if (!isAuthorized)\r\n            {\r\n                return;\r\n            }\r\n\r\n            Status = string.Empty;\r\n\r\n            var contacts = CacheService.GetContacts();\r\n            var orderedContacts = contacts.OrderBy(x => x.FullName).ToList();\r\n            var count = 0;\r\n\r\n\r\n            var currentContact = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n            if (currentContact != null)\r\n            {\r\n                Self = currentContact;\r\n                NotifyOfPropertyChange(() => Self);\r\n            }\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"LoadCache ordered_contacts={0} lazy_items={1}\", orderedContacts.Count, LazyItems.Count);\r\n\r\n            Items.Clear();\r\n            LazyItems.Clear();\r\n            for (var i = 0; i < orderedContacts.Count; i++)\r\n            {\r\n                if (!(orderedContacts[i] is TLUserEmpty)\r\n                    && orderedContacts[i].Index != StateService.CurrentUserId)\r\n                {\r\n                    if (count < 10)\r\n                    {\r\n                        Items.Add(orderedContacts[i]);\r\n                    }\r\n                    else\r\n                    {\r\n                        LazyItems.Add(orderedContacts[i]);\r\n                    }\r\n                    count++;\r\n                }\r\n            }\r\n\r\n            Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.Loading : string.Empty;\r\n\r\n            if (LazyItems.Count > 0)\r\n            {\r\n                BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    foreach (var item in LazyItems)\r\n                    {\r\n                        Items.Add(item);\r\n                    }\r\n                    LazyItems.Clear();\r\n\r\n                    Handle(new InvokeImportContacts());\r\n                });\r\n            }\r\n            else\r\n            {\r\n                Handle(new InvokeImportContacts());\r\n            }\r\n        }\r\n\r\n        private void LoadCacheAsync()\r\n        {\r\n#if WP8\r\n            LoadCache();\r\n#else\r\n            BeginOnUIThread(TimeSpan.FromSeconds(0.4), LoadCache);\r\n#endif\r\n        }\r\n\r\n        private DateTime? _lastUpdateStatusesTime;\r\n\r\n        private void UpdateStatusesAsync()\r\n        {\r\n            BeginOnThreadPool(TimeSpan.FromSeconds(1.0), () =>\r\n            {\r\n                if (_lastUpdateStatusesTime.HasValue\r\n                    && _lastUpdateStatusesTime.Value.AddSeconds(30.0) > DateTime.Now)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                try\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        Items[i].NotifyOfPropertyChange(() => Items[i].StatusCommon);\r\n                    }\r\n\r\n                    _lastUpdateStatusesTime = DateTime.Now;\r\n                }\r\n                catch (Exception e)\r\n                {\r\n                    Execute.ShowDebugMessage(\"UpdateStatuses ex \" + e);\r\n                }\r\n            });\r\n        }\r\n\r\n        #region Commands\r\n\r\n        public void Search()\r\n        {\r\n            StateService.NavigateToDialogDetails = true;\r\n            NavigationService.UriFor<SearchViewModel>().Navigate();\r\n        }\r\n\r\n        public void AddContact()\r\n        {\r\n            var task = new SaveContactTask();\r\n            task.Completed += (o, e) =>\r\n            {\r\n                if (e.TaskResult == TaskResult.OK)\r\n                {\r\n                    ImportContactsAsync();\r\n                }\r\n            };\r\n            task.Show();\r\n        }\r\n\r\n        public void DeleteContact(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            MTProtoService.DeleteContactAsync(\r\n                user.ToInputUser(),\r\n                link => BeginOnUIThread(() => Items.Remove(user)),\r\n                error => Execute.ShowDebugMessage(\"contacts.deleteContact error: \" + error));\r\n        }\r\n\r\n        public void UserAction(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            OpenContactDetails(user);\r\n        }\r\n\r\n        public FrameworkElement OpenContactElement;\r\n\r\n        public void SetOpenContactElement(object element)\r\n        {\r\n            OpenContactElement = element as FrameworkElement;\r\n        }\r\n\r\n        public void OpenContactDetails(TLUserBase user)\r\n        {\r\n            if (user == null || user is TLUserEmpty) return;\r\n\r\n            if (user is TLUserNotRegistered)\r\n            {\r\n                var task = new SmsComposeTask();\r\n                task.Body = AppResources.InviteFriendMessage;\r\n                task.To = user.Phone != null ? user.Phone.ToString() : string.Empty;\r\n                task.Show();\r\n\r\n                return;\r\n            }\r\n\r\n            StateService.With = user;\r\n            StateService.AnimateTitle = true;\r\n            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n        }\r\n\r\n        private Stopwatch _stopwatch;\r\n        private readonly object _importedPhonesRoot = new object();\r\n\r\n        public async void ImportContactsAsync()\r\n        {\r\n            Telegram.Logs.Log.Write(\"Contacts start search 2\");\r\n\r\n            _stopwatch = Stopwatch.StartNew();\r\n            var contactStore = await ContactManager.RequestStoreAsync();\r\n            if (contactStore == null)\r\n            {\r\n                Telegram.Logs.Log.Write(\"ContactsStore is null\");\r\n                IsWorking = false;\r\n                Status = Items.Count == 0 && LazyItems.Count == 0\r\n                    ? AppResources.NoContactsHere\r\n                    : string.Empty;\r\n\r\n                return;\r\n            }\r\n\r\n            var contacts = await contactStore.FindContactsAsync();\r\n\r\n            Telegram.Logs.Log.Write(\"Contacts search completed count=\" + contacts.Count);\r\n\r\n            TLUtils.WritePerformance(\"::Search contacts time: \" + _stopwatch.Elapsed);\r\n            _stopwatch = Stopwatch.StartNew();\r\n\r\n            var phonesCache = new Dictionary<string, Contact>();\r\n            var notRegisteredContacts = new List<TLUserBase>();\r\n\r\n            foreach (var contact in contacts)\r\n            {\r\n                foreach (var phoneNumber in contact.Phones)\r\n                {\r\n                    phonesCache[phoneNumber.Number] = contact;\r\n                }\r\n\r\n                var notRegisteredUser = GetNotRegisteredUser(contact);\r\n                if (notRegisteredUser != null)\r\n                {\r\n                    notRegisteredContacts.Add(notRegisteredUser);\r\n                }\r\n            }\r\n\r\n            Telegram.Logs.Log.Write(\"Contacts skip empty count=\" + notRegisteredContacts.Count);\r\n\r\n            TLUtils.WritePerformance(\"::Get not registered phones time: \" + _stopwatch.Elapsed);\r\n\r\n            _stopwatch = Stopwatch.StartNew();\r\n\r\n            var groups = AlphaKeyGroup<TLUserBase>.CreateGroups(\r\n                notRegisteredContacts,\r\n                Thread.CurrentThread.CurrentUICulture,\r\n                x => x.FullName,\r\n                false);\r\n\r\n            TLUtils.WritePerformance(\"::Get groups time: \" + _stopwatch.Elapsed);\r\n\r\n            var contactKeys = new Dictionary<string, string>();\r\n            foreach (var contact in Contacts)\r\n            {\r\n                contactKeys[contact.Key] = contact.Key;\r\n            }\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                foreach (var @group in groups)\r\n                {\r\n                    var gr = new AlphaKeyGroup<TLUserBase>(@group.Key);\r\n                    foreach (var u in @group.OrderBy(x => x.FullName))\r\n                    {\r\n                        gr.Add(u);\r\n                    }\r\n\r\n                    if (!contactKeys.ContainsKey(gr.Key))\r\n                    {\r\n                        BeginOnUIThread(() => Contacts.Add(gr));\r\n                    }\r\n                }\r\n            });\r\n\r\n            var importedPhonesCache = GetImportedPhones();\r\n\r\n            Telegram.Logs.Log.Write(\"Contacts load imported count=\" + importedPhonesCache.Count);\r\n\r\n            var phones = phonesCache.Keys.Take(Constants.MaxImportingContactsCount).ToList();\r\n            var importingContacts = new TLVector<TLInputContactBase>();\r\n            var importingPhones = new List<string>();\r\n            foreach (var phone in phones)\r\n            {\r\n                if (importedPhonesCache.ContainsKey(phone))\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                var firstLastName = GetFirstLastName(phonesCache[phone]);\r\n\r\n                var contact = new TLInputContact\r\n                {\r\n                    Phone = new TLString(phone),\r\n                    FirstName = new TLString(firstLastName.Item1),\r\n                    LastName = new TLString(firstLastName.Item2),\r\n                    ClientId = new TLLong(phonesCache[phone].GetHashCode())\r\n                };\r\n\r\n                importingContacts.Add(contact);\r\n                importingPhones.Add(phone);\r\n            }\r\n\r\n            Telegram.Logs.Log.Write(\"Contacts skip imported count=\" + importingContacts.Count);\r\n\r\n            if (importingContacts.Count > 0)\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(\"contacts.importContacts id={0}\", string.Join(\",\", importingContacts.Select(x => ((TLInputContact)x).Phone)));\r\n\r\n                IsWorking = true;\r\n                MTProtoService.ImportContactsAsync(importingContacts,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"Contacts contacts.importContacts result=\" + result);\r\n\r\n                        IsWorking = false;\r\n                        Status = Items.Count == 0 && LazyItems.Count == 0 && result.Users.Count == 0\r\n                            ? AppResources.NoContactsHere\r\n                            : string.Empty;\r\n\r\n                        var retryContactsCount = result.RetryContacts.Count;\r\n                        if (retryContactsCount > 0)\r\n                        {\r\n                            Execute.ShowDebugMessage(\"contacts.importContacts retry_contacts_count=\" + retryContactsCount);\r\n                        }\r\n\r\n                        InsertContacts(result.Users);\r\n\r\n                        SaveImportedPhones(importedPhonesCache, importingPhones);\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"Contacts contacts.importContacts error=\" + error);\r\n\r\n                        IsWorking = false;\r\n                        Status = string.Empty;\r\n\r\n                        Execute.ShowDebugMessage(\"contacts.importContacts error=\" + error);\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                Status = Items.Count == 0 && LazyItems.Count == 0\r\n                    ? AppResources.NoContactsHere\r\n                    : string.Empty;\r\n            }\r\n        }\r\n\r\n        public static TLUserNotRegistered GetNotRegisteredUser(Contact contact)\r\n        {\r\n            var firstLastName = GetFirstLastName(contact);\r\n            if (string.IsNullOrEmpty(firstLastName.Item1) && string.IsNullOrEmpty(firstLastName.Item2))\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var phones = new TLVector<TLUserPhone>();\r\n            foreach (var contactPhone in contact.Phones)\r\n            {\r\n                phones.Add(new TLUserPhone\r\n                {\r\n                    Kind = new TLInt((int)contactPhone.Kind),\r\n                    Number = string.IsNullOrEmpty(contactPhone.Number) ? TLString.Empty : new TLString(contactPhone.Number),\r\n                    Description = string.IsNullOrEmpty(contactPhone.Description) ? TLString.Empty : new TLString(contactPhone.Description),\r\n                });\r\n            }\r\n\r\n            var phone = phones.FirstOrDefault(x => !TLString.IsNullOrEmpty(x.Number));\r\n            if (phone != null)\r\n            {\r\n                return new TLUserNotRegistered\r\n                {\r\n                    Id = new TLInt(0),\r\n                    Phone = phone.Number,\r\n                    Phones = phones,\r\n                    _firstName = new TLString(firstLastName.Item1),\r\n                    _lastName = new TLString(firstLastName.Item2),\r\n                    ClientId = new TLLong(contact.GetHashCode()),\r\n                    _photo = new TLPhotoEmpty(),\r\n                };\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static Tuple<string, string> GetFirstLastName(Contact contact)\r\n        {\r\n            var firstName = contact.FirstName ?? string.Empty;\r\n            var lastName = contact.LastName ?? string.Empty;\r\n\r\n            if (string.IsNullOrEmpty(firstName)\r\n                && string.IsNullOrEmpty(lastName)\r\n                && !string.IsNullOrEmpty(contact.DisplayName))\r\n            {\r\n                firstName = contact.DisplayName;\r\n            }\r\n\r\n            return new Tuple<string, string>(firstName, lastName);\r\n        }\r\n\r\n        private void SaveImportedPhones(Dictionary<string, string> importedPhonesCache, List<string> importingPhones)\r\n        {\r\n            foreach (var importingPhone in importingPhones)\r\n            {\r\n                importedPhonesCache[importingPhone] = importingPhone;\r\n            }\r\n\r\n            var importedPhones = new TLVector<TLString>(importedPhonesCache.Keys.Count);\r\n            foreach (var importedPhone in importedPhonesCache.Keys)\r\n            {\r\n                importedPhones.Add(new TLString(importedPhone));\r\n            }\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_importedPhonesRoot, Constants.ImportedPhonesFileName, importedPhones);\r\n        }\r\n\r\n        private Dictionary<string, string> GetImportedPhones()\r\n        {\r\n            var importedPhones =\r\n                TLUtils.OpenObjectFromMTProtoFile<TLVector<TLString>>(_importedPhonesRoot, Constants.ImportedPhonesFileName) ??\r\n                new TLVector<TLString>();\r\n\r\n            var importedPhonesCache = new Dictionary<string, string>();\r\n            foreach (var importedPhone in importedPhones)\r\n            {\r\n                var phone = importedPhone.ToString();\r\n                importedPhonesCache[phone] = phone;\r\n            }\r\n\r\n            return importedPhonesCache;\r\n        }\r\n\r\n        private void InsertContacts(IEnumerable<TLUserBase> newUsers)\r\n        {\r\n            var itemsCache = new Dictionary<int, TLUserBase>();\r\n\r\n            for (int i = 0; i < Items.Count; i++)\r\n            {\r\n                var userBase = Items[i];\r\n                if (userBase != null\r\n                    && userBase.IsContact\r\n                    && !itemsCache.ContainsKey(userBase.Index))\r\n                {\r\n                    itemsCache[userBase.Index] = userBase;\r\n                }\r\n            }\r\n\r\n            var users = newUsers.OrderByDescending(x => x.FullName);\r\n            var addingUsers = new List<TLUserBase>();\r\n\r\n            foreach (var user in users)\r\n            {\r\n                if (!itemsCache.ContainsKey(user.Index) && !(user is TLUserEmpty) && user.Index != StateService.CurrentUserId)\r\n                {\r\n                    addingUsers.Add(user);\r\n                }\r\n            }\r\n\r\n            Status = addingUsers.Count != 0 || Items.Count != 0 || LazyItems.Count != 0 ? string.Empty : Status;\r\n            foreach (var addingUser in addingUsers)\r\n            {\r\n                InsertContact(addingUser);\r\n            }\r\n        }\r\n\r\n        private void InsertContact(TLUserBase user)\r\n        {\r\n            var comparer = Comparer<string>.Default;\r\n            var position = -1;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (Items[i].Index == user.Index)\r\n                {\r\n                    position = -2;\r\n                    break;\r\n                }\r\n\r\n                if (comparer.Compare(Items[i].FullName, user.FullName) >= 0)\r\n                {\r\n                    position = i;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (position == -1)\r\n            {\r\n                position = Items.Count;\r\n            }\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"InsertContact id={0} position={1} full_name={2}\", user.Id, position, user.FullName);\r\n\r\n            if (position >= 0)\r\n            {\r\n                Items.Insert(position, user);\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public void Handle(string command)\r\n        {\r\n            if (string.Equals(command, Commands.LogOutCommand))\r\n            {\r\n                _runOnce = true;\r\n                LazyItems.Clear();\r\n                Items.Clear();\r\n                Status = string.Empty;\r\n                IsWorking = false;\r\n                FileUtils.Delete(_importedPhonesRoot, Constants.ImportedPhonesFileName);\r\n                FileUtils.Delete(_savedCountSyncRoot, Constants.SavedCountFileName);\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateContactLinkBase update)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                if (LazyItems.Count > 0) return;\r\n\r\n                var updateContactLink24 = update as TLUpdateContactLink24;\r\n                if (updateContactLink24 == null) return;\r\n\r\n                var isContact = updateContactLink24.MyLink is TLContactLink;\r\n                var item = Items.FirstOrDefault(x => x.Index == updateContactLink24.UserId.Value);\r\n                if (item != null)\r\n                {\r\n                    if (isContact)\r\n                    {\r\n                        InsertContact(item);\r\n                    }\r\n                    else\r\n                    {\r\n                        Items.Remove(item);\r\n                    }\r\n                }\r\n                else if (isContact)\r\n                {\r\n                    var user = CacheService.GetUser(update.UserId);\r\n                    if (user != null)\r\n                    {\r\n                        InsertContact(user);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(TLUpdateUserStatus updateUserStatus)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                if (LazyItems.Count > 0) return;\r\n\r\n                var item = Items.FirstOrDefault(x => x.Index == updateUserStatus.UserId.Value);\r\n                if (item != null)\r\n                {\r\n                    item.NotifyOfPropertyChange(() => item.Status);\r\n                    item.NotifyOfPropertyChange(() => item.StatusCommon);\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(InvokeImportContacts message)\r\n        {\r\n            GetContactsAsync(ImportContactsAsync);\r\n        }\r\n\r\n        public void Handle(InvokeDeleteContacts message)\r\n        {\r\n            var id = new TLVector<TLInputUserBase>(CacheService.GetContacts().Where(x => x.IsContact).Select(x => x.ToInputUser()).ToList());\r\n\r\n            MTProtoService.DeleteContactsAsync(id,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Handle(Commands.LogOutCommand);\r\n                    Handle(new InvokeImportContacts());\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n\r\n                }));\r\n        }\r\n\r\n        public void Handle(TLUpdatePrivacy update)\r\n        {\r\n            if (update.Key is TLPrivacyKeyStatusTimestamp)\r\n            {\r\n                Execute.ShowDebugMessage(\"update privacy\");\r\n                MTProtoService.GetStatusesAsync(\r\n                    statuses => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        try\r\n                        {\r\n                            for (var i = 0; i < Items.Count; i++)\r\n                            {\r\n                                Items[i].NotifyOfPropertyChange(() => Items[i].StatusCommon);\r\n                            }\r\n\r\n                            _lastUpdateStatusesTime = DateTime.Now;\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            Execute.ShowDebugMessage(\"UpdateStatuses ex \" + e);\r\n                        }\r\n                    }),\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"contacts.getStatuses error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateUserName update)\r\n        {\r\n            // threadpool\r\n            var userId = update.UserId;\r\n            var userBase = CacheService.GetUser(userId);\r\n            if (userBase != null && userBase.IsContact)\r\n            {\r\n                ContactsHelper.UpdateContactAsync(DownloadFileManager, StateService, userBase);\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateUserPhoto update)\r\n        {\r\n            //threadpool\r\n            var userId = update.UserId;\r\n            var userBase = CacheService.GetUser(userId);\r\n            if (userBase != null && userBase.IsContact)\r\n            {\r\n                ContactsHelper.UpdateContactAsync(DownloadFileManager, StateService, userBase);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class InvokeImportContacts { }\r\n\r\n    public class InvokeDeleteContacts { }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Contacts/EditContactViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.IO;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Contacts\r\n{\r\n    public class EditContactViewModel : ItemDetailsViewModelBase\r\n    {\r\n        private string _firstName;\r\n\r\n        public string FirstName\r\n        {\r\n            get { return _firstName; }\r\n            set { SetField(ref _firstName, value, () => FirstName); }\r\n        }\r\n\r\n        private string _lastName;\r\n\r\n        public string LastName\r\n        {\r\n            get { return _lastName; }\r\n            set { SetField(ref _lastName, value, () => LastName); }\r\n        }\r\n\r\n        private IFileManager _fileManager;\r\n\r\n        public EditContactViewModel(IFileManager fileManager, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            _fileManager = fileManager;\r\n\r\n            CurrentItem = StateService.CurrentContact;\r\n            StateService.CurrentContact = null;\r\n            var contact = CurrentItem as TLUserBase;\r\n            if (contact != null)\r\n            {\r\n                if (contact.ExtendedInfo != null)\r\n                {\r\n                    FirstName = contact.ExtendedInfo.FirstName.ToString();\r\n                    LastName = contact.ExtendedInfo.LastName.ToString();\r\n                }\r\n                else\r\n                {\r\n                    FirstName = contact.FirstName.ToString();\r\n                    LastName = contact.LastName.ToString();                    \r\n                }\r\n            }\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            if (string.IsNullOrEmpty(FirstName) && string.IsNullOrEmpty(LastName)) return;\r\n\r\n            var user = CurrentItem as TLUserBase;\r\n            if (user == null) return;\r\n            if (user.IsForeign || user.IsDeleted || user is TLUserEmpty) return;\r\n\r\n            if (user.FirstName.ToString() != FirstName\r\n                || user.LastName.ToString() != LastName)\r\n            {\r\n                user.ExtendedInfo = new TLUserExtendedInfo();\r\n                user.ExtendedInfo.FirstName = new TLString(FirstName ?? \"\");\r\n                user.ExtendedInfo.LastName = new TLString(LastName ?? \"\");\r\n            }\r\n            else\r\n            {\r\n                user.ExtendedInfo = null;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.ImportContactsAsync(\r\n                new TLVector<TLInputContactBase>\r\n                {\r\n                    new TLInputContact{ClientId = new TLLong(0), FirstName = new TLString(FirstName), LastName = new TLString(LastName), Phone = user.Phone}\r\n                }, \r\n                importedContacts =>\r\n                {\r\n                    IsWorking = false;\r\n                    user.NotifyOfPropertyChange(\"FullName\");\r\n\r\n                    var dialog = CacheService.GetDialog(new TLPeerUser {Id = user.Id});\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog.With = user;\r\n                        dialog.NotifyOfPropertyChange(\"With\") ;\r\n\r\n                    }\r\n\r\n                    if (user.IsContact)\r\n                    {\r\n                        ContactsHelper.UpdateContactAsync(_fileManager, StateService, user);\r\n                    }\r\n\r\n                    //EventAggregator.Publish(statedMessage.Message);\r\n                    BeginOnUIThread(() => NavigationService.GoBack());\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                });\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        public void EditPhoto()\r\n        {\r\n\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Contacts/SecretContactDetailsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Contacts\r\n{\r\n    public class SecretContactDetailsViewModel : TelegramPropertyChangedBase, Telegram.Api.Aggregator.IHandle<TLEncryptedChatBase>\r\n    {\r\n        public Visibility VoiceCallVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentItem as TLUser;\r\n                if (user != null && !user.IsSelf && !user.IsBot)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public string GroupsInCommonSubtitle\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentItem as TLUser45;\r\n                if (user != null && user.CommonChatsCount != null && user.CommonChatsCount.Value > 0)\r\n                {\r\n                    return Utils.Language.Declension(\r\n                    user.CommonChatsCount.Value,\r\n                    AppResources.GroupNominativeSingular,\r\n                    AppResources.GroupNominativePlural,\r\n                    AppResources.GroupGenitiveSingular,\r\n                    AppResources.GroupGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public Visibility GroupsInCommonVisibility\r\n        {\r\n            get\r\n            {\r\n                var user = CurrentItem as TLUser45;\r\n                if (user != null && user.CommonChatsCount != null && user.CommonChatsCount.Value > 0)\r\n                {\r\n                    return Visibility.Visible;\r\n                }\r\n\r\n                return Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public string DisplayName { get { return AppResources.Info.ToLowerInvariant(); } }\r\n\r\n        public TLUserBase CurrentItem { get; set; }\r\n\r\n        private readonly IStateService _stateService;\r\n        private readonly INavigationService _navigationService;\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n        private readonly IMTProtoService _mtProtoService;\r\n        private readonly ICacheService _cacheService;\r\n\r\n        public TLString Key { get; set; }\r\n\r\n        private TimerSpan _selectedSpan;\r\n\r\n        public TimerSpan SelectedSpan\r\n        {\r\n            get { return _selectedSpan; }\r\n            set\r\n            {\r\n                if (value != _selectedSpan)\r\n                {\r\n                    _selectedSpan = value;\r\n                    NotifyOfPropertyChange(() => SelectedSpan);\r\n                    SetTimerSpan(_selectedSpan);\r\n                }\r\n            }\r\n        }\r\n\r\n        public IList<TimerSpan> TimerSpans { get; protected set; } \r\n\r\n        private TLEncryptedChatBase _chat;\r\n\r\n        public TLEncryptedChatBase Chat\r\n        {\r\n            get { return _chat; }\r\n            set\r\n            {\r\n                _chat = value;\r\n                SetChatTTL(_chat);\r\n            }\r\n        }\r\n\r\n        public Visibility EncryptionKeyVisibility\r\n        {\r\n            get { return Chat is TLEncryptedChat ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public string Subtitle\r\n        {\r\n            get\r\n            {\r\n                if (CurrentItem == null) return null;\r\n\r\n                return UserStatusToStringConverter.Convert(CurrentItem.Status);\r\n            }\r\n        }\r\n\r\n        public SecretContactDetailsViewModel(IMTProtoService mtProtoService, IStateService stateService, INavigationService navigationService, ITelegramEventAggregator eventAggregator, ICacheService cacheService)\r\n        {\r\n            _stateService = stateService;\r\n            _navigationService = navigationService;\r\n            _eventAggregator = eventAggregator;\r\n            _mtProtoService = mtProtoService;\r\n            _cacheService = cacheService;\r\n            \r\n            TimerSpans = new List<TimerSpan>\r\n            {\r\n                new TimerSpan(AppResources.OffMasculine, string.Empty, 0),\r\n                new TimerSpan(AppResources.SecondNominativeSingular,  \"1\", 1),\r\n                new TimerSpan(AppResources.SecondNominativePlural, \"2\", 2),\r\n                new TimerSpan(AppResources.SecondNominativePlural, \"3\", 3),\r\n                new TimerSpan(AppResources.SecondNominativePlural, \"4\", 4),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"5\", 5),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"6\", 6),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"7\", 7),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"8\", 8),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"9\", 9),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"10\", 10),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"11\", 11),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"12\", 12),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"13\", 13),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"14\", 14),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"15\", 15),\r\n                new TimerSpan(AppResources.SecondGenitivePlural, \"30\", 30),\r\n                new TimerSpan(AppResources.MinuteNominativeSingular, \"1\", 60),\r\n                new TimerSpan(AppResources.HourNominativeSingular, \"1\", (int) TimeSpan.FromHours(1.0).TotalSeconds),\r\n                new TimerSpan(AppResources.DayNominativeSingular, \"1\", (int) TimeSpan.FromDays(1.0).TotalSeconds),\r\n                new TimerSpan(AppResources.WeekNominativeSingular, \"1\", (int) TimeSpan.FromDays(7.0).TotalSeconds),\r\n            };\r\n\r\n            _selectedSpan = TimerSpans.First();\r\n\r\n            _eventAggregator.Subscribe(this);\r\n        }\r\n\r\n        public void Handle(TLEncryptedChatBase encryptedChat)\r\n        {\r\n            if (encryptedChat != null\r\n                && Chat != null\r\n                && encryptedChat.Id.Value == Chat.Id.Value)\r\n            {\r\n                Chat = encryptedChat;\r\n                NotifyOfPropertyChange(() => EncryptionKeyVisibility);\r\n            }\r\n        }\r\n\r\n        private void SetChatTTL(TLEncryptedChatBase chat)\r\n        {\r\n            if (chat != null && chat.MessageTTL != null)\r\n            {\r\n                var selectedSpan = TimerSpans.FirstOrDefault(x => x.Seconds == Chat.MessageTTL.Value);\r\n                if (selectedSpan != null)\r\n                {\r\n                    _selectedSpan = selectedSpan;\r\n                }\r\n                else\r\n                {\r\n                    _selectedSpan = TimerSpans.First();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                _selectedSpan = TimerSpans.First();\r\n            }\r\n        }\r\n\r\n        private void SetTimerSpan(TimerSpan selectedSpan)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            var action = new TLDecryptedMessageActionSetMessageTTL();\r\n            action.TTLSeconds = new TLInt(selectedSpan.Seconds);\r\n\r\n            var decryptedTuple = SecretDialogDetailsViewModel.GetDecryptedServiceMessageAndObject(action, chat, _mtProtoService.CurrentUserId, _cacheService);\r\n\r\n            SecretDialogDetailsViewModel.SendEncryptedService(chat, decryptedTuple.Item2, _mtProtoService, _cacheService,\r\n                result =>\r\n                {\r\n                    _eventAggregator.Publish(new SetMessagesTTLEventArgs { Chat = Chat, Message = decryptedTuple.Item1 });\r\n                    Chat.MessageTTL = new TLInt(selectedSpan.Seconds);\r\n                });\r\n        }\r\n\r\n        public void OpenEncryptionKey()\r\n        {\r\n            if (Key == null) return;\r\n\r\n            _stateService.CurrentKey = Key;\r\n            _stateService.CurrentContact = CurrentItem;\r\n            _stateService.CurrentEncryptedChat = Chat;\r\n            _navigationService.UriFor<EncryptionKeyViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenGroupsInCommon()\r\n        {\r\n            if (CurrentItem == null) return;\r\n\r\n            _stateService.CurrentContact = CurrentItem;\r\n            _navigationService.UriFor<GroupsInCommonViewModel>().Navigate();\r\n        }\r\n\r\n        public void StartVoiceCall()\r\n        {\r\n            ShellViewModel.StartVoiceCall(CurrentItem as TLUser, IoC.Get<IVoIPService>(), IoC.Get<ICacheService>());\r\n        }\r\n\r\n        public void Call()\r\n        {\r\n            var user = CurrentItem;\r\n\r\n            if (user == null || user.Phone == null) return;\r\n\r\n            var task = new PhoneCallTask();\r\n            task.DisplayName = user.FullName;\r\n            task.PhoneNumber = \"+\" + user.Phone;\r\n            task.Show();\r\n        }\r\n\r\n        public void SelectTimerSpan()\r\n        {\r\n            _stateService.IsEncryptedTimer = true;\r\n            _stateService.SelectedTimerSpan = SelectedSpan;\r\n            _navigationService.UriFor<ChooseTTLViewModel>().Navigate();\r\n        }\r\n    }\r\n\r\n    public class TimerSpan\r\n    {\r\n        public string SpanName { get; protected set; }\r\n\r\n        public string SpanNumber { get; protected set; }\r\n\r\n        public int Seconds { get; protected set; }\r\n\r\n        public string Description { get; protected set; }\r\n\r\n        public TimerSpan(string caption, string countCaption, int seconds, string description = null)\r\n        {\r\n            SpanName = caption;\r\n            SpanNumber = countCaption;\r\n            Seconds = seconds;\r\n            Description = description;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"{0} {1}\", SpanNumber, SpanName);\r\n        }\r\n    }\r\n\r\n    public class SetMessagesTTLEventArgs\r\n    {\r\n        public TLEncryptedChatBase Chat { get; set; }\r\n\r\n        public TLDecryptedMessageService Message { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Contacts/SecretContactViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Media;\r\n\r\nnamespace TelegramClient.ViewModels.Contacts\r\n{\r\n    public class SecretContactViewModel : Conductor<object>.Collection.OneActive\r\n    {\r\n        public SecretContactDetailsViewModel ContactDetails { get; protected set; }\r\n\r\n        public SecretMediaViewModel Media { get; protected set; }\r\n\r\n        public string ChatName\r\n        {\r\n            get\r\n            {\r\n                return _contact != null ? _contact.FullName.ToUpperInvariant() : string.Empty;\r\n            }\r\n        }\r\n\r\n        public Uri ChatImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                return isLightTheme?\r\n                    new Uri(\"/Images/Dialogs/secretchat-white-WXGA.png\", UriKind.Relative):\r\n                    new Uri(\"/Images/Dialogs/secretchat-black-WXGA.png\", UriKind.Relative);\r\n            }\r\n        }\r\n\r\n        private readonly TLUserBase _contact;\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        public DecryptedImageViewerViewModel ImageViewer { get; set; }\r\n\r\n        public SecretContactViewModel(SecretContactDetailsViewModel contactDetails, SecretMediaViewModel media, IStateService stateService, INavigationService navigationService)\r\n        {\r\n            //tombstoning\r\n            if (stateService.CurrentContact == null)\r\n            {\r\n                ShellViewModel.Navigate(navigationService);\r\n                return;\r\n            }\r\n\r\n            ContactDetails = contactDetails;\r\n            Media = media;\r\n            Media.Contact = this;\r\n\r\n            _stateService = stateService;\r\n\r\n            var key = stateService.CurrentKey;\r\n            stateService.CurrentKey = null;\r\n\r\n            _contact = stateService.CurrentContact;\r\n            stateService.CurrentContact = null;\r\n\r\n            var chat = stateService.CurrentEncryptedChat;\r\n            stateService.CurrentEncryptedChat = null;\r\n\r\n            ContactDetails.CurrentItem = _contact;\r\n            ContactDetails.Chat = chat;\r\n            ContactDetails.Key = key;\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            if (_contact == null) return;\r\n\r\n            Items.Add(ContactDetails);\r\n            Items.Add(Media);\r\n            if (_stateService.MediaTab)\r\n            {\r\n                _stateService.MediaTab = false;\r\n                //Items.Add(Media);\r\n                //Items.Add(ContactDetails);\r\n                ActivateItem(Media);\r\n            }\r\n            else\r\n            {\r\n                //Items.Add(ContactDetails);\r\n                //Items.Add(Media);\r\n                ActivateItem(ContactDetails);\r\n            }\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (_stateService.SelectedTimerSpan != null)\r\n            {\r\n                ContactDetails.SelectedSpan = _stateService.SelectedTimerSpan;\r\n                _stateService.SelectedTimerSpan = null;\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Contacts/ShareContactViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing Windows.ApplicationModel.Contacts;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views.Contacts;\r\nusing TelegramClient.Views.Search;\r\n\r\nnamespace TelegramClient.ViewModels.Contacts\r\n{\r\n    public class ShareContactViewModel : ItemsViewModelBase<TLUserBase>\r\n    {\r\n        private ObservableCollection<AlphaKeyGroup<TLUserBase>> _contacts;\r\n\r\n        public ObservableCollection<AlphaKeyGroup<TLUserBase>> Contacts\r\n        {\r\n            get { return _contacts; }\r\n            set { SetField(ref _contacts, value, () => Contacts); }\r\n        }\r\n\r\n        private const int FirstSliceLength = 10;\r\n\r\n        public TLMessageMediaContact PhoneContact { get; set; }\r\n\r\n        public IList<TLUserBase> Source { get; set; }\r\n\r\n        public ShareContactViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Source = new List<TLUserBase>();\r\n            Items = new AlphaKeyGroup<TLUserBase>(\"@\");\r\n            _contacts = new ObservableCollection<AlphaKeyGroup<TLUserBase>> { (AlphaKeyGroup<TLUserBase>)Items };\r\n\r\n            PhoneContact = StateService.PhoneContact;\r\n            StateService.PhoneContact = null;\r\n\r\n            if (PhoneContact != null)\r\n            {\r\n\r\n            }\r\n            else\r\n            {\r\n                Status = AppResources.Loading;\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.GetContactsAsync(\r\n                    contacts =>\r\n                    {\r\n                        var currentUser = contacts.FirstOrDefault(x => x.Index == StateService.CurrentUserId);\r\n                        if (currentUser == null)\r\n                        {\r\n                            currentUser = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n                            if (currentUser != null)\r\n                            {\r\n                                contacts.Add(currentUser);\r\n                            }\r\n                        }\r\n\r\n                        foreach (var contact in contacts)\r\n                        {\r\n                            Source.Add(contact);\r\n                        }\r\n\r\n                        foreach (var contact in contacts)\r\n                        {\r\n                            LazyItems.Add(contact);\r\n                        }\r\n\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            var importantCount = 0;\r\n                            var count = 0;\r\n                            for (var i = 0; i < LazyItems.Count && importantCount < FirstSliceLength; i++, count++)\r\n                            {\r\n                                Items.Add(LazyItems[i]);\r\n                                importantCount++;\r\n                            }\r\n                            Status = Items.Count == 0 ? string.Format(\"{0}\", AppResources.NoUsersHere) : string.Empty;\r\n\r\n                            BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n                            {\r\n                                for (var i = count; i < LazyItems.Count; i++)\r\n                                {\r\n                                    Items.Add(LazyItems[i]);\r\n                                }\r\n                                LazyItems.Clear();\r\n\r\n                                GetContactsAsync();\r\n                            });\r\n                        });\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public Action<TLMessageMediaContact> ContinueAction { get; set; }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        #region Action\r\n        public void UserAction(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            var view = GetView() as ShareContactView;\r\n            if (view != null)\r\n            {\r\n                view.OpenContactDetails(user, ShareContactDetailsMode.Share);\r\n            }\r\n        }\r\n\r\n        public void Save()\r\n        {\r\n            if (PhoneContact == null) return;\r\n            if (PhoneContact.User == null) return;\r\n\r\n            var phoneNumber = PhoneContact.User.Phone.ToString();\r\n            if (!string.IsNullOrEmpty(phoneNumber))\r\n            {\r\n                if (!PhoneContact.User.Phone.ToString().StartsWith(\"+\"))\r\n                {\r\n                    phoneNumber = \"+\" + phoneNumber;\r\n                }\r\n\r\n                var task = new SaveContactTask();\r\n                task.FirstName = PhoneContact.User.FirstName.ToString();\r\n                task.LastName = PhoneContact.User.LastName.ToString();\r\n                task.MobilePhone = phoneNumber;\r\n                task.Show();\r\n            }\r\n        }\r\n\r\n        public void UserActionContinue(TLMessageMediaContact media)\r\n        {\r\n            if (PhoneContact != null)\r\n            {\r\n                CloseEditor(true);\r\n                Save();\r\n            }\r\n            else\r\n            {\r\n                CloseEditor(true);\r\n                ContinueAction.SafeInvoke(media);\r\n            }\r\n        }\r\n\r\n        public void ViewAction()\r\n        {\r\n            if (PhoneContact == null) return;\r\n            if (PhoneContact.User == null) return;\r\n\r\n            var view = GetView() as ShareContactView;\r\n            if (view != null)\r\n            {\r\n                view.OpenContactDetails(PhoneContact.User, ShareContactDetailsMode.View);\r\n            }\r\n        }\r\n\r\n        public async void GetContactsAsync()\r\n        {\r\n            var contactStore = await ContactManager.RequestStoreAsync();\r\n            if (contactStore == null)\r\n            {\r\n                IsWorking = false;\r\n                Status = Items.Count == 0 && LazyItems.Count == 0\r\n                    ? AppResources.NoContactsHere\r\n                    : string.Empty;\r\n\r\n                return;\r\n            }\r\n\r\n            var contacts = await contactStore.FindContactsAsync();\r\n            var notRegisteredContacts = new List<TLUserBase>();\r\n            foreach (var contact in contacts)\r\n            {\r\n                var notRegisteredUser = ContactsViewModel.GetNotRegisteredUser(contact);\r\n                if (notRegisteredUser != null)\r\n                {\r\n                    notRegisteredContacts.Add(notRegisteredUser);\r\n                }\r\n            }\r\n\r\n            foreach (var notRegisteredContact in notRegisteredContacts)\r\n            {\r\n                Source.Add(notRegisteredContact);\r\n            }\r\n\r\n            var groups = AlphaKeyGroup<TLUserBase>.CreateGroups(\r\n                notRegisteredContacts,\r\n                Thread.CurrentThread.CurrentUICulture,\r\n                x => x.FullName,\r\n                false);\r\n\r\n            var contactKeys = new Dictionary<string, string>();\r\n            foreach (var contact in Contacts)\r\n            {\r\n                contactKeys[contact.Key] = contact.Key;\r\n            }\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                foreach (var group in groups)\r\n                {\r\n                    var gr = new AlphaKeyGroup<TLUserBase>(group.Key);\r\n                    foreach (var u in group.OrderBy(x => x.FullName))\r\n                    {\r\n                        gr.Add(u);\r\n                    }\r\n\r\n                    if (!contactKeys.ContainsKey(gr.Key))\r\n                    {\r\n                        BeginOnUIThread(() => Contacts.Add(gr));\r\n                    }\r\n                }\r\n\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    Status = Items.Count == 0 && LazyItems.Count == 0\r\n                        ? AppResources.NoContactsHere\r\n                        : string.Empty;\r\n                });\r\n            });\r\n        }\r\n        #endregion\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen\r\n        {\r\n            get { return _isOpen; }\r\n            protected set\r\n            {\r\n                if (_isOpen != value)\r\n                {\r\n                    _isOpen = value;\r\n                    NotifyOfPropertyChange(() => IsOpen);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void OpenEditor()\r\n        {\r\n            IsOpen = true;\r\n        }\r\n\r\n        public void CloseEditor(bool force = false)\r\n        {\r\n            var view = GetView() as ShareContactView;\r\n            if (view != null && !force)\r\n            {\r\n                var searchView = view.SearchPlaceholder.Content as SearchSharedContactsView;\r\n                if (searchView != null)\r\n                {\r\n                    view.SearchPlaceholder.Content = null;\r\n                    return;\r\n                }\r\n                if (view.MorePanel.Visibility == System.Windows.Visibility.Visible)\r\n                {\r\n                    view.AppBarPanel.Close();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            IsOpen = false;\r\n        }\r\n    }\r\n\r\n    public enum ShareContactDetailsMode\r\n    {\r\n        Share,\r\n        View,\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Debug/DebugViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels\r\n{\r\n    public class DebugViewModel : ViewModelBase\r\n    {\r\n        public DebugViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            App.Log(\"DebugViewModel sstart .ctor\");\r\n            DisplayName = \"debug\";\r\n            App.Log(\"DebugViewModel end .ctor\");\r\n        }\r\n\r\n        public IList<string> Items { get { return TLUtils.DebugItems; } }\r\n\r\n        public bool IsDebugEnabled\r\n        {\r\n            get { return TLUtils.IsDebugEnabled; }\r\n            set { TLUtils.IsDebugEnabled = value; }\r\n        }\r\n       \r\n         \r\n        public void Send()\r\n        {\r\n            var body = new StringBuilder();\r\n            foreach (var debugItem in TLUtils.DebugItems)\r\n            {\r\n                body.Append(debugItem + \"\\n\");\r\n            }\r\n        }\r\n\r\n        public void Clear()\r\n        {\r\n            TLUtils.DebugItems.Clear();\r\n            NotifyOfPropertyChange(() => Items);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Debug/LogViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Text;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels\r\n{\r\n    public class LogViewModel : ViewModelBase\r\n    {\r\n        public LogViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            DisplayName = \"log\";\r\n        }\r\n\r\n        public IList<string> Items { get { return TLUtils.LogItems; } }\r\n\r\n        public bool IsLogEnabled\r\n        {\r\n            get { return TLUtils.IsLogEnabled; }\r\n            set { TLUtils.IsLogEnabled = value; }\r\n        }\r\n       \r\n         \r\n        public void Send(string email, string subject, params string[] footer)\r\n        {\r\n            var body = new StringBuilder();\r\n            foreach (var debugItem in TLUtils.LogItems)\r\n            {\r\n                body.AppendLine(debugItem);\r\n            }\r\n\r\n            var timestamp = DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss.fff\", CultureInfo.InvariantCulture);\r\n            body.AppendLine(timestamp + \": Send log\");\r\n            body.AppendLine();\r\n            foreach (var item in footer)\r\n            {\r\n                body.AppendLine(item);\r\n            }\r\n\r\n            var task = new EmailComposeTask();\r\n            task.Body = body.ToString();\r\n            task.To = email;\r\n            task.Subject = subject;\r\n            task.Show();\r\n        }\r\n\r\n        public void Clear()\r\n        {\r\n            TLUtils.LogItems.Clear();\r\n            NotifyOfPropertyChange(() => Items);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Debug/LongPollViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Debug\r\n{\r\n    public class LongPollViewModel : ViewModelBase\r\n    {\r\n        public LongPollViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            DisplayName = \"history\";\r\n\r\n        }\r\n\r\n        //public IList<HistoryItem> Items { get { return MTProtoService.History; } }\r\n\r\n        //public bool IsLongPollDebugEnabled\r\n        //{\r\n        //    get { return TLUtils.IsLongPollDebugEnabled; }\r\n        //    set { TLUtils.IsLongPollDebugEnabled = value; }\r\n        //}\r\n\r\n        //public void Clear()\r\n        //{\r\n        //    TLUtils.LongPollItems.Clear();\r\n        //    NotifyOfPropertyChange(() => Items);\r\n        //}\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Debug/PerformanceViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Debug\r\n{\r\n    public class PerformanceViewModel : ViewModelBase\r\n    {\r\n        public PerformanceViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            DisplayName = \"performance\";\r\n        }\r\n\r\n        public IList<string> Items { get { return TLUtils.PerformanceItems; } }\r\n\r\n        public bool IsDebugEnabled\r\n        {\r\n            get { return TLUtils.IsPerformanceLogEnabled; }\r\n            set { TLUtils.IsPerformanceLogEnabled = value; }\r\n        }\r\n\r\n        public void Clear()\r\n        {\r\n            TLUtils.PerformanceItems.Clear();\r\n            NotifyOfPropertyChange(() => Items);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/ChooseDialogViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Windows.Storage;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class ChooseDialogViewModel : ItemsViewModelBase<TLDialogBase>,\r\n        Telegram.Api.Aggregator.IHandle<TopMessageUpdatedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<DialogAddedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<DialogRemovedEventArgs>\r\n    {\r\n\r\n        public TLUserBase SharedContact { get; set; }\r\n\r\n        public List<TLMessageBase> ForwardedMessages { get; set; }\r\n\r\n        private string LogFileName { get; set; }\r\n\r\n        private const int FirstSliceLength = 10;\r\n\r\n        private readonly string _gameString;\r\n\r\n        private readonly string _accessToken;\r\n\r\n        private readonly TLUserBase _bot;\r\n\r\n        private readonly Uri _webLink;\r\n\r\n        private readonly IReadOnlyList<IStorageItem> _storageItems;\r\n\r\n        private readonly string _url;\r\n\r\n        private readonly string _text;\r\n\r\n        private readonly TLKeyboardButtonSwitchInline _switchInlineButton;\r\n\r\n        public ICollectionView FilteredItems { get; set; }\r\n\r\n        public TLDialogBase CurrentUser { get; protected set; }\r\n\r\n        public ChooseDialogViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            FilteredItems = new CollectionViewSource { Source = Items }.View;\r\n            FilteredItems.Filter += item =>\r\n            {\r\n                var dialog = item as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    var chat = dialog.With as TLChat41;\r\n                    if (chat != null)\r\n                    {\r\n                        return !chat.IsMigrated;\r\n                    }\r\n\r\n                    var user = dialog.With as TLUser;\r\n                    if (user != null)\r\n                    {\r\n                        return !user.IsSelf;\r\n                    }\r\n                }\r\n\r\n                var dialog71 = dialog as TLDialog71;\r\n                if (dialog71 != null)\r\n                {\r\n                    return !dialog71.IsPromo;\r\n                }\r\n\r\n                return true;\r\n            };\r\n\r\n            EventAggregator.Subscribe(this);\r\n\r\n            LogFileName = StateService.LogFileName;\r\n            StateService.LogFileName = null;\r\n\r\n            ForwardedMessages = StateService.ForwardMessages;\r\n            StateService.ForwardMessages = null;\r\n\r\n            SharedContact = StateService.SharedContact;\r\n            StateService.SharedContact = null;\r\n\r\n            _gameString = StateService.GameString;\r\n            StateService.GameString = null;\r\n\r\n            _accessToken = StateService.AccessToken;\r\n            StateService.AccessToken = null;\r\n\r\n            _bot = StateService.Bot;\r\n            StateService.Bot = null;\r\n\r\n            _webLink = StateService.WebLink;\r\n            StateService.WebLink = null;\r\n\r\n            _storageItems = StateService.StorageItems;\r\n            StateService.StorageItems = null;\r\n\r\n            _url = StateService.Url;\r\n            StateService.Url = null;\r\n\r\n            _text = StateService.UrlText;\r\n            StateService.UrlText = null;\r\n\r\n            _switchInlineButton = StateService.SwitchInlineButton;\r\n            StateService.SwitchInlineButton = null;\r\n\r\n            Status = AppResources.Loading;\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (isAuthorized)\r\n                {\r\n                    var dialogs = CacheService.GetDialogs();\r\n\r\n                    var dialogsCache = new Dictionary<int, TLDialogBase>();\r\n                    var clearedDialogs = new List<TLDialogBase>();\r\n                    foreach (var dialog in dialogs)\r\n                    {\r\n                        if (!dialogsCache.ContainsKey(dialog.Index))\r\n                        {\r\n                            var user = dialog.With as TLUser;\r\n                            if (user != null && user.IsSelf)\r\n                            {\r\n                                CurrentUser = dialog;\r\n                            }\r\n\r\n                            if (dialog is TLDialog || dialog is TLBroadcastDialog)\r\n                            {\r\n                                if (!SkipDialogForBot(_bot, dialog))\r\n                                {\r\n                                    clearedDialogs.Add(dialog);\r\n                                }\r\n                                dialogsCache[dialog.Index] = dialog;\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            var cachedDialog = dialogsCache[dialog.Index];\r\n                            if (cachedDialog.Peer is TLPeerUser && dialog.Peer is TLPeerUser)\r\n                            {\r\n                                CacheService.DeleteDialog(dialog);\r\n                                continue;\r\n                            }\r\n                            if (cachedDialog.Peer is TLPeerChat && dialog.Peer is TLPeerChat)\r\n                            {\r\n                                CacheService.DeleteDialog(dialog);\r\n                                continue;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (CurrentUser == null)\r\n                    {\r\n                        var currentUser = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n                        if (currentUser != null)\r\n                        {\r\n                            var dialog = new TLDialog71\r\n                            {\r\n                                With = currentUser,\r\n                                Flags = new TLInt(0),\r\n                                Peer = new TLPeerUser { Id = currentUser.Id },\r\n                                Messages = new ObservableCollection<TLMessageBase>(),\r\n                                TopMessageId = new TLInt(0),\r\n                                ReadInboxMaxId = new TLInt(0),\r\n                                ReadOutboxMaxId = new TLInt(0),\r\n                                UnreadCount = new TLInt(0),\r\n                                UnreadMentionsCount = new TLInt(0),\r\n                                NotifySettings = new TLPeerNotifySettings78 { Flags = new TLInt(0), MuteUntil = new TLInt(0), Sound = new TLString(\"Default\") }\r\n                            };\r\n                            CurrentUser = dialog;\r\n                        }\r\n                    }\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        NotifyOfPropertyChange(() => CurrentUser);\r\n\r\n                        foreach (var clearedDialog in clearedDialogs)\r\n                        {\r\n                            LazyItems.Add(clearedDialog);\r\n                        }\r\n\r\n                        var lastDialog = clearedDialogs.LastOrDefault(x => x.TopMessageId != null);\r\n                        _maxId = lastDialog != null ? lastDialog.TopMessageId.Value : 0;\r\n\r\n                        Status = LazyItems.Count == 0 ? AppResources.Loading : string.Empty;\r\n                        var importantCount = 0;\r\n                        var count = 0;\r\n                        for (var i = 0; i < LazyItems.Count && importantCount < FirstSliceLength; i++, count++)\r\n                        {\r\n                            Items.Add(LazyItems[i]);\r\n                            var chat41 = LazyItems[i].With as TLChat41;\r\n                            if (chat41 == null || chat41.MigratedTo == null)\r\n                            {\r\n                                importantCount++;\r\n                            }\r\n                        }\r\n\r\n                        BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n                        {\r\n                            for (var i = count; i < LazyItems.Count; i++)\r\n                            {\r\n                                Items.Add(LazyItems[i]);\r\n                            }\r\n                            LazyItems.Clear();\r\n\r\n                            LoadNextSlice();\r\n                        });\r\n                    });\r\n                }\r\n\r\n            });\r\n        }\r\n\r\n        public static bool SkipDialogForBot(TLUserBase bot, TLDialogBase dialog)\r\n        {\r\n            var chat = dialog.With as TLChat41;\r\n            var channel = dialog.With as TLChannel;\r\n\r\n            if (bot != null)\r\n            {\r\n                if (dialog is TLDialog)\r\n                {\r\n                    if (chat != null && !chat.IsMigrated)\r\n                    {\r\n                        return false;\r\n                    }\r\n\r\n                    if (channel != null && channel.IsMegaGroup && (channel.Creator || channel.IsEditor))\r\n                    {\r\n                        return false;\r\n                    }\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public TLMessage34 GetMessage(TLObject With, TLInputPeerBase Peer, TLString text, TLMessageMediaBase media)\r\n        {\r\n            var broadcast = With as TLBroadcastChat;\r\n            var channel = With as TLChannel;\r\n            var toId = channel != null\r\n                ? new TLPeerChannel { Id = channel.Id }\r\n                : broadcast != null\r\n                ? new TLPeerBroadcast { Id = broadcast.Id }\r\n                : TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId);\r\n\r\n            var date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n\r\n            var message = TLUtils.GetMessage(\r\n                new TLInt(StateService.CurrentUserId),\r\n                toId,\r\n                broadcast != null && channel == null ? MessageStatus.Broadcast : MessageStatus.Sending,\r\n                TLBool.True,\r\n                TLBool.True,\r\n                date,\r\n                text,\r\n                media,\r\n                TLLong.Random(),\r\n                new TLInt(0)\r\n            );\r\n\r\n            return message;\r\n        }\r\n\r\n        public bool ChooseDialog(TLObject with, bool animateTitle)\r\n        {\r\n            if (with == null) return false;\r\n\r\n            if (ForwardedMessages != null)\r\n            {\r\n                var channel = with as TLChannel;\r\n                if (channel != null && channel.IsBroadcast && !channel.Creator && !channel.IsEditor)\r\n                {\r\n                    MessageBox.Show(AppResources.PostToChannelError, AppResources.Error, MessageBoxButton.OK);\r\n\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            var result = MessageBoxResult.OK;\r\n\r\n            if (LogFileName != null)\r\n            {\r\n                result = MessageBox.Show(AppResources.ForwardMessagesToThisChat, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            }\r\n\r\n            if (_webLink != null || _storageItems != null || _gameString != null)\r\n            {\r\n                var fullName = string.Empty;\r\n                var chat = with as TLChatBase;\r\n                var user = with as TLUserBase;\r\n                if (chat != null) fullName = chat.FullName2;\r\n                if (user != null) fullName = user.FullName2;\r\n\r\n                if (_gameString != null)\r\n                {\r\n                    result = MessageBox.Show(string.Format(AppResources.ShareGameWith, fullName), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                }\r\n                else\r\n                {\r\n                    result = MessageBox.Show(string.Format(AppResources.ShareWith, fullName), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                }\r\n            }\r\n\r\n            if (_bot != null)\r\n            {\r\n                var chat = with as TLChat;\r\n                var channel = with as TLChannel;\r\n                if (chat == null && (channel == null || !channel.IsMegaGroup))\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var chatName = chat != null ? chat.FullName : channel.FullName;\r\n                result = MessageBox.Show(string.Format(AppResources.AddBotToTheGroup, chatName), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            }\r\n\r\n            if (result != MessageBoxResult.OK)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (_gameString != null)\r\n            {\r\n                var inputPeer = with as IInputPeer;\r\n                if (inputPeer == null) return false;\r\n\r\n                var mediaGame = new TLMessageMediaGame\r\n                {\r\n                    Game = new TLGame\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Id = new TLLong(0),\r\n                        AccessHash = new TLLong(0),\r\n                        ShortName = new TLString(_gameString),\r\n                        Title = new TLString(_gameString),\r\n                        Description = TLString.Empty,\r\n                        Photo = new TLPhotoEmpty { Id = new TLLong(0) }\r\n                    }\r\n                };\r\n                var message = GetMessage(with, inputPeer.ToInputPeer(), TLString.Empty, mediaGame);\r\n                mediaGame.SourceMessage = message;\r\n                IoC.Get<ICacheService>().SyncSendingMessage(message, null, m =>\r\n                {\r\n                    //IsWorking = true;\r\n                    IoC.Get<IMTProtoService>().SendMediaAsync(inputPeer.ToInputPeer(), new TLInputMediaGame { Id = new TLInputGameShortName { ShortName = new TLString(_gameString), BotId = SharedContact.ToInputUser() } }, message,\r\n                        updatesBase => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            var updates = updatesBase as TLUpdates;\r\n                            if (updates != null)\r\n                            {\r\n                                var newChannelMessageUpdate = updates.Updates.FirstOrDefault(x => x is TLUpdateNewChannelMessage) as TLUpdateNewChannelMessage;\r\n                                if (newChannelMessageUpdate != null)\r\n                                {\r\n                                    var messageCommon = newChannelMessageUpdate.Message as TLMessageCommon;\r\n                                    if (messageCommon != null)\r\n                                    {\r\n                                        var dialog = IoC.Get<ICacheService>().GetDialog(messageCommon);\r\n                                        if (dialog != null)\r\n                                        {\r\n                                            IoC.Get<ITelegramEventAggregator>().Publish(new TopMessageUpdatedEventArgs(dialog, messageCommon));\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                var newMessageUpdate = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                                if (newMessageUpdate != null)\r\n                                {\r\n                                    var messageCommon = newMessageUpdate.Message as TLMessageCommon;\r\n                                    if (messageCommon != null)\r\n                                    {\r\n                                        var dialog = IoC.Get<ICacheService>().GetDialog(messageCommon);\r\n                                        if (dialog != null)\r\n                                        {\r\n                                            IoC.Get<ITelegramEventAggregator>().Publish(new TopMessageUpdatedEventArgs(dialog, messageCommon));\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            //IsWorking = false;\r\n                            IoC.Get<INavigationService>().RemoveBackEntry();\r\n                            IoC.Get<INavigationService>().GoBack();\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            //IsWorking = false;\r\n                            Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.sendMedia error=\" + error);\r\n                        }));\r\n                });\r\n\r\n                return false;\r\n            }\r\n\r\n            StateService.With = with;\r\n            StateService.ForwardMessages = ForwardedMessages;\r\n            StateService.RemoveBackEntries = true;\r\n            StateService.LogFileName = LogFileName;\r\n            StateService.SharedContact = SharedContact;\r\n            StateService.AccessToken = _accessToken;\r\n            StateService.Bot = _bot;\r\n            StateService.WebLink = _webLink;\r\n            StateService.StorageItems = _storageItems;\r\n            StateService.Url = _url;\r\n            StateService.UrlText = _text;\r\n            StateService.SwitchInlineButton = _switchInlineButton;\r\n            StateService.AnimateTitle = animateTitle;\r\n            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n\r\n            return true;\r\n        }\r\n\r\n        public bool ChooseDialog(TLDialogBase dialog)\r\n        {\r\n            if (dialog == null) return false;\r\n            if (dialog.With == null) return false;\r\n\r\n            return ChooseDialog(dialog.With, true);\r\n        }\r\n\r\n        private int _maxId;\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            if (LazyItems.Count > 0 || IsLastSliceLoaded || IsWorking)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var offsetDate = 0;\r\n            var offsetId = 0;\r\n            TLInputPeerBase offsetPeer = new TLInputPeerEmpty();\r\n            var lastDialog = Items.OfType<TLDialog>().Last(x => x.TopMessage != null && x.TopMessage.Index > 0);\r\n            if (lastDialog != null)\r\n            {\r\n                var lastMessage = lastDialog.TopMessage as TLMessageCommon;\r\n                if (lastMessage != null)\r\n                {\r\n                    offsetDate = lastMessage.DateIndex;\r\n                    offsetId = lastMessage.Index;\r\n                    if (lastMessage.ToId is TLPeerUser)\r\n                    {\r\n                        offsetPeer = !lastMessage.Out.Value\r\n                            ? DialogDetailsViewModel.PeerToInputPeer(new TLPeerUser { Id = lastMessage.FromId })\r\n                            : DialogDetailsViewModel.PeerToInputPeer(lastMessage.ToId);\r\n                    }\r\n                    else\r\n                    {\r\n                        offsetPeer = DialogDetailsViewModel.PeerToInputPeer(lastMessage.ToId);\r\n                    }\r\n                }\r\n            }\r\n\r\n            IsWorking = true;\r\n            var offset = Items.Count;\r\n            var limit = 30;\r\n            MTProtoService.GetDialogsAsync(Stopwatch.StartNew(),\r\n                new TLInt(offsetDate), \r\n                new TLInt(offsetId), \r\n                offsetPeer, \r\n                new TLInt(limit),\r\n                new TLInt(0),\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    lastDialog = result.Dialogs.LastOrDefault(x => x.TopMessageId != null) as TLDialog;\r\n                    if (lastDialog != null)\r\n                    {\r\n                        _maxId = lastDialog.TopMessageId.Value;\r\n                    }\r\n\r\n                    var itemsAdded = 0;\r\n                    foreach (var dialog in result.Dialogs)\r\n                    {\r\n                        if (!SkipDialogForBot(_bot, dialog))\r\n                        {\r\n                            Items.Add(dialog);\r\n                            itemsAdded++;\r\n                        }\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    IsLastSliceLoaded = result.Dialogs.Count < limit;\r\n                    Status = LazyItems.Count > 0 || Items.Count > 0 ? string.Empty : Status;\r\n\r\n                    if (itemsAdded < (Constants.DialogsSlice / 2))\r\n                    {\r\n                        LoadNextSlice();\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n                }));\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n\r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            StateService.SharedContact = SharedContact;\r\n            StateService.LogFileName = LogFileName;\r\n            StateService.ForwardMessages = ForwardedMessages;\r\n            StateService.GameString = _gameString;\r\n            StateService.AccessToken = _accessToken;\r\n            StateService.Bot = _bot;\r\n            StateService.WebLink = _webLink;\r\n            StateService.StorageItems = _storageItems;\r\n            StateService.Url = _url;\r\n            StateService.UrlText = _text;\r\n            StateService.SwitchInlineButton = _switchInlineButton;\r\n            NavigationService.UriFor<SearchShellViewModel>().Navigate();\r\n        }\r\n\r\n        public void Handle(TopMessageUpdatedEventArgs eventArgs)\r\n        {\r\n            eventArgs.Dialog.NotifyOfPropertyChange(() => eventArgs.Dialog.With);\r\n            OnTopMessageUpdated(this, eventArgs);\r\n        }\r\n\r\n        private void OnTopMessageUpdated(object sender, TopMessageUpdatedEventArgs e)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                try\r\n                {\r\n\r\n                    e.Dialog.Typing = null;\r\n\r\n                    var currentPosition = Items.IndexOf(e.Dialog);\r\n\r\n                    var newPosition = currentPosition;\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (// мигает диалог, если просто обновляется последнее сообщение, то номер становится на 1 больше\r\n                            // и сначала удаляем, а потом вставляем на туже позицию\r\n                            i != currentPosition\r\n                            && Items[i].GetDateIndex() <= e.Dialog.GetDateIndex())\r\n                        {\r\n                            newPosition = i;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (currentPosition != newPosition)\r\n                    {\r\n                        if (currentPosition >= 0\r\n                            && currentPosition < newPosition)\r\n                        {\r\n                            // т.к. будем сначала удалять диалог а потом вставлять, то\r\n                            // curPos + 1 = newPos - это вставка на тоже место и не имеет смысла\r\n                            // Update: имеет, т.к. обновляется инфа о последнем сообщении\r\n                            if (currentPosition + 1 == newPosition)\r\n                            {\r\n                                Items[currentPosition].NotifyOfPropertyChange(() => Items[currentPosition].Self);\r\n                                Items[currentPosition].NotifyOfPropertyChange(() => Items[currentPosition].UnreadCount);\r\n                                return;\r\n                            }\r\n                            Items.Remove(e.Dialog);\r\n                            Items.Insert(newPosition - 1, e.Dialog);\r\n                        }\r\n                        else\r\n                        {\r\n                            Items.Remove(e.Dialog);\r\n                            Items.Insert(newPosition, e.Dialog);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        // удалили сообщение и диалог должен переместиться ниже загруженной части списка\r\n                        if (!IsLastSliceLoaded\r\n                            && Items.Count > 0\r\n                            && Items[Items.Count - 1].GetDateIndex() > e.Dialog.GetDateIndex())\r\n                        {\r\n                            Items.Remove(e.Dialog);\r\n                        }\r\n\r\n                        Items[currentPosition].NotifyOfPropertyChange(() => Items[currentPosition].Self);\r\n                        Items[currentPosition].NotifyOfPropertyChange(() => Items[currentPosition].UnreadCount);\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    throw ex;\r\n                }\r\n            });\r\n        }\r\n\r\n\r\n\r\n        public void Handle(DialogAddedEventArgs eventArgs)\r\n        {\r\n            OnDialogAdded(this, eventArgs);\r\n        }\r\n\r\n        private void OnDialogAdded(object sender, DialogAddedEventArgs e)\r\n        {\r\n            var dialog = e.Dialog;\r\n            if (dialog == null) return;\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var index = -1;\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (Items[i] == e.Dialog)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    if (Items[i].GetDateIndex() < dialog.GetDateIndex())\r\n                    {\r\n                        index = i;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (e.Dialog.Peer is TLPeerChannel)\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (e.Dialog.Peer.GetType() == Items[i].Peer.GetType()\r\n                            && e.Dialog.Peer.Id.Value == Items[i].Peer.Id.Value)\r\n                        {\r\n                            Items.RemoveAt(i);\r\n                            Execute.ShowDebugMessage(\"OnDialogAdded RemoveAt=\" + i);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (index == -1)\r\n                {\r\n                    Items.Add(dialog);\r\n                }\r\n                else\r\n                {\r\n                    Items.Insert(index, dialog);\r\n                }\r\n                Status = Items.Count == 0 || LazyItems.Count == 0 ? string.Empty : Status;\r\n            });\r\n        }\r\n\r\n        public void Handle(DialogRemovedEventArgs args)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                if (args.Dialog.Peer is TLPeerChannel)\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (args.Dialog.Peer.GetType() == Items[i].Peer.GetType()\r\n                            && args.Dialog.Peer.Id.Value == Items[i].Peer.Id.Value)\r\n                        {\r\n                            Items.RemoveAt(i);\r\n                            break;\r\n                        }\r\n                    }\r\n                    return;\r\n                }\r\n\r\n                var dialog = Items.FirstOrDefault(x => x.Index == args.Dialog.Index);\r\n\r\n                if (dialog != null)\r\n                {\r\n                    Items.Remove(dialog);\r\n                }\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/ChooseParticipantsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class ChooseParticipantsViewModel : ItemsViewModelBase<TLUserBase>\r\n    {\r\n        public string Text { get; set; }\r\n\r\n        private SearchUsersRequest _lastSearchRequest;\r\n\r\n        private List<TLUserBase> _source;\r\n\r\n        private readonly LRUCache<string, SearchUsersRequest> _searchResultsCache = new LRUCache<string, SearchUsersRequest>(Constants.MaxCacheCapacity);\r\n\r\n        private volatile bool _isFullResults;\r\n\r\n        public TLUserBase CurrentUser { get; protected set; }\r\n\r\n        public ChooseParticipantsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Items = new ObservableCollection<TLUserBase>();\r\n            Status = AppResources.Loading;\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                if (_source == null)\r\n                {\r\n                    var source= new List<TLUserBase>();\r\n                    var contacts = CacheService.GetContacts().OrderBy(x => x.FullName);\r\n                    foreach (var contact in contacts)\r\n                    {\r\n                        if (contact is TLUserEmpty)\r\n                        {\r\n                            continue;\r\n                        }\r\n                        var user = contact as TLUser;\r\n                        if (user != null && user.IsSelf)\r\n                        {\r\n                            CurrentUser = user;\r\n                            //continue;\r\n                        }\r\n\r\n                       source.Add(contact);\r\n                    }\r\n\r\n                    _source = source;\r\n                }\r\n\r\n                Status = string.Empty;\r\n                NotifyOfPropertyChange(() => CurrentUser);\r\n\r\n                var count = 0;\r\n                const int firstSliceCount = 10;\r\n                var secondSlice = new List<TLUserBase>();\r\n                foreach (var contact in _source)\r\n                {\r\n                    if (count < firstSliceCount)\r\n                    {\r\n                        LazyItems.Add(contact);\r\n                    }\r\n                    else\r\n                    {\r\n                        secondSlice.Add(contact);\r\n                    }\r\n                    count++;\r\n                }\r\n\r\n                if (Items.Count == 0 && LazyItems.Count == 0)\r\n                {\r\n                    Status = AppResources.NoUsersHere;\r\n                }\r\n\r\n                BeginOnUIThread(() => PopulateItems(() =>\r\n                {\r\n                    _isFullResults = true;\r\n                    foreach (var item in secondSlice)\r\n                    {\r\n                        Items.Add(item);\r\n                    }\r\n                }));\r\n            });\r\n        }\r\n\r\n        #region Action\r\n        public void UserAction(TLUserBase user)\r\n        {\r\n            OpenUserChat(user);\r\n        }\r\n\r\n        public void OpenUserChat(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            StateService.RemoveBackEntry = true;\r\n            StateService.With = user;\r\n            StateService.AnimateTitle = true;\r\n            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n        }\r\n\r\n        public void NewGroup()\r\n        {\r\n            StateService.RemoveBackEntry = true;\r\n            NavigationService.UriFor<CreateDialogViewModel>().Navigate();\r\n        }\r\n\r\n        public void NewSecretChat()\r\n        {\r\n            StateService.RemoveBackEntry = true;\r\n            NavigationService.UriFor<AddSecretChatParticipantViewModel>().Navigate();\r\n        }\r\n\r\n        public void NewBroadcastList()\r\n        {\r\n            StateService.RemoveBackEntry = true;\r\n            NavigationService.UriFor<CreateBroadcastViewModel>().Navigate();\r\n        }\r\n\r\n        public void NewChannel()\r\n        {\r\n            ChannelIntroViewModel.CheckIntroEnabledAsync(\r\n                enabled => BeginOnUIThread(() =>\r\n                {\r\n                    if (enabled)\r\n                    {\r\n                        StateService.RemoveBackEntry = true;\r\n                        NavigationService.UriFor<ChannelIntroViewModel>().Navigate();\r\n                    }\r\n                    else\r\n                    {\r\n                        StateService.RemoveBackEntry = true;\r\n                        NavigationService.UriFor<CreateChannelStep1ViewModel>().Navigate();\r\n                    }\r\n                }));\r\n        }\r\n        #endregion\r\n\r\n        public void Search()\r\n        {\r\n            if (_lastSearchRequest != null)\r\n            {\r\n                _lastSearchRequest.Cancel();\r\n            }\r\n\r\n            var text = Text.Trim();\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                if (_isFullResults) return;\r\n\r\n                LazyItems.Clear();               \r\n                Items.Clear();\r\n\r\n                foreach (var contact in _source)\r\n                {\r\n                    Items.Add(contact);\r\n                }\r\n\r\n                _isFullResults = true;\r\n\r\n                return;\r\n            }\r\n\r\n            var nextSearchRequest = CreateSearchRequest(text);\r\n\r\n            _isFullResults = false;\r\n            IsWorking = true;\r\n            nextSearchRequest.ProcessAsync(results =>\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (nextSearchRequest.IsCanceled) return;\r\n\r\n                    Items.Clear();\r\n                    LazyItems.Clear();\r\n\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        if (i < 6)\r\n                        {\r\n                            Items.Add(results[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            LazyItems.Add(results[i]);\r\n                        }\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n\r\n                    PopulateItems();\r\n                }));\r\n\r\n            _searchResultsCache[nextSearchRequest.Text] = nextSearchRequest;\r\n            _lastSearchRequest = nextSearchRequest;\r\n        }\r\n\r\n        private SearchUsersRequest CreateSearchRequest(string text)\r\n        {\r\n            SearchUsersRequest request;\r\n            if (!_searchResultsCache.TryGetValue(text, out request))\r\n            {\r\n                IList<TLUserBase> source;\r\n\r\n                if (_lastSearchRequest != null\r\n                    && text.IndexOf(_lastSearchRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    source = _lastSearchRequest.Source;\r\n                }\r\n                else\r\n                {\r\n                    _source = _source ??\r\n                              CacheService.GetContacts()\r\n                                  .Where(x => !(x is TLUserEmpty) && x.Index != StateService.CurrentUserId)\r\n                                  .OrderBy(x => x.FullName)\r\n                                  .ToList();\r\n\r\n                    source = _source;\r\n                }\r\n\r\n                request = new SearchUsersRequest(text, source);\r\n            }\r\n            return request;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/CommandHintsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.ObjectModel;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class CommandHintsViewModel\r\n    {\r\n        public ObservableCollection<TLBotCommand> Hints { get; protected set; }\r\n\r\n        private readonly TLObject _with;\r\n\r\n        public CommandHintsViewModel(TLObject with)\r\n        {\r\n            _with = with;\r\n\r\n            Hints = new ObservableCollection<TLBotCommand>();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/CreateBroadcastViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class CreateBroadcastViewModel : CreateDialogViewModel\r\n    {\r\n        public CreateBroadcastViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n\r\n        }\r\n\r\n        public override void Create()\r\n        {\r\n            if (string.IsNullOrEmpty(Title))\r\n            {\r\n                MessageBox.Show(AppResources.PleaseEnterGroupSubject, AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            var participants = new TLVector<TLInputUserBase>();\r\n            foreach (var item in SelectedUsers)\r\n            {\r\n                participants.Add(item.ToInputUser());\r\n            }\r\n\r\n            if (participants.Count == 0)\r\n            {\r\n                MessageBox.Show(AppResources.PleaseChooseAtLeastOneParticipant, AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            var broadcastChat = new TLBroadcastChat\r\n            {\r\n                Id = TLInt.Random(),\r\n                Photo = new TLChatPhotoEmpty(),\r\n                Title = new TLString(Title),\r\n                ParticipantIds = new TLVector<TLInt> { Items = SelectedUsers.Select(x => x.Id).ToList() }\r\n            };\r\n\r\n            CacheService.SyncBroadcast(broadcastChat, result =>\r\n            {\r\n                var broadcastPeer = new TLPeerBroadcast {Id = broadcastChat.Id};\r\n                var serviceMessage = new TLMessageService17\r\n                {\r\n                    FromId = new TLInt(StateService.CurrentUserId),\r\n                    ToId = broadcastPeer,\r\n                    Status = MessageStatus.Confirmed,\r\n                    Out = new TLBool { Value = true },\r\n                    Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                    //IsAnimated = true,\r\n                    RandomId = TLLong.Random(),\r\n                    Action = new TLMessageActionChatCreate\r\n                    {\r\n                        Title = broadcastChat.Title,\r\n                        Users = broadcastChat.ParticipantIds\r\n                    }\r\n                };\r\n                serviceMessage.SetUnread(new TLBool(false));\r\n\r\n                CacheService.SyncMessage(serviceMessage, \r\n                    message =>\r\n                    {\r\n                        StateService.With = broadcastChat;\r\n                        StateService.RemoveBackEntry = true;\r\n                        NavigationService.UriFor<DialogDetailsViewModel>().Navigate(); \r\n                    });\r\n  \r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/CreateChannelStep1ViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.ServiceModel.Description;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class CreateChannelStep1ViewModel : CreateDialogViewModel, Telegram.Api.Aggregator.IHandle<UploadableItem>\r\n    {\r\n        private string _about;\r\n\r\n        public string About\r\n        {\r\n            get { return _about; }\r\n            set { SetField(ref _about, value, () => About); }\r\n        }\r\n\r\n        public string PlaceholderText\r\n        {\r\n            get { return PlaceholderDefaultTextConverter.GetText(new TLChannel68 {Title = new TLString(Title)}); }\r\n        }\r\n\r\n        public TLPhotoBase Photo { get; set; }\r\n\r\n        private readonly IUploadFileManager _uploadManager;\r\n\r\n        public CreateChannelStep1ViewModel(IUploadFileManager uploadManager, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            _uploadManager = uploadManager;\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Title))\r\n                {\r\n                    NotifyOfPropertyChange(() => PlaceholderText);\r\n                    NotifyOfPropertyChange(() => CanCreateChannel);\r\n                }\r\n            };\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n        }\r\n\r\n        private bool _uploadingPhoto;\r\n\r\n        public void SetChannelPhoto()\r\n        {\r\n            EditChatActions.EditPhoto(photo =>\r\n            {\r\n                var volumeId = TLLong.Random();\r\n                var localId = TLInt.Random();\r\n                var secret = TLLong.Random();\r\n\r\n                var fileLocation = new TLFileLocation\r\n                {\r\n                    VolumeId = volumeId,\r\n                    LocalId = localId,\r\n                    Secret = secret,\r\n                    DCId = new TLInt(0),\r\n                    //Buffer = p.Bytes\r\n                };\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                    fileLocation.VolumeId,\r\n                    fileLocation.LocalId,\r\n                    fileLocation.Secret);\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    using (var fileStream = store.CreateFile(fileName))\r\n                    {\r\n                        fileStream.Write(photo, 0, photo.Length);\r\n                    }\r\n                }\r\n\r\n                Photo = new TLChatPhoto\r\n                {\r\n                    PhotoSmall = new TLFileLocation\r\n                    {\r\n                        DCId = fileLocation.DCId,\r\n                        VolumeId = fileLocation.VolumeId,\r\n                        LocalId = fileLocation.LocalId,\r\n                        Secret = fileLocation.Secret\r\n                    },\r\n                    PhotoBig = new TLFileLocation\r\n                    {\r\n                        DCId = fileLocation.DCId,\r\n                        VolumeId = fileLocation.VolumeId,\r\n                        LocalId = fileLocation.LocalId,\r\n                        Secret = fileLocation.Secret\r\n                    }\r\n                };\r\n                NotifyOfPropertyChange(() => Photo);\r\n\r\n                _uploadingPhoto = true;\r\n\r\n                var fileId = TLLong.Random();\r\n                _uploadManager.UploadFile(fileId, new TLChannel68(), photo);\r\n            });\r\n        }\r\n\r\n        public bool CanCreateChannel\r\n        {\r\n            get { return !IsWorking && !string.IsNullOrEmpty(Title); }\r\n        }\r\n\r\n        public void Next()\r\n        {\r\n            if (!CanCreateChannel) return;\r\n\r\n            IsWorking = true;\r\n            NotifyOfPropertyChange(() => CanCreateChannel);\r\n\r\n            // 1 broadcast\r\n            // 2 mega group\r\n            MTProtoService.CreateChannelAsync(new TLInt(1), new TLString(Title), new TLString(About),\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var updates = result as TLUpdates;\r\n                    if (updates != null)\r\n                    {\r\n                        var channel = updates.Chats.FirstOrDefault() as TLChannel;\r\n                        if (channel != null)\r\n                        {\r\n                            if (_photo != null)\r\n                            {\r\n                                ContinueUploadingPhoto(channel);\r\n                            }\r\n                            else\r\n                            {\r\n                                if (_uploadingPhoto)\r\n                                {\r\n                                    _uploadingCallback = () => ContinueUploadingPhoto(channel);\r\n                                }\r\n                                else\r\n                                {\r\n                                    ContinueNextStep(channel);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false; \r\n                    NotifyOfPropertyChange(() => CanCreateChannel);\r\n\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (error.TypeEquals(ErrorType.CHANNELS_TOO_MUCH))\r\n                        {\r\n                            MessageBox.Show(AppResources.ChannelsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                    }\r\n\r\n                    Execute.ShowDebugMessage(\"channels.createChannel error \" + error);\r\n                }));\r\n        }\r\n\r\n        private void ContinueUploadingPhoto(TLChannel channel)\r\n        {\r\n            if (_photo != null)\r\n            {\r\n                MTProtoService.EditPhotoAsync(channel, new TLInputChatUploadedPhoto56 { File = _photo },\r\n                    result2 => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        var updates2 = result2 as TLUpdates;\r\n                        if (updates2 != null)\r\n                        {\r\n                            channel = updates2.Chats.FirstOrDefault() as TLChannel;\r\n                            if (channel != null)\r\n                            {\r\n                                ContinueNextStep(channel);\r\n                            }\r\n                        }\r\n                    }),\r\n                    error2 => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        NotifyOfPropertyChange(() => CanCreateChannel);\r\n\r\n                        Execute.ShowDebugMessage(\"channels.editPhoto error \" + error2);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        private void ContinueNextStep(TLChannel channel)\r\n        {\r\n            IsWorking = false;\r\n            NotifyOfPropertyChange(() => CanCreateChannel);\r\n\r\n            StateService.NewChannel = channel;\r\n            StateService.RemoveBackEntry = true;\r\n            NavigationService.UriFor<CreateChannelStep2ViewModel>().Navigate();\r\n        }\r\n\r\n        public void ShowChannelHint()\r\n        {\r\n            MessageBox.Show(AppResources.WhatIsChannelDescription, AppResources.AppName, MessageBoxButton.OK);\r\n        }\r\n\r\n        private TLInputFile _photo;\r\n\r\n        private System.Action _uploadingCallback;\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n            if (item.Owner is TLChannel)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    _uploadingPhoto = false;\r\n\r\n                    _photo = new TLInputFile\r\n                    {\r\n                        Id = item.FileId,\r\n                        MD5Checksum = new TLString(MD5Core.GetHashString(item.Bytes).ToLowerInvariant()),\r\n                        Name = new TLString(Guid.NewGuid() + \".jpg\"),\r\n                        Parts = new TLInt(item.Parts.Count)\r\n                    };\r\n\r\n                    _uploadingCallback.SafeInvoke();\r\n                });\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/CreateChannelStep2ViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views.Chats;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class CreateChannelStep2ViewModel : CreateDialogViewModel\r\n    {\r\n        public ObservableCollection<TLChatBase> AdminedPublicChannels { get; set; }\r\n\r\n        private bool _tooMuchUsernames;\r\n\r\n        public bool TooMuchUsernames\r\n        {\r\n            get { return _tooMuchUsernames; }\r\n            set { SetField(ref _tooMuchUsernames, value, () => TooMuchUsernames); }\r\n        }\r\n\r\n        private bool _isPublic = true;\r\n\r\n        public bool IsPublic\r\n        {\r\n            get { return _isPublic; }\r\n            set\r\n            {\r\n                SetField(ref _isPublic, value, () => IsPublic);\r\n                NotifyOfPropertyChange(() => ChannelTypeDescription);\r\n                NotifyOfPropertyChange(() => ChannelLinkDescription);\r\n            }\r\n        }\r\n\r\n        public string ChannelTypeDescription\r\n        {\r\n            get { return IsPublic ? AppResources.PublicChannelDescription : AppResources.PrivateChannelDescription; }\r\n        }\r\n\r\n        private string _userName;\r\n\r\n        public string UserName\r\n        {\r\n            get { return _userName; }\r\n            set { SetField(ref _userName, value, () => UserName); }\r\n        }\r\n\r\n        private bool _isUsernameAvailable;\r\n\r\n        public bool IsUsernameAvailable\r\n        {\r\n            get { return _isUsernameAvailable; }\r\n            set { SetField(ref _isUsernameAvailable, value, () => IsUsernameAvailable); }\r\n        }\r\n\r\n        private string _usernameAvailableString;\r\n\r\n        public string UsernameAvailableString\r\n        {\r\n            get { return _usernameAvailableString; }\r\n            set { SetField(ref _usernameAvailableString, value, () => UsernameAvailableString); }\r\n        }\r\n\r\n        private bool _hasError;\r\n\r\n        public bool HasError\r\n        {\r\n            get { return _hasError; }\r\n            set\r\n            {\r\n                SetField(ref _hasError, value, () => HasError);\r\n                if (value)\r\n                {\r\n                    IsUsernameAvailable = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        private string _error = \" \";\r\n\r\n        public string Error\r\n        {\r\n            get { return _error; }\r\n            set { SetField(ref _error, value, () => Error); }\r\n        }\r\n\r\n        public string ChannelLinkDescription\r\n        {\r\n            get { return IsPublic ? AppResources.PublicLinkDescription : AppResources.PrivateLinkDescription; }\r\n        }\r\n\r\n        public TLExportedChatInvite Invite { get; set; }\r\n\r\n\r\n        private string _inviteLink;\r\n\r\n        public string InviteLink\r\n        {\r\n            get { return _inviteLink; }\r\n            set { SetField(ref _inviteLink, value, () => InviteLink); }\r\n        }\r\n\r\n        private readonly TLChannel _newChannel;\r\n\r\n        public CreateChannelStep2ViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            AdminedPublicChannels = new ObservableCollection<TLChatBase>();\r\n\r\n            InviteLink = AppResources.Loading;\r\n\r\n            _newChannel = StateService.NewChannel;\r\n            StateService.NewChannel = null;\r\n\r\n            MTProtoService.CheckUsernameAsync(new TLInputChannelEmpty(), new TLString(\"username\"),\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    TooMuchUsernames = false;\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    if (TLRPCError.TypeEquals(error, ErrorType.CHANNELS_ADMIN_PUBLIC_TOO_MUCH))\r\n                    {\r\n                        HasError = true;\r\n                        Error = AppResources.ChannelsAdminPublicTooMuchShort;\r\n                        TooMuchUsernames = true;\r\n                        GetAdminedPublichChannelsAsync();\r\n                    }\r\n                }));\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => IsPublic))\r\n                {\r\n                    if (!IsPublic && Invite == null)\r\n                    {\r\n                        ExportInvite();\r\n                    }\r\n                }\r\n                else if (Property.NameEquals(args.PropertyName, () => UserName))\r\n                {\r\n                    var userName = UserName;\r\n                    BeginOnUIThread(TimeSpan.FromSeconds(0.3), () =>\r\n                    {\r\n                        if (string.Equals(userName, UserName))\r\n                        {\r\n                            Check();\r\n                        }\r\n                    });\r\n                }\r\n            };\r\n        }\r\n\r\n        private void GetAdminedPublichChannelsAsync()\r\n        {\r\n            if (AdminedPublicChannels.Count > 0) return;\r\n\r\n            MTProtoService.GetAdminedPublicChannelsAsync(\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    AdminedPublicChannels.Clear();\r\n                    foreach (var chat in result.Chats)\r\n                    {\r\n                        AdminedPublicChannels.Add(chat);\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"channels.getAdminedPublicChannels error \" + error);\r\n                }));\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n        }\r\n\r\n        private static bool IsValidSymbol(char symbol)\r\n        {\r\n            if ((symbol >= 'a' && symbol <= 'z')\r\n                || (symbol >= 'A' && symbol <= 'Z')\r\n                || (symbol >= '0' && symbol <= '9')\r\n                || symbol == '_')\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public void Check()\r\n        {\r\n            var checkedUsername = UserName;\r\n\r\n            var username = UserName;\r\n            if (username != null\r\n                && username.StartsWith(\"@\"))\r\n            {\r\n                username = username.Substring(1, username.Length - 1);\r\n            }\r\n\r\n            if (string.IsNullOrEmpty(username))\r\n            {\r\n                HasError = false;\r\n                IsUsernameAvailable = false;\r\n                //Error = string.Empty;\r\n                return;\r\n            }\r\n\r\n            var isValidSymbols = username.All(IsValidSymbol);\r\n            if (!isValidSymbols)\r\n            {\r\n                HasError = true;\r\n                Error = AppResources.ChannelNameInvalid;\r\n                return;\r\n            }\r\n\r\n            if (username[0] >= '0' && username[0] <= '9')\r\n            {\r\n                HasError = true;\r\n                Error = AppResources.ChannelNameStartsWithNumber;\r\n                return;\r\n            }\r\n\r\n            if (username.Length < Constants.UsernameMinLength)\r\n            {\r\n                HasError = true;\r\n                Error = AppResources.ChannelNameShort;\r\n                return;\r\n            }\r\n\r\n            HasError = false;\r\n            IsUsernameAvailable = false;\r\n\r\n            MTProtoService.CheckUsernameAsync(_newChannel.ToInputChannel(), new TLString(username),\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    HasError = !result.Value;\r\n                    if (HasError)\r\n                    {\r\n                        Error = AppResources.ChannelNameOccupied;\r\n                    }\r\n\r\n                    if (string.Equals(checkedUsername, UserName) && result.Value)\r\n                    {\r\n                        IsUsernameAvailable = true;\r\n                        UsernameAvailableString = string.Format(AppResources.NameIsAvailable, checkedUsername);\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    HasError = true;\r\n                    if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                    {\r\n                        Error = AppResources.FloodWaitString;\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                    {\r\n                        var messageBuilder = new StringBuilder();\r\n                        messageBuilder.AppendLine(AppResources.ServerErrorMessage);\r\n                        messageBuilder.AppendLine();\r\n                        messageBuilder.AppendLine(\"Method: channels.checkUsername\");\r\n                        messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                        Error = AppResources.ServerError;\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_INVALID))\r\n                        {\r\n                            Error = AppResources.ChannelNameInvalid;\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_OCCUPIED))\r\n                        {\r\n                            Error = AppResources.ChannelNameOccupied;\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.CHANNELS_ADMIN_PUBLIC_TOO_MUCH))\r\n                        {\r\n                            MessageBox.Show(AppResources.ChannelsAdminPublicTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n\r\n                            Error = AppResources.ChannelsAdminPublicTooMuchShort;\r\n                            TooMuchUsernames = true;\r\n                            GetAdminedPublichChannelsAsync();\r\n                        }\r\n                        else\r\n                        {\r\n                            Error = error.ToString();\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Error = string.Empty;\r\n                        Execute.ShowDebugMessage(\"channels.checkUsername error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void RevokeLink(TLChatBase chat)\r\n        {\r\n            var channel = chat as TLChannel;\r\n            if (channel == null) return;\r\n\r\n            var richTextBox = new RichTextBox { TextWrapping = TextWrapping.Wrap };\r\n            ConvertToSupergroupView.SetFormattedText(richTextBox, string.Format(AppResources.RevokeLinkConfirmation2, \"t.me/\" + channel.UserName, channel.FullName));\r\n#if WP8\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n            if (isFullHD)\r\n            {\r\n                richTextBox.FontSize = 17.667;\r\n            }\r\n#endif\r\n            ShellViewModel.ShowCustomMessageBox(null, AppResources.RevokeLink,\r\n                AppResources.Cancel.ToLowerInvariant(), AppResources.Revoke.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.LeftButton)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.UpdateUsernameAsync(channel.ToInputChannel(), TLString.Empty,\r\n                            user => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n\r\n                                channel.UserName = TLString.Empty;\r\n                                channel.NotifyOfPropertyChange(() => channel.UserName);\r\n\r\n                                TooMuchUsernames = false;\r\n                                HasError = false;\r\n                                Error = string.Empty;\r\n                                Check();\r\n                            }),\r\n                            error => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                                {\r\n                                    //HasError = true;\r\n                                    //Error = AppResources.FloodWaitString;\r\n                                    MessageBox.Show(AppResources.FloodWaitString, AppResources.Error, MessageBoxButton.OK);\r\n                                }\r\n                                else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                                {\r\n                                    var messageBuilder = new StringBuilder();\r\n                                    messageBuilder.AppendLine(AppResources.ServerErrorMessage);\r\n                                    messageBuilder.AppendLine();\r\n                                    messageBuilder.AppendLine(\"Method: channels.updateUsername\");\r\n                                    messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                                    //HasError = true;\r\n                                    //Error = AppResources.ServerError;\r\n                                    MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK);\r\n                                }\r\n                                else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                                {\r\n                                    if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_NOT_MODIFIED))\r\n                                    {\r\n                                        channel.UserName = TLString.Empty;\r\n                                        channel.NotifyOfPropertyChange(() => channel.UserName);\r\n\r\n                                        HasError = false;\r\n                                        Error = string.Empty;\r\n                                        Check();\r\n                                        return;\r\n                                    }\r\n                                    else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_INVALID))\r\n                                    {\r\n                                        //HasError = true;\r\n                                        //Error = AppResources.ChannelNameInvalid;\r\n                                        MessageBox.Show(AppResources.ChannelNameInvalid, AppResources.Error, MessageBoxButton.OK);\r\n                                    }\r\n                                    else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_OCCUPIED))\r\n                                    {\r\n                                        //HasError = true;\r\n                                        //Error = AppResources.ChannelNameInvalid;\r\n                                        MessageBox.Show(AppResources.ChannelNameOccupied, AppResources.Error, MessageBoxButton.OK);\r\n                                    }\r\n                                    else if (TLRPCError.TypeEquals(error, ErrorType.CHANNELS_ADMIN_PUBLIC_TOO_MUCH))\r\n                                    {\r\n                                        //HasError = true;\r\n                                        //Error = AppResources.ChannelsAdminPublicTooMuchShort;\r\n                                        MessageBox.Show(AppResources.ChannelsAdminPublicTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        //HasError = true;\r\n                                        //Error = error.ToString();\r\n                                        Execute.ShowDebugMessage(\"channels.updateUsername error \" + error);\r\n                                    }\r\n                                }\r\n                                else\r\n                                {\r\n                                    //HasError = true;\r\n                                    //Error = string.Empty;\r\n                                    Execute.ShowDebugMessage(\"channels.updateUsername error \" + error);\r\n                                }\r\n                            }));\r\n                    }\r\n                },\r\n                richTextBox);\r\n        }\r\n\r\n        private void ExportInvite()\r\n        {\r\n            if (IsWorking) return;\r\n            if (Invite != null) return;\r\n            if (_newChannel.ExportedInvite is TLChatInviteExported) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.ExportInviteAsync(_newChannel.ToInputChannel(),\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    _newChannel.ExportedInvite = result;\r\n\r\n                    IsWorking = false;\r\n                    Invite = result;\r\n                    var inviteExported = Invite as TLChatInviteExported;\r\n                    if (inviteExported != null)\r\n                    {\r\n                        if (!TLString.IsNullOrEmpty(inviteExported.Link))\r\n                        {\r\n                            InviteLink = inviteExported.Link.ToString();\r\n                        }\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"channels.exportInvite error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void CopyInvite()\r\n        {\r\n            var inviteExported = Invite as TLChatInviteExported;\r\n            if (inviteExported != null)\r\n            {\r\n                if (!TLString.IsNullOrEmpty(inviteExported.Link))\r\n                {\r\n                    Clipboard.SetText(inviteExported.Link.ToString());\r\n                }\r\n            }\r\n        }\r\n\r\n        public event EventHandler EmptyUserName;\r\n\r\n        protected virtual void RaiseEmptyUserName()\r\n        {\r\n            var handler = EmptyUserName;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            var username = IsPublic ? UserName : string.Empty;\r\n            if (username != null\r\n                && username.StartsWith(\"@\"))\r\n            {\r\n                username = username.Substring(1, username.Length - 1);\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.UpdateUsernameAsync(_newChannel.ToInputChannel(), new TLString(username),\r\n                user => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    //CacheService.SyncUser(user, result => EventAggregator.Publish(new UserNameChangedEventArgs(result)));\r\n\r\n                    IsWorking = false;\r\n\r\n                    _newChannel.UserName = new TLString(UserName);\r\n\r\n                    StateService.NewChannel = _newChannel;\r\n                    StateService.RemoveBackEntry = true;\r\n                    NavigationService.UriFor<CreateChannelStep3ViewModel>().Navigate();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                    {\r\n                        HasError = true;\r\n                        Error = AppResources.FloodWaitString;\r\n                        MessageBox.Show(AppResources.FloodWaitString, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.INTERNAL))\r\n                    {\r\n                        var messageBuilder = new StringBuilder();\r\n                        messageBuilder.AppendLine(AppResources.ServerErrorMessage);\r\n                        messageBuilder.AppendLine();\r\n                        messageBuilder.AppendLine(\"Method: channels.updateUsername\");\r\n                        messageBuilder.AppendLine(\"Result: \" + error);\r\n\r\n                        HasError = true;\r\n                        Error = AppResources.ServerError;\r\n                        MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK);\r\n                    }\r\n                    else if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_INVALID))\r\n                        {\r\n                            HasError = true;\r\n                            Error = AppResources.ChannelNameInvalid;\r\n                            MessageBox.Show(AppResources.ChannelNameInvalid, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.USERNAME_OCCUPIED))\r\n                        {\r\n                            HasError = true;\r\n                            Error = AppResources.ChannelNameOccupied;\r\n                            MessageBox.Show(AppResources.ChannelNameOccupied, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (TLRPCError.TypeEquals(error, ErrorType.CHANNELS_ADMIN_PUBLIC_TOO_MUCH))\r\n                        {\r\n                            HasError = true;\r\n                            Error = AppResources.ChannelsAdminPublicTooMuchShort;\r\n                            MessageBox.Show(AppResources.ChannelsAdminPublicTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else\r\n                        {\r\n                            HasError = true;\r\n                            Error = error.ToString();\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        HasError = true;\r\n                        Error = string.Empty;\r\n                        Execute.ShowDebugMessage(\"channels.updateUsername error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void Next()\r\n        {\r\n            if (IsPublic)\r\n            {\r\n                if (string.IsNullOrEmpty(UserName))\r\n                {\r\n                    MessageBox.Show(AppResources.ChoosePublicChannelLinkNotification);\r\n\r\n                    RaiseEmptyUserName();\r\n\r\n                    return;\r\n                }\r\n\r\n                Done();\r\n\r\n                return;\r\n            }\r\n\r\n            StateService.NewChannel = _newChannel;\r\n            NavigationService.UriFor<CreateChannelStep3ViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/CreateChannelStep3ViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class CreateChannelStep3ViewModel : CreateDialogViewModel\r\n    {\r\n        private readonly TLChannel _newChannel;\r\n\r\n        public CreateChannelStep3ViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            GroupedUsers = new ObservableCollection<TLUserBase>();\r\n\r\n            _newChannel = StateService.NewChannel;\r\n            StateService.NewChannel = null;\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n        }\r\n\r\n        public override void Create()\r\n        {\r\n            if (IsWorking) return;\r\n            if (_newChannel == null) return;\r\n\r\n            var participants = new TLVector<TLInputUserBase>();\r\n            foreach (var item in SelectedUsers)\r\n            {\r\n                participants.Add(item.ToInputUser());\r\n            }\r\n            participants.Add(new TLInputUser { UserId = new TLInt(StateService.CurrentUserId), AccessHash = new TLLong(0) });\r\n\r\n            if (participants.Count == 0)\r\n            {\r\n                MessageBox.Show(AppResources.PleaseChooseAtLeastOneParticipant, AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            _newChannel.ParticipantIds = new TLVector<TLInt> { Items = SelectedUsers.Select(x => x.Id).ToList() };\r\n\r\n            IsWorking = true;\r\n            MTProtoService.InviteToChannelAsync(_newChannel.ToInputChannel(), participants,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    StateService.With = _newChannel;\r\n                    StateService.RemoveBackEntries = true;\r\n                    NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                    {\r\n                        //MessageBox.Show(AppResources.PeerFloodAddContact, AppResources.Error, MessageBoxButton.OK);\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodAddContact, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                            result =>\r\n                            {\r\n                                if (result == CustomMessageBoxResult.RightButton)\r\n                                {\r\n                                    TelegramViewBase.NavigateToUsername(MTProtoService, Constants.SpambotUsername, null, null, null);\r\n                                }\r\n                            });\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.USERS_TOO_MUCH))\r\n                    {\r\n                        MessageBox.Show(AppResources.UsersTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.USER_CHANNELS_TOO_MUCH))\r\n                    {\r\n                        MessageBox.Show(AppResources.UserChannelsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.BOTS_TOO_MUCH))\r\n                    {\r\n                        MessageBox.Show(AppResources.BotsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.USER_NOT_MUTUAL_CONTACT))\r\n                    {\r\n                        MessageBox.Show(AppResources.UserNotMutualContact, AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"channels.inviteToChannel error \" + error);\r\n                }));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/CreateChannelViewModel.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Search;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class CreateChannelViewModel : CreateDialogViewModel\r\n    {\r\n        private string _about;\r\n\r\n        public string About\r\n        {\r\n            get { return _about; }\r\n            set { SetField(ref _about, value, () => About); }\r\n        }\r\n\r\n        private string _link;\r\n\r\n        public string Link\r\n        {\r\n            get { return _link; }\r\n            set { SetField(ref _link, value, () => Link); }\r\n        }\r\n\r\n        public TLPhotoBase Photo { get; set; }\r\n\r\n        public CreateChannelViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            GroupedUsers = new ObservableCollection<TLUserBase>();\r\n            //GroupedUsers = new ObservableCollection<AlphaKeyGroup<TLUserBase>>();\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                //Thread.Sleep(300);\r\n                _source = _source ??\r\n                    CacheService.GetContacts()\r\n                    .Where(x => !(x is TLUserEmpty) && x.Index != StateService.CurrentUserId)\r\n                    .OrderBy(x => x.FullName)\r\n                    .ToList();\r\n\r\n                Status = string.Empty;\r\n                foreach (var contact in _source)\r\n                {\r\n                    contact._isSelected = false;\r\n                    LazyItems.Add(contact);\r\n                }\r\n\r\n                if (_source.Count == 0)\r\n                {\r\n                    Status = AppResources.NoUsersHere;\r\n                }\r\n\r\n                BeginOnUIThread(PopulateItems);\r\n                Thread.Sleep(500);\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var item in _source)\r\n                    {\r\n                        GroupedUsers.Add(item);\r\n                    }\r\n                });\r\n                //var groups = AlphaKeyGroup<TLUserBase>.CreateGroups(\r\n                //    _source,\r\n                //    Thread.CurrentThread.CurrentUICulture,\r\n                //    x => x.FullName,\r\n                //    false);\r\n\r\n                //foreach (var @group in groups)\r\n                //{\r\n                //    var gr = new AlphaKeyGroup<TLUserBase>(@group.Key);\r\n                //    foreach (var u in @group.OrderBy(x => x.FullName))\r\n                //    {\r\n                //        gr.Add(u);\r\n                //    }\r\n\r\n                //    BeginOnUIThread(() =>\r\n                //    {\r\n                //        GroupedUsers.Add(gr);\r\n                //    });\r\n                //}\r\n\r\n\r\n            });\r\n        }\r\n\r\n        public void ChoosePhoto()\r\n        {\r\n            EditChatActions.EditPhoto(photo =>\r\n            {\r\n                var volumeId = TLLong.Random();\r\n                var localId = TLInt.Random();\r\n                var secret = TLLong.Random();\r\n\r\n                var fileLocation = new TLFileLocation\r\n                {\r\n                    VolumeId = volumeId,\r\n                    LocalId = localId,\r\n                    Secret = secret,\r\n                    DCId = new TLInt(0),\r\n                    //Buffer = p.Bytes\r\n                };\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                    fileLocation.VolumeId,\r\n                    fileLocation.LocalId,\r\n                    fileLocation.Secret);\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    using (var fileStream = store.CreateFile(fileName))\r\n                    {\r\n                        fileStream.Write(photo, 0, photo.Length);\r\n                    }\r\n                }\r\n\r\n                Photo = new TLChatPhoto\r\n                {\r\n                    PhotoSmall = new TLFileLocation\r\n                    {\r\n                        DCId = fileLocation.DCId,\r\n                        VolumeId = fileLocation.VolumeId,\r\n                        LocalId = fileLocation.LocalId,\r\n                        Secret = fileLocation.Secret\r\n                    },\r\n                    PhotoBig = new TLFileLocation\r\n                    {\r\n                        DCId = fileLocation.DCId,\r\n                        VolumeId = fileLocation.VolumeId,\r\n                        LocalId = fileLocation.LocalId,\r\n                        Secret = fileLocation.Secret\r\n                    }\r\n                };\r\n                NotifyOfPropertyChange(() => Photo);\r\n            });\r\n        }\r\n\r\n        public override void Create()\r\n        {\r\n            if (string.IsNullOrEmpty(Title))\r\n            {\r\n                MessageBox.Show(AppResources.PleaseEnterGroupSubject, AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            var participants = new TLVector<TLInputUserBase>();\r\n            foreach (var item in SelectedUsers)\r\n            {\r\n                participants.Add(item.ToInputUser());\r\n            }\r\n            participants.Add(new TLInputUser { UserId = new TLInt(StateService.CurrentUserId), AccessHash = new TLLong(0) });\r\n\r\n            if (participants.Count == 0)\r\n            {\r\n                MessageBox.Show(AppResources.PleaseChooseAtLeastOneParticipant, AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            var broadcastChat = new TLChannel49\r\n            {\r\n                Flags = new TLInt(0),\r\n                Id = TLInt.Random(),\r\n                AccessHash = new TLLong(0),\r\n                Title = new TLString(Title),\r\n                Photo = Photo?? new TLChatPhotoEmpty(),\r\n                UserName = new TLString(Link),\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                Version = new TLInt(0),\r\n                About = new TLString(About),\r\n                ParticipantIds = new TLVector<TLInt> { Items = SelectedUsers.Select(x => x.Id).ToList() },\r\n            };\r\n\r\n            CacheService.SyncBroadcast(broadcastChat, result =>\r\n            {\r\n                var broadcastPeer = new TLPeerBroadcast { Id = broadcastChat.Id };\r\n                var serviceMessage = new TLMessageService17\r\n                {\r\n                    FromId = new TLInt(StateService.CurrentUserId),\r\n                    ToId = broadcastPeer,\r\n                    Status = MessageStatus.Confirmed,\r\n                    Out = TLBool.True,\r\n                    Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                    //IsAnimated = true,\r\n                    RandomId = TLLong.Random(),\r\n                    Action = new TLMessageActionChannelCreate\r\n                    {\r\n                        Title = broadcastChat.Title,\r\n                    }\r\n                };\r\n                serviceMessage.SetUnread(TLBool.False);\r\n\r\n                CacheService.SyncMessage(serviceMessage,\r\n                    message =>\r\n                    {\r\n                        StateService.With = broadcastChat;\r\n                        StateService.RemoveBackEntry = true;\r\n                        NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n                    });\r\n\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/CreateDialogViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class CreateDialogViewModel : ItemsViewModelBase<TLUserBase>\r\n    {\r\n        private string _title;\r\n\r\n        public string Title\r\n        {\r\n            get { return _title; }\r\n            set { SetField(ref _title, value, () => Title); }\r\n        }\r\n\r\n        private string _text;\r\n\r\n        public string Text\r\n        {\r\n            get { return _text; }\r\n            set { SetField(ref _text, value, () => Text); }\r\n        }\r\n\r\n        private readonly IList<TLUserBase> _selectedUsers = new ObservableCollection<TLUserBase>(); \r\n\r\n        public IList<TLUserBase> SelectedUsers\r\n        {\r\n            get { return _selectedUsers; }\r\n        }\r\n\r\n        private readonly Dictionary<int, TLUserBase> _selectedUsersCache = new Dictionary<int, TLUserBase>(); \r\n\r\n        private SearchUsersRequest _lastSearchRequest;\r\n\r\n        protected List<TLUserBase> _source;\r\n\r\n        private readonly Dictionary<string, SearchUsersRequest> _searchResultsCache = new Dictionary<string, SearchUsersRequest>();\r\n\r\n        private volatile bool _isFullResults;\r\n\r\n        private string _limitString;\r\n\r\n        public string LimitString\r\n        {\r\n            get { return _limitString; }\r\n            set { SetField(ref _limitString, value, () => LimitString); }\r\n        }\r\n\r\n        public ObservableCollection<TLUserBase> GroupedUsers { get; set; }\r\n\r\n\r\n        private TLInt _broadcastSizeMax;\r\n\r\n        public TLInt BroadcastSizeMax\r\n        {\r\n            get\r\n            {\r\n                if (_broadcastSizeMax == null)\r\n                {\r\n                    var config = CacheService.GetConfig();\r\n\r\n                    _broadcastSizeMax = config != null ? config.BroadcastSizeMax : new TLInt(5000);\r\n                }\r\n\r\n                return _broadcastSizeMax;\r\n            }\r\n        }\r\n\r\n        private TLInt _chatSizeMax;\r\n\r\n        public TLInt ChatSizeMax\r\n        {\r\n            get\r\n            {\r\n                if (_chatSizeMax == null)\r\n                {\r\n                    var config = CacheService.GetConfig();\r\n                    \r\n                    _chatSizeMax = config != null? config.ChatSizeMax : new TLInt(200);\r\n                }\r\n\r\n                return _chatSizeMax;\r\n            }\r\n        }\r\n\r\n        public CreateDialogViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            GroupedUsers = new ObservableCollection<TLUserBase>();\r\n            //GroupedUsers = new ObservableCollection<AlphaKeyGroup<TLUserBase>>();\r\n\r\n            UpdateLimitString();\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                //Thread.Sleep(300);\r\n                _source = _source ??\r\n                    CacheService.GetContacts()\r\n                    .Where(x => !(x is TLUserEmpty) && x.Index != StateService.CurrentUserId)\r\n                    .OrderBy(x => x.FullName)\r\n                    .ToList();\r\n\r\n                Status = string.Empty;\r\n\r\n                var count = 0;\r\n                const int firstSliceCount = 10;\r\n                var secondSlice = new List<TLUserBase>();\r\n                foreach (var contact in _source)\r\n                {\r\n                    contact._isSelected = false;\r\n                    if (count < firstSliceCount)\r\n                    {\r\n                        LazyItems.Add(contact);\r\n                    }\r\n                    else\r\n                    {\r\n                        secondSlice.Add(contact);\r\n                    }\r\n                    count++;\r\n                }\r\n\r\n                if (_source.Count == 0)\r\n                {\r\n                    Status = AppResources.NoUsersHere;\r\n                }\r\n\r\n\r\n                BeginOnUIThread(() => PopulateItems(() =>\r\n                {\r\n                    foreach (var item in secondSlice)\r\n                    {\r\n                        Items.Add(item);\r\n                    }\r\n                }));\r\n                Thread.Sleep(500);\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var item in _source)\r\n                    {\r\n                        GroupedUsers.Add(item);\r\n                    }\r\n                });\r\n                //var groups = AlphaKeyGroup<TLUserBase>.CreateGroups(\r\n                //    _source,\r\n                //    Thread.CurrentThread.CurrentUICulture,\r\n                //    x => x.FullName,\r\n                //    false);\r\n\r\n                //foreach (var @group in groups)\r\n                //{\r\n                //    var gr = new AlphaKeyGroup<TLUserBase>(@group.Key);\r\n                //    foreach (var u in @group.OrderBy(x => x.FullName))\r\n                //    {\r\n                //        gr.Add(u);\r\n                //    }\r\n\r\n                //    BeginOnUIThread(() =>\r\n                //    {\r\n                //        GroupedUsers.Add(gr);\r\n                //    });\r\n                //}\r\n\r\n                \r\n            });\r\n        }\r\n\r\n        private void UpdateLimitString()\r\n        {\r\n            LimitString = string.Format(\"({0}/{1})\", SelectedUsers.Count, BroadcastSizeMax);\r\n        }\r\n\r\n        public event EventHandler<ScrollToEventArgs> ScrollTo;\r\n\r\n        protected virtual void RaiseScrollTo(ScrollToEventArgs e)\r\n        {\r\n            var handler = ScrollTo;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public void ChooseContact(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            if (user.IsSelected)\r\n            {\r\n                OnContactUnchecked(user);\r\n            }\r\n            else\r\n            {\r\n                OnContactChecked(user);\r\n            }\r\n        }\r\n\r\n        public void OnContactChecked(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n            if (SelectedUsers.Count == ChatSizeMax.Value - 1)\r\n            {\r\n                MessageBox.Show(AppResources.ChatMaxSizeNotification, AppResources.AppName, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            user.IsSelected = true;\r\n            SelectedUsers.Add(user);\r\n            _selectedUsersCache[user.Index] = user;\r\n            NotifyOfPropertyChange(() => SelectedUsers);\r\n\r\n            Text = string.Empty;\r\n            UpdateLimitString();\r\n\r\n            RaiseScrollTo(new ScrollToEventArgs(user));\r\n        }\r\n\r\n        public void OnContactUnchecked(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            user.IsSelected = false;\r\n            SelectedUsers.Remove(user);\r\n            _selectedUsersCache.Remove(user.Index);\r\n            NotifyOfPropertyChange(() => SelectedUsers);\r\n\r\n            UpdateLimitString();\r\n        }\r\n\r\n        public virtual void Create()\r\n        {\r\n            if (string.IsNullOrEmpty(Title))\r\n            {\r\n                MessageBox.Show(AppResources.PleaseEnterGroupSubject, AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            var participants = new TLVector<TLInputUserBase>();\r\n            foreach (var item in SelectedUsers)\r\n            {\r\n                participants.Add(item.ToInputUser());\r\n            }\r\n\r\n            if (participants.Count == 0)\r\n            {\r\n                MessageBox.Show(AppResources.PleaseChooseAtLeastOneParticipant, AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.CreateChatAsync(participants, new TLString(Title),\r\n                statedMessage =>\r\n                {\r\n                    IsWorking = false;\r\n                    foreach (var item in Items)\r\n                    {\r\n                        item.IsSelected = false;\r\n                    }\r\n\r\n                    var updates = statedMessage as TLUpdates;\r\n                    if (updates != null)\r\n                    {\r\n                        StateService.With = updates.Chats.First();\r\n                        StateService.RemoveBackEntry = true;\r\n                        BeginOnUIThread(() => NavigationService.UriFor<DialogDetailsViewModel>().Navigate());\r\n                    }\r\n                },\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void Search(string text)\r\n        {\r\n            if (_lastSearchRequest != null)\r\n            {\r\n                _lastSearchRequest.Cancel();\r\n            }\r\n\r\n            var trimmedText = text.Trim();\r\n\r\n            if (string.IsNullOrEmpty(trimmedText))\r\n            {\r\n                if (_isFullResults) return;\r\n\r\n                LazyItems.Clear();\r\n                Items.Clear();\r\n\r\n                //foreach (var contact in _source)\r\n                //{\r\n                //    Items.Add(contact);\r\n                //}\r\n\r\n                _isFullResults = true;\r\n\r\n                return;\r\n            }\r\n\r\n            var nextSearchRequest = CreateSearchRequest(text);\r\n\r\n            _isFullResults = false;\r\n            IsWorking = true;\r\n            nextSearchRequest.ProcessAsync(results =>\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (nextSearchRequest.IsCanceled) return;\r\n\r\n                    Items.Clear();\r\n                    LazyItems.Clear();\r\n\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        if (i < 6)\r\n                        {\r\n                            Items.Add(results[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            LazyItems.Add(results[i]);\r\n                        }\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n\r\n                    PopulateItems();\r\n                }));\r\n\r\n            _searchResultsCache[nextSearchRequest.Text] = nextSearchRequest;\r\n            _lastSearchRequest = nextSearchRequest;\r\n        }\r\n\r\n        private SearchUsersRequest CreateSearchRequest(string text)\r\n        {\r\n            SearchUsersRequest request;\r\n            if (!_searchResultsCache.TryGetValue(text, out request))\r\n            {\r\n                IList<TLUserBase> source;\r\n\r\n                if (_lastSearchRequest != null\r\n                    && text.IndexOf(_lastSearchRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    source = _lastSearchRequest.Source;\r\n                }\r\n                else\r\n                {\r\n                    _source = _source ??\r\n                              CacheService.GetContacts()\r\n                                  .Where(x => !(x is TLUserEmpty) && x.Index != StateService.CurrentUserId)\r\n                                  .OrderBy(x => x.FullName)\r\n                                  .ToList();\r\n\r\n                    source = _source;\r\n                }\r\n\r\n                request = new SearchUsersRequest(text, source);\r\n            }\r\n            return request;\r\n        }\r\n\r\n        public void DeleteLastUser()\r\n        {\r\n            var user = SelectedUsers.LastOrDefault();\r\n            if (user != null)\r\n            {\r\n                OnContactUnchecked(user);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsMode.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public enum DialogDetailsMode\r\n    {\r\n        Common,\r\n        Selection\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Actions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Device.Location;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Runtime.Serialization;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Tasks;\r\nusing Org.BouncyCastle.Crypto;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.EmojiPanel;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Payments;\r\nusing TelegramClient.Views;\r\n#if WP8\r\nusing System.Threading.Tasks;\r\nusing Windows.Storage.Pickers;\r\nusing Windows.Storage;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Feed;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        public void ReportMessage(TLMessageCommon message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            Report(Peer, new TLVector<TLInt> { message.Id });\r\n        }\r\n\r\n        public void OpenCropedMessage(TLMessage message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            StateService.MediaMessage = message;\r\n            NavigationService.UriFor<MessageViewerViewModel>().Navigate();\r\n        }\r\n\r\n#if WP81\r\n        private static StorageFile _fromFile;\r\n\r\n        public static async void SaveFile(StorageFile toFile)\r\n        {\r\n            if (_fromFile == null) return;\r\n            if (toFile == null) return;\r\n\r\n            try\r\n            {\r\n                using (var streamSource = await _fromFile.OpenStreamForReadAsync())\r\n                {\r\n                    using (var streamDest = await toFile.OpenStreamForWriteAsync())\r\n                    {\r\n                        await streamSource.CopyToAsync(streamDest, 1024);\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\"SaveFile exception \\n\" + ex);\r\n            }\r\n\r\n            return;\r\n        }\r\n#endif\r\n\r\n\r\n\r\n#if WP81\r\n\r\n        public void SaveMedia(TLMessage message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            SaveMediaCommon(message);\r\n        }\r\n        public static async void SaveMediaCommon(TLMessage message)\r\n        {\r\n            var storageFile = await GetStorageFile(message.Media);\r\n            if (storageFile == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _fromFile = storageFile;\r\n\r\n            var fileSavePicker = new FileSavePicker();\r\n            fileSavePicker.SuggestedFileName = storageFile.Name;\r\n            fileSavePicker.FileTypeChoices.Add(storageFile.FileType ?? \"file\", new[] { storageFile.FileType });\r\n            fileSavePicker.ContinuationData.Add(\"From\", \"DialogDetailsView\");\r\n            fileSavePicker.PickSaveFileAndContinue();\r\n        }\r\n\r\n        public string GetMediaFileName(TLMessage message)\r\n        {\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                var file = mediaDocument.File;\r\n\r\n                if (file == null)\r\n                {\r\n                    var document = mediaDocument.Document as TLDocument;\r\n                    if (document != null)\r\n                    {\r\n                        var localFileName = document.GetFileName();\r\n                        var globalFileName = mediaDocument.IsoFileName;\r\n                        var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                        if (store.FileExists(localFileName))\r\n                        {\r\n                            return Path.GetFileName(localFileName);\r\n                        }\r\n\r\n                        if (store.FileExists(globalFileName))\r\n                        {\r\n                            return Path.GetFileName(globalFileName);\r\n                        }\r\n\r\n                        if (File.Exists(globalFileName))\r\n                        {\r\n                            return Path.GetFileName(globalFileName);\r\n                        }\r\n\r\n                    }\r\n                }\r\n\r\n                return Path.GetFileName(mediaDocument.File.Name);\r\n            }\r\n\r\n            var mediaVideo = message.Media as TLMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                var file = mediaVideo.File;\r\n\r\n                if (file == null)\r\n                {\r\n                    var video = mediaVideo.Video as TLVideo;\r\n                    if (video != null)\r\n                    {\r\n                        var localFileName = video.GetFileName();\r\n                        var globalFileName = mediaVideo.IsoFileName;\r\n                        var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                        if (store.FileExists(localFileName))\r\n                        {\r\n                            return Path.GetFileName(localFileName);\r\n                        }\r\n\r\n                        if (store.FileExists(globalFileName))\r\n                        {\r\n                            return Path.GetFileName(globalFileName);\r\n                        }\r\n\r\n                        if (File.Exists(globalFileName))\r\n                        {\r\n                            return Path.GetFileName(globalFileName);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return Path.GetFileName(mediaVideo.File.Name);\r\n            }\r\n\r\n            return null;\r\n        }\r\n#endif\r\n        private UserActionViewModel _userAction;\r\n\r\n        public UserActionViewModel UserAction\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel UserAction\");\r\n                return _userAction;\r\n            }\r\n            protected set\r\n            {\r\n                _userAction = value;\r\n            }\r\n        }\r\n\r\n        public void ChangeUserAction()\r\n        {\r\n            if (UserActionViewModel.IsRequired(With))\r\n            {\r\n                if (UserAction == null)\r\n                {\r\n                    UserAction = new UserActionViewModel((TLUserBase)With);\r\n                    UserAction.InvokeUserAction += (sender, args) => InvokeUserAction();\r\n                    UserAction.InvokeUserAction2 += (sender, args) => InvokeUserAction2();\r\n                    NotifyOfPropertyChange(() => UserAction);\r\n                }\r\n                else\r\n                {\r\n                    UserAction.SetUser((TLUserBase)With);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (UserAction != null)\r\n                {\r\n                    UserAction = null;\r\n                    NotifyOfPropertyChange(() => UserAction);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void InvokeUserAction()\r\n        {\r\n            var userBase = With as TLUserBase;\r\n            if (userBase != null && userBase.IsRequest)\r\n            {\r\n                AddContact(userBase);\r\n                return;\r\n            }\r\n\r\n            if (userBase != null && userBase.IsForeign)\r\n            {\r\n                ShareMyContactInfo();\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void InvokeUserAction2()\r\n        {\r\n            ReportSpam();\r\n        }\r\n\r\n        private void ShareMyContactInfo()\r\n        {\r\n            var currentUser = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n            if (currentUser == null) return;\r\n\r\n            SendContact(currentUser);\r\n        }\r\n\r\n        public void AddContact(TLUserBase userRequest)\r\n        {\r\n            if (userRequest == null) return;\r\n\r\n            var phone = userRequest.Phone;\r\n            if (TLString.IsNullOrEmpty(phone)) return;\r\n\r\n            IsWorking = true;\r\n            ContactViewModel.ImportContactAsync(\r\n                userRequest, phone, MTProtoService,\r\n                result =>\r\n                {\r\n                    if (result.Users.Count > 0)\r\n                    {\r\n                        EventAggregator.Publish(new TLUpdateContactLink24 { UserId = result.Users[0].Id, MyLink = new TLContactLink(), ForeignLink = new TLContactLinkUnknown() });\r\n\r\n                        var userBase = result.Users[0];\r\n                        if (userBase != null && userBase.IsContact)\r\n                        {\r\n                            ContactsHelper.CreateContactAsync(DownloadFileManager, StateService, userBase);\r\n                        }\r\n                    }\r\n\r\n                    if (UserAction != null)\r\n                    {\r\n                        UserAction.Remove();\r\n                    }\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"contacts.importContacts error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void AppBarCommand()\r\n        {\r\n\r\n            if (IsBotStarting)\r\n            {\r\n                if (_bot == null || string.IsNullOrEmpty(_bot.AccessToken))\r\n                {\r\n                    _text = \"/start\";\r\n                    Execute.BeginOnUIThread(() => SendInternal(false, false));\r\n                }\r\n                else\r\n                {\r\n                    var accessToken = new TLString(_bot.AccessToken);\r\n                    _bot.AccessToken = string.Empty;\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        var text = With is TLUser\r\n                            ? new TLString(\"/start\")\r\n                            : new TLString(\"/start@\" + ((IUserName)_bot).UserName);\r\n\r\n                        var message = GetMessage(text, new TLMessageMediaEmpty());\r\n                        var previousMessage = InsertSendingMessage(message);\r\n                        IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n                        NotifyOfPropertyChange(() => With);\r\n\r\n                        BeginOnThreadPool(() =>\r\n                            CacheService.SyncSendingMessage(\r\n                                message, previousMessage,\r\n                                result => StartBotInternal(result, accessToken)));\r\n                    });\r\n                }\r\n\r\n                return;\r\n            }\r\n            else if (IsChannel)\r\n            {\r\n                var channel = With as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    if (channel.Left.Value)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.JoinChannelAsync(channel,\r\n                            result => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n\r\n                                Subtitle = GetSubtitle();\r\n                                NotifyOfPropertyChange(() => With);\r\n                                NotifyOfPropertyChange(() => IsAppBarCommandVisible);\r\n                                NotifyOfPropertyChange(() => AppBarCommandString);\r\n\r\n                                if (channel.IsMegaGroup)\r\n                                {\r\n                                    var updates = result as TLUpdates;\r\n                                    if (updates != null)\r\n                                    {\r\n                                        var updateNewChannelMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewChannelMessage) as TLUpdateNewChannelMessage;\r\n                                        if (updateNewChannelMessage != null)\r\n                                        {\r\n                                            Items.Insert(0, updateNewChannelMessage.Message);\r\n                                            CurrentDialog = CurrentDialog ?? CacheService.GetDialog(new TLPeerChannel { Id = channel.Id });\r\n                                            EventAggregator.Publish(new TopMessageUpdatedEventArgs(CurrentDialog, updateNewChannelMessage.Message));\r\n                                        }\r\n                                        else\r\n                                        {\r\n                                            var currentUserId = new TLInt(StateService.CurrentUserId);\r\n                                            var message = new TLMessageService49\r\n                                            {\r\n                                                Flags = new TLInt(0),\r\n                                                Id = new TLInt(0),\r\n                                                FromId = currentUserId,\r\n                                                ToId = new TLPeerChannel { Id = channel.Id },\r\n                                                Status = MessageStatus.Confirmed,\r\n                                                Out = TLBool.True,\r\n                                                Unread = TLBool.False,\r\n                                                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                                                Action = new TLMessageActionChatAddUser41 { Users = new TLVector<TLInt> { currentUserId } },\r\n                                                RandomId = TLLong.Random()\r\n                                            };\r\n\r\n                                            CacheService.SyncMessage(message, true, true,\r\n                                                cachedMessage =>\r\n                                                {\r\n                                                    Items.Insert(0, message);\r\n                                                });\r\n                                        }\r\n                                    }\r\n                                }\r\n                                else\r\n                                {\r\n                                    var dateIndex = 0;\r\n                                    var dialog = CacheService.GetDialogs().LastOrDefault() as TLDialog;\r\n                                    if (dialog != null && dialog.TopMessage != null)\r\n                                    {\r\n                                        dateIndex = dialog.TopMessage.DateIndex;\r\n                                    }\r\n\r\n                                    var message = Items.FirstOrDefault();\r\n                                    if (message != null && message.DateIndex > dateIndex)\r\n                                    {\r\n                                        CacheService.SyncMessage(message, true, true,\r\n                                            cachedMessage =>\r\n                                            {\r\n\r\n                                            });\r\n                                    }\r\n                                }\r\n                                //var message = Items.FirstOrDefault();\r\n                                //if (message != null)\r\n                                //{\r\n                                //    CacheService.DeleteChannelMessages(channel.Id, new TLVector<TLInt>{message.Id});\r\n                                //    CacheService.SyncMessage(message, new TLPeerChannel{ Id = channel.Id },\r\n                                //        m =>\r\n                                //        {\r\n\r\n                                //        });\r\n                                //}\r\n                            }),\r\n                            error => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n\r\n                                if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                                {\r\n                                    if (error.TypeEquals(ErrorType.CHANNELS_TOO_MUCH))\r\n                                    {\r\n                                        MessageBox.Show(AppResources.ChannelsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                                    }\r\n                                }\r\n\r\n                                Execute.ShowDebugMessage(\"channels.joinChannel error \" + error);\r\n                            }));\r\n\r\n\r\n                        return;\r\n                    }\r\n\r\n                    var notifySettings = channel.NotifySettings as TLPeerNotifySettings;\r\n                    if (notifySettings != null)\r\n                    {\r\n                        var currentMuteUntil = notifySettings.MuteUntil ?? (IoC.Get<IStateService>().GetNotifySettings().GroupAlert ? new TLInt(0) : new TLInt(int.MaxValue));\r\n\r\n                        var muteUntil = currentMuteUntil.Value == 0 ? int.MaxValue : 0;\r\n\r\n                        var inputSettings = new TLInputPeerNotifySettings78\r\n                        {\r\n                            Flags = new TLInt(0),\r\n                            MuteUntil = new TLInt(muteUntil),\r\n                            ShowPreviews = notifySettings.ShowPreviews,\r\n                            Sound = notifySettings.Sound\r\n                        };\r\n\r\n                        IsWorking = true;\r\n                        MTProtoService.UpdateNotifySettingsAsync(new TLInputNotifyPeer { Peer = channel.ToInputPeer() }, inputSettings,\r\n                            result => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n\r\n                                notifySettings.MuteUntil = new TLInt(muteUntil);\r\n                                NotifyOfPropertyChange(() => AppBarCommandString);\r\n                                channel.NotifyOfPropertyChange(() => channel.NotifySettings);\r\n\r\n                                var dialog = CacheService.GetDialog(new TLPeerChannel { Id = channel.Id });\r\n                                if (dialog != null)\r\n                                {\r\n                                    dialog.NotifySettings = channel.NotifySettings;\r\n                                    dialog.NotifyOfPropertyChange(() => dialog.NotifySettings);\r\n                                    dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                                    var settings = dialog.With as INotifySettings;\r\n                                    if (settings != null)\r\n                                    {\r\n                                        settings.NotifySettings = channel.NotifySettings;\r\n                                    }\r\n                                }\r\n\r\n                                CacheService.Commit();\r\n                            }),\r\n                            error => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                Execute.ShowDebugMessage(\"account.updateNotifySettings error \" + error);\r\n                            }));\r\n                    }\r\n                }\r\n            }\r\n            else if (IsChannelForbidden)\r\n            {\r\n                var channelForbidden = With as TLChannelForbidden;\r\n                if (channelForbidden != null)\r\n                {\r\n                    DeleteChannelInternal(channelForbidden.Id, true);\r\n                }\r\n            }\r\n            else if (IsChatForbidden || IsChatDeactivated)\r\n            {\r\n                var chat = With as TLChatBase;\r\n                if (chat != null)\r\n                {\r\n                    DialogsViewModel.DeleteAndExitDialogCommon((TLChatBase)With, MTProtoService, () =>\r\n                    {\r\n                        var dialog = CacheService.GetDialog(new TLPeerChat { Id = chat.Id });\r\n                        if (dialog != null)\r\n                        {\r\n                            EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                            CacheService.DeleteDialog(dialog);\r\n                            DialogsViewModel.UnpinFromStart(dialog);\r\n                        }\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            if (NavigationService.CanGoBack)\r\n                            {\r\n                                NavigationService.GoBack();\r\n                            }\r\n                            else\r\n                            {\r\n                                NavigateToShellViewModel();\r\n                            }\r\n                        });\r\n                    },\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"DeleteAndExitDialogCommon error \" + error);\r\n                        });\r\n                }\r\n            }\r\n            else if (IsUserBlocked)\r\n            {\r\n                var user = With as TLUserBase;\r\n                if (user != null)\r\n                {\r\n                    var confirmation = IsBot\r\n                        ? MessageBoxResult.OK\r\n                        : MessageBox.Show(AppResources.UnblockContactConfirmation, AppResources.AppName, MessageBoxButton.OKCancel);\r\n\r\n                    if (confirmation == MessageBoxResult.OK)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.UnblockAsync(user.ToInputUser(),\r\n                            result => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                user.Blocked = TLBool.False;\r\n                                CacheService.Commit();\r\n                                Handle(new TLUpdateUserBlocked { UserId = user.Id, Blocked = TLBool.False });\r\n\r\n                                if (IsBot)\r\n                                {\r\n                                    _text = \"/start\";\r\n                                    Execute.BeginOnUIThread(() => SendInternal(false, false));\r\n                                }\r\n                            }),\r\n                            error => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                Execute.ShowDebugMessage(\"contacts.Unblock error \" + error);\r\n                            }));\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        private TLUserBase GetStartingBot()\r\n        {\r\n            var user = With as TLUser;\r\n            if (user != null && user.IsBot) return user;\r\n\r\n            var chat = With as TLChatBase;\r\n            if (chat != null)\r\n            {\r\n                return _bot;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private void StartBotInternal(TLMessageBase message, TLString accessToken)\r\n        {\r\n            var message31 = message as TLMessage31;\r\n            if (message31 == null) return;\r\n\r\n            var bot = GetStartingBot();\r\n            if (bot == null) return;\r\n\r\n            MTProtoService.StartBotAsync(bot.ToInputUser(), accessToken, message31,\r\n                result =>\r\n                {\r\n                    bot.AccessToken = null;\r\n                },\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                    {\r\n                        //MessageBox.Show(AppResources.PeerFloodSendMessage, AppResources.Error, MessageBoxButton.OK);\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodSendMessage, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                            result =>\r\n                            {\r\n                                if (result == CustomMessageBoxResult.RightButton)\r\n                                {\r\n                                    TelegramViewBase.NavigateToUsername(MTProtoService, Constants.SpambotUsername, null, null, null);\r\n                                }\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.startBot error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public bool IsChatForbidden\r\n        {\r\n            get { return With is TLChatForbidden || (With is TLChat && ((TLChat)With).Left.Value); }\r\n        }\r\n\r\n        public bool IsChatDeactivated\r\n        {\r\n            get { return With is TLChat40 && (((TLChat40)With).Deactivated); }\r\n        }\r\n\r\n        public bool IsChannelForbidden\r\n        {\r\n            get { return With is TLChannelForbidden; }\r\n        }\r\n\r\n        public bool IsBot\r\n        {\r\n            get\r\n            {\r\n                var bot = _bot as TLUser;\r\n                if (bot != null && bot.IsBot)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                var user = With as TLUser;\r\n                if (user != null && user.IsBot)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsBotStarting\r\n        {\r\n            get\r\n            {\r\n                var bot = _bot as TLUser;\r\n                if (bot != null && bot.IsBot && !string.IsNullOrEmpty(bot.AccessToken))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                var user = With as TLUser;\r\n                if (user != null && user.IsBot && Items.Count == 0 && LazyItems.Count == 0)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsUserBlocked\r\n        {\r\n            get\r\n            {\r\n                var user = With as TLUserBase;\r\n                if (user != null && user.Blocked != null && user.Blocked.Value)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsBroadcast\r\n        {\r\n            get { return With is TLBroadcastChat; }\r\n        }\r\n\r\n        public void OpenPeerDetails()\r\n        {\r\n            if (With is TLChatBase)\r\n            {\r\n                if (IsChatForbidden)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                StateService.CurrentChat = (TLChatBase)With;\r\n                NavigationService.UriFor<ChatViewModel>().Navigate();\r\n            }\r\n            else if (With is TLVector<TLChatBase>)\r\n            {\r\n                StateService.CurrentFeed = (TLVector<TLChatBase>)With;\r\n                NavigationService.UriFor<FeedViewModel>().Navigate();\r\n            }\r\n            else\r\n            {\r\n                var user = With as TLUser;\r\n                if (user != null && user.IsSelf)\r\n                {\r\n                    StateService.CurrentInputPeer = user;\r\n                    NavigationService.UriFor<FullMediaViewModel>().Navigate();\r\n                    return;\r\n                }\r\n\r\n                StateService.CurrentContact = (TLUserBase)With;\r\n                NavigationService.UriFor<ContactViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void ForwardMessage(TLMessageBase message)\r\n        {\r\n            if (message == null) return;\r\n            if (message.Index <= 0) return;\r\n\r\n            ForwardMessagesCommon(new List<TLMessageBase> { message }, StateService, NavigationService);\r\n        }\r\n\r\n        public void ForwardMessages(List<TLMessageBase> selectedItems)\r\n        {\r\n            if (selectedItems.Count == 0) return;\r\n\r\n            ForwardMessagesCommon(selectedItems, StateService, NavigationService);\r\n        }\r\n\r\n        public void FastForwardMessages(List<TLMessageBase> selectedItems)\r\n        {\r\n            if (selectedItems.Count == 0) return;\r\n\r\n            string link = null;\r\n            if (selectedItems.Count == 1)\r\n            {\r\n                var message = selectedItems.FirstOrDefault();\r\n                if (message == null) return;\r\n                if (message.Index == 0) return;\r\n\r\n                var channel = With as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    if (!TLString.IsNullOrEmpty(channel.UserName))\r\n                    {\r\n                        link = String.Format(Constants.UsernameLinkPlaceholder + \"/{1}\", channel.UserName, message.Id);\r\n                    }\r\n                }\r\n\r\n                var dialogDetailsView = GetView() as DialogDetailsView;\r\n                if (dialogDetailsView != null)\r\n                {\r\n                    dialogDetailsView.OpenShareMessagePicker(link, args =>\r\n                    {\r\n                        if (args.Dialogs.Count == 0) return;\r\n\r\n                        var containers = new List<Tuple<TLPeerBase, TLMessage25, TLMessagesContainter>>();\r\n                        foreach (var dialog in args.Dialogs)\r\n                        {\r\n                            var with = dialog.With;\r\n                            if (with != null)\r\n                            {\r\n                                with.ClearBitmap();\r\n                            }\r\n\r\n                            TLMessage25 commentMessage = null;\r\n                            if (!string.IsNullOrEmpty(args.Comment))\r\n                            {\r\n                                commentMessage = GetMessage(new TLString(args.Comment), new TLMessageMediaEmpty());\r\n                                commentMessage.ToId = dialog.Peer;\r\n\r\n                                System.Diagnostics.Debug.WriteLine(\"  comment message random_id=\" + commentMessage.RandomIndex);\r\n                            }\r\n                            var container = GetForwardMessagesContainer(selectedItems, false, dialog.Peer);\r\n                            containers.Add(new Tuple<TLPeerBase, TLMessage25, TLMessagesContainter>(dialog.Peer, commentMessage, container));\r\n                            if (dialog == CurrentDialog)\r\n                            {\r\n                                if (commentMessage != null)\r\n                                {\r\n                                    Items.Insert(0, commentMessage);\r\n                                }\r\n\r\n                                var grouped = new List<TLMessageBase>();\r\n                                foreach (var fwdMessage in container.FwdMessages)\r\n                                {\r\n                                    grouped.Add(fwdMessage);\r\n                                }\r\n                                ProcessGroupedMessages(grouped);\r\n\r\n                                foreach (var m in grouped)\r\n                                {\r\n                                    CheckChannelMessage(m as TLMessage25);\r\n                                    Items.Insert(0, m);\r\n                                }\r\n                                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n                            }\r\n                        }\r\n\r\n                        Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            foreach (var pair in containers)\r\n                            {\r\n                                var peer = pair.Item1;\r\n                                var comment = pair.Item2;\r\n                                var container = pair.Item3;\r\n\r\n                                var fwdMessages25 = container.FwdMessages.Reverse().ToList();\r\n                                var sendingMessages = new TLVector<TLMessage>();\r\n                                if (comment != null)\r\n                                {\r\n                                    sendingMessages.Add(comment);\r\n                                }\r\n                                foreach (var fwdMessage in fwdMessages25)\r\n                                {\r\n                                    sendingMessages.Add(fwdMessage);\r\n                                }\r\n\r\n                                if (fwdMessages25.Count > 0)\r\n                                {\r\n                                    CacheService.SyncSendingMessages(\r\n                                        sendingMessages, null,\r\n                                        result => SendForwardMessagesInternal(MTProtoService, MTProtoService.PeerToInputPeer(peer), comment, fwdMessages25, container.WithMyScore));\r\n                                }\r\n                            }\r\n                        });\r\n                    });\r\n\r\n                    return;\r\n                }\r\n            }\r\n\r\n            ForwardMessagesCommon(selectedItems, StateService, NavigationService);\r\n        }\r\n\r\n        public static void ForwardMessagesCommon(List<TLMessageBase> messages, IStateService stateService, INavigationService navigationService)\r\n        {\r\n            stateService.ForwardMessages = UngroupEnumerator(messages).Reverse().ToList();\r\n\r\n            Execute.BeginOnUIThread(() => navigationService.UriFor<ChooseDialogViewModel>().Navigate());\r\n        }\r\n\r\n        public void CopyMessage(TLMessage message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            if (!TLString.IsNullOrEmpty(message.Message))\r\n            {\r\n                Clipboard.SetText(message.Message.ToString());\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void DeleteMessage(TLMessageBase messageBase)\r\n        {\r\n            if (messageBase == null) return;\r\n\r\n            var messages = new List<TLMessageBase>();\r\n            var message = messageBase as TLMessage73;\r\n            if (message != null)\r\n            {\r\n                var mediaGroup = message.Media as TLMessageMediaGroup;\r\n                if (mediaGroup != null)\r\n                {\r\n                    foreach (var item in mediaGroup.Group)\r\n                    {\r\n                        messages.Add(item);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (messages.Count == 0)\r\n            {\r\n                messages.Add(message);\r\n            }\r\n\r\n            var channel = With as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                var messageCommon = messageBase as TLMessageCommon;\r\n                if (messageCommon != null)\r\n                {\r\n                    if (messageCommon.ToId is TLPeerChat)\r\n                    {\r\n                        IsDeleteConfirmed(1, MTProtoService, CacheService, null, messages, revoke =>\r\n                        {\r\n                            DeleteMessages(MTProtoService, revoke, null, null, messages, null, DeleteMessagesInternal);\r\n                        });\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                TLUserBase from;\r\n                if (IsMassDeleteReportSpamEnabled(channel, null, messages, out from))\r\n                {\r\n                    DeleteReportSpam(from, null, null, messages);\r\n                }\r\n                else\r\n                {\r\n                    IsDeleteConfirmed(1, MTProtoService, CacheService, null, messages, revoke =>\r\n                    {\r\n                        DeleteChannelMessages(MTProtoService, (TLChannel)With, null, null, messages, null, DeleteMessagesInternal);\r\n                    });\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            IsDeleteConfirmed(1, MTProtoService, CacheService, null, messages, revoke =>\r\n            {\r\n                if (With is TLBroadcastChat)\r\n                {\r\n                    DeleteMessagesInternal(null, messages);\r\n                    return;\r\n                }\r\n\r\n                if (messageBase.Index == 0 && messageBase.RandomIndex != 0)\r\n                {\r\n                    DeleteMessagesInternal(null, messages);\r\n                    return;\r\n                }\r\n\r\n                DeleteMessages(MTProtoService, revoke, null, null, messages, null, DeleteMessagesInternal);\r\n            });\r\n        }\r\n\r\n        public void DeleteUploadingMessage(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message == null) return;\r\n\r\n            var media = message.Media;\r\n            if (media == null || media.UploadingProgress == 1.0) return;\r\n\r\n            var message73 = messageBase as TLMessage73;\r\n            if (message73 != null && message73.GroupedId != null)\r\n            {\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    var groupedMessage = Items[i] as TLMessage73;\r\n                    if (groupedMessage != null\r\n                        && groupedMessage.GroupedId != null\r\n                        && groupedMessage.GroupedId.Value == message73.GroupedId.Value)\r\n                    {\r\n                        var mediaGroup = groupedMessage.Media as TLMessageMediaGroup;\r\n                        if (mediaGroup != null)\r\n                        {\r\n                            mediaGroup.Group.Remove(messageBase);\r\n                            mediaGroup.RaiseCalculate();\r\n\r\n                            if (mediaGroup.Group.Count == 0)\r\n                            {\r\n                                groupedMessage.Status = MessageStatus.Failed;\r\n                                Items.Remove(groupedMessage);\r\n                            }\r\n                            else if (mediaGroup.Group.Count == 1)\r\n                            {\r\n                                message73.GroupedId = null;\r\n                                if (Items[i] == groupedMessage)\r\n                                {\r\n                                    Items.RemoveAt(i);\r\n                                    Items.Insert(i, mediaGroup.Group[0]);\r\n                                }\r\n                            }\r\n                            break;\r\n                        }\r\n\r\n                        message.Status = MessageStatus.Failed;\r\n                        Items.RemoveAt(i);\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                message.Status = MessageStatus.Failed;\r\n                Items.Remove(message);\r\n            }\r\n\r\n            MergeGroupMessages(new List<TLMessageBase> { message });\r\n\r\n            IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n            NotifyOfPropertyChange(() => With);\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                CacheService.DeleteMessages(new TLVector<TLLong> { message.RandomId });\r\n                CancelUploading(message);\r\n            });\r\n        }\r\n\r\n        private void RemoveMessages(IList<TLMessageBase> messages)\r\n        {\r\n            var group = new Dictionary<long, TLMessageMediaGroup>();\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                if (messages[i].Status == MessageStatus.Sending)\r\n                {\r\n                    messages[i].Status = MessageStatus.Failed;\r\n                    CancelUploading(messages[i]);\r\n                }\r\n\r\n                for (var j = 0; j < Items.Count; j++)\r\n                {\r\n                    if (Items[j] == messages[i])\r\n                    {\r\n                        Items.RemoveAt(j);\r\n                        break;\r\n                    }\r\n\r\n                    var message73 = Items[j] as TLMessage73;\r\n                    if (message73 != null && message73.GroupedId != null)\r\n                    {\r\n                        var mediaGroup = message73.Media as TLMessageMediaGroup;\r\n                        if (mediaGroup != null)\r\n                        {\r\n                            for (var k = 0; k < mediaGroup.Group.Count; k++)\r\n                            {\r\n                                if (mediaGroup.Group[k] == messages[i])\r\n                                {\r\n                                    mediaGroup.Group.RemoveAt(k);\r\n                                    if (mediaGroup.Group.Count == 0)\r\n                                    {\r\n                                        Items.Remove(message73);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        group[message73.GroupedId.Value] = mediaGroup;\r\n                                    }\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            foreach (var mediaGroup in group.Values)\r\n            {\r\n                mediaGroup.RaiseCalculate();\r\n            }\r\n        }\r\n\r\n        private void DeleteMessagesInternal(TLMessageBase lastMessage, IList<TLMessageBase> messages)\r\n        {\r\n            var channel = With as TLChannel;\r\n            TLPeerBase toPeer = null;\r\n            var localIds = new TLVector<TLLong>();\r\n            var remoteIds = new TLVector<TLInt>();\r\n            var remoteChatIds = new TLVector<TLInt>();\r\n            for (int i = 0; i < messages.Count; i++)\r\n            {\r\n                if (messages[i].RandomIndex != 0)\r\n                {\r\n                    localIds.Add(messages[i].RandomId);\r\n                }\r\n\r\n                if (messages[i].Index > 0)\r\n                {\r\n                    var messageCommon = messages[i] as TLMessageCommon;\r\n                    if (channel != null && messageCommon != null && messageCommon.ToId is TLPeerChat)\r\n                    {\r\n                        remoteChatIds.Add(messageCommon.Id);\r\n                        toPeer = messageCommon.ToId;\r\n                    }\r\n                    else\r\n                    {\r\n                        remoteIds.Add(messages[i].Id);\r\n                    }\r\n                }\r\n            }\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                RemoveMessages(messages);\r\n\r\n                MergeGroupMessages(messages);\r\n\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n                    NotifyOfPropertyChange(() => With);\r\n                    HideScrollToBottomButton();\r\n                });\r\n            });\r\n\r\n            if (toPeer != null) CacheService.DeleteMessages(toPeer, lastMessage, remoteChatIds);\r\n            CacheService.DeleteMessages(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId), lastMessage, remoteIds);\r\n            CacheService.DeleteMessages(localIds);\r\n        }\r\n\r\n        private void CancelUploading(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message == null) return;\r\n\r\n            var media = message.Media;\r\n\r\n            var mediaPhoto = media as TLMessageMediaPhoto;\r\n            if (mediaPhoto != null && mediaPhoto.FileId != null)\r\n            {\r\n                IoC.Get<IUploadService>().Remove(message);\r\n                UploadFileManager.CancelUploadFile(media.FileId);\r\n            }\r\n\r\n            var mediaVideo = media as TLMessageMediaVideo;\r\n            if (mediaVideo != null && mediaVideo.FileId != null)\r\n            {\r\n                UploadVideoFileManager.CancelUploadFile(media.FileId);\r\n            }\r\n\r\n            var mediaDocument = media as TLMessageMediaDocument;\r\n            if (mediaDocument != null && mediaDocument.FileId != null)\r\n            {\r\n                if (message.IsVoice())\r\n                {\r\n                    UploadAudioFileManager.CancelUploadFile(media.FileId);\r\n                }\r\n                else if (message.IsVideo())\r\n                {\r\n                    IoC.Get<IUploadService>().Remove(message);\r\n                    UploadVideoFileManager.CancelUploadFile(media.FileId);\r\n                }\r\n                else\r\n                {\r\n                    UploadDocumentFileManager.CancelUploadFile(media.FileId);\r\n                }\r\n            }\r\n\r\n            var mediaAudio = media as TLMessageMediaAudio;\r\n            if (mediaAudio != null && mediaAudio.FileId != null)\r\n            {\r\n                UploadAudioFileManager.CancelUploadFile(media.FileId);\r\n            }\r\n        }\r\n\r\n        private void DeleteFromItems(IList<TLMessageBase> messages)\r\n        {\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                Items.Remove(messages[i]);\r\n            }\r\n\r\n            MergeGroupMessages(messages);\r\n\r\n            IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n            NotifyOfPropertyChange(() => With);\r\n        }\r\n\r\n        public void DeleteMessages()\r\n        {\r\n            var randomItems = new List<TLMessageBase>();\r\n            var items = new List<TLMessageBase>();\r\n\r\n            TLMessageBase lastItem = null;\r\n\r\n            foreach (var item in UngroupEnumerator(Items))\r\n            {\r\n                var message = item;\r\n                if (message.IsSelected)\r\n                {\r\n                    if (message.Index == 0 && message.RandomIndex != 0)\r\n                    {\r\n                        randomItems.Add(message);\r\n                        lastItem = null;\r\n                    }\r\n                    else if (message.Index != 0)\r\n                    {\r\n                        items.Add(message);\r\n                        lastItem = null;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    if (lastItem == null)\r\n                    {\r\n                        lastItem = message;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (randomItems.Count > 0 || items.Count > 0)\r\n            {\r\n                IsSelectionEnabled = false;\r\n            }\r\n\r\n            var totalCount = randomItems.Count + items.Count;\r\n\r\n            var channel = With as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                var chatMessages = new List<TLMessageBase>();\r\n                var channelMessages = new List<TLMessageBase>();\r\n                if (channel.MigratedFromChatId != null)\r\n                {\r\n                    foreach (var item in items)\r\n                    {\r\n                        var message = item as TLMessageCommon;\r\n                        if (message != null && message.ToId is TLPeerChat)\r\n                        {\r\n                            chatMessages.Add(message);\r\n                        }\r\n                        else\r\n                        {\r\n                            channelMessages.Add(message);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (chatMessages.Count > 0)\r\n                {\r\n                    IsDeleteConfirmed(totalCount, MTProtoService, CacheService, randomItems, items, revoke =>\r\n                    {\r\n                        DeleteChannelMessages(MTProtoService, channel, lastItem, null, channelMessages, null, DeleteMessagesInternal);\r\n                        DeleteMessages(MTProtoService, revoke, lastItem, null, chatMessages, null, DeleteMessagesInternal);\r\n                    });\r\n\r\n                    return;\r\n                }\r\n\r\n                TLUserBase from;\r\n                if (IsMassDeleteReportSpamEnabled(channel, randomItems, items, out from))\r\n                {\r\n                    DeleteReportSpam(from, lastItem, randomItems, items);\r\n                }\r\n                else\r\n                {\r\n                    IsDeleteConfirmed(totalCount, MTProtoService, CacheService, randomItems, items, revoke =>\r\n                    {\r\n                        DeleteChannelMessages(MTProtoService, channel, lastItem, randomItems, items, DeleteMessagesInternal, DeleteMessagesInternal);\r\n                    });\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            IsDeleteConfirmed(totalCount, MTProtoService, CacheService, randomItems, items, revoke =>\r\n            {\r\n                if (With is TLBroadcastChat)\r\n                {\r\n                    DeleteMessagesInternal(lastItem, randomItems);\r\n                    DeleteMessagesInternal(lastItem, items);\r\n                    return;\r\n                }\r\n\r\n                DeleteMessages(MTProtoService, revoke, lastItem, randomItems, items, DeleteMessagesInternal, DeleteMessagesInternal);\r\n            });\r\n        }\r\n\r\n        public static void IsDeleteConfirmed(int totalCount, IMTProtoService mtProtoService, ICacheService cacheService, IList<TLMessageBase> localMessages, IList<TLMessageBase> remoteMessages, Action<bool> callback)\r\n        {\r\n            if (totalCount == 0) return;\r\n            TLMessageBase m = null;\r\n            if (localMessages != null && localMessages.Count > 0)\r\n            {\r\n                m = localMessages.FirstOrDefault();\r\n            }\r\n            if (m == null && remoteMessages != null && remoteMessages.Count > 0)\r\n            {\r\n                m = remoteMessages.FirstOrDefault();\r\n            }\r\n            if (m == null) return;\r\n\r\n            var canRevoke = CanRevoke(mtProtoService, localMessages, remoteMessages);\r\n            var message = totalCount == 1\r\n                ? AppResources.DeleteMessageConfirmation\r\n                : string.Format(AppResources.DeleteMessagesConfirmation, Utils.Language.Declension(\r\n                    totalCount,\r\n                    AppResources.MessageNominativeSingular,\r\n                    AppResources.MessageNominativePlural,\r\n                    AppResources.MessageGenitiveSingular,\r\n                    AppResources.MessageGenitivePlural).ToLower(CultureInfo.CurrentUICulture));\r\n\r\n            object content = null;\r\n            var textBlock = new TextBlock { IsHitTestVisible = false };\r\n            var checkBox = new CheckBox { IsChecked = false, IsHitTestVisible = false };\r\n            textBlock.SetValue(TextBlock.FontSizeProperty, DependencyProperty.UnsetValue);\r\n            if (!canRevoke)\r\n            {\r\n                var hint = GetHint(cacheService, m, totalCount);\r\n\r\n                textBlock.TextWrapping = TextWrapping.Wrap;\r\n                textBlock.Margin = new Thickness(12.0, 0.0, 12.0, 0.0);\r\n                textBlock.Text = Environment.NewLine + hint;\r\n\r\n                content = textBlock;\r\n            }\r\n            else\r\n            {\r\n                var text = AppResources.DeleteForAll;\r\n\r\n                var mCommon = m as TLMessageCommon;\r\n                if (mCommon != null && mCommon.ToId is TLPeerUser)\r\n                {\r\n                    var userId = mCommon.Out.Value ? mCommon.ToId.Id : mCommon.FromId;\r\n                    var user = cacheService.GetUser(userId) as TLUser;\r\n                    if (user != null)\r\n                    {\r\n                        text = string.Format(AppResources.DeleteFor, user.ShortName);\r\n                    }\r\n                }\r\n\r\n                textBlock.Margin = new Thickness(-18.0, 0.0, 12.0, 0.0);\r\n                textBlock.Text = text;\r\n                textBlock.VerticalAlignment = VerticalAlignment.Center;\r\n\r\n                var panel = new StackPanel { Orientation = Orientation.Horizontal, Margin = new Thickness(0.0, -2.0, 0.0, -20.0), Background = new SolidColorBrush(Colors.Transparent) };\r\n                panel.Tap += (sender, args) =>\r\n                {\r\n                    checkBox.IsChecked = !checkBox.IsChecked;\r\n                };\r\n                panel.Children.Add(checkBox);\r\n                panel.Children.Add(textBlock);\r\n                content = panel;\r\n            }\r\n\r\n            ShellViewModel.ShowCustomMessageBox(message, AppResources.Confirm,\r\n                AppResources.Delete.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                        {\r\n                            callback.SafeInvoke(checkBox.IsChecked.Value);\r\n                        });\r\n                    }\r\n                },\r\n                content);\r\n        }\r\n\r\n        private static string GetHint(ICacheService cacheService, TLMessageBase m, int totalCount)\r\n        {\r\n            var messageCommon = m as TLMessageCommon;\r\n            if (messageCommon != null)\r\n            {\r\n                var peerChannel = messageCommon.ToId as TLPeerChannel;\r\n                if (peerChannel != null)\r\n                {\r\n                    var channel = cacheService.GetChat(peerChannel.Id) as TLChannel;\r\n                    if (channel != null)\r\n                    {\r\n                        if (channel.IsMegaGroup)\r\n                        {\r\n                            return totalCount == 1\r\n                                ? AppResources.DeleteMessageForEveryoneInChatHint\r\n                                : AppResources.DeleteMessagesForEveryoneInChatHint;\r\n                        }\r\n                        else\r\n                        {\r\n                            return totalCount == 1\r\n                                ? AppResources.DeleteMessageForEveryoneInChannelHint\r\n                                : AppResources.DeleteMessagesForEveryoneInChannelHint;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return totalCount == 1\r\n                    ? AppResources.DeleteMessageForYouHint\r\n                    : AppResources.DeleteMessagesForYouHint;\r\n        }\r\n\r\n        public static void DeleteMessages(IMTProtoService mtProtoService, bool revoke, TLMessageBase lastItem, IList<TLMessageBase> localMessages, IList<TLMessageBase> remoteMessages, Action<TLMessageBase, IList<TLMessageBase>> localCallback = null, Action<TLMessageBase, IList<TLMessageBase>> remoteCallback = null)\r\n        {\r\n            if (localMessages != null && localMessages.Count > 0)\r\n            {\r\n                localCallback.SafeInvoke(lastItem, localMessages);\r\n            }\r\n\r\n            if (remoteMessages != null && remoteMessages.Count > 0)\r\n            {\r\n                mtProtoService.DeleteMessagesAsync(revoke, new TLVector<TLInt> { Items = remoteMessages.Select(x => x.Id).ToList() },\r\n                    deletedIds =>\r\n                    {\r\n                        remoteCallback.SafeInvoke(lastItem, remoteMessages);\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.deleteMessages error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        private static bool CanRevoke(IMTProtoService mtProtoService, IList<TLMessageBase> localMessages, IList<TLMessageBase> remoteMessages)\r\n        {\r\n            TLInt revokeTimeLimit = null;\r\n            TLInt revokePmTimeLimit = null;\r\n            var revokePmInbox = false;\r\n            var config = IoC.Get<ICacheService>().GetConfig() as TLConfig48;\r\n            if (config != null)\r\n            {\r\n                revokeTimeLimit = config.EditTimeLimit;\r\n                revokePmTimeLimit = config.EditTimeLimit;\r\n                revokePmInbox = false;\r\n            }\r\n            var config76 = IoC.Get<ICacheService>().GetConfig() as TLConfig76;\r\n            if (config76 != null)\r\n            {\r\n                revokeTimeLimit = config76.RevokeTimeLimit;\r\n                revokePmTimeLimit = config76.RevokePmTimeLimit;\r\n                revokePmInbox = config76.RevokePmInbox;\r\n            }\r\n\r\n            if (revokeTimeLimit != null)\r\n            {\r\n                var now = TLUtils.DateToUniversalTimeTLInt(mtProtoService.ClientTicksDelta, DateTime.Now);\r\n\r\n                if (localMessages != null)\r\n                {\r\n                    foreach (var messageBase in localMessages)\r\n                    {\r\n                        var message = messageBase as TLMessage;\r\n                        if (message == null\r\n                            || (!message.Out.Value && !revokePmInbox)\r\n                            || (message.ToId is TLPeerUser && message.DateIndex + revokePmTimeLimit.Value < now.Value)\r\n                            || (message.ToId is TLPeerChat && message.DateIndex + revokeTimeLimit.Value < now.Value))\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        var peerChannel = message.ToId as TLPeerChannel;\r\n                        if (peerChannel != null)\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        var peerUser = message.ToId as TLPeerUser;\r\n                        if (peerUser != null)\r\n                        {\r\n                            if (peerUser.Id.Value == mtProtoService.CurrentUserId.Value\r\n                                && message.FromId.Value == mtProtoService.CurrentUserId.Value)\r\n                            {\r\n                                return false;\r\n                            }\r\n\r\n                            var user = IoC.Get<ICacheService>().GetUser(peerUser.Id) as TLUser;\r\n                            if (user != null && user.IsBot)\r\n                            {\r\n                                return false;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (remoteMessages != null)\r\n                {\r\n                    foreach (var messageBase in remoteMessages)\r\n                    {\r\n                        var message = messageBase as TLMessage;\r\n                        if (message == null\r\n                            || (!message.Out.Value && !revokePmInbox)\r\n                            || (message.ToId is TLPeerUser && message.DateIndex + revokePmTimeLimit.Value < now.Value)\r\n                            || (message.ToId is TLPeerChat && message.DateIndex + revokeTimeLimit.Value < now.Value))\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        var peerChannel = message.ToId as TLPeerChannel;\r\n                        if (peerChannel != null)\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        var peerUser = message.ToId as TLPeerUser;\r\n                        if (peerUser != null)\r\n                        {\r\n                            if (peerUser.Id.Value == mtProtoService.CurrentUserId.Value\r\n                                && message.FromId.Value == mtProtoService.CurrentUserId.Value)\r\n                            {\r\n                                return false;\r\n                            }\r\n\r\n                            var user = IoC.Get<ICacheService>().GetUser(peerUser.Id) as TLUser;\r\n                            if (user != null && user.IsBot)\r\n                            {\r\n                                return false;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        public static void DeleteChannelMessages(IMTProtoService mtProtoService, TLChannel channel, TLMessageBase lastItem, IList<TLMessageBase> localMessages, IList<TLMessageBase> remoteMessages, Action<TLMessageBase, IList<TLMessageBase>> localCallback = null, Action<TLMessageBase, IList<TLMessageBase>> remoteCallback = null)\r\n        {\r\n            if (localMessages != null && localMessages.Count > 0)\r\n            {\r\n                localCallback.SafeInvoke(lastItem, localMessages);\r\n            }\r\n\r\n            if (remoteMessages != null && remoteMessages.Count > 0)\r\n            {\r\n                mtProtoService.DeleteMessagesAsync(channel.ToInputChannel(), new TLVector<TLInt> { Items = remoteMessages.Select(x => x.Id).ToList() },\r\n                    deletedIds =>\r\n                    {\r\n                        remoteCallback.SafeInvoke(lastItem, remoteMessages);\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"channels.deleteMessages error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        public void DeleteMessageById(TLMessageBase message, System.Action callback)\r\n        {\r\n            if (message == null) return;\r\n\r\n            if ((message.Id == null || message.Id.Value == 0)\r\n                && message.RandomIndex != 0)\r\n            {\r\n                CacheService.DeleteMessages(new TLVector<TLLong> { message.RandomId });\r\n                callback.SafeInvoke();\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (Items[i].RandomIndex == message.RandomIndex)\r\n                        {\r\n                            Items.RemoveAt(i);\r\n                            break;\r\n                        }\r\n                    }\r\n                });\r\n                return;\r\n            }\r\n\r\n            IsDeleteConfirmed(1, MTProtoService, CacheService, null, new List<TLMessageBase> { message }, revoke =>\r\n            {\r\n                MTProtoService.DeleteMessagesAsync(false, new TLVector<TLInt> { message.Id },\r\n                    deletedIds =>\r\n                    {\r\n                        // duplicate: deleting performed through updates\r\n                        CacheService.DeleteMessages(new TLVector<TLInt> { message.Id });\r\n\r\n                        Handle(new MessagesRemovedEventArgs(CurrentDialog, new List<TLMessageBase> { message }));\r\n\r\n                        callback.SafeInvoke();\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.deleteMessages error \" + error);\r\n                    });\r\n            });\r\n        }\r\n\r\n        public void DeleteFile(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var mediaDocument = message.Media as TLMessageMediaDocument45;\r\n                if (mediaDocument != null && message.IsVideo())\r\n                {\r\n                    var video = mediaDocument.Video as TLDocument22;\r\n                    if (video != null)\r\n                    {\r\n                        var fileName = video.GetFileName();\r\n\r\n                        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                        {\r\n                            if (store.FileExists(fileName))\r\n                            {\r\n                                store.DeleteFile(fileName);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var mediaVideo = message.Media as TLMessageMediaVideo;\r\n                if (mediaVideo != null)\r\n                {\r\n                    var video = mediaVideo.Video as TLVideo;\r\n                    if (video != null)\r\n                    {\r\n                        var fileName = video.GetFileName();\r\n\r\n                        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                        {\r\n                            if (store.FileExists(fileName))\r\n                            {\r\n                                store.DeleteFile(fileName);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n#if WP81\r\n        public async void Resend(TLMessage45 message)\r\n#else\r\n        public void Resend(TLMessage25 message)\r\n#endif\r\n        {\r\n            if (message == null) return;\r\n\r\n            if (message.Index != 0)\r\n            {\r\n                var messageInfo = string.Format(\"Resend delivered message Id={0} RandomId={1} Status={2} Date={3}\", message.Index, message.RandomIndex, message.Status, message.Date);\r\n                Execute.ShowDebugMessage(messageInfo);\r\n\r\n                message.Status = MessageStatus.Confirmed;\r\n                CacheService.SyncSendingMessage(message, null, result => { });\r\n\r\n                return;\r\n            }\r\n\r\n            if (message.RandomIndex == 0)\r\n            {\r\n                var messageInfo = string.Format(\"Resend with missing randomIndex message Id={0} RandomId={1} Status={2} Date={3}\", message.Index, message.RandomIndex, message.Status, message.Date);\r\n                Execute.ShowDebugMessage(messageInfo);\r\n\r\n                message.RandomId = TLLong.Random();\r\n            }\r\n\r\n            // find common grouped message to resend\r\n            var message73 = message as TLMessage73;\r\n            if (message73 != null\r\n                && message73.GroupedId != null)\r\n            {\r\n                var groupedMessage = FindGroupedMessage(message73) as TLMessage45;\r\n                if (groupedMessage != null)\r\n                {\r\n                    message = groupedMessage;\r\n                }\r\n            }\r\n\r\n            message.Status = MessageStatus.Sending;\r\n\r\n            if (message73 != null\r\n                && message73.GroupedId != null\r\n                && message73.FwdHeader != null\r\n                && message73.FwdMessageId != null)\r\n            {\r\n                var mediaGroup = message73.Media as TLMessageMediaGroup;\r\n                if (mediaGroup != null)\r\n                {\r\n                    var messages = new List<TLMessage25>();\r\n                    foreach (var item in UngroupEnumerator(mediaGroup.Group).OfType<TLMessage25>())\r\n                    {\r\n                        messages.Add(item);\r\n                    }\r\n\r\n                    var inputPeer = PeerToInputPeer(message.ToId);\r\n                    SendForwardMessagesInternal(MTProtoService, inputPeer, null, messages);\r\n\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var message48 = message as TLMessage48;\r\n            if (message48 != null && message48.FwdHeader != null && message48.FwdMessageId != null)\r\n            {\r\n                var inputPeer = PeerToInputPeer(message.ToId);\r\n                SendForwardMessagesInternal(MTProtoService, inputPeer, null, new List<TLMessage25> { message48 });\r\n                return;\r\n            }\r\n\r\n            var message40 = message as TLMessage40;\r\n            if (message40 != null && message40.FwdFromPeer != null && message40.FwdMessageId != null)\r\n            {\r\n                var inputPeer = PeerToInputPeer(message.ToId);\r\n                SendForwardMessagesInternal(MTProtoService, inputPeer, null, new List<TLMessage25> { message40 });\r\n                return;\r\n            }\r\n\r\n            if (message.Media is TLMessageMediaEmpty || (message.InlineBotResultId != null && message.InlineBotResultQueryId.Value != 0 && !TLString.IsNullOrEmpty(message.InlineBotResultId)))\r\n            {\r\n                if (BadInlineBotMessage(message))\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    return;\r\n                }\r\n\r\n                SendInternal(message, MTProtoService, null, () => Status = string.Empty);\r\n            }\r\n            else\r\n            {\r\n                if (message.Media is TLMessageMediaGroup)\r\n                {\r\n                    var mediaGroup = (TLMessageMediaGroup)message.Media;\r\n                    var inputMedia = new TLVector<TLInputSingleMedia>();\r\n                    foreach (var item in mediaGroup.Group.OfType<TLMessage>())\r\n                    {\r\n                        var singleMedia = item.InputMedia as TLInputSingleMedia;\r\n                        if (singleMedia != null)\r\n                        {\r\n                            inputMedia.Add(singleMedia);\r\n                        }\r\n                    }\r\n                    if (inputMedia.Count == mediaGroup.Group.Count)\r\n                    {\r\n                        UploadService.SendMultiMediaInternal(inputMedia, message, MTProtoService, StateService, CacheService);\r\n                    }\r\n                    else\r\n                    {\r\n                        IoC.Get<IUploadService>().AddGroup(message);\r\n                        UploadPhotoInternal(mediaGroup.Group.OfType<TLMessage34>().ToList());\r\n                    }\r\n                }\r\n                else if (message.Media is TLMessageMediaPhoto)\r\n                {\r\n                    if (message.InputMedia != null)\r\n                    {\r\n                        UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n                    }\r\n                    else\r\n                    {\r\n                        UploadPhotoInternal(message);\r\n                    }\r\n                }\r\n                else if (message.Media is TLMessageMediaAudio)\r\n                {\r\n#if WP8\r\n                    if (message.InputMedia != null)\r\n                    {\r\n                        UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n                    }\r\n                    else\r\n                    {\r\n                        SendAudioInternal(message);\r\n                    }\r\n#endif\r\n                }\r\n                else if (message.Media is TLMessageMediaVideo)\r\n                {\r\n#if WP81\r\n                    var file = await GetStorageFile(message.Media);\r\n\r\n                    if (file != null)\r\n                    {\r\n                        SendCompressedVideoInternal(message, file);\r\n                    }\r\n                    else\r\n                    {\r\n                        MessageBox.Show(AppResources.UnableToAccessDocument, AppResources.Error, MessageBoxButton.OK);\r\n                        DeleteMessage(message);\r\n                    }\r\n#else\r\n                    SendVideoInternal(message, null);\r\n#endif\r\n                }\r\n                else if (message.Media is TLMessageMediaDocument)\r\n                {\r\n#if WP8\r\n                    if (message.IsVoice())\r\n                    {\r\n                        if (message.InputMedia != null)\r\n                        {\r\n                            UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n                        }\r\n                        else\r\n                        {\r\n                            SendAudioInternal(message);\r\n                        }\r\n                        return;\r\n                    }\r\n\r\n                    if (message.IsVideo())\r\n                    {\r\n#if WP81\r\n                        var videoFile = await GetStorageFile(message.Media);\r\n\r\n                        if (videoFile != null)\r\n                        {\r\n                            SendCompressedVideoInternal(message, videoFile);\r\n                        }\r\n                        else\r\n                        {\r\n                            MessageBox.Show(AppResources.UnableToAccessDocument, AppResources.Error, MessageBoxButton.OK);\r\n                            DeleteMessage(message);\r\n                        }\r\n#else\r\n                        SendVideoInternal(message, null);\r\n#endif\r\n                    }\r\n#endif\r\n#if WP81\r\n                    var file = await GetStorageFile(message.Media);\r\n\r\n                    if (file != null)\r\n                    {\r\n                        SendDocumentInternal(message, file);\r\n                    }\r\n                    else\r\n                    {\r\n                        MessageBox.Show(AppResources.UnableToAccessDocument, AppResources.Error, MessageBoxButton.OK);\r\n                        DeleteMessage(message);\r\n                    }\r\n#else\r\n                    SendDocumentInternal(message, null);\r\n#endif\r\n                }\r\n                else if (message.Media is TLMessageMediaVenue)\r\n                {\r\n                    if (message.InputMedia != null)\r\n                    {\r\n                        UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n                    }\r\n                    else\r\n                    {\r\n                        SendVenueInternal(message);\r\n                    }\r\n                }\r\n                else if (message.Media is TLMessageMediaGeo)\r\n                {\r\n                    if (message.InputMedia != null)\r\n                    {\r\n                        UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n                    }\r\n                    else\r\n                    {\r\n                        SendLocationInternal(message);\r\n                    }\r\n                }\r\n                else if (message.Media is TLMessageMediaContact)\r\n                {\r\n                    if (message.InputMedia != null)\r\n                    {\r\n                        UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n                    }\r\n                    else\r\n                    {\r\n                        SendContactInternal(message);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLMessageBase FindGroupedMessage(TLMessage73 message73)\r\n        {\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var m = Items[i] as TLMessage73;\r\n                if (m != null)\r\n                {\r\n                    var mGroup = m.Media as TLMessageMediaGroup;\r\n                    if (mGroup != null)\r\n                    {\r\n                        for (var j = 0; j < mGroup.Group.Count; j++)\r\n                        {\r\n                            if (mGroup.Group[j] == message73)\r\n                            {\r\n                                return m;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n#if WP81\r\n        public static async Task<StorageFile> GetStorageFile(TLMessageMediaBase media)\r\n        {\r\n            if (media == null) return null;\r\n            if (media.File != null)\r\n            {\r\n                if (File.Exists(media.File.Path))\r\n                {\r\n                    return media.File;\r\n                }\r\n            }\r\n\r\n            var file = await GetFileFromFolder(media.IsoFileName);\r\n\r\n            if (file == null)\r\n            {\r\n                file = await GetFileFromLocalFolder(media.IsoFileName);\r\n            }\r\n\r\n            if (file == null)\r\n            {\r\n                var mediaPhoto = media as TLMessageMediaPhoto;\r\n                if (mediaPhoto != null)\r\n                {\r\n                    var photo = mediaPhoto.Photo as TLPhoto;\r\n                    if (photo != null)\r\n                    {\r\n                        file = await GetFileFromLocalFolder(photo.GetFileName());\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (file == null)\r\n            {\r\n                var mediaDocument = media as TLMessageMediaDocument;\r\n                if (mediaDocument != null)\r\n                {\r\n                    var document = mediaDocument.Document as TLDocument;\r\n                    if (document != null)\r\n                    {\r\n                        file = await GetFileFromLocalFolder(document.GetFileName());\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (file == null)\r\n            {\r\n                var mediaVideo = media as TLMessageMediaVideo;\r\n                if (mediaVideo != null)\r\n                {\r\n                    var video = mediaVideo.Video as TLVideo;\r\n                    if (video != null)\r\n                    {\r\n                        file = await GetFileFromLocalFolder(video.GetFileName());\r\n                    }\r\n                }\r\n            }\r\n\r\n            return file;\r\n        }\r\n\r\n        public static async Task<StorageFile> GetFileFromLocalFolder(string fileName)\r\n        {\r\n            StorageFile file = null;\r\n            try\r\n            {\r\n                var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                if (!string.IsNullOrEmpty(fileName)\r\n                    && store.FileExists(fileName))\r\n                {\r\n                    file = await ApplicationData.Current.LocalFolder.GetFileAsync(fileName);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(string.Format(\"LocalFolder.GetFileAsync({0}) exception \", fileName) + ex);\r\n            }\r\n\r\n            return file;\r\n        }\r\n\r\n        public static async Task<StorageFile> GetFileFromFolder(string fileName)\r\n        {\r\n            StorageFile file = null;\r\n            try\r\n            {\r\n                if (!string.IsNullOrEmpty(fileName)\r\n                    && File.Exists(fileName))\r\n                {\r\n                    file = await StorageFile.GetFileFromPathAsync(fileName);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(string.Format(\"GetFileFromPathAsync({0}) exception \", fileName) + ex);\r\n            }\r\n\r\n            return file;\r\n        }\r\n#endif\r\n        public bool CanSend\r\n        {\r\n            get\r\n            {\r\n                var text = GetTrimmedText(Text);\r\n\r\n                return !string.IsNullOrEmpty(text) || Reply is TLMessagesContainter;\r\n            }\r\n        }\r\n\r\n        public static string GetTrimmedText(string input)\r\n        {\r\n            return input != null ? input.Trim().Replace(\"\\r\", \"\\n\").Replace(\"--\", \"—\") : null;\r\n        }\r\n\r\n        public void Send(TLMessageBase message, TLKeyboardButtonBase keyboardButtonBase, bool fromNewMessage = false)\r\n        {\r\n            if (keyboardButtonBase == null) return;\r\n\r\n            var keyboardButtonSwitchInline55 = keyboardButtonBase as TLKeyboardButtonSwitchInline55;\r\n            if (keyboardButtonSwitchInline55 != null\r\n                && keyboardButtonSwitchInline55.IsSamePeer)\r\n            {\r\n                var bot = GetBot(message);\r\n                if (bot != null && bot.IsBot)\r\n                {\r\n                    _text = string.Format(\"@{0} {1}\", bot.UserName, keyboardButtonSwitchInline55.Query);\r\n\r\n                    var chat = With as TLChatBase;\r\n                    if (chat != null)\r\n                    {\r\n                        _reply = message;\r\n                    }\r\n\r\n                    Execute.BeginOnUIThread(() => SendInternal(true, true));\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var keyboardButtonSwitchInline = keyboardButtonBase as TLKeyboardButtonSwitchInline;\r\n            if (keyboardButtonSwitchInline != null)\r\n            {\r\n                var bot = GetBot(message);\r\n                if (bot != null && bot.IsBot)\r\n                {\r\n                    TLObject with;\r\n                    if (_switchPMDict.TryGetValue(bot.Index, out with))\r\n                    {\r\n                        _switchPMDict.Remove(bot.Index);\r\n\r\n                        View.StopPlayersAndCreateBitmapCache(() =>\r\n                        {\r\n                            keyboardButtonSwitchInline.Bot = bot;\r\n                            StateService.SwitchInlineButton = keyboardButtonSwitchInline;\r\n                            StateService.RemoveBackEntry = true;\r\n                            StateService.With = with;\r\n                            NavigationService.UriFor<DialogDetailsViewModel>().WithParam(x => x.RandomParam, Guid.NewGuid().ToString()).Navigate();\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        if (fromNewMessage) return;\r\n\r\n                        View.StopPlayersAndCreateBitmapCache(() =>\r\n                        {\r\n                            keyboardButtonSwitchInline.Bot = bot;\r\n                            StateService.SwitchInlineButton = keyboardButtonSwitchInline;\r\n                            NavigationService.UriFor<ChooseDialogViewModel>().Navigate();\r\n                        });\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var keyboardButtonUrl = keyboardButtonBase as TLKeyboardButtonUrl;\r\n            if (keyboardButtonUrl != null)\r\n            {\r\n                var navstr = keyboardButtonUrl.Url.ToString();\r\n\r\n                if (navstr.ToLowerInvariant().Contains(\"telegram.me\")\r\n                    || navstr.ToLowerInvariant().Contains(\"t.me\"))\r\n                {\r\n                    OnTelegramLinkAction(this, new TelegramEventArgs { Uri = navstr });\r\n                }\r\n                else\r\n                {\r\n                    var result = MessageBox.Show(string.Format(AppResources.OpenUrlConfirmation, navstr), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                    if (result != MessageBoxResult.OK) return;\r\n\r\n                    var task = new WebBrowserTask();\r\n                    task.URL = HttpUtility.UrlEncode(navstr);\r\n                    task.Show();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var keyboardButtonGame = keyboardButtonBase as TLKeyboardButtonGame;\r\n            if (keyboardButtonGame != null)\r\n            {\r\n                if (message != null)\r\n                {\r\n                    var bot = GetBot(message);\r\n                    if (bot == null) return;\r\n\r\n                    var m = message as TLMessage;\r\n                    if (m != null)\r\n                    {\r\n                        var mediaGame = m.Media as TLMessageMediaGame;\r\n                        if (mediaGame != null)\r\n                        {\r\n                            OpenGame(message, bot, mediaGame.Game);\r\n                        }\r\n                    }\r\n                    return;\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var keyboardButtonBuy = keyboardButtonBase as TLKeyboardButtonBuy;\r\n            if (keyboardButtonBuy != null)\r\n            {\r\n                if (message != null)\r\n                {\r\n                    var bot = GetBot(message);\r\n                    if (bot == null) return;\r\n\r\n                    var m = message as TLMessage;\r\n                    if (m != null)\r\n                    {\r\n                        var mediaInvoice = m.Media as TLMessageMediaInvoice;\r\n                        if (mediaInvoice != null)\r\n                        {\r\n                            OpenInvoice(m, mediaInvoice);\r\n                        }\r\n                    }\r\n                    return;\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var keyboardButtonCallback = keyboardButtonBase as TLKeyboardButtonCallback;\r\n            if (keyboardButtonCallback != null)\r\n            {\r\n                if (message != null)\r\n                {\r\n                    IsWorking = true;\r\n                    MTProtoService.GetBotCallbackAnswerAsync(Peer, message.Id, keyboardButtonCallback.Data, null,\r\n                        result => BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n\r\n                            if (!TLString.IsNullOrEmpty(result.Message))\r\n                            {\r\n                                if (result.Alert)\r\n                                {\r\n                                    MessageBox.Show(result.Message.ToString());\r\n                                }\r\n                                else\r\n                                {\r\n                                    MTProtoService.SetMessageOnTime(2.0, result.Message.ToString());\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                var botCallbackAnswer54 = result as TLBotCallbackAnswer54;\r\n                                if (botCallbackAnswer54 != null)\r\n                                {\r\n                                    if (!TLString.IsNullOrEmpty(botCallbackAnswer54.Url))\r\n                                    {\r\n                                        var user = message.ViaBot as TLUser45;\r\n                                        if (user != null && user.IsBot)\r\n                                        {\r\n                                            if (!user.BotOpenUrlPermission)\r\n                                            {\r\n                                                var r = MessageBox.Show(string.Format(AppResources.BotOpenUrlConfirmation, \"@\" + user.UserName, botCallbackAnswer54.Url), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                                                if (r != MessageBoxResult.OK) return;\r\n\r\n                                                user.BotOpenUrlPermission = true;\r\n                                            }\r\n                                        }\r\n                                        else\r\n                                        {\r\n                                            var r = MessageBox.Show(string.Format(AppResources.OpenUrlConfirmation, botCallbackAnswer54.Url), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                                            if (r != MessageBoxResult.OK) return;\r\n                                        }\r\n\r\n                                        var task = new WebBrowserTask();\r\n                                        task.URL = HttpUtility.UrlEncode(botCallbackAnswer54.Url.ToString());\r\n                                        task.Show();\r\n                                    }\r\n                                }\r\n                            }\r\n                        }),\r\n                        error =>\r\n                        {\r\n                            IsWorking = false;\r\n                            Execute.ShowDebugMessage(\"messages.getCallbackAnswer error \" + error);\r\n                        });\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var keyboardButtonRequestPhone = keyboardButtonBase as TLKeyboardButtonRequestPhone;\r\n            if (keyboardButtonRequestPhone != null)\r\n            {\r\n                var currentUser = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n                if (currentUser != null)\r\n                {\r\n                    var bot = With as TLUser;\r\n                    if (bot != null)\r\n                    {\r\n                        var confirmation = MessageBox.Show(AppResources.SharePhoneNumberConfirmation, AppResources.SharePhoneNumberCaption, MessageBoxButton.OKCancel);\r\n                        if (confirmation == MessageBoxResult.OK)\r\n                        {\r\n                            SendContact(currentUser);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var keyboardButtonRequestGeoLocation = keyboardButtonBase as TLKeyboardButtonRequestGeoLocation;\r\n            if (keyboardButtonRequestGeoLocation != null)\r\n            {\r\n                var confirmation = MessageBox.Show(AppResources.ShareLocationConfirmation, AppResources.ShareLocationCaption, MessageBoxButton.OKCancel);\r\n                if (confirmation == MessageBoxResult.OK)\r\n                {\r\n                    var watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High);\r\n                    var locationSent = false;\r\n                    //System.Diagnostics.Debug.WriteLine(\"Watcher location={0} status={1}\", watcher.Position.Location, watcher.Status);\r\n                    watcher.StatusChanged += (o, e) =>\r\n                    {\r\n                        //System.Diagnostics.Debug.WriteLine(\"Watcher.StatusChanged location={0} status={1}\", watcher.Position.Location, watcher.Status);\r\n\r\n                        var location = watcher.Position.Location;\r\n\r\n                        if (watcher.Status == GeoPositionStatus.Ready)\r\n                        {\r\n                            if (locationSent)\r\n                            {\r\n                                watcher.Dispose();\r\n                                return;\r\n                            }\r\n\r\n                            if (location == GeoCoordinate.Unknown)\r\n                            {\r\n                                MessageBox.Show(AppResources.UnableToDetermineLocation, AppResources.AppName, MessageBoxButton.OKCancel);\r\n                            }\r\n                            else\r\n                            {\r\n                                SendLocation(new TLMessageMediaGeo { Geo = new TLGeoPoint { Lat = new TLDouble(location.Latitude), Long = new TLDouble(location.Longitude) } });\r\n                            }\r\n\r\n                            watcher.Dispose();\r\n                        }\r\n                        else if (watcher.Status == GeoPositionStatus.Initializing)\r\n                        {\r\n                            if (location != GeoCoordinate.Unknown)\r\n                            {\r\n                                if (locationSent) return;\r\n\r\n                                locationSent = true;\r\n                                SendLocation(new TLMessageMediaGeo { Geo = new TLGeoPoint { Lat = new TLDouble(location.Latitude), Long = new TLDouble(location.Longitude) } });\r\n                            }\r\n                        }\r\n                        else if (watcher.Status == GeoPositionStatus.Disabled)\r\n                        {\r\n                            var result = MessageBox.Show(AppResources.LocationServicesDisabled, AppResources.AppName, MessageBoxButton.OKCancel);\r\n                            if (result == MessageBoxResult.OK)\r\n                            {\r\n#if WP8\r\n                                Windows.System.Launcher.LaunchUriAsync(new Uri(\"ms-settings-location:\"));\r\n#endif\r\n                            }\r\n                            watcher.Dispose();\r\n                        }\r\n                    };\r\n                    watcher.Start(true);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            _text = keyboardButtonBase.Text.ToString();\r\n            var message31 = ReplyMarkupMessage;\r\n            if (message31 != null && message31.ReplyMarkup != null)\r\n            {\r\n                message31.ReplyMarkup.HasResponse = true;\r\n            }\r\n            Execute.BeginOnUIThread(() => SendInternal(true, true));\r\n        }\r\n\r\n        public void OpenGame(TLMessageMediaGame mediaGame)\r\n        {\r\n            var message =\r\n                Items.OfType<TLMessage>()\r\n                    .FirstOrDefault(x => x.Media is TLMessageMediaGame && ((TLMessageMediaGame)x.Media) == mediaGame);\r\n\r\n            if (message == null) return;\r\n            var bot = GetBot(message);\r\n            if (bot == null) return;\r\n\r\n            OpenGame(message, bot, mediaGame.Game);\r\n        }\r\n\r\n        private void OpenGame(TLMessageBase message, TLUser bot, TLGame game)\r\n        {\r\n            var user45 = bot as TLUser45;\r\n            if (user45 != null && !user45.IsVerified && !user45.BotPassTelegramNameToWebPagesPermission)\r\n            {\r\n                var confirmation = MessageBox.Show(string.Format(AppResources.OpenWebPagesViaBotConfirmation, bot.FullName2), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                if (confirmation != MessageBoxResult.OK) return;\r\n\r\n                user45.BotPassTelegramNameToWebPagesPermission = true;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetBotCallbackAnswerAsync(Peer, message.Id, null, TLBool.True,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var botCallbackAnswer54 = result as TLBotCallbackAnswer54;\r\n                    if (botCallbackAnswer54 != null)\r\n                    {\r\n                        View.StopPlayersAndCreateBitmapCache(() =>\r\n                        {\r\n                            StateService.InputPeer = Peer;\r\n                            StateService.Game = game;\r\n                            StateService.BotCallbackAnswer = result;\r\n                            StateService.ForwardMessages = new List<TLMessageBase> { message };\r\n                            StateService.SharedContact = bot;\r\n                            NavigationService.UriFor<WebViewModel>().Navigate();\r\n                        });\r\n                    }\r\n                }),\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.getCallbackAnswer error \" + error);\r\n                });\r\n        }\r\n\r\n        public void OpenInvoice(TLMessage message, TLMessageMediaInvoice mediaInvoice)\r\n        {\r\n            if (message == null) return;\r\n\r\n            if (mediaInvoice.ReceiptMsgId != null)\r\n            {\r\n                OpenReceipt(message, mediaInvoice.ReceiptMsgId);\r\n\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetPaymentFormAsync(message.Id,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    StateService.PaymentInfo = new PaymentInfo\r\n                    {\r\n                        Message = message,\r\n                        Form = result,\r\n                        With = With\r\n                    };\r\n\r\n                    if (result.Invoice.NameRequested\r\n                        || result.Invoice.PhoneRequested\r\n                        || result.Invoice.EmailRequested\r\n                        || result.Invoice.ShippingAddressRequested)\r\n                    {\r\n                        View.StopPlayersAndCreateBitmapCache(() =>\r\n                        {\r\n                            NavigationService.UriFor<ShippingInfoViewModel>().Navigate();\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        PaymentViewModelBase.NavigateToCardInfo(View, StateService.PaymentInfo, () => StateService.GetTmpPassword(), NavigationService);\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (error.TypeEquals(ErrorType.INVOICE_ALREADY_PAID))\r\n                    {\r\n                        OpenReceipt(message, mediaInvoice.ReceiptMsgId);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private void OpenReceipt(TLMessage message, TLInt receiptMsgId)\r\n        {\r\n            if (receiptMsgId == null) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetPaymentReceiptAsync(receiptMsgId,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    StateService.PaymentInfo = new PaymentInfo\r\n                    {\r\n                        Message = message,\r\n                        Receipt = result\r\n                    };\r\n                    View.StopPlayersAndCreateBitmapCache(() =>\r\n                    {\r\n                        NavigationService.UriFor<CheckoutViewModel>().Navigate();\r\n                    });\r\n                }),\r\n                error => Execute.BeginOnUIThread(() => { IsWorking = false; }));\r\n        }\r\n\r\n        private TLUser GetBot(TLMessageBase message)\r\n        {\r\n            var bot = With as TLUser;\r\n            if (bot == null || !bot.IsBot)\r\n            {\r\n                bot = message.ViaBot as TLUser;\r\n            }\r\n            if (bot == null || !bot.IsBot)\r\n            {\r\n                var m = message as TLMessage;\r\n                if (m != null)\r\n                {\r\n                    bot = m.From as TLUser;\r\n                }\r\n            }\r\n            return bot;\r\n        }\r\n\r\n        public void Send(TLString command)\r\n        {\r\n            if (TLString.IsNullOrEmpty(command)) return;\r\n\r\n            _text = command.ToString();\r\n            Execute.BeginOnUIThread(() => SendInternal(false, true));\r\n        }\r\n\r\n        internal Stopwatch _debugTimer;\r\n\r\n        private void SendInternal(bool useReplyMarkup, bool scrollToBottom)\r\n        {\r\n            _debugNotifyOfPropertyChanged = true;\r\n            _debugTimer = Stopwatch.StartNew();\r\n            var elapsed = new List<TimeSpan>();\r\n\r\n            if (!CanSend) return;\r\n\r\n            var text = GetTrimmedText(Text) ?? string.Empty;\r\n\r\n            if (ProcessSpecialCommands(text)) return;\r\n\r\n            //check maximum message length\r\n            if (text.Length > Constants.MaximumMessageLength)\r\n            {\r\n                MessageBox.Show(String.Format(AppResources.MaximumMessageLengthExceeded, Constants.MaximumMessageLength), AppResources.Error, MessageBoxButton.OK);\r\n\r\n                return;\r\n            }\r\n\r\n            // 0\r\n            elapsed.Add(_debugTimer.Elapsed);\r\n\r\n            elapsed.Add(_debugTimer.Elapsed);\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                var messagesContainer = Reply as TLMessagesContainter;\r\n                if (messagesContainer != null)\r\n                {\r\n                    var fwdMessages25 = messagesContainer.FwdMessages;\r\n                    var fwdMessages = new TLVector<TLMessage>();\r\n                    for (var i = 0; i < fwdMessages25.Count; i++)\r\n                    {\r\n                        fwdMessages.Add(fwdMessages25[i]);\r\n                    }\r\n\r\n                    if (fwdMessages25.Count > 0)\r\n                    {\r\n                        SendMessages(fwdMessages, m => SendForwardMessagesInternal(MTProtoService, Peer, null, fwdMessages25, messagesContainer.WithMyScore));\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                // 2\r\n                elapsed.Add(_debugTimer.Elapsed);\r\n\r\n                string processedText;\r\n                var entities = GetEntities(text, out processedText);\r\n\r\n                var message = GetMessage(new TLString(processedText), new TLMessageMediaEmpty());\r\n                if (entities != null)\r\n                {\r\n                    var message48 = message as TLMessage48;\r\n                    if (message48 != null)\r\n                    {\r\n                        message48.Entities = new TLVector<TLMessageEntityBase>(entities);\r\n                    }\r\n                }\r\n\r\n                if (Reply != null && IsWebPagePreview(Reply))\r\n                {\r\n                    message._media = ((TLMessagesContainter)Reply).WebPageMedia;\r\n                    Reply = _previousReply;\r\n                }\r\n                else\r\n                {\r\n                    TLMessageMediaBase media;\r\n                    if (_webPagesCache.TryGetValue(text, out media))\r\n                    {\r\n                        var webPageMessageMedia = media as TLMessageMediaWebPage;\r\n                        if (webPageMessageMedia != null)\r\n                        {\r\n                            var webPage = webPageMessageMedia.WebPage;\r\n                            if (webPage != null)\r\n                            {\r\n                                message.NoWebpage = true;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                // 3\r\n                elapsed.Add(_debugTimer.Elapsed);\r\n                Text = string.Empty;\r\n\r\n                // 4\r\n                elapsed.Add(_debugTimer.Elapsed);\r\n                var previousMessage = InsertSendingMessage(message, useReplyMarkup);\r\n\r\n                // 5\r\n                elapsed.Add(_debugTimer.Elapsed);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                // 6\r\n                elapsed.Add(_debugTimer.Elapsed);\r\n                var user = With as TLUser;\r\n                if (user != null && user.IsBot && Items.Count == 1)\r\n                {\r\n                    NotifyOfPropertyChange(() => With);\r\n                }\r\n\r\n                // 7\r\n                elapsed.Add(_debugTimer.Elapsed);\r\n                if (scrollToBottom)\r\n                {\r\n                    ProcessScroll();\r\n                }\r\n\r\n                // 8\r\n                elapsed.Add(_debugTimer.Elapsed);\r\n\r\n                var sb = new StringBuilder();\r\n                for (var i = 0; i < elapsed.Count; i++)\r\n                {\r\n                    sb.AppendLine(i + \" \" + elapsed[i]);\r\n                }\r\n                System.Diagnostics.Debug.WriteLine(sb);\r\n\r\n                BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    var shellViewModel = IoC.Get<ShellViewModel>();\r\n                    shellViewModel.CloseSearch();\r\n                });\r\n\r\n                _debugNotifyOfPropertyChanged = false;\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        m => SendInternal(message, MTProtoService, null, () => Status = string.Empty)));\r\n            }\r\n        }\r\n\r\n        public IList<TLMessageEntityBase> GetEntities(string text, out string processedText)\r\n        {\r\n            var entities = new List<TLMessageEntityBase>();\r\n\r\n            var startIndex = -1;\r\n            var entityString = string.Empty;\r\n            var entityLength = 0;\r\n\r\n            for (var i = 0; i < text.Length; i++)\r\n            {\r\n                // mention name\r\n                if (text[i] == '@')\r\n                {\r\n                    startIndex = i;\r\n\r\n                    entityString = GetMentionNameEntityString(text, i, out entityLength);\r\n                    if (!string.IsNullOrEmpty(entityString))\r\n                    {\r\n                        var user = _mentions.FirstOrDefault();\r\n                        if (user != null)\r\n                        {\r\n                            _mentions.RemoveAt(0);\r\n\r\n                            var entity = new TLInputMessageEntityMentionName\r\n                            {\r\n                                Length = new TLInt(entityLength + 3),\r\n                                Offset = new TLInt(startIndex),\r\n                                User = user.ToInputUser(),\r\n                                Name = entityString\r\n                            };\r\n\r\n                            entities.Add(entity);\r\n\r\n                            i = i + entityLength + 2;\r\n                        }\r\n                    }\r\n\r\n                    entityString = GetMentionEntityString(text, i, out entityLength);\r\n                    if (!string.IsNullOrEmpty(entityString))\r\n                    {\r\n                        var entity = new TLMessageEntityMention\r\n                        {\r\n                            Length = new TLInt(entityLength + 1),\r\n                            Offset = new TLInt(startIndex)\r\n                        };\r\n\r\n                        entities.Add(entity);\r\n\r\n                        i = i + entityLength + 0;\r\n                    }\r\n                }\r\n\r\n                // bold\r\n                else if (text[i] == '*' && i + 1 < text.Length && text[i + 1] == '*')\r\n                {\r\n                    startIndex = i;\r\n\r\n                    entityString = GetTwoSymbolEntityString('*', text, i, out entityLength);\r\n                    if (!string.IsNullOrEmpty(entityString))\r\n                    {\r\n                        var entity = new TLMessageEntityBold\r\n                        {\r\n                            Length = new TLInt(entityLength + 4),\r\n                            Offset = new TLInt(startIndex)\r\n                        };\r\n\r\n                        entities.Add(entity);\r\n\r\n                        i = i + entityLength + 3;\r\n                    }\r\n                }\r\n\r\n                // italic\r\n                else if (text[i] == '_' && i + 1 < text.Length && text[i + 1] == '_')\r\n                {\r\n                    startIndex = i;\r\n\r\n                    entityString = GetTwoSymbolEntityString('_', text, i, out entityLength);\r\n                    if (!string.IsNullOrEmpty(entityString))\r\n                    {\r\n                        var entity = new TLMessageEntityItalic\r\n                        {\r\n                            Length = new TLInt(entityLength + 4),\r\n                            Offset = new TLInt(startIndex)\r\n                        };\r\n\r\n                        entities.Add(entity);\r\n\r\n                        i = i + entityLength + 3;\r\n                    }\r\n                }\r\n\r\n                // code\r\n                else if (text[i] == '`')\r\n                {\r\n                    startIndex = i;\r\n\r\n                    entityString = GetCodeEntityString(text, i, out entityLength);\r\n                    if (!string.IsNullOrEmpty(entityString))\r\n                    {\r\n                        var entity = new TLMessageEntityCode\r\n                        {\r\n                            Length = new TLInt(entityLength + 2),\r\n                            Offset = new TLInt(startIndex)\r\n                        };\r\n\r\n                        entities.Add(entity);\r\n\r\n                        i = i + entityLength + 1;\r\n                    }\r\n                }\r\n\r\n                // pre\r\n                else if (text[i] == '`' && i + 2 < text.Length && text[i + 1] == '`' && text[i + 2] == '`')\r\n                {\r\n                    startIndex = i;\r\n\r\n                    entityString = GetPreEntityString(text, i, out entityLength);\r\n                    if (!string.IsNullOrEmpty(entityString))\r\n                    {\r\n                        var entity = new TLMessageEntityPre\r\n                        {\r\n                            Length = new TLInt(entityLength + 6),\r\n                            Offset = new TLInt(startIndex),\r\n                            Language = TLString.Empty\r\n                        };\r\n\r\n                        entities.Add(entity);\r\n\r\n                        i = i + entityLength + 5;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var count = entities.Count;\r\n            if (count > 0)\r\n            {\r\n                var bulder = new StringBuilder();\r\n\r\n                //text\r\n                for (var i = 0; i < entities.Count; i++)\r\n                {\r\n                    // prefix i\r\n                    var prefixOffset = i == 0 ? 0 : entities[i - 1].Offset.Value + entities[i - 1].Length.Value;\r\n                    var prefixLength = i == 0 ? entities[i].Offset.Value : entities[i].Offset.Value - prefixOffset;\r\n                    var prefix = text.Substring(prefixOffset, prefixLength);\r\n                    bulder.Append(prefix);\r\n\r\n                    // entity i\r\n                    var entityMentionName = entities[i] as TLInputMessageEntityMentionName;\r\n                    if (entityMentionName != null)\r\n                    {\r\n                        bulder.Append(entityMentionName.Name);\r\n                        continue;\r\n                    }\r\n                    var entityMention = entities[i] as TLMessageEntityMention;\r\n                    if (entityMention != null)\r\n                    {\r\n                        bulder.Append(text.Substring(entityMention.Offset.Value, entityMention.Length.Value));\r\n                        continue;\r\n                    }\r\n                    var entityBold = entities[i] as TLMessageEntityBold;\r\n                    if (entityBold != null)\r\n                    {\r\n                        bulder.Append(text.Substring(entityBold.Offset.Value + 2, entityBold.Length.Value - 4));\r\n                        continue;\r\n                    }\r\n                    var entityItalic = entities[i] as TLMessageEntityItalic;\r\n                    if (entityItalic != null)\r\n                    {\r\n                        bulder.Append(text.Substring(entityItalic.Offset.Value + 2, entityItalic.Length.Value - 4));\r\n                        continue;\r\n                    }\r\n                    var entityCode = entities[i] as TLMessageEntityCode;\r\n                    if (entityCode != null)\r\n                    {\r\n                        bulder.Append(text.Substring(entityCode.Offset.Value + 1, entityCode.Length.Value - 2));\r\n                        continue;\r\n                    }\r\n                    var entityPre = entities[i] as TLMessageEntityPre;\r\n                    if (entityPre != null)\r\n                    {\r\n                        bulder.Append(text.Substring(entityPre.Offset.Value + 3, entityPre.Length.Value - 6));\r\n                        continue;\r\n                    }\r\n\r\n                    bulder.Append(text.Substring(entities[i].Offset.Value, entities[i].Length.Value));\r\n                }\r\n\r\n                //postfix\r\n                var lastEntity = entities[count - 1];\r\n                var postfix = text.Substring(lastEntity.Offset.Value + lastEntity.Length.Value);\r\n                bulder.Append(postfix);\r\n                processedText = bulder.ToString();\r\n\r\n                var removedLength = 0;\r\n                var totalRemovedLength = 0;\r\n                for (var i = 0; i < entities.Count; i++)\r\n                {\r\n                    var entityName = entities[i] as TLInputMessageEntityMentionName;\r\n                    if (entityName != null)\r\n                    {\r\n                        removedLength = 3;  // @(...)\r\n                    }\r\n                    var entityMention = entities[i] as TLMessageEntityMention;\r\n                    if (entityMention != null)\r\n                    {\r\n                        removedLength = 0;  // @...\r\n                    }\r\n                    var bold = entities[i] as TLMessageEntityBold;\r\n                    if (bold != null)\r\n                    {\r\n                        removedLength = 4;  // **...**\r\n                    }\r\n                    var italic = entities[i] as TLMessageEntityItalic;\r\n                    if (italic != null)\r\n                    {\r\n                        removedLength = 4;  // __...__\r\n                    }\r\n                    var code = entities[i] as TLMessageEntityCode;\r\n                    if (code != null)\r\n                    {\r\n                        removedLength = 2;  // `...`\r\n                    }\r\n                    var pre = entities[i] as TLMessageEntityPre;\r\n                    if (pre != null)\r\n                    {\r\n                        removedLength = 6;  // ```...```\r\n                    }\r\n                    entities[i].Offset = new TLInt(entities[i].Offset.Value - totalRemovedLength);\r\n                    entities[i].Length = new TLInt(entities[i].Length.Value - removedLength);\r\n                    totalRemovedLength += removedLength;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                processedText = text;\r\n            }\r\n\r\n            ClearMentions();\r\n\r\n            return entities;\r\n        }\r\n\r\n        private string GetMentionEntityString(string text, int startPosition, out int l)\r\n        {\r\n            l = 0;\r\n\r\n            if (text.Length < startPosition + 3) return string.Empty;\r\n            if (text[startPosition] != '@') return string.Empty;\r\n\r\n            var length = 0;\r\n            for (var i = startPosition + 1; i < text.Length; i++)\r\n            {\r\n                if (BrowserNavigationService.IsValidUsernameSymbol(text[i]))\r\n                {\r\n                    length++;\r\n                }\r\n                else\r\n                {\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (length <= 3 || length > 32)\r\n            {\r\n                return string.Empty;\r\n            }\r\n\r\n            l = length;\r\n            return text.Substring(startPosition, length + 1);\r\n        }\r\n\r\n        private string GetMentionNameEntityString(string text, int startPosition, out int l)\r\n        {\r\n            l = 0;\r\n\r\n            if (text.Length < startPosition + 2) return string.Empty;\r\n            if (text[startPosition] != '@') return string.Empty;\r\n            if (text[startPosition + 1] != '(') return string.Empty;\r\n\r\n            var length = 0;\r\n            var hasCloseSymbol = false;\r\n            for (var i = startPosition + 2; i < text.Length; i++)\r\n            {\r\n                if (text[i] != ')')\r\n                {\r\n                    length++;\r\n                }\r\n                else\r\n                {\r\n                    hasCloseSymbol = true;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (!hasCloseSymbol)\r\n            {\r\n                return string.Empty;\r\n            }\r\n\r\n            l = length;\r\n            return text.Substring(startPosition + 2, length);\r\n        }\r\n\r\n        private string GetCodeEntityString(string text, int startPosition, out int l)\r\n        {\r\n            l = 0;\r\n\r\n            if (text.Length < startPosition + 2) return string.Empty;\r\n            if (text[startPosition] != '`') return string.Empty;\r\n\r\n            var length = 0;\r\n            var hasCloseSymbol = false;\r\n            for (var i = startPosition + 1; i < text.Length; i++)\r\n            {\r\n                if (text[i] != '`')\r\n                {\r\n                    length++;\r\n                }\r\n                else\r\n                {\r\n                    hasCloseSymbol = true;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (!hasCloseSymbol)\r\n            {\r\n                return string.Empty;\r\n            }\r\n\r\n            l = length;\r\n            return text.Substring(startPosition + 1, length);\r\n        }\r\n\r\n        private string GetPreEntityString(string text, int startPosition, out int l)\r\n        {\r\n            l = 0;\r\n\r\n            if (text.Length < startPosition + 6) return string.Empty;\r\n            if (text[startPosition] != '`') return string.Empty;\r\n            if (text[startPosition + 1] != '`') return string.Empty;\r\n            if (text[startPosition + 2] != '`') return string.Empty;\r\n\r\n            var length = 0;\r\n            var hasCloseSymbol = false;\r\n            for (var i = startPosition + 3; i < text.Length; i++)\r\n            {\r\n                if (text[i] != '`')\r\n                {\r\n                    length++;\r\n                }\r\n                else\r\n                {\r\n                    hasCloseSymbol = i + 2 < text.Length && text[i + 1] == '`' && text[i + 2] == '`';\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (!hasCloseSymbol)\r\n            {\r\n                return string.Empty;\r\n            }\r\n\r\n            l = length;\r\n            return text.Substring(startPosition + 1, length);\r\n        }\r\n\r\n        private string GetTwoSymbolEntityString(char symbol, string text, int startPosition, out int l)\r\n        {\r\n            l = 0;\r\n\r\n            if (text.Length < startPosition + 5) return string.Empty;\r\n            if (text[startPosition] != symbol) return string.Empty;\r\n            if (text[startPosition + 1] != symbol) return string.Empty;\r\n\r\n            var length = 0;\r\n            var hasCloseSymbol = false;\r\n            for (var i = startPosition + 2; i < text.Length; i++)\r\n            {\r\n                if (text[i] != symbol)\r\n                {\r\n                    length++;\r\n                }\r\n                else\r\n                {\r\n                    hasCloseSymbol = i + 1 < text.Length && text[i + 1] == symbol;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (!hasCloseSymbol)\r\n            {\r\n                return string.Empty;\r\n            }\r\n\r\n            l = length;\r\n            return text.Substring(startPosition + 2, length);\r\n        }\r\n\r\n        private string GetIndexString(string text, int startPosition, out int l)\r\n        {\r\n            l = 0;\r\n\r\n            if (text.Length < startPosition + 1) return string.Empty;\r\n\r\n            var length = 0;\r\n            for (var i = startPosition; i < text.Length; i++)\r\n            {\r\n                if (text[i] >= '0' && text[i] <= '9')\r\n                {\r\n                    length++;\r\n                }\r\n                else if (text[i] == ' ')\r\n                {\r\n                    break;\r\n                }\r\n                else\r\n                {\r\n                    return string.Empty;\r\n                }\r\n            }\r\n\r\n            l = length;\r\n            return text.Substring(startPosition, length);\r\n        }\r\n\r\n        private void SendMessages(IList<TLMessage> messages, Action<IList<TLMessage>> callback)\r\n        {\r\n            var previousMessage = Items.FirstOrDefault();\r\n\r\n            if (messages.Count == 1)\r\n            {\r\n                InsertSendingMessage(messages[0] as TLMessage25);\r\n            }\r\n            else\r\n            {\r\n                var uploadService = IoC.Get<IUploadService>();\r\n\r\n                var mediaMessage = messages.FirstOrDefault() as TLMessage73;\r\n                var groupedId = mediaMessage != null ? mediaMessage.GroupedId : null;\r\n                if (groupedId != null)\r\n                {\r\n                    var messageMediaGroup = new TLMessageMediaGroup { Group = new TLVector<TLMessageBase>() };\r\n                    var message = (TLMessage73)GetMessage(TLString.Empty, messageMediaGroup);\r\n                    message.Status = MessageStatus.Sending;\r\n                    message.ReplyToMsgId = mediaMessage.ReplyToMsgId;\r\n                    message.Reply = mediaMessage.Reply;\r\n                    message.GroupedId = groupedId;\r\n\r\n                    for (var i = 0; i < messages.Count; i++)\r\n                    {\r\n                        if (i % Constants.MaxGroupedMediaCount == 0)\r\n                        {\r\n                            if (messageMediaGroup.Group.Count > 0)\r\n                            {\r\n                                uploadService.AddGroup(message);\r\n                                Items.Insert(0, message);\r\n                                if (message.GroupedId != null)\r\n                                {\r\n                                    _group[message.GroupedId.Value] = message;\r\n                                }\r\n                            }\r\n\r\n                            mediaMessage = messages[i] as TLMessage73;\r\n                            groupedId = mediaMessage != null ? mediaMessage.GroupedId : null;\r\n\r\n                            messageMediaGroup = new TLMessageMediaGroup { Group = new TLVector<TLMessageBase>() };\r\n                            message = (TLMessage73)GetMessage(TLString.Empty, messageMediaGroup);\r\n                            message.Status = MessageStatus.Sending;\r\n                            message.ReplyToMsgId = mediaMessage.ReplyToMsgId;\r\n                            message.Reply = mediaMessage.Reply;\r\n                            message.GroupedId = groupedId;\r\n                        }\r\n\r\n                        messageMediaGroup.Group.Add(messages[i]);\r\n                    }\r\n\r\n                    if (messageMediaGroup.Group.Count > 0)\r\n                    {\r\n                        uploadService.AddGroup(message);\r\n                        Items.Insert(0, message);\r\n                        if (message.GroupedId != null)\r\n                        {\r\n                            _group[message.GroupedId.Value] = message;\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    foreach (var message in messages)\r\n                    {\r\n                        CheckChannelMessage(message as TLMessage25);\r\n                        Items.Insert(0, message);\r\n                    }\r\n                }\r\n\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n                Reply = null;\r\n            }\r\n\r\n            BeginOnThreadPool(() =>\r\n                CacheService.SyncSendingMessages(\r\n                    messages, previousMessage,\r\n                    callback.SafeInvoke));\r\n        }\r\n\r\n        private bool _debugNotifyOfPropertyChanged;\r\n\r\n        public override void NotifyOfPropertyChange(string propertyName)\r\n        {\r\n            if (_debugNotifyOfPropertyChanged)\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(propertyName);\r\n                //Deployment.Current.Dispatcher.BeginInvoke(() => MessageBox.Show(propertyName));\r\n            }\r\n\r\n            base.NotifyOfPropertyChange(propertyName);\r\n        }\r\n\r\n        public void Send()\r\n        {\r\n            SendInternal(false, false);\r\n        }\r\n\r\n        private TLMessageBase InsertSendingMessage(TLMessage25 message, bool useReplyMarkup = false)\r\n        {\r\n            CheckChannelMessage(message);\r\n\r\n            TLMessageBase previousMessage;\r\n#if WP8\r\n            if (_isFirstSliceLoaded)\r\n            {\r\n                if (useReplyMarkup\r\n                    && ReplyMarkupMessage != null)\r\n                {\r\n                    var chatBase = With as TLChatBase;\r\n                    if (chatBase != null)\r\n                    {\r\n                        message.ReplyToMsgId = ReplyMarkupMessage.Id;\r\n                        message.Reply = ReplyMarkupMessage;\r\n                    }\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        if (Reply != null)\r\n                        {\r\n                            Reply = null;\r\n                            SetReplyMarkup(null);\r\n                        }\r\n                    });\r\n                }\r\n\r\n                var messagesContainer = Reply as TLMessagesContainter;\r\n                if (Reply != null)\r\n                {\r\n                    if (Reply.Index != 0)\r\n                    {\r\n                        message.ReplyToMsgId = Reply.Id;\r\n                        message.Reply = Reply;\r\n                    }\r\n                    else\r\n                    {\r\n                        if (messagesContainer != null)\r\n                        {\r\n                            if (!string.IsNullOrEmpty(message.Message.ToString()))\r\n                            {\r\n                                message.Reply = Reply;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var message31 = Reply as TLMessage31;\r\n                    if (message31 != null)\r\n                    {\r\n                        var replyMarkup = message31.ReplyMarkup;\r\n                        if (replyMarkup != null)\r\n                        {\r\n                            replyMarkup.HasResponse = true;\r\n                        }\r\n                    }\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        //var emptyMedia = message.Media as TLMessageMediaEmpty;\r\n                        //if (emptyMedia != null)\r\n                        {\r\n                            Reply = null;\r\n                        }\r\n                    });\r\n                }\r\n\r\n                previousMessage = Items.FirstOrDefault();\r\n                Items.Insert(0, message);\r\n\r\n                if (messagesContainer != null)\r\n                {\r\n                    var message48 = message as TLMessage48;\r\n                    if (message48 != null && message48.FwdHeader == null)\r\n                    {\r\n                        foreach (var fwdMessage in messagesContainer.FwdMessages)\r\n                        {\r\n                            CheckChannelMessage(fwdMessage as TLMessage25);\r\n                            Items.Insert(0, fwdMessage);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                for (var i = 1; i < Items.Count; i++)\r\n                {\r\n                    var serviceMessage = Items[i] as TLMessageService;\r\n                    if (serviceMessage != null)\r\n                    {\r\n                        var unreadMessagesAction = serviceMessage.Action as TLMessageActionUnreadMessages;\r\n                        if (unreadMessagesAction != null)\r\n                        {\r\n                            Items.RemoveAt(i);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                Execute.BeginOnUIThread(RaiseScrollToBottom);\r\n            }\r\n            else\r\n            {\r\n\r\n                var messagesContainer = Reply as TLMessagesContainter;\r\n                if (Reply != null)\r\n                {\r\n                    if (Reply.Index != 0)\r\n                    {\r\n                        message.ReplyToMsgId = Reply.Id;\r\n                        message.Reply = Reply;\r\n                    }\r\n                    else\r\n                    {\r\n                        if (messagesContainer != null)\r\n                        {\r\n                            if (!string.IsNullOrEmpty(message.Message.ToString()))\r\n                            {\r\n                                message.Reply = Reply;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    Reply = null;\r\n                }\r\n\r\n                Items.Clear();\r\n                Items.Add(message);\r\n                var messages = CacheService.GetHistory(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId));\r\n                previousMessage = messages.FirstOrDefault();\r\n                for (var i = 0; i < messages.Count; i++)\r\n                {\r\n                    Items.Add(messages[i]);\r\n                }\r\n\r\n                if (messagesContainer != null)\r\n                {\r\n                    if (!string.IsNullOrEmpty(message.Message.ToString()))\r\n                    {\r\n                        foreach (var fwdMessage in messagesContainer.FwdMessages)\r\n                        {\r\n                            Items.Insert(0, fwdMessage);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                for (var i = 1; i < Items.Count; i++)\r\n                {\r\n                    var serviceMessage = Items[i] as TLMessageService;\r\n                    if (serviceMessage != null)\r\n                    {\r\n                        var unreadMessagesAction = serviceMessage.Action as TLMessageActionUnreadMessages;\r\n                        if (unreadMessagesAction != null)\r\n                        {\r\n                            Items.RemoveAt(i);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n#else\r\n            var messagesContainer = Reply as TLMessagesContainter;\r\n            if (Reply != null)\r\n            {\r\n                if (Reply.Index != 0)\r\n                {\r\n                    message.ReplyToMsgId = Reply.Id;\r\n                    message.Reply = Reply;\r\n                }\r\n                else\r\n                {\r\n                    if (messagesContainer != null)\r\n                    {\r\n                        if (!string.IsNullOrEmpty(message.Message.ToString()))\r\n                        {\r\n                            message.Reply = Reply;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                Reply = null;\r\n            }\r\n\r\n            previousMessage = Items.FirstOrDefault();\r\n            Items.Insert(0, message);\r\n\r\n            if (messagesContainer != null)\r\n            {\r\n                if (!string.IsNullOrEmpty(message.Message.ToString()))\r\n                {\r\n                    foreach (var fwdMessage in messagesContainer.FwdMessages)\r\n                    {\r\n                        Items.Insert(0, fwdMessage);\r\n                    }\r\n                }\r\n            }\r\n\r\n            for (var i = 1; i < Items.Count; i++)\r\n            {\r\n                var serviceMessage = Items[i] as TLMessageService;\r\n                if (serviceMessage != null)\r\n                {\r\n                    var unreadMessagesAction = serviceMessage.Action as TLMessageActionUnreadMessages;\r\n                    if (unreadMessagesAction != null)\r\n                    {\r\n                        Items.RemoveAt(i);\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            Execute.BeginOnUIThread(RaiseScrollToBottom);\r\n#endif\r\n            return previousMessage;\r\n        }\r\n\r\n        private bool ProcessSpecialCommands(string text)\r\n        {\r\n            if (string.IsNullOrEmpty(text) || text[0] != '/') return false;\r\n\r\n            if (string.Equals(text, \"/tlg_stgs\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n\r\n                Execute.BeginOnThreadPool(async () =>\r\n                {\r\n                    using (var fileStream = await ApplicationData.Current.LocalFolder.OpenStreamForReadAsync(\"__ApplicationSettings\"))\r\n                    {\r\n                        using (var streamReader = new StreamReader(fileStream))\r\n                        {\r\n                            var line = streamReader.ReadToEnd() ?? string.Empty;\r\n\r\n                            try\r\n                            {\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    MessageBox.Show(line);\r\n                                    Clipboard.SetText(line);\r\n                                });\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                            }\r\n                        }\r\n                    }\r\n                });\r\n\r\n                Text = string.Empty;\r\n                return true;\r\n            }\r\n\r\n            if (string.Equals(text, \"/tlg_msgs_err\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                ShowLastSyncErrors(info =>\r\n                {\r\n                    try\r\n                    {\r\n                        Clipboard.SetText(info);\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n\r\n                    }\r\n                });\r\n                Text = string.Empty;\r\n                return true;\r\n            }\r\n\r\n            if (text != null\r\n                && text.StartsWith(\"/tlg_msgs\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                try\r\n                {\r\n                    var parameters = text.Split(' ');\r\n                    var limit = 15;\r\n                    if (parameters.Length > 1)\r\n                    {\r\n                        limit = Convert.ToInt32(parameters[1]);\r\n                    }\r\n\r\n                    ShowMessagesInfo(limit, info =>\r\n                    {\r\n                        try\r\n                        {\r\n                            Clipboard.SetText(info);\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n\r\n                        }\r\n                    });\r\n                    Text = string.Empty;\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Execute.BeginOnUIThread(() => MessageBox.Show(\"Unknown command\"));\r\n                }\r\n                return true;\r\n            }\r\n\r\n            if (string.Equals(text, \"/tlg_cfg\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                ShowConfigInfo(info =>\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        try\r\n                        {\r\n\r\n                            MessageBox.Show(info);\r\n                            Clipboard.SetText(info);\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                        }\r\n\r\n                    });\r\n                });\r\n                Text = string.Empty;\r\n                return true;\r\n            }\r\n\r\n            if (string.Equals(text, \"/tlg_tr\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                ShowTransportInfo(info =>\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        try\r\n                        {\r\n\r\n                            MessageBox.Show(info);\r\n                            Clipboard.SetText(info);\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                        }\r\n                    });\r\n                });\r\n\r\n                Text = string.Empty;\r\n                return true;\r\n            }\r\n\r\n            if (text != null\r\n                && text.StartsWith(\"/tlg_del_c\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                try\r\n                {\r\n                    var parameters = text.Split(' ');\r\n                    var id = -1;\r\n                    if (parameters.Length > 1)\r\n                    {\r\n                        id = Convert.ToInt32(parameters[1]);\r\n                    }\r\n\r\n                    var chat = CacheService.GetChat(new TLInt(id));\r\n                    if (chat != null)\r\n                    {\r\n                        CacheService.DeleteChat(new TLInt(id));\r\n                        CacheService.Commit();\r\n                    }\r\n                    Execute.BeginOnUIThread(() => MessageBox.Show(\"Complete\"));\r\n                    Text = string.Empty;\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Execute.BeginOnUIThread(() => MessageBox.Show(\"Unknown command\"));\r\n                }\r\n\r\n                return true;\r\n            }\r\n\r\n            if (text != null\r\n                && text.StartsWith(\"/tlg_del_u\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                try\r\n                {\r\n                    var parameters = text.Split(' ');\r\n                    var id = -1;\r\n                    if (parameters.Length > 1)\r\n                    {\r\n                        id = Convert.ToInt32(parameters[1]);\r\n                    }\r\n\r\n                    var user = CacheService.GetUser(new TLInt(id));\r\n                    if (user != null)\r\n                    {\r\n                        CacheService.DeleteUser(new TLInt(id));\r\n                        CacheService.Commit();\r\n                    }\r\n                    Execute.BeginOnUIThread(() => MessageBox.Show(\"Complete\"));\r\n                    Text = string.Empty;\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Execute.BeginOnUIThread(() => MessageBox.Show(\"Unknown command\"));\r\n                }\r\n                return true;\r\n            }\r\n\r\n            if (text != null\r\n                && text.StartsWith(\"/tlg_up_tr\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                try\r\n                {\r\n                    var parameters = text.Split(' ');\r\n                    var dcOption = new TLDCOption78\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Id = new TLInt(Convert.ToInt32(parameters[1])),\r\n                        IpAddress = new TLString(parameters[2]),\r\n                        Port = new TLInt(Convert.ToInt32(parameters[3]))\r\n                    };\r\n\r\n                    MTProtoService.UpdateTransportInfoAsync(dcOption, dcOption.IpAddress, dcOption.Port,\r\n                        result =>\r\n                        {\r\n                            Execute.BeginOnUIThread(() => MessageBox.Show(\"Complete /tlg_up_tr\"));\r\n                        });\r\n\r\n                    Text = string.Empty;\r\n\r\n                    //ShowTransportInfo(info =>\r\n                    //{\r\n                    //    Execute.BeginOnUIThread(() =>\r\n                    //    {\r\n                    //        try\r\n                    //        {\r\n\r\n                    //            MessageBox.Show(info);\r\n                    //            Clipboard.SetText(info);\r\n                    //        }\r\n                    //        catch (Exception ex)\r\n                    //        {\r\n                    //        }\r\n\r\n                    //        Text = string.Empty;\r\n                    //    });\r\n                    //});\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Execute.BeginOnUIThread(() => MessageBox.Show(\"Unknown command\"));\r\n                }\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public event EventHandler<ScrollToEventArgs> ScrollTo;\r\n\r\n        protected virtual void RaiseScrollTo(ScrollToEventArgs args)\r\n        {\r\n            var handler = ScrollTo;\r\n            if (handler != null) handler(this, args);\r\n        }\r\n\r\n        public event EventHandler ScrollToBottom;\r\n\r\n        protected virtual void RaiseScrollToBottom()\r\n        {\r\n            var handler = ScrollToBottom;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public static TLInputPeerBase PeerToInputPeer(TLPeerBase peer)\r\n        {\r\n            if (peer is TLPeerUser)\r\n            {\r\n                var cachedUser = IoC.Get<ICacheService>().GetUser(peer.Id);\r\n                if (cachedUser != null)\r\n                {\r\n                    var userForeign = cachedUser as TLUserForeign;\r\n                    var userRequest = cachedUser as TLUserRequest;\r\n                    var user = cachedUser as TLUser;\r\n\r\n                    if (userForeign != null)\r\n                    {\r\n                        return new TLInputPeerUser { UserId = userForeign.Id, AccessHash = userForeign.AccessHash };\r\n                    }\r\n\r\n                    if (userRequest != null)\r\n                    {\r\n                        return new TLInputPeerUser { UserId = userRequest.Id, AccessHash = userRequest.AccessHash };\r\n                    }\r\n\r\n                    if (user != null)\r\n                    {\r\n                        return user.ToInputPeer();\r\n                    }\r\n\r\n                    return new TLInputPeerUser { UserId = peer.Id, AccessHash = new TLLong(0) };\r\n                }\r\n\r\n                return new TLInputPeerUser { UserId = peer.Id, AccessHash = new TLLong(0) };\r\n            }\r\n\r\n            if (peer is TLPeerChannel)\r\n            {\r\n                var channel = IoC.Get<ICacheService>().GetChat(peer.Id) as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    return new TLInputPeerChannel { ChatId = peer.Id, AccessHash = channel.AccessHash };\r\n                }\r\n            }\r\n\r\n            if (peer is TLPeerChat)\r\n            {\r\n                return new TLInputPeerChat { ChatId = peer.Id };\r\n            }\r\n\r\n            return new TLInputPeerBroadcast { ChatId = peer.Id };\r\n        }\r\n\r\n        public static void SendInternal(TLMessage25 message, IMTProtoService mtProtoService, System.Action callback = null, System.Action faultCallback = null)\r\n        {\r\n            var cacheService = IoC.Get<ICacheService>();\r\n\r\n            var inputPeer = PeerToInputPeer(message.ToId);\r\n\r\n            if (inputPeer is TLInputPeerBroadcast && !(inputPeer is TLInputPeerChannel))\r\n            {\r\n                var broadcast = cacheService.GetBroadcast(message.ToId.Id);\r\n                var contacts = new TLVector<TLInputUserBase>();\r\n\r\n                foreach (var participantId in broadcast.ParticipantIds)\r\n                {\r\n                    var contact = IoC.Get<ICacheService>().GetUser(participantId);\r\n                    contacts.Add(contact.ToInputUser());\r\n                }\r\n\r\n                mtProtoService.SendBroadcastAsync(contacts, new TLInputMediaEmpty(), message,\r\n                    result =>\r\n                    {\r\n                        message.Status = MessageStatus.Confirmed;\r\n                        callback.SafeInvoke();\r\n                    },\r\n                    () =>\r\n                    {\r\n                        message.Status = MessageStatus.Confirmed;\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.sendBroadcast error \" + error);\r\n\r\n                        if (message.Status == MessageStatus.Broadcast)\r\n                        {\r\n                            message.Status = message.Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                        }\r\n\r\n                        faultCallback.SafeInvoke();\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                var message45 = message as TLMessage45;\r\n                if (message45 != null\r\n                    && message45.InlineBotResultQueryId != null\r\n                    && !TLString.IsNullOrEmpty(message45.InlineBotResultId))\r\n                {\r\n\r\n                    mtProtoService.SendInlineBotResultAsync(\r\n                        message45,\r\n                        result =>\r\n                        {\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                var mediaGame = message.Media as TLMessageMediaGame;\r\n                                if (mediaGame != null)\r\n                                {\r\n                                    mediaGame.NotifyOfPropertyChange(() => mediaGame.Message);\r\n                                    mediaGame.NotifyOfPropertyChange(() => mediaGame.MessageVisibility);\r\n                                    mediaGame.NotifyOfPropertyChange(() => mediaGame.DescriptionVisibility);\r\n                                }\r\n\r\n                                message.NotifyOfPropertyChange(() => message.Media);\r\n                                message.NotifyOfPropertyChange(() => message45.ReplyMarkup);\r\n                            });\r\n\r\n                            callback.SafeInvoke();\r\n                        },\r\n                        () =>\r\n                        {\r\n                            message.Status = MessageStatus.Confirmed;\r\n                        },\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                            {\r\n                                //MessageBox.Show(AppResources.PeerFloodSendMessage, AppResources.Error, MessageBoxButton.OK);\r\n                                ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodSendMessage, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                                    result =>\r\n                                    {\r\n                                        if (result == CustomMessageBoxResult.RightButton)\r\n                                        {\r\n                                            TelegramViewBase.NavigateToUsername(mtProtoService, Constants.SpambotUsername, null, null, null);\r\n                                        }\r\n                                    });\r\n                            }\r\n                            else if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                            {\r\n                                MessageBox.Show(\"messages.sendInlineBotResult error \" + error, AppResources.Error, MessageBoxButton.OK);\r\n                            }\r\n                            else\r\n                            {\r\n                                Execute.ShowDebugMessage(\"messages.sendInlineBotResult error \" + error);\r\n                            }\r\n\r\n                            if (message.Status == MessageStatus.Sending)\r\n                            {\r\n                                message.Status = message.Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                            }\r\n\r\n                            faultCallback.SafeInvoke();\r\n                        }));\r\n                }\r\n                else\r\n                {\r\n                    mtProtoService.SendMessageAsync(\r\n                        (TLMessage36)message,\r\n                        result =>\r\n                        {\r\n                            callback.SafeInvoke();\r\n                        },\r\n                        () =>\r\n                        {\r\n                            message.Status = MessageStatus.Confirmed;\r\n                        },\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                            {\r\n                                //MessageBox.Show(AppResources.PeerFloodSendMessage, AppResources.Error, MessageBoxButton.OK);\r\n                                ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodSendMessage, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                                    result =>\r\n                                    {\r\n                                        if (result == CustomMessageBoxResult.RightButton)\r\n                                        {\r\n                                            TelegramViewBase.NavigateToUsername(mtProtoService, Constants.SpambotUsername, null, null, null);\r\n                                        }\r\n                                    });\r\n                            }\r\n                            else if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                            {\r\n                                MessageBox.Show(\"messages.sendMessage error \" + error, AppResources.Error, MessageBoxButton.OK);\r\n                            }\r\n                            else\r\n                            {\r\n                                Execute.ShowDebugMessage(\"messages.sendMessage error \" + error);\r\n                            }\r\n\r\n                            if (message.Status == MessageStatus.Sending)\r\n                            {\r\n                                message.Status = message.Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                            }\r\n\r\n                            faultCallback.SafeInvoke();\r\n                        }));\r\n                }\r\n\r\n                SendForwardedMessages(mtProtoService, inputPeer, message);\r\n            }\r\n        }\r\n\r\n        public void OpenFwdContactDetails(TLObject obj)\r\n        {\r\n            var messageForwarded = obj as TLMessageForwarded;\r\n            if (messageForwarded != null)\r\n            {\r\n                if (messageForwarded.FwdFrom == null) return;\r\n\r\n                StateService.CurrentContact = messageForwarded.FwdFrom;\r\n                NavigationService.UriFor<ContactViewModel>().Navigate();\r\n            }\r\n\r\n            var message25 = obj as TLMessage25;\r\n            if (message25 != null)\r\n            {\r\n                if (message25.FwdFrom == null) return;\r\n\r\n                var fwdHeader = message25.FwdFrom as TLMessageFwdHeader;\r\n                if (fwdHeader != null)\r\n                {\r\n                    if (fwdHeader.ChannelId != null)\r\n                    {\r\n                        var channel = CacheService.GetChat(fwdHeader.ChannelId) as TLChannel;\r\n                        if (channel != null)\r\n                        {\r\n                            if (With == channel)\r\n                            {\r\n                                OpenMessage(message25, fwdHeader.ChannelPost);\r\n\r\n                                return;\r\n                            }\r\n\r\n                            if (fwdHeader.ChannelPost != null)\r\n                            {\r\n                                StateService.Post = fwdHeader.ChannelPost.Value.ToString(CultureInfo.InvariantCulture);\r\n                            }\r\n                            StateService.With = channel;\r\n                            StateService.RemoveBackEntries = true;\r\n                            NavigationService.Navigate(new Uri(\"/Views/Dialogs/DialogDetailsView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative));\r\n                            return;\r\n                        }\r\n                    }\r\n                    else if (fwdHeader.FromId != null)\r\n                    {\r\n                        var user = CacheService.GetUser(fwdHeader.FromId);\r\n                        if (user != null)\r\n                        {\r\n                            StateService.CurrentContact = user;\r\n                            NavigationService.UriFor<ContactViewModel>().Navigate();\r\n                            return;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var fwdFromUser = message25.FwdFrom as TLUserBase;\r\n                if (fwdFromUser != null)\r\n                {\r\n                    StateService.CurrentContact = fwdFromUser;\r\n                    NavigationService.UriFor<ContactViewModel>().Navigate();\r\n                    return;\r\n                }\r\n\r\n                var fwdFromChannel = message25.FwdFrom as TLChannel;\r\n                if (fwdFromChannel != null)\r\n                {\r\n                    StateService.With = fwdFromChannel;\r\n                    StateService.RemoveBackEntries = true;\r\n                    NavigationService.Navigate(new Uri(\"/Views/Dialogs/DialogDetailsView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative));\r\n                    return;\r\n                }\r\n\r\n                var fwdFromChat = message25.FwdFrom as TLChatBase;\r\n                if (fwdFromChat != null)\r\n                {\r\n                    StateService.CurrentChat = fwdFromChat;\r\n                    NavigationService.UriFor<ChatViewModel>().Navigate();\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ShowUserProfile(TLMessage message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            StateService.CurrentContact = message.From as TLUserBase;\r\n            Execute.BeginOnUIThread(() => NavigationService.UriFor<ContactViewModel>().Navigate());\r\n        }\r\n\r\n        public void CancelUploading(TLMessageMediaBase media)\r\n        {\r\n            TLMessage message = null;\r\n            foreach (var item in UngroupEnumerator(Items))\r\n            {\r\n                var messageCommon = item as TLMessage;\r\n                if (messageCommon != null && messageCommon.Media == media)\r\n                {\r\n                    message = messageCommon;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (message != null)\r\n            {\r\n                DeleteUploadingMessage(message);\r\n            }\r\n        }\r\n\r\n        public void CancelVideoDownloading(TLMessageMediaBase mediaVideo)\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    var message = Items.OfType<TLMessage>().FirstOrDefault(x => x.Media == mediaVideo);\r\n                    DownloadVideoFileManager.CancelDownloadFileAsync(message);\r\n\r\n                    mediaVideo.IsCanceled = true;\r\n                    mediaVideo.LastProgress = mediaVideo.DownloadingProgress;\r\n                    mediaVideo.DownloadingProgress = 0.0;\r\n                });\r\n            });\r\n        }\r\n\r\n        public void CancelDocumentDownloading(TLMessageMediaBase mediaDocument)\r\n        {\r\n            if (mediaDocument.DownloadingProgress > 0.0)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    var message = Items.OfType<TLMessage>().FirstOrDefault(x => x.Media == mediaDocument);\r\n                    DownloadDocumentFileManager.CancelDownloadFileAsync(message);\r\n\r\n                    mediaDocument.IsCanceled = true;\r\n                    mediaDocument.LastProgress = mediaDocument.DownloadingProgress;\r\n                    mediaDocument.DownloadingProgress = 0.0;\r\n                });\r\n            }\r\n            else if (mediaDocument.UploadingProgress > 0.0)\r\n            {\r\n                CancelUploading(mediaDocument);\r\n            }\r\n        }\r\n\r\n        public void CancelDownloading(TLPhotoBase photo)\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                DownloadFileManager.CancelDownloadFile(photo);\r\n            });\r\n        }\r\n\r\n        public void CancelPhotoDownloading(TLMessageMediaPhoto mediaPhoto)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                DownloadFileManager.CancelDownloadFile(mediaPhoto.Photo);\r\n\r\n\r\n                mediaPhoto.IsCanceled = true;\r\n                mediaPhoto.LastProgress = mediaPhoto.DownloadingProgress;\r\n                mediaPhoto.DownloadingProgress = 0.0;\r\n            });\r\n        }\r\n\r\n        public void CancelAudioDownloading(TLMessageMediaBase mediaBase)\r\n        {\r\n            var mediaDocument = mediaBase as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                if (mediaDocument.UploadingProgress > 0.0)\r\n                {\r\n                    CancelUploading(mediaDocument);\r\n                }\r\n                else\r\n                {\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        DownloadAudioFileManager.CancelDownloadFile(mediaDocument);\r\n\r\n                        mediaDocument.IsCanceled = true;\r\n                        mediaDocument.LastProgress = mediaDocument.DownloadingProgress;\r\n                        mediaDocument.DownloadingProgress = -0.01;\r\n                    });\r\n                }\r\n                return;\r\n            }\r\n\r\n            var mediaAudio = mediaBase as TLMessageMediaAudio;\r\n            if (mediaAudio != null)\r\n            {\r\n                if (mediaAudio.UploadingProgress > 0.0)\r\n                {\r\n                    CancelUploading(mediaAudio);\r\n                }\r\n                else\r\n                {\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        DownloadAudioFileManager.CancelDownloadFile(mediaAudio);\r\n\r\n                        mediaAudio.IsCanceled = true;\r\n                        mediaAudio.LastProgress = mediaAudio.DownloadingProgress;\r\n                        mediaAudio.DownloadingProgress = -0.01;\r\n                    });\r\n                }\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void OpenChatPhoto()\r\n        {\r\n            var user = With as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                var photo = user.Photo as TLUserProfilePhoto;\r\n                if (photo != null)\r\n                {\r\n                    //StateService.CurrentPhoto = photo;\r\n                    //NavigationService.UriFor<ProfilePhotoViewerViewModel>().Navigate();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var chat = With as TLChat;\r\n            if (chat != null)\r\n            {\r\n                var photo = chat.Photo as TLChatPhoto;\r\n                if (photo != null)\r\n                {\r\n                    //StateService.CurrentPhoto = photo;\r\n                    //NavigationService.UriFor<ProfilePhotoViewerViewModel>().Navigate();\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void CancelDownloading()\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var item in Items.OfType<TLMessage>())\r\n                    {\r\n                        var mediaPhoto = item.Media as TLMessageMediaPhoto;\r\n                        if (mediaPhoto != null)\r\n                        {\r\n                            CancelDownloading(mediaPhoto.Photo);\r\n                        }\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n        public void PinToStart()\r\n        {\r\n            DialogsViewModel.PinToStartCommon(new TLDialog24 { With = With });\r\n        }\r\n\r\n        public void ProcessScroll()\r\n        {\r\n            // replies\r\n            if (_previousScrollPosition != null && Items.IndexOf(_previousScrollPosition) != -1)\r\n            {\r\n                RaiseScrollTo(new ScrollToEventArgs(_previousScrollPosition));\r\n                _previousScrollPosition = null;\r\n                return;\r\n            }\r\n\r\n\r\n            // unread separator\r\n            if (!_isFirstSliceLoaded)\r\n            {\r\n                Items.Clear();\r\n                var messages = CacheService.GetHistory(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId));\r\n                ProcessMessages(messages);\r\n\r\n                const int maxCount = 10;\r\n                for (var i = 0; i < messages.Count && i < maxCount; i++)\r\n                {\r\n                    Items.Add(messages[i]);\r\n                }\r\n\r\n                //wait to complete animation for hiding ScrollToBottomButton\r\n                BeginOnUIThread(TimeSpan.FromSeconds(0.35), () =>\r\n                {\r\n                    for (var i = maxCount; i < messages.Count; i++)\r\n                    {\r\n                        Items.Add(messages[i]);\r\n                    }\r\n                    _isFirstSliceLoaded = true;\r\n\r\n                    UpdateItemsAsync(0, 0, Constants.FileSliceLength, false);\r\n                });\r\n            }\r\n            else\r\n            {\r\n                RaiseScrollToBottom();\r\n            }\r\n        }\r\n\r\n        public void Help()\r\n        {\r\n            _text = \"/help\";\r\n            Send();\r\n        }\r\n\r\n        public void OpenStickerSettings()\r\n        {\r\n            NavigationService.UriFor<StickersViewModel>().Navigate();\r\n        }\r\n\r\n        public void Call()\r\n        {\r\n            ShellViewModel.StartVoiceCall(With as TLUser, IoC.Get<IVoIPService>(), IoC.Get<ICacheService>());\r\n        }\r\n\r\n        public void OnOpenPhone(object sender, TelegramPhoneEventArgs e)\r\n        {\r\n            if (e == null) return;\r\n            if (string.IsNullOrEmpty(e.Phone)) return;\r\n\r\n            var phone = e.Phone.StartsWith(\"+\") ? e.Phone : \"+\" + e.Phone;\r\n\r\n            var task = new PhoneCallTask\r\n            {\r\n                DisplayName = \"\",\r\n                PhoneNumber = phone\r\n            };\r\n            task.Show();\r\n        }\r\n    }\r\n\r\n    public class ScrollToEventArgs : System.EventArgs\r\n    {\r\n        public TLUserBase User { get; set; }\r\n\r\n        public TLMessageBase Message { get; set; }\r\n\r\n        public TLDecryptedMessageBase DecryptedMessage { get; set; }\r\n\r\n        public ScrollToEventArgs(TLUserBase user)\r\n        {\r\n            User = user;\r\n        }\r\n\r\n        public ScrollToEventArgs(TLMessageBase message)\r\n        {\r\n            Message = message;\r\n        }\r\n\r\n        public ScrollToEventArgs(TLDecryptedMessageBase message)\r\n        {\r\n            DecryptedMessage = message;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Channel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        public bool IsChannel\r\n        {\r\n            get { return With is TLChannel; }\r\n        }\r\n\r\n        public bool IsMegaGroup\r\n        {\r\n            get\r\n            {\r\n                var channel = With as TLChannel;\r\n                return channel != null && channel.IsMegaGroup;\r\n            }\r\n        }\r\n\r\n        private bool _isChannelMessage;\r\n\r\n        public bool IsChannelMessage\r\n        {\r\n            get { return _isChannelMessage; }\r\n            set\r\n            {\r\n                if (_isChannelMessage != value)\r\n                {\r\n                    _isChannelMessage = value;\r\n                    NotifyOfPropertyChange(() => ChannelMessageBrush);\r\n                }\r\n            }\r\n        }\r\n\r\n        public Visibility ChannelVisibility\r\n        {\r\n            get { return IsChannel ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public Brush ChannelMessageBrush\r\n        {\r\n            get\r\n            {\r\n                var brush = IsChannelMessage\r\n                    ? (Brush)Application.Current.Resources[\"PhoneAccentBrush\"]\r\n                    : (Brush)Application.Current.Resources[\"PhoneChromeBrush\"];\r\n                return brush;\r\n            }\r\n        }\r\n\r\n        private void CheckChannelMessage(TLMessage25 message)\r\n        {\r\n            var channel = With as TLChannel;\r\n            if (IsChannelMessage || (channel != null && channel.IsBroadcast))\r\n            {\r\n                var message36 = message as TLMessage36;\r\n                if (message36 != null)\r\n                {\r\n                    if (channel != null && !channel.Signatures)\r\n                    {\r\n                        message36.FromId = new TLInt(-1);\r\n                    }\r\n                    message36.Views = new TLInt(1);\r\n                }\r\n            }\r\n\r\n            var channel44 = channel as TLChannel44;\r\n            if (channel44 != null && channel44.IsBroadcast && channel44.Silent)\r\n            {\r\n                var message48 = message as TLMessage48;\r\n                if (message48 != null && message48.Out.Value)\r\n                {\r\n                    message48.Silent = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void OpenServiceMessage(TLMessageBase message)\r\n        {\r\n            var serviceMessage = message as TLMessageService17;\r\n            if (serviceMessage != null)\r\n            {\r\n                var messageGroupAction = serviceMessage.Action as TLMessageActionMessageGroup;\r\n                if (messageGroupAction != null)\r\n                {\r\n                    var channel = With as TLChannel;\r\n                    if (channel == null) return;\r\n\r\n                    var collapsed = false;\r\n                    for (int i = 0; i < Items.Count; i++)\r\n                    {\r\n                        var message40 = Items[i] as TLMessage40;\r\n                        if (message40 != null && message40.Group == message)\r\n                        {\r\n                            Items.RemoveAt(i--);\r\n                            collapsed = true;\r\n                        }\r\n                    }\r\n                    if (collapsed)\r\n                    {\r\n                        //RaiseScrollTo(new ScrollToEventArgs(message));\r\n                        return;\r\n                    }\r\n\r\n                    var participantIds = channel.ParticipantIds;\r\n                    if (participantIds.Count == 0) return;\r\n\r\n                    var participant = participantIds[0];\r\n\r\n                    var index = Items.IndexOf(message);\r\n                    var comments = new List<TLMessageCommon>();\r\n                    var count = messageGroupAction.Group.Count.Value;\r\n                    for(var i = 0; i < count; i++)\r\n                    {\r\n                        var comment = GetMessage(new TLString(i.ToString(CultureInfo.InvariantCulture)), new TLMessageMediaEmpty());\r\n                        comment.FromId = participant;\r\n                        comment.Out = TLBool.False;\r\n                        var comment40 = comment as TLMessage40;\r\n                        if (comment40 != null)\r\n                        {\r\n                            comment40.Group = message;\r\n                        }\r\n                        comments.Add(comment);\r\n                    }\r\n\r\n                    foreach (var comment in comments)\r\n                    {\r\n                        Items.Insert(index, comment);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void AddComments()\r\n        {\r\n            var broadcast = With as TLBroadcastChat;\r\n            if (broadcast == null) return;\r\n\r\n            var broadcastPeer = new TLPeerBroadcast { Id = broadcast.Id };\r\n\r\n            var count = new Random().Next(1, 5);\r\n\r\n            var group = new TLMessageGroup\r\n            {\r\n                Count = new TLInt(count),\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                MaxId = new TLInt(int.MaxValue),\r\n                MinId = new TLInt(0)\r\n            };\r\n\r\n            var action = new TLMessageActionMessageGroup\r\n            {\r\n                Group = group\r\n            };\r\n\r\n            var serviceMessage = new TLMessageService17\r\n            {\r\n                FromId = new TLInt(StateService.CurrentUserId),\r\n                ToId = broadcastPeer,\r\n                Status = MessageStatus.Confirmed,\r\n                Out = new TLBool { Value = true },\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                RandomId = TLLong.Random(),\r\n                Action = action\r\n            };\r\n            serviceMessage.SetUnread(TLBool.False);\r\n\r\n            Items.Insert(0, serviceMessage);\r\n            CacheService.SyncMessage(serviceMessage,\r\n                message =>\r\n                {\r\n                    \r\n                });\r\n        }\r\n\r\n        private void MergeGroupMessages(IList<TLMessageBase> messages)\r\n        {\r\n            var itemsToUpdate = new Dictionary<TLMessageBase, TLMessageBase>();\r\n            foreach (var message in messages)\r\n            {\r\n                var message40 = message as TLMessage40;\r\n                if (message40 != null)\r\n                {\r\n                    var group = message40.Group;\r\n                    if (group != null)\r\n                    {\r\n                        for (var i = 0; i < Items.Count; i++)\r\n                        {\r\n                            if (group == Items[i])\r\n                            {\r\n                                var serviceMessage = Items[i] as TLMessageService17;\r\n                                if (serviceMessage != null)\r\n                                {\r\n                                    var action = serviceMessage.Action as TLMessageActionMessageGroup;\r\n                                    if (action != null)\r\n                                    {\r\n                                        action.Group.Count = new TLInt(action.Group.Count.Value-1);\r\n                                        if (action.Group.Count.Value == 0)\r\n                                        {\r\n                                            Items.RemoveAt(i);\r\n                                            CacheService.DeleteMessages(new TLVector<TLLong>{serviceMessage.RandomId});\r\n                                        }\r\n                                        itemsToUpdate[serviceMessage] = serviceMessage;\r\n                                    }\r\n                                }\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            foreach (var message in itemsToUpdate.Values)\r\n            {\r\n                message.NotifyOfPropertyChange(() => message.Self);\r\n            }\r\n\r\n\r\n            for (int i = 0; i < Items.Count; i++)\r\n            {\r\n                var serviceMessage1 = Items[i] as TLMessageService17;\r\n                if (serviceMessage1 != null)\r\n                {\r\n                    var action1 = serviceMessage1.Action as TLMessageActionMessageGroup;\r\n                    if (action1 != null)\r\n                    {\r\n\r\n                        if (Items.Count > i + 1)\r\n                        {\r\n                            var serviceMessage2 = Items[i + 1] as TLMessageService17;\r\n                            if (serviceMessage2 != null)\r\n                            {\r\n                                var action2 = serviceMessage2.Action as TLMessageActionMessageGroup;\r\n                                if (action2 != null)\r\n                                {\r\n                                    Items.RemoveAt(i);\r\n                                    Items.RemoveAt(i);\r\n                                    CacheService.DeleteMessages(new TLVector<TLLong>{serviceMessage2.RandomId});\r\n                                    action1.Group.Count = new TLInt(action1.Group.Count.Value + action2.Group.Count.Value);\r\n                                    action1.Group.MinId = new TLInt(Math.Min(action1.Group.MinId.Value, action2.Group.MinId.Value));\r\n                                    action1.Group.MinId = new TLInt(Math.Min(action1.Group.MaxId.Value, action2.Group.MaxId.Value));\r\n\r\n                                    Items.Insert(i, serviceMessage1);\r\n                                    serviceMessage1.NotifyOfPropertyChange(() => serviceMessage1.Self);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Contact.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        public ShareContactViewModel ContactPicker { get; set; }\r\n\r\n        private void OpenContact()\r\n        {\r\n            //if (ContactPicker == null)\r\n            {\r\n                ContactPicker = IoC.Get<ShareContactViewModel>();\r\n                ContactPicker.ContinueAction = ContinueSendContact;\r\n                NotifyOfPropertyChange(() => ContactPicker);\r\n            }\r\n            //else\r\n            //{\r\n            //    BeginOnUIThread(() => ContactPicker.OpenEditor());\r\n            //}\r\n        }\r\n\r\n        public void OpenPhoneContact(TLMessageMediaContact mediaContact)\r\n        {\r\n            StateService.PhoneContact = mediaContact;\r\n            ContactPicker = IoC.Get<ShareContactViewModel>();\r\n            ContactPicker.ContinueAction = ContinueSendContact;\r\n            NotifyOfPropertyChange(() => ContactPicker);\r\n        }\r\n\r\n        private void SendContact(TLUserBase contact)\r\n        {\r\n            if (TLString.IsNullOrEmpty(contact.Phone))\r\n            {\r\n                var username = contact as IUserName;\r\n                if (username != null && !TLString.IsNullOrEmpty(username.UserName))\r\n                {\r\n                    string accessToken = null;\r\n                    var bot = contact as TLUser;\r\n                    if (bot != null && bot.IsBot && !string.IsNullOrEmpty(bot.AccessToken))\r\n                    {\r\n                        accessToken = bot.AccessToken;\r\n                        bot.AccessToken = null;\r\n                    }\r\n\r\n                    _text = string.Format(Constants.UsernameLinkPlaceholder, username.UserName);\r\n                    if (!string.IsNullOrEmpty(accessToken))\r\n                    {\r\n                        _text += \"?start=\" + accessToken;\r\n                    }\r\n                    Send();\r\n\r\n                    return;\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var media = new TLMessageMediaContact82\r\n            {\r\n                UserId = contact.Id,\r\n                FirstName = contact.FirstName,\r\n                LastName = contact.LastName,\r\n                PhoneNumber = contact.Phone,\r\n                VCard = TLString.Empty\r\n            };\r\n\r\n            ContinueSendContact(media);\r\n        }\r\n\r\n        private void ContinueSendContact(TLMessageMediaContact media)\r\n        {\r\n            var message = GetMessage(TLString.Empty, media);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                BeginOnThreadPool(() =>\r\n                CacheService.SyncSendingMessage(\r\n                    message, previousMessage,\r\n                    SendContactInternal));\r\n            });\r\n        }\r\n\r\n        private void SendContactInternal(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage34;\r\n            if (message == null) return;\r\n\r\n            var mediaContact = message.Media as TLMessageMediaContact;\r\n            if (mediaContact == null) return;\r\n\r\n            var inputMediaContact = new TLInputMediaContact82\r\n            {\r\n                FirstName = mediaContact.FirstName,\r\n                LastName = mediaContact.LastName,\r\n                PhoneNumber = mediaContact.PhoneNumber,\r\n                VCard = TLString.Empty\r\n            };\r\n\r\n            message.InputMedia = inputMediaContact;\r\n\r\n            UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Document.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Telegram.Api.Helpers;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Views;\r\n#if WP81\r\nusing System.Runtime.InteropServices.WindowsRuntime;\r\nusing Windows.Graphics.Imaging;\r\nusing System.Threading.Tasks;\r\nusing Windows.Storage.AccessCache;\r\nusing Windows.Storage.FileProperties;\r\nusing Windows.Storage.Streams;\r\nusing Windows.Storage;\r\n#endif\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        public void AddToFavedStickers(TLMessageBase messageBase)\r\n        {\r\n            if (messageBase == null) return;\r\n\r\n            var message = messageBase as TLMessage;\r\n            if (message == null || !message.IsSticker()) return;\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument == null) return;\r\n\r\n            var document = mediaDocument.Document as TLDocument22;\r\n            if (document != null)\r\n            {\r\n                var allStickers = StateService.GetAllStickers() as TLAllStickers43;\r\n                if (allStickers != null)\r\n                {\r\n                    var favedStickers = allStickers.FavedStickers;\r\n                    if (favedStickers != null)\r\n                    {\r\n                        var unfave = favedStickers.Documents.FirstOrDefault(x => x.Index == document.Index) != null;\r\n\r\n                        MTProtoService.FaveStickerAsync(new TLInputDocument { Id = document.Id, AccessHash = document.AccessHash }, new TLBool(unfave),\r\n                            result => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                if (unfave)\r\n                                {\r\n                                    favedStickers.RemoveSticker(document);\r\n                                }\r\n                                else\r\n                                {\r\n                                    favedStickers.AddSticker(document);\r\n                                }\r\n\r\n                                allStickers.FavedStickers = favedStickers;\r\n                                StateService.SaveAllStickersAsync(allStickers);\r\n\r\n                                EmojiControl emojiControl;\r\n                                if (unfave)\r\n                                {\r\n                                    MTProtoService.GetFavedStickersAsync(allStickers.FavedStickers.Hash,\r\n                                        result2 =>\r\n                                        {\r\n                                            var favedStickers2 = result2 as TLFavedStickers;\r\n                                            if (favedStickers2 != null)\r\n                                            {\r\n                                                allStickers.FavedStickers = favedStickers;\r\n                                                StateService.SaveAllStickersAsync(allStickers);\r\n\r\n                                                Execute.BeginOnUIThread(() =>\r\n                                                {\r\n                                                    if (EmojiControl.TryGetInstance(out emojiControl))\r\n                                                    {\r\n                                                        emojiControl.ResetFavedStickers();\r\n                                                    }\r\n                                                });\r\n                                            }\r\n                                        },\r\n                                        error2 =>\r\n                                        {\r\n\r\n                                        });\r\n                                }\r\n\r\n                                if (EmojiControl.TryGetInstance(out emojiControl))\r\n                                {\r\n                                    emojiControl.ResetFavedStickers();\r\n                                }\r\n                            }),\r\n                            error =>\r\n                            {\r\n\r\n                            });\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void AddToStickers(TLMessageBase messageBase)\r\n        {\r\n            if (messageBase == null) return;\r\n\r\n            var message = messageBase as TLMessage;\r\n            if (message == null) return;\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument == null) return;\r\n\r\n            var document = mediaDocument.Document as TLDocument22;\r\n            if (document != null)\r\n            {\r\n                var inputStickerSet = document.StickerSet;\r\n                if (inputStickerSet != null)\r\n                {\r\n                    TelegramViewBase.NavigateToStickers(MTProtoService, StateService, inputStickerSet);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SendDocument(string fileName)\r\n        {\r\n            //create thumb\r\n            byte[] bytes;\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var fileStream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read, FileShare.Read))\r\n                {\r\n                    bytes = new byte[fileStream.Length];\r\n                    fileStream.Read(bytes, 0, bytes.Length);\r\n                }\r\n            }\r\n\r\n            if (!CheckDocumentSize((ulong)bytes.Length))\r\n            {\r\n                MessageBox.Show(string.Format(AppResources.MaximumFileSizeExceeded, MediaSizeConverter.Convert((int)Telegram.Api.Constants.MaximumUploadedFileSize)), AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            //create document\r\n            var document = new TLDocument54\r\n            {\r\n                Buffer = bytes,\r\n\r\n                Id = new TLLong(0),\r\n                AccessHash = new TLLong(0),\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                FileName = new TLString(Path.GetFileName(fileName)),\r\n                MimeType = new TLString(\"text/plain\"),\r\n                Size = new TLInt(bytes.Length),\r\n                Thumb = new TLPhotoSizeEmpty { Type = TLString.Empty },\r\n                DCId = new TLInt(0),\r\n                Version = new TLInt(0)\r\n            };\r\n\r\n            var media = new TLMessageMediaDocument75 { Flags = new TLInt(0), FileId = TLLong.Random(), Document = document, Caption = TLString.Empty };\r\n\r\n            var message = GetMessage(TLString.Empty, media);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        m => SendDocumentInternal(message, null)));\r\n            });\r\n        }\r\n\r\n#if WP81\r\n        public static async Task<TLPhotoSizeBase> GetFileThumbAsync(StorageFile file)\r\n        {\r\n            try\r\n            {\r\n                const int imageSize = 90;\r\n                var thumbnailMode = ThumbnailMode.SingleItem;\r\n                IRandomAccessStream thumb = await file.GetThumbnailAsync(thumbnailMode, imageSize, ThumbnailOptions.ResizeThumbnail);\r\n\r\n                var originalWidth = (int) ((StorageItemThumbnail)thumb).OriginalWidth;\r\n                var originalHeight = (int) ((StorageItemThumbnail)thumb).OriginalHeight;\r\n\r\n                if (((StorageItemThumbnail)thumb).ContentType == \"image/png\" || ((StorageItemThumbnail)thumb).ContentType == \"image/bmp\")\r\n                {\r\n                    var tempThumb = new InMemoryRandomAccessStream();\r\n                    var decoder = await BitmapDecoder.CreateAsync(thumb);\r\n                    var pixels = await decoder.GetPixelDataAsync();\r\n\r\n                    var encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.JpegEncoderId, tempThumb);\r\n\r\n                    encoder.SetPixelData(decoder.BitmapPixelFormat, BitmapAlphaMode.Ignore, decoder.PixelWidth, decoder.PixelHeight, decoder.DpiX, decoder.DpiY, pixels.DetachPixelData());\r\n\r\n                    await encoder.FlushAsync();\r\n\r\n                    thumb = tempThumb;\r\n                }\r\n\r\n                var volumeId = TLLong.Random();\r\n                var localId = TLInt.Random();\r\n                var secret = TLLong.Random();\r\n\r\n                var thumbLocation = new TLFileLocation\r\n                {\r\n                    DCId = new TLInt(0),\r\n                    VolumeId = volumeId,\r\n                    LocalId = localId,\r\n                    Secret = secret,\r\n                };\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                    thumbLocation.VolumeId,\r\n                    thumbLocation.LocalId,\r\n                    thumbLocation.Secret);\r\n\r\n                var thumbFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting);\r\n                var thumbBuffer = new Windows.Storage.Streams.Buffer(Convert.ToUInt32(thumb.Size));\r\n                var iBuf = await thumb.ReadAsync(thumbBuffer, thumbBuffer.Capacity, InputStreamOptions.None);\r\n                using (var thumbStream = await thumbFile.OpenAsync(FileAccessMode.ReadWrite))\r\n                {\r\n                    await thumbStream.WriteAsync(iBuf);\r\n                }\r\n\r\n                var thumbSize = new TLPhotoSize\r\n                {\r\n                    W = new TLInt(originalWidth),\r\n                    H = new TLInt(originalHeight),\r\n                    Size = new TLInt((int)thumb.Size),\r\n                    Type = TLString.Empty,\r\n                    Location = thumbLocation,\r\n\r\n                    Bytes = TLString.FromBigEndianData(thumbBuffer.ToArray())\r\n                };\r\n\r\n                return thumbSize;\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"GetFileThumbAsync exception \" + ex);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public async void SendDocument(StorageFile file)\r\n        {\r\n            if (file == null) return;\r\n\r\n            var properties = await file.GetBasicPropertiesAsync();\r\n            var size = properties.Size;\r\n\r\n            //file.Properties.GetImagePropertiesAsync()\r\n\r\n            if (!CheckDocumentSize(size))\r\n            {\r\n                MessageBox.Show(string.Format(AppResources.MaximumFileSizeExceeded, MediaSizeConverter.Convert((int)Telegram.Api.Constants.MaximumUploadedFileSize)), AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n\r\n            // to get access to the file with StorageFile.GetFileFromPathAsync in future\r\n            AddFileToFutureAccessList(file);\r\n\r\n            var thumb = await GetFileThumbAsync(file);\r\n\r\n            //create document\r\n            var document = new TLDocument54\r\n            {\r\n                Id = new TLLong(0),\r\n                AccessHash = new TLLong(0),\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                FileName = new TLString(Path.GetFileName(file.Name)),\r\n                MimeType = new TLString(file.ContentType),\r\n                Size = new TLInt((int)size),\r\n                Thumb = thumb ?? new TLPhotoSizeEmpty{Type = TLString.Empty},\r\n                DCId = new TLInt(0),\r\n                Version = new TLInt(0)\r\n            };\r\n\r\n            if (string.Equals(document.FileExt, \"webp\", StringComparison.OrdinalIgnoreCase)\r\n                && document.DocumentSize < Telegram.Api.Constants.StickerMaxSize)\r\n            {\r\n                document.MimeType = new TLString(\"image/webp\");\r\n                document.Attributes.Add(new TLDocumentAttributeSticker56 { Flags = new TLInt(0), Alt = TLString.Empty, Stickerset = new TLInputStickerSetEmpty(), MaskCoords = null });\r\n\r\n                var fileName = document.GetFileName();\r\n                await file.CopyAsync(ApplicationData.Current.LocalFolder, fileName, NameCollisionOption.ReplaceExisting);\r\n            }\r\n            else if (string.Equals(document.FileExt, \"mp3\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                var musicProperties = await file.Properties.GetMusicPropertiesAsync();\r\n                if (musicProperties != null)\r\n                {\r\n                    var documentAttributeAudio = new TLDocumentAttributeAudio46();\r\n                    documentAttributeAudio.Flags = new TLInt(0);\r\n                    documentAttributeAudio.Duration = new TLInt((int)musicProperties.Duration.TotalSeconds);\r\n                    if (!string.IsNullOrEmpty(musicProperties.Title))\r\n                    {\r\n                        documentAttributeAudio.Title = new TLString(musicProperties.Title);\r\n                    }\r\n                    if (!string.IsNullOrEmpty(musicProperties.Artist))\r\n                    {\r\n                        documentAttributeAudio.Performer = new TLString(musicProperties.Artist);\r\n                    }\r\n                    document.Attributes.Add(documentAttributeAudio);\r\n                }\r\n            }\r\n\r\n            var media = new TLMessageMediaDocument75 { Flags = new TLInt(0), FileId = TLLong.Random(), Document = document, Caption = TLString.Empty, IsoFileName = file.Path, File = file };\r\n\r\n            var message = GetMessage(TLString.Empty, media);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        m => SendDocumentInternal(message, file)));\r\n            });\r\n        }\r\n\r\n        public static void AddFileToFutureAccessList(StorageFile file)\r\n        {\r\n            try\r\n            {\r\n                StorageApplicationPermissions.MostRecentlyUsedList.Add(file);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"MostRecentlyUsedList.Add exception\\n\" + ex);\r\n            }\r\n\r\n            try\r\n            {\r\n                if (StorageApplicationPermissions.FutureAccessList.Entries.Count > 900)\r\n                {\r\n                    var item = StorageApplicationPermissions.FutureAccessList.Entries.Last();\r\n                    StorageApplicationPermissions.FutureAccessList.Remove(item.Token);\r\n                }\r\n\r\n                StorageApplicationPermissions.FutureAccessList.Add(file);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"FutureAccessList.Add exception\\n\" + ex);\r\n            }\r\n        }\r\n#endif\r\n\r\n        private void SendDocument(Photo d)\r\n        {\r\n            //create thumb\r\n            var bytes = d.PreviewBytes;\r\n\r\n            if (!CheckDocumentSize((ulong)d.Bytes.Length))\r\n            {\r\n                MessageBox.Show(string.Format(AppResources.MaximumFileSizeExceeded, MediaSizeConverter.Convert((int)Telegram.Api.Constants.MaximumUploadedFileSize)), AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            var volumeId = TLLong.Random();\r\n            var localId = TLInt.Random();\r\n            var secret = TLLong.Random();\r\n\r\n            var thumbLocation = new TLFileLocation //TODO: replace with TLFileLocationUnavailable\r\n            {\r\n                DCId = new TLInt(0),\r\n                VolumeId = volumeId,\r\n                LocalId = localId,\r\n                Secret = secret,\r\n                //Buffer = bytes\r\n            };\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                thumbLocation.VolumeId,\r\n                thumbLocation.LocalId,\r\n                thumbLocation.Secret);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var fileStream = store.CreateFile(fileName))\r\n                {\r\n                    fileStream.Write(bytes, 0, bytes.Length);\r\n                }\r\n            }\r\n\r\n            var thumbSize = new TLPhotoSize\r\n            {\r\n                W = new TLInt(d.Width),\r\n                H = new TLInt(d.Height),\r\n                Size = new TLInt(bytes.Length),\r\n                Type = new TLString(\"\"),\r\n                Location = thumbLocation,\r\n            };\r\n\r\n            //create document\r\n            var document = new TLDocument54\r\n            {\r\n                Buffer = d.Bytes,\r\n\r\n                Id = new TLLong(0),\r\n                AccessHash = new TLLong(0),\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                FileName = new TLString(Path.GetFileName(d.FileName)),\r\n                MimeType = new TLString(\"image/jpeg\"),\r\n                Size = new TLInt(d.Bytes.Length),\r\n                Thumb = thumbSize,\r\n                DCId = new TLInt(0),\r\n                Version = new TLInt(0)\r\n            };\r\n\r\n            var media = new TLMessageMediaDocument75 { Flags = new TLInt(0), FileId = TLLong.Random(), Document = document, Caption = TLString.Empty };\r\n\r\n            var message = GetMessage(TLString.Empty, media);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        m => SendDocumentInternal(message, null)));\r\n            });\r\n        }\r\n\r\n        public static bool CheckDocumentSize(ulong size)\r\n        {\r\n            return size < Telegram.Api.Constants.MaximumUploadedFileSize;\r\n        }\r\n\r\n#if WP81\r\n        private void SendDocumentInternal(TLMessage34 message, StorageFile file)\r\n#else\r\n        private void SendDocumentInternal(TLMessage34 message, object o)\r\n#endif\r\n        {\r\n            var document = ((TLMessageMediaDocument)message.Media).Document as TLDocument;\r\n            if (document == null) return;\r\n\r\n            byte[] thumbBytes = null;\r\n            var thumb = document.Thumb as TLPhotoSize;\r\n            if (thumb != null)\r\n            {\r\n                var thumbLocation = thumb.Location as TLFileLocation;\r\n                if (thumbLocation != null)\r\n                {\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        thumbLocation.VolumeId,\r\n                        thumbLocation.LocalId,\r\n                        thumbLocation.Secret);\r\n\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        using (var fileStream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            thumbBytes = new byte[fileStream.Length];\r\n                            fileStream.Read(thumbBytes, 0, thumbBytes.Length);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var bytes = document.Buffer;\r\n            var md5Bytes = Telegram.Api.Helpers.Utils.ComputeMD5(bytes ?? new byte[0]);\r\n            var md5Checksum = BitConverter.ToInt64(md5Bytes, 0);\r\n\r\n            StateService.GetServerFilesAsync(\r\n                results =>\r\n                {\r\n                    var serverFile = results.FirstOrDefault(result => result.MD5Checksum.Value == md5Checksum);\r\n\r\n                    if (serverFile != null)\r\n                    {\r\n                        message.InputMedia = serverFile.Media;\r\n                        UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n                    }\r\n                    else\r\n                    {\r\n                        if (thumbBytes != null)\r\n                        {\r\n                            var thumbFileId = TLLong.Random();\r\n                            UploadFileManager.UploadFile(thumbFileId, message.Media, thumbBytes);\r\n\r\n                            Thread.Sleep(100); //NOTE: без этой строки не работает. Почему???\r\n                        }\r\n\r\n                        var fileId = TLLong.Random();\r\n                        message.Media.FileId = fileId;\r\n                        message.Media.UploadingProgress = 0.001;\r\n#if WP81\r\n                        if (file == null)\r\n                        {\r\n                            UploadDocumentFileManager.UploadFile(fileId, message, bytes);\r\n                        }\r\n                        else\r\n                        {\r\n                            UploadDocumentFileManager.UploadFile(fileId, message, file);\r\n                        }\r\n#else\r\n                        UploadDocumentFileManager.UploadFile(fileId, message, bytes);\r\n#endif\r\n                    }\r\n                });\r\n        }\r\n\r\n        public void SendSticker(TLDocument22 document)\r\n        {\r\n            if (document == null) return;\r\n\r\n            var media = new TLMessageMediaDocument75 { Flags = new TLInt(0), FileId = TLLong.Random(), Document = document, Caption = TLString.Empty };\r\n\r\n            var message = GetMessage(TLString.Empty, media);\r\n\r\n            var inputMedia = new TLInputMediaDocument75\r\n            {\r\n                Flags = new TLInt(0),\r\n                MD5Hash = new byte[] { },\r\n                Id = new TLInputDocument\r\n                {\r\n                    Id = document.Id,\r\n                    AccessHash = document.AccessHash\r\n                },\r\n                Caption = TLString.Empty\r\n            };\r\n\r\n            message.InputMedia = inputMedia;\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n                Text = string.Empty;\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        m => UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService)));\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Edit.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Devices;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel :\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateEditChannelMessage>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateEditMessage>\r\n    {\r\n        private bool _isEditingEnabled;\r\n\r\n        public bool IsEditingEnabled\r\n        {\r\n            get { return _isEditingEnabled; }\r\n            set { SetField(ref _isEditingEnabled, value, () => IsEditingEnabled); }\r\n        }\r\n\r\n        private TLMessage _editedMessage;\r\n\r\n        private DispatcherTimer _editMessageTimer;\r\n\r\n        public void StartEditMessage(TLString text, TLMessage message)\r\n        {\r\n            if (text == null) return;\r\n            if (message == null) return;\r\n\r\n            _editedMessage = message;\r\n            var config = CacheService.GetConfig() as TLConfig48;\r\n            var editUntil = config != null ? message.DateIndex + config.EditTimeLimit.Value + 5 * 60 : 0;\r\n            if (message.FromId != null\r\n                && message.ToId is TLPeerUser\r\n                && message.FromId.Value == message.ToId.Id.Value)\r\n            {\r\n                editUntil = 0;\r\n            }\r\n\r\n            Reply = new TLMessagesContainter { EditMessage = _editedMessage as TLMessage25, EditUntil = editUntil };\r\n\r\n            if (_editMessageTimer == null)\r\n            {\r\n                _editMessageTimer = new DispatcherTimer();\r\n                _editMessageTimer.Tick += OnEditMessageTimerTick;\r\n                _editMessageTimer.Interval = TimeSpan.FromSeconds(1.0);\r\n            }\r\n\r\n            _editMessageTimer.Start();\r\n\r\n            IsEditingEnabled = true;\r\n            Text = text.ToString();\r\n\r\n            CurrentInlineBot = null;\r\n            ClearStickerHints();\r\n            ClearInlineBotResults();\r\n            ClearUsernameHints();\r\n            ClearHashtagHints();\r\n            ClearCommandHints();\r\n        }\r\n\r\n        private void OnEditMessageTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            var editedMessage48 = _editedMessage as TLMessage48;\r\n            if (editedMessage48 == null)\r\n            {\r\n                _editMessageTimer.Stop();\r\n                return;\r\n            }\r\n\r\n            var messagesContainer = Reply as TLMessagesContainter;\r\n            if (messagesContainer == null || messagesContainer.EditUntil == 0)\r\n            {\r\n                _editMessageTimer.Stop();\r\n                return;\r\n            }\r\n\r\n            messagesContainer.NotifyOfPropertyChange(() => messagesContainer.EditTimerString);\r\n\r\n#if DEBUG\r\n            //VibrateController.Default.Start(TimeSpan.FromMilliseconds(100));\r\n#endif\r\n        }\r\n\r\n        public void StopEditMessage()\r\n        {\r\n            ClearMentions();\r\n\r\n            _editedMessage = null;\r\n            Reply = null;\r\n            _previousReply = null;\r\n\r\n            Text = string.Empty;\r\n            IsEditingEnabled = false;\r\n\r\n            if (_editMessageTimer != null) _editMessageTimer.Stop();\r\n        }\r\n\r\n        public void EditMessage(TLMessage message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            var inputPeer = With as IInputPeer;\r\n            if (inputPeer == null) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetMessageEditDataAsync(inputPeer.ToInputPeer(), message.Id,\r\n                editData => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var text = GetMessageEditText(editData, message);\r\n\r\n                    StartEditMessage(text, message);\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (error.TypeEquals(ErrorType.MESSAGE_ID_INVALID))\r\n                        {\r\n                            MessageBox.Show(AppResources.EditMessageError, AppResources.Error, MessageBoxButton.OK);\r\n                            return;\r\n                        }\r\n                    }\r\n\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"channel.getMessageEditData error \" + error);\r\n                }));\r\n        }\r\n\r\n        private TLString GetMessageEditText(TLMessageEditData editData, TLMessage message)\r\n        {\r\n            var text = message.Message.ToString();\r\n\r\n            var textBuilder = new StringBuilder();\r\n            var message48 = message as TLMessage48;\r\n            if (message48 != null && message48.Entities != null && message48.Entities.Count > 0)\r\n            {\r\n                ClearMentions();\r\n\r\n                for (var i = 0; i < message48.Entities.Count; i++)\r\n                {\r\n                    // prefix\r\n                    var offset = i == 0\r\n                        ? 0\r\n                        : message48.Entities[i - 1].Offset.Value + message48.Entities[i - 1].Length.Value;\r\n                    var length = i == 0\r\n                        ? message48.Entities[i].Offset.Value\r\n                        : message48.Entities[i].Offset.Value - offset;\r\n\r\n                    textBuilder.Append(text.Substring(offset, length));\r\n\r\n                    var mentionName = message48.Entities[i] as TLMessageEntityMentionName;\r\n                    if (mentionName != null)\r\n                    {\r\n                        var user = CacheService.GetUser(mentionName.UserId);\r\n                        if (user != null)\r\n                        {\r\n                            AddMention(user);\r\n\r\n                            var mention = text.Substring(message48.Entities[i].Offset.Value, message48.Entities[i].Length.Value);\r\n\r\n                            textBuilder.Append(string.Format(\"@({0})\", mention));\r\n                        }\r\n\r\n                        continue;\r\n                    }\r\n\r\n                    var inputMentionName = message48.Entities[i] as TLInputMessageEntityMentionName;\r\n                    if (inputMentionName != null)\r\n                    {\r\n                        var inputUser = inputMentionName.User as TLInputUser;\r\n                        if (inputUser != null)\r\n                        {\r\n                            var user = CacheService.GetUser(inputUser.UserId);\r\n                            if (user != null)\r\n                            {\r\n                                AddMention(user);\r\n\r\n                                var mention = text.Substring(message48.Entities[i].Offset.Value, message48.Entities[i].Length.Value);\r\n\r\n                                textBuilder.Append(string.Format(\"@({0})\", mention));\r\n                            }\r\n                        }\r\n\r\n                        continue;\r\n                    }\r\n\r\n                    var bold = message48.Entities[i] as TLMessageEntityBold;\r\n                    if (bold != null)\r\n                    {\r\n                        var entity = text.Substring(message48.Entities[i].Offset.Value, message48.Entities[i].Length.Value);\r\n\r\n                        textBuilder.Append(string.Format(\"**{0}**\", entity));\r\n\r\n                        continue;\r\n                    }\r\n\r\n                    var italic = message48.Entities[i] as TLMessageEntityItalic;\r\n                    if (italic != null)\r\n                    {\r\n                        var entity = text.Substring(message48.Entities[i].Offset.Value, message48.Entities[i].Length.Value);\r\n\r\n                        textBuilder.Append(string.Format(\"__{0}__\", entity));\r\n\r\n                        continue;\r\n                    }\r\n\r\n                    var code = message48.Entities[i] as TLMessageEntityCode;\r\n                    if (code != null)\r\n                    {\r\n                        var entity = text.Substring(message48.Entities[i].Offset.Value, message48.Entities[i].Length.Value);\r\n\r\n                        textBuilder.Append(string.Format(\"`{0}`\", entity));\r\n\r\n                        continue;\r\n                    }\r\n\r\n                    var pre = message48.Entities[i] as TLMessageEntityPre;\r\n                    if (pre != null)\r\n                    {\r\n                        var entity = text.Substring(message48.Entities[i].Offset.Value, message48.Entities[i].Length.Value);\r\n\r\n                        textBuilder.Append(string.Format(\"```{0}```\", entity));\r\n\r\n                        continue;\r\n                    }\r\n\r\n                    offset = message48.Entities[i].Offset.Value;\r\n                    length = message48.Entities[i].Length.Value;\r\n\r\n                    textBuilder.Append(text.Substring(offset, length));\r\n                }\r\n\r\n                var lastEntity = message48.Entities[message48.Entities.Count - 1];\r\n                if (lastEntity != null)\r\n                {\r\n                    textBuilder.Append(text.Substring(lastEntity.Offset.Value + lastEntity.Length.Value));\r\n                }\r\n\r\n            }\r\n            else\r\n            {\r\n                textBuilder.Append(text);\r\n            }\r\n\r\n            return new TLString(textBuilder.ToString());\r\n        }\r\n\r\n        public void CancelSaveMessage()\r\n        {\r\n            StopEditMessage();\r\n        }\r\n\r\n        public void SaveMessage()\r\n        {\r\n            var message = _editedMessage as TLMessage34;\r\n            if (message == null) return;\r\n\r\n            var inputPeer = With as IInputPeer;\r\n            if (inputPeer == null) return;\r\n\r\n            var text = GetTrimmedText(Text) ?? string.Empty;\r\n\r\n            //check maximum message length\r\n            if (text.Length > Constants.MaximumMessageLength)\r\n            {\r\n                MessageBox.Show(String.Format(AppResources.MaximumMessageLengthExceeded, Constants.MaximumMessageLength), AppResources.Error, MessageBoxButton.OK);\r\n\r\n                return;\r\n            }\r\n\r\n            var noWebPage = true;\r\n            if (Reply != null && IsWebPagePreview(Reply))\r\n            {\r\n                message._media = ((TLMessagesContainter)Reply).WebPageMedia;\r\n                Reply = null;\r\n                noWebPage = false;\r\n            }\r\n\r\n            string processedText;\r\n            var entities = GetEntities(text, out processedText);\r\n            TLVector<TLMessageEntityBase> entitiesVector = null;\r\n            if (entities != null)\r\n            {\r\n                var message48 = message as TLMessage48;\r\n                if (message48 != null)\r\n                {\r\n                    entitiesVector = new TLVector<TLMessageEntityBase>(entities);\r\n                    message48.Entities = entitiesVector;\r\n                }\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.EditMessageAsync(inputPeer.ToInputPeer(), message.Id, new TLString(processedText), entitiesVector, null, null, noWebPage, false, null,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var message48 = message as TLMessage48;\r\n                    if (message48 != null)\r\n                    {\r\n                        message48.NotifyOfPropertyChange(() => message48.EditDate);\r\n                        message48.NotifyOfPropertyChange(() => message48.EditDateVisibility);\r\n                    }\r\n\r\n                    StopEditMessage();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (error.TypeEquals(ErrorType.MESSAGE_ID_INVALID))\r\n                        {\r\n                            MessageBox.Show(AppResources.EditMessageError, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        if (error.TypeEquals(ErrorType.MESSAGE_NOT_MODIFIED))\r\n                        {\r\n\r\n                        }\r\n                        StopEditMessage();\r\n                    }\r\n\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"channel.getMessageEditData error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void Handle(TLUpdateEditChannelMessage update)\r\n        {\r\n            var channel = With as TLChannel;\r\n            if (channel == null) return;\r\n\r\n            var message = update.Message as TLMessage31;\r\n            if (message == null || !(message.ToId is TLPeerChannel)) return;\r\n\r\n            if (channel.Id.Value == message.ToId.Id.Value)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var item = Items.FirstOrDefault(x => x.Index == update.Message.Index) as TLMessage31;\r\n                    if (item == null) return;\r\n\r\n                    if (item != message)\r\n                    {\r\n                        item.Edit(message);\r\n                    }\r\n\r\n                    message = item;\r\n                    var item48 = item as TLMessage48;\r\n                    var message48 = message as TLMessage48;\r\n                    if (message48 != null && item48 != null)\r\n                    {\r\n                        message48.Entities = item48.Entities;\r\n                    }\r\n                    var message31 = message as TLMessage48;\r\n                    if (message31 != null)\r\n                    {\r\n                        var mediaGeoLive = message31.Media as TLMessageMediaGeoLive;\r\n                        if (mediaGeoLive != null)\r\n                        {\r\n                            mediaGeoLive.EditDate = message31.EditDate;\r\n                            mediaGeoLive.Date = message31.Date;\r\n                            mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Geo);\r\n                            mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.EditDate);\r\n                            mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Active);\r\n\r\n                            message31.NotifyOfPropertyChange(() => message31.Message);\r\n                            message31.NotifyOfPropertyChange(() => message31.ReplyMarkup);\r\n\r\n                            if (LocationPicker != null)\r\n                            {\r\n                                LocationPicker.UpdateLiveLocation(message31);\r\n                            }\r\n                            if (LiveLocationBadge != null)\r\n                            {\r\n                                LiveLocationBadge.UpdateLiveLocation(message31);\r\n                            }\r\n\r\n                            return;\r\n                        }\r\n\r\n                        message31.NotifyOfPropertyChange(() => message31.Message);\r\n                        message31.NotifyOfPropertyChange(() => message31.Media);\r\n                        message31.NotifyOfPropertyChange(() => message31.ReplyMarkup);\r\n\r\n                        var mediaGame = message31.Media as TLMessageMediaGame;\r\n                        if (mediaGame != null)\r\n                        {\r\n                            mediaGame.NotifyOfPropertyChange(() => mediaGame.Message);\r\n                            mediaGame.NotifyOfPropertyChange(() => mediaGame.MessageVisibility);\r\n                            mediaGame.NotifyOfPropertyChange(() => mediaGame.DescriptionVisibility);\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateEditMessage update)\r\n        {\r\n            var message = update.Message as TLMessageCommon;\r\n            if (message == null) return;\r\n\r\n            var editMessage = false;\r\n\r\n            var user = With as TLUserBase;\r\n            var chat = With as TLChatBase;\r\n\r\n            if (user != null\r\n                && message.ToId is TLPeerUser\r\n                && !message.Out.Value\r\n                && user.Id.Value == message.FromId.Value)\r\n            {\r\n                editMessage = true;\r\n            }\r\n            else if (user != null\r\n                && message.ToId is TLPeerUser\r\n                && message.Out.Value\r\n                && user.Id.Value == message.ToId.Id.Value)\r\n            {\r\n                editMessage = true;\r\n            }\r\n            else if (chat != null\r\n                && message.ToId is TLPeerChat\r\n                && chat.Id.Value == message.ToId.Id.Value)\r\n            {\r\n                editMessage = true;\r\n            }\r\n\r\n            if (editMessage)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var item = Items.FirstOrDefault(x => x.Index == update.Message.Index) as TLMessageCommon;\r\n                    if (item == null) return;\r\n\r\n                    if (item != message)\r\n                    {\r\n                        item.Edit(message);\r\n                    }\r\n\r\n                    message = item;\r\n                    var item48 = item as TLMessage48;\r\n                    var message48 = message as TLMessage48;\r\n                    if (message48 != null && item48 != null)\r\n                    {\r\n                        message48.Entities = item48.Entities;\r\n                    }\r\n                    var message31 = message as TLMessage48;\r\n                    if (message31 != null)\r\n                    {\r\n                        var mediaGeoLive = message31.Media as TLMessageMediaGeoLive;\r\n                        if (mediaGeoLive != null)\r\n                        {\r\n                            mediaGeoLive.EditDate = message31.EditDate;\r\n                            mediaGeoLive.Date = message31.Date;\r\n                            mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Geo);\r\n                            mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.EditDate);\r\n                            mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Active);\r\n\r\n                            message31.NotifyOfPropertyChange(() => message31.Message);\r\n                            message31.NotifyOfPropertyChange(() => message31.ReplyMarkup);\r\n\r\n                            if (LocationPicker != null)\r\n                            {\r\n                                LocationPicker.UpdateLiveLocation(message31);\r\n                            }\r\n                            if (LiveLocationBadge != null)\r\n                            {\r\n                                LiveLocationBadge.UpdateLiveLocation(message31);\r\n                            }\r\n\r\n                            return;\r\n                        }\r\n\r\n                        message31.NotifyOfPropertyChange(() => message31.Message);\r\n                        message31.NotifyOfPropertyChange(() => message31.Media);\r\n                        message31.NotifyOfPropertyChange(() => message31.ReplyMarkup);\r\n\r\n                        var mediaGame = message31.Media as TLMessageMediaGame;\r\n                        if (mediaGame != null)\r\n                        {\r\n                            mediaGame.NotifyOfPropertyChange(() => mediaGame.Message);\r\n                            mediaGame.NotifyOfPropertyChange(() => mediaGame.MessageVisibility);\r\n                            mediaGame.NotifyOfPropertyChange(() => mediaGame.DescriptionVisibility);\r\n                        }\r\n                    }\r\n\r\n                    var messageService = item as TLMessageService;\r\n                    if (messageService != null)\r\n                    {\r\n                        var actionGameScore = messageService.Action as TLMessageActionGameScore;\r\n                        if (actionGameScore != null)\r\n                        {\r\n                            messageService.NotifyOfPropertyChange(() => messageService.Self);\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.GeoPoint.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Location;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        public LiveLocationBadgeViewModel LiveLocationBadge { get; set; }\r\n\r\n        public MapViewModel LocationPicker { get; set; }\r\n\r\n        private void SendLocation()\r\n        {\r\n            var liveLocationsService = IoC.Get<ILiveLocationService>();\r\n            var messageGeoLive = CurrentDialog != null ? liveLocationsService.Get(CurrentDialog.Peer, MTProtoService.CurrentUserId) : null;\r\n            if (messageGeoLive != null)\r\n            {\r\n                var cachedMessage = CacheService.GetMessage(messageGeoLive.Id, With is TLChannel ? ((TLChannel)With).Id : null) as TLMessage;\r\n                if (cachedMessage != null)\r\n                {\r\n                    messageGeoLive = cachedMessage;\r\n                }\r\n            }\r\n\r\n            if (LocationPicker == null)\r\n            {\r\n                LocationPicker = IoC.Get<MapViewModel>();\r\n                LocationPicker.LiveLocations.Clear();\r\n                LocationPicker.With = With;\r\n                LocationPicker.MessageGeo = null;\r\n                LocationPicker.MessageGeoLive = messageGeoLive;\r\n                LocationPicker.ContinueAction = ContinueSendLocation;\r\n                LocationPicker.StopLiveLocationAction = StopLiveLocation;\r\n                LocationPicker.UpdateLiveLocationsAction = UpdateLiveLocations;\r\n                NotifyOfPropertyChange(() => LocationPicker);\r\n            }\r\n            else\r\n            {\r\n                LocationPicker.LiveLocations.Clear();\r\n                LocationPicker.With = With;\r\n                LocationPicker.MessageGeo = null;\r\n                LocationPicker.MessageGeoLive = messageGeoLive;\r\n                BeginOnUIThread(() => LocationPicker.OpenEditor());\r\n            }\r\n        }\r\n\r\n        private void OpenLocation(TLMessage message)\r\n        {\r\n            var liveLocationsService = IoC.Get<ILiveLocationService>();\r\n            var messageGeoLive = CurrentDialog != null ? liveLocationsService.Get(CurrentDialog.Peer, MTProtoService.CurrentUserId) : null;\r\n            if (messageGeoLive != null)\r\n            {\r\n                var cachedMessage = CacheService.GetMessage(messageGeoLive.Id, With is TLChannel ? ((TLChannel) With).Id : null) as TLMessage;\r\n                if (cachedMessage != null)\r\n                {\r\n                    messageGeoLive = cachedMessage;\r\n                }\r\n            }\r\n\r\n            if (LocationPicker == null)\r\n            {\r\n                LocationPicker = IoC.Get<MapViewModel>();\r\n                LocationPicker.LiveLocations.Clear();\r\n                LocationPicker.With = With;\r\n                LocationPicker.MessageGeo = message;\r\n                LocationPicker.MessageGeoLive = messageGeoLive;\r\n                LocationPicker.ContinueAction = ContinueSendLocation;\r\n                LocationPicker.StopLiveLocationAction = StopLiveLocation;\r\n                LocationPicker.UpdateLiveLocationsAction = UpdateLiveLocations;\r\n                NotifyOfPropertyChange(() => LocationPicker);\r\n            }\r\n            else\r\n            {\r\n                LocationPicker.LiveLocations.Clear();\r\n                LocationPicker.With = With;\r\n                LocationPicker.MessageGeo = message;\r\n                LocationPicker.MessageGeoLive = messageGeoLive;\r\n                BeginOnUIThread(() => LocationPicker.OpenEditor());\r\n            }\r\n        }\r\n\r\n        private void UpdateLiveLocations(Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            MTProtoService.GetRecentLocationsAsync(Peer, new TLInt(int.MaxValue), new TLInt(0), \r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (LiveLocationBadge != null)\r\n                    {\r\n                        LiveLocationBadge.UpdateLiveLocations(result.Messages);\r\n                    }\r\n\r\n                    callback.SafeInvoke(result);\r\n                }),\r\n                faultCallback);\r\n        }\r\n\r\n        private void ContinueSendLocation(TLMessageMediaBase mediaBase)\r\n        {\r\n            var mediaVenue = mediaBase as TLMessageMediaVenue;\r\n            if (mediaVenue != null)\r\n            {\r\n                SendVenue(mediaVenue);\r\n                return;\r\n            }\r\n\r\n            var mediaGeoLive = mediaBase as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive != null)\r\n            {\r\n                SendLiveLocation(mediaGeoLive);\r\n                return;\r\n            }\r\n\r\n            var mediaGeo = mediaBase as TLMessageMediaGeo;\r\n            if (mediaGeo != null)\r\n            {\r\n                SendLocation(mediaGeo);\r\n                return;\r\n            }\r\n        }\r\n\r\n        private void SendVenue(TLMessageMediaVenue venue)\r\n        {\r\n            var message = GetMessage(TLString.Empty, venue);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        SendVenueInternal));\r\n            });\r\n        }\r\n\r\n        private void SendVenueInternal(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage34;\r\n            if (message == null) return;\r\n\r\n            var mediaVenue = message.Media as TLMessageMediaVenue;\r\n            if (mediaVenue == null) return;\r\n\r\n            var geoPoint = mediaVenue.Geo as TLGeoPoint;\r\n            if (geoPoint == null) return;\r\n\r\n            var inputMediaVenue = new TLInputMediaVenue\r\n            {\r\n                Title = mediaVenue.Title,\r\n                Address = mediaVenue.Address,\r\n                Provider = mediaVenue.Provider,\r\n                VenueId = mediaVenue.VenueId,\r\n                GeoPoint = new TLInputGeoPoint { Lat = ((TLGeoPoint)mediaVenue.Geo).Lat, Long = ((TLGeoPoint)mediaVenue.Geo).Long }\r\n            };\r\n\r\n            message.InputMedia = inputMediaVenue;\r\n\r\n            UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n        }\r\n\r\n        private void SendLiveLocation(TLMessageMediaGeoLive mediaGeoLive)\r\n        {\r\n            var message = GetMessage(TLString.Empty, mediaGeoLive);\r\n\r\n            mediaGeoLive.Date = message.Date;\r\n            mediaGeoLive.From = message.From;\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                LiveLocationBadge = new LiveLocationBadgeViewModel(IoC.Get<ILiveLocationService>(), IoC.Get<ICacheService>(), false) { Message = message };\r\n                LiveLocationBadge.OpenMessage += OpenLiveLocationBadge;\r\n                LiveLocationBadge.Closed += CloseLiveLocationBadge;\r\n\r\n                NotifyOfPropertyChange(() => LiveLocationBadge);\r\n\r\n                UpdateLiveLocations(\r\n                    result => \r\n                    {\r\n\r\n                    },\r\n                    error =>\r\n                    {\r\n                        \r\n                    });\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        SendLiveLocationInternal));\r\n            });\r\n        }\r\n\r\n        private void CloseLiveLocationBadge(object sender, System.EventArgs e)\r\n        {\r\n            if (LiveLocationBadge == null) return;\r\n            var message = LiveLocationBadge.Message as TLMessage70;\r\n            if (message == null) return;\r\n\r\n            var confirmation = string.Empty;\r\n            var chat = With as TLChatBase;\r\n            var user = With as TLUserBase;\r\n            if (chat != null)\r\n            {\r\n                confirmation = string.Format(AppResources.StopLiveLocationAlertToGroup, chat.FullName2);\r\n            }\r\n            else if (user != null)\r\n            {\r\n                confirmation = string.Format(AppResources.StopLiveLocationAlertToUser, user.FullName2);\r\n            }\r\n\r\n            if (string.IsNullOrEmpty(confirmation)) return;\r\n\r\n            var result = MessageBox.Show(confirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (result != MessageBoxResult.OK) return;\r\n\r\n            StopLiveLocation(message,\r\n                () =>\r\n                {\r\n                    \r\n                });\r\n        }\r\n\r\n        private void OpenLiveLocationBadge(object sender, System.EventArgs e)\r\n        {\r\n            if (LiveLocationBadge == null) return;\r\n\r\n            var messageGeoLive = LiveLocationBadge.Message;\r\n            if (messageGeoLive == null) return;\r\n\r\n            var mediaGeoLive = LiveLocationBadge.Message.Media as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive == null) return;\r\n\r\n            OpenMedia(messageGeoLive);\r\n        }\r\n\r\n        private void SendLocation(TLMessageMediaGeo mediaGeo)\r\n        {\r\n            var message = GetMessage(TLString.Empty, mediaGeo);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        SendLocationInternal));\r\n            });\r\n        }\r\n\r\n        private void SendLocationInternal(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage34;\r\n            if (message == null) return;\r\n\r\n            var mediaGeo = message.Media as TLMessageMediaGeo;\r\n            if (mediaGeo == null) return;\r\n\r\n            var geoPoint = mediaGeo.Geo as TLGeoPoint;\r\n            if (geoPoint == null) return;\r\n\r\n            var inputMediaGeoPoint = new TLInputMediaGeoPoint\r\n            {\r\n                GeoPoint = new TLInputGeoPoint { Lat = geoPoint.Lat, Long = geoPoint.Long }\r\n            };\r\n\r\n            message.InputMedia = inputMediaGeoPoint;\r\n\r\n            UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n        }\r\n\r\n        private DispatcherTimer _timer;\r\n\r\n        private TLMessageBase _timerMessage;\r\n\r\n        private void SendLiveLocationInternal(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage34;\r\n            if (message == null) return;\r\n\r\n            var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive == null) return;\r\n\r\n            var geoPoint = mediaGeoLive.Geo as TLGeoPoint;\r\n            if (geoPoint == null) return;\r\n\r\n            var inputMediaGeoLive = new TLInputMediaGeoLive\r\n            {\r\n                GeoPoint = new TLInputGeoPoint { Lat = geoPoint.Lat, Long = geoPoint.Long },\r\n                Period = mediaGeoLive.Period\r\n            };\r\n\r\n            message.InputMedia = inputMediaGeoLive;\r\n\r\n            UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n\r\n            return;\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                _timer = _timer ?? new DispatcherTimer();\r\n                _timer.Interval = TimeSpan.FromSeconds(5.0);\r\n                _timer.Tick += GeoLive_OnTick;\r\n\r\n                _timerMessage = message;\r\n                _timer.Start();\r\n            });\r\n        }\r\n\r\n        public void LiveLocationCompleted(TLObject obj)\r\n        {\r\n            var mediaGeoLive = obj as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive != null)\r\n            {\r\n                if (LiveLocationBadge != null)\r\n                {\r\n                    var message = LiveLocationBadge.Message;\r\n                    if (message != null && message.Media == mediaGeoLive)\r\n                    {\r\n                        LiveLocationBadge = null;\r\n                        NotifyOfPropertyChange(() => LiveLocationBadge);\r\n                    }\r\n                }\r\n\r\n                mediaGeoLive.Period = new TLInt(0);\r\n                mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Active);\r\n            }\r\n        }\r\n\r\n        private void StopLiveLocation(TLMessage70 message, System.Action callback)\r\n        {\r\n            if (message == null) return;\r\n\r\n            var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive == null) return;\r\n\r\n            var geoPoint = mediaGeoLive.Geo as TLGeoPoint;\r\n            if (geoPoint == null) return;\r\n\r\n            var newGeoPoint = new TLGeoPointEmpty();\r\n\r\n            var liveLocationsService = IoC.Get<ILiveLocationService>();\r\n\r\n            liveLocationsService.UpdateAsync(message, newGeoPoint, result =>\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    LiveLocationBadge = null;\r\n                    NotifyOfPropertyChange(() => LiveLocationBadge);\r\n\r\n                    mediaGeoLive.Date = message.Date;\r\n                    mediaGeoLive.EditDate = message.EditDate;\r\n                    mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Geo);\r\n                    mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.EditDate);\r\n                    mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Active);\r\n\r\n                    callback.SafeInvoke();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (error == null || error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        LiveLocationBadge = null;\r\n                        NotifyOfPropertyChange(() => LiveLocationBadge);\r\n\r\n                        mediaGeoLive.Date = message.Date;\r\n                        mediaGeoLive.EditDate = message.EditDate;\r\n                        mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Geo);\r\n                        mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.EditDate);\r\n                        mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Active);\r\n\r\n                        callback.SafeInvoke();\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private void GeoLive_OnTick(object sender, System.EventArgs e)\r\n        {\r\n            if (_timerMessage == null)\r\n            {\r\n                _timer.Stop();\r\n                return;\r\n            }\r\n\r\n            var peer = With as IInputPeer;\r\n            if (peer == null) return;\r\n\r\n            var message = _timerMessage as TLMessage70;\r\n            if (message == null) return;\r\n\r\n            var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive == null) return;\r\n\r\n            var geoPoint = mediaGeoLive.Geo as TLGeoPoint;\r\n            if (geoPoint == null) return;\r\n\r\n            var newGeoPoint = new TLGeoPoint { Lat = new TLDouble(geoPoint.Lat.Value - 0.001 / 6.0), Long = new TLDouble(geoPoint.Long.Value - 0.001538762512 / 6.0) };\r\n\r\n            var liveLocationsService = IoC.Get<ILiveLocationService>();\r\n\r\n            liveLocationsService.UpdateAsync(message, newGeoPoint, result =>\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    mediaGeoLive.EditDate = message.EditDate;\r\n                    mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Geo);\r\n                    mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.EditDate);\r\n                    mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Active);\r\n\r\n                    StopEditMessage();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    _timer.Stop();\r\n                }));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Handle.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Media.Animation;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Dialogs;\r\n#if WP8\r\nusing Windows.Storage;\r\nusing TelegramClient_Opus;\r\n#endif\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel :\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateContactLinkBase>,\r\n        Telegram.Api.Aggregator.IHandle<TLMessageCommon>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserTyping>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChatUserTyping>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserStatus>,\r\n        Telegram.Api.Aggregator.IHandle<DialogRemovedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<MessagesRemovedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<DownloadableItem>,\r\n        //Telegram.Api.Aggregator.IHandle<UploadableItem>,\r\n        Telegram.Api.Aggregator.IHandle<ProgressChangedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UploadProgressChangedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UploadingCanceledEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UpdateCompletedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<ChannelUpdateCompletedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdatePrivacy>,\r\n        Telegram.Api.Aggregator.IHandle<DeleteMessagesEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<ChannelAvailableMessagesEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateNotifySettings>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateWebPage>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserBlocked>,\r\n        Telegram.Api.Aggregator.IHandle<TLAllStickersBase>,\r\n        Telegram.Api.Aggregator.IHandle<TLChannel>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChannel>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChannelPinnedMessage>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateDraftMessage>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateReadMessagesContents>,\r\n        Telegram.Api.Aggregator.IHandle<ForwardGroupedEventArgs>\r\n    //Telegram.Api.Aggregator.IHandle<TopMessageUpdatedEventArgs>\r\n    {\r\n\r\n        private int _addedCount = 0;\r\n\r\n        private void InsertMessage(TLMessageCommon messageCommon)\r\n        {\r\n            ProcessMessages(new List<TLMessageBase> { messageCommon });\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var addedGrouped = false;\r\n                var message73 = messageCommon as TLMessage73;\r\n                if (message73 != null && message73.GroupedId != null && Items.Count > 0)\r\n                {\r\n                    var previousMessage = Items[0] as TLMessage73;\r\n                    if (previousMessage != null\r\n                        && previousMessage.GroupedId != null\r\n                        && previousMessage.GroupedId.Value == message73.GroupedId.Value)\r\n                    {\r\n                        Items.RemoveAt(0);\r\n                        var items = new List<TLMessageBase>();\r\n                        var mediaGroup = previousMessage.Media as TLMessageMediaGroup;\r\n                        if (mediaGroup != null)\r\n                        {\r\n                            items.Add(messageCommon);\r\n                            foreach (var item in mediaGroup.Group)\r\n                            {\r\n                                items.Add(item);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            items.Add(messageCommon);\r\n                            items.Add(previousMessage);\r\n                        }\r\n\r\n                        items = items.OrderByDescending(x => x.Index).ToList();\r\n\r\n                        ProcessGroupedMessages(items);\r\n\r\n                        for (var j = 0; j < items.Count; j++)\r\n                        {\r\n                            TLDialog.InsertMessageInOrder(Items, items[j]);\r\n                        }\r\n\r\n                        addedGrouped = true;\r\n                    }\r\n                }\r\n                var position = -1;\r\n                if (!addedGrouped)\r\n                {\r\n                    position = TLDialog.InsertMessageInOrder(Items, messageCommon);\r\n                    _addedCount++;\r\n                }\r\n                else\r\n                {\r\n                    position = 0;\r\n                }\r\n\r\n                if (position != -1)\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        var serviceMessage = Items[i] as TLMessageService;\r\n                        if (serviceMessage != null && serviceMessage.Action is TLMessageActionUnreadMessages)\r\n                        {\r\n                            Items.RemoveAt(i--);\r\n                        }\r\n                    }\r\n\r\n                    if (!messageCommon.Out.Value)\r\n                    {\r\n                        if (messageCommon.Unread.Value\r\n                            && View != null\r\n                            && View.IsScrollToBottomButtonVisible)\r\n                        {\r\n                            Counter++;\r\n                        }\r\n\r\n                        var message25 = messageCommon as TLMessage25;\r\n                        if (message25 != null\r\n                            && message25.Unread.Value\r\n                            && message25.IsMention\r\n                            && View != null\r\n                            && View.IsScrollToBottomButtonVisible)\r\n                        {\r\n                            var dialog = CurrentDialog as TLDialog71;\r\n                            if (dialog != null)\r\n                            {\r\n                                dialog.UnreadMentions = dialog.UnreadMentions ?? new TLVector<TLMessageBase>();\r\n                                var added = false;\r\n                                for (var j = 0; j < dialog.UnreadMentions.Count; j++)\r\n                                {\r\n                                    if (dialog.UnreadMentions[j].Index == message25.Index)\r\n                                    {\r\n                                        added = true;\r\n                                        break;\r\n                                    }\r\n                                    if (dialog.UnreadMentions[j].Index < message25.Index)\r\n                                    {\r\n                                        dialog.UnreadMentions.Insert(j, message25);\r\n                                        added = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                if (!added)\r\n                                {\r\n                                    dialog.UnreadMentions.Add(message25);\r\n                                }\r\n\r\n                                MentionsCounter++;\r\n\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    View.ShowMentionButton();\r\n                                });\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Counter = 0;\r\n                    }\r\n\r\n                    var message = messageCommon as TLMessage;\r\n                    if (message != null && !message.Out.Value)\r\n                    {\r\n                        var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                        if (mediaGeoLive != null && mediaGeoLive.Active)\r\n                        {\r\n                            if (LocationPicker != null)\r\n                            {\r\n                                LocationPicker.UpdateLiveLocation(message);\r\n                            }\r\n                            if (LiveLocationBadge != null)\r\n                            {\r\n                                LiveLocationBadge.UpdateLiveLocation(message);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var message31 = messageCommon as TLMessage31;\r\n                    if (message31 != null && !message31.Out.Value && message31.ReplyMarkup != null)\r\n                    {\r\n                        var fromId = message31.FromId;\r\n                        var user = CacheService.GetUser(fromId) as TLUser;\r\n                        if (user != null && user.IsBot)\r\n                        {\r\n                            SetReplyMarkup(message31);\r\n                        }\r\n                    }\r\n\r\n                    Execute.BeginOnThreadPool(() =>\r\n                    {\r\n                        MarkAsRead(messageCommon);\r\n\r\n                        if (messageCommon is TLMessage)\r\n                        {\r\n                            InputTypingManager.RemoveTypingUser(messageCommon.FromId.Value);\r\n                        }\r\n                    });\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(TLMessageCommon message)\r\n        {\r\n            if (message == null) return;\r\n#if WP8\r\n            if (!_isFirstSliceLoaded)\r\n            {\r\n                Execute.ShowDebugMessage(\"DialogDetailsViewModel.Handle(TLMessageCommon) _isFirstSliceLoaded=false\");\r\n                return;\r\n            }\r\n#endif\r\n\r\n            //if (message.FromId.Value == StateService.CurrentUserId)\r\n            //{\r\n            //    if (message.IsSticker())\r\n            //    {\r\n            //        EmojiControl emojiControl;\r\n            //        if (EmojiControl.TryGetInstance(out emojiControl))\r\n            //        {\r\n            //            var messageCommon = message as TLMessage;\r\n            //            if (messageCommon != null)\r\n            //            {\r\n            //                var mediaDocument = messageCommon.Media as TLMessageMediaDocument;\r\n            //                if (mediaDocument != null)\r\n            //                {\r\n            //                    var args = new StickerSelectedEventArgs { Sticker = new TLStickerItem { Document = mediaDocument.Document } };\r\n            //                    emojiControl.UpdateRecentStickers(args);\r\n            //                }\r\n            //            }\r\n            //        }\r\n            //    }\r\n            //}\r\n\r\n            if (With is TLUserBase\r\n                && message.ToId is TLPeerUser\r\n                && !message.Out.Value\r\n                && ((TLUserBase)With).Id.Value == message.FromId.Value)\r\n            {\r\n                InsertMessage(message);\r\n\r\n                // switchPM\r\n                if (_isActive)\r\n                {\r\n                    var message31 = message as TLMessage31;\r\n                    if (message31 != null)\r\n                    {\r\n                        var keyboardRows = message31.ReplyMarkup as IReplyKeyboardRows;\r\n                        if (keyboardRows != null)\r\n                        {\r\n                            var keyboardButtonSwitchInline =\r\n                                keyboardRows.Rows.SelectMany(x => x.Buttons)\r\n                                    .FirstOrDefault(x => x is TLKeyboardButtonSwitchInline);\r\n                            if (keyboardButtonSwitchInline != null)\r\n                            {\r\n                                Send(message, keyboardButtonSwitchInline, true);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            else if (With is TLUserBase\r\n                    && message.ToId is TLPeerUser\r\n                    && message.Out.Value\r\n                    && ((TLUserBase)With).Id.Value == message.ToId.Id.Value)\r\n            {\r\n                InsertMessage(message);\r\n            }\r\n            else if (With is TLChatBase\r\n                    && ((message.ToId is TLPeerChat && ((TLChatBase)With).Id.Value == message.ToId.Id.Value)\r\n                        || (message.ToId is TLPeerChannel && ((TLChatBase)With).Id.Value == message.ToId.Id.Value)))\r\n            {\r\n                InsertMessage(message);\r\n                NotifyOfPropertyChange(() => With); // Title and appbar changing\r\n\r\n                var messageService = message as TLMessageService;\r\n                if (messageService != null)\r\n                {\r\n                    var chatMigrateToAction = messageService.Action as TLMessageActionChatMigrateTo;\r\n                    if (chatMigrateToAction != null)\r\n                    {\r\n                        var channel = CacheService.GetChat(chatMigrateToAction.ChannelId) as TLChannel;\r\n                        if (channel != null)\r\n                        {\r\n                            channel.MigratedFromChatId = ((TLChatBase)With).Id;\r\n                            channel.MigratedFromMaxId = messageService.Id;\r\n                            BeginOnUIThread(() =>\r\n                            {\r\n                                StateService.With = channel;\r\n                                StateService.RemoveBackEntries = true;\r\n                                NavigationService.Navigate(new Uri(\"/Views/Dialogs/DialogDetailsView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative));\r\n                            });\r\n                        }\r\n\r\n                        return;\r\n                    }\r\n\r\n                    var deleteUserAction = messageService.Action as TLMessageActionChatDeleteUser;\r\n                    if (deleteUserAction != null)\r\n                    {\r\n                        // delete replyMarkupKeyboard\r\n                        var userId = deleteUserAction.UserId;\r\n                        if (ReplyMarkupMessage != null && ReplyMarkupMessage.FromId.Value == userId.Value)\r\n                        {\r\n                            SetReplyMarkup(null);\r\n                        }\r\n\r\n                        // remove botInfo\r\n                        GetFullInfo();\r\n                    }\r\n\r\n                    // add botInfo\r\n                    var addUserAction = messageService.Action as TLMessageActionChatAddUserBase;\r\n                    if (addUserAction != null)\r\n                    {\r\n                        GetFullInfo();\r\n                    }\r\n\r\n                    // Update number of participants\r\n                    Subtitle = GetSubtitle();\r\n                }\r\n            }\r\n            else if (With is TLBroadcastChat\r\n                     && message.ToId is TLPeerBroadcast\r\n                     && ((TLChatBase)With).Id.Value == message.ToId.Id.Value)\r\n            {\r\n                if (message is TLMessageService) // Update number of participants\r\n                {\r\n                    Subtitle = GetSubtitle();\r\n                }\r\n            }\r\n\r\n            IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n        }\r\n\r\n        private void MarkAsRead(TLMessageCommon message)\r\n        {\r\n            if (!_isActive) return;\r\n\r\n            if (message != null\r\n                && !message.Out.Value\r\n                && message.Unread.Value)\r\n            //&& !message.IsAudioVideoMessage())\r\n            {\r\n                StateService.GetNotifySettingsAsync(settings =>\r\n                {\r\n                    if (settings.InvisibleMode) return;\r\n\r\n                    CurrentDialog = CurrentDialog ?? CacheService.GetDialog(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId));\r\n\r\n                    var dialog = CurrentDialog as TLDialog;\r\n                    if (dialog != null)\r\n                    {\r\n                        var topMessage = dialog.TopMessage as TLMessageCommon;\r\n                        //SetRead(topMessage, d => new TLInt(Math.Max(0, d.UnreadCount.Value - 1)));\r\n                        SetRead(topMessage);\r\n                    }\r\n\r\n                    var channel = With as TLChannel;\r\n                    if (channel != null)\r\n                    {\r\n                        MTProtoService.ReadHistoryAsync(channel, message.Id,\r\n                            result =>\r\n                            {\r\n                                Execute.ShowDebugMessage(\"channels.readHistory result=\" + result);\r\n                                //SetRead(topMessage, d => new TLInt(0));\r\n                            },\r\n                            error =>\r\n                            {\r\n                                Execute.ShowDebugMessage(\"channels.readHistory error \" + error);\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        MTProtoService.ReadHistoryAsync(Peer, message.Id, new TLInt(0),\r\n                            affectedHistory =>\r\n                            {\r\n                                //SetRead(topMessage, d => new TLInt(0));\r\n                            },\r\n                            error =>\r\n                            {\r\n                                Execute.ShowDebugMessage(\"messages.readHistory error \" + error);\r\n                            });\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        private void SetRead(TLMessageCommon topMessage)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    var message = Items[i] as TLMessageCommon;\r\n                    if (IsIncomingUnread(message))\r\n                    {\r\n                        message.SetUnread(TLBool.False);\r\n                    }\r\n                }\r\n\r\n                if (IsIncomingUnread(topMessage))\r\n                {\r\n                    topMessage.SetUnread(TLBool.False);\r\n                }\r\n\r\n                CurrentDialog.UnreadCount = new TLInt(0);\r\n                CurrentDialog.NotifyOfPropertyChange(() => CurrentDialog.UnreadCount);\r\n\r\n                var dialog = CurrentDialog as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    dialog.NotifyOfPropertyChange(() => dialog.TopMessage);\r\n                }\r\n                var dialog71 = CurrentDialog as TLDialog71;\r\n                if (dialog71 != null)\r\n                {\r\n                    dialog71.UnreadMark = false;\r\n                    dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMark);\r\n                }\r\n\r\n                CurrentDialog.NotifyOfPropertyChange(() => CurrentDialog.Self);\r\n\r\n                CacheService.Commit();\r\n            });\r\n        }\r\n\r\n        private static bool IsIncomingUnread(TLMessageCommon message)\r\n        {\r\n            return message != null\r\n                   && !message.Out.Value\r\n                   && message.Unread.Value;\r\n            //&& !message.IsAudioVideoMessage();\r\n        }\r\n\r\n        public void Handle(TLUpdateUserTyping userTyping)\r\n        {\r\n            var user = With as TLUserBase;\r\n            if (user != null\r\n                && !user.IsSelf\r\n                && user.Index == userTyping.UserId.Value)\r\n            {\r\n                HandleTypingCommon(userTyping);\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateChatUserTyping chatUserTyping)\r\n        {\r\n            var chat = With as TLChatBase;\r\n            if (chat != null\r\n                && chat.Index == chatUserTyping.ChatId.Value)\r\n            {\r\n                HandleTypingCommon(chatUserTyping);\r\n            }\r\n        }\r\n\r\n        private void HandleTypingCommon(TLUpdateTypingBase updateTyping)\r\n        {\r\n            TLSendMessageActionBase action = new TLSendMessageTypingAction();\r\n            var updateUserTyping17 = updateTyping as IUserTypingAction;\r\n            if (updateUserTyping17 != null)\r\n            {\r\n                action = updateUserTyping17.Action;\r\n            }\r\n\r\n            if (action is TLSendMessageCancelAction)\r\n            {\r\n                InputTypingManager.RemoveTypingUser(updateTyping.UserId.Value);\r\n            }\r\n            else\r\n            {\r\n                InputTypingManager.AddTypingUser(updateTyping.UserId.Value, action);\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateUserStatus updateUserStatus)\r\n        {\r\n            var userBase = With as TLUserBase;\r\n            if (userBase != null\r\n                && userBase.Index == updateUserStatus.UserId.Value)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    Subtitle = GetSubtitle();\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateContactLinkBase update)\r\n        {\r\n            var userBase = With as TLUserBase;\r\n            if (userBase != null\r\n                && userBase.Index == update.UserId.Value)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    Subtitle = GetSubtitle();\r\n                    NotifyOfPropertyChange(() => With);\r\n\r\n                    ChangeUserAction();\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(DialogRemovedEventArgs args)\r\n        {\r\n            if (With == args.Dialog.With)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    LazyItems.Clear();\r\n                    Items.Clear();\r\n                    IsEmptyDialog = true;\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(ChannelAvailableMessagesEventArgs args)\r\n        {\r\n            if (With == args.Dialog.With)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    var group = new Dictionary<long, TLMessageMediaGroup>();\r\n                    for (var j = 0; j < Items.Count; j++)\r\n                    {\r\n                        var messageCommon = Items[j] as TLMessageCommon;\r\n                        if (messageCommon != null\r\n                            && messageCommon.ToId is TLPeerChannel\r\n                            && messageCommon.Index <= args.AvailableMinId.Value)\r\n                        {\r\n                            Items.RemoveAt(j);\r\n                            break;\r\n                        }\r\n\r\n                        var message73 = Items[j] as TLMessage73;\r\n                        if (message73 != null && message73.GroupedId != null)\r\n                        {\r\n                            var mediaGroup = message73.Media as TLMessageMediaGroup;\r\n                            if (mediaGroup != null)\r\n                            {\r\n                                for (var k = 0; k < mediaGroup.Group.Count; k++)\r\n                                {\r\n                                    messageCommon = mediaGroup.Group[k] as TLMessageCommon;\r\n                                    if (messageCommon != null\r\n                                        && messageCommon.ToId is TLPeerChannel\r\n                                        && messageCommon.Index <= args.AvailableMinId.Value)\r\n                                    {\r\n                                        mediaGroup.Group.RemoveAt(k);\r\n                                        if (mediaGroup.Group.Count == 0)\r\n                                        {\r\n                                            Items.Remove(message73);\r\n                                        }\r\n                                        else\r\n                                        {\r\n                                            group[message73.GroupedId.Value] = mediaGroup;\r\n                                        }\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    foreach (var mediaGroup in group.Values)\r\n                    {\r\n                        mediaGroup.RaiseCalculate();\r\n                    }\r\n\r\n                    IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(MessagesRemovedEventArgs args)\r\n        {\r\n            if (With == args.Dialog.With && args.Messages != null && args.Messages.Count > 0)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    RemoveMessages(args.Messages);\r\n\r\n                    IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var updated = false;\r\n\r\n                var items = UngroupEnumerator(Items).ToList();\r\n\r\n                var userProfilePhoto = item.Owner as TLUserProfilePhoto;\r\n                if (userProfilePhoto != null)\r\n                {\r\n                    //handled with DialogsViewModel\r\n                    return;\r\n                }\r\n\r\n                var chatPhoto = item.Owner as TLChatPhoto;\r\n                if (chatPhoto != null)\r\n                {\r\n                    var channel = With as TLChannel;\r\n                    if (channel != null)\r\n                    {\r\n                        channel.NotifyOfPropertyChange(() => channel.Photo);\r\n                        updated = true;\r\n                    }\r\n\r\n                    var serviceMessages = items.OfType<TLMessageService>();\r\n                    foreach (var serviceMessage in serviceMessages)\r\n                    {\r\n                        var editPhoto = serviceMessage.Action as TLMessageActionChatEditPhoto;\r\n                        if (editPhoto != null && editPhoto.Photo == chatPhoto)\r\n                        {\r\n                            editPhoto.NotifyOfPropertyChange(() => editPhoto.Photo);\r\n                            updated = true;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var message = item.Owner as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    var messages = items.OfType<TLMessage>();\r\n                    foreach (var m in messages)\r\n                    {\r\n                        var media = m.Media as TLMessageMediaVideo;\r\n                        if (media != null && m == item.Owner)\r\n                        {\r\n                            m.Media.IsCanceled = false;\r\n                            m.Media.LastProgress = 0.0;\r\n                            m.Media.DownloadingProgress = 1.0;\r\n                            m.NotifyOfPropertyChange(() => m.Self);\r\n                            m.Media.IsoFileName = item.IsoFileName;\r\n                            updated = true;\r\n                            break;\r\n                        }\r\n\r\n                        var mediaGame = m.Media as TLMessageMediaGame;\r\n                        if (mediaGame != null && m == item.Owner)\r\n                        {\r\n                            m.Media.IsCanceled = false;\r\n                            m.Media.LastProgress = 0.0;\r\n                            m.Media.DownloadingProgress = 1.0;\r\n                            m.Media.NotifyOfPropertyChange(() => m.Media.Self); // update download icon for documents\r\n                            m.NotifyOfPropertyChange(() => m.Self);\r\n                            m.Media.IsoFileName = item.IsoFileName;\r\n                            updated = true;\r\n                            break;\r\n                        }\r\n\r\n                        var mediaDocument = m.Media as TLMessageMediaDocument;\r\n                        if (mediaDocument != null && m == item.Owner)\r\n                        {\r\n                            if (m.IsVoice())\r\n                            {\r\n                                MessagePlayerControl.ConvertAndSaveOpusToWav(null, mediaDocument);\r\n                            }\r\n\r\n                            m.Media.IsCanceled = false;\r\n                            m.Media.LastProgress = 0.0;\r\n                            m.Media.DownloadingProgress = 1.0;\r\n                            m.Media.NotifyOfPropertyChange(() => m.Media.Self); // update download icon for documents\r\n                            m.NotifyOfPropertyChange(() => m.Self);\r\n                            m.Media.IsoFileName = item.IsoFileName;\r\n                            updated = true;\r\n                            break;\r\n                        }\r\n\r\n                        var mediaWebPage = m.Media as TLMessageMediaWebPage;\r\n                        if (mediaWebPage != null && m == item.Owner)\r\n                        {\r\n                            m.Media.IsCanceled = false;\r\n                            m.Media.LastProgress = 0.0;\r\n                            m.Media.DownloadingProgress = 1.0;\r\n                            m.Media.NotifyOfPropertyChange(() => m.Media.Self);\r\n                            m.NotifyOfPropertyChange(() => m.Self);\r\n                            m.Media.IsoFileName = item.IsoFileName;\r\n                            updated = true;\r\n                            break;\r\n                        }\r\n\r\n                        var audioMedia = m.Media as TLMessageMediaAudio;\r\n                        if (audioMedia != null && m == item.Owner)\r\n                        {\r\n                            MessagePlayerControl.ConvertAndSaveOpusToWav(audioMedia);\r\n\r\n                            m.Media.IsCanceled = false;\r\n                            m.Media.LastProgress = 0.0;\r\n                            m.Media.DownloadingProgress = 1.0;\r\n                            m.Media.IsoFileName = item.IsoFileName;\r\n                            updated = true;\r\n                            break;\r\n                        }\r\n\r\n                    }\r\n                    return;\r\n                }\r\n\r\n                var photo = item.Owner as TLPhoto;\r\n                if (photo != null)\r\n                {\r\n                    var isUpdated = false;\r\n                    var messages = items.OfType<TLMessage>();\r\n                    foreach (var m in messages)\r\n                    {\r\n                        var mediaPhoto = m.Media as TLMessageMediaPhoto;\r\n                        if (mediaPhoto != null && mediaPhoto.Photo == photo)\r\n                        {\r\n                            mediaPhoto.DownloadingProgress = 1.0;\r\n\r\n                            if (!mediaPhoto.IsCanceled)\r\n                            {\r\n                                mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.Photo);\r\n                                mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.Self);\r\n                                updated = true;\r\n                            }\r\n                            isUpdated = true;\r\n                            break;\r\n                        }\r\n\r\n                        var mediaWebPage = m.Media as TLMessageMediaWebPage;\r\n                        if (mediaWebPage != null && mediaWebPage.Photo == photo)\r\n                        {\r\n                            mediaWebPage.NotifyOfPropertyChange(() => mediaWebPage.Photo);\r\n                            mediaWebPage.NotifyOfPropertyChange(() => mediaWebPage.Self);\r\n                            updated = true;\r\n                            isUpdated = false;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (isUpdated) return;\r\n\r\n                    var serviceMessages = items.OfType<TLMessageService>();\r\n                    foreach (var serviceMessage in serviceMessages)\r\n                    {\r\n                        var editPhoto = serviceMessage.Action as TLMessageActionChatEditPhoto;\r\n                        if (editPhoto != null && editPhoto.Photo == photo)\r\n                        {\r\n                            editPhoto.NotifyOfPropertyChange(() => editPhoto.Photo);\r\n                            isUpdated = true;\r\n                            updated = true;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var document = item.Owner as TLDocument;\r\n                if (document != null)\r\n                {\r\n                    var messages = items.OfType<TLMessage>();\r\n                    foreach (var m in messages)\r\n                    {\r\n                        var media = m.Media as TLMessageMediaDocument;\r\n                        if (media != null && TLDocumentBase.DocumentEquals(media.Document, document))\r\n                        {\r\n                            if (m.IsVoice())\r\n                            {\r\n                                media.NotifyOfPropertyChange(() => media.Document);\r\n                            }\r\n                            else if (m.IsVideo())\r\n                            {\r\n                                media.NotifyOfPropertyChange(() => media.Video);\r\n                            }\r\n                            else\r\n                            {\r\n                                media.NotifyOfPropertyChange(() => media.Document);\r\n                            }\r\n                            updated = true;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (PinnedMessage != null && PinnedMessage.Message != null)\r\n                    {\r\n                        var m = PinnedMessage.Message as TLMessage;\r\n                        if (m != null)\r\n                        {\r\n                            var media = m.Media as TLMessageMediaDocument;\r\n                            if (media != null && TLDocumentBase.DocumentEquals(media.Document, document))\r\n                            {\r\n                                if (m.IsVoice())\r\n                                {\r\n                                    media.NotifyOfPropertyChange(() => media.Document);\r\n                                }\r\n                                else if (m.IsVideo())\r\n                                {\r\n                                    media.NotifyOfPropertyChange(() => media.Video);\r\n                                }\r\n                                else\r\n                                {\r\n                                    media.NotifyOfPropertyChange(() => media.Document);\r\n                                }\r\n                                updated = true;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var video = item.Owner as TLVideo;\r\n                if (video != null)\r\n                {\r\n                    var messages = items.OfType<TLMessage>();\r\n                    foreach (var m in messages)\r\n                    {\r\n                        var media = m.Media as TLMessageMediaVideo;\r\n                        if (media != null && media.Video == video)\r\n                        {\r\n                            media.NotifyOfPropertyChange(() => media.Video);\r\n                            updated = true;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var audio = item.Owner as TLAudio;\r\n                if (audio != null)\r\n                {\r\n                    var messages = items.OfType<TLMessage>();\r\n                    foreach (var m in messages)\r\n                    {\r\n                        var media = m.Media as TLMessageMediaAudio;\r\n                        if (media != null && media.Audio == audio)\r\n                        {\r\n                            media.NotifyOfPropertyChange(() => media.Audio);\r\n                            updated = true;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var webPage = item.Owner as TLWebPage;\r\n                if (webPage != null)\r\n                {\r\n                    var messages = items.OfType<TLMessage>();\r\n                    foreach (var m in messages)\r\n                    {\r\n                        var media = m.Media as TLMessageMediaWebPage;\r\n                        if (media != null && media.WebPage.Id.Value == webPage.Id.Value)\r\n                        {\r\n                            media.NotifyOfPropertyChange(() => media.Photo);\r\n                            media.NotifyOfPropertyChange(() => media.Self);\r\n                            updated = true;\r\n                            //break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var game = item.Owner as TLGame;\r\n                if (game != null)\r\n                {\r\n                    var messages = items.OfType<TLMessage>();\r\n                    foreach (var m in messages)\r\n                    {\r\n                        var media = m.Media as TLMessageMediaGame;\r\n                        if (media != null && media.Game.Id.Value == game.Id.Value)\r\n                        {\r\n                            media.NotifyOfPropertyChange(() => media.Photo);\r\n                            media.NotifyOfPropertyChange(() => media.Self);\r\n                            updated = true;\r\n                            //break;\r\n                        }\r\n                    }\r\n                }\r\n                //if (!updated)\r\n                //{\r\n                //    if (item.Owner is TLStickerItem || item.Owner is TLBotInlineMediaResult)\r\n                //    {\r\n                //        return;\r\n                //    }\r\n\r\n                //    Execute.ShowDebugMessage(\"DialogDetailsViewModel.Handle DownloadableItem not handled owner=\" + item.Owner);\r\n                //}\r\n            });\r\n        }\r\n\r\n        public void Handle(ProgressChangedEventArgs args)\r\n        {\r\n            var photo = args.Item.Owner as TLPhoto;\r\n            if (photo != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var messages = UngroupEnumerator(Items).OfType<TLMessage>();\r\n                    foreach (var m in messages)\r\n                    {\r\n                        var media = m.Media as TLMessageMediaPhoto;\r\n                        if (media != null && media.Photo == photo)\r\n                        {\r\n                            var delta = args.Progress - media.DownloadingProgress;\r\n\r\n                            if (delta > 0.0)\r\n                            {\r\n                                media.DownloadingProgress = args.Progress;\r\n\r\n                            }\r\n                            break;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            var message = args.Item.Owner as TLMessage;\r\n            if (message != null)\r\n            {\r\n                //var photo = message.Media as TLMessageMediaPhoto;\r\n                //if (photo != null && !photo.IsCanceled)\r\n                //{\r\n                //    var delta = args.Progress - photo.DownloadingProgress;\r\n\r\n                //    if (delta > 0.0)\r\n                //    {\r\n                //        photo.DownloadingProgress = args.Progress;\r\n\r\n                //    }\r\n                //    return;\r\n                //}\r\n\r\n                var video = message.Media as TLMessageMediaVideo;\r\n                if (video != null && !video.IsCanceled)\r\n                {\r\n                    var delta = args.Progress - video.DownloadingProgress;\r\n\r\n                    if (delta > 0.0)\r\n                    {\r\n                        video.DownloadingProgress = args.Progress;\r\n\r\n                    }\r\n                    return;\r\n                }\r\n\r\n                var audio = message.Media as TLMessageMediaAudio;\r\n                if (audio != null && !audio.IsCanceled)\r\n                {\r\n                    var delta = args.Progress - audio.DownloadingProgress;\r\n\r\n                    if (delta > 0.0)\r\n                    {\r\n                        audio.DownloadingProgress = args.Progress;\r\n                    }\r\n                    return;\r\n                }\r\n\r\n                var game = message.Media as TLMessageMediaGame;\r\n                if (game != null && !game.IsCanceled)\r\n                {\r\n                    var delta = args.Progress - game.DownloadingProgress;\r\n\r\n                    if (delta > 0.0)\r\n                    {\r\n                        game.DownloadingProgress = args.Progress;\r\n                    }\r\n                    return;\r\n                }\r\n\r\n                var document = message.Media as TLMessageMediaDocument;\r\n                if (document != null && !document.IsCanceled)\r\n                {\r\n                    var delta = args.Progress - document.DownloadingProgress;\r\n\r\n                    if (delta > 0.0)\r\n                    {\r\n                        document.DownloadingProgress = args.Progress;\r\n                    }\r\n                    return;\r\n                }\r\n\r\n                var webPage = message.Media as TLMessageMediaWebPage;\r\n                if (webPage != null && !webPage.IsCanceled)\r\n                {\r\n                    var delta = args.Progress - webPage.DownloadingProgress;\r\n\r\n                    if (delta > 0.0)\r\n                    {\r\n                        webPage.DownloadingProgress = args.Progress;\r\n                    }\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(UploadProgressChangedEventArgs args)\r\n        {\r\n            var message = args.Item.Owner as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var photo = message.Media as TLMessageMediaPhoto;\r\n                if (photo != null)\r\n                {\r\n                    var delta = args.Progress - photo.UploadingProgress;\r\n\r\n                    if (delta > 0.0)\r\n                    {\r\n                        photo.UploadingProgress = args.Progress;\r\n                    }\r\n\r\n                    UploadTypingManager.SetTyping(new TLSendMessageUploadPhotoAction28 { Progress = new TLInt((int)(args.Progress * 100.0)) });\r\n\r\n                    return;\r\n                }\r\n\r\n                var document = message.Media as TLMessageMediaDocument;\r\n                if (document != null)\r\n                {\r\n                    var delta = args.Progress - document.UploadingProgress;\r\n\r\n                    if (delta > 0.0)\r\n                    {\r\n                        document.UploadingProgress = args.Progress;\r\n                    }\r\n\r\n                    UploadTypingManager.SetTyping(new TLSendMessageUploadDocumentAction28 { Progress = new TLInt((int)(args.Progress * 100.0)) });\r\n\r\n                    return;\r\n                }\r\n\r\n                var video = message.Media as TLMessageMediaVideo;\r\n                if (video != null)\r\n                {\r\n                    var delta = args.Progress - video.UploadingProgress;\r\n\r\n                    if (delta > 0.0)\r\n                    {\r\n                        video.UploadingProgress = args.Progress;\r\n                    }\r\n\r\n                    UploadTypingManager.SetTyping(new TLSendMessageUploadVideoAction28 { Progress = new TLInt((int)(args.Progress * 100.0)) });\r\n\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(UploadingCanceledEventArgs args)\r\n        {\r\n            var message = args.Item.Owner as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var photo = message.Media as TLMessageMediaPhoto;\r\n                if (photo != null)\r\n                {\r\n                    message.Media.UploadingProgress = 0.0;\r\n                    message.Status = MessageStatus.Failed;\r\n                }\r\n\r\n                var document = message.Media as TLMessageMediaDocument;\r\n                if (document != null)\r\n                {\r\n                    message.Media.UploadingProgress = 0.0;\r\n                    message.Status = MessageStatus.Failed;\r\n                }\r\n\r\n                var video = message.Media as TLMessageMediaVideo;\r\n                if (video != null)\r\n                {\r\n                    message.Media.UploadingProgress = 0.0;\r\n                    message.Status = MessageStatus.Failed;\r\n                }\r\n\r\n                UploadTypingManager.CancelTyping();\r\n            }\r\n        }\r\n\r\n        public void Handle(TopMessageUpdatedEventArgs args)\r\n        {\r\n#if WP8\r\n            if (!_isFirstSliceLoaded)\r\n            {\r\n                Execute.ShowDebugMessage(\"DialogDetailsViewModel.Handle(TLMessageCommon) _isFirstSliceLoaded=false\");\r\n                return;\r\n            }\r\n#endif\r\n\r\n            var serviceMessage = args.Message as TLMessageService;\r\n            if (serviceMessage == null) return;\r\n            Handle(serviceMessage);\r\n        }\r\n\r\n        public void Handle(ChannelUpdateCompletedEventArgs eventArgs)\r\n        {\r\n            Telegram.Logs.Log.Write(string.Format(\"DialogDetailsViewModel.Handle ChannelUpdateCompletedEventArgs start\"));\r\n            if (Peer == null) return; // tombstoning \r\n            if (!_isUpdated) return;\r\n\r\n            var channel = With as TLChannel;\r\n            if (channel != null && channel.Index == eventArgs.ChannelId.Value)\r\n            {\r\n                Telegram.Logs.Log.Write(string.Format(\"DialogDetailsViewModel.Handle ChannelUpdateCompletedEventArgs UpdateCompletedEventArgs\"));\r\n                Handle(new UpdateCompletedEventArgs());\r\n            }\r\n            Telegram.Logs.Log.Write(string.Format(\"DialogDetailsViewModel.Handle ChannelUpdateCompletedEventArgs stop\"));\r\n        }\r\n\r\n        private int _counter;\r\n\r\n        public int Counter\r\n        {\r\n            get { return _counter; }\r\n            set { SetField(ref _counter, value, () => Counter); }\r\n        }\r\n\r\n        public void Handle(UpdateCompletedEventArgs args)\r\n        {\r\n            Telegram.Logs.Log.Write(\"DialogDetailsViewModel.Handle UpdateCompletedEventArgs start\");\r\n\r\n            if (Peer == null) return; // tombstoning \r\n            if (!_isUpdated) return;\r\n\r\n            Telegram.Logs.Log.Write(\"DialogDetailsViewModel.Handle UpdateCompletedEventArgs GetHistoryAsync\");\r\n\r\n            CacheService.GetHistoryAsync(\r\n                TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId),\r\n                messages =>\r\n                {\r\n                    Telegram.Logs.Log.Write(\"DialogDetailsViewModel.Handle UpdateCompletedEventArgs ProcessRepliesAndAudio\");\r\n\r\n                    ProcessMessages(messages);\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"DialogDetailsViewModel.Handle UpdateCompletedEventArgs start UI\");\r\n                        var messageIndexes = new Dictionary<int, int>();\r\n                        for (var i = 0; i < Items.Count; i++)\r\n                        {\r\n                            messageIndexes[Items[i].Index] = Items[i].Index;\r\n                        }\r\n                        var topMessage = Items.FirstOrDefault(x => x.Index != 0);\r\n                        var lastMessage = Items.LastOrDefault(x => x.Index != 0);\r\n\r\n\r\n                        var newMessages = new List<TLMessageBase>();\r\n                        var newMessagesAtMiddle = new List<TLMessageBase>();\r\n                        foreach (var message in messages)\r\n                        {\r\n\r\n                            if (message.Index != 0)  //возможно, это новое сообщение\r\n                            {\r\n                                if (topMessage == null && lastMessage == null)  // в имеющемся списке нет сообщений с индексом\r\n                                {\r\n                                    newMessages.Add(message);\r\n                                }\r\n                                else\r\n                                {\r\n                                    if (topMessage != null && message.Index > topMessage.Index)  // до первого сообщения с индексом в списке \r\n                                    {\r\n                                        newMessages.Add(message);\r\n                                    }\r\n                                    else if (lastMessage != null\r\n                                        && !messageIndexes.ContainsKey(message.Index)\r\n                                        && message.Index < lastMessage.Index)  // в середине списка до последнего сообщения с индексом\r\n                                    {\r\n                                        Execute.ShowDebugMessage(\"Catch middle message: \" + message);\r\n                                        newMessagesAtMiddle.Add(message);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        break;\r\n                                    }\r\n                                }\r\n\r\n                            }\r\n                        }\r\n\r\n                        if (newMessages.Count > 0)\r\n                        {\r\n                            Subtitle = GetSubtitle();\r\n\r\n                            for (var i = newMessagesAtMiddle.Count; i > 0; i--)\r\n                            {\r\n                                TLDialog.InsertMessageInOrder(Items, newMessagesAtMiddle[i]);\r\n                            }\r\n\r\n                            AddUnreadHistory(newMessages);\r\n                        }\r\n                        Telegram.Logs.Log.Write(\"DialogDetailsViewModel.Handle UpdateCompletedEventArgs stop UI\");\r\n                    });\r\n\r\n                }, int.MaxValue);\r\n        }\r\n\r\n        private static bool UseSeparator(IList<TLMessageBase> messages)\r\n        {\r\n            if (messages.Count > 0)\r\n            {\r\n                var firstMessage = messages[0] as TLMessageCommon;\r\n                if (firstMessage != null\r\n                    && !firstMessage.Out.Value\r\n                    && firstMessage.Unread.Value)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void AddUnreadHistory(IList<TLMessageBase> newMessages)\r\n        {\r\n            var useSeparator = UseSeparator(newMessages);\r\n\r\n            var counters = AddSeparator(useSeparator, newMessages);\r\n\r\n            const int firstSliceCount = 0;\r\n            var count = 0;\r\n            var secondSlice = new List<TLMessageBase>();\r\n            for (var i = newMessages.Count; i > 0; i--)\r\n            {\r\n                if (count < firstSliceCount || !useSeparator)\r\n                {\r\n                    count++;\r\n                    Items.Insert(0, newMessages[i - 1]);\r\n                }\r\n                else\r\n                {\r\n                    secondSlice.Add(newMessages[i - 1]);\r\n                }\r\n            }\r\n\r\n            if (secondSlice.Count == 0)\r\n            {\r\n                ContinueAddUnreadHistory();\r\n            }\r\n            else\r\n            {\r\n                InsertAndHoldPosition(secondSlice, () =>\r\n                {\r\n                    ContinueAddUnreadHistory();\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        Counter = counters.Item1;\r\n                        MentionsCounter += counters.Item2;\r\n                        ShowScrollToBottomButton();\r\n                    });\r\n                });\r\n            }\r\n        }\r\n\r\n        private void InsertAndHoldPosition(IEnumerable<TLMessageBase> items, System.Action callback)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                HoldScrollingPosition = true;\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var message in items)\r\n                    {\r\n                        Items.Insert(0, message);\r\n                    }\r\n                    HoldScrollingPosition = false;\r\n\r\n                    callback.SafeInvoke();\r\n                });\r\n            });\r\n        }\r\n\r\n        private void ContinueAddUnreadHistory()\r\n        {\r\n            UpdateReplyMarkup(Items);\r\n\r\n            if (_isActive)\r\n            {\r\n                ReadHistoryAsync();\r\n            }\r\n        }\r\n\r\n        private Tuple<int, int> AddSeparator(bool useSeparator, IList<TLMessageBase> newMessages)\r\n        {\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var serviceMessage = Items[i] as TLMessageService;\r\n                if (serviceMessage != null && serviceMessage.Action is TLMessageActionUnreadMessages)\r\n                {\r\n                    Items.RemoveAt(i--);\r\n                }\r\n            }\r\n\r\n            if (useSeparator)\r\n            {\r\n                var position = -1;\r\n                var counter = 0;\r\n                var mentionsCounter = 0;\r\n                var mentions = new List<TLMessageBase>();\r\n                for (var i = 0; i < newMessages.Count; i++)\r\n                {\r\n                    var messageCommon = newMessages[i] as TLMessageCommon;\r\n                    if (messageCommon != null\r\n                        && !messageCommon.Out.Value\r\n                        && messageCommon.Unread.Value)\r\n                    {\r\n                        position = i;\r\n                        counter++;\r\n                        var message = messageCommon as TLMessage25;\r\n                        if (message != null && message.IsMention)\r\n                        {\r\n                            mentionsCounter++;\r\n                            mentions.Add(message);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (position != -1)\r\n                {\r\n                    var separator = new TLMessageService17\r\n                    {\r\n                        FromId = new TLInt(StateService.CurrentUserId),\r\n                        ToId = TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId),\r\n                        Status = With is TLBroadcastChat\r\n                            ? MessageStatus.Broadcast\r\n                            : MessageStatus.Sending,\r\n                        Out = TLBool.True,\r\n                        Unread = TLBool.True,\r\n                        Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                        Action = new TLMessageActionUnreadMessages(),\r\n                        //IsAnimated = true,\r\n                        RandomId = TLLong.Random()\r\n                    };\r\n\r\n                    newMessages.Insert(position + 1, separator);\r\n                }\r\n\r\n                if (mentions.Count > 0)\r\n                {\r\n                    var dialog = CurrentDialog as TLDialog71;\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog.UnreadMentions = dialog.UnreadMentions ?? new TLVector<TLMessageBase>();\r\n                        for (var i = mentions.Count - 1; i >= 0; i--)\r\n                        {\r\n                            var added = false;\r\n                            for (var j = 0; j < dialog.UnreadMentions.Count; j++)\r\n                            {\r\n                                if (dialog.UnreadMentions[j].Index == mentions[i].Index)\r\n                                {\r\n                                    added = true;\r\n                                    break;\r\n                                }\r\n                                if (dialog.UnreadMentions[j].Index < mentions[i].Index)\r\n                                {\r\n                                    dialog.UnreadMentions.Insert(j, mentions[i]);\r\n                                    added = true;\r\n                                    break;\r\n                                }\r\n                            }\r\n                            if (!added)\r\n                            {\r\n                                dialog.UnreadMentions.Add(mentions[i]);\r\n                            }\r\n                        }\r\n                        dialog.UnreadMentionsCount = new TLInt(dialog.UnreadMentions.Count);\r\n                    }\r\n                }\r\n\r\n                return new Tuple<int, int>(counter, mentionsCounter);\r\n            }\r\n\r\n            return new Tuple<int, int>(0, 0);\r\n        }\r\n\r\n        private void UpdateReplyMarkup(IList<TLMessageBase> items)\r\n        {\r\n            for (var i = 0; i < items.Count; i++)\r\n            {\r\n                var message31 = items[i] as TLMessage31;\r\n                if (message31 != null && !message31.Out.Value)\r\n                {\r\n                    if (message31.ReplyMarkup != null)\r\n                    {\r\n                        var fromId = message31.FromId;\r\n                        var user = CacheService.GetUser(fromId) as TLUser;\r\n                        if (user != null && user.IsBot)\r\n                        {\r\n                            SetReplyMarkup(message31, true);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdatePrivacy privacy)\r\n        {\r\n            if (privacy.Key is TLPrivacyKeyStatusTimestamp)\r\n            {\r\n                GetFullInfo();\r\n            }\r\n        }\r\n\r\n        public void Handle(DeleteMessagesEventArgs args)\r\n        {\r\n            if (With == args.Owner)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    for (var j = 0; j < args.Messages.Count; j++)\r\n                    {\r\n                        for (var i = 0; i < Items.Count; i++)\r\n                        {\r\n                            if (Items[i].Index == args.Messages[j].Index)\r\n                            {\r\n                                Items.RemoveAt(i);\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateNotifySettings updateNotifySettings)\r\n        {\r\n            // threadpool\r\n            var notifyPeer = updateNotifySettings.Peer as TLNotifyPeer;\r\n            if (notifyPeer != null)\r\n            {\r\n                var peer = notifyPeer.Peer;\r\n                var chat = With as TLChatBase;\r\n                var user = With as TLUserBase;\r\n                var channel = With as TLChannel;\r\n\r\n                if (peer is TLPeerChat\r\n                    && chat != null\r\n                    && peer.Id.Value == chat.Index)\r\n                {\r\n                    chat.NotifySettings = updateNotifySettings.NotifySettings;\r\n                    With.NotifyOfPropertyChange(() => chat.NotifySettings);\r\n                }\r\n                else if (peer is TLPeerUser\r\n                    && user != null\r\n                    && peer.Id.Value == user.Index)\r\n                {\r\n                    user.NotifySettings = updateNotifySettings.NotifySettings;\r\n                    With.NotifyOfPropertyChange(() => chat.NotifySettings);\r\n                }\r\n                else if (peer is TLPeerChannel\r\n                    && channel != null\r\n                    && peer.Id.Value == channel.Index)\r\n                {\r\n                    channel.NotifySettings = updateNotifySettings.NotifySettings;\r\n                    With.NotifyOfPropertyChange(() => channel.NotifySettings);\r\n                    NotifyOfPropertyChange(() => AppBarCommandString);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateWebPage updateWebPage)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var webPageBase = updateWebPage.WebPage;\r\n\r\n                foreach (var webPageKeyValue in _webPagesCache)\r\n                {\r\n                    var mediaBase = webPageKeyValue.Value;\r\n                    var webPageMessageMedia = mediaBase as TLMessageMediaWebPage;\r\n                    if (webPageMessageMedia != null)\r\n                    {\r\n                        var webPage = webPageMessageMedia.WebPage;\r\n                        if (webPage != null)\r\n                        {\r\n                            if (webPage.Id.Value == webPageBase.Id.Value)\r\n                            {\r\n                                webPageMessageMedia.WebPage = webPageBase;\r\n\r\n                                if (string.Equals(Text, webPageKeyValue.Key))\r\n                                {\r\n                                    if (webPageBase is TLWebPage || webPageBase is TLWebPagePending)\r\n                                    {\r\n                                        SaveReply();\r\n\r\n                                        Reply = new TLMessagesContainter { WebPageMedia = webPageMessageMedia };\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        RestoreReply();\r\n                                    }\r\n                                }\r\n\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(TLUpdateUserBlocked updateUserBlocked)\r\n        {\r\n            var user = With as TLUserBase;\r\n            if (user != null && user.Id.Value == updateUserBlocked.UserId.Value)\r\n            {\r\n                NotifyOfPropertyChange(() => With);\r\n            }\r\n        }\r\n\r\n        public void Handle(TLAllStickersBase allStickersBase)\r\n        {\r\n            var allStickers = allStickersBase as TLAllStickers;\r\n            if (allStickers != null)\r\n            {\r\n                Stickers = allStickers;\r\n            }\r\n        }\r\n\r\n        public void Handle(TLChannel channel)\r\n        {\r\n            var currentChannel = With as TLChannel;\r\n            if (currentChannel != null && currentChannel.Index == channel.Index)\r\n            {\r\n\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateChannel updateChannel)\r\n        {\r\n            var currentChannel = With as TLChatBase;\r\n            if (currentChannel != null && currentChannel.Index == updateChannel.ChannelId.Value)\r\n            {\r\n                var channelForbidden = CacheService.GetChat(updateChannel.ChannelId) as TLChannelForbidden;\r\n                if (channelForbidden != null)\r\n                {\r\n                    With = channelForbidden;\r\n                    NotifyOfPropertyChange(() => With);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateChannelPinnedMessage updateChannelPinnedMessage)\r\n        {\r\n            var currentChannel = With as TLChannel49;\r\n            if (currentChannel != null && currentChannel.Index == updateChannelPinnedMessage.ChannelId.Value)\r\n            {\r\n                ShowPinnedMessage(currentChannel);\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateDraftMessage update)\r\n        {\r\n            var peer = update.Peer;\r\n            var chat = With as TLChatBase;\r\n            var user = With as TLUserBase;\r\n            var channel = With as TLChannel;\r\n\r\n            if (peer is TLPeerChat\r\n                && chat != null\r\n                && peer.Id.Value == chat.Index)\r\n            {\r\n                UpdateDraftMessage(update.Draft);\r\n            }\r\n            else if (peer is TLPeerUser\r\n                && user != null\r\n                && peer.Id.Value == user.Index)\r\n            {\r\n                UpdateDraftMessage(update.Draft);\r\n            }\r\n            else if (peer is TLPeerChannel\r\n                && channel != null\r\n                && peer.Id.Value == channel.Index)\r\n            {\r\n                UpdateDraftMessage(update.Draft);\r\n            }\r\n        }\r\n\r\n        private bool _suppressTyping;\r\n\r\n        private void UpdateDraftMessage(TLDraftMessageBase draftBase)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                _suppressTyping = true;\r\n                var draft = draftBase as TLDraftMessage;\r\n                if (draft != null)\r\n                {\r\n                    if (draft.ReplyToMsgId != null && draft.ReplyToMsgId.Value > 0)\r\n                    {\r\n                        var message = Items.FirstOrDefault(x => x.Index == draft.ReplyToMsgId.Value);\r\n                        if (message == null)\r\n                        {\r\n                            var channel = With as TLChannel;\r\n                            if (channel != null)\r\n                            {\r\n                                message = CacheService.GetMessage(draft.ReplyToMsgId, channel.Id);\r\n                            }\r\n                            else\r\n                            {\r\n                                message = CacheService.GetMessage(draft.ReplyToMsgId);\r\n                            }\r\n                        }\r\n\r\n                        if (message != null)\r\n                        {\r\n                            ReplyMessage(message);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Reply = null;\r\n                    }\r\n\r\n                    var text = draft.Message.ToString();\r\n                    if (string.Equals(text, Text) && !draft.NoWebpage)\r\n                    {\r\n                        GetWebPagePreviewAsync(text);\r\n                    }\r\n                    else\r\n                    {\r\n                        Text = GetDraftText(draft);\r\n                    }\r\n                    return;\r\n                    if (!string.IsNullOrEmpty(Text))\r\n                    {\r\n                        var view = GetView() as IDialogDetailsView;\r\n                        if (view != null)\r\n                        {\r\n                            view.MoveCurretToEnd();\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    Text = \"\";\r\n                    Reply = null;\r\n                }\r\n            });\r\n        }\r\n\r\n        private string GetDraftText(TLDraftMessage draft)\r\n        {\r\n            var entities = draft.Entities;\r\n            var text = draft.Message.ToString();\r\n            if (entities == null || entities.Count == 0) return text;\r\n\r\n            ClearMentions();\r\n\r\n            var builder = new StringBuilder();\r\n\r\n            //text\r\n            for (var i = 0; i < entities.Count; i++)\r\n            {\r\n                // prefix i\r\n                var offset = i == 0 ? 0 : entities[i - 1].Offset.Value + entities[i - 1].Length.Value;\r\n                var length = i == 0 ? entities[i].Offset.Value : entities[i].Offset.Value - offset;\r\n                var prefix = text.Substring(offset, length);\r\n\r\n                builder.Append(prefix);\r\n\r\n                // entity i\r\n                var entityText = text.Substring(entities[i].Offset.Value, entities[i].Length.Value);\r\n                var entityMentionName = entities[i] as TLMessageEntityMentionName;\r\n                var inputEntityMentionName = entities[i] as TLInputMessageEntityMentionName;\r\n                if (entityMentionName != null)\r\n                {\r\n                    var user = CacheService.GetUser(entityMentionName.UserId);\r\n                    if (user != null)\r\n                    {\r\n                        AddMention(user);\r\n                        entityText = string.Format(\"@({0})\", entityText);\r\n                    }\r\n                }\r\n                else if (inputEntityMentionName != null)\r\n                {\r\n                    var inputUser = inputEntityMentionName.User as TLInputUser;\r\n                    if (inputUser != null)\r\n                    {\r\n                        var user = CacheService.GetUser(inputUser.UserId);\r\n                        if (user != null)\r\n                        {\r\n                            AddMention(user);\r\n                            entityText = string.Format(\"@({0})\", entityText);\r\n                        }\r\n                    }\r\n                }\r\n                builder.Append(entityText);\r\n            }\r\n\r\n            //postfix\r\n            var lastEntity = entities[entities.Count - 1];\r\n            var postfix = text.Substring(lastEntity.Offset.Value + lastEntity.Length.Value);\r\n            builder.Append(postfix);\r\n\r\n            return builder.ToString();\r\n        }\r\n\r\n        public void Handle(TLUpdateReadMessagesContents update)\r\n        {\r\n            // UI thread here\r\n            var channel = With as TLChannel;\r\n            if (channel != null) return;\r\n\r\n            SplitGroupedMessages(update.Messages);\r\n        }\r\n\r\n        public void Handle(TLUpdateChannelReadMessagesContents update)\r\n        {\r\n            // UI thread here\r\n            var channel = With as TLChannel;\r\n            if (channel == null) return;\r\n            if (channel.Index != update.ChannelId.Value) return;\r\n\r\n            SplitGroupedMessages(update.Messages);\r\n        }\r\n\r\n        private void SplitGroupedMessages(IList<TLInt> messages)\r\n        {\r\n            var messagesDict = messages.ToDictionary(x => x.Value);\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var message = Items[i] as TLMessage73;\r\n                if (message != null)\r\n                {\r\n                    var mediaGroup = message.Media as TLMessageMediaGroup;\r\n                    if (mediaGroup != null)\r\n                    {\r\n                        var removed = false;\r\n                        for (var j = 0; j < mediaGroup.Group.Count; j++)\r\n                        {\r\n                            if (messagesDict.ContainsKey(mediaGroup.Group[j].Index))\r\n                            {\r\n                                removed = true;\r\n                                break;\r\n                            }\r\n                        }\r\n\r\n                        if (removed)\r\n                        {\r\n                            Items.RemoveAt(i);\r\n\r\n                            var group = new TLVector<TLMessageBase>(mediaGroup.Group.Reverse().ToList());\r\n\r\n                            ProcessGroupedMessages(group);\r\n\r\n                            for (var j = 0; j < group.Count; j++)\r\n                            {\r\n                                Items.Insert(i++, group[j]);\r\n                            }\r\n                            i--;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(ForwardGroupedEventArgs args)\r\n        {\r\n            // UI thread\r\n            var lastMessage = args.Messages.LastOrDefault();\r\n            if (lastMessage != null)\r\n            {\r\n                for (int i = 0; i < Items.Count; i++)\r\n                {\r\n                    var message73 = Items[i] as TLMessage73;\r\n                    if (message73 != null\r\n                        && message73.GroupedId != null)\r\n                    {\r\n                        var mediaGroup = message73.Media as TLMessageMediaGroup;\r\n                        if (mediaGroup != null)\r\n                        {\r\n                            for (int j = 0; j < mediaGroup.Group.Count; j++)\r\n                            {\r\n                                if (mediaGroup.Group[j] == lastMessage)\r\n                                {\r\n                                    message73.Status = lastMessage.Status;\r\n                                    message73.Date = lastMessage.Date;\r\n                                    message73.Id = lastMessage.Id;\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public static class Wav\r\n    {\r\n        public static MemoryStream GetWavAsMemoryStream(this byte[] data, int sampleRate, int audioChannels = 1, int bitsPerSample = 16)\r\n        {\r\n            MemoryStream memoryStream = new MemoryStream();\r\n            Wav.WriteHeader(memoryStream, sampleRate, audioChannels, bitsPerSample);\r\n            Wav.SeekPastHeader(memoryStream);\r\n            memoryStream.Write(data, 0, data.Length);\r\n            Wav.UpdateHeader(memoryStream);\r\n            return memoryStream;\r\n        }\r\n        public static MemoryStream GetWavAsMemoryStream(this Stream data, int sampleRate, int audioChannels = 1, int bitsPerSample = 16)\r\n        {\r\n            MemoryStream memoryStream = new MemoryStream();\r\n            Wav.WriteHeader(memoryStream, sampleRate, audioChannels, bitsPerSample);\r\n            Wav.SeekPastHeader(memoryStream);\r\n            data.Position = 0L;\r\n            data.CopyTo(memoryStream);\r\n            Wav.UpdateHeader(memoryStream);\r\n            return memoryStream;\r\n        }\r\n        public static byte[] GetWavAsByteArray(this byte[] data, int sampleRate, int audioChannels = 1, int bitsPerSample = 16)\r\n        {\r\n            return data.GetWavAsMemoryStream(sampleRate, audioChannels, bitsPerSample).ToArray();\r\n        }\r\n        public static byte[] GetWavAsByteArray(this Stream data, int sampleRate, int audioChannels = 1, int bitsPerSample = 16)\r\n        {\r\n            return data.GetWavAsMemoryStream(sampleRate, audioChannels, bitsPerSample).ToArray();\r\n        }\r\n        public static void WriteHeader(Stream stream, int sampleRate, int audioChannels = 1, int bitsPerSample = 16)\r\n        {\r\n            int num = bitsPerSample / 8;\r\n            Encoding uTF = Encoding.UTF8;\r\n            long position = stream.Position;\r\n            stream.Seek(0L, 0);\r\n            stream.Write(uTF.GetBytes(\"RIFF\"), 0, 4);\r\n            stream.Write(BitConverter.GetBytes(0), 0, 4);\r\n            stream.Write(uTF.GetBytes(\"WAVE\"), 0, 4);\r\n            stream.Write(uTF.GetBytes(\"fmt \"), 0, 4);\r\n            stream.Write(BitConverter.GetBytes(16), 0, 4);\r\n            stream.Write(BitConverter.GetBytes(1), 0, 2);\r\n            stream.Write(BitConverter.GetBytes((short)audioChannels), 0, 2);\r\n            stream.Write(BitConverter.GetBytes(sampleRate), 0, 4);\r\n            stream.Write(BitConverter.GetBytes(sampleRate * num * audioChannels), 0, 4);\r\n            stream.Write(BitConverter.GetBytes((short)num), 0, 2);\r\n            stream.Write(BitConverter.GetBytes((short)bitsPerSample), 0, 2);\r\n            stream.Write(uTF.GetBytes(\"data\"), 0, 4);\r\n            stream.Write(BitConverter.GetBytes(0), 0, 4);\r\n            Wav.UpdateHeader(stream);\r\n            stream.Seek(position, 0);\r\n        }\r\n        public static void SeekPastHeader(Stream stream)\r\n        {\r\n            if (!stream.CanSeek)\r\n            {\r\n                throw new Exception(\"Can't seek stream to update wav header\");\r\n            }\r\n            stream.Seek(44L, 0);\r\n        }\r\n        public static void UpdateHeader(Stream stream)\r\n        {\r\n            if (!stream.CanSeek)\r\n            {\r\n                throw new Exception(\"Can't seek stream to update wav header\");\r\n            }\r\n            long position = stream.Position;\r\n            stream.Seek(4L, 0);\r\n            stream.Write(BitConverter.GetBytes((int)stream.Length - 8), 0, 4);\r\n            stream.Seek(40L, 0);\r\n            stream.Write(BitConverter.GetBytes((int)stream.Length - 44), 0, 4);\r\n            stream.Seek(position, 0);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.InlineBots.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Device.Location;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Search;\r\nusing TelegramClient.Views.Additional;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Execute = Caliburn.Micro.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        public void OpenInlineBot(TLUserBase bot)\r\n        {\r\n            var view = GetView() as IDialogDetailsView;\r\n            if (view != null) view.SetInlineBot(bot);\r\n        }\r\n\r\n        private string _botInlinePlaceholder;\r\n\r\n        public string BotInlinePlaceholder\r\n        {\r\n            get { return _botInlinePlaceholder; }\r\n            set { SetField(ref _botInlinePlaceholder, value, () => BotInlinePlaceholder); }\r\n        }\r\n\r\n        public TLUserBase _currentInlineBot;\r\n\r\n        public TLUserBase CurrentInlineBot\r\n        {\r\n            get { return _currentInlineBot; }\r\n            set\r\n            {\r\n                if (value != _currentInlineBot)\r\n                {\r\n                    _currentInlineBot = value;\r\n                    SetBotInlinePlaceholder();\r\n                }\r\n\r\n                if (_currentInlineBot == null && _watcher != null)\r\n                {\r\n                    _watcher.Stop();\r\n                    _disableWatching = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ResolveUsername(string text, string command = null)\r\n        {\r\n            if (IsEditingEnabled)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                CurrentInlineBot = null;\r\n\r\n                return;\r\n            }\r\n\r\n            var username = new TLString(text.TrimStart('@'));\r\n\r\n            var users = CacheService.GetUsers();\r\n            for (var i = 0; i < users.Count; i++)\r\n            {\r\n                var user = users[i] as TLUser;\r\n                if (user != null && user.IsInlineBot \r\n                    && TLString.Equals(user.UserName, username, StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    Execute.OnUIThread(() =>\r\n                    {\r\n                        if (!string.IsNullOrEmpty(command))\r\n                        {\r\n                            _currentInlineBot = user;\r\n                            GetInlineBotResults(command);\r\n                        }\r\n                        else\r\n                        {\r\n                            CurrentInlineBot = user;\r\n                            GetInlineBotResults(string.Empty);\r\n                        }\r\n                    });\r\n                    return;\r\n                }\r\n            }\r\n\r\n            CurrentInlineBot = null;\r\n            NotifyOfPropertyChange(() => CurrentInlineBot);\r\n\r\n            if (CurrentInlineBot == null)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.ResolveUsernameAsync(username,\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        if (!string.IsNullOrEmpty(command))\r\n                        {\r\n                            _currentInlineBot = result.Users.FirstOrDefault();\r\n                            GetInlineBotResults(command);\r\n                        }\r\n                        else\r\n                        {\r\n                            CurrentInlineBot = result.Users.FirstOrDefault();\r\n                            GetInlineBotResults(string.Empty);\r\n                        }\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"contacts.resolveUsername error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        private bool SearchInlineBotResults(string text, out string searchText)\r\n        {\r\n            var searchInlineBotResults = false;\r\n            searchText = string.Empty;\r\n            if (CurrentInlineBot != null)\r\n            {\r\n                var user = CurrentInlineBot as IUserName;\r\n                if (user != null)\r\n                {\r\n                    var username = user.UserName.ToString();\r\n                    if (text != null\r\n                        && text.TrimStart().StartsWith(\"@\" + username, StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        searchText = ReplaceFirst(text.TrimStart(), \"@\" + username, string.Empty);\r\n                        if (searchText.StartsWith(\" \"))\r\n                        {\r\n                            searchText = ReplaceFirst(searchText, \" \", string.Empty);\r\n                            searchInlineBotResults = true;\r\n                        }\r\n\r\n                        if (!searchInlineBotResults)\r\n                        {\r\n                            if (string.Equals(text.TrimStart(), \"@\" + username, StringComparison.OrdinalIgnoreCase))\r\n                            {\r\n                                CurrentInlineBot = null;\r\n                            }\r\n                            else\r\n                            {\r\n                                SetBotInlinePlaceholder();\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            if (string.IsNullOrEmpty(searchText))\r\n                            {\r\n                                SetBotInlinePlaceholder();\r\n                            }\r\n                            else\r\n                            {\r\n                                BotInlinePlaceholder = string.Empty;\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        CurrentInlineBot = null;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return searchInlineBotResults;\r\n        }\r\n\r\n        public void SetBotInlinePlaceholder()\r\n        {\r\n            var user45 = _currentInlineBot as TLUser45;\r\n            if (user45 != null)\r\n            {\r\n                BotInlinePlaceholder = user45.BotInlinePlaceholder != null\r\n                    ? user45.BotInlinePlaceholder.ToString()\r\n                    : string.Empty;\r\n            }\r\n            else\r\n            {\r\n                BotInlinePlaceholder = string.Empty;\r\n            }\r\n        }\r\n\r\n        public string ReplaceFirst(string text, string search, string replace)\r\n        {\r\n            int pos = text.IndexOf(search, StringComparison.OrdinalIgnoreCase);\r\n            if (pos < 0)\r\n            {\r\n                return text;\r\n            }\r\n            return text.Substring(0, pos) + replace + text.Substring(pos + search.Length);\r\n        }\r\n\r\n\r\n        public InlineBotResultsViewModel InlineBotResults { get; protected set; }\r\n\r\n        private void CreateInlineBotResults()\r\n        {\r\n            if (InlineBotResults == null)\r\n            {\r\n                InlineBotResults = new InlineBotResultsViewModel(LoadNextInlineBotResults, Switch);\r\n                NotifyOfPropertyChange(() => InlineBotResults);\r\n            }\r\n        }\r\n\r\n        private void ClearInlineBotResults()\r\n        {\r\n            if (InlineBotResults != null)\r\n            {\r\n                InlineBotResults.SwitchPM = null;\r\n                if (InlineBotResults.Results.Count > 0)\r\n                {\r\n                    InlineBotResults.Results.Clear();\r\n\r\n                    //View.ResumeChatPlayers();\r\n                }\r\n            }\r\n\r\n            _currentInlineBotResults = null;\r\n        }\r\n        \r\n        private static readonly Dictionary<int, TLObject> _switchPMDict = new Dictionary<int, TLObject>();\r\n\r\n        public void StartSwitchPMBotWithParam()\r\n        {\r\n            var switchPMWith = StateService.SwitchPMWith;\r\n            StateService.SwitchPMWith = null;\r\n            if (switchPMWith == null) return;\r\n\r\n            var bot = With as TLUser;\r\n\r\n            if (bot == null || !bot.IsBot || string.IsNullOrEmpty(bot.AccessToken)) return;\r\n\r\n            _switchPMDict[bot.Index] = switchPMWith;\r\n\r\n            var accessToken = new TLString(bot.AccessToken);\r\n            bot.AccessToken = string.Empty;\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var text = new TLString(\"/start\");\r\n\r\n                var message = GetMessage(text, new TLMessageMediaEmpty());\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n                NotifyOfPropertyChange(() => IsAppBarCommandVisible);\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        result => StartBotInternal(result, accessToken)));\r\n            });\r\n        }\r\n\r\n        public void Switch(TLInlineBotSwitchPM switchPM)\r\n        {\r\n            if (CurrentInlineBot == null) return;\r\n\r\n            StateService.With = CurrentInlineBot;\r\n            StateService.RemoveBackEntry = true;\r\n            StateService.SwitchPMWith = With;\r\n            StateService.Bot = CurrentInlineBot;\r\n            StateService.AccessToken = switchPM.StartParam.ToString();\r\n            NavigationService.UriFor<DialogDetailsViewModel>().WithParam(x => x.RandomParam, Guid.NewGuid().ToString()).Navigate();\r\n        }\r\n\r\n        private readonly Dictionary<string, TLBotResults> _cachedInlineBotResults = new Dictionary<string, TLBotResults>();\r\n\r\n        private const int InlineBotMaxResults = 5;\r\n\r\n        private string _currentText;\r\n\r\n        private TLBotResults _currentInlineBotResults;\r\n\r\n        private GeoCoordinateWatcher _watcher;\r\n\r\n        private string _readyText;\r\n\r\n        private bool _suppressGetResultsOnReady;\r\n\r\n        public void GetInlineBotResults(string text)\r\n        {\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(\"GetInlineBotResults text='\" + text + \"'\");\r\n\r\n            if (text == null) return;\r\n\r\n            var currentInlineBot = CurrentInlineBot as TLUser;\r\n            if (currentInlineBot == null) return;\r\n\r\n            var username = currentInlineBot.UserName;\r\n            if (TLString.IsNullOrEmpty(username)) return;\r\n\r\n            var user45 = currentInlineBot as TLUser45;\r\n            if (!CheckBotInlineGeoAccess(user45)) return;\r\n\r\n            if (StartGeoWatching(text, user45)) return;\r\n\r\n            var currentText = text;\r\n            _currentText = text;\r\n\r\n            ClearInlineBotResults();\r\n\r\n            TLBotResults cachedResult;\r\n            if (_cachedInlineBotResults.TryGetValue(string.Format(\"{0}_{1}\", username, text), out cachedResult))\r\n            {\r\n                if (cachedResult != null)\r\n                {\r\n                    BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n                    {\r\n                        if (CurrentInlineBot != currentInlineBot) return;\r\n                        if (_currentText != currentText) return;\r\n\r\n                        System.Diagnostics.Debug.WriteLine(\"    CachedResults location={0} text={1}\", _watcher != null? _watcher.Position.Location : null, text);\r\n                        CreateInlineBotResults();\r\n\r\n                        InlineBotResults.Gallery = cachedResult.Gallery;\r\n                        var cachedResult51 = cachedResult as TLBotResults51;\r\n                        if (cachedResult51 != null)\r\n                        {\r\n                            InlineBotResults.SwitchPM = cachedResult51.SwitchPM;\r\n                        }\r\n                        for (var i = 0; i < cachedResult.Results.Count; i++)\r\n                        {\r\n                            if (i == InlineBotMaxResults) break;\r\n                            InlineBotResults.Results.Add(cachedResult.Results[i]);\r\n                        }\r\n\r\n                        if (InlineBotResults.Results.Count > 0) View.PauseChatPlayers();\r\n\r\n                        _currentInlineBotResults = cachedResult;\r\n                    });\r\n                }\r\n            }\r\n            else\r\n            {\r\n                BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n                {\r\n                    if (CurrentInlineBot != currentInlineBot) return;\r\n                    if (_currentText != currentText) return;\r\n\r\n                    var geoPoint = GetGeoPoint(user45);\r\n\r\n                    //System.Diagnostics.Debug.WriteLine(\"    GetInlineBotResults location={0} text={1}\", geoPoint, text);\r\n                    IsWorking = true;\r\n                    //Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"messages.getInlineBotResults username={0} query={1}\", currentInlineBot.UserName, currentText));\r\n                    MTProtoService.GetInlineBotResultsAsync(currentInlineBot.ToInputUser(), Peer, geoPoint, new TLString(currentText), TLString.Empty,\r\n                        result => BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n\r\n                            CreateInlineBotResults();\r\n\r\n                            if (CurrentInlineBot == currentInlineBot && _currentText == currentText)\r\n                            {\r\n                                InlineBotResults.Gallery = result.Gallery;\r\n                                var cachedResult51 = result as TLBotResults51;\r\n                                if (cachedResult51 != null)\r\n                                {\r\n                                    InlineBotResults.SwitchPM = cachedResult51.SwitchPM;\r\n                                }\r\n                                for (var i = 0; i < result.Results.Count; i++)\r\n                                {\r\n                                    if (i == InlineBotMaxResults) break;\r\n\r\n                                    result.Results[i].QueryId = result.QueryId;\r\n                                    InlineBotResults.Results.Add(result.Results[i]);\r\n                                }\r\n\r\n                                if (InlineBotResults.Results.Count > 0) View.PauseChatPlayers();\r\n                            }\r\n\r\n                            _currentInlineBotResults = result;\r\n\r\n                            _cachedInlineBotResults[string.Format(\"{0}_{1}\", username, currentText)] = result;\r\n                        }),\r\n                        error => BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.getInlineBotResults error \" + error);\r\n                        }));\r\n                });\r\n            }\r\n        }\r\n\r\n        private bool StartGeoWatching(string text, TLUser45 user45)\r\n        {\r\n            if (user45 != null && user45.IsBotInlineGeo && user45.BotInlineGeoAccess)\r\n            {\r\n                if (_watcher == null)\r\n                {\r\n                    _readyText = text;\r\n\r\n                    _watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High);\r\n                    _watcher.StatusChanged += (o, e) =>\r\n                    {\r\n                        if (_watcher.Status == GeoPositionStatus.Ready)\r\n                        {\r\n                            if (_suppressGetResultsOnReady)\r\n                            {\r\n                                _suppressGetResultsOnReady = false;\r\n                                //System.Diagnostics.Debug.WriteLine(\"    ReGetInlineBotReesults suppress status={0} text={1}\", _watcher.Status, text);\r\n                                return;\r\n                            }\r\n                            //System.Diagnostics.Debug.WriteLine(\"    ReGetInlineBotReesults status={0} text={1}\", _watcher.Status, text);\r\n                            GetInlineBotResults(_readyText);\r\n                            _readyText = null;\r\n                        }\r\n                        else if (_watcher.Status == GeoPositionStatus.Initializing)\r\n                        {\r\n                        }\r\n                        else if (_watcher.Status == GeoPositionStatus.Disabled)\r\n                        {\r\n                            var result = MessageBox.Show(AppResources.LocationServicesDisabled, AppResources.AppName,\r\n                                MessageBoxButton.OKCancel);\r\n                            if (result == MessageBoxResult.OK)\r\n                            {\r\n#if WP8\r\n                                Windows.System.Launcher.LaunchUriAsync(new Uri(\"ms-settings-location:\"));\r\n#endif\r\n                            }\r\n                        }\r\n                    };\r\n                    _watcher.Start(true);\r\n\r\n                    return true;\r\n                }\r\n\r\n                if (_disableWatching)\r\n                {\r\n                    _disableWatching = false;\r\n\r\n                    _watcher.Start(true);\r\n                    if (_watcher.Position.Location != GeoCoordinate.Unknown)\r\n                    {\r\n                        _suppressGetResultsOnReady = true;\r\n                    }\r\n                }\r\n\r\n                if (_watcher.Status == GeoPositionStatus.Initializing)\r\n                {\r\n                    if (_watcher.Position.Location == GeoCoordinate.Unknown)\r\n                    {\r\n                        //System.Diagnostics.Debug.WriteLine(\"    SetReadyText status={0} text={1}\", _watcher.Status, text);\r\n                        _readyText = text;\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n            return false;\r\n        }\r\n\r\n        private bool CheckBotInlineGeoAccess(TLUser45 user45)\r\n        {\r\n            if (user45 != null && user45.IsBotInlineGeo && !user45.BotInlineGeoAccess)\r\n            {\r\n                var now = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n                if (user45.NotifyGeoAccessDate == null\r\n                    || user45.NotifyGeoAccessDate.Value + Constants.RecheckBotInlineGeoAccessInterval <= now.Value)\r\n                {\r\n                    user45.NotifyGeoAccessDate = now;\r\n\r\n                    var result = MessageBox.Show(AppResources.ShareLocationInlineConfirmation, AppResources.ShareLocationCaption, MessageBoxButton.OKCancel);\r\n                    if (result != MessageBoxResult.OK) return false;\r\n\r\n                    user45.BotInlineGeoAccess = true;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private TLInputGeoPointBase GetGeoPoint(TLUser45 user45)\r\n        {\r\n            TLInputGeoPointBase geoPoint = null;\r\n            if (user45 != null && user45.IsBotInlineGeo)\r\n            {\r\n                geoPoint = new TLInputGeoPointEmpty();\r\n                if (user45.BotInlineGeoAccess && _watcher != null && _watcher.Status == GeoPositionStatus.Ready && _watcher.Position.Location != GeoCoordinate.Unknown)\r\n                {\r\n                    geoPoint = new TLInputGeoPoint { Lat = new TLDouble(_watcher.Position.Location.Latitude), Long = new TLDouble(_watcher.Position.Location.Longitude) };\r\n                }\r\n            }\r\n            return geoPoint;\r\n        }\r\n\r\n        public void ContinueInlineBotResults()\r\n        {\r\n            if (_currentInlineBotResults != null)\r\n            {\r\n                CreateInlineBotResults();\r\n\r\n                if (InlineBotResults.Results.Count == InlineBotMaxResults)\r\n                {\r\n                    for (var i = InlineBotMaxResults; i < _currentInlineBotResults.Results.Count; i++)\r\n                    {\r\n                        _currentInlineBotResults.Results[i].QueryId = _currentInlineBotResults.QueryId;\r\n                        InlineBotResults.Results.Add(_currentInlineBotResults.Results[i]);\r\n                    }\r\n\r\n                    if (InlineBotResults.Results.Count > 0) View.PauseChatPlayers();\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isLoadingNextInlineBotResults;\r\n\r\n        public void LoadNextInlineBotResults()\r\n        {\r\n            if (_isLoadingNextInlineBotResults) return;\r\n\r\n            if (CurrentInlineBot == null) return;\r\n            if (_currentInlineBotResults == null) return;\r\n            if (_currentInlineBotResults.NextOffset == null) return;\r\n\r\n            var currentInlineBot = CurrentInlineBot;\r\n            var currentInlineBotResults = _currentInlineBotResults;\r\n            var currentText = _currentText;\r\n\r\n            var user = CurrentInlineBot as TLUser;\r\n            if (user == null) return;\r\n\r\n            var username = user.UserName;\r\n\r\n            _isLoadingNextInlineBotResults = true;\r\n            IsWorking = true;\r\n\r\n            var geoPoint = GetGeoPoint(user as TLUser45);\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"GetInlineBotResults location={0} text={1}\", geoPoint, currentText);\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"messages.getInlineBotResults username={0} query={1}\", currentInlineBot.UserName, currentText));\r\n            MTProtoService.GetInlineBotResultsAsync(currentInlineBot.ToInputUser(), Peer, geoPoint, new TLString(currentText), currentInlineBotResults.NextOffset,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    _isLoadingNextInlineBotResults = false;\r\n                    IsWorking = false;\r\n\r\n                    if (CurrentInlineBot == currentInlineBot && currentInlineBotResults == _currentInlineBotResults && _currentText == currentText)\r\n                    {\r\n                        for (var i = 0; i < result.Results.Count; i++)\r\n                        {\r\n                            result.Results[i].QueryId = result.QueryId;\r\n                            InlineBotResults.Results.Add(result.Results[i]);\r\n                        }\r\n\r\n                        if (InlineBotResults.Results.Count > 0) View.PauseChatPlayers();\r\n                    }\r\n\r\n                    TLBotResults cachedResult;\r\n                    if (_cachedInlineBotResults.TryGetValue(string.Format(\"{0}_{1}\", username, currentText), out cachedResult))\r\n                    {\r\n                        _cachedInlineBotResults[string.Format(\"{0}_{1}\", username, currentText)] = MergeInlineBotResults(cachedResult, result);\r\n                    }\r\n                    else\r\n                    {\r\n                        _cachedInlineBotResults[string.Format(\"{0}_{1}\", username, currentText)] = result;\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _isLoadingNextInlineBotResults = false;\r\n                    IsWorking = false;\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.getInlineBotResults error \" + error);\r\n                }));\r\n        }\r\n\r\n        private static TLBotResults MergeInlineBotResults(TLBotResults cachedResult, TLBotResults result)\r\n        {\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(\"MergeInlineBotResults \" + cachedResult.QueryId + \" \" + result.QueryId);\r\n\r\n            //if (cachedResult.QueryId.Value != result.QueryId.Value) return cachedResult;\r\n\r\n            cachedResult.Flags = result.Flags;\r\n            cachedResult.NextOffset = result.NextOffset;\r\n            foreach (var resultItem in result.Results)\r\n            {\r\n                cachedResult.Results.Add(resultItem);\r\n            }\r\n\r\n            return cachedResult;\r\n        }\r\n\r\n        private static readonly object _inlineBotsSyncRoot = new object();\r\n\r\n        private static IList<TLUserBase> _inlineBots;\r\n\r\n        public static void SaveInlineBotsAsync()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var inlineBots = new TLVector<TLUserBase>(_inlineBots ?? new List<TLUserBase>());\r\n                TLUtils.SaveObjectToMTProtoFile(_inlineBotsSyncRoot, Constants.InlineBotsFileName, inlineBots);\r\n            });\r\n        }\r\n\r\n        public static IList<TLUserBase> GetInlineBots()\r\n        {\r\n            if (_inlineBots != null) return _inlineBots;\r\n\r\n            var topPeers = IoC.Get<IStateService>().GetTopPeers() as TLTopPeers;\r\n            if (topPeers != null)\r\n            {\r\n                var inlineBotsCategory = topPeers.Categories.FirstOrDefault(x => x.Category is TLTopPeerCategoryBotsInline);\r\n                if (inlineBotsCategory != null)\r\n                {\r\n                    var inlineBots = new List<TLUserBase>();\r\n                    foreach (var peer in inlineBotsCategory.Peers)\r\n                    {\r\n                        var user = IoC.Get<ICacheService>().GetUser(peer.Peer.Id);\r\n                        if (user != null)\r\n                        {\r\n                            inlineBots.Add(user);\r\n                        }\r\n                    }\r\n\r\n                    //if (inlineBots.Count > 0)\r\n                    {\r\n                        _inlineBots = inlineBots;\r\n\r\n                        return _inlineBots;\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            _inlineBots = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLUserBase>>(_inlineBotsSyncRoot, Constants.InlineBotsFileName) ?? new TLVector<TLUserBase>();\r\n\r\n            return _inlineBots;\r\n        }\r\n\r\n        public static IList<TLUserBase> DeleteInlineBots()\r\n        {\r\n            _inlineBots = new TLVector<TLUserBase>();\r\n            FileUtils.Delete(_inlineBotsSyncRoot, Constants.InlineBotsFileName);\r\n\r\n            return _inlineBots;\r\n        }\r\n\r\n        public void SendBotInlineResult(TLBotInlineResultBase result)\r\n        {\r\n            _debugNotifyOfPropertyChanged = true;\r\n\r\n            var currentInlineBot = CurrentInlineBot;\r\n            if (currentInlineBot == null) return;\r\n\r\n            var inlineBots = GetInlineBots();\r\n\r\n            if (!inlineBots.Contains(currentInlineBot))\r\n            {\r\n                inlineBots.Insert(0, currentInlineBot);\r\n                _cachedUsernameResults.Clear();\r\n            }\r\n            else\r\n            {\r\n                inlineBots.Remove(currentInlineBot);\r\n                inlineBots.Insert(0, currentInlineBot);\r\n                _cachedUsernameResults.Clear();\r\n            }\r\n\r\n            SaveInlineBotsAsync();\r\n\r\n            if (_currentInlineBotResults == null) return;\r\n            var queryId = _currentInlineBotResults.QueryId;\r\n\r\n            ClearInlineBotResults();\r\n            CurrentInlineBot = null;\r\n            NotifyOfPropertyChange(() => BotInlinePlaceholder);\r\n            Text = string.Empty;\r\n\r\n            var message = GetMessage(TLString.Empty, new TLMessageMediaEmpty()) as TLMessage45;\r\n            if (message == null) return;\r\n\r\n            ProcessBotInlineResult(message, result, currentInlineBot.Id);\r\n\r\n            if (message._media != null)\r\n            {\r\n                message.SetMedia();\r\n            }\r\n\r\n            if (Reply != null && IsWebPagePreview(Reply))\r\n            {\r\n                message._media = ((TLMessagesContainter)Reply).WebPageMedia;\r\n                Reply = _previousReply;\r\n            }\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                var user = With as TLUser;\r\n                if (user != null && user.IsBot && Items.Count == 1)\r\n                {\r\n                    NotifyOfPropertyChange(() => With);\r\n                }\r\n\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    ProcessScroll();\r\n                    View.ResumeChatPlayers();\r\n                });\r\n\r\n                _debugNotifyOfPropertyChanged = false;\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        m => SendInternal(message, MTProtoService,\r\n                            () => { },\r\n                            () => Status = string.Empty)));\r\n            });\r\n        }\r\n\r\n        private static bool BadInlineBotMessage(TLMessage45 message)\r\n        {\r\n            //var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            //if (mediaDocument != null)\r\n            //{\r\n            //    var document = mediaDocument.Document as TLDocument22;\r\n            //    if (document != null && document.Size.Value == 0)\r\n            //    {\r\n            //        return true;\r\n            //    }\r\n            //}\r\n\r\n            return false;\r\n        }\r\n\r\n        private void ProcessBotInlineResult(TLMessage45 message, TLBotInlineResultBase resultBase, TLInt botId)\r\n        {\r\n            message.InlineBotResultId = resultBase.Id;\r\n            message.InlineBotResultQueryId = resultBase.QueryId;\r\n            message.ViaBotId = botId;\r\n\r\n            var botInlineMessageMediaVenue = resultBase.SendMessage as TLBotInlineMessageMediaVenue;\r\n            var botInlineMessageMediaGeo = resultBase.SendMessage as TLBotInlineMessageMediaGeo;\r\n            if (botInlineMessageMediaVenue != null)\r\n            {\r\n                message._media = new TLMessageMediaVenue72\r\n                {\r\n                    Title = botInlineMessageMediaVenue.Title,\r\n                    Address = botInlineMessageMediaVenue.Address,\r\n                    Provider = botInlineMessageMediaVenue.Provider,\r\n                    VenueId = botInlineMessageMediaVenue.VenueId,\r\n                    VenueType = TLString.Empty,\r\n                    Geo = botInlineMessageMediaVenue.Geo\r\n                };\r\n            }\r\n            else if (botInlineMessageMediaGeo != null)\r\n            {\r\n                message._media = new TLMessageMediaGeo { Geo = botInlineMessageMediaGeo.Geo };\r\n            }\r\n\r\n            var botInlineMessageMediaContact = resultBase.SendMessage as TLBotInlineMessageMediaContact;\r\n            if (botInlineMessageMediaContact != null)\r\n            {\r\n                message._media = new TLMessageMediaContact82\r\n                {\r\n                    PhoneNumber = botInlineMessageMediaContact.PhoneNumber,\r\n                    FirstName = botInlineMessageMediaContact.FirstName,\r\n                    LastName = botInlineMessageMediaContact.LastName,\r\n                    UserId = new TLInt(0),\r\n                    VCard = TLString.Empty\r\n                };\r\n            }\r\n\r\n            var mediaResult = resultBase as TLBotInlineMediaResult;\r\n            if (mediaResult != null)\r\n            {\r\n                if (TLString.Equals(mediaResult.Type, new TLString(\"voice\"), StringComparison.OrdinalIgnoreCase)\r\n                    && mediaResult.Document != null)\r\n                {\r\n                    message._media = new TLMessageMediaDocument75 { Flags = new TLInt(0), Document = mediaResult.Document, Caption = TLString.Empty, NotListened = !(With is TLChannel) };\r\n\r\n                    message.NotListened = !(With is TLChannel);\r\n                }\r\n                else if (TLString.Equals(mediaResult.Type, new TLString(\"audio\"), StringComparison.OrdinalIgnoreCase)\r\n                    && mediaResult.Document != null)\r\n                {\r\n                    message._media = new TLMessageMediaDocument75 { Flags = new TLInt(0), Document = mediaResult.Document, Caption = TLString.Empty };\r\n                }\r\n                else if (TLString.Equals(mediaResult.Type, new TLString(\"sticker\"), StringComparison.OrdinalIgnoreCase)\r\n                    && mediaResult.Document != null)\r\n                {\r\n                    message._media = new TLMessageMediaDocument75 { Flags = new TLInt(0), Document = mediaResult.Document, Caption = TLString.Empty };\r\n                }\r\n                else if (TLString.Equals(mediaResult.Type, new TLString(\"file\"), StringComparison.OrdinalIgnoreCase)\r\n                    && mediaResult.Document != null)\r\n                {\r\n                    message._media = new TLMessageMediaDocument75 { Flags = new TLInt(0), Document = mediaResult.Document, Caption = TLString.Empty };\r\n                }\r\n                else if (TLString.Equals(mediaResult.Type, new TLString(\"gif\"), StringComparison.OrdinalIgnoreCase)\r\n                    && mediaResult.Document != null)\r\n                {\r\n                    message._media = new TLMessageMediaDocument75 { Flags = new TLInt(0), Document = mediaResult.Document, Caption = TLString.Empty };\r\n                }\r\n                else if (TLString.Equals(mediaResult.Type, new TLString(\"photo\"), StringComparison.OrdinalIgnoreCase)\r\n                    && mediaResult.Photo != null)\r\n                {\r\n                    message._media = new TLMessageMediaPhoto75 { Flags = new TLInt(0), Photo = mediaResult.Photo, Caption = TLString.Empty };\r\n                }\r\n                else if (TLString.Equals(mediaResult.Type, new TLString(\"game\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    var game = new TLGame\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Id = new TLLong(0),\r\n                        AccessHash = new TLLong(0),\r\n                        ShortName = mediaResult.Id,\r\n                        Title = mediaResult.Title ?? TLString.Empty,\r\n                        Description = mediaResult.Description ?? TLString.Empty,\r\n                        Photo = mediaResult.Photo ?? new TLPhotoEmpty {Id = new TLLong(0)},\r\n                        Document = mediaResult.Document\r\n                    };\r\n\r\n                    message._media = new TLMessageMediaGame { Game = game, SourceMessage = message };\r\n                }\r\n            }\r\n\r\n            var result = resultBase as TLBotInlineResult;\r\n            if (result != null)\r\n            {\r\n                var isVoice = TLString.Equals(result.Type, new TLString(\"voice\"), StringComparison.OrdinalIgnoreCase);\r\n                var isAudio = TLString.Equals(result.Type, new TLString(\"audio\"), StringComparison.OrdinalIgnoreCase);\r\n                var isFile = TLString.Equals(result.Type, new TLString(\"file\"), StringComparison.OrdinalIgnoreCase);\r\n\r\n                if (isFile\r\n                    || isAudio\r\n                    || isVoice)\r\n                {\r\n                    var document = result.Document as TLDocument22;\r\n                    if (document == null)\r\n                    {\r\n                        string fileName = null;\r\n                        if (result.ContentUrl != null)\r\n                        {\r\n                            var fileUri = new Uri(result.ContentUrlString);\r\n                            try\r\n                            {\r\n                                fileName = Path.GetFileName(fileUri.LocalPath);\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                \r\n                            }\r\n\r\n                            if (fileName == null)\r\n                            {\r\n                                fileName = \"file.ext\";\r\n                            }\r\n                        }\r\n\r\n                        document = new TLDocument54\r\n                        {\r\n                            Id = new TLLong(0),\r\n                            AccessHash = new TLLong(0),\r\n                            Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                            FileName = new TLString(fileName),\r\n                            MimeType = result.ContentType ?? TLString.Empty,\r\n                            Size = new TLInt(0),\r\n                            Thumb = new TLPhotoSizeEmpty { Type = TLString.Empty },\r\n                            DCId = new TLInt(0),\r\n                            Version = new TLInt(0)\r\n                        };\r\n\r\n                        if (isVoice || isAudio)\r\n                        {\r\n                            var documentAttributeAudio = new TLDocumentAttributeAudio46\r\n                            {\r\n                                Duration = result.Duration ?? new TLInt(0),\r\n                                Title = result.Title ?? TLString.Empty,\r\n                                Performer = null,\r\n                                Voice = isVoice\r\n                            };\r\n                            document.Attributes.Add(documentAttributeAudio);\r\n                        }\r\n\r\n                        //message._status = MessageStatus.Failed;\r\n                    }\r\n                    var mediaDocument = new TLMessageMediaDocument75 { Flags = new TLInt(0), Document = document, Caption = TLString.Empty };\r\n\r\n                    message._media = mediaDocument;\r\n\r\n                    mediaDocument.NotListened = isVoice && !(With is TLChannel);\r\n                    message.NotListened = isVoice && !(With is TLChannel);\r\n                }\r\n                else if (TLString.Equals(result.Type, new TLString(\"gif\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    var document = result.Document;\r\n                    if (document != null)\r\n                    {\r\n                        var mediaDocument = new TLMessageMediaDocument75 { Flags = new TLInt(0), Document = document, Caption = TLString.Empty };\r\n\r\n                        message._media = mediaDocument;\r\n                    }\r\n                }\r\n                else if (TLString.Equals(result.Type, new TLString(\"photo\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"w={0} h={1}\\nthumb_url={2}\\ncontent_url={3}\", result.W, result.H, result.ThumbUrl, result.ContentUrl));\r\n\r\n                    var location = new TLFileLocation{DCId = new TLInt(1), VolumeId = TLLong.Random(), LocalId = TLInt.Random(), Secret = TLLong.Random() };\r\n\r\n                    var cachedSize = new TLPhotoCachedSize\r\n                    {\r\n                        Type = new TLString(\"s\"),\r\n                        W = result.W ?? new TLInt(90),\r\n                        H = result.H ?? new TLInt(90),\r\n                        Location = location,\r\n                        Bytes = TLString.Empty,\r\n                        TempUrl = result.ThumbUrlString ?? result.ContentUrlString\r\n                        //Size = new TLInt(0)\r\n                    };\r\n\r\n                    var size = new TLPhotoSize\r\n                    {\r\n                        Type = new TLString(\"m\"),\r\n                        W = result.W ?? new TLInt(90),\r\n                        H = result.H ?? new TLInt(90),\r\n                        Location = location,\r\n                        TempUrl = result.ContentUrlString,\r\n                        Size = new TLInt(0)\r\n                    };\r\n\r\n                    if (!string.IsNullOrEmpty(result.ThumbUrlString))\r\n                    {\r\n                        //ServicePointManager.ServerCertificateValidationCallback += new \r\n\r\n                        var webClient = new WebClient();\r\n                        webClient.OpenReadAsync(new Uri(result.ThumbUrlString, UriKind.Absolute));\r\n                        webClient.OpenReadCompleted += (sender, args) =>\r\n                        {\r\n                            if (args.Cancelled) return;\r\n                            if (args.Error != null) return;\r\n\r\n                            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                                location.VolumeId,\r\n                                location.LocalId,\r\n                                location.Secret);\r\n\r\n                            using (var stream = args.Result)\r\n                            {\r\n                                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store.FileExists(fileName)) return;\r\n                                    using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read))\r\n                                    {\r\n                                        const int BUFFER_SIZE = 128*1024;\r\n                                        var buf = new byte[BUFFER_SIZE];\r\n\r\n                                        var bytesread = 0;\r\n                                        while ((bytesread = stream.Read(buf, 0, BUFFER_SIZE)) > 0)\r\n                                        {\r\n                                            var position = stream.Position;\r\n                                            stream.Position = position - 10;\r\n                                            var tempBuffer = new byte[10];\r\n                                            var resultOk = stream.Read(tempBuffer, 0, tempBuffer.Length);\r\n                                            file.Write(buf, 0, bytesread);\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            if (!string.IsNullOrEmpty(result.ContentUrlString))\r\n                            {\r\n                                webClient.OpenReadAsync(new Uri(result.ContentUrlString, UriKind.Absolute));\r\n                                webClient.OpenReadCompleted += (sender2, args2) =>\r\n                                {\r\n                                    if (args2.Cancelled) return;\r\n                                    if (args2.Error != null) return;\r\n\r\n                                    using (var stream = args2.Result)\r\n                                    {\r\n                                        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                        {\r\n                                            if (store.FileExists(fileName)) return;\r\n                                            using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read))\r\n                                            {\r\n                                                const int BUFFER_SIZE = 128 * 1024;\r\n                                                var buf = new byte[BUFFER_SIZE];\r\n\r\n                                                int bytesread = 0;\r\n                                                while ((bytesread = stream.Read(buf, 0, BUFFER_SIZE)) > 0)\r\n                                                {\r\n                                                    file.Write(buf, 0, bytesread);\r\n                                                }\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                };\r\n                            }\r\n                        };\r\n                    }\r\n\r\n                    var photo = new TLPhoto56\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Id = TLLong.Random(),\r\n                        AccessHash = TLLong.Random(),\r\n                        Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                        Sizes = new TLVector<TLPhotoSizeBase> {cachedSize, size}\r\n                    };\r\n\r\n                    var mediaPhoto = new TLMessageMediaPhoto75 { Flags = new TLInt(0), Photo = photo, Caption = TLString.Empty };\r\n\r\n                    message._media = mediaPhoto;\r\n                }\r\n            }\r\n\r\n            var messageText = resultBase.SendMessage as TLBotInlineMessageText;\r\n            if (messageText != null)\r\n            {\r\n                message.Message = messageText.Message;\r\n                message.Entities = messageText.Entities;\r\n                if (messageText.NoWebpage)\r\n                {\r\n                    \r\n                }\r\n            }\r\n\r\n            var mediaAuto = resultBase.SendMessage as TLBotInlineMessageMediaAuto75;\r\n            if (mediaAuto != null)\r\n            {\r\n                message.Message = mediaAuto.Caption;\r\n                message.Entities = mediaAuto.Entities;\r\n            }\r\n\r\n            if (resultBase.SendMessage != null\r\n                && resultBase.SendMessage.ReplyMarkup != null)\r\n            {\r\n                message.ReplyMarkup = resultBase.SendMessage.ReplyMarkup;\r\n            }\r\n        }\r\n    }\r\n\r\n    public class StartGifPlayerEventArgs : System.EventArgs\r\n    {\r\n        public TLMessage Message { get; set; }\r\n\r\n        public TLDecryptedMessage DecryptedMessage { get; set; }\r\n\r\n        public StartGifPlayerEventArgs(TLMessage message)\r\n        {\r\n            Message = message;\r\n        }\r\n\r\n        public StartGifPlayerEventArgs(TLDecryptedMessage decryptedMessage)\r\n        {\r\n            DecryptedMessage = decryptedMessage;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Mass.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.Views.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        public bool IsMassDeleteReportSpamEnabled(TLChannel channel, IList<TLMessageBase> randomItems, IList<TLMessageBase> items, out TLUserBase from)\r\n        {\r\n            from = null;\r\n\r\n            if (!channel.Creator && !channel.IsEditor) return false;\r\n\r\n            if (randomItems != null && randomItems.Count > 0) return false;\r\n\r\n            var onlyServiceMessages = true;\r\n            TLInt fromId = null;\r\n            foreach (var messageBase in items)\r\n            {\r\n                var messageService = messageBase as TLMessageService;\r\n                if (messageService == null)\r\n                {\r\n                    onlyServiceMessages = false;\r\n                }\r\n                var message = messageBase as TLMessageCommon;\r\n                if (message != null)\r\n                {\r\n                    if (message.Out.Value) return false;\r\n                    if (message.FromId == null) return false;\r\n                    if (fromId != null && message.FromId.Value != fromId.Value) return false;\r\n\r\n                    if (fromId == null)\r\n                    {\r\n                        fromId = message.FromId;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (onlyServiceMessages) return false;\r\n\r\n            var user = CacheService.GetUser(fromId);\r\n            if (user == null) return false;\r\n\r\n            from = user;\r\n\r\n            return true;\r\n        }\r\n\r\n        private TLMessageBase _localLastItem;\r\n\r\n        private List<TLMessageBase> _localItems;\r\n\r\n        private List<TLMessageBase> _localRandomItems;\r\n\r\n        public void DeleteReportSpam(TLUserBase from, TLMessageBase lastItem, IList<TLMessageBase> randomItems, IList<TLMessageBase> items)\r\n        {\r\n            var channel = With as TLChannel;\r\n            if (channel == null) return;\r\n\r\n            _localLastItem = lastItem;\r\n            _localItems = new List<TLMessageBase>(items ?? new List<TLMessageBase>());\r\n            _localRandomItems = new List<TLMessageBase>(randomItems ?? new List<TLMessageBase>());\r\n\r\n            var viewModel = new MassDeleteReportSpamViewModel(from);\r\n            var view = new MassDeleteReportSpamView{ DataContext = viewModel };\r\n\r\n            ShellViewModel.ShowCustomMessageBox(null, AppResources.Confirm,\r\n                AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        if (viewModel.DeleteAllMessages)\r\n                        {\r\n                            DeleteUserHistoryAsync(channel, from.ToInputUser(),\r\n                                result =>\r\n                                {\r\n                                    CacheService.DeleteUserHistory(new TLPeerChannel { Id = channel.Id }, new TLPeerUser { Id = from.Id });\r\n\r\n                                    Execute.BeginOnUIThread(() =>\r\n                                    {\r\n\r\n                                        for (var i = 0; i < Items.Count; i++)\r\n                                        {\r\n                                            var messageCommon = Items[i] as TLMessageCommon;\r\n                                            if (messageCommon != null\r\n                                                && messageCommon.ToId is TLPeerChannel\r\n                                                && messageCommon.FromId.Value == from.Index)\r\n                                            {\r\n                                                if (messageCommon.Index == 1)\r\n                                                {\r\n                                                    var message = messageCommon as TLMessageService;\r\n                                                    if (message != null)\r\n                                                    {\r\n                                                        var channelMigrateFrom = message.Action as TLMessageActionChannelMigrateFrom;\r\n                                                        if (channelMigrateFrom != null)\r\n                                                        {\r\n                                                            continue;\r\n                                                        }\r\n                                                    }\r\n                                                }\r\n\r\n                                                Items.RemoveAt(i--);\r\n                                            }\r\n                                        }\r\n\r\n                                        if (Items.Count < 10)\r\n                                        {\r\n                                            var messages = GetHistory();\r\n                                            ProcessMessages(messages);\r\n                                            if (messages.Count > 0)\r\n                                            {\r\n                                                Items.Clear();\r\n                                                foreach (var item in messages)\r\n                                                {\r\n                                                    Items.Add(item);\r\n                                                }\r\n\r\n                                                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n                                            }\r\n                                            else\r\n                                            {\r\n                                                _isLastMigratedHistorySliceLoaded = false;\r\n                                                UpdateItemsAsync(0, 0, Constants.MessagesSlice, false);\r\n                                            }\r\n                                        }\r\n                                    });\r\n                                },\r\n                                error =>\r\n                                {\r\n                                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"channels.deleteUserHistory error \" + error);\r\n                                });\r\n                        }\r\n                        else if (viewModel.DeleteMessages)\r\n                        {\r\n                            DeleteChannelMessages(MTProtoService, channel, _localLastItem, _localRandomItems, _localItems, DeleteMessagesInternal, DeleteMessagesInternal);\r\n                        }\r\n                        if (viewModel.BanUser)\r\n                        {\r\n                            MTProtoService.KickFromChannelAsync(channel, from.ToInputUser(), TLBool.True,\r\n                                result =>\r\n                                {\r\n\r\n                                    var updates = result as TLUpdates;\r\n                                    if (updates != null)\r\n                                    {\r\n                                        var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewChannelMessage) as TLUpdateNewChannelMessage;\r\n                                        if (updateNewMessage != null)\r\n                                        {\r\n                                            EventAggregator.Publish(updateNewMessage.Message);\r\n                                        }\r\n                                    }\r\n\r\n                                    Subtitle = GetSubtitle();\r\n                                },\r\n                                error =>\r\n                                {\r\n                                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"channels.kickFromChannel error \" + error);\r\n                                });\r\n                        }\r\n                        if (viewModel.ReportSpam)\r\n                        {\r\n                            MTProtoService.ReportSpamAsync(channel.ToInputChannel(), from.Id, new TLVector<TLInt>(_localItems.Select(x => x.Id).ToList()),\r\n                                result =>\r\n                                {\r\n\r\n                                },\r\n                                error =>\r\n                                {\r\n                                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"channels.reportSpam error \" + error);\r\n                                });\r\n                        }\r\n                    }\r\n                },\r\n                view);\r\n        }\r\n\r\n        private void DeleteUserHistoryAsync(TLChannel channel, TLInputUserBase userId, Action<TLAffectedHistory> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            MTProtoService.DeleteUserHistoryAsync(channel, userId,\r\n                result => \r\n                {\r\n                    if (result.Offset.Value > 0)\r\n                    {\r\n                        DeleteUserHistoryAsync(channel, userId, callback, faultCallback);\r\n                    }\r\n                    else\r\n                    {\r\n                        callback.SafeInvoke(result);\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"channels.deleteUserHistory error \" + error);\r\n                });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Media.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing Id3;\r\nusing Microsoft.Phone.BackgroundAudio;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.EmojiPanel;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views.Dialogs;\r\n#if WP8\r\nusing Windows.Storage;\r\nusing Windows.System;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        public void OpenInvoice(TLMessageMediaInvoice mediaInvoice)\r\n        {\r\n            var message = Items.OfType<TLMessage48>().FirstOrDefault(x => x.Media == mediaInvoice);\r\n            if (message != null)\r\n            {\r\n                var replyMarkup = message.ReplyMarkup as TLReplyInlineMarkup;\r\n                if (replyMarkup != null)\r\n                {\r\n                    TLKeyboardButtonBuy buyButton = null;\r\n                    foreach (var row in replyMarkup.Rows)\r\n                    {\r\n                        foreach (var button in row.Buttons)\r\n                        {\r\n                            buyButton = button as TLKeyboardButtonBuy;\r\n                            if (buyButton != null) break;\r\n\r\n                        }\r\n                    }\r\n\r\n                    if (buyButton != null)\r\n                    {\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            View.CreateBitmapCache(() =>\r\n                            {\r\n                                Execute.BeginOnUIThread(() => Send(message, buyButton));\r\n                            });\r\n                        });\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SendMedia()\r\n        {\r\n            if (StateService.RecordedVideo != null)\r\n            {\r\n                var recordedVideo = StateService.RecordedVideo;\r\n                StateService.RecordedVideo = null;\r\n                SendVideo(recordedVideo);\r\n                return;\r\n            }\r\n\r\n#if WP8\r\n\r\n#if MULTIPLE_PHOTOS\r\n            if (App.Photos != null)\r\n            {\r\n                var photos = App.Photos;\r\n                App.Photos = null;\r\n                SendPhoto(photos);\r\n            }\r\n#endif\r\n\r\n            if (App.Video != null)\r\n            {\r\n                var video = App.Video;\r\n                App.Video = null;\r\n                SendVideo(video);\r\n            }\r\n#endif\r\n\r\n            if (StateService.Photo != null)\r\n            {\r\n                var photo = StateService.Photo;\r\n                StateService.Photo = null;\r\n\r\n                //SendPhoto\r\n                SendPhoto(photo);\r\n                //var fileId = new TLFile{}\r\n                //UploadFileManager.UploadFile(fielId)\r\n                return;\r\n            }\r\n\r\n            if (StateService.Document != null)\r\n            {\r\n                var document = StateService.Document;\r\n                StateService.Document = null;\r\n\r\n                //SendPhoto\r\n                SendDocument(document);\r\n                //var fileId = new TLFile{}\r\n                //UploadFileManager.UploadFile(fielId)\r\n                return;\r\n            }\r\n\r\n            SendSharedContact();\r\n        }\r\n\r\n        private static TTLQueue _ttlQueue;\r\n\r\n        public static void AddToTTLQueue(TLMessage70 message, TTLParams ttlParams, Action<TLMessage70> callback)\r\n        {\r\n            if (message == null) return;\r\n            if (ttlParams == null) return;\r\n\r\n            if (_ttlQueue == null)\r\n            {\r\n                _ttlQueue = new TTLQueue();\r\n            }\r\n\r\n            _ttlQueue.Add(message, ttlParams, callback);\r\n        }\r\n\r\n#if WP8\r\n        public async void OpenMedia(TLMessageBase messageBase)\r\n#else\r\n        public void OpenMedia(TLMessageBase messageBase)\r\n#endif\r\n        {\r\n            if (messageBase == null) return;\r\n            if (messageBase.Status == MessageStatus.Failed\r\n                || messageBase.Status == MessageStatus.Sending) return;\r\n\r\n            var serviceMessage = messageBase as TLMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                var editPhotoAction = serviceMessage.Action as TLMessageActionChatEditPhoto;\r\n                if (editPhotoAction != null)\r\n                {\r\n                    var photo = editPhotoAction.Photo;\r\n                    if (photo != null)\r\n                    {\r\n                        //StateService.CurrentPhoto = photo;\r\n                        //StateService.CurrentChat = With as TLChatBase;\r\n                        //NavigationService.UriFor<ProfilePhotoViewerViewModel>().Navigate();\r\n                    }\r\n                }\r\n\r\n                var phoneCallAction = serviceMessage.Action as TLMessageActionPhoneCall;\r\n                if (phoneCallAction != null)\r\n                {\r\n                    TLUser user = null;\r\n                    if (serviceMessage.Out.Value)\r\n                    {\r\n                        user = CacheService.GetUser(serviceMessage.ToId.Id) as TLUser;\r\n                    }\r\n                    else\r\n                    {\r\n                        user = serviceMessage.From as TLUser;\r\n                    }\r\n\r\n                    ShellViewModel.StartVoiceCall(user, IoC.Get<IVoIPService>(), IoC.Get<ICacheService>());\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var message = messageBase as TLMessage;\r\n            if (message == null) return;\r\n\r\n            var mediaPhoto = message.Media as TLMessageMediaPhoto;\r\n            if (mediaPhoto != null)\r\n            {\r\n                if (!message.Out.Value && message.HasTTL())\r\n                {\r\n                    var ttlMessageMedia = mediaPhoto as ITTLMessageMedia;\r\n                    if (ttlMessageMedia != null && ttlMessageMedia.TTLParams == null)\r\n                    {\r\n                        ttlMessageMedia.TTLParams = new TTLParams\r\n                        {\r\n                            StartTime = DateTime.Now,\r\n                            IsStarted = true,\r\n                            Total = ttlMessageMedia.TTLSeconds.Value\r\n                        };\r\n                        mediaPhoto.NotifyOfPropertyChange(() => ttlMessageMedia.TTLParams);\r\n\r\n                        AddToTTLQueue(message as TLMessage70, ttlMessageMedia.TTLParams,\r\n                            result =>\r\n                            {\r\n                                SplitGroupedMessages(new List<TLInt> { message.Id });\r\n                            });\r\n                    }\r\n\r\n                    ReadMessageContents(message as TLMessage25);\r\n                }\r\n\r\n                var photo = mediaPhoto.Photo as TLPhoto;\r\n                if (photo != null)\r\n                {\r\n                    var width = 311.0;\r\n\r\n                    TLPhotoSize size = null;\r\n                    var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n                    foreach (var photoSize in sizes)\r\n                    {\r\n                        if (size == null\r\n                            || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                        {\r\n                            size = photoSize;\r\n                        }\r\n                    }\r\n\r\n                    if (size != null)\r\n                    {\r\n                        var location = size.Location as TLFileLocation;\r\n                        if (location != null)\r\n                        {\r\n                            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                                location.VolumeId,\r\n                                location.LocalId,\r\n                                location.Secret);\r\n\r\n                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                if (!store.FileExists(fileName))\r\n                                {\r\n                                    message.Media.IsCanceled = false;\r\n                                    message.Media.DownloadingProgress = 0.01;\r\n                                    Execute.BeginOnThreadPool(() => DownloadFileManager.DownloadFile(location, photo, size.Size));\r\n\r\n                                    return;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (mediaPhoto.IsCanceled)\r\n                {\r\n                    mediaPhoto.IsCanceled = false;\r\n                    mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.Photo);\r\n                    mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.Self);\r\n\r\n                    return;\r\n                }\r\n\r\n                StateService.CurrentPhotoMessage = message;\r\n                StateService.CurrentMediaMessages = message.HasTTL()\r\n                    ? new List<TLMessage> { message }\r\n                    : UngroupEnumerator(Items).OfType<TLMessage>()\r\n                        .Where(x =>\r\n                        {\r\n                            if (TLMessageBase.HasTTL(x.Media))\r\n                            {\r\n                                return false;\r\n                            }\r\n\r\n                            return x.Media is TLMessageMediaPhoto || x.Media is TLMessageMediaVideo || x.IsVideo();\r\n                        })\r\n                        .ToList();\r\n\r\n                OpenImageViewer();\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaWebPage = message.Media as TLMessageMediaWebPage;\r\n            if (mediaWebPage != null)\r\n            {\r\n                var webPage = mediaWebPage.WebPage as TLWebPage;\r\n                if (webPage != null && webPage.Type != null)\r\n                {\r\n                    if (webPage.Type != null)\r\n                    {\r\n                        var type = webPage.Type.ToString();\r\n                        if (string.Equals(type, \"photo\", StringComparison.OrdinalIgnoreCase))\r\n                        {\r\n                            StateService.CurrentPhotoMessage = message;\r\n\r\n                            OpenImageViewer();\r\n\r\n                            return;\r\n                        }\r\n                        if (string.Equals(type, \"video\", StringComparison.OrdinalIgnoreCase))\r\n                        {\r\n                            if (!TLString.Equals(webPage.SiteName, new TLString(\"youtube\"), StringComparison.OrdinalIgnoreCase)\r\n                                && !TLString.IsNullOrEmpty(webPage.EmbedUrl))\r\n                            {\r\n                                var launcher = new MediaPlayerLauncher\r\n                                {\r\n                                    Location = MediaLocationType.Data,\r\n                                    Media = new Uri(webPage.EmbedUrl.ToString(), UriKind.Absolute),\r\n                                    Orientation = MediaPlayerOrientation.Portrait\r\n                                };\r\n                                launcher.Show();\r\n                                return;\r\n                            }\r\n\r\n                            if (!TLString.IsNullOrEmpty(webPage.Url))\r\n                            {\r\n                                var webBrowserTask = new WebBrowserTask();\r\n                                webBrowserTask.URL = HttpUtility.UrlEncode(webPage.Url.ToString());\r\n                                webBrowserTask.Show();\r\n                            }\r\n\r\n                            return;\r\n                        }\r\n                        if (string.Equals(type, \"gif\", StringComparison.OrdinalIgnoreCase))\r\n                        {\r\n                            var webPage35 = webPage as TLWebPage35;\r\n                            if (webPage35 != null)\r\n                            {\r\n                                var document = webPage35.Document as TLDocument;\r\n                                if (document == null) return;\r\n\r\n                                var documentLocalFileName = document.GetFileName();\r\n                                var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n#if WP81\r\n                                var documentFile = mediaWebPage.File ?? await GetStorageFile(mediaWebPage);\r\n#endif\r\n\r\n                                if (!store.FileExists(documentLocalFileName)\r\n#if WP81\r\n && documentFile == null\r\n#endif\r\n)\r\n                                {\r\n                                    mediaWebPage.IsCanceled = false;\r\n                                    mediaWebPage.DownloadingProgress = mediaWebPage.LastProgress > 0.0 ? mediaWebPage.LastProgress : 0.001;\r\n                                    DownloadDocumentFileManager.DownloadFileAsync(document.FileName, document.DCId, document.ToInputFileLocation(), message, document.Size,\r\n                                        progress =>\r\n                                        {\r\n                                            if (progress > 0.0)\r\n                                            {\r\n                                                mediaWebPage.DownloadingProgress = progress;\r\n                                            }\r\n                                        });\r\n                                }\r\n                            }\r\n\r\n                            return;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var mediaGame = message.Media as TLMessageMediaGame;\r\n            if (mediaGame != null)\r\n            {\r\n                var game = mediaGame.Game;\r\n                if (game != null)\r\n                {\r\n                    var document = game.Document as TLDocument;\r\n                    if (document == null) return;\r\n\r\n                    var documentLocalFileName = document.GetFileName();\r\n                    var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n#if WP81\r\n                    var documentFile = mediaGame.File ?? await GetStorageFile(mediaGame);\r\n#endif\r\n\r\n                    if (!store.FileExists(documentLocalFileName)\r\n#if WP81\r\n && documentFile == null\r\n#endif\r\n)\r\n                    {\r\n                        mediaGame.IsCanceled = false;\r\n                        mediaGame.DownloadingProgress = mediaGame.LastProgress > 0.0 ? mediaGame.LastProgress : 0.001;\r\n                        DownloadDocumentFileManager.DownloadFileAsync(document.FileName, document.DCId, document.ToInputFileLocation(), message, document.Size,\r\n                            progress =>\r\n                            {\r\n                                if (progress > 0.0)\r\n                                {\r\n                                    mediaGame.DownloadingProgress = progress;\r\n                                }\r\n                            });\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaGeo = message.Media as TLMessageMediaGeo;\r\n            if (mediaGeo != null)\r\n            {\r\n                OpenLocation(message);\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaContact = message.Media as TLMessageMediaContact;\r\n            if (mediaContact != null)\r\n            {\r\n                var phoneNumber = mediaContact.PhoneNumber.ToString();\r\n\r\n                if (mediaContact.UserId.Value == 0)\r\n                {\r\n                    OpenPhoneContact(mediaContact);\r\n                }\r\n                else\r\n                {\r\n                    var user = mediaContact.User;\r\n\r\n                    OpenMediaContact(mediaContact.UserId, user, new TLString(phoneNumber));\r\n                }\r\n                return;\r\n            }\r\n\r\n            var mediaVideo = message.Media as TLMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                var video = mediaVideo.Video as TLVideo;\r\n                if (video == null) return;\r\n\r\n                var videoFileName = video.GetFileName();\r\n                var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n#if WP81\r\n                var file = mediaVideo.File ?? await GetStorageFile(mediaVideo);\r\n#endif\r\n\r\n\r\n                if (!store.FileExists(videoFileName)\r\n#if WP81\r\n && file == null\r\n#endif\r\n)\r\n                {\r\n                    mediaVideo.IsCanceled = false;\r\n                    mediaVideo.DownloadingProgress = mediaVideo.LastProgress > 0.0 ? mediaVideo.LastProgress : 0.001;\r\n                    DownloadVideoFileManager.DownloadFileAsync(\r\n                        video.DCId, video.ToInputFileLocation(), message, video.Size,\r\n                        progress =>\r\n                        {\r\n                            if (progress > 0.0)\r\n                            {\r\n                                mediaVideo.DownloadingProgress = progress;\r\n                            }\r\n                        });\r\n                }\r\n                else\r\n                {\r\n                    //ReadMessageContents(message);\r\n\r\n#if WP81\r\n\r\n                    //var localFile = await GetFileFromLocalFolder(videoFileName);\r\n                    var videoProperties = await file.Properties.GetVideoPropertiesAsync();\r\n                    var musicProperties = await file.Properties.GetMusicPropertiesAsync();\r\n\r\n                    if (file != null)\r\n                    {\r\n                        Launcher.LaunchFileAsync(file);\r\n                        return;\r\n                    }\r\n\r\n\r\n#endif\r\n\r\n                    var launcher = new MediaPlayerLauncher\r\n                    {\r\n                        Location = MediaLocationType.Data,\r\n                        Media = new Uri(videoFileName, UriKind.Relative)\r\n                    };\r\n                    launcher.Show();\r\n                }\r\n                return;\r\n            }\r\n\r\n            var mediaAudio = message.Media as TLMessageMediaAudio;\r\n            if (mediaAudio != null)\r\n            {\r\n                var audio = mediaAudio.Audio as TLAudio;\r\n                if (audio == null) return;\r\n\r\n                var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                var audioFileName = audio.GetFileName();\r\n                if (TLString.Equals(audio.MimeType, new TLString(\"audio/mpeg\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    if (!store.FileExists(audioFileName))\r\n                    {\r\n                        mediaAudio.IsCanceled = false;\r\n                        mediaAudio.DownloadingProgress = mediaAudio.LastProgress > 0.0 ? mediaAudio.LastProgress : 0.001;\r\n                        BeginOnThreadPool(() =>\r\n                        {\r\n                            DownloadAudioFileManager.DownloadFile(audio.DCId, audio.ToInputFileLocation(), message, audio.Size);\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        ReadMessageContents(message as TLMessage25);\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var wavFileName = Path.GetFileNameWithoutExtension(audioFileName) + \".wav\";\r\n\r\n                if (!store.FileExists(wavFileName))\r\n                {\r\n                    mediaAudio.IsCanceled = false;\r\n                    mediaAudio.DownloadingProgress = mediaAudio.LastProgress > 0.0 ? mediaAudio.LastProgress : 0.001;\r\n                    BeginOnThreadPool(() =>\r\n                    {\r\n                        DownloadAudioFileManager.DownloadFile(audio.DCId, audio.ToInputFileLocation(), message, audio.Size);\r\n                    });\r\n                }\r\n                else\r\n                {\r\n                    ReadMessageContents(message as TLMessage25);\r\n                }\r\n\r\n                if (mediaAudio.IsCanceled)\r\n                {\r\n                    mediaAudio.IsCanceled = false;\r\n                    mediaAudio.NotifyOfPropertyChange(() => mediaPhoto.ThumbSelf);\r\n\r\n                    return;\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                var document = mediaDocument.Document as TLDocument22;\r\n                if (document != null)\r\n                {\r\n                    if (TLMessageBase.IsSticker(document))\r\n                    {\r\n                        var inputStickerSet = document.StickerSet;\r\n                        if (inputStickerSet != null && !(inputStickerSet is TLInputStickerSetEmpty))\r\n                        {\r\n                            AddToStickers(message);\r\n                        }\r\n                    }\r\n                    else if (TLMessageBase.IsVoice(document))\r\n                    {\r\n                        var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                        var audioFileName = string.Format(\"audio{0}_{1}.mp3\", document.Id, document.AccessHash);\r\n                        if (TLString.Equals(document.MimeType, new TLString(\"audio/mpeg\"), StringComparison.OrdinalIgnoreCase))\r\n                        {\r\n                            if (!store.FileExists(audioFileName))\r\n                            {\r\n                                mediaDocument.IsCanceled = false;\r\n                                mediaDocument.DownloadingProgress = mediaDocument.LastProgress > 0.0 ? mediaDocument.LastProgress : 0.001;\r\n                                BeginOnThreadPool(() =>\r\n                                {\r\n                                    DownloadAudioFileManager.DownloadFile(document.DCId, document.ToInputFileLocation(), message, document.Size);\r\n                                });\r\n                            }\r\n                            else\r\n                            {\r\n                                ReadMessageContents(message as TLMessage25);\r\n                            }\r\n\r\n                            return;\r\n                        }\r\n\r\n                        var wavFileName = Path.GetFileNameWithoutExtension(audioFileName) + \".wav\";\r\n\r\n                        if (!store.FileExists(wavFileName))\r\n                        {\r\n                            mediaDocument.IsCanceled = false;\r\n                            mediaDocument.DownloadingProgress = mediaDocument.LastProgress > 0.0 ? mediaDocument.LastProgress : 0.001;\r\n                            BeginOnThreadPool(() =>\r\n                            {\r\n                                DownloadAudioFileManager.DownloadFile(document.DCId, document.ToInputFileLocation(), message, document.Size);\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            ReadMessageContents(message as TLMessage25);\r\n                        }\r\n\r\n                        if (mediaDocument.IsCanceled)\r\n                        {\r\n                            mediaDocument.IsCanceled = false;\r\n                            mediaDocument.NotifyOfPropertyChange(() => mediaDocument.ThumbSelf);\r\n\r\n                            return;\r\n                        }\r\n                    }\r\n                    else if (TLMessageBase.IsVideo(document))\r\n                    {\r\n                        var video = mediaDocument.Document as TLDocument;\r\n                        if (video == null) return;\r\n\r\n                        var videoFileName = video.GetFileName();\r\n                        var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n#if WP81\r\n                        var file = mediaDocument.File ?? await GetStorageFile(mediaDocument);\r\n#endif\r\n\r\n\r\n                        if (!store.FileExists(videoFileName)\r\n#if WP81\r\n && file == null\r\n#endif\r\n)\r\n                        {\r\n                            mediaDocument.IsCanceled = false;\r\n                            mediaDocument.DownloadingProgress = mediaDocument.LastProgress > 0.0\r\n                                ? mediaDocument.LastProgress\r\n                                : 0.001;\r\n                            DownloadVideoFileManager.DownloadFileAsync(\r\n                                video.DCId, video.ToInputFileLocation(), message, video.Size,\r\n                                progress =>\r\n                                {\r\n                                    if (progress > 0.0)\r\n                                    {\r\n                                        mediaDocument.DownloadingProgress = progress;\r\n                                    }\r\n                                });\r\n                        }\r\n                        else\r\n                        {\r\n                            if (!message.Out.Value && message.HasTTL())\r\n                            {\r\n                                var ttlMessageMedia = mediaDocument as ITTLMessageMedia;\r\n                                if (ttlMessageMedia != null && ttlMessageMedia.TTLParams == null)\r\n                                {\r\n                                    ttlMessageMedia.TTLParams = new TTLParams\r\n                                    {\r\n                                        StartTime = DateTime.Now,\r\n                                        IsStarted = true,\r\n                                        Total = ttlMessageMedia.TTLSeconds.Value\r\n                                    };\r\n                                    mediaDocument.NotifyOfPropertyChange(() => ttlMessageMedia.TTLParams);\r\n\r\n                                    AddToTTLQueue(message as TLMessage70, ttlMessageMedia.TTLParams,\r\n                                    result =>\r\n                                    {\r\n                                        SplitGroupedMessages(new List<TLInt> { message.Id });\r\n                                    });\r\n                                }\r\n\r\n                                ReadMessageContents(message as TLMessage25);\r\n                            }\r\n                            else if (message.IsRoundVideo())\r\n                            {\r\n                                ReadMessageContents(message as TLMessage25);\r\n                            }\r\n#if WP81\r\n                            if (file != null)\r\n                            {\r\n                                Launcher.LaunchFileAsync(file);\r\n                                return;\r\n                            }\r\n#endif\r\n\r\n                            var launcher = new MediaPlayerLauncher\r\n                            {\r\n                                Location = MediaLocationType.Data,\r\n                                Media = new Uri(videoFileName, UriKind.Relative)\r\n                            };\r\n                            launcher.Show();\r\n                        }\r\n                        return;\r\n                    }\r\n                    else\r\n                    {\r\n                        OpenDocumentCommon(message, StateService, DownloadDocumentFileManager,\r\n                            () =>\r\n                            {\r\n                                StateService.CurrentPhotoMessage = message;\r\n\r\n                                if (AnimatedImageViewer == null)\r\n                                {\r\n                                    AnimatedImageViewer = new AnimatedImageViewerViewModel(StateService);\r\n                                    NotifyOfPropertyChange(() => AnimatedImageViewer);\r\n                                }\r\n\r\n                                Execute.BeginOnUIThread(() => AnimatedImageViewer.OpenViewer());\r\n                            });\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    OpenDocumentCommon(message, StateService, DownloadDocumentFileManager,\r\n                        () =>\r\n                        {\r\n                            StateService.CurrentPhotoMessage = message;\r\n\r\n                            if (AnimatedImageViewer == null)\r\n                            {\r\n                                AnimatedImageViewer = new AnimatedImageViewerViewModel(StateService);\r\n                                NotifyOfPropertyChange(() => AnimatedImageViewer);\r\n                            }\r\n\r\n                            Execute.BeginOnUIThread(() => AnimatedImageViewer.OpenViewer());\r\n                        });\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            Execute.ShowDebugMessage(\"tap on media\");\r\n        }\r\n\r\n        private void OpenImageViewer()\r\n        {\r\n            if (ImageViewer == null)\r\n            {\r\n                ImageViewer = new ImageViewerViewModel(StateService, DownloadVideoFileManager, false, true)\r\n                {\r\n                    DialogDetails = this\r\n                };\r\n                NotifyOfPropertyChange(() => ImageViewer);\r\n            }\r\n            BeginOnUIThread(() => ImageViewer.OpenViewer());\r\n        }\r\n\r\n\r\n#if WP8\r\n        public static async void OpenDocumentCommon(TLMessage message, IStateService stateService, IDocumentFileManager documentFileManager, System.Action openGifCallback)\r\n#else\r\n        public static void OpenDocumentCommon(TLMessage message, IStateService stateService, IDocumentFileManager documentFileManager, System.Action openGifCallback)\r\n#endif\r\n        {\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                if (!string.IsNullOrEmpty(mediaDocument.IsoFileName))\r\n                {\r\n\r\n                }\r\n\r\n                var document = mediaDocument.Document as TLDocument;\r\n                if (document == null) return;\r\n\r\n                var documentLocalFileName = document.GetFileName();\r\n                var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n#if WP81\r\n                var documentFile = mediaDocument.File ?? await GetStorageFile(mediaDocument);\r\n#endif\r\n\r\n                if (!store.FileExists(documentLocalFileName)\r\n#if WP81\r\n && documentFile == null\r\n#endif\r\n)\r\n                {\r\n\r\n                    if (document.Size.Value == 0) return;\r\n\r\n                    mediaDocument.IsCanceled = false;\r\n                    mediaDocument.DownloadingProgress = mediaDocument.LastProgress > 0.0 ? mediaDocument.LastProgress : 0.001;\r\n                    //_downloadVideoStopwatch = Stopwatch.StartNew();\r\n                    //return;\r\n                    documentFileManager.DownloadFileAsync(\r\n                        document.FileName, document.DCId, document.ToInputFileLocation(), message, document.Size,\r\n                        progress =>\r\n                        {\r\n                            if (progress > 0.0)\r\n                            {\r\n                                mediaDocument.DownloadingProgress = progress;\r\n                            }\r\n                        });\r\n                }\r\n                else\r\n                {\r\n                    if (message.IsGif())\r\n                    {\r\n                        if (documentFile != null && File.Exists(documentFile.Path))\r\n                        {\r\n                            mediaDocument.DownloadingProgress = 0.001;\r\n                            await documentFile.CopyAsync(ApplicationData.Current.LocalFolder, documentLocalFileName, NameCollisionOption.ReplaceExisting);\r\n                            mediaDocument.DownloadingProgress = 0.0;\r\n                        }\r\n\r\n                        return;\r\n                    }\r\n\r\n                    if (documentLocalFileName.EndsWith(\".gif\")\r\n                        || string.Equals(document.MimeType.ToString(), \"image/gif\", StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        openGifCallback.SafeInvoke();\r\n\r\n                        return;\r\n                    }\r\n\r\n                    if (documentLocalFileName.EndsWith(\".mp3\")\r\n                        || string.Equals(document.MimeType.ToString(), \"audio/mpeg\", StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        var url = new Uri(documentLocalFileName, UriKind.Relative);\r\n                        var title = document.FileName.ToString();\r\n                        var performer = \"Unknown Artist\";\r\n                        var readId3Tags = true;\r\n#if WP81\r\n\r\n                        try\r\n                        {\r\n                            var storageFile = await ApplicationData.Current.LocalFolder.GetFileAsync(documentLocalFileName);\r\n                            var audioProperties = await storageFile.Properties.GetMusicPropertiesAsync();\r\n                            title = audioProperties.Title;\r\n                            performer = audioProperties.Artist;\r\n                            readId3Tags = false;\r\n                        }\r\n                        catch (Exception ex) { }\r\n#endif\r\n#if WP81\r\n                        if (documentFile == null)\r\n                        {\r\n                            try\r\n                            {\r\n                                documentFile = await ApplicationData.Current.LocalFolder.GetFileAsync(documentLocalFileName);\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                Execute.ShowDebugMessage(\"LocalFolder.GetFileAsync docLocal exception \\n\" + ex);\r\n                            }\r\n                        }\r\n                        Launcher.LaunchFileAsync(documentFile);\r\n                        return;\r\n#elif WP8\r\n                        var file = await ApplicationData.Current.LocalFolder.GetFileAsync(documentLocalFileName);\r\n                        Launcher.LaunchFileAsync(file);\r\n                        return;\r\n#endif\r\n\r\n                        //if (readId3Tags)\r\n                        //{\r\n                        //    if (store.FileExists(documentLocalFileName))\r\n                        //    {\r\n                        //        using (var file = store.OpenFile(documentLocalFileName, FileMode.Open, FileAccess.Read))\r\n                        //        {\r\n                        //            var mp3Stream = new Mp3Stream(file);\r\n                        //            if (mp3Stream.HasTags)\r\n                        //            {\r\n                        //                var tag = mp3Stream.GetTag(Id3TagFamily.FileStartTag);\r\n                        //                title = tag.Title;\r\n                        //                performer = tag.Artists;\r\n                        //            }\r\n                        //        }\r\n                        //    }\r\n                        //}\r\n\r\n                        //var track = BackgroundAudioPlayer.Instance.Track;\r\n                        //if (track == null || track.Source != url)\r\n                        //{\r\n                        //    BackgroundAudioPlayer.Instance.Track = new AudioTrack(url, title, performer, null, null);\r\n                        //}\r\n                        //BackgroundAudioPlayer.Instance.Play();\r\n\r\n                        return;\r\n                    }\r\n                    else\r\n                    {\r\n#if WP81\r\n                        if (documentFile == null)\r\n                        {\r\n                            try\r\n                            {\r\n                                documentFile = await ApplicationData.Current.LocalFolder.GetFileAsync(documentLocalFileName);\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                Execute.ShowDebugMessage(\"LocalFolder.GetFileAsync docLocal exception \\n\" + ex);\r\n                            }\r\n                        }\r\n                        Launcher.LaunchFileAsync(documentFile);\r\n                        return;\r\n#elif WP8\r\n                        var file = await ApplicationData.Current.LocalFolder.GetFileAsync(documentLocalFileName);\r\n                        Launcher.LaunchFileAsync(file);\r\n                        return;\r\n#endif\r\n                    }\r\n                }\r\n                return;\r\n            }\r\n        }\r\n\r\n\r\n        public void OpenMediaContact(TLUserBase user)\r\n        {\r\n            OpenContactInternal(user, null);\r\n        }\r\n\r\n        public void OpenMediaContact(TLInt userId, TLUserBase user, TLString phoneNumber)\r\n        {\r\n            if (user == null)\r\n            {\r\n                MTProtoService.GetFullUserAsync(new TLInputUser { UserId = userId, AccessHash = new TLLong(0) },\r\n                    userFull => OpenContactInternal(userFull.User, phoneNumber));\r\n            }\r\n            else\r\n            {\r\n                OpenContactInternal(user, phoneNumber);\r\n            }\r\n        }\r\n\r\n        private void OpenContactInternal(TLUserBase user, TLString phoneNumber)\r\n        {\r\n            if (user == null) return;\r\n\r\n            if (View != null)\r\n            {\r\n                View.CreateBitmapCache(() => BeginOnUIThread(() =>\r\n                {\r\n                    StateService.CurrentContact = user;\r\n                    StateService.CurrentContactPhone = phoneNumber;\r\n                    NavigationService.UriFor<ContactViewModel>().Navigate();\r\n                }));\r\n            }\r\n        }\r\n\r\n        public void Attach()\r\n        {\r\n            if (ChooseAttachment == null)\r\n            {\r\n                ChooseAttachment = new ChooseAttachmentViewModel(With, OpenInlineBot, SendDocument, SendVideo, SendPhoto, SendLocation, OpenContact, CacheService, EventAggregator, NavigationService, StateService);\r\n                NotifyOfPropertyChange(() => ChooseAttachment);\r\n            }\r\n            BeginOnUIThread(() => ChooseAttachment.Open());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Photo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Runtime.InteropServices.WindowsRuntime;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Windows.Storage.FileProperties;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Logs;\r\n#if WP81\r\nusing Windows.Graphics.Imaging;\r\nusing Windows.Security.Cryptography.Core;\r\n#endif\r\nusing Windows.Storage;\r\nusing Windows.Storage.Streams;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Buffer = Windows.Storage.Streams.Buffer;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        private ImageEditorViewModel _imageEditor;\r\n\r\n        public ImageEditorViewModel ImageEditor\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel ImageEditor\");\r\n                return _imageEditor;\r\n            }\r\n            protected set { _imageEditor = value; }\r\n        }\r\n\r\n        private MultiImageEditorViewModel _multiImageEditor;\r\n\r\n        public MultiImageEditorViewModel MultiImageEditor\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel MultiImageEditor\");\r\n                return _multiImageEditor;\r\n            }\r\n            protected set { _multiImageEditor = value; }\r\n        }\r\n\r\n#if WP81\r\n\r\n        public static async Task<Stream> GetPhotoThumbnailAsync(StorageFile file, ThumbnailMode mode, uint requestedSize, ThumbnailOptions options)\r\n        {\r\n            if (file == null) return null;\r\n\r\n            try\r\n            {\r\n                var thumbnail = await file.GetThumbnailAsync(mode, requestedSize, options);\r\n                if (thumbnail != null)\r\n                {\r\n                    return thumbnail.AsStream();\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Log.Write(ex.ToString());\r\n            }\r\n\r\n            try\r\n            {\r\n                var stream = await file.OpenReadAsync();\r\n                var photo = await ResizeJpeg(stream, 99 * 2, null, null);\r\n                if (photo != null && photo.Bytes != null)\r\n                {\r\n                    return new MemoryStream(photo.Bytes);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Log.Write(ex.ToString());\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public async Task<TLMessage25> GetPhotoMessage(StorageFile file)\r\n        {\r\n            //var stopwatch = Stopwatch.StartNew();\r\n            var threadId = Thread.CurrentThread.ManagedThreadId;\r\n\r\n            var volumeId = TLLong.Random();\r\n            var localId = TLInt.Random();\r\n            var secret = TLLong.Random();\r\n\r\n            var fileLocation = new TLFileLocation\r\n            {\r\n                VolumeId = volumeId,\r\n                LocalId = localId,\r\n                Secret = secret,\r\n                DCId = new TLInt(0),        //TODO: remove from here, replace with FileLocationUnavailable\r\n                //Buffer = p.Bytes\r\n            };\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                fileLocation.VolumeId,\r\n                fileLocation.LocalId,\r\n                fileLocation.Secret);\r\n\r\n            var stream = await file.OpenReadAsync();\r\n\r\n            //System.Diagnostics.Debug.WriteLine(threadId + \" \" + \"GetPhotoMessage OpenRead \" + stopwatch.Elapsed);\r\n            var resizedPhoto = await ResizeJpeg(stream, Constants.DefaultImageSize, file.DisplayName, fileName);\r\n\r\n            //System.Diagnostics.Debug.WriteLine(threadId + \" \" + \"GetPhotoMessage ResizeJpeg \" + stopwatch.Elapsed);\r\n\r\n            var photoSize = new TLPhotoSize\r\n            {\r\n                Type = TLString.Empty,\r\n                W = new TLInt(resizedPhoto.Width),\r\n                H = new TLInt(resizedPhoto.Height),\r\n                Location = fileLocation,\r\n                Size = new TLInt(resizedPhoto.Bytes.Length)\r\n            };\r\n\r\n            volumeId = TLLong.Random();\r\n            localId = TLInt.Random();\r\n            secret = TLLong.Random();\r\n\r\n            var previewFileLocation = new TLFileLocation\r\n            {\r\n                VolumeId = volumeId,\r\n                LocalId = localId,\r\n                Secret = secret,\r\n                DCId = new TLInt(0),        //TODO: remove from here, replace with FileLocationUnavailable\r\n                //Buffer = p.Bytes\r\n            };\r\n\r\n            var previewFileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                previewFileLocation.VolumeId,\r\n                previewFileLocation.LocalId,\r\n                previewFileLocation.Secret);\r\n\r\n            var photo = new TLPhoto56\r\n            {\r\n                Flags = new TLInt(0),\r\n                Id = new TLLong(0),\r\n                AccessHash = new TLLong(0),\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                Sizes = new TLVector<TLPhotoSizeBase> { photoSize },\r\n            };\r\n\r\n            // to improve performance for bulk photo preview generation\r\n            Execute.BeginOnThreadPool(async () =>\r\n            {\r\n                stream = await file.OpenReadAsync();\r\n\r\n                var previewPhoto = await ResizeJpeg(stream, 90, file.DisplayName, previewFileName);\r\n\r\n                var previewPhotoSize = new TLPhotoSize\r\n                {\r\n                    Type = new TLString(\"s\"),\r\n                    W = new TLInt(previewPhoto.Width),\r\n                    H = new TLInt(previewPhoto.Height),\r\n                    Location = previewFileLocation,\r\n                    Size = new TLInt(previewPhoto.Bytes.Length)\r\n                };\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    photo.Sizes.Add(previewPhotoSize);\r\n                });\r\n            });\r\n\r\n            var media = new TLMessageMediaPhoto75 { Flags = new TLInt(0), Photo = photo, Caption = TLString.Empty, File = resizedPhoto.File };\r\n\r\n            return GetMessage(TLString.Empty, media);\r\n        }\r\n\r\n        private async void SendPhoto(IReadOnlyCollection<StorageFile> files)\r\n        {\r\n            //threadpool\r\n            if (files == null || files.Count == 0) return;\r\n\r\n            if (MultiImageEditor != null && MultiImageEditor.IsOpen)\r\n            {\r\n                BeginOnUIThread(async () => await MultiImageEditor.AddFiles(new List<StorageFile>(files)));\r\n\r\n                return;\r\n            }\r\n\r\n            //var message = await GetPhotoMessage(files.First());\r\n\r\n            if (MultiImageEditor == null)\r\n            {\r\n                MultiImageEditor = new MultiImageEditorViewModel(SendPhoto, GetUsernameHintsExternal, With)\r\n                {\r\n                    CurrentItem = new PhotoFile{ File = files.First() },\r\n                    Files = files,\r\n                    ContinueAction = ContinueSendPhoto,\r\n                    GetPhotoMessage = file =>\r\n                    {\r\n                        var m = GetPhotoMessage(file).Result;\r\n                        return m;\r\n                    }\r\n                };\r\n                NotifyOfPropertyChange(() => MultiImageEditor);\r\n            }\r\n            else\r\n            {\r\n                MultiImageEditor.CurrentItem = new PhotoFile { File = files.First() };\r\n                MultiImageEditor.Files = files;\r\n\r\n                BeginOnUIThread(() => MultiImageEditor.OpenEditor());\r\n            }\r\n\r\n            // fast preview for first item\r\n            Execute.BeginOnThreadPool(async () =>\r\n            {\r\n                var message = await GetPhotoMessage(files.First());\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    MultiImageEditor.CurrentItem.Message = message;\r\n                    MultiImageEditor.NotifyOfPropertyChange(() => MultiImageEditor.CurrentItem);\r\n                    MultiImageEditor.CurrentItem.NotifyOfPropertyChange(() => MultiImageEditor.CurrentItem.Self);\r\n                    if (files.Count == 1)\r\n                    {\r\n                        MultiImageEditor.IsDoneEnabled = true;\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n        public static async Task<Photo> ResizeJpeg(IRandomAccessStream chosenPhoto, uint size, string originalFileName, string localFileName, double? quality = null)\r\n        {\r\n            Photo photo = null;\r\n            var orientedPixelHeight = 0u;\r\n            var orientedPixelWidth = 0u;\r\n            //using (var sourceStream = chosenPhoto)\r\n            {\r\n                var decoder = await BitmapDecoder.CreateAsync(chosenPhoto);\r\n                if (decoder.DecoderInformation != null)\r\n                {\r\n                    var maxDimension = Math.Max(decoder.PixelWidth, decoder.PixelHeight);\r\n                    var scale = (double)size / maxDimension;\r\n                    if (scale < 1.0)\r\n                    {\r\n                        var orientedScaledHeight = (uint) (decoder.OrientedPixelHeight*scale);\r\n                        var orientedScaledWidth = (uint) (decoder.OrientedPixelWidth*scale);\r\n                        var scaledHeight = (uint) (decoder.PixelHeight*scale);\r\n                        var scaledWidth = (uint) (decoder.PixelWidth*scale);\r\n\r\n                        var transform = new BitmapTransform { ScaledHeight = scaledHeight, ScaledWidth = scaledWidth, InterpolationMode = BitmapInterpolationMode.Fant };\r\n                        var pixelData = await decoder.GetPixelDataAsync(\r\n                            decoder.BitmapPixelFormat,\r\n                            decoder.BitmapAlphaMode,\r\n                            transform,\r\n                            ExifOrientationMode.RespectExifOrientation,\r\n                            ColorManagementMode.DoNotColorManage);\r\n\r\n                        using (var destinationStream = new InMemoryRandomAccessStream())\r\n                        {\r\n                            var propertySet = new BitmapPropertySet();\r\n                            if (quality.HasValue && quality > 0.0 && quality <= 1.0)\r\n                            {\r\n                                var qualityValue = new BitmapTypedValue(quality, Windows.Foundation.PropertyType.Single);\r\n                                propertySet.Add(\"ImageQuality\", qualityValue);\r\n                            }\r\n                            var encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.JpegEncoderId, destinationStream, propertySet);\r\n                            encoder.SetPixelData(decoder.BitmapPixelFormat, BitmapAlphaMode.Premultiplied, orientedScaledWidth, orientedScaledHeight, decoder.DpiX, decoder.DpiY, pixelData.DetachPixelData());\r\n                            await encoder.FlushAsync();\r\n\r\n                            var reader = new DataReader(destinationStream.GetInputStreamAt(0));\r\n                            var bytes = new byte[destinationStream.Size];\r\n                            await reader.LoadAsync((uint) destinationStream.Size);\r\n                            reader.ReadBytes(bytes);\r\n\r\n                            photo = new Photo\r\n                            {\r\n                                Bytes = bytes,\r\n                                Width = (int) orientedScaledWidth,\r\n                                Height = (int) orientedScaledHeight,\r\n                                FileName = originalFileName\r\n                            };\r\n\r\n                            if (!string.IsNullOrEmpty(localFileName))\r\n                            {\r\n                                photo.File = await SaveToLocalFolderAsync(destinationStream.AsStream(), localFileName);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    orientedPixelHeight = decoder.OrientedPixelHeight;\r\n                    orientedPixelWidth = decoder.OrientedPixelWidth;\r\n                }\r\n            }\r\n\r\n            if (photo == null)\r\n            {\r\n                var reader = new DataReader(chosenPhoto.GetInputStreamAt(0));\r\n                var bytes = new byte[chosenPhoto.Size];\r\n                await reader.LoadAsync((uint)chosenPhoto.Size);\r\n                reader.ReadBytes(bytes);\r\n\r\n                photo = new Photo\r\n                {\r\n                    Bytes = bytes,\r\n                    Width = (int)orientedPixelWidth,\r\n                    Height = (int)orientedPixelHeight,\r\n                    FileName = originalFileName\r\n                };\r\n\r\n                if (!string.IsNullOrEmpty(localFileName))\r\n                {\r\n                    photo.File = await SaveToLocalFolderAsync(chosenPhoto.AsStream(), localFileName);\r\n                }\r\n            }\r\n\r\n            chosenPhoto.Dispose();\r\n\r\n            return photo;\r\n        }\r\n\r\n        public static async Task<byte[]> ComputeMD5(IRandomAccessStream stream)\r\n        {\r\n            var alg = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Md5);\r\n            var inputStream = stream.GetInputStreamAt(0);\r\n            uint capacity = 1024 * 1024;\r\n            var buffer = new Buffer(capacity);\r\n            var hash = alg.CreateHash();\r\n\r\n            while (true)\r\n            {\r\n                await inputStream.ReadAsync(buffer, capacity, InputStreamOptions.None);\r\n                if (buffer.Length > 0)\r\n                    hash.Append(buffer);\r\n                else\r\n                    break;\r\n            }\r\n\r\n            return hash.GetValueAndReset().ToArray();\r\n\r\n            //string hashText = CryptographicBuffer.EncodeToHexString(hash.GetValueAndReset()).ToUpper();\r\n            //var alg = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Md5);\r\n            ////IBuffer buff = \r\n            //var hashed = alg.HashData(str.)\r\n            //var res = CryptographicBuffer.EncodeToHexString(hashed);\r\n            //return res;\r\n        }\r\n\r\n        public static async Task<StorageFile> SaveToLocalFolderAsync(Stream file, string fileName)\r\n        {\r\n            var localFolder = ApplicationData.Current.LocalFolder;\r\n            var storageFile = await localFolder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting);\r\n            using (Stream outputStream = await storageFile.OpenStreamForWriteAsync())\r\n            {\r\n                await file.CopyToAsync(outputStream);\r\n            }\r\n\r\n            return storageFile;\r\n        }\r\n#endif\r\n\r\n        private void SendPhoto(Photo p)\r\n        {\r\n            var volumeId = TLLong.Random();\r\n            var localId = TLInt.Random();\r\n            var secret = TLLong.Random();\r\n\r\n            var fileLocation = new TLFileLocation\r\n            {\r\n                VolumeId = volumeId,\r\n                LocalId = localId,\r\n                Secret = secret,\r\n                DCId = new TLInt(0),        //TODO: remove from here, replace with FileLocationUnavailable\r\n                //Buffer = p.Bytes\r\n            };\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                fileLocation.VolumeId,\r\n                fileLocation.LocalId,\r\n                fileLocation.Secret);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var fileStream = store.CreateFile(fileName))\r\n                {\r\n                    fileStream.Write(p.Bytes, 0, p.Bytes.Length);\r\n                }\r\n            }\r\n\r\n            var photoSize = new TLPhotoSize\r\n            {\r\n                Type = TLString.Empty,\r\n                W = new TLInt(p.Width),\r\n                H = new TLInt(p.Height),\r\n                Location = fileLocation,\r\n                Size = new TLInt(p.Bytes.Length)\r\n            };\r\n\r\n            var photo = new TLPhoto56\r\n            {\r\n                Flags = new TLInt(0),\r\n                Id = new TLLong(0),\r\n                AccessHash = new TLLong(0),\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                Sizes = new TLVector<TLPhotoSizeBase> { photoSize },   \r\n            };\r\n\r\n            var media = new TLMessageMediaPhoto75 { Flags = new TLInt(0), Photo = photo, Caption = TLString.Empty };\r\n\r\n            var message = GetMessage(TLString.Empty, media);\r\n\r\n            if (ImageEditor == null)\r\n            {\r\n                ImageEditor = new ImageEditorViewModel\r\n                {\r\n                    CurrentItem = message,\r\n                    ContinueAction = ContinueSendPhoto\r\n                };\r\n                NotifyOfPropertyChange(() => ImageEditor);\r\n            }\r\n            else\r\n            {\r\n                ImageEditor.CurrentItem = message;\r\n            }\r\n\r\n            BeginOnUIThread(() => ImageEditor.OpenEditor());\r\n        }\r\n\r\n        private void ContinueSendPhoto(TLMessage34 message)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                BeginOnThreadPool(() =>\r\n                 CacheService.SyncSendingMessage(\r\n                     message, previousMessage,\r\n                     m => UploadPhotoInternal(message)));\r\n            });\r\n        }\r\n\r\n#if WP8 && MULTIPLE_PHOTOS\r\n        private void ContinueSendPhoto(IList<PhotoFile> photos)\r\n        {\r\n            var reply = Reply as TLMessage;\r\n\r\n            var messages = new List<TLMessage>();\r\n            foreach (var photo in photos)\r\n            {\r\n                var message = photo.Message as TLMessage73;\r\n                if (message != null)\r\n                {\r\n                    if (reply != null)\r\n                    {\r\n                        message.ReplyToMsgId = reply.Id;\r\n                        message.Reply = reply;\r\n                    }\r\n\r\n                    _mentions = photo.Mentions;\r\n                    var processedText = string.Empty;\r\n                    var entities = GetEntities(message.Message.ToString(), out processedText);\r\n                    _mentions = null;\r\n\r\n                    if (entities.Count > 0)\r\n                    {\r\n                        message.Message = new TLString(processedText);\r\n                        message.Entities = new TLVector<TLMessageEntityBase>(entities);\r\n                    }\r\n                }\r\n\r\n                messages.Add(photo.Message);\r\n            }\r\n\r\n            BeginOnUIThread(() => SendMessages(messages, UploadPhotoInternal));\r\n        }\r\n#endif\r\n\r\n        private void UploadPhotoInternal(IList<TLMessage> messages)\r\n        {\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                var message = messages[i];\r\n\r\n                var fileId = TLLong.Random();\r\n                message.Media.FileId = fileId;\r\n                message.Media.UploadingProgress = 0.001;\r\n                UploadFileManager.UploadFile(fileId, message, message.Media.File);\r\n            }\r\n        }\r\n\r\n        private void UploadPhotoInternal(IList<TLMessage34> messages)\r\n        {\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                messages[i].Status = MessageStatus.Sending;\r\n                UploadPhotoInternal(messages[i]);\r\n            }\r\n        }\r\n\r\n        private void UploadPhotoInternal(TLMessage34 message)\r\n        {\r\n            var photo = ((TLMessageMediaPhoto)message.Media).Photo as TLPhoto;\r\n            if (photo == null) return;\r\n\r\n            var photoSize = photo.Sizes[0] as TLPhotoSize;\r\n            if (photoSize == null) return;\r\n\r\n            var fileLocation = photoSize.Location;\r\n            if (fileLocation == null) return;\r\n\r\n            byte[] bytes = null;\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                fileLocation.VolumeId,\r\n                fileLocation.LocalId,\r\n                fileLocation.Secret);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var fileStream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                {\r\n                    if (fileStream.Length > 0)\r\n                    {\r\n                        bytes = new byte[fileStream.Length];\r\n                        fileStream.Read(bytes, 0, bytes.Length);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (bytes == null) return;\r\n\r\n            var md5Bytes = Telegram.Api.Helpers.Utils.ComputeMD5(bytes);\r\n            var md5Checksum = BitConverter.ToInt64(md5Bytes, 0);\r\n            \r\n            StateService.GetServerFilesAsync(\r\n                results =>\r\n                {\r\n                    var serverFile = results.FirstOrDefault(result => result.MD5Checksum.Value == md5Checksum);\r\n\r\n#if MULTIPLE_PHOTOS\r\n                    serverFile = null;\r\n#endif\r\n\r\n                    if (serverFile != null)\r\n                    {\r\n                        var media = serverFile.Media;\r\n                        var captionMedia = media as IInputMediaCaption;\r\n                        if (captionMedia == null)\r\n                        {\r\n                            var inputMediaPhoto = serverFile.Media as TLInputMediaPhoto;\r\n                            if (inputMediaPhoto != null)\r\n                            {\r\n                                var inputMediaPhoto75 = new TLInputMediaPhoto75(inputMediaPhoto);\r\n                                captionMedia = inputMediaPhoto75;\r\n                                media = inputMediaPhoto75;\r\n                                serverFile.Media = inputMediaPhoto75;\r\n                                StateService.SaveServerFilesAsync(results);\r\n                            }\r\n                            var inputMediaUploadedPhoto = serverFile.Media as TLInputMediaUploadedPhoto;\r\n                            if (inputMediaUploadedPhoto != null)\r\n                            {\r\n                                var inputMediaUploadedPhoto75 = new TLInputMediaUploadedPhoto75(inputMediaUploadedPhoto, null);\r\n                                captionMedia = inputMediaUploadedPhoto75;\r\n                                media = inputMediaUploadedPhoto75;\r\n                                serverFile.Media = inputMediaUploadedPhoto75;\r\n                                StateService.SaveServerFilesAsync(results);\r\n                            }\r\n                        }\r\n\r\n                        if (captionMedia != null)\r\n                        {\r\n                            captionMedia.Caption = message.Message ?? TLString.Empty;\r\n                        }\r\n\r\n                        var ttlMedia = media as IInputTTLMedia;\r\n                        if (ttlMedia != null)\r\n                        {\r\n                            ttlMedia.TTLSeconds = ((TLMessageMediaPhoto70) message.Media).TTLSeconds;\r\n                        }\r\n\r\n                        message.InputMedia = media;\r\n                        UploadService.SendMediaInternal(message, MTProtoService, StateService, CacheService);\r\n                    }\r\n                    else\r\n                    {\r\n                        var fileId = TLLong.Random();\r\n                        message.Media.FileId = fileId;\r\n                        message.Media.UploadingProgress = 0.001;\r\n                        UploadFileManager.UploadFile(fileId, message, bytes);\r\n                    }\r\n                });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Reply.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Text.RegularExpressions;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        private readonly Dictionary<string, TLMessageMediaBase> _webPagesCache = new Dictionary<string, TLMessageMediaBase>();\r\n\r\n        private TLMessageBase _previousReply;\r\n\r\n        private void SaveReply()\r\n        {\r\n            if (Reply != null && !IsWebPagePreview(Reply))\r\n            {\r\n                _previousReply = Reply;\r\n            }\r\n        }\r\n\r\n        private void RestoreReply()\r\n        {\r\n            if (_previousReply != null)\r\n            {\r\n                Reply = _previousReply;\r\n                _previousReply = null;\r\n            }\r\n            else\r\n            {\r\n                if (IsWebPagePreview(Reply))\r\n                {\r\n                    Reply = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        private static bool IsWebPagePreview(TLMessageBase message)\r\n        {\r\n            var messagesContainer = message as TLMessagesContainter;\r\n            if (messagesContainer != null)\r\n            {\r\n                return messagesContainer.WebPageMedia != null;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private TLMessage25 GetEditMessage(TLMessageBase messageBase)\r\n        {\r\n            TLMessage25 editMessage = null;\r\n            var replyContainer = messageBase as TLMessagesContainter;\r\n            if (replyContainer != null)\r\n            {\r\n                editMessage = replyContainer.EditMessage;\r\n            }\r\n\r\n            return editMessage;\r\n        }\r\n\r\n        private void GetWebPagePreviewAsync(string t)\r\n        {\r\n            if (t == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            CurrentDialog = CurrentDialog ?? CacheService.GetDialog(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId));\r\n\r\n            var dialog53 = CurrentDialog as TLDialog53;\r\n            if (dialog53 != null)\r\n            {\r\n                var draft = dialog53.Draft as TLDraftMessage;\r\n                if (draft != null && draft.NoWebpage && string.Equals(draft.Message.ToString().Trim(), t.Trim()))\r\n                {\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var text = t.Trim();\r\n            TLMessageMediaBase webPageMedia;\r\n            if (_webPagesCache.TryGetValue(text, out webPageMedia))\r\n            {\r\n                var webPageMessageMedia = webPageMedia as TLMessageMediaWebPage;\r\n                if (webPageMessageMedia != null)\r\n                {\r\n                    var webPage = webPageMessageMedia.WebPage as TLWebPage;\r\n                    if (webPage != null)\r\n                    {\r\n                        SaveReply();\r\n\r\n                        Reply = new TLMessagesContainter { WebPageMedia = webPageMedia, EditMessage = GetEditMessage(Reply), };\r\n                    }\r\n                    else\r\n                    {\r\n                        RestoreReply();\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n            else\r\n            {\r\n                RestoreReply();\r\n            }\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(1.0), () =>\r\n            {\r\n                if (!string.Equals(Text, text))\r\n                {\r\n                    return;\r\n                }\r\n\r\n                if (text.IndexOf(\".\", StringComparison.Ordinal) == -1)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                Uri uri;\r\n                var uriString = text.StartsWith(\"http\", StringComparison.OrdinalIgnoreCase)\r\n                    ? text\r\n                    : \"http://\" + text;\r\n                if (Uri.TryCreate(uriString, UriKind.Absolute, out uri))\r\n                {\r\n                    MTProtoService.GetWebPagePreviewAsync(new TLString(text),\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            _webPagesCache[text] = result;\r\n\r\n                            if (!string.Equals(Text, text))\r\n                            {\r\n                                return;\r\n                            }\r\n                            var webPageMessageMedia = result as TLMessageMediaWebPage;\r\n                            if (webPageMessageMedia != null)\r\n                            {\r\n\r\n                                var webPage = webPageMessageMedia.WebPage;\r\n                                if (webPage is TLWebPage || webPage is TLWebPagePending)\r\n                                {\r\n                                    SaveReply();\r\n\r\n                                    Reply = new TLMessagesContainter { WebPageMedia = result, EditMessage = GetEditMessage(Reply) };\r\n                                }\r\n                            }\r\n                        }),\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.getWebPagePreview error \" + error);\r\n                        });\r\n                }\r\n            });\r\n        }\r\n\r\n        public bool SuppressOpenCommandsKeyboard { get; set; }\r\n\r\n        public TLMessage31 ReplyMarkupMessage;\r\n\r\n        private TLReplyKeyboardBase _replyMarkup;\r\n\r\n        public TLReplyKeyboardBase ReplyMarkup\r\n        {\r\n            get { return _replyMarkup; }\r\n            set { SetField(ref _replyMarkup, value, () => ReplyMarkup); }\r\n        }\r\n\r\n        private void SetReplyMarkup(TLMessage31 message, bool suppressOpenKeyboard = false)\r\n        {\r\n            if (Reply != null && message != null) return;\r\n\r\n            if (message != null \r\n                && message.ReplyMarkup != null)\r\n            {\r\n                if (message.ReplyMarkup is TLReplyInlineMarkup) return;\r\n\r\n                var replyMarkup = message.ReplyMarkup as TLReplyKeyboardMarkup;\r\n                if (replyMarkup != null\r\n                    && replyMarkup.IsPersonal\r\n                    && !message.IsMention)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var keyboardHide = message.ReplyMarkup as TLReplyKeyboardHide;\r\n                if (keyboardHide != null)\r\n                {\r\n                    if (ReplyMarkupMessage != null\r\n                        && ReplyMarkupMessage.FromId.Value != message.FromId.Value)\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var forceReply = message.ReplyMarkup as TLReplyKeyboardForceReply;\r\n                if (forceReply != null \r\n                    && !forceReply.HasResponse)\r\n                {\r\n                    ReplyMarkupMessage = null;\r\n                    ReplyMarkup = null;\r\n                    Reply = message;\r\n\r\n                    return;\r\n                }\r\n            }\r\n\r\n            SuppressOpenCommandsKeyboard = message != null && message.ReplyMarkup != null && suppressOpenKeyboard;\r\n            ReplyMarkupMessage = message;\r\n            ReplyMarkup = message != null? message.ReplyMarkup : null;\r\n        }\r\n\r\n\r\n        private TLMessageBase _reply;\r\n\r\n        public TLMessageBase Reply\r\n        {\r\n            get { return _reply; }\r\n            set\r\n            {\r\n                var notifyChanges = _reply != value;\r\n                SetField(ref _reply, value, () => Reply);\r\n                if (notifyChanges)\r\n                {\r\n                    NotifyOfPropertyChange(() => ReplyInfo);\r\n                    //NotifyOfPropertyChange(() => CanSend);\r\n                }\r\n            }\r\n        }\r\n\r\n        public ReplyInfo ReplyInfo\r\n        {\r\n            get\r\n            {\r\n                if (_reply != null)\r\n                {\r\n                    return new ReplyInfo {Reply = _reply, ReplyToMsgId = _reply.Id};\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        private Dictionary<string, IList<TLMessageBase>> _getHistoryCache = new Dictionary<string, IList<TLMessageBase>>();\r\n\r\n        public TLMessageBase _previousScrollPosition;\r\n\r\n        private void HighlightMessage(TLMessageBase message)\r\n        {\r\n            message.IsHighlighted = true;\r\n            BeginOnUIThread(TimeSpan.FromSeconds(2.0), () =>\r\n            {\r\n                message.IsHighlighted = false;\r\n            });\r\n        }\r\n\r\n        public void OpenEditMessage()\r\n        {\r\n            TLMessageBase message = null;\r\n            var container = Reply as TLMessagesContainter;\r\n            if (container != null) message = container.EditMessage;\r\n\r\n            if (message == null) return;\r\n\r\n            if (OpenMessage(Items[0] == message? null : Items[0], message.Id)) return;\r\n        }\r\n\r\n        public void OpenReply(TLMessageBase message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            var reply = message.Reply as TLMessageCommon;\r\n            if (reply == null) return;\r\n            if (reply.Index == 0) return;\r\n\r\n            // migrated reply\r\n            var channel = With as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                var replyPeerChat = reply.ToId as TLPeerChat;\r\n                if (replyPeerChat != null)\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        var item = Items[i] as TLMessageCommon;\r\n                        if (item != null)\r\n                        {\r\n                            var peerChat = item.ToId as TLPeerChat;\r\n                            if (peerChat != null)\r\n                            {\r\n                                if (Items[i].Index == reply.Index)\r\n                                {\r\n                                    RaiseScrollTo(new ScrollToEventArgs(Items[i]));\r\n\r\n                                    //waiting ScrollTo to complete\r\n                                    BeginOnUIThread(TimeSpan.FromSeconds(0.1), () =>\r\n                                    {\r\n                                        HighlightMessage(Items[i]);\r\n\r\n                                        _previousScrollPosition = message;\r\n                                        ShowScrollToBottomButton();\r\n                                    });\r\n\r\n                                    return;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (OpenMessage(message, reply.Id)) return;\r\n\r\n            return;\r\n\r\n            // load separated slice with reply\r\n            Items.Clear();\r\n            Items.Add(message.Reply);\r\n            ShowScrollToBottomButton();\r\n            _isFirstSliceLoaded = false;\r\n\r\n            var key = string.Format(\"{0}\", message.Reply.Index);\r\n            IList<TLMessageBase> cachedMessage;\r\n            if (_getHistoryCache.TryGetValue(key, out cachedMessage))\r\n            {\r\n                OpenReplyInternal(message.Reply, cachedMessage);\r\n            }\r\n            else\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.GetHistoryAsync(\r\n                    Stopwatch.StartNew(),\r\n                    Peer,\r\n                    TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId),\r\n                    false,\r\n                    new TLInt(0), \r\n                    new TLInt(-15),\r\n                    new TLInt(message.Reply.Index),\r\n                    new TLInt(30),\r\n                    result =>\r\n                    {\r\n                        ProcessMessages(result.Messages);\r\n                        _getHistoryCache[key] = result.Messages;\r\n\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            OpenReplyInternal(message.Reply, result.Messages);\r\n                            IsWorking = false;\r\n                        });\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                        IsWorking = false;\r\n                    });\r\n            }\r\n        }\r\n\r\n        public bool OpenMessage(TLMessageBase previousMessage, TLInt messageId)\r\n        {\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (Items[i].Index == messageId.Value)\r\n                {\r\n                    RaiseScrollTo(new ScrollToEventArgs(Items[i]));\r\n\r\n                    //waiting ScrollTo to complete\r\n                    BeginOnUIThread(TimeSpan.FromSeconds(0.1), () =>\r\n                    {\r\n                        HighlightMessage(Items[i]);\r\n\r\n                        _previousScrollPosition = previousMessage;\r\n                        if (_previousScrollPosition != null)\r\n                        {\r\n                            ShowScrollToBottomButton();\r\n                        }\r\n                    });\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            LoadAndOpenMessage(previousMessage, messageId);\r\n\r\n            return false;\r\n        }\r\n\r\n        private void LoadAndOpenMessage(TLMessageBase previousMessage, TLInt maxMessageId)\r\n        {\r\n            IsWorking = true;\r\n            MTProtoService.GetHistoryAsync(Stopwatch.StartNew(),\r\n                Peer,\r\n                TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId),\r\n                false,\r\n                new TLInt(0), \r\n                new TLInt(-25),\r\n                maxMessageId,\r\n                new TLInt(Constants.MessagesSlice + 25),\r\n                result =>\r\n                {\r\n#if WP8\r\n                    var resultCount = result.Messages.Count;\r\n                    ProcessMessages(result.Messages);\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        SliceLoaded = true;\r\n\r\n                        Items.Clear();\r\n\r\n                        var firstSlice = new List<TLMessageBase>();\r\n                        for (var i = 0; i < result.Messages.Count; i++)\r\n                        {\r\n                            var message = result.Messages[i];\r\n                            if (message.Index > maxMessageId.Value)\r\n                            {\r\n                                firstSlice.Add(message);\r\n                            }\r\n                            else\r\n                            {\r\n                                if (!SkipMessage(message))\r\n                                {\r\n                                    Items.Add(message);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                        if (resultCount < Constants.MessagesSlice)\r\n                        {\r\n                            IsLastSliceLoaded = true;\r\n                            LoadNextMigratedHistorySlice(Thread.CurrentThread.ManagedThreadId + \" gh\");\r\n                        }\r\n\r\n                        _isFirstSliceLoaded = false;\r\n\r\n                        var highlightMessage = Items[0];\r\n                        HoldScrollingPosition = true;\r\n                        BeginOnUIThread(TimeSpan.FromSeconds(0.1), () =>\r\n                        {\r\n                            for(var i = firstSlice.Count - 1; i > 0; i--)\r\n                            {\r\n                                Items.Insert(0, firstSlice[i]);\r\n                            }\r\n                            HoldScrollingPosition = false;\r\n\r\n                            HighlightMessage(highlightMessage);\r\n\r\n                            _previousScrollPosition = previousMessage;\r\n                            if (_previousScrollPosition != null)\r\n                            {\r\n                                ShowScrollToBottomButton();\r\n                            }\r\n                        });\r\n                    });\r\n#else\r\n                    ProcessReplies(result.Messages);\r\n\r\n                    IsWorking = false;\r\n                    SliceLoaded = true;\r\n                    IsEmptyDialog = Items.Count == 0 && LazyItems.Count == 0;\r\n\r\n                    foreach (var message in result.Messages)\r\n                    {\r\n                        message._isAnimated = false;\r\n                        LazyItems.Add(message);\r\n                    }\r\n\r\n                    BeginOnUIThread(PopulateItems);\r\n#endif\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n                    Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                }));\r\n        }\r\n\r\n        private void OpenReplyInternal(TLMessageBase reply, IList<TLMessageBase> messages)\r\n        {\r\n            IsFirstSliceLoaded = false;\r\n\r\n            var startPosition = 0;\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                startPosition = i;\r\n                if (messages[i].Index == reply.Index)\r\n                {\r\n                    break;\r\n                }\r\n            }\r\n\r\n            for (var i = startPosition + 1; i < messages.Count; i++)\r\n            {\r\n                Items.Add(messages[i]);\r\n            }\r\n\r\n            HoldScrollingPosition = true;\r\n            BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < startPosition - 1; i++)\r\n                {\r\n                    Items.Insert(i, messages[i]);\r\n                }\r\n                HoldScrollingPosition = false;\r\n            });\r\n        }\r\n\r\n        public void ReplyMessage(TLMessageBase message)\r\n        {\r\n            if (message == null) return;\r\n            var messageService = message as TLMessageService;\r\n            if (messageService != null)\r\n            {\r\n                var action = messageService.Action;\r\n                if (action is TLMessageActionEmpty\r\n                    || action is TLMessageActionUnreadMessages)\r\n                {\r\n                    return;\r\n                }\r\n            }\r\n            if (message.Index <= 0) return;\r\n\r\n            var message31 = message as TLMessage31;\r\n            if (message31 != null && !message31.Out.Value)\r\n            {\r\n                var fromId = message31.FromId;\r\n                var user = CacheService.GetUser(fromId) as TLUser;\r\n                if (user != null && user.IsBot)\r\n                {\r\n                    SetReplyMarkup(message31);\r\n                }\r\n            }\r\n\r\n            Reply = message;\r\n        }\r\n\r\n        public void DeleteReply()\r\n        {\r\n            var message31 = Reply as TLMessage31;\r\n            if (message31 != null)\r\n            {\r\n                if (message31.ReplyMarkup != null)\r\n                {\r\n                    message31.ReplyMarkup.HasResponse = true;\r\n                }\r\n            }\r\n\r\n            if (_previousReply != null)\r\n            {\r\n                Reply = _previousReply;\r\n                _previousReply = null;\r\n            }\r\n            else\r\n            {\r\n                if (ReplyMarkupMessage == Reply)\r\n                {\r\n                    SetReplyMarkup(null);\r\n                }\r\n                Reply = null;\r\n            }\r\n        }\r\n\r\n        private Dictionary<long, TLMessage> _group = new Dictionary<long, TLMessage>();\r\n\r\n        public void ProcessMessages(IList<TLMessageBase> messages)\r\n        {\r\n            foreach (var messageBase in messages)\r\n            {\r\n                var message = messageBase as TLMessage48;\r\n                if (message != null)\r\n                {\r\n                    var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                    if (mediaGeoLive != null)\r\n                    {\r\n                        mediaGeoLive.From = message.From;\r\n                        mediaGeoLive.Date = message.Date;\r\n                        mediaGeoLive.EditDate = message.EditDate;\r\n                    }\r\n\r\n                    var mediaGame = message.Media as TLMessageMediaGame;\r\n                    if (mediaGame != null)\r\n                    {\r\n                        mediaGame.Message = message.Message;\r\n                        mediaGame.SourceMessage = message;\r\n                    }\r\n                }\r\n\r\n                var message70 = message as TLMessage70;\r\n                if (message70 != null && !message70.NotListened && message70.HasTTL())\r\n                {\r\n                    var mediaPhoto = message70.Media as TLMessageMediaPhoto70;\r\n                    if (mediaPhoto != null)\r\n                    {\r\n                        mediaPhoto.Photo = null;\r\n                    }\r\n\r\n                    var mediaDocument = message70.Media as TLMessageMediaDocument70;\r\n                    if (mediaDocument != null)\r\n                    {\r\n                        mediaDocument.Document = null;\r\n                    }\r\n\r\n                    var mediaVenue = message70.Media as TLMessageMediaVenue72;\r\n                    if (mediaVenue != null)\r\n                    {\r\n                        mediaVenue.User = message.From as TLUser;\r\n                    }\r\n                }\r\n            }\r\n\r\n            ProcessGroupedMessages(messages);\r\n\r\n            var replyToMsgIds = new TLVector<TLInputMessageBase>();\r\n            var replyToMsgs = new List<IReplyToMsgId>();\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                var messageWithReply = messages[i] as IReplyToMsgId;\r\n                var message25 = messages[i] as TLMessage25;\r\n                var messageService49 = messages[i] as TLMessageService49;\r\n                if (messageWithReply != null)\r\n                {\r\n                    var replyToMsgId = messageWithReply.ReplyToMsgId;\r\n                    if (replyToMsgId != null\r\n                        && replyToMsgId.Value != 0)\r\n                    {\r\n                        TLInt channelId = null;\r\n                        var peerChannel = messageWithReply.ToId as TLPeerChannel;\r\n                        if (peerChannel != null)\r\n                        {\r\n                            channelId = peerChannel.Id;\r\n                        }\r\n\r\n                        var reply = CacheService.GetMessage(replyToMsgId, channelId);\r\n                        if (reply != null)\r\n                        {\r\n                            messages[i].Reply = reply;\r\n                        }\r\n                        else\r\n                        {\r\n                            replyToMsgIds.Add(new TLInputMessageId { Id = replyToMsgId });\r\n                            replyToMsgs.Add(messageWithReply);\r\n                        }\r\n                    }\r\n\r\n                    if (message25 != null\r\n                        && message25.Media != null)\r\n                    {\r\n                        message25.Media.Out = message25.Out.Value;\r\n                        message25.Media.NotListened = message25.NotListened;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (replyToMsgIds.Count > 0)\r\n            {\r\n                var channel = With as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    var firstReplyToMsg = replyToMsgs.FirstOrDefault();\r\n                    var peerChat = firstReplyToMsg != null ? firstReplyToMsg.ToId as TLPeerChat : null;\r\n                    if (peerChat != null)\r\n                    {\r\n                        MTProtoService.GetMessagesAsync(\r\n                            replyToMsgIds,\r\n                            result =>\r\n                            {\r\n                                CacheService.AddChats(result.Chats, results => { });\r\n                                CacheService.AddUsers(result.Users, results => { });\r\n\r\n                                for (var i = 0; i < result.Messages.Count; i++)\r\n                                {\r\n                                    for (var j = 0; j < replyToMsgs.Count; j++)\r\n                                    {\r\n                                        var messageToReply = replyToMsgs[j];\r\n                                        if (messageToReply != null\r\n                                            && messageToReply.ReplyToMsgId.Value == result.Messages[i].Index)\r\n                                        {\r\n                                            replyToMsgs[j].Reply = result.Messages[i];\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                for (var i = 0; i < replyToMsgs.Count; i++)\r\n                                {\r\n                                    var obj = replyToMsgs[i] as TLObject;\r\n                                    if (obj != null)\r\n                                    {\r\n                                        obj.NotifyOfPropertyChange(() => replyToMsgs[i].ReplyInfo);\r\n                                    }\r\n                                }\r\n                            },\r\n                            error =>\r\n                            {\r\n                                Execute.ShowDebugMessage(\"messages.getMessages error \" + error);\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        MTProtoService.GetMessagesAsync(\r\n                           channel.ToInputChannel(),\r\n                           replyToMsgIds,\r\n                           result =>\r\n                           {\r\n                               CacheService.AddChats(result.Chats, results => { });\r\n                               CacheService.AddUsers(result.Users, results => { });\r\n\r\n                               for (var i = 0; i < result.Messages.Count; i++)\r\n                               {\r\n                                   for (var j = 0; j < replyToMsgs.Count; j++)\r\n                                   {\r\n                                       var messageToReply = replyToMsgs[j];\r\n                                       if (messageToReply != null\r\n                                           && messageToReply.ReplyToMsgId.Value == result.Messages[i].Index)\r\n                                       {\r\n                                           replyToMsgs[j].Reply = result.Messages[i];\r\n                                       }\r\n                                   }\r\n                               }\r\n\r\n                               for (var i = 0; i < replyToMsgs.Count; i++)\r\n                               {\r\n                                   var obj = replyToMsgs[i] as TLObject;\r\n                                   if (obj != null)\r\n                                   {\r\n                                       obj.NotifyOfPropertyChange(() => replyToMsgs[i].ReplyInfo);\r\n                                   }\r\n                               }\r\n                           },\r\n                           error =>\r\n                           {\r\n                               Execute.ShowDebugMessage(\"channels.getMessages error \" + error);\r\n                           });\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    MTProtoService.GetMessagesAsync(\r\n                        replyToMsgIds,\r\n                        result =>\r\n                        {\r\n                            CacheService.AddChats(result.Chats, results => { });\r\n                            CacheService.AddUsers(result.Users, results => { });\r\n\r\n                            for (var i = 0; i < result.Messages.Count; i++)\r\n                            {\r\n                                for (var j = 0; j < replyToMsgs.Count; j++)\r\n                                {\r\n                                    var messageToReply = replyToMsgs[j];\r\n                                    if (messageToReply != null\r\n                                        && messageToReply.ReplyToMsgId.Value == result.Messages[i].Index)\r\n                                    {\r\n                                        replyToMsgs[j].Reply = result.Messages[i];\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            for (var i = 0; i < replyToMsgs.Count; i++)\r\n                            {\r\n                                var obj = replyToMsgs[i] as TLObject;\r\n                                if (obj != null)\r\n                                {\r\n                                    obj.NotifyOfPropertyChange(() => replyToMsgs[i].ReplyInfo);\r\n                                }\r\n                            }\r\n                        },\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.getMessages error \" + error);\r\n                        });\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ProcessGroupedMessages(IList<TLMessageBase> messages)\r\n        {\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                var firstMessage = messages[i] as TLMessage73;\r\n                if (firstMessage != null && firstMessage.GroupedId != null && !firstMessage.IsExpired())\r\n                {\r\n                    var mediaPhoto = firstMessage.Media as TLMessageMediaPhoto;\r\n                    var mediaDocument = firstMessage.Media as TLMessageMediaDocument;\r\n\r\n                    if (mediaPhoto != null || mediaDocument != null)\r\n                    {\r\n                        var groupCount = GetGroupLength(messages, firstMessage.GroupedId, i + 1);\r\n                        if (groupCount > 0)\r\n                        {\r\n                            var groupedMessage = ReplaceWithGroup(messages, i, groupCount + 1);\r\n                            _group[firstMessage.GroupedId.Value] = groupedMessage;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private static TLMessage ReplaceWithGroup(IList<TLMessageBase> messages, int position, int length)\r\n        {\r\n            var message = messages[position + length - 1] as TLMessage73;\r\n            if (message != null)\r\n            {\r\n                var group = new TLVector<TLMessageBase>();\r\n                for (var i = 0; i < length; i++)\r\n                {\r\n                    group.Insert(0, messages[position]);\r\n                    messages.RemoveAt(position);\r\n                }\r\n\r\n                var mediaGroup = new TLMessageMediaGroup{ Group = group };\r\n                \r\n                var groupedMessage = new TLMessage73\r\n                {\r\n                    Flags = new TLInt(0),\r\n                    Out = message.Out,\r\n                    Unread = message.Unread,\r\n                    Id = message.Id,\r\n                    RandomId = message.RandomId,\r\n                    FromId = message.FromId,\r\n                    ToId = message.ToId,\r\n                    FwdHeader = message.FwdHeader,\r\n                    ViaBotId = message.ViaBotId,\r\n                    ReplyToMsgId = message.ReplyToMsgId,\r\n                    Date = message.Date,\r\n                    Message = TLString.Empty,\r\n                    _media = mediaGroup,\r\n                    ReplyMarkup = message.ReplyMarkup,\r\n                    Entities = new TLVector<TLMessageEntityBase>(),\r\n                    Views = message.Views,\r\n                    EditDate = message.EditDate,\r\n                    PostAuthor = message.PostAuthor,\r\n                    GroupedId = message.GroupedId,\r\n                    _status = message.Status\r\n                };\r\n\r\n                if (groupedMessage.FromId != null) groupedMessage.SetFromId();\r\n                if (groupedMessage._media != null) groupedMessage.SetMedia();\r\n\r\n                messages.Insert(position, groupedMessage);\r\n\r\n                return groupedMessage;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static int GetGroupLength(IList<TLMessageBase> messages, TLLong groupId, int start)\r\n        {\r\n            var count = 0;\r\n            for (var i = start; i < messages.Count; i++)\r\n            {\r\n                var message = messages[i] as TLMessage73;\r\n                if (message != null \r\n                    && message.GroupedId != null \r\n                    && message.GroupedId.Value == groupId.Value\r\n                    && !message.IsExpired()\r\n                    && (message.Media is TLMessageMediaPhoto || message.Media is TLMessageMediaDocument))\r\n                {\r\n                    count++;\r\n                }\r\n                else\r\n                {\r\n                    return count;\r\n                }\r\n            }\r\n\r\n            return count;\r\n        }\r\n\r\n        public CommandHintsViewModel CommandHints { get; protected set; }\r\n\r\n        private void CreateCommandHints()\r\n        {\r\n            if (CommandHints == null)\r\n            {\r\n                CommandHints = new CommandHintsViewModel(With);\r\n                NotifyOfPropertyChange(() => CommandHints);\r\n            }\r\n        }\r\n\r\n        private void ClearCommandHints()\r\n        {\r\n            if (CommandHints != null)\r\n            {\r\n                CommandHints.Hints.Clear();\r\n            }\r\n        }\r\n\r\n        private static bool IsValidCommandSymbol(char symbol)\r\n        {\r\n            if ((symbol >= 'a' && symbol <= 'z')\r\n                || (symbol >= 'A' && symbol <= 'Z')\r\n                || (symbol >= '0' && symbol <= '9')\r\n                || symbol == '_')\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private readonly Dictionary<string, IList<TLBotCommand>> _cachedCommandResults = new Dictionary<string, IList<TLBotCommand>>();\r\n\r\n        private IList<TLBotCommand> _commands; \r\n\r\n        private IList<TLBotCommand> GetCommands()\r\n        {\r\n            if (_commands != null)\r\n            {\r\n                return _commands;\r\n            }\r\n\r\n            var user = With as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                if (user.BotInfo == null)\r\n                {\r\n                    return null;\r\n                }\r\n\r\n                var botInfo = user.BotInfo as TLBotInfo;\r\n                if (botInfo != null)\r\n                {\r\n                    foreach (var command in botInfo.Commands)\r\n                    {\r\n                        command.Bot = user;\r\n                    }\r\n\r\n                    _commands = botInfo.Commands;\r\n                }\r\n            }\r\n\r\n            var chat = With as TLChatBase;\r\n            if (chat != null)\r\n            {\r\n                if (chat.BotInfo == null)\r\n                {\r\n                    return null;\r\n                }\r\n\r\n                var commands = new TLVector<TLBotCommand>();\r\n                foreach (var botInfoBase in chat.BotInfo)\r\n                {\r\n                    var botInfo = botInfoBase as TLBotInfo;\r\n                    if (botInfo != null)\r\n                    {\r\n                        user = CacheService.GetUser(botInfo.UserId);\r\n\r\n                        foreach (var command in botInfo.Commands)\r\n                        {\r\n                            command.Bot = user;\r\n                            commands.Add(command);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                _commands = commands;\r\n            }\r\n\r\n            return _commands;\r\n        } \r\n\r\n        private void GetCommandHints(string text)\r\n        {\r\n            var commands = GetCommands();\r\n\r\n            if (text == null) return;\r\n            text = text.TrimStart('/');\r\n\r\n            if (commands == null)\r\n            {\r\n                GetFullInfo();\r\n                return;\r\n            }\r\n\r\n            ClearCommandHints();\r\n\r\n            IList<TLBotCommand> cachedResult;\r\n            if (!_cachedCommandResults.TryGetValue(text, out cachedResult))\r\n            {\r\n                cachedResult = new List<TLBotCommand>();\r\n                for (var i = 0; i < commands.Count; i++)\r\n                {\r\n                    var command = commands[i].Command.ToString();\r\n                    if (!string.IsNullOrEmpty(command)\r\n                        && (string.IsNullOrEmpty(text) || command.StartsWith(text, StringComparison.OrdinalIgnoreCase)))\r\n                    {\r\n                        cachedResult.Add(commands[i]);\r\n                    }\r\n                }\r\n\r\n                _cachedCommandResults[text] = cachedResult;\r\n            }\r\n\r\n            if (cachedResult.Count > 0)\r\n            {\r\n                CreateCommandHints();\r\n\r\n                for (var i = 0; i < cachedResult.Count; i++)\r\n                {\r\n                    if (i == MaxResults) break;\r\n\r\n                    CommandHints.Hints.Add(cachedResult[i]);\r\n                }\r\n            }\r\n        }\r\n\r\n        private static bool SearchByCommands(string text, out string searchText)\r\n        {\r\n            var symbol = '/';\r\n\r\n            var searchByCommands = true;\r\n            var commandIndex = -1;\r\n            searchText = string.Empty;\r\n            for (var i = text.Length - 1; i >= 0; i--)\r\n            {\r\n                if (text[i] == symbol)\r\n                {\r\n                    if (i == 0\r\n                        || text[i - 1] == ' ')\r\n                    {\r\n                        commandIndex = i;\r\n                    }\r\n                    else\r\n                    {\r\n                        searchByCommands = false;\r\n                    }\r\n                    break;\r\n                }\r\n\r\n                if (!IsValidCommandSymbol(text[i]))\r\n                {\r\n                    searchByCommands = false;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (searchByCommands)\r\n            {\r\n                if (commandIndex == -1)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                searchText = text.Substring(commandIndex).TrimStart(symbol);\r\n            }\r\n\r\n            return searchByCommands;\r\n        }\r\n\r\n        public void ContinueCommandHints()\r\n        {\r\n            if (!string.IsNullOrEmpty(Text))\r\n            {\r\n                string searchText;\r\n                var searchByCommands = SearchByCommands(Text, out searchText);\r\n\r\n                if (searchByCommands)\r\n                {\r\n                    CreateCommandHints();\r\n\r\n                    if (CommandHints.Hints.Count == MaxResults)\r\n                    {\r\n                        IList<TLBotCommand> cachedResult;\r\n                        if (_cachedCommandResults.TryGetValue(searchText, out cachedResult))\r\n                        {\r\n                            for (var i = MaxResults; i < cachedResult.Count; i++)\r\n                            {\r\n                                CommandHints.Hints.Add(cachedResult[i]);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public StickerHintsViewModel StickerHints { get; protected set; }\r\n\r\n        private void CreateStickerHints()\r\n        {\r\n            if (StickerHints == null)\r\n            {\r\n                StickerHints = new StickerHintsViewModel();\r\n                NotifyOfPropertyChange(() => StickerHints);\r\n            }\r\n        }\r\n\r\n        private void ClearStickerHints()\r\n        {\r\n            if (StickerHints != null)\r\n            {\r\n                StickerHints.Hints.Clear();\r\n            }\r\n        }\r\n\r\n        private readonly Dictionary<string, IList<TLStickerItem>> _cachedStickerResults = new Dictionary<string, IList<TLStickerItem>>();\r\n\r\n        private void GetStickerHints(string text)\r\n        {\r\n            var stickersCache = new Dictionary<long, long>();\r\n            var stickers = new List<TLStickerItem>();\r\n            var currentStickerText = text.Trim();\r\n\r\n            var allStickers43 = StateService.GetAllStickers() as TLAllStickers43;\r\n            if (allStickers43 != null)\r\n            {\r\n                if (allStickers43.ShowStickersByEmoji == ShowStickersByEmoji.AllSets\r\n                    || allStickers43.ShowStickersByEmoji == ShowStickersByEmoji.MySets)\r\n                {\r\n                    var favedDict = new Dictionary<long, long>();\r\n                    var favedStickers = allStickers43.FavedStickers;\r\n                    if (favedStickers != null)\r\n                    {\r\n                        for (var i = 0; i < favedStickers.Documents.Count; i++)\r\n                        {\r\n                            favedDict[favedStickers.Documents[i].Index] = favedStickers.Documents[i].Index;\r\n                        }\r\n                    }\r\n\r\n                    // 1. 5 most recently used (flag=[my sets, all sets])\r\n                    var recentStickers = allStickers43.RecentStickers;\r\n                    if (recentStickers != null)\r\n                    {\r\n                        const int maxRecentCount = 5;\r\n                        var recentCount = 0;\r\n                        for (var i = 0; i < recentStickers.Documents.Count && recentCount < maxRecentCount; i++)\r\n                        {\r\n                            var sticker = recentStickers.Documents[i] as TLDocument22;\r\n                            if (sticker != null && sticker.Emoticon == text && !stickersCache.ContainsKey(sticker.Index) && !favedDict.ContainsKey(sticker.Index))\r\n                            {\r\n                                stickers.Add(new TLStickerItem { Document = sticker });\r\n                                stickersCache[sticker.Index] = sticker.Index;\r\n                                recentCount++;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    // 2. faved stickers (flag=[my sets, all sets])\r\n                    if (favedStickers != null)\r\n                    {\r\n                        for (var i = 0; i < favedStickers.Documents.Count; i++)\r\n                        {\r\n                            var sticker = favedStickers.Documents[i] as TLDocument22;\r\n                            if (sticker != null && sticker.Emoticon == text && !stickersCache.ContainsKey(sticker.Index))\r\n                            {\r\n                                stickers.Add(new TLStickerItem { Document = sticker });\r\n                                stickersCache[sticker.Index] = sticker.Index;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    // 3. installed stickers (flag=[my sets, all sets])\r\n                    var stickerPack = GetStickerPack(currentStickerText);\r\n                    if (stickerPack != null)\r\n                    {\r\n                        for (var i = 0; i < stickerPack.Documents.Count; i++)\r\n                        {\r\n                            var sticker = Stickers.Documents.FirstOrDefault(x => x.Id.Value == stickerPack.Documents[i].Value);\r\n                            if (sticker != null && !stickersCache.ContainsKey(sticker.Index))\r\n                            {\r\n                                stickers.Add(new TLStickerItem { Document = sticker });\r\n                                stickersCache[sticker.Index] = sticker.Index;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (allStickers43.ShowStickersByEmoji == ShowStickersByEmoji.AllSets)\r\n                {\r\n                    // 4. featured stickers (flag=[all sets])\r\n                    var featuredPack = GetFeaturedStickerPack(currentStickerText);\r\n                    if (featuredPack != null)\r\n                    {\r\n                        var featuredStickers = StateService.GetFeaturedStickers();\r\n                        for (var i = 0; i < featuredPack.Documents.Count; i++)\r\n                        {\r\n                            var sticker = featuredStickers.Documents.FirstOrDefault(x => x.Id.Value == featuredPack.Documents[i].Value);\r\n                            if (sticker != null && !stickersCache.ContainsKey(sticker.Index))\r\n                            {\r\n                                stickers.Add(new TLStickerItem { Document = sticker });\r\n                                stickersCache[sticker.Index] = sticker.Index;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    // 5. search on server side\r\n                }\r\n            }\r\n\r\n            var key = string.Format(\"{0}\\ashowStickersByEmoji={1}\", text, allStickers43 != null ? allStickers43.ShowStickersByEmoji : ShowStickersByEmoji.AllSets);\r\n            _cachedStickerResults[key] = stickers;\r\n\r\n            ClearStickerHints();\r\n\r\n            if (stickers.Count > 0)\r\n            {\r\n                CreateStickerHints();\r\n\r\n                for (var i = 0; i < stickers.Count; i++)\r\n                {\r\n                    if (i == MaxResults) break;\r\n\r\n                    StickerHints.Hints.Add(stickers[i]);\r\n                }\r\n            }\r\n        }\r\n\r\n        private static bool SearchByStickers(string text, out string searchText)\r\n        {\r\n            searchText = text.Trim();\r\n            if (searchText.Length > 2)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            return true;\r\n        } \r\n\r\n        public void ContinueStickerHints()\r\n        {\r\n            if (!string.IsNullOrEmpty(Text))\r\n            {\r\n                string searchText;\r\n                var searchByStickers = SearchByStickers(Text, out searchText);\r\n\r\n                if (searchByStickers)\r\n                {\r\n                    CreateStickerHints();\r\n\r\n                    if (StickerHints.Hints.Count == MaxResults)\r\n                    {\r\n                        IList<TLStickerItem> cachedResult;\r\n                        var allStickers43 = StateService.GetAllStickers() as TLAllStickers43;\r\n                        var key = string.Format(\"{0}\\ashowStickersByEmoji={1}\", searchText, allStickers43 != null ? allStickers43.ShowStickersByEmoji : ShowStickersByEmoji.AllSets);\r\n                        if (_cachedStickerResults.TryGetValue(key, out cachedResult))\r\n                        {\r\n                            for (var i = MaxResults; i < cachedResult.Count; i++)\r\n                            {\r\n                                StickerHints.Hints.Add(cachedResult[i]);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public UsernameHintsViewModel UsernameHints { get; protected set; }\r\n\r\n        private void CreateUsernameHints()\r\n        {\r\n            if (UsernameHints == null)\r\n            {\r\n                UsernameHints = new UsernameHintsViewModel();\r\n                NotifyOfPropertyChange(() => UsernameHints);\r\n            }\r\n        }\r\n\r\n        private void ClearUsernameHints()\r\n        {\r\n            if (UsernameHints != null)\r\n            {\r\n                UsernameHints.Hints.Clear();\r\n            }\r\n        }\r\n\r\n        private static bool IsValidUsernameSymbol(char symbol)\r\n        {\r\n            if ((symbol >= 'a' && symbol <= 'z')\r\n                || (symbol >= 'A' && symbol <= 'Z')\r\n                || (symbol >= '0' && symbol <= '9')\r\n                || symbol == '_')\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private IList<TLUserBase> GetUsernameHintsExternal(string text)\r\n        {\r\n            string searchText;\r\n            var searchByUsernames = SearchByUsernames(text, out searchText);\r\n            if (searchByUsernames)\r\n            {\r\n                GetUsernameHints(searchText);\r\n                ClearUsernameHints();\r\n\r\n                IList<TLUserBase> hints;\r\n                if (_cachedUsernameResults.TryGetValue(searchText, out hints))\r\n                {\r\n                    return hints;\r\n                }\r\n            }\r\n\r\n            return new List<TLUserBase>();\r\n        }\r\n\r\n        private readonly Dictionary<string, IList<TLUserBase>> _cachedUsernameResults = new Dictionary<string, IList<TLUserBase>>();\r\n\r\n        private const int MaxResults = 10;\r\n\r\n        private void GetUsernameHints(string text)\r\n        {\r\n            if (text == null) return;\r\n            text = text.TrimStart('@');\r\n\r\n            IList<TLUserBase> cachedResult = new List<TLUserBase>();\r\n            var chat = With as TLChat;\r\n            if (chat != null)\r\n            {\r\n                if (!GetChatUsernameHints(text, chat, out cachedResult)) return;\r\n            }\r\n            var channel = With as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (!GetChannelUsernameHints(text, channel, out cachedResult)) return;\r\n            }\r\n            var user = With as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                if (!GetParticipantUsernameHints(text, user, out cachedResult)) return;\r\n            }\r\n\r\n            ClearUsernameHints();\r\n\r\n            if (cachedResult.Count > 0)\r\n            {\r\n                CreateUsernameHints();\r\n\r\n                var addInlineBots = AddInlineBots();\r\n\r\n                for (var i = 0; i < cachedResult.Count; i++)\r\n                {\r\n                    if (UsernameHints.Hints.Count == MaxResults) break;\r\n\r\n                    if (!addInlineBots)\r\n                    {\r\n                        var bot = cachedResult[i] as TLUser;\r\n                        if (bot != null && bot.IsInlineBot) continue;\r\n                    }\r\n\r\n                    UsernameHints.Hints.Add(cachedResult[i]);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool GetParticipantUsernameHints(string text, TLUserBase userBase, out IList<TLUserBase> cachedResult)\r\n        {\r\n            cachedResult = new List<TLUserBase>();\r\n\r\n            var inlineBots = GetInlineBots();\r\n            if (inlineBots == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (!_cachedUsernameResults.TryGetValue(text, out cachedResult))\r\n            {\r\n                cachedResult = new List<TLUserBase>();\r\n                var resultIndex = new Dictionary<int, int>();\r\n                resultIndex[StateService.CurrentUserId] = StateService.CurrentUserId;\r\n\r\n                for (var i = 0; i < inlineBots.Count; i++)\r\n                {\r\n                    var inlineBot = inlineBots[i];\r\n                    if (!resultIndex.ContainsKey(inlineBot.Index))\r\n                    {\r\n                        var userName = inlineBot as IUserName;\r\n                        if (userName != null)\r\n                        {\r\n                            var userNameValue = userName.UserName.ToString();\r\n\r\n                            if (!string.IsNullOrEmpty(userNameValue)\r\n                                && (string.IsNullOrEmpty(text) || userNameValue.StartsWith(text, StringComparison.OrdinalIgnoreCase)))\r\n                            {\r\n                                cachedResult.Add(inlineBot);\r\n                                resultIndex[inlineBot.Index] = inlineBot.Index;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                _cachedUsernameResults[text] = cachedResult;\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private bool GetChatUsernameHints(string text, TLChat chat, out IList<TLUserBase> cachedResult)\r\n        {\r\n            cachedResult = new List<TLUserBase>();\r\n\r\n            if (chat.Participants == null)\r\n            {\r\n                GetFullInfo();\r\n\r\n                return false;\r\n            }\r\n\r\n            var participants = chat.Participants as IChatParticipants;\r\n            if (participants == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (!_cachedUsernameResults.TryGetValue(text, out cachedResult))\r\n            {\r\n                cachedResult = new List<TLUserBase>();\r\n                var resultIndex = new Dictionary<int, int>();\r\n                resultIndex[StateService.CurrentUserId] = StateService.CurrentUserId;\r\n\r\n                var inlineBots = GetInlineBots();\r\n                if (inlineBots != null)\r\n                {\r\n                    var maxInlineBotsCount = 5;\r\n                    for (var i = 0; i < inlineBots.Count; i++)\r\n                    {\r\n                        if (i == maxInlineBotsCount) break;\r\n\r\n                        var inlineBot = inlineBots[i];\r\n                        if (!resultIndex.ContainsKey(inlineBot.Index))\r\n                        {\r\n                            var userName = inlineBot as IUserName;\r\n                            if (userName != null)\r\n                            {\r\n                                var userNameValue = userName.UserName.ToString();\r\n\r\n                                if (!string.IsNullOrEmpty(userNameValue)\r\n                                    && (string.IsNullOrEmpty(text) || userNameValue.StartsWith(text, StringComparison.OrdinalIgnoreCase)))\r\n                                {\r\n                                    cachedResult.Add(inlineBot);\r\n                                    resultIndex[inlineBot.Index] = inlineBot.Index;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                for (var i = 0; i < participants.Participants.Count; i++)\r\n                {\r\n                    var user = CacheService.GetUser(participants.Participants[i].UserId);\r\n                    if (!resultIndex.ContainsKey(user.Index))\r\n                    {\r\n                        var userName = user as IUserName;\r\n                        if (userName != null)\r\n                        {\r\n                            var userNameValue = userName.UserName.ToString();\r\n                            var firstNameValue = user.FirstName.ToString();\r\n                            var lastNameValue = user.LastName.ToString();\r\n\r\n                            if (string.IsNullOrEmpty(text) || userNameValue.StartsWith(text, StringComparison.OrdinalIgnoreCase) || firstNameValue.StartsWith(text, StringComparison.OrdinalIgnoreCase) || lastNameValue.StartsWith(text, StringComparison.OrdinalIgnoreCase))\r\n                            {\r\n                                cachedResult.Add(user);\r\n                                resultIndex[user.Index] = user.Index;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                _cachedUsernameResults[text] = cachedResult;\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private bool GetChannelUsernameHints(string text, TLChannel chat, out IList<TLUserBase> cachedResult)\r\n        {\r\n            cachedResult = new List<TLUserBase>();\r\n\r\n            if (chat.ChannelParticipants == null)\r\n            {\r\n                GetFullInfo();\r\n\r\n                return false;\r\n            }\r\n\r\n            var participants = chat.ChannelParticipants as TLChannelParticipants;\r\n            if (participants == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (!_cachedUsernameResults.TryGetValue(text, out cachedResult))\r\n            {\r\n                cachedResult = new List<TLUserBase>();\r\n                var resultIndex = new Dictionary<int, int>();\r\n                resultIndex[StateService.CurrentUserId] = StateService.CurrentUserId;\r\n\r\n                var inlineBots = GetInlineBots();\r\n                if (inlineBots != null)\r\n                {\r\n                    var maxInlineBotsCount = 5;\r\n                    for (var i = 0; i < inlineBots.Count; i++)\r\n                    {\r\n                        if (i == maxInlineBotsCount) break;\r\n\r\n                        var inlineBot = inlineBots[i];\r\n                        if (!resultIndex.ContainsKey(inlineBot.Index))\r\n                        {\r\n                            var userName = inlineBot as IUserName;\r\n                            if (userName != null)\r\n                            {\r\n                                var userNameValue = userName.UserName.ToString();\r\n\r\n                                if (!string.IsNullOrEmpty(userNameValue)\r\n                                    && (string.IsNullOrEmpty(text) || userNameValue.StartsWith(text, StringComparison.OrdinalIgnoreCase)))\r\n                                {\r\n                                    cachedResult.Add(inlineBot);\r\n                                    resultIndex[inlineBot.Index] = inlineBot.Index;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var usersCache = new Dictionary<int, TLUserBase>();\r\n                foreach (var user in participants.Users)\r\n                {\r\n                    usersCache[user.Index] = user;\r\n                }\r\n                for (var i = 0; i < participants.Participants.Count; i++)\r\n                {\r\n                    TLUserBase user;\r\n                    if (usersCache.TryGetValue(participants.Participants[i].UserId.Value, out user))\r\n                    {\r\n                        if (!resultIndex.ContainsKey(user.Index))\r\n                        {\r\n                            var userName = user as IUserName;\r\n                            if (userName != null)\r\n                            {\r\n                                var userNameValue = userName.UserName.ToString();\r\n                                var firstNameValue = user.FirstName.ToString();\r\n                                var lastNameValue = user.LastName.ToString();\r\n\r\n                                if (string.IsNullOrEmpty(text) || userNameValue.StartsWith(text, StringComparison.OrdinalIgnoreCase) || firstNameValue.StartsWith(text, StringComparison.OrdinalIgnoreCase) || lastNameValue.StartsWith(text, StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    cachedResult.Add(user);\r\n                                    resultIndex[user.Index] = user.Index;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                _cachedUsernameResults[text] = cachedResult;\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private static bool SearchByUsernames(string text, out string searchText)\r\n        {\r\n            var searchByUsernames = true;\r\n            var usernameIndex = -1;\r\n            searchText = string.Empty;\r\n            for (var i = text.Length - 1; i >= 0; i--)\r\n            {\r\n                if (text[i] == '@')\r\n                {\r\n                    if (i == 0\r\n                        || text[i - 1] == ' ')\r\n                    {\r\n                        usernameIndex = i;\r\n                    }\r\n                    else\r\n                    {\r\n                        searchByUsernames = false;\r\n                    }\r\n                    break;\r\n                }\r\n\r\n                if (!IsValidUsernameSymbol(text[i]))\r\n                {\r\n                    searchByUsernames = false;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (searchByUsernames)\r\n            {\r\n                if (usernameIndex == -1)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                searchText = text.Substring(usernameIndex).TrimStart('@');\r\n            }\r\n\r\n            return searchByUsernames;\r\n        } \r\n\r\n        public void ContinueUsernameHints()\r\n        {\r\n            if (!string.IsNullOrEmpty(Text))\r\n            {\r\n                string searchText;\r\n                var searchByUsernames = SearchByUsernames(Text, out searchText);\r\n\r\n                if (searchByUsernames)\r\n                {\r\n                    CreateUsernameHints();\r\n                            \r\n                    if (UsernameHints.Hints.Count == MaxResults)\r\n                    {\r\n                        IList<TLUserBase> cachedResult;\r\n                        if (_cachedUsernameResults.TryGetValue(searchText, out cachedResult))\r\n                        {\r\n                            var addInlineBots = AddInlineBots();\r\n\r\n                            var lastItem = UsernameHints.Hints.LastOrDefault();\r\n                            if (lastItem != null)\r\n                            {\r\n                                var lastIndex = cachedResult.IndexOf(lastItem);\r\n                                if (lastIndex >= 0)\r\n                                {\r\n                                    for (var i = lastIndex + 1; i < cachedResult.Count; i++)\r\n                                    {\r\n                                        if (!addInlineBots)\r\n                                        {\r\n                                            var bot = cachedResult[i] as TLUser;\r\n                                            if (bot != null && bot.IsInlineBot) continue;\r\n                                        }\r\n\r\n                                        UsernameHints.Hints.Add(cachedResult[i]);\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool AddInlineBots()\r\n        {\r\n            var addInlineBots = false;\r\n\r\n            if (_editedMessage != null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            var originalText = Text.Trim().TrimStart('@');\r\n            if (string.IsNullOrEmpty(originalText))\r\n            {\r\n                addInlineBots = true;\r\n            }\r\n\r\n            return addInlineBots;\r\n        }\r\n\r\n        public HashtagHintsViewModel HashtagHints { get; protected set; }\r\n\r\n        public void CreateHashtagHints()\r\n        {\r\n            if (HashtagHints == null)\r\n            {\r\n                HashtagHints = new HashtagHintsViewModel();\r\n                NotifyOfPropertyChange(() => HashtagHints);\r\n            }\r\n        }\r\n\r\n        public void ClearHashtagHints()\r\n        {\r\n            if (HashtagHints != null)\r\n            {\r\n                HashtagHints.Hints.Clear();\r\n            }\r\n        }\r\n\r\n        private static bool IsValidHashtagSymbol(char symbol)\r\n        {\r\n            if ((symbol >= 'a' && symbol <= 'z')\r\n                || (symbol >= 'A' && symbol <= 'Z')\r\n                || (symbol >= 'а' && symbol <= 'я')\r\n                || (symbol >= 'А' && symbol <= 'Я')\r\n                || (symbol >= '0' && symbol <= '9')\r\n                || symbol == '_')\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private readonly Dictionary<string, IList<TLHashtagItem>> _cachedHashtagResults = new Dictionary<string, IList<TLHashtagItem>>();\r\n\r\n        private void GetHashtagHints(string text)\r\n        {\r\n            if (text == null) return;\r\n            text = text.TrimStart('#');\r\n\r\n            ClearHashtagHints();\r\n\r\n            var hashtags = GetHashtagsFromFile();\r\n\r\n            IList<TLHashtagItem> cachedResult;\r\n            if (!_cachedHashtagResults.TryGetValue(text, out cachedResult))\r\n            {\r\n                cachedResult = new List<TLHashtagItem>();\r\n                for (var i = 0; i < hashtags.Count; i++)\r\n                {\r\n                    var hashtagItem = hashtags[i];\r\n                    if (hashtagItem != null)\r\n                    {\r\n                        var hashtag = hashtagItem.Hashtag;\r\n                        if (hashtag != null)\r\n                        {\r\n                            var hashtagValue = hashtag.ToString();\r\n\r\n                            if (!string.IsNullOrEmpty(hashtagValue)\r\n                                && (string.IsNullOrEmpty(text) || hashtagValue.StartsWith(text, StringComparison.OrdinalIgnoreCase)))\r\n                            {\r\n                                cachedResult.Add(hashtagItem);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                _cachedHashtagResults[text] = cachedResult;\r\n            }\r\n\r\n            if (cachedResult.Count > 0)\r\n            {\r\n                CreateHashtagHints();\r\n\r\n                for (var i = 0; i < cachedResult.Count; i++)\r\n                {\r\n                    if (i == MaxResults) break;\r\n                    HashtagHints.Hints.Add(cachedResult[i]);\r\n                }\r\n            }\r\n        }\r\n\r\n        private static TLVector<TLHashtagItem> _hashtagItems = new TLVector<TLHashtagItem>\r\n            {\r\n                new TLHashtagItem {Hashtag = new TLString(\"test\")},\r\n                new TLHashtagItem {Hashtag = new TLString(\"wp\")},\r\n                new TLHashtagItem {Hashtag = new TLString(\"telegram\")},\r\n                //new TLHashtagItem {Hashtag = new TLString(\"test4\")},\r\n                //new TLHashtagItem {Hashtag = new TLString(\"test5\")}\r\n            };\r\n\r\n        private static Dictionary<string, string> _hashtagItemsDict = new Dictionary<string, string>(); \r\n\r\n        private TLVector<TLHashtagItem> GetHashtagsFromFile()\r\n        {\r\n            var result = _hashtagItems;\r\n\r\n            foreach (var hashtagItem in _hashtagItems)\r\n            {\r\n                var hashtag = hashtagItem.Hashtag.ToString();\r\n                _hashtagItemsDict[hashtag] = hashtag;\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        private void AddHashtagsToFile(IList<TLHashtagItem> items)\r\n        {\r\n            bool clearCache = false;\r\n            foreach (var item in items)\r\n            {\r\n                var hashtag = item.Hashtag.ToString();\r\n                if (!_hashtagItemsDict.ContainsKey(hashtag))\r\n                {\r\n                    _hashtagItemsDict[hashtag] = hashtag;\r\n                    _hashtagItems.Insert(0, item);\r\n                    clearCache = true;\r\n                }\r\n            }\r\n\r\n            if (clearCache)\r\n            {\r\n                _cachedHashtagResults.Clear();\r\n            }\r\n        }\r\n\r\n        private void CheckHashcodes(string text)\r\n        {\r\n            var regexp = new Regex(\"(^|\\\\s)#[\\\\w@\\\\.]+\", RegexOptions.IgnoreCase);\r\n\r\n            var hashtags = new List<TLHashtagItem>();\r\n            foreach (var match in regexp.Matches(text))\r\n            {\r\n                hashtags.Add(new TLHashtagItem(match.ToString().Trim().TrimStart('#')));\r\n            }\r\n            regexp.Matches(text);\r\n\r\n            AddHashtagsToFile(hashtags);\r\n        }\r\n\r\n        private void ClearHashtagsFile()\r\n        {\r\n            _hashtagItems.Clear();\r\n        }\r\n\r\n        private static bool SearchByHashtags(string text, out string searchText)\r\n        {\r\n            var searchByHashtags = true;\r\n            var hashtagIndex = -1;\r\n            searchText = string.Empty;\r\n            for (var i = text.Length - 1; i >= 0; i--)\r\n            {\r\n                if (text[i] == '#')\r\n                {\r\n                    if (i == 0\r\n                        || text[i - 1] == ' ')\r\n                    {\r\n                        hashtagIndex = i;\r\n                    }\r\n                    else\r\n                    {\r\n                        searchByHashtags = false;\r\n                    }\r\n                    break;\r\n                }\r\n\r\n                if (!IsValidHashtagSymbol(text[i]))\r\n                {\r\n                    searchByHashtags = false;\r\n                    break;\r\n                }\r\n            }\r\n\r\n\r\n            if (searchByHashtags)\r\n            {\r\n                if (hashtagIndex == -1)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                searchText = text.Substring(hashtagIndex).TrimStart('#');\r\n            }\r\n\r\n            return searchByHashtags;\r\n        }\r\n\r\n        public void ContinueHashtagHints()\r\n        {\r\n            if (!string.IsNullOrEmpty(Text))\r\n            {\r\n                string searchText;\r\n                var searchByHashtags = SearchByHashtags(Text, out searchText);\r\n\r\n                if (searchByHashtags)\r\n                {\r\n                    CreateHashtagHints();\r\n\r\n                    if (HashtagHints.Hints.Count == MaxResults)\r\n                    {\r\n                        IList<TLHashtagItem> cachedResult;\r\n                        if (_cachedHashtagResults.TryGetValue(searchText, out cachedResult))\r\n                        {\r\n                            for (var i = MaxResults; i < cachedResult.Count; i++)\r\n                            {\r\n                                HashtagHints.Hints.Add(cachedResult[i]);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ClearHashtags()\r\n        {\r\n            var result = MessageBox.Show(\"Clear search history?\", AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (result == MessageBoxResult.OK)\r\n            {\r\n                _cachedHashtagResults.Clear();\r\n                ClearHashtagHints();\r\n                ClearHashtagsFile();\r\n            }\r\n        }\r\n\r\n        //private TLMessageBase _pinnedMessage;\r\n\r\n        //public TLMessageBase PinnedMessage\r\n        //{\r\n        //    get { return _pinnedMessage; }\r\n        //    set { SetField(ref _pinnedMessage, value, () => PinnedMessage); }\r\n        //}\r\n\r\n        private PinnedMessageViewModel _pinnedMessage;\r\n\r\n        public PinnedMessageViewModel PinnedMessage\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel PinnedMessage\");\r\n                return _pinnedMessage;\r\n            }\r\n            set { SetField(ref _pinnedMessage, value, () => PinnedMessage); }\r\n        }\r\n\r\n        public void PinMessage(TLMessageBase messageBase)\r\n        {\r\n            if (messageBase == null) return;\r\n            var channel = With as TLChannel;\r\n            if (channel == null) return;\r\n\r\n            if (PinnedMessage != null\r\n                && PinnedMessage.Message == messageBase)\r\n            {\r\n                if (channel.CanPinMessages)\r\n                {\r\n                    var result = channel.IsMegaGroup ? MessageBox.Show(AppResources.UnpinMessageConfirmation, AppResources.Confirm,  MessageBoxButton.OKCancel) : MessageBoxResult.OK;\r\n                    if (result == MessageBoxResult.OK)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.UpdatePinnedMessageAsync(false, channel.ToInputChannel(), new TLInt(0),\r\n                            result2 => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n\r\n                                if (PinnedMessage != null) PinnedMessage.Close();\r\n                            }),\r\n                            error => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                Execute.ShowDebugMessage(\"channels.updatePinnedMessage error \" + error);\r\n                            }));\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    var channel49 = channel as TLChannel49;\r\n                    if (channel49 != null)\r\n                    {\r\n                        channel49.HiddenPinnedMsgId = messageBase.Id;\r\n                    }\r\n                    if (PinnedMessage != null) PinnedMessage.Close();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (channel.IsMegaGroup)\r\n                {\r\n                    var textBlock = new TextBlock\r\n                    {\r\n                        IsHitTestVisible = false,\r\n                        Margin = new Thickness(-18.0, 0.0, 12.0, 0.0),\r\n                        Text = AppResources.NotifyAllMembers,\r\n                        VerticalAlignment = VerticalAlignment.Center\r\n                    };\r\n                    var notifyAllMembers = new CheckBox { IsChecked = true, IsHitTestVisible = false };\r\n                    notifyAllMembers.SetValue(Control.FontSizeProperty, DependencyProperty.UnsetValue);\r\n\r\n                    var panel = new StackPanel { Orientation = Orientation.Horizontal, Margin = new Thickness(0.0, -2.0, 0.0, -20.0), Background = new SolidColorBrush(Colors.Transparent) };\r\n                    panel.Tap += (sender, args) =>\r\n                    {\r\n                        notifyAllMembers.IsChecked = !notifyAllMembers.IsChecked;\r\n                    };\r\n                    panel.Children.Add(notifyAllMembers);\r\n                    panel.Children.Add(textBlock);\r\n\r\n                    ShellViewModel.ShowCustomMessageBox(AppResources.PinMessageConfirmation, AppResources.Confirm,\r\n                        AppResources.Ok.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                        dismissed =>\r\n                        {\r\n                            if (dismissed == CustomMessageBoxResult.RightButton)\r\n                            {\r\n                                UpdatePinnedMessage(notifyAllMembers.IsChecked.Value, messageBase, channel);\r\n                            }\r\n                        },\r\n                        panel);\r\n                }\r\n                else\r\n                {\r\n                    UpdatePinnedMessage(false, messageBase, channel);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UpdatePinnedMessage(bool notifyAllMembers, TLMessageBase messageBase, TLChannel channel)\r\n        {\r\n            IsWorking = true;\r\n            MTProtoService.UpdatePinnedMessageAsync(!notifyAllMembers, channel.ToInputChannel(), messageBase.Id,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var updates = result as TLUpdates;\r\n                    if (updates != null)\r\n                    {\r\n                        var newChannelMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewChannelMessage) as TLUpdateNewChannelMessage;\r\n                        if (newChannelMessage != null)\r\n                        {\r\n                            Handle(newChannelMessage.Message as TLMessageCommon);\r\n\r\n                            EventAggregator.Publish(new TopMessageUpdatedEventArgs(CurrentDialog, newChannelMessage.Message));\r\n                        }\r\n                    }\r\n\r\n                    PinnedMessage = new PinnedMessageViewModel(messageBase);\r\n                    PinnedMessage.OpenMessage += OnOpenMessage;\r\n                    PinnedMessage.UnpinMessage += OnUnpinMessage;\r\n                    PinnedMessage.Closed += OnClosePinnedMessage;\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"channels.updatePinnedMessage error \" + error);\r\n                }));\r\n        }\r\n\r\n        private void OnClosePinnedMessage(object sender, System.EventArgs e)\r\n        {\r\n            PinnedMessage = null;\r\n        }\r\n\r\n        private void OnUnpinMessage(object sender, System.EventArgs e)\r\n        {\r\n            PinMessage(PinnedMessage.Message);\r\n        }\r\n\r\n        private void OnOpenMessage(object sender, System.EventArgs e)\r\n        {\r\n            OpenMessage(Items.FirstOrDefault(), PinnedMessage.Message.Id);\r\n        }\r\n\r\n        private void ShowPinnedMessage(TLChannel49 channel)\r\n        {\r\n            if (channel == null) return;\r\n            if (channel.PinnedMsgId == null) return;\r\n            if (PinnedMessage != null\r\n                && PinnedMessage.Message != null\r\n                && PinnedMessage.Message.Id.Value == channel.PinnedMsgId.Value) return;\r\n            if (channel.HiddenPinnedMsgId != null\r\n                && channel.HiddenPinnedMsgId.Value == channel.PinnedMsgId.Value) return;\r\n\r\n            if (channel.PinnedMsgId.Value <= 0)\r\n            {\r\n                if (PinnedMessage != null) PinnedMessage.Close();\r\n            }\r\n            else\r\n            {\r\n                var messageBase = CacheService.GetMessage(channel.PinnedMsgId, channel.Id);\r\n                if (messageBase != null)\r\n                {\r\n                    var isClearHistoryMessage = IsClearHistoryMessage(messageBase);\r\n                    if (isClearHistoryMessage)\r\n                    {\r\n                        if (PinnedMessage != null) PinnedMessage.Close();\r\n\r\n                        return;\r\n                    }\r\n\r\n                    PinnedMessage = new PinnedMessageViewModel(messageBase);\r\n                    PinnedMessage.OpenMessage += OnOpenMessage;\r\n                    PinnedMessage.UnpinMessage += OnUnpinMessage;\r\n                    PinnedMessage.Closed += OnClosePinnedMessage;\r\n                }\r\n                else\r\n                {\r\n                    MTProtoService.GetMessagesAsync(channel.ToInputChannel(), new TLVector<TLInputMessageBase> { new TLInputMessageId { Id = channel.PinnedMsgId } },\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            messageBase = result.Messages.FirstOrDefault(x => x.Id.Value == channel.PinnedMsgId.Value);\r\n                            if (messageBase != null)\r\n                            {\r\n                                var isClearHistoryMessage = IsClearHistoryMessage(messageBase);\r\n                                if (isClearHistoryMessage)\r\n                                {\r\n                                    if (PinnedMessage != null) PinnedMessage.Close();\r\n\r\n                                    return;\r\n                                }\r\n\r\n                                PinnedMessage = new PinnedMessageViewModel(messageBase);\r\n                                PinnedMessage.OpenMessage += OnOpenMessage;\r\n                                PinnedMessage.UnpinMessage += OnUnpinMessage;\r\n                                PinnedMessage.Closed += OnClosePinnedMessage;\r\n                            }\r\n                        }),\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"channels.getMessages error \" + error);\r\n                        });\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool IsClearHistoryMessage(TLMessageBase messageBase)\r\n        {\r\n            var serviceMessage = messageBase as TLMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                var clearHistoryAction = serviceMessage.Action as TLMessageActionClearHistory;\r\n                if (clearHistoryAction != null)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Search.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Telegram.Api.TL;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        private DialogSearchMessagesViewModel _searchMessages;\r\n\r\n        public DialogSearchMessagesViewModel SearchMessages\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel SearchMessages\");\r\n                return _searchMessages;\r\n            }\r\n            protected set\r\n            {\r\n                _searchMessages = value;\r\n            }\r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            if (SearchMessages == null)\r\n            {\r\n                SearchMessages = new DialogSearchMessagesViewModel(With, Search, SearchUser, SearchUp, SearchDown, GetChatUsers);\r\n                NotifyOfPropertyChange(() => SearchMessages);\r\n            }\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                if (!SearchMessages.IsOpen)\r\n                {\r\n                    _currentResultIndex = default(int);\r\n                    _currentResults = null;\r\n\r\n                    SearchMessages.Open();\r\n                }\r\n                else\r\n                {\r\n                    SearchMessages.Close();\r\n                }\r\n            });\r\n        }\r\n\r\n        private IList<TLUserBase> GetChatUsers()\r\n        {\r\n            var chat = With as TLChat41;\r\n            if (chat != null)\r\n            {\r\n                var participants = chat.Participants as TLChatParticipants40;\r\n                if (participants != null)\r\n                {\r\n                    var result = new List<TLUserBase>();\r\n                    foreach (var participant in participants.Participants)\r\n                    {\r\n                        var user = CacheService.GetUser(participant.UserId);\r\n                        if (user != null)\r\n                        {\r\n                            result.Add(user);\r\n                        }\r\n                    }\r\n\r\n                    return result;\r\n                }\r\n            }\r\n\r\n            var channel = With as TLChannel68;\r\n            if (channel != null)\r\n            {\r\n                var participants = channel.ChannelParticipants as TLChannelParticipants;\r\n                if (participants != null)\r\n                {\r\n                    var result = new List<TLUserBase>();\r\n                    foreach (var participant in participants.Participants)\r\n                    {\r\n                        var user = CacheService.GetUser(participant.UserId);\r\n                        if (user != null)\r\n                        {\r\n                            result.Add(user);\r\n                        }\r\n                    }\r\n\r\n                    return result;\r\n                }\r\n            }\r\n\r\n            return new List<TLUserBase>();\r\n        }\r\n\r\n        private void SearchUser(string text)\r\n        {\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                var users = GetChatUsers();\r\n                SearchMessages.Hints.Clear();\r\n                foreach (var user in users)\r\n                {\r\n                    SearchMessages.Hints.Add(user);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var channel = With as TLChannel;\r\n            if (channel == null || !channel.IsMegaGroup) return;\r\n\r\n            if (SearchMessages.From != null) return;\r\n            var key = GetKey(text, SearchMessages.Date, SearchMessages.From);\r\n            //System.Diagnostics.Debug.WriteLine(\"key=\" + key);\r\n\r\n            BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            {\r\n                if (SearchMessages.From != null) return;\r\n                var currentKey = GetKey(SearchMessages.Text, SearchMessages.Date, SearchMessages.From);\r\n                //System.Diagnostics.Debug.WriteLine(\"current_key=\" + currentKey + \" key=\" + key);\r\n                if (!string.Equals(key, currentKey)) return;\r\n\r\n                System.Diagnostics.Debug.WriteLine(\"channel.getPartisipants q=\" + text);\r\n                MTProtoService.GetParticipantsAsync(\r\n                    channel.ToInputChannel(),\r\n                    new TLChannelParticipantsSearch{ Q = new TLString(text)}, \r\n                    new TLInt(0), \r\n                    new TLInt(50),\r\n                    new TLInt(0), \r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        var channelParticipants = result as TLChannelParticipants;\r\n                        if (channelParticipants != null)\r\n                        {\r\n                            currentKey = GetKey(SearchMessages.Text, SearchMessages.Date, SearchMessages.From);\r\n                            //System.Diagnostics.Debug.WriteLine(\"channel.getPartisipants q=\" + text + \" results=\" + result.Users.Count + \" current_key=\" + currentKey);\r\n                            if (!string.Equals(key, currentKey)) return;\r\n\r\n                            SearchMessages.Hints.Clear();\r\n                            foreach (var user in channelParticipants.Users)\r\n                            {\r\n                                SearchMessages.Hints.Add(user);\r\n                            }\r\n                        }\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        currentKey = GetKey(SearchMessages.Text, SearchMessages.Date, SearchMessages.From);\r\n                        //System.Diagnostics.Debug.WriteLine(\"channel.getPartisipants q=\" + text + \" error current_key=\" + currentKey);\r\n                        if (!string.Equals(key, currentKey)) return;\r\n\r\n                        SearchMessages.Hints.Clear();\r\n                    }));\r\n\r\n            });\r\n        }\r\n\r\n        private static readonly Dictionary<string, TLMessagesBase> _searchResults = new Dictionary<string, TLMessagesBase>();\r\n\r\n        private int _currentResultIndex;\r\n\r\n        private TLMessagesBase _currentResults;\r\n\r\n        private void Search(string text, DateTime? date, TLUserBase from)\r\n        {\r\n            if (IsEmptyKey(text, date, from))\r\n            {\r\n                SearchMessages.ResultLoaded(0, 0);\r\n                return;\r\n            }\r\n\r\n            var key = GetKey(text, date, from);\r\n\r\n            BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n            {\r\n                var currentKey = GetKey(SearchMessages.Text, SearchMessages.Date, SearchMessages.From);\r\n                if (!string.Equals(key, currentKey)) return;\r\n\r\n\r\n                TLMessagesBase cachedResults;\r\n                if (_searchResults.TryGetValue(key, out cachedResults))\r\n                {\r\n                    ContinueSearch(cachedResults);\r\n\r\n                    return;\r\n                }\r\n\r\n                SearchAsync(new TLString(text), date, from, new TLInt(0), new TLInt(Constants.SearchMessagesSliceLimit));\r\n            });\r\n        }\r\n\r\n        private void SearchAsync(TLString text, DateTime? date, TLUserBase from, TLInt maxId, TLInt limit)\r\n        {\r\n            var maxDate = date != null\r\n                ? TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, date.Value.AddDays(1).AddSeconds(-1))\r\n                : null;\r\n\r\n            if (TLString.IsNullOrEmpty(text) && date.HasValue)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.GetHistoryAsync(\r\n                    Stopwatch.StartNew(), \r\n                    Peer, \r\n                    TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId), \r\n                    false, maxDate ?? new TLInt(0), \r\n                    new TLInt(0), \r\n                    maxId, \r\n                    new TLInt(1), \r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        var messagesSlice = result as TLMessagesSlice;\r\n                        if (messagesSlice != null)\r\n                        {\r\n                            messagesSlice.Count = new TLInt(messagesSlice.Messages.Count);\r\n                        }\r\n\r\n                        IsWorking = false;\r\n\r\n                        ProcessMessages(result.Messages);\r\n\r\n                        var key = GetKey(text.ToString(), date, from);\r\n\r\n                        TLMessagesBase cachedResult;\r\n                        if (_searchResults.TryGetValue(key, out cachedResult))\r\n                        {\r\n                            var lastId = cachedResult.Messages.Last().Id;\r\n                            if (lastId.Value == maxId.Value)\r\n                            {\r\n                                var cachedUsersIndex = new Dictionary<int, int>();\r\n                                foreach (var cachedUser in cachedResult.Users)\r\n                                {\r\n                                    cachedUsersIndex[cachedUser.Index] = cachedUser.Index;\r\n                                }\r\n                                foreach (var user in result.Users)\r\n                                {\r\n                                    if (!cachedUsersIndex.ContainsKey(user.Index))\r\n                                    {\r\n                                        cachedResult.Users.Add(user);\r\n                                    }\r\n                                }\r\n                                var cachedChatsIndex = new Dictionary<int, int>();\r\n                                foreach (var cachedChat in cachedResult.Chats)\r\n                                {\r\n                                    cachedChatsIndex[cachedChat.Index] = cachedChat.Index;\r\n                                }\r\n                                foreach (var chat in result.Chats)\r\n                                {\r\n                                    if (!cachedChatsIndex.ContainsKey(chat.Index))\r\n                                    {\r\n                                        cachedResult.Chats.Add(chat);\r\n                                    }\r\n                                }\r\n                                foreach (var message in result.Messages)\r\n                                {\r\n                                    cachedResult.Messages.Add(message);\r\n                                }\r\n\r\n                                SearchMessages.ResultLoaded(_currentResultIndex, cachedResult.Messages.Count);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            _searchResults[key] = result;\r\n                            var currentKey = GetKey(SearchMessages.Text, SearchMessages.Date, SearchMessages.From); \r\n                            if (string.Equals(key, currentKey, StringComparison.Ordinal))\r\n                            {\r\n                                ContinueSearch(result);\r\n                            }\r\n                        }\r\n\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"messages.search error \" + error);\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.SearchAsync(\r\n                    Peer, \r\n                    text, \r\n                    from == null ? null : from.ToInputUser(),\r\n                    new TLInputMessagesFilterEmpty(), \r\n                    new TLInt(0), \r\n                    maxDate ?? new TLInt(0), \r\n                    new TLInt(0), \r\n                    maxId, \r\n                    limit,\r\n                    new TLInt(0),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        ProcessMessages(result.Messages);\r\n\r\n                        var key = GetKey(text.ToString(), date, from);\r\n\r\n                        TLMessagesBase cachedResult;\r\n                        if (_searchResults.TryGetValue(key, out cachedResult))\r\n                        {\r\n                            var lastId = cachedResult.Messages.Last().Id;\r\n                            if (lastId.Value == maxId.Value)\r\n                            {\r\n                                var cachedUsersIndex = new Dictionary<int, int>();\r\n                                foreach (var cachedUser in cachedResult.Users)\r\n                                {\r\n                                    cachedUsersIndex[cachedUser.Index] = cachedUser.Index;\r\n                                }\r\n                                foreach (var user in result.Users)\r\n                                {\r\n                                    if (!cachedUsersIndex.ContainsKey(user.Index))\r\n                                    {\r\n                                        cachedResult.Users.Add(user);\r\n                                    }\r\n                                }\r\n                                var cachedChatsIndex = new Dictionary<int, int>();\r\n                                foreach (var cachedChat in cachedResult.Chats)\r\n                                {\r\n                                    cachedChatsIndex[cachedChat.Index] = cachedChat.Index;\r\n                                }\r\n                                foreach (var chat in result.Chats)\r\n                                {\r\n                                    if (!cachedChatsIndex.ContainsKey(chat.Index))\r\n                                    {\r\n                                        cachedResult.Chats.Add(chat);\r\n                                    }\r\n                                }\r\n                                foreach (var message in result.Messages)\r\n                                {\r\n                                    cachedResult.Messages.Add(message);\r\n                                }\r\n\r\n                                SearchMessages.ResultLoaded(_currentResultIndex, cachedResult.Messages.Count);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            _searchResults[key] = result;\r\n                            var currentKey = GetKey(SearchMessages.Text, SearchMessages.Date, SearchMessages.From);\r\n                            if (string.Equals(key, currentKey, StringComparison.Ordinal))\r\n                            {\r\n                                ContinueSearch(result);\r\n                            }\r\n                        }\r\n\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"messages.search error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        private static bool IsEmptyKey(string text, DateTime? date, TLUserBase from)\r\n        {\r\n            return string.IsNullOrEmpty(text) && (date == null || date == DateTime.Now.Date) && from == null;\r\n        }\r\n\r\n        private static string GetKey(string text, DateTime? date, TLUserBase from)\r\n        {\r\n            return string.Format(\"{0}_{1}_{2}\", text, date == null || date == DateTime.Now.Date ? string.Empty : date.Value.ToString(), from != null ? from.Id.Value.ToString() : string.Empty);\r\n        }\r\n\r\n        private void ContinueSearch(TLMessagesBase result)\r\n        {\r\n            _currentResults = result;\r\n\r\n            if (result.Messages.Count > 0)\r\n            {\r\n                _currentResults = result;\r\n\r\n                LoadResult(0);\r\n            }\r\n            else\r\n            {\r\n                SearchMessages.ResultLoaded(0, 0);\r\n            }\r\n        }\r\n\r\n        private void LoadResult(int resultIndex)\r\n        {\r\n            TLUtils.WriteLine(string.Format(\"LoadResult index={0}\", resultIndex), LogSeverity.Error);\r\n\r\n            _currentResultIndex = resultIndex;\r\n            var message = _currentResults.Messages[_currentResultIndex];\r\n            var nextMessage = _currentResults.Messages.Count > _currentResultIndex + 1? _currentResults.Messages[_currentResultIndex + 1] : null;\r\n\r\n            Items.Clear();\r\n            Items.Add(message);\r\n            //HighlightMessage(message);\r\n            LoadResultHistory(message);\r\n            if (nextMessage != null)\r\n            {\r\n                PreloadResultHistory(nextMessage);\r\n            }\r\n\r\n            SliceLoaded = false;\r\n            _isFirstSliceLoaded = false;\r\n            _isLastMigratedHistorySliceLoaded = false;\r\n            IsLastSliceLoaded = false;\r\n\r\n            SearchMessages.ResultLoaded(resultIndex, _currentResults.Messages.Count);\r\n\r\n            if (resultIndex >= _currentResults.Messages.Count - 3)\r\n            {\r\n                var messagesSlice = _currentResults as TLMessagesSlice;\r\n                if (messagesSlice != null && messagesSlice.Count.Value > messagesSlice.Messages.Count)\r\n                {\r\n                    var maxId = messagesSlice.Messages.Last().Id;\r\n                    SearchAsync(new TLString(SearchMessages.Text), SearchMessages.Date, SearchMessages.From, maxId, new TLInt(Constants.SearchMessagesSliceLimit));\r\n                }\r\n                else\r\n                {\r\n                    var channel = With as TLChannel;\r\n                    if (channel != null && channel.MigratedFromChatId != null)\r\n                    {\r\n                        \r\n                    }\r\n                }\r\n            }\r\n\r\n            //if (ScrollToBottomVisibility == Visibility.Collapsed)\r\n            //{\r\n            //    Execute.BeginOnUIThread(() => ScrollToBottomVisibility = Visibility.Visible);\r\n            //}\r\n        }\r\n\r\n        private static readonly Dictionary<int, IList<TLMessageBase>> _resultHistoryCache = new Dictionary<int, IList<TLMessageBase>>(); \r\n\r\n        private void LoadResultHistory(TLMessageBase message)\r\n        {\r\n            var maxId = message.Id;\r\n            var offset = new TLInt(-10);\r\n            var limit = new TLInt(Constants.MessagesSlice + 10);\r\n\r\n            IList<TLMessageBase> resultHistory;\r\n            if (_resultHistoryCache.TryGetValue(maxId.Value, out resultHistory))\r\n            {\r\n                ContinueLoadResultHistory(limit, maxId, resultHistory);\r\n\r\n                return;\r\n            }\r\n\r\n            var messageCommon = message as TLMessageCommon;\r\n            if (messageCommon != null)\r\n            {\r\n                if (Peer is TLInputPeerChannel)\r\n                {\r\n                    if (messageCommon.ToId is TLPeerChat)\r\n                    {\r\n                        var chat = CacheService.GetChat(messageCommon.ToId.Id);\r\n                        if (chat != null)\r\n                        {\r\n                            MTProtoService.GetHistoryAsync(Stopwatch.StartNew(), chat.ToInputPeer(), new TLPeerChat { Id = chat.Id }, false, new TLInt(0), offset, maxId, limit,\r\n                                result =>\r\n                                {\r\n                                    ProcessMessages(result.Messages);\r\n\r\n                                    BeginOnUIThread(() =>\r\n                                    {\r\n                                        _resultHistoryCache[maxId.Value] = result.Messages;\r\n                                        if (_currentResults == null\r\n                                            || _currentResults.Messages[_currentResultIndex] == message)\r\n                                        {\r\n                                            ContinueLoadResultHistory(limit, maxId, result.Messages);\r\n                                        }\r\n                                    });\r\n                                },\r\n                                error => BeginOnUIThread(() =>\r\n                                {\r\n                                    Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                                }));\r\n                        }\r\n\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n\r\n            MTProtoService.GetHistoryAsync(Stopwatch.StartNew(), Peer, TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId), false, new TLInt(0), offset, maxId, limit,\r\n                result => \r\n                {\r\n                    ProcessMessages(result.Messages);\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        _resultHistoryCache[maxId.Value] = result.Messages;\r\n                        if (_currentResults == null\r\n                            || _currentResults.Messages[_currentResultIndex] == message)\r\n                        {\r\n                            ContinueLoadResultHistory(limit, maxId, result.Messages);\r\n                        }\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                }));\r\n        }\r\n\r\n        private bool _loadMessageHistory;\r\n\r\n        private TLInt _messageId;\r\n\r\n        private Tuple<TLInt, TLInt, TLMessagesBase> _messageIdSlice;\r\n\r\n        private void LoadResultHistory(TLInt messageId)\r\n        {\r\n            var maxId = messageId;\r\n            var offset = new TLInt(-10);\r\n            var limit = new TLInt(Constants.MessagesSlice + 10);\r\n\r\n            _loadMessageHistory = true;\r\n            MTProtoService.GetHistoryAsync(Stopwatch.StartNew(), Peer, TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId), false, new TLInt(0), offset, maxId, limit,\r\n                result =>\r\n                {\r\n                    ProcessMessages(result.Messages);\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        _loadMessageHistory = false;\r\n                        _resultHistoryCache[maxId.Value] = result.Messages;\r\n                        if (_currentResults == null)\r\n                        {\r\n                            if (_isForwardInAnimationComplete)\r\n                            {\r\n                                _isUpdated = true;\r\n                                _messageId = null;\r\n                                ContinueLoadResultHistory(limit, maxId, result.Messages);\r\n                            }\r\n                            else\r\n                            {\r\n                                _messageIdSlice = new Tuple<TLInt, TLInt, TLMessagesBase>(maxId, limit, result);\r\n                            }\r\n                        }\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _loadMessageHistory = false;\r\n\r\n                    Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                }));\r\n        }\r\n\r\n        private void PreloadResultHistory(TLMessageBase message)\r\n        {\r\n            var maxId = message.Id;\r\n            var offset = new TLInt(-10);\r\n            var limit = new TLInt(Constants.MessagesSlice + 10);\r\n\r\n            IList<TLMessageBase> resultHistory;\r\n            if (_resultHistoryCache.TryGetValue(maxId.Value, out resultHistory))\r\n            {\r\n                return;\r\n            }\r\n\r\n            var messageCommon = message as TLMessageCommon;\r\n            if (messageCommon != null)\r\n            {\r\n                if (Peer is TLInputPeerChannel)\r\n                {\r\n                    if (messageCommon.ToId is TLPeerChat)\r\n                    {\r\n                        var chat = CacheService.GetChat(messageCommon.ToId.Id);\r\n                        if (chat != null)\r\n                        {\r\n                            MTProtoService.GetHistoryAsync(Stopwatch.StartNew(), chat.ToInputPeer(), new TLPeerChat { Id = chat.Id }, false, new TLInt(0), offset, maxId, limit,\r\n                                result => \r\n                                {\r\n                                    ProcessMessages(result.Messages);\r\n                                    BeginOnUIThread(() =>\r\n                                    {\r\n                                        _resultHistoryCache[maxId.Value] = result.Messages;\r\n                                    });\r\n                                },\r\n                                error => BeginOnUIThread(() =>\r\n                                {\r\n                                    Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                                }));\r\n                        }\r\n\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n\r\n            MTProtoService.GetHistoryAsync(Stopwatch.StartNew(), Peer, TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId), false, new TLInt(0), offset, maxId, limit,\r\n                result =>\r\n                {\r\n                    ProcessMessages(result.Messages);\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        _resultHistoryCache[maxId.Value] = result.Messages;\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                }));\r\n        }\r\n\r\n        private void ContinueLoadResultHistory(TLInt limit, TLInt maxId, IList<TLMessageBase> resultMessages)\r\n        {\r\n            var upperSlice = new List<TLMessageBase>();\r\n            var bottomSlice = new List<TLMessageBase>();\r\n            for (var i = 0; i < resultMessages.Count; i++)\r\n            {\r\n                var resultMessage = resultMessages[i];\r\n\r\n                if (resultMessage.Index < maxId.Value)\r\n                {\r\n                    upperSlice.Add(resultMessage);\r\n                }\r\n                else if (resultMessage.Index == maxId.Value)\r\n                {\r\n                    if (Items.Count == 0)\r\n                    {\r\n                        upperSlice.Add(resultMessage);\r\n                    }\r\n                }\r\n                else if (resultMessage.Index > maxId.Value)\r\n                {\r\n                    bottomSlice.Add(resultMessage);\r\n                }\r\n            }\r\n\r\n            if (Items.Count <= 1)\r\n            {\r\n                var firstSliceCount = 10;\r\n                foreach (var upperMessage in upperSlice.Take(firstSliceCount))\r\n                {\r\n                    upperMessage._isAnimated = false;//isAnimated;\r\n                    if (!SkipMessage(upperMessage))\r\n                    {\r\n                        Items.Add(upperMessage);\r\n                    }\r\n                }\r\n                if (bottomSlice.Count > 0 || upperSlice.Count > firstSliceCount)\r\n                {\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        foreach (var upperMessage in upperSlice.Skip(firstSliceCount))\r\n                        {\r\n                            upperMessage._isAnimated = false;//isAnimated;\r\n                            if (!SkipMessage(upperMessage))\r\n                            {\r\n                                Items.Add(upperMessage);\r\n                            }\r\n                        }\r\n\r\n                        HoldScrollingPosition = true;\r\n                        for (var i = bottomSlice.Count; i > 0; i--)\r\n                        {\r\n                            var message = bottomSlice[i - 1];\r\n                            Items.Insert(0, message);\r\n                        }\r\n                        HoldScrollingPosition = false;\r\n                    });\r\n                }\r\n            }\r\n\r\n            if (limit.Value > upperSlice.Count + bottomSlice.Count)\r\n            {\r\n                AppendMigratedHistory(Items);\r\n            }\r\n        }\r\n\r\n        private void SearchUp()\r\n        {\r\n            if (_currentResults == null) return;\r\n            if (_currentResults.Messages.Count == _currentResultIndex + 1) return;\r\n\r\n            BeginOnUIThread(() => LoadResult(_currentResultIndex + 1));\r\n        }\r\n\r\n        private void SearchDown()\r\n        {\r\n            if (_currentResults == null) return;\r\n            if (_currentResultIndex <= 0) return;\r\n\r\n            BeginOnUIThread(() => LoadResult(_currentResultIndex - 1));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.Video.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Windows.Media;\r\nusing Windows.Storage.FileProperties;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\n#if WP81\r\nusing Windows.Foundation;\r\nusing Windows.Media.MediaProperties;\r\nusing Windows.Media.Transcoding;\r\nusing Windows.Storage.AccessCache;\r\n#endif\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Action = System.Action;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        public EditVideoViewModel VideoEditor { get; set; }\r\n\r\n        public void SendVideo(StorageFile file)\r\n        {\r\n            //threadpool\r\n            if (file == null) return;\r\n\r\n            if (VideoEditor == null)\r\n            {\r\n                VideoEditor = new EditVideoViewModel(ContinueSendVideo, GetUsernameHintsExternal, With);\r\n                VideoEditor.SetVideoFile(file);\r\n                NotifyOfPropertyChange(() => VideoEditor);\r\n            }\r\n            else\r\n            {\r\n                VideoEditor.SetVideoFile(file);\r\n\r\n                BeginOnUIThread(() => VideoEditor.OpenEditor());\r\n            }\r\n        }\r\n\r\n#if WP81\r\n\r\n        private static async void TranscodeFile(MediaEncodingProfile profile, TimeSpan trimStartTime, TimeSpan trimStopTime, StorageFile srcFile, StorageFile destFile, Action<StorageFile, ulong> callback, Action<double> progressCallback, Action<IAsyncActionWithProgress<double>> faultCallback)\r\n        {\r\n            profile = profile ?? await MediaEncodingProfile.CreateFromFileAsync(srcFile);\r\n\r\n            var transcoder = new MediaTranscoder\r\n            {\r\n                TrimStartTime = trimStartTime,\r\n                TrimStopTime = trimStopTime\r\n            };\r\n            var prepareOp = await transcoder.PrepareFileTranscodeAsync(srcFile, destFile, profile);\r\n            \r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"TranscodeFile\\nvideo=[{0}x{1} {2}]\\naudio=[{3}]\\ntrim_start={4} trim_end={5}\", profile.Video.Width, profile.Video.Height, profile.Video.Bitrate, profile.Audio != null ? profile.Audio.Bitrate : 0, trimStartTime, trimStopTime));\r\n\r\n            if (prepareOp.CanTranscode)\r\n            {\r\n                var transcodeOp = prepareOp.TranscodeAsync();\r\n                transcodeOp.Progress += (result, progress) =>\r\n                {\r\n                    progressCallback.SafeInvoke(progress);\r\n                };\r\n                transcodeOp.Completed += async (o, e) =>\r\n                {\r\n                    var properties = await destFile.GetBasicPropertiesAsync();\r\n                    var size = properties.Size;\r\n\r\n                    TranscodeComplete(o, e, () => callback(destFile, size), faultCallback);\r\n                };\r\n            }\r\n            else\r\n            {\r\n                faultCallback.SafeInvoke(null);\r\n\r\n                switch (prepareOp.FailureReason)\r\n                {\r\n                    case TranscodeFailureReason.CodecNotFound:\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.CodecWasNotFound, AppResources.Error, MessageBoxButton.OK));\r\n                        break;\r\n                    case TranscodeFailureReason.InvalidProfile:\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.ProfileIsInvalid, AppResources.Error, MessageBoxButton.OK));\r\n                        break;\r\n                    default:\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.UnknownFailure, AppResources.Error, MessageBoxButton.OK));\r\n                        break;\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void TranscodeComplete(IAsyncActionWithProgress<double> asyncInfo, AsyncStatus asyncStatus, Action callback, Action<IAsyncActionWithProgress<double>> faultCallback)\r\n        {\r\n            asyncInfo.GetResults();\r\n            if (asyncInfo.Status == AsyncStatus.Completed)\r\n            {\r\n                callback.SafeInvoke();\r\n            }\r\n            else if (asyncInfo.Status == AsyncStatus.Canceled)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"Transcode canceled result \" + asyncInfo.Status);\r\n                faultCallback.SafeInvoke(asyncInfo);\r\n            }\r\n            else\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"Transcode error result=\" + asyncInfo.Status + \" exception \\n\" + asyncInfo.ErrorCode);\r\n                faultCallback.SafeInvoke(asyncInfo);\r\n            }\r\n        }\r\n\r\n        private static async void GetCompressedFile(CompressingVideoFile file, Action<StorageFile, ulong> callback, Action<double> progressCallback, Action<IAsyncActionWithProgress<double>> faultCallback)\r\n        {\r\n            var fileName = Path.GetFileName(file.Source.Name);\r\n            var videoParameters = string.Empty;\r\n            if (file.EncodingProfile != null)\r\n            {\r\n                videoParameters = string.Format(\"{0}_{1}_{2}_{3}\", file.EncodingProfile.Video.Width, file.EncodingProfile.Video.Height, file.EncodingProfile.Video.Bitrate, file.EncodingProfile.Video.FrameRate);\r\n            }\r\n            var audioParameters = string.Empty;\r\n            if (file.EncodingProfile != null)\r\n            {\r\n                audioParameters = file.EncodingProfile.Audio != null ? file.EncodingProfile.Audio.Bitrate.ToString() : \"0\";\r\n            }\r\n\r\n            var hashString = string.Format(\"{0}_{1}_{2}_{3}\", audioParameters, videoParameters, file.TrimStartTime, file.TrimStopTime);\r\n\r\n            var transcodedFileName = string.Format(\"vid_{0}_{1}\", hashString.GetHashCode(), fileName);\r\n\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(transcodedFileName + Environment.NewLine + hashString);\r\n\r\n            var fulltranscodedFileName = Path.Combine(KnownFolders.CameraRoll.Path, transcodedFileName);\r\n            if (File.Exists(fulltranscodedFileName))\r\n            {\r\n                StorageFile transcodedFile = null;\r\n                ulong transcodedLength = 0;\r\n                try\r\n                {\r\n                    transcodedFile = await KnownFolders.CameraRoll.GetFileAsync(transcodedFileName);\r\n                    if (transcodedFile != null)\r\n                    {\r\n                        transcodedLength = (ulong) new FileInfo(fulltranscodedFileName).Length;\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"Get transcoded file ex: \\n\" + ex);    \r\n                }\r\n\r\n                if (transcodedFile != null && transcodedLength > 0)\r\n                {\r\n                    callback.SafeInvoke(transcodedFile, transcodedLength);\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var dest = await KnownFolders.CameraRoll.CreateFileAsync(transcodedFileName, CreationCollisionOption.ReplaceExisting);\r\n            TranscodeFile(file.EncodingProfile, file.TrimStartTime, file.TrimStopTime, file.Source, dest, callback, progressCallback, faultCallback);\r\n        } \r\n\r\n        public void ContinueSendVideo(CompressingVideoFile videoFile)\r\n        {\r\n            if (videoFile == null) return;\r\n\r\n            var file = videoFile.Source;\r\n            if (file == null) return;\r\n\r\n            if (!CheckDocumentSize(videoFile.Size))\r\n            {\r\n                MessageBox.Show(\r\n                    string.Format(AppResources.MaximumFileSizeExceeded, MediaSizeConverter.Convert((int)Telegram.Api.Constants.MaximumUploadedFileSize)),\r\n                    AppResources.Error,\r\n                    MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            // to get access to the file with StorageFile.GetFileFromPathAsync in future\r\n            AddFileToFutureAccessList(file);\r\n\r\n            var documentAttributeVideo = new TLDocumentAttributeVideo\r\n            {\r\n                Duration = new TLInt((int) videoFile.Duration),\r\n                W = new TLInt((int) videoFile.Width),\r\n                H = new TLInt((int) videoFile.Height)\r\n            };\r\n\r\n            var documentAttributeFileName = new TLDocumentAttributeFileName\r\n            {\r\n                FileName = new TLString(file.Name)\r\n            };\r\n\r\n            var document = new TLDocument54\r\n            {\r\n                Id = TLLong.Random(),\r\n                AccessHash = new TLLong(0),\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                MimeType = new TLString(file.ContentType),\r\n                Size = new TLInt((int) videoFile.Size),\r\n                Thumb = videoFile.ThumbPhoto ?? new TLPhotoSizeEmpty { Type = TLString.Empty },\r\n                DCId = new TLInt(0),\r\n                Version = new TLInt(0),\r\n                Attributes = new TLVector<TLDocumentAttributeBase> { documentAttributeFileName, documentAttributeVideo }\r\n            };\r\n\r\n            if (videoFile.EncodingProfile != null \r\n                && videoFile.EncodingProfile.Audio == null\r\n                && videoFile.Size < Telegram.Api.Constants.GifMaxSize\r\n                && TLString.Equals(document.MimeType, new TLString(\"video/mp4\"), StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                document.Attributes.Add(new TLDocumentAttributeAnimated());\r\n            }\r\n\r\n            var media = new TLMessageMediaDocument75 { Flags = new TLInt(0), Document = document, IsoFileName = file.Path, File = file, Caption = TLString.Empty };\r\n\r\n            var caption = string.IsNullOrEmpty(videoFile.Caption) ? TLString.Empty : new TLString(videoFile.Caption);\r\n            var message = GetMessage(caption, media);\r\n\r\n            if (videoFile.TimerSpan != null && videoFile.TimerSpan.Seconds > 0)\r\n            {\r\n                message.NotListened = true;\r\n                var ttlMessageMedia = message.Media as ITTLMessageMedia;\r\n                if (ttlMessageMedia != null)\r\n                {\r\n                    ttlMessageMedia.TTLSeconds = new TLInt(videoFile.TimerSpan.Seconds);\r\n                }\r\n            }\r\n\r\n            _mentions = videoFile.Mentions;\r\n            var processedText = string.Empty;\r\n            var entities = GetEntities(message.Message.ToString(), out processedText);\r\n            _mentions = null;\r\n\r\n            if (entities.Count > 0)\r\n            {\r\n                message.Message = new TLString(processedText);\r\n                message.Entities = new TLVector<TLMessageEntityBase>(entities);\r\n            }\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        m => SendVideoInternal(message, videoFile)));\r\n            });\r\n        }\r\n#endif\r\n\r\n        private void SendVideo(RecordedVideo recorderVideo)\r\n        {\r\n            if (recorderVideo == null) return;\r\n\r\n            long size = 0;\r\n            using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var file = storage.OpenFile(recorderVideo.FileName, FileMode.Open, FileAccess.Read))\r\n                {\r\n                    size = file.Length;\r\n                }\r\n            }\r\n\r\n            long photoSize = 0;\r\n            using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var file = storage.OpenFile(recorderVideo.FileName + \".jpg\", FileMode.Open, FileAccess.Read))\r\n                {\r\n                    photoSize = file.Length;\r\n                }\r\n            }\r\n\r\n            var volumeId = TLLong.Random();\r\n            var localId = TLInt.Random();\r\n            var secret = TLLong.Random();\r\n\r\n            var thumbLocation = new TLFileLocation //TODO: replace with TLFileLocationUnavailable\r\n            {\r\n                DCId = new TLInt(0),\r\n                VolumeId = volumeId,\r\n                LocalId = localId,\r\n                Secret = secret,\r\n            };\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                thumbLocation.VolumeId,\r\n                thumbLocation.LocalId,\r\n                thumbLocation.Secret);\r\n\r\n            // заменяем имя на стандартное для всех каритинок\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                store.CopyFile(recorderVideo.FileName + \".jpg\", fileName, true);\r\n                store.DeleteFile(recorderVideo.FileName + \".jpg\");\r\n            }\r\n\r\n            var thumbSize = new TLPhotoSize\r\n            {\r\n                W = new TLInt(640),\r\n                H = new TLInt(480),\r\n                Size = new TLInt((int) photoSize),\r\n                Type = new TLString(\"\"),\r\n                Location = thumbLocation,\r\n            };\r\n\r\n            var documentAttributeVideo = new TLDocumentAttributeVideo\r\n            {\r\n                Duration = new TLInt((int)recorderVideo.Duration),\r\n                W = new TLInt(640),\r\n                H = new TLInt(480)\r\n            };\r\n\r\n            var document = new TLDocument54\r\n            {\r\n                Id = new TLLong(0),\r\n                AccessHash = new TLLong(0),\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                MimeType = new TLString(\"video/mp4\"),\r\n                Size = new TLInt((int)size),\r\n                Thumb = thumbSize,\r\n                DCId = new TLInt(0),\r\n                Version = new TLInt(0),\r\n                Attributes = new TLVector<TLDocumentAttributeBase> { documentAttributeVideo }\r\n            };\r\n\r\n            var media = new TLMessageMediaDocument75\r\n            {\r\n                Flags = new TLInt(0),\r\n                FileId = recorderVideo.FileId ?? TLLong.Random(),\r\n                Document = document,\r\n                IsoFileName = recorderVideo.FileName,\r\n                Caption = TLString.Empty\r\n            };\r\n\r\n            var message = GetMessage(TLString.Empty, media);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                        message, previousMessage,\r\n                        m => SendVideoInternal(message, null)));\r\n            });\r\n        }\r\n\r\n#if WP81\r\n        private void SendCompressedVideoInternal(TLMessage message, StorageFile file)\r\n#else\r\n        private void SendCompressedVideoInternal(TLMessage message, object o)\r\n#endif\r\n        {\r\n            var documentMedia = message.Media as TLMessageMediaDocument45;\r\n            if (documentMedia != null)\r\n            {\r\n                var fileName = documentMedia.IsoFileName;\r\n                if (string.IsNullOrEmpty(fileName)) return;\r\n\r\n                var video = documentMedia.Document as TLDocument22;\r\n                if (video == null) return;\r\n\r\n\r\n                byte[] thumbBytes = null;\r\n                var photoThumb = video.Thumb as TLPhotoSize;\r\n                if (photoThumb != null)\r\n                {\r\n                    var location = photoThumb.Location as TLFileLocation;\r\n                    if (location == null) return;\r\n\r\n                    var thumbFileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.VolumeId,\r\n                        location.LocalId,\r\n                        location.Secret);\r\n\r\n                    using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        using (var thumbFile = storage.OpenFile(thumbFileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            thumbBytes = new byte[thumbFile.Length];\r\n                            thumbFile.Read(thumbBytes, 0, thumbBytes.Length);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var fileId = message.Media.FileId ?? TLLong.Random();\r\n                message.Media.FileId = fileId;\r\n                message.Media.UploadingProgress = 0.001;\r\n                //return;\r\n#if WP81\r\n                if (file != null)\r\n                {\r\n                    UploadVideoFileManager.UploadFile(fileId, message.IsGif(), message, file);\r\n                }\r\n                else if (!string.IsNullOrEmpty(fileName))\r\n                {\r\n                    UploadVideoFileManager.UploadFile(fileId, message, fileName);\r\n                }\r\n                else\r\n                {\r\n                    return;\r\n                }\r\n#else\r\n                UploadVideoFileManager.UploadFile(fileId, message, fileName);\r\n#endif\r\n\r\n                if (thumbBytes != null)\r\n                {\r\n                    var fileId2 = TLLong.Random();\r\n                    UploadFileManager.UploadFile(fileId2, message.Media, thumbBytes);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var videoMedia = message.Media as TLMessageMediaVideo;\r\n            if (videoMedia != null)\r\n            {\r\n                var fileName = videoMedia.IsoFileName;\r\n                if (string.IsNullOrEmpty(fileName)) return;\r\n\r\n                var video = videoMedia.Video as TLVideo;\r\n                if (video == null) return;\r\n\r\n\r\n                byte[] thumbBytes = null;\r\n                var photoThumb = video.Thumb as TLPhotoSize;\r\n                if (photoThumb != null)\r\n                {\r\n                    var location = photoThumb.Location as TLFileLocation;\r\n                    if (location == null) return;\r\n\r\n                    var thumbFileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.VolumeId,\r\n                        location.LocalId,\r\n                        location.Secret);\r\n\r\n                    using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        using (var thumbFile = storage.OpenFile(thumbFileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            thumbBytes = new byte[thumbFile.Length];\r\n                            thumbFile.Read(thumbBytes, 0, thumbBytes.Length);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var fileId = message.Media.FileId ?? TLLong.Random();\r\n                message.Media.FileId = fileId;\r\n                message.Media.UploadingProgress = 0.001;\r\n\r\n#if WP81\r\n                if (file != null)\r\n                {\r\n                    UploadVideoFileManager.UploadFile(fileId, message.IsGif(), message, file);\r\n                }\r\n                else if (!string.IsNullOrEmpty(fileName))\r\n                {\r\n                    UploadVideoFileManager.UploadFile(fileId, message, fileName);\r\n                }\r\n                else\r\n                {\r\n                    return;\r\n                }\r\n#else\r\n                UploadVideoFileManager.UploadFile(fileId, message, fileName);\r\n#endif\r\n\r\n                if (thumbBytes != null)\r\n                {\r\n                    var fileId2 = TLLong.Random();\r\n                    UploadFileManager.UploadFile(fileId2, message.Media, thumbBytes);\r\n                }\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n#if WP81\r\n        private void SendVideoInternal(TLMessage message, CompressingVideoFile file)\r\n        {\r\n            if (file.EncodingProfile != null\r\n                || file.TrimStartTime.Ticks > 0 \r\n                || file.TrimStopTime.Ticks > 0)\r\n            {\r\n                message.Status = MessageStatus.Compressing;\r\n                message.Media.UploadingProgress = 0.001;\r\n                message.Media.CompressingProgress = 0.0;\r\n\r\n                GetCompressedFile(\r\n                    file,\r\n                    async (compressedFile, compressedSize) =>\r\n                    {\r\n                        if (message.Status == MessageStatus.Failed)\r\n                        {\r\n                            return;\r\n                        }\r\n                        //var videoProperties = await file.Source.Properties.GetVideoPropertiesAsync();\r\n                        //var videoProperties2 = await compressedFile.Properties.GetVideoPropertiesAsync();\r\n\r\n                        message.Media.IsoFileName = compressedFile.Path;\r\n                        message.Media.File = compressedFile;\r\n                        message.Media.CompressingProgress = 0.0;\r\n                        message.Status = MessageStatus.Sending;\r\n                        var mediaDocument = message.Media as TLMessageMediaDocument45;\r\n                        if (mediaDocument != null)\r\n                        {\r\n                            var document = mediaDocument.Document as TLDocument;\r\n                            if (document != null)\r\n                            {\r\n                                if (file.EncodingProfile != null\r\n                                    && file.EncodingProfile.Audio == null\r\n                                    && compressedSize < Telegram.Api.Constants.GifMaxSize)\r\n                                {\r\n                                    // copy to local storage\r\n                                    var localFile = await compressedFile.CopyAsync(ApplicationData.Current.LocalFolder,\r\n                                        document.GetFileName(), NameCollisionOption.ReplaceExisting);\r\n                                    message.Media.IsoFileName = localFile.Path;\r\n                                    message.Media.File = localFile;\r\n                                }\r\n\r\n                                document.Size = new TLInt((int) compressedSize);\r\n                                SendCompressedVideoInternal(message, compressedFile);\r\n                            }\r\n                        }\r\n\r\n                        var mediaVideo = message.Media as TLMessageMediaVideo;\r\n                        if (mediaVideo != null)\r\n                        {\r\n                            var video = mediaVideo.Video as TLVideo;\r\n                            if (video != null)\r\n                            {\r\n                                video.Size = new TLInt((int) compressedSize);\r\n                                SendCompressedVideoInternal(message, compressedFile);\r\n                            }\r\n                        }\r\n                    },\r\n                    progress =>\r\n                    {\r\n                        message.Media.CompressingProgress = progress / 100.0;\r\n                    },\r\n                    error =>\r\n                    {\r\n                        message.Status = MessageStatus.Failed;\r\n                        message.Media.CompressingProgress = 0.0;\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                SendCompressedVideoInternal(message, file.Source);\r\n            }\r\n        }\r\n#else\r\n        private void SendVideoInternal(TLMessage message, object videoFile)\r\n        {\r\n            SendCompressedVideoInternal(message, videoFile);\r\n        }\r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogDetailsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.EmojiPanel;\r\nusing TelegramClient.Views;\r\nusing TelegramClient.Views.Dialogs;\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Microsoft.Xna.Framework.Media;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.Services.Location;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel : ItemsViewModelBase<TLMessageBase>\r\n    {\r\n        private IDialogDetailsView _view;\r\n\r\n        public IDialogDetailsView View\r\n        {\r\n            get\r\n            {\r\n                _view = _view ?? GetView() as IDialogDetailsView;\r\n\r\n                return _view;\r\n            }\r\n        }\r\n\r\n        public List<object> TestItems { get; set; }\r\n\r\n        public Visibility MuteButtonVisibility\r\n        {\r\n            get\r\n            {\r\n                var channel = With as TLChannel44;\r\n\r\n                return channel != null && channel.IsBroadcast && (channel.Creator || channel.IsEditor)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public string MuteButtonImageSource\r\n        {\r\n            get\r\n            {\r\n                var channel = With as TLChannel44;\r\n\r\n                return channel != null && channel.IsBroadcast && (channel.Creator || channel.IsEditor) && channel.Silent\r\n                    ? \"/Images/W10M/ic_unmutechannel_2x.png\"\r\n                    : \"/Images/W10M/ic_mutechannel_2x.png\";\r\n            }\r\n        }\r\n\r\n        public bool HasBots\r\n        {\r\n            get\r\n            {\r\n                var user = With as TLUser;\r\n                if (user != null && user.IsBot)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                var channel = With as TLChannel;\r\n                if (channel != null && channel.IsBroadcast)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var chat = With as TLChatBase;\r\n                if (chat != null && chat.BotInfo != null)\r\n                {\r\n                    return chat.BotInfo.Count > 0;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsSingleBot\r\n        {\r\n            get\r\n            {\r\n                var user = With as TLUser;\r\n                if (user != null && user.IsBot)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                var chat = With as TLChatBase;\r\n                if (chat != null && chat.BotInfo != null)\r\n                {\r\n                    var channel = chat as TLChannel;\r\n                    if (channel != null && channel.IsMegaGroup)\r\n                    {\r\n                        return false;\r\n                    }\r\n\r\n                    return chat.BotInfo.Count == 1;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsAppBarCommandVisible\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"  IsAppBarCommandVisible start\");\r\n\r\n                var chatBase = With as TLChatBase;\r\n                if (chatBase != null)\r\n                {\r\n                    var channel = With as TLChannel;\r\n                    if (channel != null)// && channel.IsBroadcast)\r\n                    {\r\n                        if (channel.IsMegaGroup)\r\n                        {\r\n                            if (channel.IsPublic && channel.Left.Value)\r\n                            {\r\n                                return true;\r\n                            }\r\n\r\n                            return false;\r\n                        }\r\n                        else\r\n                        {\r\n                            if (channel.Left.Value)\r\n                            {\r\n                                return true;\r\n                            }\r\n\r\n                            if (!channel.Creator && !channel.IsEditor && !channel.IsModerator)\r\n                            {\r\n                                return true;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (IsChannelForbidden)\r\n                    {\r\n                        return true;\r\n                    }\r\n\r\n                    if (IsChatForbidden)\r\n                    {\r\n                        return true;\r\n                    }\r\n\r\n                    if (IsChatDeactivated)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                var userBase = With as TLUserBase;\r\n                if (userBase != null)\r\n                {\r\n                    if (userBase.Blocked != null && userBase.Blocked.Value)\r\n                    {\r\n                        return true;\r\n                    }\r\n\r\n                    var user = With as TLUser;\r\n                    var bot = _bot as TLUser;\r\n                    if (user != null && bot != null && bot.IsBot && !string.IsNullOrEmpty(bot.AccessToken))\r\n                    {\r\n                        return true;\r\n                    }\r\n\r\n                    if (user != null && user.IsBot && Items.Count == 0 && LazyItems.Count == 0)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                var channels = With as TLVector<TLChatBase>;\r\n                if (channels != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                //System.Diagnostics.Debug.WriteLine(\"  IsAppBarCommandVisible stop elapsed=\" + ShellViewModel.Timer.Elapsed);\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public string AppBarCommandString\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel IsAppBarCommandString start\");\r\n                if (IsChannel)\r\n                {\r\n                    var channel = (TLChannel)With;\r\n\r\n                    if (channel.Left.Value && channel.IsPublic)\r\n                    {\r\n                        return AppResources.Join.ToUpperInvariant();\r\n                    }\r\n\r\n                    var notifySettings = channel.NotifySettings as TLPeerNotifySettings;\r\n                    if (notifySettings != null)\r\n                    {\r\n                        var muteUntil = notifySettings.MuteUntil != null ? notifySettings.MuteUntil.Value > 0 : !StateService.GetNotifySettings().GroupAlert;\r\n                        return muteUntil ? AppResources.Unmute.ToUpperInvariant() : AppResources.Mute.ToUpperInvariant();\r\n                    }\r\n\r\n                    return AppResources.Mute.ToUpperInvariant();\r\n                }\r\n\r\n                if (IsChannelForbidden)\r\n                {\r\n                    return AppResources.Delete.ToUpperInvariant();\r\n                }\r\n\r\n                if (IsChatForbidden)\r\n                {\r\n                    return AppResources.Delete.ToUpperInvariant();\r\n                }\r\n\r\n                if (IsChatDeactivated)\r\n                {\r\n                    return AppResources.Delete.ToUpperInvariant();\r\n                }\r\n\r\n                if (IsBotStarting)\r\n                {\r\n                    return AppResources.Start.ToUpperInvariant();\r\n                }\r\n\r\n                if (IsUserBlocked)\r\n                {\r\n                    if (IsBot)\r\n                    {\r\n                        return AppResources.Restart.ToUpperInvariant();\r\n                    }\r\n\r\n                    return AppResources.UnblockContact.ToUpperInvariant();\r\n                }\r\n\r\n                var channels = With as TLVector<TLChatBase>;\r\n                if (channels != null)\r\n                {\r\n                    return AppResources.ShowNext.ToUpperInvariant();\r\n                }\r\n\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel IsAppBarCommandString stop\");\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public bool IsGroupActionEnabled\r\n        {\r\n            get { return UngroupEnumerator(Items).Any(x => x.IsSelected); }\r\n        }\r\n\r\n        public string ScrollButtonImageSource\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel ScrollButtonImageSource\");\r\n\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    return \"/Images/ApplicationBar/appbar.next.light.png\";\r\n                }\r\n\r\n                return \"/Images/ApplicationBar/appbar.next.png\";\r\n            }\r\n        }\r\n\r\n        public Brush ReplyBackgroundBrush\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (!isLightTheme)\r\n                {\r\n                    if (StateService.IsEmptyBackground)\r\n                    {\r\n                        return (Brush)Application.Current.Resources[\"PhoneChromeBrush\"];\r\n                    }\r\n                }\r\n                var color = Colors.Black;\r\n                color.A = 102;\r\n                return new SolidColorBrush(color);\r\n            }\r\n        }\r\n\r\n        public Brush WatermarkForeground\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    if (StateService.IsEmptyBackground)\r\n                    {\r\n                        var color = Colors.Black;\r\n                        color.A = 153;\r\n                        return new SolidColorBrush(color);\r\n                    }\r\n                }\r\n\r\n                return (Brush)Application.Current.Resources[\"PhoneContrastForegroundBrush\"];\r\n            }\r\n        }\r\n\r\n        public TLFavedStickers FavedStickers { get; protected set; }\r\n\r\n        public TLAllStickers Stickers { get; protected set; }\r\n\r\n        public TLStickerPack GetStickerPack(string text)\r\n        {\r\n            if (string.IsNullOrEmpty(text)) return null;\r\n\r\n            if (Stickers == null) return null;\r\n            if (Stickers.Packs == null) return null;\r\n\r\n            for (var i = 0; i < Stickers.Packs.Count; i++)\r\n            {\r\n                if (Stickers.Packs[i].Emoticon != null\r\n                    && Stickers.Packs[i].Emoticon.ToString() == text)\r\n                {\r\n                    return Stickers.Packs[i];\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public TLStickerPack GetFeaturedStickerPack(string text)\r\n        {\r\n            if (string.IsNullOrEmpty(text)) return null;\r\n\r\n            var featuredStickers = StateService.GetFeaturedStickers();\r\n            if (featuredStickers == null) return null;\r\n            if (featuredStickers.Packs == null) return null;\r\n\r\n            for (var i = 0; i < featuredStickers.Packs.Count; i++)\r\n            {\r\n                if (featuredStickers.Packs[i].Emoticon != null\r\n                    && featuredStickers.Packs[i].Emoticon.ToString() == text)\r\n                {\r\n                    return featuredStickers.Packs[i];\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public string EmptyDialogImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                var user = With as TLUser;\r\n                if (user != null && user.IsSelf)\r\n                {\r\n                    if (isLightTheme)\r\n                    {\r\n                        return \"/Images/Messages/chat.cloudstorage-white-WXGA.png\";\r\n                    }\r\n\r\n                    return \"/Images/Messages/chat.cloudstorage-WXGA.png.png\";\r\n                }\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    return \"/Images/Messages/chat.nomessages-white-WXGA.png\";\r\n                }\r\n\r\n                return \"/Images/Messages/chat.nomessages-WXGA.png\";\r\n            }\r\n        }\r\n\r\n        private bool _isSelectionEnabled;\r\n\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return _isSelectionEnabled; }\r\n            set\r\n            {\r\n                SetField(ref _isSelectionEnabled, value, () => IsSelectionEnabled);\r\n\r\n                if (!value)\r\n                {\r\n                    foreach (var item in Items)\r\n                    {\r\n                        item.IsSelected = false;\r\n                        var message73 = item as TLMessage73;\r\n                        if (message73 != null)\r\n                        {\r\n                            var mediaGroup = message73.Media as TLMessageMediaGroup;\r\n                            if (mediaGroup != null)\r\n                            {\r\n                                foreach (var m in mediaGroup.Group)\r\n                                {\r\n                                    m.IsSelected = false;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ChangeSelection(TLMessageBase messageBase)\r\n        {\r\n            if (messageBase == null) return;\r\n\r\n            messageBase.IsSelected = !messageBase.IsSelected;\r\n\r\n            var message = messageBase as TLMessage73;\r\n            if (message != null && message.GroupedId != null)\r\n            {\r\n                var mediaGroup = message.Media as TLMessageMediaGroup;\r\n                if (mediaGroup != null)\r\n                {\r\n                    foreach (var m in mediaGroup.Group)\r\n                    {\r\n                        m.IsSelected = messageBase.IsSelected;\r\n                    }\r\n                }\r\n            }\r\n\r\n            NotifyOfPropertyChange(() => IsGroupActionEnabled);\r\n        }\r\n\r\n        private string _text = \"\";\r\n\r\n        public string Text\r\n        {\r\n            get\r\n            {\r\n                return _text;\r\n            }\r\n            set\r\n            {\r\n                if (_text != value)\r\n                {\r\n                    _text = value;\r\n                    NotifyOfPropertyChange(() => Text);\r\n                    //NotifyOfPropertyChange(() => CanSend);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SaveDraftAsync(TLInputPeerBase peer, TLDraftMessageBase draft)\r\n        {\r\n            CurrentDialog = CurrentDialog ?? CacheService.GetDialog(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId));\r\n\r\n            var dialog53 = CurrentDialog as TLDialog53;\r\n            if (dialog53 != null)\r\n            {\r\n                if (draft.DraftEquals(dialog53.Draft)) return;\r\n            }\r\n\r\n            MTProtoService.SaveDraftAsync(peer, draft,\r\n                result =>\r\n                {\r\n                    if (dialog53 != null)\r\n                    {\r\n                        dialog53.Draft = draft;\r\n\r\n                        EventAggregator.Publish(new TLUpdateDraftMessage { Peer = dialog53.Peer, Draft = dialog53.Draft });\r\n                    }\r\n\r\n                    Execute.ShowDebugMessage(string.Format(\"messages.saveDraft {0} result={1}\", draft, result));\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.saveDraft error \" + error);\r\n                });\r\n        }\r\n\r\n        private void GetDraftAsync(Action<TLDraftMessageBase> callback)\r\n        {\r\n            CurrentDialog = CurrentDialog ?? CacheService.GetDialog(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId));\r\n\r\n            TLDraftMessageBase draft = null;\r\n            var dialog53 = CurrentDialog as TLDialog53;\r\n            if (dialog53 != null)\r\n            {\r\n                draft = dialog53.Draft;\r\n            }\r\n\r\n            callback.SafeInvoke(draft);\r\n        }\r\n\r\n        private readonly object _unsendedTextRoot = new object();\r\n\r\n        private void SaveUnsendedTextAsync(string text)\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var inputPeer = With as IInputPeer;\r\n                if (inputPeer == null) return;\r\n\r\n                if (IsEditingEnabled) return;\r\n\r\n                text = text ?? string.Empty;\r\n\r\n                var noWebpage = false;\r\n                TLMessageCommon reply = null;\r\n                var messageCommon = Reply as TLMessageCommon;\r\n                if (messageCommon != null)\r\n                {\r\n                    reply = messageCommon;\r\n                }\r\n\r\n                var messagesContainer = Reply as TLMessagesContainter;\r\n                if (messagesContainer != null && messagesContainer.WebPageMedia != null)\r\n                {\r\n                    messageCommon = _previousReply as TLMessageCommon;\r\n                    if (messageCommon != null)\r\n                    {\r\n                        reply = messageCommon;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    if (_webPagesCache.ContainsKey(text.Trim()))\r\n                    {\r\n                        noWebpage = true;\r\n                    }\r\n                }\r\n\r\n                string processedText;\r\n                var entities = GetEntities(text, out processedText);\r\n\r\n                TLDraftMessageBase draft = new TLDraftMessage\r\n                {\r\n                    Flags = new TLInt(0),\r\n                    NoWebpage = noWebpage,\r\n                    ReplyToMsgId = reply != null ? reply.Id : null,\r\n                    Message = new TLString(processedText),\r\n                    Entities = entities != null && entities.Count > 0 ? new TLVector<TLMessageEntityBase>(entities) : null,\r\n                    Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now)\r\n                };\r\n                if (draft.IsEmpty())\r\n                {\r\n                    draft = new TLDraftMessageEmpty82\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now)\r\n                    };\r\n                }\r\n\r\n                SaveDraftAsync(inputPeer.ToInputPeer(), draft);\r\n\r\n                FileUtils.Delete(_unsendedTextRoot, inputPeer.GetUnsendedTextFileName());\r\n\r\n                //TLUtils.SaveObjectToMTProtoFile(_unsendedTextRoot, inputPeer.GetUnsendedTextFileName(), new TLString(text));\r\n            });\r\n        }\r\n\r\n        private void LoadUnsendedTextAsync(Action<TLDraftMessageBase> callback)\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var inputPeer = With as IInputPeer;\r\n                if (inputPeer == null) return;\r\n\r\n                GetDraftAsync(draftBase =>\r\n                {\r\n                    callback.SafeInvoke(draftBase);\r\n                });\r\n            });\r\n        }\r\n\r\n        private bool _isEmptyDialog;\r\n\r\n        public bool IsEmptyDialog\r\n        {\r\n            get { return _isEmptyDialog; }\r\n            set\r\n            {\r\n                SetField(ref _isEmptyDialog, value, () => IsEmptyDialog);\r\n            }\r\n        }\r\n\r\n        private Typing _typing;\r\n\r\n        public Typing Typing\r\n        {\r\n            get { return _typing; }\r\n            set { SetField(ref _typing, value, () => Typing); }\r\n        }\r\n\r\n        private string _subtitle;\r\n\r\n        public string Subtitle\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel Subtitle\");\r\n                return _subtitle;\r\n            }\r\n            set { SetField(ref _subtitle, value, () => Subtitle); }\r\n        }\r\n\r\n        private TLInputPeerBase _peer;\r\n\r\n        public TLInputPeerBase Peer\r\n        {\r\n            get { return _peer; }\r\n            set { SetField(ref _peer, value, () => Peer); }\r\n        }\r\n\r\n        public TLObject With { get; set; }\r\n\r\n        private IUploadFileManager _uploadFileManager;\r\n\r\n        private IUploadFileManager UploadFileManager\r\n        {\r\n            get { return _uploadFileManager ?? (_uploadFileManager = IoC.Get<IUploadFileManager>()); }\r\n        }\r\n\r\n        private IUploadDocumentFileManager _uploadDocumentFileManager;\r\n\r\n        private IUploadDocumentFileManager UploadDocumentFileManager\r\n        {\r\n            get { return _uploadDocumentFileManager ?? (_uploadDocumentFileManager = IoC.Get<IUploadDocumentFileManager>()); }\r\n        }\r\n\r\n        private IUploadVideoFileManager _uploadVideoFileManager;\r\n\r\n        public IUploadVideoFileManager UploadVideoFileManager\r\n        {\r\n            get { return _uploadVideoFileManager ?? (_uploadVideoFileManager = IoC.Get<IUploadVideoFileManager>()); }\r\n        }\r\n\r\n        private IUploadAudioFileManager _uploadAudioFileManager;\r\n\r\n        public IUploadAudioFileManager UploadAudioFileManager\r\n        {\r\n            get { return _uploadAudioFileManager ?? (_uploadAudioFileManager = IoC.Get<IUploadAudioFileManager>()); }\r\n        }\r\n\r\n        private IFileManager _downloadFileManager;\r\n\r\n        public IFileManager DownloadFileManager\r\n        {\r\n            get { return _downloadFileManager ?? (_downloadFileManager = IoC.Get<IFileManager>()); }\r\n        }\r\n\r\n        private IVideoFileManager _downloadVideoFileManager;\r\n\r\n        private IVideoFileManager DownloadVideoFileManager\r\n        {\r\n            get { return _downloadVideoFileManager ?? (_downloadVideoFileManager = IoC.Get<IVideoFileManager>()); }\r\n        }\r\n\r\n        private IAudioFileManager _downloadAudioFileManager;\r\n\r\n        private IAudioFileManager DownloadAudioFileManager\r\n        {\r\n            get { return _downloadAudioFileManager ?? (_downloadAudioFileManager = IoC.Get<IAudioFileManager>()); }\r\n        }\r\n\r\n        private IDocumentFileManager _downloadDocumentFileManager;\r\n\r\n        private IDocumentFileManager DownloadDocumentFileManager\r\n        {\r\n            get { return _downloadDocumentFileManager ?? (_downloadDocumentFileManager = IoC.Get<IDocumentFileManager>()); }\r\n        }\r\n\r\n        public void BackwardInAnimationComplete()\r\n        {\r\n            if (StateService.UpdateSubtitle)\r\n            {\r\n                StateService.UpdateSubtitle = false;\r\n                Subtitle = GetSubtitle();\r\n            }\r\n\r\n            if (StateService.ShowScrollDownButton)\r\n            {\r\n                StateService.ShowScrollDownButton = false;\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    View.ShowScrollToBottomButton();\r\n                });\r\n            }\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                InputTypingManager.Start();\r\n\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    NotifyOfPropertyChange(() => With);\r\n                    if (StateService.RemoveBackEntry)\r\n                    {\r\n                        StateService.RemoveBackEntry = false;\r\n                        NavigationService.RemoveBackEntry();\r\n                    }\r\n                });\r\n\r\n\r\n                SendMedia();\r\n                ReadHistoryAsync();\r\n            });\r\n        }\r\n\r\n        private bool _isForwardInAnimationComplete;\r\n\r\n        private bool _updateItemsAndReadHistory;\r\n\r\n        public void OnLoaded()\r\n        {\r\n\r\n        }\r\n\r\n        private bool _loadResultHistory;\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            //var shellViewModel = IoC.Get<ShellViewModel>();\r\n            //if (shellViewModel != null)\r\n            //{\r\n            //    var shellView = shellViewModel.GetView() as ShellView;\r\n            //    if (shellView != null)\r\n            //    {\r\n            //        shellView.NextUri = new Uri(\"DialogDetailsView.xaml\", UriKind.Relative);\r\n            //    }\r\n            //}\r\n\r\n            //System.Diagnostics.Debug.WriteLine(\"ForwardInAnimationComplete\");\r\n            if (_loadResultHistory)\r\n            {\r\n                _loadResultHistory = false;\r\n\r\n                if (Items.Count == 1)\r\n                {\r\n                    LoadResultHistory(Items[0]);\r\n                    ReadHistoryAsync();\r\n                }\r\n            }\r\n\r\n            if (_messageIdSlice != null)\r\n            {\r\n                var messageSlice = _messageIdSlice;\r\n\r\n                _messageIdSlice = null;\r\n                _isUpdated = true;\r\n                _messageId = null;\r\n                ContinueLoadResultHistory(messageSlice.Item2, messageSlice.Item1, messageSlice.Item3.Messages);\r\n            }\r\n\r\n            _isForwardInAnimationComplete = true;\r\n            System.Diagnostics.Debug.WriteLine(\"FwdInAnimationComplete _messages=\" + (_messages == null ? \"null\" : _messages.Count.ToString()));\r\n            AddMessagesWithCache(_messages);\r\n\r\n            if (_isFirstSliceLoaded)\r\n            {\r\n                if (LazyItems.Count == 0)\r\n                {\r\n                    UpdateReplyMarkup(Items);\r\n                }\r\n            }\r\n\r\n            StartSwitchPMBotWithParam();\r\n            SendForwardMessages();\r\n            SendSharedContact();\r\n            try\r\n            {\r\n                SendLogs();\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n\r\n            if (_delayedMessages != null)\r\n            {\r\n                AddMessagesAndReadHistory(_delayedPosition, _delayedMessages);\r\n                _delayedMessages = null;\r\n            }\r\n            _delayedPosition = -1;\r\n\r\n            if (ChooseAttachment == null)\r\n            {\r\n                ChooseAttachment = new ChooseAttachmentViewModel(With, OpenInlineBot, SendDocument, SendVideo, SendPhoto, SendLocation, OpenContact, CacheService, EventAggregator, NavigationService, StateService);\r\n                NotifyOfPropertyChange(() => ChooseAttachment);\r\n            }\r\n\r\n            var channel = With as TLChannel49;\r\n            if (channel != null && channel.PinnedMsgId != null && channel.PinnedMsgId.Value > 0)\r\n            {\r\n                ShowPinnedMessage(channel);\r\n            }\r\n\r\n            ShowPromoNotification();\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            if (StateService.RemoveBackEntries)\r\n            {\r\n                var backEntry = NavigationService.BackStack.FirstOrDefault();\r\n                while (backEntry != null\r\n                    && !backEntry.Source.ToString().EndsWith(\"ShellView.xaml\")\r\n                    && !IsFirstEntryFromPeopleHub(backEntry, NavigationService.BackStack)\r\n                    && !IsFirstEntryFromTelegramUrl(backEntry, NavigationService.BackStack))\r\n                {\r\n                    NavigationService.RemoveBackEntry();\r\n                    backEntry = NavigationService.BackStack.FirstOrDefault();\r\n                }\r\n\r\n\r\n                StateService.RemoveBackEntries = false;\r\n            }\r\n\r\n            if (_updateItemsAndReadHistory)\r\n            {\r\n                _updateItemsAndReadHistory = false;\r\n\r\n                //((BindableCollection<TLMessageBase>)Items).AddRange(_secondSlice);\r\n\r\n                if (_isFirstSliceLoaded)\r\n                {\r\n                    UpdateReplyMarkup(Items);\r\n                }\r\n                //BeginOnUIThread(TimeSpan.FromSeconds(2.0), () =>\r\n                //{\r\n                UpdateItemsAsync(0, 0, Constants.MessagesSlice, false);\r\n                ReadHistoryAsync();\r\n                //});\r\n            }\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                InputTypingManager.Start();\r\n\r\n                //ReadHistoryAsync(); Read on LazyItems Population complete\r\n                GetFullInfo();\r\n            });\r\n        }\r\n\r\n        private void ShowPromoNotification()\r\n        {\r\n            var dialog71 = CurrentDialog as TLDialog71;\r\n            if (dialog71 != null && dialog71.IsPromo && !dialog71.PromoNotification)\r\n            {\r\n                dialog71.PromoNotification = true;\r\n                ShellViewModel.ShowCustomMessageBox(\r\n                    AppResources.ProxySponsorAbout,\r\n                    AppResources.AppName,\r\n                    AppResources.Ok, null,\r\n                    dismissed =>\r\n                    {\r\n\r\n                    });\r\n            }\r\n        }\r\n\r\n        private void AddMessagesAndReadHistory(int startPosition, TLVector<TLMessageBase> cachedMessages)\r\n        {\r\n            //if (startPosition > 1)\r\n            //{\r\n            //    ScrollToBottomVisibility = Visibility.Visible;\r\n            //}\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                for (var i = startPosition; i < cachedMessages.Count; i++)\r\n                {\r\n                    var message = cachedMessages[i];\r\n                    Items.Add(message);\r\n                }\r\n\r\n                HoldScrollingPosition = true;\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    for (var i = 0; i < startPosition - 1; i++)\r\n                    {\r\n                        Items.Insert(i, cachedMessages[i]);\r\n                    }\r\n                    HoldScrollingPosition = false;\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        SuppressHideScrollToBottom = false;\r\n                    });\r\n                });\r\n\r\n            });\r\n\r\n            ReadHistoryAsync();\r\n        }\r\n\r\n        public static bool IsFirstEntryFromTelegramUrl(JournalEntry backEntry, IEnumerable<JournalEntry> backStack)\r\n        {\r\n            if (backEntry.Source.ToString().StartsWith(\"/Protocol?encodedLaunchUri\"))\r\n            {\r\n                if (backStack != null && backStack.Count() == 1)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool IsFirstEntryFromPeopleHub(JournalEntry backEntry, IEnumerable<JournalEntry> backStack)\r\n        {\r\n            if (backEntry.Source.ToString().StartsWith(\"/PeopleExtension?action\"))\r\n            {\r\n                if (backStack != null && backStack.Count() == 1)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void SendSharedContact()\r\n        {\r\n            if (StateService.SharedContact != null)\r\n            {\r\n                var contact = StateService.SharedContact;\r\n                StateService.SharedContact = null;\r\n                SendContact(contact);\r\n                return;\r\n            }\r\n\r\n            if (StateService.SharedContactMedia != null)\r\n            {\r\n                var contactMedia = StateService.SharedContactMedia;\r\n                StateService.SharedContactMedia = null;\r\n                ContinueSendContact(contactMedia);\r\n                return;\r\n            }\r\n        }\r\n\r\n        public TLDialogBase CurrentDialog;\r\n\r\n        private ImageViewerViewModel _imageViewer;\r\n\r\n        public ImageViewerViewModel ImageViewer\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel ImageViewer\");\r\n                return _imageViewer;\r\n            }\r\n            protected set { _imageViewer = value; }\r\n        }\r\n\r\n        public AnimatedImageViewerViewModel _animatedImageViewer;\r\n\r\n        public AnimatedImageViewerViewModel AnimatedImageViewer\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel AnimatedImageViewer\");\r\n                return _animatedImageViewer;\r\n            }\r\n            protected set { _animatedImageViewer = value; }\r\n        }\r\n\r\n        public ChooseAttachmentViewModel _chooseAttachment;\r\n\r\n        public ChooseAttachmentViewModel ChooseAttachment\r\n        {\r\n            get\r\n            {\r\n                ShellViewModel.WriteTimer(\"DialogDetailsViewModel ChooseAttachment\");\r\n                return _chooseAttachment;\r\n            }\r\n            protected set { _chooseAttachment = value; }\r\n        }\r\n\r\n        public bool IsChooseAttachmentOpen { get { return ChooseAttachment != null && ChooseAttachment.IsOpen; } }\r\n\r\n        public void NavigateToShellViewModel()\r\n        {\r\n            ShellViewModel.Navigate(NavigationService);\r\n        }\r\n\r\n        private readonly TLUserBase _bot;\r\n\r\n        private readonly int _post;\r\n\r\n        public ICollectionView FilteredItems { get; set; }\r\n\r\n        private IUploadService _uploadService;\r\n\r\n        public bool SuppressHideScrollToBottom { get; set; }\r\n\r\n        public DialogDetailsViewModel(IUploadService uploadService,\r\n            ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n\r\n            ShellViewModel.WriteTimer(\"DialogDetailsViewModel start ctor\");\r\n\r\n            _uploadService = uploadService;\r\n\r\n            TestItems = new List<object>();\r\n            _channelScheduler = new Timer(OnChannelSchedulerTick, this, Timeout.Infinite, Timeout.Infinite);\r\n\r\n            //Items = new ObservableCollection<TLMessageBase>();\r\n            //Items.CollectionChanged += (o, e) =>\r\n            //{\r\n            //System.Diagnostics.Debug.WriteLine(\"action={0} newItems={1} oldItems={2}\", e.Action, e.NewItems, e.OldItems);\r\n            //};\r\n            //FilteredItems = new CollectionViewSource {Source = Items}.View;\r\n            //FilteredItems.Filter += (item) =>\r\n            //{\r\n            //    var serviceMessage = item as TLMessageService;\r\n            //    return serviceMessage == null || !(serviceMessage.Action is TLMessageActionClearHistory);\r\n            //};\r\n\r\n            With = GetParticipant();\r\n            StateService.With = null;\r\n            if (With == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (StateService.Url != null)\r\n            {\r\n                With.ClearBitmap();\r\n            }\r\n\r\n            if (StateService.Dialog != null)\r\n            {\r\n                CurrentDialog = StateService.Dialog;\r\n                StateService.Dialog = null;\r\n            }\r\n\r\n            var dialog71 = CurrentDialog as TLDialog71;\r\n            if (dialog71 != null)\r\n            {\r\n                _mentionsCounter = dialog71.UnreadMentionsCount.Value;\r\n\r\n                var liveLocationService = IoC.Get<ILiveLocationService>();\r\n                var message = liveLocationService.Get(dialog71.Peer, mtProtoService.CurrentUserId);\r\n\r\n                if (message != null)\r\n                {\r\n                    LiveLocationBadge = new LiveLocationBadgeViewModel(IoC.Get<ILiveLocationService>(), IoC.Get<ICacheService>(), false) { Message = message };\r\n                    LiveLocationBadge.OpenMessage += OpenLiveLocationBadge;\r\n                    LiveLocationBadge.Closed += CloseLiveLocationBadge;\r\n                }\r\n            }\r\n\r\n            var post = StateService.Post;\r\n            StateService.Post = null;\r\n            Int32.TryParse(post, out _post);\r\n\r\n            if (StateService.MessageId != null)\r\n            {\r\n                With.ClearBitmap();\r\n                _messageId = StateService.MessageId;\r\n                StateService.MessageId = null;\r\n            }\r\n\r\n            var accessToken = StateService.AccessToken;\r\n            StateService.AccessToken = null;\r\n            if (StateService.Bot != null)\r\n            {\r\n                _bot = StateService.Bot;\r\n                _bot.AccessToken = accessToken;\r\n                StateService.Bot = null;\r\n\r\n                var chat = With as TLChat;\r\n                if (chat != null)\r\n                {\r\n                    MTProtoService.AddChatUserAsync(chat.Id, _bot.ToInputUser(), new TLInt(0),\r\n                        statedMessage =>\r\n                        {\r\n                            var updates = statedMessage as TLUpdates;\r\n                            if (updates != null)\r\n                            {\r\n                                var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                                if (updateNewMessage != null)\r\n                                {\r\n                                    Handle(updateNewMessage.Message as TLMessageCommon);\r\n                                }\r\n\r\n                                if (!string.IsNullOrEmpty(accessToken))\r\n                                {\r\n                                    Execute.BeginOnUIThread(AppBarCommand);\r\n                                }\r\n                            }\r\n                        },\r\n                        error => BeginOnUIThread(() =>\r\n                        {\r\n                            if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                            {\r\n                                //MessageBox.Show(AppResources.PeerFloodAddContact, AppResources.Error, MessageBoxButton.OK);\r\n                                ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodAddContact, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                                    result =>\r\n                                    {\r\n                                        if (result == CustomMessageBoxResult.RightButton)\r\n                                        {\r\n                                            TelegramViewBase.NavigateToUsername(MTProtoService, Constants.SpambotUsername, null, null, null);\r\n                                        }\r\n                                    });\r\n                            }\r\n                            else if (error.CodeEquals(ErrorCode.BAD_REQUEST)\r\n                                && error.TypeEquals(ErrorType.USER_ALREADY_PARTICIPANT))\r\n                            {\r\n                                if (!string.IsNullOrEmpty(accessToken))\r\n                                {\r\n                                    AppBarCommand();\r\n                                }\r\n                            }\r\n\r\n                            Execute.ShowDebugMessage(\"messages.addChatUser error \" + error);\r\n                        }));\r\n                }\r\n\r\n                var channel = With as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    MTProtoService.InviteToChannelAsync(channel.ToInputChannel(), new TLVector<TLInputUserBase> { _bot.ToInputUser() },\r\n                        statedMessage =>\r\n                        {\r\n                            var updates = statedMessage as TLUpdates;\r\n                            if (updates != null)\r\n                            {\r\n                                var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewChannelMessage) as TLUpdateNewChannelMessage;\r\n                                if (updateNewMessage != null)\r\n                                {\r\n                                    Handle(updateNewMessage.Message as TLMessageCommon);\r\n                                }\r\n\r\n                                if (!string.IsNullOrEmpty(accessToken))\r\n                                {\r\n                                    Execute.BeginOnUIThread(AppBarCommand);\r\n                                }\r\n                            }\r\n                        },\r\n                        error => BeginOnUIThread(() =>\r\n                        {\r\n                            if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                            {\r\n                                //MessageBox.Show(AppResources.PeerFloodAddContact, AppResources.Error, MessageBoxButton.OK);\r\n                                ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodAddContact, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                                    result =>\r\n                                    {\r\n                                        if (result == CustomMessageBoxResult.RightButton)\r\n                                        {\r\n                                            TelegramViewBase.NavigateToUsername(MTProtoService, Constants.SpambotUsername, null, null, null);\r\n                                        }\r\n                                    });\r\n                            }\r\n                            else if (error.TypeEquals(ErrorType.USERS_TOO_MUCH))\r\n                            {\r\n                                MessageBox.Show(AppResources.UsersTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                            }\r\n                            else if (error.TypeEquals(ErrorType.USER_CHANNELS_TOO_MUCH))\r\n                            {\r\n                                MessageBox.Show(AppResources.UserChannelsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                            }\r\n                            else if (error.TypeEquals(ErrorType.BOTS_TOO_MUCH))\r\n                            {\r\n                                MessageBox.Show(AppResources.BotsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                            }\r\n                            else if (error.TypeEquals(ErrorType.USER_NOT_MUTUAL_CONTACT))\r\n                            {\r\n                                MessageBox.Show(AppResources.UserNotMutualContact, AppResources.Error, MessageBoxButton.OK);\r\n                            }\r\n                            else if (error.TypeEquals(ErrorType.USER_ALREADY_PARTICIPANT))\r\n                            {\r\n                                if (!string.IsNullOrEmpty(accessToken))\r\n                                {\r\n                                    AppBarCommand();\r\n                                }\r\n                            }\r\n\r\n                            Execute.ShowDebugMessage(\"messages.addChatUser error \" + error);\r\n                        }));\r\n                }\r\n            }\r\n            else\r\n            {\r\n                var user = With as TLUser;\r\n                if (user != null)\r\n                {\r\n                    user.AccessToken = accessToken;\r\n                }\r\n            }\r\n\r\n            if (UserActionViewModel.IsRequired(With))\r\n            {\r\n                UserAction = new UserActionViewModel((TLUserBase)With);\r\n                UserAction.InvokeUserAction += (sender, args) => InvokeUserAction();\r\n                UserAction.InvokeUserAction2 += (sender, args) => InvokeUserAction2();\r\n            }\r\n            //return;\r\n\r\n\r\n\r\n            //подписываем на события только, если смогли восстановиться после tombstoning\r\n            EventAggregator.Subscribe(this);\r\n\r\n            var inputPeer = With as IInputPeer;\r\n            if (inputPeer != null)\r\n            {\r\n                _peer = inputPeer.ToInputPeer();\r\n            }\r\n            else\r\n            {\r\n                _peer = new TLInputPeerFeed { ChatId = new TLInt(1) };\r\n            }\r\n            _subtitle = GetSubtitle();\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                //if (_debugTimer != null) System.Diagnostics.Debug.WriteLine(\"start property changed \" + _debugTimer.Elapsed);\r\n\r\n                ShellViewModel.WriteTimer(args.PropertyName);\r\n\r\n                if (Property.NameEquals(args.PropertyName, () => Text))\r\n                {\r\n                    if (IsEditingEnabled)\r\n                    {\r\n                        if (!string.IsNullOrEmpty(Text))\r\n                        {\r\n                            if (_editedMessage != null\r\n                                && (_editedMessage.Media is TLMessageMediaEmpty || _editedMessage.Media is TLMessageMediaWebPage))\r\n                            {\r\n                                GetWebPagePreviewAsync(Text);\r\n                            }\r\n\r\n                            string searchText;\r\n\r\n                            var searchByUsernames = SearchByUsernames(Text, out searchText);\r\n                            if (searchByUsernames)\r\n                            {\r\n                                GetUsernameHints(searchText);\r\n                            }\r\n                            else\r\n                            {\r\n                                ClearUsernameHints();\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            RestoreReply();\r\n\r\n                            ClearUsernameHints();\r\n                        }\r\n\r\n                        return;\r\n                    }\r\n\r\n                    if (!string.IsNullOrEmpty(Text))\r\n                    {\r\n                        GetWebPagePreviewAsync(Text);\r\n\r\n                        string searchText;\r\n\r\n                        var searchByStickers = SearchByStickers(Text, out searchText);\r\n                        if (searchByStickers)\r\n                        {\r\n                            GetStickerHints(searchText);\r\n                        }\r\n                        else\r\n                        {\r\n                            ClearStickerHints();\r\n                        }\r\n\r\n                        var searchInlineBotResults = SearchInlineBotResults(Text, out searchText);\r\n                        if (searchInlineBotResults)\r\n                        {\r\n                            GetInlineBotResults(searchText);\r\n                        }\r\n                        else\r\n                        {\r\n                            ClearInlineBotResults();\r\n                        }\r\n\r\n                        var searchByUsernames = SearchByUsernames(Text, out searchText);\r\n                        if (searchByUsernames)\r\n                        {\r\n                            GetUsernameHints(searchText);\r\n                        }\r\n                        else\r\n                        {\r\n                            ClearUsernameHints();\r\n                        }\r\n\r\n                        var searchByCommands = SearchByCommands(Text, out searchText);\r\n                        if (searchByCommands)\r\n                        {\r\n                            GetCommandHints(searchText);\r\n                        }\r\n                        else\r\n                        {\r\n                            ClearCommandHints();\r\n                        }\r\n\r\n                        //var searchByHashtags = SearchByHashtags(Text, out searchText);\r\n\r\n                        //if (searchByHashtags)\r\n                        //{\r\n                        //    GetHashtagHints(searchText);\r\n                        //}\r\n                        //else\r\n                        //{\r\n                        //    HashtagHints.Clear();\r\n                        //}\r\n                    }\r\n                    else\r\n                    {\r\n                        RestoreReply();\r\n\r\n                        ClearStickerHints();\r\n                        ClearInlineBotResults();\r\n                        ClearUsernameHints();\r\n                        ClearHashtagHints();\r\n                        ClearCommandHints();\r\n                    }\r\n\r\n                    if (_suppressTyping)\r\n                    {\r\n                        _suppressTyping = false;\r\n                        return;\r\n                    }\r\n                    else\r\n                    {\r\n                        TextTypingManager.SetTyping();\r\n                    }\r\n                }\r\n                else if (Property.NameEquals(args.PropertyName, () => With))\r\n                {\r\n                    NotifyOfPropertyChange(() => IsAppBarCommandVisible);\r\n                    NotifyOfPropertyChange(() => AppBarCommandString);\r\n                }\r\n                //if (_debugTimer != null) System.Diagnostics.Debug.WriteLine(\"end property changed \" + _debugTimer.Elapsed);\r\n            };\r\n            LoadUnsendedTextAsync(draft =>\r\n            {\r\n                GetUnreadMentionsAsync();\r\n\r\n                if (StateService.Url != null)\r\n                {\r\n                    var text = StateService.Url.Trim().TrimStart('@');\r\n                    StateService.Url = null;\r\n\r\n                    if (StateService.UrlText != null)\r\n                    {\r\n                        text = text + Environment.NewLine + StateService.UrlText;\r\n                        StateService.UrlText = null;\r\n                    }\r\n\r\n                    Text = text;\r\n                }\r\n                else if (StateService.WebLink != null)\r\n                {\r\n                    Text = StateService.WebLink.ToString();\r\n                    StateService.WebLink = null;\r\n                }\r\n                else if (StateService.SwitchInlineButton != null)\r\n                {\r\n                    var userName = StateService.SwitchInlineButton.Bot as IUserName;\r\n                    if (userName != null && !TLString.IsNullOrEmpty(userName.UserName))\r\n                    {\r\n                        _currentInlineBot = StateService.SwitchInlineButton.Bot;\r\n\r\n                        Text = string.Format(\"@{0} {1}\", userName.UserName, StateService.SwitchInlineButton.Query);\r\n                    }\r\n\r\n                    StateService.SwitchInlineButton = null;\r\n                }\r\n                else\r\n                {\r\n                    UpdateDraftMessage(draft);\r\n\r\n                    if (Text == null) return;\r\n\r\n                    var trimmedText = Text.TrimStart();\r\n                    if (trimmedText.StartsWith(\"@\"))\r\n                    {\r\n                        var words = trimmedText.Split(' ');\r\n                        if (words.Length >= 1)\r\n                        {\r\n                            if (BrowserNavigationService.IsValidUsername(words[0]))\r\n                            {\r\n                                if (trimmedText.Length > words[0].Length)\r\n                                {\r\n                                    ResolveUsername(words[0], trimmedText.Substring(words[0].Length + 1));\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n\r\n            //return;\r\n\r\n            SendSharedPhoto();\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                GetAllStickersAsync();\r\n\r\n                if (StateService.Message != null)\r\n                {\r\n                    var message = StateService.Message;\r\n                    StateService.Message = null;\r\n\r\n                    ProcessMessages(new List<TLMessageBase> { message });\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        _isUpdated = true;\r\n                        _isFirstSliceLoaded = false;\r\n\r\n                        Items.Clear();\r\n                        Items.Add(message);\r\n\r\n                        _loadResultHistory = true;\r\n                    });\r\n\r\n                    return;\r\n                }\r\n\r\n#if WP8\r\n                var isLocalServiceMessage = false;\r\n                var dialog = CurrentDialog as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    var topMessage = dialog.TopMessage;\r\n                    isLocalServiceMessage = IsLocalServiceMessage(topMessage);  // ContactRegistered update\r\n                }\r\n\r\n                if (CurrentDialog != null\r\n                    && StateService.ForwardMessages == null\r\n                    && CurrentDialog.UnreadCount.Value >= Constants.MinUnreadCountToShowSeparator\r\n                    && !isLocalServiceMessage)\r\n                {\r\n                    var unreadCount = CurrentDialog.UnreadCount.Value;\r\n\r\n                    if (unreadCount > 0)\r\n                    {\r\n                        if (With != null)\r\n                        {\r\n                            With.Bitmap = null;\r\n                        }\r\n                        var cachedMessages = CacheService.GetHistory(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId));\r\n\r\n                        ProcessMessages(cachedMessages);\r\n\r\n                        if (cachedMessages.Count >= unreadCount && cachedMessages.Count > 10)\r\n                        {\r\n                            BeginOnUIThread(() =>\r\n                            {\r\n                                var startPosition = 0;\r\n                                for (var i = 0; i < cachedMessages.Count; i++)\r\n                                {\r\n                                    var message = cachedMessages[i] as TLMessageCommon;\r\n                                    if (message != null && !message.Unread.Value)\r\n                                    {\r\n                                        break;\r\n                                    }\r\n                                    startPosition++;\r\n                                }\r\n                                startPosition--;\r\n\r\n                                var items = new TLVector<TLMessageBase>();\r\n                                foreach (var message in cachedMessages)\r\n                                {\r\n                                    items.Add(message);\r\n                                }\r\n\r\n                                IsFirstSliceLoaded = true;\r\n                                if (startPosition >= 0)\r\n                                {\r\n                                    AddUnreadHistory(startPosition, items);\r\n                                }\r\n                                else\r\n                                {\r\n                                    AddHistory(items.Items);\r\n                                    CurrentDialog.UnreadCount = new TLInt(0);\r\n                                }\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            var channels = With as TLVector<TLChatBase>;\r\n                            if (channels != null)\r\n                            {\r\n                                var unreadSlice = 10;\r\n                                var offset = Math.Max(0, unreadCount - unreadSlice);\r\n                                IsWorking = true;\r\n                                MTProtoService.GetFeedAsync(\r\n                                    false,\r\n                                    new TLInt(1),\r\n                                    null,\r\n                                    new TLInt(0),\r\n                                    new TLInt(20),\r\n                                    null,\r\n                                    null,\r\n                                    new TLInt(0),\r\n                                    result =>\r\n                                    {\r\n                                        ProcessMessages(result.Messages);\r\n\r\n                                        BeginOnUIThread(() =>\r\n                                        {\r\n                                            IsWorking = false;\r\n                                            var startPosition = offset == 0 ? unreadCount - 1 : unreadSlice - 1;\r\n\r\n                                            IsFirstSliceLoaded = false;\r\n                                            AddUnreadHistory(startPosition, result.Messages);\r\n                                        });\r\n                                    },\r\n                                    error =>\r\n                                    {\r\n                                        Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                                        IsWorking = false;\r\n                                    });\r\n                            }\r\n                            else\r\n                            {\r\n                                var unreadSlice = 10;\r\n                                var offset = Math.Max(0, unreadCount - unreadSlice);\r\n                                IsWorking = true;\r\n                                MTProtoService.GetHistoryAsync(Stopwatch.StartNew(),\r\n                                    Peer,\r\n                                    TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId),\r\n                                    offset < Constants.MessagesSlice,\r\n                                    new TLInt(0),\r\n                                    new TLInt(offset),\r\n                                    new TLInt(0),\r\n                                    new TLInt(20),\r\n                                    result =>\r\n                                    {\r\n                                        ProcessMessages(result.Messages);\r\n\r\n                                        BeginOnUIThread(() =>\r\n                                        {\r\n                                            IsWorking = false;\r\n                                            var startPosition = offset == 0 ? unreadCount - 1 : unreadSlice - 1;\r\n\r\n                                            IsFirstSliceLoaded = false;\r\n                                            AddUnreadHistory(startPosition, result.Messages);\r\n                                        });\r\n                                    },\r\n                                    error =>\r\n                                    {\r\n                                        Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                                        IsWorking = false;\r\n                                    });\r\n                            }\r\n                        }\r\n\r\n                        return;\r\n                    }\r\n                }\r\n#endif\r\n\r\n                IList<TLMessageBase> messages = new List<TLMessageBase>();\r\n                if (_post > 0)\r\n                {\r\n                    // history exists\r\n\r\n                    messages = CacheService.GetHistory(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId), _post, TelegramClient.Constants.MessagesSlice);\r\n                    if (messages.Count > 0)\r\n                    {\r\n                        With.Bitmap = null;\r\n                        ProcessMessages(messages);\r\n                        AddHistory(messages);\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            HighlightMessage(messages[0]);\r\n                            //LoadPreviousSlice();\r\n                        });\r\n\r\n                        _isFirstSliceLoaded = false;\r\n                        // load from server\r\n\r\n                        return;\r\n                    }\r\n                }\r\n                else if (_messageId != null)\r\n                {\r\n                    LoadResultHistory(_messageId);\r\n                    return;\r\n                }\r\n\r\n                foreach (var message in GetHistory())\r\n                {\r\n                    if (!SkipMessage(message))\r\n                    {\r\n                        messages.Add(message);\r\n                    }\r\n                }\r\n                ProcessMessages(messages);\r\n                AddHistory(messages);\r\n            });\r\n\r\n            ShellViewModel.WriteTimer(\"DialogDetailsViewModel stop ctor\");\r\n        }\r\n\r\n        public void AppendMigratedHistory(IList<TLMessageBase> messages)\r\n        {\r\n            var channel = With as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                var migratedFromChatId = channel.MigratedFromChatId;\r\n                if (migratedFromChatId == null)\r\n                {\r\n                    var lastServiceMessage = (messages != null ? messages.LastOrDefault() : null) as TLMessageService;\r\n                    if (lastServiceMessage != null)\r\n                    {\r\n                        var migratedFromAction = lastServiceMessage.Action as TLMessageActionChannelMigrateFrom;\r\n                        if (migratedFromAction != null)\r\n                        {\r\n                            migratedFromChatId = migratedFromAction.ChatId;\r\n                            channel.MigratedFromChatId = migratedFromChatId;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (migratedFromChatId != null)\r\n                {\r\n                    var lastMessage = messages != null ? messages.OfType<TLMessageService>().LastOrDefault() : null;\r\n                    var clearHistoryMessage = messages != null ? messages.OfType<TLMessageService>().FirstOrDefault(x => x.Action is TLMessageActionClearHistory) : null;\r\n                    var noneClearHistoryMessage = messages != null ? messages.FirstOrDefault(x => !(x is TLMessageService) || !(((TLMessageService)x).Action is TLMessageActionClearHistory)) : null;\r\n\r\n                    if ((lastMessage != null && lastMessage.Action is TLMessageActionChannelMigrateFrom) || (clearHistoryMessage != null && noneClearHistoryMessage != null))\r\n                    {\r\n                        var chatMessages = CacheService.GetHistory(new TLPeerChat { Id = migratedFromChatId });\r\n                        if (chatMessages.Count == 0)\r\n                        {\r\n                            var dialog71 = CurrentDialog as TLDialog71;\r\n                            if (dialog71 != null && dialog71.MigratedHistory != null)\r\n                            {\r\n                                chatMessages = dialog71.MigratedHistory;\r\n                            }\r\n                        }\r\n\r\n                        foreach (var message in chatMessages)\r\n                        {\r\n                            if (!SkipMessage(message))\r\n                            {\r\n                                messages.Add(message);\r\n                            }\r\n                        }\r\n\r\n                        if (chatMessages.Count <= 1)\r\n                        {\r\n                            LoadNextMigratedHistorySlice(\"GetHistory\");\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public IList<TLMessageBase> GetHistory()\r\n        {\r\n            var messages = CacheService.GetHistory(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId));\r\n            if (messages.Count == 0)\r\n            {\r\n                var dialog = CurrentDialog as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    messages = dialog.Messages;\r\n                }\r\n            }\r\n\r\n            AppendMigratedHistory(messages);\r\n\r\n            return messages;\r\n        }\r\n\r\n        private bool SkipMessage(TLMessageBase messageBase)\r\n        {\r\n            var serviceMessage = messageBase as TLMessageService;\r\n            if (serviceMessage == null) return false;\r\n\r\n            var channel = With as TLChannel;\r\n            if (channel != null && (channel.MigratedFromChatId != null))\r\n            {\r\n                var chatMigrateTo = serviceMessage.Action as TLMessageActionChatMigrateTo;\r\n                if (chatMigrateTo != null)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            var clearHistory = serviceMessage.Action as TLMessageActionClearHistory;\r\n            if (clearHistory != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private IList<TLMessageBase> _messages;\r\n\r\n        private void AddMessagesWithCache(IList<TLMessageBase> messages)\r\n        {\r\n            if (!_isForwardInAnimationComplete)\r\n            {\r\n                _messages = messages;\r\n                return;\r\n            }\r\n\r\n            if (_messages == null)\r\n            {\r\n                View.CloseBitmapCache();\r\n\r\n                return;\r\n            }\r\n\r\n            const int firstSliceCount = 13;\r\n            var firstSlice = new List<TLMessageBase>();\r\n            var secondSlice = new List<TLMessageBase>();\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                if (i < firstSliceCount)\r\n                {\r\n                    firstSlice.Add(messages[i]);\r\n                }\r\n                else\r\n                {\r\n                    secondSlice.Add(messages[i]);\r\n                }\r\n            }\r\n\r\n            ((BindableCollection<TLMessageBase>)Items).AddRange(firstSlice);\r\n\r\n            View.CloseBitmapCache();\r\n\r\n            NotifyOfPropertyChange(() => IsAppBarCommandVisible);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                ((BindableCollection<TLMessageBase>)Items).AddRange(secondSlice);\r\n\r\n                if (_isForwardInAnimationComplete)\r\n                {\r\n                    if (_isFirstSliceLoaded)\r\n                    {\r\n                        UpdateReplyMarkup(Items);\r\n                    }\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        UpdateItemsAsync(0, 0, Constants.MessagesSlice, false);\r\n                        ReadHistoryAsync();\r\n                    });\r\n                }\r\n                else\r\n                {\r\n                    _updateItemsAndReadHistory = true;\r\n                }\r\n            });\r\n        }\r\n\r\n        private void AddHistory(IList<TLMessageBase> messages)\r\n        {\r\n            if (messages.Count == 0)\r\n            {\r\n                IsEmptyDialog = With != null && With.Bitmap == null;\r\n\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    if (_isForwardInAnimationComplete)\r\n                    {\r\n                        UpdateItemsAsync(0, 0, Constants.MessagesSlice, false);\r\n                        ReadHistoryAsync();\r\n                    }\r\n                    else\r\n                    {\r\n                        _updateItemsAndReadHistory = true;\r\n                    }\r\n                });\r\n            }\r\n            else\r\n            {\r\n                //if (With.Bitmap != null)\r\n                //{\r\n                //    AddMessagesWithCache(messages);\r\n                //}\r\n                //else\r\n                {\r\n                    LazyItems.Clear();\r\n                    const int firstSliceCount = 13;\r\n                    var isAnimated = With.Bitmap == null && messages.Count > 1;\r\n                    var secondSlice = new List<TLMessageBase>();\r\n                    for (var i = 0; i < messages.Count; i++)\r\n                    {\r\n                        if (i < firstSliceCount)\r\n                        {\r\n                            messages[i]._isAnimated = isAnimated;\r\n                            LazyItems.Add(messages[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            secondSlice.Add(messages[i]);\r\n                        }\r\n                    }\r\n\r\n                    NotifyOfPropertyChange(() => IsAppBarCommandVisible);\r\n\r\n                    if (LazyItems.Count == 0)\r\n                    {\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            if (_isForwardInAnimationComplete)\r\n                            {\r\n                                UpdateItemsAsync(0, 0, Constants.MessagesSlice, false);\r\n                                ReadHistoryAsync();\r\n                            }\r\n                            else\r\n                            {\r\n                                _updateItemsAndReadHistory = true;\r\n                            }\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        BeginOnUIThread(() => PopulateItems(() =>\r\n                        {\r\n                            foreach (var item in secondSlice)\r\n                            {\r\n                                Items.Add(item);\r\n                            }\r\n\r\n                            if (_isForwardInAnimationComplete)\r\n                            {\r\n                                if (_isFirstSliceLoaded)\r\n                                {\r\n                                    UpdateReplyMarkup(Items);\r\n                                }\r\n\r\n                                BeginOnUIThread(() =>\r\n                                {\r\n                                    UpdateItemsAsync(0, 0, Constants.MessagesSlice, false);\r\n                                    ReadHistoryAsync();\r\n                                });\r\n                            }\r\n                            else\r\n                            {\r\n                                _updateItemsAndReadHistory = true;\r\n                            }\r\n                        }));\r\n                    }\r\n\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool StartGifPlayers { get; set; }\r\n\r\n        private void AddUnreadHistory(int startPosition, TLVector<TLMessageBase> messages)\r\n        {\r\n            Items.Clear();\r\n            _isUpdated = true;\r\n\r\n            if (startPosition < messages.Count)\r\n            {\r\n                var message = messages[startPosition++];\r\n                Items.Add(message);\r\n\r\n                var separator = new TLMessageService17\r\n                {\r\n                    FromId = new TLInt(StateService.CurrentUserId),\r\n                    ToId = TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId),\r\n                    Status = With is TLBroadcastChat\r\n                            ? MessageStatus.Broadcast\r\n                            : MessageStatus.Sending,\r\n                    Out = new TLBool { Value = true },\r\n                    Unread = new TLBool(true),\r\n                    Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                    Action = new TLMessageActionUnreadMessages(),\r\n                    //IsAnimated = true,\r\n                    RandomId = TLLong.Random()\r\n                };\r\n                Items.Add(separator);\r\n            }\r\n\r\n\r\n            if (startPosition > 1)\r\n            {\r\n                SuppressHideScrollToBottom = true;\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    var unreadMessage = Items.FirstOrDefault();\r\n                    var dialog71 = CurrentDialog as TLDialog71;\r\n                    if (unreadMessage != null && dialog71 != null && dialog71.UnreadMentions != null)\r\n                    {\r\n                        var unreadMention = dialog71.UnreadMentions.LastOrDefault();\r\n                        if (unreadMention != null && unreadMention.Index == unreadMessage.Index)\r\n                        {\r\n                            ReadNextMention();\r\n                        }\r\n                    }\r\n\r\n                    ShowScrollToBottomButton();\r\n                });\r\n            }\r\n\r\n            var forwardInAnimationComplete = _delayedPosition == -1;\r\n            if (forwardInAnimationComplete)\r\n            {\r\n                AddMessagesAndReadHistory(startPosition, messages);\r\n            }\r\n            else\r\n            {\r\n                _delayedPosition = startPosition;\r\n                _delayedMessages = messages;\r\n            }\r\n\r\n            IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && messages.Count == 0;\r\n        }\r\n\r\n        private void ShowScrollToBottomButton()\r\n        {\r\n            if (View != null) View.ShowScrollToBottomButton();\r\n        }\r\n\r\n        private void HideScrollToBottomButton()\r\n        {\r\n            if (View != null) View.HideScrollToBottomButton();\r\n        }\r\n\r\n        private TLVector<TLMessageBase> _delayedMessages;\r\n        private int _delayedPosition;\r\n\r\n        private TLObject GetParticipant()\r\n        {\r\n            if (StateService.With == null)\r\n            {\r\n                if (!string.IsNullOrEmpty(StateService.ChatId))\r\n                {\r\n                    var chatIdString = StateService.ChatId;\r\n                    StateService.ChatId = null;\r\n                    int chatId;\r\n                    try\r\n                    {\r\n                        chatId = Convert.ToInt32(chatIdString);\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        NavigateToShellViewModel();\r\n                        return null;\r\n                    }\r\n                    var chat = CacheService.GetChat(new TLInt(chatId));\r\n                    if (chat != null)\r\n                    {\r\n                        return chat;\r\n                    }\r\n\r\n                    NavigateToShellViewModel();\r\n                    return null;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(StateService.UserId))\r\n                {\r\n                    var userIdString = StateService.UserId;\r\n                    StateService.UserId = null;\r\n\r\n                    int userId;\r\n                    try\r\n                    {\r\n                        userId = Convert.ToInt32(userIdString);\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        NavigateToShellViewModel();\r\n                        return null;\r\n                    }\r\n                    var user = CacheService.GetUser(new TLInt(userId));\r\n                    if (user != null)\r\n                    {\r\n                        return user;\r\n                    }\r\n\r\n                    NavigateToShellViewModel();\r\n                    return null;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(StateService.BroadcastId))\r\n                {\r\n                    var userIdString = StateService.BroadcastId;\r\n                    StateService.BroadcastId = null;\r\n\r\n                    int broadcastId;\r\n                    try\r\n                    {\r\n                        broadcastId = Convert.ToInt32(userIdString);\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        NavigateToShellViewModel();\r\n                        return null;\r\n                    }\r\n                    var broadcast = CacheService.GetBroadcast(new TLInt(broadcastId));\r\n                    if (broadcast != null)\r\n                    {\r\n                        return broadcast;\r\n                    }\r\n\r\n                    NavigateToShellViewModel();\r\n                    return null;\r\n                }\r\n\r\n                NavigateToShellViewModel();\r\n                return null;\r\n            }\r\n\r\n            return StateService.With;\r\n        }\r\n\r\n        public void GetAllStickersAsync()\r\n        {\r\n            StateService.GetAllStickersAsync(cachedStickers =>\r\n            {\r\n                Stickers = cachedStickers;\r\n\r\n                var cachedStickers43 = cachedStickers as TLAllStickers43;\r\n                if (cachedStickers43 != null\r\n                    && cachedStickers43.FavedStickers == null)\r\n                {\r\n                    MTProtoService.GetFavedStickersAsync(new TLInt(0),\r\n                        result =>\r\n                        {\r\n                            var favedStickers = result as TLFavedStickers;\r\n                            if (favedStickers != null)\r\n                            {\r\n                                cachedStickers43.FavedStickers = favedStickers;\r\n                                StateService.SaveAllStickersAsync(cachedStickers43);\r\n                            }\r\n                        },\r\n                        error =>\r\n                        {\r\n\r\n                        });\r\n                }\r\n\r\n                var featuredStickers = StateService.GetFeaturedStickers();\r\n                if (featuredStickers == null)\r\n                {\r\n                    MTProtoService.GetFeaturedStickersAsync(true, new TLInt(0),\r\n                        result =>\r\n                        {\r\n                            featuredStickers = result as TLFeaturedStickers;\r\n                            if (featuredStickers != null)\r\n                            {\r\n                                StateService.SaveFeaturedStickersAsync(featuredStickers);\r\n                            }\r\n                        },\r\n                        error =>\r\n                        {\r\n\r\n                        });\r\n                }\r\n\r\n                var cachedStickers29 = cachedStickers as TLAllStickers29;\r\n                if (cachedStickers29 != null\r\n                    && cachedStickers29.Date != null\r\n                    && cachedStickers29.Date.Value != 0)\r\n                {\r\n                    var date = TLUtils.ToDateTime(cachedStickers29.Date);\r\n                    if (date < DateTime.Now.AddSeconds(Constants.GetAllStickersInterval))\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var hash = cachedStickers != null ? cachedStickers.Hash ?? TLString.Empty : TLString.Empty;\r\n\r\n                MTProtoService.GetAllStickersAsync(hash,\r\n                    result =>\r\n                    {\r\n                        var allStickers = result as TLAllStickers43;\r\n                        if (allStickers != null)\r\n                        {\r\n                            if (cachedStickers29 != null)\r\n                            {\r\n                                allStickers.ShowStickersTab = cachedStickers29.ShowStickersTab;\r\n                                allStickers.RecentlyUsed = cachedStickers29.RecentlyUsed;\r\n                                allStickers.Date = TLUtils.DateToUniversalTimeTLInt(0, DateTime.Now);\r\n                            }\r\n\r\n                            if (cachedStickers43 != null)\r\n                            {\r\n                                allStickers.RecentStickers = cachedStickers43.RecentStickers;\r\n                                allStickers.FavedStickers = cachedStickers43.FavedStickers;\r\n                            }\r\n                            Stickers = allStickers;\r\n                            cachedStickers = allStickers;\r\n                            StateService.SaveAllStickersAsync(cachedStickers);\r\n                        }\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.getAllStickers error \" + error);\r\n                    });\r\n            });\r\n        }\r\n\r\n#if DEBUG\r\n\r\n        public void SendStatus()\r\n        {\r\n            MTProtoService.UpdateStatusAsync(new TLBool(false),\r\n                result =>\r\n                {\r\n                    BeginOnUIThread(() => MessageBox.Show(\"SendStatus result: \" + result.Value, \"Result OK\", MessageBoxButton.OK));\r\n                },\r\n                error =>\r\n                {\r\n                    BeginOnUIThread(() => MessageBox.Show(\"SendStatus error: \" + error.Code + \" \" + error.Message, \"Result ERROR\", MessageBoxButton.OK));\r\n                });\r\n        }\r\n#endif\r\n\r\n        private void UpdateItemsAsync(int offset, int maxId, int count, bool isAnimated)\r\n        {\r\n            if (_post > 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_messageId != null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (IsBroadcast && !IsChannel)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _isUpdating = true;\r\n            IsWorking = true;\r\n\r\n            TLObject.LogNotify = true;\r\n            TelegramEventAggregator.LogPublish = true;\r\n\r\n            ShellViewModel.StartNewTimer();\r\n\r\n            ShellViewModel.WriteTimer(\"UpdateItems start\");\r\n\r\n            if (Peer is TLInputPeerFeed)\r\n            {\r\n                MTProtoService.GetFeedAsync(\r\n                    false,\r\n                    new TLInt(1),\r\n                    null,\r\n                    new TLInt(0),\r\n                    new TLInt(Constants.MessagesSlice),\r\n                    null,\r\n                    null,\r\n                    new TLInt(0),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        UpdateItemsCompleted(offset, maxId, count, isAnimated, result);\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        _loadingNextSlice = false;\r\n                        IsWorking = false;\r\n                        Status = string.Empty;\r\n                        Execute.ShowDebugMessage(\"channels.getFeed error \" + error);\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                MTProtoService.GetHistoryAsync(null,\r\n                    Peer,\r\n                    TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId),\r\n                    true,\r\n                    new TLInt(0),\r\n                    new TLInt(0),\r\n                    new TLInt(maxId),\r\n                    new TLInt(count),\r\n                    result =>\r\n                    {\r\n                        UpdateItemsCompleted(offset, maxId, count, isAnimated, result);\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                        _isUpdating = false;\r\n                        _isUpdated = true;\r\n                        IsWorking = false;\r\n                    });\r\n            }\r\n        }\r\n\r\n        private void UpdateItemsCompleted(int offset, int maxId, int count, bool isAnimated, TLMessagesBase result)\r\n        {\r\n            ShellViewModel.WriteTimer(\"UpdateItems callback\");\r\n\r\n            var resultCount = result.Messages.Count;\r\n            ProcessMessages(result.Messages);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var resultMessages = new List<TLMessageBase>();\r\n                foreach (var message in result.Messages)\r\n                {\r\n                    if (!SkipMessage(message))\r\n                    {\r\n                        resultMessages.Add(message);\r\n                    }\r\n                }\r\n\r\n                ShellViewModel.WriteTimer(\"UpdateItems start ui\");\r\n\r\n                TelegramEventAggregator.LogPublish = false;\r\n                TLObject.LogNotify = false;\r\n\r\n                // all history is new and has no messages with Index = 0\r\n                var lastMessage = resultMessages.LastOrDefault();\r\n                if (lastMessage != null)\r\n                {\r\n                    var lastId = lastMessage.Index;\r\n\r\n                    var firstMessage = Items.FirstOrDefault(x => x.Index != 0);\r\n                    var hasSendingMessages = Items.FirstOrDefault(x => x.Index == 0) != null;\r\n                    if (firstMessage != null && !hasSendingMessages)\r\n                    {\r\n                        var firstId = firstMessage.Index;\r\n                        if (lastId > firstId)\r\n                        {\r\n                            Items.Clear();\r\n                        }\r\n                    }\r\n                }\r\n\r\n                foreach (var message in resultMessages)\r\n                {\r\n                    message._isAnimated = isAnimated;\r\n                }\r\n\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && resultMessages.Count == 0;\r\n\r\n                var checkGifPlayers = Items.Count < 5 && resultMessages.Count > 0;\r\n                var checkGifStartPosition = Items.Count;\r\n                var itemsCount = Items.Count;\r\n\r\n                var channel = With as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    var needUpdate = Items.Count < resultMessages.Count;\r\n\r\n                    if (!needUpdate)\r\n                    {\r\n                        int i = 0, j = 0;\r\n                        for (; i < resultMessages.Count && j < Items.Count; i++, j++)\r\n                        {\r\n                            if (itemsCount - 1 < i || resultMessages[i] != Items[j])\r\n                            {\r\n                                // skip \"User joined Telegram!\" message\r\n                                var serviceMessage = Items[j] as TLMessageService;\r\n                                if (serviceMessage != null)\r\n                                {\r\n                                    var unreadSeparator = serviceMessage.Action as TLMessageActionUnreadMessages;\r\n                                    if (unreadSeparator != null)\r\n                                    {\r\n                                        i--;\r\n                                        continue;\r\n                                    }\r\n                                }\r\n\r\n                                var isSendingMessage = Items[j].Index == 0 && Items[i].RandomIndex != 0;\r\n                                if (isSendingMessage)\r\n                                {\r\n                                    i--;\r\n                                    continue;\r\n                                }\r\n\r\n                                needUpdate = true;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (needUpdate)\r\n                    {\r\n                        Items.Clear();\r\n                        foreach (var message in resultMessages)\r\n                        {\r\n                            Items.Add(message);\r\n                        }\r\n                        var dialog = CurrentDialog as TLDialog;\r\n                        if (dialog != null)\r\n                        {\r\n                            dialog.Messages.Clear();\r\n                            foreach (var message in UngroupEnumerator(result.Messages))\r\n                            {\r\n                                dialog.Messages.Add(message);\r\n                            }\r\n                            var firstMessage = dialog.Messages.FirstOrDefault();\r\n                            if (firstMessage != null)\r\n                            {\r\n                                dialog._topMessage = firstMessage;\r\n                                dialog.TopMessageId = firstMessage.Id;\r\n\r\n                                EventAggregator.Publish(new TopMessageUpdatedEventArgs(dialog, firstMessage));\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    // handle one grouped messages\r\n                    if (Items.Count == 1)\r\n                    {\r\n                        var message73 = Items[0] as TLMessage73;\r\n                        if (message73 != null && message73.GroupedId != null)\r\n                        {\r\n                            Items.RemoveAt(0);\r\n                        }\r\n                    }\r\n\r\n                    // remove tail\r\n                    IList<TLMessageBase> removedItems;\r\n                    MergeItems(Items, resultMessages, offset, maxId, count, out removedItems);\r\n                }\r\n\r\n                if (checkGifPlayers)\r\n                {\r\n                    var settings = StateService.GetChatSettings();\r\n                    if (settings.AutoPlayGif)\r\n                    {\r\n                        for (var i = checkGifStartPosition; i < Items.Count && i < 5; i++)\r\n                        {\r\n                            if (Items[i].IsGif())\r\n                            {\r\n                                StartGifPlayers = true;\r\n                                NotifyOfPropertyChange(() => StartGifPlayers);\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (count > resultCount)\r\n                {\r\n                    IsLastSliceLoaded = true;\r\n                    LoadNextMigratedHistorySlice(\"UpdateItemsAsync\");\r\n                }\r\n\r\n                _isUpdating = false;\r\n                _isUpdated = true;\r\n                IsWorking = false;\r\n\r\n                var bot = With as TLUser;\r\n                if (itemsCount == 0 && Items.Count > 0 && bot != null && bot.IsBot)\r\n                {\r\n                    NotifyOfPropertyChange(() => IsAppBarCommandVisible);\r\n                }\r\n                ShellViewModel.WriteTimer(\"UpdateItems end ui\");\r\n            });\r\n        }\r\n\r\n        private int MergeItems(IList<TLMessageBase> current, IList<TLMessageBase> updated, int offset, int maxId, int count, out IList<TLMessageBase> removedItems)\r\n        {\r\n            TLInt migratedFromChatId = null;\r\n            var channel = With as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                migratedFromChatId = channel.MigratedFromChatId;\r\n            }\r\n\r\n            var lastIndex = TLUtils.MergeItemsDesc(x => x.DateIndex, current, updated, offset, maxId, count, out removedItems, x => x.Index,\r\n                m =>\r\n                {\r\n                    return IsLocalServiceMessage(m) || IsChatHistory(migratedFromChatId, m);\r\n                });\r\n\r\n\r\n            return lastIndex;\r\n        }\r\n\r\n        private static bool IsChatHistory(TLInt migratedFromChatId, TLMessageBase messageBase)\r\n        {\r\n            if (migratedFromChatId == null) return false;\r\n\r\n            var message = messageBase as TLMessageCommon;\r\n            if (message != null)\r\n            {\r\n                if (message.ToId is TLPeerChat)\r\n                {\r\n                    if (message.ToId.Id.Value == migratedFromChatId.Value)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static bool IsLocalServiceMessage(TLMessageBase messageBase)\r\n        {\r\n            var messageService = messageBase as TLMessageService;\r\n            if (messageService != null)\r\n            {\r\n                var action = messageService.Action;\r\n                if (action is TLMessageActionContactRegistered)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private volatile bool _isUpdating;\r\n\r\n        private volatile bool _isUpdated;\r\n\r\n        public bool SliceLoaded { get; set; }\r\n\r\n        private bool _loadingNextSlice;\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            if (_loadMessageHistory)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_messageId != null)\r\n            {\r\n                LoadResultHistory(_messageId);\r\n                return;\r\n            }\r\n\r\n            if (IsBroadcast && !IsChannel)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_loadingNextSlice)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (\r\n#if WP8\r\n_isUpdating ||\r\n                !_isUpdated ||\r\n#endif\r\n IsWorking || LazyItems.Count > 0) return;\r\n\r\n            if (IsLastSliceLoaded)\r\n            {\r\n                LoadNextMigratedHistorySlice(Thread.CurrentThread.ManagedThreadId + \" ilsl\");\r\n                return;\r\n            }\r\n\r\n            var channel = With as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                var lastMessage = Items.LastOrDefault() as TLMessageCommon;\r\n                if (lastMessage != null\r\n                    && lastMessage.ToId is TLPeerChat)\r\n                {\r\n                    LoadNextMigratedHistorySlice(Thread.CurrentThread.ManagedThreadId + \" ch\");\r\n                    return;\r\n                }\r\n            }\r\n\r\n            IsWorking = true;\r\n            var maxMessageId = int.MaxValue;\r\n            TLMessageCommon maxMessage = null;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (Items[i].Index != 0\r\n                    && Items[i].Index < maxMessageId)\r\n                {\r\n                    maxMessageId = Items[i].Index;\r\n                    maxMessage = Items[i] as TLMessageCommon;\r\n                }\r\n            }\r\n\r\n            if (maxMessageId == int.MaxValue)\r\n            {\r\n                maxMessageId = 0;\r\n            }\r\n\r\n            _loadingNextSlice = true;\r\n\r\n            if (Peer is TLInputPeerFeed)\r\n            {\r\n                TLFeedPosition offsetPosition = null;\r\n                if (maxMessage != null)\r\n                {\r\n                    offsetPosition = new TLFeedPosition\r\n                    {\r\n                        Date = maxMessage.Date,\r\n                        Peer = maxMessage.ToId,\r\n                        Id = maxMessage.Id\r\n                    };\r\n                }\r\n\r\n                MTProtoService.GetFeedAsync(\r\n                    false,\r\n                    new TLInt(1),\r\n                    offsetPosition,\r\n                    new TLInt(0),\r\n                    new TLInt(Constants.MessagesSlice),\r\n                    null,\r\n                    null,\r\n                    new TLInt(0),\r\n                    result =>\r\n                    {\r\n                        LoadNextSliceCompleted(result);\r\n                    },\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        _loadingNextSlice = false;\r\n                        IsWorking = false;\r\n                        Status = string.Empty;\r\n                        Execute.ShowDebugMessage(\"channels.getFeed error \" + error);\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                //TLObject.LogNotify = true;\r\n                //var maxMessageId = maxMessage != null ? maxMessage.Index : 0;\r\n                MTProtoService.GetHistoryAsync(Stopwatch.StartNew(),\r\n                    Peer,\r\n                    TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId),\r\n                    Items.Count < 1.5 * Constants.MessagesSlice,\r\n                    new TLInt(0),\r\n                    new TLInt(0),\r\n                    new TLInt(maxMessageId),\r\n                    new TLInt(Constants.MessagesSlice),\r\n                    result =>\r\n                    {\r\n                        LoadNextSliceCompleted(result);\r\n                    },\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        _loadingNextSlice = false;\r\n                        IsWorking = false;\r\n                        Status = string.Empty;\r\n                        Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        private void LoadNextSliceCompleted(TLMessagesBase result)\r\n        {\r\n            var resultCount = result.Messages.Count;\r\n            ProcessMessages(result.Messages);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                //TLObject.LogNotify = false;\r\n\r\n                _loadingNextSlice = false;\r\n                IsWorking = false;\r\n                SliceLoaded = true;\r\n\r\n                var nextSlice = new List<TLMessageBase>();\r\n                foreach (var message in result.Messages)\r\n                {\r\n                    //message.IsAnimated = false;\r\n                    if (!SkipMessage(message))\r\n                    {\r\n                        Items.Add(message);\r\n\r\n                        var message31 = message as TLMessage31;\r\n                        if (message31 != null && !message31.Out.Value)\r\n                        {\r\n                            if (message31.ReplyMarkup != null\r\n                                && ReplyMarkup == null)\r\n                            {\r\n                                var fromId = message31.FromId;\r\n                                var user = CacheService.GetUser(fromId) as TLUser;\r\n                                if (user != null && user.IsBot)\r\n                                {\r\n                                    SetReplyMarkup(message31, true);\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                if (resultCount < Constants.MessagesSlice)\r\n                {\r\n                    IsLastSliceLoaded = true;\r\n                    LoadNextMigratedHistorySlice(Thread.CurrentThread.ManagedThreadId + \" gh\");\r\n                }\r\n            });\r\n        }\r\n\r\n        private bool _isLastMigratedHistorySliceLoaded;\r\n\r\n        private bool _isLoadingNextMigratedHistorySlice;\r\n\r\n        private void LoadNextMigratedHistorySlice(string debugInfo)\r\n        {\r\n            var channel = With as TLChannel;\r\n            if (channel == null || channel.MigratedFromChatId == null) return;\r\n\r\n            if (_isLastMigratedHistorySliceLoaded) return;\r\n\r\n            if (LazyItems.Count > 0) return;\r\n\r\n            if (_isLoadingNextMigratedHistorySlice) return;\r\n\r\n            var dialog71 = CurrentDialog as TLDialog71;\r\n            if (dialog71 != null)\r\n            {\r\n                var firstItem = dialog71.Messages.FirstOrDefault();\r\n                if (IsClearHistoryMessage(firstItem))\r\n                {\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var maxMessageId = int.MaxValue;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var messageCommon = Items[i] as TLMessageCommon;\r\n                if (messageCommon == null) continue;\r\n\r\n                var peerChat = messageCommon.ToId as TLPeerChat;\r\n                if (peerChat == null) continue;\r\n\r\n                if (Items[i].Index != 0\r\n                    && Items[i].Index < maxMessageId)\r\n                {\r\n                    maxMessageId = Items[i].Index;\r\n                }\r\n            }\r\n\r\n            if (maxMessageId == int.MaxValue)\r\n            {\r\n                maxMessageId = channel.MigratedFromMaxId != null ? channel.MigratedFromMaxId.Value : int.MaxValue;\r\n            }\r\n\r\n            var isFirstMigratedSlice = channel.MigratedFromMaxId != null && maxMessageId == channel.MigratedFromMaxId.Value;\r\n            if (isFirstMigratedSlice)\r\n            {\r\n                if (dialog71 != null && dialog71.MigratedHistory != null)\r\n                {\r\n                    foreach (var message in dialog71.MigratedHistory)\r\n                    {\r\n                        if (!SkipMessage(message))\r\n                        {\r\n                            Items.Add(message);\r\n                        }\r\n                    }\r\n\r\n                    IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                    return;\r\n                }\r\n            }\r\n\r\n            _isLoadingNextMigratedHistorySlice = true;\r\n            IsWorking = true;\r\n            MTProtoService.GetHistoryAsync(Stopwatch.StartNew(),\r\n                new TLInputPeerChat { ChatId = channel.MigratedFromChatId },\r\n                new TLPeerChat { Id = channel.MigratedFromChatId },\r\n                (channel.MigratedFromMaxId != null && maxMessageId == channel.MigratedFromMaxId.Value) || maxMessageId == int.MaxValue,\r\n                new TLInt(0),\r\n                new TLInt(0),\r\n                new TLInt(maxMessageId),\r\n                new TLInt(Constants.MessagesSlice),\r\n                result =>\r\n                {\r\n                    var resultCount = result.Messages.Count;\r\n                    ProcessMessages(result.Messages);\r\n\r\n                    if (isFirstMigratedSlice)\r\n                    {\r\n                        if (dialog71 != null)\r\n                        {\r\n                            dialog71.MigratedHistory = result.Messages;\r\n                        }\r\n                    }\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        _isLoadingNextMigratedHistorySlice = false;\r\n                        IsWorking = false;\r\n\r\n                        if (resultCount < Constants.MessagesSlice)\r\n                        {\r\n                            _isLastMigratedHistorySliceLoaded = true;\r\n                        }\r\n                        foreach (var message in result.Messages)\r\n                        {\r\n                            if (!SkipMessage(message))\r\n                            {\r\n                                Items.Add(message);\r\n                            }\r\n                        }\r\n\r\n                        IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _isLoadingNextMigratedHistorySlice = false;\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n                    Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                }));\r\n        }\r\n\r\n        private bool _isPreviousSliceLoading;\r\n\r\n        private bool _isFirstSliceLoaded = true;\r\n\r\n        public bool IsFirstSliceLoaded\r\n        {\r\n            get { return _isFirstSliceLoaded; }\r\n            set { SetField(ref _isFirstSliceLoaded, value, () => IsFirstSliceLoaded); }\r\n        }\r\n\r\n        private bool _holdScrollingPosition;\r\n\r\n        public bool HoldScrollingPosition\r\n        {\r\n            get { return _holdScrollingPosition; }\r\n            set { SetField(ref _holdScrollingPosition, value, () => HoldScrollingPosition); }\r\n        }\r\n\r\n\r\n\r\n        private bool _isFirstMigratedHistorySliceLoaded;\r\n\r\n        private bool _isLoadingFirstMigratedHistorySlice;\r\n\r\n        private void LoadPreviousMigratedHistorySlice(string debugInfo)\r\n        {\r\n            var channel = With as TLChannel;\r\n            if (channel == null || channel.MigratedFromChatId == null) return;\r\n\r\n            if (_isFirstMigratedHistorySliceLoaded) return;\r\n\r\n            if (IsWorking || LazyItems.Count > 0) return;\r\n\r\n            if (_isLoadingFirstMigratedHistorySlice) return;\r\n\r\n            var maxMessageId = 0;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var messageCommon = Items[i] as TLMessageCommon;\r\n                if (messageCommon == null) continue;\r\n\r\n                var peerChat = messageCommon.ToId as TLPeerChat;\r\n                if (peerChat == null) continue;\r\n\r\n                if (Items[i].Index != 0\r\n                    && Items[i].Index > maxMessageId)\r\n                {\r\n                    maxMessageId = Items[i].Index;\r\n                }\r\n            }\r\n\r\n            if (maxMessageId == 0)\r\n            {\r\n                maxMessageId = channel.MigratedFromMaxId != null ? channel.MigratedFromMaxId.Value : 0;\r\n            }\r\n\r\n            _isLoadingFirstMigratedHistorySlice = true;\r\n            IsWorking = true;\r\n            MTProtoService.GetHistoryAsync(Stopwatch.StartNew(),\r\n                new TLInputPeerChat { ChatId = channel.MigratedFromChatId },\r\n                new TLPeerChat { Id = channel.MigratedFromChatId },\r\n                false,\r\n                new TLInt(0),\r\n                new TLInt(-Constants.MessagesSlice),\r\n                new TLInt(maxMessageId),\r\n                new TLInt(Constants.MessagesSlice),\r\n                result =>\r\n                {\r\n                    var resultCount = result.Messages.Count;\r\n                    ProcessMessages(result.Messages);\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        _isLoadingFirstMigratedHistorySlice = false;\r\n                        IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                        if (resultCount < Constants.MessagesSlice)\r\n                        {\r\n                            _isFirstMigratedHistorySliceLoaded = true;\r\n                        }\r\n\r\n                        HoldScrollingPosition = true;\r\n                        for (var i = result.Messages.Count; i > 0; i--)\r\n                        {\r\n                            var message = result.Messages[i - 1];\r\n                            if (message.Index > maxMessageId)\r\n                            {\r\n                                Items.Insert(0, result.Messages[i - 1]);\r\n                            }\r\n                        }\r\n                        HoldScrollingPosition = false;\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _isLoadingFirstMigratedHistorySlice = false;\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n                    Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void LoadPreviousSlice(string str)\r\n        {\r\n            if (IsBroadcast && !IsChannel)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_isPreviousSliceLoading\r\n                || _isFirstSliceLoaded) return;\r\n\r\n\r\n            var channel = With as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (!_isFirstMigratedHistorySliceLoaded)\r\n                {\r\n                    var firstMessage = Items.FirstOrDefault() as TLMessageCommon;\r\n                    if (firstMessage != null\r\n                        && firstMessage.ToId is TLPeerChat)\r\n                    {\r\n                        LoadPreviousMigratedHistorySlice(Thread.CurrentThread.ManagedThreadId + \" ch\");\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            _isPreviousSliceLoading = true;\r\n            var maxMessageId = 1;\r\n            TLMessageCommon maxMessage = null;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (channel != null && channel.MigratedFromChatId != null)\r\n                {\r\n                    var messageCommon = Items[i] as TLMessageCommon;\r\n                    if (messageCommon != null && messageCommon.ToId is TLPeerChat)\r\n                    {\r\n                        continue;\r\n                    }\r\n                }\r\n\r\n                if (Items[i].Index != 0\r\n                    && Items[i].Index > maxMessageId)\r\n                {\r\n                    maxMessageId = Items[i].Index;\r\n                    maxMessage = Items[i] as TLMessageCommon;\r\n                }\r\n            }\r\n            if (Peer is TLInputPeerFeed)\r\n            {\r\n                TLFeedPosition offsetPosition = null;\r\n                if (maxMessage != null)\r\n                {\r\n                    offsetPosition = new TLFeedPosition\r\n                    {\r\n                        Date = maxMessage.Date,\r\n                        Peer = maxMessage.ToId,\r\n                        Id = maxMessage.Id\r\n                    };\r\n                }\r\n\r\n                MTProtoService.GetFeedAsync(\r\n                    false,\r\n                    new TLInt(1),\r\n                    offsetPosition,\r\n                    new TLInt(-Constants.MessagesSlice),\r\n                    new TLInt(Constants.MessagesSlice),\r\n                    null,\r\n                    null,\r\n                    new TLInt(0),\r\n                    result =>\r\n                    {\r\n                        LoadPreviousSliceCompleted(result, maxMessageId);\r\n                    },\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        _loadingNextSlice = false;\r\n                        IsWorking = false;\r\n                        Status = string.Empty;\r\n                        Execute.ShowDebugMessage(\"channels.getFeed error \" + error);\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.GetHistoryAsync(Stopwatch.StartNew(),\r\n                    Peer,\r\n                    TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId),\r\n                    false,\r\n                    new TLInt(0),\r\n                    new TLInt(-Constants.MessagesSlice),\r\n                    new TLInt(maxMessageId),\r\n                    new TLInt(Constants.MessagesSlice),\r\n                    result =>\r\n                    {\r\n                        LoadPreviousSliceCompleted(result, maxMessageId);\r\n                    },\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n                        _isPreviousSliceLoading = false;\r\n                        Status = string.Empty;\r\n                        Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        private void LoadPreviousSliceCompleted(TLMessagesBase result, int maxMessageId)\r\n        {\r\n            var resultCount = result.Messages.Count;\r\n            ProcessMessages(result.Messages);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                IsWorking = false;\r\n                _isPreviousSliceLoading = false;\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                if (resultCount < Constants.MessagesSlice)\r\n                {\r\n                    IsFirstSliceLoaded = true;\r\n                }\r\n\r\n                HoldScrollingPosition = true;\r\n                for (var i = result.Messages.Count; i > 0; i--)\r\n                {\r\n                    var message = result.Messages[i - 1];\r\n                    if (message.Index > maxMessageId)\r\n                    {\r\n                        Items.Insert(0, result.Messages[i - 1]);\r\n                    }\r\n                }\r\n                HoldScrollingPosition = false;\r\n            });\r\n        }\r\n\r\n        public void LoadPreviousSlice()\r\n        {\r\n            LoadPreviousSlice(string.Empty);\r\n        }\r\n\r\n        private void ReadHistoryAsync()\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var haveUnreadMessages = false;\r\n\r\n                CurrentDialog = CurrentDialog ?? CacheService.GetDialog(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId));\r\n\r\n                if (CurrentDialog == null) return;\r\n\r\n                var maxId = 0;\r\n                TLMessageCommon maxMessage = null;\r\n                var dialog = CurrentDialog as TLDialog;\r\n                TLMessageCommon topMessage = null;\r\n                if (dialog != null)\r\n                {\r\n                    topMessage = dialog.TopMessage as TLMessageCommon;\r\n                    if (topMessage != null\r\n                        && !topMessage.Out.Value\r\n                        && topMessage.Unread.Value)\r\n                    //&& !topMessage.IsAudioVideoMessage())\r\n                    {\r\n                        maxId = topMessage.Index;\r\n                        maxMessage = topMessage;\r\n                        haveUnreadMessages = true;\r\n                    }\r\n                }\r\n\r\n                if (!haveUnreadMessages)\r\n                {\r\n                    for (var i = 0; i < 10 && i < Items.Count; i++)\r\n                    {\r\n                        var messageCommon = Items[i] as TLMessageCommon;\r\n                        if (messageCommon != null\r\n                            && !messageCommon.Out.Value\r\n                            && messageCommon.Unread.Value)\r\n                        //&& !messageCommon.IsAudioVideoMessage())\r\n                        {\r\n                            maxId = maxId > messageCommon.Index ? maxId : messageCommon.Index;\r\n                            maxMessage = messageCommon;\r\n                            haveUnreadMessages = true;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (!haveUnreadMessages)\r\n                {\r\n                    haveUnreadMessages = CurrentDialog.UnreadCount.Value > 0;\r\n                }\r\n\r\n                if (!haveUnreadMessages)\r\n                {\r\n                    CurrentDialog.NotifyOfPropertyChange(() => CurrentDialog.UnreadCount);\r\n                    var dialog71 = CurrentDialog as TLDialog71;\r\n                    if (dialog71 != null && dialog71.UnreadMark)\r\n                    {\r\n                        MTProtoService.MarkDialogUnreadAsync(\r\n                            false, \r\n                            new TLInputDialogPeer{ Peer = Peer }, \r\n                            result => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                dialog71.UnreadMark = false;\r\n                                dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMark);\r\n                            }));\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                SetRead(topMessage);\r\n\r\n                var channels = With as TLVector<TLChatBase>;\r\n                var channel = With as TLChannel;\r\n                if (channels != null)\r\n                {\r\n                    return;\r\n                    MTProtoService.ReadFeedAsync(new TLInt(1), new TLFeedPosition { Date = maxMessage.Date, Id = maxMessage.Id, Peer = maxMessage.ToId },\r\n                        result =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"channels.readHistory result=\" + result);\r\n                        },\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"channels.readHistory error \" + error);\r\n                        });\r\n                }\r\n                else if (channel != null)\r\n                {\r\n                    MTProtoService.ReadHistoryAsync(channel, new TLInt(maxId),\r\n                        result =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"channels.readHistory result=\" + result);\r\n                        },\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"channels.readHistory error \" + error);\r\n                        });\r\n                }\r\n                else\r\n                {\r\n                    MTProtoService.ReadHistoryAsync(Peer, new TLInt(maxId), new TLInt(0),\r\n                        affectedHistory =>\r\n                        {\r\n                            //SetRead(topMessage, d => new TLInt(0));\r\n                        },\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.readHistory error \" + error);\r\n                        });\r\n                }\r\n            });\r\n        }\r\n\r\n        private void ReadMessageContents(TLMessage25 message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            if (message.Index != 0 && !message.Out.Value && message.NotListened)\r\n            {\r\n                var channel = With as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    MTProtoService.ReadMessageContentsAsync(channel.ToInputChannel(), new TLVector<TLInt> { message.Id },\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            message.SetListened();\r\n                            message.Media.NotListened = false;\r\n                            message.Media.NotifyOfPropertyChange(() => message.Media.NotListened);\r\n\r\n                            if (message.IsMention)\r\n                            {\r\n                                ListenMention(message.Index);\r\n                            }\r\n\r\n                            CacheService.Commit();\r\n                        }),\r\n                        error => Execute.ShowDebugMessage(\"channels.readMessageContents error \" + error));\r\n                }\r\n                else\r\n                {\r\n                    MTProtoService.ReadMessageContentsAsync(new TLVector<TLInt> { message.Id },\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            message.SetListened();\r\n                            message.Media.NotListened = false;\r\n                            message.Media.NotifyOfPropertyChange(() => message.Media.NotListened);\r\n\r\n                            if (message.IsMention)\r\n                            {\r\n                                ListenMention(message.Index);\r\n                            }\r\n\r\n                            CacheService.Commit();\r\n                        }),\r\n                        error => Execute.ShowDebugMessage(\"messages.readMessageContents error \" + error));\r\n                }\r\n            }\r\n        }\r\n\r\n        private void DeleteChannelInternal(TLInt channelId, bool suppressMessage = false)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                if (!suppressMessage)\r\n                {\r\n                    MessageBox.Show(AppResources.GroupIsNoLongerAccessible, AppResources.Error, MessageBoxButton.OK);\r\n                }\r\n\r\n                var dialog = CurrentDialog ?? CacheService.GetDialog(new TLPeerChannel { Id = channelId });\r\n\r\n                if (dialog != null)\r\n                {\r\n                    EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                    CacheService.DeleteDialog(dialog);\r\n                    DialogsViewModel.UnpinFromStart(dialog);\r\n                }\r\n                if (NavigationService.CanGoBack)\r\n                {\r\n                    NavigationService.GoBack();\r\n                }\r\n                else\r\n                {\r\n                    NavigateToShellViewModel();\r\n                }\r\n            });\r\n        }\r\n\r\n        public object _participantsSyncRoot = new object();\r\n\r\n        private Timer _channelScheduler;\r\n\r\n        public void StopChannelScheduler()\r\n        {\r\n            _channelScheduler.Change(Timeout.Infinite, Timeout.Infinite);\r\n        }\r\n\r\n        private void OnChannelSchedulerTick(object state)\r\n        {\r\n            if (!_isActive)\r\n            {\r\n                _channelScheduler.Change(Timeout.Infinite, Timeout.Infinite);\r\n                return;\r\n            }\r\n\r\n            var channel = With as TLChannel;\r\n            if (channel == null)\r\n            {\r\n                _channelScheduler.Change(Timeout.Infinite, Timeout.Infinite);\r\n                return;\r\n            }\r\n\r\n            if (channel.IsMegaGroup)\r\n            {\r\n                MTProtoService.GetParticipantsAsync(channel.ToInputChannel(), new TLChannelParticipantsRecent(), new TLInt(0), new TLInt(200), new TLInt(0),\r\n                    result2 =>\r\n                    {\r\n                        var channelParticipants = result2 as TLChannelParticipants;\r\n                        if (channelParticipants != null)\r\n                        {\r\n                            channel.ChannelParticipants = channelParticipants;\r\n                            TLUtils.SaveObjectToMTProtoFile(_participantsSyncRoot, channel.ChannelParticipantsFileName, result2);\r\n\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                Subtitle = GetSubtitle();\r\n                            });\r\n                        }\r\n                    },\r\n                    error =>\r\n                    {\r\n                        if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST)\r\n                            && TLRPCError.TypeEquals(error, ErrorType.CHAT_ADMIN_REQUIRED))\r\n                        {\r\n                            channel.ChannelParticipants = null;\r\n                            FileUtils.Delete(_participantsSyncRoot, channel.ChannelParticipantsFileName);\r\n                        }\r\n                    });\r\n            }\r\n\r\n            var pts = channel.Pts;\r\n            if (pts == null)\r\n            {\r\n                var dialogChannel = CurrentDialog as IDialogPts;\r\n                if (dialogChannel != null)\r\n                {\r\n                    pts = dialogChannel.Pts;\r\n                }\r\n            }\r\n\r\n            if (pts != null)\r\n            {\r\n                pts = new TLInt(pts.Value - 10 > 0 ? pts.Value - 10 : 1);\r\n                Execute.ShowDebugMessage(\"updates.getChannelDifference channel_id=\" + channel.Index + \" pts=\" + pts);\r\n                MTProtoService.GetChannelDifferenceAsync(false, channel.ToInputChannel(), new TLChannelMessagesFilterEmpty(), pts, new TLInt(10),\r\n                    result =>\r\n                    {\r\n                        if (result.Timeout != null && result.Timeout.Value > 0)\r\n                        {\r\n                            _channelScheduler.Change(TimeSpan.FromSeconds(result.Timeout.Value), TimeSpan.FromMilliseconds(-1));\r\n                        }\r\n                        else\r\n                        {\r\n                            _channelScheduler.Change(Timeout.Infinite, Timeout.Infinite);\r\n                        }\r\n                    },\r\n                    error =>\r\n                    {\r\n                        _channelScheduler.Change(Timeout.Infinite, Timeout.Infinite);\r\n                    });\r\n            }\r\n        }\r\n\r\n        private void GetFullInfo()\r\n        {\r\n            if (LiveLocationBadge != null)\r\n            {\r\n                UpdateLiveLocations(\r\n                    result =>\r\n                    {\r\n\r\n                    },\r\n                    error =>\r\n                    {\r\n\r\n                    });\r\n            }\r\n\r\n            if (Peer is TLInputPeerChannel)\r\n            {\r\n                var channelForbidden = With as TLChannelForbidden;\r\n                if (channelForbidden != null)\r\n                {\r\n                    DeleteChannelInternal(channelForbidden.Id);\r\n                    return;\r\n                }\r\n\r\n                var channel = With as TLChannel;\r\n                if (channel == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                OnChannelSchedulerTick(this);\r\n\r\n                MTProtoService.GetFullChannelAsync(channel.ToInputChannel(),\r\n                    result =>\r\n                    {\r\n                        channel.ChatPhoto = result.FullChat.ChatPhoto;\r\n                        channel.Participants = result.FullChat.Participants;\r\n                        channel.NotifySettings = result.FullChat.NotifySettings;\r\n                        var channelFull = result.FullChat as TLChannelFull;\r\n                        if (channelFull != null)\r\n                        {\r\n                            channel.ExportedInvite = channelFull.ExportedInvite;\r\n                            channel.About = channelFull.About;\r\n                            channel.ParticipantsCount = channelFull.ParticipantsCount;\r\n                            channel.AdminsCount = channelFull.AdminsCount;\r\n                            channel.KickedCount = channelFull.KickedCount;\r\n                        }\r\n\r\n                        var channelFull41 = result.FullChat as TLChannelFull41;\r\n                        if (channelFull41 != null)\r\n                        {\r\n                            channel.MigratedFromChatId = channelFull41.MigratedFromChatId;\r\n                            channel.MigratedFromMaxId = channelFull41.MigratedFromMaxId;\r\n                            channel.BotInfo = channelFull41.BotInfo;\r\n                            _cachedCommandResults.Clear();\r\n                            _commands = null;\r\n                        }\r\n\r\n                        var channelFull49 = result.FullChat as TLChannelFull49;\r\n                        if (channelFull49 != null)\r\n                        {\r\n                            var channel49 = channel as TLChannel49;\r\n                            if (channel49 != null)\r\n                            {\r\n                                channel49.PinnedMsgId = channelFull49.PinnedMsgId;\r\n                                if (channel49.HiddenPinnedMsgId != null)\r\n                                {\r\n                                    if (channel49.PinnedMsgId == null ||\r\n                                        channel49.PinnedMsgId.Value != channel49.HiddenPinnedMsgId.Value)\r\n                                    {\r\n                                        channel49.HiddenPinnedMsgId = null;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        EventAggregator.Publish(channel);\r\n\r\n                        // get participants\r\n\r\n                        if (channelFull != null\r\n                            && channelFull.CanViewParticipants)\r\n                        {\r\n                            var channelParticipants = TLUtils.OpenObjectFromMTProtoFile<TLChannelParticipants>(_participantsSyncRoot, channel.ChannelParticipantsFileName);\r\n                            channel.ChannelParticipants = channelParticipants;\r\n\r\n                            MTProtoService.GetParticipantsAsync(channel.ToInputChannel(), new TLChannelParticipantsRecent(), new TLInt(0), new TLInt(200), new TLInt(0),\r\n                                result2 =>\r\n                                {\r\n                                    var channelParticipants2 = result2 as TLChannelParticipants;\r\n                                    if (channelParticipants2 != null)\r\n                                    {\r\n                                        channelParticipants = channelParticipants2;\r\n                                        channel.ChannelParticipants = channelParticipants2;\r\n                                        TLUtils.SaveObjectToMTProtoFile(_participantsSyncRoot, channel.ChannelParticipantsFileName, result2);\r\n\r\n                                        Execute.BeginOnUIThread(() =>\r\n                                        {\r\n                                            Subtitle = GetSubtitle();\r\n                                        });\r\n                                    }\r\n                                },\r\n                                error =>\r\n                                {\r\n                                    if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST)\r\n                                        && TLRPCError.TypeEquals(error, ErrorType.CHAT_ADMIN_REQUIRED))\r\n                                    {\r\n                                        channel.ChannelParticipants = null;\r\n                                        FileUtils.Delete(_participantsSyncRoot, channel.ChannelParticipantsFileName);\r\n                                    }\r\n                                });\r\n                        }\r\n                        else\r\n                        {\r\n                            FileUtils.Delete(_participantsSyncRoot, channel.ChannelParticipantsFileName);\r\n                        }\r\n\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            var channel49 = channel as TLChannel49;\r\n                            if (channel49 != null)\r\n                            {\r\n                                ShowPinnedMessage(channel49);\r\n                            }\r\n\r\n                            NotifyOfPropertyChange(() => HasBots);\r\n                            NotifyOfPropertyChange(() => With);\r\n                            Subtitle = GetSubtitle();\r\n\r\n                            if (channel.IsKicked)\r\n                            {\r\n                                DeleteChannelInternal(channel.Id);\r\n                            }\r\n                        });\r\n                    },\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        if (error.TypeEquals(ErrorType.CHANNEL_PRIVATE))\r\n                        {\r\n                            DeleteChannelInternal(channel.Id);\r\n                        }\r\n                    }));\r\n            }\r\n            else if (Peer is TLInputPeerBroadcast)\r\n            {\r\n                return;\r\n            }\r\n            else if (Peer is TLInputPeerChat)\r\n            {\r\n                var chat = With as TLChatBase;\r\n                if (chat == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                MTProtoService.GetFullChatAsync(chat.Id,\r\n                    result =>\r\n                    {\r\n                        var newUsersCache = new Dictionary<int, TLUserBase>();\r\n                        foreach (var user in result.Users)\r\n                        {\r\n                            newUsersCache[user.Index] = user;\r\n                        }\r\n\r\n                        chat.ChatPhoto = result.FullChat.ChatPhoto;\r\n                        chat.Participants = result.FullChat.Participants;\r\n                        chat.NotifySettings = result.FullChat.NotifySettings;\r\n                        var chatFull28 = result.FullChat as TLChatFull28;\r\n                        if (chatFull28 != null)\r\n                        {\r\n                            chat.ExportedInvite = chatFull28.ExportedInvite;\r\n                        }\r\n                        var chatFull31 = result.FullChat as TLChatFull31;\r\n                        if (chatFull31 != null)\r\n                        {\r\n                            chat.BotInfo = chatFull31.BotInfo;\r\n                            _cachedCommandResults.Clear();\r\n                            _commands = null;\r\n                            foreach (var botInfoBase in chatFull31.BotInfo)\r\n                            {\r\n                                var botInfo = botInfoBase as TLBotInfo;\r\n                                if (botInfo != null)\r\n                                {\r\n                                    TLUserBase user;\r\n                                    if (newUsersCache.TryGetValue(botInfo.UserId.Value, out user))\r\n                                    {\r\n                                        user.BotInfo = botInfo;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var participants = result.FullChat.Participants as IChatParticipants;\r\n                        if (participants != null)\r\n                        {\r\n                            var onlineUsers = 0;\r\n                            foreach (var participant in participants.Participants)\r\n                            {\r\n                                var user = newUsersCache[participant.UserId.Value];\r\n                                if (user.Status is TLUserStatusOnline)\r\n                                {\r\n                                    onlineUsers++;\r\n                                }\r\n                            }\r\n                            chat.UsersOnline = onlineUsers;\r\n                        }\r\n\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            NotifyOfPropertyChange(() => HasBots);\r\n                            NotifyOfPropertyChange(() => With);\r\n                            Subtitle = GetSubtitle();\r\n                        });\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                var user = With as TLUserBase;\r\n                if (user == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                MTProtoService.GetFullUserAsync(user.ToInputUser(),\r\n                    userFull =>\r\n                    {\r\n                        user.Link = userFull.Link;\r\n                        user.ProfilePhoto = userFull.ProfilePhoto;\r\n                        user.NotifySettings = userFull.NotifySettings;\r\n                        user.Blocked = userFull.Blocked;\r\n                        var userFull31 = userFull as TLUserFull31;\r\n                        if (userFull31 != null)\r\n                        {\r\n                            user.BotInfo = userFull31.BotInfo;\r\n                        }\r\n\r\n                        var userFull49 = userFull as TLUserFull49;\r\n                        if (userFull49 != null)\r\n                        {\r\n                            var user45 = user as TLUser45;\r\n                            if (user45 != null) user45.About = userFull49.About;\r\n                        }\r\n\r\n                        var userFull58 = userFull as TLUserFull58;\r\n                        if (userFull58 != null)\r\n                        {\r\n                            var user45 = user as TLUser45;\r\n                            if (user45 != null) user45.CommonChatsCount = userFull58.CommonChatsCount;\r\n                        }\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            NotifyOfPropertyChange(() => HasBots);\r\n                            NotifyOfPropertyChange(() => With);\r\n                            Subtitle = GetSubtitle();\r\n                        });\r\n                    });\r\n            }\r\n        }\r\n\r\n        private void SendLogs()\r\n        {\r\n            if (StateService.LogFileName != null)\r\n            {\r\n                var logFileName = StateService.LogFileName;\r\n\r\n#if WP8\r\n                Execute.BeginOnThreadPool(async () =>\r\n                {\r\n                    var file = await GetFileFromLocalFolder(logFileName);\r\n                    if (file != null)\r\n                    {\r\n                        SendDocument(file);\r\n                    }\r\n                });\r\n#else\r\n\r\n                SendDocument(logFileName);\r\n#endif\r\n\r\n                StateService.LogFileName = null;\r\n            }\r\n        }\r\n\r\n        private async void SendSharedPhoto()\r\n        {\r\n            if (!string.IsNullOrEmpty(StateService.FileId))\r\n            {\r\n                var fileId = StateService.FileId;\r\n                StateService.FileId = null;\r\n\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    var result = MessageBox.Show(AppResources.ForwardeMessageToThisChat, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                    if (result != MessageBoxResult.OK) return;\r\n\r\n                    BeginOnThreadPool(() =>\r\n                    {\r\n                        // Retrieve the photo from the media library using the FileID passed to the app.\r\n                        var library = new MediaLibrary();\r\n                        var photoFromLibrary = library.GetPictureFromToken(fileId);\r\n                        var image = photoFromLibrary.GetImage();\r\n                        var stream = new MemoryStream((int)image.Length);\r\n                        image.CopyTo(stream);\r\n                        var photo = new Photo\r\n                        {\r\n                            FileName = photoFromLibrary.Name,\r\n                            Bytes = stream.ToArray(),\r\n                            Width = photoFromLibrary.Width,\r\n                            Height = photoFromLibrary.Height\r\n                        };\r\n\r\n                        SendPhoto(photo);\r\n                    });\r\n                });\r\n            }\r\n            else if (StateService.StorageItems != null)\r\n            {\r\n                var imageFiles = new List<StorageFile>();\r\n                var videoFiles = new List<StorageFile>();\r\n                foreach (var storageItem in StateService.StorageItems)\r\n                {\r\n                    var storageFile = storageItem as StorageFile;\r\n                    if (storageFile != null)\r\n                    {\r\n                        var contentType = storageFile.ContentType;\r\n                        if (string.Equals(contentType, \"image/jpeg\")\r\n                            || string.Equals(contentType, \"image/png\")\r\n                            || string.Equals(contentType, \"image/bmp\")\r\n                            || string.Equals(contentType, \"image/x-windows-bmp\"))\r\n                        //var properties = await storageFile.GetBasicPropertiesAsync();\r\n                        //var videoProperties = await storageFile.Properties.GetVideoPropertiesAsync();\r\n                        //var imageProperties = await storageFile.Properties.GetImagePropertiesAsync();\r\n                        {\r\n                            imageFiles.Add(storageFile);\r\n                        }\r\n                        else if (string.Equals(contentType, \"video/mp4\"))\r\n                        {\r\n                            videoFiles.Add(storageFile);\r\n                        }\r\n                    }\r\n                }\r\n                StateService.StorageItems = null;\r\n\r\n                if (imageFiles.Count > 0)\r\n                {\r\n                    SendPhoto(imageFiles.AsReadOnly());\r\n                }\r\n                else if (videoFiles.Count > 0)\r\n                {\r\n                    SendVideo(videoFiles[0]);\r\n                }\r\n            }\r\n        }\r\n\r\n        public static IEnumerable<TLMessageBase> UngroupEnumerator(IEnumerable<TLMessageBase> source)\r\n        {\r\n            foreach (var messageBase in source)\r\n            {\r\n                var message = messageBase as TLMessage73;\r\n                if (message != null && message.GroupedId != null)\r\n                {\r\n                    var mediaGroup = message.Media as TLMessageMediaGroup;\r\n                    if (mediaGroup != null)\r\n                    {\r\n                        for (var i = mediaGroup.Group.Count - 1; i >= 0; i--)\r\n                        {\r\n                            yield return mediaGroup.Group[i];\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        yield return messageBase;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    yield return messageBase;\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLMessagesContainter GetForwardMessagesContainer(List<TLMessageBase> messages, bool withMyScore, TLPeerBase toPeer = null)\r\n        {\r\n            TLLong groupedId = null;\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                var message = messages[i] as TLMessage73;\r\n                if (message != null && message.GroupedId != null)\r\n                {\r\n                    if (i == 0)\r\n                    {\r\n                        groupedId = message.GroupedId;\r\n                    }\r\n                    else if (groupedId == null || groupedId.Value != message.GroupedId.Value)\r\n                    {\r\n                        groupedId = null;\r\n                        break;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    groupedId = null;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            var fwdMessages25 = new TLVector<TLMessage25>();\r\n            foreach (var messageBase in UngroupEnumerator(messages))\r\n            {\r\n                var message = messageBase as TLMessage;\r\n                if (message == null) continue;\r\n                if (message.HasTTL()) continue;\r\n                if (message.Index <= 0) continue;\r\n\r\n                var fwdFromId = message.FromId;\r\n\r\n                var messageForwarded = message as TLMessageForwarded;\r\n                if (messageForwarded != null)\r\n                {\r\n                    fwdFromId = messageForwarded.FwdFromId;\r\n                }\r\n\r\n                var message25 = message as TLMessage25;\r\n                if (message25 != null)\r\n                {\r\n                    if (message25.FwdFromId != null && message25.FwdFromId.Value != 0)\r\n                    {\r\n                        fwdFromId = message25.FwdFromId;\r\n                    }\r\n                }\r\n\r\n                TLReplyKeyboardBase replyMarkup = null;\r\n                var message31 = message as TLMessage31;\r\n                if (message31 != null)\r\n                {\r\n                    if (message31.ReplyMarkup != null)\r\n                    {\r\n                        replyMarkup = message31.ReplyMarkup;\r\n                    }\r\n                }\r\n\r\n                TLPeerBase fwdFromPeer = null;\r\n                var message40 = message as TLMessage40;\r\n                if (message40 != null)\r\n                {\r\n                    if (message40.FwdFromPeer != null)\r\n                    {\r\n                        fwdFromPeer = message40.FwdFromPeer;\r\n                    }\r\n                }\r\n\r\n                TLMessageFwdHeader fwdHeader = null;\r\n                var message48 = message as TLMessage48;\r\n                if (message48 != null)\r\n                {\r\n                    if (message48.FwdHeader != null)\r\n                    {\r\n                        fwdHeader = message48.FwdHeader;\r\n                    }\r\n                }\r\n\r\n                var fwdMessage = GetMessage(message.Message, GetForwardedMedia(message.Media)) as TLMessage73;\r\n                if (fwdMessage == null) continue;\r\n\r\n                if (toPeer != null)\r\n                {\r\n                    fwdMessage.ToId = toPeer;\r\n                }\r\n\r\n                if (replyMarkup != null)\r\n                {\r\n                    fwdMessage.ReplyMarkup = replyMarkup;\r\n                }\r\n\r\n                if (fwdHeader != null)\r\n                {\r\n                    fwdMessage.FwdHeader = fwdHeader;\r\n                }\r\n                else if (fwdFromPeer != null)\r\n                {\r\n                    fwdMessage.FwdHeader = GetFwdHeader(fwdFromPeer, message);\r\n                    //fwdMessage.FwdFromPeer = fwdFromPeer;\r\n                }\r\n                else if (fwdFromId != null && fwdFromId.Value <= 0)\r\n                {\r\n                    fwdMessage.FwdHeader = GetFwdHeader(message.ToId, message);\r\n                    //fwdMessage.FwdFromPeer = message.ToId;\r\n                }\r\n                else if (message.ToId is TLPeerChannel)\r\n                {\r\n                    var channel = CacheService.GetChat(message.ToId.Id) as TLChannel;\r\n                    if (channel != null && channel.IsMegaGroup)\r\n                    {\r\n                        // megagroup\r\n                        fwdMessage.FwdHeader = new TLMessageFwdHeader73 { Flags = new TLInt(0), FromId = message.FromId, Date = message.Date };\r\n                        //fwdMessage.FwdFromPeer = new TLPeerUser { Id = message.FromId };\r\n                    }\r\n                    else\r\n                    {\r\n                        // channel\r\n                        fwdMessage.FwdHeader = new TLMessageFwdHeader73 { Flags = new TLInt(0), FromId = message.FromId, Date = message.Date };\r\n\r\n                        if (channel.IsBroadcast)\r\n                        {\r\n                            fwdMessage.FwdHeader.ChannelId = channel.Id;\r\n                            fwdMessage.FwdHeader.ChannelPost = message.Id;\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    fwdMessage.FwdHeader = new TLMessageFwdHeader73 { Flags = new TLInt(0), FromId = fwdFromId, Date = message.Date };\r\n                    //fwdMessage.FwdFromPeer = new TLPeerUser{ Id = fwdFromId };\r\n                }\r\n                fwdMessage.FwdMessageId = message.Id;\r\n                //fwdMessage.FwdDate = message.Date;\r\n                fwdMessage.SetFwd();\r\n\r\n                if (message.ToId is TLPeerChannel)\r\n                {\r\n                    var fromChannel = CacheService.GetChat(message.ToId.Id) as TLChannel;\r\n                    if (fromChannel != null)\r\n                    {\r\n                        fwdMessage.FwdFromChannelPeer = fromChannel.ToInputPeer();\r\n                    }\r\n\r\n                    // author to fwd_from\r\n                    if (fromChannel.IsBroadcast && message.FromId != null && message.FromId.Value >= 0)\r\n                    {\r\n                        fwdMessage.FwdHeader.FromId = message.FromId;\r\n                    }\r\n                }\r\n                else if (message.ToId is TLPeerChat)\r\n                {\r\n                    var fromChat = CacheService.GetChat(message.ToId.Id);\r\n                    if (fromChat != null)\r\n                    {\r\n                        fwdMessage.FwdFromChannelPeer = fromChat.ToInputPeer();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    var fromUser = CacheService.GetUser(message.Out.Value ? message.ToId.Id : message.FromId);\r\n                    if (fromUser != null)\r\n                    {\r\n                        fwdMessage.FwdFromChannelPeer = fromUser.ToInputPeer();\r\n                    }\r\n                }\r\n\r\n                if (fwdFromId != null\r\n                    && fwdFromId.Value == StateService.CurrentUserId\r\n                    && toPeer is TLPeerUser\r\n                    && toPeer.Id.Value == StateService.CurrentUserId\r\n                    && fwdMessage.FwdHeader != null\r\n                    && fwdMessage.FwdHeader.ChannelId == null\r\n                    && fwdMessage.FwdHeader.ChannelPost == null)\r\n                {\r\n                    fwdMessage.FwdHeader = null;\r\n                }\r\n\r\n                var message34 = message as TLMessage34;\r\n                if (message34 != null)\r\n                {\r\n                    fwdMessage.Entities = message48.Entities;\r\n                }\r\n\r\n                if (message40 != null)\r\n                {\r\n                    fwdMessage.Views = message40.Views;\r\n                }\r\n\r\n                if (message48 != null)\r\n                {\r\n                    fwdMessage.ViaBotId = message48.ViaBotId;\r\n                }\r\n\r\n                var message73 = message as TLMessage73;\r\n                if (message73 != null)\r\n                {\r\n                    fwdMessage.GroupedId = groupedId;\r\n                }\r\n\r\n                var mediaAudio = fwdMessage.Media as TLMessageMediaDocument45;\r\n                if (mediaAudio != null && message.IsVoice())\r\n                {\r\n                    var fwdMediaAudio = new TLMessageMediaDocument75\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Document = mediaAudio.Document,\r\n                        Caption = TLString.Empty,\r\n                        IsoFileName = mediaAudio.IsoFileName\r\n                    };\r\n\r\n                    var channel = With as TLChannel;\r\n                    fwdMediaAudio.NotListened = channel == null;\r\n                    fwdMessage.NotListened = channel == null;\r\n\r\n                    fwdMessage._media = fwdMediaAudio;\r\n                }\r\n\r\n                var mediaGame = fwdMessage.Media as TLMessageMediaGame;\r\n                if (mediaGame != null)\r\n                {\r\n                    mediaGame.SourceMessage = fwdMessage;\r\n                }\r\n\r\n                fwdMessages25.Add(fwdMessage);\r\n            }\r\n\r\n            var container = new TLMessagesContainter\r\n            {\r\n                FwdMessages = fwdMessages25,\r\n                WithMyScore = withMyScore\r\n            };\r\n\r\n            return container;\r\n        }\r\n\r\n        private void SendForwardMessages()\r\n        {\r\n            if (With is TLBroadcastChat && !(With is TLChannel)) return;\r\n\r\n            var withMyScore = StateService.WithMyScore;\r\n            StateService.WithMyScore = false;\r\n\r\n            var messages = StateService.ForwardMessages;\r\n            StateService.ForwardMessages = null;\r\n\r\n            if (messages != null)\r\n            {\r\n                var container = GetForwardMessagesContainer(messages, withMyScore);\r\n\r\n                if (container.FwdMessages.Count > 0)\r\n                {\r\n                    Reply = container;\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLMessageMediaBase GetForwardedMedia(TLMessageMediaBase mediaBase)\r\n        {\r\n            var mediaGeoLive = mediaBase as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive != null)\r\n            {\r\n                return mediaGeoLive.ToMediaGeo();\r\n            }\r\n\r\n            return mediaBase;\r\n        }\r\n\r\n        private TLMessageFwdHeader GetFwdHeader(TLPeerBase peer, TLMessageCommon message)\r\n        {\r\n            var peerChannel = peer as TLPeerChannel;\r\n            if (peerChannel != null)\r\n            {\r\n                var fwdHeader = new TLMessageFwdHeader73\r\n                {\r\n                    Flags = new TLInt(0),\r\n                    ChannelId = peerChannel.Id,\r\n                    ChannelPost = message.Id,\r\n                    Date = message.Date\r\n                };\r\n\r\n                return fwdHeader;\r\n            }\r\n\r\n            return new TLMessageFwdHeader\r\n            {\r\n                Flags = new TLInt(0),\r\n                FromId = peer.Id,\r\n                Date = message.Date\r\n            };\r\n        }\r\n\r\n        private static void SendForwardedMessages(IMTProtoService mtProtoService, TLInputPeerBase peer, TLMessageBase message)\r\n        {\r\n            var messagesContainer = message.Reply as TLMessagesContainter;\r\n            if (messagesContainer != null)\r\n            {\r\n                SendForwardMessagesInternal(mtProtoService, peer, null, messagesContainer.FwdMessages, messagesContainer.WithMyScore);\r\n\r\n                message.Reply = null;\r\n            }\r\n        }\r\n\r\n        private void SendForwardMessageInternal(TLInt fwdMessageId, TLMessage25 message)\r\n        {\r\n            MTProtoService.ForwardMessageAsync(\r\n                Peer, fwdMessageId,\r\n                message,\r\n                result =>\r\n                {\r\n                    message.Status = MessageStatus.Confirmed;\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                    {\r\n                        //MessageBox.Show(AppResources.PeerFloodSendMessage, AppResources.Error, MessageBoxButton.OK);\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodSendMessage, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                            result =>\r\n                            {\r\n                                if (result == CustomMessageBoxResult.RightButton)\r\n                                {\r\n                                    TelegramViewBase.NavigateToUsername(MTProtoService, Constants.SpambotUsername, null, null, null);\r\n                                }\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.forward error \" + error);\r\n                    }\r\n                    Status = string.Empty;\r\n                    if (message.Status == MessageStatus.Sending)\r\n                    {\r\n                        message.Status = message.Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public static void SendForwardMessagesInternal(IMTProtoService mtProtoService, TLInputPeerBase toPeer, TLMessage25 comment, IList<TLMessage25> messages, bool withMyScore = false)\r\n        {\r\n            var noneChannelMessages = new List<TLMessage25>();\r\n            var noneChannelMessagesId = new TLVector<TLInt>();\r\n            var channelMessages = new List<TLMessage25>();\r\n            var channelMessagesId = new TLVector<TLInt>();\r\n            var messagesId = new TLVector<TLInt>();\r\n            foreach (TLMessage40 message in messages)\r\n            {\r\n                messagesId.Add(message.FwdMessageId);\r\n\r\n                var message48 = message as TLMessage48;\r\n                if (message48 != null && message48.FwdHeader != null && message48.FwdHeader.ChannelId != null && message48.FwdHeader.ChannelPost != null)\r\n                {\r\n                    channelMessages.Add(message);\r\n                    channelMessagesId.Add(message.FwdMessageId);\r\n                }\r\n                else if (message.FwdFromPeer is TLPeerChannel || message.FwdFromChannelPeer != null)\r\n                {\r\n                    channelMessages.Add(message);\r\n                    channelMessagesId.Add(message.FwdMessageId);\r\n                }\r\n                else\r\n                {\r\n                    noneChannelMessages.Add(message);\r\n                    noneChannelMessagesId.Add(message.FwdMessageId);\r\n                }\r\n            }\r\n\r\n            if (noneChannelMessages.Count > 0 && channelMessages.Count > 0)\r\n            {\r\n                ForwardMessagesAsync(mtProtoService, toPeer, comment, noneChannelMessagesId, noneChannelMessages, withMyScore,\r\n                    () => ForwardMessagesAsync(mtProtoService, toPeer, null, channelMessagesId, channelMessages, withMyScore));\r\n\r\n                return;\r\n            }\r\n\r\n            ForwardMessagesAsync(mtProtoService, toPeer, comment, messagesId, messages, withMyScore);\r\n        }\r\n\r\n        private static void ForwardMessagesAsync(IMTProtoService mtProtoService, TLInputPeerBase toPeer, TLMessage25 comment, TLVector<TLInt> fwdMessageIds, IList<TLMessage25> messages, bool withMyScore, System.Action callback = null)\r\n        {\r\n            mtProtoService.ForwardMessagesAsync(\r\n                comment,\r\n                toPeer,\r\n                fwdMessageIds,\r\n                messages,\r\n                withMyScore,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var firstMessage = messages.FirstOrDefault() as TLMessage73;\r\n                    if (firstMessage != null && firstMessage.GroupedId != null)\r\n                    {\r\n                        IoC.Get<ITelegramEventAggregator>().Publish(new ForwardGroupedEventArgs { GroupedId = firstMessage.GroupedId, Messages = messages });\r\n                    }\r\n\r\n                    foreach (var message in messages)\r\n                    {\r\n                        var mediaGame = message.Media as TLMessageMediaGame;\r\n                        if (mediaGame != null)\r\n                        {\r\n                            mediaGame.NotifyOfPropertyChange(() => mediaGame.Message);\r\n                            mediaGame.NotifyOfPropertyChange(() => mediaGame.MessageVisibility);\r\n                            mediaGame.NotifyOfPropertyChange(() => mediaGame.DescriptionVisibility);\r\n\r\n                            var message31 = message as TLMessage31;\r\n                            if (message31 != null)\r\n                            {\r\n                                message31.NotifyOfPropertyChange(() => message31.ReplyMarkup);\r\n                            }\r\n                            var message48 = message as TLMessage48;\r\n                            if (message48 != null)\r\n                            {\r\n                                message48.NotifyOfPropertyChange(() => message48.FwdFromPeerVisibility);\r\n                            }\r\n                            message.NotifyOfPropertyChange(() => message.ViaBotVisibility);\r\n                            message.NotifyOfPropertyChange(() => message.ViaBot);\r\n                            message.NotifyOfPropertyChange(() => message.Message);\r\n                        }\r\n                    }\r\n\r\n                    callback.SafeInvoke();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (error.TypeEquals(ErrorType.PEER_FLOOD))\r\n                    {\r\n                        //MessageBox.Show(AppResources.PeerFloodSendMessage, AppResources.Error, MessageBoxButton.OK);\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.PeerFloodSendMessage, AppResources.Error, AppResources.MoreInfo.ToLowerInvariant(), AppResources.Ok.ToLowerInvariant(),\r\n                            result =>\r\n                            {\r\n                                if (result == CustomMessageBoxResult.RightButton)\r\n                                {\r\n                                    TelegramViewBase.NavigateToUsername(mtProtoService, Constants.SpambotUsername, null, null, null);\r\n                                }\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.forwardMessages error \" + error);\r\n                    }\r\n                    foreach (var message in messages)\r\n                    {\r\n                        if (message.Status == MessageStatus.Sending)\r\n                        {\r\n                            message.Status = message.Index != 0 ? MessageStatus.Confirmed : MessageStatus.Failed;\r\n                        }\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private bool _isOnline;\r\n\r\n        public string RandomParam;\r\n\r\n        private bool _isActive;\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            ShellViewModel.WriteTimer(\"DialogDetailsViewModel start OnActivate\");\r\n\r\n            base.OnActivate();\r\n\r\n            ShellViewModel.WriteTimer(\"DialogDetailsViewModel stop OnActivate\");\r\n        }\r\n\r\n        public void OnInvokeCommand(object sender, TelegramCommandEventArgs e)\r\n        {\r\n            var commandIndex = e.Command.LastIndexOf('/');\r\n            if (commandIndex != -1)\r\n            {\r\n                var command = e.Command.Substring(commandIndex);\r\n\r\n                if (With is TLChatBase)\r\n                {\r\n                    var message31 = e.Message as TLMessage31;\r\n                    if (message31 == null && e.Media != null)\r\n                    {\r\n                        message31 = Items.FirstOrDefault(x => x is TLMessage31 && ((TLMessage31)x).Media == e.Media) as TLMessage31;\r\n                    }\r\n\r\n                    if (message31 != null && !message31.Out.Value)\r\n                    {\r\n                        var user = CacheService.GetUser(message31.FromId) as TLUser;\r\n                        if (user != null && user.IsBot && !command.Contains(\"@\") && (!IsSingleBot || IsChannel))\r\n                        {\r\n                            command += string.Format(\"@{0}\", user.UserName);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(command))\r\n                {\r\n                    _text = command;\r\n                    SendInternal(false, true);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void OnOpenGame(object sender, TelegramGameEventArgs e)\r\n        {\r\n            var serviceMessage = e.Message as TLMessageService;\r\n            if (serviceMessage == null) return;\r\n\r\n            OpenReply(serviceMessage);\r\n\r\n            return;\r\n\r\n            var messageGameScoreAction = serviceMessage.Action as TLMessageActionGameScore;\r\n            if (messageGameScoreAction != null)\r\n            {\r\n                var game = ServiceMessageToTextConverter.GetGame(serviceMessage);\r\n                if (game != null)\r\n                {\r\n                    var bot = GetBot(serviceMessage.Reply);\r\n                    if (bot == null) return;\r\n\r\n                    OpenGame(serviceMessage.Reply, bot, game);\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void OnSearchHashtag(object sender, TelegramHashtagEventArgs e)\r\n        {\r\n            var hashtagIndex = e.Hashtag.IndexOf('#');\r\n            if (hashtagIndex != -1)\r\n            {\r\n                var hashtag = e.Hashtag.Substring(hashtagIndex);\r\n\r\n                if (!string.IsNullOrEmpty(hashtag))\r\n                {\r\n                    TelegramViewBase.NavigateToHashtag(hashtag);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void OnMentionNavigated(object sender, TelegramMentionEventArgs e)\r\n        {\r\n            if (!string.IsNullOrEmpty(e.Mention))\r\n            {\r\n                var usernameStartIndex = e.Mention.LastIndexOf(\"@\", StringComparison.OrdinalIgnoreCase);\r\n                if (usernameStartIndex != -1)\r\n                {\r\n                    var username = e.Mention.Substring(usernameStartIndex).TrimStart('@');\r\n\r\n                    if (!string.IsNullOrEmpty(username))\r\n                    {\r\n                        TelegramViewBase.NavigateToUsername(MTProtoService, username, string.Empty, string.Empty, string.Empty, PageKind.Profile);\r\n                    }\r\n                }\r\n            }\r\n            else if (e.UserId > 0)\r\n            {\r\n                var user = CacheService.GetUser(new TLInt(e.UserId));\r\n                if (user != null)\r\n                {\r\n                    TelegramViewBase.NavigateToUser(user, null, PageKind.Profile);\r\n                }\r\n            }\r\n            else if (e.ChatId > 0)\r\n            {\r\n                var chat = CacheService.GetChat(new TLInt(e.ChatId));\r\n                if (chat != null)\r\n                {\r\n                    TelegramViewBase.NavigateToChat(chat, string.Empty);\r\n                }\r\n            }\r\n            else if (e.ChannelId > 0)\r\n            {\r\n                var channel = CacheService.GetChat(new TLInt(e.ChannelId)) as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    TelegramViewBase.NavigateToChat(channel, string.Empty);\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void OnTelegramLinkActionCommon(IMTProtoService mtProtoService, IStateService stateService, TelegramEventArgs e, IUserName openedUsername, Action<string> callback)\r\n        {\r\n            if (e.Uri.Contains(\"joinchat\"))\r\n            {\r\n                var hashStartIndex = e.Uri.TrimEnd('/').LastIndexOf(\"/\", StringComparison.OrdinalIgnoreCase);\r\n                if (hashStartIndex != -1)\r\n                {\r\n                    var hash = e.Uri.Substring(hashStartIndex).Replace(\"/\", string.Empty);\r\n\r\n                    if (!string.IsNullOrEmpty(hash))\r\n                    {\r\n                        TelegramViewBase.NavigateToInviteLink(mtProtoService, hash);\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            if (e.Uri.Contains(\"addstickers\"))\r\n            {\r\n                var shortNameStartIndex = e.Uri.TrimEnd('/').LastIndexOf(\"/\", StringComparison.OrdinalIgnoreCase);\r\n                if (shortNameStartIndex != -1)\r\n                {\r\n                    var shortName = e.Uri.Substring(shortNameStartIndex).Replace(\"/\", string.Empty);\r\n\r\n                    if (!string.IsNullOrEmpty(shortName))\r\n                    {\r\n                        var inputStickerSet = new TLInputStickerSetShortName { ShortName = new TLString(shortName) };\r\n                        TelegramViewBase.NavigateToStickers(mtProtoService, stateService, inputStickerSet);\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var tempUri = HttpUtility.UrlDecode(e.Uri);\r\n\r\n            Dictionary<string, string> uriParams = null;\r\n            try\r\n            {\r\n                uriParams = TelegramUriMapper.ParseQueryString(tempUri);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\"Parse uri exception \" + tempUri + ex);\r\n            }\r\n            PageKind pageKind;\r\n            var accessToken = TelegramViewBase.GetAccessToken(uriParams, out pageKind);\r\n            var post = TelegramViewBase.GetPost(uriParams);\r\n            var game = TelegramViewBase.GetGame(uriParams);\r\n\r\n            var uri = e.Uri.StartsWith(\"https://\") || e.Uri.StartsWith(\"http://\") ? e.Uri : \"https://\" + e.Uri;\r\n            Uri telegramUri;\r\n            if (Uri.TryCreate(uri, UriKind.Absolute, out telegramUri))\r\n            {\r\n                var segments = telegramUri.Segments;\r\n                if (segments.Length >= 2)\r\n                {\r\n                    var username = segments[1].Replace(\"/\", string.Empty);\r\n\r\n                    if (string.IsNullOrEmpty(post))\r\n                    {\r\n                        if (segments.Length >= 3)\r\n                        {\r\n                            post = segments[2].Replace(\"/\", string.Empty);\r\n                        }\r\n                    }\r\n                    if (!string.IsNullOrEmpty(username))\r\n                    {\r\n                        if (string.Equals(username, \"confirmphone\", StringComparison.OrdinalIgnoreCase))\r\n                        {\r\n                            var phone = TelegramViewBase.GetPhone(uriParams);\r\n                            var hash = TelegramViewBase.GetHash(uriParams);\r\n\r\n                            TelegramViewBase.NavigateToConfirmPhone(mtProtoService, phone, hash);\r\n\r\n                            return;\r\n                        }\r\n                        if (string.Equals(username, \"socks\", StringComparison.OrdinalIgnoreCase))\r\n                        {\r\n                            var server = TelegramViewBase.GetParam(\"server\", uriParams);\r\n                            var port = TelegramViewBase.GetParam(\"port\", uriParams);\r\n                            var user = TelegramViewBase.GetParam(\"user\", uriParams);\r\n                            var pass = TelegramViewBase.GetParam(\"pass\", uriParams);\r\n\r\n                            if (!string.IsNullOrEmpty(server) && !string.IsNullOrEmpty(port))\r\n                            {\r\n                                int portInt;\r\n                                if (int.TryParse(port, out portInt)\r\n                                    && portInt >= 0)\r\n                                {\r\n                                    TelegramViewBase.NavigateToSocksProxy(server, portInt, user, pass);\r\n                                }\r\n                            }\r\n\r\n                            return;\r\n                        }\r\n                        if (string.Equals(username, \"proxy\", StringComparison.OrdinalIgnoreCase))\r\n                        {\r\n                            var server = TelegramViewBase.GetParam(\"server\", uriParams);\r\n                            var port = TelegramViewBase.GetParam(\"port\", uriParams);\r\n                            var secret = TelegramViewBase.GetParam(\"secret\", uriParams);\r\n\r\n                            if (!string.IsNullOrEmpty(server) && !string.IsNullOrEmpty(port))\r\n                            {\r\n                                int portInt;\r\n                                if (int.TryParse(port, out portInt)\r\n                                    && portInt >= 0\r\n                                    && !string.IsNullOrEmpty(secret))\r\n                                {\r\n                                    TelegramViewBase.NavigateToMTProtoProxy(server, portInt, secret);\r\n                                }\r\n                            }\r\n\r\n                            return;\r\n                        }\r\n                        //if (openedUsername != null\r\n                        //    && TLString.Equals(new TLString(username), openedUsername.UserName, StringComparison.OrdinalIgnoreCase))\r\n                        //{\r\n                        //    callback.SafeInvoke(post);\r\n                        //}\r\n                        //else\r\n                        {\r\n                            TelegramViewBase.NavigateToUsername(mtProtoService, username, accessToken, post, game, pageKind);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void OnTelegramLinkAction(object sender, TelegramEventArgs e)\r\n        {\r\n            OnTelegramLinkActionCommon(MTProtoService, StateService, e, With as IUserName,\r\n                postString =>\r\n                {\r\n                    var channel = With as TLChannel;\r\n                    if (channel != null)\r\n                    {\r\n                        int post;\r\n                        if (int.TryParse(postString, out post))\r\n                        {\r\n                            OpenMessage(null, new TLInt(post));\r\n                        }\r\n                    }\r\n                });\r\n        }\r\n\r\n        private bool _disableWatching;\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            ShellViewModel.WriteTimer(\"DialogDetailsViewModel start OnDeactivate\");\r\n            InputTypingManager.Stop();\r\n\r\n            SaveUnsendedTextAsync(_text);\r\n\r\n            if (_watcher != null)\r\n            {\r\n                _watcher.Stop();\r\n                _disableWatching = true;\r\n            }\r\n\r\n            base.OnDeactivate(close);\r\n\r\n            ShellViewModel.WriteTimer(\"DialogDetailsViewModel stop OnDeactivate\");\r\n        }\r\n\r\n        private Typing GetTyping(IList<Telegram.Api.WindowsPhone.Tuple<int, TLSendMessageActionBase>> typingUsers)\r\n        {\r\n            return DialogsViewModel.GetTyping(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId), typingUsers, CacheService.GetUser, null);\r\n        }\r\n\r\n        private string GetSubtitle()\r\n        {\r\n            Typing = null;\r\n\r\n            var channel = With as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (channel.IsMegaGroup)\r\n                {\r\n                    System.Diagnostics.Debug.WriteLine(\"channel_participants=\" + channel.ChannelParticipants + \" participants_count=\" + channel.ParticipantsCount);\r\n\r\n                    if (channel.ChannelParticipants != null)\r\n                    {\r\n                        var config = CacheService.GetConfig();\r\n                        if (config != null\r\n                            && channel.ChannelParticipants.Count.Value <= config.ChatSizeMax.Value)\r\n                        {\r\n                            var participantsCount = channel.ChannelParticipants.Count.Value;\r\n                            var onlineCount = channel.ChannelParticipants.Users.Count(x => x.Status is TLUserStatusOnline);\r\n                            var onlineString = onlineCount > 0 ? string.Format(\", {0} {1}\", onlineCount, AppResources.Online.ToLowerInvariant()) : string.Empty;\r\n\r\n                            var currentUser = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n                            var isCurrentUserOnline = currentUser != null && currentUser.Status is TLUserStatusOnline;\r\n                            if (participantsCount == 1 || (onlineCount == 1 && isCurrentUserOnline))\r\n                            {\r\n                                onlineString = string.Empty;\r\n                            }\r\n\r\n                            return Language.Declension(\r\n                                participantsCount,\r\n                                AppResources.CompanyNominativeSingular,\r\n                                AppResources.CompanyNominativePlural,\r\n                                AppResources.CompanyGenitiveSingular,\r\n                                AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture)\r\n                                + onlineString;\r\n                        }\r\n                    }\r\n\r\n                    if (channel.ParticipantsCount != null)\r\n                    {\r\n                        return Language.Declension(\r\n                            channel.ParticipantsCount.Value,\r\n                            AppResources.CompanyNominativeSingular,\r\n                            AppResources.CompanyNominativePlural,\r\n                            AppResources.CompanyGenitiveSingular,\r\n                            AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                    }\r\n\r\n                    return AppResources.Loading.ToLowerInvariant();\r\n                }\r\n\r\n                if (channel.ParticipantsCount != null)\r\n                {\r\n                    return Language.Declension(\r\n                        channel.ParticipantsCount.Value,\r\n                        AppResources.CompanyNominativeSingular,\r\n                        AppResources.CompanyNominativePlural,\r\n                        AppResources.CompanyGenitiveSingular,\r\n                        AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                }\r\n\r\n                return channel.IsPublic ? AppResources.PublicChannel.ToLowerInvariant() : AppResources.PrivateChannel.ToLowerInvariant();\r\n            }\r\n\r\n            var user = With as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                return GetUserStatus(user);\r\n            }\r\n\r\n            var chat = With as TLChat;\r\n            if (chat != null)\r\n            {\r\n                var participantsCount = chat.ParticipantsCount.Value;\r\n                var onlineCount = chat.UsersOnline;\r\n                var onlineString = onlineCount > 0 ? string.Format(\", {0} {1}\", chat.UsersOnline, AppResources.Online.ToLowerInvariant()) : string.Empty;\r\n\r\n                var currentUser = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n                var isCurrentUserOnline = currentUser != null && currentUser.Status is TLUserStatusOnline;\r\n                if (participantsCount == 1 || (onlineCount == 1 && isCurrentUserOnline))\r\n                {\r\n                    onlineString = string.Empty;\r\n                }\r\n\r\n                return Language.Declension(\r\n                    participantsCount,\r\n                    AppResources.CompanyNominativeSingular,\r\n                    AppResources.CompanyNominativePlural,\r\n                    AppResources.CompanyGenitiveSingular,\r\n                    AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture)\r\n                    + onlineString;\r\n            }\r\n\r\n            var forbiddenChat = With as TLChatForbidden;\r\n            if (forbiddenChat != null)\r\n            {\r\n                return LowercaseConverter.Convert(AppResources.YouWhereKickedFromTheGroup);\r\n            }\r\n\r\n            var broadcastChat = With as TLBroadcastChat;\r\n            if (broadcastChat != null)\r\n            {\r\n                var participantsCount = broadcastChat.ParticipantIds.Count;\r\n                var onlineParticipantsCount = 0;\r\n                foreach (var participantId in broadcastChat.ParticipantIds)\r\n                {\r\n                    var participant = CacheService.GetUser(participantId);\r\n                    if (participant != null && participant.Status is TLUserStatusOnline)\r\n                    {\r\n                        onlineParticipantsCount++;\r\n                    }\r\n                }\r\n\r\n                var onlineString = onlineParticipantsCount > 0 ? string.Format(\", {0} {1}\", onlineParticipantsCount, AppResources.Online.ToLowerInvariant()) : string.Empty;\r\n\r\n                return Language.Declension(\r\n                    participantsCount,\r\n                    AppResources.CompanyNominativeSingular,\r\n                    AppResources.CompanyNominativePlural,\r\n                    AppResources.CompanyGenitiveSingular,\r\n                    AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture)\r\n                    + onlineString;\r\n            }\r\n\r\n            var channels = With as TLVector<TLChatBase>;\r\n            if (channels != null)\r\n            {\r\n                return Language.Declension(\r\n                    channels.Count,\r\n                    AppResources.ChannelNominativeSingular,\r\n                    AppResources.ChannelNominativePlural,\r\n                    AppResources.ChannelGenitiveSingular,\r\n                    AppResources.ChannelGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public static string GetUserStatus(TLUserBase userBase)\r\n        {\r\n            if (userBase.Index == Constants.TelegramNotificationsId)\r\n            {\r\n                return AppResources.ServiceNotifications.ToLowerInvariant();\r\n            }\r\n\r\n            var user = userBase as TLUser;\r\n            if (user != null && user.IsBot)\r\n            {\r\n                return AppResources.Bot.ToLowerInvariant();\r\n            }\r\n\r\n            if (userBase.IsSelf)\r\n            {\r\n                return AppResources.ChatWithYourself.ToLowerInvariant();\r\n            }\r\n\r\n            return UserStatusToStringConverter.Convert(userBase.Status);\r\n        }\r\n\r\n        public void ShowLastSyncErrors(Action<string> callback = null)\r\n        {\r\n            MTProtoService.GetSyncErrorsAsync((syncMessageError, processDifferenceErrors) =>\r\n            {\r\n                var info = new StringBuilder();\r\n\r\n                info.AppendLine(\"syncMessage last error: \");\r\n                info.AppendLine(syncMessageError == null ? \"none\" : syncMessageError.ToString());\r\n                info.AppendLine();\r\n                info.AppendLine(\"syncDifference last error: \");\r\n                if (processDifferenceErrors == null || processDifferenceErrors.Count == 0)\r\n                {\r\n                    info.AppendLine(\"none\");\r\n                }\r\n                else\r\n                {\r\n                    foreach (var processDifferenceError in processDifferenceErrors)\r\n                    {\r\n                        info.AppendLine(processDifferenceError.ToString());\r\n                    }\r\n                }\r\n\r\n                var infoString = info.ToString();\r\n                Execute.BeginOnUIThread(() => MessageBox.Show(infoString));\r\n\r\n                callback.SafeInvoke(infoString);\r\n            });\r\n        }\r\n\r\n        public void ShowMessagesInfo(int limit = 15, Action<string> callback = null)\r\n        {\r\n            MTProtoService.GetSendingQueueInfoAsync(queueInfo =>\r\n            {\r\n                var info = new StringBuilder();\r\n\r\n                info.AppendLine(\"Queue: \");\r\n                info.AppendLine(queueInfo);\r\n\r\n                var dialogMessages = Items.Take(limit);\r\n                info.AppendLine(\"Dialog: \");\r\n                var count = 0;\r\n                foreach (var dialogMessage in dialogMessages)\r\n                {\r\n                    info.AppendLine(\"  \" + count++ + \" \" + dialogMessage);\r\n                }\r\n\r\n                dialogMessages = CacheService.GetHistory(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId), limit);\r\n                info.AppendLine();\r\n                info.AppendLine(\"Database: \");\r\n                count = 0;\r\n                foreach (var dialogMessage in dialogMessages)\r\n                {\r\n                    info.AppendLine(\"  \" + count++ + \" \" + dialogMessage);\r\n                }\r\n                var infoString = info.ToString();\r\n                Execute.BeginOnUIThread(() => MessageBox.Show(infoString));\r\n\r\n                callback.SafeInvoke(infoString);\r\n            });\r\n        }\r\n\r\n        private void ShowConfigInfo(Action<string> callback)\r\n        {\r\n            MTProtoService.GetConfigInformationAsync(callback.SafeInvoke);\r\n        }\r\n\r\n        private void ShowTransportInfo(Action<string> callback)\r\n        {\r\n            MTProtoService.GetTransportInformationAsync(callback.SafeInvoke);\r\n        }\r\n\r\n        public void OnNavigatedTo()\r\n        {\r\n            _isActive = true;\r\n            StateService.ActiveDialog = With;\r\n\r\n            var messagesContainer = Reply as TLMessagesContainter;\r\n            if (messagesContainer != null && messagesContainer.EditMessage != null)\r\n            {\r\n                _editMessageTimer.Start();\r\n            }\r\n        }\r\n\r\n        public void OnNavigatedFrom()\r\n        {\r\n            _isActive = false;\r\n            StateService.ActiveDialog = null;\r\n\r\n            if (_editMessageTimer != null) _editMessageTimer.Stop();\r\n        }\r\n\r\n        private InputTypingManager _inputTypingManager;\r\n\r\n        public InputTypingManager InputTypingManager\r\n        {\r\n            get\r\n            {\r\n                return _inputTypingManager =\r\n                    _inputTypingManager ??\r\n                    new InputTypingManager(\r\n                        users =>\r\n                        {\r\n                            var typing = GetTyping(users);\r\n                            Subtitle = typing != null ? typing.ToString() : null;\r\n                            Typing = typing;\r\n                        },\r\n                        () =>\r\n                        {\r\n                            Subtitle = GetSubtitle();\r\n                            Typing = null;\r\n                        });\r\n            }\r\n        }\r\n\r\n        private OutputTypingManager _textTypingManager;\r\n\r\n        public OutputTypingManager TextTypingManager\r\n        {\r\n            get\r\n            {\r\n                return _textTypingManager =\r\n                    _textTypingManager ??\r\n                    new OutputTypingManager(Peer, Constants.SetTypingIntervalInSeconds,\r\n                        action => MTProtoService.SetTypingAsync(_peer, action ?? new TLSendMessageTypingAction(), result => { }),\r\n                        () => MTProtoService.SetTypingAsync(_peer, new TLSendMessageCancelAction(), result => { }));\r\n            }\r\n        }\r\n\r\n        private OutputTypingManager _audioTypingManager;\r\n\r\n        public OutputTypingManager AudioTypingManager\r\n        {\r\n            get\r\n            {\r\n                return _audioTypingManager =\r\n                    _audioTypingManager ??\r\n                    new OutputTypingManager(Peer, Constants.SetTypingIntervalInSeconds,\r\n                        action => MTProtoService.SetTypingAsync(_peer, action ?? new TLSendMessageRecordAudioAction(), result => { }),\r\n                        () => MTProtoService.SetTypingAsync(_peer, new TLSendMessageCancelAction(), result => { }));\r\n            }\r\n        }\r\n\r\n        private OutputTypingManager _uploadTypingManager;\r\n\r\n        public OutputTypingManager UploadTypingManager\r\n        {\r\n            get\r\n            {\r\n                return _uploadTypingManager =\r\n                    _uploadTypingManager ??\r\n                    new OutputTypingManager(Peer, Constants.SetTypingIntervalInSeconds,\r\n                        action => MTProtoService.SetTypingAsync(_peer, action ?? new TLSendMessageTypingAction(), result => { }),\r\n                        () => MTProtoService.SetTypingAsync(_peer, new TLSendMessageCancelAction(), result => { }));\r\n            }\r\n        }\r\n\r\n        public TLMessage34 GetMessage(TLString text, TLMessageMediaBase media)\r\n        {\r\n            var broadcast = With as TLBroadcastChat;\r\n            var channel = With as TLChannel;\r\n            var toId = channel != null\r\n                ? new TLPeerChannel { Id = channel.Id }\r\n                : broadcast != null\r\n                ? new TLPeerBroadcast { Id = broadcast.Id }\r\n                : TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId);\r\n\r\n            var date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n\r\n            var message = TLUtils.GetMessage(\r\n                new TLInt(StateService.CurrentUserId),\r\n                toId,\r\n                broadcast != null && channel == null ? MessageStatus.Broadcast : MessageStatus.Sending,\r\n                TLBool.True,\r\n                TLBool.True,\r\n                date,\r\n                text,\r\n                media,\r\n                TLLong.Random(),\r\n                new TLInt(0)\r\n            );\r\n\r\n            return message;\r\n        }\r\n\r\n        public void ReportSpam()\r\n        {\r\n            if (Peer is TLInputPeerBroadcast && !(Peer is TLInputPeerChannel))\r\n            {\r\n                return;\r\n            }\r\n\r\n            var spamConfirmation = MessageBox.Show(\"Are you sure you want to report spam?\", AppResources.AppName,\r\n                MessageBoxButton.OKCancel);\r\n            if (spamConfirmation != MessageBoxResult.OK) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.ReportSpamAsync(Peer,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var chat = With as TLChatBase;\r\n                    if (chat != null)\r\n                    {\r\n                        var confirmation = MessageBox.Show(AppResources.GroupConversationMarkedAsSpamConfirmation, AppResources.AppName, MessageBoxButton.OKCancel);\r\n                        if (confirmation != MessageBoxResult.OK)\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        DialogsViewModel.DeleteAndExitDialogCommon(chat, MTProtoService,\r\n                            () => BeginOnUIThread(() =>\r\n                            {\r\n                                var dialog = CacheService.GetDialog(new TLPeerChat { Id = chat.Id });\r\n                                DeleteDialogContinueCommon(dialog, StateService, EventAggregator, CacheService, NavigationService);\r\n                            }),\r\n                            error => BeginOnUIThread(() =>\r\n                            {\r\n                                Execute.ShowDebugMessage(\"DeleteAndExitDialogCommon error \" + error);\r\n                            }));\r\n\r\n                        return;\r\n                    }\r\n\r\n                    var user = With as TLUserBase;\r\n                    if (user != null)\r\n                    {\r\n                        var confirmation = MessageBox.Show(AppResources.ConversationMarkedAsSpamConfirmation, AppResources.AppName, MessageBoxButton.OKCancel);\r\n                        if (confirmation != MessageBoxResult.OK)\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        IsWorking = true;\r\n                        MTProtoService.BlockAsync(user.ToInputUser(),\r\n                            blocked => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                user.Blocked = TLBool.True;\r\n                                CacheService.Commit();\r\n\r\n                                DialogsViewModel.DeleteDialogCommon(user, MTProtoService,\r\n                                    () => BeginOnUIThread(() =>\r\n                                    {\r\n                                        var dialog = CacheService.GetDialog(new TLPeerUser { Id = user.Id });\r\n                                        DeleteDialogContinueCommon(dialog, StateService, EventAggregator, CacheService, NavigationService);\r\n                                    }),\r\n                                    error => BeginOnUIThread(() =>\r\n                                    {\r\n                                        Execute.ShowDebugMessage(\"DeleteDialogCommon error \" + error);\r\n                                    }));\r\n                            }),\r\n                            error => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                Execute.ShowDebugMessage(\"contacts.block error \" + error);\r\n                            }));\r\n\r\n                        return;\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                }));\r\n        }\r\n\r\n        public static void DeleteDialogContinueCommon(TLDialogBase dialog, IStateService stateService, ITelegramEventAggregator eventAggregator, ICacheService cacheService, INavigationService navigationService)\r\n        {\r\n            if (dialog != null)\r\n            {\r\n                eventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                cacheService.DeleteDialog(dialog);\r\n                DialogsViewModel.UnpinFromStart(dialog);\r\n            }\r\n\r\n            ShellViewModel.Navigate(navigationService);\r\n        }\r\n\r\n        private IList<TLUserBase> _mentions;\r\n\r\n        public void AddMention(TLUserBase user)\r\n        {\r\n            _mentions = _mentions ?? new List<TLUserBase>();\r\n\r\n            _mentions.Add(user);\r\n        }\r\n\r\n        public void ClearMentions()\r\n        {\r\n            if (_mentions == null) return;\r\n\r\n            _mentions.Clear();\r\n        }\r\n    }\r\n\r\n    public class InputTypingManager\r\n    {\r\n        private readonly object _typingUsersSyncRoot = new object();\r\n\r\n        private readonly Dictionary<int, Telegram.Api.WindowsPhone.Tuple<DateTime, TLSendMessageActionBase>> _typingUsersCache = new Dictionary<int, Telegram.Api.WindowsPhone.Tuple<DateTime, TLSendMessageActionBase>>();\r\n\r\n        private readonly Timer _typingUsersTimer;\r\n\r\n        private readonly System.Action<IList<Telegram.Api.WindowsPhone.Tuple<int, TLSendMessageActionBase>>> _typingCallback;\r\n\r\n        private readonly System.Action _callback;\r\n\r\n        public InputTypingManager(System.Action<IList<Telegram.Api.WindowsPhone.Tuple<int, TLSendMessageActionBase>>> typingCallback, System.Action callback)\r\n        {\r\n            _typingUsersTimer = new Timer(UpdateTypingUsersCache, null, Timeout.Infinite, Timeout.Infinite);\r\n            _typingCallback = typingCallback;\r\n            _callback = callback;\r\n        }\r\n\r\n\r\n        private void StartTypingTimer(int dueTime)\r\n        {\r\n            if (_typingUsersTimer != null)\r\n            {\r\n                _typingUsersTimer.Change(dueTime, Timeout.Infinite);\r\n                //TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" Start TypingTimer \" + dueTime, LogSeverity.Error);\r\n            }\r\n        }\r\n\r\n        private void StopTypingTimer()\r\n        {\r\n            if (_typingUsersTimer != null)\r\n            {\r\n                _typingUsersTimer.Change(Timeout.Infinite, Timeout.Infinite);\r\n                //TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \" Stop TypingTimer \", LogSeverity.Error);\r\n            }\r\n        }\r\n\r\n        private void UpdateTypingUsersCache(object state)\r\n        {\r\n            //#if !WIN_RT && DEBUG\r\n            //            Microsoft.Devices.VibrateController.Default.Start(TimeSpan.FromMilliseconds(50));\r\n            //#endif\r\n            var now = DateTime.Now;\r\n            var nextTime = DateTime.MaxValue;\r\n\r\n            var typingUsers = new List<Telegram.Api.WindowsPhone.Tuple<int, TLSendMessageActionBase>>();\r\n            lock (_typingUsersSyncRoot)\r\n            {\r\n                if (_typingUsersCache.Count == 0) return;\r\n\r\n                var keys = new List<int>(_typingUsersCache.Keys);\r\n                foreach (var key in keys)\r\n                {\r\n                    if (_typingUsersCache[key].Item1 <= now)\r\n                    {\r\n                        _typingUsersCache.Remove(key);\r\n                    }\r\n                    else\r\n                    {\r\n                        if (nextTime > _typingUsersCache[key].Item1)\r\n                        {\r\n                            nextTime = _typingUsersCache[key].Item1;\r\n                        }\r\n                        typingUsers.Add(new Telegram.Api.WindowsPhone.Tuple<int, TLSendMessageActionBase>(key, _typingUsersCache[key].Item2));\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (typingUsers.Count > 0)\r\n            {\r\n                StartTypingTimer((int)(nextTime - now).TotalMilliseconds);\r\n                _typingCallback.SafeInvoke(typingUsers);\r\n            }\r\n            else\r\n            {\r\n                StopTypingTimer();\r\n                _callback.SafeInvoke();\r\n            }\r\n        }\r\n\r\n        public void Start()\r\n        {\r\n            StartTypingTimer(0);\r\n        }\r\n\r\n        public void Stop()\r\n        {\r\n            StopTypingTimer();\r\n        }\r\n\r\n        public void AddTypingUser(int userId, TLSendMessageActionBase action)\r\n        {\r\n            var now = DateTime.Now;\r\n            var nextTime = DateTime.MaxValue;\r\n            var typingUsers = new List<Telegram.Api.WindowsPhone.Tuple<int, TLSendMessageActionBase>>();\r\n            //lock here\r\n            lock (_typingUsersSyncRoot)\r\n            {\r\n                _typingUsersCache[userId] = new Telegram.Api.WindowsPhone.Tuple<DateTime, TLSendMessageActionBase>(TillDate(now, action), action);\r\n\r\n                foreach (var keyValue in _typingUsersCache)\r\n                {\r\n                    if (keyValue.Value.Item1 > now)\r\n                    {\r\n                        if (nextTime > keyValue.Value.Item1)\r\n                        {\r\n                            nextTime = keyValue.Value.Item1;\r\n                        }\r\n                        typingUsers.Add(new Telegram.Api.WindowsPhone.Tuple<int, TLSendMessageActionBase>(keyValue.Key, keyValue.Value.Item2));\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (typingUsers.Count > 0)\r\n            {\r\n                StartTypingTimer((int)(nextTime - now).TotalMilliseconds);\r\n                _typingCallback.SafeInvoke(typingUsers);\r\n            }\r\n            else\r\n            {\r\n                _callback.SafeInvoke();\r\n            }\r\n        }\r\n\r\n        private static DateTime TillDate(DateTime now, TLSendMessageActionBase action)\r\n        {\r\n            return now.AddSeconds(6.0);\r\n        }\r\n\r\n        public void RemoveTypingUser(int userId)\r\n        {\r\n            var typingUsers = new List<Telegram.Api.WindowsPhone.Tuple<int, TLSendMessageActionBase>>();\r\n            //lock here\r\n            lock (_typingUsersSyncRoot)\r\n            {\r\n                _typingUsersCache.Remove(userId);\r\n\r\n                foreach (var keyValue in _typingUsersCache)\r\n                {\r\n                    if (keyValue.Value.Item1 > DateTime.Now)\r\n                    {\r\n                        typingUsers.Add(new Telegram.Api.WindowsPhone.Tuple<int, TLSendMessageActionBase>(keyValue.Key, keyValue.Value.Item2));\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (typingUsers.Count > 0)\r\n            {\r\n                _typingCallback.SafeInvoke(typingUsers);\r\n            }\r\n            else\r\n            {\r\n                _callback.SafeInvoke();\r\n            }\r\n        }\r\n    }\r\n\r\n    public class OutputTypingManager\r\n    {\r\n        public OutputTypingManager(TLInputPeerBase peer, double delay, Action<TLSendMessageActionBase> sendTyping, System.Action cancelTyping)\r\n        {\r\n            _peer = peer;\r\n            _delay = delay;\r\n            _sendTyping = sendTyping;\r\n            _cancelTyping = cancelTyping;\r\n        }\r\n\r\n        private readonly Action<TLSendMessageActionBase> _sendTyping;\r\n\r\n        private readonly System.Action _cancelTyping;\r\n\r\n        private readonly TLInputPeerBase _peer;\r\n\r\n        private readonly double _delay;\r\n\r\n        private DateTime? _lastTypingTime;\r\n\r\n        public void SetTyping(TLSendMessageActionBase action = null)\r\n        {\r\n            if (_peer is TLInputPeerBroadcast && !(_peer is TLInputPeerChannel))\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_lastTypingTime.HasValue\r\n                && _lastTypingTime.Value.AddSeconds(_delay) > DateTime.Now)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _lastTypingTime = DateTime.Now;\r\n\r\n            _sendTyping.SafeInvoke(action);\r\n        }\r\n\r\n        public void CancelTyping()\r\n        {\r\n            _lastTypingTime = null;\r\n\r\n            _cancelTyping.SafeInvoke();\r\n        }\r\n    }\r\n\r\n    public class TTLQueue\r\n    {\r\n        private readonly List<Tuple<TLMessage70, TTLParams, Action<TLMessage70>>> _items = new List<Tuple<TLMessage70, TTLParams, Action<TLMessage70>>>();\r\n\r\n        private readonly Timer _timer;\r\n\r\n        public TTLQueue()\r\n        {\r\n            _timer = new Timer(Timer_OnTick);\r\n        }\r\n\r\n        private void Timer_OnTick(object state)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                for (int i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Item2.StartTime.AddSeconds(item.Item2.Total) < DateTime.Now)\r\n                    {\r\n                        _items.RemoveAt(i--);\r\n                        var message = item.Item1;\r\n                        message.SetListened();\r\n                        var mediaPhoto = message.Media as TLMessageMediaPhoto70;\r\n                        if (mediaPhoto != null)\r\n                        {\r\n                            mediaPhoto.Photo = null;\r\n                            message.NotifyOfPropertyChange(() => message.TTLMediaExpired);\r\n                            item.Item3.SafeInvoke(message);\r\n                        }\r\n                        var mediaDocument = message.Media as TLMessageMediaDocument70;\r\n                        if (mediaDocument != null)\r\n                        {\r\n                            mediaDocument.Document = null;\r\n                            message.NotifyOfPropertyChange(() => message.TTLMediaExpired);\r\n                            item.Item3.SafeInvoke(message);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (_items.Count > 0)\r\n                {\r\n                    SetTimer(_items[0]);\r\n                }\r\n            });\r\n        }\r\n\r\n        private void SetTimer(Tuple<TLMessage70, TTLParams, Action<TLMessage70>> item)\r\n        {\r\n            var timeSpan = item.Item2.StartTime.AddSeconds(item.Item2.Total) > DateTime.Now ? item.Item2.StartTime.AddSeconds(item.Item2.Total) - DateTime.Now : TimeSpan.FromSeconds(0.0);\r\n            _timer.Change(timeSpan, Timeout.InfiniteTimeSpan);\r\n        }\r\n\r\n        public void Add(TLMessage70 message, TTLParams ttlParams, Action<TLMessage70> callback)\r\n        {\r\n            _timer.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);\r\n\r\n            var newItem = new Tuple<TLMessage70, TTLParams, Action<TLMessage70>>(message, ttlParams, callback);\r\n\r\n            var added = false;\r\n            for (var i = 0; i < _items.Count; i++)\r\n            {\r\n                if (_items[i].Item2.StartTime.AddSeconds(_items[i].Item2.Total) >= ttlParams.StartTime.AddSeconds(ttlParams.Total))\r\n                {\r\n                    _items.Insert(i, newItem);\r\n                    added = true;\r\n                    break;\r\n                }\r\n            }\r\n            if (!added)\r\n            {\r\n                _items.Add(newItem);\r\n            }\r\n\r\n            SetTimer(_items[0]);\r\n        }\r\n    }\r\n\r\n    public class ForwardGroupedEventArgs\r\n    {\r\n        public TLLong GroupedId { get; set; }\r\n\r\n        public IList<TLMessage25> Messages { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogSearchMessagesViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Views.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class DialogSearchMessagesViewModel : TelegramPropertyChangedBase\r\n    {\r\n        public string NavigationButtonImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n                return isLightTheme ? \"/Images/ApplicationBar/appbar.next.light.png\" : \"/Images/ApplicationBar/appbar.next.png\";\r\n            }\r\n        }\r\n\r\n        public string UserButtonImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n                return isLightTheme ? \"/Images/ApplicationBar/appbar.user.light.png\" : \"/Images/ApplicationBar/appbar.user.dark.png\";\r\n            }\r\n        }\r\n\r\n        public string CalendarButtonImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n                return isLightTheme ? \"/Images/ApplicationBar/feature.calendar.light.png\" : \"/Images/ApplicationBar/feature.calendar.png\";\r\n            }\r\n        }\r\n\r\n        private bool _isSearchUpEnabled;\r\n\r\n        public bool IsSearchUpEnabled\r\n        {\r\n            get { return _isSearchUpEnabled; }\r\n            set\r\n            {\r\n                if (_isSearchUpEnabled != value)\r\n                {\r\n                    _isSearchUpEnabled = value;\r\n                    NotifyOfPropertyChange(() => IsSearchUpEnabled);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isSearchDownEnabled;\r\n\r\n        public bool IsSearchDownEnabled\r\n        {\r\n            get { return _isSearchDownEnabled; }\r\n            set\r\n            {\r\n                if (_isSearchDownEnabled != value)\r\n                {\r\n                    _isSearchDownEnabled = value;\r\n                    NotifyOfPropertyChange(() => IsSearchDownEnabled);\r\n                }\r\n            }\r\n        }\r\n\r\n        private string _text;\r\n\r\n        public string Text\r\n        {\r\n            get { return _text; }\r\n            set\r\n            {\r\n                if (_text != value)\r\n                {\r\n                    _text = value;\r\n                    NotifyOfPropertyChange(() => Text);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen\r\n        {\r\n            get { return _isOpen; }\r\n            protected set\r\n            {\r\n                if (_isOpen != value)\r\n                {\r\n                    _isOpen = value;\r\n                    NotifyOfPropertyChange(() => IsOpen);\r\n                }\r\n            }\r\n        }\r\n\r\n        private DateTime? _date;\r\n\r\n        public DateTime? Date\r\n        {\r\n            get { return _date; }\r\n            set\r\n            {\r\n                if (value != _date)\r\n                {\r\n                    _date = value;\r\n                    NotifyOfPropertyChange(() => DateBrush);\r\n                }\r\n            }\r\n        }\r\n\r\n        public Brush DateBrush\r\n        {\r\n            get\r\n            {\r\n                if (Date == null || Date == DateTime.Now.Date)\r\n                {\r\n                    return (Brush) Application.Current.Resources[\"PhoneForegroundBrush\"];\r\n                }\r\n\r\n                return (Brush)Application.Current.Resources[\"PhoneAccentBrush\"];\r\n            }\r\n        }\r\n\r\n        private readonly Action<string, DateTime?, TLUserBase> _searchAction;\r\n\r\n        private readonly Action<string> _searchUserAction;\r\n\r\n        private readonly System.Action _upAction;\r\n\r\n        private readonly System.Action _downAction;\r\n\r\n        private readonly Func<IList<TLUserBase>> _getUsersFunc; \r\n\r\n        public void ResultLoaded(int current, int count)\r\n        {\r\n            IsSearchUpEnabled = count > 0 && current < count - 1;\r\n            IsSearchDownEnabled = count > 0 && current > 0;\r\n        }\r\n\r\n        public ObservableCollection<TLUserBase> Hints { get; set; }\r\n\r\n        public TLUserBase From { get; set; }\r\n\r\n        private readonly TLObject _with;\r\n\r\n        public Visibility UserButtonVisibility\r\n        {\r\n            get\r\n            {\r\n                var channel = _with as TLChannel;\r\n                return channel != null && channel.IsMegaGroup ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public DialogSearchMessagesViewModel(TLObject with, Action<string, DateTime?, TLUserBase> searchAction, Action<string> searchUserAction, System.Action upAction, System.Action downAction, Func<IList<TLUserBase>> getUsersFunc)\r\n        {\r\n            _with = with;\r\n            Hints = new ObservableCollection<TLUserBase>();\r\n\r\n            _searchAction = searchAction;\r\n            _searchUserAction = searchUserAction;\r\n            _upAction = upAction;\r\n            _downAction = downAction;\r\n            _getUsersFunc = getUsersFunc;\r\n        }\r\n\r\n        public void Open()\r\n        {\r\n            IsOpen = true;\r\n        }\r\n\r\n        public void Close()\r\n        {\r\n            IsOpen = false;\r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            _searchAction.SafeInvoke(Text, Date, From);\r\n        }\r\n\r\n        public void SearchUser()\r\n        {\r\n            _searchUserAction.SafeInvoke(Text);\r\n        }\r\n\r\n        public void Up()\r\n        {\r\n            _upAction.SafeInvoke();\r\n        }\r\n\r\n        public void Down()\r\n        {\r\n            _downAction.SafeInvoke();\r\n        }\r\n\r\n        public void GetUsers()\r\n        {\r\n            var users = _getUsersFunc.Invoke();\r\n            Hints.Clear();\r\n            foreach (var user in users)\r\n            {\r\n                Hints.Add(user);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogsViewModel.Common.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogsViewModel\r\n    {\r\n        public void Handle(TLUpdateContactLinkBase update)\r\n        {\r\n            var updateContactLink24 = update as TLUpdateContactLink24;\r\n            if (updateContactLink24 != null && updateContactLink24.MyLink is TLContactLinkNone)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        var userBase = Items[i].With as TLUserBase;\r\n                        if (userBase != null\r\n                            && userBase.Index == update.UserId.Value)\r\n                        {\r\n                            Items[i].NotifyOfPropertyChange(() => Items[i].With);\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateServiceNotification serviceNotification)\r\n        {\r\n            if (serviceNotification.Popup.Value)\r\n            {\r\n                Execute.BeginOnUIThread(() => MessageBox.Show(serviceNotification.Message.ToString(), AppResources.AppName, MessageBoxButton.OK));\r\n            }\r\n            else\r\n            {\r\n                var fromId = new TLInt(Constants.TelegramNotificationsId);\r\n                var telegramUser = CacheService.GetUser(fromId);\r\n                if (telegramUser == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var message = GetServiceMessage(fromId, serviceNotification.Message, serviceNotification.Media);\r\n\r\n                CacheService.SyncMessage(message, m => { });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateNewAuthorization newAuthorization)\r\n        {\r\n            var user = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n            if (user == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var telegramUser = CacheService.GetUser(new TLInt(Constants.TelegramNotificationsId));\r\n            if (telegramUser == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var firstName = user.FirstName;\r\n            var date = TLUtils.ToDateTime(newAuthorization.Date);\r\n\r\n            var text = string.Format(AppResources.NewAuthorization,\r\n                firstName,\r\n                date.ToString(\"dddd\"),\r\n                date.ToString(\"M\"),\r\n                date.ToString(\"t\"),\r\n                newAuthorization.Device,\r\n                newAuthorization.Location);\r\n\r\n            var fromId = new TLInt(Constants.TelegramNotificationsId);\r\n\r\n            var message = GetServiceMessage(fromId, new TLString(text), new TLMessageMediaEmpty(), newAuthorization.Date);\r\n\r\n            CacheService.SyncMessage(message, m => { });\r\n        }\r\n\r\n        public void ChangeUnreadMark(TLDialogBase dialogBase)\r\n        {\r\n            var dialog71 = dialogBase as TLDialog71;\r\n            if (dialog71 == null) return;\r\n\r\n            if (dialog71.UnreadMark\r\n                || dialog71.UnreadMentionsCount != null && dialog71.UnreadMentionsCount.Value > 0\r\n                || dialog71.UnreadCount != null && dialog71.UnreadCount.Value > 0)\r\n            {\r\n                if (dialog71.UnreadMark)\r\n                {\r\n                    MTProtoService.MarkDialogUnreadAsync(false, new TLInputDialogPeer { Peer = MTProtoService.PeerToInputPeer(dialog71.Peer)}, \r\n                        result => BeginOnUIThread(() =>\r\n                        {\r\n                            dialog71.UnreadMark = !dialog71.UnreadMark;\r\n                            dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMark);\r\n                        }),\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.markDialogUnread error \" + error);\r\n                        });\r\n                }\r\n\r\n                var channel = dialog71.With as TLChannel;\r\n                if (dialog71.UnreadCount != null && dialog71.UnreadCount.Value > 0)\r\n                {\r\n                    if (channel != null)\r\n                    {\r\n                        MTProtoService.ReadHistoryAsync(channel, new TLInt(int.MaxValue),\r\n                            result => BeginOnUIThread(() =>\r\n                            {\r\n                                dialog71.UnreadCount = new TLInt(0);\r\n                                dialog71.NotifyOfPropertyChange(() => dialog71.UnreadCount);\r\n                            }),\r\n                            error =>\r\n                            {\r\n                                Execute.ShowDebugMessage(\"channels.readHistory error \" + error);\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        MTProtoService.ReadHistoryAsync(MTProtoService.PeerToInputPeer(dialog71.Peer),\r\n                            new TLInt(int.MaxValue), new TLInt(0),\r\n                            result => BeginOnUIThread(() =>\r\n                            {\r\n                                dialog71.UnreadCount = new TLInt(0);\r\n                                dialog71.NotifyOfPropertyChange(() => dialog71.UnreadCount);\r\n                            }),\r\n                            error =>\r\n                            {\r\n                                Execute.ShowDebugMessage(\"messages.readHistory error \" + error);\r\n                            });\r\n                    }\r\n                }\r\n                if (dialog71.UnreadMentionsCount != null && dialog71.UnreadMentionsCount.Value > 0)\r\n                {\r\n                    MTProtoService.ReadMentionsAsync(MTProtoService.PeerToInputPeer(dialog71.Peer),\r\n                        result => BeginOnUIThread(() =>\r\n                        {\r\n                            dialog71.UnreadMentionsCount = new TLInt(0);\r\n                            dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMentionsCount);\r\n                        }),\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.readMentions error \" + error);\r\n                        });\r\n                }\r\n            }\r\n            else\r\n            {\r\n                MTProtoService.MarkDialogUnreadAsync(true, new TLInputDialogPeer { Peer = MTProtoService.PeerToInputPeer(dialog71.Peer) },\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        dialog71.UnreadMark = !dialog71.UnreadMark;\r\n                        dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMark);\r\n                    }),\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.markDialogUnread error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        private TLMessageBase GetServiceMessage(TLInt fromId, TLString text, TLMessageMediaBase media, TLInt date = null)\r\n        {\r\n            var message = TLUtils.GetMessage(\r\n                    fromId,\r\n                    new TLPeerUser { Id = new TLInt(StateService.CurrentUserId) },\r\n                    MessageStatus.Confirmed,\r\n                    TLBool.False,\r\n                    TLBool.True,\r\n                    date ?? TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                    text,\r\n                    media,\r\n                    TLLong.Random(),\r\n                    new TLInt(0)\r\n                );\r\n            message.Id = new TLInt(0);\r\n\r\n            return message;\r\n        }\r\n\r\n        private int _offset = 0;\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            if (IsWorking\r\n                || LazyItems.Count > 0\r\n                || IsLastSliceLoaded\r\n#if WP8\r\n || !_isUpdated\r\n#endif\r\n)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var offset = _offset;\r\n            var limit = Constants.DialogsSlice;\r\n            //TLUtils.WriteLine(string.Format(\"{0} messages.getDialogs offset={1} limit={2}\", DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture), offset, limit), LogSeverity.Error);\r\n\r\n            var offsetDate = 0;\r\n            var offsetId = 0;\r\n            TLInputPeerBase offsetPeer = new TLInputPeerEmpty();\r\n            var lastDialog = GetLastDialog(Items);\r\n            if (lastDialog != null)\r\n            {\r\n                var lastMessage = lastDialog.TopMessage as TLMessageCommon;\r\n                if (lastMessage != null)\r\n                {\r\n                    offsetDate = lastMessage.DateIndex;\r\n                    offsetId = lastMessage.Index;\r\n                    if (lastMessage.ToId is TLPeerUser)\r\n                    {\r\n                        offsetPeer = !lastMessage.Out.Value\r\n                            ? DialogDetailsViewModel.PeerToInputPeer(new TLPeerUser { Id = lastMessage.FromId })\r\n                            : DialogDetailsViewModel.PeerToInputPeer(lastMessage.ToId);\r\n                    }\r\n                    else\r\n                    {\r\n                        offsetPeer = DialogDetailsViewModel.PeerToInputPeer(lastMessage.ToId);\r\n                    }\r\n                }\r\n            }\r\n\r\n            IsWorking = true;\r\n            //TLObject.LogNotify = true;\r\n            //TelegramEventAggregator.LogPublish = true;\r\n            var stopwatch = Stopwatch.StartNew();\r\n            MTProtoService.GetDialogsAsync(stopwatch,\r\n                new TLInt(offsetDate), \r\n                new TLInt(offsetId), \r\n                offsetPeer,\r\n                new TLInt(limit),\r\n                new TLInt(0),\r\n                result =>\r\n                {\r\n                    //System.Diagnostics.Debug.WriteLine(\"messages.getDialogs end sync elapsed=\" + stopwatch.Elapsed);\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        //System.Diagnostics.Debug.WriteLine(\"messages.getDialogs ui elapsed=\" + stopwatch.Elapsed);\r\n                        //TelegramEventAggregator.LogPublish = false;\r\n                        //TLObject.LogNotify = false;\r\n                        if (_offset != offset)\r\n                        {\r\n                            return;\r\n                        }\r\n                        _offset += Constants.DialogsSlice;\r\n\r\n                        foreach (var dialog in result.Dialogs)\r\n                        {\r\n                            Items.Add(dialog);\r\n                        }\r\n\r\n                        ReorderDrafts(Items);\r\n\r\n                        IsWorking = false;\r\n                        IsLastSliceLoaded = result.Dialogs.Count < limit;\r\n                        Status = LazyItems.Count > 0 || Items.Count > 0 ? string.Empty : Status;\r\n                        //System.Diagnostics.Debug.WriteLine(\"messages.getDialogs end ui elapsed=\" + stopwatch.Elapsed);\r\n                        //TLUtils.WriteLine(string.Format(\"messages.getDialogs offset={0} limit={1} result={2}\", offset, limit, result.Dialogs.Count), LogSeverity.Error);\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n                    //TLUtils.WriteLine(string.Format(\"messages.getDialogs offset={0} limit={1} error={2}\", offset, limit, error), LogSeverity.Error);\r\n                    Execute.ShowDebugMessage(\"messages.getDialogs error \" + error);\r\n                }));\r\n        }\r\n\r\n        private static TLDialog GetLastDialog(IList<TLDialogBase> dialogs)\r\n        {\r\n            TLDialog lastDialog = null;\r\n            var minDate = int.MaxValue;\r\n            for (var i = 0; i < dialogs.Count; i++)\r\n            {\r\n                var dialog = dialogs[i] as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    var topMessageIndex = dialog.TopMessage != null ? dialog.TopMessage.Index : 0;\r\n                    var dateIndex = dialog.GetDateIndex();\r\n                    if (topMessageIndex > 0 && dateIndex < minDate)\r\n                    {\r\n                        minDate = dateIndex;\r\n                        lastDialog = dialog;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return lastDialog;\r\n        }\r\n\r\n        public bool OpenDialogDetails(TLDialogBase dialog)\r\n        {\r\n            ShellViewModel.StartNewTimer();\r\n            //Execute.ShowDebugMessage(\"OpenDialogDetails\");\r\n\r\n            if (dialog == null)\r\n            {\r\n                Execute.ShowDebugMessage(\"OpenDialogDetails dialog=null\");\r\n                return false;\r\n            }\r\n            if (dialog.With == null)\r\n            {\r\n                Execute.ShowDebugMessage(\"OpenDialogDetails dialog.With=null\");\r\n                return false;\r\n            }\r\n\r\n            if (dialog.IsEncryptedChat)\r\n            {\r\n                var encryptedChat = CacheService.GetEncryptedChat(dialog.Peer.Id);\r\n\r\n                var user = dialog.With as TLUserBase;\r\n                if (user == null)\r\n                {\r\n                    Execute.ShowDebugMessage(\"OpenDialogDetails encrypted dialog.With=null\");\r\n                    return false;\r\n                }\r\n\r\n                var cachedUser = CacheService.GetUser(user.Id);\r\n                StateService.Participant = cachedUser ?? user;\r\n                StateService.With = encryptedChat;\r\n                StateService.Dialog = dialog;\r\n                StateService.AnimateTitle = true;\r\n                NavigationService.UriFor<SecretDialogDetailsViewModel>().Navigate();\r\n            }\r\n            else\r\n            {\r\n                var settings = dialog.With as INotifySettings;\r\n                if (settings != null)\r\n                {\r\n                    settings.NotifySettings = settings.NotifySettings ?? dialog.NotifySettings;\r\n                }\r\n\r\n                var currentBackground = IoC.Get<IStateService>().CurrentBackground;\r\n                StateService.With = dialog.With;\r\n                StateService.Dialog = dialog;\r\n                StateService.AnimateTitle = true;\r\n                NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        public Func<TLDialogBase, bool> FastCallback;\r\n\r\n        public bool OpenFastDialogDetails(TLDialogBase dialog)\r\n        {\r\n            return FastCallback(dialog);\r\n\r\n            //Execute.ShowDebugMessage(\"OpenDialogDetails\");\r\n\r\n        }\r\n\r\n        public void DeleteAndStop(TLDialogBase dialog)\r\n        {\r\n            if (dialog == null) return;\r\n\r\n            var user = dialog.With as TLUser;\r\n            if (user == null || !user.IsBot) return;\r\n\r\n            var confirmation = MessageBox.Show(AppResources.DeleteChatConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.BlockAsync(user.ToInputUser(),\r\n                blocked =>\r\n                {\r\n                    user.Blocked = TLBool.True;\r\n                    CacheService.Commit();\r\n\r\n                    DeleteHistoryAsync(false, user.ToInputPeer(),\r\n                        result => BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            CacheService.DeleteDialog(dialog); // TODO : move this line to MTProtoService\r\n\r\n                            if (dialog.With != null)\r\n                            {\r\n                                dialog.With.Bitmap = null;\r\n                            }\r\n                            Items.Remove(dialog);\r\n                        }),\r\n                        error => BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            Execute.ShowDebugMessage(\"messages.deleteHistory error \" + error);\r\n                        }));\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"contacts.Block error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void DeleteAndExit(TLDialogBase dialog)\r\n        {\r\n            if (dialog == null) return;\r\n            if (dialog.Peer is TLPeerUser) return;\r\n\r\n            var message = dialog.Peer is TLPeerEncryptedChat\r\n                ? AppResources.DeleteChatConfirmation\r\n                : AppResources.DeleteAndExitConfirmation;\r\n            var result = MessageBox.Show(message, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (result != MessageBoxResult.OK) return;\r\n\r\n            if (dialog.Peer is TLPeerBroadcast)\r\n            {\r\n                CacheService.DeleteDialog(dialog);\r\n                UnpinFromStart(dialog);\r\n                BeginOnUIThread(() => Items.Remove(dialog));\r\n\r\n                return;\r\n            }\r\n\r\n            if (dialog.Peer is TLPeerEncryptedChat)\r\n            {\r\n                var encryptedChat = CacheService.GetEncryptedChat(dialog.Peer.Id);\r\n                if (encryptedChat is TLEncryptedChatDiscarded)\r\n                {\r\n                    CacheService.DeleteDialog(dialog);\r\n                    UnpinFromStart(dialog);\r\n                    BeginOnUIThread(() => Items.Remove(dialog));\r\n                }\r\n                else\r\n                {\r\n                    IsWorking = true;\r\n                    MTProtoService.DiscardEncryptionAsync(dialog.Peer.Id,\r\n                    r =>\r\n                    {\r\n                        IsWorking = false;\r\n                        CacheService.DeleteDialog(dialog);\r\n                        UnpinFromStart(dialog);\r\n                        BeginOnUIThread(() => Items.Remove(dialog));\r\n                    },\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n                        if (error.CodeEquals(ErrorCode.BAD_REQUEST)\r\n                            && error.Message.Value == \"ENCRYPTION_ALREADY_DECLINED\")\r\n                        {\r\n                            CacheService.DeleteDialog(dialog);\r\n                            UnpinFromStart(dialog);\r\n                            BeginOnUIThread(() => Items.Remove(dialog));\r\n                        }\r\n\r\n                        Execute.ShowDebugMessage(\"messages.discardEncryption error \" + error);\r\n                    });\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            if (dialog.Peer is TLPeerChat)\r\n            {\r\n                DeleteAndExitDialogCommon(\r\n                dialog.With as TLChatBase,\r\n                MTProtoService,\r\n                () =>\r\n                {\r\n                    CacheService.DeleteDialog(dialog);\r\n                    UnpinFromStart(dialog);\r\n\r\n                    BeginOnUIThread(() => Items.Remove(dialog));\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"DeleteAndExitDialogCommon error \" + error);\r\n                });\r\n                return;\r\n            }\r\n        }\r\n\r\n        public static void DeleteAndExitDialogCommon(TLChatBase chatBase, IMTProtoService mtProtoService, System.Action callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            if (chatBase == null) return;\r\n\r\n            var inputPeer = chatBase.ToInputPeer();\r\n\r\n            if (chatBase is TLChatForbidden)\r\n            {\r\n                DeleteHistoryAsync(\r\n                    mtProtoService,\r\n                    false,\r\n                    inputPeer, new TLInt(0),\r\n                    affectedHistory => callback.SafeInvoke(),\r\n                    faultCallback.SafeInvoke);\r\n            }\r\n            else\r\n            {\r\n                var chat = chatBase as TLChat;\r\n                var chat41 = chatBase as TLChat41;\r\n                if (chat != null)\r\n                {\r\n                    if (chat.Left.Value || (chat41 != null && chat41.IsMigrated))\r\n                    {\r\n                        DeleteHistoryAsync(\r\n                            mtProtoService,\r\n                            false,\r\n                            inputPeer, new TLInt(0),\r\n                            affectedHistory => callback.SafeInvoke(),\r\n                            faultCallback.SafeInvoke);\r\n                    }\r\n                    else\r\n                    {\r\n                        mtProtoService.DeleteChatUserAsync(\r\n                            chat.Id, new TLInputUserSelf(),\r\n                            statedMessage =>\r\n                                DeleteHistoryAsync(\r\n                                    mtProtoService,\r\n                                    false,\r\n                                    inputPeer, new TLInt(0),\r\n                                    affectedHistory => callback.SafeInvoke(),\r\n                                    faultCallback.SafeInvoke),\r\n                            faultCallback.SafeInvoke);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void DeleteDialogCommon(TLUserBase userBase, IMTProtoService mtProtoService, System.Action callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            if (userBase == null) return;\r\n\r\n            var inputPeer = userBase.ToInputPeer();\r\n\r\n            DeleteHistoryAsync(mtProtoService, false, inputPeer, new TLInt(0),\r\n                result => callback.SafeInvoke(),\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void ClearHistory(TLDialogBase dialog)\r\n        {\r\n            var confirmation = MessageBox.Show(AppResources.ClearHistoryConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            if (dialog.Peer is TLPeerChannel)\r\n            {\r\n                var channel = (TLChannel)dialog.With;\r\n\r\n                MTProtoService.DeleteHistoryAsync(channel.ToInputChannel(),\r\n                    result =>\r\n                    {\r\n                        CacheService.ClearDialog(dialog.Peer);\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            if (dialog.With != null)\r\n                            {\r\n                                dialog.With.ClearBitmap();\r\n                            }\r\n\r\n                            dialog.NotifyOfPropertyChange(() => dialog.UnreadCount);\r\n                            var dialog71 = dialog as TLDialog71;\r\n                            if (dialog71 != null)\r\n                            {\r\n                                dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMentionsCount);\r\n                            }\r\n                        });\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"channels.deleteHistory error \" + error);\r\n                    });\r\n            }\r\n            else if (dialog.Peer is TLPeerUser)\r\n            {\r\n                var user = (TLUserBase)dialog.With;\r\n                var inputPeer = user.ToInputPeer();\r\n\r\n                DeleteHistoryAsync(true, inputPeer,\r\n                    result =>\r\n                    {\r\n                        CacheService.ClearDialog(dialog.Peer);\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            if (dialog.With != null)\r\n                            {\r\n                                dialog.With.ClearBitmap();\r\n                            }\r\n\r\n                            dialog.NotifyOfPropertyChange(() => dialog.UnreadCount);\r\n                            var dialog71 = dialog as TLDialog71;\r\n                            if (dialog71 != null)\r\n                            {\r\n                                dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMentionsCount);\r\n                            }\r\n                        });\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.deleteHistory error \" + error);\r\n                    });\r\n            }\r\n            else if (dialog.Peer is TLPeerChat)\r\n            {\r\n                var chat = (TLChatBase)dialog.With;\r\n                var inputPeer = chat.ToInputPeer();\r\n\r\n                DeleteHistoryAsync(true, inputPeer,\r\n                    result =>\r\n                    {\r\n                        CacheService.ClearDialog(dialog.Peer);\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            if (dialog.With != null)\r\n                            {\r\n                                dialog.With.ClearBitmap();\r\n                            }\r\n                            dialog.NotifyOfPropertyChange(() => dialog.UnreadCount);\r\n                            var dialog71 = dialog as TLDialog71;\r\n                            if (dialog71 != null)\r\n                            {\r\n                                dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMentionsCount);\r\n                            }\r\n                        });\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.deleteHistory error \" + error);\r\n                    });\r\n            }\r\n            else if (dialog.Peer is TLPeerEncryptedChat)\r\n            {\r\n                var chat = CacheService.GetEncryptedChat(dialog.Peer.Id) as TLEncryptedChat;\r\n                if (chat == null) return;\r\n\r\n                var flushHistoryAction = new TLDecryptedMessageActionFlushHistory();\r\n\r\n                var decryptedTuple = SecretDialogDetailsViewModel.GetDecryptedServiceMessageAndObject(flushHistoryAction, chat, MTProtoService.CurrentUserId, CacheService);\r\n\r\n                SecretDialogDetailsViewModel.SendEncryptedService(chat, decryptedTuple.Item2, MTProtoService,\r\n                    CacheService,\r\n                    sentEncryptedMessage =>\r\n                    {\r\n                        CacheService.ClearDecryptedHistoryAsync(chat.Id);\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            if (dialog.With != null)\r\n                            {\r\n                                dialog.With.ClearBitmap();\r\n                            }\r\n\r\n                            dialog.NotifyOfPropertyChange(() => dialog.UnreadCount);\r\n                        });\r\n                    });\r\n            }\r\n            else if (dialog.Peer is TLPeerBroadcast)\r\n            {\r\n                var broadcast = CacheService.GetBroadcast(dialog.Peer.Id);\r\n                if (broadcast == null) return;\r\n\r\n                CacheService.ClearBroadcastHistoryAsync(broadcast.Id);\r\n            }\r\n        }\r\n\r\n        public void DeleteDialog(TLDialog dialog)\r\n        {\r\n            MessageBoxResult confirmation;\r\n\r\n            if (dialog == null) return;\r\n\r\n            var channel = dialog.With as TLChannel;\r\n            var channelForbidden = dialog.With as TLChannelForbidden;\r\n            if (channel != null || channelForbidden != null)\r\n            {\r\n                if (channelForbidden != null)\r\n                {\r\n                    CacheService.DeleteDialog(dialog);\r\n                    UnpinFromStart(dialog);\r\n                    EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                }\r\n\r\n                if (channel != null)\r\n                {\r\n                    /*if (channel.Creator)\r\n                    {\r\n                        var confirmationString = channel.IsMegaGroup\r\n                            ? AppResources.DeleteGroupConfirmation\r\n                            : AppResources.DeleteChannelConfirmation;\r\n\r\n                        confirmation = MessageBox.Show(confirmationString, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                        if (confirmation != MessageBoxResult.OK) return;\r\n\r\n                        IsWorking = true;\r\n                        MTProtoService.DeleteChannelAsync(channel,\r\n                            result => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n\r\n                                CacheService.DeleteDialog(dialog);\r\n                                UnpinFromStart(dialog);\r\n                                EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                            }),\r\n                            error => BeginOnUIThread(() =>\r\n                            {\r\n                                Execute.ShowDebugMessage(\"channels.deleteChannel error \" + error);\r\n\r\n                                IsWorking = false;\r\n\r\n                                if (error.CodeEquals(ErrorCode.BAD_REQUEST)\r\n                                    && error.TypeEquals(ErrorType.CHANNEL_PRIVATE))\r\n                                {\r\n                                    CacheService.DeleteDialog(dialog);\r\n                                    UnpinFromStart(dialog);\r\n                                    EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                                }\r\n                            }));\r\n                    }\r\n                    else*/\r\n                    {\r\n                        var confirmationString = channel.IsMegaGroup\r\n                            ? AppResources.LeaveGroupConfirmation\r\n                            : AppResources.LeaveChannelConfirmation;\r\n\r\n                        confirmation = MessageBox.Show(confirmationString, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                        if (confirmation != MessageBoxResult.OK) return;\r\n\r\n                        IsWorking = true;\r\n                        MTProtoService.LeaveChannelAsync(\r\n                            channel,\r\n                            result => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n\r\n                                CacheService.DeleteDialog(dialog);\r\n                                UnpinFromStart(dialog);\r\n                                EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                            }),\r\n                            error => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                if (error.TypeEquals(ErrorType.CHANNEL_PRIVATE)\r\n                                    || error.TypeEquals(ErrorType.USER_NOT_PARTICIPANT))\r\n                                {\r\n                                    CacheService.DeleteDialog(dialog);\r\n                                    UnpinFromStart(dialog);\r\n                                    EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                                }\r\n\r\n                                IsWorking = false;\r\n                                Execute.ShowDebugMessage(\"cnannels.leaveChannel error \" + error);\r\n                            }));\r\n\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n\r\n            if (dialog.With is TLChat) return;\r\n\r\n\r\n            confirmation = MessageBox.Show(AppResources.DeleteChatConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            var user = (IInputPeer)dialog.With;\r\n            if (user == null)\r\n            {\r\n                CacheService.DeleteDialog(dialog);\r\n                Items.Remove(dialog);\r\n                Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.NoDialogsHere : string.Empty;\r\n                return;\r\n            }\r\n\r\n            var inputPeer = user.ToInputPeer();\r\n\r\n            DeleteHistoryAsync(false, inputPeer,\r\n                result =>\r\n                {\r\n                    CacheService.DeleteDialog(dialog); // TODO : move this line to MTProtoService\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        if (dialog.With != null)\r\n                        {\r\n                            dialog.With.Bitmap = null;\r\n                        }\r\n                        Items.Remove(dialog);\r\n                        Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.NoDialogsHere : string.Empty;\r\n                    });\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.deleteHistory error \" + error);\r\n                });\r\n        }\r\n\r\n        private void DeleteHistoryAsync(bool justClear, TLInputPeerBase peer, Action<TLAffectedHistory> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            DeleteHistoryAsync(MTProtoService, justClear, peer, new TLInt(0), callback, faultCallback);\r\n        }\r\n\r\n        private static void DeleteHistoryAsync(IMTProtoService mtProtoService, bool justClear, TLInputPeerBase peer, TLInt offset, Action<TLAffectedHistory> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            mtProtoService.DeleteHistoryAsync(justClear, peer, offset,\r\n                affectedHistory =>\r\n                {\r\n                    if (affectedHistory.Offset.Value > 0)\r\n                    {\r\n                        DeleteHistoryAsync(mtProtoService, justClear, peer, affectedHistory.Offset, callback, faultCallback);\r\n                    }\r\n                    else\r\n                    {\r\n                        callback.SafeInvoke(affectedHistory);\r\n                    }\r\n                },\r\n                faultCallback.SafeInvoke);\r\n        }\r\n\r\n        public void CreateDialog()\r\n        {\r\n            NavigationService.UriFor<ChooseParticipantsViewModel>().Navigate();\r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            StateService.LoadedDialogs = new List<TLDialogBase>(Items);\r\n            NavigationService.UriFor<SearchViewModel>().Navigate();\r\n            //NavigationService.UriFor<SearchShellViewModel>().Navigate();\r\n        }\r\n\r\n        public void Handle(TLUpdateNotifySettings notifySettings)\r\n        {\r\n            var notifyPeer = notifySettings.Peer as TLNotifyPeer;\r\n            if (notifyPeer != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        var dialog = Items[i] as TLDialog;\r\n                        if (dialog != null\r\n                            && dialog.Peer != null\r\n                            && dialog.Peer.Id.Value == notifyPeer.Peer.Id.Value\r\n                            && dialog.Peer.GetType() == notifyPeer.Peer.GetType())\r\n                        {\r\n                            dialog.NotifyOfPropertyChange(() => dialog.NotifySettings);\r\n                            dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                            break;\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n\r\n            var notifyUsers = notifySettings.Peer as TLNotifyUsers;\r\n            if (notifyUsers != null)\r\n            {\r\n                var peerNotifySettings = notifySettings.NotifySettings as TLPeerNotifySettings;\r\n                if (peerNotifySettings != null)\r\n                {\r\n                    var settings = StateService.GetNotifySettings();\r\n                    settings.ContactAlert = peerNotifySettings.MuteUntil == null || peerNotifySettings.MuteUntil.Value == 0;\r\n                    settings.ContactMessagePreview = peerNotifySettings.ShowPreviews != null && peerNotifySettings.ShowPreviews.Value;\r\n                    settings.ContactSound = peerNotifySettings.Sound != null ? peerNotifySettings.Sound.ToString() : \"default\";\r\n                    StateService.SaveNotifySettingsAsync(settings);\r\n                }\r\n            }\r\n\r\n            var notifyChats = notifySettings.Peer as TLNotifyChats;\r\n            if (notifyChats != null)\r\n            {\r\n                var peerNotifySettings = notifySettings.NotifySettings as TLPeerNotifySettings;\r\n                if (peerNotifySettings != null)\r\n                {\r\n                    var settings = StateService.GetNotifySettings();\r\n                    settings.GroupAlert = peerNotifySettings.MuteUntil == null || peerNotifySettings.MuteUntil.Value == 0;\r\n                    settings.GroupMessagePreview = peerNotifySettings.ShowPreviews != null && peerNotifySettings.ShowPreviews.Value;\r\n                    settings.GroupSound = peerNotifySettings.Sound != null ? peerNotifySettings.Sound.ToString() : \"default\";\r\n                    StateService.SaveNotifySettingsAsync(settings);\r\n                }\r\n            }\r\n        }\r\n\r\n        #region Tiles\r\n\r\n        public static string GetTileNavigationParam(TLDialogBase dialog)\r\n        {\r\n            var user = dialog.With as TLUserBase;\r\n            var chat = dialog.With as TLChatBase;\r\n            var channel = dialog.With as TLChannel;\r\n            var broadcast = dialog.With as TLBroadcastChat;\r\n            if (user != null)\r\n            {\r\n                if (dialog is TLEncryptedDialog)\r\n                {\r\n                    return \"Action=SecondaryTile&encrypteduser_id=\" + ((TLUserBase)dialog.With).Id + \"&encryptedchat_id=\" + dialog.Peer.Id;\r\n                }\r\n\r\n                return \"Action=SecondaryTile&from_id=\" + user.Id;\r\n            }\r\n\r\n            if (channel != null)\r\n            {\r\n                return \"Action=SecondaryTile&channel_id=\" + channel.Id;\r\n            }\r\n\r\n            if (broadcast != null)\r\n            {\r\n                return \"Action=SecondaryTile&broadcast_id=\" + broadcast.Id;\r\n            }\r\n\r\n            if (chat != null)\r\n            {\r\n                return \"Action=SecondaryTile&chat_id=\" + chat.Id;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static TLFileLocation GetTileImageLocation(TLDialogBase dialog)\r\n        {\r\n            var user = dialog.With as TLUserBase;\r\n            var chat = dialog.With as TLChat;\r\n            var channel = dialog.With as TLChannel;\r\n\r\n            if (user != null)\r\n            {\r\n                var userProfilePhoto = user.Photo as TLUserProfilePhoto;\r\n                if (userProfilePhoto != null)\r\n                {\r\n                    return userProfilePhoto.PhotoSmall as TLFileLocation;\r\n                }\r\n            }\r\n            else if (chat != null)\r\n            {\r\n                var chatPhoto = chat.Photo as TLChatPhoto;\r\n                if (chatPhoto != null)\r\n                {\r\n                    return chatPhoto.PhotoSmall as TLFileLocation;\r\n                }\r\n            }\r\n            else if (channel != null)\r\n            {\r\n                var chatPhoto = channel.Photo as TLChatPhoto;\r\n                if (chatPhoto != null)\r\n                {\r\n                    return chatPhoto.PhotoSmall as TLFileLocation;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static Uri GetTileImageUri(TLFileLocation location)\r\n        {\r\n            if (location == null) return null;\r\n\r\n            var photoPath = String.Format(\"{0}_{1}_{2}.jpg\", location.VolumeId, location.LocalId, location.Secret);\r\n\r\n            var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n            if (!string.IsNullOrEmpty(photoPath)\r\n                && store.FileExists(photoPath))\r\n            {\r\n                const string imageFolder = @\"\\Shared\\ShellContent\";\r\n                if (!store.DirectoryExists(imageFolder))\r\n                {\r\n                    store.CreateDirectory(imageFolder);\r\n                }\r\n                if (!store.FileExists(Path.Combine(imageFolder, photoPath)))\r\n                {\r\n                    store.CopyFile(photoPath, Path.Combine(imageFolder, photoPath));\r\n                }\r\n\r\n                return new Uri(@\"isostore:\" + Path.Combine(imageFolder, photoPath), UriKind.Absolute);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public void Group(TLDialogBase dialogBase)\r\n        {\r\n            var dialog = dialogBase as TLDialog;\r\n            if (dialog == null) return;\r\n\r\n            var channel = dialog.With as TLChannel76;\r\n            if (channel == null) return;\r\n\r\n            var feedId = channel.FeedId != null ? null : new TLInt(1);\r\n            IsWorking = true;\r\n            MTProtoService.ChangeFeedBroadcastAsync(channel.ToInputChannel(), feedId,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    //Handle(new TLUpdateDialogPinned76 { Peer = dialog53.Peer, Pinned = pinned });\r\n                    channel.FeedId = feedId;\r\n                    Execute.ShowDebugMessage(result.ToString());\r\n\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                }));\r\n        }\r\n\r\n        public void Pin(TLDialogBase dialog)\r\n        {\r\n            var dialog53 = dialog as TLDialog53;\r\n            if (dialog53 != null)\r\n            {\r\n                var pinned = !dialog53.IsPinned;\r\n                IsWorking = true;\r\n                MTProtoService.ToggleDialogPinAsync(pinned, dialog53.Peer,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Handle(new TLUpdateDialogPinned76 { Peer = new TLDialogPeer { Peer = dialog53.Peer }, Pinned = pinned });\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public void PinToStart(TLDialogBase dialog)\r\n        {\r\n            PinToStartCommon(dialog);\r\n        }\r\n\r\n        public static void PinToStartCommon(TLDialogBase dialog)\r\n        {\r\n            if (dialog == null) return;\r\n            if (dialog.With == null) return;\r\n\r\n            var tileNavigationParam = GetTileNavigationParam(dialog);\r\n\r\n            try\r\n            {\r\n                var tile = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains(tileNavigationParam));\r\n                if (tile != null)\r\n                {\r\n                    tile.Delete();\r\n                }\r\n                else\r\n                {\r\n                    var title = DialogCaptionConverter.Convert(dialog.With);\r\n                    var standartTileData = new StandardTileData { BackContent = AppResources.AppName, Title = title, BackTitle = title };\r\n\r\n                    var imageLocation = GetTileImageLocation(dialog);\r\n\r\n                    var imageUri = GetTileImageUri(imageLocation);\r\n                    if (imageUri != null)\r\n                    {\r\n                        standartTileData.BackgroundImage = imageUri;\r\n                    }\r\n                    ShellTile.Create(new Uri(\"/Views/ShellView.xaml?\" + tileNavigationParam, UriKind.Relative), standartTileData);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\"Pin tile error \" + ex);\r\n            }\r\n        }\r\n\r\n        public static void UnpinFromStart(TLDialogBase dialog)\r\n        {\r\n            if (dialog == null) return;\r\n            if (dialog.With == null) return;\r\n\r\n            var tileNavigationParam = GetTileNavigationParam(dialog);\r\n\r\n            var tile = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains(tileNavigationParam));\r\n            if (tile != null)\r\n            {\r\n                tile.Delete();\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public void OpenChatDetails(TLChatBase chat)\r\n        {\r\n            if (chat == null) return;\r\n\r\n            StateService.With = chat;\r\n            StateService.AnimateTitle = true;\r\n            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/DialogsViewModel.cs",
    "content": "﻿ using System;\r\n using System.Collections.Generic;\r\n using System.Collections.ObjectModel;\r\n using System.Diagnostics;\r\n using System.Linq;\r\n using System.Windows;\r\nusing Caliburn.Micro;\r\n using Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\n using Telegram.Api.Services.Cache.EventArgs;\r\n using Telegram.Api.Services.FileManager;\r\n using Telegram.Api.Services.Updates;\r\n using Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n using TelegramClient.ViewModels.Contacts;\r\nusing Execute = Telegram.Api.Helpers.Execute; \r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogsViewModel : ItemsViewModelBase<TLDialogBase>, \r\n        IHandle<TopMessageUpdatedEventArgs>, \r\n        IHandle<DialogAddedEventArgs>,\r\n        IHandle<DialogRemovedEventArgs>,\r\n        IHandle<DownloadableItem>,\r\n        IHandle<UploadableItem>,\r\n        IHandle<string>,\r\n        IHandle<TLEncryptedChatBase>,\r\n        IHandle<TLUpdateUserName>,\r\n        IHandle<UpdateCompletedEventArgs>,\r\n        IHandle<TLUpdateNotifySettings>\r\n    {\r\n        public bool FirstRun { get; set; }\r\n\r\n        public DialogsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, IEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Items = new ObservableCollection<TLDialogBase>();\r\n            EventAggregator.Subscribe(this);\r\n\r\n            DisplayName = (string)new LowercaseConverter().Convert(AppResources.Dialogs, null, null, null);\r\n\r\n\r\n            Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.Loading : string.Empty;\r\n            //CacheService.DialogAdded += OnDialogAdded;\r\n            //CacheService.TopMessageUpdated += OnTopMessageUpdated;\r\n\r\n            BeginOnThreadPool(() =>\r\n                {\r\n                    var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                    if (isAuthorized)\r\n                    {\r\n                        var dialogs = CacheService.GetDialogs();\r\n\r\n                        var dialogsCache = new Dictionary<int, TLDialogBase>();\r\n                        var clearedDialogs = new List<TLDialogBase>();\r\n                        foreach (var dialog in dialogs)\r\n                        {\r\n                            if (!dialogsCache.ContainsKey(dialog.Index))\r\n                            {\r\n                                clearedDialogs.Add(dialog);\r\n                                dialogsCache[dialog.Index] = dialog;\r\n                            }\r\n                            else\r\n                            {\r\n                                var cachedDialog = dialogsCache[dialog.Index];\r\n                                if (cachedDialog.Peer is TLPeerUser && dialog.Peer is TLPeerUser)\r\n                                {\r\n                                    CacheService.DeleteDialog(dialog);\r\n                                    continue;\r\n                                }\r\n                                if (cachedDialog.Peer is TLPeerChat && dialog.Peer is TLPeerChat)\r\n                                {\r\n                                    CacheService.DeleteDialog(dialog);\r\n                                    continue;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n\r\n                        // load cache\r\n                        Status = dialogs.Count == 0? AppResources.Loading : string.Empty;\r\n                                \r\n                        //BeginOnUIThread(() =>\r\n                        //{\r\n                        //    Items.Clear();\r\n                        //    foreach (var d in clearedDialogs)\r\n                        //    {\r\n                        //        Items.Add(d);\r\n                        //    }\r\n                        //});\r\n                        LazyItems.Clear();\r\n                        //((BindableCollection<TLDialog>)Items).AddRange(dialogs);\r\n                        //BeginOnUIThread(() =>\r\n                        {\r\n                            foreach (var dialog in clearedDialogs)\r\n                            {\r\n                                //Items.Add(dialog);\r\n                                LazyItems.Add(dialog);\r\n                            }\r\n                        }\r\n                        //);\r\n\r\n                        if (LazyItems.Count == 0)\r\n                        {\r\n                            UpdateItemsAsync(0, 0, Telegram.Api.Constants.CachedDialogsCount);\r\n                        }\r\n                        else\r\n                        {\r\n                            BeginOnUIThread(() => PopulateItems(() => UpdateItemsAsync(0, 0, Telegram.Api.Constants.CachedDialogsCount)));\r\n                        }\r\n                        // update history\r\n                                \r\n                            \r\n                    }\r\n                });\r\n        }\r\n\r\n        //protected override void OnPopulateCompleted()\r\n        //{\r\n        //    UpdateItemsAsync(0, 0, Constants.DialogsSlice);\r\n\r\n        //    base.OnPopulateCompleted();\r\n        //}\r\n\r\n        private void UpdateItemsAsync(int offset, int maxId, int count)\r\n        {\r\n            //IsWorking = true;\r\n\r\n            MTProtoService.GetDialogsAsync(new TLInt(offset), new TLInt(maxId), new TLInt(count),\r\n                result =>\r\n                {\r\n                    // сортируем, т.к. при синхронизации, если есть отправляющиеся сообщений, то TopMessage будет замещен на них\r\n                    // и начальная сортировка сломается\r\n                    var orderedDialogs = new TLVector<TLDialogBase>(result.Dialogs.Count);\r\n                    foreach (var orderedDialog in result.Dialogs.OrderByDescending(x => x.GetDateIndex()))\r\n                    {\r\n                        orderedDialogs.Add(orderedDialog);\r\n                    }\r\n                    result.Dialogs = orderedDialogs;\r\n\r\n                    //IsWorking = false;\r\n                    var needUpdate = false;\r\n                    var itemsCount = Items.Count;\r\n                    for (var i = 0; i < result.Dialogs.Count; i++)\r\n                    {\r\n                        if (itemsCount - 1 < i || result.Dialogs[i] != Items[i])\r\n                        {\r\n                            needUpdate = true;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    // load updated cache\r\n                    Status = Items.Count == 0 && result.Dialogs.Count == 0? string.Format(\"{0}\", AppResources.NoDialogsHere) : string.Empty;\r\n                    \r\n                    if (needUpdate)\r\n                    {\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            var encryptedDialogs = Items.OfType<TLEncryptedDialog>();\r\n                            var startIndex = 0;\r\n                            foreach (var encryptedDialog in encryptedDialogs)\r\n                            {\r\n                                for (var i = startIndex; i < result.Dialogs.Count; i++)\r\n                                {\r\n                                    if (encryptedDialog.GetDateIndex() > result.Dialogs[i].GetDateIndex())\r\n                                    {\r\n                                        result.Dialogs.Insert(i, encryptedDialog);\r\n                                        startIndex = i;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            var broadcasts = Items.OfType<TLBroadcastDialog>();\r\n                            startIndex = 0;\r\n                            foreach (var broadcast in broadcasts)\r\n                            {\r\n                                for (var i = startIndex; i < result.Dialogs.Count; i++)\r\n                                {\r\n                                    if (broadcast.GetDateIndex() > result.Dialogs[i].GetDateIndex())\r\n                                    {\r\n                                        result.Dialogs.Insert(i, broadcast);\r\n                                        startIndex = i;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            Items.Clear();\r\n                            foreach (var dialog in result.Dialogs)\r\n                            {\r\n                                Items.Add(dialog);\r\n                            }\r\n\r\n                        });\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n                    Status = string.Empty;\r\n                    //IsWorking = false;\r\n                });\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            if (FirstRun)\r\n            {\r\n                OnInitialize();\r\n            }\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (!FirstRun)\r\n                {\r\n                    return;\r\n                }\r\n                if (!isAuthorized)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                FirstRun = false;\r\n\r\n                Status = Items.Count == 0 && LazyItems.Count == 0? AppResources.Loading : string.Empty;\r\n                MTProtoService.GetDialogsAsync(new TLInt(0), new TLInt(0), new TLInt(Constants.DialogsSlice),\r\n                    dialogs =>\r\n                    {\r\n                        foreach (var dialog in dialogs.Dialogs)\r\n                        {\r\n                            LazyItems.Add(dialog);\r\n                        }\r\n\r\n                        Status = Items.Count == 0 && LazyItems.Count == 0? string.Format(\"{0}\", AppResources.NoDialogsHere) : string.Empty;\r\n                        if (LazyItems.Count > 0)\r\n                        {\r\n                            BeginOnUIThread(() => PopulateItems(() =>\r\n                            {\r\n                                EventAggregator.Publish(new InvokeImportContacts());\r\n                            }));\r\n                        }\r\n                        else\r\n                        {\r\n                            EventAggregator.Publish(new InvokeImportContacts());\r\n                        }\r\n                    },\r\n                    error =>\r\n                    {\r\n                        EventAggregator.Publish(new InvokeImportContacts());\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                        Status = string.Empty;\r\n                    });\r\n            });\r\n\r\n            \r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        #region Actions\r\n\r\n        public FrameworkElement OpenDialogElement;\r\n\r\n        public void SetOpenDialogElement(object element)\r\n        {\r\n            OpenDialogElement = element as FrameworkElement;\r\n        }\r\n\r\n        public override void RefreshItems()\r\n        {\r\n            UpdateItemsAsync(0, 0, Constants.DialogsSlice);\r\n        }\r\n\r\n        #endregion\r\n\r\n        public void Handle(TopMessageUpdatedEventArgs eventArgs)\r\n        {\r\n            eventArgs.Dialog.NotifyOfPropertyChange(() => eventArgs.Dialog.With);\r\n            OnTopMessageUpdated(this, eventArgs);\r\n        }\r\n\r\n        public void Handle(DialogAddedEventArgs eventArgs)\r\n        {\r\n            OnDialogAdded(this, eventArgs);\r\n        }\r\n\r\n        private void OnTopMessageUpdated(object sender, TopMessageUpdatedEventArgs e)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var currentPosition = Items.IndexOf(e.Dialog);\r\n                var newPosition = currentPosition;\r\n\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (// мигает диалог, если просто обновляется последнее сообщение, то номер становится на 1 больше\r\n                        // и сначала удаляем, а потом вставляем на туже позицию\r\n                        i != currentPosition\r\n                        && Items[i].GetDateIndex() <= e.Dialog.GetDateIndex())\r\n                    {\r\n                        newPosition = i;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (currentPosition != newPosition)\r\n                {\r\n                    if (currentPosition < newPosition)\r\n                    {\r\n                        // т.к. будем сначала удалять диалог а потом вставлять, то\r\n                        // curPos + 1 = newPos - это вставка на тоже место и не имеет смысла\r\n                        if (currentPosition + 1 == newPosition)\r\n                        {\r\n                            Items[currentPosition].NotifyOfPropertyChange(() => Items[currentPosition].Self);\r\n                            return;\r\n                        }\r\n                        Items.Remove(e.Dialog);\r\n                        Items.Insert(newPosition - 1, e.Dialog);\r\n                    }\r\n                    else\r\n                    {\r\n                        Items.Remove(e.Dialog);\r\n                        Items.Insert(newPosition, e.Dialog);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private void OnDialogAdded(object sender, DialogAddedEventArgs e)\r\n        {\r\n            var dialog = e.Dialog;\r\n            if (dialog == null) return;\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var index = -1;\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (Items[i] == e.Dialog)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    if (Items[i].GetDateIndex() < dialog.GetDateIndex())\r\n                    {\r\n                        index = i;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (index == -1)\r\n                {\r\n                    Items.Add(dialog);\r\n                }\r\n                else\r\n                {\r\n                    Items.Insert(index, dialog);\r\n                }\r\n                Status = Items.Count == 0 || LazyItems.Count == 0 ? string.Empty : Status;\r\n            });\r\n        }\r\n\r\n        public void Handle(DialogRemovedEventArgs args)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                Items.Remove(args.Dialog);\r\n                \r\n            });\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var photo = item.Owner as TLUserProfilePhoto;\r\n            if (photo != null)\r\n            {\r\n                var user = CacheService.GetUser(photo);\r\n                if (user != null)\r\n                {\r\n                    user.NotifyOfPropertyChange(() => user.Photo);\r\n                }\r\n                return;\r\n            }\r\n\r\n            var chatPhoto = item.Owner as TLChatPhoto;\r\n            if (chatPhoto != null)\r\n            {\r\n                var chat = CacheService.GetChat(chatPhoto);\r\n                if (chat != null)\r\n                {\r\n                    chat.NotifyOfPropertyChange(() => chat.Photo);\r\n                }\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Handle(string command)\r\n        {\r\n            if (string.Equals(command, Commands.LogOutCommand))\r\n            {\r\n                LazyItems.Clear();\r\n                BeginOnUIThread(() => Items.Clear());\r\n                Status = string.Empty;\r\n                IsWorking = false;\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateUserName userName)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (Items[i].WithId == userName.UserId.Value\r\n                        && Items[i].With is TLUserBase)\r\n                    {\r\n                        var user = (TLUserBase)Items[i].With;\r\n                        user.FirstName = userName.FirstName;\r\n                        user.LastName = userName.LastName;\r\n\r\n                        var userWithUserName = user as IUserName;\r\n                        if (userWithUserName != null)\r\n                        {\r\n                            userWithUserName.UserName = userName.UserName;\r\n                        }\r\n\r\n                        Items[i].NotifyOfPropertyChange(() => Items[i].With);\r\n                        break;\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n            var userSelf = item.Owner as TLUserSelf;\r\n            if (userSelf != null)\r\n            {\r\n\r\n                MTProtoService.UploadProfilePhotoAsync(\r\n                    new TLInputFile\r\n                    {\r\n                        Id = item.FileId,\r\n                        MD5Checksum = new TLString(MD5Core.GetHashString(item.Bytes).ToLowerInvariant()),\r\n                        Name = new TLString(Guid.NewGuid() + \".jpg\"),\r\n                        Parts = new TLInt(item.Parts.Count)\r\n                    },\r\n                    new TLString(\"\"),\r\n                    new TLInputGeoPointEmpty(),\r\n                    new TLInputPhotoCropAuto(),\r\n                    photosPhoto =>\r\n                    {\r\n                        MTProtoService.GetFullUserAsync(new TLInputUserSelf(), userFull => { }, error => { });\r\n                    },\r\n                    error =>\r\n                    {\r\n\r\n                    });\r\n                return;\r\n            }\r\n\r\n\r\n            var chat = item.Owner as TLChat;\r\n            if (chat != null)\r\n            {\r\n                MTProtoService.EditChatPhotoAsync(\r\n                    chat.Id,\r\n                   new TLInputChatUploadedPhoto\r\n                   {\r\n                       File = new TLInputFile\r\n                       {\r\n                           Id = item.FileId,\r\n                           MD5Checksum = new TLString(MD5Core.GetHashString(item.Bytes).ToLowerInvariant()),\r\n                           Name = new TLString(\"chatPhoto.jpg\"),\r\n                           Parts = new TLInt(item.Parts.Count)\r\n                       },\r\n                       Crop = new TLInputPhotoCropAuto()\r\n                   },\r\n                   photosPhoto =>\r\n                   {\r\n                       //MTProtoService.GetFullChatAsync((chat).Id, userFull =>\r\n                       //{\r\n                       //    //NotifyOfPropertyChange(() => CurrentItem);\r\n                       //},\r\n                       //error => { });\r\n                   },\r\n                   error =>\r\n                   {\r\n\r\n                   });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLEncryptedChatBase chat)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                int index = -1;\r\n                TLDialogBase dialog = null;\r\n                for (int i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (Items[i].Peer is TLPeerEncryptedChat\r\n                        && Items[i].Peer.Id.Value == chat.Id.Value)\r\n                    {\r\n                        index = i;\r\n                        dialog = Items[i];\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (index != -1 && dialog != null)\r\n                {\r\n                    dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(UpdateCompletedEventArgs args)\r\n        {\r\n            var dialogs = CacheService.GetDialogs();\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                Items.Clear();\r\n                foreach (var dialog in dialogs)\r\n                {\r\n                    Items.Add(dialog);\r\n                }\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/FastDialogDetailsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.ObjectModel;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Extensions;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class FastDialogDetailsViewModel\r\n    {\r\n        public Brush WatermarkForeground\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    if (StateService.IsEmptyBackground)\r\n                    {\r\n                        var color = Colors.Black;\r\n                        color.A = 153;\r\n                        return new SolidColorBrush(color);\r\n                    }\r\n                }\r\n\r\n                return (Brush)Application.Current.Resources[\"PhoneContrastForegroundBrush\"];\r\n            }\r\n        }\r\n\r\n        public IStateService StateService { get; protected set; }\r\n\r\n        public ICacheService CacheService { get; protected set; }\r\n\r\n        public ObservableCollection<TLMessageBase> Items { get; set; }\r\n\r\n        public ObservableCollection<TLMessageBase> LazyItems { get; set; }\r\n        \r\n        public TLObject With { get; set; }\r\n\r\n        public int FistSliceCount { get; set; }\r\n\r\n        public string Subtitle { get; set; }\r\n\r\n        public FastDialogDetailsViewModel(ICacheService cacheService, IStateService stateService)\r\n        {\r\n            StateService = stateService;\r\n            CacheService = cacheService;\r\n            With = StateService.With;\r\n            StateService.With = null;\r\n            var dialog = StateService.Dialog as TLDialog;\r\n            if (dialog != null)\r\n            {\r\n                Items = new ObservableCollection<TLMessageBase>(dialog.Messages.Take(10));\r\n                FistSliceCount = 15;\r\n            }\r\n            Subtitle = GetSubtitle();\r\n        }\r\n\r\n        public void OnLoaded()\r\n        {\r\n            //Items.AddRange(LazyItems);\r\n            Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                if (LazyItems != null)\r\n                {\r\n                    Items.AddRange(LazyItems);\r\n                }\r\n            });\r\n        }\r\n\r\n        private string GetSubtitle()\r\n        {\r\n            var channel = With as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (channel.ParticipantsCount != null)\r\n                {\r\n                    return Language.Declension(\r\n                        channel.ParticipantsCount.Value,\r\n                        AppResources.CompanyNominativeSingular,\r\n                        AppResources.CompanyNominativePlural,\r\n                        AppResources.CompanyGenitiveSingular,\r\n                        AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n                }\r\n\r\n                if (channel.IsMegaGroup)\r\n                {\r\n                    return AppResources.Loading.ToLowerInvariant();\r\n                }\r\n\r\n                return channel.IsPublic ? AppResources.PublicChannel.ToLowerInvariant() : AppResources.PrivateChannel.ToLowerInvariant();\r\n            }\r\n\r\n            var user = With as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                return GetUserStatus(user);\r\n            }\r\n\r\n            var chat = With as TLChat;\r\n            if (chat != null)\r\n            {\r\n                var participantsCount = chat.ParticipantsCount.Value;\r\n                var onlineCount = chat.UsersOnline;\r\n                var onlineString = onlineCount > 0 ? string.Format(\", {0} {1}\", chat.UsersOnline, AppResources.Online.ToLowerInvariant()) : string.Empty;\r\n\r\n                var currentUser = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n                var isCurrentUserOnline = currentUser != null && currentUser.Status is TLUserStatusOnline;\r\n                if (participantsCount == 1 || (onlineCount == 1 && isCurrentUserOnline))\r\n                {\r\n                    onlineString = string.Empty;\r\n                }\r\n\r\n                return Language.Declension(\r\n                    participantsCount,\r\n                    AppResources.CompanyNominativeSingular,\r\n                    AppResources.CompanyNominativePlural,\r\n                    AppResources.CompanyGenitiveSingular,\r\n                    AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture)\r\n                    + onlineString;\r\n            }\r\n\r\n            var forbiddenChat = With as TLChatForbidden;\r\n            if (forbiddenChat != null)\r\n            {\r\n                return LowercaseConverter.Convert(AppResources.YouWhereKickedFromTheGroup);\r\n            }\r\n\r\n            var broadcastChat = With as TLBroadcastChat;\r\n            if (broadcastChat != null)\r\n            {\r\n                var participantsCount = broadcastChat.ParticipantIds.Count;\r\n                var onlineParticipantsCount = 0;\r\n                foreach (var participantId in broadcastChat.ParticipantIds)\r\n                {\r\n                    var participant = CacheService.GetUser(participantId);\r\n                    if (participant != null && participant.Status is TLUserStatusOnline)\r\n                    {\r\n                        onlineParticipantsCount++;\r\n                    }\r\n                }\r\n\r\n                var onlineString = onlineParticipantsCount > 0 ? string.Format(\", {0} {1}\", onlineParticipantsCount, AppResources.Online.ToLowerInvariant()) : string.Empty;\r\n\r\n                return Language.Declension(\r\n                    participantsCount,\r\n                    AppResources.CompanyNominativeSingular,\r\n                    AppResources.CompanyNominativePlural,\r\n                    AppResources.CompanyGenitiveSingular,\r\n                    AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture)\r\n                    + onlineString;\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public static string GetUserStatus(TLUserBase user)\r\n        {\r\n            if (user.Index == Constants.TelegramNotificationsId)\r\n            {\r\n                return AppResources.ServiceNotifications.ToLowerInvariant();\r\n            }\r\n\r\n            if (user.BotInfo is TLBotInfo)\r\n            {\r\n                return AppResources.Bot.ToLowerInvariant();\r\n            }\r\n\r\n            return UserStatusToStringConverter.Convert(user.Status);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/HashtagHintsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.ObjectModel;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class HashtagHintsViewModel\r\n    {\r\n        public ObservableCollection<TLHashtagItem> Hints { get; protected set; }\r\n\r\n        public HashtagHintsViewModel()\r\n        {\r\n            Hints = new ObservableCollection<TLHashtagItem>();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/InlineBotResultsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.ObjectModel;\r\nusing System.Windows;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class InlineBotResultsViewModel : TelegramPropertyChangedBase\r\n    {\r\n        public string SwitchPMString { get { return SwitchPM != null ? SwitchPM.Text.ToString() : null; } }\r\n\r\n        public Visibility SwitchPMVisibility { get { return SwitchPM != null ? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        private TLInlineBotSwitchPM _switchPM;\r\n\r\n        public TLInlineBotSwitchPM SwitchPM\r\n        {\r\n            get { return _switchPM; }\r\n            set\r\n            {\r\n                if (_switchPM != value)\r\n                {\r\n                    _switchPM = value;\r\n                    NotifyOfPropertyChange(() => SwitchPM);\r\n                    NotifyOfPropertyChange(() => SwitchPMString);\r\n                    NotifyOfPropertyChange(() => SwitchPMVisibility);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _gallery;\r\n\r\n        public bool Gallery\r\n        {\r\n            get { return _gallery; }\r\n            set\r\n            {\r\n                if (_gallery != value)\r\n                {\r\n                    _gallery = value;\r\n                    NotifyOfPropertyChange(() => Gallery);\r\n                }\r\n            }\r\n        }\r\n\r\n        private string _debug;\r\n\r\n        public string Debug\r\n        {\r\n            get { return _debug; }\r\n            set\r\n            {\r\n                if (_debug != value)\r\n                {\r\n                    _debug = value;\r\n                    NotifyOfPropertyChange(() => Debug);\r\n                }\r\n            }\r\n        }\r\n\r\n        public ObservableCollection<TLBotInlineResultBase> Results { get; protected set; }\r\n\r\n        private readonly System.Action _loadNextSliceAction;\r\n\r\n        private readonly System.Action<TLInlineBotSwitchPM> _switchPMAction; \r\n\r\n        public InlineBotResultsViewModel(System.Action loadNextSliceAction, System.Action<TLInlineBotSwitchPM> switchPMAction)\r\n        {\r\n            _loadNextSliceAction = loadNextSliceAction;\r\n            _switchPMAction = switchPMAction;\r\n\r\n            Results = new ObservableCollection<TLBotInlineResultBase>();\r\n        }\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            _loadNextSliceAction.SafeInvoke();\r\n        }\r\n\r\n        public void Switch()\r\n        {\r\n            _switchPMAction.SafeInvoke(SwitchPM);\r\n        }\r\n\r\n        public void StartPlayers()\r\n        {\r\n            \r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/MessageViewerViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class MessageViewerViewModel : Screen\r\n    {\r\n        public IMessage Message { get; set; }\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        public MessageViewerViewModel(IStateService stateService)\r\n        {\r\n            _stateService = stateService;\r\n\r\n            if (_stateService.MediaMessage != null)\r\n            {\r\n                Message = _stateService.MediaMessage;\r\n                _stateService.MediaMessage = null;\r\n            }\r\n\r\n            if (_stateService.DecryptedMediaMessage != null)\r\n            {\r\n                Message = _stateService.DecryptedMediaMessage;\r\n                _stateService.DecryptedMediaMessage = null;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/PinnedMessageViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class PinnedMessageViewModel : TelegramPropertyChangedBase\r\n    {\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen\r\n        {\r\n            get { return _isOpen; }\r\n        }\r\n\r\n        public TLMessageBase Message { get; protected set; }\r\n\r\n        public PinnedMessageViewModel(TLMessageBase message)\r\n        {\r\n            Message = message;\r\n        }\r\n\r\n        public static bool IsRequired(TLObject obj)\r\n        {\r\n            var userBase = obj as TLUserBase;\r\n\r\n            return \r\n                userBase != null\r\n                && userBase.IsRequest\r\n                && !userBase.RemoveUserAction && userBase.Index != Constants.TelegramNotificationsId;\r\n        }\r\n\r\n        public void SetUser(TLMessageBase message)\r\n        {\r\n            Message = message;\r\n            NotifyOfPropertyChange(() => Message);\r\n        }\r\n\r\n        public event EventHandler UnpinMessage;\r\n\r\n        public virtual void RaiseUnpinMessage()\r\n        {\r\n            var handler = UnpinMessage;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler OpenMessage;\r\n\r\n        public virtual void RaiseOpenMessage()\r\n        {\r\n            var handler = OpenMessage;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public void Close()\r\n        {\r\n            _isOpen = false;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n        } \r\n\r\n        public event EventHandler Closed;\r\n\r\n        public virtual void RaiseClosed()\r\n        {\r\n            var handler = Closed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretChatDebugViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Security.Cryptography;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class SecretChatDebugViewModel : TelegramPropertyChangedBase\r\n    {\r\n        public Visibility InvokeButtonVisibility\r\n        {\r\n            get\r\n            {\r\n                var chat20 = Chat as TLEncryptedChat20;\r\n\r\n                return chat20 != null ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public TLEncryptedChatBase Chat { get; protected set; }\r\n\r\n        public string KeyFingerprint\r\n        {\r\n            get\r\n            {\r\n                var chat = Chat as TLEncryptedChat;\r\n                if (chat == null) return null;\r\n\r\n                var key = chat.Key;\r\n                if (key == null) return null;\r\n                var keyHash = Telegram.Api.Helpers.Utils.ComputeSHA1(key.Data);\r\n\r\n                return \"Key: \" + BitConverter.ToString(keyHash.SubArray(12, keyHash.Length - 12)).Replace(\"-\", string.Empty).ToLowerInvariant();\r\n            }\r\n        }\r\n\r\n        private readonly System.Action _rekeyAction;\r\n\r\n        public SecretChatDebugViewModel(TLEncryptedChatBase chat, System.Action rekeyAction)\r\n        {\r\n            Chat = chat;\r\n            _rekeyAction = rekeyAction;\r\n        }\r\n\r\n        public void Invoke()\r\n        {\r\n            _rekeyAction.SafeInvoke();\r\n        }\r\n\r\n        public void UpdateChat(TLEncryptedChatBase encryptedChat)\r\n        {\r\n            Chat = encryptedChat;\r\n            NotifyOfPropertyChange(() => KeyFingerprint);\r\n            NotifyOfPropertyChange(() => Chat);\r\n            NotifyOfPropertyChange(() => InvokeButtonVisibility);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretDialogDetailsViewModel.Actions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsViewModel\r\n    {\r\n        public event EventHandler<ScrollToEventArgs> ScrollTo;\r\n\r\n        protected virtual void RaiseScrollTo(ScrollToEventArgs args)\r\n        {\r\n            var handler = ScrollTo;\r\n            if (handler != null) handler(this, args);\r\n        }\r\n\r\n        public event EventHandler ScrollToBottom;\r\n\r\n        protected virtual void RaiseScrollToBottom()\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var handler = ScrollToBottom;\r\n                if (handler != null) handler(this, System.EventArgs.Empty);\r\n            });\r\n        }\r\n\r\n        private TLDecryptedMessageBase _previousScrollPosition;\r\n\r\n        public void ProcessScroll()\r\n        {\r\n            // replies\r\n            if (_previousScrollPosition != null)\r\n            {\r\n                RaiseScrollTo(new ScrollToEventArgs(_previousScrollPosition));\r\n                _previousScrollPosition = null;\r\n                return;\r\n            }\r\n\r\n\r\n            // unread separator\r\n            //if (!_isFirstSliceLoaded)\r\n            //{\r\n            //    Items.Clear();\r\n            //    var messages = CacheService.GetHistory(TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId));\r\n            //    ProcessRepliesAndAudio(messages);\r\n\r\n            //    const int maxCount = 5;\r\n            //    for (var i = 0; i < messages.Count && i < maxCount; i++)\r\n            //    {\r\n            //        Items.Add(messages[i]);\r\n            //    }\r\n\r\n            //    //wait to complete animation for hiding ScrollToBottomButton\r\n            //    BeginOnUIThread(TimeSpan.FromSeconds(0.35), () =>\r\n            //    {\r\n            //        for (var i = maxCount; i < messages.Count; i++)\r\n            //        {\r\n            //            Items.Add(messages[i]);\r\n            //        }\r\n            //        _isFirstSliceLoaded = true;\r\n\r\n            //        UpdateItemsAsync(0, 0, Constants.FileSliceLength, false);\r\n            //    });\r\n            //}\r\n            //else\r\n            {\r\n                RaiseScrollToBottom();\r\n            }\r\n        }\r\n\r\n        public void Call()\r\n        {\r\n            ShellViewModel.StartVoiceCall(With as TLUser, IoC.Get<IVoIPService>(), IoC.Get<ICacheService>());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretDialogDetailsViewModel.Document.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Windows;\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsViewModel\r\n    {\r\n#if WP81\r\n        public async void SendDocument(StorageFile file)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            if (file == null) return;\r\n\r\n            var properties = await file.GetBasicPropertiesAsync();\r\n            var size = properties.Size;\r\n\r\n            if (!DialogDetailsViewModel.CheckDocumentSize(size))\r\n            {\r\n                MessageBox.Show(string.Format(AppResources.MaximumFileSizeExceeded, MediaSizeConverter.Convert((int)Telegram.Api.Constants.MaximumUploadedFileSize)), AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            DialogDetailsViewModel.AddFileToFutureAccessList(file);\r\n\r\n            var thumb = await DialogDetailsViewModel.GetFileThumbAsync(file) as TLPhotoSize;\r\n\r\n            var dcId = TLInt.Random();\r\n            var id = TLLong.Random();\r\n            var accessHash = TLLong.Random();\r\n\r\n            var fileLocation = new TLEncryptedFile\r\n            {\r\n                Id = id,\r\n                AccessHash = accessHash,\r\n                DCId = dcId,\r\n                Size = new TLInt((int)size),\r\n                KeyFingerprint = new TLInt(0),\r\n                FileName = new TLString(Path.GetFileName(file.Name))\r\n            };\r\n\r\n            var keyIV = GenerateKeyIV();\r\n\r\n            var decryptedMediaDocumentBase= GetDecryptedMediaDocument(file, chat, thumb, size, keyIV, fileLocation);\r\n            var decryptedMediaDocument45 = decryptedMediaDocumentBase as TLDecryptedMessageMediaDocument45;\r\n            if (decryptedMediaDocument45 != null)\r\n            {\r\n                if (string.Equals(decryptedMediaDocument45.FileExt, \"webp\", StringComparison.OrdinalIgnoreCase)\r\n                    && decryptedMediaDocument45.DocumentSize < Telegram.Api.Constants.StickerMaxSize)\r\n                {\r\n                    decryptedMediaDocument45.MimeType = new TLString(\"image/webp\");\r\n                    decryptedMediaDocument45.Attributes.Add(new TLDocumentAttributeSticker29 { Alt = TLString.Empty, Stickerset = new TLInputStickerSetEmpty() });\r\n\r\n                    var fileName = decryptedMediaDocument45.GetFileName();\r\n                    await file.CopyAsync(ApplicationData.Current.LocalFolder, fileName, NameCollisionOption.ReplaceExisting);\r\n                }\r\n                else if (string.Equals(decryptedMediaDocument45.FileExt, \"mp3\", StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    var musicProperties = await file.Properties.GetMusicPropertiesAsync();\r\n                    if (musicProperties != null)\r\n                    {\r\n                        var documentAttributeAudio = new TLDocumentAttributeAudio32 { Duration = new TLInt(0), Title = TLString.Empty, Performer = TLString.Empty };\r\n                        documentAttributeAudio.Duration = new TLInt((int)musicProperties.Duration.TotalSeconds);\r\n                        if (!string.IsNullOrEmpty(musicProperties.Title))\r\n                        {\r\n                            documentAttributeAudio.Title = new TLString(musicProperties.Title);\r\n                        }\r\n                        if (!string.IsNullOrEmpty(musicProperties.Artist))\r\n                        {\r\n                            documentAttributeAudio.Performer = new TLString(musicProperties.Artist);\r\n                        }\r\n                        decryptedMediaDocument45.Attributes.Add(documentAttributeAudio);\r\n                    }\r\n                }\r\n            }\r\n            var decryptedTuple = GetDecryptedMessageAndObject(TLString.Empty, decryptedMediaDocumentBase, chat, true);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                InsertSendingMessage(decryptedTuple.Item1);\r\n                RaiseScrollToBottom();\r\n                NotifyOfPropertyChange(() => DescriptionVisibility);\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncDecryptedMessage(decryptedTuple.Item1, chat,\r\n                        cachedMessage => SendDocumentInternal(file, decryptedTuple.Item2)));\r\n            });\r\n        }\r\n\r\n        private static TLDecryptedMessageMediaBase GetDecryptedMediaDocument(Photo p, TLEncryptedChat chat, TLString thumb, TLInt thumbW, TLInt thumbH, TLString mimeType, Telegram.Api.WindowsPhone.Tuple<TLString, TLString> keyIV, TLEncryptedFile fileLocation)\r\n        {\r\n            TLDecryptedMessageMediaBase decryptedMediaDocument;\r\n            var chat17 = chat as TLEncryptedChat17;\r\n            if (chat17 != null)\r\n            {\r\n                if (chat17.Layer.Value >= Constants.MinSecretChatWithCaptionsLayer)\r\n                {\r\n                    decryptedMediaDocument = new TLDecryptedMessageMediaDocument45\r\n                    {\r\n                        Thumb = thumb,\r\n                        ThumbW = thumbW,\r\n                        ThumbH = thumbH,\r\n                        FileName = new TLString(Path.GetFileName(p.FileName)),\r\n                        MimeType = mimeType,\r\n                        Size = new TLInt(p.Bytes.Length),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n                        Caption = TLString.Empty,\r\n\r\n                        File = fileLocation,\r\n                        UploadingProgress = 0.001\r\n                    };\r\n                }\r\n                else\r\n                {\r\n                    decryptedMediaDocument = new TLDecryptedMessageMediaDocument\r\n                    {\r\n                        Thumb = thumb,\r\n                        ThumbW = thumbW,\r\n                        ThumbH = thumbH,\r\n                        FileName = new TLString(Path.GetFileName(p.FileName)),\r\n                        MimeType = mimeType,\r\n                        Size = new TLInt(p.Bytes.Length),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n\r\n                        File = fileLocation,\r\n                        UploadingProgress = 0.001\r\n                    };\r\n                }\r\n            }\r\n            else\r\n            {\r\n                decryptedMediaDocument = new TLDecryptedMessageMediaDocument\r\n                {\r\n                    Thumb = thumb,\r\n                    ThumbW = thumbW,\r\n                    ThumbH = thumbH,\r\n                    FileName = new TLString(Path.GetFileName(p.FileName)),\r\n                    MimeType = mimeType,\r\n                    Size = new TLInt(p.Bytes.Length),\r\n                    Key = keyIV.Item1,\r\n                    IV = keyIV.Item2,\r\n\r\n                    File = fileLocation,\r\n                    UploadingProgress = 0.001\r\n                };\r\n            }\r\n            return decryptedMediaDocument;\r\n        }\r\n\r\n        private static TLDecryptedMessageMediaBase GetDecryptedMediaDocument(StorageFile file, TLEncryptedChat chat, TLPhotoSize thumb, ulong size, Telegram.Api.WindowsPhone.Tuple<TLString, TLString> keyIV, TLEncryptedFile fileLocation)\r\n        {\r\n            TLDecryptedMessageMediaBase decryptedMediaDocument;\r\n            var chat17 = chat as TLEncryptedChat17;\r\n            if (chat17 != null)\r\n            {\r\n                if (chat17.Layer.Value >= Constants.MinSecretChatWithCaptionsLayer)\r\n                {\r\n                    decryptedMediaDocument = new TLDecryptedMessageMediaDocument45\r\n                    {\r\n                        Thumb = thumb != null ? thumb.Bytes : TLString.Empty,\r\n                        ThumbW = thumb != null ? thumb.W : new TLInt(0),\r\n                        ThumbH = thumb != null ? thumb.H : new TLInt(0),\r\n                        FileName = new TLString(Path.GetFileName(file.Name)),\r\n                        MimeType = new TLString(file.ContentType),\r\n                        Size = new TLInt((int) size),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n                        Caption = TLString.Empty,\r\n\r\n                        File = fileLocation,\r\n                        StorageFile = file,\r\n                        UploadingProgress = 0.001\r\n                    };\r\n                }\r\n                else\r\n                {\r\n                    decryptedMediaDocument = new TLDecryptedMessageMediaDocument\r\n                    {\r\n                        Thumb = thumb != null ? thumb.Bytes : TLString.Empty,\r\n                        ThumbW = thumb != null ? thumb.W : new TLInt(0),\r\n                        ThumbH = thumb != null ? thumb.H : new TLInt(0),\r\n                        FileName = new TLString(Path.GetFileName(file.Name)),\r\n                        MimeType = new TLString(file.ContentType),\r\n                        Size = new TLInt((int) size),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n                        File = fileLocation,\r\n                        StorageFile = file,\r\n                        UploadingProgress = 0.001\r\n                    };\r\n                }\r\n            }\r\n            else\r\n            {\r\n                decryptedMediaDocument = new TLDecryptedMessageMediaDocument\r\n                {\r\n                    Thumb = thumb != null ? thumb.Bytes : TLString.Empty,\r\n                    ThumbW = thumb != null ? thumb.W : new TLInt(0),\r\n                    ThumbH = thumb != null ? thumb.H : new TLInt(0),\r\n                    FileName = new TLString(Path.GetFileName(file.Name)),\r\n                    MimeType = new TLString(file.ContentType),\r\n                    Size = new TLInt((int) size),\r\n                    Key = keyIV.Item1,\r\n                    IV = keyIV.Item2,\r\n                    File = fileLocation,\r\n                    StorageFile = file,\r\n                    UploadingProgress = 0.001\r\n                };\r\n            }\r\n            return decryptedMediaDocument;\r\n        }\r\n#endif\r\n\r\n        private void SendDocument(Photo p)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            var dcId = TLInt.Random();\r\n            var id = TLLong.Random();\r\n            var accessHash = TLLong.Random();\r\n\r\n            var fileLocation = new TLEncryptedFile\r\n            {\r\n                Id = id,\r\n                AccessHash = accessHash,\r\n                DCId = dcId,\r\n                Size = new TLInt(p.Bytes.Length),\r\n                KeyFingerprint = new TLInt(0),\r\n                FileName = new TLString(Path.GetFileName(p.FileName))\r\n            };\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                fileLocation.Id,\r\n                fileLocation.DCId,\r\n                fileLocation.AccessHash);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var fileStream = store.CreateFile(fileName))\r\n                {\r\n                    fileStream.Write(p.Bytes, 0, p.Bytes.Length);\r\n                }\r\n            }\r\n\r\n            var keyIV = GenerateKeyIV();\r\n\r\n            int thumbHeight;\r\n            int thumbWidth;\r\n            var thumb = ImageUtils.CreateThumb(p.Bytes, Constants.DocumentPreviewMaxSize, Constants.DocumentPreviewQuality, out thumbHeight, out thumbWidth);\r\n\r\n            var decryptedMediaDocument = GetDecryptedMediaDocument(p, chat, TLString.FromBigEndianData(thumb), new TLInt(thumbWidth), new TLInt(thumbHeight), new TLString(\"image/jpeg\"), keyIV, fileLocation);\r\n\r\n            var decryptedTuple = GetDecryptedMessageAndObject(TLString.Empty, decryptedMediaDocument, chat, true);\r\n\r\n            InsertSendingMessage(decryptedTuple.Item1);\r\n            RaiseScrollToBottom();\r\n            NotifyOfPropertyChange(() => DescriptionVisibility);\r\n\r\n            BeginOnThreadPool(() => \r\n                CacheService.SyncDecryptedMessage(decryptedTuple.Item1, chat, \r\n                    cachedMessage => SendDocumentInternal(p.Bytes, decryptedTuple.Item2)));\r\n        }\r\n\r\n#if WP81\r\n        private void SendDocumentInternal(StorageFile storageFile, TLObject obj)\r\n        {\r\n            var message = GetDecryptedMessage(obj);\r\n            if (message == null) return;\r\n\r\n            var media = message.Media as TLDecryptedMessageMediaDocument;\r\n            if (media == null) return;\r\n\r\n            var file = media.File as TLEncryptedFile;\r\n            if (file == null) return;\r\n\r\n            UploadDocumentFileManager.UploadFile(file.Id, obj, storageFile, media.Key, media.IV);\r\n        }\r\n#endif\r\n\r\n        private void SendDocumentInternal(byte[] data, TLObject obj)\r\n        {\r\n            var message = GetDecryptedMessage(obj);\r\n            if (message == null) return;\r\n\r\n            var media = message.Media as TLDecryptedMessageMediaDocument;\r\n            if (media == null) return;\r\n            var file = media.File as TLEncryptedFile;\r\n            if (file == null) return;\r\n\r\n            if (data == null)\r\n            {\r\n                var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                    file.Id,\r\n                    file.DCId,\r\n                    file.AccessHash);\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    using (var fileStream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                    {\r\n                        data = new byte[fileStream.Length];\r\n                        fileStream.Read(data, 0, data.Length);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var encryptedBytes = Telegram.Api.Helpers.Utils.AesIge(data, media.Key.Data, media.IV.Data, true);\r\n            UploadDocumentFileManager.UploadFile(file.Id, obj, encryptedBytes);\r\n        }\r\n\r\n        public void SendSticker(TLDocument22 document)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            TLDocumentAttributeSticker attributeSticker = null;\r\n            var chat17 = Chat as TLEncryptedChat17;\r\n            if (chat17 != null)\r\n            {\r\n                if (chat17.Layer.Value >= Constants.MinSecretChatWithCaptionsLayer)\r\n                {\r\n                    var attributeSticker29 = new TLDocumentAttributeSticker29 { Alt = TLString.Empty, Stickerset = new TLInputStickerSetEmpty() };\r\n                    var attributes = document.Attributes;\r\n                    if (attributes != null)\r\n                    {\r\n                        var attribute = document.Attributes.FirstOrDefault(x => x is TLDocumentAttributeSticker) as TLDocumentAttributeSticker29;\r\n                        if (attribute != null)\r\n                        {\r\n                            attributeSticker29.Alt = attribute.Alt;\r\n\r\n                            var stickerSet = attribute.Stickerset as TLInputStickerSetShortName;\r\n                            if (stickerSet == null)\r\n                            {\r\n                                var stickerSetId = attribute.Stickerset as TLInputStickerSetId;\r\n                                if (stickerSetId != null)\r\n                                {\r\n                                    var allStickers = StateService.GetAllStickers() as TLAllStickers29;\r\n                                    if (allStickers != null)\r\n                                    {\r\n                                        var set = allStickers.Sets.FirstOrDefault(x => x.Id.Value == stickerSetId.Id.Value);\r\n                                        if (set != null && !TLString.IsNullOrEmpty(set.ShortName))\r\n                                        {\r\n                                            attributeSticker29.Stickerset = new TLInputStickerSetShortName { ShortName = set.ShortName };\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    attributeSticker = attributeSticker29;\r\n                }\r\n                else if (chat17.Layer.Value >= Constants.MinSecretChatWithStickersLayer)\r\n                {\r\n                    attributeSticker = new TLDocumentAttributeSticker();\r\n                }\r\n            }\r\n\r\n            var stickerAttributes = new TLVector<TLDocumentAttributeBase>\r\n            {\r\n                new TLDocumentAttributeImageSize {H = document.ImageSizeH, W = document.ImageSizeW},\r\n                new TLDocumentAttributeFileName {FileName = new TLString(\"sticker.webp\")}\r\n            };\r\n            if (attributeSticker != null)\r\n            {\r\n                stickerAttributes.Add(attributeSticker);\r\n            }\r\n            var decryptedMediaExternalDocument = new TLDecryptedMessageMediaExternalDocument\r\n            {\r\n                Id = document.Id,\r\n                AccessHash = document.AccessHash,\r\n                Date= document.Date,\r\n                MimeType = document.MimeType,\r\n                Size = document.Size,\r\n                Thumb = document.Thumb,\r\n                DCId = document.DCId,\r\n                Attributes = stickerAttributes\r\n            };\r\n\r\n            var decryptedTuple = GetDecryptedMessageAndObject(TLString.Empty, decryptedMediaExternalDocument, chat);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                InsertSendingMessage(decryptedTuple.Item1);\r\n                RaiseScrollToBottom();\r\n                NotifyOfPropertyChange(() => DescriptionVisibility);\r\n                Text = string.Empty;\r\n\r\n                BeginOnThreadPool(() =>\r\n                {\r\n                    SendEncrypted(chat, decryptedTuple.Item2, MTProtoService, CacheService);\r\n                });\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretDialogDetailsViewModel.GeoPoint.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Action = System.Action;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsViewModel\r\n    {\r\n        public MapViewModel LocationPicker { get; set; }\r\n\r\n        private void SendLocation()\r\n        {\r\n            if (LocationPicker == null)\r\n            {\r\n                LocationPicker = IoC.Get<MapViewModel>();\r\n                LocationPicker.LiveLocations.Clear();\r\n                LocationPicker.With = With;\r\n                LocationPicker.MessageGeo = null;\r\n                LocationPicker.MessageGeoLive = new TLMessageEmpty();\r\n                LocationPicker.ContinueAction = ContinueSendLocation;\r\n                LocationPicker.StopLiveLocationAction = StopLiveLocation;\r\n                NotifyOfPropertyChange(() => LocationPicker);\r\n            }\r\n            else\r\n            {\r\n                LocationPicker.LiveLocations.Clear();\r\n                LocationPicker.With = With;\r\n                LocationPicker.MessageGeo = null;\r\n                LocationPicker.MessageGeoLive = new TLMessageEmpty();\r\n                BeginOnUIThread(() => LocationPicker.OpenEditor());\r\n            }\r\n        }\r\n\r\n        private void OpenLocation(TLDecryptedMessage message)\r\n        {\r\n            if (LocationPicker == null)\r\n            {\r\n                LocationPicker = IoC.Get<MapViewModel>();\r\n                LocationPicker.LiveLocations.Clear();\r\n                LocationPicker.With = With;\r\n                LocationPicker.MessageGeo = message;\r\n                LocationPicker.MessageGeoLive = new TLMessageEmpty();\r\n                LocationPicker.ContinueAction = ContinueSendLocation;\r\n                LocationPicker.StopLiveLocationAction = StopLiveLocation;\r\n                NotifyOfPropertyChange(() => LocationPicker);\r\n            }\r\n            else\r\n            {\r\n                LocationPicker.LiveLocations.Clear();\r\n                LocationPicker.With = With;\r\n                LocationPicker.MessageGeo = message;\r\n                LocationPicker.MessageGeoLive = new TLMessageEmpty();\r\n                BeginOnUIThread(() => LocationPicker.OpenEditor());\r\n            }\r\n        }\r\n\r\n        private void StopLiveLocation(TLMessage arg1, Action arg2)\r\n        {\r\n            \r\n        }\r\n\r\n        private void ContinueSendLocation(TLMessageMediaBase mediaBase)\r\n        {\r\n            var mediaVenue = mediaBase as TLMessageMediaVenue;\r\n            if (mediaVenue != null)\r\n            {\r\n                var chat = Chat as TLEncryptedChat17;\r\n                if (chat != null && chat.Layer.Value >= Constants.MinSecretChatWithVenuesLayer)\r\n                {\r\n                    SendVenue(mediaVenue);\r\n                }\r\n                else\r\n                {\r\n                    SendLocation(mediaVenue);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaGeo = mediaBase as TLMessageMediaGeo;\r\n            if (mediaGeo != null)\r\n            {\r\n                SendLocation(mediaGeo);\r\n                return;\r\n            }\r\n        }\r\n\r\n        private void SendLocation(TLMessageMediaGeo mediaGeo)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            if (mediaGeo == null) return;\r\n\r\n            var geoPoint = mediaGeo.Geo as TLGeoPoint;\r\n            if (geoPoint == null) return;\r\n\r\n            var decryptedTuple = GetDecryptedMessageAndObject(TLString.Empty, new TLDecryptedMessageMediaGeoPoint { Lat = geoPoint.Lat, Long = geoPoint.Long }, chat);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                InsertSendingMessage(decryptedTuple.Item1);\r\n                RaiseScrollToBottom();\r\n                NotifyOfPropertyChange(() => DescriptionVisibility);\r\n\r\n                SendEncrypted(chat, decryptedTuple.Item2, MTProtoService, CacheService);\r\n            });\r\n        }\r\n\r\n        private void SendVenue(TLMessageMediaVenue venue)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            var decryptedTuple = GetDecryptedMessageAndObject(TLString.Empty,\r\n                new TLDecryptedMessageMediaVenue\r\n                {\r\n                    Lat = ((TLGeoPoint) venue.Geo).Lat,\r\n                    Long = ((TLGeoPoint) venue.Geo).Long,\r\n                    Title = venue.Title,\r\n                    Address = venue.Address,\r\n                    Provider = venue.Provider,\r\n                    VenueId = venue.VenueId\r\n                }, \r\n                chat);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                InsertSendingMessage(decryptedTuple.Item1);\r\n                RaiseScrollToBottom();\r\n                NotifyOfPropertyChange(() => DescriptionVisibility);\r\n\r\n                SendEncrypted(chat, decryptedTuple.Item2, MTProtoService, CacheService);\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretDialogDetailsViewModel.Handle.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.Views.Controls;\r\n#if WP8\r\nusing Windows.Storage;\r\nusing TelegramClient_Opus;\r\n#endif\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsViewModel :\r\n        Telegram.Api.Aggregator.IHandle<MessagesRemovedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<TLEncryptedChatBase>,\r\n        Telegram.Api.Aggregator.IHandle<TLDecryptedMessageBase>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateEncryptedMessagesRead>,\r\n        Telegram.Api.Aggregator.IHandle<UploadProgressChangedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<ProgressChangedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<DownloadingCanceledEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UploadingCanceledEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<DownloadableItem>,\r\n        Telegram.Api.Aggregator.IHandle<SetMessagesTTLEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateContactLinkBase>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserStatus>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateEncryptedChatTyping>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdatePrivacy>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateWebPage>\r\n    {\r\n\r\n        public void Handle(TLUpdateWebPage updateWebPage)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var webPageBase = updateWebPage.WebPage;\r\n\r\n                foreach (var webPageKeyValue in _webPagesCache)\r\n                {\r\n                    var mediaBase = webPageKeyValue.Value;\r\n                    var webPageMessageMedia = mediaBase as TLMessageMediaWebPage;\r\n                    if (webPageMessageMedia != null)\r\n                    {\r\n                        var webPage = webPageMessageMedia.WebPage;\r\n                        if (webPage != null)\r\n                        {\r\n                            if (webPage.Id.Value == webPageBase.Id.Value)\r\n                            {\r\n                                webPageMessageMedia.WebPage = webPageBase;\r\n\r\n                                if (string.Equals(Text, webPageKeyValue.Key))\r\n                                {\r\n                                    if (webPageBase is TLWebPage || webPageBase is TLWebPagePending)\r\n                                    {\r\n                                        SaveReply();\r\n\r\n                                        Reply = new TLDecryptedMessagesContainter { WebPageMedia = webPageMessageMedia };\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        RestoreReply();\r\n                                    }\r\n                                }\r\n\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                foreach (var item in Items)\r\n                {\r\n                    var message45 = item as TLDecryptedMessage45;\r\n                    if (message45 != null)\r\n                    {\r\n                        var mediaWebPage = message45.Media as TLDecryptedMessageMediaWebPage;\r\n                        if (mediaWebPage != null)\r\n                        {\r\n                            var webPage = mediaWebPage.WebPage;\r\n                            if (webPage != null && webPage.Id.Value == updateWebPage.WebPage.Id.Value)\r\n                            {\r\n                                mediaWebPage.WebPage = updateWebPage.WebPage;\r\n                                message45.NotifyOfPropertyChange(() => message45.MediaSelf);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(MessagesRemovedEventArgs args)\r\n        {\r\n            //if (With == args.Dialog.With && args.DecryptedMessage != null)\r\n            //{\r\n            //    BeginOnUIThread(() =>\r\n            //    {\r\n            //        Items.Remove(args.Message);\r\n\r\n            //        IsEmptyDialog = Items.Count == 0 && LazyItems.Count == 0;\r\n            //    });\r\n            //}\r\n        }\r\n\r\n        public void Handle(ProgressChangedEventArgs args)\r\n        {\r\n            var media = args.Item.Owner as TLDecryptedMessageMediaBase;\r\n            if (media != null)\r\n            {\r\n                var delta = args.Progress - media.DownloadingProgress;\r\n\r\n                if (delta > 0.0)\r\n                {\r\n                    media.DownloadingProgress = args.Progress;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var webPage = item.Owner as TLWebPage;\r\n            if (webPage != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var messages = UngroupEnumerator(Items).OfType<TLDecryptedMessage>();\r\n                    foreach (var m in messages)\r\n                    {\r\n                        var media = m.Media as TLDecryptedMessageMediaWebPage;\r\n                        if (media != null && media.WebPage == webPage)\r\n                        {\r\n                            media.NotifyOfPropertyChange(() => media.Photo);\r\n                            media.NotifyOfPropertyChange(() => media.Self);\r\n                            break;\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n\r\n            var decryptedMessage = item.Owner as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                var mediaExternalDocument = decryptedMessage.Media as TLDecryptedMessageMediaExternalDocument;\r\n                if (mediaExternalDocument != null)\r\n                {\r\n                    decryptedMessage.NotifyOfPropertyChange(() => decryptedMessage.Self);\r\n                }\r\n            }\r\n\r\n            var decryptedMedia = item.Owner as TLDecryptedMessageMediaBase;\r\n            if (decryptedMedia != null)\r\n            {\r\n                decryptedMessage = UngroupEnumerator(Items).OfType<TLDecryptedMessage>().FirstOrDefault(x => x.Media == decryptedMedia);\r\n                if (decryptedMessage != null)\r\n                {\r\n                    var mediaPhoto = decryptedMessage.Media as TLDecryptedMessageMediaPhoto;\r\n                    if (mediaPhoto != null)\r\n                    {\r\n                        mediaPhoto.DownloadingProgress = 1.0;\r\n                        var fileName = item.IsoFileName;\r\n                        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                        {\r\n                            byte[] buffer;\r\n                            using (var file = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                            {\r\n                                buffer = new byte[file.Length];\r\n                                file.Read(buffer, 0, buffer.Length);\r\n                            }\r\n                            var fileLocation = decryptedMessage.Media.File as TLEncryptedFile;\r\n                            if (fileLocation == null) return;\r\n                            var decryptedBuffer = Telegram.Api.Helpers.Utils.AesIge(buffer, mediaPhoto.Key.Data,\r\n                                mediaPhoto.IV.Data, false);\r\n\r\n                            var newFileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                                fileLocation.Id,\r\n                                fileLocation.DCId,\r\n                                fileLocation.AccessHash);\r\n\r\n                            using (var file = store.OpenFile(newFileName, FileMode.OpenOrCreate, FileAccess.Write))\r\n                            {\r\n                                file.Write(decryptedBuffer, 0, decryptedBuffer.Length);\r\n                            }\r\n\r\n                            store.DeleteFile(fileName);\r\n                        }\r\n\r\n                        if (!decryptedMedia.IsCanceled)\r\n                        {\r\n                            decryptedMedia.NotifyOfPropertyChange(() => decryptedMedia.Self);\r\n                        }\r\n\r\n                    }\r\n\r\n                    var mediaVideo = decryptedMessage.Media as TLDecryptedMessageMediaVideo;\r\n                    if (mediaVideo != null)\r\n                    {\r\n                        mediaVideo.DownloadingProgress = 1.0;\r\n                        var fileName = item.IsoFileName;\r\n                        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                        {\r\n                            byte[] buffer;\r\n                            using (var file = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                            {\r\n                                buffer = new byte[file.Length];\r\n                                file.Read(buffer, 0, buffer.Length);\r\n                            }\r\n                            var fileLocation = decryptedMessage.Media.File as TLEncryptedFile;\r\n                            if (fileLocation == null) return;\r\n                            var decryptedBuffer = Telegram.Api.Helpers.Utils.AesIge(buffer, mediaVideo.Key.Data, mediaVideo.IV.Data, false);\r\n\r\n                            var newFileName = String.Format(\"{0}_{1}_{2}.mp4\",\r\n                                fileLocation.Id,\r\n                                fileLocation.DCId,\r\n                                fileLocation.AccessHash);\r\n\r\n                            using (var file = store.OpenFile(newFileName, FileMode.OpenOrCreate, FileAccess.Write))\r\n                            {\r\n                                file.Write(decryptedBuffer, 0, decryptedBuffer.Length);\r\n                            }\r\n\r\n                            store.DeleteFile(fileName);\r\n                        }\r\n                    }\r\n\r\n                    var mediaDocument = decryptedMessage.Media as TLDecryptedMessageMediaDocument;\r\n                    if (mediaDocument != null)\r\n                    {\r\n                        if (decryptedMessage.IsVoice())\r\n                        {\r\n                            var fileLocation = decryptedMessage.Media.File as TLEncryptedFile;\r\n                            if (fileLocation == null) return;\r\n\r\n                            var fileName = item.IsoFileName;\r\n                            var decryptedFileName = String.Format(\"audio{0}_{1}.mp3\",\r\n                                fileLocation.Id,\r\n                                fileLocation.AccessHash);\r\n                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                byte[] buffer;\r\n                                using (var file = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                {\r\n                                    buffer = new byte[file.Length];\r\n                                    file.Read(buffer, 0, buffer.Length);\r\n                                }\r\n                                var decryptedBuffer = Telegram.Api.Helpers.Utils.AesIge(buffer, mediaDocument.Key.Data, mediaDocument.IV.Data, false);\r\n\r\n                                using (var file = store.OpenFile(decryptedFileName, FileMode.OpenOrCreate, FileAccess.Write))\r\n                                {\r\n                                    file.Write(decryptedBuffer, 0, decryptedBuffer.Length);\r\n                                }\r\n\r\n                                store.DeleteFile(fileName);\r\n\r\n                            }\r\n\r\n                            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                MessagePlayerControl.ConvertAndSaveOpusToWav(mediaDocument);\r\n\r\n                                mediaDocument.DownloadingProgress = 1.0;\r\n                            });\r\n                        }\r\n                        else if (decryptedMessage.IsVideo())\r\n                        {\r\n                            mediaDocument.DownloadingProgress = 1.0;\r\n                            var fileName = item.IsoFileName;\r\n                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                byte[] buffer;\r\n                                using (var file = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                {\r\n                                    buffer = new byte[file.Length];\r\n                                    file.Read(buffer, 0, buffer.Length);\r\n                                }\r\n                                var fileLocation = decryptedMessage.Media.File as TLEncryptedFile;\r\n                                if (fileLocation == null) return;\r\n                                var decryptedBuffer = Telegram.Api.Helpers.Utils.AesIge(buffer, mediaDocument.Key.Data, mediaDocument.IV.Data, false);\r\n\r\n                                var newFileName = String.Format(\"{0}_{1}_{2}.mp4\",\r\n                                    fileLocation.Id,\r\n                                    fileLocation.DCId,\r\n                                    fileLocation.AccessHash);\r\n\r\n                                using (var file = store.OpenFile(newFileName, FileMode.OpenOrCreate, FileAccess.Write))\r\n                                {\r\n                                    file.Write(decryptedBuffer, 0, decryptedBuffer.Length);\r\n                                }\r\n\r\n                                store.DeleteFile(fileName);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            mediaDocument.DownloadingProgress = 1.0;\r\n                            var fileName = item.IsoFileName;\r\n                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                byte[] buffer;\r\n                                using (var file = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                {\r\n                                    buffer = new byte[file.Length];\r\n                                    file.Read(buffer, 0, buffer.Length);\r\n                                }\r\n                                var fileLocation = decryptedMessage.Media.File as TLEncryptedFile;\r\n                                if (fileLocation == null) return;\r\n                                var decryptedBuffer = Telegram.Api.Helpers.Utils.AesIge(buffer, mediaDocument.Key.Data, mediaDocument.IV.Data, false);\r\n\r\n                                var newFileName = String.Format(\"{0}_{1}_{2}.{3}\",\r\n                                    fileLocation.Id,\r\n                                    fileLocation.DCId,\r\n                                    fileLocation.AccessHash,\r\n                                    fileLocation.FileExt ?? mediaDocument.FileExt);\r\n\r\n                                using (var file = store.OpenFile(newFileName, FileMode.OpenOrCreate, FileAccess.Write))\r\n                                {\r\n                                    file.Write(decryptedBuffer, 0, decryptedBuffer.Length);\r\n                                }\r\n\r\n                                store.DeleteFile(fileName);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var mediaAudio = decryptedMessage.Media as TLDecryptedMessageMediaAudio;\r\n                    if (mediaAudio != null)\r\n                    {\r\n                        var fileLocation = decryptedMessage.Media.File as TLEncryptedFile;\r\n                        if (fileLocation == null) return;\r\n\r\n                        var fileName = item.IsoFileName;\r\n                        var decryptedFileName = String.Format(\"audio{0}_{1}.mp3\",\r\n                            fileLocation.Id,\r\n                            fileLocation.AccessHash);\r\n                        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                        {\r\n                            byte[] buffer;\r\n                            using (var file = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                            {\r\n                                buffer = new byte[file.Length];\r\n                                file.Read(buffer, 0, buffer.Length);\r\n                            }\r\n                            var decryptedBuffer = Telegram.Api.Helpers.Utils.AesIge(buffer, mediaAudio.Key.Data, mediaAudio.IV.Data, false);\r\n\r\n                            using (var file = store.OpenFile(decryptedFileName, FileMode.OpenOrCreate, FileAccess.Write))\r\n                            {\r\n                                file.Write(decryptedBuffer, 0, decryptedBuffer.Length);\r\n                            }\r\n\r\n                            store.DeleteFile(fileName);\r\n\r\n                        }\r\n\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            MessagePlayerControl.ConvertAndSaveOpusToWav(mediaAudio);\r\n\r\n                            mediaAudio.DownloadingProgress = 1.0;\r\n                        });\r\n                    }\r\n\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(UploadingCanceledEventArgs args)\r\n        {\r\n            var owner = args.Item.Owner;\r\n            var messageLayer = owner as TLDecryptedMessageLayer;\r\n            if (messageLayer != null)\r\n            {\r\n                owner = messageLayer.Message;\r\n            }\r\n\r\n            var message = owner as TLDecryptedMessage;\r\n            if (message != null)\r\n            {\r\n                var photo = message.Media as TLDecryptedMessageMediaPhoto;\r\n                if (photo != null)\r\n                {\r\n                    message.Media.UploadingProgress = 0.0;\r\n                    message.Status = MessageStatus.Failed;\r\n                }\r\n\r\n                var video = message.Media as TLDecryptedMessageMediaVideo;\r\n                if (video != null)\r\n                {\r\n                    message.Media.UploadingProgress = 0.0;\r\n                    message.Status = MessageStatus.Failed;\r\n                }\r\n\r\n                var document = message.Media as TLDecryptedMessageMediaDocument;\r\n                if (document != null)\r\n                {\r\n                    message.Media.UploadingProgress = 0.0;\r\n                    message.Status = MessageStatus.Failed;\r\n                }\r\n\r\n                var audio = message.Media as TLDecryptedMessageMediaAudio;\r\n                if (audio != null)\r\n                {\r\n                    message.Media.UploadingProgress = 0.0;\r\n                    message.Status = MessageStatus.Failed;\r\n                }\r\n                message.NotifyOfPropertyChange(() => message.Status);\r\n            }\r\n        }\r\n\r\n        public void Handle(DownloadingCanceledEventArgs args)\r\n        {\r\n            var media = args.Item.Owner as TLDecryptedMessageMediaBase;\r\n            if (media != null)\r\n            {\r\n                media.DownloadingProgress = 0.0;\r\n            }\r\n        }\r\n\r\n        public void Handle(SetMessagesTTLEventArgs args)\r\n        {\r\n            if (Chat != null\r\n                && args.Chat.Id.Value == Chat.Id.Value)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Items.Insert(0, args.Message);\r\n                    NotifyOfPropertyChange(() => DescriptionVisibility);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateContactLinkBase update)\r\n        {\r\n            if (With != null\r\n                && With.Index == update.UserId.Value)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Subtitle = GetSubtitle(With);\r\n                    NotifyOfPropertyChange(() => Subtitle);\r\n                    NotifyOfPropertyChange(() => With);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateUserStatus updateUserStatus)\r\n        {\r\n            if (With != null\r\n                && With.Index == updateUserStatus.UserId.Value)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Subtitle = GetSubtitle(With);\r\n                    NotifyOfPropertyChange(() => Subtitle);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateEncryptedChatTyping encryptedChatTyping)\r\n        {\r\n            if (Chat != null\r\n                && With != null\r\n                && Chat.Index == encryptedChatTyping.ChatId.Value)\r\n            {\r\n                BeginOnThreadPool(() => InputTypingManager.AddTypingUser(With.Index, new TLSendMessageTypingAction()));\r\n            }\r\n        }\r\n\r\n        public void Handle(UploadProgressChangedEventArgs args)\r\n        {\r\n            var message = GetDecryptedMessage(args.Item.Owner);\r\n            if (message != null)\r\n            {\r\n                var media = message.Media;\r\n                if (media != null)\r\n                {\r\n                    var delta = args.Progress - media.UploadingProgress;\r\n\r\n                    if (delta > 0.0)\r\n                    {\r\n                        media.UploadingProgress = args.Progress;\r\n                    }\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var photo = args.Item.Owner as TLDecryptedMessageMediaPhoto;\r\n            if (photo != null)\r\n            {\r\n                var delta = args.Progress - photo.UploadingProgress;\r\n\r\n                if (delta > 0.0)\r\n                {\r\n                    photo.UploadingProgress = args.Progress;\r\n                }\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Handle(TLDecryptedMessageBase decryptedMessage)\r\n        {\r\n            if (Chat != null\r\n                && decryptedMessage.ChatId.Value == Chat.Id.Value)\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(\"Handle random_id={0} date={1} qts={2}\", decryptedMessage.RandomId, decryptedMessage.Date, decryptedMessage.Qts);\r\n\r\n                var serviceMessage = decryptedMessage as TLDecryptedMessageService;\r\n                if (serviceMessage != null)\r\n                {\r\n                    var action = serviceMessage.Action;\r\n\r\n                    var typingAction = action as TLDecryptedMessageActionTyping;\r\n                    if (typingAction != null)\r\n                    {\r\n                        var cancelAction = typingAction.Action as TLSendMessageCancelAction;\r\n                        if (cancelAction != null)\r\n                        {\r\n                            InputTypingManager.RemoveTypingUser(With.Index);\r\n                        }\r\n                        else\r\n                        {\r\n                            InputTypingManager.AddTypingUser(With.Index, typingAction.Action);\r\n                        }\r\n                    }\r\n\r\n                    var setMessageTTLAction = action as TLDecryptedMessageActionSetMessageTTL;\r\n                    if (setMessageTTLAction != null)\r\n                    {\r\n                        Chat.MessageTTL = setMessageTTLAction.TTLSeconds;\r\n                    }\r\n\r\n                    var flushHistoryAction = action as TLDecryptedMessageActionFlushHistory;\r\n                    if (flushHistoryAction != null)\r\n                    {\r\n                        Execute.BeginOnUIThread(() => Items.Clear());\r\n                        CacheService.ClearDecryptedHistoryAsync(Chat.Id);\r\n                    }\r\n\r\n                    var readMessagesAction = action as TLDecryptedMessageActionReadMessages;\r\n                    if (readMessagesAction != null)\r\n                    {\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            foreach (var randomId in readMessagesAction.RandomIds)\r\n                            {\r\n                                foreach (var item in UngroupEnumerator(Items))\r\n                                {\r\n                                    if (item.RandomId.Value == randomId.Value)\r\n                                    {\r\n                                        item.Status = MessageStatus.Read;\r\n                                        if (item.TTL != null && item.TTL.Value > 0)\r\n                                        {\r\n                                            item.DeleteDate = new TLLong(DateTime.Now.Ticks + Chat.MessageTTL.Value * TimeSpan.TicksPerSecond);\r\n                                        }\r\n\r\n                                        var decryptedMessage17 = item as TLDecryptedMessage17;\r\n                                        if (decryptedMessage17 != null)\r\n                                        {\r\n                                            var decryptedMediaPhoto = decryptedMessage17.Media as TLDecryptedMessageMediaPhoto;\r\n                                            if (decryptedMediaPhoto != null)\r\n                                            {\r\n                                                if (decryptedMediaPhoto.TTLParams == null)\r\n                                                {\r\n                                                    var ttlParams = new TTLParams();\r\n                                                    ttlParams.IsStarted = true;\r\n                                                    ttlParams.Total = decryptedMessage17.TTL.Value;\r\n                                                    ttlParams.StartTime = DateTime.Now;\r\n                                                    ttlParams.Out = decryptedMessage17.Out.Value;\r\n\r\n                                                    decryptedMediaPhoto.TTLParams = ttlParams;\r\n                                                }\r\n                                            }\r\n\r\n                                            var decryptedMediaVideo17 = decryptedMessage17.Media as TLDecryptedMessageMediaVideo17;\r\n                                            if (decryptedMediaVideo17 != null)\r\n                                            {\r\n                                                if (decryptedMediaVideo17.TTLParams == null)\r\n                                                {\r\n                                                    var ttlParams = new TTLParams();\r\n                                                    ttlParams.IsStarted = true;\r\n                                                    ttlParams.Total = decryptedMessage17.TTL.Value;\r\n                                                    ttlParams.StartTime = DateTime.Now;\r\n                                                    ttlParams.Out = decryptedMessage17.Out.Value;\r\n\r\n                                                    decryptedMediaVideo17.TTLParams = ttlParams;\r\n                                                }\r\n                                            }\r\n\r\n                                            var decryptedMediaAudio17 = decryptedMessage17.Media as TLDecryptedMessageMediaAudio17;\r\n                                            if (decryptedMediaAudio17 != null)\r\n                                            {\r\n                                                if (decryptedMediaAudio17.TTLParams == null)\r\n                                                {\r\n                                                    var ttlParams = new TTLParams();\r\n                                                    ttlParams.IsStarted = true;\r\n                                                    ttlParams.Total = decryptedMessage17.TTL.Value;\r\n                                                    ttlParams.StartTime = DateTime.Now;\r\n                                                    ttlParams.Out = decryptedMessage17.Out.Value;\r\n\r\n                                                    decryptedMediaAudio17.TTLParams = ttlParams;\r\n                                                }\r\n                                            }\r\n\r\n                                            var decryptedMediaDocument45 = decryptedMessage17.Media as TLDecryptedMessageMediaDocument45;\r\n                                            if (decryptedMediaDocument45 != null && (decryptedMessage17.IsVoice() || decryptedMessage17.IsVideo()))\r\n                                            {\r\n                                                if (decryptedMediaDocument45.TTLParams == null)\r\n                                                {\r\n                                                    var ttlParams = new TTLParams();\r\n                                                    ttlParams.IsStarted = true;\r\n                                                    ttlParams.Total = decryptedMessage17.TTL.Value;\r\n                                                    ttlParams.StartTime = DateTime.Now;\r\n                                                    ttlParams.Out = decryptedMessage17.Out.Value;\r\n\r\n                                                    decryptedMediaDocument45.TTLParams = ttlParams;\r\n                                                }\r\n\r\n                                                var message45 = decryptedMessage17 as TLDecryptedMessage45;\r\n                                                if (message45 != null)\r\n                                                {\r\n                                                    message45.SetListened();\r\n                                                }\r\n                                                decryptedMediaDocument45.NotListened = false;\r\n                                                decryptedMediaDocument45.NotifyOfPropertyChange(() => decryptedMediaDocument45.NotListened);\r\n                                            }\r\n                                        }\r\n\r\n                                        item.NotifyOfPropertyChange(() => item.Status);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        });\r\n                    }\r\n\r\n                    var deleteMessagesAction = action as TLDecryptedMessageActionDeleteMessages;\r\n                    if (deleteMessagesAction != null)\r\n                    {\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            var group = new Dictionary<long, TLDecryptedMessageMediaGroup>();\r\n                            foreach (var randomId in deleteMessagesAction.RandomIds)\r\n                            {\r\n                                for (var i = 0; i < Items.Count; i++)\r\n                                {\r\n                                    var groupedMessage = false;\r\n                                    var message73 = Items[i] as TLDecryptedMessage73;\r\n                                    if (message73 != null && message73.GroupedId != null)\r\n                                    {\r\n                                        var mediaGroup = message73.Media as TLDecryptedMessageMediaGroup;\r\n                                        if (mediaGroup != null)\r\n                                        {\r\n                                            groupedMessage = true;\r\n                                            for (var k = 0; k < mediaGroup.Group.Count; k++)\r\n                                            {\r\n                                                if (mediaGroup.Group[k].RandomId.Value == randomId.Value)\r\n                                                {\r\n                                                    mediaGroup.Group.RemoveAt(k);\r\n                                                    if (mediaGroup.Group.Count == 0)\r\n                                                    {\r\n                                                        Items.Remove(message73);\r\n                                                    }\r\n                                                    else\r\n                                                    {\r\n                                                        group[message73.GroupedId.Value] = mediaGroup;\r\n                                                    }\r\n                                                    break;\r\n                                                }\r\n                                            }\r\n                                        }\r\n                                    }\r\n\r\n                                    if (!groupedMessage && Items[i].RandomId.Value == randomId.Value)\r\n                                    {\r\n                                        Items.RemoveAt(i);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            foreach (var mediaGroup in group.Values)\r\n                            {\r\n                                mediaGroup.RaiseCalculate();\r\n                            }\r\n\r\n                            CacheService.DeleteDecryptedMessages(deleteMessagesAction.RandomIds);\r\n                        });\r\n                    }\r\n                }\r\n\r\n                if (!TLUtils.IsDisplayedDecryptedMessage(decryptedMessage))\r\n                {\r\n                    return;\r\n                }\r\n\r\n                ProcessMessages(new List<TLDecryptedMessageBase> { decryptedMessage });\r\n\r\n                Execute.OnUIThread(() =>\r\n                {\r\n                    var addedGrouped = false;\r\n                    var message73 = decryptedMessage as TLDecryptedMessage73;\r\n                    if (message73 != null && message73.GroupedId != null && Items.Count > 0)\r\n                    {\r\n                        var previousMessage = Items[0] as TLDecryptedMessage73;\r\n                        if (previousMessage != null\r\n                            && previousMessage.GroupedId != null\r\n                            && previousMessage.GroupedId.Value == message73.GroupedId.Value)\r\n                        {\r\n                            Items.RemoveAt(0);\r\n                            var items = new List<TLDecryptedMessageBase>();\r\n                            var mediaGroup = previousMessage.Media as TLDecryptedMessageMediaGroup;\r\n                            if (mediaGroup != null)\r\n                            {\r\n                                items.Add(message73);\r\n\r\n                                for (var i = mediaGroup.Group.Count - 1; i >= 0; i--)\r\n                                {\r\n                                    items.Add(mediaGroup.Group[i]);\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                items.Add(message73);\r\n                                items.Add(previousMessage);\r\n                            }\r\n\r\n                            ProcessGroupedMessages(items);\r\n\r\n                            for (var j = 0; j < items.Count; j++)\r\n                            {\r\n                                InsertMessageInOrder(items[j]);\r\n                            }\r\n\r\n                            addedGrouped = true;\r\n                        }\r\n                    }\r\n\r\n                    var position = -1;\r\n                    if (!addedGrouped)\r\n                    {\r\n                        position = InsertMessageInOrder(decryptedMessage);\r\n                        System.Diagnostics.Debug.WriteLine(\"Handle.Insert random_id={0} date={1} position={2}\", decryptedMessage.RandomId, decryptedMessage.Date, position);\r\n                    }\r\n                    else\r\n                    {\r\n                        position = 0;\r\n                    }\r\n                    NotifyOfPropertyChange(() => DescriptionVisibility);\r\n\r\n                    if (position != -1)\r\n                    {\r\n                        ReadMessages(decryptedMessage);\r\n                        if (decryptedMessage is TLDecryptedMessage)\r\n                        {\r\n                            InputTypingManager.RemoveTypingUser(With.Index);\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        private void SplitGroupedMessages(IList<TLLong> messages)\r\n        {\r\n            if (messages.Count == 0) return;\r\n\r\n            var messagesDict = messages.ToDictionary(x => x.Value);\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var message = Items[i] as TLDecryptedMessage73;\r\n                if (message != null)\r\n                {\r\n                    var mediaGroup = message.Media as TLDecryptedMessageMediaGroup;\r\n                    if (mediaGroup != null)\r\n                    {\r\n                        var removed = false;\r\n                        for (var j = 0; j < mediaGroup.Group.Count; j++)\r\n                        {\r\n                            if (messagesDict.ContainsKey(mediaGroup.Group[j].RandomIndex))\r\n                            {\r\n                                removed = true;\r\n                                break;\r\n                            }\r\n                        }\r\n\r\n                        if (removed)\r\n                        {\r\n                            Items.RemoveAt(i);\r\n\r\n                            var group = new TLVector<TLDecryptedMessageBase>(mediaGroup.Group.Reverse().ToList());\r\n\r\n                            ProcessGroupedMessages(group);\r\n\r\n                            for (var j = 0; j < group.Count; j++)\r\n                            {\r\n                                Items.Insert(i++, group[j]);\r\n                            }\r\n                            i--;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(TLEncryptedChatBase encryptedChat)\r\n        {\r\n            if (encryptedChat != null\r\n                && Chat != null\r\n                && encryptedChat.Id.Value == Chat.Id.Value)\r\n            {\r\n                Chat = encryptedChat;\r\n                if (SecretChatDebug != null)\r\n                {\r\n                    SecretChatDebug.UpdateChat(encryptedChat);\r\n                }\r\n                NotifyOfPropertyChange(() => AppBarCommandString);\r\n                NotifyOfPropertyChange(() => IsAppBarCommandVisible);\r\n                NotifyOfPropertyChange(() => IsApplicationBarVisible);\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateEncryptedMessagesRead update)\r\n        {\r\n            return; //UpdatesService.ProcessUpdateInternal уже обработали там\r\n\r\n            if (update != null\r\n                && Chat != null\r\n                && update.ChatId.Value == Chat.Id.Value)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (Items[i].Out.Value)\r\n                        {\r\n                            if (Items[i].Status == MessageStatus.Confirmed)\r\n                            //&& Items[i].Date.Value <= update.MaxDate.Value) // здесь надо учитывать смещение по времени\r\n                            {\r\n                                Items[i].Status = MessageStatus.Read;\r\n                                Items[i].NotifyOfPropertyChange(\"Status\");\r\n                                if (Items[i].TTL != null && Items[i].TTL.Value > 0)\r\n                                {\r\n                                    var decryptedMessage = Items[i] as TLDecryptedMessage17;\r\n                                    if (decryptedMessage != null)\r\n                                    {\r\n                                        var decryptedPhoto = decryptedMessage.Media as TLDecryptedMessageMediaPhoto;\r\n                                        if (decryptedPhoto != null && Items[i].TTL.Value <= 60.0)\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n\r\n                                        var decryptedVideo17 = decryptedMessage.Media as TLDecryptedMessageMediaVideo17;\r\n                                        if (decryptedVideo17 != null && Items[i].TTL.Value <= 60.0)\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n\r\n                                        var decryptedAudio17 = decryptedMessage.Media as TLDecryptedMessageMediaAudio17;\r\n                                        if (decryptedAudio17 != null && Items[i].TTL.Value <= 60.0)\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n\r\n                                        var decryptedDocument45 = decryptedMessage.Media as TLDecryptedMessageMediaDocument45;\r\n                                        if (decryptedDocument45 != null && (Items[i].IsVoice() || Items[i].IsVideo()) && Items[i].TTL.Value <= 60.0)\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n                                    }\r\n\r\n                                    Items[i].DeleteDate = new TLLong(DateTime.Now.Ticks + Chat.MessageTTL.Value * TimeSpan.TicksPerSecond);\r\n                                }\r\n                            }\r\n                            else if (Items[i].Status == MessageStatus.Read)\r\n                            {\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdatePrivacy privacy)\r\n        {\r\n            if (privacy.Key is TLPrivacyKeyStatusTimestamp)\r\n            {\r\n                MTProtoService.GetFullUserAsync((With).ToInputUser(),\r\n                    userFull =>\r\n                    {\r\n                        With = userFull.User;\r\n                        NotifyOfPropertyChange(() => With);\r\n                        Subtitle = GetSubtitle(With);\r\n                        NotifyOfPropertyChange(() => Subtitle);\r\n                    });\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretDialogDetailsViewModel.InlineBots.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Device.Location;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Media.Imaging;\r\nusing Windows.Storage;\r\nusing Windows.Storage.FileProperties;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Logs;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Execute = Caliburn.Micro.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    partial class SecretDialogDetailsViewModel\r\n    {\r\n        public void OpenInlineBot(TLUserBase bot)\r\n        {\r\n            var view = GetView() as IDialogDetailsView;\r\n            if (view != null) view.SetInlineBot(bot);\r\n        }\r\n\r\n        private string _botInlinePlaceholder;\r\n\r\n        public string BotInlinePlaceholder\r\n        {\r\n            get { return _botInlinePlaceholder; }\r\n            set { SetField(ref _botInlinePlaceholder, value, () => BotInlinePlaceholder); }\r\n        }\r\n\r\n        public TLUserBase _currentInlineBot;\r\n\r\n        public TLUserBase CurrentInlineBot\r\n        {\r\n            get { return _currentInlineBot; }\r\n            set\r\n            {\r\n                if (value != _currentInlineBot)\r\n                {\r\n                    _currentInlineBot = value;\r\n                    SetBotInlinePlaceholder();\r\n                }\r\n\r\n                if (_currentInlineBot == null && _watcher != null)\r\n                {\r\n                    _watcher.Stop();\r\n                    _disableWatching = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ResolveUsername(string text, string command = null)\r\n        {\r\n            var chat = Chat as TLEncryptedChat17;\r\n            if (chat == null || chat.Layer.Value < Constants.MinSecretChatWithInlineBotsLayer) return;\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                CurrentInlineBot = null;\r\n\r\n                return;\r\n            }\r\n\r\n            var username = new TLString(text.TrimStart('@'));\r\n\r\n            var users = CacheService.GetUsers();\r\n            for (var i = 0; i < users.Count; i++)\r\n            {\r\n                var user = users[i] as TLUser;\r\n                if (user != null && user.IsInlineBot\r\n                    && TLString.Equals(user.UserName, username, StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    if (!string.IsNullOrEmpty(command))\r\n                    {\r\n                        _currentInlineBot = user;\r\n                        GetInlineBotResults(command);\r\n                    }\r\n                    else\r\n                    {\r\n                        CurrentInlineBot = user;\r\n                        GetInlineBotResults(string.Empty);\r\n                    }\r\n                    return;\r\n                }\r\n            }\r\n\r\n            CurrentInlineBot = null;\r\n            NotifyOfPropertyChange(() => CurrentInlineBot);\r\n\r\n            if (CurrentInlineBot == null)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.ResolveUsernameAsync(username,\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        if (!string.IsNullOrEmpty(command))\r\n                        {\r\n                            _currentInlineBot = result.Users.FirstOrDefault();\r\n                            GetInlineBotResults(command);\r\n                        }\r\n                        else\r\n                        {\r\n                            CurrentInlineBot = result.Users.FirstOrDefault();\r\n                            GetInlineBotResults(string.Empty);\r\n                        }\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"contacts.resolveUsername error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        private bool SearchInlineBotResults(string text, out string searchText)\r\n        {\r\n            var searchInlineBotResults = false;\r\n            searchText = string.Empty;\r\n            if (CurrentInlineBot != null)\r\n            {\r\n                var user = CurrentInlineBot as IUserName;\r\n                if (user != null)\r\n                {\r\n                    var username = user.UserName.ToString();\r\n                    if (text != null\r\n                        && text.TrimStart().StartsWith(\"@\" + username, StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        searchText = ReplaceFirst(text.TrimStart(), \"@\" + username, string.Empty);\r\n                        if (searchText.StartsWith(\" \"))\r\n                        {\r\n                            searchText = ReplaceFirst(searchText, \" \", string.Empty);\r\n                            searchInlineBotResults = true;\r\n                        }\r\n\r\n                        if (!searchInlineBotResults)\r\n                        {\r\n                            if (string.Equals(text.TrimStart(), \"@\" + username, StringComparison.OrdinalIgnoreCase))\r\n                            {\r\n                                CurrentInlineBot = null;\r\n                            }\r\n                            else\r\n                            {\r\n                                SetBotInlinePlaceholder();\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            if (string.IsNullOrEmpty(searchText))\r\n                            {\r\n                                SetBotInlinePlaceholder();\r\n                            }\r\n                            else\r\n                            {\r\n                                BotInlinePlaceholder = string.Empty;\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        CurrentInlineBot = null;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return searchInlineBotResults;\r\n        }\r\n\r\n        public void SetBotInlinePlaceholder()\r\n        {\r\n            var user45 = _currentInlineBot as TLUser45;\r\n            if (user45 != null)\r\n            {\r\n                BotInlinePlaceholder = user45.BotInlinePlaceholder != null\r\n                    ? user45.BotInlinePlaceholder.ToString()\r\n                    : string.Empty;\r\n            }\r\n            else\r\n            {\r\n                BotInlinePlaceholder = string.Empty;\r\n            }\r\n        }\r\n\r\n        public string ReplaceFirst(string text, string search, string replace)\r\n        {\r\n            int pos = text.IndexOf(search, StringComparison.OrdinalIgnoreCase);\r\n            if (pos < 0)\r\n            {\r\n                return text;\r\n            }\r\n            return text.Substring(0, pos) + replace + text.Substring(pos + search.Length);\r\n        }\r\n\r\n\r\n        public InlineBotResultsViewModel InlineBotResults { get; protected set; }\r\n\r\n        private void CreateInlineBotResults()\r\n        {\r\n            if (InlineBotResults == null)\r\n            {\r\n                InlineBotResults = new InlineBotResultsViewModel(LoadNextInlineBotResults, Switch);\r\n                NotifyOfPropertyChange(() => InlineBotResults);\r\n            }\r\n        }\r\n\r\n        private void ClearInlineBotResults()\r\n        {\r\n            if (InlineBotResults != null && InlineBotResults.Results.Count > 0)\r\n            {\r\n                InlineBotResults.Results.Clear();\r\n\r\n                //View.ResumeChatPlayers();\r\n            }\r\n\r\n            _currentInlineBotResults = null;\r\n        }\r\n\r\n        public void Switch(TLInlineBotSwitchPM switchPM)\r\n        {\r\n            if (CurrentInlineBot == null) return;\r\n\r\n            StateService.With = CurrentInlineBot;\r\n            StateService.RemoveBackEntry = true;\r\n            StateService.SwitchPMWith = With;\r\n            StateService.Bot = CurrentInlineBot;\r\n            StateService.AccessToken = switchPM.StartParam.ToString();\r\n            NavigationService.UriFor<DialogDetailsViewModel>().WithParam(x => x.RandomParam, Guid.NewGuid().ToString()).Navigate();\r\n        }\r\n\r\n        private bool _inlineBotsNotification;\r\n\r\n        private readonly object _inlineBotsNotificationSyncRoot = new object();\r\n\r\n        private void CheckInlineBotsNotification()\r\n        {\r\n            if (_inlineBotsNotification) return;\r\n\r\n            _inlineBotsNotification = TLUtils.OpenObjectFromMTProtoFile<TLBool>(_inlineBotsNotificationSyncRoot, Constants.InlineBotsNotificationFileName) != null;\r\n\r\n            if (!_inlineBotsNotification)\r\n            {\r\n                MessageBox.Show(AppResources.InlineBotsNotification, AppResources.AppName, MessageBoxButton.OK);\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_inlineBotsNotificationSyncRoot, Constants.InlineBotsNotificationFileName, TLBool.True);\r\n\r\n                _inlineBotsNotification = true;\r\n            }\r\n        }\r\n\r\n        private readonly Dictionary<string, TLBotResults> _cachedInlineBotResults = new Dictionary<string, TLBotResults>();\r\n\r\n        private const int InlineBotMaxResults = 5;\r\n\r\n        private string _currentText;\r\n\r\n        private TLBotResults _currentInlineBotResults;\r\n\r\n        private GeoCoordinateWatcher _watcher;\r\n\r\n        private string _readyText;\r\n\r\n        private bool _suppressGetResultsOnReady;\r\n\r\n        public void GetInlineBotResults(string text)\r\n        {\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(\"GetInlineBotResults text='\" + text + \"'\");\r\n\r\n            if (text == null) return;\r\n\r\n            var currentInlineBot = CurrentInlineBot as TLUser;\r\n            if (currentInlineBot == null) return;\r\n\r\n            var username = currentInlineBot.UserName;\r\n            if (TLString.IsNullOrEmpty(username)) return;\r\n\r\n            var user45 = currentInlineBot as TLUser45;\r\n            if (!CheckBotInlineGeoAccess(user45)) return;\r\n\r\n            if (StartGeoWatching(text, user45)) return;\r\n\r\n            var currentText = text;\r\n            _currentText = text;\r\n\r\n            ClearInlineBotResults();\r\n\r\n            TLBotResults cachedResult;\r\n            if (_cachedInlineBotResults.TryGetValue(string.Format(\"{0}_{1}\", username, text), out cachedResult))\r\n            {\r\n                if (cachedResult != null)\r\n                {\r\n                    BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n                    {\r\n                        CheckInlineBotsNotification();\r\n\r\n                        if (CurrentInlineBot != currentInlineBot) return;\r\n                        if (_currentText != currentText) return;\r\n\r\n                        CreateInlineBotResults();\r\n\r\n                        InlineBotResults.Gallery = cachedResult.Gallery;\r\n                        var cachedResult51 = cachedResult as TLBotResults51;\r\n                        if (cachedResult51 != null)\r\n                        {\r\n                            InlineBotResults.SwitchPM = cachedResult51.SwitchPM;\r\n                        }\r\n                        for (var i = 0; i < cachedResult.Results.Count; i++)\r\n                        {\r\n                            if (i == InlineBotMaxResults) break;\r\n                            InlineBotResults.Results.Add(cachedResult.Results[i]);\r\n                        }\r\n\r\n                        if (InlineBotResults.Results.Count > 0) View.PauseChatPlayers();\r\n\r\n                        _currentInlineBotResults = cachedResult;\r\n                    });\r\n                }\r\n            }\r\n            else\r\n            {\r\n                BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n                {\r\n                    if (CurrentInlineBot != currentInlineBot) return;\r\n                    if (_currentText != currentText) return;\r\n\r\n                    CheckInlineBotsNotification();\r\n\r\n                    var geoPoint = GetGeoPoint(user45);\r\n\r\n                    IsWorking = true;\r\n                    //Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"messages.getInlineBotResults username={0} query={1}\", currentInlineBot.UserName, currentText));\r\n                    MTProtoService.GetInlineBotResultsAsync(currentInlineBot.ToInputUser(), new TLInputPeerSelf(), geoPoint, new TLString(currentText), TLString.Empty,\r\n                        result => BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n\r\n                            foreach (var inlineResult in result.Results)\r\n                            {\r\n                                inlineResult.QueryId = result.QueryId;\r\n                            }\r\n\r\n                            ClearUnsupportedResults(result);\r\n\r\n                            _cachedInlineBotResults[string.Format(\"{0}_{1}\", username, currentText)] = result;\r\n\r\n                            if (CurrentInlineBot != currentInlineBot) return;\r\n                            if (_currentText != currentText) return;\r\n\r\n                            CreateInlineBotResults();\r\n\r\n                            InlineBotResults.Gallery = result.Gallery;\r\n                            var cachedResult51 = cachedResult as TLBotResults51;\r\n                            if (cachedResult51 != null)\r\n                            {\r\n                                InlineBotResults.SwitchPM = cachedResult51.SwitchPM;\r\n                            }\r\n                            for (var i = 0; i < result.Results.Count; i++)\r\n                            {\r\n                                if (i == InlineBotMaxResults) break;\r\n                                InlineBotResults.Results.Add(result.Results[i]);\r\n                            }\r\n\r\n                            if (InlineBotResults.Results.Count > 0) View.PauseChatPlayers();\r\n\r\n                            _currentInlineBotResults = result;\r\n\r\n                            _cachedInlineBotResults[string.Format(\"{0}_{1}\", username, currentText)] = result;\r\n                        }),\r\n                        error => BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.getInlineBotResults error \" + error);\r\n                        }));\r\n                });\r\n            }\r\n        }\r\n\r\n        private static void ClearUnsupportedResults(TLBotResults result)\r\n        {\r\n            for (var i = 0; i < result.Results.Count; i++)\r\n            {\r\n                if (TLString.Equals(result.Results[i].Type, new TLString(\"audio\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    result.Results.RemoveAt(i--);\r\n                }\r\n                else if (TLString.Equals(result.Results[i].Type, new TLString(\"voice\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    result.Results.RemoveAt(i--);\r\n                }\r\n                else if (TLString.Equals(result.Results[i].Type, new TLString(\"sticker\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    result.Results.RemoveAt(i--);\r\n                }\r\n                else if (TLString.Equals(result.Results[i].Type, new TLString(\"file\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    result.Results.RemoveAt(i--);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool StartGeoWatching(string text, TLUser45 user45)\r\n        {\r\n            if (user45 != null && user45.IsBotInlineGeo && user45.BotInlineGeoAccess)\r\n            {\r\n                if (_watcher == null)\r\n                {\r\n                    _readyText = text;\r\n\r\n                    _watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High);\r\n                    _watcher.StatusChanged += (o, e) =>\r\n                    {\r\n                        if (_watcher.Status == GeoPositionStatus.Ready)\r\n                        {\r\n                            if (_suppressGetResultsOnReady)\r\n                            {\r\n                                _suppressGetResultsOnReady = false;\r\n                                //System.Diagnostics.Debug.WriteLine(\"    ReGetInlineBotReesults suppress status={0} text={1}\", _watcher.Status, text);\r\n                                return;\r\n                            }\r\n                            //System.Diagnostics.Debug.WriteLine(\"    ReGetInlineBotReesults status={0} text={1}\", _watcher.Status, text);\r\n                            GetInlineBotResults(_readyText);\r\n                            _readyText = null;\r\n                        }\r\n                        else if (_watcher.Status == GeoPositionStatus.Initializing)\r\n                        {\r\n                        }\r\n                        else if (_watcher.Status == GeoPositionStatus.Disabled)\r\n                        {\r\n                            var result = MessageBox.Show(AppResources.LocationServicesDisabled, AppResources.AppName, MessageBoxButton.OKCancel);\r\n                            if (result == MessageBoxResult.OK)\r\n                            {\r\n#if WP8\r\n                                Windows.System.Launcher.LaunchUriAsync(new Uri(\"ms-settings-location:\"));\r\n#endif\r\n                            }\r\n                        }\r\n                    };\r\n                    _watcher.Start(true);\r\n\r\n                    return true;\r\n                }\r\n\r\n                if (_disableWatching)\r\n                {\r\n                    _disableWatching = false;\r\n\r\n                    _watcher.Start(true);\r\n                    if (_watcher.Position.Location != GeoCoordinate.Unknown)\r\n                    {\r\n                        _suppressGetResultsOnReady = true;\r\n                    }\r\n                }\r\n\r\n                if (_watcher.Status == GeoPositionStatus.Initializing)\r\n                {\r\n                    if (_watcher.Position.Location == GeoCoordinate.Unknown)\r\n                    {\r\n                        //System.Diagnostics.Debug.WriteLine(\"    SetReadyText status={0} text={1}\", _watcher.Status, text);\r\n                        _readyText = text;\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n            return false;\r\n        }\r\n\r\n        private bool CheckBotInlineGeoAccess(TLUser45 user45)\r\n        {\r\n            if (user45 != null && user45.IsBotInlineGeo && !user45.BotInlineGeoAccess)\r\n            {\r\n                var now = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n                if (user45.NotifyGeoAccessDate == null\r\n                    || user45.NotifyGeoAccessDate.Value + Constants.RecheckBotInlineGeoAccessInterval <= now.Value)\r\n                {\r\n                    user45.NotifyGeoAccessDate = now;\r\n\r\n                    var result = MessageBox.Show(AppResources.ShareLocationInlineConfirmation, AppResources.ShareLocationCaption, MessageBoxButton.OKCancel);\r\n                    if (result != MessageBoxResult.OK) return false;\r\n\r\n                    user45.BotInlineGeoAccess = true;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private TLInputGeoPointBase GetGeoPoint(TLUser45 user45)\r\n        {\r\n            TLInputGeoPointBase geoPoint = null;\r\n            if (user45 != null && user45.IsBotInlineGeo)\r\n            {\r\n                geoPoint = new TLInputGeoPointEmpty();\r\n                if (user45.BotInlineGeoAccess && _watcher != null && _watcher.Status == GeoPositionStatus.Ready && _watcher.Position.Location != GeoCoordinate.Unknown)\r\n                {\r\n                    geoPoint = new TLInputGeoPoint { Lat = new TLDouble(_watcher.Position.Location.Latitude), Long = new TLDouble(_watcher.Position.Location.Longitude) };\r\n                }\r\n            }\r\n            return geoPoint;\r\n        }\r\n\r\n        public void ContinueInlineBotResults()\r\n        {\r\n            if (_currentInlineBotResults != null)\r\n            {\r\n                CreateInlineBotResults();\r\n\r\n                if (InlineBotResults.Results.Count == InlineBotMaxResults)\r\n                {\r\n                    for (var i = InlineBotMaxResults; i < _currentInlineBotResults.Results.Count; i++)\r\n                    {\r\n                        _currentInlineBotResults.Results[i].QueryId = _currentInlineBotResults.QueryId;\r\n                        InlineBotResults.Results.Add(_currentInlineBotResults.Results[i]);\r\n                    }\r\n\r\n                    if (InlineBotResults.Results.Count > 0) View.PauseChatPlayers();\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isLoadingNextInlineBotResults;\r\n\r\n        public void LoadNextInlineBotResults()\r\n        {\r\n            if (_isLoadingNextInlineBotResults) return;\r\n\r\n            if (CurrentInlineBot == null) return;\r\n            if (_currentInlineBotResults == null) return;\r\n            if (_currentInlineBotResults.NextOffset == null) return;\r\n\r\n            var currentInlineBot = CurrentInlineBot;\r\n            var currentInlineBotResults = _currentInlineBotResults;\r\n            var currentText = _currentText;\r\n\r\n            var user = CurrentInlineBot as TLUser;\r\n            if (user == null) return;\r\n\r\n            var username = user.UserName;\r\n\r\n            _isLoadingNextInlineBotResults = true;\r\n            IsWorking = true;\r\n\r\n            var geoPoint = GetGeoPoint(user as TLUser45);\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"messages.getInlineBotResults username={0} query={1}\", currentInlineBot.UserName, currentText));\r\n            MTProtoService.GetInlineBotResultsAsync(currentInlineBot.ToInputUser(), new TLInputPeerSelf(), geoPoint, new TLString(currentText), currentInlineBotResults.NextOffset,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    _isLoadingNextInlineBotResults = false;\r\n                    IsWorking = false;\r\n\r\n                    if (CurrentInlineBot == currentInlineBot && currentInlineBotResults == _currentInlineBotResults && _currentText == currentText)\r\n                    {\r\n                        for (var i = 0; i < result.Results.Count; i++)\r\n                        {\r\n                            result.Results[i].QueryId = result.QueryId;\r\n                            InlineBotResults.Results.Add(result.Results[i]);\r\n                        }\r\n\r\n                        if (InlineBotResults.Results.Count > 0) View.PauseChatPlayers();\r\n                    }\r\n\r\n                    TLBotResults cachedResult;\r\n                    if (_cachedInlineBotResults.TryGetValue(string.Format(\"{0}_{1}\", username, currentText), out cachedResult))\r\n                    {\r\n                        _cachedInlineBotResults[string.Format(\"{0}_{1}\", username, currentText)] = MergeInlineBotResults(cachedResult, result);\r\n                    }\r\n                    else\r\n                    {\r\n                        _cachedInlineBotResults[string.Format(\"{0}_{1}\", username, currentText)] = result;\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _isLoadingNextInlineBotResults = false;\r\n                    IsWorking = false;\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.getInlineBotResults error \" + error);\r\n                }));\r\n        }\r\n\r\n        private static TLBotResults MergeInlineBotResults(TLBotResults cachedResult, TLBotResults result)\r\n        {\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(\"MergeInlineBotResults \" + cachedResult.QueryId + \" \" + result.QueryId);\r\n\r\n            //if (cachedResult.QueryId.Value != result.QueryId.Value) return cachedResult;\r\n\r\n            cachedResult.Flags = result.Flags;\r\n            cachedResult.NextOffset = result.NextOffset;\r\n            foreach (var resultItem in result.Results)\r\n            {\r\n                cachedResult.Results.Add(resultItem);\r\n            }\r\n\r\n            return cachedResult;\r\n        }\r\n\r\n        public async void SendBotInlineResult(TLBotInlineResultBase result)\r\n        {\r\n            var currentInlineBot = CurrentInlineBot;\r\n            if (currentInlineBot == null) return;\r\n\r\n            var inlineBots = DialogDetailsViewModel.GetInlineBots();\r\n            if (!inlineBots.Contains(currentInlineBot))\r\n            {\r\n                inlineBots.Insert(0, currentInlineBot);\r\n                //_cachedUsernameResults.Clear();\r\n            }\r\n            else\r\n            {\r\n                inlineBots.Remove(currentInlineBot);\r\n                inlineBots.Insert(0, currentInlineBot);\r\n                //_cachedUsernameResults.Clear();\r\n            }\r\n\r\n            DialogDetailsViewModel.SaveInlineBotsAsync();\r\n\r\n            if (_currentInlineBotResults == null) return;\r\n            var queryId = _currentInlineBotResults.QueryId;\r\n\r\n            ClearInlineBotResults();\r\n            CurrentInlineBot = null;\r\n            NotifyOfPropertyChange(() => BotInlinePlaceholder);\r\n            Text = string.Empty;\r\n\r\n            BeginOnUIThread(async () =>\r\n            {\r\n                var chat = Chat as TLEncryptedChat;\r\n                if (chat == null) return;\r\n\r\n                var decryptedTuple = GetDecryptedMessageAndObject(TLString.Empty, new TLDecryptedMessageMediaEmpty(), chat, GetDelaySeq(result));\r\n\r\n                var processed = await ProcessBotInlineResult(decryptedTuple, result, currentInlineBot, ContinueProcessBotInlineResult);\r\n\r\n                if (processed == null) return;\r\n\r\n                Items.Insert(0, decryptedTuple.Item1);\r\n\r\n                NotifyOfPropertyChange(() => DescriptionVisibility);\r\n\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    ProcessScroll();\r\n                    View.ResumeChatPlayers();\r\n                });\r\n\r\n                if (processed == true)\r\n                {\r\n                    SendEncrypted(chat, decryptedTuple.Item2, MTProtoService, CacheService);\r\n                }\r\n                else\r\n                {\r\n                    CacheService.SyncDecryptedMessage(decryptedTuple.Item1, Chat, cachedMessage => { });\r\n                }\r\n            });\r\n        }\r\n\r\n        private bool GetDelaySeq(TLBotInlineResultBase result)\r\n        {\r\n            if (result.SendMessage is TLBotInlineMessageMediaContact)\r\n            {\r\n                return false;\r\n            }\r\n            if (result.SendMessage is TLBotInlineMessageMediaVenue)\r\n            {\r\n                return false;\r\n            }\r\n            if (result.SendMessage is TLBotInlineMessageMediaGeo)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private async void ContinueProcessBotInlineResult(Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject> tuple, TLInt fileSize, string fileName)\r\n        {\r\n            var sourceFileName = fileName;\r\n\r\n            var dcId = TLInt.Random();\r\n            var id = TLLong.Random();\r\n            var accessHash = TLLong.Random();\r\n\r\n            var fileLocation = new TLEncryptedFile\r\n            {\r\n                Id = id,\r\n                AccessHash = accessHash,\r\n                DCId = dcId,\r\n                Size = fileSize,\r\n                KeyFingerprint = new TLInt(0)\r\n            };\r\n\r\n            var destinationFileExt = Path.GetExtension(sourceFileName);\r\n            var destinationFileName = String.Format(\"{0}_{1}_{2}{3}\",\r\n                fileLocation.Id,\r\n                fileLocation.DCId,\r\n                fileLocation.AccessHash,\r\n                destinationFileExt);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                store.CopyFile(sourceFileName, destinationFileName);\r\n            }\r\n\r\n            var decryptedMessage = tuple.Item1 as TLDecryptedMessage;\r\n            if (decryptedMessage == null) return;\r\n\r\n            var mediaPhoto = decryptedMessage.Media as TLDecryptedMessageMediaPhoto;\r\n            if (mediaPhoto != null)\r\n            {\r\n                if (mediaPhoto.ThumbW.Value == mediaPhoto.ThumbH.Value\r\n                    && mediaPhoto.ThumbW.Value == 0)\r\n                {\r\n                    var preview = await GetLocalFilePreviewBytes(fileName);\r\n                    if (preview != null)\r\n                    {\r\n                        mediaPhoto.Thumb = preview.Bytes;\r\n                        mediaPhoto.ThumbH = preview.H;\r\n                        mediaPhoto.ThumbW = preview.W;\r\n                    }\r\n                }\r\n\r\n                mediaPhoto.File = fileLocation;\r\n\r\n                var storageFile = await ApplicationData.Current.LocalFolder.GetFileAsync(destinationFileName);\r\n                if (storageFile == null) return;\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.ThumbSelf);\r\n                    mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.Self);\r\n\r\n                    mediaPhoto.DownloadingProgress = 0.0;\r\n                    mediaPhoto.UploadingProgress = 0.001;\r\n                    UploadDocumentFileManager.UploadFile(fileLocation.Id, tuple.Item2, storageFile, mediaPhoto.Key, mediaPhoto.IV);\r\n                });\r\n            }\r\n\r\n            var mediaDocument = decryptedMessage.Media as TLDecryptedMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                if (mediaDocument.ThumbW.Value == mediaDocument.ThumbH.Value\r\n                    && mediaDocument.ThumbW.Value == 0)\r\n                {\r\n                    if (fileName.EndsWith(\"png\") || fileName.EndsWith(\".jpg\"))\r\n                    {\r\n                        var preview = await GetLocalFilePreviewBytes(fileName);\r\n                        if (preview != null)\r\n                        {\r\n                            mediaDocument.Thumb = preview.Bytes;\r\n                            mediaDocument.ThumbH = preview.H;\r\n                            mediaDocument.ThumbW = preview.W;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                mediaDocument.File = fileLocation;\r\n\r\n                var storageFile = await ApplicationData.Current.LocalFolder.GetFileAsync(destinationFileName);\r\n                if (storageFile == null) return;\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    mediaDocument.NotifyOfPropertyChange(() => mediaDocument.Document);\r\n                    mediaDocument.NotifyOfPropertyChange(() => mediaDocument.Self);\r\n\r\n                    mediaDocument.DownloadingProgress = 0.0;\r\n                    mediaDocument.UploadingProgress = 0.001;\r\n                    UploadDocumentFileManager.UploadFile(fileLocation.Id, tuple.Item2, storageFile, mediaDocument.Key, mediaDocument.IV);\r\n                });\r\n            }\r\n        }\r\n\r\n        private async void ResendInlineBotResult(TLDecryptedMessage45 message, Action<Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>, TLInt, string> downloadFileCallback)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null)\r\n            {\r\n                message.Status = MessageStatus.Failed;\r\n                message.NotifyOfPropertyChange(() => message.Status);\r\n                return;\r\n            }\r\n\r\n            var tuple = GetDecryptedMessageAndObject(message, chat);\r\n            if (tuple == null)\r\n            {\r\n                message.Status = MessageStatus.Failed;\r\n                message.NotifyOfPropertyChange(() => message.Status);\r\n                return;\r\n            }\r\n\r\n            var resultBase = message.InlineBotResult;\r\n\r\n            var mediaResultDocument = resultBase as TLBotInlineMediaResult;\r\n            if (mediaResultDocument != null && mediaResultDocument.Document != null)\r\n            {\r\n                var document = mediaResultDocument.Document as TLDocument22;\r\n                if (document == null)\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    message.NotifyOfPropertyChange(() => message.Status);\r\n                    return;\r\n                }\r\n\r\n                var fileLocation = document.ToInputFileLocation();\r\n                if (fileLocation == null)\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    message.NotifyOfPropertyChange(() => message.Status);\r\n                    return;\r\n                }\r\n\r\n                var mediaDocument = message.Media as TLDecryptedMessageMediaDocument45;\r\n                if (mediaDocument == null)\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    message.NotifyOfPropertyChange(() => message.Status);\r\n                    return;\r\n                }\r\n\r\n                var fileExtension = Path.GetExtension(document.FileName.ToString());\r\n                var fileName = string.Format(\"document{0}_{1}{2}\", fileLocation.Id, fileLocation.AccessHash, fileExtension);\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (!store.FileExists(fileName))\r\n                    {\r\n                        message.Media.DownloadingProgress = 0.001;\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            var owner = mediaDocument;\r\n                            var fileManager = IoC.Get<IDocumentFileManager>();\r\n                            fileManager.DownloadFileAsync(\r\n                                document.FileName,\r\n                                document.DCId,\r\n                                document.ToInputFileLocation(),\r\n                                owner,\r\n                                document.Size,\r\n                                null,\r\n                                item => downloadFileCallback.SafeInvoke(tuple, mediaDocument.Size, fileName));\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        downloadFileCallback.SafeInvoke(tuple, mediaDocument.Size, fileName);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var mediaResultPhoto = resultBase as TLBotInlineMediaResult;\r\n            if (mediaResultPhoto != null)\r\n            {\r\n                var photo = mediaResultPhoto.Photo as TLPhoto;\r\n                if (photo == null)\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    message.NotifyOfPropertyChange(() => message.Status);\r\n                    return;\r\n                }\r\n\r\n                var maxSize = GetPhotoMaxSize(photo);\r\n                if (maxSize == null)\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    message.NotifyOfPropertyChange(() => message.Status);\r\n                    return;\r\n                }\r\n\r\n                var maxSizeLocation = maxSize.Location as TLFileLocation;\r\n                if (maxSizeLocation == null)\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    message.NotifyOfPropertyChange(() => message.Status);\r\n                    return;\r\n                }\r\n\r\n                var mediaPhoto = message.Media as TLDecryptedMessageMediaPhoto;\r\n                if (mediaPhoto == null)\r\n                {\r\n                    message.Status = MessageStatus.Failed;\r\n                    message.NotifyOfPropertyChange(() => message.Status);\r\n                    return;\r\n                }\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                    maxSizeLocation.VolumeId,\r\n                    maxSizeLocation.LocalId,\r\n                    maxSizeLocation.Secret);\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (!store.FileExists(fileName))\r\n                    {\r\n                        message.Media.DownloadingProgress = 0.001;\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            var owner = photo;\r\n                            var fileManager = IoC.Get<IFileManager>();\r\n                            fileManager.DownloadFile(maxSizeLocation, owner, mediaPhoto.Size, item => downloadFileCallback.SafeInvoke(tuple, mediaPhoto.Size, fileName));\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        downloadFileCallback.SafeInvoke(tuple, mediaPhoto.Size, fileName);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var result = resultBase as TLBotInlineResult;\r\n            if (result != null)\r\n            {\r\n                if (TLString.Equals(result.Type, new TLString(\"gif\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    var contentUrl = result.ContentUrl;\r\n                    if (contentUrl == null)\r\n                    {\r\n                        message.Status = MessageStatus.Failed;\r\n                        message.NotifyOfPropertyChange(() => message.Status);\r\n                        return;\r\n                    }\r\n\r\n                    var mediaDocument = message.Media as TLDecryptedMessageMediaDocument45;\r\n                    if (mediaDocument == null)\r\n                    {\r\n                        message.Status = MessageStatus.Failed;\r\n                        message.NotifyOfPropertyChange(() => message.Status);\r\n                        return;\r\n                    }\r\n\r\n                    var previewFileName = result.ThumbUrlString ?? result.ContentUrlString;\r\n                    if (previewFileName == null)\r\n                    {\r\n                        message.Status = MessageStatus.Failed;\r\n                        message.NotifyOfPropertyChange(() => message.Status);\r\n                        return;\r\n                    }\r\n\r\n                    var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                    var httpFileManager = IoC.Get<IHttpDocumentFileManager>();\r\n                    var previewFileExtension = Path.GetExtension(previewFileName);\r\n                    var destinationPreviewFileName = string.Format(\"preview{0}_{1}{2}\", result.Id, result.QueryId, previewFileExtension);\r\n                    if (!store.FileExists(destinationPreviewFileName))\r\n                    {\r\n                        httpFileManager.DownloadFileAsync(previewFileName, destinationPreviewFileName, result,\r\n                            async item =>\r\n                            {\r\n                                var cachedSize = await GetLocalFilePreviewBytes(destinationPreviewFileName);\r\n                                if (cachedSize != null)\r\n                                {\r\n                                    mediaDocument.Thumb = cachedSize.Bytes;\r\n                                    mediaDocument.ThumbW = cachedSize.W;\r\n                                    mediaDocument.ThumbH = cachedSize.H;\r\n                                }\r\n\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    mediaDocument.NotifyOfPropertyChange(() => mediaDocument.Document);\r\n                                });\r\n                            },\r\n                            error =>\r\n                            {\r\n\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        var cachedSize = await GetLocalFilePreviewBytes(destinationPreviewFileName);\r\n                        if (cachedSize != null)\r\n                        {\r\n                            mediaDocument.Thumb = cachedSize.Bytes;\r\n                            mediaDocument.ThumbW = cachedSize.W;\r\n                            mediaDocument.ThumbH = cachedSize.H;\r\n                        }\r\n                    }\r\n\r\n                    var contentFileName = result.ContentUrlString ?? result.ThumbUrlString;\r\n                    if (contentFileName == null)\r\n                    {\r\n                        message.Status = MessageStatus.Failed;\r\n                        message.NotifyOfPropertyChange(() => message.Status);\r\n                        return;\r\n                    }\r\n\r\n                    var maxSizeLocation = new TLFileLocation\r\n                    {\r\n                        DCId = new TLInt(1),\r\n                        VolumeId = TLLong.Random(),\r\n                        LocalId = TLInt.Random(),\r\n                        Secret = TLLong.Random()\r\n                    };\r\n\r\n                    var maxSize = new TLPhotoSize\r\n                    {\r\n                        Type = TLString.Empty,\r\n                        Location = maxSizeLocation,\r\n                        W = result.W,\r\n                        H = result.H,\r\n                        Size = new TLInt(0)\r\n                    };\r\n\r\n                    var fileExtension = Path.GetExtension(contentUrl.ToString());\r\n                    var fileName = String.Format(\"{0}_{1}_{2}{3}\",\r\n                        maxSizeLocation.VolumeId,\r\n                        maxSizeLocation.LocalId,\r\n                        maxSizeLocation.Secret,\r\n                        fileExtension);\r\n\r\n                    var destinationContentFileName = string.Format(\"content{0}_{1}{2}\", result.Id, result.QueryId, fileExtension);\r\n                    //if (string.Equals(contentFileName, previewFileName, StringComparison.OrdinalIgnoreCase))\r\n                    //{\r\n                    //    store.CopyFile(destinationPreviewFileName, fileName);\r\n\r\n                    //    using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                    //    {\r\n                    //        mediaDocument.Size = new TLInt((int)file.Length);\r\n                    //        maxSize.Size = new TLInt((int)file.Length);\r\n                    //    }\r\n\r\n                    //    downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                    //}\r\n                    //else\r\n                    {\r\n                        if (!store.FileExists(destinationContentFileName))\r\n                        {\r\n                            mediaDocument.DownloadingProgress = 0.001;\r\n                            httpFileManager.DownloadFileAsync(contentFileName, destinationContentFileName, result,\r\n                                item =>\r\n                                {\r\n                                    store.CopyFile(item.IsoFileName, fileName);\r\n                                    store.DeleteFile(item.IsoFileName);\r\n\r\n                                    using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                                    {\r\n                                        mediaDocument.Size = new TLInt((int)file.Length);\r\n                                        maxSize.Size = new TLInt((int)file.Length);\r\n                                    }\r\n\r\n                                    downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                                },\r\n                                error => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    message.Status = MessageStatus.Failed;\r\n                                    message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                                    mediaDocument.DownloadingProgress = 0.0;\r\n                                }));\r\n                        }\r\n                        else\r\n                        {\r\n                            store.CopyFile(destinationContentFileName, fileName);\r\n                            store.DeleteFile(destinationContentFileName);\r\n\r\n                            using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                            {\r\n                                mediaDocument.Size = new TLInt((int)file.Length);\r\n                                maxSize.Size = new TLInt((int)file.Length);\r\n                            }\r\n\r\n                            downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                        }\r\n                    }\r\n                }\r\n                else if (TLString.Equals(result.Type, new TLString(\"photo\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    var mediaPhoto = message.Media as TLDecryptedMessageMediaPhoto45;\r\n                    if (mediaPhoto == null)\r\n                    {\r\n                        message.Status = MessageStatus.Failed;\r\n                        message.NotifyOfPropertyChange(() => message.Status);\r\n                        return;\r\n                    }\r\n\r\n                    var previewFileName = result.ThumbUrlString ?? result.ContentUrlString;\r\n                    if (previewFileName == null)\r\n                    {\r\n                        message.Status = MessageStatus.Failed;\r\n                        message.NotifyOfPropertyChange(() => message.Status);\r\n                        return;\r\n                    }\r\n\r\n                    var destinationPreviewFileName = string.Format(\"preview{0}_{1}.jpg\", result.Id, result.QueryId);\r\n                    var httpFileManager = IoC.Get<IHttpDocumentFileManager>();\r\n                    var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                    if (!store.FileExists(destinationPreviewFileName))\r\n                    {\r\n                        httpFileManager.DownloadFileAsync(previewFileName, destinationPreviewFileName, result,\r\n                            async item =>\r\n                            {\r\n                                var cachedSize = await GetLocalFilePreviewBytes(destinationPreviewFileName);\r\n                                if (cachedSize != null)\r\n                                {\r\n                                    mediaPhoto.Thumb = cachedSize.Bytes;\r\n                                    mediaPhoto.ThumbW = cachedSize.W;\r\n                                    mediaPhoto.ThumbH = cachedSize.H;\r\n                                }\r\n\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.ThumbSelf);\r\n                                });\r\n                            },\r\n                            error =>\r\n                            {\r\n\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        var cachedSize = await GetLocalFilePreviewBytes(destinationPreviewFileName);\r\n                        if (cachedSize != null)\r\n                        {\r\n                            mediaPhoto.Thumb = cachedSize.Bytes;\r\n                            mediaPhoto.ThumbW = cachedSize.W;\r\n                            mediaPhoto.ThumbH = cachedSize.H;\r\n                        }\r\n                    }\r\n\r\n                    var contentFileName = result.ContentUrlString ?? result.ThumbUrlString;\r\n                    if (contentFileName == null)\r\n                    {\r\n                        message.Status = MessageStatus.Failed;\r\n                        message.NotifyOfPropertyChange(() => message.Status);\r\n                        return;\r\n                    }\r\n\r\n                    var maxSizeLocation = new TLFileLocation\r\n                    {\r\n                        DCId = new TLInt(1),\r\n                        VolumeId = TLLong.Random(),\r\n                        LocalId = TLInt.Random(),\r\n                        Secret = TLLong.Random()\r\n                    };\r\n\r\n                    var maxSize = new TLPhotoSize\r\n                    {\r\n                        Type = TLString.Empty,\r\n                        Location = maxSizeLocation,\r\n                        W = result.W,\r\n                        H = result.H,\r\n                        Size = new TLInt(0)\r\n                    };\r\n\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        maxSizeLocation.VolumeId,\r\n                        maxSizeLocation.LocalId,\r\n                        maxSizeLocation.Secret);\r\n\r\n                    var destinationContentFileName = string.Format(\"content{0}_{1}.jpg\", result.Id, result.QueryId);\r\n                    //if (string.Equals(contentFileName, previewFileName, StringComparison.OrdinalIgnoreCase))\r\n                    //{\r\n                    //    store.CopyFile(destinationPreviewFileName, fileName);\r\n\r\n                    //    using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                    //    {\r\n                    //        mediaPhoto.Size = new TLInt((int) file.Length);\r\n                    //        maxSize.Size = new TLInt((int) file.Length);\r\n                    //    }\r\n\r\n                    //    downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                    //}\r\n                    //else\r\n                    {\r\n                        if (!store.FileExists(destinationContentFileName))\r\n                        {\r\n                            mediaPhoto.DownloadingProgress = 0.001;\r\n                            httpFileManager.DownloadFileAsync(contentFileName, destinationContentFileName, result,\r\n                                item =>\r\n                                {\r\n                                    store.CopyFile(item.IsoFileName, fileName);\r\n                                    store.DeleteFile(item.IsoFileName);\r\n\r\n                                    using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                                    {\r\n                                        mediaPhoto.Size = new TLInt((int)file.Length);\r\n                                        maxSize.Size = new TLInt((int)file.Length);\r\n                                    }\r\n\r\n                                    downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                                },\r\n                                error => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    message.Status = MessageStatus.Failed;\r\n                                    message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                                    mediaPhoto.DownloadingProgress = 0.0;\r\n                                }));\r\n                        }\r\n                        else\r\n                        {\r\n                            store.CopyFile(destinationContentFileName, fileName);\r\n                            store.DeleteFile(destinationContentFileName);\r\n\r\n                            using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                            {\r\n                                mediaPhoto.Size = new TLInt((int)file.Length);\r\n                                maxSize.Size = new TLInt((int)file.Length);\r\n                            }\r\n\r\n                            downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private static async Task<bool?> ProcessBotInlineResult(Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject> tuple, TLBotInlineResultBase resultBase, TLUserBase bot, Action<Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>, TLInt, string> downloadFileCallback)\r\n        {\r\n            var processed = true;\r\n            var message = tuple.Item1 as TLDecryptedMessage45;\r\n            if (message == null) return null;\r\n\r\n            var userName = bot as IUserName;\r\n            if (userName != null)\r\n            {\r\n                message.ViaBotName = userName.UserName;\r\n            }\r\n            \r\n            message.InlineBotResult = resultBase;\r\n\r\n\r\n            var botInlineMessageMediaVenue = resultBase.SendMessage as TLBotInlineMessageMediaVenue;\r\n            var botInlineMessageMediaGeo = resultBase.SendMessage as TLBotInlineMessageMediaGeo;\r\n            if (botInlineMessageMediaVenue != null)\r\n            {\r\n                var geoPoint = botInlineMessageMediaVenue.Geo as TLGeoPoint;\r\n\r\n                message.Media = new TLDecryptedMessageMediaVenue\r\n                {\r\n                    Title = botInlineMessageMediaVenue.Title,\r\n                    Address = botInlineMessageMediaVenue.Address,\r\n                    Provider = botInlineMessageMediaVenue.Provider,\r\n                    VenueId = botInlineMessageMediaVenue.VenueId,\r\n                    Lat = geoPoint != null ? geoPoint.Lat : new TLDouble(0.0),\r\n                    Long = geoPoint != null ? geoPoint.Long : new TLDouble(0.0),\r\n                };\r\n                message.SetMedia();\r\n            }\r\n            else if (botInlineMessageMediaGeo != null)\r\n            {\r\n                var geoPoint = botInlineMessageMediaGeo.Geo as TLGeoPoint;\r\n\r\n                message.Media = new TLDecryptedMessageMediaGeoPoint\r\n                {\r\n                    Lat = geoPoint != null ? geoPoint.Lat : new TLDouble(0.0),\r\n                    Long = geoPoint != null ? geoPoint.Long : new TLDouble(0.0),\r\n                };\r\n                message.SetMedia();\r\n            }\r\n\r\n            var botInlineMessageMediaContact = resultBase.SendMessage as TLBotInlineMessageMediaContact;\r\n            if (botInlineMessageMediaContact != null)\r\n            {\r\n                message.Media = new TLDecryptedMessageMediaContact\r\n                {\r\n                    PhoneNumber = botInlineMessageMediaContact.PhoneNumber,\r\n                    FirstName = botInlineMessageMediaContact.FirstName,\r\n                    LastName = botInlineMessageMediaContact.LastName,\r\n                    UserId = new TLInt(0)\r\n                };\r\n                message.SetMedia();\r\n            }\r\n\r\n            var mediaResultDocument = resultBase as TLBotInlineMediaResult;\r\n            if (mediaResultDocument != null && mediaResultDocument.Document != null)\r\n            {\r\n                var document = mediaResultDocument.Document as TLDocument22;\r\n                if (document != null)\r\n                {\r\n                    var fileLocation = document.ToInputFileLocation();\r\n                    if (fileLocation == null) return null;\r\n\r\n                    var keyIV = GenerateKeyIV();\r\n                    var mediaDocument = new TLDecryptedMessageMediaDocument45\r\n                    {\r\n                        Thumb = TLString.Empty,\r\n                        ThumbW = new TLInt(0),\r\n                        ThumbH = new TLInt(0),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n                        MimeType = document.MimeType,\r\n                        Size = document.Size,\r\n                        Attributes = document.Attributes,\r\n                        Caption = TLString.Empty,\r\n                    };\r\n\r\n                    var inlinePreviewSize = document.Thumb as IPhotoSize;\r\n                    if (inlinePreviewSize != null)\r\n                    {\r\n                        var preview = await GetLocalFilePreview(inlinePreviewSize);\r\n                        if (preview != null)\r\n                        {\r\n                            mediaDocument.Thumb = preview.Bytes;\r\n                            mediaDocument.ThumbH = preview.H;\r\n                            mediaDocument.ThumbW = preview.W;\r\n                        }\r\n                    }\r\n\r\n                    message.Media = mediaDocument;\r\n                    message.SetMedia();\r\n\r\n                    var fileExtension = Path.GetExtension(document.FileName.ToString());\r\n                    var fileName = string.Format(\"document{0}_{1}{2}\", fileLocation.Id, fileLocation.AccessHash, fileExtension);\r\n\r\n                    processed = false;\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.FileExists(fileName))\r\n                        {\r\n                            message.Media.DownloadingProgress = 0.001;\r\n                            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                            {\r\n                                var owner = mediaDocument;\r\n                                var fileManager = IoC.Get<IDocumentFileManager>();\r\n                                fileManager.DownloadFileAsync(\r\n                                    document.FileName,\r\n                                    document.DCId,\r\n                                    document.ToInputFileLocation(),\r\n                                    owner,\r\n                                    document.Size,\r\n                                    null,\r\n                                    item => downloadFileCallback.SafeInvoke(tuple, mediaDocument.Size, fileName));\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            downloadFileCallback.SafeInvoke(tuple, mediaDocument.Size, fileName);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var mediaResultPhoto = resultBase as TLBotInlineMediaResult;\r\n            if (mediaResultPhoto != null && mediaResultPhoto.Photo != null)\r\n            {\r\n                var photo = mediaResultPhoto.Photo as TLPhoto;\r\n                if (photo != null)\r\n                {\r\n                    var maxSize = GetPhotoMaxSize(photo);\r\n                    if (maxSize == null) return null;\r\n\r\n                    var keyIV = GenerateKeyIV();\r\n                    var mediaPhoto = new TLDecryptedMessageMediaPhoto45\r\n                    {\r\n                        Thumb = TLString.Empty,\r\n                        ThumbW = new TLInt(0),\r\n                        ThumbH = new TLInt(0),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n                        W = maxSize.W,\r\n                        H = maxSize.H,\r\n                        Size = maxSize.Size,\r\n                        Caption = TLString.Empty,\r\n                    };\r\n\r\n                    var inlinePreviewSize = photo.Sizes.FirstOrDefault(x => x is TLPhotoCachedSize) as IPhotoSize ??\r\n                                            InlineBotResultPhotoConverter.GetPhotoSize(photo);\r\n                    if (inlinePreviewSize != null)\r\n                    {\r\n                        var preview = await GetLocalFilePreview(inlinePreviewSize);\r\n                        if (preview != null)\r\n                        {\r\n                            mediaPhoto.Thumb = preview.Bytes;\r\n                            mediaPhoto.ThumbH = preview.H;\r\n                            mediaPhoto.ThumbW = preview.W;\r\n                        }\r\n                    }  \r\n\r\n                    var maxSizeLocation = maxSize.Location as TLFileLocation;\r\n                    if (maxSizeLocation == null) return null;\r\n                    \r\n                    message.Media = mediaPhoto;\r\n                    message.SetMedia();\r\n\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        maxSizeLocation.VolumeId,\r\n                        maxSizeLocation.LocalId,\r\n                        maxSizeLocation.Secret);\r\n\r\n                    processed = false;\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.FileExists(fileName))\r\n                        {\r\n                            message.Media.DownloadingProgress = 0.001;\r\n                            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                            {\r\n                                var owner = photo;\r\n                                var fileManager = IoC.Get<IFileManager>();\r\n                                fileManager.DownloadFile(maxSizeLocation, owner, maxSize.Size, item => downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName));\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var result = resultBase as TLBotInlineResult;\r\n            if (result != null)\r\n            {\r\n                if (TLString.Equals(result.Type, new TLString(\"gif\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    var contentUrl = result.ContentUrl;\r\n                    if (contentUrl == null) return null;\r\n\r\n                    var keyIV = GenerateKeyIV();\r\n                    var mediaDocument = new TLDecryptedMessageMediaDocument45\r\n                    {\r\n                        Thumb = TLString.Empty,\r\n                        ThumbW = new TLInt(0),\r\n                        ThumbH = new TLInt(0),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n                        MimeType = result.ContentType,\r\n                        Size = new TLInt(1),\r\n                        Attributes = new TLVector<TLDocumentAttributeBase>(),\r\n                        Caption = TLString.Empty,\r\n                    };\r\n                    if (result.W != null && result.H != null && result.W.Value > 0 && result.H.Value > 0)\r\n                    {\r\n                        var duration = result.Duration ?? new TLInt(0);\r\n\r\n                        mediaDocument.Attributes.Add(new TLDocumentAttributeVideo { W = result.W, H = result.H, Duration = duration });\r\n                        mediaDocument.Attributes.Add(new TLDocumentAttributeAnimated());\r\n                        mediaDocument.Attributes.Add(new TLDocumentAttributeFileName{ FileName = new TLString(Path.GetFileName(contentUrl.ToString())) });\r\n                    }\r\n\r\n                    var previewFileName = result.ThumbUrlString ?? result.ContentUrlString;\r\n                    if (previewFileName == null) return null;\r\n\r\n                    var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                    var httpFileManager = IoC.Get<IHttpDocumentFileManager>();\r\n                    var previewFileExtension = Path.GetExtension(previewFileName);\r\n                    var destinationPreviewFileName = string.Format(\"preview{0}_{1}{2}\", result.Id, result.QueryId, previewFileExtension);\r\n                    if (!store.FileExists(destinationPreviewFileName))\r\n                    {\r\n                        httpFileManager.DownloadFileAsync(previewFileName, destinationPreviewFileName, result,\r\n                            async item =>\r\n                            {\r\n                                var cachedSize = await GetLocalFilePreviewBytes(destinationPreviewFileName);\r\n                                if (cachedSize != null)\r\n                                {\r\n                                    mediaDocument.Thumb = cachedSize.Bytes;\r\n                                    mediaDocument.ThumbW = cachedSize.W;\r\n                                    mediaDocument.ThumbH = cachedSize.H;\r\n                                }\r\n\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    message.NotifyOfPropertyChange(() => message.MediaSelf);\r\n                                });\r\n                            },\r\n                            error =>\r\n                            {\r\n\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        var cachedSize = await GetLocalFilePreviewBytes(destinationPreviewFileName);\r\n                        if (cachedSize != null)\r\n                        {\r\n                            mediaDocument.Thumb = cachedSize.Bytes;\r\n                            mediaDocument.ThumbW = cachedSize.W;\r\n                            mediaDocument.ThumbH = cachedSize.H;\r\n                        }\r\n                    }\r\n\r\n                    var contentFileName = result.ContentUrlString ?? result.ThumbUrlString;\r\n                    if (contentFileName == null) return null;\r\n\r\n                    processed = false;\r\n                    message.Media = mediaDocument;\r\n                    message.SetMedia();\r\n\r\n                    var maxSizeLocation = new TLFileLocation\r\n                    {\r\n                        DCId = new TLInt(1),\r\n                        VolumeId = TLLong.Random(),\r\n                        LocalId = TLInt.Random(),\r\n                        Secret = TLLong.Random()\r\n                    };\r\n\r\n                    var maxSize = new TLPhotoSize\r\n                    {\r\n                        Type = TLString.Empty,\r\n                        Location = maxSizeLocation,\r\n                        W = result.W,\r\n                        H = result.H,\r\n                        Size = new TLInt(0)\r\n                    };\r\n\r\n                    var fileExtension = Path.GetExtension(contentUrl.ToString());\r\n                    var fileName = String.Format(\"{0}_{1}_{2}{3}\",\r\n                        maxSizeLocation.VolumeId,\r\n                        maxSizeLocation.LocalId,\r\n                        maxSizeLocation.Secret,\r\n                        fileExtension);\r\n\r\n                    var destinationContentFileName = string.Format(\"content{0}_{1}{2}\", result.Id, result.QueryId, fileExtension);\r\n                    //if (string.Equals(contentFileName, previewFileName, StringComparison.OrdinalIgnoreCase))\r\n                    //{\r\n                    //    store.CopyFile(destinationPreviewFileName, fileName);\r\n\r\n                    //    using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                    //    {\r\n                    //        mediaDocument.Size = new TLInt((int)file.Length);\r\n                    //        maxSize.Size = new TLInt((int)file.Length);\r\n                    //    }\r\n\r\n                    //    downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                    //}\r\n                    //else\r\n                    {\r\n                        if (!store.FileExists(destinationContentFileName))\r\n                        {\r\n                            mediaDocument.DownloadingProgress = 0.001;\r\n                            httpFileManager.DownloadFileAsync(contentFileName, destinationContentFileName, result,\r\n                                item =>\r\n                                {\r\n                                    store.CopyFile(item.IsoFileName, fileName);\r\n                                    store.DeleteFile(item.IsoFileName);\r\n\r\n                                    using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                                    {\r\n                                        mediaDocument.Size = new TLInt((int)file.Length);\r\n                                        maxSize.Size = new TLInt((int)file.Length);\r\n                                    }\r\n\r\n                                    downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                                },\r\n                                error => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    message.Status = MessageStatus.Failed;\r\n                                    message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                                    mediaDocument.DownloadingProgress = 0.0;\r\n                                }));\r\n                        }\r\n                        else\r\n                        {\r\n                            store.CopyFile(destinationContentFileName, fileName);\r\n                            store.DeleteFile(destinationContentFileName);\r\n\r\n                            using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                            {\r\n                                mediaDocument.Size = new TLInt((int)file.Length);\r\n                                maxSize.Size = new TLInt((int)file.Length);\r\n                            }\r\n\r\n                            downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                        }\r\n                    }\r\n                }\r\n                else if (TLString.Equals(result.Type, new TLString(\"photo\"), StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    var keyIV = GenerateKeyIV();\r\n                    var mediaPhoto = new TLDecryptedMessageMediaPhoto45\r\n                    {\r\n                        Thumb = TLString.Empty,\r\n                        ThumbW = new TLInt(0),\r\n                        ThumbH = new TLInt(0),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n                        W = result.W,\r\n                        H = result.H,\r\n                        Size = new TLInt(1),\r\n                        Caption = TLString.Empty,\r\n                    };\r\n\r\n                    var previewFileName = result.ThumbUrlString ?? result.ContentUrlString;\r\n                    if (previewFileName == null) return null;\r\n\r\n                    var destinationPreviewFileName = string.Format(\"preview{0}_{1}.jpg\", result.Id, result.QueryId);\r\n                    var httpFileManager = IoC.Get<IHttpDocumentFileManager>();\r\n                    var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                    if (!store.FileExists(destinationPreviewFileName))\r\n                    {\r\n                        httpFileManager.DownloadFileAsync(previewFileName, destinationPreviewFileName, result,\r\n                            async item =>\r\n                            {\r\n                                var cachedSize = await GetLocalFilePreviewBytes(destinationPreviewFileName);\r\n                                if (cachedSize != null)\r\n                                {\r\n                                    mediaPhoto.Thumb = cachedSize.Bytes;\r\n                                    mediaPhoto.ThumbW = cachedSize.W;\r\n                                    mediaPhoto.ThumbH = cachedSize.H;\r\n                                }\r\n\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.ThumbSelf);\r\n                                });\r\n                            },\r\n                            error =>\r\n                            {\r\n\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        var cachedSize = await GetLocalFilePreviewBytes(destinationPreviewFileName);\r\n                        if (cachedSize != null)\r\n                        {\r\n                            mediaPhoto.Thumb = cachedSize.Bytes;\r\n                            mediaPhoto.ThumbW = cachedSize.W;\r\n                            mediaPhoto.ThumbH = cachedSize.H;\r\n                        }\r\n                    }\r\n\r\n                    var contentFileName = result.ContentUrlString ?? result.ThumbUrlString;\r\n                    if (contentFileName == null) return null;\r\n\r\n                    processed = false;\r\n                    message.Media = mediaPhoto;\r\n                    message.SetMedia();\r\n\r\n                    var maxSizeLocation = new TLFileLocation\r\n                    {\r\n                        DCId = new TLInt(1),\r\n                        VolumeId = TLLong.Random(),\r\n                        LocalId = TLInt.Random(),\r\n                        Secret = TLLong.Random()\r\n                    };\r\n\r\n                    var maxSize = new TLPhotoSize\r\n                    {\r\n                        Type = TLString.Empty,\r\n                        Location = maxSizeLocation,\r\n                        W = result.W,\r\n                        H = result.H,\r\n                        Size = new TLInt(0)\r\n                    };\r\n\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        maxSizeLocation.VolumeId,\r\n                        maxSizeLocation.LocalId,\r\n                        maxSizeLocation.Secret);\r\n\r\n                    var destinationContentFileName = string.Format(\"content{0}_{1}.jpg\", result.Id, result.QueryId);\r\n                    //if (string.Equals(contentFileName, previewFileName, StringComparison.OrdinalIgnoreCase))\r\n                    //{\r\n                    //    store.CopyFile(destinationPreviewFileName, fileName);\r\n\r\n                    //    using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                    //    {\r\n                    //        mediaPhoto.Size = new TLInt((int) file.Length);\r\n                    //        maxSize.Size = new TLInt((int) file.Length);\r\n                    //    }\r\n\r\n                    //    downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                    //}\r\n                    //else\r\n                    {\r\n                        if (!store.FileExists(destinationContentFileName))\r\n                        {\r\n                            mediaPhoto.DownloadingProgress = 0.001;\r\n                            httpFileManager.DownloadFileAsync(contentFileName, destinationContentFileName, result,\r\n                                item =>\r\n                                {\r\n                                    store.CopyFile(item.IsoFileName, fileName);\r\n                                    store.DeleteFile(item.IsoFileName);\r\n\r\n                                    using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                                    {\r\n                                        mediaPhoto.Size = new TLInt((int)file.Length);\r\n                                        maxSize.Size = new TLInt((int)file.Length);\r\n                                    }\r\n\r\n                                    downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                                },\r\n                                error => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    message.Status = MessageStatus.Failed;\r\n                                    message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                                    mediaPhoto.DownloadingProgress = 0.0;\r\n                                }));\r\n                        }\r\n                        else\r\n                        {\r\n                            store.CopyFile(destinationContentFileName, fileName);\r\n                            store.DeleteFile(destinationContentFileName);\r\n\r\n                            using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Read))\r\n                            {\r\n                                mediaPhoto.Size = new TLInt((int)file.Length);\r\n                                maxSize.Size = new TLInt((int)file.Length);\r\n                            }\r\n\r\n                            downloadFileCallback.SafeInvoke(tuple, maxSize.Size, fileName);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var messageText = resultBase.SendMessage as TLBotInlineMessageText;\r\n            if (messageText != null)\r\n            {\r\n                message.Message = messageText.Message;\r\n\r\n                var message45 = message;\r\n                message45.Entities = messageText.Entities;\r\n                if (messageText.NoWebpage)\r\n                {\r\n\r\n                }\r\n            }\r\n\r\n            var mediaAuto = resultBase.SendMessage as TLBotInlineMessageMediaAuto;\r\n            if (mediaAuto != null)\r\n            {\r\n                var caption = message.Media as IMediaCaption;\r\n                if (caption != null)\r\n                {\r\n                    caption.Caption = mediaAuto.Caption;\r\n                }\r\n            }\r\n\r\n            return processed;\r\n        }\r\n\r\n        private static TLPhotoSize GetPhotoMaxSize(TLPhoto photo)\r\n        {\r\n            TLPhotoSize maxSize = null;\r\n            var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n            foreach (var photoSize in sizes)\r\n            {\r\n                if (maxSize == null\r\n                    || maxSize.W.Value < photoSize.W.Value)\r\n                {\r\n                    maxSize = photoSize;\r\n                }\r\n            }\r\n            \r\n            return maxSize;\r\n        }\r\n\r\n        private static async Task<TLPhotoCachedSize> GetLocalFilePreview(IPhotoSize photoSize)\r\n        {\r\n            var cachedSize = photoSize as TLPhotoCachedSize;\r\n            if (cachedSize != null) return cachedSize;\r\n\r\n            var size = photoSize as TLPhotoSize;\r\n            if (size != null)\r\n            {\r\n                var location = size.Location;\r\n                if (location != null)\r\n                {\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.VolumeId,\r\n                        location.LocalId,\r\n                        location.Secret);\r\n\r\n                    cachedSize = await GetLocalFilePreviewBytes(fileName);\r\n                }\r\n            }\r\n\r\n            return cachedSize;\r\n        }\r\n\r\n        private static async Task<TLPhotoCachedSize> GetLocalFilePreviewBytes(string fileName)\r\n        {\r\n            TLPhotoCachedSize cachedSize = null;\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(fileName))\r\n                {\r\n                }\r\n                else\r\n                {\r\n                    try\r\n                    {\r\n                        var file = await DialogDetailsViewModel.GetFileFromLocalFolder(fileName);\r\n                        var thumbnail = await file.GetThumbnailAsync(ThumbnailMode.SingleItem, 90, ThumbnailOptions.ResizeThumbnail);\r\n                        if (thumbnail != null)\r\n                        {\r\n                            var thumbnailStream = thumbnail.AsStream();\r\n                            using (var ms = new MemoryStream())\r\n                            {\r\n                                thumbnailStream.CopyTo(ms);\r\n                                cachedSize = new TLPhotoCachedSize\r\n                                {\r\n                                    Bytes = TLString.FromBigEndianData(ms.ToArray()),\r\n                                    W = new TLInt((int) thumbnail.OriginalWidth),\r\n                                    H = new TLInt((int) thumbnail.OriginalHeight),\r\n                                    Type = new TLString(\"s\"),\r\n                                    Location =\r\n                                        new TLFileLocationUnavailable\r\n                                        {\r\n                                            VolumeId = new TLLong(0),\r\n                                            LocalId = new TLInt(0),\r\n                                            Secret = new TLLong(0)\r\n                                        }\r\n                                };\r\n                            }\r\n                        }\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        Log.Write(ex.ToString());\r\n                    }\r\n                }\r\n            }\r\n\r\n            return cachedSize;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretDialogDetailsViewModel.Media.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing TelegramClient.ViewModels.Contacts;\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsViewModel\r\n    {\r\n        private void SendMedia()\r\n        {\r\n            if (!string.IsNullOrEmpty(StateService.VideoIsoFileName))\r\n            {\r\n                var videoIsoFileName = StateService.VideoIsoFileName;\r\n                var videoDuration = StateService.Duration;\r\n                StateService.VideoIsoFileName = null;\r\n                StateService.Duration = 0;\r\n                SendVideo(videoIsoFileName, videoDuration);\r\n                return;\r\n            }\r\n\r\n            if (StateService.Photo != null)\r\n            {\r\n                var photo = StateService.Photo;\r\n                StateService.Photo = null;\r\n\r\n                SendPhoto(photo);\r\n                return;\r\n            }\r\n\r\n#if WP8 && MULTIPLE_PHOTOS\r\n            if (App.Photos != null)\r\n            {\r\n                var photos = App.Photos;\r\n                App.Photos = null;\r\n                SendPhoto(photos);\r\n            }\r\n#endif\r\n\r\n            if (StateService.Document != null)\r\n            {\r\n                var document = StateService.Document;\r\n                StateService.Document = null;\r\n\r\n                SendDocument(document);\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Attach()\r\n        {\r\n            BeginOnUIThread(() => ChooseAttachment.Open());\r\n        }\r\n\r\n        public bool OpenSecretPhoto(TLDecryptedMessageMediaPhoto mediaPhoto)\r\n        {\r\n            if (mediaPhoto == null) return false;\r\n\r\n            TLDecryptedMessage17 message = null;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var message17 = Items[i] as TLDecryptedMessage17;\r\n                if (message17 != null && message17.Media == mediaPhoto)\r\n                {\r\n                    message = message17;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (message == null) return false;\r\n            if (message.Status == MessageStatus.Sending) return false;\r\n\r\n            var result = false;\r\n            if (!message.Out.Value)\r\n            {\r\n                if (message.TTL != null && message.TTL.Value > 0 && message.TTL.Value <= 60.0)\r\n                {\r\n                    if (mediaPhoto.TTLParams == null)\r\n                    {\r\n                        message.IsTTLStarted = true;\r\n                        message.DeleteDate = new TLLong(DateTime.Now.Ticks + message.TTL.Value * TimeSpan.TicksPerSecond);\r\n                        mediaPhoto.TTLParams = new TTLParams\r\n                        {\r\n                            StartTime = DateTime.Now,\r\n                            IsStarted = true,\r\n                            Total = message.TTL.Value\r\n                        };\r\n                        message.Unread = new TLBool(false);\r\n                        message.Status = MessageStatus.Read;\r\n                        CacheService.SyncDecryptedMessage(message, Chat, r =>\r\n                        {\r\n                            var chat = Chat as TLEncryptedChat;\r\n                            if (chat == null) return;\r\n\r\n                            var action = new TLDecryptedMessageActionReadMessages();\r\n                            action.RandomIds = new TLVector<TLLong>{ message.RandomId };\r\n\r\n                            var decryptedTuple = GetDecryptedServiceMessageAndObject(action, chat, MTProtoService.CurrentUserId, CacheService);\r\n#if DEBUG\r\n                            Execute.BeginOnUIThread(() => Items.Insert(0, decryptedTuple.Item1));\r\n#endif\r\n                            SendEncryptedService(chat, decryptedTuple.Item2, MTProtoService, CacheService,\r\n                                sentEncryptedMessage =>\r\n                                {\r\n\r\n                                });\r\n\r\n                        });\r\n                    }\r\n\r\n                    result = true;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                result = true;\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        private void OpenImageViewer()\r\n        {\r\n            if (ImageViewer == null)\r\n            {\r\n                ImageViewer = new DecryptedImageViewerViewModel(StateService, true)\r\n                {\r\n                    DialogDetails = this\r\n                };\r\n                NotifyOfPropertyChange(() => ImageViewer);\r\n            }\r\n\r\n            ImageViewer.OpenViewer();\r\n        }\r\n\r\n        private static DecryptedTTLQueue _ttlQueue;\r\n\r\n        public static void AddToTTLQueue(TLDecryptedMessage message, TTLParams ttlParams, Action<TLDecryptedMessage> callback)\r\n        {\r\n            if (message == null) return;\r\n            if (ttlParams == null) return;\r\n\r\n            if (_ttlQueue == null)\r\n            {\r\n                _ttlQueue = new DecryptedTTLQueue();\r\n            }\r\n\r\n            _ttlQueue.Add(message, ttlParams, callback);\r\n        }\r\n\r\n#if WP8\r\n        public async void OpenMedia(TLDecryptedMessage message)\r\n#else\r\n        public void OpenMedia(TLDecryptedMessage message)\r\n#endif\r\n        {\r\n            if (message == null) return;\r\n            if (message.Status == MessageStatus.Sending) return;\r\n            if (message.Media.UploadingProgress > 0.0 && message.Media.UploadingProgress < 1.0) return;\r\n\r\n            var mediaPhoto = message.Media as TLDecryptedMessageMediaPhoto;\r\n            if (mediaPhoto != null)\r\n            {\r\n\r\n                var location = mediaPhoto.File as TLEncryptedFile;\r\n                if (location != null)\r\n                {\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.Id,\r\n                        location.DCId,\r\n                        location.AccessHash);\r\n\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.FileExists(fileName))\r\n                        {\r\n                            message.Media.IsCanceled = false;\r\n                            message.Media.DownloadingProgress = 0.01;\r\n                            var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                            fileManager.DownloadFile(location, mediaPhoto);\r\n\r\n                            return;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (!message.Out.Value\r\n                    && message.TTL != null\r\n                    && message.TTL.Value > 0\r\n                    && message.TTL.Value <= 60.0\r\n                    && mediaPhoto.TTLParams == null)\r\n                {\r\n                    message.IsTTLStarted = true;\r\n                    message.DeleteDate = new TLLong(DateTime.Now.Ticks + message.TTL.Value * TimeSpan.TicksPerSecond);\r\n                    mediaPhoto.TTLParams = new TTLParams\r\n                    {\r\n                        StartTime = DateTime.Now,\r\n                        IsStarted = true,\r\n                        Total = message.TTL.Value\r\n                    };\r\n\r\n                    AddToTTLQueue(message, mediaPhoto.TTLParams,\r\n                        result =>\r\n                        {\r\n                            DeleteMessage(false, message);\r\n                            SplitGroupedMessages(new List<TLLong> { message.RandomId });\r\n                        });\r\n\r\n                    CacheService.SyncDecryptedMessage(message, Chat, r =>\r\n                    {\r\n                        var chat = Chat as TLEncryptedChat;\r\n                        if (chat == null) return;\r\n\r\n                        var action = new TLDecryptedMessageActionReadMessages();\r\n                        action.RandomIds = new TLVector<TLLong> { message.RandomId };\r\n\r\n                        var decryptedTuple = GetDecryptedServiceMessageAndObject(action, chat, MTProtoService.CurrentUserId, CacheService);\r\n#if DEBUG\r\n                        Execute.BeginOnUIThread(() => Items.Insert(0, decryptedTuple.Item1));\r\n#endif\r\n                        SendEncryptedService(chat, decryptedTuple.Item2, MTProtoService, CacheService,\r\n                            sentEncryptedMessage =>\r\n                            {\r\n\r\n                            });\r\n                    });\r\n                }\r\n\r\n                message.Unread = new TLBool(false);\r\n                message.Status = MessageStatus.Read;\r\n                CacheService.SyncDecryptedMessage(message, Chat, r => { });\r\n\r\n                if (mediaPhoto.IsCanceled)\r\n                {\r\n                    mediaPhoto.IsCanceled = false;\r\n                    mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.Photo);\r\n                    mediaPhoto.NotifyOfPropertyChange(() => mediaPhoto.Self);\r\n\r\n                    return;\r\n                }\r\n\r\n                StateService.CurrentDecryptedPhotoMessage = message;\r\n                StateService.CurrentDecryptedMediaMessages = message.TTL.Value > 0? new List<TLDecryptedMessage>() :\r\n                    UngroupEnumerator(Items)\r\n                    .OfType<TLDecryptedMessage>()\r\n                    .Where(x => x.TTL.Value == 0 && (x.Media is TLDecryptedMessageMediaPhoto || x.IsVideo()))\r\n                    .ToList();\r\n\r\n                OpenImageViewer();\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaGeo = message.Media as TLDecryptedMessageMediaGeoPoint;\r\n            if (mediaGeo != null)\r\n            {\r\n                OpenLocation(message);\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaVideo = message.Media as TLDecryptedMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                var fileLocation = mediaVideo.File as TLEncryptedFile;\r\n                if (fileLocation == null) return;\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.mp4\",\r\n                fileLocation.Id,\r\n                fileLocation.DCId,\r\n                fileLocation.AccessHash);\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (store.FileExists(fileName))\r\n                    {\r\n                        var mediaVideo17 = mediaVideo as TLDecryptedMessageMediaVideo17;\r\n                        if (mediaVideo17 != null)\r\n                        {\r\n                            if (!message.Out.Value)\r\n                            {\r\n                                if (message.TTL != null && message.TTL.Value > 0 && message.TTL.Value <= 60.0)\r\n                                {\r\n                                    if (mediaVideo17.TTLParams == null)\r\n                                    {\r\n                                        message.IsTTLStarted = true;\r\n                                        message.DeleteDate = new TLLong(DateTime.Now.Ticks + Math.Max(mediaVideo17.Duration.Value + 1, message.TTL.Value) * TimeSpan.TicksPerSecond);\r\n                                        mediaVideo17.TTLParams = new TTLParams\r\n                                        {\r\n                                            StartTime = DateTime.Now,\r\n                                            IsStarted = true,\r\n                                            Total = message.TTL.Value\r\n                                        };\r\n                                        message.Unread = new TLBool(false);\r\n                                        message.Status = MessageStatus.Read;\r\n\r\n                                        AddToTTLQueue(message, mediaVideo17.TTLParams,\r\n                                            result =>\r\n                                            {\r\n                                                DeleteMessage(false, message);\r\n                                                SplitGroupedMessages(new List<TLLong> { message.RandomId });\r\n                                            });\r\n\r\n                                        CacheService.SyncDecryptedMessage(message, Chat, r =>\r\n                                        {\r\n                                            var chat = Chat as TLEncryptedChat;\r\n                                            if (chat == null) return;\r\n\r\n                                            var action = new TLDecryptedMessageActionReadMessages();\r\n                                            action.RandomIds = new TLVector<TLLong>{ message.RandomId };\r\n\r\n                                            var decryptedTuple = GetDecryptedServiceMessageAndObject(action, chat, MTProtoService.CurrentUserId, CacheService);\r\n\r\n#if DEBUG\r\n                                            Execute.BeginOnUIThread(() => Items.Insert(0, decryptedTuple.Item1));\r\n#endif\r\n                                            SendEncryptedService(chat, decryptedTuple.Item2, MTProtoService, CacheService,\r\n                                                sentEncryptedMessage =>\r\n                                                {\r\n\r\n                                                });\r\n\r\n                                        });\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var launcher = new MediaPlayerLauncher();\r\n                        launcher.Location = MediaLocationType.Data;\r\n                        launcher.Media = new Uri(fileName, UriKind.Relative);\r\n                        launcher.Show();\r\n                    }\r\n                    else\r\n                    {\r\n                        mediaVideo.DownloadingProgress = 0.001;\r\n                        var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                        fileManager.DownloadFile(fileLocation, mediaVideo);\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaAudio = message.Media as TLDecryptedMessageMediaAudio;\r\n            if (mediaAudio != null)\r\n            {\r\n                var fileLocation = mediaAudio.File as TLEncryptedFile;\r\n                if (fileLocation == null) return;\r\n\r\n                var fileName = String.Format(\"audio{0}_{1}.wav\",\r\n                    fileLocation.Id,\r\n                    fileLocation.AccessHash);\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (!store.FileExists(fileName))\r\n                    {\r\n                        mediaAudio.DownloadingProgress = 0.001;\r\n                        var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                        fileManager.DownloadFile(fileLocation, mediaAudio);\r\n                    }\r\n                    else\r\n                    {\r\n                        if (mediaAudio.IsCanceled)\r\n                        {\r\n                            mediaAudio.IsCanceled = false;\r\n                            mediaAudio.NotifyOfPropertyChange(() => mediaAudio.ThumbSelf);\r\n\r\n                            return;\r\n                        }\r\n\r\n                        var mediaAudio17 = mediaAudio as TLDecryptedMessageMediaAudio17;\r\n                        if (mediaAudio17 != null)\r\n                        {\r\n                            if (!message.Out.Value)\r\n                            {\r\n                                if (message.TTL != null && message.TTL.Value > 0 && message.TTL.Value <= 60.0)\r\n                                {\r\n                                    if (mediaAudio17.TTLParams == null)\r\n                                    {\r\n                                        message.IsTTLStarted = true;\r\n                                        message.DeleteDate = new TLLong(DateTime.Now.Ticks + Math.Max(mediaAudio17.Duration.Value + 1, message.TTL.Value) * TimeSpan.TicksPerSecond);\r\n                                        mediaAudio17.TTLParams = new TTLParams\r\n                                        {\r\n                                            StartTime = DateTime.Now,\r\n                                            IsStarted = true,\r\n                                            Total = message.TTL.Value\r\n                                        };\r\n                                        message.Unread = new TLBool(false);\r\n                                        message.Status = MessageStatus.Read;\r\n\r\n                                        CacheService.SyncDecryptedMessage(message, Chat, r =>\r\n                                        {\r\n                                            var chat = Chat as TLEncryptedChat;\r\n                                            if (chat == null) return;\r\n\r\n                                            var action = new TLDecryptedMessageActionReadMessages();\r\n                                            action.RandomIds = new TLVector<TLLong> { message.RandomId };\r\n\r\n                                            var decryptedTuple = GetDecryptedServiceMessageAndObject(action, chat, MTProtoService.CurrentUserId, CacheService);\r\n\r\n#if DEBUG\r\n                                            Execute.BeginOnUIThread(() => Items.Insert(0, decryptedTuple.Item1));\r\n#endif\r\n                                            SendEncryptedService(chat, decryptedTuple.Item2, MTProtoService, CacheService,\r\n                                                sentEncryptedMessage =>\r\n                                                {\r\n\r\n                                                });\r\n\r\n                                        });\r\n                                    }\r\n                                }\r\n                            }\r\n                        }     \r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaDocument = message.Media as TLDecryptedMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                if (message.IsVoice())\r\n                {\r\n                    var fileLocation = mediaDocument.File as TLEncryptedFile;\r\n                    if (fileLocation == null) return;\r\n\r\n                    var fileName = String.Format(\"audio{0}_{1}.wav\",\r\n                        fileLocation.Id,\r\n                        fileLocation.AccessHash);\r\n\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.FileExists(fileName))\r\n                        {\r\n                            mediaDocument.DownloadingProgress = 0.001;\r\n                            var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                            fileManager.DownloadFile(fileLocation, mediaDocument);\r\n                        }\r\n                        else\r\n                        {\r\n                            if (mediaDocument.IsCanceled)\r\n                            {\r\n                                mediaDocument.IsCanceled = false;\r\n                                mediaDocument.NotifyOfPropertyChange(() => mediaDocument.ThumbSelf);\r\n\r\n                                return;\r\n                            }\r\n\r\n                            var mediaDocument45 = mediaDocument as TLDecryptedMessageMediaDocument45;\r\n                            if (mediaDocument45 != null)\r\n                            {\r\n                                if (!message.Out.Value)\r\n                                {\r\n                                    var message45 = message as TLDecryptedMessage45;\r\n                                    if (message.TTL != null && message.TTL.Value > 0 && message.TTL.Value <= 60.0)\r\n                                    {\r\n                                        if (mediaDocument45.TTLParams == null)\r\n                                        {\r\n                                            message.IsTTLStarted = true;\r\n                                            message.DeleteDate = new TLLong(DateTime.Now.Ticks + Math.Max(mediaDocument45.Duration.Value + 1, message.TTL.Value) * TimeSpan.TicksPerSecond);\r\n                                            mediaDocument45.TTLParams = new TTLParams\r\n                                            {\r\n                                                StartTime = DateTime.Now,\r\n                                                IsStarted = true,\r\n                                                Total = message.TTL.Value\r\n                                            };\r\n                                            message.Unread = new TLBool(false);\r\n                                            message.Status = MessageStatus.Read;\r\n\r\n                                            CacheService.SyncDecryptedMessage(message, Chat, r =>\r\n                                            {\r\n                                                var chat = Chat as TLEncryptedChat;\r\n                                                if (chat == null) return;\r\n\r\n                                                var action = new TLDecryptedMessageActionReadMessages();\r\n                                                action.RandomIds = new TLVector<TLLong> { message.RandomId };\r\n\r\n                                                var decryptedTuple = GetDecryptedServiceMessageAndObject(action, chat, MTProtoService.CurrentUserId, CacheService);\r\n\r\n#if DEBUG\r\n                                                Execute.BeginOnUIThread(() => Items.Insert(0, decryptedTuple.Item1));\r\n#endif\r\n                                                SendEncryptedService(chat, decryptedTuple.Item2, MTProtoService, CacheService,\r\n                                                    sentEncryptedMessage =>\r\n                                                    {\r\n                                                        if (message45 != null)\r\n                                                        {\r\n                                                            message45.SetListened();\r\n                                                            message45.Media.NotListened = false;\r\n                                                            message45.Media.NotifyOfPropertyChange(() => message45.Media.NotListened);\r\n\r\n                                                            CacheService.Commit();\r\n                                                        }\r\n                                                    });\r\n\r\n                                            });\r\n                                        }\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        ReadMessageContents(message45);\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n                else if (message.IsVideo())\r\n                {\r\n                    var fileLocation = mediaDocument.File as TLEncryptedFile;\r\n                    if (fileLocation == null) return;\r\n\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.mp4\",\r\n                    fileLocation.Id,\r\n                    fileLocation.DCId,\r\n                    fileLocation.AccessHash);\r\n\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (store.FileExists(fileName))\r\n                        {\r\n                            var mediaVideo17 = mediaDocument as TLDecryptedMessageMediaDocument45;\r\n                            if (mediaVideo17 != null)\r\n                            {\r\n                                if (!message.Out.Value)\r\n                                {\r\n                                    if (message.TTL != null && message.TTL.Value > 0 && message.TTL.Value <= 60.0)\r\n                                    {\r\n                                        if (mediaVideo17.TTLParams == null)\r\n                                        {\r\n                                            message.IsTTLStarted = true;\r\n                                            message.DeleteDate = new TLLong(DateTime.Now.Ticks + Math.Max(mediaVideo17.Duration.Value + 1, message.TTL.Value) * TimeSpan.TicksPerSecond);\r\n                                            mediaVideo17.TTLParams = new TTLParams\r\n                                            {\r\n                                                StartTime = DateTime.Now,\r\n                                                IsStarted = true,\r\n                                                Total = message.TTL.Value\r\n                                            };\r\n                                            message.Unread = new TLBool(false);\r\n                                            message.Status = MessageStatus.Read;\r\n\r\n                                            AddToTTLQueue(message, mediaVideo17.TTLParams,\r\n                                                result =>\r\n                                                {\r\n                                                    DeleteMessage(false, message);\r\n                                                    SplitGroupedMessages(new List<TLLong> { message.RandomId });\r\n                                                });\r\n\r\n                                            CacheService.SyncDecryptedMessage(message, Chat, r =>\r\n                                            {\r\n                                                var chat = Chat as TLEncryptedChat;\r\n                                                if (chat == null) return;\r\n\r\n                                                var action = new TLDecryptedMessageActionReadMessages();\r\n                                                action.RandomIds = new TLVector<TLLong> { message.RandomId };\r\n\r\n                                                var decryptedTuple = GetDecryptedServiceMessageAndObject(action, chat, MTProtoService.CurrentUserId, CacheService);\r\n\r\n#if DEBUG\r\n                                                Execute.BeginOnUIThread(() => Items.Insert(0, decryptedTuple.Item1));\r\n#endif\r\n                                                SendEncryptedService(chat, decryptedTuple.Item2, MTProtoService, CacheService,\r\n                                                    sentEncryptedMessage =>\r\n                                                    {\r\n\r\n                                                    });\r\n\r\n                                            });\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            var launcher = new MediaPlayerLauncher();\r\n                            launcher.Location = MediaLocationType.Data;\r\n                            launcher.Media = new Uri(fileName, UriKind.Relative);\r\n                            launcher.Show();\r\n                        }\r\n                        else\r\n                        {\r\n                            mediaDocument.DownloadingProgress = 0.001;\r\n                            var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                            fileManager.DownloadFile(fileLocation, mediaDocument);\r\n                        }\r\n                    }\r\n\r\n                    return;\r\n                }\r\n                else\r\n                {\r\n                    var fileLocation = mediaDocument.File as TLEncryptedFile;\r\n                    if (fileLocation == null) return;\r\n\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.{3}\",\r\n                        fileLocation.Id,\r\n                        fileLocation.DCId,\r\n                        fileLocation.AccessHash,\r\n                        fileLocation.FileExt ?? mediaDocument.FileExt);\r\n\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (store.FileExists(fileName))\r\n                        {\r\n#if WP8\r\n                            StorageFile pdfFile = await ApplicationData.Current.LocalFolder.GetFileAsync(fileName);\r\n                            Windows.System.Launcher.LaunchFileAsync(pdfFile);\r\n#endif\r\n                        }\r\n                        else\r\n                        {\r\n                            mediaDocument.DownloadingProgress = 0.001;\r\n                            var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                            fileManager.DownloadFile(fileLocation, mediaDocument);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n#if DEBUG\r\n            MessageBox.Show(\"Tap on media\");\r\n#endif\r\n        }\r\n\r\n        public void OpenMediaContact(TLUserBase user)\r\n        {\r\n            OpenContactInternal(user, null);\r\n        }\r\n\r\n        public void OpenMediaContact(TLInt userId, TLUserBase user, TLString phoneNumber)\r\n        {\r\n            if (user == null)\r\n            {\r\n                MTProtoService.GetFullUserAsync(new TLInputUser { UserId = userId, AccessHash = new TLLong(0) },\r\n                    userFull => OpenContactInternal(userFull.User, phoneNumber));\r\n            }\r\n            else\r\n            {\r\n                OpenContactInternal(user, phoneNumber);\r\n            }\r\n        }\r\n\r\n        private void OpenContactInternal(TLUserBase user, TLString phoneNumber)\r\n        {\r\n            if (user == null) return;\r\n\r\n            StateService.CurrentContact = user;\r\n            StateService.CurrentContactPhone = phoneNumber;\r\n            NavigationService.UriFor<ContactViewModel>().Navigate();\r\n        }\r\n    }\r\n\r\n    public class DecryptedMessageExpiredEventArgs : System.EventArgs\r\n    {\r\n        public TLDecryptedMessage Message { get; set; }\r\n    }\r\n\r\n    public class DecryptedTTLQueue\r\n    {\r\n        private readonly List<Tuple<TLDecryptedMessage, TTLParams, Action<TLDecryptedMessage>>> _items = new List<Tuple<TLDecryptedMessage, TTLParams, Action<TLDecryptedMessage>>>();\r\n\r\n        private readonly Timer _timer;\r\n\r\n        public DecryptedTTLQueue()\r\n        {\r\n            _timer = new Timer(Timer_OnTick);\r\n        }\r\n\r\n        private void Timer_OnTick(object state)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                for (int i = 0; i < _items.Count; i++)\r\n                {\r\n                    var item = _items[i];\r\n                    if (item.Item2.StartTime.AddSeconds(item.Item2.Total) < DateTime.Now)\r\n                    {\r\n                        _items.RemoveAt(i--);\r\n                        var message = item.Item1;\r\n                        item.Item3.SafeInvoke(message);\r\n                    }\r\n                    else\r\n                    {\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (_items.Count > 0)\r\n                {\r\n                    SetTimer(_items[0]);\r\n                }\r\n            });\r\n        }\r\n\r\n        private void SetTimer(Tuple<TLDecryptedMessage, TTLParams, Action<TLDecryptedMessage>> item)\r\n        {\r\n            var timeSpan = item.Item2.StartTime.AddSeconds(item.Item2.Total) > DateTime.Now ? item.Item2.StartTime.AddSeconds(item.Item2.Total) - DateTime.Now : TimeSpan.FromSeconds(0.0);\r\n            _timer.Change(timeSpan, Timeout.InfiniteTimeSpan);\r\n        }\r\n\r\n        public void Add(TLDecryptedMessage message, TTLParams ttlParams, Action<TLDecryptedMessage> callback)\r\n        {\r\n            _timer.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);\r\n\r\n            var newItem = new Tuple<TLDecryptedMessage, TTLParams, Action<TLDecryptedMessage>>(message, ttlParams, callback);\r\n\r\n            var added = false;\r\n            for (var i = 0; i < _items.Count; i++)\r\n            {\r\n                if (_items[i].Item2.StartTime.AddSeconds(_items[i].Item2.Total) >= ttlParams.StartTime.AddSeconds(ttlParams.Total))\r\n                {\r\n                    _items.Insert(i, newItem);\r\n                    added = true;\r\n                    break;\r\n                }\r\n            }\r\n            if (!added)\r\n            {\r\n                _items.Add(newItem);\r\n            }\r\n\r\n            SetTimer(_items[0]);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretDialogDetailsViewModel.Photo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Threading.Tasks;\r\nusing Windows.Storage;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsViewModel\r\n    {\r\n        public MultiImageEditorViewModel MultiImageEditor { get; protected set; }\r\n\r\n        private void UploadPhotoInternal(byte[] data, TLObject obj)\r\n        {\r\n            var message = GetDecryptedMessage(obj);\r\n            if (message == null) return;\r\n\r\n            var media = message.Media as TLDecryptedMessageMediaPhoto;\r\n            if (media == null) return;\r\n            var file = media.File as TLEncryptedFile;\r\n            if (file == null) return;\r\n\r\n            if (data == null)\r\n            {\r\n                var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                    file.Id,\r\n                    file.DCId,\r\n                    file.AccessHash);\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    using (var fileStream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                    {\r\n                        data = new byte[fileStream.Length];\r\n                        fileStream.Read(data, 0, data.Length);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var encryptedBytes = Telegram.Api.Helpers.Utils.AesIge(data, media.Key.Data, media.IV.Data, true);\r\n\r\n            UploadFileManager.UploadFile(file.Id, obj, encryptedBytes);\r\n        }\r\n\r\n        private void SendPhoto(Photo p)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            var dcId = TLInt.Random();\r\n            var id = TLLong.Random();\r\n            var accessHash = TLLong.Random();\r\n\r\n            var fileLocation = new TLEncryptedFile\r\n            {\r\n                Id = id,\r\n                AccessHash = accessHash,\r\n                DCId = dcId,\r\n                Size = new TLInt(p.Bytes.Length),\r\n                KeyFingerprint = new TLInt(0)\r\n            };\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                fileLocation.Id,\r\n                fileLocation.DCId,\r\n                fileLocation.AccessHash);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var fileStream = store.CreateFile(fileName))\r\n                {\r\n                    fileStream.Write(p.Bytes, 0, p.Bytes.Length);\r\n                }\r\n            }\r\n\r\n            var keyIV = GenerateKeyIV();\r\n\r\n            int thumbHeight;\r\n            int thumbWidth;\r\n            var thumb = ImageUtils.CreateThumb(p.Bytes, Constants.PhotoPreviewMaxSize, Constants.PhotoPreviewQuality, out thumbHeight, out thumbWidth);\r\n\r\n            var decryptedMediaPhoto = new TLDecryptedMessageMediaPhoto\r\n            {\r\n                Thumb = TLString.FromBigEndianData(thumb),\r\n                ThumbW = new TLInt(thumbWidth),\r\n                ThumbH = new TLInt(thumbHeight),\r\n                Key = keyIV.Item1,\r\n                IV = keyIV.Item2,\r\n                W = new TLInt(p.Width),\r\n                H = new TLInt(p.Height),\r\n                Size = new TLInt(p.Bytes.Length),\r\n\r\n                File = fileLocation,\r\n\r\n                UploadingProgress = 0.001\r\n            };\r\n\r\n            var decryptedTuple = GetDecryptedMessageAndObject(TLString.Empty, decryptedMediaPhoto, chat, true);\r\n\r\n            InsertSendingMessage(decryptedTuple.Item1);\r\n            RaiseScrollToBottom();\r\n            NotifyOfPropertyChange(() => DescriptionVisibility);\r\n\r\n            BeginOnThreadPool(() => \r\n                CacheService.SyncDecryptedMessage(decryptedTuple.Item1, chat, \r\n                    cachedMessage => UploadPhotoInternal(p.Bytes, decryptedTuple.Item2)));\r\n        }\r\n\r\n        public async Task<Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>> GetPhotoMessage(StorageFile file)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return null;\r\n\r\n            if (file == null) return null;\r\n\r\n            var properties = await file.GetBasicPropertiesAsync();\r\n            var size = properties.Size;\r\n            \r\n            var thumb = await DialogDetailsViewModel.GetFileThumbAsync(file) as TLPhotoSize;\r\n\r\n            var dcId = TLInt.Random();\r\n            var id = TLLong.Random();\r\n            var accessHash = TLLong.Random();\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                id,\r\n                dcId,\r\n                accessHash);\r\n\r\n            var stream = await file.OpenReadAsync();\r\n            var resizedPhoto = await DialogDetailsViewModel.ResizeJpeg(stream, Constants.DefaultImageSize, file.DisplayName, fileName);\r\n\r\n            var keyIV = GenerateKeyIV();\r\n\r\n            var fileLocation = new TLEncryptedFile\r\n            {\r\n                Id = id,\r\n                AccessHash = accessHash,\r\n                DCId = dcId,\r\n                Size = new TLInt(resizedPhoto.Bytes.Length),\r\n                KeyFingerprint = new TLInt(0),\r\n                FileName = new TLString(Path.GetFileName(file.Name))\r\n            };\r\n\r\n            TLDecryptedMessageMediaPhoto decryptedMediaPhoto;\r\n            var chat17 = chat as TLEncryptedChat17;\r\n            if (chat17 != null && chat17.Layer.Value >= Constants.MinSecretChatWithCaptionsLayer)\r\n            {\r\n                decryptedMediaPhoto = new TLDecryptedMessageMediaPhoto45\r\n                {\r\n                    Thumb = thumb != null ? thumb.Bytes : TLString.Empty,\r\n                    ThumbW = thumb != null ? thumb.W : new TLInt(0),\r\n                    ThumbH = thumb != null ? thumb.H : new TLInt(0),\r\n                    Size = new TLInt(resizedPhoto.Bytes.Length),\r\n                    Key = keyIV.Item1,\r\n                    IV = keyIV.Item2,\r\n                    W = new TLInt(resizedPhoto.Width),\r\n                    H = new TLInt(resizedPhoto.Height),\r\n                    Caption = TLString.Empty,\r\n\r\n                    File = fileLocation,\r\n                    StorageFile = resizedPhoto.File,\r\n\r\n                    UploadingProgress = 0.001\r\n                };\r\n            }\r\n            else\r\n            {\r\n                decryptedMediaPhoto = new TLDecryptedMessageMediaPhoto\r\n                {\r\n                    Thumb = thumb != null ? thumb.Bytes : TLString.Empty,\r\n                    ThumbW = thumb != null ? thumb.W : new TLInt(0),\r\n                    ThumbH = thumb != null ? thumb.H : new TLInt(0),\r\n                    Size = new TLInt(resizedPhoto.Bytes.Length),\r\n                    Key = keyIV.Item1,\r\n                    IV = keyIV.Item2,\r\n                    W = new TLInt(resizedPhoto.Width),\r\n                    H = new TLInt(resizedPhoto.Height),\r\n\r\n                    File = fileLocation,\r\n                    StorageFile = resizedPhoto.File,\r\n\r\n                    UploadingProgress = 0.001\r\n                };\r\n            }\r\n\r\n            var decryptedTuple = GetDecryptedMessageAndObject(TLString.Empty, decryptedMediaPhoto, chat, true);\r\n\r\n            return decryptedTuple;\r\n        }\r\n\r\n        private async void SendPhoto(IReadOnlyCollection<StorageFile> files)\r\n        {\r\n            var chat = Chat as TLEncryptedChat17;\r\n\r\n            //threadpool\r\n            if (files == null || files.Count == 0) return;\r\n\r\n            if (MultiImageEditor != null && MultiImageEditor.IsOpen)\r\n            {\r\n                BeginOnUIThread(async () => await MultiImageEditor.AddFiles(new List<StorageFile>(files)));\r\n\r\n                return;\r\n            }\r\n\r\n            //var decryptedTuple = await GetPhotoMessage(files.First());\r\n\r\n            if (MultiImageEditor == null)\r\n            {\r\n                MultiImageEditor = new MultiImageEditorViewModel(SendPhoto, null, Chat)\r\n                {\r\n                    CurrentItem = new PhotoFile { File = files.First() },\r\n                    Files = files,\r\n                    ContinueAction = ContinueSendPhoto,\r\n                    GetDecryptedPhotoMessage = file =>\r\n                    {\r\n                        var m = GetPhotoMessage(file).Result;\r\n                        return m;\r\n                    },\r\n                    IsCaptionEnabled = chat != null && chat.Layer.Value >= Constants.MinSecretChatWithCaptionsLayer,\r\n                    IsSecretChat = true\r\n                };\r\n                NotifyOfPropertyChange(() => MultiImageEditor);\r\n            }\r\n            else\r\n            {\r\n                MultiImageEditor.CurrentItem = new PhotoFile { File = files.First() };\r\n                MultiImageEditor.Files = files;\r\n\r\n                BeginOnUIThread(() => MultiImageEditor.OpenEditor());\r\n            }\r\n\r\n            // fast preview for first item\r\n            Execute.BeginOnThreadPool(async () =>\r\n            {\r\n                var message = await GetPhotoMessage(files.First());\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    MultiImageEditor.CurrentItem.DecryptedTuple = message;\r\n                    MultiImageEditor.NotifyOfPropertyChange(() => MultiImageEditor.CurrentItem);\r\n                    MultiImageEditor.CurrentItem.NotifyOfPropertyChange(() => MultiImageEditor.CurrentItem.Self);\r\n                    if (files.Count == 1)\r\n                    {\r\n                        MultiImageEditor.IsDoneEnabled = true;\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n#if WP8 && MULTIPLE_PHOTOS\r\n        private void ContinueSendPhoto(IList<PhotoFile> photos)\r\n        {\r\n            var reply = Reply as TLDecryptedMessage;\r\n\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            var messages = new List<Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>>();\r\n            foreach (var photo in photos)\r\n            {\r\n                if (reply != null)\r\n                {\r\n                    var message = photo.DecryptedTuple.Item1 as TLDecryptedMessage45;\r\n                    if (message != null)\r\n                    {\r\n                        message.ReplyToRandomMsgId = reply.RandomId;\r\n                        message.Reply = reply;\r\n                    }\r\n                }\r\n\r\n                messages.Add(photo.DecryptedTuple);\r\n            }\r\n\r\n            BeginOnUIThread(() => SendMessages(messages, UploadPhotoInternal));\r\n        }\r\n#endif\r\n\r\n        private void SendMessages(IList<Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>> messages, Action<IList<Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>>> callback)\r\n        {\r\n            var uploadService = IoC.Get<IUploadService>();\r\n\r\n            var tuple = messages.FirstOrDefault();\r\n            var mediaMessage = tuple != null? tuple.Item1 as TLDecryptedMessage73 : null;\r\n            var groupedId = mediaMessage != null ? mediaMessage.GroupedId : null;\r\n            if (groupedId != null)\r\n            {\r\n                var messageMediaGroup = new TLDecryptedMessageMediaGroup { Group = new TLVector<TLDecryptedMessageBase>() };\r\n                var message = new TLDecryptedMessage73\r\n                {\r\n                    Flags = new TLInt(0),\r\n                    Media = messageMediaGroup,\r\n                    Message = TLString.Empty,\r\n                    RandomId = mediaMessage.RandomId,\r\n                    RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n                    ChatId = mediaMessage.ChatId,\r\n                    FromId = mediaMessage.FromId,\r\n                    Out = mediaMessage.Out,\r\n                    Unread = mediaMessage.Unread,\r\n                    Date = mediaMessage.Date,\r\n                    TTL = mediaMessage.TTL,\r\n                    Status = MessageStatus.Sending,\r\n                    ReplyToRandomMsgId = mediaMessage.ReplyToRandomMsgId,\r\n                    Reply = mediaMessage.Reply,\r\n                    GroupedId = groupedId\r\n                };\r\n                message.SetMedia();\r\n\r\n                for (var i = 0; i < messages.Count; i++)\r\n                {\r\n                    if (i % Constants.MaxGroupedMediaCount == 0)\r\n                    {\r\n                        if (messageMediaGroup.Group.Count > 0)\r\n                        {\r\n                            uploadService.AddGroup(message);\r\n                            Items.Insert(0, message);\r\n                        }\r\n\r\n                        mediaMessage = messages[i].Item1 as TLDecryptedMessage73;\r\n                        groupedId = mediaMessage != null ? mediaMessage.GroupedId : null;\r\n\r\n                        messageMediaGroup = new TLDecryptedMessageMediaGroup { Group = new TLVector<TLDecryptedMessageBase>() };\r\n                        message = new TLDecryptedMessage73\r\n                        {\r\n                            Flags = new TLInt(0),\r\n                            Media = messageMediaGroup,\r\n                            Message = TLString.Empty,\r\n                            RandomId = mediaMessage.RandomId,\r\n                            RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n                            ChatId = mediaMessage.ChatId,\r\n                            FromId = mediaMessage.FromId,\r\n                            Out = mediaMessage.Out,\r\n                            Unread = mediaMessage.Unread,\r\n                            Date = mediaMessage.Date,\r\n                            TTL = mediaMessage.TTL,\r\n                            Status = MessageStatus.Sending,\r\n                            ReplyToRandomMsgId = mediaMessage.ReplyToRandomMsgId,\r\n                            Reply = mediaMessage.Reply,\r\n                            GroupedId = groupedId\r\n                        };\r\n                        message.SetMedia();\r\n                    }\r\n\r\n                    messageMediaGroup.Group.Add(messages[i].Item1);\r\n                }\r\n\r\n                if (messageMediaGroup.Group.Count > 0)\r\n                {\r\n                    uploadService.AddGroup(message);\r\n                    Items.Insert(0, message);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                foreach (var message in messages)\r\n                {\r\n                    Items.Insert(0, message.Item1);\r\n                }\r\n            }\r\n\r\n            //IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n            Reply = null;\r\n\r\n            RaiseScrollToBottom();\r\n            NotifyOfPropertyChange(() => DescriptionVisibility);\r\n\r\n            BeginOnThreadPool(() => CacheService.SyncDecryptedMessages(messages, Chat, callback.SafeInvoke));\r\n        }\r\n\r\n        private async void UploadPhotoInternal(IList<Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>> messages)\r\n        {\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                var obj = messages[i].Item2;\r\n\r\n                var message = GetDecryptedMessage(obj);\r\n                if (message == null) return;\r\n\r\n                var media = message.Media as TLDecryptedMessageMediaPhoto;\r\n                if (media == null) return;\r\n\r\n                var file = media.File as TLEncryptedFile;\r\n                if (file == null) return;\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                    file.Id,\r\n                    file.DCId,\r\n                    file.AccessHash);\r\n\r\n                var storageFile = await ApplicationData.Current.LocalFolder.GetFileAsync(fileName);\r\n                if (storageFile == null) return;\r\n\r\n                System.Diagnostics.Debug.WriteLine(\"Upload photo random_id={0} name={1}\", messages[i].Item1.RandomId, storageFile.DisplayName);\r\n                UploadDocumentFileManager.UploadFile(file.Id, obj, storageFile, media.Key, media.IV);\r\n            }\r\n        }\r\n\r\n        public static Telegram.Api.WindowsPhone.Tuple<TLString, TLString> GenerateKeyIV()\r\n        {\r\n            var random = new Random();\r\n\r\n            var key = new byte[32];\r\n            var iv = new byte[32];\r\n            random.NextBytes(key);\r\n            random.NextBytes(iv);\r\n\r\n            return new Telegram.Api.WindowsPhone.Tuple<TLString, TLString>(TLString.FromBigEndianData(key), TLString.FromBigEndianData(iv));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretDialogDetailsViewModel.Reply.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing Telegram.Api;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsViewModel\r\n    {\r\n        public Brush ReplyBackgroundBrush\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (!isLightTheme)\r\n                {\r\n                    if (StateService.IsEmptyBackground)\r\n                    {\r\n                        return (Brush)Application.Current.Resources[\"PhoneChromeBrush\"];\r\n                    }\r\n                }\r\n                var color = Colors.Black;\r\n                color.A = 102;\r\n                return new SolidColorBrush(color);\r\n            }\r\n        }\r\n\r\n        private readonly Dictionary<string, TLMessageMediaBase> _webPagesCache = new Dictionary<string, TLMessageMediaBase>();\r\n\r\n        private TLDecryptedMessageBase _previousReply;\r\n\r\n        private void SaveReply()\r\n        {\r\n            if (Reply != null && !IsWebPagePreview(Reply))\r\n            {\r\n                _previousReply = Reply;\r\n            }\r\n        }\r\n\r\n        private static bool IsWebPagePreview(TLDecryptedMessageBase message)\r\n        {\r\n            var messagesContainer = message as TLDecryptedMessagesContainter;\r\n            if (messagesContainer != null)\r\n            {\r\n                return messagesContainer.WebPageMedia != null;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void RestoreReply()\r\n        {\r\n            if (_previousReply != null)\r\n            {\r\n                Reply = _previousReply;\r\n                _previousReply = null;\r\n            }\r\n            else\r\n            {\r\n                if (IsWebPagePreview(Reply))\r\n                {\r\n                    Reply = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        private readonly object _webPagePreviewsSyncRoot = new object();\r\n\r\n        private bool? _isWebPagePreviewEnabled;\r\n\r\n        private bool CheckWebPagePreviewsNotification()\r\n        {\r\n            if (_isWebPagePreviewEnabled.HasValue)\r\n            {\r\n                return _isWebPagePreviewEnabled.Value;\r\n            }\r\n\r\n            if (!_isWebPagePreviewEnabled.HasValue)\r\n            {\r\n                var result = TLUtils.OpenObjectFromMTProtoFile<TLBool>(_webPagePreviewsSyncRoot, Constants.WebPagePreviewsFileName);\r\n                if (result == null)\r\n                {\r\n                    var messageBoxResult = MessageBox.Show(AppResources.LInkPreviewsNotification, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                    _isWebPagePreviewEnabled = messageBoxResult == MessageBoxResult.OK;\r\n\r\n                    TLUtils.SaveObjectToMTProtoFile(_webPagePreviewsSyncRoot, Constants.WebPagePreviewsFileName, new TLBool(_isWebPagePreviewEnabled.Value));\r\n                }\r\n                else\r\n                {\r\n                    _isWebPagePreviewEnabled = result.Value;\r\n                }\r\n            }\r\n\r\n            return _isWebPagePreviewEnabled.Value;\r\n        }\r\n\r\n        private void GetWebPagePreviewAsync(string t)\r\n        {\r\n            if (t == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var text = t.Trim();\r\n            TLMessageMediaBase webPageMedia;\r\n            if (_webPagesCache.TryGetValue(text, out webPageMedia))\r\n            {\r\n                var webPageMessageMedia = webPageMedia as TLMessageMediaWebPage;\r\n                if (webPageMessageMedia != null)\r\n                {\r\n                    var webPage = webPageMessageMedia.WebPage as TLWebPage;\r\n                    if (webPage != null)\r\n                    {\r\n                        SaveReply();\r\n\r\n                        Reply = new TLDecryptedMessagesContainter { WebPageMedia = webPageMedia };\r\n                    }\r\n                    else\r\n                    {\r\n                        RestoreReply();\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n            else\r\n            {\r\n                RestoreReply();\r\n            }\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(1.0), () =>\r\n            {\r\n                if (!string.Equals(Text, text))\r\n                {\r\n                    return;\r\n                }\r\n\r\n                if (text.IndexOf(\".\", StringComparison.Ordinal) == -1)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                Uri uri;\r\n                var uriString = text.StartsWith(\"http\", StringComparison.OrdinalIgnoreCase)\r\n                    ? text\r\n                    : \"http://\" + text;\r\n                if (Uri.TryCreate(uriString, UriKind.Absolute, out uri))\r\n                {\r\n                    if (!CheckWebPagePreviewsNotification()) return;\r\n\r\n                    MTProtoService.GetWebPagePreviewAsync(new TLString(text),\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            _webPagesCache[text] = result;\r\n\r\n                            if (!string.Equals(Text, text))\r\n                            {\r\n                                return;\r\n                            }\r\n                            var webPageMessageMedia = result as TLMessageMediaWebPage;\r\n                            if (webPageMessageMedia != null)\r\n                            {\r\n\r\n                                var webPage = webPageMessageMedia.WebPage;\r\n                                if (webPage is TLWebPage || webPage is TLWebPagePending)\r\n                                {\r\n                                    SaveReply();\r\n\r\n                                    Reply = new TLDecryptedMessagesContainter { WebPageMedia = result };\r\n                                }\r\n                            }\r\n                        }),\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.getWebPagePreview error \" + error);\r\n                        });\r\n                }\r\n            });\r\n        }\r\n\r\n\r\n        public void OpenReply(TLDecryptedMessageBase message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            var reply = message.Reply;\r\n            if (reply == null) return;\r\n            if (reply.RandomIndex == 0) return;\r\n\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (Items[i].RandomIndex == reply.RandomIndex)\r\n                {\r\n                    RaiseScrollTo(new ScrollToEventArgs(Items[i]));\r\n\r\n                    //waiting ScrollTo to complete\r\n                    BeginOnUIThread(TimeSpan.FromSeconds(0.1), () =>\r\n                    {\r\n                        HighlightMessage(Items[i]);\r\n\r\n                        _previousScrollPosition = message;\r\n                        ShowScrollToBottomButton();\r\n                    });\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void HighlightMessage(TLDecryptedMessageBase message)\r\n        {\r\n            message.IsHighlighted = true;\r\n            BeginOnUIThread(TimeSpan.FromSeconds(2.0), () =>\r\n            {\r\n                message.IsHighlighted = false;\r\n            });\r\n        }\r\n\r\n        public void ProcessMessages(IList<TLDecryptedMessageBase> messages)\r\n        {\r\n            ProcessGroupedMessages(messages);\r\n\r\n            var replyToMsgIds = new TLVector<TLLong>();\r\n            var replyToMsgs = new List<TLDecryptedMessageBase>();\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                var decryptedMessage = messages[i] as TLDecryptedMessage;\r\n                if (decryptedMessage != null\r\n                    && decryptedMessage.TTL != null\r\n                    && decryptedMessage.TTL.Value > 0\r\n                    && decryptedMessage.Media != null)\r\n                {\r\n                    decryptedMessage.Media.TTLSeconds = decryptedMessage.TTL;\r\n                }\r\n\r\n                var decryptedMessage45 = messages[i] as TLDecryptedMessage45;\r\n                if (decryptedMessage45 != null)\r\n                {\r\n\r\n                    if (decryptedMessage45.ReplyToRandomMsgId != null)\r\n                    {\r\n                        var replyToRandomMsgId = decryptedMessage45.ReplyToRandomMsgId;\r\n                        if (replyToRandomMsgId != null\r\n                            && replyToRandomMsgId.Value != 0)\r\n                        {\r\n                            var reply = CacheService.GetDecryptedMessage(Chat.Id, replyToRandomMsgId);\r\n                            if (reply != null)\r\n                            {\r\n                                messages[i].Reply = reply;\r\n                            }\r\n                            else\r\n                            {\r\n                                replyToMsgIds.Add(replyToRandomMsgId);\r\n                                replyToMsgs.Add(decryptedMessage45);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n\r\n                    if (decryptedMessage45.NotListened)\r\n                    {\r\n                        if (decryptedMessage45.Media != null)\r\n                        {\r\n                            decryptedMessage45.Media.Out = decryptedMessage45.Out.Value;\r\n                            decryptedMessage45.Media.NotListened = true;\r\n                        }\r\n                    }\r\n\r\n                    var decryptedMediaWebPage = decryptedMessage45.Media as TLDecryptedMessageMediaWebPage;\r\n                    if (decryptedMediaWebPage != null)\r\n                    {\r\n                        if (decryptedMediaWebPage.WebPage == null && !TLString.IsNullOrEmpty(decryptedMediaWebPage.Url))\r\n                        {\r\n                            MTProtoService.GetWebPagePreviewAsync(decryptedMediaWebPage.Url,\r\n                                result => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    var mediaWebPage = result as TLMessageMediaWebPage;\r\n                                    if (mediaWebPage != null)\r\n                                    {\r\n                                        decryptedMediaWebPage.WebPage = mediaWebPage.WebPage;\r\n                                        decryptedMessage45.NotifyOfPropertyChange(() => decryptedMessage45.MediaSelf);\r\n                                    }\r\n                                }),\r\n                                error =>\r\n                                {\r\n                                    Execute.ShowDebugMessage(\"messages.getWebPagePreview error \" + error);\r\n                                });\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ProcessGroupedMessages(IList<TLDecryptedMessageBase> messages)\r\n        {\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                var firstMessage = messages[i] as TLDecryptedMessage73;\r\n                if (firstMessage != null && firstMessage.GroupedId != null)\r\n                {\r\n                    var mediaPhoto = firstMessage.Media as TLDecryptedMessageMediaPhoto;\r\n                    if (mediaPhoto != null || firstMessage.IsVideo())\r\n                    {\r\n                        var groupCount = GetGroupLength(messages, firstMessage.GroupedId, i + 1);\r\n                        if (groupCount > 0)\r\n                        {\r\n                            var groupedMessage = ReplaceWithGroup(messages, i, groupCount + 1);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private static TLDecryptedMessage ReplaceWithGroup(IList<TLDecryptedMessageBase> messages, int position, int length)\r\n        {\r\n            var message = messages[position + length - 1] as TLDecryptedMessage73;\r\n            if (message != null)\r\n            {\r\n                var group = new TLVector<TLDecryptedMessageBase>();\r\n                for (var i = 0; i < length; i++)\r\n                {\r\n                    group.Insert(0, messages[position]);\r\n                    messages.RemoveAt(position);\r\n                }\r\n\r\n                var mediaGroup = new TLDecryptedMessageMediaGroup { Group = group };\r\n\r\n                var groupedMessage = new TLDecryptedMessage73\r\n                {\r\n                    Flags = new TLInt(0),\r\n                    Out = message.Out,\r\n                    Unread = message.Unread,\r\n                    RandomId = message.RandomId,\r\n                    FromId = message.FromId,\r\n                    //ToId = message.ToId,\r\n                    //FwdHeader = message.FwdHeader,\r\n                    ViaBotName = message.ViaBotName,\r\n                    ReplyToRandomMsgId = message.ReplyToRandomMsgId,\r\n                    Date = message.Date,\r\n                    TTL = new TLInt(0), //message.TTL,\r\n                    Message = TLString.Empty,\r\n                    Media = mediaGroup,\r\n                    //ReplyMarkup = message.ReplyMarkup,\r\n                    Entities = new TLVector<TLMessageEntityBase>(),\r\n                    //Views = message.Views,\r\n                    //EditDate = message.EditDate,\r\n                    //PostAuthor = message.PostAuthor,\r\n                    GroupedId = message.GroupedId,\r\n                    Status = message.Status\r\n                };\r\n\r\n                //if (groupedMessage.FromId != null) groupedMessage.SetFromId();\r\n                if (groupedMessage.Media != null) groupedMessage.SetMedia();\r\n\r\n                messages.Insert(position, groupedMessage);\r\n\r\n                return groupedMessage;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static int GetGroupLength(IList<TLDecryptedMessageBase> messages, TLLong groupId, int start)\r\n        {\r\n            var count = 0;\r\n            for (var i = start; i < messages.Count; i++)\r\n            {\r\n                var message = messages[i] as TLDecryptedMessage73;\r\n                if (message != null\r\n                    && message.GroupedId != null\r\n                    && message.GroupedId.Value == groupId.Value\r\n                    //&& !message.IsExpired()\r\n                    && (message.Media is TLDecryptedMessageMediaPhoto || message.IsVideo()))\r\n                {\r\n                    count++;\r\n                }\r\n                else\r\n                {\r\n                    return count;\r\n                }\r\n            }\r\n\r\n            return count;\r\n        }\r\n\r\n        private TLDecryptedMessageBase _reply;\r\n\r\n        public TLDecryptedMessageBase Reply\r\n        {\r\n            get { return _reply; }\r\n            set\r\n            {\r\n                var notifyChanges = _reply != value;\r\n                SetField(ref _reply, value, () => Reply);\r\n                if (notifyChanges)\r\n                {\r\n                    NotifyOfPropertyChange(() => ReplyInfo);\r\n                    NotifyOfPropertyChange(() => CanSend);\r\n                }\r\n            }\r\n        }\r\n\r\n        public ReplyInfo ReplyInfo\r\n        {\r\n            get\r\n            {\r\n                if (_reply != null)\r\n                {\r\n                    return new ReplyInfo { Reply = _reply, ReplyToRandomMsgId = _reply.RandomId };\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public void ReplyMessage(TLDecryptedMessageBase message)\r\n        {\r\n            if (message == null) return;\r\n            if (message.RandomIndex == 0) return;\r\n\r\n            //var message31 = message as TLMessage31;\r\n            //if (message31 != null && !message31.Out.Value)\r\n            //{\r\n            //    var fromId = message31.FromId;\r\n            //    var user = CacheService.GetUser(fromId) as TLUser;\r\n            //    if (user != null && user.IsBot)\r\n            //    {\r\n            //        SetReplyMarkup(message31);\r\n            //    }\r\n            //}\r\n\r\n            Reply = message;\r\n        }\r\n\r\n        public void DeleteReply()\r\n        {\r\n            //var message31 = Reply as TLMessage31;\r\n            //if (message31 != null)\r\n            //{\r\n            //    if (message31.ReplyMarkup != null)\r\n            //    {\r\n            //        message31.ReplyMarkup.HasResponse = true;\r\n            //    }\r\n            //}\r\n\r\n            if (_previousReply != null)\r\n            {\r\n                Reply = _previousReply;\r\n                _previousReply = null;\r\n            }\r\n            else\r\n            {\r\n                //if (_replyMarkupMessage == Reply)\r\n                //{\r\n                //    SetReplyMarkup(null);\r\n                //}\r\n                Reply = null;\r\n            }\r\n        }\r\n\r\n        public StickerHintsViewModel StickerHints { get; protected set; }\r\n\r\n        private void CreateStickerHints()\r\n        {\r\n            if (StickerHints == null)\r\n            {\r\n                StickerHints = new StickerHintsViewModel();\r\n                NotifyOfPropertyChange(() => StickerHints);\r\n            }\r\n        }\r\n\r\n        private void ClearStickerHints()\r\n        {\r\n            if (StickerHints != null)\r\n            {\r\n                StickerHints.Hints.Clear();\r\n            }\r\n        }\r\n\r\n        public TLAllStickers Stickers { get; protected set; }\r\n\r\n        public TLStickerPack GetStickerPack(string text)\r\n        {\r\n            if (string.IsNullOrEmpty(text)) return null;\r\n\r\n            if (Stickers == null) return null;\r\n            if (Stickers.Packs == null) return null;\r\n\r\n            for (var i = 0; i < Stickers.Packs.Count; i++)\r\n            {\r\n                if (Stickers.Packs[i].Emoticon != null\r\n                    && Stickers.Packs[i].Emoticon.ToString() == text)\r\n                {\r\n                    return Stickers.Packs[i];\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public TLStickerPack GetFeaturedStickerPack(string text)\r\n        {\r\n            if (string.IsNullOrEmpty(text)) return null;\r\n\r\n            var featuredStickers = StateService.GetFeaturedStickers();\r\n            if (featuredStickers == null) return null;\r\n            if (featuredStickers.Packs == null) return null;\r\n\r\n            for (var i = 0; i < featuredStickers.Packs.Count; i++)\r\n            {\r\n                if (featuredStickers.Packs[i].Emoticon != null\r\n                    && featuredStickers.Packs[i].Emoticon.ToString() == text)\r\n                {\r\n                    return featuredStickers.Packs[i];\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public void GetAllStickersAsync()\r\n        {\r\n            StateService.GetAllStickersAsync(cachedStickers =>\r\n            {\r\n                Stickers = cachedStickers;\r\n\r\n                var cachedStickers43 = cachedStickers as TLAllStickers43;\r\n                if (cachedStickers43 != null\r\n                    && cachedStickers43.FavedStickers == null)\r\n                {\r\n                    MTProtoService.GetFavedStickersAsync(new TLInt(0),\r\n                        result =>\r\n                        {\r\n                            var favedStickers = result as TLFavedStickers;\r\n                            if (favedStickers != null)\r\n                            {\r\n                                cachedStickers43.FavedStickers = favedStickers;\r\n                                StateService.SaveAllStickersAsync(cachedStickers43);\r\n                            }\r\n                        },\r\n                        error =>\r\n                        {\r\n\r\n                        });\r\n                }\r\n\r\n                var featuredStickers = StateService.GetFeaturedStickers();\r\n                if (featuredStickers == null)\r\n                {\r\n                    MTProtoService.GetFeaturedStickersAsync(true, new TLInt(0),\r\n                        result =>\r\n                        {\r\n                            featuredStickers = result as TLFeaturedStickers;\r\n                            if (featuredStickers != null)\r\n                            {\r\n                                StateService.SaveFeaturedStickersAsync(featuredStickers);\r\n                            }\r\n                        },\r\n                        error =>\r\n                        {\r\n\r\n                        });\r\n                }\r\n\r\n                var cachedStickers29 = cachedStickers as TLAllStickers29;\r\n                if (cachedStickers29 != null\r\n                    && cachedStickers29.Date != null\r\n                    && cachedStickers29.Date.Value != 0)\r\n                {\r\n                    var date = TLUtils.ToDateTime(cachedStickers29.Date);\r\n                    if (\r\n                        date < DateTime.Now.AddSeconds(Constants.GetAllStickersInterval))\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var hash = cachedStickers != null ? cachedStickers.Hash ?? TLString.Empty : TLString.Empty;\r\n\r\n                MTProtoService.GetAllStickersAsync(hash,\r\n                    result =>\r\n                    {\r\n                        var allStickers = result as TLAllStickers43;\r\n                        if (allStickers != null)\r\n                        {\r\n                            if (cachedStickers29 != null)\r\n                            {\r\n                                allStickers.ShowStickersTab = cachedStickers29.ShowStickersTab;\r\n                                allStickers.RecentlyUsed = cachedStickers29.RecentlyUsed;\r\n                                allStickers.Date = TLUtils.DateToUniversalTimeTLInt(0, DateTime.Now);\r\n                            }\r\n                            if (cachedStickers43 != null)\r\n                            {\r\n                                allStickers.RecentStickers = cachedStickers43.RecentStickers;\r\n                                allStickers.FavedStickers = cachedStickers43.FavedStickers;\r\n                            }\r\n                            Stickers = allStickers;\r\n                            cachedStickers = allStickers;\r\n                            StateService.SaveAllStickersAsync(cachedStickers);\r\n                        }\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.getAllStickers error \" + error);\r\n                    });\r\n            });\r\n        }\r\n\r\n        private readonly Dictionary<string, IList<TLStickerItem>> _cachedStickerResults = new Dictionary<string, IList<TLStickerItem>>();\r\n\r\n        private const int MaxResults = 5;\r\n        private void GetStickerHints(string text)\r\n        {\r\n            var stickersCache = new Dictionary<long, long>();\r\n            var stickers = new List<TLStickerItem>();\r\n            var currentStickerText = text.Trim();\r\n\r\n            var allStickers43 = StateService.GetAllStickers() as TLAllStickers43;\r\n            var key = string.Format(\"{0}\\ashowStickersByEmoji={1}\", text, allStickers43 != null ? allStickers43.ShowStickersByEmoji : ShowStickersByEmoji.AllSets);\r\n            if (allStickers43 != null)\r\n            {\r\n                if (allStickers43.ShowStickersByEmoji == ShowStickersByEmoji.AllSets\r\n                    || allStickers43.ShowStickersByEmoji == ShowStickersByEmoji.MySets)\r\n                {\r\n                    var favedDict = new Dictionary<long, long>();\r\n                    var favedStickers = allStickers43.FavedStickers;\r\n                    if (favedStickers != null)\r\n                    {\r\n                        for (var i = 0; i < favedStickers.Documents.Count; i++)\r\n                        {\r\n                            favedDict[favedStickers.Documents[i].Index] = favedStickers.Documents[i].Index;\r\n                        }\r\n                    }\r\n\r\n                    // 1. 5 most recently used (flag=[my sets, all sets])\r\n                    var recentStickers = allStickers43.RecentStickers;\r\n                    if (recentStickers != null)\r\n                    {\r\n                        const int maxRecentCount = 5;\r\n                        var recentCount = 0;\r\n                        for (var i = 0; i < recentStickers.Documents.Count && recentCount < maxRecentCount; i++)\r\n                        {\r\n                            var sticker = recentStickers.Documents[i] as TLDocument22;\r\n                            if (sticker != null && sticker.Emoticon == text && !stickersCache.ContainsKey(sticker.Index) && !favedDict.ContainsKey(sticker.Index))\r\n                            {\r\n                                stickers.Add(new TLStickerItem { Document = sticker });\r\n                                stickersCache[sticker.Index] = sticker.Index;\r\n                                recentCount++;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    // 2. faved stickers (flag=[my sets, all sets])\r\n                    if (favedStickers != null)\r\n                    {\r\n                        for (var i = 0; i < favedStickers.Documents.Count; i++)\r\n                        {\r\n                            var sticker = favedStickers.Documents[i] as TLDocument22;\r\n                            if (sticker != null && sticker.Emoticon == text && !stickersCache.ContainsKey(sticker.Index))\r\n                            {\r\n                                stickers.Add(new TLStickerItem { Document = sticker });\r\n                                stickersCache[sticker.Index] = sticker.Index;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    // 3. installed stickers (flag=[my sets, all sets])\r\n                    var stickerPack = GetStickerPack(currentStickerText);\r\n                    if (stickerPack != null)\r\n                    {\r\n                        for (var i = 0; i < stickerPack.Documents.Count; i++)\r\n                        {\r\n                            var sticker = Stickers.Documents.FirstOrDefault(x => x.Id.Value == stickerPack.Documents[i].Value);\r\n                            if (sticker != null && !stickersCache.ContainsKey(sticker.Index))\r\n                            {\r\n                                stickers.Add(new TLStickerItem { Document = sticker });\r\n                                stickersCache[sticker.Index] = sticker.Index;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (allStickers43.ShowStickersByEmoji == ShowStickersByEmoji.AllSets)\r\n                {\r\n                    // 4. featured stickers (flag=[all sets])\r\n                    /*var featuredPack = GetFeaturedStickerPack(currentStickerText);\r\n                    if (featuredPack != null)\r\n                    {\r\n                        var featuredStickers = StateService.GetFeaturedStickers();\r\n                        for (var i = 0; i < featuredPack.Documents.Count; i++)\r\n                        {\r\n                            var sticker = featuredStickers.Documents.FirstOrDefault(x => x.Id.Value == featuredPack.Documents[i].Value);\r\n                            if (sticker != null && !stickersCache.ContainsKey(sticker.Index))\r\n                            {\r\n                                stickers.Add(new TLStickerItem { Document = sticker });\r\n                                stickersCache[sticker.Index] = sticker.Index;\r\n                            }\r\n                        }\r\n                    }*/\r\n\r\n                    // 5. search on server side\r\n                    MTProtoService.GetStickersAsync(new TLString(currentStickerText), new TLInt(0),\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            var stickersResult = result as TLStickers79;\r\n                            if (stickersResult != null)\r\n                            {\r\n                                if (!string.IsNullOrEmpty(Text))\r\n                                {\r\n                                    string searchText;\r\n                                    var searchByStickers = SearchStickerHints(Text, out searchText);\r\n                                    if (searchByStickers)\r\n                                    {\r\n                                        if (string.Equals(currentStickerText, searchText))\r\n                                        {\r\n                                            if (StickerHints.Hints.Count == MaxResults)\r\n                                            {\r\n                                                IList<TLStickerItem> cachedResult;\r\n                                                if (_cachedStickerResults.TryGetValue(key, out cachedResult))\r\n                                                {\r\n                                                    for (var i = 0; i < stickersResult.Stickers.Count; i++)\r\n                                                    {\r\n                                                        var item = new TLStickerItem { Document = stickersResult.Stickers[i] };\r\n\r\n                                                        cachedResult.Add(item);\r\n                                                    }\r\n                                                }\r\n                                            }\r\n                                            else\r\n                                            {\r\n                                                IList<TLStickerItem> cachedResult;\r\n                                                if (_cachedStickerResults.TryGetValue(key, out cachedResult))\r\n                                                {\r\n                                                    for (var i = 0; i < stickersResult.Stickers.Count; i++)\r\n                                                    {\r\n                                                        var item = new TLStickerItem { Document = stickersResult.Stickers[i] };\r\n\r\n                                                        cachedResult.Add(item);\r\n                                                        StickerHints.Hints.Add(item);\r\n                                                    }\r\n                                                }\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.getStickers error \" + error);\r\n                        }));\r\n                }\r\n            }\r\n\r\n            _cachedStickerResults[key] = stickers;\r\n\r\n            ClearStickerHints();\r\n\r\n            if (stickers.Count > 0)\r\n            {\r\n                CreateStickerHints();\r\n\r\n                for (var i = 0; i < stickers.Count; i++)\r\n                {\r\n                    if (i == MaxResults) break;\r\n\r\n                    StickerHints.Hints.Add(stickers[i]);\r\n                }\r\n            }\r\n        }\r\n\r\n        private static bool SearchStickerHints(string text, out string searchText)\r\n        {\r\n            searchText = text.Trim();\r\n            if (searchText.Length > 2)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        public void ContinueStickerHints()\r\n        {\r\n            if (!string.IsNullOrEmpty(Text))\r\n            {\r\n                string searchText;\r\n                var searchByStickers = SearchStickerHints(Text, out searchText);\r\n\r\n                if (searchByStickers)\r\n                {\r\n                    CreateStickerHints();\r\n\r\n                    if (StickerHints.Hints.Count == MaxResults)\r\n                    {\r\n                        var allStickers43 = StateService.GetAllStickers() as TLAllStickers43;\r\n                        var key = string.Format(\"{0}\\ashowStickersByEmoji={1}\", searchText, allStickers43 != null ? allStickers43.ShowStickersByEmoji : ShowStickersByEmoji.AllSets);\r\n                        IList<TLStickerItem> cachedResult;\r\n                        if (_cachedStickerResults.TryGetValue(key, out cachedResult))\r\n                        {\r\n                            for (var i = MaxResults; i < cachedResult.Count; i++)\r\n                            {\r\n                                StickerHints.Hints.Add(cachedResult[i]);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretDialogDetailsViewModel.Text.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services.FileManager;\r\n#if WP81\r\nusing Windows.Web.Http.Filters;\r\n#endif\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsViewModel\r\n    {\r\n\r\n        public bool CanSend\r\n        {\r\n            get\r\n            {\r\n                var text = DialogDetailsViewModel.GetTrimmedText(Text);\r\n\r\n                return !string.IsNullOrEmpty(text);\r\n            }\r\n        }\r\n\r\n        public void Send()\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            if (!CanSend) return;\r\n\r\n            var text = DialogDetailsViewModel.GetTrimmedText(Text);\r\n\r\n            if (ProcessSpecialCommands(text)) return;\r\n\r\n            //check maximum message length\r\n            if (text.Length > Constants.MaximumMessageLength)\r\n            {\r\n                MessageBox.Show(\r\n                    String.Format(AppResources.MaximumMessageLengthExceeded, Constants.MaximumMessageLength),\r\n                    AppResources.Error, MessageBoxButton.OK);\r\n\r\n                return;\r\n            }\r\n\r\n            var decryptedTuple = GetDecryptedMessageAndObject(new TLString(text), new TLDecryptedMessageMediaEmpty(), chat);\r\n\r\n            var chat17 = chat as TLEncryptedChat17;\r\n            if (chat17 != null && chat17.Layer.Value >= Constants.MinSecretChatWithRepliesLayer)\r\n            {\r\n                if (Reply != null && IsWebPagePreview(Reply))\r\n                {\r\n                    var webPageMedia = ((TLDecryptedMessagesContainter) Reply).WebPageMedia as TLMessageMediaWebPage;\r\n                    if (webPageMedia != null)\r\n                    {\r\n                        var webPage = webPageMedia.WebPage as TLWebPage;\r\n                        if (webPage != null)\r\n                        {\r\n                            ((TLDecryptedMessage45)decryptedTuple.Item1).Media = new TLDecryptedMessageMediaWebPage { Url = new TLString(Text), WebPage = webPage };\r\n                            ((TLDecryptedMessage45)decryptedTuple.Item1).SetMedia();\r\n                            Reply = _previousReply;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            InsertSendingMessage(decryptedTuple.Item1);\r\n            RaiseScrollToBottom();\r\n            NotifyOfPropertyChange(() => DescriptionVisibility);\r\n            Text = string.Empty;\r\n            \r\n            SendEncrypted(chat, decryptedTuple.Item2, MTProtoService, CacheService);\r\n        }\r\n\r\n        private bool ProcessSpecialCommands(string text)\r\n        {\r\n            //if (string.Equals(text, \"/tlg_msgs_err\", StringComparison.OrdinalIgnoreCase))\r\n            //{\r\n            //    ShowLastSyncErrors(info =>\r\n            //    {\r\n            //        try\r\n            //        {\r\n            //            Clipboard.SetText(info);\r\n            //        }\r\n            //        catch (Exception ex)\r\n            //        {\r\n\r\n            //        }\r\n            //    });\r\n            //    Text = string.Empty;\r\n            //    return true;\r\n            //}\r\n\r\n            if (text != null\r\n                && text.StartsWith(\"/tlg_msgs\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                try\r\n                {\r\n                    var parameters = text.Split(' ');\r\n                    var limit = 15;\r\n                    if (parameters.Length > 1)\r\n                    {\r\n                        limit = Convert.ToInt32(parameters[1]);\r\n                    }\r\n\r\n                    ShowMessagesInfo(limit, info =>\r\n                    {\r\n                        try\r\n                        {\r\n                            Clipboard.SetText(info);\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n\r\n                        }\r\n                    });\r\n                    Text = string.Empty;\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Execute.BeginOnUIThread(() => MessageBox.Show(\"Unknown command\"));\r\n                }\r\n                return true;\r\n            }\r\n\r\n            //if (string.Equals(text, \"/tlg_cfg\", StringComparison.OrdinalIgnoreCase))\r\n            //{\r\n            //    ShowConfigInfo(info =>\r\n            //    {\r\n            //        Execute.BeginOnUIThread(() =>\r\n            //        {\r\n            //            try\r\n            //            {\r\n\r\n            //                MessageBox.Show(info);\r\n            //                Clipboard.SetText(info);\r\n            //            }\r\n            //            catch (Exception ex)\r\n            //            {\r\n            //            }\r\n\r\n            //        });\r\n            //    });\r\n            //    Text = string.Empty;\r\n            //    return true;\r\n            //}\r\n\r\n            //if (string.Equals(text, \"/tlg_tr\", StringComparison.OrdinalIgnoreCase))\r\n            //{\r\n            //    ShowTransportInfo(info =>\r\n            //    {\r\n            //        Execute.BeginOnUIThread(() =>\r\n            //        {\r\n            //            try\r\n            //            {\r\n\r\n            //                MessageBox.Show(info);\r\n            //                Clipboard.SetText(info);\r\n            //            }\r\n            //            catch (Exception ex)\r\n            //            {\r\n            //            }\r\n            //        });\r\n            //    });\r\n\r\n            //    Text = string.Empty;\r\n            //    return true;\r\n            //}\r\n\r\n            //if (text != null\r\n            //    && text.StartsWith(\"/tlg_up_tr\", StringComparison.OrdinalIgnoreCase))\r\n            //{\r\n            //    try\r\n            //    {\r\n            //        var parameters = text.Split(' ');\r\n            //        var dcId = Convert.ToInt32(parameters[1]);\r\n            //        var dcIpAddress = parameters[2];\r\n            //        var dcPort = Convert.ToInt32(parameters[3]);\r\n\r\n            //        MTProtoService.UpdateTransportInfoAsync(dcId, dcIpAddress, dcPort,\r\n            //            result =>\r\n            //            {\r\n            //                Execute.BeginOnUIThread(() => MessageBox.Show(\"Complete /tlg_up_tr\"));\r\n            //            });\r\n\r\n            //        Text = string.Empty;\r\n\r\n            //        //ShowTransportInfo(info =>\r\n            //        //{\r\n            //        //    Execute.BeginOnUIThread(() =>\r\n            //        //    {\r\n            //        //        try\r\n            //        //        {\r\n\r\n            //        //            MessageBox.Show(info);\r\n            //        //            Clipboard.SetText(info);\r\n            //        //        }\r\n            //        //        catch (Exception ex)\r\n            //        //        {\r\n            //        //        }\r\n\r\n            //        //        Text = string.Empty;\r\n            //        //    });\r\n            //        //});\r\n            //    }\r\n            //    catch (Exception ex)\r\n            //    {\r\n            //        Execute.BeginOnUIThread(() => MessageBox.Show(\"Unknown command\"));\r\n            //    }\r\n            //    return true;\r\n            //}\r\n\r\n            return false;\r\n        }\r\n\r\n        public static TLDecryptedMessageService GetDecryptedServiceMessage(TLObject obj)\r\n        {\r\n            TLDecryptedMessageService message = null;\r\n\r\n            var messageLayer17 = obj as TLDecryptedMessageLayer17;\r\n            if (messageLayer17 != null)\r\n            {\r\n                message = messageLayer17.Message as TLDecryptedMessageService17;\r\n            }\r\n\r\n            var decryptedMessage = obj as TLDecryptedMessageService;\r\n            if (decryptedMessage != null)\r\n            {\r\n                message = decryptedMessage;\r\n            }\r\n\r\n            return message;\r\n        }\r\n\r\n        public static TLDecryptedMessage GetDecryptedMessage(TLObject obj)\r\n        {\r\n            TLDecryptedMessage message = null;\r\n            \r\n            var messageLayer17 = obj as TLDecryptedMessageLayer17;\r\n            if (messageLayer17 != null)\r\n            {\r\n                message = messageLayer17.Message as TLDecryptedMessage17;\r\n            }\r\n\r\n            var decryptedMessage = obj as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                message = decryptedMessage;\r\n            }\r\n\r\n            return message;\r\n        }\r\n\r\n        public static Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageService, TLObject> GetDecryptedServiceMessageAndObject(TLDecryptedMessageActionBase action, TLEncryptedChat chat, TLInt currentUserId, ICacheService cacheService)\r\n        {\r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n\r\n            TLDecryptedMessageService decryptedMessage;\r\n            TLObject decryptedObject;\r\n\r\n            var randomId = TLLong.Random();\r\n\r\n            var encryptedChat17 = chat as TLEncryptedChat17;\r\n            if (encryptedChat17 != null && encryptedChat17.Layer.Value >= 17)\r\n            {\r\n                var cachedEncryptedChat17 = (TLEncryptedChat17)cacheService.GetEncryptedChat(encryptedChat17.Id);\r\n\r\n                var inSeqNo = TLUtils.GetInSeqNo(currentUserId, cachedEncryptedChat17);\r\n                var outSeqNo = TLUtils.GetOutSeqNo(currentUserId, cachedEncryptedChat17);\r\n\r\n                cachedEncryptedChat17.RawOutSeqNo = new TLInt(cachedEncryptedChat17.RawOutSeqNo.Value + 1);\r\n                var decryptedMessage17 = new TLDecryptedMessageService17\r\n                {\r\n                    Action = action,\r\n                    RandomId = randomId,\r\n                    //RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n\r\n                    ChatId = chat.Id,\r\n                    FromId = currentUserId,\r\n                    Out = new TLBool(true),\r\n                    Unread = new TLBool(true),\r\n                    Date = TLUtils.DateToUniversalTimeTLInt(mtProtoService.ClientTicksDelta, DateTime.Now),\r\n                    Status = MessageStatus.Sending,\r\n\r\n                    TTL = chat.MessageTTL ?? new TLInt(0),\r\n                    InSeqNo = inSeqNo,\r\n                    OutSeqNo = outSeqNo\r\n                };\r\n\r\n                var decryptedMessageLayer17 = TLUtils.GetDecryptedMessageLayer(encryptedChat17.Layer, inSeqNo, outSeqNo, decryptedMessage17);\r\n\r\n                decryptedMessage = decryptedMessage17;\r\n                decryptedObject = decryptedMessageLayer17;\r\n            }\r\n            else\r\n            {\r\n                var decryptedMessage8 = new TLDecryptedMessageService\r\n                {\r\n                    Action = action,\r\n                    RandomId = randomId,\r\n                    RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n\r\n                    ChatId = chat.Id,\r\n                    FromId = currentUserId,\r\n                    Out = new TLBool(true),\r\n                    Unread = new TLBool(true),\r\n                    Date = TLUtils.DateToUniversalTimeTLInt(mtProtoService.ClientTicksDelta, DateTime.Now),\r\n                    Status = MessageStatus.Sending,\r\n\r\n                    TTL = chat.MessageTTL\r\n                };\r\n\r\n                decryptedMessage = decryptedMessage8;\r\n                decryptedObject = decryptedMessage;\r\n            }\r\n\r\n            return new Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageService, TLObject>(decryptedMessage, decryptedObject);\r\n        }\r\n\r\n        public Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject> GetDecryptedMessageAndObject(TLDecryptedMessageBase message, TLEncryptedChat chat)\r\n        {\r\n            TLDecryptedMessageBase decryptedMessage;\r\n            TLObject decryptedObject;\r\n\r\n            var encryptedChat17 = chat as TLEncryptedChat17;\r\n            if (encryptedChat17 != null)\r\n            {\r\n                var message17 = message as TLDecryptedMessage17;\r\n                if (message17 == null) return null;\r\n\r\n                var inSeqNo = message17.InSeqNo;\r\n                var outSeqNo = message17.OutSeqNo;\r\n\r\n                var decryptedMessageLayer17 = TLUtils.GetDecryptedMessageLayer(encryptedChat17.Layer, inSeqNo, outSeqNo, message);\r\n\r\n                decryptedMessage = message;\r\n                decryptedObject = decryptedMessageLayer17;\r\n            }\r\n            else\r\n            {\r\n                var decryptedMessage8 = message;\r\n\r\n                decryptedMessage = decryptedMessage8;\r\n                decryptedObject = decryptedMessage;\r\n            }\r\n\r\n            return new Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>(decryptedMessage, decryptedObject);\r\n        }\r\n\r\n        public Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject> GetDecryptedMessageAndObject(TLString text, TLDecryptedMessageMediaBase media, TLEncryptedChat chat, bool delaySeq = false)\r\n        {\r\n            TLDecryptedMessageBase decryptedMessage;\r\n            TLObject decryptedObject;\r\n\r\n            var randomId = TLLong.Random();\r\n\r\n            var encryptedChat17 = chat as TLEncryptedChat17;\r\n            if (encryptedChat17 != null)\r\n            {\r\n                var cachedEncryptedChat17 = (TLEncryptedChat17) CacheService.GetEncryptedChat(encryptedChat17.Id);\r\n\r\n                TLInt inSeqNo;\r\n                TLInt outSeqNo;\r\n                if (!delaySeq)\r\n                {\r\n                    inSeqNo = TLUtils.GetInSeqNo(MTProtoService.CurrentUserId, cachedEncryptedChat17);\r\n                    outSeqNo = TLUtils.GetOutSeqNo(MTProtoService.CurrentUserId, cachedEncryptedChat17);\r\n\r\n                    cachedEncryptedChat17.RawOutSeqNo = new TLInt(cachedEncryptedChat17.RawOutSeqNo.Value + 1);\r\n                }\r\n                else\r\n                {\r\n                    inSeqNo = new TLInt(-1);\r\n                    outSeqNo = new TLInt(-1);\r\n                }\r\n\r\n                TLDecryptedMessageBase decryptedMessageBase;\r\n\r\n                if (encryptedChat17.Layer.Value >= 73)\r\n                {\r\n                    decryptedMessageBase = new TLDecryptedMessage73\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Media = media,\r\n                        Message = text,\r\n                        RandomId = randomId,\r\n                        RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n                        //Entities = new TLVector<TLMessageEntityBase>(),\r\n                        //ViaBotName = TLString.Empty,\r\n                        //ReplyToRandomMsgId = new TLLong(0),\r\n\r\n                        ChatId = chat.Id,\r\n                        FromId = new TLInt(StateService.CurrentUserId),\r\n                        Out = new TLBool(true),\r\n                        Unread = new TLBool(true),\r\n                        Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                        Status = MessageStatus.Sending,\r\n\r\n                        TTL = chat.MessageTTL ?? new TLInt(0),\r\n                        InSeqNo = inSeqNo,\r\n                        OutSeqNo = outSeqNo\r\n                    };\r\n                    media.TTLSeconds = decryptedMessageBase.TTL;\r\n\r\n                    if (!(media is TLDecryptedMessageMediaEmpty))\r\n                    {\r\n                        ((TLDecryptedMessage45)decryptedMessageBase).SetMedia();\r\n                    }\r\n                }\r\n                else if (encryptedChat17.Layer.Value >= 45)\r\n                {\r\n                    decryptedMessageBase = new TLDecryptedMessage45\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Media = media,\r\n                        Message = text,\r\n                        RandomId = randomId,\r\n                        RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n                        //Entities = new TLVector<TLMessageEntityBase>(),\r\n                        //ViaBotName = TLString.Empty,\r\n                        //ReplyToRandomMsgId = new TLLong(0),\r\n\r\n                        ChatId = chat.Id,\r\n                        FromId = new TLInt(StateService.CurrentUserId),\r\n                        Out = new TLBool(true),\r\n                        Unread = new TLBool(true),\r\n                        Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                        Status = MessageStatus.Sending,\r\n\r\n                        TTL = chat.MessageTTL ?? new TLInt(0),\r\n                        InSeqNo = inSeqNo,\r\n                        OutSeqNo = outSeqNo\r\n                    };\r\n\r\n                    if (!(media is TLDecryptedMessageMediaEmpty))\r\n                    {\r\n                        ((TLDecryptedMessage45)decryptedMessageBase).SetMedia();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    decryptedMessageBase = new TLDecryptedMessage17\r\n                    {\r\n                        Media = media,\r\n                        Message = text,\r\n                        RandomId = randomId,\r\n                        RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n\r\n                        ChatId = chat.Id,\r\n                        FromId = new TLInt(StateService.CurrentUserId),\r\n                        Out = new TLBool(true),\r\n                        Unread = new TLBool(true),\r\n                        Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                        Status = MessageStatus.Sending,\r\n\r\n                        TTL = chat.MessageTTL ?? new TLInt(0),\r\n                        InSeqNo = inSeqNo,\r\n                        OutSeqNo = outSeqNo\r\n                    };\r\n                }\r\n\r\n                var decryptedMessageLayer17 = TLUtils.GetDecryptedMessageLayer(encryptedChat17.Layer, inSeqNo, outSeqNo, decryptedMessageBase);\r\n\r\n                decryptedMessage = decryptedMessageBase;\r\n                decryptedObject = decryptedMessageLayer17;\r\n            }\r\n            else\r\n            {\r\n                var decryptedMessage8 = new TLDecryptedMessage\r\n                {\r\n                    Media = media,\r\n                    Message = text,\r\n                    RandomId = randomId,\r\n                    RandomBytes = TLString.Random(Telegram.Api.Constants.MinRandomBytesLength),\r\n\r\n                    ChatId = chat.Id,\r\n                    FromId = new TLInt(StateService.CurrentUserId),\r\n                    Out = new TLBool(true),\r\n                    Unread = new TLBool(true),\r\n                    Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                    Status = MessageStatus.Sending,\r\n\r\n                    TTL = chat.MessageTTL\r\n                };\r\n\r\n                decryptedMessage = decryptedMessage8;\r\n                decryptedObject = decryptedMessage;\r\n            }\r\n\r\n            return new Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>(decryptedMessage, decryptedObject);\r\n        }\r\n\r\n        public static void SendEncryptedMultiMediaInternal(TLEncryptedChat chat, TLDecryptedMessage message, IMTProtoService mtProtoService, ICacheService cacheService)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var chat17 = chat as TLEncryptedChat17;\r\n                if (chat17 == null) return;\r\n\r\n                var randomId = new TLVector<TLLong>();\r\n                var data = new TLVector<TLString>();\r\n                var inputFile = new TLVector<TLInputEncryptedFileBase>();\r\n\r\n                var mediaGroup = message.Media as TLDecryptedMessageMediaGroup;\r\n                if (mediaGroup != null)\r\n                {\r\n                    for (var i = 0; i < mediaGroup.Group.Count; i++)\r\n                    {\r\n                        var message73 = mediaGroup.Group[i] as TLDecryptedMessage73;\r\n                        if (message73 == null) return;\r\n                        if (message73.InputFile == null) return;\r\n\r\n                        randomId.Add(message73.RandomId);\r\n\r\n                        var messageLayer = TLUtils.GetDecryptedMessageLayer(chat17.Layer, message73.InSeqNo, message73.OutSeqNo, message73) as TLDecryptedMessageLayer17;\r\n\r\n                        if (message73.InSeqNo.Value == -1 \r\n                            && message73.OutSeqNo.Value == -1)\r\n                        {\r\n                            var inSeqNo = TLUtils.GetInSeqNo(mtProtoService.CurrentUserId, chat17);\r\n                            var outSeqNo = TLUtils.GetOutSeqNo(mtProtoService.CurrentUserId, chat17);\r\n\r\n                            message73.InSeqNo = inSeqNo;\r\n                            message73.OutSeqNo = outSeqNo;\r\n                            message73.NotifyOfPropertyChange(() => message73.InSeqNo);\r\n                            message73.NotifyOfPropertyChange(() => message73.OutSeqNo);\r\n\r\n                            messageLayer.InSeqNo = inSeqNo;\r\n                            messageLayer.OutSeqNo = outSeqNo;\r\n\r\n                            chat17.RawOutSeqNo = new TLInt(chat17.RawOutSeqNo.Value + 1);\r\n                        }\r\n\r\n                        data.Add(TLUtils.EncryptMessage(messageLayer, mtProtoService.CurrentUserId, chat));\r\n                        inputFile.Add(message73.InputFile);\r\n\r\n                        System.Diagnostics.Debug.WriteLine(\"Send photo random_id={0} in_seq_no={1} out_seq_no={2}\", message73.RandomId, message73.InSeqNo, message73.OutSeqNo);\r\n                    }\r\n                }\r\n\r\n                if (randomId.Count == 0) return;\r\n\r\n                System.Diagnostics.Debug.WriteLine(\"Send photo random_id=[{0}]\", string.Join(\",\", randomId));\r\n\r\n                mtProtoService.SendEncryptedMultiMediaAsync(\r\n                    new TLInputEncryptedChat {AccessHash = chat.AccessHash, ChatId = chat.Id},\r\n                    randomId,\r\n                    data,\r\n                    inputFile,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        message.Media.UploadingProgress = 0.0;\r\n                        message.Status = MessageStatus.Confirmed;\r\n                        message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                        if (mediaGroup != null)\r\n                        {\r\n                            for (var i = mediaGroup.Group.Count - 1; i >= 0; i--)\r\n                            {\r\n                                var item = mediaGroup.Group[i] as TLDecryptedMessage;\r\n                                if (item != null)\r\n                                {\r\n                                    item.Media.UploadingProgress = 0.0;\r\n                                    item.Status = MessageStatus.Confirmed;\r\n                                    item.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                                    ProcessSentEncryptedFile(item, result[i]);\r\n                                    cacheService.SyncSendingDecryptedMessage(chat.Id, result[i].Date, mediaGroup.Group[i].RandomId, m => { });\r\n                                }\r\n                            }\r\n                        }\r\n                    }),\r\n                    () =>\r\n                    {\r\n                        message.Status = MessageStatus.Confirmed;\r\n                        message.NotifyOfPropertyChange(() => message.Status);\r\n                    },\r\n                    error =>\r\n                    {\r\n                        message.Status = MessageStatus.Failed;\r\n                        message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                        Execute.ShowDebugMessage(\"messages.sendEncryptedFile error \" + error);\r\n                    });\r\n            });\r\n        }\r\n\r\n        public static void SendEncryptedMediaInternal(TLEncryptedChat chat, TLObject obj, IMTProtoService mtProtoService, ICacheService cacheService)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var message = GetDecryptedMessage(obj);\r\n                if (message == null) return;\r\n\r\n                var message17 = message as TLDecryptedMessage17;\r\n                var messageLayer17 = obj as TLDecryptedMessageLayer17;\r\n                var chat17 = chat as TLEncryptedChat17;\r\n                if (chat17 != null\r\n                    && messageLayer17 != null\r\n                    && message17 != null\r\n                    && message17.InSeqNo.Value == -1\r\n                    && message17.OutSeqNo.Value == -1)\r\n                {\r\n                    var inSeqNo = TLUtils.GetInSeqNo(mtProtoService.CurrentUserId, chat17);\r\n                    var outSeqNo = TLUtils.GetOutSeqNo(mtProtoService.CurrentUserId, chat17);\r\n\r\n                    message17.InSeqNo = inSeqNo;\r\n                    message17.OutSeqNo = outSeqNo;\r\n                    message17.NotifyOfPropertyChange(() => message17.InSeqNo);\r\n                    message17.NotifyOfPropertyChange(() => message17.OutSeqNo);\r\n\r\n                    messageLayer17.InSeqNo = inSeqNo;\r\n                    messageLayer17.OutSeqNo = outSeqNo;\r\n\r\n                    chat17.RawOutSeqNo = new TLInt(chat17.RawOutSeqNo.Value + 1);\r\n\r\n                    //Execute.ShowDebugMessage(string.Format(\"SendEncryptedMediaInternal set inSeqNo={0}, outSeqNo={1}\", inSeqNo, outSeqNo));\r\n                }\r\n\r\n                System.Diagnostics.Debug.WriteLine(\"Send photo random_id={0} in_seq_no={1} out_seq_no={2}\", message17.RandomId, message17.InSeqNo, message17.OutSeqNo);\r\n                //message.Media.UploadingProgress = 0.0;\r\n                mtProtoService.SendEncryptedFileAsync(\r\n                   new TLInputEncryptedChat { AccessHash = chat.AccessHash, ChatId = chat.Id },\r\n                   message.RandomId,\r\n                   TLUtils.EncryptMessage(obj, mtProtoService.CurrentUserId, chat),\r\n                   message.InputFile,\r\n                   result =>\r\n                   {\r\n                       message.Media.UploadingProgress = 0.0;\r\n                       message.Status = MessageStatus.Confirmed;\r\n                       message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                       ProcessSentEncryptedFile(message, result);\r\n\r\n                       cacheService.SyncSendingDecryptedMessage(chat.Id, result.Date, message.RandomId, m => { });\r\n                   },\r\n                   () =>\r\n                   {\r\n                       message.Status = MessageStatus.Confirmed;\r\n                       message.NotifyOfPropertyChange(() => message.Status);\r\n                   },\r\n                   error =>\r\n                   {\r\n                       message.Status = MessageStatus.Failed;\r\n                       message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                       Execute.ShowDebugMessage(\"messages.sendEncryptedFile error \" + error);\r\n                   });\r\n            });\r\n        }\r\n\r\n        private static void ProcessSentEncryptedFile(TLDecryptedMessage message, TLSentEncryptedFile result)\r\n        {\r\n            var media = message.Media;\r\n            if (media != null)\r\n            {\r\n                var oldFile = media.File as TLEncryptedFile;\r\n\r\n                media.File = result.EncryptedFile;\r\n                if (oldFile != null)\r\n                {\r\n                    var newFile = media.File as TLEncryptedFile;\r\n                    if (newFile != null)\r\n                    {\r\n                        newFile.FileName = oldFile.FileName;\r\n                        newFile.Duration = oldFile.Duration;\r\n\r\n                        var mediaPhoto = media as TLDecryptedMessageMediaPhoto;\r\n                        if (mediaPhoto != null)\r\n                        {\r\n                            var sourceFileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                                oldFile.Id,\r\n                                oldFile.DCId,\r\n                                oldFile.AccessHash);\r\n\r\n                            var destinationFileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                                newFile.Id,\r\n                                newFile.DCId,\r\n                                newFile.AccessHash);\r\n\r\n                            try\r\n                            {\r\n                                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store.FileExists(sourceFileName))\r\n                                    {\r\n                                        store.CopyFile(sourceFileName, destinationFileName);\r\n                                        store.DeleteFile(sourceFileName);\r\n                                    }\r\n                                }\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                            }\r\n                        }\r\n\r\n                        var mediaDocument = media as TLDecryptedMessageMediaDocument45;\r\n                        if (mediaDocument != null)\r\n                        {\r\n                            if (message.IsVoice())\r\n                            {\r\n                                var originalFileName = String.Format(\"audio{0}_{1}.mp3\",\r\n                                    oldFile.Id,\r\n                                    oldFile.AccessHash);\r\n\r\n                                var sourceFileName = String.Format(\"audio{0}_{1}.wav\",\r\n                                    oldFile.Id,\r\n                                    oldFile.AccessHash);\r\n\r\n                                var destinationFileName = String.Format(\"audio{0}_{1}.wav\",\r\n                                    newFile.Id,\r\n                                    newFile.AccessHash);\r\n\r\n                                try\r\n                                {\r\n                                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                    {\r\n                                        if (store.FileExists(sourceFileName))\r\n                                        {\r\n                                            store.CopyFile(sourceFileName, destinationFileName);\r\n                                            store.DeleteFile(sourceFileName);\r\n                                        }\r\n\r\n                                        if (store.FileExists(originalFileName))\r\n                                        {\r\n                                            store.DeleteFile(originalFileName);\r\n                                        }\r\n                                    }\r\n                                }\r\n                                catch (Exception ex)\r\n                                {\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                var sourceFileName = String.Format(\"{0}_{1}_{2}.{3}\",\r\n                                    oldFile.Id,\r\n                                    oldFile.DCId,\r\n                                    oldFile.AccessHash,\r\n                                    oldFile.FileExt ?? mediaDocument.FileExt);\r\n\r\n                                var destinationFileName = String.Format(\"{0}_{1}_{2}.{3}\",\r\n                                    newFile.Id,\r\n                                    newFile.DCId,\r\n                                    newFile.AccessHash,\r\n                                    newFile.FileExt ?? mediaDocument.FileExt);\r\n\r\n                                try\r\n                                {\r\n                                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                    {\r\n                                        if (store.FileExists(sourceFileName))\r\n                                        {\r\n                                            store.CopyFile(sourceFileName, destinationFileName);\r\n                                            store.DeleteFile(sourceFileName);\r\n                                        }\r\n                                    }\r\n                                }\r\n                                catch (Exception ex)\r\n                                {\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var mediaAudio = media as TLDecryptedMessageMediaAudio;\r\n                        if (mediaAudio != null)\r\n                        {\r\n                            var originalFileName = String.Format(\"audio{0}_{1}.mp3\",\r\n                                oldFile.Id,\r\n                                oldFile.AccessHash);\r\n\r\n                            var sourceFileName = String.Format(\"audio{0}_{1}.wav\",\r\n                                oldFile.Id,\r\n                                oldFile.AccessHash);\r\n\r\n                            var destinationFileName = String.Format(\"audio{0}_{1}.wav\",\r\n                                newFile.Id,\r\n                                newFile.AccessHash);\r\n\r\n                            try\r\n                            {\r\n                                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store.FileExists(sourceFileName))\r\n                                    {\r\n                                        store.CopyFile(sourceFileName, destinationFileName);\r\n                                        store.DeleteFile(sourceFileName);\r\n                                    }\r\n\r\n                                    if (store.FileExists(originalFileName))\r\n                                    {\r\n                                        store.DeleteFile(originalFileName);\r\n                                    }\r\n                                }\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void SendEncryptedService(TLEncryptedChat chat, TLObject obj, IMTProtoService mtProtoService, ICacheService cacheService, Action<TLSentEncryptedMessage> callbak)\r\n        {\r\n            var message = GetDecryptedServiceMessage(obj);\r\n            if (message == null) return;\r\n\r\n            cacheService.SyncDecryptedMessage(message, chat,\r\n                cachedMessage =>\r\n                {\r\n                    mtProtoService.SendEncryptedServiceAsync(new TLInputEncryptedChat { AccessHash = chat.AccessHash, ChatId = chat.Id }, message.RandomId, TLUtils.EncryptMessage(obj, mtProtoService.CurrentUserId, chat),\r\n                        result =>\r\n                        {\r\n                            callbak.SafeInvoke(result);\r\n\r\n                            message.Status = MessageStatus.Confirmed;\r\n                            message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                            cacheService.SyncSendingDecryptedMessage(chat.Id, result.Date, message.RandomId, m => { });\r\n                        },\r\n                        error =>\r\n                        {\r\n                            message.Status = MessageStatus.Failed;\r\n                            message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                            Execute.ShowDebugMessage(\"messages.sendServiceEncrypted error \" + error);\r\n                        });\r\n                });\r\n        }\r\n\r\n        public static void SendEncrypted(TLEncryptedChat chat, TLObject obj, IMTProtoService mtProtoService, ICacheService cacheService)\r\n        {\r\n            var message = GetDecryptedMessage(obj);\r\n            if (message == null) return;\r\n\r\n            cacheService.SyncDecryptedMessage(message, chat,\r\n                cachedMessage =>\r\n                {\r\n                    mtProtoService.SendEncryptedAsync(new TLInputEncryptedChat { AccessHash = chat.AccessHash, ChatId = chat.Id }, message.RandomId, TLUtils.EncryptMessage(obj, mtProtoService.CurrentUserId, chat),\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            message.Status = MessageStatus.Confirmed;\r\n                            message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                            cacheService.SyncSendingDecryptedMessage(chat.Id, result.Date, message.RandomId, m => { });\r\n                        }),\r\n                        () =>\r\n                        {\r\n                            //message.Date = result.Date;\r\n                            message.Status = MessageStatus.Confirmed;\r\n                            message.NotifyOfPropertyChange(() => message.Status);\r\n                        },\r\n                        error =>\r\n                        {\r\n                            message.Status = MessageStatus.Failed;\r\n                            message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n                            Execute.ShowDebugMessage(\"messages.sendEncrypted error \" + error);\r\n                        });\r\n                });\r\n        }\r\n\r\n        public void ShowMessagesInfo(int limit = 15, Action<string> callback = null)\r\n        {\r\n            MTProtoService.GetSendingQueueInfoAsync(queueInfo =>\r\n            {\r\n                var info = new StringBuilder();\r\n\r\n                info.AppendLine(\"Queue: \");\r\n                info.AppendLine(queueInfo);\r\n\r\n                var dialogMessages = Items.Take(limit);\r\n                info.AppendLine(\"Dialog: \");\r\n                var count = 0;\r\n                foreach (var dialogMessage in dialogMessages)\r\n                {\r\n                    info.AppendLine(\"  \" + count++ + \" \" + dialogMessage);\r\n                }\r\n\r\n                //dialogMessages = CacheService.GetHistory(new TLInt(StateService.CurrentUserId), TLUtils.InputPeerToPeer(Peer, StateService.CurrentUserId), limit);\r\n\r\n                dialogMessages = CacheService.GetDecryptedHistory(Chat.Index);\r\n                info.AppendLine();\r\n                info.AppendLine(\"Database: \");\r\n                count = 0;\r\n                foreach (var dialogMessage in dialogMessages)\r\n                {\r\n                    info.AppendLine(\"  \" + count++ + \" \" + dialogMessage);\r\n                }\r\n\r\n                var infoString = info.ToString();\r\n                Execute.BeginOnUIThread(() => MessageBox.Show(infoString));\r\n\r\n                callback.SafeInvoke(infoString);\r\n            });\r\n        }\r\n\r\n        public void OpenCropedMessage(TLDecryptedMessage message)\r\n        {\r\n            StateService.DecryptedMediaMessage = message;\r\n            NavigationService.UriFor<MessageViewerViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretDialogDetailsViewModel.Video.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsViewModel\r\n    {\r\n        private void SendVideoInternal(byte[] data, TLObject obj)\r\n        {\r\n            var message = GetDecryptedMessage(obj);\r\n            if (message == null) return;\r\n\r\n            var mediaVideo = message.Media as TLDecryptedMessageMediaVideo;\r\n            if (mediaVideo == null) return;\r\n\r\n            var fileLocation = mediaVideo.File as TLEncryptedFile;\r\n            if (fileLocation == null) return;\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.mp4\",\r\n                fileLocation.Id,\r\n                fileLocation.DCId,\r\n                fileLocation.AccessHash);\r\n\r\n            if (data == null)\r\n            {\r\n                using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    using (var file = storage.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                    {\r\n                        data = new byte[file.Length];\r\n                        file.Read(data, 0, data.Length);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var encryptedBytes = Telegram.Api.Helpers.Utils.AesIge(data, mediaVideo.Key.Data, mediaVideo.IV.Data, true);\r\n            using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var file = storage.OpenFile(\"encrypted.\" + fileName, FileMode.Create, FileAccess.Write))\r\n                {\r\n                    file.Write(encryptedBytes, 0, encryptedBytes.Length);\r\n                }\r\n            }\r\n\r\n            UploadVideoFileManager.UploadFile(fileLocation.Id, obj, \"encrypted.\" + fileName);\r\n        }\r\n\r\n        private void SendVideo(string videoFileName, long duration)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            if (string.IsNullOrEmpty(videoFileName)) return;\r\n\r\n            long size = 0;\r\n            byte[] data;\r\n            using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var file = storage.OpenFile(videoFileName, FileMode.Open, FileAccess.Read))\r\n                {\r\n                    size = file.Length;\r\n                    data = new byte[size];\r\n                    file.Read(data, 0, data.Length);\r\n                }\r\n            }\r\n\r\n            byte[] thumb;\r\n            using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var file = storage.OpenFile(videoFileName + \".jpg\", FileMode.Open, FileAccess.Read))\r\n                {\r\n                    thumb = new byte[file.Length];\r\n                    file.Read(thumb, 0, thumb.Length);\r\n                }\r\n            }\r\n\r\n            var dcId = TLInt.Random();\r\n            var id = TLLong.Random();\r\n            var accessHash = TLLong.Random();\r\n\r\n            var fileLocation = new TLEncryptedFile\r\n            {\r\n                Id = id,\r\n                AccessHash = accessHash,\r\n                DCId = dcId,\r\n                Size = new TLInt((int)size),\r\n                KeyFingerprint = new TLInt(0),\r\n                FileName = new TLString(\"\"),\r\n                Duration = new TLInt((int)duration)\r\n            };\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.mp4\",\r\n                fileLocation.Id,\r\n                fileLocation.DCId,\r\n                fileLocation.AccessHash);\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                store.CopyFile(videoFileName, fileName, true);\r\n                store.DeleteFile(videoFileName);\r\n            }\r\n\r\n            var keyIV = GenerateKeyIV();\r\n\r\n            int thumbHeight;\r\n            int thumbWidth;\r\n            thumb = ImageUtils.CreateThumb(thumb, Constants.VideoPreviewMaxSize, Constants.VideoPreviewQuality, out thumbHeight, out thumbWidth);\r\n\r\n            TLDecryptedMessageMediaVideo decryptedMediaVideo;\r\n            var encryptedChat17 = chat as TLEncryptedChat17;\r\n            if (encryptedChat17 != null)\r\n            {\r\n                if (encryptedChat17.Layer.Value >= Constants.MinSecretChatWithAudioAsDocumentsLayer)\r\n                {\r\n                    decryptedMediaVideo = new TLDecryptedMessageMediaVideo45\r\n                    {\r\n                        Thumb = TLString.FromBigEndianData(thumb),\r\n                        ThumbW = new TLInt(thumbWidth),\r\n                        ThumbH = new TLInt(thumbHeight),\r\n                        Duration = new TLInt((int)duration),\r\n                        MimeType = new TLString(\"video/mp4\"),\r\n                        W = new TLInt(640),\r\n                        H = new TLInt(480),\r\n                        Size = new TLInt((int)size),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n                        Caption = TLString.Empty,\r\n\r\n                        File = fileLocation,\r\n\r\n                        UploadingProgress = 0.001\r\n                    };\r\n                }\r\n                else\r\n                {\r\n                    decryptedMediaVideo = new TLDecryptedMessageMediaVideo17\r\n                    {\r\n                        Thumb = TLString.FromBigEndianData(thumb),\r\n                        ThumbW = new TLInt(thumbWidth),\r\n                        ThumbH = new TLInt(thumbHeight),\r\n                        Duration = new TLInt((int)duration),\r\n                        MimeType = new TLString(\"video/mp4\"),\r\n                        W = new TLInt(640),\r\n                        H = new TLInt(480),\r\n                        Size = new TLInt((int)size),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n\r\n                        File = fileLocation,\r\n\r\n                        UploadingProgress = 0.001\r\n                    };\r\n                }\r\n            }\r\n            else\r\n            {\r\n                decryptedMediaVideo = new TLDecryptedMessageMediaVideo\r\n                {\r\n                    Thumb = TLString.FromBigEndianData(thumb),\r\n                    ThumbW = new TLInt(thumbWidth),\r\n                    ThumbH = new TLInt(thumbHeight),\r\n                    Duration = new TLInt((int) duration),\r\n                    //MimeType = new TLString(\"video/mp4\"),\r\n                    W = new TLInt(640),\r\n                    H = new TLInt(480),\r\n                    Size = new TLInt((int) size),\r\n                    Key = keyIV.Item1,\r\n                    IV = keyIV.Item2,\r\n\r\n                    File = fileLocation,\r\n\r\n                    UploadingProgress = 0.001\r\n                };\r\n            }\r\n\r\n            var decryptedTuple = GetDecryptedMessageAndObject(TLString.Empty, decryptedMediaVideo, chat, true);\r\n\r\n            InsertSendingMessage(decryptedTuple.Item1);\r\n            RaiseScrollToBottom();\r\n            NotifyOfPropertyChange(() => DescriptionVisibility);\r\n\r\n            BeginOnThreadPool(() => \r\n                CacheService.SyncDecryptedMessage(decryptedTuple.Item1, chat, \r\n                    cachedMessage => SendVideoInternal(data, decryptedTuple.Item2)));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/SecretDialogDetailsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Threading;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.EmojiPanel;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Views;\r\nusing TelegramClient.Views.Dialogs;\r\n#if WP8\r\nusing System.Threading.Tasks;\r\nusing Windows.Storage;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Extensions;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsViewModel :\r\n        ItemsViewModelBase<TLDecryptedMessageBase>\r\n    {\r\n        private IDialogDetailsView _view;\r\n\r\n        public IDialogDetailsView View\r\n        {\r\n            get\r\n            {\r\n                _view = _view ?? GetView() as IDialogDetailsView;\r\n\r\n                return _view;\r\n            }\r\n        }\r\n\r\n        private void ShowScrollToBottomButton()\r\n        {\r\n            if (View != null) View.ShowScrollToBottomButton();\r\n        }\r\n\r\n        private void HideScrollToBottomButton()\r\n        {\r\n            if (View != null) View.HideScrollToBottomButton();\r\n        }\r\n\r\n        public void AddToFavedStickers(TLDecryptedMessageBase messageBase)\r\n        {\r\n            if (messageBase == null) return;\r\n\r\n            var message = messageBase as TLDecryptedMessage;\r\n            if (message == null) return;\r\n\r\n            var mediaDocument = message.Media as TLDecryptedMessageMediaExternalDocument;\r\n            if (mediaDocument == null) return;\r\n\r\n            //var document = mediaDocument.Document as TLDocument22;\r\n            //if (document != null)\r\n            //{\r\n            //    var favedStickers = StateService.GetFavedStickers();\r\n            //    if (favedStickers != null)\r\n            //    {\r\n            //        var exists = favedStickers.Documents.FirstOrDefault(x => x.Index == document.Index) != null;\r\n            //        if (exists)\r\n            //        {\r\n            //            favedStickers.RemoveSticker(document);\r\n            //        }\r\n            //        else\r\n            //        {\r\n            //            favedStickers.AddSticker(document);\r\n            //        }\r\n            //        var allStickers = StateService.GetAllStickers();\r\n            //        var allStickers43 = allStickers as TLAllStickers43;\r\n            //        if (allStickers43 != null)\r\n            //        {\r\n            //            allStickers43.FavedStickers = favedStickers;\r\n            //            StateService.SaveAllStickersAsync(allStickers43);\r\n            //        }\r\n            //        StateService.SaveFavedStickersAsync(favedStickers);\r\n\r\n            //        EmojiControl emojiControl;\r\n            //        if (EmojiControl.TryGetInstance(out emojiControl))\r\n            //        {\r\n            //            emojiControl.UpdateFavedStickers(document);\r\n            //        }\r\n            //    }\r\n            //}\r\n        }\r\n\r\n        public void AddToStickers(TLDecryptedMessageBase messageBase)\r\n        {\r\n            if (messageBase == null) return;\r\n\r\n            var message = messageBase as TLDecryptedMessage;\r\n            if (message == null) return;\r\n\r\n            var mediaDocument = message.Media as TLDecryptedMessageMediaExternalDocument;\r\n            if (mediaDocument == null) return;\r\n\r\n            var inputStickerSet = mediaDocument.StickerSet;\r\n            if (inputStickerSet != null)\r\n            {\r\n                TelegramViewBase.NavigateToStickers(MTProtoService, StateService, inputStickerSet);\r\n            }\r\n        }\r\n\r\n        public bool IsGroupActionEnabled\r\n        {\r\n            get { return UngroupEnumerator(Items).Any(x => x.IsSelected); }\r\n        }\r\n\r\n        public string ScrollButtonImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    return \"/Images/ApplicationBar/appbar.next.light.png\";\r\n                }\r\n\r\n                return \"/Images/ApplicationBar/appbar.next.png\";\r\n            }\r\n        }\r\n\r\n        public Brush WatermarkForeground\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    if (StateService.IsEmptyBackground)\r\n                    {\r\n                        var color = Colors.Black;\r\n                        color.A = 153;\r\n                        return new SolidColorBrush(color);\r\n                    }\r\n                }\r\n\r\n                return (Brush)Application.Current.Resources[\"PhoneContrastForegroundBrush\"];\r\n            }\r\n        }\r\n\r\n        public Uri EncryptedImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                return isLightTheme ?\r\n                    new Uri(\"/Images/Dialogs/secretchat-white-WXGA.png\", UriKind.Relative) :\r\n                    new Uri(\"/Images/Dialogs/secretchat-black-WXGA.png\", UriKind.Relative);\r\n            }\r\n        }\r\n\r\n        private bool _isSelectionEnabled;\r\n\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return _isSelectionEnabled; }\r\n            set\r\n            {\r\n                SetField(ref _isSelectionEnabled, value, () => IsSelectionEnabled);\r\n\r\n                if (!value)\r\n                {\r\n                    foreach (var item in Items)\r\n                    {\r\n                        item.IsSelected = false;\r\n                        var message73 = item as TLDecryptedMessage73;\r\n                        if (message73 != null)\r\n                        {\r\n                            var mediaGroup = message73.Media as TLDecryptedMessageMediaGroup;\r\n                            if (mediaGroup != null)\r\n                            {\r\n                                foreach (var m in mediaGroup.Group)\r\n                                {\r\n                                    m.IsSelected = false;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private string _text = \"\";\r\n\r\n        public string Text\r\n        {\r\n            get { return _text; }\r\n            set\r\n            {\r\n                var notify = value != _text;\r\n                SetField(ref _text, value, () => Text);\r\n                if (notify)\r\n                {\r\n                    SaveUnsendedTextAsync(_text);\r\n                    NotifyOfPropertyChange(() => CanSend);\r\n                }\r\n            }\r\n        }\r\n\r\n        private readonly object _unsendedTextRoot = new object();\r\n\r\n        private void SaveUnsendedTextAsync(string text)\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var inputPeer = With as IInputPeer;\r\n                if (inputPeer == null) return;\r\n\r\n                if (string.IsNullOrEmpty(text))\r\n                {\r\n                    FileUtils.Delete(_unsendedTextRoot, \"ec\" + Chat.Id + \".dat\");\r\n                    return;\r\n                }\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_unsendedTextRoot, \"ec\" + Chat.Id + \".dat\", new TLString(text));\r\n            });\r\n        }\r\n\r\n        private void LoadUnsendedTextAsync(Action<string> callback)\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var inputPeer = With as IInputPeer;\r\n                if (inputPeer == null) return;\r\n\r\n                var result = TLUtils.OpenObjectFromMTProtoFile<TLString>(_unsendedTextRoot, \"ec\" + Chat.Id + \".dat\");\r\n                callback.SafeInvoke(result != null ? result.ToString() : \"\");\r\n            });\r\n        }\r\n\r\n        public TLUserBase With { get; protected set; }\r\n\r\n        public TLEncryptedChatBase Chat { get; protected set; }\r\n\r\n        private Typing _typing;\r\n\r\n        public Typing Typing\r\n        {\r\n            get { return _typing; }\r\n            set { SetField(ref _typing, value, () => Typing); }\r\n        }\r\n\r\n        public string Subtitle { get; protected set; }\r\n\r\n        public string AppBarCommandString\r\n        {\r\n            get\r\n            {\r\n                var chatWaiting = Chat as TLEncryptedChatWaiting;\r\n                if (chatWaiting != null)\r\n                {\r\n                    return string.Format(AppResources.WaitingForUserToGetOnline, With.FirstName) + \"...\";\r\n                }\r\n\r\n                var chatDiscarded = Chat as TLEncryptedChatDiscarded;\r\n                if (chatDiscarded != null)\r\n                {\r\n                    return AppResources.Delete;\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public bool IsAppBarCommandVisible\r\n        {\r\n            get\r\n            {\r\n                var chatWaiting = Chat as TLEncryptedChatWaiting;\r\n                if (chatWaiting != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                var chatDiscarded = Chat as TLEncryptedChatDiscarded;\r\n                if (chatDiscarded != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                var chatEmpty = Chat as TLEncryptedChatEmpty;\r\n                if (chatEmpty != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsApplicationBarVisible\r\n        {\r\n            get { return Chat is TLEncryptedChat; }\r\n        }\r\n\r\n        public Visibility DescriptionVisibility\r\n        {\r\n            get\r\n            {\r\n                var isEmtpyDialog = Items == null || Items.Count == 0;\r\n                var hasEmptyServiceMessage = false;\r\n                if (!isEmtpyDialog && Items.Count == 1)\r\n                {\r\n                    var serviceMessage = Items[0] as TLDecryptedMessageService;\r\n                    if (serviceMessage != null)\r\n                    {\r\n                        var serviceAction = serviceMessage.Action as TLDecryptedMessageActionEmpty;\r\n                        if (serviceAction != null)\r\n                        {\r\n                            hasEmptyServiceMessage = true;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return (isEmtpyDialog || hasEmptyServiceMessage) && LazyItems.Count == 0 ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public ChooseAttachmentViewModel ChooseAttachment { get; set; }\r\n\r\n        public bool IsChooseAttachmentOpen { get { return ChooseAttachment != null && ChooseAttachment.IsOpen; } }\r\n\r\n        public DecryptedImageViewerViewModel ImageViewer { get; protected set; }\r\n\r\n        public IUploadFileManager UploadFileManager\r\n        {\r\n            get { return IoC.Get<IUploadFileManager>(); }\r\n        }\r\n\r\n        public IUploadVideoFileManager UploadVideoFileManager\r\n        {\r\n            get { return IoC.Get<IUploadVideoFileManager>(); }\r\n        }\r\n\r\n        public IUploadDocumentFileManager UploadDocumentFileManager\r\n        {\r\n            get { return IoC.Get<IUploadDocumentFileManager>(); }\r\n        }\r\n\r\n        public string RandomParam { get; set; }\r\n\r\n        private readonly DispatcherTimer _selfDestructTimer;\r\n\r\n        private readonly object _typingUsersSyncRoot = new object();\r\n\r\n        private readonly Dictionary<int, DateTime> _typingUsersCache = new Dictionary<int, DateTime>();\r\n\r\n        private readonly IUploadService _uploadService;\r\n\r\n        public SecretDialogDetailsViewModel(IUploadService uploadService, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _uploadService = uploadService;\r\n\r\n            Items = new ObservableCollection<TLDecryptedMessageBase>();\r\n            Items.CollectionChanged += (sender, args) =>\r\n            {\r\n\r\n            };\r\n\r\n            Chat = GetChat();\r\n            StateService.With = null;\r\n            if (Chat == null) return;\r\n\r\n            With = GetParticipant();\r\n            StateService.Participant = null;\r\n            if (With == null) return;\r\n\r\n            eventAggregator.Subscribe(this);\r\n\r\n            Status = string.Format(AppResources.SecretChatCaption, With.FirstName);\r\n            Subtitle = GetSubtitle(With);\r\n\r\n            _selfDestructTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1.0) };\r\n            _selfDestructTimer.Tick += OnSelfDestructTimerTick;\r\n\r\n            LoadUnsendedTextAsync(unsendedText =>\r\n            {\r\n                Text = unsendedText;\r\n                if (unsendedText == null) return;\r\n\r\n                var trimmedText = unsendedText.TrimStart();\r\n                if (trimmedText.StartsWith(\"@\"))\r\n                {\r\n                    var words = trimmedText.Split(' ');\r\n                    if (words.Length >= 1)\r\n                    {\r\n                        if (BrowserNavigationService.IsValidUsername(words[0]))\r\n                        {\r\n                            if (trimmedText.Length > words[0].Length)\r\n                            {\r\n                                ResolveUsername(words[0], trimmedText.Substring(words[0].Length + 1));\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                GetAllStickersAsync();\r\n\r\n                var cachedMessages = CacheService.GetDecryptedHistory(Chat.Index).ToList();\r\n\r\n                ProcessMessages(cachedMessages);\r\n\r\n                foreach (var cachedMessage in cachedMessages)\r\n                {\r\n                    var isDisplayedMessage = TLUtils.IsDisplayedDecryptedMessage(cachedMessage);\r\n\r\n                    if (isDisplayedMessage)\r\n                    {\r\n                        LazyItems.Add(cachedMessage);\r\n                    }\r\n                }\r\n\r\n                if (LazyItems.Count > 0)\r\n                {\r\n                    BeginOnUIThread(() => PopulateItems(() =>\r\n                    {\r\n                        ReadMessages();\r\n                        NotifyOfPropertyChange(() => DescriptionVisibility);\r\n                    }));\r\n                }\r\n                else\r\n                {\r\n                    ReadMessages();\r\n                    NotifyOfPropertyChange(() => DescriptionVisibility);\r\n                }\r\n\r\n                NotifyOfPropertyChange(() => DescriptionVisibility);\r\n            });\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Text))\r\n                {\r\n                    if (!string.IsNullOrEmpty(Text))\r\n                    {\r\n                        var chat17 = Chat as TLEncryptedChat17;\r\n                        if (chat17 != null && chat17.Layer.Value >= Constants.MinSecretChatWithRepliesLayer)\r\n                        {\r\n                            GetWebPagePreviewAsync(Text);\r\n                        }\r\n\r\n                        if (chat17 != null)\r\n                        {\r\n                            if (chat17.Layer.Value >= Constants.MinSecretChatWithInlineBotsLayer)\r\n                            {\r\n                                string searchText;\r\n                                var searchInlineBotResults = SearchInlineBotResults(Text, out searchText);\r\n                                if (searchInlineBotResults)\r\n                                {\r\n                                    GetInlineBotResults(searchText);\r\n                                }\r\n                                else\r\n                                {\r\n                                    ClearInlineBotResults();\r\n                                }\r\n                            }\r\n\r\n                            if (chat17.Layer.Value >= Constants.MinSecretChatWithStickersLayer)\r\n                            {\r\n                                string searchText;\r\n                                var searchStickerHints = SearchStickerHints(Text, out searchText);\r\n                                if (searchStickerHints)\r\n                                {\r\n                                    GetStickerHints(searchText);\r\n                                }\r\n                                else\r\n                                {\r\n                                    ClearStickerHints();\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        ClearInlineBotResults();\r\n                        ClearStickerHints();\r\n                    }\r\n\r\n                    TextTypingManager.SetTyping();\r\n                }\r\n            };\r\n        }\r\n\r\n        private TLEncryptedChatBase GetChat()\r\n        {\r\n            if (StateService.With == null)\r\n            {\r\n                if (!string.IsNullOrEmpty(StateService.ChatId))\r\n                {\r\n                    var chatIdString = StateService.ChatId;\r\n                    StateService.ChatId = null;\r\n\r\n                    int chatId;\r\n                    try\r\n                    {\r\n                        chatId = Convert.ToInt32(chatIdString);\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        NavigateToShellViewModel();\r\n                        return null;\r\n                    }\r\n                    var chat = CacheService.GetEncryptedChat(new TLInt(chatId));\r\n                    if (chat != null)\r\n                    {\r\n                        return chat;\r\n                    }\r\n\r\n                    NavigateToShellViewModel();\r\n                    return null;\r\n                }\r\n\r\n                NavigateToShellViewModel();\r\n                return null;\r\n            }\r\n\r\n            return StateService.With as TLEncryptedChatBase;\r\n        }\r\n\r\n        private TLUserBase GetParticipant()\r\n        {\r\n            if (StateService.Participant == null)\r\n            {\r\n                if (!string.IsNullOrEmpty(StateService.UserId))\r\n                {\r\n                    var userIdString = StateService.UserId;\r\n                    StateService.UserId = null;\r\n\r\n                    int userId;\r\n                    try\r\n                    {\r\n                        userId = Convert.ToInt32(userIdString);\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        NavigateToShellViewModel();\r\n                        return null;\r\n                    }\r\n                    var user = CacheService.GetUser(new TLInt(userId));\r\n                    if (user != null)\r\n                    {\r\n                        return user;\r\n                    }\r\n\r\n                    NavigateToShellViewModel();\r\n                    return null;\r\n                }\r\n\r\n                NavigateToShellViewModel();\r\n                return null;\r\n            }\r\n\r\n            return StateService.Participant;\r\n        }\r\n\r\n        public void NavigateToShellViewModel()\r\n        {\r\n            ShellViewModel.Navigate(NavigationService);\r\n        }\r\n\r\n        private void SetTypingInternal(TLBool typing)\r\n        {\r\n            var chat = Chat as TLEncryptedChatCommon;\r\n            if (chat == null) return;\r\n\r\n            MTProtoService.SetEncryptedTypingAsync(new TLInputEncryptedChat { AccessHash = chat.AccessHash, ChatId = chat.Id }, typing, result => { });\r\n        }\r\n\r\n        //~SecretDialogDetailsViewModel()\r\n        //{\r\n\r\n        //}\r\n\r\n        private void StartTimer()\r\n        {\r\n            if (_isActive)\r\n            {\r\n                _selfDestructTimer.Start();\r\n\r\n                return;\r\n            }\r\n\r\n            //if (Chat != null && Chat.MessageTTL != null && IsActive)\r\n            //{\r\n            //    var seconds = Chat.MessageTTL.Value;\r\n\r\n            //    if (seconds > 0)\r\n            //    {\r\n            //        if (seconds < 10)\r\n            //        {\r\n            //            _selfDestructTimer.Interval = TimeSpan.FromSeconds(1.0);\r\n            //        }\r\n            //        else if (seconds < 90)\r\n            //        {\r\n            //            _selfDestructTimer.Interval = TimeSpan.FromSeconds(5.0);\r\n            //        }\r\n            //        else\r\n            //        {\r\n            //            _selfDestructTimer.Interval = TimeSpan.FromSeconds(30.0);\r\n            //        }\r\n\r\n            //        _selfDestructTimer.Start();\r\n            //    }\r\n            //}\r\n        }\r\n\r\n        private void StopTimer()\r\n        {\r\n            _selfDestructTimer.Stop();\r\n            _previousCheckTime = null;\r\n            _screenshotsCount = null;\r\n        }\r\n\r\n        private bool _isActive;\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (With == null) return;\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                Thread.Sleep(500);\r\n                //ReadMessages();\r\n                BeginOnUIThread(StartTimer);\r\n                InputTypingManager.Start();\r\n            });\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        private bool _disableWatching;\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            StopTimer();\r\n            InputTypingManager.Stop();\r\n\r\n            if (_watcher != null)\r\n            {\r\n                _watcher.Stop();\r\n                _disableWatching = true;\r\n            }\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        private DateTime? _previousCheckTime;\r\n\r\n        private int? _screenshotsCount;\r\n\r\n        private void OnSelfDestructTimerTick(object state, System.EventArgs eventArgs)\r\n        {\r\n            var now = DateTime.Now.Ticks;\r\n\r\n            var group = new Dictionary<long, TLDecryptedMessageMediaGroup>();\r\n            var randomId = new TLVector<TLLong>();\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var message = Items[i] as TLDecryptedMessage;\r\n                if (message != null)\r\n                {\r\n                    var groupedMessage = false;\r\n                    var mediaGroup = message.Media as TLDecryptedMessageMediaGroup;\r\n                    if (mediaGroup != null)\r\n                    {\r\n                        groupedMessage = true;\r\n                        for (var k = 0; k < mediaGroup.Group.Count; k++)\r\n                        {\r\n                            var item73 = mediaGroup.Group[k] as TLDecryptedMessage73;\r\n                            if (item73 != null\r\n                                && item73.Status == MessageStatus.Read\r\n                                && item73.DeleteIndex > 0)\r\n                            {\r\n                                randomId.Insert(0, item73.RandomId);\r\n\r\n                                var diffTicks = now - item73.DeleteDate.Value;\r\n                                if (diffTicks > 0)\r\n                                {\r\n                                    mediaGroup.Group.RemoveAt(k);\r\n                                    if (mediaGroup.Group.Count == 0)\r\n                                    {\r\n                                        Items.Remove(message);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        group[item73.GroupedId.Value] = mediaGroup;\r\n                                    }\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (!groupedMessage\r\n                        && message.Status == MessageStatus.Read\r\n                        && message.DeleteIndex > 0)\r\n                    {\r\n                        var diffTicks = now - message.DeleteDate.Value;\r\n                        if (diffTicks > 0)\r\n                        {\r\n                            var deleted = false;\r\n                            var message17 = message as TLDecryptedMessage17;\r\n                            if (message17 != null)\r\n                            {\r\n                                var mediaAudio17 = message17.Media as TLDecryptedMessageMediaAudio17;\r\n                                if (mediaAudio17 != null)\r\n                                {\r\n                                    if (!message.Out.Value)\r\n                                    {\r\n                                        deleted = true;\r\n                                        DeleteMessage(false, message);\r\n                                    }\r\n                                }\r\n\r\n                                var mediaDocument45 = message17.Media as TLDecryptedMessageMediaDocument45;\r\n                                if (mediaDocument45 != null && message.IsVoice())\r\n                                {\r\n                                    if (!message.Out.Value)\r\n                                    {\r\n                                        deleted = true;\r\n                                        DeleteMessage(false, message);\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            if (!deleted)\r\n                            {\r\n                                Items.RemoveAt(i--);\r\n                            }\r\n\r\n                            randomId.Insert(0, message.RandomId);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            foreach (var mediaGroup in group.Values)\r\n            {\r\n                mediaGroup.RaiseCalculate();\r\n            }\r\n\r\n            CacheService.DeleteDecryptedMessages(randomId);\r\n\r\n            if (randomId.Count > 0 && Items.Count < Constants.MessagesSlice)\r\n            {\r\n                IList<TLDecryptedMessageBase> history;\r\n\r\n                if (Items.Count > 0)\r\n                {\r\n                    history = CacheService.GetDecryptedHistory(Chat.Index, Items[Items.Count - 1].RandomId.Value);\r\n                }\r\n                else\r\n                {\r\n                    history = CacheService.GetDecryptedHistory(Chat.Index);\r\n                }\r\n\r\n                if (history != null)\r\n                {\r\n                    foreach (var item in history)\r\n                    {\r\n                        if (TLUtils.IsDisplayedDecryptedMessage(item))\r\n                        {\r\n                            Items.Add(item);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            //#if WP8\r\n            //            if (!_previousCheckTime.HasValue || DateTime.Now > _previousCheckTime.Value.AddSeconds(10.0))\r\n            //            {\r\n            //                BeginOnThreadPool(async () =>\r\n            //                {\r\n            //                    try\r\n            //                    {\r\n            //                        var screenshotsFolder = await KnownFolders.PicturesLibrary.GetFolderAsync(\"Screenshots\");\r\n            //                        var screenshotsFiles = await screenshotsFolder.GetFilesAsync();\r\n            //                        var previousScreenshotsCount = _screenshotsCount;\r\n            //                        _screenshotsCount = screenshotsFiles.Count;\r\n            //                        _previousCheckTime = DateTime.Now;\r\n            //                        if (_screenshotsCount > previousScreenshotsCount)\r\n            //                        {\r\n            //                            var chat = Chat as TLEncryptedChat;\r\n            //                            if (chat == null) return;\r\n\r\n            //                            var screenshotAction = new TLDecryptedMessageActionScreenshotMessages();\r\n            //                            screenshotAction.RandomIds = new TLVector<TLLong>();\r\n\r\n            //                            var decryptedTuple = GetDecryptedServiceMessageAndObject(screenshotAction, chat,\r\n            //                                MTProtoService.CurrentUserId, CacheService);\r\n\r\n            //                            Execute.BeginOnUIThread(() =>\r\n            //                            {\r\n            //                                Items.Insert(0, decryptedTuple.Item1);\r\n            //                                NotifyOfPropertyChange(() => DescriptionVisibility);\r\n            //                            });\r\n\r\n            //                            SendEncryptedService(chat, decryptedTuple.Item2, MTProtoService, CacheService,\r\n            //                                result =>\r\n            //                                {\r\n\r\n            //                                });\r\n            //                        }\r\n            //                    }\r\n            //                    catch (FileNotFoundException ex)\r\n            //                    {\r\n            //                        Execute.ShowDebugMessage(\"OnSelfDestructTimerTick check screenshot ex \" + ex);\r\n            //                        // Screenshots folder doesn't exist\r\n            //                    }\r\n            //                    catch (Exception ex)\r\n            //                    {\r\n            //                        Execute.ShowDebugMessage(\"OnSelfDestructTimerTick check screenshot ex \" + ex);\r\n            //                    }\r\n            //                });\r\n            //            }\r\n            //#endif\r\n\r\n\r\n            if (Items.Count == 0)\r\n            {\r\n                NotifyOfPropertyChange(() => DescriptionVisibility);\r\n            }\r\n        }\r\n\r\n        protected override void OnViewLoaded(object view)\r\n        {\r\n            NotifyOfPropertyChange(() => AppBarCommandString);\r\n\r\n            base.OnViewLoaded(view);\r\n        }\r\n\r\n        public void CopyMessage(TLDecryptedMessage message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            Clipboard.SetText(message.Message.ToString());\r\n        }\r\n\r\n        public void OnForwardInAnimationComplete()\r\n        {\r\n            if (ChooseAttachment == null)\r\n            {\r\n                ChooseAttachment = new ChooseAttachmentViewModel(With, OpenInlineBot, SendDocument, null, SendPhoto, SendLocation, null, CacheService, EventAggregator, NavigationService, StateService, false);\r\n                NotifyOfPropertyChange(() => ChooseAttachment);\r\n            }\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                NavigationService.RemoveBackEntry();\r\n                StateService.RemoveBackEntry = false;\r\n            }\r\n\r\n            if (StateService.RemoveBackEntries)\r\n            {\r\n                var backEntry = NavigationService.BackStack.FirstOrDefault();\r\n                while (backEntry != null && !backEntry.Source.ToString().Contains(\"ShellView.xaml\"))\r\n                {\r\n                    NavigationService.RemoveBackEntry();\r\n                    backEntry = NavigationService.BackStack.FirstOrDefault();\r\n                }\r\n\r\n                StateService.RemoveBackEntries = false;\r\n            }\r\n\r\n            //if (PrivateBetaIdentityToVisibilityConverter.IsPrivateBeta)\r\n            {\r\n                SecretChatDebug = new SecretChatDebugViewModel(Chat, Rekey);\r\n                NotifyOfPropertyChange(() => SecretChatDebug);\r\n            }\r\n        }\r\n\r\n        private void Rekey()\r\n        {\r\n            var chat = Chat as TLEncryptedChat20;\r\n            if (chat == null) return;\r\n            if (chat.PFS_ExchangeId != null) return;\r\n\r\n            var layer = chat.Layer;\r\n            if (layer.Value < 20) return;\r\n\r\n            var aBytes = new byte[256];\r\n            var random = new SecureRandom();\r\n            random.NextBytes(aBytes);\r\n            var p = chat.P;\r\n            var g = chat.G;\r\n\r\n            var gaBytes = Telegram.Api.Services.MTProtoService.GetGB(aBytes, g, p);\r\n            var ga = TLString.FromBigEndianData(gaBytes);\r\n\r\n            var randomId = TLLong.Random();\r\n            chat.PFS_A = TLString.FromBigEndianData(aBytes);\r\n            chat.PFS_ExchangeId = randomId;\r\n            var actionRequestKey = new TLDecryptedMessageActionRequestKey { ExchangeId = randomId, GA = ga };\r\n            var decryptedTuple = GetDecryptedServiceMessageAndObject(actionRequestKey, chat, MTProtoService.CurrentUserId, CacheService);\r\n            decryptedTuple.Item1.Unread = TLBool.False;\r\n\r\n            if (TLUtils.IsDisplayedDecryptedMessage(decryptedTuple.Item1))\r\n            {\r\n                Items.Insert(0, decryptedTuple.Item1);\r\n            }\r\n\r\n            SendEncryptedService(chat, decryptedTuple.Item2, MTProtoService, CacheService,\r\n                result =>\r\n                {\r\n\r\n                });\r\n        }\r\n\r\n        public void OpenPeerDetails()\r\n        {\r\n            StateService.CurrentContact = With;\r\n            if (Chat != null)\r\n            {\r\n                StateService.CurrentEncryptedChat = Chat;\r\n                StateService.CurrentKey = Chat.Key;\r\n                StateService.CurrentKeyFingerprint = Chat.KeyFingerprint;\r\n                StateService.CurrentDecryptedMediaMessages =\r\n                UngroupEnumerator(Items).OfType<TLDecryptedMessage>().Where(x => x.Media is TLDecryptedMessageMediaPhoto || x.Media is TLDecryptedMessageMediaVideo).ToList();\r\n            }\r\n            NavigationService.UriFor<SecretContactViewModel>().Navigate();\r\n        }\r\n\r\n        private void ReadMessages()\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var unreadMessages = CacheService.GetUnreadDecryptedHistory(Chat.Index);\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (!Items[i].Out.Value)\r\n                    {\r\n                        if (Items[i].Unread.Value)\r\n                        {\r\n                            unreadMessages.Add(Items[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (unreadMessages.Count > 0)\r\n                {\r\n                    ReadMessages(unreadMessages.ToArray());\r\n                }\r\n            });\r\n        }\r\n\r\n        private void ReadMessages(params TLDecryptedMessageBase[] messages)\r\n        {\r\n            if (!_isActive) return;\r\n\r\n            var chat = Chat as TLEncryptedChatCommon;\r\n            if (chat == null) return;\r\n\r\n            var maxDate = messages.Max(x => x.Date.Value);\r\n\r\n            SetRead(messages);\r\n\r\n            MTProtoService.ReadEncryptedHistoryAsync(\r\n                new TLInputEncryptedChat { ChatId = Chat.Id, AccessHash = chat.AccessHash },\r\n                new TLInt(maxDate),\r\n                result =>\r\n                {\r\n                    //SetRead(messages);\r\n                },\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.readEncryptedHistory error: \" + error);\r\n                });\r\n        }\r\n\r\n        private void SetRead(params TLDecryptedMessageBase[] messages)\r\n        {\r\n            var dialog = CacheService.GetEncryptedDialog(Chat.Id) as TLEncryptedDialog;\r\n\r\n            // input messages, no need to update UI\r\n            messages.ForEach(x =>\r\n            {\r\n                if (x.TTL != null && x.TTL.Value > 0)\r\n                {\r\n                    var decryptedMessage = x as TLDecryptedMessage17;\r\n                    if (decryptedMessage != null)\r\n                    {\r\n                        var decryptedPhoto = decryptedMessage.Media as TLDecryptedMessageMediaPhoto;\r\n                        if (decryptedPhoto != null && x.TTL.Value <= 60.0)\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        var decryptedVideo17 = decryptedMessage.Media as TLDecryptedMessageMediaVideo17;\r\n                        if (decryptedVideo17 != null && x.TTL.Value <= 60.0)\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        var decryptedAudio17 = decryptedMessage.Media as TLDecryptedMessageMediaAudio17;\r\n                        if (decryptedAudio17 != null && x.TTL.Value <= 60.0)\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        var decryptedDocument45 = decryptedMessage.Media as TLDecryptedMessageMediaDocument45;\r\n                        if (decryptedDocument45 != null && (x.IsVoice() || x.IsVideo()) && x.TTL.Value <= 60.0)\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        var decryptedGroup = decryptedMessage.Media as TLDecryptedMessageMediaGroup;\r\n                        if (decryptedGroup != null && x.TTL.Value <= 60.0)\r\n                        {\r\n                            return;\r\n                        }\r\n                    }\r\n                    x.DeleteDate = new TLLong(DateTime.Now.Ticks + x.TTL.Value * TimeSpan.TicksPerSecond);\r\n                }\r\n                x.Unread = TLBool.False;\r\n                x.Status = MessageStatus.Read;\r\n                //CacheService.SyncDecryptedMessage(x, Chat, r => { }); local messages, will commit changes with dialog update\r\n            });\r\n\r\n            CacheService.Commit();\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (dialog != null)\r\n                {\r\n                    dialog.UnreadCount = new TLInt(0);\r\n\r\n                    dialog.NotifyOfPropertyChange(() => dialog.UnreadCount);\r\n                    dialog.NotifyOfPropertyChange(() => dialog.TopMessage);\r\n                    dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n\r\n                    CacheService.Commit();\r\n                }\r\n            });\r\n        }\r\n\r\n        public bool SliceLoaded { get; set; }\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            if (LazyItems.Count > 0 || IsLastSliceLoaded) return;\r\n\r\n            var lastItem = Items.LastOrDefault();\r\n\r\n            long lastRandomId = 0;\r\n            if (lastItem != null)\r\n            {\r\n                lastRandomId = lastItem.RandomIndex;\r\n            }\r\n\r\n            var slice = CacheService.GetDecryptedHistory(Chat.Index, lastRandomId);\r\n\r\n            ProcessMessages(slice);\r\n\r\n            SliceLoaded = true;\r\n\r\n            if (slice.Count == 0)\r\n            {\r\n                IsLastSliceLoaded = true;\r\n            }\r\n            foreach (var message in slice)\r\n            {\r\n                if (TLUtils.IsDisplayedDecryptedMessage(message))\r\n                {\r\n                    Items.Add(message);\r\n                }\r\n            }\r\n\r\n\r\n            NotifyOfPropertyChange(() => DescriptionVisibility);\r\n        }\r\n\r\n        public void OnBackwardInAnimationComplete()\r\n        {\r\n            SendMedia();\r\n\r\n            ReadMessages();\r\n        }\r\n\r\n        public SecretChatDebugViewModel SecretChatDebug { get; protected set; }\r\n\r\n        public void DeleteChat()\r\n        {\r\n            var chatDiscarded = Chat as TLEncryptedChatDiscarded;\r\n            if (chatDiscarded == null) return;\r\n\r\n            var dialog = CacheService.GetEncryptedDialog(Chat.Id);\r\n            if (dialog != null)\r\n            {\r\n                EventAggregator.Publish(new DialogRemovedEventArgs(dialog));\r\n                CacheService.DeleteDialog(dialog);\r\n            }\r\n            BeginOnUIThread(() => NavigationService.GoBack());\r\n        }\r\n\r\n        public void CancelVideoDownloading(TLDecryptedMessageMediaVideo mediaVideo)\r\n        {\r\n            mediaVideo.DownloadingProgress = 0.0;\r\n\r\n            var fileManager = IoC.Get<IEncryptedFileManager>();\r\n            fileManager.CancelDownloadFile(mediaVideo);\r\n\r\n            DeleteSendingMessage(mediaVideo);\r\n        }\r\n\r\n        public void CancelDocumentDownloading(TLDecryptedMessageMediaDocument mediaDocument)\r\n        {\r\n            mediaDocument.DownloadingProgress = 0.0;\r\n\r\n            var fileManager = IoC.Get<IEncryptedFileManager>();\r\n            fileManager.CancelDownloadFile(mediaDocument);\r\n\r\n            DeleteSendingMessage(mediaDocument);\r\n        }\r\n\r\n        public void CancelPhotoDownloading(TLDecryptedMessageMediaPhoto mediaPhoto)\r\n        {\r\n            mediaPhoto.IsCanceled = true;\r\n            mediaPhoto.DownloadingProgress = 0.0;\r\n\r\n            var fileManager = IoC.Get<IEncryptedFileManager>();\r\n            fileManager.CancelDownloadFile(mediaPhoto);\r\n\r\n            DeleteSendingMessage(mediaPhoto);\r\n        }\r\n\r\n        public void CancelAudioDownloading(TLDecryptedMessageMediaBase mediaBase)\r\n        {\r\n            var mediaDocument = mediaBase as TLDecryptedMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                if (mediaDocument.UploadingProgress > 0.0)\r\n                {\r\n                    CancelUploading(mediaDocument);\r\n                }\r\n                else\r\n                {\r\n                    mediaDocument.IsCanceled = true;\r\n                    mediaDocument.DownloadingProgress = -0.01;\r\n\r\n                    var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                    fileManager.CancelDownloadFile(mediaDocument);\r\n                }\r\n            }\r\n\r\n            var mediaAudio = mediaBase as TLDecryptedMessageMediaAudio;\r\n            if (mediaAudio != null)\r\n            {\r\n                if (mediaAudio.UploadingProgress > 0.0)\r\n                {\r\n                    CancelUploading(mediaAudio);\r\n                }\r\n                else\r\n                {\r\n                    mediaAudio.IsCanceled = true;\r\n                    mediaAudio.DownloadingProgress = -0.01;\r\n\r\n                    var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                    fileManager.CancelDownloadFile(mediaAudio);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void DeleteSendingMessage(TLDecryptedMessageMediaBase mediaDocument)\r\n        {\r\n            TLDecryptedMessage message = null;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var messageCommon = Items[i] as TLDecryptedMessage;\r\n                if (messageCommon != null && messageCommon.Media == mediaDocument)\r\n                {\r\n                    message = messageCommon;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (message != null && message.Status == MessageStatus.Sending)\r\n            {\r\n                DeleteDownloadingMessage(message);\r\n            }\r\n        }\r\n\r\n        public void CancelUploading(TLDecryptedMessageMediaBase media)\r\n        {\r\n            TLDecryptedMessage message = null;\r\n            foreach (var item in UngroupEnumerator(Items))\r\n            {\r\n                var messageCommon = item as TLDecryptedMessage;\r\n                if (messageCommon != null && messageCommon.Media == media)\r\n                {\r\n                    message = messageCommon;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (message != null)\r\n            {\r\n                DeleteUploadingMessage(message);\r\n            }\r\n        }\r\n\r\n        private void DeleteDownloadingMessage(TLDecryptedMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLDecryptedMessage;\r\n            if (message == null) return;\r\n\r\n            var media = message.Media;\r\n            if (media == null || media.DownloadingProgress == 1.0) return;\r\n\r\n            message.Status = MessageStatus.Failed;\r\n            Items.Remove(message);\r\n\r\n            NotifyOfPropertyChange(() => DescriptionVisibility);\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                CacheService.DeleteDecryptedMessages(new TLVector<TLLong> { message.RandomId });\r\n                //CancelDownloading(message);\r\n            });\r\n        }\r\n\r\n        private void CancelDownloading(TLDecryptedMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLDecryptedMessage;\r\n            if (message == null) return;\r\n\r\n            var media = message.Media;\r\n\r\n            var mediaPhoto = media as TLDecryptedMessageMediaPhoto;\r\n            if (mediaPhoto != null && mediaPhoto.File != null)\r\n            {\r\n                var file = mediaPhoto.File as TLEncryptedFile;\r\n                if (file != null && file.Id != null)\r\n                {\r\n                    var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                    fileManager.CancelDownloadFile(mediaPhoto);\r\n                }\r\n            }\r\n\r\n            var mediaVideo = media as TLDecryptedMessageMediaVideo;\r\n            if (mediaVideo != null && mediaVideo.File != null)\r\n            {\r\n                var file = mediaVideo.File as TLEncryptedFile;\r\n                if (file != null && file.Id != null)\r\n                {\r\n                    var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                    fileManager.CancelDownloadFile(mediaVideo);\r\n                }\r\n            }\r\n\r\n            var mediaDocument = media as TLDecryptedMessageMediaDocument;\r\n            if (mediaDocument != null && mediaDocument.File != null)\r\n            {\r\n                var file = mediaDocument.File as TLEncryptedFile;\r\n                if (file != null && file.Id != null)\r\n                {\r\n                    var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                    fileManager.CancelDownloadFile(mediaDocument);\r\n                }\r\n            }\r\n\r\n            var mediaAudio = media as TLDecryptedMessageMediaAudio;\r\n            if (mediaAudio != null && mediaAudio.File != null)\r\n            {\r\n                var file = mediaAudio.File as TLEncryptedFile;\r\n                if (file != null && file.Id != null)\r\n                {\r\n                    var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                    fileManager.CancelDownloadFile(mediaAudio);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void DeleteUploadingMessage(TLDecryptedMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLDecryptedMessage;\r\n            if (message == null) return;\r\n\r\n            var media = message.Media;\r\n            if (media == null || media.UploadingProgress == 1.0) return;\r\n\r\n            var message73 = messageBase as TLDecryptedMessage73;\r\n            if (message73 != null && message73.GroupedId != null)\r\n            {\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    var groupedMessage = Items[i] as TLDecryptedMessage73;\r\n                    if (groupedMessage != null\r\n                        && groupedMessage.GroupedId != null\r\n                        && groupedMessage.GroupedId.Value == message73.GroupedId.Value)\r\n                    {\r\n                        var mediaGroup = groupedMessage.Media as TLDecryptedMessageMediaGroup;\r\n                        if (mediaGroup != null)\r\n                        {\r\n                            mediaGroup.Group.Remove(messageBase);\r\n                            mediaGroup.RaiseCalculate();\r\n\r\n                            if (mediaGroup.Group.Count == 0)\r\n                            {\r\n                                groupedMessage.Status = MessageStatus.Failed;\r\n                                Items.Remove(groupedMessage);\r\n                            }\r\n                            else if (mediaGroup.Group.Count == 1)\r\n                            {\r\n                                message73.GroupedId = null;\r\n                                if (Items[i] == groupedMessage)\r\n                                {\r\n                                    Items.RemoveAt(i);\r\n                                    Items.Insert(i, mediaGroup.Group[0]);\r\n                                }\r\n                            }\r\n                            break;\r\n                        }\r\n\r\n                        message.Status = MessageStatus.Failed;\r\n                        Items.RemoveAt(i);\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                message.Status = MessageStatus.Failed;\r\n                Items.Remove(message);\r\n            }\r\n\r\n            NotifyOfPropertyChange(() => DescriptionVisibility);\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                CacheService.DeleteDecryptedMessages(new TLVector<TLLong> { message.RandomId });\r\n                CancelUploading(message);\r\n            });\r\n        }\r\n\r\n        private void CancelUploading(TLDecryptedMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLDecryptedMessage;\r\n            if (message == null) return;\r\n\r\n            var media = message.Media;\r\n\r\n            var mediaPhoto = media as TLDecryptedMessageMediaPhoto;\r\n            if (mediaPhoto != null && mediaPhoto.File != null)\r\n            {\r\n                var file = mediaPhoto.File as TLEncryptedFile;\r\n                if (file != null && file.Id != null)\r\n                {\r\n                    UploadDocumentFileManager.CancelUploadFile(file.Id);\r\n                }\r\n            }\r\n\r\n            var mediaVideo = media as TLDecryptedMessageMediaVideo;\r\n            if (mediaVideo != null && mediaVideo.File != null)\r\n            {\r\n                var file = mediaVideo.File as TLEncryptedFile;\r\n                if (file != null && file.Id != null)\r\n                {\r\n                    UploadVideoFileManager.CancelUploadFile(file.Id);\r\n                }\r\n            }\r\n\r\n            var mediaDocument = media as TLDecryptedMessageMediaDocument;\r\n            if (mediaDocument != null && mediaDocument.File != null)\r\n            {\r\n                var file = mediaDocument.File as TLEncryptedFile;\r\n                if (file != null && file.Id != null)\r\n                {\r\n                    if (messageBase.IsVoice())\r\n                    {\r\n                        UploadFileManager.CancelUploadFile(file.Id);\r\n                    }\r\n                    else if (messageBase.IsVideo())\r\n                    {\r\n                        UploadVideoFileManager.CancelUploadFile(file.Id);\r\n                    }\r\n                    else\r\n                    {\r\n                        UploadDocumentFileManager.CancelUploadFile(file.Id);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var mediaAudio = media as TLDecryptedMessageMediaAudio;\r\n            if (mediaAudio != null && mediaAudio.File != null)\r\n            {\r\n                var file = mediaAudio.File as TLEncryptedFile;\r\n                if (file != null && file.Id != null)\r\n                {\r\n                    UploadFileManager.CancelUploadFile(file.Id);\r\n                }\r\n            }\r\n        }\r\n\r\n#if WP81\r\n        public static async Task<StorageFile> GetStorageFile(TLDecryptedMessageMediaBase media)\r\n        {\r\n            if (media == null) return null;\r\n            if (media.StorageFile != null)\r\n            {\r\n                if (File.Exists(media.StorageFile.Path))\r\n                {\r\n                    return media.StorageFile;\r\n                }\r\n            }\r\n\r\n            var mediaDocument = media as TLDecryptedMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                var file = media.File as TLEncryptedFile;\r\n                if (file == null) return null;\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.{3}\",\r\n                    file.Id,\r\n                    file.DCId,\r\n                    file.AccessHash,\r\n                    mediaDocument.FileExt);\r\n\r\n                return await DialogDetailsViewModel.GetFileFromLocalFolder(fileName);\r\n            }\r\n\r\n            var mediaVideo = media as TLDecryptedMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                var file = media.File as TLEncryptedFile;\r\n                if (file == null) return null;\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.{3}\",\r\n                    file.Id,\r\n                    file.DCId,\r\n                    file.AccessHash,\r\n                    \"mp4\");\r\n\r\n                return await DialogDetailsViewModel.GetFileFromLocalFolder(fileName);\r\n            }\r\n\r\n            return null;\r\n        }\r\n#endif\r\n\r\n\r\n#if WP81\r\n        public async void Resend(TLDecryptedMessage message)\r\n#else\r\n        public void Resend(TLDecryptedMessage message)\r\n#endif\r\n        {\r\n            if (message == null) return;\r\n\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            TLObject obj = message;\r\n            var decryptedMessage17 = message as TLDecryptedMessage17;\r\n            if (decryptedMessage17 != null)\r\n            {\r\n                var encryptedChat17 = chat as TLEncryptedChat17;\r\n                if (encryptedChat17 == null) return;\r\n\r\n                var messageLayer17 = TLUtils.GetDecryptedMessageLayer(encryptedChat17.Layer, decryptedMessage17.InSeqNo, decryptedMessage17.OutSeqNo, decryptedMessage17);\r\n\r\n                obj = messageLayer17;\r\n            }\r\n\r\n            // find common grouped message to resend\r\n            var message73 = message as TLDecryptedMessage73;\r\n            if (message73 != null\r\n                && message73.GroupedId != null)\r\n            {\r\n                var mediaGroup = message73.Media as TLDecryptedMessageMediaGroup;\r\n                if (mediaGroup == null)\r\n                {\r\n                    var groupedMessage = FindGroupedMessage(message73) as TLDecryptedMessage73;\r\n                    if (groupedMessage != null)\r\n                    {\r\n                        message = groupedMessage;\r\n                    }\r\n                }\r\n            }\r\n\r\n            message.Status = MessageStatus.Sending;\r\n            message.NotifyOfPropertyChange(() => message.Status);\r\n\r\n            var message45 = message as TLDecryptedMessage45;\r\n            if (message45 != null && message45.InlineBotResult != null)\r\n            {\r\n                ResendInlineBotResult(message45, ContinueProcessBotInlineResult);\r\n                return;\r\n            }\r\n\r\n            if (message.Media is TLDecryptedMessageMediaEmpty)\r\n            {\r\n                SendEncrypted(chat, obj, MTProtoService, CacheService);\r\n            }\r\n            else\r\n            {\r\n                message.Media.UploadingProgress = 0.001;\r\n                if (message.Media is TLDecryptedMessageMediaGroup)\r\n                {\r\n                    var mediaGroup = (TLDecryptedMessageMediaGroup)message.Media;\r\n                    var inputMedia = new TLVector<TLInputEncryptedFileBase>();\r\n                    foreach (var item in mediaGroup.Group)\r\n                    {\r\n                        if (item.InputFile != null)\r\n                        {\r\n                            inputMedia.Add(item.InputFile);\r\n                        }\r\n                    }\r\n                    if (inputMedia.Count == mediaGroup.Group.Count)\r\n                    {\r\n                        SendEncryptedMultiMediaInternal(chat, message, MTProtoService, CacheService);\r\n                    }\r\n                    else\r\n                    {\r\n                        var chat17 = Chat as TLEncryptedChat17;\r\n                        if (chat17 == null) return;\r\n\r\n                        var messages = new List<Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>>();\r\n                        foreach (var item in mediaGroup.Group)\r\n                        {\r\n                            var item73 = item as TLDecryptedMessage73;\r\n                            if (item73 == null) return;\r\n\r\n                            item73.Media.UploadingProgress = 0.001;\r\n                            var decryptedMessageLayer17 = TLUtils.GetDecryptedMessageLayer(chat17.Layer, new TLInt(-1), new TLInt(-1), item);\r\n                            messages.Add(new Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>(item, decryptedMessageLayer17));\r\n                        }\r\n\r\n                        IoC.Get<IUploadService>().AddGroup(message);\r\n                        UploadPhotoInternal(messages);\r\n                    }\r\n                }\r\n                else if (message.Media is TLDecryptedMessageMediaPhoto)\r\n                {\r\n                    UploadPhotoInternal(null, obj);\r\n                }\r\n                else if (message.Media is TLDecryptedMessageMediaVideo)\r\n                {\r\n                    SendVideoInternal(null, obj);\r\n                }\r\n                else if (message.Media is TLDecryptedMessageMediaDocument)\r\n                {\r\n                    if (message.IsVoice())\r\n                    {\r\n#if WP8\r\n                        SendAudioInternal(obj);\r\n#endif\r\n                    }\r\n                    else if (message.IsVideo())\r\n                    {\r\n#if WP8\r\n                        SendVideoInternal(null, obj);\r\n#endif\r\n                    }\r\n                    else\r\n                    {\r\n#if WP81\r\n                        var file = await GetStorageFile(message.Media);\r\n\r\n                        if (file != null)\r\n                        {\r\n                            SendDocumentInternal(file, message);\r\n                        }\r\n                        else\r\n                        {\r\n                            MessageBox.Show(AppResources.UnableToAccessDocument, AppResources.Error, MessageBoxButton.OK);\r\n                            message.Status = MessageStatus.Failed;\r\n                            DeleteMessage(false, message);\r\n                            return;\r\n                        }\r\n#else\r\n                        SendDocumentInternal(null, message);\r\n#endif\r\n                    }\r\n                }\r\n                else if (message.Media is TLDecryptedMessageMediaAudio)\r\n                {\r\n#if WP8\r\n                    SendAudioInternal(obj);\r\n#endif\r\n                }\r\n                else if (message.Media is TLDecryptedMessageMediaGeoPoint)\r\n                {\r\n                    SendEncrypted(chat, obj, MTProtoService, CacheService);\r\n                }\r\n                else if (message.Media is TLDecryptedMessageMediaContact)\r\n                {\r\n\r\n                }\r\n            }\r\n\r\n            message.NotifyOfPropertyChange(() => message.Status);\r\n        }\r\n\r\n        public TLDecryptedMessageBase FindGroupedMessage(TLDecryptedMessage73 message73)\r\n        {\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var m = Items[i] as TLDecryptedMessage73;\r\n                if (m != null)\r\n                {\r\n                    var mGroup = m.Media as TLDecryptedMessageMediaGroup;\r\n                    if (mGroup != null)\r\n                    {\r\n                        for (var j = 0; j < mGroup.Group.Count; j++)\r\n                        {\r\n                            if (mGroup.Group[j] == message73)\r\n                            {\r\n                                return m;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public void ChangeSelection(TLDecryptedMessageBase messageBase)\r\n        {\r\n            if (messageBase == null) return;\r\n\r\n            messageBase.IsSelected = !messageBase.IsSelected;\r\n\r\n            var message = messageBase as TLDecryptedMessage73;\r\n            if (message != null && message.GroupedId != null)\r\n            {\r\n                var mediaGroup = message.Media as TLDecryptedMessageMediaGroup;\r\n                if (mediaGroup != null)\r\n                {\r\n                    foreach (var m in mediaGroup.Group)\r\n                    {\r\n                        m.IsSelected = messageBase.IsSelected;\r\n                    }\r\n                }\r\n            }\r\n\r\n            NotifyOfPropertyChange(() => IsGroupActionEnabled);\r\n        }\r\n\r\n        private void RemoveMessages(IList<TLDecryptedMessageBase> messages)\r\n        {\r\n            var group = new Dictionary<long, TLDecryptedMessageMediaGroup>();\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                if (messages[i].Status == MessageStatus.Sending)\r\n                {\r\n                    messages[i].Status = MessageStatus.Failed;\r\n                    CancelUploading(messages[i]);\r\n                }\r\n\r\n                for (var j = 0; j < Items.Count; j++)\r\n                {\r\n                    if (Items[j] == messages[i])\r\n                    {\r\n                        Items.RemoveAt(j);\r\n                        break;\r\n                    }\r\n\r\n                    var message73 = Items[j] as TLDecryptedMessage73;\r\n                    if (message73 != null && message73.GroupedId != null)\r\n                    {\r\n                        var mediaGroup = message73.Media as TLDecryptedMessageMediaGroup;\r\n                        if (mediaGroup != null)\r\n                        {\r\n                            for (var k = 0; k < mediaGroup.Group.Count; k++)\r\n                            {\r\n                                if (mediaGroup.Group[k] == messages[i])\r\n                                {\r\n                                    mediaGroup.Group.RemoveAt(k);\r\n                                    if (mediaGroup.Group.Count == 0)\r\n                                    {\r\n                                        Items.Remove(message73);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        group[message73.GroupedId.Value] = mediaGroup;\r\n                                    }\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            foreach (var mediaGroup in group.Values)\r\n            {\r\n                mediaGroup.RaiseCalculate();\r\n            }\r\n        }\r\n\r\n        private void DeleteMessagesWithCallback(bool confirmation, IList<TLDecryptedMessageBase> messages, System.Action callback = null)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            var items = new List<TLDecryptedMessageBase>();\r\n            var localItems = new List<TLDecryptedMessageBase>();\r\n            var remoteItems = new List<TLDecryptedMessageBase>();\r\n\r\n            foreach (var item in messages)\r\n            {\r\n                items.Add(item);\r\n\r\n                if (item.Status == MessageStatus.Sending\r\n                    || item.Status == MessageStatus.Failed)\r\n                {\r\n                    localItems.Add(item);\r\n                }\r\n                else\r\n                {\r\n                    remoteItems.Add(item);\r\n                }\r\n            }\r\n\r\n            if (localItems.Count > 0 || remoteItems.Count > 0)\r\n            {\r\n                IsSelectionEnabled = false;\r\n            }\r\n\r\n            var totalCount = localItems.Count + remoteItems.Count;\r\n\r\n            IsDeleteConfirmed(confirmation, totalCount, localItems, remoteItems, revoke =>\r\n            {\r\n                if (remoteItems.Count > 0)\r\n                {\r\n                    var messageId = new TLVector<TLLong> { Items = remoteItems.Select(x => x.RandomId).ToList() };\r\n\r\n                    var action = new TLDecryptedMessageActionDeleteMessages { RandomIds = messageId };\r\n\r\n                    var decryptedTuple = GetDecryptedServiceMessageAndObject(action, chat, MTProtoService.CurrentUserId, CacheService);\r\n#if DEBUG\r\n                    Execute.BeginOnUIThread(() => Items.Insert(0, decryptedTuple.Item1));\r\n#endif\r\n                    SendEncryptedService(chat, decryptedTuple.Item2, MTProtoService, CacheService,\r\n                        result => BeginOnUIThread(() =>\r\n                        {\r\n                            RemoveMessages(items);\r\n\r\n                            NotifyOfPropertyChange(() => DescriptionVisibility);\r\n                            CacheService.DeleteDecryptedMessages(new TLVector<TLLong>(items.Select(x => x.RandomId).ToList()));\r\n                            callback.SafeInvoke();\r\n                        }));\r\n                }\r\n                else\r\n                {\r\n                    RemoveMessages(items);\r\n\r\n                    NotifyOfPropertyChange(() => DescriptionVisibility);\r\n                    CacheService.DeleteDecryptedMessages(new TLVector<TLLong>(items.Select(x => x.RandomId).ToList()));\r\n                    callback.SafeInvoke();\r\n                }\r\n            });\r\n        }\r\n\r\n        public void DeleteMessages()\r\n        {\r\n            var messages = UngroupEnumerator(Items).Where(x => x.IsSelected).ToList();\r\n\r\n            DeleteMessagesWithCallback(true, messages);\r\n        }\r\n\r\n        public void DeleteMessage(bool confirmation, TLObject obj)\r\n        {\r\n            DeleteMessageWithCallback(confirmation, obj);\r\n        }\r\n\r\n        public void DeleteMessageWithCallback(bool confirmation, TLObject obj, System.Action callback = null)\r\n        {\r\n            var mediaPhoto = obj as TLDecryptedMessageMediaPhoto;\r\n            if (mediaPhoto != null)\r\n            {\r\n                var mediaMessage = UngroupEnumerator(Items).OfType<TLDecryptedMessage>().FirstOrDefault(x => x.Media == mediaPhoto);\r\n                if (mediaMessage == null) return;\r\n\r\n                DeleteMessagesWithCallback(confirmation, new List<TLDecryptedMessageBase> { mediaMessage }, callback);\r\n            }\r\n\r\n            var message = obj as TLDecryptedMessage;\r\n            if (message != null)\r\n            {\r\n                DeleteMessagesWithCallback(confirmation, new List<TLDecryptedMessageBase> { message }, callback);\r\n            }\r\n        }\r\n\r\n        public void IsDeleteConfirmed(bool confirmation, int totalCount, IList<TLDecryptedMessageBase> localMessages, IList<TLDecryptedMessageBase> remoteMessages, Action<bool> callback)\r\n        {\r\n            if (!confirmation)\r\n            {\r\n                callback.SafeInvoke(true);\r\n                return;\r\n            }\r\n\r\n            if (totalCount == 0) return;\r\n            TLDecryptedMessageBase m = null;\r\n            if (localMessages != null && localMessages.Count > 0)\r\n            {\r\n                m = localMessages.FirstOrDefault();\r\n            }\r\n            if (m == null && remoteMessages != null && remoteMessages.Count > 0)\r\n            {\r\n                m = remoteMessages.FirstOrDefault();\r\n            }\r\n            if (m == null) return;\r\n\r\n            var message = totalCount == 1\r\n                ? AppResources.DeleteMessageConfirmation\r\n                : string.Format(AppResources.DeleteMessagesConfirmation, Utils.Language.Declension(\r\n                    totalCount,\r\n                    AppResources.MessageNominativeSingular,\r\n                    AppResources.MessageNominativePlural,\r\n                    AppResources.MessageGenitiveSingular,\r\n                    AppResources.MessageGenitivePlural))\r\n                    .ToLower(CultureInfo.CurrentUICulture);\r\n\r\n            ShellViewModel.ShowCustomMessageBox(message, AppResources.Confirm,\r\n                AppResources.Delete.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                        {\r\n                            callback.SafeInvoke(true);\r\n                        });\r\n                    }\r\n                });\r\n        }\r\n\r\n        private int InsertMessageInOrder(TLDecryptedMessageBase message)\r\n        {\r\n            if (Chat != null && Chat.MessageTTL != null)\r\n            {\r\n                message.TTL = Chat.MessageTTL;\r\n            }\r\n\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (Items[i].DateIndex == message.DateIndex\r\n                    && Items[i].QtsIndex == message.QtsIndex\r\n                    && Items[i].RandomIndex == message.RandomIndex)\r\n                {\r\n                    return -1;\r\n                }\r\n\r\n                if (Items[i].DateIndex < message.DateIndex)\r\n                {\r\n                    Items.Insert(i, message);\r\n                    return i;\r\n                }\r\n\r\n                if (Items[i].QtsIndex < message.QtsIndex)\r\n                {\r\n                    Items.Insert(i, message);\r\n                    return i;\r\n                }\r\n            }\r\n\r\n            Items.Add(message);\r\n            return Items.Count - 1;\r\n        }\r\n\r\n        private Typing GetTyping(IList<Telegram.Api.WindowsPhone.Tuple<int, TLSendMessageActionBase>> typingUsers)\r\n        {\r\n            return DialogsViewModel.GetTyping(TLUtils.InputPeerToPeer(With.ToInputPeer(), StateService.CurrentUserId), typingUsers, CacheService.GetUser, null);\r\n        }\r\n\r\n        private string GetSubtitle(TLUserBase user)\r\n        {\r\n            Typing = null;\r\n\r\n            return DialogDetailsViewModel.GetUserStatus(user);\r\n        }\r\n\r\n        public void OpenMediaContact(TLUserBase user, TLString phone)\r\n        {\r\n            if (user == null) return;\r\n\r\n            StateService.CurrentContact = user;\r\n            StateService.CurrentContactPhone = phone;\r\n            NavigationService.UriFor<ContactViewModel>().Navigate();\r\n        }\r\n\r\n        public void OnNavigatedTo()\r\n        {\r\n            _isActive = true;\r\n            StateService.ActiveDialog = Chat;\r\n        }\r\n\r\n        public void OnNavigatedFrom()\r\n        {\r\n            _isActive = false;\r\n            StateService.ActiveDialog = null;\r\n        }\r\n\r\n        private InputTypingManager _inputTypingManager;\r\n\r\n        public InputTypingManager InputTypingManager\r\n        {\r\n            get\r\n            {\r\n                return _inputTypingManager =\r\n                    _inputTypingManager ??\r\n                    new InputTypingManager(\r\n                        users =>\r\n                        {\r\n                            var typing = GetTyping(users);\r\n                            Subtitle = typing != null ? typing.ToString() : null;\r\n                            NotifyOfPropertyChange(() => Subtitle);\r\n                            Typing = typing;\r\n                        },\r\n                        () =>\r\n                        {\r\n                            Subtitle = GetSubtitle(With);\r\n                            NotifyOfPropertyChange(() => Subtitle);\r\n                        });\r\n            }\r\n        }\r\n\r\n        private OutputTypingManager _textTypingManager;\r\n\r\n        public OutputTypingManager TextTypingManager\r\n        {\r\n            get\r\n            {\r\n                return _textTypingManager =\r\n                    _textTypingManager ??\r\n                    new OutputTypingManager(With.ToInputPeer(), Constants.SetTypingIntervalInSeconds,\r\n                        action => SetTypingInternal(TLBool.True),\r\n                        () => SetTypingInternal(TLBool.False));\r\n            }\r\n        }\r\n\r\n        public void OpenStickerSettings()\r\n        {\r\n            NavigationService.UriFor<StickersViewModel>().Navigate();\r\n        }\r\n\r\n        private void InsertSendingMessage(TLDecryptedMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLDecryptedMessage45;\r\n            if (message != null)\r\n            {\r\n                if (Reply != null)\r\n                {\r\n                    if (Reply.RandomIndex != 0)\r\n                    {\r\n                        message.ReplyToRandomMsgId = Reply.RandomId;\r\n                        message.Reply = Reply;\r\n                    }\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        Reply = null;\r\n                    });\r\n                }\r\n            }\r\n\r\n            Items.Insert(0, messageBase);\r\n        }\r\n\r\n        public bool StartGifPlayers { get; set; }\r\n\r\n        private void ReadMessageContents(TLDecryptedMessage45 message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            if (message.RandomIndex != 0 && !message.Out.Value && message.NotListened)\r\n            {\r\n                var chat = Chat as TLEncryptedChat;\r\n                if (chat == null) return;\r\n\r\n                var messageId = new TLVector<TLLong> { message.RandomId };\r\n\r\n                var action = new TLDecryptedMessageActionReadMessages { RandomIds = messageId };\r\n\r\n                var decryptedTuple = GetDecryptedServiceMessageAndObject(action, chat, MTProtoService.CurrentUserId, CacheService);\r\n\r\n#if DEBUG\r\n                Execute.BeginOnUIThread(() => Items.Insert(0, decryptedTuple.Item1));\r\n#endif\r\n                SendEncryptedService(chat, decryptedTuple.Item2, MTProtoService, CacheService,\r\n                    result =>\r\n                    {\r\n                        message.SetListened();\r\n                        message.Media.NotListened = false;\r\n                        message.Media.NotifyOfPropertyChange(() => message.Media.NotListened);\r\n\r\n                        CacheService.Commit();\r\n                    });\r\n            }\r\n        }\r\n\r\n        public static IEnumerable<TLDecryptedMessageBase> UngroupEnumerator(IEnumerable<TLDecryptedMessageBase> source)\r\n        {\r\n            foreach (var messageBase in source)\r\n            {\r\n                var message = messageBase as TLDecryptedMessage73;\r\n                if (message != null && message.GroupedId != null)\r\n                {\r\n                    var mediaGroup = message.Media as TLDecryptedMessageMediaGroup;\r\n                    if (mediaGroup != null)\r\n                    {\r\n                        for (var i = mediaGroup.Group.Count - 1; i >= 0; i--)\r\n                        {\r\n                            yield return mediaGroup.Group[i];\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        yield return messageBase;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    yield return messageBase;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/StickerHintsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.ObjectModel;\r\nusing TelegramClient.Views.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class StickerHintsViewModel\r\n    {\r\n        public ObservableCollection<TLStickerItem> Hints { get; protected set; }\r\n\r\n        public StickerHintsViewModel()\r\n        {\r\n            Hints = new ObservableCollection<TLStickerItem>();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/UserActionViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class UserActionViewModel : TelegramPropertyChangedBase\r\n    {\r\n        public TLUserBase User { get; protected set; }\r\n\r\n        public UserActionViewModel(TLUserBase user)\r\n        {\r\n            User = user;\r\n        }\r\n\r\n        public static bool IsRequired(TLObject obj)\r\n        {\r\n            var userBase = obj as TLUserBase;\r\n\r\n            return \r\n                userBase != null\r\n                && userBase.IsRequest\r\n                && !userBase.RemoveUserAction && userBase.Index != Constants.TelegramNotificationsId;\r\n        }\r\n\r\n        public void SetUser(TLUserBase user)\r\n        {\r\n            User = user;\r\n            NotifyOfPropertyChange(() => User);\r\n        }\r\n\r\n        public event EventHandler InvokeUserAction;\r\n\r\n        protected virtual void RaiseInvokeUserAction()\r\n        {\r\n            var handler = InvokeUserAction;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler InvokeUserAction2;\r\n\r\n        protected virtual void RaiseInvokeUserAction2()\r\n        {\r\n            var handler = InvokeUserAction2;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public void Invoke()\r\n        {\r\n            RaiseInvokeUserAction();\r\n        }\r\n\r\n        public void Invoke2()\r\n        {\r\n            RaiseInvokeUserAction2();\r\n        }\r\n\r\n        public void Remove()\r\n        {\r\n            if (User == null) return;\r\n\r\n            User.RemoveUserAction = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Dialogs/UsernameHintsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.ObjectModel;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class UsernameHintsViewModel\r\n    {\r\n        public ObservableCollection<TLUserBase> Hints { get; protected set; }\r\n\r\n        public UsernameHintsViewModel()\r\n        {\r\n            Hints = new ObservableCollection<TLUserBase>();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/ItemDetailsViewModelBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels\r\n{\r\n    public abstract class ItemDetailsViewModelBase : ViewModelBase\r\n    {\r\n        private TLObject _currentItem;\r\n\r\n        public TLObject CurrentItem\r\n        {\r\n            get { return _currentItem; }\r\n            set { SetField(ref _currentItem, value, () => CurrentItem); }\r\n        }\r\n\r\n        protected ItemDetailsViewModelBase(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/ItemsViewModelBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels\r\n{\r\n    public abstract class ItemsViewModelBase : ViewModelBase\r\n    {\r\n        private string _status;\r\n\r\n        public string Status\r\n        {\r\n            get { return _status; }\r\n            set { SetField(ref _status, value, () => Status); }\r\n        }\r\n\r\n        private bool _isScrolling;\r\n\r\n        public bool IsScrolling\r\n        {\r\n            get { return _isScrolling; }\r\n            set { SetField(ref _isScrolling, value, () => IsScrolling); }\r\n        }\r\n\r\n        private bool _isLastSliceLoaded;\r\n\r\n        protected bool IsLastSliceLoaded\r\n        {\r\n            get { return _isLastSliceLoaded; }\r\n            set { _isLastSliceLoaded = value; }\r\n        }\r\n\r\n        protected ItemsViewModelBase(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n\r\n        }\r\n\r\n        protected virtual void OnPopulateCompleted()\r\n        {\r\n        \r\n        }\r\n\r\n        protected virtual void OnPopulateItemCompleted(object item)\r\n        {\r\n\r\n        }\r\n\r\n        public virtual void RefreshItems()\r\n        {\r\n\r\n        }\r\n    }\r\n\r\n    public abstract class ItemsViewModelBase<T> : ItemsViewModelBase\r\n    {\r\n\r\n\r\n        #region Private fields\r\n\r\n        private T _selectedItem;\r\n\r\n        protected readonly ObservableCollection<T> LazyItems = new ObservableCollection<T>();\r\n        #endregion\r\n\r\n        #region Protected fields\r\n\r\n        #endregion\r\n\r\n        #region Public fields\r\n\r\n        public ObservableCollection<T> Items { get; protected set; }\r\n\r\n        public T SelectedItem\r\n        {\r\n            get { return _selectedItem; }\r\n            set { SetField(ref _selectedItem, value, () => SelectedItem); }\r\n        }\r\n        #endregion\r\n\r\n        private bool _populateToBegin;\r\n\r\n        #region Constructor\r\n        protected ItemsViewModelBase(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Items = new BindableCollection<T>();\r\n            _timer.Tick += (s, e) =>\r\n            {\r\n                /*if (IsScrolling)\r\n                {\r\n                    _timer.Stop();\r\n                    return;\r\n                }*/\r\n\r\n                if (LazyItems.Count <= 0)\r\n                {\r\n\r\n                    _populateToBegin = false;\r\n                    _timer.Stop();\r\n                    //OnPopulateCompleted();\r\n                    return;\r\n                }\r\n\r\n                var addedItem = LazyItems.FirstOrDefault();\r\n                if (addedItem != null)\r\n                {\r\n                    if (_populateToBegin)\r\n                    {\r\n                        Items.Insert(0, addedItem);\r\n                    }\r\n                    else\r\n                    {\r\n                        Items.Add(addedItem);\r\n                    }\r\n                    OnPopulateItemCompleted(addedItem);\r\n                    LazyItems.RemoveAt(0);\r\n                }\r\n                addedItem = LazyItems.FirstOrDefault();\r\n                if (addedItem != null)\r\n                {\r\n                    if (_populateToBegin)\r\n                    {\r\n                        Items.Insert(0, addedItem);\r\n                    }\r\n                    else\r\n                    {\r\n                        Items.Add(addedItem);\r\n                    }\r\n                    OnPopulateItemCompleted(addedItem);\r\n                    LazyItems.RemoveAt(0);\r\n                }\r\n                \r\n                if (LazyItems.Count <= 0)\r\n                {\r\n                    _populateToBegin = false;\r\n                    _timer.Stop();\r\n                    OnPopulateCompleted();\r\n                }\r\n            };\r\n        }\r\n        #endregion\r\n\r\n        private readonly DispatcherTimer _timer = new DispatcherTimer { Interval = TimeSpan.FromTicks(20) };\r\n\r\n        protected void PopulateItems()\r\n        {\r\n            _timer.Start();       \r\n        }\r\n\r\n        protected void PopulateItems(System.Action callback)\r\n        {\r\n            _populateCallback = callback;\r\n            _timer.Start();\r\n        }\r\n\r\n        private System.Action _populateCallback;\r\n\r\n        protected override void OnPopulateCompleted()\r\n        {\r\n            if (_populateCallback != null)\r\n            {\r\n                var action = _populateCallback;\r\n                _populateCallback = null;\r\n                action();\r\n            }\r\n\r\n            base.OnPopulateCompleted();\r\n        }\r\n\r\n        protected void PopulateItemsToBegin()\r\n        {\r\n            _populateToBegin = true;\r\n            _timer.Start();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/AnimatedImageViewerViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO.IsolatedStorage;\r\nusing Caliburn.Micro;\r\nusing ImageTools;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class AnimatedImageViewerViewModel : TelegramPropertyChangedBase\r\n    {\r\n\r\n        public string ImageSource { get; protected set; }\r\n\r\n        public TLMessage CurrentItem { get; protected set; }\r\n\r\n        public IStateService StateService { get; protected set; }\r\n\r\n        public AnimatedImageViewerViewModel(IStateService stateService)\r\n        {\r\n            StateService = stateService;\r\n        }\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen { get { return _isOpen; } }\r\n\r\n        public event EventHandler Open;\r\n\r\n        protected virtual void RaiseOpen()\r\n        {\r\n            var handler = Open;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public void OpenViewer()\r\n        {\r\n            CurrentItem = StateService.CurrentPhotoMessage;\r\n            _isOpen = CurrentItem != null;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n\r\n            StateService.CurrentPhotoMessage = null;\r\n            StateService.ExtendedImage = null;\r\n\r\n            if (CurrentItem != null)\r\n            {\r\n                var mediaDocument = CurrentItem.Media as TLMessageMediaDocument;\r\n                if (mediaDocument != null)\r\n                {\r\n                    var document = mediaDocument.Document as TLDocument;\r\n                    if (document != null)\r\n                    {\r\n                        if (string.Equals(document.MimeType.ToString(), \"image/gif\", StringComparison.OrdinalIgnoreCase))\r\n                        {\r\n                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                var fileName = document.GetFileName();\r\n                                if (store.FileExists(fileName))\r\n                                {\r\n                                    ImageSource = fileName;\r\n                                    NotifyOfPropertyChange(() => ImageSource);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n\r\n            RaiseOpen();\r\n        }\r\n\r\n        public event EventHandler Close;\r\n\r\n        protected virtual void RaiseClose()\r\n        {\r\n            var handler = Close;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n\r\n        public void CloseViewer()\r\n        {\r\n            ImageSource = null;\r\n            _isOpen = false;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n            NotifyOfPropertyChange(() => ImageSource);\r\n\r\n            //RaiseClose();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/DecryptedImageViewerViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Windows.ApplicationModel.DataTransfer;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Microsoft.Xna.Framework.Media;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\n#if WP8\r\nusing Windows.Storage;\r\nusing Windows.Storage.Streams;\r\nusing Microsoft.Xna.Framework.Media.PhoneExtensions;\r\n#endif\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class DecryptedImageViewerViewModel : ViewAware\r\n    {\r\n        public bool IsInputTTL\r\n        {\r\n            get\r\n            {\r\n                var message = CurrentItem as TLDecryptedMessage;\r\n                return message != null && !message.Out.Value && message.TTL.Value > 0;\r\n            }\r\n        }\r\n\r\n        private IList<TLDecryptedMessage> _items = new List<TLDecryptedMessage>();\r\n\r\n        private int _currentIndex;\r\n\r\n        private TLDecryptedMessageBase _previousItem;\r\n\r\n        public TLDecryptedMessageBase PreviousItem\r\n        {\r\n            get { return _previousItem; }\r\n            set\r\n            {\r\n                _previousItem = value;\r\n            }\r\n        }\r\n\r\n        private TLDecryptedMessageBase _currentItem;\r\n\r\n        public TLDecryptedMessageBase CurrentItem\r\n        {\r\n            get { return _currentItem; }\r\n            set\r\n            {\r\n                if (_currentItem != value)\r\n                {\r\n                    _currentItem = value;\r\n                    NotifyOfPropertyChange(() => CurrentItem);\r\n                    NotifyOfPropertyChange(() => IsInputTTL);\r\n                    NotifyOfPropertyChange(() => Title);\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLDecryptedMessageBase _nextItem;\r\n\r\n        public TLDecryptedMessageBase NextItem\r\n        {\r\n            get { return _nextItem; }\r\n            set\r\n            {\r\n                _nextItem = value;\r\n            }\r\n        }\r\n\r\n        public BindableCollection<TLDecryptedMessageBase> GroupedItems { get; set; }\r\n\r\n        public string Title\r\n        {\r\n            get\r\n            {\r\n                var message = CurrentItem as TLDecryptedMessage;\r\n                if (message != null && message.TTL.Value > 0)\r\n                {\r\n                    if (message.Media is TLDecryptedMessageMediaPhoto)\r\n                    {\r\n                        return AppResources.SecretPhoto;\r\n                    }\r\n                    if (message.Media is TLDecryptedMessageMediaVideo || message.IsVideo())\r\n                    {\r\n                        return AppResources.SecretVideo;\r\n                    }\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public IStateService StateService { get; protected set; }\r\n\r\n        public bool ShowOpenMediaListButton { get; protected set; }\r\n\r\n        public SecretDialogDetailsViewModel DialogDetails { get; set; }\r\n\r\n        public DecryptedImageViewerViewModel(IStateService stateService, bool showMediaButton = false)\r\n        {\r\n            StateService = stateService;\r\n\r\n            ShowOpenMediaListButton = showMediaButton;\r\n            GroupedItems = new BindableCollection<TLDecryptedMessageBase>();\r\n        }\r\n\r\n        public void Delete()\r\n        {\r\n            if (CurrentItem == null) return;\r\n            if (DialogDetails == null) return;\r\n\r\n            var currentItem = CurrentItem;\r\n            DialogDetails.DeleteMessageWithCallback(true, (TLDecryptedMessage) CurrentItem,\r\n                () => Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.1), () =>\r\n                {\r\n                    if (CanSlideRight)\r\n                    {\r\n                        var view = GetView() as DecryptedImageViewerView;\r\n                        if (view != null)\r\n                        {\r\n                            _items.RemoveAt(_currentIndex--);\r\n                            view.SlideRight(0.0, () =>\r\n                            {\r\n                                view.SetControlContent(2, NextItem);\r\n                                GroupedItems.Remove(currentItem);\r\n                            });\r\n                        }\r\n                    }\r\n                    else if (CanSlideLeft)\r\n                    {\r\n                        var view = GetView() as DecryptedImageViewerView;\r\n                        if (view != null)\r\n                        {\r\n                            _items.RemoveAt(_currentIndex);\r\n                            view.SlideLeft(0.0, () =>\r\n                            {\r\n                                view.SetControlContent(0, PreviousItem);\r\n                                GroupedItems.Remove(currentItem);\r\n                            });\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), CloseViewer);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public void Forward()\r\n        {\r\n            if (CurrentItem == null) return;\r\n            if (DialogDetails == null) return;\r\n\r\n            //SecretDialogDetails.ForwardMessage(CurrentItem);\r\n        }\r\n\r\n        public void OpenMediaDetails()\r\n        {\r\n            if (DialogDetails == null) return;\r\n\r\n            StateService.MediaTab = true;\r\n            StateService.CurrentDecryptedMediaMessages = _items;\r\n            DialogDetails.OpenPeerDetails();\r\n        }\r\n\r\n#if DEBUG\r\n        //~ImageViewerViewModel()\r\n        //{\r\n        //    TLUtils.WritePerformance(\"++ImageViewerVM dstr\");\r\n        //}\r\n#endif\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen { get { return _isOpen; } }\r\n\r\n        public event EventHandler Open;\r\n\r\n        protected virtual void RaiseOpen()\r\n        {\r\n            EventHandler handler = Open;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public void OpenViewer()\r\n        {\r\n            CurrentItem = StateService.CurrentDecryptedPhotoMessage;\r\n            _items = StateService.CurrentDecryptedMediaMessages;\r\n            if (_items != null)\r\n            {\r\n                _currentIndex = _items.IndexOf(StateService.CurrentDecryptedPhotoMessage);\r\n                PreviousItem = _currentIndex + 1 < _items.Count ? _items[_currentIndex + 1] : null;\r\n                NextItem = _currentIndex > 0 ? _items[_currentIndex - 1] : null;\r\n\r\n                CreateGroupedItems(CurrentItem);\r\n            }\r\n            else\r\n            {\r\n                _currentIndex = -1;\r\n                PreviousItem = null;\r\n                NextItem = null;\r\n                GroupedItems.Clear();\r\n            }\r\n\r\n            _isOpen = CurrentItem != null;\r\n            NotifyOfPropertyChange(() => CurrentItem);\r\n            NotifyOfPropertyChange(() => PreviousItem);\r\n            NotifyOfPropertyChange(() => NextItem);\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n            NotifyOfPropertyChange(() => CanZoom);\r\n\r\n            StateService.CurrentDecryptedPhotoMessage = null;\r\n            StateService.CurrentDecryptedMediaMessages = null;\r\n\r\n            RaiseOpen();\r\n        }\r\n\r\n        private void CreateGroupedItems(TLDecryptedMessageBase currentItem)\r\n        {\r\n            var message73 = currentItem as TLDecryptedMessage73;\r\n            if (message73 != null && message73.GroupedId != null)\r\n            {\r\n                var firstItem = GroupedItems.FirstOrDefault() as TLDecryptedMessage73;\r\n                if (firstItem == null\r\n                    || (firstItem.GroupedId != null\r\n                        && firstItem.GroupedId.Value != message73.GroupedId.Value))\r\n                {\r\n                    var items = new List<TLDecryptedMessageBase>();\r\n                    for (var i = _items.Count - 1; i >= 0; i--)\r\n                    {\r\n                        var item = _items[i] as TLDecryptedMessage73;\r\n                        if (item != null\r\n                            && item.GroupedId != null\r\n                            && item.GroupedId.Value == message73.GroupedId.Value)\r\n                        {\r\n                            items.Add(item);\r\n                        }\r\n                    }\r\n\r\n                    GroupedItems.IsNotifying = false;\r\n                    GroupedItems.Clear();\r\n                    if (items.Count > 1)\r\n                    {\r\n                        foreach (var item in items)\r\n                        {\r\n                            GroupedItems.Add(item);\r\n                        }\r\n                    }\r\n                    GroupedItems.IsNotifying = true;\r\n                    GroupedItems.Refresh();\r\n                    var view = GetView() as DecryptedImageViewerView;\r\n                    if (view != null)\r\n                    {\r\n                        view.ScrollTo(currentItem, 0.0);\r\n                    }\r\n                }\r\n                else if (firstItem.GroupedId != null\r\n                    && firstItem.GroupedId.Value == message73.GroupedId.Value)\r\n                {\r\n                    var view = GetView() as DecryptedImageViewerView;\r\n                    if (view != null)\r\n                    {\r\n                        view.ScrollTo(currentItem, 0.0);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    GroupedItems.Clear();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                GroupedItems.Clear();\r\n            }\r\n        }\r\n\r\n        public event EventHandler Close;\r\n\r\n        protected virtual void RaiseClose()\r\n        {\r\n            EventHandler handler = Close;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n\r\n        public void CloseViewer()\r\n        {\r\n            _isOpen = false;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n\r\n            RaiseClose();\r\n        }\r\n\r\n        private static void SavePhotoAsync(TLDecryptedMessageMediaPhoto mediaPhoto, Action<string> callback = null)\r\n        {\r\n            var location = mediaPhoto.Photo as TLEncryptedFile;\r\n            if (location == null) return;\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                location.Id,\r\n                location.DCId,\r\n                location.AccessHash);\r\n\r\n            Execute.BeginOnThreadPool(() => ImageViewerViewModel.SavePhoto(fileName, callback));\r\n        }\r\n\r\n        private static void SaveVideoAsync(TLDecryptedMessageMediaBase mediaBase)\r\n        {\r\n            var mediaDocument = mediaBase as TLDecryptedMessageMediaDocument45;\r\n            if (mediaDocument != null && TLDecryptedMessageBase.IsVideo(mediaDocument))\r\n            {\r\n                var fileLocation = mediaDocument.File as TLEncryptedFile;\r\n                if (fileLocation == null) return;\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.mp4\",\r\n                    fileLocation.Id,\r\n                    fileLocation.DCId,\r\n                    fileLocation.AccessHash);\r\n\r\n                Execute.BeginOnThreadPool(() => ImageViewerViewModel.SaveVideo(fileName));\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaVideo = mediaBase as TLDecryptedMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                var fileLocation = mediaVideo.File as TLEncryptedFile;\r\n                if (fileLocation == null) return;\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.mp4\",\r\n                    fileLocation.Id,\r\n                    fileLocation.DCId,\r\n                    fileLocation.AccessHash);\r\n\r\n                Execute.BeginOnThreadPool(() => ImageViewerViewModel.SaveVideo(fileName));\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n#if WP8\r\n        public void Save()\r\n        {\r\n            var message = CurrentItem as TLDecryptedMessage;\r\n            if (message == null) return;\r\n\r\n            var mediaPhoto = message.Media as TLDecryptedMessageMediaPhoto;\r\n            if (mediaPhoto != null)\r\n            {\r\n                SavePhotoAsync(mediaPhoto);\r\n                return;\r\n            }\r\n\r\n            var mediaDocument = message.Media as TLDecryptedMessageMediaDocument45;\r\n            if (mediaDocument != null && message.IsVideo())\r\n            {\r\n                SaveVideoAsync(mediaDocument);\r\n                return;\r\n            }\r\n\r\n            var mediaVideo = message.Media as TLDecryptedMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                SaveVideoAsync(mediaVideo);\r\n                return;\r\n            }\r\n        }\r\n#else\r\n        public void Save()\r\n        {\r\n\r\n        }\r\n#endif\r\n\r\n        public void Share()\r\n        {\r\n#if WP8\r\n            var message = CurrentItem as TLDecryptedMessage;\r\n            if (message == null) return;\r\n\r\n            var mediaPhoto = message.Media as TLDecryptedMessageMediaPhoto;\r\n            if (mediaPhoto != null)\r\n            {\r\n                var location = mediaPhoto.Photo as TLEncryptedFile;\r\n                if (location == null) return;\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                    location.Id,\r\n                    location.DCId,\r\n                    location.AccessHash);\r\n\r\n                var dataTransferManager = DataTransferManager.GetForCurrentView();\r\n                dataTransferManager.DataRequested += (o, args) =>\r\n                {\r\n                    var request = args.Request;\r\n\r\n                    request.Data.Properties.Title = \"media\";\r\n                    request.Data.Properties.ApplicationName = \"Telegram Messenger\";\r\n\r\n                    var deferral = request.GetDeferral();\r\n\r\n                    try\r\n                    {\r\n                        var fileToShare = FileUtils.GetLocalFile(fileName);//this.GetImageFileAsync(\"Sample.jpg\");\r\n                        if (fileToShare == null) return;\r\n                        //var storageFileToShare = await this.GetStorageFileForImageAsync(\"Sample.jpg\");\r\n\r\n                        //request.Data.Properties.Thumbnail = RandomAccessStreamReference.CreateFromStream(fileToShare);\r\n                        //request.Data.SetBitmap(RandomAccessStreamReference.CreateFromStream(fileToShare));\r\n\r\n\r\n                        // On Windows Phone, share StorageFile instead of Bitmaps\r\n                        request.Data.SetStorageItems(new List<StorageFile> { fileToShare });\r\n                    }\r\n                    finally\r\n                    {\r\n                        deferral.Complete();\r\n                    }\r\n                };\r\n                DataTransferManager.ShowShareUI();\r\n            }\r\n#endif\r\n        }\r\n\r\n        public bool CanZoom\r\n        {\r\n            get\r\n            {\r\n                //return true;\r\n                return CurrentItem != null && ((TLDecryptedMessage)CurrentItem).Media is TLDecryptedMessageMediaPhoto;\r\n            }\r\n        }\r\n\r\n        public bool CanSlideLeft\r\n        {\r\n            get { return _currentIndex > 0; }\r\n        }\r\n\r\n        public void SlideLeft()\r\n        {\r\n            if (!CanSlideLeft) return;\r\n\r\n            var nextItem = _items[--_currentIndex];\r\n            CurrentItem = nextItem;\r\n            PreviousItem = _currentIndex + 1 < _items.Count ? _items[_currentIndex + 1] : null;\r\n            NextItem = _currentIndex > 0 ? _items[_currentIndex - 1] : null;\r\n            NotifyOfPropertyChange(() => PreviousItem);\r\n            NotifyOfPropertyChange(() => NextItem);\r\n            NotifyOfPropertyChange(() => CanZoom);\r\n\r\n            CreateGroupedItems(CurrentItem);\r\n        }\r\n\r\n        public bool CanSlideRight\r\n        {\r\n            get { return _currentIndex < _items.Count - 1; }\r\n        }\r\n\r\n        public void SlideRight()\r\n        {\r\n            if (!CanSlideRight) return;\r\n\r\n            var nextItem = _items[++_currentIndex];\r\n            CurrentItem = nextItem;\r\n            PreviousItem = _currentIndex + 1 < _items.Count ? _items[_currentIndex + 1] : null;\r\n            NextItem = _currentIndex > 0 ? _items[_currentIndex - 1] : null;\r\n            NotifyOfPropertyChange(() => PreviousItem);\r\n            NotifyOfPropertyChange(() => NextItem);\r\n            NotifyOfPropertyChange(() => CanZoom);\r\n\r\n            CreateGroupedItems(CurrentItem);\r\n        }\r\n\r\n        public void OpenMedia()\r\n        {\r\n            var message = CurrentItem as TLDecryptedMessage;\r\n            if (message == null) return;\r\n\r\n            var mediaVideo = message.Media as TLDecryptedMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                var fileLocation = mediaVideo.File as TLEncryptedFile;\r\n                if (fileLocation == null) return;\r\n\r\n                var fileName = String.Format(\"{0}_{1}_{2}.mp4\",\r\n                    fileLocation.Id,\r\n                    fileLocation.DCId,\r\n                    fileLocation.AccessHash);\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (store.FileExists(fileName))\r\n                    {\r\n                        var launcher = new MediaPlayerLauncher();\r\n                        launcher.Location = MediaLocationType.Data;\r\n                        launcher.Media = new Uri(fileName, UriKind.Relative);\r\n                        launcher.Show();\r\n                    }\r\n                    else\r\n                    {\r\n                        mediaVideo.DownloadingProgress = 0.001;\r\n                        var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                        fileManager.DownloadFile(fileLocation, mediaVideo);\r\n\r\n                        //DownloadVideoFileManager.DownloadFileAsync(mediaVideo.ToInputFileLocation(), message, mediaVideo.Size);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var message = item.Owner as TLDecryptedMessage;\r\n            if (message != null && _items != null)\r\n            {\r\n                var messages = _items;\r\n                foreach (var m in messages)\r\n                {\r\n                    var media = m.Media as TLDecryptedMessageMediaVideo;\r\n                    if (media != null && m == item.Owner)\r\n                    {\r\n                        m.Media.DownloadingProgress = 0.0;\r\n                        //m.Media.IsoFileName = item.IsoFileName;\r\n                        //MessageBox.Show(\"Download video time: \" + _downloadVideoStopwatch.Elapsed);\r\n                        //media.NotifyOfPropertyChange(() => media.Video);\r\n                        break;\r\n                    }\r\n                }\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void CancelVideoDownloading()\r\n        {\r\n            var message = CurrentItem as TLDecryptedMessage;\r\n            if (message == null) return;\r\n\r\n            message.Media.DownloadingProgress = 0.0;\r\n            var fileManager = IoC.Get<IEncryptedFileManager>();\r\n            fileManager.CancelDownloadFile(message.Media);\r\n            //DownloadVideoFileManager.CancelDownloadFileAsync(message);\r\n        }\r\n\r\n        //public void CancelVideoDownloading()\r\n        //{\r\n        //    var message = CurrentItem as TLDecryptedMessage;\r\n        //    if (message == null) return;\r\n\r\n        //    var mediaVideo = message.Media as TLDecryptedMessageMediaVideo;\r\n        //    if (mediaVideo != null)\r\n        //    {\r\n        //        ThreadPool.QueueUserWorkItem(state =>\r\n        //        {\r\n        //            mediaVideo.DownloadingProgress = 0.0;\r\n        //            _downloadVideoFileManager.CancelDownloadFileAsync(message);\r\n        //        });\r\n        //    }\r\n        //}\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/FilesViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing TelegramClient.Helpers;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class FilesViewModel<T> : FilesViewModelBase<T> where T : IInputPeer\r\n    {\r\n        public override TLInputMessagesFilterBase InputMessageFilter\r\n        {\r\n            get { return new TLInputMessagesFilterDocument(); }\r\n        }\r\n\r\n        public string EmptyListImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    return \"/Images/Messages/file.white-WXGA.png\";\r\n                }\r\n\r\n                return \"/Images/Messages/file.black-WXGA.png\";\r\n            }\r\n        }\r\n\r\n        public FilesViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            DisplayName = LowercaseConverter.Convert(AppResources.SharedFiles);\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            Status = string.Empty;  //AppResources.Loading;\r\n            var limit = 25;\r\n            var messages = CacheService.GetHistory(TLUtils.InputPeerToPeer(CurrentItem.ToInputPeer(), StateService.CurrentUserId), limit);\r\n            BeginOnUIThread(() =>\r\n            {\r\n                Items.Clear();\r\n\r\n                AddMessages(messages);\r\n\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null && channel.MigratedFromChatId != null)\r\n                {\r\n                    var lastMessage = messages != null ? messages.LastOrDefault() : null;\r\n                    if (lastMessage != null && lastMessage.Index == 1)\r\n                    {\r\n                        IsLastSliceLoaded = true;\r\n                        var chatMessages = CacheService.GetHistory(new TLPeerChat { Id = channel.MigratedFromChatId }, limit);\r\n\r\n                        AddMessages(chatMessages);\r\n                    }\r\n                }\r\n\r\n                Status = Items.Count > 0 ? string.Empty : Status;\r\n\r\n                LoadNextSlice();\r\n            });\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        protected override bool SkipMessage(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var document = mediaDocument.Document as TLDocument;\r\n            if (document == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (message.IsSticker()\r\n                || document.FileName.ToString().EndsWith(\".webp\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (message.IsGif())\r\n            {\r\n                return true;\r\n            }\r\n            \r\n            if (message.IsMusic())\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (message.IsVoice())\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (message.IsVideo())\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n    }\r\n\r\n    public abstract class FilesViewModelBase<T> : ItemsViewModelBase<TLMessage>,\r\n        Telegram.Api.Aggregator.IHandle<DownloadableItem>, \r\n        Telegram.Api.Aggregator.IHandle<DeleteMessagesEventArgs>,\r\n        ISliceLoadable\r\n        where T : IInputPeer\r\n    {\r\n        public abstract TLInputMessagesFilterBase InputMessageFilter { get; }\r\n\r\n        private bool _isSelectionEnabled;\r\n\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return _isSelectionEnabled; }\r\n            set { SetField(ref _isSelectionEnabled, value, () => IsSelectionEnabled); }\r\n        }\r\n\r\n        public bool IsGroupActionEnabled\r\n        {\r\n            get { return Items.Any(x => x.IsSelected); }\r\n        }\r\n\r\n        public ObservableCollection<TimeKeyGroup<TLMessageBase>> Files { get; set; } \r\n\r\n        public bool IsEmptyList { get; protected set; }\r\n\r\n        public T CurrentItem { get; set; }\r\n\r\n        private IDocumentFileManager _downloadDocumentFileManager;\r\n\r\n        private IDocumentFileManager DownloadDocumentFileManager\r\n        {\r\n            get { return _downloadDocumentFileManager ?? (_downloadDocumentFileManager = IoC.Get<IDocumentFileManager>()); }\r\n        }\r\n\r\n        public AnimatedImageViewerViewModel AnimatedImageViewer { get; protected set; }\r\n\r\n        public Action<int> SetSelectedCountAction;\r\n\r\n        public FilesViewModelBase(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Files = new ObservableCollection<TimeKeyGroup<TLMessageBase>>();\r\n\r\n            IsEmptyList = false;\r\n            Items = new ObservableCollection<TLMessage>();\r\n\r\n            EventAggregator.Subscribe(this);\r\n\r\n            PropertyChanged += OnPropertyChanged;\r\n        }\r\n\r\n        private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => IsSelectionEnabled))\r\n            {\r\n                if (!IsSelectionEnabled)\r\n                {\r\n                    foreach (var item in Items)\r\n                    {\r\n                        item.IsSelected = false;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isLoadingNextSlice;\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            if (_isLoadingNextSlice) return;\r\n\r\n            if (CurrentItem is TLBroadcastChat && !(CurrentItem is TLChannel))\r\n            {\r\n                Status = string.Empty;\r\n                if (Items.Count == 0)\r\n                {\r\n                    IsEmptyList = true;\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n                }\r\n                return;\r\n            }\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null && channel.MigratedFromChatId != null)\r\n            {\r\n                if (IsLastSliceLoaded)\r\n                {\r\n                    LoadNextMigratedHistorySlice();\r\n                    return;\r\n                }\r\n\r\n                var lastMessage = Items.LastOrDefault() as TLMessageCommon;\r\n                if (lastMessage != null\r\n                    && lastMessage.ToId is TLPeerChat)\r\n                {\r\n                    LoadNextMigratedHistorySlice();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (IsLastSliceLoaded)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var maxId = 0;\r\n            var lastItem = Items.LastOrDefault();\r\n            if (lastItem != null)\r\n            {\r\n                maxId = lastItem.Index;\r\n            }\r\n\r\n            IsWorking = true;\r\n            _isLoadingNextSlice = true;\r\n            MTProtoService.SearchAsync(\r\n                CurrentItem.ToInputPeer(),\r\n                TLString.Empty,\r\n                null,\r\n                InputMessageFilter,\r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(maxId), \r\n                new TLInt(Constants.FileSliceLength),\r\n                new TLInt(0),\r\n                messages => BeginOnUIThread(() =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                    _isLoadingNextSlice = false;\r\n\r\n                    AddMessages(messages.Messages.ToList());\r\n\r\n                    if (messages.Messages.Count < Constants.PhotoVideoSliceLength)\r\n                    {\r\n                        IsLastSliceLoaded = true;\r\n                        LoadNextMigratedHistorySlice();\r\n                    }\r\n                    IsEmptyList = Items.Count == 0;\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n                }),\r\n                error =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                    _isLoadingNextSlice = false;\r\n\r\n                    Execute.ShowDebugMessage(\"messages.search error \" + error);\r\n                });\r\n        }\r\n\r\n        private bool _isLastMigratedHistorySliceLoaded;\r\n\r\n        private bool _isLoadingNextMigratedHistorySlice;\r\n\r\n        private void LoadNextMigratedHistorySlice()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null || channel.MigratedFromChatId == null) return;\r\n\r\n            if (_isLastMigratedHistorySliceLoaded) return;\r\n\r\n            if (_isLoadingNextMigratedHistorySlice) return;\r\n\r\n            var maxMessageId = int.MaxValue;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var messageCommon = Items[i] as TLMessageCommon;\r\n                if (messageCommon == null) continue;\r\n\r\n                var peerChat = messageCommon.ToId as TLPeerChat;\r\n                if (peerChat == null) continue;\r\n\r\n                if (Items[i].Index != 0\r\n                    && Items[i].Index < maxMessageId)\r\n                {\r\n                    maxMessageId = Items[i].Index;\r\n                }\r\n            }\r\n\r\n            if (maxMessageId == int.MaxValue)\r\n            {\r\n                maxMessageId = channel.MigratedFromMaxId != null ? channel.MigratedFromMaxId.Value : 0;\r\n            }\r\n\r\n            _isLoadingNextMigratedHistorySlice = true;\r\n            IsWorking = true;\r\n            MTProtoService.SearchAsync(\r\n                new TLInputPeerChat { ChatId = channel.MigratedFromChatId },\r\n                TLString.Empty,\r\n                null,\r\n                InputMessageFilter,\r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(maxMessageId), \r\n                new TLInt(Constants.FileSliceLength),\r\n                new TLInt(0),\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    _isLoadingNextMigratedHistorySlice = false;\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n\r\n                    if (result.Messages.Count < Constants.MessagesSlice)\r\n                    {\r\n                        _isLastMigratedHistorySliceLoaded = true;\r\n                    }\r\n\r\n                    AddMessages(result.Messages);\r\n\r\n                    IsEmptyList = Items.Count == 0;\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _isLoadingNextMigratedHistorySlice = false;\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n\r\n                    Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void ChangeGroupActionStatus()\r\n        {\r\n            var selectedItemsCount = Items.Count(x => x.IsSelected);\r\n            SetSelectedCountAction.SafeInvoke(selectedItemsCount);\r\n\r\n            NotifyOfPropertyChange(() => IsGroupActionEnabled);\r\n        }\r\n\r\n        public void Manage()\r\n        {\r\n            IsSelectionEnabled = !IsSelectionEnabled;\r\n        }\r\n\r\n        protected abstract bool SkipMessage(TLMessageBase message);\r\n\r\n        protected void AddMessages(IList<TLMessageBase> messages)\r\n        {\r\n            foreach (var messageBase in messages)\r\n            {\r\n                if (SkipMessage(messageBase))\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                var date = TLUtils.ToDateTime(((TLMessage)messageBase).Date);\r\n                var yearMonthKey = new DateTime(date.Year, date.Month, 1);\r\n                var timeKeyGroup = Files.FirstOrDefault(x => x.Key == yearMonthKey);\r\n                if (timeKeyGroup != null)\r\n                {\r\n                    timeKeyGroup.Add(messageBase);\r\n                }\r\n                else\r\n                {\r\n                    Files.Add(new TimeKeyGroup<TLMessageBase>(yearMonthKey) { messageBase });\r\n                }\r\n\r\n                Items.Add(messageBase);\r\n            }\r\n        }\r\n\r\n        public void DeleteMessage(TLMessageBase message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            var messages = new List<TLMessageBase> { message };\r\n\r\n            var owner = CurrentItem as TLObject;\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                var messageCommon = message as TLMessageCommon;\r\n                if (messageCommon != null)\r\n                {\r\n                    if (messageCommon.ToId is TLPeerChat)\r\n                    {\r\n                        DialogDetailsViewModel.DeleteMessages(MTProtoService, false, null, null, messages, null, (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                DialogDetailsViewModel.DeleteChannelMessages(MTProtoService, channel, null, null, messages, null, (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n                return;\r\n            }\r\n\r\n            if (CurrentItem is TLBroadcastChat)\r\n            {\r\n                DeleteMessagesInternal(owner, null, messages);\r\n                return;\r\n            }\r\n\r\n            if ((message.Id == null || message.Id.Value == 0) && message.RandomIndex != 0)\r\n            {\r\n                DeleteMessagesInternal(owner, null, messages);\r\n                return;\r\n            }\r\n\r\n            DialogDetailsViewModel.DeleteMessages(MTProtoService, false, null, null, messages, null, (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n        }\r\n\r\n        private void DeleteMessagesInternal(TLObject owner, TLMessageBase lastMessage, IList<TLMessageBase> messages)\r\n        {\r\n            var ids = new TLVector<TLInt>();\r\n            for (int i = 0; i < messages.Count; i++)\r\n            {\r\n                ids.Add(messages[i].Id);\r\n            }\r\n\r\n            // duplicate: deleting performed through updates\r\n            CacheService.DeleteMessages(ids);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < messages.Count; i++)\r\n                {\r\n                    for (var j = 0; j < Files.Count; j++)\r\n                    {\r\n                        for (var k = 0; k < Files[j].Count; k++)\r\n                        {\r\n                            if (Files[j][k].Index == messages[i].Index)\r\n                            {\r\n                                Files[j].RemoveAt(k);\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                    messages[i].IsSelected = false;\r\n                    Items.Remove(messages[i]);\r\n                }\r\n            });\r\n\r\n            EventAggregator.Publish(new DeleteMessagesEventArgs { Owner = owner, Messages = messages });\r\n        }\r\n\r\n        public void DeleteMessages()\r\n        {\r\n            if (Items == null) return;\r\n\r\n            var messages = new List<TLMessageBase>();\r\n            foreach (var item in Items.Where(x => x.IsSelected))\r\n            {\r\n                messages.Add(item);\r\n            }\r\n\r\n            if (messages.Count == 0) return;\r\n\r\n            var randomItems = new List<TLMessageBase>();\r\n            var items = new List<TLMessageBase>();\r\n\r\n            TLMessageBase lastItem = null;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var message = Items[i];\r\n                if (message.IsSelected)\r\n                {\r\n                    if (message.Index == 0 && message.RandomIndex != 0)\r\n                    {\r\n                        randomItems.Add(message);\r\n                        lastItem = null;\r\n                    }\r\n                    else if (message.Index != 0)\r\n                    {\r\n                        items.Add(message);\r\n                        lastItem = null;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    if (lastItem == null)\r\n                    {\r\n                        lastItem = message;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (randomItems.Count == 0 && items.Count == 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            IsSelectionEnabled = false;\r\n\r\n            var owner = CurrentItem as TLObject;\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                var chatMessages = new List<TLMessageBase>();\r\n                var channelMessages = new List<TLMessageBase>();\r\n                if (channel.MigratedFromChatId != null)\r\n                {\r\n                    foreach (var item in items)\r\n                    {\r\n                        var message = item as TLMessageCommon;\r\n                        if (message != null && message.ToId is TLPeerChat)\r\n                        {\r\n                            chatMessages.Add(message);\r\n                        }\r\n                        else\r\n                        {\r\n                            channelMessages.Add(message);\r\n                        }\r\n                    }\r\n                }\r\n                if (chatMessages.Count > 0)\r\n                {\r\n                    DialogDetailsViewModel.DeleteChannelMessages(MTProtoService, channel, lastItem, null, channelMessages, null, (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n                    DialogDetailsViewModel.DeleteMessages(MTProtoService, false, lastItem, null, chatMessages, null, (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n\r\n                    return;\r\n                }\r\n\r\n                DialogDetailsViewModel.DeleteChannelMessages(MTProtoService, channel, lastItem, randomItems, items, (result1, result2) => DeleteMessagesInternal(owner, result1, result2), (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n\r\n                return;\r\n            }\r\n\r\n            if (CurrentItem is TLBroadcastChat)\r\n            {\r\n                DeleteMessagesInternal(owner, null, randomItems);\r\n                DeleteMessagesInternal(owner, null, items);\r\n\r\n                return;\r\n            }\r\n\r\n            DialogDetailsViewModel.DeleteMessages(MTProtoService, false, null, randomItems, items, (result1, result2) => DeleteMessagesInternal(owner, result1, result2), (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n        }\r\n\r\n        public void ForwardMessages()\r\n        {\r\n            if (Items == null) return;\r\n\r\n            var messages = new List<TLMessageBase>();\r\n            foreach (var item in Items.Where(x => x.IsSelected))\r\n            {\r\n                messages.Add(item);\r\n            }\r\n\r\n            if (messages.Count == 0) return;\r\n\r\n            IsSelectionEnabled = false;\r\n\r\n            DialogDetailsViewModel.ForwardMessagesCommon(messages, StateService, NavigationService);\r\n        }\r\n\r\n        public void ForwardMessage(TLMessageBase message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            DialogDetailsViewModel.ForwardMessagesCommon(new List<TLMessageBase>{ message }, StateService, NavigationService);\r\n        }\r\n\r\n        public void SaveMedia(TLMessage message)\r\n        {\r\n            if (message == null) return;\r\n\r\n#if WP81\r\n            DialogDetailsViewModel.SaveMediaCommon(message);\r\n#endif\r\n        }\r\n\r\n#if WP8\r\n        public async void OpenMedia(TLMessage message)\r\n#else\r\n        public void OpenMedia(TLMessage message)\r\n#endif\r\n        {\r\n            if (message == null) return;\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                DialogDetailsViewModel.OpenDocumentCommon(message, StateService, DownloadDocumentFileManager, () => { });\r\n            }\r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            StateService.CurrentInputPeer = CurrentItem;\r\n            var source = new List<TLMessageBase>(Items.Count);\r\n            foreach (var item in Items)\r\n            {\r\n                source.Add(item);\r\n            }\r\n\r\n            StateService.Source = source;\r\n            NavigationService.UriFor<SearchFilesViewModel>().Navigate();\r\n        }\r\n\r\n        public void CancelDocumentDownloading(TLMessageMediaDocument mediaDocument)\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    var message = Items.FirstOrDefault(x => x.Media == mediaDocument);\r\n\r\n                    DownloadDocumentFileManager.CancelDownloadFileAsync(message);\r\n\r\n                    mediaDocument.IsCanceled = true;\r\n                    mediaDocument.LastProgress = mediaDocument.DownloadingProgress;\r\n                    mediaDocument.DownloadingProgress = 0.0;\r\n                });\r\n            });\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var document = item.Owner as TLDocument;\r\n            if (document != null)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    var messages = Items;\r\n                    foreach (var m in messages)\r\n                    {\r\n                        var media = m.Media as TLMessageMediaDocument;\r\n                        if (media != null && TLDocumentBase.DocumentEquals(media.Document, document))\r\n                        {\r\n                            media.NotifyOfPropertyChange(() => media.Document);\r\n                            break;\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n\r\n            var message = item.Owner as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var mediaDocument1 = message.Media as TLMessageMediaDocument;\r\n                if (mediaDocument1 == null) return;\r\n\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    foreach (var m in Items)\r\n                    {\r\n                        var mediaDocument2 = m.Media as TLMessageMediaDocument;\r\n                        if (mediaDocument2 != null && TLDocumentBase.DocumentEquals(mediaDocument1.Document, mediaDocument2.Document))\r\n                        {\r\n                            m.Media.IsCanceled = false;\r\n                            m.Media.LastProgress = 0.0;\r\n                            m.Media.DownloadingProgress = 0.0;\r\n                            m.Media.NotifyOfPropertyChange(() => m.Media.Self); // update download icon for documents\r\n                            m.NotifyOfPropertyChange(() => m.Self);\r\n                            m.Media.IsoFileName = item.IsoFileName;\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(DeleteMessagesEventArgs args)\r\n        {\r\n            var owner = CurrentItem as TLObject;\r\n            if (owner == null) return;\r\n\r\n            if (owner == args.Owner)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    for (var j = 0; j < args.Messages.Count; j++)\r\n                    {\r\n                        for (var i = 0; i < Items.Count; i++)\r\n                        {\r\n                            if (Items[i].Index == args.Messages[j].Index)\r\n                            {\r\n                                Items.RemoveAt(i);\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TimeKeyGroup<T> : ObservableCollection<T>\r\n    {\r\n        public DateTime Key { get; private set; }\r\n\r\n        public string KeyString { get { return Key.ToString(\"MMMM yyyy\"); } }\r\n\r\n        public TimeKeyGroup(DateTime key)\r\n        {\r\n            Key = key;\r\n        }\r\n    }\r\n\r\n    public interface ISliceLoadable\r\n    {\r\n        void LoadNextSlice();\r\n    }\r\n\r\n    public class DeleteMessagesEventArgs\r\n    {\r\n        public TLObject Owner { get; set; }\r\n\r\n        public IList<TLMessageBase> Messages { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/FullMediaViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class FullMediaViewModel : Conductor<ViewModelBase>.Collection.OneActive\r\n    {\r\n        public bool IsViewerOpen { get { return ImageViewer != null && ImageViewer.IsOpen; } }\r\n\r\n        public IInputPeer CurrentItem { get; protected set; }\r\n\r\n        public MediaViewModel<IInputPeer> Media { get; protected set; }\r\n\r\n        public FilesViewModel<IInputPeer> Files { get; protected set; }\r\n\r\n        public LinksViewModel<IInputPeer> Links { get; protected set; }\r\n\r\n        public MusicViewModel<IInputPeer> Music { get; protected set; } \r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        public ImageViewerViewModel ImageViewer { get; protected set; }\r\n\r\n        public AnimatedImageViewerViewModel AnimatedImageViewer { get { return Files.AnimatedImageViewer; } }\r\n\r\n        public FullMediaViewModel(\r\n            MusicViewModel<IInputPeer> music,\r\n            FilesViewModel<IInputPeer> files, \r\n            LinksViewModel<IInputPeer> links,\r\n            MediaViewModel<IInputPeer> media, \r\n            IStateService stateService,\r\n            INavigationService navigationService)\r\n        {\r\n            //tombstoning\r\n            if (stateService.CurrentInputPeer == null)\r\n            {\r\n                ShellViewModel.Navigate(navigationService);\r\n                return;\r\n            }\r\n\r\n            CurrentItem = stateService.CurrentInputPeer;\r\n            stateService.CurrentInputPeer = null;\r\n\r\n            ImageViewer = new ImageViewerViewModel(stateService, IoC.Get<IVideoFileManager>(), true);\r\n\r\n            Media = media;\r\n            Media.ImageViewer = ImageViewer;\r\n            Files = files;\r\n            Files.SetSelectedCountAction = SetSelectedCount;\r\n            Files.PropertyChanged += OnFilesPropertyChanged;\r\n            Links = links;\r\n            Links.SetSelectedCountAction = SetSelectedCount;\r\n            Links.PropertyChanged += OnLinksPropertyChanged;\r\n            Music = music;\r\n            Music.SetSelectedCountAction = SetSelectedCount;\r\n            Music.PropertyChanged += OnMusicPropertyChanged;\r\n            _stateService = stateService;\r\n        }\r\n\r\n        public string SelectedCountString { get; set; }\r\n\r\n        public void SetSelectedCount(int count)\r\n        {\r\n            SelectedCountString = string.Format(count == 1 ? AppResources.ItemsSelectedSingular : AppResources.ItemsSelectedPlural, count).ToUpperInvariant();\r\n            NotifyOfPropertyChange(() => SelectedCountString);\r\n        }\r\n\r\n        private void OnMusicPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void OnLinksPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void OnFilesPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => Files.AnimatedImageViewer))\r\n            {\r\n                NotifyOfPropertyChange(() => AnimatedImageViewer);\r\n            }\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            if (CurrentItem == null) return;\r\n\r\n            Media.CurrentItem = CurrentItem;\r\n            Files.CurrentItem = CurrentItem;\r\n            Links.CurrentItem = CurrentItem;\r\n            Music.CurrentItem = CurrentItem;\r\n\r\n            NotifyOfPropertyChange(() => CurrentItem);\r\n\r\n            Items.Add(Media);\r\n            Items.Add(Files);\r\n            Items.Add(Links);\r\n            Items.Add(Music);\r\n            if (_stateService.MediaTab)\r\n            {\r\n                _stateService.MediaTab = false;\r\n                //Items.Add(Media);\r\n                //Items.Add(ContactDetails);\r\n                ActivateItem(Media);\r\n            }\r\n            else\r\n            {\r\n                //Items.Add(ContactDetails);\r\n                //Items.Add(Media);\r\n                //ActivateItem(ContactDetails);\r\n            }\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        public void OnBackKeyPressed()\r\n        {\r\n            _stateService.SharedContact = null;\r\n        }\r\n\r\n        public void CancelLoading()\r\n        {\r\n            Media.CancelDownloading();\r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            if (ActiveItem == Files)\r\n            {\r\n                Files.Search();\r\n            }\r\n            else if (ActiveItem == Links)\r\n            {\r\n                Links.Search();\r\n            }\r\n            else if (ActiveItem == Music)\r\n            {\r\n                Music.Search();\r\n            }\r\n        }\r\n\r\n        public void Manage()\r\n        {\r\n            if (ActiveItem == Files)\r\n            {\r\n                Files.Manage();\r\n            }\r\n            else if (ActiveItem == Links)\r\n            {\r\n                Links.Manage();\r\n            }\r\n            else if (ActiveItem == Music)\r\n            {\r\n                Music.Manage();\r\n            }\r\n        }\r\n\r\n        public void Forward()\r\n        {\r\n            if (ActiveItem == Files)\r\n            {\r\n                Files.ForwardMessages();\r\n            }\r\n            else if (ActiveItem == Links)\r\n            {\r\n                Links.ForwardMessages();\r\n            }\r\n            else if (ActiveItem == Music)\r\n            {\r\n                Music.ForwardMessages();\r\n            }\r\n        }\r\n\r\n        public void Delete()\r\n        {\r\n            if (ActiveItem == Files)\r\n            {\r\n                Files.DeleteMessages();\r\n            }\r\n            else if (ActiveItem == Links)\r\n            {\r\n                Links.DeleteMessages();\r\n            }\r\n            else if (ActiveItem == Music)\r\n            {\r\n                Music.DeleteMessages();\r\n            }\r\n        }\r\n\r\n        public void DeleteMessage(TLMessageBase message)\r\n        {\r\n            if (ActiveItem == Files)\r\n            {\r\n                Files.DeleteMessage(message);\r\n            }\r\n            else if (ActiveItem == Links)\r\n            {\r\n                Links.DeleteMessage(message);\r\n            }\r\n            else if (ActiveItem == Music)\r\n            {\r\n                Music.DeleteMessage(message);\r\n            }\r\n        }\r\n\r\n        public void ForwardMessage(TLMessageBase message)\r\n        {\r\n            if (ActiveItem == Files)\r\n            {\r\n                Files.ForwardMessage(message);\r\n            }\r\n            else if (ActiveItem == Links)\r\n            {\r\n                Links.ForwardMessage(message);\r\n            }\r\n            else if (ActiveItem == Music)\r\n            {\r\n                Music.ForwardMessage(message);\r\n            }\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            Media.ForwardInAnimationComplete();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/ImageEditorViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class ImageEditorViewModel : TelegramPropertyChangedBase\r\n    {\r\n        public Action<TLMessage34> ContinueAction { get; set; }\r\n\r\n        public string Caption\r\n        {\r\n            get\r\n            {\r\n                var message = _currentItem as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    var media = message.Media as TLMessageMediaPhoto28;\r\n                    if (media != null)\r\n                    {\r\n                        return message.Message.ToString();\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n            set\r\n            {\r\n                var message = _currentItem as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    var media = message.Media as TLMessageMediaPhoto28;\r\n                    if (media != null)\r\n                    {\r\n                        message.Message = new TLString(value);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLMessage34 _currentItem;\r\n\r\n        public TLMessage34 CurrentItem\r\n        {\r\n            get { return _currentItem; }\r\n            set\r\n            {\r\n                if (_currentItem != value)\r\n                {\r\n                    _currentItem = value;\r\n                    NotifyOfPropertyChange(() => CurrentItem);\r\n                    NotifyOfPropertyChange(() => Caption);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen { get { return _isOpen; } }\r\n\r\n        public void Done()\r\n        {\r\n            _isOpen = false;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n\r\n            ContinueAction.SafeInvoke(_currentItem);\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            CloseEditor();    \r\n        }\r\n\r\n        public void OpenEditor()\r\n        {\r\n            _isOpen = CurrentItem != null;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n        }\r\n\r\n        public void CloseEditor()\r\n        {\r\n            _isOpen = false;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n\r\n            _currentItem = null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/ImageViewerViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Windows.ApplicationModel.DataTransfer;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views;\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class ImageViewerViewModel : ViewAware\r\n    {\r\n        private bool _isWorking;\r\n\r\n        public bool IsWorking\r\n        {\r\n            get { return _isWorking; }\r\n            set\r\n            {\r\n                if (value != _isWorking)\r\n                {\r\n                    _isWorking = value;\r\n                    NotifyOfPropertyChange(() => IsWorking);\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool Inverse { get; protected set; }\r\n\r\n        private IList<TLMessage> _items = new List<TLMessage>(); \r\n\r\n        private int _currentIndex;\r\n\r\n        public bool IsInputTTL\r\n        {\r\n            get\r\n            {\r\n                var message = CurrentItem as TLMessage;\r\n                return message != null && !message.Out.Value && message.HasTTL();\r\n            }\r\n        }\r\n\r\n        private TLMessageBase _previousItem;\r\n\r\n        public TLMessageBase PreviousItem\r\n        {\r\n            get { return _previousItem; }\r\n            set\r\n            {\r\n                _previousItem = value;\r\n            }\r\n        }\r\n\r\n        private TLMessageBase _currentItem;\r\n\r\n        public TLMessageBase CurrentItem\r\n        {\r\n            get { return _currentItem; }\r\n            set\r\n            {\r\n                if (_currentItem != value)\r\n                {\r\n                    _currentItem = value;\r\n                    NotifyOfPropertyChange(() => CurrentItem);\r\n                    NotifyOfPropertyChange(() => IsInputTTL);\r\n                    NotifyOfPropertyChange(() => Title);\r\n\r\n                    //CheckPhoto(value);\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLMessageBase _nextItem;\r\n\r\n        public TLMessageBase NextItem\r\n        {\r\n            get { return _nextItem; }\r\n            set\r\n            {\r\n                _nextItem = value;\r\n            }\r\n        }\r\n\r\n        public BindableCollection<TLMessageBase> GroupedItems { get; set; }\r\n\r\n        public string Title\r\n        {\r\n            get\r\n            {\r\n                var message = CurrentItem as TLMessage;\r\n                if (message != null && message.HasTTL())\r\n                {\r\n                    if (message.Media is TLMessageMediaPhoto)\r\n                    {\r\n                        return AppResources.SecretPhoto;\r\n                    }\r\n                    if (message.Media is TLMessageMediaVideo || message.IsVideo())\r\n                    {\r\n                        return AppResources.SecretVideo;\r\n                    }\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public IStateService StateService { get; protected set; }\r\n\r\n        private readonly IVideoFileManager _downloadVideoFileManager;\r\n\r\n        public bool ShowOpenMediaListButton { get; protected set; }\r\n\r\n        public DialogDetailsViewModel DialogDetails { get; set; }\r\n\r\n        public ImageViewerViewModel(IStateService stateService, IVideoFileManager downloadVideoFileManager, bool inverse, bool showMediaButton = false)\r\n        {\r\n            Inverse = inverse;\r\n            StateService = stateService;\r\n            _downloadVideoFileManager = downloadVideoFileManager;\r\n\r\n            ShowOpenMediaListButton = showMediaButton;\r\n            GroupedItems = new BindableCollection<TLMessageBase>();\r\n        }\r\n\r\n        public void Delete()\r\n        {\r\n            if (CurrentItem == null) return;\r\n            if (DialogDetails == null) return;\r\n\r\n            var currentItem = CurrentItem;\r\n            DialogDetails.DeleteMessageById(\r\n                currentItem, \r\n                () =>\r\n                {\r\n                    Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.1), () =>\r\n                    {\r\n                        if (CanSlideRight)\r\n                        {\r\n                            var view = GetView() as ImageViewerView;\r\n                            if (view != null)\r\n                            {\r\n                                _items.RemoveAt(_currentIndex--);\r\n                                view.SlideRight(0.0, () =>\r\n                                {\r\n                                    view.SetControlContent(2, NextItem);\r\n                                    GroupedItems.Remove(currentItem);\r\n                                });\r\n                            }\r\n                        }\r\n                        else if (CanSlideLeft)\r\n                        {\r\n                            var view = GetView() as ImageViewerView;\r\n                            if (view != null)\r\n                            {\r\n                                _items.RemoveAt(_currentIndex);\r\n                                view.SlideLeft(0.0, () =>\r\n                                {\r\n                                    view.SetControlContent(0, PreviousItem);\r\n                                    GroupedItems.Remove(currentItem);\r\n                                });\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), CloseViewer);\r\n                        }\r\n                    });\r\n                });\r\n        }\r\n\r\n        public void Forward()\r\n        {\r\n            if (CurrentItem == null) return;\r\n\r\n            DialogDetailsViewModel.ForwardMessagesCommon(new List<TLMessageBase>{ CurrentItem }, StateService, IoC.Get<INavigationService>());\r\n        }\r\n\r\n        public void OpenMediaDetails()\r\n        {\r\n            if (DialogDetails == null) return;\r\n\r\n            StateService.MediaTab = true;\r\n            DialogDetails.OpenPeerDetails();\r\n        }\r\n\r\n        public void OpenViewer()\r\n        {\r\n            CurrentItem = StateService.CurrentPhotoMessage;\r\n            _items = StateService.CurrentMediaMessages;\r\n            if (_items != null)\r\n            {\r\n                _currentIndex = _items.IndexOf(StateService.CurrentPhotoMessage);\r\n                PreviousItem = _currentIndex + 1 < _items.Count ? _items[_currentIndex + 1] : null;\r\n                NextItem = _currentIndex > 0 ? _items[_currentIndex - 1] : null;\r\n\r\n                CreateGroupedItems(CurrentItem);\r\n            }\r\n            else\r\n            {\r\n                _currentIndex = -1;\r\n                PreviousItem = null;\r\n                NextItem = null;\r\n                GroupedItems.Clear();\r\n            }\r\n\r\n            _isOpen = CurrentItem != null;\r\n            NotifyOfPropertyChange(() => CurrentItem);\r\n            NotifyOfPropertyChange(() => PreviousItem);\r\n            NotifyOfPropertyChange(() => NextItem);\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n            NotifyOfPropertyChange(() => CanZoom);\r\n\r\n            StateService.CurrentPhotoMessage = null;\r\n            StateService.CurrentMediaMessages = null;\r\n\r\n            RaiseOpen();\r\n        }\r\n\r\n        private void CreateGroupedItems(TLMessageBase currentItem)\r\n        {\r\n            var message73 = currentItem as TLMessage73;\r\n            if (message73 != null && message73.GroupedId != null)\r\n            {\r\n                var firstItem = GroupedItems.FirstOrDefault() as TLMessage73;\r\n                if (firstItem == null\r\n                    || (firstItem.GroupedId != null\r\n                        && firstItem.GroupedId.Value != message73.GroupedId.Value))\r\n                {\r\n                    var items = new List<TLMessageBase>();\r\n                    for (var i = _items.Count - 1; i >= 0; i--)\r\n                    {\r\n                        var item = _items[i] as TLMessage73;\r\n                        if (item != null \r\n                            && item.GroupedId != null\r\n                            && item.GroupedId.Value == message73.GroupedId.Value)\r\n                        {\r\n                            items.Add(item);\r\n                        }\r\n                    }\r\n\r\n                    GroupedItems.IsNotifying = false;\r\n                    GroupedItems.Clear();\r\n                    if (items.Count > 1)\r\n                    {\r\n                        foreach (var item in items)\r\n                        {\r\n                            GroupedItems.Add(item);\r\n                        }\r\n                    }\r\n                    GroupedItems.IsNotifying = true;\r\n                    GroupedItems.Refresh();\r\n                    var view = GetView() as ImageViewerView;\r\n                    if (view != null)\r\n                    {\r\n                        view.ScrollTo(currentItem, 0.0);\r\n                    }\r\n                }\r\n                else if (firstItem.GroupedId != null\r\n                    && firstItem.GroupedId.Value == message73.GroupedId.Value)\r\n                {\r\n                    var view = GetView() as ImageViewerView;\r\n                    if (view != null)\r\n                    {\r\n                        view.ScrollTo(currentItem, 0.0);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    GroupedItems.Clear();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                GroupedItems.Clear();\r\n            }\r\n        }\r\n\r\n        public void CloseViewer()\r\n        {\r\n            _isOpen = false;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n\r\n            RaiseClose();\r\n        }\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen { get { return _isOpen; } }\r\n\r\n        public event EventHandler Open;\r\n\r\n        protected virtual void RaiseOpen()\r\n        {\r\n            var handler = Open;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler Close;\r\n\r\n        protected virtual void RaiseClose()\r\n        {\r\n            var handler = Close;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n#if WP8\r\n        private static async void SaveFileAsync(string fileName, string fileExt, Action<string> callback = null)\r\n        {\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (store.FileExists(fileName))\r\n                {\r\n                    using (var fileStream = store.OpenFile(fileName, FileMode.Open))\r\n                    {\r\n                        var telegramFolder = await KnownFolders.PicturesLibrary.CreateFolderAsync(Constants.TelegramFolderName, CreationCollisionOption.OpenIfExists);\r\n                        if (telegramFolder == null) return;\r\n\r\n                        var ext = fileExt.StartsWith(\".\") ? fileExt : \".\" + fileExt;\r\n                        var storageFile = await telegramFolder.CreateFileAsync(Guid.NewGuid() + ext, CreationCollisionOption.ReplaceExisting);\r\n\r\n                        var stopwatch1 = Stopwatch.StartNew();\r\n                        using (var storageStream = await storageFile.OpenStreamForWriteAsync())\r\n                        {\r\n                            fileStream.CopyTo(storageStream);\r\n                        }\r\n\r\n                        if (callback != null)\r\n                        {\r\n                            callback.Invoke(storageFile.Path);\r\n                        }\r\n                        else\r\n                        {\r\n                            var elapsed1 = stopwatch1.Elapsed;\r\n                            //var stopwatch2 = Stopwatch.StartNew();\r\n                            ////using (var storageStream = await storageFile.OpenStreamForWriteAsync())\r\n                            //using (var storageStream = await storageFile.OpenAsync(FileAccessMode.ReadWrite))\r\n                            //{\r\n                            //    await RandomAccessStream.CopyAndCloseAsync(fileStream.AsInputStream(), storageStream.GetOutputStreamAt(0));\r\n                            //}\r\n                            //var elapsed2 = stopwatch2.Elapsed;\r\n                            Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.SaveFileMessage\r\n#if DEBUG\r\n                                + \"\\n Time: \" + elapsed1\r\n                                //+ \"\\n Time2: \" + elapsed2\r\n#endif\r\n\r\n                            ));\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n#endif\r\n\r\n\r\n#if WP8\r\n        public static void SaveVideo(string fileName)\r\n        {\r\n            SaveFileAsync(fileName, \"mp4\");\r\n        }\r\n#else\r\n        public static void SaveVideo(string fileName)\r\n        {\r\n\r\n        }\r\n#endif\r\n\r\n#if WP8\r\n        public static void SavePhoto(string fileName, Action<string> callback = null)\r\n        {\r\n            SaveFileAsync(fileName, \"jpg\", callback);\r\n        }\r\n#else\r\n        public static void SavePhoto(string photoFileName, Action<string> callback = null)\r\n        {\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (store.FileExists(photoFileName))\r\n                {\r\n                    using (var fileStream = store.OpenFile(photoFileName, FileMode.Open))\r\n                    {\r\n                        var photoUrl = Guid.NewGuid().ToString(); //.jpg will be added automatically            \r\n                        var mediaLibrary = new MediaLibrary();\r\n                        var photoFile = mediaLibrary.SavePicture(photoUrl, fileStream);\r\n\r\n                        if (callback != null)\r\n                        {\r\n                            \r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.SavePhotoMessage));\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n#endif\r\n\r\n        private static void SavePhotoAsync(TLMessageMediaPhoto mediaPhoto, Action<string> callback = null)\r\n        {\r\n            var photo = mediaPhoto.Photo as TLPhoto;\r\n            if (photo == null) return;\r\n\r\n            TLPhotoSize size = null;\r\n            var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n            const double width = 800.0;\r\n            foreach (var photoSize in sizes)\r\n            {\r\n                if (size == null\r\n                    || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                {\r\n                    size = photoSize;\r\n                }\r\n            }\r\n            if (size == null) return;\r\n\r\n            var location = size.Location as TLFileLocation;\r\n            if (location == null) return;\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                location.VolumeId,\r\n                location.LocalId,\r\n                location.Secret);\r\n\r\n            Execute.BeginOnThreadPool(() => SavePhoto(fileName, callback));\r\n        }\r\n\r\n        private static void SaveVideoAsync(TLMessageMediaBase mediaBase)\r\n        {\r\n            var mediaDocument = mediaBase as TLMessageMediaDocument45;\r\n            if (mediaDocument != null && TLMessageBase.IsVideo(mediaDocument.Document))\r\n            {\r\n                var video = mediaDocument.Video as TLDocument22;\r\n                if (video == null) return;\r\n\r\n                var fileName = video.GetFileName();\r\n\r\n                Execute.BeginOnThreadPool(() => SaveVideo(fileName));\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaVideo = mediaBase as TLMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                var video = mediaVideo.Video as TLVideo;\r\n                if (video == null) return;\r\n\r\n                var fileName = video.GetFileName();\r\n\r\n                Execute.BeginOnThreadPool(() => SaveVideo(fileName));\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Save()\r\n        {\r\n            var message = CurrentItem as TLMessage;\r\n            if (message == null) return;\r\n\r\n            var mediaPhoto = message.Media as TLMessageMediaPhoto;\r\n            if (mediaPhoto != null)\r\n            {\r\n                SavePhotoAsync(mediaPhoto);\r\n                return;\r\n            }\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument45;\r\n            if (mediaDocument != null && message.IsVideo())\r\n            {\r\n                SaveVideoAsync(mediaDocument);\r\n                return;\r\n            }\r\n\r\n            var mediaVideo = message.Media as TLMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                SaveVideoAsync(mediaVideo);\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Share()\r\n        {\r\n#if WP8\r\n            var message = CurrentItem as TLMessage;\r\n            if (message == null) return;\r\n\r\n            var mediaPhoto = message.Media as TLMessageMediaPhoto;\r\n            if (mediaPhoto != null)\r\n            {\r\n                var photo = mediaPhoto.Photo as TLPhoto;\r\n                if (photo == null) return;\r\n\r\n                TLPhotoSize size = null;\r\n                var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n                const double width = 800.0;\r\n                foreach (var photoSize in sizes)\r\n                {\r\n                    if (size == null\r\n                        || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                    {\r\n                        size = photoSize;\r\n                    }\r\n                }\r\n                if (size == null) return;\r\n\r\n                var location = size.Location as TLFileLocation;\r\n                if (location == null) return;\r\n\r\n                var fileName = //mediaPhoto.IsoFileName ?? \r\n                    String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.VolumeId,\r\n                        location.LocalId,\r\n                        location.Secret);\r\n                \r\n                var dataTransferManager = DataTransferManager.GetForCurrentView();\r\n                dataTransferManager.DataRequested += (o, args) =>\r\n                {\r\n                    var request = args.Request;\r\n\r\n                    request.Data.Properties.Title = \"media\";\r\n                    request.Data.Properties.ApplicationName = \"Telegram Messenger\";\r\n\r\n                    var deferral = request.GetDeferral();\r\n\r\n                    try\r\n                    {\r\n                        var fileToShare = FileUtils.GetLocalFile(fileName);//this.GetImageFileAsync(\"Sample.jpg\");\r\n                        if (fileToShare == null) return;\r\n                        //var storageFileToShare = await this.GetStorageFileForImageAsync(\"Sample.jpg\");\r\n\r\n                        //request.Data.Properties.Thumbnail = RandomAccessStreamReference.CreateFromStream(fileToShare);\r\n                        //request.Data.SetBitmap(RandomAccessStreamReference.CreateFromStream(fileToShare));\r\n\r\n\r\n                        // On Windows Phone, share StorageFile instead of Bitmaps\r\n                        request.Data.SetStorageItems(new List<StorageFile> { fileToShare });\r\n                    }\r\n                    finally\r\n                    {\r\n                        deferral.Complete();\r\n                    }\r\n                };\r\n                DataTransferManager.ShowShareUI();\r\n\r\n                return;\r\n\r\n                SavePhotoAsync(mediaPhoto, path =>\r\n                {\r\n                    var task = new ShareMediaTask { FilePath = path };\r\n                    task.Show();\r\n                });\r\n            }\r\n#endif\r\n        }\r\n\r\n        public bool CanZoom\r\n        {\r\n            get\r\n            {\r\n                //return true;\r\n                return CurrentItem != null && ((TLMessage) CurrentItem).Media is TLMessageMediaPhoto;\r\n            }\r\n        }\r\n\r\n        public bool CanSlideLeft\r\n        {\r\n            get { return _currentIndex > 0; }\r\n        }\r\n\r\n        public void SlideLeft()\r\n        {\r\n            if (!CanSlideLeft) return;\r\n\r\n            var nextItem = _items[--_currentIndex];\r\n            CurrentItem = nextItem;\r\n            PreviousItem = _currentIndex + 1 < _items.Count ? _items[_currentIndex + 1] : null;\r\n            NextItem = _currentIndex > 0 ? _items[_currentIndex - 1] : null;\r\n            //NotifyOfPropertyChange(() => PreviousItem);\r\n            //NotifyOfPropertyChange(() => NextItem);\r\n            //NotifyOfPropertyChange(() => CanZoom);\r\n\r\n            CreateGroupedItems(CurrentItem);\r\n        }\r\n\r\n        public bool CanSlideRight\r\n        {\r\n            get { return _currentIndex < _items.Count - 1; }\r\n        }\r\n\r\n        public void SlideRight()\r\n        {\r\n            if (!CanSlideRight) return;\r\n\r\n            var nextItem = _items[++_currentIndex];\r\n            CurrentItem = nextItem;\r\n            PreviousItem = _currentIndex + 1 < _items.Count ? _items[_currentIndex + 1] : null;\r\n            NextItem = _currentIndex > 0 ? _items[_currentIndex - 1] : null;\r\n            //NotifyOfPropertyChange(() => PreviousItem);\r\n            //NotifyOfPropertyChange(() => NextItem);\r\n            //NotifyOfPropertyChange(() => CanZoom);\r\n\r\n            CreateGroupedItems(CurrentItem);\r\n        }\r\n\r\n        public void OpenMedia()\r\n        {\r\n            var message = CurrentItem as TLMessage;\r\n            if (message == null) return;\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument != null && TLMessageBase.IsVideo(mediaDocument.Document))\r\n            {\r\n                var video = mediaDocument.Video as TLDocument22;\r\n                if (video == null) return;\r\n\r\n                if (string.IsNullOrEmpty(mediaDocument.IsoFileName))\r\n                {\r\n                    mediaDocument.IsCanceled = false;\r\n                    mediaDocument.DownloadingProgress = mediaDocument.LastProgress > 0.0 ? mediaDocument.LastProgress : 0.001;\r\n                    _downloadVideoFileManager.DownloadFileAsync(\r\n                        video.DCId, video.ToInputFileLocation(), message, video.Size,\r\n                        progress =>\r\n                        {\r\n                            if (progress > 0.0)\r\n                            {\r\n                                mediaDocument.DownloadingProgress = progress;\r\n                            }\r\n                        });\r\n                }\r\n                else\r\n                {\r\n                    var launcher = new MediaPlayerLauncher();\r\n                    launcher.Location = MediaLocationType.Data;\r\n                    launcher.Media = new Uri(mediaDocument.IsoFileName, UriKind.Relative);\r\n                    launcher.Show();\r\n                }\r\n                return;\r\n            }\r\n\r\n            var mediaVideo = message.Media as TLMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                var video = mediaVideo.Video as TLVideo;\r\n                if (video == null) return;\r\n\r\n                if (string.IsNullOrEmpty(mediaVideo.IsoFileName))\r\n                {\r\n                    mediaVideo.IsCanceled = false;\r\n                    mediaVideo.DownloadingProgress = mediaVideo.LastProgress > 0.0 ? mediaVideo.LastProgress : 0.001;\r\n                    _downloadVideoFileManager.DownloadFileAsync(\r\n                        video.DCId, video.ToInputFileLocation(), message, video.Size,\r\n                        progress =>\r\n                        {\r\n                            if (progress > 0.0)\r\n                            {\r\n                                mediaVideo.DownloadingProgress = progress;\r\n                            }\r\n                        });\r\n                }\r\n                else\r\n                {\r\n                    var launcher = new MediaPlayerLauncher();\r\n                    launcher.Location = MediaLocationType.Data;\r\n                    launcher.Media = new Uri(mediaVideo.IsoFileName, UriKind.Relative);\r\n                    launcher.Show();\r\n                }\r\n                return;\r\n            }\r\n        }\r\n\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var message = item.Owner as TLMessage;\r\n            if (message != null && _items != null)\r\n            {\r\n                var messages = _items;\r\n                foreach (var m in messages)\r\n                {\r\n                    var mediaDocument = m.Media as TLMessageMediaDocument45;\r\n                    if (mediaDocument != null && m == item.Owner)\r\n                    {\r\n                        m.Media.IsCanceled = false;\r\n                        m.Media.DownloadingProgress = 0.0;\r\n                        m.Media.IsoFileName = item.IsoFileName;\r\n                        //MessageBox.Show(\"Download video time: \" + _downloadVideoStopwatch.Elapsed);\r\n                        //media.NotifyOfPropertyChange(() => media.Video);\r\n                        break;\r\n                    }\r\n\r\n                    var media = m.Media as TLMessageMediaVideo;\r\n                    if (media != null && m == item.Owner)\r\n                    {\r\n                        m.Media.IsCanceled = false;\r\n                        m.Media.DownloadingProgress = 0.0;\r\n                        m.Media.IsoFileName = item.IsoFileName;\r\n                        //MessageBox.Show(\"Download video time: \" + _downloadVideoStopwatch.Elapsed);\r\n                        //media.NotifyOfPropertyChange(() => media.Video);\r\n                        break;\r\n                    }\r\n                }\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void CancelVideoDownloading()\r\n        {\r\n            var message = CurrentItem as TLMessage;\r\n            if (message == null) return;\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument45;\r\n            if (mediaDocument != null)\r\n            {\r\n                mediaDocument.IsCanceled = true;\r\n                mediaDocument.LastProgress = mediaDocument.DownloadingProgress;\r\n                mediaDocument.DownloadingProgress = 0.0;\r\n                _downloadVideoFileManager.CancelDownloadFileAsync(message);\r\n            }\r\n\r\n            var mediaVideo = message.Media as TLMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                mediaVideo.IsCanceled = true;\r\n                mediaVideo.LastProgress = mediaVideo.DownloadingProgress;\r\n                mediaVideo.DownloadingProgress = 0.0;\r\n                _downloadVideoFileManager.CancelDownloadFileAsync(message);\r\n            }\r\n        }\r\n\r\n        public void GetAttachedStickers()\r\n        {\r\n        }\r\n\r\n        public TLArchivedStickers AttachedStickers { get; set; }\r\n\r\n        public void AddRemoveStickerSet(TLStickerSet32 set)\r\n        {\r\n            if (set == null) return;\r\n\r\n            //var featuredStickers = _stickers as TLFeaturedStickers;\r\n            if (AttachedStickers == null) return;\r\n\r\n            var messagesStickerSet = AttachedStickers.MessagesStickerSets.FirstOrDefault(x => x.Set.Id.Value == set.Id.Value);\r\n            if (messagesStickerSet == null) return;\r\n\r\n            var stickerSetExists = set.Installed;\r\n            var inputStickerSet = new TLInputStickerSetId { Id = set.Id, AccessHash = set.AccessHash };\r\n            if (!stickerSetExists)\r\n            {\r\n                IoC.Get<IMTProtoService>().InstallStickerSetAsync(inputStickerSet, TLBool.False,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        var resultArchive = result as TLStickerSetInstallResultArchive;\r\n                        if (resultArchive != null)\r\n                        {\r\n                            TelegramViewBase.ShowArchivedStickersMessageBox(resultArchive);\r\n                        }\r\n\r\n                        set.Installed = true;\r\n                        var set76 = set as TLStickerSet76;\r\n                        if (set76 != null)\r\n                        {\r\n                            set76.InstalledDate = TLUtils.DateToUniversalTimeTLInt(IoC.Get<IMTProtoService>().ClientTicksDelta, DateTime.Now);\r\n                        }\r\n                        set.NotifyOfPropertyChange(() => set.Installed);\r\n\r\n                        var shellViewModel = IoC.Get<ShellViewModel>();\r\n                        shellViewModel.Handle(new TLUpdateNewStickerSet { Stickerset = messagesStickerSet });\r\n\r\n                        IoC.Get<IMTProtoService>().SetMessageOnTime(2.0, AppResources.NewStickersAdded);\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                        {\r\n                            if (error.TypeEquals(ErrorType.STICKERSET_INVALID))\r\n                            {\r\n                                MessageBox.Show(AppResources.StickersNotFound, AppResources.Error, MessageBoxButton.OK);\r\n                            }\r\n                            else\r\n                            {\r\n                                Execute.ShowDebugMessage(\"messages.importChatInvite error \" + error);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.importChatInvite error \" + error);\r\n                        }\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                IoC.Get<IMTProtoService>().UninstallStickerSetAsync(inputStickerSet,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        set.Installed = false;\r\n                        var set76 = set as TLStickerSet76;\r\n                        if (set76 != null)\r\n                        {\r\n                            set76.InstalledDate = null;\r\n                        }\r\n                        set.NotifyOfPropertyChange(() => set.Installed);\r\n\r\n                        var shellViewModel = IoC.Get<ShellViewModel>();\r\n                        if (!set.Masks)\r\n                        {\r\n                            shellViewModel.RemoveStickerSet(set, inputStickerSet);\r\n                        }\r\n                        else\r\n                        {\r\n                            shellViewModel.RemoveMaskSet(set, inputStickerSet);\r\n                        }\r\n\r\n                        var eventAggregator = IoC.Get<ITelegramEventAggregator>();\r\n                        eventAggregator.Publish(new UpdateRemoveStickerSetEventArgs(set));\r\n\r\n                        IoC.Get<IMTProtoService>().SetMessageOnTime(2.0, AppResources.StickersRemoved);\r\n                    }),\r\n                    error =>\r\n                    Execute.BeginOnUIThread(\r\n                    () => { Execute.ShowDebugMessage(\"messages.uninstallStickerSet error \" + error); }));\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/LinksViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Text.RegularExpressions;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.EmojiPanel;\r\nusing TelegramClient.Helpers;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class LinksViewModel<T> : LinksViewModelBase<T>,\r\n        Telegram.Api.Aggregator.IHandle<TLMessageCommon>,\r\n        ISliceLoadable\r\n        where T : IInputPeer\r\n    {\r\n        public override TLInputMessagesFilterBase InputMessageFilter\r\n        {\r\n            get { return new TLInputMessagesFilterUrl(); }\r\n        }\r\n\r\n        public ObservableCollection<TimeKeyGroup<TLMessageBase>> Files { get; set; }\r\n\r\n        public string EmptyListImageSource\r\n        {\r\n            get { return  \"/Images/Messages/link.png\"; }\r\n        }\r\n\r\n        public LinksViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Files = new ObservableCollection<TimeKeyGroup<TLMessageBase>>();\r\n            Status = AppResources.Loading;\r\n            IsEmptyList = false;\r\n            Items = new ObservableCollection<TLMessage>();\r\n\r\n            DisplayName = LowercaseConverter.Convert(AppResources.SharedLinks);\r\n            EventAggregator.Subscribe(this);\r\n\r\n            PropertyChanged += (o, e) =>\r\n            {\r\n                if (Property.NameEquals(e.PropertyName, () => IsSelectionEnabled))\r\n                {\r\n                    if (!IsSelectionEnabled)\r\n                    {\r\n                        foreach (var item in Items)\r\n                        {\r\n                            item.IsSelected = false;\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            BeginOnThreadPool(LoadNextSlice);\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        private bool _isLoadingNextSlice;\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            if (_isLoadingNextSlice) return;\r\n\r\n            if (CurrentItem is TLBroadcastChat && !(CurrentItem is TLChannel))\r\n            {\r\n                Status = string.Empty;\r\n                if (Items.Count == 0)\r\n                {\r\n                    IsEmptyList = true;\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n                }\r\n                return;\r\n            }\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null && channel.MigratedFromChatId != null)\r\n            {\r\n                if (IsLastSliceLoaded)\r\n                {\r\n                    LoadNextMigratedHistorySlice();\r\n                    return;\r\n                }\r\n\r\n                var lastMessage = Items.LastOrDefault() as TLMessageCommon;\r\n                if (lastMessage != null\r\n                    && lastMessage.ToId is TLPeerChat)\r\n                {\r\n                    LoadNextMigratedHistorySlice();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (IsLastSliceLoaded)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var maxId = 0;\r\n            var lastItem = Items.LastOrDefault();\r\n            if (lastItem != null)\r\n            {\r\n                maxId = lastItem.Index;\r\n            }\r\n\r\n            IsWorking = true;\r\n            _isLoadingNextSlice = true;\r\n            MTProtoService.SearchAsync(\r\n                CurrentItem.ToInputPeer(),\r\n                TLString.Empty,\r\n                null,\r\n                InputMessageFilter,\r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(maxId), \r\n                new TLInt(Constants.FileSliceLength),\r\n                new TLInt(0),\r\n                messages =>\r\n                {\r\n                    LinkUtils.ProcessLinks(messages.Messages, _mediaWebPagesCache);\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        Status = string.Empty;\r\n                        IsWorking = false;\r\n                        _isLoadingNextSlice = false;\r\n\r\n                        AddMessages(messages.Messages.ToList());\r\n\r\n                        if (messages.Messages.Count < Constants.PhotoVideoSliceLength)\r\n                        {\r\n                            IsLastSliceLoaded = true;\r\n                            LoadNextMigratedHistorySlice();\r\n                        }\r\n\r\n                        IsEmptyList = Items.Count == 0;\r\n                        NotifyOfPropertyChange(() => IsEmptyList);\r\n                    });\r\n                },\r\n                error =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                    _isLoadingNextSlice = false;\r\n\r\n                    Execute.ShowDebugMessage(\"messages.search error \" + error);\r\n                });\r\n        }\r\n\r\n        private bool _isLastMigratedHistorySliceLoaded;\r\n\r\n        private bool _isLoadingNextMigratedHistorySlice;\r\n\r\n        private void LoadNextMigratedHistorySlice()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null || channel.MigratedFromChatId == null) return;\r\n\r\n            if (_isLastMigratedHistorySliceLoaded) return;\r\n\r\n            if (_isLoadingNextMigratedHistorySlice) return;\r\n\r\n            var maxMessageId = int.MaxValue;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var messageCommon = Items[i] as TLMessageCommon;\r\n                if (messageCommon == null) continue;\r\n\r\n                var peerChat = messageCommon.ToId as TLPeerChat;\r\n                if (peerChat == null) continue;\r\n\r\n                if (Items[i].Index != 0\r\n                    && Items[i].Index < maxMessageId)\r\n                {\r\n                    maxMessageId = Items[i].Index;\r\n                }\r\n            }\r\n\r\n            if (maxMessageId == int.MaxValue)\r\n            {\r\n                maxMessageId = channel.MigratedFromMaxId != null ? channel.MigratedFromMaxId.Value : 0;\r\n            }\r\n\r\n            _isLoadingNextMigratedHistorySlice = true;\r\n            IsWorking = true;\r\n            MTProtoService.SearchAsync(\r\n                new TLInputPeerChat { ChatId = channel.MigratedFromChatId },\r\n                TLString.Empty,\r\n                null,\r\n                InputMessageFilter,\r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(maxMessageId), \r\n                new TLInt(Constants.FileSliceLength),\r\n                new TLInt(0),\r\n                result =>\r\n                {\r\n                    LinkUtils.ProcessLinks(result.Messages, _mediaWebPagesCache);\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        _isLoadingNextMigratedHistorySlice = false;\r\n                        IsWorking = false;\r\n                        Status = string.Empty;\r\n\r\n                        if (result.Messages.Count < Constants.MessagesSlice)\r\n                        {\r\n                            _isLastMigratedHistorySliceLoaded = true;\r\n                        }\r\n\r\n                        AddMessages(result.Messages);\r\n\r\n                        IsEmptyList = Items.Count == 0;\r\n                        NotifyOfPropertyChange(() => IsEmptyList);\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _isLoadingNextMigratedHistorySlice = false;\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n\r\n                    Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                }));\r\n        }\r\n\r\n        protected override void DeleteLinksInternal(IList<TLMessageBase> messages)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < messages.Count; i++)\r\n                {\r\n                    for (var j = 0; j < Files.Count; j++)\r\n                    {\r\n                        for (var k = 0; k < Files[j].Count; k++)\r\n                        {\r\n                            if (Files[j][k].Index == messages[i].Index)\r\n                            {\r\n                                Files[j].RemoveAt(k);\r\n                                break;\r\n                            }\r\n                        }\r\n\r\n                        if (Files[j].Count == 0)\r\n                        {\r\n                            Files.RemoveAt(j--);\r\n\r\n                            if (Files.Count == 0)\r\n                            {\r\n                                Files.Clear();\r\n                            }\r\n                        }\r\n                    }\r\n                    messages[i].IsSelected = false;\r\n                    Items.Remove(messages[i]);\r\n                    if (Items.Count == 0)\r\n                    {\r\n                        IsEmptyList = true;\r\n                        NotifyOfPropertyChange(() => IsEmptyList);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private void InsertMessages(IEnumerable<TLMessageBase> messages)\r\n        {\r\n            foreach (var messageBase in messages)\r\n            {\r\n                var message = messageBase as TLMessage;\r\n                if (message == null)\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                var date = TLUtils.ToDateTime(message.Date);\r\n\r\n                var yearMonthKey = new DateTime(date.Year, date.Month, 1);\r\n                var timeKeyGroup = Files.FirstOrDefault(x => x.Key == yearMonthKey);\r\n                if (timeKeyGroup != null)\r\n                {\r\n                    timeKeyGroup.Insert(0, message);\r\n                }\r\n                else\r\n                {\r\n                    Files.Insert(0, new TimeKeyGroup<TLMessageBase>(yearMonthKey) { message });\r\n                }\r\n\r\n                Items.Insert(0, message);\r\n            }\r\n        }\r\n\r\n        private void AddMessages(IEnumerable<TLMessageBase> messages)\r\n        {\r\n            foreach (var messageBase in messages)\r\n            {\r\n                var message = messageBase as TLMessage;\r\n                if (message == null)\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                var date = TLUtils.ToDateTime(message.Date);\r\n\r\n                var yearMonthKey = new DateTime(date.Year, date.Month, 1);\r\n                var timeKeyGroup = Files.FirstOrDefault(x => x.Key == yearMonthKey);\r\n                if (timeKeyGroup != null)\r\n                {\r\n                    timeKeyGroup.Add(message);\r\n                }\r\n                else\r\n                {\r\n                    Files.Add(new TimeKeyGroup<TLMessageBase>(yearMonthKey) { message });\r\n                }\r\n\r\n                Items.Add(message);\r\n            }\r\n        }\r\n\r\n        public void Manage()\r\n        {\r\n            IsSelectionEnabled = !IsSelectionEnabled;\r\n        }\r\n\r\n        public override void Search()\r\n        {\r\n            StateService.CurrentInputPeer = CurrentItem;\r\n            var source = new List<TLMessageBase>(Items.Count);\r\n            foreach (var item in Items)\r\n            {\r\n                source.Add(item);\r\n            }\r\n\r\n            StateService.Source = source;\r\n            NavigationService.UriFor<SearchLinksViewModel>().Navigate();\r\n        }\r\n\r\n        public void Handle(TLMessageCommon message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            if (message.ToId is TLPeerUser)\r\n            {\r\n                var user = CurrentItem as TLUserBase;\r\n                if (user != null)\r\n                {\r\n                    if (!message.Out.Value\r\n                        && user.Index == message.FromId.Value)\r\n                    {\r\n                        InsertMessage(message);\r\n                    }\r\n                    else if (message.Out.Value\r\n                        && user.Index == message.ToId.Id.Value)\r\n                    {\r\n                        InsertMessage(message);\r\n                    }\r\n                }\r\n            }\r\n            else if (message.ToId is TLPeerChat)\r\n            {\r\n                var chat = CurrentItem as TLChatBase;\r\n                if (chat != null)\r\n                {\r\n                    if (chat.Index == message.ToId.Id.Value)\r\n                    {\r\n                        InsertMessage(message);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void InsertMessage(TLMessageCommon message)\r\n        {\r\n            var messagesWithLinks = LinkUtils.ProcessLinks(new List<TLMessageBase> { message }, _mediaWebPagesCache);\r\n            if (messagesWithLinks.Count > 0)\r\n            {\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    InsertMessages(messagesWithLinks);\r\n\r\n                    Status = string.Empty;\r\n                    if (Items.Count == 0)\r\n                    {\r\n                        IsEmptyList = true;\r\n                        NotifyOfPropertyChange(() => IsEmptyList);\r\n                    }\r\n                });\r\n            }\r\n        }\r\n    }\r\n\r\n    public abstract class LinksViewModelBase<T> : ItemsViewModelBase<TLMessage>,\r\n        Telegram.Api.Aggregator.IHandle<DownloadableItem>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateWebPage>,\r\n        Telegram.Api.Aggregator.IHandle<MessagesRemovedEventArgs> \r\n        where T : IInputPeer\r\n    {\r\n        public abstract TLInputMessagesFilterBase InputMessageFilter { get; }\r\n\r\n        public T CurrentItem { get; set; }\r\n\r\n        public bool IsEmptyList { get; protected set; }\r\n\r\n        private bool _isSelectionEnabled;\r\n\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return _isSelectionEnabled; }\r\n            set { SetField(ref _isSelectionEnabled, value, () => IsSelectionEnabled); }\r\n        }\r\n\r\n        public void ChangeGroupActionStatus()\r\n        {\r\n            var selectedItemsCount = Items.Count(x => x.IsSelected);\r\n            SetSelectedCountAction.SafeInvoke(selectedItemsCount);\r\n\r\n            NotifyOfPropertyChange(() => IsGroupActionEnabled);\r\n        }\r\n\r\n        public bool IsGroupActionEnabled\r\n        {\r\n            get { return Items.Any(x => x.IsSelected); }\r\n        }\r\n\r\n        public Action<int> SetSelectedCountAction;\r\n\r\n        protected LinksViewModelBase(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n\r\n        }\r\n\r\n        public abstract void Search();\r\n\r\n        public void DeleteMessage(TLMessageBase message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            var messages = new List<TLMessageBase> { message };\r\n\r\n            var owner = CurrentItem as TLObject;\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                var messageCommon = message as TLMessageCommon;\r\n                if (messageCommon != null)\r\n                {\r\n                    if (messageCommon.ToId is TLPeerChat)\r\n                    {\r\n                        DialogDetailsViewModel.DeleteMessages(MTProtoService, false, null, null, messages, null, (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                DialogDetailsViewModel.DeleteChannelMessages(MTProtoService, channel, null, null, messages, null, (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n                return;\r\n            }\r\n\r\n            if (CurrentItem is TLBroadcastChat)\r\n            {\r\n                DeleteMessagesInternal(owner, null, messages);\r\n                return;\r\n            }\r\n\r\n            if ((message.Id == null || message.Id.Value == 0) && message.RandomIndex != 0)\r\n            {\r\n                DeleteMessagesInternal(owner, null, messages);\r\n                return;\r\n            }\r\n\r\n            DialogDetailsViewModel.DeleteMessages(MTProtoService, false, null, null, messages, null, (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n        }\r\n\r\n        private void DeleteMessagesInternal(TLObject owner, TLMessageBase lastMessage, IList<TLMessageBase> messages)\r\n        {\r\n            var ids = new TLVector<TLInt>();\r\n            for (int i = 0; i < messages.Count; i++)\r\n            {\r\n                ids.Add(messages[i].Id);\r\n            }\r\n\r\n            // duplicate: deleting performed through updates\r\n            CacheService.DeleteMessages(ids);\r\n\r\n            DeleteLinksInternal(messages);\r\n\r\n            EventAggregator.Publish(new DeleteMessagesEventArgs { Owner = owner, Messages = messages });\r\n        }\r\n\r\n        protected virtual void DeleteLinksInternal(IList<TLMessageBase> messages) { }\r\n\r\n        public void DeleteMessages()\r\n        {\r\n            if (Items == null) return;\r\n\r\n            var messages = new List<TLMessageBase>();\r\n            foreach (var item in Items.Where(x => x.IsSelected))\r\n            {\r\n                messages.Add(item);\r\n            }\r\n\r\n            if (messages.Count == 0) return;\r\n\r\n            var randomItems = new List<TLMessageBase>();\r\n            var items = new List<TLMessageBase>();\r\n\r\n            TLMessageBase lastItem = null;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var message = Items[i];\r\n                if (message.IsSelected)\r\n                {\r\n                    if (message.Index == 0 && message.RandomIndex != 0)\r\n                    {\r\n                        randomItems.Add(message);\r\n                        lastItem = null;\r\n                    }\r\n                    else if (message.Index != 0)\r\n                    {\r\n                        items.Add(message);\r\n                        lastItem = null;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    if (lastItem == null)\r\n                    {\r\n                        lastItem = message;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (randomItems.Count == 0 && items.Count == 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            IsSelectionEnabled = false;\r\n\r\n            var owner = CurrentItem as TLObject;\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                var chatMessages = new List<TLMessageBase>();\r\n                var channelMessages = new List<TLMessageBase>();\r\n                if (channel.MigratedFromChatId != null)\r\n                {\r\n                    foreach (var item in items)\r\n                    {\r\n                        var message = item as TLMessageCommon;\r\n                        if (message != null && message.ToId is TLPeerChat)\r\n                        {\r\n                            chatMessages.Add(message);\r\n                        }\r\n                        else\r\n                        {\r\n                            channelMessages.Add(message);\r\n                        }\r\n                    }\r\n                }\r\n                if (chatMessages.Count > 0)\r\n                {\r\n                    DialogDetailsViewModel.DeleteChannelMessages(MTProtoService, channel, lastItem, null, channelMessages, null, (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n                    DialogDetailsViewModel.DeleteMessages(MTProtoService, false, lastItem, null, chatMessages, null, (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n\r\n                    return;\r\n                }\r\n\r\n                DialogDetailsViewModel.DeleteChannelMessages(MTProtoService, channel, lastItem, randomItems, items, (result1, result2) => DeleteMessagesInternal(owner, result1, result2), (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n\r\n                return;\r\n            }\r\n\r\n            if (CurrentItem is TLBroadcastChat)\r\n            {\r\n                DeleteMessagesInternal(owner, null, randomItems);\r\n                DeleteMessagesInternal(owner, null, items);\r\n                return;\r\n            }\r\n\r\n            DialogDetailsViewModel.DeleteMessages(MTProtoService, false, null, randomItems, items, (result1, result2) => DeleteMessagesInternal(owner, result1, result2), (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n        }\r\n\r\n        public void ForwardMessage(TLMessageBase message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            DialogDetailsViewModel.ForwardMessagesCommon(new List<TLMessageBase> { message }, StateService, NavigationService);\r\n        }\r\n\r\n        public void ForwardMessages()\r\n        {\r\n            if (Items == null) return;\r\n\r\n            var messages = new List<TLMessageBase>();\r\n            foreach (var item in Items.Where(x => x.IsSelected))\r\n            {\r\n                messages.Add(item);\r\n            }\r\n\r\n            if (messages.Count == 0) return;\r\n\r\n            IsSelectionEnabled = false;\r\n\r\n            DialogDetailsViewModel.ForwardMessagesCommon(messages, StateService, NavigationService);\r\n        }\r\n\r\n        public void OpenMedia(TLMessage message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            var mediaWebPage = message.Media as TLMessageMediaWebPage;\r\n            if (mediaWebPage != null)\r\n            {\r\n                var webPage = mediaWebPage.WebPage as TLWebPage;\r\n                if (webPage != null)\r\n                {\r\n                    var url = webPage.Url.ToString();\r\n                    OpenLink(url);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void OpenLink(string url)\r\n        {\r\n            if (!string.IsNullOrEmpty(url))\r\n            {\r\n                if (url.ToLowerInvariant().Contains(\"telegram.me\")\r\n                    || url.ToLowerInvariant().Contains(\"t.me\"))\r\n                {\r\n                    DialogDetailsViewModel.OnTelegramLinkActionCommon(MTProtoService, StateService, new TelegramEventArgs{ Uri = url }, null, null);\r\n                }\r\n                else\r\n                {\r\n                    var task = new WebBrowserTask();\r\n                    task.URL = HttpUtility.UrlEncode(url);\r\n                    task.Show();\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var webPage = item.Owner as TLWebPage;\r\n            if (webPage != null)\r\n            {\r\n                var messages = Items;\r\n                foreach (var m in messages)\r\n                {\r\n                    var media = m.Media as TLMessageMediaWebPage;\r\n                    if (media != null && media.WebPage == webPage)\r\n                    {\r\n                        media.NotifyOfPropertyChange(() => media.Photo);\r\n                        media.NotifyOfPropertyChange(() => media.Self);\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(MessagesRemovedEventArgs args)\r\n        {\r\n            var with = CurrentItem as TLObject;\r\n            if (with == args.Dialog.With && args.Messages != null)\r\n            {\r\n                DeleteLinksInternal(args.Messages);\r\n            }\r\n        }\r\n\r\n        protected readonly List<TLMessageMediaWebPage> _mediaWebPagesCache = new List<TLMessageMediaWebPage>();\r\n\r\n        public void Handle(TLUpdateWebPage updateWebPage)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < _mediaWebPagesCache.Count; i++)\r\n                {\r\n                    var mediaWebPage = _mediaWebPagesCache[i];\r\n                    if (mediaWebPage.WebPage.Id.Value == updateWebPage.WebPage.Id.Value)\r\n                    {\r\n                        mediaWebPage.WebPage = updateWebPage.WebPage;\r\n\r\n                        foreach (var item in Items)\r\n                        {\r\n                            var itemMediaWebPage = item.Media as TLMessageMediaWebPage;\r\n                            if (itemMediaWebPage != null\r\n                                && itemMediaWebPage.WebPage.Id.Value == mediaWebPage.WebPage.Id.Value)\r\n                            {\r\n                                item.NotifyOfPropertyChange(() => item.Self);\r\n                            }\r\n                        }\r\n\r\n                        _mediaWebPagesCache.RemoveAt(i--);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    public static class LinkUtils\r\n    {\r\n        public static List<TLMessageBase> ProcessLinks(IList<TLMessageBase> messages, IList<TLMessageMediaWebPage> mediaWebPagesCache)\r\n        {\r\n            const string linkPattern = \"(https?:\\\\/\\\\/)?(([A-Za-zА-Яа-яЁё0-9@][A-Za-zА-Яа-яЁё0-9@\\\\-_\\\\.]*[A-Za-zА-Яа-яЁё0-9@])(\\\\/([A-Za-zА-Яа-я0-9@\\\\-_#%&?+\\\\/\\\\.=;:~]*[^\\\\.\\\\,;\\\\(\\\\)\\\\?<\\\\&\\\\s:])?)?)\";\r\n            const string ipv4Pattern = @\"([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}\"; \r\n                //\"((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.)\\\\{3\\\\}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\";\r\n            var messagesWithLinks = new List<TLMessageBase>();\r\n            foreach (var messageBase in messages)\r\n            {\r\n                var message = messageBase as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    var text = message.Message.ToString();\r\n                    message.Links = new List<string>();\r\n                    foreach (Match m in Regex.Matches(text, linkPattern, RegexOptions.IgnoreCase))\r\n                    {\r\n                        var url = GetUrl(m);\r\n                        if (url != null)\r\n                        {\r\n                            message.Links.Add(url);\r\n                        }\r\n                    }\r\n\r\n                    foreach (Match m in Regex.Matches(text, ipv4Pattern, RegexOptions.IgnoreCase))\r\n                    {\r\n                        message.Links.Add(\"http://\" + m.Value);\r\n                    }\r\n\r\n                    var mediaEmpty = message.Media as TLMessageMediaEmpty;\r\n                    if (mediaEmpty != null)\r\n                    {\r\n                        if (message.Links.Count > 0)\r\n                        {\r\n                            var title = GetWebPageTitle(message.Links[0]);\r\n                            message.WebPageTitle = title;\r\n                        }\r\n                    }\r\n\r\n                    var mediaWebPage = message.Media as TLMessageMediaWebPage;\r\n                    if (mediaWebPage != null)\r\n                    {\r\n                        var webPage = mediaWebPage.WebPage as TLWebPage;\r\n                        if (webPage != null)\r\n                        {\r\n                            if (message.Links.Count == 0)\r\n                            {\r\n                                message.Links.Add(webPage.Url.ToString());\r\n                            }\r\n                        }\r\n\r\n                        var webPageEmpty = mediaWebPage.WebPage as TLWebPageEmpty;\r\n                        if (webPageEmpty != null)\r\n                        {\r\n                            if (message.Links.Count > 0)\r\n                            {\r\n                                var title = GetWebPageTitle(message.Links[0]);\r\n                                message.WebPageTitle = title;\r\n                            }\r\n                        }\r\n\r\n                        var webPagePending = mediaWebPage.WebPage as TLWebPagePending;\r\n                        if (webPagePending != null)\r\n                        {\r\n                            mediaWebPagesCache.Add(mediaWebPage);\r\n\r\n                            if (message.Links.Count > 0)\r\n                            {\r\n                                var title = GetWebPageTitle(message.Links[0]);\r\n                                message.WebPageTitle = title;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (message.Links.Count > 0)\r\n                    {\r\n                        messagesWithLinks.Add(messageBase);\r\n                    }\r\n                    else\r\n                    {\r\n                        \r\n                    }\r\n                }\r\n            }\r\n            return messagesWithLinks;\r\n        }\r\n\r\n        private static string GetWebPageTitle(string url)\r\n        {\r\n            Uri uri;\r\n            if (Uri.TryCreate(url, UriKind.Absolute, out uri))\r\n            {\r\n                if (!string.IsNullOrEmpty(uri.Host))\r\n                {\r\n                    var parts = uri.Host.Split('.');\r\n                    if (parts.Length >= 2)\r\n                    {\r\n                        return Language.CapitalizeFirstLetter(parts[parts.Length - 2]);\r\n                    }\r\n                }\r\n\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static string GetUrl(Match m)\r\n        {\r\n            var protocol = (m.Groups.Count > 1) ? m.Groups[1].Value : \"http://\";\r\n            if (protocol == string.Empty) protocol = \"http://\";\r\n\r\n            var url = (m.Groups.Count > 2) ? m.Groups[2].Value : string.Empty;\r\n            var domain = (m.Groups.Count > 3) ? m.Groups[3].Value : string.Empty;\r\n\r\n            if (domain.IndexOf(\".\") == -1 || domain.IndexOf(\"..\") != -1) return null;\r\n            if (url.IndexOf(\"@\") != -1) return null;\r\n\r\n            var topDomain = domain.Split('.').LastOrDefault();\r\n            if (topDomain.Length > 5 ||\r\n                !(\"guru,info,name,aero,arpa,coop,museum,mobi,travel,xxx,asia,biz,com,net,org,gov,mil,edu,int,tel,ac,ad,ae,af,ag,ai,al,am,an,ao,aq,ar,as,at,au,aw,az,ba,bb,bd,be,bf,bg,bh,bi,bj,bm,bn,bo,br,bs,bt,bv,bw,by,bz,ca,cc,cd,cf,cg,ch,ci,ck,cl,cm,cn,co,cr,cu,cv,cx,cy,cz,de,dj,dk,dm,do,dz,ec,ee,eg,eh,er,es,et,eu,fi,fj,fk,fm,fo,fr,ga,gd,ge,gf,gg,gh,gi,gl,gm,gn,gp,gq,gr,gs,gt,gu,gw,gy,hk,hm,hn,hr,ht,hu,id,ie,il,im,in,io,iq,ir,is,it,je,jm,jo,jp,ke,kg,kh,ki,km,kn,kp,kr,kw,ky,kz,la,lb,lc,li,lk,lr,ls,lt,lu,lv,ly,ma,mc,md,me,mg,mh,mk,ml,mm,mn,mo,mp,mq,mr,ms,mt,mu,mv,mw,mx,my,mz,na,nc,ne,nf,ng,ni,nl,no,np,nr,nu,nz,om,pa,pe,pf,pg,ph,pk,pl,pm,pn,pr,ps,pt,pw,py,qa,re,ro,ru,rw,sa,sb,sc,sd,se,sg,sh,si,sj,sk,sl,sm,sn,so,sr,st,su,sv,sy,sz,tc,td,tf,tg,th,tj,tk,tl,tm,tn,to,tp,tr,tt,tv,tw,tz,ua,ug,uk,um,us,uy,uz,va,vc,ve,vg,vi,vn,vu,wf,ws,ye,yt,yu,za,zm,zw,рф,cat,pro\"\r\n                    .Split(',').Contains(topDomain))) return null;\r\n\r\n            return (protocol + url);\r\n        }\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/MapViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Device.Location;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Location;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Search;\r\nusing TelegramClient.Views.Media;\r\nusing TelegramClient.Views.Search;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class MapViewModel : Screen\r\n    {\r\n        public TLObject FooterMessage\r\n        {\r\n            get\r\n            {\r\n                var message = MessageGeo as TLMessage70;\r\n                if (message != null)\r\n                {\r\n                    var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                    if (mediaGeoLive != null)\r\n                    {\r\n                        var chat = With as TLChat;\r\n                        // forbidden group\r\n                        if (chat != null && chat.IsForbidden)\r\n                        {\r\n                            return new TLMessageEmpty { Id = new TLInt(0) };\r\n                        }\r\n                        var channel = With as TLChannel;\r\n                        if (channel != null)\r\n                        {\r\n                            // forbidden megagroup\r\n                            if (channel.IsMegaGroup && channel.IsForbidden)\r\n                            {\r\n                                return new TLMessageEmpty { Id = new TLInt(0) };\r\n                            }\r\n                            // can't post to channel\r\n                            if (!channel.IsMegaGroup && !(channel.IsEditor || channel.Creator))\r\n                            {\r\n                                return new TLMessageEmpty { Id = new TLInt(0) };\r\n                            }\r\n                        }\r\n\r\n                        return MessageGeoLive;\r\n                    }\r\n                }\r\n\r\n                return MessageGeo;\r\n            }\r\n        }\r\n\r\n        public TLObject With { get; set; }\r\n\r\n        private string _status;\r\n\r\n        public string Status\r\n        {\r\n            get { return _status; }\r\n            set\r\n            {\r\n                if (_status != value)\r\n                {\r\n                    _status = value;\r\n                    NotifyOfPropertyChange(() => Status);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isWorking;\r\n\r\n        public bool IsWorking\r\n        {\r\n            get { return _isWorking; }\r\n            set\r\n            {\r\n                if (_isWorking != value)\r\n                {\r\n                    _isWorking = value;\r\n                    NotifyOfPropertyChange(() => IsWorking);\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLObject _messageGeo;\r\n\r\n        public TLObject MessageGeo\r\n        {\r\n            get { return _messageGeo; }\r\n            set\r\n            {\r\n                if (_messageGeo != value)\r\n                {\r\n                    _messageGeo = value;\r\n                    NotifyOfPropertyChange(() => MessageGeo);\r\n                    NotifyOfPropertyChange(() => FooterMessage);\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLMessageBase _messageGeoLive;\r\n\r\n        public TLMessageBase MessageGeoLive\r\n        {\r\n            get { return _messageGeoLive; }\r\n            set\r\n            {\r\n                if (_messageGeoLive != value)\r\n                {\r\n                    _messageGeoLive = value;\r\n                    NotifyOfPropertyChange(() => MessageGeoLive);\r\n                    NotifyOfPropertyChange(() => FooterMessage);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen\r\n        {\r\n            get { return _isOpen; }\r\n            protected set\r\n            {\r\n                if (_isOpen != value)\r\n                {\r\n                    _isOpen = value;\r\n                    NotifyOfPropertyChange(() => IsOpen);\r\n                }\r\n            }\r\n        }\r\n\r\n        public string PoweredBy\r\n        {\r\n            get { return \"Foursquare\"; }\r\n        }\r\n\r\n        private readonly INavigationService _navigationService;\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        public IStateService StateService { get; protected set; }\r\n\r\n        public Action<TLMessageMediaBase> ContinueAction { get; set; }\r\n\r\n        public Action<TLMessage70, System.Action> StopLiveLocationAction { get; set; }\r\n\r\n        public Action<Action<TLMessagesBase>, Action<TLRPCError>> UpdateLiveLocationsAction { get; set; }\r\n\r\n        public MapViewModel(ICacheService cacheService, IStateService stateService, INavigationService navigationService)\r\n        {\r\n            Venues = new ObservableCollection<TLMessageMediaVenue>();\r\n            LiveLocations = new List<TLMessageBase>();\r\n\r\n            StateService = stateService;\r\n            _cacheService = cacheService;\r\n            _navigationService = navigationService;\r\n        }\r\n\r\n        ~MapViewModel()\r\n        {\r\n\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                _navigationService.RemoveBackEntry();\r\n            }\r\n\r\n            if (StateService.MediaMessage != null)\r\n            {\r\n                MessageGeo = StateService.MediaMessage;\r\n                StateService.MediaMessage = null;\r\n            }\r\n\r\n            if (StateService.DecryptedMediaMessage != null)\r\n            {\r\n                var geoPoint = StateService.DecryptedMediaMessage.Media as TLDecryptedMessageMediaGeoPoint;\r\n                if (geoPoint == null) return;\r\n\r\n                MessageGeo = new TLMessage17\r\n                {\r\n                    Media = new TLMessageMediaGeo\r\n                    {\r\n                        Geo = new TLGeoPoint\r\n                        {\r\n                            Lat = geoPoint.Lat,\r\n                            Long = geoPoint.Long\r\n                        }\r\n                    },\r\n                    FromId = StateService.DecryptedMediaMessage.FromId,\r\n                };\r\n                StateService.DecryptedMediaMessage = null;\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            _navigationService.GoBack();\r\n        }\r\n\r\n        public void AttachVenue(TLMessageMediaVenue mediaVenue)\r\n        {\r\n            if (mediaVenue == null) return;\r\n\r\n            CloseEditor(true);\r\n            ContinueAction.SafeInvoke(mediaVenue);\r\n        }\r\n\r\n        public void AttchLocation(GeoCoordinate location)\r\n        {\r\n            if (location == null) return;\r\n            if (location.Latitude == 0.0 && location.Longitude == 0.0) return;\r\n\r\n            var mediaGeo = new TLMessageMediaGeo\r\n            {\r\n                Geo = new TLGeoPoint { Lat = new TLDouble(location.Latitude), Long = new TLDouble(location.Longitude) }\r\n            };\r\n\r\n            CloseEditor();\r\n            ContinueAction.SafeInvoke(mediaGeo);\r\n        }\r\n\r\n        public void AttachGeoLive(GeoCoordinate location, TimerSpan timer)\r\n        {\r\n            if (location == null) return;\r\n            if (location.Latitude == 0.0 && location.Longitude == 0.0) return;\r\n\r\n            var mediaGeoLive = new TLMessageMediaGeoLive\r\n            {\r\n                Geo = new TLGeoPoint { Lat = new TLDouble(location.Latitude), Long = new TLDouble(location.Longitude) },\r\n                Period = new TLInt(timer.Seconds)\r\n            };\r\n\r\n            CloseEditor();\r\n            ContinueAction.SafeInvoke(mediaGeoLive);\r\n        }\r\n\r\n        public void ShowMapsDirections()\r\n        {\r\n#if WP8\r\n            if (MessageGeo == null) return;\r\n\r\n            var message = MessageGeo as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var mediaVenue = message.Media as TLMessageMediaVenue;\r\n                if (mediaVenue != null)\r\n                {\r\n                    var label = mediaVenue.Title.ToString();\r\n                    if (string.IsNullOrEmpty(label)) return;\r\n\r\n                    var geoPoint = mediaVenue.Geo as TLGeoPoint;\r\n                    if (geoPoint == null) return;\r\n\r\n                    var task = new MapsDirectionsTask\r\n                    {\r\n                        End = new LabeledMapLocation(label, new GeoCoordinate(geoPoint.Lat.Value, geoPoint.Long.Value))\r\n                    };\r\n\r\n                    task.Show();\r\n\r\n                    return;\r\n                }\r\n\r\n                var mediaGeo = message.Media as TLMessageMediaGeo;\r\n                if (mediaGeo != null)\r\n                {\r\n                    var label = GetLabel();\r\n                    if (string.IsNullOrEmpty(label)) return;\r\n\r\n                    var geoPoint = mediaGeo.Geo as TLGeoPoint;\r\n                    if (geoPoint == null) return;\r\n\r\n                    var task = new MapsDirectionsTask\r\n                    {\r\n                        End = new LabeledMapLocation(label, new GeoCoordinate(geoPoint.Lat.Value, geoPoint.Long.Value))\r\n                    };\r\n\r\n                    task.Show();\r\n                }\r\n            }\r\n\r\n            var decryptedMessage = MessageGeo as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                var mediaVenue = decryptedMessage.Media as TLDecryptedMessageMediaVenue;\r\n                if (mediaVenue != null)\r\n                {\r\n                    var label = mediaVenue.Title.ToString();\r\n                    if (string.IsNullOrEmpty(label)) return;\r\n\r\n                    var geoPoint = mediaVenue.Geo as TLGeoPoint;\r\n                    if (geoPoint == null) return;\r\n\r\n                    var task = new MapsDirectionsTask\r\n                    {\r\n                        End = new LabeledMapLocation(label, new GeoCoordinate(geoPoint.Lat.Value, geoPoint.Long.Value))\r\n                    };\r\n\r\n                    task.Show();\r\n\r\n                    return;\r\n                }\r\n\r\n                var mediaGeo = decryptedMessage.Media as TLDecryptedMessageMediaGeoPoint;\r\n                if (mediaGeo != null)\r\n                {\r\n                    var label = GetLabel();\r\n                    if (string.IsNullOrEmpty(label)) return;\r\n\r\n                    var geoPoint = mediaGeo.Geo as TLGeoPoint;\r\n                    if (geoPoint == null) return;\r\n\r\n                    var task = new MapsDirectionsTask\r\n                    {\r\n                        End = new LabeledMapLocation(label, new GeoCoordinate(geoPoint.Lat.Value, geoPoint.Long.Value))\r\n                    };\r\n\r\n                    task.Show();\r\n                }\r\n            }\r\n#endif\r\n        }\r\n\r\n        private string GetLabel()\r\n        {\r\n            var message = MessageGeo as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var fwdHeader = message.FwdFrom as TLMessageFwdHeader70;\r\n                if (fwdHeader != null)\r\n                {\r\n                    var fwdChannel = fwdHeader.From as TLChatBase;\r\n                    if (fwdChannel != null)\r\n                    {\r\n                        return fwdChannel.FullName2;\r\n                    }\r\n\r\n                    var fwdUser = fwdHeader.From as TLUserBase;\r\n                    if (fwdUser != null)\r\n                    {\r\n                        return fwdUser.FullName2;\r\n                    }\r\n                }\r\n\r\n                var user = message.From as TLUserBase;\r\n                if (user != null)\r\n                {\r\n                    return user.FullName2;\r\n                }\r\n\r\n                var chat = message.From as TLChatBase;\r\n                if (chat != null)\r\n                {\r\n                    return chat.FullName2;\r\n                }\r\n            }\r\n\r\n            var decryptedMessage = MessageGeo as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                var user = decryptedMessage.From as TLUserBase;\r\n                if (user != null)\r\n                {\r\n                    return user.FullName2;\r\n                }\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public ObservableCollection<TLMessageMediaVenue> Venues { get; set; }\r\n\r\n        public TimerSpan TimerSpan { get; set; }\r\n\r\n        private GeoCoordinate _previousLocaiton;\r\n\r\n        private TLUserBase _foursquareBot;\r\n\r\n        public void GetVenues(GeoCoordinate location)\r\n        {\r\n            if (_previousLocaiton != null)\r\n            {\r\n                if (_previousLocaiton.GetDistanceTo(location) < 100.0)\r\n                {\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (_foursquareBot == null)\r\n            {\r\n                IoC.Get<IMTProtoService>().ResolveUsernameAsync(new TLString(\"foursquare\"),\r\n                    result =>\r\n                    {\r\n                        if (result.Peer is TLPeerUser && result.Users.Count > 0)\r\n                        {\r\n                            _foursquareBot = result.Users[0];\r\n                            GetVenues(location);\r\n                        }\r\n                    });\r\n\r\n                return;\r\n            }\r\n            IsWorking = true;\r\n            Status = Venues.Count > 0 ? Status : AppResources.Loading;\r\n            IoC.Get<IMTProtoService>().GetInlineBotResultsAsync(\r\n                _foursquareBot.ToInputUser(),\r\n                new TLInputPeerSelf(),\r\n                new TLInputGeoPoint { Lat = new TLDouble(location.Latitude), Long = new TLDouble(location.Longitude) },\r\n                TLString.Empty, TLString.Empty,\r\n                result =>\r\n                {\r\n                    _previousLocaiton = location;\r\n\r\n                    var venues = new List<TLMessageMediaVenue>();\r\n                    foreach (var inlineResult in result.Results)\r\n                    {\r\n                        var inlineMessageMediaVenue = inlineResult.SendMessage as TLBotInlineMessageMediaVenue78;\r\n                        if (inlineMessageMediaVenue == null) continue;\r\n\r\n                        Uri iconSource = null;\r\n                        if (!TLString.IsNullOrEmpty(inlineMessageMediaVenue.VenueType))\r\n                        {\r\n                            // get icon with provided size (32, 44, 64 or 88)\r\n                            // https://foursquare.com/img/categories_v2/food/icecream_bg_32.png\r\n                            //\r\n                            iconSource = new Uri(string.Format(Constants.FoursquireCategoryIconUrl, inlineMessageMediaVenue.VenueType, 64));\r\n                        }\r\n\r\n                        var mediaVenue = new TLMessageMediaVenue72\r\n                        {\r\n                            VenueId = inlineMessageMediaVenue.VenueId,\r\n                            Title = inlineMessageMediaVenue.Title,\r\n                            Address = inlineMessageMediaVenue.Address,\r\n                            Provider = inlineMessageMediaVenue.Provider,\r\n                            Geo = inlineMessageMediaVenue.Geo,\r\n                            VenueType = inlineMessageMediaVenue.VenueType,\r\n                            IconSource = iconSource\r\n                        };\r\n\r\n                        venues.Add(mediaVenue);\r\n                    }\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        Venues.Clear();\r\n                        foreach (var venue in venues)\r\n                        {\r\n                            Venues.Add(venue);\r\n                        }\r\n\r\n                        IsWorking = false;\r\n                        Status = Venues.Count > 0 ? AppResources.NearbyPlaces : AppResources.NoResults;\r\n                    });\r\n                },\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Venues.Clear();\r\n                    Status = AppResources.NoResults;\r\n                }));\r\n        }\r\n\r\n        public void OpenContactDetails()\r\n        {\r\n            var message = MessageGeo as TLMessage70;\r\n            if (message != null)\r\n            {\r\n                if (message.Media is TLMessageMediaVenue) return;\r\n\r\n                var fwdHeader = message.FwdHeader as TLMessageFwdHeader70;\r\n                if (fwdHeader != null)\r\n                {\r\n                    var fwdChannel = fwdHeader.From as TLChatBase;\r\n                    if (fwdChannel != null)\r\n                    {\r\n                        StateService.CurrentChat = fwdChannel;\r\n                        _navigationService.UriFor<ChatViewModel>().Navigate();\r\n                        return;\r\n                    }\r\n\r\n                    var fwdUser = fwdHeader.From as TLUserBase;\r\n                    if (fwdUser != null)\r\n                    {\r\n                        StateService.CurrentContact = fwdUser;\r\n                        _navigationService.UriFor<ContactViewModel>().Navigate();\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                StateService.CurrentContact = message.From as TLUserBase;\r\n                _navigationService.UriFor<ContactViewModel>().Navigate();\r\n            }\r\n\r\n            var decryptedMessage = MessageGeo as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                if (decryptedMessage.Media is TLDecryptedMessageMediaVenue) return;\r\n\r\n                StateService.CurrentContact = decryptedMessage.From as TLUserBase;\r\n                _navigationService.UriFor<ContactViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void SearchLocation(GeoCoordinate location)\r\n        {\r\n            StateService.GeoCoordinate = location;\r\n            _navigationService.UriFor<SearchVenuesViewModel>().Navigate();\r\n        }\r\n\r\n        public void OpenEditor()\r\n        {\r\n            IsOpen = true;\r\n        }\r\n\r\n        public void CloseEditor(bool force = false)\r\n        {\r\n            var view = GetView() as MapView;\r\n            if (view != null && !force)\r\n            {\r\n                var searchView = view.SearchPlaceholder.Content as SearchVenuesView;\r\n                if (searchView != null)\r\n                {\r\n                    view.SearchPlaceholder.Content = null;\r\n                    return;\r\n                }\r\n                if (view.MorePanel.Visibility == Visibility.Visible)\r\n                {\r\n                    view.AppBarPanel.Close();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            IsOpen = false;\r\n        }\r\n\r\n        public IList<TLMessageBase> LiveLocations { get; set; }\r\n\r\n        public void UpdateLiveLocations()\r\n        {\r\n            if (UpdateLiveLocationsAction == null) return;\r\n\r\n            UpdateLiveLocationsAction(\r\n                result =>\r\n                {\r\n                    var messages = result as TLMessages;\r\n                    if (messages != null)\r\n                    {\r\n                        LiveLocations.Clear();\r\n                        foreach (var m in messages.Messages)\r\n                        {\r\n                            LiveLocations.Add(m);\r\n                        }\r\n\r\n                        var mapView = GetView() as MapView;\r\n                        if (mapView != null)\r\n                        {\r\n                            mapView.UpdateLiveLocations();\r\n                        }\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n\r\n                });\r\n        }\r\n\r\n        public void UpdateLiveLocation(TLMessage message)\r\n        {\r\n            if (MessageGeo == null) return;\r\n\r\n            var mapView = GetView() as MapView;\r\n            if (mapView != null)\r\n            {\r\n                mapView.UpdateLiveLocation(message as TLMessage48);\r\n            }\r\n        }\r\n\r\n        public void StopLiveLocation()\r\n        {\r\n            var message = MessageGeoLive as TLMessage70;\r\n            if (message == null) return;\r\n\r\n            var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive == null) return;\r\n\r\n            CloseEditor();\r\n            StopLiveLocationAction.SafeInvoke(\r\n                message,\r\n                () =>\r\n                {\r\n                    NotifyOfPropertyChange(() => FooterMessage);\r\n                });\r\n        }\r\n\r\n        public void OnPositionChanged(GeoPosition<GeoCoordinate> position)\r\n        {\r\n            if (!position.Location.IsUnknown)\r\n            {\r\n                var message = MessageGeoLive as TLMessage70;\r\n                if (message != null)\r\n                {\r\n                    var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                    if (mediaGeoLive != null && mediaGeoLive.Active)\r\n                    {\r\n                        var geoPoint = mediaGeoLive.Geo as TLGeoPoint;\r\n                        if (geoPoint != null)\r\n                        {\r\n                            var oldLocation = new GeoCoordinate(geoPoint.Lat.Value, geoPoint.Long.Value);\r\n                            if (oldLocation.GetDistanceTo(position.Location) >= Constants.MinDistanceToUpdateLiveLocation)\r\n                            {\r\n                                var liveLocationService = IoC.Get<ILiveLocationService>();\r\n                                liveLocationService.UpdateAsync(message,\r\n                                    new TLGeoPoint\r\n                                    {\r\n                                        Lat = new TLDouble(position.Location.Latitude),\r\n                                        Long = new TLDouble(position.Location.Longitude)\r\n                                    },\r\n                                    result => Execute.BeginOnUIThread(() =>\r\n                                    {\r\n                                        mediaGeoLive.EditDate = message.EditDate;\r\n                                        mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Geo);\r\n                                        mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.EditDate);\r\n                                        mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Active);\r\n                                    }));\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void LocationSharingCompleted()\r\n        {\r\n            NotifyOfPropertyChange(() => MessageGeoLive);\r\n            NotifyOfPropertyChange(() => FooterMessage);\r\n        }\r\n\r\n        public Action<bool> ParentHitTest;\r\n\r\n        public void RestoreParentHitTest(bool restore)\r\n        {\r\n            ParentHitTest.SafeInvoke(restore);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/MediaViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class MediaViewModel<T> : ItemsViewModelBase<MessagesRow>, Telegram.Api.Aggregator.IHandle<DownloadableItem>,\r\n        ISliceLoadable\r\n        where T : IInputPeer\r\n    {\r\n        public ObservableCollection<TimeKeyGroup<MessagesRow>> Media { get; set; } \r\n\r\n        public bool IsEmptyList { get; protected set; }\r\n\r\n        public string EmptyListImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    return \"/Images/Messages/media.white-WXGA.png\";\r\n                }\r\n\r\n                return \"/Images/Messages/media.black-WXGA.png\";\r\n            }\r\n        }\r\n\r\n        public T CurrentItem { get; set; }\r\n\r\n        private readonly IFileManager _downloadFileManager;\r\n\r\n        public ImageViewerViewModel ImageViewer { get; set; }\r\n\r\n        private readonly IList<TLMessage> _items = new List<TLMessage>();\r\n\r\n        public MediaViewModel(IFileManager downloadFileManager, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            IsEmptyList = false;\r\n            Items = new ObservableCollection<MessagesRow>();\r\n            Media = new ObservableCollection<TimeKeyGroup<MessagesRow>>();\r\n            Status = AppResources.Loading;\r\n\r\n            _downloadFileManager = downloadFileManager;\r\n\r\n            DisplayName = LowercaseConverter.Convert(AppResources.Media);\r\n            EventAggregator.Subscribe(this);\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            Status = string.Empty;  //AppResources.Loading;\r\n            var limit = 25;\r\n            var messages = CacheService.GetHistory(TLUtils.InputPeerToPeer(CurrentItem.ToInputPeer(), StateService.CurrentUserId), limit);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                Items.Clear();\r\n\r\n                AddMessages(messages);\r\n\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null && channel.MigratedFromChatId != null)\r\n                {\r\n                    var lastMessage = messages != null ? messages.LastOrDefault() : null;\r\n                    if (lastMessage != null && lastMessage.Index == 1)\r\n                    {\r\n                        IsLastSliceLoaded = true;\r\n                        var chatMessages = CacheService.GetHistory(new TLPeerChat { Id = channel.MigratedFromChatId }, limit);\r\n\r\n                        AddMessages(chatMessages);\r\n                    }\r\n                }\r\n\r\n                Status = Items.Count > 0 ? string.Empty : Status;\r\n\r\n                LoadNextSlice();\r\n            });\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            base.OnInitialize();\r\n        }\r\n\r\n        private void AddMessages(IList<TLMessageBase> messages)\r\n        {\r\n            var isNewRow = false;\r\n            var row = Items.LastOrDefault();\r\n            if (row == null || row.IsFull())\r\n            {\r\n                row = new MessagesRow();\r\n                isNewRow = true;\r\n            }\r\n\r\n            for (var i = 0; i < messages.Count; i++)\r\n            {\r\n                var message = messages[i] as TLMessage;\r\n                if (message == null) continue;\r\n                if (message.HasTTL()) continue;\r\n\r\n                if (message.Media is TLMessageMediaPhoto\r\n                    || message.IsVideo())\r\n                {\r\n                    _items.Add(message);\r\n                    if (!row.AddMessage(message))\r\n                    {\r\n                        if (isNewRow)\r\n                        {\r\n                            AddToTimeKeyCollection(row);\r\n                            Items.Add(row);\r\n                        }\r\n\r\n                        row = new MessagesRow();\r\n                        isNewRow = true;\r\n                        row.AddMessage(message);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (isNewRow && !row.IsEmpty())\r\n            {\r\n                AddToTimeKeyCollection(row);\r\n                Items.Add(row);\r\n            }\r\n        }\r\n\r\n        private void AddToTimeKeyCollection(MessagesRow row)\r\n        {\r\n            var date = TLUtils.ToDateTime(row.Message1.Date);\r\n            var yearMonthKey = new DateTime(date.Year, date.Month, 1);\r\n            var timeKeyGroup = Media.FirstOrDefault(x => x.Key == yearMonthKey);\r\n            if (timeKeyGroup != null)\r\n            {\r\n                timeKeyGroup.Add(row);\r\n            }\r\n            else\r\n            {\r\n                Media.Add(new TimeKeyGroup<MessagesRow>(yearMonthKey) {row});\r\n            }\r\n        }\r\n\r\n        private bool _isLoadingNextSlice;\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            if (_isLoadingNextSlice) return;\r\n\r\n            if (CurrentItem is TLBroadcastChat && !(CurrentItem is TLChannel))\r\n            {\r\n                Status = string.Empty;\r\n                if (Items.Count == 0)\r\n                {\r\n                    IsEmptyList = true;\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n                }\r\n                return;\r\n            }\r\n\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel != null && channel.MigratedFromChatId != null)\r\n            {\r\n                if (IsLastSliceLoaded)\r\n                {\r\n                    LoadNextMigratedHistorySlice();\r\n                    return;\r\n                }\r\n\r\n                var lastMessage = _items.LastOrDefault() as TLMessageCommon;\r\n                if (lastMessage != null\r\n                    && lastMessage.ToId is TLPeerChat)\r\n                {\r\n                    LoadNextMigratedHistorySlice();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var maxId = 0;\r\n            var lastItem = _items.LastOrDefault();\r\n            if (lastItem != null)\r\n            {\r\n                maxId = lastItem.Index;\r\n            }\r\n\r\n            if (IsLastSliceLoaded) return;\r\n\r\n            IsWorking = true;\r\n            _isLoadingNextSlice = true;\r\n            MTProtoService.SearchAsync(\r\n                CurrentItem.ToInputPeer(),\r\n                TLString.Empty,\r\n                null,\r\n                new TLInputMessagesFilterPhotoVideo(),\r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(maxId), \r\n                new TLInt(Constants.PhotoVideoSliceLength),\r\n                new TLInt(0),\r\n                messages => BeginOnUIThread(() =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                    _isLoadingNextSlice = false;\r\n\r\n                    AddMessages(messages.Messages.ToList());\r\n\r\n                    if (messages.Messages.Count < Constants.PhotoVideoSliceLength)\r\n                    {\r\n                        IsLastSliceLoaded = true;\r\n                        LoadNextMigratedHistorySlice();\r\n                    }\r\n                    IsEmptyList = Items.Count == 0;\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                    _isLoadingNextSlice = false;\r\n\r\n                    Execute.ShowDebugMessage(\"messages.search error \" + error);\r\n                }));\r\n        }\r\n\r\n        private bool _isLastMigratedHistorySliceLoaded;\r\n\r\n        private bool _isLoadingNextMigratedHistorySlice;\r\n\r\n        private void LoadNextMigratedHistorySlice()\r\n        {\r\n            var channel = CurrentItem as TLChannel;\r\n            if (channel == null || channel.MigratedFromChatId == null) return;\r\n\r\n            if (_isLastMigratedHistorySliceLoaded) return;\r\n\r\n            if (_isLoadingNextMigratedHistorySlice) return;\r\n\r\n            var maxMessageId = int.MaxValue;\r\n            for (var i = 0; i < _items.Count; i++)\r\n            {\r\n                var messageCommon = _items[i] as TLMessageCommon;\r\n                if (messageCommon == null) continue;\r\n\r\n                var peerChat = messageCommon.ToId as TLPeerChat;\r\n                if (peerChat == null) continue;\r\n\r\n                if (_items[i].Index != 0\r\n                    && _items[i].Index < maxMessageId)\r\n                {\r\n                    maxMessageId = _items[i].Index;\r\n                }\r\n            }\r\n\r\n            if (maxMessageId == int.MaxValue)\r\n            {\r\n                maxMessageId = channel.MigratedFromMaxId != null ? channel.MigratedFromMaxId.Value : 0;\r\n            }\r\n\r\n            _isLoadingNextMigratedHistorySlice = true;\r\n            IsWorking = true;\r\n            MTProtoService.SearchAsync(\r\n                new TLInputPeerChat { ChatId = channel.MigratedFromChatId },\r\n                TLString.Empty,\r\n                null,\r\n                new TLInputMessagesFilterPhotoVideo(),\r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(maxMessageId), \r\n                new TLInt(Constants.PhotoVideoSliceLength),\r\n                new TLInt(0),\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    _isLoadingNextMigratedHistorySlice = false;\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n\r\n                    if (result.Messages.Count < Constants.PhotoVideoSliceLength)\r\n                    {\r\n                        _isLastMigratedHistorySliceLoaded = true;\r\n                    }\r\n\r\n                    AddMessages(result.Messages);\r\n\r\n                    IsEmptyList = Items.Count == 0;\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _isLoadingNextMigratedHistorySlice = false;\r\n                    IsWorking = false;\r\n                    Status = string.Empty;\r\n\r\n                    Execute.ShowDebugMessage(\"messages.getHistory error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void OpenMedia(TLMessage message)\r\n        {\r\n            if (message == null) return;\r\n\r\n            StateService.CurrentMediaMessages = _items;\r\n            StateService.CurrentPhotoMessage = message;\r\n\r\n            if (ImageViewer != null)\r\n            {\r\n                ImageViewer.OpenViewer();\r\n            }\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var photo = item.Owner as TLPhoto;\r\n            if (photo != null)\r\n            {\r\n                var isUpdated = false;\r\n                var messages = _items;\r\n                foreach (var m in messages)\r\n                {\r\n                    var media = m.Media as TLMessageMediaPhoto;\r\n                    if (media != null && media.Photo == photo)\r\n                    {\r\n                        media.NotifyOfPropertyChange(() => media.Photo);\r\n                        media.NotifyOfPropertyChange(() => media.Self);\r\n                        isUpdated = true;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (isUpdated) return;\r\n\r\n                var serviceMessages = Items.OfType<TLMessageService>();\r\n                foreach (var serviceMessage in serviceMessages)\r\n                {\r\n                    var editPhoto = serviceMessage.Action as TLMessageActionChatEditPhoto;\r\n                    if (editPhoto != null && editPhoto.Photo == photo)\r\n                    {\r\n                        editPhoto.NotifyOfPropertyChange(() => editPhoto.Photo);\r\n                        isUpdated = true;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var document = item.Owner as TLDocument22;\r\n            if (document != null)\r\n            {\r\n                var messages = _items;\r\n                foreach (var m in messages)\r\n                {\r\n                    var media = m.Media as TLMessageMediaDocument45;\r\n                    if (media != null && media.Video == document)\r\n                    {\r\n                        media.NotifyOfPropertyChange(() => media.Video);\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var video = item.Owner as TLVideo;\r\n            if (video != null)\r\n            {\r\n                var messages = _items;\r\n                foreach (var m in messages)\r\n                {\r\n                    var media = m.Media as TLMessageMediaVideo;\r\n                    if (media != null && media.Video == video)\r\n                    {\r\n                        media.NotifyOfPropertyChange(() => media.Video);\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var message = item.Owner as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var messages = _items;\r\n                foreach (var m in messages)\r\n                {\r\n                    var mediaDocument = m.Media as TLMessageMediaDocument45;\r\n                    if (mediaDocument != null && m == item.Owner)\r\n                    {\r\n                        m.Media.LastProgress = 0.0;\r\n                        m.Media.DownloadingProgress = 0.0;\r\n                        m.Media.IsoFileName = item.IsoFileName;\r\n                        break;\r\n                    }\r\n\r\n                    var media = m.Media as TLMessageMediaVideo;\r\n                    if (media != null && m == item.Owner)\r\n                    {\r\n                        m.Media.LastProgress = 0.0;\r\n                        m.Media.DownloadingProgress = 0.0;\r\n                        m.Media.IsoFileName = item.IsoFileName;\r\n                        break;\r\n                    }\r\n                }\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void CancelDownloading(TLPhotoBase photo)\r\n        {\r\n            _downloadFileManager.CancelDownloadFile(photo);\r\n        }\r\n\r\n        public void CancelDownloading()\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                foreach (var item in _items)\r\n                {\r\n                    var mediaPhoto = item.Media as TLMessageMediaPhoto;\r\n                    if (mediaPhoto != null)\r\n                    {\r\n                        CancelDownloading(mediaPhoto.Photo);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void CancelDownloading(MessagesRow messageRow)\r\n        {\r\n        }\r\n    }\r\n\r\n    public class MessagesRow : TelegramPropertyChangedBase\r\n    {\r\n        public TLMessage Message1 { get; set; }\r\n\r\n        public TLMessage Message2 { get; set; }\r\n\r\n        public TLMessage Message3 { get; set; }\r\n\r\n        public bool AddMessage(TLMessage message)\r\n        {\r\n            if (Message1 == null)\r\n            {\r\n                Message1 = message;\r\n                NotifyOfPropertyChange(() => Message1);\r\n                return true;\r\n            }\r\n\r\n            var date1 = TLUtils.ToDateTime(Message1.Date);\r\n            var date = TLUtils.ToDateTime(message.Date);\r\n            if (date1.Year != date.Year || date1.Month != date.Month)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (Message2 == null)\r\n            {\r\n                Message2 = message;\r\n                NotifyOfPropertyChange(() => Message2);\r\n                return true;\r\n            }\r\n\r\n            if (Message3 == null)\r\n            {\r\n                Message3 = message;\r\n                NotifyOfPropertyChange(() => Message3);\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public bool IsEmpty()\r\n        {\r\n            return Message1 == null;\r\n        }\r\n\r\n        public bool IsFull()\r\n        {\r\n            return Message3 != null;\r\n        }\r\n\r\n        public IEnumerable<TLMessage> Messages\r\n        {\r\n            get\r\n            {\r\n                if (Message1 != null) yield return Message1;\r\n                if (Message2 != null) yield return Message2;\r\n                if (Message3 != null) yield return Message3;\r\n            }\r\n        } \r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/MusicViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class MusicViewModel<T> : FilesViewModelBase<T> where T : IInputPeer\r\n    {\r\n        public override TLInputMessagesFilterBase InputMessageFilter\r\n        {\r\n            get { return new TLInputMessagesFilterMusic(); }\r\n        }\r\n\r\n        public string EmptyListImageSource\r\n        {\r\n            get { return \"/Images/Messages/nomusic.png\"; }\r\n        }\r\n\r\n        public MusicViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            DisplayName = LowercaseConverter.Convert(AppResources.SharedMusic);\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            Status = string.Empty;  //AppResources.Loading;\r\n            var limit = 25;\r\n            var messages = CacheService.GetHistory(TLUtils.InputPeerToPeer(CurrentItem.ToInputPeer(), StateService.CurrentUserId), limit);\r\n            BeginOnUIThread(() =>\r\n            {\r\n                Items.Clear();\r\n\r\n                AddMessages(messages);\r\n\r\n                var channel = CurrentItem as TLChannel;\r\n                if (channel != null && channel.MigratedFromChatId != null)\r\n                {\r\n                    var lastMessage = messages != null ? messages.LastOrDefault() : null;\r\n                    if (lastMessage != null && lastMessage.Index == 1)\r\n                    {\r\n                        IsLastSliceLoaded = true;\r\n                        var chatMessages = CacheService.GetHistory(new TLPeerChat { Id = channel.MigratedFromChatId }, limit);\r\n\r\n                        AddMessages(chatMessages);\r\n                    }\r\n                }\r\n\r\n                Status = Items.Count > 0 ? string.Empty : Status;\r\n\r\n                LoadNextSlice();\r\n            });\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        protected override bool SkipMessage(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var document = mediaDocument.Document as TLDocument22;\r\n            if (document == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var audioAttribute = document.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio46) as TLDocumentAttributeAudio46;\r\n            if (audioAttribute == null || audioAttribute.Voice)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/PivotImageViewerViewModel.cs",
    "content": "﻿using System.Collections.ObjectModel;\r\nusing Caliburn.Micro;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n\r\n    public class PivotImageViewerViewModel : PropertyChangedBase\r\n    {\r\n        private ImageViewerViewModel _activeItem;\r\n\r\n        public ImageViewerViewModel ActiveItem\r\n        {\r\n            get { return _activeItem; }\r\n            set\r\n            {\r\n                if (value != _activeItem)\r\n                {\r\n                    _activeItem = value;\r\n                    NotifyOfPropertyChange(() => ActiveItem);\r\n                }\r\n            }\r\n        }\r\n\r\n        public ObservableCollection<ImageViewerViewModel> Items { get; set; }\r\n\r\n        private IStateService _stateService; \r\n\r\n        public PivotImageViewerViewModel(IStateService stateService)\r\n        {\r\n            _stateService = stateService;\r\n\r\n            Items = new ObservableCollection<ImageViewerViewModel>();\r\n            Items.Add(FirstItem);\r\n            Items.Add(SecondItem);\r\n            Items.Add(ThirdItem);\r\n        }\r\n\r\n        public ImageViewerViewModel FirstItem { get; set; }\r\n\r\n        public ImageViewerViewModel SecondItem { get; set; }\r\n\r\n        public ImageViewerViewModel ThirdItem { get; set; }\r\n\r\n        \r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/ProfilePhotoViewerViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing Microsoft.Phone.Tasks;\r\nusing TelegramClient.Views.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class ProfilePhotoViewerViewModel : ViewAware\r\n    {\r\n        private readonly IList<TLPhotoBase> _items = new List<TLPhotoBase>();\r\n\r\n        private int _currentIndex;\r\n\r\n        private TLUserBase _currentContact;\r\n\r\n        private TLChatBase _currentChat;\r\n\r\n        public bool IsChatViewer\r\n        {\r\n            get { return _currentChat != null; }\r\n        }\r\n\r\n        public bool IsSelfViewer\r\n        {\r\n            get { return _currentContact != null && _currentContact.IsSelf; }\r\n        }\r\n\r\n        public TLPhotoBase PreviousItem { get; set; }\r\n\r\n        private TLPhotoBase _currentItem;\r\n\r\n        public TLPhotoBase CurrentItem\r\n        {\r\n            get { return _currentItem; }\r\n            set\r\n            {\r\n                if (_currentItem != value)\r\n                {\r\n                    _currentItem = value;\r\n                    NotifyOfPropertyChange(() => CurrentItem);\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLPhotoBase NextItem { get; set; }\r\n\r\n        private bool _isWorking;\r\n\r\n        public bool IsWorking\r\n        {\r\n            get { return _isWorking; }\r\n            set\r\n            {\r\n                if (_isWorking != value)\r\n                {\r\n                    _isWorking = value;\r\n                    NotifyOfPropertyChange(() => IsWorking);\r\n                }\r\n            }\r\n        }\r\n\r\n        public IStateService StateService { get; protected set; }\r\n\r\n        public IMTProtoService MTProtoService { get; protected set; }\r\n\r\n        public BindableCollection<TLPhotoBase> GroupedItems { get; set; }\r\n\r\n        public ProfilePhotoViewerViewModel(IStateService stateService, IMTProtoService mtProtoService)\r\n        {\r\n            StateService = stateService;\r\n            MTProtoService = mtProtoService;\r\n\r\n            _currentContact = StateService.CurrentContact;\r\n            _currentChat = StateService.CurrentChat;\r\n\r\n            GroupedItems = new BindableCollection<TLPhotoBase>();\r\n        }\r\n\r\n        private void SetInitState()\r\n        {\r\n            CurrentItem = StateService.CurrentPhoto;\r\n            StateService.CurrentPhoto = null;\r\n\r\n            if (StateService.CurrentContact != null)\r\n            {\r\n                _currentContact = StateService.CurrentContact;\r\n                StateService.CurrentContact = null;\r\n\r\n                IsWorking = true;\r\n                MTProtoService.GetUserPhotosAsync(_currentContact.ToInputUser(), new TLInt(0), new TLLong(0),\r\n                    new TLInt(0),\r\n                    photos => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        _currentIndex = 0;\r\n                        _items.Clear();\r\n                        foreach (var photo in photos.Photos)\r\n                        {\r\n                            _items.Add(photo);\r\n                        }\r\n\r\n                        GroupedItems.IsNotifying = false;\r\n                        GroupedItems.Clear();\r\n                        if (_items.Count > 1) GroupedItems.AddRange(_items);\r\n                        GroupedItems.IsNotifying = true;\r\n                        GroupedItems.Refresh();\r\n\r\n                        PreviousItem = _currentIndex + 1 < _items.Count ? _items[_currentIndex + 1] : null;\r\n                        NextItem = _currentIndex > 0 ? _items[_currentIndex - 1] : null;\r\n\r\n                        var view = GetView() as ProfilePhotoViewerView;\r\n                        if (view != null)\r\n                        {\r\n                            view.SetControlContent(0, NextItem);\r\n                            view.SetControlContent(2, PreviousItem);\r\n                            if (_items.Count > 0)\r\n                            {\r\n                                view.ScrollTo(_items[_currentIndex], 0.25);\r\n                            }\r\n                        }\r\n\r\n                        IsWorking = false;\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"photos.getUserPhotos error=\" + error);\r\n                    }));\r\n            }\r\n            else if (StateService.CurrentChat != null)\r\n            {\r\n                _currentChat = StateService.CurrentChat;\r\n                StateService.CurrentChat = null;\r\n\r\n                IsWorking = true;\r\n                MTProtoService.SearchAsync(\r\n                    _currentChat.ToInputPeer(),\r\n                    TLString.Empty,\r\n                    null,\r\n                    new TLInputMessagesFilterChatPhotos(),\r\n                    new TLInt(0),\r\n                    new TLInt(0),\r\n                    new TLInt(0),\r\n                    new TLInt(0),\r\n                    new TLInt(100),\r\n                    new TLInt(0),\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        _items.Clear();\r\n                        _currentIndex = -1;\r\n                        for (var i = 0; i < result.Messages.Count; i++)\r\n                        {\r\n                            var messageService = result.Messages[i] as TLMessageService;\r\n                            if (messageService != null)\r\n                            {\r\n                                var chatEditPhotoAction = messageService.Action as TLMessageActionChatEditPhoto;\r\n                                if (chatEditPhotoAction != null)\r\n                                {\r\n                                    _items.Add(chatEditPhotoAction.Photo);\r\n\r\n                                    var photo = chatEditPhotoAction.Photo as TLPhoto;\r\n                                    var currentPhoto = CurrentItem as TLPhoto;\r\n                                    var chatPhoto = CurrentItem as TLChatPhoto;\r\n                                    if (photo != null\r\n                                        && currentPhoto != null\r\n                                        && photo.Id.Value == currentPhoto.Id.Value\r\n                                        || (chatPhoto != null && ChatPhotoEquals(chatPhoto, photo)))\r\n                                    {\r\n                                        _currentIndex = _items.Count - 1;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        if (_currentIndex == -1)\r\n                        {\r\n                            if (_items.Count > 0)\r\n                            {\r\n                                _items.Insert(0, CurrentItem);\r\n                                _currentIndex = 0;\r\n                            }\r\n                        }\r\n\r\n                        GroupedItems.IsNotifying = false;\r\n                        GroupedItems.Clear();\r\n                        if (_items.Count > 1) GroupedItems.AddRange(_items);\r\n                        GroupedItems.IsNotifying = true;\r\n                        GroupedItems.Refresh();\r\n\r\n                        PreviousItem = _currentIndex + 1 < _items.Count ? _items[_currentIndex + 1] : null;\r\n                        NextItem = _currentIndex > 0 ? _items[_currentIndex - 1] : null;\r\n\r\n                        var view = GetView() as ProfilePhotoViewerView;\r\n                        if (view != null)\r\n                        {\r\n                            view.SetControlContent(0, NextItem);\r\n                            view.SetControlContent(2, PreviousItem);\r\n                            if (_items.Count > 0)\r\n                            {\r\n                                view.ScrollTo(_items[_currentIndex], 0.25);\r\n                            }\r\n                        }\r\n\r\n                        IsWorking = false;\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"messages.search error=\" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        private static bool ChatPhotoEquals(TLChatPhoto chatPhoto, TLPhoto photo)\r\n        {\r\n            if (chatPhoto != null && photo == null) return false;\r\n            if (chatPhoto == null && photo != null) return false;\r\n            if (chatPhoto == null && photo == null) return false;\r\n\r\n            var fileLocation1 = chatPhoto.PhotoSmall as TLFileLocation;\r\n            var photoSize = photo.Sizes.Count > 0 ? photo.Sizes[0] as TLPhotoSize : null;\r\n            var fileLocation2 = photoSize != null ? photoSize.Location as TLFileLocation : null;\r\n\r\n            if (fileLocation1 != null && fileLocation2 == null) return false;\r\n            if (fileLocation1 == null && fileLocation2 != null) return false;\r\n            if (fileLocation1 == null && fileLocation2 == null) return false;\r\n\r\n            if (fileLocation1.DCId.Value == fileLocation2.DCId.Value\r\n                && fileLocation1.VolumeId.Value == fileLocation2.VolumeId.Value\r\n                && fileLocation1.LocalId.Value == fileLocation2.LocalId.Value\r\n                && fileLocation1.Secret.Value == fileLocation2.Secret.Value)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public void SavePhoto()\r\n        {\r\n            SavePhotoAsync();\r\n        }\r\n\r\n        private void SavePhotoAsync(Action<string> callback = null)\r\n        {\r\n            TLFileLocation location = null;\r\n            var profilePhoto = CurrentItem as TLUserProfilePhoto;\r\n            if (profilePhoto != null)\r\n            {\r\n                location = profilePhoto.PhotoBig as TLFileLocation;\r\n            }\r\n\r\n            var photo = CurrentItem as TLPhoto;\r\n            if (photo != null)\r\n            {\r\n                TLPhotoSize size = null;\r\n                var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n                const double width = 640.0;\r\n                foreach (var photoSize in sizes)\r\n                {\r\n                    if (size == null\r\n                        || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                    {\r\n                        size = photoSize;\r\n                    }\r\n                }\r\n                if (size == null) return;\r\n\r\n                location = size.Location as TLFileLocation;\r\n            }\r\n\r\n            var chatPhoto = CurrentItem as TLChatPhoto;\r\n            if (chatPhoto != null)\r\n            {\r\n                location = chatPhoto.PhotoBig as TLFileLocation;\r\n            }\r\n\r\n            if (location == null) return;\r\n\r\n            var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                location.VolumeId,\r\n                location.LocalId,\r\n                location.Secret);\r\n\r\n            Execute.BeginOnThreadPool(() => ImageViewerViewModel.SavePhoto(fileName, callback));\r\n        }\r\n\r\n        public bool CanSlideRight\r\n        {\r\n            get { return _currentIndex > 0; }\r\n        }\r\n\r\n        public void SlideRight()\r\n        {\r\n            if (!CanSlideRight) return;\r\n\r\n            var nextItem = _items[--_currentIndex];\r\n            CurrentItem = nextItem;\r\n            PreviousItem = _currentIndex + 1 < _items.Count ? _items[_currentIndex + 1] : null;\r\n            NextItem = _currentIndex > 0 ? _items[_currentIndex - 1] : null;\r\n            NotifyOfPropertyChange(() => PreviousItem);\r\n            NotifyOfPropertyChange(() => NextItem);\r\n        }\r\n\r\n        public bool CanSlideLeft\r\n        {\r\n            get { return _currentIndex < _items.Count - 1; }\r\n        }\r\n\r\n        public void SlideLeft()\r\n        {\r\n            if (!CanSlideLeft) return;\r\n\r\n            var nextItem = _items[++_currentIndex];\r\n            CurrentItem = nextItem;\r\n            PreviousItem = _currentIndex + 1 < _items.Count ? _items[_currentIndex + 1] : null;\r\n            NextItem = _currentIndex > 0 ? _items[_currentIndex - 1] : null;\r\n            NotifyOfPropertyChange(() => PreviousItem);\r\n            NotifyOfPropertyChange(() => NextItem);\r\n        }\r\n\r\n        public void SharePhoto()\r\n        {\r\n#if WP8\r\n            SavePhotoAsync(path =>\r\n            {\r\n                var task = new ShareMediaTask { FilePath = path };\r\n                task.Show();\r\n            });\r\n#endif\r\n        }\r\n\r\n        public void DeletePhoto()\r\n        {\r\n            if (_currentContact == null || !_currentContact.IsSelf) return;\r\n            if (CurrentItem == null) return;\r\n\r\n            var currentItem = CurrentItem;\r\n            IsWorking = true;\r\n            MTProtoService.UpdateProfilePhotoAsync(new TLInputPhotoEmpty(),\r\n                result =>\r\n                {\r\n                    Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.1), () =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        if (CanSlideLeft)\r\n                        {\r\n                            var view = GetView() as ProfilePhotoViewerView;\r\n                            if (view != null)\r\n                            {\r\n                                _items.RemoveAt(_currentIndex--);\r\n                                view.SlideLeft(0.0, () =>\r\n                                {\r\n                                    view.SetControlContent(0, PreviousItem);\r\n                                    GroupedItems.Remove(currentItem);\r\n                                });\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), CloseViewer);\r\n                        }\r\n                    });\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"photos.updateProfilePhoto error \" + error);\r\n                });\r\n        }\r\n\r\n        public void SetPhoto()\r\n        {\r\n            var photo = CurrentItem as TLPhoto;\r\n            if (photo == null) return;\r\n\r\n            TLPhotoSize size = null;\r\n            var sizes = photo.Sizes.OfType<TLPhotoSize>();\r\n            const double width = 800.0;\r\n            foreach (var photoSize in sizes)\r\n            {\r\n                if (size == null\r\n                    || Math.Abs(width - size.W.Value) > Math.Abs(width - photoSize.W.Value))\r\n                {\r\n                    size = photoSize;\r\n                }\r\n            }\r\n            if (size == null) return;\r\n\r\n            var location = size.Location as TLFileLocation;\r\n            if (location == null) return;\r\n\r\n            if (_currentContact != null)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.UpdateProfilePhotoAsync(new TLInputPhoto { Id = photo.Id, AccessHash = photo.AccessHash },\r\n                    result =>\r\n                    {\r\n                        IsWorking = false;\r\n                        _items.Insert(0, result);\r\n                        _currentIndex++;\r\n                        MTProtoService.GetUserPhotosAsync(_currentContact.ToInputUser(), new TLInt(1), new TLLong(0), new TLInt(1),\r\n                            photos =>\r\n                            {\r\n                                var previousPhoto = photos.Photos.FirstOrDefault();\r\n\r\n                                if (previousPhoto != null)\r\n                                {\r\n                                    _items.RemoveAt(1);\r\n                                    _items.Insert(1, previousPhoto);\r\n                                }\r\n                            },\r\n                            error =>\r\n                            {\r\n                                Execute.ShowDebugMessage(\"photos.getUserPhotos error \" + error);\r\n                            });\r\n                    },\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"photos.updateProfilePhoto error \" + error);\r\n                    });\r\n            }\r\n            else if (_currentChat != null)\r\n            {\r\n\r\n                var channel = _currentChat as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    if (channel.Id != null)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.EditPhotoAsync(\r\n                            channel,\r\n                            new TLInputChatPhoto56\r\n                            {\r\n                                Id = new TLInputPhoto { Id = photo.Id, AccessHash = photo.AccessHash }\r\n                            },\r\n                            result => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                var updates = result as TLUpdates;\r\n                                if (updates != null)\r\n                                {\r\n                                    var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                                    if (updateNewMessage != null)\r\n                                    {\r\n                                        var serviceMessage = updateNewMessage.Message as TLMessageService;\r\n                                        if (serviceMessage != null)\r\n                                        {\r\n                                            var chatEditPhotoAction = serviceMessage.Action as TLMessageActionChatEditPhoto;\r\n                                            if (chatEditPhotoAction != null)\r\n                                            {\r\n                                                var newPhoto = chatEditPhotoAction.Photo as TLPhoto;\r\n                                                if (newPhoto != null)\r\n                                                {\r\n                                                    _items.Insert(0, newPhoto);\r\n                                                    _currentIndex++;\r\n                                                }\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }),\r\n                            error => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                Execute.ShowDebugMessage(\"messages.editChatPhoto error \" + error);\r\n                            }));\r\n                    }\r\n                }\r\n\r\n                var chat = _currentChat as TLChat;\r\n                if (chat != null)\r\n                {\r\n                    IsWorking = true;\r\n                    MTProtoService.EditChatPhotoAsync(\r\n                        chat.Id,\r\n                        new TLInputChatPhoto56\r\n                        {\r\n                            Id = new TLInputPhoto { Id = photo.Id, AccessHash = photo.AccessHash }\r\n                        },\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            var updates = result as TLUpdates;\r\n                            if (updates != null)\r\n                            {\r\n                                var updateNewMessage = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                                if (updateNewMessage != null)\r\n                                {\r\n                                    var serviceMessage = updateNewMessage.Message as TLMessageService;\r\n                                    if (serviceMessage != null)\r\n                                    {\r\n                                        var chatEditPhotoAction = serviceMessage.Action as TLMessageActionChatEditPhoto;\r\n                                        if (chatEditPhotoAction != null)\r\n                                        {\r\n                                            var newPhoto = chatEditPhotoAction.Photo as TLPhoto;\r\n                                            if (newPhoto != null)\r\n                                            {\r\n                                                _items.Insert(0, newPhoto);\r\n                                                _currentIndex++;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            Execute.ShowDebugMessage(\"messages.editChatPhoto error \" + error);\r\n                        }));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void OpenViewer()\r\n        {\r\n            SetInitState();\r\n            _isOpen = CurrentItem != null;\r\n            NotifyOfPropertyChange(() => CurrentItem);\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n        }\r\n\r\n        public void CloseViewer()\r\n        {\r\n            _isOpen = false;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n        }\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen { get { return _isOpen; } }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/SecretMediaViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.ObjectModel;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class SecretMediaViewModel : ItemsViewModelBase<TLDecryptedMessage>, Telegram.Api.Aggregator.IHandle<DownloadableItem>\r\n    {\r\n        private bool _isEmptyList;\r\n\r\n        public bool IsEmptyList\r\n        {\r\n            get { return _isEmptyList; }\r\n            set { SetField(ref _isEmptyList, value, () => IsEmptyList); }\r\n        }\r\n\r\n        public string EmptyListImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    return \"/Images/Messages/media.white-WXGA.png\";\r\n                }\r\n\r\n                return \"/Images/Messages/media.black-WXGA.png\";\r\n            }\r\n        }\r\n\r\n        public SecretMediaViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) : \r\n            base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Items = new ObservableCollection<TLDecryptedMessage>();\r\n        }\r\n\r\n        public string DisplayName\r\n        {\r\n            get { return AppResources.Media.ToLowerInvariant(); }\r\n        }\r\n\r\n        public SecretContactViewModel Contact { get; set; }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            var mediaItems = StateService.CurrentDecryptedMediaMessages;\r\n            StateService.CurrentDecryptedMediaMessages = null;\r\n\r\n            if (mediaItems != null)\r\n            {\r\n                foreach (var item in mediaItems)\r\n                {\r\n                    if (item.TTL == null || item.TTL.Value == 0)\r\n                    {\r\n                        Items.Add(item);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (Items.Count == 0)\r\n            {\r\n                IsEmptyList = true;\r\n                Status = string.Empty;\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n\r\n        public void OpenMedia(TLDecryptedMessage message)\r\n        {\r\n            if (message == null) return;\r\n            if (Contact == null) return;\r\n\r\n            if (Contact.ImageViewer == null)\r\n            {\r\n                Contact.ImageViewer = new DecryptedImageViewerViewModel(StateService);\r\n                Contact.NotifyOfPropertyChange(() => Contact.ImageViewer);\r\n            }\r\n\r\n            //var mediaPhoto = message.Media as TLMessageMediaPhoto;\r\n            //if (mediaPhoto != null)\r\n            {\r\n                StateService.CurrentDecryptedMediaMessages = Items;\r\n                StateService.CurrentDecryptedPhotoMessage = message;\r\n\r\n                if (Contact.ImageViewer != null)\r\n                {\r\n                    Contact.ImageViewer.OpenViewer();\r\n                }\r\n                //NavigationService.UriFor<ImageViewerViewModel>().Navigate();\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Handle(DownloadableItem message)\r\n        {\r\n            \r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/VideoCaptureViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class RecordedVideo\r\n    {\r\n        public string FileName { get; set; }\r\n\r\n        public TLLong FileId { get; set; }\r\n\r\n        public long Duration { get; set; }\r\n\r\n        public List<UploadablePart> Parts { get; set; } \r\n    }\r\n\r\n    public class VideoCaptureViewModel : Screen\r\n    {\r\n        private readonly INavigationService _navigationService;\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        public VideoCaptureViewModel(INavigationService navigationService, IStateService stateService)\r\n        {\r\n            _navigationService = navigationService;\r\n            _stateService = stateService;\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (_stateService.RemoveBackEntry)\r\n            {\r\n                _stateService.RemoveBackEntry = false;\r\n                _navigationService.RemoveBackEntry();\r\n            }\r\n            base.OnActivate();\r\n        }\r\n\r\n        public string VideoIsoFile { get; set; }\r\n\r\n        public long Duration { get; set; }\r\n\r\n        public void Attach(string fileName, TLLong fileId, List<UploadablePart> parts)\r\n        {\r\n            if (!string.IsNullOrEmpty(VideoIsoFile))\r\n            {\r\n                _stateService.Duration = Duration;\r\n                _stateService.VideoIsoFileName = VideoIsoFile;\r\n                _stateService.RecordedVideo = new RecordedVideo\r\n                {\r\n                    FileName = fileName,\r\n                    FileId = fileId,\r\n                    Duration = Duration,\r\n                    Parts = parts\r\n                };\r\n                _navigationService.GoBack();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Media/VideoPlayerViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class VideoPlayerViewModel : ViewModelBase\r\n    {\r\n        public string IsoFileName { get; set; }\r\n\r\n        public VideoPlayerViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            IsoFileName = StateService.IsoFileName;\r\n            StateService.IsoFileName = null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Search/ISearch.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public interface ISearch\r\n    {\r\n        void Search(string text);\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Search/SearchContactsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public class SearchContactsViewModel : ItemsViewModelBase<TLObject>, Telegram.Api.Aggregator.IHandle<DownloadableItem>\r\n    {\r\n        public bool IsNotWorking { get { return !IsWorking; } }\r\n\r\n        public Visibility ProgressVisibility { get { return IsWorking ? Visibility.Visible : Visibility.Collapsed; } }\r\n\r\n        private AddChatParticipantConfirmationViewModel _confirmation;\r\n\r\n        public AddChatParticipantConfirmationViewModel Confirmation\r\n        {\r\n            get { return _confirmation = _confirmation ?? new AddChatParticipantConfirmationViewModel(); }\r\n        }\r\n\r\n        public bool RequestForwardingCount { get; protected set; }\r\n\r\n        public bool NavigateToDialogDetails { get; protected set; }\r\n\r\n        public bool NavigateToSecretChat { get; protected set; }\r\n\r\n        public string Text { get; set; }\r\n\r\n        public string TrimmedText { get; set; }\r\n\r\n        private string _domain;\r\n\r\n        private TLDHConfig _dhConfig;\r\n\r\n        private TLUserBase _contact;\r\n\r\n        private readonly TLChatBase _currentChat;\r\n\r\n        private readonly TLChannelAdminRights _currentAdminRights;\r\n\r\n        private readonly TLChannelParticipantRoleBase _currentRole;\r\n\r\n        public TLUserBase Contact { get { return _contact; } }\r\n\r\n        public SearchContactsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Items = new ObservableCollection<TLObject>();\r\n            Status = string.Empty;\r\n\r\n            _currentChat = StateService.CurrentChat;\r\n            StateService.CurrentChat = null;\r\n\r\n            if (StateService.CurrentAdminRights != null)\r\n            {\r\n                _currentAdminRights = StateService.CurrentAdminRights;\r\n                StateService.CurrentAdminRights = null;\r\n            }\r\n\r\n            if (StateService.CurrentRole != null)\r\n            {\r\n                _currentRole = StateService.CurrentRole;\r\n                StateService.CurrentRole = null;\r\n            }\r\n\r\n            if (StateService.RequestForwardingCount)\r\n            {\r\n                RequestForwardingCount = true;\r\n                StateService.RequestForwardingCount = false;\r\n            }\r\n\r\n            if (StateService.NavigateToDialogDetails)\r\n            {\r\n                NavigateToDialogDetails = true;\r\n                StateService.NavigateToDialogDetails = false;\r\n            }\r\n\r\n            if (StateService.NavigateToSecretChat)\r\n            {\r\n                NavigateToSecretChat = true;\r\n                StateService.NavigateToSecretChat = false;\r\n                _dhConfig = StateService.DHConfig;\r\n                StateService.DHConfig = null;\r\n\r\n                if (_dhConfig == null)\r\n                {\r\n                    Execute.BeginOnThreadPool(GetDHConfig);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void CancelSecretChat()\r\n        {\r\n            _contact = null;\r\n\r\n            IsWorking = false;\r\n            NotifyOfPropertyChange(() => IsNotWorking);\r\n            NotifyOfPropertyChange(() => ProgressVisibility);\r\n        }\r\n\r\n        private volatile bool _isGettingConfig;\r\n\r\n        public void GetDHConfig()\r\n        {\r\n            _isGettingConfig = true;\r\n            MTProtoService.GetDHConfigAsync(new TLInt(0), new TLInt(0),\r\n                result =>\r\n                {\r\n                    var dhConfig = result as TLDHConfig;\r\n                    if (dhConfig == null) return;\r\n                    if (!TLUtils.CheckPrime(dhConfig.P.Data, dhConfig.G.Value))\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    var aBytes = new byte[256];\r\n                    var random = new SecureRandom();\r\n                    random.NextBytes(aBytes);\r\n                    var gaBytes = Telegram.Api.Services.MTProtoService.GetGB(aBytes, dhConfig.G, dhConfig.P);\r\n\r\n                    dhConfig.A = TLString.FromBigEndianData(aBytes);\r\n                    dhConfig.GA = TLString.FromBigEndianData(gaBytes);\r\n\r\n                    _isGettingConfig = false;\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        _dhConfig = dhConfig;\r\n\r\n                        if (_contact != null)\r\n                        {\r\n                            UserAction(_contact);\r\n                        }\r\n                    });\r\n                },\r\n                error =>\r\n                {\r\n                    _isGettingConfig = false; \r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => IsNotWorking);\r\n                    NotifyOfPropertyChange(() => ProgressVisibility);\r\n                    Execute.ShowDebugMessage(\"messages.getDhConfig error: \" + error);\r\n                });\r\n        }\r\n\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            if (StateService.NavigateToSecretChat)\r\n            {\r\n                StateService.NavigateToSecretChat = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void UserAction(TLObject obj)\r\n        {\r\n            var chatBase = obj as TLChatBase;\r\n            if (chatBase != null)\r\n            {\r\n                StateService.With = chatBase;\r\n                StateService.AnimateTitle = true;\r\n                NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n\r\n                return;\r\n            }\r\n\r\n            var userBase = obj as TLUserBase;\r\n            if (userBase == null) return;\r\n\r\n            if (NavigateToSecretChat)\r\n            {\r\n                CreateSecretChatAction(userBase);\r\n            }\r\n            else if (NavigateToDialogDetails)\r\n            {\r\n                StateService.With = userBase;\r\n                StateService.AnimateTitle = true;\r\n                NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n            }\r\n            else\r\n            {\r\n                var user = userBase as TLUser;\r\n                if (user != null && user.IsBot)\r\n                {\r\n                    if (user.IsBotGroupsBlocked)\r\n                    {\r\n                        MessageBox.Show(AppResources.AddBotToGroupsError, AppResources.Error, MessageBoxButton.OK);\r\n                        return;\r\n                    }\r\n                    var userName = user.FirstName;\r\n                    if (TLString.IsNullOrEmpty(userName))\r\n                    {\r\n                        userName = user.LastName;\r\n                    }\r\n                    var confirmation = MessageBox.Show(string.Format(AppResources.AddUserToTheGroup, userName, _currentChat.FullName), AppResources.AppName, MessageBoxButton.OKCancel);\r\n                    if (confirmation == MessageBoxResult.OK)\r\n                    {\r\n                        NavigateBackward(userBase);\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var channel = _currentChat as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    IsWorking = true;\r\n                    MTProtoService.GetParticipantAsync(channel.ToInputChannel(), userBase.ToInputUser(),\r\n                        result => BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n\r\n                            var participantKicked = result.Participant as TLChannelParticipantBanned;\r\n                            var participant = result.Participant as TLChannelParticipant;\r\n                            if (participant != null || participantKicked != null)\r\n                            {\r\n                                //if (_currentRole is TLChannelRoleEditor)\r\n                                {\r\n                                    if (participantKicked != null)\r\n                                    {\r\n                                        var confirmation = channel.IsMegaGroup\r\n                                            ? MessageBox.Show(string.Format(AppResources.InviteContactToGroupConfirmation, userBase.FullName), AppResources.AppName, MessageBoxButton.OKCancel)\r\n                                            : MessageBox.Show(string.Format(AppResources.InviteContactConfirmation, userBase.FullName), AppResources.AppName, MessageBoxButton.OKCancel);\r\n                                        if (confirmation != MessageBoxResult.OK)\r\n                                        {\r\n                                            return;\r\n                                        }\r\n                                    }\r\n\r\n                                    NavigateBackward(userBase);\r\n                                }\r\n                            }\r\n                        }),\r\n                        error => BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            Execute.ShowDebugMessage(\"channels.getParticipant error \" + error);\r\n\r\n                            if (error.TypeEquals(ErrorType.USER_NOT_PARTICIPANT))\r\n                            {\r\n                                if (_currentAdminRights != null \r\n                                    && (_currentAdminRights.InviteUsers || _currentAdminRights.InviteLinks))\r\n                                {\r\n                                    var confirmation = channel.IsMegaGroup\r\n                                        ? MessageBox.Show(string.Format(AppResources.InviteContactToGroupConfirmation, userBase.FullName), AppResources.AppName, MessageBoxButton.OKCancel)\r\n                                        : MessageBox.Show(string.Format(AppResources.InviteContactConfirmation, userBase.FullName), AppResources.AppName, MessageBoxButton.OKCancel);\r\n                                    if (confirmation != MessageBoxResult.OK)\r\n                                    {\r\n                                        return;\r\n                                    }\r\n                                }\r\n\r\n                                NavigateBackward(userBase);\r\n                            }\r\n                        }));\r\n\r\n                    return;\r\n                }\r\n\r\n                if (RequestForwardingCount)\r\n                {\r\n                    _confirmation.Open(userBase, _currentChat, \r\n                        result =>\r\n                        {\r\n                            if (result.Result == MessageBoxResult.OK)\r\n                            {\r\n                                NavigateBackward(userBase, result.ForwardingMessagesCount);\r\n                            }\r\n                        });\r\n                }\r\n                else\r\n                {\r\n                    NavigateBackward(userBase);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void CreateSecretChatAction(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            if (_dhConfig == null)\r\n            {\r\n                IsWorking = true;\r\n                NotifyOfPropertyChange(() => IsNotWorking);\r\n                NotifyOfPropertyChange(() => ProgressVisibility);\r\n                _contact = user;\r\n\r\n                //try to get dhConfig once again\r\n                if (!_isGettingConfig)\r\n                {\r\n                    GetDHConfig();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            IsWorking = false;\r\n            NotifyOfPropertyChange(() => IsNotWorking);\r\n            NotifyOfPropertyChange(() => ProgressVisibility);\r\n\r\n            AddSecretChatParticipantViewModel.CreateSecretChatCommon(user, _dhConfig, MTProtoService, CacheService, NavigationService, StateService, EventAggregator);\r\n        }\r\n\r\n        private void NavigateBackward(TLUserBase user, int forwardingMessagesCount = 0)\r\n        {\r\n            StateService.Participant = user;\r\n            StateService.ForwardingMessagesCount = forwardingMessagesCount;\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        #region Searching\r\n\r\n        private SearchUsersRequest _lastUsersRequest;\r\n\r\n        private List<TLUserBase> _source;\r\n\r\n        private readonly LRUCache<string, SearchUsersRequest> _searchResultsCache = new LRUCache<string, SearchUsersRequest>(Constants.MaxCacheCapacity); \r\n\r\n        public void Search()\r\n        {\r\n            if (_lastUsersRequest != null)\r\n            {\r\n                _lastUsersRequest.Cancel();\r\n            }\r\n\r\n            var text = Text.Trim();\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                LazyItems.Clear();\r\n                Items.Clear();\r\n                Status = string.IsNullOrEmpty(Text)? string.Empty : AppResources.NoResults;\r\n                return;\r\n            }\r\n\r\n            SearchUsersRequest nextUsersRequest;\r\n            if (!_searchResultsCache.TryGetValue(text, out nextUsersRequest))\r\n            {\r\n                IList<TLUserBase> source;\r\n\r\n                if (_lastUsersRequest != null\r\n                    && text.IndexOf(_lastUsersRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    source = _lastUsersRequest.Source;\r\n                }\r\n                else\r\n                {\r\n                    _source = _source ??\r\n                        CacheService.GetContacts()\r\n                        .Where(x => !(x is TLUserEmpty) && x.Index != StateService.CurrentUserId)\r\n                        .OrderBy(x => x.FullName)\r\n                        .ToList();\r\n\r\n                    source = _source;\r\n                }\r\n\r\n                nextUsersRequest = new SearchUsersRequest(text, source);\r\n            }\r\n            \r\n            IsWorking = true;\r\n            nextUsersRequest.ProcessAsync(results => \r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (nextUsersRequest.IsCanceled) return;\r\n\r\n                    Status = string.Empty;\r\n                    Items.Clear();\r\n                    LazyItems.Clear();\r\n                    if (results.Count > 0)\r\n                    {\r\n                        Items.Add(new TLServiceText { Text = AppResources.Contacts });\r\n                    }\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        if (i < 6)\r\n                        {\r\n                            Items.Add(results[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            LazyItems.Add(results[i]);\r\n                        }\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    //Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n\r\n                    //return;\r\n\r\n                    if (LazyItems.Count > 0)\r\n                    {\r\n                        PopulateItems(() => ProcessGlobalSearch(nextUsersRequest));\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessGlobalSearch(nextUsersRequest);\r\n                    }\r\n                }));\r\n            _searchResultsCache[nextUsersRequest.Text] = nextUsersRequest;\r\n            _lastUsersRequest = nextUsersRequest;\r\n        }\r\n\r\n        private void ProcessGlobalSearch(SearchUsersRequest nextUsersRequest)\r\n        {\r\n            if (nextUsersRequest.GlobalResults != null)\r\n            {\r\n                if (nextUsersRequest.GlobalResults.Count > 0)\r\n                {\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        if (nextUsersRequest.IsCanceled) return;\r\n\r\n                        Items.Add(new TLServiceText { Text = AppResources.GlobalSearch });\r\n                        foreach (var user in nextUsersRequest.GlobalResults)\r\n                        {\r\n                            Items.Add(user);\r\n                        }\r\n                        //Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n                    });\r\n                }\r\n            }\r\n            else\r\n            {\r\n                //if (nextUsersRequest.Text.Length < 5)\r\n                //{\r\n                //    nextUsersRequest.GlobalResults = new List<TLObject>();\r\n                //    return;\r\n                //}\r\n\r\n\r\n                MTProtoService.SearchAsync(new TLString(nextUsersRequest.Text), new TLInt(100),\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        nextUsersRequest.GlobalResults = new List<TLObject>();\r\n                        foreach (var user in result.Users)\r\n                        {\r\n                            nextUsersRequest.GlobalResults.Add(user);\r\n                        }\r\n                        var contactsFound40 = result as TLContactsFound40;\r\n                        if (contactsFound40 != null)\r\n                        {\r\n                            foreach (var chat in contactsFound40.Chats)\r\n                            {\r\n                                nextUsersRequest.GlobalResults.Add(chat);\r\n                            }\r\n                        }\r\n\r\n                        if (nextUsersRequest.IsCanceled) return;\r\n\r\n                        var items = new List<TLUserBase>();\r\n                        foreach (var user in result.Users)\r\n                        {\r\n                            if (!nextUsersRequest.ResultsIndex.ContainsKey(user.Index))\r\n                            {\r\n                                items.Add(user);\r\n                            }\r\n                        }\r\n\r\n                        if (items.Count > 0)\r\n                        {\r\n                            Items.Add(new TLServiceText { Text = AppResources.GlobalSearch });\r\n                            foreach (var user in items)\r\n                            {\r\n                                Items.Add(user);\r\n                            }\r\n                        }\r\n                        \r\n                    }),\r\n                    error =>\r\n                    {\r\n                        if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST)\r\n                            && TLRPCError.TypeEquals(error, ErrorType.QUERY_TOO_SHORT))\r\n                        {\r\n                            nextUsersRequest.GlobalResults = new List<TLObject>();\r\n                        }\r\n                        else if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                        {\r\n                            nextUsersRequest.GlobalResults = new List<TLObject>();\r\n                            BeginOnUIThread(() => MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n\r\n                        Execute.ShowDebugMessage(\"contacts.search error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var photo = item.Owner as TLUserProfilePhoto;\r\n                if (photo != null)\r\n                {\r\n                    var user = (TLUserBase)Items.FirstOrDefault(x => x is TLUserBase && ((TLUserBase)x).Photo == photo);\r\n                    if (user != null)\r\n                    {\r\n                        user.NotifyOfPropertyChange(() => user.Photo);\r\n                    }\r\n                    return;\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    public class TLServiceText : TLObject\r\n    {\r\n        public string Text { get; set; }\r\n\r\n        public string FullName { get { return Text; } }\r\n    }\r\n\r\n    public class SearchUsersRequest\r\n    {\r\n        public volatile bool IsCanceled;\r\n\r\n        public string Text { get; private set; }\r\n\r\n        public IList<TLUserBase> Source { get; private set; } \r\n\r\n        public IList<TLUserBase> Results { get; private set; }\r\n\r\n        public Dictionary<int, TLUserBase> ResultsIndex { get; private set; }\r\n\r\n        public IList<TLObject> GlobalResults { get; set; } \r\n\r\n        public SearchUsersRequest(string text, IList<TLUserBase> source)\r\n        {\r\n            Text = text;\r\n            Source = source;\r\n        }\r\n\r\n        public void ProcessAsync(Action<IList<TLUserBase>> callback)\r\n        {\r\n            if (Results != null)\r\n            {\r\n                IsCanceled = false;\r\n                callback.SafeInvoke(Results);\r\n                return;\r\n            }\r\n\r\n            var source = Source;\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var items = new List<TLUserBase>(source.Count);\r\n                var dict = new Dictionary<int, TLUserBase>();\r\n                foreach (var contact in source)\r\n                {\r\n                    var userNameContact = contact as IUserName;\r\n                    var userName = userNameContact != null ? userNameContact.UserName.ToString() : null;\r\n                    if (contact.FirstName.ToString().StartsWith(Text, StringComparison.OrdinalIgnoreCase)\r\n                        || contact.LastName.ToString().StartsWith(Text, StringComparison.OrdinalIgnoreCase)\r\n                        || contact.FullName.StartsWith(Text, StringComparison.OrdinalIgnoreCase)\r\n                        || string.Equals(userName, Text, StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        items.Add(contact);\r\n                        dict[contact.Index] = contact;\r\n                    }\r\n                }\r\n\r\n                Results = items;\r\n                ResultsIndex = dict;\r\n                callback.SafeInvoke(Results);\r\n            });\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            IsCanceled = true;\r\n        }\r\n\r\n        public void CancelAsync()\r\n        {\r\n            Execute.BeginOnThreadPool(Cancel);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Search/SearchDialogsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute; \r\n\r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public class SearchDialogsViewModel : SearchItemsViewModelBase<TLObject>\r\n    {\r\n        public string Text { get; set; }\r\n\r\n        public IList<TLDialogBase> LoadedDilaogs { get; set; }\r\n\r\n        public bool ChatsOnly { get; set; }\r\n\r\n        public Func<TLObject, bool> OpenDialogDetailsAction { get; set; } \r\n\r\n        public SearchDialogsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Items = new ObservableCollection<TLObject>();\r\n            DisplayName = LowercaseConverter.Convert(AppResources.Conversations);\r\n        }\r\n\r\n        public bool OpenDialogDetails(TLObject with)\r\n        {\r\n            return OpenDialogDetailsAction(with);\r\n        }\r\n\r\n        private string _lastText;\r\n\r\n        private IList<TLUserBase> _usersSource;\r\n\r\n        private IList<TLChatBase> _chatsSource;\r\n\r\n        private SearchDialogsRequest _lastDialogsRequest;\r\n\r\n        private readonly LRUCache<string, SearchDialogsRequest> _searchResultsCache = new LRUCache<string, SearchDialogsRequest>(Constants.MaxCacheCapacity); \r\n\r\n        public override void Search(string text)\r\n        {\r\n            if (!string.Equals(text, Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n            _lastText = text;\r\n\r\n            if (_lastDialogsRequest != null)\r\n            {\r\n                _lastDialogsRequest.Cancel();\r\n            }\r\n\r\n            var trimmedText = Text.Trim();\r\n\r\n            if (string.IsNullOrEmpty(trimmedText))\r\n            {\r\n                Items.Clear();\r\n                Status = string.IsNullOrEmpty(Text) ? AppResources.SearchAmongYourContacts : AppResources.NoResults;\r\n                return;\r\n            }\r\n\r\n            SearchDialogsRequest nextDialogsRequest;\r\n            if (!_searchResultsCache.TryGetValue(text, out nextDialogsRequest))\r\n            {\r\n                IList<TLUserBase> usersSource;\r\n\r\n                if (_lastDialogsRequest != null\r\n                    && text.IndexOf(_lastDialogsRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    usersSource = _lastDialogsRequest.UsersSource;\r\n                }\r\n                else\r\n                {\r\n                    var source = _usersSource;\r\n\r\n                    if (source == null)\r\n                    {\r\n                        source = CacheService.GetUsersForSearch(LoadedDilaogs)\r\n                        .Where(x => x != null && !(x is TLUserEmpty) && !x.IsDeleted && x.Index != StateService.CurrentUserId)\r\n                        .ToList();\r\n                    }\r\n\r\n                    _usersSource = source;\r\n\r\n                    usersSource = _usersSource;\r\n                }\r\n\r\n                IList<TLChatBase> chatsSource;\r\n\r\n                if (_lastDialogsRequest != null\r\n                    && text.IndexOf(_lastDialogsRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    chatsSource = _lastDialogsRequest.ChatsSource;\r\n                }\r\n                else\r\n                {\r\n                    _chatsSource = _chatsSource ??\r\n                        CacheService.GetChats()\r\n                        .Where(x =>\r\n                        {\r\n                            var chat = x as TLChat41;\r\n                            var channel = x as TLChannel;\r\n                            return channel != null || (chat != null && !chat.IsMigrated);\r\n                        })\r\n                        .OrderBy(x => x.FullName)\r\n                        .ToList();\r\n\r\n                    foreach (var chat in _chatsSource)\r\n                    {\r\n                        chat.FullNameWords = chat.FullName.Split(' ');\r\n                    }\r\n\r\n                    chatsSource = _chatsSource;\r\n                }\r\n\r\n                nextDialogsRequest = new SearchDialogsRequest(CacheService, text, usersSource, chatsSource);\r\n            }\r\n\r\n            IsWorking = true;\r\n            nextDialogsRequest.ProcessAsync(ChatsOnly, results =>\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (nextDialogsRequest.IsCanceled) return;\r\n                    if (!string.Equals(Text, nextDialogsRequest.Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                    const int firstSliceCount = 6;\r\n                    Items.Clear();\r\n                    var items = new List<TLObject>();\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        if (i < firstSliceCount)\r\n                        {\r\n                            Items.Add(results[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            items.Add(results[i]);\r\n                        }\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.NoResults : string.Empty;\r\n\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (!string.Equals(Text, nextDialogsRequest.Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                        foreach (var item in items)\r\n                        {\r\n                            Items.Add(item);\r\n                        }\r\n                    });\r\n                }));\r\n\r\n            _searchResultsCache[nextDialogsRequest.Text] = nextDialogsRequest;\r\n            _lastDialogsRequest = nextDialogsRequest;\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (_lastText == Text) return;\r\n            Search(Text);\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public event EventHandler CloseKeyboard;\r\n \r\n        public void RaiseCloseKeyboard()\r\n        {\r\n            var handler = CloseKeyboard;\r\n            if (handler != null)\r\n            {\r\n                CloseKeyboard(this, System.EventArgs.Empty);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class SearchDialogsRequest\r\n    {\r\n        public volatile bool IsCanceled;\r\n\r\n        public string Text { get; private set; }\r\n\r\n        public IList<TLUserBase> UsersSource { get; private set; }\r\n\r\n        public IList<TLChatBase> ChatsSource { get; private set; } \r\n\r\n        public IList<TLObject> Results { get; private set; }\r\n\r\n        private ICacheService _cacheService;\r\n\r\n        public SearchDialogsRequest(ICacheService cacheService, string text, IList<TLUserBase> usersSource, IList<TLChatBase> chatsSource)\r\n        {\r\n            _cacheService = cacheService;\r\n            Text = text;\r\n            UsersSource = usersSource;\r\n            ChatsSource = chatsSource;\r\n        }\r\n\r\n        public void ProcessAsync(bool chatsOnly, Action<IList<TLObject>> callback)\r\n        {\r\n            if (Results != null)\r\n            {\r\n                IsCanceled = false;\r\n                callback.SafeInvoke(Results);\r\n                return;\r\n            }\r\n\r\n            var usersSource = UsersSource;\r\n            var chatsSource = ChatsSource;\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var useFastSearch = !Text.Contains(\" \");\r\n\r\n                var userResults = new List<TLUserBase>(usersSource.Count);\r\n                if (!chatsOnly)\r\n                {\r\n                    foreach (var contact in usersSource)\r\n                    {\r\n                        //var userName = contact as IUserName;\r\n                        //if (userName != null \r\n                        //    && userName.UserName != null\r\n                        //    && (userName.UserName.ToString().StartsWith(Text, StringComparison.OrdinalIgnoreCase)\r\n                        //        || userName.UserName.ToString().StartsWith(Text.TrimStart('@'), StringComparison.OrdinalIgnoreCase)))\r\n                        //{\r\n                        //    userResults.Add(contact);\r\n\r\n                        //    continue;\r\n                        //}\r\n                        var added = false;\r\n                        \r\n                        if (contact.FirstName.ToString().StartsWith(Text, StringComparison.OrdinalIgnoreCase)\r\n                            || contact.LastName.ToString().StartsWith(Text, StringComparison.OrdinalIgnoreCase)\r\n                            || contact.FullName.StartsWith(Text, StringComparison.OrdinalIgnoreCase))\r\n                        {\r\n                            added = true;\r\n                            userResults.Add(contact);\r\n                        }\r\n\r\n                        if (!added)\r\n                        {\r\n                            var userNameContact = contact as IUserName;\r\n                            if (userNameContact != null)\r\n                            {\r\n                                var userName = userNameContact.UserName != null ? userNameContact.UserName.ToString() : string.Empty;\r\n                                if (userName.StartsWith(Text, StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    userResults.Add(contact);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var chatsResults = new List<TLChatBase>(chatsSource.Count);\r\n\r\n                foreach (var chat in chatsSource)\r\n                {\r\n                    var added = false;\r\n                    if (!useFastSearch)\r\n                    {\r\n                        var fullName = chat.FullName;\r\n\r\n                        var i = fullName.IndexOf(Text, StringComparison.OrdinalIgnoreCase);\r\n                        if (i != -1)\r\n                        {\r\n                            while (i < fullName.Length && i != -1)\r\n                            {\r\n                                if (i == 0 || (i > 0 && fullName[i - 1] == ' '))\r\n                                {\r\n                                    added = true;\r\n                                    chatsResults.Add(chat);\r\n                                    break;\r\n                                }\r\n                                if (fullName.Length > i + 1)\r\n                                {\r\n                                    i = fullName.IndexOf(Text, i + 1, StringComparison.OrdinalIgnoreCase);\r\n                                }\r\n                                else\r\n                                {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        if (chat.FullNameWords != null\r\n                            && chat.FullNameWords.Any(x => x.StartsWith(Text, StringComparison.OrdinalIgnoreCase)))\r\n                        {\r\n                            added = true;\r\n                            chatsResults.Add(chat);\r\n                        }\r\n                    }\r\n\r\n                    if (!added)\r\n                    {\r\n                        var userNameChannel = chat as IUserName;\r\n                        if (userNameChannel != null)\r\n                        {\r\n                            var userName = userNameChannel.UserName != null ? userNameChannel.UserName.ToString() : string.Empty;\r\n                            if (userName.StartsWith(Text, StringComparison.OrdinalIgnoreCase))\r\n                            {\r\n                                chatsResults.Add(chat);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                Results = new List<TLObject>(userResults.Count + chatsResults.Count);\r\n                foreach (var userResult in userResults)\r\n                {\r\n                    Results.Add(userResult);\r\n                    if (userResult.Dialog == null)\r\n                    {\r\n                        userResult.Dialog = _cacheService.GetDialog(new TLPeerUser { Id = userResult.Id });\r\n                    }\r\n                }\r\n                foreach (var chatsResult in chatsResults)\r\n                {\r\n                    Results.Add(chatsResult);\r\n                    if (chatsResult.Dialog == null)\r\n                    {\r\n                        chatsResult.Dialog = _cacheService.GetDialog(new TLPeerChat { Id = chatsResult.Id });\r\n                    }\r\n                }\r\n\r\n                callback.SafeInvoke(Results);\r\n            });\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            IsCanceled = true;\r\n        }\r\n\r\n        public void CancelAsync()\r\n        {\r\n            Execute.BeginOnThreadPool(Cancel);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Search/SearchFilesViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing Telegram.Api.Aggregator;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public class SearchFilesViewModel : FilesViewModelBase<IInputPeer>\r\n    {\r\n        public string Text { get; set; }\r\n\r\n        public override TLInputMessagesFilterBase InputMessageFilter\r\n        {\r\n            get { return new TLInputMessagesFilterDocument(); }\r\n        }\r\n\r\n        public SearchFilesViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Status = AppResources.SearchAmongYourFiles;\r\n\r\n            if (StateService.CurrentInputPeer != null)\r\n            {\r\n                CurrentItem = StateService.CurrentInputPeer;\r\n                StateService.CurrentInputPeer = null;\r\n            }\r\n\r\n            if (StateService.Source != null)\r\n            {\r\n                _source = StateService.Source;\r\n                StateService.Source = null;\r\n            }\r\n        }\r\n\r\n        protected override bool SkipMessage(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var document = mediaDocument.Document as TLDocument;\r\n            if (document == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (message.IsSticker()\r\n                || document.FileName.ToString().EndsWith(\".webp\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (message.IsGif())\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (message.IsMusic())\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (message.IsVoice())\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (message.IsVideo())\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        #region Searching\r\n\r\n        private SearchDocumentsRequest _lastDocumentsRequest;\r\n\r\n        private readonly List<TLMessageBase> _source;\r\n\r\n        private readonly LRUCache<string, SearchDocumentsRequest> _searchResultsCache = new LRUCache<string, SearchDocumentsRequest>(Constants.MaxCacheCapacity);\r\n\r\n        public void Search()\r\n        {\r\n            if (_lastDocumentsRequest != null)\r\n            {\r\n                _lastDocumentsRequest.Cancel();\r\n            }\r\n\r\n            var text = Text.Trim();\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                LazyItems.Clear();\r\n                Items.Clear();\r\n                Status = string.IsNullOrEmpty(Text) ? AppResources.SearchAmongYourFiles : AppResources.NoResults;\r\n                return;\r\n            }\r\n\r\n            SearchDocumentsRequest nextDocumentsRequest;\r\n            if (!_searchResultsCache.TryGetValue(text, out nextDocumentsRequest))\r\n            {\r\n                IList<TLMessageBase> source;\r\n\r\n                if (_lastDocumentsRequest != null\r\n                    && text.IndexOf(_lastDocumentsRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    source = _lastDocumentsRequest.Source;\r\n                }\r\n                else\r\n                {\r\n                    source = _source;\r\n                }\r\n\r\n                nextDocumentsRequest = new SearchDocumentsRequest(CurrentItem.ToInputPeer(), text, source);\r\n            }\r\n\r\n            IsWorking = true;\r\n            nextDocumentsRequest.ProcessAsync(results =>\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (nextDocumentsRequest.IsCanceled) return;\r\n\r\n                    Status = results.Count > 0 ? string.Empty : Status;\r\n                    Items.Clear();\r\n                    LazyItems.Clear();\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        if (i < 6)\r\n                        {\r\n                            Items.Add((TLMessage) results[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            LazyItems.Add((TLMessage) results[i]);\r\n                        }\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n\r\n                    if (LazyItems.Count > 0)\r\n                    {\r\n                        PopulateItems(() => ProcessGlobalSearch(nextDocumentsRequest));\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessGlobalSearch(nextDocumentsRequest);\r\n                    }\r\n                }));\r\n\r\n            _searchResultsCache[nextDocumentsRequest.Text] = nextDocumentsRequest;\r\n            _lastDocumentsRequest = nextDocumentsRequest;\r\n        }\r\n\r\n        private void ProcessGlobalSearch(SearchDocumentsRequest nextDocumentsRequest)\r\n        {\r\n            if (nextDocumentsRequest.GlobalResults != null)\r\n            {\r\n                if (nextDocumentsRequest.GlobalResults.Count > 0)\r\n                {\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        if (nextDocumentsRequest.IsCanceled) return;\r\n\r\n                        foreach (var result in nextDocumentsRequest.GlobalResults)\r\n                        {\r\n                            Items.Add((TLMessage) result);\r\n                        }\r\n                        NotifyOfPropertyChange(() => IsEmptyList);\r\n                        Status = Items.Count > 0 ? string.Empty : AppResources.NoResults;\r\n                    });\r\n                }\r\n            }\r\n            else\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.SearchAsync(\r\n                    nextDocumentsRequest.InputPeer,\r\n                    new TLString(nextDocumentsRequest.Text),\r\n                    null,\r\n                    InputMessageFilter,\r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(100),\r\n                    new TLInt(0),\r\n                    result =>\r\n                    {\r\n                        IsWorking = false;\r\n                        nextDocumentsRequest.GlobalResults = new List<TLMessageBase>(result.Messages.Count);\r\n\r\n                        foreach (var message in result.Messages)\r\n                        {\r\n                            if (nextDocumentsRequest.ResultsIndex == null\r\n                                || !nextDocumentsRequest.ResultsIndex.ContainsKey(message.Index))\r\n                            {\r\n                                nextDocumentsRequest.GlobalResults.Add(message);\r\n                            }\r\n                        }\r\n\r\n\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            if (nextDocumentsRequest.IsCanceled) return;\r\n\r\n                            if (nextDocumentsRequest.GlobalResults.Count > 0)\r\n                            {\r\n                                foreach (var message in nextDocumentsRequest.GlobalResults)\r\n                                {\r\n                                    Items.Add((TLMessage) message);\r\n                                }\r\n                                NotifyOfPropertyChange(() => IsEmptyList);\r\n                            }\r\n\r\n                            Status = Items.Count > 0 ? string.Empty : AppResources.NoResults;\r\n                        });\r\n\r\n                    },\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST)\r\n                            && TLRPCError.TypeEquals(error, ErrorType.QUERY_TOO_SHORT))\r\n                        {\r\n                            nextDocumentsRequest.GlobalResults = new List<TLMessageBase>();\r\n                        }\r\n                        else if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                        {\r\n                            nextDocumentsRequest.GlobalResults = new List<TLMessageBase>();\r\n                            BeginOnUIThread(() => MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n\r\n                        Execute.ShowDebugMessage(\"messages.search error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        #endregion\r\n    }\r\n\r\n    public class SearchDocumentsRequest\r\n    {\r\n        public volatile bool IsCanceled;\r\n\r\n        public TLInputPeerBase InputPeer { get; private set; }\r\n\r\n        public string Text { get; private set; }\r\n\r\n        public IList<TLMessageBase> Source { get; private set; }\r\n\r\n        public IList<TLMessageBase> Results { get; private set; }\r\n\r\n        public Dictionary<int, int> ResultsIndex { get; private set; } \r\n\r\n        public IList<TLMessageBase> GlobalResults { get; set; }\r\n\r\n        public SearchDocumentsRequest(TLInputPeerBase inputPeer, string text, IList<TLMessageBase> source)\r\n        {\r\n            InputPeer = inputPeer;\r\n            Text = text;\r\n            Source = source;\r\n        }\r\n\r\n        public void ProcessAsync(Action<IList<TLMessageBase>> callback)\r\n        {\r\n            if (Results != null)\r\n            {\r\n                IsCanceled = false;\r\n                callback.SafeInvoke(Results);\r\n                return;\r\n            }\r\n\r\n            var source = Source;\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var items = new List<TLMessageBase>(source.Count);\r\n                var itemsIndex = new Dictionary<int, int>(source.Count);\r\n                foreach (var messageBase in source)\r\n                {\r\n                    var message = messageBase as TLMessage;\r\n                    if (message == null) continue;\r\n\r\n                    var mediaDocument = message.Media as TLMessageMediaDocument;\r\n                    if (mediaDocument == null) continue;\r\n\r\n                    var document = mediaDocument.Document as TLDocument;\r\n                    if (document == null) continue;\r\n\r\n                    var fileName = document.FileName.ToString();\r\n                    if (string.IsNullOrEmpty(fileName)) continue;\r\n\r\n                    if (fileName.IndexOf(Text, StringComparison.OrdinalIgnoreCase) >= 0)\r\n                    {\r\n                        itemsIndex[messageBase.Index] = messageBase.Index;\r\n                        items.Add(messageBase);\r\n                    }\r\n                }\r\n                ResultsIndex = itemsIndex;\r\n                Results = items;\r\n                callback.SafeInvoke(Results);\r\n            });\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            IsCanceled = true;\r\n        }\r\n\r\n        public void CancelAsync()\r\n        {\r\n            Execute.BeginOnThreadPool(Cancel);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Search/SearchItemsViewModelBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public abstract class SearchItemsViewModelBase<T> : ItemsViewModelBase<T>, ISearch where T : TLObject\r\n    {\r\n        protected SearchItemsViewModelBase(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n        }\r\n\r\n        public abstract void Search(string text);\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Search/SearchLinksViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public class SearchLinksViewModel : LinksViewModelBase<IInputPeer>\r\n    {\r\n        public string Text { get; set; }\r\n\r\n        public override TLInputMessagesFilterBase InputMessageFilter\r\n        {\r\n            get { return new TLInputMessagesFilterUrl(); }\r\n        }\r\n\r\n        public SearchLinksViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Status = AppResources.SearchSharedLinks;\r\n\r\n            if (StateService.CurrentInputPeer != null)\r\n            {\r\n                CurrentItem = StateService.CurrentInputPeer;\r\n                StateService.CurrentInputPeer = null;\r\n            }\r\n\r\n            if (StateService.Source != null)\r\n            {\r\n                _source = StateService.Source;\r\n                StateService.Source = null;\r\n            }\r\n        }\r\n\r\n        #region Searching\r\n\r\n        private SearchDocumentsRequest _lastDocumentsRequest;\r\n\r\n        private readonly List<TLMessageBase> _source;\r\n\r\n        private readonly LRUCache<string, SearchDocumentsRequest> _searchResultsCache = new LRUCache<string, SearchDocumentsRequest>(Constants.MaxCacheCapacity);\r\n\r\n        public override void Search()\r\n        {\r\n            if (_lastDocumentsRequest != null)\r\n            {\r\n                _lastDocumentsRequest.Cancel();\r\n            }\r\n\r\n            var text = Text.Trim();\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                LazyItems.Clear();\r\n                Items.Clear();\r\n                Status = string.IsNullOrEmpty(Text) ? AppResources.SearchSharedLinks : AppResources.NoResults;\r\n                return;\r\n            }\r\n\r\n            SearchDocumentsRequest nextDocumentsRequest;\r\n            if (!_searchResultsCache.TryGetValue(text, out nextDocumentsRequest))\r\n            {\r\n                IList<TLMessageBase> source;\r\n\r\n                if (_lastDocumentsRequest != null\r\n                    && text.IndexOf(_lastDocumentsRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    source = _lastDocumentsRequest.Source;\r\n                }\r\n                else\r\n                {\r\n                    source = _source;\r\n                }\r\n\r\n                nextDocumentsRequest = new SearchDocumentsRequest(CurrentItem.ToInputPeer(), text, source);\r\n            }\r\n\r\n            IsWorking = true;\r\n            nextDocumentsRequest.ProcessAsync(results =>\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (nextDocumentsRequest.IsCanceled) return;\r\n\r\n                    Status = results.Count > 0 ? string.Empty : Status;\r\n                    Items.Clear();\r\n                    LazyItems.Clear();\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        if (i < 6)\r\n                        {\r\n                            Items.Add((TLMessage) results[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            LazyItems.Add((TLMessage) results[i]);\r\n                        }\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n\r\n                    if (LazyItems.Count > 0)\r\n                    {\r\n                        PopulateItems(() => ProcessGlobalSearch(nextDocumentsRequest));\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessGlobalSearch(nextDocumentsRequest);\r\n                    }\r\n                }));\r\n\r\n            _searchResultsCache[nextDocumentsRequest.Text] = nextDocumentsRequest;\r\n            _lastDocumentsRequest = nextDocumentsRequest;\r\n        }\r\n\r\n        private void ProcessGlobalSearch(SearchDocumentsRequest nextDocumentsRequest)\r\n        {\r\n            if (nextDocumentsRequest.GlobalResults != null)\r\n            {\r\n                if (nextDocumentsRequest.GlobalResults.Count > 0)\r\n                {\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        if (nextDocumentsRequest.IsCanceled) return;\r\n\r\n                        foreach (var result in nextDocumentsRequest.GlobalResults)\r\n                        {\r\n                            Items.Add((TLMessage) result);\r\n                        }\r\n                        NotifyOfPropertyChange(() => IsEmptyList);\r\n                        Status = Items.Count > 0 ? string.Empty : AppResources.NoResults;\r\n                    });\r\n                }\r\n            }\r\n            else\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.SearchAsync(\r\n                    nextDocumentsRequest.InputPeer, \r\n                    new TLString(nextDocumentsRequest.Text), \r\n                    null,\r\n                    new TLInputMessagesFilterUrl(), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(100),\r\n                    new TLInt(0),\r\n                    result =>\r\n                    {\r\n                        LinkUtils.ProcessLinks(result.Messages, _mediaWebPagesCache);\r\n\r\n                        nextDocumentsRequest.GlobalResults = new List<TLMessageBase>(result.Messages.Count);\r\n\r\n                        foreach (var message in result.Messages)\r\n                        {\r\n                            if (nextDocumentsRequest.ResultsIndex == null\r\n                                || !nextDocumentsRequest.ResultsIndex.ContainsKey(message.Index))\r\n                            {\r\n                                nextDocumentsRequest.GlobalResults.Add(message);\r\n                            }\r\n                        }\r\n\r\n\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            if (nextDocumentsRequest.IsCanceled) return;\r\n\r\n                            if (nextDocumentsRequest.GlobalResults.Count > 0)\r\n                            {\r\n                                foreach (var message in nextDocumentsRequest.GlobalResults)\r\n                                {\r\n                                    Items.Add((TLMessage) message);\r\n                                }\r\n                                NotifyOfPropertyChange(() => IsEmptyList);\r\n                            }\r\n\r\n                            Status = Items.Count > 0 ? string.Empty : AppResources.NoResults;\r\n                        });\r\n\r\n                    },\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST)\r\n                            && TLRPCError.TypeEquals(error, ErrorType.QUERY_TOO_SHORT))\r\n                        {\r\n                            nextDocumentsRequest.GlobalResults = new List<TLMessageBase>();\r\n                        }\r\n                        else if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                        {\r\n                            nextDocumentsRequest.GlobalResults = new List<TLMessageBase>();\r\n                            BeginOnUIThread(() => MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n\r\n                        Execute.ShowDebugMessage(\"messages.search error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Search/SearchMessagesViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public class SearchMessagesViewModel : SearchItemsViewModelBase<TLDialog>, Telegram.Api.Aggregator.IHandle<DownloadableItem>\r\n    {\r\n        public List<TLMessageBase> ForwardMessages { get; set; } \r\n\r\n        public SearchMessagesViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Items = new ObservableCollection<TLDialog>();\r\n            DisplayName = LowercaseConverter.Convert(AppResources.Messages);\r\n\r\n            EventAggregator.Subscribe(this);\r\n        }\r\n\r\n        private string _lastText;\r\n\r\n        private Dictionary<int, TLMessage> _lastCache; \r\n\r\n        public string Text { get; set; }\r\n\r\n        private int _offset;\r\n\r\n        private bool _isLastSliceLoaded;\r\n\r\n        private const int Limit = 40;\r\n\r\n        public override void Search(string text)\r\n        {\r\n            _lastText = text;\r\n            Status = string.Empty;\r\n            Items.Clear();\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                Status = AppResources.NoResults;\r\n                return;\r\n            }\r\n\r\n            var messages = CacheService.GetMessages().OfType<TLMessage>();\r\n\r\n            var cache = new Dictionary<int, TLMessage>();\r\n            LazyItems.Clear();\r\n            foreach (var message in messages)\r\n            {\r\n                if (message.Message.Value.IndexOf(text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    var dialog = CacheService.GetDialog(message);\r\n                    LazyItems.Add(new TLDialog24{With = dialog.With, TopMessage = message});\r\n                    cache[message.Index] = message;\r\n                }\r\n            }\r\n\r\n            IsWorking = true;\r\n            _offset = 0;\r\n            _isLastSliceLoaded = false;\r\n            MTProtoService.SearchAsync(\r\n                new TLInputPeerEmpty(), \r\n                new TLString(text), \r\n                null,\r\n                new TLInputMessagesFilterEmpty(), \r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(_offset), \r\n                new TLInt(0), \r\n                new TLInt(Limit),\r\n                new TLInt(0),\r\n                result =>\r\n                {\r\n                    CacheService.AddChats(result.Chats, results => { });\r\n                    CacheService.AddUsers(result.Users, results => { });\r\n\r\n                    _offset += Limit;\r\n                    IsWorking = false;\r\n\r\n                    var newMessages = result as TLMessages;\r\n                    if (newMessages != null)\r\n                    {\r\n                        foreach (var message in newMessages.Messages.OfType<TLMessageCommon>())\r\n                        {\r\n                            if (cache.ContainsKey(message.Index)) continue;\r\n\r\n                            var dialog = new TLDialog {TopMessage = message};\r\n                            var peer = TLUtils.GetPeerFromMessage(message);\r\n                            if (peer is TLPeerUser)\r\n                            {\r\n                                var user = newMessages.Users.FirstOrDefault(x => x.Index == peer.Id.Value);\r\n                                if (user == null)\r\n                                {\r\n                                    continue;\r\n                                }\r\n                                dialog.With = user;\r\n                            }\r\n                            else if (peer is TLPeerChat)\r\n                            {\r\n                                var chat = newMessages.Chats.FirstOrDefault(x => x.Index == peer.Id.Value);\r\n                                if (chat == null)\r\n                                {\r\n                                    continue;\r\n                                }\r\n\r\n                                dialog.With = chat;\r\n                            }\r\n                            else if (peer is TLPeerChannel)\r\n                            {\r\n                                var channel = newMessages.Chats.FirstOrDefault(x => x.Index == peer.Id.Value);\r\n                                if (channel == null)\r\n                                {\r\n                                    continue;\r\n                                }\r\n\r\n                                dialog.With = channel;\r\n                            }\r\n                            LazyItems.Add(dialog);\r\n                        }\r\n                    }\r\n\r\n                    _lastCache = cache;\r\n                    if (Items.Count == 0 && LazyItems.Count == 0) Status = AppResources.NoResults;\r\n\r\n                    Deployment.Current.Dispatcher.BeginInvoke(PopulateItems);\r\n\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                });\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(PopulateItems);\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (_lastText == Text) return;\r\n\r\n            Search(Text);\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void OpenDialogDetails(TLDialog dialog)\r\n        {\r\n            if (dialog == null) return;\r\n\r\n            StateService.Message = dialog.TopMessage;\r\n            StateService.RemoveBackEntry = true;\r\n            StateService.With = dialog.With;\r\n            StateService.ForwardMessages = ForwardMessages; \r\n            if (ForwardMessages != null)\r\n            {\r\n                StateService.RemoveBackEntries = true;\r\n            }\r\n            StateService.AnimateTitle = true;\r\n            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n        }\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            if (IsWorking) return;\r\n            //if (LazyItems.Count > 0) return;\r\n            if (_isLastSliceLoaded) return;\r\n\r\n            var cache = _lastCache;\r\n            var text = _lastText;\r\n            IsWorking = true;\r\n            MTProtoService.SearchAsync(\r\n                new TLInputPeerEmpty(),\r\n                new TLString(_lastText),\r\n                null,\r\n                new TLInputMessagesFilterEmpty(),\r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInt(_offset), \r\n                new TLInt(0), \r\n                new TLInt(Limit),\r\n                new TLInt(0),\r\n                result =>\r\n                {\r\n                    CacheService.AddChats(result.Chats, results => { });\r\n                    CacheService.AddUsers(result.Users, results => { });\r\n\r\n                    IsWorking = false;\r\n\r\n                    if (text != _lastText) return;\r\n\r\n                    _offset += Limit;\r\n                    _isLastSliceLoaded = result.Messages.Count < Limit;\r\n\r\n                    var dialogs = new List<TLDialog>(result.Messages.Count);\r\n                    var newMessages = result as TLMessages;\r\n                    if (newMessages != null)\r\n                    {\r\n                        foreach (var message in newMessages.Messages.OfType<TLMessageCommon>())\r\n                        {\r\n                            if (cache != null\r\n                                && cache.ContainsKey(message.Index)) continue;\r\n\r\n                            var dialog = new TLDialog { TopMessage = message };\r\n                            var peer = TLUtils.GetPeerFromMessage(message);\r\n                            if (peer is TLPeerUser)\r\n                            {\r\n                                var user = newMessages.Users.FirstOrDefault(x => x.Index == peer.Id.Value);\r\n                                if (user == null)\r\n                                {\r\n                                    continue;\r\n                                }\r\n                                dialog.With = user;\r\n                            }\r\n                            else if (peer is TLPeerChat)\r\n                            {\r\n                                var chat = newMessages.Chats.FirstOrDefault(x => x.Index == peer.Id.Value);\r\n                                if (chat == null)\r\n                                {\r\n                                    continue;\r\n                                }\r\n\r\n                                dialog.With = chat;\r\n                            }\r\n                            dialogs.Add(dialog);\r\n                            //LazyItems.Add(dialog);\r\n                        }\r\n                    }\r\n\r\n                    if (Items.Count == 0 && dialogs.Count == 0 && LazyItems.Count == 0) Status = AppResources.NoResults;\r\n\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        foreach (var dialog in dialogs)\r\n                        {\r\n                            Items.Add(dialog);\r\n                        }\r\n                    });\r\n                    //Deployment.Current.Dispatcher.BeginInvoke(PopulateItems);\r\n\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                });\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var photo = item.Owner as TLUserProfilePhoto;\r\n            if (photo != null)\r\n            {\r\n                var dialog = Items.FirstOrDefault(x => x.With is TLUserBase && ((TLUserBase)x.With).Photo == photo);\r\n                if (dialog != null)\r\n                {\r\n                    dialog.NotifyOfPropertyChange(() => dialog.With);\r\n                }\r\n                return;\r\n            }\r\n\r\n            var chatPhoto = item.Owner as TLChatPhoto;\r\n            if (chatPhoto != null)\r\n            {\r\n                var dialog = Items.FirstOrDefault(x => x.With is TLChat && ((TLChat)x.With).Photo == chatPhoto);\r\n                if (dialog != null)\r\n                {\r\n                    dialog.NotifyOfPropertyChange(() => dialog.With);\r\n                }\r\n                return;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Search/SearchMusicViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public class SearchMusicViewModel : FilesViewModelBase<IInputPeer>\r\n    {\r\n        public string Text { get; set; }\r\n\r\n        public override TLInputMessagesFilterBase InputMessageFilter\r\n        {\r\n            get { return new TLInputMessagesFilterMusic(); }\r\n        }\r\n\r\n        public SearchMusicViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Status = AppResources.SearchSharedMusic;\r\n\r\n            if (StateService.CurrentInputPeer != null)\r\n            {\r\n                CurrentItem = StateService.CurrentInputPeer;\r\n                StateService.CurrentInputPeer = null;\r\n            }\r\n\r\n            if (StateService.Source != null)\r\n            {\r\n                _source = StateService.Source;\r\n                StateService.Source = null;\r\n            }\r\n        }\r\n\r\n        protected override bool SkipMessage(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var document = mediaDocument.Document as TLDocument22;\r\n            if (document == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var audioAttribute = document.Attributes.FirstOrDefault(x => x is TLDocumentAttributeAudio46) as TLDocumentAttributeAudio46;\r\n            if (audioAttribute == null || audioAttribute.Voice)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        #region Searching\r\n\r\n        private SearchDocumentsRequest _lastDocumentsRequest;\r\n\r\n        private readonly List<TLMessageBase> _source;\r\n\r\n        private readonly LRUCache<string, SearchDocumentsRequest> _searchResultsCache = new LRUCache<string, SearchDocumentsRequest>(Constants.MaxCacheCapacity);\r\n\r\n        public void Search()\r\n        {\r\n            if (_lastDocumentsRequest != null)\r\n            {\r\n                _lastDocumentsRequest.Cancel();\r\n            }\r\n\r\n            var text = Text.Trim();\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                LazyItems.Clear();\r\n                Items.Clear();\r\n                Status = string.IsNullOrEmpty(Text) ? AppResources.SearchAmongYourFiles : AppResources.NoResults;\r\n                return;\r\n            }\r\n\r\n            SearchDocumentsRequest nextDocumentsRequest;\r\n            if (!_searchResultsCache.TryGetValue(text, out nextDocumentsRequest))\r\n            {\r\n                IList<TLMessageBase> source;\r\n\r\n                if (_lastDocumentsRequest != null\r\n                    && text.IndexOf(_lastDocumentsRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    source = _lastDocumentsRequest.Source;\r\n                }\r\n                else\r\n                {\r\n                    source = _source;\r\n                }\r\n\r\n                nextDocumentsRequest = new SearchDocumentsRequest(CurrentItem.ToInputPeer(), text, source);\r\n            }\r\n\r\n            IsWorking = true;\r\n            nextDocumentsRequest.ProcessAsync(results =>\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (nextDocumentsRequest.IsCanceled) return;\r\n\r\n                    Status = results.Count > 0 ? string.Empty : Status;\r\n                    Items.Clear();\r\n                    LazyItems.Clear();\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        if (i < 6)\r\n                        {\r\n                            Items.Add((TLMessage)results[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            LazyItems.Add((TLMessage)results[i]);\r\n                        }\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n\r\n                    if (LazyItems.Count > 0)\r\n                    {\r\n                        PopulateItems(() => ProcessGlobalSearch(nextDocumentsRequest));\r\n                    }\r\n                    else\r\n                    {\r\n                        ProcessGlobalSearch(nextDocumentsRequest);\r\n                    }\r\n                }));\r\n\r\n            _searchResultsCache[nextDocumentsRequest.Text] = nextDocumentsRequest;\r\n            _lastDocumentsRequest = nextDocumentsRequest;\r\n        }\r\n\r\n        private void ProcessGlobalSearch(SearchDocumentsRequest nextDocumentsRequest)\r\n        {\r\n            if (nextDocumentsRequest.GlobalResults != null)\r\n            {\r\n                if (nextDocumentsRequest.GlobalResults.Count > 0)\r\n                {\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        if (nextDocumentsRequest.IsCanceled) return;\r\n\r\n                        foreach (var result in nextDocumentsRequest.GlobalResults)\r\n                        {\r\n                            Items.Add((TLMessage)result);\r\n                        }\r\n                        NotifyOfPropertyChange(() => IsEmptyList);\r\n                        Status = Items.Count > 0 ? string.Empty : AppResources.NoResults;\r\n                    });\r\n                }\r\n            }\r\n            else\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.SearchAsync(\r\n                    nextDocumentsRequest.InputPeer,\r\n                    new TLString(nextDocumentsRequest.Text),\r\n                    null,\r\n                    InputMessageFilter,\r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(100),\r\n                    new TLInt(0),\r\n                    result =>\r\n                    {\r\n                        IsWorking = false;\r\n                        nextDocumentsRequest.GlobalResults = new List<TLMessageBase>(result.Messages.Count);\r\n\r\n                        foreach (var message in result.Messages)\r\n                        {\r\n                            if (nextDocumentsRequest.ResultsIndex == null\r\n                                || !nextDocumentsRequest.ResultsIndex.ContainsKey(message.Index))\r\n                            {\r\n                                nextDocumentsRequest.GlobalResults.Add(message);\r\n                            }\r\n                        }\r\n\r\n\r\n                        BeginOnUIThread(() =>\r\n                        {\r\n                            if (nextDocumentsRequest.IsCanceled) return;\r\n\r\n                            if (nextDocumentsRequest.GlobalResults.Count > 0)\r\n                            {\r\n                                foreach (var message in nextDocumentsRequest.GlobalResults)\r\n                                {\r\n                                    Items.Add((TLMessage)message);\r\n                                }\r\n                                NotifyOfPropertyChange(() => IsEmptyList);\r\n                            }\r\n\r\n                            Status = Items.Count > 0 ? string.Empty : AppResources.NoResults;\r\n                        });\r\n\r\n                    },\r\n                    error =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST)\r\n                            && TLRPCError.TypeEquals(error, ErrorType.QUERY_TOO_SHORT))\r\n                        {\r\n                            nextDocumentsRequest.GlobalResults = new List<TLMessageBase>();\r\n                        }\r\n                        else if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                        {\r\n                            nextDocumentsRequest.GlobalResults = new List<TLMessageBase>();\r\n                            BeginOnUIThread(() => MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n\r\n                        Execute.ShowDebugMessage(\"messages.search error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Search/SearchShellViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Windows.Storage;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public class SearchShellViewModel : Conductor<ISearch>.Collection.OneActive\r\n    {\r\n        private string _text;\r\n\r\n        public string Text\r\n        {\r\n            get { return _text; }\r\n            set\r\n            {\r\n                if (value != _text)\r\n                {\r\n                    _text = value;\r\n                    NotifyOfPropertyChange(() => ShowRecent);\r\n                    Search();\r\n                }\r\n            }\r\n        }\r\n\r\n        public string SearchHint { get; set; }\r\n\r\n        public SearchDialogsViewModel SearchDialogs { get; protected set; }\r\n\r\n        public SearchMessagesViewModel SearchMessages { get; protected set; }\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        private readonly INavigationService _navigationService;\r\n\r\n        private readonly string _hashtag;\r\n\r\n        private static TLVector<TLResultInfo> _recentResults;\r\n\r\n        public ObservableCollection<TLObject> Recent { get; set; }\r\n\r\n        public bool ShowRecent\r\n        {\r\n            get { return Recent.Count > 0 && string.IsNullOrEmpty(Text); }\r\n        }\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        private readonly object _recentSyncRoot = new object();\r\n\r\n        private readonly TLUserBase _bot;\r\n\r\n        private readonly List<TLMessageBase> _forwardMessages;\r\n\r\n        private readonly TLUserBase _sharedContact;\r\n\r\n        private readonly string _gameString;\r\n\r\n        private readonly string _accessToken;\r\n\r\n        private readonly string _logFileName;\r\n\r\n        private readonly Uri _webLink;\r\n\r\n        private readonly IReadOnlyList<IStorageItem> _storageItems;\r\n\r\n        private readonly string _url;\r\n\r\n        private readonly string _urlText;\r\n\r\n        private readonly TLKeyboardButtonSwitchInline _switchInlineButton;\r\n\r\n        public SearchShellViewModel(ICacheService cacheService, IStateService stateService, INavigationService navigationService, SearchDialogsViewModel searchDialogs, SearchMessagesViewModel searchMessages)\r\n        {\r\n            _cacheService = cacheService;\r\n\r\n            Recent = new ObservableCollection<TLObject>();\r\n\r\n            var forwardMessages = stateService.ForwardMessages;\r\n            var sharedContact = stateService.SharedContact;\r\n            var logFileName = stateService.LogFileName;\r\n            var gameString = stateService.GameString;\r\n            var accessToken = stateService.AccessToken;\r\n            var bot = stateService.Bot;\r\n            var webLink = stateService.WebLink;\r\n            var storageItems = stateService.StorageItems;\r\n            var url = stateService.Url;\r\n            var urlText = stateService.UrlText;\r\n            var loadedDialogs = stateService.LoadedDialogs;\r\n            var switchInlineButton = stateService.SwitchInlineButton;\r\n            stateService.ForwardMessages = null;\r\n            stateService.LogFileName = null;\r\n            stateService.SharedContact = null;\r\n            stateService.GameString = null;\r\n            stateService.AccessToken = null;\r\n            stateService.Bot = null;\r\n            stateService.WebLink = null;\r\n            stateService.StorageItems = null;\r\n            stateService.Url = null;\r\n            stateService.UrlText = null;\r\n            stateService.LoadedDialogs = null;\r\n            stateService.SwitchInlineButton = null;\r\n\r\n            _forwardMessages = forwardMessages;\r\n            _sharedContact = sharedContact;\r\n            _logFileName = logFileName;\r\n            _gameString = gameString;\r\n            _accessToken = accessToken;\r\n            _bot = bot;\r\n            _webLink = webLink;\r\n            _storageItems = storageItems;\r\n            _url = url;\r\n            _urlText = urlText;\r\n            _switchInlineButton = switchInlineButton;\r\n\r\n            SearchDialogs = searchDialogs;\r\n            SearchDialogs.ChatsOnly = bot != null;\r\n            SearchDialogs.LoadedDilaogs = loadedDialogs;\r\n            SearchDialogs.OpenDialogDetailsAction = OpenDialogDetails;\r\n\r\n            SearchMessages = searchMessages;\r\n            SearchMessages.ForwardMessages = forwardMessages;\r\n\r\n            _stateService = stateService;\r\n            _navigationService = navigationService;\r\n\r\n            if (_stateService.Hashtag != null)\r\n            {\r\n                _hashtag = _stateService.Hashtag;\r\n                _stateService.Hashtag = null;\r\n            }\r\n\r\n            SearchHint = GetSearchHint();\r\n        }\r\n\r\n        public TLMessage34 GetMessage(TLObject With, TLInputPeerBase Peer, TLString text, TLMessageMediaBase media)\r\n        {\r\n            var broadcast = With as TLBroadcastChat;\r\n            var channel = With as TLChannel;\r\n            var toId = channel != null\r\n                ? new TLPeerChannel { Id = channel.Id }\r\n                : broadcast != null\r\n                ? new TLPeerBroadcast { Id = broadcast.Id }\r\n                : TLUtils.InputPeerToPeer(Peer, IoC.Get<IStateService>().CurrentUserId);\r\n\r\n            var date = TLUtils.DateToUniversalTimeTLInt(IoC.Get<IMTProtoService>().ClientTicksDelta, DateTime.Now);\r\n\r\n            var message = TLUtils.GetMessage(\r\n                new TLInt(IoC.Get<IStateService>().CurrentUserId),\r\n                toId,\r\n                broadcast != null && channel == null ? MessageStatus.Broadcast : MessageStatus.Sending,\r\n                TLBool.True,\r\n                TLBool.True,\r\n                date,\r\n                text,\r\n                media,\r\n                TLLong.Random(),\r\n                new TLInt(0)\r\n            );\r\n\r\n            return message;\r\n        }\r\n\r\n        public bool OpenDialogDetails(TLObject with)\r\n        {\r\n            if (with == null) return false;\r\n\r\n            if (_forwardMessages != null)\r\n            {\r\n                var channel = with as TLChannel;\r\n                if (channel != null && channel.IsBroadcast && !channel.Creator && !channel.IsEditor)\r\n                {\r\n                    MessageBox.Show(AppResources.PostToChannelError, AppResources.Error, MessageBoxButton.OK);\r\n\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            var result = MessageBoxResult.OK;\r\n\r\n            if (_logFileName != null)\r\n            {\r\n                result = MessageBox.Show(AppResources.ForwardMessagesToThisChat, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            }\r\n\r\n            if (_webLink != null || _storageItems != null || _gameString != null)\r\n            {\r\n                var fullName = string.Empty;\r\n                var chat = with as TLChatBase;\r\n                var user = with as TLUserBase;\r\n                if (chat != null) fullName = chat.FullName2;\r\n                if (user != null) fullName = user.FullName2;\r\n\r\n                if (_gameString != null)\r\n                {\r\n                    result = MessageBox.Show(string.Format(AppResources.ShareGameWith, fullName), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                }\r\n                else\r\n                {\r\n                    result = MessageBox.Show(string.Format(AppResources.ShareWith, fullName), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                }\r\n            }\r\n\r\n            if (_bot != null)\r\n            {\r\n                var chat = with as TLChat;\r\n                var channel = with as TLChannel;\r\n                if (chat == null && (channel == null || !channel.IsMegaGroup))\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var chatName = chat != null ? chat.FullName : channel.FullName;\r\n                result = MessageBox.Show(string.Format(AppResources.AddBotToTheGroup, chatName), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            }\r\n\r\n            if (result != MessageBoxResult.OK)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            if (_gameString != null)\r\n            {\r\n                var inputPeer = with as IInputPeer;\r\n                if (inputPeer == null) return false;\r\n\r\n                var mediaGame = new TLMessageMediaGame\r\n                {\r\n                    Game = new TLGame\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Id = new TLLong(0),\r\n                        AccessHash = new TLLong(0),\r\n                        ShortName = new TLString(_gameString),\r\n                        Title = new TLString(_gameString),\r\n                        Description = TLString.Empty,\r\n                        Photo = new TLPhotoEmpty { Id = new TLLong(0) }\r\n                    }\r\n                };\r\n                var message = GetMessage(with, inputPeer.ToInputPeer(), TLString.Empty, mediaGame);\r\n                mediaGame.SourceMessage = message;\r\n                IoC.Get<ICacheService>().SyncSendingMessage(message, null, m =>\r\n                {\r\n                    //IsWorking = true;\r\n                    IoC.Get<IMTProtoService>().SendMediaAsync(inputPeer.ToInputPeer(), new TLInputMediaGame { Id = new TLInputGameShortName { ShortName = new TLString(_gameString), BotId = _sharedContact.ToInputUser() } }, message,\r\n                        updatesBase => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            var updates = updatesBase as TLUpdates;\r\n                            if (updates != null)\r\n                            {\r\n                                var newChannelMessageUpdate = updates.Updates.FirstOrDefault(x => x is TLUpdateNewChannelMessage) as TLUpdateNewChannelMessage;\r\n                                if (newChannelMessageUpdate != null)\r\n                                {\r\n                                    var messageCommon = newChannelMessageUpdate.Message as TLMessageCommon;\r\n                                    if (messageCommon != null)\r\n                                    {\r\n                                        var dialog = IoC.Get<ICacheService>().GetDialog(messageCommon);\r\n                                        if (dialog != null)\r\n                                        {\r\n                                            IoC.Get<ITelegramEventAggregator>().Publish(new TopMessageUpdatedEventArgs(dialog, messageCommon));\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                var newMessageUpdate = updates.Updates.FirstOrDefault(x => x is TLUpdateNewMessage) as TLUpdateNewMessage;\r\n                                if (newMessageUpdate != null)\r\n                                {\r\n                                    var messageCommon = newMessageUpdate.Message as TLMessageCommon;\r\n                                    if (messageCommon != null)\r\n                                    {\r\n                                        var dialog = IoC.Get<ICacheService>().GetDialog(messageCommon);\r\n                                        if (dialog != null)\r\n                                        {\r\n                                            IoC.Get<ITelegramEventAggregator>().Publish(new TopMessageUpdatedEventArgs(dialog, messageCommon));\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            //IsWorking = false;\r\n                            IoC.Get<INavigationService>().RemoveBackEntry();\r\n                            IoC.Get<INavigationService>().GoBack();\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            //IsWorking = false;\r\n                            Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.sendMedia error=\" + error);\r\n                        }));\r\n                });\r\n\r\n                return false;\r\n            }\r\n\r\n            _stateService.RemoveBackEntry = true;\r\n            _stateService.With = with;\r\n            _stateService.ForwardMessages = _forwardMessages;\r\n            _stateService.RemoveBackEntries = true;\r\n            _stateService.LogFileName = _logFileName;\r\n            _stateService.SharedContact = _sharedContact;\r\n            _stateService.AccessToken = _accessToken;\r\n            _stateService.Bot = _bot;\r\n            _stateService.WebLink = _webLink;\r\n            _stateService.StorageItems = _storageItems;\r\n            _stateService.Url = _url;\r\n            _stateService.UrlText = _urlText;\r\n            _stateService.SwitchInlineButton = _switchInlineButton;\r\n            _stateService.AnimateTitle = true;\r\n            _navigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n\r\n            SaveRecent(with);\r\n            return true;\r\n        }\r\n\r\n        public void ClearRecent()\r\n        {\r\n            Recent.Clear();\r\n            NotifyOfPropertyChange(() => ShowRecent);\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var recentResults = new TLVector<TLResultInfo>();\r\n                _recentResults = recentResults;\r\n                TLUtils.SaveObjectToMTProtoFile(_recentSyncRoot, Constants.RecentSearchResultsFileName, recentResults);\r\n            });\r\n        }\r\n\r\n        public void SaveRecent(TLObject with)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var recentResults = _recentResults ?? new TLVector<TLResultInfo>();\r\n\r\n                var id = GetId(with);\r\n                var type = GetType(with);\r\n                if (id == null || type == null) return;\r\n\r\n                var isAdded = false;\r\n                for (var i = 0; i < recentResults.Count; i++)\r\n                {\r\n                    var recentResult = recentResults[i];\r\n\r\n                    if (recentResults[i].Id.Value == id.Value\r\n                        && recentResults[i].Type.ToString() == type.ToString())\r\n                    {\r\n                        recentResults[i].Count = new TLLong(recentResults[i].Count.Value + 1);\r\n\r\n                        var newPosition = i;\r\n                        for (var j = i - 1; j >= 0; j--)\r\n                        {\r\n                            if (recentResults[j].Count.Value <= recentResults[i].Count.Value)\r\n                            {\r\n                                newPosition = j;\r\n                            }\r\n                        }\r\n\r\n                        if (i != newPosition)\r\n                        {\r\n                            recentResults.RemoveAt(i);\r\n                            recentResults.Insert(newPosition, recentResult);\r\n                        }\r\n                        isAdded = true;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (!isAdded)\r\n                {\r\n                    var recentResult = new TLResultInfo\r\n                    {\r\n                        Id = id,\r\n                        Type = type,\r\n                        Count = new TLLong(1)\r\n                    };\r\n\r\n                    for (var i = 0; i < recentResults.Count; i++)\r\n                    {\r\n                        if (recentResults[i].Count.Value <= 1)\r\n                        {\r\n                            recentResults.Insert(i, recentResult);\r\n                            isAdded = true;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (!isAdded)\r\n                    {\r\n                        recentResults.Add(recentResult);\r\n                    }\r\n                }\r\n\r\n                _recentResults = recentResults;\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_recentSyncRoot, Constants.RecentSearchResultsFileName, recentResults);\r\n            });\r\n        }\r\n\r\n        private static TLString GetType(TLObject with)\r\n        {\r\n            return with is TLUserBase ? new TLString(\"user\") : new TLString(\"chat\");\r\n        }\r\n\r\n        private static TLInt GetId(TLObject with)\r\n        {\r\n            var user = with as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                return user.Id;\r\n            }\r\n            var chat = with as TLChatBase;\r\n            if (chat != null)\r\n            {\r\n                return chat.Id;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private string GetSearchHint()\r\n        {\r\n            if (SearchDialogs != null && (_forwardMessages != null || _webLink != null || _storageItems != null))\r\n            {\r\n                return AppResources.SearchAmongYourChats;\r\n            }\r\n\r\n            if (_hashtag != null)\r\n            {\r\n                return AppResources.SearchMessages;\r\n            }\r\n\r\n            return AppResources.SearchAmongYourDialogsAndMessages;\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            //disable dialogs search for hashtags\r\n            if (_hashtag == null)\r\n            {\r\n                Items.Add(SearchDialogs);\r\n            }\r\n            // disable messages search for forwarding and bots (tg://resolve?domain=username&start=access_token, tg://resolve?domain=username&startgroup=access_token)\r\n            if (_forwardMessages == null\r\n                && _bot == null\r\n                && _url == null\r\n                && _webLink == null\r\n                && _storageItems == null\r\n                && _gameString == null)\r\n            {\r\n                Items.Add(SearchMessages);\r\n            }\r\n\r\n            if (_hashtag != null)\r\n            {\r\n                ActivateItem(SearchMessages);\r\n            }\r\n            else\r\n            {\r\n                ActivateItem(SearchDialogs);\r\n            }\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            var text = Text;\r\n\r\n            if (string.IsNullOrEmpty(text)) return;\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n            {\r\n                if (!string.Equals(text, Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                SearchDialogs.Text = Text;\r\n                SearchMessages.Text = Text;\r\n\r\n                ActiveItem.Search(Text);\r\n            });\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (_stateService.RemoveBackEntry)\r\n                {\r\n                    _stateService.RemoveBackEntry = true;\r\n                    _navigationService.RemoveBackEntry();\r\n                }\r\n            });\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                Text = _hashtag;\r\n                NotifyOfPropertyChange(() => Text);\r\n            });\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _recentResults = _recentResults ?? TLUtils.OpenObjectFromMTProtoFile<TLVector<TLResultInfo>>(_recentSyncRoot, Constants.RecentSearchResultsFileName) ?? new TLVector<TLResultInfo>();\r\n\r\n                var recent = new List<TLObject>();\r\n                foreach (var result in _recentResults)\r\n                {\r\n                    if (result.Type.ToString() == \"user\")\r\n                    {\r\n                        var user = _cacheService.GetUser(result.Id);\r\n                        if (user != null)\r\n                        {\r\n                            if (user.Dialog == null)\r\n                            {\r\n                                user.Dialog = _cacheService.GetDialog(new TLPeerUser { Id = user.Id });\r\n                            }\r\n\r\n                            if (!ChooseDialogViewModel.SkipDialogForBot(_bot, user.Dialog ?? new TLDialog { With = user }))\r\n                            {\r\n                                recent.Add(user);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (result.Type.ToString() == \"chat\")\r\n                    {\r\n                        var chat = _cacheService.GetChat(result.Id);\r\n                        if (chat != null)\r\n                        {\r\n                            if (chat.Dialog == null)\r\n                            {\r\n                                chat.Dialog = _cacheService.GetDialog(new TLPeerChat { Id = chat.Id });\r\n                            }\r\n\r\n                            if (!ChooseDialogViewModel.SkipDialogForBot(_bot, chat.Dialog ?? new TLDialog { With = chat }))\r\n                            {\r\n                                recent.Add(chat);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (!string.IsNullOrEmpty(Text)) return;\r\n\r\n                    Recent.Clear();\r\n                    foreach (var recentItem in recent)\r\n                    {\r\n                        Recent.Add(recentItem);\r\n                    }\r\n\r\n                    NotifyOfPropertyChange(() => ShowRecent);\r\n                });\r\n            });\r\n        }\r\n\r\n        public void ClearSearchHistory()\r\n        {\r\n            var result = MessageBox.Show(AppResources.ClearSearchHistoryConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (result == MessageBoxResult.OK)\r\n            {\r\n                ClearRecent();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Search/SearchVenuesViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Device.Location;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public class SearchVenuesViewModel : ItemsViewModelBase<TLObject>\r\n    {\r\n        public bool IsNotWorking { get { return !IsWorking; } }\r\n\r\n        private string _text;\r\n\r\n        public string Text\r\n        {\r\n            get { return _text; }\r\n            set { SetField(ref _text, value, () => Text); }\r\n        }\r\n\r\n        public GeoCoordinate Location { get; set; }\r\n\r\n        public Action<TLMessageMediaVenue> AttachAction;\r\n\r\n        public SearchVenuesViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Items = new ObservableCollection<TLObject>();\r\n            Status = AppResources.NoResults;\r\n\r\n            if (StateService.GeoCoordinate != null)\r\n            {\r\n                Location = StateService.GeoCoordinate;\r\n                StateService.GeoCoordinate = null;\r\n            }\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Text))\r\n                {\r\n                    if (!string.IsNullOrEmpty(Text))\r\n                    {\r\n                        Search(Text);\r\n                    }\r\n                    else\r\n                    {\r\n                        Items.Clear();\r\n                        Status = AppResources.NoResults;\r\n                    }\r\n                }\r\n            };\r\n        }\r\n\r\n        public void AttachVenue(TLMessageMediaVenue venue)\r\n        {\r\n            if (venue == null) return;\r\n\r\n            AttachAction.SafeInvoke(venue);\r\n        }\r\n\r\n        private readonly Dictionary<string, List<TLMessageMediaVenue>> _cache = new Dictionary<string, List<TLMessageMediaVenue>>();\r\n\r\n        private TLUserBase _foursquareBot;\r\n\r\n        public void Search(string inputText)\r\n        {\r\n            if (inputText == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var text = inputText.Trim();\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromMilliseconds(300), () =>\r\n            {\r\n                if (!string.Equals(Text, text))\r\n                {\r\n                    return;\r\n                }\r\n\r\n                List<TLMessageMediaVenue> cachedResult;\r\n                if (_cache.TryGetValue(text, out cachedResult))\r\n                {\r\n                    Items.Clear();\r\n                    foreach (var venue in cachedResult)\r\n                    {\r\n                        Items.Add(venue);\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    Status = Items.Count > 0 ? string.Empty : AppResources.NoResults;\r\n\r\n                    return;\r\n                }\r\n\r\n                if (_foursquareBot == null)\r\n                {\r\n                    IoC.Get<IMTProtoService>().ResolveUsernameAsync(new TLString(\"foursquare\"),\r\n                        result =>\r\n                        {\r\n                            if (result.Peer is TLPeerUser && result.Users.Count > 0)\r\n                            {\r\n                                _foursquareBot = result.Users[0];\r\n                                Search(inputText);\r\n                            }\r\n                        });\r\n\r\n                    return;\r\n                }\r\n                IsWorking = true;\r\n                Status = Items.Count > 0 ? Status : AppResources.Loading;\r\n                IoC.Get<IMTProtoService>().GetInlineBotResultsAsync(\r\n                    _foursquareBot.ToInputUser(),\r\n                    new TLInputPeerSelf(),\r\n                    new TLInputGeoPoint { Lat = new TLDouble(Location.Latitude), Long = new TLDouble(Location.Longitude) },\r\n                    TLString.Empty, TLString.Empty,\r\n                    result =>\r\n                    {\r\n                        var venues = new List<TLMessageMediaVenue>();\r\n                        foreach (var inlineResult in result.Results)\r\n                        {\r\n                            var inlineMessageMediaVenue = inlineResult.SendMessage as TLBotInlineMessageMediaVenue78;\r\n                            if (inlineMessageMediaVenue == null) continue;\r\n\r\n                            Uri iconSource = null;\r\n                            if (!TLString.IsNullOrEmpty(inlineMessageMediaVenue.VenueType))\r\n                            {\r\n                                // get icon with provided size (32, 44, 64 or 88)\r\n                                // https://foursquare.com/img/categories_v2/food/icecream_bg_32.png\r\n                                //\r\n                                iconSource = new Uri(string.Format(\"https://foursquare.com/img/categories_v2/{0}_{1}.png\", inlineMessageMediaVenue.VenueType, 64));\r\n                            }\r\n\r\n                            var mediaVenue = new TLMessageMediaVenue72\r\n                            {\r\n                                VenueId = inlineMessageMediaVenue.VenueId,\r\n                                Title = inlineMessageMediaVenue.Title,\r\n                                Address = inlineMessageMediaVenue.Address,\r\n                                Provider = inlineMessageMediaVenue.Provider,\r\n                                Geo = inlineMessageMediaVenue.Geo,\r\n                                VenueType = inlineMessageMediaVenue.VenueType,\r\n                                IconSource = iconSource\r\n                            };\r\n\r\n                            venues.Add(mediaVenue);\r\n                        }\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            _cache[text] = venues;\r\n\r\n                            if (!string.Equals(Text, text))\r\n                            {\r\n                                return;\r\n                            }\r\n\r\n                            Items.Clear();\r\n                            foreach (var venue in venues)\r\n                            {\r\n                                Items.Add(venue);\r\n                            }\r\n\r\n                            IsWorking = false;\r\n                            Status = Items.Count > 0 ? string.Empty : AppResources.NoResults;\r\n                        });\r\n                    },\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Items.Clear();\r\n                        Status = AppResources.NoResults;\r\n                    }));\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/Search/SearchViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Contacts;\r\nusing Telegram.Controls.Utils;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public class RecentGroup\r\n    {\r\n        public TLObject Item1 { get; set; }\r\n        public TLObject Item2 { get; set; }\r\n        public TLObject Item3 { get; set; }\r\n        public TLObject Item4 { get; set; }\r\n    }\r\n\r\n    public class SearchViewModel : \r\n        ItemsViewModelBase<TLObject>, \r\n        Telegram.Api.Aggregator.IHandle<DownloadableItem>,\r\n        Telegram.Api.Aggregator.IHandle<ClearTopPeersEventArgs>\r\n    {\r\n        public Func<TLObject, bool, bool> Callback;\r\n\r\n        public string Watermark { get; set; }\r\n\r\n        public bool SuppressMessagesSearch { get; set; }\r\n\r\n        public IList<TLDialogBase> LoadedDilaogs { get; set; }\r\n\r\n        private string _text;\r\n\r\n        public string Text\r\n        {\r\n            get { return _text; }\r\n            set\r\n            {\r\n                if (value != _text)\r\n                {\r\n                    _text = value;\r\n                    NotifyOfPropertyChange(() => ShowRecent);\r\n                    Search();\r\n                }\r\n            }\r\n        }\r\n\r\n        private IList<TLUserBase> _usersSource;\r\n\r\n        private IList<TLChatBase> _chatsSource;\r\n\r\n        private SearchRequest _lastRequest;\r\n\r\n        private readonly LRUCache<string, SearchRequest> _searchResultsCache = new LRUCache<string, SearchRequest>(Constants.MaxCacheCapacity);\r\n\r\n        public SearchViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Watermark = AppResources.SearchChatsOrMessages;\r\n\r\n            Recent = new ObservableCollection<TLObject>();\r\n\r\n            TopPeers = new ObservableCollection<TLObject>();\r\n            TopBots = new ObservableCollection<TLUserBase>();\r\n\r\n            LoadedDilaogs = stateService.LoadedDialogs;\r\n            stateService.LoadedDialogs = null;\r\n\r\n            Status = string.Empty;\r\n\r\n            EventAggregator.Subscribe(this);\r\n        }\r\n\r\n        public bool OpenDialogDetails(TLObject with)\r\n        {\r\n            return OpenDialogDetails(with, true);\r\n        }\r\n\r\n        public bool OpenDialogDetails(TLObject with, bool saveToRecent)\r\n        {\r\n            if (with == null) return false;\r\n\r\n            var result = true;\r\n            if (Callback != null)\r\n            {\r\n                result = Callback(with, saveToRecent);\r\n            }\r\n            else\r\n            {\r\n                var dialog = with as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    with = dialog.With;\r\n                    var channel = with as TLChannel;\r\n                    if (channel != null)\r\n                    {\r\n                        channel = CacheService.GetChat(channel.Id) as TLChannel; // MigratedFromChatId\r\n                        if (channel != null)\r\n                        {\r\n                            with = channel;\r\n                        }\r\n                    }\r\n\r\n                    StateService.Message = dialog.TopMessage;\r\n                }\r\n\r\n                with.ClearBitmap();\r\n                //StateService.RemoveBackEntry = true;\r\n                StateService.With = with;\r\n                StateService.AnimateTitle = saveToRecent;\r\n                NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n            }\r\n\r\n            if (saveToRecent)\r\n            {\r\n                SaveRecentAsync(with);\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        public ObservableCollection<TLObject> TopPeers { get; set; }\r\n\r\n        public ObservableCollection<TLUserBase> TopBots { get; set; }\r\n\r\n        private static void AddTopPeerByRating(TLTopPeer peer, IList<TLTopPeer> peers)\r\n        {\r\n            var rating = peer.Rating.Value;\r\n            for (var i = 0; i < peers.Count; i++)\r\n            {\r\n                if (peers[i].Rating.Value <= rating)\r\n                {\r\n                    peers.Insert(i, peer);\r\n                    return;\r\n                }\r\n            }\r\n\r\n            peers.Add(peer);\r\n        }\r\n\r\n        private bool _initialized;\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            //if (_initialized)\r\n            //{\r\n            //    return;\r\n            //}\r\n\r\n            //_initialized = true;\r\n\r\n            var topBots = new List<TLTopPeer>();\r\n            var topPeers = new List<TLTopPeer>();\r\n            var recent = new List<TLObject>();\r\n\r\n            CreateTop(topBots, topPeers);\r\n            UpdateTopAsync();\r\n            CreateRecent(recent);\r\n\r\n            var recentFirstSliceCount = 5;\r\n            var topBotsFirstSliceCount = 5;\r\n            var topPeersFirstSliceCount = 5;\r\n\r\n            Recent.Clear();\r\n            for (var i = 0; i < recentFirstSliceCount && i < recent.Count; i++)\r\n            {\r\n                Recent.Add(recent[i]);\r\n            }\r\n\r\n            TopPeers.Clear();\r\n            for (var i = 0; i < topPeersFirstSliceCount && i < topPeers.Count; i++)\r\n            {\r\n                TopPeers.Add(topPeers[i].Object);\r\n            }\r\n\r\n            TopBots.Clear();\r\n            for (var i = 0; i < topBotsFirstSliceCount && i < topBots.Count; i++)\r\n            {\r\n                TopBots.Add((TLUserBase)topBots[i].Object);\r\n            }\r\n\r\n            NotifyOfPropertyChange(() => ShowRecent);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                for (var i = recentFirstSliceCount; i < recent.Count; i++)\r\n                {\r\n                    Recent.Add(recent[i]);\r\n                }\r\n\r\n                for (var i = topPeersFirstSliceCount; i < topPeers.Count; i++)\r\n                {\r\n                    TopPeers.Add(topPeers[i].Object);\r\n                }\r\n\r\n                for (var i = topBotsFirstSliceCount; i < topBots.Count; i++)\r\n                {\r\n                    TopBots.Add((TLUserBase)topBots[i].Object);\r\n                }\r\n            });\r\n        }\r\n\r\n        private void CreateRecent(List<TLObject> recent)\r\n        {\r\n            _recentResults = _recentResults ?? TLUtils.OpenObjectFromMTProtoFile<TLVector<TLResultInfo>>(_recentSyncRoot, Constants.RecentSearchResultsFileName) ?? new TLVector<TLResultInfo>();\r\n\r\n            foreach (var result in _recentResults)\r\n            {\r\n                if (result.Type.ToString() == \"user\")\r\n                {\r\n                    var user = CacheService.GetUser(result.Id);\r\n                    if (user != null)\r\n                    {\r\n                        recent.Add(user);\r\n                        if (user.Dialog == null)\r\n                        {\r\n                            user.Dialog = CacheService.GetDialog(new TLPeerUser {Id = user.Id});\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (result.Type.ToString() == \"chat\")\r\n                {\r\n                    var chat = CacheService.GetChat(result.Id);\r\n                    if (chat != null)\r\n                    {\r\n                        var chat41 = chat as TLChat41;\r\n                        if (chat41 == null || !chat41.IsMigrated)\r\n                        {\r\n                            recent.Add(chat);\r\n                            if (chat.Dialog == null)\r\n                            {\r\n                                var dialog = CacheService.GetDialog(new TLPeerChat {Id = chat.Id});\r\n\r\n                                chat.Dialog = dialog;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void CreateTop(List<TLTopPeer> topBotsList, List<TLTopPeer> topPeersList)\r\n        {\r\n            _topPeers = StateService.GetTopPeers() as TLTopPeers;\r\n            if (_topPeers == null) return;\r\n\r\n            foreach (var categoryPeers in _topPeers.Categories)\r\n            {\r\n                if (categoryPeers.Category is TLTopPeerCategoryBotsInline)\r\n                {\r\n                    continue;\r\n                }\r\n                else if (categoryPeers.Category is TLTopPeerCategoryBotsPM)\r\n                {\r\n                    continue;\r\n\r\n                    foreach (var topPeer in categoryPeers.Peers)\r\n                    {\r\n                        var user = CacheService.GetUser(topPeer.Peer.Id);\r\n                        if (user != null)\r\n                        {\r\n                            AddTopPeerByRating(topPeer, topBotsList);\r\n\r\n                            topPeer.Object = user;\r\n                            if (user.Dialog == null)\r\n                            {\r\n                                user.Dialog = CacheService.GetDialog(new TLPeerUser { Id = user.Id });\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else if (categoryPeers.Category is TLTopPeerCategoryCorrespondents)\r\n                {\r\n                    foreach (var topPeer in categoryPeers.Peers)\r\n                    {\r\n                        var user = CacheService.GetUser(topPeer.Peer.Id);\r\n                        if (user != null)\r\n                        {\r\n                            AddTopPeerByRating(topPeer, topPeersList);\r\n\r\n                            topPeer.Object = user;\r\n                            if (user.Dialog == null)\r\n                            {\r\n                                user.Dialog = CacheService.GetDialog(new TLPeerUser { Id = user.Id });\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else if (categoryPeers.Category is TLTopPeerCategoryGroups)\r\n                {\r\n                    continue;\r\n\r\n                    foreach (var topPeer in categoryPeers.Peers)\r\n                    {\r\n                        var chat = CacheService.GetChat(topPeer.Peer.Id);\r\n                        if (chat != null)\r\n                        {\r\n                            AddTopPeerByRating(topPeer, topPeersList);\r\n\r\n                            topPeer.Object = chat;\r\n                            if (chat.Dialog == null)\r\n                            {\r\n                                chat.Dialog = CacheService.GetDialog(new TLPeerChat { Id = chat.Id });\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else if (categoryPeers.Category is TLTopPeerCategoryChannels)\r\n                {\r\n                    continue;\r\n\r\n                    foreach (var topPeer in categoryPeers.Peers)\r\n                    {\r\n                        var channel = CacheService.GetChat(topPeer.Peer.Id);\r\n                        if (channel != null)\r\n                        {\r\n                            AddTopPeerByRating(topPeer, topPeersList);\r\n\r\n                            topPeer.Object = channel;\r\n                            if (channel.Dialog == null)\r\n                            {\r\n                                channel.Dialog = CacheService.GetDialog(new TLPeerChannel { Id = channel.Id });\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ResetTopPeerRating(TLObject obj)\r\n        {\r\n            var user = obj as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                var confirmation = MessageBox.Show(string.Format(AppResources.ConfirmResetTopPeerRating, user.FullName), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                if (confirmation != MessageBoxResult.OK) return;\r\n\r\n                var topPeerCategory = new TLTopPeerCategoryCorrespondents();\r\n\r\n                IsWorking = true;\r\n                MTProtoService.ResetTopPeerRatingAsync(topPeerCategory, user.ToInputPeer(),\r\n                    result => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        var topPeers = StateService.GetTopPeers() as TLTopPeers;\r\n                        if (topPeers != null)\r\n                        {\r\n                            var category = topPeers.Categories.FirstOrDefault(x => x.Category.GetType() == topPeerCategory.GetType());\r\n                            if (category != null)\r\n                            {\r\n                                for (var i = 0; i < category.Peers.Count; i++)\r\n                                {\r\n                                    if (category.Peers[i].Peer.Id.Value == user.Index)\r\n                                    {\r\n                                        category.Peers.RemoveAt(i);\r\n                                        break;\r\n                                    }\r\n                                }\r\n\r\n                                for (var i = 0; i < topPeers.Users.Count; i++)\r\n                                {\r\n                                    if (topPeers.Users[i].Index == user.Index)\r\n                                    {\r\n                                        topPeers.Users.RemoveAt(i);\r\n                                        break;\r\n                                    }\r\n                                }\r\n\r\n                                for (var i = 0; i < TopPeers.Count; i++)\r\n                                {\r\n                                    var topUser = TopPeers[i] as TLUserBase;\r\n                                    if (topUser != null)\r\n                                    {\r\n                                        if (topUser.Index == user.Index)\r\n                                        {\r\n                                            TopPeers.RemoveAt(i);\r\n                                            break;\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                StateService.SaveTopPeers(topPeers);\r\n                            }\r\n                        }\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"contacts.resetTopPeerRating error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        private void UpdateTopAsync()\r\n        {\r\n            UpdateTopCommon(MTProtoService, StateService);\r\n        }\r\n\r\n        private static DateTime? _updateTopFloodWait;\r\n\r\n        public static void UpdateTopCommon(IMTProtoService mtProtoService, IStateService stateService, Action<TLTopPeers> callback = null)\r\n        {\r\n            if (_updateTopFloodWait.HasValue && _updateTopFloodWait.Value > DateTime.Now)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var hash = 0;\r\n            if (_topPeers != null)\r\n            {\r\n                hash = TLUtils.GetTopPeersHash(_topPeers);\r\n            }\r\n\r\n            mtProtoService.GetTopPeersAsync(\r\n                GetTopPeersFlags.BotsInline | GetTopPeersFlags.Correspondents,\r\n                new TLInt(0), new TLInt(0), new TLInt(hash),\r\n                result =>\r\n                {\r\n                    var topPeers = result as TLTopPeers;\r\n                    if (topPeers != null)\r\n                    {\r\n                        _topPeers = topPeers;\r\n\r\n                        stateService.SaveTopPeers(topPeers);\r\n                    }\r\n\r\n                    var topPeersDisabled = result as TLTopPeersDisabled;\r\n                    if (topPeersDisabled != null)\r\n                    {\r\n                        _topPeers = null;\r\n\r\n                        stateService.SaveTopPeers(topPeersDisabled);\r\n                    }\r\n\r\n                    callback.SafeInvoke(topPeers);\r\n                },\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (error.CodeEquals(ErrorCode.FLOOD)\r\n                        && error.Message.ToString().StartsWith(\"FLOOD_WAIT\"))\r\n                    {\r\n                        var message = error.Message.ToString();\r\n                        if (message.StartsWith(\"FLOOD_WAIT\"))\r\n                        {\r\n                            var seconds = 0;\r\n                            if (Int32.TryParse(message.Replace(\"FLOOD_WAIT_\", string.Empty), out seconds))\r\n                            {\r\n                                _updateTopFloodWait = DateTime.Now.AddSeconds(seconds);\r\n                            }\r\n                        }\r\n                    }\r\n                    Execute.ShowDebugMessage(\"contacts.getTopPeers error \" + error);\r\n                }));\r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            var text = Text;\r\n\r\n            if (string.IsNullOrEmpty(text.Trim()))\r\n            {\r\n                Items.Clear();\r\n                Status = string.IsNullOrEmpty(text.Trim()) ? Watermark : AppResources.NoResults;\r\n                return;\r\n            }\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n            {\r\n                if (!string.Equals(text, Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                Search(Text);\r\n            });\r\n        }\r\n\r\n        public void Search(string text)\r\n        {\r\n            if (!string.Equals(text, Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n            if (_lastRequest != null)\r\n            {\r\n                _lastRequest.Cancel();\r\n            }\r\n\r\n            var trimmedText = Text.Trim();\r\n            if (string.IsNullOrEmpty(trimmedText))\r\n            {\r\n                Items.Clear();\r\n                Status = string.IsNullOrEmpty(Text) ? Watermark : AppResources.NoResults;\r\n\r\n                return;\r\n            }\r\n\r\n            var nextRequest = GetNextRequest(text);\r\n\r\n            IsWorking = true; \r\n            Status = Items.Count == 0 ? AppResources.Loading : string.Empty;\r\n            nextRequest.ProcessAsync(results =>\r\n                {\r\n                    if (nextRequest.IsCanceled) return;\r\n                    if (!string.Equals(Text, nextRequest.Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                    const int firstSliceCount = 6;\r\n                    Items.Clear();\r\n                    if (results.Count > 0)\r\n                    {\r\n                        Items.Add(new TLServiceText { Text = AppResources.ChatsAndContacts });\r\n                    }\r\n                    var items = new List<TLObject>();\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        if (i < firstSliceCount)\r\n                        {\r\n                            Items.Add(results[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            items.Add(results[i]);\r\n                        }\r\n                    }\r\n\r\n                    IsWorking = false;\r\n                    Status = Items.Count == 0 && items.Count == 0 ? AppResources.Loading : string.Empty;\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (nextRequest.IsCanceled) return;\r\n                        if (!string.Equals(Text, nextRequest.Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                        foreach (var item in items)\r\n                        {\r\n                            Items.Add(item);\r\n                        }\r\n\r\n                        ProcessGlobalSearch(nextRequest);\r\n                    });\r\n                });\r\n\r\n            _searchResultsCache[nextRequest.Text] = nextRequest;\r\n            _lastRequest = nextRequest;\r\n        }\r\n\r\n        private SearchRequest GetNextRequest(string text)\r\n        {\r\n            SearchRequest nextRequest;\r\n            if (!_searchResultsCache.TryGetValue(text, out nextRequest))\r\n            {\r\n                IList<TLUserBase> usersSource;\r\n\r\n                if (_lastRequest != null\r\n                    && text.IndexOf(_lastRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    usersSource = _lastRequest.UsersSource;\r\n                }\r\n                else\r\n                {\r\n                    var source = _usersSource;\r\n\r\n                    if (source == null)\r\n                    {\r\n                        source = CacheService.GetUsersForSearch(LoadedDilaogs)\r\n                            .Where(x => x != null && !(x is TLUserEmpty) && !x.IsDeleted)// && x.Index != StateService.CurrentUserId)\r\n                            .ToList();\r\n                    }\r\n\r\n                    _usersSource = source;\r\n\r\n                    foreach (var user in _usersSource)\r\n                    {\r\n                        user.FullNameWords = user.FullName.Split(' ');\r\n                    }\r\n\r\n                    usersSource = _usersSource;\r\n                }\r\n\r\n                IList<TLChatBase> chatsSource;\r\n\r\n                if (_lastRequest != null\r\n                    && text.IndexOf(_lastRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    chatsSource = _lastRequest.ChatsSource;\r\n                }\r\n                else\r\n                {\r\n                    _chatsSource = _chatsSource ??\r\n                                   CacheService.GetChats()\r\n                                       .OrderBy(x => x.FullName)\r\n                                       .ToList();\r\n\r\n                    foreach (var chat in _chatsSource)\r\n                    {\r\n                        chat.FullNameWords = chat.FullName.Split(' ');\r\n                    }\r\n\r\n                    chatsSource = _chatsSource;\r\n                }\r\n\r\n                nextRequest = new SearchRequest(CacheService, text, usersSource, chatsSource);\r\n            }\r\n            return nextRequest;\r\n        }\r\n\r\n        private void ProcessGlobalSearch(SearchRequest request)\r\n        {\r\n            if (request.GlobalResults != null)\r\n            {\r\n                if (!string.Equals(Text, request.Text, StringComparison.OrdinalIgnoreCase)) return;\r\n                if (request.IsCanceled) return;\r\n\r\n                if (request.GlobalResults.Count > 0)\r\n                {\r\n                    Items.Add(new TLServiceText { Text = AppResources.GlobalSearch });\r\n                    foreach (var user in request.GlobalResults)\r\n                    {\r\n                        Items.Add(user);\r\n                    }\r\n                }\r\n\r\n                Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n\r\n                ProcessMessagesSearch(request);\r\n            }\r\n            else\r\n            {\r\n                if (request.Text.Length < Constants.UsernameMinLength)\r\n                {\r\n                    request.GlobalResults = new List<TLObject>();\r\n\r\n                    ProcessMessagesSearch(request);\r\n                    return;\r\n                }\r\n\r\n                IsWorking = true;\r\n                MTProtoService.SearchAsync(new TLString(request.Text), new TLInt(100),\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        request.GlobalResults = new List<TLObject>();\r\n                        var contactsFound74 = result as TLContactsFound74;\r\n                        if (contactsFound74 != null)\r\n                        {\r\n                            if (contactsFound74.MyResults.Count > 0)\r\n                            {\r\n                                var users = new List<TLUserBase>();\r\n                                var chats = new List<TLChatBase>();\r\n                                var userIndex = contactsFound74.Users.ToDictionary(x => x.Index);\r\n                                var chatIndex = contactsFound74.Chats.ToDictionary(x => x.Index);\r\n                                foreach (var myResult in contactsFound74.MyResults)\r\n                                {\r\n                                    var peerUser = myResult as TLPeerUser;\r\n                                    if (peerUser != null)\r\n                                    {\r\n                                        if (request.UserResultsIndex.ContainsKey(peerUser.Id.Value))\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n\r\n                                        TLUserBase user;\r\n                                        if (userIndex.TryGetValue(peerUser.Id.Value, out user))\r\n                                        {\r\n                                            users.Add(user);\r\n                                            request.Results.Add(user);\r\n                                            request.UserResultsIndex[user.Index] = user;\r\n                                        }\r\n                                    }\r\n\r\n                                    var peerChannel = myResult as TLPeerChannel;\r\n                                    if (peerChannel != null)\r\n                                    {\r\n                                        if (request.ChatResultsIndex.ContainsKey(peerChannel.Id.Value))\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n\r\n                                        TLChatBase chat;\r\n                                        if (chatIndex.TryGetValue(peerChannel.Id.Value, out chat))\r\n                                        {\r\n                                            chats.Add(chat);\r\n                                            request.Results.Add(chat);\r\n                                            request.ChatResultsIndex[chat.Index] = chat;\r\n                                        }\r\n                                    }\r\n\r\n                                    var peerChat = myResult as TLPeerChat;\r\n                                    if (peerChat != null)\r\n                                    {\r\n                                        if (request.ChatResultsIndex.ContainsKey(peerChat.Id.Value))\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n\r\n                                        TLChatBase chat;\r\n                                        if (chatIndex.TryGetValue(peerChat.Id.Value, out chat))\r\n                                        {\r\n                                            chats.Add(chat);\r\n                                            request.Results.Add(chat);\r\n                                            request.ChatResultsIndex[chat.Index] = chat;\r\n                                        }\r\n                                    }\r\n                                }\r\n\r\n                                if (!string.Equals(Text, request.Text, StringComparison.OrdinalIgnoreCase)) return;\r\n                                if (request.IsCanceled) return;\r\n\r\n                                if (users.Count > 0 || chats.Count > 0)\r\n                                {\r\n                                    if (Items.Count == 0)\r\n                                    {\r\n                                        Items.Add(new TLServiceText { Text = AppResources.ChatsAndContacts });\r\n                                    }\r\n\r\n                                    foreach (var chat in chats)\r\n                                    {\r\n                                        Items.Add(chat);\r\n                                    }\r\n\r\n                                    foreach (var user in users)\r\n                                    {\r\n                                        Items.Add(user);\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var contactsFound40 = result as TLContactsFound40;\r\n                        if (contactsFound40 != null)\r\n                        {\r\n                            foreach (var chat in contactsFound40.Chats)\r\n                            {\r\n                                if (request.ChatResultsIndex != null && request.ChatResultsIndex.ContainsKey(chat.Index))\r\n                                {\r\n                                    continue;\r\n                                }\r\n                                chat.IsGlobalResult = true;\r\n                                request.GlobalResults.Add(chat);\r\n                            }\r\n\r\n                            foreach (var user in contactsFound40.Users)\r\n                            {\r\n                                if (request.UserResultsIndex != null && request.UserResultsIndex.ContainsKey(user.Index))\r\n                                {\r\n                                    continue;\r\n                                }\r\n                                user.IsGlobalResult = true;\r\n                                request.GlobalResults.Add(user);\r\n                            }\r\n                        }\r\n\r\n                        if (!string.Equals(Text, request.Text, StringComparison.OrdinalIgnoreCase)) return;\r\n                        if (request.IsCanceled) return;\r\n\r\n                        var hasResults = request.GlobalResults.Count > 0;\r\n                        if (hasResults)\r\n                        {\r\n                            Items.Add(new TLServiceText { Text = AppResources.GlobalSearch });\r\n                            foreach (var r in request.GlobalResults)\r\n                            {\r\n                                Items.Add(r);\r\n                            }\r\n                        }\r\n\r\n                        Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n\r\n                        ProcessMessagesSearch(request);\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n\r\n                        Execute.ShowDebugMessage(\"contacts.search error \" + error);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            if (_lastRequest == null) return;\r\n\r\n            ProcessMessagesSearch(_lastRequest, true);\r\n        }\r\n\r\n        public void ProcessMessagesSearch(SearchRequest request, bool nextSlice = false)\r\n        {\r\n            if (SuppressMessagesSearch) return;\r\n\r\n            if (request.MessageResults != null && !nextSlice)\r\n            {\r\n                if (!string.Equals(Text, request.Text, StringComparison.OrdinalIgnoreCase)) return;\r\n                if (request.IsCanceled) return;\r\n\r\n                if (request.MessageResults.Count > 0)\r\n                {\r\n                    Items.Add(new TLServiceText { Text = AppResources.MessageSearch });\r\n                    foreach (var result in request.MessageResults)\r\n                    {\r\n                        Items.Add(result);\r\n                    }\r\n                }\r\n\r\n                Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n            }\r\n            else\r\n            {\r\n                if (IsWorking) return;\r\n                if (request.IsLastSliceLoaded) return;\r\n\r\n                var offsetId = 0;\r\n                var offsetDate = 0;\r\n                TLInputPeerBase offsetPeer = new TLInputPeerEmpty();\r\n                if (request.MessageResults != null && request.MessageResults.Count > 0)\r\n                {\r\n                    var lastDialog = request.MessageResults.LastOrDefault(x => x is TLDialog) as TLDialog;\r\n                    if (lastDialog != null)\r\n                    {\r\n                        var lastMessage = lastDialog.TopMessage as TLMessageCommon;\r\n                        if (lastMessage != null)\r\n                        {\r\n                            offsetId = lastMessage.Index;\r\n                            offsetDate = lastMessage.DateIndex;\r\n                            if (lastMessage.ToId is TLPeerUser)\r\n                            {\r\n                                offsetPeer = !lastMessage.Out.Value\r\n                                    ? DialogDetailsViewModel.PeerToInputPeer(new TLPeerUser { Id = lastMessage.FromId })\r\n                                    : DialogDetailsViewModel.PeerToInputPeer(lastMessage.ToId);\r\n                            }\r\n                            else\r\n                            {\r\n                                offsetPeer = DialogDetailsViewModel.PeerToInputPeer(lastMessage.ToId);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                IsWorking = true;\r\n                //MTProtoService.SearchAsync(\r\n                //    new TLInputPeerEmpty(),\r\n                //    new TLString(request.Text),\r\n                //    new TLInputMessagesFilterEmpty(),\r\n                //    new TLInt(0), new TLInt(0), new TLInt(request.Offset), new TLInt(0), new TLInt(request.Limit),\r\n                MTProtoService.SearchGlobalAsync(\r\n                    new TLString(request.Text),\r\n                    new TLInt(offsetDate), offsetPeer, new TLInt(offsetId), new TLInt(request.Limit),\r\n                        result =>\r\n                        {\r\n                            CacheService.AddChats(result.Chats, results => { });\r\n                            CacheService.AddUsers(result.Users, results => { });\r\n                            \r\n                            var items = new List<TLObject>();\r\n                            var newMessages = result as TLMessages;\r\n                            if (newMessages != null)\r\n                            {\r\n                                var usersCache = new Dictionary<int, TLUserBase>();\r\n                                foreach (var user in newMessages.Users)\r\n                                {\r\n                                    usersCache[user.Index] = user;\r\n                                }\r\n\r\n                                var chatsCache = new Dictionary<int, TLChatBase>();\r\n                                foreach (var chat in newMessages.Chats)\r\n                                {\r\n                                    chatsCache[chat.Index] = chat;\r\n                                }\r\n\r\n                                foreach (var message in newMessages.Messages.OfType<TLMessageCommon>())\r\n                                {\r\n                                    var dialog = new TLDialog { TopMessage = message };\r\n                                    var peer = TLUtils.GetPeerFromMessage(message);\r\n                                    if (peer is TLPeerUser)\r\n                                    {\r\n                                        TLUserBase user;\r\n                                        if (!usersCache.TryGetValue(peer.Id.Value, out user))\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n                                        dialog.With = user;\r\n                                    }\r\n                                    else if (peer is TLPeerChat)\r\n                                    {\r\n                                        TLChatBase chat;\r\n                                        if (!chatsCache.TryGetValue(peer.Id.Value, out chat))\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n\r\n                                        var chat41 = chat as TLChat41;\r\n                                        if (chat41 != null && chat41.MigratedTo != null)\r\n                                        {\r\n                                            var inputChannel = chat41.MigratedTo as TLInputChannel;\r\n                                            if (inputChannel != null)\r\n                                            {\r\n                                                var channel = CacheService.GetChat(inputChannel.ChannelId);\r\n                                                if (channel != null)\r\n                                                {\r\n                                                    chat = channel;\r\n                                                }\r\n                                            }\r\n                                        }\r\n\r\n                                        dialog.With = chat;\r\n                                    }\r\n                                    else if (peer is TLPeerChannel)\r\n                                    {\r\n                                        TLChatBase chat;\r\n                                        if (!chatsCache.TryGetValue(peer.Id.Value, out chat))\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n\r\n                                        dialog.With = chat;\r\n                                    }\r\n                                    items.Add(dialog);\r\n                                }\r\n                            }\r\n\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n\r\n                                if (request.MessageResults == null)\r\n                                {\r\n                                    request.MessageResults = new List<TLObject>();\r\n                                }\r\n                                foreach (var item in items)\r\n                                {\r\n                                    request.MessageResults.Add(item);\r\n                                }\r\n                                request.Offset += request.Limit;\r\n                                request.IsLastSliceLoaded = result.Messages.Count < request.Limit;\r\n\r\n                                if (!string.Equals(Text, request.Text, StringComparison.OrdinalIgnoreCase)) return;\r\n                                if (request.IsCanceled) return;\r\n\r\n                                if (items.Count > 0)\r\n                                {\r\n                                    if (request.Offset == request.Limit)\r\n                                    {\r\n                                        Items.Add(new TLServiceText { Text = AppResources.MessageSearch });\r\n                                    }\r\n                                    foreach (var item in items)\r\n                                    {\r\n                                        Items.Add(item);\r\n                                    }\r\n                                }\r\n\r\n                                Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n                            });\r\n                        },\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            Status = Items.Count == 0 ? AppResources.NoResults : string.Empty;\r\n                        }));\r\n            }\r\n        }\r\n\r\n        #region Recents\r\n\r\n        private static TLTopPeers _topPeers;\r\n\r\n        private static readonly object _recentSyncRoot = new object();\r\n\r\n        private static TLVector<TLResultInfo> _recentResults;\r\n\r\n        public ObservableCollection<TLObject> Recent { get; set; }\r\n\r\n        public bool ShowRecent\r\n        {\r\n            get { return (Recent.Count > 0 || TopBots.Count > 0 || TopPeers.Count > 0) && string.IsNullOrEmpty(Text); }\r\n        }\r\n\r\n        public void ClearRecent()\r\n        {\r\n            Recent.Clear();\r\n            NotifyOfPropertyChange(() => ShowRecent);\r\n\r\n            DeleteRecentAsync(false);\r\n        }\r\n\r\n        public void ClearRecent(TLObject obj)\r\n        {\r\n            Recent.Remove(obj);\r\n            NotifyOfPropertyChange(() => ShowRecent);\r\n\r\n            DeleteRecentAsync(obj);\r\n        }\r\n\r\n        public static void DeleteRecentAsync(bool deleteTop = true)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _recentResults = new TLVector<TLResultInfo>();\r\n                FileUtils.Delete(_recentSyncRoot, Constants.RecentSearchResultsFileName);\r\n\r\n                if (deleteTop)\r\n                {\r\n                    _topPeers = null;\r\n                    FileUtils.Delete(_recentSyncRoot, Constants.TopPeersFileName);\r\n                }\r\n            });\r\n        }\r\n\r\n        public static void DeleteRecentAsync(TLObject with)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var recentResults = _recentResults ?? new TLVector<TLResultInfo>();\r\n\r\n                if (with != null)\r\n                {\r\n                    var id = GetId(with);\r\n                    var type = GetType(with);\r\n                    if (id == null || type == null) return;\r\n\r\n                    for (var i = 0; i < recentResults.Count; i++)\r\n                    {\r\n                        if (recentResults[i].Id.Value == id.Value\r\n                            && recentResults[i].Type.ToString() == type.ToString())\r\n                        {\r\n                            recentResults.RemoveAt(i);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                _recentResults = recentResults;\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_recentSyncRoot, Constants.RecentSearchResultsFileName, recentResults);\r\n            });\r\n        }\r\n\r\n        public void SaveRecentAsync(TLObject with)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var recentResults = _recentResults ?? new TLVector<TLResultInfo>();\r\n\r\n                if (with != null)\r\n                {\r\n                    var id = GetId(with);\r\n                    var type = GetType(with);\r\n                    if (id == null || type == null) return;\r\n\r\n                    var isAdded = false;\r\n                    long maxCount = 0;\r\n                    for (var i = 0; i < recentResults.Count; i++)\r\n                    {\r\n                        var recentResult = recentResults[i];\r\n\r\n                        maxCount = maxCount > recentResult.Count.Value ? maxCount : recentResult.Count.Value;\r\n\r\n                        if (recentResults[i].Id.Value == id.Value\r\n                            && recentResults[i].Type.ToString() == type.ToString())\r\n                        {\r\n                            recentResults[i].Count = new TLLong(recentResults[i].Count.Value + 1);\r\n\r\n                            var newPosition = i;\r\n                            for (var j = i - 1; j >= 0; j--)\r\n                            {\r\n                                if (recentResults[j].Count.Value <= recentResults[i].Count.Value)\r\n                                {\r\n                                    newPosition = j;\r\n                                }\r\n                            }\r\n\r\n                            if (i != newPosition)\r\n                            {\r\n                                recentResults.RemoveAt(i);\r\n                                recentResults.Insert(newPosition, recentResult);\r\n                            }\r\n                            isAdded = true;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (!isAdded)\r\n                    {\r\n                        var recentResult = new TLResultInfo\r\n                        {\r\n                            Id = id,\r\n                            Type = type,\r\n                            Count = new TLLong(maxCount)\r\n                        };\r\n\r\n                        for (var i = 0; i < recentResults.Count; i++)\r\n                        {\r\n                            if (recentResults[i].Count.Value <= maxCount)\r\n                            {\r\n                                recentResults.Insert(i, recentResult);\r\n                                isAdded = true;\r\n                                break;\r\n                            }\r\n                        }\r\n\r\n                        if (!isAdded)\r\n                        {\r\n                            recentResults.Add(recentResult);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                _recentResults = recentResults;\r\n\r\n                TLUtils.SaveObjectToMTProtoFile(_recentSyncRoot, Constants.RecentSearchResultsFileName, recentResults);\r\n            });\r\n        }\r\n\r\n        private static TLString GetType(TLObject with)\r\n        {\r\n            return with is TLUserBase ? new TLString(\"user\") : new TLString(\"chat\");\r\n        }\r\n\r\n        private static TLInt GetId(TLObject with)\r\n        {\r\n            var user = with as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                return user.Id;\r\n            }\r\n            var chat = with as TLChatBase;\r\n            if (chat != null)\r\n            {\r\n                return chat.Id;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public void ClearSearchHistory()\r\n        {\r\n            var result = MessageBox.Show(AppResources.ClearSearchHistoryConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (result == MessageBoxResult.OK)\r\n            {\r\n                ClearRecent();\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var photo = item.Owner as TLUserProfilePhoto;\r\n                if (photo != null)\r\n                {\r\n                    var user = (TLUserBase)Items.FirstOrDefault(x => x is TLUserBase && ((TLUserBase)x).Photo == photo);\r\n                    if (user != null)\r\n                    {\r\n                        user.NotifyOfPropertyChange(() => user.Photo);\r\n                        return;\r\n                    }\r\n\r\n                    var dialog = Items.FirstOrDefault(x => x is TLDialogBase && ((TLDialogBase)x).With is TLUserBase && ((TLUserBase)((TLDialog)x).With).Photo == photo);\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog.NotifyOfPropertyChange(() => ((TLDialogBase)dialog).With);\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var chatPhoto = item.Owner as TLChatPhoto;\r\n                if (chatPhoto != null)\r\n                {\r\n                    var chat = (TLChat)Items.FirstOrDefault(x => x is TLChat && ((TLChat)x).Photo == chatPhoto);\r\n                    if (chat != null)\r\n                    {\r\n                        chat.NotifyOfPropertyChange(() => chat.Photo);\r\n                        return;\r\n                    }\r\n\r\n                    var dialog = Items.FirstOrDefault(x => x is TLDialogBase && ((TLDialogBase)x).With is TLChat && ((TLChat)((TLDialog)x).With).Photo == chatPhoto);\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog.NotifyOfPropertyChange(() => ((TLDialogBase)dialog).With);\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var channelPhoto = item.Owner as TLChatPhoto;\r\n                if (channelPhoto != null)\r\n                {\r\n\r\n                    var channel = (TLChannel)Items.FirstOrDefault(x => x is TLChannel && ((TLChannel)x).Photo == channelPhoto);\r\n                    if (channel != null)\r\n                    {\r\n                        channel.NotifyOfPropertyChange(() => channel.Photo);\r\n                        return;\r\n                    }\r\n\r\n                    var dialog = Items.FirstOrDefault(x => x is TLDialogBase && ((TLDialogBase)x).With is TLChannel && ((TLChannel)((TLDialog)x).With).Photo == channelPhoto);\r\n                    if (dialog != null)\r\n                    {\r\n                        dialog.NotifyOfPropertyChange(() => ((TLDialogBase)dialog).With);\r\n                        return;\r\n                    }\r\n                    return;\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(ClearTopPeersEventArgs args)\r\n        {\r\n            TopPeers.Clear();\r\n        }\r\n    }\r\n\r\n    public class SearchRequest\r\n    {\r\n        public bool IsCanceled;\r\n\r\n        public string TransliterateText { get; private set; }\r\n\r\n        public string Text { get; private set; }\r\n\r\n        public IList<TLUserBase> UsersSource { get; private set; }\r\n\r\n        public IList<TLChatBase> ChatsSource { get; private set; }\r\n\r\n        public IList<TLObject> Results { get; private set; }\r\n\r\n        public Dictionary<int, TLUserBase> UserResultsIndex { get; private set; }\r\n\r\n        public Dictionary<int, TLChatBase> ChatResultsIndex { get; private set; } \r\n\r\n        public IList<TLObject> GlobalResults { get; set; }\r\n\r\n        public IList<TLObject> MessageResults { get; set; }\r\n\r\n        public int Offset { get; set; }\r\n\r\n        public int Limit { get { return 20; } }\r\n\r\n        public bool IsLastSliceLoaded { get; set; }\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        public SearchRequest(ICacheService cacheService, string text, IList<TLUserBase> usersSource, IList<TLChatBase> chatsSource)\r\n        {\r\n            _cacheService = cacheService;\r\n            Text = text;\r\n            TransliterateText = Language.Transliterate(text);\r\n            UsersSource = usersSource;\r\n            ChatsSource = chatsSource;\r\n        }\r\n\r\n        private static bool IsUserValid(TLUserBase contact, string text)\r\n        {\r\n            if (string.IsNullOrEmpty(text)) return false;\r\n\r\n            return contact.FirstName.ToString().StartsWith(text, StringComparison.OrdinalIgnoreCase)\r\n                || contact.LastName.ToString().StartsWith(text, StringComparison.OrdinalIgnoreCase)\r\n                || contact.FullName.StartsWith(text, StringComparison.OrdinalIgnoreCase)\r\n                || (contact.FullNameWords != null && contact.FullNameWords.Any(x => x.StartsWith(text, StringComparison.OrdinalIgnoreCase)));\r\n        }\r\n\r\n        private static bool IsChatValid(TLChatBase chat, string text, bool useFastSearch)\r\n        {\r\n            if (string.IsNullOrEmpty(text)) return false;\r\n\r\n            if (!useFastSearch)\r\n            {\r\n                var fullName = chat.FullName;\r\n\r\n                var i = fullName.IndexOf(text, StringComparison.OrdinalIgnoreCase);\r\n                if (i != -1)\r\n                {\r\n                    while (i < fullName.Length && i != -1)\r\n                    {\r\n                        if (i == 0 || (i > 0 && fullName[i - 1] == ' '))\r\n                        {\r\n                            return true;\r\n                        }\r\n                        if (fullName.Length > i + 1)\r\n                        {\r\n                            i = fullName.IndexOf(text, i + 1, StringComparison.OrdinalIgnoreCase);\r\n                        }\r\n                        else\r\n                        {\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (chat.FullNameWords != null\r\n                    && chat.FullNameWords.Any(x => x.StartsWith(text, StringComparison.OrdinalIgnoreCase)))\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static bool IsUsernameValid(IUserName userNameContact, string text)\r\n        {\r\n            if (text.Length >= Constants.UsernameMinLength)\r\n            {\r\n                if (userNameContact != null)\r\n                {\r\n                    var userName = userNameContact.UserName != null ? userNameContact.UserName.ToString() : string.Empty;\r\n                    if (userName.StartsWith(text.TrimStart('@'), StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public void ProcessAsync(Action<IList<TLObject>> callback)\r\n        {\r\n            if (Results != null)\r\n            {\r\n                IsCanceled = false;\r\n                callback.SafeInvoke(Results);\r\n                return;\r\n            }\r\n\r\n            var usersSource = UsersSource;\r\n            var chatsSource = ChatsSource;\r\n\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var useFastSearch = !Text.Contains(\" \");\r\n\r\n                var userResults = new List<TLUserBase>(usersSource.Count);\r\n                foreach (var contact in usersSource)\r\n                {\r\n                    if (IsUserValid(contact, Text)\r\n                        || IsUserValid(contact, TransliterateText)\r\n                        || IsUsernameValid(contact as IUserName, Text))\r\n                    {\r\n                        userResults.Add(contact);\r\n                    }\r\n                }\r\n\r\n                var chatsResults = new List<TLChatBase>(chatsSource.Count);\r\n                foreach (var chat in chatsSource)\r\n                {\r\n                    if (IsChatValid(chat, Text, useFastSearch)\r\n                        || IsChatValid(chat, TransliterateText, useFastSearch)\r\n                        || IsUsernameValid(chat as IUserName, Text))\r\n                    {\r\n                        var channel = chat as TLChannel;\r\n                        if (channel != null && channel.Left.Value)\r\n                        {\r\n                            continue;\r\n                        }\r\n\r\n                        var channelForbidden = chat as TLChannelForbidden;\r\n                        if (channelForbidden != null)\r\n                        {\r\n                            continue;\r\n                        }\r\n\r\n                        var chat41 = chat as TLChat41;\r\n                        if (chat41 != null && chat41.IsMigrated)\r\n                        {\r\n                            continue;\r\n                        }\r\n\r\n                        chatsResults.Add(chat);\r\n                    }\r\n                }\r\n\r\n                Results = new List<TLObject>(userResults.Count + chatsResults.Count);\r\n                UserResultsIndex = new Dictionary<int, TLUserBase>();\r\n                ChatResultsIndex = new Dictionary<int, TLChatBase>();\r\n                foreach (var userResult in userResults)\r\n                {\r\n                    Results.Add(userResult);\r\n                    UserResultsIndex[userResult.Index] = userResult;\r\n                    if (userResult.Dialog == null)\r\n                    {\r\n                        userResult.Dialog = _cacheService.GetDialog(new TLPeerUser { Id = userResult.Id });\r\n                    }\r\n                }\r\n                foreach (var chatResult in chatsResults)\r\n                {\r\n                    Results.Add(chatResult);\r\n                    ChatResultsIndex[chatResult.Index] = chatResult;\r\n                    if (chatResult.Dialog == null)\r\n                    {\r\n                        var dialog = _cacheService.GetDialog(new TLPeerChat { Id = chatResult.Id });\r\n\r\n                        chatResult.Dialog = dialog;\r\n                    }\r\n                }\r\n\r\n                Execute.BeginOnUIThread(() => callback.SafeInvoke(Results));\r\n            });\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            IsCanceled = true;\r\n        }\r\n\r\n        public void LoadNextSlice(System.Action callback)\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/ViewModels/ShellViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing Windows.Networking.Connectivity;\r\nusing Windows.Phone.Media.Devices;\r\nusing Windows.Phone.Networking.Voip;\r\nusing Windows.System;\r\nusing BugSense;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing PhoneVoIPApp.BackEnd;\r\nusing PhoneVoIPApp.UI;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Helpers.TemplateSelectors;\r\nusing TelegramClient.ViewModels.Calls;\r\nusing TelegramClient.Views;\r\nusing TelegramClient.Views.Additional;\r\nusing TelegramClient.Views.Calls;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Devices;\r\nusing Microsoft.Phone.Tasks;\r\nusing Microsoft.Xna.Framework;\r\nusing Microsoft.Xna.Framework.Audio;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.MD5;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.Services.Location;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.Transport;\r\nusing Telegram.Controls.VirtualizedView;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Debug;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views.Payments;\r\nusing Action = System.Action;\r\nusing Environment = System.Environment;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels\r\n{\r\n    public class ShellViewModel : Conductor<ViewModelBase>.Collection.OneActive,\r\n        Telegram.Api.Aggregator.IHandle<DownloadableItem>,\r\n        Telegram.Api.Aggregator.IHandle<TLMessageCommon>,\r\n        Telegram.Api.Aggregator.IHandle<TLDecryptedMessageBase>,\r\n        Telegram.Api.Aggregator.IHandle<UpdatingEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChannelTooLong>,\r\n        Telegram.Api.Aggregator.IHandle<UpdateCompletedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<UpdateChannelsEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateContactRegistered>,\r\n        Telegram.Api.Aggregator.IHandle<ExceptionInfo>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateStickerSets>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateFavedStickers>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateStickerSetsOrder>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateNewStickerSet>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateReadFeaturedStickers>,\r\n        Telegram.Api.Aggregator.IHandle<PhoneCallStartedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<PhoneCallDiscardedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<PhoneCallRequestedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<PhoneCallStateChangedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<SignalBarsChangedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<LiveLocationAddedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<LiveLocationRemovedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<LiveLocationClearedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<LiveLocationLoadedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateEditMessage>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateEditChannelMessage>,\r\n        Telegram.Api.Aggregator.IHandle<MTProtoProxyDisabledEventArgs>\r\n    {\r\n\r\n        //public static Stopwatch Timer = Stopwatch.StartNew();\r\n\r\n        public static void StartNewTimer()\r\n        {\r\n            //Timer = Stopwatch.StartNew();\r\n        }\r\n\r\n        public static void WriteTimer(string str)\r\n        {\r\n            //System.Diagnostics.Debug.WriteLine(str + \" elapsed=\" + ShellViewModel.Timer.Elapsed);\r\n        }\r\n\r\n        public bool IsPasscodeEnabled { get; protected set; }\r\n\r\n        public IStateService StateService\r\n        {\r\n            get { return _stateService; }\r\n        }\r\n\r\n        public Uri PasscodeImageSource\r\n        {\r\n            get\r\n            {\r\n                return PasscodeUtils.Locked\r\n                    ? new Uri(\"/Images/Dialogs/passcode.close-WXGA.png\", UriKind.Relative)\r\n                    : new Uri(\"/Images/Dialogs/passcode.open-WXGA.png\", UriKind.Relative);\r\n            }\r\n        }\r\n\r\n        public Brush PasscodeImageBrush\r\n        {\r\n            get\r\n            {\r\n                return PasscodeUtils.Locked\r\n                    ? (Brush)Application.Current.Resources[\"TelegramBadgeAccentBrush\"]\r\n                    : (Brush)Application.Current.Resources[\"TelegramBadgeSubtleBrush\"];\r\n            }\r\n        }\r\n\r\n        //public Visibility PasscodeImageVisibility\r\n        //{\r\n        //    get\r\n        //    {\r\n        //        return string.IsNullOrEmpty(_stateService.Passcode) ? Visibility.Collapsed : Visibility.Visible;                \r\n        //    }\r\n        //}\r\n\r\n        public DialogsViewModel Dialogs { get; protected set; }\r\n\r\n        public ContactsViewModel Contacts { get; protected set; }\r\n\r\n        public CallsViewModel Calls { get; protected set; }\r\n\r\n        private DebugViewModel _debug;\r\n\r\n        private LongPollViewModel _longPoll;\r\n\r\n        private IStateService _stateService;\r\n\r\n        private ITelegramEventAggregator _eventAggregator;\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        public IMTProtoService MTProtoService { get { return _mtProtoService; } }\r\n\r\n        private INavigationService _navigationService;\r\n\r\n        private ICacheService _cacheService;\r\n\r\n        private IPushService _pushService;\r\n\r\n        private bool _registerDeviceOnce;\r\n\r\n        private bool _isProxyEnabled;\r\n\r\n        public bool IsProxyEnabled\r\n        {\r\n            get { return _isProxyEnabled; }\r\n            set\r\n            {\r\n                if (_isProxyEnabled != value)\r\n                {\r\n                    _isProxyEnabled = value;\r\n                    NotifyOfPropertyChange(() => IsProxyEnabled);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _connecting;\r\n\r\n        public bool Connecting\r\n        {\r\n            get { return _connecting; }\r\n            set\r\n            {\r\n                if (_connecting != value)\r\n                {\r\n                    _connecting = value;\r\n                    NotifyOfPropertyChange(() => Connecting);\r\n                }\r\n            }\r\n        }\r\n\r\n        private ConnectionType _connectionType = ConnectionType.Direct;\r\n\r\n        public ConnectionType ConnectionType\r\n        {\r\n            get { return _connectionType; }\r\n            set\r\n            {\r\n                if (_connectionType != value)\r\n                {\r\n                    _connectionType = value;\r\n                    NotifyOfPropertyChange(() => ConnectionType);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void OnAnimationComplete()\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (!isAuthorized)\r\n                {\r\n                    Telegram.Logs.Log.Write(\"StartupViewModel ShellViewModel.OnAnimationComplete IsAuthorized=false\");\r\n                    TLUtils.IsLogEnabled = true;\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        _stateService.ClearNavigationStack = true;\r\n                        _navigationService.UriFor<StartupViewModel>().Navigate();\r\n                    });\r\n                }\r\n                else\r\n                {\r\n                    TLUtils.IsLogEnabled = false;\r\n\r\n                    if (_registerDeviceOnce) return;\r\n\r\n                    _pushService.RegisterDeviceAsync(() =>\r\n                    {\r\n                        _registerDeviceOnce = true;\r\n                    });\r\n                    _mtProtoService.CurrentUserId = new TLInt(_stateService.CurrentUserId);\r\n\r\n                    ContactsHelper.UpdateDelayedContactsAsync(_cacheService, _mtProtoService);\r\n\r\n                    UpdatePasscode();\r\n                }\r\n            });\r\n        }\r\n\r\n        public void UpdatePasscode()\r\n        {\r\n            IsPasscodeEnabled = PasscodeUtils.IsEnabled;\r\n            NotifyOfPropertyChange(() => IsPasscodeEnabled);\r\n        }\r\n\r\n        public ShellViewModel(\r\n#if DEBUG\r\nLongPollViewModel longPoll,\r\n            DebugViewModel debugViewModel,\r\n#endif\r\n DialogsViewModel dialogs,\r\n            CallsViewModel calls,\r\n            ContactsViewModel contacts,\r\n            IPushService pushService,\r\n            ICacheService cacheService,\r\n            IStateService stateService,\r\n            IMTProtoService mtProtoService,\r\n            ITelegramEventAggregator eventAggregator,\r\n            INavigationService navigationService)\r\n        {\r\n            App.Log(\"start ShellViewModel .ctor \");\r\n            _pushService = pushService;\r\n\r\n            App.Log(\"start 1 ShellViewModel .ctor \");\r\n            Dialogs = dialogs;\r\n            Calls = calls;\r\n            Contacts = contacts;\r\n#if DEBUG\r\n            _debug = debugViewModel;\r\n            _longPoll = longPoll;\r\n#endif\r\n\r\n            App.Log(\"start 2 ShellViewModel .ctor \");\r\n            _stateService = stateService;\r\n            _eventAggregator = eventAggregator;\r\n            _mtProtoService = mtProtoService;\r\n\r\n            App.Log(\"start 3 ShellViewModel .ctor \");\r\n\r\n            _mtProtoService.AuthorizationRequired += OnAuthorizationRequired;\r\n            _mtProtoService.CheckDeviceLocked += OnCheckDeviceLocked;\r\n            App.Log(\"start ShellViewModel .ctor Before NetworkInformation\");\r\n\r\n            App.Log(\"start ShellViewModel .ctor After NetworkInformation\");\r\n            _navigationService = navigationService;\r\n            _cacheService = cacheService;\r\n\r\n            _eventAggregator.Subscribe(this);\r\n\r\n            //Execute.BeginOnThreadPool(TimeSpan.FromSeconds(5.0), () =>\r\n            //{\r\n            //    var storeUpdateService = new WindowsPhoneStoreUpdateService();\r\n            //    storeUpdateService.CheckForUpdatedVersion(\"Text\", \"Title\");\r\n            //});\r\n\r\n            App.Log(\"stop ShellViewModel .ctor\");\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var allStickers = stateService.GetAllStickers();\r\n                var featuredStickers = stateService.GetFeaturedStickers();\r\n            });\r\n        }\r\n\r\n        private void OnCheckDeviceLocked(object sender, System.EventArgs e)\r\n        {\r\n            UpdateDeviceLockedAsync(false);\r\n        }\r\n\r\n        private static int _previousPeriod = -2;\r\n\r\n        public void UpdateDeviceLockedAsync(bool force = true)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (isAuthorized)\r\n                {\r\n                    UpdatePasscode();\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                        if (frame != null && frame.IsPasscodeActive)\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        var period = -1;\r\n                        if (PasscodeUtils.IsEnabled)\r\n                        {\r\n                            period = PasscodeUtils.AutolockTimeout;\r\n\r\n                            if (PasscodeUtils.Locked)\r\n                            {\r\n                                period = 0;\r\n                            }\r\n                        }\r\n\r\n                        if (!force\r\n                            && _previousPeriod == period\r\n                            && (period == -1 || period == int.MaxValue))\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        if (!force\r\n                            && (period == TimeSpan.FromHours(1).TotalSeconds || period == TimeSpan.FromHours(5).TotalSeconds))\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        MTProtoService.UpdateDeviceLockedAsync(new TLInt(period),\r\n                            result =>\r\n                            {\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    _previousPeriod = period;\r\n                                });\r\n\r\n                                //Execute.ShowDebugMessage(string.Format(\"account.updateDeviceLocked {0} result {1}\", period, result.Value));\r\n                            },\r\n                            error =>\r\n                            {\r\n                                Execute.ShowDebugMessage(string.Format(\"account.updateDeviceLocked {0} error {1}\", period, error));\r\n                            });\r\n                    });\r\n                }\r\n            });\r\n        }\r\n\r\n        private void OnAuthorizationRequired(object sender, AuthorizationRequiredEventArgs e)\r\n        {\r\n            Telegram.Logs.Log.Write(\"StartupViewModel ShellViewModel.OnAuthorizationRequired \" + e.MethodName + \" \" + e.Error + \" \" + e.AuthKeyId);\r\n\r\n            var updateService = IoC.Get<IUpdatesService>();\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                SettingsViewModel.LogOutCommon(\r\n                    _eventAggregator,\r\n                    _mtProtoService,\r\n                    updateService,\r\n                    _cacheService,\r\n                    _stateService,\r\n                    _pushService,\r\n                    _navigationService);\r\n            });\r\n        }\r\n\r\n        public void Load()\r\n        {\r\n            //Dialogs = IoC.Get<DialogsViewModel>();\r\n            //Calls = IoC.Get<CallsViewModel>();\r\n            //Contacts = IoC.Get<ContactsViewModel>();\r\n\r\n            //Items.Add(Dialogs);\r\n            //Items.Add(Calls);\r\n            //Items.Add(Contacts);\r\n            ////#if DEBUG\r\n            ////            Items.Add(_debug);\r\n            ////            Items.Add(_longPoll);\r\n            ////#endif\r\n\r\n            //ActivateItem(Dialogs);\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            App.Log(\"ShellViewModel.OnInitialize start\");\r\n            base.OnInitialize();\r\n\r\n            Items.Add(Dialogs);\r\n            Items.Add(Calls);\r\n            Items.Add(Contacts);\r\n#if DEBUG\r\n            Items.Add(_debug);\r\n            Items.Add(_longPoll);\r\n#endif\r\n            ActivateItem(Dialogs);\r\n\r\n            App.Log(\"ShellViewModel.OnInitialize stop\");\r\n        }\r\n\r\n        public static void Navigate(INavigationService navigationService)\r\n        {\r\n            var lastEntry = navigationService.BackStack.LastOrDefault();\r\n            if (lastEntry != null && lastEntry.Source.ToString().Contains(\"ShellView.xaml\"))\r\n            {\r\n                while (navigationService.BackStack.FirstOrDefault() != lastEntry)\r\n                {\r\n                    navigationService.RemoveBackEntry();\r\n                }\r\n                navigationService.GoBack();\r\n            }\r\n            else\r\n            {\r\n                while (navigationService.RemoveBackEntry() != null) { }\r\n                IoC.Get<IStateService>().RemoveBackEntry = true;\r\n                navigationService.UriFor<ShellViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            _stateService.IsMainViewOpened = true;\r\n\r\n            ThreadPool.QueueUserWorkItem(state =>\r\n                _stateService.GetNotifySettingsAsync(settings =>\r\n                {\r\n                    var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n\r\n                    if (isAuthorized && !settings.InvisibleMode)\r\n                    {\r\n                        _mtProtoService.RaiseSendStatus(new SendStatusEventArgs(new TLBool(false)));\r\n                    }\r\n                }));\r\n\r\n            if (_stateService.FirstRun)\r\n            {\r\n                _stateService.FirstRun = false;\r\n\r\n                Dialogs.FirstRun = true;\r\n                Contacts.FirstRun = true;\r\n                Calls.FirstRun = true;\r\n\r\n                _pushService.RegisterDeviceAsync(() => { });\r\n            }\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                _navigationService.RemoveBackEntry();\r\n            }\r\n\r\n            NavigateByUserNameAsync();\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        private void NavigateByUserNameAsync()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                if (_stateService.Domain != null)\r\n                {\r\n                    var domain = _stateService.Domain;\r\n                    _stateService.Domain = null;\r\n\r\n                    MTProtoService.ResolveUsernameAsync(new TLString(domain),\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        var peerUser = result.Peer as TLPeerUser;\r\n                        if (peerUser != null)\r\n                        {\r\n                            var user = result.Users.FirstOrDefault();\r\n                            if (user != null)\r\n                            {\r\n                                Contacts.OpenContactDetails(user);\r\n                            }\r\n                        }\r\n\r\n                        var peerChannel = result.Peer as TLPeerChannel;\r\n                        var peerChat = result.Peer as TLPeerChat;\r\n                        if (peerChannel != null || peerChat != null)\r\n                        {\r\n                            var channel = result.Chats.FirstOrDefault();\r\n                            if (channel != null)\r\n                            {\r\n                                Dialogs.OpenChatDetails(channel);\r\n                            }\r\n                        }\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (TLRPCError.CodeEquals(error, ErrorCode.BAD_REQUEST)\r\n                            && TLRPCError.TypeEquals(error, ErrorType.QUERY_TOO_SHORT))\r\n                        {\r\n                            Execute.ShowDebugMessage(\"contacts.resolveUsername error \" + error);\r\n                        }\r\n                        else if (TLRPCError.CodeEquals(error, ErrorCode.FLOOD))\r\n                        {\r\n                            Execute.ShowDebugMessage(\"contacts.resolveUsername error \" + error);\r\n                        }\r\n\r\n                        Execute.ShowDebugMessage(\"contacts.resolveUsername error \" + error);\r\n                    }));\r\n                }\r\n            });\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            _stateService.IsMainViewOpened = false;\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n\r\n        public string SendingText;\r\n\r\n        public void Send()\r\n        {\r\n\r\n        }\r\n\r\n        public void OpenSettings()\r\n        {\r\n            var featuredStickers = StateService.GetFeaturedStickers();\r\n            var allStickers = StateService.GetAllStickers();\r\n            var masks = StateService.GetMasks();\r\n            var user = _cacheService.GetUser(new TLInt(_stateService.CurrentUserId));\r\n            var proxySettings = IoC.Get<ITransportService>().GetProxyConfig();\r\n\r\n            _stateService.CurrentContact = user;\r\n            _navigationService.UriFor<SettingsViewModel>().Navigate();\r\n        }\r\n\r\n        public void ComposeMessage()\r\n        {\r\n            Dialogs.CreateDialog();\r\n        }\r\n\r\n        public void AddContact()\r\n        {\r\n            Contacts.AddContact();\r\n        }\r\n\r\n        public void RefreshItems()\r\n        {\r\n            var itemsViewModel = ActiveItem as ItemsViewModelBase;\r\n            if (itemsViewModel != null)\r\n            {\r\n                itemsViewModel.RefreshItems();\r\n            }\r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            var dialogs = ActiveItem as DialogsViewModel;\r\n            if (dialogs != null)\r\n            {\r\n                dialogs.Search();\r\n                return;\r\n            }\r\n\r\n            var contacts = ActiveItem as ContactsViewModel;\r\n            if (contacts != null)\r\n            {\r\n                contacts.Search();\r\n            }\r\n        }\r\n\r\n        public void About()\r\n        {\r\n            _navigationService.UriFor<AboutViewModel>().Navigate();\r\n        }\r\n\r\n        public void Add()\r\n        {\r\n            var itemsViewModel = ActiveItem as DialogsViewModel;\r\n            if (itemsViewModel != null)\r\n            {\r\n                ComposeMessage();\r\n            }\r\n            else\r\n            {\r\n                AddContact();\r\n            }\r\n        }\r\n\r\n        public void BeginOnThreadPool(System.Action action)\r\n        {\r\n            ThreadPool.QueueUserWorkItem(state => action());\r\n        }\r\n\r\n        public static CustomMessageBox ShowCustomMessageBox(string message, string caption, object rightButtonContent, object leftButtonContent = null, Action<CustomMessageBoxResult> dismissed = null, object content = null)\r\n        {\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225 || Environment.OSVersion.Version.Major >= 10;\r\n\r\n            var confirmation = new CustomMessageBox\r\n            {\r\n                Caption = caption,\r\n                Message = message,\r\n                Content = content,\r\n                RightButtonContent = isFullHD && rightButtonContent is string ? rightButtonContent.ToString().ToLowerInvariant() : rightButtonContent,\r\n                LeftButtonContent = isFullHD && leftButtonContent is string ? leftButtonContent.ToString().ToLowerInvariant() : leftButtonContent\r\n            };\r\n\r\n#if WP8\r\n            if (isFullHD)\r\n            {\r\n                confirmation.Style = (Style)Application.Current.Resources[\"CustomMessageBoxFullHDStyle\"];\r\n            }\r\n#endif\r\n            confirmation.Dismissed += (sender, args) =>\r\n            {\r\n                dismissed.SafeInvoke(args.Result);\r\n            };\r\n            confirmation.Tap += (sender, args) =>\r\n            {\r\n                args.Handled = true;\r\n            };\r\n            confirmation.Show();\r\n\r\n            return confirmation;\r\n        }\r\n\r\n        public void Resend(TLMessage25 message)\r\n        {\r\n            if (message.Media is TLMessageMediaEmpty)\r\n            {\r\n                DialogDetailsViewModel.SendInternal(message, _mtProtoService);\r\n            }\r\n        }\r\n\r\n        public void ChangePasscodeState()\r\n        {\r\n            PasscodeUtils.ChangeLocked();\r\n            NotifyOfPropertyChange(() => PasscodeImageSource);\r\n            NotifyOfPropertyChange(() => PasscodeImageBrush);\r\n        }\r\n\r\n        public void Handle(TLDecryptedMessageBase message)\r\n        {\r\n            if (_stateService.SuppressNotifications) return;\r\n            if (message.Out.Value) return;\r\n\r\n            var from = _cacheService.GetUser(message.FromId);\r\n            if (from == null) return;\r\n\r\n            _stateService.GetNotifySettingsAsync(\r\n               s =>\r\n               {\r\n                   try\r\n                   {\r\n                       var activeDialog = _stateService.ActiveDialog;\r\n                       var toId = message.ChatId;\r\n                       var fromId = message.FromId;\r\n                       var suppressNotification = activeDialog is TLEncryptedChatBase && toId.Value == ((TLEncryptedChatBase)activeDialog).Id.Value;\r\n                       if (suppressNotification) return;\r\n\r\n                       var isDisplayedMessage = TLUtils.IsDisplayedDecryptedMessageInternal(message);\r\n                       if (!isDisplayedMessage) return;\r\n\r\n                       if (s.InAppMessagePreview)\r\n                       {\r\n                           Execute.BeginOnUIThread(() =>\r\n                           {\r\n                               var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                               if (frame != null)\r\n                               {\r\n                                   var shellView = frame.Content as ShellView;\r\n                                   if (shellView == null)\r\n                                   {\r\n                                       var title = from.FullName;\r\n\r\n                                       var text = DialogToBriefInfoConverter.Convert(message, true).Replace(\"\\n\", \" \");\r\n\r\n                                       var toast = new Telegram.Controls.Notifications.ToastPrompt\r\n                                       {\r\n                                           DataContext = from,\r\n                                           TextOrientation = Orientation.Horizontal,\r\n                                           Foreground = new SolidColorBrush(Colors.White),\r\n                                           FontSize = (double)Application.Current.Resources[\"PhoneFontSizeSmall\"],\r\n                                           Title = title,\r\n                                           Message = text,\r\n                                           ImageHeight = 48,\r\n                                           ImageWidth = 48,\r\n                                           ImageSource = new BitmapImage(new Uri(\"/ToastPromptIcon.png\", UriKind.Relative))\r\n                                       };\r\n\r\n                                       toast.Tap += (sender, args) =>\r\n                                       {\r\n                                           var dialogDetailsView = ((PhoneApplicationFrame)Application.Current.RootVisual).Content as DialogDetailsView;\r\n                                           if (dialogDetailsView != null)\r\n                                           {\r\n                                               TelegramTransitionService.SetNavigationOutTransition(dialogDetailsView, null);\r\n                                           }\r\n\r\n                                           var secretDialogDetailsView = ((PhoneApplicationFrame)Application.Current.RootVisual).Content as SecretDialogDetailsView;\r\n                                           if (secretDialogDetailsView != null)\r\n                                           {\r\n                                               TelegramTransitionService.SetNavigationOutTransition(secretDialogDetailsView, null);\r\n                                           }\r\n\r\n                                           var encryptedChat = _cacheService.GetEncryptedChat(message.ChatId);\r\n\r\n                                           _stateService.Participant = from;\r\n                                           _stateService.With = encryptedChat;\r\n                                           _stateService.RemoveBackEntries = true;\r\n                                           _navigationService.UriFor<SecretDialogDetailsViewModel>().WithParam(x => x.RandomParam, Guid.NewGuid().ToString()).Navigate();\r\n                                       };\r\n\r\n                                       toast.Show();\r\n                                   }\r\n                               }\r\n                           });\r\n                       }\r\n\r\n                       if (s.InAppVibration)\r\n                       {\r\n                           VibrateController.Default.Start(TimeSpan.FromMilliseconds(300));\r\n                       }\r\n\r\n                       if (s.InAppSound)\r\n                       {\r\n                           var sound = \"Sounds/Default.wav\";\r\n                           //if (toId is TLPeerEncryptedChat && !string.IsNullOrEmpty(s.GroupSound))\r\n                           //{\r\n                           //    sound = \"Sounds/\" + s.GroupSound + \".wav\";\r\n                           //}\r\n                           //else \r\n                           if (!string.IsNullOrEmpty(s.ContactSound))\r\n                           {\r\n                               sound = \"Sounds/\" + s.ContactSound + \".wav\";\r\n                           }\r\n\r\n                           //if (toId is TLPeerChat && chat != null && chat.NotifySettings is TLPeerNotifySettings)\r\n                           //{\r\n                           //    sound = \"Sounds/\" + ((TLPeerNotifySettings)chat.NotifySettings).Sound.Value + \".wav\";\r\n                           //}\r\n                           //else \r\n                           var notifySettings = from.NotifySettings as TLPeerNotifySettings;\r\n                           if (from != null && notifySettings != null && !TLString.IsNullOrEmpty(notifySettings.Sound))\r\n                           {\r\n                               sound = \"Sounds/\" + notifySettings.Sound.Value + \".wav\";\r\n                           }\r\n\r\n                           if (!Telegram.Api.Helpers.Utils.XapContentFileExists(sound))\r\n                           {\r\n                               sound = \"Sounds/Default.wav\";\r\n                           }\r\n\r\n                           var stream = TitleContainer.OpenStream(sound);\r\n                           var effect = SoundEffect.FromStream(stream);\r\n\r\n                           FrameworkDispatcher.Update();\r\n                           effect.Play();\r\n                       }\r\n\r\n                   }\r\n                   catch (Exception e)\r\n                   {\r\n                       TLUtils.WriteException(\"ShellViewModel.Handle(TLDecryptedMessage)\", e);\r\n                   }\r\n\r\n               });\r\n        }\r\n\r\n        public void Handle(TLMessageCommon message)\r\n        {\r\n            if (LocationPicker != null)\r\n            {\r\n                var message70 = message as TLMessage70;\r\n                if (message70 != null && !message70.Out.Value)\r\n                {\r\n                    var mediaGeoLive = message70.Media as TLMessageMediaGeoLive;\r\n                    if (mediaGeoLive != null)\r\n                    {\r\n                        mediaGeoLive.EditDate = message70.EditDate;\r\n                        mediaGeoLive.Date = message70.Date;\r\n                        if (mediaGeoLive.Active)\r\n                        {\r\n                            if (LocationPicker != null)\r\n                            {\r\n                                var currentMessage = LocationPicker.MessageGeoLive as TLMessage70;\r\n                                if (currentMessage != null)\r\n                                {\r\n                                    var currentPeerUser = currentMessage.ToId as TLPeerUser;\r\n                                    var peerUser = message70.ToId as TLPeerUser;\r\n                                    if (peerUser != null\r\n                                        && currentPeerUser != null\r\n                                        && message.FromId != null\r\n                                        && currentPeerUser.Id.Value == message.FromId.Value)\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() => LocationPicker.UpdateLiveLocation(message70));\r\n                                        return;\r\n                                    }\r\n\r\n                                    var currentPeerChat = currentMessage.ToId as TLPeerChat;\r\n                                    var peerChat = message70.ToId as TLPeerChannel;\r\n                                    if (peerChat != null\r\n                                        && currentPeerChat != null\r\n                                        && peerChat.Id.Value == currentPeerChat.Id.Value)\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() => LocationPicker.UpdateLiveLocation(message70));\r\n                                        return;\r\n                                    }\r\n\r\n                                    var currentPeerChannel = currentMessage.ToId as TLPeerChannel;\r\n                                    var peerChannel = message70.ToId as TLPeerChannel;\r\n                                    if (peerChannel != null\r\n                                        && currentPeerChannel != null\r\n                                        && peerChannel.Id.Value == currentPeerChannel.Id.Value)\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() => LocationPicker.UpdateLiveLocation(message70));\r\n                                        return;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (_stateService.SuppressNotifications)\r\n            {\r\n                //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[StateService.SuppressNotification=true] msg_id={0}\", message.Id));\r\n                return;\r\n            }\r\n            if (message.Out.Value)\r\n            {\r\n                //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[message.Out=true] msg_id={0}\", message.Id));\r\n                return;\r\n            }\r\n            if (!message.Unread.Value)\r\n            {\r\n                //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[message.Unread=false] msg_id={0}\", message.Id));\r\n                return;\r\n            }\r\n\r\n            var message48 = message as TLMessage48;\r\n            if (message48 != null && message48.Silent)\r\n            {\r\n                //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[message.Silent=true] msg_id={0}\", message.Id));\r\n                return;\r\n            }\r\n\r\n            TLUserBase from = null;\r\n            if (message.FromId != null && message.FromId.Value >= 0)\r\n            {\r\n                from = _cacheService.GetUser(message.FromId);\r\n                if (from == null)\r\n                {\r\n                    //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[CacheService.GetUser(message.FromId)=null] msg_id={0} from_id={1}\", message.Id, message.FromId));\r\n                    return;\r\n                }\r\n            }\r\n\r\n            _stateService.GetNotifySettingsAsync(\r\n                s =>\r\n                {\r\n                    try\r\n                    {\r\n                        var activeDialog = _stateService.ActiveDialog;\r\n                        var toId = message.ToId;\r\n                        var fromId = message.FromId;\r\n                        var suppressNotification = false;\r\n                        TLDialogBase dialog = null;\r\n\r\n                        if (toId is TLPeerChat\r\n                            && activeDialog is TLChat\r\n                            && toId.Id.Value == ((TLChat)activeDialog).Id.Value)\r\n                        {\r\n                            //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[activeDialog(TLChat)=message.ToId] msg_id={0} to_id={1}\", message.Id, message.ToId));\r\n                            suppressNotification = true;\r\n                        }\r\n                        if (toId is TLPeerChannel\r\n                            && activeDialog is TLChannel\r\n                            && toId.Id.Value == ((TLChannel)activeDialog).Id.Value)\r\n                        {\r\n                            //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[activeDialog(TLChannel)=message.ToId] msg_id={0} to_id={1}\", message.Id, message.ToId));\r\n                            suppressNotification = true;\r\n                        }\r\n                        else if (toId is TLPeerUser\r\n                            && activeDialog is TLUserBase\r\n                            && ((from != null && from.IsSelf) || fromId.Value == ((TLUserBase)activeDialog).Id.Value))\r\n                        {\r\n                            //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[activeDialog(TLUser)=message.ToId] msg_id={0} to_id={1}\", message.Id, message.ToId));\r\n                            suppressNotification = true;\r\n                        }\r\n\r\n                        if (suppressNotification) return;\r\n\r\n                        TLChatBase chat = null;\r\n                        TLUserBase user = null;\r\n                        TLChannel channel = null;\r\n                        if (message.ToId is TLPeerChat)\r\n                        {\r\n                            chat = _cacheService.GetChat(message.ToId.Id);\r\n                            dialog = _cacheService.GetDialog(new TLPeerChat { Id = message.ToId.Id });\r\n                        }\r\n                        else if (message.ToId is TLPeerChannel)\r\n                        {\r\n                            chat = _cacheService.GetChat(message.ToId.Id);\r\n                            channel = chat as TLChannel;\r\n                            dialog = _cacheService.GetDialog(new TLPeerChannel { Id = message.ToId.Id });\r\n                        }\r\n                        else\r\n                        {\r\n                            if (message.Out.Value)\r\n                            {\r\n                                user = _cacheService.GetUser(message.ToId.Id);\r\n                                dialog = _cacheService.GetDialog(new TLPeerUser { Id = message.ToId.Id });\r\n                            }\r\n                            else\r\n                            {\r\n                                user = _cacheService.GetUser(message.FromId);\r\n                                dialog = _cacheService.GetDialog(new TLPeerUser { Id = message.FromId });\r\n                            }\r\n                        }\r\n\r\n                        var now = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n                        if (chat != null)\r\n                        {\r\n                            var notifySettingsBase = chat.NotifySettings;\r\n                            if (notifySettingsBase == null)\r\n                            {\r\n                                notifySettingsBase = dialog != null ? dialog.NotifySettings : null;\r\n                            }\r\n\r\n                            if (notifySettingsBase == null)\r\n                            {\r\n                                if (channel != null)\r\n                                {\r\n                                    MTProtoService.GetFullChannelAsync(channel.ToInputChannel(),\r\n                                        chatFull =>\r\n                                        {\r\n                                            chat.NotifySettings = chatFull.FullChat.NotifySettings;\r\n                                            if (dialog != null)\r\n                                            {\r\n                                                dialog.NotifySettings = chatFull.FullChat.NotifySettings;\r\n                                                Execute.BeginOnUIThread(() =>\r\n                                                {\r\n                                                    dialog.NotifyOfPropertyChange(() => dialog.NotifySettings);\r\n                                                    dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                                                });\r\n                                            }\r\n                                        });\r\n                                }\r\n                                else\r\n                                {\r\n                                    MTProtoService.GetFullChatAsync(chat.Id,\r\n                                        chatFull =>\r\n                                        {\r\n                                            chat.NotifySettings = chatFull.FullChat.NotifySettings;\r\n                                            if (dialog != null)\r\n                                            {\r\n                                                dialog.NotifySettings = chatFull.FullChat.NotifySettings;\r\n                                                Execute.BeginOnUIThread(() =>\r\n                                                {\r\n                                                    dialog.NotifyOfPropertyChange(() => dialog.NotifySettings);\r\n                                                    dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                                                });\r\n                                            }\r\n                                        });\r\n                                }\r\n                            }\r\n\r\n                            var alert = StateService.GetNotifySettings().GroupAlert;\r\n                            var notifySettings = notifySettingsBase as TLPeerNotifySettings;\r\n                            suppressNotification =\r\n                                notifySettings == null\r\n                                || notifySettings.MuteUntil != null && notifySettings.MuteUntil.Value > now.Value\r\n                                || notifySettings.MuteUntil == null && !alert;\r\n                            if (suppressNotification)\r\n                            {\r\n                                //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[muteUntil > now] msg_id={0} mute_until={1} now={2}\", message.Id, notifySettings != null ? notifySettings.MuteUntil : null, now));\r\n                            }\r\n                        }\r\n\r\n                        if (user != null)\r\n                        {\r\n                            var notifySettingsBase = user.NotifySettings;\r\n                            if (notifySettingsBase == null)\r\n                            {\r\n                                notifySettingsBase = dialog != null ? dialog.NotifySettings : null;\r\n                            }\r\n\r\n                            if (notifySettingsBase == null)\r\n                            {\r\n                                MTProtoService.GetFullUserAsync(user.ToInputUser(),\r\n                                    userFull =>\r\n                                    {\r\n                                        user.NotifySettings = userFull.NotifySettings;\r\n                                        if (dialog != null)\r\n                                        {\r\n                                            dialog.NotifySettings = userFull.NotifySettings;\r\n                                            Execute.BeginOnUIThread(() =>\r\n                                            {\r\n                                                dialog.NotifyOfPropertyChange(() => dialog.NotifySettings);\r\n                                                dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                                            });\r\n                                        }\r\n                                    });\r\n                            }\r\n\r\n                            var alert = StateService.GetNotifySettings().ContactAlert;\r\n                            var notifySettings = notifySettingsBase as TLPeerNotifySettings;\r\n                            suppressNotification = user.IsSelf\r\n                                || notifySettings == null\r\n                                || notifySettings.MuteUntil != null && notifySettings.MuteUntil.Value > now.Value\r\n                                || notifySettings.MuteUntil == null && !alert;\r\n                            if (suppressNotification)\r\n                            {\r\n                                //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[muteUntil > now] msg_id={0} mute_until={1} now={2}\", message.Id, notifySettings != null ? notifySettings.MuteUntil : null, now));\r\n                            }\r\n                        }\r\n\r\n                        if (suppressNotification) return;\r\n\r\n                        if (dialog != null)\r\n                        {\r\n                            suppressNotification = CheckLastNotificationTime(dialog, now);\r\n                        }\r\n\r\n                        if (suppressNotification)\r\n                        {\r\n                            //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[CheckLastNotificationTime] msg_id={0}\", message.Id));\r\n                            return;\r\n                        }\r\n\r\n                        if (s.InAppMessagePreview)\r\n                        {\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                                if (frame != null)\r\n                                {\r\n                                    var webVerificationView = frame.Content as WebVerificationView;\r\n                                    var shellView = frame.Content as ShellView;\r\n                                    if (shellView == null && webVerificationView == null)\r\n                                    {\r\n                                        var title = message.ToId is TLPeerChat || message.ToId is TLPeerChannel\r\n                                            ? from == null ? chat.FullName : string.Format(\"{0}@{1}\", from.FullName, chat.FullName)\r\n                                            : from.FullName;\r\n\r\n                                        var text = DialogToBriefInfoConverter.Convert(message, true).Replace(\"\\n\", \" \");\r\n                                        var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n                                        var toast = new Telegram.Controls.Notifications.ToastPrompt\r\n                                        {\r\n                                            DataContext = message,//(message.ToId is TLPeerChat || message.ToId is TLPeerChannel)? (TLObject)chat : from,\r\n                                            TextOrientation = Orientation.Horizontal,\r\n                                            Foreground = new SolidColorBrush(Colors.White),\r\n                                            FontSize = (double)Application.Current.Resources[\"PhoneFontSizeSmall\"],\r\n                                            Title = title,\r\n                                            Message = text,\r\n                                            ImageHeight = 48,\r\n                                            ImageWidth = 48,\r\n                                            ImageSource = new BitmapImage(new Uri(\"/ToastPromptIcon.png\", UriKind.Relative)),\r\n                                            Overlay = isLightTheme ? (Brush)Application.Current.Resources[\"InputBorderBrushLight\"] : (Brush)Application.Current.Resources[\"InputBorderBrushDark\"]\r\n                                        };\r\n\r\n                                        toast.Tap += (sender, args) =>\r\n                                        {\r\n                                            var dialogDetailsView = ((PhoneApplicationFrame)Application.Current.RootVisual).Content as DialogDetailsView;\r\n                                            if (dialogDetailsView != null)\r\n                                            {\r\n                                                TelegramTransitionService.SetNavigationOutTransition(dialogDetailsView, null);\r\n                                            }\r\n\r\n                                            var secretDialogDetailsView = ((PhoneApplicationFrame)Application.Current.RootVisual).Content as SecretDialogDetailsView;\r\n                                            if (secretDialogDetailsView != null)\r\n                                            {\r\n                                                TelegramTransitionService.SetNavigationOutTransition(secretDialogDetailsView, null);\r\n                                            }\r\n\r\n                                            _stateService.With = message.ToId is TLPeerChat || message.ToId is TLPeerChannel ? (TLObject)chat : from;\r\n                                            _stateService.RemoveBackEntries = true;\r\n                                            _navigationService.UriFor<DialogDetailsViewModel>().WithParam(x => x.RandomParam, Guid.NewGuid().ToString()).Navigate();\r\n                                        };\r\n\r\n                                        toast.Show();\r\n                                    }\r\n                                }\r\n                            });\r\n                        }\r\n\r\n                        if (_lastNotificationTime.HasValue)\r\n                        {\r\n                            var fromLastNotification = (DateTime.Now - _lastNotificationTime.Value).TotalSeconds;\r\n                            if (fromLastNotification > 0.0 && fromLastNotification < 2.0)\r\n                            {\r\n                                suppressNotification = true;\r\n                            }\r\n                        }\r\n                        _lastNotificationTime = DateTime.Now;\r\n\r\n                        if (suppressNotification)\r\n                        {\r\n                            Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[lastNotificationTime] msg_id={0} last_notification_time={1}, now={2}\", message.Id, _lastNotificationTime, DateTime.Now));\r\n                            return;\r\n                        }\r\n\r\n\r\n                        if (s.InAppVibration)\r\n                        {\r\n                            VibrateController.Default.Start(TimeSpan.FromMilliseconds(300));\r\n                        }\r\n\r\n                        if (s.InAppSound)\r\n                        {\r\n                            var sound = \"Sounds/Default.wav\";\r\n                            if (toId is TLPeerChat && !string.IsNullOrEmpty(s.GroupSound))\r\n                            {\r\n                                sound = \"Sounds/\" + s.GroupSound + \".wav\";\r\n                            }\r\n                            else if (!string.IsNullOrEmpty(s.ContactSound))\r\n                            {\r\n                                sound = \"Sounds/\" + s.ContactSound + \".wav\";\r\n                            }\r\n                            var chatNotifySettings = chat.NotifySettings as TLPeerNotifySettings;\r\n                            var userNotifySettings = user.NotifySettings as TLPeerNotifySettings;\r\n                            if (toId is TLPeerChat && chat != null && chatNotifySettings != null && !TLString.IsNullOrEmpty(chatNotifySettings.Sound))\r\n                            {\r\n                                sound = \"Sounds/\" + chatNotifySettings.Sound.Value + \".wav\";\r\n                            }\r\n                            else if (toId is TLPeerUser && user != null && userNotifySettings != null && !TLString.IsNullOrEmpty(userNotifySettings.Sound))\r\n                            {\r\n                                sound = \"Sounds/\" + userNotifySettings.Sound.Value + \".wav\";\r\n                            }\r\n\r\n                            if (!Telegram.Api.Helpers.Utils.XapContentFileExists(sound))\r\n                            {\r\n                                sound = \"Sounds/Default.wav\";\r\n                            }\r\n\r\n                            var stream = TitleContainer.OpenStream(sound);\r\n                            var effect = SoundEffect.FromStream(stream);\r\n\r\n                            FrameworkDispatcher.Update();\r\n                            effect.Play();\r\n                        }\r\n\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        TLUtils.WriteLine(e.ToString(), LogSeverity.Error);\r\n                    }\r\n\r\n                });\r\n        }\r\n\r\n        private bool CheckLastNotificationTime(TLDialogBase dialog, TLInt now)\r\n        {\r\n            if (dialog != null)\r\n            {\r\n                var alert = dialog.Peer is TLPeerUser\r\n                    ? StateService.GetNotifySettings().ContactAlert\r\n                    : StateService.GetNotifySettings().GroupAlert;\r\n                var notifySettings = dialog.NotifySettings as TLPeerNotifySettings;\r\n                if (notifySettings != null\r\n                    && (notifySettings.MuteUntil != null && notifySettings.MuteUntil.Value > now.Value      // muted chat\r\n                        || notifySettings.MuteUntil == null && !alert))\r\n                {\r\n                    //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[CheckLastNotificationTime 1] mute_until={0} now={1}\", notifySettings.MuteUntil, now));\r\n                    dialog.LastNotificationTime = null;\r\n                    dialog.UnmutedCount = 0;\r\n                    return true;\r\n                }\r\n\r\n                if (dialog.LastNotificationTime == null)\r\n                {\r\n                    dialog.LastNotificationTime = DateTime.Now;\r\n                    dialog.UnmutedCount = 1;\r\n                    return false;\r\n                }\r\n                else\r\n                {\r\n                    var interval = (DateTime.Now - dialog.LastNotificationTime.Value).TotalSeconds;\r\n                    if (interval <= Constants.NotificationInterval)\r\n                    {\r\n                        var unmutedCount = dialog.UnmutedCount;\r\n                        if (unmutedCount < Constants.UnmutedCount)\r\n                        {\r\n                            dialog.UnmutedCount++;\r\n                            return false;\r\n                        }\r\n                        else\r\n                        {\r\n                            //Telegram.Logs.Log.Write(string.Format(\"Cancel notification reason=[CheckLastNotificationTime 2] last_notificaiton_time={0} now={1} interval={2}\", dialog.LastNotificationTime, DateTime.Now, interval));\r\n                            dialog.UnmutedCount++;\r\n                            return true;\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        dialog.LastNotificationTime = DateTime.Now;\r\n                        dialog.UnmutedCount = 1;\r\n                        return false;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private DateTime? _lastNotificationTime;\r\n        private ConnectionProfile _profile;\r\n        private NetworkConnectivityLevel? _connectivityLevel;\r\n\r\n        public void Review()\r\n        {\r\n            new MarketplaceReviewTask().Show();\r\n        }\r\n\r\n        public void OpenKey()\r\n        {\r\n            _mtProtoService.GetConfigInformationAsync(info =>\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    MessageBox.Show(info);\r\n                });\r\n            });\r\n        }\r\n\r\n        public void GetCurrentPacketInfo()\r\n        {\r\n            var packetInfo = _mtProtoService.GetTransportInfo();\r\n\r\n            MessageBox.Show(packetInfo);\r\n        }\r\n\r\n        public void PingDelayDisconnect(int disconnectDelay)\r\n        {\r\n            MTProtoService.PingDelayDisconnectAsync(TLLong.Random(), new TLInt(disconnectDelay),\r\n                result => Execute.ShowDebugMessage(\"pingDelayDisconnect result: pong\" + result.PingId.Value),\r\n                error => Execute.ShowDebugMessage(\"pingDelayDisconnect error: \" + error));\r\n        }\r\n\r\n        public void Handle(UpdatingEventArgs args)\r\n        {\r\n            if (_mtProtoService != null)\r\n            {\r\n                var timeout = 5.0;\r\n#if DEBUG\r\n                timeout = 5.0;\r\n#endif\r\n                _mtProtoService.SetMessageOnTime(timeout, AppResources.Updating + \"...\");\r\n            }\r\n        }\r\n\r\n        public void Handle(UpdateCompletedEventArgs args)\r\n        {\r\n            if (_mtProtoService != null)\r\n            {\r\n                _mtProtoService.SetMessageOnTime(0.0, string.Empty);\r\n            }\r\n\r\n            UpdateChannels(args.UpdateChannelTooLongList);\r\n        }\r\n\r\n        private void UpdateChannels(IList<TLUpdateChannelTooLong> updateChannelTooLongList)\r\n        {\r\n            var info = new StringBuilder();\r\n            if (updateChannelTooLongList != null)\r\n            {\r\n                foreach (var item in updateChannelTooLongList)\r\n                {\r\n                    info.AppendLine(item.ToString());\r\n                }\r\n            }\r\n            Telegram.Logs.Log.Write(\"ShellViewModel.UpdateChannels start count=\" + (updateChannelTooLongList != null ? updateChannelTooLongList.Count.ToString() : \"null\") + \"\\n\" + info);\r\n\r\n            if (updateChannelTooLongList != null)\r\n            {\r\n                foreach (var updateChannelTooLong in updateChannelTooLongList)\r\n                {\r\n                    Handle(updateChannelTooLong);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(UpdateChannelsEventArgs args)\r\n        {\r\n            Telegram.Logs.Log.Write(\"ShellViewModel.Handle UpdateChannelsEventArgs start\");\r\n\r\n            UpdateChannels(args.UpdateChannelTooLongList);\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var sticker = item.Owner as TLStickerItem;\r\n            if (sticker != null)\r\n            {\r\n                sticker.NotifyOfPropertyChange(() => sticker.Self);\r\n            }\r\n\r\n            var document = item.Owner as TLDocument22;\r\n            if (document != null)\r\n            {\r\n                var stickerSet = TelegramViewBase._stickerSet;\r\n                if (stickerSet != null)\r\n                {\r\n                    for (var i = 0; i < stickerSet.Stickers.Count; i++)\r\n                    {\r\n                        var stickerItem = stickerSet.Stickers[i] as TLStickerItem;\r\n                        if (stickerItem != null && stickerItem.Document == document)\r\n                        {\r\n                            stickerItem.NotifyOfPropertyChange(() => stickerItem.Document);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                EmojiControl instance;\r\n                if (EmojiControl.TryGetInstance(out instance))\r\n                {\r\n                    CheckEmojiSprites(document, instance.CurrentSprites);\r\n                    CheckEmojiSprites(document, instance.SearchSprites);\r\n                }\r\n            }\r\n\r\n            var inlineMediaResult = item.Owner as TLBotInlineMediaResult;\r\n            if (inlineMediaResult != null)\r\n            {\r\n                inlineMediaResult.NotifyOfPropertyChange(() => inlineMediaResult.Self);\r\n            }\r\n        }\r\n\r\n        private static void CheckEmojiSprites(TLDocument22 document, List<VListItemBase> sprites)\r\n        {\r\n            if (sprites != null)\r\n            {\r\n                for (var i = 0; i < sprites.Count; i++)\r\n                {\r\n                    var stickerSprite = sprites[i] as StickerSpriteItem;\r\n                    if (stickerSprite != null && stickerSprite.Stickers != null)\r\n                    {\r\n                        for (var j = 0; j < stickerSprite.Stickers.Count; j++)\r\n                        {\r\n                            var stickerItem = stickerSprite.Stickers[j];\r\n                            if (stickerItem != null && stickerItem.Document == document)\r\n                            {\r\n                                stickerItem.NotifyOfPropertyChange(() => stickerItem.Document);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateContactRegistered contactRegistered)\r\n        {\r\n            StateService.GetNotifySettingsAsync(result =>\r\n            {\r\n                if (result.ContactJoined)\r\n                {\r\n                    var user = _cacheService.GetUser(contactRegistered.UserId);\r\n\r\n                    if (user == null)\r\n                    {\r\n                        MTProtoService.GetFullUserAsync(new TLInputUser { UserId = contactRegistered.UserId, AccessHash = new TLLong(0) },\r\n                            userFull =>\r\n                            {\r\n                                user = userFull.ToUser();\r\n                                CreateContactRegisteredMessage(contactRegistered);\r\n                            },\r\n                            error =>\r\n                            {\r\n\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        CreateContactRegisteredMessage(contactRegistered);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private void CreateContactRegisteredMessage(TLUpdateContactRegistered updateContactRegistered)\r\n        {\r\n            var user = _cacheService.GetUser(updateContactRegistered.UserId);\r\n\r\n            if (user != null)\r\n            {\r\n                var currentUserId = MTProtoService.CurrentUserId;\r\n                var message = new TLMessageService17\r\n                {\r\n                    Flags = new TLInt(0),\r\n                    Id = new TLInt(0),\r\n                    FromId = user.Id,\r\n                    ToId = new TLPeerUser { Id = currentUserId },\r\n                    Status = MessageStatus.Confirmed,\r\n                    Out = TLBool.False,\r\n                    Unread = TLBool.False,\r\n                    Date = updateContactRegistered.Date,\r\n                    Action = new TLMessageActionContactRegistered { UserId = user.Id },\r\n                    RandomId = TLLong.Random()\r\n                };\r\n\r\n                _eventAggregator.Publish(user);\r\n\r\n                var dialog = _cacheService.GetDialog(new TLPeerUser { Id = user.Id });\r\n                if (dialog == null)\r\n                {\r\n                    _cacheService.SyncMessage(message, true, true,\r\n                        cachedMessage =>\r\n                        {\r\n                            _eventAggregator.Publish(cachedMessage);\r\n                        });\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(ExceptionInfo info)\r\n        {\r\n            BugSenseWrapper.LogError(info.Exception, info.Caption, new NotificationOptions { Type = enNotificationType.None });\r\n        }\r\n\r\n        public void Handle(TLUpdateChannelTooLong updateChannelTooLong)\r\n        {\r\n            //Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle channel_id={0} TLUpdateChannelTooLong\", updateChannelTooLong.ChannelId));\r\n\r\n            var channel = _cacheService.GetChat(updateChannelTooLong.ChannelId) as TLChannel49;\r\n            if (channel != null && !channel.Min)\r\n            {\r\n                //Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle channel_id={0} TLUpdateChannelTooLong channel!=null\", updateChannelTooLong.ChannelId));\r\n\r\n                var pts = channel.Pts;\r\n                if (pts == null)\r\n                {\r\n                    var dialogPts = _cacheService.GetDialog(new TLPeerChannel { Id = channel.Id }) as IDialogPts;\r\n                    if (dialogPts != null)\r\n                    {\r\n                        pts = dialogPts.Pts;\r\n                    }\r\n                }\r\n\r\n                if (pts != null)\r\n                {\r\n                    //Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle channel_id={1} TLUpdateChannelTooLong GetChannelDifference pts={0}\", pts, updateChannelTooLong.ChannelId));\r\n                    pts = new TLInt(pts.Value - 10 > 0 ? pts.Value - 10 : 1);\r\n                    //Execute.ShowDebugMessage(\"updates.getChannelDifference channel_id=\" + channel.Index + \" pts=\" + pts);\r\n\r\n                    MTProtoService.GetChannelDifferenceAsync(true, channel.ToInputChannel(), new TLChannelMessagesFilterEmpty(), pts, new TLInt(1),\r\n                        result =>\r\n                        {\r\n                            //Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle channel_id={1} TLUpdateChannelTooLong GetChannelDifference result pts={0}\", result.Pts, updateChannelTooLong.ChannelId));\r\n                        },\r\n                        error =>\r\n                        {\r\n                            //Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle channel_id={1} TLUpdateChannelTooLong GetChannelDifference error={0}\", error, updateChannelTooLong.ChannelId));\r\n                        });\r\n                }\r\n\r\n\r\n                //Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle channel_id={0} TLUpdateChannelTooLong GetFullChannel start\", updateChannelTooLong.ChannelId));\r\n                _mtProtoService.GetFullChannelAsync(channel.ToInputChannel(),\r\n                    messagesFull =>\r\n                    {\r\n                        //Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle channel_id={0} TLUpdateChannelTooLong GetFullChannel result\", updateChannelTooLong.ChannelId));\r\n\r\n                        var dialog = _cacheService.GetDialog(new TLPeerChannel { Id = channel.Id }) as TLDialog24;\r\n                        if (dialog != null)\r\n                        {\r\n                            var channelFull = messagesFull.FullChat as TLChannelFull41;\r\n                            if (channelFull != null)\r\n                            {\r\n                                //dialog.UnreadCount = channelFull.UnreadCount;\r\n                                dialog.ReadInboxMaxId = channelFull.ReadInboxMaxId;\r\n                                dialog.NotifySettings = channelFull.NotifySettings;\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    dialog.NotifyOfPropertyChange(() => dialog.NotifySettings);\r\n                                    dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                                });\r\n\r\n                                var dialogChannel = dialog as TLDialogChannel;\r\n                                if (dialogChannel != null)\r\n                                {\r\n                                    dialogChannel.UnreadImportantCount = channelFull.UnreadImportantCount;\r\n                                }\r\n\r\n                                _cacheService.Commit();\r\n                            }\r\n                        }\r\n\r\n                        //Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle channel_id={0} TLUpdateChannelTooLong GetChannelHistory start\", updateChannelTooLong.ChannelId));\r\n\r\n                        _mtProtoService.GetChannelHistoryAsync(\"ShellViewModel.Handle TLUpdateChannelTooLong\", channel.ToInputPeer(), new TLPeerChannel { Id = channel.Id }, true, new TLInt(0), new TLInt(0), new TLInt(Constants.MessagesSlice),\r\n                            result =>\r\n                            {\r\n                                //Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle channel_id={1} TLUpdateChannelTooLong GetChannelHistory result={0}\", result.Messages.Count, updateChannelTooLong.ChannelId));\r\n\r\n                                var topMessage = result.Messages.FirstOrDefault();\r\n                                dialog = _cacheService.GetDialog(new TLPeerChannel { Id = channel.Id }) as TLDialog24;\r\n                                if (dialog != null && topMessage != null)\r\n                                {\r\n                                    var channelFull = messagesFull.FullChat as TLChannelFull41;\r\n                                    if (channelFull != null)\r\n                                    {\r\n                                        dialog.UnreadCount = channelFull.UnreadCount;\r\n                                    }\r\n\r\n                                    dialog.TopMessageId = topMessage.Id;\r\n                                    var dialogChannel = dialog as TLDialogChannel;\r\n                                    if (dialogChannel != null)\r\n                                    {\r\n                                        dialogChannel.TopImportantMessageId = topMessage.Id;\r\n                                    }\r\n\r\n                                    _cacheService.Commit();\r\n\r\n                                    Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle channel_id={0} TLUpdateChannelTooLong publish ChannelUpdateCompletedEventArgs\", updateChannelTooLong.ChannelId));\r\n\r\n                                    _eventAggregator.Publish(new ChannelUpdateCompletedEventArgs { ChannelId = channel.Id });\r\n                                }\r\n                            },\r\n                            error =>\r\n                            {\r\n                                //Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle GetChannelHistory error={0} channel_id={1}\", error, updateChannelTooLong.ChannelId));\r\n                            });\r\n                    },\r\n                    error =>\r\n                    {\r\n                        //Telegram.Logs.Log.Write(string.Format(\"  ShellViewModel.Handle channel_id={1} TLUpdateChannelTooLong GetFullChannel error={0}\", error, updateChannelTooLong.ChannelId));\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                //var updatesService = IoC.Get<IUpdatesService>();\r\n                //updatesService.LoadStateAndUpdate(() =>\r\n                //{\r\n                //    Execute.ShowDebugMessage(\"Handle(TLUpdateChannelTooLong) UpdatesService.LoadStateAndUpdateCompleted\");\r\n                //});\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateFavedStickers updateFavedStickers)\r\n        {\r\n            StateService.GetAllStickersAsync(cachedStickers =>\r\n            {\r\n                var cachedStickers43 = cachedStickers as TLAllStickers43;\r\n                if (cachedStickers43 != null)\r\n                {\r\n                    var hash = cachedStickers43.FavedStickers != null ? cachedStickers43.FavedStickers.Hash : new TLInt(0);\r\n\r\n                    MTProtoService.GetFavedStickersAsync(hash,\r\n                        result =>\r\n                        {\r\n                            var favedStickers = result as TLFavedStickers;\r\n                            if (favedStickers != null)\r\n                            {\r\n                                cachedStickers43.FavedStickers = favedStickers;\r\n                                StateService.SaveAllStickersAsync(cachedStickers43);\r\n\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    EmojiControl emojiControl;\r\n                                    if (EmojiControl.TryGetInstance(out emojiControl))\r\n                                    {\r\n                                        emojiControl.ResetFavedStickers();\r\n                                    }\r\n                                });\r\n                            }\r\n                        },\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.getFavedStickers error \" + error);\r\n                        });\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(TLUpdateStickerSets updateStickerSets)\r\n        {\r\n            StateService.GetMasksAsync(cachedMasks =>\r\n            {\r\n                var hash = cachedMasks != null ? cachedMasks.Hash : TLString.Empty;\r\n\r\n                MTProtoService.GetMaskStickersAsync(hash,\r\n                    result =>\r\n                    {\r\n                        var masks = result as TLAllStickers43;\r\n                        if (masks != null)\r\n                        {\r\n                            var masks29 = cachedMasks as TLAllStickers29;\r\n                            if (masks29 != null)\r\n                            {\r\n                                masks.ShowStickersTab = masks29.ShowStickersTab;\r\n                                masks.RecentlyUsed = masks29.RecentlyUsed;\r\n                                masks.Date = TLUtils.DateToUniversalTimeTLInt(0, DateTime.Now);\r\n                            }\r\n                            var cachedMasks43 = cachedMasks as TLAllStickers43;\r\n                            if (cachedMasks43 != null)\r\n                            {\r\n                                masks.RecentStickers = cachedMasks43.RecentStickers;\r\n                            }\r\n\r\n                            StateService.SaveMasksAsync(masks);\r\n\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                _eventAggregator.Publish(new UpdateStickerSetsEventArgs(masks, true));\r\n\r\n                                //EmojiControl emojiControl;\r\n                                //if (EmojiControl.TryGetInstance(out emojiControl))\r\n                                //{\r\n                                //    emojiControl.ResetStickerSets();\r\n                                //}\r\n                            });\r\n                        }\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.getAllStickers error \" + error);\r\n                    });\r\n            });\r\n\r\n            StateService.GetAllStickersAsync(cachedStickers =>\r\n            {\r\n                MTProtoService.GetAllStickersAsync(cachedStickers.Hash,\r\n                    result =>\r\n                    {\r\n                        var allStickers = result as TLAllStickers43;\r\n                        if (allStickers != null)\r\n                        {\r\n                            var cachedStickers29 = cachedStickers as TLAllStickers29;\r\n                            if (cachedStickers29 != null)\r\n                            {\r\n                                allStickers.ShowStickersTab = cachedStickers29.ShowStickersTab;\r\n                                allStickers.RecentlyUsed = cachedStickers29.RecentlyUsed;\r\n                                allStickers.Date = TLUtils.DateToUniversalTimeTLInt(0, DateTime.Now);\r\n                            }\r\n                            var cachedStickers43 = cachedStickers as TLAllStickers43;\r\n                            if (cachedStickers43 != null)\r\n                            {\r\n                                allStickers.RecentStickers = cachedStickers43.RecentStickers;\r\n                                allStickers.FavedStickers = cachedStickers43.FavedStickers;\r\n                            }\r\n\r\n                            StateService.SaveAllStickersAsync(allStickers);\r\n\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                _eventAggregator.Publish(new UpdateStickerSetsEventArgs(allStickers, false));\r\n\r\n                                EmojiControl emojiControl;\r\n                                if (EmojiControl.TryGetInstance(out emojiControl))\r\n                                {\r\n                                    emojiControl.ResetStickerSets();\r\n                                }\r\n                            });\r\n                        }\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.getAllStickers error \" + error);\r\n                    });\r\n            });\r\n        }\r\n\r\n        public void Handle(TLUpdateStickerSetsOrder updateStickerSetsOrder)\r\n        {\r\n            var updateStickerSetsOrder56 = updateStickerSetsOrder as TLUpdateStickerSetsOrder56;\r\n            if (updateStickerSetsOrder56 == null) return;\r\n\r\n            if (updateStickerSetsOrder56.Masks)\r\n            {\r\n                StateService.GetMasksAsync(cachedMasks =>\r\n                {\r\n                    var masks = cachedMasks as TLAllStickers29;\r\n                    if (masks != null)\r\n                    {\r\n                        var order = updateStickerSetsOrder.Order;\r\n\r\n                        var setsDict = new Dictionary<long, TLStickerSetBase>();\r\n                        for (var i = 0; i < masks.Sets.Count; i++)\r\n                        {\r\n                            setsDict[masks.Sets[i].Id.Value] = masks.Sets[i];\r\n                        }\r\n\r\n                        var sets = new TLVector<TLStickerSetBase>();\r\n                        for (var i = 0; i < order.Count; i++)\r\n                        {\r\n                            TLStickerSetBase stickerSet;\r\n                            if (setsDict.TryGetValue(order[i].Value, out stickerSet))\r\n                            {\r\n                                sets.Add(stickerSet);\r\n                            }\r\n                        }\r\n\r\n                        masks.Sets = new TLVector<TLStickerSetBase>(sets);\r\n                        var newHash = TLUtils.GetAllStickersHash(masks.Sets);\r\n                        masks.Hash = new TLString(newHash.ToString(CultureInfo.InvariantCulture));\r\n\r\n                        var documentSets = new Dictionary<long, TLVector<TLDocumentBase>>();\r\n                        for (var i = 0; i < masks.Documents.Count; i++)\r\n                        {\r\n                            var document22 = masks.Documents[i] as TLDocument22;\r\n                            if (document22 != null)\r\n                            {\r\n                                var stickerSetId = document22.StickerSet as TLInputStickerSetId;\r\n                                if (stickerSetId != null)\r\n                                {\r\n                                    TLVector<TLDocumentBase> stickers;\r\n                                    if (documentSets.TryGetValue(stickerSetId.Id.Value, out stickers))\r\n                                    {\r\n                                        stickers.Add(document22);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        documentSets[stickerSetId.Id.Value] = new TLVector<TLDocumentBase> { document22 };\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        var documents = new TLVector<TLDocumentBase>();\r\n                        for (var i = 0; i < masks.Sets.Count; i++)\r\n                        {\r\n                            TLVector<TLDocumentBase> stickers;\r\n                            if (documentSets.TryGetValue(masks.Sets[i].Id.Value, out stickers))\r\n                            {\r\n                                foreach (var sticker in stickers)\r\n                                {\r\n                                    documents.Add(sticker);\r\n                                }\r\n                            }\r\n                        }\r\n                        masks.Documents = documents;\r\n                        StateService.SaveMasksAsync(masks);\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            _eventAggregator.Publish(new UpdateStickerSetsOrderEventArgs(masks, true));\r\n\r\n                            //EmojiControl emojiControl;\r\n                            //if (EmojiControl.TryGetInstance(out emojiControl))\r\n                            //{\r\n                            //    emojiControl.ReorderStickerSets();\r\n                            //}\r\n                        });\r\n                    }\r\n                });\r\n            }\r\n            else\r\n            {\r\n                StateService.GetAllStickersAsync(cachedStickers =>\r\n                {\r\n                    var allStickers = cachedStickers as TLAllStickers29;\r\n                    if (allStickers != null)\r\n                    {\r\n                        var order = updateStickerSetsOrder.Order;\r\n\r\n                        var setsDict = new Dictionary<long, TLStickerSetBase>();\r\n                        for (var i = 0; i < allStickers.Sets.Count; i++)\r\n                        {\r\n                            setsDict[allStickers.Sets[i].Id.Value] = allStickers.Sets[i];\r\n                        }\r\n\r\n                        var sets = new TLVector<TLStickerSetBase>();\r\n                        for (var i = 0; i < order.Count; i++)\r\n                        {\r\n                            TLStickerSetBase stickerSet;\r\n                            if (setsDict.TryGetValue(order[i].Value, out stickerSet))\r\n                            {\r\n                                sets.Add(stickerSet);\r\n                            }\r\n                        }\r\n\r\n                        allStickers.Sets = new TLVector<TLStickerSetBase>(sets);\r\n                        var newHash = TLUtils.GetAllStickersHash(allStickers.Sets);\r\n                        allStickers.Hash = new TLString(newHash.ToString(CultureInfo.InvariantCulture));\r\n\r\n                        var documentSets = new Dictionary<long, TLVector<TLDocumentBase>>();\r\n                        for (var i = 0; i < allStickers.Documents.Count; i++)\r\n                        {\r\n                            var document22 = allStickers.Documents[i] as TLDocument22;\r\n                            if (document22 != null)\r\n                            {\r\n                                var stickerSetId = document22.StickerSet as TLInputStickerSetId;\r\n                                if (stickerSetId != null)\r\n                                {\r\n                                    TLVector<TLDocumentBase> stickers;\r\n                                    if (documentSets.TryGetValue(stickerSetId.Id.Value, out stickers))\r\n                                    {\r\n                                        stickers.Add(document22);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        documentSets[stickerSetId.Id.Value] = new TLVector<TLDocumentBase> { document22 };\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        var documents = new TLVector<TLDocumentBase>();\r\n                        for (var i = 0; i < allStickers.Sets.Count; i++)\r\n                        {\r\n                            TLVector<TLDocumentBase> stickers;\r\n                            if (documentSets.TryGetValue(allStickers.Sets[i].Id.Value, out stickers))\r\n                            {\r\n                                foreach (var sticker in stickers)\r\n                                {\r\n                                    documents.Add(sticker);\r\n                                }\r\n                            }\r\n                        }\r\n                        allStickers.Documents = documents;\r\n                        StateService.SaveAllStickersAsync(allStickers);\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            _eventAggregator.Publish(new UpdateStickerSetsOrderEventArgs(allStickers, false));\r\n\r\n                            EmojiControl emojiControl;\r\n                            if (EmojiControl.TryGetInstance(out emojiControl))\r\n                            {\r\n                                emojiControl.ReorderStickerSets();\r\n                            }\r\n                        });\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateNewStickerSet updateNewStickerSet)\r\n        {\r\n            var stickerSet32 = updateNewStickerSet.Stickerset.Set as TLStickerSet32;\r\n            if (stickerSet32 != null\r\n                && stickerSet32.Masks)\r\n            {\r\n                StateService.GetMasksAsync(cachedMasks =>\r\n                {\r\n                    var masks29 = cachedMasks as TLAllStickers29;\r\n                    if (masks29 != null)\r\n                    {\r\n                        var documents = new TLVector<TLStickerItem>();\r\n                        foreach (var document in updateNewStickerSet.Stickerset.Documents)\r\n                        {\r\n                            documents.Add(new TLStickerItem { Document = document });\r\n                        }\r\n\r\n                        masks29.Sets.Insert(0, updateNewStickerSet.Stickerset.Set);\r\n                        var newHash = TLUtils.GetAllStickersHash(masks29.Sets);\r\n                        masks29.Hash = new TLString(newHash.ToString(CultureInfo.InvariantCulture));\r\n\r\n                        for (int i = 0; i < updateNewStickerSet.Stickerset.Documents.Count; i++)\r\n                        {\r\n                            masks29.Documents.Insert(i, updateNewStickerSet.Stickerset.Documents[i]);\r\n                        }\r\n\r\n                        var packsDict = new Dictionary<string, TLStickerPack>();\r\n                        for (var i = 0; i < masks29.Packs.Count; i++)\r\n                        {\r\n                            packsDict[masks29.Packs[i].Emoticon.ToString()] = masks29.Packs[i];\r\n                        }\r\n\r\n                        for (var i = 0; i < updateNewStickerSet.Stickerset.Documents.Count; i++)\r\n                        {\r\n                            var document22 = masks29.Documents[i] as TLDocument22;\r\n                            if (document22 != null)\r\n                            {\r\n                                var documentAttributeSticker = document22.Attributes.FirstOrDefault(x => x is TLDocumentAttributeSticker29) as TLDocumentAttributeSticker29;\r\n                                if (documentAttributeSticker != null)\r\n                                {\r\n                                    var emoticon = documentAttributeSticker.Alt.ToString();\r\n                                    if (!string.IsNullOrEmpty(emoticon))\r\n                                    {\r\n                                        TLStickerPack pack;\r\n                                        if (packsDict.TryGetValue(emoticon, out pack))\r\n                                        {\r\n                                            pack.Documents.Insert(0, document22.Id);\r\n                                        }\r\n                                        else\r\n                                        {\r\n                                            packsDict[emoticon] = new TLStickerPack { Emoticon = new TLString(emoticon), Documents = new TLVector<TLLong> { document22.Id } };\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var packs = new TLVector<TLStickerPack>();\r\n                        foreach (var pack in packsDict.Values)\r\n                        {\r\n                            packs.Add(pack);\r\n                        }\r\n                        masks29.Packs = packs;\r\n\r\n                        StateService.SaveMasksAsync(masks29);\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            _eventAggregator.Publish(new UpdateNewStickerSetEventArgs(masks29, true));\r\n\r\n                            //EmojiControl emojiControl;\r\n                            //if (EmojiControl.TryGetInstance(out emojiControl))\r\n                            //{\r\n                            //    emojiControl.AddStickerSet(updateNewStickerSet.Stickerset);\r\n                            //}\r\n                        });\r\n                    }\r\n                });\r\n            }\r\n            else\r\n            {\r\n                StateService.GetAllStickersAsync(cachedStickers =>\r\n                {\r\n                    var allStickers = cachedStickers as TLAllStickers29;\r\n                    if (allStickers != null)\r\n                    {\r\n                        var documents = new TLVector<TLStickerItem>();\r\n                        foreach (var document in updateNewStickerSet.Stickerset.Documents)\r\n                        {\r\n                            documents.Add(new TLStickerItem { Document = document });\r\n                        }\r\n\r\n                        allStickers.Sets.Insert(0, updateNewStickerSet.Stickerset.Set);\r\n                        var newHash = TLUtils.GetAllStickersHash(allStickers.Sets);\r\n                        allStickers.Hash = new TLString(newHash.ToString(CultureInfo.InvariantCulture));\r\n\r\n                        for (int i = 0; i < updateNewStickerSet.Stickerset.Documents.Count; i++)\r\n                        {\r\n                            allStickers.Documents.Insert(i, updateNewStickerSet.Stickerset.Documents[i]);\r\n                        }\r\n\r\n                        var packsDict = new Dictionary<string, TLStickerPack>();\r\n                        for (var i = 0; i < allStickers.Packs.Count; i++)\r\n                        {\r\n                            packsDict[allStickers.Packs[i].Emoticon.ToString()] = allStickers.Packs[i];\r\n                        }\r\n\r\n                        for (var i = 0; i < updateNewStickerSet.Stickerset.Documents.Count; i++)\r\n                        {\r\n                            var document22 = allStickers.Documents[i] as TLDocument22;\r\n                            if (document22 != null)\r\n                            {\r\n                                var documentAttributeSticker = document22.Attributes.FirstOrDefault(x => x is TLDocumentAttributeSticker29) as TLDocumentAttributeSticker29;\r\n                                if (documentAttributeSticker != null)\r\n                                {\r\n                                    var emoticon = documentAttributeSticker.Alt.ToString();\r\n                                    if (!string.IsNullOrEmpty(emoticon))\r\n                                    {\r\n                                        TLStickerPack pack;\r\n                                        if (packsDict.TryGetValue(emoticon, out pack))\r\n                                        {\r\n                                            pack.Documents.Insert(0, document22.Id);\r\n                                        }\r\n                                        else\r\n                                        {\r\n                                            packsDict[emoticon] = new TLStickerPack { Emoticon = new TLString(emoticon), Documents = new TLVector<TLLong> { document22.Id } };\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var packs = new TLVector<TLStickerPack>();\r\n                        foreach (var pack in packsDict.Values)\r\n                        {\r\n                            packs.Add(pack);\r\n                        }\r\n                        allStickers.Packs = packs;\r\n\r\n                        StateService.SaveAllStickersAsync(allStickers);\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            _eventAggregator.Publish(new UpdateNewStickerSetEventArgs(allStickers, false));\r\n\r\n                            EmojiControl emojiControl;\r\n                            if (EmojiControl.TryGetInstance(out emojiControl))\r\n                            {\r\n                                emojiControl.AddStickerSet(updateNewStickerSet.Stickerset);\r\n                            }\r\n                        });\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        public void RemoveMaskSet(TLStickerSetBase stickerSet, TLInputStickerSetBase inputStickerSet)\r\n        {\r\n            StateService.GetMasksAsync(cachedMasks =>\r\n            {\r\n                var masks = cachedMasks as TLAllStickers29;\r\n                if (masks != null)\r\n                {\r\n                    for (var i = 0; i < masks.Sets.Count; i++)\r\n                    {\r\n                        if (masks.Sets[i].Id.Value == stickerSet.Id.Value)\r\n                        {\r\n                            masks.Sets.RemoveAt(i);\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    var newHash = TLUtils.GetAllStickersHash(masks.Sets);\r\n                    masks.Hash = new TLString(newHash.ToString(CultureInfo.InvariantCulture));\r\n\r\n                    var documentsDict = new Dictionary<long, TLDocument22>();\r\n                    for (int i = 0; i < masks.Documents.Count; i++)\r\n                    {\r\n                        var document22 = masks.Documents[i] as TLDocument22;\r\n                        if (document22 != null)\r\n                        {\r\n                            var documentAttributeSticker = document22.Attributes.FirstOrDefault(x => x is TLDocumentAttributeSticker29) as TLDocumentAttributeSticker29;\r\n                            if (documentAttributeSticker != null)\r\n                            {\r\n                                var stickerSetId = documentAttributeSticker.Stickerset as TLInputStickerSetId;\r\n                                if (stickerSetId != null && stickerSetId.Id.Value == stickerSet.Id.Value)\r\n                                {\r\n                                    documentsDict[document22.Id.Value] = document22;\r\n                                    masks.Documents.RemoveAt(i--);\r\n                                    continue;\r\n                                }\r\n                                var stickerSetShortName = documentAttributeSticker.Stickerset as TLInputStickerSetShortName;\r\n                                if (stickerSetShortName != null\r\n                                    && TLString.Equals(stickerSetShortName.ShortName, stickerSet.ShortName, StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    documentsDict[document22.Id.Value] = document22;\r\n                                    masks.Documents.RemoveAt(i--);\r\n                                    continue;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    for (var i = 0; i < masks.Packs.Count; i++)\r\n                    {\r\n                        for (var j = 0; j < masks.Packs[i].Documents.Count; j++)\r\n                        {\r\n                            if (documentsDict.ContainsKey(masks.Packs[i].Documents[j].Value))\r\n                            {\r\n                                masks.Packs[i].Documents.RemoveAt(j--);\r\n                            }\r\n                        }\r\n\r\n                        if (masks.Packs[i].Documents.Count == 0)\r\n                        {\r\n                            masks.Packs.RemoveAt(i--);\r\n                        }\r\n                    }\r\n\r\n                    StateService.SaveMasksAsync(masks);\r\n\r\n                    //Execute.BeginOnUIThread(() =>\r\n                    //{\r\n                    //    EmojiControl emojiControl;\r\n                    //    if (EmojiControl.TryGetInstance(out emojiControl))\r\n                    //    {\r\n                    //        emojiControl.RemoveStickerSet(inputStickerSet);\r\n                    //    }\r\n                    //});\r\n                }\r\n            });\r\n        }\r\n\r\n        public void RemoveStickerSet(TLStickerSetBase stickerSet, TLInputStickerSetBase inputStickerSet)\r\n        {\r\n            StateService.GetAllStickersAsync(cachedStickers =>\r\n            {\r\n                var allStickers = cachedStickers as TLAllStickers29;\r\n                if (allStickers != null)\r\n                {\r\n                    for (var i = 0; i < allStickers.Sets.Count; i++)\r\n                    {\r\n                        if (allStickers.Sets[i].Id.Value == stickerSet.Id.Value)\r\n                        {\r\n                            allStickers.Sets.RemoveAt(i);\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    var newHash = TLUtils.GetAllStickersHash(allStickers.Sets);\r\n                    allStickers.Hash = new TLString(newHash.ToString(CultureInfo.InvariantCulture));\r\n\r\n                    var documentsDict = new Dictionary<long, TLDocument22>();\r\n                    for (int i = 0; i < allStickers.Documents.Count; i++)\r\n                    {\r\n                        var document22 = allStickers.Documents[i] as TLDocument22;\r\n                        if (document22 != null)\r\n                        {\r\n                            var documentAttributeSticker = document22.Attributes.FirstOrDefault(x => x is TLDocumentAttributeSticker29) as TLDocumentAttributeSticker29;\r\n                            if (documentAttributeSticker != null)\r\n                            {\r\n                                var stickerSetId = documentAttributeSticker.Stickerset as TLInputStickerSetId;\r\n                                if (stickerSetId != null && stickerSetId.Id.Value == stickerSet.Id.Value)\r\n                                {\r\n                                    documentsDict[document22.Id.Value] = document22;\r\n                                    allStickers.Documents.RemoveAt(i--);\r\n                                    continue;\r\n                                }\r\n                                var stickerSetShortName = documentAttributeSticker.Stickerset as TLInputStickerSetShortName;\r\n                                if (stickerSetShortName != null\r\n                                    && TLString.Equals(stickerSetShortName.ShortName, stickerSet.ShortName, StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    documentsDict[document22.Id.Value] = document22;\r\n                                    allStickers.Documents.RemoveAt(i--);\r\n                                    continue;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    for (var i = 0; i < allStickers.Packs.Count; i++)\r\n                    {\r\n                        for (var j = 0; j < allStickers.Packs[i].Documents.Count; j++)\r\n                        {\r\n                            if (documentsDict.ContainsKey(allStickers.Packs[i].Documents[j].Value))\r\n                            {\r\n                                allStickers.Packs[i].Documents.RemoveAt(j--);\r\n                            }\r\n                        }\r\n\r\n                        if (allStickers.Packs[i].Documents.Count == 0)\r\n                        {\r\n                            allStickers.Packs.RemoveAt(i--);\r\n                        }\r\n                    }\r\n\r\n                    StateService.SaveAllStickersAsync(allStickers);\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        EmojiControl emojiControl;\r\n                        if (EmojiControl.TryGetInstance(out emojiControl))\r\n                        {\r\n                            emojiControl.RemoveStickerSet(inputStickerSet);\r\n                        }\r\n                    });\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(TLUpdateReadFeaturedStickers update)\r\n        {\r\n            var featuredStickers = StateService.GetFeaturedStickers();\r\n            if (featuredStickers != null)\r\n            {\r\n                featuredStickers.Unread = new TLVector<TLLong>();\r\n\r\n                StateService.SaveFeaturedStickersAsync(featuredStickers);\r\n\r\n                Execute.BeginOnUIThread(() => _eventAggregator.Publish(new UpdateReadFeaturedStickersEventArgs(featuredStickers)));\r\n            }\r\n        }\r\n\r\n        #region Voice calls\r\n\r\n        private static TelegramMessageBox _phoneCallMessageBox;\r\n\r\n        public void Handle(PhoneCallStateChangedEventArgs args)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"  Handle state=\" + args.CallState);\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (_phoneCallMessageBox == null) return;\r\n\r\n                var callView = _phoneCallMessageBox.Content as CallView;\r\n                if (callView == null) return;\r\n\r\n                var callViewModel = callView.ViewModel;\r\n\r\n                if (callViewModel != null\r\n                    && callViewModel.CallId != null\r\n                    && args.Call != null\r\n                    && args.Call.Id.Value == callViewModel.CallId.Value)\r\n                {\r\n                    callViewModel.ChangeCallState(args.CallState);\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(SignalBarsChangedEventArgs args)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (_phoneCallMessageBox == null) return;\r\n\r\n                var callView = _phoneCallMessageBox.Content as CallView;\r\n                if (callView == null) return;\r\n\r\n                var callViewModel = callView.ViewModel;\r\n                if (callViewModel == null) return;\r\n\r\n                callViewModel.Signal = args.Signal;\r\n            });\r\n        }\r\n\r\n        public void Handle(PhoneCallStartedEventArgs args)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (_phoneCallMessageBox == null) return;\r\n\r\n                var callView = _phoneCallMessageBox.Content as CallView;\r\n                if (callView == null) return;\r\n\r\n                var callViewModel = callView.ViewModel;\r\n\r\n                if (callViewModel != null\r\n                    && (callViewModel.CallId == null || args.Call.Id.Value == callViewModel.CallId.Value))\r\n                {\r\n                    if (args.Emojis != null)\r\n                    {\r\n                        callViewModel.Emojis = string.Join(\"\\u2009\", args.Emojis);\r\n                        callViewModel.NotifyOfPropertyChange(() => callViewModel.Emojis);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(PhoneCallDiscardedEventArgs args)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var voipService = IoC.Get<IVoIPService>();\r\n\r\n                var telegramTransitionFrame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                if (telegramTransitionFrame != null)\r\n                {\r\n                    if (voipService.Call is TLPhoneCallDiscarded61)\r\n                    {\r\n                        telegramTransitionFrame.HideCallPlaceholder();\r\n                    }\r\n                    else\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"Hadnle(PhoneCallDiscardedEventArg) didn't invoke HideCallPlaceholder voip.Call=\" + voipService.Call);\r\n                    }\r\n                }\r\n\r\n                if (_phoneCallMessageBox == null) return;\r\n\r\n                var callView = _phoneCallMessageBox.Content as CallView;\r\n                if (callView == null) return;\r\n\r\n                var callViewModel = callView.ViewModel;\r\n\r\n                if (callViewModel != null\r\n                    && callViewModel.CallId != null\r\n                    && args.DiscardedCall.Id.Value == callViewModel.CallId.Value)\r\n                {\r\n                    callViewModel.StopTimer();\r\n\r\n                    if (args.Call is TLPhoneCallRequested64\r\n                        || args.Call is TLPhoneCall\r\n                        || args.Call is TLPhoneCallWaiting)\r\n                    {\r\n                        if (args.Call is TLPhoneCallWaiting && args.Outgoing)\r\n                        {\r\n                            callViewModel.ViewState = CallViewState.OutgoingCallBusy;\r\n                        }\r\n                        else\r\n                        {\r\n                            _phoneCallMessageBox.Dismiss();\r\n                        }\r\n\r\n                        var inputPhoneCall = args.Call as IInputPhoneCall;\r\n                        if (inputPhoneCall != null)\r\n                        {\r\n                            if (args.DiscardedCall.NeedRating)\r\n                            {\r\n                                Execute.BeginOnUIThread(TimeSpan.FromSeconds(1.5), () =>\r\n                                {\r\n                                    var content = new CallRatingControl();\r\n                                    ShowCustomMessageBox(null, AppResources.AppName,\r\n                                        AppResources.Send.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                                        dismissed =>\r\n                                        {\r\n                                            if (dismissed == CustomMessageBoxResult.RightButton)\r\n                                            {\r\n                                                if (content.Rating.Value > 0.0)\r\n                                                {\r\n                                                    var comment = content.Rating.Value < 5.0\r\n                                                        ? new TLString(content.Comment.Text)\r\n                                                        : TLString.Empty;\r\n\r\n                                                    MTProtoService.SetCallRatingAsync(inputPhoneCall.ToInputPhoneCall(), new TLInt((int)content.Rating.Value), comment,\r\n                                                        result =>\r\n                                                        {\r\n\r\n                                                        },\r\n                                                        error =>\r\n                                                        {\r\n                                                            Execute.ShowDebugMessage(\"phone.setCallRating error \" + error);\r\n                                                        });\r\n                                                }\r\n                                            }\r\n                                        },\r\n                                        content);\r\n                                });\r\n                            }\r\n\r\n                            if (args.DiscardedCall.NeedDebug)\r\n                            {\r\n                                var debug = voipService.GetDebugLog(args.DiscardedCall.Id.Value);\r\n                                MTProtoService.SaveCallDebugAsync(inputPhoneCall.ToInputPhoneCall(),\r\n                                    new TLDataJSON { Data = new TLString(debug) },\r\n                                    result =>\r\n                                    {\r\n\r\n                                    },\r\n                                    error =>\r\n                                    {\r\n                                        Execute.ShowDebugMessage(\"phone.saveCallDebugString error \" + error);\r\n                                    });\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        callViewModel.ViewState = args.Outgoing ? CallViewState.OutgoingCallBusy : CallViewState.IncomingCallBusy;\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(PhoneCallRequestedEventArgs args)\r\n        {\r\n            if (args == null) return;\r\n            if (args.RequestedCall == null) return;\r\n\r\n            var user = _cacheService.GetUser(args.RequestedCall.AdminId) as TLUser;\r\n            if (user == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var voipService = IoC.Get<IVoIPService>();\r\n\r\n                if (voipService.AcceptedCallId == args.RequestedCall.Id.Value)\r\n                {\r\n                    ShowCallMessageBox(user, args.RequestedCall.Id, voipService, CallViewState.CallConnecting);\r\n\r\n                    voipService.AcceptIncomingCall(args.RequestedCall);\r\n                }\r\n                else\r\n                {\r\n                    ShowCallMessageBox(user, args.RequestedCall.Id, voipService, CallViewState.IncomingCall);\r\n                }\r\n            });\r\n        }\r\n\r\n        public static void OpenCurrentCall()\r\n        {\r\n            if (_phoneCallMessageBox == null)\r\n            {\r\n                var callController = BackgroundProcessController.Instance.CallController;\r\n\r\n                if (callController != null\r\n                     && (callController.CallStatus == CallStatus.Held\r\n                        || callController.CallStatus == CallStatus.InProgress))\r\n                {\r\n                    if (callController.Key != null)\r\n                    {\r\n                        var user = IoC.Get<ICacheService>().GetUser(new TLInt((int)callController.OtherPartyId)) as TLUser;\r\n                        if (user != null)\r\n                        {\r\n                            ShowCallMessageBox(user, new TLLong(callController.CallId), IoC.Get<IVoIPService>(), CallViewState.Call, callController.CallStartTime.LocalDateTime);\r\n                            return;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                if (frame != null)\r\n                {\r\n                    frame.HideCallPlaceholder();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            SystemTray.IsVisible = false;\r\n            _phoneCallMessageBox.Show();\r\n        }\r\n\r\n        public static void StartVoiceCall(TLUser user, IVoIPService voipService, ICacheService cacheService)\r\n        {\r\n            if (user == null) return;\r\n            if (user.IsBot) return;\r\n            if (user.IsSelf) return;\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"StartVoiceCall user_id={0} call={1}\", voipService.UserId, voipService.Call);\r\n\r\n            if (voipService.UserId != null\r\n                && (voipService.Call == null // first call is in progress\r\n                    || (voipService.Call != null && !(voipService.Call is TLPhoneCallDiscarded61))) // any call is in progress\r\n                )\r\n            {\r\n                if (user.Index == voipService.UserId.Value)\r\n                {\r\n                    OpenCurrentCall();\r\n                    return;\r\n                }\r\n\r\n                var participant = cacheService.GetUser(voipService.UserId) as TLUser;\r\n                if (participant != null)\r\n                {\r\n                    var result = MessageBox.Show(string.Format(AppResources.CallInProgressNotification, participant.FullName2), AppResources.AppName, MessageBoxButton.OK);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var callViewModel = ShowCallMessageBox(user, null, voipService, CallViewState.OutgoingCall);\r\n\r\n            voipService.StartOutgoingCall(user,\r\n                result =>\r\n                {\r\n                    callViewModel.CallId = result;\r\n                });\r\n        }\r\n\r\n        private static CallViewModel ShowCallMessageBox(TLUser user, TLLong callId, IVoIPService voipService, CallViewState viewState, DateTime? callStartTime = null)\r\n        {\r\n            var width = 480.0;\r\n            var height = 800.0;\r\n            var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n            if (frame != null)\r\n            {\r\n                var page = frame.Content as PhoneApplicationPage;\r\n                if (page != null)\r\n                {\r\n                    width = page.ActualWidth;\r\n                    height = page.ActualHeight;\r\n                }\r\n\r\n                if (frame.CallPlaceholder != null && frame.CallPlaceholder.ActualHeight > 0.0)\r\n                {\r\n                    height += frame.CallPlaceholder.ActualHeight;\r\n                }\r\n            }\r\n            SystemTray.IsVisible = false;\r\n\r\n            var callViewModel = new CallViewModel(user, voipService);\r\n            callViewModel.CallId = callId;\r\n            switch (viewState)\r\n            {\r\n                case CallViewState.Call:\r\n                    callViewModel.Status = \"\";\r\n                    callViewModel.StartTimer(callStartTime ?? DateTime.Now);\r\n                    break;\r\n                case CallViewState.IncomingCall:\r\n                    callViewModel.Status = AppResources.IncomingCall;\r\n                    break;\r\n                case CallViewState.OutgoingCall:\r\n                    callViewModel.Status = AppResources.OutgoingCall;\r\n                    break;\r\n            }\r\n            callViewModel.ViewState = viewState;\r\n            var callView = new CallView();\r\n            callView.Width = width;\r\n            callView.Height = height;\r\n            callView.Margin = new Thickness(0.0);\r\n            callView.DataContext = callViewModel;\r\n            callView.GoToState(callViewModel.ViewState);\r\n\r\n            var telegramMessageBox = new TelegramMessageBox { IsFullScreen = true };\r\n            telegramMessageBox.Content = callView;\r\n            telegramMessageBox.Dismissed += (sender, args) =>\r\n            {\r\n                if (_phoneCallMessageBox == telegramMessageBox)\r\n                {\r\n                    SystemTray.IsVisible = true;\r\n                }\r\n\r\n                //callViewModel.StopTimer();\r\n            };\r\n            callView.BottomCommand.Tap += (sender, args) =>\r\n            {\r\n                callView.BottomCommand.IsEnabled = false;\r\n                callView.IgnoreButton.IsEnabled = false;\r\n\r\n                if (voipService.Call != null\r\n                    && (callView.ViewModel.CallId == null || callView.ViewModel.CallId.Value == voipService.Call.Id.Value))\r\n                {\r\n                    var requestedCall = voipService.Call as TLPhoneCallRequested64;\r\n                    if (requestedCall != null)\r\n                    {\r\n                        callViewModel.ViewState = CallViewState.CallConnecting;\r\n\r\n                        voipService.AcceptIncomingCall(requestedCall);\r\n                    }\r\n\r\n                    var waitingCall = voipService.Call as TLPhoneCallWaiting;\r\n                    if (waitingCall != null)\r\n                    {\r\n                        voipService.HangUp();\r\n\r\n                        _phoneCallMessageBox.Dismiss();\r\n                    }\r\n\r\n                    var call = voipService.Call as TLPhoneCall;\r\n                    if (call != null)\r\n                    {\r\n                        voipService.HangUp();\r\n\r\n                        _phoneCallMessageBox.Dismiss();\r\n                    }\r\n\r\n                    var discardedCall = voipService.Call as TLPhoneCallDiscarded61;\r\n                    if (discardedCall != null)\r\n                    {\r\n                        callViewModel.Status = AppResources.OutgoingCall;\r\n                        callViewModel.NotifyOfPropertyChange(() => callViewModel.Status);\r\n                        callViewModel.ViewState = CallViewState.OutgoingCall;\r\n\r\n                        voipService.StartOutgoingCall(user,\r\n                            result =>\r\n                            {\r\n                                callViewModel.CallId = result;\r\n                            });\r\n                    }\r\n                }\r\n            };\r\n            callView.IgnoreButton.Tap += (sender, e) =>\r\n            {\r\n                callView.BottomCommand.IsEnabled = false;\r\n                callView.IgnoreButton.IsEnabled = false;\r\n\r\n                var requestedCall = voipService.Call as TLPhoneCallRequested64;\r\n                if (requestedCall != null)\r\n                {\r\n                    voipService.HangUp();\r\n                }\r\n\r\n                _phoneCallMessageBox.Dismiss();\r\n            };\r\n            callView.CaptionPanel.DoubleTap += (sender, e) =>\r\n            {\r\n                var caption = string.Format(\"libtgvoip v{0}\", voipService.GetVersion());\r\n\r\n                var content = new CallDebugControl { Height = 520.0 };\r\n                content.Start();\r\n                ShowCustomMessageBox(null, caption, AppResources.Close.ToLowerInvariant(), null,\r\n                    dismissed =>\r\n                    {\r\n                        content.Stop();\r\n                    },\r\n                    content);\r\n            };\r\n            callView.ChatButton.Tap += (sender, e) =>\r\n            {\r\n                if (callView.ViewModel != null)\r\n                {\r\n                    callView.ViewModel.OpenChat();\r\n                }\r\n\r\n                _phoneCallMessageBox.Dismiss();\r\n            };\r\n\r\n            _phoneCallMessageBox = telegramMessageBox;\r\n\r\n            telegramMessageBox.Show();\r\n\r\n            if (frame != null)\r\n            {\r\n                frame.ShowCallPlaceholder(OpenCurrentCall);\r\n            }\r\n\r\n            return callViewModel;\r\n        }\r\n\r\n        public LiveLocationBadgeViewModel LiveLocationBadge { get; set; }\r\n\r\n        public void Handle(LiveLocationAddedEventArgs args)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (LiveLocationBadge == null)\r\n                {\r\n                    LiveLocationBadge = new LiveLocationBadgeViewModel(IoC.Get<ILiveLocationService>(), IoC.Get<ICacheService>(), true);\r\n                    LiveLocationBadge.OpenMessage += OpenLiveLocationBadge;\r\n                    LiveLocationBadge.Closed += CloseLiveLocationBadge;\r\n\r\n                    NotifyOfPropertyChange(() => LiveLocationBadge);\r\n                }\r\n\r\n                LiveLocationBadge.UpdateLiveLocation(args.Message);\r\n            });\r\n        }\r\n\r\n        public void Handle(LiveLocationRemovedEventArgs args)\r\n        {\r\n            if (args.Messages.Count == 0) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (LiveLocationBadge == null) return;\r\n\r\n                LiveLocationBadge.RemoveLiveLocations(args.Messages);\r\n\r\n                if (LiveLocationBadge.Messages.Count == 0)\r\n                {\r\n                    LiveLocationBadge = null;\r\n                    NotifyOfPropertyChange(() => LiveLocationBadge);\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(LiveLocationClearedEventArgs args)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (LiveLocationBadge == null) return;\r\n\r\n                LiveLocationBadge = null;\r\n                NotifyOfPropertyChange(() => LiveLocationBadge);\r\n            });\r\n        }\r\n\r\n        public void Handle(LiveLocationLoadedEventArgs args)\r\n        {\r\n            if (args.Messages.Count == 0) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (LiveLocationBadge == null)\r\n                {\r\n                    LiveLocationBadge = new LiveLocationBadgeViewModel(IoC.Get<ILiveLocationService>(), IoC.Get<ICacheService>(), true);\r\n                    LiveLocationBadge.OpenMessage += OpenLiveLocationBadge;\r\n                    LiveLocationBadge.Closed += CloseLiveLocationBadge;\r\n\r\n                    NotifyOfPropertyChange(() => LiveLocationBadge);\r\n                }\r\n\r\n                var messages = new List<TLMessageBase>();\r\n                foreach (var m in args.Messages)\r\n                {\r\n                    messages.Add(m);\r\n                }\r\n                LiveLocationBadge.UpdateLiveLocations(messages);\r\n            });\r\n        }\r\n\r\n        private void CloseLiveLocationBadge(object sender, System.EventArgs e)\r\n        {\r\n            var confirmation = MessageBox.Show(AppResources.StopLiveLocationAlertAll, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            var liveLocationService = IoC.Get<ILiveLocationService>();\r\n\r\n            liveLocationService.StopAllAsync();\r\n        }\r\n\r\n        private void OpenLiveLocationBadge(object sender, System.EventArgs e)\r\n        {\r\n            if (LiveLocationBadge == null) return;\r\n            if (LiveLocationBadge.Messages.Count == 0) return;\r\n\r\n            if (LiveLocationBadge.Messages.Count == 1)\r\n            {\r\n                OpenLiveLocation(LiveLocationBadge.Messages[0]);\r\n                return;\r\n            }\r\n\r\n            var message = string.Format(AppResources.SharingLiveLocationTitle, Language.Declension(\r\n                LiveLocationBadge.Messages.Count,\r\n                AppResources.ChatNominativeSingular,\r\n                AppResources.ChatNominativePlural,\r\n                AppResources.ChatGenitiveSingular,\r\n                AppResources.ChatGenitivePlural).ToLower(CultureInfo.CurrentUICulture));\r\n\r\n            var content = new LiveLocationsControl { DataContext = LiveLocationBadge };\r\n\r\n            var messageBox = ShowCustomMessageBox(\r\n                message,\r\n                string.Empty,\r\n                AppResources.Close,\r\n                AppResources.StopAllLocationSharings,\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.LeftButton)\r\n                    {\r\n                        var liveLocationsService = IoC.Get<ILiveLocationService>();\r\n\r\n                        liveLocationsService.StopAllAsync();\r\n                    }\r\n                },\r\n                content);\r\n\r\n            content.Tap += (o, args) =>\r\n            {\r\n                var element = args.OriginalSource as FrameworkElement;\r\n                if (element != null)\r\n                {\r\n                    var m = element.DataContext as TLMessage70;\r\n                    if (m != null)\r\n                    {\r\n                        messageBox.Dismiss();\r\n                        Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                        {\r\n                            OpenLiveLocation(m);\r\n                        });\r\n                    }\r\n                }\r\n            };\r\n\r\n            content.LiveLocationCompleted += (o, args) =>\r\n            {\r\n                var completedMessage = LiveLocationBadge.Messages.FirstOrDefault(x => ((TLMessage)x).Media == args.Media) as TLMessage;\r\n                if (completedMessage != null)\r\n                {\r\n                    LiveLocationBadge.RemoveLiveLocations(new List<TLMessage> { completedMessage });\r\n                }\r\n\r\n                if (LiveLocationBadge.Messages.Count == 0)\r\n                {\r\n                    messageBox.Dismiss();\r\n                }\r\n            };\r\n        }\r\n\r\n        public MapViewModel LocationPicker { get; protected set; }\r\n\r\n        private void OpenLiveLocation(TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage;\r\n            if (message == null) return;\r\n\r\n            var liveLocationsService = IoC.Get<ILiveLocationService>();\r\n            var messageGeoLive = liveLocationsService.Get(message.ToId, MTProtoService.CurrentUserId);\r\n            if (messageGeoLive != null)\r\n            {\r\n                var cachedMessage = IoC.Get<ICacheService>().GetMessage(messageGeoLive.Id, message.ToId is TLPeerChannel ? message.ToId.Id : null) as TLMessage;\r\n                if (cachedMessage != null)\r\n                {\r\n                    messageGeoLive = cachedMessage;\r\n                }\r\n            }\r\n\r\n            if (LocationPicker == null)\r\n            {\r\n                LocationPicker = IoC.Get<MapViewModel>();\r\n                LocationPicker.LiveLocations.Clear();\r\n                LocationPicker.With = message.To;\r\n                LocationPicker.MessageGeo = message;\r\n                LocationPicker.MessageGeoLive = messageGeoLive;\r\n                LocationPicker.ContinueAction = ContinueSendLocation;\r\n                LocationPicker.StopLiveLocationAction = StopLiveLocation;\r\n                LocationPicker.UpdateLiveLocationsAction = UpdateLiveLocations;\r\n                LocationPicker.ParentHitTest = RestoreParentHitTest;\r\n                NotifyOfPropertyChange(() => LocationPicker);\r\n            }\r\n            else\r\n            {\r\n                LocationPicker.LiveLocations.Clear();\r\n                LocationPicker.With = message.To;\r\n                LocationPicker.MessageGeo = message;\r\n                LocationPicker.MessageGeoLive = messageGeoLive;\r\n                Execute.BeginOnUIThread(() => LocationPicker.OpenEditor());\r\n            }\r\n        }\r\n\r\n        private void RestoreParentHitTest(bool restore)\r\n        {\r\n            var shellView = GetView() as ShellView;\r\n            if (shellView != null)\r\n            {\r\n                shellView.Items.IsHitTestVisible = restore;\r\n                shellView.LiveLocationBadge.IsHitTestVisible = restore;\r\n                shellView.ItemsHeaders.IsHitTestVisible = restore;\r\n                shellView.AppBarPanel.Visibility = restore ? Visibility.Visible : Visibility.Collapsed;\r\n\r\n                if (restore)\r\n                {\r\n                    LocationPicker = null;\r\n                    NotifyOfPropertyChange(() => LocationPicker);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UpdateLiveLocations(Action<TLMessagesBase> callback, Action<TLRPCError> faultCallback)\r\n        {\r\n            if (LocationPicker == null) return;\r\n\r\n            var message = LocationPicker.MessageGeoLive as TLMessage70;\r\n            if (message == null) return;\r\n\r\n            MTProtoService.GetRecentLocationsAsync(MTProtoService.PeerToInputPeer(message.ToId), new TLInt(int.MaxValue), new TLInt(0),\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    callback.SafeInvoke(result);\r\n                }),\r\n                faultCallback);\r\n        }\r\n\r\n        private void StopLiveLocation(TLMessage70 message, Action callback)\r\n        {\r\n            if (message == null) return;\r\n\r\n            var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive == null) return;\r\n\r\n            var geoPoint = mediaGeoLive.Geo as TLGeoPoint;\r\n            if (geoPoint == null) return;\r\n\r\n            var newGeoPoint = new TLGeoPointEmpty();\r\n\r\n            var liveLocationsService = IoC.Get<ILiveLocationService>();\r\n\r\n            liveLocationsService.UpdateAsync(message, newGeoPoint, result =>\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    mediaGeoLive.Date = message.Date;\r\n                    mediaGeoLive.EditDate = message.EditDate;\r\n                    mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Geo);\r\n                    mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.EditDate);\r\n                    mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Active);\r\n\r\n                    callback.SafeInvoke();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (error == null || error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        mediaGeoLive.Date = message.Date;\r\n                        mediaGeoLive.EditDate = message.EditDate;\r\n                        mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Geo);\r\n                        mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.EditDate);\r\n                        mediaGeoLive.NotifyOfPropertyChange(() => mediaGeoLive.Active);\r\n\r\n                        callback.SafeInvoke();\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private void ContinueSendLocation(TLMessageMediaBase mediaBase)\r\n        {\r\n            if (LocationPicker == null) return;\r\n\r\n            var message = LocationPicker.MessageGeoLive as TLMessage70;\r\n            if (message == null) return;\r\n\r\n            var mediaGeoLive = mediaBase as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive != null)\r\n            {\r\n                SendLiveLocation(message.ToId, mediaGeoLive);\r\n            }\r\n        }\r\n\r\n        private void SendLiveLocation(TLPeerBase peer, TLMessageMediaGeoLive mediaGeoLive)\r\n        {\r\n            var date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n\r\n            var message = TLUtils.GetMessage(\r\n                new TLInt(StateService.CurrentUserId),\r\n                peer,\r\n                MessageStatus.Sending,\r\n                TLBool.True,\r\n                TLBool.True,\r\n                date,\r\n                TLString.Empty,\r\n                mediaGeoLive,\r\n                TLLong.Random(),\r\n                new TLInt(0)\r\n            );\r\n\r\n            mediaGeoLive.Date = message.Date;\r\n            mediaGeoLive.From = message.From;\r\n\r\n            BeginOnThreadPool(() => IoC.Get<ICacheService>().SyncSendingMessage(message, null, SendLiveLocationInternal));\r\n        }\r\n\r\n        private void SendLiveLocationInternal(TLMessageCommon messageBase)\r\n        {\r\n            var message = messageBase as TLMessage34;\r\n            if (message == null) return;\r\n\r\n            var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive == null) return;\r\n\r\n            var geoPoint = mediaGeoLive.Geo as TLGeoPoint;\r\n            if (geoPoint == null) return;\r\n\r\n            var inputMediaGeoLive = new TLInputMediaGeoLive\r\n            {\r\n                GeoPoint = new TLInputGeoPoint { Lat = geoPoint.Lat, Long = geoPoint.Long },\r\n                Period = mediaGeoLive.Period\r\n            };\r\n\r\n            message.InputMedia = inputMediaGeoLive;\r\n\r\n            UploadService.SendMediaInternal(message, MTProtoService, StateService, IoC.Get<ICacheService>());\r\n        }\r\n\r\n        public void Handle(TLUpdateEditMessage update)\r\n        {\r\n            EditLiveLocation(update.Message);\r\n        }\r\n\r\n        public void Handle(TLUpdateEditChannelMessage update)\r\n        {\r\n            EditLiveLocation(update.Message);\r\n        }\r\n\r\n        private void EditLiveLocation(TLMessageBase messageBase)\r\n        {\r\n            if (LocationPicker == null) return;\r\n\r\n            var message70 = messageBase as TLMessage70;\r\n            if (message70 != null)\r\n            {\r\n                var mediaGeoLive = message70.Media as TLMessageMediaGeoLive;\r\n                if (mediaGeoLive != null)\r\n                {\r\n                    var currentMessage = LocationPicker.MessageGeoLive as TLMessage70;\r\n                    if (currentMessage != null)\r\n                    {\r\n                        var currentPeerUser = currentMessage.ToId as TLPeerUser;\r\n                        var peerUser = message70.ToId as TLPeerUser;\r\n                        if (peerUser != null\r\n                            && currentPeerUser != null\r\n                            && message70.FromId != null\r\n                            && currentPeerUser.Id.Value == message70.FromId.Value)\r\n                        {\r\n                            Execute.BeginOnUIThread(() => LocationPicker.UpdateLiveLocation(message70));\r\n                            return;\r\n                        }\r\n\r\n                        var currentPeerChat = currentMessage.ToId as TLPeerChat;\r\n                        var peerChat = message70.ToId as TLPeerChannel;\r\n                        if (peerChat != null\r\n                            && currentPeerChat != null\r\n                            && peerChat.Id.Value == currentPeerChat.Id.Value)\r\n                        {\r\n                            Execute.BeginOnUIThread(() => LocationPicker.UpdateLiveLocation(message70));\r\n                            return;\r\n                        }\r\n\r\n                        var currentPeerChannel = currentMessage.ToId as TLPeerChannel;\r\n                        var peerChannel = message70.ToId as TLPeerChannel;\r\n                        if (peerChannel != null\r\n                            && currentPeerChannel != null\r\n                            && peerChannel.Id.Value == currentPeerChannel.Id.Value)\r\n                        {\r\n                            Execute.BeginOnUIThread(() => LocationPicker.UpdateLiveLocation(message70));\r\n                            return;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public void OpenProxySettings()\r\n        {\r\n            _navigationService.UriFor<ProxyListViewModel>().Navigate();\r\n        }\r\n\r\n        public void Handle(MTProtoProxyDisabledEventArgs args)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                ShowCustomMessageBox(AppResources.ProxyDisabledNotification, AppResources.AppName, AppResources.Ok, null, dismissed => { });\r\n            });\r\n        }\r\n\r\n        public void CloseSearch()\r\n        {\r\n            var view = GetView() as ShellView;\r\n            if (view != null)\r\n            {\r\n                view.CloseSearch();\r\n            }\r\n        }\r\n    }\r\n\r\n    public class UpdateRemoveStickerSetEventArgs\r\n    {\r\n        public TLStickerSetBase StickerSet { get; protected set; }\r\n\r\n        public UpdateRemoveStickerSetEventArgs(TLStickerSetBase stickerSet)\r\n        {\r\n            StickerSet = stickerSet;\r\n        }\r\n    }\r\n\r\n    public class UpdateStickerSetsEventArgs\r\n    {\r\n        public bool Masks { get; set; }\r\n\r\n        public TLAllStickers29 AllStickers { get; protected set; }\r\n\r\n        public UpdateStickerSetsEventArgs(TLAllStickers29 allStickers, bool masks)\r\n        {\r\n            AllStickers = allStickers;\r\n            Masks = masks;\r\n        }\r\n    }\r\n\r\n    public class UpdateStickerSetsOrderEventArgs\r\n    {\r\n        public bool Masks { get; set; }\r\n\r\n        public TLAllStickers29 AllStickers { get; protected set; }\r\n\r\n        public UpdateStickerSetsOrderEventArgs(TLAllStickers29 allStickers, bool masks)\r\n        {\r\n            AllStickers = allStickers;\r\n            Masks = masks;\r\n        }\r\n    }\r\n\r\n    public class UpdateNewStickerSetEventArgs\r\n    {\r\n        public bool Masks { get; set; }\r\n\r\n        public TLAllStickers29 AllStickers { get; protected set; }\r\n\r\n        public UpdateNewStickerSetEventArgs(TLAllStickers29 allStickers, bool masks)\r\n        {\r\n            AllStickers = allStickers;\r\n            Masks = masks;\r\n        }\r\n    }\r\n\r\n    public class UpdateReadFeaturedStickersEventArgs\r\n    {\r\n        public TLFeaturedStickers FeaturedStickers { get; protected set; }\r\n\r\n        public UpdateReadFeaturedStickersEventArgs(TLFeaturedStickers featuredStickers)\r\n        {\r\n            FeaturedStickers = featuredStickers;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/ViewModels/ViewModelBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq.Expressions;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels\r\n{\r\n    public abstract class ViewModelBase : Screen\r\n    {\r\n\r\n        private Visibility _visibility;\r\n\r\n        public Visibility Visibility\r\n        {\r\n            get { return _visibility; }\r\n            set { SetField(ref _visibility, value, () => Visibility); }\r\n        }\r\n\r\n        protected bool SetField<T>(ref T field, T value, string propertyName)\r\n        {\r\n            if (EqualityComparer<T>.Default.Equals(field, value)) return false;\r\n            field = value;\r\n            NotifyOfPropertyChange(propertyName);\r\n            return true;\r\n        }\r\n\r\n        protected bool SetField<T>(ref T field, T value, Expression<Func<T>> selectorExpression)\r\n        {\r\n            if (EqualityComparer<T>.Default.Equals(field, value)) return false;\r\n            field = value;\r\n            NotifyOfPropertyChange(selectorExpression);\r\n            return true;\r\n        }\r\n\r\n        private bool _isLoadingError;\r\n\r\n        public bool IsLoadingError\r\n        {\r\n            get { return _isLoadingError; }\r\n            set { SetField(ref _isLoadingError, value, () => IsLoadingError); }\r\n        }\r\n\r\n        private bool _isWorking;\r\n\r\n        public bool IsWorking\r\n        {\r\n            get { return _isWorking; }\r\n            set { SetField(ref _isWorking, value, () => IsWorking); }\r\n        }\r\n        \r\n        public IMTProtoService MTProtoService { get; private set; }\r\n\r\n        protected readonly INavigationService NavigationService;\r\n\r\n        public IStateService StateService { get; private set; }\r\n\r\n        protected readonly ITelegramEventAggregator EventAggregator;\r\n\r\n        protected readonly ICommonErrorHandler ErrorHandler;\r\n\r\n        protected readonly ICacheService CacheService;\r\n\r\n        private static DateTime _lastStatusTime;\r\n\r\n        protected ViewModelBase(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n        {\r\n            CacheService = cacheService;\r\n            ErrorHandler = errorHandler;\r\n            StateService = stateService;\r\n            MTProtoService = mtProtoService;\r\n            NavigationService = navigationService;\r\n            EventAggregator = eventAggregator;\r\n        }\r\n\r\n        protected bool SuppressUpdateStatus { get;  set; }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            var offline = ((App) Application.Current).Offline;\r\n            if (offline)\r\n            {\r\n                ((App) Application.Current).Offline = false;\r\n\r\n                _lastStatusTime = DateTime.Now;\r\n\r\n                BeginOnThreadPool(() =>\r\n                    StateService.GetNotifySettingsAsync(\r\n                        settings =>\r\n                        {\r\n                            var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n\r\n                            if (isAuthorized && !settings.InvisibleMode)\r\n                            {\r\n                                MTProtoService.UpdateStatusAsync(TLBool.False,\r\n                                    result =>\r\n                                    {\r\n                                        \r\n                                    });\r\n                            }\r\n                        }));\r\n            }\r\n            else\r\n            {\r\n                if (SuppressUpdateStatus) return;\r\n\r\n                if ((DateTime.Now - _lastStatusTime).TotalSeconds < 20.0)\r\n                {\r\n                    return;\r\n                }\r\n                _lastStatusTime = DateTime.Now;\r\n\r\n                BeginOnThreadPool(() =>\r\n                    StateService.GetNotifySettingsAsync(\r\n                        settings =>\r\n                        {\r\n                            var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n\r\n                            if (isAuthorized && !settings.InvisibleMode)\r\n                            {\r\n                                MTProtoService.RaiseSendStatus(new SendStatusEventArgs(TLBool.False));\r\n                            }\r\n                        }));\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void BeginOnUIThread(System.Action action)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(action);\r\n        }\r\n\r\n        public void BeginOnUIThread(TimeSpan delay, System.Action action)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(delay, action);\r\n        }\r\n\r\n        public void BeginOnThreadPool(System.Action action)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(action);\r\n        }\r\n\r\n        public void BeginOnThreadPool(TimeSpan delay, System.Action action)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(delay, action);\r\n        }\r\n\r\n        public void Subscribe()\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n        }\r\n\r\n        public void Unsubscribe()\r\n        {\r\n            EventAggregator.Unsubscribe(this);\r\n        }\r\n\r\n        public void Report(TLInputPeerBase inputPeer, TLVector<TLInt> id = null)\r\n        {\r\n            var spamRadioButton = new RadioButton { Content = AppResources.Spam, IsChecked = true, Margin = new Thickness(0.0, 0.0, 12.0, -12.0), Background = new SolidColorBrush(Colors.Transparent), GroupName = \"Report\" };\r\n            var violenceRadioButton = new RadioButton { Content = AppResources.Violence, Margin = new Thickness(0.0, -12.0, 12.0, -12.0), Background = new SolidColorBrush(Colors.Transparent), GroupName = \"Report\" };\r\n            var pornographyRadioButton = new RadioButton { Content = AppResources.Pornography, Margin = new Thickness(0.0, -12.0, 12.0, -12.0), Background = new SolidColorBrush(Colors.Transparent), GroupName = \"Report\" };\r\n            var copyrightRadioButton = new RadioButton { Content = AppResources.Copyright, Margin = new Thickness(0.0, -12.0, 12.0, -12.0), Background = new SolidColorBrush(Colors.Transparent), GroupName = \"Report\" };\r\n            var otherRadioButton = new RadioButton { Content = AppResources.Other, Margin = new Thickness(0.0, -12.0, 12.0, -12.0), Background = new SolidColorBrush(Colors.Transparent), GroupName = \"Report\" };\r\n\r\n            TiltEffect.SetIsTiltEnabled(spamRadioButton, true);\r\n            TiltEffect.SetIsTiltEnabled(violenceRadioButton, true);\r\n            TiltEffect.SetIsTiltEnabled(pornographyRadioButton, true);\r\n            TiltEffect.SetIsTiltEnabled(otherRadioButton, true);\r\n\r\n            var reportContent = new StackPanel();\r\n            reportContent.Children.Add(spamRadioButton);\r\n            reportContent.Children.Add(violenceRadioButton);\r\n            reportContent.Children.Add(pornographyRadioButton);\r\n            reportContent.Children.Add(copyrightRadioButton);\r\n            reportContent.Children.Add(otherRadioButton);\r\n\r\n            var confirmation = new CustomMessageBox\r\n            {\r\n                Caption = AppResources.Report,\r\n                Message = string.Empty,\r\n                Content = reportContent,\r\n                LeftButtonContent = AppResources.Cancel.ToLowerInvariant(),\r\n                RightButtonContent = AppResources.Ok.ToLowerInvariant(),\r\n                IsLeftButtonEnabled = true,\r\n                IsRightButtonEnabled = true\r\n            };\r\n\r\n#if WP8\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225 || Environment.OSVersion.Version.Major >= 10;\r\n            if (isFullHD)\r\n            {\r\n                spamRadioButton.FontSize = 17.667;\r\n                violenceRadioButton.FontSize = 17.667;\r\n                pornographyRadioButton.FontSize = 17.667;\r\n                copyrightRadioButton.FontSize = 17.667;\r\n                otherRadioButton.FontSize = 17.667;\r\n                confirmation.Style = (Style)Application.Current.Resources[\"CustomMessageBoxFullHDStyle\"];\r\n            }\r\n#endif\r\n\r\n            confirmation.Dismissed += (sender, args) =>\r\n            {\r\n                if (args.Result == CustomMessageBoxResult.RightButton)\r\n                {\r\n                    TLInputReportReasonBase reason = null;\r\n                    if (spamRadioButton.IsChecked == true)\r\n                    {\r\n                        reason = new TLInputReportReasonSpam();\r\n                    }\r\n                    else if (violenceRadioButton.IsChecked == true)\r\n                    {\r\n                        reason = new TLInputReportReasonViolence();\r\n                    }\r\n                    else if (pornographyRadioButton.IsChecked == true)\r\n                    {\r\n                        reason = new TLInputReportReasonPornography();\r\n                    }\r\n                    else if (copyrightRadioButton.IsChecked == true)\r\n                    {\r\n                        reason = new TLInputReportReasonCopyright();\r\n                    }\r\n                    else if (otherRadioButton.IsChecked == true)\r\n                    {\r\n                        reason = new TLInputReportReasonOther { Text = TLString.Empty };\r\n                    }\r\n                    GetReasonAndReportAsync(inputPeer, id, reason);\r\n                }\r\n            };\r\n            confirmation.Show();\r\n        }\r\n\r\n        private void GetReasonAndReportAsync(TLInputPeerBase inputPeer, TLVector<TLInt> id, TLInputReportReasonBase reason)\r\n        {\r\n            if (reason is TLInputReportReasonOther)\r\n            {\r\n                var text = new TextBox { Margin = new Thickness(0.0, 0.0, 12.0, 0.0) };\r\n                TiltEffect.SetIsTiltEnabled(text, true);\r\n\r\n                var reportContent = new StackPanel();\r\n                reportContent.Children.Add(new TextBlock { Text = AppResources.Description, Margin = new Thickness(12.0, 6.0, 12.0, -5.0), Style = (Style)Application.Current.Resources[\"PhoneTextSubtleStyle\"] });\r\n                reportContent.Children.Add(text);\r\n\r\n                var confirmation = new CustomMessageBox\r\n                {\r\n                    Caption = AppResources.Report,\r\n                    Message = string.Empty,\r\n                    Content = reportContent,\r\n                    RightButtonContent = AppResources.Cancel.ToLowerInvariant(),\r\n                    LeftButtonContent = AppResources.Ok.ToLowerInvariant(),\r\n                    IsLeftButtonEnabled = true,\r\n                    IsRightButtonEnabled = true\r\n                };\r\n\r\n                text.Loaded += (o, e) =>\r\n                {\r\n                    confirmation.IsLeftButtonEnabled = false;\r\n                    text.Focus();\r\n                };\r\n                text.TextChanged += (o, e) =>\r\n                {\r\n                    confirmation.IsLeftButtonEnabled = !string.IsNullOrEmpty(text.Text);\r\n                };\r\n#if WP8\r\n                var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n                if (isFullHD || Environment.OSVersion.Version.Major >= 10)\r\n                {\r\n                    text.FontSize = 17.667;\r\n                    confirmation.Style = (Style)Application.Current.Resources[\"CustomMessageBoxFullHDStyle\"];\r\n                }\r\n#endif\r\n\r\n                confirmation.Dismissed += (sender, args) =>\r\n                {\r\n                    switch (args.Result)\r\n                    {\r\n                        case CustomMessageBoxResult.RightButton:\r\n                            break;\r\n                        case CustomMessageBoxResult.LeftButton:\r\n                            reason = new TLInputReportReasonOther { Text = new TLString(text.Text) };\r\n                            ReportAsync(inputPeer, id, reason);\r\n                            break;\r\n                        case CustomMessageBoxResult.None:\r\n                            // Do something.\r\n                            break;\r\n                        default:\r\n                            break;\r\n                    }\r\n                };\r\n                confirmation.Show();\r\n            }\r\n            else\r\n            {\r\n                ReportAsync(inputPeer, id, reason);\r\n            }\r\n        }\r\n\r\n        private void ReportAsync(TLInputPeerBase inputPeer, TLVector<TLInt> id, TLInputReportReasonBase reason)\r\n        {\r\n            if (inputPeer == null) return;\r\n            if (reason == null) return;\r\n\r\n            if (id == null)\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.ReportPeerAsync(inputPeer, reason,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        MessageBox.Show(AppResources.ReportSpamNotification, AppResources.AppName, MessageBoxButton.OK);\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.ReportAsync(inputPeer, id, reason,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        MessageBox.Show(AppResources.ReportSpamNotification, AppResources.AppName, MessageBoxButton.OK);\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                    }));\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Additional/AboutView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.AboutView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <!--<controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>-->\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.Projection>\r\n            <PlaneProjection CenterOfRotationX=\"0\"/>\r\n        </Grid.Projection>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,20\">\r\n            <TextBlock Text=\"{Binding Resources.AboutApp, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid Grid.Row=\"0\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n\r\n                <Border x:Name=\"PhotoPlaceholder\"\r\n\t\t\t\t        Margin=\"12,0,2,0\" \r\n                        Height=\"112\" Width=\"112\">\r\n                    <Grid>\r\n                        <Image Source=\"{Binding ApplicationIconSource}\"/>\r\n                    </Grid>\r\n                </Border>\r\n\r\n                <StackPanel Grid.Column=\"1\">\r\n                    <TextBlock Margin=\"12,-12,0,0\" Text=\"{Binding Resources.AppName, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                    <TextBlock Text=\"{Binding Version}\" Margin=\"12,-5,12,0\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </StackPanel>\r\n            </Grid>\r\n            <RichTextBox VerticalAlignment=\"Top\" Grid.Row=\"1\" Margin=\"0,20,0,0\">\r\n                <Paragraph>\r\n                    <Run Text=\"{Binding Resources.AboutText1, Source={StaticResource Strings}}\"/>\r\n                    <LineBreak/>\r\n                    <Run Text=\"{Binding Resources.Support, Source={StaticResource Strings}, Converter={StaticResource Uppercase}, StringFormat='\\{0\\}:'}\"/>\r\n                    <LineBreak/>\r\n                    <Run Text=\"{Binding Resources.AboutText2, Source={StaticResource Strings}}\"/>\r\n                </Paragraph>\r\n            </RichTextBox>\r\n            <HyperlinkButton NavigateUri=\"https://telegram.org/privacy\" TargetName=\"_blank\" HorizontalAlignment=\"Left\" x:Name=\"PrivacyStatement\" Grid.Row=\"2\" Margin=\"0,20,0,0\" Content=\"{Binding Resources.PrivacyStatement, Source={StaticResource Strings}}\"/>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/AboutView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Helpers;\r\nusing TelegramClient.Controls;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class AboutView\r\n    {\r\n        public AboutView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                RunAnimation();\r\n            };\r\n        }\r\n\r\n        private bool _isForwardInAnimation;\r\n\r\n        private void RunAnimation()\r\n        {\r\n            if (_isForwardInAnimation)\r\n            {\r\n                _isForwardInAnimation = false;\r\n                var forwardInAnimation = TelegramTurnstileAnimations.GetAnimation(LayoutRoot, TurnstileTransitionMode.ForwardIn);\r\n                Execute.BeginOnUIThread(forwardInAnimation.Begin);\r\n            }\r\n            else\r\n            {\r\n                LayoutRoot.Opacity = 1.0;\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (e.NavigationMode == NavigationMode.New)\r\n            {\r\n                LayoutRoot.Opacity = 0.0;\r\n                _isForwardInAnimation = true;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/AccountSelfDestructsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.AccountSelfDestructsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.AccountSelfDestructs, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            \r\n            <toolkit:ListPicker\r\n                Margin=\"12,18,12,0\"\r\n                Grid.Row=\"1\"\r\n                Header=\"{Binding Resources.IfYouAreAwayFor, Source={StaticResource Strings}}\"\r\n                ItemsSource=\"{Binding Periods}\"\r\n                SelectedItem=\"{Binding SelectedPeriod, Mode=TwoWay}\"\r\n                ExpansionMode=\"FullScreenOnly\"\r\n                FullModeHeader=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                <toolkit:ListPicker.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Text=\"{Binding}\"/>\r\n                    </DataTemplate>\r\n                </toolkit:ListPicker.ItemTemplate>\r\n                <toolkit:ListPicker.FullModeItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                    </DataTemplate>\r\n                </toolkit:ListPicker.FullModeItemTemplate>\r\n            </toolkit:ListPicker>\r\n            <TextBlock Grid.Row=\"2\" Margin=\"12,24,12,0\" Text=\"{Binding Resources.AccountSelfDestrucsDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/AccountSelfDestructsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class AccountSelfDestructsView\r\n    {\r\n        public AccountSelfDestructsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/AddChatParticipantConfirmationView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Additional.AddChatParticipantConfirmationView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:eim=\"clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <Storyboard x:Name=\"OpenStoryboard\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"ContentPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"-90\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                    <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                        <DiscreteObjectKeyFrame KeyTime=\"0:0:0\">\r\n                            <DiscreteObjectKeyFrame.Value>\r\n                                <Visibility>Visible</Visibility>\r\n                            </DiscreteObjectKeyFrame.Value>\r\n                        </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"CloseStoryboard\" Completed=\"CloseStoryboard_OnCompleted\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"ContentPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"90\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"3\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                    <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                        <DiscreteObjectKeyFrame KeyTime=\"0:0:0.15\">\r\n                            <DiscreteObjectKeyFrame.Value>\r\n                                <Visibility>Collapsed</Visibility>\r\n                            </DiscreteObjectKeyFrame.Value>\r\n                        </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n\r\n\r\n    <Grid Background=\"#99000000\" x:Name=\"LayoutRoot\" Visibility=\"Collapsed\" Tap=\"LayoutRoot_OnTap\">\r\n        <i:Interaction.Triggers>\r\n            <ec:DataTrigger Binding=\"{Binding IsOpen}\" Value=\"True\" Comparison=\"Equal\">\r\n                <eim:ControlStoryboardAction Storyboard=\"{StaticResource OpenStoryboard}\"/>\r\n            </ec:DataTrigger>\r\n            <ec:DataTrigger Binding=\"{Binding IsOpen}\" Value=\"False\" Comparison=\"Equal\">\r\n                <eim:ControlStoryboardAction Storyboard=\"{StaticResource CloseStoryboard}\"/>\r\n            </ec:DataTrigger>\r\n        </i:Interaction.Triggers>\r\n        \r\n        <Grid x:Name=\"ContentPanel\" VerticalAlignment=\"Top\" Tap=\"ContentPanel_OnTap\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n            <Grid.Projection>\r\n                <PlaneProjection/>\r\n            </Grid.Projection>\r\n            <Grid Margin=\"12\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"*\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition/>\r\n                    <ColumnDefinition/>\r\n                </Grid.ColumnDefinitions>\r\n                <Grid Grid.ColumnSpan=\"2\" Margin=\"0,40\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Margin=\"12,0,12,25\" TextWrapping=\"Wrap\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding AddUserToTheGroupString}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Margin=\"12,0,12,-5\" Text=\"{Binding Resources.NumberOfForwardingMessages, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    <TextBox Grid.Row=\"2\" x:Name=\"ForwardingMessagesCount\" MaxLength=\"5\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                        <TextBox.InputScope>\r\n                            <InputScope>\r\n                                <InputScopeName NameValue=\"Number\"/>\r\n                            </InputScope>\r\n                        </TextBox.InputScope>\r\n                    </TextBox>\r\n                </Grid>\r\n\r\n                <Button Grid.Row=\"1\" Grid.Column=\"0\" Click=\"OkButton_OnClick\" Content=\"{Binding Resources.Ok, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n                <Button Grid.Row=\"1\" Grid.Column=\"1\" Click=\"CancelButton_OnClick\" Content=\"{Binding Resources.Cancel, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n            </Grid>\r\n        </Grid>\r\n\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Additional/AddChatParticipantConfirmationView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Microsoft.Phone.Controls;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing Telegram.Controls.Extensions;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class AddChatParticipantConfirmationView\r\n    {\r\n        public AddChatParticipantConfirmationViewModel ViewModel\r\n        {\r\n            get { return DataContext as AddChatParticipantConfirmationViewModel; }\r\n        }\r\n\r\n        private PhoneApplicationPage _page;\r\n\r\n        private ScrollViewer _scrollViewer;\r\n\r\n        public AddChatParticipantConfirmationView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    if (_page == null)\r\n                    {\r\n                        _page = this.FindParentOfType<PhoneApplicationPage>();\r\n                    }\r\n\r\n                    if (_page != null)\r\n                    {\r\n                        _scrollViewer = _page.FindChildOfType<ScrollViewer>();\r\n\r\n                        _page.BackKeyPress += ParentPage_OnBackKeyPressed;\r\n                    }\r\n\r\n                    ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n                });\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n\r\n                if (_page != null)\r\n                {\r\n                    _page.BackKeyPress -= ParentPage_OnBackKeyPressed;\r\n                }\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (_page != null)\r\n                {\r\n                    var scrollViewer = _scrollViewer;\r\n                    if (scrollViewer != null)\r\n                    {\r\n                        scrollViewer.IsHitTestVisible = !ViewModel.IsOpen;\r\n                    }\r\n\r\n                    var appBar = _page.ApplicationBar;\r\n                    if (appBar != null)\r\n                    {\r\n                        appBar.IsVisible = !ViewModel.IsOpen;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ParentPage_OnBackKeyPressed(object sender, CancelEventArgs e)\r\n        {\r\n            if (ViewModel.IsOpen)\r\n            {\r\n                ViewModel.Close(MessageBoxResult.Cancel);\r\n                e.Cancel = true;\r\n            }\r\n        }\r\n\r\n        private void LayoutRoot_OnTap(object sender, GestureEventArgs args)\r\n        {\r\n            ViewModel.Close(MessageBoxResult.Cancel);\r\n        }\r\n\r\n        private void OkButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.Close(MessageBoxResult.OK);\r\n        }\r\n\r\n        private void CancelButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.Close(MessageBoxResult.Cancel);\r\n        }\r\n\r\n        private void ContentPanel_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void CloseStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            \r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Additional/AllowUsersView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.AllowUsersView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"UserItemTemplate\">\r\n            <ListBoxItem>\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenUserDetails($DataContext)]\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteUser($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                    <Grid.Triggers>\r\n                        <EventTrigger RoutedEvent=\"Grid.Loaded\">\r\n                            <BeginStoryboard>\r\n                                <Storyboard>\r\n                                    <DoubleAnimation Duration=\"00:00:0.15\" From=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"MainItemGrid\"/>\r\n                                </Storyboard>\r\n                            </BeginStoryboard>\r\n                        </EventTrigger>\r\n                    </Grid.Triggers>\r\n\r\n\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"72\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding FullName}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                        <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                            Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                            Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                            Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Title, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0,6,0\">\r\n            <ListBox x:Name=\"Items\" Margin=\"0,-6,-12,0\" ItemTemplate=\"{StaticResource UserItemTemplate}\"/>\r\n            <TextBlock Text=\"{Binding Status}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n        </Grid>\r\n    </Grid>\r\n\r\n    </views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/AllowUsersView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class AllowUsersView\r\n    {\r\n        private readonly AppBarButton _addButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Add,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.add.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public AllowUsersViewModel ViewModel\r\n        {\r\n            get { return DataContext as AllowUsersViewModel; }\r\n        }\r\n\r\n        public AllowUsersView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            _addButton.Click += (sender, args) => ViewModel.SelectUsers();\r\n\r\n            Loaded += (sender, args) => BuildLocalizedAppBar();\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_addButton);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ArchivedStickersView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ArchivedStickersView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:reorderListBox=\"clr-namespace:ReorderListBox;assembly=Telegram.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:controls1=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"ForwardTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"SetItemTemplate\">\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"False\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"24,6,24,6\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"64\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Border Width=\"64\" Height=\"64\">\r\n                        <Grid>\r\n                            <Image CacheMode=\"BitmapCache\" Source=\"{Binding Stickers[0].Self, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=64}\"/>\r\n                        </Grid>\r\n                    </Border>\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"14,-2,0,0\" Background=\"Transparent\" Tap=\"StickerSet_OnTap\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"0,-6,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding Title}\" MaxHeight=\"42.56\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                        <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"1,-4,0,0\" Text=\"{Binding Converter={StaticResource StickerSetToCountStringConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n                    <Button Grid.Column=\"2\" Click=\"AddRemoveStickerSet_OnClick\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Visibility=\"{Binding Archived, Converter={StaticResource BooleanToVisibilityConverter}}\" Content=\"{Binding Resources.Add, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" VerticalAlignment=\"Center\" Margin=\"0,0,-12,0\" Padding=\"18,5,18,7\" FontSize=\"17.667\" BorderThickness=\"2\"/>\r\n                    <Button Grid.Column=\"2\" IsEnabled=\"False\" MinWidth=\"95\" Visibility=\"{Binding Archived, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\" Content=\"\" VerticalAlignment=\"Center\" Margin=\"0,0,-12,0\" Padding=\"18,5,18,7\" FontSize=\"17.667\" BorderThickness=\"2\" FontFamily=\"Segoe UI Symbol\"/>\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.ArchivedStickers, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <TextBlock Grid.Row=\"1\" Margin=\"18,12,18,0\" Text=\"{Binding Status}\" Visibility=\"{Binding Status, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n\r\n        <controls1:LazyListBox\r\n            Grid.Row=\"1\"\r\n            Margin=\"-6,0\"\r\n            ItemsSource=\"{Binding Items}\"\r\n            CloseToEnd=\"Items_OnCloseToEnd\">\r\n            <ListBox.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Grid CacheMode=\"BitmapCache\" Background=\"Transparent\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" Loaded=\"FrameworkElement_OnLoaded\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Share($DataContext)]\" Header=\"{Binding Resources.Share, Source={StaticResource Strings}}\"/>\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [CopyLink($DataContext)]\" Header=\"{Binding Resources.CopyLink, Source={StaticResource Strings}}\"/>\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                        <ContentControl HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" Content=\"{Binding}\" ContentTemplate=\"{StaticResource SetItemTemplate}\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </ListBox.ItemTemplate>\r\n            <ListBox.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                </ItemsPanelTemplate>\r\n            </ListBox.ItemsPanel>\r\n        </controls1:LazyListBox>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ArchivedStickersView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ArchivedStickersView\r\n    {\r\n        public ArchivedStickersViewModel ViewModel\r\n        {\r\n            get { return DataContext as ArchivedStickersViewModel; }\r\n        }\r\n\r\n        public ArchivedStickersView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private void ForwardTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_once)\r\n            {\r\n                _once = true;\r\n                ViewModel.ForwardInAnimationComplete();\r\n            }\r\n        }\r\n\r\n        private void StickerSet_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var stickerSet = element.DataContext as TLStickerSet32;\r\n            if (stickerSet == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                ShowStickerSetMessageBox(false, stickerSet.Installed && !stickerSet.Archived, stickerSet, prompt =>\r\n                {\r\n                    if (prompt == PopUpResult.Ok)\r\n                    {\r\n                        ViewModel.AddRemoveStickerSet(stickerSet);\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n        private void FrameworkElement_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var contextMenu = sender as ContextMenu;\r\n            if (contextMenu != null)\r\n            {\r\n                \r\n            }\r\n        }\r\n\r\n        private void AddRemoveStickerSet_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var button = sender as Button;\r\n            if (button != null)\r\n            {\r\n                var stickerSet = button.DataContext as TLStickerSet32;\r\n                if (stickerSet != null)\r\n                {\r\n                    ViewModel.AddRemoveStickerSet(stickerSet);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Button_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var button = sender as Button;\r\n            if (button != null)\r\n            {\r\n                Execute.ShowDebugMessage(button.ActualWidth.ToString());\r\n            }\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.LoadNextSlice();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/AskQuestionConfirmationView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Additional.AskQuestionConfirmationView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:eim=\"clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <Storyboard x:Name=\"OpenStoryboard\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"ContentPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"-90\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                    <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                        <DiscreteObjectKeyFrame KeyTime=\"0:0:0\">\r\n                            <DiscreteObjectKeyFrame.Value>\r\n                                <Visibility>Visible</Visibility>\r\n                            </DiscreteObjectKeyFrame.Value>\r\n                        </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"CloseStoryboard\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"ContentPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"90\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"3\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                    <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                        <DiscreteObjectKeyFrame KeyTime=\"0:0:0.15\">\r\n                            <DiscreteObjectKeyFrame.Value>\r\n                                <Visibility>Collapsed</Visibility>\r\n                            </DiscreteObjectKeyFrame.Value>\r\n                        </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n\r\n\r\n    <Grid Background=\"#99000000\" x:Name=\"LayoutRoot\" Visibility=\"Collapsed\" Tap=\"LayoutRoot_OnTap\">\r\n        <i:Interaction.Triggers>\r\n            <ec:DataTrigger Binding=\"{Binding IsOpen}\" Value=\"True\" Comparison=\"Equal\">\r\n                <eim:ControlStoryboardAction Storyboard=\"{StaticResource OpenStoryboard}\"/>\r\n            </ec:DataTrigger>\r\n            <ec:DataTrigger Binding=\"{Binding IsOpen}\" Value=\"False\" Comparison=\"Equal\">\r\n                <eim:ControlStoryboardAction Storyboard=\"{StaticResource CloseStoryboard}\"/>\r\n            </ec:DataTrigger>\r\n        </i:Interaction.Triggers>\r\n        \r\n        <Grid x:Name=\"ContentPanel\" VerticalAlignment=\"Top\" Tap=\"ContentPanel_OnTap\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n            <Grid.Projection>\r\n                <PlaneProjection/>\r\n            </Grid.Projection>\r\n            <Grid Margin=\"12\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"*\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition/>\r\n                    <ColumnDefinition/>\r\n                </Grid.ColumnDefinitions>\r\n                <RichTextBox Grid.ColumnSpan=\"2\" Margin=\"0,40\" Padding=\"0\" IsReadOnly=\"True\">\r\n                    <Paragraph>\r\n                        <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding Resources.AskAQuestionPart1, Source={StaticResource Strings}}\"/>\r\n                        <Hyperlink NavigateUri=\"{Binding TelegramFaq}\" TargetName=\"_blank\" Foreground=\"{StaticResource PhoneAccentBrush}\">\r\n                            <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding Resources.AskAQuestionPart2, Source={StaticResource Strings}}\"/>\r\n                        </Hyperlink>\r\n                        <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding Resources.AskAQuestionPart3, Source={StaticResource Strings}}\"/>\r\n                        <Hyperlink NavigateUri=\"{Binding TelegramTroubleshooting}\" TargetName=\"_blank\">\r\n                            <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Foreground=\"{StaticResource PhoneAccentBrush}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding Resources.AskAQuestionPart4, Source={StaticResource Strings}}\"/>\r\n                        </Hyperlink>\r\n                        <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding Resources.AskAQuestionPart5, Source={StaticResource Strings}}\"/>\r\n                    </Paragraph>\r\n                </RichTextBox>\r\n\r\n                <Button Grid.Row=\"1\" Grid.Column=\"0\" Click=\"OkButton_OnClick\" Content=\"{Binding Resources.Ok, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n                <Button Grid.Row=\"1\" Grid.Column=\"1\" Click=\"CancelButton_OnClick\" Content=\"{Binding Resources.Cancel, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n            </Grid>\r\n        </Grid>\r\n\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Additional/AskQuestionConfirmationView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Microsoft.Phone.Controls;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing Telegram.Controls.Extensions;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class AskQuestionConfirmationView\r\n    {\r\n        public AskQuestionConfirmationViewModel ViewModel\r\n        {\r\n            get { return DataContext as AskQuestionConfirmationViewModel; }\r\n        }\r\n\r\n        private PhoneApplicationPage _page;\r\n\r\n        private ScrollViewer _scrollViewer;\r\n\r\n        public AskQuestionConfirmationView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    if (_page == null)\r\n                    {\r\n                        _page = this.FindParentOfType<PhoneApplicationPage>();\r\n                    }\r\n\r\n                    if (_page != null)\r\n                    {\r\n                        _scrollViewer = _page.FindChildOfType<ScrollViewer>();\r\n\r\n                        _page.BackKeyPress += ParentPage_OnBackKeyPressed;\r\n                    }\r\n\r\n                    ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n                });\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n\r\n                if (_page != null)\r\n                {\r\n                    _page.BackKeyPress -= ParentPage_OnBackKeyPressed;\r\n                }\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (_page != null)\r\n                {\r\n                    var scrollViewer = _scrollViewer;\r\n                    if (scrollViewer != null)\r\n                    {\r\n                        scrollViewer.IsHitTestVisible = !ViewModel.IsOpen;\r\n                    }\r\n\r\n                    var appBar = _page.ApplicationBar;\r\n                    if (appBar != null)\r\n                    {\r\n                        appBar.IsVisible = !ViewModel.IsOpen;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ParentPage_OnBackKeyPressed(object sender, CancelEventArgs e)\r\n        {\r\n            if (ViewModel.IsOpen)\r\n            {\r\n                ViewModel.Close(MessageBoxResult.Cancel);\r\n                e.Cancel = true;\r\n            }\r\n        }\r\n\r\n        private void LayoutRoot_OnTap(object sender, GestureEventArgs args)\r\n        {\r\n            ViewModel.Close(MessageBoxResult.Cancel);\r\n        }\r\n\r\n        private void OkButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.Close(MessageBoxResult.OK);\r\n        }\r\n\r\n        private void CancelButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.Close(MessageBoxResult.Cancel);\r\n        }\r\n\r\n        private void ContentPanel_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Additional/BlockedContactsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.BlockedContactsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"UserItemTemplate\">\r\n            <ListBoxItem>\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action UserAction($DataContext)]\" Tap=\"MainItemGrid_OnTap\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [UnblockContact($DataContext)]\" Header=\"{Binding Resources.UnblockContact, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n                    \r\n                    <Grid.Triggers>\r\n                        <EventTrigger RoutedEvent=\"Grid.Loaded\">\r\n                            <BeginStoryboard>\r\n                                <Storyboard>\r\n                                    <DoubleAnimation Duration=\"00:00:0.15\" From=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"MainItemGrid\"/>\r\n                                </Storyboard>\r\n                            </BeginStoryboard>\r\n                        </EventTrigger>\r\n                    </Grid.Triggers>\r\n\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"72\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding FullName}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                        <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                            Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                            Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                            Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.BlockedUsers, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0,6,0\">\r\n            <ItemsControl Margin=\"0,-6,0,0\" x:Name=\"Items\" ItemTemplate=\"{StaticResource UserItemTemplate}\">\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer>\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n            </ItemsControl>\r\n            <TextBlock Text=\"{Binding Status}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/BlockedContactsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class BlockedContactsView\r\n    {\r\n\r\n        private readonly AppBarButton _addContactButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Add,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.add.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public BlockedContactsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            //AnimationContext = LayoutRoot;\r\n\r\n            _addContactButton.Click += (sender, args) => ((BlockedContactsViewModel) DataContext).AddContact();\r\n            Loaded += (sender, args) =>\r\n            {\r\n                BuildLocalizedAppBar();\r\n            };\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_addContactButton);\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            //ContextMenuService.GetContextMenu((DependencyObject)sender).IsOpen = true;       \r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/BubbleBackgroundControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Additional.BubbleBackgroundControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Border >\r\n        <Border.Background>\r\n            <SolidColorBrush Color=\"{StaticResource PhoneBackgroundColor}\"/>\r\n        </Border.Background>\r\n        <Canvas\r\n        x:Name=\"LayoutRoot\">\r\n            <Canvas.Background>\r\n                <RadialGradientBrush>\r\n                    <GradientStop Color=\"Transparent\" Offset=\"1\" />\r\n                    <GradientStop Color=\"#77808080\" />\r\n                </RadialGradientBrush>\r\n            </Canvas.Background>\r\n            <!--<i:Interaction.Triggers>\r\n            <i:EventTrigger EventName=\"Loaded\">\r\n                <eim:ControlStoryboardAction Storyboard=\"{StaticResource Storyboard}\"/>\r\n            </i:EventTrigger>\r\n        </i:Interaction.Triggers>-->\r\n\r\n\r\n\r\n        </Canvas>\r\n\r\n    </Border>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Additional/BubbleBackgroundControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing System.Windows.Shapes;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public static class Utility\r\n    {\r\n        static Utility()\r\n        {\r\n            _random = new Random((int)DateTime.Now.Ticks);\r\n        }\r\n        public static double Randomise(double lower, double higher)\r\n        {\r\n            return (lower + (_random.NextDouble() * (higher - lower)));\r\n        }\r\n        static Random _random;\r\n    }\r\n\r\n    public partial class BubbleBackgroundControl : UserControl\r\n    {\r\n\r\n        public BubbleBackgroundControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (o, args) =>\r\n            {\r\n                //if (IsEnabled)\r\n                {\r\n                    RunBackgroundAnimation();\r\n                }\r\n            };\r\n            Unloaded += (o, args) =>\r\n            {\r\n                ThreadPool.QueueUserWorkItem(state =>\r\n                {\r\n                    Thread.Sleep(200);\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        foreach (var e in _ellipses)\r\n                        {\r\n                            var sb = e.Resources[\"sb\"] as Storyboard;\r\n                            if (sb != null)\r\n                            {\r\n                                sb.Pause();\r\n                            }\r\n                        }\r\n\r\n                    });\r\n\r\n                });\r\n\r\n            };\r\n        }\r\n\r\n        private bool _initialized;\r\n\r\n        private void RunBackgroundAnimation()\r\n        {\r\n            if (_initialized)\r\n            {\r\n                foreach (var e in _ellipses)\r\n                {\r\n                    var sb = e.Resources[\"sb\"] as Storyboard;\r\n                    if (sb != null)\r\n                    {\r\n                        sb.Resume();\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            _initialized = true;\r\n\r\n            for (var i = 0; i < 30; i++)\r\n            {\r\n                var ellipse = CreateEllipse();\r\n                LayoutRoot.Children.Add(ellipse);\r\n                RandomiseAndBegin(ellipse);\r\n            }\r\n        }\r\n\r\n        private void ContinueBackgroundAnimation()\r\n        {\r\n            foreach (var e in _ellipses)\r\n            {\r\n\r\n                var sb = e.Resources[\"sb\"] as Storyboard;\r\n                if (sb.GetCurrentState() == ClockState.Stopped)\r\n                {\r\n                    sb.Begin();\r\n                }\r\n            }\r\n        }\r\n\r\n        private IList<Ellipse> _ellipses = new List<Ellipse>();\r\n\r\n        private Ellipse CreateEllipse()\r\n        {\r\n            var ellipse = new Ellipse();\r\n            _ellipses.Add(ellipse);\r\n            ellipse.CacheMode = new BitmapCache();\r\n\r\n            ellipse.Width = 96;\r\n            ellipse.Height = 96;\r\n            //ellipse.StrokeThickness = 1.0;\r\n            //ellipse.Fill\r\n            var transform = new CompositeTransform();\r\n            ellipse.RenderTransformOrigin = new Point(0.5, 0.5);\r\n            ellipse.RenderTransform = transform;\r\n\r\n            //var color = new Color();\r\n            //color.A = 255;\r\n            //color.R = (byte)Utility.Randomise(0, 255);\r\n            //color.G = (byte)Utility.Randomise(0, 255);\r\n            //color.B = (byte)Utility.Randomise(0, 255);\r\n\r\n            var gradientStop = Utility.Randomise(0.55, 0.95);\r\n            ellipse.Fill =\r\n                new RadialGradientBrush(new GradientStopCollection\r\n                {\r\n                    new GradientStop {Color = Colors.Gray, Offset = 0},\r\n                    new GradientStop {Color = Colors.Gray, Offset = gradientStop},\r\n                    new GradientStop {Color = Colors.Transparent, Offset = 1}\r\n                });// new SolidColorBrush(Colors.Gray);\r\n            //ellipse.Effect = new BlurEffect();\r\n\r\n            DoubleAnimation xAnim = new DoubleAnimation();\r\n            Storyboard.SetTarget(xAnim, ellipse);\r\n            Storyboard.SetTargetProperty(xAnim,\r\n              new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n\r\n            DoubleAnimation yAnim = new DoubleAnimation();\r\n            Storyboard.SetTarget(yAnim, ellipse);\r\n            Storyboard.SetTargetProperty(yAnim,\r\n              new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n\r\n            Storyboard sb = new Storyboard();\r\n            sb.Children.Add(xAnim);\r\n            sb.Children.Add(yAnim);\r\n            ellipse.Resources.Add(\"sb\", sb);\r\n\r\n            sb.Completed += (s, e) =>\r\n            {\r\n                sb.Stop();\r\n                RandomiseAndBegin(ellipse);\r\n            };\r\n\r\n            return (ellipse);\r\n        }\r\n        void RandomiseAndBegin(Ellipse e)\r\n        {\r\n            double scale = Utility.Randomise(0.2, 1.0);\r\n            CompositeTransform transform = e.RenderTransform as CompositeTransform;\r\n            transform.ScaleX = transform.ScaleY = scale;\r\n\r\n            //BlurEffect effect = (BlurEffect)e.Effect;\r\n            //effect.Radius = Utility.Randomise(20.0, 30.0);\r\n\r\n            //var color = new Color();\r\n            //color.R = (byte)Utility.Randomise(0, 255);\r\n            //color.G = (byte)Utility.Randomise(0, 255);\r\n            //color.B = (byte)Utility.Randomise(0, 255);\r\n\r\n            //e.Fill = new SolidColorBrush(color);\r\n\r\n            e.Opacity = Utility.Randomise(0.2, 0.5);\r\n\r\n            Duration duration = new Duration(new TimeSpan(0, 0, (int)Utility.Randomise(9, 30)));\r\n\r\n            var sb = e.Resources[\"sb\"] as Storyboard;\r\n            sb.Children[0].Duration = duration;\r\n            sb.Children[1].Duration = duration;\r\n\r\n            DoubleAnimation xAnim = (DoubleAnimation)sb.Children[0];\r\n            xAnim.From =\r\n              Utility.Randomise(0, this.LayoutRoot.ActualWidth - (scale * e.Width));\r\n            xAnim.To =\r\n              Utility.Randomise(0, this.LayoutRoot.ActualWidth - (scale * e.Width));\r\n\r\n            DoubleAnimation yAnim = (DoubleAnimation)sb.Children[1];\r\n            yAnim.From =\r\n              this.LayoutRoot.ActualHeight - ((e.Height - (scale * e.Height)) / 2);\r\n            yAnim.To =\r\n              0 - e.Height - ((scale * e.Height) / 2);\r\n\r\n            sb.Begin();\r\n\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Additional/CacheView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.CacheView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    BackKeyPress=\"CacheView_OnBackKeyPress\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Cache, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n        \r\n        <ScrollViewer Grid.Row=\"1\" IsHitTestVisible=\"{Binding ClearCacheSettings.IsOpen, FallbackValue=True, Converter={StaticResource InvertBooleanConverter}}\">\r\n            <Grid x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n<!--\r\n                <StackPanel Grid.Row=\"0\" Margin=\"0,0,0,0\">\r\n                    <toolkit:ListPicker\r\n                        Margin=\"12,4,12,0\"\r\n                        Header=\"{Binding Resources.KeepMedia, Source={StaticResource Strings}}\"\r\n                        ExpansionMode=\"FullScreenOnly\"\r\n                        ItemsSource=\"{Binding Spans}\"\r\n                        SelectedItem=\"{Binding SelectedSpan, Mode=TwoWay}\"\r\n                        FullModeHeader=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                        <toolkit:ListPicker.ItemTemplate>\r\n                            <DataTemplate>\r\n                                <TextBlock Text=\"{Binding}\"/>\r\n                            </DataTemplate>\r\n                        </toolkit:ListPicker.ItemTemplate>\r\n                        <toolkit:ListPicker.FullModeItemTemplate>\r\n                            <DataTemplate>\r\n                                <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                            </DataTemplate>\r\n                        </toolkit:ListPicker.FullModeItemTemplate>\r\n                    </toolkit:ListPicker>\r\n                </StackPanel>\r\n                <TextBlock Grid.Row=\"1\" Margin=\"12,12,12,0\" Text=\"{Binding Resources.KeepMediaDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n-->\r\n                <Button Margin=\"-12,24,-12,0\" Grid.Row=\"2\" x:Name=\"ClearCache\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.ClearCache, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Status, Converter={StaticResource Lowercase}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,24,-12,0\" Grid.Row=\"3\" x:Name=\"ClearLocalDatabase\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.LocalDatabase, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding LocalDatabaseStatus, Converter={StaticResource Lowercase}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n                <TextBlock Grid.Row=\"4\" Margin=\"12,12,12,0\" Text=\"{Binding Resources.ClearLocalDatabaseDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            </Grid>\r\n        </ScrollViewer>\r\n\r\n        <ContentControl Grid.RowSpan=\"2\" x:Name=\"ClearCacheSettings\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" />\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/CacheView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class CacheView\r\n    {\r\n        public CacheViewModel ViewModel\r\n        {\r\n            get { return DataContext as CacheViewModel; }\r\n        }\r\n\r\n        public CacheView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void CacheView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            if (ViewModel.ClearCacheSettings != null && ViewModel.ClearCacheSettings.IsOpen)\r\n            {\r\n                ViewModel.ClearCacheSettings.Close();\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChangePasscodeView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ChangePasscodeView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.EnterPasscode, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>            \r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <TextBlock Grid.Row=\"0\" Text=\"{Binding Resources.YourPasscode, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,0,12,-5\"/>\r\n            <additional:TelegramPasswordBox Grid.Row=\"1\" x:Name=\"PasscodeBox\" Password=\"{Binding Passcode, Mode=TwoWay}\" Simple=\"{Binding Simple}\" KeyDown=\"Passcode_OnKeyDown\" PasswordChanged=\"Passcode_OnPasswordChanged\"/>\r\n            \r\n            <TextBlock Grid.Row=\"2\" Margin=\"12,14,12,-5\" Text=\"{Binding Resources.ConfirmPasscode, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <additional:TelegramPasswordBox Grid.Row=\"3\" x:Name=\"ConfirmPasscodeBox\" Height=\"72\" Password=\"{Binding ConfirmPasscode, Mode=TwoWay}\" Simple=\"{Binding Simple}\" KeyDown=\"Passcode_OnKeyDown\" PasswordChanged=\"Passcode_OnPasswordChanged\"/>\r\n            \r\n            <toolkit:ListPicker Grid.Row=\"5\"\r\n                Margin=\"12,14,12,0\"\r\n                Header=\"{Binding Resources.PasscodeType, Source={StaticResource Strings}}\"\r\n                ItemsSource=\"{Binding PasscodeTypes}\"\r\n                SelectedItem=\"{Binding SelectedPasscodeType, Mode=TwoWay}\"\r\n                FullModeHeader=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                <toolkit:ListPicker.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Text=\"{Binding Caption}\" Margin=\"0,0,0,0\"/>\r\n                    </DataTemplate>\r\n                </toolkit:ListPicker.ItemTemplate>\r\n                <toolkit:ListPicker.FullModeItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                    </DataTemplate>\r\n                </toolkit:ListPicker.FullModeItemTemplate>\r\n            </toolkit:ListPicker>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChangePasscodeView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChangePasscodeView\r\n    {\r\n        public ChangePasscodeViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChangePasscodeViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IsEnabled = false,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public ChangePasscodeView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() => PasscodeBox.Focus());\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n\r\n            BuildLocalizedAppBar();\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsPasscodeValid))\r\n            {\r\n                _doneButton.IsEnabled = ViewModel.IsPasscodeValid;\r\n            }\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar == null)\r\n            {\r\n                ApplicationBar = new ApplicationBar();\r\n\r\n                ApplicationBar.Buttons.Add(_doneButton);\r\n                ApplicationBar.Buttons.Add(_cancelButton);\r\n            }\r\n        }\r\n\r\n        private void Passcode_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (ViewModel.SelectedPasscodeType != null)\r\n            {\r\n                if (ViewModel.SelectedPasscodeType.Type == PasscodeType.Pin)\r\n                {\r\n                    if (e.Key >= Key.D0 && e.Key <= Key.D9 || e.Key == Key.Back || e.Key == Key.Enter)\r\n                    {\r\n                        if (e.Key >= Key.D0 && e.Key <= Key.D9)\r\n                        {\r\n                            if (PasscodeBox.IsFocused\r\n                                && PasscodeBox.Length == 4\r\n                                && ConfirmPasscodeBox.Length < 4)\r\n                            {\r\n                                ConfirmPasscodeBox.Focus();\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        e.Handled = true;\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                if (e.Key == Key.Enter)\r\n                {\r\n                    ConfirmOrCompletePasscode();\r\n                }\r\n                else if (e.Key == Key.Back)\r\n                {\r\n                    if (ConfirmPasscodeBox.IsFocused\r\n                        && ConfirmPasscodeBox.Length == 0)\r\n                    {\r\n                        PasscodeBox.Focus();\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ConfirmOrCompletePasscode()\r\n        {\r\n            if (PasscodeBox.IsFocused)\r\n            {\r\n                if (PasscodeBox.Length > 0)\r\n                {\r\n                    ConfirmPasscodeBox.Focus();\r\n                }\r\n            }\r\n            else if (ConfirmPasscodeBox.IsFocused)\r\n            {\r\n                ViewModel.Done();\r\n            }\r\n        }\r\n\r\n        private void Passcode_OnPasswordChanged(object sender, RoutedEventArgs e)\r\n        {\r\n            if (ViewModel != null\r\n                && ViewModel.SelectedPasscodeType != null\r\n                && ViewModel.SelectedPasscodeType.Type == PasscodeType.Pin\r\n                && PasscodeBox.Length == 4)\r\n            {\r\n                ConfirmOrCompletePasscode();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChangePasswordEmailView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ChangePasswordEmailView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls2=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"RecoveryEmailLabel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"ChangeRecoveryEmail\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"SkipRecoveryEmail\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.RecoveryEmail, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"*\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <StackPanel Grid.Row=\"0\" Grid.ColumnSpan=\"2\">\r\n                <TextBlock Text=\"{Binding Resources.EnterRecoveryEmail, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,18,12,-5\"/>\r\n                <controls2:LabeledTextBox \r\n                    x:Name=\"RecoveryEmailLabel\"\r\n                    InputScope=\"EmailUserName\"\r\n                    Label=\"\" \r\n                    Text=\"{Binding RecoveryEmail, Mode=TwoWay}\"\r\n                    Error=\"{Binding Error}\"\r\n                    KeyDown=\"RecoveryEmail_OnKeyDown\"\r\n                    GotFocus=\"RecoveryEmail_OnGotFocus\" \r\n                    LostFocus=\"RecoveryEmail_OnLostFocus\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </controls2:LabeledTextBox>\r\n                <TextBlock Margin=\"12,18,12,0\" Text=\"{Binding Resources.EnterRecoveryEmailHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            </StackPanel>\r\n            <Button Grid.Row=\"1\" Margin=\"0,18\" x:Name=\"ChangeRecoveryEmail\" Padding=\"12,2,12,6\" Content=\"{Binding Resources.Done, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n            <Button Grid.Row=\"2\" Grid.Column=\"1\" VerticalAlignment=\"Bottom\" Margin=\"0,18\" x:Name=\"SkipRecoveryEmail\" Visibility=\"{Binding SkipRecoveryEmailVisibility}\" Padding=\"12,2,12,6\" Content=\"{Binding Resources.Skip, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource TextButton}\">\r\n                <Button.RenderTransform>\r\n                    <TranslateTransform x:Name=\"SkipRecoveryEmailTransform\"/>\r\n                </Button.RenderTransform>\r\n            </Button>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChangePasswordEmailView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing Windows.UI.ViewManagement;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChangePasswordEmailView\r\n    {\r\n        public ChangePasswordEmailViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChangePasswordEmailViewModel; }\r\n        }\r\n\r\n        public ChangePasswordEmailView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) => RecoveryEmailLabel.Focus();\r\n            Loaded += OnLoaded;\r\n            Unloaded += OnUnloaded;\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            InputPane.GetForCurrentView().Showing += InputPane_Showing;\r\n            InputPane.GetForCurrentView().Hiding += InputPane_Hiding;\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            InputPane.GetForCurrentView().Showing -= InputPane_Showing;\r\n            InputPane.GetForCurrentView().Hiding -= InputPane_Hiding;\r\n        }\r\n\r\n        private void InputPane_Hiding(InputPane sender, InputPaneVisibilityEventArgs args)\r\n        {\r\n            SkipRecoveryEmailTransform.Y = 0.0;\r\n        }\r\n\r\n        private void InputPane_Showing(InputPane sender, InputPaneVisibilityEventArgs args)\r\n        {\r\n            var keyboardHeight = 480.0 / args.OccludedRect.Width * args.OccludedRect.Height;\r\n\r\n            SkipRecoveryEmailTransform.Y = -keyboardHeight;\r\n        }\r\n\r\n        private void RecoveryEmail_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.ChangeRecoveryEmail();\r\n            }\r\n        }\r\n\r\n        private void RecoveryEmail_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            SkipRecoveryEmailTransform.Y = - EmojiControl.PortraitOrientationHeight;\r\n        }\r\n\r\n        private void RecoveryEmail_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            SkipRecoveryEmailTransform.Y = 0;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChangePasswordHintView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ChangePasswordHintView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls2=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"PasswordHintLabel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"ChangePasswordHint\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.PasswordHint, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <StackPanel Grid.Row=\"1\" Margin=\"6,0\">\r\n            <TextBlock Text=\"{Binding Resources.EnterPasswordHint, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,18,12,-5\"/>\r\n            <controls2:LabeledTextBox \r\n                    x:Name=\"PasswordHintLabel\"\r\n                    InputScope=\"EmailUserName\"\r\n                    Label=\"\" \r\n                    Text=\"{Binding PasswordHint, Mode=TwoWay}\"\r\n                    Error=\"{Binding Error}\"\r\n                    KeyDown=\"PasswordHint_OnKeyDown\">\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls2:LabeledTextBox>\r\n            <TextBlock Margin=\"12,18,12,0\" Text=\"{Binding Resources.PasswordHintLabel, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <Grid Margin=\"0,18,0,0\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Button x:Name=\"ChangePasswordHint\" Padding=\"12,2,12,6\" Content=\"{Binding Resources.Next, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n            </Grid>\r\n        </StackPanel>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChangePasswordHintView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows.Input;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChangePasswordHintView \r\n    {\r\n        public ChangePasswordHintViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChangePasswordHintViewModel; }\r\n        }\r\n\r\n        public ChangePasswordHintView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                PasswordHintLabel.Input.Focus();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    PasswordHintLabel.Input.SelectAll();\r\n                });\r\n            };\r\n        }\r\n\r\n        private void PasswordHint_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.ChangePasswordHint();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChangePasswordView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ChangePasswordView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.YourPassword, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <StackPanel x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <TextBlock Margin=\"12,18,12,-5\" Text=\"{Binding Resources.EnterPassword, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <additional:TelegramPasswordBox x:Name=\"PasswordBox\" Password=\"{Binding Password, Mode=TwoWay}\" KeyDown=\"Password_OnKeyDown\"/>\r\n\r\n            <TextBlock Margin=\"12,12,12,-5\" Text=\"{Binding Resources.ConfirmPassword, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <additional:TelegramPasswordBox x:Name=\"ConfirmPasswordBox\" Height=\"72\" Password=\"{Binding ConfirmPassword, Mode=TwoWay}\" KeyDown=\"Password_OnKeyDown\"/>\r\n\r\n            <Button Margin=\"0,18,0,0\" x:Name=\"ChangePassword\" Padding=\"72,2,72,6 \" HorizontalAlignment=\"Left\" Content=\"{Binding Resources.Next, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n        </StackPanel>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChangePasswordView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows.Input;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChangePasswordView\r\n    {\r\n        public ChangePasswordViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChangePasswordViewModel; }\r\n        }\r\n\r\n        public ChangePasswordView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() => PasswordBox.Focus());\r\n            };\r\n        }\r\n\r\n        private void Password_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ConfirmOrCompletePasscode();\r\n            }\r\n            else if (e.Key == Key.Back)\r\n            {\r\n                if (ConfirmPasswordBox.IsFocused\r\n                    && ConfirmPasswordBox.Length == 0)\r\n                {\r\n                    PasswordBox.Focus();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ConfirmOrCompletePasscode()\r\n        {\r\n            if (PasswordBox.IsFocused)\r\n            {\r\n                if (PasswordBox.Length > 0)\r\n                {\r\n                    ConfirmPasswordBox.Focus();\r\n                }\r\n            }\r\n            else if (ConfirmPasswordBox.IsFocused)\r\n            {\r\n                ViewModel.ChangePassword();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChangePhoneNumberView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ChangePhoneNumberView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    micro:Message.Attach=\"[Event BackKeyPress] = [Action OnBackKeyPressed($EventArgs)]\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChangePhoneNumberView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChangePhoneNumberView\r\n    {\r\n        public ChangePhoneNumberView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChannelBlockedContactsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ChannelBlockedContactsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"UserItemTemplate\">\r\n            <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action UserAction($DataContext)]\">\r\n                <toolkit:ContextMenuService.ContextMenu>\r\n                    <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [UnblockContact($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                    </toolkit:ContextMenu>\r\n                </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"72\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName2}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                        Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                        Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                        Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                        Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.BlockedUsers, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <longListSelector:LongListSelector \r\n                Grid.Row=\"1\"\r\n                Margin=\"6,0,0,0\" \r\n                ItemsSource=\"{Binding Items}\" \r\n                IsFlatList=\"True\"\r\n                ItemTemplate=\"{StaticResource UserItemTemplate}\">\r\n            <!--<longListSelector:LongListSelector.ListFooterTemplate>\r\n                <DataTemplate>\r\n                    <Border>\r\n                        <TextBlock Margin=\"12,0\" Text=\"{Binding DataContext.Status, ElementName=Self}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                    </Border>\r\n                </DataTemplate>\r\n            </longListSelector:LongListSelector.ListFooterTemplate>-->\r\n        </longListSelector:LongListSelector>\r\n        <Grid\r\n            Grid.Row=\"1\"\r\n            VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" \r\n            Visibility=\"{Binding IsEmptyList, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n            <StackPanel Margin=\"0,-28,0,0\">\r\n                <TextBlock Text=\"{Binding Resources.BlockedUsersDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Width=\"300\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChannelBlockedContactsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChannelBlockedContactsView\r\n    {\r\n        public ChannelBlockedContactsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChatSettingsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ChatSettingsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.ChatSettings, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\">\r\n            <Grid x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <StackPanel Grid.Row=\"0\">\r\n                    <TextBlock Margin=\"12,12,12,18\" FontSize=\"35\" Text=\"{Binding Resources.AutomaticPhotoDownload, Source={StaticResource Strings}}\"/>\r\n                    <CheckBox IsChecked=\"{Binding AutoDownloadPhotoPrivateChats, Mode=Twoway}\" Content=\"{Binding Resources.PrivateChats, Source={StaticResource Strings}}\"/>\r\n                    <CheckBox IsChecked=\"{Binding AutoDownloadPhotoGroups, Mode=Twoway}\" Content=\"{Binding Resources.Groups, Source={StaticResource Strings}}\"/>\r\n                </StackPanel>\r\n\r\n                <StackPanel Grid.Row=\"1\">\r\n                    <TextBlock Margin=\"12,40,12,18\" FontSize=\"35\" Text=\"{Binding Resources.AutomaticAudioDownload, Source={StaticResource Strings}}\"/>\r\n                    <CheckBox IsChecked=\"{Binding AutoDownloadAudioPrivateChats, Mode=Twoway}\" Content=\"{Binding Resources.PrivateChats, Source={StaticResource Strings}}\"/>\r\n                    <CheckBox IsChecked=\"{Binding AutoDownloadAudioGroups, Mode=Twoway}\" Content=\"{Binding Resources.Groups, Source={StaticResource Strings}}\"/>\r\n                </StackPanel>\r\n\r\n                <StackPanel Grid.Row=\"2\">\r\n                    <TextBlock Margin=\"12,40,12,18\" FontSize=\"35\" Text=\"{Binding Resources.AutomaticGifDownload, Source={StaticResource Strings}}\"/>\r\n                    <CheckBox IsChecked=\"{Binding AutoDownloadGifPrivateChats, Mode=Twoway}\" Content=\"{Binding Resources.PrivateChats, Source={StaticResource Strings}}\"/>\r\n                    <CheckBox IsChecked=\"{Binding AutoDownloadGifGroups, Mode=Twoway}\" Content=\"{Binding Resources.Groups, Source={StaticResource Strings}}\"/>\r\n                    <CheckBox IsChecked=\"{Binding AutoPlayGif, Mode=Twoway}\" Content=\"{Binding Resources.AutoplayGifs, Source={StaticResource Strings}}\"/>\r\n                </StackPanel>\r\n\r\n                <StackPanel Grid.Row=\"3\" Margin=\"0,0,0,18\">\r\n                    <TextBlock Margin=\"12,40,12,24\" FontSize=\"35\" Text=\"{Binding Resources.Other, Source={StaticResource Strings}}\"/>\r\n                    <toolkit:ToggleSwitch Margin=\"0,0,-29,0\" IsChecked=\"{Binding StateService.SendByEnter, Mode=TwoWay}\" Header=\"{Binding Resources.SendMessageByEnter, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n\r\n                    <toolkit:ToggleSwitch Margin=\"0,0,-29,0\" IsChecked=\"{Binding LocationServices, Mode=TwoWay}\" Header=\"{Binding Resources.LocationServices, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n\r\n                    <toolkit:ToggleSwitch Margin=\"0,0,-29,0\" Visibility=\"{Binding Converter={StaticResource WP8VisibilityConverter}}\" IsChecked=\"{Binding PeopleHub, Mode=TwoWay}\" IsEnabled=\"{Binding IsPeopleHubEnabled}\" Header=\"{Binding Resources.PeopleHubIntegration, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n                    \r\n                    <Button Margin=\"-12,0,12,0\" x:Name=\"OpenBackgrounds\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.DialogsBackground , Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.ApplicationBackgroundSubtitle, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n                    <Button Margin=\"-12,0,-12,0\" x:Name=\"OpenCacheSettings\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Cache, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.ManagingLocalCache, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n                    <Button Margin=\"-12,0,-12,0\" x:Name=\"OpenCameraSettings\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Camera, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.CameraSubtitle, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n                    <Button Margin=\"-12,0,-12,0\" x:Name=\"OpenPhotoPickerSettings\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.PhotoPicker, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.PhotoPickerSubtitle, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n                </StackPanel>\r\n            </Grid>\r\n        </ScrollViewer>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChatSettingsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChatSettingsView\r\n    {\r\n        public ChatSettingsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChooseAttachmentView.xaml",
    "content": "﻿<UserControl\r\n    x:Class=\"TelegramClient.Views.Additional.ChooseAttachmentView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"False\" \r\n    d:DesignHeight=\"800\" d:DesignWidth=\"480\">\r\n    \r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <Style x:Key=\"Scroll\" TargetType=\"ScrollViewer\">\r\n                <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Disabled\"/>\r\n                <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"Padding\" Value=\"0\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"ScrollViewer\" >\r\n                            <Grid Margin=\"{TemplateBinding Padding}\" Background=\"{TemplateBinding Background}\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                        <VisualStateGroup.Transitions>\r\n                                            <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                        </VisualStateGroup.Transitions>\r\n                                        <VisualState x:Name=\"Scrolling\" />\r\n                                        <VisualState x:Name=\"NotScrolling\"/>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"VerticalCompression\">\r\n                                        <VisualState x:Name=\"NoVerticalCompression\"/>\r\n                                        <VisualState x:Name=\"CompressionTop\"/>\r\n                                        <VisualState x:Name=\"CompressionBottom\"/>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"HorizontalCompression\">\r\n                                        <VisualState x:Name=\"NoHorizontalCompression\"/>\r\n                                        <VisualState x:Name=\"CompressionLeft\"/>\r\n                                        <VisualState x:Name=\"CompressionRight\"/>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <ScrollContentPresenter x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\"/>\r\n                                <ScrollBar x:Name=\"VerticalScrollBar\" HorizontalAlignment=\"Right\" Height=\"Auto\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Vertical\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{TemplateBinding VerticalOffset}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" VerticalAlignment=\"Stretch\" Width=\"5\"/>\r\n                                <ScrollBar x:Name=\"HorizontalScrollBar\" HorizontalAlignment=\"Stretch\" Height=\"5\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Horizontal\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{TemplateBinding HorizontalOffset}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" VerticalAlignment=\"Bottom\" Width=\"Auto\"/>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            \r\n            <Storyboard x:Name=\"OpenStoryboard\" Completed=\"OpenStoryboard_OnCompleted\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"ContentPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"-90\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                    <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                        <DiscreteObjectKeyFrame KeyTime=\"0:0:0\">\r\n                            <DiscreteObjectKeyFrame.Value>\r\n                                <Visibility>Visible</Visibility>\r\n                            </DiscreteObjectKeyFrame.Value>\r\n                        </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"CloseStoryboard\" Completed=\"CloseStoryboard_OnCompleted\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"ContentPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"90\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"3\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                    <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                        <DiscreteObjectKeyFrame KeyTime=\"0:0:0.25\">\r\n                            <DiscreteObjectKeyFrame.Value>\r\n                                <Visibility>Collapsed</Visibility>\r\n                            </DiscreteObjectKeyFrame.Value>\r\n                        </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <DataTemplate x:Key=\"HorizontalDialogTemplate\">\r\n                <ListBoxItem CacheMode=\"BitmapCache\" micro:Message.Attach=\"[Event Tap] = [Action OpenInlineBot($DataContext)]\">\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"0\" Width=\"104\" Background=\"Transparent\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [ResetTopPeerRating($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                        <views:ConversationTileControl\r\n                            Size=\"62\" Margin=\"0,12,0,12\" Grid.Row=\"0\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                        <TextBlock Grid.Row=\"1\" Text=\"{Binding FullName}\" Height=\"54\" Margin=\"3,0\" LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" TextTrimming=\"WordEllipsis\"/>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"#99000000\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Grid Grid.Row=\"0\" Margin=\"0,0,0,-140\"  Background=\"Transparent\" Tap=\"LayoutRoot_OnTap\"/>\r\n        <Grid Grid.Row=\"1\" x:Name=\"ContentPanel\"\r\n            ManipulationStarted=\"ContentPanel_OnManipulationStarted\"\r\n            ManipulationDelta=\"ContentPanel_OnManipulationDelta\"\r\n            ManipulationCompleted=\"ContentPanel_OnManipulationCompleted\"\r\n            CacheMode=\"BitmapCache\" Background=\"Transparent\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition/>\r\n                <RowDefinition/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.Projection>\r\n                <PlaneProjection/>\r\n            </Grid.Projection>\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform x:Name=\"ContentPanelTransform\"/>\r\n            </Grid.RenderTransform>\r\n            <!--<Border HorizontalAlignment=\"Center\" Width=\"36\" Height=\"36\" BorderThickness=\"1\" BorderBrush=\"Red\"/>-->\r\n            <ContentControl x:Name=\"InputMessageHintPlaceholder\" \r\n                Margin=\"24,12\" \r\n                HorizontalContentAlignment=\"Stretch\" \r\n                VerticalAlignment=\"Bottom\" \r\n                IsHitTestVisible=\"False\"/>\r\n            <Path x:Name=\"Hint\" Grid.Row=\"1\" Data=\"F 1 M 0,0 18,-7 36,0\" VerticalAlignment=\"Top\" Canvas.ZIndex=\"1\" Opacity=\"0.4\" HorizontalAlignment=\"Center\" Margin=\"6\" Fill=\"Transparent\" StrokeThickness=\"4\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeEndLineCap=\"Round\" StrokeStartLineCap=\"Round\" StrokeLineJoin=\"Round\">\r\n                <Path.RenderTransform>\r\n                    <CompositeTransform TranslateX=\"1\" TranslateY=\"10\"/>\r\n                </Path.RenderTransform>\r\n            </Path>\r\n            <Grid Grid.Row=\"1\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <StackPanel Grid.Row=\"0\" Margin=\"12,25,12,25\">\r\n                    <ListBoxItem CacheMode=\"BitmapCache\" micro:Message.Attach=\"[Event Tap] = [Action OpenCamera]\">\r\n                        <TextBlock Margin=\"12,0,12,12\" Text=\"{Binding Resources.Camera, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n                    </ListBoxItem>\r\n                    <ListBoxItem CacheMode=\"BitmapCache\" micro:Message.Attach=\"[Event Tap] = [Action OpenPhoto]\">\r\n                        <TextBlock Margin=\"12,0,12,12\" Text=\"{Binding Resources.PhotoAccusative, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n                    </ListBoxItem>\r\n                    <ListBoxItem CacheMode=\"BitmapCache\" micro:Message.Attach=\"[Event Tap] = [Action OpenVideo]\">\r\n                        <TextBlock Margin=\"12,0,12,12\" Text=\"{Binding Resources.VideoAccusative, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n                    </ListBoxItem>\r\n                    <ListBoxItem CacheMode=\"BitmapCache\" micro:Message.Attach=\"[Event Tap] = [Action OpenLocation]\">\r\n                        <TextBlock Margin=\"12,0,12,12\" Text=\"{Binding Resources.LocationAccusative, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n                    </ListBoxItem>\r\n                    <ListBoxItem CacheMode=\"BitmapCache\" micro:Message.Attach=\"[Event Tap] = [Action OpenDocument]\">\r\n                        <TextBlock Margin=\"12,0,12,12\" Text=\"{Binding Resources.DocumentAccusative, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n                    </ListBoxItem>\r\n                    <ListBoxItem CacheMode=\"BitmapCache\" x:Name=\"OpenContactItem\" micro:Message.Attach=\"[Event Tap] = [Action OpenContact]\">\r\n                        <TextBlock Margin=\"12,0,12,12\" Text=\"{Binding Resources.ContactAccusative, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n                    </ListBoxItem>\r\n                </StackPanel>\r\n                <ItemsControl \r\n                    x:Name=\"InlineBotsControl\"\r\n                    Grid.Row=\"1\"\r\n                    ItemsSource=\"{Binding InlineBots}\" \r\n                    ItemTemplate=\"{StaticResource HorizontalDialogTemplate}\"\r\n                    Margin=\"0,0,0,0\">\r\n                    <ItemsControl.ItemsPanel>\r\n                        <ItemsPanelTemplate>\r\n                            <VirtualizingStackPanel Orientation=\"Horizontal\"/>\r\n                        </ItemsPanelTemplate>\r\n                    </ItemsControl.ItemsPanel>\r\n                    <ItemsControl.Template>\r\n                        <ControlTemplate TargetType=\"ItemsControl\">\r\n                            <ScrollViewer x:Name=\"InlineBotsScroll\"  Style=\"{StaticResource Scroll}\">\r\n                                <ItemsPresenter/>\r\n                            </ScrollViewer>\r\n                        </ControlTemplate>\r\n                    </ItemsControl.Template>\r\n                </ItemsControl>\r\n            </Grid>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChooseAttachmentView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Search;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public interface IChooseAttachmentView\r\n    {\r\n        void HideInlineBots();\r\n        void ShowHint(string hint);\r\n    }\r\n\r\n    public partial class ChooseAttachmentView : IChooseAttachmentView\r\n    {\r\n        public ChooseAttachmentViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChooseAttachmentViewModel; }\r\n        }\r\n\r\n        public ChooseAttachmentView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            LayoutRoot.Visibility = Visibility.Collapsed;\r\n            Hint.Visibility = Visibility.Collapsed;\r\n\r\n            Loaded += (o, e) => ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            Unloaded += (o, e) => ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (ViewModel.IsOpen)\r\n                {\r\n                    OpenContactItem.Visibility = ViewModel.OpenContactVisibility;\r\n                    OpenStoryboard.Begin();\r\n                }\r\n                else\r\n                {\r\n                    if (ViewModel.InlineBots.Count > 0 && ContentPanelTransform.Y == 140.0)\r\n                    {\r\n                        InlineBotsControl.Opacity = 0.0;\r\n                    }\r\n                    CloseStoryboard.Begin();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void LayoutRoot_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ((ChooseAttachmentViewModel)DataContext).Close();\r\n        }\r\n\r\n        private static DateTime? _lastOpenTime;\r\n\r\n        private void OpenStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            _lastOpenTime = DateTime.Now;\r\n\r\n            InlineBotsControl.Opacity = 1.0;\r\n            var isLoading = ViewModel.LoadInlineBots(ShowHint);\r\n            if (!isLoading)\r\n            {\r\n                ShowHint();\r\n            }\r\n        }\r\n\r\n        private void ShowHint()\r\n        {\r\n            Hint.Opacity = ViewModel.InlineBots.Count > 0 ? 0.4 : 0.0;\r\n            Hint.Visibility = ViewModel.InlineBots.Count > 0 ? Visibility.Visible : Visibility.Collapsed;\r\n            if (ViewModel.InlineBots.Count > 0)\r\n            {\r\n                _isSuppressInlineBots = IsSuppressInlineBotsHint();\r\n\r\n                if (_isSuppressInlineBots == true) return;\r\n\r\n                if (InputMessageHintPlaceholder.Content == null)\r\n                {\r\n                    var control = new InputMessageHint(true);\r\n                    control.Closed += OnInputMessageHintClosed;\r\n\r\n                    InputMessageHintPlaceholder.Content = control;\r\n                }\r\n\r\n                var inputMessageHint = InputMessageHintPlaceholder.Content as InputMessageHint;\r\n                if (inputMessageHint != null)\r\n                {\r\n                    inputMessageHint.Hint = AppResources.OpenInlineBotsHint;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnInputMessageHintClosed(object sender, System.EventArgs e)\r\n        {\r\n            var control = sender as InputMessageHint;\r\n            if (control != null)\r\n            {\r\n                control.Closed -= OnInputMessageHintClosed;\r\n            }\r\n\r\n            InputMessageHintPlaceholder.Content = null;\r\n        }\r\n\r\n        public void HideInlineBots()\r\n        {\r\n            if (ViewModel.InlineBots.Count == 0) return;\r\n\r\n            ContentPanelTransform.Y = 140.0;\r\n        }\r\n\r\n        public void ShowHint(string hint)\r\n        {\r\n\r\n        }\r\n\r\n        private bool _manipulating;\r\n\r\n        private void ContentPanel_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (ViewModel.InlineBots.Count == 0) return;\r\n\r\n            _manipulating = true;\r\n        }\r\n\r\n        private readonly object _suppressInlineBotsHintSyncRoot = new object();\r\n\r\n        private static bool? _isSuppressInlineBots;\r\n\r\n        private bool IsSuppressInlineBotsHint()\r\n        {\r\n            try\r\n            {\r\n                bool result;\r\n                lock (_suppressInlineBotsHintSyncRoot)\r\n                {\r\n                    if (_isSuppressInlineBots.HasValue)\r\n                    {\r\n                        result = _isSuppressInlineBots.Value;\r\n                    }\r\n                    else\r\n                    {\r\n                        result = TLUtils.OpenObjectFromMTProtoFile<TLBool>(_suppressInlineBotsHintSyncRoot, Constants.SuppressInlineBotsHintFileName) != null;\r\n\r\n                        _isSuppressInlineBots = result;\r\n                    }\r\n                }\r\n\r\n                return result;\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void SuppressInlineBotsHint()\r\n        {\r\n            try\r\n            {\r\n                lock (_suppressInlineBotsHintSyncRoot)\r\n                {\r\n                    if (_isSuppressInlineBots == true)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    TLUtils.SaveObjectToMTProtoFile(_suppressInlineBotsHintSyncRoot, Constants.SuppressInlineBotsHintFileName, TLBool.True);\r\n\r\n                    _isSuppressInlineBots = true;\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(ex.ToString());\r\n            }\r\n        }\r\n\r\n        private void ContentPanel_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            if (!_manipulating) return;\r\n\r\n            _manipulating = false;\r\n            //Debug.WriteLine(e.FinalVelocities.LinearVelocity.Y + \" \" + e.IsInertial + \" \" + e.TotalManipulation.Translation.Y);\r\n\r\n            if (e.FinalVelocities.LinearVelocity.Y < -500.0)\r\n            {\r\n                if (ContentPanelTransform.Y == 0.0)\r\n                {\r\n                    SuppressInlineBotsHint();\r\n                    return;\r\n                }\r\n\r\n                var transformTo = 0.0;\r\n                var defaultDuration = 0.5;\r\n                var maxExpansionTransform = 140.0;\r\n                var velocityDuration = maxExpansionTransform / Math.Abs(e.FinalVelocities.LinearVelocity.Y);\r\n                var duration = Math.Abs(ContentPanelTransform.Y - transformTo) / maxExpansionTransform * defaultDuration;\r\n                var minDuration = Math.Min(duration, velocityDuration);\r\n                if (minDuration < 0.1) minDuration = 0.1;\r\n\r\n                var storyboard = new Storyboard();\r\n                var transformAnimaion = new DoubleAnimation { To = transformTo, Duration = TimeSpan.FromSeconds(minDuration), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } };\r\n                Storyboard.SetTarget(transformAnimaion, ContentPanelTransform);\r\n                Storyboard.SetTargetProperty(transformAnimaion, new PropertyPath(\"Y\"));\r\n                storyboard.Children.Add(transformAnimaion);\r\n                var opacityAnimaion = new DoubleAnimation { To = 0.0, Duration = TimeSpan.FromSeconds(minDuration) };\r\n                Storyboard.SetTarget(opacityAnimaion, Hint);\r\n                Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n                storyboard.Children.Add(opacityAnimaion);\r\n                storyboard.Begin();\r\n                storyboard.Completed += (o, args) => SuppressInlineBotsHint();\r\n                return;\r\n            }\r\n            else if (e.FinalVelocities.LinearVelocity.Y > 500.0)\r\n            {\r\n                if (ContentPanelTransform.Y == 140.0) return;\r\n\r\n                var transformTo = 140.0;\r\n                var defaultDuration = 0.5;\r\n                var maxExpansionTransform = 140.0;\r\n                var velocityDuration = maxExpansionTransform / Math.Abs(e.FinalVelocities.LinearVelocity.Y);\r\n                var duration = Math.Abs(ContentPanelTransform.Y - transformTo) / maxExpansionTransform * defaultDuration;\r\n                var minDuration = Math.Min(duration, velocityDuration);\r\n                if (minDuration < 0.1) minDuration = 0.1;\r\n\r\n                var storyboard = new Storyboard();\r\n                var transformAnimaion = new DoubleAnimation { To = transformTo, Duration = TimeSpan.FromSeconds(minDuration), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } };\r\n                Storyboard.SetTarget(transformAnimaion, ContentPanelTransform);\r\n                Storyboard.SetTargetProperty(transformAnimaion, new PropertyPath(\"Y\"));\r\n                storyboard.Children.Add(transformAnimaion);\r\n                var opacityAnimaion = new DoubleAnimation { To = .4, Duration = TimeSpan.FromSeconds(minDuration) };\r\n                Storyboard.SetTarget(opacityAnimaion, Hint);\r\n                Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n                storyboard.Children.Add(opacityAnimaion);\r\n                storyboard.Begin();\r\n                return;\r\n            }\r\n\r\n            if (ContentPanelTransform.Y < 70.0)\r\n            {\r\n                if (ContentPanelTransform.Y == 0.0)\r\n                {\r\n                    SuppressInlineBotsHint();\r\n                    return;\r\n                }\r\n\r\n                var transformTo = 0.0;\r\n                var defaultDuration = 0.5;\r\n                var maxExpansionTransform = 140.0;\r\n                var duration = Math.Abs(ContentPanelTransform.Y - transformTo) / maxExpansionTransform * defaultDuration;\r\n                if (duration < 0.1) duration = 0.1;\r\n\r\n                var storyboard = new Storyboard();\r\n                var transformAnimaion = new DoubleAnimation { To = transformTo, Duration = TimeSpan.FromSeconds(duration), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } };\r\n                Storyboard.SetTarget(transformAnimaion, ContentPanelTransform);\r\n                Storyboard.SetTargetProperty(transformAnimaion, new PropertyPath(\"Y\"));\r\n                storyboard.Children.Add(transformAnimaion);\r\n                var opacityAnimaion = new DoubleAnimation { To = 0.0, Duration = TimeSpan.FromSeconds(duration) };\r\n                Storyboard.SetTarget(opacityAnimaion, Hint);\r\n                Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n                storyboard.Children.Add(opacityAnimaion);\r\n                storyboard.Begin();\r\n                storyboard.Completed += (o, args) => SuppressInlineBotsHint();\r\n            }\r\n            else\r\n            {\r\n                if (ContentPanelTransform.Y == 140.0) return;\r\n\r\n                var transformTo = 140.0;\r\n                var defaultDuration = 0.5;\r\n                var maxExpansionTransform = 140.0;\r\n                var duration = Math.Abs(ContentPanelTransform.Y - transformTo) / maxExpansionTransform * defaultDuration;\r\n                if (duration < 0.1) duration = 0.1;\r\n\r\n                var storyboard = new Storyboard();\r\n                var transformAnimaion = new DoubleAnimation { To = transformTo, Duration = TimeSpan.FromSeconds(duration), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } };\r\n                Storyboard.SetTarget(transformAnimaion, ContentPanelTransform);\r\n                Storyboard.SetTargetProperty(transformAnimaion, new PropertyPath(\"Y\"));\r\n                storyboard.Children.Add(transformAnimaion);\r\n                var opacityAnimaion = new DoubleAnimation { To = .4, Duration = TimeSpan.FromSeconds(duration) };\r\n                Storyboard.SetTarget(opacityAnimaion, Hint);\r\n                Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n                storyboard.Children.Add(opacityAnimaion);\r\n                storyboard.Begin();\r\n            }\r\n        }\r\n\r\n        private void ContentPanel_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            if (!_manipulating) return;\r\n\r\n            var nextTransform = ContentPanelTransform.Y + e.DeltaManipulation.Translation.Y;\r\n\r\n            if (nextTransform < 0.0)\r\n            {\r\n                nextTransform = ContentPanelTransform.Y + 0.05 * e.DeltaManipulation.Translation.Y;\r\n            }\r\n            if (nextTransform > 140.0)\r\n            {\r\n                nextTransform = 140.0;\r\n            }\r\n\r\n            ContentPanelTransform.Y = nextTransform;\r\n\r\n            var currentValue = ContentPanelTransform.Y;\r\n            var maxValue = 140.0;\r\n            var minValue = 0.0;\r\n\r\n            if (currentValue > maxValue) currentValue = maxValue;\r\n            if (currentValue < minValue) currentValue = minValue;\r\n\r\n            var opacity = 0.4 * currentValue / (maxValue - minValue);\r\n            Hint.Opacity = opacity;\r\n        }\r\n\r\n        private ScrollViewer _scrollViewer;\r\n\r\n        private void CloseStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            if (InlineBotsControl.Items.Count > 0)\r\n            {\r\n                _scrollViewer = _scrollViewer ?? this.FindChildOfType<ScrollViewer>();\r\n\r\n                if (_scrollViewer != null)\r\n                {\r\n                    _scrollViewer.ScrollToHorizontalOffset(0.0);\r\n                }\r\n            }\r\n\r\n            Hint.Visibility = Visibility.Collapsed;\r\n            InlineBotsControl.Opacity = 0.0;\r\n            HideInlineBots();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChooseBackgroundView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ChooseBackgroundView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:eim=\"clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"TelegramNavigationTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition EndTransition=\"TelegramNavigationOutTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <converters:BackgroundImageConverter x:Key=\"BackgroundImageConverter\" CreateOptions=\"DelayCreation\"/>\r\n        <DataTemplate x:Key=\"ImageBackgroundTemplate\">\r\n            <Grid>\r\n                <Grid.Resources>\r\n                    <Storyboard x:Name=\"FadeInStoryboard\">\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"BackgroundImage\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.0\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.35\" Value=\"1\" >\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </Grid.Resources>\r\n                <Image x:Name=\"BackgroundImage\" Opacity=\"0\" Source=\"{Binding CurrentBackground, Converter={StaticResource BackgroundImageConverter}, ConverterParameter=480}\" Stretch=\"UniformToFill\">\r\n                    <i:Interaction.Triggers>\r\n                        <i:EventTrigger EventName=\"Loaded\">\r\n                            <eim:ControlStoryboardAction Storyboard=\"{StaticResource FadeInStoryboard}\"/>\r\n                        </i:EventTrigger>\r\n                    </i:Interaction.Triggers>\r\n                </Image>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <converters:DialogDetailsBackgroundConverter \r\n                x:Key=\"DialogDetailsBackgroundConverter\"\r\n                EmptyTemplate=\"{StaticResource EmptyTemplate}\"\r\n                ImageTemplate=\"{StaticResource ImageBackgroundTemplate}\"\r\n                AnimatedTemplate=\"{StaticResource AnimatedBackgroundTemplate}\"/>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n        <ContentControl Grid.RowSpan=\"2\" Content=\"{Binding StateService}\" ContentTemplate=\"{Binding StateService.CurrentBackground, Converter={StaticResource DialogDetailsBackgroundConverter}}\"/>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.Background, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <ItemsControl x:Name=\"Static\" Margin=\"-12,0\" VerticalAlignment=\"Bottom\">\r\n                <ItemsControl.RenderTransform>\r\n                    <TranslateTransform Y=\"0\"/>\r\n                </ItemsControl.RenderTransform>\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <StackPanel Orientation=\"Horizontal\"/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Disabled\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <Grid Width=\"100\" Height=\"100\" Margin=\"18\" Background=\"Transparent\" DataContext=\"{Binding GalleryItem}\" micro:Message.Attach=\"[Event Tap] = [Action Choose($DataContext)]\">\r\n                                    <Border Background=\"{StaticResource TelegramBadgeAccentBrush}\" />\r\n                                    <Image Stretch=\"UniformToFill\" Width=\"34\" Height=\"34\" Source=\"/Images/W10M/ic_pic_2x.png\"/>\r\n                                    <Border BorderBrush=\"{StaticResource TelegramBadgeAccentBrush}\" BorderThickness=\"6\" Visibility=\"{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                                </Grid>\r\n\r\n                                <Grid Grid.Column=\"1\" Width=\"100\" Height=\"100\" Margin=\"-8,18,18,18\" Background=\"Transparent\" DataContext=\"{Binding EmptyItem}\" micro:Message.Attach=\"[Event Tap] = [Action Choose($DataContext)]\">\r\n                                    <Border Background=\"{StaticResource PhoneChromeBrush}\" />\r\n                                    <Border BorderBrush=\"{StaticResource TelegramBadgeAccentBrush}\" BorderThickness=\"6\" Visibility=\"{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                                </Grid>\r\n\r\n                                <ItemsPresenter Grid.Column=\"2\" Margin=\"0\"/>\r\n                            </Grid>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <Grid Width=\"100\" Height=\"100\" Margin=\"-8,18,18,18\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action Choose($DataContext)]\">\r\n                            <Border Background=\"{StaticResource PhoneChromeBrush}\" />\r\n                            <Image Stretch=\"UniformToFill\" Source=\"{Binding Self, Converter={StaticResource BackgroundImageConverter}, ConverterParameter=480}\"/>\r\n                            <Border BorderBrush=\"{StaticResource TelegramBadgeAccentBrush}\" BorderThickness=\"6\" Visibility=\"{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                    </ItemsControl.ItemTemplate>\r\n            </ItemsControl>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChooseBackgroundView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChooseBackgroundView\r\n    {\r\n        public ChooseBackgroundViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChooseBackgroundViewModel; }\r\n        }\r\n\r\n        public ChooseBackgroundView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void TelegramNavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.OnForwardInAnimationComplete();\r\n        }\r\n\r\n        private void TelegramNavigationOutTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            LayoutRoot.Children.Clear();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChooseCountryView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ChooseCountryView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:controls2=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Page\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    mc:Ignorable=\"d\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"TelegramNavigationTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n\r\n        <phone:JumpListItemBackgroundConverter x:Key=\"BackgroundConverter\" Enabled=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n        <phone:JumpListItemForegroundConverter x:Key=\"ForegroundConverter\"/>\r\n\r\n        <DataTemplate x:Key=\"GroupHeaderTemplate\">\r\n            <Border Visibility=\"{Binding Key, Converter={StaticResource GroupVisibilityConverter}, ConverterParameter='@'}\"\r\n                    Margin=\"6,0,12,12\" Background=\"Transparent\">\r\n                <Border Background=\"Transparent\" BorderBrush=\"{StaticResource TelegramBadgeAccentBrush}\" BorderThickness=\"0\" Width=\"72\" CornerRadius=\"36\"\r\n                        Height=\"72\" Margin=\"0,0,18,0\" HorizontalAlignment=\"Left\">\r\n                    <TextBlock Text=\"{Binding Key}\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" FontSize=\"48\" Padding=\"0\" \r\n                            FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\"/>\r\n                </Border>\r\n            </Border>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"CountryItemTemplate\">\r\n            <ListBoxItem micro:Message.Attach=\"[Event Tap] = [Action SelectCountry($DataContext)]\">\r\n                <Grid x:Name=\"MainItemGrid\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Margin=\"11,11,0,0\" LineHeight=\"40\" LineStackingStrategy=\"BlockLineHeight\" TextWrapping=\"Wrap\" Text=\"{Binding Name}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n                    <TextBlock Grid.Row=\"1\" Margin=\"12,-4,0,12\" Text=\"{Binding PhoneCode, StringFormat='+{0}'}\" Visibility=\"{Binding DataContext.HideCountryCode, ElementName=Page, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" />\r\n                    <TextBlock Grid.Row=\"1\" Margin=\"12,-4,0,12\" Text=\" \" Visibility=\"{Binding DataContext.HideCountryCode, ElementName=Page, Converter={StaticResource BooleanToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" />\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsSearching}\" Value=\"True\" TrueState=\"Searching\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Searching\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.Visibility)\" Storyboard.TargetName=\"Title\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.Visibility)\" Storyboard.TargetName=\"TitlePanel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.Visibility)\" Storyboard.TargetName=\"Countries\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.Visibility)\" Storyboard.TargetName=\"SearchResults\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel x:Name=\"Title\" Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.ChooseYourCountry, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <StackPanel x:Name=\"TitlePanel\" Grid.Row=\"0\" Margin=\"3,29,3,0\" Visibility=\"Collapsed\">\r\n            <controls2:WatermarkedTextBox x:Name=\"SearchBox\" Text=\"{Binding Text, Mode=TwoWay}\" Watermark=\"{Binding Resources.Search, Source={StaticResource Strings}}\" Style=\"{StaticResource W10MWatermarkedTextBoxStyle}\">\r\n                <controls2:WatermarkedTextBox.InputScope>\r\n                    <InputScope>\r\n                        <InputScopeName NameValue=\"Search\"/>\r\n                    </InputScope>\r\n                </controls2:WatermarkedTextBox.InputScope>\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls2:WatermarkedTextBox>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"18,0,0,0\">\r\n            <longListSelector:LongListSelector \r\n                x:Name=\"Countries\"                    \r\n                ItemsSource=\"{Binding Items}\"\r\n                Margin=\"0,0,0,0\"\r\n                Background=\"Transparent\" \r\n                ItemTemplate=\"{StaticResource CountryItemTemplate}\" \r\n                GroupHeaderTemplate=\"{StaticResource GroupHeaderTemplate}\">\r\n                <longListSelector:LongListSelector.GroupItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <toolkit:WrapPanel Orientation=\"Horizontal\" Margin=\"0,32,0,0\"/>\r\n                    </ItemsPanelTemplate>\r\n                </longListSelector:LongListSelector.GroupItemsPanel>\r\n                <longListSelector:LongListSelector.GroupItemTemplate>\r\n                    <DataTemplate>\r\n                        <Border Background=\"{Binding Converter={StaticResource BackgroundConverter}}\" Width=\"99\" Height=\"99\" Margin=\"6\" >\r\n                            <Grid>\r\n                                <TextBlock Text=\"{Binding Key}\" \r\n                                    Visibility=\"{Binding Key, Converter={StaticResource GroupVisibilityConverter}, ConverterParameter='@'}\"\r\n                                    FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"48\" Padding=\"6\" Foreground=\"{Binding Converter={StaticResource ForegroundConverter}}\" VerticalAlignment=\"Bottom\"/>\r\n                                <Image Visibility=\"{Binding Key, Converter={StaticResource TelegramGroupVisibilityConverter}, ConverterParameter='@'}\"\r\n                                    Margin=\"6,24\" Source=\"/Images/LockScreen/lockscreen.png\" Width=\"37\" Height=\"37\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.GroupItemTemplate>\r\n            </longListSelector:LongListSelector>\r\n            \r\n            <ListBox \r\n                x:Name=\"SearchResults\" \r\n                Visibility=\"Collapsed\"\r\n                ItemsSource=\"{Binding SearchItems}\"\r\n                ItemTemplate=\"{StaticResource CountryItemTemplate}\" />\r\n        </Grid>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n        <controls1:TelegramApplicationBar Grid.Row=\"2\"\r\n            x:Name=\"AppBarPanel\" \r\n            VerticalAlignment=\"Bottom\"\r\n            MorePanel=\"{Binding ElementName=MorePanel}\">\r\n            <controls1:TelegramApplicationBar.Buttons>\r\n                <controls1:TelegramAppBarButton\r\n                    x:Name=\"SearchButton\"\r\n                    Grid.Column=\"3\" \r\n                    Tap=\"Search_OnTap\"\r\n                    ImageSource=\"/Images/ApplicationBar/ic_search_2x.png\"\r\n                    Text=\"{Binding Resources.Search, Source={StaticResource Strings}}\"/>\r\n            </controls1:TelegramApplicationBar.Buttons>\r\n        </controls1:TelegramApplicationBar>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChooseCountryView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChooseCountryView\r\n    {\r\n        public ChooseCountryViewModel ViewModel { get { return DataContext as ChooseCountryViewModel; } }\r\n\r\n        public ChooseCountryView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private void TelegramNavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_once) return;\r\n\r\n            _once = true;\r\n            ViewModel.ForwardInAnimationComplete();\r\n        }\r\n\r\n        private void Search_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.IsSearching = !ViewModel.IsSearching;\r\n\r\n            if (ViewModel.IsSearching)\r\n            {\r\n                SearchBox.Focus();\r\n            }\r\n            else\r\n            {\r\n                Page.Focus();\r\n            }\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            if (ViewModel.IsSearching)\r\n            {\r\n                ViewModel.IsSearching = false;\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChooseNotificationSpanView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ChooseNotificationSpanView\"\r\n     xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:toolkitPrimitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\">\r\n            <toolkitPrimitives:LoopingSelector ItemSize=\"148,148\" ItemMargin=\"6,3\" IsExpanded=\"True\" DataSource=\"{Binding Items}\">\r\n                <toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <StackPanel\r\n                            HorizontalAlignment=\"Left\"\r\n                            VerticalAlignment=\"Bottom\"\r\n                            Margin=\"6\">\r\n                            <TextBlock\r\n                                Text=\"{Binding SpanNumber}\"\r\n                                FontSize=\"54\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\"\r\n                                Margin=\"0,-8\"/>\r\n                            <TextBlock\r\n                                Text=\"{Binding SpanName}\"\r\n                                FontSize=\"20\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                Opacity=\"0.7\"\r\n                                Margin=\"0,-2\"/>\r\n                        </StackPanel>\r\n                    </DataTemplate>\r\n                </toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n            </toolkitPrimitives:LoopingSelector>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChooseNotificationSpanView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChooseNotificationSpanView\r\n    {\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n            {\r\n                Text = AppResources.Done,\r\n                IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n            };\r\n\r\n            private readonly AppBarButton _cancelButton = new AppBarButton\r\n            {\r\n                Text = AppResources.Cancel,\r\n                IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n            };\r\n\r\n            public ChooseNotificationSpanViewModel ViewModel\r\n            {\r\n                get { return DataContext as ChooseNotificationSpanViewModel; }\r\n            }\r\n\r\n            public ChooseNotificationSpanView()\r\n            {\r\n                InitializeComponent();\r\n\r\n                _doneButton.Click += (sender, args) => ViewModel.Done();\r\n                _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n                BuildLocalizedAppBar();\r\n            }\r\n\r\n            private void BuildLocalizedAppBar()\r\n            {\r\n                if (ApplicationBar != null) return;\r\n\r\n                ApplicationBar = new ApplicationBar();\r\n                ApplicationBar.Buttons.Add(_doneButton);\r\n                ApplicationBar.Buttons.Add(_cancelButton);\r\n            }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ChooseTTLView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ChooseTTLView\"\r\n     xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:toolkitPrimitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.SelfDestructTimer, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <TextBlock Grid.Row=\"1\" Margin=\"18,0,18,28\" Text=\"{Binding Subtitle}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"2\">\r\n            <toolkitPrimitives:LoopingSelector x:Name=\"Selector\" ItemSize=\"148,148\" ItemMargin=\"6,3\" IsExpanded=\"True\" DataSource=\"{Binding Items}\">\r\n                <toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <StackPanel\r\n                            HorizontalAlignment=\"Left\"\r\n                            VerticalAlignment=\"Bottom\"\r\n                            Margin=\"6\">\r\n                            <TextBlock\r\n                                Text=\"{Binding SpanNumber}\"\r\n                                FontSize=\"54\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\"\r\n                                Margin=\"0,-8\"/>\r\n                            <TextBlock\r\n                                Text=\"{Binding SpanName}\"\r\n                                FontSize=\"20\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                Opacity=\"0.7\"\r\n                                Margin=\"0,-2\"/>\r\n                        </StackPanel>\r\n                    </DataTemplate>\r\n                </toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n            </toolkitPrimitives:LoopingSelector>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/ChooseTTLView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChooseTTLView\r\n    {\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public ChooseTTLViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChooseTTLViewModel; }\r\n        }\r\n\r\n        public ChooseTTLView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            BuildLocalizedAppBar();\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_doneButton);\r\n            ApplicationBar.Buttons.Add(_cancelButton);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ClearCacheSettingsView.xaml",
    "content": "﻿<UserControl\r\n    x:Class=\"TelegramClient.Views.Additional.ClearCacheSettingsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"False\" d:DesignHeight=\"800\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <Storyboard x:Name=\"OpenStoryboard\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"ContentPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"-90\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                    <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                        <DiscreteObjectKeyFrame KeyTime=\"0:0:0\">\r\n                            <DiscreteObjectKeyFrame.Value>\r\n                                <Visibility>Visible</Visibility>\r\n                            </DiscreteObjectKeyFrame.Value>\r\n                        </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"CloseStoryboard\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"ContentPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"90\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"3\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                    <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                        <DiscreteObjectKeyFrame KeyTime=\"0:0:0.25\">\r\n                            <DiscreteObjectKeyFrame.Value>\r\n                                <Visibility>Collapsed</Visibility>\r\n                            </DiscreteObjectKeyFrame.Value>\r\n                        </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"#99000000\" Visibility=\"Collapsed\" Tap=\"LayoutRoot_OnTap\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" VerticalAlignment=\"Bottom\" Tap=\"ContentPanel_OnTap\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n            <Grid.Projection>\r\n                <PlaneProjection/>\r\n            </Grid.Projection>\r\n            <ItemsControl Margin=\"12,18,10,25\">\r\n                <Grid Visibility=\"{Binding Settings.Self.PhotosVisibility}\">\r\n                    <TextBlock Margin=\"12,0,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" Text=\"{Binding Settings.Self.PhotosLength, Converter={StaticResource FileSizeConverter}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    <CheckBox Margin=\"0,0,12,0\" Background=\"Transparent\" IsChecked=\"{Binding Settings.Photos, Mode=TwoWay}\" Content=\"{Binding Resources.Photos, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <Grid Visibility=\"{Binding Settings.Self.VideoVisibility}\">\r\n                    <TextBlock Margin=\"12,0,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" Text=\"{Binding Settings.Self.VideoLength, Converter={StaticResource FileSizeConverter}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    <CheckBox Margin=\"0,0,12,0\" Background=\"Transparent\" IsChecked=\"{Binding Settings.Video, Mode=TwoWay}\" Content=\"{Binding Resources.Video, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <Grid Visibility=\"{Binding Settings.Self.DocumentsVisibility}\">\r\n                    <TextBlock Margin=\"12,0,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" Text=\"{Binding Settings.Self.DocumentsLength, Converter={StaticResource FileSizeConverter}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    <CheckBox Margin=\"0,0,12,0\" Background=\"Transparent\" IsChecked=\"{Binding Settings.Documents, Mode=TwoWay}\" Content=\"{Binding Resources.Documents, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <Grid Visibility=\"{Binding Settings.Self.MusicVisibility}\">\r\n                    <TextBlock Margin=\"12,0,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" Text=\"{Binding Settings.Self.MusicLength, Converter={StaticResource FileSizeConverter}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    <CheckBox Margin=\"0,0,12,0\" Background=\"Transparent\" IsChecked=\"{Binding Settings.Music, Mode=TwoWay}\" Content=\"{Binding Resources.Music, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <Grid Visibility=\"{Binding Settings.Self.VoiceMessagesVisibility}\">\r\n                    <TextBlock Margin=\"12,0,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" Text=\"{Binding Settings.Self.VoiceMessagesLength, Converter={StaticResource FileSizeConverter}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    <CheckBox Margin=\"0,0,12,0\" Background=\"Transparent\" IsChecked=\"{Binding Settings.VoiceMessages, Mode=TwoWay}\" Content=\"{Binding Resources.VoiceMessages, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <Grid Visibility=\"{Binding Settings.Self.OtherFilesVisibility}\">\r\n                    <TextBlock Margin=\"12,0,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" Text=\"{Binding Settings.Self.OtherFilesLength, Converter={StaticResource FileSizeConverter}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    <CheckBox Margin=\"0,0,12,0\" Background=\"Transparent\" IsChecked=\"{Binding Settings.OtherFiles, Mode=TwoWay}\" Content=\"{Binding Resources.OtherFiles, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <ListBoxItem micro:Message.Attach=\"[Event Tap] = [Action ClearCache]\">\r\n                    <TextBlock Margin=\"12\" Text=\"{Binding Resources.ClearCache, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n                </ListBoxItem>\r\n            </ItemsControl>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Additional/ClearCacheSettingsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ClearCacheSettingsView : UserControl\r\n    {\r\n        public ClearCacheSettingsViewModel ViewModel\r\n        {\r\n            get { return DataContext as ClearCacheSettingsViewModel; }\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        public ClearCacheSettingsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n                if (!_once)\r\n                {\r\n                    _once = true;\r\n                    if (ViewModel.IsOpen)\r\n                    {\r\n                        OpenStoryboard.Begin();\r\n                    }\r\n                }\r\n            };\r\n            Unloaded += (o, e) => ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                var frame = Bootstrapper.PhoneFrame;\r\n                if (frame != null)\r\n                {\r\n                    var currentPage = frame.Content as PhoneApplicationPage;\r\n                    if (currentPage != null && currentPage.ApplicationBar != null)\r\n                    {\r\n                        currentPage.ApplicationBar.IsVisible = !ViewModel.IsOpen;\r\n                    }\r\n                }\r\n\r\n                if (ViewModel.IsOpen)\r\n                {\r\n                    //OpenContactItem.Visibility = ViewModel.OpenContactVisibility;\r\n                    OpenStoryboard.Begin();\r\n                }\r\n                else\r\n                {\r\n                    CloseStoryboard.Begin();\r\n                }\r\n            }\r\n        }\r\n\r\n        //private void LayoutRoot_OnTap(object sender, GestureEventArgs e)\r\n        //{\r\n        //    ViewModel.Close();\r\n        //}\r\n        private void LayoutRoot_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Close();\r\n        }\r\n\r\n        private void ContentPanel_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Additional/EditChatUsernameView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.EditChatUsernameView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls1:TelegramTransitionService.NavigationInTransition>\r\n        <controls1:TelegramNavigationInTransition>\r\n            <controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls1:TelegramNavigationInTransition.Backward>\r\n            <controls1:TelegramNavigationInTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls1:TelegramNavigationInTransition.Forward>\r\n        </controls1:TelegramNavigationInTransition>\r\n    </controls1:TelegramTransitionService.NavigationInTransition>\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition>\r\n            <controls1:TelegramNavigationOutTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Backward>\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n            <ec:DataStateBehavior Binding=\"{Binding HasError}\" Value=\"True\" TrueState=\"NotAvailable\" FalseState=\"Available\"/>          \r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(additional:EditCurrentUserView.AppBarState)\" Storyboard.TargetName=\"Self\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Normal\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Username\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(additional:EditUsernameView.AppBarState)\" Storyboard.TargetName=\"Self\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Working\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n            <VisualStateGroup x:Name=\"AvailabilityGroup\">\r\n                <VisualState x:Name=\"Available\">\r\n                    <Storyboard>\r\n                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ErrorBorder\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                        </ObjectAnimationUsingKeyFrames>-->\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"-100\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"1\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"NotAvailable\">\r\n                    <Storyboard>\r\n                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ErrorBorder\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                        </ObjectAnimationUsingKeyFrames>-->\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"100\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.Edit, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n            <!--<TextBlock Text=\"page name\" Margin=\"9,-7,0,0\" Style=\"{StaticResource PhoneTextTelegramTitle1Style}\"/>-->\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <StackPanel Grid.Row=\"0\">\r\n                <TextBlock Text=\"{Binding Caption}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,0,12,-5\"/>\r\n                <Grid>\r\n                    <controls:ValidationTextBox x:Name=\"Username\" MaxHeight=\"72\" MaxLength=\"32\" VerticalAlignment=\"Top\" InputScope=\"Text\" HasError=\"{Binding HasError}\"/>\r\n                </Grid>\r\n            </StackPanel>\r\n\r\n            <TextBlock Grid.Row=\"1\" Margin=\"12,0,12,0\" x:Name=\"Error\" Text=\"{Binding Error}\" TextWrapping=\"Wrap\" Foreground=\"#FFB2362E\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                <TextBlock.RenderTransform>\r\n                    <TranslateTransform/>\r\n                </TextBlock.RenderTransform>    \r\n            </TextBlock>\r\n            <TextBlock Grid.Row=\"2\" Margin=\"12,43,12,0\" Text=\"{Binding Description}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n            <TextBlock Grid.Row=\"3\" Margin=\"12,43,12,0\" Text=\"{Binding Description2}\" Visibility=\"{Binding Username, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <TextBlock Grid.Row=\"3\" Margin=\"12,43,12,0\" Text=\"{Binding Link}\" Visibility=\"{Binding Username, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" micro:Message.Attach=\"[Event Tap] = [Action CopyLink]\"  TextWrapping=\"Wrap\" LineHeight=\"22\" Foreground=\"{StaticResource PhoneAccentBrush}\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/EditChatUsernameView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeniy Nadymov, 2013-2018.\r\n// \r\nusing System;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class EditChatUsernameView : IDisposable\r\n    {\r\n        private readonly IDisposable _keyPressSubscription;\r\n\r\n        public static readonly DependencyProperty AppBarStateProperty =\r\n            DependencyProperty.Register(\"AppBarState\", typeof(string), typeof(EditChatUsernameView), new PropertyMetadata(OnAppBarStateChanged));\r\n\r\n        private static void OnAppBarStateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var state = (string)e.NewValue;\r\n\r\n            var view = (EditChatUsernameView)d;\r\n\r\n            if (state == \"Working\")\r\n            {\r\n                view._doneButton.IsEnabled = false;\r\n                view._cancelButton.IsEnabled = false;\r\n            }\r\n            else\r\n            {\r\n                view._doneButton.IsEnabled = true;\r\n                view._cancelButton.IsEnabled = true;\r\n            }\r\n        }\r\n\r\n        public string AppBarState\r\n        {\r\n            get { return (string)GetValue(AppBarStateProperty); }\r\n            set { SetValue(AppBarStateProperty, value); }\r\n        }\r\n\r\n        public EditChatUsernameViewModel ViewModel\r\n        {\r\n            get { return DataContext as EditChatUsernameViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public EditChatUsernameView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                keh => { Username.TextChanged += keh; },\r\n                keh => { Username.TextChanged -= keh; });\r\n\r\n            _keyPressSubscription = keyPressEvents\r\n                .Throttle(TimeSpan.FromSeconds(0.3))\r\n                .ObserveOnDispatcher()\r\n                .Subscribe(e => ViewModel.Check());\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            Loaded += (sender, args) => BuildLocalizedAppBar();\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar == null)\r\n            {\r\n                ApplicationBar = new ApplicationBar();\r\n\r\n                ApplicationBar.Buttons.Add(_doneButton);\r\n                ApplicationBar.Buttons.Add(_cancelButton);\r\n            }\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _keyPressSubscription.Dispose();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/EditCurrentUserView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.EditCurrentUserView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(additional:EditCurrentUserView.AppBarState)\" Storyboard.TargetName=\"Self\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Normal\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"FirstNameLabel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"LastNameLabel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(additional:EditCurrentUserView.AppBarState)\" Storyboard.TargetName=\"Self\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Working\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        \r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.EditName, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid Grid.Row=\"0\" Margin=\"0,24,0,12\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n\r\n                <views:ConversationTileControl\r\n                    micro:Message.Attach=\"[Event Tap] = [Action SetProfilePhoto]\"\r\n\t\t\t\t    Margin=\"12,0,0,0\" \r\n                    Size=\"100\"\r\n                    Fill=\"{Binding CurrentItem.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                    Text=\"{Binding CurrentItem, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                    Source=\"{Binding CurrentItem.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n\r\n                <Grid Visibility=\"{Binding CurrentItem.Photo, Converter={StaticResource EmptyPhotoToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" Margin=\"-6\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\" micro:Message.Attach=\"[Event Tap] = [Action DeletePhoto]\">\r\n                    <Border Background=\"{StaticResource PhoneBackgroundBrush}\" Width=\"34\" Height=\"34\" CornerRadius=\"17\"/>\r\n                    <Border Background=\"{StaticResource TelegramBadgeAccentBrush}\" Width=\"28\" Height=\"28\" CornerRadius=\"15\"/>\r\n                    <TextBlock FontFamily=\"Segoe UI Symbol\" Text=\"\" FontSize=\"18\" Margin=\"0,-1,0,0\" Foreground=\"{StaticResource PhoneBackgroundBrush}\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                </Grid>\r\n\r\n                <StackPanel Grid.Column=\"1\" VerticalAlignment=\"Top\">\r\n                    <TextBlock Margin=\"24,13,0,0\" Text=\"{Binding CurrentItem.Phone, StringFormat='+\\{0\\}'}\" FontSize=\"30\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    <TextBlock Margin=\"24,1,0,0\" Text=\"{Binding Resources.Online, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Foreground=\"{StaticResource TelegramAccentBrush}\"/>\r\n                </StackPanel>\r\n            </Grid>\r\n\r\n            <controls1:LabeledTextBox Grid.Row=\"1\" x:Name=\"FirstNameLabel\" Label=\"{Binding Resources.FirstName, Source={StaticResource Strings}}\" Text=\"{Binding FirstName, Mode=TwoWay}\"/>\r\n            <controls1:LabeledTextBox Grid.Row=\"2\" x:Name=\"LastNameLabel\" Label=\"{Binding Resources.LastName, Source={StaticResource Strings}}\" Text=\"{Binding LastName, Mode=TwoWay}\"/>\r\n            \r\n            \r\n            \r\n        </Grid>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"0\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n        <Grid x:Name=\"Bar\" Grid.Row=\"2\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform/>\r\n            </Grid.RenderTransform>\r\n            <controls1:TelegramApplicationBar\r\n                x:Name=\"AppBar\"\r\n                VerticalAlignment=\"Bottom\"\r\n                MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                <controls1:TelegramApplicationBar.Buttons>\r\n                    <controls1:TelegramAppBarButton\r\n                        IsEnabled=\"True\"\r\n                        Grid.Column=\"3\" \r\n                        Tap=\"DoneButton_OnClick\"\r\n                        ImageSource=\"/Images/W10M/ic_done_2x.png\"\r\n                        Text=\"{Binding Resources.Done, Source={StaticResource Strings}}\"/>\r\n                </controls1:TelegramApplicationBar.Buttons>\r\n            </controls1:TelegramApplicationBar>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/EditCurrentUserView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.Views.Controls;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class EditCurrentUserView\r\n    {\r\n        public static readonly DependencyProperty AppBarStateProperty =\r\n            DependencyProperty.Register(\"AppBarState\", typeof(string), typeof(EditCurrentUserView), new PropertyMetadata(OnAppBarStateChanged));\r\n\r\n        private static void OnAppBarStateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var state = (string)e.NewValue;\r\n\r\n            var view = (EditCurrentUserView)d;\r\n\r\n            if (state == \"Working\")\r\n            {\r\n                view._doneButton.IsEnabled = false;\r\n                view._cancelButton.IsEnabled = false;\r\n            }\r\n            else\r\n            {\r\n                view._doneButton.IsEnabled = true;\r\n                view._cancelButton.IsEnabled = true;\r\n            }\r\n        }\r\n\r\n        public string AppBarState\r\n        {\r\n            get { return (string)GetValue(AppBarStateProperty); }\r\n            set { SetValue(AppBarStateProperty, value); }\r\n        }\r\n\r\n        public EditCurrentUserViewModel ViewModel\r\n        {\r\n            get { return DataContext as EditCurrentUserViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public EditCurrentUserView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            Loaded += (sender, args) => BuildLocalizedAppBar();\r\n            BackKeyPress += EditCurrentUserView_BackKeyPress;\r\n        }\r\n\r\n        private void EditCurrentUserView_BackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                var multiplePhotoChooser = popup.Child as OpenPhotoPicker;\r\n                if (multiplePhotoChooser != null)\r\n                {\r\n                    multiplePhotoChooser.TryClose();\r\n                }\r\n\r\n                var cropControl = popup.Child as CropControl;\r\n                if (cropControl != null)\r\n                {\r\n                    cropControl.TryClose();\r\n                }\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            //if (ApplicationBar == null)\r\n            //{\r\n            //    ApplicationBar = new ApplicationBar();\r\n\r\n            //    ApplicationBar.Buttons.Add(_doneButton);\r\n            //    ApplicationBar.Buttons.Add(_cancelButton);\r\n            //}\r\n        }\r\n\r\n        private void DoneButton_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/EditPhoneNumberView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.EditPhoneNumberView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls1:TelegramTransitionService.NavigationInTransition>\r\n        <controls1:TelegramNavigationInTransition>\r\n            <controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls1:TelegramNavigationInTransition.Backward>\r\n            <controls1:TelegramNavigationInTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls1:TelegramNavigationInTransition.Forward>\r\n        </controls1:TelegramNavigationInTransition>\r\n    </controls1:TelegramTransitionService.NavigationInTransition>\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition>\r\n            <controls1:TelegramNavigationOutTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Backward>\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.Edit, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n            <!--<TextBlock Text=\"page name\" Margin=\"9,-7,0,0\" Style=\"{StaticResource PhoneTextTelegramTitle1Style}\"/>-->\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <TextBlock Margin=\"12,-12,0,0\" Text=\"{Binding CurrentItem.Phone, StringFormat='+\\{0\\}'}\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n            <Image Grid.Row=\"1\" Margin=\"0,29,0,29\" Source=\"/Images/PhoneNumber/changenumber_2x.png\" Width=\"250\" Stretch=\"Uniform\"/>\r\n            <TextBlock Grid.Row=\"2\" Margin=\"12,43,12,0\" Text=\"{Binding Resources.NewNumberDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </Grid>\r\n        <Border x:Name=\"ChangePhoneNumberPanel\" Grid.Row=\"2\" Height=\"72\" VerticalAlignment=\"Bottom\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n            <Button x:Name=\"ChangePhoneNumber\" VerticalAlignment=\"Center\" Margin=\"12,-12\" Content=\"{Binding Resources.ChangeNumber, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n        </Border>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/EditPhoneNumberView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class EditPhoneNumberView\r\n    {\r\n        public EditPhoneNumberView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            OptimizeFullHD();\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n            var appBar = new ApplicationBar();\r\n            var appBarDefaultSize = appBar.DefaultSize;\r\n\r\n            ChangePhoneNumberPanel.Height = appBarDefaultSize;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/EditUsernameView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.EditUsernameView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls2=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls1:TelegramTransitionService.NavigationInTransition>\r\n        <controls1:TelegramNavigationInTransition>\r\n            <controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls1:TelegramNavigationInTransition.Backward>\r\n            <controls1:TelegramNavigationInTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls1:TelegramNavigationInTransition.Forward>\r\n        </controls1:TelegramNavigationInTransition>\r\n    </controls1:TelegramTransitionService.NavigationInTransition>\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition>\r\n            <controls1:TelegramNavigationOutTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Backward>\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n            <ec:DataStateBehavior Binding=\"{Binding HasError}\" Value=\"True\" TrueState=\"NotAvailable\" FalseState=\"Available\"/>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsUsernameAvailable}\" Value=\"True\" TrueState=\"UsernameAvailable\" FalseState=\"UsernameNotAvailable\"/>          \r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(additional:EditCurrentUserView.AppBarState)\" Storyboard.TargetName=\"Self\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Normal\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"UsernameLabel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(additional:EditUsernameView.AppBarState)\" Storyboard.TargetName=\"Self\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Working\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n            <VisualStateGroup x:Name=\"UsernameAvailableGroup\">\r\n                <VisualState x:Name=\"UsernameNotAvailable\">\r\n                    <Storyboard>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"-100\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"1\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"UsernameAvailable\">\r\n                    <Storyboard>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"100\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n            <VisualStateGroup x:Name=\"AvailabilityGroup\">\r\n                <VisualState x:Name=\"Available\">\r\n                    <Storyboard>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"-100\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"1\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"NotAvailable\">\r\n                    <Storyboard>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"100\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.Edit, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <StackPanel Grid.Row=\"0\">\r\n                <TextBlock Text=\"{Binding Resources.Username, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,18,12,-5\"/>\r\n                <controls2:LabeledTextBox \r\n                    x:Name=\"UsernameLabel\"\r\n                    InputScope=\"Text\"\r\n                    MaxLength=\"32\"\r\n                    Label=\"\" \r\n                    Text=\"{Binding Username, Mode=TwoWay}\"\r\n                    KeyDown=\"Username_OnKeyDown\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </controls2:LabeledTextBox>\r\n            </StackPanel>\r\n\r\n            <TextBlock Grid.Row=\"1\" Margin=\"12,-6,12,0\" x:Name=\"Error\" Text=\"{Binding Error}\" TextWrapping=\"Wrap\" Foreground=\"{StaticResource TelegramTextRedBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                <TextBlock.RenderTransform>\r\n                    <TranslateTransform/>\r\n                </TextBlock.RenderTransform>\r\n            </TextBlock>\r\n            <TextBlock Grid.Row=\"1\" Margin=\"12,-6,12,0\" x:Name=\"UsernameHint\" Text=\"{Binding UsernameAvailableString}\" TextWrapping=\"Wrap\" Foreground=\"ForestGreen\"  Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                <TextBlock.RenderTransform>\r\n                    <TranslateTransform/>\r\n                </TextBlock.RenderTransform>\r\n            </TextBlock>\r\n            \r\n            <TextBlock Grid.Row=\"2\" Margin=\"12,18,12,0\" Text=\"{Binding Resources.UsernameDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/EditUsernameView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class EditUsernameView\r\n    {\r\n        public static readonly DependencyProperty AppBarStateProperty =\r\n            DependencyProperty.Register(\"AppBarState\", typeof(string), typeof(EditUsernameView), new PropertyMetadata(OnAppBarStateChanged));\r\n\r\n        private static void OnAppBarStateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var state = (string)e.NewValue;\r\n\r\n            var view = (EditUsernameView)d;\r\n\r\n            if (state == \"Working\")\r\n            {\r\n                view._doneButton.IsEnabled = false;\r\n                view._cancelButton.IsEnabled = false;\r\n            }\r\n            else\r\n            {\r\n                view._doneButton.IsEnabled = true;\r\n                view._cancelButton.IsEnabled = true;\r\n            }\r\n        }\r\n\r\n        public string AppBarState\r\n        {\r\n            get { return (string)GetValue(AppBarStateProperty); }\r\n            set { SetValue(AppBarStateProperty, value); }\r\n        }\r\n\r\n        public EditUsernameViewModel ViewModel\r\n        {\r\n            get { return DataContext as EditUsernameViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public EditUsernameView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            Loaded += (sender, args) => BuildLocalizedAppBar();\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar == null)\r\n            {\r\n                ApplicationBar = new ApplicationBar();\r\n\r\n                ApplicationBar.Buttons.Add(_doneButton);\r\n                ApplicationBar.Buttons.Add(_cancelButton);\r\n            }\r\n        }\r\n\r\n        private void Username_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.Done();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/EncryptionKeyView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.EncryptionKeyView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" \r\n    Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"NavigationTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,48,0,21\">\r\n            <TextBlock Text=\"{Binding Resources.EncryptionKey, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <Grid HorizontalAlignment=\"Center\">\r\n                <Image Stretch=\"None\" Margin=\"12,0\" Source=\"{Binding Bitmap}\"/>\r\n                <!--<Border Width=\"200\" Height=\"200\" BorderBrush=\"{StaticResource PhoneAccentBrush}\" BorderThickness=\"2\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>-->\r\n            </Grid>\r\n\r\n            <TextBlock Grid.Row=\"2\" Margin=\"12,43,12,0\" Text=\"{Binding EncriptionKeyString}\" Visibility=\"{Binding EncriptionKeyString, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" TextWrapping=\"Wrap\" LineHeight=\"22\" TextAlignment=\"Center\" LineStackingStrategy=\"BlockLineHeight\" FontFamily=\"Courier New\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <TextBlock Grid.Row=\"3\" Margin=\"12,43,12,0\" Text=\"{Binding EncryptionKeyDescription1}\" TextWrapping=\"Wrap\" LineHeight=\"22\" TextAlignment=\"Center\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <TextBlock Grid.Row=\"4\" Margin=\"12,22,12,0\" Text=\"{Binding EncryptionKeyDescription2}\" TextWrapping=\"Wrap\" LineHeight=\"22\" TextAlignment=\"Center\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <StackPanel Grid.Row=\"5\" Orientation=\"Horizontal\" Margin=\"12,18,12,0\" HorizontalAlignment=\"Center\">\r\n                <TextBlock Text=\"{Binding Resources.LearnMoreAt, Source={StaticResource Strings}}\" Margin=\"0\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                <HyperlinkButton Content=\"telegram.org\" NavigateUri=\"http://telegram.org\" TargetName=\"_anything\" Margin=\"-12,0,0,0\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"{StaticResource PhoneFontSizeNormal}\"/>\r\n            </StackPanel>\r\n\r\n            <!--<StackPanel Margin=\"12,0,12,0\">\r\n                <TextBlock x:Name=\"TimerText\" Foreground=\"Green\"/>\r\n                <TextBlock Text=\"{Binding VisualizationTime}\" Foreground=\"Green\"/>\r\n            </StackPanel>-->\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/EncryptionKeyView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class EncryptionKeyView\r\n    {\r\n        public EncryptionKeyViewModel ViewModel\r\n        {\r\n            get { return DataContext as EncryptionKeyViewModel; }\r\n        }\r\n\r\n        public EncryptionKeyView()\r\n        {\r\n            //var timer = Stopwatch.StartNew();\r\n\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                //TimerText.Text = timer.Elapsed.ToString();\r\n            };\r\n        }\r\n\r\n        private void NavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.AnimationComplete();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/EnterPasscodeView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.EnterPasscodeView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.Passcode, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <TextBlock Grid.Row=\"0\" Text=\"{Binding Resources.EnterYourCurrentPasscode, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,0,12,-5\"/>\r\n            <additional:TelegramPasswordBox Grid.Row=\"1\" x:Name=\"PasscodeBox\" Password=\"{Binding Passcode, Mode=TwoWay}\" Simple=\"{Binding Simple}\" KeyDown=\"Passcode_OnKeyDown\"/>\r\n\r\n\r\n            <!--<PasswordBox Grid.Row=\"1\" x:Name=\"Passcode\" Password=\"{Binding Passcode, Mode=TwoWay}\" KeyDown=\"Passcode_OnKeyDown\">\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdatePasswordBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </PasswordBox>-->\r\n        </Grid>\r\n    </Grid>\r\n    </views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/EnterPasscodeView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows.Input;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class EnterPasscodeView\r\n    {\r\n        public EnterPasscodeViewModel ViewModel\r\n        {\r\n            get { return DataContext as EnterPasscodeViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public EnterPasscodeView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() => PasscodeBox.Focus());\r\n            };\r\n\r\n            BuildLocalizedAppBar();\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar == null)\r\n            {\r\n                ApplicationBar = new ApplicationBar();\r\n\r\n                ApplicationBar.Buttons.Add(_doneButton);\r\n                ApplicationBar.Buttons.Add(_cancelButton);\r\n            }\r\n        }\r\n\r\n        private void Passcode_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.Done();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/EnterPasswordView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.EnterPasswordView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n    \r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        \r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"PasswordBox\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Done\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"ForgotPassword\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        \r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Password, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <TextBlock Grid.Row=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,18,12,-5\" Text=\"{Binding Resources.EnterYourCurrentPassword, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <Grid Grid.Row=\"1\" Grid.ColumnSpan=\"2\">\r\n                <PasswordBox x:Name=\"PasswordBox\" VerticalContentAlignment=\"Top\" Password=\"{Binding Password, Mode=TwoWay}\" GotFocus=\"PasswordBox_OnGotFocus\" LostFocus=\"PasswordBox_OnLostFocus\" PasswordChanged=\"PasswordBox_OnPasswordChanged\" KeyDown=\"Passcode_OnKeyDown\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdatePasswordBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </PasswordBox>\r\n                <TextBlock x:Name=\"HintTextBlock\" IsHitTestVisible=\"False\" VerticalAlignment=\"Top\" FontSize=\"23\" Margin=\"31,20,31,0\" Text=\"{Binding PasswordHint}\" Opacity=\"0.6\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            </Grid>\r\n            <Grid Grid.Row=\"2\" Margin=\"0,18,0,0\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Button Grid.Column=\"0\" x:Name=\"Done\" Padding=\"12,2,12,6\" Content=\"{Binding Resources.Done, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n                <Button Grid.Column=\"1\" x:Name=\"ForgotPassword\" VerticalAlignment=\"Center\" Padding=\"0,2,0,6\" Content=\"{Binding Resources.ForgotPassword, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource TextButton}\"/>\r\n            </Grid>\r\n        </Grid>\r\n    </Grid>\r\n    </views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/EnterPasswordView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class EnterPasswordView\r\n    {\r\n        public EnterPasswordViewModel ViewModel\r\n        {\r\n            get { return DataContext as EnterPasswordViewModel; }\r\n        }\r\n\r\n        public EnterPasswordView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) => PasswordBox.Focus();\r\n        }\r\n\r\n        private void Passcode_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.Done();\r\n            }\r\n        }\r\n\r\n        private void PasswordBox_OnPasswordChanged(object sender, RoutedEventArgs e)\r\n        {\r\n            HintTextBlock.Visibility = string.IsNullOrEmpty(PasswordBox.Password)\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n        }\r\n\r\n        private void PasswordBox_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            HintTextBlock.Foreground = (Brush)Application.Current.Resources[\"PhoneTextBoxForegroundBrush\"];\r\n        }\r\n\r\n        private void PasswordBox_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            HintTextBlock.Foreground = (Brush)Application.Current.Resources[\"PhoneForegroundBrush\"];\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/FallingSnowControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Additional.FallingSnowControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Canvas x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneBackgroundBrush}\" />\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Additional/FallingSnowControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing System.Windows.Shapes;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class FallingSnowControl : UserControl\r\n    {\r\n        public FallingSnowControl()\r\n        {\r\n            InitializeComponent(); InitializeComponent();\r\n\r\n            Loaded += (o, args) =>\r\n            {\r\n                //if (IsEnabled)\r\n                {\r\n                    RunBackgroundAnimation();\r\n                }\r\n            };\r\n            Unloaded += (o, args) =>\r\n            {\r\n                ThreadPool.QueueUserWorkItem(state =>\r\n                {\r\n                    Thread.Sleep(200);\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        foreach (var e in _ellipses)\r\n                        {\r\n                            var sb = e.Resources[\"sb\"] as Storyboard;\r\n                            if (sb != null)\r\n                            {\r\n                                sb.Pause();\r\n                            }\r\n                        }\r\n\r\n                    });\r\n\r\n                });\r\n\r\n            };\r\n        }\r\n\r\n        private bool _initialized;\r\n\r\n        private void RunBackgroundAnimation()\r\n        {\r\n            if (_initialized)\r\n            {\r\n                foreach (var e in _ellipses)\r\n                {\r\n                    var sb = e.Resources[\"sb\"] as Storyboard;\r\n                    if (sb != null)\r\n                    {\r\n                        sb.Resume();\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            _initialized = true;\r\n\r\n            for (var i = 0; i < 30; i++)\r\n            {\r\n                var ellipse = CreateEllipse();\r\n                LayoutRoot.Children.Add(ellipse);\r\n                RandomiseAndBegin(ellipse);\r\n            }\r\n        }\r\n\r\n        private void ContinueBackgroundAnimation()\r\n        {\r\n            foreach (var e in _ellipses)\r\n            {\r\n\r\n                var sb = e.Resources[\"sb\"] as Storyboard;\r\n                if (sb.GetCurrentState() == ClockState.Stopped)\r\n                {\r\n                    sb.Begin();\r\n                }\r\n            }\r\n        }\r\n\r\n        private IList<Ellipse> _ellipses = new List<Ellipse>();\r\n\r\n        private Ellipse CreateEllipse()\r\n        {\r\n            var ellipse = new Ellipse();\r\n            _ellipses.Add(ellipse);\r\n            ellipse.CacheMode = new BitmapCache();\r\n\r\n            ellipse.Width = 8;\r\n            ellipse.Height = 8;\r\n            var transform = new CompositeTransform();\r\n            ellipse.RenderTransformOrigin = new Point(0.5, 0.5);\r\n            ellipse.RenderTransform = transform;\r\n            ellipse.Fill = new SolidColorBrush(Colors.White);\r\n\r\n            DoubleAnimation xAnim = new DoubleAnimation();\r\n            Storyboard.SetTarget(xAnim, ellipse);\r\n            Storyboard.SetTargetProperty(xAnim,\r\n              new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n\r\n            DoubleAnimation yAnim = new DoubleAnimation();\r\n            Storyboard.SetTarget(yAnim, ellipse);\r\n            Storyboard.SetTargetProperty(yAnim,\r\n              new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n\r\n            Storyboard sb = new Storyboard();\r\n            sb.Children.Add(xAnim);\r\n            sb.Children.Add(yAnim);\r\n            ellipse.Resources.Add(\"sb\", sb);\r\n\r\n            sb.Completed += (s, e) =>\r\n            {\r\n                sb.Stop();\r\n                RandomiseAndBegin(ellipse);\r\n            };\r\n\r\n            return (ellipse);\r\n        }\r\n        void RandomiseAndBegin(Ellipse e)\r\n        {\r\n            double scale = Utility.Randomise(0.2, 1.0);\r\n            CompositeTransform transform = e.RenderTransform as CompositeTransform;\r\n            transform.ScaleX = transform.ScaleY = scale;\r\n\r\n            //BlurEffect effect = (BlurEffect)e.Effect;\r\n            //effect.Radius = Utility.Randomise(20.0, 30.0);\r\n\r\n            //var color = new Color();\r\n            //color.R = (byte)Utility.Randomise(0, 255);\r\n            //color.G = (byte)Utility.Randomise(0, 255);\r\n            //color.B = (byte)Utility.Randomise(0, 255);\r\n\r\n            //e.Fill = new SolidColorBrush(color);\r\n\r\n            e.Opacity = Utility.Randomise(0.2, 0.5);\r\n\r\n            Duration duration = new Duration(new TimeSpan(0, 0, (int)Utility.Randomise(9, 30)));\r\n\r\n            var sb = e.Resources[\"sb\"] as Storyboard;\r\n            sb.Children[0].Duration = duration;\r\n            sb.Children[1].Duration = duration;\r\n\r\n            DoubleAnimation xAnim = (DoubleAnimation)sb.Children[0];\r\n            xAnim.From =\r\n              Utility.Randomise(0, this.LayoutRoot.ActualWidth - (scale * e.Width));\r\n            xAnim.To = xAnim.From;\r\n              //Utility.Randomise(0, this.LayoutRoot.ActualWidth - (scale * e.Width));\r\n\r\n            DoubleAnimation yAnim = (DoubleAnimation)sb.Children[1];\r\n            yAnim.To =\r\n              this.LayoutRoot.ActualHeight - ((e.Height - (scale * e.Height)) / 2);\r\n            yAnim.From =\r\n              0 - e.Height - ((scale * e.Height) / 2);\r\n\r\n            sb.Begin();\r\n\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Additional/FeaturedStickersView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.FeaturedStickersView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:reorderListBox=\"clr-namespace:ReorderListBox;assembly=Telegram.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"ForwardTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"SetItemTemplate\">\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"False\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"24,6,24,6\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"64\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Border Width=\"64\" Height=\"64\">\r\n                        <Grid>\r\n                            <Image CacheMode=\"BitmapCache\" Source=\"{Binding Stickers[0].Self, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=64}\"/>\r\n                        </Grid>\r\n                    </Border>\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"14,-2,0,0\" Background=\"Transparent\" Tap=\"StickerSet_OnTap\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Column=\"0\" Margin=\"0,-6,2,0\" VerticalAlignment=\"Center\" Text=\"•\" Visibility=\"{Binding Unread, Converter={StaticResource BooleanToVisibilityConverter}}\" Foreground=\"{StaticResource PhoneAccentBrush}\" Style=\"{StaticResource PhoneTextLargeStyle}\">\r\n                            <TextBlock.RenderTransform>\r\n                                <TranslateTransform Y=\"2\"/>\r\n                            </TextBlock.RenderTransform>\r\n                        </TextBlock>\r\n                        <TextBlock Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"0,-6,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding Title}\" MaxHeight=\"42.56\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                        <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"1,-4,0,0\" Text=\"{Binding Converter={StaticResource StickerSetToCountStringConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n                    <Button Grid.Column=\"2\" Click=\"AddRemoveStickerSet_OnClick\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Visibility=\"{Binding Installed, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\" Content=\"{Binding Resources.Add, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" VerticalAlignment=\"Center\" Margin=\"0,0,-12,0\" Padding=\"18,5,18,7\" FontSize=\"17.667\" BorderThickness=\"2\"/>\r\n                    <Button Grid.Column=\"2\" IsEnabled=\"False\" MinWidth=\"95\" Visibility=\"{Binding Installed, Converter={StaticResource BooleanToVisibilityConverter}}\" Content=\"\" VerticalAlignment=\"Center\" Margin=\"0,0,-12,0\" Padding=\"18,5,18,7\" FontSize=\"17.667\" BorderThickness=\"2\" FontFamily=\"Segoe UI Symbol\"/>\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.FeaturedStickers, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <TextBlock Grid.Row=\"1\" Margin=\"18,12,18,0\" Text=\"{Binding Status}\" Visibility=\"{Binding Status, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n\r\n        <ListBox\r\n            Grid.Row=\"1\"\r\n            x:Name=\"Items\"\r\n            Margin=\"-6,0\"\r\n            ItemsSource=\"{Binding Items}\">\r\n            <ListBox.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Grid CacheMode=\"BitmapCache\" Background=\"Transparent\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" Loaded=\"FrameworkElement_OnLoaded\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Share($DataContext)]\" Header=\"{Binding Resources.Share, Source={StaticResource Strings}}\"/>\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [CopyLink($DataContext)]\" Header=\"{Binding Resources.CopyLink, Source={StaticResource Strings}}\"/>\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                        <ContentControl HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" Content=\"{Binding}\" ContentTemplate=\"{StaticResource SetItemTemplate}\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </ListBox.ItemTemplate>\r\n            <ListBox.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel/>\r\n                </ItemsPanelTemplate>\r\n            </ListBox.ItemsPanel>\r\n        </ListBox>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/FeaturedStickersView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class FeaturedStickersView\r\n    {\r\n        public FeaturedStickersViewModel ViewModel\r\n        {\r\n            get { return DataContext as FeaturedStickersViewModel; }\r\n        }\r\n\r\n        public FeaturedStickersView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private void ForwardTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_once)\r\n            {\r\n                _once = true;\r\n                ViewModel.ForwardInAnimationComplete();\r\n            }\r\n        }\r\n\r\n        private void StickerSet_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var stickerSet = element.DataContext as TLStickerSet32;\r\n            if (stickerSet == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                ShowStickerSetMessageBox(false, stickerSet.Installed, stickerSet, prompt =>\r\n                {\r\n                    if (prompt == PopUpResult.Ok)\r\n                    {\r\n                        ViewModel.AddRemoveStickerSet(stickerSet);\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n        private void FrameworkElement_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var contextMenu = sender as ContextMenu;\r\n            if (contextMenu != null)\r\n            {\r\n                \r\n            }\r\n        }\r\n\r\n        private void AddRemoveStickerSet_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var button = sender as Button;\r\n            if (button != null)\r\n            {\r\n                var stickerSet = button.DataContext as TLStickerSet32;\r\n                if (stickerSet != null)\r\n                {\r\n                    ViewModel.AddRemoveStickerSet(stickerSet);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Button_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var button = sender as Button;\r\n            if (button != null)\r\n            {\r\n                Execute.ShowDebugMessage(button.ActualWidth.ToString());\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/GroupsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.GroupsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n \r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.GroupsShort, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0,6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <TextBlock Text=\"{Binding Resources.GroupsDescription, Source={StaticResource Strings}}\" FontSize=\"23\" TextWrapping=\"Wrap\" Margin=\"12,18,12,0\"/>\r\n            <ItemsControl Grid.Row=\"1\" ItemsSource=\"{Binding MainRules}\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <RadioButton GroupName=\"LastSeenGroup\" IsChecked=\"{Binding IsChecked, Mode=OneTime}\" Checked=\"ToggleButton_OnChecked\" Content=\"{Binding}\"/>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n            </ItemsControl>\r\n            \r\n            <!--<toolkit:ListPicker\r\n                    Margin=\"12,10,12,0\"\r\n                    Header=\"{Binding Resources.GroupsDescription, Source={StaticResource Strings}}\"\r\n                    Grid.Row=\"2\"\r\n                    ItemsSource=\"{Binding MainRules}\"\r\n                    SelectedItem=\"{Binding SelectedMainRule, Mode=TwoWay}\"\r\n                    ExpansionMode=\"FullScreenOnly\"\r\n                    FullModeHeader=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                <toolkit:ListPicker.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Text=\"{Binding}\"/>\r\n                    </DataTemplate>\r\n                </toolkit:ListPicker.ItemTemplate>\r\n                <toolkit:ListPicker.FullModeItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                    </DataTemplate>\r\n                </toolkit:ListPicker.FullModeItemTemplate>\r\n            </toolkit:ListPicker>-->\r\n            <TextBlock Grid.Row=\"3\" Margin=\"12,23,12,28\" Text=\"{Binding Resources.GroupsImportantNote, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n            <Button Margin=\"-12,0,-12,0\" Grid.Row=\"6\" x:Name=\"OpenAllowUsers\" Visibility=\"{Binding AllowUsersVisibility}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                <StackPanel>\r\n                    <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.AlwaysShareWith, Source={StaticResource Strings}}\"/>\r\n                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding AllowUsersSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                </StackPanel>\r\n            </Button>\r\n\r\n            <Button Margin=\"-12,0,-12,0\" Grid.Row=\"5\" x:Name=\"OpenDisallowUsers\" Visibility=\"{Binding DisallowUsersVisibility}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                <StackPanel>\r\n                    <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.NeverShareWith, Source={StaticResource Strings}}\"/>\r\n                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding DisallowUsersSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                </StackPanel>\r\n            </Button>\r\n            <TextBlock Grid.Row=\"7\" Margin=\"12,23,12,0\" Text=\"{Binding Resources.GroupsSettingsOverrideNote, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/GroupsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class GroupsView\r\n    {\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public GroupsViewModel ViewModel\r\n        {\r\n            get { return DataContext as GroupsViewModel; }\r\n        }\r\n\r\n        public GroupsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                BuildLocalizedAppBar();\r\n            };\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_doneButton);\r\n            ApplicationBar.Buttons.Add(_cancelButton);\r\n        }\r\n\r\n        private void ToggleButton_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            var radioButton = sender as RadioButton;\r\n            if (radioButton != null)\r\n            {\r\n                var privacyRule = radioButton.DataContext as TLPrivacyRuleBase;\r\n                if (privacyRule != null)\r\n                {\r\n                    ViewModel.SelectedMainRule = privacyRule;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/InputMessageHint.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Additional.InputMessageHint\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <TextBlock x:Name=\"HintTextBlock\" TextAlignment=\"Center\" VerticalAlignment=\"Top\" TextWrapping=\"Wrap\" Margin=\"12,12\" Text=\"\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Additional/InputMessageHint.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class InputMessageHint\r\n    {\r\n        public static readonly DependencyProperty HintProperty = DependencyProperty.Register(\r\n            \"Hint\", typeof (string), typeof (InputMessageHint), new PropertyMetadata(OnHintChanged));\r\n\r\n        private static void OnHintChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as InputMessageHint;\r\n            if (control != null)\r\n            {\r\n                control._storyboard.Stop();\r\n                control.HintTextBlock.Text = (string) e.NewValue;\r\n                control._storyboard.Begin();\r\n            }\r\n        }\r\n\r\n        public string Hint\r\n        {\r\n            get { return (string) GetValue(HintProperty); }\r\n            set { SetValue(HintProperty, value); }\r\n        }\r\n\r\n        private readonly Storyboard _storyboard;\r\n\r\n        public InputMessageHint()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _storyboard = new Storyboard();\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 1.0 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(2.0), Value = 1.0 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(2.5), Value = 0.0 });\r\n            Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"Opacity\"));\r\n            _storyboard.Children.Add(opacityAnimation);\r\n            _storyboard.Completed += (sender, args) =>\r\n            {\r\n                RaiseClosed();\r\n            };\r\n        }\r\n\r\n        public InputMessageHint(bool useFadeIn)\r\n        {\r\n            InitializeComponent();\r\n\r\n            _storyboard = new Storyboard();\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            if (useFadeIn)\r\n            {\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(2.5), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(3.0), Value = 0.0 });\r\n            }\r\n            else\r\n            {\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(2.0), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(2.5), Value = 0.0 });\r\n            }\r\n            Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"Opacity\"));\r\n            _storyboard.Children.Add(opacityAnimation);\r\n            _storyboard.Completed += (sender, args) =>\r\n            {\r\n                RaiseClosed();\r\n            };\r\n        }\r\n\r\n        public event EventHandler Closed;\r\n\r\n        protected virtual void RaiseClosed()\r\n        {\r\n            EventHandler handler = Closed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Additional/LastSeenView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.LastSeenView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n \r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.LastSeenShort, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\">\r\n            <Grid x:Name=\"ContentPanel\" Margin=\"6,0,6,0\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <TextBlock Text=\"{Binding Resources.LastSeenDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" FontSize=\"23\" Margin=\"12,18,12,0\"/>\r\n                <ItemsControl Grid.Row=\"1\" ItemsSource=\"{Binding MainRules}\">\r\n                    <ItemsControl.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <RadioButton GroupName=\"LastSeenGroup\" IsChecked=\"{Binding IsChecked, Mode=OneTime}\" Checked=\"ToggleButton_OnChecked\" Content=\"{Binding}\"/>\r\n                        </DataTemplate>\r\n                    </ItemsControl.ItemTemplate>\r\n                </ItemsControl>\r\n\r\n                <!--<toolkit:ListPicker\r\n                            Margin=\"12,10,12,0\"\r\n                            Header=\"{Binding Resources.LastSeenDescription, Source={StaticResource Strings}}\"\r\n                            Grid.Row=\"2\"\r\n                            ItemsSource=\"{Binding MainRules}\"\r\n                            SelectedItem=\"{Binding SelectedMainRule, Mode=TwoWay}\"\r\n                            ExpansionMode=\"FullScreenOnly\"\r\n                            FullModeHeader=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                <toolkit:ListPicker.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Text=\"{Binding}\"/>\r\n                    </DataTemplate>\r\n                </toolkit:ListPicker.ItemTemplate>\r\n                <toolkit:ListPicker.FullModeItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                    </DataTemplate>\r\n                </toolkit:ListPicker.FullModeItemTemplate>\r\n            </toolkit:ListPicker>-->\r\n                <TextBlock Grid.Row=\"3\" Margin=\"12,23,12,38\" Text=\"{Binding Resources.LastSeenImportantNote, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" Grid.Row=\"6\" x:Name=\"OpenAllowUsers\" Visibility=\"{Binding AllowUsersVisibility}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.AlwaysShareWith, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding AllowUsersSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" Grid.Row=\"5\" x:Name=\"OpenDisallowUsers\" Visibility=\"{Binding DisallowUsersVisibility}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.NeverShareWith, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding DisallowUsersSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n                <TextBlock Grid.Row=\"7\" Margin=\"12,23,12,0\" Text=\"{Binding Resources.SettingsOverrideNote, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n            </Grid>\r\n        </ScrollViewer>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/LastSeenView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class LastSeenView\r\n    {\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public LastSeenViewModel ViewModel\r\n        {\r\n            get { return DataContext as LastSeenViewModel; }\r\n        }\r\n\r\n        public LastSeenView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                BuildLocalizedAppBar();\r\n            };\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_doneButton);\r\n            ApplicationBar.Buttons.Add(_cancelButton);\r\n        }\r\n\r\n        private void ToggleButton_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            var radioButton = sender as RadioButton;\r\n            if (radioButton != null)\r\n            {\r\n                var privacyRule = radioButton.DataContext as TLPrivacyRuleBase;\r\n                if (privacyRule != null)\r\n                {\r\n                    ViewModel.SelectedMainRule = privacyRule;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/LockscreenView.xaml",
    "content": "﻿<UserControl\r\n    x:Class=\"TelegramClient.Views.Additional.LockscreenView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n    <UserControl.Resources>\r\n        <ControlTemplate\r\n            x:Key=\"PhoneDisabledPasswordBoxTemplate\"\r\n            TargetType=\"PasswordBox\">\r\n            <Border\r\n                x:Name=\"ContentElement\"\r\n                BorderThickness=\"0\"\r\n                Margin=\"{StaticResource PhonePasswordBoxInnerMargin}\"\r\n                Padding=\"{TemplateBinding Padding}\" />\r\n        </ControlTemplate>\r\n        <Style x:Key=\"HiddenPasswordBoxStyle\" TargetType=\"PasswordBox\">\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\" />\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\" />\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneTextBoxBrush}\" />\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\" />\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n            <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\" />\r\n            <Setter Property=\"SelectionBackground\" Value=\"{StaticResource PhoneAccentBrush}\" />\r\n            <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneContrastBackgroundBrush}\" />\r\n            <Setter Property=\"Padding\" Value=\"2\" />\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"PasswordBox\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\" />\r\n                                    <VisualState x:Name=\"MouseOver\" />\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames\r\n                                                Storyboard.TargetProperty=\"Visibility\"\r\n                                                Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame\r\n                                                    KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames\r\n                                                Storyboard.TargetProperty=\"Visibility\"\r\n                                                Storyboard.TargetName=\"DisabledBorder\">\r\n                                                <DiscreteObjectKeyFrame\r\n                                                    KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\">\r\n                                        <Storyboard>\r\n                                            <!--<ObjectAnimationUsingKeyFrames\r\n                                                Storyboard.TargetProperty=\"Background\"\r\n                                                Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame\r\n                                                    KeyTime=\"0\"\r\n                                                    Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\" />\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames\r\n                                                Storyboard.TargetProperty=\"BorderBrush\"\r\n                                                Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame\r\n                                                    KeyTime=\"0\"\r\n                                                    Value=\"{StaticResource PhoneTextBoxEditBorderBrush}\" />\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unfocused\" />\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border\r\n                                x:Name=\"EnabledBorder\"\r\n                                BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                Background=\"{TemplateBinding Background}\"\r\n                                Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <Border\r\n                                    x:Name=\"ContentElement\"\r\n                                    HorizontalAlignment=\"Center\"\r\n                                    BorderThickness=\"0\"\r\n                                    Margin=\"{StaticResource PhonePasswordBoxInnerMargin}\"\r\n                                    Padding=\"{TemplateBinding Padding}\" />\r\n                            </Border>\r\n                            <Border\r\n                                x:Name=\"DisabledBorder\"\r\n                                BorderBrush=\"{StaticResource PhoneDisabledBrush}\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                Background=\"Transparent\"\r\n                                Margin=\"{StaticResource PhoneTouchTargetOverhang}\"\r\n                                Visibility=\"Collapsed\">\r\n                                <PasswordBox\r\n                                    x:Name=\"DisabledContent\"\r\n                                    HorizontalAlignment=\"Center\"\r\n                                    Background=\"Transparent\"\r\n                                    Foreground=\"{StaticResource PhoneDisabledBrush}\"\r\n                                    Password=\"{TemplateBinding Password}\"\r\n                                    PasswordChar=\"{TemplateBinding PasswordChar}\"\r\n                                    Template=\"{StaticResource PhoneDisabledPasswordBoxTemplate}\" />\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneBackgroundBrush}\">\r\n        <Image x:Name=\"BackgroundImage\" Opacity=\"1\" Margin=\"0,0,0,-74\" Source=\"{Binding StateService.CurrentBackground, Converter={StaticResource BackgroundImageConverter}, ConverterParameter=480}\" Stretch=\"UniformToFill\">\r\n            <!--<Image.RenderTransform>\r\n                <TranslateTransform Y=\"100\"/>\r\n            </Image.RenderTransform>-->\r\n            <!--<i:Interaction.Triggers>\r\n                <i:EventTrigger EventName=\"Loaded\">\r\n                    <eim:ControlStoryboardAction Storyboard=\"{StaticResource FadeInStoryboard}\"/>\r\n                </i:EventTrigger>\r\n            </i:Interaction.Triggers>-->\r\n        </Image>\r\n        <additional:NumericKeyboard x:Name=\"PinKeyboard\" VerticalAlignment=\"Bottom\" Input=\"{Binding ElementName=PasscodeNumeric}\">\r\n            <additional:NumericKeyboard.RenderTransform>\r\n                <TranslateTransform Y=\"72\"/>\r\n            </additional:NumericKeyboard.RenderTransform>\r\n        </additional:NumericKeyboard>\r\n\r\n        <Grid VerticalAlignment=\"Center\" CacheMode=\"BitmapCache\">\r\n            <Grid.RenderTransform>\r\n                <!--<TranslateTransform x:Name=\"PasscodeTransform\" Y=\"-114\"/>-->\r\n                <TranslateTransform x:Name=\"PasscodeTransform\"/>\r\n            </Grid.RenderTransform>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Image Width=\"100\" Margin=\"0,0,0,112\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Opacity=\"{Binding LogoOpacity}\" Source=\"{Binding EmptyDialogImageSource}\" Stretch=\"Uniform\">\r\n                <Image.RenderTransform>\r\n                    <TranslateTransform Y=\"8\"/>\r\n                </Image.RenderTransform>\r\n            </Image>\r\n            <Border Grid.Row=\"1\" x:Name=\"PasscodeBorder\" Height=\"82\" Background=\"{StaticResource PhoneChromeBrush}\" Opacity=\"1.0\">\r\n                <Grid>\r\n                    <PasswordBox CaretBrush=\"Transparent\" Visibility=\"Visible\" FontSize=\"28\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" Style=\"{StaticResource HiddenPasswordBoxStyle}\" x:Name=\"Passcode\" KeyDown=\"Passcode_OnKeyDown\" GotFocus=\"Passcode_OnGotFocus\" LostFocus=\"Passcode_OnLostFocus\" VerticalAlignment=\"Center\" Password=\"{Binding Passcode, Mode=TwoWay}\" HorizontalContentAlignment=\"Center\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Background=\"Transparent\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdatePasswordBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </PasswordBox>\r\n                    <Grid x:Name=\"PasscodeNumericPanel\" Visibility=\"Visible\">\r\n                        <TextBox InputScope=\"NumericPassword\" x:Name=\"PasscodeNumeric\" Foreground=\"Transparent\" MaxLength=\"4\" KeyDown=\"PasscodeNumeric_OnKeyDown\" TextChanged=\"PasscodeNumeric_OnTextChanged\" Style=\"{StaticResource HiddenTextBoxStyle}\" CaretBrush=\"Transparent\" VerticalAlignment=\"Center\" TextAlignment=\"Center\" GotFocus=\"Passcode_OnGotFocus\" LostFocus=\"Passcode_OnLostFocus\" Text=\"{Binding Passcode, Mode=TwoWay}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </TextBox>\r\n                        <Border x:Name=\"PasscodeNumberBorder\" Background=\"Transparent\" IsHitTestVisible=\"True\" Tap=\"UIElement_OnTap\"/>\r\n                        <TextBlock Text=\"{Binding Passcode, Mode=TwoWay, Converter={StaticResource MaskConverter}}\" FontSize=\"28\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Margin=\"0,-7,0,0\" IsHitTestVisible=\"False\" Style=\"{StaticResource PhoneTextSubtleStyle}\" />\r\n                        \r\n                    </Grid>\r\n\r\n                    <TextBlock x:Name=\"PasscodeHint\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Margin=\"0,-4,0,0\" IsHitTestVisible=\"False\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" Visibility=\"{Binding Password, ElementName=Passcode, Converter={StaticResource EmptyStringToVisibilityConverter}}\" FontSize=\"28\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" FontWeight=\"Normal\"  Text=\"{Binding Resources.EnterPasscode, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" />\r\n                </Grid>\r\n            </Border>\r\n            <Border x:Name=\"IncorrectPasscodeHint\" Visibility=\"Collapsed\" Grid.Row=\"1\" Height=\"82\" Background=\"White\">\r\n                <TextBlock Foreground=\"Black\" Margin=\"0,-4,0,0\" IsHitTestVisible=\"False\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"28\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" FontWeight=\"Normal\"  Text=\"{Binding Resources.IncorrectPasscode, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" />\r\n            </Border>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Additional/LockscreenView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Info;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class LockscreenView\r\n    {\r\n        public LockscreenViewModel ViewModel\r\n        {\r\n            get { return DataContext as LockscreenViewModel; }\r\n        }\r\n\r\n        public LockscreenView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            OptimizeFullHD();\r\n\r\n            //Windows.UI.ViewManagement.InputPane.GetForCurrentView().Showing += MainPage_Showing;\r\n            //Windows.UI.ViewManagement.InputPane.GetForCurrentView().Hiding += MainPage_Hiding;\r\n        }\r\n\r\n        public void OnPasscodeIncorrect(object sender, System.EventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                IncorrectPasscodeHint.Visibility = Visibility.Visible;\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(1.0), () =>\r\n                {\r\n                    IncorrectPasscodeHint.Visibility = Visibility.Collapsed;\r\n                });\r\n            });\r\n        }\r\n\r\n        private double _gotFocusTransformY = 0.0;\r\n\r\n        private const double TransformYDefault = -122.0;\r\n        private const double TransformY112 = -118;\r\n        private const double TransformY150 = -96;\r\n        private const double TransformY150Software = -118;\r\n        private const double TransformY6Inch = -20.0;\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n            var gotFocusTransformY = TransformYDefault;\r\n#if WP8\r\n            switch (Application.Current.Host.Content.ScaleFactor)\r\n            {\r\n                case 100:   //Lumia 820\r\n                    gotFocusTransformY = TransformYDefault;\r\n                    break;\r\n                case 112:   //Lumia 535\r\n                    gotFocusTransformY = TransformY112;\r\n                    break;\r\n                case 150:   //HTC 8X\r\n\r\n                    // Lumia 730 softwarebuttons\r\n                    var appBar = new ApplicationBar();\r\n                    if (appBar.DefaultSize == 67.0)\r\n                    {\r\n                        gotFocusTransformY = TransformY150Software;\r\n                        break;\r\n                    }\r\n\r\n                    gotFocusTransformY = TransformY150;\r\n                    break;\r\n                case 160:   //Lumia 925, 1020 (WXGA)\r\n                    gotFocusTransformY = TransformYDefault;\r\n                    break;\r\n                case 225:   // Lumia 1520, Lumia 930\r\n                    var deviceName = DeviceStatus.DeviceName;\r\n                    if (!string.IsNullOrEmpty(deviceName))\r\n                    {\r\n                        deviceName = deviceName.Replace(\"-\", string.Empty).ToLowerInvariant();\r\n\r\n                        //Lumia 1320, 1520\r\n                        if (//deviceName.StartsWith(\"rm934\")      // Lumia 1320\r\n                            //|| deviceName.StartsWith(\"rm935\")\r\n                            //|| deviceName.StartsWith(\"rm936\")\r\n                            deviceName.StartsWith(\"rm937\")   // Lumia 1520\r\n                            || deviceName.StartsWith(\"rm938\")\r\n                            || deviceName.StartsWith(\"rm939\")\r\n                            || deviceName.StartsWith(\"rm940\"))\r\n                        {\r\n                            var stateService = IoC.Get<IStateService>();\r\n\r\n                            if (LockscreenViewModel.IsSimple(stateService))\r\n                            {\r\n                                gotFocusTransformY = -88.0;\r\n                                break;\r\n                            }\r\n\r\n                            gotFocusTransformY = TransformY6Inch;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    // other FullHD\r\n                    gotFocusTransformY = TransformYDefault;\r\n                    break;\r\n            }\r\n#endif\r\n\r\n            _gotFocusTransformY = gotFocusTransformY;\r\n        }\r\n\r\n        public PhoneApplicationPage ParentPage { get; set; }\r\n\r\n        private void Passcode_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            if (ViewModel != null && ViewModel.Simple)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (ParentPage != null)\r\n            {\r\n                if (ParentPage.ApplicationBar != null)\r\n                {\r\n                    ParentPage.ApplicationBar.BackgroundColor = (Color) Application.Current.Resources[\"PhoneChromeColor\"];\r\n                }\r\n\r\n                Clipboard.SetText(string.Empty);\r\n\r\n                PasscodeBorder.Opacity = 1.0;\r\n                var storyboard = new Storyboard();\r\n                var translateYAnimation = new DoubleAnimation\r\n                {\r\n                    To = _gotFocusTransformY,\r\n                    Duration = TimeSpan.FromSeconds(0.25),\r\n                    EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut }\r\n                };\r\n\r\n                Storyboard.SetTarget(storyboard, PasscodeTransform);\r\n                Storyboard.SetTargetProperty(storyboard, new PropertyPath(\"Y\"));\r\n                storyboard.Children.Add(translateYAnimation);\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(storyboard.Begin);\r\n            }\r\n        }\r\n\r\n        private void Passcode_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            if (ViewModel != null && ViewModel.Simple)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (ParentPage != null && Visibility == Visibility.Visible)\r\n            {\r\n                var focusedElement = FocusManager.GetFocusedElement();\r\n                if (focusedElement == PasscodeNumberBorder || focusedElement == PasscodeNumeric)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                if (ParentPage.ApplicationBar != null)\r\n                {\r\n                    var color = ParentPage.ApplicationBar.BackgroundColor;\r\n                    color.A = 254;\r\n                    ParentPage.ApplicationBar.BackgroundColor = color;\r\n                }\r\n                PasscodeBorder.Opacity = 1.0;\r\n                var storyboard = new Storyboard();\r\n                var translateYAnimation = new DoubleAnimation\r\n                {\r\n                    To = 0.0,\r\n                    Duration = TimeSpan.FromSeconds(0.3),\r\n                    EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut }\r\n                };\r\n\r\n                Storyboard.SetTarget(storyboard, PasscodeTransform);\r\n                Storyboard.SetTargetProperty(storyboard, new PropertyPath(\"Y\"));\r\n                storyboard.Children.Add(translateYAnimation);\r\n\r\n                storyboard.Begin();\r\n                storyboard.Completed += OnLostFocusStoryboardCompleted;\r\n            }\r\n        }\r\n\r\n        private void OnLostFocusStoryboardCompleted(object sender, System.EventArgs e)\r\n        {\r\n            //return;\r\n\r\n            if (ParentPage.ApplicationBar != null\r\n                && ParentPage.ApplicationBar.BackgroundColor.A == 254)\r\n            {\r\n                ParentPage.ApplicationBar.BackgroundColor = Colors.Transparent;\r\n            }\r\n        }\r\n\r\n        public void FocusPasscode()\r\n        {\r\n            PasscodeTransform.Y = 0.0;\r\n            OptimizeFullHD();\r\n            if (ViewModel.Simple)\r\n            {\r\n                PasscodeTransform.Y = _gotFocusTransformY;\r\n                PinKeyboard.Visibility = Visibility.Visible;\r\n                Passcode.Visibility = Visibility.Collapsed;\r\n                PasscodeNumericPanel.Visibility = Visibility.Visible;\r\n                //Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.5), () => PasscodeNumeric.Focus());\r\n            }\r\n            else\r\n            {\r\n                PinKeyboard.Visibility = Visibility.Collapsed;\r\n                Passcode.Visibility = Visibility.Visible;\r\n                PasscodeNumericPanel.Visibility = Visibility.Collapsed;\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(1.0), () => Passcode.Focus());\r\n                //Passcode.Focus();\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (ViewModel != null && ViewModel.Simple)\r\n            {\r\n                return;\r\n            }\r\n\r\n            PasscodeNumeric.Focus();\r\n        }\r\n\r\n        private void PasscodeNumeric_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key >= Key.D0 && e.Key <= Key.D9 || e.Key == Key.Back)\r\n            {\r\n                if (IncorrectPasscodeHint.Visibility == Visibility.Visible)\r\n                {\r\n                    IncorrectPasscodeHint.Visibility = Visibility.Collapsed;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                e.Handled = true;\r\n            }\r\n        }\r\n\r\n        private void Passcode_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                if (!string.IsNullOrEmpty(ViewModel.Passcode))\r\n                {\r\n                    ViewModel.Done();\r\n                }\r\n            }\r\n\r\n            if (IncorrectPasscodeHint.Visibility == Visibility.Visible)\r\n            {\r\n                IncorrectPasscodeHint.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        private void PasscodeNumeric_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            if (IncorrectPasscodeHint.Visibility == Visibility.Visible)\r\n            {\r\n                IncorrectPasscodeHint.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/MasksView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.MasksView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:reorderListBox=\"clr-namespace:ReorderListBox;assembly=Telegram.Controls\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"ForwardTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"SetItemTemplate\">\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                <controls1:StickerSetControl/>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n\r\n        <Style x:Key=\"ScrollViewerStyle\" TargetType=\"ScrollViewer\">\r\n            <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n            <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Padding\" Value=\"0\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"ScrollViewer\">\r\n                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                    </VisualStateGroup.Transitions>\r\n                                    <VisualState x:Name=\"Scrolling\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n                                            <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalScrollBar\"/>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"NotScrolling\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Grid Margin=\"{TemplateBinding Padding}\">\r\n                                <Grid.RenderTransform>\r\n                                    <TranslateTransform X=\"64\"/>\r\n                                </Grid.RenderTransform>\r\n                                <ScrollContentPresenter x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\"/>\r\n                                <ScrollBar x:Name=\"VerticalScrollBar\" HorizontalAlignment=\"Right\" Height=\"Auto\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Vertical\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{TemplateBinding VerticalOffset}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" VerticalAlignment=\"Stretch\" Width=\"5\"/>\r\n                                <ScrollBar x:Name=\"HorizontalScrollBar\" HorizontalAlignment=\"Stretch\" Height=\"5\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Horizontal\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{TemplateBinding HorizontalOffset}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" VerticalAlignment=\"Bottom\" Width=\"Auto\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"ReorderListBoxStyle\" TargetType=\"reorderListBox:ReorderListBox\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n            <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Padding\" Value=\"0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"reorderListBox:ReorderListBox\">\r\n                        <Grid>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <ScrollViewer x:Name=\"ScrollViewer\" Background=\"{TemplateBinding Background}\" Grid.Column=\"0\" Foreground=\"{TemplateBinding Foreground}\" Padding=\"{TemplateBinding Padding}\" Style=\"{StaticResource ScrollViewerStyle}\">\r\n                                <StackPanel>\r\n                                    <ContentPresenter ContentTemplate=\"{TemplateBinding HeaderTemplate}\"/>\r\n                                    <ItemsPresenter/>\r\n                                    <ContentPresenter ContentTemplate=\"{TemplateBinding FooterTemplate}\"/>\r\n                                </StackPanel>\r\n                            </ScrollViewer>\r\n                            <Canvas x:Name=\"DragInterceptor\" Background=\"Transparent\" Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"Stretch\" Width=\"64\">\r\n                                <Image x:Name=\"DragIndicator\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\">\r\n                                    <Image.RenderTransform>\r\n                                        <TranslateTransform/>\r\n                                    </Image.RenderTransform>\r\n                                </Image>\r\n                            </Canvas>\r\n                            <Canvas x:Name=\"RearrangeCanvas\" Background=\"Transparent\" Grid.ColumnSpan=\"2\" Margin=\"{TemplateBinding Padding}\" Visibility=\"Collapsed\"/>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        \r\n        <Style x:Key=\"ListBoxItemStyle1\" TargetType=\"reorderListBox:ReorderListBoxItem\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\" />\r\n            <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n            <Setter Property=\"Padding\" Value=\"0\" />\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n            <Setter Property=\"CacheMode\" Value=\"BitmapCache\"/>\r\n            <Setter Property=\"DragHandleTemplate\">\r\n                <Setter.Value>\r\n                    <DataTemplate>\r\n                        <Grid Background=\"Transparent\">\r\n                            <Image Stretch=\"Uniform\" Width=\"40\" Margin=\"0,0,24,0\" Source=\"/Images/Messages/movestickerpack.png\"/>\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"reorderListBox:ReorderListBoxItem\">\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid x:Name=\"DropBeforeSpace\" Grid.Row=\"0\" Height=\"0\"/>\r\n                            <Grid x:Name=\"DropAfterSpace\" Grid.Row=\"2\" Height=\"0\"/>\r\n                            <Grid Grid.Row=\"1\">\r\n                                <Border x:Name=\"Background\" Background=\"{StaticResource PhoneAccentBrush}\" Opacity=\"0\"/>\r\n                                <Border \r\n                                    x:Name=\"LayoutRoot\"\r\n                                    CacheMode=\"BitmapCache\"\r\n                                    Background=\"{TemplateBinding Background}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"\r\n                                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                    BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                                    <Grid Background=\"Transparent\" Margin=\"{TemplateBinding Padding}\">\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition Width=\"*\" />\r\n                                            <ColumnDefinition Width=\"Auto\" />\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <ContentControl x:Name=\"ContentContainer\"\r\n                                        Grid.Column=\"0\"\r\n                                        HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                        VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                        Content=\"{TemplateBinding Content}\"\r\n                                        ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                        Foreground=\"{TemplateBinding Foreground}\" />\r\n                                        <Grid x:Name=\"HandleContainer\" Grid.Column=\"1\">\r\n                                            <ContentPresenter\r\n                                            x:Name=\"DragHandle\"\r\n                                            VerticalAlignment=\"Stretch\"\r\n                                            ContentTemplate=\"{TemplateBinding DragHandleTemplate}\" />\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Grid>\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\" />\r\n                                    <VisualState x:Name=\"MouseOver\" />\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"Background\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TransparentBrush}\" />\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"ContentContainer\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".5\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                    <VisualState x:Name=\"Unselected\" />\r\n                                    <VisualState x:Name=\"Selected\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ContentContainer\" Storyboard.TargetProperty=\"Foreground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\" />\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"ReorderEnabledStates\">\r\n                                    <VisualState x:Name=\"ReorderDisabled\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DragHandle\" Storyboard.TargetProperty=\"Width\" To=\"0\" Duration=\"0\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"ReorderEnabled\" />\r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition From=\"ReorderDisabled\" To=\"ReorderEnabled\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DragHandle\" Storyboard.TargetProperty=\"Width\" To=\"52\" Duration=\"0:0:0.4\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"ReorderEnabled\" To=\"ReorderDisabled\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DragHandle\" Storyboard.TargetProperty=\"Width\" To=\"0\" Duration=\"0:0:0.4\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                    </VisualStateGroup.Transitions>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"DraggingStates\">\r\n                                    <VisualState x:Name=\"NotDragging\" />\r\n                                    <VisualState x:Name=\"Dragging\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\"0.9\" Duration=\"0\" />\r\n                                            <DoubleAnimation Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"Opacity\" To=\"0.9\" Duration=\"0\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition To=\"NotDragging\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                                <DoubleAnimation Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"Opacity\" From=\"0.9\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition To=\"Dragging\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\"0.9\" Duration=\"0:0:0.2\" />\r\n                                                <DoubleAnimation Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"Opacity\" To=\"0.9\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                    </VisualStateGroup.Transitions>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"DropIndicatorStates\">\r\n                                    <VisualState x:Name=\"NoDropIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0\" />\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"DropBeforeIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0\" />\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"DropAfterIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0\" />\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    \r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition From=\"NoDropIndicator\" To=\"DropBeforeIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"NoDropIndicator\" To=\"DropAfterIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"DropBeforeIndicator\" To=\"NoDropIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"DropAfterIndicator\" To=\"NoDropIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"DropBeforeIndicator\" To=\"DropAfterIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"DropAfterIndicator\" To=\"DropBeforeIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0:0:0.2\" />\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                    </VisualStateGroup.Transitions>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Masks, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        \r\n        <reorderListBox:ReorderListBox\r\n            Grid.Row=\"1\"\r\n            x:Name=\"Items\"\r\n            Margin=\"-70,0,0,0\"\r\n            ItemsSource=\"{Binding Items}\" \r\n            IsReorderEnabled=\"True\" Style=\"{StaticResource ReorderListBoxStyle}\" \r\n            ItemContainerStyle=\"{StaticResource ListBoxItemStyle1}\">\r\n            <ListBox.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Grid Background=\"Transparent\" Tap=\"StickerSet_OnTap\" toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                        <Grid.CacheMode>\r\n                            <BitmapCache RenderAtScale=\"2.0\"/>\r\n                        </Grid.CacheMode>\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Opened=\"ContextMenu_OnOpened\">\r\n                                <!--<toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Archive($DataContext)]\" Header=\"{Binding Resources.Archive, Source={StaticResource Strings}}\"/>-->\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Remove($DataContext)]\" Loaded=\"Remove_OnLoaded\" Header=\"{Binding Resources.Remove, Source={StaticResource Strings}}\"/>\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Share($DataContext)]\" Header=\"{Binding Resources.Share, Source={StaticResource Strings}}\"/>\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [CopyLink($DataContext)]\" Header=\"{Binding Resources.CopyLink, Source={StaticResource Strings}}\"/>\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                        <controls1:StickerSetControl/>\r\n                        <!--<ContentControl HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" Content=\"{Binding}\" ContentTemplate=\"{StaticResource SetItemTemplate}\"/>-->\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </ListBox.ItemTemplate>\r\n            <reorderListBox:ReorderListBox.FooterTemplate>\r\n                <DataTemplate>\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition/>\r\n                            <RowDefinition/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Margin=\"24,12,18,0\" Text=\"{Binding DataContext.Status, ElementName=Self}\" Visibility=\"{Binding DataContext.Status, ElementName=Self, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                        <!--<TextBlock Grid.Row=\"1\" Margin=\"24,43,24,43\" Text=\"{Binding Resources.StickersHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" TextAlignment=\"Center\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n                        <RichTextBox Grid.Row=\"1\" Margin=\"12,43,12,43\" TextWrapping=\"Wrap\" chats:ConvertToSupergroupView.FormattedLinkedText=\"{Binding Resources.MasksHint, Source={StaticResource Strings}}\" TextAlignment=\"Left\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </reorderListBox:ReorderListBox.FooterTemplate>\r\n            <ListBox.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <StackPanel/>\r\n                </ItemsPanelTemplate>\r\n            </ListBox.ItemsPanel>\r\n        </reorderListBox:ReorderListBox>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/MasksView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Caliburn.Micro;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.VirtualizedView;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing Telegram.EmojiPanel.Controls.Utilites;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Dialogs;\r\nusing TelegramClient.Views.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class MasksView\r\n    {\r\n        public MasksViewModel ViewModel\r\n        {\r\n            get { return DataContext as MasksViewModel; }\r\n        }\r\n\r\n        public MasksView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void StickerSet_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            //return;\r\n            OpenStickerSet(sender, e);\r\n        }\r\n\r\n        private void OpenStickerSet(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var stickerSet = element.DataContext as TLStickerSet;\r\n            if (stickerSet == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n                ShowStickerSetMessageBox(false, true, stickerSet, prompt =>\r\n                {\r\n                    if (prompt == PopUpResult.Ok)\r\n                    {\r\n                        ViewModel.Remove(stickerSet);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private void Remove_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = (MenuItem) sender;\r\n            if (menuItem != null)\r\n            {\r\n                var stickerSet = menuItem.DataContext as TLStickerSet32;\r\n                if (stickerSet != null)\r\n                {\r\n                    menuItem.Visibility = stickerSet.Official && ! stickerSet.Masks\r\n                        ? Visibility.Collapsed\r\n                        : Visibility.Visible;\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private void ForwardTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_once)\r\n            {\r\n                _once = true;\r\n                ViewModel.ForwardInAnimationComplete();\r\n            }\r\n            //var journalEntry = NavigationService.BackStack.FirstOrDefault();\r\n            //if (journalEntry != null && journalEntry.Source != null)\r\n            //{\r\n                \r\n            //}\r\n        }\r\n\r\n        private void ContextMenu_OnOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.ReorderStickerSets();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/MassDeleteReportSpamView.xaml",
    "content": "﻿<UserControl\r\n    x:Class=\"TelegramClient.Views.Additional.MassDeleteReportSpamView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"False\" d:DesignHeight=\"800\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"ContentPanel\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <ItemsControl Margin=\"0,0,0,0\">\r\n            <CheckBox IsChecked=\"{Binding DeleteMessages, Mode=TwoWay}\" Background=\"Transparent\" Content=\"{Binding Resources.DeleteMessages, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n            <CheckBox IsChecked=\"{Binding BanUser, Mode=TwoWay}\" Background=\"Transparent\" Content=\"{Binding Resources.BanUser, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n            <CheckBox IsChecked=\"{Binding ReportSpam, Mode=TwoWay}\" Background=\"Transparent\" Content=\"{Binding Resources.ReportSpam, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n            <CheckBox IsChecked=\"{Binding DeleteAllMessages, Mode=TwoWay}\" Background=\"Transparent\" Content=\"{Binding DeleteAllFromString}\"/>\r\n        </ItemsControl>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Additional/MassDeleteReportSpamView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class MassDeleteReportSpamView\r\n    {\r\n        public MassDeleteReportSpamView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/NotificationsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.NotificationsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:toolkitPrimitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    micro:Message.Attach=\"[Event BackKeyPress] = [Action OnBackKeyPress]\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n    \r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"SoundItemTemplate\">\r\n                <TextBlock Text=\"{Binding }\"/>\r\n            </DataTemplate>\r\n            <DataTemplate x:Key=\"SoundFullModeTemplate\">\r\n                <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        \r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.Notifications, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\" Margin=\"0,-6,0,0\">\r\n            <Grid x:Name=\"ContentPanel\" Margin=\"6,0,6,0\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <StackPanel Grid.Row=\"0\">\r\n                    <TextBlock Margin=\"12,12,-6,24\" FontSize=\"35\" Text=\"{Binding Resources.MessageNotifications, Source={StaticResource Strings}}\"/>\r\n                    <toolkit:ToggleSwitch Margin=\"0,0,-24,0\" IsChecked=\"{Binding Settings.ContactAlert, Mode=TwoWay}\" Header=\"{Binding Resources.Alert, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.OnMasculine, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.OffMasculine, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n\r\n                    <toolkit:ToggleSwitch Margin=\"0,0,-24,0\" IsChecked=\"{Binding Settings.ContactMessagePreview, Mode=TwoWay}\" Header=\"{Binding Resources.MessagePreview, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.OnMasculine, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.OffMasculine, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n\r\n                    <toolkit:ListPicker\r\n                        x:Name=\"ContactSound\"\r\n                        Header=\"{Binding Resources.Sound, Source={StaticResource Strings}}\"\r\n                        Background=\"{StaticResource PhoneBackgroundBrush}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" BorderThickness=\"{StaticResource PhoneBorderThickness}\" BorderBrush=\"{StaticResource PhoneBorderBrush}\"\r\n                        Margin=\"12,0,12,0\"\r\n                        ItemsSource=\"{Binding StateService.Sounds}\"\r\n                        SelectedItem=\"{Binding Settings.ContactSound, Mode=TwoWay}\"\r\n                        ItemTemplate=\"{StaticResource SoundItemTemplate}\"\r\n                        FullModeItemTemplate=\"{StaticResource SoundFullModeTemplate}\" />\r\n                </StackPanel>\r\n                \r\n                <StackPanel Grid.Row=\"1\">\r\n                    <TextBlock Margin=\"12,40,-6,24\" FontSize=\"35\" Text=\"{Binding Resources.GroupNotifications, Source={StaticResource Strings}}\"/>\r\n                    <toolkit:ToggleSwitch Margin=\"0,0,-24,0\" IsChecked=\"{Binding Settings.GroupAlert, Mode=TwoWay}\" Header=\"{Binding Resources.Alert, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.OnMasculine, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.OffMasculine, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n\r\n                    <toolkit:ToggleSwitch Margin=\"0,0,-24,0\" IsChecked=\"{Binding Settings.GroupMessagePreview, Mode=TwoWay}\" Header=\"{Binding Resources.MessagePreview, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.OnMasculine, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.OffMasculine, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n\r\n                    <toolkit:ListPicker\r\n                        Margin=\"12,0,12,0\"\r\n                        ItemsSource=\"{Binding StateService.Sounds}\"\r\n                        Header=\"{Binding Resources.Sound, Source={StaticResource Strings}}\"\r\n                        SelectedItem=\"{Binding Settings.GroupSound, Mode=TwoWay}\"\r\n                        ItemTemplate=\"{StaticResource SoundItemTemplate}\"\r\n                        FullModeItemTemplate=\"{StaticResource SoundFullModeTemplate}\" />\r\n                </StackPanel>\r\n\r\n                <StackPanel Grid.Row=\"2\">\r\n                    <TextBlock Margin=\"12,40,-6,24\" FontSize=\"35\" Text=\"{Binding Resources.InAppNotifications, Source={StaticResource Strings}}\"/>\r\n                    <toolkit:ToggleSwitch Margin=\"0,0,-24,0\" IsChecked=\"{Binding Settings.InAppSound, Mode=TwoWay}\" Header=\"{Binding Resources.InAppSounds, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.OnMasculine, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.OffMasculine, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n\r\n                    <toolkit:ToggleSwitch Margin=\"0,0,-24,0\" IsChecked=\"{Binding Settings.InAppVibration, Mode=TwoWay}\" Header=\"{Binding Resources.InAppVibrate, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.OnFeminine, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.OffFeminine, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n\r\n                    <toolkit:ToggleSwitch Margin=\"0,0,-24,0\" IsChecked=\"{Binding Settings.InAppMessagePreview, Mode=TwoWay}\" Header=\"{Binding Resources.InAppPreview, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.OnMasculine, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.OffMasculine, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n                </StackPanel>\r\n\r\n                <StackPanel Grid.Row=\"3\">\r\n                    <TextBlock Margin=\"12,16,-6,24\" FontSize=\"35\" Text=\"{Binding Resources.Events, Source={StaticResource Strings}}\"/>\r\n                    <toolkit:ToggleSwitch Margin=\"0,0,-24,0\" IsChecked=\"{Binding Settings.ContactJoined, Mode=TwoWay}\" Header=\"{Binding Resources.ContactJoinedTelegram, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n                </StackPanel>\r\n\r\n                <Button Grid.Row=\"4\" x:Name=\"Reset\" Margin=\"0,16,0,0\">\r\n                    <StackPanel>\r\n                        <TextBlock Text=\"{Binding Resources.ResetAllNotifications, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"0,-2,0,7\" Foreground=\"#999999\" Text=\"{Binding Resources.ResetAllNotificationsSubtitle, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n            </Grid>\r\n        </ScrollViewer>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/NotificationsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class NotificationsView\r\n    {\r\n        public NotificationsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/NumericKeyboard.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Additional.NumericKeyboard\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"Self\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <SolidColorBrush x:Key=\"ButtonBackground\" Color=\"#FF474747\"/>\r\n            <SolidColorBrush x:Key=\"ButtonLightBackground\" Color=\"White\"/>\r\n            \r\n            <Style x:Key=\"ButtonStyle\" TargetType=\"Border\">\r\n                <Setter Property=\"Width\" Value=\"152\"/>\r\n                <Setter Property=\"Height\" Value=\"78\"/>\r\n                <Setter Property=\"Margin\" Value=\"3\"/>\r\n                <Setter Property=\"Background\" Value=\"{StaticResource ButtonBackground}\"/>\r\n            </Style>\r\n\r\n            <Style x:Key=\"ButtonTextStyle\" TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextExtraLargeStyle}\">\r\n                <Setter Property=\"Margin\" Value=\"0,-6,0,0\"/>\r\n                <Setter Property=\"HorizontalAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"VerticalAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid VerticalAlignment=\"Bottom\" Margin=\"0,4,0,72\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Border x:Name=\"Button1\" Grid.Row=\"0\" Grid.Column=\"0\" Tag=\"1\" Style=\"{StaticResource ButtonStyle}\" >\r\n                <TextBlock Margin=\"-2,-6,0,0\" Text=\"1\" Style=\"{StaticResource ButtonTextStyle}\"/>\r\n            </Border>\r\n            <Border x:Name=\"Button2\" Grid.Row=\"0\" Grid.Column=\"1\" Tag=\"2\" Width=\"157\" Style=\"{StaticResource ButtonStyle}\" >\r\n                <TextBlock Text=\"2\" Style=\"{StaticResource ButtonTextStyle}\"/>\r\n            </Border>\r\n            <Border x:Name=\"Button3\" Grid.Row=\"0\" Grid.Column=\"2\" Tag=\"3\" Width=\"153\" Style=\"{StaticResource ButtonStyle}\" >\r\n                <TextBlock Text=\"3\" Style=\"{StaticResource ButtonTextStyle}\"/>\r\n            </Border>\r\n\r\n            <Border x:Name=\"Button4\" Grid.Row=\"1\" Grid.Column=\"0\" Tag=\"4\" Style=\"{StaticResource ButtonStyle}\" >\r\n                <TextBlock Text=\"4\" Style=\"{StaticResource ButtonTextStyle}\"/>\r\n            </Border>\r\n            <Border x:Name=\"Button5\" Grid.Row=\"1\" Grid.Column=\"1\" Tag=\"5\" Width=\"157\" Style=\"{StaticResource ButtonStyle}\" >\r\n                <TextBlock Text=\"5\" Style=\"{StaticResource ButtonTextStyle}\"/>\r\n            </Border>\r\n            <Border x:Name=\"Button6\" Grid.Row=\"1\" Grid.Column=\"2\" Tag=\"6\" Width=\"153\" Style=\"{StaticResource ButtonStyle}\">\r\n                <TextBlock Text=\"6\" Style=\"{StaticResource ButtonTextStyle}\"/>\r\n            </Border>\r\n\r\n            <Border x:Name=\"Button7\" Grid.Row=\"2\" Grid.Column=\"0\" Tag=\"7\" Style=\"{StaticResource ButtonStyle}\">\r\n                <TextBlock Text=\"7\" Style=\"{StaticResource ButtonTextStyle}\"/>\r\n            </Border>\r\n            <Border x:Name=\"Button8\" Grid.Row=\"2\" Grid.Column=\"1\" Tag=\"8\" Width=\"157\" Style=\"{StaticResource ButtonStyle}\">\r\n                <TextBlock Text=\"8\" Style=\"{StaticResource ButtonTextStyle}\"/>\r\n            </Border>\r\n            <Border x:Name=\"Button9\" Grid.Row=\"2\" Grid.Column=\"2\" Tag=\"9\" Width=\"153\" Style=\"{StaticResource ButtonStyle}\">\r\n                <TextBlock Text=\"9\" Style=\"{StaticResource ButtonTextStyle}\"/>\r\n            </Border>\r\n\r\n            <Border x:Name=\"Button\" Grid.Row=\"3\" Grid.Column=\"0\" Style=\"{StaticResource ButtonStyle}\">\r\n                <TextBlock Margin=\"-2,-6,0,0\" Text=\"\" Style=\"{StaticResource ButtonTextStyle}\"/>\r\n            </Border>\r\n            <Border x:Name=\"Button0\" Grid.Row=\"3\" Grid.Column=\"1\" Tag=\"0\" Width=\"157\" Style=\"{StaticResource ButtonStyle}\">\r\n                <TextBlock Text=\"0\" Style=\"{StaticResource ButtonTextStyle}\"/>\r\n            </Border>\r\n            <Border x:Name=\"ButtonBack\" Grid.Row=\"3\" Grid.Column=\"2\" Tag=\"9\" Width=\"153\" Style=\"{StaticResource ButtonStyle}\">\r\n                <Image Source=\"{Binding BackButtonImageSource, ElementName=Self}\" Width=\"48\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n            </Border>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Additional/NumericKeyboard.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Threading;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class NumericKeyboard\r\n    {\r\n        public Uri BackButtonImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                return isLightTheme\r\n                    ? new Uri(\"/Images/NumericKeyboard/back.white.png\", UriKind.Relative)\r\n                    : new Uri(\"/Images/NumericKeyboard/back.png\", UriKind.Relative);\r\n            }\r\n        }\r\n\r\n        private readonly IList<Border> _buttons = new List<Border>();\r\n\r\n        public NumericKeyboard()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _buttons.Add(Button0);\r\n            _buttons.Add(Button1);\r\n            _buttons.Add(Button2);\r\n            _buttons.Add(Button3);\r\n            _buttons.Add(Button4);\r\n            _buttons.Add(Button5);\r\n            _buttons.Add(Button6);\r\n            _buttons.Add(Button7);\r\n            _buttons.Add(Button8);\r\n            _buttons.Add(Button9);\r\n\r\n            SetButtons();\r\n            \r\n            _timer.Interval = TimeSpan.FromSeconds(0.15);\r\n            _timer.Tick += OnTimerTick;\r\n        }\r\n\r\n        private void SetButtons()\r\n        {\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            var background = isLightTheme ? (Brush)Resources[\"ButtonLightBackground\"] : (Brush)Resources[\"ButtonBackground\"];\r\n\r\n            foreach (var button in _buttons)\r\n            {\r\n                button.Background = background;\r\n                button.MouseLeftButtonUp += UIElement_OnMouseLeftButtonUp;\r\n                button.MouseEnter += UIElement_OnMouseEnter;\r\n                button.MouseLeave += UIElement_OnMouseLeave;\r\n            }\r\n\r\n            Button.Background = background;\r\n            ButtonBack.Background = background;\r\n            ButtonBack.MouseLeftButtonDown += ButtonBack_OnMouseLeftButtonDown;\r\n            ButtonBack.MouseEnter += UIElement_OnMouseEnter;\r\n            ButtonBack.MouseLeave += ButtonBack_OnMouseLeave;\r\n            ButtonBack.MouseLeftButtonUp += ButtonBack_OnMouseLeftButtonUp;\r\n        }\r\n\r\n        private void ButtonBack_OnMouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            _timer.Stop();\r\n\r\n            var border = sender as Border;\r\n            if (border != null)\r\n            {\r\n                border.Background = _normalBrush;\r\n            }\r\n        }\r\n\r\n        private void ButtonBack_OnMouseLeftButtonDown(object sender, MouseEventArgs e)\r\n        {\r\n            OnTimerTick(sender, e);\r\n            _timer.Start();\r\n        }\r\n\r\n        private void ButtonBack_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            _timer.Stop();\r\n        }\r\n\r\n        private void OnTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            if (Input != null)\r\n            {\r\n                var length = Input.Text.Length;\r\n                Input.Text = Input.Text.Substring(0, Math.Max(0, length - 1));\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty InputProperty = DependencyProperty.Register(\r\n            \"Input\", typeof (TextBox), typeof (NumericKeyboard), new PropertyMetadata(default(TextBox)));\r\n\r\n        public TextBox Input\r\n        {\r\n            get { return (TextBox) GetValue(InputProperty); }\r\n            set { SetValue(InputProperty, value); }\r\n        }\r\n\r\n        private Brush _normalBrush;\r\n\r\n        private readonly DispatcherTimer _timer = new DispatcherTimer();\r\n\r\n        private void UIElement_OnMouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            var border = sender as Border;\r\n            if (border != null)\r\n            {\r\n                _normalBrush = border.Background;\r\n                border.Background = (Brush)Application.Current.Resources[\"PhoneAccentBrush\"];\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnMouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            var border = sender as Border;\r\n            if (border != null)\r\n            {\r\n                border.Background = _normalBrush;\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs mouseButtonEventArgs)\r\n        {\r\n            var border = sender as Border;\r\n            if (border != null)\r\n            {\r\n                border.Background = _normalBrush;\r\n\r\n                var tag = border.Tag;\r\n                if (tag != null && Input != null)\r\n                {\r\n                    Input.Text += tag.ToString();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Additional/PasscodeView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.PasscodeView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Passcode, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <toolkit:ToggleSwitch Margin=\"0,18,-29,-21\" Grid.Row=\"0\" IsChecked=\"{Binding PasscodeEnabled, Mode=TwoWay}\" Header=\"{Binding Resources.Passcode, Source={StaticResource Strings}}\">\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                </i:Interaction.Behaviors>\r\n            </toolkit:ToggleSwitch>\r\n            <TextBlock Grid.Row=\"1\" Margin=\"12,11,12,0\" Text=\"{Binding Resources.ChangePasscodeHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n            <Grid Grid.Row=\"2\" Visibility=\"{Binding PasscodeEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Button Grid.Row=\"0\" Margin=\"0,22,0,0\" x:Name=\"ChangePasscode\" Padding=\"12,2,12,6 \" HorizontalAlignment=\"Left\" Content=\"{Binding Resources.ChangePasscode, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n\r\n                <StackPanel Grid.Row=\"1\" Margin=\"0,24,0,0\">\r\n                    <toolkit:ListPicker\r\n                        ExpansionMode=\"FullScreenOnly\"\r\n                        Header=\"{Binding Resources.Autolock, Source={StaticResource Strings}}\"\r\n                        Margin=\"12,-10,12,0\"\r\n                        ItemsSource=\"{Binding AutolockSpans}\"\r\n                        SelectedItem=\"{Binding SelectedAutolockSpan, Mode=TwoWay}\"\r\n                        FullModeHeader=\"{Binding Resources.Autolock, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                        <toolkit:ListPicker.ItemTemplate>\r\n                            <DataTemplate>\r\n                                <TextBlock Text=\"{Binding Description, Converter={StaticResource Lowercase}}\"/>\r\n                            </DataTemplate>\r\n                        </toolkit:ListPicker.ItemTemplate>\r\n                        <toolkit:ListPicker.FullModeItemTemplate>\r\n                            <DataTemplate>\r\n                                <TextBlock Margin=\"0,12\" Text=\"{Binding Description, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                            </DataTemplate>\r\n                        </toolkit:ListPicker.FullModeItemTemplate>\r\n                    </toolkit:ListPicker>\r\n                </StackPanel>\r\n                <TextBlock Grid.Row=\"2\" Margin=\"12,11,12,0\" Text=\"{Binding Resources.PasscodeAutolockHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n\r\n                <!--<toolkit:ToggleSwitch Margin=\"0,37,-29,-21\" Grid.Row=\"1\" IsChecked=\"{Binding StateService.IsSimplePasscode, Mode=TwoWay}\" Header=\"{Binding Resources.SimplePasscode, Source={StaticResource Strings}}\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                    </i:Interaction.Behaviors>\r\n                </toolkit:ToggleSwitch>\r\n                <TextBlock Grid.Row=\"2\" Margin=\"12,43,12,0\" Text=\"{Binding Resources.SimplePasscodeHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n            </Grid>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/PasscodeView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class PasscodeView\r\n    {\r\n        public PasscodeView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/PasswordRecoveryView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.PasswordRecoveryView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls2=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.PasswordRecovery, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"*\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <StackPanel Grid.Row=\"0\" Grid.ColumnSpan=\"2\">\r\n                <TextBlock Text=\"{Binding Resources.Code, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,18,12,-5\"/>\r\n                <controls2:LabeledTextBox \r\n                    x:Name=\"CodeLabel\"\r\n                    InputScope=\"Number\"\r\n                    MaxLength=\"6\"\r\n                    Label=\"\" \r\n                    Text=\"{Binding Code, Mode=TwoWay}\"\r\n                    Error=\"{Binding Error}\"\r\n                    KeyDown=\"Text_OnKeyDown\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </controls2:LabeledTextBox>\r\n                <TextBlock Margin=\"12,18,12,0\" Text=\"{Binding PasswordRecoveryHint}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            </StackPanel>\r\n\r\n            <Button Grid.Row=\"1\" Margin=\"0,22,0,0\" x:Name=\"RecoverPassword\" Padding=\"12,2,12,6\" Content=\"{Binding Resources.Done, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n\r\n            <RichTextBox Grid.Row=\"2\" Grid.ColumnSpan=\"2\" Margin=\"0,22,0,0\" >\r\n                <Paragraph>\r\n                    <Hyperlink Click=\"Hyperlink_OnClick\" FontSize=\"{StaticResource PhoneFontSizeMedium}\">\r\n                        <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding HavingTroubleHint}\"/>\r\n                    </Hyperlink>\r\n                </Paragraph>\r\n            </RichTextBox>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/PasswordRecoveryView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class PasswordRecoveryView\r\n    {\r\n        public PasswordRecoveryViewModel ViewModel\r\n        {\r\n            get { return DataContext as PasswordRecoveryViewModel; }\r\n        }\r\n\r\n        public PasswordRecoveryView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) => CodeLabel.Focus();\r\n        }\r\n\r\n        private void Text_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.RecoverPassword();\r\n            }\r\n            else if (e.Key >= Key.D0 && e.Key <= Key.D9)\r\n            {\r\n                \r\n            }\r\n            else if (e.Key == Key.Back)\r\n            {\r\n\r\n            }\r\n            else\r\n            {\r\n                e.Handled = true;\r\n            }\r\n        }\r\n\r\n        private void Hyperlink_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.ForgotPassword();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/PasswordView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.PasswordView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n    \r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.TwoStepVerification, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ChangePasswordPanel\" Visibility=\"{Binding ChangePasswordVisibility}\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <toolkit:ToggleSwitch Margin=\"0,18,-29,-21\" Grid.Row=\"0\" IsHitTestVisible=\"False\" IsChecked=\"{Binding PasswordEnabled}\" IsEnabled=\"{Binding IsWorking, Converter={StaticResource InvertBooleanConverter}}\" Header=\"{Binding Resources.TwoStepVerification, Source={StaticResource Strings}}\">\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                </i:Interaction.Behaviors>\r\n            </toolkit:ToggleSwitch>\r\n            <Border Grid.Row=\"0\" Background=\"Transparent\" Tap=\"PasswordEnabled_OnTap\"/>\r\n            <TextBlock Grid.Row=\"1\" Margin=\"12,11,12,0\" Text=\"{Binding Resources.ChangePasswordHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n            <Grid Grid.Row=\"2\" Visibility=\"{Binding PasswordEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Button Grid.Row=\"0\" Margin=\"0,22,0,0\" x:Name=\"ChangePassword\" Padding=\"12,2,12,6\" HorizontalAlignment=\"Left\" Content=\"{Binding Resources.ChangePassword, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n                <Button Grid.Row=\"1\" Margin=\"0,0,0,0\" x:Name=\"ChangeRecoveryEmail\" Padding=\"12,2,12,6\" HorizontalAlignment=\"Left\" Content=\"{Binding RecoveryEmailLabel, Converter={StaticResource Lowercase}}\"/>\r\n            </Grid>\r\n            <TextBlock Grid.Row=\"3\" Margin=\"12,11,12,0\" Text=\"{Binding RecoveryEmailUnconfirmedHint}\" Visibility=\"{Binding RecoveryEmailUnconfirmedVisibility}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </Grid>\r\n\r\n        <Grid x:Name=\"CompletePasswordPanel\" Visibility=\"{Binding CompletePasswordVisibility}\" Grid.Row=\"2\" Margin=\"0,18,0,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <TextBlock Grid.Row=\"0\" Margin=\"12,0,12,0\" Text=\"{Binding CompletePasswordLabel}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <Button Grid.Row=\"1\" Margin=\"0,22,0,0\" x:Name=\"AbortPassword\" Padding=\"12,2,12,6\" HorizontalAlignment=\"Left\" Content=\"{Binding Resources.Cancel, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/PasswordView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.Windows.Input;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class PasswordView\r\n    {\r\n        public PasswordViewModel ViewModel\r\n        {\r\n            get { return DataContext as PasswordViewModel; }\r\n        }\r\n\r\n        public PasswordView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void PasswordEnabled_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.ChangePasswordEnabled();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/PrivacySecurityView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.PrivacySecurityView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.PrivacyAndSecurity, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\">\r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"6,0,6,0\">\r\n                <TextBlock Margin=\"12,12,12,0\" FontSize=\"35\" Text=\"{Binding Resources.Privacy, Source={StaticResource Strings}}\"/>\r\n                \r\n                <Button Margin=\"-12,12,-12,0\" x:Name=\"OpenBlockedUsers\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.BlockedUsers, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding BlockedUsersSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"LastSeen\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.LastSeenShort, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding LastSeenSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"CallsPrivacy\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Calls, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding PhoneCallsSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"Groups\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.GroupsShort, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding GroupsSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n                \r\n                <TextBlock Margin=\"12,12,12,0\" FontSize=\"35\" Text=\"{Binding Resources.Security, Source={StaticResource Strings}}\"/>\r\n\r\n                <Button Margin=\"-12,12,-12,0\" x:Name=\"Passcode\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Passcode, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"TwoStepVerification\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.TwoStepVerification, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"Sessions\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Sessions, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"DeleteAllCloudDrafts\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.DeleteAllCloudDrafts, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"Passport\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.TelegramPassport, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"AccountSelfDestructs\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.AccountSelfDestructs, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding AccountSelfDestructsSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"Payments\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Payments, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.PaymentsSubtitle, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"LoggedIn\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.LoggedInWithTelegram, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"Contacts\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Contacts, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"SecretChats\" Visibility=\"{Binding IsSecretChatsEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.SecretChats, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"CallsSecurity\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Calls, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <!--<TextBlock Margin=\"12,12,12,0\" FontSize=\"35\" Text=\"{Binding Resources.ConnectionType, Source={StaticResource Strings}}\"/>\r\n                <Button Margin=\"-12,0,-12,0\" x:Name=\"Proxy\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Proxy, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>-->\r\n            </StackPanel>\r\n        </ScrollViewer>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/PrivacySecurityView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class PrivacySecurityView\r\n    {\r\n        public PrivacySecurityView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/PrivacyStatementView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.PrivacyStatementView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n    \r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.PrivacyStatement, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,20,12,0\">\r\n            <RichTextBox IsReadOnly=\"True\" VerticalAlignment=\"Top\">\r\n                <Paragraph>\r\n                    <Run Text=\"{Binding Resources.PrivacyStatementText, Source={StaticResource Strings}}\"/>\r\n                    \r\n                </Paragraph>\r\n            </RichTextBox> \r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/PrivacyStatementView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class PrivacyStatementView\r\n    {\r\n        public PrivacyStatementView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            //AnimationContext = LayoutRoot;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/SecretChatsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.SecretChatsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.SecretChats, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <toolkit:ToggleSwitch Margin=\"0,18,-29,-21\" Grid.Row=\"0\" IsChecked=\"{Binding LinkPreviews, Mode=TwoWay}\" Header=\"{Binding Resources.LinkPreviews, Source={StaticResource Strings}}\">\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                        OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                        OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                </i:Interaction.Behaviors>\r\n            </toolkit:ToggleSwitch>\r\n\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/SecretChatsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class SecretChatsView\r\n    {\r\n        public SecretChatsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/SelectMultipleUsersView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.SelectMultipleUsersView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,17,0,28\">\r\n            <TextBlock Text=\"MY APPLICATION\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n            <TextBlock Text=\"page name\" Margin=\"9,-7,0,0\" Style=\"{StaticResource PhoneTextTelegramTitle1Style}\"/>\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\" />\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/SelectMultipleUsersView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class SelectMultipleUsersView\r\n    {\r\n        public SelectMultipleUsersView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/SessionsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.SessionsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"SessionItemTemplate\">\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"0,12,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Terminate($DataContext)]\" Header=\"{Binding Resources.Terminate, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                    <Grid.Triggers>\r\n                        <EventTrigger RoutedEvent=\"Grid.Loaded\">\r\n                            <BeginStoryboard>\r\n                                <Storyboard>\r\n                                    <DoubleAnimation Duration=\"00:00:0.15\" From=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"MainItemGrid\"/>\r\n                                </Storyboard>\r\n                            </BeginStoryboard>\r\n                        </EventTrigger>\r\n                    </Grid.Triggers>\r\n\r\n\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Grid.Column=\"0\" Margin=\"12,0,0,0\" Text=\"{Binding AppFullName, Converter={StaticResource NonBreakingStringConverter}}\" TextTrimming=\"WordEllipsis\" FontSize=\"27\"/>\r\n                        <StackPanel Grid.Column=\"1\" Margin=\"6,0,0,1\" Orientation=\"Horizontal\" VerticalAlignment=\"Bottom\">\r\n                            <TextBlock \r\n                                Visibility=\"{Binding IsCurrent, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter='invert', FallbackValue='Collapsed'}\" \r\n                                Margin=\"0\" \r\n                                Text=\"{Binding DateActive, Converter={StaticResource DialogDateTimeConverter}}\" \r\n                                FontSize=\"18\"\r\n                                Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            <TextBlock \r\n                                Visibility=\"{Binding IsCurrent, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue='Collapsed'}\" \r\n                                Margin=\"0\" \r\n                                Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" \r\n                                Text=\"{Binding Resources.Online, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" \r\n                                FontSize=\"18\"\r\n                                Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </StackPanel>\r\n                        <TextBlock Grid.Row=\"1\" Grid.ColumnSpan=\"2\" Margin=\"12,0,0,0\" Text=\"{Binding Description, Converter={StaticResource NonBreakingStringConverter}}\" TextTrimming=\"WordEllipsis\" FontSize=\"20\"/>\r\n                        <TextBlock Grid.Row=\"2\" Grid.ColumnSpan=\"2\" Margin=\"12,0,0,0\" Text=\"{Binding Location}\" FontSize=\"20\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Sessions, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <longListSelector:LongListSelector\r\n            Grid.Row=\"1\"\r\n            x:Name=\"Items\"\r\n            Margin=\"6,0,0,0\"\r\n            ItemsSource=\"{Binding Items}\" \r\n            IsFlatList=\"True\" \r\n            ItemTemplate=\"{StaticResource SessionItemTemplate}\">\r\n            <longListSelector:LongListSelector.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                </ItemsPanelTemplate>\r\n            </longListSelector:LongListSelector.ItemsPanel>\r\n            <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                <DataTemplate>\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Grid Visibility=\"{Binding DataContext.Current, ElementName=Items, Converter={StaticResource ExistsToVisibilityConverter}, FallbackValue='Collapsed'}\">\r\n                            <TextBlock Margin=\"12\" FontSize=\"35\" Text=\"{Binding Resources.CurrentSession, Source={StaticResource Strings}}\"/>\r\n                        </Grid>\r\n                        <ContentControl Grid.Row=\"1\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" Content=\"{Binding DataContext.Current, ElementName=Items}\" ContentTemplate=\"{StaticResource SessionItemTemplate}\"/>\r\n\r\n                        <Button Grid.Row=\"2\" micro:Message.Attach=\"TerminateOtherSessions\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0,-12,12\" Style=\"{StaticResource ProfileButtonStyle}\" Visibility=\"{Binding DataContext.Items.Count, ElementName=Items, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter='0', FallbackValue='Collapsed'}\">\r\n                            <StackPanel>\r\n                                <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.TerminateAllSessions, Source={StaticResource Strings}}\" Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                                <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.TerminateAllOtherSessionsNote, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                            </StackPanel>\r\n                        </Button>\r\n\r\n                        <Grid Grid.Row=\"3\" Visibility=\"{Binding DataContext.Items.Count, ElementName=Items, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter='0', FallbackValue='Collapsed'}\">\r\n                            <TextBlock Margin=\"12\" FontSize=\"35\" Text=\"{Binding Resources.OtherSessions, Source={StaticResource Strings}}\"/>\r\n                        </Grid>\r\n                        <TextBlock Grid.RowSpan=\"4\" Margin=\"12,6,12,0\" Text=\"{Binding DataContext.Status, ElementName=Items}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </longListSelector:LongListSelector.ListHeaderTemplate>\r\n        </longListSelector:LongListSelector>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/SessionsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing Microsoft.Phone.Controls;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class SessionsView\r\n    {\r\n        public SessionsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ContextMenuService.GetContextMenu((DependencyObject)sender).IsOpen = true;       \r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/SettingsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.SettingsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\"\r\n    BackKeyPress=\"SettingsView_OnBackKeyPress\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        \r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Settings, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\" x:Name=\"ScrollViewer\">\r\n            <Grid x:Name=\"ContentPanel\" Margin=\"6,24,12,0\">\r\n                <Grid x:Name=\"Actions\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    \r\n                    <Grid Grid.Row=\"0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <views:ConversationTileControl\r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenPhoto]\"\r\n\t\t\t\t            Margin=\"12,0,0,0\" \r\n                            Size=\"100\"\r\n                            Fill=\"{Binding CurrentItem.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding CurrentItem, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding CurrentItem.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n\r\n                        <StackPanel Grid.Column=\"1\" VerticalAlignment=\"Top\">\r\n                            <TextBlock Margin=\"24,13,0,0\" Text=\"{Binding CurrentItem.FullName2}\" FontSize=\"30\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                            <TextBlock Margin=\"24,1,0,0\" Text=\"{Binding Resources.Online, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Foreground=\"{StaticResource TelegramAccentBrush}\"/>\r\n                        </StackPanel>\r\n                    </Grid>\r\n\r\n                    <StackPanel Grid.Row=\"1\" Margin=\"0,24,0,0\">\r\n                        <Button Margin=\"-6,0,-12,0\" x:Name=\"EditPhoneNumber\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Width=\"32\" Height=\"32\" Margin=\"12,3\" VerticalAlignment=\"Top\" Background=\"{StaticResource PhoneForegroundBrush}\">\r\n                                    <Border.OpacityMask>\r\n                                        <ImageBrush ImageSource=\"/Images/W10M/ic_phone_2x.png\"/>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <StackPanel Grid.Column=\"1\">\r\n                                    <TextBlock Margin=\"12,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Mobile, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding CurrentItem.Phone, StringFormat='+\\{0\\}'}\" Foreground=\"{StaticResource TelegramAccentBrush}\"/>\r\n                                </StackPanel>\r\n                            </Grid>\r\n                        </Button>\r\n\r\n                        <Button Margin=\"-6,0,-12,0\" x:Name=\"EditUsername\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Width=\"32\" Height=\"32\" Margin=\"12,3\" VerticalAlignment=\"Top\" Background=\"{StaticResource PhoneForegroundBrush}\">\r\n                                    <Border.OpacityMask>\r\n                                        <ImageBrush ImageSource=\"/Images/W10M/ic_username_2x.png\"/>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <StackPanel Grid.Column=\"1\">\r\n                                    <TextBlock Margin=\"12,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Username, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding CurrentItem.UserName, StringFormat='@{0}'}\" Foreground=\"{StaticResource TelegramAccentBrush}\" Visibility=\"{Binding CurrentItem.UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\"/>\r\n                                </StackPanel>\r\n                            </Grid>\r\n                        </Button>\r\n\r\n                        <Button Margin=\"-6,0,-12,0\" x:Name=\"EditBio\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Width=\"32\" Height=\"32\" Margin=\"12,3\" VerticalAlignment=\"Top\" Background=\"{StaticResource PhoneForegroundBrush}\">\r\n                                    <Border.OpacityMask>\r\n                                        <ImageBrush ImageSource=\"/Images/W10M/ic_bio_2x.png\"/>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <StackPanel Grid.Column=\"1\">\r\n                                    <TextBlock Margin=\"12,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Bio, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding CurrentItem.About}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramAccentBrush}\" Visibility=\"{Binding CurrentItem.UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\"/>\r\n                                </StackPanel>\r\n                            </Grid>\r\n                        </Button>\r\n\r\n                        <Button Margin=\"-6,0,-12,0\" x:Name=\"OpenNotifications\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Width=\"32\" Height=\"32\" Margin=\"12,3\" VerticalAlignment=\"Top\" Background=\"{StaticResource PhoneForegroundBrush}\">\r\n                                    <Border.OpacityMask>\r\n                                        <ImageBrush ImageSource=\"/Images/W10M/ic_notifications_2x.png\"/>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <StackPanel Grid.Column=\"1\">\r\n                                    <TextBlock Margin=\"12,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Notifications, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.NotificationsSubtitle, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                                </StackPanel>\r\n                            </Grid>\r\n                        </Button>\r\n\r\n                        <Button Margin=\"-6,0,-12,0\" x:Name=\"OpenChatSettings\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Width=\"32\" Height=\"32\" Margin=\"12,3\" VerticalAlignment=\"Top\" Background=\"{StaticResource PhoneForegroundBrush}\">\r\n                                    <Border.OpacityMask>\r\n                                        <ImageBrush ImageSource=\"/Images/W10M/ic_chats_2x.png\"/>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n\r\n                                <StackPanel Grid.Column=\"1\">\r\n                                    <TextBlock Margin=\"12,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.ChatSettings, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.ChatSettingsSubtitle, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                                </StackPanel>\r\n                            </Grid>\r\n                        </Button>\r\n\r\n                        <Button Margin=\"-6,0,-12,0\" x:Name=\"OpenPrivacySecurity\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Width=\"32\" Height=\"32\" Margin=\"12,3\" VerticalAlignment=\"Top\" Background=\"{StaticResource PhoneForegroundBrush}\">\r\n                                    <Border.OpacityMask>\r\n                                        <ImageBrush ImageSource=\"/Images/W10M/ic_sesurity_2x.png\"/>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n\r\n                                <StackPanel Grid.Column=\"1\">\r\n                                    <TextBlock Margin=\"12,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.PrivacyAndSecurity, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.PrivacySecuritySubtitle, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                                </StackPanel>\r\n                            </Grid>\r\n                        </Button>\r\n\r\n                        <Button Margin=\"-6,0,-12,0\" x:Name=\"OpenStickers\" Style=\"{StaticResource ProfileButtonStyle}\" Visibility=\"{Binding Converter={StaticResource WP8VisibilityConverter}}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Width=\"32\" Height=\"32\" Margin=\"12,3\" VerticalAlignment=\"Top\" Background=\"{StaticResource PhoneForegroundBrush}\">\r\n                                    <Border.OpacityMask>\r\n                                        <ImageBrush ImageSource=\"/Images/W10M/ic_stickers_2x.png\"/>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n\r\n                                <StackPanel Grid.Column=\"1\">\r\n                                    <TextBlock Margin=\"12,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Stickers, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding StickersSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                                </StackPanel>\r\n                            </Grid>\r\n                        </Button>\r\n\r\n                        <Button Margin=\"-6,0,-12,0\" x:Name=\"OpenProxy\" Style=\"{StaticResource ProfileButtonStyle}\" Visibility=\"{Binding Converter={StaticResource WP8VisibilityConverter}}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Opacity=\"0\" Width=\"32\" Height=\"32\" Margin=\"12,3\" VerticalAlignment=\"Top\" Background=\"{StaticResource PhoneForegroundBrush}\">\r\n                                    <Border.OpacityMask>\r\n                                        <ImageBrush ImageSource=\"/Images/W10M/ic_stickers_2x.png\"/>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n\r\n                                <StackPanel Grid.Column=\"1\">\r\n                                    <TextBlock Margin=\"12,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Proxy, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding ProxySubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                                </StackPanel>\r\n                            </Grid>\r\n                        </Button>\r\n                    </StackPanel>\r\n\r\n                    <!--<toolkit:ToggleSwitch Margin=\"0,37,-29,-21\" Grid.Row=\"4\" IsChecked=\"{Binding StateService.SendByEnter, Mode=TwoWay}\" Header=\"{Binding Resources.SendMessageByEnter, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n\r\n                    <toolkit:ToggleSwitch Margin=\"0,37,-29,-21\" Grid.Row=\"5\" IsChecked=\"{Binding LocationServices, Mode=TwoWay}\" Header=\"{Binding Resources.LocationServices, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>\r\n\r\n                    <toolkit:ToggleSwitch Visibility=\"{Binding Converter={StaticResource WP8VisibilityConverter}}\"  Margin=\"0,37,-29,-21\" Grid.Row=\"6\" IsChecked=\"{Binding PeopleHub, Mode=TwoWay}\" IsEnabled=\"{Binding IsPeopleHubEnabled}\" Header=\"{Binding Resources.PeopleHubIntegration, Source={StaticResource Strings}}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </toolkit:ToggleSwitch>-->\r\n\r\n                    <!--<Button Margin=\"-12,0\" Grid.Row=\"7\" x:Name=\"OpenLockScreenSettings\" Visibility=\"{Binding Converter={StaticResource WP8VisibilityConverter}}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,-12,0\" FontSize=\"36.667\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" Text=\"{Binding Resources.LockScreen, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,-6,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.LockScreenSubtitle, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </StackPanel>\r\n                    </Button>-->\r\n\r\n                    <!--<Button Margin=\"-12,-10,-12,0\" Grid.Row=\"12\" x:Name=\"Support\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,-12,0\" FontSize=\"36.667\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" Text=\"{Binding Resources.Support, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,-6,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.AskAQuestion, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </StackPanel>\r\n                    </Button>-->\r\n\r\n                    <!--<Button Margin=\"-12,-10,-12,0\" Grid.Row=\"12\" x:Name=\"OpenCacheSettings\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,-12,0\" FontSize=\"36.667\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" Text=\"{Binding Resources.Cache, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,-6,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.ManagingLocalCache, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </StackPanel>\r\n                    </Button>-->\r\n\r\n                    <!--<Button Margin=\"-12,0,-12,16\" Grid.Row=\"13\" x:Name=\"SendLogs\"\r\n                            Visibility=\"{Binding Converter={StaticResource LogVisibilityConverter}}\"\r\n                            Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,-12,0\" FontSize=\"36.667\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" Text=\"send logs\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0,-12,16\" Grid.Row=\"14\" x:Name=\"ClearLogs\"\r\n                            Visibility=\"{Binding Converter={StaticResource LogVisibilityConverter}}\"\r\n                            Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,-12,0\" FontSize=\"36.667\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" Text=\"clear logs\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0,-12,16\" Grid.Row=\"15\" x:Name=\"OpenSnapshots\"\r\n                            Visibility=\"{Binding Converter={StaticResource PrivateBetaIdentityNameToVisibilityConverter}}\"\r\n                            Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,-12,0\" FontSize=\"36.667\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" Text=\"snapshots\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"0,22,0,72\" Grid.Row=\"16\" x:Name=\"LogOut\" Padding=\"60,2,60,6\" HorizontalAlignment=\"Left\" Content=\"{Binding Resources.LogOut, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>-->              \r\n                </Grid>\r\n            </Grid>\r\n        </ScrollViewer>\r\n        \r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" Height=\"480\" VerticalAlignment=\"Bottom\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n            <Grid>\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition/>\r\n                </Grid.RowDefinitions>\r\n                <ListBoxItem Tap=\"SupportMenuItem_OnTap\">\r\n                    <TextBlock Margin=\"18\" Text=\"{Binding Resources.AskAQuestion, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                </ListBoxItem>\r\n                <ListBoxItem Grid.Row=\"1\" Tap=\"OpenFAQMenuItem_OnTap\">\r\n                    <TextBlock Margin=\"18\" Text=\"{Binding Resources.TelegramFAQ, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                </ListBoxItem>\r\n                <ListBoxItem Grid.Row=\"2\" Tap=\"PrivacyPolicyMenuItem_OnTap\">\r\n                    <TextBlock Margin=\"18\" Text=\"{Binding Resources.PrivacyPolicy, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                </ListBoxItem>\r\n                <ListBoxItem Grid.Row=\"3\" Tap=\"LogOutMenuItem_OnTap\">\r\n                    <TextBlock Margin=\"18\" Text=\"{Binding Resources.LogOut, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                </ListBoxItem>\r\n                <ListBoxItem Grid.Row=\"4\" Tap=\"SendLogsMenuItem_OnTap\">\r\n                    <TextBlock Margin=\"18\" Text=\"{Binding Resources.SendLogs, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                </ListBoxItem>\r\n                <ListBoxItem Grid.Row=\"5\" Tap=\"SendCallLogsMenuItem_OnTap\">\r\n                    <TextBlock Margin=\"18\" Text=\"{Binding Resources.SendCallLogs, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                </ListBoxItem>\r\n                <ListBoxItem Grid.Row=\"6\" Tap=\"ClearLogsMenuItem_OnTap\">\r\n                    <TextBlock Margin=\"18\" Text=\"{Binding Resources.ClearLogs, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                </ListBoxItem>\r\n            </Grid>\r\n        </Border>\r\n        <controls1:TelegramApplicationBar Grid.Row=\"2\"\r\n            x:Name=\"AppBarPanel\" \r\n            VerticalAlignment=\"Bottom\"\r\n            MorePanel=\"{Binding ElementName=MorePanel}\">\r\n            <controls1:TelegramApplicationBar.Buttons>\r\n                <controls1:TelegramAppBarButton\r\n                    x:Name=\"SetPhotoButton\"\r\n                    Tap=\"SetPhotoButton_OnTap\"\r\n                    Grid.Column=\"2\"\r\n                    ImageSource=\"/Images/W10M/ic_photo_2x.png\"\r\n                    Text=\"{Binding Resources.SetPhoto, Source={StaticResource Strings}}\"/>\r\n                <controls1:TelegramAppBarButton\r\n                    x:Name=\"EditNameButton\"\r\n                    Grid.Column=\"3\"\r\n                    Tap=\"EditNameButton_OnTap\"\r\n                    ImageSource=\"/Images/W10M/ic_edit_2x.png\"\r\n                    Text=\"{Binding Resources.EditName, Source={StaticResource Strings}}\"/>\r\n            </controls1:TelegramApplicationBar.Buttons>\r\n        </controls1:TelegramApplicationBar>\r\n\r\n        <ContentControl x:Name=\"ProfilePhotoViewer\" Grid.RowSpan=\"3\" micro:View.Model=\"{Binding ProfilePhotoViewer}\"\r\n            VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n            VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/SettingsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Media;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class SettingsView\r\n    {\r\n        public SettingsViewModel ViewModel\r\n        {\r\n            get { return DataContext as SettingsViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _editButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Edit,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.edit.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarMenuItem _askQuestionMenuItem = new AppBarMenuItem\r\n        {\r\n            Text = AppResources.AskAQuestion\r\n        };\r\n\r\n        private readonly AppBarMenuItem _telegramFAQMenuItem = new AppBarMenuItem\r\n        {\r\n            Text = AppResources.TelegramFAQ\r\n        };\r\n\r\n        private readonly AppBarMenuItem _privacyPolicyMenuItem = new AppBarMenuItem\r\n        {\r\n            Text = AppResources.PrivacyPolicy\r\n        };\r\n\r\n        private readonly AppBarMenuItem _logOutMenuItem = new AppBarMenuItem\r\n        {\r\n            Text = AppResources.LogOut\r\n        };\r\n\r\n        private readonly AppBarMenuItem _sendLogsMenuItem = new AppBarMenuItem\r\n        {\r\n            Text = AppResources.SendLogs\r\n        };\r\n\r\n        public SettingsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            _editButton.Click += (sender, args) => ViewModel.EditProfile();\r\n            _askQuestionMenuItem.Click += (sender, args) => ViewModel.Support();\r\n            _telegramFAQMenuItem.Click += (sender, args) => ViewModel.OpenFAQ();\r\n            _privacyPolicyMenuItem.Click += (sender, args) => ViewModel.OpenPrivacyPolicy();\r\n            _logOutMenuItem.Click += (sender, args) => ViewModel.LogOut();\r\n            _sendLogsMenuItem.Click += (sender, args) => ViewModel.SendLogs();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                RunAnimation();\r\n                BuildLocalizedAppBar();\r\n\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ProfilePhotoViewer))\r\n            {\r\n                ViewModel.ProfilePhotoViewer.PropertyChanged += OnProfilePhotoViewerPropertyChanged;\r\n            }\r\n        }\r\n\r\n        private IApplicationBar _prevAppBar;\r\n\r\n        private void OnProfilePhotoViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ProfilePhotoViewer.IsOpen))\r\n            {\r\n                ScrollViewer.IsHitTestVisible = !ViewModel.ProfilePhotoViewer.IsOpen;\r\n                AppBarPanel.Visibility = !ViewModel.ProfilePhotoViewer.IsOpen\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n\r\n                if (ViewModel.ProfilePhotoViewer.IsOpen)\r\n                {\r\n                    _prevAppBar = ApplicationBar;\r\n\r\n                    var profilePhotoViewerView = ProfilePhotoViewer.Content as ProfilePhotoViewerView;\r\n                    ApplicationBar = profilePhotoViewerView != null ? profilePhotoViewerView.ApplicationBar : null;\r\n                }\r\n                else\r\n                {\r\n                    // wait to finish closing profile viewer animation\r\n                    Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25),\r\n                        () =>\r\n                        {\r\n                            ApplicationBar = _prevAppBar;\r\n                        });\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isForwardInAnimation;\r\n\r\n        private void RunAnimation()\r\n        {\r\n            if (_isForwardInAnimation)\r\n            {\r\n                _isForwardInAnimation = false;\r\n                var forwardInAnimation = TelegramTurnstileAnimations.GetAnimation(LayoutRoot, TurnstileTransitionMode.ForwardIn);\r\n                forwardInAnimation.Completed += (sender, args) =>\r\n                {\r\n                    ViewModel.ForwardInAnimationComplete();\r\n                };\r\n                Execute.BeginOnUIThread(forwardInAnimation.Begin);\r\n            }\r\n            else\r\n            {\r\n                LayoutRoot.Opacity = 1.0;\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (e.NavigationMode == NavigationMode.New)\r\n            {\r\n                LayoutRoot.Opacity = 0.0;\r\n                _isForwardInAnimation = true;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            return;\r\n            if (ApplicationBar == null)\r\n            {\r\n                ApplicationBar = new ApplicationBar{Opacity = 0.99};\r\n                ApplicationBar.Buttons.Add(_editButton);\r\n\r\n                ApplicationBar.MenuItems.Add(_askQuestionMenuItem);\r\n                ApplicationBar.MenuItems.Add(_telegramFAQMenuItem);\r\n                ApplicationBar.MenuItems.Add(_privacyPolicyMenuItem);\r\n                ApplicationBar.MenuItems.Add(_sendLogsMenuItem);\r\n                ApplicationBar.MenuItems.Add(_logOutMenuItem);\r\n            }\r\n        }\r\n\r\n        private void SetPhotoButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Execute.BeginOnUIThread(() => ViewModel.EditProfilePhoto());\r\n        }\r\n\r\n        private void EditNameButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Execute.BeginOnUIThread(() => ViewModel.EditProfile());\r\n        }\r\n\r\n        private void SupportMenuItem_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Execute.BeginOnUIThread(() => ViewModel.Support());\r\n        }\r\n\r\n        private void OpenFAQMenuItem_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Execute.BeginOnUIThread(() => ViewModel.OpenFAQ());\r\n        }\r\n\r\n        private void PrivacyPolicyMenuItem_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Execute.BeginOnUIThread(() => ViewModel.OpenPrivacyPolicy());\r\n        }\r\n\r\n        private void LogOutMenuItem_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () => ViewModel.LogOut());\r\n        }\r\n\r\n        private void SendLogsMenuItem_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Execute.BeginOnUIThread(() => ViewModel.SendLogs());\r\n        }\r\n\r\n        private void SendCallLogsMenuItem_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Execute.BeginOnUIThread(() => ViewModel.SendCallLogs());\r\n        }\r\n\r\n        private void ClearLogsMenuItem_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Execute.BeginOnUIThread(() => ViewModel.ClearLogs());\r\n        }\r\n\r\n        private void SettingsView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                var multiplePhotoChooser = popup.Child as OpenPhotoPicker;\r\n                if (multiplePhotoChooser != null)\r\n                {\r\n                    multiplePhotoChooser.TryClose();\r\n                }\r\n\r\n                var cropControl = popup.Child as CropControl;\r\n                if (cropControl != null)\r\n                {\r\n                    cropControl.TryClose();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            if (MorePanel.Visibility == Visibility.Visible)\r\n            {\r\n                AppBarPanel.Close();\r\n                e.Cancel = true;\r\n            }\r\n\r\n            if (ViewModel.ProfilePhotoViewer != null\r\n                && ViewModel.ProfilePhotoViewer.IsOpen)\r\n            {\r\n                ViewModel.ProfilePhotoViewer.CloseViewer();\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            if (MorePanel.Visibility == Visibility.Visible)\r\n            {\r\n                AppBarPanel.Close();\r\n            }\r\n\r\n            base.OnNavigatingFrom(e);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/ShareView.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Additional.ShareView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid.Projection>\r\n            <PlaneProjection/>\r\n        </Grid.Projection>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Caption, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Button x:Name=\"SocialNetworks\" Margin=\"-12,-12,0,18\" Style=\"{StaticResource ProfileButtonStyle}\" micro:Message.Attach=\"ShareLink\">\r\n                <Button.Projection>\r\n                    <PlaneProjection CenterOfRotationY=\"3\" RotationX=\"0\"/>\r\n                </Button.Projection>\r\n                <TextBlock Margin=\"10,0,12,0\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" Text=\"{Binding Resources.SocialNetworks, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n            </Button>\r\n            <Button x:Name=\"Sms\" Grid.Row=\"1\" Margin=\"-12,-12,0,18\" Style=\"{StaticResource ProfileButtonStyle}\" micro:Message.Attach=\"ComposeSMS\">\r\n                <Button.Projection>\r\n                    <PlaneProjection CenterOfRotationY=\"3\"/>\r\n                </Button.Projection>\r\n                <TextBlock Margin=\"10,0,12,0\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" Text=\"{Binding Resources.Sms, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n            </Button>\r\n            <Button x:Name=\"Email\" Grid.Row=\"2\" IsEnabled=\"True\" Margin=\"-12,-12,0,18\" Style=\"{StaticResource ProfileButtonStyle}\" micro:Message.Attach=\"ComposeEmail\">\r\n                <Button.Projection>\r\n                    <PlaneProjection CenterOfRotationY=\"3\"/>\r\n                </Button.Projection>\r\n                <TextBlock Margin=\"10,0,12,0\" Opacity=\"1.0\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" Text=\"{Binding Resources.Email, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n            </Button>\r\n        </Grid>\r\n    </Grid>\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Additional/ShareView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Media.Animation;\r\nusing TelegramClient.Animation.Navigation;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ShareView\r\n    {\r\n        public ShareView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            //var socialNetworksRotationAnimation = new DoubleAnimationUsingKeyFrames();\r\n            //socialNetworksRotationAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n            //socialNetworksRotationAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 90.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n            //Storyboard.SetTarget(socialNetworksRotationAnimation, SocialNetworks);\r\n            //Storyboard.SetTargetProperty(socialNetworksRotationAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationX)\"));\r\n            //storyboard.Children.Add(socialNetworksRotationAnimation);\r\n\r\n            //var smsRotationAnimation = new DoubleAnimationUsingKeyFrames();\r\n            //smsRotationAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.10), Value = 0.0 });\r\n            //smsRotationAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.35), Value = 90.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n            //Storyboard.SetTarget(smsRotationAnimation, Sms);\r\n            //Storyboard.SetTargetProperty(smsRotationAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationX)\"));\r\n            //storyboard.Children.Add(smsRotationAnimation);\r\n\r\n            //var emailRotationAnimation = new DoubleAnimationUsingKeyFrames();\r\n            //emailRotationAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.20), Value = 0.0 });\r\n            //emailRotationAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.45), Value = 90.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n            //Storyboard.SetTarget(emailRotationAnimation, Email);\r\n            //Storyboard.SetTargetProperty(emailRotationAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationX)\"));\r\n            //storyboard.Children.Add(emailRotationAnimation);\r\n\r\n            \r\n\r\n            var rootRotationAnimation = new DoubleAnimationUsingKeyFrames();\r\n            rootRotationAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            rootRotationAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 90.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(rootRotationAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(rootRotationAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationX)\"));\r\n            storyboard.Children.Add(rootRotationAnimation);\r\n\r\n            var rootOpacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            rootOpacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 1.0 });\r\n            rootOpacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(rootOpacityAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(rootOpacityAnimation, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(rootOpacityAnimation);\r\n\r\n            storyboard.Begin();\r\n\r\n            //e.Cancel = true;\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SwivelShowAnimator { RootElement = LayoutRoot };\r\n            }\r\n            else if (animationType == AnimationType.NavigateForwardOut)\r\n            {\r\n                return new SwivelHideAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        protected override void AnimationsComplete(AnimationType animationType)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                //var storyboard = new Storyboard();\r\n                //var searchBox = new DoubleAnimationUsingKeyFrames();\r\n                //searchBox.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -100.0 });\r\n                //searchBox.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                //Storyboard.SetTarget(searchBox, SearchBox);\r\n                //Storyboard.SetTargetProperty(searchBox, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                //storyboard.Children.Add(searchBox);\r\n\r\n                //var searchBoxOpacity = new DoubleAnimation\r\n                //{\r\n                //    From = 0.0,\r\n                //    To = 1.0,\r\n                //    Duration = TimeSpan.FromSeconds(0.15),\r\n                //    EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 }\r\n                //};\r\n                //Storyboard.SetTarget(searchBoxOpacity, SearchBox);\r\n                //Storyboard.SetTargetProperty(searchBoxOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                //storyboard.Children.Add(searchBoxOpacity);\r\n\r\n                //SearchBox.Opacity = 0.0;\r\n                //Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                //{\r\n                //    SearchBox.Opacity = 1.0;\r\n                //    storyboard.Begin();\r\n                //});\r\n            }\r\n\r\n            base.AnimationsComplete(animationType);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/SnapshotsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.SnapshotsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,17,0,28\">\r\n            <TextBlock Text=\"TELEGRAM\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n            <TextBlock Text=\"snapshots\" Margin=\"9,-7,0,0\" Style=\"{StaticResource PhoneTextTelegramTitle1Style}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid Grid.Row=\"0\" Margin=\"12,0,-12,0\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <TextBlock Grid.Row=\"1\" Text=\"{Binding State.Seq, StringFormat='Seq \\{0\\}'}\"/>\r\n                <TextBlock Grid.Row=\"2\" Text=\"{Binding State.Pts, StringFormat='Pts \\{0\\}'}\"/>\r\n                <TextBlock Grid.Row=\"3\" Text=\"{Binding State.Qts, StringFormat='Qts \\{0\\}'}\"/>\r\n                <TextBlock Grid.Row=\"1\" Grid.Column=\"1\" Text=\"{Binding State.UnreadCount, StringFormat='UnreadCount \\{0\\}'}\"/>\r\n                <TextBlock Grid.Row=\"2\" Grid.Column=\"1\" Text=\"{Binding State.Date, StringFormat='Date \\{0\\}', Converter={StaticResource MessageDateTimeConverter}}\"/>\r\n                <TextBlock Grid.Row=\"3\" Grid.Column=\"1\" Text=\"{Binding Difference.Count, StringFormat='Difference \\{0\\}'}\"/>\r\n\r\n            </Grid>\r\n            <ListBox x:Name=\"Items\" Grid.Row=\"1\" Margin=\"12,0,-12,0\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <Grid>\r\n                            <toolkit:ContextMenuService.ContextMenu>\r\n                                <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Delete($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Apply($DataContext)]\" Header=\"{Binding Resources.Set, Source={StaticResource Strings}}\"/>\r\n                                </toolkit:ContextMenu>\r\n                            </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TextBlock Grid.Row=\"0\" Text=\"{Binding Name}\" Foreground=\"{StaticResource PhoneAccentBrush}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Text=\"{Binding State.Seq, StringFormat='Seq \\{0\\}'}\"/>\r\n                            <TextBlock Grid.Row=\"2\" Text=\"{Binding State.Pts, StringFormat='Pts \\{0\\}'}\"/>\r\n                            <TextBlock Grid.Row=\"3\" Text=\"{Binding State.Qts, StringFormat='Qts \\{0\\}'}\"/>\r\n                            <TextBlock Grid.Row=\"4\" Text=\"{Binding State.UnreadCount, StringFormat='UnreadCount \\{0\\}'}\"/>\r\n                            <TextBlock Grid.Row=\"5\" Text=\"{Binding State.Date, StringFormat='Date \\{0\\}', Converter={StaticResource MessageDateTimeConverter}}\"/>\r\n                            <TextBlock Grid.Row=\"6\" Text=\"{Binding DifferenceString, StringFormat='Difference \\{0\\}'}\" Foreground=\"Red\"/>\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n            </ListBox>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/SnapshotsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class SnapshotsView\r\n    {\r\n        public SnapshotsViewModel ViewModel\r\n        {\r\n            get { return DataContext as SnapshotsViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _createSnapshot = new AppBarButton\r\n        {\r\n            Text = AppResources.Add,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.add.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarMenuItem _createTempSnapshot = new AppBarMenuItem\r\n        {\r\n            Text = \"Create snapshot with diff\",\r\n        };\r\n\r\n        public SnapshotsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _createSnapshot.Click += (sender, args) => ViewModel.Create();\r\n            _createTempSnapshot.Click += (sender, args) => ViewModel.CreateTemp();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                BuildLocalizedAppBar();\r\n            };\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_createSnapshot);\r\n            ApplicationBar.MenuItems.Add(_createTempSnapshot);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/SpecialThanksView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.SpecialThanksView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.SpecialThanks, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <RichTextBox VerticalAlignment=\"Top\" Margin=\"0,20,0,0\">\r\n                <Paragraph>\r\n                    <Run Text=\"Mikhail Lihachev ― design\"/>\r\n                    <LineBreak/>\r\n                    <Run Text=\"Irina Nadymova ― design and testing\"/>\r\n                    <LineBreak/>\r\n                    <Run Text=\"Maksim Lavrentiev ― design\"/>\r\n                    <LineBreak/>\r\n                    <Run Text=\"Armen Vartanyan ― Spain translation\"/>\r\n                    <LineBreak/>\r\n                    <Run Text=\"Robson Sobral ― Portuguese translation\"/>\r\n                    <LineBreak/>\r\n                    <Run Text=\"Claus Schiroky ― German translation\"/>\r\n                    <LineBreak/>\r\n                    <Run Text=\"Djon Heuvel ― Dutch translation\"/>\r\n                    <LineBreak/>\r\n                    <Run Text=\"Riccardo Dall'Aglio ― Italian translation\"/>\r\n                    <LineBreak/>\r\n                    <Run Text=\"Sergey Scherbachenko ― sounds\"/>\r\n                </Paragraph>\r\n            </RichTextBox>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/SpecialThanksView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class SpecialThanksView\r\n    {\r\n        public SpecialThanksView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/StartupView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.StartupView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <Grid>\r\n        <Border VerticalAlignment=\"Bottom\" Margin=\"24,0,24,196\" Height=\"2\" Background=\"{StaticResource PhoneChromeBrush}\"/>\r\n\r\n        <controls:Pivot x:Name=\"StartView\" Background=\"Transparent\" SelectionChanged=\"Pivot_OnSelectionChanged\">\r\n            <controls:PivotItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.1-720p.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.AppName, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.Intro1Message, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Margin=\"12,0,12,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </controls:PivotItem>\r\n            <controls:PivotItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.2-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock Foreground=\"#FFF85B30\" TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.Fast, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.FastMessage, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Margin=\"88,0,12,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </controls:PivotItem>\r\n            <controls:PivotItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.3-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock Foreground=\"#FFF99116\" TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.Free, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.FreeMessage, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Margin=\"164,0,12,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </controls:PivotItem>\r\n            <controls:PivotItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.4-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock Foreground=\"#FFF8C700\" TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.Powerful, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.PowerfulMessage, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\" Margin=\"12,0,164,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </controls:PivotItem>\r\n            <controls:PivotItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.5-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock Foreground=\"#FF5DC226\" TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.Secure, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.SecureMessage, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\" Margin=\"12,0,88,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </controls:PivotItem>\r\n            <controls:PivotItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.6-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock Foreground=\"#FF2E90E7\" TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.CloudBased, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.CloudBasedMessage, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\" Margin=\"12,0,12,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </controls:PivotItem>\r\n        </controls:Pivot>\r\n\r\n        <!--<Border VerticalAlignment=\"Bottom\" Margin=\"0,0,0,196\" Width=\"24\" HorizontalAlignment=\"Left\" Height=\"2\" Background=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n        <Border VerticalAlignment=\"Bottom\" Margin=\"0,0,0,196\" Width=\"24\" HorizontalAlignment=\"Right\" Height=\"2\" Background=\"{StaticResource PhoneBackgroundBrush}\"/>-->\r\n        <Border VerticalAlignment=\"Bottom\" Margin=\"24,0,12,196\" Width=\"76\" HorizontalAlignment=\"Left\" Height=\"2\" Background=\"{StaticResource PhoneForegroundBrush}\">\r\n            <Border.RenderTransform>\r\n                <TranslateTransform x:Name=\"BorderPosition\"/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n\r\n        <Border VerticalAlignment=\"Bottom\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n            <Button x:Name=\"StartMessaging\" Margin=\"12,0\" Content=\"{Binding Resources.StartMessaging, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n        </Border>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/StartupView.xaml.cs",
    "content": "﻿using System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class StartupView\r\n    {\r\n        private const double ScreenWidth = 480.0;\r\n\r\n        private const double MarginWidth = 24.0;\r\n\r\n        private const double ScrollIndicatorWidth = 76.0;\r\n\r\n        private const int LastIndex = 5;\r\n\r\n        private const double ScrollIndicatorTranslationX = (ScreenWidth - MarginWidth - MarginWidth - ScrollIndicatorWidth) / LastIndex;\r\n\r\n        public StartupView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            //Application.Current.Host.Content.ActualWidth\r\n        }\r\n\r\n        private void Pivot_OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            var index = StartView.SelectedIndex;\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var timeline2 = new DoubleAnimationUsingKeyFrames();\r\n            timeline2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = index * ScrollIndicatorTranslationX, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(timeline2, BorderPosition);\r\n            Storyboard.SetTargetProperty(timeline2, new PropertyPath(\"X\"));\r\n            storyboard.Children.Add(timeline2);\r\n\r\n            storyboard.Begin();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/StickersView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.StickersView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:reorderListBox=\"clr-namespace:ReorderListBox;assembly=Telegram.Controls\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"ForwardTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"SetItemTemplate\">\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                <controls1:StickerSetControl/>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n\r\n        <Style x:Key=\"ScrollViewerStyle\" TargetType=\"ScrollViewer\">\r\n            <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n            <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Padding\" Value=\"0\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"ScrollViewer\">\r\n                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                    </VisualStateGroup.Transitions>\r\n                                    <VisualState x:Name=\"Scrolling\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n                                            <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalScrollBar\"/>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"NotScrolling\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Grid Margin=\"{TemplateBinding Padding}\">\r\n                                <Grid.RenderTransform>\r\n                                    <TranslateTransform X=\"64\"/>\r\n                                </Grid.RenderTransform>\r\n                                <ScrollContentPresenter x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\"/>\r\n                                <ScrollBar x:Name=\"VerticalScrollBar\" HorizontalAlignment=\"Right\" Height=\"Auto\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Vertical\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{TemplateBinding VerticalOffset}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" VerticalAlignment=\"Stretch\" Width=\"5\"/>\r\n                                <ScrollBar x:Name=\"HorizontalScrollBar\" HorizontalAlignment=\"Stretch\" Height=\"5\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Horizontal\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{TemplateBinding HorizontalOffset}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" VerticalAlignment=\"Bottom\" Width=\"Auto\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"ReorderListBoxStyle\" TargetType=\"reorderListBox:ReorderListBox\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n            <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Padding\" Value=\"0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"reorderListBox:ReorderListBox\">\r\n                        <Grid>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <ScrollViewer x:Name=\"ScrollViewer\" Background=\"{TemplateBinding Background}\" Grid.Column=\"0\" Foreground=\"{TemplateBinding Foreground}\" Padding=\"{TemplateBinding Padding}\" Style=\"{StaticResource ScrollViewerStyle}\">\r\n                                <StackPanel>\r\n                                    <ContentPresenter ContentTemplate=\"{TemplateBinding HeaderTemplate}\"/>\r\n                                    <ItemsPresenter/>\r\n                                    <ContentPresenter ContentTemplate=\"{TemplateBinding FooterTemplate}\"/>\r\n                                </StackPanel>\r\n                            </ScrollViewer>\r\n                            <Canvas x:Name=\"DragInterceptor\" Background=\"Transparent\" Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"Stretch\" Width=\"64\">\r\n                                <Image x:Name=\"DragIndicator\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\">\r\n                                    <Image.RenderTransform>\r\n                                        <TranslateTransform/>\r\n                                    </Image.RenderTransform>\r\n                                </Image>\r\n                            </Canvas>\r\n                            <Canvas x:Name=\"RearrangeCanvas\" Background=\"Transparent\" Grid.ColumnSpan=\"2\" Margin=\"{TemplateBinding Padding}\" Visibility=\"Collapsed\"/>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        \r\n        <Style x:Key=\"ListBoxItemStyle1\" TargetType=\"reorderListBox:ReorderListBoxItem\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\" />\r\n            <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n            <Setter Property=\"Padding\" Value=\"0\" />\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n            <Setter Property=\"CacheMode\" Value=\"BitmapCache\"/>\r\n            <Setter Property=\"DragHandleTemplate\">\r\n                <Setter.Value>\r\n                    <DataTemplate>\r\n                        <Grid Background=\"Transparent\">\r\n                            <Image Stretch=\"Uniform\" Width=\"40\" Margin=\"0,0,24,0\" Source=\"/Images/Messages/movestickerpack.png\"/>\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"reorderListBox:ReorderListBoxItem\">\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid x:Name=\"DropBeforeSpace\" Grid.Row=\"0\" Height=\"0\"/>\r\n                            <Grid x:Name=\"DropAfterSpace\" Grid.Row=\"2\" Height=\"0\"/>\r\n                            <Grid Grid.Row=\"1\">\r\n                                <Border x:Name=\"Background\" Background=\"{StaticResource PhoneAccentBrush}\" Opacity=\"0\"/>\r\n                                <Border \r\n                                    x:Name=\"LayoutRoot\"\r\n                                    CacheMode=\"BitmapCache\"\r\n                                    Background=\"{TemplateBinding Background}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"\r\n                                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                    BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                                    <Grid Background=\"Transparent\" Margin=\"{TemplateBinding Padding}\">\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition Width=\"*\" />\r\n                                            <ColumnDefinition Width=\"Auto\" />\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <ContentControl x:Name=\"ContentContainer\"\r\n                                        Grid.Column=\"0\"\r\n                                        HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                        VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                        Content=\"{TemplateBinding Content}\"\r\n                                        ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                        Foreground=\"{TemplateBinding Foreground}\" />\r\n                                        <Grid x:Name=\"HandleContainer\" Grid.Column=\"1\">\r\n                                            <ContentPresenter\r\n                                            x:Name=\"DragHandle\"\r\n                                            VerticalAlignment=\"Stretch\"\r\n                                            ContentTemplate=\"{TemplateBinding DragHandleTemplate}\" />\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Grid>\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\" />\r\n                                    <VisualState x:Name=\"MouseOver\" />\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"Background\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TransparentBrush}\" />\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"ContentContainer\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".5\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                    <VisualState x:Name=\"Unselected\" />\r\n                                    <VisualState x:Name=\"Selected\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ContentContainer\" Storyboard.TargetProperty=\"Foreground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\" />\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"ReorderEnabledStates\">\r\n                                    <VisualState x:Name=\"ReorderDisabled\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DragHandle\" Storyboard.TargetProperty=\"Width\" To=\"0\" Duration=\"0\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"ReorderEnabled\" />\r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition From=\"ReorderDisabled\" To=\"ReorderEnabled\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DragHandle\" Storyboard.TargetProperty=\"Width\" To=\"52\" Duration=\"0:0:0.4\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"ReorderEnabled\" To=\"ReorderDisabled\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DragHandle\" Storyboard.TargetProperty=\"Width\" To=\"0\" Duration=\"0:0:0.4\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                    </VisualStateGroup.Transitions>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"DraggingStates\">\r\n                                    <VisualState x:Name=\"NotDragging\" />\r\n                                    <VisualState x:Name=\"Dragging\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\"0.9\" Duration=\"0\" />\r\n                                            <DoubleAnimation Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"Opacity\" To=\"0.9\" Duration=\"0\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition To=\"NotDragging\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                                <DoubleAnimation Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"Opacity\" From=\"0.9\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition To=\"Dragging\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\"0.9\" Duration=\"0:0:0.2\" />\r\n                                                <DoubleAnimation Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"Opacity\" To=\"0.9\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                    </VisualStateGroup.Transitions>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"DropIndicatorStates\">\r\n                                    <VisualState x:Name=\"NoDropIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0\" />\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"DropBeforeIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0\" />\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"DropAfterIndicator\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0\" />\r\n                                            <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0\" />\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    \r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition From=\"NoDropIndicator\" To=\"DropBeforeIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"NoDropIndicator\" To=\"DropAfterIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"DropBeforeIndicator\" To=\"NoDropIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"DropAfterIndicator\" To=\"NoDropIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"DropBeforeIndicator\" To=\"DropAfterIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                        <VisualTransition From=\"DropAfterIndicator\" To=\"DropBeforeIndicator\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropBeforeSpace\" Storyboard.TargetProperty=\"Height\" To=\"1\" Duration=\"0:0:0.2\" />\r\n                                                <DoubleAnimation Storyboard.TargetName=\"DropAfterSpace\" Storyboard.TargetProperty=\"Height\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                            </Storyboard>\r\n                                        </VisualTransition>\r\n                                    </VisualStateGroup.Transitions>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Stickers, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ContentControl\r\n            x:Name=\"ItemsContentControl\"\r\n            Grid.Row=\"1\" \r\n            Margin=\"-70,0,0,0\"\r\n            HorizontalAlignment=\"Stretch\"\r\n            VerticalAlignment=\"Stretch\"\r\n            VerticalContentAlignment=\"Stretch\"\r\n            HorizontalContentAlignment=\"Stretch\">\r\n            <reorderListBox:ReorderListBox\r\n                x:Name=\"Items\"\r\n                ItemsSource=\"{Binding Items}\" \r\n                IsReorderEnabled=\"True\" Style=\"{StaticResource ReorderListBoxStyle}\" \r\n                ItemContainerStyle=\"{StaticResource ListBoxItemStyle1}\">\r\n                <reorderListBox:ReorderListBox.HeaderTemplate>\r\n                    <DataTemplate>\r\n                        <StackPanel Margin=\"0,12,0,0\">\r\n                            <!--<toolkit:ToggleSwitch Margin=\"12,0,-11,-21\" IsChecked=\"{Binding DataContext.ShowStickersTab, Mode=TwoWay, ElementName=Self}\" Header=\"{Binding Resources.ShowStickersTab, Source={StaticResource Strings}}\">\r\n                                <i:Interaction.Behaviors>\r\n                                    <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                                </i:Interaction.Behaviors>\r\n                            </toolkit:ToggleSwitch>-->\r\n                            <Button micro:Message.Attach=\"[Event Click] = [Action ShowStickersByEmoji]\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.SuggestStickersByEmoji, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding DataContext.ShowStickersByEmojiSubtitle, ElementName=Self}\"/>\r\n                                </StackPanel>\r\n                            </Button>\r\n                            <Button micro:Message.Attach=\"[Event Click] = [Action OpenFeaturedStickers]\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.FeaturedStickers, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding DataContext.FeaturedStickersSubtitle, ElementName=Self}\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                </StackPanel>\r\n                            </Button>\r\n                            <Button micro:Message.Attach=\"[Event Click] = [Action OpenArchivedStickers]\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.ArchivedStickers, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                </StackPanel>\r\n                            </Button>\r\n                            <Button micro:Message.Attach=\"[Event Click] = [Action OpenMasks]\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Masks, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding DataContext.MasksSubtitle, ElementName=Self}\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                </StackPanel>\r\n                            </Button>\r\n                        </StackPanel>\r\n                    </DataTemplate>\r\n                </reorderListBox:ReorderListBox.HeaderTemplate>\r\n                <ListBox.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <Grid Background=\"Transparent\" Tap=\"StickerSet_OnTap\" CacheMode=\"BitmapCache\" toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                            <toolkit:ContextMenuService.ContextMenu>\r\n                                <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Opened=\"ContextMenu_OnOpened\">\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Archive($DataContext)]\" Header=\"{Binding Resources.Archive, Source={StaticResource Strings}}\"/>\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Remove($DataContext)]\" Loaded=\"Remove_OnLoaded\" Header=\"{Binding Resources.Remove, Source={StaticResource Strings}}\"/>\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Share($DataContext)]\" Header=\"{Binding Resources.Share, Source={StaticResource Strings}}\"/>\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [CopyLink($DataContext)]\" Header=\"{Binding Resources.CopyLink, Source={StaticResource Strings}}\"/>\r\n                                </toolkit:ContextMenu>\r\n                            </toolkit:ContextMenuService.ContextMenu>\r\n                            <controls1:StickerSetControl/>\r\n                            <!--<ContentControl HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" Content=\"{Binding}\" ContentTemplate=\"{StaticResource SetItemTemplate}\"/>-->\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </ListBox.ItemTemplate>\r\n                <reorderListBox:ReorderListBox.FooterTemplate>\r\n                    <DataTemplate>\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition/>\r\n                                <RowDefinition/>\r\n                            </Grid.RowDefinitions>\r\n                            <TextBlock Margin=\"24,0\" Text=\"{Binding DataContext.Status, ElementName=Self}\" Visibility=\"{Binding DataContext.Status, ElementName=Self, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                            <!--<TextBlock Grid.Row=\"1\" Margin=\"24,43,24,43\" Text=\"{Binding Resources.StickersHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" TextAlignment=\"Center\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n                            <RichTextBox Grid.Row=\"1\" Margin=\"12,43,12,43\" TextWrapping=\"Wrap\" chats:ConvertToSupergroupView.FormattedLinkedText=\"{Binding Resources.StickersHint, Source={StaticResource Strings}}\" TextAlignment=\"Left\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </reorderListBox:ReorderListBox.FooterTemplate>\r\n                <ListBox.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <StackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ListBox.ItemsPanel>\r\n            </reorderListBox:ReorderListBox>\r\n        </ContentControl>\r\n        <Image x:Name=\"Image\" \r\n            Grid.Row=\"1\"\r\n            Margin=\"-64,0,0,0\" \r\n            Visibility=\"Collapsed\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/StickersView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class StickersView\r\n    {\r\n        public StickersViewModel ViewModel\r\n        {\r\n            get { return DataContext as StickersViewModel; }\r\n        }\r\n\r\n        public StickersView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        public void CreateBitmapCache()\r\n        {\r\n            var bitmap = new WriteableBitmap(ItemsContentControl, null);\r\n\r\n            Image.Source = bitmap;\r\n            Image.Visibility = Visibility.Visible;\r\n            Items.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private WriteableBitmap _bitmap;\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            //base.OnBackKeyPress(e);\r\n\r\n            //if (_bitmap == null)\r\n            //{\r\n            //    _bitmap = new WriteableBitmap(ItemsContentControl, null);\r\n            //    e.Cancel = true;\r\n            \r\n            //    Image.Source = _bitmap;\r\n            //    Image.Visibility = Visibility.Visible;\r\n            //    Items.Visibility = Visibility.Collapsed;\r\n            //    ItemsContentControl.Content = null;\r\n            //    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            //    {\r\n            //        NavigationService.GoBack();\r\n            //    });\r\n            //}\r\n            //else\r\n            //{\r\n            //    Image.Source = _bitmap;\r\n            //    Image.Visibility = Visibility.Visible;\r\n            //    Items.Visibility = Visibility.Collapsed;\r\n            //    ItemsContentControl.Content = null;\r\n            //}\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n            base.OnNavigatedFrom(e);\r\n\r\n            //if (e.NavigationMode == NavigationMode.Forward)\r\n            //{\r\n            //    Items.Visibility = Visibility.Collapsed;\r\n            //}\r\n\r\n            //Execute.BeginOnUIThread(TimeSp() =>\r\n            //{\r\n                \r\n            //});\r\n\r\n            //Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            //{\r\n            //    if (e.NavigationMode == NavigationMode.Back)\r\n            //    {\r\n            //        LayoutRoot.Children.Clear();\r\n            //    }\r\n            //});\r\n        }\r\n\r\n        private void StickerSet_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            //return;\r\n            OpenStickerSet(sender, e);\r\n        }\r\n\r\n        private void OpenStickerSet(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var stickerSet = element.DataContext as TLStickerSet;\r\n            if (stickerSet == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n                ShowStickerSetMessageBox(false, true, stickerSet, prompt =>\r\n                {\r\n                    if (prompt == PopUpResult.Ok)\r\n                    {\r\n                        ViewModel.Remove(stickerSet);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private void Remove_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = (MenuItem) sender;\r\n            if (menuItem != null)\r\n            {\r\n                var stickerSet = menuItem.DataContext as TLStickerSet32;\r\n                if (stickerSet != null)\r\n                {\r\n                    menuItem.Visibility = stickerSet.Official\r\n                        ? Visibility.Collapsed\r\n                        : Visibility.Visible;\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private void ForwardTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_once)\r\n            {\r\n                _once = true;\r\n                ViewModel.ForwardInAnimationComplete();\r\n            }\r\n        }\r\n\r\n        private void ContextMenu_OnOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.ReorderStickerSets();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Additional/TelegramPasswordBox.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Additional.TelegramPasswordBox\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"Self\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <UserControl.Resources>\r\n        <Style x:Key=\"TextBoxStyle\" TargetType=\"TextBox\">\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"23\"/>\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n            <Setter Property=\"SelectionBackground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n            <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n            <Setter Property=\"Padding\" Value=\"16,3,0,5\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"TextBox\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"ReadOnly\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBorderBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unfocused\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"MainBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\"/>\r\n                            <Border x:Name=\"ReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\"/>\r\n                            <Border BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentElement\" Opacity=\"0\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid x:Name=\"PinPanel\">\r\n            <TextBox x:Name=\"PinTextBox\" MaxLength=\"4\" CaretBrush=\"Transparent\" Text=\"{Binding Password, ElementName=Self, Mode=TwoWay}\" GotFocus=\"PinTextBox_OnGotFocus\" LostFocus=\"PinTextBox_OnLostFocus\" TextChanged=\"PinTextBox_OnTextChanged\" KeyDown=\"PasswordTextBox_OnKeyDown\" VerticalAlignment=\"Top\" Style=\"{StaticResource TextBoxStyle}\">\r\n                <TextBox.InputScope>\r\n                    <InputScope>\r\n                        <InputScopeName NameValue=\"NumericPassword\" />\r\n                    </InputScope>\r\n                </TextBox.InputScope>\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </TextBox>\r\n            <Border Background=\"Transparent\" d:IsHidden=\"True\" Tap=\"UIElement_OnTap\"/>\r\n            <TextBlock x:Name=\"PinTextBlock\" IsHitTestVisible=\"False\" VerticalAlignment=\"Center\" Text=\"{Binding Text, ElementName=PinTextBox, Converter={StaticResource MaskConverter}}\" FontSize=\"23\" Margin=\"32,0\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n        </Grid>\r\n        <PasswordBox x:Name=\"PasswordBox\" MaxLength=\"40\" Password=\"{Binding Password, ElementName=Self, Mode=TwoWay}\" PasswordChanged=\"PasswordBox_OnPasswordChanged\"  VerticalAlignment=\"Top\" Visibility=\"Collapsed\">\r\n            <i:Interaction.Behaviors>\r\n                <behaviors:UpdatePasswordBindingBehavior/>\r\n            </i:Interaction.Behaviors>\r\n        </PasswordBox>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Additional/TelegramPasswordBox.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class TelegramPasswordBox\r\n    {\r\n        public static readonly DependencyProperty SimpleProperty = DependencyProperty.Register(\r\n            \"Simple\", typeof (bool), typeof (TelegramPasswordBox), new PropertyMetadata(OnSimpleChanged));\r\n\r\n        private static void OnSimpleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var telegramPasswordBox = d as TelegramPasswordBox;\r\n            if (telegramPasswordBox != null)\r\n            {\r\n                telegramPasswordBox.SwitchMode((bool)e.NewValue);\r\n            }\r\n        }\r\n\r\n        public bool Simple\r\n        {\r\n            get { return (bool) GetValue(SimpleProperty); }\r\n            set { SetValue(SimpleProperty, value); }\r\n        }\r\n\r\n        private void SwitchMode(bool simple)\r\n        {\r\n            if (simple)\r\n            {\r\n                SwitchToPinMode();\r\n            }\r\n            else\r\n            {\r\n                SwitchToPasscodeMode();\r\n            }\r\n        }\r\n\r\n        private void SwitchToPasscodeMode()\r\n        {\r\n            Password = string.Empty;\r\n            PinPanel.Visibility = Visibility.Collapsed;\r\n            PasswordBox.Visibility = Visibility.Visible;\r\n\r\n            var focusedElement = FocusManager.GetFocusedElement();\r\n            if (focusedElement == PinTextBox)\r\n            {\r\n                PasswordBox.Focus();\r\n            }\r\n        }\r\n\r\n        private void SwitchToPinMode()\r\n        {\r\n            Password = string.Empty;\r\n            PinPanel.Visibility = Visibility.Visible;\r\n            PasswordBox.Visibility = Visibility.Collapsed;\r\n\r\n            var focusedElement = FocusManager.GetFocusedElement();\r\n            if (focusedElement == PasswordBox)\r\n            {\r\n                PinTextBox.Focus();\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty PasswordProperty = DependencyProperty.Register(\r\n            \"Password\", typeof (string), typeof (TelegramPasswordBox), new PropertyMetadata(string.Empty));\r\n\r\n        public string Password\r\n        {\r\n            get { return (string) GetValue(PasswordProperty); }\r\n            set { SetValue(PasswordProperty, value); }\r\n        }\r\n\r\n        public TelegramPasswordBox()\r\n        {\r\n            InitializeComponent();\r\n\r\n            SwitchMode(Simple);\r\n\r\n            GotFocus += OnGotFocus;\r\n        }\r\n\r\n        private void OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            if (Simple)\r\n            {\r\n                PinTextBox.Focus();\r\n            }\r\n            else\r\n            {\r\n                PasswordBox.Focus();\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            PinTextBox.Focus();\r\n        }\r\n\r\n        private void PasswordTextBox_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key >= Key.D0 && e.Key <= Key.D9 || e.Key == Key.Back || e.Key == Key.Enter)\r\n            {\r\n                return;\r\n            }\r\n\r\n            e.Handled = true;\r\n        }\r\n\r\n        public bool IsFocused\r\n        {\r\n            get\r\n            {\r\n                var focusedElement = FocusManager.GetFocusedElement();\r\n\r\n                return focusedElement == PinTextBox || focusedElement == PasswordBox;\r\n            }\r\n        }\r\n\r\n        public int Length\r\n        {\r\n            get { return Simple ? PinTextBox.Text.Length : PasswordBox.Password.Length; }\r\n        }\r\n\r\n        public event RoutedEventHandler PasswordChanged;\r\n\r\n        protected virtual void RaisePasswordChanged(RoutedEventArgs e)\r\n        {\r\n            var handler = PasswordChanged;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void PasswordBox_OnPasswordChanged(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!Simple)\r\n            {\r\n                RaisePasswordChanged(e);\r\n            }\r\n        }\r\n\r\n        private void PinTextBox_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            if (Simple)\r\n            {\r\n                RaisePasswordChanged(e);\r\n            }\r\n        }\r\n\r\n        private string _clipboardText;\r\n\r\n        private void PinTextBox_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            Clipboard.SetText(string.Empty);\r\n\r\n            PinTextBlock.Foreground = (Brush)Application.Current.Resources[\"PhoneTextBoxForegroundBrush\"];\r\n        }\r\n\r\n        private void PinTextBox_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            PinTextBlock.Foreground = PinTextBox.Foreground;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Additional/WebView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.WebView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"PortraitOrLandscape\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    OrientationChanged=\"WebView_OnOrientationChanged\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"CaptionBorder\" Grid.RowSpan=\"2\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <Button Margin=\"-4,18,0,0\" VerticalAlignment=\"Bottom\" Style=\"{StaticResource DialogDetailsCaptionButtonStyle}\">\r\n            <Button.RenderTransform>\r\n                <TranslateTransform x:Name=\"CaptionTransform\"/>\r\n            </Button.RenderTransform>\r\n            <StackPanel>\r\n                <StackPanel Orientation=\"Horizontal\" x:Name=\"Title\">\r\n                    <StackPanel.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </StackPanel.RenderTransform>\r\n                    <TextBlock HorizontalAlignment=\"Left\" Text=\"{Binding GameTitle, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n                </StackPanel>\r\n                <TextBlock x:Name=\"Subtitle\" Margin=\"6,-4,0,0\" Foreground=\"White\" Opacity=\"0.5\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            </StackPanel>\r\n        </Button>\r\n        <!--<StackPanel Grid.Row=\"0\" Margin=\"8,30,0,12\">\r\n            <TextBlock HorizontalAlignment=\"Left\" Text=\"{Binding GameTitle}\" MaxHeight=\"42.56\" Style=\"{StaticResource PhoneTextTitle2Style}\"/>\r\n            <TextBlock x:Name=\"Subtitle\" Margin=\"12,-4,0,0\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </StackPanel>-->\r\n\r\n        <phone:WebBrowser x:Name=\"Browser\" Grid.Row=\"1\" Source=\"{Binding Url}\" IsScriptEnabled=\"True\" LoadCompleted=\"Browser_OnLoadCompleted\" ScriptNotify=\"WebBrowser_OnScriptNotify\"/>\r\n        <Grid Grid.Row=\"2\" Visibility=\"Collapsed\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"*\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <TextBox x:Name=\"Input\"/>\r\n            <Button Grid.Column=\"1\" Visibility=\"Visible\" Content=\"send\" Click=\"ButtonBase_OnClick\"/>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Additional/WebView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class WebView\r\n    {\r\n        private readonly ApplicationBarMenuItem _shareMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Share,\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _copyLinkMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.CopyLink,\r\n        };\r\n\r\n        public WebViewModel ViewModel\r\n        {\r\n            get { return DataContext as WebViewModel; }\r\n        }\r\n\r\n        public WebView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            CaptionBorder.Background = ShellView.CaptionBrush;\r\n\r\n            _shareMenuItem.Click += (sender, args) => ViewModel.Share();\r\n            _copyLinkMenuItem.Click += (sender, args) => ViewModel.CopyLink();\r\n\r\n            BuildApplicationBar();\r\n\r\n            //var text = \"<html><body><script>function myfunc() { if (window.external && 'notify' in window.external) { window.external.notify(JSON.stringify({eventType: 'event_type', eventData: 'event_data'})); } } function logLastEvent (eventType, eventData) { document.getElementById('game_last_event').innerText = eventType + ', ' + JSON.stringify(eventData); } </script><code id=\\\"game_last_event\\\">no events yet, undefined</code> <button onclick=\\\"javascript:myfunc() \\\">Test</button> </body> </html>\";\r\n            //Browser.NavigateToString(text);\r\n        }\r\n\r\n        private void BuildApplicationBar()\r\n        {\r\n            ApplicationBar = new ApplicationBar { Mode = ApplicationBarMode.Minimized };\r\n            ApplicationBar.MenuItems.Add(_shareMenuItem);\r\n            ApplicationBar.MenuItems.Add(_copyLinkMenuItem);\r\n        }\r\n\r\n        private void WebBrowser_OnScriptNotify(object sender, NotifyEventArgs e)\r\n        {\r\n            ViewModel.ScriptNotify(e.Value);\r\n        }\r\n\r\n        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            //Browser\r\n            //Browser.NavigateToString(\"javascript: TelegramGameProxy.receiveEvent('ok_start', {test: 1});\");\r\n            Browser.InvokeScript(\"TelegramGameProxy_receiveEvent\", \"game_start\", Input.Text);\r\n            //Browser.InvokeScript(\"TelegramGameProxy.receiveEvent\", \"game_start\", \"{test: 1}\");\r\n        }\r\n\r\n        private void Browser_OnLoadCompleted(object sender, NavigationEventArgs e)\r\n        {\r\n            //Browser.IsScriptEnabled = true;\r\n        }\r\n\r\n        private void WebView_OnOrientationChanged(object sender, OrientationChangedEventArgs e)\r\n        {\r\n            var contentScaleFactor = Application.Current.Host.Content.ScaleFactor / 100.0;\r\n            var systemTrayHeight = 72.0 / contentScaleFactor;\r\n            CaptionTransform.X = e.Orientation == PageOrientation.LandscapeLeft ? systemTrayHeight : 0.0;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Auth/CancelConfirmResetView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Auth.CancelConfirmResetView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    micro:Message.Attach=\"[Event BackKeyPress] = [Action OnBackKeyPress]\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\" >\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" CacheMode=\"BitmapCache\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Code\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Confirm\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,80,12,23\">\r\n            <TextBlock Text=\"{Binding Resources.CancelAccountReset, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <StackPanel Grid.Row=\"0\">\r\n                <TextBlock Margin=\"12,0,12,-5\" Text=\"{Binding Resources.Code, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                <TextBox x:Name=\"Code\" MaxLength=\"{Binding CodeLength}\" Style=\"{StaticResource SignInTextBoxStyle}\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                    <TextBox.InputScope>\r\n                        <InputScope>\r\n                            <InputScopeName NameValue=\"Number\"/>\r\n                        </InputScope>\r\n                    </TextBox.InputScope>\r\n                </TextBox>\r\n                <RichTextBox Margin=\"0,25,0,0\" TextWrapping=\"Wrap\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" chats:ConvertToSupergroupView.FormattedText=\"{Binding Subtitle}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\">\r\n                    <RichTextBox.RenderTransform>\r\n                        <TranslateTransform Y=\"-100\"/>\r\n                    </RichTextBox.RenderTransform>\r\n                </RichTextBox>\r\n\r\n                <TextBlock Margin=\"12,12,12,0\" Text=\"{Binding TimeCounterString}\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                    <TextBlock.RenderTransform>\r\n                        <TranslateTransform Y=\"-100\"/>\r\n                    </TextBlock.RenderTransform>\r\n                </TextBlock>\r\n                <RichTextBox Margin=\"0,12,0,0\" Foreground=\"{StaticResource PhoneAccentBrush}\" Visibility=\"{Binding ResendCodeVisibility}\">\r\n                    <RichTextBox.RenderTransform>\r\n                        <TranslateTransform Y=\"-100\"/>\r\n                    </RichTextBox.RenderTransform>\r\n                    <Paragraph>\r\n                        <Hyperlink Click=\"ResendCode_OnClick\">\r\n                            <Run Text=\"{Binding Resources.HaveNotReceivedCode, Source={StaticResource Strings}}\"/>\r\n                        </Hyperlink>\r\n                    </Paragraph>\r\n                </RichTextBox>\r\n                <TextBlock x:Name=\"DebugString\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                    <TextBlock.RenderTransform>\r\n                        <TranslateTransform Y=\"-100\"/>\r\n                    </TextBlock.RenderTransform>\r\n                </TextBlock>\r\n\r\n                <StackPanel Margin=\"0,30,0,0\">\r\n                    <StackPanel.RenderTransform>\r\n                        <TranslateTransform Y=\"-100\"/>\r\n                    </StackPanel.RenderTransform>\r\n                    <Button x:Name=\"Confirm\" Width=\"204\" Content=\"{Binding Resources.Next, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" HorizontalAlignment=\"Left\"/>\r\n                    <!--<RichTextBox Margin=\"0,0,0,0\" Visibility=\"{Binding HelpVisibility}\">\r\n                        <Paragraph>\r\n                            <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding Resources.RegistrationProblemDescription, Source={StaticResource Strings}}\"/>\r\n                            <Hyperlink Click=\"Hyperlink_OnClick\" FontSize=\"{StaticResource PhoneFontSizeMedium}\">\r\n                                <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding Email}\"></Run>\r\n                            </Hyperlink>\r\n                            <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\".\"/>\r\n                        </Paragraph>\r\n                    </RichTextBox>-->\r\n                </StackPanel>\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n        <!--<views:DebugView Grid.Row=\"2\" DataContext=\"{Binding Debug}\"/>-->\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Auth/CancelConfirmResetView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Navigation;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Auth;\r\n\r\nnamespace TelegramClient.Views.Auth\r\n{\r\n    public partial class CancelConfirmResetView\r\n    {\r\n        public CancelConfirmResetViewModel ViewModel\r\n        {\r\n            get { return DataContext as CancelConfirmResetViewModel; }\r\n        }\r\n\r\n        public CancelConfirmResetView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) => Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.3), () => Code.Focus());\r\n        }\r\n\r\n        private void ResendCode_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.Resend();\r\n        }\r\n\r\n        private void Hyperlink_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SendMail();\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"ConfirmView.OnNavigatedTo\");\r\n#endif\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"ConfirmView.OnNavigatedFrom\");\r\n#endif\r\n\r\n            base.OnNavigatedFrom(e);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Auth/ConfirmPasswordView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Auth.ConfirmPasswordView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    mc:Ignorable=\"d\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <toolkit:SlideTransition Mode=\"SlideRightFadeIn\"/>\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <toolkit:SlideTransition Mode=\"SlideRightFadeOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <ControlTemplate x:Key=\"PhoneDisabledPasswordBoxTemplate\" TargetType=\"PasswordBox\">\r\n                <Border x:Name=\"ContentElement\" BorderThickness=\"0\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\"/>\r\n            </ControlTemplate>\r\n            \r\n            <Style x:Key=\"ConfirmPasswordPasswordBoxStyle\" TargetType=\"PasswordBox\">\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"SelectionBackground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                <Setter Property=\"FontSize\" Value=\"23\"/>\r\n                <Setter Property=\"Padding\" Value=\"14,2,1,2\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"PasswordBox\">\r\n                            <Grid Background=\"Transparent\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Collapsed</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Visible</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                        <VisualState x:Name=\"Focused\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramAccentBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Unfocused\"/>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"12,12,12,100\">\r\n                                    <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" HorizontalContentAlignment=\"Stretch\"/>\r\n                                </Border>\r\n                                <Border x:Name=\"DisabledBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"12,12,12,100\" Visibility=\"Collapsed\">\r\n                                    <PasswordBox x:Name=\"DisabledContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\" Password=\"{TemplateBinding Password}\" PasswordChar=\"{TemplateBinding PasswordChar}\" Padding=\"{TemplateBinding Padding}\" Template=\"{StaticResource PhoneDisabledPasswordBoxTemplate}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" CacheMode=\"BitmapCache\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"PasswordBox\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Confirm\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"ResetAccount\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"ForgotPassword\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.YourPassword, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <StackPanel Grid.Row=\"0\">\r\n                <TextBlock Margin=\"12,18,12,0\" Text=\"{Binding Resources.EnterPassword, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                <Grid>\r\n                    <PasswordBox x:Name=\"PasswordBox\" \r\n                                 VerticalContentAlignment=\"Top\" \r\n                                 Password=\"{Binding Code, Mode=TwoWay}\" \r\n                                 GotFocus=\"PasswordBox_OnGotFocus\" \r\n                                 LostFocus=\"PasswordBox_OnLostFocus\" \r\n                                 PasswordChanged=\"PasswordBox_OnPasswordChanged\" \r\n                                 KeyDown=\"Passcode_OnKeyDown\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdatePasswordBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </PasswordBox>\r\n                    <TextBlock x:Name=\"HintTextBlock\" \r\n                               IsHitTestVisible=\"False\" \r\n                               VerticalAlignment=\"Top\" \r\n                               FontSize=\"23\" \r\n                               Margin=\"31,20,31,0\" \r\n                               Text=\"{Binding PasswordHint}\" \r\n                               Opacity=\"0.6\" \r\n                               Foreground=\"{StaticResource PhoneForegroundBrush}\" \r\n                               Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n           </StackPanel>\r\n            <ContentControl \r\n                Grid.Row=\"1\"\r\n                HorizontalAlignment=\"Stretch\"\r\n                HorizontalContentAlignment=\"Stretch\"\r\n                FontSize=\"20\"\r\n                Foreground=\"{StaticResource PhoneSubtleBrush}\">\r\n                <ContentControl.RenderTransform>\r\n                    <TranslateTransform Y=\"0\"/>\r\n                </ContentControl.RenderTransform>\r\n                <StackPanel>\r\n                    <TextBlock Margin=\"12,12,12,18\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.PasswordMessage, Source={StaticResource Strings}}\"/>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Button x:Name=\"Confirm\" Width=\"204\" Content=\"{Binding Resources.Next, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" HorizontalAlignment=\"Left\"/>\r\n                        <Button x:Name=\"ForgotPassword\" Grid.Column=\"1\" Padding=\"0,2,0,6\" Content=\"{Binding Resources.ForgotPassword, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource TextButton}\"/>\r\n                    </Grid>\r\n                </StackPanel>\r\n            </ContentControl>\r\n        </Grid>\r\n        <Button x:Name=\"ResetAccount\" Visibility=\"{Binding ResetAccountVisibility}\" Grid.RowSpan=\"3\" VerticalAlignment=\"Bottom\" Margin=\"6\">\r\n            <StackPanel>\r\n                <TextBlock Text=\"{Binding Resources.ResetMyAccount, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                <TextBlock Margin=\"0,-2,0,7\" Foreground=\"#999999\" Text=\"{Binding Resources.ResetMyAccountHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            </StackPanel>\r\n        </Button>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Auth/ConfirmPasswordView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Navigation;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Auth;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.Views.Auth\r\n{\r\n    public partial class ConfirmPasswordView\r\n    {\r\n        public ConfirmPasswordViewModel ViewModel\r\n        {\r\n            get { return DataContext as ConfirmPasswordViewModel; }\r\n        }\r\n\r\n        public ConfirmPasswordView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) => Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.3), () => PasswordBox.Focus());\r\n        }\r\n\r\n        private void Passcode_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.Confirm();\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"ConfirmPasswordView.OnNavigatedTo\");\r\n#endif\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"ConfirmPasswordView.OnNavigatedFrom\");\r\n#endif\r\n\r\n            base.OnNavigatedFrom(e);\r\n        }\r\n\r\n        private void PasswordBox_OnPasswordChanged(object sender, RoutedEventArgs e)\r\n        {\r\n            HintTextBlock.Visibility = string.IsNullOrEmpty(PasswordBox.Password)\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n        }\r\n\r\n        private void PasswordBox_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            HintTextBlock.Foreground = (Brush) Application.Current.Resources[\"PhoneTextBoxForegroundBrush\"];\r\n        }\r\n\r\n        private void PasswordBox_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            HintTextBlock.Foreground = (Brush) Application.Current.Resources[\"PhoneForegroundBrush\"];\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Auth/ConfirmView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Auth.ConfirmView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    micro:Message.Attach=\"[Event BackKeyPress] = [Action OnBackKeyPress]\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    mc:Ignorable=\"d\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <toolkit:SlideTransition Mode=\"SlideRightFadeIn\"/>\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <toolkit:SlideTransition Mode=\"SlideRightFadeOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" CacheMode=\"BitmapCache\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Code\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Confirm\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        \r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Caption}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <StackPanel Grid.Row=\"0\">\r\n                <TextBlock Margin=\"12,18,12,0\" Text=\"{Binding Resources.Code, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                <TextBox x:Name=\"Code\" InputScope=\"Number\" MaxLength=\"{Binding CodeLength}\" Style=\"{StaticResource SignInTextBoxStyle}\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </TextBox>\r\n            </StackPanel>\r\n\r\n            <ContentControl \r\n                Grid.Row=\"1\"\r\n                HorizontalContentAlignment=\"Stretch\" \r\n                HorizontalAlignment=\"Stretch\" \r\n                FontSize=\"20\" \r\n                Foreground=\"{StaticResource PhoneSubtleBrush}\">\r\n                <ContentControl.RenderTransform>\r\n                    <TranslateTransform Y=\"-100\"/>\r\n                </ContentControl.RenderTransform>\r\n                <StackPanel>\r\n                    <RichTextBox Margin=\"0,12,0,0\" TextWrapping=\"Wrap\" chats:ConvertToSupergroupView.FormattedText=\"{Binding Subtitle}\"/>\r\n                    <TextBlock Margin=\"12,12,12,0\" Text=\"{Binding TimeCounterString}\"/>\r\n                    <RichTextBox Margin=\"0,12,0,0\" Visibility=\"{Binding ResendCodeVisibility}\">\r\n                        <Paragraph>\r\n                            <Hyperlink Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" Click=\"ResendCode_OnClick\">\r\n                                <Run Text=\"{Binding Resources.HaveNotReceivedCode, Source={StaticResource Strings}}\"/>\r\n                            </Hyperlink>\r\n                        </Paragraph>\r\n                    </RichTextBox>\r\n                    <TextBlock x:Name=\"DebugString\" Margin=\"12,12,12,0\" TextWrapping=\"Wrap\"/>\r\n                    <Button x:Name=\"Confirm\" Width=\"204\" Content=\"{Binding Resources.Next, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" HorizontalAlignment=\"Left\"/>\r\n                </StackPanel>\r\n            </ContentControl>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Auth/ConfirmView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Navigation;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Auth;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.Views.Auth\r\n{\r\n    public partial class ConfirmView\r\n    {\r\n        public ConfirmViewModel ViewModel\r\n        {\r\n            get { return DataContext as ConfirmViewModel; }\r\n        }\r\n\r\n        public ConfirmView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) => Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.3), () => Code.Focus());\r\n        }\r\n\r\n        private void ResendCode_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.Resend();\r\n        }\r\n\r\n        private void Hyperlink_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SendMail();\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"ConfirmView.OnNavigatedTo\");\r\n#endif\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"ConfirmView.OnNavigatedFrom\");\r\n#endif\r\n\r\n            base.OnNavigatedFrom(e);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Auth/ResetAccountView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Auth.ResetAccountView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <toolkit:SlideTransition Mode=\"SlideRightFadeIn\"/>\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <toolkit:SlideTransition Mode=\"SlideRightFadeOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" CacheMode=\"BitmapCache\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsTimerVisible}\" Value=\"True\" TrueState=\"TimerVisible\" FalseState=\"TimerHidden\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"ResetAccount\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"LogOut\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n            <VisualStateGroup x:Name=\"TimerGroup\">\r\n                <VisualState x:Name=\"TimerVisible\"/>\r\n                <VisualState x:Name=\"TimerHidden\">\r\n                    <Storyboard>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.Opacity)\" Storyboard.TargetName=\"TimerPanel\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:1.00\" Value=\"0\"/>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,80,12,23\">\r\n            <TextBlock Text=\"{Binding Resources.ResetAccount, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n            <RichTextBox Margin=\"0,25,0,0\" TextWrapping=\"Wrap\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" chats:ConvertToSupergroupView.FormattedText=\"{Binding Subtitle}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n\r\n            <StackPanel Margin=\"0,75,0,0\" x:Name=\"TimerPanel\">\r\n                <TextBlock Margin=\"12,0,12,0\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding Resources.ResetAccountIn, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                <RichTextBox Margin=\"0,0,0,0\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" chats:ConvertToSupergroupView.FormattedText=\"{Binding ConfirmWaitString}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            </StackPanel>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <StackPanel Grid.Row=\"0\">\r\n                <Grid Margin=\"0,22,0,0\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Button x:Name=\"ResetAccount\" Width=\"204\" Content=\"{Binding Resources.Reset, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" HorizontalAlignment=\"Left\"/>\r\n                    <Button x:Name=\"LogOut\" Grid.Column=\"1\" Padding=\"0,2,0,6\" Content=\"{Binding Resources.LogOut, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource TextButton}\"/>\r\n                </Grid>\r\n            </StackPanel>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Auth/ResetAccountView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Auth\r\n{\r\n    public partial class ResetAccountView\r\n    {\r\n        public ResetAccountView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Auth/SignInView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Auth.SignInView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    micro:Message.Attach=\"[Event BackKeyPress] = [Action OnBackKeyPressed($EventArgs)]\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <toolkit:SlideTransition Mode=\"SlideRightFadeIn\"/>\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <toolkit:SlideTransition Mode=\"SlideRightFadeOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" CacheMode=\"BitmapCache\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"PhoneNumber\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"SignIn\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"PCode\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"SelectCountry\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <Grid>\r\n                <TextBlock VerticalAlignment=\"Top\" Text=\"{Binding Resources.YourPhone, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n                <Button x:Name=\"ChangeProxy\" Margin=\"0,-20\" HorizontalAlignment=\"Right\" Content=\"{Binding Resources.ChangeProxy, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Foreground=\"White\" Style=\"{StaticResource TextButton}\"/>\r\n            </Grid>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <StackPanel Grid.Row=\"0\">\r\n                <TextBlock Margin=\"12,18,12,0\" Text=\"{Binding Resources.Country, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                <Button x:Name=\"SelectCountry\" HorizontalContentAlignment=\"Stretch\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Path Grid.Column=\"1\" Data=\"M0,0 9,9 18,0\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\"/>\r\n                        <TextBlock Visibility=\"{Binding IsPhoneCodeInvalid, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding SelectedCountry.Name}\"/>\r\n                        <TextBlock Visibility=\"{Binding IsPhoneCodeInvalid, Converter={StaticResource BooleanToVisibilityConverter}}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.ChooseYourCountry, Source={StaticResource Strings}}\"/>\r\n                    </Grid>\r\n                </Button>\r\n\r\n                <TextBlock Margin=\"12,12,12,0\" Text=\"{Binding Resources.PhoneNumber, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                <Grid Margin=\"0,0,0,22\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <TextBox x:Name=\"PCode\" Width=\"110\" MaxLength=\"4\" InputScope=\"TelephoneCountryCode\" KeyDown=\"PCode_OnKeyDown\" Text=\"{Binding PhoneCode, Mode=TwoWay}\" Style=\"{StaticResource PCodeTextBoxStyle}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </TextBox>\r\n                    <TextBox x:Name=\"PhoneNumber\" Grid.Column=\"1\" InputScope=\"TelephoneLocalNumber\" TextChanged=\"PhoneNumber_OnTextChanged\" KeyDown=\"PhoneNumber_OnKeyDown\" GotFocus=\"PhoneNumber_OnGotFocus\" Style=\"{StaticResource SignInTextBoxStyle}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </TextBox>\r\n                </Grid>\r\n\r\n                <StackPanel>\r\n                    <StackPanel.RenderTransform>\r\n                        <TranslateTransform Y=\"-100\"/>\r\n                    </StackPanel.RenderTransform>\r\n                    <TextBlock Margin=\"12,-10,12,0\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.SignInMessage, Source={StaticResource Strings}}\" FontSize=\"20\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n\r\n                    <Grid>\r\n                        <Button x:Name=\"SignIn\" Width=\"204\" Content=\"{Binding Resources.Next, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" HorizontalAlignment=\"Left\"/>\r\n                    </Grid>\r\n\r\n\r\n                    <RichTextBox Margin=\"0,25,0,0\" Visibility=\"{Binding HelpVisibility}\" FontSize=\"20\" Foreground=\"{StaticResource PhoneSubtleBrush}\">\r\n                        <Paragraph>\r\n                            <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.RegistrationProblemDescription, Source={StaticResource Strings}}\"/>\r\n                            <Hyperlink Click=\"Hyperlink_OnClick\" FontSize=\"{StaticResource PhoneFontSizeMedium}\">\r\n                                <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Email}\"/>\r\n                            </Hyperlink>\r\n                        </Paragraph>\r\n                    </RichTextBox>\r\n                </StackPanel>\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n        <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" \r\n              Visibility=\"{Binding Converter={StaticResource PrivateBetaToVisibilityConverter}}\"\r\n              Background=\"{StaticResource PhoneChromeBrush}\" VerticalAlignment=\"Bottom\">\r\n            <Grid x:Name=\"LogControl\" Visibility=\"Collapsed\" Height=\"600\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Button Grid.Row=\"0\" Grid.Column=\"1\" x:Name=\"Send\" Content=\"send\"/>\r\n                <ListBox Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" ItemsSource=\"{Binding Log.Items}\" >\r\n                    <ListBox.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <TextBlock TextWrapping=\"Wrap\" Text=\"{Binding}\"/>\r\n                        </DataTemplate>\r\n                    </ListBox.ItemTemplate>\r\n                </ListBox>\r\n            </Grid>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Auth/SignInView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Auth;\r\n\r\nnamespace TelegramClient.Views.Auth\r\n{\r\n    public partial class SignInView\r\n    {\r\n        public SignInViewModel ViewModel\r\n        {\r\n            get { return DataContext as SignInViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _logButton = new AppBarButton\r\n        {\r\n            Text = \"Log\",\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.manage.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public SignInView()\r\n        { \r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            _logButton.Click += ButtonBase_OnClick;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                var elapsed = App.Timer.Elapsed.ToString();\r\n\r\n                BuildLocalizedAppBar();\r\n\r\n                TLUtils.WriteLineAtBegin(\"Startup Time SignInView: \" + elapsed);\r\n                TLUtils.WritePerformance(\"Startup Time SignInView: \" + elapsed);\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.3), () =>\r\n                {\r\n                    if (LogControl.Visibility == Visibility.Collapsed)\r\n                    {\r\n                        PhoneNumber.Focus();\r\n                    }\r\n                });\r\n            };\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n#if !PRIVATE_BETA\r\n            return;\r\n#endif\r\n\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_logButton);\r\n        }\r\n\r\n        private void PhoneNumber_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            //SignIn.Margin = new Thickness(0, 0, 0, 300);\r\n            //ThreadPool.QueueUserWorkItem(state =>\r\n            //{\r\n            //    Thread.Sleep(1000);\r\n            //    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            //    {\r\n\r\n            //        Scroll.ScrollIntoView(SignIn);\r\n            //        //Scroll.ScrollIntoView(SignIn);\r\n            //    });\r\n            //});\r\n        }\r\n\r\n        private void PhoneNumber_OnKeyDown(object sender, KeyEventArgs args)\r\n        {\r\n            if (args.Key == Key.D8 || //звёздочка\r\n                    args.Key == Key.Unknown || //плюс (долгий тап по 0), или чёрточка/точка\r\n                    args.Key == Key.D3 || //решётка\r\n                    args.Key == Key.A ||\r\n                    args.Key == Key.Space)\r\n            {\r\n                args.Handled = true;\r\n            }\r\n\r\n            if (args.Key == Key.Back && PhoneNumber.Text.Length == 0)\r\n            {\r\n                args.Handled = true;\r\n                PCode.Focus();\r\n                PCode.Select(PCode.Text.Length, 0);\r\n            }\r\n        }\r\n\r\n        //private Dictionary<>\r\n\r\n        private void PCode_OnKeyDown(object sender, KeyEventArgs args)\r\n        {\r\n            if (args.Key == Key.D8 || // *\r\n                    args.Key == Key.Unknown || // +(long tap on 0) or -/.\r\n                    args.Key == Key.D3 || // #\r\n                    args.Key == Key.A)\r\n            {\r\n\r\n                args.Handled = true;\r\n            }\r\n\r\n            if (args.Key == Key.Space)\r\n            {\r\n                args.Handled = true;\r\n                PhoneNumber.Focus();\r\n            }\r\n\r\n            if (args.Key >= Key.NumPad0 && args.Key <= Key.NumPad9\r\n                && PCode.Text.Length == 3)\r\n            {\r\n                var codeTail = string.Empty;\r\n                if (ViewModel.IsPhoneCodeInvalid)\r\n                {\r\n                    var countryCode2 = CountryUtils.CountriesSource.FirstOrDefault(x => x.PhoneCode == PCode.Text.Substring(0, 2));\r\n                    if (countryCode2 != null)\r\n                    {\r\n                        codeTail = PCode.Text.Substring(2, 1);\r\n                        PCode.Text = PCode.Text.Substring(0, 2);\r\n                    }\r\n\r\n                    var countryCode1 = CountryUtils.CountriesSource.FirstOrDefault(x => x.PhoneCode == PCode.Text.Substring(0, 1));\r\n                    if (countryCode1 != null)\r\n                    {\r\n                        codeTail = PCode.Text.Substring(1, 2);\r\n                        PCode.Text = PCode.Text.Substring(0, 1);\r\n                    }\r\n                }\r\n                \r\n\r\n                args.Handled = true;\r\n                PhoneNumber.Text = codeTail + args.Key.ToString().Replace(\"NumPad\", string.Empty) + PhoneNumber.Text;\r\n                PhoneNumber.SelectionStart = codeTail.Length + 1;\r\n                PhoneNumber.Focus();\r\n            }\r\n\r\n            //if (args.Key == Key.Back\r\n            //    && PCode.Text.Length > 0\r\n            //    && PCode.Text[0] == '+'\r\n            //    && PCode.SelectionStart == 1)\r\n            //{\r\n            //    args.Handled = true;\r\n            //}\r\n        }\r\n\r\n        private void PhoneNumber_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            _logButton.IsEnabled = PhoneNumber.Text.Length >= 2;\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            if (LogControl.Visibility == Visibility.Visible)\r\n            {\r\n                ButtonBase_OnClick(this, e);\r\n                e.Cancel = true;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        private void ButtonBase_OnClick(object sender, System.EventArgs eventArgs)\r\n        {\r\n            if (FocusManager.GetFocusedElement() == PhoneNumber)\r\n            {\r\n                Self.Focus();\r\n            }\r\n\r\n            LogControl.Visibility = LogControl.Visibility == Visibility.Visible? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        private void Hyperlink_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SendMail();\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"SignInView.OnNavigatedTo\");\r\n#endif\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n#if LOG_REGISTRATION\r\n            TLUtils.WriteLog(\"SignInView.OnNavigatedFrom\");\r\n#endif\r\n\r\n            base.OnNavigatedFrom(e);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Auth/SignUpView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Auth.SignUpView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    mc:Ignorable=\"d\"\r\n    BackKeyPress=\"SignUpView_OnBackKeyPress\">\r\n    \r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <toolkit:SlideTransition Mode=\"SlideRightFadeIn\"/>\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <toolkit:SlideTransition Mode=\"SlideRightFadeOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" CacheMode=\"BitmapCache\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"FirstName\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"LastName\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"SignUp\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.YourName, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid Width=\"100\" Height=\"100\" HorizontalAlignment=\"Left\" Margin=\"12,18,12,0\" micro:Message.Attach=\"[Event Tap] = [Action ChoosePhoto]\" Background=\"Transparent\">\r\n                <Grid.Clip>\r\n                    <EllipseGeometry x:Name=\"ImageClipGeometry\" Center=\"50,50\" RadiusX=\"50\" RadiusY=\"50\"/>\r\n                </Grid.Clip>\r\n                <Ellipse x:Name=\"Ellipse\" Fill=\"{StaticResource PhoneChromeBrush}\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"/>\r\n                <TextBlock x:Name=\"Label\" TextWrapping=\"Wrap\" TextAlignment=\"Center\" Text=\"{Binding Resources.AddPhoto, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" FontSize=\"20\" Margin=\"6,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n                <Image x:Name=\"Image\" Stretch=\"UniformToFill\" Source=\"{Binding PhotoBytes, Converter={StaticResource PhotoBytesToImageConverter}}\"/>\r\n            </Grid>\r\n            \r\n            <StackPanel Grid.Row=\"1\">\r\n                <TextBlock Text=\"{Binding Resources.FirstName, Source={StaticResource Strings}}\" FontSize=\"23\" Margin=\"12,18,12,0\"/>\r\n                <TextBox x:Name=\"FirstName\" Style=\"{StaticResource SignInTextBoxStyle}\" InputScope=\"PersonalGivenName\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </TextBox>\r\n            </StackPanel>\r\n            \r\n            <StackPanel Grid.Row=\"2\">\r\n                <StackPanel.RenderTransform>\r\n                    <TranslateTransform Y=\"-100\"/>\r\n                </StackPanel.RenderTransform>\r\n                \r\n                <TextBlock Margin=\"12,18,12,0\" Text=\"{Binding Resources.LastName, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                <TextBox x:Name=\"LastName\" Style=\"{StaticResource SignInTextBoxStyle}\" InputScope=\"PersonalSurname\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </TextBox>\r\n                \r\n                <TextBlock Margin=\"12,12,12,0\" TextWrapping=\"Wrap\" FontSize=\"20\" Foreground=\"{StaticResource PhoneSubtleBrush}\" Text=\"{Binding Resources.SignUpMessage, Source={StaticResource Strings}}\">\r\n                    <TextBlock.RenderTransform>\r\n                        <TranslateTransform Y=\"-100\"/>\r\n                    </TextBlock.RenderTransform>    \r\n                </TextBlock>\r\n\r\n                <Button x:Name=\"SignUp\" Width=\"204\" Content=\"{Binding Resources.Next, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" HorizontalAlignment=\"Left\">\r\n                    <Button.RenderTransform>\r\n                        <TranslateTransform Y=\"-100\"/>\r\n                    </Button.RenderTransform>\r\n                </Button>\r\n            </StackPanel>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Auth/SignUpView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows.Media;\r\nusing TelegramClient.Views.Controls;\r\nusing Execute = Telegram.Api.Helpers.Execute; \r\n\r\nnamespace TelegramClient.Views.Auth\r\n{\r\n    public partial class SignUpView\r\n    {\r\n        public SignUpView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) => Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.3), () => FirstName.Focus());\r\n        }\r\n\r\n        private void SignUpView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                var multiplePhotoChooser = popup.Child as OpenPhotoPicker;\r\n                if (multiplePhotoChooser != null)\r\n                {\r\n                    multiplePhotoChooser.TryClose();\r\n                }\r\n\r\n                var cropControl = popup.Child as CropControl;\r\n                if (cropControl != null)\r\n                {\r\n                    cropControl.TryClose();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/AddAdminsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.AddAdminsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:controls1=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n\r\n        <DataTemplate x:Key=\"UserItemTemplate\">\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"0,0,0,12\" Background=\"Transparent\" >\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"62\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <CheckBox IsChecked=\"{Binding IsSelected, Mode=TwoWay}\" IsEnabled=\"{Binding DataContext.AdminsEnabled, ElementName=Self}\" Style=\"{x:Null}\"/>\r\n                    <Border Grid.Column=\"1\" Width=\"62\" Height=\"62\" Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\">\r\n                        <Grid>\r\n                            <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                            <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                        </Grid>\r\n                    </Border>\r\n                    <Grid Grid.Column=\"2\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <controls1:HighlightingTextBlock Grid.Column=\"0\"\r\n                                HorizontalAlignment=\"Left\"\r\n                                Margin=\"14,-6,0,0\"\r\n                                MaxHeight=\"42.56\"\r\n                                Text=\"{Binding FullName}\"\r\n                                HighlightText=\"{Binding DataContext.Text, ElementName=Self}\"\r\n                                HighlightBrush=\"{StaticResource PhoneAccentBrush}\">\r\n                            <controls1:HighlightingTextBlock.TextBlockStyle>\r\n                                <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextLargeStyle}\">\r\n                                    <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                </Style>\r\n                            </controls1:HighlightingTextBlock.TextBlockStyle>\r\n                        </controls1:HighlightingTextBlock>\r\n                        <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n                    \r\n                    <Border Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Background=\"Transparent\" Tap=\"UIElement_OnTap\"/>\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"TelegramNavigationTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel x:Name=\"TitlePanel\" Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.SetAdmins, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <longListSelector:LongListSelector \r\n            Grid.Row=\"1\"\r\n            ItemsSource=\"{Binding Items}\"\r\n            ItemTemplate=\"{StaticResource UserItemTemplate}\"\r\n            IsFlatList=\"True\" Margin=\"12,0\">\r\n            <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                <DataTemplate>\r\n                    <StackPanel DataContext=\"{Binding DataContext, ElementName=Self}\">\r\n                        <toolkit:ToggleSwitch Margin=\"0,0,-24,-21\" IsEnabled=\"{Binding IsEnabled}\" IsChecked=\"{Binding AdminsEnabled, Mode=TwoWay, Converter={StaticResource InvertBooleanConverter}}\" Header=\"{Binding Resources.AllMembersAreAdmins, Source={StaticResource Strings}}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                            </i:Interaction.Behaviors>\r\n                        </toolkit:ToggleSwitch>\r\n                        <TextBlock Text=\"{Binding AddAdminsDescription}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,12,12,30\"/>\r\n                    </StackPanel>\r\n                </DataTemplate>\r\n            </longListSelector:LongListSelector.ListHeaderTemplate>\r\n            <longListSelector:LongListSelector.ListFooterTemplate>\r\n                <DataTemplate>\r\n                    <TextBlock Margin=\"16,0\" Text=\"{Binding DataContext.Status, ElementName=Self}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                </DataTemplate>\r\n            </longListSelector:LongListSelector.ListFooterTemplate>\r\n        </longListSelector:LongListSelector>\r\n\r\n        <StackPanel x:Name=\"SearchPanel\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Margin=\"12,29,12,12\" Visibility=\"Collapsed\">\r\n            <StackPanel.RenderTransform>\r\n                <CompositeTransform/>\r\n            </StackPanel.RenderTransform>\r\n            <controls1:WatermarkedTextBox x:Name=\"SearchBox\" Text=\"{Binding Text, Mode=TwoWay}\" Watermark=\"{Binding Resources.Search, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                <controls1:WatermarkedTextBox.InputScope>\r\n                    <InputScope>\r\n                        <InputScopeName NameValue=\"Search\"/>\r\n                    </InputScope>\r\n                </controls1:WatermarkedTextBox.InputScope>\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls1:WatermarkedTextBox>\r\n        </StackPanel>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/AddAdminsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media.Animation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Chats;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class AddAdminsView: IDisposable\r\n    {\r\n        private readonly IDisposable _keyPressSubscription;\r\n\r\n        private readonly AppBarButton _searchButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Search,\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.feature.search.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public AddAdminsViewModel ViewModel\r\n        {\r\n            get { return DataContext as AddAdminsViewModel; }\r\n        }\r\n\r\n        public AddAdminsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _searchButton.Click += (sender, args) =>\r\n            {\r\n                if (SearchPanel.Visibility == Visibility.Collapsed)\r\n                {\r\n                    OpenSearchPanel();\r\n                }\r\n                else\r\n                {\r\n                    CloseSearchPanel();\r\n                }\r\n            };\r\n\r\n            var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                keh => { SearchBox.TextChanged += keh; },\r\n                keh => { SearchBox.TextChanged -= keh; });\r\n\r\n            _keyPressSubscription = keyPressEvents\r\n                .Throttle(TimeSpan.FromSeconds(0.10))\r\n                .ObserveOnDispatcher()\r\n                .Subscribe(e => ViewModel.Search());\r\n\r\n            BuildLocalizedAppBar();\r\n        }\r\n\r\n        private void OpenSearchPanel()\r\n        {\r\n            //SearchPanel.Visibility = Visibility.Visible;\r\n            //TitlePanel.Opacity = 0.0;\r\n\r\n            //SearchBox.Focus();\r\n\r\n            var storyboard = new Storyboard();\r\n            var searchBox = new DoubleAnimationUsingKeyFrames();\r\n            searchBox.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -100.0 });\r\n            searchBox.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n            Storyboard.SetTarget(searchBox, SearchPanel);\r\n            Storyboard.SetTargetProperty(searchBox, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(searchBox);\r\n\r\n            var searchBoxOpacity = new DoubleAnimation\r\n            {\r\n                From = 0.0,\r\n                To = 1.0,\r\n                Duration = TimeSpan.FromSeconds(0.15),\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 }\r\n            };\r\n            Storyboard.SetTarget(searchBoxOpacity, SearchPanel);\r\n            Storyboard.SetTargetProperty(searchBoxOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(searchBoxOpacity);\r\n\r\n            var titlePanelOpacity = new DoubleAnimation\r\n            {\r\n                From = 1.0,\r\n                To = 0.0,\r\n                Duration = TimeSpan.FromSeconds(0.15),\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 }\r\n            };\r\n            Storyboard.SetTarget(titlePanelOpacity, TitlePanel);\r\n            Storyboard.SetTargetProperty(titlePanelOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(titlePanelOpacity);\r\n\r\n\r\n            SearchPanel.Opacity = 0.0;\r\n            SearchPanel.Visibility = Visibility.Visible;\r\n\r\n            storyboard.Completed += (sender, args) => SearchBox.Focus();\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            base.OnBackKeyPress(e);\r\n\r\n            if (SearchPanel.Visibility == Visibility.Visible)\r\n            {\r\n                CloseSearchPanel();\r\n\r\n                e.Cancel = true;\r\n            }\r\n        }\r\n\r\n        private void CloseSearchPanel()\r\n        {\r\n            //SearchPanel.Visibility = Visibility.Collapsed;\r\n            //TitlePanel.Opacity = 1.0;\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var searchBox = new DoubleAnimationUsingKeyFrames();\r\n            searchBox.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            searchBox.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = -100.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 3.0 } });\r\n            Storyboard.SetTarget(searchBox, SearchPanel);\r\n            Storyboard.SetTargetProperty(searchBox, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(searchBox);\r\n\r\n            var searchBoxOpacity = new DoubleAnimation\r\n            {\r\n                From = 1.0,\r\n                To = 0.0,\r\n                Duration = TimeSpan.FromSeconds(0.15),\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 3.0 }\r\n            };\r\n            Storyboard.SetTarget(searchBoxOpacity, SearchPanel);\r\n            Storyboard.SetTargetProperty(searchBoxOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(searchBoxOpacity);\r\n\r\n            var titlePanelOpacity = new DoubleAnimation\r\n            {\r\n                From = 0.0,\r\n                To = 1.0,\r\n                Duration = TimeSpan.FromSeconds(0.15),\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 3.0 }\r\n            };\r\n            Storyboard.SetTarget(titlePanelOpacity, TitlePanel);\r\n            Storyboard.SetTargetProperty(titlePanelOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(titlePanelOpacity);\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                SearchPanel.Visibility = Visibility.Collapsed;\r\n                ViewModel.Text = string.Empty;\r\n            };\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_searchButton);\r\n        }\r\n\r\n        private void TelegramNavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.ForwardInAnimationComplete();\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var checkBox = sender as FrameworkElement;\r\n            if (checkBox != null)\r\n            {\r\n                var user = checkBox.DataContext as TLUserBase;\r\n                if (user != null)\r\n                {\r\n                    ViewModel.EditChatAdmin(user);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _keyPressSubscription.Dispose();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/AddChannelManagerView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.AddChannelManagerView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.AddManager, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n            <!--<TextBlock Text=\"page name\" Margin=\"9,-7,0,0\" Style=\"{StaticResource PhoneTextTelegramTitle1Style}\"/>-->\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Margin=\"12,0\" Grid.Row=\"1\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <TextBlock Text=\"{Binding Resources.AccessLevel, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Margin=\"12,12,12,0\" FontSize=\"29\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n\r\n            <RadioButton Grid.Row=\"1\" GroupName=\"AccessLevel\" IsChecked=\"True\" Content=\"{Binding Resources.Moderator, Source={StaticResource Strings}}\"/>\r\n            <TextBlock Grid.Row=\"2\" Text=\"{Binding Resources.ModeratorDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,-12,12,0\"/>\r\n\r\n            <RadioButton Margin=\"0,24,12,0\" Grid.Row=\"3\" GroupName=\"AccessLevel\" Content=\"{Binding Resources.Publisher, Source={StaticResource Strings}}\"/>\r\n            <TextBlock Grid.Row=\"4\" Text=\"{Binding Resources.PublisherDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,-12,12,0\"/>\r\n\r\n\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/AddChannelManagerView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Chats;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class AddChannelManagerView\r\n    {\r\n        public AddChannelManagerViewModel ViewModel\r\n        {\r\n            get { return DataContext as AddChannelManagerViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public AddChannelManagerView()\r\n        {\r\n            InitializeComponent();\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            Loaded += (o, e) => BuildLocalizedAppBar();\r\n        }\r\n\r\n        private bool _initialized;\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (_initialized) return;\r\n\r\n            _initialized = true;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_doneButton);\r\n            ApplicationBar.Buttons.Add(_cancelButton);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/AddChatParticipantView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.AddChatParticipantView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.AddParticipant, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n            <!--<TextBlock Text=\"page name\" Margin=\"9,-7,0,0\" Style=\"{StaticResource PhoneTextTelegramTitle1Style}\"/>-->\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Button Visibility=\"{Binding InviteVisibility}\" Margin=\"-6,-12,0,18\" Style=\"{StaticResource ProfileButtonStyle}\" micro:Message.Attach=\"InviteGroupViaLink\">\r\n                <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.InviteGroupViaLink, Source={StaticResource Strings}}\"/>\r\n            </Button>\r\n\r\n            <ItemsControl Grid.Row=\"1\" Margin=\"6,0,0,0\" ItemsSource=\"{Binding Items}\" ItemTemplate=\"{StaticResource UserItemTemplate}\">\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer>\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n            </ItemsControl>\r\n        </Grid>\r\n        <ContentControl Grid.Row=\"0\" Grid.RowSpan=\"2\" x:Name=\"Confirmation\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" />\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/AddChatParticipantView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Chats;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class AddChatParticipantView\r\n    {\r\n        public AddChatParticipantViewModel ViewModel\r\n        {\r\n            get { return DataContext as AddChatParticipantViewModel; }\r\n        }\r\n\r\n        private readonly ApplicationBarIconButton _searchButton = new ApplicationBarIconButton\r\n        {\r\n            Text = AppResources.Search,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.feature.search.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public AddChatParticipantView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _searchButton.Click += (sender, args) => ViewModel.Search();\r\n\r\n            Loaded += (o, e) => BuildLocalizedAppBar();\r\n        }\r\n\r\n        private bool _initialized;\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (_initialized) return;\r\n\r\n            _initialized = true;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_searchButton);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/AddSecretChatParticipantView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.AddSecretChatParticipantView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"UserItemTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\">\r\n                        <Grid.Triggers>\r\n                            <EventTrigger RoutedEvent=\"Grid.Loaded\">\r\n                                <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"00:00:0.15\" From=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"MainItemGrid\"/>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </EventTrigger>\r\n                        </Grid.Triggers>\r\n\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"72\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <views:ConversationTileControl Size=\"72\" \r\n                            Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                            Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                            Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                            Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <toolkit:SwivelTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <toolkit:SwivelTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.AddParticipant, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n        \r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\">\r\n            <ItemsControl Margin=\"6,0,0,0\" IsHitTestVisible=\"{Binding IsNotWorking}\" ItemsSource=\"{Binding Items}\" ItemTemplate=\"{StaticResource UserItemTemplate}\"> \r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer>\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n            </ItemsControl>\r\n        </Grid>\r\n\r\n        <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Visibility=\"{Binding ProgressVisibility}\">\r\n            <Border Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.5\"/>\r\n            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\">\r\n                <Border Margin=\"-6\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"1\"/>\r\n                <TextBlock Margin=\"6,0\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" FontSize=\"20\" Text=\"{Binding Resources.Loading, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n            </Grid>\r\n        </Grid>\r\n\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/AddSecretChatParticipantView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class AddSecretChatParticipantView\r\n    {\r\n        public AddSecretChatParticipantViewModel ViewModel\r\n        {\r\n            get { return DataContext as AddSecretChatParticipantViewModel; }\r\n        }\r\n\r\n        private readonly ApplicationBarIconButton _searchButton = new ApplicationBarIconButton\r\n        {\r\n            Text = AppResources.Search,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.feature.search.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public AddSecretChatParticipantView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _searchButton.Click += (sender, args) => ViewModel.Search();\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                BuildLocalizedAppBar();\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n\r\n            Unloaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsWorking))\r\n            {\r\n                if (!ViewModel.IsWorking)\r\n                {\r\n                    RestoreTapedItem();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void RestoreTapedItem()\r\n        {\r\n            if (_tapedItem != null)\r\n            {\r\n                if (_lastStoryboard != null)\r\n                {\r\n                    _lastStoryboard.Stop();\r\n                }\r\n\r\n                _tapedItem.Opacity = 1.0;\r\n                var compositeTransform = _tapedItem.RenderTransform as CompositeTransform;\r\n                if (compositeTransform != null)\r\n                {\r\n                    compositeTransform.TranslateX = 0.0;\r\n                    compositeTransform.TranslateY = 0.0;\r\n                }\r\n            }\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            RestoreTapedItem();\r\n\r\n            if (ViewModel.Contact != null)\r\n            {\r\n                e.Cancel = true;\r\n                ViewModel.CancelSecretChat();\r\n                return;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        private bool _initialized;\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (_initialized) return;\r\n\r\n            _initialized = true;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_searchButton);\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (_tapedItem != null)\r\n            {\r\n                _tapedItem.Opacity = 1.0;\r\n                ((CompositeTransform)_tapedItem.RenderTransform).TranslateX = 0.0;\r\n                ((CompositeTransform)_tapedItem.RenderTransform).TranslateY = 0.0;\r\n            }\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        private FrameworkElement _tapedItem;\r\n        private Storyboard _lastStoryboard;\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (ViewModel.IsWorking) return;\r\n\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            var user = frameworkElement.DataContext as TLUserBase;\r\n            if (user == null) return;\r\n\r\n            ViewModel.UserAction(user);\r\n\r\n            var tapedItem = frameworkElement;\r\n\r\n            _tapedItem = tapedItem;\r\n            \r\n            VisualTreeExtensions.FindVisualChildWithPredicate<TextBlock>(tapedItem, AnimatedBasePage.GetIsAnimationTarget);\r\n\r\n            if (!(_tapedItem.RenderTransform is CompositeTransform))\r\n            {\r\n                _tapedItem.RenderTransform = new CompositeTransform();\r\n            }\r\n\r\n            FrameworkElement tapedItemContainer = _tapedItem.FindParentOfType<ListBoxItem>();\r\n\r\n            if (tapedItemContainer != null)\r\n            {\r\n                tapedItemContainer = tapedItemContainer.FindParentOfType<ContentPresenter>();\r\n            }\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var timeline = new DoubleAnimationUsingKeyFrames();\r\n            timeline.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            timeline.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 73.0 });\r\n            Storyboard.SetTarget(timeline, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(timeline);\r\n\r\n            var timeline2 = new DoubleAnimationUsingKeyFrames();\r\n            timeline2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            timeline2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 425.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 } });\r\n            Storyboard.SetTarget(timeline2, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(timeline2);\r\n\r\n            var timeline3 = new DoubleAnimationUsingKeyFrames();\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 1.0 });\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = 1.0 });\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n            Storyboard.SetTarget(timeline3, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline3, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(timeline3);\r\n\r\n            if (tapedItemContainer != null)\r\n            {\r\n                var timeline4 = new ObjectAnimationUsingKeyFrames();\r\n                timeline4.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 999.0 });\r\n                timeline4.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n                Storyboard.SetTarget(timeline4, tapedItemContainer);\r\n                Storyboard.SetTargetProperty(timeline4, new PropertyPath(\"(Canvas.ZIndex)\"));\r\n                storyboard.Children.Add(timeline4);\r\n            }\r\n            _lastStoryboard = storyboard;\r\n            storyboard.Begin();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/ChannelAdministratorsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.ChannelAdministratorsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"TelegramNavigationTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"UserItemTemplate\">\r\n            <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" micro:Message.Attach=\"[Event Tap] = [Action ViewUser($DataContext)]\">\r\n                <toolkit:ContextMenuService.ContextMenu>\r\n                    <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\" Loaded=\"ContextMenu_OnLoaded\">\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteMember($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                    </toolkit:ContextMenu>\r\n                </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"72\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName2}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                        Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                        Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                        Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                        Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Administrators, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <longListSelector:LongListSelector \r\n                Grid.Row=\"1\"\r\n                Margin=\"6,0,0,0\" \r\n                ItemsSource=\"{Binding Items}\" \r\n                IsFlatList=\"True\"\r\n                ItemTemplate=\"{StaticResource UserItemTemplate}\">\r\n            <longListSelector:LongListSelector.ListHeader>\r\n                <Grid x:Name=\"ContentPanel\" Margin=\"0,18,6,12\" DataContext=\"{Binding DataContext, ElementName=Self}\" Visibility=\"{Binding CurrentItem.Creator, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Visible}\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n\r\n                    <Grid Grid.Row=\"0\" Visibility=\"{Binding CurrentItem.IsMegaGroup, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Visible}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <toolkit:ListPicker\r\n                            Margin=\"12,0,12,0\" Grid.Row=\"1\"\r\n                            Header=\"{Binding Resources.AddNewMembers, Source={StaticResource Strings}}\"\r\n                            ItemsSource=\"{Binding ChatInviteItems}\"\r\n                            SelectedItem=\"{Binding SelectedChatInviteItem, Mode=TwoWay}\"\r\n                            FullModeHeader=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                            <toolkit:ListPicker.ItemTemplate>\r\n                                <DataTemplate>\r\n                                    <TextBlock Text=\"{Binding}\"/>\r\n                                </DataTemplate>\r\n                            </toolkit:ListPicker.ItemTemplate>\r\n                            <toolkit:ListPicker.FullModeItemTemplate>\r\n                                <DataTemplate>\r\n                                    <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                                </DataTemplate>\r\n                            </toolkit:ListPicker.FullModeItemTemplate>\r\n                        </toolkit:ListPicker>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"1\" Grid.ColumnSpan=\"2\" Margin=\"0,24,0,0\" x:Name=\"Actions\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"AddMember\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                            <StackPanel>\r\n                                <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.AddAdministrator, Source={StaticResource Strings}}\"/>\r\n                                <!--<TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding AdministratorsSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>-->\r\n                            </StackPanel>\r\n                        </Button>\r\n\r\n                        <TextBlock Grid.Row=\"1\" Margin=\"12,24,12,0\" Text=\"{Binding AddAdministratorHint}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </longListSelector:LongListSelector.ListHeader>\r\n            <longListSelector:LongListSelector.ListFooterTemplate>\r\n                <DataTemplate>\r\n                    <Border>\r\n                        <TextBlock Margin=\"12,0\" Text=\"{Binding DataContext.Status, ElementName=Self}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                    </Border>\r\n                </DataTemplate>\r\n            </longListSelector:LongListSelector.ListFooterTemplate>\r\n        </longListSelector:LongListSelector>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/ChannelAdministratorsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class ChannelAdministratorsView\r\n    {\r\n        public ChannelAdministratorsViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChannelAdministratorsViewModel; }\r\n        }\r\n\r\n        public ChannelAdministratorsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void TelegramNavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.ForwardInAnimationComplete();\r\n        }\r\n\r\n        private void ContextMenu_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var contextMenu = sender as ContextMenu;\r\n            if (contextMenu == null) return;\r\n\r\n            var channel = ViewModel.CurrentItem as TLChannel;\r\n            if (channel != null && !channel.Creator)\r\n            {\r\n                contextMenu.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var user = contextMenu.DataContext as TLUserBase;\r\n            if (user == null) return;\r\n\r\n            contextMenu.Visibility = user.Index == IoC.Get<IStateService>().CurrentUserId\r\n                ? Visibility.Collapsed\r\n                : Visibility.Visible;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/ChannelIntroView.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Chats.ChannelIntroView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <StackPanel VerticalAlignment=\"Center\">\r\n            <Image Margin=\"0,64,0,0\" Source=\"{Binding ImageSource}\" Width=\"240\"/>\r\n            <TextBlock Margin=\"48,64,48,0\" TextAlignment=\"Center\" Text=\"{Binding Resources.WhatIsChannel, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextTitle2Style}\" />\r\n            <TextBlock Margin=\"48,24,48,64\" TextAlignment=\"Center\" Text=\"{Binding Resources.WhatIsChannelDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\" />\r\n            <Button x:Name=\"CreateChannel\" HorizontalAlignment=\"Center\" Padding=\"60,2,60,6\" Content=\"{Binding Resources.Create, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n        </StackPanel>\r\n    </Grid>\r\n\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Chats/ChannelIntroView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing TelegramClient.Animation.Navigation;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class ChannelIntroView\r\n    {\r\n        public ChannelIntroView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SwivelShowAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return new SwivelHideAnimator { RootElement = LayoutRoot };\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/ChannelMembersView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.ChannelMembersView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"TelegramNavigationTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"UserItemTemplate\">\r\n            <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" micro:Message.Attach=\"[Event Tap] = [Action ViewUser($DataContext)]\">\r\n                <toolkit:ContextMenuService.ContextMenu>\r\n                    <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\" Loaded=\"ContextMenu_OnLoaded\">\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteMember($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                    </toolkit:ContextMenu>\r\n                </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"72\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName2}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                        Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                        Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                        Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                        Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Members, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n        \r\n        <longListSelector:LongListSelector \r\n                Grid.Row=\"1\"\r\n                Margin=\"6,0,0,0\" \r\n                ItemsSource=\"{Binding Items}\" \r\n                IsFlatList=\"True\"\r\n                ItemTemplate=\"{StaticResource UserItemTemplate}\">\r\n            <longListSelector:LongListSelector.ListHeader>\r\n                <Grid x:Name=\"ContentPanel\" Margin=\"0,18,6,12\" DataContext=\"{Binding DataContext, ElementName=Self}\" Visibility=\"{Binding CurrentItem.Creator, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n\r\n                    <Grid Grid.Row=\"1\" Grid.ColumnSpan=\"2\" Margin=\"0,-8,0,0\" x:Name=\"Actions\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Grid x:Name=\"SettingsGrid\" Margin=\"0,0,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"AddMember\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.AddParticipant, Source={StaticResource Strings}}\"/>\r\n                                    <!--<TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding AdministratorsSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>-->\r\n                                </StackPanel>\r\n                            </Button>\r\n\r\n                            <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" Grid.Row=\"1\" micro:Message.Attach=\"Invite\" Visibility=\"{Binding IsPublic, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.InviteViaLink, Source={StaticResource Strings}}\"/>\r\n                                    <!--<TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding AdministratorsSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>-->\r\n                                </StackPanel>\r\n                            </Button>\r\n                        </Grid>\r\n\r\n                        <TextBlock Grid.Row=\"1\" Margin=\"12,24,12,0\" Text=\"{Binding Resources.ChannelMembersHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </longListSelector:LongListSelector.ListHeader>\r\n            <longListSelector:LongListSelector.ListFooterTemplate>\r\n                <DataTemplate>\r\n                    <Border>\r\n                        <TextBlock Margin=\"12,0\" Text=\"{Binding DataContext.Status, ElementName=Self}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                    </Border>\r\n                </DataTemplate>\r\n            </longListSelector:LongListSelector.ListFooterTemplate>\r\n        </longListSelector:LongListSelector>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/ChannelMembersView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class ChannelMembersView\r\n    {\r\n        public ChannelMembersViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChannelMembersViewModel; }\r\n        }\r\n\r\n        public ChannelMembersView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void TelegramNavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.ForwardInAnimationComplete();\r\n        }\r\n\r\n        private void ContextMenu_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var contextMenu = sender as ContextMenu;\r\n            if (contextMenu == null) return;\r\n\r\n            var user = contextMenu.DataContext as TLUserBase;\r\n            if (user == null) return;\r\n\r\n            contextMenu.Visibility = user.Index == IoC.Get<IStateService>().CurrentUserId\r\n                ? Visibility.Collapsed\r\n                : Visibility.Visible;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/Chat2View.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.Chat2View\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,17,0,28\">\r\n            <TextBlock Text=\"MY APPLICATION\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n            <TextBlock Text=\"{Binding Timer, ElementName=Self}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n            <TextBlock Text=\"page name\" Margin=\"9,-7,0,0\" Style=\"{StaticResource PhoneTextTelegramTitle1Style}\"/>\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <Border Width=\"200\" Height=\"200\" Background=\"{StaticResource PhoneAccentBrush}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" />\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/Chat2View.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Diagnostics;\r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class Chat2View\r\n    {\r\n        public static readonly DependencyProperty TimerProperty = DependencyProperty.Register(\r\n            \"Timer\", typeof(string), typeof(Chat2View), new PropertyMetadata(default(string)));\r\n\r\n        public string Timer\r\n        {\r\n            get { return (string) GetValue(TimerProperty); }\r\n            set { SetValue(TimerProperty, value); }\r\n        }\r\n\r\n        public Chat2View()\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Timer = timer.Elapsed.ToString();\r\n            };\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/ChatDetailsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.ChatDetailsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"UserItemTemplate\">\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"12,0,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" micro:Message.Attach=\"[Event Tap] = [Action ViewUser($DataContext)]\">\r\n\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                            <toolkit:MenuItem Loaded=\"DeleteMenuItem_OnLoaded\" micro:Message.Attach=\"[Event Click] = [DeleteParticipant($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" Visibility=\"{Binding DeleteActionVisibility}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [MessageUser($DataContext)]\" Header=\"{Binding FirstName.Value, Converter={StaticResource MessageUserString}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [ViewUser($DataContext)]\" Header=\"{Binding FirstName.Value, Converter={StaticResource ViewUserString}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"72\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding FullName2}\" MaxHeight=\"36\" FontSize=\"27\" Foreground=\"White\"/>\r\n                        <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                            Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                            Foreground=\"#99FFFFFF\"\r\n                            Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"1\" Grid.RowSpan=\"2\" Margin=\"12,-4,0,0\" Text=\"{Binding Resources.Admin, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" VerticalAlignment=\"Center\" Visibility=\"{Binding IsAdmin, Converter={StaticResource BooleanToVisibilityConverter}}\" Foreground=\"#99FFFFFF\"/>\r\n                    </Grid>\r\n                    <!--<Grid Grid.Column=\"1\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Margin=\"12,-6,0,0\" Text=\"{Binding FullName2}\" MaxHeight=\"42.56\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                        <TextBlock Grid.Row=\"1\" Margin=\"12,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"1\" Grid.RowSpan=\"2\" Margin=\"12,-4,0,0\" Text=\"{Binding Resources.Admin, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" VerticalAlignment=\"Center\" Visibility=\"{Binding IsAdmin, Converter={StaticResource BooleanToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>-->\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"-18,0\">\r\n        <longListSelector:LongListSelector \r\n                Margin=\"12,0,0,0\" \r\n                ItemsSource=\"{Binding Items}\" \r\n                IsFlatList=\"True\"\r\n                ItemTemplate=\"{StaticResource UserItemTemplate}\"\r\n                Background=\"Transparent\">\r\n            <longListSelector:LongListSelector.ListHeader>\r\n                <Grid x:Name=\"ContentPanel\" Margin=\"0,0,12,0\" DataContext=\"{Binding DataContext, ElementName=Self}\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n\r\n                    <Grid Grid.Row=\"0\" Margin=\"0,15,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <views:ConversationTileControl\r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenPhoto]\"\r\n\t\t\t\t            Margin=\"12,0,0,0\" \r\n                            Size=\"100\"\r\n                            Fill=\"{Binding CurrentItem.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding CurrentItem, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding CurrentItem.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n\r\n                        <StackPanel Grid.Column=\"1\" VerticalAlignment=\"Top\">\r\n                            <TextBlock Margin=\"24,13,0,0\" Text=\"{Binding CurrentItem.FullName2}\" FontSize=\"30\" Foreground=\"White\"/>\r\n                            <TextBlock Margin=\"24,1,0,0\" Text=\"{Binding Subtitle}\" Opacity=\"0.6\" Foreground=\"White\"/>\r\n                        </StackPanel>\r\n                    </Grid>\r\n                    \r\n                    <!--\r\n                    <StackPanel Margin=\"0,2,0,0\" Grid.Row=\"0\" Grid.Column=\"1\">\r\n                        <TextBlock Text=\"{Binding Subtitle}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" />\r\n                        <TextBlock Text=\"{Binding Subtitle2}\" Margin=\"12,-4,12,0\" Foreground=\"{StaticResource PhoneAccentBrush}\" Visibility=\"{Binding Subtitle2, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        <TextBlock Text=\"{Binding Subtitle3}\" TextWrapping=\"Wrap\" MaxHeight=\"79.8\" TextTrimming=\"WordEllipsis\" Margin=\"12,-4,12,0\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Visibility=\"{Binding Subtitle3, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" />\r\n                    </StackPanel>\r\n                    -->\r\n\r\n                    <Grid Grid.Row=\"1\" Margin=\"0,0,0,0\" x:Name=\"Actions\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <StackPanel x:Name=\"SettingsGrid\" Margin=\"0,24,0,0\">\r\n                            \r\n                            <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"OpenLink\" Visibility=\"{Binding CurrentItem.UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                <toolkit:ContextMenuService.ContextMenu>\r\n                                    <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                        <toolkit:MenuItem Click=\"CopyLink_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\" />                            \r\n                                    </toolkit:ContextMenu>\r\n                                </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding CurrentItem.UserName, StringFormat='@\\{0\\}'}\"/>\r\n                                    <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Link}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                                </StackPanel>\r\n                            </Button>\r\n\r\n                            <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" Visibility=\"{Binding Subtitle3, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"12,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.About, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Subtitle3}\" TextWrapping=\"Wrap\" TextTrimming=\"WordEllipsis\" MaxHeight=\"81\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                                </StackPanel>\r\n                            </Button>\r\n\r\n                            <Button Visibility=\"{Binding IsChannelParticipantsButtonEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"OpenMembers\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Members, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding MembersSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                                </StackPanel>\r\n                            </Button>\r\n\r\n                            <Button Visibility=\"{Binding IsChannelAdministrator, Converter={StaticResource BooleanToVisibilityConverter}}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"OpenAdministrators\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Administrators, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding AdministratorsSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                                </StackPanel>\r\n                            </Button>\r\n\r\n                            <Button Visibility=\"{Binding IsChannelAdministrator, Converter={StaticResource BooleanToVisibilityConverter}}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"OpenKickedUsers\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.BlockedUsers, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding KickedUsersSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                                </StackPanel>\r\n                            </Button>\r\n\r\n                            <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"OpenMedia\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Media, Source={StaticResource Strings}}\"/>\r\n                            </Button>\r\n\r\n                            <!--<Button Visibility=\"{Binding IsReportButtonEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"Report\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Report, Source={StaticResource Strings}}\"/>\r\n                            </Button>-->\r\n                            \r\n                            <StackPanel Margin=\"0,24,0,0\">\r\n                                <toolkit:ToggleSwitch x:Name=\"NotificationsSwitch\" Margin=\"0,0,-24,-21\" Foreground=\"White\" Checked=\"ToggleSwitch_OnChecked\" Unchecked=\"ToggleSwitch_OnUnchecked\" IsChecked=\"{Binding DataContext.MuteUntil, ElementName=Self, Converter={StaticResource MuteUntilToBoolConverter}}\" Header=\"{Binding Resources.Notifications, Source={StaticResource Strings}}\">\r\n                                    <i:Interaction.Behaviors>\r\n                                        <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                            OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                            OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                                    </i:Interaction.Behaviors>\r\n                                </toolkit:ToggleSwitch>\r\n                            </StackPanel>\r\n\r\n                            <StackPanel Margin=\"0,24,0,0\">\r\n                                <toolkit:ListPicker\r\n                                    Foreground=\"White\"\r\n                                    BorderBrush=\"#99FFFFFF\"\r\n                                    Margin=\"12,-10,12,0\"\r\n                                    Header=\"{Binding Resources.Sound, Source={StaticResource Strings}}\"\r\n                                    ItemsSource=\"{Binding StateService.Sounds}\"\r\n                                    SelectedItem=\"{Binding SelectedSound, Mode=TwoWay}\">\r\n                                    <toolkit:ListPicker.ItemTemplate>\r\n                                        <DataTemplate>\r\n                                            <TextBlock Text=\"{Binding}\"/>\r\n                                        </DataTemplate>\r\n                                    </toolkit:ListPicker.ItemTemplate>\r\n                                    <toolkit:ListPicker.FullModeItemTemplate>\r\n                                        <DataTemplate>\r\n                                            <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                                        </DataTemplate>\r\n                                    </toolkit:ListPicker.FullModeItemTemplate>\r\n                                </toolkit:ListPicker>\r\n                            </StackPanel>\r\n\r\n                            <StackPanel Margin=\"0,36,0,0\" Visibility=\"{Binding IsUpgradeAvailable, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                                <TextBlock Margin=\"12,0,12,-5\" Text=\"{Binding UpgradeDescription}\" TextWrapping=\"Wrap\" Foreground=\"White\" Opacity=\"0.6\" />\r\n                                <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,24,-12,0\" micro:Message.Attach=\"UpgradeGroup\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.UpgradeToSupergroup, Source={StaticResource Strings}}\"/>\r\n                                </Button>\r\n                            </StackPanel>\r\n                        </StackPanel>\r\n\r\n                        <TextBlock Grid.Row=\"6\" Text=\"{Binding Subtitle}\" Margin=\"12,24,12,12\" FontSize=\"23\" Foreground=\"White\" Visibility=\"{Binding DataContext.CanViewParticipants, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </longListSelector:LongListSelector.ListHeader>\r\n            <!--<longListSelector:LongListSelector.ListFooter>\r\n                <Grid MinHeight=\"72\">\r\n                    <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0,-12,72\" micro:Message.Attach=\"DeleteAndExitGroup\" Style=\"{StaticResource WhiteProfileButtonStyle}\" Visibility=\"{Binding DataContext.IsDeleteAndExitVisible, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding DataContext.DeleteAndExitGroupString, ElementName=Self}\"/>\r\n                    </Button>\r\n                </Grid>\r\n            </longListSelector:LongListSelector.ListFooter>-->\r\n        </longListSelector:LongListSelector>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/ChatDetailsView.xaml.cs",
    "content": "﻿using System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class ChatDetailsView\r\n    {\r\n        public ChatDetailsViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChatDetailsViewModel; }\r\n        }\r\n\r\n        public static readonly DependencyProperty TimerProperty = DependencyProperty.Register(\r\n            \"Timer\", typeof (string), typeof (ChatDetailsView), new PropertyMetadata(default(string)));\r\n\r\n        public string Timer\r\n        {\r\n            get { return (string) GetValue(TimerProperty); }\r\n            set { SetValue(TimerProperty, value); }\r\n        }\r\n\r\n        public ChatDetailsView()\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n            InitializeComponent();\r\n            \r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                NotificationsSwitch.Style = (Style)Application.Current.Resources[\"ProfileLightToggleSwitch\"];\r\n            }\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Timer = timer.Elapsed.ToString();\r\n            };\r\n        }\r\n        \r\n#if DEBUG\r\n        //~ChatDetailsView()\r\n        //{\r\n        //    TLUtils.WritePerformance(\"++ChatDetailsV destr\");\r\n        //}\r\n#endif\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            \r\n            //ContextMenuService.GetContextMenu((DependencyObject)sender).IsOpen = true;\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var span = element.DataContext as TimerSpan;\r\n            if (span == null) return;\r\n\r\n            ViewModel.SelectSpan(span);\r\n        }\r\n\r\n        private void CopyLink_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyLink();\r\n        }\r\n\r\n        private void ToggleSwitch_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SelectSpan(ViewModel.Spans.First());\r\n        }\r\n\r\n        private void ToggleSwitch_OnUnchecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SelectSpan(ViewModel.Spans.Last());\r\n        }\r\n\r\n        private void DeleteMenuItem_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var user = element.DataContext as TLUserBase;\r\n            if (user == null) return;\r\n\r\n            element.Visibility = Visibility.Visible;\r\n\r\n            var chat = ViewModel.CurrentItem as TLChat41;\r\n            if (chat != null && chat.AdminsEnabled.Value && !chat.Admin.Value && !chat.Creator)\r\n            {\r\n                element.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var channel = ViewModel.CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (!channel.IsEditor && !channel.Creator)\r\n                {\r\n                    element.Visibility = Visibility.Collapsed;\r\n                    return;\r\n                }\r\n\r\n                if (channel.ChannelParticipants != null)\r\n                {\r\n                    var participants = channel.ChannelParticipants.Participants;\r\n                    var creator = participants.FirstOrDefault(x => x is TLChannelParticipantCreator);\r\n                    if (creator != null && creator.UserId.Value == user.Index)\r\n                    {\r\n                        element.Visibility = Visibility.Collapsed;\r\n                        return;\r\n                    }\r\n\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            \r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/ChatView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.ChatView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:controls2=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    BackKeyPress=\"ChatView_OnBackKeyPress\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"UserItemTemplate\">\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"12,0,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" micro:Message.Attach=\"[Event Tap] = [Action ViewUser($DataContext)]\">\r\n\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                            <toolkit:MenuItem Loaded=\"DeleteMenuItem_OnLoaded\" micro:Message.Attach=\"[Event Click] = [DeleteParticipant($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" Visibility=\"{Binding DeleteActionVisibility}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [MessageUser($DataContext)]\" Header=\"{Binding FirstName.Value, Converter={StaticResource MessageUserString}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [ViewUser($DataContext)]\" Header=\"{Binding FirstName.Value, Converter={StaticResource ViewUserString}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"72\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding FullName2}\" MaxHeight=\"36\" FontSize=\"27\" Foreground=\"White\"/>\r\n                        <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                            Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                            Foreground=\"#99FFFFFF\"\r\n                            Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"1\" Grid.RowSpan=\"2\" Margin=\"12,-4,0,0\" Text=\"{Binding Resources.Admin, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" VerticalAlignment=\"Center\" Visibility=\"{Binding IsAdmin, Converter={StaticResource BooleanToVisibilityConverter}}\" Foreground=\"#99FFFFFF\"/>\r\n                    </Grid>\r\n                    <!--<Grid Grid.Column=\"1\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Margin=\"12,-6,0,0\" Text=\"{Binding FullName2}\" MaxHeight=\"42.56\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                        <TextBlock Grid.Row=\"1\" Margin=\"12,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"1\" Grid.RowSpan=\"2\" Margin=\"12,-4,0,0\" Text=\"{Binding Resources.Admin, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" VerticalAlignment=\"Center\" Visibility=\"{Binding IsAdmin, Converter={StaticResource BooleanToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>-->\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <controls1:TelegramTransitionService.NavigationInTransition>\r\n        <controls1:TelegramNavigationInTransition EndTransition=\"TelegramNavigationTransition_OnEndTransition\">\r\n            <controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls1:TelegramNavigationInTransition.Backward>\r\n            <controls1:TelegramNavigationInTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls1:TelegramNavigationInTransition.Forward>\r\n        </controls1:TelegramNavigationInTransition>\r\n    </controls1:TelegramTransitionService.NavigationInTransition>\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition>\r\n            <controls1:TelegramNavigationOutTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Backward>\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Info, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n        \r\n        <Grid x:Name=\"LayoutRoot2\" Grid.Row=\"1\">\r\n            <longListSelector:LongListSelector \r\n                Margin=\"6,0,0,0\" \r\n                ItemsSource=\"{Binding Items}\" \r\n                IsFlatList=\"True\"\r\n                ItemTemplate=\"{StaticResource UserItemTemplate}\"\r\n                Background=\"Transparent\">\r\n                <longListSelector:LongListSelector.ListHeader>\r\n                    <Grid x:Name=\"ContentPanel\" Margin=\"0,0,12,0\" DataContext=\"{Binding DataContext, ElementName=Self}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Grid Grid.Row=\"0\" Margin=\"0,15,0,0\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <views:ConversationTileControl\r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenPhoto]\"\r\n\t\t\t\t            Margin=\"12,0,0,0\" \r\n                            Size=\"100\"\r\n                            Fill=\"{Binding CurrentItem.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding CurrentItem, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding CurrentItem.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n\r\n                            <StackPanel Grid.Column=\"1\" VerticalAlignment=\"Top\">\r\n                                <TextBlock Margin=\"24,13,0,0\" Text=\"{Binding CurrentItem.FullName2}\" FontSize=\"30\" Foreground=\"White\"/>\r\n                                <TextBlock Margin=\"24,1,0,0\" Text=\"{Binding Subtitle}\" Opacity=\"0.6\" Foreground=\"White\"/>\r\n                            </StackPanel>\r\n                        </Grid>\r\n\r\n                        <Grid Grid.Row=\"1\" Margin=\"0,0,0,0\" x:Name=\"Actions\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <StackPanel x:Name=\"SettingsGrid\" Margin=\"0,24,0,0\">\r\n\r\n                                <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"OpenLink\" Visibility=\"{Binding CurrentItem.UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                    <toolkit:ContextMenuService.ContextMenu>\r\n                                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                            <toolkit:MenuItem Click=\"CopyLink_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\" />\r\n                                        </toolkit:ContextMenu>\r\n                                    </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                                    <StackPanel>\r\n                                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding CurrentItem.UserName, StringFormat='@\\{0\\}'}\"/>\r\n                                        <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Link}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                                    </StackPanel>\r\n                                </Button>\r\n\r\n                                <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" Visibility=\"{Binding Subtitle3, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                    <StackPanel>\r\n                                        <TextBlock Margin=\"12,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.About, Source={StaticResource Strings}}\"/>\r\n                                        <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Subtitle3}\" TextWrapping=\"Wrap\" TextTrimming=\"WordEllipsis\" MaxHeight=\"81\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                                    </StackPanel>\r\n                                </Button>\r\n\r\n                                <Button Visibility=\"{Binding IsChannelParticipantsButtonEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"OpenMembers\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                    <StackPanel>\r\n                                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Members, Source={StaticResource Strings}}\"/>\r\n                                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding MembersSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                                    </StackPanel>\r\n                                </Button>\r\n\r\n                                <Button Visibility=\"{Binding IsChannelAdministrator, Converter={StaticResource BooleanToVisibilityConverter}}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"OpenAdministrators\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                    <StackPanel>\r\n                                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Administrators, Source={StaticResource Strings}}\"/>\r\n                                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding AdministratorsSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                                    </StackPanel>\r\n                                </Button>\r\n\r\n                                <Button Visibility=\"{Binding IsChannelAdministrator, Converter={StaticResource BooleanToVisibilityConverter}}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"OpenKickedUsers\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                    <StackPanel>\r\n                                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.BlockedUsers, Source={StaticResource Strings}}\"/>\r\n                                        <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding KickedUsersSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                                    </StackPanel>\r\n                                </Button>\r\n\r\n                                <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" micro:Message.Attach=\"OpenMedia\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                    <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Media, Source={StaticResource Strings}}\"/>\r\n                                </Button>\r\n\r\n                                <StackPanel Margin=\"0,24,0,0\">\r\n                                    <toolkit:ToggleSwitch x:Name=\"NotificationsSwitch\" Margin=\"0,0,-24,-21\" Foreground=\"White\" Checked=\"ToggleSwitch_OnChecked\" Unchecked=\"ToggleSwitch_OnUnchecked\" IsChecked=\"{Binding DataContext.MuteUntil, ElementName=Self, Converter={StaticResource MuteUntilToBoolConverter}}\" Header=\"{Binding Resources.Notifications, Source={StaticResource Strings}}\">\r\n                                        <i:Interaction.Behaviors>\r\n                                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                            OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                            OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                                        </i:Interaction.Behaviors>\r\n                                    </toolkit:ToggleSwitch>\r\n                                </StackPanel>\r\n\r\n                                <StackPanel Margin=\"0,24,0,0\">\r\n                                    <toolkit:ListPicker\r\n                                    Foreground=\"White\"\r\n                                    BorderBrush=\"#99FFFFFF\"\r\n                                    Margin=\"12,-10,12,0\"\r\n                                    Header=\"{Binding Resources.Sound, Source={StaticResource Strings}}\"\r\n                                    ItemsSource=\"{Binding StateService.Sounds}\"\r\n                                    SelectedItem=\"{Binding SelectedSound, Mode=TwoWay}\">\r\n                                        <toolkit:ListPicker.ItemTemplate>\r\n                                            <DataTemplate>\r\n                                                <TextBlock Text=\"{Binding}\"/>\r\n                                            </DataTemplate>\r\n                                        </toolkit:ListPicker.ItemTemplate>\r\n                                        <toolkit:ListPicker.FullModeItemTemplate>\r\n                                            <DataTemplate>\r\n                                                <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                                            </DataTemplate>\r\n                                        </toolkit:ListPicker.FullModeItemTemplate>\r\n                                    </toolkit:ListPicker>\r\n                                </StackPanel>\r\n\r\n                                <StackPanel Margin=\"0,36,0,0\" Visibility=\"{Binding IsUpgradeAvailable, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                                    <TextBlock Margin=\"12,0,12,-5\" Text=\"{Binding UpgradeDescription}\" TextWrapping=\"Wrap\" Foreground=\"White\" Opacity=\"0.6\" />\r\n                                    <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,24,-12,0\" micro:Message.Attach=\"UpgradeGroup\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.UpgradeToSupergroup, Source={StaticResource Strings}}\"/>\r\n                                    </Button>\r\n                                </StackPanel>\r\n                            </StackPanel>\r\n\r\n                            <TextBlock Grid.Row=\"6\" Text=\"{Binding Subtitle}\" Margin=\"12,24,12,12\" FontSize=\"23\" Foreground=\"White\" Visibility=\"{Binding DataContext.CanViewParticipants, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </longListSelector:LongListSelector.ListHeader>\r\n            </longListSelector:LongListSelector>\r\n        </Grid>\r\n        \r\n        <Border x:Name=\"MorePanelBackground\" d:IsHidden=\"True\" Tap=\"MorePanelBackground_OnTap\" Visibility=\"Collapsed\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Grid.RowSpan=\"3\" Background=\"Black\" Opacity=\"0.4\"/>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n            <ContentControl x:Name=\"AppBarMenuItemsPlaceholder\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\">\r\n                <StackPanel x:Name=\"AppBarMenuItems\"/>\r\n            </ContentControl>\r\n        </Border>\r\n        \r\n        <controls2:TelegramApplicationBar Grid.Row=\"2\"\r\n            x:Name=\"AppBarPanel\" \r\n            VerticalAlignment=\"Bottom\"\r\n            MorePanel=\"{Binding ElementName=MorePanel}\"\r\n            PanelOpened=\"AppBarPanel_OnPanelOpened\"\r\n            PanelClosed=\"AppBarPanel_OnPanelClosed\">\r\n            <controls2:TelegramApplicationBar.Buttons>\r\n                <!--<controls2:TelegramApplicationBarButton\r\n                    x:Name=\"EditButton\"\r\n                    Grid.Column=\"2\"\r\n                    Tap=\"EditButton_OnTap\"\r\n                    ImageSource=\"/Images/W10M/ic_edit_2x.png\"\r\n                    Label=\"{Binding Resources.Edit, Source={StaticResource Strings}}\"/>\r\n                <controls2:TelegramApplicationBarButton\r\n                    x:Name=\"AddButton\"\r\n                    Grid.Column=\"3\"\r\n                    Tap=\"AddButton_OnTap\"\r\n                    ImageSource=\"/Images/ApplicationBar/ic_plus_2x.png\"\r\n                    Label=\"{Binding Resources.Add, Source={StaticResource Strings}}\"/>-->\r\n            </controls2:TelegramApplicationBar.Buttons>\r\n        </controls2:TelegramApplicationBar>\r\n\r\n        <ContentControl Grid.RowSpan=\"3\" x:Name=\"ProfilePhotoViewer\" micro:View.Model=\"{Binding ProfilePhotoViewer}\"\r\n            VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n            VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/ChatView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Media;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class ChatView\r\n    {\r\n        private ChatViewModel ViewModel { get { return DataContext as ChatViewModel; } }\r\n\r\n        private readonly TelegramAppBarButton _setPhotoButton = new TelegramAppBarButton\r\n        {\r\n            Text = AppResources.SetPhoto,\r\n            ImageSource = new BitmapImage(new Uri(\"/Images/W10M/ic_photo_2x.png\", UriKind.Relative))\r\n        };\r\n\r\n        private readonly TelegramAppBarButton _editButton = new TelegramAppBarButton\r\n        {\r\n            Text = AppResources.Edit,\r\n            ImageSource = new BitmapImage(new Uri(\"/Images/W10M/ic_edit_2x.png\", UriKind.Relative))\r\n        };\r\n\r\n        private readonly TelegramAppBarButton _addButton = new TelegramAppBarButton\r\n        {\r\n            Text = AppResources.Add,\r\n            ImageSource = new BitmapImage(new Uri(\"/Images/ApplicationBar/ic_plus_2x.png\", UriKind.Relative))\r\n        };\r\n\r\n        private readonly ListBoxItem _reportMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.Report,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private readonly ListBoxItem _setAdminsMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.SetAdmins,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private readonly ListBoxItem _convertToSupergroupMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.ConvertToSupergroup,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private readonly ListBoxItem _deleteAndExitMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.DeleteAndExitGroup,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        public ChatView()\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                NotificationsSwitch.Style = (Style)Application.Current.Resources[\"ProfileLightToggleSwitch\"];\r\n                LayoutRoot.Background = ShellView.CaptionBrush;\r\n                AppBarPanel.MorePanelBackgroundBrush = ShellView.CaptionBrush;\r\n                AppBarPanel.BackgroundBrush = ShellView.CaptionBrush;\r\n\r\n                _setPhotoButton.LabelForeground = new SolidColorBrush(Colors.White);\r\n                _editButton.LabelForeground = new SolidColorBrush(Colors.White);\r\n                _addButton.LabelForeground = new SolidColorBrush(Colors.White);\r\n                AppBarPanel.MoreButton.LabelForeground = new SolidColorBrush(Colors.White);\r\n                AppBarMenuItemsPlaceholder.Foreground = new SolidColorBrush(Colors.White);\r\n            }\r\n\r\n            OptimizeFullHD();\r\n\r\n            _setPhotoButton.Tap += SetPhoto_OnTap;\r\n            _editButton.Tap += EditButton_OnTap;\r\n            _addButton.Tap += AddButton_OnTap;\r\n\r\n            _deleteAndExitMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    ViewModel.DeleteAndExitGroup();\r\n                });\r\n            };\r\n            _setAdminsMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    ViewModel.SetAdmins();\r\n                });\r\n            };\r\n            _convertToSupergroupMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    ViewModel.ConvertToSupergroup();\r\n                });\r\n            };\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                if (ViewModel.ProfilePhotoViewer != null)\r\n                    ViewModel.ProfilePhotoViewer.PropertyChanged += OnProfileViewerPropertyChanged;\r\n\r\n                ViewModel.PropertyChanged += OnChatDetailsPropertyChanged;\r\n                BuildLocalizedAppBar();\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnChatDetailsPropertyChanged;\r\n\r\n                if (ViewModel.ProfilePhotoViewer != null)\r\n                    ViewModel.ProfilePhotoViewer.PropertyChanged -= OnProfileViewerPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n#if WP8\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n            //if (!isFullHD) return;\r\n#endif\r\n        }\r\n\r\n        private void OnChatDetailsPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ProfilePhotoViewer))\r\n            {\r\n                ViewModel.ProfilePhotoViewer.PropertyChanged += OnProfileViewerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsChannelAdministrator))\r\n            {\r\n                UpdateLocalizedAppBar();\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.CanEditChat))\r\n            {\r\n                UpdateLocalizedAppBar();\r\n            }\r\n        }\r\n\r\n        private IApplicationBar _prevAppBar;\r\n\r\n        private void OnProfileViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ProfilePhotoViewer.IsOpen))\r\n            {\r\n                LayoutRoot2.IsHitTestVisible = !ViewModel.ProfilePhotoViewer.IsOpen;\r\n                AppBarPanel.Visibility = !ViewModel.ProfilePhotoViewer.IsOpen\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n\r\n                ViewModel.NotifyOfPropertyChange(() => ViewModel.IsViewerOpen);\r\n\r\n                if (ViewModel.ProfilePhotoViewer.IsOpen)\r\n                {\r\n                    _prevAppBar = ApplicationBar;\r\n\r\n                    var profilePhotoViewerView = ProfilePhotoViewer.Content as ProfilePhotoViewerView;\r\n                    ApplicationBar = profilePhotoViewerView != null ? profilePhotoViewerView.ApplicationBar : null;\r\n                }\r\n                else\r\n                {\r\n                    // wait to finish closing profile viewer animation\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                    {\r\n                        if (_prevAppBar != null)\r\n                        {\r\n                            ApplicationBar = _prevAppBar;\r\n                        }\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        private ApplicationBar _applicationBar;\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (_applicationBar != null) return;\r\n\r\n            _applicationBar = new ApplicationBar { BackgroundColor = ((SolidColorBrush)ShellView.CaptionBrush).Color, ForegroundColor = Colors.White, Opacity = 0.99999 };\r\n            var gridColumn = 3;\r\n            if (ViewModel.CanAddChannelParticipants || ViewModel.CanAddChatParticipants)\r\n            {\r\n                Grid.SetColumn(_addButton, gridColumn--);\r\n                AppBarPanel.Buttons.Add(_addButton);\r\n                //_applicationBar.Buttons.Add(_addButton);\r\n            }\r\n\r\n            if (ViewModel.CanEditChannel || ViewModel.CanEditChat)\r\n            {\r\n                Grid.SetColumn(_editButton, gridColumn--);\r\n                AppBarPanel.Buttons.Add(_editButton);\r\n\r\n                Grid.SetColumn(_setPhotoButton, gridColumn--);\r\n                AppBarPanel.Buttons.Add(_setPhotoButton);\r\n                //_applicationBar.Buttons.Add(_editButton);\r\n            }\r\n\r\n            if (ViewModel.IsReportButtonEnabled)\r\n            {\r\n                AppBarMenuItems.Children.Add(_reportMenuItem);\r\n            }\r\n\r\n            if (ViewModel.IsDeleteAndExitVisible)\r\n            {\r\n                _deleteAndExitMenuItem.Content = ViewModel.DeleteAndExitGroupString;\r\n                AppBarMenuItems.Children.Add(_deleteAndExitMenuItem);\r\n            }\r\n\r\n            var chat = ViewModel.Chat as TLChat40;\r\n            if (chat != null && chat.Creator)\r\n            {\r\n                AppBarMenuItems.Children.Add(_setAdminsMenuItem);\r\n                AppBarMenuItems.Children.Add(_convertToSupergroupMenuItem);\r\n            }\r\n\r\n            UpdateLocalizedAppBar();\r\n        }\r\n\r\n        private void UpdateLocalizedAppBar()\r\n        {\r\n            if (_applicationBar == null) return;\r\n\r\n            var channel = ViewModel.Chat as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                //AppBarPanel.Visibility = (ViewModel.ChatDetails.CanEditChannel || ViewModel.ChatDetails.CanAddChannelParticipants)\r\n                //    ? Visibility.Visible\r\n                //    : Visibility.Collapsed;\r\n                //_applicationBar.IsVisible = ViewModel.ChatDetails.CanEditChannel || ViewModel.ChatDetails.CanAddChannelParticipants;\r\n                return;\r\n            }\r\n\r\n            var chat = ViewModel.Chat as TLChat40;\r\n            if (chat != null)\r\n            {\r\n                //AppBarPanel.Visibility = ViewModel.ChatDetails.CanEditChat\r\n                //    ? Visibility.Visible\r\n                //    : Visibility.Collapsed;\r\n                //_applicationBar.IsVisible = ViewModel.ChatDetails.CanEditChat;\r\n                return;\r\n            }\r\n        }\r\n\r\n        private void ChatView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                var multiplePhotoChooser = popup.Child as OpenPhotoPicker;\r\n                if (multiplePhotoChooser != null)\r\n                {\r\n                    multiplePhotoChooser.TryClose();\r\n                }\r\n\r\n                var cropControl = popup.Child as CropControl;\r\n                if (cropControl != null)\r\n                {\r\n                    cropControl.TryClose();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.ProfilePhotoViewer != null\r\n                && ViewModel.ProfilePhotoViewer.IsOpen)\r\n            {\r\n                ViewModel.ProfilePhotoViewer.CloseViewer();\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private void TelegramNavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_once)\r\n            {\r\n                _once = true;\r\n                ViewModel.ForwardInAnimationComplete();\r\n            }\r\n            else\r\n            {\r\n                ViewModel.UpdateTitles();\r\n            }\r\n        }\r\n\r\n        private void AppBarPanel_OnPanelOpened(object sender, System.EventArgs e)\r\n        {\r\n            MorePanelBackground.Visibility = Visibility.Visible;\r\n        }\r\n\r\n        private void AppBarPanel_OnPanelClosed(object sender, System.EventArgs e)\r\n        {\r\n            MorePanelBackground.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private void MorePanelBackground_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n        }\r\n\r\n        private void SetPhoto_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                ViewModel.SetPhoto();\r\n            });\r\n        }\r\n\r\n        private void EditButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                ViewModel.Edit();\r\n            });\r\n        }\r\n\r\n        private void AddButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                ViewModel.AddParticipant();\r\n            });\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n\r\n            //ContextMenuService.GetContextMenu((DependencyObject)sender).IsOpen = true;\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var span = element.DataContext as TimerSpan;\r\n            if (span == null) return;\r\n\r\n            ViewModel.SelectSpan(span);\r\n        }\r\n\r\n        private void CopyLink_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyLink();\r\n        }\r\n\r\n        private void ToggleSwitch_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SelectSpan(ViewModel.Spans.First());\r\n        }\r\n\r\n        private void ToggleSwitch_OnUnchecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SelectSpan(ViewModel.Spans.Last());\r\n        }\r\n\r\n        private void DeleteMenuItem_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var user = element.DataContext as TLUserBase;\r\n            if (user == null) return;\r\n\r\n            element.Visibility = Visibility.Visible;\r\n\r\n            var chat = ViewModel.CurrentItem as TLChat41;\r\n            if (chat != null && chat.AdminsEnabled.Value && !chat.Admin.Value && !chat.Creator)\r\n            {\r\n                element.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var channel = ViewModel.CurrentItem as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (!channel.IsEditor && !channel.Creator)\r\n                {\r\n                    element.Visibility = Visibility.Collapsed;\r\n                    return;\r\n                }\r\n\r\n                if (channel.ChannelParticipants != null)\r\n                {\r\n                    var participants = channel.ChannelParticipants.Participants;\r\n                    var creator = participants.FirstOrDefault(x => x is TLChannelParticipantCreator);\r\n                    if (creator != null && creator.UserId.Value == user.Index)\r\n                    {\r\n                        element.Visibility = Visibility.Collapsed;\r\n                        return;\r\n                    }\r\n\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/ConvertToSupergroupView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.ConvertToSupergroupView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.Supergroup, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n            <!--<TextBlock Text=\"page name\" Margin=\"9,-7,0,0\" Style=\"{StaticResource PhoneTextTelegramTitle1Style}\"/>-->\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <RichTextBox Grid.Row=\"0\" Margin=\"0,43,0,0\" Foreground=\"{StaticResource PhoneSubtleBrush}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" chats:ConvertToSupergroupView.FormattedText=\"{Binding Resources.ConvertToSupergroupDescription, Source={StaticResource Strings}}\"/>\r\n            <!--<TextBlock Grid.Row=\"0\" Margin=\"24,43,12,0\" Text=\"{Binding Resources.ConvertToSupergroupDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Foreground=\"Red\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n\r\n            <Button Grid.Row=\"1\" x:Name=\"ConvertToSupergroup\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,24,-12,0\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                <TextBlock Margin=\"10,0,12,0\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"36\" Text=\"{Binding Resources.ConvertToSupergroup, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n            </Button>\r\n            <RichTextBox Grid.Row=\"2\" Margin=\"0,28,0,0\" Foreground=\"{StaticResource PhoneSubtleBrush}\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" chats:ConvertToSupergroupView.FormattedText=\"{Binding Resources.ConvertToSupergroupNote, Source={StaticResource Strings}}\"/>\r\n            <!--<TextBlock Grid.Row=\"2\" Margin=\"12,28,12,0\" Text=\"{Binding Resources.ConvertToSupergroupNote, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/ConvertToSupergroupView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class ConvertToSupergroupView\r\n    {\r\n        public ConvertToSupergroupView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            OptimizeFullHD();\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n            var appBar = new ApplicationBar();\r\n            var appBarDefaultSize = appBar.DefaultSize;\r\n\r\n            //ConvertToSupergroupPanel.Height = appBarDefaultSize;\r\n        }\r\n\r\n        public static readonly DependencyProperty FormattedLinkedTextProperty = DependencyProperty.RegisterAttached(\r\n            \"FormattedLinkedText\", typeof (string), typeof (ConvertToSupergroupView), new PropertyMetadata(default(string), OnFormattedLinkedTextChanged));\r\n\r\n        public static void SetFormattedLinkedText(DependencyObject element, string value)\r\n        {\r\n            element.SetValue(FormattedLinkedTextProperty, value);\r\n        }\r\n\r\n        public static string GetFormattedLinkedText(DependencyObject element)\r\n        {\r\n            return (string) element.GetValue(FormattedLinkedTextProperty);\r\n        }\r\n\r\n        private static void OnFormattedLinkedTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var r = d as RichTextBox;\r\n            if (r != null)\r\n            {\r\n                var text = e.NewValue as string;\r\n                if (text != null)\r\n                {\r\n                    var splittedText = text.Split(new[] { \"__\" }, StringSplitOptions.None);\r\n                    var paragraph = new Paragraph();\r\n                    for (var i = 0; i < splittedText.Length; i++)\r\n                    {\r\n                        if (i % 2 == 1)\r\n                        {\r\n                            var underline = new Run();\r\n                            //bold.FontWeight = FontWeights.SemiBold;\r\n                            underline.Text = splittedText[i];\r\n                            underline.TextDecorations = TextDecorations.Underline;\r\n                            paragraph.Inlines.Add(underline);\r\n                        }\r\n                        else\r\n                        {\r\n                            paragraph.Inlines.Add(splittedText[i]);\r\n                        }\r\n                    }\r\n                    r.Blocks.Clear();\r\n                    r.Blocks.Add(paragraph);\r\n                }\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty FormattedTextProperty = DependencyProperty.RegisterAttached(\r\n            \"FormattedText\", typeof(string), typeof(ConvertToSupergroupView), new PropertyMetadata(default(string), OnFormattedTextChanged));\r\n\r\n        public static void SetFormattedText(DependencyObject element, string value)\r\n        {\r\n            element.SetValue(FormattedTextProperty, value);\r\n        }\r\n\r\n        public static string GetFormattedText(DependencyObject element)\r\n        {\r\n            return (string)element.GetValue(FormattedTextProperty);\r\n        }\r\n\r\n        private static void OnFormattedTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var r = d as RichTextBox;\r\n            if (r != null)\r\n            {\r\n                var text = e.NewValue as string;\r\n                if (text != null)\r\n                {\r\n                    var splittedText = text.Split(new []{\"**\"}, StringSplitOptions.None);\r\n                    var paragraph = new Paragraph();\r\n                    for (var i = 0; i < splittedText.Length; i++)\r\n                    {\r\n                        if (i % 2 == 1)\r\n                        {\r\n                            var bold = new Run();\r\n                            bold.FontWeight = FontWeights.SemiBold;\r\n                            bold.Text = splittedText[i];\r\n                            paragraph.Inlines.Add(bold);\r\n                        }\r\n                        else\r\n                        {\r\n                            paragraph.Inlines.Add(splittedText[i]);\r\n                        }\r\n                    }\r\n                    r.Blocks.Clear();\r\n                    r.Blocks.Add(paragraph);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/EditChatView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.EditChatView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    BackKeyPress=\"EditChatView_OnBackKeyPress\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"TelegramNavigationTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(chats:EditChatView.AppBarState)\" Storyboard.TargetName=\"Self\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Normal\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"TitleLabel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"AboutLabel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(chats:EditChatView.AppBarState)\" Storyboard.TargetName=\"Self\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Working\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Edit, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\" >\r\n            <Grid x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid HorizontalAlignment=\"Left\" Margin=\"0,24,0,12\">\r\n                    <views:ConversationTileControl\r\n                        micro:Message.Attach=\"[Event Tap] = [Action ReplacePhoto]\"\r\n\t\t\t\t        Margin=\"12,0,0,0\" \r\n                        Size=\"100\"\r\n                        Fill=\"{Binding CurrentItem.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding CurrentItem, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                        Source=\"{Binding CurrentItem.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n\r\n                    <Grid Visibility=\"{Binding CurrentItem.Photo, Converter={StaticResource EmptyChatPhotoToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" Margin=\"-6\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\" micro:Message.Attach=\"[Event Tap] = [Action DeletePhoto]\">\r\n                        <Border Background=\"{StaticResource PhoneBackgroundBrush}\" Width=\"34\" Height=\"34\" CornerRadius=\"17\"/>\r\n                        <Border Background=\"{StaticResource TelegramBadgeAccentBrush}\" Width=\"28\" Height=\"28\" CornerRadius=\"15\"/>\r\n                        <TextBlock FontFamily=\"Segoe UI Symbol\" Text=\"\" FontSize=\"18\" Margin=\"0,-1,0,0\" Foreground=\"{StaticResource PhoneBackgroundBrush}\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <StackPanel Grid.Row=\"1\">\r\n                    <controls1:LabeledTextBox x:Name=\"TitleLabel\" Label=\"{Binding Resources.Title, Source={StaticResource Strings}}\" Text=\"{Binding Title, Mode=TwoWay}\">\r\n                        <controls1:LabeledTextBox.InputScope>\r\n                            <InputScope>\r\n                                <InputScopeName NameValue=\"Text\"/>\r\n                            </InputScope>\r\n                        </controls1:LabeledTextBox.InputScope>\r\n                    </controls1:LabeledTextBox>\r\n\r\n\r\n                    <StackPanel Visibility=\"{Binding IsChannel, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <controls1:LabeledTextBox x:Name=\"AboutLabel\" Label=\"{Binding Resources.DescriptionOptional, Source={StaticResource Strings}}\" AcceptReturn=\"True\" TextWrapping=\"Wrap\" Text=\"{Binding About, Mode=TwoWay}\">\r\n                            <controls1:LabeledTextBox.InputScope>\r\n                                <InputScope>\r\n                                    <InputScopeName NameValue=\"Text\"/>\r\n                                </InputScope>\r\n                            </controls1:LabeledTextBox.InputScope>\r\n                        </controls1:LabeledTextBox>\r\n\r\n                        <StackPanel Visibility=\"{Binding CanSetStickers, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                            <Button Margin=\"-12,0,-12,0\" x:Name=\"GroupStickers\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" Text=\"{Binding Resources.GroupStickers, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding CurrentItem.StickerSet.Title}\" Visibility=\"{Binding CurrentItem.StickerSet.Title, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                </StackPanel>\r\n                            </Button>\r\n                            <TextBlock Text=\"{Binding Resources.GroupStickersDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" FontSize=\"20\" Margin=\"12,4,12,12\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </StackPanel>\r\n\r\n                        <Grid Visibility=\"{Binding IsMegaGroup, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                            <StackPanel Margin=\"0,12\" Visibility=\"{Binding IsChannelAdmin, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                                <TextBlock Text=\"{Binding Resources.ChatHistoryCaption, Source={StaticResource Strings}}\" FontSize=\"23\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                                <RadioButton GroupName=\"ChatHistory\" IsChecked=\"{Binding HiddenPrehistory, Mode=TwoWay, Converter={StaticResource InvertBooleanConverter}}\" toolkit:TiltEffect.SuppressTilt=\"True\" Content=\"{Binding Resources.Visible, Source={StaticResource Strings}}\" Margin=\"0,10,0,-16\"/>\r\n                                <TextBlock Text=\"{Binding Resources.ChatHistoryVisible, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Margin=\"60,0,12,0\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                <RadioButton GroupName=\"ChatHistory\" IsChecked=\"{Binding HiddenPrehistory}\" toolkit:TiltEffect.SuppressTilt=\"True\" Content=\"{Binding Resources.Hidden, Source={StaticResource Strings}}\" Margin=\"0,18,0,-16\"/>\r\n                                <TextBlock Text=\"{Binding Resources.ChatHistoryHidden, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Margin=\"60,0,12,0\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            </StackPanel>\r\n                        </Grid>\r\n\r\n                        <Button Margin=\"-12,0,-12,0\" x:Name=\"EditPublicLink\" Visibility=\"{Binding IsChannelAdmin, Converter={StaticResource BooleanToVisibilityConverter}}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <StackPanel>\r\n                                <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" Text=\"{Binding TypeDescription}\"/>\r\n                                <Grid>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding PublicTypeDescription, Converter={StaticResource Lowercase}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" Visibility=\"{Binding CurrentItem.UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\"/>\r\n                                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding PrivateTypeDescription, Converter={StaticResource Lowercase}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" Visibility=\"{Binding CurrentItem.UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n                                </Grid>\r\n                            </StackPanel>\r\n                        </Button>\r\n\r\n                        <StackPanel Visibility=\"{Binding IsMegaGroup, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\">\r\n                            <toolkit:ToggleSwitch Margin=\"0,12,-29,-8\" IsChecked=\"{Binding SignMessages, Mode=TwoWay}\" IsEnabled=\"True\" Header=\"{Binding Resources.SignMessages, Source={StaticResource Strings}}\">\r\n                                <i:Interaction.Behaviors>\r\n                                    <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                                </i:Interaction.Behaviors>\r\n                            </toolkit:ToggleSwitch>\r\n                            <TextBlock Text=\"{Binding Resources.SignMessagesDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,0,12,12\"/>\r\n                        </StackPanel>\r\n\r\n\r\n                        <Button Margin=\"-12,0,-12,12\" micro:Message.Attach=\"DeleteChannel\" Visibility=\"{Binding IsChannelAdmin, Converter={StaticResource BooleanToVisibilityConverter}}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" Text=\"{Binding DeleteChannelString}\"/>\r\n                        </Button>\r\n                    </StackPanel>\r\n                </StackPanel>\r\n            </Grid>\r\n        </ScrollViewer>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n        <Grid x:Name=\"Bar\" Grid.Row=\"2\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform/>\r\n            </Grid.RenderTransform>\r\n            <controls1:TelegramApplicationBar\r\n                x:Name=\"AppBar\"\r\n                VerticalAlignment=\"Bottom\"\r\n                MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                <controls1:TelegramApplicationBar.Buttons>\r\n                    <controls1:TelegramAppBarButton\r\n                        IsEnabled=\"True\"\r\n                        Grid.Column=\"3\" \r\n                        Tap=\"DoneButton_OnClick\"\r\n                        ImageSource=\"/Images/W10M/ic_done_2x.png\"\r\n                        Text=\"{Binding Resources.Done, Source={StaticResource Strings}}\"/>\r\n                </controls1:TelegramApplicationBar.Buttons>\r\n            </controls1:TelegramApplicationBar>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/EditChatView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.Views.Controls;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class EditChatView\r\n    {\r\n        public static readonly DependencyProperty AppBarStateProperty =\r\n            DependencyProperty.Register(\"AppBarState\", typeof (string), typeof (EditChatView), new PropertyMetadata(OnAppBarStateChanged));\r\n\r\n        private static void OnAppBarStateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var state = (string)e.NewValue;\r\n\r\n            var view = (EditChatView) d;\r\n\r\n            if (state == \"Working\")\r\n            {\r\n                view._doneButton.IsEnabled = false;\r\n                view._cancelButton.IsEnabled = false;\r\n            }\r\n            else\r\n            {\r\n                view._doneButton.IsEnabled = true;\r\n                view._cancelButton.IsEnabled = true;\r\n            }\r\n        }\r\n\r\n        public string AppBarState\r\n        {\r\n            get { return (string) GetValue(AppBarStateProperty); }\r\n            set { SetValue(AppBarStateProperty, value); }\r\n        }\r\n\r\n        public EditChatViewModel ViewModel { get { return DataContext as EditChatViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public EditChatView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            Loaded += (sender, args) => BuildLocalizedAppBar();\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            return;\r\n            if (ApplicationBar == null)\r\n            {\r\n                ApplicationBar = new ApplicationBar();\r\n\r\n                ApplicationBar.Buttons.Add(_doneButton);\r\n                ApplicationBar.Buttons.Add(_cancelButton);\r\n            }\r\n        }\r\n\r\n        private void TelegramNavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.ForwardInAnimationComplete();\r\n        }\r\n\r\n        private void EditChatView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                var multiplePhotoChooser = popup.Child as OpenPhotoPicker;\r\n                if (multiplePhotoChooser != null)\r\n                {\r\n                    multiplePhotoChooser.TryClose();\r\n                }\r\n\r\n                var cropControl = popup.Child as CropControl;\r\n                if (cropControl != null)\r\n                {\r\n                    cropControl.TryClose();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        private void DoneButton_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/EditGroupTypeView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.EditGroupTypeView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls1:TelegramTransitionService.NavigationInTransition>\r\n        <controls1:TelegramNavigationInTransition>\r\n            <controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls1:TelegramNavigationInTransition.Backward>\r\n            <controls1:TelegramNavigationInTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls1:TelegramNavigationInTransition.Forward>\r\n        </controls1:TelegramNavigationInTransition>\r\n    </controls1:TelegramTransitionService.NavigationInTransition>\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition>\r\n            <controls1:TelegramNavigationOutTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Backward>\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"ChannelTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"0,0,18,-12\" Height=\"92\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=ContentPanel}\" >\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [RevokeLink($DataContext)]\" Header=\"{Binding Resources.RevokeLink, Source={StaticResource Strings}}\"/>\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid Margin=\"12,12,0,7\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\">\r\n                            <Grid>\r\n                                <Border Height=\"62\" Width=\"62\" Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n                                <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                                <Image Height=\"62\" Width=\"62\" Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n\r\n                        <Grid Grid.Row=\"0\" Grid.Column=\"1\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <Grid Grid.Column=\"1\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <TextBlock\r\n                                    Margin=\"14,-2,0,-1\" FontSize=\"36.667\" MaxHeight=\"48.77\"\r\n                                    Text=\"{Binding FullName}\" \r\n                                    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                                    Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n\r\n                        <ContentControl Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"13,0,0,0\"\r\n                            HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalAlignment=\"Top\"\r\n                            FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                            FontSize=\"{StaticResource PhoneFontSizeNormal}\">\r\n\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <Grid Grid.Column=\"0\" VerticalAlignment=\"Top\" Margin=\"2,0,0,0\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n\r\n                                    <TextBlock Grid.Column=\"1\" Height=\"22\"\r\n                                        Margin=\"0\"\r\n                                        LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                                        Text=\"t.me/\"\r\n                                        Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n\r\n                                    <TextBlock Grid.Column=\"2\" Height=\"22\"\r\n                                        Margin=\"0\"\r\n                                        LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                                        Text=\"{Binding UserName}\" TextWrapping=\"NoWrap\"\r\n                                        TextTrimming=\"WordEllipsis\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </ContentControl>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" CacheMode=\"BitmapCache\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding HasError}\" Value=\"True\" TrueState=\"NotAvailable\" FalseState=\"Available\"/>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsUsernameAvailable}\" Value=\"True\" TrueState=\"UsernameAvailable\" FalseState=\"UsernameNotAvailable\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"UsernameAvailableGroup\">\r\n                <VisualState x:Name=\"UsernameNotAvailable\">\r\n                    <Storyboard>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"-100\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"1\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"UsernameAvailable\">\r\n                    <Storyboard>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"100\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n            <VisualStateGroup x:Name=\"AvailabilityGroup\">\r\n                <VisualState x:Name=\"Available\">\r\n                    <Storyboard>\r\n                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ErrorBorder\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                        </ObjectAnimationUsingKeyFrames>-->\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"-100\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"1\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"NotAvailable\">\r\n                    <Storyboard>\r\n                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ErrorBorder\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                        </ObjectAnimationUsingKeyFrames>-->\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"100\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding TypeCaption, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer x:Name=\"ScrollViewer\" Grid.Row=\"1\" ManipulationStarted=\"ScrollViewer_OnManipulationStarted\">\r\n            <Grid x:Name=\"ContentPanel\" Margin=\"12,0,12,72\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <Grid Margin=\"0,6,0,0\" Grid.Row=\"0\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <RadioButton Grid.Row=\"0\" GroupName=\"ChannelType\" IsChecked=\"{Binding IsPublic, Mode=TwoWay}\" Margin=\"0,6,0,-16\" Content=\"{Binding PublicTypeTitle}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Text=\"{Binding PublicTypeDescription}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"60,0,12,0\"/>\r\n                    <RadioButton Margin=\"0,18,0,-16\" Grid.Row=\"2\" GroupName=\"ChannelType\" IsChecked=\"{Binding IsPublic, Converter={StaticResource InvertBooleanConverter}}\" Content=\"{Binding PrivateTypeTitle}\"/>\r\n                    <TextBlock Grid.Row=\"3\" Text=\"{Binding PrivateTypeDescription}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"60,0,12,0\"/>\r\n                </Grid>\r\n                \r\n                <Grid Grid.Row=\"1\" Margin=\"0,24,0,0\" Visibility=\"{Binding IsPublic, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                    <Grid Visibility=\"{Binding TooMuchUsernames, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <TextBlock VerticalAlignment=\"Bottom\" Text=\"{Binding Resources.Link, Source={StaticResource Strings}, StringFormat='\\{0\\}: t.me/'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        <TextBox Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"-36,-12,-12,-12\" x:Name=\"UserName\" Style=\"{StaticResource HiddenTextBoxStyle}\"/>\r\n                        <Border Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,2,12,0\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n\r\n                        <TextBlock Grid.Row=\"3\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,24,12,0\" x:Name=\"Error\" Text=\"{Binding Error}\" TextWrapping=\"Wrap\" Foreground=\"#FFB2362E\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                            <TextBlock.RenderTransform>\r\n                                <TranslateTransform/>\r\n                            </TextBlock.RenderTransform>\r\n                        </TextBlock>\r\n                        <TextBlock Grid.Row=\"3\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,24,12,0\" x:Name=\"UsernameHint\" Text=\"{Binding UsernameAvailableString}\" TextWrapping=\"Wrap\" Foreground=\"ForestGreen\"  Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                            <TextBlock.RenderTransform>\r\n                                <TranslateTransform/>\r\n                            </TextBlock.RenderTransform>\r\n                        </TextBlock>\r\n                        <TextBlock Grid.Row=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,24,12,0\" Text=\"{Binding PublicLinkDescription}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n\r\n                    <Grid Visibility=\"{Binding TooMuchUsernames, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Grid.Column=\"0\" Text=\"{Binding Resources.ChannelsAdminPublicTooMuch, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Foreground=\"#FFB2362E\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                            <TextBlock.RenderTransform>\r\n                                <TranslateTransform Y=\"0\"/>\r\n                            </TextBlock.RenderTransform>\r\n                        </TextBlock>\r\n                        <ItemsControl Grid.Row=\"1\" Margin=\"0,12,12,28\" ItemsSource=\"{Binding AdminedPublicChannels}\" ItemTemplate=\"{StaticResource ChannelTemplate}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <Grid Grid.Row=\"1\" Margin=\"0,24,0,0\" Background=\"Transparent\" Visibility=\"{Binding IsPublic, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                            <toolkit:MenuItem Click=\"CopyInvite_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock VerticalAlignment=\"Bottom\" Text=\"{Binding InviteLink}\" TextWrapping=\"Wrap\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    <Border Grid.Row=\"1\" Grid.Column=\"0\" Margin=\"12,2,12,24\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    <TextBlock Grid.Row=\"2\" Text=\"{Binding PrivateLinkDescription}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </ScrollViewer>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n        <Grid x:Name=\"Bar\" Grid.Row=\"2\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform/>\r\n            </Grid.RenderTransform>\r\n            <controls:TelegramApplicationBar\r\n                x:Name=\"AppBar\"\r\n                VerticalAlignment=\"Bottom\"\r\n                MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                <controls:TelegramApplicationBar.Buttons>\r\n                    <controls:TelegramAppBarButton\r\n                        IsEnabled=\"True\"\r\n                        Grid.Column=\"3\" \r\n                        Tap=\"DoneButton_OnClick\"\r\n                        ImageSource=\"/Images/W10M/ic_done_2x.png\"\r\n                        Text=\"{Binding Resources.Done, Source={StaticResource Strings}}\"/>\r\n                </controls:TelegramApplicationBar.Buttons>\r\n            </controls:TelegramApplicationBar>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/EditGroupTypeView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing Microsoft.Phone.Controls;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class EditGroupTypeView\r\n    {\r\n        public EditGroupTypeViewModel ViewModel\r\n        {\r\n            get { return DataContext as EditGroupTypeViewModel; }\r\n        }\r\n\r\n        public EditGroupTypeView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                ViewModel.EmptyUserName += OnEmptyUserName;\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.EmptyUserName -= OnEmptyUserName;\r\n            };\r\n        }\r\n\r\n        private void OnEmptyUserName(object sender, System.EventArgs e)\r\n        {\r\n            UserName.Focus();\r\n        }\r\n\r\n        private void CopyInvite_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyInvite();\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ContextMenuService.GetContextMenu((DependencyObject)sender).IsOpen = true;\r\n        }\r\n\r\n        private void ScrollViewer_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (FocusManager.GetFocusedElement() == UserName)\r\n            {\r\n                ScrollViewer.Focus();\r\n            }\r\n        }\r\n\r\n        private void DoneButton_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/GroupsInCommonView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.GroupsInCommonView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"ChatItemTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action ChatAction($DataContext)]\">\r\n                        <!--<Grid.Triggers>\r\n                            <EventTrigger RoutedEvent=\"Grid.Loaded\">\r\n                                <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"00:00:0.15\" From=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"MainItemGrid\"/>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </EventTrigger>\r\n                        </Grid.Triggers>-->\r\n\r\n\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"72\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <views:ConversationTileControl Size=\"72\" \r\n                            Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <!--<Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>-->\r\n                            <TextBlock Grid.Row=\"0\" Margin=\"14,-6,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" VerticalAlignment=\"Center\" Text=\"{Binding FullName}\" MaxHeight=\"42.56\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <!--<TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.GroupsInCommon, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\">\r\n            <ItemsControl Margin=\"6,0,0,0\" ItemsSource=\"{Binding Items}\" ItemTemplate=\"{StaticResource ChatItemTemplate}\">\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer>\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n            </ItemsControl>\r\n            <TextBlock Margin=\"24,0\" Text=\"{Binding Status}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/GroupsInCommonView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing TelegramClient.ViewModels.Chats;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class GroupsInCommonView\r\n    {\r\n        public GroupsInCommonViewModel ViewModel\r\n        {\r\n            get { return DataContext as GroupsInCommonViewModel; }\r\n        }\r\n\r\n        public GroupsInCommonView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Chats/InviteLinkView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.InviteLinkView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n    \r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <!--<controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>-->\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <!--<controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>-->\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.InviteLink, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n            <!--<TextBlock Text=\"page name\" Margin=\"9,-7,0,0\" Style=\"{StaticResource PhoneTextTelegramTitle1Style}\"/>-->\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <TextBlock Margin=\"12,10,12,-5\" Grid.Row=\"1\" TextWrapping=\"Wrap\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Text=\"{Binding Link}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" />\r\n            <TextBlock Grid.Row=\"3\" Margin=\"12,23,12,0\" Text=\"{Binding Resources.InviteLinkHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n            <Button Margin=\"-12,12,-12,0\" Grid.Row=\"4\" x:Name=\"CopyLink\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                <StackPanel>\r\n                    <TextBlock Margin=\"10,0,-12,0\" FontSize=\"36.667\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" Text=\"{Binding Resources.CopyLink, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                    <TextBlock Margin=\"12,-6,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                </StackPanel>\r\n            </Button>\r\n\r\n            <Button Margin=\"-12,-10,-12,0\" Grid.Row=\"5\" x:Name=\"RevokeLink\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                <StackPanel>\r\n                    <TextBlock Margin=\"10,0,-12,0\" FontSize=\"36.667\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" Text=\"{Binding Resources.RevokeLink, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                    <TextBlock Margin=\"12,-6,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                </StackPanel>\r\n            </Button>\r\n\r\n            <Button Margin=\"-12,-10,-12,0\" Grid.Row=\"6\" x:Name=\"ShareLink\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                <StackPanel>\r\n                    <TextBlock Margin=\"10,0,-12,0\" FontSize=\"36.667\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" Text=\"{Binding Resources.ShareLink, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                    <TextBlock Margin=\"12,-6,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                </StackPanel>\r\n            </Button>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Chats/InviteLinkView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class InviteLinkView\r\n    {\r\n        public InviteLinkView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Contacts/ContactDetailsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Contacts.ContactDetailsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:toolkitPrimitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"-12,0\">\r\n        <ScrollViewer>\r\n            <Grid x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                \r\n                <Grid Grid.Row=\"0\" Margin=\"0,15,0,0\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n\r\n                    <views:ConversationTileControl\r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenPhoto]\"\r\n\t\t\t\t            Margin=\"12,0,0,0\" \r\n                            Size=\"100\"\r\n                            Object=\"{Binding CurrentItem}\"\r\n                            Fill=\"{Binding CurrentItem.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding CurrentItem, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding CurrentItem.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n\r\n                    <StackPanel Grid.Column=\"1\" VerticalAlignment=\"Top\">\r\n                        <TextBlock Margin=\"24,13,0,0\" Text=\"{Binding CurrentItem.FullName2}\" FontSize=\"30\" Foreground=\"White\"/>\r\n                        <TextBlock Margin=\"24,1,0,0\" Text=\"{Binding Subtitle}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n\r\n                <StackPanel Grid.Row=\"1\" Margin=\"0,24,0,0\" x:Name=\"Actions\">\r\n                    <Button Margin=\"-12,0\" x:Name=\"SendMessage\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.SendMessage, Source={StaticResource Strings}}\"/>\r\n                    </Button>\r\n                    \r\n                    <Button Margin=\"-12,0\" x:Name=\"CreateSecretChat\" Visibility=\"{Binding SecretChatVisibility}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.CreateSecretChat, Source={StaticResource Strings}}\"/>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" x:Name=\"StartVoiceCall\" Visibility=\"{Binding VoiceCallVisibility}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.VoiceCall, Source={StaticResource Strings}}\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <!--<Button Margin=\"-12,0\" x:Name=\"OpenVoiceCallLog\" Visibility=\"{Binding VoiceCallVisibility}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"Open Voice Log\"/>\r\n                    </Button>-->\r\n\r\n                    <Button Margin=\"-12,0\" x:Name=\"Call\" Style=\"{StaticResource WhiteProfileButtonStyle}\" Visibility=\"{Binding HasPhone, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                <toolkit:MenuItem Click=\"CopyPhone_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\" />\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Mobile, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Phone, StringFormat='+{0}'}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" x:Name=\"Bio\" Style=\"{StaticResource WhiteProfileButtonStyle}\" Visibility=\"{Binding HasBio, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                <toolkit:MenuItem Click=\"CopyBio_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\" />\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Bio, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding BioSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" Style=\"{StaticResource WhiteProfileButtonStyle}\" Visibility=\"{Binding CurrentItem.UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                <toolkit:MenuItem Click=\"CopyLink_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\" />\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Username, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding CurrentItem.UserName, StringFormat='@{0}'}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" Visibility=\"{Binding Subtitle3, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                <toolkit:MenuItem Click=\"CopyBotInfo_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\" />\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"12,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.About, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Subtitle3}\" TextWrapping=\"Wrap\" TextTrimming=\"WordEllipsis\" MaxHeight=\"81\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" x:Name=\"AddToGroup\" Visibility=\"{Binding AddToGroupVisibility}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.AddToGroup, Source={StaticResource Strings}}\"/>\r\n                    </Button>\r\n                    \r\n                    <Button Margin=\"-12,0\" x:Name=\"OpenMedia\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Media, Source={StaticResource Strings}}\"/>\r\n                    </Button>\r\n                    \r\n                    <Button Margin=\"-12,0\" x:Name=\"OpenGroupsInCommon\" Visibility=\"{Binding GroupsInCommonVisibility}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.GroupsInCommon, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding GroupsInCommonSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n                    \r\n                    <!--<Button Margin=\"-12,0\" Visibility=\"{Binding IsReportButtonEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" micro:Message.Attach=\"Report\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Report, Source={StaticResource Strings}}\"/>\r\n                    </Button>-->\r\n\r\n                    <StackPanel Margin=\"0,24,0,0\" Visibility=\"{Binding NotificationsVisibility}\">\r\n                        <toolkit:ToggleSwitch x:Name=\"NotificationsSwitch\" Margin=\"0,0,-24,-21\" Foreground=\"White\" Checked=\"ToggleSwitch_OnChecked\" Unchecked=\"ToggleSwitch_OnUnchecked\" IsChecked=\"{Binding DataContext.MuteUntil, ElementName=Self, Converter={StaticResource MuteUntilToBoolConverter}}\" Header=\"{Binding Resources.Notifications, Source={StaticResource Strings}}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                            </i:Interaction.Behaviors>\r\n                        </toolkit:ToggleSwitch>\r\n                    </StackPanel>\r\n\r\n                    <StackPanel Margin=\"0,24,0,0\" Visibility=\"{Binding NotificationsVisibility}\">\r\n                        <toolkit:ListPicker \r\n                            Foreground=\"White\"\r\n                            Margin=\"12,-10,12,18\"\r\n                            BorderBrush=\"#99FFFFFF\"\r\n                            Header=\"{Binding Resources.Sound, Source={StaticResource Strings}}\"\r\n                            ItemsSource=\"{Binding StateService.Sounds}\"\r\n                            ExpansionMode=\"FullScreenOnly\"\r\n                            SelectedItem=\"{Binding SelectedSound, Mode=TwoWay}\"\r\n                            FullModeHeader=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                            <toolkit:ListPicker.ItemTemplate>\r\n                                <DataTemplate>\r\n                                    <TextBlock Margin=\"0,2,0,2\" Text=\"{Binding}\" FontSize=\"{StaticResource PhoneFontSizeMediumLarge}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                                </DataTemplate>\r\n                            </toolkit:ListPicker.ItemTemplate>\r\n                            <toolkit:ListPicker.FullModeItemTemplate>\r\n                                <DataTemplate>\r\n                                    <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                                </DataTemplate>\r\n                            </toolkit:ListPicker.FullModeItemTemplate>\r\n                        </toolkit:ListPicker>\r\n                    </StackPanel>\r\n                </StackPanel>\r\n            </Grid>\r\n        </ScrollViewer>\r\n        <Border Background=\"#99000000\" d:IsHidden=\"True\" Visibility=\"{Binding ProgressVisibility}\">\r\n            <TextBlock HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.Loading, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n        </Border>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Contacts/ContactDetailsView.xaml.cs",
    "content": "﻿using System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.Views.Contacts\r\n{\r\n    public partial class ContactDetailsView\r\n    {\r\n        public ContactDetailsViewModel ViewModel\r\n        {\r\n            get { return DataContext as ContactDetailsViewModel; }\r\n        }\r\n\r\n        public ContactDetailsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                NotificationsSwitch.Style = (Style)Application.Current.Resources[\"ProfileLightToggleSwitch\"];\r\n            }\r\n        }\r\n#if DEBUG\r\n        //~ContactDetailsView()\r\n        //{\r\n        //    TLUtils.WritePerformance(\"++ContactDetailsV destr\");\r\n        //}\r\n#endif\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var span = element.DataContext as TimerSpan;\r\n            if (span == null) return;\r\n\r\n            ViewModel.SelectSpan(span);\r\n        }\r\n\r\n        private void ToggleSwitch_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SelectSpan(ViewModel.Spans.First());\r\n        }\r\n\r\n        private void ToggleSwitch_OnUnchecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SelectSpan(ViewModel.Spans.Last());\r\n        }\r\n\r\n        private void CopyLink_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyLink();\r\n        }\r\n\r\n        private void CopyPhone_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyPhone();\r\n        }\r\n\r\n        private void CopyBotInfo_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyBotInfo();\r\n        }\r\n\r\n        private void CopyBio_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyBio();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Contacts/ContactInfoView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Contacts.ContactInfoView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding ActiveItem.IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,17,0,28\">\r\n            <TextBlock Text=\"MY APPLICATION\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n            <TextBlock Text=\"page name\" Margin=\"9,-7,0,0\" Style=\"{StaticResource PhoneTextTelegramTitle1Style}\"/>\r\n            <TextBlock x:Name=\"TimerString\"/>\r\n        </StackPanel>\r\n\r\n        <Grid Grid.Row=\"1\" Margin=\"0,0\">\r\n            <ScrollViewer>\r\n\r\n                <Grid x:Name=\"ContentPanel\" Margin=\"12,0\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Border x:Name=\"PhotoPlaceholder\"\r\n                    micro:Message.Attach=\"[Event Tap] = [Action OpenPhoto]\"\r\n\t\t\t\t    Margin=\"12,10\" \r\n                    Height=\"128\" Width=\"128\"\r\n                    Background=\"{Binding CurrentItem.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\">\r\n                        <Grid>\r\n                            <TextBlock FontSize=\"56\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding CurrentItem, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                            <Image x:Name=\"UserPhoto\" Source=\"{Binding CurrentItem.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n                        </Grid>\r\n                    </Border>\r\n\r\n                    <StackPanel Grid.Row=\"0\" Grid.Column=\"1\">\r\n                        <TextBlock Margin=\"0,2,0,0\" TextWrapping=\"Wrap\" Text=\"{Binding CurrentItem.UserName, StringFormat='@{0}'}\" Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                        Visibility=\"{Binding CurrentItem.UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" />\r\n                        <TextBlock Margin=\"0,2,0,0\" TextWrapping=\"Wrap\" Text=\"{Binding Subtitle}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" />\r\n                    </StackPanel>\r\n\r\n                    <Grid Grid.Row=\"1\" Grid.ColumnSpan=\"2\" Margin=\"0,-8,0,0\" x:Name=\"Actions\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Button Margin=\"-12,9,0,0\" Grid.Row=\"0\" x:Name=\"SendMessage\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <TextBlock Margin=\"10,0,12,0\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"36\" Text=\"{Binding Resources.SendMessage, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                        </Button>\r\n                        <Button Margin=\"-12,0\" Grid.Row=\"1\" x:Name=\"CreateSecretChat\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <TextBlock Margin=\"10,0,12,0\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"36\" Text=\"{Binding Resources.CreateSecretChat, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                        </Button>\r\n                        <Button Margin=\"-12,0\" Grid.Row=\"2\" x:Name=\"Call\" Style=\"{StaticResource ProfileButtonStyle}\" Visibility=\"{Binding HasPhone, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                            <StackPanel>\r\n                                <TextBlock Margin=\"10,0,12,0\" FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" FontSize=\"36\" Text=\"{Binding Resources.Call, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                                <TextBlock Margin=\"12,-7,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Phone, StringFormat='+{0}'}\" Foreground=\"{StaticResource PhoneAccentBrush}\"/>\r\n                            </StackPanel>\r\n                        </Button>\r\n\r\n                        <StackPanel Grid.Row=\"4\" Margin=\"0,24,0,0\">\r\n                            <toolkit:ListPicker\r\n                                Margin=\"12,-10,12,0\"\r\n                                Header=\"{Binding Resources.Notifications, Source={StaticResource Strings}}\"\r\n                                ItemsSource=\"{Binding Spans}\"\r\n                                ExpansionMode=\"FullScreenOnly\"\r\n                                FullModeHeader=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                                <toolkit:ListPicker.ItemTemplate>\r\n                                    <DataTemplate>\r\n                                        <Grid>\r\n                                            <TextBlock Margin=\"0,2,0,2\" Text=\"{Binding DataContext.MuteUntil, ElementName=Self, Converter={StaticResource MuteUntilToStringConverter}}\" FontSize=\"{StaticResource PhoneFontSizeMediumLarge}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                                        </Grid>\r\n                                    </DataTemplate>\r\n                                </toolkit:ListPicker.ItemTemplate>\r\n                                <toolkit:ListPicker.FullModeItemTemplate>\r\n                                    <DataTemplate>\r\n                                        <TextBlock Margin=\"0,12\" Text=\"{Binding Description}\" Tap=\"UIElement_OnTap\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                                    </DataTemplate>\r\n                                </toolkit:ListPicker.FullModeItemTemplate>\r\n                            </toolkit:ListPicker>\r\n                        </StackPanel>\r\n\r\n                        <StackPanel Grid.Row=\"5\" Margin=\"0,24,0,0\">\r\n                            <toolkit:ListPicker\r\n                                Margin=\"12,-10,12,62\"\r\n                                Header=\"{Binding Resources.Sound, Source={StaticResource Strings}}\"\r\n                                ItemsSource=\"{Binding StateService.Sounds}\"\r\n                                SelectedItem=\"{Binding SelectedSound, Mode=TwoWay}\"\r\n                                FullModeHeader=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                                <toolkit:ListPicker.ItemTemplate>\r\n                                    <DataTemplate>\r\n                                        <TextBlock Text=\"{Binding}\"/>\r\n                                    </DataTemplate>\r\n                                </toolkit:ListPicker.ItemTemplate>\r\n                                <toolkit:ListPicker.FullModeItemTemplate>\r\n                                    <DataTemplate>\r\n                                        <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                                    </DataTemplate>\r\n                                </toolkit:ListPicker.FullModeItemTemplate>\r\n                            </toolkit:ListPicker>\r\n                        </StackPanel>\r\n                    </Grid>\r\n                </Grid>\r\n            </ScrollViewer>\r\n            <Border Background=\"#99000000\" Visibility=\"{Binding ProgressVisibility, FallbackValue=Collapsed}\">\r\n                <TextBlock HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.Loading, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n            </Border>\r\n        </Grid>\r\n\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Contacts/ContactInfoView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Windows.Input;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.Views.Contacts\r\n{\r\n    public partial class ContactInfoView\r\n    {\r\n        private ContactInfoViewModel ViewModel { get { return DataContext as ContactInfoViewModel; } }\r\n\r\n        #region Application Bar\r\n        private readonly AppBarButton _editButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Edit,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.edit.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _shareButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Share,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.share.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _searchButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Search,\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.feature.search.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarMenuItem _blockMenuItem = new AppBarMenuItem\r\n        {\r\n            Text = AppResources.BlockContact\r\n        };\r\n\r\n        private readonly AppBarMenuItem _unblockMenuItem = new AppBarMenuItem\r\n        {\r\n            Text = AppResources.UnblockContact\r\n        };\r\n\r\n        private readonly AppBarMenuItem _addMenuItem = new AppBarMenuItem\r\n        {\r\n            Text = AppResources.AddContact\r\n        };\r\n\r\n        private readonly AppBarMenuItem _deleteMenuItem = new AppBarMenuItem\r\n        {\r\n            Text = AppResources.DeleteContact\r\n        };\r\n        #endregion\r\n\r\n        public ContactInfoView()\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                TimerString.Text = timer.Elapsed.ToString();\r\n\r\n                BuildLocalizedAppBar();\r\n            };\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_shareButton);\r\n            ApplicationBar.Buttons.Add(_editButton);\r\n\r\n            if (ViewModel.CurrentItem != null && ViewModel.CurrentItem.IsContact)\r\n            {\r\n                ApplicationBar.MenuItems.Add(_deleteMenuItem);\r\n            }\r\n            else\r\n            {\r\n                ApplicationBar.MenuItems.Add(_addMenuItem);\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            \r\n\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Contacts/ContactView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Contacts.ContactView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls2=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    micro:Message.Attach=\"[Event BackKeyPress] = [Action OnBackKeyPressed]\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    BackKeyPress=\"ContactView_OnBackKeyPress\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" >\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls1:TelegramTransitionService.NavigationInTransition>\r\n        <controls1:TelegramNavigationInTransition>\r\n            <controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls1:TelegramNavigationInTransition.Backward>\r\n            <controls1:TelegramNavigationInTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls1:TelegramNavigationInTransition.Forward>\r\n        </controls1:TelegramNavigationInTransition>\r\n    </controls1:TelegramTransitionService.NavigationInTransition>\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition>\r\n            <controls1:TelegramNavigationOutTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Backward>\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>  \r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Info, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\" x:Name=\"ContentPanel\">\r\n            <Grid Margin=\"6,0\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <Grid Grid.Row=\"0\" Margin=\"0,15,0,0\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n\r\n                    <views:ConversationTileControl\r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenPhoto]\"\r\n\t\t\t\t            Margin=\"12,0,0,0\" \r\n                            Size=\"100\"\r\n                            Object=\"{Binding CurrentItem}\"\r\n                            Fill=\"{Binding CurrentItem.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding CurrentItem, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding CurrentItem.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n\r\n                    <StackPanel Grid.Column=\"1\" VerticalAlignment=\"Top\">\r\n                        <TextBlock Margin=\"24,13,0,0\" Text=\"{Binding CurrentItem.FullName2}\" FontSize=\"30\" Foreground=\"White\"/>\r\n                        <TextBlock Margin=\"24,1,0,0\" Text=\"{Binding Subtitle}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n\r\n                <StackPanel Grid.Row=\"1\" Margin=\"0,24,0,0\" x:Name=\"Actions\">\r\n                    <Button Margin=\"-12,0\" x:Name=\"SendMessage\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.SendMessage, Source={StaticResource Strings}}\"/>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" x:Name=\"CreateSecretChat\" Visibility=\"{Binding SecretChatVisibility}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.CreateSecretChat, Source={StaticResource Strings}}\"/>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" x:Name=\"StartVoiceCall\" Visibility=\"{Binding VoiceCallVisibility}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.VoiceCall, Source={StaticResource Strings}}\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" x:Name=\"Call\" Style=\"{StaticResource WhiteProfileButtonStyle}\" Visibility=\"{Binding HasPhone, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                <toolkit:MenuItem Click=\"CopyPhone_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\" />\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Mobile, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Phone, StringFormat='+{0}'}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" x:Name=\"Bio\" Style=\"{StaticResource WhiteProfileButtonStyle}\" Visibility=\"{Binding HasBio, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                <toolkit:MenuItem Click=\"CopyBio_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\" />\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Bio, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding BioSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" Style=\"{StaticResource WhiteProfileButtonStyle}\" Visibility=\"{Binding CurrentItem.UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                <toolkit:MenuItem Click=\"CopyLink_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\" />\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Username, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding CurrentItem.UserName, StringFormat='@{0}'}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0\" Visibility=\"{Binding Subtitle3, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                <toolkit:MenuItem Click=\"CopyBotInfo_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\" />\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"12,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.About, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Subtitle3}\" TextWrapping=\"Wrap\" TextTrimming=\"WordEllipsis\" MaxHeight=\"81\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" x:Name=\"AddToGroup\" Visibility=\"{Binding AddToGroupVisibility}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.AddToGroup, Source={StaticResource Strings}}\"/>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" x:Name=\"OpenMedia\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Media, Source={StaticResource Strings}}\"/>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" x:Name=\"OpenGroupsInCommon\" Visibility=\"{Binding GroupsInCommonVisibility}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.GroupsInCommon, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding GroupsInCommonSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n\r\n                    <StackPanel Margin=\"0,24,0,0\" Visibility=\"{Binding NotificationsVisibility}\">\r\n                        <toolkit:ToggleSwitch x:Name=\"NotificationsSwitch\" Margin=\"0,0,-24,-21\" Foreground=\"White\" Checked=\"ToggleSwitch_OnChecked\" Unchecked=\"ToggleSwitch_OnUnchecked\" IsChecked=\"{Binding DataContext.MuteUntil, ElementName=Self, Converter={StaticResource MuteUntilToBoolConverter}}\" Header=\"{Binding Resources.Notifications, Source={StaticResource Strings}}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                    OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                    OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                            </i:Interaction.Behaviors>\r\n                        </toolkit:ToggleSwitch>\r\n                    </StackPanel>\r\n\r\n                    <StackPanel Margin=\"0,24,0,0\" Visibility=\"{Binding NotificationsVisibility}\">\r\n                        <toolkit:ListPicker \r\n                            Foreground=\"White\"\r\n                            Margin=\"12,-10,12,18\"\r\n                            BorderBrush=\"#99FFFFFF\"\r\n                            Header=\"{Binding Resources.Sound, Source={StaticResource Strings}}\"\r\n                            ItemsSource=\"{Binding StateService.Sounds}\"\r\n                            ExpansionMode=\"FullScreenOnly\"\r\n                            SelectedItem=\"{Binding SelectedSound, Mode=TwoWay}\"\r\n                            FullModeHeader=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                            <toolkit:ListPicker.ItemTemplate>\r\n                                <DataTemplate>\r\n                                    <TextBlock Margin=\"0,2,0,2\" Text=\"{Binding}\" FontSize=\"{StaticResource PhoneFontSizeMediumLarge}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                                </DataTemplate>\r\n                            </toolkit:ListPicker.ItemTemplate>\r\n                            <toolkit:ListPicker.FullModeItemTemplate>\r\n                                <DataTemplate>\r\n                                    <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                                </DataTemplate>\r\n                            </toolkit:ListPicker.FullModeItemTemplate>\r\n                        </toolkit:ListPicker>\r\n                    </StackPanel>\r\n                </StackPanel>\r\n            </Grid>\r\n        </ScrollViewer>\r\n        \r\n        <Border Grid.Row=\"1\" Background=\"#99000000\" d:IsHidden=\"True\" Visibility=\"{Binding ProgressVisibility}\">\r\n            <TextBlock HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.Loading, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n        </Border>\r\n\r\n        <Border x:Name=\"MorePanelBackground\" Grid.RowSpan=\"3\" d:IsHidden=\"True\" Tap=\"MorePanelBackground_OnTap\" Visibility=\"Collapsed\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n        \r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n            <ContentControl x:Name=\"AppBarMenuItemsPlaceholder\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\">\r\n                <StackPanel x:Name=\"AppBarMenuItems\"/>\r\n            </ContentControl>\r\n        </Border>\r\n        \r\n        <controls2:TelegramApplicationBar Grid.Row=\"2\"\r\n            x:Name=\"AppBarPanel\" \r\n            VerticalAlignment=\"Bottom\"\r\n            MorePanel=\"{Binding ElementName=MorePanel}\"\r\n            PanelOpened=\"AppBarPanel_OnPanelOpened\"\r\n            PanelClosed=\"AppBarPanel_OnPanelClosed\">\r\n            <controls2:TelegramApplicationBar.Buttons>\r\n                <controls2:TelegramAppBarButton\r\n                    x:Name=\"EditButton\"\r\n                    Grid.Column=\"3\"\r\n                    Tap=\"EditButton_OnTap\"\r\n                    ImageSource=\"/Images/W10M/ic_edit_2x.png\"\r\n                    Text=\"{Binding Resources.Edit, Source={StaticResource Strings}}\"/>\r\n                <controls2:TelegramAppBarButton\r\n                    x:Name=\"ShareButton\"\r\n                    Grid.Column=\"2\"\r\n                    Tap=\"ShareButton_OnTap\"\r\n                    ImageSource=\"/Images/W10M/ic_share_2x.png\"\r\n                    Text=\"{Binding Resources.Share, Source={StaticResource Strings}}\"/>\r\n            </controls2:TelegramApplicationBar.Buttons>\r\n        </controls2:TelegramApplicationBar>\r\n\r\n        <ContentControl x:Name=\"ProfilePhotoViewer\" Grid.RowSpan=\"3\" micro:View.Model=\"{Binding ProfilePhotoViewer}\"\r\n            VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n            VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n    </Grid>\r\n    \r\n    \r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Contacts/ContactView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Media;\r\n\r\nnamespace TelegramClient.Views.Contacts\r\n{\r\n    public partial class ContactView\r\n    {\r\n        public ContactViewModel ViewModel { get { return DataContext as ContactViewModel; } }\r\n\r\n        private readonly AppBarButton _editButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Edit,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.edit.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _shareButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Share,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.share.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly ListBoxItem _reportMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.Report,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private readonly ListBoxItem _addToGroupMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.AddToGroup,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private readonly ListBoxItem _blockMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.BlockContact,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private readonly ListBoxItem _unblockMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.UnblockContact,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private readonly ListBoxItem _addMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.AddContact,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private readonly ListBoxItem _deleteMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.DeleteContact,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private IApplicationBar _prevAppBar;\r\n\r\n        public ContactView()\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                //NotificationsSwitch.Style = (Style)Application.Current.Resources[\"ProfileLightToggleSwitch\"];\r\n                LayoutRoot.Background = ShellView.CaptionBrush;\r\n                AppBarPanel.MorePanelBackgroundBrush = ShellView.CaptionBrush;\r\n                AppBarPanel.BackgroundBrush = ShellView.CaptionBrush;\r\n                foreach (var button in AppBarPanel.Buttons)\r\n                {\r\n                    var appBarButton = button as TelegramAppBarButton;\r\n                    if (appBarButton != null)\r\n                    {\r\n                        appBarButton.LabelForeground = new SolidColorBrush(Colors.White);\r\n                    }\r\n                }\r\n                AppBarPanel.MoreButton.LabelForeground = new SolidColorBrush(Colors.White);\r\n                AppBarMenuItemsPlaceholder.Foreground = new SolidColorBrush(Colors.White);\r\n            }\r\n\r\n            OptimizeFullHD();\r\n\r\n            _editButton.Click += (sender, args) => ViewModel.Edit();\r\n            _shareButton.Click += (sender, args) => ViewModel.Share();\r\n\r\n            _reportMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    ViewModel.Report();\r\n                });\r\n            };\r\n            _addToGroupMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    ViewModel.AddToGroup();\r\n                });\r\n            };\r\n            _blockMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    ViewModel.BlockContact();\r\n                });\r\n            };\r\n            _unblockMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    ViewModel.UnblockContact();\r\n                });\r\n            };\r\n            _addMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    ViewModel.AddContact();\r\n                });\r\n            };\r\n            _deleteMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    ViewModel.DeleteContact();\r\n                });\r\n            };\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                _blockMenuItem.Content = ViewModel.IsBot ? AppResources.StopBot : AppResources.BlockContact;\r\n                _unblockMenuItem.Content = ViewModel.IsBot ? AppResources.RestartBot : AppResources.UnblockContact;\r\n\r\n                if (ViewModel.ProfilePhotoViewer != null)\r\n                    ViewModel.ProfilePhotoViewer.PropertyChanged += OnProfileViewerPropertyChanged;\r\n\r\n                ViewModel.BlockedStatusChanged += OnBlockedStatusChanged;\r\n                ViewModel.ImportStatusChanged += OnImportStatusChanged;\r\n                ViewModel.PropertyChanged += OnContactDetailsPropertyChanges;\r\n\r\n                BuildLocalizedAppBar();\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                if (ViewModel.ProfilePhotoViewer != null)\r\n                    ViewModel.ProfilePhotoViewer.PropertyChanged -= OnProfileViewerPropertyChanged;\r\n\r\n                ViewModel.BlockedStatusChanged -= OnBlockedStatusChanged;\r\n                ViewModel.ImportStatusChanged -= OnImportStatusChanged;\r\n                ViewModel.PropertyChanged -= OnContactDetailsPropertyChanges;\r\n            };\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n#if WP8\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n            //if (!isFullHD) return;\r\n#endif\r\n\r\n            //Items.HeaderTemplate = (DataTemplate)Application.Current.Resources[\"FullHDPivotHeaderTemplate\"];\r\n        }\r\n\r\n        private void OnContactDetailsPropertyChanges(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ProfilePhotoViewer))\r\n            {\r\n                ViewModel.ProfilePhotoViewer.PropertyChanged += OnProfileViewerPropertyChanged;\r\n            }\r\n        }\r\n\r\n        private void OnImportStatusChanged(object sender, ImportEventArgs e)\r\n        {\r\n            Execute.OnUIThread(() =>\r\n            {\r\n                //if (ApplicationBar == null) return;\r\n                if (ViewModel.CurrentContact.IsSelf) return;\r\n\r\n                ViewModel.CurrentContact.NotifyOfPropertyChange(() => ViewModel.CurrentContact.FullName);\r\n\r\n                if (e.Imported)\r\n                {\r\n                    AppBarMenuItems.Children.Remove(_addMenuItem);\r\n                    AppBarMenuItems.Children.Insert(0, _deleteMenuItem);\r\n                }\r\n                else\r\n                {\r\n                    AppBarMenuItems.Children.Remove(_deleteMenuItem);\r\n                    if (ViewModel.CurrentContact.HasPhone) AppBarMenuItems.Children.Insert(0, _addMenuItem);\r\n                }\r\n            });\r\n        }\r\n\r\n        private void OnBlockedStatusChanged(object sender, BlockedEventArgs e)\r\n        {\r\n            Execute.OnUIThread(() =>\r\n            {\r\n                //if (ApplicationBar == null) return;\r\n                if (ViewModel.CurrentContact.IsSelf) return;\r\n\r\n                if (e.Blocked)\r\n                {\r\n                    AppBarMenuItems.Children.Remove(_blockMenuItem);\r\n                    AppBarMenuItems.Children.Add(_unblockMenuItem);\r\n                }\r\n                else\r\n                {\r\n                    AppBarMenuItems.Children.Remove(_unblockMenuItem);\r\n                    AppBarMenuItems.Children.Add(_blockMenuItem);\r\n                }\r\n            });\r\n        }\r\n\r\n        private void OnProfileViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ProfilePhotoViewer.IsOpen))\r\n            {\r\n                ContentPanel.IsHitTestVisible = !ViewModel.ProfilePhotoViewer.IsOpen;\r\n                AppBarPanel.Visibility = !ViewModel.ProfilePhotoViewer.IsOpen\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n\r\n                ViewModel.NotifyOfPropertyChange(() => ViewModel.IsViewerOpen);\r\n\r\n                if (ViewModel.ProfilePhotoViewer.IsOpen)\r\n                {\r\n                    _prevAppBar = ApplicationBar;\r\n\r\n                    var profilePhotoViewerView = ProfilePhotoViewer.Content as ProfilePhotoViewerView;\r\n                    ApplicationBar = profilePhotoViewerView != null? profilePhotoViewerView.ApplicationBar : null;\r\n                }\r\n                else\r\n                {\r\n                    // wait to finish closing profile viewer animation\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25),\r\n                        () =>\r\n                        {\r\n                            if (_prevAppBar != null)\r\n                            {\r\n                                ApplicationBar = _prevAppBar;\r\n                            }\r\n                        });\r\n                }\r\n            }\r\n        }\r\n\r\n        private ApplicationBar _applicationBar;\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (_applicationBar != null) return;\r\n\r\n            var contact = ViewModel.CurrentContact;\r\n            if (contact != null && contact.IsDeleted)\r\n            {\r\n                AppBarPanel.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            _applicationBar = new ApplicationBar { BackgroundColor = ((SolidColorBrush)ShellView.CaptionBrush).Color, ForegroundColor = Colors.White, Opacity = 0.99999 };\r\n            _applicationBar.Buttons.Add(_shareButton);\r\n            _applicationBar.Buttons.Add(_editButton);\r\n\r\n            var bot = ViewModel.CurrentContact as TLUser;\r\n            if (bot != null && bot.IsBot)\r\n            {\r\n                if (!bot.IsBotGroupsBlocked)\r\n                {\r\n                    AppBarMenuItems.Children.Add(_addToGroupMenuItem);\r\n                }\r\n\r\n                AppBarMenuItems.Children.Add(_reportMenuItem);\r\n            }\r\n\r\n            if (ViewModel.CurrentContact != null && ViewModel.CurrentContact.IsContact)\r\n            {\r\n                if (!ViewModel.CurrentContact.IsSelf)\r\n                {\r\n                    AppBarMenuItems.Children.Add(_deleteMenuItem);\r\n                }\r\n            }\r\n            else if (ViewModel.HasPhone)\r\n            {\r\n                AppBarMenuItems.Children.Add(_addMenuItem);\r\n            }\r\n        }\r\n\r\n        private void ContactView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            if (ViewModel.ProfilePhotoViewer != null \r\n                && ViewModel.ProfilePhotoViewer.IsOpen)\r\n            {\r\n                ViewModel.ProfilePhotoViewer.CloseViewer();\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n        }\r\n\r\n        private void AppBarPanel_OnPanelOpened(object sender, System.EventArgs e)\r\n        {\r\n            MorePanelBackground.Visibility = Visibility.Visible;\r\n        }\r\n\r\n        private void AppBarPanel_OnPanelClosed(object sender, System.EventArgs e)\r\n        {\r\n            MorePanelBackground.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private void MorePanelBackground_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n        }\r\n\r\n        private void EditButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                ViewModel.Edit();\r\n            });\r\n        }\r\n\r\n        private void ShareButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                ViewModel.Share();\r\n            });\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var span = element.DataContext as TimerSpan;\r\n            if (span == null) return;\r\n\r\n            ViewModel.SelectSpan(span);\r\n        }\r\n\r\n        private void ToggleSwitch_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SelectSpan(ViewModel.Spans.First());\r\n        }\r\n\r\n        private void ToggleSwitch_OnUnchecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SelectSpan(ViewModel.Spans.Last());\r\n        }\r\n\r\n        private void CopyLink_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyLink();\r\n        }\r\n\r\n        private void CopyPhone_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyPhone();\r\n        }\r\n\r\n        private void CopyBotInfo_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyBotInfo();\r\n        }\r\n\r\n        private void CopyBio_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyBio();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Contacts/ContactsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Contacts.ContactsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"GroupHeaderTemplate\">\r\n                <Border  Visibility=\"{Binding Key, Converter={StaticResource GroupVisibilityConverter}, ConverterParameter='@'}\"\r\n                    Margin=\"12,0,12,12\" Background=\"Transparent\">\r\n                    <Border Background=\"{StaticResource PhoneAccentBrush}\" BorderBrush=\"{StaticResource PhoneAccentBrush}\" BorderThickness=\"2\" Width=\"62\" \r\n                        Height=\"62\" Margin=\"0,0,18,0\" HorizontalAlignment=\"Left\">\r\n                        <TextBlock Text=\"{Binding Key}\" Foreground=\"White\" FontSize=\"48\" Padding=\"6\" \r\n                        FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\"/>\r\n                    </Border>\r\n                </Border>\r\n            </DataTemplate>\r\n            <DataTemplate x:Key=\"UserItemTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,0,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" micro:Message.Attach=\"[Event Tap] = [Action SetOpenContactElement($source)]; [Event Tap] = [Action UserAction($DataContext)]\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"62\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Border Width=\"62\" Height=\"62\" Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\">\r\n                            <Grid>\r\n                                <Image Source=\"/Images/Placeholder/placeholder.user.transparent-WXGA.png\" \r\n                                    Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\"/>\r\n                                <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TextBlock Grid.Row=\"0\" Margin=\"14,-6,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName}\" MaxHeight=\"42.56\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                                Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid Margin=\"0,-5,-16,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <TextBlock Grid.Row=\"1\" Margin=\"16,60\" Text=\"{Binding Status}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            <longListSelector:LongListSelector Grid.Row=\"1\" Margin=\"0,0,4,0\" ItemsSource=\"{Binding Contacts}\" ItemTemplate=\"{StaticResource UserItemTemplate}\" GroupHeaderTemplate=\"{StaticResource GroupHeaderTemplate}\">\r\n                <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                    <DataTemplate>\r\n                        <Button Margin=\"0,-12,0,18\" Style=\"{StaticResource ProfileButtonStyle}\" micro:Message.Attach=\"InviteFriends\">\r\n                            <TextBlock Margin=\"0,0,12,0\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" FontSize=\"36.667\" Text=\"{Binding Resources.InviteFriends, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"/>\r\n                        </Button>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListHeaderTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <Border Height=\"0\">\r\n                            <TextBlock Margin=\"16,0\" Text=\"{Binding Status}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                        </Border>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n                <longListSelector:LongListSelector.GroupItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <toolkit:WrapPanel Orientation=\"Horizontal\" Margin=\"0,32,0,0\"/>\r\n                    </ItemsPanelTemplate>\r\n                </longListSelector:LongListSelector.GroupItemsPanel>\r\n                <longListSelector:LongListSelector.GroupItemTemplate>\r\n                    <DataTemplate>\r\n                        <Border Background=\"Red\" Width=\"99\" Height=\"99\" Margin=\"6\" >\r\n                            <Grid>\r\n                                <TextBlock Text=\"{Binding Key}\" \r\n                                    Visibility=\"{Binding Key, Converter={StaticResource GroupVisibilityConverter}, ConverterParameter='@'}\"\r\n                                    FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"48\" Padding=\"6\" \r\n                                    Foreground=\"Green\" VerticalAlignment=\"Center\"/>\r\n                                <Image \r\n                                    Visibility=\"{Binding Key, Converter={StaticResource TelegramGroupVisibilityConverter}, ConverterParameter='@'}\"\r\n                                    Margin=\"6,24\" Source=\"/Images/LockScreen/lockscreen.png\" Width=\"37\" Height=\"37\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.GroupItemTemplate>\r\n            </longListSelector:LongListSelector>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Contacts/ContactsView.xaml.cs",
    "content": "﻿using System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Animation.Navigation;\r\n\r\nnamespace TelegramClient.Views.Contacts\r\n{\r\n    public partial class ContactsView\r\n    {\r\n        public ContactsView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n        \r\n        public FrameworkElement TapedItem;\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            TapedItem = (FrameworkElement) sender;\r\n\r\n            if (!(TapedItem.DataContext is TLUserContact)) return;\r\n\r\n            //foreach (var descendant in TapedItem.GetVisualDescendants().OfType<FrameworkElement>())\r\n            //{\r\n            //    if (AnimatedBasePage.GetIsAnimationTarget(descendant))\r\n            //    {\r\n            //        TapedItem = descendant;\r\n            //        break;\r\n            //    }\r\n            //}\r\n\r\n            if (!(TapedItem.RenderTransform is CompositeTransform))\r\n            {\r\n                TapedItem.RenderTransform = new CompositeTransform();\r\n            }\r\n\r\n            var tapedItemContainer = TapedItem.FindParentOfType<ListBoxItem>();\r\n            if (tapedItemContainer != null)\r\n            {\r\n                tapedItemContainer = tapedItemContainer.FindParentOfType<ListBoxItem>();\r\n            }\r\n\r\n            ShellView.StartContinuumForwardOutAnimation(TapedItem, tapedItemContainer);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Contacts/EditContactView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Contacts.EditContactView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\">\r\n                    <Storyboard>\r\n                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(chats:EditChatView.AppBarState)\" Storyboard.TargetName=\"Self\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Normal\"/>\r\n                        </ObjectAnimationUsingKeyFrames>-->\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"FirstName\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"LastName\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(chats:EditChatView.AppBarState)\" Storyboard.TargetName=\"Self\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Working\"/>\r\n                        </ObjectAnimationUsingKeyFrames>-->\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.EditName, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,6,6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <StackPanel>\r\n                <TextBlock Text=\"{Binding Resources.FirstName, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,0,12,-5\"/>\r\n                <TextBox x:Name=\"FirstName\" VerticalAlignment=\"Top\" MaxHeight=\"72\">\r\n                    <TextBox.InputScope>\r\n                        <InputScope>\r\n                            <InputScopeName NameValue=\"Text\"/>\r\n                        </InputScope>\r\n                    </TextBox.InputScope>\r\n                </TextBox>\r\n                <TextBlock Text=\"{Binding Resources.LastName, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,0,12,-5\"/>\r\n                <TextBox x:Name=\"LastName\" VerticalAlignment=\"Top\" MaxHeight=\"72\">\r\n                    <TextBox.InputScope>\r\n                        <InputScope>\r\n                            <InputScopeName NameValue=\"Text\"/>\r\n                        </InputScope>\r\n                    </TextBox.InputScope>\r\n                </TextBox>\r\n            </StackPanel>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Contacts/EditContactView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.Views.Contacts\r\n{\r\n    public partial class EditContactView\r\n    {\r\n        private readonly AppBarButton _saveButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Save,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.save.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public EditContactView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            _saveButton.Click += (sender, args) => ((EditContactViewModel) DataContext).Done();\r\n            _cancelButton.Click += (sender, args) => ((EditContactViewModel)DataContext).Cancel();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                BuildLocalizedAppBar();\r\n                ThreadPool.QueueUserWorkItem(state =>\r\n                {\r\n                    Thread.Sleep(300);\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        FirstName.Focus();\r\n                        FirstName.SelectionStart = FirstName.Text.Length;\r\n                        FirstName.SelectionLength = 0;\r\n                    });\r\n                });\r\n            };\r\n        }\r\n\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_saveButton);\r\n            ApplicationBar.Buttons.Add(_cancelButton);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Contacts/SecretContactDetailsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Contacts.SecretContactDetailsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"-6,-31,-12,0\">\r\n\r\n        <Grid x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n\r\n            <Grid Grid.Row=\"0\" Margin=\"0,15,0,0\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n\r\n                <views:ConversationTileControl\r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenPhoto]\"\r\n\t\t\t\t            Margin=\"12,0,0,0\" \r\n                            Size=\"100\"\r\n                            Fill=\"{Binding CurrentItem.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding CurrentItem, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding CurrentItem.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n\r\n                <StackPanel Grid.Column=\"1\" VerticalAlignment=\"Top\">\r\n                    <TextBlock Margin=\"24,13,0,0\" Text=\"{Binding CurrentItem.FullName2}\" FontSize=\"30\" Foreground=\"White\"/>\r\n                    <TextBlock Margin=\"24,1,0,0\" Text=\"{Binding Subtitle}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                </StackPanel>\r\n            </Grid>\r\n\r\n            <StackPanel Grid.Row=\"1\" Grid.ColumnSpan=\"2\" Margin=\"0,24,0,0\" x:Name=\"Actions\">\r\n                <Button Margin=\"-12,0\" x:Name=\"StartVoiceCall\" Visibility=\"{Binding VoiceCallVisibility}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.VoiceCall, Source={StaticResource Strings}}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Button Margin=\"-12,0\" x:Name=\"Call\" Style=\"{StaticResource WhiteProfileButtonStyle}\" Visibility=\"{Binding CurrentItem.HasPhone, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Mobile, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding CurrentItem.Phone, StringFormat='+{0}'}\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n                \r\n                <Button Margin=\"-12,0\" Style=\"{StaticResource WhiteProfileButtonStyle}\" Visibility=\"{Binding CurrentItem.UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\">\r\n                    <StackPanel>\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Username, Source={StaticResource Strings}}\"/>\r\n                        <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding CurrentItem.UserName, StringFormat='@{0}'}\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n\r\n                <Grid Visibility=\"{Binding EncryptionKeyVisibility}\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Margin=\"12,0,12,0\" Grid.Row=\"1\" FontSize=\"23\" Foreground=\"White\" Text=\"{Binding Resources.SelfDestructTimer, Source={StaticResource Strings}}\"/>\r\n                    <Button x:Name=\"SelectTimerSpan\" Grid.Row=\"2\" HorizontalContentAlignment=\"Stretch\" Foreground=\"White\" BorderBrush=\"#99FFFFFF\">\r\n                        <Grid>\r\n                            <TextBlock Text=\"{Binding SelectedSpan}\"/>\r\n                            <Polyline x:Name=\"DropDownMark\" Points=\"0 0 9 9 18 0\" FillRule=\"NonZero\" Margin=\"0 0 2 0\" StrokeThickness=\"2\" Stroke=\"#99FFFFFF\" Fill=\"Transparent\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" IsHitTestVisible=\"False\" FlowDirection=\"LeftToRight\"/>\r\n                       </Grid>\r\n                    </Button>\r\n\r\n                    <Button Margin=\"-12,0\" Grid.Row=\"3\" x:Name=\"OpenEncryptionKey\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.EncryptionKey, Source={StaticResource Strings}}\"/>\r\n                    </Button>\r\n                    <Button Margin=\"-12,0\" Grid.Row=\"4\" x:Name=\"OpenGroupsInCommon\" Visibility=\"{Binding GroupsInCommonVisibility}\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.GroupsInCommon, Source={StaticResource Strings}}\"/>\r\n                            <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding GroupsInCommonSubtitle}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n                </Grid>\r\n            </StackPanel>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Contacts/SecretContactDetailsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Views.Contacts\r\n{\r\n    public partial class SecretContactDetailsView\r\n    {\r\n        public SecretContactDetailsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                LayoutRoot.Background = ShellView.CaptionBrush;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Contacts/SecretContactView.xaml",
    "content": "﻿\r\n    <views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Contacts.SecretContactView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    IsScreenCaptureEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls1:TelegramTransitionService.NavigationInTransition>\r\n        <controls1:TelegramNavigationInTransition EndTransition=\"NavigationTransition_OnEndTransition\">\r\n            <controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardIn\"/>\r\n            </controls1:TelegramNavigationInTransition.Backward>\r\n            <controls1:TelegramNavigationInTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls1:TelegramNavigationInTransition.Forward>\r\n        </controls1:TelegramNavigationInTransition>\r\n    </controls1:TelegramTransitionService.NavigationInTransition>\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition>\r\n            <controls1:TelegramNavigationOutTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Backward>\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" Margin=\"0,0,0,-1\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n        <Border x:Name=\"Caption\" Grid.RowSpan=\"2\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <TextBlock x:Name=\"TimerString\" Visibility=\"Collapsed\"/>\r\n        \r\n        <controls:Pivot Grid.Row=\"1\" x:Name=\"Items\"\r\n            SelectedItem=\"{Binding ActiveItem, Mode=TwoWay}\"\r\n            Padding=\"-6,-7,0,0\"\r\n            Style=\"{StaticResource W10MPivotStyle}\">\r\n            <controls:Pivot.HeaderTemplate>\r\n                <DataTemplate>\r\n                    <TextBlock Text=\"{Binding DisplayName}\" />\r\n                </DataTemplate>\r\n            </controls:Pivot.HeaderTemplate>\r\n        </controls:Pivot>\r\n\r\n        <!--<StackPanel Grid.Row=\"0\" Margin=\"12,49,-12,0\" Orientation=\"Horizontal\">\r\n            <TextBlock Text=\"{Binding ChatName}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n            <Image Source=\"{Binding ChatImageSource}\" \r\n                   Height=\"19\" Width=\"19\" VerticalAlignment=\"Center\"\r\n                   Stretch=\"Uniform\"\r\n                   Margin=\"6,0,0,0\">\r\n                <Image.RenderTransform>\r\n                    <TranslateTransform Y=\"1\"/>\r\n                </Image.RenderTransform>\r\n            </Image>\r\n        </StackPanel>-->\r\n\r\n        <ContentControl \r\n            Grid.Row=\"0\" Grid.Column=\"0\"\r\n            Grid.RowSpan=\"2\" \r\n            x:Name=\"ImageViewer\"\r\n            VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n            VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Contacts/SecretContactView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Windows;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.Views.Media;\r\n\r\nnamespace TelegramClient.Views.Contacts\r\n{\r\n    public partial class SecretContactView\r\n    {\r\n        private IApplicationBar _prevAppBar;\r\n\r\n        public SecretContactViewModel ViewModel\r\n        {\r\n            get { return DataContext as SecretContactViewModel; }\r\n        }\r\n\r\n        public SecretContactView()\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                Caption.Background = ShellView.CaptionBrush;\r\n            }\r\n\r\n            OptimizeFullHD();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                TimerString.Text = timer.Elapsed.ToString();\r\n\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n#if WP8\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n            //if (!isFullHD) return;\r\n#endif\r\n            Items.HeaderTemplate = (DataTemplate)Application.Current.Resources[\"FullHDPivotHeaderTemplate\"];\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer)\r\n                && ViewModel.ImageViewer != null)\r\n            {\r\n                ViewModel.ImageViewer.PropertyChanged += OnImageViewerPropertyChanged;\r\n            }\r\n        }\r\n\r\n        private void OnImageViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer.IsOpen))\r\n            {\r\n                Items.IsHitTestVisible = !ViewModel.ImageViewer.IsOpen;\r\n            }\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            if (ViewModel.ImageViewer != null && ViewModel.ImageViewer.IsOpen)\r\n            {\r\n                ViewModel.ImageViewer.CloseViewer();\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        private void NavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            \r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Contacts/ShareContactView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Contacts.ShareContactView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    x:Name=\"Main\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    BackKeyPress=\"ShareContactView_OnBackKeyPress\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <phone:JumpListItemBackgroundConverter x:Key=\"BackgroundConverter\" Enabled=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <phone:JumpListItemForegroundConverter x:Key=\"ForegroundConverter\"/>\r\n\r\n            <DataTemplate x:Key=\"GroupHeaderTemplate\">\r\n                <Border Visibility=\"{Binding Key, Converter={StaticResource GroupVisibilityConverter}, ConverterParameter='@'}\"\r\n                    Margin=\"12,0,12,12\" Background=\"Transparent\">\r\n                    <Border Background=\"Transparent\" BorderBrush=\"{StaticResource TelegramBadgeAccentBrush}\" BorderThickness=\"0\" Width=\"72\" CornerRadius=\"36\"\r\n                        Height=\"72\" Margin=\"0,0,18,0\" HorizontalAlignment=\"Left\">\r\n                        <TextBlock Text=\"{Binding Key}\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" FontSize=\"48\" Padding=\"0\" \r\n                            FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\"/>\r\n                    </Border>\r\n                </Border>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneBackgroundBrush}\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform x:Name=\"Transform\" />\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel x:Name=\"Title\" Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.ShareContact, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid Grid.Row=\"1\" Margin=\"6,-6,0,0\">\r\n            <longListSelector:LongListSelector\r\n                toolkit:TiltEffect.SuppressTilt=\"True\"\r\n                Margin=\"0,0,0,0\" \r\n                x:Name=\"Items\"\r\n                ItemsSource=\"{Binding Contacts}\"\r\n                GroupHeaderTemplate=\"{StaticResource GroupHeaderTemplate}\"\r\n                Background=\"Transparent\">\r\n                <longListSelector:LongListSelector.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                    </ItemsPanelTemplate>\r\n                </longListSelector:LongListSelector.ItemsPanel>\r\n                <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                    <DataTemplate>\r\n                        <Grid DataContext=\"{Binding DataContext, ElementName=Main}\">\r\n                            <TextBlock Margin=\"6,0,0,14\" Text=\"{Binding Status}\" Visibility=\"{Binding Status, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListHeaderTemplate>\r\n                <longListSelector:LongListSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <ListBoxItem toolkit:TiltEffect.SuppressTilt=\"False\">\r\n                            <ContentControl \r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                Content=\"{Binding}\" \r\n                                ContentTemplate=\"{StaticResource UserItemTemplate}\"/>\r\n                        </ListBoxItem>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ItemTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <Border>\r\n                        </Border>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n                <longListSelector:LongListSelector.GroupItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <toolkit:WrapPanel Orientation=\"Horizontal\" Margin=\"0,32,0,0\"/>\r\n                    </ItemsPanelTemplate>\r\n                </longListSelector:LongListSelector.GroupItemsPanel>\r\n                <longListSelector:LongListSelector.GroupItemTemplate>\r\n                    <DataTemplate>\r\n                        <Border Background=\"{Binding Converter={StaticResource BackgroundConverter}}\" Width=\"99\" Height=\"99\" Margin=\"6\" >\r\n                            <Grid>\r\n                                <TextBlock Text=\"{Binding Key}\" \r\n                                    Visibility=\"{Binding Key, Converter={StaticResource GroupVisibilityConverter}, ConverterParameter='@'}\"\r\n                                    FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"48\" Padding=\"6\" Foreground=\"{Binding Converter={StaticResource ForegroundConverter}}\" VerticalAlignment=\"Bottom\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.GroupItemTemplate>\r\n            </longListSelector:LongListSelector>\r\n        </Grid>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n            <ContentControl x:Name=\"AppBarMenuItemsPlaceholder\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\">\r\n                <StackPanel x:Name=\"AppBarMenuItems\"/>\r\n            </ContentControl>\r\n        </Border>\r\n\r\n        <controls1:TelegramApplicationBar Grid.Row=\"2\"\r\n            x:Name=\"AppBarPanel\" \r\n            VerticalAlignment=\"Bottom\"\r\n            MorePanel=\"{Binding ElementName=MorePanel}\">\r\n            <controls1:TelegramApplicationBar.Buttons>\r\n                <controls1:TelegramAppBarButton\r\n                    x:Name=\"SearchButton\"\r\n                    Grid.Column=\"3\"\r\n                    Tap=\"SearchButton_OnTap\"\r\n                    ImageSource=\"/Images/W10M/ic_search_2x.png\"\r\n                    Text=\"{Binding Resources.Search, Source={StaticResource Strings}}\"/>\r\n            </controls1:TelegramApplicationBar.Buttons>\r\n        </controls1:TelegramApplicationBar>\r\n\r\n        <ContentControl x:Name=\"SearchPlaceholder\" d:IsHidden=\"True\" Grid.Row=\"0\" Grid.RowSpan=\"3\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"/>\r\n        <ContentControl x:Name=\"ContactDetailsContentControl\" d:IsHidden=\"True\" Grid.Row=\"0\" Grid.RowSpan=\"3\" Visibility=\"Collapsed\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"/>\r\n\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Contacts/ShareContactView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Media.Animation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Search;\r\nusing TelegramClient.Views.Search;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Contacts\r\n{\r\n    public partial class ShareContactView\r\n    {\r\n        public ShareContactViewModel ViewModel\r\n        {\r\n            get { return DataContext as ShareContactViewModel; }\r\n        }\r\n\r\n        public ShareContactView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            LayoutRoot.Opacity = 0.0;\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += OnLoadedOnce;\r\n            Loaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (ViewModel.IsOpen)\r\n                {\r\n                    BeginOpenStoryboard();\r\n                }\r\n                else\r\n                {\r\n                    BeginCloseStoryboard();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void BeginOpenStoryboard()\r\n        {\r\n            if (ViewModel.PhoneContact != null)\r\n            {\r\n                LayoutRoot.Opacity = 1.0;\r\n                LayoutRoot.Visibility = Visibility.Visible;\r\n                Caption.Visibility = Visibility.Collapsed;\r\n                Title.Visibility = Visibility.Collapsed;\r\n                ViewModel.ViewAction();\r\n                return;\r\n            }\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimaiton = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0.0, EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut } });\r\n            Storyboard.SetTarget(translateAnimaiton, Transform);\r\n            Storyboard.SetTargetProperty(translateAnimaiton, new PropertyPath(\"TranslateY\"));\r\n            storyboard.Children.Add(translateAnimaiton);\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                LayoutRoot.Opacity = 1.0;\r\n                LayoutRoot.Visibility = Visibility.Visible;\r\n                storyboard.Begin();\r\n            });\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                //Map.Visibility = System.Windows.Visibility.Visible;\r\n            };\r\n        }\r\n\r\n        private void BeginCloseStoryboard()\r\n        {\r\n            // OnUnloaded(null, null);\r\n\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, Transform);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"TranslateY\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                LayoutRoot.Visibility = Visibility.Collapsed;\r\n                //ViewModel.RestoreParentHitTest(true);\r\n            };\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void OnLoadedOnce(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= OnLoadedOnce;\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() => ViewModel.OpenEditor());\r\n        }\r\n\r\n        private void SearchButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var view = new SearchSharedContactsView();\r\n            var viewModel = IoC.Get<SearchSharedContactsViewModel>();\r\n            viewModel.Source = ViewModel.Source;\r\n            viewModel.AttachAction = user =>\r\n            {\r\n                ViewModel.UserAction(user);\r\n            };\r\n            view.DataContext = viewModel;\r\n\r\n            SearchPlaceholder.Content = view;\r\n        }\r\n\r\n        private ShareContactDetailsView _contactDetailsView;\r\n\r\n        public void OpenContactDetails(TLUserBase contact, ShareContactDetailsMode mode)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                MorePanel.Visibility = Visibility.Collapsed;\r\n                AppBarPanel.Visibility = Visibility.Collapsed;\r\n                SearchPlaceholder.Content = null;\r\n\r\n                if (_contactDetailsView == null)\r\n                {\r\n                    var contactDetailsViewModel = new ShareContactDetailsViewModel(contact)\r\n                    {\r\n                        Mode = mode,\r\n                        Callback = ViewModel.UserActionContinue\r\n                    };\r\n\r\n                    _contactDetailsView = new ShareContactDetailsView();\r\n                    _contactDetailsView.ClosePivotAction = visibility =>\r\n                    {\r\n                        Items.IsHitTestVisible = visibility == Visibility.Visible;\r\n                        AppBarPanel.Visibility = visibility;\r\n                    };\r\n                    ViewModelBinder.Bind(contactDetailsViewModel, _contactDetailsView, null);\r\n\r\n                    ContactDetailsContentControl.Visibility = Visibility.Visible;\r\n                    ContactDetailsContentControl.Content = _contactDetailsView;\r\n                }\r\n                else\r\n                {\r\n                    var contactDetailsViewModel = _contactDetailsView.DataContext as ShareContactDetailsViewModel;\r\n                    if (contactDetailsViewModel != null)\r\n                    {\r\n                        contactDetailsViewModel.SetContact(contact);\r\n                    }\r\n                    ContactDetailsContentControl.Visibility = Visibility.Visible;\r\n                    _contactDetailsView.BeginOpenStoryboard();\r\n                }\r\n            });\r\n        }\r\n\r\n        private void ShareContactView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            if (_contactDetailsView != null && ContactDetailsContentControl.Visibility == Visibility.Visible)\r\n            {\r\n                _contactDetailsView.BeginCloseStoryboard(() =>\r\n                {\r\n                    Main.Focus();\r\n                    ContactDetailsContentControl.Visibility = Visibility.Collapsed;\r\n                });\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Controls/ChatInviteControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.ChatInviteControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"Self\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <converters:ChatInviteSubtitleConverter x:Key=\"ChatInviteSubtitleConverter\"/>\r\n            <controls:ParticipantsCountToHorizontalAlignmentConverter x:Key=\"ParticipantsCountToHorizontalAlignmentConverter\"/>\r\n            <controls:ParticipantsCountToScrollBarVisibilityConverter x:Key=\"ParticipantsCountToScrollBarVisibilityConverter\"/>\r\n            \r\n            <Style x:Key=\"Scroll\" TargetType=\"ScrollViewer\">\r\n                <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n                <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"Padding\" Value=\"0\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"ScrollViewer\" >\r\n                            <Grid Margin=\"{TemplateBinding Padding}\" Background=\"{TemplateBinding Background}\">\r\n                                <!--<Grid.Triggers>\r\n                                    <EventTrigger RoutedEvent=\"Grid.Loaded\">\r\n                                        <BeginStoryboard>\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Duration=\"00:00:01.5\" From=\"1\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n                                                <DoubleAnimation Duration=\"00:00:01.5\" From=\"1\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalScrollBar\"/>\r\n                                            </Storyboard>\r\n                                        </BeginStoryboard>\r\n                                    </EventTrigger>\r\n                                </Grid.Triggers>-->\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                        <VisualStateGroup.Transitions>\r\n                                            <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                        </VisualStateGroup.Transitions>\r\n                                        <VisualState x:Name=\"Scrolling\">\r\n                                            <!--<Storyboard>\r\n                                                <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n                                                <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalScrollBar\"/>\r\n                                            </Storyboard>-->\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"NotScrolling\"/>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"VerticalCompression\">\r\n                                        <VisualState x:Name=\"NoVerticalCompression\"/>\r\n                                        <VisualState x:Name=\"CompressionTop\"/>\r\n                                        <VisualState x:Name=\"CompressionBottom\"/>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"HorizontalCompression\">\r\n                                        <VisualState x:Name=\"NoHorizontalCompression\"/>\r\n                                        <VisualState x:Name=\"CompressionLeft\"/>\r\n                                        <VisualState x:Name=\"CompressionRight\"/>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <ScrollContentPresenter x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\"/>\r\n                                <ScrollBar x:Name=\"VerticalScrollBar\" HorizontalAlignment=\"Right\" Height=\"Auto\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Vertical\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{TemplateBinding VerticalOffset}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" VerticalAlignment=\"Stretch\" Width=\"5\"/>\r\n                                <ScrollBar x:Name=\"HorizontalScrollBar\" HorizontalAlignment=\"Stretch\" Height=\"5\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Horizontal\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{TemplateBinding HorizontalOffset}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" VerticalAlignment=\"Bottom\" Width=\"Auto\"/>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Width=\"456\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition/>\r\n            <RowDefinition/>\r\n            <RowDefinition/>\r\n            <RowDefinition/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Grid Height=\"128\" Width=\"128\">\r\n            <Border Background=\"{Binding ChatInvite.Chat.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n            <TextBlock FontSize=\"56\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding ChatInvite.Chat, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n            <Image Source=\"{Binding ChatInvite.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n        </Grid>\r\n\r\n        <Grid Grid.Row=\"1\" HorizontalAlignment=\"Center\" Margin=\"0,12,0,6\" MaxWidth=\"400\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition/>\r\n                <RowDefinition/>\r\n            </Grid.RowDefinitions>\r\n            <TextBlock Grid.Row=\"0\" Text=\"{Binding ChatInvite.Title}\" FontSize=\"36.667\" MaxHeight=\"48.77\" Margin=\"12,-2,12,-1\" TextTrimming=\"WordEllipsis\" TextWrapping=\"NoWrap\" TextAlignment=\"Center\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n            <TextBlock Grid.Row=\"1\" Text=\"{Binding ChatInvite, Converter={StaticResource ChatInviteSubtitleConverter}}\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" TextAlignment=\"Center\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </Grid>\r\n        <ItemsControl Grid.Row=\"3\" Margin=\"-12,6,-12,-12\"\r\n                HorizontalAlignment=\"{Binding ChatInvite.Participants.Count, Converter={StaticResource ParticipantsCountToHorizontalAlignmentConverter}}\"\r\n                ItemsSource=\"{Binding ChatInvite.Participants}\">\r\n            <ItemsControl.Template>\r\n                <ControlTemplate TargetType=\"ItemsControl\">\r\n                    <ScrollViewer HorizontalScrollBarVisibility=\"{Binding DataContext.ChatInvite.Participants.Count, ElementName=Self, Converter={StaticResource ParticipantsCountToScrollBarVisibilityConverter}}\" VerticalScrollBarVisibility=\"Disabled\" Style=\"{StaticResource Scroll}\">\r\n                        <ItemsPresenter/>\r\n                    </ScrollViewer>\r\n                </ControlTemplate>\r\n            </ItemsControl.Template>\r\n            <ItemsControl.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel Orientation=\"Horizontal\" />\r\n                </ItemsPanelTemplate>\r\n            </ItemsControl.ItemsPanel>\r\n            <ItemsControl.ItemTemplate>\r\n                <DataTemplate>\r\n                    <controls:UserTileControl/>\r\n                </DataTemplate>\r\n            </ItemsControl.ItemTemplate>\r\n        </ItemsControl>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Controls/ChatInviteControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class ChatInviteControl\r\n    {\r\n        public ChatInviteControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n\r\n    public class ParticipantsCountToScrollBarVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is int))\r\n            {\r\n                return ScrollBarVisibility.Auto;\r\n            }\r\n\r\n            var count = (int)value;\r\n            if (count <= 4)\r\n            {\r\n                return ScrollBarVisibility.Disabled;\r\n            }\r\n\r\n            return ScrollBarVisibility.Auto;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class ParticipantsCountToHorizontalAlignmentConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (!(value is int))\r\n            {\r\n                return HorizontalAlignment.Stretch;\r\n            }\r\n\r\n            var count = (int) value;\r\n            if (count <= 4)\r\n            {\r\n                return HorizontalAlignment.Center;\r\n            }\r\n\r\n            return HorizontalAlignment.Stretch;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/ConversationTileControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.ConversationTileControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"Root\">\r\n        <Grid x:Name=\"TileGrid\" Grid.Column=\"1\" Grid.Row=\"0\">\r\n            <Ellipse x:Name=\"Ellipse\" Height=\"62\" Width=\"62\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n            <TextBlock x:Name=\"Label\" FontSize=\"27\" FontFamily=\"Segoe WP Bold\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\"/>\r\n            <Image x:Name=\"Image\" Visibility=\"Collapsed\" Height=\"62\" Width=\"62\">\r\n                <Image.Clip>\r\n                    <EllipseGeometry x:Name=\"ImageClipGeometry\" Center=\"31,31\" RadiusX=\"31\" RadiusY=\"31\"/>\r\n                </Image.Clip>\r\n            </Image>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/ConversationTileControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Shapes;\r\nusing System.Windows.Threading;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Extensions;\r\n\r\nnamespace TelegramClient.Views\r\n{\r\n    public partial class ConversationTileControl\r\n    {\r\n        public static readonly DependencyProperty SuppressFavedProperty = DependencyProperty.Register(\r\n            \"SuppressFaved\", typeof(bool), typeof(ConversationTileControl), new PropertyMetadata(default(bool)));\r\n\r\n        public bool SuppressFaved\r\n        {\r\n            get { return (bool) GetValue(SuppressFavedProperty); }\r\n            set { SetValue(SuppressFavedProperty, value); }\r\n        }\r\n\r\n        ~ConversationTileControl()\r\n        {\r\n\r\n        }\r\n\r\n        public static readonly DependencyProperty ObjectProperty = DependencyProperty.Register(\r\n            \"Object\", typeof(TLObject), typeof(ConversationTileControl), new PropertyMetadata(default(TLObject), OnObjectChanged));\r\n\r\n        private static void OnObjectChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var conversationTileControl = d as ConversationTileControl;\r\n            if (conversationTileControl != null)\r\n            {\r\n                var user = e.NewValue as TLUser;\r\n                var channels = e.NewValue as TLVector<TLChatBase>;\r\n                if (channels != null)\r\n                {\r\n                    conversationTileControl.GoToFeedTemplate(channels);\r\n                }\r\n                else if (user != null && user.IsSelf && !conversationTileControl.SuppressFaved)\r\n                {\r\n                    conversationTileControl.GoToFavedTemplate();\r\n                }\r\n                else\r\n                {\r\n                    conversationTileControl.GoToNormalTemplate();\r\n                }\r\n            }\r\n        }\r\n\r\n        private Grid _feedGrid;\r\n\r\n        private DispatcherTimer _timer;\r\n\r\n        private void GoToFeedTemplate(IList<TLChatBase> channels)\r\n        {\r\n            if (_timer == null)\r\n            {\r\n                _timer = new DispatcherTimer();\r\n                _timer.Interval = TimeSpan.FromSeconds(5.0);\r\n                _timer.Tick += (sender, args) =>\r\n                {\r\n                    GoToFeedTemplate(Object as IList<TLChatBase>);\r\n                };\r\n                _timer.Start();\r\n            }\r\n\r\n            //if (_feedGrid == null)\r\n            {\r\n                var previousGrid = _feedGrid;\r\n\r\n                _feedGrid = new Grid { Width = Size > 0.0 ? Size : 62.0, Height = Size > 0.0 ? Size : 62.0 };\r\n\r\n                var random = new Random();\r\n                var randomChannels = channels.OrderBy(x => random.Next()).Take(4).ToList();\r\n                var textConverter = (IValueConverter) Application.Current.Resources[\"PlaceholderDefaultTextConverter\"];\r\n                var fillConverter = (IValueConverter) Application.Current.Resources[\"PlaceholderBackgroundConverter\"];\r\n                var photoConverter = (IValueConverter) Application.Current.Resources[\"DefaultPhotoConverter\"];\r\n\r\n\r\n                if (randomChannels.Count > 0)\r\n                {\r\n                    var channel = randomChannels[0];\r\n\r\n                    var tile = new ConversationTileControl\r\n                    {\r\n                        Margin = new Thickness(2.0),\r\n                        Size = 68.0,\r\n                        Fill = (Brush)fillConverter.Convert(channel.Index, null, null, null),\r\n                        Text = (string)textConverter.Convert(channel, null, null, null),\r\n                        RenderTransform = new CompositeTransform { TranslateX = 0.0, TranslateY = 0.0, ScaleY = 0.5, ScaleX = 0.5 }\r\n                    };\r\n\r\n                    var binding = new Binding(\"Photo\")\r\n                    {\r\n                        Converter = photoConverter,\r\n                        Source = channel\r\n                    };\r\n                    tile.SetBinding(SourceProperty, binding);\r\n\r\n                    _feedGrid.Children.Add(tile);\r\n                }\r\n\r\n                if (randomChannels.Count > 1)\r\n                {\r\n                    var channel = randomChannels[1];\r\n\r\n                    var tile = new ConversationTileControl\r\n                    {\r\n                        Margin = new Thickness(2.0),\r\n                        Size = 68.0,\r\n                        Fill = (Brush)fillConverter.Convert(channel.Index, null, null, null),\r\n                        Text = (string)textConverter.Convert(channel, null, null, null),\r\n                        RenderTransform = new CompositeTransform { TranslateX = 36.0, TranslateY = 0.0, ScaleY = 0.5, ScaleX = 0.5 }\r\n                    };\r\n\r\n                    var binding = new Binding(\"Photo\")\r\n                    {\r\n                        Converter = photoConverter,\r\n                        Source = channel\r\n                    };\r\n                    tile.SetBinding(SourceProperty, binding);\r\n\r\n                    _feedGrid.Children.Add(tile);\r\n                }\r\n\r\n                if (randomChannels.Count > 2)\r\n                {\r\n                    var channel = randomChannels[2];\r\n\r\n                    var tile = new ConversationTileControl\r\n                    {\r\n                        Margin = new Thickness(2.0),\r\n                        Size = 68.0,\r\n                        Fill = (Brush)fillConverter.Convert(channel.Index, null, null, null),\r\n                        Text = (string)textConverter.Convert(channel, null, null, null),\r\n                        RenderTransform = new CompositeTransform { TranslateX = 0.0, TranslateY = 36.0, ScaleY = 0.5, ScaleX = 0.5 }\r\n                    };\r\n\r\n                    var binding = new Binding(\"Photo\")\r\n                    {\r\n                        Converter = photoConverter,\r\n                        Source = channel\r\n                    };\r\n                    tile.SetBinding(SourceProperty, binding);\r\n\r\n                    _feedGrid.Children.Add(tile);\r\n                }\r\n\r\n                if (randomChannels.Count > 3)\r\n                {\r\n                    var channel = randomChannels[3];\r\n\r\n                    var tile = new ConversationTileControl\r\n                    {\r\n                        Margin = new Thickness(2.0),\r\n                        Size = 68.0,\r\n                        Fill = (Brush)fillConverter.Convert(channel.Index, null, null, null),\r\n                        Text = (string)textConverter.Convert(channel, null, null, null),\r\n                        RenderTransform = new CompositeTransform { TranslateX = 36.0, TranslateY = 36.0, ScaleY = 0.5, ScaleX = 0.5 }\r\n                    };\r\n\r\n                    var binding = new Binding(\"Photo\")\r\n                    {\r\n                        Converter = photoConverter,\r\n                        Source = channel\r\n                    };\r\n                    tile.SetBinding(SourceProperty, binding);\r\n\r\n                    _feedGrid.Children.Add(tile);\r\n                }\r\n\r\n                var storyboard = new Storyboard();\r\n                var opacityInAnimation = new DoubleAnimation{ From = 0.0, To = 1.0, Duration = TimeSpan.FromSeconds(0.5) };\r\n                Storyboard.SetTargetProperty(opacityInAnimation, new PropertyPath(\"Opacity\"));\r\n                Storyboard.SetTarget(opacityInAnimation, _feedGrid);\r\n                storyboard.Children.Add(opacityInAnimation);\r\n                storyboard.Begin();\r\n                storyboard.Completed += (sender, args) =>\r\n                {\r\n                    if (previousGrid != null) Root.Children.Remove(previousGrid);\r\n                };\r\n\r\n                Root.Children.Add(_feedGrid);\r\n            }\r\n\r\n            Root.Children.Remove(TileGrid);\r\n            if (_feedGrid != null) _feedGrid.Children.Remove(TileGrid);\r\n            //_feedGrid.Children.Add(TileGrid);\r\n\r\n            //TileGrid\r\n            TileGrid.RenderTransform = new CompositeTransform { TranslateX = 2, TranslateY = 2, ScaleY = 0.472, ScaleX = 0.472 };\r\n            TileGrid.Visibility = Visibility.Visible;\r\n            _feedGrid.Visibility = Visibility.Visible;\r\n            if (_favedGrid != null) _favedGrid.Visibility = Visibility.Collapsed;\r\n            \r\n        }\r\n\r\n        private Grid _favedGrid;\r\n\r\n        private void GoToFavedTemplate()\r\n        {\r\n            if (_favedGrid == null)\r\n            {\r\n                _favedGrid = new Grid { Width = Size > 0.0 ? Size : 62.0, Height = Size > 0.0 ? Size : 62.0 };\r\n                var ellipse = new Ellipse\r\n                {\r\n                    VerticalAlignment = VerticalAlignment.Stretch,\r\n                    HorizontalAlignment = HorizontalAlignment.Stretch,\r\n                    Fill = (Brush)Application.Current.Resources[\"TelegramBadgeAccentBrush\"]\r\n                };\r\n                var icon = new Image\r\n                {\r\n                    Source = new BitmapImage(new Uri(\"/Images/Placeholder/ic_bookmark.png\", UriKind.Relative)),\r\n                    Margin = new Thickness(12.0)\r\n                };\r\n\r\n                _favedGrid.Children.Add(ellipse);\r\n                _favedGrid.Children.Add(icon);\r\n\r\n                Root.Children.Add(_favedGrid);\r\n            }\r\n\r\n            Root.Children.Remove(TileGrid);\r\n            if (_feedGrid != null) _feedGrid.Children.Remove(TileGrid);\r\n            Root.Children.Add(TileGrid);\r\n\r\n            TileGrid.RenderTransform = null;\r\n            TileGrid.Visibility = Visibility.Collapsed;\r\n            _favedGrid.Visibility = Visibility.Visible;\r\n            if (_feedGrid != null) _feedGrid.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private void GoToNormalTemplate()\r\n        {\r\n            Root.Children.Remove(TileGrid);\r\n            if (_feedGrid != null) _feedGrid.Children.Remove(TileGrid);\r\n            Root.Children.Add(TileGrid);\r\n\r\n            TileGrid.RenderTransform = null;\r\n            TileGrid.Visibility = Visibility;\r\n            if (_favedGrid != null) _favedGrid.Visibility = Visibility.Collapsed;\r\n            if (_feedGrid != null) _feedGrid.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        public TLObject Object\r\n        {\r\n            get { return (TLObject) GetValue(ObjectProperty); }\r\n            set { SetValue(ObjectProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty SizeProperty = DependencyProperty.Register(\r\n            \"Size\", typeof (double), typeof (ConversationTileControl), new PropertyMetadata(default(double), OnSizeChanged));\r\n\r\n        private static void OnSizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var conversationTileControl = d as ConversationTileControl;\r\n            if (conversationTileControl != null)\r\n            {\r\n                var size = (double) e.NewValue;\r\n\r\n                conversationTileControl.Ellipse.Width = size;\r\n                conversationTileControl.Ellipse.Height = size;\r\n                conversationTileControl.Image.Width = size;\r\n                conversationTileControl.Image.Height = size;\r\n                if (conversationTileControl._favedGrid != null)\r\n                {\r\n                    conversationTileControl._favedGrid.Width = size;\r\n                    conversationTileControl._favedGrid.Height = size;\r\n                }\r\n\r\n                conversationTileControl.ImageClipGeometry.Center = new Point(size / 2.0, size / 2.0);\r\n                conversationTileControl.ImageClipGeometry.RadiusX = size / 2.0;\r\n                conversationTileControl.ImageClipGeometry.RadiusY = size / 2.0;\r\n            }\r\n        }\r\n\r\n        public double Size\r\n        {\r\n            get { return (double) GetValue(SizeProperty); }\r\n            set { SetValue(SizeProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty FillProperty = DependencyProperty.Register(\r\n            \"Fill\", typeof (Brush), typeof (ConversationTileControl), new PropertyMetadata(default(Brush), OnFillChanged));\r\n\r\n        private static void OnFillChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var conversationTileControl = d as ConversationTileControl;\r\n            if (conversationTileControl != null)\r\n            {\r\n                var brush = (Brush) e.NewValue;\r\n\r\n                conversationTileControl.Ellipse.Fill = brush;\r\n            }\r\n        }\r\n\r\n        public Brush Fill\r\n        {\r\n            get { return (Brush) GetValue(FillProperty); }\r\n            set { SetValue(FillProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(\r\n            \"Text\", typeof (string), typeof (ConversationTileControl), new PropertyMetadata(default(string), OnTextChanged));\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var conversationTileControl = d as ConversationTileControl;\r\n            if (conversationTileControl != null)\r\n            {\r\n                var text = (string) e.NewValue;\r\n\r\n                conversationTileControl.Label.Text = text;\r\n            }\r\n        }\r\n\r\n        public string Text\r\n        {\r\n            get { return (string) GetValue(TextProperty); }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty LabelFontSizeProperty = DependencyProperty.Register(\r\n            \"LabelFontSize\", typeof (int), typeof (ConversationTileControl), new PropertyMetadata(default(int), OnLabelFontSizeChanged));\r\n\r\n        private static void OnLabelFontSizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var conversationTileControl = d as ConversationTileControl;\r\n            if (conversationTileControl != null)\r\n            {\r\n                conversationTileControl.Label.FontSize = (int) e.NewValue;\r\n            }\r\n        }\r\n\r\n        public int LabelFontSize\r\n        {\r\n            get { return (int) GetValue(LabelFontSizeProperty); }\r\n            set { SetValue(LabelFontSizeProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(\r\n            \"Source\", typeof (ImageSource), typeof (ConversationTileControl), new PropertyMetadata(default(ImageSource), OnSourceChanged));\r\n\r\n        private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var conversationTileControl = d as ConversationTileControl;\r\n            if (conversationTileControl != null)\r\n            {\r\n                var imageSource = e.NewValue as ImageSource;\r\n\r\n                conversationTileControl.Image.Source = imageSource;\r\n                conversationTileControl.Image.Visibility = imageSource == null\r\n                    ? Visibility.Collapsed\r\n                    : Visibility.Visible;\r\n\r\n                conversationTileControl.Ellipse.Visibility = imageSource != null\r\n                    ? Visibility.Collapsed\r\n                    : Visibility.Visible;\r\n\r\n                conversationTileControl.Label.Visibility = imageSource != null\r\n                    ? Visibility.Collapsed\r\n                    : Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        public ImageSource Source\r\n        {\r\n            get { return (ImageSource) GetValue(SourceProperty); }\r\n            set { SetValue(SourceProperty, value); }\r\n        }\r\n\r\n        public ConversationTileControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/FeaturedStickerSetControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.FeaturedStickerSetControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid x:Name=\"MainItemGrid\" Margin=\"0,6,12,0\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <ListBoxItem Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"14,-2,0,0\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"OpenStickerSet_OnTap\">\r\n                <Grid Background=\"Transparent\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"0,-6,2,0\" VerticalAlignment=\"Center\" Text=\"•\" Visibility=\"{Binding Unread, Converter={StaticResource BooleanToVisibilityConverter}}\" Foreground=\"{StaticResource PhoneAccentBrush}\" Style=\"{StaticResource PhoneTextLargeStyle}\">\r\n                        <TextBlock.RenderTransform>\r\n                            <TranslateTransform Y=\"2\"/>\r\n                        </TextBlock.RenderTransform>\r\n                    </TextBlock>\r\n                    <TextBlock Grid.Row=\"0\" Grid.Column=\"0\" Margin=\"0,-6,0,0\" Text=\"{Binding Title}\" MaxHeight=\"42.56\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"1,-4,0,0\" Text=\"{Binding Converter={StaticResource StickerSetToCountStringConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n            </ListBoxItem>\r\n            <Button Grid.Column=\"2\" Click=\"AddStickerSet_OnClick\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Visibility=\"{Binding Installed, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" Content=\"{Binding Resources.Add, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" VerticalAlignment=\"Center\" Margin=\"0,0,-12,0\" Padding=\"18,5,18,7\" FontSize=\"17.667\" BorderThickness=\"2\"/>\r\n            <Button Grid.Column=\"2\" IsEnabled=\"False\" MinWidth=\"95\" Visibility=\"{Binding Installed, Converter={StaticResource BooleanToVisibilityConverter}}\" Content=\"\" VerticalAlignment=\"Center\" Margin=\"0,0,-12,0\" Padding=\"18,5,18,7\" FontSize=\"17.667\" Opacity=\"0\" BorderThickness=\"2\" FontFamily=\"Segoe UI Symbol\"/>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Controls/FeaturedStickerSetControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class FeaturedStickerSetControl\r\n    {\r\n        public FeaturedStickerSetControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        public event EventHandler Added;\r\n\r\n        protected virtual void RaiseAdded()\r\n        {\r\n            var handler = Added;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void AddStickerSet_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            RaiseAdded();\r\n        }\r\n\r\n        public event EventHandler Opened;\r\n\r\n        protected virtual void RaiseOpened()\r\n        {\r\n            var handler = Opened;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void OpenStickerSet_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            RaiseOpened();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/MainTitleControl.xaml",
    "content": "﻿<UserControl \r\n    x:Class=\"Vk.Messenger.Views.Controls.MainTitleControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n\txmlns:cal=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:Controls=\"clr-namespace:Vk.Messenger.Views.Controls\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"90\" d:DesignWidth=\"480\">\r\n\r\n    <!--<i:Interaction.Behaviors>\r\n        <behaviors:ThemeToStateBehavior LightState=\"Light\" DarkState=\"Dark\"/>\r\n    </i:Interaction.Behaviors>-->\r\n    <Grid x:Name=\"LayoutRoot\">\r\n        <!--<i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding StateService.NewMessagesCount, Converter={StaticResource CountToVisibilityConverter}}\" Value=\"Visible\" TrueState=\"Visible\" FalseState=\"Collapsed\"/>\r\n        </i:Interaction.Behaviors>-->\r\n    \t<!--<VisualStateManager.VisualStateGroups>\r\n    \t\t<VisualStateGroup x:Name=\"ThemeStateGroup\">\r\n    \t\t\t<VisualState x:Name=\"Light\">\r\n    \t\t\t\t<Storyboard>\r\n    \t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"LightPanel\">\r\n    \t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n    \t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n    \t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"image1\">\r\n    \t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n    \t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n    \t\t\t\t</Storyboard>\r\n    \t\t\t</VisualState>\r\n    \t\t\t<VisualState x:Name=\"Dark\">\r\n    \t\t\t\t<Storyboard>\r\n    \t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DarkPanel\">\r\n    \t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n    \t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n    \t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"image\">\r\n    \t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n    \t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n    \t\t\t\t</Storyboard>\r\n    \t\t\t</VisualState>\r\n    \t\t</VisualStateGroup>\r\n    \t\t<VisualStateGroup x:Name=\"MessagesVisibilityStateGroup\">\r\n    \t\t\t<VisualStateGroup.Transitions>\r\n    \t\t\t\t<VisualTransition From=\"Collapsed\" GeneratedDuration=\"0\" To=\"Visible\">\r\n    \t\t\t\t\t<Storyboard>\r\n    \t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"LightMessagesCount\">\r\n    \t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n    \t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0:0:0.3\" Value=\"Visible\"/>\r\n    \t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DarkMessagesCount\">\r\n    \t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                                <DiscreteObjectKeyFrame KeyTime=\"0:0:0.3\" Value=\"Visible\"/>\r\n    \t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\" Storyboard.TargetName=\"DarkMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"35\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"0\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\" Storyboard.TargetName=\"LightMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"35\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"0\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"LightMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"1\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"DarkMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"1\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t</Storyboard>\r\n    \t\t\t\t</VisualTransition>\r\n    \t\t\t\t<VisualTransition GeneratedDuration=\"0\" To=\"Visible\">\r\n    \t\t\t\t\t<Storyboard>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"LightMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"1\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\" Storyboard.TargetName=\"LightMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"35\"/>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"0\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"DarkMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"1\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuarticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\" Storyboard.TargetName=\"DarkMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"35\"/>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"0\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuarticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t</Storyboard>\r\n    \t\t\t\t</VisualTransition>\r\n    \t\t\t\t<VisualTransition From=\"Visible\" GeneratedDuration=\"0\" To=\"Collapsed\">\r\n    \t\t\t\t\t<Storyboard>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\" Storyboard.TargetName=\"LightMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"-35\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\" Storyboard.TargetName=\"DarkMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"-35\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"DarkMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"0\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"LightMessagesCount\">\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n    \t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"0\">\r\n    \t\t\t\t\t\t\t\t<EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t\t\t<QuinticEase EasingMode=\"EaseOut\"/>\r\n    \t\t\t\t\t\t\t\t</EasingDoubleKeyFrame.EasingFunction>\r\n    \t\t\t\t\t\t\t</EasingDoubleKeyFrame>\r\n    \t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n    \t\t\t\t\t</Storyboard>\r\n    \t\t\t\t</VisualTransition>\r\n    \t\t\t</VisualStateGroup.Transitions>\r\n    \t\t\t<VisualState x:Name=\"Visible\"/>\r\n    \t\t\t<VisualState x:Name=\"Collapsed\">\r\n    \t\t\t\t<Storyboard>\r\n    \t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"LightMessagesCount\">\r\n    \t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n    \t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n    \t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DarkMessagesCount\">\r\n    \t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n    \t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n    \t\t\t\t</Storyboard>\r\n    \t\t\t</VisualState>\r\n    \t\t</VisualStateGroup>\r\n    \t</VisualStateManager.VisualStateGroups>-->\r\n        <!--<Image x:Name=\"image1\" Stretch=\"None\" Source=\"/Vk.Messenger;component/Images/Light/VK.png\" HorizontalAlignment=\"Left\"/>\r\n        <Image x:Name=\"image\" Stretch=\"None\" Source=\"/Vk.Messenger;component/Images/Dark/VK.png\" HorizontalAlignment=\"Left\"/>-->\r\n        <!--<Grid Visibility=\"{Binding OnlyLogo, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\" >\r\n            <StackPanel x:Name=\"LightPanel\" Orientation=\"Horizontal\" HorizontalAlignment=\"Right\">\r\n                <StackPanel x:Name=\"LightMessagesCount\" \r\n                    Orientation=\"Horizontal\" \r\n                    Background=\"Transparent\"\r\n                    cal:Message.Attach=\"[Event Tap] = [Action OpenConversations]\" RenderTransformOrigin=\"0.5,0.5\">\r\n                \t<StackPanel.RenderTransform>\r\n                \t\t<CompositeTransform/>\r\n                \t</StackPanel.RenderTransform>\r\n                    <Image Stretch=\"None\" Source=\"/Vk.Messenger;component/Images/Light/UnreadMessages.png\" />\r\n                    \r\n                    <Grid Margin=\"-9,0,7,0\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Controls:FlipCounter \r\n                            VerticalAlignment=\"Bottom\"\r\n                            Counter=\"{Binding StateService.NewMessagesCount, FallbackValue=0}\"/>\r\n                    </Grid>\r\n                </StackPanel>\r\n                <StackPanel \r\n                    Orientation=\"Horizontal\" \r\n                    Background=\"Transparent\"\r\n                    cal:Message.Attach=\"[Event Tap] = [Action OpenFriendsRequests]\">\r\n                    <Image Stretch=\"None\" Source=\"/Vk.Messenger;component/Images/Light/Requests.png\" />\r\n                    <Grid Margin=\"-10,0,24,0\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Controls:FlipCounter \r\n                            VerticalAlignment=\"Bottom\"\r\n                            Visibility=\"{Binding StateService.FriendRequestsCount, Converter={StaticResource CountToVisibilityConverter}}\"\r\n                            Counter=\"{Binding StateService.FriendRequestsCount, FallbackValue=0}\"/>\r\n                    </Grid>\r\n                </StackPanel>\r\n            </StackPanel>\r\n            <StackPanel x:Name=\"DarkPanel\" Orientation=\"Horizontal\" HorizontalAlignment=\"Right\">\r\n                <StackPanel x:Name=\"DarkMessagesCount\" \r\n                    Orientation=\"Horizontal\"\r\n                    Background=\"Transparent\"\r\n                    cal:Message.Attach=\"[Event Tap] = [Action OpenConversations]\" RenderTransformOrigin=\"0.5,0.5\">\r\n                \t<StackPanel.RenderTransform>\r\n                \t\t<CompositeTransform/>\r\n                \t</StackPanel.RenderTransform>\r\n                    <Image Stretch=\"None\" Source=\"/Vk.Messenger;component/Images/Dark/UnreadMessages.png\" />\r\n                    <Grid Margin=\"-9,0,7,0\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Controls:FlipCounter \r\n                            VerticalAlignment=\"Bottom\"\r\n                            Counter=\"{Binding StateService.NewMessagesCount, FallbackValue=0}\"/>\r\n                    </Grid>\r\n                </StackPanel>\r\n                <StackPanel \r\n                    Orientation=\"Horizontal\" \r\n                    Background=\"Transparent\"\r\n                    cal:Message.Attach=\"[Event Tap] = [Action OpenFriendsRequests]\">\r\n                    <Image Stretch=\"None\" Source=\"/Vk.Messenger;component/Images/Dark/Requests.png\" />\r\n                    <Grid Margin=\"-10,0,24,0\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Controls:FlipCounter \r\n                            VerticalAlignment=\"Bottom\"\r\n                            Visibility=\"{Binding StateService.FriendRequestsCount, Converter={StaticResource CountToVisibilityConverter}}\"\r\n                            Counter=\"{Binding StateService.FriendRequestsCount, FallbackValue=0}\"/>\r\n                    </Grid>\r\n                </StackPanel>\r\n            </StackPanel>\r\n        </Grid>-->\r\n    </Grid>\r\n</UserControl>\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/MainTitleControl.xaml.cs",
    "content": "﻿using System.Windows;\r\n\r\nnamespace Vk.Messenger.Views.Controls\r\n{\r\n    public partial class MainTitleControl\r\n    {\r\n        public static readonly DependencyProperty OnlyLogoProperty =\r\n            DependencyProperty.Register(\"OnlyLogo\", typeof (bool), typeof (MainTitleControl), new PropertyMetadata(default(bool)));\r\n\r\n        public bool OnlyLogo\r\n        {\r\n            get { return (bool) GetValue(OnlyLogoProperty); }\r\n            set { SetValue(OnlyLogoProperty, value); }\r\n        }\r\n\r\n        public MainTitleControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/MessagePlayerControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.MessagePlayerControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    x:Name=\"self\"\r\n    d:DesignHeight=\"180\" d:DesignWidth=\"480\">\r\n\t<UserControl.Resources>\r\n        <Style x:Key=\"PlayerProgressStyle\" TargetType=\"Slider\">\r\n            <Setter Property=\"Foreground\" Value=\"#66000000\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        \t<Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        \t<Setter Property=\"Maximum\" Value=\"10\"/>\r\n        \t<Setter Property=\"Minimum\" Value=\"0\"/>\r\n        \t<Setter Property=\"Value\" Value=\"0\"/>\r\n            <Setter Property=\"Background\" Value=\"White\"/>\r\n        \t<Setter Property=\"Template\">\r\n        \t\t<Setter.Value>\r\n        \t\t\t<ControlTemplate TargetType=\"Slider\">\r\n        \t\t\t\t<Grid Background=\"Transparent\">\r\n        \t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n        \t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n        \t\t\t\t\t\t\t<VisualState x:Name=\"Normal\"/>\r\n        \t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\"/>\r\n        \t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n        \t\t\t\t\t\t\t\t<Storyboard>\r\n        \t\t\t\t\t\t\t\t\t<!--<DoubleAnimation Duration=\"0\" To=\"0.1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalTrack\"/>\r\n        \t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"0.1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalTrack\"/>\r\n        \t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"HorizontalFill\">\r\n        \t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n        \t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n        \t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"VerticalFill\">\r\n        \t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n        \t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>-->\r\n        \t\t\t\t\t\t\t\t</Storyboard>\r\n        \t\t\t\t\t\t\t</VisualState>\r\n        \t\t\t\t\t\t</VisualStateGroup>\r\n        \t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n        \t\t\t\t\t<Grid x:Name=\"HorizontalTemplate\" Margin=\"{StaticResource PhoneHorizontalMargin}\">\r\n                                <Path x:Name=\"HorizontalTrack\" Fill=\"{TemplateBinding Foreground}\" Opacity=\"0.85\" Height=\"22\" IsHitTestVisible=\"False\" Margin=\"0,9,0,33\">\r\n                                    <Path.Data>\r\n                                        <RectangleGeometry Rect=\"0,18,204,4\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    </Path.Data>\r\n                                </Path>\r\n                                <Path x:Name=\"HorizontalFill\" Fill=\"{StaticResource TelegramBadgeAccentBrush}\" Height=\"22\" IsHitTestVisible=\"False\" Margin=\"0,9,0,33\">\r\n                                    <Path.Data>\r\n                                        <RectangleGeometry Rect=\"0,18,204,4\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    </Path.Data>\r\n                                    <Path.Clip>\r\n                                        <RectangleGeometry Rect=\"0, 0, 6, 22\"/>\r\n                                    </Path.Clip>\r\n                                </Path>\r\n                                \r\n                                <Grid x:Name=\"HorizontalCenterElement\" Background=\"Transparent\" HorizontalAlignment=\"Left\" Height=\"25\" Margin=\"0,16,0,23\" Width=\"14\">\r\n                                    <Grid.RenderTransform>\r\n                                        <TranslateTransform/>\r\n                                    </Grid.RenderTransform>\r\n                                    <Border CornerRadius=\"7\" Width=\"14\" Height=\"14\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n        \t\t\t\t\t<Grid x:Name=\"VerticalTemplate\" Margin=\"{StaticResource PhoneVerticalMargin}\">\r\n        \t\t\t\t\t\t<Rectangle x:Name=\"VerticalTrack\" Fill=\"{TemplateBinding Background}\" IsHitTestVisible=\"False\" Margin=\"18,0,18,0\" Width=\"12\"/>\r\n        \t\t\t\t\t\t<Rectangle x:Name=\"VerticalFill\" Fill=\"{TemplateBinding Foreground}\" IsHitTestVisible=\"False\" Margin=\"18,0,18,0\" Width=\"12\">\r\n        \t\t\t\t\t\t\t<Rectangle.Clip>\r\n        \t\t\t\t\t\t\t\t<RectangleGeometry Rect=\"0, 0, 12, 6\"/>\r\n        \t\t\t\t\t\t\t</Rectangle.Clip>\r\n        \t\t\t\t\t\t</Rectangle>\r\n        \t\t\t\t\t\t<Rectangle x:Name=\"VerticalCenterElement\" Fill=\"{StaticResource PhoneForegroundBrush}\" Height=\"12\" Margin=\"12,0,12,0\" VerticalAlignment=\"Top\" Width=\"24\">\r\n        \t\t\t\t\t\t\t<Rectangle.RenderTransform>\r\n        \t\t\t\t\t\t\t\t<TranslateTransform/>\r\n        \t\t\t\t\t\t\t</Rectangle.RenderTransform>\r\n        \t\t\t\t\t\t</Rectangle>\r\n        \t\t\t\t\t</Grid>\r\n        \t\t\t\t</Grid>\r\n        \t\t\t</ControlTemplate>\r\n        \t\t</Setter.Value>\r\n        \t</Setter>\r\n        </Style>\r\n\r\n    </UserControl.Resources>\r\n\r\n    <Grid>\r\n        <Grid.ColumnDefinitions>\r\n            <ColumnDefinition Width=\"Auto\"/>\r\n            <ColumnDefinition Width=\"*\"/>\r\n        </Grid.ColumnDefinitions>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n            \r\n        <Ellipse Width=\"64\" Height=\"64\" Grid.RowSpan=\"2\" Fill=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n        \r\n        <ToggleButton CacheMode=\"BitmapCache\"\r\n            Visibility=\"Visible\"\r\n            toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n            x:Name=\"PlayerToggleButton\" VerticalAlignment=\"Top\" Grid.RowSpan=\"2\" \r\n            Click=\"PlayerToggleButton_Click\" \r\n            Style=\"{StaticResource DialogPlayerToggleButtonStyle}\"/>\r\n        <Grid CacheMode=\"BitmapCache\" Grid.Column=\"0\" Grid.RowSpan=\"2\" \r\n              VerticalAlignment=\"Top\" \r\n              Visibility=\"Collapsed\"\r\n              Width=\"64\" Height=\"64\"\r\n              x:Name=\"PlayerDownloadButton\">\r\n            <Grid x:Name=\"CancelDownloadButton\"\r\n                  Visibility=\"Collapsed\" \r\n                  Background=\"Transparent\" \r\n                  Tap=\"CancelDownloadButton_OnTap\">\r\n                <Path RenderTransformOrigin=\"0.5,0.5\"  Fill=\"White\" Visibility=\"Visible\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                    <Path.RenderTransform>\r\n                        <RotateTransform Angle=\"45\"/>\r\n                    </Path.RenderTransform>\r\n                    <Path.Data>\r\n                        <GeometryGroup FillRule=\"Nonzero\">\r\n                            <RectangleGeometry Rect=\"15,0,6,36\"/>\r\n                            <RectangleGeometry Rect=\"0,15,36,6\"/>\r\n                        </GeometryGroup>\r\n                    </Path.Data>\r\n                </Path>\r\n            </Grid>\r\n            <Grid x:Name=\"DownloadButton\" Visibility=\"Visible\">\r\n                <Rectangle Width=\"4\" Height=\"24\" Fill=\"White\"/>\r\n                <Polyline StrokeThickness=\"3.5\" Stroke=\"White\" Margin=\"1,0,0,0\" Points=\"0 15 10 25 20 15\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n            </Grid>\r\n        </Grid>\r\n\r\n        <Grid CacheMode=\"BitmapCache\" Grid.Column=\"0\" Grid.RowSpan=\"2\" \r\n              VerticalAlignment=\"Top\"\r\n              Width=\"64\" Height=\"64\"\r\n              Visibility=\"Collapsed\"\r\n              x:Name=\"PlayerCancelDownloadButton\">\r\n            <Path RenderTransformOrigin=\"0.5,0.5\"  Fill=\"White\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                <Path.RenderTransform>\r\n                    <RotateTransform Angle=\"45\"/>\r\n                </Path.RenderTransform>\r\n                <Path.Data>\r\n                    <GeometryGroup FillRule=\"Nonzero\">\r\n                        <RectangleGeometry Rect=\"15,0,6,36\"/>\r\n                        <RectangleGeometry Rect=\"0,15,36,6\"/>\r\n                    </GeometryGroup>\r\n                </Path.Data>\r\n            </Path>\r\n        </Grid>\r\n\r\n        <Grid Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"16,0,0,0\" IsHitTestVisible=\"False\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform Y=\"33\"/>\r\n            </Grid.RenderTransform>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <TextBlock x:Name=\"Duration\" Margin=\"0\" Text=\"0:25\" FontSize=\"20\"/>\r\n            <Ellipse x:Name=\"NotListenedIndicator\" Visibility=\"Collapsed\" Grid.Column=\"1\" Margin=\"6,11,0,13\" Width=\"8\" Height=\"8\" Fill=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n        </Grid>\r\n        <controls:WaveformSlider x:Name=\"PositionIndicator\" \r\n            CacheMode=\"BitmapCache\" \r\n            Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"2\"\r\n            IsEnabled=\"False\" \r\n            Margin=\"4,0,-6,0\"\r\n            Foreground=\"{Binding Foreground, ElementName=self}\"\r\n            ManipulationDelta=\"Slider_ManipulationDelta\" \r\n            ManipulationStarted=\"Slider_ManipulationStarted\"  \r\n            ManipulationCompleted=\"Slider_ManipulationCompleted\" \r\n            Style=\"{StaticResource PlayerProgressStyle}\"/>\r\n    </Grid>\r\n</UserControl>\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/MessagePlayerControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Threading;\r\nusing Windows.Storage;\r\nusing Windows.System;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Additional;\r\nusing TelegramClient.Views.Dialogs;\r\nusing TelegramClient_Opus;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class MessagePlayerControl\r\n    {\r\n        private static MediaElement _player;\r\n\r\n        public static MediaElement Player\r\n        {\r\n            get\r\n            {\r\n                if (_player == null)\r\n                {\r\n                    var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                    if (frame != null)\r\n                    {\r\n                        _player = frame.Element;\r\n                    }\r\n                }\r\n\r\n                return _player;\r\n            }\r\n        } \r\n\r\n        private string _trackFileName;\r\n\r\n        public static readonly DependencyProperty WaveformProperty = DependencyProperty.Register(\r\n            \"Waveform\", typeof (TLString), typeof (MessagePlayerControl), new PropertyMetadata(OnWaveformChanged));\r\n\r\n        private static void OnWaveformChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MessagePlayerControl;\r\n            if (control == null) return;\r\n\r\n            var waveform = e.NewValue as TLString;\r\n            \r\n            List<double> barHeights = null;\r\n            if (waveform != null && waveform.Data != null)\r\n            {\r\n                var bites = new BitArray(waveform.Data);\r\n                barHeights = new List<double>();\r\n                for (var i = 0; i <= bites.Length - 5; i = i + 5)\r\n                {\r\n                    var bit1 = Convert.ToInt32(bites[i]) << 0;\r\n                    var bit2 = Convert.ToInt32(bites[i + 1]) << 1;\r\n                    var bit3 = Convert.ToInt32(bites[i + 2]) << 2;\r\n                    var bit4 = Convert.ToInt32(bites[i + 3]) << 3;\r\n                    var bit5 = Convert.ToInt32(bites[i + 4]) << 4;\r\n\r\n                    var result = bit1 | bit2 | bit3 | bit4 | bit5;\r\n\r\n                    var barHeight = result / 31.0;\r\n\r\n                    barHeights.Add(barHeight);\r\n                }\r\n            }\r\n\r\n            control.PositionIndicator.Waveform = barHeights;\r\n        }\r\n\r\n        public TLString Waveform\r\n        {\r\n            get { return (TLString) GetValue(WaveformProperty); }\r\n            set { SetValue(WaveformProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty MediaProperty = DependencyProperty.Register(\r\n            \"Media\", typeof (TLObject), typeof (MessagePlayerControl), new PropertyMetadata(default(TLObject), OnMediaPropertyChanged));\r\n\r\n        private static void OnMediaPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MessagePlayerControl;\r\n            if (control == null) return;\r\n\r\n            // deafult values\r\n\r\n            var mediaDocument = e.NewValue as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                var document = mediaDocument.Document as TLDocument22;\r\n                if (document != null)\r\n                {\r\n                    var fileName = string.Format(\"audio{0}_{1}.wav\", document.Id, document.AccessHash);\r\n                    var isoFileName = Path.GetFileNameWithoutExtension(mediaDocument.IsoFileName) + \".wav\";\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.FileExists(fileName) && !store.FileExists(isoFileName))\r\n                        {\r\n                            TLObject with = null;\r\n                            var navigationService = IoC.Get<INavigationService>();\r\n                            var dialogDetailsView = navigationService.CurrentContent as DialogDetailsView;\r\n                            if (dialogDetailsView != null)\r\n                            {\r\n                                var dialogDetailsViewModel = dialogDetailsView.DataContext as DialogDetailsViewModel;\r\n                                if (dialogDetailsViewModel != null)\r\n                                {\r\n                                    with = dialogDetailsViewModel.With;\r\n                                }\r\n                            }\r\n\r\n                            var stateService = IoC.Get<IStateService>();\r\n                            var chatSettings = stateService.GetChatSettings();\r\n                            var downloadAudio = true;\r\n                            if (chatSettings != null)\r\n                            {\r\n                                if (with is TLUserBase && !chatSettings.AutoDownloadAudioPrivateChats)\r\n                                {\r\n                                    downloadAudio = false;\r\n                                }\r\n\r\n                                if (with is TLChatBase && !chatSettings.AutoDownloadAudioGroups)\r\n                                {\r\n                                    downloadAudio = false;\r\n                                }\r\n                            }\r\n\r\n                            if (downloadAudio)\r\n                            {\r\n                                mediaDocument.DownloadingProgress = 0.01;\r\n\r\n                                Execute.BeginOnThreadPool(() =>\r\n                                {\r\n                                    var fileManager = IoC.Get<IAudioFileManager>();\r\n                                    fileManager.DownloadFile(document.DCId, document.ToInputFileLocation(), mediaDocument,\r\n                                        document.Size,\r\n                                        item =>\r\n                                        {\r\n                                            Execute.BeginOnUIThread(() =>\r\n                                            {\r\n                                                ConvertAndSaveOpusToWav(control, mediaDocument);\r\n\r\n                                                mediaDocument.IsCanceled = false;\r\n                                                mediaDocument.LastProgress = 0.0;\r\n                                                mediaDocument.DownloadingProgress = 0.0;\r\n                                                mediaDocument.IsoFileName = item.IsoFileName;\r\n                                                mediaDocument.NotifyOfPropertyChange(() => mediaDocument.ThumbSelf);\r\n                                            });\r\n                                        });\r\n                                });\r\n                            }\r\n\r\n                            control.PlayerDownloadButton.Visibility = Visibility.Visible;\r\n                            control.PlayerToggleButton.Visibility = Visibility.Collapsed;\r\n                        }\r\n                        else\r\n                        {\r\n                            control.PlayerDownloadButton.Visibility = Visibility.Collapsed;\r\n                            control.PlayerToggleButton.Visibility = Visibility.Visible;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaAudio = e.NewValue as TLMessageMediaAudio;\r\n            if (mediaAudio != null)\r\n            {\r\n                var audio = mediaAudio.Audio as TLAudio33;\r\n                if (audio != null)\r\n                {\r\n                    var fileName =  string.Format(\"audio{0}_{1}.wav\", audio.Id, audio.AccessHash);\r\n                    var isoFileName = Path.GetFileNameWithoutExtension(mediaAudio.IsoFileName) + \".wav\";\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.FileExists(fileName) && !store.FileExists(isoFileName))\r\n                        {\r\n                            TLObject with = null;\r\n                            var navigationService = IoC.Get<INavigationService>();\r\n                            var dialogDetailsView = navigationService.CurrentContent as DialogDetailsView;\r\n                            if (dialogDetailsView != null)\r\n                            {\r\n                                var dialogDetailsViewModel = dialogDetailsView.DataContext as DialogDetailsViewModel;\r\n                                if (dialogDetailsViewModel != null)\r\n                                {\r\n                                    with = dialogDetailsViewModel.With;\r\n                                }\r\n                            }\r\n\r\n                            var stateService = IoC.Get<IStateService>();\r\n                            var chatSettings = stateService.GetChatSettings();\r\n                            var downloadAudio = true;\r\n                            if (chatSettings != null)\r\n                            {\r\n                                if (with is TLUserBase && !chatSettings.AutoDownloadAudioPrivateChats)\r\n                                {\r\n                                    downloadAudio = false;\r\n                                }\r\n\r\n                                if (with is TLChatBase && !chatSettings.AutoDownloadAudioGroups)\r\n                                {\r\n                                    downloadAudio = false;\r\n                                }\r\n                            }\r\n\r\n                            if (downloadAudio)\r\n                            {\r\n                                mediaAudio.DownloadingProgress = 0.01;\r\n\r\n                                Execute.BeginOnThreadPool(() =>\r\n                                {\r\n                                    var fileManager = IoC.Get<IAudioFileManager>();\r\n                                    fileManager.DownloadFile(audio.DCId, audio.ToInputFileLocation(), mediaAudio,\r\n                                        audio.Size,\r\n                                        item =>\r\n                                        {\r\n                                            Execute.BeginOnUIThread(() =>\r\n                                            {\r\n                                                ConvertAndSaveOpusToWav(mediaAudio);\r\n\r\n                                                mediaAudio.IsCanceled = false;\r\n                                                mediaAudio.LastProgress = 0.0;\r\n                                                mediaAudio.DownloadingProgress = 0.0;\r\n                                                mediaAudio.IsoFileName = item.IsoFileName;\r\n                                                mediaAudio.NotifyOfPropertyChange(() => mediaAudio.ThumbSelf);\r\n                                            });\r\n                                        });\r\n                                });\r\n                            }\r\n\r\n                            control.PlayerDownloadButton.Visibility = Visibility.Visible;\r\n                            control.PlayerToggleButton.Visibility = Visibility.Collapsed;\r\n                        }\r\n                        else\r\n                        {\r\n                            control.PlayerDownloadButton.Visibility = Visibility.Collapsed;\r\n                            control.PlayerToggleButton.Visibility = Visibility.Visible;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var decryptedMediaDocument = e.NewValue as TLDecryptedMessageMediaDocument45;\r\n            if (decryptedMediaDocument != null)\r\n            {\r\n                var fileLocation = decryptedMediaDocument.File as TLEncryptedFile;\r\n                if (fileLocation != null)\r\n                {\r\n                    var fileName = string.Format(\"audio{0}_{1}.wav\", fileLocation.Id, fileLocation.AccessHash);\r\n                    //var isoFileName = Path.GetFileNameWithoutExtension(decryptedMediaAudio.IsoFileName) + \".wav\";\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.FileExists(fileName))\r\n                        {\r\n                            TLObject with = null;\r\n                            var navigationService = IoC.Get<INavigationService>();\r\n                            var secretDialogDetailsView = navigationService.CurrentContent as SecretDialogDetailsView;\r\n                            if (secretDialogDetailsView != null)\r\n                            {\r\n                                var secretDialogDetailsViewModel = secretDialogDetailsView.DataContext as SecretDialogDetailsViewModel;\r\n                                if (secretDialogDetailsViewModel != null)\r\n                                {\r\n                                    with = secretDialogDetailsViewModel.With;\r\n                                }\r\n                            }\r\n\r\n                            var stateService = IoC.Get<IStateService>();\r\n                            var chatSettings = stateService.GetChatSettings();\r\n                            var downloadAudio = true;\r\n                            if (chatSettings != null)\r\n                            {\r\n                                if (with is TLUserBase && !chatSettings.AutoDownloadAudioPrivateChats)\r\n                                {\r\n                                    downloadAudio = false;\r\n                                }\r\n\r\n                                if (with is TLChatBase && !chatSettings.AutoDownloadAudioGroups)\r\n                                {\r\n                                    downloadAudio = false;\r\n                                }\r\n                            }\r\n\r\n                            if (downloadAudio)\r\n                            {\r\n                                decryptedMediaDocument.DownloadingProgress = 0.01;\r\n\r\n                                Execute.BeginOnThreadPool(() =>\r\n                                {\r\n                                    var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                                    fileManager.DownloadFile(fileLocation, decryptedMediaDocument,\r\n                                        item =>\r\n                                        {\r\n                                            decryptedMediaDocument = item.Owner as TLDecryptedMessageMediaDocument45;\r\n                                            if (decryptedMediaDocument == null) return;\r\n\r\n                                            fileLocation = decryptedMediaDocument.File as TLEncryptedFile;\r\n                                            if (fileLocation == null) return;\r\n\r\n                                            fileName = item.IsoFileName;\r\n                                            var decryptedFileName = String.Format(\"audio{0}_{1}.mp3\",\r\n                                                fileLocation.Id,\r\n                                                fileLocation.AccessHash);\r\n                                            using (var s = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                            {\r\n                                                byte[] buffer;\r\n                                                using (var file = s.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                                {\r\n                                                    buffer = new byte[file.Length];\r\n                                                    file.Read(buffer, 0, buffer.Length);\r\n                                                }\r\n                                                var decryptedBuffer = Telegram.Api.Helpers.Utils.AesIge(buffer, decryptedMediaDocument.Key.Data, decryptedMediaDocument.IV.Data, false);\r\n\r\n                                                using (var file = s.OpenFile(decryptedFileName, FileMode.OpenOrCreate, FileAccess.Write))\r\n                                                {\r\n                                                    file.Write(decryptedBuffer, 0, decryptedBuffer.Length);\r\n                                                }\r\n\r\n                                                s.DeleteFile(fileName);\r\n\r\n                                            }\r\n\r\n                                            Execute.BeginOnUIThread(() =>\r\n                                            {\r\n                                                ConvertAndSaveOpusToWav(decryptedMediaDocument);\r\n\r\n                                                decryptedMediaDocument.DownloadingProgress = 0.0;\r\n                                            });\r\n                                        });\r\n                                });\r\n                            }\r\n\r\n                            control.PlayerDownloadButton.Visibility = Visibility.Visible;\r\n                            control.PlayerToggleButton.Visibility = Visibility.Collapsed;\r\n                        }\r\n                        else\r\n                        {\r\n                            control.PlayerDownloadButton.Visibility = Visibility.Collapsed;\r\n                            control.PlayerToggleButton.Visibility = Visibility.Visible;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var decryptedMediaAudio = e.NewValue as TLDecryptedMessageMediaAudio;\r\n            if (decryptedMediaAudio != null)\r\n            {\r\n                var fileLocation = decryptedMediaAudio.File as TLEncryptedFile;\r\n                if (fileLocation != null)\r\n                {\r\n                    var fileName = string.Format(\"audio{0}_{1}.wav\", fileLocation.Id, fileLocation.AccessHash);\r\n                    //var isoFileName = Path.GetFileNameWithoutExtension(decryptedMediaAudio.IsoFileName) + \".wav\";\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.FileExists(fileName))\r\n                        {\r\n                            TLObject with = null;\r\n                            var navigationService = IoC.Get<INavigationService>();\r\n                            var secretDialogDetailsView = navigationService.CurrentContent as SecretDialogDetailsView;\r\n                            if (secretDialogDetailsView != null)\r\n                            {\r\n                                var secretDialogDetailsViewModel = secretDialogDetailsView.DataContext as SecretDialogDetailsViewModel;\r\n                                if (secretDialogDetailsViewModel != null)\r\n                                {\r\n                                    with = secretDialogDetailsViewModel.With;\r\n                                }\r\n                            }\r\n\r\n                            var stateService = IoC.Get<IStateService>();\r\n                            var chatSettings = stateService.GetChatSettings();\r\n                            var downloadAudio = true;\r\n                            if (chatSettings != null)\r\n                            {\r\n                                if (with is TLUserBase && !chatSettings.AutoDownloadAudioPrivateChats)\r\n                                {\r\n                                    downloadAudio = false;\r\n                                }\r\n\r\n                                if (with is TLChatBase && !chatSettings.AutoDownloadAudioGroups)\r\n                                {\r\n                                    downloadAudio = false;\r\n                                }\r\n                            }\r\n\r\n                            if (downloadAudio)\r\n                            {\r\n                                decryptedMediaAudio.DownloadingProgress = 0.01;\r\n\r\n                                Execute.BeginOnThreadPool(() =>\r\n                                {\r\n                                    var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                                    fileManager.DownloadFile(fileLocation, decryptedMediaAudio,\r\n                                        item =>\r\n                                        {\r\n                                            decryptedMediaAudio = item.Owner as TLDecryptedMessageMediaAudio;\r\n                                            if (decryptedMediaAudio == null) return;\r\n\r\n                                            fileLocation = decryptedMediaAudio.File as TLEncryptedFile;\r\n                                            if (fileLocation == null) return;\r\n\r\n                                            fileName = item.IsoFileName;\r\n                                            var decryptedFileName = String.Format(\"audio{0}_{1}.mp3\",\r\n                                                fileLocation.Id,\r\n                                                fileLocation.AccessHash);\r\n                                            using (var s = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                            {\r\n                                                byte[] buffer;\r\n                                                using (var file = s.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                                {\r\n                                                    buffer = new byte[file.Length];\r\n                                                    file.Read(buffer, 0, buffer.Length);\r\n                                                }\r\n                                                var decryptedBuffer = Telegram.Api.Helpers.Utils.AesIge(buffer, decryptedMediaAudio.Key.Data, decryptedMediaAudio.IV.Data, false);\r\n\r\n                                                using (var file = s.OpenFile(decryptedFileName, FileMode.OpenOrCreate, FileAccess.Write))\r\n                                                {\r\n                                                    file.Write(decryptedBuffer, 0, decryptedBuffer.Length);\r\n                                                }\r\n\r\n                                                s.DeleteFile(fileName);\r\n\r\n                                            }\r\n\r\n                                            Execute.BeginOnUIThread(() =>\r\n                                            {\r\n                                                ConvertAndSaveOpusToWav(decryptedMediaAudio);\r\n\r\n                                                decryptedMediaAudio.DownloadingProgress = 0.0;\r\n                                            });\r\n                                        });\r\n                                });\r\n                            }\r\n\r\n                            control.PlayerDownloadButton.Visibility = Visibility.Visible;\r\n                            control.PlayerToggleButton.Visibility = Visibility.Collapsed;\r\n                        }\r\n                        else\r\n                        {\r\n                            control.PlayerDownloadButton.Visibility = Visibility.Collapsed;\r\n                            control.PlayerToggleButton.Visibility = Visibility.Visible;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        public static void ConvertAndSaveOpusToWav(TLMessageMediaAudio mediaAudio)\r\n        {\r\n            if (mediaAudio == null) return;\r\n\r\n            var audio = mediaAudio.Audio as TLAudio;\r\n            if (audio != null)\r\n            {\r\n                var audioFileName = audio.GetFileName();\r\n                var wavFileName = Path.GetFileNameWithoutExtension(audioFileName) + \".wav\";\r\n                \r\n                ConvertAndSaveOputToWavCommon(audioFileName, wavFileName);\r\n            }\r\n        }\r\n\r\n        public static void ConvertAndSaveOpusToWav(MessagePlayerControl control, TLMessageMediaDocument mediaDocument)\r\n        {\r\n            if (mediaDocument == null) return;\r\n\r\n            var document = mediaDocument.Document as TLDocument22;\r\n            if (document != null)\r\n            {\r\n                var audioFileName = string.Format(\"audio{0}_{1}.mp3\", document.Id, document.AccessHash);\r\n                var wavFileName = Path.GetFileNameWithoutExtension(audioFileName) + \".wav\";\r\n\r\n//#if DEBUG\r\n\r\n//                var opus = new WindowsPhoneRuntimeComponent();\r\n//                var waveformBytes = opus.GetWaveform(ApplicationData.Current.LocalFolder.Path + \"\\\\\" + audioFileName);\r\n\r\n\r\n//                var mediaDocument45 = mediaDocument as TLMessageMediaDocument45;\r\n//                if (mediaDocument45 != null)\r\n//                {\r\n//                    byte[] waveformBytes2 = new byte[100];\r\n//                    var waveform = mediaDocument45.Waveform;\r\n//                    if (waveform != null)\r\n//                    {\r\n//                        var bites = new BitArray(waveform.Data);\r\n//                        var count = 0;\r\n//                        for (var i = 0; i <= bites.Length - 5 && count < 100; )\r\n//                        {\r\n//                            var bit1 = Convert.ToByte(bites[i]) << 0;\r\n//                            var bit2 = Convert.ToByte(bites[i + 1]) << 1;\r\n//                            var bit3 = Convert.ToByte(bites[i + 2]) << 2;\r\n//                            var bit4 = Convert.ToByte(bites[i + 3]) << 3;\r\n//                            var bit5 = Convert.ToByte(bites[i + 4]) << 4;\r\n\r\n//                            var result = bit1 | bit2 | bit3 | bit4 | bit5;\r\n\r\n//                            waveformBytes2[count] = (byte)(result);\r\n//                            i = i + 5;\r\n//                            count++;\r\n//                        }\r\n\r\n//                        var bites2 = new BitArray(5*100);\r\n//                        count = 0;\r\n//                        for (var i = 0; i < waveformBytes2.Length; i++)\r\n//                        {\r\n//                            var result = waveformBytes2[i];\r\n//                            var bit1 = result >> 0 & 0x1;\r\n//                            var bit2 = result >> 1 & 0x1;\r\n//                            var bit3 = result >> 2 & 0x1;\r\n//                            var bit4 = result >> 3 & 0x1;\r\n//                            var bit5 = result >> 4 & 0x1;\r\n//                            bites2[count] = Convert.ToBoolean(bit1);\r\n//                            bites2[count + 1] = Convert.ToBoolean(bit2);\r\n//                            bites2[count + 2] = Convert.ToBoolean(bit3);\r\n//                            bites2[count + 3] = Convert.ToBoolean(bit4);\r\n//                            bites2[count + 4] = Convert.ToBoolean(bit5);\r\n//                            count = count + 5;\r\n//                        }\r\n\r\n//                        for (var i = 0; i < 500; i++)\r\n//                        {\r\n//                            if (bites[i] != bites2[i])\r\n//                            {\r\n                                \r\n//                            }\r\n//                        }\r\n//                    }\r\n//                }\r\n//#endif\r\n\r\n                ConvertAndSaveOputToWavCommon(audioFileName, wavFileName);\r\n            }\r\n        }\r\n\r\n        public static void ConvertAndSaveOpusToWav(TLDecryptedMessageMediaDocument mediaDocument)\r\n        {\r\n            if (mediaDocument == null) return;\r\n\r\n            var fileLocation = mediaDocument.File as TLEncryptedFile;\r\n            if (fileLocation == null) return;\r\n\r\n            var audioFileName = String.Format(\"audio{0}_{1}.mp3\", fileLocation.Id, fileLocation.AccessHash);\r\n            var wavFileName = Path.GetFileNameWithoutExtension(audioFileName) + \".wav\";\r\n\r\n            ConvertAndSaveOputToWavCommon(audioFileName, wavFileName);\r\n        }\r\n\r\n        public static void ConvertAndSaveOpusToWav(TLDecryptedMessageMediaAudio mediaAudio)\r\n        {\r\n            if (mediaAudio == null) return;\r\n\r\n            var fileLocation = mediaAudio.File as TLEncryptedFile;\r\n            if (fileLocation == null) return;\r\n\r\n            var audioFileName = String.Format(\"audio{0}_{1}.mp3\", fileLocation.Id, fileLocation.AccessHash);\r\n            var wavFileName = Path.GetFileNameWithoutExtension(audioFileName) + \".wav\";\r\n\r\n            ConvertAndSaveOputToWavCommon(audioFileName, wavFileName);\r\n        }\r\n\r\n        private static void ConvertAndSaveOputToWavCommon(string audioFileName, string wavFileName)\r\n        {\r\n#if WP8\r\n            try\r\n            {\r\n                // critial not multitreaded code! \r\n                var component = new WindowsPhoneRuntimeComponent();\r\n                var result = component.InitPlayer(ApplicationData.Current.LocalFolder.Path + \"\\\\\" + audioFileName);\r\n                if (result == 1)\r\n                {\r\n                    var buffer = new byte[16*1024];\r\n                    var args = new int[3];\r\n                    var pcmStream = new MemoryStream();\r\n                    while (true)\r\n                    {\r\n                        component.FillBuffer(buffer, buffer.Length, args);\r\n                        var count = args[0];\r\n                        var offset = args[1];\r\n                        var endOfStream = args[2] == 1;\r\n\r\n                        pcmStream.Write(buffer, 0, count);\r\n                        if (endOfStream)\r\n                        {\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    var wavStream = Wav.GetWavAsMemoryStream(pcmStream, 48000, 1, 16);\r\n                    using (var s = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        using (var file = new IsolatedStorageFileStream(wavFileName, FileMode.OpenOrCreate, s))\r\n                        {\r\n                            wavStream.Seek(0, SeekOrigin.Begin);\r\n                            wavStream.CopyTo(file);\r\n                            file.Flush();\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(\"MessagePlayerControl.ConvertAndSaveOpusToWav \" + ex);\r\n\r\n                //Execute.ShowDebugMessage(\"MessagePlayerControl.ConvertAndSaveOpusToWav \" + ex);\r\n            }\r\n#endif\r\n        }\r\n\r\n        public TLObject Media\r\n        {\r\n            get { return (TLObject) GetValue(MediaProperty); }\r\n            set { SetValue(MediaProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty DataContextWatcherProperty = DependencyProperty.Register(\r\n            \"DataContextWatcher\", typeof(object), typeof(MessagePlayerControl), new PropertyMetadata(default(object), OnDataContextChanged));\r\n\r\n        private static void OnDataContextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MessagePlayerControl;\r\n            if (control != null)\r\n            {\r\n                control.Duration.Text = MessagePlayerUtils.GetDurationString(control.DataContext);\r\n            }\r\n        }\r\n\r\n        public object DataContextWatcher\r\n        {\r\n            get { return GetValue(DataContextWatcherProperty); }\r\n            set { SetValue(DataContextWatcherProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty NotListenedProperty = DependencyProperty.Register(\r\n            \"NotListened\", typeof (bool), typeof (MessagePlayerControl), new PropertyMetadata(OnNotListenedChanged));\r\n\r\n        private static void OnNotListenedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MessagePlayerControl;\r\n            if (control == null) return;\r\n\r\n            if (e.NewValue is bool)\r\n            {\r\n                var isVisible = (bool)e.NewValue;\r\n                \r\n                control.NotListenedIndicator.Visibility = isVisible\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public bool NotListened\r\n        {\r\n            get { return (bool) GetValue(NotListenedProperty); }\r\n            set { SetValue(NotListenedProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Downloading progress\r\n        /// </summary>\r\n        public static readonly DependencyProperty ProgressProperty = DependencyProperty.Register(\r\n            \"Progress\", typeof (double), typeof (MessagePlayerControl), new PropertyMetadata(default(double), OnProgressChanged));\r\n\r\n        private static void OnProgressChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MessagePlayerControl;\r\n            if (control == null) return;\r\n\r\n            if (e.NewValue is double)\r\n            {\r\n                bool isVisible;\r\n                var progress = (double)e.NewValue;\r\n                isVisible = progress > 0.0 && progress < 1.0;\r\n\r\n                if (!isVisible)\r\n                {\r\n                    var mediaDocument = control.Media as TLMessageMediaDocument;\r\n                    if (mediaDocument != null)\r\n                    {\r\n                        var document = mediaDocument.Document as TLDocument;\r\n                        if (document != null)\r\n                        {\r\n                            var fileName = string.Format(\"audio{0}_{1}.wav\", document.Id, document.AccessHash);\r\n                            var isoFileName = Path.GetFileNameWithoutExtension(mediaDocument.IsoFileName) + \".wav\";\r\n                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                if (!store.FileExists(fileName) && !store.FileExists(isoFileName))\r\n                                {\r\n                                    control.PlayerToggleButton.Visibility = Visibility.Collapsed;\r\n                                    control.PlayerDownloadButton.Visibility = Visibility.Visible;\r\n                                }\r\n                                else\r\n                                {\r\n                                    control.PlayerToggleButton.Visibility = Visibility.Visible;\r\n                                    control.PlayerDownloadButton.Visibility = Visibility.Collapsed;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var mediaAudio = control.Media as TLMessageMediaAudio;\r\n                    if (mediaAudio != null)\r\n                    {\r\n                        var audio = mediaAudio.Audio as TLAudio;\r\n                        if (audio != null)\r\n                        {\r\n                            var fileName = string.Format(\"audio{0}_{1}.wav\", audio.Id, audio.AccessHash);\r\n                            var isoFileName = Path.GetFileNameWithoutExtension(mediaAudio.IsoFileName) + \".wav\";\r\n                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                if (!store.FileExists(fileName) && !store.FileExists(isoFileName))\r\n                                {\r\n                                    control.PlayerToggleButton.Visibility = Visibility.Collapsed;\r\n                                    control.PlayerDownloadButton.Visibility = Visibility.Visible;\r\n                                }\r\n                                else\r\n                                {\r\n                                    control.PlayerToggleButton.Visibility = Visibility.Visible;\r\n                                    control.PlayerDownloadButton.Visibility = Visibility.Collapsed;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var decryptedMediaDocument = control.Media as TLDecryptedMessageMediaDocument;\r\n                    if (decryptedMediaDocument != null)\r\n                    {\r\n                        var fileLocation = decryptedMediaDocument.File as TLEncryptedFile;\r\n                        if (fileLocation != null)\r\n                        {\r\n                            var fileName = string.Format(\"audio{0}_{1}.wav\", fileLocation.Id, fileLocation.AccessHash);\r\n                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                if (!store.FileExists(fileName))\r\n                                {\r\n                                    control.PlayerToggleButton.Visibility = Visibility.Collapsed;\r\n                                    control.PlayerDownloadButton.Visibility = Visibility.Visible;\r\n                                }\r\n                                else\r\n                                {\r\n                                    control.PlayerToggleButton.Visibility = Visibility.Visible;\r\n                                    control.PlayerDownloadButton.Visibility = Visibility.Collapsed;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var decryptedMediaAudio = control.Media as TLDecryptedMessageMediaAudio;\r\n                    if (decryptedMediaAudio != null)\r\n                    {\r\n                        var fileLocation = decryptedMediaAudio.File as TLEncryptedFile;\r\n                        if (fileLocation != null)\r\n                        {\r\n                            var fileName = string.Format(\"audio{0}_{1}.wav\", fileLocation.Id, fileLocation.AccessHash);\r\n                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                if (!store.FileExists(fileName))\r\n                                {\r\n                                    control.PlayerToggleButton.Visibility = Visibility.Collapsed;\r\n                                    control.PlayerDownloadButton.Visibility = Visibility.Visible;\r\n                                }\r\n                                else\r\n                                {\r\n                                    control.PlayerToggleButton.Visibility = Visibility.Visible;\r\n                                    control.PlayerDownloadButton.Visibility = Visibility.Collapsed;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    control.PlayerToggleButton.Visibility = isVisible\r\n                        ? Visibility.Collapsed\r\n                        : Visibility.Visible;\r\n\r\n                    control.PlayerDownloadButton.Visibility = isVisible\r\n                        ? Visibility.Visible\r\n                        : Visibility.Collapsed;\r\n                }\r\n\r\n                control.CancelDownloadButton.Visibility = isVisible \r\n                    ? Visibility.Visible \r\n                    : Visibility.Collapsed;\r\n\r\n                control.DownloadButton.Visibility = isVisible\r\n                    ? Visibility.Collapsed\r\n                    : Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        public double Progress\r\n        {\r\n            get { return (double) GetValue(ProgressProperty); }\r\n            set { SetValue(ProgressProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty UploadingProgressProperty = DependencyProperty.Register(\r\n            \"UploadingProgress\", typeof (double), typeof (MessagePlayerControl), new PropertyMetadata(default(double), OnProgressChanged));\r\n\r\n        public double UploadingProgress\r\n        {\r\n            get { return (double) GetValue(UploadingProgressProperty); }\r\n            set { SetValue(UploadingProgressProperty, value); }\r\n        }\r\n\r\n        public MessagePlayerControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            PositionIndicator.Value = 0.0;\r\n\r\n            _timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(0.05) };\r\n            _timer.Tick += UpdateState;\r\n\r\n            //if (Player.Tag is MessagePlayerControl\r\n            //    && Player.CurrentState == MediaElementState.Playing)\r\n            //{\r\n            //    // If audio was already playing when the app was launched, update the UI.\r\n            //    //if (!_isManipulating)\r\n            //    {\r\n            //        UpdateState(null, null);\r\n            //    }\r\n            //}\r\n\r\n            SetBinding(DataContextWatcherProperty, new Binding());\r\n        }\r\n\r\n        #region Timer\r\n\r\n        private readonly DispatcherTimer _timer;\r\n\r\n        private Storyboard _recentStoryboard;\r\n\r\n        private bool _completeAnimation;\r\n\r\n        private void UpdateState(object sender, System.EventArgs e)\r\n        {\r\n            if (Player.Source != null)\r\n            {\r\n                if (!_isManipulating)\r\n                {\r\n                    try\r\n                    {\r\n                        System.Diagnostics.Debug.WriteLine(Player.Position.TotalSeconds);\r\n                        if (PositionIndicator.Value > 0.0\r\n                            && Player.Position.Ticks > 0\r\n                            && (!Player.NaturalDuration.HasTimeSpan || Player.Position.Ticks < Player.NaturalDuration.TimeSpan.Ticks)\r\n                            )\r\n                        {\r\n                            UpdateDurationString(Player.Position, \"UpdateState\");\r\n                        }\r\n\r\n                        var value = Player.Position.TotalSeconds;\r\n                        if (PositionIndicator.Value > 0.0\r\n                            && Player.Position.TotalSeconds == 0.0 && PlayerToggleButton.IsChecked == true)\r\n                        {\r\n                            if (_completeAnimation)\r\n                            {\r\n                                return;\r\n                            }\r\n\r\n                            value = PositionIndicator.Maximum;\r\n                            _completeAnimation = true;\r\n                        }\r\n\r\n                        System.Diagnostics.Debug.WriteLine(\"value=\" + value + \" Player.Position.TotalSeconds=\" + Player.Position.TotalSeconds + \" complete=\" + _completeAnimation);\r\n                        PositionIndicator.Value = value;\r\n                        if (_completeAnimation)\r\n                        {\r\n                            //return;\r\n                            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.1), () =>\r\n                            {\r\n                                PositionIndicator.Value = 0.0;\r\n                                Duration.Text = MessagePlayerUtils.GetDurationString(PlayerToggleButton.DataContext);\r\n                            });\r\n                        }\r\n\r\n                        //var storyboard = new Storyboard();\r\n                        //var valueAnimation = new DoubleAnimationUsingKeyFrames();\r\n                        //valueAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.1), Value = value });\r\n                        //Storyboard.SetTarget(valueAnimation, PositionIndicator);\r\n                        //Storyboard.SetTargetProperty(valueAnimation, new PropertyPath(\"(RangeBase.Value)\"));\r\n                        //storyboard.Children.Add(valueAnimation);\r\n                        //if (completeAnimation)\r\n                        //{\r\n                        //    storyboard.Completed += (o, args) =>\r\n                        //    {\r\n                        //        PositionIndicator.Value = 0.0;\r\n                        //        Duration.Text = MessagePlayerUtils.GetDurationString(PlayerToggleButton.DataContext);\r\n                        //    };\r\n                        //}\r\n                        //storyboard.Begin();\r\n                        //_recentStoryboard.Begin();\r\n                        \r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UpdateDurationString(TimeSpan timeSpan, string from)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(from + \" \" + timeSpan);\r\n\r\n            if (timeSpan.Hours > 0)\r\n            {\r\n                Duration.Text = timeSpan.ToString(@\"h\\:mm\\:ss\");\r\n            }\r\n            Duration.Text = timeSpan.ToString(@\"m\\:ss\");\r\n        }\r\n        #endregion\r\n\r\n        #region Player\r\n\r\n        private void PlayerToggleButton_Click(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            if (Player.Tag != this)\r\n            {\r\n                ResetPlayer();\r\n                Player.Tag = this;\r\n            }\r\n\r\n            var wavFileName = MessagePlayerUtils.GetWavFileName(PlayerToggleButton.DataContext);\r\n            if (string.IsNullOrEmpty(wavFileName)) return;\r\n\r\n            if (PlayerToggleButton.IsChecked == true)\r\n            {\r\n\r\n                if (Player.Source == null\r\n                    || Path.GetFileName(Player.Source.OriginalString) != wavFileName)\r\n                {\r\n                    Player.Source = null;\r\n                    _trackFileName = wavFileName;\r\n\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        if (!store.FileExists(wavFileName))\r\n                        {\r\n                            PlayerToggleButton.IsChecked = false;\r\n                            return;\r\n                        }\r\n\r\n                        using (var wavFile = store.OpenFile(wavFileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            Player.SetSource(wavFile);\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    _trackFileName = wavFileName;\r\n\r\n                    SetPosition();\r\n\r\n                    _completeAnimation = false;\r\n                    Player.Play();\r\n                    _timer.Start();\r\n                }\r\n\r\n            }\r\n            else\r\n            {\r\n                Player.Pause();\r\n                _timer.Stop();\r\n            }\r\n        }\r\n\r\n        private void SetPosition()\r\n        {\r\n            PositionIndicator.IsEnabled = true;\r\n            var ratio = Player.NaturalDuration.TimeSpan.TotalSeconds/PositionIndicator.Maximum;\r\n            var newValue = PositionIndicator.Value*ratio;\r\n            PositionIndicator.Maximum = Player.NaturalDuration.TimeSpan.TotalSeconds;\r\n            PositionIndicator.SmallChange = PositionIndicator.Maximum/10.0;\r\n            PositionIndicator.LargeChange = PositionIndicator.Maximum/10.0;\r\n            if (PositionIndicator.Value >= PositionIndicator.Maximum)\r\n            {\r\n                newValue = PositionIndicator.Maximum - 0.01;    //фикс, если установлено максимальное значение, то при вызове Play аудио не проигрывается и не вызывается OnMediaEnded. Плеер подвисает на конечной позиции\r\n            }\r\n\r\n            if (double.IsNaN(newValue) || double.IsInfinity(newValue))\r\n            {\r\n                newValue = 0.0;\r\n            }\r\n\r\n            PositionIndicator.Value = newValue;\r\n            if (Player.CanSeek)\r\n            {\r\n                Player.Position = TimeSpan.FromSeconds(newValue);\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region Binding to MediaElement\r\n\r\n        private void ResetPlayer()\r\n        {\r\n            var playerControl = Player.Tag as MessagePlayerControl;\r\n            if (playerControl != null)\r\n            {\r\n                playerControl._timer.Stop();\r\n                playerControl.PlayerToggleButton.IsChecked = false;\r\n                playerControl.PositionIndicator.Value = 0.0;\r\n                playerControl.Duration.Text = MessagePlayerUtils.GetDurationString(playerControl.PlayerToggleButton.DataContext);\r\n\r\n                UnbindFromPlayer(playerControl);\r\n            }\r\n\r\n            BindToPlayer();\r\n        }\r\n\r\n        private void BindToPlayer()\r\n        {\r\n            //Player.MediaOpened += OnMediaOpened;\r\n            //Player.MediaEnded += OnMediaEnded;\r\n            //Player.MediaFailed += OnMediaFailed;\r\n            var gifPlayerControl = Player.Tag as GifPlayerControl;\r\n            if (gifPlayerControl != null)\r\n            {\r\n                gifPlayerControl.OnMediaEnded();\r\n            }\r\n\r\n            Player.Tag = this;\r\n        }\r\n\r\n        private void UnbindFromPlayer(MessagePlayerControl control)\r\n        {\r\n            //Player.MediaOpened -= control.OnMediaOpened;\r\n            //Player.MediaEnded -= control.OnMediaEnded;\r\n            //Player.MediaFailed -= control.OnMediaFailed;\r\n\r\n            Player.Tag = null;\r\n        }\r\n\r\n        public void OnMediaFailed(ExceptionRoutedEventArgs e)\r\n        {\r\n            Execute.ShowDebugMessage(e.ErrorException.ToString());\r\n\r\n            _timer.Stop();\r\n            PlayerToggleButton.IsChecked = false;\r\n            PositionIndicator.Value = 0.0;\r\n        }\r\n\r\n        public void OnMediaOpened()\r\n        {\r\n            SetPosition();\r\n\r\n            if (PlayerToggleButton.IsChecked == true)\r\n            {\r\n                Player.Play();\r\n                _timer.Start();\r\n            }\r\n        }\r\n\r\n        public void OnMediaEnded()\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"OnMediaEneded\");\r\n            _timer.Stop();\r\n            PlayerToggleButton.IsChecked = false;\r\n            _completeAnimation = false;\r\n            if (!_isManipulating)\r\n            {\r\n                //PositionIndicator.Value = 0.0;\r\n                //Duration.Text = MessagePlayerUtils.GetDurationString(PlayerToggleButton.DataContext);\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Sliding\r\n        private bool _isManipulating;\r\n\r\n        private void Slider_ManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (!Player.CanSeek\r\n                || Path.GetFileName(Player.Source.LocalPath) != _trackFileName)\r\n            {\r\n                e.Handled = true;\r\n                return;\r\n            }\r\n            \r\n            if (_recentStoryboard != null)\r\n            {\r\n                _recentStoryboard.Stop();\r\n            }\r\n\r\n            _isManipulating = true;\r\n        }\r\n\r\n        private void Slider_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            var value = PositionIndicator.Value;\r\n            _isManipulating = false;\r\n\r\n\r\n            if (Player.Source != null\r\n                && Player.CanSeek\r\n                && Path.GetFileName(Player.Source.LocalPath) == _trackFileName)\r\n            {\r\n                if (value >= PositionIndicator.Maximum)\r\n                {\r\n                    value = PositionIndicator.Maximum - 0.01;\r\n                }\r\n\r\n                Player.Position = TimeSpan.FromSeconds(value);\r\n                UpdateDurationString(Player.Position, \"ManipulationCompleted\");\r\n            }\r\n            else\r\n            {\r\n                PositionIndicator.Value = 0.0;\r\n            }\r\n        }\r\n\r\n        private void Slider_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            var timeSpan = TimeSpan.FromSeconds(PositionIndicator.Value);\r\n            UpdateDurationString(timeSpan, \"ManipulationDelta\");\r\n        }\r\n        #endregion\r\n\r\n        public static void Stop()\r\n        {\r\n            var player = Player.Tag as MessagePlayerControl;\r\n            if (player != null)\r\n            {\r\n                if (MessagePlayerControl.Player.CurrentState == MediaElementState.Playing)\r\n                {\r\n                    MessagePlayerControl.Player.Stop();\r\n                }\r\n\r\n                player.OnMediaEnded(); \r\n            }          \r\n        }\r\n\r\n        private void CancelDownloadButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            RaiseCancelDownload();\r\n        }\r\n\r\n        public event EventHandler CancelDownload;\r\n\r\n        protected virtual void RaiseCancelDownload()\r\n        {\r\n            var handler = CancelDownload;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n    }\r\n\r\n    public static class MessagePlayerUtils\r\n    {\r\n        public static string GetDurationString(object dataContext)\r\n        {\r\n            var mediaDocument = dataContext as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                var document = mediaDocument.Document as TLDocument22;\r\n                if (document != null)\r\n                {\r\n                    return document.DurationString;\r\n                }\r\n            }\r\n\r\n            var mediaAudio = dataContext as TLMessageMediaAudio;\r\n            if (mediaAudio != null)\r\n            {\r\n                var audio = mediaAudio.Audio as TLAudio;\r\n                if (audio != null)\r\n                {\r\n                    return audio.DurationString;\r\n                }\r\n            }\r\n\r\n            var decryptedMediaDocument = dataContext as TLDecryptedMessageMediaDocument45;\r\n            if (decryptedMediaDocument != null)\r\n            {\r\n                return decryptedMediaDocument.DurationString;\r\n            }\r\n\r\n            var decryptedMediaAudio = dataContext as TLDecryptedMessageMediaAudio;\r\n            if (decryptedMediaAudio != null)\r\n            {\r\n                return decryptedMediaAudio.DurationString;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static string GetWavFileName(object dataContext)\r\n        {\r\n            var mediaDocument = dataContext as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                var document = mediaDocument.Document as TLDocument;\r\n                if (document != null)\r\n                {\r\n//                    if (TLString.Equals(document.MimeType, new TLString(\"audio/mpeg\"), StringComparison.OrdinalIgnoreCase))\r\n//                    {\r\n//                        Execute.BeginOnThreadPool(async () =>\r\n//                        {\r\n\r\n//                            var audioFileName = document.GetFileName();\r\n//#if WP81\r\n//                            try\r\n//                            {\r\n//                                var documentFile = await ApplicationData.Current.LocalFolder.GetFileAsync(audioFileName);\r\n//                                Launcher.LaunchFileAsync(documentFile);\r\n//                            }\r\n//                            catch (Exception ex)\r\n//                            {\r\n//                                Execute.ShowDebugMessage(\"LocalFolder.GetFileAsync docLocal exception \\n\" + ex);\r\n//                            }\r\n//#elif WP8\r\n//                        var file = await ApplicationData.Current.LocalFolder.GetFileAsync(audioFileName);\r\n//                        Launcher.LaunchFileAsync(file);\r\n//                        return;\r\n//#endif\r\n//                        });\r\n//                    }\r\n                    return string.Format(\"audio{0}_{1}.wav\", document.Id, document.AccessHash);\r\n                }\r\n            }\r\n\r\n            var mediaAudio = dataContext as TLMessageMediaAudio;\r\n            if (mediaAudio != null)\r\n            {\r\n                var audio = mediaAudio.Audio as TLAudio;\r\n                if (audio != null)\r\n                {\r\n                    if (TLString.Equals(audio.MimeType, new TLString(\"audio/mpeg\"), StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        Execute.BeginOnThreadPool(async () =>\r\n                        {\r\n\r\n                            var audioFileName = audio.GetFileName();\r\n#if WP81\r\n                            try\r\n                            {\r\n                                var documentFile = await ApplicationData.Current.LocalFolder.GetFileAsync(audioFileName);\r\n                                Launcher.LaunchFileAsync(documentFile);\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                Execute.ShowDebugMessage(\"LocalFolder.GetFileAsync docLocal exception \\n\" + ex);\r\n                            }\r\n#elif WP8\r\n                        var file = await ApplicationData.Current.LocalFolder.GetFileAsync(audioFileName);\r\n                        Launcher.LaunchFileAsync(file);\r\n                        return;\r\n#endif\r\n                        });\r\n                    }\r\n                    return string.Format(\"audio{0}_{1}.wav\", audio.Id, audio.AccessHash);\r\n                }\r\n            }\r\n\r\n            var decryptedMediaDocument = dataContext as TLDecryptedMessageMediaDocument;\r\n            if (decryptedMediaDocument != null)\r\n            {\r\n                var file = decryptedMediaDocument.File as TLEncryptedFile;\r\n                if (file != null)\r\n                {\r\n                    return string.Format(\"audio{0}_{1}.wav\", file.Id, file.AccessHash);\r\n                }\r\n            }\r\n\r\n            var decryptedMediaAudio = dataContext as TLDecryptedMessageMediaAudio;\r\n            if (decryptedMediaAudio != null)\r\n            {\r\n                var file = decryptedMediaAudio.File as TLEncryptedFile;\r\n                if (file != null)\r\n                {\r\n                    return string.Format(\"audio{0}_{1}.wav\", file.Id, file.AccessHash);\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/MessageStatusControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.MessageStatusControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    FlowDirection=\"LeftToRight\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Viewbox x:Name=\"ContentPanel\">\r\n        <Grid>\r\n            <Grid x:Name=\"Clock\" HorizontalAlignment=\"Right\" Visibility=\"{Binding TopMessage.Status, Converter={StaticResource StringEqualsToVisibilityConverter}, ConverterParameter=Sending, FallbackValue=Collapsed}\">\r\n                <Ellipse Margin=\"0,2,0,-2\" StrokeThickness=\"2\" Width=\"22\" Height=\"22\" Stroke=\"{Binding MuteIconBackground}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\"/>\r\n                <Polyline Margin=\"0,2,0,-2\" Points=\"11.5,4 11.5,11.5 16,11.5\" Stroke=\"{Binding MuteIconBackground}\" StrokeThickness=\"2\"/>\r\n            </Grid>\r\n            <Grid HorizontalAlignment=\"Right\" Visibility=\"{Binding TopMessage.Status, Converter={StaticResource StringEqualsToVisibilityConverter}, ConverterParameter=Read, FallbackValue=Collapsed}\">\r\n                <Polyline Points=\"2,12 9,19 21,6 23,8 9,23 0,14\" Fill=\"{Binding MuteIconBackground}\" Margin=\"7,0,0,0\">\r\n                    <Polyline.RenderTransform>\r\n                        <TranslateTransform X=\"-7\"/>\r\n                    </Polyline.RenderTransform>\r\n                </Polyline>\r\n                <Polyline VerticalAlignment=\"Stretch\" Points=\"0,21 14,6 16,8 2,23\" Fill=\"{Binding MuteIconBackground}\" HorizontalAlignment=\"Right\">\r\n                    <Polyline.RenderTransform>\r\n                        <TranslateTransform X=\"0\"/>\r\n                    </Polyline.RenderTransform>\r\n                </Polyline>\r\n            </Grid>\r\n            <Polyline HorizontalAlignment=\"Right\" Visibility=\"{Binding TopMessage.Status, Converter={StaticResource StringEqualsToVisibilityConverter}, ConverterParameter='Confirmed', FallbackValue=Collapsed}\" Points=\"2,12 9,19 21,6 23,8 9,23 0,14\" Fill=\"{Binding MuteIconBackground}\">\r\n                <Polyline.RenderTransform>\r\n                    <TranslateTransform X=\"0\"/>\r\n                </Polyline.RenderTransform>\r\n            </Polyline>\r\n        </Grid>\r\n    </Viewbox>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Controls/MessageStatusControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class MessageStatusControl\r\n    {\r\n        public MessageStatusControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/PieSlice.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n\r\n    public class PieSlice : Path\r\n    {\r\n        private bool m_HasLoaded = false;\r\n        public PieSlice()\r\n        {\r\n            Loaded += (s, e) =>\r\n            {\r\n                m_HasLoaded = true;\r\n                UpdatePath();\r\n            };\r\n        }\r\n\r\n        // StartAngle\r\n        public static readonly DependencyProperty StartAngleProperty\r\n            = DependencyProperty.Register(\"StartAngle\", typeof(double), typeof(PieSlice),\r\n            new PropertyMetadata(DependencyProperty.UnsetValue, (s, e) => { Changed(s as PieSlice); }));\r\n        public double StartAngle\r\n        {\r\n            get { return (double)GetValue(StartAngleProperty); }\r\n            set { SetValue(StartAngleProperty, value); }\r\n        }\r\n\r\n        // Angle\r\n        public static readonly DependencyProperty AngleProperty\r\n            = DependencyProperty.Register(\"Angle\", typeof(double), typeof(PieSlice),\r\n            new PropertyMetadata(DependencyProperty.UnsetValue, (s, e) => { Changed(s as PieSlice); }));\r\n        public double Angle\r\n        {\r\n            get { return (double)GetValue(AngleProperty); }\r\n            set { SetValue(AngleProperty, value); }\r\n        }\r\n\r\n        // Radius\r\n        public static readonly DependencyProperty RadiusProperty\r\n            = DependencyProperty.Register(\"Radius\", typeof(double), typeof(PieSlice),\r\n            new PropertyMetadata(DependencyProperty.UnsetValue, (s, e) => { Changed(s as PieSlice); }));\r\n        public double Radius\r\n        {\r\n            get { return (double)GetValue(RadiusProperty); }\r\n            set { SetValue(RadiusProperty, value); }\r\n        }\r\n\r\n        private static void Changed(PieSlice pieSlice)\r\n        {\r\n            if (pieSlice.m_HasLoaded)\r\n                pieSlice.UpdatePath();\r\n        }\r\n\r\n        public void UpdatePath()\r\n        {\r\n            // ensure variables\r\n            if (GetValue(StartAngleProperty) == DependencyProperty.UnsetValue)\r\n                throw new ArgumentNullException(\"Start Angle is required\");\r\n            if (GetValue(RadiusProperty) == DependencyProperty.UnsetValue)\r\n                throw new ArgumentNullException(\"Radius is required\");\r\n            if (GetValue(AngleProperty) == DependencyProperty.UnsetValue)\r\n                throw new ArgumentNullException(\"Angle is required\");\r\n\r\n            Width = Height = 2 * (Radius + StrokeThickness);\r\n            var _EndAngle = StartAngle + Angle;\r\n\r\n            // path container\r\n            var _FigureP = new Point(Radius, Radius);\r\n            var _Figure = new PathFigure\r\n            {\r\n                StartPoint = _FigureP,\r\n                IsClosed = true,\r\n            };\r\n\r\n            //  start angle line\r\n            var _LineX = Radius + Math.Sin(StartAngle * Math.PI / 180) * Radius;\r\n            var _LineY = Radius - Math.Cos(StartAngle * Math.PI / 180) * Radius;\r\n            var _LineP = new Point(_LineX, _LineY);\r\n            var _Line = new LineSegment { Point = _LineP };\r\n            _Figure.Segments.Add(_Line);\r\n\r\n            // outer arc\r\n            var _ArcX = Radius + Math.Sin(_EndAngle * Math.PI / 180) * Radius;\r\n            var _ArcY = Radius - Math.Cos(_EndAngle * Math.PI / 180) * Radius;\r\n            var _ArcS = new Size(Radius, Radius);\r\n            var _ArcP = new Point(_ArcX, _ArcY);\r\n            var _Arc = new ArcSegment\r\n            {\r\n                IsLargeArc = Angle >= 180.0,\r\n                Point = _ArcP,\r\n                Size = _ArcS,\r\n                SweepDirection = SweepDirection.Clockwise,\r\n            };\r\n            _Figure.Segments.Add(_Arc);\r\n\r\n            // finalé\r\n            Data = new PathGeometry { Figures = { _Figure } };\r\n            InvalidateArrange();\r\n        }\r\n\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/SecretPhotoPlaceholder.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.SecretPhotoPlaceholder\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"32\" d:DesignWidth=\"32\">\r\n    \r\n    <UserControl.Resources>\r\n        <Storyboard x:Name=\"TimerStoryboard\" Completed=\"TimerStoryboard_OnCompleted\">\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"GasIcon\" Storyboard.TargetProperty=\"Visibility\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n            </ObjectAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"TimerProgress\" Storyboard.TargetProperty=\"Visibility\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n            </ObjectAnimationUsingKeyFrames>\r\n            <DoubleAnimation x:Name=\"TimerProgressAnimation\" Storyboard.TargetName=\"TimerProgress\" Storyboard.TargetProperty=\"Angle\" From=\"359\" To=\"0\" Duration=\"0:0:30.0\" />\r\n        </Storyboard>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" Tap=\"LayoutRoot_OnTap\">\r\n        <Border Background=\"#77000000\" Width=\"64\" Height=\"64\" CornerRadius=\"32\"/>\r\n        \r\n        <Grid x:Name=\"Icons\">\r\n            <Image x:Name=\"GasIcon\" Width=\"48\" Height=\"48\" Source=\"/Images/Dialogs/chat.gas-WXGA.png\" Stretch=\"UniformToFill\"/>\r\n            <Image x:Name=\"CheckIcon\" Width=\"48\" Height=\"48\" Source=\"/Images/Dialogs/chat.check-WXGA.png\" Stretch=\"UniformToFill\" Visibility=\"Collapsed\"/>\r\n            <controls:PieSlice CacheMode=\"BitmapCache\" x:Name=\"TimerProgress\" RenderTransformOrigin=\"0.5 0.5\" Visibility=\"Collapsed\" Radius=\"28\" StartAngle=\"0\" Angle=\"359\" Fill=\"#FFFFFFFF\">\r\n                <controls:PieSlice.RenderTransform>\r\n                    <CompositeTransform ScaleX=\"-1\" TranslateX=\"-1\" TranslateY=\"1\"/>\r\n                </controls:PieSlice.RenderTransform>\r\n            </controls:PieSlice>\r\n        </Grid>\r\n\r\n        <controls:Progress x:Name=\"Progress\" BackgroundBrush=\"Transparent\" CancelVisibility=\"Visible\" IsHitTestVisible=\"False\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Controls/SecretPhotoPlaceholder.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Threading;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class SecretPhotoPlaceholder\r\n    {\r\n        public static readonly DependencyProperty DownloadingProgressProperty = DependencyProperty.Register(\r\n            \"DownloadingProgress\", typeof(double), typeof(SecretPhotoPlaceholder), new PropertyMetadata(default(double), OnProgressChanged));\r\n\r\n        public double DownloadingProgress\r\n        {\r\n            get { return (double) GetValue(DownloadingProgressProperty); }\r\n            set { SetValue(DownloadingProgressProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty UploadingProgressProperty = DependencyProperty.Register(\r\n            \"UploadingProgress\", typeof(double), typeof(SecretPhotoPlaceholder), new PropertyMetadata(default(double), OnProgressChanged));\r\n\r\n        private static void OnProgressChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var secretPhotoPlaceholder = d as SecretPhotoPlaceholder;\r\n            if (secretPhotoPlaceholder != null)\r\n            {\r\n                var newValue = (double)e.NewValue;\r\n\r\n                System.Diagnostics.Debug.WriteLine(\"  progress=\" + newValue);\r\n\r\n                secretPhotoPlaceholder.Progress.Value = newValue;\r\n\r\n                if (newValue >= 1.0)\r\n                {\r\n                    secretPhotoPlaceholder.Progress.Completed += secretPhotoPlaceholder.OnProgressCompleted;\r\n                }\r\n                else if (newValue > 0.0 && newValue < 1.0)\r\n                {\r\n                    secretPhotoPlaceholder.Icons.Visibility = Visibility.Collapsed;\r\n                }\r\n                else\r\n                {\r\n                    secretPhotoPlaceholder.Icons.Visibility = Visibility.Visible;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnProgressCompleted(object sender, System.EventArgs e)\r\n        {\r\n            Progress.Completed -= OnProgressCompleted;\r\n            \r\n            Icons.Visibility = Visibility.Visible;\r\n        }\r\n\r\n        public double UploadingProgress\r\n        {\r\n            get { return (double) GetValue(UploadingProgressProperty); }\r\n            set { SetValue(UploadingProgressProperty, value); }\r\n        }\r\n\r\n        private bool _showHint = true;\r\n\r\n        public bool ShowHint\r\n        {\r\n            get { return _showHint; }\r\n            set { _showHint = value; }\r\n        }\r\n\r\n        private const double OpenDelaySeconds = 0.15;\r\n\r\n        public static readonly DependencyProperty TTLParamsProperty = DependencyProperty.Register(\r\n            \"TTLParams\", typeof (TTLParams), typeof (SecretPhotoPlaceholder), new PropertyMetadata(default(TTLParams), OnTTLParamsChanged));\r\n\r\n        public TTLParams TTLParams\r\n        {\r\n            get { return (TTLParams) GetValue(TTLParamsProperty); }\r\n            set { SetValue(TTLParamsProperty, value); }\r\n        }\r\n\r\n        private static void OnTTLParamsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var secretPhotoPlaceholder = (SecretPhotoPlaceholder)d;\r\n            var oldTTLParams = e.OldValue as TTLParams;\r\n            var newTTLParams = e.NewValue as TTLParams;\r\n\r\n            if (newTTLParams != null)\r\n            {\r\n                if (newTTLParams.IsStarted)\r\n                {\r\n                    if (newTTLParams.Out)\r\n                    {\r\n                        secretPhotoPlaceholder.GasIcon.Visibility = Visibility.Collapsed;\r\n                        secretPhotoPlaceholder.CheckIcon.Visibility = Visibility.Visible;\r\n\r\n                        return;\r\n                    }\r\n\r\n                    var progressAnimation = secretPhotoPlaceholder.TimerProgressAnimation;\r\n                    var elapsed = (DateTime.Now - newTTLParams.StartTime).TotalSeconds;\r\n\r\n                    var remaining = newTTLParams.Total - elapsed;\r\n                    if (remaining > 0)\r\n                    {\r\n                        progressAnimation.From = remaining / newTTLParams.Total * 359.0;\r\n                        progressAnimation.Duration = TimeSpan.FromSeconds(remaining);\r\n\r\n                        secretPhotoPlaceholder.GasIcon.Visibility = Visibility.Collapsed;\r\n                        secretPhotoPlaceholder.TimerProgress.Visibility = Visibility.Visible;\r\n                        secretPhotoPlaceholder.TimerStoryboard.Begin();\r\n                    }\r\n                    else\r\n                    {\r\n                        secretPhotoPlaceholder.GasIcon.Visibility = Visibility.Visible;\r\n                        secretPhotoPlaceholder.CheckIcon.Visibility = Visibility.Collapsed;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    secretPhotoPlaceholder.GasIcon.Visibility = Visibility.Visible;\r\n                    secretPhotoPlaceholder.CheckIcon.Visibility = Visibility.Collapsed;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                secretPhotoPlaceholder.GasIcon.Visibility = Visibility.Visible;\r\n                secretPhotoPlaceholder.CheckIcon.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public SecretPhotoPlaceholder()\r\n        {\r\n            InitializeComponent();\r\n            _timer = new DispatcherTimer();\r\n            _timer.Interval = TimeSpan.FromSeconds(0.03);\r\n            _timer.Tick += OnTimerTick;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                //if (TimerStoryboard.GetCurrentState() == ClockState.Active)\r\n                //{\r\n                //    var elapsed = (DateTime.Now - TTLParams.StartTime).TotalSeconds;\r\n\r\n                //    var remaining = TTLParams.Total - elapsed;\r\n                //    if (TimerStoryboard.Duration.TimeSpan.TotalSeconds > remaining)\r\n                //    {\r\n                //        TimerStoryboard.Seek(TimeSpan.FromSeconds(TimerStoryboard.Duration.TimeSpan.TotalSeconds - remaining));\r\n                //    }\r\n                //    else\r\n                //    {\r\n                //        TimerStoryboard.SkipToFill();\r\n                //    }\r\n                //}\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                _timer.Stop();\r\n                //TimerStoryboard.Stop();\r\n            };\r\n        }\r\n\r\n        public event EventHandler StartTimer;\r\n\r\n        protected virtual void RaiseStartTimer()\r\n        {\r\n            var handler = StartTimer;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void OnTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            if (_leftButtonDownTime.HasValue)\r\n            {\r\n                if ((DateTime.Now - _leftButtonDownTime.Value).TotalSeconds > OpenDelaySeconds)\r\n                {\r\n                    _timer.Stop();\r\n                    _leftButtonDownTime = null;\r\n\r\n                    //StartTimerAnimation();\r\n                    RaiseStartTimer();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                _timer.Stop();\r\n            }\r\n        }\r\n\r\n        //private void StartTimerAnimation()\r\n        //{\r\n            \r\n        //}\r\n\r\n        public event EventHandler Elapsed;\r\n\r\n        protected virtual void RaiseElapsed()\r\n        {\r\n            var handler = Elapsed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void TimerStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            RaiseElapsed();\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.2), () =>\r\n            {\r\n                GasIcon.Visibility = Visibility.Visible;\r\n                CheckIcon.Visibility = Visibility.Collapsed;\r\n            });\r\n        }\r\n\r\n        private DateTime? _leftButtonDownTime;\r\n\r\n        private readonly DispatcherTimer _timer;\r\n\r\n        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)\r\n        {\r\n            _leftButtonDownTime = DateTime.Now;\r\n            _timer.Start();\r\n\r\n            base.OnMouseLeftButtonDown(e);\r\n        }\r\n\r\n        protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)\r\n        {\r\n            if (ShowHint && _leftButtonDownTime.HasValue && (DateTime.Now - _leftButtonDownTime.Value).TotalSeconds < OpenDelaySeconds)\r\n            {\r\n                MessageBox.Show(AppResources.TapAndHoldToView);\r\n            }\r\n            base.OnMouseLeftButtonUp(e);\r\n        }\r\n\r\n        protected override void OnMouseLeave(MouseEventArgs e)\r\n        {\r\n            _leftButtonDownTime = null;\r\n\r\n            base.OnMouseLeave(e);\r\n        }\r\n\r\n        protected override void OnMouseMove(MouseEventArgs e)\r\n        {\r\n            _leftButtonDownTime = null;\r\n\r\n            base.OnMouseMove(e);\r\n        }\r\n\r\n        public event EventHandler CancelUploading;\r\n\r\n        protected virtual void RaiseCancelUploading()\r\n        {\r\n            var handler = CancelUploading;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler CancelDownloading;\r\n\r\n        protected virtual void RaiseCancelDownloading()\r\n        {\r\n            var handler = CancelDownloading;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void LayoutRoot_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (UploadingProgress > 0.0 && UploadingProgress < 1.0)\r\n            {\r\n                e.Handled = true;\r\n                RaiseCancelUploading();\r\n            }\r\n            else if (DownloadingProgress > 0.0 && DownloadingProgress < 1.0)\r\n            {\r\n                e.Handled = true;\r\n                RaiseCancelDownloading();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/StickerSetControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.StickerSetControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"MainItemGrid\" Margin=\"24,6,24,6\" Background=\"Transparent\">\r\n        <Grid.ColumnDefinitions>\r\n            <ColumnDefinition Width=\"64\"/>\r\n            <ColumnDefinition Width=\"*\"/>\r\n        </Grid.ColumnDefinitions>\r\n        <Border Width=\"64\" Height=\"64\">\r\n            <Grid>\r\n                <Image CacheMode=\"BitmapCache\" Source=\"{Binding Stickers[0].Self, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=64}\"/>\r\n            </Grid>\r\n        </Border>\r\n        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <TextBlock Grid.Row=\"0\" Margin=\"14,-6,0,0\" Text=\"{Binding Title}\" MaxHeight=\"42.56\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding Converter={StaticResource StickerSetToCountStringConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Controls/StickerSetControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class StickerSetControl\r\n    {\r\n        public StickerSetControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        ~StickerSetControl()\r\n        {\r\n            \r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/UnreadCounter.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.UnreadCounter\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n        <Grid.ColumnDefinitions>\r\n            <ColumnDefinition Width=\"Auto\"/>\r\n            <ColumnDefinition Width=\"*\"/>\r\n            <ColumnDefinition Width=\"Auto\"/>\r\n        </Grid.ColumnDefinitions>\r\n        <Border Background=\"{StaticResource PhoneAccentBrush}\" Width=\"13\" CornerRadius=\"13,0,0,13\"/>\r\n        <Border Grid.Column=\"1\" Background=\"{StaticResource PhoneAccentBrush}\" Margin=\"-1,0\"/>\r\n        <Border Grid.Column=\"2\" Background=\"{StaticResource PhoneAccentBrush}\" Width=\"13\" CornerRadius=\"0,13,13,0\"/>\r\n        <TextBlock Grid.Column=\"0\" HorizontalAlignment=\"Center\" Margin=\"7,0,7,0\" Text=\"1\" x:Name=\"CounterText\" Grid.ColumnSpan=\"3\" TextAlignment=\"Center\" Height=\"26\">\r\n            <TextBlock.RenderTransform>\r\n                <TranslateTransform X=\"-1\" Y=\"-2\"/>\r\n            </TextBlock.RenderTransform>\r\n        </TextBlock>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Controls/UnreadCounter.xaml.cs",
    "content": "﻿using System.Globalization;\r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class UnreadCounter\r\n    {\r\n        public static readonly DependencyProperty CounterProperty = DependencyProperty.Register(\r\n            \"Counter\", typeof (int), typeof (UnreadCounter), new PropertyMetadata(OnCounterChanged));\r\n\r\n        private static void OnCounterChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var unreadCounter = d as UnreadCounter;\r\n            if (unreadCounter != null)\r\n            {\r\n                var counter = (int) e.NewValue;\r\n\r\n                unreadCounter.Visibility = counter <= 0 ? Visibility.Collapsed : Visibility.Visible;\r\n                if (counter < 1000)\r\n                {\r\n                    unreadCounter.CounterText.Text = counter.ToString(CultureInfo.InvariantCulture);\r\n                }\r\n                else\r\n                {\r\n\r\n                    unreadCounter.CounterText.Text = counter / 1000 + \"K\";\r\n                }\r\n            }\r\n        }\r\n\r\n        public int Counter\r\n        {\r\n            get { return (int) GetValue(CounterProperty); }\r\n            set { SetValue(CounterProperty, value); }\r\n        }\r\n\r\n        public UnreadCounter()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Visibility = Visibility.Collapsed;\r\n            CounterText.Text = null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Controls/UserTileControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.UserTileControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"MainItemGrid\" Margin=\"0,0,0,0\" Width=\"104\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Grid Margin=\"0,12,0,12\" Grid.Row=\"0\" Height=\"62\" Width=\"62\">\r\n            <Border Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n            <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n            <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n        </Grid>\r\n        <TextBlock Grid.Row=\"1\" Text=\"{Binding ShortName}\" Height=\"27\" Margin=\"3,0\" LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" TextTrimming=\"WordEllipsis\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Controls/UserTileControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class UserTileControl\r\n    {\r\n        public UserTileControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Debug/DebugView.xaml",
    "content": "﻿<UserControl\r\n    x:Class=\"TelegramClient.Views.DebugView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    mc:Ignorable=\"d\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    x:Name=\"Self\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0\">\r\n            <ItemsControl x:Name=\"Items\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock TextWrapping=\"Wrap\" Text=\"{Binding}\" FontSize=\"14\" FontFamily=\"Curier new\"/>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer>\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n            </ItemsControl>\r\n        </Grid>\r\n        <StackPanel Orientation=\"Horizontal\" Grid.Row=\"2\">\r\n            <Button Click=\"ButtonBase_OnClick\" Content=\"send\"/>\r\n            <Button Click=\"ButtonClear_OnClick\" Content=\"clear\"/>\r\n            <Button Content=\"^\" Click=\"ButtonUp_OnClick\"/>\r\n            <Button Content=\"V\" Click=\"ButtonDown_OnClick\"/>\r\n            <CheckBox Content=\"Enabled\" IsChecked=\"{Binding IsDebugEnabled, Mode=TwoWay}\"/>\r\n        </StackPanel>\r\n    </Grid>\r\n\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Debug/DebugView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing TelegramClient.ViewModels;\r\n\r\nnamespace TelegramClient.Views\r\n{\r\n    public partial class DebugView\r\n    {\r\n        public DebugView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ((DebugViewModel)DataContext).Send();\r\n        }\r\n\r\n        private void ButtonClear_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ((DebugViewModel)DataContext).Clear();\r\n        }\r\n\r\n        private void ButtonDown_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            //ScrollViewer.ScrollToVerticalOffset(ScrollViewer.ScrollableHeight);\r\n        }\r\n\r\n        private void ButtonUp_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n           // ScrollViewer.ScrollToVerticalOffset(0.0);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Debug/LongPollView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Debug.LongPollView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    x:Name=\"Self\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <ItemsControl ItemsSource=\"{Binding MTProtoService.History}\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock TextWrapping=\"Wrap\" Text=\"{Binding}\"/>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer>\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n            </ItemsControl>\r\n        </Grid>\r\n        <!--<StackPanel Orientation=\"Horizontal\" Grid.Row=\"2\">\r\n            <Button Click=\"ButtonClear_OnClick\" Content=\"clear\"/>\r\n            <Button x:Name=\"StartListening\" Content=\"listening\"/>\r\n            <CheckBox Content=\"Enabled\" IsChecked=\"{Binding IsLongPollDebugEnabled, Mode=TwoWay}\"/>\r\n        </StackPanel>-->\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Debug/LongPollView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing TelegramClient.ViewModels.Debug;\r\n\r\nnamespace TelegramClient.Views.Debug\r\n{\r\n    public partial class LongPollView\r\n    {\r\n        public LongPollView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void ButtonClear_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            //((LongPollViewModel)DataContext).Clear();\r\n        }\r\n\r\n        //private void ButtonUp_OnClick(object sender, RoutedEventArgs e)\r\n        //{\r\n            \r\n        //}\r\n\r\n        private void ButtonDown_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            //ScrollViewer.ScrollToVerticalOffset(ScrollViewer.ScrollableHeight);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Debug/PerformanceView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Debug.PerformanceView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\"\r\n    x:Name=\"Self\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <ItemsControl x:Name=\"Items\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock TextWrapping=\"Wrap\" Text=\"{Binding}\"/>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer>\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n            </ItemsControl>\r\n        </Grid>\r\n        <StackPanel Orientation=\"Horizontal\" Grid.Row=\"2\">\r\n\r\n            <Button x:Name=\"Clear\" Content=\"clear\"/>\r\n            <CheckBox Content=\"Enabled\" IsChecked=\"{Binding IsDebugEnabled, Mode=TwoWay}\"/>\r\n        </StackPanel>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Debug/PerformanceView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Debug\r\n{\r\n    public partial class PerformanceView : UserControl\r\n    {\r\n        public PerformanceView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/DialogDetailsView.xaml",
    "content": "﻿<phone:PhoneApplicationPage\r\n    x:Class=\"TelegramClient.Views.DialogDetailsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,17,0,28\">\r\n            <TextBlock Text=\"TELEGRAM\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"*\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <ItemsControl x:Name=\"Items\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Text=\"{Binding Message}\" TextWrapping=\"Wrap\"/>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n            </ItemsControl>\r\n            <Grid Grid.Row=\"1\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <TextBox x:Name=\"Text\"/>\r\n                <Button Grid.Column=\"1\" x:Name=\"Send\" Content=\"Send\"/>\r\n            </Grid>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</phone:PhoneApplicationPage>"
  },
  {
    "path": "TelegramClient/Views/DialogDetailsView.xaml.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views\r\n{\r\n    public partial class DialogDetailsView : PhoneApplicationPage\r\n    {\r\n        public DialogDetailsView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/ChooseDialogView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Dialogs.ChooseDialogView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:controls2=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Main\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    BackKeyPress=\"ChooseDialogView_OnBackKeyPress\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls2:TelegramTransitionService.NavigationInTransition>\r\n        <controls2:TelegramNavigationInTransition EndTransition=\"NavigationTransition_OnEndTransition\">\r\n            <controls2:TelegramNavigationInTransition.Backward>\r\n                <controls2:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls2:TelegramNavigationInTransition.Backward>\r\n            <controls2:TelegramNavigationInTransition.Forward>\r\n                <controls2:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls2:TelegramNavigationInTransition.Forward>\r\n        </controls2:TelegramNavigationInTransition>\r\n    </controls2:TelegramTransitionService.NavigationInTransition>\r\n    <controls2:TelegramTransitionService.NavigationOutTransition>\r\n        <controls2:TelegramNavigationOutTransition>\r\n            <controls2:TelegramNavigationOutTransition.Backward>\r\n                <controls2:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls2:TelegramNavigationOutTransition.Backward>\r\n        </controls2:TelegramNavigationOutTransition>\r\n    </controls2:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"SavedMessagesTemplate\">\r\n            <Grid x:Name=\"MainItemGrid\" Margin=\"6,24,20,0\" Height=\"72\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\">\r\n                <Grid.RenderTransform>\r\n                    <CompositeTransform/>\r\n                </Grid.RenderTransform>\r\n\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Object=\"{Binding With}\"\r\n                        Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                <Grid Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"3,3,0,0\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n\r\n                    <Grid Grid.Column=\"1\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <TextBlock\r\n                                navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                Margin=\"14,-2,0,-1\" FontSize=\"27\" MaxHeight=\"36\"\r\n                                Text=\"{Binding With, Converter={StaticResource DialogCaptionConverter}}\" \r\n                                Foreground=\"{Binding ForegroundBrush}\"\r\n                                Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <Grid Grid.Row=\"1\" Grid.Column=\"1\" VerticalAlignment=\"Top\" Margin=\"18,3,0,0\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n\r\n                    <TextBlock Grid.Column=\"2\"\r\n                        Margin=\"0\"\r\n                        Text=\"{Binding Resources.ForwardHereToSave, Source={StaticResource Strings}}\"\r\n                        Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                        FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                        FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                        TextWrapping=\"NoWrap\"\r\n                        TextTrimming=\"WordEllipsis\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n        \r\n        <DataTemplate x:Key=\"DialogTemplate\">\r\n            <Grid x:Name=\"MainItemGrid\" Margin=\"6,24,20,0\" Height=\"72\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\">\r\n                <Grid.RenderTransform>\r\n                    <CompositeTransform/>\r\n                </Grid.RenderTransform>\r\n\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Object=\"{Binding With}\"\r\n                        Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                <Grid Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"3,3,0,0\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n\r\n                    <Image Width=\"19\" Height=\"19\"\r\n                            Grid.Column=\"0\" \r\n                            Visibility=\"{Binding EncryptedChatVisibility}\"\r\n                            HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                            Margin=\"12,3,-6,5\"\r\n                            Source=\"/Images/W10M/ic_secretchat_2x.png\"/>\r\n\r\n                    <Grid Grid.Column=\"1\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <TextBlock\r\n                                navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                Margin=\"14,-2,0,-1\" FontSize=\"27\" MaxHeight=\"36\"\r\n                                Text=\"{Binding With, Converter={StaticResource DialogCaptionConverter}}\" \r\n                                Foreground=\"{Binding ForegroundBrush}\"\r\n                                Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n\r\n                        <Image \r\n                                Width=\"19\" Height=\"19\"\r\n                                Grid.Column=\"1\" \r\n                                Visibility=\"{Binding VerifiedVisibility}\"\r\n                                HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                                Margin=\"6,0,0,5\"\r\n                                Source=\"/Images/W10M/ic_verification_2x.png\" Stretch=\"UniformToFill\"/>\r\n                    </Grid>\r\n\r\n                    <controls1:MessageStatusControl Grid.Column=\"2\"\r\n                            Visibility=\"{Binding Self, Converter={StaticResource DialogToMessageStatusVisibilityConverter}, FallbackValue=Collapsed}\" \r\n                            VerticalAlignment=\"Bottom\" Height=\"18\" Margin=\"6,1,0,6\"/>\r\n\r\n                    <TextBlock Grid.Column=\"3\" Margin=\"6,0,0,1\" VerticalAlignment=\"Bottom\" FontSize=\"18\" Text=\"{Binding Self, Converter={StaticResource DraftDialogDateTimeConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n\r\n                <Grid Grid.Row=\"1\" Grid.Column=\"1\" VerticalAlignment=\"Top\" Margin=\"18,3,0,0\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n\r\n                    <TextBlock Grid.Column=\"0\"\r\n                                Margin=\"0\"\r\n                                MaxWidth=\"150\"\r\n                                Text=\"{Binding Resources.Draft, Source={StaticResource Strings}, StringFormat='\\{0\\}: '}\"\r\n                                Foreground=\"{StaticResource PhoneAccentBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                Visibility=\"{Binding Self, Converter={StaticResource DraftToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n\r\n                    <TextBlock Grid.Column=\"1\"\r\n                                Margin=\"0\"\r\n                                MaxWidth=\"150\" TextTrimming=\"WordEllipsis\"\r\n                                Text=\"{Binding Self, Converter={StaticResource DialogMessageFromConverter}}\"\r\n                                Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                Visibility=\"{Binding Self, Converter={StaticResource ShowFromVisibilityConverter}}\"/>\r\n\r\n                    <TextBlock Grid.Column=\"2\"\r\n                                Margin=\"0\"\r\n                                Text=\"{Binding Self, Converter={StaticResource DialogToBriefInfo}}\"\r\n                                Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                TextWrapping=\"NoWrap\"\r\n                                TextTrimming=\"WordEllipsis\"/>\r\n\r\n                    <Border Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Margin=\"0,0,0,-6\" Background=\"{StaticResource PhoneBackgroundBrush}\" Visibility=\"{Binding Self.Typing, Converter={StaticResource ExistsToVisibilityConverter}}\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\">\r\n                        <StackPanel Orientation=\"Horizontal\">\r\n                            <controls1:TypingControl Height=\"22\" Typing=\"{Binding Self.Typing}\">\r\n                                <controls1:TypingControl.RenderTransform>\r\n                                    <TranslateTransform Y=\"-2\"/>\r\n                                </controls1:TypingControl.RenderTransform>\r\n                            </controls1:TypingControl>\r\n                            <TextBlock\r\n                                    VerticalAlignment=\"Top\"\r\n                                    Margin=\"6,0,0,0\"\r\n                                    LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                                    Text=\"{Binding Self.Typing}\" TextWrapping=\"NoWrap\"\r\n                                    Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                                    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                    TextTrimming=\"WordEllipsis\"/>\r\n                        </StackPanel>\r\n                    </Border>\r\n\r\n                    <Border Grid.Column=\"3\" Margin=\"6,0,0,0\" VerticalAlignment=\"Top\"\r\n                                Background=\"{Binding Self, Converter={StaticResource MessageForeground}, FallbackValue={StaticResource TelegramBadgeSubtleBrush}}\"\r\n                                Height=\"28\" MinWidth=\"28\" CornerRadius=\"14\"\r\n                                Visibility=\"{Binding UnreadCount, Converter={StaticResource UnreadCountToVisibilityConverter}}\" >\r\n                        <TextBlock Margin=\"7,-3,7,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n                                Foreground=\"White\" \r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontWeight=\"SemiBold\"\r\n                                FontSize=\"18\"\r\n                                Text=\"{Binding UnreadCount}\" />\r\n                    </Border>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        \r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.SelectChat, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n        \r\n        <Grid Background=\"Transparent\" Grid.Row=\"1\" Margin=\"12,-6,-2,0\">\r\n            <longListSelector:LongListSelector\r\n                x:Name=\"Items\"\r\n                IsFlatList=\"True\"\r\n                toolkit:TiltEffect.SuppressTilt=\"True\"\r\n                Margin=\"0,0,4,0\" \r\n                ItemsSource=\"{Binding FilteredItems}\"\r\n                ItemTemplate=\"{StaticResource DialogTemplate}\"\r\n                Background=\"Transparent\"\r\n                CloseToEndPercent=\"0.4\"\r\n                micro:Message.Attach=\"[Event CloseToEnd] = [Action LoadNextSlice]; [Event StretchingBottom] = [Action LoadNextSlice]\">\r\n                <longListSelector:LongListSelector.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                    </ItemsPanelTemplate>\r\n                </longListSelector:LongListSelector.ItemsPanel>\r\n                <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                    <DataTemplate>\r\n                        <Grid DataContext=\"{Binding DataContext, ElementName=Main}\">\r\n                            <ContentControl \r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                Visibility=\"{Binding CurrentUser, Converter={StaticResource ExistsToVisibilityConverter}}\" \r\n                                Content=\"{Binding CurrentUser}\"\r\n                                ContentTemplate=\"{StaticResource SavedMessagesTemplate}\" />\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListHeaderTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <Grid DataContext=\"{Binding DataContext, ElementName=Main}\">\r\n                            <TextBlock Text=\"{Binding Status}\" Margin=\"6,12\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n            </longListSelector:LongListSelector>\r\n            \r\n            <!--<controls:LazyListBox \r\n                x:Name=\"Items\"\r\n                ItemsSource=\"{Binding FilteredItems}\"\r\n                ItemTemplate=\"{StaticResource DialogTemplate}\"\r\n                IsScrolling=\"{Binding IsScrolling, Mode=TwoWay}\"\r\n                CloseToEndPercent=\"0.4\"\r\n                micro:Message.Attach=\"[Event CloseToEnd] = [Action LoadNextSlice]\"\r\n                Style=\"{StaticResource LazyListBoxStyle}\">\r\n                <controls:LazyListBox.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </controls:LazyListBox.ItemsPanel>\r\n                <i:Interaction.Triggers>\r\n                    <triggers:CompressionTrigger CompressionType=\"Bottom\">\r\n                        <micro:ActionMessage MethodName=\"LoadNextSlice\"/>\r\n                    </triggers:CompressionTrigger>\r\n                </i:Interaction.Triggers>\r\n            </controls:LazyListBox>-->\r\n            \r\n        </Grid>\r\n\r\n        <ContentControl x:Name=\"SearchContentControl\" d:IsHidden=\"True\" Grid.Row=\"0\" Grid.RowSpan=\"3\" Visibility=\"Collapsed\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"/>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n            <ContentControl x:Name=\"AppBarMenuItemsPlaceholder\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\">\r\n                <StackPanel x:Name=\"AppBarMenuItems\"/>\r\n            </ContentControl>\r\n        </Border>\r\n        \r\n        <controls1:TelegramApplicationBar Grid.Row=\"2\"\r\n            x:Name=\"AppBarPanel\" \r\n            VerticalAlignment=\"Bottom\"\r\n            MorePanel=\"{Binding ElementName=MorePanel}\">\r\n            <controls1:TelegramApplicationBar.Buttons>\r\n                <controls1:TelegramAppBarButton\r\n                    x:Name=\"SearchButton\"\r\n                    Grid.Column=\"3\"\r\n                    Tap=\"SearchButton_OnTap\"\r\n                    ImageSource=\"/Images/W10M/ic_search_2x.png\"\r\n                    Text=\"{Binding Resources.Search, Source={StaticResource Strings}}\"/>\r\n            </controls1:TelegramApplicationBar.Buttons>\r\n        </controls1:TelegramApplicationBar>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/ChooseDialogView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Search;\r\nusing TelegramClient.Views.Search;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class ChooseDialogView\r\n    {\r\n        public ChooseDialogViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChooseDialogViewModel; }\r\n        }\r\n\r\n        private readonly ApplicationBarIconButton _searchButton = new ApplicationBarIconButton\r\n        {\r\n            Text = AppResources.Search,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.feature.search.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public ChooseDialogView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _searchButton.Click += (sender, args) =>\r\n            {\r\n                ViewModel.Search();\r\n            };\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) => BuildLocalizedAppBar();\r\n        }\r\n\r\n        //~ChooseDialogView()\r\n        //{\r\n\r\n        //}\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            return;\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n\r\n            ApplicationBar.Buttons.Add(_searchButton);\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var tapedItem = sender as FrameworkElement;\r\n            if (tapedItem == null) return;\r\n\r\n            var dialog = tapedItem.DataContext as TLDialogBase;\r\n            if (dialog == null) return;\r\n\r\n            if (!(tapedItem.RenderTransform is CompositeTransform))\r\n            {\r\n                tapedItem.RenderTransform = new CompositeTransform();\r\n            }\r\n\r\n            var tapedItemContainer = tapedItem.FindParentOfType<ListBoxItem>();\r\n            if (tapedItemContainer != null)\r\n            {\r\n                tapedItemContainer = tapedItemContainer.FindParentOfType<ListBoxItem>();\r\n            }\r\n\r\n            var result = ViewModel.ChooseDialog(dialog);\r\n            if (result)\r\n            {\r\n                ShellView.StartContinuumForwardOutAnimation(tapedItem, tapedItemContainer, false);\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            base.OnNavigatingFrom(e);\r\n\r\n            if (!e.Cancel)\r\n            {\r\n                if (e.NavigationMode == NavigationMode.New\r\n                    && e.Uri.ToString().EndsWith(\"DialogDetailsView.xaml\"))\r\n                {\r\n                    var storyboard = new Storyboard();\r\n\r\n                    var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                    translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                    Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                    Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                    storyboard.Children.Add(translateAnimation);\r\n\r\n                    var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                    opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                    Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                    Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                    storyboard.Children.Add(opacityAnimation);\r\n\r\n                    storyboard.Begin();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void NavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.ForwardInAnimationComplete();\r\n        }\r\n\r\n        private SearchView _searchView;\r\n\r\n        private void SearchButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                MorePanel.Visibility = Visibility.Collapsed;\r\n                AppBarPanel.Visibility = Visibility.Collapsed;\r\n\r\n                if (_searchView == null)\r\n                {\r\n                    var searchViewModel = new SearchViewModel(\r\n                        IoC.Get<ICacheService>(), IoC.Get<ICommonErrorHandler>(),\r\n                        IoC.Get<IStateService>(), IoC.Get<INavigationService>(),\r\n                        IoC.Get<IMTProtoService>(), IoC.Get<ITelegramEventAggregator>())\r\n                    {\r\n                        SuppressMessagesSearch = true,\r\n                        Watermark = AppResources.Search,\r\n                        Callback = ViewModel.ChooseDialog\r\n                    };\r\n\r\n                    _searchView = new SearchView();\r\n                    _searchView.ClosePivotAction = visibility =>\r\n                    {\r\n                        Items.IsHitTestVisible = visibility == Visibility.Visible;\r\n                        AppBarPanel.Visibility = visibility;\r\n                    };\r\n                    ViewModelBinder.Bind(searchViewModel, _searchView, null);\r\n\r\n                    SearchContentControl.Visibility = Visibility.Visible;\r\n                    SearchContentControl.Content = _searchView;\r\n                }\r\n                else\r\n                {\r\n                    var searchViewModel = _searchView.DataContext as SearchViewModel;\r\n                    if (searchViewModel != null)\r\n                    {\r\n                        searchViewModel.Text = string.Empty;\r\n                        searchViewModel.NotifyOfPropertyChange(() => searchViewModel.Text);\r\n                    }\r\n                    SearchContentControl.Visibility = Visibility.Visible;\r\n                    _searchView.BeginOpenStoryboard();\r\n                }\r\n            });\r\n        }\r\n\r\n        private void ChooseDialogView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            if (_searchView != null && SearchContentControl.Visibility == Visibility.Visible)\r\n            {\r\n                _searchView.BeginCloseStoryboard(() =>\r\n                {\r\n                    Main.Focus();\r\n                    SearchContentControl.Visibility = Visibility.Collapsed;\r\n                });\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/ChooseParticipantsView.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Dialogs.ChooseParticipantsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n\r\n    <navigation:AnimatedBasePage.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"HighlightableUserItemTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" micro:Message.Attach=\"[Event Tap] = [Action UserAction($DataContext)]\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"72\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <views:ConversationTileControl\r\n                            Size=\"72\" Margin=\"0\"\r\n                            Object=\"{Binding}\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"2,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <Grid Grid.Row=\"0\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <controls:HighlightingTextBlock Grid.Column=\"0\"\r\n                                        navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                        HorizontalAlignment=\"Left\"\r\n                                        Margin=\"14,-6,0,0\"\r\n                                        HighlightBrush=\"{StaticResource TelegramAccentBrush}\" \r\n                                        HighlightText=\"{Binding DataContext.Text, ElementName=Self}\"\r\n                                        UseTransliteration=\"True\"\r\n                                        Text=\"{Binding FullName}\"\r\n                                        FontSize=\"27\">\r\n                                    <controls:HighlightingTextBlock.TextBlockStyle>\r\n                                        <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextLargeStyle}\">\r\n                                            <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                            <Setter Property=\"FontSize\" Value=\"27\"/>\r\n                                            <Setter Property=\"MaxHeight\" Value=\"36\"/>\r\n                                        </Style>\r\n                                    </controls:HighlightingTextBlock.TextBlockStyle>\r\n                                </controls:HighlightingTextBlock>\r\n\r\n                                <Image \r\n                                    Width=\"19\" Height=\"19\"\r\n                                    Grid.Column=\"1\" \r\n                                    Visibility=\"{Binding IsVerified, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"\r\n                                    HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                                    Margin=\"6,0,0,5\"\r\n                                    Source=\"/Images/W10M/ic_verification_2x.png\" Stretch=\"UniformToFill\"/>\r\n                            </Grid>\r\n\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </navigation:AnimatedBasePage.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Grid x:Name=\"TitlePanel\" VerticalAlignment=\"Top\" Opacity=\"0.0\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Grid.RenderTransform>\r\n            <Border x:Name=\"Caption\" Height=\"104\" IsHitTestVisible=\"False\"/>\r\n\r\n            <StackPanel Grid.Row=\"0\" Margin=\"3,29,3,0\">\r\n                <controls:WatermarkedTextBox x:Name=\"SearchBox\" Text=\"{Binding Text, Mode=TwoWay}\" Watermark=\"{Binding Resources.Search, Source={StaticResource Strings}}\" Style=\"{StaticResource W10MWatermarkedTextBoxStyle}\">\r\n                    <controls:WatermarkedTextBox.InputScope>\r\n                        <InputScope>\r\n                            <InputScopeName NameValue=\"Search\"/>\r\n                        </InputScope>\r\n                    </controls:WatermarkedTextBox.InputScope>\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </controls:WatermarkedTextBox>\r\n            </StackPanel>\r\n        </Grid>\r\n        \r\n        <Grid Grid.Row=\"1\">\r\n            <longListSelector:LongListSelector \r\n                Margin=\"6,0,0,0\"\r\n                ScrollingStarted=\"LongListSelector_OnScrollingStarted\" \r\n                ItemsSource=\"{Binding Items}\" \r\n                IsFlatList=\"True\" \r\n                ItemTemplate=\"{StaticResource HighlightableUserItemTemplate}\"\r\n                Background=\"Transparent\">\r\n                <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                    <DataTemplate>\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Button Margin=\"-12,0,0,0\" Style=\"{StaticResource ProfileButtonStyle}\" micro:Message.Attach=\"NewGroup\">\r\n                                <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.NewGroup, Source={StaticResource Strings}}\"/>\r\n                            </Button>\r\n                            <Button Grid.Row=\"1\" Margin=\"-12,0,0,0\" Style=\"{StaticResource ProfileButtonStyle}\" micro:Message.Attach=\"NewSecretChat\">\r\n                                <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.NewSecretChat, Source={StaticResource Strings}}\"/>\r\n                            </Button>\r\n                            <Button Grid.Row=\"2\" IsEnabled=\"True\" Visibility=\"Collapsed\" Margin=\"-12,0,0,0\" Style=\"{StaticResource ProfileButtonStyle}\" micro:Message.Attach=\"NewBroadcastList\">\r\n                                <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.NewBroadcastList, Source={StaticResource Strings}}\"/>\r\n                            </Button>\r\n                            <Button Grid.Row=\"3\" IsEnabled=\"True\" Margin=\"-12,0,0,0\" Style=\"{StaticResource ProfileButtonStyle}\" micro:Message.Attach=\"NewChannel\">\r\n                                <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.NewChannel, Source={StaticResource Strings}}\"/>\r\n                            </Button>\r\n\r\n                            <!--<ListBoxItem Grid.Row=\"4\" toolkit:TiltEffect.SuppressTilt=\"False\" DataContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                <ContentControl \r\n                                    HorizontalContentAlignment=\"Stretch\"\r\n                                    Visibility=\"{Binding CurrentUser, Converter={StaticResource ExistsToVisibilityConverter}}\" \r\n                                    Content=\"{Binding CurrentUser}\" >\r\n                                    <ContentControl.ContentTemplate>\r\n                                        <DataTemplate>\r\n                                            <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" micro:Message.Attach=\"[Event Tap] = [Action UserAction($DataContext)]\">\r\n                                                <Grid.ColumnDefinitions>\r\n                                                    <ColumnDefinition Width=\"72\"/>\r\n                                                    <ColumnDefinition Width=\"*\"/>\r\n                                                </Grid.ColumnDefinitions>\r\n                                                <views:ConversationTileControl Size=\"72\" \r\n                                                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                                                        Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                                                        Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                                                        Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                                                <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                                                    <Grid.RowDefinitions>\r\n                                                        <RowDefinition Height=\"Auto\"/>\r\n                                                        <RowDefinition Height=\"Auto\"/>\r\n                                                    </Grid.RowDefinitions>\r\n                                                    <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                                                    <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                                           Text=\"{Binding Resources.ChatWithYourself, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"\r\n                                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                                </Grid>\r\n                                            </Grid>\r\n                                        </DataTemplate>\r\n                                    </ContentControl.ContentTemplate>\r\n                                </ContentControl>\r\n                            </ListBoxItem>-->\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListHeaderTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Margin=\"6,0\" Text=\"{Binding DataContext.Status, ElementName=Self}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n            </longListSelector:LongListSelector>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/ChooseParticipantsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class ChooseParticipantsView : IDisposable\r\n    {\r\n        private readonly IDisposable _keyPressSubscription;\r\n\r\n        private FrameworkElement _lastTapedItem;\r\n\r\n        public ChooseParticipantsViewModel ViewModel\r\n        {\r\n            get { return DataContext as ChooseParticipantsViewModel; }\r\n        }\r\n\r\n        public ChooseParticipantsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            AnimationContext = LayoutRoot;\r\n\r\n            var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                keh => { SearchBox.TextChanged += keh; },\r\n                keh => { SearchBox.TextChanged -= keh; });\r\n\r\n            _keyPressSubscription = keyPressEvents\r\n                .Throttle(TimeSpan.FromSeconds(0.1))\r\n                .ObserveOnDispatcher()\r\n                .Subscribe(e => ViewModel.Search());\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var layoutRoot = new DoubleAnimationUsingKeyFrames();\r\n            layoutRoot.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.1), Value = 0.0 });\r\n            layoutRoot.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.35), Value = 90.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(layoutRoot, LayoutRoot);\r\n            Storyboard.SetTargetProperty(layoutRoot, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationX)\"));\r\n            storyboard.Children.Add(layoutRoot);\r\n\r\n            var searchBox = new DoubleAnimationUsingKeyFrames();\r\n            searchBox.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            searchBox.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = -100.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 3.0 } });\r\n            Storyboard.SetTarget(searchBox, TitlePanel);\r\n            Storyboard.SetTargetProperty(searchBox, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(searchBox);\r\n\r\n            var searchBoxOpacity = new DoubleAnimation\r\n            {\r\n                From = 1.0,\r\n                To = 0.0,\r\n                Duration = TimeSpan.FromSeconds(0.15),\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 3.0 }\r\n            };\r\n            Storyboard.SetTarget(searchBoxOpacity, TitlePanel);\r\n            Storyboard.SetTargetProperty(searchBoxOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(searchBoxOpacity);\r\n\r\n            //Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                storyboard.Begin();\r\n            }//);\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SwivelShowAnimator { RootElement = LayoutRoot };\r\n            }\r\n            else if (animationType == AnimationType.NavigateForwardOut)\r\n            {\r\n                if (toOrFrom != null\r\n                    && toOrFrom.ToString().Contains(\"DialogDetailsView.xaml\"))\r\n                {\r\n                    return null;\r\n\r\n                    return new SlideDownAnimator{ RootElement = LayoutRoot };\r\n                }\r\n\r\n                return new SwivelHideAnimator { RootElement = LayoutRoot };              \r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        protected override void AnimationsComplete(AnimationType animationType)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                var storyboard = new Storyboard();\r\n                var searchBox = new DoubleAnimationUsingKeyFrames();\r\n                searchBox.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -100.0 });\r\n                searchBox.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(searchBox, TitlePanel);\r\n                Storyboard.SetTargetProperty(searchBox, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(searchBox);\r\n\r\n                var searchBoxOpacity = new DoubleAnimation\r\n                {\r\n                    From = 0.0,\r\n                    To = 1.0,\r\n                    Duration = TimeSpan.FromSeconds(0.15),\r\n                    EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 }\r\n                };\r\n                Storyboard.SetTarget(searchBoxOpacity, TitlePanel);\r\n                Storyboard.SetTargetProperty(searchBoxOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(searchBoxOpacity);\r\n\r\n                TitlePanel.Opacity = 0.0;\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    TitlePanel.Opacity = 1.0;\r\n                    storyboard.Begin();\r\n                });\r\n            }\r\n\r\n            base.AnimationsComplete(animationType);\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _keyPressSubscription.Dispose();\r\n        }\r\n\r\n        private void LongListSelector_OnScrollingStarted(object sender, System.EventArgs e)\r\n        {\r\n            var focusElement = FocusManager.GetFocusedElement();\r\n            if (focusElement == SearchBox)\r\n            {\r\n                Self.Focus();\r\n            }\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            _lastTapedItem = sender as FrameworkElement;\r\n\r\n            if (_lastTapedItem != null)\r\n            {\r\n                //foreach (var descendant in _lastTapedItem.GetVisualDescendants().OfType<HighlightingTextBlock>())\r\n                //{\r\n                //    if (GetIsAnimationTarget(descendant))\r\n                //    {\r\n                //        _lastTapedItem = descendant;\r\n                //        break;\r\n                //    }\r\n                //}\r\n\r\n                if (!(_lastTapedItem.RenderTransform is CompositeTransform))\r\n                {\r\n                    _lastTapedItem.RenderTransform = new CompositeTransform();\r\n\r\n                }\r\n\r\n                var tapedItemContainer = _lastTapedItem.FindParentOfType<ListBoxItem>();\r\n                if (tapedItemContainer != null)\r\n                {\r\n                    tapedItemContainer = tapedItemContainer.FindParentOfType<ListBoxItem>();\r\n                }\r\n\r\n                ShellView.StartContinuumForwardOutAnimation(_lastTapedItem, tapedItemContainer);\r\n            }\r\n        }\r\n\r\n\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            base.OnNavigatingFrom(e);\r\n\r\n            if (!e.Cancel)\r\n            {\r\n                if (e.Uri != null\r\n                    && e.Uri.ToString().Contains(\"DialogDetailsView.xaml\"))\r\n                {\r\n                    var storyboard = new Storyboard();\r\n\r\n                    var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                    translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                    Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                    Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                    storyboard.Children.Add(translateAnimation);\r\n\r\n                    var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                    opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                    Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                    Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                    storyboard.Children.Add(opacityAnimation);\r\n\r\n                    storyboard.Begin();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CommandHintsView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.CommandHintsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"Self\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushLight\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushDark\" Color=\"#FF1F1F1F\"/>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\">\r\n        <Grid.Resources>\r\n            <DataTemplate x:Key=\"UsernameHintTemplate\">\r\n                <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                    <Grid Height=\"66\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <views:ConversationTileControl Size=\"42\" LabelFontSize=\"18\" Margin=\"15,0,15,0\" VerticalAlignment=\"Center\"\r\n                            Fill=\"{Binding Bot.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Bot, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Bot.Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"1\" Text=\"{Binding Command, StringFormat='/\\{0\\}'}\" Margin=\"0,0,0,0\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" VerticalAlignment=\"Center\"/>\r\n                        <TextBlock Grid.Column=\"2\" Text=\"{Binding Description, StringFormat=' \\{0\\}'}\" FontSize=\"{Binding DefaultFontSizeSmall, Source={StaticResource ScaledText}}\" Opacity=\"0.6\" Margin=\"0,2,0,0\" VerticalAlignment=\"Center\"/>\r\n                        \r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </Grid.Resources>\r\n        <Grid x:Name=\"UsernameHintsPanel\" Visibility=\"Visible\" CacheMode=\"BitmapCache\">\r\n            <Border x:Name=\"BackgroundBorder\" Background=\"White\"/>\r\n            <Border x:Name=\"Border\" VerticalAlignment=\"Top\" Height=\"2\" Visibility=\"{Binding Hints.Count, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\"/>\r\n            <ItemsControl ItemsSource=\"{Binding Hints}\" ItemTemplate=\"{StaticResource UsernameHintTemplate}\">\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer HorizontalScrollBarVisibility=\"Disabled\" VerticalScrollBarVisibility=\"Auto\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n            </ItemsControl>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CommandHintsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class CommandHintsView\r\n    {\r\n        public CommandHintsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            BackgroundBorder.Background = isLightTheme\r\n                ? (Brush)Resources[\"HintsBackgroundBrushLight\"]\r\n                : (Brush)Resources[\"HintsBackgroundBrushDark\"];\r\n            Border.Background = isLightTheme\r\n                ? (Brush)Resources[\"InputBorderBrushLight\"]\r\n                : (Brush)Resources[\"InputBorderBrushDark\"];\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CommandsControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.CommandsControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <SolidColorBrush x:Key=\"ButtonBackground\" Color=\"#FF474747\"/>\r\n            <SolidColorBrush x:Key=\"ButtonLightBackground\" Color=\"White\"/>\r\n            <SolidColorBrush x:Key=\"ButtonInlineBackground\" Color=\"#59597289\"/>\r\n\r\n            <Style TargetType=\"Button\" x:Key=\"CommandButtonStyle\">\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                <Setter Property=\"FontWeight\" Value=\"Normal\"/>\r\n                <Setter Property=\"FontSize\" Value=\"17.667\"/>\r\n                <Setter Property=\"Padding\" Value=\"0,3,0,3\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"ButtonBase\">\r\n                            <Grid Background=\"Transparent\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Pressed\">\r\n                                            <Storyboard>\r\n                                                <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Border x:Name=\"ButtonBackground\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"0\">\r\n                                    <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <!--<ScrollViewer x:Name=\"ScrollViewer\" VerticalScrollBarVisibility=\"Auto\">\r\n            <StackPanel x:Name=\"ButtonRows\" Margin=\"3,3,3,0\"/>\r\n        </ScrollViewer>-->\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CommandsControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class CommandsControl\r\n    {\r\n        public static readonly DependencyProperty InlineProperty = DependencyProperty.Register(\r\n            \"Inline\", typeof (bool), typeof (CommandsControl), new PropertyMetadata(default(bool)));\r\n\r\n        public bool Inline\r\n        {\r\n            get { return (bool) GetValue(InlineProperty); }\r\n            set { SetValue(InlineProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ReplyMarkupProperty = DependencyProperty.Register(\r\n            \"ReplyMarkup\", typeof (TLReplyKeyboardBase), typeof (CommandsControl), new PropertyMetadata(OnReplyMarkupChanged));\r\n\r\n        public TLReplyKeyboardBase ReplyMarkup\r\n        {\r\n            get { return (TLReplyKeyboardBase)GetValue(ReplyMarkupProperty); }\r\n            set { SetValue(ReplyMarkupProperty, value); }\r\n        }\r\n        private static void OnReplyMarkupChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var commandsControl = (CommandsControl) d;\r\n            commandsControl.UpdateMarkup((TLReplyKeyboardBase) e.NewValue);\r\n        }\r\n\r\n        private void UpdateMarkup(TLReplyKeyboardBase replyKeyboardBase)\r\n        {\r\n            if (replyKeyboardBase == null)\r\n            {\r\n                Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n#if DEBUG\r\n            _debug.Text = replyKeyboardBase.ToString();\r\n#endif\r\n            var inlineMarkup = replyKeyboardBase as TLReplyInlineMarkup;\r\n            if (Inline && inlineMarkup == null)\r\n            {\r\n                Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var replyMarkup = replyKeyboardBase as TLReplyKeyboardMarkup;\r\n            if (!Inline && replyMarkup == null)\r\n            {\r\n                Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var replyKeyboardRows = replyKeyboardBase as IReplyKeyboardRows;\r\n            if (replyKeyboardRows == null)\r\n            {\r\n                Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            if (Inline)\r\n            {\r\n                var inlineButtonMargin = 3.0;\r\n                var inlineButtonHeight = 48.0;    // without margin\r\n\r\n                var buttonRows = new StackPanel { Margin = new Thickness(-3.0) };\r\n                foreach (var buttonRow in replyKeyboardRows.Rows)\r\n                {\r\n                    var grid = new Grid();\r\n\r\n                    for (var i = 0; i < buttonRow.Buttons.Count; i++)\r\n                    {\r\n                        var button = CreateButton(buttonRow.Buttons[i], inlineButtonHeight, new Thickness(inlineButtonMargin), buttonRow.Buttons.Count < 4 ? 6.0 : 0.0, GetMaxTextLength(buttonRow.Buttons.Count));\r\n                        Grid.SetColumn(button, i);\r\n\r\n                        grid.ColumnDefinitions.Add(new ColumnDefinition());\r\n                        grid.Children.Add(button);\r\n                    }\r\n\r\n                    buttonRows.Children.Add(grid);\r\n                }\r\n\r\n                Visibility = Visibility.Visible;\r\n                LayoutRoot.Background = new SolidColorBrush(Colors.Transparent);\r\n                LayoutRoot.Children.Clear();\r\n                LayoutRoot.Children.Add(buttonRows);\r\n#if DEBUG\r\n                LayoutRoot.Children.Add(_debug);\r\n#endif\r\n            }\r\n            else\r\n            {\r\n                var buttonRows = new StackPanel { Margin = new Thickness(3.0, 3.0, 3.0, 0.0) };\r\n                var height = EmojiControl.PortraitOrientationHeight;\r\n                var buttonRowsHeight = height - buttonRows.Margin.Top - buttonRows.Margin.Bottom;\r\n                var buttonMargin = 3.0;\r\n                var buttonHeight = 78.0;    // without margin\r\n                if (!replyMarkup.IsResizable\r\n                    && buttonHeight * replyMarkup.Rows.Count < buttonRowsHeight)\r\n                {\r\n                    buttonHeight = buttonRowsHeight / replyKeyboardRows.Rows.Count - 2 * buttonMargin;\r\n                }\r\n\r\n                foreach (var buttonRow in replyKeyboardRows.Rows)\r\n                {\r\n                    var grid = new Grid();\r\n\r\n                    for (var i = 0; i < buttonRow.Buttons.Count; i++)\r\n                    {\r\n                        var button = CreateButton(buttonRow.Buttons[i], buttonHeight, new Thickness(buttonMargin), buttonRow.Buttons.Count < 4? 6.0 : 0.0, GetMaxTextLength(buttonRow.Buttons.Count));\r\n                        Grid.SetColumn(button, i);\r\n\r\n                        grid.ColumnDefinitions.Add(new ColumnDefinition());\r\n                        grid.Children.Add(button);\r\n                    }\r\n\r\n                    buttonRows.Children.Add(grid);\r\n                }\r\n\r\n                LayoutRoot.MaxHeight = height;\r\n                if (replyMarkup.IsResizable)\r\n                {\r\n                    LayoutRoot.ClearValue(HeightProperty);\r\n                }\r\n                else\r\n                {\r\n                    LayoutRoot.Height = height;\r\n                }\r\n                Visibility = Visibility.Visible;\r\n                var scrollViewer = new ScrollViewer();\r\n                scrollViewer.VerticalScrollBarVisibility = buttonHeight * replyKeyboardRows.Rows.Count > buttonRowsHeight\r\n                    ? ScrollBarVisibility.Auto\r\n                    : ScrollBarVisibility.Disabled;\r\n\r\n                scrollViewer.Content = buttonRows;\r\n                LayoutRoot.Children.Clear();\r\n                LayoutRoot.Children.Add(scrollViewer);\r\n#if DEBUG\r\n                LayoutRoot.Children.Add(_debug);\r\n#endif\r\n            }\r\n        }\r\n\r\n        private int GetMaxTextLength(int columns)\r\n        {\r\n            if (columns == 1)\r\n            {\r\n                return 28;\r\n            }\r\n            else if (columns == 2)\r\n            {\r\n                return 12;\r\n            }\r\n            else if (columns == 3)\r\n            {\r\n                return 7;\r\n            }\r\n\r\n            return 7;\r\n        }\r\n\r\n        private FrameworkElement CreateButton(TLKeyboardButtonBase keyboardButton, double height, Thickness margin, double padding, int maxTextLength)\r\n        {\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            var background = isLightTheme ? (Brush)Resources[\"ButtonLightBackground\"] : (Brush)Resources[\"ButtonBackground\"];\r\n\r\n            var text = keyboardButton.Text.ToString();\r\n            var buttonBuy = keyboardButton as TLKeyboardButtonBuy;\r\n            if (buttonBuy != null)\r\n            {\r\n                var message = DataContext as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    var mediaInvoice = message.Media as TLMessageMediaInvoice;\r\n                    if (mediaInvoice != null)\r\n                    {\r\n                        var receiptMsgId = mediaInvoice.ReceiptMsgId;\r\n                        if (receiptMsgId != null)\r\n                        {\r\n                            text = AppResources.Receipt;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (text.Length > maxTextLength)\r\n            {\r\n                text = text.Substring(0, maxTextLength) + \"...\";\r\n            }\r\n            else\r\n            {\r\n                text = string.Format(\" {0} \", text);\r\n            }\r\n            var textBox = new TelegramRichTextBox { MaxHeight = height, Margin = new Thickness(0.0, 0.0, 0.0, 0.0), Padding = new Thickness(0.0, 0.0, 0.0, 0.0), FontSize = 22, TextWrapping = TextWrapping.NoWrap };\r\n            BrowserNavigationService.SetSuppressParsing(textBox, true);\r\n            textBox.Text = text;\r\n            textBox.Margin = new Thickness(-12.0 + padding, 0.0, -12.0, 0 + padding);\r\n            textBox.FontSize = Inline ? 17.776 : textBox.FontSize;\r\n            textBox.Foreground = Inline ? new SolidColorBrush(Colors.White) : textBox.Foreground; \r\n\r\n            var button = new Button();\r\n            button.Style = (Style)Resources[\"CommandButtonStyle\"];\r\n            button.MaxHeight = height;\r\n            button.Margin = margin;\r\n            button.Background = Inline ? (Brush)Resources[\"ButtonInlineBackground\"] : background;\r\n\r\n            button.Content = textBox;\r\n            button.DataContext = keyboardButton;\r\n            button.Click += OnButtonClick;\r\n\r\n            if (keyboardButton is TLKeyboardButtonUrl)\r\n            {\r\n                var imageSource = isLightTheme && !Inline ? \"/Images/Messages/inline.openweb.light.png\" : \"/Images/Messages/inline.openweb.png\";\r\n\r\n                var grid = new Grid();\r\n                grid.Children.Add(button);\r\n                grid.Children.Add(new Image\r\n                {\r\n                    Width = 11.0,\r\n                    Height = 11.0,\r\n                    Margin = new Thickness(8.0),\r\n                    HorizontalAlignment = HorizontalAlignment.Right,\r\n                    VerticalAlignment = VerticalAlignment.Top,\r\n                    Source = new BitmapImage(new Uri(imageSource, UriKind.Relative))\r\n                });\r\n\r\n                return grid;\r\n            }\r\n\r\n            if (keyboardButton is TLKeyboardButtonSwitchInline)\r\n            {\r\n                var imageSource = isLightTheme && !Inline ? \"/Images/Messages/inline.share.light.png\" : \"/Images/Messages/inline.share.png\";\r\n\r\n                var grid = new Grid();\r\n                grid.Children.Add(button);\r\n                grid.Children.Add(new Image\r\n                {\r\n                    Width = 13.0,\r\n                    Height = 12.0,\r\n                    Margin = new Thickness(8.0),\r\n                    HorizontalAlignment = HorizontalAlignment.Right,\r\n                    VerticalAlignment = VerticalAlignment.Top,\r\n                    Source = new BitmapImage(new Uri(imageSource, UriKind.Relative))\r\n                });\r\n\r\n                return grid;\r\n            }\r\n\r\n            return button;\r\n        }\r\n\r\n        private void OnButtonClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var border = sender as FrameworkElement;\r\n            if (border != null)\r\n            {\r\n                var keyboardButton = border.DataContext as TLKeyboardButtonBase;\r\n                if (keyboardButton != null)\r\n                {\r\n                    RaiseButtonClick(new KeyboardButtonEventArgs { Button = keyboardButton, ReplyMarkup = ReplyMarkup });\r\n                }\r\n            }\r\n        }\r\n\r\n        public event EventHandler<KeyboardButtonEventArgs> ButtonClick;\r\n\r\n        protected virtual void RaiseButtonClick(KeyboardButtonEventArgs e)\r\n        {\r\n            var handler = ButtonClick;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private TextBlock _debug;\r\n\r\n        public CommandsControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n#if DEBUG\r\n            _debug = new TextBlock{ IsHitTestVisible = false };\r\n            LayoutRoot.Children.Add(_debug);\r\n#endif\r\n        }\r\n    }\r\n\r\n    public class KeyboardButtonEventArgs : System.EventArgs\r\n    {\r\n        public TLKeyboardButtonBase Button { get; set; }\r\n\r\n        public TLReplyKeyboardBase ReplyMarkup { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateBroadcastView.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Dialogs.CreateBroadcastView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <navigation:AnimatedBasePage.Resources>\r\n        <ResourceDictionary>\r\n            <Style x:Key=\"WrapLongListSelector\" TargetType=\"longListSelector:LongListSelector\">\r\n                <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate>\r\n                            <longListSelector:TemplatedListBox x:Name=\"TemplatedListBox\" Background=\"{TemplateBinding Background}\">\r\n                                <longListSelector:TemplatedListBox.ItemContainerStyle>\r\n                                    <Style TargetType=\"ListBoxItem\">\r\n                                        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n                                    </Style>\r\n                                </longListSelector:TemplatedListBox.ItemContainerStyle>\r\n                                <longListSelector:TemplatedListBox.ItemsPanel>\r\n                                    <ItemsPanelTemplate>\r\n                                        <toolkit:WrapPanel/>\r\n                                    </ItemsPanelTemplate>\r\n                                </longListSelector:TemplatedListBox.ItemsPanel>\r\n                            </longListSelector:TemplatedListBox>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n\r\n            <DataTemplate x:Key=\"UserItemTemplate\">\r\n                <ListBoxItem Tap=\"UIElement_OnTap\">\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,0,24,12\" Background=\"Transparent\" >\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"62\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <CheckBox IsChecked=\"{Binding IsSelected}\" IsEnabled=\"False\" Style=\"{x:Null}\"/>\r\n                        <Border Grid.Column=\"1\" Width=\"62\" Height=\"62\" Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\">\r\n                            <Grid>\r\n                                <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                                <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Grid Grid.Column=\"2\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <controls:HighlightingTextBlock Grid.Column=\"0\"\r\n                                HorizontalAlignment=\"Left\"\r\n                                Margin=\"14,-6,0,0\"\r\n                                MaxHeight=\"42.56\"\r\n                                HighlightBrush=\"{StaticResource PhoneAccentBrush}\" \r\n                                HighlightText=\"{Binding DataContext.Text, ElementName=Self}\"\r\n                                Text=\"{Binding FullName}\">\r\n                                <controls:HighlightingTextBlock.TextBlockStyle>\r\n                                    <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextLargeStyle}\">\r\n                                        <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                    </Style>\r\n                                </controls:HighlightingTextBlock.TextBlockStyle>\r\n                            </controls:HighlightingTextBlock>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"RegularUserItemTemplate\">\r\n                <ListBoxItem micro:Message.Attach=\"[Event Tap] = [Action ChooseContact($DataContext)]\">\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,0,24,12\" Background=\"Transparent\" >\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"62\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <CheckBox IsChecked=\"{Binding IsSelected}\" IsEnabled=\"False\" Style=\"{x:Null}\"/>\r\n                        <Border Grid.Column=\"1\" Width=\"62\" Height=\"62\" Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\">\r\n                            <Grid>\r\n                                <Image Source=\"/Images/Placeholder/placeholder.user.transparent-WXGA.png\"/>\r\n                                <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Grid Grid.Column=\"2\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <TextBlock \r\n                                Grid.Column=\"0\" \r\n                                Margin=\"14,-6,0,0\"\r\n                                Text=\"{Binding FullName}\"\r\n                                MaxHeight=\"42.56\" \r\n                                Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </navigation:AnimatedBasePage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.NewBroadcastList, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <TextBlock VerticalAlignment=\"Bottom\" Text=\"{Binding Resources.Subject, Source={StaticResource Strings}, StringFormat='\\{0\\}:'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <TextBox Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"-24,0,-12,-12\" x:Name=\"Title\" Style=\"{StaticResource HiddenTextBoxStyle}\" >\r\n                <TextBox.InputScope>\r\n                    <InputScope>\r\n                        <InputScopeName NameValue=\"Text\"/>\r\n                    </InputScope>\r\n                </TextBox.InputScope>\r\n            </TextBox>\r\n\r\n            <Border Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,2,12,28\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n\r\n\r\n\r\n            <longListSelector:LongListSelector\r\n                x:Name=\"SelectedUsers\"\r\n                toolkit:TiltEffect.SuppressTilt=\"True\" \r\n                Background=\"Transparent\"\r\n                ItemsSource=\"{Binding SelectedUsers}\" IsFlatList=\"True\" Grid.Row=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,0\" Tap=\"Contacts_OnTap\"\r\n                Style=\"{StaticResource WrapLongListSelector}\">\r\n                <longListSelector:LongListSelector.ListHeader>\r\n                    <TextBlock Margin=\"0,0,12,0\" Text=\"{Binding Resources.Members, Source={StaticResource Strings}, StringFormat='\\{0\\}:'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </longListSelector:LongListSelector.ListHeader>\r\n                <longListSelector:LongListSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Margin=\"0\" Text=\"{Binding FullName, StringFormat='\\{0\\}; '}\" Height=\"30.15\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ItemTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <TextBox MinWidth=\"10\" HorizontalAlignment=\"Stretch\" Background=\"Transparent\" \r\n                             Margin=\"-24,-12,-12,12\" x:Name=\"SearchText\" \r\n                             Text=\"{Binding DataContext.Text, ElementName=Self, Mode=TwoWay}\"\r\n                             KeyDown=\"SearchText_OnKeyDown\"\r\n                             Style=\"{StaticResource HiddenTextBoxStyle}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </TextBox>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n            </longListSelector:LongListSelector>\r\n\r\n            <longListSelector:LongListSelector \r\n                Grid.Row=\"4\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                x:Name=\"GroupedItems\"\r\n                Margin=\"-12,0,-12,0\"  \r\n                IsFlatList=\"True\"\r\n                ScrollingStarted=\"LongListSelector_OnScrollingStarted\"\r\n                ItemsSource=\"{Binding GroupedUsers}\" \r\n                ItemTemplate=\"{StaticResource RegularUserItemTemplate}\" />\r\n\r\n            <longListSelector:LongListSelector \r\n                Grid.Row=\"4\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                x:Name=\"SearchItems\"\r\n                Margin=\"-12,0,-12,0\"  \r\n                IsFlatList=\"True\"\r\n                ScrollingStarted=\"LongListSelector_OnScrollingStarted\"\r\n                ItemsSource=\"{Binding Items}\" \r\n                ItemTemplate=\"{StaticResource UserItemTemplate}\" />\r\n\r\n\r\n            <Border Grid.Row=\"3\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,-22,12,20\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n\r\n        </Grid>\r\n    </Grid>\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateBroadcastView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing Telegram.Controls.Extensions;\r\n#if WP8\r\nusing System.Windows.Navigation;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class CreateBroadcastView : IDisposable\r\n    {\r\n// fast resume\r\n#if WP8\r\n        private bool _isFastResume;\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (e.NavigationMode == NavigationMode.Reset)\r\n            {\r\n                _isFastResume = true;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            if (_isFastResume\r\n                && e.NavigationMode == NavigationMode.New\r\n                && e.Uri.OriginalString.EndsWith(\"ShellView.xaml\"))\r\n            {\r\n                _isFastResume = false;\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            base.OnNavigatingFrom(e);\r\n        }\r\n#endif\r\n\r\n\r\n        private IDisposable _keyPressSubscription;\r\n\r\n        public CreateDialogViewModel ViewModel\r\n        {\r\n            get { return DataContext as CreateDialogViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _createChatButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Create,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private bool _once;\r\n\r\n        private TextBox _searchBox;\r\n\r\n        public CreateBroadcastView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n\r\n            _createChatButton.Click += (sender, args) => ViewModel.Create();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                if (!_once)\r\n                {\r\n                    _once = true;\r\n\r\n                    _searchBox = SelectedUsers.FindChildOfType<TextBox>();\r\n\r\n                    if (_searchBox != null)\r\n                    {\r\n                        var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                            keh => { _searchBox.TextChanged += keh; },\r\n                            keh => { _searchBox.TextChanged -= keh; });\r\n\r\n                        _keyPressSubscription = keyPressEvents\r\n                            .Throttle(TimeSpan.FromSeconds(0.1))\r\n                            .ObserveOnDispatcher()\r\n                            .Subscribe(e =>\r\n                            {\r\n                                SearchItems.Visibility = string.IsNullOrEmpty(_searchBox.Text.Trim()) ? Visibility.Collapsed : Visibility.Visible;\r\n\r\n                                ViewModel.Search(_searchBox.Text);\r\n                            });\r\n                    }\r\n\r\n                    BuildLocalizedAppBar();\r\n                }\r\n            };\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SwivelShowAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return new SwivelHideAnimator { RootElement = LayoutRoot };\r\n        }\r\n\r\n        protected override void AnimationsComplete(AnimationType animationType)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                Title.Focus();\r\n            }\r\n\r\n            base.AnimationsComplete(animationType);\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_createChatButton);\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _keyPressSubscription.Dispose();\r\n        }\r\n\r\n        private void Contacts_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (_searchBox != null)\r\n            {\r\n                _searchBox.Focus();\r\n            }\r\n        }\r\n\r\n        private void SearchText_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (_searchBox != null\r\n                && _searchBox.SelectionStart == 0\r\n                && _searchBox.SelectionLength == 0\r\n                && e.Key == Key.Back)\r\n            {\r\n                ViewModel.DeleteLastUser();\r\n            }\r\n        }\r\n\r\n        private void LongListSelector_OnScrollingStarted(object sender, System.EventArgs e)\r\n        {\r\n            var focusElement = FocusManager.GetFocusedElement();\r\n            if (focusElement == _searchBox)\r\n            {\r\n                Self.Focus();\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            SearchItems.Visibility = Visibility.Collapsed;\r\n\r\n            var user = ((FrameworkElement)sender).DataContext as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                ViewModel.ChooseContact(user);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateChannelStep1View.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Dialogs.CreateChannelStep1View\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.NewChannel, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <views:ConversationTileControl HorizontalAlignment=\"Left\"\r\n                micro:Message.Attach=\"[Event Tap] = [Action SetChannelPhoto]\"\r\n\t\t\t\tMargin=\"12,10\" \r\n                Size=\"100\"\r\n                Fill=\"{StaticResource PhoneChromeBrush}\"\r\n                Text=\"{Binding PlaceholderText}\"\r\n                Source=\"{Binding Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n\r\n            <Button Margin=\"-12,0,-12,0\" Grid.Row=\"1\" x:Name=\"SetChannelPhoto\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.SetChannelPhoto, Source={StaticResource Strings}}\"/>\r\n            </Button>\r\n\r\n            <Grid Grid.Row=\"2\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <TextBlock VerticalAlignment=\"Bottom\" Text=\"{Binding Resources.ChannelName, Source={StaticResource Strings}, StringFormat='\\{0\\}:'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                <TextBox Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"-24,0,-12,-12\" x:Name=\"Title\" MaxLength=\"140\" Style=\"{StaticResource HiddenTextBoxStyle}\" >\r\n                    <TextBox.InputScope>\r\n                        <InputScope>\r\n                            <InputScopeName NameValue=\"Text\"/>\r\n                        </InputScope>\r\n                    </TextBox.InputScope>\r\n                </TextBox>\r\n                <Border Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,2,12,28\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n            </Grid>\r\n\r\n            <Grid Grid.Row=\"3\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <TextBlock VerticalAlignment=\"Bottom\" Text=\"{Binding Resources.Description, Source={StaticResource Strings}, StringFormat='\\{0\\}:'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                <TextBox Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"-24,0,-12,-12\" x:Name=\"About\" MaxLength=\"140\" Style=\"{StaticResource HiddenTextBoxStyle}\" >\r\n                    <TextBox.InputScope>\r\n                        <InputScope>\r\n                            <InputScopeName NameValue=\"Text\"/>\r\n                        </InputScope>\r\n                    </TextBox.InputScope>\r\n                </TextBox>\r\n                <Border Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,2,12,28\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                <TextBlock Grid.Row=\"2\" Grid.ColumnSpan=\"2\" Text=\"{Binding Resources.AboutDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,0,12,-5\"/>\r\n\r\n            </Grid>\r\n            <!--<RichTextBox Grid.Row=\"4\" Grid.ColumnSpan=\"2\" Margin=\"0,22,0,0\" >\r\n                <Paragraph>\r\n                    --><!--<Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding Resources.RegistrationProblemDescription, Source={StaticResource Strings}}\"/>--><!--\r\n                    <Hyperlink Click=\"WhatIsChannel_OnClick\"  FontSize=\"{StaticResource PhoneFontSizeMedium}\">\r\n                        <Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\"{Binding Resources.WhatIsChannel, Source={StaticResource Strings}}\"/>\r\n                    </Hyperlink>\r\n                    --><!--<Run FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Text=\".\"/>--><!--\r\n                </Paragraph>\r\n            </RichTextBox>-->\r\n        </Grid>\r\n    </Grid>\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateChannelStep1View.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing TelegramClient.Helpers;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Controls;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n\r\n    public partial class CreateChannelStep1View\r\n    {\r\n        public CreateChannelStep1ViewModel ViewModel\r\n        {\r\n            get { return DataContext as CreateChannelStep1ViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _nextButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Next,\r\n            IsEnabled = false,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.next.png\", UriKind.Relative)\r\n        };\r\n\r\n        public CreateChannelStep1View()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n\r\n            _nextButton.Click += (sender, args) => ViewModel.Next();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                BuildLocalizedAppBar();\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.CanCreateChannel))\r\n            {\r\n                _nextButton.IsEnabled = ViewModel.CanCreateChannel;\r\n            }\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SwivelShowAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return new SwivelHideAnimator { RootElement = LayoutRoot };\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_nextButton);\r\n        }\r\n\r\n        private void WhatIsChannel_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.ShowChannelHint();\r\n        }\r\n\r\n\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                var multiplePhotoChooser = popup.Child as OpenPhotoPicker;\r\n                if (multiplePhotoChooser != null)\r\n                {\r\n                    multiplePhotoChooser.TryClose();\r\n                }\r\n\r\n                var cropControl = popup.Child as CropControl;\r\n                if (cropControl != null)\r\n                {\r\n                    cropControl.TryClose();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateChannelStep2View.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Dialogs.CreateChannelStep2View\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    BackKeyPress=\"CreateChannelStep2View_OnBackKeyPress\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <navigation:AnimatedBasePage.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"ChannelTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"0,0,18,-12\" Height=\"92\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=ContentPanel}\" >\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [RevokeLink($DataContext)]\" Header=\"{Binding Resources.RevokeLink, Source={StaticResource Strings}}\"/>\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid Margin=\"12,12,0,7\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\">\r\n                            <Grid>\r\n                                <Border Height=\"62\" Width=\"62\" Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n                                <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                                <Image Height=\"62\" Width=\"62\" Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n\r\n                        <Grid Grid.Row=\"0\" Grid.Column=\"1\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <Grid Grid.Column=\"1\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <TextBlock\r\n                                    Margin=\"14,-2,0,-1\" FontSize=\"36.667\" MaxHeight=\"48.77\"\r\n                                    Text=\"{Binding FullName}\" \r\n                                    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                                    Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n\r\n                        <ContentControl Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"13,0,0,0\"\r\n                            HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalAlignment=\"Top\"\r\n                            FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                            FontSize=\"{StaticResource PhoneFontSizeNormal}\">\r\n\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <Grid Grid.Column=\"0\" VerticalAlignment=\"Top\" Margin=\"2,0,0,0\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n\r\n                                    <TextBlock Grid.Column=\"1\" Height=\"22\"\r\n                                        Margin=\"0\"\r\n                                        LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                                        Text=\"t.me/\"\r\n                                        Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n\r\n                                    <TextBlock Grid.Column=\"2\" Height=\"22\"\r\n                                        Margin=\"0\"\r\n                                        LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                                        Text=\"{Binding UserName}\" TextWrapping=\"NoWrap\"\r\n                                        TextTrimming=\"WordEllipsis\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </ContentControl>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </navigation:AnimatedBasePage.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" CacheMode=\"BitmapCache\">\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding HasError}\" Value=\"True\" TrueState=\"NotAvailable\" FalseState=\"Available\"/>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsUsernameAvailable}\" Value=\"True\" TrueState=\"UsernameAvailable\" FalseState=\"UsernameNotAvailable\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"UsernameAvailableGroup\">\r\n                <VisualState x:Name=\"UsernameNotAvailable\">\r\n                    <Storyboard>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"-100\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"1\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"UsernameAvailable\">\r\n                    <Storyboard>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"100\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"UsernameHint\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n            <VisualStateGroup x:Name=\"AvailabilityGroup\">\r\n                <VisualState x:Name=\"Available\">\r\n                    <Storyboard>\r\n                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ErrorBorder\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                        </ObjectAnimationUsingKeyFrames>-->\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"-100\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"1\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"NotAvailable\">\r\n                    <Storyboard>\r\n                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ErrorBorder\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                        </ObjectAnimationUsingKeyFrames>-->\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.X)\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"100\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Error\">\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"0\"/>\r\n                            <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                                <EasingDoubleKeyFrame.EasingFunction>\r\n                                    <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                </EasingDoubleKeyFrame.EasingFunction>\r\n                            </EasingDoubleKeyFrame>\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n        \r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.ChannelType, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n        \r\n        <ScrollViewer x:Name=\"ScrollViewer\" Grid.Row=\"1\" ManipulationStarted=\"ScrollViewer_OnManipulationStarted\">\r\n            <Grid x:Name=\"ContentPanel\" Margin=\"12,0,12,72\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <Grid Margin=\"0,6,0,0\" Grid.Row=\"0\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <RadioButton Grid.Row=\"0\" GroupName=\"ChannelType\" IsChecked=\"{Binding IsPublic, Mode=TwoWay}\" Margin=\"0,6,0,-16\" Content=\"{Binding Resources.PublicChannel, Source={StaticResource Strings}}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Text=\"{Binding Resources.PublicChannelDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"60,0,12,0\"/>\r\n                    <RadioButton Margin=\"0,18,0,-16\" Grid.Row=\"2\" GroupName=\"ChannelType\" IsChecked=\"{Binding IsPublic, Converter={StaticResource InvertBooleanConverter}}\" Content=\"{Binding Resources.PrivateChannel, Source={StaticResource Strings}}\"/>\r\n                    <TextBlock Grid.Row=\"3\" Text=\"{Binding Resources.PrivateChannelDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"60,0,12,0\"/>\r\n                </Grid>\r\n\r\n                <Grid Grid.Row=\"1\" Margin=\"0,24,0,0\" Visibility=\"{Binding IsPublic, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                    <Grid Visibility=\"{Binding TooMuchUsernames, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <TextBlock VerticalAlignment=\"Bottom\" Text=\"{Binding Resources.Link, Source={StaticResource Strings}, StringFormat='\\{0\\}: t.me/'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        <TextBox Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"-36,-12,-12,-12\" x:Name=\"UserName\" Style=\"{StaticResource HiddenTextBoxStyle}\"/>\r\n                        <Border Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,2,12,0\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n\r\n                        <TextBlock Grid.Row=\"3\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,24,12,0\" x:Name=\"Error\" Text=\"{Binding Error}\" TextWrapping=\"Wrap\" Foreground=\"#FFB2362E\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                            <TextBlock.RenderTransform>\r\n                                <TranslateTransform/>\r\n                            </TextBlock.RenderTransform>\r\n                        </TextBlock>\r\n                        <TextBlock Grid.Row=\"3\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,24,12,0\" x:Name=\"UsernameHint\" Text=\"{Binding UsernameAvailableString}\" TextWrapping=\"Wrap\" Foreground=\"ForestGreen\"  Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                            <TextBlock.RenderTransform>\r\n                                <TranslateTransform/>\r\n                            </TextBlock.RenderTransform>\r\n                        </TextBlock>\r\n                        <TextBlock Grid.Row=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,24,12,0\" Text=\"{Binding Resources.PublicLinkDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n\r\n                    <Grid Visibility=\"{Binding TooMuchUsernames, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Grid.Column=\"0\" Text=\"{Binding Resources.ChannelsAdminPublicTooMuch, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Foreground=\"#FFB2362E\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                            <TextBlock.RenderTransform>\r\n                                <TranslateTransform Y=\"0\"/>\r\n                            </TextBlock.RenderTransform>\r\n                        </TextBlock>\r\n                        <ItemsControl Grid.Row=\"1\" Margin=\"0,12,12,28\" ItemsSource=\"{Binding AdminedPublicChannels}\" ItemTemplate=\"{StaticResource ChannelTemplate}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <Grid Grid.Row=\"1\" Margin=\"0,24,0,0\" Background=\"Transparent\" Visibility=\"{Binding IsPublic, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                            <toolkit:MenuItem Click=\"CopyInvite_OnClick\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock VerticalAlignment=\"Bottom\" Text=\"{Binding InviteLink}\" TextWrapping=\"Wrap\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    <Border Grid.Row=\"1\" Grid.Column=\"0\" Margin=\"12,2,12,24\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    <TextBlock Grid.Row=\"2\" Text=\"{Binding Resources.PrivateLinkDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </ScrollViewer>\r\n    </Grid>\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateChannelStep2View.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class CreateChannelStep2View\r\n    {\r\n        public CreateChannelStep2ViewModel ViewModel\r\n        {\r\n            get { return DataContext as CreateChannelStep2ViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _nextButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Next,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.next.png\", UriKind.Relative)\r\n        };\r\n\r\n        public CreateChannelStep2View()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n\r\n            _nextButton.Click += (sender, args) => ViewModel.Next();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                BuildLocalizedAppBar();\r\n\r\n                ViewModel.EmptyUserName += OnEmptyUserName;\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.EmptyUserName -= OnEmptyUserName;\r\n            };\r\n        }\r\n\r\n        private void OnEmptyUserName(object sender, System.EventArgs e)\r\n        {\r\n            UserName.Focus();\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SwivelShowAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return new SwivelHideAnimator { RootElement = LayoutRoot };\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_nextButton);\r\n        }\r\n\r\n        private void CopyInvite_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.CopyInvite();\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ContextMenuService.GetContextMenu((DependencyObject)sender).IsOpen = true;\r\n        }\r\n\r\n        private void ScrollViewer_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (FocusManager.GetFocusedElement() == UserName)\r\n            {\r\n                ScrollViewer.Focus();\r\n            }\r\n        }\r\n\r\n        private void CreateChannelStep2View_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateChannelStep3View.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Dialogs.CreateChannelStep3View\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <navigation:AnimatedBasePage.Resources>\r\n        <ResourceDictionary>\r\n            <Style x:Key=\"WrapLongListSelector\" TargetType=\"longListSelector:LongListSelector\">\r\n                <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate>\r\n                            <longListSelector:TemplatedListBox x:Name=\"TemplatedListBox\" Background=\"{TemplateBinding Background}\">\r\n                                <longListSelector:TemplatedListBox.ItemContainerStyle>\r\n                                    <Style TargetType=\"ListBoxItem\">\r\n                                        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n                                    </Style>\r\n                                </longListSelector:TemplatedListBox.ItemContainerStyle>\r\n                            </longListSelector:TemplatedListBox>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n                <Setter Property=\"ItemsPanel\">\r\n                    <Setter.Value>\r\n                        <ItemsPanelTemplate>\r\n                            <toolkit:WrapPanel/>\r\n                        </ItemsPanelTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n\r\n            <DataTemplate x:Key=\"UserItemTemplate\">\r\n                <ListBoxItem Tap=\"UIElement_OnTap\">\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"72\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <CheckBox IsChecked=\"{Binding IsSelected}\" IsEnabled=\"True\"/>\r\n\r\n                        <views:ConversationTileControl\r\n                            Size=\"72\" Margin=\"-12,0,0,0\" Grid.Column=\"1\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <Grid Grid.Column=\"2\" VerticalAlignment=\"Center\" Margin=\"2,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <controls:HighlightingTextBlock Grid.Column=\"0\"\r\n                                HorizontalAlignment=\"Left\"\r\n                                Margin=\"14,-6,0,0\"\r\n                                HighlightBrush=\"{StaticResource TelegramAccentBrush}\" \r\n                                HighlightText=\"{Binding DataContext.Text, ElementName=Self}\"\r\n                                Text=\"{Binding FullName2}\"\r\n                                FontSize=\"27\">\r\n\r\n                                <controls:HighlightingTextBlock.TextBlockStyle>\r\n                                    <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextLargeStyle}\">\r\n                                        <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                        <Setter Property=\"FontSize\" Value=\"27\"/>\r\n                                        <Setter Property=\"MaxHeight\" Value=\"36\"/>\r\n                                    </Style>\r\n                                </controls:HighlightingTextBlock.TextBlockStyle>\r\n                            </controls:HighlightingTextBlock>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Background=\"Transparent\"/>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"RegularUserItemTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"72\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <CheckBox IsChecked=\"{Binding IsSelected}\" IsEnabled=\"True\"/>\r\n\r\n                        <views:ConversationTileControl Size=\"72\" \r\n                            Margin=\"-12,0,0,0\" Grid.Column=\"1\" VerticalAlignment=\"Top\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                        <Grid Grid.Column=\"2\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                                Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                                Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                                Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action ChooseContact($DataContext)]\"/>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </navigation:AnimatedBasePage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Grid Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <TextBlock Text=\"{Binding Resources.NewChannel, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Margin=\"0,0,12,0\" Text=\"{Binding LimitString, StringFormat=' \\{0\\}'}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </Grid>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            \r\n\r\n\r\n            <longListSelector:LongListSelector\r\n                x:Name=\"SelectedUsers\"\r\n                toolkit:TiltEffect.SuppressTilt=\"True\" \r\n                Background=\"Transparent\"\r\n                ItemsSource=\"{Binding SelectedUsers}\"\r\n                IsFlatList=\"True\" \r\n                Grid.Row=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,0\" \r\n                Tap=\"Contacts_OnTap\"\r\n                MaxHeight=\"146\"\r\n                Style=\"{StaticResource WrapLongListSelector}\">\r\n                <longListSelector:LongListSelector.ListHeader>\r\n                    <TextBlock Margin=\"0,0,12,0\" Text=\"{Binding Resources.Members, Source={StaticResource Strings}, StringFormat='\\{0\\}:'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </longListSelector:LongListSelector.ListHeader>\r\n                <longListSelector:LongListSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock x:Name=\"Text\" Margin=\"0\" Text=\"{Binding FullName, StringFormat='\\{0\\}; '}\" Height=\"30.15\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                            <TextBlock.Triggers>\r\n                                <EventTrigger RoutedEvent=\"TextBlock.Loaded\">\r\n                                    <BeginStoryboard>\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Duration=\"00:00:0.25\" From=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Text\"/>\r\n                                        </Storyboard>\r\n                                    </BeginStoryboard>\r\n                                </EventTrigger>\r\n                            </TextBlock.Triggers>\r\n                        </TextBlock>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ItemTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <TextBox MinWidth=\"10\" HorizontalAlignment=\"Stretch\" \r\n                             Margin=\"0\" Padding=\"0,0,12,0\" x:Name=\"SearchText\" \r\n                             Text=\"{Binding DataContext.Text, ElementName=Self, Mode=TwoWay}\"\r\n                             KeyDown=\"SearchText_OnKeyDown\"\r\n                             Style=\"{StaticResource HiddenSmallTextBoxStyle}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </TextBox>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n            </longListSelector:LongListSelector>\r\n\r\n            <Border Grid.Row=\"3\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,2,12,20\" VerticalAlignment=\"Top\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n\r\n            <longListSelector:LongListSelector \r\n                Grid.Row=\"4\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                x:Name=\"GroupedItems\"\r\n                Margin=\"-12,0,-12,0\"  \r\n                IsFlatList=\"True\"\r\n                ScrollingStarted=\"LongListSelector_OnScrollingStarted\"\r\n                ItemsSource=\"{Binding GroupedUsers}\" \r\n                ItemTemplate=\"{StaticResource RegularUserItemTemplate}\" />\r\n\r\n            <longListSelector:LongListSelector \r\n                Grid.Row=\"4\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                x:Name=\"SearchItems\"\r\n                Margin=\"-12,0,-12,0\"  \r\n                IsFlatList=\"True\"\r\n                ScrollingStarted=\"LongListSelector_OnScrollingStarted\"\r\n                ItemsSource=\"{Binding Items}\" \r\n                ItemTemplate=\"{StaticResource UserItemTemplate}\" />\r\n\r\n\r\n            <!--<Border Grid.Row=\"3\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,-22,12,20\" VerticalAlignment=\"Top\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>-->\r\n\r\n        </Grid>\r\n    </Grid>\r\n\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateChannelStep3View.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing Telegram.Controls.Extensions;\r\n#if WP8\r\nusing System.Windows.Navigation;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n\r\n    public partial class CreateChannelStep3View : IDisposable\r\n    {\r\n        // fast resume\r\n#if WP8\r\n        private bool _isFastResume;\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (e.NavigationMode == NavigationMode.Reset)\r\n            {\r\n                _isFastResume = true;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            if (_isFastResume\r\n                && e.NavigationMode == NavigationMode.New\r\n                && e.Uri.OriginalString.EndsWith(\"ShellView.xaml\"))\r\n            {\r\n                _isFastResume = false;\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            base.OnNavigatingFrom(e);\r\n        }\r\n#endif\r\n\r\n\r\n        private IDisposable _keyPressSubscription;\r\n\r\n        public CreateChannelStep3ViewModel ViewModel\r\n        {\r\n            get { return DataContext as CreateChannelStep3ViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _createChatButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Create,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private bool _once;\r\n\r\n        private TextBox _searchBox;\r\n\r\n        public CreateChannelStep3View()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n\r\n            _createChatButton.Click += (sender, args) => ViewModel.Create();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                if (!_once)\r\n                {\r\n                    _once = true;\r\n\r\n                    _searchBox = SelectedUsers.FindChildOfType<TextBox>();\r\n\r\n                    if (_searchBox != null)\r\n                    {\r\n                        var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                            keh => { _searchBox.TextChanged += keh; },\r\n                            keh => { _searchBox.TextChanged -= keh; });\r\n\r\n                        _keyPressSubscription = keyPressEvents\r\n                            .Throttle(TimeSpan.FromSeconds(0.1))\r\n                            .ObserveOnDispatcher()\r\n                            .Subscribe(e =>\r\n                            {\r\n                                SearchItems.Visibility = string.IsNullOrEmpty(_searchBox.Text.Trim()) ? Visibility.Collapsed : Visibility.Visible;\r\n\r\n                                ViewModel.Search(_searchBox.Text);\r\n                            });\r\n                    }\r\n\r\n                    BuildLocalizedAppBar();\r\n                }\r\n            };\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SwivelShowAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return new SwivelHideAnimator { RootElement = LayoutRoot };\r\n        }\r\n\r\n        protected override void AnimationsComplete(AnimationType animationType)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                //TitleControl.Focus();\r\n            }\r\n\r\n            base.AnimationsComplete(animationType);\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            //ApplicationBar.Buttons.Add(_backButton);\r\n            ApplicationBar.Buttons.Add(_createChatButton);\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _keyPressSubscription.Dispose();\r\n        }\r\n\r\n        private void Contacts_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (_searchBox != null)\r\n            {\r\n                _searchBox.Focus();\r\n            }\r\n        }\r\n\r\n        private void SearchText_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (_searchBox != null\r\n                && _searchBox.SelectionStart == 0\r\n                && _searchBox.SelectionLength == 0\r\n                && e.Key == Key.Back)\r\n            {\r\n                ViewModel.DeleteLastUser();\r\n            }\r\n        }\r\n\r\n        private void LongListSelector_OnScrollingStarted(object sender, System.EventArgs e)\r\n        {\r\n            var focusElement = FocusManager.GetFocusedElement();\r\n            if (focusElement == _searchBox)\r\n            {\r\n                Self.Focus();\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            //SearchItems.Visibility = Visibility.Collapsed;\r\n\r\n            var user = ((FrameworkElement)sender).DataContext as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                ViewModel.ChooseContact(user);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateChannelView.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Dialogs.CreateChannelView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <navigation:AnimatedBasePage.Resources>\r\n        <ResourceDictionary>\r\n            <Style x:Key=\"WrapLongListSelector\" TargetType=\"longListSelector:LongListSelector\">\r\n                <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate>\r\n                            <longListSelector:TemplatedListBox x:Name=\"TemplatedListBox\" Background=\"{TemplateBinding Background}\">\r\n                                <longListSelector:TemplatedListBox.ItemContainerStyle>\r\n                                    <Style TargetType=\"ListBoxItem\">\r\n                                        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n                                    </Style>\r\n                                </longListSelector:TemplatedListBox.ItemContainerStyle>\r\n                                <longListSelector:TemplatedListBox.ItemsPanel>\r\n                                    <ItemsPanelTemplate>\r\n                                        <toolkit:WrapPanel/>\r\n                                    </ItemsPanelTemplate>\r\n                                </longListSelector:TemplatedListBox.ItemsPanel>\r\n                            </longListSelector:TemplatedListBox>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n\r\n            <DataTemplate x:Key=\"UserItemTemplate\">\r\n                <ListBoxItem Tap=\"UIElement_OnTap\">\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,0,24,12\" Background=\"Transparent\" >\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"62\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <CheckBox IsChecked=\"{Binding IsSelected}\" IsEnabled=\"False\" Style=\"{x:Null}\"/>\r\n                        <Border Grid.Column=\"1\" Width=\"62\" Height=\"62\" Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\">\r\n                            <Grid>\r\n                                <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                                <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Grid Grid.Column=\"2\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <controls:HighlightingTextBlock Grid.Column=\"0\"\r\n                                HorizontalAlignment=\"Left\"\r\n                                Margin=\"14,-6,0,0\"\r\n                                MaxHeight=\"42.56\"\r\n                                HighlightBrush=\"{StaticResource PhoneAccentBrush}\" \r\n                                HighlightText=\"{Binding DataContext.Text, ElementName=Self}\"\r\n                                Text=\"{Binding FullName}\">\r\n                                <controls:HighlightingTextBlock.TextBlockStyle>\r\n                                    <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextLargeStyle}\">\r\n                                        <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                    </Style>\r\n                                </controls:HighlightingTextBlock.TextBlockStyle>\r\n                            </controls:HighlightingTextBlock>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"RegularUserItemTemplate\">\r\n                <ListBoxItem micro:Message.Attach=\"[Event Tap] = [Action ChooseContact($DataContext)]\">\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,0,24,12\" Background=\"Transparent\" >\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"62\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <CheckBox IsChecked=\"{Binding IsSelected}\" IsEnabled=\"False\" Style=\"{x:Null}\"/>\r\n                        <Border Grid.Column=\"1\" Width=\"62\" Height=\"62\" Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\">\r\n                            <Grid>\r\n                                <Image Source=\"/Images/Placeholder/placeholder.user.transparent-WXGA.png\"/>\r\n                                <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Grid Grid.Column=\"2\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <TextBlock \r\n                                Grid.Column=\"0\" \r\n                                Margin=\"14,-6,0,0\"\r\n                                Text=\"{Binding FullName}\"\r\n                                MaxHeight=\"42.56\" \r\n                                Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </navigation:AnimatedBasePage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.NewChannel, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n\r\n            <Border x:Name=\"PhotoPlaceholder\" HorizontalAlignment=\"Left\"\r\n\t\t\t\tMargin=\"12,10\" \r\n                micro:Message.Attach=\"[Event Tap] = [Action ChoosePhoto]\"\r\n                Height=\"128\" Width=\"128\"\r\n                Background=\"{StaticResource PhoneChromeBrush}\">\r\n                <Grid>\r\n                    <TextBlock FontSize=\"56\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"{StaticResource PhoneSubtleBrush}\" Text=\"{Binding CurrentItem, Converter={StaticResource PlaceholderDefaultTextConverter}, FallbackValue='C'}\"/>\r\n                    <Image x:Name=\"UserPhoto\"  Source=\"{Binding Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n                </Grid>\r\n            </Border>\r\n\r\n            <Grid Grid.Row=\"1\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <TextBlock VerticalAlignment=\"Bottom\" Text=\"{Binding Resources.Subject, Source={StaticResource Strings}, StringFormat='\\{0\\}:'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                <TextBox Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"-24,0,-12,-12\" x:Name=\"Title\" Style=\"{StaticResource HiddenTextBoxStyle}\" >\r\n                    <TextBox.InputScope>\r\n                        <InputScope>\r\n                            <InputScopeName NameValue=\"Text\"/>\r\n                        </InputScope>\r\n                    </TextBox.InputScope>\r\n                </TextBox>\r\n                <Border Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,2,12,28\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n            </Grid>\r\n\r\n            <Grid Grid.Row=\"2\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <TextBlock VerticalAlignment=\"Bottom\" Text=\"{Binding Resources.About, Source={StaticResource Strings}, StringFormat='\\{0\\}:'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                <TextBox Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"-24,0,-12,-12\" x:Name=\"About\" Style=\"{StaticResource HiddenTextBoxStyle}\" >\r\n                    <TextBox.InputScope>\r\n                        <InputScope>\r\n                            <InputScopeName NameValue=\"Text\"/>\r\n                        </InputScope>\r\n                    </TextBox.InputScope>\r\n                </TextBox>\r\n                <Border Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,2,12,28\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n            </Grid>\r\n\r\n            <Grid Grid.Row=\"3\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <TextBlock VerticalAlignment=\"Bottom\" Text=\"{Binding Resources.Link, Source={StaticResource Strings}, StringFormat='\\{0\\}: t.me/'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                <TextBox Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"-36,0,-12,-12\" x:Name=\"Link\" Style=\"{StaticResource HiddenTextBoxStyle}\" >\r\n                    <!--<TextBox.InputScope>\r\n                        <InputScope>\r\n                            <InputScopeName NameValue=\"Text\"/>\r\n                        </InputScope>\r\n                    </TextBox.InputScope>-->\r\n                </TextBox>\r\n                <Border Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Margin=\"12,2,12,28\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n            </Grid>\r\n\r\n\r\n\r\n            <longListSelector:LongListSelector\r\n                Grid.Row=\"4\"\r\n                x:Name=\"SelectedUsers\"\r\n                toolkit:TiltEffect.SuppressTilt=\"True\" \r\n                Background=\"Transparent\"\r\n                ItemsSource=\"{Binding SelectedUsers}\" IsFlatList=\"True\" Margin=\"12,0\" Tap=\"Contacts_OnTap\"\r\n                Style=\"{StaticResource WrapLongListSelector}\">\r\n                <longListSelector:LongListSelector.ListHeader>\r\n                    <TextBlock Margin=\"0,0,12,0\" Text=\"{Binding Resources.Members, Source={StaticResource Strings}, StringFormat='\\{0\\}:'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </longListSelector:LongListSelector.ListHeader>\r\n                <longListSelector:LongListSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Margin=\"0\" Text=\"{Binding FullName, StringFormat='\\{0\\}; '}\" Height=\"30.15\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ItemTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <TextBox MinWidth=\"10\" HorizontalAlignment=\"Stretch\" Background=\"Transparent\" \r\n                             Margin=\"-24,-12,-12,12\" x:Name=\"SearchText\" \r\n                             Text=\"{Binding DataContext.Text, ElementName=Self, Mode=TwoWay}\"\r\n                             KeyDown=\"SearchText_OnKeyDown\"\r\n                             Style=\"{StaticResource HiddenTextBoxStyle}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </TextBox>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n            </longListSelector:LongListSelector>\r\n\r\n            <longListSelector:LongListSelector \r\n                Grid.Row=\"6\" \r\n                x:Name=\"GroupedItems\"\r\n                Margin=\"-12,0,-12,0\"  \r\n                IsFlatList=\"True\"\r\n                ScrollingStarted=\"LongListSelector_OnScrollingStarted\"\r\n                ItemsSource=\"{Binding GroupedUsers}\" \r\n                ItemTemplate=\"{StaticResource RegularUserItemTemplate}\">\r\n            </longListSelector:LongListSelector>\r\n\r\n            <longListSelector:LongListSelector \r\n                Grid.Row=\"6\" \r\n                x:Name=\"SearchItems\"\r\n                Margin=\"-12,0,-12,0\"  \r\n                IsFlatList=\"True\"\r\n                ScrollingStarted=\"LongListSelector_OnScrollingStarted\"\r\n                ItemsSource=\"{Binding Items}\" \r\n                ItemTemplate=\"{StaticResource UserItemTemplate}\">\r\n            </longListSelector:LongListSelector>\r\n\r\n            <Border Grid.Row=\"5\" Margin=\"12,-22,12,20\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n\r\n        </Grid>\r\n    </Grid>\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateChannelView.xaml.cs",
    "content": "﻿using System;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing Telegram.Controls.Extensions;\r\n#if WP8\r\nusing System.Windows.Navigation;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class CreateChannelView : IDisposable\r\n    {\r\n        // fast resume\r\n#if WP8\r\n        private bool _isFastResume;\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (e.NavigationMode == NavigationMode.Reset)\r\n            {\r\n                _isFastResume = true;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            if (_isFastResume\r\n                && e.NavigationMode == NavigationMode.New\r\n                && e.Uri.OriginalString.EndsWith(\"ShellView.xaml\"))\r\n            {\r\n                _isFastResume = false;\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            base.OnNavigatingFrom(e);\r\n        }\r\n#endif\r\n\r\n\r\n        private IDisposable _keyPressSubscription;\r\n\r\n        public CreateChannelViewModel ViewModel\r\n        {\r\n            get { return DataContext as CreateChannelViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _createChatButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Create,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private bool _once;\r\n\r\n        private TextBox _searchBox;\r\n\r\n        public CreateChannelView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n\r\n            _createChatButton.Click += (sender, args) => ViewModel.Create();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                if (!_once)\r\n                {\r\n                    _once = true;\r\n\r\n                    _searchBox = SelectedUsers.FindChildOfType<TextBox>();\r\n\r\n                    if (_searchBox != null)\r\n                    {\r\n                        var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                            keh => { _searchBox.TextChanged += keh; },\r\n                            keh => { _searchBox.TextChanged -= keh; });\r\n\r\n                        _keyPressSubscription = keyPressEvents\r\n                            .Throttle(TimeSpan.FromSeconds(0.1))\r\n                            .ObserveOnDispatcher()\r\n                            .Subscribe(e =>\r\n                            {\r\n                                SearchItems.Visibility = string.IsNullOrEmpty(_searchBox.Text.Trim()) ? Visibility.Collapsed : Visibility.Visible;\r\n\r\n                                ViewModel.Search(_searchBox.Text);\r\n                            });\r\n                    }\r\n\r\n                    BuildLocalizedAppBar();\r\n                }\r\n            };\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SwivelShowAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return new SwivelHideAnimator { RootElement = LayoutRoot };\r\n        }\r\n\r\n        protected override void AnimationsComplete(AnimationType animationType)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                Title.Focus();\r\n            }\r\n\r\n            base.AnimationsComplete(animationType);\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_createChatButton);\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _keyPressSubscription.Dispose();\r\n        }\r\n\r\n        private void Contacts_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (_searchBox != null)\r\n            {\r\n                _searchBox.Focus();\r\n            }\r\n        }\r\n\r\n        private void SearchText_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (_searchBox != null\r\n                && _searchBox.SelectionStart == 0\r\n                && _searchBox.SelectionLength == 0\r\n                && e.Key == Key.Back)\r\n            {\r\n                ViewModel.DeleteLastUser();\r\n            }\r\n        }\r\n\r\n        private void LongListSelector_OnScrollingStarted(object sender, System.EventArgs e)\r\n        {\r\n            var focusElement = FocusManager.GetFocusedElement();\r\n            if (focusElement == _searchBox)\r\n            {\r\n                Self.Focus();\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            //SearchItems.Visibility = Visibility.Collapsed;\r\n\r\n            var user = ((FrameworkElement)sender).DataContext as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                ViewModel.ChooseContact(user);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateDialogView.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Dialogs.CreateDialogView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <navigation:AnimatedBasePage.Resources>\r\n        <ResourceDictionary>\r\n            <Style x:Key=\"WrapLongListSelector\" TargetType=\"longListSelector:LongListSelector\">\r\n                <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate>\r\n                            <longListSelector:TemplatedListBox x:Name=\"TemplatedListBox\" Background=\"{TemplateBinding Background}\">\r\n                                <longListSelector:TemplatedListBox.ItemContainerStyle>\r\n                                    <Style TargetType=\"ListBoxItem\">\r\n                                        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n                                    </Style>\r\n                                </longListSelector:TemplatedListBox.ItemContainerStyle>\r\n                            </longListSelector:TemplatedListBox>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n                <Setter Property=\"ItemsPanel\">\r\n                    <Setter.Value>\r\n                        <ItemsPanelTemplate>\r\n                            <toolkit:WrapPanel/>\r\n                        </ItemsPanelTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            \r\n            <DataTemplate x:Key=\"UserItemTemplate\">\r\n                <ListBoxItem Tap=\"UIElement_OnTap\">\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"72\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <CheckBox IsChecked=\"{Binding IsSelected}\" IsEnabled=\"True\"/>\r\n                        \r\n                        <views:ConversationTileControl\r\n                            Size=\"72\" Margin=\"-12,0,0,0\" Grid.Column=\"1\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <Grid Grid.Column=\"2\" VerticalAlignment=\"Center\" Margin=\"2,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <controls:HighlightingTextBlock Grid.Column=\"0\"\r\n                                HorizontalAlignment=\"Left\"\r\n                                Margin=\"14,-6,0,0\"\r\n                                HighlightBrush=\"{StaticResource TelegramAccentBrush}\" \r\n                                HighlightText=\"{Binding DataContext.Text, ElementName=Self}\"\r\n                                Text=\"{Binding FullName2}\"\r\n                                FontSize=\"27\">\r\n                                <controls:HighlightingTextBlock.TextBlockStyle>\r\n                                    <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextLargeStyle}\">\r\n                                        <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                        <Setter Property=\"FontSize\" Value=\"27\"/>\r\n                                        <Setter Property=\"MaxHeight\" Value=\"36\"/>\r\n                                    </Style>\r\n                                </controls:HighlightingTextBlock.TextBlockStyle>\r\n                            </controls:HighlightingTextBlock>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Background=\"Transparent\"/>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"RegularUserItemTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"72\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <CheckBox IsChecked=\"{Binding IsSelected}\" IsEnabled=\"True\"/>\r\n\r\n                        <views:ConversationTileControl Size=\"72\" \r\n                            Margin=\"-12,0,0,0\" Grid.Column=\"1\" VerticalAlignment=\"Top\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                        <Grid Grid.Column=\"2\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                    Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                                    Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                                    Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                                    Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action ChooseContact($DataContext)]\"/>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </navigation:AnimatedBasePage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Grid Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <TextBlock Text=\"{Binding Resources.NewGroup, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n            <TextBlock Grid.Column=\"1\" Margin=\"0,0,12,0\" Text=\"{Binding LimitString, StringFormat=' \\{0\\}'}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </Grid>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <TextBlock VerticalAlignment=\"Bottom\" Text=\"{Binding Resources.Subject, Source={StaticResource Strings}, StringFormat='\\{0\\}:'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <TextBox Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"-24,0,-12,-12\" x:Name=\"Title\" Style=\"{StaticResource HiddenTextBoxStyle}\" >\r\n                <TextBox.InputScope>\r\n                    <InputScope>\r\n                        <InputScopeName NameValue=\"Text\"/>\r\n                    </InputScope>\r\n                </TextBox.InputScope>\r\n            </TextBox>\r\n\r\n            <Border Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,2,12,28\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n\r\n            <longListSelector:LongListSelector\r\n                x:Name=\"SelectedUsers\"\r\n                toolkit:TiltEffect.SuppressTilt=\"True\" \r\n                Background=\"Transparent\"\r\n                ItemsSource=\"{Binding SelectedUsers}\"\r\n                IsFlatList=\"True\" \r\n                Grid.Row=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,0\" \r\n                Tap=\"Contacts_OnTap\"\r\n                MaxHeight=\"146\"\r\n                Style=\"{StaticResource WrapLongListSelector}\">\r\n                <longListSelector:LongListSelector.ListHeader>\r\n                    <TextBlock Margin=\"0,0,12,0\" Text=\"{Binding Resources.Members, Source={StaticResource Strings}, StringFormat='\\{0\\}:'}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </longListSelector:LongListSelector.ListHeader>\r\n                <longListSelector:LongListSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock x:Name=\"Text\" Margin=\"0\" Text=\"{Binding FullName, StringFormat='\\{0\\}; '}\" Height=\"30.15\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                            <TextBlock.Triggers>\r\n                                <EventTrigger RoutedEvent=\"TextBlock.Loaded\">\r\n                                    <BeginStoryboard>\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Duration=\"00:00:0.25\" From=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Text\"/>\r\n                                        </Storyboard>\r\n                                    </BeginStoryboard>\r\n                                </EventTrigger>\r\n                            </TextBlock.Triggers>\r\n                        </TextBlock>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ItemTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <TextBox MinWidth=\"10\" HorizontalAlignment=\"Stretch\" \r\n                             Margin=\"0\" Padding=\"0,0,12,0\" x:Name=\"SearchText\" \r\n                             Text=\"{Binding DataContext.Text, ElementName=Self, Mode=TwoWay}\"\r\n                             KeyDown=\"SearchText_OnKeyDown\"\r\n                             Style=\"{StaticResource HiddenSmallTextBoxStyle}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </TextBox>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n            </longListSelector:LongListSelector>\r\n            \r\n            <Border Grid.Row=\"3\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,2,12,20\" VerticalAlignment=\"Top\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n\r\n            <longListSelector:LongListSelector \r\n                Grid.Row=\"4\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                x:Name=\"GroupedItems\"\r\n                Margin=\"-12,0,-12,0\"  \r\n                IsFlatList=\"True\"\r\n                ScrollingStarted=\"LongListSelector_OnScrollingStarted\"\r\n                ItemsSource=\"{Binding GroupedUsers}\" \r\n                ItemTemplate=\"{StaticResource RegularUserItemTemplate}\" />\r\n\r\n            <longListSelector:LongListSelector \r\n                Grid.Row=\"4\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                x:Name=\"SearchItems\"\r\n                Margin=\"-12,0,-12,0\"  \r\n                IsFlatList=\"True\"\r\n                ScrollingStarted=\"LongListSelector_OnScrollingStarted\"\r\n                ItemsSource=\"{Binding Items}\" \r\n                ItemTemplate=\"{StaticResource UserItemTemplate}\" />\r\n\r\n\r\n            <!--<Border Grid.Row=\"3\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"12,-22,12,20\" VerticalAlignment=\"Top\" BorderThickness=\"0.5\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\"/>-->\r\n\r\n        </Grid>\r\n    </Grid>\r\n\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/CreateDialogView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing Telegram.Controls.Extensions;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n\r\n    public partial class CreateDialogView : IDisposable\r\n    {\r\n        private IDisposable _keyPressSubscription;\r\n\r\n        public CreateDialogViewModel ViewModel\r\n        {\r\n            get { return DataContext as CreateDialogViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _createChatButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Create,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private bool _once;\r\n\r\n        private TextBox _searchBox;\r\n\r\n        public CreateDialogView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n\r\n            _createChatButton.Click += (sender, args) => ViewModel.Create();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                if (!_once)\r\n                {\r\n                    _once = true;\r\n\r\n                    _searchBox = SelectedUsers.FindChildOfType<TextBox>();\r\n\r\n                    if (_searchBox != null)\r\n                    {\r\n                        var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                            keh => { _searchBox.TextChanged += keh; },\r\n                            keh => { _searchBox.TextChanged -= keh; });\r\n\r\n                        _keyPressSubscription = keyPressEvents\r\n                            .Throttle(TimeSpan.FromSeconds(0.1))\r\n                            .ObserveOnDispatcher()\r\n                            .Subscribe(e =>\r\n                            {\r\n                                SearchItems.Visibility = string.IsNullOrEmpty(_searchBox.Text.Trim()) ? Visibility.Collapsed : Visibility.Visible;\r\n\r\n                                ViewModel.Search(_searchBox.Text);\r\n                            });\r\n                    }\r\n\r\n                    BuildLocalizedAppBar();\r\n                }\r\n\r\n                ViewModel.ScrollTo += OnViewModelScrollTo;\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.ScrollTo -= OnViewModelScrollTo;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelScrollTo(object sender, ScrollToEventArgs e)\r\n        {\r\n            if (e.User == null) return;\r\n\r\n            SelectedUsers.ScrollTo(e.User);\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SwivelShowAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return new SwivelHideAnimator { RootElement = LayoutRoot };\r\n        }\r\n\r\n        protected override void AnimationsComplete(AnimationType animationType)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                Title.Focus();\r\n            }\r\n\r\n            base.AnimationsComplete(animationType);\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_createChatButton);\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _keyPressSubscription.Dispose();\r\n        }\r\n\r\n        private void Contacts_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (_searchBox != null)\r\n            {\r\n                _searchBox.Focus();\r\n            }\r\n        }\r\n\r\n        private void SearchText_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (_searchBox != null\r\n                && _searchBox.SelectionStart == 0\r\n                && _searchBox.SelectionLength == 0\r\n                && e.Key == Key.Back)\r\n            {\r\n                ViewModel.DeleteLastUser();\r\n            }\r\n        }\r\n\r\n        private void LongListSelector_OnScrollingStarted(object sender, System.EventArgs e)\r\n        {\r\n            var focusElement = FocusManager.GetFocusedElement();\r\n            if (focusElement == _searchBox)\r\n            {\r\n                Self.Focus();\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            SearchItems.Visibility = Visibility.Collapsed;\r\n\r\n            var user = ((FrameworkElement)sender).DataContext as TLUserBase;\r\n            if (user != null)\r\n            {\r\n                ViewModel.ChooseContact(user);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/DialogDetailsView.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Dialogs.DialogDetailsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:triggers=\"clr-namespace:Telegram.Controls.Triggers;assembly=Telegram.Controls\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    micro:View.ApplyConventions=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    UseLayoutRounding=\"True\"\r\n    BackKeyPress=\"DialogDetailsView_OnBackKeyPress\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n    \r\n    <phone:PhoneApplicationPage.Resources>\r\n        <DataTemplate x:Key=\"UserMessageTemplate\">\r\n            <Grid x:Name=\"MainItemGrid2\">\r\n                <toolkit:ContextMenuService.ContextMenu>\r\n                    <toolkit:ContextMenu IsZoomEnabled=\"False\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" />\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" />\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"\r\n                                          Visibility=\"{Binding DataContext.IsBroadcast, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\"/>\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action CopyMessage($DataContext)]\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"\r\n                                          Visibility=\"{Binding Converter={StaticResource TextMessageToVisibilityConverter}}\"/>\r\n                    </toolkit:ContextMenu>\r\n                </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                <Grid x:Name=\"MainItemGrid\" >\r\n                    <Grid.Projection>\r\n                        <PlaneProjection RotationZ=\"180\"/>\r\n                    </Grid.Projection>\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n\r\n                    <CheckBox x:Name=\"SelectionBox\" IsChecked=\"{Binding IsSelected, Mode=TwoWay}\" \r\n                            Checked=\"SelectionBox_OnChecked\"\r\n                            Unchecked=\"SelectionBox_OnChecked\"\r\n                            Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                    <StackPanel Grid.Column=\"2\" Grid.Row=\"0\" Margin=\"0,12,24,0\" Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\">\r\n                        <Border Margin=\"0,0,0,-50\" Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\">\r\n                            <StackPanel Margin=\"0,6,0,50\">\r\n                                <TextBlock Text=\"{Binding From.FullName}\" \r\n                                               Visibility=\"{Binding Media, Converter={StaticResource MediaEmptyToVisibilityConverter}}\" \r\n                                               MaxHeight=\"22\" \r\n                                               Foreground=\"#99FFFFFF\" \r\n                                               Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                <Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenFwdContactDetails($DataContext)]\" Visibility=\"{Binding FwdFromId, Converter={StaticResource ExistsToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                                    <Grid Visibility=\"{Binding Message, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert}\">\r\n                                        <Grid.RowDefinitions>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                            <RowDefinition Height=\"*\"/>\r\n                                        </Grid.RowDefinitions>\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"*\"/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <TextBlock Grid.ColumnSpan=\"2\" Text=\"{Binding Resources.ForwardedMessage, Source={StaticResource Strings}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                        <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Text=\"{Binding Resources.From, Source={StaticResource Strings}, StringFormat='\\{0\\} '}\" Margin=\"12,-3,0,0\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                        <TextBlock Grid.Row=\"1\" Grid.Column=\"1\" Text=\"{Binding FwdFrom.FullName}\" Margin=\"0,-3,0,0\" HorizontalAlignment=\"Left\" TextTrimming=\"WordEllipsis\" MaxWidth=\"260\" MaxHeight=\"24.83\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </StackPanel>\r\n                        </Border>\r\n                        <ContentControl\r\n                            Background=\"Transparent\" \r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                            Width=\"{Binding ReplyWidth}\"\r\n                            Content=\"{Binding ReplyInfo.Reply}\" \r\n                            Margin=\"12,8,12,6\"\r\n                            ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            Visibility=\"{Binding ReplyVisibility}\"\r\n                            HorizontalAlignment=\"Stretch\"/>\r\n                        <emojiPanel:TelegramRichTextBox \r\n                                Canvas.ZIndex=\"2\"\r\n                                Margin=\"0,6,0,0\"\r\n                                Width=\"335\"\r\n                                Visibility=\"{Binding Media, Converter={StaticResource GeoLocationToVisibilityConverter}}\"\r\n                                Text=\"{Binding Message}\"\r\n                                HorizontalAlignment=\"Stretch\"\r\n                                Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"\r\n                                Style=\"{StaticResource InfiniteMessageBodyTelegramRichTextStyle}\"/>\r\n\r\n                        <ContentControl \r\n                                Background=\"Transparent\"\r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\"\r\n                                Margin=\"12,6,12,0\"\r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                HorizontalAlignment=\"Stretch\"\r\n                                Content=\"{Binding Media}\"\r\n                                ContentTemplate=\"{Binding Media, Converter={StaticResource MediaTemplateSelector}}\"/>\r\n                        <Border Canvas.ZIndex=\"1\" Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\" HorizontalAlignment=\"Stretch\" Margin=\"0,-1\">\r\n                            <Grid Margin=\"12,8,12,12\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <!--<TextBlock Grid.Column=\"0\" Margin=\"0,-7,0,-4\" Text=\"{Binding Unread, Converter={StaticResource UnreadMessageConverter}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSubtleStyle}\"\r\n                                               Visibility=\"{Binding Status, Converter={StaticResource StringEqualsToVisibilityConverter}, ConverterParameter=Confirmed}\"/>-->\r\n                                <TextBlock Grid.Column=\"0\" Margin=\"0,-7,0,-4\" Text=\"{Binding Status, Converter={StaticResource MessageStatusConverter}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                <TextBlock Grid.Column=\"1\" micro:Message.Attach=\"[Event Tap] = [Action Resend($DataContext)]\" Text=\"{Binding Resources.Retry, Source={StaticResource Strings}}\" \r\n                                               TextDecorations=\"Underline\" \r\n                                               Margin=\"4,-7,0,-4\" Foreground=\"#FFFFFFFF\" \r\n                                                 FontSize=\"{StaticResource PhoneFontSizeNormal}\" \r\n                                                 FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" \r\n                                                 Visibility=\"{Binding Status, Converter={StaticResource StringEqualsToVisibilityConverter}, ConverterParameter=Failed}\"/>\r\n                                <TextBlock Grid.Column=\"3\" Margin=\"0,-7,6,-4\" Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                <Image Grid.Column=\"4\" Height=\"18\" Stretch=\"UniformToFill\" Source=\"{Binding Status, Converter={StaticResource StatusToImageConverter}}\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </StackPanel>\r\n                    <Path Grid.Row=\"1\" Grid.Column=\"2\" Margin=\"0,0,36,0\" x:Name=\"RightBottomCorner\" Fill=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"  HorizontalAlignment=\"Right\" VerticalAlignment=\"Top\" Data=\"F1 M0,0 L1,1 L1,0\" Width=\"12\" Height=\"12\" Stretch=\"Fill\"/>\r\n                </Grid>\r\n                <Border x:Name=\"SelectionBorder\" \r\n                        Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" \r\n                        Hold=\"UIElement_OnHold\" \r\n                        micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  \r\n                        Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"ServiceMessageTemplate\">\r\n            <Grid Margin=\"48,12\" x:Name=\"MainItemGrid2\">\r\n                <toolkit:ContextMenuService.ContextMenu>\r\n                    <toolkit:ContextMenu IsZoomEnabled=\"False\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" />\r\n                    </toolkit:ContextMenu>\r\n                </toolkit:ContextMenuService.ContextMenu>\r\n                <Grid.Projection>\r\n                    <PlaneProjection RotationZ=\"180\"/>\r\n                </Grid.Projection>\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid HorizontalAlignment=\"Center\">\r\n                    <Border Margin=\"-6\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                    <TextBlock Margin=\"6,0\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" FontSize=\"20\" Text=\"{Binding Converter={StaticResource ServiceMessageToTextConverter}}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                </Grid>\r\n                <Grid Grid.Row=\"1\" \r\n                      Background=\"Transparent\"\r\n                      Width=\"100\" Height=\"100\" Margin=\"0,12,0,0\"\r\n                      micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\"\r\n                      Visibility=\"{Binding Action.Photo, Converter={StaticResource ExistsToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                    <Border Background=\"{StaticResource PhoneChromeBrush}\"/>\r\n                    <Image Source=\"{Binding Action.Photo, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=100}\" Stretch=\"UniformToFill\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n        \r\n        <DataTemplate x:Key=\"FriendMessageTemplate\">\r\n            <Grid x:Name=\"MainItemGrid2\">                \r\n                <toolkit:ContextMenuService.ContextMenu>\r\n                    <toolkit:ContextMenu IsZoomEnabled=\"False\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" />\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" />\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"\r\n                                          Visibility=\"{Binding DataContext.IsBroadcast, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\"/>                       \r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action CopyMessage($DataContext)]\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"\r\n                                          Visibility=\"{Binding Converter={StaticResource TextMessageToVisibilityConverter}}\"/>\r\n                    </toolkit:ContextMenu>\r\n                </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                <Grid x:Name=\"MainItemGrid\">\r\n                    <Grid.Projection>\r\n                        <PlaneProjection RotationZ=\"180\"/>\r\n                    </Grid.Projection>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"12\" />\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n\r\n                    <CheckBox Grid.Row=\"1\" IsChecked=\"{Binding IsSelected, Mode=TwoWay}\"\r\n                            Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n\r\n                    <Path x:Name=\"LeftUpCorner\" Grid.Column=\"1\" HorizontalAlignment=\"Left\" Fill=\"{StaticResource PhoneAccentBrush}\"  Margin=\"36,0,0,0\" VerticalAlignment=\"Bottom\" Data=\"F1 M0,0 L0,1 L1,1\" Width=\"12\" Height=\"12\" Stretch=\"Fill\"/>\r\n\r\n                    <StackPanel Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"24,0,0,12\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                        <Border Margin=\"0,0,0,-50\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                            <StackPanel Margin=\"0,6,0,50\">\r\n                                <TextBlock Text=\"{Binding From.FullName}\" \r\n                                               Visibility=\"{Binding Media, Converter={StaticResource MediaEmptyToVisibilityConverter}}\" \r\n                                               MaxHeight=\"22\" \r\n                                               Foreground=\"#99FFFFFF\" \r\n                                               Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                <Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenFwdContactDetails($DataContext)]\" Visibility=\"{Binding FwdFromId, Converter={StaticResource ExistsToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                                    <Grid Visibility=\"{Binding Message, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert}\">\r\n                                        <Grid.RowDefinitions>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                            <RowDefinition Height=\"*\"/>\r\n                                        </Grid.RowDefinitions>\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"*\"/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <TextBlock Grid.ColumnSpan=\"2\" Text=\"{Binding Resources.ForwardedMessage, Source={StaticResource Strings}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                        <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Text=\"{Binding Resources.From, Source={StaticResource Strings}, StringFormat='\\{0\\} '}\" Margin=\"12,-3,0,0\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                        <TextBlock Grid.Row=\"1\" Grid.Column=\"1\" Text=\"{Binding FwdFrom.FullName}\" Margin=\"0,-3,0,0\" HorizontalAlignment=\"Left\" TextTrimming=\"WordEllipsis\" MaxWidth=\"260\" MaxHeight=\"24.83\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </StackPanel>\r\n                        </Border>\r\n                        <ContentControl\r\n                            Background=\"Transparent\" \r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                            Width=\"{Binding ReplyWidth}\"\r\n                            Content=\"{Binding ReplyInfo.Reply}\" \r\n                            Margin=\"12,8,12,6\"\r\n                            ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            Visibility=\"{Binding ReplyVisibility}\"\r\n                            HorizontalAlignment=\"Stretch\"/>\r\n                        <emojiPanel:TelegramRichTextBox \r\n                                Canvas.ZIndex=\"2\"\r\n                                Margin=\"0,6,0,0\"\r\n                                Visibility=\"{Binding Media, Converter={StaticResource GeoLocationToVisibilityConverter}}\"\r\n                                Width=\"335\"\r\n                                Text=\"{Binding Message}\"\r\n                                Style=\"{StaticResource InfiniteMessageBodyTelegramRichTextStyle}\"/>\r\n                        <ContentControl\r\n                                Background=\"Transparent\"\r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\"\r\n                                Margin=\"12,6,12,0\"\r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                HorizontalAlignment=\"Stretch\"\r\n                                Content=\"{Binding Media}\"\r\n                                ContentTemplate=\"{Binding Media, Converter={StaticResource MediaTemplateSelector}}\"/>\r\n                        <Border Canvas.ZIndex=\"1\" Margin=\"0,-1\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                            <Grid Margin=\"12,8,12,12\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <!--<TextBlock Grid.Column=\"0\" Margin=\"0,-7,0,-4\" Text=\"{Binding Unread, Converter={StaticResource UnreadMessageConverter}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n                                <TextBlock Grid.Column=\"1\" Margin=\"0,-7,0,-4\" Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </StackPanel>\r\n                </Grid>\r\n                <Border x:Name=\"SelectionBorder\" Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" Hold=\"UIElement_OnHold\" micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n            </Grid>\r\n            \r\n            \r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"ChatFriendMessageTemplate\">\r\n            <Grid x:Name=\"MainItemGrid2\">\r\n                \r\n                <toolkit:ContextMenuService.ContextMenu>\r\n                    <toolkit:ContextMenu IsZoomEnabled=\"False\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" />\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" />\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"\r\n                                          Visibility=\"{Binding DataContext.IsBroadcast, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\"/>\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action CopyMessage($DataContext)]\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" \r\n                                          Visibility=\"{Binding Converter={StaticResource TextMessageToVisibilityConverter}}\"/>\r\n                    </toolkit:ContextMenu>\r\n                </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                <Grid x:Name=\"MainItemGrid\">\r\n                    <Grid.Projection>\r\n                        <PlaneProjection RotationZ=\"180\"/>\r\n                    </Grid.Projection>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"12\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n\r\n                    <CheckBox Grid.Row=\"1\" IsChecked=\"{Binding IsSelected, Mode=TwoWay}\" \r\n                            Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n\r\n\r\n                    <!--<Image Grid.Row=\"1\" Grid.Column=\"1\" Visibility=\"{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Source=\"{Binding Converter={StaticResource ThemeToCheckImageConverter}}\" Width=\"48\" Height=\"48\"/>-->\r\n\r\n\r\n                    <Grid x:Name=\"grid\" Grid.Row=\"1\" Grid.Column=\"1\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"69\" />\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n\r\n                        <!--Photo-->\r\n                        <Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap]=[Action ShowUserProfile($DataContext)]\">\r\n                            <Grid Margin=\"24,0,0,0\" Width=\"45\" Height=\"45\" VerticalAlignment=\"Top\">\r\n                                <Border Background=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n                                <Image Source=\"/Images/Placeholder/placeholder.user.transparent-WXGA.png\"/>\r\n                                <Image Source=\"{Binding From.Photo, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n\r\n\r\n\r\n                        <!--Accent overlay-->\r\n                        <Path Grid.Column=\"1\" HorizontalAlignment=\"Right\" Margin=\"0,19,0,0\" VerticalAlignment=\"Top\" Data=\"F1 M0,0 L1,1 L1,0\" Width=\"12\" Height=\"12\" Stretch=\"Fill\">\r\n                            <Path.Fill>\r\n                                <SolidColorBrush Color=\"{StaticResource PhoneAccentColor}\"/>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Border Grid.Column=\"2\" Margin=\"0,0,0,12\">\r\n                            <Border.Background>\r\n                                <SolidColorBrush Color=\"{StaticResource PhoneAccentColor}\"/>\r\n                            </Border.Background>\r\n                        </Border>\r\n\r\n                        <!--Message content-->\r\n                        <StackPanel Grid.Column=\"2\" Margin=\"0,0,0,12\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                            <Border Margin=\"0,0,0,-50\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                                <StackPanel Margin=\"0,6,0,50\">\r\n                                    <TextBlock Text=\"{Binding From.FullName}\" \r\n                                               Visibility=\"{Binding Media, Converter={StaticResource MediaEmptyToVisibilityConverter}}\" \r\n                                               MaxHeight=\"22\" \r\n                                               Foreground=\"#99FFFFFF\" \r\n                                               Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                    <Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenFwdContactDetails($DataContext)]\" Visibility=\"{Binding FwdFromId, Converter={StaticResource ExistsToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                                        <Grid Visibility=\"{Binding Message, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert}\">\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"Auto\"/>\r\n                                                <RowDefinition Height=\"*\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"Auto\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <TextBlock Grid.ColumnSpan=\"2\" Text=\"{Binding Resources.ForwardedMessage, Source={StaticResource Strings}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                            <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Text=\"{Binding Resources.From, Source={StaticResource Strings}, StringFormat='\\{0\\} '}\" Margin=\"12,-3,0,0\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                            <TextBlock Grid.Row=\"1\" Grid.Column=\"1\" Text=\"{Binding FwdFrom.FullName}\" Margin=\"0,-3,0,0\" HorizontalAlignment=\"Left\" TextTrimming=\"WordEllipsis\" MaxWidth=\"260\" MaxHeight=\"24.83\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </StackPanel>\r\n                            </Border>\r\n                            <ContentControl\r\n                                Background=\"Transparent\" \r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                                Width=\"{Binding ReplyWidth}\"\r\n                                Content=\"{Binding ReplyInfo.Reply}\" \r\n                                Margin=\"12,8,12,6\"\r\n                                ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                Visibility=\"{Binding ReplyVisibility}\"\r\n                                HorizontalAlignment=\"Stretch\"/>\r\n                            <emojiPanel:TelegramRichTextBox \r\n                                Canvas.ZIndex=\"2\"\r\n                                Margin=\"0,6,0,0\"\r\n                                Width=\"335\"\r\n                                Visibility=\"{Binding Media, Converter={StaticResource GeoLocationToVisibilityConverter}}\"\r\n                                Text=\"{Binding Message}\"\r\n                                Style=\"{StaticResource InfiniteMessageBodyTelegramRichTextStyle}\"/>\r\n                            <ContentControl\r\n                                Background=\"Transparent\"\r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\"\r\n                                Margin=\"12,0,12,0\"\r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                HorizontalAlignment=\"Stretch\"\r\n                                Content=\"{Binding Media}\"\r\n                                ContentTemplate=\"{Binding Media, Converter={StaticResource MediaTemplateSelector}}\"/>\r\n                            <Border Canvas.ZIndex=\"1\" Margin=\"0,-1\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                                <Grid Margin=\"12,8,12,12\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <!--<TextBlock Grid.Column=\"0\" Margin=\"0,-7,0,-4\" Text=\"{Binding Unread, Converter={StaticResource UnreadMessageConverter}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n                                    <TextBlock Grid.Column=\"1\" Margin=\"0,-7,0,-4\" Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                </Grid>\r\n                            </Border>\r\n                        </StackPanel>\r\n                    </Grid>\r\n                </Grid>\r\n                <Border x:Name=\"SelectionBorder\" Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" Hold=\"UIElement_OnHold\" micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n        \r\n        <templateSelectors:MessageTemplateSelector \r\n            x:Key=\"MessageTemplateSelector\"\r\n            UserMessageTemplate=\"{StaticResource UserMessageTemplate}\"\r\n            ChatFriendMessageTemplate=\"{StaticResource ChatFriendMessageTemplate}\"\r\n            FriendMessageTemplate=\"{StaticResource FriendMessageTemplate}\"\r\n            ServiceMessageTemplate=\"{StaticResource ServiceMessageTemplate}\"/>\r\n    </phone:PhoneApplicationPage.Resources>\r\n \r\n    <i:Interaction.Behaviors>\r\n        <behaviors:ThemeToStateBehavior LightState=\"LightState\" DarkState=\"DarkState\"/>\r\n    </i:Interaction.Behaviors>\r\n\r\n    <Grid>\r\n        <ContentControl \r\n            HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" \r\n            HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"  \r\n            Content=\"{Binding StateService}\" \r\n            ContentTemplate=\"{Binding StateService.CurrentBackground, Converter={StaticResource DialogDetailsBackgroundConverter}}\"/>\r\n        <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Grid.RenderTransform>\r\n            <!--<VisualStateManager.VisualStateGroups>\r\n                <VisualStateGroup x:Name=\"ThemeStateGroup\">\r\n                    <VisualState x:Name=\"LightState\">\r\n                        <Storyboard>\r\n                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DarkThemeImage\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                    <VisualState x:Name=\"DarkState\">\r\n                        <Storyboard>\r\n                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"LightThemeImage\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>-->  \r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"*\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <Button x:Name=\"OpenPeerDetails\"\r\n                toolkit:TiltEffect.IsTiltEnabled=\"True\" \r\n                Margin=\"0,25,0,12\" Grid.Row=\"0\" VerticalAlignment=\"Bottom\" Style=\"{StaticResource DialogDetailsCaptionButtonStyle}\">\r\n                <StackPanel>\r\n                    <StackPanel Orientation=\"Horizontal\" x:Name=\"Title\">\r\n                        <StackPanel.RenderTransform>\r\n                            <CompositeTransform/>\r\n                        </StackPanel.RenderTransform>\r\n                        <TextBlock HorizontalAlignment=\"Left\" Text=\"{Binding With, Converter={StaticResource DialogCaptionConverter}}\" MaxHeight=\"42.56\" Foreground=\"{Binding StateService.CurrentForegroundBrush}\" Style=\"{StaticResource PhoneTextTitle2Style}\"/>\r\n                        <Image Width=\"21\" Height=\"21\" VerticalAlignment=\"Bottom\" Source=\"/Images/Dialogs/chat.mute-WXGA.png\" Margin=\"0,0,0,7\" Visibility=\"{Binding With.NotifySettings, Converter={StaticResource NotifySettingsToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n                    </StackPanel>\r\n                    <TextBlock x:Name=\"Subtitle\" Text=\"{Binding Subtitle}\">\r\n                        <TextBlock.Style>\r\n                            <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                                <Setter Property=\"Margin\" Value=\"12,-4,0,0\"/>\r\n                            </Style>\r\n                        </TextBlock.Style>\r\n                    </TextBlock>\r\n                </StackPanel>\r\n            </Button>\r\n\r\n\r\n            <Border x:Name=\"DialogPhoto\" Margin=\"12,41,24,0\" VerticalAlignment=\"Top\" Grid.Row=\"0\" Grid.Column=\"1\" Width=\"54\" Height=\"54\" Background=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\">\r\n                <Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenChatPhoto]\">\r\n                    <Image Source=\"{Binding With, Converter={StaticResource PlaceholderDefaultImageConverter}}\"/>\r\n                    <Image Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                </Grid>\r\n            </Border>\r\n\r\n            <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Grid.ColumnSpan=\"2\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"*\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"72\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <Grid \r\n                    VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" \r\n                    Visibility=\"{Binding IsEmptyDialog, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                    <Border Margin=\"-12\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                    <StackPanel Margin=\"0,40,0,0\">\r\n                        <Grid Width=\"81\">\r\n                            <Image Source=\"{Binding EmptyDialogImageSource}\" Stretch=\"UniformToFill\"/>\r\n                        </Grid>\r\n                        <TextBlock Text=\"{Binding With, Converter={StaticResource EmptyDialogMessageConverter}}\" Margin=\"12,40,12,0\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n\r\n                <controls:MultiTemplateLazyListBox \r\n                    x:Name=\"Items\" Margin=\"0,-18,0,0\"\r\n                    ItemsSource=\"{Binding Items}\"\r\n                    IsScrolling=\"{Binding IsScrolling, Mode=TwoWay}\"\r\n                    CloseToEnd=\"Items_OnCloseToEnd\"\r\n                    ManipulationStarted=\"Items_OnManipulationStarted\"\r\n                    TemplateSelector=\"{StaticResource MessageTemplateSelector}\"\r\n                    Style=\"{StaticResource LazyListBoxInverseStyle}\">\r\n                    <controls:MultiTemplateLazyListBox.ItemsPanel>\r\n                        <ItemsPanelTemplate>\r\n                            <VirtualizingStackPanel/>\r\n                        </ItemsPanelTemplate>\r\n                    </controls:MultiTemplateLazyListBox.ItemsPanel>\r\n                    <controls:MultiTemplateLazyListBox.Projection>\r\n                        <PlaneProjection RotationZ=\"180\"/>\r\n                    </controls:MultiTemplateLazyListBox.Projection>\r\n                    <i:Interaction.Triggers>\r\n                        <triggers:CompressionTrigger CompressionType=\"Bottom\">\r\n                            <micro:ActionMessage MethodName=\"LoadNextSlice\"/>\r\n                        </triggers:CompressionTrigger>\r\n                    </i:Interaction.Triggers>\r\n                </controls:MultiTemplateLazyListBox>\r\n                <Image x:Name=\"MessagesCache\" Source=\"{Binding With.Bitmap}\" Margin=\"0,-18,0,0\">\r\n                    <Image.Projection>\r\n                        <PlaneProjection RotationZ=\"180\"/>\r\n                    </Image.Projection>\r\n                </Image>\r\n\r\n                <!-- Usernames -->\r\n                <Grid VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" Margin=\"121,-38,24,-12\" MaxHeight=\"124\">\r\n                    <Grid.Resources>\r\n\r\n                        <DataTemplate x:Key=\"UsernameHintTemplate\">\r\n                            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"UsernameHint_OnTap\">\r\n                                <Grid Height=\"41\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Grid Margin=\"12,0,0,0\" Width=\"30\" Height=\"30\" VerticalAlignment=\"Center\">\r\n                                        <Border Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n                                        <TextBlock Margin=\"0,0,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" FontSize=\"16\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                                        <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                                    </Grid>\r\n\r\n                                    <TextBlock Grid.Column=\"1\" Text=\"{Binding FullName}\" Foreground=\"Black\" Margin=\"12,0,12,0\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" VerticalAlignment=\"Center\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                    <TextBlock Grid.Column=\"2\" Text=\"{Binding UserName, StringFormat='@\\{0\\}'}\" Foreground=\"Black\" Margin=\"0,0,0,0\" VerticalAlignment=\"Center\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                </Grid>\r\n                            </ListBoxItem>\r\n                        </DataTemplate>\r\n                    </Grid.Resources>\r\n                    <Grid x:Name=\"UsernameHintsPanel\" Visibility=\"Visible\" CacheMode=\"BitmapCache\">\r\n                        <Border Background=\"White\" Opacity=\"0.9\" />\r\n                        <ItemsControl ItemsSource=\"{Binding UsernameHints}\" ItemTemplate=\"{StaticResource UsernameHintTemplate}\" ManipulationStarted=\"UsernameHints_OnManipulationStarted\">\r\n                            <ItemsControl.ItemsPanel>\r\n                                <ItemsPanelTemplate>\r\n                                    <VirtualizingStackPanel/>\r\n                                </ItemsPanelTemplate>\r\n                            </ItemsControl.ItemsPanel>\r\n                            <ItemsControl.Template>\r\n                                <ControlTemplate TargetType=\"ItemsControl\">\r\n                                    <ScrollViewer HorizontalScrollBarVisibility=\"Disabled\" VerticalScrollBarVisibility=\"Auto\">\r\n                                        <ItemsPresenter/>\r\n                                    </ScrollViewer>\r\n                                </ControlTemplate>\r\n                            </ItemsControl.Template>\r\n                        </ItemsControl>\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <Grid Grid.Row=\"1\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Grid Visibility=\"{Binding Reply, Converter={StaticResource ExistsToVisibilityConverter}, FallbackValue=Collapsed}\" Margin=\"121,12,24,-12\" Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\">\r\n                            <ContentControl\r\n                            x:Name=\"ReplyMessage\" \r\n                            Content=\"{Binding Reply}\" \r\n                            Height=\"66\" Margin=\"12,0\"\r\n                            ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            HorizontalAlignment=\"Stretch\"/>\r\n\r\n                            <Border Background=\"Transparent\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Top\" micro:Message.Attach=\"[Event Tap] = [Action DeleteReply]\">\r\n                                <Image Source=\"/Images/Messages/message.deletereply.png\" Width=\"13\" Margin=\"8\" Opacity=\"0.6\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                        <controls:WatermarkedTextBox \r\n                            x:Name=\"InputMessage\"\r\n                            Grid.Row=\"1\"\r\n                            Visibility=\"{Binding With, Converter={StaticResource ChatForbiddenToVisibilityConverter}, ConverterParameter=invert}\"\r\n                            Margin=\"109,0,12,12\" \r\n                            HorizontalContentAlignment=\"Left\" \r\n                            HorizontalAlignment=\"Stretch\"\r\n                            Watermark=\"{Binding Resources.YourMessage, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\" \r\n                            WatermarkForeground=\"{Binding WatermarkForeground}\"\r\n                            Text=\"{Binding Text, Mode=TwoWay}\"\r\n                            MaxHeight=\"140\" VerticalAlignment=\"Bottom\" AcceptsReturn=\"True\" \r\n                            KeyDown=\"InputMessage_OnKeyDown\"\r\n                            GotFocus=\"InputMessage_OnGotFocus\"\r\n                            LostFocus=\"InputMessage_OnLostFocus\"\r\n                            TextWrapping=\"Wrap\" \r\n                            Style=\"{StaticResource MessageTextBoxStyle}\"\r\n                            InputScope=\"Text\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </controls:WatermarkedTextBox>\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <Grid Margin=\"0,33,0,0\" Grid.Row=\"3\">\r\n                    <ContentControl x:Name=\"EmojiPlaceholder\" HorizontalContentAlignment=\"Stretch\" Visibility=\"Collapsed\"/>\r\n                    <dialogs:CommandsControl/>\r\n                </Grid>\r\n            </Grid>\r\n\r\n            <Border Height=\"72\" Grid.ColumnSpan=\"5\" Grid.RowSpan=\"5\"\r\n                Visibility=\"{Binding With, Converter={StaticResource ChatForbiddenToVisibilityConverter}}\"\r\n                HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Bottom\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n                <Button x:Name=\"DeleteAndExitGroup\" Content=\"{Binding Resources.Delete, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n            </Border>\r\n            <ContentControl Grid.RowSpan=\"2\" Grid.ColumnSpan=\"2\" x:Name=\"ChooseAttachment\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" />\r\n\r\n        </Grid>\r\n\r\n        <ContentControl Grid.RowSpan=\"2\" Grid.ColumnSpan=\"2\" x:Name=\"ImageEditor\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n        <!--For performance reason with Pan&Zoom set ImageViewerView on Top of main Grid-->\r\n        <ContentControl Grid.RowSpan=\"2\" Grid.ColumnSpan=\"2\" x:Name=\"ImageViewer\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"\r\n                        Visibility=\"{Binding ImageViewer.IsOpen, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n        <!--<media:ImageViewerView x:Name=\"ImageViewer\" Visibility=\"{Binding IsOpen, Converter={StaticResource BooleanToVisibilityConverter}}\" DataContext=\"{Binding ImageViewer}\" Grid.RowSpan=\"2\" Grid.ColumnSpan=\"2\"/>-->\r\n    </Grid>\r\n\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/DialogDetailsView.xaml.cs",
    "content": "﻿using System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Media;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class DialogDetailsView\r\n    {\r\n        private DialogDetailsViewModel ViewModel\r\n        {\r\n            get { return DataContext as DialogDetailsViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _sendButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Send,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.send.text.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _attachButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Attach,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.attach.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _smileButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Emoji,\r\n            //IsEnabled = false,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.smile.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _manageButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Manage,\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.manage.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _forwardButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Forward,\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.forwardmessage.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _deleteButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Delete,\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.delete.png\", UriKind.Relative)\r\n        };\r\n\r\n        private EmojiControl _emojiKeyboard;\r\n\r\n        private TranslateTransform _frameTransform;\r\n\r\n        public static readonly DependencyProperty RootFrameTransformProperty = DependencyProperty.Register(\r\n            \"RootFrameTransformProperty\", typeof(double), typeof(DialogDetailsView), new PropertyMetadata(OnRootFrameTransformChanged));\r\n\r\n        private static void OnRootFrameTransformChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var view = d as DialogDetailsView;\r\n            if (view != null)\r\n            {\r\n                view._frameTransform.Y = 0;\r\n            }\r\n        }\r\n\r\n        public double RootFrameTransform\r\n        {\r\n            get { return (double)GetValue(RootFrameTransformProperty); }\r\n            set { SetValue(RootFrameTransformProperty, value); }\r\n        }\r\n\r\n        private void SetRootFrameBinding()\r\n        {\r\n            var frame = (Frame)Application.Current.RootVisual;\r\n            _frameTransform = ((TranslateTransform)((TransformGroup)frame.RenderTransform).Children[0]);\r\n            var binding = new Binding(\"Y\")\r\n            {\r\n                Source = _frameTransform\r\n            };\r\n            SetBinding(RootFrameTransformProperty, binding);\r\n        }\r\n\r\n        private void RemoveRootFrameBinding()\r\n        {\r\n            ClearValue(RootFrameTransformProperty);\r\n        }\r\n\r\n        public DialogDetailsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n\r\n            _sendButton.Click += (sender, args) => ViewModel.Send();\r\n            _attachButton.Click += (sender, args) =>\r\n            {\r\n                EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n                //DialogPhoto.Visibility = Visibility.Visible;\r\n                //Title.Visibility = Visibility.Visible;\r\n\r\n                ChooseAttachment.Focus();\r\n                ViewModel.Attach();\r\n            };\r\n            _smileButton.Click += (sender, args) =>\r\n            {\r\n                if (_emojiKeyboard == null)\r\n                {\r\n                    _emojiKeyboard = EmojiControl.GetInstance();\r\n\r\n                    _emojiKeyboard.BindTextBox(InputMessage);\r\n                    EmojiPlaceholder.Content = _emojiKeyboard;\r\n                    _emojiKeyboard.IsOpen = true;\r\n                }\r\n\r\n                if (EmojiPlaceholder.Visibility == Visibility.Visible)\r\n                {\r\n                    if (InputMessage == FocusManager.GetFocusedElement())\r\n                    {\r\n                        _smileButtonPressed = true;\r\n\r\n                        EmojiPlaceholder.Opacity = 1.0;\r\n                        EmojiPlaceholder.Height = EmojiControl.PortraitOrientationHeight;\r\n                        Items.Focus();\r\n                    }\r\n                    else\r\n                    {\r\n                        EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n                        //DialogPhoto.Visibility = Visibility.Visible;\r\n                        //Title.Visibility = Visibility.Visible;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    var awaitKeyboardDown = false;\r\n                    if (InputMessage == FocusManager.GetFocusedElement())\r\n                    {\r\n                        awaitKeyboardDown = true;\r\n                        Items.Focus();\r\n                    }\r\n\r\n                    ThreadPool.QueueUserWorkItem(state =>\r\n                    {\r\n                        if (awaitKeyboardDown)\r\n                        {\r\n                            Thread.Sleep(400);\r\n                        }\r\n                        Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                        {\r\n                            EmojiPlaceholder.Opacity = 1.0;\r\n                            EmojiPlaceholder.Visibility = Visibility.Visible;\r\n                            //DialogPhoto.Visibility = Visibility.Collapsed;\r\n                            //Title.Visibility = Visibility.Collapsed;\r\n                        });\r\n                    });\r\n                }\r\n            };\r\n            _manageButton.Click += (sender, args) => SwitchToSelectionMode();\r\n            _forwardButton.Click += (sender, args) =>\r\n            {\r\n                var selectedItems = ViewModel.Items.Where(x => x.Id != null && x.IsSelected).ToList();\r\n                if (selectedItems.Count == 0) return;\r\n\r\n                ViewModel.IsSelectionEnabled = false;\r\n\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    try\r\n                    {\r\n                        if (Items.Visibility == Visibility.Visible)\r\n                        {\r\n                            var writeableBitmap = new WriteableBitmap(Items, null);\r\n                            ViewModel.With.Bitmap = writeableBitmap;\r\n                        }\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"WritableBitmap exception \" + ex);\r\n                    }\r\n\r\n                    ViewModel.ForwardMessages(selectedItems);\r\n                });\r\n            };\r\n            _deleteButton.Click += (sender, args) => ViewModel.DeleteMessages();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                SetRootFrameBinding();\r\n\r\n                if (!ViewModel.StateService.IsEmptyBackground)\r\n                {\r\n                    var color = Colors.White;\r\n                    color.A = 254;\r\n                    SystemTray.ForegroundColor = color;\r\n                }\r\n\r\n                if (ViewModel.StateService.CurrentBackground != null)\r\n                {\r\n                    var color = Colors.White;\r\n                    color.A = 254;\r\n                    SystemTray.ForegroundColor = color;\r\n                }\r\n\r\n                if (ViewModel.With is TLBroadcastChat)\r\n                {\r\n                    _forwardButton.IsEnabled = false;\r\n                }\r\n\r\n                ThreadPool.QueueUserWorkItem(state =>\r\n                {\r\n                    Thread.Sleep(300);\r\n\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        if (ViewModel.StateService.FocusOnInputMessage)\r\n                        {\r\n                            ViewModel.StateService.FocusOnInputMessage = false;\r\n                            InputMessage.Focus();\r\n                        }\r\n                    });\r\n                });\r\n                if (ViewModel.ChooseAttachment != null)\r\n                {\r\n                    ViewModel.ChooseAttachment.PropertyChanged += OnChooseAttachmentPropertyChanged;\r\n                }\r\n                if (ViewModel.ImageViewer != null)\r\n                {\r\n                    ViewModel.ImageViewer.PropertyChanged += OnImageViewerPropertyChanged;\r\n                }\r\n                if (ViewModel.ImageEditor != null)\r\n                {\r\n                    ViewModel.ImageEditor.PropertyChanged += OnImageEditorPropertyChanged;\r\n                }\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n                ViewModel.ScrollToBottom += OnViewModelScrollToBottom;\r\n\r\n                BuildLocalizedAppBar();\r\n                //MessageBox.Show(\"Time: \" + timer.Elapsed);\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                RemoveRootFrameBinding();\r\n\r\n                if (ViewModel.ChooseAttachment != null)\r\n                {\r\n                    ViewModel.ChooseAttachment.PropertyChanged -= OnChooseAttachmentPropertyChanged;\r\n                }\r\n                if (ViewModel.ImageViewer != null)\r\n                {\r\n                    ViewModel.ImageViewer.PropertyChanged -= OnImageViewerPropertyChanged;\r\n                }\r\n                if (ViewModel.ImageEditor != null)\r\n                {\r\n                    ViewModel.ImageEditor.PropertyChanged -= OnImageEditorPropertyChanged;\r\n                }\r\n                ViewModel.ScrollToBottom -= OnViewModelScrollToBottom;\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelScrollToBottom(object sender, System.EventArgs e)\r\n        {\r\n            if (ViewModel.Items.Count > 0)\r\n            {\r\n                Items.ScrollIntoView(ViewModel.Items[0]);\r\n            }\r\n        }\r\n\r\n        private void OnChooseAttachmentPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ChooseAttachment.IsOpen))\r\n            {\r\n                Items.IsHitTestVisible = !ViewModel.ChooseAttachment.IsOpen && (ViewModel.ImageViewer == null || !ViewModel.ImageViewer.IsOpen);\r\n\r\n                return;\r\n                // ApplicationBar скрывается в коде ChooseAttachmentView\r\n                //if (ViewModel.ChooseAttachment.IsOpen)\r\n                //{\r\n                //    _prevApplicationBar = ApplicationBar;\r\n                //    ApplicationBar = ((ChooseAttachmentView)ChooseAttachment.Content).ApplicationBar;\r\n                //}\r\n                //else\r\n                //{\r\n                //    if (_prevApplicationBar != null)\r\n                //    {\r\n                //        ApplicationBar = _prevApplicationBar;\r\n                //    }\r\n                //}\r\n            }\r\n        }\r\n\r\n        private IApplicationBar _prevApplicationBar;\r\n\r\n        private void OnImageViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer.IsOpen))\r\n            {\r\n                if (ViewModel.ImageViewer.IsOpen)\r\n                {\r\n                    _prevApplicationBar = ApplicationBar;\r\n                    ApplicationBar = ((ImageViewerView)ImageViewer.Content).ApplicationBar;\r\n                }\r\n                else\r\n                {\r\n                    if (_prevApplicationBar != null)\r\n                    {\r\n                        ApplicationBar = _prevApplicationBar;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnImageEditorPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageEditor.IsOpen))\r\n            {\r\n                Items.IsHitTestVisible = !ViewModel.ImageEditor.IsOpen && (ViewModel.ChooseAttachment == null || !ViewModel.ChooseAttachment.IsOpen);\r\n\r\n                if (ViewModel.ImageEditor.IsOpen)\r\n                {\r\n                    _prevApplicationBar = ApplicationBar;\r\n                    ApplicationBar = ((ImageEditorView)ImageEditor.Content).ApplicationBar;\r\n                }\r\n                else\r\n                {\r\n                    if (_prevApplicationBar != null)\r\n                    {\r\n                        ApplicationBar = _prevApplicationBar;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ScrollToBottomVisibility))\r\n            {\r\n                if (ViewModel.ScrollToBottomVisibility == Visibility.Visible)\r\n                {\r\n                    //ShowScrollToBottomButton();\r\n                }\r\n                else\r\n                {\r\n                    //HideScrollToBottomButton();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.Reply))\r\n            {\r\n                if (ViewModel.Reply != null)\r\n                {\r\n                    if (ViewModel.Reply is TLMessagesContainter)\r\n                    {\r\n\r\n                    }\r\n                    else\r\n                    {\r\n                        InputMessage.Focus();\r\n                    }\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsSelectionEnabled))\r\n            {\r\n                if (ViewModel.IsSelectionEnabled)\r\n                {\r\n                    SwitchToSelectionMode();\r\n                }\r\n                else\r\n                {\r\n                    SwitchToNormalMode();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ChooseAttachment)\r\n                && ViewModel.ChooseAttachment != null)\r\n            {\r\n                ViewModel.ChooseAttachment.PropertyChanged += OnChooseAttachmentPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer)\r\n                && ViewModel.ImageViewer != null)\r\n            {\r\n                ViewModel.ImageViewer.PropertyChanged += OnImageViewerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageEditor)\r\n            && ViewModel.ImageEditor != null)\r\n            {\r\n                ViewModel.ImageEditor.PropertyChanged += OnImageEditorPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.With))\r\n            {\r\n                ApplicationBar.IsVisible = !ViewModel.IsChatForbidden && !ViewModel.IsChooseAttachmentOpen;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.CanSend))\r\n            {\r\n                _sendButton.IsEnabled = ViewModel.CanSend;\r\n            }\r\n        }\r\n\r\n        private void SwitchToSelectionMode()\r\n        {\r\n            Items.Focus();\r\n            ViewModel.IsSelectionEnabled = true;\r\n            EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n\r\n            ApplicationBar.Buttons.Clear();\r\n            ApplicationBar.Buttons.Add(_forwardButton);\r\n            ApplicationBar.Buttons.Add(_deleteButton);\r\n        }\r\n\r\n        private void SwitchToNormalMode()\r\n        {\r\n            ViewModel.IsSelectionEnabled = false;\r\n\r\n            ApplicationBar.Buttons.Clear();\r\n\r\n            ApplicationBar.Buttons.Clear();\r\n            ApplicationBar.Buttons.Add(_sendButton);\r\n            ApplicationBar.Buttons.Add(_attachButton);\r\n            ApplicationBar.Buttons.Add(_smileButton);\r\n            ApplicationBar.Buttons.Add(_manageButton);\r\n        }\r\n\r\n        private bool _firstRun = true;\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (!_firstRun) return;\r\n            _firstRun = false;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Opacity = 0.99;\r\n            \r\n            ApplicationBar.Buttons.Add(_sendButton);\r\n            ApplicationBar.Buttons.Add(_attachButton);\r\n            ApplicationBar.Buttons.Add(_smileButton);\r\n            ApplicationBar.Buttons.Add(_manageButton);\r\n\r\n            _sendButton.IsEnabled = ViewModel.CanSend;\r\n            ApplicationBar.IsVisible = !ViewModel.IsChatForbidden && !ViewModel.IsChooseAttachmentOpen;\r\n        }\r\n\r\n\r\n#if DEBUG\r\n        ///<summary>\r\n        ///Add a finalizer to check for memory leaks\r\n        ///</summary>\r\n        //~DialogDetailsView()\r\n        //{\r\n        //    TLUtils.WritePerformance(\"DialogDetailsView finalizer\");\r\n        //}\r\n#endif\r\n\r\n        private void DialogDetailsView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            if (ViewModel == null) return;\r\n\r\n            if (ViewModel.ImageEditor != null\r\n                && ViewModel.ImageEditor.IsOpen)\r\n            {\r\n                ViewModel.ImageEditor.CloseEditor();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.ImageViewer != null\r\n                && ViewModel.ImageViewer.IsOpen)\r\n            {\r\n                ViewModel.ImageViewer.CloseViewer();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.ChooseAttachment != null\r\n                && ViewModel.ChooseAttachment.IsOpen)\r\n            {\r\n                ViewModel.ChooseAttachment.Close();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.IsSelectionEnabled)\r\n            {\r\n                ViewModel.IsSelectionEnabled = false;\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (!NavigationService.BackStack.Any())\r\n            {\r\n                e.Cancel = true;\r\n                ViewModel.NavigateToShellViewModel();\r\n\r\n                return;\r\n            }\r\n\r\n            _isBackwardOutAnimation = true;\r\n\r\n            try\r\n            {\r\n                if (Items.Visibility == Visibility.Visible)\r\n                {\r\n                    var writeableBitmap = new WriteableBitmap(Items, null);\r\n                    ViewModel.With.SetBitmap(writeableBitmap);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"WritableBitmap exception \" + ex);\r\n            }\r\n\r\n            RunAnimation();\r\n\r\n            Items.DetachPropertyListener();\r\n            ViewModel.CancelDownloading();\r\n        }\r\n\r\n        public void RunAnimation()\r\n        {\r\n            if (_isBackwardOutAnimation)\r\n            {\r\n                _isBackwardOutAnimation = false;\r\n\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation);\r\n\r\n                storyboard.Begin();\r\n            }\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.LoadNextSlice();\r\n        }\r\n\r\n        //private readonly IDisposable _keyPressSubscription;\r\n\r\n        //public void Dispose()\r\n        //{\r\n        //    _keyPressSubscription.Dispose();\r\n        //}\r\n        private void CopyMessage_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var message = ((MenuItem) sender).DataContext as TLMessage;\r\n\r\n            ViewModel.CopyMessage(message);\r\n        }\r\n\r\n\r\n        private void UIElement_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void SelectionBox_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardOut)\r\n            {\r\n                if (!string.IsNullOrEmpty(toOrFrom.OriginalString)\r\n                    && toOrFrom.OriginalString.Contains(\"ShellView.xaml\"))\r\n                {\r\n                    return null;\r\n                }\r\n            }\r\n\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                Items.Opacity = 0.0;\r\n                Items.IsHitTestVisible = false;\r\n                return GetContinuumAnimation(Title, animationType);\r\n            }\r\n\r\n            if (animationType == AnimationType.NavigateBackwardOut)\r\n            {\r\n                return null;\r\n            }\r\n            return base.GetAnimation(animationType, toOrFrom);\r\n\r\n        }\r\n\r\n        protected override void AnimationsComplete(AnimationType animationType)\r\n        {\r\n\r\n            base.AnimationsComplete(animationType);\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                Items.Opacity = 1.0;\r\n                Items.IsHitTestVisible = true;\r\n                MessagesCache.Visibility = Visibility.Collapsed;\r\n                ViewModel.ForwardInAnimationComplete();\r\n            }\r\n\r\n            if (animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                //ViewModel.BackwardInAnimationComplete();\r\n            }\r\n        }\r\n\r\n        protected override bool IsPopupOpen()\r\n        {\r\n            return ViewModel.IsSelectionEnabled\r\n                || (ViewModel.ChooseAttachment != null && ViewModel.ChooseAttachment.IsOpen)\r\n                || (ViewModel.ImageViewer != null && ViewModel.ImageViewer.IsOpen)\r\n                || EmojiPlaceholder.Visibility == Visibility.Visible;\r\n        }\r\n\r\n        private void InputMessage_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                if (ViewModel.StateService.SendByEnter)\r\n                {\r\n                    ViewModel.Send();\r\n                    e.Handled = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            ViewModel.OnNavigatedTo();\r\n\r\n            if (e.NavigationMode == NavigationMode.New)\r\n            {\r\n                //LayoutRoot.Opacity = 0.0;\r\n                //_isForwardInAnimation = true;\r\n            }\r\n            else if (e.NavigationMode == NavigationMode.Back)\r\n            {\r\n                if (!_fromExternalUri)\r\n                {\r\n                    //LayoutRoot.Opacity = 0.0;\r\n                    //_isBackwardInAnimation = true;\r\n                    ViewModel.BackwardInAnimationComplete();\r\n                }\r\n                else\r\n                {\r\n                    ViewModel.BackwardInAnimationComplete();\r\n                }\r\n                _fromExternalUri = false;\r\n            }\r\n            else if (e.NavigationMode == NavigationMode.Forward && e.Uri != ExternalUri)\r\n            {\r\n                //_isForwardOutAnimation = true;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        private static readonly Uri ExternalUri = new Uri(@\"app://external/\");\r\n\r\n        private bool _fromExternalUri;\r\n        private bool _isBackwardOutAnimation;\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            if (_emojiKeyboard != null)\r\n            {\r\n                // Destroy EmojiControl\r\n                _emojiKeyboard.IsOpen = false;\r\n                _emojiKeyboard.UnbindTextBox();\r\n                EmojiPlaceholder.Content = null; // Remove from view\r\n                EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n                _emojiKeyboard = null;\r\n            }\r\n\r\n\r\n        //    if (e.Uri.OriginalString.EndsWith(\"VideoCaptureView.xaml\")\r\n        //        || e.Uri.OriginalString.EndsWith(\"MapView.xaml\")\r\n        //        || e.Uri.OriginalString.EndsWith(\"ShareContactView.xaml\"))\r\n        //    {\r\n\r\n        //        OpenPeerDetails_OnTap(this, null);\r\n        //    }\r\n\r\n            base.OnNavigatingFrom(e);\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n            ViewModel.OnNavigatedFrom();\r\n\r\n            _fromExternalUri = e.Uri == ExternalUri;\r\n\r\n            //image.Source = writeableBitmap;\r\n\r\n\r\n            base.OnNavigatedFrom(e);\r\n        }\r\n\r\n        private void Items_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (ViewModel.SliceLoaded) return;\r\n\r\n            ViewModel.LoadNextSlice();\r\n        }\r\n\r\n        private void InputMessage_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            EmojiPlaceholder.Visibility = Visibility.Visible;\r\n            EmojiPlaceholder.Opacity = 0.0;\r\n            EmojiPlaceholder.Height = EmojiControl.PortraitOrientationHeight;\r\n        }\r\n\r\n        private bool _smileButtonPressed;\r\n\r\n        private void InputMessage_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_smileButtonPressed)\r\n            {\r\n                if (EmojiPlaceholder.Visibility == Visibility.Visible)\r\n                {\r\n                    EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n                }\r\n            }\r\n            _smileButtonPressed = false;\r\n\r\n            if (EmojiPlaceholder.Visibility == Visibility.Collapsed)\r\n            {\r\n                //AudioRecorder.Visibility = Visibility.Visible;\r\n                //DialogPhoto.Visibility = Visibility.Visible;\r\n                //Title.Visibility = Visibility.Visible;\r\n            }\r\n        }\r\n\r\n\r\n        private void UsernameHint_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            InputMessage.Focus();\r\n\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var user = frameworkElement.DataContext as IUserName;\r\n                if (user != null)\r\n                {\r\n                    var index = 0;\r\n                    for (var i = InputMessage.Text.Length - 1; i >= 0; i--)\r\n                    {\r\n                        if (InputMessage.Text[i] == '@')\r\n                        {\r\n                            index = i;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    InputMessage.Text = string.Format(\"{0}{1} \", InputMessage.Text.Substring(0, index + 1), user.UserName);\r\n                    InputMessage.SelectionStart = InputMessage.Text.Length;\r\n                    InputMessage.SelectionLength = 0;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UsernameHints_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ViewModel.ContinueUsernameHints();\r\n        }\r\n    }\r\n\r\n    public class TLStickerItem : TLObject\r\n    {\r\n        public TLDocumentBase Document { get; set; }\r\n\r\n        public TLStickerItem Self\r\n        {\r\n            get { return this; }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/DialogSearchMessagesView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.DialogSearchMessagesView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    x:Name=\"SearchControl\"\r\n    d:DesignHeight=\"120\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushLight\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushDark\" Color=\"#FF1F1F1F\"/>\r\n        <Storyboard x:Name=\"OpenStoryboard\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"SearchLabel\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.Y)\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"-90\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"0\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"SearchLabel\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n\r\n        <Storyboard x:Name=\"CloseStoryboard\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"SearchLabel\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.Y)\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"-90\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"SearchLabel\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.15\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Collapsed</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n        <Style x:Key=\"WatermarkedTextBoxStyle1\" TargetType=\"controls:WatermarkedTextBox\">\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n            <Setter Property=\"SelectionBackground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n            <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n            <Setter Property=\"Padding\" Value=\"11,2\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"controls:WatermarkedTextBox\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"ReadOnly\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledOrReadonlyContent\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unfocused\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <Grid Margin=\"{TemplateBinding Padding}\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <ContentControl x:Name=\"Placeholder\" MaxWidth=\"140\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\">\r\n                                        <ContentControl.Content>\r\n                                            <dialogs:SearchUserControl Visibility=\"Collapsed\" VerticalAlignment=\"Center\" Margin=\"0,0,4,0\"/>\r\n                                        </ContentControl.Content>\r\n                                    </ContentControl>\r\n                                    <Grid Grid.Column=\"1\">\r\n                                        <ContentControl x:Name=\"WatermarkInlineContent\" Background=\"Transparent\" Content=\"{TemplateBinding InlineWatermark}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Opacity=\"0.5\" Style=\"{TemplateBinding WatermarkStyle}\"/>\r\n                                        <ContentControl x:Name=\"WatermarkContent\" Background=\"Transparent\" Content=\"{TemplateBinding Watermark}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Opacity=\"0.5\" Style=\"{TemplateBinding WatermarkStyle}\"/>\r\n                                        <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" VerticalContentAlignment=\"Stretch\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledOrReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                                <TextBox x:Name=\"DisabledOrReadonlyContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\" FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" IsReadOnly=\"True\" SelectionForeground=\"{TemplateBinding SelectionForeground}\" SelectionBackground=\"{TemplateBinding SelectionBackground}\" TextAlignment=\"{TemplateBinding TextAlignment}\" TextWrapping=\"{TemplateBinding TextWrapping}\" Text=\"{TemplateBinding Text}\" Template=\"{StaticResource PhoneDisabledTextBoxTemplate}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"ButtonStyle1\" TargetType=\"Button\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledBackground\" Visibility=\"Collapsed\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.5\"/>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"SearchLabel\">\r\n        <Grid.RenderTransform>\r\n            <TranslateTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.Resources>\r\n            <DataTemplate x:Key=\"UsernameHintTemplate\">\r\n                <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"UserHint_OnTap\">\r\n                    <Grid Height=\"66\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <!--<Grid Margin=\"12,0,0,0\" Width=\"30\" Height=\"30\" VerticalAlignment=\"Center\">\r\n                            <Border Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n                            <TextBlock Margin=\"0,0,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" FontSize=\"16\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                            <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                        </Grid>-->\r\n\r\n                        <views:ConversationTileControl Size=\"42\" LabelFontSize=\"18\" Margin=\"15,0,15,0\" VerticalAlignment=\"Center\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"1\" Text=\"{Binding FullName}\" Margin=\"0,0,0,0\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" VerticalAlignment=\"Center\"/>\r\n                        <TextBlock Grid.Column=\"2\" Text=\"{Binding UserName, StringFormat='  @\\{0\\}'}\" FontSize=\"{Binding DefaultFontSizeSmall, Source={StaticResource ScaledText}}\" Visibility=\"{Binding UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert}\" Opacity=\"0.6\" Margin=\"0,2,0,0\" VerticalAlignment=\"Center\"/>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </Grid.Resources>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"72\"/>\r\n            <RowDefinition MaxHeight=\"221\"/>\r\n        </Grid.RowDefinitions>\r\n        <Border Grid.RowSpan=\"2\" x:Name=\"BackgroundBorder\" Background=\"{StaticResource PhoneBackgroundBrush}\" Margin=\"0,-1,0,0\"/>\r\n        <Border Grid.RowSpan=\"2\" x:Name=\"Border\" VerticalAlignment=\"Bottom\" Height=\"2\" />\r\n\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <!--<Border Grid.ColumnSpan=\"5\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"1.0\" Margin=\"0,-2,0,0\" MinHeight=\"68\"/>-->\r\n\r\n            <Button \r\n                Margin=\"12,0,0,2\"\r\n                Tap=\"ButtonUp_OnClick\"\r\n                VerticalAlignment=\"Stretch\"\r\n                IsEnabled=\"{Binding IsSearchUpEnabled}\" Style=\"{StaticResource ButtonStyle1}\">\r\n                <Button.Content>\r\n                    <Grid Width=\"32\" Height=\"32\">\r\n                        <Grid.RenderTransform>\r\n                            <RotateTransform CenterX=\"16\" CenterY=\"16\" Angle=\"270\"/>\r\n                        </Grid.RenderTransform>\r\n                        <Image Source=\"{Binding NavigationButtonImageSource}\" Width=\"43\" Height=\"43\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                    </Grid>\r\n                </Button.Content>\r\n            </Button>\r\n\r\n            <Button \r\n                Grid.Column=\"1\" \r\n                Margin=\"0,0,0,2\"\r\n                Tap=\"ButtonDown_OnClick\"\r\n                VerticalAlignment=\"Stretch\"\r\n                IsEnabled=\"{Binding IsSearchDownEnabled}\" Style=\"{StaticResource ButtonStyle1}\">\r\n                <Button.Content>\r\n                    <Grid Width=\"32\" Height=\"32\">\r\n                        <Grid.RenderTransform>\r\n                            <RotateTransform CenterX=\"16\" CenterY=\"16\" Angle=\"90\"/>\r\n                        </Grid.RenderTransform>\r\n                        <Image Source=\"{Binding NavigationButtonImageSource}\" Width=\"43\" Height=\"43\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                    </Grid>\r\n                </Button.Content>\r\n            </Button>\r\n\r\n            <controls:WatermarkedTextBox \r\n            x:Name=\"Text\"\r\n            Grid.Column=\"2\"\r\n            VerticalAlignment=\"Center\"\r\n            HorizontalContentAlignment=\"Left\"\r\n            Watermark=\"{Binding Resources.Search, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"\r\n            Text=\"{Binding Text, Mode=TwoWay}\"\r\n            MinHeight=\"48\" MaxHeight=\"140\" AcceptsReturn=\"False\" \r\n            TextWrapping=\"NoWrap\"\r\n            Margin=\"0,0,0,0\"\r\n            TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n            FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n            InputScope=\"Text\" Style=\"{StaticResource WatermarkedTextBoxStyle1}\"\r\n            KeyDown=\"Text_OnKeyDown\"\r\n            TextChanged=\"Text_OnTextChanged\">\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls:WatermarkedTextBox>\r\n\r\n            <Grid Grid.Column=\"3\" Visibility=\"{Binding UserButtonVisibility}\">\r\n                <ListBoxItem Tap=\"ButtonUser_OnClick\" \r\n                    VerticalContentAlignment=\"Center\"\r\n                    VerticalAlignment=\"Stretch\">\r\n                    <ListBoxItem.Content>\r\n                        <Grid Width=\"32\" Height=\"32\">\r\n                            <Image Source=\"{Binding UserButtonImageSource}\" Width=\"43\" Height=\"43\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                        </Grid>\r\n                    </ListBoxItem.Content>\r\n                </ListBoxItem>\r\n            </Grid>\r\n\r\n            <ListBoxItem Grid.Column=\"4\" Tap=\"CalendarButton_OnClick\" \r\n                VerticalContentAlignment=\"Center\"\r\n                VerticalAlignment=\"Stretch\" \r\n                Margin=\"0,0,12,0\">\r\n                <ListBoxItem.Content>\r\n                    <Grid Width=\"43\" Height=\"43\">\r\n                        <Border Background=\"{Binding DateBrush}\">\r\n                            <Border.OpacityMask>\r\n                                <ImageBrush ImageSource=\"{Binding CalendarButtonImageSource}\"/>\r\n                            </Border.OpacityMask>\r\n                        </Border>\r\n                    </Grid>\r\n                </ListBoxItem.Content>\r\n            </ListBoxItem>\r\n        </Grid>\r\n        <Grid x:Name=\"UsernameHintsPanel\" Grid.Row=\"1\" Visibility=\"Visible\">\r\n            <ItemsControl ItemsSource=\"{Binding Hints}\" ItemTemplate=\"{StaticResource UsernameHintTemplate}\">\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer HorizontalScrollBarVisibility=\"Disabled\" VerticalScrollBarVisibility=\"Auto\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n            </ItemsControl>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/DialogSearchMessagesView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Controls.Primitives;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Controls;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class DialogSearchMessagesView\r\n    {\r\n        public DialogSearchMessagesViewModel ViewModel\r\n        {\r\n            get { return DataContext as DialogSearchMessagesViewModel; }\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        public DialogSearchMessagesView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            //BackgroundBorder.Background = isLightTheme\r\n            //    ? (Brush)Resources[\"HintsBackgroundBrushLight\"]\r\n            //    : (Brush)Resources[\"HintsBackgroundBrushDark\"];\r\n            Border.Background = isLightTheme\r\n                ? (Brush)Resources[\"InputBorderBrushLight\"]\r\n                : (Brush)Resources[\"InputBorderBrushDark\"];\r\n\r\n            SearchLabel.Visibility = Visibility.Collapsed;\r\n\r\n            OpenStoryboard.Completed += (sender, args) =>\r\n            {\r\n                Text.Focus();\r\n            };\r\n\r\n            CloseStoryboard.Completed += (sender, args) =>\r\n            {\r\n                ViewModel.From = null;\r\n                Text.Text = string.Empty;\r\n                if (_searchUserControl == null)\r\n                {\r\n                    _searchUserControl = Text.FindChildOfType<SearchUserControl>();\r\n                }\r\n\r\n                if (_searchUserControl.Visibility == Visibility.Visible)\r\n                {\r\n                    _searchUserControl.Visibility = Visibility.Collapsed;\r\n                    _searchUserControl.Text = string.Empty;\r\n                }\r\n\r\n                ViewModel.From = null;\r\n                ViewModel.IsSearchDownEnabled = false;\r\n                ViewModel.IsSearchUpEnabled = false;\r\n            };\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n\r\n                if (!_once)\r\n                {\r\n                    _once = true;\r\n                    if (ViewModel.IsOpen)\r\n                    {\r\n                        OpenStoryboard.Begin();\r\n                    }\r\n                }\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (ViewModel.IsOpen)\r\n                {\r\n                    OpenStoryboard.Begin();\r\n                }\r\n                else\r\n                {\r\n                    ViewModel.Hints.Clear();\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        CloseStoryboard.Begin();\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ButtonBase_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Close();\r\n        }\r\n\r\n        private void ButtonUp_OnClick(object sender, GestureEventArgs gestureEventArgs)\r\n        {\r\n            SearchControl.Focus();\r\n            ViewModel.Up();\r\n        }\r\n\r\n        private void ButtonDown_OnClick(object sender, GestureEventArgs gestureEventArgs)\r\n        {\r\n            SearchControl.Focus();\r\n            ViewModel.Down();\r\n        }\r\n\r\n        private void CalendarButton_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            var datePickerPage = new DatePickerPage { Height = 239.0, Value = ViewModel.Date ?? DateTime.Now.Date, Margin = new Thickness(0.0, -34.0, 0.0, -6.0)};\r\n            string leftButtonContent = null;\r\n            if (ViewModel.Date != null && ViewModel.Date != DateTime.Now.Date)\r\n            {\r\n                leftButtonContent = AppResources.Clear.ToLowerInvariant();\r\n            }\r\n            ShellViewModel.ShowCustomMessageBox(null, null, AppResources.JumpToDate.ToLowerInvariant(), leftButtonContent,\r\n                result =>\r\n                {\r\n                    if (result == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        var selector = GetChildOfType<LoopingSelector>(datePickerPage);\r\n                        var value = ((DateTimeWrapper)selector.DataSource.SelectedItem).DateTime;\r\n\r\n                        ViewModel.Date = value;\r\n                        ViewModel.Search();\r\n                    }\r\n                    else if (result == CustomMessageBoxResult.LeftButton)\r\n                    {\r\n                        ViewModel.Date = null;\r\n                    }\r\n                },\r\n                datePickerPage);\r\n        }\r\n\r\n        public static T GetChildOfType<T>(DependencyObject depObj) where T : DependencyObject\r\n        {\r\n            if (depObj == null) return null;\r\n\r\n            for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)\r\n            {\r\n                var child = VisualTreeHelper.GetChild(depObj, i);\r\n\r\n                var result = (child as T) ?? GetChildOfType<T>(child);\r\n                if (result != null) return result;\r\n            }\r\n            return null;\r\n        }\r\n\r\n\r\n        private SearchUserControl _searchUserControl;\r\n\r\n        private void ButtonUser_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            if (_searchUserControl == null)\r\n            {\r\n                _searchUserControl = Text.FindChildOfType<SearchUserControl>();\r\n            }\r\n\r\n            _searchUserControl.Text = \"\";\r\n            _searchUserControl.Visibility = Visibility.Visible;\r\n            Text.Focus();\r\n\r\n            ViewModel.From = null;\r\n            ViewModel.GetUsers();\r\n        }\r\n\r\n        private void Text_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Back)\r\n            {\r\n                if (string.IsNullOrEmpty(ViewModel.Text))\r\n                {\r\n                    if (_searchUserControl == null)\r\n                    {\r\n                        _searchUserControl = Text.FindChildOfType<SearchUserControl>();\r\n                    }\r\n\r\n                    if (_searchUserControl.Visibility == Visibility.Visible)\r\n                    {\r\n                        _searchUserControl.Visibility = Visibility.Collapsed;\r\n                    }\r\n\r\n                    ViewModel.From = null;\r\n                    ViewModel.Hints.Clear();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UserHint_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var listBoxItem = sender as ListBoxItem;\r\n            if (listBoxItem != null)\r\n            {\r\n                var user = listBoxItem.DataContext as TLUserBase;\r\n                if (user != null)\r\n                {\r\n                    if (_searchUserControl == null)\r\n                    {\r\n                        _searchUserControl = Text.FindChildOfType<SearchUserControl>();\r\n                    }\r\n\r\n                    _searchUserControl.Text = NonBreakingStringConverter.Convert(user.ShortName) as string;\r\n\r\n                    ViewModel.From = user;\r\n\r\n                    ViewModel.Hints.Clear();\r\n                    ViewModel.Text = string.Empty;\r\n                    Text.Focus();\r\n                    ViewModel.Search();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Text_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            if (_searchUserControl == null)\r\n            {\r\n                _searchUserControl = Text.FindChildOfType<SearchUserControl>();\r\n            }\r\n\r\n            if (_searchUserControl.Visibility == Visibility.Visible\r\n                && ViewModel.From == null)\r\n            {\r\n                if (!string.Equals(ViewModel.Text, Text.Text))\r\n                {\r\n                    ViewModel.Text = Text.Text;\r\n                    ViewModel.SearchUser();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (!string.Equals(ViewModel.Text, Text.Text))\r\n                {\r\n                    ViewModel.Text = Text.Text;\r\n                    ViewModel.Search();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Text_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            \r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/DialogsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Dialogs.DialogsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:triggers=\"clr-namespace:Telegram.Controls.Triggers;assembly=Telegram.Controls\"\r\n    xmlns:telegramControls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"DialogTemplate\">\r\n            <Grid x:Name=\"MainItemGrid\" Margin=\"0,0,18,-12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\">\r\n                <Grid.RenderTransform>\r\n                    <CompositeTransform/>\r\n                </Grid.RenderTransform>\r\n                <!--<Grid.Projection>\r\n                        <PlaneProjection CenterOfRotationY=\"0\" CenterOfRotationX=\"0\" RotationY=\"-80\"/>\r\n                    </Grid.Projection>-->\r\n                <!--<Grid.Triggers>\r\n                    <EventTrigger RoutedEvent=\"Grid.Loaded\">\r\n                        <BeginStoryboard>\r\n                            <Storyboard>\r\n                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"MainItemGrid\">\r\n                                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.0\" Value=\"0\"/>\r\n                                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.0\" Value=\"1\">\r\n                                        <EasingDoubleKeyFrame.EasingFunction>\r\n                                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                                        </EasingDoubleKeyFrame.EasingFunction>\r\n                                    </EasingDoubleKeyFrame>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </BeginStoryboard>\r\n                    </EventTrigger>\r\n                </Grid.Triggers>-->\r\n\r\n                <toolkit:ContextMenuService.ContextMenu>\r\n                    <toolkit:ContextMenu IsZoomEnabled=\"False\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteDialog($DataContext)]\" Visibility=\"{Binding UserVisibility}\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [ClearHistory($DataContext)]\" Visibility=\"{Binding ChatVisibility}\" Header=\"{Binding Resources.ClearHistory, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteAndExit($DataContext)]\" Visibility=\"{Binding ChatVisibility}\" Header=\"{Binding Resources.DeleteAndExit, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [PinToStart($DataContext)]\" Header=\"{Binding Resources.PinToStart, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n                    </toolkit:ContextMenu>\r\n                </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <views:ConversationTileControl Margin=\"12,12,0,7\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"/>\r\n\r\n                <Grid Grid.Row=\"0\" Grid.Column=\"1\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Border Background=\"{StaticResource PhoneAccentBrush}\" Width=\"18\" Height=\"18\"\r\n                        Grid.Column=\"0\" \r\n                        Visibility=\"{Binding EncryptedChatVisibility}\"\r\n                        HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                        Margin=\"16,0,-11,8\">\r\n                        <Border.OpacityMask>\r\n                            <ImageBrush ImageSource=\"/Images/Dialogs/secretchat-WXGA.png\" Stretch=\"Uniform\"/>\r\n                        </Border.OpacityMask>\r\n                    </Border>\r\n                    <!--<Border Background=\"{StaticResource PhoneAccentBrush}\" Width=\"18\" Height=\"18\"\r\n                        Grid.Column=\"0\" \r\n                        Visibility=\"{Binding ChatIconVisibility}\"\r\n                        HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                        Margin=\"16,0,-11,8\">\r\n                        <Border.OpacityMask>\r\n                            <ImageBrush ImageSource=\"/Images/Dialogs/group-WXGA.png\" Stretch=\"Uniform\"/>\r\n                        </Border.OpacityMask>\r\n                    </Border>-->\r\n\r\n                    <TextBlock Grid.Column=\"1\"\r\n                            navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                            Margin=\"14,-2,0,-1\" FontSize=\"36.667\" MaxHeight=\"48.77\"\r\n                            Text=\"{Binding With, Converter={StaticResource DialogCaptionConverter}}\" \r\n                            Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                            Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n\r\n                    <StackPanel Grid.Column=\"2\" Margin=\"6,0,0,4\" Orientation=\"Horizontal\" VerticalAlignment=\"Bottom\">\r\n                        <TextBlock Margin=\"0,0,0,0\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\" Text=\"{Binding TopMessage.Date, Converter={StaticResource DialogDateTimeConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n\r\n                <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"13,0,0,0\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n\r\n                    <Grid Grid.Column=\"0\" VerticalAlignment=\"Top\" Margin=\"2,0,0,0\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Height=\"22\"\r\n                            Margin=\"0,0,12,0\"\r\n                            LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                            Text=\"{Binding Self, Converter={StaticResource DialogMessageFromConverter}}\"\r\n                            FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\"\r\n                            Visibility=\"{Binding TopMessage.ShowFrom, Converter={StaticResource BooleanToVisibilityConverter}}\"\r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        <TextBlock Grid.Row=\"1\" MinHeight=\"22\" MaxHeight=\"{Binding TopMessage.ShowFrom, Converter={StaticResource ChatToMaxHeight}}\"\r\n                            Margin=\"0,0,0,22\"\r\n                            LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                            Text=\"{Binding Self, Converter={StaticResource DialogToBriefInfo}}\" TextWrapping=\"Wrap\" \r\n                            Foreground=\"{Binding Self, Converter={StaticResource MessageForeground}, FallbackValue={StaticResource PhoneSubtleBrush}}\"\r\n                            TextTrimming=\"WordEllipsis\"\r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n\r\n                    <StackPanel Grid.Column=\"1\" Margin=\"12,0,0,16\" Orientation=\"Horizontal\" VerticalAlignment=\"Bottom\">\r\n                        <Border Background=\"{Binding MuteIconBackground}\" Width=\"16\" Height=\"16\"\r\n                            Visibility=\"{Binding NotifySettings, Converter={StaticResource NotifySettingsToVisibilityConverter}, FallbackValue=Collapsed}\"\r\n                            HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                            Margin=\"8,0,0,9\">\r\n                            <Border.OpacityMask>\r\n                                <ImageBrush ImageSource=\"/Images/Dialogs/chat.mute-WXGA.png\" Stretch=\"Uniform\"/>\r\n                            </Border.OpacityMask>\r\n                        </Border>\r\n\r\n                        <telegramControls:MessageStatusControl Visibility=\"{Binding TopMessage.Out.Value, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\" VerticalAlignment=\"Top\" Height=\"18\" Margin=\"6,1,6,10\"/>\r\n                        <Border Background=\"Transparent\" VerticalAlignment=\"Bottom\" Margin=\"8,-2,0,5\"\r\n                                Visibility=\"{Binding UnreadCount, Converter={StaticResource UnreadCountToVisibilityConverter}}\">\r\n                            <TextBlock Margin=\"0,1\" Text=\"{Binding UnreadCount}\" Foreground=\"{StaticResource PhoneAccentBrush}\" LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Border>\r\n                    </StackPanel>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" Margin=\"0,-10,-14,0\">\r\n        <controls:LazyListBox \r\n            x:Name=\"Items\"\r\n            ItemTemplate=\"{StaticResource DialogTemplate}\"\r\n            IsScrolling=\"{Binding IsScrolling, Mode=TwoWay}\"\r\n            CloseToEndPercent=\"0.1\"\r\n            CloseToEnd=\"Items_OnCloseToEnd\"\r\n            Style=\"{StaticResource LazyListBoxStyle}\">\r\n            <controls:LazyListBox.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel/>\r\n                </ItemsPanelTemplate>\r\n            </controls:LazyListBox.ItemsPanel>\r\n            <i:Interaction.Triggers>\r\n                <triggers:CompressionTrigger CompressionType=\"Bottom\">\r\n                    <micro:ActionMessage MethodName=\"LoadNextSlice\"/>\r\n                </triggers:CompressionTrigger>\r\n            </i:Interaction.Triggers>\r\n        </controls:LazyListBox>\r\n        <TextBlock Text=\"{Binding Status}\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/DialogsView.xaml.cs",
    "content": "﻿using System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class DialogsView\r\n    {\r\n        public DialogsViewModel ViewModel\r\n        {\r\n            get { return (DialogsViewModel)DataContext; }\r\n        }\r\n\r\n        public DialogsView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ((DialogsViewModel)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        public FrameworkElement TapedItem;\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            TapedItem = (FrameworkElement)sender;\r\n\r\n            var tapedItemContainer = TapedItem.FindParentOfType<ListBoxItem>();\r\n\r\n            var result = ViewModel.OpenDialogDetails(TapedItem.DataContext as TLDialogBase);\r\n            if (result)\r\n            {\r\n                ShellView.StartContinuumForwardOutAnimation(TapedItem, tapedItemContainer);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/EmojiKeyboard.xaml",
    "content": "﻿<phone:PhoneApplicationPage x:Class=\"TelegramClient.Views.Dialogs.EmojiKeyboard\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n             x:Name=\"Self\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <phone:PhoneApplicationPage.Resources>\r\n        <Style x:Key=\"PhoneButtonBase\" TargetType=\"ButtonBase\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"10,5,10,6\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"ButtonBase\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"EmojiKeyboardRadioButtonStyle\" TargetType=\"RadioButton\">\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n            <Setter Property=\"Padding\" Value=\"0\"/>\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneChromeBrush2}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"RadioButton\">\r\n                        <Grid>\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"CheckBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneRadioCheckBoxPressedBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"CheckMark\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Stroke\" Storyboard.TargetName=\"CheckBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"CheckMark\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"CheckStates\">\r\n                                    <VisualState x:Name=\"Checked\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"CheckMark\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unchecked\"/>\r\n                                    <VisualState x:Name=\"Indeterminate\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Grid Margin=\"3\">\r\n                                <Rectangle x:Name=\"CheckBackground\" Fill=\"{TemplateBinding Background}\" HorizontalAlignment=\"Stretch\" IsHitTestVisible=\"False\" VerticalAlignment=\"Stretch\"/>\r\n                                <Rectangle x:Name=\"CheckMark\" Fill=\"{StaticResource PhoneAccentBrush}\" Visibility=\"Collapsed\" HorizontalAlignment=\"Stretch\" IsHitTestVisible=\"False\" VerticalAlignment=\"Stretch\"/>\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"EmojiMenuButtonStyle\" TargetType=\"Button\">\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneChromeBrush2}\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"3\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{TemplateBinding Padding}\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </phone:PhoneApplicationPage.Resources>\r\n\r\n    <Grid VerticalAlignment=\"Bottom\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <toolkit:GestureService.GestureListener>\r\n            <toolkit:GestureListener Flick=\"GestureListener_OnFlick\"/>\r\n        </toolkit:GestureService.GestureListener>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <ScrollViewer Height=\"317\" Margin=\"3,4,0,0\" Background=\"Transparent\">\r\n            <ItemsControl ItemsSource=\"{Binding Items, ElementName=Self}\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <Border MouseLeftButtonDown=\"UIElement_OnMouseLeftButtonDown\"\r\n                                MouseLeftButtonUp=\"UIElement_OnMouseLeftButtonUp\"\r\n                                MouseLeave=\"UIElement_OnMouseLeave\"\r\n                                Tap=\"EmojiButton_OnClick\" \r\n                                Width=\"77\" Height=\"67\" Margin=\"1\" \r\n                                Background=\"{StaticResource PhoneChromeBrush2}\">\r\n                                <Image Width=\"40\" Source=\"{Binding SourceString}\"/>\r\n                        </Border>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <toolkit:WrapPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n            </ItemsControl>\r\n        </ScrollViewer>\r\n        <Grid Grid.Row=\"1\" HorizontalAlignment=\"Stretch\" Margin=\"0,3,0,0\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Button Width=\"60\" Height=\"84\" Click=\"ABCKeyboard_OnClick\" Style=\"{StaticResource EmojiMenuButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.abc-WXGA.png\"/>\r\n            </Button>\r\n            <RadioButton x:Name=\"RecentButton\" GroupName=\"Category\" Checked=\"Recent_OnChecked\" Grid.Column=\"1\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.recent-WXGA.png\"/>\r\n            </RadioButton>\r\n            <RadioButton GroupName=\"Category\" Checked=\"Category0_OnChecked\" IsChecked=\"True\" Grid.Column=\"2\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.category.1-WXGA.png\"/>\r\n            </RadioButton>\r\n            <RadioButton GroupName=\"Category\" Checked=\"Category1_OnChecked\"  Grid.Column=\"3\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.category.2-720p.png\"/>\r\n            </RadioButton>\r\n            <RadioButton GroupName=\"Category\" Checked=\"Category2_OnChecked\"  Grid.Column=\"4\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.category.3-WXGA.png\"/>\r\n            </RadioButton>\r\n            <RadioButton GroupName=\"Category\" Checked=\"Category3_OnChecked\"  Grid.Column=\"5\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.category.4-WXGA.png\"/>\r\n            </RadioButton>\r\n            <RadioButton GroupName=\"Category\" Checked=\"Category4_OnChecked\"  Grid.Column=\"6\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.category.5-WXGA.png\"/>\r\n            </RadioButton>\r\n            <Button Grid.Column=\"7\" Width=\"60\" Height=\"84\" Click=\"Backspace_OnClick\" Style=\"{StaticResource EmojiMenuButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.backspace-WXGA.png\"/>\r\n            </Button>\r\n        </Grid>\r\n    </Grid>\r\n</phone:PhoneApplicationPage>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/EmojiKeyboard.xaml.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public class EmojiItem\r\n    {\r\n        public string String { get; set; }\r\n        public ulong Code { get; set; }\r\n        public Uri ImageSource { get; set; }\r\n        public string SourceString { get; set; }\r\n    }\r\n\r\n    public partial class EmojiKeyboard\r\n    {\r\n        private int _currentCategory;\r\n\r\n        private int _currentList;\r\n\r\n        public static IList<EmojiItem> RecentItems = new List<EmojiItem>(); \r\n\r\n        public static readonly DependencyProperty ItemsProperty = DependencyProperty.Register(\r\n            \"Items\", typeof(IList<EmojiItem>), typeof(EmojiKeyboard), new PropertyMetadata(default(IList<EmojiItem>)));\r\n\r\n        public IList<EmojiItem> Items\r\n        {\r\n            get { return (IList<EmojiItem>)GetValue(ItemsProperty); }\r\n            set { SetValue(ItemsProperty, value); }\r\n        }\r\n\r\n        public EmojiKeyboard()\r\n        {\r\n            InitializeComponent();\r\n\r\n            SwitchCategoryInternal(0);\r\n        }\r\n\r\n        private void SwitchCategory(int category)\r\n        {\r\n            ThreadPool.QueueUserWorkItem(state =>\r\n            {\r\n                SwitchCategoryInternal(category);\r\n            });\r\n        }\r\n\r\n        private void SwitchCategoryInternal(int category, int skip = 0)\r\n        {\r\n            _currentCategory = category;\r\n            _currentList = skip;\r\n            var items = new List<EmojiItem>();\r\n            var timer = Stopwatch.StartNew();\r\n            foreach (var dataItem in Emoji.Data[category].Skip(skip).Take(30))\r\n            {\r\n                var bytes = BitConverter.GetBytes(dataItem);\r\n\r\n                byte[] bytesOrdered;\r\n                Uri imageUri;\r\n                string sourceString;\r\n                if (bytes[6] != 0 || bytes[7] != 0)\r\n                {\r\n                    bytesOrdered = new byte[8];\r\n                    bytesOrdered[0] = bytes[6];\r\n                    bytesOrdered[1] = bytes[7];\r\n                    bytesOrdered[2] = bytes[4];\r\n                    bytesOrdered[3] = bytes[5];\r\n                    bytesOrdered[4] = bytes[2];\r\n                    bytesOrdered[5] = bytes[3];\r\n                    bytesOrdered[6] = bytes[0];\r\n                    bytesOrdered[7] = bytes[1];\r\n                    sourceString = \"/Images/Emoji/Items/\" + BitConverter.ToString(bytes.Reverse().ToArray()).Replace(\"-\", string.Empty) + \".png\";\r\n                    imageUri = new Uri(sourceString, UriKind.Relative);\r\n                }\r\n                else if (bytes[4] != 0 || bytes[5] != 0)\r\n                {\r\n                    bytesOrdered = new byte[6];\r\n                    bytesOrdered[0] = bytes[4];\r\n                    bytesOrdered[1] = bytes[5];\r\n                    bytesOrdered[2] = bytes[2];\r\n                    bytesOrdered[3] = bytes[3];\r\n                    bytesOrdered[4] = bytes[0];\r\n                    bytesOrdered[5] = bytes[1];\r\n                    sourceString = \"/Images/Emoji/Items/\" + BitConverter.ToString(bytes.Take(6).Reverse().ToArray()).Replace(\"-\", string.Empty) + \".png\";\r\n                    imageUri = new Uri(sourceString, UriKind.Relative);\r\n\r\n                }\r\n                else if (bytes[2] != 0 || bytes[3] != 0)\r\n                {\r\n                    bytesOrdered = new byte[4];\r\n                    bytesOrdered[0] = bytes[2];\r\n                    bytesOrdered[1] = bytes[3];\r\n                    bytesOrdered[2] = bytes[0];\r\n                    bytesOrdered[3] = bytes[1];\r\n                    sourceString = \"/Images/Emoji/Items/\" + BitConverter.ToString(bytes.Take(4).Reverse().ToArray()).Replace(\"-\", string.Empty) + \".png\";\r\n                    imageUri = new Uri(sourceString, UriKind.Relative);\r\n                }\r\n                else\r\n                {\r\n                    bytesOrdered = new byte[2];\r\n                    bytesOrdered[0] = bytes[0];\r\n                    bytesOrdered[1] = bytes[1];\r\n                    sourceString = \"/Images/Emoji/Items/\" + BitConverter.ToString(bytes.Take(2).Reverse().ToArray()).Replace(\"-\", string.Empty) + \".png\";\r\n                    imageUri = new Uri(sourceString, UriKind.Relative);\r\n                }\r\n\r\n                items.Add(new EmojiItem\r\n                {\r\n                    Code = dataItem,\r\n                    String = System.Text.Encoding.Unicode.GetString(bytesOrdered, 0, bytesOrdered.Length),\r\n                    ImageSource = imageUri,\r\n                    SourceString = sourceString\r\n                });\r\n            }\r\n            TLUtils.WritePerformance(\"%% Emoji generation time \" + timer.Elapsed);\r\n            Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                Items = items;\r\n            });\r\n        }\r\n\r\n        public event EventHandler OpenABCKeyboard;\r\n\r\n        protected virtual void RaiseOpenAbcKeyboard()\r\n        {\r\n            var handler = OpenABCKeyboard;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void ABCKeyboard_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            RaiseOpenAbcKeyboard();\r\n        }\r\n\r\n        public event EventHandler BackspaceClick;\r\n\r\n        protected virtual void RaiseBackspaceClick()\r\n        {\r\n            EventHandler handler = BackspaceClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void Backspace_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            RaiseBackspaceClick();\r\n        }\r\n\r\n        private void Category0_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchCategory(0);\r\n        }\r\n\r\n        private void Category1_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchCategory(1);\r\n        }\r\n\r\n        private void Category2_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchCategory(2);\r\n        }\r\n\r\n        private void Category3_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchCategory(3);\r\n        }\r\n\r\n        private void Category4_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchCategory(4);\r\n        }\r\n\r\n        public event EventHandler<EmojiAddedEventArgs> EmojiAdded;\r\n\r\n        protected virtual void RaiseEmojiAdded(EmojiAddedEventArgs e)\r\n        {\r\n            EventHandler<EmojiAddedEventArgs> handler = EmojiAdded;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void EmojiButton_OnClick(object sender, GestureEventArgs gestureEventArgs)\r\n        {\r\n            var button = (FrameworkElement)sender;\r\n            var emojiItem = (EmojiItem)button.DataContext;\r\n\r\n            RaiseEmojiAdded(new EmojiAddedEventArgs { Emoji = emojiItem.String });\r\n#if WP8\r\n            if (RecentButton.IsChecked == false)\r\n            {\r\n                var prevItem = RecentItems.FirstOrDefault(x => x.Code == emojiItem.Code);\r\n                if (prevItem != null)\r\n                {\r\n                    RecentItems.Remove(prevItem);\r\n                    RecentItems.Insert(0, prevItem);\r\n                }\r\n                else\r\n                {\r\n                    RecentItems.Insert(0, emojiItem);\r\n                    RecentItems = RecentItems.Take(30).ToList();\r\n                }\r\n            }\r\n#endif\r\n        }\r\n\r\n        private void Recent_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            Items = RecentItems;\r\n        }\r\n\r\n        private void UIElement_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n            ((Border) sender).Background = (Brush)App.Current.Resources[\"PhoneAccentBrush\"];\r\n        }\r\n\r\n        private void UIElement_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            ((Border)sender).Background = (Brush)App.Current.Resources[\"PhoneChromeBrush2\"];\r\n        }\r\n\r\n        private void UIElement_OnMouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            ((Border)sender).Background = (Brush)App.Current.Resources[\"PhoneChromeBrush2\"];\r\n        }\r\n\r\n        private void GestureListener_OnFlick(object sender, FlickGestureEventArgs e)\r\n        {\r\n            if (e.HorizontalVelocity > 0)\r\n            {\r\n                \r\n            }\r\n            else\r\n            {\r\n                \r\n            }\r\n        }\r\n    }\r\n\r\n    public class EmojiAddedEventArgs : System.EventArgs\r\n    {\r\n\r\n        public string Emoji { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/EmojiKeyboardControl.xaml",
    "content": "﻿<views:TelegramViewBase x:Class=\"TelegramClient.Views.Dialogs.EmojiKeyboard\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"Self\"\r\n    d:DesignHeight=\"800\" d:DesignWidth=\"480\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <Style x:Key=\"PhoneButtonBase\" TargetType=\"ButtonBase\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"10,5,10,6\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"ButtonBase\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"EmojiKeyboardRadioButtonStyle\" TargetType=\"RadioButton\">\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n            <Setter Property=\"Padding\" Value=\"0\"/>\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneChromeBrush2}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"RadioButton\">\r\n                        <Grid>\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"CheckBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"CheckMark\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Stroke\" Storyboard.TargetName=\"CheckBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"CheckMark\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"CheckStates\">\r\n                                    <VisualState x:Name=\"Checked\">\r\n                                        <Storyboard>\r\n                                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"CheckMark\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unchecked\"/>\r\n                                    <VisualState x:Name=\"Indeterminate\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Grid Margin=\"3\">\r\n                                <Rectangle x:Name=\"CheckBackground\" Fill=\"{TemplateBinding Background}\" HorizontalAlignment=\"Stretch\" IsHitTestVisible=\"False\" VerticalAlignment=\"Stretch\"/>\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"EmojiMenuButtonStyle\" TargetType=\"Button\">\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneChromeBrush2}\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"3\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{TemplateBinding Padding}\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid VerticalAlignment=\"Bottom\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <toolkit:GestureService.GestureListener>\r\n            <toolkit:GestureListener/>\r\n        </toolkit:GestureService.GestureListener>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <ScrollViewer Height=\"317\" Margin=\"3,4,0,0\" Background=\"Transparent\">\r\n            <ItemsControl ItemsSource=\"{Binding Items, ElementName=Self}\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <Border MouseLeftButtonDown=\"UIElement_OnMouseLeftButtonDown\"\r\n                                MouseLeftButtonUp=\"UIElement_OnMouseLeftButtonUp\"\r\n                                MouseLeave=\"UIElement_OnMouseLeave\"\r\n                                Tap=\"EmojiButton_OnClick\" \r\n                                Width=\"77\" Height=\"67\" Margin=\"1\" \r\n                                Background=\"{StaticResource PhoneChromeBrush2}\">\r\n                            <Image Width=\"40\" Source=\"{Binding SourceString}\"/>\r\n                        </Border>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <toolkit:WrapPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n            </ItemsControl>\r\n        </ScrollViewer>\r\n        <Grid Grid.Row=\"1\" HorizontalAlignment=\"Stretch\" Margin=\"0,3,0,0\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Button Width=\"60\" Height=\"84\" Click=\"ABCKeyboard_OnClick\" Style=\"{StaticResource EmojiMenuButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.abc-WXGA.png\"/>\r\n            </Button>\r\n            <RadioButton x:Name=\"RecentButton\" GroupName=\"Category\" Checked=\"Recent_OnChecked\" Grid.Column=\"1\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.recent-WXGA.png\"/>\r\n            </RadioButton>\r\n            <RadioButton GroupName=\"Category\" Checked=\"Category0_OnChecked\" IsChecked=\"True\" Grid.Column=\"2\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.category.1-WXGA.png\"/>\r\n            </RadioButton>\r\n            <RadioButton GroupName=\"Category\" Checked=\"Category1_OnChecked\"  Grid.Column=\"3\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.category.2-720p.png\"/>\r\n            </RadioButton>\r\n            <RadioButton GroupName=\"Category\" Checked=\"Category2_OnChecked\"  Grid.Column=\"4\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.category.3-WXGA.png\"/>\r\n            </RadioButton>\r\n            <RadioButton GroupName=\"Category\" Checked=\"Category3_OnChecked\"  Grid.Column=\"5\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.category.4-WXGA.png\"/>\r\n            </RadioButton>\r\n            <RadioButton GroupName=\"Category\" Checked=\"Category4_OnChecked\"  Grid.Column=\"6\" Width=\"60\" Height=\"84\" Style=\"{StaticResource EmojiKeyboardRadioButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.category.5-WXGA.png\"/>\r\n            </RadioButton>\r\n            <Button Grid.Column=\"7\" Width=\"60\" Height=\"84\" Click=\"Backspace_OnClick\" Style=\"{StaticResource EmojiMenuButtonStyle}\">\r\n                <Image Width=\"34\" Source=\"\\Images\\Emoji\\emoji.backspace-WXGA.png\"/>\r\n            </Button>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/EmojiKeyboardControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public class EmojiItem\r\n    {\r\n        public string String { get; set; }\r\n        public ulong Code { get; set; }\r\n        public Uri ImageSource { get; set; }\r\n        public string SourceString { get; set; }\r\n    }\r\n\r\n    public partial class EmojiKeyboard\r\n    {\r\n        private int _currentCategory;\r\n\r\n        private int _currentList;\r\n\r\n        public static IList<EmojiItem> RecentItems = new List<EmojiItem>();\r\n\r\n        public static readonly DependencyProperty ItemsProperty = DependencyProperty.Register(\r\n            \"Items\", typeof(IList<EmojiItem>), typeof(EmojiKeyboard), new PropertyMetadata(default(IList<EmojiItem>)));\r\n\r\n        public IList<EmojiItem> Items\r\n        {\r\n            get { return (IList<EmojiItem>)GetValue(ItemsProperty); }\r\n            set { SetValue(ItemsProperty, value); }\r\n        }\r\n\r\n        public EmojiKeyboard()\r\n        {\r\n            InitializeComponent();\r\n\r\n            //SwitchCategoryInternal(0);\r\n        }\r\n\r\n        private void SwitchCategory(int category)\r\n        {\r\n            ThreadPool.QueueUserWorkItem(state =>\r\n            {\r\n                SwitchCategoryInternal(category);\r\n            });\r\n        }\r\n\r\n        private void SwitchCategoryInternal(int category, int skip = 0)\r\n        {\r\n            _currentCategory = category;\r\n            _currentList = skip;\r\n            var items = new List<EmojiItem>();\r\n            var timer = Stopwatch.StartNew();\r\n            foreach (var dataItem in Emoji.Data[category].Skip(skip).Take(30))\r\n            {\r\n                var bytes = BitConverter.GetBytes(dataItem);\r\n\r\n                byte[] bytesOrdered;\r\n                Uri imageUri;\r\n                string sourceString;\r\n                if (bytes[6] != 0 || bytes[7] != 0)\r\n                {\r\n                    bytesOrdered = new byte[8];\r\n                    bytesOrdered[0] = bytes[6];\r\n                    bytesOrdered[1] = bytes[7];\r\n                    bytesOrdered[2] = bytes[4];\r\n                    bytesOrdered[3] = bytes[5];\r\n                    bytesOrdered[4] = bytes[2];\r\n                    bytesOrdered[5] = bytes[3];\r\n                    bytesOrdered[6] = bytes[0];\r\n                    bytesOrdered[7] = bytes[1];\r\n                    sourceString = \"/Images/Emoji/Items/\" + BitConverter.ToString(bytes.Reverse().ToArray()).Replace(\"-\", string.Empty) + \".png\";\r\n                    imageUri = new Uri(sourceString, UriKind.Relative);\r\n                }\r\n                else if (bytes[4] != 0 || bytes[5] != 0)\r\n                {\r\n                    bytesOrdered = new byte[6];\r\n                    bytesOrdered[0] = bytes[4];\r\n                    bytesOrdered[1] = bytes[5];\r\n                    bytesOrdered[2] = bytes[2];\r\n                    bytesOrdered[3] = bytes[3];\r\n                    bytesOrdered[4] = bytes[0];\r\n                    bytesOrdered[5] = bytes[1];\r\n                    sourceString = \"/Images/Emoji/Items/\" + BitConverter.ToString(bytes.Take(6).Reverse().ToArray()).Replace(\"-\", string.Empty) + \".png\";\r\n                    imageUri = new Uri(sourceString, UriKind.Relative);\r\n\r\n                }\r\n                else if (bytes[2] != 0 || bytes[3] != 0)\r\n                {\r\n                    bytesOrdered = new byte[4];\r\n                    bytesOrdered[0] = bytes[2];\r\n                    bytesOrdered[1] = bytes[3];\r\n                    bytesOrdered[2] = bytes[0];\r\n                    bytesOrdered[3] = bytes[1];\r\n                    sourceString = \"/Images/Emoji/Items/\" + BitConverter.ToString(bytes.Take(4).Reverse().ToArray()).Replace(\"-\", string.Empty) + \".png\";\r\n                    imageUri = new Uri(sourceString, UriKind.Relative);\r\n                }\r\n                else\r\n                {\r\n                    bytesOrdered = new byte[2];\r\n                    bytesOrdered[0] = bytes[0];\r\n                    bytesOrdered[1] = bytes[1];\r\n                    sourceString = \"/Images/Emoji/Items/\" + BitConverter.ToString(bytes.Take(2).Reverse().ToArray()).Replace(\"-\", string.Empty) + \".png\";\r\n                    imageUri = new Uri(sourceString, UriKind.Relative);\r\n                }\r\n\r\n                items.Add(new EmojiItem\r\n                {\r\n                    Code = dataItem,\r\n                    String = System.Text.Encoding.Unicode.GetString(bytesOrdered, 0, bytesOrdered.Length),\r\n                    ImageSource = imageUri,\r\n                    SourceString = sourceString\r\n                });\r\n            }\r\n            TLUtils.WritePerformance(\"%% Emoji generation time \" + timer.Elapsed);\r\n            Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                Items = items;\r\n            });\r\n        }\r\n\r\n        public event EventHandler OpenABCKeyboard;\r\n\r\n        protected virtual void RaiseOpenAbcKeyboard()\r\n        {\r\n            var handler = OpenABCKeyboard;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void ABCKeyboard_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            RaiseOpenAbcKeyboard();\r\n        }\r\n\r\n        public event EventHandler BackspaceClick;\r\n\r\n        protected virtual void RaiseBackspaceClick()\r\n        {\r\n            EventHandler handler = BackspaceClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void Backspace_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            RaiseBackspaceClick();\r\n        }\r\n\r\n        private void Category0_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchCategory(0);\r\n        }\r\n\r\n        private void Category1_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchCategory(1);\r\n        }\r\n\r\n        private void Category2_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchCategory(2);\r\n        }\r\n\r\n        private void Category3_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchCategory(3);\r\n        }\r\n\r\n        private void Category4_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchCategory(4);\r\n        }\r\n\r\n        public event EventHandler<EmojiAddedEventArgs> EmojiAdded;\r\n\r\n        protected virtual void RaiseEmojiAdded(EmojiAddedEventArgs e)\r\n        {\r\n            EventHandler<EmojiAddedEventArgs> handler = EmojiAdded;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void EmojiButton_OnClick(object sender, GestureEventArgs gestureEventArgs)\r\n        {\r\n            var button = (FrameworkElement)sender;\r\n            var emojiItem = (EmojiItem)button.DataContext;\r\n\r\n            RaiseEmojiAdded(new EmojiAddedEventArgs { Emoji = emojiItem.String });\r\n            \r\n            if (RecentButton.IsChecked == false)\r\n            {\r\n                var prevItem = RecentItems.FirstOrDefault(x => x.Code == emojiItem.Code);\r\n                if (prevItem != null)\r\n                {\r\n                    RecentItems.Remove(prevItem);\r\n                    RecentItems.Insert(0, prevItem);\r\n                }\r\n                else\r\n                {\r\n                    RecentItems.Insert(0, emojiItem);\r\n                    RecentItems = RecentItems.Take(30).ToList();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Recent_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            Items = RecentItems;\r\n        }\r\n\r\n        private void UIElement_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n            ((Border)sender).Background = (Brush)App.Current.Resources[\"PhoneAccentBrush\"];\r\n        }\r\n\r\n        private void UIElement_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            ((Border)sender).Background = (Brush)App.Current.Resources[\"PhoneChromeBrush2\"];\r\n        }\r\n\r\n        private void UIElement_OnMouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            ((Border)sender).Background = (Brush)App.Current.Resources[\"PhoneChromeBrush2\"];\r\n        }\r\n    }\r\n\r\n    public class EmojiAddedEventArgs : System.EventArgs\r\n    {\r\n\r\n        public string Emoji { get; set; }\r\n    }\r\n\r\n\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/FastDialogDetailsView.xaml",
    "content": "﻿<phone:PhoneApplicationPage\r\n    x:Class=\"TelegramClient.Views.Dialogs.FastDialogDetailsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:telegramClient=\"clr-namespace:TelegramClient\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    Background=\"{StaticResource PhoneBackgroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    Loaded=\"FastDialogDetailsView_OnLoaded\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <phone:PhoneApplicationPage.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"UserMessageTemplate\">\r\n                <Grid x:Name=\"MainItemGrid2\" Opacity=\"1\" Loaded=\"MainItemGrid2_OnLoaded\">\r\n                    <!--<toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" Opened=\"ContextMenu_OnOpened\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                            <toolkit:MenuItem Loaded=\"ReplyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"DeleteMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"ForwardMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"CopyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action CopyMessage($DataContext)]\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action SaveMedia($DataContext)]\" Header=\"{Binding Resources.Save, Source={StaticResource Strings}}\" \r\n                                          Visibility=\"{Binding Self, Converter={StaticResource MediaFileAvailableToVisibilityConverter}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>-->\r\n\r\n                    <Grid x:Name=\"MainItemGrid\" >\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <StackPanel Grid.Column=\"2\" Grid.Row=\"0\" Margin=\"0,12,24,0\" Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\">\r\n                            <ContentControl\r\n                            Background=\"Transparent\" \r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                            Width=\"{Binding ReplyWidth}\"\r\n                            Content=\"{Binding ReplyInfo.Reply}\" \r\n                            Margin=\"12,8,12,6\"\r\n                            ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            Visibility=\"{Binding ReplyVisibility}\"\r\n                            HorizontalAlignment=\"Stretch\"/>\r\n                            <Grid\r\n                            Background=\"Transparent\" \r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenFwdContactDetails($DataContext)]\" \r\n                            Visibility=\"{Binding FwdFromPeerVisibility, FallbackValue=Collapsed}\">\r\n                                <Grid Margin=\"0,6,0,0\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"Auto\"/>\r\n                                        <RowDefinition Height=\"*\"/>\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <TextBlock Grid.ColumnSpan=\"2\" Text=\"{Binding Resources.ForwardedMessage, Source={StaticResource Strings}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                    <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Text=\"{Binding Resources.From, Source={StaticResource Strings}, StringFormat='\\{0\\} '}\" Margin=\"12,-3,0,0\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                    <TextBlock Grid.Row=\"1\" Grid.Column=\"1\" Text=\"{Binding FwdFrom.FullName}\" Margin=\"0,-3,0,0\" MaxHeight=\"24.83\" HorizontalAlignment=\"Left\" TextTrimming=\"WordEllipsis\" MaxWidth=\"260\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n                            <Grid Canvas.ZIndex=\"2\">\r\n                                <emojiPanel:TelegramRichTextBox\r\n                                x:Name=\"Text\"\r\n                                Width=\"335\"\r\n                                MaxHeight=\"1500\"\r\n                                Visibility=\"{Binding Media, Converter={StaticResource GeoLocationToVisibilityConverter}}\"\r\n                                Entities=\"{Binding Entities}\"\r\n                                Text=\"{Binding Message}\"\r\n                                HorizontalAlignment=\"Stretch\"\r\n                                Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"\r\n                                TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                                FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                                MoreElement=\"{Binding ElementName=MorePanel}\"\r\n                                Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n                                <Border x:Name=\"MorePanel\" Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\" VerticalAlignment=\"Bottom\" Canvas.ZIndex=\"3\" Visibility=\"Collapsed\" Tap=\"MorePanel_OnTap\">\r\n                                    <TextBlock Canvas.ZIndex=\"4\"\r\n                                    Text=\"{Binding Resources.More, Source={StaticResource Strings}, StringFormat='\\{0\\}...'}\" \r\n                                    TextDecorations=\"Underline\" \r\n                                    Margin=\"12,0,12,0\" Foreground=\"#FFFFFFFF\"\r\n                                    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" \r\n                                    FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                    VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                            <ContentControl\r\n                            MaxHeight=\"1500\"\r\n                            Background=\"Transparent\"\r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\"\r\n                            Margin=\"12,6,12,0\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            HorizontalAlignment=\"Stretch\"\r\n                            Content=\"{Binding Media}\"\r\n                            ContentTemplate=\"{Binding Media, Converter={StaticResource MediaTemplateSelector}}\"/>\r\n                            <Border \r\n                            Canvas.ZIndex=\"1\" \r\n                            Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\" \r\n                            HorizontalAlignment=\"Stretch\" \r\n                            Margin=\"0,-1\">\r\n                                <Grid Margin=\"12,8,12,12\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <TextBlock Grid.Column=\"0\" Margin=\"0,-7,0,-4\" \r\n                                           Text=\"{Binding Status, Converter={StaticResource MessageStatusConverter}}\" \r\n                                           Foreground=\"#99FFFFFF\" \r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    <TextBlock Grid.Column=\"1\" micro:Message.Attach=\"[Event Tap] = [Action Resend($DataContext)]\" \r\n                                           Text=\"{Binding Resources.Retry, Source={StaticResource Strings}}\" \r\n                                           TextDecorations=\"Underline\" \r\n                                           Margin=\"4,-7,0,-4\" Foreground=\"#FFFFFFFF\"\r\n                                           FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" \r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Visibility=\"{Binding Status, Converter={StaticResource StringEqualsToVisibilityConverter}, ConverterParameter=Failed}\"/>\r\n                                    <!--<TextBlock Grid.Column=\"3\" Margin=\"0,-7,4,-4\"\r\n                                           Text=\"{Binding Id}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n                                    <Grid Grid.Column=\"3\" Visibility=\"{Binding ViewsVisibility}\">\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition/>\r\n                                            <ColumnDefinition/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <Image Margin=\"6,0,0,0\" Height=\"{Binding DefaultSystemIconSize, Source={StaticResource ScaledText}}\" Stretch=\"UniformToFill\" Source=\"/Images/Messages/message.state.views-WXGA.png\"/>\r\n                                        <TextBlock Grid.Column=\"1\" Margin=\"4,-7,4,-4\"\r\n                                           Text=\"{Binding Views, Converter={StaticResource MessageViewsConverter}}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    </Grid>\r\n                                    <TextBlock Grid.Column=\"4\" Margin=\"0,-7,0,-4\"\r\n                                           Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    <Image Grid.Column=\"5\" Margin=\"6,0,0,0\" Height=\"{Binding DefaultSystemIconSize, Source={StaticResource ScaledText}}\" Stretch=\"UniformToFill\" Source=\"{Binding Status, Converter={StaticResource StatusToImageConverter}}\"/>\r\n                                </Grid>\r\n                            </Border>\r\n                        </StackPanel>\r\n                        <Path Grid.Row=\"1\" Grid.Column=\"2\" Margin=\"0,0,36,0\" x:Name=\"RightBottomCorner\" Fill=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"  HorizontalAlignment=\"Right\" VerticalAlignment=\"Top\" Data=\"F1 M0,0 L1,1 L1,0\" Width=\"12\" Height=\"12\" Stretch=\"Fill\"/>\r\n                    </Grid>\r\n                    <Border x:Name=\"SelectionBorder\" \r\n                        Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" \r\n                        Hold=\"UIElement_OnHold\" \r\n                        micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  \r\n                        Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"UserStickerTemplate\">\r\n                <Grid x:Name=\"MainItemGrid2\">\r\n                    <!--<toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" Loaded=\"StickerContextMenu_OnLoaded\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Opened=\"ContextMenu_OnOpened\">\r\n                            <toolkit:MenuItem Loaded=\"ReplyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"DeleteMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"ForwardMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"AddToStickers_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action AddToStickers($DataContext)]\" Header=\"{Binding Resources.AddToStickers, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>-->\r\n\r\n                    <Grid x:Name=\"MainItemGrid\" >\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Bottom\" Margin=\"30,30,24,24\" Visibility=\"{Binding ReplyVisibility}\">\r\n                            <Border Grid.ColumnSpan=\"5\" Margin=\"-6\" HorizontalAlignment=\"Stretch\" Background=\"{Binding DataContext.ReplyBackgroundBrush, ElementName=Self}\"/>\r\n                            <ContentControl\r\n                            Background=\"Transparent\" \r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                            Content=\"{Binding ReplyInfo.Reply}\" \r\n                            Margin=\"6,6,6,6\"\r\n                            ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            HorizontalAlignment=\"Stretch\"/>\r\n                        </Grid>\r\n\r\n                        <Grid Grid.Column=\"2\" Margin=\"0,12,24,12\" Background=\"Transparent\">\r\n                            <Grid>\r\n                                <!--<Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>-->\r\n                                <Image \r\n                                Stretch=\"Fill\" \r\n                                Source=\"{Binding Media.Document, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                                Height=\"{Binding Media.Document, Converter={StaticResource StickerToDimensionConverter}, ConverterParameter=Height}\"\r\n                                Width=\"{Binding Media.Document, Converter={StaticResource StickerToDimensionConverter}, ConverterParameter=Width}\"/>\r\n                            </Grid>\r\n\r\n                            <Border HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\">\r\n                                <Grid Margin=\"12,8,12,12\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Border Grid.ColumnSpan=\"5\" Margin=\"-6\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                                    <TextBlock Grid.Column=\"0\" Margin=\"0,-7,0,-4\" \r\n                                           Text=\"{Binding Status, Converter={StaticResource MessageStatusConverter}}\" \r\n                                           Foreground=\"#99FFFFFF\" \r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    <TextBlock Grid.Column=\"1\" micro:Message.Attach=\"[Event Tap] = [Action Resend($DataContext)]\" \r\n                                           Text=\"{Binding Resources.Retry, Source={StaticResource Strings}}\" \r\n                                           TextDecorations=\"Underline\" \r\n                                           Margin=\"4,-7,0,-4\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" \r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Visibility=\"{Binding Status, Converter={StaticResource StringEqualsToVisibilityConverter}, ConverterParameter=Failed}\"/>\r\n                                    <TextBlock Grid.Column=\"3\" Margin=\"0,-7,6,-4\" \r\n                                           Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    <Image Grid.Column=\"4\" Width=\"18\" Stretch=\"UniformToFill\" Source=\"{Binding Status, Converter={StaticResource StatusToImageConverter}}\"/>\r\n                                </Grid>\r\n                            </Border>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Border x:Name=\"SelectionBorder\" \r\n                        Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" \r\n                        Hold=\"UIElement_OnHold\" \r\n                        micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  \r\n                        Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"ChatStickerTemplate\">\r\n                <Grid x:Name=\"MainItemGrid2\">\r\n                    <!--<toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Opened=\"ContextMenu_OnOpened\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Loaded=\"ReplyMenuItem_OnLoaded\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\" />\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Loaded=\"DeleteMenuItem_OnLoaded\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Loaded=\"ForwardMenuItem_OnLoaded\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\" />\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action AddToStickers($DataContext)]\" Loaded=\"AddToStickers_OnLoaded\" Header=\"{Binding Resources.AddToStickers, Source={StaticResource Strings}}\" />\r\n                            <toolkit:MenuItem Click=\"MoreMenuItem_OnClick\" Loaded=\"MoreMenuItem_OnLoaded\" Header=\"{Binding Resources.More, Source={StaticResource Strings}, StringFormat='\\{0\\}...'}\" />\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>-->\r\n                    <Grid x:Name=\"MainItemGrid\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"12\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Grid x:Name=\"grid\" Grid.Row=\"1\" Grid.Column=\"1\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"24\" />\r\n                                <ColumnDefinition Width=\"16\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <!--<Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap]=[Action ShowUserProfile($DataContext)]\">\r\n                            <Grid Margin=\"24,0,0,0\" Width=\"45\" Height=\"45\" VerticalAlignment=\"Top\">\r\n                                <Border Background=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n                                <TextBlock FontSize=\"19\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding From, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                                <Image Source=\"{Binding From.Photo, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                            </Grid>\r\n                        </Grid>-->\r\n\r\n                            <Grid Grid.Column=\"2\" Margin=\"0,0,0,12\">\r\n                                <Grid>\r\n                                    <!--<Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>-->\r\n                                    <Image \r\n                                    Stretch=\"Fill\" \r\n                                    Source=\"{Binding Media.Document, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                                    Height=\"{Binding Media.Document, Converter={StaticResource StickerToDimensionConverter}, ConverterParameter=Height}\"\r\n                                    Width=\"{Binding Media.Document, Converter={StaticResource StickerToDimensionConverter}, ConverterParameter=Width}\"/>\r\n                                </Grid>\r\n\r\n                                <Grid Margin=\"12,8,12,12\"\r\n                                  HorizontalAlignment=\"Right\"\r\n                                  VerticalAlignment=\"Bottom\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Border Grid.ColumnSpan=\"3\" Margin=\"-6\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                                    <Grid Grid.Column=\"1\" Visibility=\"{Binding ViewsVisibility}\">\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition/>\r\n                                            <ColumnDefinition/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <Image Margin=\"6,0,0,0\" Height=\"{Binding DefaultSystemIconSize, Source={StaticResource ScaledText}}\" Stretch=\"UniformToFill\" Source=\"/Images/Messages/message.state.views-WXGA.png\"/>\r\n                                        <TextBlock Grid.Column=\"1\" Margin=\"4,-7,8,-4\"\r\n                                           Text=\"{Binding Views, Converter={StaticResource MessageViewsConverter}}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    </Grid>\r\n                                    <TextBlock Grid.Column=\"2\" Margin=\"0,-7,0,-4\" \r\n                                    Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" \r\n                                    Foreground=\"#99FFFFFF\" \r\n                                    FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                    Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n\r\n                            <Grid Grid.Column=\"3\" VerticalAlignment=\"Bottom\" Margin=\"24,30,30,24\" Visibility=\"{Binding ReplyVisibility}\">\r\n                                <Border Grid.ColumnSpan=\"5\" Margin=\"-6\" HorizontalAlignment=\"Stretch\" Background=\"{Binding DataContext.ReplyBackgroundBrush, ElementName=Self}\"/>\r\n                                <ContentControl\r\n                                Background=\"Transparent\" \r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                                Content=\"{Binding ReplyInfo.Reply}\" \r\n                                Margin=\"6,6,6,6\"\r\n                                ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                HorizontalAlignment=\"Stretch\"/>\r\n                            </Grid>\r\n\r\n                            <!--<Border Grid.Column=\"4\" Width=\"38\" Height=\"38\" Margin=\"12,0,0,12\"\r\n                            micro:Message.Attach=\"[Event Tap] = [Action ForwardMessage($DataContext)]\"\r\n                            Background=\"{StaticResource PhoneChromeBrush}\" \r\n                            VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Left\">\r\n                            <Image Width=\"20\" Stretch=\"Uniform\" Source=\"/Images/Messages/channel.share.black.png\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n                        </Border>-->\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Border x:Name=\"SelectionBorder\" Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" Hold=\"UIElement_OnHold\" micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"ChatMessageTemplate\">\r\n                <Grid x:Name=\"MainItemGrid2\">\r\n                    <Grid x:Name=\"MainItemGrid\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"12\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Grid x:Name=\"grid\" Grid.Row=\"1\" Grid.Column=\"1\">\r\n                            <!--<toolkit:ContextMenuService.ContextMenu>\r\n                                <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Loaded=\"StickerContextMenu_OnLoaded\" Opened=\"ContextMenu_OnOpened\">\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Loaded=\"ReplyMenuItem_OnLoaded\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\" />\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Loaded=\"DeleteMenuItem_OnLoaded\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Loaded=\"ForwardMenuItem_OnLoaded\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\" />\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action CopyMessage($DataContext)]\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\" Visibility=\"{Binding Converter={StaticResource TextMessageToVisibilityConverter}}\" />\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action SaveMedia($DataContext)]\" Header=\"{Binding Resources.Save, Source={StaticResource Strings}}\" Visibility=\"{Binding Self, Converter={StaticResource MediaFileAvailableToVisibilityConverter}}\"/>\r\n                                    <toolkit:MenuItem Click=\"MoreMenuItem_OnClick\" Loaded=\"MoreMenuItem_OnLoaded\" Header=\"{Binding Resources.More, Source={StaticResource Strings}, StringFormat='\\{0\\}...'}\" />\r\n                                </toolkit:ContextMenu>\r\n                            </toolkit:ContextMenuService.ContextMenu>-->\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"24\" />\r\n                                <ColumnDefinition Width=\"16\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <!--Accent overlay-->\r\n                            <Path Grid.Column=\"1\" HorizontalAlignment=\"Right\" Margin=\"0,19,0,0\" VerticalAlignment=\"Top\" Data=\"F1 M0,0 L1,1 L1,0\" Width=\"12\" Height=\"12\" Stretch=\"Fill\">\r\n                                <Path.Fill>\r\n                                    <SolidColorBrush Color=\"{StaticResource PhoneAccentColor}\"/>\r\n                                </Path.Fill>\r\n                            </Path>\r\n                            <Border Grid.Column=\"2\" Margin=\"0,0,0,12\">\r\n                                <Border.Background>\r\n                                    <SolidColorBrush Color=\"{StaticResource PhoneAccentColor}\"/>\r\n                                </Border.Background>\r\n                            </Border>\r\n\r\n                            <!--Message content-->\r\n                            <StackPanel Grid.Column=\"2\" Margin=\"0,0,0,12\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                                <Border Margin=\"0,0,0,-50\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                                    <StackPanel Margin=\"0,6,0,50\">\r\n                                        <TextBlock Text=\"{Binding From.FullName}\"\r\n                                               Visibility=\"{Binding Media, Converter={StaticResource MediaEmptyToVisibilityConverter}}\" \r\n                                               Foreground=\"#99FFFFFF\" \r\n                                               HorizontalAlignment=\"Left\" \r\n                                               TextTrimming=\"WordEllipsis\" \r\n                                               MaxWidth=\"260\" MaxHeight=\"24.83\"\r\n                                               Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                        <Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenFwdContactDetails($DataContext)]\" \r\n                                        Visibility=\"{Binding FwdFromPeerVisibility, FallbackValue=Collapsed}\">\r\n                                            <Grid>\r\n                                                <Grid.RowDefinitions>\r\n                                                    <RowDefinition Height=\"Auto\"/>\r\n                                                    <RowDefinition Height=\"*\"/>\r\n                                                </Grid.RowDefinitions>\r\n                                                <Grid.ColumnDefinitions>\r\n                                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                                    <ColumnDefinition Width=\"*\"/>\r\n                                                </Grid.ColumnDefinitions>\r\n                                                <TextBlock Grid.ColumnSpan=\"2\" Text=\"{Binding Resources.ForwardedMessage, Source={StaticResource Strings}}\" Foreground=\"#99FFFFFF\" Margin=\"12,-3,0,0\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                                <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Text=\"{Binding Resources.From, Source={StaticResource Strings}, StringFormat='\\{0\\} '}\" Margin=\"12,-3,0,0\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                                <TextBlock Grid.Row=\"1\" Grid.Column=\"1\" Text=\"{Binding FwdFrom.FullName}\" Margin=\"0,-3,0,0\" HorizontalAlignment=\"Left\" TextTrimming=\"WordEllipsis\" MaxWidth=\"260\" MaxHeight=\"24.83\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                            </Grid>\r\n                                        </Grid>\r\n                                    </StackPanel>\r\n                                </Border>\r\n                                <ContentControl\r\n                                Background=\"Transparent\" \r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                                Width=\"{Binding ReplyWidth}\"\r\n                                Content=\"{Binding ReplyInfo.Reply}\" \r\n                                Margin=\"12,8,12,6\"\r\n                                ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                Visibility=\"{Binding ReplyVisibility}\"\r\n                                HorizontalAlignment=\"Stretch\"/>\r\n                                <Grid Canvas.ZIndex=\"2\">\r\n                                    <emojiPanel:TelegramRichTextBox\r\n                                    MaxHeight=\"1500\"\r\n                                    Width=\"335\"\r\n                                    Visibility=\"{Binding Media, Converter={StaticResource GeoLocationToVisibilityConverter}}\"\r\n                                    Text=\"{Binding Message}\"\r\n                                    emojiPanel:BrowserNavigationService.Message=\"{Binding}\"\r\n                                    TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                                    MoreElement=\"{Binding ElementName=MorePanel}\"\r\n                                    FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                                    Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n                                    <Border x:Name=\"MorePanel\" Background=\"{StaticResource PhoneAccentBrush}\" VerticalAlignment=\"Bottom\" Canvas.ZIndex=\"3\" Visibility=\"Collapsed\" Tap=\"MorePanel_OnTap\">\r\n                                        <TextBlock Canvas.ZIndex=\"4\"\r\n                                        Text=\"{Binding Resources.More, Source={StaticResource Strings}, StringFormat='\\{0\\}...'}\" \r\n                                        TextDecorations=\"Underline\" \r\n                                        Margin=\"12,0,12,0\" Foreground=\"#FFFFFFFF\"\r\n                                        FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" \r\n                                        FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                        VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\"/>\r\n                                    </Border>\r\n                                </Grid>\r\n                                <ContentControl\r\n                                MaxHeight=\"1500\"\r\n                                Background=\"Transparent\"\r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\"\r\n                                Margin=\"12,0,12,0\"\r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                HorizontalAlignment=\"Stretch\"\r\n                                Content=\"{Binding Media}\"\r\n                                ContentTemplate=\"{Binding Media, Converter={StaticResource MediaTemplateSelector}}\"/>\r\n                                <Border Margin=\"0,-1\" \r\n                                Canvas.ZIndex=\"1\"\r\n                                Background=\"{StaticResource PhoneAccentBrush}\">\r\n                                    <Grid Margin=\"12,8,12,12\">\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"*\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <!--<TextBlock Grid.Column=\"0\" Margin=\"0,-7,4,-4\"\r\n                                           Text=\"{Binding ReplyMarkup}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    <TextBlock Grid.Column=\"2\" Margin=\"0,-7,4,-4\"\r\n                                           Text=\"{Binding Id}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n                                        <Grid Grid.Column=\"2\" Visibility=\"{Binding ViewsVisibility}\">\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition/>\r\n                                                <ColumnDefinition/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Image Margin=\"6,0,0,0\" Height=\"{Binding DefaultSystemIconSize, Source={StaticResource ScaledText}}\" Stretch=\"UniformToFill\" Source=\"/Images/Messages/message.state.views-WXGA.png\"/>\r\n                                            <TextBlock Grid.Column=\"1\" Margin=\"4,-7,8,-4\"\r\n                                           Text=\"{Binding Views, Converter={StaticResource MessageViewsConverter}}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                        </Grid>\r\n                                        <TextBlock Grid.Column=\"3\" Margin=\"0,-7,0,-4\" \r\n                                               Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" \r\n                                               Foreground=\"#99FFFFFF\" \r\n                                               FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                               Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </StackPanel>\r\n                        </Grid>\r\n\r\n                        <Button Grid.Column=\"2\" Grid.Row=\"1\" Margin=\"12,0,0,12\" Width=\"38\" Height=\"38\"\r\n                            VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Left\" Background=\"{StaticResource PhoneChromeBrush}\"\r\n                            micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\"\r\n                            Style=\"{StaticResource EmptyButtonStyle}\">\r\n                            <Image Width=\"20\" Stretch=\"Uniform\" Source=\"{Binding DataContext.ChannelShareImageSource, ElementName=Self}\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n                        </Button>\r\n                    </Grid>\r\n                    <Border x:Name=\"SelectionBorder\" Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" Hold=\"UIElement_OnHold\" micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"ServiceMessageTemplate\">\r\n                <Grid Margin=\"48,12\" x:Name=\"MainItemGrid2\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenServiceMessage($DataContext)]\">\r\n                    <!--<toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" Loaded=\"ServiceMessageContextMenu_OnLoaded\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Opened=\"ContextMenu_OnOpened\">\r\n                            <toolkit:MenuItem Loaded=\"ReplyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\" />\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>-->\r\n\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <Grid HorizontalAlignment=\"Center\">\r\n                        <Border Margin=\"-6\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                        <StackPanel>\r\n                            <!--<TextBlock Margin=\"6,0\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" FontSize=\"20\" Text=\"{Binding Self, Converter={StaticResource ServiceMessageToTextConverter}}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>-->\r\n                            <emojiPanel:TelegramRichTextBox\r\n                            x:Name=\"Text\"\r\n                            Text=\"{Binding Self, Converter={StaticResource ServiceMessageToTextConverter}}\"\r\n                            TextAlignment=\"Center\"\r\n                            HorizontalAlignment=\"Stretch\"\r\n                            FontSize=\"20\"\r\n                            Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                            Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n                        </StackPanel>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"1\" \r\n                      Background=\"Transparent\"\r\n                      Width=\"100\" Height=\"100\" Margin=\"0,12,0,0\"\r\n                      micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\"\r\n                      Visibility=\"{Binding Action.Photo, Converter={StaticResource ExistsToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                        <Border Background=\"{StaticResource PhoneChromeBrush}\"/>\r\n                        <Image Source=\"{Binding Action.Photo, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=100}\" Stretch=\"UniformToFill\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"UnreadMessagesTemplate\">\r\n                <Grid Margin=\"30,12\" x:Name=\"MainItemGrid2\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <Grid HorizontalAlignment=\"Stretch\">\r\n                        <Border Margin=\"-6\" Background=\"{StaticResource PhoneChromeBrush}\" Height=\"48\"/>\r\n                        <StackPanel Orientation=\"Horizontal\" HorizontalAlignment=\"Center\">\r\n                            <TextBlock Margin=\"0,-2,6,0\" VerticalAlignment=\"Center\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" FontSize=\"22.667\" Text=\"{Binding Converter={StaticResource ServiceMessageToTextConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            <Image Source=\"/Images/Messages/unreadmessages.png\" Width=\"11\">\r\n                                <Image.RenderTransform>\r\n                                    <TranslateTransform Y=\"2\"/>\r\n                                </Image.RenderTransform>\r\n                            </Image>\r\n                        </StackPanel>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"FriendMessageTemplate\">\r\n                <Grid x:Name=\"MainItemGrid2\">\r\n                    <!--<toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Opened=\"ContextMenu_OnOpened\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\" />\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />\r\n                            <toolkit:MenuItem Loaded=\"ForwardMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"CopyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action CopyMessage($DataContext)]\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action SaveMedia($DataContext)]\" Header=\"{Binding Resources.Save, Source={StaticResource Strings}}\" \r\n                                          Visibility=\"{Binding Self, Converter={StaticResource MediaFileAvailableToVisibilityConverter}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>-->\r\n\r\n                    <Grid x:Name=\"MainItemGrid\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"12\" />\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Path x:Name=\"LeftUpCorner\" Grid.Column=\"1\" HorizontalAlignment=\"Left\" Fill=\"{StaticResource PhoneAccentBrush}\"  Margin=\"36,0,0,0\" VerticalAlignment=\"Bottom\" Data=\"F1 M0,0 L0,1 L1,1\" Width=\"12\" Height=\"12\" Stretch=\"Fill\"/>\r\n\r\n                        <StackPanel Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"24,0,0,12\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                            <ContentControl\r\n                            Background=\"Transparent\" \r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                            Width=\"{Binding ReplyWidth}\"\r\n                            Content=\"{Binding ReplyInfo.Reply}\" \r\n                            Margin=\"12,8,12,6\"\r\n                            ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            Visibility=\"{Binding ReplyVisibility}\"\r\n                            HorizontalAlignment=\"Stretch\"/>\r\n                            <Grid \r\n                            Background=\"Transparent\" \r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenFwdContactDetails($DataContext)]\" \r\n                            Visibility=\"{Binding FwdFromPeerVisibility, FallbackValue=Collapsed}\">\r\n                                <Grid Margin=\"0,6,0,0\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"Auto\"/>\r\n                                        <RowDefinition Height=\"*\"/>\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <TextBlock Grid.ColumnSpan=\"2\" Text=\"{Binding Resources.ForwardedMessage, Source={StaticResource Strings}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                    <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Text=\"{Binding Resources.From, Source={StaticResource Strings}, StringFormat='\\{0\\} '}\" Margin=\"12,-3,0,0\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                    <TextBlock Grid.Row=\"1\" Grid.Column=\"1\" Text=\"{Binding FwdFrom.FullName}\" Margin=\"0,-3,0,0\" HorizontalAlignment=\"Left\" TextTrimming=\"WordEllipsis\" MaxWidth=\"260\" MaxHeight=\"24.83\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n                            <Grid Canvas.ZIndex=\"2\">\r\n                                <emojiPanel:TelegramRichTextBox\r\n                                MaxHeight=\"1500\"\r\n                                Visibility=\"{Binding Media, Converter={StaticResource GeoLocationToVisibilityConverter}}\"\r\n                                Width=\"335\"\r\n                                Text=\"{Binding Message}\"\r\n                                TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                                MoreElement=\"{Binding ElementName=MorePanel}\"\r\n                                FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                                Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n                                <Border x:Name=\"MorePanel\" Background=\"{StaticResource PhoneAccentBrush}\" VerticalAlignment=\"Bottom\" Canvas.ZIndex=\"3\" Visibility=\"Collapsed\" Tap=\"MorePanel_OnTap\">\r\n                                    <TextBlock Canvas.ZIndex=\"4\"\r\n                                    Text=\"{Binding Resources.More, Source={StaticResource Strings}, StringFormat='\\{0\\}...'}\" \r\n                                    TextDecorations=\"Underline\" \r\n                                    Margin=\"12,0,12,0\" Foreground=\"#FFFFFFFF\"\r\n                                    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" \r\n                                    FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                    VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                            <ContentControl\r\n                            MaxHeight=\"1500\"\r\n                            Background=\"Transparent\"\r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\"\r\n                            Margin=\"12,6,12,0\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            HorizontalAlignment=\"Stretch\"\r\n                            Content=\"{Binding Media}\"\r\n                            ContentTemplate=\"{Binding Media, Converter={StaticResource MediaTemplateSelector}}\"/>\r\n                            <Border Canvas.ZIndex=\"1\" Margin=\"0,-1\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                                <Grid Margin=\"12,8,12,12\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <!--<StackPanel Grid.Column=\"0\" Orientation=\"Horizontal\">\r\n                                    <TextBlock\r\n                                           Margin=\"0,-7,0,-4\" \r\n                                           Text=\"{Binding ReplyMarkup}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    <TextBlock\r\n                                           Margin=\"6,-7,0,-4\" \r\n                                           Text=\"{Binding Unread, Converter={StaticResource UnreadMessageConverter}}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                </StackPanel>-->\r\n                                    <Grid Grid.Column=\"2\" Visibility=\"{Binding ViewsVisibility}\">\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition/>\r\n                                            <ColumnDefinition/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <Image Margin=\"6,0,0,0\" Height=\"{Binding DefaultSystemIconSize, Source={StaticResource ScaledText}}\" Stretch=\"UniformToFill\" Source=\"/Images/Messages/message.state.views-WXGA.png\"/>\r\n                                        <TextBlock Grid.Column=\"1\" Margin=\"4,-7,8,-4\"\r\n                                           Text=\"{Binding Views, Converter={StaticResource MessageViewsConverter}}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    </Grid>\r\n                                    <TextBlock Grid.Column=\"3\" \r\n                                           Margin=\"0,-7,0,-4\" \r\n                                           Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                </Grid>\r\n                            </Border>\r\n                        </StackPanel>\r\n                    </Grid>\r\n                    <!--</ctrls:LayoutTransformer>-->\r\n                    <Border x:Name=\"SelectionBorder\" Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" Hold=\"UIElement_OnHold\" micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"FriendStickerTemplate\">\r\n                <Grid x:Name=\"MainItemGrid2\">\r\n\r\n                    <!--<toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Opened=\"ContextMenu_OnOpened\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"ForwardMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"AddToStickers_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action AddToStickers($DataContext)]\" Header=\"{Binding Resources.AddToStickers, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>-->\r\n\r\n                    <Grid x:Name=\"MainItemGrid\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"12\" />\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"24,0,0,12\">\r\n                            <Grid>\r\n                                <!--<Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>-->\r\n                                <Image \r\n                                Stretch=\"Fill\" \r\n                                Source=\"{Binding Media.Document, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                                Height=\"{Binding Media.Document, Converter={StaticResource StickerToDimensionConverter}, ConverterParameter=Height}\"\r\n                                Width=\"{Binding Media.Document, Converter={StaticResource StickerToDimensionConverter}, ConverterParameter=Width}\"/>\r\n                            </Grid>\r\n                            <Grid Margin=\"12,8,12,12\"\r\n                              HorizontalAlignment=\"Right\"\r\n                              VerticalAlignment=\"Bottom\">\r\n                                <Border Margin=\"-6\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                                <TextBlock\r\n                                Margin=\"0,-7,0,-4\" \r\n                                Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" \r\n                                Foreground=\"#99FFFFFF\"\r\n                                FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n\r\n                        <Grid Grid.Row=\"1\" Grid.Column=\"2\" VerticalAlignment=\"Bottom\" Margin=\"24,30,30,24\" Visibility=\"{Binding ReplyVisibility}\">\r\n                            <Border Grid.ColumnSpan=\"5\" Margin=\"-6\" HorizontalAlignment=\"Stretch\" Background=\"{Binding DataContext.ReplyBackgroundBrush, ElementName=Self}\"/>\r\n                            <ContentControl \r\n                            Background=\"Transparent\" \r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                            Content=\"{Binding ReplyInfo.Reply}\" \r\n                            Margin=\"6,6,6,6\"\r\n                            ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            HorizontalAlignment=\"Stretch\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Border x:Name=\"SelectionBorder\" Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" Hold=\"UIElement_OnHold\" micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"ChatFriendStickerTemplate\">\r\n                <Grid x:Name=\"MainItemGrid2\">\r\n                    <!--<toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" Opened=\"ContextMenu_OnOpened\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                            <toolkit:MenuItem Loaded=\"ReplyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"DeleteMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"ForwardMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"AddToStickers_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action AddToStickers($DataContext)]\" Header=\"{Binding Resources.AddToStickers, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>-->\r\n                    <Grid x:Name=\"MainItemGrid\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"12\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Grid x:Name=\"grid\" Grid.Row=\"1\" Grid.Column=\"1\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"69\" />\r\n                                <ColumnDefinition Width=\"16\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap]=[Action ShowUserProfile($DataContext)]\">\r\n                                <Grid Margin=\"24,0,0,0\" Width=\"45\" Height=\"45\" VerticalAlignment=\"Top\">\r\n                                    <Border Background=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n                                    <TextBlock FontSize=\"19\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding From, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                                    <Image Source=\"{Binding From.Photo, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n\r\n                            <Grid Grid.Column=\"2\" Margin=\"0,0,0,12\">\r\n                                <Grid>\r\n                                    <!--<Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>-->\r\n                                    <Image \r\n                                    Stretch=\"Fill\" \r\n                                    Source=\"{Binding Media.Document, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                                    Height=\"{Binding Media.Document, Converter={StaticResource StickerToDimensionConverter}, ConverterParameter=Height}\"\r\n                                    Width=\"{Binding Media.Document, Converter={StaticResource StickerToDimensionConverter}, ConverterParameter=Width}\"/>\r\n                                </Grid>\r\n\r\n                                <Grid Margin=\"12,8,12,12\"\r\n                                  HorizontalAlignment=\"Right\"\r\n                                  VerticalAlignment=\"Bottom\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Border Grid.ColumnSpan=\"2\" Margin=\"-6\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                                    <TextBlock Grid.Column=\"1\" Margin=\"0,-7,0,-4\" \r\n                                    Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" \r\n                                    Foreground=\"#99FFFFFF\" \r\n                                    FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                    Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n\r\n                            <Grid Grid.Column=\"3\" VerticalAlignment=\"Bottom\" Margin=\"24,30,30,24\" Visibility=\"{Binding ReplyVisibility}\">\r\n                                <Border Grid.ColumnSpan=\"5\" Margin=\"-6\" HorizontalAlignment=\"Stretch\" Background=\"{Binding DataContext.ReplyBackgroundBrush, ElementName=Self}\"/>\r\n                                <ContentControl\r\n                                Background=\"Transparent\" \r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                                Content=\"{Binding ReplyInfo.Reply}\" \r\n                                Margin=\"6,6,6,6\"\r\n                                ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                HorizontalAlignment=\"Stretch\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Border x:Name=\"SelectionBorder\" Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" Hold=\"UIElement_OnHold\" micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"ChatFriendMessageTemplate\">\r\n                <Grid x:Name=\"MainItemGrid2\">\r\n                    <!--<toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Opened=\"ContextMenu_OnOpened\">\r\n                            <toolkit:MenuItem Loaded=\"ReplyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"DeleteMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"ForwardMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem Loaded=\"CopyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action CopyMessage($DataContext)]\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action SaveMedia($DataContext)]\" Header=\"{Binding Resources.Save, Source={StaticResource Strings}}\" \r\n                                          Visibility=\"{Binding Self, Converter={StaticResource MediaFileAvailableToVisibilityConverter}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>-->\r\n                    <Grid x:Name=\"MainItemGrid\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"12\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Grid x:Name=\"grid\" Grid.Row=\"1\" Grid.Column=\"1\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"69\" />\r\n                                <ColumnDefinition Width=\"16\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n\r\n                            <!--Photo-->\r\n                            <Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap]=[Action ShowUserProfile($DataContext)]\">\r\n                                <Grid Margin=\"24,0,0,0\" Width=\"45\" Height=\"45\" VerticalAlignment=\"Top\">\r\n                                    <Border Background=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n                                    <TextBlock FontSize=\"19\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding From, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                                    <Image Source=\"{Binding From.Photo, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n\r\n\r\n\r\n                            <!--Accent overlay-->\r\n                            <Path Grid.Column=\"1\" HorizontalAlignment=\"Right\" Margin=\"0,19,0,0\" VerticalAlignment=\"Top\" Data=\"F1 M0,0 L1,1 L1,0\" Width=\"12\" Height=\"12\" Stretch=\"Fill\">\r\n                                <Path.Fill>\r\n                                    <SolidColorBrush Color=\"{StaticResource PhoneAccentColor}\"/>\r\n                                </Path.Fill>\r\n                            </Path>\r\n                            <Border Grid.Column=\"2\" Margin=\"0,0,0,12\">\r\n                                <Border.Background>\r\n                                    <SolidColorBrush Color=\"{StaticResource PhoneAccentColor}\"/>\r\n                                </Border.Background>\r\n                            </Border>\r\n\r\n                            <!--Message content-->\r\n                            <StackPanel Grid.Column=\"2\" Margin=\"0,0,0,12\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                                <Border Margin=\"0,0,0,-50\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                                    <StackPanel Margin=\"0,6,0,50\">\r\n                                        <TextBlock Text=\"{Binding From.FullName}\" \r\n                                               Visibility=\"{Binding Media, Converter={StaticResource MediaEmptyToVisibilityConverter}}\" \r\n                                               MaxHeight=\"24.83\" \r\n                                               Foreground=\"#99FFFFFF\" \r\n                                               Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                        <Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenFwdContactDetails($DataContext)]\" \r\n                                          Visibility=\"{Binding FwdFromPeerVisibility, FallbackValue=Collapsed}\">\r\n                                            <Grid>\r\n                                                <Grid.RowDefinitions>\r\n                                                    <RowDefinition Height=\"Auto\"/>\r\n                                                    <RowDefinition Height=\"*\"/>\r\n                                                </Grid.RowDefinitions>\r\n                                                <Grid.ColumnDefinitions>\r\n                                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                                    <ColumnDefinition Width=\"*\"/>\r\n                                                </Grid.ColumnDefinitions>\r\n                                                <TextBlock Grid.ColumnSpan=\"2\" Text=\"{Binding Resources.ForwardedMessage, Source={StaticResource Strings}}\" Foreground=\"#99FFFFFF\" Margin=\"12,-3,0,0\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                                <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Text=\"{Binding Resources.From, Source={StaticResource Strings}, StringFormat='\\{0\\} '}\" Margin=\"12,-3,0,0\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                                <TextBlock Grid.Row=\"1\" Grid.Column=\"1\" Text=\"{Binding FwdFrom.FullName}\" Margin=\"0,-3,0,0\" HorizontalAlignment=\"Left\" TextTrimming=\"WordEllipsis\" MaxWidth=\"260\" MaxHeight=\"24.83\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                                            </Grid>\r\n                                        </Grid>\r\n                                    </StackPanel>\r\n                                </Border>\r\n                                <ContentControl\r\n                                Background=\"Transparent\" \r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                                Width=\"{Binding ReplyWidth}\"\r\n                                Content=\"{Binding ReplyInfo.Reply}\" \r\n                                Margin=\"12,8,12,6\"\r\n                                ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                Visibility=\"{Binding ReplyVisibility}\"\r\n                                HorizontalAlignment=\"Stretch\"/>\r\n                                <Grid Canvas.ZIndex=\"2\">\r\n                                    <emojiPanel:TelegramRichTextBox\r\n                                    MaxHeight=\"1500\"\r\n                                    Width=\"335\"\r\n                                    Visibility=\"{Binding Media, Converter={StaticResource GeoLocationToVisibilityConverter}}\"\r\n                                    Text=\"{Binding Message}\"\r\n                                    emojiPanel:BrowserNavigationService.Message=\"{Binding}\"\r\n                                    TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                                    MoreElement=\"{Binding ElementName=MorePanel}\"\r\n                                    FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                                    Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n                                    <Border x:Name=\"MorePanel\" Background=\"{StaticResource PhoneAccentBrush}\" VerticalAlignment=\"Bottom\" Canvas.ZIndex=\"3\" Visibility=\"Collapsed\" Tap=\"MorePanel_OnTap\">\r\n                                        <TextBlock Canvas.ZIndex=\"4\"\r\n                                        Text=\"{Binding Resources.More, Source={StaticResource Strings}, StringFormat='\\{0\\}...'}\" \r\n                                        TextDecorations=\"Underline\" \r\n                                        Margin=\"12,0,12,0\" Foreground=\"#FFFFFFFF\"\r\n                                        FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" \r\n                                        FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                        VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\"/>\r\n                                    </Border>\r\n                                </Grid>\r\n                                <ContentControl\r\n                                MaxHeight=\"1500\"\r\n                                Background=\"Transparent\"\r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\"\r\n                                Margin=\"12,0,12,0\"\r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                HorizontalAlignment=\"Stretch\"\r\n                                Content=\"{Binding Media}\"\r\n                                ContentTemplate=\"{Binding Media, Converter={StaticResource MediaTemplateSelector}}\"/>\r\n                                <Border Margin=\"0,-1\" \r\n                                Canvas.ZIndex=\"1\"\r\n                                Background=\"{StaticResource PhoneAccentBrush}\">\r\n                                    <Grid Margin=\"12,8,12,12\">\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"*\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <!--<TextBlock Grid.Column=\"0\" Margin=\"0,-7,4,-4\"\r\n                                           Text=\"{Binding ReplyMarkup}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    <TextBlock Grid.Column=\"2\" Margin=\"0,-7,4,-4\"\r\n                                           Text=\"{Binding Id}\" \r\n                                           Foreground=\"#99FFFFFF\"\r\n                                           FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n                                        <TextBlock Grid.Column=\"3\" Margin=\"0,-7,0,-4\" \r\n                                               Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" \r\n                                               Foreground=\"#99FFFFFF\" \r\n                                               FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                               Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </StackPanel>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Border x:Name=\"SelectionBorder\" Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" Hold=\"UIElement_OnHold\" micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <templateSelectors:MessageTemplateSelector \r\n            x:Key=\"MessageTemplateSelector\"\r\n            UserMessageTemplate=\"{StaticResource UserMessageTemplate}\"\r\n            UserStickerTemplate=\"{StaticResource UserStickerTemplate}\"\r\n            ChatFriendMessageTemplate=\"{StaticResource ChatFriendMessageTemplate}\"\r\n            ChatFriendStickerTemplate=\"{StaticResource ChatFriendStickerTemplate}\"\r\n            FriendMessageTemplate=\"{StaticResource FriendMessageTemplate}\"\r\n            FriendStickerTemplate=\"{StaticResource FriendStickerTemplate}\"\r\n            ServiceMessageTemplate=\"{StaticResource ServiceMessageTemplate}\"\r\n            UnreadMessagesTemplate=\"{StaticResource UnreadMessagesTemplate}\"\r\n            ChannelMessageTemplate=\"{StaticResource ChatMessageTemplate}\"\r\n            ChannelStickerTemplate=\"{StaticResource ChatStickerTemplate}\"/>\r\n\r\n            <DataTemplate x:Key=\"UserTemplate\">\r\n                <Grid>\r\n                    <Border Margin=\"-12\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                    <StackPanel Margin=\"0,40,0,0\">\r\n                        <Grid Width=\"81\">\r\n                            <Image Source=\"{Binding EmptyDialogImageSource}\" Stretch=\"UniformToFill\"/>\r\n                        </Grid>\r\n                        <TextBlock Text=\"{Binding Resources.NoMessagesYet, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Margin=\"48,40,48,0\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"BotTemplate\">\r\n                <StackPanel Margin=\"48,0,48,0\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                    <TextBlock Text=\"{Binding Resources.WhatCanThisBotDo, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Margin=\"12,6\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n\r\n                    <emojiPanel:TelegramRichTextBox\r\n                    Width=\"360\"\r\n                    Margin=\"0,0,0,12\"\r\n                    Text=\"{Binding With.BotInfo.Description}\"\r\n                    HorizontalAlignment=\"Stretch\"\r\n                    TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                    FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                    Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n                </StackPanel>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"SupportTemplate\">\r\n                <Grid>\r\n                    <Border Margin=\"-12\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                    <StackPanel Margin=\"0,40,0,0\">\r\n                        <Grid Width=\"81\">\r\n                            <Image Source=\"{Binding EmptyDialogImageSource}\" Stretch=\"UniformToFill\"/>\r\n                        </Grid>\r\n                        <TextBlock Text=\"{Binding Resources.GotAQuestionAboutTelegram, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Margin=\"48,40,48,0\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <templateSelectors:EmptyDialogToDescriptionConverter\r\n            x:Key=\"EmptyDialogToDescriptionConverter\"\r\n            UserTemplate=\"{StaticResource UserTemplate}\"\r\n            BotTemplate=\"{StaticResource BotTemplate}\"\r\n            SupportTemplate=\"{StaticResource SupportTemplate}\"/>\r\n        </ResourceDictionary>\r\n    </phone:PhoneApplicationPage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneBackgroundBrush}\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n        \r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"*\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Button\r\n                x:Name=\"Caption\"\r\n                toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n                Margin=\"-4,30,0,12\" Grid.Row=\"0\" VerticalAlignment=\"Bottom\" Style=\"{StaticResource DialogDetailsCaptionButtonStyle}\">\r\n                <Button.RenderTransform>\r\n                    <TranslateTransform/>\r\n                </Button.RenderTransform>\r\n                <StackPanel>\r\n                    <StackPanel Orientation=\"Horizontal\" x:Name=\"Title\">\r\n                        <StackPanel.RenderTransform>\r\n                            <CompositeTransform/>\r\n                        </StackPanel.RenderTransform>\r\n                        <TextBlock HorizontalAlignment=\"Left\" Text=\"{Binding With, Converter={StaticResource DialogCaptionConverter}}\" MaxHeight=\"42.56\" Foreground=\"{Binding StateService.CurrentForegroundBrush}\" Style=\"{StaticResource PhoneTextTitle2Style}\"/>\r\n                    </StackPanel>\r\n                    <TextBlock x:Name=\"Subtitle\" Margin=\"12,-4,0,0\" Foreground=\"{Binding StateService.CurrentForegroundSubtleBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </StackPanel>\r\n            </Button>\r\n\r\n            <Border x:Name=\"DialogPhoto\" Margin=\"12,48,24,0\" VerticalAlignment=\"Top\" Grid.Row=\"0\" Grid.Column=\"1\" Width=\"54\" Height=\"54\" Background=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\">\r\n                <Grid Background=\"Transparent\">\r\n                    <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                    <Image Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                </Grid>\r\n            </Border>\r\n        </Grid>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"0,0,0,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"*\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <phone:LongListSelector ItemsSource=\"{Binding Items}\" Grid.Row=\"0\"\r\n                                               toolkit:TiltEffect.SuppressTilt=\"True\"\r\n                Style=\"{StaticResource LazyLongListSelectorStyle}\">\r\n                <phone:LongListSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <Grid>\r\n                            <Grid>\r\n                                <CheckBox Margin=\"12,0,18,0\" IsChecked=\"{Binding IsSelected, Mode=TwoWay}\" HorizontalAlignment=\"Right\"\r\n                                          Visibility=\"{Binding SelectionVisibility, FallbackValue=Collapsed}\">\r\n                                    <CheckBox.RenderTransform>\r\n                                        <TranslateTransform X=\"2\"/>\r\n                                    </CheckBox.RenderTransform>\r\n                                    <CheckBox.Projection>\r\n                                        <PlaneProjection RotationZ=\"180\"/>\r\n                                    </CheckBox.Projection>\r\n                                </CheckBox>\r\n                                <Border Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"/>\r\n                            </Grid>\r\n                            <ContentControl Margin=\"0,0,60,0\"\r\n                                    HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" \r\n                                    Content=\"{Binding}\" ContentTemplate=\"{Binding Converter={StaticResource MessageTemplateSelector}}\">\r\n                                <ContentControl.Projection>\r\n                                    <PlaneProjection RotationZ=\"180\"/>\r\n                                </ContentControl.Projection>\r\n                            </ContentControl>\r\n                            <Border \r\n                                    Background=\"{StaticResource PhoneAccentBrush}\" \r\n                                    Width=\"20\" \r\n                                    HorizontalAlignment=\"Right\" \r\n                                    Margin=\"0,12,60,12\"\r\n                                    Visibility=\"Collapsed\"/>\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </phone:LongListSelector.ItemTemplate>\r\n                <phone:LongListSelector.Projection>\r\n                    <PlaneProjection RotationZ=\"180\"/>\r\n                </phone:LongListSelector.Projection>\r\n            </phone:LongListSelector>\r\n            \r\n            <TextBlock x:Name=\"Logs\" Margin=\"24,0\" Foreground=\"Green\" VerticalAlignment=\"Top\"/>\r\n\r\n            <controls:WatermarkedTextBox \r\n                x:Name=\"InputMessage\"\r\n                Grid.Row=\"1\"\r\n                HorizontalAlignment=\"Stretch\"\r\n                VerticalAlignment=\"Bottom\"\r\n                Margin=\"109,0,12,12\"\r\n                HorizontalContentAlignment=\"Left\"\r\n                Watermark=\"{Binding Resources.YourMessage, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\"\r\n                WatermarkForeground=\"{Binding WatermarkForeground}\"\r\n                Text=\"{Binding Text, Mode=TwoWay}\"\r\n                MinHeight=\"48\" MaxHeight=\"140\" AcceptsReturn=\"True\" \r\n                TextWrapping=\"Wrap\"\r\n                TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                Style=\"{StaticResource MessageTextBoxStyle}\"\r\n                InputScope=\"Text\">\r\n                <controls:WatermarkedTextBox.RenderTransform>\r\n                    <CompositeTransform/>\r\n                </controls:WatermarkedTextBox.RenderTransform>\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls:WatermarkedTextBox>\r\n\r\n            <controls1:AudioRecorderControl                   \r\n                        Grid.Row=\"1\"\r\n                        MinHeight=\"62\"\r\n                        x:Name=\"AudioRecorder\"\r\n                        Margin=\"0,0,0,12\"\r\n                        UploadFileDuringRecording=\"True\"\r\n                        Foreground=\"{Binding StateService.CurrentForegroundBrush}\"/>\r\n            <Border x:Name=\"AppBarPlaceholder\" Grid.Row=\"2\" Height=\"72\"/>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</phone:PhoneApplicationPage>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/FastDialogDetailsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class FastDialogDetailsView\r\n    {\r\n        private readonly Stopwatch _stopwatch = Stopwatch.StartNew();\r\n\r\n        private List<string> _logs = new List<string>();\r\n\r\n        private IApplicationBar _previousAppBar;\r\n\r\n        private PhoneApplicationPage _parentPage;\r\n\r\n        public FastDialogDetailsViewModel ViewModel\r\n        {\r\n            get { return DataContext as FastDialogDetailsViewModel; }\r\n        }\r\n\r\n        private readonly AppBarButton _sendButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Send,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.send.text.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _attachButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Attach,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.attach.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _smileButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Emoji,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.smile.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _manageButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Manage,\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.manage.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _forwardButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Forward,\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.forwardmessage.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _deleteButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Delete,\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.delete.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _searchMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Search,\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _pinToStartMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.PinToStart\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _shareMyContactInfoMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.ShareMyContactInfo\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _helpMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Help\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _reportSpamMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.ReportSpam\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _debugMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = \"debug\"\r\n        };\r\n\r\n\r\n        private bool _firstRun = true;\r\n        private bool _isBackwardOutAnimation;\r\n        private bool _isForwardInAnimation;\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (!_firstRun) return;\r\n            _firstRun = false;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Opacity = 0.99;\r\n\r\n            ApplicationBar.Buttons.Add(_sendButton);\r\n            ApplicationBar.Buttons.Add(_attachButton);\r\n            ApplicationBar.Buttons.Add(_smileButton);\r\n            ApplicationBar.Buttons.Add(_manageButton);\r\n            var broadcast = ViewModel.With as TLBroadcastChat;\r\n            var channel = ViewModel.With as TLChannel;\r\n            var chat = ViewModel.With as TLChat41;\r\n            if (broadcast == null || (channel != null && channel.IsMegaGroup))\r\n            {\r\n                var addReportSpam = true;\r\n                if (chat != null && chat.Creator)\r\n                {\r\n                    addReportSpam = false;\r\n                }\r\n\r\n                if (channel != null && channel.Creator)\r\n                {\r\n                    addReportSpam = false;\r\n                }\r\n                if (addReportSpam)\r\n                {\r\n                    ApplicationBar.MenuItems.Add(_reportSpamMenuItem);\r\n                }\r\n            }\r\n            if (broadcast == null || (channel != null && channel.IsMegaGroup))\r\n            {\r\n                ApplicationBar.MenuItems.Add(_searchMenuItem);\r\n            }\r\n            var user = ViewModel.With as TLUser;\r\n            if (user != null && user.IsBot)\r\n            {\r\n                ApplicationBar.MenuItems.Add(_helpMenuItem);\r\n            }\r\n            ApplicationBar.MenuItems.Add(_pinToStartMenuItem);\r\n\r\n            var userBase = ViewModel.With as TLUserBase;\r\n            if (userBase != null && userBase.IsForeign)\r\n            {\r\n                ApplicationBar.MenuItems.Add(_shareMyContactInfoMenuItem);\r\n            }\r\n#if DEBUG\r\n            ApplicationBar.MenuItems.Add(_debugMenuItem);\r\n#endif\r\n\r\n            //_sendButton.IsEnabled = ViewModel.CanSend;\r\n            //ApplicationBar.IsVisible = !ViewModel.IsAppBarCommandVisible && !ViewModel.IsChooseAttachmentOpen;\r\n        }\r\n\r\n\r\n        public FastDialogDetailsView()\r\n        {\r\n            InitializeComponent();\r\n            //LayoutRoot.Opacity = 0.0;\r\n\r\n            var appBar = new ApplicationBar();\r\n            var appBarDefaultSize = appBar.DefaultSize;\r\n\r\n            AppBarPlaceholder.Height = appBarDefaultSize;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                //_isForwardInAnimation = true;\r\n\r\n                var elapsed = _stopwatch.Elapsed;\r\n                _logs.Add(\"Elapsed=\" + elapsed + \" Count=\" + ViewModel.FistSliceCount);\r\n\r\n                Logs.Text = string.Join(Environment.NewLine, _logs);\r\n                //MessageBox.Show(string.Join(Environment.NewLine, _logs));\r\n\r\n\r\n                _parentPage = VisualTreeExtensions.FindParentOfType<PhoneApplicationPage>(this);\r\n                if (_parentPage != null)\r\n                {\r\n                    _previousAppBar = _parentPage.ApplicationBar;\r\n\r\n                    BuildLocalizedAppBar();\r\n                    _parentPage.ApplicationBar = ApplicationBar;\r\n                }\r\n                //RunAnimation();\r\n                ViewModel.OnLoaded();\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                //_isBackwardOutAnimation = true;\r\n\r\n                if (_parentPage != null)\r\n                {\r\n                    _parentPage.ApplicationBar = _previousAppBar;\r\n                }\r\n            };\r\n        }\r\n\r\n\r\n        private void RunAnimation(System.Action callback = null)\r\n        {\r\n            if (_isForwardInAnimation)\r\n            {\r\n                _isForwardInAnimation = false;\r\n\r\n                var storyboard = new Storyboard();\r\n\r\n                //if (ViewModel != null\r\n                //    && ViewModel.StateService.AnimateTitle)\r\n                //{\r\n                //    ViewModel.StateService.AnimateTitle = false;\r\n\r\n                //    var continuumElementX = new DoubleAnimationUsingKeyFrames();\r\n                //    continuumElementX.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 130.0 });\r\n                //    continuumElementX.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                //    Storyboard.SetTarget(continuumElementX, Title);\r\n                //    Storyboard.SetTargetProperty(continuumElementX, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n                //    storyboard.Children.Add(continuumElementX);\r\n\r\n                //    var continuumElementY = new DoubleAnimationUsingKeyFrames();\r\n                //    continuumElementY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -40.0 });\r\n                //    continuumElementY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n                //    Storyboard.SetTarget(continuumElementY, Title);\r\n                //    Storyboard.SetTargetProperty(continuumElementY, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                //    storyboard.Children.Add(continuumElementY);\r\n                //}\r\n\r\n                var continuumLayoutRootY = new DoubleAnimationUsingKeyFrames();\r\n                continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 150.0 });\r\n                continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.35), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(continuumLayoutRootY, LayoutRoot);\r\n                Storyboard.SetTargetProperty(continuumLayoutRootY, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(continuumLayoutRootY);\r\n\r\n                //var continuumLayoutRootOpacity = new DoubleAnimation\r\n                //{\r\n                //    From = 0.0,\r\n                //    To = 1.0,\r\n                //    Duration = TimeSpan.FromSeconds(0.25),\r\n                //    EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n                //};\r\n                //Storyboard.SetTarget(continuumLayoutRootOpacity, LayoutRoot);\r\n                //Storyboard.SetTargetProperty(continuumLayoutRootOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                //storyboard.Children.Add(continuumLayoutRootOpacity);\r\n\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    LayoutRoot.Opacity = 1.0;\r\n                    //InputMessage.IsHitTestVisible = false;\r\n                    //InputMessageFocusHolder.Visibility = Visibility.Visible;\r\n                    //_inputMessageDisabled = true;\r\n                    storyboard.Completed += (o, e) =>\r\n                    {\r\n                        ViewModel.OnLoaded();\r\n                    };\r\n                    storyboard.Begin();\r\n                });\r\n            }\r\n            else if (_isBackwardOutAnimation)\r\n            {\r\n                _isBackwardOutAnimation = false;\r\n\r\n                LayoutRoot.CacheMode = new BitmapCache();\r\n\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n                Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation);\r\n\r\n                storyboard.Begin();\r\n                storyboard.Completed += (o, e) =>\r\n                {\r\n                    callback.SafeInvoke();\r\n                };\r\n            }\r\n        }\r\n\r\n        public void Close(System.Action callback)\r\n        {\r\n            _isBackwardOutAnimation = true;\r\n            ViewModel.LazyItems.Clear();\r\n            RunAnimation(callback);\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            base.OnNavigatedTo(e);\r\n\r\n            var elapsed = _stopwatch.Elapsed;\r\n            _logs.Add(\"OnNavigatedTo elapsed=\" + elapsed);\r\n        }\r\n\r\n        private void MainItemGrid2_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void MorePanel_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void UIElement_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void FastDialogDetailsView_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.OnLoaded();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/HashtagHintsView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.HashtagHintsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushLight\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushDark\" Color=\"#FF1F1F1F\"/>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\">\r\n        <Grid.Resources>\r\n            <DataTemplate x:Key=\"HashtagHintTemplate\">\r\n                <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                    <Grid Height=\"66\">\r\n                        <TextBlock Text=\"{Binding Hashtag, StringFormat='#\\{0\\}'}\" Margin=\"15,0,0,0\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" VerticalAlignment=\"Center\"/>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </Grid.Resources>\r\n        <Grid x:Name=\"HashtagHintsPanel\" Visibility=\"Visible\" CacheMode=\"BitmapCache\">\r\n            <Border x:Name=\"BackgroundBorder\" Background=\"White\"/>\r\n            <Border x:Name=\"Border\" VerticalAlignment=\"Top\" Height=\"2\" Visibility=\"{Binding Hints.Count, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\"/>\r\n            <ItemsControl ItemsSource=\"{Binding Hints}\" ItemTemplate=\"{StaticResource HashtagHintTemplate}\">\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer HorizontalScrollBarVisibility=\"Disabled\" VerticalScrollBarVisibility=\"Auto\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n            </ItemsControl>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/HashtagHintsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class HashtagHintsView\r\n    {\r\n        public HashtagHintsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            BackgroundBorder.Background = isLightTheme\r\n                ? (Brush)Resources[\"HintsBackgroundBrushLight\"]\r\n                : (Brush)Resources[\"HintsBackgroundBrushDark\"];\r\n            Border.Background = isLightTheme\r\n                ? (Brush)Resources[\"InputBorderBrushLight\"]\r\n                : (Brush)Resources[\"InputBorderBrushDark\"];\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/InlineBotResultsView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.InlineBotResultsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    Opacity=\"0.0\"\r\n    Loaded=\"InlineBotResultsView_OnLoaded\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"HintsBorderBrushLight\" Color=\"#FFE7E9EB\"/>\r\n        <SolidColorBrush x:Key=\"HintsBorderBrushDark\" Color=\"#FF333333\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushLight\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushDark\" Color=\"#FF1F1F1F\"/>\r\n\r\n        <converters:InlineBotResultToWidthConverter x:Key=\"InlineBotResultToWidthConverter\"/>\r\n        <converters:InlineBotResultPhotoConverter x:Key=\"InlineBotResultPhotoConverter\"/>\r\n\r\n        <DataTemplate x:Key=\"StickerResultTemplate\">\r\n            <Grid Margin=\"2,3,1,3\">\r\n                <Image Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\" \r\n                       Height=\"{Binding Document, Converter={StaticResource StickerPreviewToDimensionConverter}, ConverterParameter=Height}\" \r\n                       Width=\"{Binding Document, Converter={StaticResource StickerPreviewToDimensionConverter}, ConverterParameter=Width}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"ContactResultTemplate\">\r\n            <Grid Margin=\"0,6\" MaxWidth=\"323\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width =\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <views:ConversationTileControl Size=\"64\" \r\n                    Margin=\"0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                    Source=\"{Binding SendMessage.User.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                    Fill=\"{Binding SendMessage.User.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                    Text=\"{Binding SendMessage.User, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"16,0,0,0\" TextWrapping=\"NoWrap\" TextTrimming=\"WordEllipsis\" VerticalAlignment=\"Bottom\" Text=\"{Binding SendMessage.User.FullName}\" FontWeight=\"SemiBold\" FontSize=\"{Binding DefaultFontSizeSmall, Source={StaticResource ScaledText}}\" MaxHeight=\"27\"/>\r\n                <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Margin=\"16,0,0,0\" TextWrapping=\"NoWrap\" TextTrimming=\"WordEllipsis\" VerticalAlignment=\"Top\" Text=\"{Binding SendMessage.PhoneNumber, Converter={StaticResource SimplePhoneNumberConverter}}\" Opacity=\"0.6\" FontSize=\"{Binding DefaultFontSizeSmall, Source={StaticResource ScaledText}}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"GeoResultTemplate\">\r\n            <Grid Margin=\"3\" Width=\"100\" Height=\"100\">\r\n                <Border Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Stretch=\"UniformToFill\" Source=\"{Binding SendMessage.Geo, Converter={StaticResource GeoPointToStaticGoogleMapsConverter}}\"/>\r\n                <Path Fill=\"#60B0E8\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M14,0 C6.26,0 0,6.26 0,14 C0,24.5 14,40 14,40 C14,40 28,24.5 28,14 C28,6.26 21.74,0 14,0 L14,0 Z M14,19 C11.24,19 9,16.76 9,14 C9,11.24 11.24,9 14,9 C16.76,9 19,11.24 19,14 C19,16.76 16.76,19 14,19 L14,19 Z\">\r\n                    <Path.RenderTransform>\r\n                        <ScaleTransform ScaleX=\"0.7\" ScaleY=\"0.7\"/>\r\n                    </Path.RenderTransform>\r\n                </Path>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"VenueResultTemplate\">\r\n            <Grid Margin=\"18,12\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width =\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Grid Width=\"64\" Height=\"64\" Grid.Column=\"0\" Grid.Row=\"0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\">\r\n                    <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                    <Image Source=\"{Binding SendMessage.Geo, Converter={StaticResource GeoPointToStaticGoogleMapsConverter}}\" Stretch=\"UniformToFill\"/>\r\n                </Grid>\r\n                <TextBlock Margin=\"18,0,0,0\" Grid.Column=\"1\" Grid.Row=\"0\" TextWrapping=\"Wrap\" Text=\"{Binding SendMessage.Title}\" FontSize=\"{Binding DefaultFontSizeLarge, Source={StaticResource ScaledText}}\" MaxHeight=\"36\" TextTrimming=\"WordEllipsis\"/>\r\n                <TextBlock Margin=\"18,0,0,0\" Grid.Column=\"1\" Grid.Row=\"1\" TextWrapping=\"Wrap\" Text=\"{Binding SendMessage.Address}\" Opacity=\"0.6\" FontSize=\"{Binding DefaultFontSizeSmall, Source={StaticResource ScaledText}}\" MaxHeight=\"72\" TextTrimming=\"WordEllipsis\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"AudioResultTemplate\">\r\n            <Grid Margin=\"18,12\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width =\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Ellipse x:Name=\"Ellipse\" Grid.RowSpan=\"2\" Height=\"64\" Width=\"64\" Fill=\"{StaticResource TelegramBadgeAccentBrush}\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                <Grid x:Name=\"Icon\" Grid.RowSpan=\"2\">\r\n                    <Path x:Name=\"MusicIcon\" Fill=\"#FFFFFFFF\" Data=\"F1 M0,0 L0,30 L23,15\" Margin=\"7,0,0,0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                </Grid>\r\n                <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,0,0\" Text=\"{Binding Title}\" FontSize=\"{Binding DefaultFontSizeLarge, Source={StaticResource ScaledText}}\" MaxHeight=\"36\" TextTrimming=\"WordEllipsis\"/>\r\n                <TextBlock Grid.Column=\"1\" Grid.Row=\"1\" Margin=\"18,0,0,0\" Text=\"{Binding Description}\" Opacity=\"0.6\" FontSize=\"{Binding DefaultFontSizeSmall, Source={StaticResource ScaledText}}\" MaxHeight=\"27\" TextTrimming=\"WordEllipsis\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"GameResultTemplate\">\r\n            <Grid Margin=\"18,12\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width =\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Grid Width=\"64\" Height=\"64\" Grid.Column=\"0\" Grid.Row=\"0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\">\r\n                    <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                    <TextBlock FontSize=\"{Binding DefaultFontSizeLarge, Source={StaticResource ScaledText}}\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource InlineResultDefaultTextConverter}}\"/>\r\n                    <Image HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Source=\"{Binding Self, Converter={StaticResource InlineBotResultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                </Grid>\r\n                <TextBlock Margin=\"18,0,0,0\" Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Title}\" FontSize=\"{Binding DefaultFontSizeLarge, Source={StaticResource ScaledText}}\" MaxHeight=\"72\" TextTrimming=\"WordEllipsis\"/>\r\n                <emojiPanel:TelegramRichTextBox Grid.Column=\"1\" Grid.Row=\"1\"\r\n                    Margin=\"6,0,0,0\"\r\n                    emojiPanel:BrowserNavigationService.SuppressParsing=\"True\"\r\n                    Text=\"{Binding Description}\"\r\n                    MaxHeight=\"81\"\r\n                    Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                    HorizontalAlignment=\"Stretch\"\r\n                    FontSize=\"{Binding DefaultFontSizeSmall, Source={StaticResource ScaledText}}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"BotResultTemplate\">\r\n            <Grid Margin=\"18,12\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width =\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Grid Width=\"64\" Height=\"64\" Grid.Column=\"0\" Grid.Row=\"0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\">\r\n                    <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                    <TextBlock FontSize=\"{Binding DefaultFontSizeLarge, Source={StaticResource ScaledText}}\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource InlineResultDefaultTextConverter}}\"/>\r\n                    <Image Source=\"{Binding ThumbUrlString}\" Stretch=\"UniformToFill\"/>\r\n                </Grid>\r\n                <TextBlock Margin=\"18,0,0,0\" Grid.Column=\"1\" Grid.Row=\"0\" TextWrapping=\"Wrap\" Text=\"{Binding Title}\" FontSize=\"{Binding DefaultFontSizeLarge, Source={StaticResource ScaledText}}\" MaxHeight=\"72\" TextTrimming=\"WordEllipsis\"/>\r\n                <emojiPanel:TelegramRichTextBox Grid.Column=\"1\" Grid.Row=\"1\"\r\n                    Margin=\"6,0,0,0\"\r\n                    emojiPanel:BrowserNavigationService.SuppressParsing=\"True\"\r\n                    Text=\"{Binding Description}\"\r\n                    MaxHeight=\"81\"\r\n                    Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                    HorizontalAlignment=\"Stretch\"\r\n                    FontSize=\"{Binding DefaultFontSizeSmall, Source={StaticResource ScaledText}}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"PhotoTemplate\">\r\n            <Grid Height=\"118\" Margin=\"3\" Width=\"{Binding Converter={StaticResource InlineBotResultToWidthConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding Self, Converter={StaticResource InlineBotResultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"PhotoResultTemplate\">\r\n            <Grid Height=\"118\" Margin=\"3\" Width=\"{Binding Converter={StaticResource InlineBotResultToWidthConverter}}\">\r\n                <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"Black\" Opacity=\"0.4\"/>\r\n                <Image Source=\"{Binding ThumbUrlString}\" Stretch=\"UniformToFill\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"GifTemplate\">\r\n            <Grid Height=\"118\" Margin=\"3\">\r\n                <additional:GifPlayerControl\r\n                    Mode=\"InlineResult\"\r\n                    Margin=\"0\"\r\n                    Width=\"{Binding Converter={StaticResource InlineBotResultToWidthConverter}}\" \r\n                    Height=\"118\"\r\n                    SuppressManipulationStarted=\"False\"\r\n                    Media=\"{Binding ThumbSelf}\"\r\n                    Progress=\"{Binding DownloadingProgress}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"GifResultTemplate\">\r\n            <Grid Height=\"118\" Margin=\"3\">\r\n                <additional:GifPlayerControl  \r\n                    Mode=\"InlineResult\"\r\n                    Margin=\"0\"\r\n                    Width=\"{Binding Converter={StaticResource InlineBotResultToWidthConverter}}\" \r\n                    Height=\"118\"\r\n                    SuppressManipulationStarted=\"False\"\r\n                    Media=\"{Binding ThumbSelf}\"\r\n                    Progress=\"{Binding DownloadingProgress}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <templateSelectors:InlineBotResultTemplateSelector \r\n                x:Key=\"InlineBotResultTemplateSelector\"\r\n                ResultTemplate=\"{StaticResource BotResultTemplate}\"\r\n                PhotoTemplate=\"{StaticResource PhotoTemplate}\"\r\n                PhotoResultTemplate=\"{StaticResource PhotoResultTemplate}\"\r\n                GifTemplate=\"{StaticResource GifTemplate}\"\r\n                GifResultTemplate=\"{StaticResource GifResultTemplate}\"\r\n                GeoResultTemplate=\"{StaticResource GeoResultTemplate}\"\r\n                VenueResultTemplate=\"{StaticResource VenueResultTemplate}\"\r\n                ContactResultTemplate=\"{StaticResource ContactResultTemplate}\"\r\n                StickerResultTemplate=\"{StaticResource StickerResultTemplate}\"\r\n                AudioResultTemplate=\"{StaticResource AudioResultTemplate}\"\r\n                GameResultTemplate=\"{StaticResource GameResultTemplate}\"/>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\">\r\n        <Grid x:Name=\"InlineBotResultsPanel\" Visibility=\"Visible\" CacheMode=\"BitmapCache\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Border x:Name=\"BackgroundBorder\" Background=\"White\" Grid.RowSpan=\"2\"/>\r\n\r\n            <Border Grid.Row=\"0\" x:Name=\"CaptionBorder\" Visibility=\"{Binding SwitchPMVisibility}\">\r\n                <ListBoxItem Margin=\"0\" Padding=\"0\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" toolkit:TiltEffect.IsTiltEnabled=\"True\" >\r\n                    <TextBlock Margin=\"18,0,18,3\" VerticalAlignment=\"Center\" TextTrimming=\"WordEllipsis\" Text=\"{Binding SwitchPMString}\" TextAlignment=\"Center\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"/>\r\n                </ListBoxItem>\r\n            </Border>\r\n            \r\n            <controls:LazyListBox \r\n                x:Name=\"Results\"\r\n                Grid.Row=\"1\"\r\n                toolkit:TiltEffect.IsTiltEnabled=\"True\" \r\n                IsHorizontal=\"{Binding Gallery}\" ItemsSource=\"{Binding Results}\"\r\n                ScrollingStateChanged=\"Results_OnScrollingStateChanged\"\r\n                Compression=\"Results_OnCompression\"\r\n                Clear=\"Results_OnClear\"\r\n                FirstSliceLoaded=\"Results_OnFirstSliceLoaded\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <ContentControl \r\n                            Content=\"{Binding}\" \r\n                            ContentTemplate=\"{Binding Converter={StaticResource InlineBotResultTemplateSelector}}\"\r\n                            HorizontalAlignment=\"Stretch\" \r\n                            HorizontalContentAlignment=\"Stretch\"/>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel Orientation=\"Horizontal\"/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Disabled\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n            </controls:LazyListBox>\r\n            \r\n            <!--<TextBlock x:Name=\"Debug\" Foreground=\"GreenYellow\" Margin=\"0\" IsHitTestVisible=\"False\" VerticalAlignment=\"Bottom\" TextWrapping=\"Wrap\"/>-->\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/InlineBotResultsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Additional;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class InlineBotResultsView\r\n    {\r\n        private TextBlock _debug;\r\n\r\n        public InlineBotResultsViewModel ViewModel\r\n        {\r\n            get { return DataContext as InlineBotResultsViewModel; }\r\n        }\r\n\r\n        public InlineBotResultsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var applicationBar = new ApplicationBar();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            CaptionBorder.Background = isLightTheme\r\n                ? (Brush)Resources[\"HintsBorderBrushLight\"]\r\n                : (Brush)Resources[\"HintsBorderBrushDark\"];\r\n            CaptionBorder.Height = applicationBar.DefaultSize;\r\n            BackgroundBorder.Background = isLightTheme\r\n                ? (Brush) Resources[\"HintsBackgroundBrushLight\"]\r\n                : (Brush) Resources[\"HintsBackgroundBrushDark\"];\r\n#if DEBUG\r\n            _debug = new TextBlock();\r\n            _debug.Foreground = new SolidColorBrush(Colors.Green);\r\n            _debug.TextWrapping = TextWrapping.Wrap;\r\n            _debug.VerticalAlignment = VerticalAlignment.Bottom;\r\n            _debug.Margin = new Thickness(0.0);\r\n            _debug.IsHitTestVisible = false;\r\n\r\n            //InlineBotResultsPanel.Children.Add(_debug);\r\n#endif\r\n        }\r\n\r\n        private void Results_OnCompression(object sender, CompressionEventArgs e)\r\n        {\r\n            if (Results.IsHorizontal && e.Type == CompressionType.Right)\r\n            {\r\n                ViewModel.LoadNextSlice();\r\n            }\r\n            else if (!Results.IsHorizontal && e.Type == CompressionType.Bottom)\r\n            {\r\n                ViewModel.LoadNextSlice();\r\n            }\r\n        }\r\n\r\n        public void StartActivePlayers()\r\n        {\r\n            foreach (var item in Results.GetVisibleItems())\r\n            {\r\n                var gifPlayer = item.FindChildOfType<GifPlayerControl>();\r\n                if (gifPlayer != null)\r\n                {\r\n                    gifPlayer.Start();\r\n                }\r\n            }\r\n        }\r\n\r\n        public void StopActivePlayers()\r\n        {\r\n            GifPlayerControl.StopInlineBotActivePlayers();\r\n        }\r\n\r\n        private void Results_OnScrollingStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            GifPlayerControl.IsScrolling = e.NewValue;\r\n#if DEBUG\r\n            var count = GifPlayerControl.InlineBotActivePlayers.Count;\r\n            var oldPlayers = GifPlayerControl.InlineBotActivePlayers.Where(x => x.Media != null).ToList();\r\n            var oldItems = new List<string>();\r\n            foreach (var mediaItem in oldPlayers)\r\n            {\r\n                var mediaGif = mediaItem.Media as IMediaGif;\r\n                if (mediaGif != null && mediaGif.Document != null)\r\n                {\r\n                    oldItems.Add(mediaGif.Document.ShortId);\r\n                }\r\n\r\n                var decryptedMediaGif = mediaItem.Media as IDecryptedMediaGif;\r\n                if (decryptedMediaGif != null && decryptedMediaGif.Document != null)\r\n                {\r\n                    oldItems.Add(decryptedMediaGif.Document.GetFileName());\r\n                }\r\n            }\r\n#endif\r\n\r\n            if (!e.NewValue)\r\n            {\r\n                StartActivePlayers();\r\n            }\r\n            else\r\n            {\r\n                StopActivePlayers();\r\n            }\r\n\r\n#if DEBUG\r\n            var newPlayers = GifPlayerControl.InlineBotActivePlayers.Where(x => x.Media != null).ToList();\r\n            var newItems = new List<string>();\r\n            foreach (var mediaItem in newPlayers)\r\n            {\r\n                var mediaGif = mediaItem.Media as IMediaGif;\r\n                if (mediaGif != null && mediaGif.Document != null)\r\n                {\r\n                    newItems.Add(mediaGif.Document.ShortId);\r\n                }\r\n\r\n                var decryptedMediaGif = mediaItem.Media as IDecryptedMediaGif;\r\n                if (decryptedMediaGif != null && decryptedMediaGif.Document != null)\r\n                {\r\n                    newItems.Add(decryptedMediaGif.Document.GetFileName());\r\n                }\r\n            }\r\n\r\n            if (_debug == null) return;\r\n\r\n            _debug.Text = string.Format(\"old {0} {1}\\nnew {2} {3}\",\r\n                count, string.Join(\", \", oldItems),\r\n                GifPlayerControl.InlineBotActivePlayers.Count, string.Join(\", \", newItems));\r\n#endif\r\n        }\r\n\r\n        private void Results_OnClear(object sender, System.EventArgs e)\r\n        {\r\n            StopActivePlayers();\r\n        }\r\n\r\n        private void Results_OnFirstSliceLoaded(object sender, System.EventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(StartActivePlayers);\r\n        }\r\n\r\n        private void InlineBotResultsView_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            Opacity = 1.0;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/MessageViewerView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Dialogs.MessageViewerView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <ScrollViewer>\r\n            <emojiPanel:TelegramRichTextBox \r\n                Canvas.ZIndex=\"2\"\r\n                x:Name=\"Text\"\r\n                Text=\"{Binding Message.Message}\"\r\n                HorizontalAlignment=\"Stretch\"\r\n                TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                Style=\"{StaticResource InfiniteMessageBodyTelegramRichTextStyle}\" />\r\n        </ScrollViewer>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/MessageViewerView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class MessageViewerView\r\n    {\r\n        public MessageViewerView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/PinnedMessageView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.PinnedMessageView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n\r\n        <Storyboard x:Name=\"OpenStoryboard\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.Y)\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"-90\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"0\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n\r\n        <Storyboard x:Name=\"CloseStoryboard\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.Y)\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"-90\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.15\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Collapsed</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid x:Name=\"UserActionLabel\">\r\n        <Grid.RenderTransform>\r\n            <TranslateTransform/>\r\n        </Grid.RenderTransform>\r\n\r\n        <Border Background=\"{StaticResource PhoneBackgroundBrush}\" Tap=\"Message_OnTap\" Opacity=\"1.0\" Margin=\"0,-2,0,0\" MinHeight=\"72\"/>\r\n        <Border x:Name=\"Border\" VerticalAlignment=\"Bottom\" Height=\"2\"/>\r\n\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <ContentControl Margin=\"18,0,0,0\" Content=\"{Binding Message}\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" ContentTemplate=\"{Binding Message, Converter={StaticResource PinnedMessageTemplateSelector}}\"/>\r\n\r\n            <Border Grid.Column=\"1\" Background=\"Transparent\" Tap=\"ButtonBase_OnClick\">\r\n                <Image Source=\"/Images/W10M/ic_cancel_2x.png\" Width=\"32\" Height=\"32\" Margin=\"20\"/>\r\n            </Border>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/PinnedMessageView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class PinnedMessageView\r\n    {\r\n        public PinnedMessageViewModel ViewModel\r\n        {\r\n            get { return DataContext as PinnedMessageViewModel; }\r\n        }\r\n\r\n        public PinnedMessageView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                Border.Background = (Brush)Resources[\"InputBorderBrushLight\"];\r\n            }\r\n            else\r\n            {\r\n                Border.Background = (Brush)Resources[\"InputBorderBrushDark\"];\r\n            }\r\n\r\n            UserActionLabel.Visibility = Visibility.Collapsed;\r\n\r\n            Loaded += StartOpenStoryboard;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void StartOpenStoryboard(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= StartOpenStoryboard;\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(() => OpenStoryboard.Begin());\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (!ViewModel.IsOpen)\r\n                {\r\n                    CloseStoryboard.Begin();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ButtonBase_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.RaiseUnpinMessage();\r\n        }\r\n\r\n        private void Message_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.RaiseOpenMessage();\r\n        }\r\n\r\n        private void CloseStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.RaiseClosed();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/SecretChatDebugView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.SecretChatDebugView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"120\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <Storyboard x:Name=\"OpenStoryboard\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"SearchLabel\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.Y)\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"-90\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"0\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"SearchLabel\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n\r\n        <Storyboard x:Name=\"CloseStoryboard\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"SearchLabel\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.Y)\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"-90\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"SearchLabel\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.15\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Collapsed</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"SearchLabel\">\r\n        <Grid.RenderTransform>\r\n            <TranslateTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.ColumnDefinitions>\r\n            <ColumnDefinition Width=\"Auto\"/>\r\n            <ColumnDefinition Width=\"*\"/>\r\n            <ColumnDefinition Width=\"Auto\"/>\r\n        </Grid.ColumnDefinitions>\r\n        <Border Grid.ColumnSpan=\"5\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.7\" Margin=\"0,-2,0,0\" MinHeight=\"68\"/>\r\n\r\n        <TextBlock Grid.Column=\"0\" Margin=\"24,-2,0,0\" Text=\"{Binding Chat.Layer, StringFormat='L: \\{0\\}', FallbackValue='L: 46'}\" VerticalAlignment=\"Center\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <TextBlock Grid.Column=\"1\" Margin=\"6,-2,0,0\" TextWrapping=\"NoWrap\" Text=\"{Binding KeyFingerprint}\" VerticalAlignment=\"Center\" TextAlignment=\"Center\" HorizontalAlignment=\"Left\" FontSize=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        <ListBoxItem Grid.Column=\"2\" VerticalContentAlignment=\"Center\" toolkit:TiltEffect.IsTiltEnabled=\"True\" micro:Message.Attach=\"[Event Tap] = [Action Invoke]\" Visibility=\"{Binding InvokeButtonVisibility}\">\r\n            <TextBlock Margin=\"6,-2,24,0\" Text=\"rekey\" TextDecorations=\"Underline\" FontSize=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n        </ListBoxItem>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/SecretChatDebugView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class SecretChatDebugView\r\n    {\r\n        private bool _once;\r\n\r\n        public SecretChatDebugView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            SearchLabel.Visibility = Visibility.Collapsed;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                if (!_once)\r\n                {\r\n                    _once = true;\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() => OpenStoryboard.Begin());\r\n                }\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/SecretDialogDetailsView.xaml",
    "content": "﻿<phone:PhoneApplicationPage\r\n    x:Class=\"TelegramClient.Views.Dialogs.SecretDialogDetailsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:selector=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:triggers=\"clr-namespace:Telegram.Controls.Triggers;assembly=Telegram.Controls\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls2=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"Self\"\r\n    BackKeyPress=\"SecretDialogDetailsView_OnBackKeyPress\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls1:TelegramTransitionService.NavigationInTransition>\r\n        <controls1:TelegramNavigationInTransition EndTransition=\"NavigationTransition_OnEndTransition\">\r\n            <controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls1:TelegramNavigationInTransition.Backward>\r\n        </controls1:TelegramNavigationInTransition>\r\n    </controls1:TelegramTransitionService.NavigationInTransition>\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition>\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <phone:PhoneApplicationPage.Resources>\r\n        <Storyboard x:Name=\"CloseCacheStoryboard\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Items\" Storyboard.TargetProperty=\"Opacity\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.0\" Value=\"0\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                    <!--<EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase Exponent=\"5\" EasingMode=\"EaseOut\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>-->\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"MessagesCache\" Storyboard.TargetProperty=\"Opacity\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.0\" Value=\"1\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                    <!--<EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase Exponent=\"5\" EasingMode=\"EaseOut\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>-->\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"MessagesCache\" Storyboard.TargetProperty=\"Visibility\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0:0:0.25\" Value=\"Collapsed\"/>\r\n            </ObjectAnimationUsingKeyFrames>\r\n            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Items\" Storyboard.TargetProperty=\"Visibility\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\" Value=\"Visible\"/>\r\n            </ObjectAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Items\" Storyboard.TargetProperty=\"IsHitTestVisible\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\" Value=\"True\"/>\r\n            </ObjectAnimationUsingKeyFrames>-->\r\n        </Storyboard>\r\n\r\n        <DataTemplate x:Key=\"SecretPhotoTemplate\">\r\n            <Grid Margin=\"-6,0\" Width=\"324\" Height=\"324\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                </Grid.RowDefinitions>\r\n                <!--<TextBlock Margin=\"0,0,6,6\" Text=\"20s\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n                <Grid Grid.Row=\"1\" Width=\"324\" Height=\"324\" Background=\"#66000000\">\r\n                    <Image Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}, Mode=OneWay}\" Stretch=\"UniformToFill\"/>\r\n                    <Image Source=\"{Binding Converter={StaticResource PhotoToThumbConverter}}\" Stretch=\"UniformToFill\"/>\r\n                    <controls2:SecretPhotoPlaceholder \r\n                        Width=\"324\" Height=\"324\" \r\n                        TTLParams=\"{Binding TTLParams}\"\r\n                        StartTimer=\"SecretPhotoPlaceholder_OnStartTimer\" \r\n                        Elapsed=\"SecretPhotoPlaceholder_OnElapsed\" \r\n                        MouseLeftButtonDown=\"UIElement_OnMouseLeftButtonDown\"/>\r\n                    <Grid VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" Background=\"#44000000\"\r\n\t\t\t\t        Visibility=\"{Binding UploadingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <ProgressBar Margin=\"-6,12,0,12\" Background=\"#33FFFFFF\" Foreground=\"White\"  Value=\"{Binding UploadingProgress}\" Maximum=\"1.0\"/>\r\n                        <TextBlock Grid.Column=\"1\" Margin=\"0,0,6,4\" VerticalAlignment=\"Bottom\" Foreground=\"#FFFFFFFF\" micro:Message.Attach=\"[Event Tap] = [Action CancelUploading($DataContext)]\" Text=\"{Binding Resources.Cancel, Source={StaticResource Strings}}\" TextDecorations=\"Underline\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <selector:DecryptedMediaTemplateSelector\r\n                x:Key=\"DecryptedMediaTemplateSelector\"\r\n                EmptyTemplate=\"{StaticResource MediaEmptyTemplate}\"\r\n                ContactTemplate=\"{StaticResource ContactTemplate}\"\r\n                PhotoTemplate=\"{StaticResource PhotoTemplate}\"\r\n                SecretPhotoTemplate=\"{StaticResource SecretPhotoTemplate}\"\r\n                VideoTemplate=\"{StaticResource VideoTemplate}\"\r\n                GeoPointTemplate=\"{StaticResource GeoPointTemplate}\"\r\n                DocumentTemplate=\"{StaticResource DocumentTemplate}\"\r\n                AudioTemplate=\"{StaticResource AudioTemplate}\"\r\n                UnsupportedTemplate=\"{StaticResource UnsupportedTemplate}\"/>\r\n\r\n        <DataTemplate x:Key=\"UserMessageTemplate\">\r\n            <Grid x:Name=\"MainItemGrid2\">\r\n                <Grid.Projection>\r\n                    <PlaneProjection RotationZ=\"180\"/>\r\n                </Grid.Projection>\r\n\r\n                <!--<toolkit:ContextMenuService.ContextMenu>\r\n                    <toolkit:ContextMenu IsZoomEnabled=\"False\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" />\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action CopyMessage($DataContext)]\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"\r\n                            Visibility=\"{Binding MessageVisibility}\" />\r\n                    </toolkit:ContextMenu>\r\n                </toolkit:ContextMenuService.ContextMenu>-->\r\n\r\n                <Grid x:Name=\"MainItemGrid\" >\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n\r\n                    <CheckBox x:Name=\"SelectionBox\" IsChecked=\"{Binding IsSelected, Mode=TwoWay}\"  Margin=\"12,0,-32,0\" Visibility=\"Collapsed\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:SelectionBehavior IsSelectionEnabled=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </CheckBox>\r\n\r\n                    <StackPanel Grid.Column=\"2\" Grid.Row=\"0\" Margin=\"0,12,24,0\" Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\">\r\n                        <emojiPanel:TelegramRichTextBox \r\n                            Canvas.ZIndex=\"2\"\r\n                            Margin=\"0,6,0,0\"\r\n                            Width=\"335\"\r\n                            Visibility=\"{Binding MessageVisibility}\"\r\n                            Text=\"{Binding Message}\"\r\n                            HorizontalAlignment=\"Stretch\"\r\n                            Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"\r\n                            Style=\"{StaticResource InfiniteMessageBodyTelegramRichTextStyle}\"/>\r\n\r\n                        <ContentControl \r\n                            Background=\"Transparent\"\r\n                            micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]; [Event MouseLeftButtonUp] = [Action OpenSecretPhoto($DataContext)]\"\r\n                            Margin=\"12,6,12,0\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            HorizontalAlignment=\"Stretch\"\r\n                            Content=\"{Binding Media}\"\r\n                            ContentTemplate=\"{Binding Converter={StaticResource DecryptedMediaTemplateSelector}}\"/>\r\n                        <Border Canvas.ZIndex=\"1\" Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\" HorizontalAlignment=\"Stretch\" Margin=\"0,-1\">\r\n                            <Grid Margin=\"12,8,12,12\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <!--<TextBlock Grid.Column=\"0\" Margin=\"0,-7,0,-4\" Text=\"{Binding Status, Converter={StaticResource MessageStatusConverter}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n                                <TextBlock Grid.Column=\"1\" micro:Message.Attach=\"[Event Tap] = [Action Resend($DataContext)]\" Text=\"{Binding Resources.Retry, Source={StaticResource Strings}}\" \r\n                                    TextDecorations=\"Underline\" \r\n                                    Margin=\"4,-7,0,-4\" Foreground=\"#FFFFFFFF\" \r\n                                    FontSize=\"{StaticResource PhoneFontSizeNormal}\" \r\n                                    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" \r\n                                    Visibility=\"{Binding Status, Converter={StaticResource StringEqualsToVisibilityConverter}, ConverterParameter=Failed}\"/>\r\n                                <TextBlock Grid.Column=\"3\" Margin=\"0,-7,6,-4\" \r\n\t\t\t\t\t\t\t\t\tText=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" \r\n\t\t\t\t\t\t\t\t\tForeground=\"#99FFFFFF\"\r\n\t\t\t\t\t\t\t\t\tStyle=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                <Image Grid.Column=\"4\" Height=\"18\" Stretch=\"UniformToFill\" Source=\"{Binding Status, Converter={StaticResource StatusToImageConverter}}\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </StackPanel>\r\n                    <Path Grid.Row=\"1\" Grid.Column=\"2\" Margin=\"0,0,36,0\" x:Name=\"RightBottomCorner\" Fill=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"  HorizontalAlignment=\"Right\" VerticalAlignment=\"Top\" Data=\"F1 M0,0 L1,1 L1,0\" Width=\"12\" Height=\"12\" Stretch=\"Fill\"/>\r\n                </Grid>\r\n                <Border x:Name=\"SelectionBorder\" \r\n                        Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" \r\n                        Hold=\"UIElement_OnHold\" \r\n                        micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  \r\n                        Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"FriendMessageTemplate\">\r\n            <Grid x:Name=\"MainItemGrid2\">\r\n                <Grid.Projection>\r\n                    <PlaneProjection RotationZ=\"180\"/>\r\n                </Grid.Projection>\r\n\r\n                <!--<toolkit:ContextMenuService.ContextMenu>\r\n                    <toolkit:ContextMenu IsZoomEnabled=\"False\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" />\r\n                        <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action CopyMessage($DataContext)]\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"\r\n                            Visibility=\"{Binding MessageVisibility}\" />\r\n                    </toolkit:ContextMenu>\r\n                </toolkit:ContextMenuService.ContextMenu>-->\r\n\r\n                <Grid x:Name=\"MainItemGrid\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"12\" />\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n\r\n                    <CheckBox Grid.Row=\"1\" Margin=\"12,0,-32,0\" IsChecked=\"{Binding IsSelected, Mode=TwoWay}\" Visibility=\"Collapsed\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:SelectionBehavior IsSelectionEnabled=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </CheckBox>\r\n\r\n                    <Path x:Name=\"LeftUpCorner\" Grid.Column=\"1\" HorizontalAlignment=\"Left\" Fill=\"{StaticResource PhoneAccentBrush}\"  Margin=\"36,0,0,0\" VerticalAlignment=\"Bottom\" Data=\"F1 M0,0 L0,1 L1,1\" Width=\"12\" Height=\"12\" Stretch=\"Fill\"/>\r\n\r\n                    <StackPanel Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"24,0,0,12\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                        <emojiPanel:TelegramRichTextBox \r\n                                Canvas.ZIndex=\"2\"\r\n                                Margin=\"0,6,0,0\"\r\n                                Visibility=\"{Binding MessageVisibility}\"\r\n                                Width=\"335\"\r\n                                Text=\"{Binding Message}\"\r\n                                Style=\"{StaticResource InfiniteMessageBodyTelegramRichTextStyle}\"/>\r\n                        <ContentControl\r\n                                Background=\"Transparent\"\r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\"\r\n                                Margin=\"12,6,12,0\"\r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                HorizontalAlignment=\"Stretch\"\r\n                                Content=\"{Binding Media}\"\r\n                                ContentTemplate=\"{Binding Converter={StaticResource DecryptedMediaTemplateSelector}}\"/>\r\n                        <Border Canvas.ZIndex=\"1\" Margin=\"0,-1\" Background=\"{StaticResource PhoneAccentBrush}\">\r\n                            <Grid Margin=\"12,8,12,12\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <TextBlock Grid.Column=\"1\" Margin=\"0,-7,0,-4\" \r\n                                    Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}}\" \r\n                                    Foreground=\"#99FFFFFF\" \r\n                                    Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </StackPanel>\r\n                </Grid>\r\n                <Border x:Name=\"SelectionBorder\" Background=\"{Binding IsSelected, Converter={StaticResource IsSelectedToBackgroundConverter}}\" Hold=\"UIElement_OnHold\" micro:Message.Attach=\"[Event Tap] = [Action ChangeSelection($DataContext)]\"  Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"ServiceMessageTemplate\">\r\n            <Grid Margin=\"48,12\" x:Name=\"MainItemGrid2\">\r\n                <Grid.Projection>\r\n                    <PlaneProjection RotationZ=\"180\"/>\r\n                </Grid.Projection>\r\n                <Border Margin=\"-6\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                <TextBlock Margin=\"6,0\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" FontSize=\"20\" Text=\"{Binding Converter={StaticResource DecryptedServiceMessageToTextConverter}}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <selector:DecryptedMessageTemplateSelector \r\n            x:Key=\"DecryptedMessageTemplateSelector\"\r\n            UserMessageTemplate=\"{StaticResource UserMessageTemplate}\"\r\n            FriendMessageTemplate=\"{StaticResource FriendMessageTemplate}\"\r\n            ServiceMessageTemplate=\"{StaticResource ServiceMessageTemplate}\"/>\r\n    </phone:PhoneApplicationPage.Resources>\r\n\r\n    <Grid>\r\n        <ContentControl \r\n            HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" \r\n            HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"  \r\n            Content=\"{Binding StateService}\" \r\n            ContentTemplate=\"{Binding StateService.CurrentBackground, Converter={StaticResource DialogDetailsBackgroundConverter}}\"/>\r\n\r\n\r\n        <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Grid.RenderTransform>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"*\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n\r\n            <Button x:Name=\"OpenPeerDetails\"\r\n                toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n                Margin=\"-4,30,0,12\" Grid.Row=\"0\" VerticalAlignment=\"Bottom\" Style=\"{StaticResource DialogDetailsCaptionButtonStyle}\">\r\n                <StackPanel>\r\n                    <Grid x:Name=\"Title\">\r\n                        <Grid.RenderTransform>\r\n                            <CompositeTransform/>\r\n                        </Grid.RenderTransform>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Image Grid.Column=\"0\"\r\n                           Source=\"{Binding EncryptedImageSource}\" \r\n                           Height=\"20\" Width=\"20\"\r\n                           HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                           Stretch=\"Uniform\"\r\n                           Margin=\"6,0,-6,7\"/>\r\n                        <TextBlock Grid.Column=\"1\" HorizontalAlignment=\"Left\" Text=\"{Binding With.FullName}\" MaxHeight=\"42.56\" Foreground=\"{Binding StateService.CurrentForegroundBrush}\" Style=\"{StaticResource PhoneTextTitle2Style}\"/>\r\n                    </Grid>\r\n                    <TextBlock x:Name=\"Subtitle\">\r\n                        <TextBlock.Style>\r\n                            <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                                <Setter Property=\"Margin\" Value=\"12,-4,0,0\"/>\r\n                            </Style>\r\n                        </TextBlock.Style>\r\n                    </TextBlock>\r\n                </StackPanel>\r\n            </Button>\r\n\r\n\r\n            <Border Margin=\"12,48,24,0\" VerticalAlignment=\"Top\" Grid.Row=\"0\" Grid.Column=\"1\" Width=\"54\" Height=\"54\" Background=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\">\r\n                <Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenPeerDetails]\">\r\n                    <Image Source=\"{Binding With, Converter={StaticResource PlaceholderDefaultImageConverter}}\"/>\r\n                    <Image Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                </Grid>\r\n            </Border>\r\n\r\n            <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Grid.ColumnSpan=\"2\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"*\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <Grid x:Name=\"Description\" VerticalAlignment=\"Center\" Margin=\"90,-35,90,0\" Visibility=\"{Binding DescriptionVisibility}\">\r\n                    <Border Margin=\"-12\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                    <StackPanel VerticalAlignment=\"Top\" HorizontalAlignment=\"Stretch\">\r\n                        <TextBlock Text=\"{Binding Status}\" TextAlignment=\"Center\" TextWrapping=\"Wrap\"/>\r\n                        <TextBlock Text=\"{Binding Resources.SecretChatsDescription, Source={StaticResource Strings}}\" Margin=\"0,16,0,0\" TextAlignment=\"Left\" TextWrapping=\"Wrap\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n\r\n                <controls:MultiTemplateLazyListBox \r\n                    x:Name=\"Items\" Margin=\"0,-18,0,0\"\r\n                    ItemsSource=\"{Binding Items}\"\r\n                    IsScrolling=\"{Binding IsScrolling, Mode=TwoWay}\"\r\n                    CloseToEnd=\"Items_OnCloseToEnd\"\r\n                    TemplateSelector=\"{StaticResource DecryptedMessageTemplateSelector}\"\r\n                    Style=\"{StaticResource LazyListBoxInverseStyle}\">\r\n                    <controls:MultiTemplateLazyListBox.ItemsPanel>\r\n                        <ItemsPanelTemplate>\r\n                            <VirtualizingStackPanel/>\r\n                        </ItemsPanelTemplate>\r\n                    </controls:MultiTemplateLazyListBox.ItemsPanel>\r\n                    <controls:MultiTemplateLazyListBox.Projection>\r\n                        <PlaneProjection RotationZ=\"180\"/>\r\n                    </controls:MultiTemplateLazyListBox.Projection>\r\n                    <i:Interaction.Triggers>\r\n                        <triggers:CompressionTrigger CompressionType=\"Bottom\">\r\n                            <micro:ActionMessage MethodName=\"LoadNextSlice\"/>\r\n                        </triggers:CompressionTrigger>\r\n                    </i:Interaction.Triggers>\r\n                </controls:MultiTemplateLazyListBox>\r\n                <Image x:Name=\"MessagesCache\" Source=\"{Binding Chat.Bitmap}\" Margin=\"0,-18,0,0\">\r\n                    <Image.Projection>\r\n                        <PlaneProjection RotationZ=\"180\"/>\r\n                    </Image.Projection>\r\n                </Image>\r\n\r\n\r\n                <controls:WatermarkedTextBox \r\n                    x:Name=\"InputMessage\"\r\n                    Grid.Row=\"1\"\r\n                    GotFocus=\"InputMessage_OnGotFocus\"\r\n                    LostFocus=\"InputMessage_OnLostFocus\"\r\n                    KeyDown=\"InputMessage_OnKeyDown\"\r\n                    Visibility=\"{Binding InputVisibility}\"\r\n                    Margin=\"109,0,12,12\"\r\n                    HorizontalContentAlignment=\"Left\" \r\n                    HorizontalAlignment=\"Stretch\"\r\n                    Watermark=\"{Binding Resources.YourMessage, Converter={StaticResource Lowercase}, Source={StaticResource Strings}}\" \r\n                    WatermarkForeground=\"{Binding WatermarkForeground}\"\r\n                    Text=\"{Binding Text, Mode=TwoWay}\"\r\n                    MinHeight=\"48\" MaxHeight=\"140\" VerticalAlignment=\"Bottom\" AcceptsReturn=\"True\" \r\n                    TextWrapping=\"Wrap\" Style=\"{StaticResource MessageTextBoxStyle}\"\r\n                    InputScope=\"Text\">\r\n                    <controls:WatermarkedTextBox.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </controls:WatermarkedTextBox.RenderTransform>\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </controls:WatermarkedTextBox>\r\n\r\n                <ContentControl x:Name=\"EmojiPlaceholder\" Margin=\"0,33,0,0\" Grid.Row=\"2\" HorizontalContentAlignment=\"Stretch\" Visibility=\"Collapsed\"/>\r\n\r\n                <Border x:Name=\"WaitingBar\" Background=\"{StaticResource PhoneChromeBrush}\" Height=\"72\" Grid.Row=\"3\" HorizontalAlignment=\"Stretch\">\r\n                    <Grid>\r\n                        <TextBlock Visibility=\"{Binding WaitingBarVisibility}\" Text=\"{Binding AppBarStatus}\" VerticalAlignment=\"Center\" TextWrapping=\"Wrap\" HorizontalAlignment=\"Stretch\" TextAlignment=\"Center\"/>\r\n                        <Button x:Name=\"DeleteChat\" Visibility=\"{Binding DeleteButtonVisibility}\" Content=\"{Binding Resources.Delete, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n                    </Grid>\r\n                </Border>\r\n            </Grid>\r\n\r\n            <ContentControl\r\n                Grid.ColumnSpan=\"2\" Grid.RowSpan=\"2\" \r\n                x:Name=\"ChooseAttachment\" \r\n                VerticalAlignment=\"Stretch\" \r\n                HorizontalAlignment=\"Stretch\" \r\n                HorizontalContentAlignment=\"Stretch\" \r\n                VerticalContentAlignment=\"Stretch\"/>\r\n        </Grid>\r\n\r\n        <ContentControl\r\n            Grid.RowSpan=\"2\" Grid.ColumnSpan=\"2\" \r\n            x:Name=\"ImageViewer\"\r\n            VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n            VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n        <Border\r\n            Grid.RowSpan=\"2\" Grid.ColumnSpan=\"2\" \r\n            x:Name=\"SecretImageViewer\"\r\n            Background=\"Black\"\r\n            Visibility=\"Collapsed\"\r\n            MouseLeftButtonUp=\"SecretImageViewer_OnMouseLeftButtonUp\"\r\n            MouseLeave=\"SecretImageViewer_OnMouseLeave\"\r\n            VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\">\r\n            <Image Source=\"{Binding SecretPhoto.Media, Converter={StaticResource DefaultPhotoConverter}, Mode=OneWay}\" Stretch=\"Uniform\"/>\r\n        </Border>\r\n    </Grid>\r\n\r\n\r\n</phone:PhoneApplicationPage>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/SecretDialogDetailsView.xaml.cs",
    "content": "﻿using System;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Media;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsView\r\n    {\r\n        public SecretDialogDetailsViewModel ViewModel\r\n        {\r\n            get { return DataContext as SecretDialogDetailsViewModel; }\r\n        }\r\n\r\n        private readonly Stopwatch _timer;\r\n\r\n        #region ApplicationBar\r\n        private readonly AppBarButton _sendButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Send,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.send.text.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _attachButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Attach,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.attach.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _smileButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Emoji,\r\n            //IsEnabled = false,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.smile.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _manageButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Manage,\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.manage.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _forwardButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Forward,\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.forwardmessage.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _deleteButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Delete,\r\n            IsEnabled = true,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.delete.png\", UriKind.Relative)\r\n        };\r\n\r\n        private bool _firstRun = true;\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (!_firstRun) return;\r\n            _firstRun = false;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Opacity = 0.99;\r\n\r\n            ApplicationBar.Buttons.Add(_sendButton);\r\n            ApplicationBar.Buttons.Add(_attachButton);\r\n            ApplicationBar.Buttons.Add(_smileButton);\r\n            ApplicationBar.Buttons.Add(_manageButton);\r\n\r\n            _sendButton.IsEnabled = ViewModel.CanSend;\r\n            ApplicationBar.IsVisible = ViewModel.IsApplicationBarVisible && !ViewModel.IsChooseAttachmentOpen;\r\n        }\r\n        #endregion\r\n\r\n        private EmojiControl _emojiKeyboard;\r\n\r\n        private TranslateTransform _frameTransform;\r\n\r\n        public static readonly DependencyProperty RootFrameTransformProperty = DependencyProperty.Register(\r\n            \"RootFrameTransformProperty\", typeof(double), typeof(SecretDialogDetailsView), new PropertyMetadata(OnRootFrameTransformChanged));\r\n\r\n        private static void OnRootFrameTransformChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var view = d as SecretDialogDetailsView;\r\n            if (view != null)\r\n            {\r\n                view._frameTransform.Y = 0;\r\n            }\r\n        }\r\n\r\n        public double RootFrameTransform\r\n        {\r\n            get { return (double)GetValue(RootFrameTransformProperty); }\r\n            set { SetValue(RootFrameTransformProperty, value); }\r\n        }\r\n\r\n        private void SetRootFrameBinding()\r\n        {\r\n            var frame = (Frame)Application.Current.RootVisual;\r\n            _frameTransform = ((TranslateTransform)((TransformGroup)frame.RenderTransform).Children[0]);\r\n            var binding = new Binding(\"Y\")\r\n            {\r\n                Source = _frameTransform\r\n            };\r\n            SetBinding(RootFrameTransformProperty, binding);\r\n        }\r\n\r\n        private void RemoveRootFrameBinding()\r\n        {\r\n            ClearValue(RootFrameTransformProperty);\r\n        }\r\n\r\n        public SecretDialogDetailsView()\r\n        {\r\n            _timer = System.Diagnostics.Stopwatch.StartNew();\r\n\r\n            InitializeComponent();\r\n\r\n            _sendButton.Click += (sender, args) => ViewModel.Send();\r\n            _attachButton.Click += (sender, args) =>\r\n            {\r\n                EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n                Self.Focus();\r\n                ViewModel.Attach();\r\n            };\r\n            _manageButton.Click += (sender, args) => SwitchToSelectionMode();\r\n            _deleteButton.Click += (sender, args) =>\r\n            {\r\n                ViewModel.DeleteMessages();\r\n                SwitchToNormalMode();\r\n            };\r\n            _smileButton.Click += (sender, args) =>\r\n            {\r\n                if (_emojiKeyboard == null)\r\n                {\r\n                    _emojiKeyboard = EmojiControl.GetInstance();\r\n\r\n                    _emojiKeyboard.BindTextBox(InputMessage);\r\n                    EmojiPlaceholder.Content = _emojiKeyboard;\r\n                    _emojiKeyboard.IsOpen = true;\r\n                }\r\n\r\n                if (EmojiPlaceholder.Visibility == Visibility.Visible)\r\n                {\r\n                    if (InputMessage == FocusManager.GetFocusedElement())\r\n                    {\r\n                        _smileButtonPressed = true;\r\n                        Items.Focus(); \r\n                        \r\n                        EmojiPlaceholder.Opacity = 1.0;\r\n                        EmojiPlaceholder.Height = EmojiControl.PortraitOrientationHeight;\r\n                    }\r\n                    else\r\n                    {\r\n                        EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    var awaitKeyboardDown = false;\r\n                    if (InputMessage == FocusManager.GetFocusedElement())\r\n                    {\r\n                        awaitKeyboardDown = true;\r\n                        Items.Focus();\r\n                    }\r\n\r\n                    ThreadPool.QueueUserWorkItem(state =>\r\n                    {\r\n                        if (awaitKeyboardDown)\r\n                        {\r\n                            Thread.Sleep(400);\r\n                        }\r\n                        Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                        {\r\n                            EmojiPlaceholder.Visibility = Visibility.Visible;\r\n                        });\r\n                    });\r\n                }\r\n            };\r\n\r\n            Loaded += OnLoaded;\r\n            Unloaded += OnUnloaded;\r\n        }\r\n\r\n        private void SwitchToSelectionMode()\r\n        {\r\n            Items.Focus();\r\n            ViewModel.IsSelectionEnabled = true;\r\n            //EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n\r\n\r\n            ApplicationBar.Buttons.Clear();\r\n            //ApplicationBar.Buttons.Add(_forwardButton);\r\n            ApplicationBar.Buttons.Add(_deleteButton);\r\n        }\r\n\r\n        private void SwitchToNormalMode()\r\n        {\r\n            ViewModel.IsSelectionEnabled = false;\r\n\r\n            ApplicationBar.Buttons.Clear();\r\n\r\n            ApplicationBar.Buttons.Clear();\r\n            ApplicationBar.Buttons.Add(_sendButton);\r\n            ApplicationBar.Buttons.Add(_attachButton);\r\n            ApplicationBar.Buttons.Add(_smileButton);\r\n            ApplicationBar.Buttons.Add(_manageButton);\r\n        }\r\n\r\n        public static readonly DependencyProperty StopwatchProperty =\r\n            DependencyProperty.Register(\"Stopwatch\", typeof(string), typeof(SecretDialogDetailsView), new PropertyMetadata(default(string)));\r\n\r\n        public string Stopwatch\r\n        {\r\n            get { return (string)GetValue(StopwatchProperty); }\r\n            set { SetValue(StopwatchProperty, value); }\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            SetRootFrameBinding();\r\n\r\n            if (!ViewModel.StateService.IsEmptyBackground)\r\n            {\r\n                var color = Colors.White;\r\n                color.A = 254;\r\n                SystemTray.ForegroundColor = color;\r\n            }\r\n\r\n            ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            ViewModel.ScrollToBottom += OnViewModelScrollToBottom;\r\n\r\n            if (ViewModel.IsApplicationBarVisible)\r\n            {\r\n                BuildLocalizedAppBar();\r\n            }\r\n            else if (ApplicationBar != null)\r\n            {\r\n                ApplicationBar.IsVisible = ViewModel.IsApplicationBarVisible && !ViewModel.IsChooseAttachmentOpen;\r\n            }\r\n\r\n            RunAnimation();\r\n            Stopwatch = _timer.Elapsed.ToString();\r\n        }\r\n\r\n        private void OnViewModelScrollToBottom(object sender, System.EventArgs e)\r\n        {\r\n            if (ViewModel.Items.Count > 0)\r\n            {\r\n                Items.ScrollIntoView(ViewModel.Items[0]);\r\n            }\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            RemoveRootFrameBinding();\r\n\r\n            ViewModel.ScrollToBottom -= OnViewModelScrollToBottom;\r\n            ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n        }\r\n\r\n        private Binding _visibilityBinding;\r\n\r\n        private static Binding SaveVisibilityBinding(FrameworkElement element)\r\n        {\r\n            var visibilityExpression = element.GetBindingExpression(VisibilityProperty);\r\n            if (visibilityExpression != null)\r\n            {\r\n                return visibilityExpression.ParentBinding;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static void RestoreVisibilityBinding(FrameworkElement element, Binding binding, Visibility defaultValue)\r\n        {\r\n            if (binding != null)\r\n            {\r\n                element.SetBinding(VisibilityProperty, binding);\r\n            }\r\n            else\r\n            {\r\n                element.Visibility = defaultValue;\r\n            }\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsApplicationBarVisible)\r\n                && ViewModel.IsApplicationBarVisible)\r\n            {\r\n                BuildLocalizedAppBar();\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ChooseAttachment)\r\n               && ViewModel.ChooseAttachment != null)\r\n            {\r\n                ViewModel.ChooseAttachment.PropertyChanged += OnChooseAttachmentPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer)\r\n               && ViewModel.ImageViewer != null)\r\n            {\r\n                ViewModel.ImageViewer.PropertyChanged += OnImageViewerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsApplicationBarVisible))\r\n            {\r\n                ApplicationBar.IsVisible = ViewModel.IsApplicationBarVisible && !ViewModel.IsChooseAttachmentOpen;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.CanSend))\r\n            {\r\n                _sendButton.IsEnabled = ViewModel.CanSend;\r\n            }\r\n        }\r\n\r\n        private IApplicationBar _prevApplicationBar;\r\n\r\n        private void OnImageViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer.IsOpen))\r\n            {\r\n                Items.IsHitTestVisible = !ViewModel.ChooseAttachment.IsOpen && (ViewModel.ImageViewer == null || !ViewModel.ImageViewer.IsOpen);\r\n\r\n                if (ViewModel.ImageViewer != null\r\n                    && ViewModel.ImageViewer.IsOpen)\r\n                {\r\n                    _prevApplicationBar = ApplicationBar;\r\n                    ContentPanel.Visibility = Visibility.Collapsed;\r\n                    ApplicationBar = ((DecryptedImageViewerView)ImageViewer.Content).ApplicationBar;\r\n                }\r\n                else\r\n                {\r\n                    ContentPanel.Visibility = Visibility.Visible;\r\n                    if (_prevApplicationBar != null)\r\n                    {\r\n                        ApplicationBar = _prevApplicationBar;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnChooseAttachmentPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ChooseAttachment.IsOpen))\r\n            {\r\n                Items.IsHitTestVisible = !ViewModel.ChooseAttachment.IsOpen && (ViewModel.ImageViewer == null || !ViewModel.ImageViewer.IsOpen);\r\n            }\r\n        }\r\n\r\n        private bool _isForwardInAnimation;\r\n        private bool _isBackwardInAnimation;\r\n        private bool _isBackwardOutAnimation;\r\n        private bool _fromExternalUri;\r\n        private readonly Uri _externalUri = new Uri(@\"app://external/\");\r\n\r\n        private void RunAnimation()\r\n        {\r\n            if (_isForwardInAnimation)\r\n            {\r\n                _isForwardInAnimation = false;\r\n\r\n                var storyboard = new Storyboard();\r\n                var continuumElementX = new DoubleAnimationUsingKeyFrames();\r\n                continuumElementX.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 130.0 });\r\n                continuumElementX.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(continuumElementX, Title);\r\n                Storyboard.SetTargetProperty(continuumElementX, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n                storyboard.Children.Add(continuumElementX);\r\n\r\n                var continuumElementY = new DoubleAnimationUsingKeyFrames();\r\n                continuumElementY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -40.0 });\r\n                continuumElementY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n                Storyboard.SetTarget(continuumElementY, Title);\r\n                Storyboard.SetTargetProperty(continuumElementY, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(continuumElementY);\r\n\r\n                var continuumLayoutRootY = new DoubleAnimationUsingKeyFrames();\r\n                continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 150.0 });\r\n                continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(continuumLayoutRootY, LayoutRoot);\r\n                Storyboard.SetTargetProperty(continuumLayoutRootY, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(continuumLayoutRootY);\r\n\r\n                var continuumLayoutRootOpacity = new DoubleAnimation { From = 0.0, To = 1.0, Duration = TimeSpan.FromSeconds(0.25), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } };\r\n                Storyboard.SetTarget(continuumLayoutRootOpacity, LayoutRoot);\r\n                Storyboard.SetTargetProperty(continuumLayoutRootOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(continuumLayoutRootOpacity);\r\n\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    LayoutRoot.Opacity = 1.0;\r\n                    Items.Visibility = Visibility.Collapsed;\r\n                    storyboard.Completed += (o, e) =>\r\n                    {\r\n                        MessagesCache.Visibility = Visibility.Collapsed;\r\n                        Items.Visibility = Visibility.Visible;\r\n                        ViewModel.OnForwardInAnimationComplete();\r\n                    };\r\n                    storyboard.Begin();\r\n                });\r\n            }\r\n            else if (_isBackwardOutAnimation)\r\n            {\r\n                _isBackwardOutAnimation = false;\r\n\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation);\r\n\r\n                storyboard.Begin();\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            ViewModel.OnNavigatedTo();\r\n            //MediaControl.Content = MessagePlayerControl.Player;\r\n\r\n            // этот код выполняется до того, как происходит отрисовка экрана\r\n            // нельзя ставить сюда долгие операции\r\n            if (e.NavigationMode == NavigationMode.New)\r\n            {\r\n                LayoutRoot.Opacity = 0.0;\r\n                _isForwardInAnimation = true;\r\n            }\r\n            else if (e.NavigationMode == NavigationMode.Back)\r\n            {\r\n                if (_fromExternalUri)\r\n                {\r\n                    ThreadPool.QueueUserWorkItem(state =>\r\n                    {\r\n                        Thread.Sleep(500);\r\n                        Deployment.Current.Dispatcher.BeginInvoke(() => ViewModel.OnBackwardInAnimationComplete());\r\n                    });\r\n                }\r\n                else\r\n                {\r\n                    _isBackwardInAnimation = true;\r\n                }\r\n                _fromExternalUri = false;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        public static readonly DependencyProperty BitmapProperty =\r\n            DependencyProperty.Register(\"Bitmap\", typeof(WriteableBitmap), typeof(SecretDialogDetailsView), new PropertyMetadata(default(WriteableBitmap)));\r\n\r\n        public WriteableBitmap Bitmap\r\n        {\r\n            get { return (WriteableBitmap)GetValue(BitmapProperty); }\r\n            set { SetValue(BitmapProperty, value); }\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            if (_emojiKeyboard != null)\r\n            {\r\n                // Destroy EmojiControl\r\n                _emojiKeyboard.IsOpen = false;\r\n                _emojiKeyboard.UnbindTextBox();\r\n                EmojiPlaceholder.Content = null; // Remove from view\r\n                EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n                _emojiKeyboard = null;\r\n            }\r\n\r\n            base.OnNavigatingFrom(e);\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n            ViewModel.OnNavigatedFrom();\r\n            //MediaControl.Content = null;\r\n            //MessagePlayerControl.Stop();\r\n\r\n            if (e.Uri == _externalUri)\r\n            {\r\n                _fromExternalUri = true;\r\n            }\r\n            else\r\n            {\r\n                _fromExternalUri = false;\r\n                //ThreadPool.QueueUserWorkItem(state =>\r\n                {\r\n                    //Thread.Sleep(100);\r\n                    //Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        var timer = new Stopwatch();\r\n                        timer.Start();\r\n                        var width = (int)Items.RenderSize.Width;\r\n                        var height = (int)Items.RenderSize.Height;\r\n                        var writeableBitmap = new WriteableBitmap(width, height);\r\n                        writeableBitmap.Render(Items, new CompositeTransform { ScaleX = 1.0, ScaleY = 1.0 });\r\n                        writeableBitmap.Invalidate();\r\n                        Bitmap = writeableBitmap;\r\n                        MessagesCache.Visibility = Visibility.Visible;\r\n                        Items.Visibility = Visibility.Collapsed;\r\n                        var elapsed = timer.Elapsed;\r\n                    }//);\r\n                }//);\r\n            }\r\n\r\n            base.OnNavigatedFrom(e);\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            if (!NavigationService.BackStack.Any())\r\n            {\r\n                e.Cancel = true;\r\n                ViewModel.NavigateToShellViewModel();\r\n\r\n                return;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        private void SecretDialogDetailsView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            if (ViewModel.ImageViewer != null\r\n                && ViewModel.ImageViewer.IsOpen)\r\n            {\r\n                ViewModel.ImageViewer.CloseViewer();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.IsSelectionEnabled)\r\n            {\r\n                SwitchToNormalMode();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.ChooseAttachment != null\r\n                && ViewModel.ChooseAttachment.IsOpen)\r\n            {\r\n                e.Cancel = true;\r\n                ViewModel.ChooseAttachment.Close();\r\n                return;\r\n            }\r\n\r\n            _isBackwardOutAnimation = true;\r\n\r\n            try\r\n            {\r\n                if (Items.Visibility == Visibility.Visible)\r\n                {\r\n                    var writeableBitmap = new WriteableBitmap(Items, null);\r\n                    ViewModel.Chat.SetBitmap(writeableBitmap);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"WritableBitmap exception \" + ex);\r\n            }\r\n            MessagesCache.Visibility = Visibility.Visible;\r\n            Items.Visibility = Visibility.Collapsed;\r\n\r\n            RunAnimation();\r\n        }\r\n\r\n        private void NavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_isBackwardInAnimation)\r\n            {\r\n                _isBackwardInAnimation = false;\r\n\r\n                Items.Visibility = Visibility.Visible;\r\n                MessagesCache.Visibility = Visibility.Collapsed;\r\n                ViewModel.OnBackwardInAnimationComplete();\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        private void InputMessage_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                if (ViewModel.StateService.SendByEnter)\r\n                {\r\n                    ViewModel.Send();\r\n                    e.Handled = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void InputMessage_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            EmojiPlaceholder.Visibility = Visibility.Visible;\r\n            EmojiPlaceholder.Opacity = 0.0;\r\n            EmojiPlaceholder.Height = EmojiControl.PortraitOrientationHeight;\r\n\r\n            if (ViewModel.Items.Count == 0)\r\n            {\r\n                Description.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        private bool _smileButtonPressed;\r\n\r\n        private void InputMessage_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_smileButtonPressed)\r\n            {\r\n                if (EmojiPlaceholder.Visibility == Visibility.Visible)\r\n                {\r\n                    EmojiPlaceholder.Visibility = Visibility.Collapsed;\r\n                }\r\n            }\r\n            _smileButtonPressed = false;\r\n\r\n            if (EmojiPlaceholder.Visibility == Visibility.Collapsed)\r\n            {\r\n                //AudioRecorder.Visibility = Visibility.Visible;\r\n                //DialogPhoto.Visibility = Visibility.Visible;\r\n                //Title.Visibility = Visibility.Visible;\r\n            }\r\n\r\n            if (ViewModel.Items.Count == 0)\r\n            {\r\n                Description.Visibility = Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        private void NavigationOutTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            //Items.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private void SecretPhotoPlaceholder_OnElapsed(object sender, System.EventArgs e)\r\n        {\r\n            var control = sender as FrameworkElement;\r\n            if (control == null) return;\r\n            ViewModel.DeleteMessage(control.DataContext as TLDecryptedMessageMediaPhoto);\r\n            SecretImageViewer.Visibility = Visibility.Collapsed;\r\n            //MessageBox.Show(\"Elapsed\");\r\n        }\r\n\r\n        private void SecretPhotoPlaceholder_OnStartTimer(object sender, System.EventArgs e)\r\n        {\r\n            var uielement = sender as FrameworkElement;\r\n            if (uielement != null)\r\n            {\r\n                var decryptedMessage = uielement.DataContext as TLDecryptedMessageMediaPhoto;\r\n                if (decryptedMessage != null)\r\n                {\r\n                    var result = ViewModel.OpenSecretPhoto(decryptedMessage);\r\n                    if (result)\r\n                    {\r\n                        SecretImageViewer.Visibility = Visibility.Visible;\r\n                        ApplicationBar.IsVisible = false;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n            //            var uielement = sender as FrameworkElement;\r\n            //            if (uielement != null)\r\n            //            {\r\n            //                var decryptedMessage = uielement.DataContext as TLDecryptedMessage17;\r\n            //                if (decryptedMessage != null)\r\n            //                {\r\n            //                    var result = ViewModel.OpenSecretPhoto(decryptedMessage);\r\n            //                    if (result)\r\n            //                    {\r\n            //                        SecretImageViewer.Visibility = Visibility.Visible;\r\n            //                        ApplicationBar.IsVisible = false;\r\n            //                    }\r\n            //                }\r\n            //            }\r\n        }\r\n\r\n        private void SecretImageViewer_OnMouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            SecretImageViewer.Visibility = Visibility.Collapsed;\r\n            ApplicationBar.IsVisible = true;\r\n        }\r\n\r\n        private void SecretImageViewer_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            SecretImageViewer.Visibility = Visibility.Collapsed;\r\n            ApplicationBar.IsVisible = true;\r\n        }\r\n\r\n        private void DeleteMenuItem_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            ViewModel.DeleteMessage(element.DataContext as TLDecryptedMessage);\r\n        }\r\n\r\n        private void CopyMenuItem_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            ViewModel.CopyMessage(element.DataContext as TLDecryptedMessage);\r\n        }\r\n\r\n        private void Items_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (ViewModel.SliceLoaded) return;\r\n\r\n            ViewModel.LoadNextSlice();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Dialogs/StickerHintsView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.StickerHintsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushLight\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushDark\" Color=\"#FF1F1F1F\"/>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\">\r\n        <Grid.Resources>\r\n            <Storyboard x:Name=\"OpenStickersStoryboard\" TargetName=\"StickersPanel\" Completed=\"OpenStickersStoryboard_OnCompleted\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\" Storyboard.TargetName=\"StickersPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.00\" Value=\"24\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"5\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimation From=\"0\" To=\"1\" Duration=\"0:0:0.25\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <DoubleAnimation.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"5\"/>\r\n                    </DoubleAnimation.EasingFunction>\r\n                </DoubleAnimation>\r\n            </Storyboard>\r\n        </Grid.Resources>\r\n\r\n        <Grid x:Name=\"StickersPanel\" CacheMode=\"BitmapCache\">\r\n            <Border x:Name=\"BackgroundBorder\" Background=\"White\"/>\r\n            <ItemsControl ItemsSource=\"{Binding Hints}\">\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel Orientation=\"Horizontal\"/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\" VerticalContentAlignment=\"Center\">\r\n                            <Image Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\" Margin=\"2,3,1,3\" \r\n                                   Height=\"{Binding Document, Converter={StaticResource StickerPreviewToDimensionConverter}, ConverterParameter=Height}\" Width=\"{Binding Document, Converter={StaticResource StickerPreviewToDimensionConverter}, ConverterParameter=Width}\"/>\r\n                        </ListBoxItem>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Disabled\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n            </ItemsControl>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/StickerHintsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class StickerHintsView\r\n    {\r\n        public StickerHintsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            BackgroundBorder.Background = isLightTheme\r\n                ? (Brush)Resources[\"HintsBackgroundBrushLight\"]\r\n                : (Brush)Resources[\"HintsBackgroundBrushDark\"];\r\n        }\r\n\r\n        //private IList<TLStickerItem> _delayedStickers;\r\n\r\n        private void OpenStickersStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            //if (_delayedStickers != null && _stickers != null)\r\n            //{\r\n            //    for (var i = 0; i < _delayedStickers.Count; i++)\r\n            //    {\r\n            //        _stickers.Add(_delayedStickers[i]);\r\n            //    }\r\n            //    _delayedStickers = null;\r\n            //}\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/StickerPreviewMenu.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.StickerPreviewMenu\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n\r\n\r\n        <Storyboard x:Name=\"OpenStoryboard\" Completed=\"OpenStoryboard_OnCompleted\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"LayoutRoot\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"-90\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n\r\n        <Storyboard x:Name=\"CloseStoryboard\" Completed=\"CloseStoryboard_OnCompleted\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Projection).(PlaneProjection.RotationX)\" Storyboard.TargetName=\"LayoutRoot\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"90\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"LayoutRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.25\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Collapsed</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid.Projection>\r\n            <PlaneProjection/>\r\n        </Grid.Projection>\r\n        <Grid Margin=\"12,25,12,25\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <ListBoxItem Tap=\"Send_OnTap\">\r\n                <TextBlock Margin=\"12,0,12,12\" Text=\"{Binding Resources.Send, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n            </ListBoxItem>\r\n            <ListBoxItem Grid.Row=\"1\" x:Name=\"OpenPackButton\" Tap=\"OpenPack_OnTap\">\r\n                <TextBlock Margin=\"12,0,12,12\" Text=\"{Binding Resources.Pack, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n            </ListBoxItem>\r\n            <ListBoxItem Grid.Row=\"2\" Tap=\"ChangeFaved_OnTap\">\r\n                <TextBlock x:Name=\"SwitchFavedStickerLabel\" Margin=\"12,0,12,12\" Text=\"{Binding Resources.AddToFavorites, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n            </ListBoxItem>\r\n            <!--<ListBoxItem Grid.Row=\"2\" Tap=\"Cancel_OnTap\">\r\n                <TextBlock Margin=\"12,0,12,12\" Text=\"{Binding Resources.Cancel, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextLargeStyle}\" />\r\n            </ListBoxItem>-->\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/StickerPreviewMenu.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class StickerPreviewMenu\r\n    {\r\n        public event EventHandler<StickerSelectedEventArgs> Send;\r\n\r\n        public event EventHandler<ButtonEventArgs> OpenPack;\r\n\r\n        public event EventHandler<StickerSelectedEventArgs> ChangeFaved;\r\n\r\n        public event EventHandler Closed;\r\n\r\n        private readonly UIElement _preview;\r\n\r\n        public StickerPreviewMenu(UIElement preview)\r\n        {\r\n            _preview = preview;\r\n\r\n            InitializeComponent();\r\n\r\n            LayoutRoot.Visibility = Visibility.Collapsed;\r\n            LayoutRoot.RenderTransform = new TranslateTransform{ Y = 0.0 };\r\n        }\r\n\r\n        private void Send_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            CloseInternal();\r\n\r\n            var handler = Send;\r\n            if (handler != null) handler(this, new StickerSelectedEventArgs{ Sticker = _sticker });\r\n        }\r\n\r\n        private void OpenPack_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            CloseInternal();\r\n\r\n            var handler = OpenPack;\r\n            if (handler != null) handler(this, new ButtonEventArgs { Button = _stickerSetButton });\r\n        }\r\n\r\n        private void ChangeFaved_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            CloseInternal();\r\n\r\n            var handler = ChangeFaved;\r\n            if (handler != null) handler(this, new StickerSelectedEventArgs { Sticker = _sticker });\r\n        }\r\n\r\n        private void Cancel_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Close();\r\n        }\r\n\r\n        public bool IsOpened\r\n        {\r\n            get { return LayoutRoot.Visibility == Visibility.Visible && !_isClosing; }\r\n        }\r\n\r\n        public TLInputStickerSetBase InputStickerSet { get; set; }\r\n\r\n        private IApplicationBar _applicationBar;\r\n\r\n        public void Open()\r\n        {\r\n            OpenInternal();\r\n        }\r\n\r\n        private void OpenInternal()\r\n        {\r\n            _preview.IsHitTestVisible = true;\r\n\r\n            var page = Application.Current.RootVisual.FindChildOfType<PhoneApplicationPage>();\r\n            if (page != null)\r\n            {\r\n                _applicationBar = page.ApplicationBar;\r\n                page.ApplicationBar = null;\r\n            }\r\n\r\n            OpenStoryboard.Begin();\r\n        }\r\n\r\n        private bool _fireClosed;\r\n\r\n        private bool _isClosing;\r\n\r\n        public void Close()\r\n        {\r\n            CloseInternal(true);\r\n        }\r\n\r\n        private void CloseInternal(bool fireClosed = false)\r\n        {\r\n            _fireClosed = fireClosed;\r\n\r\n            _preview.IsHitTestVisible = false;\r\n\r\n            if (_applicationBar != null)\r\n            {\r\n                var page = Application.Current.RootVisual.FindChildOfType<PhoneApplicationPage>();\r\n                if (page != null)\r\n                {\r\n                    page.ApplicationBar = _applicationBar;\r\n                }\r\n            }\r\n\r\n            _isClosing = true;\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(CloseStoryboard.Begin);\r\n        }\r\n\r\n        private TLStickerItem _sticker;\r\n\r\n        public void SetStickerItem(TLStickerItem sticker)\r\n        {\r\n            _sticker = sticker;\r\n        }\r\n\r\n        private Button _stickerSetButton;\r\n\r\n        public void SetButton(Button stickerSetButton)\r\n        {\r\n            _stickerSetButton = stickerSetButton;\r\n            //OpenPackButton.Visibility = stickerSetButton == null ? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        private void OpenStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void CloseStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            _isClosing = false;\r\n\r\n            if (!_fireClosed)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _fireClosed = false;\r\n            var closed = Closed;\r\n            if (closed != null) closed(this, System.EventArgs.Empty);\r\n        }\r\n    }\r\n\r\n    public class ButtonEventArgs\r\n    {\r\n        public Button Button { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/UserActionView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.UserActionView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:eim=\"clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <Storyboard x:Name=\"OpenStoryboard\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.Y)\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"-90\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"0\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n\r\n        <Storyboard x:Name=\"CloseStoryboard\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.Y)\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"-90\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.15\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Collapsed</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid x:Name=\"UserActionLabel\">\r\n        <Grid.RenderTransform>\r\n            <TranslateTransform/>\r\n        </Grid.RenderTransform>\r\n\r\n        <Border Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.7\" Margin=\"0,-2,0,0\" MinHeight=\"68\"/>\r\n        <Grid Margin=\"18,0\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition/>\r\n            </Grid.ColumnDefinitions>\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                <TextBlock micro:Message.Attach=\"[Event Tap] = [Action Invoke2]\" Foreground=\"{StaticResource PhoneAccentBrush}\" Margin=\"6,-2,6,0\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.ReportSpam, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" TextAlignment=\"Center\" HorizontalAlignment=\"Stretch\" FontSize=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n            </ListBoxItem>\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\" Grid.Column=\"1\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                <TextBlock micro:Message.Attach=\"[Event Tap] = [Action Invoke]\" Margin=\"6,-2,6,0\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.AddContact, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" VerticalAlignment=\"Center\" TextAlignment=\"Center\" HorizontalAlignment=\"Stretch\" FontSize=\"{StaticResource PhoneFontSizeMediumLarge}\">\r\n                    <i:Interaction.Triggers>\r\n                        <i:EventTrigger EventName=\"Tap\">\r\n                            <eim:ControlStoryboardAction Storyboard=\"{Binding ElementName=CloseStoryboard}\"/>\r\n                        </i:EventTrigger>\r\n                    </i:Interaction.Triggers>\r\n                </TextBlock>\r\n            </ListBoxItem>\r\n        </Grid>\r\n        <!--<Button Margin=\"6,0,12,0\" micro:Message.Attach=\"[Event Click] = [Action Remove]\" x:Name=\"RemoveUserActionButton\"\r\n                HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Style=\"{StaticResource ProfileButtonStyle}\"                   \r\n            toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n            <i:Interaction.Triggers>\r\n                <i:EventTrigger EventName=\"Click\">\r\n                    <eim:ControlStoryboardAction Storyboard=\"{Binding ElementName=CloseStoryboard}\"/>\r\n                    <ec:ChangePropertyAction TargetName=\"RemoveUserActionButton\" PropertyName=\"IsEnabled\" Value=\"False\"/>\r\n                </i:EventTrigger>\r\n            </i:Interaction.Triggers>\r\n\r\n            <StackPanel Margin=\"0\" Orientation=\"Horizontal\">\r\n                <StackPanel.RenderTransform>\r\n                    <RotateTransform CenterX=\"21.5\" CenterY=\"21.5\" Angle=\"45\"/>\r\n                </StackPanel.RenderTransform>\r\n                <Grid Width=\"43\" Height=\"43\">\r\n                    <Ellipse Stroke=\"{StaticResource PhoneForegroundBrush}\" Fill=\"{StaticResource PhoneBackgroundBrush}\" StrokeThickness=\"3\"  />\r\n                    <Line X2=\"21\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"3\" RenderTransformOrigin=\"0.5,0.5\">\r\n                        <Line.RenderTransform>\r\n                            <CompositeTransform TranslateX=\"11\" TranslateY=\"21.5\"/>\r\n                        </Line.RenderTransform>\r\n                    </Line>\r\n                    <Line Y2=\"21\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"3\" RenderTransformOrigin=\"0.5,0.5\">\r\n                        <Line.RenderTransform>\r\n                            <CompositeTransform TranslateX=\"21.5\" TranslateY=\"11\"/>\r\n                        </Line.RenderTransform>\r\n                    </Line>\r\n                </Grid>\r\n            </StackPanel>\r\n        </Button>-->\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/UserActionView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class UserActionView : UserControl\r\n    {\r\n        public UserActionView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Dialogs/UsernameHintsView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.UsernameHintsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushLight\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushDark\" Color=\"#FF1F1F1F\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\">\r\n        <Grid.Resources>\r\n            <DataTemplate x:Key=\"UsernameHintTemplate\">\r\n                <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                    <Grid Height=\"66\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <!--<Grid Margin=\"12,0,0,0\" Width=\"30\" Height=\"30\" VerticalAlignment=\"Center\">\r\n                            <Border Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n                            <TextBlock Margin=\"0,0,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" FontSize=\"16\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                            <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                        </Grid>-->\r\n\r\n                        <views:ConversationTileControl Size=\"42\" LabelFontSize=\"18\" Margin=\"15,0,15,0\" VerticalAlignment=\"Center\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"1\" Text=\"{Binding FullName}\" Margin=\"0,0,0,0\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" VerticalAlignment=\"Center\"/>\r\n                        <TextBlock Grid.Column=\"2\" Text=\"{Binding UserName, StringFormat='  @\\{0\\}'}\" FontSize=\"{Binding DefaultFontSizeSmall, Source={StaticResource ScaledText}}\" Visibility=\"{Binding UserName, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert}\" Opacity=\"0.6\" Margin=\"0,2,0,0\" VerticalAlignment=\"Center\"/>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </Grid.Resources>\r\n        <Grid x:Name=\"UsernameHintsPanel\" Visibility=\"Visible\" CacheMode=\"BitmapCache\">\r\n            <Border x:Name=\"BackgroundBorder\" Background=\"White\" BorderThickness=\"0,2,0,0\"/>\r\n            <Border x:Name=\"Border\" VerticalAlignment=\"Top\" Height=\"2\" Visibility=\"{Binding Hints.Count, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\"/>\r\n            <ItemsControl ItemsSource=\"{Binding Hints}\" ItemTemplate=\"{StaticResource UsernameHintTemplate}\">\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer HorizontalScrollBarVisibility=\"Disabled\" VerticalScrollBarVisibility=\"Auto\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n            </ItemsControl>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient/Views/Dialogs/UsernameHintsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class UsernameHintsView\r\n    {\r\n        public UsernameHintsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            BackgroundBorder.Background = isLightTheme\r\n                ? (Brush)Resources[\"HintsBackgroundBrushLight\"]\r\n                : (Brush)Resources[\"HintsBackgroundBrushDark\"];\r\n            Border.Background = isLightTheme\r\n                ? (Brush)Resources[\"InputBorderBrushLight\"]\r\n                : (Brush)Resources[\"InputBorderBrushDark\"];\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Media/AnimatedImageViewerView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.AnimatedImageViewerView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:media=\"clr-namespace:TelegramClient.Views.Media\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <converters:ExtendedImageConverter x:Key=\"ImageConverter\"/>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Black\" Margin=\"0,0,0,-1\">\r\n        <TextBlock Text=\"{Binding Resources.Loading, Source={StaticResource Strings}}\" Foreground=\"White\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n        <media:AnimatedImageEx x:Name=\"AnimatedImage\" Source=\"{Binding ImageSource, Converter={StaticResource ImageConverter}}\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/AnimatedImageViewerView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing System.Windows.Controls;\r\nusing ImageTools.Controls;\r\nusing ImageTools.IO.Gif;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Media;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public class AnimatedImageEx : AnimatedImage\r\n    {\r\n        private Image _image;\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n            BindXaml();\r\n            //OnSourceChanged();\r\n        }\r\n\r\n        private void BindXaml()\r\n        {\r\n            _image = GetTemplateChild(\"Image\") as Image;\r\n        }\r\n\r\n        protected override void OnSourceChanged()\r\n        {\r\n            if (Source == null)\r\n            {\r\n                if (_image != null)\r\n                {\r\n                    _image.Source = null;\r\n                }\r\n            }\r\n\r\n            base.OnSourceChanged();\r\n        }\r\n    }\r\n\r\n    public partial class AnimatedImageViewerView\r\n    {\r\n        public AnimatedImageViewerViewModel ViewModel\r\n        {\r\n            get { return DataContext as AnimatedImageViewerViewModel; }\r\n        }\r\n\r\n        public AnimatedImageViewerView()\r\n        {\r\n            ImageTools.IO.Decoders.AddDecoder<GifDecoder>();\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelProprtyChanged;\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelProprtyChanged;\r\n                AnimatedImage.Stop();\r\n            };\r\n        }\r\n\r\n        private void OnViewModelProprtyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (!ViewModel.IsOpen)\r\n                {\r\n                    AnimatedImage.Stop();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Media/DecryptedImageViewerView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.DecryptedImageViewerView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"False\" d:DesignHeight=\"800\" d:DesignWidth=\"480\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <Storyboard x:Name=\"OpenApplicationPanelAnimation\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame x:Name=\"OpenApplicationPanelAnimationStartKeyFrame\" KeyTime=\"0\" Value=\"60\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\" Value=\"Visible\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"CloseApplicationPanelAnimation\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame x:Name=\"CloseApplicationPanelAnimationStopKeyFrame\" KeyTime=\"0:0:0.20\" Value=\"-60\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.20\" Value=\"Collapsed\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"OpenTopApplicationPanelAnimation\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <EasingDoubleKeyFrame x:Name=\"OpenTopApplicationPanelAnimationStartKeyFrame\" KeyTime=\"0\" Value=\"-60\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\" Value=\"Visible\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"CloseTopApplicationPanelAnimation\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame x:Name=\"CloseTopApplicationPanelAnimationStopKeyFrame\" KeyTime=\"0:0:0.20\" Value=\"60\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.20\" Value=\"Collapsed\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <converters:ImageViewerPhotoConverter x:Key=\"ImageViewerPhotoConverter\"/>\r\n\r\n            <DataTemplate x:Key=\"PhotoTemplate\">\r\n                <Grid>\r\n                    <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}, ConverterParameter=Background}\"/>\r\n                    <Image Source=\"{Binding Media.Self, Converter={StaticResource ForcePhotoConverter}, ConverterParameter=Background}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"VideoTemplate\">\r\n                <Border MaxHeight=\"500\" Tap=\"VideoElement_OnTap\">\r\n                    <Grid VerticalAlignment=\"Center\" HorizontalAlignment=\"Stretch\" MinHeight=\"250\" Background=\"Black\">\r\n\r\n                        <controls:MediaVideoControl\r\n                            Width=\"480\"\r\n                            Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}}\"\r\n                            DownloadIconVisibility=\"{Binding Media.Self, Converter={StaticResource DownloadMediaToVisibilityConverter}}\"\r\n                            DownloadingProgress=\"{Binding Media.DownloadingProgress}\"\r\n                            UploadingProgress=\"{Binding Media.UploadingProgress}\"\r\n                            cal:Message.Attach=\"[Event CancelDownloading] = [Action CancelVideoDownloading]\"/>\r\n\r\n                        <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Image VerticalAlignment=\"Center\"\r\n\t\t\t\t\t                Width=\"48\" Height=\"48\" Margin=\"-4,3,-4,0\"\r\n\t\t\t\t\t                Source=\"/Images/Audio/appbar.transport.play.rest.png\"/>\r\n                            <TextBlock Grid.Column=\"1\"\r\n\t\t\t\t\t                VerticalAlignment=\"Center\" Margin=\"0\"\r\n\t\t\t\t\t                Text=\"{Binding Media.Video.DurationString}\"\r\n\t\t\t\t\t                Foreground=\"White\"\r\n\t\t\t\t\t                Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </Border>\r\n            </DataTemplate>\r\n\r\n            <templateSelectors:DecryptedImageViewerTemplateSelector\r\n                x:Key=\"Selector\"\r\n                PhotoTemplate=\"{StaticResource PhotoTemplate}\"\r\n                VideoTemplate=\"{StaticResource VideoTemplate}\"/>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid \r\n        x:Name=\"MainGrid\"\r\n        Background=\"Transparent\"\r\n        ManipulationStarted=\"ImagesGrid_OnManipulationStarted\"\r\n        ManipulationDelta=\"ImagesGrid_OnManipulationDelta\"\r\n        ManipulationCompleted=\"ImagesGrid_OnManipulationCompleted\"\r\n        Tap=\"ImagesGrid_OnTap\">\r\n        <Grid x:Name=\"BackgroundBorder\" HorizontalAlignment=\"Center\" Background=\"Black\" Margin=\"0,0,0,-1\" CacheMode=\"BitmapCache\" Width=\"480\"/>\r\n        <Grid x:Name=\"ImagesGrid\" Background=\"Transparent\" Margin=\"-498,0\" Width=\"1476\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Grid.RenderTransform>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition/>\r\n            </Grid.ColumnDefinitions>\r\n\r\n            <Grid x:Name=\"Item3\" Grid.Column=\"1\" VerticalAlignment=\"Center\" Width=\"480\" Margin=\"6,0\">\r\n                <ContentControl \r\n                    x:Name=\"Control3\" \r\n                    CacheMode=\"BitmapCache\"\r\n                    Content=\"{Binding NextItem}\" \r\n                    ContentTemplate=\"{Binding NextItem, Converter={StaticResource Selector}}\"\r\n                    VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                    VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n            </Grid>\r\n\r\n            <Grid x:Name=\"Item2\" Grid.Column=\"1\" VerticalAlignment=\"Center\" Width=\"480\" Margin=\"6,0\">\r\n                <ContentControl \r\n                    x:Name=\"Control2\" \r\n                    CacheMode=\"BitmapCache\"\r\n                    Content=\"{Binding CurrentItem}\" \r\n                    ContentTemplate=\"{Binding CurrentItem, Converter={StaticResource Selector}}\"\r\n                    VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                    VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\">\r\n                    <ContentControl.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </ContentControl.RenderTransform>\r\n                </ContentControl>\r\n            </Grid>\r\n\r\n            <Grid x:Name=\"Item1\" Grid.Column=\"2\" VerticalAlignment=\"Center\" Width=\"480\" Margin=\"6,0\">\r\n                <ContentControl \r\n                    x:Name=\"Control1\" \r\n                    CacheMode=\"BitmapCache\"\r\n                    Content=\"{Binding PreviousItem}\" \r\n                    ContentTemplate=\"{Binding PreviousItem, Converter={StaticResource Selector}}\"\r\n                    VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                    VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n            </Grid>\r\n        </Grid>\r\n\r\n        <Grid VerticalAlignment=\"Top\" x:Name=\"TopApplicationPanel\" CacheMode=\"BitmapCache\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform x:Name=\"TopApplicationPanelTransform\" TranslateY=\"-72\"/>\r\n            </Grid.RenderTransform>\r\n            <Border Background=\"Black\" Opacity=\"0.3\"/>\r\n\r\n            <Grid x:Name=\"TopAppBarPlaceholder\" Height=\"72\">\r\n\r\n                <TextBlock Text=\"{Binding Title}\" Margin=\"18,0\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n\r\n                <controls:SecretPhotoPlaceholder \r\n                    HorizontalAlignment=\"Right\"\r\n                    VerticalAlignment=\"Center\"\r\n                    Margin=\"0,-18\"\r\n                    Width=\"72\" Height=\"72\" \r\n                    ShowHint=\"False\"\r\n                    RenderTransformOrigin=\"0.5, 0.5\"\r\n                    Visibility=\"{Binding IsInputTTL, Converter={StaticResource BooleanToVisibilityConverter}}\"\r\n                    TTLParams=\"{Binding CurrentItem.Media.TTLParams}\"\r\n                    Elapsed=\"SecretPhotoPlaceholder_OnElapsed\">\r\n                    <controls:SecretPhotoPlaceholder.RenderTransform>\r\n                        <ScaleTransform ScaleX=\"0.5\" ScaleY=\"0.5\"/>\r\n                    </controls:SecretPhotoPlaceholder.RenderTransform>\r\n                </controls:SecretPhotoPlaceholder>\r\n            </Grid>\r\n        </Grid>\r\n\r\n        <Grid VerticalAlignment=\"Bottom\" x:Name=\"ApplicationPanel\" CacheMode=\"BitmapCache\" Margin=\"0,0,0,-72\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform x:Name=\"ApplicationPanelTransform\" TranslateY=\"72\"/>\r\n            </Grid.RenderTransform>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Border Grid.RowSpan=\"4\" Background=\"Black\" Opacity=\"0.3\"/>\r\n\r\n            <Grid Visibility=\"{Binding CurrentItem.Media.Caption, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\">\r\n                <emojiPanel:TelegramRichTextBox\r\n                    Width=\"462\"\r\n                    Margin=\"9,12,9,0\"\r\n                    MaxHeight=\"328\"\r\n                    Text=\"{Binding CurrentItem.Media.Caption}\"\r\n                    HorizontalAlignment=\"Stretch\"\r\n                    Foreground=\"White\"\r\n                    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                    Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n            </Grid>\r\n\r\n            <!--<Canvas x:Name=\"Canvas\" Grid.Row=\"1\" Height=\"68\" IsHitTestVisible=\"False\" Visibility=\"{Binding GroupedItems.Count, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\">\r\n                <controls:RibbonControl x:Name=\"Ribbon\" ItemsSource=\"{Binding GroupedItems}\" Margin=\"240,6,0,6\"/>\r\n            </Canvas>-->\r\n\r\n            <Grid Grid.Row=\"2\" x:Name=\"AppBarPlaceholder\" Height=\"72\">\r\n                <StackPanel Margin=\"10,0,0,0\" VerticalAlignment=\"Center\">\r\n                    <TextBlock x:Name=\"FullName\" Text=\"{Binding CurrentItem.From.FullName2}\" Foreground=\"White\" Height=\"26.6\" Style=\"{StaticResource PhoneTextNormalStyle}\">\r\n                        <TextBlock.RenderTransform>\r\n                            <CompositeTransform/>\r\n                        </TextBlock.RenderTransform>\r\n                    </TextBlock>\r\n                    <TextBlock x:Name=\"Date\" Margin=\"12,-5,12,0\" Text=\"{Binding CurrentItem.Date, Converter={StaticResource MessageDateTimeConverter}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                        <TextBlock.RenderTransform>\r\n                            <CompositeTransform/>\r\n                        </TextBlock.RenderTransform>\r\n                    </TextBlock>\r\n                </StackPanel>\r\n            </Grid>\r\n            <Grid Grid.Row=\"3\" x:Name=\"AppBarPlaceholder2\" Height=\"72\"/>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/DecryptedImageViewerView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define NO_RIBBON\r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Interactivity;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Behaviors;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Helpers.TemplateSelectors;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Media;\r\nusing GestureEventArgs = TelegramClient.Controls.GestureListener.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class DecryptedImageViewerView\r\n    {\r\n        private void SecretPhotoPlaceholder_OnElapsed(object sender, System.EventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                _direction = CloseDirection.Down;\r\n                ViewModel.CloseViewer();\r\n            });\r\n        }\r\n\r\n        private readonly ApplicationBarMenuItem _savePhotoMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Save\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _deleteMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Delete,\r\n            IsEnabled = true\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _sharePhotoMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = string.Format(\"{0}...\", AppResources.Share)\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _openMediaMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Media\r\n        };\r\n\r\n        public DecryptedImageViewerViewModel ViewModel\r\n        {\r\n            get { return DataContext as DecryptedImageViewerViewModel; }\r\n        }\r\n\r\n        private bool _runOnce;\r\n\r\n        private PanAndZoomBehavior _panAndZoomBehavior;\r\n\r\n        public DecryptedImageViewerView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            OptimizeFullHD();\r\n\r\n            BuildLocalizedAppBar();\r\n\r\n            Visibility = Visibility.Collapsed;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                var behaviorCollection = Interaction.GetBehaviors(Control2);\r\n                if (behaviorCollection.FirstOrDefault(x => x is PanAndZoomBehavior) == null)\r\n                {\r\n                    var panAndZoomBehavior = new PanAndZoomBehavior();\r\n                    panAndZoomBehavior.MaxZoom = 5.0;\r\n                    panAndZoomBehavior.CanZoom = true;\r\n                    panAndZoomBehavior.DoubleTap += PanAndZoom_OnDoubleTap;\r\n\r\n                    var canZoomBinding = new Binding(\"CanZoom\");\r\n                    canZoomBinding.Source = ViewModel;\r\n                    BindingOperations.SetBinding(panAndZoomBehavior, PanAndZoomBehavior.CanZoomProperty, canZoomBinding);\r\n\r\n                    behaviorCollection.Add(panAndZoomBehavior);\r\n\r\n                    _panAndZoomBehavior = panAndZoomBehavior;\r\n                }\r\n\r\n                if (!_runOnce && ViewModel.CurrentItem != null)\r\n                {\r\n                    _runOnce = true;\r\n                    BeginOpenStoryboard();\r\n                }\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged; \r\n                if (!ViewModel.ShowOpenMediaListButton)\r\n                {\r\n                    ApplicationBar.MenuItems.Remove(_openMediaMenuItem);\r\n                }\r\n                if (ViewModel.DialogDetails == null)\r\n                {\r\n                    ApplicationBar.MenuItems.Remove(_deleteMenuItem);\r\n                }\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n#if WP8\r\n            var appBar = ApplicationBar;\r\n            if (appBar == null)\r\n            {\r\n                appBar = new ApplicationBar();\r\n            }\r\n\r\n            var appBarDefaultSize = appBar.DefaultSize;\r\n            var appBarDifference = appBarDefaultSize - 72.0;\r\n\r\n            AppBarPlaceholder.Height = appBarDefaultSize;\r\n            AppBarPlaceholder2.Height = appBarDefaultSize;\r\n            ApplicationPanel.Margin = new Thickness(0.0, 0.0, 0.0, -appBarDefaultSize);\r\n            OpenApplicationPanelAnimationStartKeyFrame.Value = appBarDefaultSize;\r\n            CloseApplicationPanelAnimationStopKeyFrame.Value = appBarDefaultSize;\r\n            ApplicationPanelTransform.TranslateY = appBarDefaultSize;\r\n\r\n            TopAppBarPlaceholder.Height = appBarDefaultSize;\r\n            OpenTopApplicationPanelAnimationStartKeyFrame.Value = -appBarDefaultSize;\r\n            CloseTopApplicationPanelAnimationStopKeyFrame.Value = -appBarDefaultSize;\r\n            TopApplicationPanelTransform.TranslateY = -appBarDefaultSize;\r\n#endif\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.CurrentItem))\r\n            {\r\n                UpdateApplicationBar(ViewModel.CurrentItem as TLDecryptedMessage);\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (ViewModel.IsOpen)\r\n                {\r\n                    BeginOpenStoryboard();\r\n                }\r\n                else\r\n                {\r\n                    BeginCloseStoryboard();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UpdateApplicationBar(TLDecryptedMessage message)\r\n        {\r\n            var isTTLMessage = message != null && message.TTL.Value > 0;\r\n\r\n            _savePhotoMenuItem.IsEnabled =\r\n#if WP8\r\n                !isTTLMessage;\r\n#else     \r\n                !isTTLMessage && message != null && message.Media is TLMessageMediaPhoto;\r\n#endif\r\n            _sharePhotoMenuItem.IsEnabled = !isTTLMessage && message != null && message.Media is TLDecryptedMessageMediaPhoto;\r\n        }\r\n\r\n#if DEBUG\r\n        //~ImageViewerView()\r\n        //{\r\n        //    TLUtils.WritePerformance(\"++ImageViewerV dstr\");\r\n        //}\r\n#endif\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            ApplicationBar = new ApplicationBar { Opacity = 0.0 };\r\n            ApplicationBar.BackgroundColor = Colors.Black;\r\n            ApplicationBar.ForegroundColor = Colors.White;\r\n            ApplicationBar.StateChanged += (o, e) =>\r\n            {\r\n                ApplicationBar.Opacity = e.IsMenuVisible ? 0.9999 : 0.0;\r\n            };\r\n\r\n            _savePhotoMenuItem.Click += (o, e) => ViewModel.Save();\r\n            _sharePhotoMenuItem.Click += (o, e) => ViewModel.Share();\r\n            _openMediaMenuItem.Click += (o, e) => ViewModel.OpenMediaDetails();\r\n            //_forwardMenuItem.Click += (o, e) => ViewModel.Forward();\r\n            _deleteMenuItem.Click += (o, e) => ViewModel.Delete();\r\n\r\n            ApplicationBar.MenuItems.Add(_savePhotoMenuItem);\r\n#if WP8\r\n            ApplicationBar.MenuItems.Add(_sharePhotoMenuItem);\r\n#endif\r\n            //ApplicationBar.MenuItems.Add(_forwardMenuItem);\r\n            ApplicationBar.MenuItems.Add(_deleteMenuItem);\r\n            //ApplicationBar.MenuItems.Add(_openMediaMenuItem);         \r\n        }\r\n\r\n        private CloseDirection? _direction;\r\n        private bool _handled;\r\n\r\n        private void PanAndZoom_OnClose(object sender, PanAndZoomCloseEventArgs e)\r\n        {\r\n            _direction = e.VerticalChange > 0 ? CloseDirection.Down : CloseDirection.Up;\r\n\r\n            ViewModel.CloseViewer();\r\n        }\r\n\r\n        private void BeginCloseStoryboard()\r\n        {\r\n            SystemTray.IsVisible = true;\r\n            ApplicationBar.IsVisible = false;\r\n\r\n            var direction = _direction ?? CloseDirection.Down;\r\n            var duration = _direction != null ? TimeSpan.FromSeconds(0.15) : TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = _direction != null ? null : new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = ImagesGrid.ActualHeight / 2 + rootFrameHeight / 2;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = direction == CloseDirection.Down ? translateYTo : -translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            var opacityImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            opacityImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = 0 });\r\n            Storyboard.SetTarget(opacityImageAniamtion, BackgroundBorder);\r\n            Storyboard.SetTargetProperty(opacityImageAniamtion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityImageAniamtion);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (o, args) =>\r\n            {\r\n                Visibility = Visibility.Collapsed;\r\n                _direction = null;\r\n            };\r\n\r\n            CloseApplicationPanelAnimation.Begin();\r\n            CloseTopApplicationPanelAnimation.Begin();\r\n        }\r\n\r\n        private void BeginOpenStoryboard()\r\n        {\r\n            var selector = (DecryptedImageViewerTemplateSelector)Resources[\"Selector\"];\r\n\r\n            Control1.Visibility = Visibility.Collapsed;\r\n            Control1.Content = ViewModel.PreviousItem;\r\n            Control1.ContentTemplate = (DataTemplate)selector.Convert(ViewModel.PreviousItem, null, null, null);\r\n            Grid.SetColumn(Item1, 0);\r\n            Control2.Visibility = Visibility.Visible;\r\n            Control2.Content = ViewModel.CurrentItem;\r\n            Control2.ContentTemplate = (DataTemplate)selector.Convert(ViewModel.CurrentItem, null, null, null);\r\n            Grid.SetColumn(Item2, 1);\r\n            Control3.Visibility = Visibility.Collapsed;\r\n            Control3.Content = ViewModel.NextItem;\r\n            Control3.ContentTemplate = (DataTemplate)selector.Convert(ViewModel.NextItem, null, null, null);\r\n            Grid.SetColumn(Item3, 2);\r\n\r\n            SetPanAndZoom();\r\n\r\n            SystemTray.IsVisible = false;\r\n            ApplicationBar.IsVisible = true;\r\n\r\n            if (_panAndZoomBehavior != null)\r\n            {\r\n                _panAndZoomBehavior.CurrentScaleX = 1.0;\r\n                _panAndZoomBehavior.CurrentScaleY = 1.0;\r\n            }\r\n\r\n            var transparentBlack = Colors.Black;\r\n            transparentBlack.A = 0;\r\n\r\n            Visibility = Visibility.Visible;\r\n            ImagesGrid.Opacity = 1.0;\r\n            ImagesGrid.RenderTransform = new CompositeTransform();\r\n            BackgroundBorder.Opacity = 1.0;\r\n\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            ((CompositeTransform)ImagesGrid.RenderTransform).TranslateY = translateYTo;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = 0.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                Control1.Visibility = Visibility.Visible;\r\n                Control2.Visibility = Visibility.Visible;\r\n                Control3.Visibility = Visibility.Visible;\r\n\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    OpenApplicationPanelAnimation.Begin();\r\n                    OpenTopApplicationPanelAnimation.Begin();\r\n                });\r\n            };\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        private void PanAndZoom_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (_handled)\r\n            {\r\n                _handled = false;\r\n                return;\r\n            }\r\n\r\n            if (ApplicationBar != null)\r\n            {\r\n                ApplicationBar.IsVisible = !ApplicationBar.IsVisible;\r\n            }\r\n\r\n            var animation = ApplicationPanel.Visibility == Visibility.Visible\r\n                ? CloseApplicationPanelAnimation\r\n                : OpenApplicationPanelAnimation;\r\n\r\n            animation.Begin();\r\n        }\r\n\r\n        private void VideoElement_OnTap(object sender, System.Windows.Input.GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n            _handled = true;\r\n            ViewModel.OpenMedia();\r\n        }\r\n\r\n        private bool? _verticalDrag;\r\n        private TLDecryptedMessageBase _currentItem;\r\n        private bool _slideAnimating;\r\n\r\n        private void ImagesGrid_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            if (_panAndZoomBehavior.CurrentScaleX > 1.0) return;\r\n            if (_slideAnimating) return;\r\n\r\n            _verticalDrag = null;\r\n        }\r\n\r\n        private void ImagesGrid_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            if (_panAndZoomBehavior.CurrentScaleX > 1.0) return;\r\n            if (_slideAnimating) return;\r\n\r\n            if (_verticalDrag == null)\r\n            {\r\n                _verticalDrag = Math.Abs(e.DeltaManipulation.Translation.Y) >\r\n                                  Math.Abs(e.DeltaManipulation.Translation.X);\r\n            }\r\n            if (_verticalDrag == false)\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                if (e.CumulativeManipulation.Translation.X < 0.0\r\n                    && ViewModel.CanSlideLeft)\r\n                {\r\n                    transform.TranslateX += e.DeltaManipulation.Translation.X;\r\n                }\r\n                else if (e.CumulativeManipulation.Translation.X > 0.0\r\n                    && ViewModel.CanSlideRight)\r\n                {\r\n                    transform.TranslateX += e.DeltaManipulation.Translation.X;\r\n                }\r\n\r\n                var percent = transform.TranslateX / 480.0;\r\n#if !NO_RIBBON\r\n                Ribbon.Move(percent);\r\n#endif\r\n\r\n                transform.TranslateX = PanAndZoomBehavior.Clamp(transform.TranslateX, -480.0 - 12.0, 480.0 + 12.0);\r\n                _panAndZoomBehavior.IsEnabled = transform.TranslateX == 0.0;\r\n            }\r\n            else\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                var translate = new CompositeTransform\r\n                {\r\n                    TranslateX = 0,\r\n                    TranslateY = e.CumulativeManipulation.Translation.Y\r\n                };\r\n\r\n                var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n                var deltaY = Math.Abs(translate.TranslateY + translate.ScaleY * transform.TranslateY + (translate.ScaleY - 1) * (transform.CenterY - translate.CenterY));\r\n                var opacity = (rootFrameHeight - deltaY) / rootFrameHeight;\r\n                var backgroundBrush = (SolidColorBrush)BackgroundBorder.Background;\r\n                var backgroundColor = backgroundBrush.Color;\r\n                backgroundColor.A = (byte)(opacity * byte.MaxValue);\r\n\r\n                BackgroundBorder.Opacity = opacity;\r\n\r\n                ImagesGrid.RenderTransform = translate;\r\n                _panAndZoomBehavior.IsEnabled = translate.TranslateY == 0.0;\r\n            }\r\n        }\r\n\r\n        private void ImagesGrid_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            if (_panAndZoomBehavior.CurrentScaleX > 1.0) return;\r\n            if (_slideAnimating) return;\r\n\r\n            _panAndZoomBehavior.IsEnabled = true;\r\n            if (_verticalDrag == true)\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                var hasVelocity = e.FinalVelocities.LinearVelocity.X > 1000.0;\r\n                var minTranslateY = 100.0;\r\n\r\n                if (Math.Abs(transform.TranslateY) > minTranslateY || hasVelocity && Math.Abs(transform.TranslateY) > 0.0)\r\n                {\r\n                    PanAndZoom_OnClose(this, new PanAndZoomCloseEventArgs { VerticalChange = e.TotalManipulation.Translation.Y });\r\n                    return;\r\n                }\r\n\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, ImagesGrid);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                storyboard.Begin();\r\n\r\n                BackgroundBorder.Opacity = 1.0;\r\n            }\r\n            else if (_verticalDrag == false)\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                var hasVelocity = Math.Abs(e.FinalVelocities.LinearVelocity.X) > 1000.0;\r\n                var minTranslateX = 160.0;\r\n\r\n                if (transform.TranslateX > minTranslateX || hasVelocity && transform.TranslateX > 0.0)\r\n                {\r\n                    SlideRight(Math.Abs(e.FinalVelocities.LinearVelocity.X));\r\n                }\r\n                else if (transform.TranslateX < -minTranslateX || hasVelocity && transform.TranslateX < 0.0)\r\n                {\r\n                    SlideLeft(Math.Abs(e.FinalVelocities.LinearVelocity.X));\r\n                }\r\n                else\r\n                {\r\n                    SlideBack();\r\n                    transform.TranslateX = 0.0;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void SlideLeft(double velocity, Action callback = null)\r\n        {\r\n            if (velocity == 0.0)\r\n            {\r\n                velocity = 480.0 + 12.0;\r\n            }\r\n\r\n            var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n            if (transform == null) return;\r\n\r\n            var translationX = 480.0 + 12.0;\r\n            var duration = PanAndZoomBehavior.Clamp((translationX + transform.TranslateX) / velocity, 0.15, 0.35);\r\n#if !NO_RIBBON\r\n            Ribbon.ScrollNext(duration);\r\n#endif\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimation = new DoubleAnimation();\r\n            translateAnimation.To = -translationX;\r\n            translateAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            Storyboard.SetTarget(translateAnimation, transform);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n            storyboard.Begin();\r\n\r\n            //MainGrid.IsHitTestVisible = false;\r\n            _slideAnimating = true;\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    //MainGrid.IsHitTestVisible = true;\r\n                    _slideAnimating = false;\r\n                });\r\n                transform.TranslateX = 0.0;\r\n                Grid.SetColumn(Item1, Grid.GetColumn(Item1) - 1 < 0 ? 2 : Grid.GetColumn(Item1) - 1);\r\n                Grid.SetColumn(Item2, Grid.GetColumn(Item2) - 1 < 0 ? 2 : Grid.GetColumn(Item2) - 1);\r\n                Grid.SetColumn(Item3, Grid.GetColumn(Item3) - 1 < 0 ? 2 : Grid.GetColumn(Item3) - 1);\r\n\r\n                SetPanAndZoom();\r\n\r\n                ViewModel.SlideLeft();\r\n\r\n                SetControlContent(2, ViewModel.NextItem);\r\n\r\n                callback.SafeInvoke();\r\n            };\r\n        }\r\n\r\n        public void SlideRight(double velocity, System.Action callback = null)\r\n        {\r\n            if (velocity == 0.0)\r\n            {\r\n                velocity = 480.0 + 12.0;\r\n            }\r\n\r\n            var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n            if (transform == null) return;\r\n\r\n            var translationX = 480.0 + 12.0;\r\n            var duration = PanAndZoomBehavior.Clamp((translationX - transform.TranslateX) / velocity, 0.15, 0.35);\r\n#if !NO_RIBBON\r\n            Ribbon.ScrollPrevious(duration);\r\n#endif\r\n            var storyboard = new Storyboard();\r\n            var translateAnimation = new DoubleAnimation();\r\n            translateAnimation.To = translationX;\r\n            translateAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            Storyboard.SetTarget(translateAnimation, transform);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n            storyboard.Begin();\r\n            //MainGrid.IsHitTestVisible = false;\r\n            _slideAnimating = true;\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                //Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                //{\r\n                    //MainGrid.IsHitTestVisible = true;\r\n                    _slideAnimating = false;\r\n                //});\r\n                transform.TranslateX = 0.0;\r\n\r\n                Grid.SetColumn(Item1, Grid.GetColumn(Item1) + 1 > 2 ? 0 : Grid.GetColumn(Item1) + 1);\r\n                Grid.SetColumn(Item2, Grid.GetColumn(Item2) + 1 > 2 ? 0 : Grid.GetColumn(Item2) + 1);\r\n                Grid.SetColumn(Item3, Grid.GetColumn(Item3) + 1 > 2 ? 0 : Grid.GetColumn(Item3) + 1);\r\n\r\n                SetPanAndZoom();\r\n\r\n                ViewModel.SlideRight();\r\n\r\n                SetControlContent(0, ViewModel.PreviousItem);\r\n\r\n                callback.SafeInvoke();\r\n            };\r\n        }\r\n\r\n        public void SetControlContent(int column, TLDecryptedMessageBase content)\r\n        {\r\n            var selector = (DecryptedImageViewerTemplateSelector)Resources[\"Selector\"];\r\n\r\n            if (Grid.GetColumn(Item1) == column)\r\n            {\r\n                Control1.Content = content;\r\n                Control1.ContentTemplate = (DataTemplate)selector.Convert(content, null, null, null);\r\n            }\r\n            else if (Grid.GetColumn(Item2) == column)\r\n            {\r\n                Control2.Content = content;\r\n                Control2.ContentTemplate = (DataTemplate)selector.Convert(content, null, null, null);\r\n            }\r\n            else if (Grid.GetColumn(Item3) == column)\r\n            {\r\n                Control3.Content = content;\r\n                Control3.ContentTemplate = (DataTemplate)selector.Convert(content, null, null, null);\r\n            }\r\n        }\r\n\r\n        private void SlideBack()\r\n        {\r\n            var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n            if (transform == null) return;\r\n\r\n            var duration = 0.1;\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimation = new DoubleAnimation();\r\n            translateAnimation.To = 0.0;\r\n            translateAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            Storyboard.SetTarget(translateAnimation, transform);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n            storyboard.Begin();\r\n#if !NO_RIBBON\r\n            Ribbon.ScrollBack(duration);\r\n#endif\r\n        }\r\n\r\n        private void SetPanAndZoom()\r\n        {\r\n            Interaction.GetBehaviors(Control1).Clear();\r\n            Interaction.GetBehaviors(Control2).Clear();\r\n            Interaction.GetBehaviors(Control3).Clear();\r\n\r\n            if (Grid.GetColumn(Item1) == 1)\r\n            {\r\n                var behaviors = Interaction.GetBehaviors(Control1);\r\n                behaviors.Add(_panAndZoomBehavior);\r\n                Control1.RenderTransform = new CompositeTransform();\r\n            }\r\n            else if (Grid.GetColumn(Item2) == 1)\r\n            {\r\n                var behaviors = Interaction.GetBehaviors(Control2);\r\n                behaviors.Add(_panAndZoomBehavior);\r\n                Control2.RenderTransform = new CompositeTransform();\r\n            }\r\n            else if (Grid.GetColumn(Item3) == 1)\r\n            {\r\n                var behaviors = Interaction.GetBehaviors(Control3);\r\n                behaviors.Add(_panAndZoomBehavior);\r\n                Control3.RenderTransform = new CompositeTransform();\r\n            }\r\n        }\r\n\r\n        private void PanAndZoom_OnDoubleTap(object sender, GestureEventArgs e)\r\n        {\r\n            _tapHandled = true;\r\n        }\r\n\r\n        private bool _tapHandled;\r\n\r\n        private void ImagesGrid_OnTap(object sender, System.Windows.Input.GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.15), () =>\r\n            {\r\n                if (_tapHandled)\r\n                {\r\n                    _tapHandled = false;\r\n                    return;\r\n                }\r\n\r\n                if (ApplicationBar != null)\r\n                {\r\n                    ApplicationBar.IsVisible = ApplicationPanel.Visibility != Visibility.Visible;\r\n                }\r\n\r\n                var animation = ApplicationPanel.Visibility == Visibility.Visible\r\n                    ? CloseApplicationPanelAnimation\r\n                    : OpenApplicationPanelAnimation;\r\n\r\n                animation.Begin();\r\n\r\n                var topAnimation = TopApplicationPanel.Visibility == Visibility.Visible\r\n                    ? CloseTopApplicationPanelAnimation\r\n                    : OpenTopApplicationPanelAnimation;\r\n\r\n                topAnimation.Begin();\r\n            });\r\n        }\r\n\r\n        private int _index;\r\n        private double _duration;\r\n\r\n        public void ScrollTo(TLDecryptedMessageBase currentItem, double duration)\r\n        {\r\n#if !NO_RIBBON\r\n            var index = ViewModel.GroupedItems.IndexOf(currentItem);\r\n            if (index != -1)\r\n            {\r\n                _index = index;\r\n                _duration = duration;\r\n                Ribbon.LayoutUpdated += Ribbon_LayoutUpdated;\r\n            }\r\n#endif\r\n        }\r\n\r\n        private void Ribbon_LayoutUpdated(object sender, System.EventArgs e)\r\n        {\r\n#if !NO_RIBBON\r\n            var result = Ribbon.ScrollTo(_index, _duration);\r\n            System.Diagnostics.Debug.WriteLine(\"Ribbon.ScrollTo result=\" + result);\r\n            if (result)\r\n            {\r\n                Ribbon.LayoutUpdated -= Ribbon_LayoutUpdated;\r\n            }\r\n#endif\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Media/FilesView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.FilesView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:triggers=\"clr-namespace:Telegram.Controls.Triggers;assembly=Telegram.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"-12,0\">\r\n        <controls:LazyListBox \r\n            x:Name=\"Items\"\r\n            CloseToEndPercent=\"0.1\"\r\n            CloseToEnd=\"Items_OnCloseToEnd\"\r\n            ItemTemplate=\"{StaticResource FileTemplate}\">\r\n            <i:Interaction.Triggers>\r\n                <triggers:CompressionTrigger CompressionType=\"Bottom\">\r\n                    <micro:ActionMessage MethodName=\"LoadNextSlice\"/>\r\n                </triggers:CompressionTrigger>\r\n            </i:Interaction.Triggers>\r\n            <ListBox.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel Margin=\"24,0,0,0\" />\r\n                </ItemsPanelTemplate>\r\n            </ListBox.ItemsPanel>\r\n        </controls:LazyListBox>\r\n\r\n        <Grid \r\n            VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\" \r\n            Visibility=\"{Binding IsEmptyList, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n            <StackPanel Margin=\"0,100,0,0\">\r\n                <Image Width=\"160\" Height=\"160\" Source=\"{Binding EmptyListImageSource}\" Stretch=\"UniformToFill\"/>\r\n                <TextBlock Text=\"{Binding Resources.ShareFiles, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Width=\"300\" Margin=\"12,40,12,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n        <TextBlock Margin=\"24,0\" Text=\"{Binding Status}\" TextWrapping=\"Wrap\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/FilesView.xaml.cs",
    "content": "﻿using System.Windows.Input;\r\nusing TelegramClient.ViewModels.Media;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class FilesView\r\n    {\r\n        public FilesView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        private void Files_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Media/FullMediaView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.FullMediaView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls1=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls\"\r\n    xmlns:controls2=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    BackKeyPress=\"FullMediaView_OnBackKeyPress\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding ActiveItem.IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"TelegramNavigationTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        \r\n        <Border x:Name=\"Caption\" Grid.RowSpan=\"2\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <TextBlock x:Name=\"TimerString\" Visibility=\"Collapsed\" Margin=\"24,24,0,0\"/>\r\n\r\n        <controls1:Pivot \r\n            x:Name=\"Items\"\r\n            IsHitTestVisible=\"{Binding IsViewerOpen, Converter={StaticResource InvertBooleanConverter}}\"\r\n            SelectedItem=\"{Binding ActiveItem, Mode=TwoWay}\"\r\n            Padding=\"-6,-7,0,0\"\r\n            Style=\"{StaticResource W10MPivotStyle}\">\r\n            <controls1:Pivot.HeaderTemplate>\r\n                <DataTemplate>\r\n                    <TextBlock Text=\"{Binding DisplayName}\" />\r\n                </DataTemplate>\r\n            </controls1:Pivot.HeaderTemplate>\r\n        </controls1:Pivot>\r\n\r\n        <TextBlock x:Name=\"SelectionCaption\" Margin=\"18,52,0,0\" Opacity=\"0\" Foreground=\"White\" Text=\"{Binding SelectedCountString}\" FontSize=\"23\" IsHitTestVisible=\"False\" FontWeight=\"Bold\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\"/>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"0\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n        \r\n        <controls2:TelegramApplicationBar Grid.Row=\"1\"\r\n            x:Name=\"AppBarPanel\" \r\n            VerticalAlignment=\"Bottom\"\r\n            MorePanel=\"{Binding ElementName=MorePanel}\">\r\n            <!--<controls2:TelegramApplicationBar.Buttons>\r\n                <controls2:TelegramAppBarButton\r\n                    x:Name=\"SearchButton\"\r\n                    Grid.Column=\"3\" \r\n                    Tap=\"Search_OnTap\"\r\n                    ImageSource=\"/Images/ApplicationBar/ic_search_2x.png\"\r\n                    Text=\"{Binding Resources.Search, Source={StaticResource Strings}}\"/>\r\n                <controls2:TelegramAppBarButton\r\n                    x:Name=\"SelectButton\"\r\n                    Grid.Column=\"2\" \r\n                    Tap=\"Select_OnTap\"\r\n                    ImageSource=\"/Images/W10M/ic_select_2x.png\"\r\n                    Text=\"{Binding Resources.Select, Source={StaticResource Strings}}\"/>\r\n            </controls2:TelegramApplicationBar.Buttons>-->\r\n        </controls2:TelegramApplicationBar>\r\n\r\n        <ContentControl Grid.Row=\"0\" Grid.RowSpan=\"2\" x:Name=\"ImageViewer\"\r\n            VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n            VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n        <ContentControl Grid.Row=\"0\" Grid.RowSpan=\"2\" x:Name=\"AnimatedImageViewer\"\r\n            VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n            VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"\r\n            Visibility=\"{Binding AnimatedImageViewer.IsOpen, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/FullMediaView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Specialized;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls.Primitives;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views.Controls;\r\nusing VisualTreeExtensions = Telegram.Controls.Extensions.VisualTreeExtensions;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class FullMediaView\r\n    {\r\n        private readonly TelegramAppBarButton _searchButton = new TelegramAppBarButton\r\n        {\r\n            Text = AppResources.Search,\r\n            IsEnabled = true,\r\n            ImageSource = new BitmapImage(new Uri(\"/Images/ApplicationBar/ic_search_2x.png\", UriKind.Relative))\r\n        };\r\n\r\n        private readonly TelegramAppBarButton _manageButton = new TelegramAppBarButton\r\n        {\r\n            Text = AppResources.Manage,\r\n            IsEnabled = true,\r\n            ImageSource = new BitmapImage(new Uri(\"/Images/W10M/ic_select_2x.png\", UriKind.Relative))\r\n        };\r\n\r\n        private readonly TelegramAppBarButton _forwardButton = new TelegramAppBarButton\r\n        {\r\n            Text = AppResources.Forward,\r\n            IsEnabled = true,\r\n            ImageSource = new BitmapImage(new Uri(\"/Images/W10M/ic_share_2x.png\", UriKind.Relative))\r\n        };\r\n\r\n        private readonly TelegramAppBarButton _deleteButton = new TelegramAppBarButton\r\n        {\r\n            Text = AppResources.Delete,\r\n            IsEnabled = true,\r\n            ImageSource = new BitmapImage(new Uri(\"/Images/W10M/ic_delete_2x.png\", UriKind.Relative))\r\n        };\r\n\r\n        private readonly TelegramAppBarButton _cancelButton = new TelegramAppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IsEnabled = true,\r\n            ImageSource = new BitmapImage(new Uri(\"/Images/W10M/ic_cancel_2x.png\", UriKind.Relative))\r\n        };\r\n\r\n        public FullMediaViewModel ViewModel \r\n        {\r\n            get { return DataContext as FullMediaViewModel; }\r\n        }\r\n\r\n        public FullMediaView()\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            OptimizeFullHD();\r\n\r\n            Grid.SetColumn(_searchButton, 3);\r\n            Grid.SetColumn(_manageButton, 2);\r\n\r\n            Grid.SetColumn(_deleteButton, 1);\r\n            Grid.SetColumn(_forwardButton, 2);\r\n            Grid.SetColumn(_cancelButton, 3);\r\n\r\n            _searchButton.Tap += (sender, args) => ViewModel.Search();\r\n            _manageButton.Tap += (sender, args) => ViewModel.Manage();\r\n            _forwardButton.Tap += (sender, args) => ViewModel.Forward();\r\n            _deleteButton.Tap += (sender, args) => ViewModel.Delete();\r\n            _cancelButton.Tap += (sender, args) => CancelSelection();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                TimerString.Text = timer.Elapsed.ToString();\r\n\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n                ViewModel.Files.PropertyChanged += OnFilesPropertyChanged;\r\n                ViewModel.Links.PropertyChanged += OnLinksPropertyChanged;\r\n                ViewModel.Music.PropertyChanged += OnMusicPropertyChanged;\r\n\r\n                if (ViewModel.ImageViewer != null)\r\n                    ViewModel.ImageViewer.PropertyChanged += OnImageViewerPropertyChanged;\r\n                if (ViewModel.AnimatedImageViewer != null)\r\n                    ViewModel.AnimatedImageViewer.PropertyChanged += OnAnimatedImageViewerPropertyChanged;\r\n\r\n                ViewModel.Files.Items.CollectionChanged += OnFilesCollectionChanged;\r\n                ViewModel.Links.Items.CollectionChanged += OnLinksCollectionChanged;\r\n                ViewModel.Music.Items.CollectionChanged += OnMusicCollectionChanged;\r\n\r\n                BuildLocalizedAppBar();\r\n                //ReturnItemsVisibility();\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n                ViewModel.Files.PropertyChanged -= OnFilesPropertyChanged;\r\n                ViewModel.Links.PropertyChanged -= OnLinksPropertyChanged;\r\n                ViewModel.Music.PropertyChanged -= OnMusicPropertyChanged;\r\n\r\n                if (ViewModel.ImageViewer != null)\r\n                    ViewModel.ImageViewer.PropertyChanged -= OnImageViewerPropertyChanged;\r\n                if (ViewModel.AnimatedImageViewer != null)\r\n                    ViewModel.AnimatedImageViewer.PropertyChanged -= OnAnimatedImageViewerPropertyChanged;\r\n\r\n                ViewModel.Files.Items.CollectionChanged -= OnFilesCollectionChanged;\r\n                ViewModel.Links.Items.CollectionChanged -= OnLinksCollectionChanged;\r\n                ViewModel.Music.Items.CollectionChanged -= OnMusicCollectionChanged;\r\n            };\r\n\r\n            Items.SelectionChanged += (sender, args) =>\r\n            {\r\n                if (_applicationBar == null) return;\r\n\r\n                _applicationBar.IsVisible = false;\r\n                AppBarPanel.Visibility = Visibility.Collapsed;\r\n\r\n                if (Items.SelectedItem is FilesViewModel<IInputPeer>\r\n                    || Items.SelectedItem is LinksViewModel<IInputPeer>\r\n                    || Items.SelectedItem is MusicViewModel<IInputPeer>)\r\n                {\r\n                    if (Items.SelectedItem is FilesViewModel<IInputPeer>)\r\n                    {\r\n                        OnFilesCollectionChanged(sender, null);\r\n                    }\r\n                    else if (Items.SelectedItem is LinksViewModel<IInputPeer>)\r\n                    {\r\n                        OnLinksCollectionChanged(sender, null);\r\n                    }\r\n                    else\r\n                    {\r\n                        OnMusicCollectionChanged(sender, null);\r\n                    }\r\n                    AppBarPanel.Visibility = Visibility.Visible;\r\n                    AppBarPanel.Buttons.Clear();\r\n                    AppBarPanel.Buttons.Add(_searchButton);\r\n                    AppBarPanel.Buttons.Add(_manageButton);\r\n\r\n                    _applicationBar.IsVisible = true;\r\n                    //_applicationBar.Buttons.Clear();\r\n                    //_applicationBar.Buttons.Add(_searchButton);\r\n                    //_applicationBar.Buttons.Add(_manageButton);\r\n                }\r\n            };\r\n        }\r\n\r\n        ~FullMediaView()\r\n        {\r\n            \r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n#if WP8\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n            //if (!isFullHD) return;\r\n#endif\r\n\r\n            Items.HeaderTemplate = (DataTemplate)Application.Current.Resources[\"FullHDPivotHeaderTemplate\"];\r\n        }\r\n\r\n        private void OnFilesPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.Files.IsSelectionEnabled))\r\n            {\r\n                if (ViewModel.Files.IsSelectionEnabled)\r\n                {\r\n                    SwitchToSelectionMode(ViewModel.Files.IsGroupActionEnabled);\r\n                }\r\n                else\r\n                {\r\n                    SwithToNormalMode();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.Files.IsGroupActionEnabled))\r\n            {\r\n                var isGroupActionEnabled = ViewModel.Files.IsGroupActionEnabled;\r\n\r\n                _forwardButton.IsEnabled = isGroupActionEnabled;\r\n                _deleteButton.IsEnabled = isGroupActionEnabled;\r\n            }\r\n        }\r\n\r\n        private void OnLinksPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.Links.IsSelectionEnabled))\r\n            {\r\n                if (ViewModel.Links.IsSelectionEnabled)\r\n                {\r\n                    SwitchToSelectionMode(ViewModel.Links.IsGroupActionEnabled);\r\n                }\r\n                else\r\n                {\r\n                    SwithToNormalMode();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.Links.IsGroupActionEnabled))\r\n            {\r\n                var isGroupActionEnabled = ViewModel.Links.IsGroupActionEnabled;\r\n\r\n                _forwardButton.IsEnabled = isGroupActionEnabled;\r\n                _deleteButton.IsEnabled = isGroupActionEnabled;\r\n            }\r\n        }\r\n\r\n\r\n\r\n        private void OnMusicPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.Music.IsSelectionEnabled))\r\n            {\r\n                if (ViewModel.Music.IsSelectionEnabled)\r\n                {\r\n                    SwitchToSelectionMode(ViewModel.Music.IsGroupActionEnabled);\r\n                }\r\n                else\r\n                {\r\n                    SwithToNormalMode();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.Music.IsGroupActionEnabled))\r\n            {\r\n                var isGroupActionEnabled = ViewModel.Music.IsGroupActionEnabled;\r\n\r\n                _forwardButton.IsEnabled = isGroupActionEnabled;\r\n                _deleteButton.IsEnabled = isGroupActionEnabled;\r\n            }\r\n        }\r\n\r\n        private PivotHeadersControl _pivotHeadersControl;\r\n\r\n        private void SwithToNormalMode()\r\n        {\r\n            if (AppBarPanel == null || AppBarPanel.Buttons == null) return;\r\n\r\n            AppBarPanel.Buttons.Clear();\r\n            AppBarPanel.Buttons.Add(_searchButton);\r\n            AppBarPanel.Buttons.Add(_manageButton);\r\n\r\n            //_applicationBar.Buttons.Clear();\r\n            //_applicationBar.Buttons.Add(_searchButton);\r\n            //_applicationBar.Buttons.Add(_manageButton);\r\n\r\n#if WP8\r\n            ShowPivotHeadersControl();\r\n#endif\r\n        }\r\n\r\n        private void SwitchToSelectionMode(bool isGroupActionEnabled)\r\n        {\r\n            if (AppBarPanel == null || AppBarPanel.Buttons == null) return;\r\n\r\n            var channel = ViewModel.CurrentItem as TLChannel;\r\n            //var isGroupActionEnabled = ViewModel.Files.IsGroupActionEnabled;\r\n\r\n            _forwardButton.IsEnabled = isGroupActionEnabled;\r\n            _deleteButton.IsEnabled = isGroupActionEnabled;\r\n\r\n\r\n            AppBarPanel.Buttons.Clear();\r\n            AppBarPanel.Buttons.Add(_forwardButton);\r\n            if (channel == null || channel.Creator)\r\n            {\r\n                AppBarPanel.Buttons.Add(_deleteButton);\r\n            }\r\n            AppBarPanel.Buttons.Add(_cancelButton);\r\n\r\n\r\n            //_applicationBar.Buttons.Clear();\r\n            //_applicationBar.Buttons.Add(_forwardButton);\r\n\r\n            //if (channel == null || channel.Creator)\r\n            //{\r\n            //    _applicationBar.Buttons.Add(_deleteButton);\r\n            //}\r\n#if WP8\r\n            ViewModel.SetSelectedCount(0);\r\n            HidePivotHeadersControl();\r\n#endif\r\n        }\r\n\r\n        private void HidePivotHeadersControl()\r\n        {\r\n            _pivotHeadersControl = _pivotHeadersControl ?? VisualTreeExtensions.FindChildOfType<PivotHeadersControl>(Items);\r\n            if (_pivotHeadersControl == null) return;\r\n\r\n            _pivotHeadersControl.RenderTransform = new TranslateTransform();\r\n            _pivotHeadersControl.CacheMode = new BitmapCache();\r\n\r\n            Items.IsLocked = true;\r\n\r\n            var storyboard = new Storyboard { BeginTime = TimeSpan.FromSeconds(0.2) };\r\n\r\n            var transformAnimaion2 = new DoubleAnimation { Duration = TimeSpan.FromSeconds(0.2), From = 0.0, To = -72.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } };\r\n            Storyboard.SetTarget(transformAnimaion2, _pivotHeadersControl);\r\n            Storyboard.SetTargetProperty(transformAnimaion2, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(transformAnimaion2);\r\n\r\n            var opacityAnimaion2 = new DoubleAnimation { Duration = TimeSpan.FromSeconds(0.2), From = 1.0, To = 0.0 };\r\n            Storyboard.SetTarget(opacityAnimaion2, _pivotHeadersControl);\r\n            Storyboard.SetTargetProperty(opacityAnimaion2, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion2);\r\n\r\n            var opacityAnimaion = new DoubleAnimation { Duration = TimeSpan.FromSeconds(0.2), From = 0.0, To = 1.0 };\r\n            Storyboard.SetTarget(opacityAnimaion, SelectionCaption);\r\n            Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion);\r\n\r\n            Execute.BeginOnUIThread(storyboard.Begin);\r\n        }\r\n\r\n        private void ShowPivotHeadersControl()\r\n        {\r\n            _pivotHeadersControl = _pivotHeadersControl ?? VisualTreeExtensions.FindChildOfType<PivotHeadersControl>(Items);\r\n            if (_pivotHeadersControl == null) return;\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var transformAnimaion2 = new DoubleAnimation { From = -72.0, To = 0.0, Duration = TimeSpan.FromSeconds(0.2), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } };\r\n            Storyboard.SetTarget(transformAnimaion2, _pivotHeadersControl);\r\n            Storyboard.SetTargetProperty(transformAnimaion2, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(transformAnimaion2);\r\n\r\n            var opacityAnimaion2 = new DoubleAnimation { From = 0.0, To = 1.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion2, _pivotHeadersControl);\r\n            Storyboard.SetTargetProperty(opacityAnimaion2, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion2);\r\n\r\n            var opacityAnimaion = new DoubleAnimation { From = 1.0, To = 0.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion, SelectionCaption);\r\n            Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion);\r\n\r\n            storyboard.Completed += (o, e) =>\r\n            {\r\n                Items.IsLocked = false;\r\n            };\r\n\r\n            Execute.BeginOnUIThread(storyboard.Begin);\r\n        }\r\n\r\n        private void ReturnItemsVisibility()\r\n        {\r\n            var selectedIndex = Items.SelectedIndex;\r\n            ((ViewModelBase)Items.Items[selectedIndex]).Visibility = Visibility.Visible;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                foreach (ViewModelBase item in Items.Items)\r\n                {\r\n                    item.Visibility = Visibility.Visible;\r\n                }\r\n            });\r\n        }\r\n\r\n        private ApplicationBar _applicationBar;\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (_applicationBar != null) return;\r\n\r\n            _applicationBar = new ApplicationBar();\r\n            _applicationBar.IsVisible = false;\r\n            AppBarPanel.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private IApplicationBar _prevApplicationBar;\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.AnimatedImageViewer)\r\n                && ViewModel.AnimatedImageViewer != null)\r\n            {\r\n                ViewModel.AnimatedImageViewer.PropertyChanged += OnAnimatedImageViewerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer)\r\n                && ViewModel.ImageViewer != null)\r\n            {\r\n                ViewModel.ImageViewer.PropertyChanged += OnImageViewerPropertyChanged;\r\n            }\r\n        }\r\n\r\n        private void OnImageViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer.IsOpen))\r\n            {\r\n                ViewModel.NotifyOfPropertyChange(() => ViewModel.IsViewerOpen);\r\n\r\n                if (ViewModel.ImageViewer.IsOpen)\r\n                {\r\n                    _prevApplicationBar = ApplicationBar;\r\n                    ApplicationBar = ((ImageViewerView)ImageViewer.Content).ApplicationBar;\r\n                }\r\n                else\r\n                {\r\n                    if (_prevApplicationBar != null)\r\n                    {\r\n                        ApplicationBar = _prevApplicationBar;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnAnimatedImageViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            AppBarPanel.Visibility = !ViewModel.AnimatedImageViewer.IsOpen ? Visibility.Visible : Visibility.Collapsed;\r\n            _applicationBar.IsVisible = !ViewModel.AnimatedImageViewer.IsOpen;\r\n        }\r\n\r\n        private void OnFilesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            _searchButton.IsEnabled = ViewModel.Files.Items.Count > 0;\r\n            _manageButton.IsEnabled = ViewModel.Files.Items.Count > 0;\r\n            ViewModel.Files.NotifyOfPropertyChange(() => ViewModel.Files.IsEmptyList);\r\n        }\r\n\r\n        private void OnLinksCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            _searchButton.IsEnabled = ViewModel.Links.Items.Count > 0;\r\n            _manageButton.IsEnabled = ViewModel.Links.Items.Count > 0;\r\n            ViewModel.Links.NotifyOfPropertyChange(() => ViewModel.Links.IsEmptyList);\r\n        }\r\n\r\n        private void OnMusicCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            _searchButton.IsEnabled = ViewModel.Music.Items.Count > 0;\r\n            _manageButton.IsEnabled = ViewModel.Music.Items.Count > 0;\r\n            ViewModel.Music.NotifyOfPropertyChange(() => ViewModel.Music.IsEmptyList);\r\n        }\r\n\r\n        private void FullMediaView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            if (ViewModel.ImageViewer != null\r\n                && ViewModel.ImageViewer.IsOpen)\r\n            {\r\n                ViewModel.ImageViewer.CloseViewer();\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.AnimatedImageViewer != null\r\n                && ViewModel.AnimatedImageViewer.IsOpen)\r\n            {\r\n                ViewModel.AnimatedImageViewer.CloseViewer();\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            if (CancelSelection())\r\n            {\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            ViewModel.CancelLoading();\r\n        }\r\n\r\n        private bool CancelSelection()\r\n        {\r\n            if (ViewModel.Files.IsSelectionEnabled)\r\n            {\r\n                ViewModel.Files.IsSelectionEnabled = false;\r\n                return true;\r\n            }\r\n\r\n            if (ViewModel.Links.IsSelectionEnabled)\r\n            {\r\n                ViewModel.Links.IsSelectionEnabled = false;\r\n                return true;\r\n            }\r\n\r\n            if (ViewModel.Music.IsSelectionEnabled)\r\n            {\r\n                ViewModel.Music.IsSelectionEnabled = false;\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static readonly Uri ExternalUri = new Uri(@\"app://external/\");\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n            base.OnNavigatedFrom(e);\r\n\r\n            if (e.Uri != ExternalUri)\r\n            {\r\n                var selectedIndex = Items.SelectedIndex;\r\n                for (var i = 0; i < Items.Items.Count; i++)\r\n                {\r\n                    //if (selectedIndex != i)\r\n                    {\r\n                        ((ViewModelBase)Items.Items[i]).Visibility = Visibility.Collapsed;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private void TelegramNavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_once)\r\n            {\r\n                ViewModel.ForwardInAnimationComplete();\r\n                _once = true;\r\n            }\r\n\r\n            //MessageBox.Show(\"EndTransition\");\r\n            ReturnItemsVisibility();\r\n        }\r\n\r\n        private void Select_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                ViewModel.Manage();\r\n            });\r\n        }\r\n\r\n        private void Search_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                ViewModel.Search();\r\n            });\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Media/ImageEditorView.xaml",
    "content": "﻿<phone:PhoneApplicationPage x:Class=\"TelegramClient.Views.Media.ImageEditorView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <phone:PhoneApplicationPage.Resources>\r\n        <Style x:Key=\"CaptionTextBox\" TargetType=\"TextBox\">\r\n            <Setter Property=\"CaretBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"SelectionBackground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n            <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n            <Setter Property=\"Padding\" Value=\"10,2\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"TextBox\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"ReadOnly\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledOrReadonlyContent\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\">\r\n                                        <Storyboard>\r\n                                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unfocused\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentElement\" Content=\"|Test\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledOrReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                                <TextBox x:Name=\"DisabledOrReadonlyContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\" FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" IsReadOnly=\"True\" SelectionForeground=\"{TemplateBinding SelectionForeground}\" SelectionBackground=\"{TemplateBinding SelectionBackground}\" TextAlignment=\"{TemplateBinding TextAlignment}\" TextWrapping=\"{TemplateBinding TextWrapping}\" Text=\"{TemplateBinding Text}\" Template=\"{StaticResource PhoneDisabledTextBoxTemplate}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </phone:PhoneApplicationPage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <Grid x:Name=\"BackgroundBorder\" Grid.RowSpan=\"2\" Background=\"Black\" Margin=\"0,0,0,-1\" CacheMode=\"BitmapCache\"/>\r\n        <Grid x:Name=\"ImagesGrid\" Background=\"Transparent\" CacheMode=\"BitmapCache\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Grid.RenderTransform>\r\n            <Image Stretch=\"Uniform\" Source=\"{Binding CurrentItem.Media.Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n        </Grid>\r\n        <Grid Grid.Row=\"1\" VerticalAlignment=\"Bottom\">\r\n            <Border x:Name=\"ApplicationBarBackground\" Background=\"{StaticResource PhoneChromeBrush}\"/>\r\n            <StackPanel>\r\n                <Grid>\r\n                    <TextBlock x:Name=\"CaptionWatermark\" Margin=\"26,0\" Text=\"{Binding Resources.AddCaption, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" FontSize=\"{StaticResource PhoneFontSizeMediumLarge}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" VerticalAlignment=\"Center\"/>\r\n                    <TextBox x:Name=\"Caption\" MaxLength=\"140\" Text=\"{Binding Caption, Mode=TwoWay}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" InputScope=\"Text\" KeyDown=\"Caption_OnKeyDown\" GotFocus=\"Caption_OnGotFocus\" LostFocus=\"Caption_OnLostFocus\" TextChanged=\"Caption_OnTextChanged\" Style=\"{StaticResource CaptionTextBox}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </TextBox>\r\n                </Grid>\r\n                <Border x:Name=\"KeyboardPlaceholder\"/>\r\n                <Border x:Name=\"ApplicationBarPlaceholder\" Height=\"72\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n    </Grid>\r\n</phone:PhoneApplicationPage>"
  },
  {
    "path": "TelegramClient/Views/Media/ImageEditorView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Media;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class ImageEditorView\r\n    {\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n      \r\n        public ImageEditorViewModel ViewModel\r\n        {\r\n            get { return DataContext as ImageEditorViewModel; }\r\n        }\r\n\r\n        public ImageEditorView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Visibility = Visibility.Collapsed;\r\n\r\n            BuildLocalizedAppBar();\r\n\r\n            OptimizeFullHD();\r\n\r\n            _runOnce = true;\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                if (_runOnce && ViewModel.CurrentItem != null)\r\n                {\r\n                    _runOnce = false;\r\n                    BeginOpenStoryboard();\r\n                }\r\n\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (o, e) => ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n        }\r\n\r\n        private bool _runOnce;\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (ViewModel.IsOpen)\r\n                {\r\n                    _runOnce = false;\r\n                    BeginOpenStoryboard();\r\n                }\r\n                else\r\n                {\r\n                    BeginCloseStoryboard();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n#if WP8\r\n            var appBar = ApplicationBar;\r\n            if (appBar == null)\r\n            {\r\n                appBar = new ApplicationBar();\r\n            }\r\n\r\n            var appBarDefaultSize = appBar.DefaultSize;\r\n            var appBarDifference = appBarDefaultSize - 72.0;\r\n\r\n            ApplicationBarPlaceholder.Height = appBarDefaultSize;\r\n#endif\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            ApplicationBar = new ApplicationBar { Opacity = 0.9999 };\r\n            //ApplicationBar.BackgroundColor = Colors.Black;\r\n            //ApplicationBar.ForegroundColor = Colors.White;\r\n            ApplicationBar.StateChanged += (o, e) =>\r\n            {\r\n                ApplicationBar.Opacity = e.IsMenuVisible ? 0.9999 : 0.0;\r\n            };\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            ApplicationBar.Buttons.Add(_doneButton);\r\n            ApplicationBar.Buttons.Add(_cancelButton);\r\n        }\r\n\r\n\r\n        private void BeginCloseStoryboard()\r\n        {\r\n            SystemTray.IsVisible = true;\r\n            ApplicationBar.IsVisible = false;\r\n\r\n            var direction = CloseDirection.Down;\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = ImagesGrid.ActualHeight / 2 + rootFrameHeight / 2;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = direction == CloseDirection.Down ? translateYTo : -translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            var opacityImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            opacityImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = 0 });\r\n            Storyboard.SetTarget(opacityImageAniamtion, BackgroundBorder);\r\n            Storyboard.SetTargetProperty(opacityImageAniamtion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityImageAniamtion);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (o, args) =>\r\n            {\r\n                Visibility = Visibility.Collapsed;\r\n            };\r\n        }\r\n\r\n        private void BeginOpenStoryboard()\r\n        {\r\n            SystemTray.IsVisible = false;\r\n            ApplicationBar.IsVisible = true;\r\n\r\n            var transparentBlack = Colors.Black;\r\n            transparentBlack.A = 0;\r\n\r\n            CaptionWatermark.Visibility = Visibility.Visible;\r\n            Visibility = Visibility.Visible;\r\n            ImagesGrid.Opacity = 1.0;\r\n            ImagesGrid.RenderTransform = new CompositeTransform();\r\n            BackgroundBorder.Opacity = 1.0;\r\n\r\n\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            ((CompositeTransform)ImagesGrid.RenderTransform).TranslateY = translateYTo;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = 0.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                //Deployment.Current.Dispatcher.BeginInvoke(() => OpenApplicationPanelAnimation.Begin());\r\n            };\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        private void Caption_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            var height = GetKeyboardHeightDifference();\r\n            CaptionWatermark.Visibility = Visibility.Collapsed;\r\n            KeyboardPlaceholder.Height = EmojiControl.PortraitOrientationHeight - ApplicationBarPlaceholder.ActualHeight;\r\n            ImagesGrid.Margin = new Thickness(0.0, 0.0, 0.0, -height);\r\n\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n            var storyboard = new Storyboard();\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = -height / 2.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        private double GetKeyboardHeightDifference()\r\n        {\r\n            var heightDifference = EmojiControl.PortraitOrientationHeight - ApplicationBarPlaceholder.ActualHeight;\r\n\r\n            return heightDifference;\r\n        }\r\n\r\n        private void Caption_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            var height = GetKeyboardHeightDifference();\r\n            CaptionWatermark.Visibility = string.IsNullOrEmpty(Caption.Text) ? Visibility.Visible : Visibility.Collapsed;\r\n            KeyboardPlaceholder.Height = 0.0;\r\n            ImagesGrid.Margin = new Thickness(0.0);\r\n\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n            var storyboard = new Storyboard();\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -height / 2.0 });\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.20), Value = 0.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        private void Caption_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            CaptionWatermark.Visibility = string.IsNullOrEmpty(Caption.Text) && FocusManager.GetFocusedElement() != Caption? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        private void Caption_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.Done();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Media/ImageViewerView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.ImageViewerView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"False\" \r\n    d:DesignHeight=\"800\" \r\n    d:DesignWidth=\"480\">\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <Storyboard x:Name=\"OpenApplicationPanelAnimation\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame x:Name=\"OpenApplicationPanelAnimationStartKeyFrame\" KeyTime=\"0\" Value=\"60\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\" Value=\"Visible\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"CloseApplicationPanelAnimation\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame x:Name=\"CloseApplicationPanelAnimationStopKeyFrame\" KeyTime=\"0:0:0.20\" Value=\"-60\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.20\" Value=\"Collapsed\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            \r\n            <Storyboard x:Name=\"OpenTopApplicationPanelAnimation\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <EasingDoubleKeyFrame x:Name=\"OpenTopApplicationPanelAnimationStartKeyFrame\" KeyTime=\"0\" Value=\"-60\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\" Value=\"Visible\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"CloseTopApplicationPanelAnimation\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame x:Name=\"CloseTopApplicationPanelAnimationStopKeyFrame\" KeyTime=\"0:0:0.20\" Value=\"60\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"TopApplicationPanel\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.20\" Value=\"Collapsed\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <converters:ImageViewerPhotoConverter x:Key=\"ImageViewerPhotoConverter\"/>\r\n\r\n            <DataTemplate x:Key=\"PhotoTemplate\">\r\n                <!--<controls:MediaPhotoControl\r\n                    Media=\"{Binding}\"\r\n                    Source=\"{Binding Media.Photo.Self, Converter={StaticResource ForcePhotoConverter}, ConverterParameter='800_Background'}\"\r\n                    PreviewSource=\"{Binding Media.ThumbSelf, Converter={StaticResource ImageViewerPhotoConverter}, ConverterParameter=Background}\">         \r\n                </controls:MediaPhotoControl>-->\r\n                <Grid>\r\n                    <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource ImageViewerPhotoConverter}, ConverterParameter=Background}\"/>\r\n                    <Image Source=\"{Binding Media.Photo.Self, Converter={StaticResource ForcePhotoConverter}, ConverterParameter='800_Background'}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"VideoTemplate\">\r\n                <Border MaxHeight=\"500\" Tap=\"VideoElement_OnTap\">\r\n                    <Grid VerticalAlignment=\"Center\" HorizontalAlignment=\"Stretch\" MinHeight=\"250\" Background=\"Black\">\r\n\r\n                        <controls:MediaVideoControl\r\n                            Width=\"480\"\r\n                            Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}}\"\r\n                            DownloadIconVisibility=\"{Binding Media.Self, Converter={StaticResource DownloadMediaToVisibilityConverter}}\"\r\n                            DownloadingProgress=\"{Binding Media.DownloadingProgress}\"\r\n                            UploadingProgress=\"{Binding Media.UploadingProgress}\"\r\n                            micro:Message.Attach=\"[Event CancelDownloading] = [Action CancelVideoDownloading]\"/>\r\n                        \r\n                        <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Image VerticalAlignment=\"Center\"\r\n\t\t\t\t\t                Width=\"48\" Height=\"48\" Margin=\"-4,3,-4,0\"\r\n\t\t\t\t\t                Source=\"/Images/Audio/appbar.transport.play.rest.png\"/>\r\n                            <TextBlock Grid.Column=\"1\"\r\n\t\t\t\t\t                VerticalAlignment=\"Center\" Margin=\"0\"\r\n\t\t\t\t\t                Text=\"{Binding Media.Video.DurationString}\"\r\n\t\t\t\t\t                Foreground=\"White\"\r\n\t\t\t\t\t                Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </Border>\r\n            </DataTemplate>\r\n\r\n            <templateSelectors:ImageViewerTemplateSelector\r\n                x:Key=\"Selector\"\r\n                PhotoTemplate=\"{StaticResource PhotoTemplate}\"\r\n                VideoTemplate=\"{StaticResource VideoTemplate}\"/>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid \r\n        x:Name=\"MainGrid\"\r\n        Background=\"Transparent\"\r\n        ManipulationStarted=\"ImagesGrid_OnManipulationStarted\"\r\n        ManipulationDelta=\"ImagesGrid_OnManipulationDelta\"\r\n        ManipulationCompleted=\"ImagesGrid_OnManipulationCompleted\"\r\n        Tap=\"ImagesGrid_OnTap\">\r\n        <Grid x:Name=\"BackgroundBorder\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Center\" Background=\"Black\" Margin=\"0,0,0,-1\" CacheMode=\"BitmapCache\" Width=\"480\"/>\r\n        <Grid x:Name=\"ImagesGrid\" IsHitTestVisible=\"True\" Background=\"Transparent\" Margin=\"-498,0\" Width=\"1476\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Grid.RenderTransform>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition/>\r\n            </Grid.ColumnDefinitions>\r\n\r\n            <Grid x:Name=\"Item3\" Grid.Column=\"1\" VerticalAlignment=\"Center\" Width=\"480\" Margin=\"6,0\">\r\n                <ContentControl \r\n                    x:Name=\"Control3\"\r\n                    CacheMode=\"BitmapCache\"\r\n                    Content=\"{Binding NextItem}\" \r\n                    ContentTemplate=\"{Binding NextItem, Converter={StaticResource Selector}}\"\r\n                    VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                    VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n            </Grid>\r\n\r\n            <Grid x:Name=\"Item2\" Grid.Column=\"1\" VerticalAlignment=\"Center\" Width=\"480\" Margin=\"6,0\">\r\n                <ContentControl \r\n                    x:Name=\"Control2\" \r\n                    CacheMode=\"BitmapCache\"\r\n                    Content=\"{Binding CurrentItem}\" \r\n                    ContentTemplate=\"{Binding CurrentItem, Converter={StaticResource Selector}}\"\r\n                    VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                    VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\">\r\n                    <ContentControl.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </ContentControl.RenderTransform>\r\n                </ContentControl>\r\n            </Grid>\r\n            \r\n            <Grid x:Name=\"Item1\" Grid.Column=\"2\" VerticalAlignment=\"Center\" Width=\"480\" Margin=\"6,0\">\r\n                <ContentControl \r\n                    x:Name=\"Control1\"\r\n                    CacheMode=\"BitmapCache\"\r\n                    Content=\"{Binding PreviousItem}\" \r\n                    ContentTemplate=\"{Binding PreviousItem, Converter={StaticResource Selector}}\"\r\n                    VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                    VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n            </Grid>\r\n        </Grid>\r\n        \r\n        <Grid VerticalAlignment=\"Top\" x:Name=\"TopApplicationPanel\" CacheMode=\"BitmapCache\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform x:Name=\"TopApplicationPanelTransform\" TranslateY=\"-72\"/>\r\n            </Grid.RenderTransform>\r\n            <Border Background=\"Black\" Opacity=\"0.3\"/>\r\n\r\n            <Grid x:Name=\"TopAppBarPlaceholder\" Height=\"72\">\r\n                <Image Visibility=\"{Binding CurrentItem.HasStickers, FallbackValue=Collapsed}\" Source=\"/Images/Dialogs/chat.masks.png\" \r\n                    VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\" \r\n                    Tap=\"AttachedStickers_OnTap\"\r\n                    Margin=\"6\"/>\r\n                \r\n                <TextBlock Text=\"{Binding Title}\" Margin=\"18,0\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n\r\n                <controls:SecretPhotoPlaceholder \r\n                    HorizontalAlignment=\"Right\"\r\n                    VerticalAlignment=\"Center\"\r\n                    Margin=\"0,-18\"\r\n                    Width=\"72\" Height=\"72\" \r\n                    ShowHint=\"False\"\r\n                    RenderTransformOrigin=\"0.5, 0.5\"\r\n                    Visibility=\"{Binding IsInputTTL, Converter={StaticResource BooleanToVisibilityConverter}}\"\r\n                    TTLParams=\"{Binding CurrentItem.Media.TTLParams}\">\r\n                    <controls:SecretPhotoPlaceholder.RenderTransform>\r\n                        <ScaleTransform ScaleX=\"0.5\" ScaleY=\"0.5\"/>\r\n                    </controls:SecretPhotoPlaceholder.RenderTransform>\r\n                </controls:SecretPhotoPlaceholder>\r\n            </Grid>\r\n        </Grid>\r\n\r\n        <Grid VerticalAlignment=\"Bottom\" x:Name=\"ApplicationPanel\" CacheMode=\"BitmapCache\" Margin=\"0,0,0,-72\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform x:Name=\"ApplicationPanelTransform\" TranslateY=\"72\"/>\r\n            </Grid.RenderTransform>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Border Grid.RowSpan=\"4\" Background=\"Black\" Opacity=\"0.3\"/>\r\n            \r\n            <Grid Visibility=\"{Binding CurrentItem.Message, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\">\r\n                <emojiPanel:TelegramRichTextBox\r\n                    Width=\"462\"\r\n                    Margin=\"9,12,9,0\"\r\n                    MaxHeight=\"328\"\r\n                    Text=\"{Binding CurrentItem.Message}\"\r\n                    HorizontalAlignment=\"Stretch\"\r\n                    Foreground=\"White\"\r\n                    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                    Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n            </Grid>\r\n\r\n            <!--<Canvas x:Name=\"Canvas\" Grid.Row=\"1\" Height=\"68\" IsHitTestVisible=\"False\" Visibility=\"{Binding GroupedItems.Count, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\">\r\n                <controls:RibbonControl x:Name=\"Ribbon\" Visibility=\"Visible\" ItemsSource=\"{Binding GroupedItems}\" Margin=\"240,6,0,6\"/>\r\n            </Canvas>-->\r\n            \r\n            <Grid Grid.Row=\"2\" x:Name=\"AppBarPlaceholder\" Height=\"72\">\r\n                <StackPanel Margin=\"10,0,0,0\" VerticalAlignment=\"Center\">\r\n                    <TextBlock x:Name=\"FullName\" Text=\"{Binding CurrentItem.From.FullName2}\" Foreground=\"White\" Height=\"26.6\" Style=\"{StaticResource PhoneTextNormalStyle}\">\r\n                        <TextBlock.RenderTransform>\r\n                            <CompositeTransform/>\r\n                        </TextBlock.RenderTransform>\r\n                    </TextBlock>\r\n                    <TextBlock x:Name=\"Date\" Margin=\"12,-5,12,0\" Text=\"{Binding CurrentItem.Date, Converter={StaticResource MessageDateTimeConverter}}\" Foreground=\"#99FFFFFF\" Style=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                        <TextBlock.RenderTransform>\r\n                            <CompositeTransform/>\r\n                        </TextBlock.RenderTransform>\r\n                    </TextBlock>\r\n                </StackPanel>\r\n            </Grid>\r\n            <Grid Grid.Row=\"3\" x:Name=\"AppBarPlaceholder2\" Height=\"72\"/>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/ImageViewerView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define NO_RIBBON\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Interactivity;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Caliburn.Micro;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Behaviors;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Helpers.TemplateSelectors;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Binding = System.Windows.Data.Binding;\r\nusing GestureEventArgs = TelegramClient.Controls.GestureListener.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class ImageViewerView\r\n    {\r\n        public static readonly DependencyProperty TTLMediaExpiredProperty = DependencyProperty.Register(\r\n            \"TTLMediaExpired\", typeof(bool), typeof(ImageViewerView), new PropertyMetadata(default(bool), OnTTLMediaExpiredChanged));\r\n\r\n        private static void OnTTLMediaExpiredChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var imageViewerView = d as ImageViewerView;\r\n            if (imageViewerView != null)\r\n            {\r\n                if ((bool) e.NewValue)\r\n                {\r\n                    var viewModel = imageViewerView.DataContext as ImageViewerViewModel;\r\n                    if (viewModel != null)\r\n                    {\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            imageViewerView._direction = CloseDirection.Down;\r\n                            viewModel.CloseViewer();\r\n                        });\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool TTLMediaExpired\r\n        {\r\n            get { return (bool) GetValue(TTLMediaExpiredProperty); }\r\n            set { SetValue(TTLMediaExpiredProperty, value); }\r\n        }\r\n\r\n        private readonly ApplicationBarMenuItem _savePhotoMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Save\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _forwardMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Forward\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _deleteMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Delete,\r\n            IsEnabled = true\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _sharePhotoMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = string.Format(\"{0}...\", AppResources.Share)\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _openMediaMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Media\r\n        };\r\n\r\n        public ImageViewerViewModel ViewModel\r\n        {\r\n            get { return DataContext as ImageViewerViewModel; }\r\n        }\r\n\r\n        private bool _runOnce;\r\n\r\n        private PanAndZoomBehavior _panAndZoomBehavior;\r\n\r\n        public ImageViewerView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            OptimizeFullHD();\r\n\r\n            BuildLocalizedAppBar();\r\n\r\n            var binding = new Binding(\"CurrentItem.TTLMediaExpired\");\r\n            SetBinding(TTLMediaExpiredProperty, binding);\r\n\r\n            Visibility = Visibility.Collapsed;\r\n\r\n            _runOnce = true;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                UpdateApplicationBar(ViewModel.CurrentItem as TLMessage);\r\n\r\n                var behaviorCollection = Interaction.GetBehaviors(Control2);\r\n                if (behaviorCollection.FirstOrDefault(x => x is PanAndZoomBehavior) == null)\r\n                {\r\n                    var panAndZoomBehavior = new PanAndZoomBehavior();\r\n                    panAndZoomBehavior.SuppressDrag = true;\r\n                    panAndZoomBehavior.MaxZoom = 5.0;\r\n                    panAndZoomBehavior.CanZoom = true;\r\n                    panAndZoomBehavior.DoubleTap += PanAndZoom_OnDoubleTap;\r\n\r\n                    var canZoomBinding = new Binding(\"CanZoom\");\r\n                    canZoomBinding.Source = ViewModel;\r\n                    BindingOperations.SetBinding(panAndZoomBehavior, PanAndZoomBehavior.CanZoomProperty, canZoomBinding);\r\n\r\n                    behaviorCollection.Add(panAndZoomBehavior);\r\n\r\n                    _panAndZoomBehavior = panAndZoomBehavior;\r\n                }\r\n\r\n\r\n                if (_runOnce && ViewModel.CurrentItem != null)\r\n                {\r\n                    _runOnce = false;\r\n                    BeginOpenStoryboard();\r\n                }\r\n\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n                //if (!ViewModel.ShowOpenMediaListButton)\r\n                //{\r\n                //    ApplicationBar.MenuItems.Remove(_openMediaMenuItem);\r\n                //}\r\n\r\n                if (ViewModel.DialogDetails == null)\r\n                {\r\n                    ApplicationBar.MenuItems.Remove(_deleteMenuItem);\r\n                }\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n#if WP8\r\n            var appBar = ApplicationBar;\r\n            if (appBar == null)\r\n            {\r\n                appBar = new ApplicationBar();\r\n            }\r\n\r\n            var appBarDefaultSize = appBar.DefaultSize;\r\n            var appBarDifference = appBarDefaultSize - 72.0;\r\n\r\n            AppBarPlaceholder.Height = appBarDefaultSize;\r\n            AppBarPlaceholder2.Height = appBarDefaultSize;\r\n            ApplicationPanel.Margin = new Thickness(0.0, 0.0, 0.0, -appBarDefaultSize);\r\n            OpenApplicationPanelAnimationStartKeyFrame.Value = appBarDefaultSize;\r\n            CloseApplicationPanelAnimationStopKeyFrame.Value = appBarDefaultSize;\r\n            ApplicationPanelTransform.TranslateY = appBarDefaultSize;\r\n\r\n            TopAppBarPlaceholder.Height = appBarDefaultSize;\r\n            OpenTopApplicationPanelAnimationStartKeyFrame.Value = -appBarDefaultSize;\r\n            CloseTopApplicationPanelAnimationStopKeyFrame.Value = -appBarDefaultSize;\r\n            TopApplicationPanelTransform.TranslateY = -appBarDefaultSize;\r\n#endif\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.CurrentItem))\r\n            {\r\n                UpdateApplicationBar(ViewModel.CurrentItem as TLMessage);\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (ViewModel.IsOpen)\r\n                {\r\n                    _runOnce = false;\r\n                    BeginOpenStoryboard();\r\n                }\r\n                else\r\n                {\r\n                    BeginCloseStoryboard();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UpdateApplicationBar(TLMessage message)\r\n        {\r\n            var isTTLMessage = message != null && message.HasTTL();\r\n\r\n            _savePhotoMenuItem.IsEnabled =\r\n#if WP8\r\n                !isTTLMessage;\r\n#else     \r\n                !isTTLMessage && message != null && message.Media is TLMessageMediaPhoto;\r\n#endif\r\n            _sharePhotoMenuItem.IsEnabled = !isTTLMessage && message != null && message.Media is TLMessageMediaPhoto;\r\n            _forwardMenuItem.IsEnabled = !isTTLMessage;\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            ApplicationBar = new ApplicationBar { Opacity = 0.0 };\r\n            ApplicationBar.BackgroundColor = Colors.Black;\r\n            ApplicationBar.ForegroundColor = Colors.White;\r\n            ApplicationBar.StateChanged += (o, e) =>\r\n            {\r\n                ApplicationBar.Opacity = e.IsMenuVisible ? 0.9999 : 0.0;\r\n            };\r\n\r\n            _savePhotoMenuItem.Click += (o, e) => ViewModel.Save();\r\n            _sharePhotoMenuItem.Click += (o, e) => ViewModel.Share();\r\n            _openMediaMenuItem.Click += (o, e) => ViewModel.OpenMediaDetails();\r\n            _forwardMenuItem.Click += (o, e) => ViewModel.Forward();\r\n            _deleteMenuItem.Click += (o, e) => ViewModel.Delete();\r\n\r\n            ApplicationBar.MenuItems.Add(_savePhotoMenuItem);\r\n#if WP8\r\n            ApplicationBar.MenuItems.Add(_sharePhotoMenuItem);\r\n#endif\r\n            ApplicationBar.MenuItems.Add(_forwardMenuItem);\r\n            ApplicationBar.MenuItems.Add(_deleteMenuItem);\r\n            //ApplicationBar.MenuItems.Add(_openMediaMenuItem);\r\n        }\r\n\r\n        internal CloseDirection? _direction;\r\n\r\n        private void BeginCloseStoryboard()\r\n        {\r\n            SystemTray.IsVisible = true;\r\n            ApplicationBar.IsVisible = false;\r\n\r\n            _direction = _direction ?? CloseDirection.Down;\r\n            var duration = _direction != null ? TimeSpan.FromSeconds(0.15) : TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = _direction != null ? null : new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = ImagesGrid.ActualHeight / 2 + rootFrameHeight / 2;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = _direction == CloseDirection.Down ? translateYTo : -translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            var opacityImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            opacityImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = 0 });\r\n            Storyboard.SetTarget(opacityImageAniamtion, BackgroundBorder);\r\n            Storyboard.SetTargetProperty(opacityImageAniamtion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityImageAniamtion);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (o, args) =>\r\n            {\r\n                Visibility = Visibility.Collapsed;\r\n                _direction = null;\r\n            };\r\n\r\n            CloseApplicationPanelAnimation.Begin();\r\n            CloseTopApplicationPanelAnimation.Begin();\r\n        }\r\n\r\n        private void BeginOpenStoryboard()\r\n        {\r\n            var selector = (ImageViewerTemplateSelector) Resources[\"Selector\"];\r\n\r\n            Control1.Visibility = Visibility.Collapsed;\r\n            Control1.Content = ViewModel.PreviousItem;\r\n            Control1.ContentTemplate = (DataTemplate)selector.Convert(ViewModel.PreviousItem, null, null, null);\r\n            Grid.SetColumn(Item1, 0);\r\n            Control2.Visibility = Visibility.Visible;\r\n            Control2.Content = ViewModel.CurrentItem;\r\n            Control2.ContentTemplate = (DataTemplate)selector.Convert(ViewModel.CurrentItem, null, null, null);\r\n            Grid.SetColumn(Item2, 1);\r\n            Control3.Visibility = Visibility.Collapsed;\r\n            Control3.Content = ViewModel.NextItem;\r\n            Control3.ContentTemplate = (DataTemplate)selector.Convert(ViewModel.NextItem, null, null, null);\r\n            Grid.SetColumn(Item3, 2);\r\n\r\n            SetPanAndZoom();\r\n\r\n            SystemTray.IsVisible = false;\r\n            ApplicationBar.IsVisible = true;\r\n\r\n            if (_panAndZoomBehavior != null)\r\n            {\r\n                _panAndZoomBehavior.CurrentScaleX = 1.0;\r\n                _panAndZoomBehavior.CurrentScaleY = 1.0;\r\n            }\r\n\r\n            var transparentBlack = Colors.Black;\r\n            transparentBlack.A = 0;\r\n\r\n            Visibility = Visibility.Visible;\r\n            ImagesGrid.Opacity = 1.0;\r\n            ImagesGrid.RenderTransform = new CompositeTransform();\r\n            BackgroundBorder.Opacity = 1.0;\r\n\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            ((CompositeTransform) ImagesGrid.RenderTransform).TranslateY = translateYTo;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = 0.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                Control1.Visibility = Visibility.Visible;\r\n                Control2.Visibility = Visibility.Visible;\r\n                Control3.Visibility = Visibility.Visible;\r\n\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    OpenApplicationPanelAnimation.Begin();\r\n                    OpenTopApplicationPanelAnimation.Begin();\r\n                });\r\n            };\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        private void PanAndZoom_OnDoubleTap(object sender, GestureEventArgs e)\r\n        {\r\n            _tapHandled = true;\r\n        }\r\n\r\n        private bool _tapHandled;\r\n\r\n        private void ImagesGrid_OnTap(object sender, System.Windows.Input.GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.15), () =>\r\n            {\r\n                if (_tapHandled)\r\n                {\r\n                    _tapHandled = false;\r\n                    return;\r\n                }\r\n\r\n                if (ApplicationBar != null)\r\n                {\r\n                    ApplicationBar.IsVisible = ApplicationPanel.Visibility != Visibility.Visible;\r\n                }\r\n\r\n                var animation = ApplicationPanel.Visibility == Visibility.Visible\r\n                    ? CloseApplicationPanelAnimation\r\n                    : OpenApplicationPanelAnimation;\r\n\r\n                animation.Begin();\r\n\r\n                var topAnimation = TopApplicationPanel.Visibility == Visibility.Visible\r\n                    ? CloseTopApplicationPanelAnimation\r\n                    : OpenTopApplicationPanelAnimation;\r\n\r\n                topAnimation.Begin();\r\n            });\r\n        }\r\n\r\n        private void PanAndZoom_OnClose(object sender, PanAndZoomCloseEventArgs e)\r\n        {\r\n            _direction = e.VerticalChange > 0 ? CloseDirection.Down : CloseDirection.Up;\r\n\r\n            ViewModel.CloseViewer();\r\n        }\r\n\r\n        private void VideoElement_OnTap(object sender, System.Windows.Input.GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n            _tapHandled = true;\r\n            ViewModel.OpenMedia();\r\n        }\r\n\r\n        private void AttachedStickers_OnTap(object sender, System.Windows.Input.GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n            _tapHandled = true;\r\n\r\n            var message = ViewModel.CurrentItem as TLMessage;\r\n            if (message == null) return;\r\n\r\n            TLInputStickeredMediaBase media = null;\r\n            var mediaPhoto = message.Media as TLMessageMediaPhoto28;\r\n            if (mediaPhoto != null)\r\n            {\r\n                var photo = mediaPhoto.Photo as TLPhoto56;\r\n                if (photo != null)\r\n                {\r\n                    media = new TLInputStickeredMediaPhoto\r\n                    {\r\n                        Id = new TLInputPhoto { Id = photo.Id, AccessHash = photo.AccessHash }\r\n                    };\r\n                }\r\n            }\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument45;\r\n            if (mediaDocument != null)\r\n            {\r\n                var document = mediaDocument.Document as TLDocument54;\r\n                if (document != null)\r\n                {\r\n                    media = new TLInputStickeredMediaDocument\r\n                    {\r\n                        Id = new TLInputDocument { Id = document.Id, AccessHash = document.AccessHash }\r\n                    };\r\n                }\r\n            }\r\n\r\n            if (media == null) return;\r\n            ViewModel.IsWorking = true;\r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n            mtProtoService.GetAttachedStickersAsync(true, media,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    ViewModel.AttachedStickers = result;\r\n                    ViewModel.IsWorking = false;\r\n                    var r = result;\r\n                    if (r != null)\r\n                    {\r\n                        UpdateSets(r);\r\n\r\n                        ShowAttachedStickersMessageBox(r, stickerSetBase =>\r\n                        {\r\n                            var stickerSet = stickerSetBase as TLStickerSet32;\r\n                            if (stickerSet != null)\r\n                            {\r\n                                _panAndZoomBehavior.IsEnabled = false;\r\n                                ShowStickerSetMessageBox(false, stickerSet.Installed && !stickerSet.Archived, stickerSet, prompt =>\r\n                                {\r\n                                    Execute.BeginOnUIThread(() =>\r\n                                    {\r\n                                        _panAndZoomBehavior.IsEnabled = true;\r\n                                        if (prompt == PopUpResult.Ok)\r\n                                        {\r\n                                            ViewModel.AddRemoveStickerSet(stickerSet);\r\n                                        }\r\n                                    });\r\n                                });\r\n                            }\r\n                        });\r\n                        \r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    ViewModel.IsWorking = false;\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.getAttachedStickers error \" + error);\r\n                }));\r\n        }\r\n\r\n\r\n        private readonly Dictionary<string, TLVector<TLStickerItem>> _stickerSets = new Dictionary<string, TLVector<TLStickerItem>>();\r\n\r\n        private readonly Dictionary<long, string> _emoticons = new Dictionary<long, string>();\r\n\r\n        private IStickers _stickers;\r\n\r\n        private TLVector<TLMessagesStickerSet> _messagesStickerSets;\r\n\r\n        private void UpdateSets(IStickers iStickers)\r\n        {\r\n            _stickers = iStickers;\r\n\r\n            _emoticons.Clear();\r\n            _stickerSets.Clear();\r\n\r\n            for (var i = 0; i < iStickers.Documents.Count; i++)\r\n            {\r\n                var document22 = iStickers.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        TLVector<TLStickerItem> stickers;\r\n                        if (_stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(new TLStickerItem { Document = document22 });\r\n                        }\r\n                        else\r\n                        {\r\n                            _stickerSets[setId] = new TLVector<TLStickerItem> { new TLStickerItem { Document = document22 } };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var firstChunkSize = 10;\r\n            var count = 0;\r\n            var delayedItems = new List<TLStickerSetBase>();\r\n            for (var i = 0; i < iStickers.Sets.Count; i++)\r\n            {\r\n                var set = iStickers.Sets[i];\r\n\r\n                var setName = set.Id.ToString();\r\n                TLVector<TLStickerItem> stickers;\r\n                if (_stickerSets.TryGetValue(setName, out stickers))\r\n                {\r\n\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        objects.Add(sticker);\r\n                    }\r\n\r\n                    set.Stickers = objects;\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool? _verticalDrag;\r\n        private TLMessageBase _currentItem;\r\n\r\n        private void ImagesGrid_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            if (_panAndZoomBehavior.CurrentScaleX > 1.0) return;\r\n            if (_slideAnimating) return;\r\n\r\n            _verticalDrag = null;\r\n        }\r\n\r\n        private void ImagesGrid_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            if (_panAndZoomBehavior.CurrentScaleX > 1.0) return;\r\n            if (_slideAnimating) return;\r\n\r\n            if (_verticalDrag == null)\r\n            {\r\n                _verticalDrag = Math.Abs(e.DeltaManipulation.Translation.Y) >\r\n                                  Math.Abs(e.DeltaManipulation.Translation.X);\r\n            }\r\n            if (_verticalDrag == false)\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                if (e.CumulativeManipulation.Translation.X < 0.0\r\n                    && ViewModel.CanSlideLeft)\r\n                {\r\n                    transform.TranslateX += e.DeltaManipulation.Translation.X;\r\n                }\r\n                else if (e.CumulativeManipulation.Translation.X > 0.0\r\n                    && ViewModel.CanSlideRight)\r\n                {\r\n                    transform.TranslateX  += e.DeltaManipulation.Translation.X;\r\n                }\r\n\r\n                var percent = transform.TranslateX / 480.0;\r\n#if !NO_RIBBON\r\n                Ribbon.Move(percent);\r\n#endif\r\n\r\n                transform.TranslateX = PanAndZoomBehavior.Clamp(transform.TranslateX, -480.0 - 12.0, 480.0 + 12.0);\r\n                _panAndZoomBehavior.IsEnabled = transform.TranslateX == 0.0;\r\n            }\r\n            else\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                var translate = new CompositeTransform\r\n                {\r\n                    TranslateX = 0,\r\n                    TranslateY = e.CumulativeManipulation.Translation.Y\r\n                };\r\n\r\n                var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n                var deltaY = Math.Abs(translate.TranslateY + translate.ScaleY * transform.TranslateY + (translate.ScaleY - 1) * (transform.CenterY - translate.CenterY));\r\n                var opacity = (rootFrameHeight - deltaY) / rootFrameHeight;\r\n                var backgroundBrush = (SolidColorBrush)BackgroundBorder.Background;\r\n                var backgroundColor = backgroundBrush.Color;\r\n                backgroundColor.A = (byte)(opacity * byte.MaxValue);\r\n\r\n                BackgroundBorder.Opacity = opacity;\r\n\r\n                ImagesGrid.RenderTransform = translate;\r\n                _panAndZoomBehavior.IsEnabled = translate.TranslateY == 0.0;\r\n            }\r\n        }\r\n\r\n        private void ImagesGrid_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            if (_panAndZoomBehavior.CurrentScaleX > 1.0) return;\r\n            if (_slideAnimating) return;\r\n\r\n            _panAndZoomBehavior.IsEnabled = true;\r\n            if (_verticalDrag == true)\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                var hasVelocity = e.FinalVelocities.LinearVelocity.X > 1000.0;\r\n                var minTranslateY = 100.0;\r\n\r\n                if (Math.Abs(transform.TranslateY) > minTranslateY || hasVelocity && Math.Abs(transform.TranslateY) > 0.0)\r\n                {\r\n                    PanAndZoom_OnClose(this, new PanAndZoomCloseEventArgs { VerticalChange = e.TotalManipulation.Translation.Y });\r\n                    return;\r\n                }\r\n\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, ImagesGrid);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                storyboard.Begin();\r\n\r\n                BackgroundBorder.Opacity = 1.0;\r\n            }\r\n            else if (_verticalDrag == false)\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                var hasVelocity = Math.Abs(e.FinalVelocities.LinearVelocity.X) > 1000.0;\r\n                var minTranslateX = 160.0;\r\n\r\n                if (transform.TranslateX > minTranslateX || hasVelocity && transform.TranslateX > 0.0)\r\n                {\r\n                    SlideRight(Math.Abs(e.FinalVelocities.LinearVelocity.X));\r\n                }\r\n                else if (transform.TranslateX < -minTranslateX || hasVelocity && transform.TranslateX < 0.0)\r\n                {\r\n                    SlideLeft(Math.Abs(e.FinalVelocities.LinearVelocity.X));\r\n                }\r\n                else\r\n                {\r\n                    SlideBack();\r\n                    transform.TranslateX = 0.0;\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _slideAnimating;\r\n\r\n        public void SlideLeft(double velocity, System.Action callback = null)\r\n        {\r\n            if (velocity == 0.0)\r\n            {\r\n                velocity = 480.0 + 12.0;\r\n            }\r\n\r\n            var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n            if (transform == null) return;\r\n\r\n            var translationX = 480.0 + 12.0;\r\n            var duration = PanAndZoomBehavior.Clamp((translationX + transform.TranslateX) / velocity, .15, .35);\r\n#if !NO_RIBBON\r\n            Ribbon.ScrollNext(duration);\r\n#endif\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimation = new DoubleAnimation();\r\n            translateAnimation.To = -translationX;\r\n            translateAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            Storyboard.SetTarget(translateAnimation, transform);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n            storyboard.Begin();\r\n\r\n            //MainGrid.IsHitTestVisible = false;\r\n            _slideAnimating = true;\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                //Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                //{\r\n                    //MainGrid.IsHitTestVisible = true;\r\n                    _slideAnimating = false;\r\n                //});\r\n                transform.TranslateX = 0.0;\r\n                Grid.SetColumn(Item1, Grid.GetColumn(Item1) - 1 < 0 ? 2 : Grid.GetColumn(Item1) - 1);\r\n                Grid.SetColumn(Item2, Grid.GetColumn(Item2) - 1 < 0 ? 2 : Grid.GetColumn(Item2) - 1);\r\n                Grid.SetColumn(Item3, Grid.GetColumn(Item3) - 1 < 0 ? 2 : Grid.GetColumn(Item3) - 1);\r\n\r\n                SetPanAndZoom();\r\n                //return;\r\n                ViewModel.SlideLeft();\r\n                //return;\r\n                SetControlContent(2, ViewModel.NextItem);\r\n\r\n                callback.SafeInvoke();\r\n            };\r\n        }\r\n\r\n        public void SlideRight(double velocity, System.Action callback = null)\r\n        {\r\n            if (velocity == 0.0)\r\n            {\r\n                velocity = 480.0 + 12.0;\r\n            }\r\n\r\n            var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n            if (transform == null) return;\r\n\r\n            var translationX = 480.0 + 12.0;\r\n            var duration = PanAndZoomBehavior.Clamp((translationX - transform.TranslateX) / velocity, .15, .35);\r\n\r\n#if !NO_RIBBON\r\n            Ribbon.ScrollPrevious(duration);\r\n#endif\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimation = new DoubleAnimation();\r\n            translateAnimation.To = translationX;\r\n            translateAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            Storyboard.SetTarget(translateAnimation, transform);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n            storyboard.Begin();\r\n            //MainGrid.IsHitTestVisible = false;\r\n            _slideAnimating = true;\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                //Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n               // {\r\n                    //MainGrid.IsHitTestVisible = true;\r\n                    _slideAnimating = false;\r\n                //});\r\n                //MainGrid.IsHitTestVisible = true;\r\n                transform.TranslateX = 0.0;\r\n\r\n                Grid.SetColumn(Item1, Grid.GetColumn(Item1) + 1 > 2 ? 0 : Grid.GetColumn(Item1) + 1);\r\n                Grid.SetColumn(Item2, Grid.GetColumn(Item2) + 1 > 2 ? 0 : Grid.GetColumn(Item2) + 1);\r\n                Grid.SetColumn(Item3, Grid.GetColumn(Item3) + 1 > 2 ? 0 : Grid.GetColumn(Item3) + 1);\r\n\r\n                SetPanAndZoom();\r\n                //return;\r\n                ViewModel.SlideRight();\r\n                //return;\r\n                SetControlContent(0, ViewModel.PreviousItem);\r\n\r\n                callback.SafeInvoke();\r\n            };\r\n        }\r\n\r\n        public void SetControlContent(int column, TLMessageBase content)\r\n        {\r\n            var selector = (ImageViewerTemplateSelector) Resources[\"Selector\"];\r\n\r\n            if (Grid.GetColumn(Item1) == column)\r\n            {\r\n                Control1.Content = content;\r\n                Control1.ContentTemplate = (DataTemplate) selector.Convert(content, null, null, null);\r\n            }\r\n            else if (Grid.GetColumn(Item2) == column)\r\n            {\r\n                Control2.Content = content;\r\n                Control2.ContentTemplate = (DataTemplate) selector.Convert(content, null, null, null);\r\n            }\r\n            else if (Grid.GetColumn(Item3) == column)\r\n            {\r\n                Control3.Content = content;\r\n                Control3.ContentTemplate = (DataTemplate) selector.Convert(content, null, null, null);\r\n            }\r\n        }\r\n\r\n        private void SlideBack()\r\n        {\r\n            var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n            if (transform == null) return;\r\n\r\n            var duration = 0.1;\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimation = new DoubleAnimation();\r\n            translateAnimation.To = 0.0;\r\n            translateAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));            \r\n            Storyboard.SetTarget(translateAnimation, transform);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n            storyboard.Begin();\r\n\r\n#if !NO_RIBBON\r\n            Ribbon.ScrollBack(duration);\r\n#endif\r\n        }\r\n\r\n        private void SetPanAndZoom()\r\n        {\r\n            Interaction.GetBehaviors(Control1).Clear();\r\n            Interaction.GetBehaviors(Control2).Clear();\r\n            Interaction.GetBehaviors(Control3).Clear();\r\n            //Control1.CacheMode = null;\r\n            //Control2.CacheMode = null;\r\n            //Control3.CacheMode = null;\r\n\r\n            if (Grid.GetColumn(Item1) == 1)\r\n            {\r\n                var behaviors = Interaction.GetBehaviors(Control1);\r\n                behaviors.Add(_panAndZoomBehavior);\r\n                Control1.RenderTransform = new CompositeTransform();\r\n                //Control1.CacheMode = new BitmapCache();\r\n            }\r\n            else if (Grid.GetColumn(Item2) == 1)\r\n            {\r\n                var behaviors = Interaction.GetBehaviors(Control2);\r\n                behaviors.Add(_panAndZoomBehavior);\r\n                Control2.RenderTransform = new CompositeTransform();\r\n                //Control2.CacheMode = new BitmapCache();\r\n            }\r\n            else if (Grid.GetColumn(Item3) == 1)\r\n            {\r\n                var behaviors = Interaction.GetBehaviors(Control3);\r\n                behaviors.Add(_panAndZoomBehavior);\r\n                Control3.RenderTransform = new CompositeTransform();\r\n                //Control3.CacheMode = new BitmapCache();\r\n            }\r\n        }\r\n\r\n        private int _index;\r\n        private double _duration;\r\n\r\n        public void ScrollTo(TLMessageBase currentItem, double duration)\r\n        {\r\n#if !NO_RIBBON\r\n            var index = ViewModel.GroupedItems.IndexOf(currentItem);\r\n            if (index != -1)\r\n            {\r\n                _index = index;\r\n                _duration = duration;\r\n\r\n                Ribbon.LayoutUpdated += Ribbon_LayoutUpdated;\r\n            }\r\n#endif\r\n        }\r\n\r\n        private void Ribbon_LayoutUpdated(object sender, System.EventArgs e)\r\n        {\r\n#if !NO_RIBBON\r\n            var result = Ribbon.ScrollTo(_index, _duration);\r\n            System.Diagnostics.Debug.WriteLine(\"Ribbon.ScrollTo result=\" + result);\r\n            if (result)\r\n            {\r\n                Ribbon.LayoutUpdated -= Ribbon_LayoutUpdated;\r\n            }\r\n#endif\r\n        }\r\n    }\r\n\r\n    public enum CloseDirection\r\n    {\r\n        Down,\r\n        Up\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Media/LinksView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.LinksView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:triggers=\"clr-namespace:Telegram.Controls.Triggers;assembly=Telegram.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"-12,0\">\r\n        <controls:LazyListBox \r\n            x:Name=\"Items\"\r\n            CloseToEndPercent=\"0.1\"\r\n            CloseToEnd=\"Items_OnCloseToEnd\"\r\n            ItemTemplate=\"{StaticResource FileTemplate}\">\r\n            <i:Interaction.Triggers>\r\n                <triggers:CompressionTrigger CompressionType=\"Bottom\">\r\n                    <micro:ActionMessage MethodName=\"LoadNextSlice\"/>\r\n                </triggers:CompressionTrigger>\r\n            </i:Interaction.Triggers>\r\n            <ListBox.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel Margin=\"24,0,0,0\" />\r\n                </ItemsPanelTemplate>\r\n            </ListBox.ItemsPanel>\r\n        </controls:LazyListBox>\r\n\r\n        <Grid \r\n            VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\" \r\n            Visibility=\"{Binding IsEmptyList, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n            <StackPanel Margin=\"0,100,0,0\">\r\n                <Image Width=\"160\" Height=\"160\" Source=\"{Binding EmptyListImageSource}\" Stretch=\"UniformToFill\"/>\r\n                <TextBlock Text=\"{Binding Resources.ShareFiles, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Width=\"300\" Margin=\"12,40,12,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n        <TextBlock Margin=\"24,0\" Text=\"{Binding Status}\" TextWrapping=\"Wrap\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/LinksView.xaml.cs",
    "content": "﻿using System.Windows.Input;\r\nusing TelegramClient.ViewModels.Media;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class LinksView\r\n    {\r\n        public LinksView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        private void Files_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Media/MapTileSources/GoogleMapsTileSource.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Microsoft.Phone.Controls.Maps;\r\n\r\nnamespace TelegramClient.Views.Media.MapTileSources\r\n{\r\n    public enum GoogleMapsTileSourceType\r\n    {\r\n        Street,\r\n        Hybrid,\r\n        Satellite,\r\n        Physical,\r\n        PhysicalHybrid,\r\n        StreetOverlay,\r\n        WaterOverlay\r\n    }\r\n\r\n    public class GoogleMapsTileSource : TileSource\r\n    {\r\n        public GoogleMapsTileSource()\r\n        {\r\n            UriFormat = @\"https://mt{0}.google.com/vt/lyrs={1}&z={2}&x={3}&y={4}\";\r\n            MapsTileSourceType = GoogleMapsTileSourceType.Street;\r\n        }\r\n        private int _servernr;\r\n        private char _mapMode;\r\n\r\n        private int Server\r\n        {\r\n            get\r\n            {\r\n                return _servernr = (_servernr + 1) % 4;\r\n            }\r\n        }\r\n\r\n        private GoogleMapsTileSourceType _mapsTileSourceType;\r\n        public GoogleMapsTileSourceType MapsTileSourceType\r\n        {\r\n            get { return _mapsTileSourceType; }\r\n            set\r\n            {\r\n                _mapsTileSourceType = value;\r\n                _mapMode = TypeToMapMode(value);\r\n            }\r\n        }\r\n\r\n        public override Uri GetUri(int x, int y, int zoomLevel)\r\n        {\r\n            {\r\n                if (zoomLevel > 0)\r\n                {\r\n                    var url = string.Format(UriFormat, Server, _mapMode, zoomLevel, x, y);\r\n                    return new Uri(url);\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n\r\n        private static char TypeToMapMode(GoogleMapsTileSourceType mapsTileSourceType)\r\n        {\r\n            switch (mapsTileSourceType)\r\n            {\r\n                case GoogleMapsTileSourceType.Hybrid:\r\n                    return 'y';\r\n                case GoogleMapsTileSourceType.Satellite:\r\n                    return 's';\r\n                case GoogleMapsTileSourceType.Street:\r\n                    return 'm';\r\n                case GoogleMapsTileSourceType.Physical:\r\n                    return 't';\r\n                case GoogleMapsTileSourceType.PhysicalHybrid:\r\n                    return 'p';\r\n                case GoogleMapsTileSourceType.StreetOverlay:\r\n                    return 'h';\r\n                case GoogleMapsTileSourceType.WaterOverlay:\r\n                    return 'r';\r\n            } return ' ';\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Media/MapTileSources/OpenAeralMapTileSource.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Microsoft.Phone.Controls.Maps;\r\n\r\nnamespace TelegramClient.Views.Media.MapTileSources\r\n{\r\n    public class OpenAeralMapTileSource : TileSource\r\n    {\r\n        public OpenAeralMapTileSource()\r\n\t    {\r\n\t        //Uri base of an OpenSTreetMap server\r\n            UriFormat = \"http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/{2}/{0}/{1}.jpg\";\r\n\t    }\r\n \r\n\t    public override Uri GetUri(int x, int y, int zoomLevel)\r\n        { \r\n            if (zoomLevel > 0 && zoomLevel <= 18)\r\n            {\r\n                var url = string.Format(UriFormat,\r\n                    zoomLevel,\r\n                    x,\r\n                    y);\r\n \r\n                return new Uri(url);\r\n            }\r\n\t\t\t//if zoom level is not supported, return null\r\n            return null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Media/MapTileSources/OpenStreetMapTileSource.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Microsoft.Phone.Controls.Maps;\r\n\r\nnamespace TelegramClient.Views.Media.MapTileSources\r\n{\r\n    public class OpenStreetMapTileSource : TileSource\r\n    {\r\n        public OpenStreetMapTileSource()\r\n\t    {\r\n\t        //Uri base of an OpenSTreetMap server\r\n            UriFormat = \"https://a.tile.openstreetmap.org/{0}/{1}/{2}.png\";\r\n\t    }\r\n \r\n\t    public override Uri GetUri(int x, int y, int zoomLevel)\r\n        { \r\n            if (zoomLevel > 0 && zoomLevel <= 18)\r\n            {\r\n                var url = string.Format(UriFormat,\r\n                    zoomLevel,\r\n                    x,\r\n                    y);\r\n \r\n                return new Uri(url);\r\n            }\r\n\t\t\t//if zoom level is not supported, return null\r\n            return null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/Views/Media/MapView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.MapView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:maps=\"clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:core=\"clr-namespace:Microsoft.Phone.Controls.Maps.Core;assembly=Microsoft.Phone.Controls.Maps\"\r\n    xmlns:mapTileSources=\"clr-namespace:TelegramClient.Views.Media.MapTileSources\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:media=\"clr-namespace:TelegramClient.Views.Media\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n\r\n        <Style x:Key=\"ScrollButtonStyle\" TargetType=\"Button\">\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"#FFDEE3EA\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"PressedBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderThickness\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" \r\n                                Width=\"64\" Height=\"64\" CornerRadius=\"32\" \r\n                                BorderBrush=\"{TemplateBinding BorderBrush}\" \r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\" \r\n                                Background=\"{TemplateBinding Background}\" \r\n                                Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <Grid>\r\n                                    <Border x:Name=\"PressedBorder\" Width=\"64\" Height=\"64\" CornerRadius=\"32\" Background=\"Black\" Opacity=\"0.15\" Margin=\"-2\" Visibility=\"Collapsed\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n                                    <ContentControl \r\n                                    x:Name=\"ContentContainer\" \r\n                                    FontWeight=\"{TemplateBinding FontWeight}\" \r\n                                    ContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n                                    Content=\"{TemplateBinding Content}\" \r\n                                    Foreground=\"{TemplateBinding Foreground}\" \r\n                                    HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                    Padding=\"{TemplateBinding Padding}\" \r\n                                    VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                                </Grid>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <ControlTemplate x:Key=\"PushpinTemplate\" TargetType=\"maps:Pushpin\">\r\n            <Border Background=\"#293F87F5\" Width=\"66\" Height=\"66\" CornerRadius=\"33\" RenderTransformOrigin=\"0.5,0.5\">\r\n                <Border.RenderTransform>\r\n                    <CompositeTransform TranslateY=\"33\" TranslateX=\"-33\" />\r\n                </Border.RenderTransform>\r\n                <Border BorderThickness=\"2\" BorderBrush=\"White\" Background=\"#FF4486EF\" Width=\"15\" Height=\"15\" CornerRadius=\"7.5\" />\r\n            </Border>\r\n        </ControlTemplate>\r\n\r\n        <ControlTemplate x:Key=\"ContactPushpinTemplate\" TargetType=\"maps:Pushpin\">\r\n            <Grid>\r\n                <Grid.RenderTransform>\r\n                    <TranslateTransform X=\"-14\" Y=\"0\"/>\r\n                </Grid.RenderTransform>\r\n                <Path Fill=\"#FFFF6464\" Data=\"M14,0 C6.26,0 0,6.26 0,14 C0,24.5 14,40 14,40 C14,40 28,24.5 28,14 C28,6.26 21.74,0 14,0 L14,0 Z M14,19 C11.24,19 9,16.76 9,14 C9,11.24 11.24,9 14,9 C16.76,9 19,11.24 19,14 C19,16.76 16.76,19 14,19 L14,19 Z\"/>\r\n            </Grid>\r\n        </ControlTemplate>\r\n\r\n        <ControlTemplate x:Key=\"LiveContactPushpinTemplate\" TargetType=\"maps:Pushpin\">\r\n            <Grid>\r\n                <Grid.RenderTransform>\r\n                    <TranslateTransform X=\"-37\" Y=\"26\"/>\r\n                </Grid.RenderTransform>\r\n                <Grid VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                    <Grid.RenderTransform>\r\n                        <TranslateTransform Y=\"-40\"/>\r\n                    </Grid.RenderTransform>\r\n                    <Border Width=\"76\" Height=\"76\" CornerRadius=\"38\" Background=\"#33000000\">\r\n                        <Border.RenderTransform>\r\n                            <CompositeTransform TranslateY=\"1\" TranslateX=\"1\"/>\r\n                        </Border.RenderTransform>\r\n                    </Border>\r\n                    <Border Width=\"36\" Height=\"36\" Background=\"#33000000\" RenderTransformOrigin=\"0.5,0.5\">\r\n                        <Border.RenderTransform>\r\n                            <CompositeTransform TranslateY=\"21\" TranslateX=\"0.5\" Rotation=\"45\"/>\r\n                        </Border.RenderTransform>\r\n                    </Border>\r\n\r\n                    <Border Background=\"#33000000\" Width=\"12\" Height=\"12\" CornerRadius=\"6\">\r\n                        <Border.RenderTransform>\r\n                            <CompositeTransform TranslateY=\"53\" TranslateX=\"1\" />\r\n                        </Border.RenderTransform>\r\n                    </Border>\r\n\r\n                    <Border Background=\"White\" Width=\"76\" Height=\"76\" CornerRadius=\"38\"/>\r\n                    <Border Width=\"36\" Height=\"36\" Background=\"White\" RenderTransformOrigin=\"0.5,0.5\">\r\n                        <Border.RenderTransform>\r\n                            <CompositeTransform TranslateY=\"20\" Rotation=\"45\"/>\r\n                        </Border.RenderTransform>\r\n                    </Border>\r\n                    <views:ConversationTileControl Size=\"70\" \r\n                        Margin=\"3\" Grid.RowSpan=\"2\"\r\n                        Source=\"{Binding From.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding From, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                    <Border BorderThickness=\"2\" BorderBrush=\"White\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" Width=\"12\" Height=\"12\" CornerRadius=\"6\">\r\n                        <Border.RenderTransform>\r\n                            <CompositeTransform TranslateY=\"52\" />\r\n                        </Border.RenderTransform>\r\n                    </Border>\r\n                </Grid>\r\n            </Grid>\r\n        </ControlTemplate>\r\n\r\n        <DataTemplate x:Key=\"StartSharingLiveGeoTemplate\">\r\n            <Grid Background=\"#D9000000\">\r\n                <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"MediaGeo_OnTap\">\r\n                    <Grid Height=\"104\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Border Grid.Column=\"0\" Margin=\"18,0,0,0\" Background=\"#FFFF6464\" CornerRadius=\"36\" Width=\"72\" Height=\"72\" VerticalAlignment=\"Center\">\r\n                            <Image Height=\"29\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Source=\"/Images/W10M/ic_livelocation_2x.png\"/>\r\n                        </Border>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding Resources.SendLiveLocation, Source={StaticResource Strings}}\" MaxHeight=\"36\" FontSize=\"27\" Foreground=\"#FFFFFFFF\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                    Text=\"{Binding Resources.SendLiveLocationSubtitle, Source={StaticResource Strings}}\"\r\n                                    Foreground=\"#99FFFFFF\"\r\n                                    Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"StopSharingLiveGeoTemplate\">\r\n            <Grid Background=\"#D9000000\">\r\n                <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"MediaGeo_OnTap\">\r\n                    <Grid Height=\"104\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Border Grid.Column=\"0\" Margin=\"18,0,0,0\" Background=\"#FFFF6464\" CornerRadius=\"36\" Width=\"72\" Height=\"72\" VerticalAlignment=\"Center\">\r\n                            <Image Height=\"29\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Source=\"/Images/W10M/ic_livelocation_2x.png\"/>\r\n                        </Border>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding Resources.StopSharingLocation, Source={StaticResource Strings}}\" MaxHeight=\"36\" FontSize=\"27\" Foreground=\"#FFFFFFFF\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                    Text=\"{Binding Media.EditDate, Converter={StaticResource EditDateToStringConverter}}\"\r\n                                    Foreground=\"#99FFFFFF\"\r\n                                    Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n\r\n                        <controls1:LiveLocationProgress \r\n                            Grid.Column=\"2\" \r\n                            Margin=\"12,0,18,0\" \r\n                            Media=\"{Binding Media}\"\r\n                            micro:Message.Attach=\"[Event Completed] = [Action LocationSharingCompleted]\"/>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"GeoTemplate\">\r\n            <Grid Height=\"104\" Background=\"#D9000000\" Margin=\"0,32,0,0\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <ListBoxItem Background=\"Transparent\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"MediaGeo_OnTap\" VerticalAlignment=\"Center\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <views:ConversationTileControl Size=\"72\"\r\n                            Margin=\"18,0,0,0\" Grid.Row=\"0\" Grid.Column=\"0\" VerticalAlignment=\"Center\"\r\n                            Source=\"{Binding From.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            Fill=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding From, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding From.FullName2}\" TextTrimming=\"WordEllipsis\" MaxHeight=\"36\" FontSize=\"27\" Foreground=\"#FFFFFFFF\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                Text=\"{Binding Distance, ElementName=Self, Converter={StaticResource DistanceAwayConverter}}\"\r\n                                Foreground=\"#99FFFFFF\" TextTrimming=\"WordEllipsis\"\r\n                                Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n\r\n                <Button x:Name=\"NavigateButton\" Grid.Column=\"1\" Margin=\"6\" Style=\"{StaticResource ScrollButtonStyle}\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"NavigateButton_OnTap\">\r\n                    <Button.RenderTransform>\r\n                        <TranslateTransform Y=\"-52\"/>\r\n                    </Button.RenderTransform>\r\n                    <Image Height=\"50\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Source=\"/Images/ApplicationBar/appbar.map.direction.png\"/>\r\n                </Button>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n\r\n        <DataTemplate x:Key=\"ForwardedGeoTemplate\">\r\n            <Grid Height=\"104\" Background=\"#D9000000\" Margin=\"0,32,0,0\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <ListBoxItem Background=\"Transparent\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"MediaGeo_OnTap\" VerticalAlignment=\"Center\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <views:ConversationTileControl Size=\"72\"\r\n                            Margin=\"18,0,0,0\" Grid.Row=\"0\" Grid.Column=\"0\" VerticalAlignment=\"Center\"\r\n                            Source=\"{Binding FwdFrom.From.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            Fill=\"{Binding FwdFrom.From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding FwdFrom.From, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding FwdFrom.From.FullName2}\" TextTrimming=\"WordEllipsis\" MaxHeight=\"36\" FontSize=\"27\" Foreground=\"#FFFFFFFF\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                Text=\"{Binding Distance, ElementName=Self, Converter={StaticResource DistanceAwayConverter}}\"\r\n                                Foreground=\"#99FFFFFF\" TextTrimming=\"WordEllipsis\"\r\n                                Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n\r\n                <Button x:Name=\"NavigateButton\" Grid.Column=\"1\" Margin=\"6\" Style=\"{StaticResource ScrollButtonStyle}\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"NavigateButton_OnTap\">\r\n                    <Button.RenderTransform>\r\n                        <TranslateTransform Y=\"-52\"/>\r\n                    </Button.RenderTransform>\r\n                    <Image Height=\"50\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Source=\"/Images/ApplicationBar/appbar.map.direction.png\"/>\r\n                </Button>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"VenueTemplate\">\r\n            <Grid Height=\"104\" Background=\"#D9000000\" Margin=\"0,32,0,0\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <ListBoxItem Background=\"Transparent\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"MediaGeo_OnTap\" VerticalAlignment=\"Center\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Border Grid.Column=\"0\" Margin=\"18,0,0,0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" CornerRadius=\"36\" Width=\"72\" Height=\"72\" VerticalAlignment=\"Center\">\r\n                            <Image Width=\"36\" Height=\"36\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Source=\"/Images/W10M/ic_location_2x.png\"/>\r\n                        </Border>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding Media.Title}\" TextTrimming=\"WordEllipsis\" MaxHeight=\"36\" FontSize=\"27\" Foreground=\"#FFFFFFFF\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                    Text=\"{Binding Media.Address}\"\r\n                                    Foreground=\"#99FFFFFF\" TextTrimming=\"WordEllipsis\"\r\n                                    Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n\r\n                <Button x:Name=\"NavigateButton\" Grid.Column=\"1\" Margin=\"6\" Style=\"{StaticResource ScrollButtonStyle}\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"NavigateButton_OnTap\">\r\n                    <Button.RenderTransform>\r\n                        <TranslateTransform Y=\"-52\"/>\r\n                    </Button.RenderTransform>\r\n                    <Image Height=\"50\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Source=\"/Images/ApplicationBar/appbar.map.direction.png\"/>\r\n                </Button>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"EmptyTemplate\">\r\n            <Grid Margin=\"0,0,0,0\"/>\r\n        </DataTemplate>\r\n\r\n        <templateSelectors:LocationTemplateSelector x:Key=\"LocationTemplateSelector\"\r\n            StartSharingLiveGeoTemplate=\"{StaticResource StartSharingLiveGeoTemplate}\"\r\n            StopSharingLiveGeoTemplate=\"{StaticResource StopSharingLiveGeoTemplate}\"\r\n            GeoTemplate=\"{StaticResource GeoTemplate}\"\r\n            ForwardedGeoTemplate=\"{StaticResource ForwardedGeoTemplate}\"\r\n            VenueTemplate=\"{StaticResource VenueTemplate}\"\r\n            EmptyTemplate=\"{StaticResource EmptyTemplate}\"/>\r\n\r\n        <templateSelectors:LiveLocationTemplateSelector x:Key=\"LiveLocationTemplateSelector\"\r\n            StartSharingLiveGeoTemplate=\"{StaticResource StartSharingLiveGeoTemplate}\"\r\n            StopSharingLiveGeoTemplate=\"{StaticResource StopSharingLiveGeoTemplate}\"\r\n            EmptyTemplate=\"{StaticResource EmptyTemplate}\"/>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Black\" CacheMode=\"BitmapCache\">\r\n        <Grid.RenderTransform>\r\n            <TranslateTransform/>\r\n        </Grid.RenderTransform>\r\n        \r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <maps:Map x:Name=\"Map\" Visibility=\"Collapsed\" Cursor=\"Arrow\" LogoVisibility=\"Collapsed\" ZoomBarVisibility=\"Collapsed\" ScaleVisibility=\"Collapsed\"  Hold=\"GestureListener_Hold\">          \r\n            <maps:Map.Mode>\r\n                <core:MercatorMode />\r\n            </maps:Map.Mode>\r\n            <maps:Map.Children>\r\n                <maps:MapTileLayer x:Name=\"MapLayer\" CacheMode=\"BitmapCache\">\r\n                    <maps:MapTileLayer.TileSources>\r\n                        <mapTileSources:GoogleMapsTileSource MapsTileSourceType=\"Street\"/>\r\n                    </maps:MapTileLayer.TileSources>\r\n                </maps:MapTileLayer>\r\n                <maps:Pushpin CacheMode=\"BitmapCache\" x:Name=\"CurrentLocation\" Template=\"{StaticResource PushpinTemplate}\"/>\r\n                <maps:Pushpin CacheMode=\"BitmapCache\" x:Name=\"ContactLocation\" Template=\"{StaticResource ContactPushpinTemplate}\" micro:Message.Attach=\"[Event Tap] = [Action OpenContactDetails]\"/>\r\n                <!--<maps:MapLayer x:Name=\"LiveLocations\"/>-->\r\n            </maps:Map.Children>\r\n            <maps:Map.CredentialsProvider>\r\n                <maps:ApplicationIdCredentialsProvider ApplicationId=\"Ao4i1Sn-qDnMYCOp8fb7KdRMS_DRyGMp6O_H1zruSspF-fmXYQ2_hIw0LczKoEHH\"/>\r\n            </maps:Map.CredentialsProvider>\r\n        </maps:Map>\r\n\r\n        <Grid Grid.Row=\"1\" Height=\"352\" VerticalAlignment=\"Bottom\" Background=\"Black\"\r\n              Visibility=\"{Binding MessageGeo, Converter={StaticResource ExistsToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\">\r\n            <longListSelector:LongListSelector \r\n                x:Name=\"Venues\"\r\n                Margin=\"0\"\r\n                ItemsSource=\"{Binding Venues}\" \r\n                Background=\"Transparent\"\r\n                IsFlatList=\"True\">\r\n                <longListSelector:LongListSelector.ListHeader>\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition/>\r\n                            <RowDefinition/>\r\n                            <RowDefinition/>\r\n                            <RowDefinition/>\r\n                        </Grid.RowDefinitions>\r\n                        <ListBoxItem Background=\"Transparent\" x:Name=\"LocationButton\" Margin=\"24,24,0,0\" Tap=\"AttachLocation_OnTap\" Visibility=\"Collapsed\" toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <Border Grid.Column=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" CornerRadius=\"36\" Width=\"72\" Height=\"72\">\r\n                                    <Image Width=\"32\" Height=\"32\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Source=\"/Images/W10M/ic_location_2x.png\"/>\r\n                                </Border>\r\n\r\n                                <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"Auto\"/>\r\n                                        <RowDefinition Height=\"Auto\"/>\r\n                                    </Grid.RowDefinitions>\r\n                                    <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding Resources.SendThisLocation, Source={StaticResource Strings}}\" MaxHeight=\"36\" FontSize=\"27\" Foreground=\"#FFFFFFFF\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                                    <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                    Text=\"{Binding ContactLocationString, ElementName=Self}\"\r\n                                    Foreground=\"#99FFFFFF\"\r\n                                    Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </ListBoxItem>\r\n                        \r\n                        <ListBoxItem Grid.Row=\"1\" Background=\"Transparent\" x:Name=\"LiveLocationButton\" Margin=\"24,24,24,0\" Tap=\"AttachLiveLocation_OnTap\" Visibility=\"Collapsed\" toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                            <ContentControl\r\n                                IsHitTestVisible=\"False\" \r\n                                Content=\"{Binding DataContext.MessageGeoLive, ElementName=LayoutRoot}\"\r\n                                Margin=\"-18,-20\"\r\n                                ContentTemplate=\"{Binding DataContext.MessageGeoLive, ElementName=LayoutRoot, Converter={StaticResource LiveLocationTemplateSelector}}\"\r\n                                HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"\r\n                                HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"/>\r\n                        </ListBoxItem>\r\n                         \r\n                        <StackPanel Grid.Row=\"0\" Background=\"Black\" x:Name=\"LocationSettingsPanel\" Visibility=\"Collapsed\">\r\n                            <TextBlock Margin=\"24,20,24,20\" Foreground=\"#99FFFFFF\" Text=\"{Binding Resources.LocationServicesDisabled, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" FontSize=\"23\"/>\r\n                            <Button Visibility=\"{Binding Converter={StaticResource WP8VisibilityConverter}}\" Click=\"LocationSettings_OnClick\" Margin=\"0,22,0,72\" Padding=\"60,2,60,6\" HorizontalAlignment=\"Left\" Content=\"{Binding Resources.LocationSettings, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n                        </StackPanel>\r\n                        <Border Grid.Row=\"2\" Height=\"2\" Background=\"#77ACAFB3\" Margin=\"0,24,0,0\"/>\r\n                        <TextBlock Grid.Row=\"3\" Margin=\"24,24,24,12\" Foreground=\"#FFFFFFFF\" Text=\"{Binding DataContext.Status, ElementName=Self}\" FontSize=\"23\"/>\r\n                    </Grid>\r\n                </longListSelector:LongListSelector.ListHeader>\r\n                <longListSelector:LongListSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                            <Grid Margin=\"24,12,0,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action AttachVenue($DataContext)]\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <Border Grid.Column=\"0\" Background=\"#FFEFEFEF\" CornerRadius=\"36\" Width=\"72\" Height=\"72\">\r\n                                    <Border Width=\"54\" Height=\"54\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Background=\"#FFA0A0A0\" Opacity=\"0\" media:MapView.ImageOpacityMask=\"{Binding IconSource}\">\r\n                                        <Border.OpacityMask>\r\n                                            <ImageBrush ImageSource=\"{Binding IconSource}\"/>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                </Border>\r\n\r\n                                <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"Auto\"/>\r\n                                        <RowDefinition Height=\"Auto\"/>\r\n                                    </Grid.RowDefinitions>\r\n                                    <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding Title}\" MaxHeight=\"36\" FontSize=\"27\" Foreground=\"#FFFFFFFF\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                                    <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                    Text=\"{Binding Address}\"\r\n                                    Foreground=\"#99FFFFFF\"\r\n                                    Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </ListBoxItem>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ItemTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <Grid Margin=\"0,0,0,82\" HorizontalAlignment=\"Center\" Visibility=\"{Binding DataContext.Venues.Count, ElementName=Self, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter='0'}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <TextBlock Grid.Column=\"0\" Margin=\"6,-4,6,0\" Foreground=\"White\" Text=\"{Binding Resources.PoweredBy, Source={StaticResource Strings}}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                            <Image Grid.Column=\"1\" Source=\"/Images/Maps/4SQ.png\" Width=\"30\" Height=\"42\" Margin=\"0,6\"/>\r\n                            <TextBlock Grid.Column=\"2\" Margin=\"6,-4,6,0\" Foreground=\"White\" Text=\"{Binding DataContext.PoweredBy, ElementName=Self}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n            </longListSelector:LongListSelector>\r\n        </Grid>\r\n\r\n        <Grid VerticalAlignment=\"Top\" x:Name=\"HeaderGrid\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"*\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Border x:Name=\"HeaderBackground\" Grid.ColumnSpan=\"2\" Background=\"#D9000000\" Height=\"104\"/>\r\n            <Border Grid.Column=\"1\" Background=\"Transparent\" Hold=\"ContextMenu_OnHold\" Tap=\"ContextMenu_OnTap\" VerticalAlignment=\"Center\">\r\n                <Image Source=\"/Images/W10M/ic_more_2x.png\" Width=\"32\" Height=\"32\" Margin=\"18,36,18,12\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu x:Name=\"ContextMenu\" HorizontalAlignment=\"Right\" Margin=\"18,10\" Style=\"{StaticResource W10MContextMenuStyle}\">\r\n                            <toolkit:MenuItem Header=\"{Binding Resources.Map, Source={StaticResource Strings}}\" Click=\"Map_OnClick\"/>\r\n                            <toolkit:MenuItem Header=\"{Binding Resources.Satellite, Source={StaticResource Strings}}\" Click=\"Satellite_OnClick\"/>\r\n                            <toolkit:MenuItem Header=\"{Binding Resources.Hybrid, Source={StaticResource Strings}}\" Click=\"Hybrid_OnClick\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n                </Image>\r\n            </Border>\r\n        </Grid>\r\n\r\n        <Grid VerticalAlignment=\"Bottom\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <Button x:Name=\"CenterMeButton\" Margin=\"6\" Style=\"{StaticResource ScrollButtonStyle}\" BorderThickness=\"1\" Background=\"White\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Tap=\"CenterMeButton_OnTap\">\r\n                <Button.RenderTransform>\r\n                    <TranslateTransform Y=\"0\"/>\r\n                </Button.RenderTransform>\r\n                <Border x:Name=\"CenterMeBorder\" Width=\"50\" Height=\"50\" Background=\"#FF8D969F\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Opacity=\"0.0\">\r\n                    <Border.OpacityMask>\r\n                        <ImageBrush ImageSource=\"/Images/ApplicationBar/appbar.map.centerme.png\" ImageOpened=\"ImageBrush_OnImageOpened\"/>\r\n                    </Border.OpacityMask>\r\n                </Border>\r\n            </Button>\r\n\r\n            <ContentControl\r\n                x:Name=\"FooterGrid\"\r\n                Grid.Row=\"1\"\r\n                Content=\"{Binding FooterMessage}\" \r\n                ContentTemplate=\"{Binding FooterMessage, Converter={StaticResource LocationTemplateSelector}}\"\r\n                HorizontalContentAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                VerticalAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"\r\n                Background=\"Transparent\"/>\r\n        </Grid>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n            <Grid Margin=\"0,0,0,72\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition/>\r\n                </Grid.RowDefinitions>\r\n                <ListBoxItem>\r\n                    <TextBlock Margin=\"18\" Text=\"{Binding Resources.Map, Source={StaticResource Strings}}\" FontSize=\"23\" Tap=\"Map_OnTap\"/>\r\n                </ListBoxItem>\r\n                <ListBoxItem Grid.Row=\"1\">\r\n                    <TextBlock Margin=\"18\" Text=\"{Binding Resources.Satellite, Source={StaticResource Strings}}\" FontSize=\"23\" Tap=\"Satellite_OnTap\"/>\r\n                </ListBoxItem>\r\n                <ListBoxItem Grid.Row=\"2\">\r\n                    <TextBlock Margin=\"18\" Text=\"{Binding Resources.Hybrid, Source={StaticResource Strings}}\" FontSize=\"23\" Tap=\"Hybrid_OnTap\"/>\r\n                </ListBoxItem>\r\n            </Grid>\r\n        </Border>\r\n        \r\n        <controls1:TelegramApplicationBar Grid.Row=\"1\"\r\n            x:Name=\"AppBarPanel\" \r\n            VerticalAlignment=\"Bottom\"\r\n            MorePanel=\"{Binding ElementName=MorePanel}\">\r\n            <controls1:TelegramApplicationBar.Buttons>\r\n                <controls1:TelegramAppBarButton\r\n                    Grid.Column=\"3\"\r\n                    ImageSource=\"/Images/W10M/ic_search_2x.png\"\r\n                    Text=\"{Binding Resources.Search, Source={StaticResource Strings}}\"\r\n                    Tap=\"Search_OnTap\"/>\r\n            </controls1:TelegramApplicationBar.Buttons>\r\n        </controls1:TelegramApplicationBar>\r\n\r\n        <ContentControl x:Name=\"SearchPlaceholder\" Grid.Row=\"0\" Grid.RowSpan=\"2\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/MapView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Device.Location;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Controls.Maps;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.ViewModels.Search;\r\nusing TelegramClient.Views.Additional;\r\nusing TelegramClient.Views.Media.MapTileSources;\r\nusing TelegramClient.Views.Search;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class MapView\r\n    {\r\n        public static readonly DependencyProperty ContactLocationStringProperty = DependencyProperty.Register(\r\n            \"ContactLocationString\", typeof (string), typeof (MapView), new PropertyMetadata(default(string)));\r\n\r\n        public string ContactLocationString\r\n        {\r\n            get { return (string) GetValue(ContactLocationStringProperty); }\r\n            set { SetValue(ContactLocationStringProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty DistanceProperty = DependencyProperty.Register(\r\n            \"Distance\", typeof (double), typeof (MapView), new PropertyMetadata(default(double)));\r\n\r\n        public double Distance\r\n        {\r\n            get { return (double) GetValue(DistanceProperty); }\r\n            set { SetValue(DistanceProperty, value); }\r\n        }\r\n\r\n        protected MapViewModel ViewModel\r\n        {\r\n            get { return DataContext as MapViewModel; }\r\n        }\r\n\r\n        GeoCoordinateWatcher _coordinatWatcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Default);\r\n\r\n        private readonly AppBarButton _searchButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Search,\r\n            IsEnabled = false,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.feature.search.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _directionsButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Directions,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.map.direction.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _centerMeButton = new AppBarButton\r\n        {\r\n            Text = AppResources.MyLocation,\r\n            IsEnabled = false,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.map.centerme.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _attachButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Attach,\r\n            IsEnabled = false,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.map.checkin.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarMenuItem _switchModeMenuItem = new AppBarMenuItem\r\n        {\r\n            Text = AppResources.SwitchMode\r\n        };\r\n\r\n        public MapView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            LayoutRoot.Opacity = 0.0;\r\n\r\n            ContactLocation.Visibility = Visibility.Collapsed;\r\n            CurrentLocation.Visibility = Visibility.Collapsed;\r\n\r\n            _searchButton.Click += (sender, args) => ViewModel.SearchLocation(ContactLocation.Location);\r\n            _attachButton.Click += (sender, args) => ViewModel.AttchLocation(ContactLocation.Location);\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n            _centerMeButton.Click += (sender, args) =>\r\n            {\r\n                var stateService = ViewModel.StateService;\r\n                stateService.GetNotifySettingsAsync(settings =>\r\n                {\r\n                    if (settings.LocationServices)\r\n                    {\r\n                        if (_coordinatWatcher.Position.Location == GeoCoordinate.Unknown)\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        Map.AnimationLevel = AnimationLevel.Full;\r\n                        Map.SetView(_coordinatWatcher.Position.Location, 16.0);\r\n                    }\r\n                });       \r\n            };\r\n\r\n            _switchModeMenuItem.Click += (sender, args) =>\r\n            {\r\n                var tileSource = MapLayer.TileSources.FirstOrDefault() as GoogleMapsTileSource;\r\n                if (tileSource != null)\r\n                {\r\n                    if (tileSource.MapsTileSourceType == GoogleMapsTileSourceType.Street)\r\n                    {\r\n                        tileSource.MapsTileSourceType = GoogleMapsTileSourceType.Satellite;\r\n                    }\r\n                    else if (tileSource.MapsTileSourceType == GoogleMapsTileSourceType.Satellite)\r\n                    {\r\n                        tileSource.MapsTileSourceType = GoogleMapsTileSourceType.Hybrid;\r\n                    }\r\n                    else\r\n                    {\r\n                        tileSource.MapsTileSourceType = GoogleMapsTileSourceType.Street;\r\n                    }\r\n\r\n                    MapLayer.TileSources.Clear();\r\n                    MapLayer.TileSources.Add(tileSource);\r\n                }\r\n            };\r\n\r\n            _directionsButton.Click += (sender, args) => ViewModel.ShowMapsDirections();\r\n\r\n            _coordinatWatcher.StatusChanged += CoordinatWatcher_StatusChanged;\r\n            _coordinatWatcher.PositionChanged += CoordinatWatcher_PositionChanged;\r\n\r\n            //Loaded += OnLoaded; Invoked on BeginOpenStoryboard\r\n            //Unloaded += OnUnloaded; Invoked on BeginCloseStoryboard\r\n\r\n            Loaded += OnLoadedOnce;\r\n            Loaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            StartWatching();\r\n\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"MapView.Loaded [status={0}, accuracy={1}]\", _coordinatWatcher.Status, _coordinatWatcher.Position.Location.HorizontalAccuracy));\r\n\r\n            if (ViewModel.MessageGeo != null)\r\n            {\r\n                var message = ViewModel.MessageGeo as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    var mediaGeo = message.Media as TLMessageMediaGeo;\r\n                    var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                    if (mediaGeo != null)\r\n                    {\r\n                        var geoPoint = mediaGeo.Geo as TLGeoPoint;\r\n                        if (geoPoint == null) return;\r\n\r\n                        ContactLocation.Template = mediaGeoLive != null\r\n                            ? (ControlTemplate)Resources[\"LiveContactPushpinTemplate\"]\r\n                            : (ControlTemplate)Resources[\"ContactPushpinTemplate\"];\r\n                        ContactLocation.Visibility = Visibility.Visible;\r\n                        ContactLocation.DataContext = message;\r\n                        ContactLocation.Location = new GeoCoordinate\r\n                        {\r\n                            Latitude = geoPoint.Lat.Value,\r\n                            Longitude = geoPoint.Long.Value\r\n                        };\r\n\r\n                        Map.AnimationLevel = AnimationLevel.UserInput;\r\n                        Map.ZoomLevel = 16.0;\r\n                        Map.Center = ContactLocation.Location;\r\n                    }\r\n\r\n                    if (mediaGeoLive != null)\r\n                    {\r\n                        ViewModel.UpdateLiveLocations();\r\n                    }\r\n                }\r\n\r\n                var decryptedMessage = ViewModel.MessageGeo as TLDecryptedMessage;\r\n                if (decryptedMessage != null)\r\n                {\r\n                    var mediaGeo = decryptedMessage.Media as TLDecryptedMessageMediaGeoPoint;\r\n                    if (mediaGeo != null)\r\n                    {\r\n                        var geoPoint = mediaGeo.Geo as TLGeoPoint;\r\n                        if (geoPoint == null) return;\r\n\r\n                        ContactLocation.Template = (ControlTemplate)Resources[\"ContactPushpinTemplate\"];\r\n                        ContactLocation.Visibility = Visibility.Visible;\r\n                        ContactLocation.DataContext = decryptedMessage;\r\n                        ContactLocation.Location = new GeoCoordinate\r\n                        {\r\n                            Latitude = geoPoint.Lat.Value,\r\n                            Longitude = geoPoint.Long.Value\r\n                        };\r\n\r\n                        Map.AnimationLevel = AnimationLevel.UserInput;\r\n                        Map.ZoomLevel = 16.0;\r\n                        Map.Center = ContactLocation.Location;\r\n                    }\r\n                }\r\n\r\n                AppBarPanel.Visibility = Visibility.Collapsed;\r\n\r\n                BuildLocalizedAppBar(false);\r\n            }\r\n            else\r\n            {\r\n                AppBarPanel.Visibility = Visibility.Visible;\r\n                ContactLocation.Template = (ControlTemplate)Resources[\"ContactPushpinTemplate\"];\r\n\r\n                BuildLocalizedAppBar(true);\r\n            }\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(1.0), () =>\r\n            {\r\n                Map.AnimationLevel = AnimationLevel.Full;\r\n            });\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            StopWatching();\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"MapView.Unloaded watcher.Stop [status={0}, accuracy={1}]\", _coordinatWatcher.Status, _coordinatWatcher.Position.Location.HorizontalAccuracy));\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (ViewModel.IsOpen)\r\n                {\r\n                    BeginOpenStoryboard();\r\n                }\r\n                else\r\n                {\r\n                    BeginCloseStoryboard();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnLoadedOnce(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= OnLoadedOnce;\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() => ViewModel.OpenEditor());\r\n        }\r\n\r\n        private static readonly Uri ExternalUri = new Uri(@\"app://external/\");\r\n\r\n        private bool _fromExternalUri;\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (e.NavigationMode == NavigationMode.Back \r\n                && _fromExternalUri\r\n//                && !_isWatching\r\n                )\r\n            {\r\n                StartWatching();\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n            _fromExternalUri = e.Uri == ExternalUri;\r\n\r\n            base.OnNavigatedFrom(e);\r\n        }\r\n\r\n        private void StopWatching()\r\n        {\r\n            if (_coordinatWatcher != null)\r\n            {\r\n                _coordinatWatcher.PositionChanged -= CoordinatWatcher_PositionChanged;\r\n                _coordinatWatcher.StatusChanged -= CoordinatWatcher_StatusChanged;\r\n                _coordinatWatcher.Dispose();\r\n\r\n                _coordinatWatcher = null;\r\n            }\r\n        }\r\n\r\n        private void StartWatching()\r\n        {\r\n            var stateService = ViewModel.StateService;\r\n            stateService.GetNotifySettingsAsync(\r\n                settings =>\r\n                {\r\n                    if (!settings.LocationServices)\r\n                    {\r\n                        settings.AskAllowingLocationServices = true;\r\n                        stateService.SaveNotifySettingsAsync(settings);\r\n\r\n                        Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                        {\r\n                            var result = MessageBox.Show(\r\n                                AppResources.AllowLocationServiceText,\r\n                                AppResources.AllowLocationServicesTitle,\r\n                                MessageBoxButton.OKCancel);\r\n\r\n                            if (result == MessageBoxResult.OK)\r\n                            {\r\n                                settings.LocationServices = true;\r\n                                stateService.SaveNotifySettingsAsync(settings);\r\n\r\n                                ContinueStartWatching();\r\n                            }\r\n                            else\r\n                            {\r\n                                //_isWatching = false;\r\n                            }\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        ContinueStartWatching();\r\n                    }\r\n                });\r\n        }\r\n\r\n        private void OpenLocationSettings()\r\n        {\r\n#if WP8\r\n            Windows.System.Launcher.LaunchUriAsync(new Uri(\"ms-settings-location:\"));\r\n#endif\r\n        }\r\n\r\n        private void ContinueStartWatching()\r\n        {\r\n            if (_coordinatWatcher == null)\r\n            {\r\n                _coordinatWatcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Default);\r\n                _coordinatWatcher.PositionChanged += CoordinatWatcher_PositionChanged;\r\n                _coordinatWatcher.StatusChanged += CoordinatWatcher_StatusChanged;\r\n            }\r\n\r\n            if (_coordinatWatcher.Permission != GeoPositionPermission.Granted)\r\n            {\r\n                _coordinatWatcher.Dispose();\r\n                _coordinatWatcher.PositionChanged -= CoordinatWatcher_PositionChanged;\r\n                _coordinatWatcher.StatusChanged -= CoordinatWatcher_StatusChanged;\r\n\r\n                _coordinatWatcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Default);\r\n                _coordinatWatcher.PositionChanged += CoordinatWatcher_PositionChanged;\r\n                _coordinatWatcher.StatusChanged += CoordinatWatcher_StatusChanged;\r\n            }\r\n\r\n            if (_coordinatWatcher.Permission != GeoPositionPermission.Granted)\r\n            {\r\n                UpdateAttaching(false);\r\n            }\r\n            else\r\n            {\r\n                UpdateAttaching(true);\r\n                SetContactLocationString();\r\n            }\r\n\r\n            _coordinatWatcher.Start(true);\r\n        }\r\n\r\n        private void UpdateAttaching(bool isEnabled)\r\n        {\r\n            LocationButton.Visibility = isEnabled ? Visibility.Visible : Visibility.Collapsed;\r\n            LiveLocationButton.Visibility = isEnabled && !(ViewModel.MessageGeoLive is TLMessageEmpty) ? Visibility.Visible : Visibility.Collapsed;\r\n            LocationSettingsPanel.Visibility = isEnabled? Visibility.Collapsed : Visibility.Visible;\r\n            _centerMeButton.IsEnabled = isEnabled;\r\n            _attachButton.IsEnabled = isEnabled;\r\n            _searchButton.IsEnabled = isEnabled;\r\n        }\r\n\r\n        //private bool _isWatching;\r\n\r\n        private void CoordinatWatcher_PositionChanged(object sender, GeoPositionChangedEventArgs<GeoCoordinate> e)\r\n        {\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"MapView.PositionChanged [status={0}, accuracy={1}]\", _coordinatWatcher.Status, _coordinatWatcher.Position.Location.HorizontalAccuracy));\r\n\r\n            var distance = CurrentLocation.Location.GetDistanceTo(ContactLocation.Location);\r\n\r\n            Distance = distance;\r\n            CurrentLocation.Location = e.Position.Location;\r\n\r\n            if (ViewModel.MessageGeo == null && distance < Constants.GlueGeoPointsDistance)\r\n            {\r\n                ContactLocation.Location = e.Position.Location;\r\n            }\r\n\r\n            SetContactLocationString();\r\n\r\n            ViewModel.OnPositionChanged(e.Position);\r\n        }\r\n\r\n        private void CoordinatWatcher_StatusChanged(object o, GeoPositionStatusChangedEventArgs e)\r\n        {\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"MapView.StatusChanged [status={0}, accuracy={1}]\", _coordinatWatcher.Status, _coordinatWatcher.Position.Location.HorizontalAccuracy));\r\n\r\n\r\n            if (e.Status == GeoPositionStatus.Ready || _coordinatWatcher.Position.Location != GeoCoordinate.Unknown)\r\n            {\r\n\r\n                CurrentLocation.Visibility = Visibility.Visible;\r\n                CurrentLocation.Location = _coordinatWatcher.Position.Location;\r\n                if (!CurrentLocation.Location.IsUnknown)\r\n                {\r\n                    UpdateAttaching(true);\r\n                }\r\n\r\n                Distance = CurrentLocation.Location.GetDistanceTo(ContactLocation.Location);\r\n\r\n                if (ViewModel.MessageGeo == null && !_contactLocationChoosen)\r\n                {\r\n                    ContactLocation.Visibility = Visibility.Visible;\r\n                    ContactLocation.Location = _coordinatWatcher.Position.Location;\r\n                    Map.AnimationLevel = AnimationLevel.UserInput;\r\n                    Map.ZoomLevel = 16.0;\r\n                    Map.Center = _coordinatWatcher.Position.Location;\r\n\r\n                    SetContactLocationString();\r\n                }\r\n\r\n                if (ViewModel.MessageGeo == null)\r\n                {\r\n                    ViewModel.GetVenues(_coordinatWatcher.Position.Location);\r\n                }\r\n            }\r\n        }\r\n\r\n\r\n#if DEBUG\r\n        ~MapView()\r\n        {\r\n            //TLUtils.WritePerformance(\"++MapView dstr\");\r\n        }\r\n#endif\r\n\r\n        private void BuildLocalizedAppBar(bool attaching)\r\n        {\r\n\r\n            HeaderGrid.Visibility = attaching ? Visibility.Collapsed : Visibility.Visible;\r\n            FooterGrid.Visibility = attaching ? Visibility.Collapsed : Visibility.Visible;\r\n\r\n            if (ApplicationBar == null)\r\n            {\r\n                ApplicationBar = new ApplicationBar{ Opacity = 1.0 };\r\n                var foregroundColor = Colors.White;\r\n                foregroundColor.A = 254;\r\n                ApplicationBar.ForegroundColor = foregroundColor;\r\n\r\n                var backgroundColor = new Color();\r\n                backgroundColor.A = 255;\r\n                backgroundColor.R = 31;\r\n                backgroundColor.G = 31;\r\n                backgroundColor.B = 31;\r\n                ApplicationBar.BackgroundColor = backgroundColor;\r\n                if (attaching)\r\n                {\r\n                    ApplicationBar.Buttons.Add(_searchButton);               \r\n                }\r\n                else\r\n                {\r\n#if WP8\r\n                    ApplicationBar.Buttons.Add(_directionsButton);\r\n#endif\r\n                }\r\n                //var color = new Color { A = 217 };\r\n                //ApplicationBar.BackgroundColor = color;\r\n                ApplicationBar.Buttons.Add(_centerMeButton);\r\n                ApplicationBar.MenuItems.Add(_switchModeMenuItem);\r\n            }\r\n        }\r\n\r\n        private bool _contactLocationChoosen;\r\n\r\n        private void GestureListener_Hold(object sender, GestureEventArgs e)\r\n        {\r\n            if (ViewModel.MessageGeo != null) return;\r\n\r\n            var point = new Point(e.GetPosition(Map).X, e.GetPosition(Map).Y);\r\n            var location = Map.ViewportPointToLocation(point);\r\n            _contactLocationChoosen = true;\r\n            ContactLocation.Visibility = Visibility.Visible;\r\n            ContactLocation.Location = location;\r\n\r\n            var distance = CurrentLocation.Location.GetDistanceTo(ContactLocation.Location);\r\n            if (distance < Constants.GlueGeoPointsDistance)\r\n            {\r\n                ContactLocation.Location = CurrentLocation.Location;\r\n            }\r\n\r\n            UpdateAttaching(true);\r\n            SetContactLocationString();\r\n        }\r\n\r\n        public void SetContactLocationString()\r\n        {\r\n            if (ContactLocation.Location.IsUnknown\r\n                || (ContactLocation.Location.Latitude == 0.0 && ContactLocation.Location.Longitude == 0.0))\r\n            {\r\n                ContactLocationString = AppResources.Loading;\r\n                return;\r\n            }\r\n\r\n            ContactLocationString = string.Format(\"({0}, {1})\", ContactLocation.Location.Latitude.ToString(\"###.#######\", new CultureInfo(\"en-us\")), ContactLocation.Location.Longitude.ToString(\"###.#######\", new CultureInfo(\"en-us\")));            \r\n        }\r\n\r\n        private void AttachLocation_OnTap(object sender, System.Windows.Input.GestureEventArgs e)\r\n        {\r\n            ViewModel.AttchLocation(ContactLocation.Location);\r\n        }\r\n\r\n        private void StopLiveLocation_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.StopLiveLocation();\r\n        }\r\n\r\n        private void AttachLiveLocation_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var message = ViewModel.MessageGeoLive as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                if (mediaGeoLive != null && mediaGeoLive.Active)\r\n                {\r\n                    StopLiveLocation_OnTap(null, null);\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var list = new List<TimerSpan>\r\n            {\r\n                new TimerSpan(AppResources.MinuteGenitivePlural, \"15\", (int) TimeSpan.FromMinutes(15.0).TotalSeconds),\r\n                new TimerSpan(AppResources.HourNominativeSingular, \"1\", (int) TimeSpan.FromHours(1.0).TotalSeconds),\r\n                new TimerSpan(AppResources.HourGenitivePlural, \"8\", (int) TimeSpan.FromHours(8.0).TotalSeconds)\r\n            };\r\n\r\n            var contact = ViewModel.With as TLUserBase;\r\n            var subtitle = contact != null\r\n                ? string.Format(AppResources.ShareLiveLocationToContactTimerSubtitle, contact.FullName2)\r\n                : AppResources.ShareLiveLocationToChatTimerSubtitle;\r\n\r\n            var chooseTTLView = new ChooseGeoLivePeriodView\r\n            {\r\n                Margin = new Thickness(0.0, -34.0, 0.0, -6.0),\r\n                Subtitle = { Text = subtitle }\r\n            };\r\n            ShellViewModel.ShowCustomMessageBox(null, null, AppResources.Share.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                result =>\r\n                {\r\n                    if (result == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        var selectedItem = list[0];\r\n                        if (chooseTTLView.Period1Hour.IsChecked == true)\r\n                        {\r\n                            selectedItem = list[1];\r\n                        }\r\n                        else if (chooseTTLView.Period8Hours.IsChecked == true)\r\n                        {\r\n                            selectedItem = list[2];\r\n                        }\r\n\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                        {\r\n                            ViewModel.AttachGeoLive(ContactLocation.Location, selectedItem);\r\n                        });\r\n                    }\r\n                },\r\n                chooseTTLView);\r\n\r\n            //ViewModel.AttchLiveLocation(ContactLocation.Location);\r\n        }\r\n\r\n        private void LocationSettings_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            OpenLocationSettings();\r\n        }\r\n\r\n        private void BeginOpenStoryboard()\r\n        {\r\n            ViewModel.RestoreParentHitTest(false);\r\n\r\n            CurrentLocation.Template = (ControlTemplate)Resources[\"PushpinTemplate\"];\r\n            ContactLocation.Visibility = Visibility.Visible;\r\n            for (int i = 0; i < Map.Children.Count; i++)\r\n            {\r\n                var pushpin = Map.Children[i] as Pushpin;\r\n                if (pushpin != null && pushpin.Tag == \"live\")\r\n                {\r\n                    Map.Children.RemoveAt(i--);\r\n                }\r\n            }\r\n\r\n            OnLoaded(null, null);\r\n\r\n            Venues.ScrollToTop();\r\n            SearchPlaceholder.Content = null;\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimaiton = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0.0, EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut } });\r\n            Storyboard.SetTarget(translateAnimaiton, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateAnimaiton, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateAnimaiton);\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                LayoutRoot.Opacity = 1.0;\r\n                LayoutRoot.Visibility = Visibility.Visible;\r\n                storyboard.Begin();\r\n            });\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                Map.Visibility = Visibility.Visible;\r\n            };\r\n        }\r\n\r\n        private void BeginCloseStoryboard()\r\n        {\r\n            OnUnloaded(null, null);\r\n\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            //var translateBarAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            //translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0 });\r\n            //translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = translateYTo, EasingFunction = easingFunction });\r\n            //Storyboard.SetTarget(translateBarAniamtion, Bar);\r\n            //Storyboard.SetTargetProperty(translateBarAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            //storyboard.Children.Add(translateBarAniamtion);\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                LayoutRoot.Visibility = Visibility.Collapsed;\r\n                ViewModel.RestoreParentHitTest(true);\r\n            };\r\n            storyboard.Begin();\r\n        }\r\n\r\n        public static readonly DependencyProperty ImageOpacityMaskProperty = DependencyProperty.RegisterAttached(\r\n            \"ImageOpacityMask\", typeof(ImageSource), typeof(MapView), new PropertyMetadata(default(ImageSource), OnImageOpacityMaskChanged));\r\n\r\n        private static void OnImageOpacityMaskChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var border = d as Border;\r\n            if (border != null)\r\n            {\r\n                var imageSource = e.NewValue as ImageSource;\r\n                if (imageSource != null)\r\n                {\r\n                    var brush = new ImageBrush { ImageSource = imageSource };\r\n                    brush.ImageOpened += (sender, args) =>\r\n                    {\r\n                        border.Opacity = 1.0;\r\n                    };\r\n\r\n                    border.Opacity = 0.0;\r\n                    border.OpacityMask = brush;\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void SetImageOpacityMask(DependencyObject element, Brush value)\r\n        {\r\n            element.SetValue(ImageOpacityMaskProperty, value);\r\n        }\r\n\r\n        public static ImageSource GetImageOpacityMask(DependencyObject element)\r\n        {\r\n            return (ImageSource)element.GetValue(ImageOpacityMaskProperty);\r\n        }\r\n\r\n        private void ContextMenu_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void ContextMenu_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ContextMenu.IsOpen = true;\r\n        }\r\n\r\n        private void SwitchMapsTileSource(GoogleMapsTileSourceType type)\r\n        {\r\n            var tileSource = MapLayer.TileSources.FirstOrDefault() as GoogleMapsTileSource;\r\n            if (tileSource != null)\r\n            {\r\n                if (tileSource.MapsTileSourceType == type)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                tileSource.MapsTileSourceType = type;\r\n\r\n                MapLayer.TileSources.Clear();\r\n                MapLayer.TileSources.Add(tileSource);\r\n            }\r\n        }\r\n\r\n        private void Map_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchMapsTileSource(GoogleMapsTileSourceType.Street);\r\n        }\r\n\r\n        private void Satellite_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchMapsTileSource(GoogleMapsTileSourceType.Satellite);\r\n        }\r\n\r\n        private void Hybrid_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            SwitchMapsTileSource(GoogleMapsTileSourceType.Hybrid);\r\n        }\r\n\r\n        private void NavigateButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.ShowMapsDirections();\r\n        }\r\n\r\n        private void CenterMeButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var stateService = ViewModel.StateService;\r\n            stateService.GetNotifySettingsAsync(settings =>\r\n            {\r\n                if (settings.LocationServices)\r\n                {\r\n                    if (_coordinatWatcher.Position.Location == GeoCoordinate.Unknown)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    Map.AnimationLevel = AnimationLevel.Full;\r\n                    Map.SetView(_coordinatWatcher.Position.Location, 16.0);\r\n                }\r\n            });  \r\n        }\r\n\r\n        private void ImageBrush_OnImageOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            CenterMeBorder.Opacity = 1.0;\r\n        }\r\n\r\n        private void Search_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var view = new SearchVenuesView();\r\n            var viewModel = IoC.Get<SearchVenuesViewModel>();\r\n            viewModel.Location = ContactLocation.Location;\r\n            viewModel.AttachAction = venue =>\r\n            {\r\n                ViewModel.AttachVenue(venue);\r\n            };\r\n            view.DataContext = viewModel;\r\n\r\n            SearchPlaceholder.Content = view;\r\n\r\n            //ViewModel.SearchLocation(ContactLocation.Location);\r\n        }\r\n\r\n        private void MediaGeo_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (ViewModel.MessageGeo == null) return;\r\n\r\n            var message = ViewModel.MessageGeo as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                if (mediaGeoLive != null)\r\n                {\r\n                    var footerMessage = ViewModel.FooterMessage as TLMessage;\r\n                    if (footerMessage == null)\r\n                    {\r\n                        AttachLiveLocation_OnTap(null, null);\r\n                    }\r\n                    else\r\n                    {\r\n                        mediaGeoLive = footerMessage.Media as TLMessageMediaGeoLive;\r\n                        if (mediaGeoLive != null && mediaGeoLive.Active)\r\n                        {\r\n                            StopLiveLocation_OnTap(null, null);\r\n                        }\r\n                        else\r\n                        {\r\n                            AttachLiveLocation_OnTap(null, null);\r\n                        }\r\n                    }\r\n                    return;\r\n                }\r\n\r\n                var mediaGeo = message.Media as TLMessageMediaGeo;\r\n                if (mediaGeo != null)\r\n                {\r\n                    var geoPoint = mediaGeo.Geo as TLGeoPoint;\r\n                    if (geoPoint == null) return;\r\n\r\n                    Map.AnimationLevel = AnimationLevel.Full;\r\n                    Map.SetView(new GeoCoordinate(geoPoint.Lat.Value, geoPoint.Long.Value), 16.0);\r\n\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var decryptedMessage = ViewModel.MessageGeo as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                var mediaGeo = decryptedMessage.Media as TLDecryptedMessageMediaGeoPoint;\r\n                if (mediaGeo != null)\r\n                {\r\n                    var geoPoint = mediaGeo.Geo as TLGeoPoint;\r\n                    if (geoPoint == null) return;\r\n\r\n                    Map.AnimationLevel = AnimationLevel.Full;\r\n                    Map.SetView(new GeoCoordinate(geoPoint.Lat.Value, geoPoint.Long.Value), 16.0);\r\n\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Map_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            {\r\n                Map_OnClick(null, null);\r\n            });\r\n        }\r\n\r\n        private void Satellite_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            {\r\n                Satellite_OnClick(null, null);\r\n            });\r\n        }\r\n\r\n        private void Hybrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            {\r\n                Hybrid_OnClick(null, null);\r\n            });\r\n        }\r\n\r\n        public void UpdateLiveLocation(TLMessage48 message)\r\n        {\r\n            var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n            if (mediaGeoLive == null) return;\r\n\r\n            if (message.FromId == null) return;\r\n\r\n            for (var i = 0; i < Map.Children.Count; i++)\r\n            {\r\n                var child = Map.Children[i];\r\n                var pushpin = child as Pushpin;\r\n                if (pushpin != null\r\n                    && string.Equals(pushpin.Tag, \"live\"))\r\n                {\r\n                    var pushpinMessage = pushpin.DataContext as TLMessage;\r\n                    if (pushpinMessage != null\r\n                        && pushpinMessage.FromId != null\r\n                        && pushpinMessage.FromId.Value == message.FromId.Value)\r\n                    {\r\n                        var geoPoint = mediaGeoLive.Geo as TLGeoPoint;\r\n                        if (geoPoint != null)\r\n                        {\r\n                            pushpin.Location = new GeoCoordinate(geoPoint.Lat.Value, geoPoint.Long.Value);\r\n                        }\r\n                        else\r\n                        {\r\n                            Map.Children.RemoveAt(i);\r\n                        }\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (ContactLocation.Visibility == Visibility.Visible)\r\n            {\r\n                var contactMessage = ContactLocation.DataContext as TLMessage;\r\n                if (contactMessage != null && contactMessage.FromId != null && contactMessage.FromId.Value == message.FromId.Value)\r\n                {\r\n                    var geoPoint = mediaGeoLive.Geo as TLGeoPoint;\r\n                    if (geoPoint != null)\r\n                    {\r\n                        ContactLocation.Visibility = Visibility.Visible;\r\n                        ContactLocation.Location = new GeoCoordinate(geoPoint.Lat.Value, geoPoint.Long.Value);\r\n                    }\r\n                    else\r\n                    {\r\n                        ContactLocation.Visibility = Visibility.Collapsed;\r\n                    }\r\n                    return;\r\n                }\r\n            }\r\n\r\n            mediaGeoLive.Date = message.Date;\r\n            mediaGeoLive.EditDate = message.EditDate;\r\n            mediaGeoLive.From = message.From;\r\n            if (mediaGeoLive.Active)\r\n            {\r\n                var geoPoint = mediaGeoLive.Geo as TLGeoPoint;\r\n                if (geoPoint != null)\r\n                {\r\n                    var location = new GeoCoordinate(geoPoint.Lat.Value, geoPoint.Long.Value);\r\n\r\n                    var pushPin = new Pushpin\r\n                    {\r\n                        CacheMode = new BitmapCache(),\r\n                        Template = (ControlTemplate)Resources[\"LiveContactPushpinTemplate\"],\r\n                        DataContext = message,\r\n                        Tag = \"live\",\r\n                        Location = location\r\n                    };\r\n\r\n                    if (message.FromId.Value == IoC.Get<IStateService>().CurrentUserId)\r\n                    {\r\n                        //locations.Add(CurrentLocation.Location);\r\n                        pushPin.SetBinding(Pushpin.LocationDependencyProperty, new Binding { Source = CurrentLocation, Path = new PropertyPath(\"Location\") });\r\n                    }\r\n                    else\r\n                    {\r\n                        //locations.Add(location);\r\n                    }\r\n\r\n                    Map.Children.Add(pushPin);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void UpdateLiveLocations()\r\n        {\r\n            if (ViewModel.LiveLocations.Count > 0)\r\n            {\r\n                var locations = new List<GeoCoordinate>();\r\n                ContactLocation.Visibility = Visibility.Collapsed;\r\n                foreach (var messageBase in ViewModel.LiveLocations)\r\n                {\r\n                    var message = messageBase as TLMessage48;\r\n                    if (message != null)\r\n                    {\r\n                        var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                        if (mediaGeoLive != null)\r\n                        {\r\n                            mediaGeoLive.Date = message.Date;\r\n                            mediaGeoLive.EditDate = message.EditDate;\r\n                            mediaGeoLive.From = message.From;\r\n                            if (mediaGeoLive.Active)\r\n                            {\r\n                                var geoPoint = mediaGeoLive.Geo as TLGeoPoint;\r\n                                if (geoPoint != null)\r\n                                {\r\n                                    var location = new GeoCoordinate(geoPoint.Lat.Value, geoPoint.Long.Value);\r\n\r\n                                    var pushPin = new Pushpin\r\n                                    {\r\n                                        CacheMode = new BitmapCache(),\r\n                                        Template = (ControlTemplate)Resources[\"LiveContactPushpinTemplate\"],\r\n                                        DataContext = message,\r\n                                        Tag = \"live\",\r\n                                        Location = location\r\n                                    };\r\n\r\n                                    if (message.FromId.Value == IoC.Get<IStateService>().CurrentUserId)\r\n                                    {\r\n                                        locations.Add(CurrentLocation.Location);\r\n                                        pushPin.SetBinding(Pushpin.LocationDependencyProperty, new Binding {Source = CurrentLocation, Path = new PropertyPath(\"Location\")});\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        locations.Add(location);\r\n                                    }\r\n\r\n                                    Map.Children.Add(pushPin);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (locations.Count > 0)\r\n                {\r\n                    Map.AnimationLevel = AnimationLevel.UserInput;\r\n                    Map.ZoomLevel = 16.0;\r\n\r\n                    if (locations.Count == 1)\r\n                    {\r\n                        Map.Center = locations[0];\r\n                    }\r\n                    else\r\n                    {\r\n                        Map.Center = locations[0];\r\n                        return;\r\n                        double num1 = -90.0;\r\n                        double num2 = 90.0;\r\n                        double num3 = 180.0;\r\n                        double num4 = -180.0;\r\n                        foreach (GeoCoordinate location in locations)\r\n                        {\r\n                            num1 = Math.Max(num1, location.Latitude);\r\n                            num2 = Math.Min(num2, location.Latitude);\r\n                            num3 = Math.Min(num3, location.Longitude);\r\n                            num4 = Math.Max(num4, location.Longitude);\r\n                        }\r\n\r\n                        var locationRect = new LocationRect(num1, num3, num2, num4);\r\n\r\n                        var boundedRect = new LocationRect(locationRect.Center, locationRect.Width * 1.2, locationRect.Height * 1.4);\r\n\r\n                        Deployment.Current.Dispatcher.BeginInvoke(() => Map.SetView(boundedRect))\r\n                        ;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    ContactLocation.Visibility = Visibility.Visible;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Media/MediaView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.MediaView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:triggers=\"clr-namespace:Telegram.Controls.Triggers;assembly=Telegram.Controls\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"MessageVideoTemplate\">\r\n                <Border Background=\"{StaticResource PhoneChromeBrush}\" Width=\"99\" Height=\"99\" Margin=\"6\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <Grid Background=\"Transparent\" >\r\n                        <Image Source=\"{Binding Media.Video, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=99.0}\" Stretch=\"UniformToFill\"/>\r\n\r\n                        <Grid VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Left\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Image VerticalAlignment=\"Center\"\r\n\t\t\t\t\t            Width=\"35\" Height=\"35\" Margin=\"-4,3,-4,0\"\r\n\t\t\t\t\t            Source=\"/Images/Audio/appbar.transport.play.rest.png\"/>\r\n                            <TextBlock Grid.Column=\"1\"\r\n\t\t\t\t\t            VerticalAlignment=\"Center\" Margin=\"0\"\r\n\t\t\t\t\t            Text=\"{Binding Media.Video.DurationString}\"\r\n\t\t\t\t\t            Foreground=\"White\"\r\n\t\t\t\t\t            Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </Border>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"MessagePhotoTemplate\">\r\n                <Border Background=\"{StaticResource PhoneChromeBrush}\" Width=\"99\" Height=\"99\" Margin=\"6\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <Image Source=\"{Binding Media.Photo, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=99.0}\" Stretch=\"UniformToFill\"/>\r\n                </Border>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"MessageEmptyTemplate\">\r\n                <Grid/>\r\n            </DataTemplate>\r\n\r\n            <templateSelectors:MediaGridTemplateSelector \r\n                x:Key=\"MediaGridTemplateSelector\"\r\n                PhotoTemplate=\"{StaticResource MessagePhotoTemplate}\"\r\n                VideoTemplate=\"{StaticResource MessageVideoTemplate}\"\r\n                EmptyTemplate=\"{StaticResource MessageEmptyTemplate}\"/>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"-12,0\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition x:Name=\"BottomAppBarPlaceholder\" Height=\"72\"/>\r\n        </Grid.RowDefinitions>\r\n        <controls:LazyListBox \r\n            Margin=\"18,0,0,0\"\r\n            Grid.RowSpan=\"2\"\r\n            x:Name=\"Items\"\r\n            CloseToEndPercent=\"0.1\"\r\n            CloseToEnd=\"Items_OnCloseToEnd\">\r\n            <i:Interaction.Triggers>\r\n                <triggers:CompressionTrigger CompressionType=\"Bottom\">\r\n                    <micro:ActionMessage MethodName=\"LoadNextSlice\"/>\r\n                </triggers:CompressionTrigger>\r\n            </i:Interaction.Triggers>\r\n            <ItemsControl.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel/>\r\n                </ItemsPanelTemplate>\r\n            </ItemsControl.ItemsPanel>\r\n            <ItemsControl.ItemTemplate>\r\n                <DataTemplate>\r\n                    <StackPanel Orientation=\"Horizontal\" toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                        <ListBoxItem Content=\"{Binding Message1}\" ContentTemplate=\"{Binding Message1, Converter={StaticResource MediaGridTemplateSelector}}\"/>\r\n                        <ListBoxItem Content=\"{Binding Message2}\" ContentTemplate=\"{Binding Message2, Converter={StaticResource MediaGridTemplateSelector}}\"/>\r\n                        <ListBoxItem Content=\"{Binding Message3}\" ContentTemplate=\"{Binding Message3, Converter={StaticResource MediaGridTemplateSelector}}\"/>\r\n                        <ListBoxItem Content=\"{Binding Message4}\" ContentTemplate=\"{Binding Message4, Converter={StaticResource MediaGridTemplateSelector}}\"/>\r\n                    </StackPanel>\r\n                </DataTemplate>\r\n            </ItemsControl.ItemTemplate>\r\n        </controls:LazyListBox>\r\n\r\n        <Grid \r\n            VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\" \r\n            Visibility=\"{Binding IsEmptyList, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n            <StackPanel Margin=\"0,100,0,0\">\r\n                <Image Width=\"160\" Height=\"160\" Source=\"{Binding EmptyListImageSource}\" Stretch=\"UniformToFill\"/>\r\n                <TextBlock Text=\"{Binding Resources.SharePhotosAndVideos, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Width=\"300\" Margin=\"12,40,12,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n        <TextBlock Margin=\"24,0\" Text=\"{Binding Status}\" TextWrapping=\"Wrap\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/MediaView.xaml.cs",
    "content": "﻿using TelegramClient.ViewModels.Media;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class MediaView\r\n    {\r\n        public MediaView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Media/MusicView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.MusicView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:telegramClient=\"clr-namespace:TelegramClient\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <converters:DeclensionConverter x:Key=\"CountConverter\"\r\n                NominativeSingular=\"{Binding Resources.SongNominativeSingular, Source={StaticResource Strings}}\"\r\n                NominativePlural=\"{Binding Resources.SongNominativePlural, Source={StaticResource Strings}}\"\r\n                GenitiveSingular=\"{Binding Resources.SongGenitiveSingular, Source={StaticResource Strings}}\"\r\n                GenitivePlural=\"{Binding Resources.SongGenitivePlural, Source={StaticResource Strings}}\"/>\r\n            \r\n            <phone:JumpListItemBackgroundConverter x:Key=\"BackgroundConverter\" Enabled=\"{StaticResource TelegramAccentBrush}\"/>\r\n            <phone:JumpListItemForegroundConverter x:Key=\"ForegroundConverter\"/>\r\n            \r\n            <Style x:Key=\"FilesJumpListStyle\" TargetType=\"phone:LongListSelector\">\r\n                <Setter Property=\"LayoutMode\" Value=\"List\" />\r\n                <Setter Property=\"Margin\" Value=\"12,12,0,0\"/>\r\n                <Setter Property=\"ItemTemplate\">\r\n                    <Setter.Value>\r\n                        <DataTemplate>\r\n                            <Border Background=\"{Binding Converter={StaticResource BackgroundConverter}}\" \r\n                                Width=\"470\" \r\n                                Height=\"70\" \r\n                                Margin=\"6,6,18,6\">\r\n                                <TextBlock Text=\"{Binding KeyString}\"\r\n                                       Foreground=\"{Binding Converter={StaticResource ForegroundConverter}}\"\r\n                                       FontSize=\"23\"  \r\n                                       Padding=\"2\"\r\n                                       Margin=\"12,0\"\r\n                                       VerticalAlignment=\"Bottom\"/>\r\n                            </Border>\r\n                        </DataTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n           \r\n            <DataTemplate x:Key=\"GroupHeaderTemplate\">\r\n                <Grid Margin=\"66,0,18,0\">\r\n                    <TextBlock Text=\"{Binding KeyString}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontSize=\"23\" Margin=\"0,18,18,6\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\"/>\r\n                    <TextBlock Text=\"{Binding Count, Converter={StaticResource CountConverter}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"23\" Margin=\"0,18,0,6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Visible}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"FileTemplate\">\r\n                <Grid Margin=\"0,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Loaded=\"DeleteMessage_OnLoaded\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action SaveMedia($DataContext)]\" Header=\"{Binding Resources.Save, Source={StaticResource Strings}}\" \r\n                            Visibility=\"{Binding Self, Converter={StaticResource MediaFileAvailableToVisibilityConverter}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n\r\n                    <dialogs:DocumentTileControl \r\n                        Grid.RowSpan=\"2\" \r\n                        Width=\"64\" Height=\"64\" \r\n                        DownloadIconVisibility=\"{Binding Media.Self, Converter={StaticResource DownloadMediaToVisibilityConverter}}\"\r\n                        Text=\"{Binding Media.Document.FileExt, Converter={StaticResource Lowercase}}\"\r\n                        Source=\"{Binding Media.Document, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Music=\"{Binding Media.Document.Music}\"\r\n                        DownloadingProgress=\"{Binding Media.DownloadingProgress}\"\r\n                        UploadingProgress=\"{Binding Media.UploadingProgress}\"/>\r\n\r\n                    <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,6,0\" TextTrimming=\"WordEllipsis\" Text=\"{Binding Media.Document.DocumentName, Converter={StaticResource NonBreakingStringConverter}}\" FontSize=\"27\"/>\r\n                    <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"18,0,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <TextBlock Grid.Column=\"0\" Margin=\"0\" Text=\"{Binding Media.Document.Size.Value, Converter={StaticResource FileSizeConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                        <TextBlock Grid.Column=\"1\" Margin=\"0\" Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' • \\{0\\}'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Background=\"Transparent\"\r\n\t\t\t\t        Visibility=\"{Binding Media.DownloadingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\">\r\n                        <i:Interaction.Triggers>\r\n                            <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                                <micro:ActionMessage MethodName=\"CancelDocumentDownloading\">\r\n                                    <micro:ActionMessage.Parameters>\r\n                                        <micro:Parameter Value=\"{Binding Media}\"/>\r\n                                    </micro:ActionMessage.Parameters>\r\n                                </micro:ActionMessage>\r\n                            </behaviors:HandledEventTrigger>\r\n                        </i:Interaction.Triggers>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Background=\"Transparent\"\r\n\t\t\t\t        Visibility=\"{Binding Media.UploadingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\">\r\n                        <i:Interaction.Triggers>\r\n                            <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                                <micro:ActionMessage MethodName=\"CancelUploading\">\r\n                                    <micro:ActionMessage.Parameters>\r\n                                        <micro:Parameter Value=\"{Binding Media}\"/>\r\n                                    </micro:ActionMessage.Parameters>\r\n                                </micro:ActionMessage>\r\n                            </behaviors:HandledEventTrigger>\r\n                        </i:Interaction.Triggers>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"-6,-30,-12,0\">\r\n        <telegramClient:LongListSelectorEx \r\n            Margin=\"-48,0,0,0\" \r\n            ItemsSource=\"{Binding Files}\"\r\n            toolkit:TiltEffect.SuppressTilt=\"True\"\r\n            IsSelectionEnabled=\"{Binding IsSelectionEnabled}\"\r\n            IsGroupingEnabled=\"True\"\r\n            HideEmptyGroups=\"True\"\r\n            JumpListStyle=\"{StaticResource FilesJumpListStyle}\"\r\n            GroupHeaderTemplate=\"{StaticResource GroupHeaderTemplate}\"\r\n            ManipulationStarted=\"Files_OnManipulationStarted\"\r\n            Knob=\"15\" micro:Message.Attach=\"[Event CloseToEnd] = [Action LoadNextSlice]\"\r\n            Style=\"{StaticResource LazyLongListSelectorStyle2}\">\r\n            <telegramClient:LongListSelectorEx.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                                Background=\"{StaticResource PhoneSubtleBrush}\"\r\n                                Opacity=\"0.3\" \r\n                                IsHitTestVisible=\"False\"\r\n                                Visibility=\"{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}\" \r\n                                HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"/>\r\n                        <CheckBox Grid.Column=\"0\" IsChecked=\"{Binding IsSelected}\" Margin=\"6,0,-12,0\" VerticalAlignment=\"Center\"/>\r\n                        <ContentControl Grid.Column=\"1\" Margin=\"0,0,18,0\"\r\n                            HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" \r\n                            Content=\"{Binding}\" ContentTemplate=\"{StaticResource FileTemplate}\" />\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                                Background=\"Transparent\" \r\n                                Tap=\"SelectionBorder_OnTap\" \r\n                                Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=LayoutRoot, Converter={StaticResource BooleanToVisibilityConverter}}\" \r\n                                HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </telegramClient:LongListSelectorEx.ItemTemplate>\r\n        </telegramClient:LongListSelectorEx>\r\n        <Border Margin=\"-48,0,0,0\" Width=\"49\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Left\" Background=\"{StaticResource PhoneBackgroundBrush}\" Visibility=\"{Binding IsSelectionEnabled, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\"/>\r\n\r\n        <Grid \r\n            VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\" \r\n            Visibility=\"{Binding IsEmptyList, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n            <StackPanel Margin=\"0,100,0,0\">\r\n                <Image Width=\"160\" Height=\"160\" Source=\"{Binding EmptyListImageSource}\" Stretch=\"UniformToFill\"/>\r\n                <TextBlock Text=\"{Binding Resources.ShareFiles, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Width=\"300\" Margin=\"12,40,12,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n        <TextBlock Margin=\"18,12\" Text=\"{Binding Status}\" TextWrapping=\"Wrap\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/MusicView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.ViewModels.Media;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class MusicView\r\n    {\r\n        public MusicViewModel<IInputPeer> ViewModel { get { return DataContext as MusicViewModel<IInputPeer>; } }\r\n\r\n        public MusicView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        private void Files_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        private void DeleteMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            var channel = ViewModel.CurrentItem as TLChannel;\r\n            menuItem.Visibility = (channel == null || channel.Creator)\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n        }\r\n\r\n        private void SelectionBorder_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            var element = sender as FrameworkElement;\r\n            if (element != null)\r\n            {\r\n                var message = element.DataContext as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    message.IsSelected = !message.IsSelected;\r\n                    ViewModel.ChangeGroupActionStatus();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Media/ProfilePhotoViewerView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.ProfilePhotoViewerView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <Storyboard x:Name=\"OpenApplicationPanelAnimation\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame x:Name=\"OpenApplicationPanelAnimationStartKeyFrame\" KeyTime=\"0\" Value=\"60\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\" Value=\"Visible\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"CloseApplicationPanelAnimation\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                    <EasingDoubleKeyFrame x:Name=\"CloseApplicationPanelAnimationStopKeyFrame\" KeyTime=\"0:0:0.20\" Value=\"-60\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                        <EasingDoubleKeyFrame.EasingFunction>\r\n                            <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"6\"/>\r\n                        </EasingDoubleKeyFrame.EasingFunction>\r\n                    </EasingDoubleKeyFrame>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ApplicationPanel\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.20\" Value=\"Collapsed\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            \r\n            <DataTemplate x:Name=\"PhotoTemplate\">\r\n                <Grid VerticalAlignment=\"Center\">\r\n                    <Image Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter='160_Background'}\"/>\r\n                    <Image Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter='640_Background'}\"/>\r\n                    <Image Source=\"{Binding Self, Converter={StaticResource ProfileBigPhotoConverter}}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid>\r\n        <Grid\r\n            Background=\"Transparent\"\r\n            ManipulationStarted=\"ImagesGrid_OnManipulationStarted\"\r\n            ManipulationDelta=\"ImagesGrid_OnManipulationDelta\"\r\n            ManipulationCompleted=\"ImagesGrid_OnManipulationCompleted\"\r\n            Tap=\"ImagesGrid_OnTap\">\r\n            <Grid x:Name=\"BackgroundBorder\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Center\" Background=\"Black\" Margin=\"0,0,0,-1\" CacheMode=\"BitmapCache\" Width=\"480\"/>\r\n            <Grid x:Name=\"ImagesGrid\" IsHitTestVisible=\"True\" Background=\"Transparent\" Margin=\"-498,0\" Width=\"1476\">\r\n                <Grid.RenderTransform>\r\n                    <CompositeTransform/>\r\n                </Grid.RenderTransform>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition/>\r\n                    <ColumnDefinition/>\r\n                    <ColumnDefinition/>\r\n                </Grid.ColumnDefinitions>\r\n\r\n                <Grid x:Name=\"Item3\" Grid.Column=\"0\" VerticalAlignment=\"Center\" Width=\"480\" Margin=\"6,0\">\r\n                    <ContentControl \r\n                    x:Name=\"Control3\" \r\n                    CacheMode=\"BitmapCache\"\r\n                    Content=\"{Binding NextItem}\" \r\n                    ContentTemplate=\"{StaticResource PhotoTemplate}\"\r\n                    VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                    VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n                </Grid>\r\n\r\n                <Grid x:Name=\"Item2\" Grid.Column=\"1\" VerticalAlignment=\"Center\" Width=\"480\" Margin=\"6,0\">\r\n                    <ContentControl \r\n                    x:Name=\"Control2\" \r\n                    CacheMode=\"BitmapCache\"\r\n                    Content=\"{Binding CurrentItem}\" \r\n                    ContentTemplate=\"{StaticResource PhotoTemplate}\"\r\n                    VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                    VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\">\r\n                        <ContentControl.RenderTransform>\r\n                            <CompositeTransform/>\r\n                        </ContentControl.RenderTransform>\r\n                    </ContentControl>\r\n                </Grid>\r\n\r\n                <Grid x:Name=\"Item1\" Grid.Column=\"2\" VerticalAlignment=\"Center\" Width=\"480\" Margin=\"6,0\">\r\n                    <ContentControl \r\n                    x:Name=\"Control1\" \r\n                    CacheMode=\"BitmapCache\"\r\n                    Content=\"{Binding PreviousItem}\" \r\n                    ContentTemplate=\"{StaticResource PhotoTemplate}\"\r\n                    VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                    VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n        \r\n        <Grid VerticalAlignment=\"Bottom\" x:Name=\"ApplicationPanel\" CacheMode=\"BitmapCache\" Margin=\"0,0,0,-72\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform x:Name=\"ApplicationPanelTransform\" TranslateY=\"140\"/>\r\n            </Grid.RenderTransform>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <Border Grid.RowSpan=\"3\" Background=\"Black\" Opacity=\"0.3\"/>\r\n\r\n            <!--<Canvas x:Name=\"Canvas\" Grid.Row=\"0\" Height=\"68\" IsHitTestVisible=\"False\" Visibility=\"{Binding GroupedItems.Count, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\">\r\n                <controls:RibbonControl x:Name=\"Ribbon\" ItemsSource=\"{Binding GroupedItems}\" Margin=\"240,6,0,6\">\r\n                    <controls:RibbonControl.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <controls:RibbonImageControl\r\n                                Width=\"40\"\r\n                                CacheMode=\"BitmapCache\"\r\n                                PhotoWidth=\"{Binding Converter={StaticResource PhotoToDimensionConverter}, ConverterParameter=Width, FallbackValue=40}\"\r\n                                PhotoHeight=\"{Binding Converter={StaticResource PhotoToDimensionConverter}, ConverterParameter=Height, FallbackValue=60}\"\r\n                                Source=\"{Binding Self, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter='160_Background'}\"/>\r\n                        </DataTemplate>\r\n                    </controls:RibbonControl.ItemTemplate>\r\n                </controls:RibbonControl>\r\n            </Canvas>-->\r\n            <Grid Grid.Row=\"1\" x:Name=\"AppBarPlaceholder\" Height=\"72\"/>\r\n            <Grid Grid.Row=\"2\" x:Name=\"AppBarPlaceholder2\" Height=\"72\"/>\r\n        </Grid>\r\n    </Grid>\r\n\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/ProfilePhotoViewerView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define NO_RIBBON\r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Interactivity;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Behaviors;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Media;\r\nusing GestureEventArgs = TelegramClient.Controls.GestureListener.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class ProfilePhotoViewerView\r\n    {\r\n        public ProfilePhotoViewerViewModel ViewModel\r\n        {\r\n            get { return DataContext as ProfilePhotoViewerViewModel; }\r\n        }\r\n\r\n        private readonly ApplicationBarMenuItem _savePhotoMenuItem = new ApplicationBarMenuItem { Text = AppResources.Save };\r\n\r\n        private readonly ApplicationBarMenuItem _deletePhotoMenuItem = new ApplicationBarMenuItem { Text = AppResources.Delete };\r\n\r\n        private readonly ApplicationBarMenuItem _sharePhotoMenuItem = new ApplicationBarMenuItem { Text = AppResources.Share + \"...\" };\r\n\r\n        private readonly ApplicationBarMenuItem _setPhotoMenuItem = new ApplicationBarMenuItem { Text = AppResources.Set, IsEnabled = false };\r\n\r\n        private bool _runOnce;\r\n\r\n        private PanAndZoomBehavior _panAndZoomBehavior;\r\n\r\n        public ProfilePhotoViewerView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Visibility = Visibility.Collapsed;\r\n\r\n            _savePhotoMenuItem.Click += (o, e) => ViewModel.SavePhoto();\r\n            _deletePhotoMenuItem.Click += (o, e) => ViewModel.DeletePhoto();\r\n            _sharePhotoMenuItem.Click += (o, e) => ViewModel.SharePhoto();\r\n            _setPhotoMenuItem.Click += (o, e) => ViewModel.SetPhoto();\r\n\r\n            BuildLocalizedAppBar();\r\n\r\n            OptimizeFullHD();\r\n\r\n            _runOnce = true;\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                var behaviorCollection = Interaction.GetBehaviors(Control2);\r\n                if (behaviorCollection.FirstOrDefault(x => x is PanAndZoomBehavior) == null)\r\n                {\r\n                    var panAndZoomBehavior = new PanAndZoomBehavior();\r\n                    panAndZoomBehavior.MaxZoom = 5.0;\r\n                    panAndZoomBehavior.CanZoom = true;\r\n                    panAndZoomBehavior.DoubleTap += PanAndZoom_OnDoubleTap;\r\n\r\n                    behaviorCollection.Add(panAndZoomBehavior);\r\n\r\n                    _panAndZoomBehavior = panAndZoomBehavior;\r\n                }\r\n\r\n                SetLocalizedAppBarButtons();\r\n\r\n                if (_runOnce && ViewModel.CurrentItem != null)\r\n                {\r\n                    _runOnce = false;\r\n                    BeginOpenStoryboard();\r\n                }\r\n\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n\r\n            Unloaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void PanAndZoom_OnDoubleTap(object sender, GestureEventArgs e)\r\n        {\r\n            _tapHandled = true;\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.CurrentItem))\r\n            {\r\n                _setPhotoMenuItem.IsEnabled = ViewModel.CanSlideRight;\r\n\r\n                if (ViewModel.IsChatViewer) return;\r\n\r\n                if (ApplicationBar != null)\r\n                {\r\n                    if (ViewModel.IsSelfViewer)\r\n                    {\r\n                        ApplicationBar.MenuItems.Remove(_deletePhotoMenuItem);\r\n                        if (!ViewModel.CanSlideRight)\r\n                        {\r\n                            ApplicationBar.MenuItems.Insert(1, _deletePhotoMenuItem);\r\n                        }\r\n                    }\r\n                }\r\n            } \r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (ViewModel.IsOpen)\r\n                {\r\n                    BeginOpenStoryboard();\r\n                }\r\n                else\r\n                {\r\n                    BeginCloseStoryboard();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar == null)\r\n            {\r\n                ApplicationBar = new ApplicationBar { Opacity = 0.0 };\r\n                ApplicationBar.BackgroundColor = Colors.Black;\r\n                ApplicationBar.ForegroundColor = Colors.White;\r\n                ApplicationBar.StateChanged += (o, e) => { ApplicationBar.Opacity = e.IsMenuVisible ? 0.9999 : 0.0; };\r\n            }\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n#if WP8\r\n            var appBar = ApplicationBar;\r\n            if (appBar == null)\r\n            {\r\n                appBar = new ApplicationBar();\r\n            }\r\n\r\n            var appBarDefaultSize = appBar.DefaultSize;\r\n            var appBarDifference = appBarDefaultSize - 72.0;\r\n\r\n            AppBarPlaceholder.Height = appBarDefaultSize;\r\n            AppBarPlaceholder2.Height = appBarDefaultSize;\r\n            ApplicationPanel.Margin = new Thickness(0.0, 0.0, 0.0, -appBarDefaultSize);\r\n#if !NO_RIBBON\r\n            OpenApplicationPanelAnimationStartKeyFrame.Value = appBarDefaultSize + Canvas.Height;\r\n            CloseApplicationPanelAnimationStopKeyFrame.Value = appBarDefaultSize + Canvas.Height;\r\n            ApplicationPanelTransform.TranslateY = appBarDefaultSize + Canvas.Height;\r\n#else\r\n            OpenApplicationPanelAnimationStartKeyFrame.Value = appBarDefaultSize;\r\n            CloseApplicationPanelAnimationStopKeyFrame.Value = appBarDefaultSize;\r\n            ApplicationPanelTransform.TranslateY = appBarDefaultSize;\r\n#endif\r\n            \r\n            //TopAppBarPlaceholder.Height = appBarDefaultSize;\r\n            //OpenTopApplicationPanelAnimationStartKeyFrame.Value = -appBarDefaultSize;\r\n            //CloseTopApplicationPanelAnimationStopKeyFrame.Value = -appBarDefaultSize;\r\n            //TopApplicationPanelTransform.TranslateY = -appBarDefaultSize;\r\n#endif\r\n        }\r\n\r\n        private void SetLocalizedAppBarButtons()\r\n        {\r\n            ApplicationBar.MenuItems.Clear();\r\n            ApplicationBar.MenuItems.Add(_savePhotoMenuItem);\r\n\r\n            if (ViewModel.IsChatViewer) return;\r\n\r\n            if (ViewModel.IsSelfViewer) ApplicationBar.MenuItems.Add(_deletePhotoMenuItem);\r\n#if WP8\r\n            ApplicationBar.MenuItems.Add(_sharePhotoMenuItem);\r\n#endif\r\n            ApplicationBar.MenuItems.Add(_setPhotoMenuItem);\r\n        }\r\n\r\n        private CloseDirection? _direction;\r\n\r\n        private void BeginCloseStoryboard()\r\n        {\r\n            SystemTray.IsVisible = true;\r\n            ApplicationBar.IsVisible = false;\r\n\r\n            var direction = _direction ?? CloseDirection.Down;\r\n            var duration = _direction != null ? TimeSpan.FromSeconds(0.15) : TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = _direction != null ? null : new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = ImagesGrid.ActualHeight / 2 + rootFrameHeight / 2;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = direction == CloseDirection.Down ? translateYTo : -translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            var opacityImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            opacityImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = 0 });\r\n            Storyboard.SetTarget(opacityImageAniamtion, BackgroundBorder);\r\n            Storyboard.SetTargetProperty(opacityImageAniamtion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityImageAniamtion);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (o, args) =>\r\n            {\r\n                Visibility = Visibility.Collapsed;\r\n                _direction = null;\r\n            };\r\n\r\n            CloseApplicationPanelAnimation.Begin();\r\n        }\r\n\r\n        private void BeginOpenStoryboard()\r\n        {\r\n            Control1.Visibility = Visibility.Collapsed;\r\n            Control1.Content = ViewModel.PreviousItem;\r\n            Grid.SetColumn(Item1, 2);\r\n            Control2.Visibility = Visibility.Visible;\r\n            Control2.Content = ViewModel.CurrentItem;\r\n            Grid.SetColumn(Item2, 1);\r\n            Control3.Visibility = Visibility.Collapsed;\r\n            Control3.Content = ViewModel.NextItem;\r\n            Grid.SetColumn(Item3, 0);\r\n\r\n            SetPanAndZoom();\r\n\r\n            SystemTray.IsVisible = false;\r\n            ApplicationBar.IsVisible = true;\r\n\r\n            if (_panAndZoomBehavior != null)\r\n            {\r\n                _panAndZoomBehavior.CurrentScaleX = 1.0;\r\n                _panAndZoomBehavior.CurrentScaleY = 1.0;\r\n            }\r\n\r\n            var transparentBlack = Colors.Black;\r\n            transparentBlack.A = 0;\r\n\r\n            Visibility = Visibility.Visible;\r\n            ImagesGrid.Opacity = 1.0;\r\n            ImagesGrid.RenderTransform = new CompositeTransform();\r\n            BackgroundBorder.Opacity = 1.0;\r\n\r\n\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            ((CompositeTransform)ImagesGrid.RenderTransform).TranslateY = translateYTo;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = 0.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                Control1.Visibility = Visibility.Visible;\r\n                Control2.Visibility = Visibility.Visible;\r\n                Control3.Visibility = Visibility.Visible;\r\n\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    OpenApplicationPanelAnimation.Begin();\r\n                    //OpenTopApplicationPanelAnimation.Begin();\r\n                });\r\n            };\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        private bool _tapHandled;\r\n\r\n        private void PanAndZoom_OnClose(object sender, PanAndZoomCloseEventArgs args)\r\n        {\r\n            _direction = args.VerticalChange > 0 ? CloseDirection.Down : CloseDirection.Up;\r\n\r\n            ViewModel.CloseViewer();\r\n        }\r\n\r\n        private bool? _verticalDrag;\r\n        private bool _slideAnimating;\r\n\r\n        private void ImagesGrid_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            if (_panAndZoomBehavior.CurrentScaleX > 1.0) return;\r\n            if (_slideAnimating) return;\r\n\r\n            _verticalDrag = null;\r\n        }\r\n\r\n        private void ImagesGrid_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            if (_panAndZoomBehavior.CurrentScaleX > 1.0) return;\r\n            if (_slideAnimating) return;\r\n\r\n            if (_verticalDrag == null)\r\n            {\r\n                _verticalDrag = Math.Abs(e.DeltaManipulation.Translation.Y) >\r\n                                  Math.Abs(e.DeltaManipulation.Translation.X);\r\n            }\r\n            if (_verticalDrag == false)\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                if (e.CumulativeManipulation.Translation.X < 0.0\r\n                    && ViewModel.CanSlideLeft)\r\n                {\r\n                    transform.TranslateX += e.DeltaManipulation.Translation.X;\r\n                }\r\n                else if (e.CumulativeManipulation.Translation.X > 0.0\r\n                    && ViewModel.CanSlideRight)\r\n                {\r\n                    transform.TranslateX += e.DeltaManipulation.Translation.X;\r\n                }\r\n\r\n                var percent = transform.TranslateX / 480.0;\r\n#if !NO_RIBBON\r\n                Ribbon.Move(percent);\r\n#endif\r\n\r\n                transform.TranslateX = PanAndZoomBehavior.Clamp(transform.TranslateX, -480.0 - 12.0, 480.0 + 12.0);\r\n                _panAndZoomBehavior.IsEnabled = transform.TranslateX == 0.0;\r\n            }\r\n            else\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                var translate = new CompositeTransform\r\n                {\r\n                    TranslateX = 0,\r\n                    TranslateY = e.CumulativeManipulation.Translation.Y\r\n                };\r\n\r\n                var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n                var deltaY = Math.Abs(translate.TranslateY + translate.ScaleY * transform.TranslateY + (translate.ScaleY - 1) * (transform.CenterY - translate.CenterY));\r\n                var opacity = (rootFrameHeight - deltaY) / rootFrameHeight;\r\n                var backgroundBrush = (SolidColorBrush)BackgroundBorder.Background;\r\n                var backgroundColor = backgroundBrush.Color;\r\n                backgroundColor.A = (byte)(opacity * byte.MaxValue);\r\n\r\n                BackgroundBorder.Opacity = opacity;\r\n\r\n                ImagesGrid.RenderTransform = translate;\r\n                _panAndZoomBehavior.IsEnabled = translate.TranslateY == 0.0;\r\n            }\r\n        }\r\n\r\n        private void ImagesGrid_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            if (_panAndZoomBehavior.CurrentScaleX > 1.0) return;\r\n            if (_slideAnimating) return;\r\n\r\n            _panAndZoomBehavior.IsEnabled = true;\r\n            if (_verticalDrag == true)\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                var hasVelocity = e.FinalVelocities.LinearVelocity.X > 1000.0;\r\n                var minTranslateY = 100.0;\r\n\r\n                if (Math.Abs(transform.TranslateY) > minTranslateY || hasVelocity && Math.Abs(transform.TranslateY) > 0.0)\r\n                {\r\n                    PanAndZoom_OnClose(this, new PanAndZoomCloseEventArgs { VerticalChange = e.TotalManipulation.Translation.Y });\r\n                    return;\r\n                }\r\n\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, ImagesGrid);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                storyboard.Begin();\r\n\r\n                BackgroundBorder.Opacity = 1.0;\r\n            }\r\n            else if (_verticalDrag == false)\r\n            {\r\n                var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n                if (transform == null) return;\r\n\r\n                var hasVelocity = Math.Abs(e.FinalVelocities.LinearVelocity.X) > 1000.0;\r\n                var minTranslateX = 160.0;\r\n\r\n                if (transform.TranslateX > minTranslateX || hasVelocity && transform.TranslateX > 0.0)\r\n                {\r\n                    SlideRight(Math.Abs(e.FinalVelocities.LinearVelocity.X));\r\n                }\r\n                else if (transform.TranslateX < -minTranslateX || hasVelocity && transform.TranslateX < 0.0)\r\n                {\r\n                    SlideLeft(Math.Abs(e.FinalVelocities.LinearVelocity.X));\r\n                }\r\n                else\r\n                {\r\n                    SlideBack();\r\n                    transform.TranslateX = 0.0;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void SlideRight(double velocity, System.Action callback = null)\r\n        {\r\n            if (velocity == 0.0)\r\n            {\r\n                velocity = 480.0 + 12.0;\r\n            }\r\n\r\n            var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n            if (transform == null) return;\r\n\r\n            var translationX = 480.0 + 12.0;\r\n            var duration = PanAndZoomBehavior.Clamp((translationX - transform.TranslateX) / velocity, 0.15, 0.35);\r\n#if !NO_RIBBON\r\n            Ribbon.ScrollPrevious(duration);\r\n#endif\r\n            var storyboard = new Storyboard();\r\n            var translateAnimation = new DoubleAnimation();\r\n            translateAnimation.To = translationX;\r\n            translateAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            Storyboard.SetTarget(translateAnimation, transform);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n            storyboard.Begin();\r\n\r\n            //MainGrid.IsHitTestVisible = false;\r\n            _slideAnimating = true;\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                //Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                //{\r\n                    //MainGrid.IsHitTestVisible = true;\r\n                    _slideAnimating = false;\r\n                //});\r\n                transform.TranslateX = 0.0;\r\n\r\n                Grid.SetColumn(Item1, Grid.GetColumn(Item1) + 1 > 2 ? 0 : Grid.GetColumn(Item1) + 1);\r\n                Grid.SetColumn(Item2, Grid.GetColumn(Item2) + 1 > 2 ? 0 : Grid.GetColumn(Item2) + 1);\r\n                Grid.SetColumn(Item3, Grid.GetColumn(Item3) + 1 > 2 ? 0 : Grid.GetColumn(Item3) + 1);\r\n\r\n                SetPanAndZoom();\r\n\r\n                ViewModel.SlideRight();\r\n\r\n                SetControlContent(0, ViewModel.NextItem);\r\n\r\n                callback.SafeInvoke();\r\n            };\r\n        }\r\n\r\n        public void SlideLeft(double velocity, System.Action callback = null)\r\n        {\r\n            if (velocity == 0.0)\r\n            {\r\n                velocity = 480.0 + 12.0;\r\n            }\r\n\r\n            var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n            if (transform == null) return;\r\n\r\n            var translationX = 480.0 + 12.0;\r\n            var duration = PanAndZoomBehavior.Clamp((translationX + transform.TranslateX) / velocity, 0.15, 0.35);\r\n#if !NO_RIBBON\r\n            Ribbon.ScrollNext(duration);\r\n#endif\r\n            var storyboard = new Storyboard();\r\n            var translateAnimation = new DoubleAnimation();\r\n            translateAnimation.To = -translationX;\r\n            translateAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            Storyboard.SetTarget(translateAnimation, transform);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n            storyboard.Begin();\r\n\r\n            //MainGrid.IsHitTestVisible = false;\r\n            _slideAnimating = true;\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                //Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                //{\r\n                    //MainGrid.IsHitTestVisible = true;\r\n                    _slideAnimating = false;\r\n                //});\r\n                transform.TranslateX = 0.0;\r\n                Grid.SetColumn(Item1, Grid.GetColumn(Item1) - 1 < 0 ? 2 : Grid.GetColumn(Item1) - 1);\r\n                Grid.SetColumn(Item2, Grid.GetColumn(Item2) - 1 < 0 ? 2 : Grid.GetColumn(Item2) - 1);\r\n                Grid.SetColumn(Item3, Grid.GetColumn(Item3) - 1 < 0 ? 2 : Grid.GetColumn(Item3) - 1);\r\n\r\n                SetPanAndZoom();\r\n\r\n                ViewModel.SlideLeft();\r\n\r\n                SetControlContent(2, ViewModel.PreviousItem);\r\n\r\n                callback.SafeInvoke();\r\n            };\r\n        }\r\n\r\n        public void SetControlContent(int column, TLPhotoBase content)\r\n        {\r\n            if (Grid.GetColumn(Item1) == column)\r\n            {\r\n                Control1.Content = content;\r\n            }\r\n            else if (Grid.GetColumn(Item2) == column)\r\n            {\r\n                Control2.Content = content;\r\n            }\r\n            else if (Grid.GetColumn(Item3) == column)\r\n            {\r\n                Control3.Content = content;\r\n            }\r\n        }\r\n\r\n        private void SlideBack()\r\n        {\r\n            var transform = ImagesGrid.RenderTransform as CompositeTransform;\r\n            if (transform == null) return;\r\n\r\n            var duration = 0.1;\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimation = new DoubleAnimation();\r\n            translateAnimation.To = 0.0;\r\n            translateAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            Storyboard.SetTarget(translateAnimation, transform);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n            storyboard.Begin();\r\n#if !NO_RIBBON\r\n            Ribbon.ScrollBack(duration);\r\n#endif\r\n        }\r\n\r\n        private void SetPanAndZoom()\r\n        {\r\n            Interaction.GetBehaviors(Control1).Clear();\r\n            Interaction.GetBehaviors(Control2).Clear();\r\n            Interaction.GetBehaviors(Control3).Clear();\r\n\r\n            if (Grid.GetColumn(Item1) == 1)\r\n            {\r\n                var behaviors = Interaction.GetBehaviors(Control1);\r\n                behaviors.Add(_panAndZoomBehavior);\r\n                Control1.RenderTransform = new CompositeTransform();\r\n            }\r\n            else if (Grid.GetColumn(Item2) == 1)\r\n            {\r\n                var behaviors = Interaction.GetBehaviors(Control2);\r\n                behaviors.Add(_panAndZoomBehavior);\r\n                Control2.RenderTransform = new CompositeTransform();\r\n            }\r\n            else if (Grid.GetColumn(Item3) == 1)\r\n            {\r\n                var behaviors = Interaction.GetBehaviors(Control3);\r\n                behaviors.Add(_panAndZoomBehavior);\r\n                Control3.RenderTransform = new CompositeTransform();\r\n            }\r\n        }\r\n\r\n        private void ImagesGrid_OnTap(object sender, System.Windows.Input.GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.15), () =>\r\n            {\r\n                if (_tapHandled)\r\n                {\r\n                    _tapHandled = false;\r\n                    return;\r\n                }\r\n\r\n                if (ApplicationBar != null)\r\n                {\r\n                    ApplicationBar.IsVisible = !ApplicationBar.IsVisible;\r\n                }\r\n\r\n                var animation = ApplicationPanel.Visibility == Visibility.Visible\r\n                    ? CloseApplicationPanelAnimation\r\n                    : OpenApplicationPanelAnimation;\r\n\r\n                animation.Begin();\r\n            });\r\n        }\r\n\r\n        private int _index;\r\n        private double _duration;\r\n\r\n        public void ScrollTo(TLPhotoBase currentItem, double duration)\r\n        {\r\n#if !NO_RIBBON\r\n            var index = ViewModel.GroupedItems.IndexOf(currentItem);\r\n            if (index != -1)\r\n            {\r\n                _index = index;\r\n                _duration = duration;\r\n                Ribbon.LayoutUpdated += Ribbon_LayoutUpdated;\r\n            }\r\n#endif\r\n        }\r\n\r\n        private void Ribbon_LayoutUpdated(object sender, System.EventArgs e)\r\n        {\r\n #if !NO_RIBBON\r\n            var result = Ribbon.ScrollTo(_index, _duration);\r\n            System.Diagnostics.Debug.WriteLine(\"Ribbon.ScrollTo result=\" + result);\r\n            if (result)\r\n            {\r\n                Ribbon.LayoutUpdated -= Ribbon_LayoutUpdated;\r\n            }\r\n#endif\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Media/SecretMediaView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.SecretMediaView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"-6,-30,-12,0\">\r\n        <ListBox Margin=\"18,18,0,0\" x:Name=\"Items\" Visibility=\"Collapsed\" ItemsSource=\"{Binding Items}\">\r\n            <ItemsControl.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <toolkit:WrapPanel/>\r\n                </ItemsPanelTemplate>\r\n            </ItemsControl.ItemsPanel>\r\n            <ItemsControl.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Border Background=\"{StaticResource PhoneChromeBrush}\"  Width=\"146\" Height=\"146\" Margin=\"0,0,3,3\">\r\n                        <Grid Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                            <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}}\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"UniformToFill\"/>\r\n                            <Image Source=\"{Binding Media.Video, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=99.0}\" Stretch=\"UniformToFill\"/>\r\n                            <Image Source=\"{Binding Media.Photo, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=99.0}\" Stretch=\"UniformToFill\"/>\r\n\r\n                            <Grid Visibility=\"{Binding Media.Video, Converter={StaticResource ExistsToVisibilityConverter}, FallbackValue=Collapsed}\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Left\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Image VerticalAlignment=\"Center\"\r\n\t\t\t\t\t                Width=\"35\" Height=\"35\" Margin=\"-4,3,-4,0\"\r\n\t\t\t\t\t                Source=\"/Images/Audio/appbar.transport.play.rest.png\"/>\r\n                                <TextBlock Grid.Column=\"1\"\r\n\t\t\t\t\t                VerticalAlignment=\"Center\" Margin=\"0\"\r\n\t\t\t\t\t                Text=\"{Binding Media.Video.DurationString}\"\r\n\t\t\t\t\t                Foreground=\"White\"\r\n\t\t\t\t\t                Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Border>\r\n                </DataTemplate>\r\n            </ItemsControl.ItemTemplate>\r\n        </ListBox>\r\n\r\n        <Grid \r\n            VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\" \r\n            Visibility=\"{Binding IsEmptyList, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n            <StackPanel Margin=\"0,100,0,0\">\r\n                <Image Width=\"160\" Height=\"160\" Source=\"{Binding EmptyListImageSource}\" Stretch=\"UniformToFill\"/>\r\n                <TextBlock Text=\"{Binding Resources.SharePhotosAndVideos, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Width=\"300\" Margin=\"12,40,12,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n        \r\n        <TextBlock Margin=\"18,12\" Text=\"{Binding Status}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/SecretMediaView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Threading;\r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class SecretMediaView\r\n    {\r\n        public SecretMediaView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                ThreadPool.QueueUserWorkItem(state =>\r\n                {\r\n                    Thread.Sleep(500);\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n\r\n                        Items.Visibility = Visibility.Visible;\r\n                    });\r\n                });\r\n            };\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Media/VideoCaptureView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.VideoCaptureView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\" \r\n    SupportedOrientations=\"Landscape\" Orientation=\"LandscapeLeft\"\r\n    x:Name=\"Self\"\r\n    shell:SystemTray.IsVisible=\"False\"\r\n    mc:Ignorable=\"d\">\r\n    \r\n    <Grid Background=\"Black\" Tap=\"UIElement_OnTap\">\r\n\r\n        <Grid.Resources>\r\n            <VideoBrush x:Name=\"ViewfinderBrush\"  AlignmentX=\"Left\" AlignmentY=\"Top\" Stretch=\"UniformToFill\">\r\n                <VideoBrush.RelativeTransform>\r\n                    <CompositeTransform x:Name=\"ViewfinderTransform\" CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                </VideoBrush.RelativeTransform>\r\n            </VideoBrush>\r\n        </Grid.Resources>\r\n\r\n        <Rectangle\r\n                x:Name=\"Viewfinder\"\r\n                VerticalAlignment=\"Stretch\" \r\n                HorizontalAlignment=\"Stretch\" />\r\n\r\n        <!--<MediaElement \r\n                x:Name=\"VideoPlayer\" \r\n                Width=\"640\" \r\n                Height=\"480\"\r\n                AutoPlay=\"True\" \r\n                RenderTransformOrigin=\"0.5, 0.5\" \r\n                VerticalAlignment=\"Center\" \r\n                HorizontalAlignment=\"Center\" \r\n                Stretch=\"Fill\"\r\n                Canvas.Left=\"80\">\r\n                <MediaElement.RenderTransform>\r\n                    <CompositeTransform x:Name=\"VideoPlayerTransform\" CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                </MediaElement.RenderTransform>\r\n            </MediaElement>-->\r\n\r\n        <Grid Margin=\"80,0\" RenderTransformOrigin=\"0.5,0.5\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform x:Name=\"TimerTransform\"/>\r\n            </Grid.RenderTransform>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"*\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n            <TextBlock Name=\"Timer\" Foreground=\"White\" VerticalAlignment=\"Bottom\" Style=\"{StaticResource PhoneTextHugeStyle}\" Text=\"{Binding TimerString, ElementName=Self}\"/>\r\n            <TextBlock Grid.Row=\"1\" Name=\"DebugText\" FontSize=\"24\" Visibility=\"Collapsed\" TextWrapping=\"Wrap\" />\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/VideoCaptureView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing System.Windows.Threading;\r\nusing Telegram.Api.Helpers;\r\n#if WP8\r\nusing Windows.Storage;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing Microsoft.Devices;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Media;\r\nusing Execute = Caliburn.Micro.Execute;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class VideoCaptureView\r\n    {\r\n        public VideoCaptureViewModel ViewModel { get { return DataContext as VideoCaptureViewModel; } }\r\n\r\n        private readonly AppBarButton _startRecordingButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Record,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.feature.video.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _stopRecordingPlaybackButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Stop,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.stop.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _startPlaybackButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Play,\r\n            IconUri = new Uri(\"/Images/Audio/appbar.transport.play.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _pausePlaybackButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Pause,\r\n            IconUri = new Uri(\"/Images/Audio/appbar.transport.pause.rest.png \", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _attachButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Attach,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar == null)\r\n            {\r\n                ApplicationBar = new ApplicationBar();\r\n            }\r\n            else\r\n            {\r\n                return;\r\n            }\r\n            ApplicationBar.Opacity = 0.5;\r\n            ApplicationBar.IsVisible = false;\r\n\r\n            //ApplicationBar.Buttons.Add(_startRecordingButton);\r\n            //ApplicationBar.Buttons.Add(_stopRecordingPlaybackButton);\r\n            ApplicationBar.Buttons.Add(_attachButton);\r\n            ApplicationBar.Buttons.Add(_cancelButton);\r\n        }\r\n\r\n\r\n        private DateTime _startTime;\r\n\r\n        private int _timerCounter;\r\n\r\n        public static readonly DependencyProperty TimerStringProperty =\r\n            DependencyProperty.Register(\"TimerString\", typeof(string), typeof(VideoCaptureView), new PropertyMetadata(\"00:00\"));\r\n\r\n        public string TimerString\r\n        {\r\n            get { return (string)GetValue(TimerStringProperty); }\r\n            set { SetValue(TimerStringProperty, value); }\r\n        }\r\n\r\n        private readonly DispatcherTimer _timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(0.25) };\r\n\r\n        protected override void OnOrientationChanged(OrientationChangedEventArgs e)\r\n        {\r\n            base.OnOrientationChanged(e);\r\n            switch (e.Orientation)\r\n            {\r\n                case PageOrientation.Landscape:\r\n                case PageOrientation.LandscapeLeft:\r\n                    //VideoPlayerTransform.Rotation = 0;\r\n                    ViewfinderTransform.Rotation = 0;\r\n                    TimerTransform.Rotation = 0;\r\n                    break;\r\n                case PageOrientation.LandscapeRight:\r\n                    //VideoPlayerTransform.Rotation =180;\r\n                    ViewfinderTransform.Rotation = 180;\r\n                    TimerTransform.Rotation = 180;\r\n                    break;\r\n                case PageOrientation.Portrait:\r\n                case PageOrientation.PortraitUp:\r\n                    //VideoPlayerTransform.Rotation = 90;\r\n                    ViewfinderTransform.Rotation = 90;\r\n                    break;\r\n                case PageOrientation.PortraitDown:\r\n                    //VideoPlayerTransform.Rotation = 270;\r\n                    ViewfinderTransform.Rotation = 270;\r\n                    break;\r\n            }\r\n        }\r\n\r\n        // Source and device for capturing video.\r\n        private CaptureSource _captureSource;\r\n        private VideoCaptureDevice _videoCaptureDevice;\r\n\r\n        // Media details for storing the recording.        \r\n        private IsolatedStorageFileStream _fileStream;\r\n        private FileSink _fileSink;\r\n        private readonly string _videoFileName = string.Empty;\r\n\r\n        // For managing button and application state.\r\n        private enum ButtonState { Initialized, Ready, Recording, Playback, Paused, NoChange, CameraNotSupported };\r\n        private ButtonState _currentAppState;\r\n\r\n        public VideoCaptureView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            if (Execute.InDesignMode) return;\r\n\r\n            _timer.Tick += OnTimerTick;\r\n\r\n            var guid = IoC.Get<IStateService>().CurrentUserId + \"_\" + Guid.NewGuid() + \".mp4\";\r\n            _videoFileName = guid;\r\n\r\n            _attachButton.Click += OnAttachButtonClick;\r\n            _cancelButton.Click += OnCancelButtonClick;\r\n            // Prepare ApplicationBar and buttons.\r\n            BuildLocalizedAppBar();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                FileUtils.SwitchIdleDetectionMode(false);\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                FileUtils.SwitchIdleDetectionMode(true);\r\n            };\r\n        }\r\n\r\n        private void OnCancelButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.VideoIsoFile = null;\r\n            TimerString = \"00:00\";\r\n            UpdateUI(ButtonState.Initialized, AppResources.TapRecordToStartRecording);\r\n        }\r\n\r\n        private void OnAttachButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.Attach(_videoFileName, _fileId, _uploadableParts);\r\n        }\r\n\r\n        private void OnTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            _timerCounter = (int)(DateTime.Now - _startTime).TotalSeconds;\r\n            TimerString = TimeSpan.FromSeconds(_timerCounter).ToString(@\"mm\\:ss\");\r\n\r\n#if WP8\r\n            //UploadFileAsync();\r\n#endif\r\n        }\r\n\r\n        private long _uploadingLength;\r\n        private volatile bool _isPartReady;\r\n        private TLLong _fileId;\r\n        private readonly List<UploadablePart> _uploadableParts = new List<UploadablePart>();\r\n\r\n#if WP8\r\n        private void UploadFileAsync()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                if (!_isPartReady) return;\r\n\r\n                _isPartReady = false;\r\n\r\n                var uploadablePart = GetUploadablePart(_videoFileName, _uploadingLength, _uploadableParts.Count);\r\n                if (uploadablePart == null)\r\n                {\r\n                    _isPartReady = true;\r\n                    return;\r\n                }\r\n\r\n                _uploadableParts.Add(uploadablePart);\r\n                _uploadingLength += uploadablePart.Count;\r\n\r\n                //Execute.BeginOnUIThread(() => VibrateController.Default.Start(TimeSpan.FromSeconds(0.02)));\r\n\r\n                var mtProtoService = IoC.Get<IMTProtoService>();\r\n                mtProtoService.SaveFilePartAsync(_fileId, uploadablePart.FilePart,\r\n                    TLString.FromBigEndianData(uploadablePart.Bytes),\r\n                    result =>\r\n                    {\r\n                        if (result.Value)\r\n                        {\r\n                            uploadablePart.Status = PartStatus.Processed;\r\n                        }\r\n                    },\r\n                    error => Telegram.Api.Helpers.Execute.ShowDebugMessage(\"upload.saveFilePart error \" + error));\r\n\r\n                _isPartReady = true;\r\n            });\r\n        }\r\n\r\n        private static UploadablePart GetUploadablePart(string fileName, long position, int partId)\r\n        {\r\n            var fullFilePath = ApplicationData.Current.LocalFolder.Path + \"\\\\\" + fileName;\r\n            var fi = new FileInfo(fullFilePath);\r\n            if (!fi.Exists)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            const int minPartLength = 1024;\r\n            const int maxPartLength = 4 * 1024;\r\n\r\n            var recordingLength = fi.Length - position;\r\n            if (recordingLength < minPartLength)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var subpartsCount = (int)recordingLength / minPartLength;\r\n            var uploadingBufferSize = Math.Min(maxPartLength, subpartsCount * minPartLength);\r\n            var uploadingBuffer = new byte[uploadingBufferSize];\r\n\r\n            try\r\n            {\r\n                using (var fileStream = File.Open(fullFilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))\r\n                {\r\n                    fileStream.Position = position;\r\n                    fileStream.Read(uploadingBuffer, 0, uploadingBufferSize);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"read file \" + fullFilePath + \" exception \" + ex);\r\n                return null;\r\n            }\r\n\r\n            return new UploadablePart(null, new TLInt(partId), uploadingBuffer, position, uploadingBufferSize);\r\n        }\r\n#endif\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            base.OnNavigatedTo(e);\r\n\r\n            if (Execute.InDesignMode) return;\r\n            // Initialize the video recorder.\r\n\r\n            CameraButtons.ShutterKeyPressed += OnShutterKeyPressed;\r\n\r\n            ThreadPool.QueueUserWorkItem(state => Deployment.Current.Dispatcher.BeginInvoke(InitializeVideoRecorder));\r\n        }\r\n\r\n        public void InitializeVideoRecorder()\r\n        {\r\n            if (_captureSource == null)\r\n            {\r\n                // Create the VideoRecorder objects.\r\n                _captureSource = new CaptureSource();\r\n                _captureSource.VideoCaptureDevice.DesiredFormat = GetDesiredFormat();\r\n                _fileSink = new FileSink();\r\n                _videoCaptureDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice();\r\n\r\n                // Add eventhandlers for _captureSource.\r\n                _captureSource.CaptureFailed += OnCaptureFailed;\r\n                _captureSource.CaptureImageCompleted += OnThumbCompleted;\r\n                // Initialize the camera if it exists on the device.\r\n\r\n                if (_videoCaptureDevice != null)\r\n                {\r\n                    // Create the VideoBrush for the viewfinder.\r\n                    //ViewfinderBrush = new VideoBrush();\r\n                    //ViewfinderBrush.Transform = new CompositeTransform{CenterX = 0.5, CenterY = 0.5};\r\n                    ViewfinderBrush.SetSource(_captureSource);\r\n\r\n                    // Display the viewfinder image on the rectangle.\r\n                    Viewfinder.Fill = ViewfinderBrush;\r\n\r\n                    // Start video capture and display it on the viewfinder.\r\n                    _captureSource.Start();\r\n\r\n                    // Set the button state and the message.\r\n                    UpdateUI(ButtonState.Initialized, AppResources.TapRecordToStartRecording);\r\n                }\r\n                else\r\n                {\r\n                    // Disable buttons when the camera is not supported by the device.\r\n                    UpdateUI(ButtonState.CameraNotSupported, AppResources.ACameraIsNotSupportedOnThisDevice);\r\n                }\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            CameraButtons.ShutterKeyPressed -= OnShutterKeyPressed;\r\n\r\n            base.OnNavigatingFrom(e);\r\n        }\r\n\r\n        private void OnShutterKeyPressed(object sender, System.EventArgs e)\r\n        {\r\n            UIElement_OnTap(sender, null);\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n            // Dispose of camera and media objects.\r\n            ThreadPool.QueueUserWorkItem(state => Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                DisposeVideoPlayer();\r\n                DisposeVideoRecorder();\r\n            }));\r\n\r\n            base.OnNavigatedFrom(e);\r\n        }\r\n\r\n        private void DisposeVideoRecorder()\r\n        {\r\n            if (_captureSource != null)\r\n            {\r\n                // Stop _captureSource if it is running.\r\n                if (_captureSource.VideoCaptureDevice != null\r\n                    && _captureSource.State == CaptureState.Started)\r\n                {\r\n                    _captureSource.Stop();\r\n                }\r\n\r\n                // Remove the event handlers for capturesource and the shutter button.\r\n                _captureSource.CaptureFailed -= OnCaptureFailed;\r\n                _captureSource.CaptureImageCompleted -= OnThumbCompleted;\r\n                // Remove the video recording objects.\r\n                _captureSource = null;\r\n                _videoCaptureDevice = null;\r\n                _fileSink = null;\r\n                ViewfinderBrush = null;\r\n            }\r\n        }\r\n\r\n        private void DisposeVideoPlayer()\r\n        {\r\n            //if (VideoPlayer != null)\r\n            //{\r\n            //    // Stop the VideoPlayer MediaElement.\r\n            //    VideoPlayer.Stop();\r\n\r\n            //    // Remove playback objects.\r\n            //    VideoPlayer.Source = null;\r\n            //    _fileStream = null;\r\n\r\n            //    // Remove the event handler.\r\n            //    VideoPlayer.MediaEnded -= VideoPlayerMediaEnded;\r\n            //}\r\n        }\r\n\r\n        // If recording fails, display an error message.\r\n        private void OnCaptureFailed(object sender, ExceptionRoutedEventArgs e)\r\n        {\r\n            Dispatcher.BeginInvoke(delegate()\r\n            {\r\n                DebugText.Text = AppResources.Error.ToUpperInvariant() + \": \" + e.ErrorException.Message;\r\n            });\r\n        }\r\n\r\n        // Display the viewfinder when playback ends.\r\n        public void VideoPlayerMediaEnded(object sender, RoutedEventArgs e)\r\n        {\r\n            // Remove the playback objects.\r\n            DisposeVideoPlayer();\r\n\r\n            StartVideoPreview();\r\n        }\r\n\r\n\r\n        // Set the recording state: display the video on the viewfinder.\r\n        private void StartVideoPreview()\r\n        {\r\n            ThreadPool.QueueUserWorkItem(state =>\r\n            {\r\n                Thread.Sleep(100);\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    try\r\n                    {\r\n                        // Display the video on the viewfinder.\r\n                        if (_captureSource.VideoCaptureDevice != null\r\n                        && _captureSource.State == CaptureState.Stopped)\r\n                        {\r\n                            // Add _captureSource to videoBrush.\r\n                            //ViewfinderBrush = new VideoBrush();\r\n                            //ViewfinderBrush.Transform = new CompositeTransform { CenterX = 0.5, CenterY = 0.5 };\r\n                            ViewfinderBrush.SetSource(_captureSource);\r\n\r\n                            // Add videoBrush to the visual tree.\r\n                            //Viewfinder.Fill = ViewfinderBrush;\r\n\r\n                            _captureSource.Start();\r\n\r\n                            // Set the button states and the message.\r\n                            UpdateUI(ButtonState.Ready, AppResources.ReadyToRecord);\r\n                        }\r\n                    }\r\n                    // If preview fails, display an error.\r\n                    catch (Exception e)\r\n                    {\r\n                        DebugText.Text = AppResources.Error.ToUpperInvariant() + \": \" + e.Message;\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n        // Update the buttons and text on the UI thread based on app state.\r\n        private void UpdateUI(ButtonState currentButtonState, string statusMessage)\r\n        {\r\n            // Run code on the UI thread.\r\n            Dispatcher.BeginInvoke(delegate\r\n            {\r\n\r\n                switch (currentButtonState)\r\n                {\r\n                    // When the camera is not supported by the device.\r\n                    case ButtonState.CameraNotSupported:\r\n                        ApplicationBar.IsVisible = false;\r\n                        _startRecordingButton.IsEnabled = false;\r\n                        _attachButton.IsEnabled = false;\r\n                        _cancelButton.IsEnabled = false;\r\n                        _stopRecordingPlaybackButton.IsEnabled = false;\r\n                        _startPlaybackButton.IsEnabled = false;\r\n                        _pausePlaybackButton.IsEnabled = false;\r\n                        break;\r\n\r\n                    // First launch of the application, so no video is available.\r\n                    case ButtonState.Initialized:\r\n                        ApplicationBar.IsVisible = false;\r\n                        _startRecordingButton.IsEnabled = true;\r\n                        _attachButton.IsEnabled = false;\r\n                        _cancelButton.IsEnabled = false;\r\n                        _stopRecordingPlaybackButton.IsEnabled = false;\r\n                        _startPlaybackButton.IsEnabled = false;\r\n                        _pausePlaybackButton.IsEnabled = false;\r\n                        break;\r\n\r\n                    // Ready to record, so video is available for viewing.\r\n                    case ButtonState.Ready:\r\n                        ApplicationBar.IsVisible = true;\r\n                        _startRecordingButton.IsEnabled = true;\r\n                        _attachButton.IsEnabled = true;\r\n                        _cancelButton.IsEnabled = true;\r\n                        _stopRecordingPlaybackButton.IsEnabled = false;\r\n                        _startPlaybackButton.IsEnabled = true;\r\n                        _pausePlaybackButton.IsEnabled = false;\r\n                        break;\r\n\r\n                    // Video recording is in progress.\r\n                    case ButtonState.Recording:\r\n                        ApplicationBar.IsVisible = false;\r\n                        _startRecordingButton.IsEnabled = false;\r\n                        _attachButton.IsEnabled = false;\r\n                        _cancelButton.IsEnabled = false;\r\n                        _stopRecordingPlaybackButton.IsEnabled = true;\r\n                        _startPlaybackButton.IsEnabled = false;\r\n                        _pausePlaybackButton.IsEnabled = false;\r\n                        break;\r\n\r\n                    // Video playback is in progress.\r\n                    case ButtonState.Playback:\r\n                        ApplicationBar.IsVisible = true;\r\n                        _startRecordingButton.IsEnabled = false;\r\n                        _attachButton.IsEnabled = true;\r\n                        _cancelButton.IsEnabled = true;\r\n                        _stopRecordingPlaybackButton.IsEnabled = true;\r\n                        _startPlaybackButton.IsEnabled = false;\r\n                        _pausePlaybackButton.IsEnabled = true;\r\n                        break;\r\n\r\n                    // Video playback has been paused.\r\n                    case ButtonState.Paused:\r\n                        ApplicationBar.IsVisible = true;\r\n                        _startRecordingButton.IsEnabled = false;\r\n                        _attachButton.IsEnabled = true;\r\n                        _cancelButton.IsEnabled = true;\r\n                        _stopRecordingPlaybackButton.IsEnabled = true;\r\n                        _startPlaybackButton.IsEnabled = true;\r\n                        _pausePlaybackButton.IsEnabled = false;\r\n                        break;\r\n\r\n                    default:\r\n                        break;\r\n                }\r\n\r\n                // Display a message.\r\n                DebugText.Text = statusMessage;\r\n\r\n                // Note the current application state.\r\n                _currentAppState = currentButtonState;\r\n            });\r\n        }\r\n\r\n\r\n        private void StopPlaybackRecording_Click(object sender, System.EventArgs e)\r\n        {\r\n            Timer.Opacity = 1.0;\r\n            // Avoid duplicate taps.\r\n            _stopRecordingPlaybackButton.IsEnabled = false;\r\n\r\n            // Stop during video recording.\r\n            if (_currentAppState == ButtonState.Recording)\r\n            {\r\n                StopVideoRecording();\r\n\r\n                // Set the button state and the message.\r\n                UpdateUI(ButtonState.NoChange, AppResources.PressBackKeyToSendVideo);\r\n\r\n                ViewModel.VideoIsoFile = _videoFileName;\r\n            }\r\n\r\n            // Stop during video playback.\r\n            else\r\n            {\r\n                // Remove playback objects.\r\n                DisposeVideoPlayer();\r\n\r\n                StartVideoPreview();\r\n\r\n                // Set the button state and the message.\r\n                UpdateUI(ButtonState.NoChange, AppResources.PlaybackStoped);\r\n\r\n                ViewModel.VideoIsoFile = string.Empty;\r\n            }\r\n        }\r\n\r\n        // Set the recording state: stop recording.\r\n        private void StopVideoRecording()\r\n        {\r\n            //var partsInfo = new StringBuilder();\r\n            //foreach (var part in _uploadableParts)\r\n            //{\r\n            //    partsInfo.AppendLine(part.ToString());\r\n            //}\r\n            //Deployment.Current.Dispatcher.BeginInvoke(() => MessageBox.Show(partsInfo.ToString()));\r\n\r\n            ViewModel.Duration = _timerCounter;\r\n            //var totalSeconds = \r\n            try\r\n            {\r\n\r\n                // Stop recording.\r\n                if (_captureSource.VideoCaptureDevice != null\r\n                && _captureSource.State == CaptureState.Started)\r\n                {\r\n                    _timer.Stop();\r\n                    _captureSource.Stop();\r\n\r\n                    // Disconnect _fileSink.\r\n                    _fileSink.CaptureSource = null;\r\n                    _fileSink.IsolatedStorageFileName = null;\r\n\r\n                    // Set the button states and the message.\r\n                    UpdateUI(ButtonState.NoChange, AppResources.PreparingViewfinder);\r\n\r\n                    StartVideoPreview();\r\n                }\r\n            }\r\n            // If stop fails, display an error.\r\n            catch (Exception e)\r\n            {\r\n                this.Dispatcher.BeginInvoke(delegate()\r\n                {\r\n                    DebugText.Text = AppResources.Error.ToUpperInvariant() + \": \" + e.Message;\r\n                });\r\n            }\r\n        }\r\n\r\n        private void StartRecording_Click(object sender, System.EventArgs e)\r\n        {\r\n            Timer.Opacity = 0.3;\r\n            // Avoid duplicate taps.\r\n            _startRecordingButton.IsEnabled = false;\r\n\r\n            StartVideoRecording();\r\n        }\r\n\r\n        // Set recording state: start recording.\r\n        private void StartVideoRecording()\r\n        {\r\n            _fileId = TLLong.Random();\r\n            _isPartReady = true;\r\n            _uploadingLength = 0;\r\n            _uploadableParts.Clear();\r\n\r\n            try\r\n            {\r\n                // Connect _fileSink to _captureSource.\r\n                if (_captureSource.VideoCaptureDevice != null\r\n                    && _captureSource.State == CaptureState.Started)\r\n                {\r\n                    _captureSource.Stop();\r\n                    Viewfinder.Fill = new SolidColorBrush(Colors.Black);\r\n                    // Connect the input and output of _fileSink.\r\n                    _fileSink.CaptureSource = _captureSource;\r\n                    _fileSink.IsolatedStorageFileName = _videoFileName;\r\n                }\r\n\r\n\r\n                ThreadPool.QueueUserWorkItem(state =>\r\n                {\r\n                    Thread.Sleep(100);\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        try\r\n                        {\r\n\r\n                            // Begin recording.\r\n                            if (_captureSource.VideoCaptureDevice != null\r\n                                && _captureSource.State == CaptureState.Stopped)\r\n                            {\r\n                                Viewfinder.Fill = null;\r\n                                _captureSource.Start();\r\n                                Viewfinder.Fill = ViewfinderBrush;\r\n                                _timerCounter = 0;\r\n                                _startTime = DateTime.Now;\r\n                                _timer.Start();\r\n                            }\r\n\r\n                            _captureSource.CaptureImageAsync();\r\n\r\n                            // Set the button states and the message.\r\n                            UpdateUI(ButtonState.Recording, AppResources.Recording);\r\n\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            DebugText.Text = AppResources.Error.ToUpperInvariant() + \": \" + e.Message;\r\n                        }\r\n                    });\r\n                });\r\n\r\n\r\n            }\r\n\r\n            // If recording fails, display an error.\r\n            catch (Exception e)\r\n            {\r\n                DebugText.Text = AppResources.Error.ToUpperInvariant() + \": \" + e.Message;\r\n            }\r\n        }\r\n\r\n        private VideoFormat GetDesiredFormat()\r\n        {\r\n            return _captureSource.VideoCaptureDevice.SupportedFormats.FirstOrDefault(format => format.PixelWidth == 640 && format.PixelHeight == 480);\r\n        }\r\n\r\n        private void OnThumbCompleted(object sender, CaptureImageCompletedEventArgs e)\r\n        {\r\n            var snapShot = e.Result;\r\n            using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var file = storage.OpenFile(_videoFileName + \".jpg\", FileMode.OpenOrCreate, FileAccess.Write))\r\n                {\r\n                    snapShot.SaveJpeg(file, 90, 67, 0, 70);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void StartPlayback_Click(object sender, System.EventArgs e)\r\n        {\r\n            // Avoid duplicate taps.\r\n            _startPlaybackButton.IsEnabled = false;\r\n\r\n            // Start video playback when the file stream exists.\r\n            if (_fileStream != null)\r\n            {\r\n                // VideoPlayer.Play();\r\n            }\r\n            // Start the video for the first time.\r\n            else\r\n            {\r\n                // Stop the capture source.\r\n                _captureSource.Stop();\r\n\r\n                // Remove VideoBrush from the tree.\r\n                //Viewfinder.Fill = null;\r\n\r\n                // Create the file stream and attach it to the MediaElement.\r\n                _fileStream = new IsolatedStorageFileStream(_videoFileName,\r\n                                        FileMode.Open, FileAccess.Read,\r\n                                        IsolatedStorageFile.GetUserStoreForApplication());\r\n\r\n                //VideoPlayer.SetSource(_fileStream);\r\n\r\n                // Add an event handler for the end of playback.\r\n                //VideoPlayer.MediaEnded += new RoutedEventHandler(VideoPlayerMediaEnded);\r\n\r\n                // Start video playback.\r\n                //VideoPlayer.Play();\r\n            }\r\n\r\n            // Set the button state and the message.\r\n            UpdateUI(ButtonState.Playback, AppResources.PlaybackStarted);\r\n        }\r\n\r\n        private void PausePlayback_Click(object sender, System.EventArgs e)\r\n        {\r\n            // Avoid duplicate taps.\r\n            _pausePlaybackButton.IsEnabled = false;\r\n\r\n            // If mediaElement exists, pause playback.\r\n            //if (VideoPlayer != null)\r\n            {\r\n                //VideoPlayer.Pause();\r\n            }\r\n\r\n            // Set the button state and the message.\r\n            UpdateUI(ButtonState.Paused, AppResources.PlaybackPaused);\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            if (_stopRecordingPlaybackButton.IsEnabled)\r\n            {\r\n                StopPlaybackRecording_Click(this, null);\r\n                e.Cancel = true;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (!string.IsNullOrEmpty(ViewModel.VideoIsoFile))\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_startRecordingButton.IsEnabled)\r\n            {\r\n                StartRecording_Click(sender, e);\r\n            }\r\n            else if (_stopRecordingPlaybackButton.IsEnabled)\r\n            {\r\n                StopPlaybackRecording_Click(sender, e);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Media/VideoPlayerView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.VideoPlayerView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Landscape\" Orientation=\"Landscape\"\r\n    BackKeyPress=\"VideoPlayerView_OnBackKeyPress\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"False\">\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <MediaElement AutoPlay=\"True\" x:Name=\"MediaElement\"/>\r\n        <!--<Button Content=\"Play\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Center\" Click=\"ButtonBase_OnClick\"/>-->\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Media/VideoPlayerView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Windows;\r\nusing TelegramClient.ViewModels.Media;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class VideoPlayerView\r\n    {\r\n        public VideoPlayerViewModel ViewModel\r\n        {\r\n            get { return DataContext as VideoPlayerViewModel; }\r\n        }\r\n\r\n\r\n        public VideoPlayerView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    using (var stream = new IsolatedStorageFileStream(ViewModel.IsoFileName, FileMode.Open, FileAccess.Read, FileShare.Read, store))\r\n                    //using (var stream = new IsolatedStorageFileStream(ViewModel.IsoFileName, FileMode.Open, FileAccess.Read, store))\r\n                    {\r\n                        MediaElement.SetSource(stream);\r\n                        //MediaElement.Play();\r\n                    }\r\n                }\r\n            };\r\n        }\r\n\r\n        private void VideoPlayerView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            // see whole code from original question.................\r\n\r\n            //MediaElement.Visibility = Visibility.Collapsed;\r\n            MediaElement.Source = null; // added this line\r\n            MediaElement = null;\r\n\r\n            //..................\r\n\r\n        }\r\n\r\n        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            MediaElement.Play();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Search/SearchContactsView.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Search.SearchContactsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"True\" IsVisible=\"{Binding IsWorking}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <navigation:AnimatedBasePage.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"TextTemplate\">\r\n                <Grid Margin=\"18,12,18,25\">\r\n                    <TextBlock VerticalAlignment=\"Center\" Margin=\"0\" Text=\"{Binding Text}\" FontSize=\"35\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"GlobalUserItemTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"18,0,18,24\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTextBlockTap\" micro:Message.Attach=\"[Event Tap] = [Action UserAction($DataContext)]\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"72\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <views:ConversationTileControl\r\n                            Size=\"72\" Margin=\"0\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"2,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <Grid Grid.Row=\"0\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <TextBlock\r\n                                    navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                    Margin=\"14,-6,0,0\"\r\n                                    Text=\"{Binding FullName2}\"\r\n                                    FontSize=\"27\"\r\n                                    MaxHeight=\"36\"\r\n                                    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                                    Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n\r\n                                <Image \r\n                                    Width=\"19\" Height=\"19\"\r\n                                    Grid.Column=\"1\" \r\n                                    Visibility=\"{Binding IsVerified, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"\r\n                                    HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                                    Margin=\"6,0,0,5\"\r\n                                    Source=\"/Images/W10M/ic_verification_2x.png\" Stretch=\"UniformToFill\"/>\r\n                            </Grid>\r\n\r\n                            <StackPanel Grid.Row=\"1\" Margin=\"15,2,0,0\" Orientation=\"Horizontal\">\r\n                                <TextBlock Text=\"@\" Margin=\"0\" Foreground=\"{StaticResource TelegramAccentBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                <controls:HighlightingTextBlock\r\n                                    HighlightBrush=\"{StaticResource TelegramAccentBrush}\" \r\n                                    HighlightText=\"{Binding DataContext.Text, ElementName=Self}\" \r\n                                    Text=\"{Binding UserName}\">\r\n                                    <controls:HighlightingTextBlock.TextBlockStyle>\r\n                                        <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                                            <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                        </Style>\r\n                                    </controls:HighlightingTextBlock.TextBlockStyle>\r\n                                </controls:HighlightingTextBlock>\r\n                            </StackPanel>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"HighlightableUserItemTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"12,12,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnHighlightingTextBlockTap\" micro:Message.Attach=\"[Event Tap] = [Action UserAction($DataContext)]\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"72\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <views:ConversationTileControl\r\n                            Size=\"72\" Margin=\"0\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"2,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <Grid Grid.Row=\"0\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <controls:HighlightingTextBlock Grid.Column=\"0\"\r\n                                        navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                        HorizontalAlignment=\"Left\"\r\n                                        Margin=\"14,-6,0,0\"\r\n                                        HighlightBrush=\"{StaticResource TelegramAccentBrush}\" \r\n                                        HighlightText=\"{Binding DataContext.Text, ElementName=Self}\"\r\n                                        UseTransliteration=\"True\"\r\n                                        Text=\"{Binding FullName2}\"\r\n                                        FontSize=\"27\">\r\n                                    <controls:HighlightingTextBlock.TextBlockStyle>\r\n                                        <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextLargeStyle}\">\r\n                                            <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                            <Setter Property=\"FontSize\" Value=\"27\"/>\r\n                                            <Setter Property=\"MaxHeight\" Value=\"36\"/>\r\n                                        </Style>\r\n                                    </controls:HighlightingTextBlock.TextBlockStyle>\r\n                                </controls:HighlightingTextBlock>\r\n\r\n                                <Image \r\n                                    Width=\"19\" Height=\"19\"\r\n                                    Grid.Column=\"1\" \r\n                                    Visibility=\"{Binding IsVerified, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"\r\n                                    HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                                    Margin=\"6,0,0,5\"\r\n                                    Source=\"/Images/W10M/ic_verification_2x.png\" Stretch=\"UniformToFill\"/>\r\n                            </Grid>\r\n\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n\r\n            <templateSelectors:SearchContactsTemplateSelector \r\n                x:Key=\"SearchContactsTemplateSelector\" \r\n                ContactTemplate=\"{StaticResource HighlightableUserItemTemplate}\"\r\n                UserStatusTemplate=\"{StaticResource HighlightableUserItemTemplate}\"\r\n                UserUsernameTemplate=\"{StaticResource GlobalUserItemTemplate}\"\r\n                TextTemplate=\"{StaticResource TextTemplate}\"/>\r\n        </ResourceDictionary>\r\n    </navigation:AnimatedBasePage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel x:Name=\"TitlePanel\" Grid.Row=\"0\" Margin=\"3,29,3,0\">\r\n            <controls:WatermarkedTextBox x:Name=\"SearchBox\" Text=\"{Binding Text, Mode=TwoWay}\" Watermark=\"{Binding Resources.SearchAmongYourContacts, Source={StaticResource Strings}}\" Style=\"{StaticResource W10MWatermarkedTextBoxStyle}\">\r\n                <controls:WatermarkedTextBox.InputScope>\r\n                    <InputScope>\r\n                        <InputScopeName NameValue=\"Search\"/>\r\n                    </InputScope>\r\n                </controls:WatermarkedTextBox.InputScope>\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls:WatermarkedTextBox>\r\n        </StackPanel>\r\n\r\n        <controls:LazyListBox Grid.Row=\"1\" Margin=\"12,0,-12,0\" x:Name=\"Items\" ScrollingStateChanged=\"Items_OnScrollingStateChanged\" IsHitTestVisible=\"{Binding IsNotWorking}\">\r\n            <controls:LazyListBox.ItemTemplate>\r\n                <DataTemplate>\r\n                    <ContentControl \r\n                        HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" \r\n                        Content=\"{Binding}\" ContentTemplate=\"{Binding Converter={StaticResource SearchContactsTemplateSelector}}\" />\r\n                </DataTemplate>\r\n            </controls:LazyListBox.ItemTemplate>\r\n        </controls:LazyListBox>\r\n        <TextBlock Grid.Row=\"1\" Margin=\"24,0\" Text=\"{Binding Status}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n\r\n        <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Visibility=\"{Binding ProgressVisibility}\">\r\n            <Border Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.5\"/>\r\n            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\">\r\n                <Border Margin=\"-6\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"1\"/>\r\n                <TextBlock Margin=\"6,0\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" FontSize=\"20\" Text=\"{Binding Resources.Loading, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n            </Grid>\r\n        </Grid>\r\n        \r\n        <ContentControl Grid.Row=\"0\" Grid.RowSpan=\"2\" x:Name=\"Confirmation\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" />\r\n    </Grid>\r\n\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Search/SearchContactsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Search;\r\n\r\nnamespace TelegramClient.Views.Search\r\n{\r\n    public partial class SearchContactsView : IDisposable\r\n    {\r\n        private readonly IDisposable _keyPressSubscription;\r\n\r\n        public SearchContactsViewModel ViewModel\r\n        {\r\n            get { return DataContext as SearchContactsViewModel; }\r\n        }\r\n\r\n        public SearchContactsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n            AnimationContext = LayoutRoot;\r\n\r\n            var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                keh => { SearchBox.TextChanged += keh; },\r\n                keh => { SearchBox.TextChanged -= keh; });\r\n\r\n            _keyPressSubscription = keyPressEvents\r\n                .Throttle(TimeSpan.FromSeconds(0.10))\r\n                .ObserveOnDispatcher()\r\n                .Subscribe(e => ViewModel.Search());\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n\r\n            Unloaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsWorking))\r\n            {\r\n                if (!ViewModel.IsWorking)\r\n                {\r\n                    RestoreTapedItem();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void RestoreTapedItem()\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                if (_lastTapedItem != null)\r\n                {\r\n                    _lastStoryboard.Stop();\r\n                }\r\n\r\n                _lastTapedItem.Opacity = 1.0;\r\n                var compositeTransform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (compositeTransform != null)\r\n                {\r\n                    compositeTransform.TranslateX = 0.0;\r\n                    compositeTransform.TranslateY = 0.0;\r\n                }\r\n            }\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SlideUpAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        protected override void AnimationsComplete(AnimationType animationType)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                if (string.IsNullOrEmpty(ViewModel.Text))\r\n                {\r\n                    SearchBox.Focus();\r\n                }\r\n            }\r\n\r\n            base.AnimationsComplete(animationType);\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                _lastTapedItem.Opacity = 1.0;\r\n                var compositeTransform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (compositeTransform != null)\r\n                {\r\n                    compositeTransform.TranslateX = 0.0;\r\n                    compositeTransform.TranslateY = 0.0;\r\n                }\r\n            }\r\n\r\n            if (ViewModel.Confirmation.IsOpen)\r\n            {\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.NavigateToSecretChat && ViewModel.Contact != null)\r\n            {\r\n                ViewModel.CancelSecretChat();\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            base.OnNavigatingFrom(e);\r\n\r\n            if (!e.Cancel && e.Uri.OriginalString != \"app://external/\")\r\n            {\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation);\r\n\r\n                storyboard.Begin();\r\n            }\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _keyPressSubscription.Dispose();\r\n        }\r\n\r\n        private FrameworkElement _lastTapedItem;\r\n\r\n        private Storyboard _lastStoryboard;\r\n\r\n        private void MainItemGrid_OnTextBlockTap(object sender, GestureEventArgs args)\r\n        {\r\n            MainItem_OnTapCommon<TextBlock>(sender, args);\r\n        }\r\n\r\n        private void MainItemGrid_OnHighlightingTextBlockTap(object sender, GestureEventArgs args)\r\n        {\r\n            MainItem_OnTapCommon<HighlightingTextBlock>(sender, args);\r\n        }\r\n\r\n        private void MainItem_OnTapCommon<T>(object sender, GestureEventArgs args) \r\n            where T : FrameworkElement\r\n        {\r\n            if (!ViewModel.NavigateToDialogDetails && !ViewModel.NavigateToSecretChat) return;\r\n\r\n            _lastTapedItem = sender as FrameworkElement;\r\n\r\n            if (_lastTapedItem != null)\r\n            {\r\n                //foreach (var descendant in _lastTapedItem.GetVisualDescendants().OfType<T>())\r\n                //{\r\n                //    if (GetIsAnimationTarget(descendant))\r\n                //    {\r\n                //        _lastTapedItem = descendant;\r\n                //        break;\r\n                //    }\r\n                //}\r\n\r\n                if (!(_lastTapedItem.RenderTransform is CompositeTransform))\r\n                {\r\n                    _lastTapedItem.RenderTransform = new CompositeTransform();\r\n                }\r\n\r\n                var tapedItemContainer = _lastTapedItem.FindParentOfType<ListBoxItem>();\r\n                if (tapedItemContainer != null)\r\n                {\r\n                    tapedItemContainer = tapedItemContainer.FindParentOfType<ListBoxItem>();\r\n                }\r\n\r\n                _lastStoryboard = ShellView.StartContinuumForwardOutAnimation(_lastTapedItem, tapedItemContainer);\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                var transform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (transform != null)\r\n                {\r\n                    transform.TranslateX = 0.0;\r\n                    transform.TranslateY = 0.0;\r\n                }\r\n                _lastTapedItem.Opacity = 1.0;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        private void Items_OnScrollingStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            if (e.NewValue)\r\n            {\r\n                var focusElement = FocusManager.GetFocusedElement();\r\n                if (focusElement == SearchBox)\r\n                {\r\n                    Self.Focus();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Search/SearchDialogsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Search.SearchDialogsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"DialogTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"0,0,24,-12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        \r\n                        <Grid Margin=\"12,12,0,12\" Grid.RowSpan=\"2\" Height=\"62\" Width=\"62\">\r\n                            <Border Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n                            <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                            <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                        </Grid>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <controls:HighlightingTextBlock Grid.Column=\"0\"\r\n                                                    navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                                    HorizontalAlignment=\"Left\"\r\n                                                    Margin=\"14,-6,0,0\"\r\n                                                    MaxHeight=\"42.56\"\r\n                                                    HighlightBrush=\"{StaticResource PhoneAccentBrush}\" \r\n                                                    HighlightText=\"{Binding DataContext.Text, ElementName=Self}\" \r\n                                                    Text=\"{Binding FullName}\">\r\n                                    <controls:HighlightingTextBlock.TextBlockStyle>\r\n                                        <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextLargeStyle}\">\r\n                                            <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                        </Style>\r\n                                    </controls:HighlightingTextBlock.TextBlockStyle>\r\n                                </controls:HighlightingTextBlock>\r\n                                <Border Grid.Column=\"1\" Background=\"Transparent\" VerticalAlignment=\"Bottom\" Margin=\"8,-2,0,3\" Visibility=\"{Binding Dialog.UnreadCount, Converter={StaticResource UnreadCountToVisibilityConverter}}\">\r\n                                    <TextBlock Margin=\"0,1\" Text=\"{Binding Dialog.UnreadCount}\" Foreground=\"{StaticResource PhoneAccentBrush}\" LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n            </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid Background=\"Transparent\" Margin=\"0,-25,-12,0\">\r\n        <controls:LazyListBox \r\n            x:Name=\"Items\"\r\n            ItemTemplate=\"{StaticResource DialogTemplate}\"\r\n            IsScrolling=\"{Binding IsScrolling, Mode=TwoWay}\"\r\n            ScrollingStateChanged=\"Items_OnScrollingStateChanged\"\r\n            Style=\"{StaticResource LazyListBoxStyle}\">\r\n            <controls:LazyListBox.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel/>\r\n                </ItemsPanelTemplate>\r\n            </controls:LazyListBox.ItemsPanel>\r\n        </controls:LazyListBox>\r\n        <TextBlock Text=\"{Binding Status}\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Search/SearchDialogsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.ViewModels.Search;\r\n\r\nnamespace TelegramClient.Views.Search\r\n{\r\n    public partial class SearchDialogsView\r\n    {\r\n        public SearchDialogsViewModel ViewModel\r\n        {\r\n            get { return DataContext as SearchDialogsViewModel; }\r\n        }\r\n\r\n        public SearchDialogsView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private FrameworkElement _lastTapedItem;\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            var obj = frameworkElement.DataContext as TLObject;\r\n            if (obj == null) return;\r\n\r\n            if (!ViewModel.OpenDialogDetails(obj))\r\n            {\r\n                return;\r\n            }\r\n\r\n            _lastTapedItem = sender as FrameworkElement;\r\n\r\n            if (_lastTapedItem != null)\r\n            {\r\n                //foreach (var descendant in _lastTapedItem.GetVisualDescendants().OfType<HighlightingTextBlock>())\r\n                //{\r\n                //    if (AnimatedBasePage.GetIsAnimationTarget(descendant))\r\n                //    {\r\n                //        _lastTapedItem = descendant;\r\n                //        break;\r\n                //    }\r\n                //}\r\n\r\n                if (!(_lastTapedItem.RenderTransform is CompositeTransform))\r\n                {\r\n                    _lastTapedItem.RenderTransform = new CompositeTransform();\r\n                }\r\n\r\n                var tapedItemContainer = _lastTapedItem.FindParentOfType<ListBoxItem>();\r\n                if (tapedItemContainer != null)\r\n                {\r\n                    tapedItemContainer = tapedItemContainer.FindParentOfType<ListBoxItem>();\r\n                }\r\n\r\n                SearchShellView.StartContinuumForwardOutAnimation(_lastTapedItem, tapedItemContainer);\r\n            }\r\n        }\r\n\r\n        private void Items_OnScrollingStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            if (e.NewValue)\r\n            {\r\n                var focusElement = FocusManager.GetFocusedElement();\r\n                if (focusElement != null\r\n                    && focusElement.GetType() == typeof(WatermarkedTextBox))\r\n                {\r\n                    Self.Focus();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Search/SearchFilesView.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Search.SearchFilesView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"True\" IsVisible=\"{Binding IsWorking}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n    \r\n    <navigation:AnimatedBasePage.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"FileTemplate\">\r\n                <Grid Margin=\"0,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Loaded=\"DeleteMessage_OnLoaded\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action SaveMedia($DataContext)]\" Header=\"{Binding Resources.Save, Source={StaticResource Strings}}\" \r\n                            Visibility=\"{Binding Self, Converter={StaticResource MediaFileAvailableToVisibilityConverter}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n\r\n                    <dialogs:DocumentTileControl \r\n                        Grid.RowSpan=\"2\" \r\n                        Width=\"64\" Height=\"64\"\r\n                        TileBrush=\"{Binding Media.Document.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        DownloadIconVisibility=\"{Binding Media.Self, Converter={StaticResource DownloadMediaToVisibilityConverter}}\"\r\n                        Text=\"{Binding Media.Document.FileExt, Converter={StaticResource Lowercase}}\"\r\n                        Source=\"{Binding Media.Document, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Music=\"{Binding Media.Document.Music}\"\r\n                        DownloadingProgress=\"{Binding Media.DownloadingProgress}\"\r\n                        UploadingProgress=\"{Binding Media.UploadingProgress}\"/>\r\n\r\n                    <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,6,0\" TextTrimming=\"WordEllipsis\" Text=\"{Binding Media.Document.DocumentName, Converter={StaticResource NonBreakingStringConverter}}\" FontSize=\"27\"/>\r\n                    <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"18,0,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <TextBlock Grid.Column=\"0\" Margin=\"0\" Text=\"{Binding Media.Document.Size.Value, Converter={StaticResource FileSizeConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                        <TextBlock Grid.Column=\"1\" Margin=\"0\" Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' • \\{0\\}'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Background=\"Transparent\"\r\n\t\t\t\t        Visibility=\"{Binding Media.DownloadingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\">\r\n                        <i:Interaction.Triggers>\r\n                            <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                                <micro:ActionMessage MethodName=\"CancelDocumentDownloading\">\r\n                                    <micro:ActionMessage.Parameters>\r\n                                        <micro:Parameter Value=\"{Binding Media}\"/>\r\n                                    </micro:ActionMessage.Parameters>\r\n                                </micro:ActionMessage>\r\n                            </behaviors:HandledEventTrigger>\r\n                        </i:Interaction.Triggers>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Background=\"Transparent\"\r\n\t\t\t\t        Visibility=\"{Binding Media.UploadingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\">\r\n                        <i:Interaction.Triggers>\r\n                            <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                                <micro:ActionMessage MethodName=\"CancelUploading\">\r\n                                    <micro:ActionMessage.Parameters>\r\n                                        <micro:Parameter Value=\"{Binding Media}\"/>\r\n                                    </micro:ActionMessage.Parameters>\r\n                                </micro:ActionMessage>\r\n                            </behaviors:HandledEventTrigger>\r\n                        </i:Interaction.Triggers>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </navigation:AnimatedBasePage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n        <StackPanel x:Name=\"TitlePanel\" Grid.Row=\"0\" Margin=\"12,29,12,12\">\r\n            <controls:WatermarkedTextBox x:Name=\"SearchBox\" InputScope=\"Search\"\r\n                Text=\"{Binding Text, Mode=TwoWay}\" Watermark=\"{Binding Resources.Search, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls:WatermarkedTextBox>\r\n        </StackPanel>\r\n\r\n        <controls:LazyListBox \r\n            Grid.Row=\"1\" \r\n            Margin=\"24,0,0,0\" \r\n            x:Name=\"Items\" \r\n            ScrollingStateChanged=\"Items_OnScrollingStateChanged\" \r\n            IsHitTestVisible=\"{Binding IsNotWorking}\"\r\n            ItemTemplate=\"{StaticResource FileTemplate}\"/>\r\n\r\n        <TextBlock \r\n            Grid.Row=\"1\" Margin=\"24,0\" \r\n            Text=\"{Binding Status}\" \r\n            HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\"\r\n            Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Search/SearchFilesView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Search;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Search\r\n{\r\n    public partial class SearchFilesView\r\n    {\r\n        private readonly IDisposable _keyPressSubscription;\r\n\r\n        public SearchFilesViewModel ViewModel\r\n        {\r\n            get { return DataContext as SearchFilesViewModel; }\r\n        }\r\n\r\n        public SearchFilesView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n\r\n            var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                keh => { SearchBox.TextChanged += keh; },\r\n                keh => { SearchBox.TextChanged -= keh; });\r\n\r\n            _keyPressSubscription = keyPressEvents\r\n                .Throttle(TimeSpan.FromSeconds(0.10))\r\n                .ObserveOnDispatcher()\r\n                .Subscribe(e => ViewModel.Search());\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n\r\n            Unloaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsWorking))\r\n            {\r\n                if (!ViewModel.IsWorking)\r\n                {\r\n                    RestoreTapedItem();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void RestoreTapedItem()\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                if (_lastTapedItem != null)\r\n                {\r\n                    _lastStoryboard.Stop();\r\n                }\r\n\r\n                _lastTapedItem.Opacity = 1.0;\r\n                var compositeTransform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (compositeTransform != null)\r\n                {\r\n                    compositeTransform.TranslateX = 0.0;\r\n                    compositeTransform.TranslateY = 0.0;\r\n                }\r\n            }\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SlideUpAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        protected override void AnimationsComplete(AnimationType animationType)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                if (string.IsNullOrEmpty(ViewModel.Text))\r\n                {\r\n                    SearchBox.Focus();\r\n                }\r\n            }\r\n\r\n            base.AnimationsComplete(animationType);\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                _lastTapedItem.Opacity = 1.0;\r\n                var compositeTransform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (compositeTransform != null)\r\n                {\r\n                    compositeTransform.TranslateX = 0.0;\r\n                    compositeTransform.TranslateY = 0.0;\r\n                }\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            base.OnNavigatingFrom(e);\r\n\r\n            if (!e.Cancel && e.Uri.OriginalString != \"app://external/\")\r\n            {\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation);\r\n\r\n                storyboard.Begin();\r\n            }\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _keyPressSubscription.Dispose();\r\n        }\r\n\r\n        private FrameworkElement _lastTapedItem;\r\n\r\n        private Storyboard _lastStoryboard;\r\n\r\n        private void MainItemGrid_OnTextBlockTap(object sender, System.Windows.Input.GestureEventArgs args)\r\n        {\r\n            MainItem_OnTapCommon<TextBlock>(sender, args);\r\n        }\r\n\r\n        private void MainItemGrid_OnHighlightingTextBlockTap(object sender, System.Windows.Input.GestureEventArgs args)\r\n        {\r\n            MainItem_OnTapCommon<HighlightingTextBlock>(sender, args);\r\n        }\r\n\r\n        private void MainItem_OnTapCommon<T>(object sender, GestureEventArgs args)\r\n            where T : FrameworkElement\r\n        {\r\n            \r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                var transform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (transform != null)\r\n                {\r\n                    transform.TranslateX = 0.0;\r\n                    transform.TranslateY = 0.0;\r\n                }\r\n                _lastTapedItem.Opacity = 1.0;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        private void Items_OnScrollingStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            if (e.NewValue)\r\n            {\r\n                var focusElement = FocusManager.GetFocusedElement();\r\n                if (focusElement == SearchBox)\r\n                {\r\n                    Self.Focus();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void DeleteMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            var channel = ViewModel.CurrentItem as TLChannel;\r\n            menuItem.Visibility = (channel == null || channel.Creator)\r\n                ? Visibility.Visible \r\n                : Visibility.Collapsed;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Search/SearchLinksView.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Search.SearchLinksView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"True\" IsVisible=\"{Binding IsWorking}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n    \r\n    <navigation:AnimatedBasePage.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"LinkTemplate\">\r\n                <Grid Margin=\"0,6,0,6\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width =\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid Width=\"64\" Height=\"64\" Margin=\"0,0,18,0\" Grid.Column=\"0\" Grid.Row=\"0\" VerticalAlignment=\"Top\">\r\n                        <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"{StaticResource PhoneChromeBrush}\"/>\r\n                        <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"{StaticResource PhoneSubtleBrush}\" Text=\"{Binding Converter={StaticResource LinkDefaultTextConverter}}\"/>\r\n                        <Image Source=\"{Binding Media.Self, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=90}\" Stretch=\"UniformToFill\"/>\r\n                    </Grid>\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Margin=\"0\" Grid.Row=\"0\" MaxHeight=\"72\" TextWrapping=\"Wrap\" Text=\"{Binding Converter={StaticResource MessageToWebPageCaptionConverter}}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontSize=\"27\"/>\r\n                        <emojiPanel:TelegramRichTextBox Margin=\"-12,0,0,0\" Grid.Row=\"1\" MaxHeight=\"81\" emojiPanel:BrowserNavigationService.SuppressParsing=\"True\" Text=\"{Binding Media.WebPage.Description}\" Visibility=\"{Binding Media.WebPage.DescriptionVisibility}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"20\" />\r\n                        <ItemsControl Grid.Row=\"2\" ItemsSource=\"{Binding Links}\">\r\n                            <ItemsControl.ItemTemplate>\r\n                                <DataTemplate>\r\n                                    <ListBoxItem toolkit:TiltEffect.SuppressTilt=\"False\">\r\n                                        <TextBlock micro:Message.Attach=\"[Event Tap] = [Action OpenLink($DataContext)]\" TextWrapping=\"NoWrap\" Text=\"{Binding}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" FontSize=\"20\"/>\r\n                                    </ListBoxItem>\r\n                                </DataTemplate>\r\n                            </ItemsControl.ItemTemplate>\r\n                        </ItemsControl>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"EmptyLinkTemplate\">\r\n                <Grid Margin=\"0,6,0,6\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width =\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid Width=\"64\" Height=\"64\" Margin=\"0,0,18,0\" Grid.Column=\"0\" Grid.Row=\"0\" VerticalAlignment=\"Top\">\r\n                        <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"{StaticResource PhoneChromeBrush}\"/>\r\n                        <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"{StaticResource PhoneSubtleBrush}\" Text=\"{Binding Converter={StaticResource LinkDefaultTextConverter}}\"/>\r\n                    </Grid>\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Margin=\"0\" Grid.Row=\"0\" MaxHeight=\"72\" TextWrapping=\"Wrap\" Text=\"{Binding WebPageTitle}\" Visibility=\"{Binding WebPageTitle, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontSize=\"27\"/>\r\n                        <ItemsControl Grid.Row=\"2\" ItemsSource=\"{Binding Links}\">\r\n                            <ItemsControl.ItemTemplate>\r\n                                <DataTemplate>\r\n                                    <ListBoxItem toolkit:TiltEffect.SuppressTilt=\"False\">\r\n                                        <TextBlock micro:Message.Attach=\"[Event Tap] = [Action OpenLink($DataContext)]\" TextWrapping=\"NoWrap\" Text=\"{Binding}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" FontSize=\"20\"/>\r\n                                    </ListBoxItem>\r\n                                </DataTemplate>\r\n                            </ItemsControl.ItemTemplate>\r\n                        </ItemsControl>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <templateSelectors:LinkTemplateSelector\r\n                x:Key=\"LinkTemplateSelector\"\r\n                LinkTemplate=\"{StaticResource LinkTemplate}\"\r\n                EmptyLinkTemplate=\"{StaticResource EmptyLinkTemplate}\"/>\r\n        </ResourceDictionary>\r\n    </navigation:AnimatedBasePage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n        <StackPanel x:Name=\"TitlePanel\" Grid.Row=\"0\" Margin=\"12,29,12,12\">\r\n            <controls:WatermarkedTextBox x:Name=\"SearchBox\" InputScope=\"Search\"\r\n                Text=\"{Binding Text, Mode=TwoWay}\" Watermark=\"{Binding Resources.Search, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls:WatermarkedTextBox>\r\n        </StackPanel>\r\n\r\n        <controls:LazyListBox \r\n            Grid.Row=\"1\" \r\n            Margin=\"24,0,0,0\" \r\n            x:Name=\"Items\"  \r\n            toolkit:TiltEffect.SuppressTilt=\"True\"\r\n            ScrollingStateChanged=\"Items_OnScrollingStateChanged\" \r\n            IsHitTestVisible=\"{Binding IsNotWorking}\">\r\n            <controls:LazyListBox.ItemTemplate>\r\n                <DataTemplate>\r\n                    <ContentControl Margin=\"0,0,24,0\"\r\n                        HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" \r\n                        Content=\"{Binding}\" ContentTemplate=\"{Binding Converter={StaticResource LinkTemplateSelector}}\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Loaded=\"DeleteMessage_OnLoaded\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                    </ContentControl>\r\n                </DataTemplate>\r\n            </controls:LazyListBox.ItemTemplate>\r\n        </controls:LazyListBox>\r\n\r\n        <TextBlock \r\n            Grid.Row=\"1\" Margin=\"24,0\" \r\n            Text=\"{Binding Status}\" \r\n            HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\"\r\n            Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Search/SearchLinksView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Search;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Search\r\n{\r\n    public partial class SearchLinksView\r\n    {\r\n        private readonly IDisposable _keyPressSubscription;\r\n\r\n        public SearchLinksViewModel ViewModel\r\n        {\r\n            get { return DataContext as SearchLinksViewModel; }\r\n        }\r\n\r\n        public SearchLinksView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n\r\n            var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                keh => { SearchBox.TextChanged += keh; },\r\n                keh => { SearchBox.TextChanged -= keh; });\r\n\r\n            _keyPressSubscription = keyPressEvents\r\n                .Throttle(TimeSpan.FromSeconds(0.10))\r\n                .ObserveOnDispatcher()\r\n                .Subscribe(e => ViewModel.Search());\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n\r\n            Unloaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsWorking))\r\n            {\r\n                if (!ViewModel.IsWorking)\r\n                {\r\n                    RestoreTapedItem();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void RestoreTapedItem()\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                if (_lastTapedItem != null)\r\n                {\r\n                    _lastStoryboard.Stop();\r\n                }\r\n\r\n                _lastTapedItem.Opacity = 1.0;\r\n                var compositeTransform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (compositeTransform != null)\r\n                {\r\n                    compositeTransform.TranslateX = 0.0;\r\n                    compositeTransform.TranslateY = 0.0;\r\n                }\r\n            }\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SlideUpAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        protected override void AnimationsComplete(AnimationType animationType)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                if (string.IsNullOrEmpty(ViewModel.Text))\r\n                {\r\n                    SearchBox.Focus();\r\n                }\r\n            }\r\n\r\n            base.AnimationsComplete(animationType);\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                _lastTapedItem.Opacity = 1.0;\r\n                var compositeTransform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (compositeTransform != null)\r\n                {\r\n                    compositeTransform.TranslateX = 0.0;\r\n                    compositeTransform.TranslateY = 0.0;\r\n                }\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            base.OnNavigatingFrom(e);\r\n\r\n            if (!e.Cancel && e.Uri.OriginalString != \"app://external/\")\r\n            {\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation);\r\n\r\n                storyboard.Begin();\r\n            }\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _keyPressSubscription.Dispose();\r\n        }\r\n\r\n        private FrameworkElement _lastTapedItem;\r\n\r\n        private Storyboard _lastStoryboard;\r\n\r\n        private void MainItemGrid_OnTextBlockTap(object sender, System.Windows.Input.GestureEventArgs args)\r\n        {\r\n            MainItem_OnTapCommon<TextBlock>(sender, args);\r\n        }\r\n\r\n        private void MainItemGrid_OnHighlightingTextBlockTap(object sender, System.Windows.Input.GestureEventArgs args)\r\n        {\r\n            MainItem_OnTapCommon<HighlightingTextBlock>(sender, args);\r\n        }\r\n\r\n        private void MainItem_OnTapCommon<T>(object sender, GestureEventArgs args)\r\n            where T : FrameworkElement\r\n        {\r\n            \r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                var transform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (transform != null)\r\n                {\r\n                    transform.TranslateX = 0.0;\r\n                    transform.TranslateY = 0.0;\r\n                }\r\n                _lastTapedItem.Opacity = 1.0;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        private void Items_OnScrollingStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            if (e.NewValue)\r\n            {\r\n                var focusElement = FocusManager.GetFocusedElement();\r\n                if (focusElement == SearchBox)\r\n                {\r\n                    Self.Focus();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void DeleteMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            var channel = ViewModel.CurrentItem as TLChannel;\r\n            menuItem.Visibility = (channel == null || channel.Creator)\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Search/SearchMessagesView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Search.SearchMessagesView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:triggers=\"clr-namespace:Telegram.Controls.Triggers;assembly=Telegram.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"DialogTemplate\">\r\n            <ListBoxItem>\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"0,0,18,-12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" micro:Message.Attach=\"[Event Tap] = [Action OpenDialogDetails($DataContext)]\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <!--Chat tile-->\r\n                    <views:ConversationTileControl \r\n                        Margin=\"12,12,0,7\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                    <!--Message info-->\r\n                    <Grid Grid.Column=\"1\" Grid.ColumnSpan=\"3\" Margin=\"2,0,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <StackPanel Orientation=\"Horizontal\">\r\n                            <TextBlock \r\n                                navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                Margin=\"12,-2,0,-1\" FontSize=\"36.667\" Height=\"48.77\" Text=\"{Binding With, Converter={StaticResource DialogCaptionConverter}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                            <!--<TextBlock VerticalAlignment=\"Bottom\" Margin=\"4,0,0,4\" Opacity=\"0.7\" Text=\"•\" Style=\"{StaticResource PhoneTextLargeStyle}\" Visibility=\"{Binding With.Status, Converter={StaticResource UserStatus}, FallbackValue=Collapsed}\"/>-->\r\n                        </StackPanel>\r\n                        <!--<Border Grid.Column=\"1\" Margin=\"6,0,0,0\" Visibility=\"{Binding UnreadCount.Value, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\" Background=\"{StaticResource PhoneAccentBrush}\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\">\r\n                            <TextBlock Text=\"{Binding UnreadCount}\" Foreground=\"White\" Margin=\"8,3\"/>\r\n                        </Border>-->\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"1\" Grid.Column=\"1\" VerticalAlignment=\"Top\" Margin=\"2,0,0,0\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Height=\"22\"\r\n                               Margin=\"13,0,12,0\"\r\n                               LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\" MaxHeight=\"22\"\r\n                               Text=\"{Binding Self, Converter={StaticResource DialogMessageFromConverter}}\"\r\n                               FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\"\r\n                               Visibility=\"{Binding TopMessage.ShowFrom, Converter={StaticResource BooleanToVisibilityConverter}}\"\r\n                               Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        <TextBlock Grid.Row=\"1\" MinHeight=\"22\" MaxHeight=\"{Binding TopMessage.ShowFrom, Converter={StaticResource ChatToMaxHeight}}\"\r\n                            Margin=\"13,0,0,22\"\r\n                            LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                            Text=\"{Binding Self, Converter={StaticResource DialogToBriefInfo}}\" TextWrapping=\"Wrap\"\r\n                            TextTrimming=\"WordEllipsis\"\r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n                    <StackPanel Grid.Row=\"1\" Grid.Column=\"2\" Grid.ColumnSpan=\"2\" Margin=\"12,0,0,0\" Orientation=\"Horizontal\">\r\n                        <controls1:MessageStatusControl Visibility=\"{Binding TopMessage.Out.Value, Converter={StaticResource BooleanToVisibilityConverter}}\" VerticalAlignment=\"Top\" Height=\"18\"/>\r\n                        <TextBlock Margin=\"12,0,0,0\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\" Text=\"{Binding TopMessage.Date, Converter={StaticResource DialogDateTimeConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" Margin=\"0,-25,-12,0\">\r\n        <controls:LazyListBox \r\n            x:Name=\"Items\"\r\n            ItemTemplate=\"{StaticResource DialogTemplate}\"\r\n            CloseToEndPercent=\"0.1\"\r\n            CloseToEnd=\"Items_OnCloseToEnd\"\r\n            ScrollingStateChanged=\"Items_OnScrollingStateChanged\"\r\n            Style=\"{StaticResource LazyListBoxStyle}\">\r\n            <controls:LazyListBox.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel/>\r\n                </ItemsPanelTemplate>\r\n            </controls:LazyListBox.ItemsPanel>\r\n            <i:Interaction.Triggers>\r\n                <triggers:CompressionTrigger CompressionType=\"Bottom\">\r\n                    <micro:ActionMessage MethodName=\"LoadNextSlice\"/>\r\n                </triggers:CompressionTrigger>\r\n            </i:Interaction.Triggers>\r\n        </controls:LazyListBox>\r\n        <TextBlock Text=\"{Binding Status}\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Search/SearchMessagesView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.ViewModels.Search;\r\n\r\nnamespace TelegramClient.Views.Search\r\n{\r\n    public partial class SearchMessagesView\r\n    {\r\n        public SearchMessagesViewModel ViewModel\r\n        {\r\n            get { return DataContext as SearchMessagesViewModel; }            \r\n        }\r\n\r\n        public SearchMessagesView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private FrameworkElement _lastTapedItem;\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            _lastTapedItem = sender as FrameworkElement;\r\n\r\n            if (_lastTapedItem != null)\r\n            {\r\n                //foreach (var descendant in _lastTapedItem.GetVisualDescendants().OfType<TextBlock>())\r\n                //{\r\n                //    if (AnimatedBasePage.GetIsAnimationTarget(descendant))\r\n                //    {\r\n                //        _lastTapedItem = descendant;\r\n                //        break;\r\n                //    }\r\n                //}\r\n\r\n                if (!(_lastTapedItem.RenderTransform is CompositeTransform))\r\n                {\r\n                    _lastTapedItem.RenderTransform = new CompositeTransform();\r\n                }\r\n\r\n                var tapedItemContainer = _lastTapedItem.FindParentOfType<ListBoxItem>();\r\n                if (tapedItemContainer != null)\r\n                {\r\n                    tapedItemContainer = tapedItemContainer.FindParentOfType<ListBoxItem>();\r\n                }\r\n\r\n                SearchShellView.StartContinuumForwardOutAnimation(_lastTapedItem, tapedItemContainer);\r\n            }\r\n        }\r\n\r\n        private void Items_OnScrollingStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            if (e.NewValue)\r\n            {\r\n                var focusElement = FocusManager.GetFocusedElement();\r\n                if (focusElement != null\r\n                    && focusElement.GetType() == typeof(WatermarkedTextBox))\r\n                {\r\n                    Self.Focus();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.LoadNextSlice();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Search/SearchMusicView.xaml",
    "content": "﻿<navigation:AnimatedBasePage\r\n    x:Class=\"TelegramClient.Views.Search.SearchMusicView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"True\" IsVisible=\"{Binding IsWorking}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <navigation:AnimatedBasePage.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"FileTemplate\">\r\n                <Grid Margin=\"0,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Loaded=\"DeleteMessage_OnLoaded\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action SaveMedia($DataContext)]\" Header=\"{Binding Resources.Save, Source={StaticResource Strings}}\" \r\n                            Visibility=\"{Binding Self, Converter={StaticResource MediaFileAvailableToVisibilityConverter}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n\r\n                    <dialogs:DocumentTileControl \r\n                        Grid.RowSpan=\"2\" \r\n                        Width=\"64\" Height=\"64\" \r\n                        DownloadIconVisibility=\"{Binding Media.Self, Converter={StaticResource DownloadMediaToVisibilityConverter}}\"\r\n                        Text=\"{Binding Media.Document.FileExt, Converter={StaticResource Lowercase}}\"\r\n                        Source=\"{Binding Media.Document, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Music=\"{Binding Media.Document.Music}\"\r\n                        DownloadingProgress=\"{Binding Media.DownloadingProgress}\"\r\n                        UploadingProgress=\"{Binding Media.UploadingProgress}\"/>\r\n\r\n                    <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,6,0\" TextTrimming=\"None\" Text=\"{Binding Media.Document.DocumentName}\" FontSize=\"27\"/>\r\n                    <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"18,0,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <TextBlock Grid.Column=\"0\" Margin=\"0\" Text=\"{Binding Media.Document.Size.Value, Converter={StaticResource FileSizeConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                        <TextBlock Grid.Column=\"1\" Margin=\"0\" Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' • \\{0\\}'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Background=\"Transparent\"\r\n\t\t\t\t        Visibility=\"{Binding Media.DownloadingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\">\r\n                        <i:Interaction.Triggers>\r\n                            <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                                <micro:ActionMessage MethodName=\"CancelDocumentDownloading\">\r\n                                    <micro:ActionMessage.Parameters>\r\n                                        <micro:Parameter Value=\"{Binding Media}\"/>\r\n                                    </micro:ActionMessage.Parameters>\r\n                                </micro:ActionMessage>\r\n                            </behaviors:HandledEventTrigger>\r\n                        </i:Interaction.Triggers>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Background=\"Transparent\"\r\n\t\t\t\t        Visibility=\"{Binding Media.UploadingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\">\r\n                        <i:Interaction.Triggers>\r\n                            <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                                <micro:ActionMessage MethodName=\"CancelUploading\">\r\n                                    <micro:ActionMessage.Parameters>\r\n                                        <micro:Parameter Value=\"{Binding Media}\"/>\r\n                                    </micro:ActionMessage.Parameters>\r\n                                </micro:ActionMessage>\r\n                            </behaviors:HandledEventTrigger>\r\n                        </i:Interaction.Triggers>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </navigation:AnimatedBasePage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n        <StackPanel x:Name=\"TitlePanel\" Grid.Row=\"0\" Margin=\"12,29,12,12\">\r\n            <controls:WatermarkedTextBox x:Name=\"SearchBox\" InputScope=\"Search\"\r\n                Text=\"{Binding Text, Mode=TwoWay}\" Watermark=\"{Binding Resources.Search, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls:WatermarkedTextBox>\r\n        </StackPanel>\r\n\r\n        <controls:LazyListBox \r\n            Grid.Row=\"1\" \r\n            Margin=\"24,0,0,0\" \r\n            x:Name=\"Items\" \r\n            ScrollingStateChanged=\"Items_OnScrollingStateChanged\" \r\n            IsHitTestVisible=\"{Binding IsNotWorking}\"\r\n            ItemTemplate=\"{StaticResource FileTemplate}\"/>\r\n\r\n        <TextBlock \r\n            Grid.Row=\"1\" Margin=\"24,0\" \r\n            Text=\"{Binding Status}\" \r\n            HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\"\r\n            Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n</navigation:AnimatedBasePage>"
  },
  {
    "path": "TelegramClient/Views/Search/SearchMusicView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Animation.Navigation;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Search;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Search\r\n{\r\n    public partial class SearchMusicView\r\n    {\r\n        private readonly IDisposable _keyPressSubscription;\r\n\r\n        public SearchMusicViewModel ViewModel\r\n        {\r\n            get { return DataContext as SearchMusicViewModel; }\r\n        }\r\n\r\n        public SearchMusicView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            AnimationContext = LayoutRoot;\r\n\r\n            var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                keh => { SearchBox.TextChanged += keh; },\r\n                keh => { SearchBox.TextChanged -= keh; });\r\n\r\n            _keyPressSubscription = keyPressEvents\r\n                .Throttle(TimeSpan.FromSeconds(0.10))\r\n                .ObserveOnDispatcher()\r\n                .Subscribe(e => ViewModel.Search());\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n\r\n            Unloaded += (o, e) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsWorking))\r\n            {\r\n                if (!ViewModel.IsWorking)\r\n                {\r\n                    RestoreTapedItem();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void RestoreTapedItem()\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                if (_lastTapedItem != null)\r\n                {\r\n                    _lastStoryboard.Stop();\r\n                }\r\n\r\n                _lastTapedItem.Opacity = 1.0;\r\n                var compositeTransform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (compositeTransform != null)\r\n                {\r\n                    compositeTransform.TranslateX = 0.0;\r\n                    compositeTransform.TranslateY = 0.0;\r\n                }\r\n            }\r\n        }\r\n\r\n        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn\r\n                || animationType == AnimationType.NavigateBackwardIn)\r\n            {\r\n                return new SlideUpAnimator { RootElement = LayoutRoot };\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        protected override void AnimationsComplete(AnimationType animationType)\r\n        {\r\n            if (animationType == AnimationType.NavigateForwardIn)\r\n            {\r\n                if (string.IsNullOrEmpty(ViewModel.Text))\r\n                {\r\n                    SearchBox.Focus();\r\n                }\r\n            }\r\n\r\n            base.AnimationsComplete(animationType);\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                _lastTapedItem.Opacity = 1.0;\r\n                var compositeTransform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (compositeTransform != null)\r\n                {\r\n                    compositeTransform.TranslateX = 0.0;\r\n                    compositeTransform.TranslateY = 0.0;\r\n                }\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            base.OnNavigatingFrom(e);\r\n\r\n            if (!e.Cancel && e.Uri.OriginalString != \"app://external/\")\r\n            {\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation);\r\n\r\n                storyboard.Begin();\r\n            }\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            _keyPressSubscription.Dispose();\r\n        }\r\n\r\n        private FrameworkElement _lastTapedItem;\r\n\r\n        private Storyboard _lastStoryboard;\r\n\r\n        private void MainItemGrid_OnTextBlockTap(object sender, System.Windows.Input.GestureEventArgs args)\r\n        {\r\n            MainItem_OnTapCommon<TextBlock>(sender, args);\r\n        }\r\n\r\n        private void MainItemGrid_OnHighlightingTextBlockTap(object sender, System.Windows.Input.GestureEventArgs args)\r\n        {\r\n            MainItem_OnTapCommon<HighlightingTextBlock>(sender, args);\r\n        }\r\n\r\n        private void MainItem_OnTapCommon<T>(object sender, GestureEventArgs args)\r\n            where T : FrameworkElement\r\n        {\r\n\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                var transform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (transform != null)\r\n                {\r\n                    transform.TranslateX = 0.0;\r\n                    transform.TranslateY = 0.0;\r\n                }\r\n                _lastTapedItem.Opacity = 1.0;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        private void Items_OnScrollingStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            if (e.NewValue)\r\n            {\r\n                var focusElement = FocusManager.GetFocusedElement();\r\n                if (focusElement == SearchBox)\r\n                {\r\n                    Self.Focus();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void DeleteMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            var channel = ViewModel.CurrentItem as TLChannel;\r\n            menuItem.Visibility = (channel == null || channel.Creator)\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Search/SearchShellView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Search.SearchShellView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls\"\r\n    xmlns:tlgControls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:channels=\"clr-namespace:System.ServiceModel.Channels;assembly=System.ServiceModel\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding ActiveItem.IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"DialogTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"0,0,24,-12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" Hold=\"MainItemGrid_OnHold\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <!--Conversation image-->\r\n                        <Grid Margin=\"12,12,0,12\" Grid.RowSpan=\"2\" Height=\"62\" Width=\"62\">\r\n                            <Border Background=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"/>\r\n                            <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"White\" Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                            <Image Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                        </Grid>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <tlgControls:HighlightingTextBlock Grid.Column=\"0\"\r\n                                                    navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                                    HorizontalAlignment=\"Left\"\r\n                                                    Margin=\"14,-6,0,0\"\r\n                                                    MaxHeight=\"42.56\"\r\n                                                    HighlightBrush=\"{StaticResource PhoneAccentBrush}\" \r\n                                                    HighlightText=\"{Binding DataContext.Text, ElementName=Self}\" \r\n                                                    Text=\"{Binding FullName}\">\r\n                                    <tlgControls:HighlightingTextBlock.TextBlockStyle>\r\n                                        <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextLargeStyle}\">\r\n                                            <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                        </Style>\r\n                                    </tlgControls:HighlightingTextBlock.TextBlockStyle>\r\n                                </tlgControls:HighlightingTextBlock>\r\n                                <Border Grid.Column=\"1\" Background=\"Transparent\" VerticalAlignment=\"Bottom\" Margin=\"8,-2,0,3\" Visibility=\"{Binding Dialog.UnreadCount, Converter={StaticResource UnreadCountToVisibilityConverter}}\">\r\n                                    <TextBlock Margin=\"0,1\" Text=\"{Binding Dialog.UnreadCount}\" Foreground=\"{StaticResource PhoneAccentBrush}\" LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,-4,0,0\" Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Grid Grid.Row=\"1\">\r\n            <controls:Pivot Margin=\"0,-54,0,0\"\r\n                x:Name=\"Items\"\r\n                SelectedItem=\"{Binding ActiveItem, Mode=TwoWay}\">\r\n                <controls:Pivot.HeaderTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Text=\"{Binding DisplayName}\" />\r\n                    </DataTemplate>\r\n                </controls:Pivot.HeaderTemplate>\r\n            </controls:Pivot>\r\n            <Border Margin=\"0,-24,0,0\" Background=\"{StaticResource PhoneBackgroundBrush}\" Visibility=\"{Binding Text, ElementName=SearchBox, Converter={StaticResource EmptyStringToVisibilityConverter}}\">\r\n                <TextBlock Margin=\"24\" TextWrapping=\"Wrap\" Text=\"{Binding SearchHint}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            </Border>\r\n            <Border Visibility=\"{Binding ShowRecent, Converter={StaticResource BooleanToVisibilityConverter}}\" Background=\"{StaticResource PhoneBackgroundBrush}\">\r\n                <Grid>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <Grid Margin=\"12,0,12,0\" Height=\"44\">\r\n                        <TextBlock VerticalAlignment=\"Center\" Margin=\"12,-4,12,0\" Text=\"{Binding Resources.Recent, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                    </Grid>\r\n                    <tlgControls:LazyListBox \r\n                        Grid.Row=\"1\"\r\n                        Margin=\"12,-1,12,0\"\r\n                        x:Name=\"Recent\"\r\n                        ItemsSource=\"{Binding Recent}\"\r\n                        ItemTemplate=\"{StaticResource DialogTemplate}\"\r\n                        ScrollingStateChanged=\"Items_OnScrollingStateChanged\"\r\n                        Style=\"{StaticResource LazyListBoxStyle}\">\r\n                        <tlgControls:LazyListBox.ItemsPanel>\r\n                            <ItemsPanelTemplate>\r\n                                <VirtualizingStackPanel/>\r\n                            </ItemsPanelTemplate>\r\n                        </tlgControls:LazyListBox.ItemsPanel>\r\n                    </tlgControls:LazyListBox>\r\n                </Grid>\r\n            </Border>\r\n        </Grid>\r\n\r\n        <StackPanel x:Name=\"TitlePanel\" Grid.Row=\"0\" Margin=\"12,29,12,12\">\r\n            <tlgControls:WatermarkedTextBox x:Name=\"SearchBox\" Text=\"{Binding Text, Mode=TwoWay}\" Watermark=\"{Binding Resources.Search, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                <tlgControls:WatermarkedTextBox.InputScope>\r\n                    <InputScope>\r\n                        <InputScopeName NameValue=\"Search\"/>\r\n                    </InputScope>\r\n                </tlgControls:WatermarkedTextBox.InputScope>\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </tlgControls:WatermarkedTextBox>\r\n        </StackPanel>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Search/SearchShellView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.Views.Search\r\n{\r\n    public partial class SearchShellView\r\n    {\r\n        public SearchShellViewModel ViewModel\r\n        {\r\n            get { return DataContext as SearchShellViewModel; }\r\n        }\r\n\r\n        public SearchShellView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            OptimizeFullHD();\r\n\r\n            Loaded += SearchShellView_Loaded;\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var obj = element.DataContext as TLObject;\r\n            if (obj == null) return;\r\n\r\n            if (!ViewModel.OpenDialogDetails(obj)) return;\r\n\r\n            _lastTapedItem = sender as FrameworkElement;\r\n\r\n            if (_lastTapedItem != null)\r\n            {\r\n                if (!(_lastTapedItem.RenderTransform is CompositeTransform))\r\n                {\r\n                    _lastTapedItem.RenderTransform = new CompositeTransform();\r\n                }\r\n\r\n                var tapedItemContainer = _lastTapedItem.FindParentOfType<ListBoxItem>();\r\n                if (tapedItemContainer != null)\r\n                {\r\n                    tapedItemContainer = tapedItemContainer.FindParentOfType<ListBoxItem>();\r\n                }\r\n\r\n                StartContinuumForwardOutAnimation(_lastTapedItem, tapedItemContainer);\r\n            }\r\n        }\r\n\r\n        private void Items_OnScrollingStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            if (e.NewValue)\r\n            {\r\n                var focusElement = FocusManager.GetFocusedElement();\r\n                if (focusElement != null\r\n                    && focusElement.GetType() == typeof(WatermarkedTextBox))\r\n                {\r\n                    Self.Focus();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n            //var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n            //if (!isFullHD) return;\r\n\r\n            Items.Margin = new Thickness(Items.Margin.Left, Items.Margin.Top + 12.0, Items.Margin.Right, Items.Margin.Bottom);\r\n            Items.HeaderTemplate = (DataTemplate)Application.Current.Resources[\"FullHDPivotHeaderTemplate\"];\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            base.OnNavigatingFrom(e);\r\n\r\n            if (!e.Cancel && e.Uri.OriginalString != \"app://external/\")\r\n            {\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation);\r\n\r\n                storyboard.Begin();\r\n            }\r\n        }\r\n\r\n        private void SearchShellView_Loaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_isBackwardIn)\r\n            {\r\n                return;\r\n            }\r\n\r\n            LayoutRoot.Opacity = 0.0;\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 150.0 });\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 1.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            storyboard.Completed += (o, args) =>\r\n            {\r\n                if (string.IsNullOrEmpty(ViewModel.Text))\r\n                {\r\n                    SearchBox.Focus();\r\n                }\r\n                ViewModel.ForwardInAnimationComplete();\r\n            };\r\n\r\n            Execute.BeginOnUIThread(storyboard.Begin);\r\n        }\r\n\r\n        private bool _isBackwardIn;\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (e.NavigationMode == NavigationMode.Back)\r\n            {\r\n                _isBackwardIn = true;\r\n            }\r\n\r\n            //Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            //{\r\n            if (_lastTapedItem != null)\r\n            {\r\n                var transform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (transform != null)\r\n                {\r\n                    transform.TranslateX = 0.0;\r\n                    transform.TranslateY = 0.0;\r\n                }\r\n                _lastTapedItem.Opacity = 1.0;\r\n            }\r\n            //});\r\n            \r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        private static FrameworkElement _lastTapedItem;\r\n\r\n        public static void StartContinuumForwardOutAnimation(FrameworkElement tapedItem, FrameworkElement tapedItemContainer)\r\n        {\r\n            _lastTapedItem = tapedItem;\r\n\r\n            _lastTapedItem.CacheMode = new BitmapCache();\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var timeline = new DoubleAnimationUsingKeyFrames();\r\n            timeline.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            timeline.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 73.0 });\r\n            Storyboard.SetTarget(timeline, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(timeline);\r\n\r\n            var timeline2 = new DoubleAnimationUsingKeyFrames();\r\n            timeline2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            timeline2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 425.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 } });\r\n            Storyboard.SetTarget(timeline2, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(timeline2);\r\n\r\n            var timeline3 = new DoubleAnimationUsingKeyFrames();\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 1.0 });\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = 1.0 });\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n            Storyboard.SetTarget(timeline3, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline3, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(timeline3);\r\n\r\n            if (tapedItemContainer != null)\r\n            {\r\n                var timeline4 = new ObjectAnimationUsingKeyFrames();\r\n                timeline4.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 999.0 });\r\n                timeline4.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n                Storyboard.SetTarget(timeline4, tapedItemContainer);\r\n                Storyboard.SetTargetProperty(timeline4, new PropertyPath(\"(Canvas.ZIndex)\"));\r\n                storyboard.Children.Add(timeline4);\r\n            }\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void MainItemGrid_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.ClearSearchHistory();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Search/SearchVenuesView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Search.SearchVenuesView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:media=\"clr-namespace:TelegramClient.Views.Media\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"True\" IsVisible=\"{Binding IsWorking}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls1:TelegramTransitionService.NavigationInTransition>\r\n        <controls1:TelegramNavigationInTransition>\r\n            <controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n                </controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramNavigationInTransition.Forward>\r\n                    <controls1:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n                </controls1:TelegramNavigationInTransition.Forward>\r\n        </controls1:TelegramNavigationInTransition>\r\n    </controls1:TelegramTransitionService.NavigationInTransition>\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition>\r\n            <controls1:TelegramNavigationOutTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Backward>\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneBackgroundBrush}\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel x:Name=\"TitlePanel\" Grid.Row=\"0\" Margin=\"3,29,3,0\">\r\n            <controls:WatermarkedTextBox x:Name=\"SearchBox\" Text=\"{Binding Text, Mode=TwoWay}\" Watermark=\"{Binding Resources.Search, Source={StaticResource Strings}}\" Style=\"{StaticResource W10MWatermarkedTextBoxStyle}\">\r\n                <controls:WatermarkedTextBox.InputScope>\r\n                    <InputScope>\r\n                        <InputScopeName NameValue=\"Search\"/>\r\n                    </InputScope>\r\n                </controls:WatermarkedTextBox.InputScope>\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls:WatermarkedTextBox>\r\n        </StackPanel>\r\n\r\n        <controls:LazyListBox Grid.Row=\"1\" Margin=\"0,0,0,0\" ItemsSource=\"{Binding Items}\" ScrollingStateChanged=\"Items_OnScrollingStateChanged\" IsHitTestVisible=\"{Binding IsNotWorking}\">\r\n            <controls:LazyListBox.ItemTemplate>\r\n                <DataTemplate>\r\n                    <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                        <Grid Margin=\"24,12,0,12\" Background=\"Transparent\" Tap=\"Venue_OnTap\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <Border Grid.Column=\"0\" Background=\"#FFEFEFEF\" CornerRadius=\"36\" Width=\"72\" Height=\"72\">\r\n                                <Border Width=\"54\" Height=\"54\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Background=\"#FFA0A0A0\" Opacity=\"0\" media:MapView.ImageOpacityMask=\"{Binding IconSource}\">\r\n                                    <Border.OpacityMask>\r\n                                        <ImageBrush ImageSource=\"{Binding IconSource}\"/>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                            </Border>\r\n\r\n                            <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\"/>\r\n                                    <RowDefinition Height=\"Auto\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding Title}\" MaxHeight=\"36\" FontSize=\"27\" Foreground=\"#FFFFFFFF\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                                <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                    Text=\"{Binding Address}\"\r\n                                    Foreground=\"#99FFFFFF\"\r\n                                    Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </ListBoxItem>\r\n                </DataTemplate>\r\n            </controls:LazyListBox.ItemTemplate>\r\n        </controls:LazyListBox>\r\n        <TextBlock Grid.Row=\"1\" Margin=\"24,12\" Text=\"{Binding Status}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Search/SearchVenuesView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.Views.Search\r\n{\r\n    public partial class SearchVenuesView\r\n    {\r\n        public SearchVenuesViewModel ViewModel\r\n        {\r\n            get { return DataContext as SearchVenuesViewModel; }\r\n        }\r\n\r\n        public SearchVenuesView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                Execute.BeginOnUIThread(TimeSpan.FromMilliseconds(500), () => SearchBox.Focus());\r\n            };\r\n        }\r\n\r\n        private void Items_OnScrollingStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            if (e.NewValue)\r\n            {\r\n                var focusElement = FocusManager.GetFocusedElement();\r\n                if (focusElement == SearchBox)\r\n                {\r\n                    Self.Focus();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Venue_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var mediaVenue = frameworkElement.DataContext as TLMessageMediaVenue;\r\n                if (mediaVenue != null)\r\n                {\r\n                    ViewModel.AttachVenue(mediaVenue);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/Search/SearchView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Search.SearchView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:tlgControls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:triggers=\"clr-namespace:Telegram.Controls.Triggers;assembly=Telegram.Controls\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <converters:SearchResultStatusToStringConverter x:Key=\"SearchResultStatusToStringConverter\"/>\r\n            <converters:SearchResultStatusToVisibilityConverter x:Key=\"SearchResultStatusToVisibilityConverter\"/>\r\n            <converters:ChannelParticipantsCountConverter x:Name=\"ParticipantsCountConverter\"/>\r\n\r\n            <Style x:Key=\"Scroll\" TargetType=\"ScrollViewer\">\r\n                <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n                <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"Padding\" Value=\"0\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"ScrollViewer\" >\r\n                            <Grid Margin=\"{TemplateBinding Padding}\" Background=\"{TemplateBinding Background}\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                        <VisualStateGroup.Transitions>\r\n                                            <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                        </VisualStateGroup.Transitions>\r\n                                        <VisualState x:Name=\"Scrolling\">\r\n                                            <!--<Storyboard>\r\n                                                <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n                                                <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalScrollBar\"/>\r\n                                            </Storyboard>-->\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"NotScrolling\"/>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"VerticalCompression\">\r\n                                        <VisualState x:Name=\"NoVerticalCompression\"/>\r\n                                        <VisualState x:Name=\"CompressionTop\"/>\r\n                                        <VisualState x:Name=\"CompressionBottom\"/>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"HorizontalCompression\">\r\n                                        <VisualState x:Name=\"NoHorizontalCompression\"/>\r\n                                        <VisualState x:Name=\"CompressionLeft\"/>\r\n                                        <VisualState x:Name=\"CompressionRight\"/>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <ScrollContentPresenter x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\"/>\r\n                                <ScrollBar x:Name=\"VerticalScrollBar\" HorizontalAlignment=\"Right\" Height=\"Auto\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Vertical\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{TemplateBinding VerticalOffset}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" VerticalAlignment=\"Stretch\" Width=\"5\"/>\r\n                                <ScrollBar x:Name=\"HorizontalScrollBar\" HorizontalAlignment=\"Stretch\" Height=\"5\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Horizontal\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{TemplateBinding HorizontalOffset}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" VerticalAlignment=\"Bottom\" Width=\"Auto\"/>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n\r\n            <DataTemplate x:Key=\"HorizontalDialogTemplate\">\r\n                <ListBoxItem toolkit:TiltEffect.SuppressTilt=\"False\">\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"18,0\" Width=\"72\" Background=\"Transparent\" Tap=\"HorizontalItem_OnTap\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [ResetTopPeerRating($DataContext)]\" Header=\"{Binding Resources.Hide, Source={StaticResource Strings}}\"/>\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                        <views:ConversationTileControl\r\n                            Size=\"72\" Margin=\"0,12,0,12\" Grid.Row=\"0\"\r\n                            Object=\"{Binding}\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <Border Grid.Row=\"0\" Margin=\"-6,6\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\"\r\n                                Background=\"{Binding Dialog.Self, Converter={StaticResource MessageForeground}, FallbackValue={StaticResource TelegramBadgeSubtleBrush}}\"\r\n                                Height=\"28\" MinWidth=\"28\" CornerRadius=\"14\" BorderThickness=\"2\" BorderBrush=\"{StaticResource PhoneBackgroundBrush}\"\r\n                                Visibility=\"{Binding Dialog.UnreadCount, Converter={StaticResource UnreadCountToVisibilityConverter}, FallbackValue=Collapsed}\" >\r\n                            <TextBlock Margin=\"7,-3,7,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n                                Foreground=\"White\" \r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontWeight=\"SemiBold\"\r\n                                FontSize=\"18\"\r\n                                Text=\"{Binding Dialog.UnreadCount}\" />\r\n                        </Border>\r\n\r\n                        <TextBlock Grid.Row=\"1\" Text=\"{Binding ShortName}\" Margin=\"-11,-10,-11,0\" Height=\"48\" FontSize=\"18\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"RecentDialogTemplate\">\r\n                <ListBoxItem toolkit:TiltEffect.SuppressTilt=\"False\">\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"0,-12,18,12\" Background=\"Transparent\" Tap=\"VerticalItem_OnTap\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                                <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [ClearRecent($DataContext)]\" Header=\"{Binding Resources.Hide, Source={StaticResource Strings}}\"/>\r\n                            </toolkit:ContextMenu>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                        <views:ConversationTileControl\r\n                            Margin=\"18,12,0,12\" Grid.RowSpan=\"2\" Size=\"72\"\r\n                            Object=\"{Binding}\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <Border Grid.Column=\"0\" Margin=\"-6,6\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\"\r\n                                Background=\"{Binding Dialog.Self, Converter={StaticResource MessageForeground}, FallbackValue={StaticResource TelegramBadgeSubtleBrush}}\"\r\n                                Height=\"28\" MinWidth=\"28\" CornerRadius=\"14\" BorderThickness=\"2\" BorderBrush=\"{StaticResource PhoneBackgroundBrush}\"\r\n                                Visibility=\"{Binding Dialog.UnreadCount, Converter={StaticResource UnreadCountToVisibilityConverter}, FallbackValue=Collapsed}\" >\r\n                            <TextBlock Margin=\"7,-3,7,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n                                Foreground=\"White\" \r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontWeight=\"SemiBold\"\r\n                                FontSize=\"18\"\r\n                                Text=\"{Binding Dialog.UnreadCount}\" />\r\n                        </Border>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"2,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <Grid Grid.Column=\"0\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n\r\n                                    <tlgControls:HighlightingTextBlock Grid.Column=\"0\"\r\n                                        navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                        HorizontalAlignment=\"Left\"\r\n                                        Margin=\"14,-6,0,0\"\r\n                                        HighlightBrush=\"{StaticResource TelegramAccentBrush}\" \r\n                                        HighlightText=\"{Binding DataContext.Text, ElementName=Self}\"\r\n                                        UseTransliteration=\"True\"\r\n                                        Text=\"{Binding FullName}\"\r\n                                        FontSize=\"27\">\r\n                                        <tlgControls:HighlightingTextBlock.TextBlockStyle>\r\n                                            <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextLargeStyle}\">\r\n                                                <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                                <Setter Property=\"FontSize\" Value=\"27\"/>\r\n                                                <Setter Property=\"MaxHeight\" Value=\"36\"/>\r\n                                            </Style>\r\n                                        </tlgControls:HighlightingTextBlock.TextBlockStyle>\r\n                                    </tlgControls:HighlightingTextBlock>\r\n\r\n                                    <Image \r\n                                        Width=\"19\" Height=\"19\"\r\n                                        Grid.Column=\"1\" \r\n                                        Visibility=\"{Binding IsVerified, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"\r\n                                        HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                                        Margin=\"6,0,0,5\"\r\n                                        Source=\"/Images/W10M/ic_verification_2x.png\" Stretch=\"UniformToFill\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,2,0,0\" Text=\"{Binding Converter={StaticResource SearchResultStatusToStringConverter}}\" Foreground=\"{Binding Converter={StaticResource UserStatusToBrushConverter}}\" Visibility=\"{Binding Converter={StaticResource SearchResultStatusToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"DialogTemplate\">\r\n                <ListBoxItem toolkit:TiltEffect.SuppressTilt=\"False\">\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"0,-12,18,12\" Background=\"Transparent\" Tap=\"VerticalItem_OnTap\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <views:ConversationTileControl\r\n                            Margin=\"18,12,0,12\" Grid.RowSpan=\"2\" Size=\"72\"\r\n                            Object=\"{Binding}\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <Border Grid.Column=\"0\" Margin=\"-6,6\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\"\r\n                                Background=\"{Binding Dialog.Self, Converter={StaticResource MessageForeground}, FallbackValue={StaticResource TelegramBadgeSubtleBrush}}\"\r\n                                Height=\"28\" MinWidth=\"28\" CornerRadius=\"14\" BorderThickness=\"2\" BorderBrush=\"{StaticResource PhoneBackgroundBrush}\"\r\n                                Visibility=\"{Binding Dialog.UnreadCount, Converter={StaticResource UnreadCountToVisibilityConverter}, FallbackValue=Collapsed}\" >\r\n                            <TextBlock Margin=\"7,-3,7,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n                                Foreground=\"White\" \r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontWeight=\"SemiBold\"\r\n                                FontSize=\"18\"\r\n                                Text=\"{Binding Dialog.UnreadCount}\" />\r\n                        </Border>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"2,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <tlgControls:HighlightingTextBlock Grid.Column=\"0\"\r\n                                        navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                        HorizontalAlignment=\"Left\"\r\n                                        Margin=\"14,-6,0,0\"\r\n                                        HighlightBrush=\"{StaticResource TelegramAccentBrush}\" \r\n                                        HighlightText=\"{Binding DataContext.Text, ElementName=Self}\"\r\n                                        UseTransliteration=\"True\"\r\n                                        Text=\"{Binding FullName}\"\r\n                                        FontSize=\"27\">\r\n                                    <tlgControls:HighlightingTextBlock.TextBlockStyle>\r\n                                        <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextLargeStyle}\">\r\n                                            <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                            <Setter Property=\"FontSize\" Value=\"27\"/>\r\n                                            <Setter Property=\"MaxHeight\" Value=\"36\"/>\r\n                                        </Style>\r\n                                    </tlgControls:HighlightingTextBlock.TextBlockStyle>\r\n                                </tlgControls:HighlightingTextBlock>\r\n\r\n                                <Image \r\n                                    Width=\"19\" Height=\"19\"\r\n                                    Grid.Column=\"1\" \r\n                                    Visibility=\"{Binding IsVerified, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"\r\n                                    HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                                    Margin=\"6,0,0,5\"\r\n                                    Source=\"/Images/W10M/ic_verification_2x.png\" Stretch=\"UniformToFill\"/>\r\n                            </Grid>\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"15,2,0,0\" Text=\"{Binding Converter={StaticResource SearchResultStatusToStringConverter}}\" Foreground=\"{Binding Converter={StaticResource UserStatusToBrushConverter}}\" Visibility=\"{Binding Converter={StaticResource SearchResultStatusToVisibilityConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"TextTemplate\">\r\n                <Grid Margin=\"18,12,18,25\">\r\n                    <TextBlock VerticalAlignment=\"Center\" Margin=\"0\" Text=\"{Binding Text}\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"UserUsernameTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"18,0,18,24\" Background=\"Transparent\" Tap=\"VerticalItem_OnTap\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"72\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <views:ConversationTileControl\r\n                            Size=\"72\" Margin=\"0\"\r\n                            Object=\"{Binding}\"\r\n                            Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n\r\n                        <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"2,-2,0,0\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <Grid Grid.Row=\"0\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <TextBlock\r\n                                    navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                    Margin=\"14,-6,0,0\"\r\n                                    Text=\"{Binding FullName}\"\r\n                                    FontSize=\"27\"\r\n                                    MaxHeight=\"36\"\r\n                                    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                                    Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n\r\n                                <Image \r\n                                    Width=\"19\" Height=\"19\"\r\n                                    Grid.Column=\"1\" \r\n                                    Visibility=\"{Binding IsVerified, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"\r\n                                    HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                                    Margin=\"6,0,0,5\"\r\n                                    Source=\"/Images/W10M/ic_verification_2x.png\" Stretch=\"UniformToFill\"/>\r\n                            </Grid>\r\n\r\n                            <StackPanel Grid.Row=\"1\" Margin=\"15,2,0,0\" Orientation=\"Horizontal\">\r\n                                <TextBlock Text=\"@\" Margin=\"0\" Foreground=\"{StaticResource TelegramAccentBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                <tlgControls:HighlightingTextBlock\r\n                                    HighlightBrush=\"{StaticResource TelegramAccentBrush}\" \r\n                                    HighlightText=\"{Binding DataContext.Text, ElementName=Self}\" \r\n                                    Text=\"{Binding UserName}\">\r\n                                    <tlgControls:HighlightingTextBlock.TextBlockStyle>\r\n                                        <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                                            <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                        </Style>\r\n                                    </tlgControls:HighlightingTextBlock.TextBlockStyle>\r\n                                </tlgControls:HighlightingTextBlock>\r\n                                <TextBlock Text=\"{Binding Converter={StaticResource ParticipantsCountConverter}}\" Margin=\"0\" Foreground=\"{StaticResource PhoneSubtleBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            </StackPanel>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"MessageTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid x:Name=\"MainItemGrid\" Margin=\"18,0,18,24\" Height=\"72\" Background=\"Transparent\" Tap=\"VerticalItem2_OnTap\">\r\n                        <Grid.RenderTransform>\r\n                            <CompositeTransform/>\r\n                        </Grid.RenderTransform>\r\n\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <views:ConversationTileControl Size=\"72\" \r\n                            Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                            Object=\"{Binding With}\"\r\n                            Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            Fill=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                        <Grid Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"3,3,0,0\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <Grid Grid.Column=\"1\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <TextBlock\r\n                                    navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                    Margin=\"14,-2,0,-1\" FontSize=\"27\" MaxHeight=\"36\"\r\n                                    Text=\"{Binding With, Converter={StaticResource DialogCaptionConverter}}\" \r\n                                    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                                    Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n\r\n                                <Image \r\n                                    Width=\"19\" Height=\"19\"\r\n                                    Grid.Column=\"1\" \r\n                                    Visibility=\"{Binding VerifiedVisibility}\"\r\n                                    HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                                    Margin=\"6,0,0,5\"\r\n                                    Source=\"/Images/W10M/ic_verification_2x.png\" Stretch=\"UniformToFill\"/>\r\n                            </Grid>\r\n\r\n                            <controls:MessageStatusControl Grid.Column=\"2\"\r\n                                Visibility=\"{Binding Self, Converter={StaticResource DialogToMessageStatusVisibilityConverter}, FallbackValue=Collapsed}\" \r\n                                VerticalAlignment=\"Bottom\" Height=\"18\" Margin=\"6,1,0,6\"/>\r\n\r\n                            <TextBlock Grid.Column=\"3\" Margin=\"6,0,0,1\" VerticalAlignment=\"Bottom\" FontSize=\"18\" Text=\"{Binding Self, Converter={StaticResource DraftDialogDateTimeConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n\r\n                        <Grid Grid.Row=\"1\" Grid.Column=\"1\" VerticalAlignment=\"Top\" Margin=\"18,3,0,0\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <TextBlock Grid.Column=\"0\"\r\n                                Margin=\"0\"\r\n                                MaxWidth=\"150\"\r\n                                Text=\"{Binding Resources.Draft, Source={StaticResource Strings}, StringFormat='\\{0\\}: '}\"\r\n                                Foreground=\"{StaticResource TelegramAccentBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                Visibility=\"{Binding Self, Converter={StaticResource DraftToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n\r\n                            <TextBlock Grid.Column=\"1\"\r\n                                Margin=\"0\"\r\n                                MaxWidth=\"150\" TextTrimming=\"WordEllipsis\"\r\n                                Text=\"{Binding Self, Converter={StaticResource DialogMessageFromConverter}}\"\r\n                                Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                Visibility=\"{Binding Self, Converter={StaticResource ShowFromVisibilityConverter}}\"/>\r\n\r\n                            <tlgControls:HighlightingTextBlock Grid.Column=\"2\"\r\n                                    HorizontalContentAlignment=\"Left\"\r\n                                    HighlightBrush=\"{StaticResource TelegramAccentBrush}\" \r\n                                    HighlightText=\"{Binding DataContext.Text, ElementName=Self}\" \r\n                                    Text=\"{Binding Self, Converter={StaticResource DialogToBriefInfo}}\">\r\n                                <tlgControls:HighlightingTextBlock.TextBlockStyle>\r\n                                    <Style TargetType=\"TextBlock\" BasedOn=\"{StaticResource PhoneTextSubtleStyle}\">\r\n                                        <Setter Property=\"Margin\" Value=\"0\"/>\r\n                                        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                                        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeNormal}\"/>\r\n                                        <Setter Property=\"TextWrapping\" Value=\"Wrap\"/>\r\n                                        <Setter Property=\"TextTrimming\" Value=\"WordEllipsis\"/>\r\n                                    </Style>\r\n                                </tlgControls:HighlightingTextBlock.TextBlockStyle>\r\n                            </tlgControls:HighlightingTextBlock>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n\r\n            <templateSelectors:SearchTemplateSelector \r\n                x:Key=\"SearchTemplateSelector\" \r\n                UserTemplate=\"{StaticResource UserUsernameTemplate}\"\r\n                TextTemplate=\"{StaticResource TextTemplate}\"\r\n                DialogTemplate=\"{StaticResource DialogTemplate}\"\r\n                MessageTemplate=\"{StaticResource MessageTemplate}\"/>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneBackgroundBrush}\" CacheMode=\"BitmapCache\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel x:Name=\"TitlePanel\" Grid.Row=\"0\" Margin=\"3,29,3,0\">\r\n            <tlgControls:WatermarkedTextBox x:Name=\"SearchBox\" Text=\"{Binding Text, Mode=TwoWay}\" Watermark=\"{Binding Watermark}\" Style=\"{StaticResource W10MWatermarkedTextBoxStyle}\">\r\n                <tlgControls:WatermarkedTextBox.InputScope>\r\n                    <InputScope>\r\n                        <InputScopeName NameValue=\"Search\"/>\r\n                    </InputScope>\r\n                </tlgControls:WatermarkedTextBox.InputScope>\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </tlgControls:WatermarkedTextBox>\r\n        </StackPanel>\r\n\r\n        <Grid Grid.Row=\"1\" Visibility=\"{Binding ShowRecent, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\" Background=\"Transparent\">\r\n            <tlgControls:LazyListBox \r\n                x:Name=\"Items\"\r\n                IsScrolling=\"{Binding IsScrolling, Mode=TwoWay}\"\r\n                ManipulationStarted=\"Items_OnManipulationStarted\"\r\n                CloseToEndPercent=\"0.1\"\r\n                CloseToEnd=\"Items_OnCloseToEnd\"\r\n                Style=\"{StaticResource LazyListBoxStyle}\">\r\n                <tlgControls:LazyListBox.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <ContentControl \r\n                            HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" \r\n                            Content=\"{Binding}\" ContentTemplate=\"{Binding Converter={StaticResource SearchTemplateSelector}}\" />\r\n                    </DataTemplate>\r\n                </tlgControls:LazyListBox.ItemTemplate>\r\n                <tlgControls:LazyListBox.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                    </ItemsPanelTemplate>\r\n                </tlgControls:LazyListBox.ItemsPanel>\r\n                <i:Interaction.Triggers>\r\n                    <triggers:CompressionTrigger CompressionType=\"Bottom\">\r\n                        <micro:ActionMessage MethodName=\"LoadNextSlice\"/>\r\n                    </triggers:CompressionTrigger>\r\n                </i:Interaction.Triggers>\r\n            </tlgControls:LazyListBox>\r\n            <TextBlock Margin=\"18,12,18,0\" Text=\"{Binding Status}\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n        </Grid>\r\n\r\n        <Border Grid.Row=\"1\" Visibility=\"{Binding ShowRecent, Converter={StaticResource BooleanToVisibilityConverter}}\" Background=\"Transparent\">\r\n            <Grid>\r\n                <Grid>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n\r\n                    <longListSelector:LongListSelector \r\n                        Grid.Row=\"1\"\r\n                        Margin=\"0,0,0,0\"\r\n                        ManipulationStarted=\"Items_OnManipulationStarted\" \r\n                        ItemsSource=\"{Binding Recent}\" \r\n                        IsFlatList=\"True\" \r\n                        ItemTemplate=\"{StaticResource RecentDialogTemplate}\"\r\n                        Background=\"Transparent\"\r\n                        toolkit:TiltEffect.SuppressTilt=\"True\">\r\n                        <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                            <DataTemplate>\r\n                                <Grid>\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"Auto\"/>\r\n                                        <RowDefinition Height=\"Auto\"/>\r\n                                    </Grid.RowDefinitions>\r\n\r\n                                    <ItemsControl\r\n                                        Grid.Row=\"0\" Margin=\"0,12,0,11\"\r\n                                        ItemsSource=\"{Binding DataContext.TopPeers, ElementName=Self}\" \r\n                                        ItemTemplate=\"{StaticResource HorizontalDialogTemplate}\"\r\n                                        Visibility=\"{Binding DataContext.TopPeers.Count, ElementName=Self, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\">\r\n                                        <ItemsControl.ItemsPanel>\r\n                                            <ItemsPanelTemplate>\r\n                                                <VirtualizingStackPanel Orientation=\"Horizontal\" VirtualizationMode=\"Recycling\"/>\r\n                                            </ItemsPanelTemplate>\r\n                                        </ItemsControl.ItemsPanel>\r\n                                        <ItemsControl.Template>\r\n                                            <ControlTemplate TargetType=\"ItemsControl\">\r\n                                                <ScrollViewer HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Disabled\" Style=\"{StaticResource Scroll}\">\r\n                                                    <ItemsPresenter/>\r\n                                                </ScrollViewer>\r\n                                            </ControlTemplate>\r\n                                        </ItemsControl.Template>\r\n                                    </ItemsControl>\r\n\r\n                                    <Grid Grid.Row=\"1\" Margin=\"18,12,18,25\" Visibility=\"{Binding DataContext.Recent.Count, ElementName=Self, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\">\r\n                                        <TextBlock Margin=\"0\" Text=\"{Binding Resources.Recent, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                                        <Border Background=\"Transparent\" Tap=\"ClearRecent_OnTap\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Stretch\">\r\n                                            <TextBlock VerticalAlignment=\"Bottom\" Margin=\"12,0,0,4\" Text=\"{Binding Resources.ClearAll, Source={StaticResource Strings}}\" Foreground=\"{StaticResource TelegramAccentBrush}\" FontSize=\"20\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                                        </Border>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </DataTemplate>\r\n                        </longListSelector:LongListSelector.ListHeaderTemplate>\r\n                    </longListSelector:LongListSelector>\r\n                </Grid>\r\n            </Grid>\r\n        </Border>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/Search/SearchView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Action = System.Action;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Search\r\n{\r\n    public partial class SearchView\r\n    {\r\n        public SearchViewModel ViewModel\r\n        {\r\n            get { return DataContext as SearchViewModel; }\r\n        }\r\n\r\n        public SearchView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n            LayoutRoot.Opacity = 0.0;\r\n\r\n            Loaded += SearchShellView_Loaded;\r\n        }\r\n\r\n        ~SearchView()\r\n        {\r\n            \r\n        }\r\n\r\n        public Action<Visibility> ClosePivotAction;\r\n\r\n        private void HorizontalItem_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            var with = frameworkElement.DataContext as TLObject;\r\n            if (with == null) return;\r\n\r\n            ClosePivotAction.SafeInvoke(Visibility.Visible);\r\n            ViewModel.StateService.CollapseSearchControl = true;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (!ViewModel.OpenDialogDetails(with, false)) return;\r\n            });\r\n        }\r\n\r\n        private void VerticalItem2_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            var with = frameworkElement.DataContext as TLObject;\r\n            if (with == null) return;\r\n\r\n            ClosePivotAction.SafeInvoke(Visibility.Visible);\r\n            ViewModel.StateService.CollapseSearchControl = true;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (!ViewModel.OpenDialogDetails(with, true)) return;\r\n\r\n                _lastTapedItem = sender as FrameworkElement;\r\n\r\n                if (_lastTapedItem != null)\r\n                {\r\n                    if (!(_lastTapedItem.RenderTransform is CompositeTransform))\r\n                    {\r\n                        _lastTapedItem.RenderTransform = new CompositeTransform();\r\n                    }\r\n\r\n                    var tapedItemContainer = _lastTapedItem.FindParentOfType<ListBoxItem>();\r\n                    if (tapedItemContainer != null)\r\n                    {\r\n                        tapedItemContainer = tapedItemContainer.FindParentOfType<ListBoxItem>();\r\n                    }\r\n\r\n                    ShellView.StartContinuumForwardOutAnimation(_lastTapedItem, tapedItemContainer);\r\n                }\r\n            });\r\n        }\r\n\r\n        private void VerticalItem_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            var with = frameworkElement.DataContext as TLObject;\r\n            if (with == null) return;\r\n\r\n            ClosePivotAction.SafeInvoke(Visibility.Visible);\r\n            ViewModel.StateService.CollapseSearchControl = true;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (!ViewModel.OpenDialogDetails(with, true)) return;\r\n\r\n                _lastTapedItem = sender as FrameworkElement;\r\n\r\n                if (_lastTapedItem != null)\r\n                {\r\n                    if (!(_lastTapedItem.RenderTransform is CompositeTransform))\r\n                    {\r\n                        _lastTapedItem.RenderTransform = new CompositeTransform();\r\n                    }\r\n\r\n                    var tapedItemContainer = _lastTapedItem.FindParentOfType<ListBoxItem>();\r\n                    if (tapedItemContainer != null)\r\n                    {\r\n                        tapedItemContainer = tapedItemContainer.FindParentOfType<ListBoxItem>();\r\n                    }\r\n\r\n                    ShellView.StartContinuumForwardOutAnimation(_lastTapedItem, tapedItemContainer);\r\n                }\r\n            });\r\n        }\r\n\r\n        private void Items_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            CloseKeyboard();\r\n        }\r\n\r\n        private void CloseKeyboard()\r\n        {\r\n            var focusElement = FocusManager.GetFocusedElement();\r\n            if (focusElement != null\r\n                && focusElement.GetType() == typeof(WatermarkedTextBox))\r\n            {\r\n                Self.Focus();\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            base.OnNavigatingFrom(e);\r\n\r\n            if (!e.Cancel && e.Uri.OriginalString != \"app://external/\")\r\n            {\r\n                BeginCloseStoryboard();\r\n            }\r\n        }\r\n\r\n        public void BeginCloseStoryboard(Action callback = null)\r\n        {\r\n            if (_openStoryboard.GetCurrentState() == ClockState.Active)\r\n            {\r\n                _openStoryboard.Pause();\r\n            }\r\n\r\n            ClosePivotAction.SafeInvoke(Visibility.Visible);\r\n            //LayoutRoot.Background = (Brush)Application.Current.Resources[\"PhoneBackgroundBrush\"];\r\n\r\n            var translateYTo = 150.0;\r\n            var duration = TimeSpan.FromSeconds(0.3);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = duration,\r\n                Value = translateYTo,\r\n                EasingFunction = easingFunction\r\n            });\r\n            Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = duration,\r\n                Value = 0.0,\r\n                EasingFunction = easingFunction\r\n            });\r\n            Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            if (callback != null)\r\n            {\r\n                storyboard.Completed += (o, e) => callback();\r\n            }\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                storyboard.Begin();\r\n            });\r\n        }\r\n\r\n        public void SearchShellView_Loaded(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= SearchShellView_Loaded;\r\n\r\n            BeginOpenStoryboard(true);\r\n        }\r\n\r\n        private Storyboard _openStoryboard;\r\n\r\n        public void BeginOpenStoryboard(bool initialize = false)\r\n        {\r\n            LayoutRoot.Opacity = 0.0;\r\n\r\n            var translateYTo = 150.0;\r\n            var duration = TimeSpan.FromSeconds(0.4);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = duration,\r\n                Value = 0.0,\r\n                EasingFunction = easingFunction\r\n            });\r\n            Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = duration,\r\n                Value = 1.0,\r\n                EasingFunction = easingFunction\r\n            });\r\n            Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            storyboard.Completed += (o, args) =>\r\n            {\r\n                if (string.IsNullOrEmpty(ViewModel.Text))\r\n                {\r\n                    SearchBox.Focus();\r\n                }\r\n                ViewModel.ForwardInAnimationComplete();\r\n                ClosePivotAction.SafeInvoke(Visibility.Collapsed);\r\n            };\r\n            _openStoryboard = storyboard;\r\n            Execute.BeginOnUIThread(storyboard.Begin);\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (_lastTapedItem != null)\r\n            {\r\n                var transform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (transform != null)\r\n                {\r\n                    transform.TranslateX = 0.0;\r\n                    transform.TranslateY = 0.0;\r\n                }\r\n                _lastTapedItem.Opacity = 1.0;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        private static FrameworkElement _lastTapedItem;\r\n\r\n        public static void StartContinuumForwardOutAnimation(FrameworkElement tapedItem, FrameworkElement tapedItemContainer)\r\n        {\r\n            _lastTapedItem = tapedItem;\r\n\r\n            _lastTapedItem.CacheMode = new BitmapCache();\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var timeline = new DoubleAnimationUsingKeyFrames();\r\n            timeline.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            timeline.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 73.0 });\r\n            Storyboard.SetTarget(timeline, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(timeline);\r\n\r\n            var timeline2 = new DoubleAnimationUsingKeyFrames();\r\n            timeline2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            timeline2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 425.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 } });\r\n            Storyboard.SetTarget(timeline2, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(timeline2);\r\n\r\n            var timeline3 = new DoubleAnimationUsingKeyFrames();\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 1.0 });\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = 1.0 });\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n            Storyboard.SetTarget(timeline3, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline3, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(timeline3);\r\n\r\n            if (tapedItemContainer != null)\r\n            {\r\n                var timeline4 = new ObjectAnimationUsingKeyFrames();\r\n                timeline4.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 999.0 });\r\n                timeline4.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n                Storyboard.SetTarget(timeline4, tapedItemContainer);\r\n                Storyboard.SetTargetProperty(timeline4, new PropertyPath(\"(Canvas.ZIndex)\"));\r\n                storyboard.Children.Add(timeline4);\r\n            }\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void ClearRecent_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.ClearSearchHistory();\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.LoadNextSlice();\r\n        }\r\n\r\n        private void Expander_OnExpanded(object sender, RoutedEventArgs e)\r\n        {\r\n            //ShowText.Text = \"Show less\";\r\n        }\r\n\r\n        private void Expander_OnCollapsed(object sender, RoutedEventArgs e)\r\n        {\r\n            //ShowText.Text = \"Show more\";\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/ShellView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:profiling=\"clr-namespace:Telegram.Controls.Profiling;assembly=Telegram.Controls\"\r\n    xmlns:Primitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    x:Class=\"TelegramClient.Views.ShellView\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    BackKeyPress=\"ShellView_OnBackKeyPress\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <views:TelegramViewBase.FontFamily>\r\n        <StaticResource ResourceKey=\"PhoneFontFamilyNormal\"/>\r\n    </views:TelegramViewBase.FontFamily>\r\n    <views:TelegramViewBase.FontSize>\r\n        <StaticResource ResourceKey=\"PhoneFontSizeNormal\"/>\r\n    </views:TelegramViewBase.FontSize>\r\n    <views:TelegramViewBase.Foreground>\r\n        <StaticResource ResourceKey=\"PhoneForegroundBrush\"/>\r\n    </views:TelegramViewBase.Foreground>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding ActiveItem.IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" CacheMode=\"BitmapCache\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform x:Name=\"LayoutRootTransform\"/>\r\n        </Grid.RenderTransform>\r\n        <Grid.Projection>\r\n            <PlaneProjection x:Name=\"LayoutRootProjection\" CenterOfRotationX=\"0\"/>\r\n        </Grid.Projection>\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <ListBox x:Name=\"ItemsHeaders\"\r\n            ItemsSource=\"{Binding Items}\"\r\n\t\t\tSelectedItem=\"{Binding ActiveItem, Mode=TwoWay}\"\r\n            Margin=\"18,0\"\r\n            VerticalAlignment=\"Top\"\r\n            ScrollViewer.HorizontalScrollBarVisibility=\"Disabled\"\r\n            ScrollViewer.VerticalScrollBarVisibility=\"Disabled\"\r\n            toolkit:TiltEffect.SuppressTilt=\"True\"\r\n            ItemContainerStyle=\"{StaticResource W10MPivotHeaderItemStyle}\">\r\n            <ListBox.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <StackPanel Orientation=\"Horizontal\"/>\r\n                </ItemsPanelTemplate>\r\n            </ListBox.ItemsPanel>\r\n            <ListBox.ItemTemplate>\r\n                <DataTemplate>\r\n                    <TextBlock Text=\"{Binding DisplayName, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Margin=\"0,52,18,30\" FontSize=\"23\" FontFamily=\"Segoe WP Bold\"/>\r\n                </DataTemplate>\r\n            </ListBox.ItemTemplate>\r\n        </ListBox>\r\n\r\n        <!--<profiling:MemoryCounter Margin=\"0,32,0,0\" IsHitTestVisible=\"False\"/>-->\r\n\r\n        <StackPanel x:Name=\"CaptionButtons\" Orientation=\"Horizontal\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\" Margin=\"18,47,9,0\">\r\n            <controls1:ProxyStatusControl \r\n                x:Name=\"ProxyStatus\" \r\n                Visibility=\"{Binding IsProxyEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\"\r\n                ConnectionType=\"{Binding ConnectionType}\"\r\n                IsIndeterminate=\"{Binding Connecting}\" \r\n                Tap=\"ProxyStatus_OnTap\"/>\r\n            <Button Margin=\"0\" Style=\"{StaticResource HiddenButtonStyle}\" toolkit:TiltEffect.SuppressTilt=\"True\" Tap=\"TogglePasscodeState_OnTap\" Visibility=\"{Binding IsPasscodeEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                <Border Width=\"22\" Height=\"22\" Margin=\"0,0,0,0\" Opacity=\"0\" IsHitTestVisible=\"False\" x:Name=\"PasscodeIcon\" Background=\"{Binding PasscodeImageBrush}\">\r\n                    <Border.OpacityMask>\r\n                        <ImageBrush Stretch=\"Uniform\" ImageSource=\"{Binding PasscodeImageSource}\" ImageOpened=\"ImageBrush_OnImageOpened\"/>\r\n                    </Border.OpacityMask>\r\n                </Border>\r\n            </Button>\r\n        </StackPanel>\r\n\r\n        <Grid Grid.Row=\"1\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <controls:Pivot\r\n\t\t\t    x:Name=\"Items\"\r\n                Visibility=\"Visible\"\r\n                Grid.Row=\"1\"\r\n                Margin=\"0,-10,0,0\"\r\n\t\t\t    SelectedItem=\"{Binding ActiveItem, Mode=TwoWay}\"\r\n                SelectionChanged=\"Items_OnSelectionChanged\"\r\n                Style=\"{StaticResource W10MPivotStyle}\">\r\n                <controls:Pivot.Title>\r\n                    <StackPanel Orientation=\"Horizontal\">\r\n                        <!--<TextBlock Margin=\"0,0,0,-3\" IsHitTestVisible=\"False\" Text=\"{Binding Resources.AppName, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>-->\r\n                        <!--<profiling:MemoryCounter VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\"/>-->\r\n                    </StackPanel>\r\n                </controls:Pivot.Title>\r\n                <controls:Pivot.HeaderTemplate>\r\n                    <DataTemplate/>\r\n                </controls:Pivot.HeaderTemplate>\r\n            </controls:Pivot>\r\n            <ContentControl x:Name=\"LiveLocationBadge\" d:IsHidden=\"True\" Grid.Row=\"0\" Margin=\"0,-6,0,0\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Top\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"/>\r\n        </Grid>\r\n\r\n        <ContentControl x:Name=\"SearchContentControl\" d:IsHidden=\"True\" Grid.Row=\"0\" Grid.RowSpan=\"3\" Visibility=\"Collapsed\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"/>\r\n        <ContentControl x:Name=\"LocationPicker\" d:IsHidden=\"True\" Grid.Row=\"0\" Grid.RowSpan=\"3\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"/>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n            <StackPanel>\r\n                <ListBoxItem Tap=\"Test_OnTap\" Visibility=\"Collapsed\" Padding=\"18\" Content=\"Telegram Passport\" FontSize=\"23\"/>\r\n                <ListBoxItem Tap=\"Test2_OnTap\" Visibility=\"Collapsed\" Padding=\"18\" Content=\"Blocking update\" FontSize=\"23\"/>\r\n                <ListBoxItem Tap=\"Settings_OnTap\" Padding=\"18\" Content=\"{Binding Resources.Settings, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                <ListBoxItem Tap=\"About_OnTap\" Padding=\"18\" Content=\"{Binding Resources.AboutApp, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n            </StackPanel>\r\n        </Border>\r\n        <controls1:TelegramApplicationBar\r\n            Visibility=\"Visible\"\r\n            Grid.Row=\"2\"\r\n            x:Name=\"AppBarPanel\" \r\n            VerticalAlignment=\"Bottom\"\r\n            MorePanel=\"{Binding ElementName=MorePanel}\">\r\n            <controls1:TelegramApplicationBar.Buttons>\r\n                <controls1:TelegramAppBarButton\r\n                    x:Name=\"SearchButton\"\r\n                    Grid.Column=\"3\" \r\n                    Tap=\"Search_OnTap\"\r\n                    ImageSource=\"/Images/ApplicationBar/ic_search_2x.png\"\r\n                    Text=\"{Binding Resources.Search, Source={StaticResource Strings}}\"/>\r\n                <controls1:TelegramAppBarButton\r\n                    x:Name=\"AddButton\"\r\n                    Grid.Column=\"2\" \r\n                    Tap=\"Add_OnTap\"\r\n                    ImageSource=\"/Images/ApplicationBar/ic_plus_2x.png\"\r\n                    Text=\"{Binding Resources.NewChat, Source={StaticResource Strings}}\"/>\r\n            </controls1:TelegramApplicationBar.Buttons>\r\n        </controls1:TelegramApplicationBar>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient/Views/ShellView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Numerics;\r\nusing System.Security.Cryptography;\r\nusing System.Security.Cryptography.X509Certificates;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing System.Xml.Serialization;\r\nusing Windows.ApplicationModel;\r\nusing Windows.ApplicationModel.Activation;\r\nusing Windows.Networking;\r\nusing Windows.System;\r\nusing FFmpegInterop;\r\nusing Microsoft.Phone.Info;\r\nusing Microsoft.Phone.Networking.Voip;\r\nusing Microsoft.Phone.Scheduler;\r\nusing Org.BouncyCastle.Crypto.Parameters;\r\nusing Org.BouncyCastle.Security;\r\nusing PhoneVoIPApp.BackEnd;\r\nusing PhoneVoIPApp.UI;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.ViewModels.Search;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Dialogs;\r\nusing TelegramClient.Views.Search;\r\n#if WP8\r\nusing TelegramClient_WebP.LibWebP;\r\nusing Windows.Phone.PersonalInformation;\r\n#endif\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing TelegramClient.Utils;\r\n#if WP81\r\nusing Windows.ApplicationModel.Background;\r\nusing Windows.Storage.Pickers;\r\n#endif\r\nusing Caliburn.Micro;\r\nusing libtgnet;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.Services.Connection;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Help;\r\nusing Telegram.Api.Transport;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Passport;\r\nusing TelegramClient.Views.Media;\r\nusing EnterPasswordViewModel = TelegramClient.ViewModels.Passport.EnterPasswordViewModel;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views\r\n{\r\n    public partial class ShellView\r\n    {\r\n        private static Brush _captionBrush;\r\n\r\n        public static Brush CaptionBrush\r\n        {\r\n            get\r\n            {\r\n                if (_captionBrush != null)\r\n                {\r\n                    return _captionBrush;\r\n                }\r\n\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                _captionBrush = isLightTheme\r\n                    ? (Brush)Application.Current.Resources[\"TelegramBrush\"]\r\n                    : (Brush)Application.Current.Resources[\"PhoneChromeBrush\"];\r\n\r\n                return _captionBrush;\r\n            }\r\n        }\r\n\r\n        private ShellViewModel ViewModel { get { return DataContext as ShellViewModel; } }\r\n\r\n        private bool _firstRun = true;\r\n\r\n        private readonly ApplicationBarIconButton _addContactButton = new ApplicationBarIconButton\r\n        {\r\n            Text = AppResources.ComposeMessage,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.add.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly ApplicationBarIconButton _searchButton = new ApplicationBarIconButton\r\n        {\r\n            Text = AppResources.Search,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.feature.search.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _backMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = \"to test mode\"\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _refreshMenuItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Refresh\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _settingsItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Settings,\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _reviewItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.Review,\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _aboutItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = AppResources.About,\r\n        };\r\n\r\n#if DEBUG\r\n        private readonly ApplicationBarMenuItem _openConfig = new ApplicationBarMenuItem\r\n        {\r\n            Text = \"Open config\",\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _getCurrentPacketInfoItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = \"Info\",\r\n        };\r\n\r\n        private readonly ApplicationBarMenuItem _showRegistrationLogItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = \"Log\",\r\n        };\r\n#endif\r\n        private readonly ApplicationBarMenuItem _importContactsItem = new ApplicationBarMenuItem\r\n        {\r\n            Text = \"import contacts\",\r\n        };\r\n\r\n        public ShellView()\r\n        {\r\n            App.Log(\"start ShellView.ctor\");\r\n\r\n            InitializeComponent();\r\n\r\n            //ItemsHeaders.Items.Add(new HeaderItem { DisplayName = AppResources.ChatNominativePlural });\r\n            //ItemsHeaders.Items.Add(new HeaderItem { DisplayName = AppResources.Calls });\r\n            //ItemsHeaders.Items.Add(new HeaderItem { DisplayName = AppResources.Contacts });\r\n            //ItemsHeaders.SelectedIndex = 0;\r\n\r\n            Caption.Background = CaptionBrush;\r\n            CaptionButtons.Background = CaptionBrush;\r\n\r\n            App.Log(\"ShellView.InitializeComponent\");\r\n\r\n            OptimizeFullHD();\r\n\r\n            //throw new Exception(\"test\");\r\n\r\n            _addContactButton.Click += (sender, args) => ViewModel.Add();\r\n            _searchButton.Click += (sender, args) => ViewModel.Search();\r\n\r\n            _backMenuItem.Click += async (sender, args) =>\r\n            {\r\n                //var openCVComponent = new OpenCVComponent.OpenCVLib();\r\n                //openCVComponent.ProcessImageAsync(\"test.jpg\");\r\n                return;\r\n                ulong fileSize2 = 0;\r\n                var file2 = await Package.Current.InstalledLocation.GetFileAsync(\"2.mp4\");\r\n                var properties2 = await file2.GetBasicPropertiesAsync();\r\n                fileSize2 = properties2.Size;\r\n                var fileName2 = file2.Path;\r\n                var _decoderParams2 = new int[3];\r\n                var _handle2 = FFmpegGifDecoder.CreateDecoder(fileName2, _decoderParams2);\r\n                var _w2 = _decoderParams2[0];\r\n                var _h2 = _decoderParams2[1];\r\n                //_t2.Change(TimeSpan.FromSeconds(0.1), TimeSpan.FromSeconds(0.1));\r\n\r\n                return;\r\n                var dialogs = Items.Items.FirstOrDefault(x => x is DialogsViewModel) as DialogsViewModel;\r\n                if (dialogs != null)\r\n                {\r\n                    dialogs.TestMode = !dialogs.TestMode;\r\n                    _backMenuItem.Text = dialogs.TestMode ? \"to normal mode\" : \"to test mode\";\r\n                }\r\n            };\r\n            _refreshMenuItem.Click += (sender, args) => ViewModel.RefreshItems();\r\n            _settingsItem.Click += (sender, args) => ViewModel.OpenSettings();\r\n            _reviewItem.Click += (sender, args) => ViewModel.Review();\r\n            _aboutItem.Click += (sender, args) =>\r\n            {\r\n                ViewModel.About();\r\n            };\r\n            _importContactsItem.Click += (o, e) => { };//ViewModel.ImportContactsAsync();\r\n\r\n            Items.SelectionChanged += (sender, args) =>\r\n            {\r\n                if (ApplicationBar == null) return;\r\n\r\n                var contacts = Items.SelectedItem as ContactsViewModel;\r\n\r\n                if (contacts != null)\r\n                {\r\n                    _addContactButton.Text = AppResources.Add;\r\n                    return;\r\n                }\r\n\r\n                var dialogs = Items.SelectedItem as DialogsViewModel;\r\n\r\n                if (dialogs != null)\r\n                {\r\n                    _addContactButton.Text = AppResources.ComposeMessage;\r\n                    return;\r\n                }\r\n            };\r\n\r\n            Loaded += InitializeMTProtoService;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                //if (ViewModel.Items.Count == 0)\r\n                //{\r\n                //    Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                //    {\r\n                //        Items.SelectionChanged -= Items_OnSelectionChanged;\r\n                //        //ItemsHeaders.SelectionChanged -= ItemsHeaders_OnSelectionChanged;\r\n\r\n                //        ViewModel.Load();\r\n\r\n                //        if (ItemsHeaders.Items.Count < ViewModel.Items.Count)\r\n                //        {\r\n                //            ItemsHeaders.Items.Clear();\r\n                //            foreach (var item in ViewModel.Items)\r\n                //            {\r\n                //                ItemsHeaders.Items.Add(item);\r\n                //            }\r\n                //            ItemsHeaders.SelectedItem = Items.SelectedItem;\r\n                //        }\r\n\r\n                //        //ItemsHeaders.SelectionChanged += ItemsHeaders_OnSelectionChanged;\r\n                //        Items.SelectionChanged += Items_OnSelectionChanged;\r\n                //    });\r\n                //}\r\n\r\n                //MessageBox.Show(\"ShellViewModel.OnLoaded\");\r\n                TelegramPropertyChangedBase.LogNotify = false;\r\n                App.Log(\"start ShellView.Loaded\");\r\n#if WP81\r\n                NavigationService.PauseOnBack = true;\r\n#endif\r\n                Items.Opacity = 1.0;\r\n                var result = RunAnimation((o, e) =>\r\n                {\r\n                    if (ViewModel.Dialogs.UpdateCompletedDialogs != null)\r\n                    {\r\n                        ViewModel.Dialogs.UpdateCompleted(ViewModel.Dialogs.UpdateCompletedDialogs);\r\n                        ViewModel.Dialogs.UpdateCompletedDialogs = null;\r\n                    }\r\n\r\n                    ReturnItemsVisibility();\r\n                });\r\n                if (!result)\r\n                {\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(ReturnItemsVisibility);\r\n                }\r\n\r\n                if (ViewModel != null) ViewModel.OnAnimationComplete();\r\n                if (!_firstRun)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                _firstRun = false;\r\n                App.Log(\"end ShellView.Loaded\");\r\n            };\r\n\r\n#if WP81\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(2.0), async () =>\r\n            {\r\n                foreach (var backgroundTaskRegistration in Windows.ApplicationModel.Background.BackgroundTaskRegistration.AllTasks.Values)\r\n                {\r\n                    //Telegram.Logs.Log.Write(\"::Unregister background task \" + backgroundTaskRegistration.Name);\r\n                    backgroundTaskRegistration.Unregister(true);\r\n                }\r\n\r\n                var result = await Windows.ApplicationModel.Background.BackgroundExecutionManager.RequestAccessAsync();\r\n\r\n                if (result == BackgroundAccessStatus.AllowedMayUseActiveRealTimeConnectivity\r\n                    || result == BackgroundAccessStatus.AllowedWithAlwaysOnRealTimeConnectivity)\r\n                {\r\n                    //var builder0 = new BackgroundTaskBuilder();\r\n                    //builder0.Name = Constants.PushNotificationsBackgroundTaskName + \"VoIP\";\r\n                    //builder0.TaskEntryPoint = \"PhoneVoIPApp.BackEnd.BackgroundTask\"; //\"PhoneVoIPApp.Agents.BackgroundTask\";\r\n                    //builder0.SetTrigger(new PushNotificationTrigger());\r\n                    //builder0.Register();\r\n\r\n                    var builder = new BackgroundTaskBuilder();\r\n                    builder.Name = Constants.PushNotificationsBackgroundTaskName;\r\n                    builder.TaskEntryPoint = \"TelegramClient.Tasks.PushNotificationsBackgroundTask\";\r\n                    builder.SetTrigger(new PushNotificationTrigger());\r\n                    builder.Register();\r\n                    //Telegram.Logs.Log.Write(\"::Register background task \" + builder.Name);\r\n\r\n                    //var builder2 = new BackgroundTaskBuilder();\r\n                    //builder2.Name = Constants.MessageSchedulerBackgroundTaskName;\r\n                    //builder2.TaskEntryPoint = \"TelegramClient.Tasks.MessageSchedulerBackgroundTask\";\r\n                    //builder2.SetTrigger(new SystemTrigger(SystemTriggerType.InternetAvailable, false));\r\n                    ////builder2.AddCondition(new SystemCondition(SystemConditionType.InternetAvailable));\r\n                    //builder2.Register();\r\n                    ////Telegram.Logs.Log.Write(\"::Register background task \" + builder2.Name);\r\n\r\n                    //var builder3 = new BackgroundTaskBuilder();\r\n                    //builder3.Name = Constants.TimerMessageSchedulerBackgroundTaskName;\r\n                    //builder3.TaskEntryPoint = \"TelegramClient.Tasks.MessageSchedulerBackgroundTask\";\r\n                    //builder3.SetTrigger(new TimeTrigger(30, false));\r\n                    //builder3.AddCondition(new SystemCondition(SystemConditionType.InternetAvailable));\r\n                    //builder3.Register();\r\n                    ////Telegram.Logs.Log.Write(\"::Register background task \" + builder3.Name);\r\n\r\n                    var builder4 = new BackgroundTaskBuilder();\r\n                    builder4.Name = Constants.BackgroundDifferenceLoaderTaskName;\r\n                    builder4.TaskEntryPoint = \"TelegramClient.Tasks.BackgroundDifferenceLoader\";\r\n                    builder4.SetTrigger(new PushNotificationTrigger());\r\n                    builder4.Register();\r\n                    //Telegram.Logs.Log.Write(\"::Register background task \" + builder4.Name);\r\n\r\n                    var type = typeof(IBackgroundTrigger).Assembly.GetType(\"Windows.ApplicationModel.Background.ToastNotificationActionTrigger\");\r\n                    if (type != null)\r\n                    {\r\n                        var trigger = (IBackgroundTrigger)Activator.CreateInstance(type);\r\n                        var builder5 = new BackgroundTaskBuilder();\r\n                        builder5.Name = Constants.InteractiveNotificationsBackgroundTaskName;   //\"InteractiveNotificationsBackgroundTask\";\r\n                        builder5.TaskEntryPoint = \"TelegramClient.Tasks.InteractiveNotificationsBackgroundTask\";\r\n                        builder5.SetTrigger(trigger);\r\n                        builder5.Register();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    Telegram.Logs.Log.Write(\"::Background tasks are disabled result=\" + result);\r\n                    var messageBoxResult = MessageBox.Show(AppResources.BackgroudnTaskDisabledAlert, AppResources.Warning, MessageBoxButton.OKCancel);\r\n                    if (messageBoxResult == MessageBoxResult.OK)\r\n                    {\r\n                        await Launcher.LaunchUriAsync(new Uri(\"ms-settings-power://\"));\r\n                    }\r\n                }\r\n            });\r\n#endif\r\n\r\n            BuildLocalizedAppBar();\r\n\r\n            App.Log(\"end ShellView.ctor\");\r\n        }\r\n\r\n        private void InitializeMTProtoService(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= InitializeMTProtoService;\r\n\r\n            var transportService = IoC.Get<ITransportService>();\r\n            transportService.TransportConnecting += OnTransportConnecting;\r\n            transportService.TransportConnected += OnTransportConnected;\r\n\r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n            mtProtoService.StartInitialize();\r\n        }\r\n\r\n        private void OnTransportConnected(object sender, TransportEventArgs e)\r\n        {\r\n            if (e.Transport.MTProtoType == MTProtoTransportType.Main)\r\n            {\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    ViewModel.Connecting = false;\r\n                });\r\n            }\r\n        }\r\n\r\n        private void OnTransportConnecting(object sender, TransportEventArgs e)\r\n        {\r\n            if (e.Transport.MTProtoType == MTProtoTransportType.Main)\r\n            {\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var connectionType =\r\n                        e.Transport.ProxyConfig != null\r\n                        && !e.Transport.ProxyConfig.IsEmpty\r\n                        && e.Transport.ProxyConfig.IsEnabled.Value\r\n                            ? ConnectionType.Proxy\r\n                            : ConnectionType.Direct;\r\n\r\n                    var blockedMode = false;\r\n                    if (connectionType == ConnectionType.Direct)\r\n                    {\r\n                        var config = IoC.Get<ICacheService>().GetConfig() as TLConfig78;\r\n                        blockedMode = config != null && config.BlockedMode;\r\n                    }\r\n\r\n                    ViewModel.IsProxyEnabled = connectionType == ConnectionType.Proxy || blockedMode;\r\n                    ViewModel.Connecting = true;\r\n                    ViewModel.ConnectionType = connectionType;\r\n                });\r\n            }\r\n        }\r\n\r\n#if WP81\r\n        private void OnBackgroundTaskCompleted(BackgroundTaskRegistration sender, BackgroundTaskCompletedEventArgs args)\r\n        {\r\n\r\n        }\r\n#endif\r\n\r\n        private double _applicationBarDefaultSize = 72.0;\r\n\r\n        private double _iconSize = 32.0;\r\n\r\n        private double _iconMargin = 20.0;\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n#if WP8\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n            //if (!isFullHD) return;\r\n#endif\r\n\r\n            //Items.HeaderTemplate = (DataTemplate)Application.Current.Resources[\"FullHDPivotHeaderTemplate\"];\r\n        }\r\n\r\n        private void ReturnItemsVisibility()\r\n        {\r\n            if (_searchView != null && SearchContentControl.Visibility == Visibility.Visible)\r\n            {\r\n                return;\r\n            }\r\n\r\n#if DEBUG\r\n            var builder = new StringBuilder();\r\n            builder.AppendLine(Items.SelectedIndex.ToString());\r\n            foreach (ViewModelBase item in Items.Items)\r\n            {\r\n                builder.AppendLine(item.Visibility.ToString());\r\n            }\r\n            //Telegram.Api.Helpers.Execute.ShowDebugMessage(builder.ToString());\r\n#endif\r\n\r\n            foreach (ViewModelBase item in Items.Items)\r\n            {\r\n                item.Visibility = Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        private bool _isBackwardInAnimation;\r\n\r\n        private bool RunAnimation(EventHandler callback)\r\n        {\r\n            if (_isBackwardInAnimation)\r\n            {\r\n                _isBackwardInAnimation = false;\r\n\r\n                if (NextUri != null\r\n                    && NextUri.ToString().Contains(\"DialogDetailsView.xaml\"))\r\n                {\r\n                    var storyboard = new Storyboard();\r\n\r\n                    var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 150.0 });\r\n                    translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.35), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n                    Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                    Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                    storyboard.Children.Add(translateAnimation);\r\n\r\n                    //LayoutRoot.Opacity = 1.0;\r\n                    LayoutRoot.Opacity = 0.0;\r\n                    var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                    opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.35), Value = 1.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n                    Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                    Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                    storyboard.Children.Add(opacityAnimation);\r\n                    if (callback != null)\r\n                    {\r\n                        storyboard.Completed += callback;\r\n                    }\r\n\r\n                    Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n                    return true;\r\n                }\r\n\r\n                if (NextUri != null\r\n                    && (NextUri.ToString().EndsWith(\"AboutView.xaml\")\r\n                        || NextUri.ToString().EndsWith(\"SettingsView.xaml\")\r\n                        || NextUri.ToString().EndsWith(\"ProxyView.xaml\")\r\n                        || NextUri.ToString().EndsWith(\"ProxyListView.xaml\")\r\n                        || NextUri.ToString().Contains(\"EnterPasswordView.xaml\")\r\n                        || NextUri.ToString().Contains(\"PasswordIntroView.xaml\")))\r\n                {\r\n                    var storyboard = TelegramTurnstileAnimations.BackwardIn(LayoutRoot);\r\n                    if (callback != null)\r\n                    {\r\n                        storyboard.Completed += callback;\r\n                    }\r\n                    //var rotationAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    //rotationAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 105.0 });\r\n                    //rotationAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.35), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n                    //Storyboard.SetTarget(rotationAnimation, LayoutRoot);\r\n                    //Storyboard.SetTargetProperty(rotationAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationY)\"));\r\n                    //storyboard.Children.Add(rotationAnimation);\r\n                    //if (callback != null)\r\n                    //{\r\n                    //    storyboard.Completed += callback;\r\n                    //}\r\n\r\n                    LayoutRoot.Opacity = 1.0;\r\n\r\n                    Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n                    return true;\r\n                }\r\n                else\r\n                {\r\n                    ((CompositeTransform)LayoutRoot.RenderTransform).TranslateY = 0.0;\r\n                    LayoutRoot.Opacity = 1.0;\r\n                    return false;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                ((CompositeTransform)LayoutRoot.RenderTransform).TranslateY = 0.0;\r\n                LayoutRoot.Opacity = 1.0;\r\n                return false;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n#if DEBUG\r\n        private void GetCurrentPacketInfoItemOnClick(object sender, System.EventArgs eventArgs)\r\n        {\r\n            ViewModel.GetCurrentPacketInfo();\r\n        }\r\n#endif\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            return;\r\n\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            //ApplicationBar.Opacity = 0.99;\r\n\r\n            ApplicationBar.Buttons.Add(_addContactButton);\r\n            ApplicationBar.Buttons.Add(_searchButton);\r\n\r\n#if DEBUG\r\n            ApplicationBar.MenuItems.Add(_backMenuItem);\r\n#endif\r\n\r\n            ApplicationBar.MenuItems.Add(_refreshMenuItem);\r\n            ApplicationBar.MenuItems.Add(_settingsItem);\r\n            ApplicationBar.MenuItems.Add(_reviewItem);\r\n            ApplicationBar.MenuItems.Add(_aboutItem);\r\n            //ApplicationBar.MenuItems.Add(_backMenuItem);\r\n            //#if DEBUG\r\n            //            ApplicationBar.MenuItems.Add(_importContactsItem);\r\n            //            ApplicationBar.MenuItems.Add(_openConfig);\r\n            //            ApplicationBar.MenuItems.Add(_getCurrentPacketInfoItem);\r\n            //            ApplicationBar.MenuItems.Add(_showRegistrationLogItem);\r\n            //#endif\r\n        }\r\n\r\n        private bool _fromExternal;\r\n\r\n        private static readonly Uri ExternalUri = new Uri(@\"app://external/\");\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n            //MessageBox.Show(string.Format(\"ShellViewModel.OnNavigatedFrom mode={0} uri={1}\", e.Uri, e.NavigationMode));\r\n\r\n            ShellViewModel.WriteTimer(\"ShellView start OnNavigatedFrom\");\r\n\r\n            AppBarPanel.Close();\r\n\r\n            _fromExternal = e.Uri == ExternalUri;\r\n            var selectedIndex = Items.SelectedIndex;\r\n            for (var i = 0; i < Items.Items.Count; i++)\r\n            {\r\n                if (selectedIndex != i)\r\n                {\r\n                    ((ViewModelBase)Items.Items[i]).Visibility = Visibility.Collapsed;\r\n                }\r\n            }\r\n\r\n            base.OnNavigatedFrom(e);\r\n\r\n            ShellViewModel.WriteTimer(\"ShellView stop OnNavigatedFrom\");\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (e.NavigationMode == NavigationMode.Back)\r\n            {\r\n                //if (e.EndsWith(\"DialogDetailsView.xaml\"))\r\n                {\r\n                    //LayoutRoot.Opacity = 0.0;\r\n                    _isBackwardInAnimation = true;\r\n                }\r\n            }\r\n\r\n            if (e.NavigationMode == NavigationMode.New)\r\n            {\r\n                // share photo \r\n                string fileId;\r\n                if (NavigationContext.QueryString.TryGetValue(\"FileId\", out fileId))\r\n                {\r\n                    IoC.Get<IStateService>().FileId = fileId;\r\n                    while (NavigationService.RemoveBackEntry() != null) { }\r\n                }\r\n            }\r\n            else if (e.NavigationMode == NavigationMode.Refresh)\r\n            {\r\n                // share photo \r\n                string fileId;\r\n                if (NavigationContext.QueryString.TryGetValue(\"FileId\", out fileId))\r\n                {\r\n                    IoC.Get<IStateService>().FileId = fileId;\r\n                }\r\n            }\r\n\r\n            string phoneCallId;\r\n            if (NavigationContext.QueryString.TryGetValue(\"phone_call_id\", out phoneCallId))\r\n            {\r\n                IoC.Get<IStateService>().PhoneCallId = phoneCallId;\r\n            }\r\n\r\n            if (_lastTapedItem != null)\r\n            {\r\n                var transform = _lastTapedItem.RenderTransform as CompositeTransform;\r\n                if (transform != null)\r\n                {\r\n                    transform.TranslateX = 0.0;\r\n                    transform.TranslateY = 0.0;\r\n                }\r\n                _lastTapedItem.Opacity = 1.0;\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        private static FrameworkElement _lastTapedItem;\r\n        public Uri NextUri;\r\n\r\n        public static Storyboard StartContinuumForwardOutAnimation(FrameworkElement tapedItem, FrameworkElement tapedItemContainer = null, bool saveLastTapedItem = true)\r\n        {\r\n            if (saveLastTapedItem)\r\n            {\r\n                _lastTapedItem = tapedItem;\r\n                _lastTapedItem.CacheMode = new BitmapCache();\r\n            }\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var timeline = new DoubleAnimationUsingKeyFrames();\r\n            timeline.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            timeline.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 73.0 });\r\n            Storyboard.SetTarget(timeline, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(timeline);\r\n\r\n            var timeline2 = new DoubleAnimationUsingKeyFrames();\r\n            timeline2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            timeline2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 425.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 } });\r\n            Storyboard.SetTarget(timeline2, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(timeline2);\r\n\r\n            var timeline3 = new DoubleAnimationUsingKeyFrames();\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 1.0 });\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = 1.0 });\r\n            timeline3.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n            Storyboard.SetTarget(timeline3, tapedItem);\r\n            Storyboard.SetTargetProperty(timeline3, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(timeline3);\r\n\r\n            if (tapedItemContainer != null)\r\n            {\r\n                var timeline4 = new ObjectAnimationUsingKeyFrames();\r\n                timeline4.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 999.0 });\r\n                timeline4.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n                Storyboard.SetTarget(timeline4, tapedItemContainer);\r\n                Storyboard.SetTargetProperty(timeline4, new PropertyPath(\"(Canvas.ZIndex)\"));\r\n                storyboard.Children.Add(timeline4);\r\n            }\r\n\r\n            storyboard.Begin();\r\n\r\n            return storyboard;\r\n        }\r\n\r\n        public void CloseSearch()\r\n        {\r\n            if (_searchView != null && SearchContentControl.Visibility == Visibility.Visible)\r\n            {\r\n                _searchView.ClosePivotAction.SafeInvoke(Visibility.Visible);\r\n                SearchContentControl.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            //MessageBox.Show(string.Format(\"ShellViewModel.OnNavigatingFrom mode={0} uri={1}\", e.Uri, e.NavigationMode));\r\n\r\n            ShellViewModel.WriteTimer(\"ShellView.OnNavigatingFrom start\");\r\n\r\n            base.OnNavigatingFrom(e);\r\n\r\n            ShellViewModel.WriteTimer(\"ShellView.OnNavigatingFrom base.OnNavigatingFrom\");\r\n\r\n            NextUri = e.Uri;\r\n\r\n            var collapseSearchControl = IoC.Get<IStateService>().CollapseSearchControl;\r\n            IoC.Get<IStateService>().CollapseSearchControl = false;\r\n\r\n            if (!e.Cancel)\r\n            {\r\n                if (e.Uri.ToString().Contains(\"DialogDetailsView.xaml\"))\r\n                {\r\n                    var storyboard = new Storyboard();\r\n\r\n                    var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                    translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                    Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                    Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                    storyboard.Children.Add(translateAnimation);\r\n\r\n                    var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                    opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                    Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                    Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                    storyboard.Children.Add(opacityAnimation);\r\n\r\n                    storyboard.Begin();\r\n\r\n                    if (collapseSearchControl)\r\n                    {\r\n                        storyboard.Completed += (o, args) =>\r\n                        {\r\n                            SearchContentControl.Visibility = Visibility.Collapsed;\r\n                        };\r\n                    }\r\n                }\r\n                else if (e.Uri.ToString().EndsWith(\"AboutView.xaml\")\r\n                    || e.Uri.ToString().EndsWith(\"SettingsView.xaml\")\r\n                    || e.Uri.ToString().EndsWith(\"ProxyView.xaml\")\r\n                    || e.Uri.ToString().EndsWith(\"ProxyListView.xaml\")\r\n                    || e.Uri.ToString().Contains(\"EnterPasswordView.xaml\")\r\n                    || e.Uri.ToString().Contains(\"PasswordIntroView.xaml\"))\r\n                {\r\n                    var storyboard = TelegramTurnstileAnimations.ForwardOut(LayoutRoot);\r\n\r\n                    //var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    //translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                    //translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 105.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                    //Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                    //Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.Projection).(PlaneProjection.RotationY)\"));\r\n                    //storyboard.Children.Add(translateAnimation);\r\n\r\n                    //var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    //opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                    //opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                    //Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                    //Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                    //storyboard.Children.Add(opacityAnimation);\r\n\r\n                    storyboard.Begin();\r\n                }\r\n\r\n            }\r\n            ShellViewModel.WriteTimer(\"ShellView.OnNavigatingFrom stop\");\r\n        }\r\n\r\n        private void ImageBrush_OnImageOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            PasscodeIcon.Opacity = 1.0;\r\n        }\r\n\r\n        private void FrameworkElement_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var textBlock = (TextBlock)sender;\r\n            if (textBlock != null)\r\n            {\r\n                MessageBox.Show(textBlock.ActualHeight.ToString());\r\n            }\r\n        }\r\n\r\n        private void ShellView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (_searchView != null && SearchContentControl.Visibility == Visibility.Visible)\r\n            {\r\n                _searchView.BeginCloseStoryboard(() =>\r\n                {\r\n                    Self.Focus();\r\n                    SearchContentControl.Visibility = Visibility.Collapsed;\r\n                    ReturnItemsVisibility();\r\n                });\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.LocationPicker != null\r\n                && ViewModel.LocationPicker.IsOpen)\r\n            {\r\n                ViewModel.LocationPicker.CloseEditor();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            //var fastDialogDetailsView = FastDialogDetails.Content as FastDialogDetailsView;\r\n            //if (fastDialogDetailsView != null)\r\n            //{\r\n            //    fastDialogDetailsView.Close(ViewModel.CloseFastDialogDetails);\r\n\r\n            //    e.Cancel = true;\r\n            //}\r\n        }\r\n\r\n        private void Add_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                ViewModel.Add();\r\n            });\r\n        }\r\n\r\n        private SearchView _searchView;\r\n\r\n        private void Search_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            IoC.Get<IStateService>().GetContactsSettings();\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                MorePanel.Visibility = Visibility.Collapsed;\r\n                AppBarPanel.Visibility = Visibility.Collapsed;\r\n\r\n                if (_searchView == null)\r\n                {\r\n                    var searchViewModel = new SearchViewModel(\r\n                        IoC.Get<ICacheService>(), IoC.Get<ICommonErrorHandler>(),\r\n                        IoC.Get<IStateService>(), IoC.Get<INavigationService>(),\r\n                        IoC.Get<IMTProtoService>(), IoC.Get<ITelegramEventAggregator>());\r\n\r\n                    _searchView = new SearchView();\r\n                    _searchView.ClosePivotAction = visibility =>\r\n                    {\r\n                        Items.IsHitTestVisible = visibility == Visibility.Visible;\r\n                        LiveLocationBadge.IsHitTestVisible = visibility == Visibility.Visible;\r\n                        AppBarPanel.Visibility = visibility;\r\n                    };\r\n                    ViewModelBinder.Bind(searchViewModel, _searchView, null);\r\n\r\n                    SearchContentControl.Visibility = Visibility.Visible;\r\n                    SearchContentControl.Content = _searchView;\r\n                }\r\n                else\r\n                {\r\n                    var searchViewModel = _searchView.DataContext as SearchViewModel;\r\n                    if (searchViewModel != null)\r\n                    {\r\n                        searchViewModel.Text = string.Empty;\r\n                        searchViewModel.NotifyOfPropertyChange(() => searchViewModel.Text);\r\n                    }\r\n                    SearchContentControl.Visibility = Visibility.Visible;\r\n                    _searchView.BeginOpenStoryboard();\r\n                }\r\n            });\r\n        }\r\n\r\n        private void Settings_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            {\r\n                ViewModel.OpenSettings();\r\n            });\r\n        }\r\n\r\n        private void About_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            //MessagePlayerControl.Player.Stop();\r\n\r\n            //libtgvoip.VoIPControllerWrapper.SwitchSpeaker(false);\r\n            //MessagePlayerControl.Player.MediaOpened += StartOnMediaOpened;\r\n            //MessagePlayerControl.Player.MediaFailed += (o, args) =>\r\n            //{\r\n\r\n            //};\r\n            //MessagePlayerControl.Player.Source = new Uri(\"/Sounds/Sound1.wav\", UriKind.Relative);\r\n            //MessagePlayerControl.Player.Play();\r\n            AppBarPanel.Close();\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            {\r\n                //if (_socket != null) _socket.Close();\r\n                ViewModel.About();\r\n\r\n            });\r\n        }\r\n\r\n        //private void StartOnMediaOpened(object sender, RoutedEventArgs e)\r\n        //{\r\n        //    //MessagePlayerControl.Player.MediaOpened -= StartOnMediaOpened;\r\n        //    MessagePlayerControl.Player.Play();\r\n        //}\r\n\r\n        //private void ItemsHeaders_OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        //{\r\n        //    Items.SelectedIndex = ItemsHeaders.SelectedIndex;\r\n        //}\r\n\r\n        private void Items_OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            //if (ItemsHeaders.Items.Count > Items.SelectedIndex)\r\n            //{\r\n            //    ItemsHeaders.SelectedIndex = Items.SelectedIndex;\r\n            //}\r\n\r\n            if (e.AddedItems != null && e.AddedItems.Count > 0)\r\n            {\r\n                foreach (var addedItem in e.AddedItems)\r\n                {\r\n                    var viewModelBase = addedItem as ViewModelBase;\r\n                    if (viewModelBase != null)\r\n                    {\r\n                        viewModelBase.Visibility = Visibility.Visible;\r\n                    }\r\n                }\r\n            }\r\n\r\n            //if (Items.SelectedIndex >= 0\r\n            //    && Items.SelectedIndex < Items.Items.Count)\r\n            //{\r\n            //    ((ViewModelBase)Items.Items[Items.SelectedIndex]).Visibility = Visibility.Visible;\r\n            //}\r\n        }\r\n\r\n        //static byte[] PEM(string type, string pem)\r\n        //{\r\n        //    string header = String.Format(\"-----BEGIN {0}-----\", type);\r\n        //    string footer = String.Format(\"-----END {0}-----\", type);\r\n        //    int start = pem.IndexOf(header) + header.Length;\r\n        //    int end = pem.IndexOf(footer, start);\r\n        //    string base64 = pem.Substring(start, (end - start));\r\n        //    return Convert.FromBase64String(base64);\r\n        //}\r\n\r\n        //static X509Certificate LoadCertificateFile(string filename)\r\n        //{\r\n        //    X509Certificate x509 = null;\r\n        //    using (FileStream fs = File.OpenRead(filename))\r\n        //    {\r\n        //        byte[] data = new byte[fs.Length];\r\n        //        fs.Read(data, 0, data.Length);\r\n        //        if (data[0] != 0x30)\r\n        //        {\r\n        //            // maybe it's ASCII PEM base64 encoded ? \r\n        //            data = PEM(\"CERTIFICATE\", data);\r\n        //        }\r\n        //        if (data != null)\r\n        //            x509 = new X509Certificate(data);\r\n        //    }\r\n\r\n        //    return x509;\r\n        //} \r\n\r\n        private async void Test2_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n            if (frame != null)\r\n            {\r\n                frame.ShowBlockingPlaceholder(() =>\r\n                {\r\n                    Launcher.LaunchUriAsync(new Uri(\"ms-windows-store://pdp/?productid=9WZDNCRDZHS0\"));\r\n                });\r\n            }\r\n        }\r\n\r\n        private ConnectionSocketWrapper _socket;\r\n\r\n        private async void Test_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n            var passportConfig = IoC.Get<IStateService>().GetPassportConfig();\r\n            var passportConfigHash = passportConfig != null ? passportConfig.Hash : new TLInt(0);\r\n\r\n            IoC.Get<IMTProtoService>().GetPassportDataAsync(\r\n                (result1, result2) => Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (result1.HasPassword)\r\n                    {\r\n                        IoC.Get<IStateService>().Password = result1;\r\n                        IoC.Get<IStateService>().SecureValues = result2;\r\n                        IoC.Get<INavigationService>().UriFor<EnterPasswordViewModel>().Navigate();\r\n                        return;\r\n                    }\r\n\r\n                    if (!result1.HasPassword)\r\n                    {\r\n                        if (!TLString.IsNullOrEmpty(result1.EmailUnconfirmedPattern))\r\n                        {\r\n                            IoC.Get<IStateService>().Password = result1;\r\n                            IoC.Get<IStateService>().SecureValues = result2;\r\n                            IoC.Get<INavigationService>().UriFor<PasswordViewModel>().Navigate();\r\n                        }\r\n                        else\r\n                        {\r\n                            IoC.Get<IStateService>().Password = result1;\r\n                            IoC.Get<IStateService>().SecureValues = result2;\r\n                            IoC.Get<INavigationService>().UriFor<PasswordIntroViewModel>().Navigate();\r\n                        }\r\n                        return;\r\n                    }\r\n                }),\r\n                error =>\r\n                {\r\n\r\n                });\r\n            return;\r\n            ShellViewModel.ShowCustomMessageBox(null, null, \"update (29MB)\", \"cancel\",\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        Launcher.LaunchUriAsync(new Uri(\"ms-windows-store://pdp/?productid=9WZDNCRDZHS0\"));\r\n                    }\r\n                },\r\n                new UpdateAppControl { Margin = new Thickness(-12.0, -32.0, -12.0, -12.0), ShowBottomMenu = false });\r\n            return;\r\n            //ViewModel.Handle(new MTProtoProxyDisabledEventArgs());\r\n\r\n            /*ViewModel.MTProtoService.GetProxyDataAsync(\r\n                result =>\r\n                {\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(result.ToString());\r\n                },\r\n                error =>\r\n                {\r\n                    \r\n                });*/\r\n\r\n            //return;\r\n\r\n            //var channels = new TLVector<TLInputChannelBase>();\r\n\r\n\r\n            //ViewModel.MTProtoService.SetFeedBroadcastsAsync(new TLInt(1),\r\n            //    channels,\r\n            //    TLBool.False,\r\n            //    result =>\r\n            //    {\r\n\r\n            //    },\r\n            //    error =>\r\n            //    {\r\n\r\n            //    });\r\n\r\n            //AppBarPanel.Close();\r\n            //GC.Collect();\r\n            //GC.WaitForPendingFinalizers();\r\n            //GC.WaitForFullGCComplete();\r\n            //GC.Collect();\r\n            //return;\r\n            //#if DEBUG\r\n            //            ViewModel.MTProtoService.CheckPublicConfig();\r\n            //#endif\r\n            //var key = new byte[32];\r\n            //var iv = new byte[16];\r\n            //var ecount = new byte[16];\r\n            //var data = new byte[1024];\r\n            //uint num = 0;\r\n\r\n            //var result = ConnectionSocketWrapper.AesCtr(data, new TCPO2StateWrapper {Ecount = ecount, IV = iv, Key = key, Num = 0});\r\n            //var result2 = Telegram.Api.Helpers.Utils.AES_ctr128_encrypt2(data, key, ref iv, ref ecount, ref num);\r\n\r\n            //for (int i = 0; i < result.Length; i++)\r\n            //{\r\n            //    if (result[i] != result2[i])\r\n            //    {\r\n\r\n            //    }\r\n            //}\r\n\r\n            //return;\r\n\r\n            var connectionSettings = new ConnectionSettings\r\n            {\r\n                ProtocolDCId = 4,\r\n                ProtocolSecret = null,\r\n                Host = \"104.233.13.83\",\r\n                Port = 443,\r\n                IPv4 = true\r\n            };\r\n            var dcOption = TLUtils.GetDCOption(IoC.Get<ICacheService>().GetConfig(), new TLInt(connectionSettings.ProtocolDCId));\r\n\r\n            var request = new TLGetConfig();//new TLPing {PingId = TLLong.Random()};\r\n            var message = ViewModel.MTProtoService.GetEncryptedTransportMessage(dcOption.AuthKey, dcOption.Salt, request);\r\n            var packet = message.ToBytes();\r\n\r\n            if (_socket == null)\r\n            {\r\n                var proxyConfig = IoC.Get<ITransportService>().GetProxyConfig();\r\n                var socks5Proxy = proxyConfig.GetProxy() as TLSocks5Proxy;\r\n                if (socks5Proxy != null)\r\n                {\r\n                    var proxy = new HostName(socks5Proxy.Server.ToString());\r\n                    var proxySettings = new ProxySettings\r\n                    {\r\n                        Type = ProxyType.Socks5,\r\n                        Host = socks5Proxy.Server.ToString(),\r\n                        Port = socks5Proxy.Port.Value,\r\n                        IPv4 = proxy.Type == HostNameType.Ipv4,\r\n                        Username = socks5Proxy.Username.ToString(),\r\n                        Password = socks5Proxy.Password.ToString()\r\n                    };\r\n                }\r\n\r\n                var socket = new ConnectionSocketWrapper(connectionSettings, null);\r\n                socket.Closed += wrapper =>\r\n                {\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"Connection closed\");\r\n                };\r\n                socket.PacketReceived += (wrapper, bytes) =>\r\n                {\r\n                    var position = 0;\r\n                    var encryptedMessage = (TLEncryptedTransportMessage)new TLEncryptedTransportMessage().FromBytes(bytes, ref position);\r\n\r\n                    encryptedMessage.Decrypt(dcOption.AuthKey);\r\n\r\n                    position = 0;\r\n                    var transportMessage = TLObject.GetObject<TLTransportMessage>(encryptedMessage.Data, ref position);\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"PacketReceived length=\" + bytes.Length);\r\n                };\r\n                socket.Connect();\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                {\r\n                    socket.StartReceive();\r\n                });\r\n\r\n                _socket = socket;\r\n            }\r\n            _socket.SendPacket(packet);\r\n            //var bufferSize = socket.GetReceiveBufferSize();\r\n            //var bufferSize2 = socket.GetSendBufferSize();\r\n            //ViewModel.MTProtoService.GetCdnConfigAsync(\r\n            //    result =>\r\n            //    {\r\n\r\n            //    },\r\n            //    error =>\r\n            //    {\r\n\r\n            //    });\r\n\r\n            //var publicConfigService = new PublicConfigService();\r\n            //publicConfigService.GetAsync(\r\n            //    result =>\r\n            //    {\r\n\r\n            //    },\r\n            //    error =>\r\n            //    {\r\n\r\n            //    });\r\n\r\n            //return;\r\n            //var xml = \"<RSAKeyValue><Modulus>yr+18Rex2ohtVy8sroGPBwXD3DOoKCSpjDqYoXgCqB7ioln4eDCFfOBUlfXUEvM/fnKCpF46VkAftlb4VuPDeQSS/ZxZYEGqHaywlroVnXHIjgqoxiAd192xRGreuXIaUKmkwlM9JID9WS2jUsTpzQ91L8MEPLJ/4zrBwZua8W5fECwCCh2c9G5IzzBm+otMS/YKwmR1olzRCyEkyAEjXWqBI9Ftv5eG8m0VkBzOG655WIYdyV0HfDK/NWcvGqa0w/nriMD6mDjKOryamw0OP9QuYgMN0C9xMW9y8SmP4h92OAWodTYgY1hZCxdv6cs5UnW9+PWvS+WIbkh+GaWYxw==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>\";\r\n\r\n            //var provider = new RSACryptoServiceProvider();\r\n            //provider.FromXmlString(xml);\r\n            //var parameters = provider.ExportParameters(false);\r\n            //var modulus = parameters.Modulus;\r\n            //var exponent = parameters.Exponent;\r\n\r\n            //var request = WebRequest.Create(\"https://google.com/\");\r\n            //request.Headers[\"Host\"] = \"dns-telegram.appspot.com\";\r\n\r\n            //string dataString;\r\n            //using (var response = await request.GetResponseAsync())\r\n            //{\r\n            //    using (var s = response.GetResponseStream())\r\n            //    {\r\n            //        using (var readStream = new StreamReader(s))\r\n            //        {\r\n            //            dataString = readStream.ReadToEnd().Replace(\"\\r\\n\", string.Empty).Replace(\"\\n\", string.Empty);\r\n            //        }\r\n            //    }\r\n            //}\r\n\r\n            //var data = Convert.FromBase64String(dataString);\r\n\r\n            //var builder = new StringBuilder();\r\n            //foreach (var d in data)\r\n            //{\r\n            //    builder.Append(\", \" + d);\r\n            //}\r\n            //System.Diagnostics.Debug.WriteLine(builder.ToString());\r\n\r\n            //var dataBI = new BigInteger(data.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n            //var exponentBI = new BigInteger(exponent.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n            //var modulusBI = new BigInteger(modulus.Reverse().Concat(new byte[] { 0x00 }).ToArray());\r\n\r\n            //var authKey = BigInteger.ModPow(dataBI, exponentBI, modulusBI).ToByteArray();\r\n            //if (authKey[authKey.Length - 1] == 0x00)\r\n            //{\r\n            //    authKey = authKey.SubArray(0, authKey.Length - 1);\r\n            //}\r\n\r\n            //authKey = authKey.Reverse().ToArray();\r\n\r\n            //if (authKey.Length > 256)\r\n            //{\r\n            //    var correctedAuth = new byte[256];\r\n            //    Array.Copy(authKey, authKey.Length - 256, correctedAuth, 0, 256);\r\n            //    authKey = correctedAuth;\r\n            //}\r\n            //else if (authKey.Length < 256)\r\n            //{\r\n            //    var correctedAuth = new byte[256];\r\n            //    Array.Copy(authKey, 0, correctedAuth, 256 - authKey.Length, authKey.Length);\r\n            //    for (var i = 0; i < 256 - authKey.Length; i++)\r\n            //    {\r\n            //        authKey[i] = 0;\r\n            //    }\r\n            //    authKey = correctedAuth;\r\n            //}\r\n\r\n            //var key = authKey.SubArray(0, 32);\r\n            //var iv = authKey.SubArray(16, 16);\r\n            //var encryptedData = authKey.SubArray(32, authKey.Length - 32);\r\n\r\n            //var cipher = CipherUtilities.GetCipher(\"AES/CBC/NOPADDING\");\r\n            //var param = new KeyParameter(key);\r\n            //cipher.Init(false, new ParametersWithIV(param, iv));\r\n            //var decryptedData = cipher.DoFinal(encryptedData);\r\n\r\n            //var hash = Telegram.Api.Helpers.Utils.ComputeSHA256(decryptedData.SubArray(0, 208));\r\n            //for (var i = 0; i < 16; i++)\r\n            //{\r\n            //    if (hash[i] != decryptedData[208 + i])\r\n            //    {\r\n            //        return;\r\n            //    }\r\n            //}\r\n\r\n            //var position = 4;\r\n            //var configSimple = TLObject.GetObject<TLConfigSimple>(decryptedData, ref position);\r\n\r\n            //MessageBox.Show(configSimple.ToString());\r\n\r\n            return;\r\n        }\r\n\r\n        private void ProxyStatus_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.OpenProxySettings();\r\n        }\r\n\r\n        private void TogglePasscodeState_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.ChangePasscodeState();\r\n        }\r\n    }\r\n\r\n    public class HeaderItem\r\n    {\r\n        public string DisplayName { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient/Views/TelegramViewBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Shapes;\r\nusing Windows.System;\r\nusing Caliburn.Micro;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Coding4Fun.Toolkit.Controls.Converters;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Auth;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Search;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Dialogs;\r\n#if WP8\r\nusing System.Windows.Navigation;\r\n#endif\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Transport;\r\nusing TelegramClient.ViewModels.Passport;\r\nusing EnterPasswordViewModel = TelegramClient.ViewModels.Passport.EnterPasswordViewModel;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views\r\n{\r\n    public class TelegramViewBase : PhoneApplicationPage\r\n    {\r\n// fast resume\r\n#if WP8\r\n        private bool _isFastResume;\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (e.NavigationMode == NavigationMode.Reset)\r\n            {\r\n                _isFastResume = true;\r\n            }\r\n\r\n            if (e.NavigationMode == NavigationMode.Refresh\r\n                && _isFastResume)\r\n            {\r\n                _isFastResume = false;\r\n\r\n                if (e.Uri.OriginalString.StartsWith(\"/Protocol?encodedLaunchUri\"))\r\n                {\r\n                    NavigateToTelegramUriAsync(e.Uri);\r\n                }\r\n                else if (e.Uri.OriginalString.StartsWith(\"/PeopleExtension?action=Show_Contact\"))\r\n                {\r\n                    NavigateToContactFromPeopleHub(e.Uri);\r\n                }\r\n                else if (e.Uri.OriginalString.StartsWith(\"/Views/Additional/SettingsView.xaml?Action=DC_UPDATE\"))\r\n                {\r\n                    UpdateDCOptions(e.Uri);\r\n                }\r\n            }\r\n\r\n            if (e.NavigationMode == NavigationMode.New)\r\n            {\r\n                if (e.Uri.OriginalString.StartsWith(\"/Protocol?encodedLaunchUri\"))\r\n                {\r\n                    NavigateToTelegramUriAsync(e.Uri);\r\n                }\r\n                else if (e.Uri.OriginalString.StartsWith(\"/PeopleExtension?action=Show_Contact\"))\r\n                {\r\n                    NavigateToContactFromPeopleHub(e.Uri);\r\n                }\r\n                else if (e.Uri.OriginalString.StartsWith(\"/Views/Additional/SettingsView.xaml?Action=DC_UPDATE\"))\r\n                {\r\n                    UpdateDCOptions(e.Uri);\r\n                }\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n            if (frame != null)\r\n            {\r\n                if (frame.IsBlockingProgressOpen())\r\n                {\r\n                    e.Cancel = true;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (Preview != null && Preview.Visibility == Visibility.Visible)\r\n            {\r\n                StickerPanel_ManipulationCompleted(null, null);\r\n            }\r\n\r\n            if (_isFastResume\r\n                && e.NavigationMode == NavigationMode.New\r\n                && (e.Uri.OriginalString.EndsWith(\"ShellView.xaml\")\r\n                    || e.Uri.OriginalString.StartsWith(\"/Protocol?encodedLaunchUri\")\r\n                    || e.Uri.OriginalString.StartsWith(\"/PeopleExtension?action=Show_Contact\")\r\n                    || e.Uri.OriginalString.StartsWith(\"/Views/Additional/SettingsView.xaml?Action=DC_UPDATE\")))\r\n            {\r\n                _isFastResume = false;\r\n                e.Cancel = true;\r\n\r\n                if (e.Uri.OriginalString.StartsWith(\"/Protocol?encodedLaunchUri\"))\r\n                {\r\n                    NavigateToTelegramUriAsync(e.Uri);\r\n                }\r\n                else if (e.Uri.OriginalString.StartsWith(\"/PeopleExtension?action=Show_Contact\"))\r\n                {\r\n                    NavigateToContactFromPeopleHub(e.Uri);\r\n                }\r\n                else if (e.Uri.OriginalString.StartsWith(\"/Views/Additional/SettingsView.xaml?Action=DC_UPDATE\"))\r\n                {\r\n                    UpdateDCOptions(e.Uri);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            base.OnNavigatingFrom(e);\r\n        }\r\n\r\n        private void UpdateDCOptions(Uri uri)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var tempUri = HttpUtility.HtmlDecode(uri.OriginalString);\r\n                var uriParams = TelegramUriMapper.ParseQueryString(tempUri);\r\n\r\n                int id;\r\n                var idParam = GetParam(\"dc\", uriParams);\r\n                var addrParam = GetParam(\"addr\", uriParams);\r\n                if (int.TryParse(idParam, out id) && !string.IsNullOrEmpty(addrParam))\r\n                {\r\n                    var addressParams = addrParam.Split(':');\r\n                    if (addressParams.Length >= 2)\r\n                    {\r\n                        int port;\r\n                        var host = addressParams[0];\r\n                        if (string.IsNullOrEmpty(host) && int.TryParse(addressParams[1], out port))\r\n                        {\r\n                            IoC.Get<IMTProtoService>().CheckAndUpdateTransportInfoAsync(new TLInt(id), new TLString(host), new TLInt(port),\r\n                                () =>\r\n                                {\r\n                                    //Execute.BeginOnUIThread(() => MessageBox.Show(\"App settings have been successfully updated.\", AppResources.Info, MessageBoxButton.OK));\r\n                                });\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        protected override void OnRemovedFromJournal(JournalEntryRemovedEventArgs e)\r\n        {\r\n            //Execute.ShowDebugMessage(\"OnRemovedFromJournal \" + GetType());\r\n\r\n            var viewModelBase = DataContext as ViewModelBase;\r\n            if (viewModelBase != null)\r\n            {\r\n                Execute.BeginOnThreadPool(viewModelBase.Unsubscribe);\r\n            }\r\n\r\n            base.OnRemovedFromJournal(e);\r\n        }\r\n\r\n        private void NavigateToContactFromPeopleHub(Uri uri)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var tempUri = HttpUtility.UrlDecode(uri.ToString());\r\n                try\r\n                {\r\n                    var uriParams = TelegramUriMapper.ParseQueryString(tempUri);\r\n\r\n                    var userId = Convert.ToInt32(uriParams[\"contact_ids\"]);\r\n                    var cachedContact = IoC.Get<ICacheService>().GetUser(new TLInt(userId));\r\n\r\n                    if (cachedContact != null)\r\n                    {\r\n                        Thread.Sleep(1000); // waiting for backwardin animations\r\n                        NavigateToUser(cachedContact, string.Empty);\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Execute.ShowDebugMessage(tempUri + \" ex\\n\" + ex);\r\n                }\r\n            });\r\n        }\r\n\r\n        public static bool IsFullHD()\r\n        {\r\n            return Application.Current.Host.Content.ScaleFactor == 225 || Environment.OSVersion.Version.Major >= 10;\r\n        }\r\n\r\n        public static void NavigateToTelegramUriAsync(Uri uri)\r\n        {\r\n            // /Protocol?encodedLaunchUri=tg%3A%2F%2F\r\n            var start = \"tg%3A\";\r\n            var uriString = uri.ToString().Replace(\"/Protocol?encodedLaunchUri=\", string.Empty);\r\n            if (uriString.StartsWith(start)\r\n                && !uriString.StartsWith(start + \"%2F%2F\"))\r\n            {\r\n                uriString = uriString.Replace(start, start + \"%2F%2F\");\r\n            }\r\n\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var tempUri = HttpUtility.UrlDecode(uriString);\r\n\r\n                Dictionary<string, string> uriParams = null;\r\n                try\r\n                {\r\n                    uriParams = TelegramUriMapper.ParseQueryString(tempUri);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Execute.ShowDebugMessage(\"Parse uri exception \" + tempUri + ex);\r\n                }\r\n                if (uriParams != null)\r\n                {\r\n                    if (tempUri.StartsWith(\"tg://resolve\") && tempUri.Contains(\"domain=telegrampassport\")\r\n                        || tempUri.StartsWith(\"tg://passport\")\r\n                        || tempUri.StartsWith(\"tg://secureid\"))\r\n                    {\r\n                        // /Protocol?encodedLaunchUri=tg://resolve/?domain=telegrampassport&bot_id=<bot_id>&scope=<scope>&callback_url=<callback_url>&public_key=<public_key>\r\n                        // /Protocol?encodedLaunchUri=tg://passport/?bot_id=<bot_id>&scope=<scope>&callback_url=<callback_url>&public_key=<public_key>\r\n                        // /Protocol?encodedLaunchUri=tg://secureid/?bot_id=<bot_id>&scope=<scope>&callback_url=<callback_url>&public_key=<public_key>\r\n                        var botId = GetParam(\"bot_id\", uriParams);\r\n                        var scope = HttpUtility.UrlDecode(GetParam(\"scope\", uriParams));\r\n                        var callbackUrl = HttpUtility.UrlDecode(GetParam(\"callback_url\", uriParams));\r\n                        var publicKey = HttpUtility.UrlDecode(GetParam(\"public_key\", uriParams));\r\n                        var payload = HttpUtility.UrlDecode(GetParam(\"payload\", uriParams));\r\n                        var nonce = HttpUtility.UrlDecode(GetParam(\"nonce\", uriParams));\r\n                        if (payload == \"nonce\" && !string.IsNullOrEmpty(nonce))\r\n                        {\r\n                            payload = nonce;\r\n                        }\r\n\r\n                        int botIdInt;\r\n                        if (!int.TryParse(botId, out botIdInt))\r\n                        {\r\n                            botIdInt = -1;\r\n                        }\r\n\r\n                        var passportConfig = IoC.Get<IStateService>().GetPassportConfig();\r\n                        NavigateToPassport(passportConfig, botIdInt, scope, callbackUrl, publicKey, payload, true);\r\n                    }\r\n                    else if (tempUri.StartsWith(\"tg://socks\"))\r\n                    {\r\n                        // /Protocol?encodedLaunchUri=tg://socks/?server=<server>&port=<port>\r\n                        // /Protocol?encodedLaunchUri=tg://socks/?server=<server>&port=<port>&user=<user>&pass=<pass>\r\n                        var server = HttpUtility.UrlDecode(GetParam(\"server\", uriParams));\r\n                        var port = HttpUtility.UrlDecode(GetParam(\"port\", uriParams));\r\n                        var user = HttpUtility.UrlDecode(GetParam(\"user\", uriParams));\r\n                        var pass = HttpUtility.UrlDecode(GetParam(\"pass\", uriParams));\r\n\r\n                        int portInt;\r\n                        if (int.TryParse(port, out portInt) && portInt >= 0)\r\n                        {\r\n                            NavigateToSocksProxy(server, portInt, user, pass);\r\n                        }\r\n                    }\r\n                    else if (tempUri.StartsWith(\"tg://proxy\"))\r\n                    {\r\n                        // /Protocol?encodedLaunchUri=tg://proxy/?server=<server>&port=<port>&secret=<secret>\r\n                        var server = HttpUtility.UrlDecode(GetParam(\"server\", uriParams));\r\n                        var port = HttpUtility.UrlDecode(GetParam(\"port\", uriParams));\r\n                        var secret = HttpUtility.UrlDecode(GetParam(\"secret\", uriParams));\r\n\r\n                        int portInt;\r\n                        if (int.TryParse(port, out portInt) && portInt >= 0 && !string.IsNullOrEmpty(secret))\r\n                        {\r\n                            NavigateToMTProtoProxy(server, portInt, secret);\r\n                        }\r\n                    }\r\n                    else if (tempUri.StartsWith(\"tg://resolve\"))\r\n                    {\r\n                        // /Protocol?encodedLaunchUri=tg://resolve/?domain=<username>&start=<access_token>\r\n                        // /Protocol?encodedLaunchUri=tg://resolve/?domain=<username>&startgroup=<access_token>\r\n                        // /Protocol?encodedLaunchUri=tg://resolve/?domain=<username>&post=<post_number>\r\n                        // /Protocol?encodedLaunchUri=tg://resolve/?domain=<username>&game=<game>\r\n                        var domain = GetParam(\"domain\", uriParams);\r\n\r\n                        PageKind pageKind;\r\n                        var accessToken = GetAccessToken(uriParams, out pageKind);\r\n                        var post = GetParam(\"post\", uriParams);\r\n                        var game = GetParam(\"game\", uriParams);\r\n                        var cachedContact = IoC.Get<ICacheService>().GetUsers().OfType<IUserName>().FirstOrDefault(x => string.Equals(x.UserName.ToString(), domain, StringComparison.OrdinalIgnoreCase)) as TLUserBase;\r\n\r\n                        if (cachedContact != null)\r\n                        {\r\n                            Thread.Sleep(1000); // waiting for backwardin animations\r\n                            if (!string.IsNullOrEmpty(game))\r\n                            {\r\n                                NavigateToGame(cachedContact, game);\r\n                            }\r\n                            else\r\n                            {\r\n                                NavigateToUser(cachedContact, accessToken, pageKind);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            var mtProtoService = IoC.Get<IMTProtoService>();\r\n                            NavigateToUsername(mtProtoService, domain, accessToken, post, game, pageKind);\r\n                        }\r\n                    }\r\n                    else if (tempUri.StartsWith(\"tg://join\"))\r\n                    {\r\n                        // /Protocol?encodedLaunchUri=tg://join/?invite=<group_access_token>\r\n                        var link = GetParam(\"invite\", uriParams);\r\n\r\n                        var mtProtoService = IoC.Get<IMTProtoService>();\r\n                        NavigateToInviteLink(mtProtoService, link);\r\n                    }\r\n                    else if (tempUri.StartsWith(\"tg://addstickers\"))\r\n                    {\r\n                        // /Protocol?encodedLaunchUri=tg://addstickers/?set=<set_name>\r\n                        var link = GetParam(\"set\", uriParams);\r\n\r\n                        var inputStickerSet = new TLInputStickerSetShortName { ShortName = new TLString(link) };\r\n\r\n                        var mtProtoService = IoC.Get<IMTProtoService>();\r\n                        var stateService = IoC.Get<IStateService>();\r\n                        NavigateToStickers(mtProtoService, stateService, inputStickerSet);\r\n                    }\r\n                    else if (tempUri.StartsWith(\"tg://msg_url\"))\r\n                    {\r\n                        // /Protocol?encodedLaunchUri=tg://msg_url/?url=<url_address>&text=<description>\r\n                        var url = HttpUtility.UrlDecode(GetParam(\"url\", uriParams));\r\n                        var text = HttpUtility.UrlDecode(GetParam(\"text\", uriParams));\r\n\r\n                        NavigateToForwarding(url, text);\r\n                    }\r\n                    else if (tempUri.StartsWith(\"tg://\"))\r\n                    {\r\n                        tempUri = tempUri.Replace(\"tg://\", string.Empty);\r\n                        var index = tempUri.IndexOf(\"?\", StringComparison.Ordinal);\r\n                        var undefinedPath = index >= 0 ? tempUri.Substring(0, index) : tempUri;\r\n\r\n                        if (!string.IsNullOrEmpty(undefinedPath))\r\n                        {\r\n                            IoC.Get<IMTProtoService>().GetDeepLinkInfoAsync(\r\n                                new TLString(undefinedPath),\r\n                                result => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    var deepLinkInfo = result as TLDeepLinkInfo;\r\n                                    if (deepLinkInfo != null)\r\n                                    {\r\n                                        var richTextBox = new TelegramRichTextBox { Margin = new Thickness(0.0, 11.0, 0.0, 0.0), TextWrapping = TextWrapping.Wrap, Entities = deepLinkInfo.Entities, Text = deepLinkInfo.Message.ToString() };\r\n                                        \r\n                                        if (IsFullHD())\r\n                                        {\r\n                                            richTextBox.FontSize = 17.667;\r\n                                        }\r\n\r\n                                        ShellViewModel.ShowCustomMessageBox(null, AppResources.AppName,\r\n                                            AppResources.Ok.ToLowerInvariant(),\r\n                                            deepLinkInfo.UpdateApp ? AppResources.UpdateApp.ToLowerInvariant() : null,\r\n                                            dismissed =>\r\n                                            {\r\n                                                if (dismissed == CustomMessageBoxResult.LeftButton)\r\n                                                {\r\n                                                    var task = new WebBrowserTask\r\n                                                    {\r\n                                                        Uri = PrivateBetaIdentityToVisibilityConverter.IsPrivateBeta\r\n                                                            ? new Uri(\"https://www.microsoft.com/store/apps/9P0F9KC5TSTT\", UriKind.Absolute)\r\n                                                            : new Uri(\"https://www.microsoft.com/store/apps/9WZDNCRDZHS0\", UriKind.Absolute)\r\n                                                    };\r\n                                                    task.Show();\r\n                                                }\r\n                                            },\r\n                                            richTextBox);\r\n                                    }\r\n                                }));\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        }\r\n#endif\r\n\r\n        public static string GetAccessToken(Dictionary<string, string> uriParams, out PageKind pageKind)\r\n        {\r\n            pageKind = PageKind.Dialog;\r\n            var accessToken = string.Empty;\r\n            if (uriParams.ContainsKey(\"start\"))\r\n            {\r\n                accessToken = uriParams[\"start\"];\r\n            }\r\n            else if (uriParams.ContainsKey(\"startgroup\"))\r\n            {\r\n                pageKind = PageKind.Search;\r\n                accessToken = uriParams[\"startgroup\"];\r\n            }\r\n\r\n            return accessToken;\r\n        }\r\n\r\n        public static string GetGame(Dictionary<string, string> uriParams)\r\n        {\r\n            var post = string.Empty;\r\n            if (uriParams.ContainsKey(\"game\"))\r\n            {\r\n                post = uriParams[\"game\"];\r\n            }\r\n\r\n            return post;\r\n        }\r\n\r\n        public static string GetPost(Dictionary<string, string> uriParams)\r\n        {\r\n            var post = string.Empty;\r\n            if (uriParams.ContainsKey(\"post\"))\r\n            {\r\n                post = uriParams[\"post\"];\r\n            }\r\n\r\n            return post;\r\n        }\r\n\r\n        public static string GetPhone(Dictionary<string, string> uriParams)\r\n        {\r\n            var post = string.Empty;\r\n            if (uriParams.ContainsKey(\"phone\"))\r\n            {\r\n                post = uriParams[\"phone\"];\r\n            }\r\n\r\n            return post;\r\n        }\r\n\r\n        public static string GetHash(Dictionary<string, string> uriParams)\r\n        {\r\n            var post = string.Empty;\r\n            if (uriParams.ContainsKey(\"hash\"))\r\n            {\r\n                post = uriParams[\"hash\"];\r\n            }\r\n\r\n            return post;\r\n        }\r\n\r\n        public static string GetParam(string paramName, Dictionary<string, string> uriParams)\r\n        {\r\n            var result = string.Empty;\r\n            if (uriParams.ContainsKey(paramName))\r\n            {\r\n                result = uriParams[paramName];\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public static void NavigateToStickers(IMTProtoService mtProtoService, IStateService stateService, TLInputStickerSetBase inputStickerSet, System.Action stickerSetAdded = null, System.Action stickerSetRemoved = null)\r\n        {\r\n#if WP8\r\n            if (mtProtoService != null)\r\n            {\r\n                stateService.GetAllStickersAsync(cachedStickers =>\r\n                {\r\n                    TLStickerSetBase set = null;\r\n                    var allStickers = cachedStickers as TLAllStickers29;\r\n                    if (allStickers != null)\r\n                    {\r\n                        set = allStickers.Sets.FirstOrDefault(x => x.Id.Value.ToString() == inputStickerSet.Name.ToString());\r\n                    }\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (set != null)\r\n                        {\r\n                            set.Stickers = new TLVector<TLObject>();\r\n                            for (var i = 0; i < allStickers.Documents.Count; i++)\r\n                            {\r\n                                var document22 = allStickers.Documents[i] as TLDocument22;\r\n                                if (document22 != null)\r\n                                {\r\n                                    var documentAttributeSticker = document22.Attributes.FirstOrDefault(x => x is TLDocumentAttributeSticker29) as TLDocumentAttributeSticker29;\r\n                                    if (documentAttributeSticker != null)\r\n                                    {\r\n                                        var stickerSetId = documentAttributeSticker.Stickerset as TLInputStickerSetId;\r\n                                        if (stickerSetId != null && stickerSetId.Id.Value != set.Id.Value)\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n                                        var stickerSetShortName = documentAttributeSticker.Stickerset as TLInputStickerSetShortName;\r\n                                        if (stickerSetShortName != null\r\n                                            && !TLString.Equals(stickerSetShortName.ShortName, set.ShortName, StringComparison.OrdinalIgnoreCase))\r\n                                        {\r\n                                            continue;\r\n                                        }\r\n                                    }\r\n\r\n                                    set.Stickers.Add(new TLStickerItem { Document = document22 });\r\n                                }\r\n                            }\r\n\r\n                            ShowStickerSetMessageBox(true, true, set, prompt =>\r\n                            {\r\n                                if (prompt == PopUpResult.Ok)\r\n                                {\r\n                                    mtProtoService.UninstallStickerSetAsync(inputStickerSet,\r\n                                        result => Execute.BeginOnUIThread(() =>\r\n                                        {\r\n                                            var shellViewModel = IoC.Get<ShellViewModel>();\r\n                                            shellViewModel.RemoveStickerSet(set, inputStickerSet);\r\n\r\n                                            mtProtoService.SetMessageOnTime(2.0, AppResources.StickersRemoved);\r\n\r\n                                            stickerSetRemoved.SafeInvoke();\r\n                                        }),\r\n                                        error =>\r\n                                            Execute.BeginOnUIThread(\r\n                                                () => { Execute.ShowDebugMessage(\"messages.uninstallStickerSet error \" + error); }));\r\n                                }\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                            if (frame != null) frame.OpenBlockingProgress();\r\n\r\n                            mtProtoService.GetStickerSetAsync(inputStickerSet,\r\n                                stickerSet => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    if (frame != null) frame.CloseBlockingProgress();\r\n\r\n                                    stickerSet.Set.Stickers = new TLVector<TLObject>();\r\n                                    for (var i = 0; i < stickerSet.Documents.Count; i++)\r\n                                    {\r\n                                        var document22 = stickerSet.Documents[i] as TLDocument22;\r\n                                        if (document22 != null)\r\n                                        {\r\n                                            stickerSet.Set.Stickers.Add(new TLStickerItem { Document = document22 });\r\n                                        }\r\n                                    }\r\n\r\n                                    var stickerSet32 = stickerSet.Set as TLStickerSet32;\r\n                                    if (stickerSet32 != null)\r\n                                    {\r\n                                        ShowStickerSetMessageBox(true, stickerSet32.Installed && !stickerSet32.Archived, stickerSet.Set, prompt =>\r\n                                        {\r\n                                            if (prompt == PopUpResult.Ok)\r\n                                            {\r\n                                                AddRemoveStickerSet(mtProtoService, stickerSet, stickerSetAdded, stickerSetRemoved);\r\n                                            }\r\n                                        });\r\n                                    }\r\n                                }),\r\n                                error => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    if (frame != null) frame.CloseBlockingProgress();\r\n                                    if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                                    {\r\n                                        if (error.TypeEquals(ErrorType.STICKERSET_INVALID))\r\n                                        {\r\n                                            MessageBox.Show(AppResources.StickersNotFound, AppResources.Error, MessageBoxButton.OK);\r\n                                        }\r\n                                        else\r\n                                        {\r\n                                            Execute.ShowDebugMessage(\"messages.getStickerSet error \" + error);\r\n                                        }\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        Execute.ShowDebugMessage(\"messages.getStickerSet error \" + error);\r\n                                    }\r\n                                }));\r\n                        }\r\n                    });\r\n                });\r\n            }\r\n#endif\r\n        }\r\n\r\n        public static void AddRemoveStickerSet(IMTProtoService mtProtoService, TLMessagesStickerSet messagesStickerSet, System.Action stickerSetAdded = null, System.Action stickerSetRemoved = null)\r\n        {\r\n            var stickerSet32 = messagesStickerSet.Set as TLStickerSet32;\r\n            if (stickerSet32 != null)\r\n            {\r\n                var inputStickerSet = new TLInputStickerSetId{ Id = stickerSet32.Id, AccessHash = stickerSet32.AccessHash };\r\n\r\n                if (!stickerSet32.Installed || stickerSet32.Archived)\r\n                {\r\n                    mtProtoService.InstallStickerSetAsync(inputStickerSet, TLBool.False,\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            var resultArchive = result as TLStickerSetInstallResultArchive;\r\n                            if (resultArchive != null)\r\n                            {\r\n                                ShowArchivedStickersMessageBox(resultArchive);\r\n                            }\r\n\r\n                            stickerSet32.Installed = true;\r\n                            var stickerSet76 = stickerSet32 as TLStickerSet76;\r\n                            if (stickerSet76 != null)\r\n                            {\r\n                                stickerSet76.InstalledDate = TLUtils.DateToUniversalTimeTLInt(IoC.Get<IMTProtoService>().ClientTicksDelta, DateTime.Now);\r\n                            }\r\n\r\n                            var shellViewModel = IoC.Get<ShellViewModel>();\r\n                            shellViewModel.Handle(new TLUpdateNewStickerSet { Stickerset = messagesStickerSet });\r\n\r\n                            mtProtoService.SetMessageOnTime(2.0, AppResources.NewStickersAdded);\r\n\r\n                            stickerSetAdded.SafeInvoke();\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                            {\r\n                                if (error.TypeEquals(ErrorType.STICKERSET_INVALID))\r\n                                {\r\n                                    MessageBox.Show(AppResources.StickersNotFound, AppResources.Error, MessageBoxButton.OK);\r\n                                }\r\n                                else\r\n                                {\r\n                                    Execute.ShowDebugMessage(\"messages.importChatInvite error \" + error);\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                Execute.ShowDebugMessage(\"messages.importChatInvite error \" + error);\r\n                            }\r\n                        }));\r\n                }\r\n                else\r\n                {\r\n                    mtProtoService.UninstallStickerSetAsync(inputStickerSet,\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            stickerSet32.Installed = false;\r\n                            var stickerSet76 = stickerSet32 as TLStickerSet76;\r\n                            if (stickerSet76 != null)\r\n                            {\r\n                                stickerSet76.InstalledDate = null;\r\n                            }\r\n\r\n                            var shellViewModel = IoC.Get<ShellViewModel>();\r\n                            shellViewModel.RemoveStickerSet(stickerSet32, inputStickerSet);\r\n\r\n                            mtProtoService.SetMessageOnTime(2.0, AppResources.StickersRemoved);\r\n\r\n                            stickerSetRemoved.SafeInvoke();\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() => { Execute.ShowDebugMessage(\"messages.uninstallStickerSet error \" + error); }));\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void ShowAttachedStickersMessageBox(IStickers attachedStickers, Action<TLStickerSetBase> callback)\r\n        {\r\n            var stickerSets = new Dictionary<string, TLVector<TLStickerItem>>();\r\n            for (var i = 0; i < attachedStickers.Documents.Count; i++)\r\n            {\r\n                var document22 = attachedStickers.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        TLVector<TLStickerItem> stickers;\r\n                        if (stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(new TLStickerItem { Document = document22 });\r\n                        }\r\n                        else\r\n                        {\r\n                            stickerSets[setId] = new TLVector<TLStickerItem> { new TLStickerItem { Document = document22 } };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            for (var i = 0; i < attachedStickers.Sets.Count; i++)\r\n            {\r\n                var set = attachedStickers.Sets[i];\r\n\r\n                var setName = set.Id.ToString();\r\n                TLVector<TLStickerItem> stickers;\r\n                if (stickerSets.TryGetValue(setName, out stickers))\r\n                {\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        objects.Add(sticker);\r\n                    }\r\n\r\n                    set.Stickers = objects;\r\n                }\r\n            }\r\n\r\n            var controls = new List<StickerSetControl>();\r\n            var content = new Grid { Margin = new Thickness(-12.0, 24.0, 0.0, -12.0), Background = new SolidColorBrush(Colors.Transparent) };\r\n\r\n            for (var i = 0; i < attachedStickers.Sets.Count && i < 5; i++)\r\n            {\r\n                content.RowDefinitions.Add(new RowDefinition());\r\n\r\n                var stickerSetControl = new StickerSetControl\r\n                {\r\n                    DataContext = attachedStickers.Sets[i]\r\n                };\r\n\r\n                Grid.SetRow(stickerSetControl, i);\r\n                content.Children.Add(stickerSetControl);\r\n                controls.Add(stickerSetControl);\r\n            }\r\n\r\n            var messageBox = ShellViewModel.ShowCustomMessageBox(null, AppResources.AttachedStickers,\r\n                AppResources.Ok.ToLowerInvariant(), null,\r\n                dismissed =>\r\n                {\r\n                    \r\n                },\r\n                content);\r\n\r\n            foreach (var stickerSetControl in controls)\r\n            {\r\n                stickerSetControl.Tap += (o, e) =>\r\n                {\r\n                    messageBox.Dismiss();\r\n\r\n                    Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                    {\r\n                        var stickerSetBase = stickerSetControl.DataContext as TLStickerSetBase;\r\n                        callback.SafeInvoke(stickerSetBase);\r\n                    });\r\n                };\r\n            }\r\n        }\r\n\r\n        public static void ShowArchivedStickersMessageBox(IStickers resultArchive)\r\n        {\r\n            var stickerSets = new Dictionary<string, TLVector<TLStickerItem>>();\r\n            for (var i = 0; i < resultArchive.Documents.Count; i++)\r\n            {\r\n                var document22 = resultArchive.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        TLVector<TLStickerItem> stickers;\r\n                        if (stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(new TLStickerItem {Document = document22});\r\n                        }\r\n                        else\r\n                        {\r\n                            stickerSets[setId] = new TLVector<TLStickerItem> {new TLStickerItem {Document = document22}};\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            for (var i = 0; i < resultArchive.Sets.Count; i++)\r\n            {\r\n                var set = resultArchive.Sets[i];\r\n\r\n                var setName = set.Id.ToString();\r\n                TLVector<TLStickerItem> stickers;\r\n                if (stickerSets.TryGetValue(setName, out stickers))\r\n                {\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        objects.Add(sticker);\r\n                    }\r\n\r\n                    set.Stickers = objects;\r\n                }\r\n            }\r\n\r\n            var content = new Grid {Margin = new Thickness(-12.0, 24.0, 0.0, -12.0)};\r\n            for (var i = 0; i < resultArchive.Sets.Count; i++)\r\n            {\r\n                content.RowDefinitions.Add(new RowDefinition());\r\n\r\n                var stickerSetControl = new StickerSetControl\r\n                {\r\n                    DataContext = resultArchive.Sets[i]\r\n                };\r\n                Grid.SetRow(stickerSetControl, i);\r\n                content.Children.Add(stickerSetControl);\r\n            }\r\n\r\n            ShellViewModel.ShowCustomMessageBox(AppResources.ArchivedStickersAbout, AppResources.ArchivedStickers,\r\n                AppResources.Ok.ToLowerInvariant(), AppResources.Settings.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.LeftButton)\r\n                    {\r\n                        Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25),\r\n                            () => IoC.Get<INavigationService>().UriFor<ArchivedStickersViewModel>().Navigate());\r\n                    }\r\n                },\r\n                content);\r\n        }\r\n\r\n        protected static MessagePrompt _lastMessagePrompt;\r\n\r\n        public static TLStickerSetBase _stickerSet;\r\n\r\n        public static void ShowStickerSetMessageBox(bool sendEnabled, bool stickerSetExists, TLStickerSetBase stickerSet, Action<PopUpResult> callback)\r\n        {\r\n            if (stickerSet == null) return;\r\n\r\n            var stickerSet32 = stickerSet as TLStickerSet32;\r\n\r\n            _stickerSet = stickerSet;\r\n            _fromItem = null;\r\n            _storyboard = null;\r\n\r\n            var panel = new Canvas { VerticalAlignment = VerticalAlignment.Top, UseOptimizedManipulationRouting = false };\r\n            panel.ManipulationStarted += StcikerPanel_ManipulationStarted;\r\n            panel.ManipulationDelta += StickerPanel_ManipulationDelta;\r\n            panel.ManipulationCompleted += StickerPanel_ManipulationCompleted;\r\n            panel.Loaded += (o, e) =>\r\n            {\r\n                //Touch.FrameReported += Touch_FrameReported;\r\n            };\r\n            panel.Unloaded += (o, e) =>\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n            };\r\n\r\n            var scrollViewer = new ScrollViewer\r\n            {\r\n                HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled,\r\n                VerticalScrollBarVisibility = ScrollBarVisibility.Auto,\r\n                Height = 400.0,\r\n                Content = panel\r\n            };\r\n\r\n            var showEmoji = stickerSet32 != null && !stickerSet32.Masks;\r\n            var sprites = CreateStickerSetSprites(showEmoji, sendEnabled, stickerSet);\r\n\r\n            var messagePrompt = new MessagePrompt\r\n            {\r\n                Title = stickerSet.Title.ToString(),\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                Message = (string) new StickerSetToCountStringConverter().Convert(stickerSet, null, null, null),\r\n                Body = new TextBlock\r\n                {\r\n                    Height = scrollViewer.Height,\r\n                    Text = AppResources.Loading,\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top,\r\n                    Style = (Style) Application.Current.Resources[\"PhoneTextGroupHeaderStyle\"]\r\n                },\r\n                IsCancelVisible = stickerSetExists,\r\n                IsAppBarVisible = true\r\n            };\r\n\r\n            messagePrompt.ActionPopUpButtons.Clear();\r\n            var cancelButton = new Button { Width = 220.0 };\r\n            cancelButton.Click += (sender, args) =>\r\n            {\r\n                messagePrompt.OnCompleted(new PopUpEventArgs<string, PopUpResult> { PopUpResult = PopUpResult.Cancelled });\r\n            };\r\n            cancelButton.Content = AppResources.Cancel.ToLowerInvariant();\r\n            messagePrompt.ActionPopUpButtons.Add(cancelButton);\r\n\r\n            var okButton = new Button { Width = 220.0, IsEnabled = stickerSet32 == null || (!stickerSet32.Official || stickerSet32.Masks) };\r\n            okButton.Click += (sender, args) =>\r\n            {\r\n                messagePrompt.OnCompleted(new PopUpEventArgs<string, PopUpResult> { PopUpResult = PopUpResult.Ok });\r\n            };\r\n            okButton.Content = !stickerSetExists ? AppResources.Add.ToLowerInvariant() : AppResources.Remove.ToLowerInvariant();\r\n            messagePrompt.ActionPopUpButtons.Add(okButton);\r\n#if WP8\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225 || Environment.OSVersion.Version.Major >= 10;\r\n            if (isFullHD)\r\n            {\r\n                cancelButton.FontSize = 17.667;\r\n                cancelButton.BorderThickness = new Thickness(2.0);\r\n                cancelButton.Padding = new Thickness(10.0, 5.0, 10.0, 7.0);\r\n\r\n                okButton.FontSize = 17.667;\r\n                okButton.BorderThickness = new Thickness(2.0);\r\n                okButton.Padding = new Thickness(10.0, 5.0, 10.0, 7.0);\r\n            }\r\n#endif\r\n\r\n            messagePrompt.Opened += (o, args) =>\r\n            {\r\n                var stickerPreviewImage = new Image\r\n                {\r\n                    Width = 96.0,\r\n                    Height = 96.0,\r\n                    HorizontalAlignment = HorizontalAlignment.Center,\r\n                    VerticalAlignment = VerticalAlignment.Center,\r\n                    IsHitTestVisible = false,\r\n                };\r\n\r\n                var stickerImage = new Image\r\n                {\r\n                    Width = 96.0,\r\n                    Height = 96.0,\r\n                    HorizontalAlignment = HorizontalAlignment.Center,\r\n                    VerticalAlignment = VerticalAlignment.Center,\r\n                    IsHitTestVisible = false,\r\n                    DataContext = null\r\n                };\r\n\r\n                var binding = new Binding\r\n                {\r\n                    Mode = BindingMode.OneWay,\r\n                    Path = new PropertyPath(\"Document\"),\r\n                    Converter = new DefaultPhotoConverter()\r\n                };\r\n\r\n                stickerImage.SetBinding(Image.SourceProperty, binding);\r\n\r\n                var stickerPreviewGrid = new Grid\r\n                {\r\n                    IsHitTestVisible = false,\r\n                    RenderTransformOrigin = new Point(0.5, 0.5),\r\n                    RenderTransform = new CompositeTransform { ScaleX = 2.6, ScaleY = 2.6 },\r\n                };\r\n                stickerPreviewGrid.Children.Add(stickerPreviewImage);\r\n                stickerPreviewGrid.Children.Add(stickerImage);\r\n\r\n                stickerPreviewGrid.Loaded += StickerPreviewGrid_OnLoaded;\r\n\r\n                var debugText = new TextBlock{Visibility = Visibility.Collapsed};\r\n\r\n                var stickerPreview = new Grid{ IsHitTestVisible = false, Visibility = Visibility.Collapsed };\r\n                stickerPreview.Children.Add(new Border\r\n                {\r\n                    Opacity = 0.5,\r\n                    Margin = new Thickness(-12.0, -54.0, -12.0, isFullHD? -86.0 : -96.0),\r\n                    Background = (Brush) Application.Current.Resources[\"PhoneBackgroundBrush\"],\r\n                    HorizontalAlignment = HorizontalAlignment.Stretch,\r\n                    VerticalAlignment = VerticalAlignment.Stretch,\r\n                    IsHitTestVisible = false\r\n                });\r\n                stickerPreview.Children.Add(stickerPreviewGrid);\r\n                stickerPreview.Children.Add(debugText);\r\n\r\n                ViewportControl = scrollViewer;\r\n                Canvas = panel;\r\n                Image = stickerImage;\r\n                PreviewImage = stickerPreviewImage;\r\n                PreviewGrid = stickerPreviewGrid;\r\n                Preview = stickerPreview;\r\n                DebugText = debugText;\r\n\r\n                var grid = new Grid();\r\n                grid.Children.Add(scrollViewer);\r\n                grid.Children.Add(stickerPreview);\r\n\r\n                Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.1), () =>\r\n                {\r\n                    var top = 0.0;\r\n                    messagePrompt.Body = grid;\r\n\r\n                    const int firstSliceLength = 4;\r\n                    foreach (var sprite in sprites.Take(firstSliceLength).Cast<FrameworkElement>())\r\n                    {\r\n                        Canvas.SetTop(sprite, top);\r\n                        panel.Children.Add(sprite);\r\n                        top += 120.0;\r\n                    }\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        foreach (var sprite in sprites.Skip(firstSliceLength).Cast<FrameworkElement>())\r\n                        {\r\n                            Canvas.SetTop(sprite, top);\r\n                            panel.Children.Add(sprite);\r\n                            top += 120.0;\r\n                        }\r\n                        panel.Height = top;\r\n                    });\r\n                });\r\n            };\r\n            messagePrompt.Completed += (o, e) =>\r\n            {\r\n                _stickerSet = null;\r\n\r\n                callback.SafeInvoke(e.PopUpResult);\r\n            };\r\n            _lastMessagePrompt = messagePrompt;\r\n            messagePrompt.Show();\r\n        }\r\n\r\n        private static List<FrameworkElement> CreateStickerSetSprites(bool showEmoji, bool sendEnabled, TLStickerSetBase stickerSet)\r\n        {\r\n            if (stickerSet == null) return null;\r\n\r\n            const int stickersPerRow = 4;\r\n            var sprites = new List<FrameworkElement>();\r\n            var stickers = new List<TLStickerItem>();\r\n            for (var j = 1; j <= stickerSet.Stickers.Count; j++)\r\n            {\r\n                stickers.Add((TLStickerItem)stickerSet.Stickers[j - 1]);\r\n\r\n                if (j % stickersPerRow == 0 || j == stickerSet.Stickers.Count)\r\n                {\r\n                    //var item = new StickerSpriteItem(stickersPerRow, stickers, 96.0, 438.0, true);\r\n                    //item.StickerImage.MouseEnter += StickerPanel_MouseEnter;\r\n\r\n                    var panelWidth = 438.0;\r\n\r\n                    var panelMargin = new Thickness(4.0, 0.0, 4.0, 0.0);\r\n                    var panelActualWidth = panelWidth - panelMargin.Left - panelMargin.Right;\r\n                    //472, 438\r\n                    var stackPanel = new Grid { Width = panelActualWidth, Margin = panelMargin, Background = new SolidColorBrush(Colors.Transparent) };\r\n\r\n                    for (var i = 0; i < stickersPerRow; i++)\r\n                    {\r\n                        stackPanel.ColumnDefinitions.Add(new ColumnDefinition());\r\n                    }\r\n\r\n                    for (var i = 0; i < stickers.Count; i++)\r\n                    {\r\n                        var binding = new Binding\r\n                        {\r\n                            Mode = BindingMode.OneWay,\r\n                            Path = new PropertyPath(\"Self\"),\r\n                            Converter = new DefaultPhotoConverter(),\r\n                            ConverterParameter = 96.0\r\n                        };\r\n\r\n                        var stickerImage = new Image\r\n                        {\r\n                            Height = 96.0,\r\n                            Margin = new Thickness(0, 12, 0, 12),\r\n                            VerticalAlignment = VerticalAlignment.Top,\r\n                            CacheMode = new BitmapCache()\r\n                        };\r\n                        stickerImage.MouseEnter += StickerPanel_MouseEnter;\r\n                        if (sendEnabled)\r\n                        {\r\n                            stickerImage.Tap += Sticker_Tap;\r\n                        }\r\n\r\n                        stickerImage.SetBinding(Image.SourceProperty, binding);\r\n\r\n                        var grid = new Grid();\r\n                        grid.Children.Add(stickerImage);\r\n\r\n                        if (showEmoji)\r\n                        {\r\n                            var document22 = stickers[i].Document as TLDocument22;\r\n                            if (document22 != null)\r\n                            {\r\n                                var bytes = Encoding.BigEndianUnicode.GetBytes(document22.Emoticon);\r\n                                var bytesStr = BrowserNavigationService.ConvertToHexString(bytes);\r\n\r\n                                var emojiImage = new Image\r\n                                {\r\n                                    Height = 32,\r\n                                    Width = 32,\r\n                                    Margin = new Thickness(12, 12, 12, 12),\r\n                                    HorizontalAlignment = HorizontalAlignment.Right,\r\n                                    VerticalAlignment = VerticalAlignment.Bottom,\r\n                                    Source = new BitmapImage(new Uri(string.Format(\"/Assets/Emoji/Separated/{0}.png\", bytesStr), UriKind.RelativeOrAbsolute)),\r\n                                    IsHitTestVisible = false\r\n                                };\r\n                                grid.Children.Add(emojiImage);\r\n                            }\r\n                        }\r\n\r\n                        var listBoxItem = new ListBoxItem { Content = grid, DataContext = stickers[i] };\r\n                        Microsoft.Phone.Controls.TiltEffect.SetIsTiltEnabled(listBoxItem, true);\r\n                        grid.DataContext = stickers[i];\r\n                        Grid.SetColumn(listBoxItem, i);\r\n                        stackPanel.Children.Add(listBoxItem);\r\n                    }\r\n\r\n                    sprites.Add(stackPanel);\r\n                    stickers.Clear();\r\n                }\r\n            }\r\n\r\n            return sprites;\r\n        }\r\n\r\n        private static FrameworkElement _fromItem;\r\n        private static Storyboard _storyboard;\r\n        private static FrameworkElement _lastMouseEnter;\r\n        private static ScrollViewer ViewportControl;\r\n        private static Canvas Canvas;\r\n        private static Grid Preview;\r\n        private static Grid PreviewGrid;\r\n        private static Image PreviewImage;\r\n        private static Image Image;\r\n        private static TextBlock DebugText;\r\n        private static Storyboard _loadedStoryboard;\r\n\r\n        public static readonly DependencyProperty PreviousTopProperty = DependencyProperty.RegisterAttached(\"PreviousTop\", typeof (double?), typeof (TelegramViewBase), new PropertyMetadata(null));\r\n\r\n        public static void SetPreviousTop(DependencyObject element, double? value)\r\n        {\r\n            element.SetValue(PreviousTopProperty, value);\r\n        }\r\n\r\n        public static double? GetPreviousTop(DependencyObject element)\r\n        {\r\n            return (double?) element.GetValue(PreviousTopProperty);\r\n        }\r\n\r\n        private static void Sticker_Tap(object sender, GestureEventArgs e)\r\n        {\r\n            return;\r\n\r\n            if (Preview.Visibility == Visibility.Collapsed)\r\n            {\r\n                Preview.Visibility = Visibility.Visible;\r\n            }\r\n\r\n            DebugText.Text = sender.GetHashCode().ToString();\r\n\r\n            //_lastMouseEnter = e.OriginalSource as FrameworkElement;\r\n\r\n            var stickerImage = e.OriginalSource as Image;\r\n            if (stickerImage != null)\r\n            {\r\n                PreviewImage.Source = stickerImage.Source;\r\n\r\n                var stickerItem = stickerImage.DataContext as TLStickerItem;\r\n                if (stickerItem != null)\r\n                {\r\n                    Image.DataContext = stickerItem;\r\n                }\r\n            }\r\n\r\n            var duration = .5;\r\n            var easingFunction = new ElasticEase { Oscillations = 1, Springiness = 10.0, EasingMode = EasingMode.EaseOut };\r\n            var storyboard = new Storyboard();\r\n\r\n            var doubleAnimation = new DoubleAnimation();\r\n            doubleAnimation.From = 0.0;\r\n            doubleAnimation.To = 0.0;\r\n            doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(doubleAnimation);\r\n\r\n            var doubleAnimation2 = new DoubleAnimation();\r\n            doubleAnimation2.From = 0.0; //position.Y;\r\n            doubleAnimation2.To = 0.0;\r\n            doubleAnimation2.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation2.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation2, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(doubleAnimation2);\r\n\r\n            var doubleAnimation3 = new DoubleAnimation();\r\n            doubleAnimation3.From = 1.0;\r\n            doubleAnimation3.To = 1.0;\r\n            doubleAnimation3.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation3.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation3, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation3, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(doubleAnimation3);\r\n\r\n            var doubleAnimation4 = new DoubleAnimation();\r\n            doubleAnimation4.From = 2.4;\r\n            doubleAnimation4.To = 2.6;\r\n            doubleAnimation4.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation4.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation4, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation4, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleY)\"));\r\n            storyboard.Children.Add(doubleAnimation4);\r\n\r\n            var doubleAnimation5 = new DoubleAnimation();\r\n            doubleAnimation5.From = 2.4;\r\n            doubleAnimation5.To = 2.6;\r\n            doubleAnimation5.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation5.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation5, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation5, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleX)\"));\r\n            storyboard.Children.Add(doubleAnimation5);\r\n\r\n            storyboard.Begin();\r\n\r\n            _storyboard = storyboard;\r\n        }\r\n\r\n        private static void StickerPreviewGrid_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var fromItem = _fromItem;\r\n            if (fromItem == null) return;\r\n\r\n            var position = fromItem.TransformToVisual(Application.Current.RootVisual).Transform(new Point(fromItem.ActualWidth / 2.0, fromItem.ActualHeight / 2.0));\r\n            DebugText.Text = position.ToString();\r\n\r\n            var position2 = new Point(240.0, 400.0); //PreviewImage.TransformToVisual(Application.Current.RootVisual).Transform(new Point(PreviewImage.ActualWidth / 2.0, PreviewImage.ActualHeight / 2.0));//\r\n            DebugText.Text += Environment.NewLine + position2;\r\n\r\n            var duration = .75;\r\n            IEasingFunction easingFunction = new ElasticEase { Oscillations = 1, Springiness = 10.0, EasingMode = EasingMode.EaseOut };\r\n            var storyboard = new Storyboard();\r\n\r\n            var doubleAnimation = new DoubleAnimation();\r\n            doubleAnimation.From = position.X - position2.X;\r\n            doubleAnimation.To = 0.0;\r\n            doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(doubleAnimation);\r\n\r\n            var doubleAnimation2 = new DoubleAnimation();\r\n            doubleAnimation2.From = position.Y - position2.Y; //position.Y;\r\n            doubleAnimation2.To = 0.0;\r\n            doubleAnimation2.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation2.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation2, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(doubleAnimation2);\r\n\r\n            var doubleAnimation3 = new DoubleAnimation();\r\n            doubleAnimation3.From = .5;\r\n            doubleAnimation3.To = 1.0;\r\n            doubleAnimation3.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation3.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation3, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation3, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(doubleAnimation3);\r\n\r\n            var doubleAnimation4 = new DoubleAnimation();\r\n            doubleAnimation4.From = 1.0;\r\n            doubleAnimation4.To = 2.6;\r\n            doubleAnimation4.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation4.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation4, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation4, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleY)\"));\r\n            storyboard.Children.Add(doubleAnimation4);\r\n\r\n            var doubleAnimation5 = new DoubleAnimation();\r\n            doubleAnimation5.From = 1.0;\r\n            doubleAnimation5.To = 2.6;\r\n            doubleAnimation5.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation5.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation5, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation5, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleX)\"));\r\n            storyboard.Children.Add(doubleAnimation5);\r\n\r\n            storyboard.Begin();\r\n\r\n            if (_loadedStoryboard != null)\r\n            {\r\n                _loadedStoryboard.Begin();\r\n                _loadedStoryboard = null;\r\n            }\r\n\r\n            _storyboard = storyboard;\r\n        }\r\n\r\n        private static void StickerPanel_MouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            if (Preview.Visibility == Visibility.Collapsed) return;\r\n\r\n            DebugText.Text = sender.GetHashCode().ToString();\r\n\r\n            var st1 = EmojiControl.GetScaleStoryboard(_lastMouseEnter ?? _fromItem, 1.0, 1.0);\r\n\r\n            _lastMouseEnter = e.OriginalSource as FrameworkElement;\r\n\r\n            var stickerImage = e.OriginalSource as Image;\r\n            if (stickerImage != null)\r\n            {\r\n                PreviewImage.Source = stickerImage.Source;\r\n                \r\n                var stickerItem = stickerImage.DataContext as TLStickerItem;\r\n                if (stickerItem != null)\r\n                {\r\n                    Image.DataContext = stickerItem;\r\n                }\r\n            }\r\n\r\n            var duration = .5;\r\n            var easingFunction = new ElasticEase { Oscillations = 1, Springiness = 10.0, EasingMode = EasingMode.EaseOut };\r\n            var storyboard = new Storyboard();\r\n\r\n            var doubleAnimation = new DoubleAnimation();\r\n            doubleAnimation.From = 0.0;\r\n            doubleAnimation.To = 0.0;\r\n            doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(doubleAnimation);\r\n\r\n            var doubleAnimation2 = new DoubleAnimation();\r\n            doubleAnimation2.From = 0.0; //position.Y;\r\n            doubleAnimation2.To = 0.0;\r\n            doubleAnimation2.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation2.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation2, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(doubleAnimation2);\r\n\r\n            var doubleAnimation3 = new DoubleAnimation();\r\n            doubleAnimation3.From = 1.0;\r\n            doubleAnimation3.To = 1.0;\r\n            doubleAnimation3.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation3.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation3, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation3, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(doubleAnimation3);\r\n\r\n            var doubleAnimation4 = new DoubleAnimation();\r\n            doubleAnimation4.From = 2.4;\r\n            doubleAnimation4.To = 2.6;\r\n            doubleAnimation4.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation4.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation4, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation4, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleY)\"));\r\n            storyboard.Children.Add(doubleAnimation4);\r\n\r\n            var doubleAnimation5 = new DoubleAnimation();\r\n            doubleAnimation5.From = 2.4;\r\n            doubleAnimation5.To = 2.6;\r\n            doubleAnimation5.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation5.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation5, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation5, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleX)\"));\r\n            storyboard.Children.Add(doubleAnimation5);\r\n\r\n            storyboard.Begin();\r\n\r\n            _storyboard = storyboard;\r\n\r\n            var st2 = EmojiControl.GetScaleStoryboard(_lastMouseEnter, 0.85, 1.0);\r\n            if (st1 != null || st2 != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (st1 != null) st1.Begin();\r\n                    if (st2 != null) st2.Begin();\r\n                });\r\n            }\r\n        }\r\n\r\n        private static DateTime? _startTime;\r\n\r\n        private static ManipulationStartedEventArgs _manipulationStartedArgs;\r\n\r\n        private static void StcikerPanel_ManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            _fromItem = e.OriginalSource as FrameworkElement;\r\n            _lastMouseEnter = null;\r\n\r\n            _manipulationStartedArgs = e;\r\n            _startTime = DateTime.Now;\r\n            Touch.FrameReported += Touch_FrameReported;\r\n        }\r\n\r\n        private static void Touch_FrameReported(object sender, TouchFrameEventArgs e)\r\n        {\r\n            if (_manipulationStartedArgs == null)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                return;\r\n            }\r\n\r\n            var point = e.GetPrimaryTouchPoint(null);\r\n            if (point.Action == TouchAction.Up)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                return;\r\n            }\r\n\r\n            var manipulationPoint = e.GetPrimaryTouchPoint(_manipulationStartedArgs.ManipulationContainer);\r\n            var length = Math.Pow(manipulationPoint.Position.X - _manipulationStartedArgs.ManipulationOrigin.X, 2.0)\r\n                + Math.Pow(manipulationPoint.Position.Y - _manipulationStartedArgs.ManipulationOrigin.Y, 2.0);\r\n            if (length > 30.0 * 30.0)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                return;\r\n            }\r\n\r\n            if (_startTime.HasValue && _startTime.Value.AddSeconds(0.5) <= DateTime.Now)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                var offset = ViewportControl.VerticalOffset;\r\n                foreach (var child in Canvas.Children)\r\n                {\r\n                    var top = Canvas.GetTop(child);\r\n                    SetPreviousTop(child, top);\r\n                    Canvas.SetTop(child, top - offset);\r\n                }\r\n                ViewportControl.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;\r\n                _loadedStoryboard = EmojiControl.GetScaleStoryboard(_fromItem, 0.85, 1.0);\r\n\r\n                Preview.Visibility = Visibility.Visible;\r\n                var stickerImage = _fromItem as Image;\r\n                if (stickerImage != null)\r\n                {\r\n                    PreviewImage.Source = stickerImage.Source;\r\n\r\n                    var stickerItem = stickerImage.DataContext as TLStickerItem;\r\n                    if (stickerItem != null)\r\n                    {\r\n                        Image.DataContext = stickerItem;\r\n                    }\r\n                }\r\n\r\n                var grid = Preview;\r\n                grid.Children.Remove(PreviewGrid);\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    PreviewGrid.RenderTransform = new CompositeTransform();\r\n                    PreviewGrid.Opacity = 0.0;\r\n                    grid.Children.Add(PreviewGrid);\r\n                });\r\n            }\r\n        }\r\n\r\n        private static void StickerPanel_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        private static void StickerPanel_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            var fromItem = _fromItem;\r\n\r\n            _fromItem = null;\r\n            if (_storyboard != null)\r\n            {\r\n                _storyboard.SkipToFill();\r\n            }\r\n\r\n            foreach (var child in Canvas.Children)\r\n            {\r\n                var previousTop = GetPreviousTop(child);\r\n                if (previousTop.HasValue)\r\n                {\r\n                    Canvas.SetTop(child, previousTop.Value);\r\n                }\r\n            }\r\n            ViewportControl.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;\r\n            Preview.Visibility = Visibility.Collapsed;\r\n\r\n            var st = EmojiControl.GetScaleStoryboard(_lastMouseEnter ?? fromItem, 1.0, 1.0);\r\n            if (st != null)\r\n            {\r\n                Execute.BeginOnUIThread(st.Begin);\r\n            }\r\n        }\r\n\r\n        public static Path CreateXamlCancel(FrameworkElement control)\r\n        {\r\n            var path = XamlReader.Load(\"<Path \\r\\n\\t\\t\\t\\t\\txmlns=\\\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\\\"\\r\\n\\t\\t\\t\\t\\tStretch=\\\"Uniform\\\" \\r\\n\\t\\t\\t\\t\\tData=\\\"M15.047,0 L17.709,2.663 L11.5166,8.85499 L17.71,15.048 L15.049,17.709 L8.8553,11.5161 L2.662,17.709 L0,15.049 L6.19351,8.85467 L0.002036,2.66401 L2.66304,0.002015 L8.85463,6.19319 z\\\"\\r\\n\\t\\t\\t\\t\\t/>\") as Path;\r\n            if (path != null)\r\n                ApplyBinding(control, path, \"ButtonHeight\", HeightProperty, new NumberMultiplierConverter(), 0.25);\r\n            return path;\r\n        }\r\n\r\n        public static void ApplyBinding(FrameworkElement source, FrameworkElement target, string propertyPath, DependencyProperty property, IValueConverter converter = null, object converterParameter = null)\r\n        {\r\n            if (source == null || target == null)\r\n                return;\r\n            target.SetBinding(property, new Binding()\r\n            {\r\n                Source = (object)source,\r\n                Path = new PropertyPath(propertyPath, new object[0]),\r\n                Converter = converter,\r\n                ConverterParameter = converterParameter\r\n            });\r\n        }\r\n\r\n        public static void NavigateToInviteLink(IMTProtoService mtProtoService, string link)\r\n        {\r\n            if (mtProtoService != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                    if (frame != null) frame.OpenBlockingProgress();\r\n\r\n                    mtProtoService.CheckChatInviteAsync(new TLString(link),\r\n                        chatInviteBase => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (frame != null) frame.CloseBlockingProgress();\r\n\r\n                            var chatInviteAlready = chatInviteBase as TLChatInviteAlready;\r\n                            if (chatInviteAlready != null)\r\n                            {\r\n                                var chat = chatInviteAlready.Chat;\r\n                                NavigateToGroup(chat);\r\n                                return;\r\n                            }\r\n\r\n                            var chatInvite = chatInviteBase as TLChatInvite;\r\n                            if (chatInvite != null)\r\n                            {\r\n                                var chatInvite40 = chatInvite as TLChatInvite40;\r\n                                if (chatInvite40 != null && chatInvite40.IsChannel && !chatInvite40.IsMegaGroup)\r\n                                {\r\n                                    var confirmationString = AppResources.JoinChannelConfirmation;\r\n                                    var confirmation = MessageBox.Show(string.Format(confirmationString, chatInvite.Title), AppResources.Confirm, MessageBoxButton.OKCancel);\r\n                                    if (confirmation == MessageBoxResult.OK)\r\n                                    {\r\n                                        ImportChatInviteAsync(mtProtoService, link);\r\n                                    }\r\n                                    return;\r\n                                }\r\n\r\n                                var content = new Grid();\r\n                                content.RowDefinitions.Add(new RowDefinition());\r\n                                content.RowDefinitions.Add(new RowDefinition());\r\n                                content.RowDefinitions.Add(new RowDefinition());\r\n                                content.ColumnDefinitions.Add(new ColumnDefinition{ Width = GridLength.Auto });\r\n                                content.ColumnDefinitions.Add(new ColumnDefinition());\r\n                                var chatInviteViewModel = new ChatInviteViewModel(IoC.Get<ITelegramEventAggregator>());\r\n\r\n                                var chatInvite54 = chatInvite as TLChatInvite54;\r\n                                if (chatInvite54 != null)\r\n                                {\r\n                                    var chat = new TLChat\r\n                                    {\r\n                                        Id = new TLInt(chatInvite54.Title.Value.GetHashCode()),\r\n                                        Title = chatInvite54.Title\r\n                                    };\r\n                                    chatInvite54.Chat = chat;\r\n\r\n                                    chatInviteViewModel.ChatInvite = chatInvite54;\r\n\r\n                                    var chatInviteControl = new ChatInviteControl\r\n                                    {\r\n                                        HorizontalAlignment = HorizontalAlignment.Stretch\r\n                                    };\r\n                                    chatInviteControl.DataContext = chatInviteViewModel;\r\n\r\n                                    content.Children.Add(chatInviteControl);\r\n                                }\r\n\r\n                                ShellViewModel.ShowCustomMessageBox(string.Empty, string.Empty, AppResources.Cancel.ToLowerInvariant(), AppResources.Join.ToLowerInvariant(),\r\n                                    r =>\r\n                                    {\r\n                                        if (r == CustomMessageBoxResult.LeftButton)\r\n                                        {\r\n                                            ImportChatInviteAsync(mtProtoService, link);\r\n                                        }\r\n                                    },\r\n                                    content);\r\n\r\n                                return;\r\n                            }\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (frame != null) frame.CloseBlockingProgress();\r\n                            if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                            {\r\n                                if (error.TypeEquals(ErrorType.INVITE_HASH_EMPTY)\r\n                                    || error.TypeEquals(ErrorType.INVITE_HASH_INVALID)\r\n                                    || error.TypeEquals(ErrorType.INVITE_HASH_EXPIRED))\r\n                                {\r\n                                    MessageBox.Show(AppResources.GroupNotExistsError, AppResources.Error,  MessageBoxButton.OK);\r\n                                }\r\n                                else\r\n                                {\r\n                                    Execute.ShowDebugMessage(\"messages.checkChatInvite error \" + error);\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                Execute.ShowDebugMessage(\"messages.checkChatInvite error \" + error);\r\n                            }\r\n                        }));\r\n                });\r\n            }\r\n        }\r\n\r\n        private static void ImportChatInviteAsync(IMTProtoService mtProtoService, string link)\r\n        {\r\n            mtProtoService.ImportChatInviteAsync(new TLString(link),\r\n                result =>\r\n                {\r\n                    var updates = result as TLUpdates;\r\n                    if (updates != null)\r\n                    {\r\n                        var chat = updates.Chats.FirstOrDefault();\r\n                        if (chat != null)\r\n                        {\r\n                            var channel = chat as TLChannel;\r\n                            if (channel != null)\r\n                            {\r\n                                mtProtoService.GetHistoryAsync(Stopwatch.StartNew(),\r\n                                    new TLInputPeerChannel {ChatId = channel.Id, AccessHash = channel.AccessHash},\r\n                                    new TLPeerChannel {Id = channel.Id}, false, new TLInt(0), new TLInt(0),\r\n                                    new TLInt(0), new TLInt(Constants.MessagesSlice),\r\n                                    result2 =>\r\n                                    {\r\n                                        var id = new TLVector<TLInt>();\r\n                                        foreach (var message in result2.Messages)\r\n                                        {\r\n                                            id.Add(message.Id);\r\n                                        }\r\n                                        IoC.Get<ICacheService>().DeleteChannelMessages(channel.Id, id);\r\n                                        IoC.Get<ICacheService>()\r\n                                            .SyncPeerMessages(new TLPeerChannel {Id = channel.Id}, result2, true, false,\r\n                                                result3 => { NavigateToGroup(chat); });\r\n                                    },\r\n                                    error2 => { Execute.ShowDebugMessage(\"messages.getHistory error \" + error2); });\r\n                            }\r\n                            else\r\n                            {\r\n                                NavigateToGroup(chat);\r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        if (error.TypeEquals(ErrorType.INVITE_HASH_EMPTY)\r\n                            || error.TypeEquals(ErrorType.INVITE_HASH_INVALID)\r\n                            || error.TypeEquals(ErrorType.INVITE_HASH_EXPIRED))\r\n                        {\r\n                            MessageBox.Show(AppResources.GroupNotExistsError, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (error.TypeEquals(ErrorType.USERS_TOO_MUCH))\r\n                        {\r\n                            MessageBox.Show(AppResources.UsersTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (error.TypeEquals(ErrorType.BOTS_TOO_MUCH))\r\n                        {\r\n                            MessageBox.Show(AppResources.BotsTooMuch, AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else if (error.TypeEquals(ErrorType.USER_ALREADY_PARTICIPANT))\r\n                        {\r\n                            //Execute.BeginOnUIThread(() => MessageBox.Show(string.Format(AppResources.CantFindContactWithUsername, username), AppResources.Error, MessageBoxButton.OK));\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.importChatInvite error \" + error);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.importChatInvite error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private static void NavigateToGroup(TLChatBase chat)\r\n        {\r\n            if (chat == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var navigationService = IoC.Get<INavigationService>();\r\n                IoC.Get<IStateService>().With = chat;\r\n                IoC.Get<IStateService>().RemoveBackEntries = true;\r\n                navigationService.Navigate(new Uri(\"/Views/Dialogs/DialogDetailsView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative));\r\n            });\r\n        }\r\n\r\n        public static void NavigateToConfirmPhone(IMTProtoService mtProtoService, string phone, string hash)\r\n        {\r\n            if (mtProtoService != null)\r\n            {\r\n\r\n                TelegramTransitionFrame frame = null;\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                    if (frame != null) frame.OpenBlockingProgress();\r\n                });\r\n\r\n\r\n                mtProtoService.SendConfirmPhoneCodeAsync(new TLString(hash), null,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (frame != null) frame.CloseBlockingProgress();\r\n\r\n                        NavigateToConfirmPhone(result);\r\n\r\n                        //var peerUser = result.Peer as TLPeerUser;\r\n                        //if (peerUser != null)\r\n                        //{\r\n                        //    var userBase = result.Users.FirstOrDefault();\r\n                        //    if (userBase != null)\r\n                        //    {\r\n                        //        var user = userBase as TLUser;\r\n                        //        if (user != null && user.IsBot)\r\n                        //        {\r\n                        //            NavigateToUser(userBase, accessToken, PageKind.Dialog);\r\n                        //        }\r\n                        //        else\r\n                        //        {\r\n                        //            NavigateToUser(userBase, accessToken, pageKind);\r\n                        //        }\r\n\r\n                        //        return;\r\n                        //    }\r\n                        //}\r\n\r\n                        //var peerChannel = result.Peer as TLPeerChannel;\r\n                        //var peerChat = result.Peer as TLPeerChat;\r\n                        //if (peerChannel != null || peerChat != null)\r\n                        //{\r\n                        //    var chat = result.Chats.FirstOrDefault();\r\n                        //    if (chat != null)\r\n                        //    {\r\n                        //        NavigateToChat(chat, post);\r\n                        //        return;\r\n                        //    }\r\n                        //}\r\n\r\n                        //MessageBox.Show(string.Format(AppResources.CantFindContactWithUsername, username), AppResources.Error, MessageBoxButton.OK);\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (frame != null) frame.CloseBlockingProgress();\r\n\r\n                        if (error.CodeEquals(ErrorCode.BAD_REQUEST)\r\n                            && error.TypeEquals(ErrorType.USERNAME_NOT_OCCUPIED))\r\n                        {\r\n                            //MessageBox.Show(string.Format(AppResources.CantFindContactWithUsername, username), AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(string.Format(\"account.sendConfirmPhoneCode error {0}\", error));\r\n                        }\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public static void NavigateToUsername(IMTProtoService mtProtoService, string username, string accessToken, string post, string game, PageKind pageKind = PageKind.Dialog)\r\n        {\r\n            if (mtProtoService != null)\r\n            {\r\n                var cachedUser = IoC.Get<ICacheService>().GetUser(username);\r\n                if (cachedUser != null)\r\n                {\r\n                    if (!string.IsNullOrEmpty(game))\r\n                    {\r\n                        // telegram.me/bot_name?game=<game_name>\r\n                        // t.me/bot_name?game=<game_name>\r\n                        NavigateToGame(cachedUser, game);\r\n                        return;\r\n                    }\r\n\r\n                    // pageKind=Search telegram.me/bot_name?startgroup=<access_token>\r\n                    // pageKind=Search t.me/bot_name?startgroup=<access_token>\r\n                    // pageKind=Dialog telegram.me/bot_name?start=<access_token>\r\n                    // pageKind=Dialog t.me/bot_name?start=<access_token>\r\n                    NavigateToUser(cachedUser, accessToken, pageKind);\r\n\r\n                    return;\r\n                }\r\n\r\n                var cachedChannel = IoC.Get<ICacheService>().GetChannel(username);\r\n                if (cachedChannel != null)\r\n                {\r\n                    // pageKind=Dialog telegram.me/chat_name?post=<post_number>\r\n                    // pageKind=Dialog t.me/chat_name?post=<post_number>\r\n                    NavigateToChat(cachedChannel, post);\r\n\r\n                    return;\r\n                }\r\n\r\n                TelegramTransitionFrame frame = null;\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                    if (frame != null) frame.OpenBlockingProgress();\r\n                });\r\n\r\n\r\n                mtProtoService.ResolveUsernameAsync(new TLString(username),\r\n                    result => Execute.BeginOnUIThread(() => \r\n                    {\r\n                        if (frame != null) frame.CloseBlockingProgress();\r\n\r\n                        var peerUser = result.Peer as TLPeerUser;\r\n                        if (peerUser != null)\r\n                        {\r\n                            var userBase = result.Users.FirstOrDefault();\r\n                            if (userBase != null)\r\n                            {\r\n                                // telegram.me/bot_name?game=<game_name>\r\n                                // t.me/bot_name?game=<game_name>\r\n                                if (!string.IsNullOrEmpty(game))\r\n                                {\r\n                                    NavigateToGame(userBase, game);\r\n                                    return;\r\n                                }\r\n\r\n                                // pageKind=Search telegram.me/bot_name?startgroup=<access_token>\r\n                                // pageKind=Search t.me/bot_name?startgroup=<access_token>\r\n                                // pageKind=Dialog telegram.me/bot_name?start=<access_token>\r\n                                // pageKind=Dialog t.me/bot_name?start=<access_token>\r\n                                NavigateToUser(userBase, accessToken, pageKind);\r\n\r\n                                return;\r\n                            }\r\n                        }\r\n\r\n                        var peerChannel = result.Peer as TLPeerChannel;\r\n                        var peerChat = result.Peer as TLPeerChat;\r\n                        if (peerChannel != null || peerChat != null)\r\n                        {\r\n                            var chat = result.Chats.FirstOrDefault();\r\n                            if (chat != null)\r\n                            {\r\n                                // pageKind=Dialog telegram.me/chat_name?post=<post_number>\r\n                                // pageKind=Dialog t.me/chat_name?post=<post_number>\r\n                                NavigateToChat(chat, post);\r\n                                return;\r\n                            }\r\n                        }\r\n\r\n                        MessageBox.Show(string.Format(AppResources.CantFindContactWithUsername, username), AppResources.Error, MessageBoxButton.OK);\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (frame != null) frame.CloseBlockingProgress();\r\n\r\n                        if (error.CodeEquals(ErrorCode.BAD_REQUEST)\r\n                            && error.TypeEquals(ErrorType.USERNAME_NOT_OCCUPIED))\r\n                        {\r\n                            MessageBox.Show(string.Format(AppResources.CantFindContactWithUsername, username), AppResources.Error, MessageBoxButton.OK);\r\n                        }\r\n                        else\r\n                        {\r\n                            Execute.ShowDebugMessage(string.Format(\"contacts.resolveUsername {0} error {1}\", username, error));\r\n                        }\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public static void NavigateToPassport(TLPassportConfig passportConfig, int botId, string scope, string callbackUrl, string publicKey, string payload, bool tryAgain = false)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                IoC.Get<IMTProtoService>().GetAuthorizationFormAndPassportConfigAsync(\r\n                    new TLInt(botId),\r\n                    new TLString(scope),\r\n                    new TLString(publicKey),\r\n                    passportConfig != null ? passportConfig.Hash : new TLInt(0),\r\n                    (result, resul2) =>\r\n                    {\r\n                        var newPassportConfig = resul2 as TLPassportConfig;\r\n                        if (newPassportConfig != null)\r\n                        {\r\n                            IoC.Get<IStateService>().SavePassportConfig(newPassportConfig);\r\n                            passportConfig = newPassportConfig;\r\n                        }\r\n\r\n                        result.Config = passportConfig;\r\n                        result.BotId = new TLInt(botId);\r\n                        result.Scope = new TLString(scope);\r\n                        result.PublicKey = new TLString(publicKey);\r\n                        result.CallbackUrl = new TLString(callbackUrl);\r\n                        result.Payload = new TLString(payload);\r\n\r\n                        IoC.Get<IMTProtoService>().GetPasswordAsync(result2 => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            var password = result2 as TLPassword;\r\n                            if (password != null && password.HasPassword)\r\n                            {\r\n                                IoC.Get<IStateService>().AuthorizationForm = result;\r\n                                IoC.Get<IStateService>().Password = result2;\r\n                                IoC.Get<INavigationService>().UriFor<EnterPasswordViewModel>().WithParam(x => x.RandomParam, Guid.NewGuid().ToString()).Navigate();\r\n                                return;\r\n                            }\r\n\r\n                            var noPassword = result2 as TLPassword;\r\n                            if (noPassword != null && !password.HasPassword)\r\n                            {\r\n                                if (!TLString.IsNullOrEmpty(noPassword.EmailUnconfirmedPattern))\r\n                                {\r\n                                    IoC.Get<IStateService>().AuthorizationForm = result;\r\n                                    IoC.Get<IStateService>().Password = result2;\r\n                                    IoC.Get<INavigationService>().UriFor<PasswordViewModel>().Navigate();\r\n                                }\r\n                                else\r\n                                {\r\n                                    IoC.Get<IStateService>().AuthorizationForm = result;\r\n                                    IoC.Get<IStateService>().Password = result2;\r\n                                    IoC.Get<INavigationService>().UriFor<PasswordIntroViewModel>().Navigate();\r\n                                    return;\r\n                                }\r\n                            }\r\n                        }));\r\n                    },\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (tryAgain && error.CodeEquals(ErrorCode.NOT_FOUND))\r\n                        {\r\n                            Execute.ShowDebugMessage(string.Format(\"accoung.getAuthorizationForm try_again={0} error={1}\", tryAgain, error));\r\n                            NavigateToPassport(passportConfig, botId, scope, callbackUrl, publicKey, payload);\r\n                        }\r\n                        else if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                        {\r\n                            if (error.TypeEquals(ErrorType.APP_VERSION_OUTDATED))\r\n                            {\r\n                                ShellViewModel.ShowCustomMessageBox(\r\n                                    AppResources.UpdateAppAlert,\r\n                                    AppResources.AppName,\r\n                                    AppResources.UpdateApp, AppResources.Cancel,\r\n                                    dismissed =>\r\n                                    {\r\n                                        if (dismissed == CustomMessageBoxResult.RightButton)\r\n                                        {\r\n                                            var updateSerivce = IoC.Get<IWindowsPhoneStoreUpdateService>();\r\n                                            updateSerivce.LaunchAppUpdateAsync();\r\n                                        }\r\n                                    });\r\n                            }\r\n                            else\r\n                            {\r\n                                ShellViewModel.ShowCustomMessageBox(\r\n                                    AppResources.PassportFormError + Environment.NewLine + error.Message,\r\n                                    AppResources.AppName,\r\n                                    AppResources.Ok, null,\r\n                                    dismissed => { });\r\n                            }\r\n                        }\r\n                        else \r\n                        {\r\n                            Execute.ShowDebugMessage(string.Format(\"accoung.getAuthorizationForm try_again={0} error={1}\", tryAgain, error));\r\n                        }\r\n                    }));\r\n            });\r\n        }\r\n\r\n        public static void NavigateToSocksProxy(string server, int port, string username, string password)\r\n        {\r\n            if (string.IsNullOrEmpty(server)) return;\r\n            if (port < 0) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var proxyString = string.Format(\"server: {0}\\nport: {1}\", server, port);\r\n                if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password))\r\n                {\r\n                    proxyString += string.Format(\"\\nusername: {0}\\npassword: {1}\", username, password);\r\n                }\r\n\r\n                var message = string.Format(\"{0}\\n\\n{1}\\n\\n{2}\", AppResources.EnableProxyConfigmation, proxyString, AppResources.ChangeProxyServerHint);\r\n                var result = MessageBox.Show(message, AppResources.Proxy, MessageBoxButton.OKCancel);\r\n                if (result == MessageBoxResult.OK)\r\n                {\r\n                    var proxy = new TLSocks5Proxy\r\n                    {\r\n                        CustomFlags = new TLLong(0),\r\n                        Server = new TLString(server),\r\n                        Port = new TLInt(port),\r\n                        Username = new TLString(username),\r\n                        Password = new TLString(password)\r\n                    };\r\n\r\n                    ProxyListViewModel.ApplySettings(IoC.Get<ITransportService>().GetProxyConfig(), true, proxy);\r\n                }\r\n            });\r\n        }\r\n\r\n        public static void NavigateToMTProtoProxy(string server, int port, string secret)\r\n        {\r\n            if (string.IsNullOrEmpty(server)) return;\r\n            if (port < 0) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var proxyString = string.Format(\"server: {0}\\nport: {1}\", server, port);\r\n                if (!string.IsNullOrEmpty(secret) && !string.IsNullOrEmpty(secret))\r\n                {\r\n                    proxyString += string.Format(\"\\nsecret: {0}\", secret);\r\n                }\r\n\r\n                var message = string.Format(\"{0}\\n\\n{1}\\n\\n{2}\\n\\n{3}\", AppResources.EnableProxyConfigmation, proxyString, AppResources.ChangeProxyServerHint, AppResources.ProxySponsorWarning);\r\n                var result = MessageBox.Show(message, AppResources.Proxy, MessageBoxButton.OKCancel);\r\n                if (result == MessageBoxResult.OK)\r\n                {\r\n                    var proxy = new TLMTProtoProxy\r\n                    {\r\n                        CustomFlags = new TLLong(0),\r\n                        Server = new TLString(server),\r\n                        Port = new TLInt(port),\r\n                        Secret = new TLString(secret)\r\n                    };\r\n\r\n                    ProxyListViewModel.ApplySettings(IoC.Get<ITransportService>().GetProxyConfig(), true, proxy);\r\n\r\n                }\r\n            });\r\n        }\r\n\r\n        public static void NavigateToHashtag(string hashtag)\r\n        {\r\n            if (string.IsNullOrEmpty(hashtag)) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                IoC.Get<IStateService>().Hashtag = hashtag;\r\n                //IoC.Get<IStateService>().RemoveBackEntries = true;\r\n                //var navigationService = IoC.Get<INavigationService>();\r\n                //navigationService.Navigate(new Uri(\"/Views/Dialogs/DialogDetailsView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative)); // fix DialogDetailsView -> DialogDetailsView\r\n                IoC.Get<INavigationService>().UriFor<SearchShellViewModel>().Navigate();\r\n            });\r\n        }\r\n\r\n        public static void NavigateToUser(TLUserBase userBase, string accessToken, PageKind pageKind = PageKind.Dialog)\r\n        {\r\n            if (userBase == null) return;\r\n\r\n            var rootVisual = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            if (rootVisual != null)\r\n            {\r\n                var dialogDetailsView = rootVisual.Content as IDialogDetailsView;\r\n                if (dialogDetailsView != null)\r\n                {\r\n                    dialogDetailsView.CreateBitmapCache(null);\r\n                }\r\n            }\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                \r\n                var navigationService = IoC.Get<INavigationService>();\r\n\r\n                var user = userBase as TLUser;\r\n                if (user != null && user.IsBot)\r\n                {\r\n                    pageKind = PageKind.Dialog;\r\n                }\r\n\r\n                if (pageKind == PageKind.Profile)\r\n                {\r\n                    IoC.Get<IStateService>().CurrentContact = userBase;\r\n                    //IoC.Get<IStateService>().RemoveBackEntries = true;\r\n                    navigationService.Navigate(new Uri(\"/Views/Contacts/ContactView.xaml\", UriKind.Relative));\r\n                }\r\n                else if (pageKind == PageKind.Search)\r\n                {\r\n                    if (user != null && user.IsBotGroupsBlocked)\r\n                    {\r\n                        MessageBox.Show(AppResources.AddBotToGroupsError, AppResources.Error, MessageBoxButton.OK);\r\n                        return;\r\n                    }\r\n\r\n                    IoC.Get<IStateService>().With = userBase;\r\n                    IoC.Get<IStateService>().RemoveBackEntries = true;\r\n                    IoC.Get<IStateService>().AccessToken = accessToken;\r\n                    IoC.Get<IStateService>().Bot = userBase;\r\n                    navigationService.Navigate(new Uri(\"/Views/Dialogs/ChooseDialogView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative));\r\n                }\r\n                else\r\n                {\r\n                    IoC.Get<IStateService>().With = userBase;\r\n                    IoC.Get<IStateService>().RemoveBackEntries = true;\r\n                    IoC.Get<IStateService>().AccessToken = accessToken;\r\n                    IoC.Get<IStateService>().Bot = userBase;\r\n                    navigationService.Navigate(new Uri(\"/Views/Dialogs/DialogDetailsView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative));\r\n                }\r\n                 // fix DialogDetailsView -> DialogDetailsView\r\n                //IoC.Get<INavigationService>().UriFor<DialogDetailsViewModel>().Navigate();\r\n            });\r\n        }\r\n\r\n        public static void NavigateToChat(TLChatBase chatBase, string post)\r\n        {\r\n            if (chatBase == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                IoC.Get<IStateService>().With = chatBase;\r\n                IoC.Get<IStateService>().Post = post;\r\n                IoC.Get<IStateService>().RemoveBackEntries = true;\r\n                IoC.Get<INavigationService>().Navigate(new Uri(\"/Views/Dialogs/DialogDetailsView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative));\r\n            });\r\n        }\r\n\r\n        public static void NavigateToGame(TLUserBase user, string game)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                IoC.Get<IStateService>().SharedContact = user;\r\n                IoC.Get<IStateService>().GameString = game;\r\n                IoC.Get<INavigationService>().UriFor<ChooseDialogViewModel>().Navigate();\r\n            });\r\n        }\r\n\r\n        private static void NavigateToForwarding(string url, string urlText)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                IoC.Get<IStateService>().Url = url;\r\n                IoC.Get<IStateService>().UrlText = urlText;\r\n                IoC.Get<INavigationService>().UriFor<ChooseDialogViewModel>().Navigate();\r\n            });\r\n        }\r\n\r\n        private static void NavigateToShareTarget(string weblink)\r\n        {\r\n            if (string.IsNullOrEmpty(weblink)) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                Execute.ShowDebugMessage(weblink);\r\n                var navigationService = IoC.Get<INavigationService>();\r\n                navigationService.Navigate(new Uri(\"/Views/Dialogs/ChooseDialogView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative));\r\n            });\r\n        }\r\n\r\n        public static void NavigateToConfirmPhone(TLSentCodeBase sentCode)\r\n        {\r\n            if (sentCode == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                IoC.Get<IStateService>().SentCode = sentCode;\r\n                IoC.Get<IStateService>().PhoneCodeHash = sentCode.PhoneCodeHash;\r\n                IoC.Get<IStateService>().PhoneRegistered = sentCode.PhoneRegistered;\r\n                IoC.Get<IStateService>().SendCallTimeout = sentCode.SendCallTimeout;\r\n                var sentCode50 = sentCode as TLSentCode50;\r\n                if (sentCode50 != null)\r\n                {\r\n                    IoC.Get<IStateService>().Type = sentCode50.Type;\r\n                    IoC.Get<IStateService>().NextType = sentCode50.NextType;\r\n                }\r\n                IoC.Get<INavigationService>().UriFor<CancelConfirmResetViewModel>().Navigate();\r\n            });\r\n        }\r\n    }\r\n\r\n    public enum PageKind\r\n    {\r\n        Dialog,\r\n        Profile,\r\n        Search\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Caliburn.Micro\" version=\"1.5.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Caliburn.Micro.BindableAppBar\" version=\"1.0.4.0\" targetFramework=\"wp71\" />\r\n  <package id=\"Coding4Fun.Toolkit.Controls\" version=\"2.0.7\" targetFramework=\"wp71\" />\r\n  <package id=\"ID3\" version=\"0.3.0\" targetFramework=\"wp71\" />\r\n  <package id=\"ImageTools\" version=\"0.3.1\" targetFramework=\"wp71\" />\r\n  <package id=\"libphonenumber-csharp-portable\" version=\"1.0.0.2\" targetFramework=\"wp80\" />\r\n  <package id=\"Mangopollo.Light\" version=\"1.3\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-Core\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-Interfaces\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-Linq\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-Main\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-PlatformServices\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-XAML\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"WPtoolkit\" version=\"4.2013.08.16\" targetFramework=\"wp71\" />\r\n</packages>"
  },
  {
    "path": "TelegramClient.Native/ConnectionSocket.cpp",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"pch.h\"\r\n//#define WIN32_LEAN_AND_MEAN\r\n\r\n#include <windows.h>\r\n#include <winsock2.h>\r\n#include <ws2tcpip.h>\r\n#include <stdio.h>\r\n\r\n#include \"ConnectionSocket.h\"\r\n\r\n#pragma comment(lib,\"WS2_32\")\r\n\r\nusing namespace TelegramClient_Native;\r\n\r\nvoid ConnectionSocket::SendPacket(Platform::String^ caption, const Platform::Array<uint8>^ data)\r\n{\r\n\t\r\n}\r\n\r\nvoid ConnectionSocket::Close()\r\n{\r\n\tint err = closesocket(_socket);\r\n\tif (err < 0)\r\n\t{\r\n\tprintf(\"closesocket failed with error: %d\\n\", err);\r\n\treturn;\r\n\t}\r\n}\r\n\r\nConnectionSocket::ConnectionSocket(Platform::String^ host, int port)\r\n{\r\n\tWORD wVersionRequested;\r\n\tWSADATA wsaData;\r\n\tint err;\r\n\r\n\t/* Use the MAKEWORD(lowbyte, highbyte) macro declared in Windef.h */\r\n\twVersionRequested = MAKEWORD(2, 2);\r\n\r\n\terr = WSAStartup(wVersionRequested, &wsaData);\r\n\tif (err != 0) {\r\n\t\t/* Tell the user that we could not find a usable */\r\n\t\t/* Winsock DLL.                                  */\r\n\t\tprintf(\"WSAStartup failed with error: %d\\n\", err);\r\n\t\treturn;\r\n\t}\r\n\r\n\t_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);\r\n\r\n\tsockaddr_in serverAddr;\r\n\tmemset(&serverAddr, 0, sizeof(serverAddr));\r\n\tserverAddr.sin_family = AF_INET;\r\n\tserverAddr.sin_addr.s_addr = inet_addr(\"149.154.175.50\");\r\n\tserverAddr.sin_port = htons(443);\r\n\r\n\terr = connect(_socket, (sockaddr*)&serverAddr, sizeof(serverAddr));\r\n\tif (err < 0)\r\n\t{\r\n\t\tprintf(\"connect failed with error: %d\\n\", err);\r\n\t\treturn;\r\n\t}\r\n\r\n\t/*err = closesocket(_socket);\r\n\tif (err < 0)\r\n\t{\r\n\t\tprintf(\"closesocket failed with error: %d\\n\", err);\r\n\t\treturn;\r\n\t}*/\r\n\t//int sockbufsize = 0, size = sizeof(int);\r\n\t//err = getsockopt(skt, SOL_SOCKET, SO_RCVBUF, (char *)&sockbufsize, &size);\r\n\r\n\t//WSACleanup();\r\n}\r\n\r\nint ConnectionSocket::GetReceiveBufferSize()\r\n{\r\n\tint sockbufsize = 0, size = sizeof(int);\r\n\tint err = getsockopt(_socket, SOL_SOCKET, SO_RCVBUF, (char *)&sockbufsize, &size);\r\n\r\n\treturn sockbufsize;\r\n}\r\n\r\nint ConnectionSocket::GetSendBufferSize()\r\n{\r\n\tint sockbufsize = 0, size = sizeof(int);\r\n\tint err = getsockopt(_socket, SOL_SOCKET, SO_SNDBUF, (char *)&sockbufsize, &size);\r\n\r\n\treturn sockbufsize;\r\n}\r\n"
  },
  {
    "path": "TelegramClient.Native/ConnectionSocket.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n\r\nnamespace TelegramClient_Native\r\n{\r\n\tref class ConnectionSocket;\r\n\tpublic delegate void PacketReceivedEventHandler(ConnectionSocket^ sender, const Platform::Array<uint8>^ s);\r\n\r\n\tpublic ref class ConnectionSocket sealed\r\n\t{\r\n\tprivate:\r\n\t\tSOCKET _socket;\r\n\r\n\tpublic:\r\n\t\tConnectionSocket(Platform::String^ host, int port);\r\n\r\n\t\tevent PacketReceivedEventHandler^ PacketReceived;\r\n\t\tvoid SendPacket(Platform::String^ caption, const Platform::Array<uint8>^ data);\r\n\t\tvoid Close();\r\n\r\n\t\tint GetReceiveBufferSize();\r\n\r\n\t\tint GetSendBufferSize();\r\n\t};\r\n}\r\n\r\n"
  },
  {
    "path": "TelegramClient.Native/EmojiSuggestion.cpp",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"pch.h\"\r\n#include \"EmojiSuggestion.h\"\r\n#include \"emoji_suggestions.h\"\r\n\r\nusing namespace TelegramClient_Native;\r\nusing namespace Platform;\r\nusing namespace Ui::Emoji;\r\n\r\nint EmojiSuggestion::GetSuggestionMaxLength()\r\n{\r\n\treturn Ui::Emoji::GetSuggestionMaxLength();\r\n}\r\n\r\nEmojiSuggestion::EmojiSuggestion(Suggestion suggestion)\r\n{\r\n\tauto emoji = reinterpret_cast<const wchar_t*>(suggestion.emoji().data());\r\n\tm_emoji = ref new String(emoji, suggestion.emoji().size());\r\n\r\n\tauto label = reinterpret_cast<const wchar_t*>(suggestion.label().data());\r\n\tm_label = ref new String(label, suggestion.label().size());\r\n\r\n\tauto replacement = reinterpret_cast<const wchar_t*>(suggestion.replacement().data());\r\n\tm_replacement = ref new String(replacement, suggestion.replacement().size());\r\n}\r\n\r\nArray<EmojiSuggestion^>^ EmojiSuggestion::GetSuggestions(String^ query)\r\n{\r\n\tauto data = reinterpret_cast<const utf16char*>(query->Data());\r\n\tauto results = Ui::Emoji::GetSuggestions(utf16string(data, query->Length()));\r\n\r\n\tstd::vector<EmojiSuggestion^> suggestions;\r\n\r\n\tfor (auto &item : results)\r\n\t{\r\n\t\tsuggestions.push_back(ref new EmojiSuggestion(item));\r\n\t}\r\n\r\n\treturn ref new Array<EmojiSuggestion^>(suggestions.data(), suggestions.size());\r\n}\r\n"
  },
  {
    "path": "TelegramClient.Native/EmojiSuggestion.h",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n\r\n#include \"emoji_suggestions.h\"\r\n\r\nusing namespace Platform;\r\nusing namespace Ui::Emoji;\r\n\r\nnamespace TelegramClient_Native\r\n{\r\n\tpublic ref class EmojiSuggestion sealed\r\n\t{\r\n\tpublic:\r\n\t\tstatic Array<EmojiSuggestion^>^ GetSuggestions(String^ query);\r\n\t\tstatic int GetSuggestionMaxLength();\r\n\r\n\r\n\t\tproperty String^ Emoji\r\n\t\t{\r\n\t\t\tString^ get() { return m_emoji; }\r\n\t\t}\r\n\r\n\t\tproperty String^ Label\r\n\t\t{\r\n\t\t\tString^ get() { return m_label; }\r\n\t\t}\r\n\r\n\t\tproperty String^ Replacement\r\n\t\t{\r\n\t\t\tString^ get() { return m_replacement; }\r\n\t\t}\r\n\r\n\r\n\tprivate:\r\n\t\tEmojiSuggestion(Suggestion suggestion);\r\n\r\n\t\tString^ m_emoji;\r\n\t\tString^ m_label;\r\n\t\tString^ m_replacement;\r\n\t};\r\n}\r\n"
  },
  {
    "path": "TelegramClient.Native/TelegramClient.Native.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|ARM\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{b51dd8c5-335d-4a2d-b429-6d0f41ed0281}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <ProjectName>TelegramClient.Native</ProjectName>\r\n    <RootNamespace>TelegramClient_Native</RootNamespace>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\r\n    <AppContainerApplication>true</AppContainerApplication>\r\n    <ApplicationType>Windows Phone Silverlight</ApplicationType>\r\n    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"ConnectionSocket.h\" />\r\n    <ClInclude Include=\"EmojiSuggestion.h\" />\r\n    <ClInclude Include=\"emoji_suggestions.h\" />\r\n    <ClInclude Include=\"emoji_suggestions_data.h\" />\r\n    <ClInclude Include=\"pch.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"ConnectionSocket.cpp\" />\r\n    <ClCompile Include=\"EmojiSuggestion.cpp\" />\r\n    <ClCompile Include=\"emoji_suggestions.cpp\" />\r\n    <ClCompile Include=\"emoji_suggestions_data.cpp\" />\r\n    <ClCompile Include=\"pch.cpp\">\r\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Create</PrecompiledHeader>\r\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Create</PrecompiledHeader>\r\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">Create</PrecompiledHeader>\r\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">Create</PrecompiledHeader>\r\n    </ClCompile>\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "TelegramClient.Native/TelegramClient.Native.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup>\r\n    <Filter Include=\"Resources\">\r\n      <UniqueIdentifier>b168f0cb-dc50-4df4-9161-ce6c9e6f26e7</UniqueIdentifier>\r\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r\n    </Filter>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"pch.cpp\" />\r\n    <ClCompile Include=\"emoji_suggestions.cpp\" />\r\n    <ClCompile Include=\"emoji_suggestions_data.cpp\" />\r\n    <ClCompile Include=\"EmojiSuggestion.cpp\" />\r\n    <ClCompile Include=\"ConnectionSocket.cpp\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"pch.h\" />\r\n    <ClInclude Include=\"emoji_suggestions.h\" />\r\n    <ClInclude Include=\"emoji_suggestions_data.h\" />\r\n    <ClInclude Include=\"EmojiSuggestion.h\" />\r\n    <ClInclude Include=\"ConnectionSocket.h\" />\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "TelegramClient.Native/emoji_suggestions.cpp",
    "content": "/*\r\nThis file is part of Telegram Desktop,\r\nthe official desktop version of Telegram messaging app, see https://telegram.org\r\n\r\nTelegram Desktop is free software: you can redistribute it and/or modify\r\nit under the terms of the GNU General Public License as published by\r\nthe Free Software Foundation, either version 3 of the License, or\r\n(at your option) any later version.\r\n\r\nIt is distributed in the hope that it will be useful,\r\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\nGNU General Public License for more details.\r\n\r\nIn addition, as a special exception, the copyright holders give permission\r\nto link the code of portions of this program with the OpenSSL library.\r\n\r\nFull license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\r\nCopyright (c) 2014-2017 John Preston, https://desktop.telegram.org\r\n*/\r\n#include \"emoji_suggestions.h\"\r\n\r\n#include <algorithm>\r\n#include \"emoji_suggestions_data.h\"\r\n\r\n#ifndef Expects\r\n#include <cassert>\r\n#define Expects(condition) assert(condition)\r\n#endif // Expects\r\n\r\nnamespace Ui {\r\nnamespace Emoji {\r\nnamespace internal {\r\nnamespace {\r\n\r\nchecksum Crc32Table[256];\r\nclass Crc32Initializer {\r\npublic:\r\n\tCrc32Initializer() {\r\n\t\tchecksum poly = 0x04C11DB7U;\r\n\t\tfor (auto i = 0; i != 256; ++i) {\r\n\t\t\tCrc32Table[i] = reflect(i, 8) << 24;\r\n\t\t\tfor (auto j = 0; j != 8; ++j) {\r\n\t\t\t\tCrc32Table[i] = (Crc32Table[i] << 1) ^ (Crc32Table[i] & (1 << 31) ? poly : 0);\r\n\t\t\t}\r\n\t\t\tCrc32Table[i] = reflect(Crc32Table[i], 32);\r\n\t\t}\r\n\t}\r\n\r\nprivate:\r\n\tchecksum reflect(checksum val, char ch) {\r\n\t\tchecksum result = 0;\r\n\t\tfor (int i = 1; i < (ch + 1); ++i) {\r\n\t\t\tif (val & 1) {\r\n\t\t\t\tresult |= 1 << (ch - i);\r\n\t\t\t}\r\n\t\t\tval >>= 1;\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n};\r\n\r\n} // namespace\r\n\r\nchecksum countChecksum(const void *data, std::size_t size) {\r\n\tstatic Crc32Initializer InitTable;\r\n\r\n\tauto buffer = static_cast<const unsigned char*>(data);\r\n\tauto result = checksum(0xFFFFFFFFU);\r\n\tfor (auto i = std::size_t(0); i != size; ++i) {\r\n\t\tresult = (result >> 8) ^ Crc32Table[(result & 0xFFU) ^ buffer[i]];\r\n\t}\r\n\treturn (result ^ 0xFFFFFFFFU);\r\n}\r\n\r\n} // namespace internal\r\n\r\nnamespace {\r\n\r\nclass string_span {\r\npublic:\r\n\tstring_span() = default;\r\n\tstring_span(const utf16string *data, std::size_t size) : begin_(data), size_(size) {\r\n\t}\r\n\tstring_span(const std::vector<utf16string> &data) : begin_(data.data()), size_(data.size()) {\r\n\t}\r\n\tstring_span(const string_span &other) = default;\r\n\tstring_span &operator=(const string_span &other) = default;\r\n\r\n\tconst utf16string *begin() const {\r\n\t\treturn begin_;\r\n\t}\r\n\tconst utf16string *end() const {\r\n\t\treturn begin_ + size_;\r\n\t}\r\n\tstd::size_t size() const {\r\n\t\treturn size_;\r\n\t}\r\n\r\n\tstring_span subspan(std::size_t offset, std::size_t size) {\r\n\t\treturn string_span(begin_ + offset, size);\r\n\t}\r\n\r\nprivate:\r\n\tconst utf16string *begin_ = nullptr;\r\n\tstd::size_t size_ = 0;\r\n\r\n};\r\n\r\nbool IsNumber(utf16char ch) {\r\n\treturn (ch >= '0' && ch <= '9');\r\n}\r\n\r\nbool IsLetterOrNumber(utf16char ch) {\r\n\treturn (ch >= 'a' && ch <= 'z') || IsNumber(ch);\r\n}\r\n\r\nusing Replacement = internal::Replacement;\r\n\r\nclass Completer {\r\npublic:\r\n\tCompleter(utf16string query);\r\n\r\n\tstd::vector<Suggestion> resolve();\r\n\r\nprivate:\r\n\tstruct Result {\r\n\t\tconst Replacement *replacement;\r\n\t\tint wordsUsed;\r\n\t};\r\n\r\n\tstatic std::vector<utf16char> NormalizeQuery(utf16string query);\r\n\tvoid addResult(const Replacement *replacement);\r\n\tbool isDuplicateOfLastResult(const Replacement *replacement) const;\r\n\tbool isBetterThanLastResult(const Replacement *replacement) const;\r\n\tvoid processInitialList();\r\n\tvoid filterInitialList();\r\n\tvoid initWordsTracking();\r\n\tbool matchQueryForCurrentItem();\r\n\tbool matchQueryTailStartingFrom(int position);\r\n\tstring_span findWordsStartingWith(utf16char ch);\r\n\tint findEqualCharsCount(int position, const utf16string *word);\r\n\tstd::vector<Suggestion> prepareResult();\r\n\tbool startsWithQuery(utf16string word);\r\n\tbool isExactMatch(utf16string replacement);\r\n\r\n\tstd::vector<Result> _result;\r\n\r\n\tutf16string _initialQuery;\r\n\tconst std::vector<utf16char> _query;\r\n\tconst utf16char *_queryBegin = nullptr;\r\n\tint _querySize = 0;\r\n\r\n\tconst std::vector<const Replacement*> *_initialList = nullptr;\r\n\r\n\tstring_span _currentItemWords;\r\n\tint _currentItemWordsUsedCount = 0;\r\n\r\n\tclass UsedWordGuard {\r\n\tpublic:\r\n\t\tUsedWordGuard(std::vector<small> &map, int index);\r\n\t\tUsedWordGuard(const UsedWordGuard &other) = delete;\r\n\t\tUsedWordGuard(UsedWordGuard &&other);\r\n\t\tUsedWordGuard &operator=(const UsedWordGuard &other) = delete;\r\n\t\tUsedWordGuard &operator=(UsedWordGuard &&other) = delete;\r\n\t\texplicit operator bool() const;\r\n\t\t~UsedWordGuard();\r\n\r\n\tprivate:\r\n\t\tstd::vector<small> &_map;\r\n\t\tint _index = 0;\r\n\t\tbool _guarded = false;\r\n\r\n\t};\r\n\tstd::vector<small> _currentItemWordsUsedMap;\r\n\r\n};\r\n\r\nCompleter::UsedWordGuard::UsedWordGuard(std::vector<small> &map, int index) : _map(map), _index(index) {\r\n\tExpects(_map.size() > _index);\r\n\tif (!_map[_index]) {\r\n\t\t_guarded = _map[_index] = 1;\r\n\t}\r\n}\r\n\r\nCompleter::UsedWordGuard::UsedWordGuard(UsedWordGuard &&other) : _map(other._map), _index(other._index), _guarded(other._guarded) {\r\n\tother._guarded = 0;\r\n}\r\n\r\nCompleter::UsedWordGuard::operator bool() const {\r\n\treturn _guarded;\r\n}\r\n\r\nCompleter::UsedWordGuard::~UsedWordGuard() {\r\n\tif (_guarded) {\r\n\t\t_map[_index] = 0;\r\n\t}\r\n}\r\n\r\nCompleter::Completer(utf16string query) : _initialQuery(query), _query(NormalizeQuery(query)) {\r\n}\r\n\r\n// Remove all non-letters-or-numbers.\r\n// Leave '-' and '+' only if they're followed by a number or\r\n// at the end of the query (so it is possibly followed by a number).\r\nstd::vector<utf16char> Completer::NormalizeQuery(utf16string query) {\r\n\tauto result = std::vector<utf16char>();\r\n\tresult.reserve(query.size());\r\n\tauto copyFrom = query.data();\r\n\tauto e = copyFrom + query.size();\r\n\tauto copyTo = result.data();\r\n\tfor (auto i = query.data(); i != e; ++i) {\r\n\t\tif (IsLetterOrNumber(*i)) {\r\n\t\t\tcontinue;\r\n\t\t} else if (*i == '-' || *i == '+') {\r\n\t\t\tif (i + 1 == e || IsNumber(*(i + 1))) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (i > copyFrom) {\r\n\t\t\tresult.resize(result.size() + (i - copyFrom));\r\n\t\t\tmemcpy(copyTo, copyFrom, (i - copyFrom) * sizeof(utf16char));\r\n\t\t\tcopyTo += (i - copyFrom);\r\n\t\t}\r\n\t\tcopyFrom = i + 1;\r\n\t}\r\n\tif (e > copyFrom) {\r\n\t\tresult.resize(result.size() + (e - copyFrom));\r\n\t\tmemcpy(copyTo, copyFrom, (e - copyFrom) * sizeof(utf16char));\r\n\t\tcopyTo += (e - copyFrom);\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nstd::vector<Suggestion> Completer::resolve() {\r\n\t_queryBegin = _query.data();\r\n\t_querySize = _query.size();\r\n\tif (!_querySize) {\r\n\t\treturn std::vector<Suggestion>();\r\n\t}\r\n\t_initialList = Ui::Emoji::internal::GetReplacements(*_queryBegin);\r\n\tif (!_initialList) {\r\n\t\treturn std::vector<Suggestion>();\r\n\t}\r\n\t_result.reserve(_initialList->size());\r\n\tprocessInitialList();\r\n\treturn prepareResult();\r\n}\r\n\r\nbool Completer::isDuplicateOfLastResult(const Replacement *item) const {\r\n\tif (_result.empty()) {\r\n\t\treturn false;\r\n\t}\r\n\treturn (_result.back().replacement->emoji == item->emoji);\r\n}\r\n\r\nbool Completer::isBetterThanLastResult(const Replacement *item) const {\r\n\tExpects(!_result.empty());\r\n\tauto &last = _result.back();\r\n\tif (_currentItemWordsUsedCount < last.wordsUsed) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\tauto firstCharOfQuery = _query[0];\r\n\tauto firstCharAfterColonLast = last.replacement->replacement[1];\r\n\tauto firstCharAfterColonCurrent = item->replacement[1];\r\n\tauto goodLast = (firstCharAfterColonLast == firstCharOfQuery);\r\n\tauto goodCurrent = (firstCharAfterColonCurrent == firstCharOfQuery);\r\n\treturn !goodLast && goodCurrent;\r\n}\r\n\r\nvoid Completer::addResult(const Replacement *item) {\r\n\tif (!isDuplicateOfLastResult(item)) {\r\n\t\t_result.push_back({ item, _currentItemWordsUsedCount });\r\n\t} else if (isBetterThanLastResult(item)) {\r\n\t\t_result.back() = { item, _currentItemWordsUsedCount };\r\n\t}\r\n}\r\n\r\nvoid Completer::processInitialList() {\r\n\tif (_querySize > 1) {\r\n\t\tfilterInitialList();\r\n\t} else {\r\n\t\t_currentItemWordsUsedCount = 1;\r\n\t\tfor (auto item : *_initialList) {\r\n\t\t\taddResult(item);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Completer::initWordsTracking() {\r\n\tauto maxWordsCount = 0;\r\n\tfor (auto item : *_initialList) {\r\n\t\tauto wordsCount = item->words.size();\r\n\t\tif (maxWordsCount < wordsCount) {\r\n\t\t\tmaxWordsCount = wordsCount;\r\n\t\t}\r\n\t}\r\n\t_currentItemWordsUsedMap = std::vector<small>(maxWordsCount, 0);\r\n}\r\n\r\nvoid Completer::filterInitialList() {\r\n\tinitWordsTracking();\r\n\tfor (auto item : *_initialList) {\r\n\t\t_currentItemWords = string_span(item->words);\r\n\t\t_currentItemWordsUsedCount = 1;\r\n\t\tif (matchQueryForCurrentItem()) {\r\n\t\t\taddResult(item);\r\n\t\t}\r\n\t\t_currentItemWordsUsedCount = 0;\r\n\t}\r\n}\r\n\r\nbool Completer::matchQueryForCurrentItem() {\r\n\tExpects(_currentItemWords.size() != 0);\r\n\tif (_currentItemWords.size() < 2) {\r\n\t\treturn startsWithQuery(*_currentItemWords.begin());\r\n\t}\r\n\treturn matchQueryTailStartingFrom(0);\r\n}\r\n\r\nbool Completer::startsWithQuery(utf16string word) {\r\n\tif (word.size() < _query.size()) {\r\n\t\treturn false;\r\n\t}\r\n\tfor (auto i = std::size_t(0), size = _query.size(); i != size; ++i) {\r\n\t\tif (word[i] != _query[i]) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nbool Completer::isExactMatch(utf16string replacement) {\r\n\tif (replacement.size() != _initialQuery.size() + 1) {\r\n\t\treturn false;\r\n\t}\r\n\tfor (auto i = std::size_t(0), size = _initialQuery.size(); i != size; ++i) {\r\n\t\tif (replacement[i] != _initialQuery[i]) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nbool Completer::matchQueryTailStartingFrom(int position) {\r\n\tauto charsLeftToMatch = (_querySize - position);\r\n\tif (!charsLeftToMatch) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\tauto firstCharToMatch = *(_queryBegin + position);\r\n\tauto foundWords = findWordsStartingWith(firstCharToMatch);\r\n\r\n\tfor (auto word = foundWords.begin(), foundWordsEnd = word + foundWords.size(); word != foundWordsEnd; ++word) {\r\n\t\tauto wordIndex = word - _currentItemWords.begin();\r\n\t\tif (auto guard = UsedWordGuard(_currentItemWordsUsedMap, wordIndex)) {\r\n\t\t\t++_currentItemWordsUsedCount;\r\n\t\t\tauto equalCharsCount = findEqualCharsCount(position, word);\r\n\t\t\tfor (auto check = equalCharsCount; check != 0; --check) {\r\n\t\t\t\tif (matchQueryTailStartingFrom(position + check)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t--_currentItemWordsUsedCount;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nint Completer::findEqualCharsCount(int position, const utf16string *word) {\r\n\tauto charsLeft = (_querySize - position);\r\n\tauto wordBegin = word->data();\r\n\tauto wordSize = word->size();\r\n\tauto possibleEqualCharsCount = (charsLeft > wordSize ? wordSize : charsLeft);\r\n\tfor (auto equalTill = 1; equalTill != possibleEqualCharsCount; ++equalTill) {\r\n\t\tauto wordCh = *(wordBegin + equalTill);\r\n\t\tauto queryCh = *(_queryBegin + position + equalTill);\r\n\t\tif (wordCh != queryCh) {\r\n\t\t\treturn equalTill;\r\n\t\t}\r\n\t}\r\n\treturn possibleEqualCharsCount;\r\n}\r\n\r\nstd::vector<Suggestion> Completer::prepareResult() {\r\n\tauto firstCharOfQuery = _query[0];\r\n\tstd::stable_partition(_result.begin(), _result.end(), [firstCharOfQuery](Result &result) {\r\n\t\tauto firstCharAfterColon = result.replacement->replacement[1];\r\n\t\treturn (firstCharAfterColon == firstCharOfQuery);\r\n\t});\r\n\tstd::stable_partition(_result.begin(), _result.end(), [](Result &result) {\r\n\t\treturn (result.wordsUsed < 2);\r\n\t});\r\n\tstd::stable_partition(_result.begin(), _result.end(), [](Result &result) {\r\n\t\treturn (result.wordsUsed < 3);\r\n\t});\r\n\tstd::stable_partition(_result.begin(), _result.end(), [this](Result &result) {\r\n\t\treturn isExactMatch(result.replacement->replacement);\r\n\t});\r\n\r\n\tauto result = std::vector<Suggestion>();\r\n\tresult.reserve(_result.size());\r\n\tfor (auto &item : _result) {\r\n\t\tresult.emplace_back(item.replacement->emoji, item.replacement->replacement, item.replacement->replacement);\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nstring_span Completer::findWordsStartingWith(utf16char ch) {\r\n\tauto begin = std::lower_bound(_currentItemWords.begin(), _currentItemWords.end(), ch, [](utf16string word, utf16char ch) {\r\n\t\treturn word[0] < ch;\r\n\t});\r\n\tauto end = std::upper_bound(_currentItemWords.begin(), _currentItemWords.end(), ch, [](utf16char ch, utf16string word) {\r\n\t\treturn ch < word[0];\r\n\t});\r\n\treturn _currentItemWords.subspan(begin - _currentItemWords.begin(), end - begin);\r\n}\r\n\r\n} // namespace\r\n\r\nstd::vector<Suggestion> GetSuggestions(utf16string query) {\r\n\treturn Completer(query).resolve();\r\n}\r\n\r\nint GetSuggestionMaxLength() {\r\n\treturn internal::kReplacementMaxLength;\r\n}\r\n\r\n} // namespace Emoji\r\n} // namespace Ui\r\n"
  },
  {
    "path": "TelegramClient.Native/emoji_suggestions.h",
    "content": "/*\r\nThis file is part of Telegram Desktop,\r\nthe official desktop version of Telegram messaging app, see https://telegram.org\r\n\r\nTelegram Desktop is free software: you can redistribute it and/or modify\r\nit under the terms of the GNU General Public License as published by\r\nthe Free Software Foundation, either version 3 of the License, or\r\n(at your option) any later version.\r\n\r\nIt is distributed in the hope that it will be useful,\r\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\nGNU General Public License for more details.\r\n\r\nIn addition, as a special exception, the copyright holders give permission\r\nto link the code of portions of this program with the OpenSSL library.\r\n\r\nFull license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\r\nCopyright (c) 2014-2017 John Preston, https://desktop.telegram.org\r\n*/\r\n#pragma once\r\n\r\n#include <vector>\r\n\r\nnamespace Ui {\r\nnamespace Emoji {\r\n\r\nusing small = unsigned char;\r\nusing medium = unsigned short;\r\nusing utf16char = unsigned short;\r\n\r\nstatic_assert(sizeof(utf16char) == 2, \"Bad UTF-16 character size.\");\r\n\r\nclass utf16string {\r\npublic:\r\n\tutf16string() = default;\r\n\tutf16string(const utf16char *data, std::size_t size) : data_(data), size_(size) {\r\n\t}\r\n\tutf16string(const utf16string &other) = default;\r\n\tutf16string &operator=(const utf16string &other) = default;\r\n\r\n\tconst utf16char *data() const {\r\n\t\treturn data_;\r\n\t}\r\n\tstd::size_t size() const {\r\n\t\treturn size_;\r\n\t}\r\n\r\n\tutf16char operator[](int index) const {\r\n\t\treturn data_[index];\r\n\t}\r\n\r\nprivate:\r\n\tconst utf16char *data_ = nullptr;\r\n\tstd::size_t size_ = 0;\r\n\r\n};\r\n\r\ninline bool operator==(utf16string a, utf16string b) {\r\n\treturn (a.size() == b.size()) && (!a.size() || !memcmp(a.data(), b.data(), a.size() * sizeof(utf16char)));\r\n}\r\n\r\nnamespace internal {\r\n\r\nusing checksum = unsigned int;\r\nchecksum countChecksum(const void *data, std::size_t size);\r\n\r\nutf16string GetReplacementEmoji(utf16string replacement);\r\n\r\n} // namespace internal\r\n\r\nclass Suggestion {\r\npublic:\r\n\tSuggestion() = default;\r\n\tSuggestion(utf16string emoji, utf16string label, utf16string replacement) : emoji_(emoji), label_(label), replacement_(replacement) {\r\n\t}\r\n\tSuggestion(const Suggestion &other) = default;\r\n\tSuggestion &operator=(const Suggestion &other) = default;\r\n\r\n\tutf16string emoji() const {\r\n\t\treturn emoji_;\r\n\t}\r\n\tutf16string label() const {\r\n\t\treturn label_;\r\n\t}\r\n\tutf16string replacement() const {\r\n\t\treturn replacement_;\r\n\t}\r\n\r\nprivate:\r\n\tutf16string emoji_;\r\n\tutf16string label_;\r\n\tutf16string replacement_;\r\n\r\n};\r\n\r\nstd::vector<Suggestion> GetSuggestions(utf16string query);\r\n\r\ninline utf16string GetSuggestionEmoji(utf16string replacement) {\r\n\treturn internal::GetReplacementEmoji(replacement);\r\n}\r\n\r\nint GetSuggestionMaxLength();\r\n\r\n\r\n} // namespace Emoji\r\n} // namespace Ui\r\n"
  },
  {
    "path": "TelegramClient.Native/emoji_suggestions_data.cpp",
    "content": "/*\nWARNING! All changes made in this file will be lost!\nCreated from 'empty' by 'codegen_emoji'\n\nThis file is part of Telegram Desktop,\nthe official desktop version of Telegram messaging app, see https://telegram.org\n\nTelegram Desktop is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nIt is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nIn addition, as a special exception, the copyright holders give permission\nto link the code of portions of this program with the OpenSSL library.\n\nFull license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\nCopyright (c) 2014-2017 John Preston, https://desktop.telegram.org\n*/\n#include \"emoji_suggestions_data.h\"\n\n#include <map>\n\nnamespace Ui {\nnamespace Emoji {\nnamespace internal {\nnamespace {\n\nstruct ReplacementStruct {\n\tsmall emojiSize;\n\tsmall replacementSize;\n\tsmall wordsCount;\n};\n\nconst utf16char ReplacementData[] = {\n0xd83d, 0xde00, 0x3a, 0x67, 0x72, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x3a,\n0x67, 0x72, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0xd83d, 0xde03, 0x3a, 0x73,\n0x6d, 0x69, 0x6c, 0x65, 0x79, 0x3a, 0x73, 0x6d, 0x69, 0x6c, 0x65, 0x79,\n0xd83d, 0xde04, 0x3a, 0x73, 0x6d, 0x69, 0x6c, 0x65, 0x3a, 0x73, 0x6d, 0x69,\n0x6c, 0x65, 0xd83d, 0xde01, 0x3a, 0x67, 0x72, 0x69, 0x6e, 0x3a, 0x67, 0x72,\n0x69, 0x6e, 0xd83d, 0xde06, 0x3a, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69,\n0x65, 0x64, 0x3a, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x64,\n0xd83d, 0xde06, 0x3a, 0x6c, 0x61, 0x75, 0x67, 0x68, 0x69, 0x6e, 0x67, 0x3a,\n0x6c, 0x61, 0x75, 0x67, 0x68, 0x69, 0x6e, 0x67, 0xd83d, 0xde05, 0x3a, 0x73,\n0x77, 0x65, 0x61, 0x74, 0x5f, 0x73, 0x6d, 0x69, 0x6c, 0x65, 0x3a, 0x73,\n0x6d, 0x69, 0x6c, 0x65, 0x73, 0x77, 0x65, 0x61, 0x74, 0xd83d, 0xde02, 0x3a,\n0x6a, 0x6f, 0x79, 0x3a, 0x6a, 0x6f, 0x79, 0xd83e, 0xdd23, 0x3a, 0x72, 0x6f,\n0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x65,\n0x5f, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x5f, 0x6c, 0x61, 0x75, 0x67, 0x68,\n0x69, 0x6e, 0x67, 0x3a, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x6c, 0x61, 0x75,\n0x67, 0x68, 0x69, 0x6e, 0x67, 0x6f, 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x69,\n0x6e, 0x67, 0x74, 0x68, 0x65, 0xd83e, 0xdd23, 0x3a, 0x72, 0x6f, 0x66, 0x6c,\n0x3a, 0x72, 0x6f, 0x66, 0x6c, 0x263a, 0xfe0f, 0x3a, 0x72, 0x65, 0x6c, 0x61,\n0x78, 0x65, 0x64, 0x3a, 0x72, 0x65, 0x6c, 0x61, 0x78, 0x65, 0x64, 0xd83d,\n0xde0a, 0x3a, 0x62, 0x6c, 0x75, 0x73, 0x68, 0x3a, 0x62, 0x6c, 0x75, 0x73,\n0x68, 0xd83d, 0xde07, 0x3a, 0x69, 0x6e, 0x6e, 0x6f, 0x63, 0x65, 0x6e, 0x74,\n0x3a, 0x69, 0x6e, 0x6e, 0x6f, 0x63, 0x65, 0x6e, 0x74, 0xd83d, 0xde42, 0x3a,\n0x73, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6c, 0x79, 0x5f, 0x73, 0x6d, 0x69,\n0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61,\n0x63, 0x65, 0x73, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6c, 0x79, 0x73, 0x6d,\n0x69, 0x6c, 0x69, 0x6e, 0x67, 0xd83d, 0xde42, 0x3a, 0x73, 0x6c, 0x69, 0x67,\n0x68, 0x74, 0x5f, 0x73, 0x6d, 0x69, 0x6c, 0x65, 0x3a, 0x73, 0x6c, 0x69,\n0x67, 0x68, 0x74, 0x73, 0x6d, 0x69, 0x6c, 0x65, 0xd83d, 0xde43, 0x3a, 0x75,\n0x70, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x66,\n0x61, 0x63, 0x65, 0x3a, 0x64, 0x6f, 0x77, 0x6e, 0x66, 0x61, 0x63, 0x65,\n0x75, 0x70, 0x73, 0x69, 0x64, 0x65, 0xd83d, 0xde43, 0x3a, 0x75, 0x70, 0x73,\n0x69, 0x64, 0x65, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x3a, 0x64, 0x6f, 0x77,\n0x6e, 0x75, 0x70, 0x73, 0x69, 0x64, 0x65, 0xd83d, 0xde09, 0x3a, 0x77, 0x69,\n0x6e, 0x6b, 0x3a, 0x77, 0x69, 0x6e, 0x6b, 0xd83d, 0xde0c, 0x3a, 0x72, 0x65,\n0x6c, 0x69, 0x65, 0x76, 0x65, 0x64, 0x3a, 0x72, 0x65, 0x6c, 0x69, 0x65,\n0x76, 0x65, 0x64, 0xd83d, 0xde0d, 0x3a, 0x68, 0x65, 0x61, 0x72, 0x74, 0x5f,\n0x65, 0x79, 0x65, 0x73, 0x3a, 0x65, 0x79, 0x65, 0x73, 0x68, 0x65, 0x61,\n0x72, 0x74, 0xd83d, 0xde18, 0x3a, 0x6b, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67,\n0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x3a, 0x68, 0x65, 0x61, 0x72, 0x74,\n0x6b, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0xd83d, 0xde17, 0x3a, 0x6b, 0x69,\n0x73, 0x73, 0x69, 0x6e, 0x67, 0x3a, 0x6b, 0x69, 0x73, 0x73, 0x69, 0x6e,\n0x67, 0xd83d, 0xde19, 0x3a, 0x6b, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f,\n0x73, 0x6d, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x79, 0x65, 0x73,\n0x3a, 0x65, 0x79, 0x65, 0x73, 0x6b, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67,\n0x73, 0x6d, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0xd83d, 0xde1a, 0x3a, 0x6b, 0x69,\n0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64,\n0x5f, 0x65, 0x79, 0x65, 0x73, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64,\n0x65, 0x79, 0x65, 0x73, 0x6b, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0xd83d,\n0xde0b, 0x3a, 0x79, 0x75, 0x6d, 0x3a, 0x79, 0x75, 0x6d, 0xd83d, 0xde1c, 0x3a,\n0x73, 0x74, 0x75, 0x63, 0x6b, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x74, 0x6f,\n0x6e, 0x67, 0x75, 0x65, 0x5f, 0x77, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67,\n0x5f, 0x65, 0x79, 0x65, 0x3a, 0x65, 0x79, 0x65, 0x6f, 0x75, 0x74, 0x73,\n0x74, 0x75, 0x63, 0x6b, 0x74, 0x6f, 0x6e, 0x67, 0x75, 0x65, 0x77, 0x69,\n0x6e, 0x6b, 0x69, 0x6e, 0x67, 0xd83d, 0xde1d, 0x3a, 0x73, 0x74, 0x75, 0x63,\n0x6b, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x74, 0x6f, 0x6e, 0x67, 0x75, 0x65,\n0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x79, 0x65, 0x73,\n0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x65, 0x79, 0x65, 0x73, 0x6f,\n0x75, 0x74, 0x73, 0x74, 0x75, 0x63, 0x6b, 0x74, 0x6f, 0x6e, 0x67, 0x75,\n0x65, 0xd83d, 0xde1b, 0x3a, 0x73, 0x74, 0x75, 0x63, 0x6b, 0x5f, 0x6f, 0x75,\n0x74, 0x5f, 0x74, 0x6f, 0x6e, 0x67, 0x75, 0x65, 0x3a, 0x6f, 0x75, 0x74,\n0x73, 0x74, 0x75, 0x63, 0x6b, 0x74, 0x6f, 0x6e, 0x67, 0x75, 0x65, 0xd83e,\n0xdd11, 0x3a, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x6d, 0x6f, 0x75, 0x74,\n0x68, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x6d,\n0x6f, 0x6e, 0x65, 0x79, 0x6d, 0x6f, 0x75, 0x74, 0x68, 0xd83e, 0xdd11, 0x3a,\n0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x6d, 0x6f, 0x75, 0x74, 0x68, 0x3a,\n0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x6d, 0x6f, 0x75, 0x74, 0x68, 0xd83e, 0xdd17,\n0x3a, 0x68, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63,\n0x65, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x68, 0x75, 0x67, 0x67, 0x69, 0x6e,\n0x67, 0xd83e, 0xdd17, 0x3a, 0x68, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x3a,\n0x68, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0xd83e, 0xdd13, 0x3a, 0x6e, 0x65,\n0x72, 0x64, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63, 0x65,\n0x6e, 0x65, 0x72, 0x64, 0xd83e, 0xdd13, 0x3a, 0x6e, 0x65, 0x72, 0x64, 0x3a,\n0x6e, 0x65, 0x72, 0x64, 0xd83d, 0xde0e, 0x3a, 0x73, 0x75, 0x6e, 0x67, 0x6c,\n0x61, 0x73, 0x73, 0x65, 0x73, 0x3a, 0x73, 0x75, 0x6e, 0x67, 0x6c, 0x61,\n0x73, 0x73, 0x65, 0x73, 0xd83e, 0xdd21, 0x3a, 0x63, 0x6c, 0x6f, 0x77, 0x6e,\n0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x63, 0x6c, 0x6f, 0x77, 0x6e, 0x66,\n0x61, 0x63, 0x65, 0xd83e, 0xdd21, 0x3a, 0x63, 0x6c, 0x6f, 0x77, 0x6e, 0x3a,\n0x63, 0x6c, 0x6f, 0x77, 0x6e, 0xd83e, 0xdd20, 0x3a, 0x66, 0x61, 0x63, 0x65,\n0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x77, 0x62, 0x6f, 0x79,\n0x5f, 0x68, 0x61, 0x74, 0x3a, 0x63, 0x6f, 0x77, 0x62, 0x6f, 0x79, 0x66,\n0x61, 0x63, 0x65, 0x68, 0x61, 0x74, 0x77, 0x69, 0x74, 0x68, 0xd83e, 0xdd20,\n0x3a, 0x63, 0x6f, 0x77, 0x62, 0x6f, 0x79, 0x3a, 0x63, 0x6f, 0x77, 0x62,\n0x6f, 0x79, 0xd83d, 0xde0f, 0x3a, 0x73, 0x6d, 0x69, 0x72, 0x6b, 0x3a, 0x73,\n0x6d, 0x69, 0x72, 0x6b, 0xd83d, 0xde12, 0x3a, 0x75, 0x6e, 0x61, 0x6d, 0x75,\n0x73, 0x65, 0x64, 0x3a, 0x75, 0x6e, 0x61, 0x6d, 0x75, 0x73, 0x65, 0x64,\n0xd83d, 0xde1e, 0x3a, 0x64, 0x69, 0x73, 0x61, 0x70, 0x70, 0x6f, 0x69, 0x6e,\n0x74, 0x65, 0x64, 0x3a, 0x64, 0x69, 0x73, 0x61, 0x70, 0x70, 0x6f, 0x69,\n0x6e, 0x74, 0x65, 0x64, 0xd83d, 0xde14, 0x3a, 0x70, 0x65, 0x6e, 0x73, 0x69,\n0x76, 0x65, 0x3a, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0xd83d, 0xde1f,\n0x3a, 0x77, 0x6f, 0x72, 0x72, 0x69, 0x65, 0x64, 0x3a, 0x77, 0x6f, 0x72,\n0x72, 0x69, 0x65, 0x64, 0xd83d, 0xde15, 0x3a, 0x63, 0x6f, 0x6e, 0x66, 0x75,\n0x73, 0x65, 0x64, 0x3a, 0x63, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x65, 0x64,\n0xd83d, 0xde41, 0x3a, 0x73, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6c, 0x79, 0x5f,\n0x66, 0x72, 0x6f, 0x77, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63,\n0x65, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x66, 0x72, 0x6f, 0x77, 0x6e, 0x69,\n0x6e, 0x67, 0x73, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6c, 0x79, 0xd83d, 0xde41,\n0x3a, 0x73, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x77,\n0x6e, 0x3a, 0x66, 0x72, 0x6f, 0x77, 0x6e, 0x73, 0x6c, 0x69, 0x67, 0x68,\n0x74, 0x2639, 0xfe0f, 0x3a, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x66, 0x72,\n0x6f, 0x77, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a,\n0x66, 0x61, 0x63, 0x65, 0x66, 0x72, 0x6f, 0x77, 0x6e, 0x69, 0x6e, 0x67,\n0x77, 0x68, 0x69, 0x74, 0x65, 0x2639, 0xfe0f, 0x3a, 0x66, 0x72, 0x6f, 0x77,\n0x6e, 0x69, 0x6e, 0x67, 0x32, 0x3a, 0x66, 0x72, 0x6f, 0x77, 0x6e, 0x69,\n0x6e, 0x67, 0x32, 0xd83d, 0xde23, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x65, 0x76,\n0x65, 0x72, 0x65, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x65, 0x76, 0x65, 0x72,\n0x65, 0xd83d, 0xde16, 0x3a, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x75, 0x6e, 0x64,\n0x65, 0x64, 0x3a, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x65,\n0x64, 0xd83d, 0xde2b, 0x3a, 0x74, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x61,\n0x63, 0x65, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x74, 0x69, 0x72, 0x65, 0x64,\n0xd83d, 0xde29, 0x3a, 0x77, 0x65, 0x61, 0x72, 0x79, 0x3a, 0x77, 0x65, 0x61,\n0x72, 0x79, 0xd83d, 0xde24, 0x3a, 0x74, 0x72, 0x69, 0x75, 0x6d, 0x70, 0x68,\n0x3a, 0x74, 0x72, 0x69, 0x75, 0x6d, 0x70, 0x68, 0xd83d, 0xde20, 0x3a, 0x61,\n0x6e, 0x67, 0x72, 0x79, 0x3a, 0x61, 0x6e, 0x67, 0x72, 0x79, 0xd83d, 0xde21,\n0x3a, 0x72, 0x61, 0x67, 0x65, 0x3a, 0x72, 0x61, 0x67, 0x65, 0xd83d, 0xde36,\n0x3a, 0x6e, 0x6f, 0x5f, 0x6d, 0x6f, 0x75, 0x74, 0x68, 0x3a, 0x6d, 0x6f,\n0x75, 0x74, 0x68, 0x6e, 0x6f, 0xd83d, 0xde10, 0x3a, 0x6e, 0x65, 0x75, 0x74,\n0x72, 0x61, 0x6c, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63,\n0x65, 0x6e, 0x65, 0x75, 0x74, 0x72, 0x61, 0x6c, 0xd83d, 0xde11, 0x3a, 0x65,\n0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x6c, 0x65, 0x73,\n0x73, 0x3a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,\n0x6c, 0x65, 0x73, 0x73, 0xd83d, 0xde2f, 0x3a, 0x68, 0x75, 0x73, 0x68, 0x65,\n0x64, 0x3a, 0x68, 0x75, 0x73, 0x68, 0x65, 0x64, 0xd83d, 0xde26, 0x3a, 0x66,\n0x72, 0x6f, 0x77, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x66, 0x72, 0x6f, 0x77,\n0x6e, 0x69, 0x6e, 0x67, 0xd83d, 0xde27, 0x3a, 0x61, 0x6e, 0x67, 0x75, 0x69,\n0x73, 0x68, 0x65, 0x64, 0x3a, 0x61, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68,\n0x65, 0x64, 0xd83d, 0xde2e, 0x3a, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x6d, 0x6f,\n0x75, 0x74, 0x68, 0x3a, 0x6d, 0x6f, 0x75, 0x74, 0x68, 0x6f, 0x70, 0x65,\n0x6e, 0xd83d, 0xde32, 0x3a, 0x61, 0x73, 0x74, 0x6f, 0x6e, 0x69, 0x73, 0x68,\n0x65, 0x64, 0x3a, 0x61, 0x73, 0x74, 0x6f, 0x6e, 0x69, 0x73, 0x68, 0x65,\n0x64, 0xd83d, 0xde35, 0x3a, 0x64, 0x69, 0x7a, 0x7a, 0x79, 0x5f, 0x66, 0x61,\n0x63, 0x65, 0x3a, 0x64, 0x69, 0x7a, 0x7a, 0x79, 0x66, 0x61, 0x63, 0x65,\n0xd83d, 0xde33, 0x3a, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x65, 0x64, 0x3a, 0x66,\n0x6c, 0x75, 0x73, 0x68, 0x65, 0x64, 0xd83d, 0xde31, 0x3a, 0x73, 0x63, 0x72,\n0x65, 0x61, 0x6d, 0x3a, 0x73, 0x63, 0x72, 0x65, 0x61, 0x6d, 0xd83d, 0xde28,\n0x3a, 0x66, 0x65, 0x61, 0x72, 0x66, 0x75, 0x6c, 0x3a, 0x66, 0x65, 0x61,\n0x72, 0x66, 0x75, 0x6c, 0xd83d, 0xde30, 0x3a, 0x63, 0x6f, 0x6c, 0x64, 0x5f,\n0x73, 0x77, 0x65, 0x61, 0x74, 0x3a, 0x63, 0x6f, 0x6c, 0x64, 0x73, 0x77,\n0x65, 0x61, 0x74, 0xd83d, 0xde22, 0x3a, 0x63, 0x72, 0x79, 0x3a, 0x63, 0x72,\n0x79, 0xd83d, 0xde25, 0x3a, 0x64, 0x69, 0x73, 0x61, 0x70, 0x70, 0x6f, 0x69,\n0x6e, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x6c, 0x69, 0x65, 0x76, 0x65,\n0x64, 0x3a, 0x64, 0x69, 0x73, 0x61, 0x70, 0x70, 0x6f, 0x69, 0x6e, 0x74,\n0x65, 0x64, 0x72, 0x65, 0x6c, 0x69, 0x65, 0x76, 0x65, 0x64, 0xd83e, 0xdd24,\n0x3a, 0x64, 0x72, 0x6f, 0x6f, 0x6c, 0x3a, 0x64, 0x72, 0x6f, 0x6f, 0x6c,\n0xd83e, 0xdd24, 0x3a, 0x64, 0x72, 0x6f, 0x6f, 0x6c, 0x69, 0x6e, 0x67, 0x5f,\n0x66, 0x61, 0x63, 0x65, 0x3a, 0x64, 0x72, 0x6f, 0x6f, 0x6c, 0x69, 0x6e,\n0x67, 0x66, 0x61, 0x63, 0x65, 0xd83d, 0xde2d, 0x3a, 0x73, 0x6f, 0x62, 0x3a,\n0x73, 0x6f, 0x62, 0xd83d, 0xde13, 0x3a, 0x73, 0x77, 0x65, 0x61, 0x74, 0x3a,\n0x73, 0x77, 0x65, 0x61, 0x74, 0xd83d, 0xde2a, 0x3a, 0x73, 0x6c, 0x65, 0x65,\n0x70, 0x79, 0x3a, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x79, 0xd83d, 0xde34, 0x3a,\n0x73, 0x6c, 0x65, 0x65, 0x70, 0x69, 0x6e, 0x67, 0x3a, 0x73, 0x6c, 0x65,\n0x65, 0x70, 0x69, 0x6e, 0x67, 0xd83d, 0xde44, 0x3a, 0x66, 0x61, 0x63, 0x65,\n0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e,\n0x67, 0x5f, 0x65, 0x79, 0x65, 0x73, 0x3a, 0x65, 0x79, 0x65, 0x73, 0x66,\n0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x77, 0x69,\n0x74, 0x68, 0xd83d, 0xde44, 0x3a, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67,\n0x5f, 0x65, 0x79, 0x65, 0x73, 0x3a, 0x65, 0x79, 0x65, 0x73, 0x72, 0x6f,\n0x6c, 0x6c, 0x69, 0x6e, 0x67, 0xd83e, 0xdd14, 0x3a, 0x68, 0x6d, 0x6d, 0x3a,\n0x68, 0x6d, 0x6d, 0xd83e, 0xdd14, 0x3a, 0x74, 0x68, 0x69, 0x6e, 0x6b, 0x69,\n0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63, 0x65,\n0x74, 0x68, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0xd83e, 0xdd14, 0x3a, 0x74,\n0x68, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x74, 0x68, 0x69, 0x6e,\n0x6b, 0x69, 0x6e, 0x67, 0xd83e, 0xdd25, 0x3a, 0x6c, 0x69, 0x61, 0x72, 0x3a,\n0x6c, 0x69, 0x61, 0x72, 0xd83e, 0xdd25, 0x3a, 0x6c, 0x79, 0x69, 0x6e, 0x67,\n0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x6c, 0x79,\n0x69, 0x6e, 0x67, 0xd83d, 0xde2c, 0x3a, 0x67, 0x72, 0x69, 0x6d, 0x61, 0x63,\n0x69, 0x6e, 0x67, 0x3a, 0x67, 0x72, 0x69, 0x6d, 0x61, 0x63, 0x69, 0x6e,\n0x67, 0xd83e, 0xdd10, 0x3a, 0x7a, 0x69, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x6d,\n0x6f, 0x75, 0x74, 0x68, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61,\n0x63, 0x65, 0x6d, 0x6f, 0x75, 0x74, 0x68, 0x7a, 0x69, 0x70, 0x70, 0x65,\n0x72, 0xd83e, 0xdd10, 0x3a, 0x7a, 0x69, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x6d,\n0x6f, 0x75, 0x74, 0x68, 0x3a, 0x6d, 0x6f, 0x75, 0x74, 0x68, 0x7a, 0x69,\n0x70, 0x70, 0x65, 0x72, 0xd83e, 0xdd22, 0x3a, 0x73, 0x69, 0x63, 0x6b, 0x3a,\n0x73, 0x69, 0x63, 0x6b, 0xd83e, 0xdd22, 0x3a, 0x6e, 0x61, 0x75, 0x73, 0x65,\n0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61,\n0x63, 0x65, 0x6e, 0x61, 0x75, 0x73, 0x65, 0x61, 0x74, 0x65, 0x64, 0xd83e,\n0xdd27, 0x3a, 0x73, 0x6e, 0x65, 0x65, 0x7a, 0x65, 0x3a, 0x73, 0x6e, 0x65,\n0x65, 0x7a, 0x65, 0xd83e, 0xdd27, 0x3a, 0x73, 0x6e, 0x65, 0x65, 0x7a, 0x69,\n0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63, 0x65,\n0x73, 0x6e, 0x65, 0x65, 0x7a, 0x69, 0x6e, 0x67, 0xd83d, 0xde37, 0x3a, 0x6d,\n0x61, 0x73, 0x6b, 0x3a, 0x6d, 0x61, 0x73, 0x6b, 0xd83e, 0xdd12, 0x3a, 0x66,\n0x61, 0x63, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x74, 0x68, 0x65,\n0x72, 0x6d, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x3a, 0x66, 0x61, 0x63,\n0x65, 0x74, 0x68, 0x65, 0x72, 0x6d, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72,\n0x77, 0x69, 0x74, 0x68, 0xd83e, 0xdd12, 0x3a, 0x74, 0x68, 0x65, 0x72, 0x6d,\n0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a,\n0x66, 0x61, 0x63, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6d, 0x6f, 0x6d, 0x65,\n0x74, 0x65, 0x72, 0xd83e, 0xdd15, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x77,\n0x69, 0x74, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6e,\n0x64, 0x61, 0x67, 0x65, 0x3a, 0x62, 0x61, 0x6e, 0x64, 0x61, 0x67, 0x65,\n0x66, 0x61, 0x63, 0x65, 0x68, 0x65, 0x61, 0x64, 0x77, 0x69, 0x74, 0x68,\n0xd83e, 0xdd15, 0x3a, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6e, 0x64,\n0x61, 0x67, 0x65, 0x3a, 0x62, 0x61, 0x6e, 0x64, 0x61, 0x67, 0x65, 0x68,\n0x65, 0x61, 0x64, 0xd83d, 0xde08, 0x3a, 0x73, 0x6d, 0x69, 0x6c, 0x69, 0x6e,\n0x67, 0x5f, 0x69, 0x6d, 0x70, 0x3a, 0x69, 0x6d, 0x70, 0x73, 0x6d, 0x69,\n0x6c, 0x69, 0x6e, 0x67, 0xd83d, 0xdc7f, 0x3a, 0x69, 0x6d, 0x70, 0x3a, 0x69,\n0x6d, 0x70, 0xd83d, 0xdc79, 0x3a, 0x6a, 0x61, 0x70, 0x61, 0x6e, 0x65, 0x73,\n0x65, 0x5f, 0x6f, 0x67, 0x72, 0x65, 0x3a, 0x6a, 0x61, 0x70, 0x61, 0x6e,\n0x65, 0x73, 0x65, 0x6f, 0x67, 0x72, 0x65, 0xd83d, 0xdc7a, 0x3a, 0x6a, 0x61,\n0x70, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x5f, 0x67, 0x6f, 0x62, 0x6c, 0x69,\n0x6e, 0x3a, 0x67, 0x6f, 0x62, 0x6c, 0x69, 0x6e, 0x6a, 0x61, 0x70, 0x61,\n0x6e, 0x65, 0x73, 0x65, 0xd83d, 0xdca9, 0x3a, 0x70, 0x6f, 0x6f, 0x3a, 0x70,\n0x6f, 0x6f, 0xd83d, 0xdca9, 0x3a, 0x68, 0x61, 0x6e, 0x6b, 0x65, 0x79, 0x3a,\n0x68, 0x61, 0x6e, 0x6b, 0x65, 0x79, 0xd83d, 0xdca9, 0x3a, 0x73, 0x68, 0x69,\n0x74, 0x3a, 0x73, 0x68, 0x69, 0x74, 0xd83d, 0xdca9, 0x3a, 0x70, 0x6f, 0x6f,\n0x70, 0x3a, 0x70, 0x6f, 0x6f, 0x70, 0xd83d, 0xdc7b, 0x3a, 0x67, 0x68, 0x6f,\n0x73, 0x74, 0x3a, 0x67, 0x68, 0x6f, 0x73, 0x74, 0xd83d, 0xdc80, 0x3a, 0x73,\n0x6b, 0x65, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x3a, 0x73, 0x6b, 0x65, 0x6c,\n0x65, 0x74, 0x6f, 0x6e, 0xd83d, 0xdc80, 0x3a, 0x73, 0x6b, 0x75, 0x6c, 0x6c,\n0x3a, 0x73, 0x6b, 0x75, 0x6c, 0x6c, 0x2620, 0xfe0f, 0x3a, 0x73, 0x6b, 0x75,\n0x6c, 0x6c, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73,\n0x62, 0x6f, 0x6e, 0x65, 0x73, 0x3a, 0x61, 0x6e, 0x64, 0x63, 0x72, 0x6f,\n0x73, 0x73, 0x62, 0x6f, 0x6e, 0x65, 0x73, 0x73, 0x6b, 0x75, 0x6c, 0x6c,\n0x2620, 0xfe0f, 0x3a, 0x73, 0x6b, 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x72, 0x6f,\n0x73, 0x73, 0x62, 0x6f, 0x6e, 0x65, 0x73, 0x3a, 0x63, 0x72, 0x6f, 0x73,\n0x73, 0x62, 0x6f, 0x6e, 0x65, 0x73, 0x73, 0x6b, 0x75, 0x6c, 0x6c, 0xd83d,\n0xdc7d, 0x3a, 0x61, 0x6c, 0x69, 0x65, 0x6e, 0x3a, 0x61, 0x6c, 0x69, 0x65,\n0x6e, 0xd83d, 0xdc7e, 0x3a, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x6e,\n0x76, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x69, 0x6e, 0x76, 0x61, 0x64, 0x65,\n0x72, 0x73, 0x70, 0x61, 0x63, 0x65, 0xd83e, 0xdd16, 0x3a, 0x72, 0x6f, 0x62,\n0x6f, 0x74, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63, 0x65,\n0x72, 0x6f, 0x62, 0x6f, 0x74, 0xd83e, 0xdd16, 0x3a, 0x72, 0x6f, 0x62, 0x6f,\n0x74, 0x3a, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0xd83c, 0xdf83, 0x3a, 0x6a, 0x61,\n0x63, 0x6b, 0x5f, 0x6f, 0x5f, 0x6c, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x6e,\n0x3a, 0x6a, 0x61, 0x63, 0x6b, 0x6c, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x6e,\n0x6f, 0xd83d, 0xde3a, 0x3a, 0x73, 0x6d, 0x69, 0x6c, 0x65, 0x79, 0x5f, 0x63,\n0x61, 0x74, 0x3a, 0x63, 0x61, 0x74, 0x73, 0x6d, 0x69, 0x6c, 0x65, 0x79,\n0xd83d, 0xde38, 0x3a, 0x73, 0x6d, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x61, 0x74,\n0x3a, 0x63, 0x61, 0x74, 0x73, 0x6d, 0x69, 0x6c, 0x65, 0xd83d, 0xde39, 0x3a,\n0x6a, 0x6f, 0x79, 0x5f, 0x63, 0x61, 0x74, 0x3a, 0x63, 0x61, 0x74, 0x6a,\n0x6f, 0x79, 0xd83d, 0xde3b, 0x3a, 0x68, 0x65, 0x61, 0x72, 0x74, 0x5f, 0x65,\n0x79, 0x65, 0x73, 0x5f, 0x63, 0x61, 0x74, 0x3a, 0x63, 0x61, 0x74, 0x65,\n0x79, 0x65, 0x73, 0x68, 0x65, 0x61, 0x72, 0x74, 0xd83d, 0xde3c, 0x3a, 0x73,\n0x6d, 0x69, 0x72, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x3a, 0x63, 0x61, 0x74,\n0x73, 0x6d, 0x69, 0x72, 0x6b, 0xd83d, 0xde3d, 0x3a, 0x6b, 0x69, 0x73, 0x73,\n0x69, 0x6e, 0x67, 0x5f, 0x63, 0x61, 0x74, 0x3a, 0x63, 0x61, 0x74, 0x6b,\n0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0xd83d, 0xde40, 0x3a, 0x73, 0x63, 0x72,\n0x65, 0x61, 0x6d, 0x5f, 0x63, 0x61, 0x74, 0x3a, 0x63, 0x61, 0x74, 0x73,\n0x63, 0x72, 0x65, 0x61, 0x6d, 0xd83d, 0xde3f, 0x3a, 0x63, 0x72, 0x79, 0x69,\n0x6e, 0x67, 0x5f, 0x63, 0x61, 0x74, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a,\n0x63, 0x61, 0x74, 0x63, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x63,\n0x65, 0xd83d, 0xde3e, 0x3a, 0x70, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f,\n0x63, 0x61, 0x74, 0x3a, 0x63, 0x61, 0x74, 0x70, 0x6f, 0x75, 0x74, 0x69,\n0x6e, 0x67, 0xd83d, 0xdc50, 0x3a, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x68, 0x61,\n0x6e, 0x64, 0x73, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x6f, 0x70, 0x65,\n0x6e, 0xd83d, 0xde4c, 0x3a, 0x72, 0x61, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x68,\n0x61, 0x6e, 0x64, 0x73, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x72, 0x61,\n0x69, 0x73, 0x65, 0x64, 0xd83d, 0xdc4f, 0x3a, 0x63, 0x6c, 0x61, 0x70, 0x3a,\n0x63, 0x6c, 0x61, 0x70, 0xd83d, 0xde4f, 0x3a, 0x70, 0x72, 0x61, 0x79, 0x3a,\n0x70, 0x72, 0x61, 0x79, 0xd83e, 0xdd1d, 0x3a, 0x73, 0x68, 0x61, 0x6b, 0x69,\n0x6e, 0x67, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x3a, 0x68, 0x61, 0x6e,\n0x64, 0x73, 0x73, 0x68, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0xd83e, 0xdd1d, 0x3a,\n0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x3a, 0x68, 0x61,\n0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0xd83d, 0xdc4d, 0x3a, 0x6c, 0x69,\n0x6b, 0x65, 0x3a, 0x6c, 0x69, 0x6b, 0x65, 0xd83d, 0xdc4d, 0x3a, 0x74, 0x68,\n0x75, 0x6d, 0x62, 0x75, 0x70, 0x3a, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x75,\n0x70, 0xd83d, 0xdc4d, 0x3a, 0x2b, 0x31, 0x3a, 0x2b, 0x31, 0xd83d, 0xdc4d, 0x3a,\n0x74, 0x68, 0x75, 0x6d, 0x62, 0x73, 0x75, 0x70, 0x3a, 0x74, 0x68, 0x75,\n0x6d, 0x62, 0x73, 0x75, 0x70, 0xd83d, 0xdc4e, 0x3a, 0x64, 0x69, 0x73, 0x6c,\n0x69, 0x6b, 0x65, 0x3a, 0x64, 0x69, 0x73, 0x6c, 0x69, 0x6b, 0x65, 0xd83d,\n0xdc4e, 0x3a, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x64, 0x6f, 0x77, 0x6e, 0x3a,\n0x74, 0x68, 0x75, 0x6d, 0x62, 0x64, 0x6f, 0x77, 0x6e, 0xd83d, 0xdc4e, 0x3a,\n0x2d, 0x31, 0x3a, 0x2d, 0x31, 0xd83d, 0xdc4e, 0x3a, 0x74, 0x68, 0x75, 0x6d,\n0x62, 0x73, 0x64, 0x6f, 0x77, 0x6e, 0x3a, 0x74, 0x68, 0x75, 0x6d, 0x62,\n0x73, 0x64, 0x6f, 0x77, 0x6e, 0xd83d, 0xdc4a, 0x3a, 0x70, 0x75, 0x6e, 0x63,\n0x68, 0x3a, 0x70, 0x75, 0x6e, 0x63, 0x68, 0x270a, 0xfe0f, 0x3a, 0x66, 0x69,\n0x73, 0x74, 0x3a, 0x66, 0x69, 0x73, 0x74, 0xd83e, 0xdd1b, 0x3a, 0x6c, 0x65,\n0x66, 0x74, 0x5f, 0x66, 0x69, 0x73, 0x74, 0x3a, 0x66, 0x69, 0x73, 0x74,\n0x6c, 0x65, 0x66, 0x74, 0xd83e, 0xdd1b, 0x3a, 0x6c, 0x65, 0x66, 0x74, 0x5f,\n0x66, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x73, 0x74, 0x3a,\n0x66, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x66, 0x69, 0x73, 0x74, 0x6c, 0x65,\n0x66, 0x74, 0xd83e, 0xdd1c, 0x3a, 0x72, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66,\n0x69, 0x73, 0x74, 0x3a, 0x66, 0x69, 0x73, 0x74, 0x72, 0x69, 0x67, 0x68,\n0x74, 0xd83e, 0xdd1c, 0x3a, 0x72, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, 0x61,\n0x63, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x73, 0x74, 0x3a, 0x66, 0x61,\n0x63, 0x69, 0x6e, 0x67, 0x66, 0x69, 0x73, 0x74, 0x72, 0x69, 0x67, 0x68,\n0x74, 0xd83e, 0xdd1e, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x5f, 0x77, 0x69, 0x74,\n0x68, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x61, 0x6e, 0x64, 0x5f,\n0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65,\n0x72, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x65, 0x64, 0x3a, 0x61, 0x6e,\n0x64, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x65, 0x64, 0x66, 0x69, 0x6e, 0x67,\n0x65, 0x72, 0x68, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x6d,\n0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x69, 0x74, 0x68, 0xd83e, 0xdd1e, 0x3a,\n0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x5f, 0x63, 0x72, 0x6f, 0x73,\n0x73, 0x65, 0x64, 0x3a, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x65, 0x64, 0x66,\n0x69, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x270c, 0xfe0f, 0x3a, 0x76, 0x3a, 0x76,\n0xd83e, 0xdd18, 0x3a, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x6f, 0x66, 0x5f, 0x74,\n0x68, 0x65, 0x5f, 0x68, 0x6f, 0x72, 0x6e, 0x73, 0x3a, 0x68, 0x6f, 0x72,\n0x6e, 0x73, 0x6f, 0x66, 0x73, 0x69, 0x67, 0x6e, 0x74, 0x68, 0x65, 0xd83e,\n0xdd18, 0x3a, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3a, 0x6d, 0x65, 0x74, 0x61,\n0x6c, 0xd83d, 0xdc4c, 0x3a, 0x6f, 0x6b, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x3a,\n0x68, 0x61, 0x6e, 0x64, 0x6f, 0x6b, 0xd83d, 0xdc48, 0x3a, 0x70, 0x6f, 0x69,\n0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x6c, 0x65, 0x66, 0x74,\n0x70, 0x6f, 0x69, 0x6e, 0x74, 0xd83d, 0xdc49, 0x3a, 0x70, 0x6f, 0x69, 0x6e,\n0x74, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x70, 0x6f, 0x69, 0x6e,\n0x74, 0x72, 0x69, 0x67, 0x68, 0x74, 0xd83d, 0xdc46, 0x3a, 0x70, 0x6f, 0x69,\n0x6e, 0x74, 0x5f, 0x75, 0x70, 0x5f, 0x32, 0x3a, 0x32, 0x70, 0x6f, 0x69,\n0x6e, 0x74, 0x75, 0x70, 0xd83d, 0xdc47, 0x3a, 0x70, 0x6f, 0x69, 0x6e, 0x74,\n0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x3a, 0x64, 0x6f, 0x77, 0x6e, 0x70, 0x6f,\n0x69, 0x6e, 0x74, 0x261d, 0xfe0f, 0x3a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f,\n0x75, 0x70, 0x3a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x75, 0x70, 0x270b, 0xfe0f,\n0x3a, 0x72, 0x61, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64,\n0x3a, 0x68, 0x61, 0x6e, 0x64, 0x72, 0x61, 0x69, 0x73, 0x65, 0x64, 0xd83e,\n0xdd1a, 0x3a, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x61,\n0x6e, 0x64, 0x3a, 0x62, 0x61, 0x63, 0x6b, 0x68, 0x61, 0x6e, 0x64, 0x6f,\n0x66, 0xd83e, 0xdd1a, 0x3a, 0x72, 0x61, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x62,\n0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x3a,\n0x62, 0x61, 0x63, 0x6b, 0x68, 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x72, 0x61,\n0x69, 0x73, 0x65, 0x64, 0xd83d, 0xdd90, 0x3a, 0x72, 0x61, 0x69, 0x73, 0x65,\n0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f,\n0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x70, 0x6c, 0x61,\n0x79, 0x65, 0x64, 0x3a, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x68,\n0x61, 0x6e, 0x64, 0x72, 0x61, 0x69, 0x73, 0x65, 0x64, 0x73, 0x70, 0x6c,\n0x61, 0x79, 0x65, 0x64, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdd90, 0x3a, 0x68,\n0x61, 0x6e, 0x64, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x3a,\n0x68, 0x61, 0x6e, 0x64, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, 0xd83d,\n0xdd96, 0x3a, 0x72, 0x61, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x61, 0x6e,\n0x64, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f,\n0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x5f, 0x6d, 0x69, 0x64, 0x64,\n0x6c, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f,\n0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x3a, 0x61, 0x6e, 0x64, 0x62,\n0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72,\n0x73, 0x68, 0x61, 0x6e, 0x64, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x70,\n0x61, 0x72, 0x74, 0x72, 0x61, 0x69, 0x73, 0x65, 0x64, 0x72, 0x69, 0x6e,\n0x67, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdd96, 0x3a, 0x76, 0x75, 0x6c, 0x63,\n0x61, 0x6e, 0x3a, 0x76, 0x75, 0x6c, 0x63, 0x61, 0x6e, 0xd83d, 0xdc4b, 0x3a,\n0x77, 0x61, 0x76, 0x65, 0x3a, 0x77, 0x61, 0x76, 0x65, 0xd83e, 0xdd19, 0x3a,\n0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x6d, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64,\n0x3a, 0x63, 0x61, 0x6c, 0x6c, 0x68, 0x61, 0x6e, 0x64, 0x6d, 0x65, 0xd83e,\n0xdd19, 0x3a, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x6d, 0x65, 0x3a, 0x63, 0x61,\n0x6c, 0x6c, 0x6d, 0x65, 0xd83d, 0xdcaa, 0x3a, 0x6d, 0x75, 0x73, 0x63, 0x6c,\n0x65, 0x3a, 0x6d, 0x75, 0x73, 0x63, 0x6c, 0x65, 0xd83d, 0xdd95, 0x3a, 0x72,\n0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64,\n0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65,\n0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65,\n0x6e, 0x64, 0x65, 0x64, 0x3a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65,\n0x64, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x68, 0x61, 0x6e, 0x64, 0x6d,\n0x69, 0x64, 0x64, 0x6c, 0x65, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65,\n0x64, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdd95, 0x3a, 0x6d, 0x69, 0x64, 0x64,\n0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x3a, 0x66, 0x69,\n0x6e, 0x67, 0x65, 0x72, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x270d, 0xfe0f,\n0x3a, 0x77, 0x72, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x6e,\n0x64, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x77, 0x72, 0x69, 0x74, 0x69, 0x6e,\n0x67, 0xd83e, 0xdd33, 0x3a, 0x73, 0x65, 0x6c, 0x66, 0x69, 0x65, 0x3a, 0x73,\n0x65, 0x6c, 0x66, 0x69, 0x65, 0xd83d, 0xdc85, 0x3a, 0x6e, 0x61, 0x69, 0x6c,\n0x5f, 0x63, 0x61, 0x72, 0x65, 0x3a, 0x63, 0x61, 0x72, 0x65, 0x6e, 0x61,\n0x69, 0x6c, 0xd83d, 0xdc8d, 0x3a, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x72, 0x69,\n0x6e, 0x67, 0xd83d, 0xdc84, 0x3a, 0x6c, 0x69, 0x70, 0x73, 0x74, 0x69, 0x63,\n0x6b, 0x3a, 0x6c, 0x69, 0x70, 0x73, 0x74, 0x69, 0x63, 0x6b, 0xd83d, 0xdc8b,\n0x3a, 0x6b, 0x69, 0x73, 0x73, 0x3a, 0x6b, 0x69, 0x73, 0x73, 0xd83d, 0xdc44,\n0x3a, 0x6c, 0x69, 0x70, 0x73, 0x3a, 0x6c, 0x69, 0x70, 0x73, 0xd83d, 0xdc45,\n0x3a, 0x74, 0x6f, 0x6e, 0x67, 0x75, 0x65, 0x3a, 0x74, 0x6f, 0x6e, 0x67,\n0x75, 0x65, 0xd83d, 0xdc42, 0x3a, 0x65, 0x61, 0x72, 0x3a, 0x65, 0x61, 0x72,\n0xd83d, 0xdc43, 0x3a, 0x6e, 0x6f, 0x73, 0x65, 0x3a, 0x6e, 0x6f, 0x73, 0x65,\n0xd83d, 0xdc63, 0x3a, 0x66, 0x6f, 0x6f, 0x74, 0x70, 0x72, 0x69, 0x6e, 0x74,\n0x73, 0x3a, 0x66, 0x6f, 0x6f, 0x74, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73,\n0xd83d, 0xdc41, 0x3a, 0x65, 0x79, 0x65, 0x3a, 0x65, 0x79, 0x65, 0xd83d, 0xdc40,\n0x3a, 0x65, 0x79, 0x65, 0x73, 0x3a, 0x65, 0x79, 0x65, 0x73, 0xd83d, 0xdde3,\n0x3a, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65,\n0x61, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x69, 0x6c, 0x68, 0x6f, 0x75,\n0x65, 0x74, 0x74, 0x65, 0x3a, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x73,\n0x69, 0x6c, 0x68, 0x6f, 0x75, 0x65, 0x74, 0x74, 0x65, 0x73, 0x70, 0x65,\n0x61, 0x6b, 0x69, 0x6e, 0x67, 0xd83d, 0xdde3, 0x3a, 0x73, 0x70, 0x65, 0x61,\n0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x3a, 0x68, 0x65,\n0x61, 0x64, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0xd83d, 0xdc64,\n0x3a, 0x62, 0x75, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x69, 0x6c,\n0x68, 0x6f, 0x75, 0x65, 0x74, 0x74, 0x65, 0x3a, 0x62, 0x75, 0x73, 0x74,\n0x69, 0x6e, 0x73, 0x69, 0x6c, 0x68, 0x6f, 0x75, 0x65, 0x74, 0x74, 0x65,\n0xd83d, 0xdc65, 0x3a, 0x62, 0x75, 0x73, 0x74, 0x73, 0x5f, 0x69, 0x6e, 0x5f,\n0x73, 0x69, 0x6c, 0x68, 0x6f, 0x75, 0x65, 0x74, 0x74, 0x65, 0x3a, 0x62,\n0x75, 0x73, 0x74, 0x73, 0x69, 0x6e, 0x73, 0x69, 0x6c, 0x68, 0x6f, 0x75,\n0x65, 0x74, 0x74, 0x65, 0xd83d, 0xdc76, 0x3a, 0x62, 0x61, 0x62, 0x79, 0x3a,\n0x62, 0x61, 0x62, 0x79, 0xd83d, 0xdc66, 0x3a, 0x62, 0x6f, 0x79, 0x3a, 0x62,\n0x6f, 0x79, 0xd83d, 0xdc67, 0x3a, 0x67, 0x69, 0x72, 0x6c, 0x3a, 0x67, 0x69,\n0x72, 0x6c, 0xd83d, 0xdc68, 0x3a, 0x6d, 0x61, 0x6e, 0x3a, 0x6d, 0x61, 0x6e,\n0xd83d, 0xdc69, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x3a, 0x77, 0x6f, 0x6d,\n0x61, 0x6e, 0xd83d, 0xdc71, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x62, 0x6c, 0x6f, 0x6e,\n0x64, 0x2d, 0x68, 0x61, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x77, 0x6f, 0x6d,\n0x61, 0x6e, 0x3a, 0x62, 0x6c, 0x6f, 0x6e, 0x64, 0x68, 0x61, 0x69, 0x72,\n0x65, 0x64, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc71, 0x3a, 0x62, 0x6c,\n0x6f, 0x6e, 0x64, 0x2d, 0x68, 0x61, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6d,\n0x61, 0x6e, 0x3a, 0x62, 0x6c, 0x6f, 0x6e, 0x64, 0x68, 0x61, 0x69, 0x72,\n0x65, 0x64, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc71, 0x3a, 0x70, 0x65, 0x72, 0x73,\n0x6f, 0x6e, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x6e,\n0x64, 0x5f, 0x68, 0x61, 0x69, 0x72, 0x3a, 0x62, 0x6c, 0x6f, 0x6e, 0x64,\n0x68, 0x61, 0x69, 0x72, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x77, 0x69,\n0x74, 0x68, 0xd83d, 0xdc71, 0x3a, 0x62, 0x6c, 0x6f, 0x6e, 0x64, 0x5f, 0x68,\n0x61, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,\n0x3a, 0x62, 0x6c, 0x6f, 0x6e, 0x64, 0x68, 0x61, 0x69, 0x72, 0x65, 0x64,\n0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd83d, 0xdc74, 0x3a, 0x6f, 0x6c, 0x64,\n0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x3a, 0x6d, 0x61, 0x6e, 0x6f, 0x6c,\n0x64, 0x65, 0x72, 0xd83d, 0xdc75, 0x3a, 0x67, 0x72, 0x61, 0x6e, 0x64, 0x6d,\n0x61, 0x3a, 0x67, 0x72, 0x61, 0x6e, 0x64, 0x6d, 0x61, 0xd83d, 0xdc75, 0x3a,\n0x6f, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x3a,\n0x6f, 0x6c, 0x64, 0x65, 0x72, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc72,\n0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x67, 0x75,\n0x61, 0x5f, 0x70, 0x69, 0x5f, 0x6d, 0x61, 0x6f, 0x3a, 0x67, 0x75, 0x61,\n0x6d, 0x61, 0x6e, 0x6d, 0x61, 0x6f, 0x70, 0x69, 0x77, 0x69, 0x74, 0x68,\n0xd83d, 0xdc72, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f,\n0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x65, 0x5f, 0x63, 0x61, 0x70, 0x3a,\n0x63, 0x61, 0x70, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x65, 0x6d, 0x61,\n0x6e, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdc73, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x77, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67,\n0x5f, 0x74, 0x75, 0x72, 0x62, 0x61, 0x6e, 0x3a, 0x74, 0x75, 0x72, 0x62,\n0x61, 0x6e, 0x77, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d,\n0x61, 0x6e, 0xd83d, 0xdc73, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x77, 0x65, 0x61,\n0x72, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x75, 0x72, 0x62, 0x61, 0x6e, 0x3a,\n0x6d, 0x61, 0x6e, 0x74, 0x75, 0x72, 0x62, 0x61, 0x6e, 0x77, 0x65, 0x61,\n0x72, 0x69, 0x6e, 0x67, 0xd83d, 0xdc73, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x77,\n0x69, 0x74, 0x68, 0x5f, 0x74, 0x75, 0x72, 0x62, 0x61, 0x6e, 0x3a, 0x6d,\n0x61, 0x6e, 0x74, 0x75, 0x72, 0x62, 0x61, 0x6e, 0x77, 0x69, 0x74, 0x68,\n0xd83d, 0xdc73, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x77, 0x65,\n0x61, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x75, 0x72, 0x62, 0x61, 0x6e,\n0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x74, 0x75, 0x72, 0x62, 0x61,\n0x6e, 0x77, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0xd83d, 0xdc6e, 0x200d, 0x2640,\n0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69,\n0x63, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x72, 0x3a, 0x6f,\n0x66, 0x66, 0x69, 0x63, 0x65, 0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x65,\n0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc6e, 0x3a, 0x6d, 0x61, 0x6e, 0x5f,\n0x70, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x69, 0x63,\n0x65, 0x72, 0x3a, 0x6d, 0x61, 0x6e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,\n0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0xd83d, 0xdc6e, 0x3a, 0x63, 0x6f,\n0x70, 0x3a, 0x63, 0x6f, 0x70, 0xd83d, 0xdc6e, 0x3a, 0x70, 0x6f, 0x6c, 0x69,\n0x63, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x72, 0x3a, 0x6f,\n0x66, 0x66, 0x69, 0x63, 0x65, 0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x65,\n0xd83d, 0xdc77, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f,\n0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e,\n0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x3a, 0x63, 0x6f, 0x6e, 0x73,\n0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0xd83d, 0xdc77, 0x3a, 0x6d, 0x61,\n0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69,\n0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x3a, 0x63, 0x6f,\n0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61,\n0x6e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0xd83d, 0xdc77, 0x3a, 0x63, 0x6f,\n0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77,\n0x6f, 0x72, 0x6b, 0x65, 0x72, 0x3a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72,\n0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72,\n0xd83d, 0xdc82, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f,\n0x67, 0x75, 0x61, 0x72, 0x64, 0x3a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc82, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x67,\n0x75, 0x61, 0x72, 0x64, 0x3a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x6d, 0x61,\n0x6e, 0xd83d, 0xdc82, 0x3a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x73, 0x6d, 0x61,\n0x6e, 0x3a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x73, 0x6d, 0x61, 0x6e, 0xd83d,\n0xdc82, 0x3a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x3a, 0x67, 0x75, 0x61, 0x72,\n0x64, 0xd83d, 0xdd75, 0xfe0f, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x3a,\n0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x77, 0x6f, 0x6d,\n0x61, 0x6e, 0xd83d, 0xdd75, 0xfe0f, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x64, 0x65,\n0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x3a, 0x64, 0x65, 0x74, 0x65,\n0x63, 0x74, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x6e, 0xd83d, 0xdd75, 0xfe0f, 0x3a,\n0x73, 0x6c, 0x65, 0x75, 0x74, 0x68, 0x5f, 0x6f, 0x72, 0x5f, 0x73, 0x70,\n0x79, 0x3a, 0x6f, 0x72, 0x73, 0x6c, 0x65, 0x75, 0x74, 0x68, 0x73, 0x70,\n0x79, 0xd83d, 0xdd75, 0xfe0f, 0x3a, 0x73, 0x70, 0x79, 0x3a, 0x73, 0x70, 0x79,\n0xd83d, 0xdd75, 0xfe0f, 0x3a, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76,\n0x65, 0x3a, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0xd83d,\n0xdc69, 0x200d, 0x2695, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x68,\n0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72,\n0x3a, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x77, 0x6f, 0x6d, 0x61, 0x6e,\n0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0xd83d, 0xdc68, 0x200d, 0x2695, 0xfe0f, 0x3a,\n0x6d, 0x61, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x77,\n0x6f, 0x72, 0x6b, 0x65, 0x72, 0x3a, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68,\n0x6d, 0x61, 0x6e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0xd83d, 0xdc69, 0x200d,\n0xd83c, 0xdf3e, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x66, 0x61, 0x72,\n0x6d, 0x65, 0x72, 0x3a, 0x66, 0x61, 0x72, 0x6d, 0x65, 0x72, 0x77, 0x6f,\n0x6d, 0x61, 0x6e, 0xd83d, 0xdc68, 0x200d, 0xd83c, 0xdf3e, 0x3a, 0x6d, 0x61, 0x6e,\n0x5f, 0x66, 0x61, 0x72, 0x6d, 0x65, 0x72, 0x3a, 0x66, 0x61, 0x72, 0x6d,\n0x65, 0x72, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc69, 0x200d, 0xd83c, 0xdf73, 0x3a, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x63, 0x6f, 0x6f, 0x6b, 0x3a, 0x63, 0x6f,\n0x6f, 0x6b, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc68, 0x200d, 0xd83c, 0xdf73,\n0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x63, 0x6f, 0x6f, 0x6b, 0x3a, 0x63, 0x6f,\n0x6f, 0x6b, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc69, 0x200d, 0xd83c, 0xdf93, 0x3a, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74,\n0x3a, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0xd83d, 0xdc68, 0x200d, 0xd83c, 0xdf93, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x73,\n0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x3a, 0x6d, 0x61, 0x6e, 0x73, 0x74,\n0x75, 0x64, 0x65, 0x6e, 0x74, 0xd83d, 0xdc69, 0x200d, 0xd83c, 0xdfa4, 0x3a, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x3a,\n0x73, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d,\n0xdc68, 0x200d, 0xd83c, 0xdfa4, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x73, 0x69, 0x6e,\n0x67, 0x65, 0x72, 0x3a, 0x6d, 0x61, 0x6e, 0x73, 0x69, 0x6e, 0x67, 0x65,\n0x72, 0xd83d, 0xdc69, 0x200d, 0xd83c, 0xdfeb, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e,\n0x5f, 0x74, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x3a, 0x74, 0x65, 0x61,\n0x63, 0x68, 0x65, 0x72, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc68, 0x200d,\n0xd83c, 0xdfeb, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x74, 0x65, 0x61, 0x63, 0x68,\n0x65, 0x72, 0x3a, 0x6d, 0x61, 0x6e, 0x74, 0x65, 0x61, 0x63, 0x68, 0x65,\n0x72, 0xd83d, 0xdc69, 0x200d, 0xd83c, 0xdfed, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e,\n0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x77, 0x6f, 0x72,\n0x6b, 0x65, 0x72, 0x3a, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0xd83d, 0xdc68,\n0x200d, 0xd83c, 0xdfed, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74,\n0x6f, 0x72, 0x79, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x3a, 0x66,\n0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x6d, 0x61, 0x6e, 0x77, 0x6f, 0x72,\n0x6b, 0x65, 0x72, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdcbb, 0x3a, 0x77, 0x6f, 0x6d,\n0x61, 0x6e, 0x5f, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67,\n0x69, 0x73, 0x74, 0x3a, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f,\n0x67, 0x69, 0x73, 0x74, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc68, 0x200d,\n0xd83d, 0xdcbb, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x74, 0x65, 0x63, 0x68, 0x6e,\n0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x73, 0x74, 0x3a, 0x6d, 0x61, 0x6e, 0x74,\n0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x73, 0x74, 0xd83d,\n0xdc69, 0x200d, 0xd83d, 0xdcbc, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x6f,\n0x66, 0x66, 0x69, 0x63, 0x65, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72,\n0x3a, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x77, 0x6f, 0x6d, 0x61, 0x6e,\n0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdcbc, 0x3a,\n0x6d, 0x61, 0x6e, 0x5f, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x5f, 0x77,\n0x6f, 0x72, 0x6b, 0x65, 0x72, 0x3a, 0x6d, 0x61, 0x6e, 0x6f, 0x66, 0x66,\n0x69, 0x63, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0xd83d, 0xdc69, 0x200d,\n0xd83d, 0xdd27, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x6d, 0x65, 0x63,\n0x68, 0x61, 0x6e, 0x69, 0x63, 0x3a, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e,\n0x69, 0x63, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdd27,\n0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69,\n0x63, 0x3a, 0x6d, 0x61, 0x6e, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69,\n0x63, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdd2c, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e,\n0x5f, 0x73, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x69, 0x73, 0x74, 0x3a, 0x73,\n0x63, 0x69, 0x65, 0x6e, 0x74, 0x69, 0x73, 0x74, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdd2c, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x73,\n0x63, 0x69, 0x65, 0x6e, 0x74, 0x69, 0x73, 0x74, 0x3a, 0x6d, 0x61, 0x6e,\n0x73, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x69, 0x73, 0x74, 0xd83d, 0xdc69, 0x200d,\n0xd83c, 0xdfa8, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x61, 0x72, 0x74,\n0x69, 0x73, 0x74, 0x3a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x77, 0x6f,\n0x6d, 0x61, 0x6e, 0xd83d, 0xdc68, 0x200d, 0xd83c, 0xdfa8, 0x3a, 0x6d, 0x61, 0x6e,\n0x5f, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x3a, 0x61, 0x72, 0x74, 0x69,\n0x73, 0x74, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xde92, 0x3a, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x66, 0x69, 0x72, 0x65, 0x66, 0x69, 0x67,\n0x68, 0x74, 0x65, 0x72, 0x3a, 0x66, 0x69, 0x72, 0x65, 0x66, 0x69, 0x67,\n0x68, 0x74, 0x65, 0x72, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc68, 0x200d,\n0xd83d, 0xde92, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x66, 0x69, 0x72, 0x65, 0x66,\n0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x3a, 0x66, 0x69, 0x72, 0x65, 0x66,\n0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc69, 0x200d,\n0x2708, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x70, 0x69, 0x6c,\n0x6f, 0x74, 0x3a, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0xd83d, 0xdc68, 0x200d, 0x2708, 0xfe0f, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x70,\n0x69, 0x6c, 0x6f, 0x74, 0x3a, 0x6d, 0x61, 0x6e, 0x70, 0x69, 0x6c, 0x6f,\n0x74, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xde80, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e,\n0x5f, 0x61, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x61, 0x75, 0x74, 0x3a, 0x61,\n0x73, 0x74, 0x72, 0x6f, 0x6e, 0x61, 0x75, 0x74, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xde80, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x61,\n0x73, 0x74, 0x72, 0x6f, 0x6e, 0x61, 0x75, 0x74, 0x3a, 0x61, 0x73, 0x74,\n0x72, 0x6f, 0x6e, 0x61, 0x75, 0x74, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc69, 0x200d,\n0x2696, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x6a, 0x75, 0x64,\n0x67, 0x65, 0x3a, 0x6a, 0x75, 0x64, 0x67, 0x65, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0xd83d, 0xdc68, 0x200d, 0x2696, 0xfe0f, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x6a,\n0x75, 0x64, 0x67, 0x65, 0x3a, 0x6a, 0x75, 0x64, 0x67, 0x65, 0x6d, 0x61,\n0x6e, 0xd83e, 0xdd36, 0x3a, 0x6d, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x63,\n0x68, 0x72, 0x69, 0x73, 0x74, 0x6d, 0x61, 0x73, 0x3a, 0x63, 0x68, 0x72,\n0x69, 0x73, 0x74, 0x6d, 0x61, 0x73, 0x6d, 0x6f, 0x74, 0x68, 0x65, 0x72,\n0xd83e, 0xdd36, 0x3a, 0x6d, 0x72, 0x73, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73,\n0x3a, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x6d, 0x72, 0x73, 0xd83c, 0xdf85, 0x3a,\n0x73, 0x61, 0x6e, 0x74, 0x61, 0x3a, 0x73, 0x61, 0x6e, 0x74, 0x61, 0xd83d,\n0xdc78, 0x3a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x73, 0x3a, 0x70,\n0x72, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x73, 0xd83e, 0xdd34, 0x3a, 0x70, 0x72,\n0x69, 0x6e, 0x63, 0x65, 0x3a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x65, 0xd83d,\n0xdc70, 0x3a, 0x62, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68,\n0x5f, 0x76, 0x65, 0x69, 0x6c, 0x3a, 0x62, 0x72, 0x69, 0x64, 0x65, 0x76,\n0x65, 0x69, 0x6c, 0x77, 0x69, 0x74, 0x68, 0xd83e, 0xdd35, 0x3a, 0x6d, 0x61,\n0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x74, 0x75, 0x78, 0x65, 0x64, 0x6f, 0x3a,\n0x69, 0x6e, 0x6d, 0x61, 0x6e, 0x74, 0x75, 0x78, 0x65, 0x64, 0x6f, 0xd83d,\n0xdc7c, 0x3a, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x3a, 0x61, 0x6e, 0x67, 0x65,\n0x6c, 0xd83e, 0xdd30, 0x3a, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6e,\n0x67, 0x5f, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x3a, 0x65, 0x78, 0x70, 0x65,\n0x63, 0x74, 0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83e, 0xdd30,\n0x3a, 0x70, 0x72, 0x65, 0x67, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x77, 0x6f,\n0x6d, 0x61, 0x6e, 0x3a, 0x70, 0x72, 0x65, 0x67, 0x6e, 0x61, 0x6e, 0x74,\n0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xde47, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x62, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a,\n0x62, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d,\n0xde47, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x62, 0x6f, 0x77, 0x69, 0x6e, 0x67,\n0x3a, 0x62, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0xd83d, 0xde47,\n0x3a, 0x62, 0x6f, 0x77, 0x3a, 0x62, 0x6f, 0x77, 0xd83d, 0xde47, 0x3a, 0x70,\n0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x62, 0x6f, 0x77, 0x69, 0x6e, 0x67,\n0x3a, 0x62, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x70, 0x65, 0x72, 0x73, 0x6f,\n0x6e, 0xd83d, 0xdc81, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x74, 0x69,\n0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x3a, 0x68,\n0x61, 0x6e, 0x64, 0x74, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x77, 0x6f,\n0x6d, 0x61, 0x6e, 0xd83d, 0xdc81, 0x3a, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d,\n0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x6b, 0x5f, 0x70,\n0x65, 0x72, 0x73, 0x6f, 0x6e, 0x3a, 0x64, 0x65, 0x73, 0x6b, 0x69, 0x6e,\n0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x65, 0x72,\n0x73, 0x6f, 0x6e, 0xd83d, 0xdc81, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,\n0x5f, 0x74, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x6e,\n0x64, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,\n0x74, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xd83d, 0xdc81, 0x200d, 0x2642, 0xfe0f,\n0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x74, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67,\n0x5f, 0x68, 0x61, 0x6e, 0x64, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x6d, 0x61,\n0x6e, 0x74, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xd83d, 0xde45, 0x3a, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x67, 0x65, 0x73, 0x74, 0x75, 0x72, 0x69,\n0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x3a, 0x67, 0x65, 0x73, 0x74, 0x75, 0x72,\n0x69, 0x6e, 0x67, 0x6e, 0x6f, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xde45,\n0x3a, 0x6e, 0x6f, 0x5f, 0x67, 0x6f, 0x6f, 0x64, 0x3a, 0x67, 0x6f, 0x6f,\n0x64, 0x6e, 0x6f, 0xd83d, 0xde45, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,\n0x5f, 0x67, 0x65, 0x73, 0x74, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6e,\n0x6f, 0x3a, 0x67, 0x65, 0x73, 0x74, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x6e,\n0x6f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd83d, 0xde45, 0x200d, 0x2642, 0xfe0f,\n0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x67, 0x65, 0x73, 0x74, 0x75, 0x72, 0x69,\n0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x3a, 0x67, 0x65, 0x73, 0x74, 0x75, 0x72,\n0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x6e, 0x6f, 0xd83d, 0xde46, 0x3a, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x67, 0x65, 0x73, 0x74, 0x75, 0x72, 0x69,\n0x6e, 0x67, 0x5f, 0x6f, 0x6b, 0x3a, 0x67, 0x65, 0x73, 0x74, 0x75, 0x72,\n0x69, 0x6e, 0x67, 0x6f, 0x6b, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xde46,\n0x3a, 0x6f, 0x6b, 0x5f, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x3a, 0x6f, 0x6b,\n0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xde46, 0x3a, 0x70, 0x65, 0x72, 0x73,\n0x6f, 0x6e, 0x5f, 0x67, 0x65, 0x73, 0x74, 0x75, 0x72, 0x69, 0x6e, 0x67,\n0x5f, 0x6f, 0x6b, 0x3a, 0x67, 0x65, 0x73, 0x74, 0x75, 0x72, 0x69, 0x6e,\n0x67, 0x6f, 0x6b, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd83d, 0xde46, 0x200d,\n0x2642, 0xfe0f, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x67, 0x65, 0x73, 0x74, 0x75,\n0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x6b, 0x3a, 0x67, 0x65, 0x73, 0x74,\n0x75, 0x72, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x6f, 0x6b, 0xd83d, 0xde4b,\n0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x72, 0x61, 0x69, 0x73, 0x69,\n0x6e, 0x67, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x3a, 0x68, 0x61, 0x6e, 0x64,\n0x72, 0x61, 0x69, 0x73, 0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e,\n0xd83d, 0xde4b, 0x3a, 0x72, 0x61, 0x69, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x68,\n0x61, 0x6e, 0x64, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x72, 0x61, 0x69, 0x73,\n0x69, 0x6e, 0x67, 0xd83d, 0xde4b, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,\n0x5f, 0x72, 0x61, 0x69, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x6e,\n0x64, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,\n0x72, 0x61, 0x69, 0x73, 0x69, 0x6e, 0x67, 0xd83d, 0xde4b, 0x200d, 0x2642, 0xfe0f,\n0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x72, 0x61, 0x69, 0x73, 0x69, 0x6e, 0x67,\n0x5f, 0x68, 0x61, 0x6e, 0x64, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x6d, 0x61,\n0x6e, 0x72, 0x61, 0x69, 0x73, 0x69, 0x6e, 0x67, 0xd83e, 0xdd26, 0x200d, 0x2640,\n0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x65,\n0x70, 0x61, 0x6c, 0x6d, 0x69, 0x6e, 0x67, 0x3a, 0x66, 0x61, 0x63, 0x65,\n0x70, 0x61, 0x6c, 0x6d, 0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e,\n0xd83e, 0xdd26, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x66, 0x61,\n0x63, 0x65, 0x70, 0x61, 0x6c, 0x6d, 0x69, 0x6e, 0x67, 0x3a, 0x66, 0x61,\n0x63, 0x65, 0x70, 0x61, 0x6c, 0x6d, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e,\n0xd83e, 0xdd26, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x70, 0x61,\n0x6c, 0x6d, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x70, 0x61, 0x6c, 0x6d, 0xd83e,\n0xdd26, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x70, 0x61,\n0x6c, 0x6d, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x70, 0x61, 0x6c, 0x6d, 0xd83e,\n0xdd26, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f,\n0x66, 0x61, 0x63, 0x65, 0x70, 0x61, 0x6c, 0x6d, 0x69, 0x6e, 0x67, 0x3a,\n0x66, 0x61, 0x63, 0x65, 0x70, 0x61, 0x6c, 0x6d, 0x69, 0x6e, 0x67, 0x70,\n0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd83e, 0xdd37, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x73, 0x68, 0x72, 0x75, 0x67, 0x67, 0x69,\n0x6e, 0x67, 0x3a, 0x73, 0x68, 0x72, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67,\n0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83e, 0xdd37, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x73,\n0x68, 0x72, 0x75, 0x67, 0x3a, 0x73, 0x68, 0x72, 0x75, 0x67, 0xd83e, 0xdd37,\n0x200d, 0x2640, 0xfe0f, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x73,\n0x68, 0x72, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x3a, 0x70, 0x65, 0x72,\n0x73, 0x6f, 0x6e, 0x73, 0x68, 0x72, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67,\n0xd83e, 0xdd37, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x73, 0x68,\n0x72, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x3a, 0x6d, 0x61, 0x6e, 0x73,\n0x68, 0x72, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0xd83d, 0xde4e, 0x3a, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67,\n0x3a, 0x70, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0xd83d, 0xde4e, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x77,\n0x69, 0x74, 0x68, 0x5f, 0x70, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f,\n0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x70, 0x65, 0x72,\n0x73, 0x6f, 0x6e, 0x70, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x77, 0x69,\n0x74, 0x68, 0xd83d, 0xde4e, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f,\n0x70, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x70, 0x65, 0x72, 0x73,\n0x6f, 0x6e, 0x70, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0xd83d, 0xde4e, 0x200d,\n0x2642, 0xfe0f, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x75, 0x74, 0x69,\n0x6e, 0x67, 0x3a, 0x6d, 0x61, 0x6e, 0x70, 0x6f, 0x75, 0x74, 0x69, 0x6e,\n0x67, 0xd83d, 0xde4d, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x66, 0x72,\n0x6f, 0x77, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x66, 0x72, 0x6f, 0x77, 0x6e,\n0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xde4d, 0x3a, 0x70,\n0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x72, 0x6f, 0x77, 0x6e, 0x69,\n0x6e, 0x67, 0x3a, 0x66, 0x72, 0x6f, 0x77, 0x6e, 0x69, 0x6e, 0x67, 0x70,\n0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd83d, 0xde4d, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x6d,\n0x61, 0x6e, 0x5f, 0x66, 0x72, 0x6f, 0x77, 0x6e, 0x69, 0x6e, 0x67, 0x3a,\n0x66, 0x72, 0x6f, 0x77, 0x6e, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0xd83d,\n0xdc87, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x67, 0x65, 0x74, 0x74,\n0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x69, 0x72, 0x63, 0x75, 0x74, 0x3a,\n0x67, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x72, 0x63,\n0x75, 0x74, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc87, 0x3a, 0x68, 0x61,\n0x69, 0x72, 0x63, 0x75, 0x74, 0x3a, 0x68, 0x61, 0x69, 0x72, 0x63, 0x75,\n0x74, 0xd83d, 0xdc87, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x67,\n0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x69, 0x72, 0x63,\n0x75, 0x74, 0x3a, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x68, 0x61,\n0x69, 0x72, 0x63, 0x75, 0x74, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd83d,\n0xdc87, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x67, 0x65, 0x74,\n0x74, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x69, 0x72, 0x63, 0x75, 0x74,\n0x3a, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x72,\n0x63, 0x75, 0x74, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc86, 0x3a, 0x77, 0x6f, 0x6d,\n0x61, 0x6e, 0x5f, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x66,\n0x61, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a,\n0x66, 0x61, 0x63, 0x65, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x6d,\n0x61, 0x73, 0x73, 0x61, 0x67, 0x65, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d,\n0xdc86, 0x3a, 0x6d, 0x61, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x6d, 0x61,\n0x73, 0x73, 0x61, 0x67, 0x65, 0xd83d, 0xdc86, 0x3a, 0x70, 0x65, 0x72, 0x73,\n0x6f, 0x6e, 0x5f, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d,\n0x61, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x67, 0x65, 0x74, 0x74, 0x69,\n0x6e, 0x67, 0x6d, 0x61, 0x73, 0x73, 0x61, 0x67, 0x65, 0x70, 0x65, 0x72,\n0x73, 0x6f, 0x6e, 0xd83d, 0xdc86, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x6d, 0x61, 0x6e,\n0x5f, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63,\n0x65, 0x5f, 0x6d, 0x61, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x66, 0x61,\n0x63, 0x65, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e,\n0x6d, 0x61, 0x73, 0x73, 0x61, 0x67, 0x65, 0xd83d, 0xdd74, 0x3a, 0x6d, 0x61,\n0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73,\n0x73, 0x5f, 0x73, 0x75, 0x69, 0x74, 0x5f, 0x6c, 0x65, 0x76, 0x69, 0x74,\n0x61, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65,\n0x73, 0x73, 0x69, 0x6e, 0x6c, 0x65, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69,\n0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x73, 0x75, 0x69, 0x74, 0xd83d, 0xdc83, 0x3a,\n0x64, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x3a, 0x64, 0x61, 0x6e, 0x63, 0x65,\n0x72, 0xd83d, 0xdd7a, 0x3a, 0x6d, 0x61, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x6e,\n0x63, 0x65, 0x72, 0x3a, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x6d, 0x61,\n0x6c, 0x65, 0xd83d, 0xdd7a, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x64, 0x61, 0x6e,\n0x63, 0x69, 0x6e, 0x67, 0x3a, 0x64, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67,\n0x6d, 0x61, 0x6e, 0xd83d, 0xdc6f, 0x3a, 0x77, 0x6f, 0x6d, 0x65, 0x6e, 0x5f,\n0x77, 0x69, 0x74, 0x68, 0x5f, 0x62, 0x75, 0x6e, 0x6e, 0x79, 0x5f, 0x65,\n0x61, 0x72, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x69, 0x6e, 0x67,\n0x3a, 0x62, 0x75, 0x6e, 0x6e, 0x79, 0x65, 0x61, 0x72, 0x73, 0x70, 0x61,\n0x72, 0x74, 0x79, 0x69, 0x6e, 0x67, 0x77, 0x69, 0x74, 0x68, 0x77, 0x6f,\n0x6d, 0x65, 0x6e, 0xd83d, 0xdc6f, 0x3a, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x72,\n0x73, 0x3a, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0xd83d, 0xdc6f, 0x3a,\n0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f,\n0x62, 0x75, 0x6e, 0x6e, 0x79, 0x5f, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x70,\n0x61, 0x72, 0x74, 0x79, 0x69, 0x6e, 0x67, 0x3a, 0x62, 0x75, 0x6e, 0x6e,\n0x79, 0x65, 0x61, 0x72, 0x73, 0x70, 0x61, 0x72, 0x74, 0x79, 0x69, 0x6e,\n0x67, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x77, 0x69, 0x74, 0x68, 0xd83d,\n0xdc6f, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x6d, 0x65, 0x6e, 0x5f, 0x77, 0x69, 0x74,\n0x68, 0x5f, 0x62, 0x75, 0x6e, 0x6e, 0x79, 0x5f, 0x65, 0x61, 0x72, 0x73,\n0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x69, 0x6e, 0x67, 0x3a, 0x62, 0x75,\n0x6e, 0x6e, 0x79, 0x65, 0x61, 0x72, 0x73, 0x6d, 0x65, 0x6e, 0x70, 0x61,\n0x72, 0x74, 0x79, 0x69, 0x6e, 0x67, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdeb6,\n0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x77, 0x61,\n0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e,\n0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdeb6, 0x3a, 0x6d, 0x61, 0x6e,\n0x5f, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x6d, 0x61, 0x6e,\n0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0xd83d, 0xdeb6, 0x3a, 0x77, 0x61,\n0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e,\n0x67, 0xd83d, 0xdeb6, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x77,\n0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f,\n0x6e, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0xd83c, 0xdfc3, 0x200d, 0x2640,\n0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x72, 0x75, 0x6e, 0x6e,\n0x69, 0x6e, 0x67, 0x3a, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0xd83c, 0xdfc3, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x72,\n0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x6d, 0x61, 0x6e, 0x72, 0x75,\n0x6e, 0x6e, 0x69, 0x6e, 0x67, 0xd83c, 0xdfc3, 0x3a, 0x72, 0x75, 0x6e, 0x6e,\n0x65, 0x72, 0x3a, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0xd83c, 0xdfc3, 0x3a,\n0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69,\n0x6e, 0x67, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x72, 0x75, 0x6e,\n0x6e, 0x69, 0x6e, 0x67, 0xd83d, 0xdc6b, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c,\n0x65, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0xd83d, 0xdc6d, 0x3a, 0x74,\n0x77, 0x6f, 0x5f, 0x77, 0x6f, 0x6d, 0x65, 0x6e, 0x5f, 0x68, 0x6f, 0x6c,\n0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x3a, 0x68,\n0x61, 0x6e, 0x64, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x74,\n0x77, 0x6f, 0x77, 0x6f, 0x6d, 0x65, 0x6e, 0xd83d, 0xdc6c, 0x3a, 0x74, 0x77,\n0x6f, 0x5f, 0x6d, 0x65, 0x6e, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e,\n0x67, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x3a, 0x68, 0x61, 0x6e, 0x64,\n0x73, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x6d, 0x65, 0x6e, 0x74,\n0x77, 0x6f, 0xd83d, 0xdc91, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x5f,\n0x77, 0x69, 0x74, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x3a, 0x63,\n0x6f, 0x75, 0x70, 0x6c, 0x65, 0x68, 0x65, 0x61, 0x72, 0x74, 0x77, 0x69,\n0x74, 0x68, 0xd83d, 0xdc91, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x5f,\n0x77, 0x69, 0x74, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x5f, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x3a, 0x63, 0x6f, 0x75,\n0x70, 0x6c, 0x65, 0x68, 0x65, 0x61, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x77,\n0x69, 0x74, 0x68, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc69, 0x200d, 0x2764,\n0xfe0f, 0x200d, 0xd83d, 0xdc69, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x5f,\n0x77, 0x69, 0x74, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x5f, 0x77,\n0x77, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x68, 0x65, 0x61, 0x72,\n0x74, 0x77, 0x69, 0x74, 0x68, 0x77, 0x77, 0xd83d, 0xdc69, 0x200d, 0x2764, 0xfe0f,\n0x200d, 0xd83d, 0xdc69, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x77,\n0x77, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x77, 0x77, 0xd83d, 0xdc68,\n0x200d, 0x2764, 0xfe0f, 0x200d, 0xd83d, 0xdc68, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c,\n0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74,\n0x5f, 0x6d, 0x6d, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x68, 0x65,\n0x61, 0x72, 0x74, 0x6d, 0x6d, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdc68, 0x200d,\n0x2764, 0xfe0f, 0x200d, 0xd83d, 0xdc68, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65,\n0x5f, 0x6d, 0x6d, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x6d, 0x6d,\n0xd83d, 0xdc8f, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x6b, 0x69, 0x73,\n0x73, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x6b, 0x69, 0x73, 0x73,\n0xd83d, 0xdc8f, 0x3a, 0x6b, 0x69, 0x73, 0x73, 0x5f, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x3a, 0x6b, 0x69, 0x73, 0x73, 0x6d, 0x61,\n0x6e, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc69, 0x200d, 0x2764, 0xfe0f, 0x200d,\n0xd83d, 0xdc8b, 0x200d, 0xd83d, 0xdc69, 0x3a, 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65,\n0x6b, 0x69, 0x73, 0x73, 0x5f, 0x77, 0x77, 0x3a, 0x63, 0x6f, 0x75, 0x70,\n0x6c, 0x65, 0x6b, 0x69, 0x73, 0x73, 0x77, 0x77, 0xd83d, 0xdc69, 0x200d, 0x2764,\n0xfe0f, 0x200d, 0xd83d, 0xdc8b, 0x200d, 0xd83d, 0xdc69, 0x3a, 0x6b, 0x69, 0x73, 0x73,\n0x5f, 0x77, 0x77, 0x3a, 0x6b, 0x69, 0x73, 0x73, 0x77, 0x77, 0xd83d, 0xdc68,\n0x200d, 0x2764, 0xfe0f, 0x200d, 0xd83d, 0xdc8b, 0x200d, 0xd83d, 0xdc68, 0x3a, 0x63, 0x6f,\n0x75, 0x70, 0x6c, 0x65, 0x6b, 0x69, 0x73, 0x73, 0x5f, 0x6d, 0x6d, 0x3a,\n0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x6b, 0x69, 0x73, 0x73, 0x6d, 0x6d,\n0xd83d, 0xdc68, 0x200d, 0x2764, 0xfe0f, 0x200d, 0xd83d, 0xdc8b, 0x200d, 0xd83d, 0xdc68, 0x3a,\n0x6b, 0x69, 0x73, 0x73, 0x5f, 0x6d, 0x6d, 0x3a, 0x6b, 0x69, 0x73, 0x73,\n0x6d, 0x6d, 0xd83d, 0xdc6a, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x3a,\n0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0xd83d, 0xdc6a, 0x3a, 0x66, 0x61, 0x6d,\n0x69, 0x6c, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x5f, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0x5f, 0x62, 0x6f, 0x79, 0x3a, 0x62, 0x6f, 0x79, 0x66, 0x61, 0x6d,\n0x69, 0x6c, 0x79, 0x6d, 0x61, 0x6e, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d,\n0xdc68, 0x200d, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc67, 0x3a, 0x66, 0x61, 0x6d, 0x69,\n0x6c, 0x79, 0x5f, 0x6d, 0x77, 0x67, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c,\n0x79, 0x6d, 0x77, 0x67, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc67,\n0x200d, 0xd83d, 0xdc66, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6d,\n0x77, 0x67, 0x62, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x6d, 0x77,\n0x67, 0x62, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc66, 0x200d, 0xd83d,\n0xdc66, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6d, 0x77, 0x62,\n0x62, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x6d, 0x77, 0x62, 0x62,\n0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc67, 0x200d, 0xd83d, 0xdc67, 0x3a,\n0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6d, 0x77, 0x67, 0x67, 0x3a,\n0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x6d, 0x77, 0x67, 0x67, 0xd83d, 0xdc69,\n0x200d, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc66, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c,\n0x79, 0x5f, 0x77, 0x77, 0x62, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79,\n0x77, 0x77, 0x62, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc67, 0x3a,\n0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x77, 0x77, 0x67, 0x3a, 0x66,\n0x61, 0x6d, 0x69, 0x6c, 0x79, 0x77, 0x77, 0x67, 0xd83d, 0xdc69, 0x200d, 0xd83d,\n0xdc69, 0x200d, 0xd83d, 0xdc67, 0x200d, 0xd83d, 0xdc66, 0x3a, 0x66, 0x61, 0x6d, 0x69,\n0x6c, 0x79, 0x5f, 0x77, 0x77, 0x67, 0x62, 0x3a, 0x66, 0x61, 0x6d, 0x69,\n0x6c, 0x79, 0x77, 0x77, 0x67, 0x62, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc69, 0x200d,\n0xd83d, 0xdc66, 0x200d, 0xd83d, 0xdc66, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79,\n0x5f, 0x77, 0x77, 0x62, 0x62, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79,\n0x77, 0x77, 0x62, 0x62, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc67,\n0x200d, 0xd83d, 0xdc67, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x77,\n0x77, 0x67, 0x67, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x77, 0x77,\n0x67, 0x67, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc66, 0x3a, 0x66,\n0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6d, 0x6d, 0x62, 0x3a, 0x66, 0x61,\n0x6d, 0x69, 0x6c, 0x79, 0x6d, 0x6d, 0x62, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc68,\n0x200d, 0xd83d, 0xdc67, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6d,\n0x6d, 0x67, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x6d, 0x6d, 0x67,\n0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc67, 0x200d, 0xd83d, 0xdc66, 0x3a,\n0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6d, 0x6d, 0x67, 0x62, 0x3a,\n0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x6d, 0x6d, 0x67, 0x62, 0xd83d, 0xdc68,\n0x200d, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc66, 0x200d, 0xd83d, 0xdc66, 0x3a, 0x66, 0x61,\n0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6d, 0x6d, 0x62, 0x62, 0x3a, 0x66, 0x61,\n0x6d, 0x69, 0x6c, 0x79, 0x6d, 0x6d, 0x62, 0x62, 0xd83d, 0xdc68, 0x200d, 0xd83d,\n0xdc68, 0x200d, 0xd83d, 0xdc67, 0x200d, 0xd83d, 0xdc67, 0x3a, 0x66, 0x61, 0x6d, 0x69,\n0x6c, 0x79, 0x5f, 0x6d, 0x6d, 0x67, 0x67, 0x3a, 0x66, 0x61, 0x6d, 0x69,\n0x6c, 0x79, 0x6d, 0x6d, 0x67, 0x67, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc66, 0x3a,\n0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x77, 0x6f, 0x6d, 0x61, 0x6e,\n0x5f, 0x62, 0x6f, 0x79, 0x3a, 0x62, 0x6f, 0x79, 0x66, 0x61, 0x6d, 0x69,\n0x6c, 0x79, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc69, 0x200d, 0xd83d, 0xdc67,\n0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0x5f, 0x67, 0x69, 0x72, 0x6c, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c,\n0x79, 0x67, 0x69, 0x72, 0x6c, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc69,\n0x200d, 0xd83d, 0xdc67, 0x200d, 0xd83d, 0xdc66, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c,\n0x79, 0x5f, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x67, 0x69, 0x72, 0x6c,\n0x5f, 0x62, 0x6f, 0x79, 0x3a, 0x62, 0x6f, 0x79, 0x66, 0x61, 0x6d, 0x69,\n0x6c, 0x79, 0x67, 0x69, 0x72, 0x6c, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d,\n0xdc69, 0x200d, 0xd83d, 0xdc66, 0x200d, 0xd83d, 0xdc66, 0x3a, 0x66, 0x61, 0x6d, 0x69,\n0x6c, 0x79, 0x5f, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x62, 0x6f, 0x79,\n0x5f, 0x62, 0x6f, 0x79, 0x3a, 0x62, 0x6f, 0x79, 0x62, 0x6f, 0x79, 0x66,\n0x61, 0x6d, 0x69, 0x6c, 0x79, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc69,\n0x200d, 0xd83d, 0xdc67, 0x200d, 0xd83d, 0xdc67, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c,\n0x79, 0x5f, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x67, 0x69, 0x72, 0x6c,\n0x5f, 0x67, 0x69, 0x72, 0x6c, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79,\n0x67, 0x69, 0x72, 0x6c, 0x67, 0x69, 0x72, 0x6c, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc66, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c,\n0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x5f, 0x62, 0x6f, 0x79, 0x3a, 0x62, 0x6f,\n0x79, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc68,\n0x200d, 0xd83d, 0xdc67, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6d,\n0x61, 0x6e, 0x5f, 0x67, 0x69, 0x72, 0x6c, 0x3a, 0x66, 0x61, 0x6d, 0x69,\n0x6c, 0x79, 0x67, 0x69, 0x72, 0x6c, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc68, 0x200d,\n0xd83d, 0xdc67, 0x200d, 0xd83d, 0xdc66, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79,\n0x5f, 0x6d, 0x61, 0x6e, 0x5f, 0x67, 0x69, 0x72, 0x6c, 0x5f, 0x62, 0x6f,\n0x79, 0x3a, 0x62, 0x6f, 0x79, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x67,\n0x69, 0x72, 0x6c, 0x6d, 0x61, 0x6e, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc66, 0x200d,\n0xd83d, 0xdc66, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6d, 0x61,\n0x6e, 0x5f, 0x62, 0x6f, 0x79, 0x5f, 0x62, 0x6f, 0x79, 0x3a, 0x62, 0x6f,\n0x79, 0x62, 0x6f, 0x79, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x6d, 0x61,\n0x6e, 0xd83d, 0xdc68, 0x200d, 0xd83d, 0xdc67, 0x200d, 0xd83d, 0xdc67, 0x3a, 0x66, 0x61,\n0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x5f, 0x67, 0x69, 0x72,\n0x6c, 0x5f, 0x67, 0x69, 0x72, 0x6c, 0x3a, 0x66, 0x61, 0x6d, 0x69, 0x6c,\n0x79, 0x67, 0x69, 0x72, 0x6c, 0x67, 0x69, 0x72, 0x6c, 0x6d, 0x61, 0x6e,\n0xd83d, 0xdc5a, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x73, 0x5f, 0x63, 0x6c,\n0x6f, 0x74, 0x68, 0x65, 0x73, 0x3a, 0x63, 0x6c, 0x6f, 0x74, 0x68, 0x65,\n0x73, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x73, 0xd83d, 0xdc55, 0x3a, 0x73, 0x68,\n0x69, 0x72, 0x74, 0x3a, 0x73, 0x68, 0x69, 0x72, 0x74, 0xd83d, 0xdc56, 0x3a,\n0x6a, 0x65, 0x61, 0x6e, 0x73, 0x3a, 0x6a, 0x65, 0x61, 0x6e, 0x73, 0xd83d,\n0xdc54, 0x3a, 0x6e, 0x65, 0x63, 0x6b, 0x74, 0x69, 0x65, 0x3a, 0x6e, 0x65,\n0x63, 0x6b, 0x74, 0x69, 0x65, 0xd83d, 0xdc57, 0x3a, 0x64, 0x72, 0x65, 0x73,\n0x73, 0x3a, 0x64, 0x72, 0x65, 0x73, 0x73, 0xd83d, 0xdc59, 0x3a, 0x62, 0x69,\n0x6b, 0x69, 0x6e, 0x69, 0x3a, 0x62, 0x69, 0x6b, 0x69, 0x6e, 0x69, 0xd83d,\n0xdc58, 0x3a, 0x6b, 0x69, 0x6d, 0x6f, 0x6e, 0x6f, 0x3a, 0x6b, 0x69, 0x6d,\n0x6f, 0x6e, 0x6f, 0xd83d, 0xdc60, 0x3a, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x68,\n0x65, 0x65, 0x6c, 0x3a, 0x68, 0x65, 0x65, 0x6c, 0x68, 0x69, 0x67, 0x68,\n0xd83d, 0xdc61, 0x3a, 0x73, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x3a, 0x73, 0x61,\n0x6e, 0x64, 0x61, 0x6c, 0xd83d, 0xdc62, 0x3a, 0x62, 0x6f, 0x6f, 0x74, 0x3a,\n0x62, 0x6f, 0x6f, 0x74, 0xd83d, 0xdc5e, 0x3a, 0x6d, 0x61, 0x6e, 0x73, 0x5f,\n0x73, 0x68, 0x6f, 0x65, 0x3a, 0x6d, 0x61, 0x6e, 0x73, 0x73, 0x68, 0x6f,\n0x65, 0xd83d, 0xdc5f, 0x3a, 0x61, 0x74, 0x68, 0x6c, 0x65, 0x74, 0x69, 0x63,\n0x5f, 0x73, 0x68, 0x6f, 0x65, 0x3a, 0x61, 0x74, 0x68, 0x6c, 0x65, 0x74,\n0x69, 0x63, 0x73, 0x68, 0x6f, 0x65, 0xd83d, 0xdc52, 0x3a, 0x77, 0x6f, 0x6d,\n0x61, 0x6e, 0x73, 0x5f, 0x68, 0x61, 0x74, 0x3a, 0x68, 0x61, 0x74, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0x73, 0xd83c, 0xdfa9, 0x3a, 0x74, 0x6f, 0x70, 0x68,\n0x61, 0x74, 0x3a, 0x74, 0x6f, 0x70, 0x68, 0x61, 0x74, 0xd83c, 0xdf93, 0x3a,\n0x6d, 0x6f, 0x72, 0x74, 0x61, 0x72, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64,\n0x3a, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x72,\n0xd83d, 0xdc51, 0x3a, 0x63, 0x72, 0x6f, 0x77, 0x6e, 0x3a, 0x63, 0x72, 0x6f,\n0x77, 0x6e, 0x26d1, 0x3a, 0x68, 0x65, 0x6c, 0x6d, 0x65, 0x74, 0x5f, 0x77,\n0x69, 0x74, 0x68, 0x5f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x63, 0x72,\n0x6f, 0x73, 0x73, 0x3a, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x68, 0x65, 0x6c,\n0x6d, 0x65, 0x74, 0x77, 0x68, 0x69, 0x74, 0x65, 0x77, 0x69, 0x74, 0x68,\n0x26d1, 0x3a, 0x68, 0x65, 0x6c, 0x6d, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x74,\n0x68, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x3a, 0x63, 0x72, 0x6f, 0x73,\n0x73, 0x68, 0x65, 0x6c, 0x6d, 0x65, 0x74, 0x77, 0x69, 0x74, 0x68, 0xd83c,\n0xdf92, 0x3a, 0x73, 0x63, 0x68, 0x6f, 0x6f, 0x6c, 0x5f, 0x73, 0x61, 0x74,\n0x63, 0x68, 0x65, 0x6c, 0x3a, 0x73, 0x61, 0x74, 0x63, 0x68, 0x65, 0x6c,\n0x73, 0x63, 0x68, 0x6f, 0x6f, 0x6c, 0xd83d, 0xdc5d, 0x3a, 0x70, 0x6f, 0x75,\n0x63, 0x68, 0x3a, 0x70, 0x6f, 0x75, 0x63, 0x68, 0xd83d, 0xdc5b, 0x3a, 0x70,\n0x75, 0x72, 0x73, 0x65, 0x3a, 0x70, 0x75, 0x72, 0x73, 0x65, 0xd83d, 0xdc5c,\n0x3a, 0x68, 0x61, 0x6e, 0x64, 0x62, 0x61, 0x67, 0x3a, 0x68, 0x61, 0x6e,\n0x64, 0x62, 0x61, 0x67, 0xd83d, 0xdcbc, 0x3a, 0x62, 0x72, 0x69, 0x65, 0x66,\n0x63, 0x61, 0x73, 0x65, 0x3a, 0x62, 0x72, 0x69, 0x65, 0x66, 0x63, 0x61,\n0x73, 0x65, 0xd83d, 0xdc53, 0x3a, 0x65, 0x79, 0x65, 0x67, 0x6c, 0x61, 0x73,\n0x73, 0x65, 0x73, 0x3a, 0x65, 0x79, 0x65, 0x67, 0x6c, 0x61, 0x73, 0x73,\n0x65, 0x73, 0xd83d, 0xdd76, 0x3a, 0x64, 0x61, 0x72, 0x6b, 0x5f, 0x73, 0x75,\n0x6e, 0x67, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x3a, 0x64, 0x61, 0x72,\n0x6b, 0x73, 0x75, 0x6e, 0x67, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0xd83c,\n0xdf02, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x75, 0x6d, 0x62,\n0x72, 0x65, 0x6c, 0x6c, 0x61, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64,\n0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x2602, 0xfe0f, 0x3a, 0x75,\n0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x32, 0x3a, 0x75, 0x6d, 0x62,\n0x72, 0x65, 0x6c, 0x6c, 0x61, 0x32, 0xd83d, 0xdc36, 0x3a, 0x64, 0x6f, 0x67,\n0x3a, 0x64, 0x6f, 0x67, 0xd83d, 0xdc31, 0x3a, 0x63, 0x61, 0x74, 0x3a, 0x63,\n0x61, 0x74, 0xd83d, 0xdc2d, 0x3a, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x3a, 0x6d,\n0x6f, 0x75, 0x73, 0x65, 0xd83d, 0xdc39, 0x3a, 0x68, 0x61, 0x6d, 0x73, 0x74,\n0x65, 0x72, 0x3a, 0x68, 0x61, 0x6d, 0x73, 0x74, 0x65, 0x72, 0xd83d, 0xdc30,\n0x3a, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x3a, 0x72, 0x61, 0x62, 0x62,\n0x69, 0x74, 0xd83e, 0xdd8a, 0x3a, 0x66, 0x6f, 0x78, 0x5f, 0x66, 0x61, 0x63,\n0x65, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x66, 0x6f, 0x78, 0xd83e, 0xdd8a, 0x3a,\n0x66, 0x6f, 0x78, 0x3a, 0x66, 0x6f, 0x78, 0xd83d, 0xdc3b, 0x3a, 0x62, 0x65,\n0x61, 0x72, 0x3a, 0x62, 0x65, 0x61, 0x72, 0xd83d, 0xdc3c, 0x3a, 0x70, 0x61,\n0x6e, 0x64, 0x61, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63,\n0x65, 0x70, 0x61, 0x6e, 0x64, 0x61, 0xd83d, 0xdc28, 0x3a, 0x6b, 0x6f, 0x61,\n0x6c, 0x61, 0x3a, 0x6b, 0x6f, 0x61, 0x6c, 0x61, 0xd83d, 0xdc2f, 0x3a, 0x74,\n0x69, 0x67, 0x65, 0x72, 0x3a, 0x74, 0x69, 0x67, 0x65, 0x72, 0xd83e, 0xdd81,\n0x3a, 0x6c, 0x69, 0x6f, 0x6e, 0x3a, 0x6c, 0x69, 0x6f, 0x6e, 0xd83e, 0xdd81,\n0x3a, 0x6c, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66,\n0x61, 0x63, 0x65, 0x6c, 0x69, 0x6f, 0x6e, 0xd83d, 0xdc2e, 0x3a, 0x63, 0x6f,\n0x77, 0x3a, 0x63, 0x6f, 0x77, 0xd83d, 0xdc37, 0x3a, 0x70, 0x69, 0x67, 0x3a,\n0x70, 0x69, 0x67, 0xd83d, 0xdc3d, 0x3a, 0x70, 0x69, 0x67, 0x5f, 0x6e, 0x6f,\n0x73, 0x65, 0x3a, 0x6e, 0x6f, 0x73, 0x65, 0x70, 0x69, 0x67, 0xd83d, 0xdc38,\n0x3a, 0x66, 0x72, 0x6f, 0x67, 0x3a, 0x66, 0x72, 0x6f, 0x67, 0xd83d, 0xdc35,\n0x3a, 0x6d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x61, 0x63, 0x65,\n0x3a, 0x66, 0x61, 0x63, 0x65, 0x6d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0xd83d,\n0xde48, 0x3a, 0x73, 0x65, 0x65, 0x5f, 0x6e, 0x6f, 0x5f, 0x65, 0x76, 0x69,\n0x6c, 0x3a, 0x65, 0x76, 0x69, 0x6c, 0x6e, 0x6f, 0x73, 0x65, 0x65, 0xd83d,\n0xde49, 0x3a, 0x68, 0x65, 0x61, 0x72, 0x5f, 0x6e, 0x6f, 0x5f, 0x65, 0x76,\n0x69, 0x6c, 0x3a, 0x65, 0x76, 0x69, 0x6c, 0x68, 0x65, 0x61, 0x72, 0x6e,\n0x6f, 0xd83d, 0xde4a, 0x3a, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x5f, 0x6e, 0x6f,\n0x5f, 0x65, 0x76, 0x69, 0x6c, 0x3a, 0x65, 0x76, 0x69, 0x6c, 0x6e, 0x6f,\n0x73, 0x70, 0x65, 0x61, 0x6b, 0xd83d, 0xdc12, 0x3a, 0x6d, 0x6f, 0x6e, 0x6b,\n0x65, 0x79, 0x3a, 0x6d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0xd83d, 0xdc14, 0x3a,\n0x63, 0x68, 0x69, 0x63, 0x6b, 0x65, 0x6e, 0x3a, 0x63, 0x68, 0x69, 0x63,\n0x6b, 0x65, 0x6e, 0xd83d, 0xdc27, 0x3a, 0x70, 0x65, 0x6e, 0x67, 0x75, 0x69,\n0x6e, 0x3a, 0x70, 0x65, 0x6e, 0x67, 0x75, 0x69, 0x6e, 0xd83d, 0xdc26, 0x3a,\n0x62, 0x69, 0x72, 0x64, 0x3a, 0x62, 0x69, 0x72, 0x64, 0xd83d, 0xdc24, 0x3a,\n0x62, 0x61, 0x62, 0x79, 0x5f, 0x63, 0x68, 0x69, 0x63, 0x6b, 0x3a, 0x62,\n0x61, 0x62, 0x79, 0x63, 0x68, 0x69, 0x63, 0x6b, 0xd83d, 0xdc23, 0x3a, 0x68,\n0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x69, 0x63,\n0x6b, 0x3a, 0x63, 0x68, 0x69, 0x63, 0x6b, 0x68, 0x61, 0x74, 0x63, 0x68,\n0x69, 0x6e, 0x67, 0xd83d, 0xdc25, 0x3a, 0x68, 0x61, 0x74, 0x63, 0x68, 0x65,\n0x64, 0x5f, 0x63, 0x68, 0x69, 0x63, 0x6b, 0x3a, 0x63, 0x68, 0x69, 0x63,\n0x6b, 0x68, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0xd83e, 0xdd86, 0x3a, 0x64,\n0x75, 0x63, 0x6b, 0x3a, 0x64, 0x75, 0x63, 0x6b, 0xd83e, 0xdd85, 0x3a, 0x65,\n0x61, 0x67, 0x6c, 0x65, 0x3a, 0x65, 0x61, 0x67, 0x6c, 0x65, 0xd83e, 0xdd89,\n0x3a, 0x6f, 0x77, 0x6c, 0x3a, 0x6f, 0x77, 0x6c, 0xd83e, 0xdd87, 0x3a, 0x62,\n0x61, 0x74, 0x3a, 0x62, 0x61, 0x74, 0xd83d, 0xdc3a, 0x3a, 0x77, 0x6f, 0x6c,\n0x66, 0x3a, 0x77, 0x6f, 0x6c, 0x66, 0xd83d, 0xdc17, 0x3a, 0x62, 0x6f, 0x61,\n0x72, 0x3a, 0x62, 0x6f, 0x61, 0x72, 0xd83d, 0xdc34, 0x3a, 0x68, 0x6f, 0x72,\n0x73, 0x65, 0x3a, 0x68, 0x6f, 0x72, 0x73, 0x65, 0xd83e, 0xdd84, 0x3a, 0x75,\n0x6e, 0x69, 0x63, 0x6f, 0x72, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a,\n0x66, 0x61, 0x63, 0x65, 0x75, 0x6e, 0x69, 0x63, 0x6f, 0x72, 0x6e, 0xd83e,\n0xdd84, 0x3a, 0x75, 0x6e, 0x69, 0x63, 0x6f, 0x72, 0x6e, 0x3a, 0x75, 0x6e,\n0x69, 0x63, 0x6f, 0x72, 0x6e, 0xd83d, 0xdc1d, 0x3a, 0x62, 0x65, 0x65, 0x3a,\n0x62, 0x65, 0x65, 0xd83d, 0xdc1b, 0x3a, 0x62, 0x75, 0x67, 0x3a, 0x62, 0x75,\n0x67, 0xd83e, 0xdd8b, 0x3a, 0x62, 0x75, 0x74, 0x74, 0x65, 0x72, 0x66, 0x6c,\n0x79, 0x3a, 0x62, 0x75, 0x74, 0x74, 0x65, 0x72, 0x66, 0x6c, 0x79, 0xd83d,\n0xdc0c, 0x3a, 0x73, 0x6e, 0x61, 0x69, 0x6c, 0x3a, 0x73, 0x6e, 0x61, 0x69,\n0x6c, 0xd83d, 0xdc1a, 0x3a, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x3a, 0x73, 0x68,\n0x65, 0x6c, 0x6c, 0xd83d, 0xdc1e, 0x3a, 0x62, 0x65, 0x65, 0x74, 0x6c, 0x65,\n0x3a, 0x62, 0x65, 0x65, 0x74, 0x6c, 0x65, 0xd83d, 0xdc1c, 0x3a, 0x61, 0x6e,\n0x74, 0x3a, 0x61, 0x6e, 0x74, 0xd83d, 0xdd77, 0x3a, 0x73, 0x70, 0x69, 0x64,\n0x65, 0x72, 0x3a, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72, 0xd83d, 0xdd78, 0x3a,\n0x73, 0x70, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x77, 0x65, 0x62, 0x3a, 0x73,\n0x70, 0x69, 0x64, 0x65, 0x72, 0x77, 0x65, 0x62, 0xd83d, 0xdc22, 0x3a, 0x74,\n0x75, 0x72, 0x74, 0x6c, 0x65, 0x3a, 0x74, 0x75, 0x72, 0x74, 0x6c, 0x65,\n0xd83d, 0xdc0d, 0x3a, 0x73, 0x6e, 0x61, 0x6b, 0x65, 0x3a, 0x73, 0x6e, 0x61,\n0x6b, 0x65, 0xd83e, 0xdd8e, 0x3a, 0x6c, 0x69, 0x7a, 0x61, 0x72, 0x64, 0x3a,\n0x6c, 0x69, 0x7a, 0x61, 0x72, 0x64, 0xd83e, 0xdd82, 0x3a, 0x73, 0x63, 0x6f,\n0x72, 0x70, 0x69, 0x6f, 0x6e, 0x3a, 0x73, 0x63, 0x6f, 0x72, 0x70, 0x69,\n0x6f, 0x6e, 0xd83e, 0xdd80, 0x3a, 0x63, 0x72, 0x61, 0x62, 0x3a, 0x63, 0x72,\n0x61, 0x62, 0xd83e, 0xdd91, 0x3a, 0x73, 0x71, 0x75, 0x69, 0x64, 0x3a, 0x73,\n0x71, 0x75, 0x69, 0x64, 0xd83d, 0xdc19, 0x3a, 0x6f, 0x63, 0x74, 0x6f, 0x70,\n0x75, 0x73, 0x3a, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0xd83e, 0xdd90,\n0x3a, 0x73, 0x68, 0x72, 0x69, 0x6d, 0x70, 0x3a, 0x73, 0x68, 0x72, 0x69,\n0x6d, 0x70, 0xd83d, 0xdc20, 0x3a, 0x74, 0x72, 0x6f, 0x70, 0x69, 0x63, 0x61,\n0x6c, 0x5f, 0x66, 0x69, 0x73, 0x68, 0x3a, 0x66, 0x69, 0x73, 0x68, 0x74,\n0x72, 0x6f, 0x70, 0x69, 0x63, 0x61, 0x6c, 0xd83d, 0xdc1f, 0x3a, 0x66, 0x69,\n0x73, 0x68, 0x3a, 0x66, 0x69, 0x73, 0x68, 0xd83d, 0xdc21, 0x3a, 0x62, 0x6c,\n0x6f, 0x77, 0x66, 0x69, 0x73, 0x68, 0x3a, 0x62, 0x6c, 0x6f, 0x77, 0x66,\n0x69, 0x73, 0x68, 0xd83d, 0xdc2c, 0x3a, 0x64, 0x6f, 0x6c, 0x70, 0x68, 0x69,\n0x6e, 0x3a, 0x64, 0x6f, 0x6c, 0x70, 0x68, 0x69, 0x6e, 0xd83e, 0xdd88, 0x3a,\n0x73, 0x68, 0x61, 0x72, 0x6b, 0x3a, 0x73, 0x68, 0x61, 0x72, 0x6b, 0xd83d,\n0xdc33, 0x3a, 0x77, 0x68, 0x61, 0x6c, 0x65, 0x3a, 0x77, 0x68, 0x61, 0x6c,\n0x65, 0xd83d, 0xdc0b, 0x3a, 0x77, 0x68, 0x61, 0x6c, 0x65, 0x32, 0x3a, 0x77,\n0x68, 0x61, 0x6c, 0x65, 0x32, 0xd83d, 0xdc0a, 0x3a, 0x63, 0x72, 0x6f, 0x63,\n0x6f, 0x64, 0x69, 0x6c, 0x65, 0x3a, 0x63, 0x72, 0x6f, 0x63, 0x6f, 0x64,\n0x69, 0x6c, 0x65, 0xd83d, 0xdc06, 0x3a, 0x6c, 0x65, 0x6f, 0x70, 0x61, 0x72,\n0x64, 0x3a, 0x6c, 0x65, 0x6f, 0x70, 0x61, 0x72, 0x64, 0xd83d, 0xdc05, 0x3a,\n0x74, 0x69, 0x67, 0x65, 0x72, 0x32, 0x3a, 0x74, 0x69, 0x67, 0x65, 0x72,\n0x32, 0xd83d, 0xdc03, 0x3a, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x75,\n0x66, 0x66, 0x61, 0x6c, 0x6f, 0x3a, 0x62, 0x75, 0x66, 0x66, 0x61, 0x6c,\n0x6f, 0x77, 0x61, 0x74, 0x65, 0x72, 0xd83d, 0xdc02, 0x3a, 0x6f, 0x78, 0x3a,\n0x6f, 0x78, 0xd83d, 0xdc04, 0x3a, 0x63, 0x6f, 0x77, 0x32, 0x3a, 0x63, 0x6f,\n0x77, 0x32, 0xd83e, 0xdd8c, 0x3a, 0x64, 0x65, 0x65, 0x72, 0x3a, 0x64, 0x65,\n0x65, 0x72, 0xd83d, 0xdc2a, 0x3a, 0x64, 0x72, 0x6f, 0x6d, 0x65, 0x64, 0x61,\n0x72, 0x79, 0x5f, 0x63, 0x61, 0x6d, 0x65, 0x6c, 0x3a, 0x63, 0x61, 0x6d,\n0x65, 0x6c, 0x64, 0x72, 0x6f, 0x6d, 0x65, 0x64, 0x61, 0x72, 0x79, 0xd83d,\n0xdc2b, 0x3a, 0x63, 0x61, 0x6d, 0x65, 0x6c, 0x3a, 0x63, 0x61, 0x6d, 0x65,\n0x6c, 0xd83d, 0xdc18, 0x3a, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x61, 0x6e, 0x74,\n0x3a, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x61, 0x6e, 0x74, 0xd83e, 0xdd8f, 0x3a,\n0x72, 0x68, 0x69, 0x6e, 0x6f, 0x63, 0x65, 0x72, 0x6f, 0x73, 0x3a, 0x72,\n0x68, 0x69, 0x6e, 0x6f, 0x63, 0x65, 0x72, 0x6f, 0x73, 0xd83e, 0xdd8f, 0x3a,\n0x72, 0x68, 0x69, 0x6e, 0x6f, 0x3a, 0x72, 0x68, 0x69, 0x6e, 0x6f, 0xd83e,\n0xdd8d, 0x3a, 0x67, 0x6f, 0x72, 0x69, 0x6c, 0x6c, 0x61, 0x3a, 0x67, 0x6f,\n0x72, 0x69, 0x6c, 0x6c, 0x61, 0xd83d, 0xdc0e, 0x3a, 0x72, 0x61, 0x63, 0x65,\n0x68, 0x6f, 0x72, 0x73, 0x65, 0x3a, 0x72, 0x61, 0x63, 0x65, 0x68, 0x6f,\n0x72, 0x73, 0x65, 0xd83d, 0xdc16, 0x3a, 0x70, 0x69, 0x67, 0x32, 0x3a, 0x70,\n0x69, 0x67, 0x32, 0xd83d, 0xdc10, 0x3a, 0x67, 0x6f, 0x61, 0x74, 0x3a, 0x67,\n0x6f, 0x61, 0x74, 0xd83d, 0xdc0f, 0x3a, 0x72, 0x61, 0x6d, 0x3a, 0x72, 0x61,\n0x6d, 0xd83d, 0xdc11, 0x3a, 0x73, 0x68, 0x65, 0x65, 0x70, 0x3a, 0x73, 0x68,\n0x65, 0x65, 0x70, 0xd83d, 0xdc15, 0x3a, 0x64, 0x6f, 0x67, 0x32, 0x3a, 0x64,\n0x6f, 0x67, 0x32, 0xd83d, 0xdc29, 0x3a, 0x70, 0x6f, 0x6f, 0x64, 0x6c, 0x65,\n0x3a, 0x70, 0x6f, 0x6f, 0x64, 0x6c, 0x65, 0xd83d, 0xdc08, 0x3a, 0x63, 0x61,\n0x74, 0x32, 0x3a, 0x63, 0x61, 0x74, 0x32, 0xd83d, 0xdc13, 0x3a, 0x72, 0x6f,\n0x6f, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x72, 0x6f, 0x6f, 0x73, 0x74, 0x65,\n0x72, 0xd83e, 0xdd83, 0x3a, 0x74, 0x75, 0x72, 0x6b, 0x65, 0x79, 0x3a, 0x74,\n0x75, 0x72, 0x6b, 0x65, 0x79, 0xd83d, 0xdd4a, 0x3a, 0x64, 0x6f, 0x76, 0x65,\n0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x65, 0x61, 0x63, 0x65, 0x3a, 0x64, 0x6f,\n0x76, 0x65, 0x6f, 0x66, 0x70, 0x65, 0x61, 0x63, 0x65, 0xd83d, 0xdd4a, 0x3a,\n0x64, 0x6f, 0x76, 0x65, 0x3a, 0x64, 0x6f, 0x76, 0x65, 0xd83d, 0xdc07, 0x3a,\n0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x32, 0x3a, 0x72, 0x61, 0x62, 0x62,\n0x69, 0x74, 0x32, 0xd83d, 0xdc01, 0x3a, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x32,\n0x3a, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x32, 0xd83d, 0xdc00, 0x3a, 0x72, 0x61,\n0x74, 0x3a, 0x72, 0x61, 0x74, 0xd83d, 0xdc3f, 0x3a, 0x63, 0x68, 0x69, 0x70,\n0x6d, 0x75, 0x6e, 0x6b, 0x3a, 0x63, 0x68, 0x69, 0x70, 0x6d, 0x75, 0x6e,\n0x6b, 0xd83d, 0xdc3e, 0x3a, 0x70, 0x61, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6e,\n0x74, 0x73, 0x3a, 0x70, 0x61, 0x77, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73,\n0xd83d, 0xdc3e, 0x3a, 0x66, 0x65, 0x65, 0x74, 0x3a, 0x66, 0x65, 0x65, 0x74,\n0xd83d, 0xdc09, 0x3a, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x3a, 0x64, 0x72,\n0x61, 0x67, 0x6f, 0x6e, 0xd83d, 0xdc32, 0x3a, 0x64, 0x72, 0x61, 0x67, 0x6f,\n0x6e, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x64, 0x72, 0x61, 0x67, 0x6f,\n0x6e, 0x66, 0x61, 0x63, 0x65, 0xd83c, 0xdf35, 0x3a, 0x63, 0x61, 0x63, 0x74,\n0x75, 0x73, 0x3a, 0x63, 0x61, 0x63, 0x74, 0x75, 0x73, 0xd83c, 0xdf84, 0x3a,\n0x63, 0x68, 0x72, 0x69, 0x73, 0x74, 0x6d, 0x61, 0x73, 0x5f, 0x74, 0x72,\n0x65, 0x65, 0x3a, 0x63, 0x68, 0x72, 0x69, 0x73, 0x74, 0x6d, 0x61, 0x73,\n0x74, 0x72, 0x65, 0x65, 0xd83c, 0xdf32, 0x3a, 0x65, 0x76, 0x65, 0x72, 0x67,\n0x72, 0x65, 0x65, 0x6e, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x3a, 0x65, 0x76,\n0x65, 0x72, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x74, 0x72, 0x65, 0x65, 0xd83c,\n0xdf33, 0x3a, 0x64, 0x65, 0x63, 0x69, 0x64, 0x75, 0x6f, 0x75, 0x73, 0x5f,\n0x74, 0x72, 0x65, 0x65, 0x3a, 0x64, 0x65, 0x63, 0x69, 0x64, 0x75, 0x6f,\n0x75, 0x73, 0x74, 0x72, 0x65, 0x65, 0xd83c, 0xdf34, 0x3a, 0x70, 0x61, 0x6c,\n0x6d, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x3a, 0x70, 0x61, 0x6c, 0x6d, 0x74,\n0x72, 0x65, 0x65, 0xd83c, 0xdf31, 0x3a, 0x73, 0x65, 0x65, 0x64, 0x6c, 0x69,\n0x6e, 0x67, 0x3a, 0x73, 0x65, 0x65, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0xd83c,\n0xdf3f, 0x3a, 0x68, 0x65, 0x72, 0x62, 0x3a, 0x68, 0x65, 0x72, 0x62, 0x2618,\n0xfe0f, 0x3a, 0x73, 0x68, 0x61, 0x6d, 0x72, 0x6f, 0x63, 0x6b, 0x3a, 0x73,\n0x68, 0x61, 0x6d, 0x72, 0x6f, 0x63, 0x6b, 0xd83c, 0xdf40, 0x3a, 0x66, 0x6f,\n0x75, 0x72, 0x5f, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x6c, 0x6f, 0x76,\n0x65, 0x72, 0x3a, 0x63, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x66, 0x6f, 0x75,\n0x72, 0x6c, 0x65, 0x61, 0x66, 0xd83c, 0xdf8d, 0x3a, 0x62, 0x61, 0x6d, 0x62,\n0x6f, 0x6f, 0x3a, 0x62, 0x61, 0x6d, 0x62, 0x6f, 0x6f, 0xd83c, 0xdf8b, 0x3a,\n0x74, 0x61, 0x6e, 0x61, 0x62, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x72, 0x65,\n0x65, 0x3a, 0x74, 0x61, 0x6e, 0x61, 0x62, 0x61, 0x74, 0x61, 0x74, 0x72,\n0x65, 0x65, 0xd83c, 0xdf43, 0x3a, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x3a,\n0x6c, 0x65, 0x61, 0x76, 0x65, 0x73, 0xd83c, 0xdf42, 0x3a, 0x66, 0x61, 0x6c,\n0x6c, 0x65, 0x6e, 0x5f, 0x6c, 0x65, 0x61, 0x66, 0x3a, 0x66, 0x61, 0x6c,\n0x6c, 0x65, 0x6e, 0x6c, 0x65, 0x61, 0x66, 0xd83c, 0xdf41, 0x3a, 0x6d, 0x61,\n0x70, 0x6c, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x66, 0x3a, 0x6c, 0x65, 0x61,\n0x66, 0x6d, 0x61, 0x70, 0x6c, 0x65, 0xd83c, 0xdf44, 0x3a, 0x6d, 0x75, 0x73,\n0x68, 0x72, 0x6f, 0x6f, 0x6d, 0x3a, 0x6d, 0x75, 0x73, 0x68, 0x72, 0x6f,\n0x6f, 0x6d, 0xd83c, 0xdf3e, 0x3a, 0x65, 0x61, 0x72, 0x5f, 0x6f, 0x66, 0x5f,\n0x72, 0x69, 0x63, 0x65, 0x3a, 0x65, 0x61, 0x72, 0x6f, 0x66, 0x72, 0x69,\n0x63, 0x65, 0xd83d, 0xdc90, 0x3a, 0x62, 0x6f, 0x75, 0x71, 0x75, 0x65, 0x74,\n0x3a, 0x62, 0x6f, 0x75, 0x71, 0x75, 0x65, 0x74, 0xd83c, 0xdf37, 0x3a, 0x74,\n0x75, 0x6c, 0x69, 0x70, 0x3a, 0x74, 0x75, 0x6c, 0x69, 0x70, 0xd83c, 0xdf39,\n0x3a, 0x72, 0x6f, 0x73, 0x65, 0x3a, 0x72, 0x6f, 0x73, 0x65, 0xd83e, 0xdd40,\n0x3a, 0x77, 0x69, 0x6c, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x77,\n0x65, 0x72, 0x3a, 0x66, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x77, 0x69, 0x6c,\n0x74, 0x65, 0x64, 0xd83e, 0xdd40, 0x3a, 0x77, 0x69, 0x6c, 0x74, 0x65, 0x64,\n0x5f, 0x72, 0x6f, 0x73, 0x65, 0x3a, 0x72, 0x6f, 0x73, 0x65, 0x77, 0x69,\n0x6c, 0x74, 0x65, 0x64, 0xd83c, 0xdf3b, 0x3a, 0x73, 0x75, 0x6e, 0x66, 0x6c,\n0x6f, 0x77, 0x65, 0x72, 0x3a, 0x73, 0x75, 0x6e, 0x66, 0x6c, 0x6f, 0x77,\n0x65, 0x72, 0xd83c, 0xdf3c, 0x3a, 0x62, 0x6c, 0x6f, 0x73, 0x73, 0x6f, 0x6d,\n0x3a, 0x62, 0x6c, 0x6f, 0x73, 0x73, 0x6f, 0x6d, 0xd83c, 0xdf38, 0x3a, 0x63,\n0x68, 0x65, 0x72, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x73, 0x73, 0x6f,\n0x6d, 0x3a, 0x62, 0x6c, 0x6f, 0x73, 0x73, 0x6f, 0x6d, 0x63, 0x68, 0x65,\n0x72, 0x72, 0x79, 0xd83c, 0xdf3a, 0x3a, 0x68, 0x69, 0x62, 0x69, 0x73, 0x63,\n0x75, 0x73, 0x3a, 0x68, 0x69, 0x62, 0x69, 0x73, 0x63, 0x75, 0x73, 0xd83c,\n0xdf0e, 0x3a, 0x65, 0x61, 0x72, 0x74, 0x68, 0x5f, 0x61, 0x6d, 0x65, 0x72,\n0x69, 0x63, 0x61, 0x73, 0x3a, 0x61, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61,\n0x73, 0x65, 0x61, 0x72, 0x74, 0x68, 0xd83c, 0xdf0d, 0x3a, 0x65, 0x61, 0x72,\n0x74, 0x68, 0x5f, 0x61, 0x66, 0x72, 0x69, 0x63, 0x61, 0x3a, 0x61, 0x66,\n0x72, 0x69, 0x63, 0x61, 0x65, 0x61, 0x72, 0x74, 0x68, 0xd83c, 0xdf0f, 0x3a,\n0x65, 0x61, 0x72, 0x74, 0x68, 0x5f, 0x61, 0x73, 0x69, 0x61, 0x3a, 0x61,\n0x73, 0x69, 0x61, 0x65, 0x61, 0x72, 0x74, 0x68, 0xd83c, 0xdf15, 0x3a, 0x66,\n0x75, 0x6c, 0x6c, 0x5f, 0x6d, 0x6f, 0x6f, 0x6e, 0x3a, 0x66, 0x75, 0x6c,\n0x6c, 0x6d, 0x6f, 0x6f, 0x6e, 0xd83c, 0xdf16, 0x3a, 0x77, 0x61, 0x6e, 0x69,\n0x6e, 0x67, 0x5f, 0x67, 0x69, 0x62, 0x62, 0x6f, 0x75, 0x73, 0x5f, 0x6d,\n0x6f, 0x6f, 0x6e, 0x3a, 0x67, 0x69, 0x62, 0x62, 0x6f, 0x75, 0x73, 0x6d,\n0x6f, 0x6f, 0x6e, 0x77, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0xd83c, 0xdf17, 0x3a,\n0x6c, 0x61, 0x73, 0x74, 0x5f, 0x71, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72,\n0x5f, 0x6d, 0x6f, 0x6f, 0x6e, 0x3a, 0x6c, 0x61, 0x73, 0x74, 0x6d, 0x6f,\n0x6f, 0x6e, 0x71, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0xd83c, 0xdf18, 0x3a,\n0x77, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x72, 0x65, 0x73, 0x63,\n0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x6f, 0x6f, 0x6e, 0x3a, 0x63, 0x72, 0x65,\n0x73, 0x63, 0x65, 0x6e, 0x74, 0x6d, 0x6f, 0x6f, 0x6e, 0x77, 0x61, 0x6e,\n0x69, 0x6e, 0x67, 0xd83c, 0xdf11, 0x3a, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x6f,\n0x6f, 0x6e, 0x3a, 0x6d, 0x6f, 0x6f, 0x6e, 0x6e, 0x65, 0x77, 0xd83c, 0xdf12,\n0x3a, 0x77, 0x61, 0x78, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x72, 0x65, 0x73,\n0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x6f, 0x6f, 0x6e, 0x3a, 0x63, 0x72,\n0x65, 0x73, 0x63, 0x65, 0x6e, 0x74, 0x6d, 0x6f, 0x6f, 0x6e, 0x77, 0x61,\n0x78, 0x69, 0x6e, 0x67, 0xd83c, 0xdf13, 0x3a, 0x66, 0x69, 0x72, 0x73, 0x74,\n0x5f, 0x71, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x6f,\n0x6e, 0x3a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6d, 0x6f, 0x6f, 0x6e, 0x71,\n0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0xd83c, 0xdf14, 0x3a, 0x77, 0x61, 0x78,\n0x69, 0x6e, 0x67, 0x5f, 0x67, 0x69, 0x62, 0x62, 0x6f, 0x75, 0x73, 0x5f,\n0x6d, 0x6f, 0x6f, 0x6e, 0x3a, 0x67, 0x69, 0x62, 0x62, 0x6f, 0x75, 0x73,\n0x6d, 0x6f, 0x6f, 0x6e, 0x77, 0x61, 0x78, 0x69, 0x6e, 0x67, 0xd83c, 0xdf1a,\n0x3a, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x6f, 0x6f, 0x6e, 0x5f, 0x77, 0x69,\n0x74, 0x68, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63, 0x65,\n0x6d, 0x6f, 0x6f, 0x6e, 0x6e, 0x65, 0x77, 0x77, 0x69, 0x74, 0x68, 0xd83c,\n0xdf1d, 0x3a, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6d, 0x6f, 0x6f, 0x6e, 0x5f,\n0x77, 0x69, 0x74, 0x68, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61,\n0x63, 0x65, 0x66, 0x75, 0x6c, 0x6c, 0x6d, 0x6f, 0x6f, 0x6e, 0x77, 0x69,\n0x74, 0x68, 0xd83c, 0xdf1e, 0x3a, 0x73, 0x75, 0x6e, 0x5f, 0x77, 0x69, 0x74,\n0x68, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x73,\n0x75, 0x6e, 0x77, 0x69, 0x74, 0x68, 0xd83c, 0xdf1b, 0x3a, 0x66, 0x69, 0x72,\n0x73, 0x74, 0x5f, 0x71, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x6d,\n0x6f, 0x6f, 0x6e, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x66, 0x61, 0x63,\n0x65, 0x3a, 0x66, 0x61, 0x63, 0x65, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6d,\n0x6f, 0x6f, 0x6e, 0x71, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x77, 0x69,\n0x74, 0x68, 0xd83c, 0xdf1c, 0x3a, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x71, 0x75,\n0x61, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x6f, 0x6e, 0x5f, 0x77,\n0x69, 0x74, 0x68, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x3a, 0x66, 0x61, 0x63,\n0x65, 0x6c, 0x61, 0x73, 0x74, 0x6d, 0x6f, 0x6f, 0x6e, 0x71, 0x75, 0x61,\n0x72, 0x74, 0x65, 0x72, 0x77, 0x69, 0x74, 0x68, 0xd83c, 0xdf19, 0x3a, 0x63,\n0x72, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x6f, 0x6f, 0x6e,\n0x3a, 0x63, 0x72, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x74, 0x6d, 0x6f, 0x6f,\n0x6e, 0xd83d, 0xdcab, 0x3a, 0x64, 0x69, 0x7a, 0x7a, 0x79, 0x3a, 0x64, 0x69,\n0x7a, 0x7a, 0x79, 0x2b50, 0xfe0f, 0x3a, 0x73, 0x74, 0x61, 0x72, 0x3a, 0x73,\n0x74, 0x61, 0x72, 0xd83c, 0xdf1f, 0x3a, 0x73, 0x74, 0x61, 0x72, 0x32, 0x3a,\n0x73, 0x74, 0x61, 0x72, 0x32, 0x2728, 0x3a, 0x73, 0x70, 0x61, 0x72, 0x6b,\n0x6c, 0x65, 0x73, 0x3a, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x6c, 0x65, 0x73,\n0x26a1, 0xfe0f, 0x3a, 0x7a, 0x61, 0x70, 0x3a, 0x7a, 0x61, 0x70, 0xd83d, 0xdd25,\n0x3a, 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x3a, 0x66, 0x6c, 0x61, 0x6d, 0x65,\n0xd83d, 0xdd25, 0x3a, 0x66, 0x69, 0x72, 0x65, 0x3a, 0x66, 0x69, 0x72, 0x65,\n0xd83d, 0xdca5, 0x3a, 0x62, 0x6f, 0x6f, 0x6d, 0x3a, 0x62, 0x6f, 0x6f, 0x6d,\n0x2604, 0xfe0f, 0x3a, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x3a, 0x63, 0x6f, 0x6d,\n0x65, 0x74, 0x2600, 0xfe0f, 0x3a, 0x73, 0x75, 0x6e, 0x6e, 0x79, 0x3a, 0x73,\n0x75, 0x6e, 0x6e, 0x79, 0xd83c, 0xdf24, 0x3a, 0x77, 0x68, 0x69, 0x74, 0x65,\n0x5f, 0x73, 0x75, 0x6e, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x73, 0x6d,\n0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x63, 0x6c,\n0x6f, 0x75, 0x64, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x73, 0x75, 0x6e, 0x77,\n0x68, 0x69, 0x74, 0x65, 0x77, 0x69, 0x74, 0x68, 0xd83c, 0xdf24, 0x3a, 0x77,\n0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x6e, 0x5f, 0x73, 0x6d, 0x61,\n0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x63, 0x6c, 0x6f,\n0x75, 0x64, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x73, 0x75, 0x6e, 0x77, 0x68,\n0x69, 0x74, 0x65, 0x26c5, 0xfe0f, 0x3a, 0x70, 0x61, 0x72, 0x74, 0x6c, 0x79,\n0x5f, 0x73, 0x75, 0x6e, 0x6e, 0x79, 0x3a, 0x70, 0x61, 0x72, 0x74, 0x6c,\n0x79, 0x73, 0x75, 0x6e, 0x6e, 0x79, 0xd83c, 0xdf25, 0x3a, 0x77, 0x68, 0x69,\n0x74, 0x65, 0x5f, 0x73, 0x75, 0x6e, 0x5f, 0x62, 0x65, 0x68, 0x69, 0x6e,\n0x64, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x62, 0x65, 0x68, 0x69,\n0x6e, 0x64, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x75, 0x6e, 0x77, 0x68,\n0x69, 0x74, 0x65, 0xd83c, 0xdf25, 0x3a, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f,\n0x73, 0x75, 0x6e, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x63, 0x6c,\n0x6f, 0x75, 0x64, 0x73, 0x75, 0x6e, 0x77, 0x68, 0x69, 0x74, 0x65, 0xd83c,\n0xdf26, 0x3a, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x6e, 0x5f,\n0x62, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64,\n0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x72, 0x61, 0x69, 0x6e, 0x3a, 0x62,\n0x65, 0x68, 0x69, 0x6e, 0x64, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x61,\n0x69, 0x6e, 0x73, 0x75, 0x6e, 0x77, 0x68, 0x69, 0x74, 0x65, 0x77, 0x69,\n0x74, 0x68, 0xd83c, 0xdf26, 0x3a, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73,\n0x75, 0x6e, 0x5f, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6c, 0x6f, 0x75,\n0x64, 0x3a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x73,\n0x75, 0x6e, 0x77, 0x68, 0x69, 0x74, 0x65, 0xd83c, 0xdf08, 0x3a, 0x72, 0x61,\n0x69, 0x6e, 0x62, 0x6f, 0x77, 0x3a, 0x72, 0x61, 0x69, 0x6e, 0x62, 0x6f,\n0x77, 0x2601, 0xfe0f, 0x3a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x63, 0x6c,\n0x6f, 0x75, 0x64, 0xd83c, 0xdf27, 0x3a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f,\n0x77, 0x69, 0x74, 0x68, 0x5f, 0x72, 0x61, 0x69, 0x6e, 0x3a, 0x63, 0x6c,\n0x6f, 0x75, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x77, 0x69, 0x74, 0x68, 0xd83c,\n0xdf27, 0x3a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x72, 0x61, 0x69, 0x6e,\n0x3a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x26c8, 0x3a,\n0x74, 0x68, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x6f, 0x75,\n0x64, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x61, 0x69, 0x6e, 0x3a, 0x61,\n0x6e, 0x64, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x74,\n0x68, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x26c8, 0x3a, 0x74, 0x68, 0x75, 0x6e,\n0x64, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x72, 0x61,\n0x69, 0x6e, 0x3a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x61, 0x69, 0x6e,\n0x74, 0x68, 0x75, 0x6e, 0x64, 0x65, 0x72, 0xd83c, 0xdf29, 0x3a, 0x63, 0x6c,\n0x6f, 0x75, 0x64, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6c, 0x69, 0x67,\n0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x63, 0x6c, 0x6f, 0x75, 0x64,\n0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x77, 0x69, 0x74,\n0x68, 0xd83c, 0xdf29, 0x3a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x6c, 0x69,\n0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x63, 0x6c, 0x6f, 0x75,\n0x64, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0xd83c, 0xdf28,\n0x3a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f,\n0x73, 0x6e, 0x6f, 0x77, 0x3a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x6e,\n0x6f, 0x77, 0x77, 0x69, 0x74, 0x68, 0xd83c, 0xdf28, 0x3a, 0x63, 0x6c, 0x6f,\n0x75, 0x64, 0x5f, 0x73, 0x6e, 0x6f, 0x77, 0x3a, 0x63, 0x6c, 0x6f, 0x75,\n0x64, 0x73, 0x6e, 0x6f, 0x77, 0x2603, 0xfe0f, 0x3a, 0x73, 0x6e, 0x6f, 0x77,\n0x6d, 0x61, 0x6e, 0x32, 0x3a, 0x73, 0x6e, 0x6f, 0x77, 0x6d, 0x61, 0x6e,\n0x32, 0x26c4, 0xfe0f, 0x3a, 0x73, 0x6e, 0x6f, 0x77, 0x6d, 0x61, 0x6e, 0x3a,\n0x73, 0x6e, 0x6f, 0x77, 0x6d, 0x61, 0x6e, 0x2744, 0xfe0f, 0x3a, 0x73, 0x6e,\n0x6f, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x3a, 0x73, 0x6e, 0x6f, 0x77,\n0x66, 0x6c, 0x61, 0x6b, 0x65, 0xd83c, 0xdf2c, 0x3a, 0x77, 0x69, 0x6e, 0x64,\n0x5f, 0x62, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63,\n0x65, 0x3a, 0x62, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x63,\n0x65, 0x77, 0x69, 0x6e, 0x64, 0xd83d, 0xdca8, 0x3a, 0x64, 0x61, 0x73, 0x68,\n0x3a, 0x64, 0x61, 0x73, 0x68, 0xd83c, 0xdf2a, 0x3a, 0x63, 0x6c, 0x6f, 0x75,\n0x64, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x72, 0x6e, 0x61,\n0x64, 0x6f, 0x3a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x6f, 0x72, 0x6e,\n0x61, 0x64, 0x6f, 0x77, 0x69, 0x74, 0x68, 0xd83c, 0xdf2a, 0x3a, 0x63, 0x6c,\n0x6f, 0x75, 0x64, 0x5f, 0x74, 0x6f, 0x72, 0x6e, 0x61, 0x64, 0x6f, 0x3a,\n0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x6f, 0x72, 0x6e, 0x61, 0x64, 0x6f,\n0xd83c, 0xdf2b, 0x3a, 0x66, 0x6f, 0x67, 0x3a, 0x66, 0x6f, 0x67, 0xd83c, 0xdf0a,\n0x3a, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x3a, 0x6f, 0x63, 0x65, 0x61, 0x6e,\n0xd83d, 0xdca7, 0x3a, 0x64, 0x72, 0x6f, 0x70, 0x6c, 0x65, 0x74, 0x3a, 0x64,\n0x72, 0x6f, 0x70, 0x6c, 0x65, 0x74, 0xd83d, 0xdca6, 0x3a, 0x73, 0x77, 0x65,\n0x61, 0x74, 0x5f, 0x64, 0x72, 0x6f, 0x70, 0x73, 0x3a, 0x64, 0x72, 0x6f,\n0x70, 0x73, 0x73, 0x77, 0x65, 0x61, 0x74, 0x2614, 0xfe0f, 0x3a, 0x75, 0x6d,\n0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x3a, 0x75, 0x6d, 0x62, 0x72, 0x65,\n0x6c, 0x6c, 0x61, 0xd83c, 0xdf4f, 0x3a, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x5f,\n0x61, 0x70, 0x70, 0x6c, 0x65, 0x3a, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x67,\n0x72, 0x65, 0x65, 0x6e, 0xd83c, 0xdf4e, 0x3a, 0x61, 0x70, 0x70, 0x6c, 0x65,\n0x3a, 0x61, 0x70, 0x70, 0x6c, 0x65, 0xd83c, 0xdf50, 0x3a, 0x70, 0x65, 0x61,\n0x72, 0x3a, 0x70, 0x65, 0x61, 0x72, 0xd83c, 0xdf4a, 0x3a, 0x74, 0x61, 0x6e,\n0x67, 0x65, 0x72, 0x69, 0x6e, 0x65, 0x3a, 0x74, 0x61, 0x6e, 0x67, 0x65,\n0x72, 0x69, 0x6e, 0x65, 0xd83c, 0xdf4b, 0x3a, 0x6c, 0x65, 0x6d, 0x6f, 0x6e,\n0x3a, 0x6c, 0x65, 0x6d, 0x6f, 0x6e, 0xd83c, 0xdf4c, 0x3a, 0x62, 0x61, 0x6e,\n0x61, 0x6e, 0x61, 0x3a, 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0xd83c, 0xdf49,\n0x3a, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x6c, 0x6f, 0x6e, 0x3a,\n0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x6c, 0x6f, 0x6e, 0xd83c, 0xdf47,\n0x3a, 0x67, 0x72, 0x61, 0x70, 0x65, 0x73, 0x3a, 0x67, 0x72, 0x61, 0x70,\n0x65, 0x73, 0xd83c, 0xdf53, 0x3a, 0x73, 0x74, 0x72, 0x61, 0x77, 0x62, 0x65,\n0x72, 0x72, 0x79, 0x3a, 0x73, 0x74, 0x72, 0x61, 0x77, 0x62, 0x65, 0x72,\n0x72, 0x79, 0xd83c, 0xdf48, 0x3a, 0x6d, 0x65, 0x6c, 0x6f, 0x6e, 0x3a, 0x6d,\n0x65, 0x6c, 0x6f, 0x6e, 0xd83c, 0xdf52, 0x3a, 0x63, 0x68, 0x65, 0x72, 0x72,\n0x69, 0x65, 0x73, 0x3a, 0x63, 0x68, 0x65, 0x72, 0x72, 0x69, 0x65, 0x73,\n0xd83c, 0xdf51, 0x3a, 0x70, 0x65, 0x61, 0x63, 0x68, 0x3a, 0x70, 0x65, 0x61,\n0x63, 0x68, 0xd83c, 0xdf4d, 0x3a, 0x70, 0x69, 0x6e, 0x65, 0x61, 0x70, 0x70,\n0x6c, 0x65, 0x3a, 0x70, 0x69, 0x6e, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65,\n0xd83e, 0xdd5d, 0x3a, 0x6b, 0x69, 0x77, 0x69, 0x66, 0x72, 0x75, 0x69, 0x74,\n0x3a, 0x6b, 0x69, 0x77, 0x69, 0x66, 0x72, 0x75, 0x69, 0x74, 0xd83e, 0xdd5d,\n0x3a, 0x6b, 0x69, 0x77, 0x69, 0x3a, 0x6b, 0x69, 0x77, 0x69, 0xd83e, 0xdd51,\n0x3a, 0x61, 0x76, 0x6f, 0x63, 0x61, 0x64, 0x6f, 0x3a, 0x61, 0x76, 0x6f,\n0x63, 0x61, 0x64, 0x6f, 0xd83c, 0xdf45, 0x3a, 0x74, 0x6f, 0x6d, 0x61, 0x74,\n0x6f, 0x3a, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x6f, 0xd83c, 0xdf46, 0x3a, 0x65,\n0x67, 0x67, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x3a, 0x65, 0x67, 0x67, 0x70,\n0x6c, 0x61, 0x6e, 0x74, 0xd83e, 0xdd52, 0x3a, 0x63, 0x75, 0x63, 0x75, 0x6d,\n0x62, 0x65, 0x72, 0x3a, 0x63, 0x75, 0x63, 0x75, 0x6d, 0x62, 0x65, 0x72,\n0xd83e, 0xdd55, 0x3a, 0x63, 0x61, 0x72, 0x72, 0x6f, 0x74, 0x3a, 0x63, 0x61,\n0x72, 0x72, 0x6f, 0x74, 0xd83c, 0xdf3d, 0x3a, 0x63, 0x6f, 0x72, 0x6e, 0x3a,\n0x63, 0x6f, 0x72, 0x6e, 0xd83c, 0xdf36, 0x3a, 0x68, 0x6f, 0x74, 0x5f, 0x70,\n0x65, 0x70, 0x70, 0x65, 0x72, 0x3a, 0x68, 0x6f, 0x74, 0x70, 0x65, 0x70,\n0x70, 0x65, 0x72, 0xd83e, 0xdd54, 0x3a, 0x70, 0x6f, 0x74, 0x61, 0x74, 0x6f,\n0x3a, 0x70, 0x6f, 0x74, 0x61, 0x74, 0x6f, 0xd83c, 0xdf60, 0x3a, 0x73, 0x77,\n0x65, 0x65, 0x74, 0x5f, 0x70, 0x6f, 0x74, 0x61, 0x74, 0x6f, 0x3a, 0x70,\n0x6f, 0x74, 0x61, 0x74, 0x6f, 0x73, 0x77, 0x65, 0x65, 0x74, 0xd83c, 0xdf30,\n0x3a, 0x63, 0x68, 0x65, 0x73, 0x74, 0x6e, 0x75, 0x74, 0x3a, 0x63, 0x68,\n0x65, 0x73, 0x74, 0x6e, 0x75, 0x74, 0xd83e, 0xdd5c, 0x3a, 0x73, 0x68, 0x65,\n0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x61, 0x6e, 0x75, 0x74, 0x3a,\n0x70, 0x65, 0x61, 0x6e, 0x75, 0x74, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x65,\n0x64, 0xd83e, 0xdd5c, 0x3a, 0x70, 0x65, 0x61, 0x6e, 0x75, 0x74, 0x73, 0x3a,\n0x70, 0x65, 0x61, 0x6e, 0x75, 0x74, 0x73, 0xd83c, 0xdf6f, 0x3a, 0x68, 0x6f,\n0x6e, 0x65, 0x79, 0x5f, 0x70, 0x6f, 0x74, 0x3a, 0x68, 0x6f, 0x6e, 0x65,\n0x79, 0x70, 0x6f, 0x74, 0xd83e, 0xdd50, 0x3a, 0x63, 0x72, 0x6f, 0x69, 0x73,\n0x73, 0x61, 0x6e, 0x74, 0x3a, 0x63, 0x72, 0x6f, 0x69, 0x73, 0x73, 0x61,\n0x6e, 0x74, 0xd83c, 0xdf5e, 0x3a, 0x62, 0x72, 0x65, 0x61, 0x64, 0x3a, 0x62,\n0x72, 0x65, 0x61, 0x64, 0xd83e, 0xdd56, 0x3a, 0x62, 0x61, 0x67, 0x75, 0x65,\n0x74, 0x74, 0x65, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x64, 0x3a, 0x62, 0x61,\n0x67, 0x75, 0x65, 0x74, 0x74, 0x65, 0x62, 0x72, 0x65, 0x61, 0x64, 0xd83e,\n0xdd56, 0x3a, 0x66, 0x72, 0x65, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x72, 0x65,\n0x61, 0x64, 0x3a, 0x62, 0x72, 0x65, 0x61, 0x64, 0x66, 0x72, 0x65, 0x6e,\n0x63, 0x68, 0xd83e, 0xddc0, 0x3a, 0x63, 0x68, 0x65, 0x65, 0x73, 0x65, 0x5f,\n0x77, 0x65, 0x64, 0x67, 0x65, 0x3a, 0x63, 0x68, 0x65, 0x65, 0x73, 0x65,\n0x77, 0x65, 0x64, 0x67, 0x65, 0xd83e, 0xddc0, 0x3a, 0x63, 0x68, 0x65, 0x65,\n0x73, 0x65, 0x3a, 0x63, 0x68, 0x65, 0x65, 0x73, 0x65, 0xd83e, 0xdd5a, 0x3a,\n0x65, 0x67, 0x67, 0x3a, 0x65, 0x67, 0x67, 0xd83c, 0xdf73, 0x3a, 0x63, 0x6f,\n0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,\n0x67, 0xd83e, 0xdd53, 0x3a, 0x62, 0x61, 0x63, 0x6f, 0x6e, 0x3a, 0x62, 0x61,\n0x63, 0x6f, 0x6e, 0xd83e, 0xdd5e, 0x3a, 0x70, 0x61, 0x6e, 0x63, 0x61, 0x6b,\n0x65, 0x73, 0x3a, 0x70, 0x61, 0x6e, 0x63, 0x61, 0x6b, 0x65, 0x73, 0xd83c,\n0xdf64, 0x3a, 0x66, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x68, 0x72, 0x69,\n0x6d, 0x70, 0x3a, 0x66, 0x72, 0x69, 0x65, 0x64, 0x73, 0x68, 0x72, 0x69,\n0x6d, 0x70, 0xd83c, 0xdf57, 0x3a, 0x70, 0x6f, 0x75, 0x6c, 0x74, 0x72, 0x79,\n0x5f, 0x6c, 0x65, 0x67, 0x3a, 0x6c, 0x65, 0x67, 0x70, 0x6f, 0x75, 0x6c,\n0x74, 0x72, 0x79, 0xd83c, 0xdf56, 0x3a, 0x6d, 0x65, 0x61, 0x74, 0x5f, 0x6f,\n0x6e, 0x5f, 0x62, 0x6f, 0x6e, 0x65, 0x3a, 0x62, 0x6f, 0x6e, 0x65, 0x6d,\n0x65, 0x61, 0x74, 0x6f, 0x6e, 0xd83c, 0xdf55, 0x3a, 0x70, 0x69, 0x7a, 0x7a,\n0x61, 0x3a, 0x70, 0x69, 0x7a, 0x7a, 0x61, 0xd83c, 0xdf2d, 0x3a, 0x68, 0x6f,\n0x74, 0x5f, 0x64, 0x6f, 0x67, 0x3a, 0x64, 0x6f, 0x67, 0x68, 0x6f, 0x74,\n0xd83c, 0xdf2d, 0x3a, 0x68, 0x6f, 0x74, 0x64, 0x6f, 0x67, 0x3a, 0x68, 0x6f,\n0x74, 0x64, 0x6f, 0x67, 0xd83c, 0xdf54, 0x3a, 0x68, 0x61, 0x6d, 0x62, 0x75,\n0x72, 0x67, 0x65, 0x72, 0x3a, 0x68, 0x61, 0x6d, 0x62, 0x75, 0x72, 0x67,\n0x65, 0x72, 0xd83c, 0xdf5f, 0x3a, 0x66, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x66,\n0x72, 0x69, 0x65, 0x73, 0xd83e, 0xdd59, 0x3a, 0x73, 0x74, 0x75, 0x66, 0x66,\n0x65, 0x64, 0x5f, 0x70, 0x69, 0x74, 0x61, 0x3a, 0x70, 0x69, 0x74, 0x61,\n0x73, 0x74, 0x75, 0x66, 0x66, 0x65, 0x64, 0xd83e, 0xdd59, 0x3a, 0x73, 0x74,\n0x75, 0x66, 0x66, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x61, 0x74, 0x62, 0x72,\n0x65, 0x61, 0x64, 0x3a, 0x66, 0x6c, 0x61, 0x74, 0x62, 0x72, 0x65, 0x61,\n0x64, 0x73, 0x74, 0x75, 0x66, 0x66, 0x65, 0x64, 0xd83c, 0xdf2e, 0x3a, 0x74,\n0x61, 0x63, 0x6f, 0x3a, 0x74, 0x61, 0x63, 0x6f, 0xd83c, 0xdf2f, 0x3a, 0x62,\n0x75, 0x72, 0x72, 0x69, 0x74, 0x6f, 0x3a, 0x62, 0x75, 0x72, 0x72, 0x69,\n0x74, 0x6f, 0xd83e, 0xdd57, 0x3a, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x5f, 0x73,\n0x61, 0x6c, 0x61, 0x64, 0x3a, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x61,\n0x6c, 0x61, 0x64, 0xd83e, 0xdd57, 0x3a, 0x73, 0x61, 0x6c, 0x61, 0x64, 0x3a,\n0x73, 0x61, 0x6c, 0x61, 0x64, 0xd83e, 0xdd58, 0x3a, 0x70, 0x61, 0x65, 0x6c,\n0x6c, 0x61, 0x3a, 0x70, 0x61, 0x65, 0x6c, 0x6c, 0x61, 0xd83e, 0xdd58, 0x3a,\n0x73, 0x68, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x6e, 0x5f,\n0x6f, 0x66, 0x5f, 0x66, 0x6f, 0x6f, 0x64, 0x3a, 0x66, 0x6f, 0x6f, 0x64,\n0x6f, 0x66, 0x70, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6c, 0x6c, 0x6f, 0x77,\n0xd83c, 0xdf5d, 0x3a, 0x73, 0x70, 0x61, 0x67, 0x68, 0x65, 0x74, 0x74, 0x69,\n0x3a, 0x73, 0x70, 0x61, 0x67, 0x68, 0x65, 0x74, 0x74, 0x69, 0xd83c, 0xdf5c,\n0x3a, 0x72, 0x61, 0x6d, 0x65, 0x6e, 0x3a, 0x72, 0x61, 0x6d, 0x65, 0x6e,\n0xd83c, 0xdf72, 0x3a, 0x73, 0x74, 0x65, 0x77, 0x3a, 0x73, 0x74, 0x65, 0x77,\n0xd83c, 0xdf65, 0x3a, 0x66, 0x69, 0x73, 0x68, 0x5f, 0x63, 0x61, 0x6b, 0x65,\n0x3a, 0x63, 0x61, 0x6b, 0x65, 0x66, 0x69, 0x73, 0x68, 0xd83c, 0xdf63, 0x3a,\n0x73, 0x75, 0x73, 0x68, 0x69, 0x3a, 0x73, 0x75, 0x73, 0x68, 0x69, 0xd83c,\n0xdf71, 0x3a, 0x62, 0x65, 0x6e, 0x74, 0x6f, 0x3a, 0x62, 0x65, 0x6e, 0x74,\n0x6f, 0xd83c, 0xdf5b, 0x3a, 0x63, 0x75, 0x72, 0x72, 0x79, 0x3a, 0x63, 0x75,\n0x72, 0x72, 0x79, 0xd83c, 0xdf59, 0x3a, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x62,\n0x61, 0x6c, 0x6c, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x72, 0x69, 0x63, 0x65,\n0xd83c, 0xdf5a, 0x3a, 0x72, 0x69, 0x63, 0x65, 0x3a, 0x72, 0x69, 0x63, 0x65,\n0xd83c, 0xdf58, 0x3a, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x72, 0x61, 0x63,\n0x6b, 0x65, 0x72, 0x3a, 0x63, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x72,\n0x69, 0x63, 0x65, 0xd83c, 0xdf62, 0x3a, 0x6f, 0x64, 0x65, 0x6e, 0x3a, 0x6f,\n0x64, 0x65, 0x6e, 0xd83c, 0xdf61, 0x3a, 0x64, 0x61, 0x6e, 0x67, 0x6f, 0x3a,\n0x64, 0x61, 0x6e, 0x67, 0x6f, 0xd83c, 0xdf67, 0x3a, 0x73, 0x68, 0x61, 0x76,\n0x65, 0x64, 0x5f, 0x69, 0x63, 0x65, 0x3a, 0x69, 0x63, 0x65, 0x73, 0x68,\n0x61, 0x76, 0x65, 0x64, 0xd83c, 0xdf68, 0x3a, 0x69, 0x63, 0x65, 0x5f, 0x63,\n0x72, 0x65, 0x61, 0x6d, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x63,\n0x65, 0xd83c, 0xdf66, 0x3a, 0x69, 0x63, 0x65, 0x63, 0x72, 0x65, 0x61, 0x6d,\n0x3a, 0x69, 0x63, 0x65, 0x63, 0x72, 0x65, 0x61, 0x6d, 0xd83c, 0xdf70, 0x3a,\n0x63, 0x61, 0x6b, 0x65, 0x3a, 0x63, 0x61, 0x6b, 0x65, 0xd83c, 0xdf82, 0x3a,\n0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x3a, 0x62, 0x69, 0x72,\n0x74, 0x68, 0x64, 0x61, 0x79, 0xd83c, 0xdf6e, 0x3a, 0x66, 0x6c, 0x61, 0x6e,\n0x3a, 0x66, 0x6c, 0x61, 0x6e, 0xd83c, 0xdf6e, 0x3a, 0x70, 0x75, 0x64, 0x64,\n0x69, 0x6e, 0x67, 0x3a, 0x70, 0x75, 0x64, 0x64, 0x69, 0x6e, 0x67, 0xd83c,\n0xdf6e, 0x3a, 0x63, 0x75, 0x73, 0x74, 0x61, 0x72, 0x64, 0x3a, 0x63, 0x75,\n0x73, 0x74, 0x61, 0x72, 0x64, 0xd83c, 0xdf6d, 0x3a, 0x6c, 0x6f, 0x6c, 0x6c,\n0x69, 0x70, 0x6f, 0x70, 0x3a, 0x6c, 0x6f, 0x6c, 0x6c, 0x69, 0x70, 0x6f,\n0x70, 0xd83c, 0xdf6c, 0x3a, 0x63, 0x61, 0x6e, 0x64, 0x79, 0x3a, 0x63, 0x61,\n0x6e, 0x64, 0x79, 0xd83c, 0xdf6b, 0x3a, 0x63, 0x68, 0x6f, 0x63, 0x6f, 0x6c,\n0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x72, 0x3a, 0x62, 0x61, 0x72, 0x63,\n0x68, 0x6f, 0x63, 0x6f, 0x6c, 0x61, 0x74, 0x65, 0xd83c, 0xdf7f, 0x3a, 0x70,\n0x6f, 0x70, 0x63, 0x6f, 0x72, 0x6e, 0x3a, 0x70, 0x6f, 0x70, 0x63, 0x6f,\n0x72, 0x6e, 0xd83c, 0xdf69, 0x3a, 0x64, 0x6f, 0x75, 0x67, 0x68, 0x6e, 0x75,\n0x74, 0x3a, 0x64, 0x6f, 0x75, 0x67, 0x68, 0x6e, 0x75, 0x74, 0xd83c, 0xdf6a,\n0x3a, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x3a, 0x63, 0x6f, 0x6f, 0x6b,\n0x69, 0x65, 0xd83e, 0xdd5b, 0x3a, 0x67, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6f,\n0x66, 0x5f, 0x6d, 0x69, 0x6c, 0x6b, 0x3a, 0x67, 0x6c, 0x61, 0x73, 0x73,\n0x6d, 0x69, 0x6c, 0x6b, 0x6f, 0x66, 0xd83e, 0xdd5b, 0x3a, 0x6d, 0x69, 0x6c,\n0x6b, 0x3a, 0x6d, 0x69, 0x6c, 0x6b, 0xd83c, 0xdf7c, 0x3a, 0x62, 0x61, 0x62,\n0x79, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x3a, 0x62, 0x61, 0x62,\n0x79, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x2615, 0xfe0f, 0x3a, 0x63, 0x6f,\n0x66, 0x66, 0x65, 0x65, 0x3a, 0x63, 0x6f, 0x66, 0x66, 0x65, 0x65, 0xd83c,\n0xdf75, 0x3a, 0x74, 0x65, 0x61, 0x3a, 0x74, 0x65, 0x61, 0xd83c, 0xdf76, 0x3a,\n0x73, 0x61, 0x6b, 0x65, 0x3a, 0x73, 0x61, 0x6b, 0x65, 0xd83c, 0xdf7a, 0x3a,\n0x62, 0x65, 0x65, 0x72, 0x3a, 0x62, 0x65, 0x65, 0x72, 0xd83c, 0xdf7b, 0x3a,\n0x62, 0x65, 0x65, 0x72, 0x73, 0x3a, 0x62, 0x65, 0x65, 0x72, 0x73, 0xd83e,\n0xdd42, 0x3a, 0x63, 0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x67,\n0x6c, 0x61, 0x73, 0x73, 0x3a, 0x63, 0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e,\n0x67, 0x67, 0x6c, 0x61, 0x73, 0x73, 0xd83e, 0xdd42, 0x3a, 0x63, 0x68, 0x61,\n0x6d, 0x70, 0x61, 0x67, 0x6e, 0x65, 0x5f, 0x67, 0x6c, 0x61, 0x73, 0x73,\n0x3a, 0x63, 0x68, 0x61, 0x6d, 0x70, 0x61, 0x67, 0x6e, 0x65, 0x67, 0x6c,\n0x61, 0x73, 0x73, 0xd83c, 0xdf77, 0x3a, 0x77, 0x69, 0x6e, 0x65, 0x5f, 0x67,\n0x6c, 0x61, 0x73, 0x73, 0x3a, 0x67, 0x6c, 0x61, 0x73, 0x73, 0x77, 0x69,\n0x6e, 0x65, 0xd83e, 0xdd43, 0x3a, 0x77, 0x68, 0x69, 0x73, 0x6b, 0x79, 0x3a,\n0x77, 0x68, 0x69, 0x73, 0x6b, 0x79, 0xd83e, 0xdd43, 0x3a, 0x74, 0x75, 0x6d,\n0x62, 0x6c, 0x65, 0x72, 0x5f, 0x67, 0x6c, 0x61, 0x73, 0x73, 0x3a, 0x67,\n0x6c, 0x61, 0x73, 0x73, 0x74, 0x75, 0x6d, 0x62, 0x6c, 0x65, 0x72, 0xd83c,\n0xdf78, 0x3a, 0x63, 0x6f, 0x63, 0x6b, 0x74, 0x61, 0x69, 0x6c, 0x3a, 0x63,\n0x6f, 0x63, 0x6b, 0x74, 0x61, 0x69, 0x6c, 0xd83c, 0xdf79, 0x3a, 0x74, 0x72,\n0x6f, 0x70, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x64, 0x72, 0x69, 0x6e, 0x6b,\n0x3a, 0x64, 0x72, 0x69, 0x6e, 0x6b, 0x74, 0x72, 0x6f, 0x70, 0x69, 0x63,\n0x61, 0x6c, 0xd83c, 0xdf7e, 0x3a, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x5f,\n0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67,\n0x5f, 0x63, 0x6f, 0x72, 0x6b, 0x3a, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65,\n0x63, 0x6f, 0x72, 0x6b, 0x70, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x77,\n0x69, 0x74, 0x68, 0xd83c, 0xdf7e, 0x3a, 0x63, 0x68, 0x61, 0x6d, 0x70, 0x61,\n0x67, 0x6e, 0x65, 0x3a, 0x63, 0x68, 0x61, 0x6d, 0x70, 0x61, 0x67, 0x6e,\n0x65, 0xd83e, 0xdd44, 0x3a, 0x73, 0x70, 0x6f, 0x6f, 0x6e, 0x3a, 0x73, 0x70,\n0x6f, 0x6f, 0x6e, 0xd83c, 0xdf74, 0x3a, 0x66, 0x6f, 0x72, 0x6b, 0x5f, 0x61,\n0x6e, 0x64, 0x5f, 0x6b, 0x6e, 0x69, 0x66, 0x65, 0x3a, 0x61, 0x6e, 0x64,\n0x66, 0x6f, 0x72, 0x6b, 0x6b, 0x6e, 0x69, 0x66, 0x65, 0xd83c, 0xdf7d, 0x3a,\n0x66, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x6b, 0x6e, 0x69,\n0x66, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x6c, 0x61, 0x74,\n0x65, 0x3a, 0x61, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6b, 0x6b, 0x6e, 0x69,\n0x66, 0x65, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x77, 0x69, 0x74, 0x68, 0xd83c,\n0xdf7d, 0x3a, 0x66, 0x6f, 0x72, 0x6b, 0x5f, 0x6b, 0x6e, 0x69, 0x66, 0x65,\n0x5f, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x3a, 0x66, 0x6f, 0x72, 0x6b, 0x6b,\n0x6e, 0x69, 0x66, 0x65, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x26bd, 0xfe0f, 0x3a,\n0x73, 0x6f, 0x63, 0x63, 0x65, 0x72, 0x3a, 0x73, 0x6f, 0x63, 0x63, 0x65,\n0x72, 0xd83c, 0xdfc0, 0x3a, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x62, 0x61,\n0x6c, 0x6c, 0x3a, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x62, 0x61, 0x6c,\n0x6c, 0xd83c, 0xdfc8, 0x3a, 0x66, 0x6f, 0x6f, 0x74, 0x62, 0x61, 0x6c, 0x6c,\n0x3a, 0x66, 0x6f, 0x6f, 0x74, 0x62, 0x61, 0x6c, 0x6c, 0x26be, 0xfe0f, 0x3a,\n0x62, 0x61, 0x73, 0x65, 0x62, 0x61, 0x6c, 0x6c, 0x3a, 0x62, 0x61, 0x73,\n0x65, 0x62, 0x61, 0x6c, 0x6c, 0xd83c, 0xdfbe, 0x3a, 0x74, 0x65, 0x6e, 0x6e,\n0x69, 0x73, 0x3a, 0x74, 0x65, 0x6e, 0x6e, 0x69, 0x73, 0xd83c, 0xdfd0, 0x3a,\n0x76, 0x6f, 0x6c, 0x6c, 0x65, 0x79, 0x62, 0x61, 0x6c, 0x6c, 0x3a, 0x76,\n0x6f, 0x6c, 0x6c, 0x65, 0x79, 0x62, 0x61, 0x6c, 0x6c, 0xd83c, 0xdfc9, 0x3a,\n0x72, 0x75, 0x67, 0x62, 0x79, 0x5f, 0x66, 0x6f, 0x6f, 0x74, 0x62, 0x61,\n0x6c, 0x6c, 0x3a, 0x66, 0x6f, 0x6f, 0x74, 0x62, 0x61, 0x6c, 0x6c, 0x72,\n0x75, 0x67, 0x62, 0x79, 0xd83c, 0xdfb1, 0x3a, 0x38, 0x62, 0x61, 0x6c, 0x6c,\n0x3a, 0x38, 0x62, 0x61, 0x6c, 0x6c, 0xd83c, 0xdfd3, 0x3a, 0x74, 0x61, 0x62,\n0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x6e, 0x69, 0x73, 0x3a, 0x74, 0x61,\n0x62, 0x6c, 0x65, 0x74, 0x65, 0x6e, 0x6e, 0x69, 0x73, 0xd83c, 0xdfd3, 0x3a,\n0x70, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6e, 0x67, 0x3a, 0x70, 0x69,\n0x6e, 0x67, 0x70, 0x6f, 0x6e, 0x67, 0xd83c, 0xdff8, 0x3a, 0x62, 0x61, 0x64,\n0x6d, 0x69, 0x6e, 0x74, 0x6f, 0x6e, 0x3a, 0x62, 0x61, 0x64, 0x6d, 0x69,\n0x6e, 0x74, 0x6f, 0x6e, 0xd83e, 0xdd45, 0x3a, 0x67, 0x6f, 0x61, 0x6c, 0x5f,\n0x6e, 0x65, 0x74, 0x3a, 0x67, 0x6f, 0x61, 0x6c, 0x6e, 0x65, 0x74, 0xd83e,\n0xdd45, 0x3a, 0x67, 0x6f, 0x61, 0x6c, 0x3a, 0x67, 0x6f, 0x61, 0x6c, 0xd83c,\n0xdfd2, 0x3a, 0x68, 0x6f, 0x63, 0x6b, 0x65, 0x79, 0x3a, 0x68, 0x6f, 0x63,\n0x6b, 0x65, 0x79, 0xd83c, 0xdfd1, 0x3a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f,\n0x68, 0x6f, 0x63, 0x6b, 0x65, 0x79, 0x3a, 0x66, 0x69, 0x65, 0x6c, 0x64,\n0x68, 0x6f, 0x63, 0x6b, 0x65, 0x79, 0xd83c, 0xdfcf, 0x3a, 0x63, 0x72, 0x69,\n0x63, 0x6b, 0x65, 0x74, 0x5f, 0x62, 0x61, 0x74, 0x5f, 0x62, 0x61, 0x6c,\n0x6c, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x74, 0x63, 0x72, 0x69,\n0x63, 0x6b, 0x65, 0x74, 0xd83c, 0xdfcf, 0x3a, 0x63, 0x72, 0x69, 0x63, 0x6b,\n0x65, 0x74, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x3a, 0x63, 0x72, 0x69, 0x63,\n0x6b, 0x65, 0x74, 0x67, 0x61, 0x6d, 0x65, 0x26f3, 0xfe0f, 0x3a, 0x67, 0x6f,\n0x6c, 0x66, 0x3a, 0x67, 0x6f, 0x6c, 0x66, 0xd83c, 0xdff9, 0x3a, 0x61, 0x72,\n0x63, 0x68, 0x65, 0x72, 0x79, 0x3a, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72,\n0x79, 0xd83c, 0xdff9, 0x3a, 0x62, 0x6f, 0x77, 0x5f, 0x61, 0x6e, 0x64, 0x5f,\n0x61, 0x72, 0x72, 0x6f, 0x77, 0x3a, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x72,\n0x6f, 0x77, 0x62, 0x6f, 0x77, 0xd83c, 0xdfa3, 0x3a, 0x66, 0x69, 0x73, 0x68,\n0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x65, 0x5f, 0x61, 0x6e, 0x64,\n0x5f, 0x66, 0x69, 0x73, 0x68, 0x3a, 0x61, 0x6e, 0x64, 0x66, 0x69, 0x73,\n0x68, 0x66, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6c, 0x65,\n0xd83e, 0xdd4a, 0x3a, 0x62, 0x6f, 0x78, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x6c,\n0x6f, 0x76, 0x65, 0x73, 0x3a, 0x62, 0x6f, 0x78, 0x69, 0x6e, 0x67, 0x67,\n0x6c, 0x6f, 0x76, 0x65, 0x73, 0xd83e, 0xdd4a, 0x3a, 0x62, 0x6f, 0x78, 0x69,\n0x6e, 0x67, 0x5f, 0x67, 0x6c, 0x6f, 0x76, 0x65, 0x3a, 0x62, 0x6f, 0x78,\n0x69, 0x6e, 0x67, 0x67, 0x6c, 0x6f, 0x76, 0x65, 0xd83e, 0xdd4b, 0x3a, 0x6b,\n0x61, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72,\n0x6d, 0x3a, 0x6b, 0x61, 0x72, 0x61, 0x74, 0x65, 0x75, 0x6e, 0x69, 0x66,\n0x6f, 0x72, 0x6d, 0xd83e, 0xdd4b, 0x3a, 0x6d, 0x61, 0x72, 0x74, 0x69, 0x61,\n0x6c, 0x5f, 0x61, 0x72, 0x74, 0x73, 0x5f, 0x75, 0x6e, 0x69, 0x66, 0x6f,\n0x72, 0x6d, 0x3a, 0x61, 0x72, 0x74, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x69,\n0x61, 0x6c, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26f8, 0x3a, 0x69,\n0x63, 0x65, 0x5f, 0x73, 0x6b, 0x61, 0x74, 0x65, 0x3a, 0x69, 0x63, 0x65,\n0x73, 0x6b, 0x61, 0x74, 0x65, 0xd83c, 0xdfbf, 0x3a, 0x73, 0x6b, 0x69, 0x3a,\n0x73, 0x6b, 0x69, 0x26f7, 0x3a, 0x73, 0x6b, 0x69, 0x65, 0x72, 0x3a, 0x73,\n0x6b, 0x69, 0x65, 0x72, 0xd83c, 0xdfc2, 0x3a, 0x73, 0x6e, 0x6f, 0x77, 0x62,\n0x6f, 0x61, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x73, 0x6e, 0x6f, 0x77, 0x62,\n0x6f, 0x61, 0x72, 0x64, 0x65, 0x72, 0xd83c, 0xdfcb, 0xfe0f, 0x200d, 0x2640, 0xfe0f,\n0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x6c, 0x69, 0x66, 0x74, 0x69,\n0x6e, 0x67, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x3a, 0x6c,\n0x69, 0x66, 0x74, 0x69, 0x6e, 0x67, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74,\n0x73, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83c, 0xdfcb, 0xfe0f, 0x3a, 0x6d, 0x61,\n0x6e, 0x5f, 0x6c, 0x69, 0x66, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x65,\n0x69, 0x67, 0x68, 0x74, 0x73, 0x3a, 0x6c, 0x69, 0x66, 0x74, 0x69, 0x6e,\n0x67, 0x6d, 0x61, 0x6e, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0xd83c,\n0xdfcb, 0xfe0f, 0x3a, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x6c, 0x69,\n0x66, 0x74, 0x65, 0x72, 0x3a, 0x6c, 0x69, 0x66, 0x74, 0x65, 0x72, 0x77,\n0x65, 0x69, 0x67, 0x68, 0x74, 0xd83c, 0xdfcb, 0xfe0f, 0x3a, 0x6c, 0x69, 0x66,\n0x74, 0x65, 0x72, 0x3a, 0x6c, 0x69, 0x66, 0x74, 0x65, 0x72, 0xd83c, 0xdfcb,\n0xfe0f, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x66,\n0x74, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73,\n0x3a, 0x6c, 0x69, 0x66, 0x74, 0x69, 0x6e, 0x67, 0x70, 0x65, 0x72, 0x73,\n0x6f, 0x6e, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0xd83e, 0xdd3a, 0x3a,\n0x66, 0x65, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x3a, 0x66, 0x65, 0x6e, 0x63,\n0x69, 0x6e, 0x67, 0xd83e, 0xdd3a, 0x3a, 0x66, 0x65, 0x6e, 0x63, 0x65, 0x72,\n0x3a, 0x66, 0x65, 0x6e, 0x63, 0x65, 0x72, 0xd83e, 0xdd3a, 0x3a, 0x70, 0x65,\n0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x65, 0x6e, 0x63, 0x69, 0x6e, 0x67,\n0x3a, 0x66, 0x65, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x70, 0x65, 0x72, 0x73,\n0x6f, 0x6e, 0xd83e, 0xdd3c, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x65,\n0x6e, 0x5f, 0x77, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0x3a,\n0x77, 0x6f, 0x6d, 0x65, 0x6e, 0x77, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x69,\n0x6e, 0x67, 0xd83e, 0xdd3c, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x6d, 0x65, 0x6e, 0x5f,\n0x77, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0x3a, 0x6d, 0x65,\n0x6e, 0x77, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0xd83e, 0xdd3c,\n0x200d, 0x2642, 0xfe0f, 0x3a, 0x77, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x69, 0x6e,\n0x67, 0x3a, 0x77, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0xd83e,\n0xdd3c, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x77, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x65,\n0x72, 0x73, 0x3a, 0x77, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x65, 0x72, 0x73,\n0xd83e, 0xdd3c, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65,\n0x5f, 0x77, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0x3a, 0x70,\n0x65, 0x6f, 0x70, 0x6c, 0x65, 0x77, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x69,\n0x6e, 0x67, 0xd83e, 0xdd38, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0x5f, 0x63, 0x61, 0x72, 0x74, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x69,\n0x6e, 0x67, 0x3a, 0x63, 0x61, 0x72, 0x74, 0x77, 0x68, 0x65, 0x65, 0x6c,\n0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83e, 0xdd38, 0x200d, 0x2642,\n0xfe0f, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x63, 0x61, 0x72, 0x74, 0x77, 0x68,\n0x65, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x3a, 0x63, 0x61, 0x72, 0x74, 0x77,\n0x68, 0x65, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0xd83e, 0xdd38,\n0x200d, 0x2642, 0xfe0f, 0x3a, 0x63, 0x61, 0x72, 0x74, 0x77, 0x68, 0x65, 0x65,\n0x6c, 0x3a, 0x63, 0x61, 0x72, 0x74, 0x77, 0x68, 0x65, 0x65, 0x6c, 0xd83e,\n0xdd38, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f,\n0x64, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x61, 0x72, 0x74, 0x77, 0x68,\n0x65, 0x65, 0x6c, 0x3a, 0x63, 0x61, 0x72, 0x74, 0x77, 0x68, 0x65, 0x65,\n0x6c, 0x64, 0x6f, 0x69, 0x6e, 0x67, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,\n0x26f9, 0xfe0f, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f,\n0x62, 0x6f, 0x75, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x6c,\n0x6c, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x62, 0x6f, 0x75, 0x6e, 0x63, 0x69,\n0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x26f9, 0xfe0f, 0x3a, 0x6d, 0x61,\n0x6e, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x62,\n0x61, 0x6c, 0x6c, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x62, 0x6f, 0x75, 0x6e,\n0x63, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0x26f9, 0xfe0f, 0x3a, 0x70, 0x65,\n0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x62, 0x61,\n0x6c, 0x6c, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x70, 0x65, 0x72, 0x73, 0x6f,\n0x6e, 0x77, 0x69, 0x74, 0x68, 0x26f9, 0xfe0f, 0x3a, 0x62, 0x61, 0x73, 0x6b,\n0x65, 0x74, 0x62, 0x61, 0x6c, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x65,\n0x72, 0x3a, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x62, 0x61, 0x6c, 0x6c,\n0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x26f9, 0xfe0f, 0x3a, 0x70, 0x65, 0x72,\n0x73, 0x6f, 0x6e, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x63, 0x69, 0x6e, 0x67,\n0x5f, 0x62, 0x61, 0x6c, 0x6c, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x62, 0x6f,\n0x75, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,\n0xd83e, 0xdd3e, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f,\n0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x6e, 0x64,\n0x62, 0x61, 0x6c, 0x6c, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x62, 0x61, 0x6c,\n0x6c, 0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61,\n0x6e, 0xd83e, 0xdd3e, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x62,\n0x61, 0x6c, 0x6c, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x62, 0x61, 0x6c, 0x6c,\n0xd83e, 0xdd3e, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,\n0x5f, 0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x6e,\n0x64, 0x62, 0x61, 0x6c, 0x6c, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x62, 0x61,\n0x6c, 0x6c, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x70, 0x6c, 0x61, 0x79,\n0x69, 0x6e, 0x67, 0xd83e, 0xdd3e, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x6d, 0x61, 0x6e,\n0x5f, 0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x6e,\n0x64, 0x62, 0x61, 0x6c, 0x6c, 0x3a, 0x68, 0x61, 0x6e, 0x64, 0x62, 0x61,\n0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67,\n0xd83c, 0xdfcc, 0xfe0f, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e,\n0x5f, 0x67, 0x6f, 0x6c, 0x66, 0x69, 0x6e, 0x67, 0x3a, 0x67, 0x6f, 0x6c,\n0x66, 0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83c, 0xdfcc, 0xfe0f,\n0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x67, 0x6f, 0x6c, 0x66, 0x69, 0x6e, 0x67,\n0x3a, 0x67, 0x6f, 0x6c, 0x66, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x6e, 0xd83c,\n0xdfcc, 0xfe0f, 0x3a, 0x67, 0x6f, 0x6c, 0x66, 0x65, 0x72, 0x3a, 0x67, 0x6f,\n0x6c, 0x66, 0x65, 0x72, 0xd83c, 0xdfcc, 0xfe0f, 0x3a, 0x70, 0x65, 0x72, 0x73,\n0x6f, 0x6e, 0x5f, 0x67, 0x6f, 0x6c, 0x66, 0x69, 0x6e, 0x67, 0x3a, 0x67,\n0x6f, 0x6c, 0x66, 0x69, 0x6e, 0x67, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,\n0xd83c, 0xdfc4, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f,\n0x73, 0x75, 0x72, 0x66, 0x69, 0x6e, 0x67, 0x3a, 0x73, 0x75, 0x72, 0x66,\n0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83c, 0xdfc4, 0x3a, 0x6d,\n0x61, 0x6e, 0x5f, 0x73, 0x75, 0x72, 0x66, 0x69, 0x6e, 0x67, 0x3a, 0x6d,\n0x61, 0x6e, 0x73, 0x75, 0x72, 0x66, 0x69, 0x6e, 0x67, 0xd83c, 0xdfc4, 0x3a,\n0x73, 0x75, 0x72, 0x66, 0x65, 0x72, 0x3a, 0x73, 0x75, 0x72, 0x66, 0x65,\n0x72, 0xd83c, 0xdfc4, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x73,\n0x75, 0x72, 0x66, 0x69, 0x6e, 0x67, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f,\n0x6e, 0x73, 0x75, 0x72, 0x66, 0x69, 0x6e, 0x67, 0xd83c, 0xdfca, 0x200d, 0x2640,\n0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x73, 0x77, 0x69, 0x6d,\n0x6d, 0x69, 0x6e, 0x67, 0x3a, 0x73, 0x77, 0x69, 0x6d, 0x6d, 0x69, 0x6e,\n0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83c, 0xdfca, 0x3a, 0x6d, 0x61, 0x6e,\n0x5f, 0x73, 0x77, 0x69, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x3a, 0x6d, 0x61,\n0x6e, 0x73, 0x77, 0x69, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0xd83c, 0xdfca, 0x3a,\n0x73, 0x77, 0x69, 0x6d, 0x6d, 0x65, 0x72, 0x3a, 0x73, 0x77, 0x69, 0x6d,\n0x6d, 0x65, 0x72, 0xd83c, 0xdfca, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,\n0x5f, 0x73, 0x77, 0x69, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x3a, 0x70, 0x65,\n0x72, 0x73, 0x6f, 0x6e, 0x73, 0x77, 0x69, 0x6d, 0x6d, 0x69, 0x6e, 0x67,\n0xd83e, 0xdd3d, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f,\n0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x61, 0x74, 0x65,\n0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x6f, 0x3a, 0x70, 0x6c, 0x61, 0x79, 0x69,\n0x6e, 0x67, 0x70, 0x6f, 0x6c, 0x6f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0xd83e, 0xdd3d, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x6d, 0x61,\n0x6e, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x61,\n0x74, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x6f, 0x3a, 0x6d, 0x61, 0x6e,\n0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6c, 0x6f, 0x77,\n0x61, 0x74, 0x65, 0x72, 0xd83e, 0xdd3d, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x77, 0x61,\n0x74, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x6f, 0x3a, 0x70, 0x6f, 0x6c,\n0x6f, 0x77, 0x61, 0x74, 0x65, 0x72, 0xd83e, 0xdd3d, 0x200d, 0x2642, 0xfe0f, 0x3a,\n0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x69,\n0x6e, 0x67, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6c,\n0x6f, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x70, 0x6c, 0x61, 0x79,\n0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6c, 0x6f, 0x77, 0x61, 0x74, 0x65, 0x72,\n0xd83d, 0xdea3, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f,\n0x72, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x61, 0x74, 0x3a,\n0x62, 0x6f, 0x61, 0x74, 0x72, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x77, 0x6f,\n0x6d, 0x61, 0x6e, 0xd83d, 0xdea3, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x72, 0x6f,\n0x77, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x61, 0x74, 0x3a, 0x62, 0x6f,\n0x61, 0x74, 0x6d, 0x61, 0x6e, 0x72, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0xd83d,\n0xdea3, 0x3a, 0x72, 0x6f, 0x77, 0x62, 0x6f, 0x61, 0x74, 0x3a, 0x72, 0x6f,\n0x77, 0x62, 0x6f, 0x61, 0x74, 0xd83d, 0xdea3, 0x3a, 0x70, 0x65, 0x72, 0x73,\n0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f,\n0x61, 0x74, 0x3a, 0x62, 0x6f, 0x61, 0x74, 0x70, 0x65, 0x72, 0x73, 0x6f,\n0x6e, 0x72, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0xd83c, 0xdfc7, 0x3a, 0x68, 0x6f,\n0x72, 0x73, 0x65, 0x5f, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x3a, 0x68,\n0x6f, 0x72, 0x73, 0x65, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0xd83d, 0xdeb4,\n0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x62, 0x69,\n0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x62, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x77,\n0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdeb4, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x62,\n0x69, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x62, 0x69, 0x6b, 0x69, 0x6e, 0x67,\n0x6d, 0x61, 0x6e, 0xd83d, 0xdeb4, 0x3a, 0x62, 0x69, 0x63, 0x79, 0x63, 0x6c,\n0x69, 0x73, 0x74, 0x3a, 0x62, 0x69, 0x63, 0x79, 0x63, 0x6c, 0x69, 0x73,\n0x74, 0xd83d, 0xdeb4, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x62,\n0x69, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x62, 0x69, 0x6b, 0x69, 0x6e, 0x67,\n0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd83d, 0xdeb5, 0x200d, 0x2640, 0xfe0f, 0x3a,\n0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61,\n0x69, 0x6e, 0x5f, 0x62, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x62, 0x69,\n0x6b, 0x69, 0x6e, 0x67, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e,\n0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83d, 0xdeb5, 0x3a, 0x6d, 0x61, 0x6e, 0x5f,\n0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x62, 0x69, 0x6b,\n0x69, 0x6e, 0x67, 0x3a, 0x62, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x6d, 0x61,\n0x6e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0xd83d, 0xdeb5, 0x3a,\n0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x62, 0x69, 0x63,\n0x79, 0x63, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x62, 0x69, 0x63, 0x79, 0x63,\n0x6c, 0x69, 0x73, 0x74, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e,\n0xd83d, 0xdeb5, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f,\n0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x62, 0x69, 0x6b, 0x69, 0x6e,\n0x67, 0x3a, 0x62, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x6d, 0x6f, 0x75, 0x6e,\n0x74, 0x61, 0x69, 0x6e, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd83c, 0xdfbd,\n0x3a, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x69,\n0x72, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x73, 0x61, 0x73, 0x68,\n0x3a, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x61, 0x73, 0x68,\n0x73, 0x68, 0x69, 0x72, 0x74, 0x77, 0x69, 0x74, 0x68, 0xd83c, 0xdfc5, 0x3a,\n0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x6d, 0x65, 0x64, 0x61, 0x6c,\n0x3a, 0x6d, 0x65, 0x64, 0x61, 0x6c, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73,\n0xd83c, 0xdfc5, 0x3a, 0x6d, 0x65, 0x64, 0x61, 0x6c, 0x3a, 0x6d, 0x65, 0x64,\n0x61, 0x6c, 0xd83c, 0xdf96, 0x3a, 0x6d, 0x69, 0x6c, 0x69, 0x74, 0x61, 0x72,\n0x79, 0x5f, 0x6d, 0x65, 0x64, 0x61, 0x6c, 0x3a, 0x6d, 0x65, 0x64, 0x61,\n0x6c, 0x6d, 0x69, 0x6c, 0x69, 0x74, 0x61, 0x72, 0x79, 0xd83e, 0xdd47, 0x3a,\n0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f,\n0x6d, 0x65, 0x64, 0x61, 0x6c, 0x3a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6d,\n0x65, 0x64, 0x61, 0x6c, 0x70, 0x6c, 0x61, 0x63, 0x65, 0xd83e, 0xdd47, 0x3a,\n0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x3a,\n0x66, 0x69, 0x72, 0x73, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0xd83e, 0xdd48,\n0x3a, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x63,\n0x65, 0x5f, 0x6d, 0x65, 0x64, 0x61, 0x6c, 0x3a, 0x6d, 0x65, 0x64, 0x61,\n0x6c, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64,\n0xd83e, 0xdd48, 0x3a, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x70, 0x6c,\n0x61, 0x63, 0x65, 0x3a, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x65, 0x63,\n0x6f, 0x6e, 0x64, 0xd83e, 0xdd49, 0x3a, 0x74, 0x68, 0x69, 0x72, 0x64, 0x5f,\n0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x64, 0x61, 0x6c, 0x3a,\n0x6d, 0x65, 0x64, 0x61, 0x6c, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x74, 0x68,\n0x69, 0x72, 0x64, 0xd83e, 0xdd49, 0x3a, 0x74, 0x68, 0x69, 0x72, 0x64, 0x5f,\n0x70, 0x6c, 0x61, 0x63, 0x65, 0x3a, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x74,\n0x68, 0x69, 0x72, 0x64, 0xd83c, 0xdfc6, 0x3a, 0x74, 0x72, 0x6f, 0x70, 0x68,\n0x79, 0x3a, 0x74, 0x72, 0x6f, 0x70, 0x68, 0x79, 0xd83c, 0xdff5, 0x3a, 0x72,\n0x6f, 0x73, 0x65, 0x74, 0x74, 0x65, 0x3a, 0x72, 0x6f, 0x73, 0x65, 0x74,\n0x74, 0x65, 0xd83c, 0xdf97, 0x3a, 0x72, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65,\n0x72, 0x5f, 0x72, 0x69, 0x62, 0x62, 0x6f, 0x6e, 0x3a, 0x72, 0x65, 0x6d,\n0x69, 0x6e, 0x64, 0x65, 0x72, 0x72, 0x69, 0x62, 0x62, 0x6f, 0x6e, 0xd83c,\n0xdfab, 0x3a, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x3a, 0x74, 0x69, 0x63,\n0x6b, 0x65, 0x74, 0xd83c, 0xdf9f, 0x3a, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73,\n0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x3a,\n0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x74, 0x69, 0x63,\n0x6b, 0x65, 0x74, 0x73, 0xd83c, 0xdf9f, 0x3a, 0x74, 0x69, 0x63, 0x6b, 0x65,\n0x74, 0x73, 0x3a, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0xd83c, 0xdfaa,\n0x3a, 0x63, 0x69, 0x72, 0x63, 0x75, 0x73, 0x5f, 0x74, 0x65, 0x6e, 0x74,\n0x3a, 0x63, 0x69, 0x72, 0x63, 0x75, 0x73, 0x74, 0x65, 0x6e, 0x74, 0xd83e,\n0xdd39, 0x200d, 0x2640, 0xfe0f, 0x3a, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x5f, 0x6a,\n0x75, 0x67, 0x67, 0x6c, 0x69, 0x6e, 0x67, 0x3a, 0x6a, 0x75, 0x67, 0x67,\n0x6c, 0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0xd83e, 0xdd39, 0x200d,\n0x2642, 0xfe0f, 0x3a, 0x6d, 0x61, 0x6e, 0x5f, 0x6a, 0x75, 0x67, 0x67, 0x6c,\n0x69, 0x6e, 0x67, 0x3a, 0x6a, 0x75, 0x67, 0x67, 0x6c, 0x69, 0x6e, 0x67,\n0x6d, 0x61, 0x6e, 0xd83e, 0xdd39, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x6a, 0x75, 0x67,\n0x67, 0x6c, 0x65, 0x72, 0x3a, 0x6a, 0x75, 0x67, 0x67, 0x6c, 0x65, 0x72,\n0xd83e, 0xdd39, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x6a, 0x75, 0x67, 0x67, 0x6c, 0x69,\n0x6e, 0x67, 0x3a, 0x6a, 0x75, 0x67, 0x67, 0x6c, 0x69, 0x6e, 0x67, 0xd83e,\n0xdd39, 0x200d, 0x2642, 0xfe0f, 0x3a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f,\n0x6a, 0x75, 0x67, 0x67, 0x6c, 0x69, 0x6e, 0x67, 0x3a, 0x6a, 0x75, 0x67,\n0x67, 0x6c, 0x69, 0x6e, 0x67, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd83c,\n0xdfad, 0x3a, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x6e, 0x67,\n0x5f, 0x61, 0x72, 0x74, 0x73, 0x3a, 0x61, 0x72, 0x74, 0x73, 0x70, 0x65,\n0x72, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0xd83c, 0xdfa8, 0x3a, 0x61,\n0x72, 0x74, 0x3a, 0x61, 0x72, 0x74, 0xd83c, 0xdfac, 0x3a, 0x63, 0x6c, 0x61,\n0x70, 0x70, 0x65, 0x72, 0x3a, 0x63, 0x6c, 0x61, 0x70, 0x70, 0x65, 0x72,\n0xd83c, 0xdfa4, 0x3a, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x70, 0x68, 0x6f, 0x6e,\n0x65, 0x3a, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x70, 0x68, 0x6f, 0x6e, 0x65,\n0xd83c, 0xdfa7, 0x3a, 0x68, 0x65, 0x61, 0x64, 0x70, 0x68, 0x6f, 0x6e, 0x65,\n0x73, 0x3a, 0x68, 0x65, 0x61, 0x64, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x73,\n0xd83c, 0xdfbc, 0x3a, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x73,\n0x63, 0x6f, 0x72, 0x65, 0x3a, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x61, 0x6c,\n0x73, 0x63, 0x6f, 0x72, 0x65, 0xd83c, 0xdfb9, 0x3a, 0x6d, 0x75, 0x73, 0x69,\n0x63, 0x61, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64,\n0x3a, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x6d, 0x75, 0x73,\n0x69, 0x63, 0x61, 0x6c, 0xd83e, 0xdd41, 0x3a, 0x64, 0x72, 0x75, 0x6d, 0x5f,\n0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, 0x72, 0x75, 0x6d, 0x73, 0x74, 0x69,\n0x63, 0x6b, 0x73, 0x3a, 0x64, 0x72, 0x75, 0x6d, 0x64, 0x72, 0x75, 0x6d,\n0x73, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x77, 0x69, 0x74, 0x68, 0xd83e, 0xdd41,\n0x3a, 0x64, 0x72, 0x75, 0x6d, 0x3a, 0x64, 0x72, 0x75, 0x6d, 0xd83c, 0xdfb7,\n0x3a, 0x73, 0x61, 0x78, 0x6f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x3a, 0x73,\n0x61, 0x78, 0x6f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0xd83c, 0xdfba, 0x3a, 0x74,\n0x72, 0x75, 0x6d, 0x70, 0x65, 0x74, 0x3a, 0x74, 0x72, 0x75, 0x6d, 0x70,\n0x65, 0x74, 0xd83c, 0xdfb8, 0x3a, 0x67, 0x75, 0x69, 0x74, 0x61, 0x72, 0x3a,\n0x67, 0x75, 0x69, 0x74, 0x61, 0x72, 0xd83c, 0xdfbb, 0x3a, 0x76, 0x69, 0x6f,\n0x6c, 0x69, 0x6e, 0x3a, 0x76, 0x69, 0x6f, 0x6c, 0x69, 0x6e, 0xd83c, 0xdfb2,\n0x3a, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x65, 0x3a, 0x64, 0x69,\n0x65, 0x67, 0x61, 0x6d, 0x65, 0xd83c, 0xdfaf, 0x3a, 0x64, 0x61, 0x72, 0x74,\n0x3a, 0x64, 0x61, 0x72, 0x74, 0xd83c, 0xdfb3, 0x3a, 0x62, 0x6f, 0x77, 0x6c,\n0x69, 0x6e, 0x67, 0x3a, 0x62, 0x6f, 0x77, 0x6c, 0x69, 0x6e, 0x67, 0xd83c,\n0xdfae, 0x3a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x67, 0x61, 0x6d, 0x65,\n0x3a, 0x67, 0x61, 0x6d, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6f, 0xd83c, 0xdfb0,\n0x3a, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e,\n0x65, 0x3a, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x6c, 0x6f,\n0x74, 0xd83d, 0xde97, 0x3a, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x72, 0x3a,\n0x63, 0x61, 0x72, 0x72, 0x65, 0x64, 0xd83d, 0xde95, 0x3a, 0x74, 0x61, 0x78,\n0x69, 0x3a, 0x74, 0x61, 0x78, 0x69, 0xd83d, 0xde99, 0x3a, 0x62, 0x6c, 0x75,\n0x65, 0x5f, 0x63, 0x61, 0x72, 0x3a, 0x62, 0x6c, 0x75, 0x65, 0x63, 0x61,\n0x72, 0xd83d, 0xde8c, 0x3a, 0x62, 0x75, 0x73, 0x3a, 0x62, 0x75, 0x73, 0xd83d,\n0xde8e, 0x3a, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x79, 0x62, 0x75, 0x73,\n0x3a, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x79, 0x62, 0x75, 0x73, 0xd83c,\n0xdfce, 0x3a, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x61, 0x72,\n0x3a, 0x63, 0x61, 0x72, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0xd83c, 0xdfce,\n0x3a, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x61, 0x72, 0x3a, 0x63, 0x61,\n0x72, 0x72, 0x61, 0x63, 0x65, 0xd83d, 0xde93, 0x3a, 0x70, 0x6f, 0x6c, 0x69,\n0x63, 0x65, 0x5f, 0x63, 0x61, 0x72, 0x3a, 0x63, 0x61, 0x72, 0x70, 0x6f,\n0x6c, 0x69, 0x63, 0x65, 0xd83d, 0xde91, 0x3a, 0x61, 0x6d, 0x62, 0x75, 0x6c,\n0x61, 0x6e, 0x63, 0x65, 0x3a, 0x61, 0x6d, 0x62, 0x75, 0x6c, 0x61, 0x6e,\n0x63, 0x65, 0xd83d, 0xde92, 0x3a, 0x66, 0x69, 0x72, 0x65, 0x5f, 0x65, 0x6e,\n0x67, 0x69, 0x6e, 0x65, 0x3a, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x66,\n0x69, 0x72, 0x65, 0xd83d, 0xde90, 0x3a, 0x6d, 0x69, 0x6e, 0x69, 0x62, 0x75,\n0x73, 0x3a, 0x6d, 0x69, 0x6e, 0x69, 0x62, 0x75, 0x73, 0xd83d, 0xde9a, 0x3a,\n0x74, 0x72, 0x75, 0x63, 0x6b, 0x3a, 0x74, 0x72, 0x75, 0x63, 0x6b, 0xd83d,\n0xde9b, 0x3a, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65,\n0x64, 0x5f, 0x6c, 0x6f, 0x72, 0x72, 0x79, 0x3a, 0x61, 0x72, 0x74, 0x69,\n0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x6c, 0x6f, 0x72, 0x72, 0x79,\n0xd83d, 0xde9c, 0x3a, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x3a, 0x74,\n0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0xd83d, 0xdef4, 0x3a, 0x73, 0x63, 0x6f,\n0x6f, 0x74, 0x65, 0x72, 0x3a, 0x73, 0x63, 0x6f, 0x6f, 0x74, 0x65, 0x72,\n0xd83d, 0xdeb2, 0x3a, 0x62, 0x69, 0x6b, 0x65, 0x3a, 0x62, 0x69, 0x6b, 0x65,\n0xd83d, 0xdef5, 0x3a, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x62, 0x69, 0x6b, 0x65,\n0x3a, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x62, 0x69, 0x6b, 0x65, 0xd83d, 0xdef5,\n0x3a, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x6f, 0x6f, 0x74,\n0x65, 0x72, 0x3a, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x73, 0x63, 0x6f, 0x6f,\n0x74, 0x65, 0x72, 0xd83c, 0xdfcd, 0x3a, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67,\n0x5f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x3a,\n0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x72, 0x61,\n0x63, 0x69, 0x6e, 0x67, 0xd83c, 0xdfcd, 0x3a, 0x6d, 0x6f, 0x74, 0x6f, 0x72,\n0x63, 0x79, 0x63, 0x6c, 0x65, 0x3a, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x63,\n0x79, 0x63, 0x6c, 0x65, 0xd83d, 0xdea8, 0x3a, 0x72, 0x6f, 0x74, 0x61, 0x74,\n0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x6c, 0x69,\n0x67, 0x68, 0x74, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6e, 0x67, 0xd83d,\n0xde94, 0x3a, 0x6f, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x70,\n0x6f, 0x6c, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x61, 0x72, 0x3a, 0x63, 0x61,\n0x72, 0x6f, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6c,\n0x69, 0x63, 0x65, 0xd83d, 0xde8d, 0x3a, 0x6f, 0x6e, 0x63, 0x6f, 0x6d, 0x69,\n0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x3a, 0x62, 0x75, 0x73, 0x6f, 0x6e,\n0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0xd83d, 0xde98, 0x3a, 0x6f, 0x6e, 0x63,\n0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6f,\n0x62, 0x69, 0x6c, 0x65, 0x3a, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6f, 0x62,\n0x69, 0x6c, 0x65, 0x6f, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0xd83d,\n0xde96, 0x3a, 0x6f, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x74,\n0x61, 0x78, 0x69, 0x3a, 0x6f, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67,\n0x74, 0x61, 0x78, 0x69, 0xd83d, 0xdea1, 0x3a, 0x61, 0x65, 0x72, 0x69, 0x61,\n0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6d, 0x77, 0x61, 0x79, 0x3a, 0x61, 0x65,\n0x72, 0x69, 0x61, 0x6c, 0x74, 0x72, 0x61, 0x6d, 0x77, 0x61, 0x79, 0xd83d,\n0xdea0, 0x3a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63,\n0x61, 0x62, 0x6c, 0x65, 0x77, 0x61, 0x79, 0x3a, 0x63, 0x61, 0x62, 0x6c,\n0x65, 0x77, 0x61, 0x79, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e,\n0xd83d, 0xde9f, 0x3a, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f,\n0x6e, 0x5f, 0x72, 0x61, 0x69, 0x6c, 0x77, 0x61, 0x79, 0x3a, 0x72, 0x61,\n0x69, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73,\n0x69, 0x6f, 0x6e, 0xd83d, 0xde83, 0x3a, 0x72, 0x61, 0x69, 0x6c, 0x77, 0x61,\n0x79, 0x5f, 0x63, 0x61, 0x72, 0x3a, 0x63, 0x61, 0x72, 0x72, 0x61, 0x69,\n0x6c, 0x77, 0x61, 0x79, 0xd83d, 0xde8b, 0x3a, 0x74, 0x72, 0x61, 0x69, 0x6e,\n0x3a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0xd83d, 0xde9e, 0x3a, 0x6d, 0x6f, 0x75,\n0x6e, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x72, 0x61, 0x69, 0x6c, 0x77, 0x61,\n0x79, 0x3a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x72, 0x61,\n0x69, 0x6c, 0x77, 0x61, 0x79, 0xd83d, 0xde9d, 0x3a, 0x6d, 0x6f, 0x6e, 0x6f,\n0x72, 0x61, 0x69, 0x6c, 0x3a, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x61, 0x69,\n0x6c, 0xd83d, 0xde84, 0x3a, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x74, 0x72,\n0x61, 0x69, 0x6e, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x3a, 0x62, 0x75, 0x6c,\n0x6c, 0x65, 0x74, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65,\n0xd83d, 0xde85, 0x3a, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x74, 0x72, 0x61,\n0x69, 0x6e, 0x5f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x3a, 0x62, 0x75, 0x6c,\n0x6c, 0x65, 0x74, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x66, 0x72, 0x6f, 0x6e,\n0x74, 0xd83d, 0xde88, 0x3a, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x72, 0x61,\n0x69, 0x6c, 0x3a, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x72, 0x61, 0x69, 0x6c,\n0xd83d, 0xde82, 0x3a, 0x73, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x6c, 0x6f, 0x63,\n0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x76, 0x65, 0x3a, 0x6c, 0x6f, 0x63, 0x6f,\n0x6d, 0x6f, 0x74, 0x69, 0x76, 0x65, 0x73, 0x74, 0x65, 0x61, 0x6d, 0xd83d,\n0xde86, 0x3a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x32, 0x3a, 0x74, 0x72, 0x61,\n0x69, 0x6e, 0x32, 0xd83d, 0xde87, 0x3a, 0x6d, 0x65, 0x74, 0x72, 0x6f, 0x3a,\n0x6d, 0x65, 0x74, 0x72, 0x6f, 0xd83d, 0xde8a, 0x3a, 0x74, 0x72, 0x61, 0x6d,\n0x3a, 0x74, 0x72, 0x61, 0x6d, 0xd83d, 0xde89, 0x3a, 0x73, 0x74, 0x61, 0x74,\n0x69, 0x6f, 0x6e, 0x3a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xd83d,\n0xde81, 0x3a, 0x68, 0x65, 0x6c, 0x69, 0x63, 0x6f, 0x70, 0x74, 0x65, 0x72,\n0x3a, 0x68, 0x65, 0x6c, 0x69, 0x63, 0x6f, 0x70, 0x74, 0x65, 0x72, 0xd83d,\n0xdee9, 0x3a, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x5f, 0x61, 0x69, 0x72, 0x70,\n0x6c, 0x61, 0x6e, 0x65, 0x3a, 0x61, 0x69, 0x72, 0x70, 0x6c, 0x61, 0x6e,\n0x65, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0xd83d, 0xdee9, 0x3a, 0x61, 0x69, 0x72,\n0x70, 0x6c, 0x61, 0x6e, 0x65, 0x5f, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x3a,\n0x61, 0x69, 0x72, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x73, 0x6d, 0x61, 0x6c,\n0x6c, 0x2708, 0xfe0f, 0x3a, 0x61, 0x69, 0x72, 0x70, 0x6c, 0x61, 0x6e, 0x65,\n0x3a, 0x61, 0x69, 0x72, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0xd83d, 0xdeeb, 0x3a,\n0x61, 0x69, 0x72, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x5f, 0x64, 0x65, 0x70,\n0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x61, 0x69, 0x72, 0x70, 0x6c,\n0x61, 0x6e, 0x65, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65,\n0xd83d, 0xdeec, 0x3a, 0x61, 0x69, 0x72, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x5f,\n0x61, 0x72, 0x72, 0x69, 0x76, 0x69, 0x6e, 0x67, 0x3a, 0x61, 0x69, 0x72,\n0x70, 0x6c, 0x61, 0x6e, 0x65, 0x61, 0x72, 0x72, 0x69, 0x76, 0x69, 0x6e,\n0x67, 0xd83d, 0xde80, 0x3a, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x3a, 0x72,\n0x6f, 0x63, 0x6b, 0x65, 0x74, 0xd83d, 0xdef0, 0x3a, 0x73, 0x61, 0x74, 0x65,\n0x6c, 0x6c, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x62, 0x69, 0x74, 0x61,\n0x6c, 0x3a, 0x6f, 0x72, 0x62, 0x69, 0x74, 0x61, 0x6c, 0x73, 0x61, 0x74,\n0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0xd83d, 0xdcba, 0x3a, 0x73, 0x65, 0x61,\n0x74, 0x3a, 0x73, 0x65, 0x61, 0x74, 0xd83d, 0xdef6, 0x3a, 0x6b, 0x61, 0x79,\n0x61, 0x6b, 0x3a, 0x6b, 0x61, 0x79, 0x61, 0x6b, 0xd83d, 0xdef6, 0x3a, 0x63,\n0x61, 0x6e, 0x6f, 0x65, 0x3a, 0x63, 0x61, 0x6e, 0x6f, 0x65, 0x26f5, 0xfe0f,\n0x3a, 0x73, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x61, 0x74, 0x3a, 0x73, 0x61,\n0x69, 0x6c, 0x62, 0x6f, 0x61, 0x74, 0xd83d, 0xdee5, 0x3a, 0x6d, 0x6f, 0x74,\n0x6f, 0x72, 0x62, 0x6f, 0x61, 0x74, 0x3a, 0x6d, 0x6f, 0x74, 0x6f, 0x72,\n0x62, 0x6f, 0x61, 0x74, 0xd83d, 0xdea4, 0x3a, 0x73, 0x70, 0x65, 0x65, 0x64,\n0x62, 0x6f, 0x61, 0x74, 0x3a, 0x73, 0x70, 0x65, 0x65, 0x64, 0x62, 0x6f,\n0x61, 0x74, 0xd83d, 0xdef3, 0x3a, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67,\n0x65, 0x72, 0x5f, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x70, 0x61, 0x73, 0x73,\n0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0xd83d, 0xdef3, 0x3a,\n0x63, 0x72, 0x75, 0x69, 0x73, 0x65, 0x5f, 0x73, 0x68, 0x69, 0x70, 0x3a,\n0x63, 0x72, 0x75, 0x69, 0x73, 0x65, 0x73, 0x68, 0x69, 0x70, 0x26f4, 0x3a,\n0x66, 0x65, 0x72, 0x72, 0x79, 0x3a, 0x66, 0x65, 0x72, 0x72, 0x79, 0xd83d,\n0xdea2, 0x3a, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x73, 0x68, 0x69, 0x70, 0x2693,\n0xfe0f, 0x3a, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x3a, 0x61, 0x6e, 0x63,\n0x68, 0x6f, 0x72, 0xd83d, 0xdea7, 0x3a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72,\n0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x63, 0x6f, 0x6e, 0x73, 0x74,\n0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x26fd, 0xfe0f, 0x3a, 0x66, 0x75,\n0x65, 0x6c, 0x70, 0x75, 0x6d, 0x70, 0x3a, 0x66, 0x75, 0x65, 0x6c, 0x70,\n0x75, 0x6d, 0x70, 0xd83d, 0xde8f, 0x3a, 0x62, 0x75, 0x73, 0x73, 0x74, 0x6f,\n0x70, 0x3a, 0x62, 0x75, 0x73, 0x73, 0x74, 0x6f, 0x70, 0xd83d, 0xdea6, 0x3a,\n0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x72, 0x61,\n0x66, 0x66, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x6c,\n0x69, 0x67, 0x68, 0x74, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x76,\n0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0xd83d, 0xdea5, 0x3a, 0x74, 0x72,\n0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x3a,\n0x6c, 0x69, 0x67, 0x68, 0x74, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63,\n0xd83d, 0xddfa, 0x3a, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70,\n0x3a, 0x6d, 0x61, 0x70, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0xd83d, 0xddfa, 0x3a,\n0x6d, 0x61, 0x70, 0x3a, 0x6d, 0x61, 0x70, 0xd83d, 0xddff, 0x3a, 0x6d, 0x6f,\n0x79, 0x61, 0x69, 0x3a, 0x6d, 0x6f, 0x79, 0x61, 0x69, 0xd83d, 0xddfd, 0x3a,\n0x73, 0x74, 0x61, 0x74, 0x75, 0x65, 0x5f, 0x6f, 0x66, 0x5f, 0x6c, 0x69,\n0x62, 0x65, 0x72, 0x74, 0x79, 0x3a, 0x6c, 0x69, 0x62, 0x65, 0x72, 0x74,\n0x79, 0x6f, 0x66, 0x73, 0x74, 0x61, 0x74, 0x75, 0x65, 0x26f2, 0xfe0f, 0x3a,\n0x66, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x3a, 0x66, 0x6f, 0x75,\n0x6e, 0x74, 0x61, 0x69, 0x6e, 0xd83d, 0xddfc, 0x3a, 0x74, 0x6f, 0x6b, 0x79,\n0x6f, 0x5f, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x3a, 0x74, 0x6f, 0x6b, 0x79,\n0x6f, 0x74, 0x6f, 0x77, 0x65, 0x72, 0xd83c, 0xdff0, 0x3a, 0x65, 0x75, 0x72,\n0x6f, 0x70, 0x65, 0x61, 0x6e, 0x5f, 0x63, 0x61, 0x73, 0x74, 0x6c, 0x65,\n0x3a, 0x63, 0x61, 0x73, 0x74, 0x6c, 0x65, 0x65, 0x75, 0x72, 0x6f, 0x70,\n0x65, 0x61, 0x6e, 0xd83c, 0xdfef, 0x3a, 0x6a, 0x61, 0x70, 0x61, 0x6e, 0x65,\n0x73, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x74, 0x6c, 0x65, 0x3a, 0x63, 0x61,\n0x73, 0x74, 0x6c, 0x65, 0x6a, 0x61, 0x70, 0x61, 0x6e, 0x65, 0x73, 0x65,\n0xd83c, 0xdfdf, 0x3a, 0x73, 0x74, 0x61, 0x64, 0x69, 0x75, 0x6d, 0x3a, 0x73,\n0x74, 0x61, 0x64, 0x69, 0x75, 0x6d, 0xd83c, 0xdfa1, 0x3a, 0x66, 0x65, 0x72,\n0x72, 0x69, 0x73, 0x5f, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x3a, 0x66, 0x65,\n0x72, 0x72, 0x69, 0x73, 0x77, 0x68, 0x65, 0x65, 0x6c, 0xd83c, 0xdfa2, 0x3a,\n0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x61, 0x73, 0x74,\n0x65, 0x72, 0x3a, 0x63, 0x6f, 0x61, 0x73, 0x74, 0x65, 0x72, 0x72, 0x6f,\n0x6c, 0x6c, 0x65, 0x72, 0xd83c, 0xdfa0, 0x3a, 0x63, 0x61, 0x72, 0x6f, 0x75,\n0x73, 0x65, 0x6c, 0x5f, 0x68, 0x6f, 0x72, 0x73, 0x65, 0x3a, 0x63, 0x61,\n0x72, 0x6f, 0x75, 0x73, 0x65, 0x6c, 0x68, 0x6f, 0x72, 0x73, 0x65, 0x26f1,\n0x3a, 0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x5f, 0x6f, 0x6e,\n0x5f, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3a, 0x67, 0x72, 0x6f, 0x75,\n0x6e, 0x64, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61,\n0x26f1, 0x3a, 0x62, 0x65, 0x61, 0x63, 0x68, 0x5f, 0x75, 0x6d, 0x62, 0x72,\n0x65, 0x6c, 0x6c, 0x61, 0x3a, 0x62, 0x65, 0x61, 0x63, 0x68, 0x75, 0x6d,\n0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0xd83c, 0xdfd6, 0x3a, 0x62, 0x65, 0x61,\n0x63, 0x68, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x75, 0x6d, 0x62, 0x72,\n0x65, 0x6c, 0x6c, 0x61, 0x3a, 0x62, 0x65, 0x61, 0x63, 0x68, 0x75, 0x6d,\n0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x77, 0x69, 0x74, 0x68, 0xd83c, 0xdfd6,\n0x3a, 0x62, 0x65, 0x61, 0x63, 0x68, 0x3a, 0x62, 0x65, 0x61, 0x63, 0x68,\n0xd83c, 0xdfdd, 0x3a, 0x64, 0x65, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x73,\n0x6c, 0x61, 0x6e, 0x64, 0x3a, 0x64, 0x65, 0x73, 0x65, 0x72, 0x74, 0x69,\n0x73, 0x6c, 0x61, 0x6e, 0x64, 0xd83c, 0xdfdd, 0x3a, 0x69, 0x73, 0x6c, 0x61,\n0x6e, 0x64, 0x3a, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x26f0, 0x3a, 0x6d,\n0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x3a, 0x6d, 0x6f, 0x75, 0x6e,\n0x74, 0x61, 0x69, 0x6e, 0xd83c, 0xdfd4, 0x3a, 0x73, 0x6e, 0x6f, 0x77, 0x5f,\n0x63, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x75, 0x6e, 0x74,\n0x61, 0x69, 0x6e, 0x3a, 0x63, 0x61, 0x70, 0x70, 0x65, 0x64, 0x6d, 0x6f,\n0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x6e, 0x6f, 0x77, 0xd83c, 0xdfd4,\n0x3a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x6e,\n0x6f, 0x77, 0x3a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73,\n0x6e, 0x6f, 0x77, 0xd83d, 0xddfb, 0x3a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f,\n0x66, 0x75, 0x6a, 0x69, 0x3a, 0x66, 0x75, 0x6a, 0x69, 0x6d, 0x6f, 0x75,\n0x6e, 0x74, 0xd83c, 0xdf0b, 0x3a, 0x76, 0x6f, 0x6c, 0x63, 0x61, 0x6e, 0x6f,\n0x3a, 0x76, 0x6f, 0x6c, 0x63, 0x61, 0x6e, 0x6f, 0xd83c, 0xdfdc, 0x3a, 0x64,\n0x65, 0x73, 0x65, 0x72, 0x74, 0x3a, 0x64, 0x65, 0x73, 0x65, 0x72, 0x74,\n0xd83c, 0xdfd5, 0x3a, 0x63, 0x61, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x3a, 0x63,\n0x61, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x26fa, 0xfe0f, 0x3a, 0x74, 0x65, 0x6e,\n0x74, 0x3a, 0x74, 0x65, 0x6e, 0x74, 0xd83d, 0xdee4, 0x3a, 0x72, 0x61, 0x69,\n0x6c, 0x72, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x3a,\n0x72, 0x61, 0x69, 0x6c, 0x72, 0x6f, 0x61, 0x64, 0x74, 0x72, 0x61, 0x63,\n0x6b, 0xd83d, 0xdee4, 0x3a, 0x72, 0x61, 0x69, 0x6c, 0x77, 0x61, 0x79, 0x5f,\n0x74, 0x72, 0x61, 0x63, 0x6b, 0x3a, 0x72, 0x61, 0x69, 0x6c, 0x77, 0x61,\n0x79, 0x74, 0x72, 0x61, 0x63, 0x6b, 0xd83d, 0xdee3, 0x3a, 0x6d, 0x6f, 0x74,\n0x6f, 0x72, 0x77, 0x61, 0x79, 0x3a, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x77,\n0x61, 0x79, 0xd83c, 0xdfd7, 0x3a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e,\n0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69,\n0x6f, 0x6e, 0x3a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x63,\n0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0xd83c,\n0xdfd7, 0x3a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69,\n0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x74, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x73,\n0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x69, 0x74, 0x65,\n0xd83c, 0xdfed, 0x3a, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x3a, 0x66,\n0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0xd83c, 0xdfe0, 0x3a, 0x68, 0x6f, 0x75,\n0x73, 0x65, 0x3a, 0x68, 0x6f, 0x75, 0x73, 0x65, 0xd83c, 0xdfe1, 0x3a, 0x68,\n0x6f, 0x75, 0x73, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x67, 0x61,\n0x72, 0x64, 0x65, 0x6e, 0x3a, 0x67, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x68,\n0x6f, 0x75, 0x73, 0x65, 0x77, 0x69, 0x74, 0x68, 0xd83c, 0xdfd8, 0x3a, 0x68,\n0x6f, 0x75, 0x73, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e,\n0x67, 0x73, 0x3a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x73,\n0x68, 0x6f, 0x75, 0x73, 0x65, 0xd83c, 0xdfd8, 0x3a, 0x68, 0x6f, 0x6d, 0x65,\n0x73, 0x3a, 0x68, 0x6f, 0x6d, 0x65, 0x73, 0xd83c, 0xdfda, 0x3a, 0x64, 0x65,\n0x72, 0x65, 0x6c, 0x69, 0x63, 0x74, 0x5f, 0x68, 0x6f, 0x75, 0x73, 0x65,\n0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x62, 0x75,\n0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x64, 0x65, 0x72, 0x65, 0x6c, 0x69,\n0x63, 0x74, 0x68, 0x6f, 0x75, 0x73, 0x65, 0xd83c, 0xdfda, 0x3a, 0x68, 0x6f,\n0x75, 0x73, 0x65, 0x5f, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x65,\n0x64, 0x3a, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x65, 0x64, 0x68,\n0x6f, 0x75, 0x73, 0x65, 0xd83c, 0xdfe2, 0x3a, 0x6f, 0x66, 0x66, 0x69, 0x63,\n0x65, 0x3a, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0xd83c, 0xdfec, 0x3a, 0x64,\n0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74,\n0x6f, 0x72, 0x65, 0x3a, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65,\n0x6e, 0x74, 0x73, 0x74, 0x6f, 0x72, 0x65, 0xd83c, 0xdfe3, 0x3a, 0x70, 0x6f,\n0x73, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x3a, 0x6f, 0x66,\n0x66, 0x69, 0x63, 0x65, 0x70, 0x6f, 0x73, 0x74, 0xd83c, 0xdfe4, 0x3a, 0x65,\n0x75, 0x72, 0x6f, 0x70, 0x65, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x74,\n0x5f, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x3a, 0x65, 0x75, 0x72, 0x6f,\n0x70, 0x65, 0x61, 0x6e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x70, 0x6f,\n0x73, 0x74, 0xd83c, 0xdfe5, 0x3a, 0x68, 0x6f, 0x73, 0x70, 0x69, 0x74, 0x61,\n0x6c, 0x3a, 0x68, 0x6f, 0x73, 0x70, 0x69, 0x74, 0x61, 0x6c, 0xd83c, 0xdfe6,\n0x3a, 0x62, 0x61, 0x6e, 0x6b, 0x3a, 0x62, 0x61, 0x6e, 0x6b, 0xd83c, 0xdfe8,\n0x3a, 0x68, 0x6f, 0x74, 0x65, 0x6c, 0x3a, 0x68, 0x6f, 0x74, 0x65, 0x6c,\n0xd83c, 0xdfea, 0x3a, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x69, 0x65, 0x6e,\n0x63, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x63, 0x6f, 0x6e,\n0x76, 0x65, 0x6e, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72,\n0x65, 0xd83c, 0xdfeb, 0x3a, 0x73, 0x63, 0x68, 0x6f, 0x6f, 0x6c, 0x3a, 0x73,\n0x63, 0x68, 0x6f, 0x6f, 0x6c, 0xd83c, 0xdfe9, 0x3a, 0x6c, 0x6f, 0x76, 0x65,\n0x5f, 0x68, 0x6f, 0x74, 0x65, 0x6c, 0x3a, 0x68, 0x6f, 0x74, 0x65, 0x6c,\n0x6c, 0x6f, 0x76, 0x65, 0xd83d, 0xdc92, 0x3a, 0x77, 0x65, 0x64, 0x64, 0x69,\n0x6e, 0x67, 0x3a, 0x77, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0xd83c, 0xdfdb,\n0x3a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x62,\n0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x62, 0x75, 0x69, 0x6c,\n0x64, 0x69, 0x6e, 0x67, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x63, 0x61,\n0x6c, 0x26ea, 0xfe0f, 0x3a, 0x63, 0x68, 0x75, 0x72, 0x63, 0x68, 0x3a, 0x63,\n0x68, 0x75, 0x72, 0x63, 0x68, 0xd83d, 0xdd4c, 0x3a, 0x6d, 0x6f, 0x73, 0x71,\n0x75, 0x65, 0x3a, 0x6d, 0x6f, 0x73, 0x71, 0x75, 0x65, 0xd83d, 0xdd4d, 0x3a,\n0x73, 0x79, 0x6e, 0x61, 0x67, 0x6f, 0x67, 0x75, 0x65, 0x3a, 0x73, 0x79,\n0x6e, 0x61, 0x67, 0x6f, 0x67, 0x75, 0x65, 0xd83d, 0xdd4b, 0x3a, 0x6b, 0x61,\n0x61, 0x62, 0x61, 0x3a, 0x6b, 0x61, 0x61, 0x62, 0x61, 0x26e9, 0x3a, 0x73,\n0x68, 0x69, 0x6e, 0x74, 0x6f, 0x5f, 0x73, 0x68, 0x72, 0x69, 0x6e, 0x65,\n0x3a, 0x73, 0x68, 0x69, 0x6e, 0x74, 0x6f, 0x73, 0x68, 0x72, 0x69, 0x6e,\n0x65, 0xd83d, 0xddfe, 0x3a, 0x6a, 0x61, 0x70, 0x61, 0x6e, 0x3a, 0x6a, 0x61,\n0x70, 0x61, 0x6e, 0xd83c, 0xdf91, 0x3a, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73,\n0x63, 0x65, 0x6e, 0x65, 0x3a, 0x72, 0x69, 0x63, 0x65, 0x73, 0x63, 0x65,\n0x6e, 0x65, 0xd83c, 0xdfde, 0x3a, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61,\n0x6c, 0x5f, 0x70, 0x61, 0x72, 0x6b, 0x3a, 0x6e, 0x61, 0x74, 0x69, 0x6f,\n0x6e, 0x61, 0x6c, 0x70, 0x61, 0x72, 0x6b, 0xd83c, 0xdfde, 0x3a, 0x70, 0x61,\n0x72, 0x6b, 0x3a, 0x70, 0x61, 0x72, 0x6b, 0xd83c, 0xdf05, 0x3a, 0x73, 0x75,\n0x6e, 0x72, 0x69, 0x73, 0x65, 0x3a, 0x73, 0x75, 0x6e, 0x72, 0x69, 0x73,\n0x65, 0xd83c, 0xdf04, 0x3a, 0x73, 0x75, 0x6e, 0x72, 0x69, 0x73, 0x65, 0x5f,\n0x6f, 0x76, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69,\n0x6e, 0x73, 0x3a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73,\n0x6f, 0x76, 0x65, 0x72, 0x73, 0x75, 0x6e, 0x72, 0x69, 0x73, 0x65, 0xd83c,\n0xdf20, 0x3a, 0x73, 0x74, 0x61, 0x72, 0x73, 0x3a, 0x73, 0x74, 0x61, 0x72,\n0x73, 0xd83c, 0xdf87, 0x3a, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x6c, 0x65, 0x72,\n0x3a, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x6c, 0x65, 0x72, 0xd83c, 0xdf86, 0x3a,\n0x66, 0x69, 0x72, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x3a, 0x66, 0x69,\n0x72, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0xd83c, 0xdf07, 0x3a, 0x63, 0x69,\n0x74, 0x79, 0x5f, 0x73, 0x75, 0x6e, 0x72, 0x69, 0x73, 0x65, 0x3a, 0x63,\n0x69, 0x74, 0x79, 0x73, 0x75, 0x6e, 0x72, 0x69, 0x73, 0x65, 0xd83c, 0xdf07,\n0x3a, 0x63, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x75, 0x6e, 0x73, 0x65, 0x74,\n0x3a, 0x63, 0x69, 0x74, 0x79, 0x73, 0x75, 0x6e, 0x73, 0x65, 0x74, 0xd83c,\n0xdf06, 0x3a, 0x63, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x75, 0x73, 0x6b, 0x3a,\n0x63, 0x69, 0x74, 0x79, 0x64, 0x75, 0x73, 0x6b, 0xd83c, 0xdfd9, 0x3a, 0x63,\n0x69, 0x74, 0x79, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x69, 0x74,\n0x79, 0x73, 0x63, 0x61, 0x70, 0x65, 0xd83c, 0xdf03, 0x3a, 0x6e, 0x69, 0x67,\n0x68, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x72,\n0x73, 0x3a, 0x6e, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x61, 0x72, 0x73,\n0x77, 0x69, 0x74, 0x68, 0xd83c, 0xdf0c, 0x3a, 0x6d, 0x69, 0x6c, 0x6b, 0x79,\n0x5f, 0x77, 0x61, 0x79, 0x3a, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61,\n0x79, 0xd83c, 0xdf09, 0x3a, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x61,\n0x74, 0x5f, 0x6e, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x61, 0x74, 0x62, 0x72,\n0x69, 0x64, 0x67, 0x65, 0x6e, 0x69, 0x67, 0x68, 0x74, 0xd83c, 0xdf01, 0x3a,\n0x66, 0x6f, 0x67, 0x67, 0x79, 0x3a, 0x66, 0x6f, 0x67, 0x67, 0x79, 0x231a,\n0xfe0f, 0x3a, 0x77, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x77, 0x61, 0x74, 0x63,\n0x68, 0xd83d, 0xdcf1, 0x3a, 0x69, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x3a, 0x69,\n0x70, 0x68, 0x6f, 0x6e, 0x65, 0xd83d, 0xdcf2, 0x3a, 0x63, 0x61, 0x6c, 0x6c,\n0x69, 0x6e, 0x67, 0x3a, 0x63, 0x61, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0xd83d,\n0xdcbb, 0x3a, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x3a, 0x63,\n0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x2328, 0xfe0f, 0x3a, 0x6b, 0x65,\n0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x6b, 0x65, 0x79, 0x62, 0x6f,\n0x61, 0x72, 0x64, 0xd83d, 0xdda5, 0x3a, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f,\n0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x3a, 0x63,\n0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x64, 0x65, 0x73, 0x6b, 0x74,\n0x6f, 0x70, 0xd83d, 0xdda5, 0x3a, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70,\n0x3a, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0xd83d, 0xdda8, 0x3a, 0x70,\n0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x70, 0x72, 0x69, 0x6e, 0x74,\n0x65, 0x72, 0xd83d, 0xddb1, 0x3a, 0x74, 0x68, 0x72, 0x65, 0x65, 0x5f, 0x62,\n0x75, 0x74, 0x74, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x3a,\n0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x74,\n0x68, 0x72, 0x65, 0x65, 0xd83d, 0xddb1, 0x3a, 0x6d, 0x6f, 0x75, 0x73, 0x65,\n0x5f, 0x74, 0x68, 0x72, 0x65, 0x65, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f,\n0x6e, 0x3a, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x6d, 0x6f, 0x75, 0x73,\n0x65, 0x74, 0x68, 0x72, 0x65, 0x65, 0xd83d, 0xddb2, 0x3a, 0x74, 0x72, 0x61,\n0x63, 0x6b, 0x62, 0x61, 0x6c, 0x6c, 0x3a, 0x74, 0x72, 0x61, 0x63, 0x6b,\n0x62, 0x61, 0x6c, 0x6c, 0xd83d, 0xdd79, 0x3a, 0x6a, 0x6f, 0x79, 0x73, 0x74,\n0x69, 0x63, 0x6b, 0x3a, 0x6a, 0x6f, 0x79, 0x73, 0x74, 0x69, 0x63, 0x6b,\n0xd83d, 0xdddc, 0x3a, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69,\n0x6f, 0x6e, 0x3a, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69,\n0x6f, 0x6e, 0xd83d, 0xdcbd, 0x3a, 0x6d, 0x69, 0x6e, 0x69, 0x64, 0x69, 0x73,\n0x63, 0x3a, 0x6d, 0x69, 0x6e, 0x69, 0x64, 0x69, 0x73, 0x63, 0xd83d, 0xdcbe,\n0x3a, 0x66, 0x6c, 0x6f, 0x70, 0x70, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x6b,\n0x3a, 0x64, 0x69, 0x73, 0x6b, 0x66, 0x6c, 0x6f, 0x70, 0x70, 0x79, 0xd83d,\n0xdcbf, 0x3a, 0x63, 0x64, 0x3a, 0x63, 0x64, 0xd83d, 0xdcc0, 0x3a, 0x64, 0x76,\n0x64, 0x3a, 0x64, 0x76, 0x64, 0xd83d, 0xdcfc, 0x3a, 0x76, 0x68, 0x73, 0x3a,\n0x76, 0x68, 0x73, 0xd83d, 0xdcf7, 0x3a, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61,\n0x3a, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0xd83d, 0xdcf8, 0x3a, 0x63, 0x61,\n0x6d, 0x65, 0x72, 0x61, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x66, 0x6c,\n0x61, 0x73, 0x68, 0x3a, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x66, 0x6c,\n0x61, 0x73, 0x68, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdcf9, 0x3a, 0x76, 0x69,\n0x64, 0x65, 0x6f, 0x5f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x3a, 0x63,\n0x61, 0x6d, 0x65, 0x72, 0x61, 0x76, 0x69, 0x64, 0x65, 0x6f, 0xd83c, 0xdfa5,\n0x3a, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x5f, 0x63, 0x61, 0x6d, 0x65, 0x72,\n0x61, 0x3a, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x6d, 0x6f, 0x76, 0x69,\n0x65, 0xd83d, 0xdcfd, 0x3a, 0x66, 0x69, 0x6c, 0x6d, 0x5f, 0x70, 0x72, 0x6f,\n0x6a, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x3a, 0x66, 0x69, 0x6c, 0x6d, 0x70,\n0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6f, 0x72, 0xd83d, 0xdcfd, 0x3a, 0x70,\n0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x3a, 0x70, 0x72, 0x6f,\n0x6a, 0x65, 0x63, 0x74, 0x6f, 0x72, 0xd83c, 0xdf9e, 0x3a, 0x66, 0x69, 0x6c,\n0x6d, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x3a, 0x66, 0x69, 0x6c,\n0x6d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0xd83d, 0xdcde, 0x3a, 0x74, 0x65,\n0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65,\n0x69, 0x76, 0x65, 0x72, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,\n0x72, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x260e, 0xfe0f,\n0x3a, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x3a, 0x74,\n0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0xd83d, 0xdcdf, 0x3a, 0x70,\n0x61, 0x67, 0x65, 0x72, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x72, 0xd83d, 0xdce0,\n0x3a, 0x66, 0x61, 0x78, 0x3a, 0x66, 0x61, 0x78, 0xd83d, 0xdcfa, 0x3a, 0x74,\n0x76, 0x3a, 0x74, 0x76, 0xd83d, 0xdcfb, 0x3a, 0x72, 0x61, 0x64, 0x69, 0x6f,\n0x3a, 0x72, 0x61, 0x64, 0x69, 0x6f, 0xd83c, 0xdf99, 0x3a, 0x73, 0x74, 0x75,\n0x64, 0x69, 0x6f, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x70, 0x68, 0x6f,\n0x6e, 0x65, 0x3a, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x70, 0x68, 0x6f, 0x6e,\n0x65, 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, 0xd83c, 0xdf99, 0x3a, 0x6d, 0x69,\n0x63, 0x72, 0x6f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x32, 0x3a, 0x6d, 0x69,\n0x63, 0x72, 0x6f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x32, 0xd83c, 0xdf9a, 0x3a,\n0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72,\n0x3a, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72,\n0xd83c, 0xdf9b, 0x3a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x6b,\n0x6e, 0x6f, 0x62, 0x73, 0x3a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,\n0x6b, 0x6e, 0x6f, 0x62, 0x73, 0x23f1, 0x3a, 0x73, 0x74, 0x6f, 0x70, 0x77,\n0x61, 0x74, 0x63, 0x68, 0x3a, 0x73, 0x74, 0x6f, 0x70, 0x77, 0x61, 0x74,\n0x63, 0x68, 0x23f2, 0x3a, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x63, 0x6c,\n0x6f, 0x63, 0x6b, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x74, 0x69, 0x6d,\n0x65, 0x72, 0x23f2, 0x3a, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x3a, 0x74, 0x69,\n0x6d, 0x65, 0x72, 0x23f0, 0x3a, 0x61, 0x6c, 0x61, 0x72, 0x6d, 0x5f, 0x63,\n0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x61, 0x6c, 0x61, 0x72, 0x6d, 0x63, 0x6c,\n0x6f, 0x63, 0x6b, 0xd83d, 0xdd70, 0x3a, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65,\n0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x3a,\n0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x70,\n0x69, 0x65, 0x63, 0x65, 0xd83d, 0xdd70, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b,\n0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x231b, 0xfe0f, 0x3a, 0x68, 0x6f, 0x75,\n0x72, 0x67, 0x6c, 0x61, 0x73, 0x73, 0x3a, 0x68, 0x6f, 0x75, 0x72, 0x67,\n0x6c, 0x61, 0x73, 0x73, 0x23f3, 0x3a, 0x68, 0x6f, 0x75, 0x72, 0x67, 0x6c,\n0x61, 0x73, 0x73, 0x5f, 0x66, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x5f,\n0x73, 0x61, 0x6e, 0x64, 0x3a, 0x66, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67,\n0x68, 0x6f, 0x75, 0x72, 0x67, 0x6c, 0x61, 0x73, 0x73, 0x73, 0x61, 0x6e,\n0x64, 0xd83d, 0xdce1, 0x3a, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74,\n0x65, 0x3a, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0xd83d,\n0xdd0b, 0x3a, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x3a, 0x62, 0x61,\n0x74, 0x74, 0x65, 0x72, 0x79, 0xd83d, 0xdd0c, 0x3a, 0x65, 0x6c, 0x65, 0x63,\n0x74, 0x72, 0x69, 0x63, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x3a, 0x65, 0x6c,\n0x65, 0x63, 0x74, 0x72, 0x69, 0x63, 0x70, 0x6c, 0x75, 0x67, 0xd83d, 0xdca1,\n0x3a, 0x62, 0x75, 0x6c, 0x62, 0x3a, 0x62, 0x75, 0x6c, 0x62, 0xd83d, 0xdd26,\n0x3a, 0x66, 0x6c, 0x61, 0x73, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x3a,\n0x66, 0x6c, 0x61, 0x73, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0xd83d, 0xdd6f,\n0x3a, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x3a, 0x63, 0x61, 0x6e, 0x64,\n0x6c, 0x65, 0xd83d, 0xddd1, 0x3a, 0x77, 0x61, 0x73, 0x74, 0x65, 0x62, 0x61,\n0x73, 0x6b, 0x65, 0x74, 0x3a, 0x77, 0x61, 0x73, 0x74, 0x65, 0x62, 0x61,\n0x73, 0x6b, 0x65, 0x74, 0xd83d, 0xdee2, 0x3a, 0x6f, 0x69, 0x6c, 0x5f, 0x64,\n0x72, 0x75, 0x6d, 0x3a, 0x64, 0x72, 0x75, 0x6d, 0x6f, 0x69, 0x6c, 0xd83d,\n0xdee2, 0x3a, 0x6f, 0x69, 0x6c, 0x3a, 0x6f, 0x69, 0x6c, 0xd83d, 0xdcb8, 0x3a,\n0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x77,\n0x69, 0x6e, 0x67, 0x73, 0x3a, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x77, 0x69,\n0x6e, 0x67, 0x73, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdcb5, 0x3a, 0x64, 0x6f,\n0x6c, 0x6c, 0x61, 0x72, 0x3a, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0xd83d,\n0xdcb4, 0x3a, 0x79, 0x65, 0x6e, 0x3a, 0x79, 0x65, 0x6e, 0xd83d, 0xdcb6, 0x3a,\n0x65, 0x75, 0x72, 0x6f, 0x3a, 0x65, 0x75, 0x72, 0x6f, 0xd83d, 0xdcb7, 0x3a,\n0x70, 0x6f, 0x75, 0x6e, 0x64, 0x3a, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0xd83d,\n0xdcb0, 0x3a, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x62, 0x61, 0x67, 0x3a, 0x6d,\n0x6f, 0x6e, 0x65, 0x79, 0x62, 0x61, 0x67, 0xd83d, 0xdcb3, 0x3a, 0x63, 0x72,\n0x65, 0x64, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x3a, 0x63, 0x61,\n0x72, 0x64, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0xd83d, 0xdc8e, 0x3a, 0x67,\n0x65, 0x6d, 0x3a, 0x67, 0x65, 0x6d, 0x2696, 0xfe0f, 0x3a, 0x73, 0x63, 0x61,\n0x6c, 0x65, 0x73, 0x3a, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x73, 0xd83d, 0xdd27,\n0x3a, 0x77, 0x72, 0x65, 0x6e, 0x63, 0x68, 0x3a, 0x77, 0x72, 0x65, 0x6e,\n0x63, 0x68, 0xd83d, 0xdd28, 0x3a, 0x68, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x3a,\n0x68, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x2692, 0x3a, 0x68, 0x61, 0x6d, 0x6d,\n0x65, 0x72, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x69, 0x63, 0x6b, 0x3a,\n0x61, 0x6e, 0x64, 0x68, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x70, 0x69, 0x63,\n0x6b, 0x2692, 0x3a, 0x68, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x5f, 0x70, 0x69,\n0x63, 0x6b, 0x3a, 0x68, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x70, 0x69, 0x63,\n0x6b, 0xd83d, 0xdee0, 0x3a, 0x68, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x5f, 0x61,\n0x6e, 0x64, 0x5f, 0x77, 0x72, 0x65, 0x6e, 0x63, 0x68, 0x3a, 0x61, 0x6e,\n0x64, 0x68, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x77, 0x72, 0x65, 0x6e, 0x63,\n0x68, 0xd83d, 0xdee0, 0x3a, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x3a, 0x74, 0x6f,\n0x6f, 0x6c, 0x73, 0x26cf, 0x3a, 0x70, 0x69, 0x63, 0x6b, 0x3a, 0x70, 0x69,\n0x63, 0x6b, 0xd83d, 0xdd29, 0x3a, 0x6e, 0x75, 0x74, 0x5f, 0x61, 0x6e, 0x64,\n0x5f, 0x62, 0x6f, 0x6c, 0x74, 0x3a, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x6c,\n0x74, 0x6e, 0x75, 0x74, 0x2699, 0xfe0f, 0x3a, 0x67, 0x65, 0x61, 0x72, 0x3a,\n0x67, 0x65, 0x61, 0x72, 0x26d3, 0x3a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73,\n0x3a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0xd83d, 0xdd2b, 0x3a, 0x67, 0x75,\n0x6e, 0x3a, 0x67, 0x75, 0x6e, 0xd83d, 0xdca3, 0x3a, 0x62, 0x6f, 0x6d, 0x62,\n0x3a, 0x62, 0x6f, 0x6d, 0x62, 0xd83d, 0xdd2a, 0x3a, 0x6b, 0x6e, 0x69, 0x66,\n0x65, 0x3a, 0x6b, 0x6e, 0x69, 0x66, 0x65, 0xd83d, 0xdde1, 0x3a, 0x64, 0x61,\n0x67, 0x67, 0x65, 0x72, 0x5f, 0x6b, 0x6e, 0x69, 0x66, 0x65, 0x3a, 0x64,\n0x61, 0x67, 0x67, 0x65, 0x72, 0x6b, 0x6e, 0x69, 0x66, 0x65, 0xd83d, 0xdde1,\n0x3a, 0x64, 0x61, 0x67, 0x67, 0x65, 0x72, 0x3a, 0x64, 0x61, 0x67, 0x67,\n0x65, 0x72, 0x2694, 0xfe0f, 0x3a, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x65, 0x64,\n0x5f, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x3a, 0x63, 0x72, 0x6f, 0x73,\n0x73, 0x65, 0x64, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x73, 0xd83d, 0xdee1, 0x3a,\n0x73, 0x68, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x73, 0x68, 0x69, 0x65, 0x6c,\n0x64, 0xd83d, 0xdeac, 0x3a, 0x73, 0x6d, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x3a,\n0x73, 0x6d, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x26b0, 0xfe0f, 0x3a, 0x63, 0x6f,\n0x66, 0x66, 0x69, 0x6e, 0x3a, 0x63, 0x6f, 0x66, 0x66, 0x69, 0x6e, 0x26b1,\n0xfe0f, 0x3a, 0x66, 0x75, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x75, 0x72,\n0x6e, 0x3a, 0x66, 0x75, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x75, 0x72, 0x6e,\n0x26b1, 0xfe0f, 0x3a, 0x75, 0x72, 0x6e, 0x3a, 0x75, 0x72, 0x6e, 0xd83c, 0xdffa,\n0x3a, 0x61, 0x6d, 0x70, 0x68, 0x6f, 0x72, 0x61, 0x3a, 0x61, 0x6d, 0x70,\n0x68, 0x6f, 0x72, 0x61, 0xd83d, 0xdd2e, 0x3a, 0x63, 0x72, 0x79, 0x73, 0x74,\n0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x6c, 0x3a, 0x62, 0x61, 0x6c, 0x6c,\n0x63, 0x72, 0x79, 0x73, 0x74, 0x61, 0x6c, 0xd83d, 0xdcff, 0x3a, 0x70, 0x72,\n0x61, 0x79, 0x65, 0x72, 0x5f, 0x62, 0x65, 0x61, 0x64, 0x73, 0x3a, 0x62,\n0x65, 0x61, 0x64, 0x73, 0x70, 0x72, 0x61, 0x79, 0x65, 0x72, 0xd83d, 0xdc88,\n0x3a, 0x62, 0x61, 0x72, 0x62, 0x65, 0x72, 0x3a, 0x62, 0x61, 0x72, 0x62,\n0x65, 0x72, 0x2697, 0xfe0f, 0x3a, 0x61, 0x6c, 0x65, 0x6d, 0x62, 0x69, 0x63,\n0x3a, 0x61, 0x6c, 0x65, 0x6d, 0x62, 0x69, 0x63, 0xd83d, 0xdd2d, 0x3a, 0x74,\n0x65, 0x6c, 0x65, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x3a, 0x74, 0x65, 0x6c,\n0x65, 0x73, 0x63, 0x6f, 0x70, 0x65, 0xd83d, 0xdd2c, 0x3a, 0x6d, 0x69, 0x63,\n0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x3a, 0x6d, 0x69, 0x63, 0x72,\n0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0xd83d, 0xdd73, 0x3a, 0x68, 0x6f, 0x6c,\n0x65, 0x3a, 0x68, 0x6f, 0x6c, 0x65, 0xd83d, 0xdc8a, 0x3a, 0x70, 0x69, 0x6c,\n0x6c, 0x3a, 0x70, 0x69, 0x6c, 0x6c, 0xd83d, 0xdc89, 0x3a, 0x73, 0x79, 0x72,\n0x69, 0x6e, 0x67, 0x65, 0x3a, 0x73, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x65,\n0xd83c, 0xdf21, 0x3a, 0x74, 0x68, 0x65, 0x72, 0x6d, 0x6f, 0x6d, 0x65, 0x74,\n0x65, 0x72, 0x3a, 0x74, 0x68, 0x65, 0x72, 0x6d, 0x6f, 0x6d, 0x65, 0x74,\n0x65, 0x72, 0xd83d, 0xdebd, 0x3a, 0x74, 0x6f, 0x69, 0x6c, 0x65, 0x74, 0x3a,\n0x74, 0x6f, 0x69, 0x6c, 0x65, 0x74, 0xd83d, 0xdeb0, 0x3a, 0x70, 0x6f, 0x74,\n0x61, 0x62, 0x6c, 0x65, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x3a, 0x70,\n0x6f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x77, 0x61, 0x74, 0x65, 0x72, 0xd83d,\n0xdebf, 0x3a, 0x73, 0x68, 0x6f, 0x77, 0x65, 0x72, 0x3a, 0x73, 0x68, 0x6f,\n0x77, 0x65, 0x72, 0xd83d, 0xdec1, 0x3a, 0x62, 0x61, 0x74, 0x68, 0x74, 0x75,\n0x62, 0x3a, 0x62, 0x61, 0x74, 0x68, 0x74, 0x75, 0x62, 0xd83d, 0xdec0, 0x3a,\n0x62, 0x61, 0x74, 0x68, 0x3a, 0x62, 0x61, 0x74, 0x68, 0xd83d, 0xdece, 0x3a,\n0x62, 0x65, 0x6c, 0x6c, 0x68, 0x6f, 0x70, 0x5f, 0x62, 0x65, 0x6c, 0x6c,\n0x3a, 0x62, 0x65, 0x6c, 0x6c, 0x62, 0x65, 0x6c, 0x6c, 0x68, 0x6f, 0x70,\n0xd83d, 0xdece, 0x3a, 0x62, 0x65, 0x6c, 0x6c, 0x68, 0x6f, 0x70, 0x3a, 0x62,\n0x65, 0x6c, 0x6c, 0x68, 0x6f, 0x70, 0xd83d, 0xdd11, 0x3a, 0x6b, 0x65, 0x79,\n0x3a, 0x6b, 0x65, 0x79, 0xd83d, 0xdddd, 0x3a, 0x6f, 0x6c, 0x64, 0x5f, 0x6b,\n0x65, 0x79, 0x3a, 0x6b, 0x65, 0x79, 0x6f, 0x6c, 0x64, 0xd83d, 0xdddd, 0x3a,\n0x6b, 0x65, 0x79, 0x32, 0x3a, 0x6b, 0x65, 0x79, 0x32, 0xd83d, 0xdeaa, 0x3a,\n0x64, 0x6f, 0x6f, 0x72, 0x3a, 0x64, 0x6f, 0x6f, 0x72, 0xd83d, 0xdecb, 0x3a,\n0x63, 0x6f, 0x75, 0x63, 0x68, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x6c, 0x61,\n0x6d, 0x70, 0x3a, 0x61, 0x6e, 0x64, 0x63, 0x6f, 0x75, 0x63, 0x68, 0x6c,\n0x61, 0x6d, 0x70, 0xd83d, 0xdecb, 0x3a, 0x63, 0x6f, 0x75, 0x63, 0x68, 0x3a,\n0x63, 0x6f, 0x75, 0x63, 0x68, 0xd83d, 0xdecf, 0x3a, 0x62, 0x65, 0x64, 0x3a,\n0x62, 0x65, 0x64, 0xd83d, 0xdecc, 0x3a, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x69,\n0x6e, 0x67, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x64, 0x61,\n0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,\n0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x69,\n0x6e, 0x67, 0xd83d, 0xddbc, 0x3a, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x77,\n0x69, 0x74, 0x68, 0x5f, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x3a,\n0x66, 0x72, 0x61, 0x6d, 0x65, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65,\n0x77, 0x69, 0x74, 0x68, 0xd83d, 0xddbc, 0x3a, 0x66, 0x72, 0x61, 0x6d, 0x65,\n0x5f, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x3a, 0x66, 0x72, 0x61, 0x6d, 0x65,\n0x70, 0x68, 0x6f, 0x74, 0x6f, 0xd83d, 0xdecd, 0x3a, 0x73, 0x68, 0x6f, 0x70,\n0x70, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x67, 0x73, 0x3a, 0x62, 0x61,\n0x67, 0x73, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xd83d, 0xded2,\n0x3a, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72,\n0x6f, 0x6c, 0x6c, 0x65, 0x79, 0x3a, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69,\n0x6e, 0x67, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x79, 0xd83d, 0xded2, 0x3a,\n0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x61, 0x72,\n0x74, 0x3a, 0x63, 0x61, 0x72, 0x74, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69,\n0x6e, 0x67, 0xd83c, 0xdf81, 0x3a, 0x67, 0x69, 0x66, 0x74, 0x3a, 0x67, 0x69,\n0x66, 0x74, 0xd83c, 0xdf88, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x6f, 0x6e,\n0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x6f, 0x6e, 0xd83c, 0xdf8f, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x73, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73, 0xd83c, 0xdf80,\n0x3a, 0x72, 0x69, 0x62, 0x62, 0x6f, 0x6e, 0x3a, 0x72, 0x69, 0x62, 0x62,\n0x6f, 0x6e, 0xd83c, 0xdf8a, 0x3a, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x74, 0x74,\n0x69, 0x5f, 0x62, 0x61, 0x6c, 0x6c, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x63,\n0x6f, 0x6e, 0x66, 0x65, 0x74, 0x74, 0x69, 0xd83c, 0xdf89, 0x3a, 0x74, 0x61,\n0x64, 0x61, 0x3a, 0x74, 0x61, 0x64, 0x61, 0xd83c, 0xdf8e, 0x3a, 0x64, 0x6f,\n0x6c, 0x6c, 0x73, 0x3a, 0x64, 0x6f, 0x6c, 0x6c, 0x73, 0xd83c, 0xdfee, 0x3a,\n0x69, 0x7a, 0x61, 0x6b, 0x61, 0x79, 0x61, 0x5f, 0x6c, 0x61, 0x6e, 0x74,\n0x65, 0x72, 0x6e, 0x3a, 0x69, 0x7a, 0x61, 0x6b, 0x61, 0x79, 0x61, 0x6c,\n0x61, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0xd83c, 0xdf90, 0x3a, 0x77, 0x69, 0x6e,\n0x64, 0x5f, 0x63, 0x68, 0x69, 0x6d, 0x65, 0x3a, 0x63, 0x68, 0x69, 0x6d,\n0x65, 0x77, 0x69, 0x6e, 0x64, 0x2709, 0xfe0f, 0x3a, 0x65, 0x6e, 0x76, 0x65,\n0x6c, 0x6f, 0x70, 0x65, 0x3a, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70,\n0x65, 0xd83d, 0xdce9, 0x3a, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65,\n0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x3a,\n0x61, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70,\n0x65, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdce8, 0x3a, 0x69, 0x6e, 0x63, 0x6f,\n0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70,\n0x65, 0x3a, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x69, 0x6e,\n0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0xd83d, 0xdce7, 0x3a, 0x65, 0x6d, 0x61,\n0x69, 0x6c, 0x3a, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0xd83d, 0xdce7, 0x3a, 0x65,\n0x2d, 0x6d, 0x61, 0x69, 0x6c, 0x3a, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0xd83d,\n0xdc8c, 0x3a, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x74, 0x74, 0x65,\n0x72, 0x3a, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x6c, 0x6f, 0x76, 0x65,\n0xd83d, 0xdce5, 0x3a, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x74, 0x72, 0x61,\n0x79, 0x3a, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x74, 0x72, 0x61, 0x79, 0xd83d,\n0xdce4, 0x3a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x78, 0x5f, 0x74, 0x72, 0x61,\n0x79, 0x3a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x78, 0x74, 0x72, 0x61, 0x79,\n0xd83d, 0xdce6, 0x3a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x3a, 0x70,\n0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0xd83c, 0xdff7, 0x3a, 0x6c, 0x61, 0x62,\n0x65, 0x6c, 0x3a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0xd83d, 0xdcea, 0x3a, 0x6d,\n0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65,\n0x64, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x6d, 0x61, 0x69, 0x6c,\n0x62, 0x6f, 0x78, 0xd83d, 0xdceb, 0x3a, 0x6d, 0x61, 0x69, 0x6c, 0x62, 0x6f,\n0x78, 0x3a, 0x6d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0xd83d, 0xdcec, 0x3a,\n0x6d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x5f, 0x77, 0x69, 0x74, 0x68,\n0x5f, 0x6d, 0x61, 0x69, 0x6c, 0x3a, 0x6d, 0x61, 0x69, 0x6c, 0x6d, 0x61,\n0x69, 0x6c, 0x62, 0x6f, 0x78, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdced, 0x3a,\n0x6d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x5f, 0x77, 0x69, 0x74, 0x68,\n0x5f, 0x6e, 0x6f, 0x5f, 0x6d, 0x61, 0x69, 0x6c, 0x3a, 0x6d, 0x61, 0x69,\n0x6c, 0x6d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x6e, 0x6f, 0x77, 0x69,\n0x74, 0x68, 0xd83d, 0xdcee, 0x3a, 0x70, 0x6f, 0x73, 0x74, 0x62, 0x6f, 0x78,\n0x3a, 0x70, 0x6f, 0x73, 0x74, 0x62, 0x6f, 0x78, 0xd83d, 0xdcef, 0x3a, 0x70,\n0x6f, 0x73, 0x74, 0x61, 0x6c, 0x5f, 0x68, 0x6f, 0x72, 0x6e, 0x3a, 0x68,\n0x6f, 0x72, 0x6e, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0xd83d, 0xdcdc, 0x3a,\n0x73, 0x63, 0x72, 0x6f, 0x6c, 0x6c, 0x3a, 0x73, 0x63, 0x72, 0x6f, 0x6c,\n0x6c, 0xd83d, 0xdcc3, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x77, 0x69, 0x74,\n0x68, 0x5f, 0x63, 0x75, 0x72, 0x6c, 0x3a, 0x63, 0x75, 0x72, 0x6c, 0x70,\n0x61, 0x67, 0x65, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdcc4, 0x3a, 0x70, 0x61,\n0x67, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x75, 0x70,\n0x3a, 0x66, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x70, 0x61, 0x67, 0x65, 0x75,\n0x70, 0xd83d, 0xdcd1, 0x3a, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b,\n0x5f, 0x74, 0x61, 0x62, 0x73, 0x3a, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61,\n0x72, 0x6b, 0x74, 0x61, 0x62, 0x73, 0xd83d, 0xdcca, 0x3a, 0x62, 0x61, 0x72,\n0x5f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x3a, 0x62, 0x61, 0x72, 0x63, 0x68,\n0x61, 0x72, 0x74, 0xd83d, 0xdcc8, 0x3a, 0x63, 0x68, 0x61, 0x72, 0x74, 0x5f,\n0x77, 0x69, 0x74, 0x68, 0x5f, 0x75, 0x70, 0x77, 0x61, 0x72, 0x64, 0x73,\n0x5f, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x3a, 0x63, 0x68, 0x61, 0x72, 0x74,\n0x74, 0x72, 0x65, 0x6e, 0x64, 0x75, 0x70, 0x77, 0x61, 0x72, 0x64, 0x73,\n0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdcc9, 0x3a, 0x63, 0x68, 0x61, 0x72, 0x74,\n0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x77, 0x61,\n0x72, 0x64, 0x73, 0x5f, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x3a, 0x63, 0x68,\n0x61, 0x72, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x77, 0x61, 0x72, 0x64, 0x73,\n0x74, 0x72, 0x65, 0x6e, 0x64, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xddd2, 0x3a,\n0x73, 0x70, 0x69, 0x72, 0x61, 0x6c, 0x5f, 0x6e, 0x6f, 0x74, 0x65, 0x5f,\n0x70, 0x61, 0x64, 0x3a, 0x6e, 0x6f, 0x74, 0x65, 0x70, 0x61, 0x64, 0x73,\n0x70, 0x69, 0x72, 0x61, 0x6c, 0xd83d, 0xddd2, 0x3a, 0x6e, 0x6f, 0x74, 0x65,\n0x70, 0x61, 0x64, 0x5f, 0x73, 0x70, 0x69, 0x72, 0x61, 0x6c, 0x3a, 0x6e,\n0x6f, 0x74, 0x65, 0x70, 0x61, 0x64, 0x73, 0x70, 0x69, 0x72, 0x61, 0x6c,\n0xd83d, 0xddd3, 0x3a, 0x73, 0x70, 0x69, 0x72, 0x61, 0x6c, 0x5f, 0x63, 0x61,\n0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x5f, 0x70, 0x61, 0x64, 0x3a, 0x63,\n0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x70, 0x61, 0x64, 0x73, 0x70,\n0x69, 0x72, 0x61, 0x6c, 0xd83d, 0xddd3, 0x3a, 0x63, 0x61, 0x6c, 0x65, 0x6e,\n0x64, 0x61, 0x72, 0x5f, 0x73, 0x70, 0x69, 0x72, 0x61, 0x6c, 0x3a, 0x63,\n0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x73, 0x70, 0x69, 0x72, 0x61,\n0x6c, 0xd83d, 0xdcc6, 0x3a, 0x63, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72,\n0x3a, 0x63, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0xd83d, 0xdcc5, 0x3a,\n0x64, 0x61, 0x74, 0x65, 0x3a, 0x64, 0x61, 0x74, 0x65, 0xd83d, 0xdcc7, 0x3a,\n0x63, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x63,\n0x61, 0x72, 0x64, 0x69, 0x6e, 0x64, 0x65, 0x78, 0xd83d, 0xddc3, 0x3a, 0x63,\n0x61, 0x72, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x6f, 0x78,\n0x3a, 0x62, 0x6f, 0x78, 0x63, 0x61, 0x72, 0x64, 0x66, 0x69, 0x6c, 0x65,\n0xd83d, 0xddc3, 0x3a, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x62, 0x6f, 0x78, 0x3a,\n0x62, 0x6f, 0x78, 0x63, 0x61, 0x72, 0x64, 0xd83d, 0xddf3, 0x3a, 0x62, 0x61,\n0x6c, 0x6c, 0x6f, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x5f, 0x77, 0x69, 0x74,\n0x68, 0x5f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x3a, 0x62, 0x61, 0x6c,\n0x6c, 0x6f, 0x74, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x62, 0x6f, 0x78,\n0x77, 0x69, 0x74, 0x68, 0xd83d, 0xddf3, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x6f,\n0x74, 0x5f, 0x62, 0x6f, 0x78, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74,\n0x62, 0x6f, 0x78, 0xd83d, 0xddc4, 0x3a, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63,\n0x61, 0x62, 0x69, 0x6e, 0x65, 0x74, 0x3a, 0x63, 0x61, 0x62, 0x69, 0x6e,\n0x65, 0x74, 0x66, 0x69, 0x6c, 0x65, 0xd83d, 0xdccb, 0x3a, 0x63, 0x6c, 0x69,\n0x70, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x63, 0x6c, 0x69, 0x70, 0x62,\n0x6f, 0x61, 0x72, 0x64, 0xd83d, 0xdcc1, 0x3a, 0x66, 0x69, 0x6c, 0x65, 0x5f,\n0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x3a, 0x66, 0x69, 0x6c, 0x65, 0x66,\n0x6f, 0x6c, 0x64, 0x65, 0x72, 0xd83d, 0xdcc2, 0x3a, 0x6f, 0x70, 0x65, 0x6e,\n0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72,\n0x3a, 0x66, 0x69, 0x6c, 0x65, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x6f,\n0x70, 0x65, 0x6e, 0xd83d, 0xddc2, 0x3a, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x69,\n0x6e, 0x64, 0x65, 0x78, 0x5f, 0x64, 0x69, 0x76, 0x69, 0x64, 0x65, 0x72,\n0x73, 0x3a, 0x63, 0x61, 0x72, 0x64, 0x64, 0x69, 0x76, 0x69, 0x64, 0x65,\n0x72, 0x73, 0x69, 0x6e, 0x64, 0x65, 0x78, 0xd83d, 0xddc2, 0x3a, 0x64, 0x69,\n0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x64, 0x69, 0x76, 0x69, 0x64,\n0x65, 0x72, 0x73, 0xd83d, 0xddde, 0x3a, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x64,\n0x5f, 0x75, 0x70, 0x5f, 0x6e, 0x65, 0x77, 0x73, 0x70, 0x61, 0x70, 0x65,\n0x72, 0x3a, 0x6e, 0x65, 0x77, 0x73, 0x70, 0x61, 0x70, 0x65, 0x72, 0x72,\n0x6f, 0x6c, 0x6c, 0x65, 0x64, 0x75, 0x70, 0xd83d, 0xddde, 0x3a, 0x6e, 0x65,\n0x77, 0x73, 0x70, 0x61, 0x70, 0x65, 0x72, 0x32, 0x3a, 0x6e, 0x65, 0x77,\n0x73, 0x70, 0x61, 0x70, 0x65, 0x72, 0x32, 0xd83d, 0xdcf0, 0x3a, 0x6e, 0x65,\n0x77, 0x73, 0x70, 0x61, 0x70, 0x65, 0x72, 0x3a, 0x6e, 0x65, 0x77, 0x73,\n0x70, 0x61, 0x70, 0x65, 0x72, 0xd83d, 0xdcd3, 0x3a, 0x6e, 0x6f, 0x74, 0x65,\n0x62, 0x6f, 0x6f, 0x6b, 0x3a, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f,\n0x6b, 0xd83d, 0xdcd4, 0x3a, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b,\n0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61,\n0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x3a, 0x63,\n0x6f, 0x76, 0x65, 0x72, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x69,\n0x76, 0x65, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x77, 0x69,\n0x74, 0x68, 0xd83d, 0xdcd2, 0x3a, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x3a,\n0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0xd83d, 0xdcd5, 0x3a, 0x63, 0x6c, 0x6f,\n0x73, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6b, 0x3a, 0x62, 0x6f, 0x6f,\n0x6b, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0xd83d, 0xdcd7, 0x3a, 0x67, 0x72,\n0x65, 0x65, 0x6e, 0x5f, 0x62, 0x6f, 0x6f, 0x6b, 0x3a, 0x62, 0x6f, 0x6f,\n0x6b, 0x67, 0x72, 0x65, 0x65, 0x6e, 0xd83d, 0xdcd8, 0x3a, 0x62, 0x6c, 0x75,\n0x65, 0x5f, 0x62, 0x6f, 0x6f, 0x6b, 0x3a, 0x62, 0x6c, 0x75, 0x65, 0x62,\n0x6f, 0x6f, 0x6b, 0xd83d, 0xdcd9, 0x3a, 0x6f, 0x72, 0x61, 0x6e, 0x67, 0x65,\n0x5f, 0x62, 0x6f, 0x6f, 0x6b, 0x3a, 0x62, 0x6f, 0x6f, 0x6b, 0x6f, 0x72,\n0x61, 0x6e, 0x67, 0x65, 0xd83d, 0xdcda, 0x3a, 0x62, 0x6f, 0x6f, 0x6b, 0x73,\n0x3a, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0xd83d, 0xdcd6, 0x3a, 0x62, 0x6f, 0x6f,\n0x6b, 0x3a, 0x62, 0x6f, 0x6f, 0x6b, 0xd83d, 0xdd16, 0x3a, 0x62, 0x6f, 0x6f,\n0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x3a, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61,\n0x72, 0x6b, 0xd83d, 0xdd17, 0x3a, 0x6c, 0x69, 0x6e, 0x6b, 0x3a, 0x6c, 0x69,\n0x6e, 0x6b, 0xd83d, 0xdcce, 0x3a, 0x70, 0x61, 0x70, 0x65, 0x72, 0x63, 0x6c,\n0x69, 0x70, 0x3a, 0x70, 0x61, 0x70, 0x65, 0x72, 0x63, 0x6c, 0x69, 0x70,\n0xd83d, 0xdd87, 0x3a, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x5f, 0x70, 0x61,\n0x70, 0x65, 0x72, 0x63, 0x6c, 0x69, 0x70, 0x73, 0x3a, 0x6c, 0x69, 0x6e,\n0x6b, 0x65, 0x64, 0x70, 0x61, 0x70, 0x65, 0x72, 0x63, 0x6c, 0x69, 0x70,\n0x73, 0xd83d, 0xdd87, 0x3a, 0x70, 0x61, 0x70, 0x65, 0x72, 0x63, 0x6c, 0x69,\n0x70, 0x73, 0x3a, 0x70, 0x61, 0x70, 0x65, 0x72, 0x63, 0x6c, 0x69, 0x70,\n0x73, 0xd83d, 0xdcd0, 0x3a, 0x74, 0x72, 0x69, 0x61, 0x6e, 0x67, 0x75, 0x6c,\n0x61, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x72, 0x3a, 0x72, 0x75, 0x6c,\n0x65, 0x72, 0x74, 0x72, 0x69, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72,\n0xd83d, 0xdccf, 0x3a, 0x73, 0x74, 0x72, 0x61, 0x69, 0x67, 0x68, 0x74, 0x5f,\n0x72, 0x75, 0x6c, 0x65, 0x72, 0x3a, 0x72, 0x75, 0x6c, 0x65, 0x72, 0x73,\n0x74, 0x72, 0x61, 0x69, 0x67, 0x68, 0x74, 0xd83d, 0xdccc, 0x3a, 0x70, 0x75,\n0x73, 0x68, 0x70, 0x69, 0x6e, 0x3a, 0x70, 0x75, 0x73, 0x68, 0x70, 0x69,\n0x6e, 0xd83d, 0xdccd, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x75,\n0x73, 0x68, 0x70, 0x69, 0x6e, 0x3a, 0x70, 0x75, 0x73, 0x68, 0x70, 0x69,\n0x6e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2702, 0xfe0f, 0x3a, 0x73, 0x63, 0x69,\n0x73, 0x73, 0x6f, 0x72, 0x73, 0x3a, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f,\n0x72, 0x73, 0xd83d, 0xdd8a, 0x3a, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x6c,\n0x65, 0x66, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x6c, 0x70, 0x6f, 0x69, 0x6e,\n0x74, 0x5f, 0x70, 0x65, 0x6e, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x70, 0x6f,\n0x69, 0x6e, 0x74, 0x6c, 0x65, 0x66, 0x74, 0x6c, 0x6f, 0x77, 0x65, 0x72,\n0x70, 0x65, 0x6e, 0xd83d, 0xdd8a, 0x3a, 0x70, 0x65, 0x6e, 0x5f, 0x62, 0x61,\n0x6c, 0x6c, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x3a, 0x62, 0x61, 0x6c, 0x6c,\n0x70, 0x6f, 0x69, 0x6e, 0x74, 0x70, 0x65, 0x6e, 0xd83d, 0xdd8b, 0x3a, 0x6c,\n0x6f, 0x77, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x66, 0x6f,\n0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x65, 0x6e, 0x3a, 0x66,\n0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x6c, 0x65, 0x66, 0x74, 0x6c,\n0x6f, 0x77, 0x65, 0x72, 0x70, 0x65, 0x6e, 0xd83d, 0xdd8b, 0x3a, 0x70, 0x65,\n0x6e, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x3a, 0x66,\n0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x70, 0x65, 0x6e, 0x2712, 0xfe0f,\n0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x6e, 0x69, 0x62, 0x3a, 0x62,\n0x6c, 0x61, 0x63, 0x6b, 0x6e, 0x69, 0x62, 0xd83d, 0xdd8c, 0x3a, 0x6c, 0x6f,\n0x77, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x70, 0x61, 0x69,\n0x6e, 0x74, 0x62, 0x72, 0x75, 0x73, 0x68, 0x3a, 0x6c, 0x65, 0x66, 0x74,\n0x6c, 0x6f, 0x77, 0x65, 0x72, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x62, 0x72,\n0x75, 0x73, 0x68, 0xd83d, 0xdd8c, 0x3a, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x62,\n0x72, 0x75, 0x73, 0x68, 0x3a, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x62, 0x72,\n0x75, 0x73, 0x68, 0xd83d, 0xdd8d, 0x3a, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f,\n0x6c, 0x65, 0x66, 0x74, 0x5f, 0x63, 0x72, 0x61, 0x79, 0x6f, 0x6e, 0x3a,\n0x63, 0x72, 0x61, 0x79, 0x6f, 0x6e, 0x6c, 0x65, 0x66, 0x74, 0x6c, 0x6f,\n0x77, 0x65, 0x72, 0xd83d, 0xdd8d, 0x3a, 0x63, 0x72, 0x61, 0x79, 0x6f, 0x6e,\n0x3a, 0x63, 0x72, 0x61, 0x79, 0x6f, 0x6e, 0xd83d, 0xdcdd, 0x3a, 0x6d, 0x65,\n0x6d, 0x6f, 0x3a, 0x6d, 0x65, 0x6d, 0x6f, 0xd83d, 0xdcdd, 0x3a, 0x70, 0x65,\n0x6e, 0x63, 0x69, 0x6c, 0x3a, 0x70, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x270f,\n0xfe0f, 0x3a, 0x70, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x32, 0x3a, 0x70, 0x65,\n0x6e, 0x63, 0x69, 0x6c, 0x32, 0xd83d, 0xdd0d, 0x3a, 0x6d, 0x61, 0x67, 0x3a,\n0x6d, 0x61, 0x67, 0xd83d, 0xdd0e, 0x3a, 0x6d, 0x61, 0x67, 0x5f, 0x72, 0x69,\n0x67, 0x68, 0x74, 0x3a, 0x6d, 0x61, 0x67, 0x72, 0x69, 0x67, 0x68, 0x74,\n0xd83d, 0xdd0f, 0x3a, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x77, 0x69, 0x74, 0x68,\n0x5f, 0x69, 0x6e, 0x6b, 0x5f, 0x70, 0x65, 0x6e, 0x3a, 0x69, 0x6e, 0x6b,\n0x6c, 0x6f, 0x63, 0x6b, 0x70, 0x65, 0x6e, 0x77, 0x69, 0x74, 0x68, 0xd83d,\n0xdd10, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x63,\n0x6b, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x3a, 0x63,\n0x6c, 0x6f, 0x73, 0x65, 0x64, 0x6b, 0x65, 0x79, 0x6c, 0x6f, 0x63, 0x6b,\n0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdd12, 0x3a, 0x6c, 0x6f, 0x63, 0x6b, 0x3a,\n0x6c, 0x6f, 0x63, 0x6b, 0xd83d, 0xdd13, 0x3a, 0x75, 0x6e, 0x6c, 0x6f, 0x63,\n0x6b, 0x3a, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x2764, 0xfe0f, 0x3a, 0x68,\n0x65, 0x61, 0x72, 0x74, 0x3a, 0x68, 0x65, 0x61, 0x72, 0x74, 0xd83d, 0xdc9b,\n0x3a, 0x79, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x68, 0x65, 0x61, 0x72,\n0x74, 0x3a, 0x68, 0x65, 0x61, 0x72, 0x74, 0x79, 0x65, 0x6c, 0x6c, 0x6f,\n0x77, 0xd83d, 0xdc9a, 0x3a, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x5f, 0x68, 0x65,\n0x61, 0x72, 0x74, 0x3a, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x68, 0x65, 0x61,\n0x72, 0x74, 0xd83d, 0xdc99, 0x3a, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x68, 0x65,\n0x61, 0x72, 0x74, 0x3a, 0x62, 0x6c, 0x75, 0x65, 0x68, 0x65, 0x61, 0x72,\n0x74, 0xd83d, 0xdc9c, 0x3a, 0x70, 0x75, 0x72, 0x70, 0x6c, 0x65, 0x5f, 0x68,\n0x65, 0x61, 0x72, 0x74, 0x3a, 0x68, 0x65, 0x61, 0x72, 0x74, 0x70, 0x75,\n0x72, 0x70, 0x6c, 0x65, 0xd83d, 0xdda4, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b,\n0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b,\n0x68, 0x65, 0x61, 0x72, 0x74, 0xd83d, 0xdc94, 0x3a, 0x62, 0x72, 0x6f, 0x6b,\n0x65, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x3a, 0x62, 0x72, 0x6f,\n0x6b, 0x65, 0x6e, 0x68, 0x65, 0x61, 0x72, 0x74, 0x2763, 0xfe0f, 0x3a, 0x68,\n0x65, 0x61, 0x76, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x5f, 0x65,\n0x78, 0x63, 0x6c, 0x61, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,\n0x61, 0x72, 0x6b, 0x5f, 0x6f, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74,\n0x3a, 0x65, 0x78, 0x63, 0x6c, 0x61, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n0x68, 0x65, 0x61, 0x72, 0x74, 0x68, 0x65, 0x61, 0x76, 0x79, 0x6d, 0x61,\n0x72, 0x6b, 0x6f, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2763, 0xfe0f,\n0x3a, 0x68, 0x65, 0x61, 0x72, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x61,\n0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x65, 0x78, 0x63, 0x6c, 0x61,\n0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x68, 0x65, 0x61, 0x72, 0x74, 0xd83d,\n0xdc95, 0x3a, 0x74, 0x77, 0x6f, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x73,\n0x3a, 0x68, 0x65, 0x61, 0x72, 0x74, 0x73, 0x74, 0x77, 0x6f, 0xd83d, 0xdc9e,\n0x3a, 0x72, 0x65, 0x76, 0x6f, 0x6c, 0x76, 0x69, 0x6e, 0x67, 0x5f, 0x68,\n0x65, 0x61, 0x72, 0x74, 0x73, 0x3a, 0x68, 0x65, 0x61, 0x72, 0x74, 0x73,\n0x72, 0x65, 0x76, 0x6f, 0x6c, 0x76, 0x69, 0x6e, 0x67, 0xd83d, 0xdc93, 0x3a,\n0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x3a, 0x68, 0x65,\n0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0xd83d, 0xdc97, 0x3a, 0x68, 0x65,\n0x61, 0x72, 0x74, 0x70, 0x75, 0x6c, 0x73, 0x65, 0x3a, 0x68, 0x65, 0x61,\n0x72, 0x74, 0x70, 0x75, 0x6c, 0x73, 0x65, 0xd83d, 0xdc96, 0x3a, 0x73, 0x70,\n0x61, 0x72, 0x6b, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x72,\n0x74, 0x3a, 0x68, 0x65, 0x61, 0x72, 0x74, 0x73, 0x70, 0x61, 0x72, 0x6b,\n0x6c, 0x69, 0x6e, 0x67, 0xd83d, 0xdc98, 0x3a, 0x63, 0x75, 0x70, 0x69, 0x64,\n0x3a, 0x63, 0x75, 0x70, 0x69, 0x64, 0xd83d, 0xdc9d, 0x3a, 0x67, 0x69, 0x66,\n0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x3a, 0x67, 0x69, 0x66, 0x74,\n0x68, 0x65, 0x61, 0x72, 0x74, 0xd83d, 0xdc9f, 0x3a, 0x68, 0x65, 0x61, 0x72,\n0x74, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n0x3a, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x68,\n0x65, 0x61, 0x72, 0x74, 0x262e, 0xfe0f, 0x3a, 0x70, 0x65, 0x61, 0x63, 0x65,\n0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x3a, 0x70, 0x65, 0x61, 0x63,\n0x65, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x262e, 0xfe0f, 0x3a, 0x70, 0x65,\n0x61, 0x63, 0x65, 0x3a, 0x70, 0x65, 0x61, 0x63, 0x65, 0x271d, 0xfe0f, 0x3a,\n0x6c, 0x61, 0x74, 0x69, 0x6e, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x3a,\n0x63, 0x72, 0x6f, 0x73, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x271d, 0xfe0f,\n0x3a, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x3a, 0x63, 0x72, 0x6f, 0x73, 0x73,\n0x262a, 0xfe0f, 0x3a, 0x73, 0x74, 0x61, 0x72, 0x5f, 0x61, 0x6e, 0x64, 0x5f,\n0x63, 0x72, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x74, 0x3a, 0x61, 0x6e, 0x64,\n0x63, 0x72, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x74, 0x73, 0x74, 0x61, 0x72,\n0xd83d, 0xdd49, 0x3a, 0x6f, 0x6d, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c,\n0x3a, 0x6f, 0x6d, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x2638, 0xfe0f, 0x3a,\n0x77, 0x68, 0x65, 0x65, 0x6c, 0x5f, 0x6f, 0x66, 0x5f, 0x64, 0x68, 0x61,\n0x72, 0x6d, 0x61, 0x3a, 0x64, 0x68, 0x61, 0x72, 0x6d, 0x61, 0x6f, 0x66,\n0x77, 0x68, 0x65, 0x65, 0x6c, 0x2721, 0xfe0f, 0x3a, 0x73, 0x74, 0x61, 0x72,\n0x5f, 0x6f, 0x66, 0x5f, 0x64, 0x61, 0x76, 0x69, 0x64, 0x3a, 0x64, 0x61,\n0x76, 0x69, 0x64, 0x6f, 0x66, 0x73, 0x74, 0x61, 0x72, 0xd83d, 0xdd2f, 0x3a,\n0x73, 0x69, 0x78, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x5f,\n0x73, 0x74, 0x61, 0x72, 0x3a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x64,\n0x73, 0x69, 0x78, 0x73, 0x74, 0x61, 0x72, 0xd83d, 0xdd4e, 0x3a, 0x6d, 0x65,\n0x6e, 0x6f, 0x72, 0x61, 0x68, 0x3a, 0x6d, 0x65, 0x6e, 0x6f, 0x72, 0x61,\n0x68, 0x262f, 0xfe0f, 0x3a, 0x79, 0x69, 0x6e, 0x5f, 0x79, 0x61, 0x6e, 0x67,\n0x3a, 0x79, 0x61, 0x6e, 0x67, 0x79, 0x69, 0x6e, 0x2626, 0xfe0f, 0x3a, 0x6f,\n0x72, 0x74, 0x68, 0x6f, 0x64, 0x6f, 0x78, 0x5f, 0x63, 0x72, 0x6f, 0x73,\n0x73, 0x3a, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x6f, 0x72, 0x74, 0x68, 0x6f,\n0x64, 0x6f, 0x78, 0xd83d, 0xded0, 0x3a, 0x77, 0x6f, 0x72, 0x73, 0x68, 0x69,\n0x70, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x3a, 0x73, 0x79, 0x6d,\n0x62, 0x6f, 0x6c, 0x77, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0xd83d, 0xded0,\n0x3a, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x66, 0x5f, 0x77, 0x6f,\n0x72, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x6f, 0x66, 0x70, 0x6c, 0x61, 0x63,\n0x65, 0x77, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x26ce, 0x3a, 0x6f, 0x70,\n0x68, 0x69, 0x75, 0x63, 0x68, 0x75, 0x73, 0x3a, 0x6f, 0x70, 0x68, 0x69,\n0x75, 0x63, 0x68, 0x75, 0x73, 0x2648, 0xfe0f, 0x3a, 0x61, 0x72, 0x69, 0x65,\n0x73, 0x3a, 0x61, 0x72, 0x69, 0x65, 0x73, 0x2649, 0xfe0f, 0x3a, 0x74, 0x61,\n0x75, 0x72, 0x75, 0x73, 0x3a, 0x74, 0x61, 0x75, 0x72, 0x75, 0x73, 0x264a,\n0xfe0f, 0x3a, 0x67, 0x65, 0x6d, 0x69, 0x6e, 0x69, 0x3a, 0x67, 0x65, 0x6d,\n0x69, 0x6e, 0x69, 0x264b, 0xfe0f, 0x3a, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x72,\n0x3a, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x264c, 0xfe0f, 0x3a, 0x6c, 0x65,\n0x6f, 0x3a, 0x6c, 0x65, 0x6f, 0x264d, 0xfe0f, 0x3a, 0x76, 0x69, 0x72, 0x67,\n0x6f, 0x3a, 0x76, 0x69, 0x72, 0x67, 0x6f, 0x264e, 0xfe0f, 0x3a, 0x6c, 0x69,\n0x62, 0x72, 0x61, 0x3a, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x264f, 0xfe0f, 0x3a,\n0x73, 0x63, 0x6f, 0x72, 0x70, 0x69, 0x75, 0x73, 0x3a, 0x73, 0x63, 0x6f,\n0x72, 0x70, 0x69, 0x75, 0x73, 0x2650, 0xfe0f, 0x3a, 0x73, 0x61, 0x67, 0x69,\n0x74, 0x74, 0x61, 0x72, 0x69, 0x75, 0x73, 0x3a, 0x73, 0x61, 0x67, 0x69,\n0x74, 0x74, 0x61, 0x72, 0x69, 0x75, 0x73, 0x2651, 0xfe0f, 0x3a, 0x63, 0x61,\n0x70, 0x72, 0x69, 0x63, 0x6f, 0x72, 0x6e, 0x3a, 0x63, 0x61, 0x70, 0x72,\n0x69, 0x63, 0x6f, 0x72, 0x6e, 0x2652, 0xfe0f, 0x3a, 0x61, 0x71, 0x75, 0x61,\n0x72, 0x69, 0x75, 0x73, 0x3a, 0x61, 0x71, 0x75, 0x61, 0x72, 0x69, 0x75,\n0x73, 0x2653, 0xfe0f, 0x3a, 0x70, 0x69, 0x73, 0x63, 0x65, 0x73, 0x3a, 0x70,\n0x69, 0x73, 0x63, 0x65, 0x73, 0xd83c, 0xdd94, 0x3a, 0x69, 0x64, 0x3a, 0x69,\n0x64, 0x269b, 0xfe0f, 0x3a, 0x61, 0x74, 0x6f, 0x6d, 0x5f, 0x73, 0x79, 0x6d,\n0x62, 0x6f, 0x6c, 0x3a, 0x61, 0x74, 0x6f, 0x6d, 0x73, 0x79, 0x6d, 0x62,\n0x6f, 0x6c, 0x269b, 0xfe0f, 0x3a, 0x61, 0x74, 0x6f, 0x6d, 0x3a, 0x61, 0x74,\n0x6f, 0x6d, 0xd83c, 0xde51, 0x3a, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a,\n0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2622, 0xfe0f, 0x3a, 0x72, 0x61, 0x64,\n0x69, 0x6f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x69, 0x67,\n0x6e, 0x3a, 0x72, 0x61, 0x64, 0x69, 0x6f, 0x61, 0x63, 0x74, 0x69, 0x76,\n0x65, 0x73, 0x69, 0x67, 0x6e, 0x2622, 0xfe0f, 0x3a, 0x72, 0x61, 0x64, 0x69,\n0x6f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x3a, 0x72, 0x61, 0x64, 0x69,\n0x6f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2623, 0xfe0f, 0x3a, 0x62, 0x69,\n0x6f, 0x68, 0x61, 0x7a, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e,\n0x3a, 0x62, 0x69, 0x6f, 0x68, 0x61, 0x7a, 0x61, 0x72, 0x64, 0x73, 0x69,\n0x67, 0x6e, 0x2623, 0xfe0f, 0x3a, 0x62, 0x69, 0x6f, 0x68, 0x61, 0x7a, 0x61,\n0x72, 0x64, 0x3a, 0x62, 0x69, 0x6f, 0x68, 0x61, 0x7a, 0x61, 0x72, 0x64,\n0xd83d, 0xdcf4, 0x3a, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x68,\n0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x3a, 0x6d, 0x6f, 0x62, 0x69,\n0x6c, 0x65, 0x6f, 0x66, 0x66, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0xd83d, 0xdcf3,\n0x3a, 0x76, 0x69, 0x62, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,\n0x6f, 0x64, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x65, 0x76, 0x69, 0x62, 0x72,\n0x61, 0x74, 0x69, 0x6f, 0x6e, 0xd83c, 0xde36, 0x3a, 0x75, 0x36, 0x37, 0x30,\n0x39, 0x3a, 0x75, 0x36, 0x37, 0x30, 0x39, 0xd83c, 0xde1a, 0xfe0f, 0x3a, 0x75,\n0x37, 0x31, 0x32, 0x31, 0x3a, 0x75, 0x37, 0x31, 0x32, 0x31, 0xd83c, 0xde38,\n0x3a, 0x75, 0x37, 0x35, 0x33, 0x33, 0x3a, 0x75, 0x37, 0x35, 0x33, 0x33,\n0xd83c, 0xde3a, 0x3a, 0x75, 0x35, 0x35, 0x62, 0x36, 0x3a, 0x75, 0x35, 0x35,\n0x62, 0x36, 0xd83c, 0xde37, 0x3a, 0x75, 0x36, 0x37, 0x30, 0x38, 0x3a, 0x75,\n0x36, 0x37, 0x30, 0x38, 0x2734, 0xfe0f, 0x3a, 0x65, 0x69, 0x67, 0x68, 0x74,\n0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x61,\n0x63, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x3a, 0x62, 0x6c, 0x61, 0x63,\n0x6b, 0x65, 0x69, 0x67, 0x68, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65,\n0x64, 0x73, 0x74, 0x61, 0x72, 0xd83c, 0xdd9a, 0x3a, 0x76, 0x73, 0x3a, 0x76,\n0x73, 0xd83d, 0xdcae, 0x3a, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x66, 0x6c,\n0x6f, 0x77, 0x65, 0x72, 0x3a, 0x66, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x77,\n0x68, 0x69, 0x74, 0x65, 0xd83c, 0xde50, 0x3a, 0x69, 0x64, 0x65, 0x6f, 0x67,\n0x72, 0x61, 0x70, 0x68, 0x5f, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x74, 0x61,\n0x67, 0x65, 0x3a, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x74, 0x61, 0x67, 0x65,\n0x69, 0x64, 0x65, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x3299, 0xfe0f, 0x3a,\n0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x73, 0x65, 0x63, 0x72, 0x65,\n0x74, 0x3297, 0xfe0f, 0x3a, 0x63, 0x6f, 0x6e, 0x67, 0x72, 0x61, 0x74, 0x75,\n0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x63, 0x6f, 0x6e, 0x67,\n0x72, 0x61, 0x74, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xd83c,\n0xde34, 0x3a, 0x75, 0x35, 0x34, 0x30, 0x38, 0x3a, 0x75, 0x35, 0x34, 0x30,\n0x38, 0xd83c, 0xde35, 0x3a, 0x75, 0x36, 0x65, 0x38, 0x30, 0x3a, 0x75, 0x36,\n0x65, 0x38, 0x30, 0xd83c, 0xde39, 0x3a, 0x75, 0x35, 0x32, 0x37, 0x32, 0x3a,\n0x75, 0x35, 0x32, 0x37, 0x32, 0xd83c, 0xde32, 0x3a, 0x75, 0x37, 0x39, 0x38,\n0x31, 0x3a, 0x75, 0x37, 0x39, 0x38, 0x31, 0xd83c, 0xdd70, 0xfe0f, 0x3a, 0x61,\n0x3a, 0x61, 0xd83c, 0xdd71, 0xfe0f, 0x3a, 0x62, 0x3a, 0x62, 0xd83c, 0xdd8e, 0x3a,\n0x61, 0x62, 0x3a, 0x61, 0x62, 0xd83c, 0xdd91, 0x3a, 0x63, 0x6c, 0x3a, 0x63,\n0x6c, 0xd83c, 0xdd7e, 0xfe0f, 0x3a, 0x6f, 0x32, 0x3a, 0x6f, 0x32, 0xd83c, 0xdd98,\n0x3a, 0x73, 0x6f, 0x73, 0x3a, 0x73, 0x6f, 0x73, 0x274c, 0x3a, 0x78, 0x3a,\n0x78, 0x2b55, 0xfe0f, 0x3a, 0x6f, 0x3a, 0x6f, 0xd83d, 0xded1, 0x3a, 0x73, 0x74,\n0x6f, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x73, 0x69, 0x67, 0x6e,\n0x73, 0x74, 0x6f, 0x70, 0xd83d, 0xded1, 0x3a, 0x6f, 0x63, 0x74, 0x61, 0x67,\n0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x6f, 0x63,\n0x74, 0x61, 0x67, 0x6f, 0x6e, 0x61, 0x6c, 0x73, 0x69, 0x67, 0x6e, 0x26d4,\n0xfe0f, 0x3a, 0x6e, 0x6f, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x3a, 0x65,\n0x6e, 0x74, 0x72, 0x79, 0x6e, 0x6f, 0xd83d, 0xdcdb, 0x3a, 0x6e, 0x61, 0x6d,\n0x65, 0x5f, 0x62, 0x61, 0x64, 0x67, 0x65, 0x3a, 0x62, 0x61, 0x64, 0x67,\n0x65, 0x6e, 0x61, 0x6d, 0x65, 0xd83d, 0xdeab, 0x3a, 0x6e, 0x6f, 0x5f, 0x65,\n0x6e, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x65, 0x6e,\n0x74, 0x72, 0x79, 0x6e, 0x6f, 0x73, 0x69, 0x67, 0x6e, 0xd83d, 0xdcaf, 0x3a,\n0x31, 0x30, 0x30, 0x3a, 0x31, 0x30, 0x30, 0xd83d, 0xdca2, 0x3a, 0x61, 0x6e,\n0x67, 0x65, 0x72, 0x3a, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x2668, 0xfe0f, 0x3a,\n0x68, 0x6f, 0x74, 0x73, 0x70, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x68,\n0x6f, 0x74, 0x73, 0x70, 0x72, 0x69, 0x6e, 0x67, 0x73, 0xd83d, 0xdeb7, 0x3a,\n0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x64, 0x65, 0x73, 0x74, 0x72, 0x69, 0x61,\n0x6e, 0x73, 0x3a, 0x6e, 0x6f, 0x70, 0x65, 0x64, 0x65, 0x73, 0x74, 0x72,\n0x69, 0x61, 0x6e, 0x73, 0xd83d, 0xdeaf, 0x3a, 0x64, 0x6f, 0x5f, 0x6e, 0x6f,\n0x74, 0x5f, 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x3a, 0x64, 0x6f, 0x6c,\n0x69, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x6f, 0x74, 0xd83d, 0xdeb3, 0x3a, 0x6e,\n0x6f, 0x5f, 0x62, 0x69, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x3a, 0x62,\n0x69, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x6e, 0x6f, 0xd83d, 0xdeb1, 0x3a,\n0x6e, 0x6f, 0x6e, 0x2d, 0x70, 0x6f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f,\n0x77, 0x61, 0x74, 0x65, 0x72, 0x3a, 0x6e, 0x6f, 0x6e, 0x70, 0x6f, 0x74,\n0x61, 0x62, 0x6c, 0x65, 0x77, 0x61, 0x74, 0x65, 0x72, 0xd83d, 0xdd1e, 0x3a,\n0x75, 0x6e, 0x64, 0x65, 0x72, 0x61, 0x67, 0x65, 0x3a, 0x75, 0x6e, 0x64,\n0x65, 0x72, 0x61, 0x67, 0x65, 0xd83d, 0xdcf5, 0x3a, 0x6e, 0x6f, 0x5f, 0x6d,\n0x6f, 0x62, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x73,\n0x3a, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x6e, 0x6f, 0x70, 0x68, 0x6f,\n0x6e, 0x65, 0x73, 0xd83d, 0xdead, 0x3a, 0x6e, 0x6f, 0x5f, 0x73, 0x6d, 0x6f,\n0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x6e, 0x6f, 0x73, 0x6d, 0x6f, 0x6b, 0x69,\n0x6e, 0x67, 0x2757, 0xfe0f, 0x3a, 0x65, 0x78, 0x63, 0x6c, 0x61, 0x6d, 0x61,\n0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x65, 0x78, 0x63, 0x6c, 0x61, 0x6d, 0x61,\n0x74, 0x69, 0x6f, 0x6e, 0x2755, 0x3a, 0x67, 0x72, 0x65, 0x79, 0x5f, 0x65,\n0x78, 0x63, 0x6c, 0x61, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x65,\n0x78, 0x63, 0x6c, 0x61, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x67, 0x72,\n0x65, 0x79, 0x2753, 0x3a, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e,\n0x3a, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2754, 0x3a, 0x67,\n0x72, 0x65, 0x79, 0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e,\n0x3a, 0x67, 0x72, 0x65, 0x79, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f,\n0x6e, 0x203c, 0xfe0f, 0x3a, 0x62, 0x61, 0x6e, 0x67, 0x62, 0x61, 0x6e, 0x67,\n0x3a, 0x62, 0x61, 0x6e, 0x67, 0x62, 0x61, 0x6e, 0x67, 0x2049, 0xfe0f, 0x3a,\n0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x6f, 0x62, 0x61, 0x6e, 0x67, 0x3a,\n0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x6f, 0x62, 0x61, 0x6e, 0x67, 0xd83d,\n0xdd05, 0x3a, 0x6c, 0x6f, 0x77, 0x5f, 0x62, 0x72, 0x69, 0x67, 0x68, 0x74,\n0x6e, 0x65, 0x73, 0x73, 0x3a, 0x62, 0x72, 0x69, 0x67, 0x68, 0x74, 0x6e,\n0x65, 0x73, 0x73, 0x6c, 0x6f, 0x77, 0xd83d, 0xdd06, 0x3a, 0x68, 0x69, 0x67,\n0x68, 0x5f, 0x62, 0x72, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x65, 0x73, 0x73,\n0x3a, 0x62, 0x72, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x68,\n0x69, 0x67, 0x68, 0x303d, 0xfe0f, 0x3a, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x61,\n0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,\n0x61, 0x72, 0x6b, 0x3a, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74,\n0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x72, 0x6b, 0x70, 0x61, 0x72, 0x74, 0x26a0,\n0xfe0f, 0x3a, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x77, 0x61,\n0x72, 0x6e, 0x69, 0x6e, 0x67, 0xd83d, 0xdeb8, 0x3a, 0x63, 0x68, 0x69, 0x6c,\n0x64, 0x72, 0x65, 0x6e, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x69, 0x6e,\n0x67, 0x3a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x63, 0x72,\n0x6f, 0x73, 0x73, 0x69, 0x6e, 0x67, 0xd83d, 0xdd31, 0x3a, 0x74, 0x72, 0x69,\n0x64, 0x65, 0x6e, 0x74, 0x3a, 0x74, 0x72, 0x69, 0x64, 0x65, 0x6e, 0x74,\n0x269c, 0xfe0f, 0x3a, 0x66, 0x6c, 0x65, 0x75, 0x72, 0x2d, 0x64, 0x65, 0x2d,\n0x6c, 0x69, 0x73, 0x3a, 0x64, 0x65, 0x66, 0x6c, 0x65, 0x75, 0x72, 0x6c,\n0x69, 0x73, 0xd83d, 0xdd30, 0x3a, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x6e, 0x65,\n0x72, 0x3a, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x267b, 0xfe0f,\n0x3a, 0x72, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x3a, 0x72, 0x65, 0x63,\n0x79, 0x63, 0x6c, 0x65, 0x2705, 0x3a, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f,\n0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x3a, 0x63,\n0x68, 0x65, 0x63, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x77, 0x68, 0x69, 0x74,\n0x65, 0xd83c, 0xde2f, 0xfe0f, 0x3a, 0x75, 0x36, 0x33, 0x30, 0x37, 0x3a, 0x75,\n0x36, 0x33, 0x30, 0x37, 0xd83d, 0xdcb9, 0x3a, 0x63, 0x68, 0x61, 0x72, 0x74,\n0x3a, 0x63, 0x68, 0x61, 0x72, 0x74, 0x2747, 0xfe0f, 0x3a, 0x73, 0x70, 0x61,\n0x72, 0x6b, 0x6c, 0x65, 0x3a, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x6c, 0x65,\n0x2733, 0xfe0f, 0x3a, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x70, 0x6f,\n0x6b, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x74, 0x65, 0x72, 0x69, 0x73, 0x6b,\n0x3a, 0x61, 0x73, 0x74, 0x65, 0x72, 0x69, 0x73, 0x6b, 0x65, 0x69, 0x67,\n0x68, 0x74, 0x73, 0x70, 0x6f, 0x6b, 0x65, 0x64, 0x274e, 0x3a, 0x6e, 0x65,\n0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72,\n0x65, 0x64, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x6d, 0x61, 0x72,\n0x6b, 0x3a, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x6d, 0x61, 0x72, 0x6b, 0x6e,\n0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x71, 0x75, 0x61, 0x72,\n0x65, 0x64, 0xd83c, 0xdf10, 0x3a, 0x67, 0x6c, 0x6f, 0x62, 0x65, 0x5f, 0x77,\n0x69, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x72, 0x69, 0x64, 0x69, 0x61, 0x6e,\n0x73, 0x3a, 0x67, 0x6c, 0x6f, 0x62, 0x65, 0x6d, 0x65, 0x72, 0x69, 0x64,\n0x69, 0x61, 0x6e, 0x73, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdca0, 0x3a, 0x64,\n0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x5f, 0x73, 0x68, 0x61, 0x70, 0x65,\n0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x61, 0x5f, 0x64, 0x6f, 0x74, 0x5f,\n0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x3a, 0x61, 0x64, 0x69, 0x61, 0x6d,\n0x6f, 0x6e, 0x64, 0x64, 0x6f, 0x74, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65,\n0x73, 0x68, 0x61, 0x70, 0x65, 0x77, 0x69, 0x74, 0x68, 0x24c2, 0xfe0f, 0x3a,\n0x6d, 0x3a, 0x6d, 0xd83c, 0xdf00, 0x3a, 0x63, 0x79, 0x63, 0x6c, 0x6f, 0x6e,\n0x65, 0x3a, 0x63, 0x79, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0xd83d, 0xdca4, 0x3a,\n0x7a, 0x7a, 0x7a, 0x3a, 0x7a, 0x7a, 0x7a, 0xd83c, 0xdfe7, 0x3a, 0x61, 0x74,\n0x6d, 0x3a, 0x61, 0x74, 0x6d, 0xd83d, 0xdebe, 0x3a, 0x77, 0x63, 0x3a, 0x77,\n0x63, 0x267f, 0xfe0f, 0x3a, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x63, 0x68, 0x61,\n0x69, 0x72, 0x3a, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x63, 0x68, 0x61, 0x69,\n0x72, 0xd83c, 0xdd7f, 0xfe0f, 0x3a, 0x70, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x67,\n0x3a, 0x70, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0xd83c, 0xde33, 0x3a, 0x75,\n0x37, 0x61, 0x37, 0x61, 0x3a, 0x75, 0x37, 0x61, 0x37, 0x61, 0xd83c, 0xde02,\n0x3a, 0x73, 0x61, 0x3a, 0x73, 0x61, 0xd83d, 0xdec2, 0x3a, 0x70, 0x61, 0x73,\n0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,\n0x6c, 0x3a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x61, 0x73,\n0x73, 0x70, 0x6f, 0x72, 0x74, 0xd83d, 0xdec3, 0x3a, 0x63, 0x75, 0x73, 0x74,\n0x6f, 0x6d, 0x73, 0x3a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0xd83d,\n0xdec4, 0x3a, 0x62, 0x61, 0x67, 0x67, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c,\n0x61, 0x69, 0x6d, 0x3a, 0x62, 0x61, 0x67, 0x67, 0x61, 0x67, 0x65, 0x63,\n0x6c, 0x61, 0x69, 0x6d, 0xd83d, 0xdec5, 0x3a, 0x6c, 0x65, 0x66, 0x74, 0x5f,\n0x6c, 0x75, 0x67, 0x67, 0x61, 0x67, 0x65, 0x3a, 0x6c, 0x65, 0x66, 0x74,\n0x6c, 0x75, 0x67, 0x67, 0x61, 0x67, 0x65, 0xd83d, 0xdeb9, 0x3a, 0x6d, 0x65,\n0x6e, 0x73, 0x3a, 0x6d, 0x65, 0x6e, 0x73, 0xd83d, 0xdeba, 0x3a, 0x77, 0x6f,\n0x6d, 0x65, 0x6e, 0x73, 0x3a, 0x77, 0x6f, 0x6d, 0x65, 0x6e, 0x73, 0xd83d,\n0xdebc, 0x3a, 0x62, 0x61, 0x62, 0x79, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f,\n0x6c, 0x3a, 0x62, 0x61, 0x62, 0x79, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c,\n0xd83d, 0xdebb, 0x3a, 0x72, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x6f, 0x6d, 0x3a,\n0x72, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x6f, 0x6d, 0xd83d, 0xdeae, 0x3a, 0x70,\n0x75, 0x74, 0x5f, 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x6e,\n0x5f, 0x69, 0x74, 0x73, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x3a, 0x69,\n0x6e, 0x69, 0x74, 0x73, 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x70, 0x6c,\n0x61, 0x63, 0x65, 0x70, 0x75, 0x74, 0xd83c, 0xdfa6, 0x3a, 0x63, 0x69, 0x6e,\n0x65, 0x6d, 0x61, 0x3a, 0x63, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0xd83d, 0xdcf6,\n0x3a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x65,\n0x6e, 0x67, 0x74, 0x68, 0x3a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73,\n0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0xd83c, 0xde01, 0x3a, 0x6b, 0x6f,\n0x6b, 0x6f, 0x3a, 0x6b, 0x6f, 0x6b, 0x6f, 0xd83d, 0xdd23, 0x3a, 0x73, 0x79,\n0x6d, 0x62, 0x6f, 0x6c, 0x73, 0x3a, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c,\n0x73, 0x2139, 0xfe0f, 0x3a, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,\n0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x69,\n0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x6f,\n0x75, 0x72, 0x63, 0x65, 0xd83d, 0xdd24, 0x3a, 0x61, 0x62, 0x63, 0x3a, 0x61,\n0x62, 0x63, 0xd83d, 0xdd21, 0x3a, 0x61, 0x62, 0x63, 0x64, 0x3a, 0x61, 0x62,\n0x63, 0x64, 0xd83d, 0xdd20, 0x3a, 0x63, 0x61, 0x70, 0x69, 0x74, 0x61, 0x6c,\n0x5f, 0x61, 0x62, 0x63, 0x64, 0x3a, 0x61, 0x62, 0x63, 0x64, 0x63, 0x61,\n0x70, 0x69, 0x74, 0x61, 0x6c, 0xd83c, 0xdd96, 0x3a, 0x6e, 0x67, 0x3a, 0x6e,\n0x67, 0xd83c, 0xdd97, 0x3a, 0x6f, 0x6b, 0x3a, 0x6f, 0x6b, 0xd83c, 0xdd99, 0x3a,\n0x75, 0x70, 0x3a, 0x75, 0x70, 0xd83c, 0xdd92, 0x3a, 0x63, 0x6f, 0x6f, 0x6c,\n0x3a, 0x63, 0x6f, 0x6f, 0x6c, 0xd83c, 0xdd95, 0x3a, 0x6e, 0x65, 0x77, 0x3a,\n0x6e, 0x65, 0x77, 0xd83c, 0xdd93, 0x3a, 0x66, 0x72, 0x65, 0x65, 0x3a, 0x66,\n0x72, 0x65, 0x65, 0x30, 0xfe0f, 0x20e3, 0x3a, 0x7a, 0x65, 0x72, 0x6f, 0x3a,\n0x7a, 0x65, 0x72, 0x6f, 0x31, 0xfe0f, 0x20e3, 0x3a, 0x6f, 0x6e, 0x65, 0x3a,\n0x6f, 0x6e, 0x65, 0x32, 0xfe0f, 0x20e3, 0x3a, 0x74, 0x77, 0x6f, 0x3a, 0x74,\n0x77, 0x6f, 0x33, 0xfe0f, 0x20e3, 0x3a, 0x74, 0x68, 0x72, 0x65, 0x65, 0x3a,\n0x74, 0x68, 0x72, 0x65, 0x65, 0x34, 0xfe0f, 0x20e3, 0x3a, 0x66, 0x6f, 0x75,\n0x72, 0x3a, 0x66, 0x6f, 0x75, 0x72, 0x35, 0xfe0f, 0x20e3, 0x3a, 0x66, 0x69,\n0x76, 0x65, 0x3a, 0x66, 0x69, 0x76, 0x65, 0x36, 0xfe0f, 0x20e3, 0x3a, 0x73,\n0x69, 0x78, 0x3a, 0x73, 0x69, 0x78, 0x37, 0xfe0f, 0x20e3, 0x3a, 0x73, 0x65,\n0x76, 0x65, 0x6e, 0x3a, 0x73, 0x65, 0x76, 0x65, 0x6e, 0x38, 0xfe0f, 0x20e3,\n0x3a, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x65, 0x69, 0x67, 0x68, 0x74,\n0x39, 0xfe0f, 0x20e3, 0x3a, 0x6e, 0x69, 0x6e, 0x65, 0x3a, 0x6e, 0x69, 0x6e,\n0x65, 0xd83d, 0xdd1f, 0x3a, 0x6b, 0x65, 0x79, 0x63, 0x61, 0x70, 0x5f, 0x74,\n0x65, 0x6e, 0x3a, 0x6b, 0x65, 0x79, 0x63, 0x61, 0x70, 0x74, 0x65, 0x6e,\n0xd83d, 0xdd22, 0x3a, 0x31, 0x32, 0x33, 0x34, 0x3a, 0x31, 0x32, 0x33, 0x34,\n0x23, 0xfe0f, 0x20e3, 0x3a, 0x68, 0x61, 0x73, 0x68, 0x3a, 0x68, 0x61, 0x73,\n0x68, 0x2a, 0xfe0f, 0x20e3, 0x3a, 0x6b, 0x65, 0x79, 0x63, 0x61, 0x70, 0x5f,\n0x61, 0x73, 0x74, 0x65, 0x72, 0x69, 0x73, 0x6b, 0x3a, 0x61, 0x73, 0x74,\n0x65, 0x72, 0x69, 0x73, 0x6b, 0x6b, 0x65, 0x79, 0x63, 0x61, 0x70, 0x2a,\n0xfe0f, 0x20e3, 0x3a, 0x61, 0x73, 0x74, 0x65, 0x72, 0x69, 0x73, 0x6b, 0x3a,\n0x61, 0x73, 0x74, 0x65, 0x72, 0x69, 0x73, 0x6b, 0x25b6, 0xfe0f, 0x3a, 0x61,\n0x72, 0x72, 0x6f, 0x77, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64,\n0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72,\n0x64, 0x23f8, 0x3a, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x65,\n0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x72, 0x3a, 0x62,\n0x61, 0x72, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x74,\n0x69, 0x63, 0x61, 0x6c, 0x23f8, 0x3a, 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f,\n0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x3a, 0x62, 0x75, 0x74, 0x74, 0x6f,\n0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x23ef, 0x3a, 0x70, 0x6c, 0x61, 0x79,\n0x5f, 0x70, 0x61, 0x75, 0x73, 0x65, 0x3a, 0x70, 0x61, 0x75, 0x73, 0x65,\n0x70, 0x6c, 0x61, 0x79, 0x23f9, 0x3a, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x62,\n0x75, 0x74, 0x74, 0x6f, 0x6e, 0x3a, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,\n0x73, 0x74, 0x6f, 0x70, 0x23fa, 0x3a, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64,\n0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x3a, 0x62, 0x75, 0x74, 0x74,\n0x6f, 0x6e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x23ed, 0x3a, 0x6e, 0x65,\n0x78, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x3a, 0x6e, 0x65, 0x78,\n0x74, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x23ed, 0x3a, 0x74, 0x72, 0x61, 0x63,\n0x6b, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x3a, 0x6e, 0x65, 0x78, 0x74, 0x74,\n0x72, 0x61, 0x63, 0x6b, 0x23ee, 0x3a, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f,\n0x75, 0x73, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x3a, 0x70, 0x72, 0x65,\n0x76, 0x69, 0x6f, 0x75, 0x73, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x23ee, 0x3a,\n0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f,\n0x75, 0x73, 0x3a, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x74,\n0x72, 0x61, 0x63, 0x6b, 0x23e9, 0x3a, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x66,\n0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x3a, 0x66, 0x61, 0x73, 0x74, 0x66,\n0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x23ea, 0x3a, 0x72, 0x65, 0x77, 0x69,\n0x6e, 0x64, 0x3a, 0x72, 0x65, 0x77, 0x69, 0x6e, 0x64, 0x23eb, 0x3a, 0x61,\n0x72, 0x72, 0x6f, 0x77, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f,\n0x75, 0x70, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x64, 0x6f, 0x75, 0x62,\n0x6c, 0x65, 0x75, 0x70, 0x23ec, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x5f,\n0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x3a,\n0x61, 0x72, 0x72, 0x6f, 0x77, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x64,\n0x6f, 0x77, 0x6e, 0x25c0, 0xfe0f, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x5f,\n0x62, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0x3a, 0x61, 0x72, 0x72,\n0x6f, 0x77, 0x62, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0xd83d, 0xdd3c,\n0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x75, 0x70, 0x5f, 0x73, 0x6d,\n0x61, 0x6c, 0x6c, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x73, 0x6d, 0x61,\n0x6c, 0x6c, 0x75, 0x70, 0xd83d, 0xdd3d, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77,\n0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x3a,\n0x61, 0x72, 0x72, 0x6f, 0x77, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x6d, 0x61,\n0x6c, 0x6c, 0x27a1, 0xfe0f, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x72,\n0x69, 0x67, 0x68, 0x74, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x72, 0x69,\n0x67, 0x68, 0x74, 0x2b05, 0xfe0f, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x5f,\n0x6c, 0x65, 0x66, 0x74, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x6c, 0x65,\n0x66, 0x74, 0x2b06, 0xfe0f, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x75,\n0x70, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x75, 0x70, 0x2b07, 0xfe0f, 0x3a,\n0x61, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x3a, 0x61,\n0x72, 0x72, 0x6f, 0x77, 0x64, 0x6f, 0x77, 0x6e, 0x2197, 0xfe0f, 0x3a, 0x61,\n0x72, 0x72, 0x6f, 0x77, 0x5f, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x72,\n0x69, 0x67, 0x68, 0x74, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x72, 0x69,\n0x67, 0x68, 0x74, 0x75, 0x70, 0x70, 0x65, 0x72, 0x2198, 0xfe0f, 0x3a, 0x61,\n0x72, 0x72, 0x6f, 0x77, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x72,\n0x69, 0x67, 0x68, 0x74, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x6c, 0x6f,\n0x77, 0x65, 0x72, 0x72, 0x69, 0x67, 0x68, 0x74, 0x2199, 0xfe0f, 0x3a, 0x61,\n0x72, 0x72, 0x6f, 0x77, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x6c,\n0x65, 0x66, 0x74, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x6c, 0x65, 0x66,\n0x74, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x2196, 0xfe0f, 0x3a, 0x61, 0x72, 0x72,\n0x6f, 0x77, 0x5f, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x66,\n0x74, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x6c, 0x65, 0x66, 0x74, 0x75,\n0x70, 0x70, 0x65, 0x72, 0x2195, 0xfe0f, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77,\n0x5f, 0x75, 0x70, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x3a, 0x61, 0x72, 0x72,\n0x6f, 0x77, 0x64, 0x6f, 0x77, 0x6e, 0x75, 0x70, 0x2194, 0xfe0f, 0x3a, 0x6c,\n0x65, 0x66, 0x74, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x61, 0x72,\n0x72, 0x6f, 0x77, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x6c, 0x65, 0x66,\n0x74, 0x72, 0x69, 0x67, 0x68, 0x74, 0x21aa, 0xfe0f, 0x3a, 0x61, 0x72, 0x72,\n0x6f, 0x77, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x68, 0x6f, 0x6f,\n0x6b, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x68, 0x6f, 0x6f, 0x6b, 0x72,\n0x69, 0x67, 0x68, 0x74, 0x21a9, 0xfe0f, 0x3a, 0x6c, 0x65, 0x66, 0x74, 0x77,\n0x61, 0x72, 0x64, 0x73, 0x5f, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x77,\n0x69, 0x74, 0x68, 0x5f, 0x68, 0x6f, 0x6f, 0x6b, 0x3a, 0x61, 0x72, 0x72,\n0x6f, 0x77, 0x68, 0x6f, 0x6f, 0x6b, 0x6c, 0x65, 0x66, 0x74, 0x77, 0x61,\n0x72, 0x64, 0x73, 0x77, 0x69, 0x74, 0x68, 0x2934, 0xfe0f, 0x3a, 0x61, 0x72,\n0x72, 0x6f, 0x77, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f,\n0x75, 0x70, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x68, 0x65, 0x61, 0x64,\n0x69, 0x6e, 0x67, 0x75, 0x70, 0x2935, 0xfe0f, 0x3a, 0x61, 0x72, 0x72, 0x6f,\n0x77, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x6f,\n0x77, 0x6e, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x64, 0x6f, 0x77, 0x6e,\n0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0xd83d, 0xdd00, 0x3a, 0x74, 0x77,\n0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x77,\n0x61, 0x72, 0x64, 0x73, 0x5f, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x73, 0x3a,\n0x61, 0x72, 0x72, 0x6f, 0x77, 0x73, 0x72, 0x69, 0x67, 0x68, 0x74, 0x77,\n0x61, 0x72, 0x64, 0x73, 0x74, 0x77, 0x69, 0x73, 0x74, 0x65, 0x64, 0xd83d,\n0xdd01, 0x3a, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x3a, 0x72, 0x65, 0x70,\n0x65, 0x61, 0x74, 0xd83d, 0xdd02, 0x3a, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,\n0x5f, 0x6f, 0x6e, 0x65, 0x3a, 0x6f, 0x6e, 0x65, 0x72, 0x65, 0x70, 0x65,\n0x61, 0x74, 0xd83d, 0xdd04, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x73, 0x5f,\n0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6c, 0x6f, 0x63, 0x6b,\n0x77, 0x69, 0x73, 0x65, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x73, 0x63,\n0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x77,\n0x69, 0x73, 0x65, 0xd83d, 0xdd03, 0x3a, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x73,\n0x5f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x77, 0x69, 0x73, 0x65, 0x3a, 0x61,\n0x72, 0x72, 0x6f, 0x77, 0x73, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x77, 0x69,\n0x73, 0x65, 0xd83c, 0xdfb5, 0x3a, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x61, 0x6c,\n0x5f, 0x6e, 0x6f, 0x74, 0x65, 0x3a, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x61,\n0x6c, 0x6e, 0x6f, 0x74, 0x65, 0xd83c, 0xdfb6, 0x3a, 0x6e, 0x6f, 0x74, 0x65,\n0x73, 0x3a, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x2795, 0x3a, 0x68, 0x65, 0x61,\n0x76, 0x79, 0x5f, 0x70, 0x6c, 0x75, 0x73, 0x5f, 0x73, 0x69, 0x67, 0x6e,\n0x3a, 0x68, 0x65, 0x61, 0x76, 0x79, 0x70, 0x6c, 0x75, 0x73, 0x73, 0x69,\n0x67, 0x6e, 0x2796, 0x3a, 0x68, 0x65, 0x61, 0x76, 0x79, 0x5f, 0x6d, 0x69,\n0x6e, 0x75, 0x73, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x68, 0x65, 0x61,\n0x76, 0x79, 0x6d, 0x69, 0x6e, 0x75, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x2797,\n0x3a, 0x68, 0x65, 0x61, 0x76, 0x79, 0x5f, 0x64, 0x69, 0x76, 0x69, 0x73,\n0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x64, 0x69, 0x76,\n0x69, 0x73, 0x69, 0x6f, 0x6e, 0x68, 0x65, 0x61, 0x76, 0x79, 0x73, 0x69,\n0x67, 0x6e, 0x2716, 0xfe0f, 0x3a, 0x68, 0x65, 0x61, 0x76, 0x79, 0x5f, 0x6d,\n0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n0x6e, 0x5f, 0x78, 0x3a, 0x68, 0x65, 0x61, 0x76, 0x79, 0x6d, 0x75, 0x6c,\n0x74, 0x69, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x78,\n0xd83d, 0xdcb2, 0x3a, 0x68, 0x65, 0x61, 0x76, 0x79, 0x5f, 0x64, 0x6f, 0x6c,\n0x6c, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x64, 0x6f, 0x6c,\n0x6c, 0x61, 0x72, 0x68, 0x65, 0x61, 0x76, 0x79, 0x73, 0x69, 0x67, 0x6e,\n0xd83d, 0xdcb1, 0x3a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f,\n0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x3a, 0x63, 0x75, 0x72,\n0x72, 0x65, 0x6e, 0x63, 0x79, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67,\n0x65, 0x2122, 0x3a, 0x74, 0x6d, 0x3a, 0x74, 0x6d, 0xa9, 0x3a, 0x63, 0x6f,\n0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x63, 0x6f, 0x70, 0x79,\n0x72, 0x69, 0x67, 0x68, 0x74, 0xae, 0x3a, 0x72, 0x65, 0x67, 0x69, 0x73,\n0x74, 0x65, 0x72, 0x65, 0x64, 0x3a, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,\n0x65, 0x72, 0x65, 0x64, 0x3030, 0x3a, 0x77, 0x61, 0x76, 0x79, 0x5f, 0x64,\n0x61, 0x73, 0x68, 0x3a, 0x64, 0x61, 0x73, 0x68, 0x77, 0x61, 0x76, 0x79,\n0x27b0, 0x3a, 0x63, 0x75, 0x72, 0x6c, 0x79, 0x5f, 0x6c, 0x6f, 0x6f, 0x70,\n0x3a, 0x63, 0x75, 0x72, 0x6c, 0x79, 0x6c, 0x6f, 0x6f, 0x70, 0x27bf, 0x3a,\n0x6c, 0x6f, 0x6f, 0x70, 0x3a, 0x6c, 0x6f, 0x6f, 0x70, 0xd83d, 0xdd1a, 0x3a,\n0x65, 0x6e, 0x64, 0x3a, 0x65, 0x6e, 0x64, 0xd83d, 0xdd19, 0x3a, 0x62, 0x61,\n0x63, 0x6b, 0x3a, 0x62, 0x61, 0x63, 0x6b, 0xd83d, 0xdd1b, 0x3a, 0x6f, 0x6e,\n0x3a, 0x6f, 0x6e, 0xd83d, 0xdd1d, 0x3a, 0x74, 0x6f, 0x70, 0x3a, 0x74, 0x6f,\n0x70, 0xd83d, 0xdd1c, 0x3a, 0x73, 0x6f, 0x6f, 0x6e, 0x3a, 0x73, 0x6f, 0x6f,\n0x6e, 0x2714, 0xfe0f, 0x3a, 0x68, 0x65, 0x61, 0x76, 0x79, 0x5f, 0x63, 0x68,\n0x65, 0x63, 0x6b, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x3a, 0x63, 0x68, 0x65,\n0x63, 0x6b, 0x68, 0x65, 0x61, 0x76, 0x79, 0x6d, 0x61, 0x72, 0x6b, 0x2611,\n0xfe0f, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x5f, 0x62, 0x6f, 0x78,\n0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x3a,\n0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x62, 0x6f, 0x78, 0x63, 0x68, 0x65,\n0x63, 0x6b, 0x77, 0x69, 0x74, 0x68, 0xd83d, 0xdd18, 0x3a, 0x72, 0x61, 0x64,\n0x69, 0x6f, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x3a, 0x62, 0x75,\n0x74, 0x74, 0x6f, 0x6e, 0x72, 0x61, 0x64, 0x69, 0x6f, 0x26aa, 0xfe0f, 0x3a,\n0x77, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65,\n0x3a, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x77, 0x68, 0x69, 0x74, 0x65,\n0x26ab, 0xfe0f, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x63, 0x69, 0x72,\n0x63, 0x6c, 0x65, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x63, 0x69, 0x72,\n0x63, 0x6c, 0x65, 0xd83d, 0xdd34, 0x3a, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x69,\n0x72, 0x63, 0x6c, 0x65, 0x3a, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x72,\n0x65, 0x64, 0xd83d, 0xdd35, 0x3a, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x69,\n0x72, 0x63, 0x6c, 0x65, 0x3a, 0x62, 0x6c, 0x75, 0x65, 0x63, 0x69, 0x72,\n0x63, 0x6c, 0x65, 0xd83d, 0xdd3a, 0x3a, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x5f,\n0x72, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x69, 0x61, 0x6e, 0x67, 0x6c, 0x65,\n0x3a, 0x72, 0x65, 0x64, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x74, 0x72, 0x69,\n0x61, 0x6e, 0x67, 0x6c, 0x65, 0xd83d, 0xdd3b, 0x3a, 0x73, 0x6d, 0x61, 0x6c,\n0x6c, 0x5f, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x69, 0x61, 0x6e, 0x67,\n0x6c, 0x65, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x3a, 0x64, 0x6f, 0x77, 0x6e,\n0x72, 0x65, 0x64, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x74, 0x72, 0x69, 0x61,\n0x6e, 0x67, 0x6c, 0x65, 0xd83d, 0xdd38, 0x3a, 0x73, 0x6d, 0x61, 0x6c, 0x6c,\n0x5f, 0x6f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x69, 0x61, 0x6d,\n0x6f, 0x6e, 0x64, 0x3a, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x6f,\n0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0xd83d, 0xdd39,\n0x3a, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f,\n0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x3a, 0x62, 0x6c, 0x75, 0x65,\n0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x73, 0x6d, 0x61, 0x6c, 0x6c,\n0xd83d, 0xdd36, 0x3a, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x6f, 0x72, 0x61,\n0x6e, 0x67, 0x65, 0x5f, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x3a,\n0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x6c, 0x61, 0x72, 0x67, 0x65,\n0x6f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0xd83d, 0xdd37, 0x3a, 0x6c, 0x61, 0x72,\n0x67, 0x65, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x69, 0x61, 0x6d,\n0x6f, 0x6e, 0x64, 0x3a, 0x62, 0x6c, 0x75, 0x65, 0x64, 0x69, 0x61, 0x6d,\n0x6f, 0x6e, 0x64, 0x6c, 0x61, 0x72, 0x67, 0x65, 0xd83d, 0xdd33, 0x3a, 0x77,\n0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x5f,\n0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x3a, 0x62, 0x75, 0x74, 0x74, 0x6f,\n0x6e, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x77, 0x68, 0x69, 0x74, 0x65,\n0xd83d, 0xdd32, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x71, 0x75,\n0x61, 0x72, 0x65, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x3a, 0x62,\n0x6c, 0x61, 0x63, 0x6b, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x71,\n0x75, 0x61, 0x72, 0x65, 0x25aa, 0xfe0f, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b,\n0x5f, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72,\n0x65, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x73, 0x6d, 0x61, 0x6c, 0x6c,\n0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x25ab, 0xfe0f, 0x3a, 0x77, 0x68, 0x69,\n0x74, 0x65, 0x5f, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x71, 0x75,\n0x61, 0x72, 0x65, 0x3a, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x73, 0x71, 0x75,\n0x61, 0x72, 0x65, 0x77, 0x68, 0x69, 0x74, 0x65, 0x25fe, 0xfe0f, 0x3a, 0x62,\n0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x5f,\n0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65,\n0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d,\n0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x25fd,\n0xfe0f, 0x3a, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x64, 0x69,\n0x75, 0x6d, 0x5f, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x71, 0x75,\n0x61, 0x72, 0x65, 0x3a, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x73, 0x6d,\n0x61, 0x6c, 0x6c, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x77, 0x68, 0x69,\n0x74, 0x65, 0x25fc, 0xfe0f, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x6d,\n0x65, 0x64, 0x69, 0x75, 0x6d, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65,\n0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d,\n0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x25fb, 0xfe0f, 0x3a, 0x77, 0x68, 0x69,\n0x74, 0x65, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x5f, 0x73, 0x71,\n0x75, 0x61, 0x72, 0x65, 0x3a, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x73,\n0x71, 0x75, 0x61, 0x72, 0x65, 0x77, 0x68, 0x69, 0x74, 0x65, 0x2b1b, 0xfe0f,\n0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x6c, 0x61, 0x72, 0x67, 0x65,\n0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x3a, 0x62, 0x6c, 0x61, 0x63,\n0x6b, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65,\n0x2b1c, 0xfe0f, 0x3a, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x6c, 0x61, 0x72,\n0x67, 0x65, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x3a, 0x6c, 0x61,\n0x72, 0x67, 0x65, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x77, 0x68, 0x69,\n0x74, 0x65, 0xd83d, 0xdd08, 0x3a, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x65, 0x72,\n0x3a, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x65, 0x72, 0xd83d, 0xdd07, 0x3a, 0x6d,\n0x75, 0x74, 0x65, 0x3a, 0x6d, 0x75, 0x74, 0x65, 0xd83d, 0xdd09, 0x3a, 0x73,\n0x6f, 0x75, 0x6e, 0x64, 0x3a, 0x73, 0x6f, 0x75, 0x6e, 0x64, 0xd83d, 0xdd0a,\n0x3a, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x73, 0x6f, 0x75, 0x6e, 0x64, 0x3a,\n0x6c, 0x6f, 0x75, 0x64, 0x73, 0x6f, 0x75, 0x6e, 0x64, 0xd83d, 0xdd14, 0x3a,\n0x62, 0x65, 0x6c, 0x6c, 0x3a, 0x62, 0x65, 0x6c, 0x6c, 0xd83d, 0xdd15, 0x3a,\n0x6e, 0x6f, 0x5f, 0x62, 0x65, 0x6c, 0x6c, 0x3a, 0x62, 0x65, 0x6c, 0x6c,\n0x6e, 0x6f, 0xd83d, 0xdce3, 0x3a, 0x6d, 0x65, 0x67, 0x61, 0x3a, 0x6d, 0x65,\n0x67, 0x61, 0xd83d, 0xdce2, 0x3a, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x70, 0x65,\n0x61, 0x6b, 0x65, 0x72, 0x3a, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x70, 0x65,\n0x61, 0x6b, 0x65, 0x72, 0xd83d, 0xdde8, 0x3a, 0x6c, 0x65, 0x66, 0x74, 0x5f,\n0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x5f, 0x62, 0x75, 0x62, 0x62, 0x6c,\n0x65, 0x3a, 0x62, 0x75, 0x62, 0x62, 0x6c, 0x65, 0x6c, 0x65, 0x66, 0x74,\n0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0xd83d, 0xdde8, 0x3a, 0x73, 0x70, 0x65,\n0x65, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x6c, 0x65, 0x66,\n0x74, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0xd83d, 0xdc41, 0x200d, 0xd83d, 0xdde8,\n0x3a, 0x65, 0x79, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x65,\n0x63, 0x68, 0x5f, 0x62, 0x75, 0x62, 0x62, 0x6c, 0x65, 0x3a, 0x62, 0x75,\n0x62, 0x62, 0x6c, 0x65, 0x65, 0x79, 0x65, 0x69, 0x6e, 0x73, 0x70, 0x65,\n0x65, 0x63, 0x68, 0xd83d, 0xdcac, 0x3a, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68,\n0x5f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x6f, 0x6e, 0x3a, 0x62, 0x61, 0x6c,\n0x6c, 0x6f, 0x6f, 0x6e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0xd83d, 0xdcad,\n0x3a, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x74, 0x5f, 0x62, 0x61, 0x6c,\n0x6c, 0x6f, 0x6f, 0x6e, 0x3a, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x6f, 0x6e,\n0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x74, 0xd83d, 0xddef, 0x3a, 0x72, 0x69,\n0x67, 0x68, 0x74, 0x5f, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x62, 0x75,\n0x62, 0x62, 0x6c, 0x65, 0x3a, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x62, 0x75,\n0x62, 0x62, 0x6c, 0x65, 0x72, 0x69, 0x67, 0x68, 0x74, 0xd83d, 0xddef, 0x3a,\n0x61, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3a,\n0x61, 0x6e, 0x67, 0x65, 0x72, 0x72, 0x69, 0x67, 0x68, 0x74, 0x2660, 0xfe0f,\n0x3a, 0x73, 0x70, 0x61, 0x64, 0x65, 0x73, 0x3a, 0x73, 0x70, 0x61, 0x64,\n0x65, 0x73, 0x2663, 0xfe0f, 0x3a, 0x63, 0x6c, 0x75, 0x62, 0x73, 0x3a, 0x63,\n0x6c, 0x75, 0x62, 0x73, 0x2665, 0xfe0f, 0x3a, 0x68, 0x65, 0x61, 0x72, 0x74,\n0x73, 0x3a, 0x68, 0x65, 0x61, 0x72, 0x74, 0x73, 0x2666, 0xfe0f, 0x3a, 0x64,\n0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x73, 0x3a, 0x64, 0x69, 0x61, 0x6d,\n0x6f, 0x6e, 0x64, 0x73, 0xd83c, 0xdccf, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b,\n0x5f, 0x6a, 0x6f, 0x6b, 0x65, 0x72, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b,\n0x6a, 0x6f, 0x6b, 0x65, 0x72, 0xd83c, 0xdfb4, 0x3a, 0x66, 0x6c, 0x6f, 0x77,\n0x65, 0x72, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x63,\n0x61, 0x72, 0x64, 0x73, 0x3a, 0x63, 0x61, 0x72, 0x64, 0x73, 0x66, 0x6c,\n0x6f, 0x77, 0x65, 0x72, 0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0xd83c,\n0xdc04, 0xfe0f, 0x3a, 0x6d, 0x61, 0x68, 0x6a, 0x6f, 0x6e, 0x67, 0x3a, 0x6d,\n0x61, 0x68, 0x6a, 0x6f, 0x6e, 0x67, 0xd83d, 0xdd50, 0x3a, 0x63, 0x6c, 0x6f,\n0x63, 0x6b, 0x31, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x31, 0xd83d, 0xdd51,\n0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x32, 0x3a, 0x63, 0x6c, 0x6f, 0x63,\n0x6b, 0x32, 0xd83d, 0xdd52, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x33, 0x3a,\n0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x33, 0xd83d, 0xdd53, 0x3a, 0x63, 0x6c, 0x6f,\n0x63, 0x6b, 0x34, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x34, 0xd83d, 0xdd54,\n0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x35, 0x3a, 0x63, 0x6c, 0x6f, 0x63,\n0x6b, 0x35, 0xd83d, 0xdd55, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x36, 0x3a,\n0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x36, 0xd83d, 0xdd56, 0x3a, 0x63, 0x6c, 0x6f,\n0x63, 0x6b, 0x37, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x37, 0xd83d, 0xdd57,\n0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x38, 0x3a, 0x63, 0x6c, 0x6f, 0x63,\n0x6b, 0x38, 0xd83d, 0xdd58, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x39, 0x3a,\n0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x39, 0xd83d, 0xdd59, 0x3a, 0x63, 0x6c, 0x6f,\n0x63, 0x6b, 0x31, 0x30, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x31, 0x30,\n0xd83d, 0xdd5a, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x31, 0x31, 0x3a, 0x63,\n0x6c, 0x6f, 0x63, 0x6b, 0x31, 0x31, 0xd83d, 0xdd5b, 0x3a, 0x63, 0x6c, 0x6f,\n0x63, 0x6b, 0x31, 0x32, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x31, 0x32,\n0xd83d, 0xdd5c, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x31, 0x33, 0x30, 0x3a,\n0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x31, 0x33, 0x30, 0xd83d, 0xdd5d, 0x3a, 0x63,\n0x6c, 0x6f, 0x63, 0x6b, 0x32, 0x33, 0x30, 0x3a, 0x63, 0x6c, 0x6f, 0x63,\n0x6b, 0x32, 0x33, 0x30, 0xd83d, 0xdd5e, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b,\n0x33, 0x33, 0x30, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x33, 0x33, 0x30,\n0xd83d, 0xdd5f, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x34, 0x33, 0x30, 0x3a,\n0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x34, 0x33, 0x30, 0xd83d, 0xdd60, 0x3a, 0x63,\n0x6c, 0x6f, 0x63, 0x6b, 0x35, 0x33, 0x30, 0x3a, 0x63, 0x6c, 0x6f, 0x63,\n0x6b, 0x35, 0x33, 0x30, 0xd83d, 0xdd61, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b,\n0x36, 0x33, 0x30, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x36, 0x33, 0x30,\n0xd83d, 0xdd62, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x37, 0x33, 0x30, 0x3a,\n0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x37, 0x33, 0x30, 0xd83d, 0xdd63, 0x3a, 0x63,\n0x6c, 0x6f, 0x63, 0x6b, 0x38, 0x33, 0x30, 0x3a, 0x63, 0x6c, 0x6f, 0x63,\n0x6b, 0x38, 0x33, 0x30, 0xd83d, 0xdd64, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b,\n0x39, 0x33, 0x30, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x39, 0x33, 0x30,\n0xd83d, 0xdd65, 0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x31, 0x30, 0x33, 0x30,\n0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x31, 0x30, 0x33, 0x30, 0xd83d, 0xdd66,\n0x3a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x31, 0x31, 0x33, 0x30, 0x3a, 0x63,\n0x6c, 0x6f, 0x63, 0x6b, 0x31, 0x31, 0x33, 0x30, 0xd83d, 0xdd67, 0x3a, 0x63,\n0x6c, 0x6f, 0x63, 0x6b, 0x31, 0x32, 0x33, 0x30, 0x3a, 0x63, 0x6c, 0x6f,\n0x63, 0x6b, 0x31, 0x32, 0x33, 0x30, 0xd83c, 0xdff3, 0x3a, 0x77, 0x61, 0x76,\n0x69, 0x6e, 0x67, 0x5f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x66, 0x6c,\n0x61, 0x67, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x77, 0x61, 0x76, 0x69, 0x6e,\n0x67, 0x77, 0x68, 0x69, 0x74, 0x65, 0xd83c, 0xdff3, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x77, 0x68, 0x69, 0x74, 0x65, 0xd83c, 0xdff4, 0x3a, 0x77, 0x61, 0x76, 0x69,\n0x6e, 0x67, 0x5f, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x66, 0x6c, 0x61,\n0x67, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x66, 0x6c, 0x61, 0x67, 0x77,\n0x61, 0x76, 0x69, 0x6e, 0x67, 0xd83c, 0xdff4, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x3a, 0x62, 0x6c, 0x61, 0x63, 0x6b,\n0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdfc1, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b,\n0x65, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x3a, 0x63, 0x68,\n0x65, 0x63, 0x6b, 0x65, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x61, 0x67, 0xd83d,\n0xdea9, 0x3a, 0x74, 0x72, 0x69, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72,\n0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x73,\n0x74, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6f, 0x6e, 0x70, 0x6f, 0x73, 0x74,\n0x74, 0x72, 0x69, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0xd83c, 0xdff3,\n0xfe0f, 0x200d, 0xd83c, 0xdf08, 0x3a, 0x67, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x69,\n0x64, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x67, 0x61, 0x79, 0x70, 0x72, 0x69, 0x64, 0x65, 0xd83c, 0xdff3, 0xfe0f, 0x200d,\n0xd83c, 0xdf08, 0x3a, 0x72, 0x61, 0x69, 0x6e, 0x62, 0x6f, 0x77, 0x5f, 0x66,\n0x6c, 0x61, 0x67, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x72, 0x61, 0x69, 0x6e,\n0x62, 0x6f, 0x77, 0xd83c, 0xdde6, 0xd83c, 0xddeb, 0x3a, 0x61, 0x66, 0x3a, 0x61,\n0x66, 0xd83c, 0xdde6, 0xd83c, 0xddeb, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61,\n0x66, 0x3a, 0x61, 0x66, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde6, 0xd83c, 0xddfd,\n0x3a, 0x61, 0x78, 0x3a, 0x61, 0x78, 0xd83c, 0xdde6, 0xd83c, 0xddfd, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x61, 0x78, 0x3a, 0x61, 0x78, 0x66, 0x6c, 0x61,\n0x67, 0xd83c, 0xdde6, 0xd83c, 0xddf1, 0x3a, 0x61, 0x6c, 0x3a, 0x61, 0x6c, 0xd83c,\n0xdde6, 0xd83c, 0xddf1, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x6c, 0x3a,\n0x61, 0x6c, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde9, 0xd83c, 0xddff, 0x3a, 0x64,\n0x7a, 0x3a, 0x64, 0x7a, 0xd83c, 0xdde9, 0xd83c, 0xddff, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x64, 0x7a, 0x3a, 0x64, 0x7a, 0x66, 0x6c, 0x61, 0x67, 0xd83c,\n0xdde6, 0xd83c, 0xddf8, 0x3a, 0x61, 0x73, 0x3a, 0x61, 0x73, 0xd83c, 0xdde6, 0xd83c,\n0xddf8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x73, 0x3a, 0x61, 0x73,\n0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde6, 0xd83c, 0xdde9, 0x3a, 0x61, 0x64, 0x3a,\n0x61, 0x64, 0xd83c, 0xdde6, 0xd83c, 0xdde9, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x61, 0x64, 0x3a, 0x61, 0x64, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde6, 0xd83c,\n0xddf4, 0x3a, 0x61, 0x6f, 0x3a, 0x61, 0x6f, 0xd83c, 0xdde6, 0xd83c, 0xddf4, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x6f, 0x3a, 0x61, 0x6f, 0x66, 0x6c,\n0x61, 0x67, 0xd83c, 0xdde6, 0xd83c, 0xddee, 0x3a, 0x61, 0x69, 0x3a, 0x61, 0x69,\n0xd83c, 0xdde6, 0xd83c, 0xddee, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x69,\n0x3a, 0x61, 0x69, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde6, 0xd83c, 0xddf6, 0x3a,\n0x61, 0x71, 0x3a, 0x61, 0x71, 0xd83c, 0xdde6, 0xd83c, 0xddf6, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x61, 0x71, 0x3a, 0x61, 0x71, 0x66, 0x6c, 0x61, 0x67,\n0xd83c, 0xdde6, 0xd83c, 0xddec, 0x3a, 0x61, 0x67, 0x3a, 0x61, 0x67, 0xd83c, 0xdde6,\n0xd83c, 0xddec, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x67, 0x3a, 0x61,\n0x67, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde6, 0xd83c, 0xddf7, 0x3a, 0x61, 0x72,\n0x3a, 0x61, 0x72, 0xd83c, 0xdde6, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x61, 0x72, 0x3a, 0x61, 0x72, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde6,\n0xd83c, 0xddf2, 0x3a, 0x61, 0x6d, 0x3a, 0x61, 0x6d, 0xd83c, 0xdde6, 0xd83c, 0xddf2,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x6d, 0x3a, 0x61, 0x6d, 0x66,\n0x6c, 0x61, 0x67, 0xd83c, 0xdde6, 0xd83c, 0xddfc, 0x3a, 0x61, 0x77, 0x3a, 0x61,\n0x77, 0xd83c, 0xdde6, 0xd83c, 0xddfc, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61,\n0x77, 0x3a, 0x61, 0x77, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde6, 0xd83c, 0xddfa,\n0x3a, 0x68, 0x6d, 0x3a, 0x68, 0x6d, 0xd83c, 0xdde6, 0xd83c, 0xddfa, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x68, 0x6d, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x68,\n0x6d, 0xd83c, 0xdde6, 0xd83c, 0xddfa, 0x3a, 0x61, 0x75, 0x3a, 0x61, 0x75, 0xd83c,\n0xdde6, 0xd83c, 0xddfa, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x75, 0x3a,\n0x61, 0x75, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde6, 0xd83c, 0xddf9, 0x3a, 0x61,\n0x74, 0x3a, 0x61, 0x74, 0xd83c, 0xdde6, 0xd83c, 0xddf9, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x61, 0x74, 0x3a, 0x61, 0x74, 0x66, 0x6c, 0x61, 0x67, 0xd83c,\n0xdde6, 0xd83c, 0xddff, 0x3a, 0x61, 0x7a, 0x3a, 0x61, 0x7a, 0xd83c, 0xdde6, 0xd83c,\n0xddff, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x7a, 0x3a, 0x61, 0x7a,\n0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xddf8, 0x3a, 0x62, 0x73, 0x3a,\n0x62, 0x73, 0xd83c, 0xdde7, 0xd83c, 0xddf8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x62, 0x73, 0x3a, 0x62, 0x73, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde7, 0xd83c,\n0xdded, 0x3a, 0x62, 0x68, 0x3a, 0x62, 0x68, 0xd83c, 0xdde7, 0xd83c, 0xdded, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62, 0x68, 0x3a, 0x62, 0x68, 0x66, 0x6c,\n0x61, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xdde9, 0x3a, 0x62, 0x64, 0x3a, 0x62, 0x64,\n0xd83c, 0xdde7, 0xd83c, 0xdde9, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62, 0x64,\n0x3a, 0x62, 0x64, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xdde7, 0x3a,\n0x62, 0x62, 0x3a, 0x62, 0x62, 0xd83c, 0xdde7, 0xd83c, 0xdde7, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x62, 0x62, 0x3a, 0x62, 0x62, 0x66, 0x6c, 0x61, 0x67,\n0xd83c, 0xdde7, 0xd83c, 0xddfe, 0x3a, 0x62, 0x79, 0x3a, 0x62, 0x79, 0xd83c, 0xdde7,\n0xd83c, 0xddfe, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62, 0x79, 0x3a, 0x62,\n0x79, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xddea, 0x3a, 0x62, 0x65,\n0x3a, 0x62, 0x65, 0xd83c, 0xdde7, 0xd83c, 0xddea, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x62, 0x65, 0x3a, 0x62, 0x65, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde7,\n0xd83c, 0xddff, 0x3a, 0x62, 0x7a, 0x3a, 0x62, 0x7a, 0xd83c, 0xdde7, 0xd83c, 0xddff,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62, 0x7a, 0x3a, 0x62, 0x7a, 0x66,\n0x6c, 0x61, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xddef, 0x3a, 0x62, 0x6a, 0x3a, 0x62,\n0x6a, 0xd83c, 0xdde7, 0xd83c, 0xddef, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62,\n0x6a, 0x3a, 0x62, 0x6a, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xddf2,\n0x3a, 0x62, 0x6d, 0x3a, 0x62, 0x6d, 0xd83c, 0xdde7, 0xd83c, 0xddf2, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x62, 0x6d, 0x3a, 0x62, 0x6d, 0x66, 0x6c, 0x61,\n0x67, 0xd83c, 0xdde7, 0xd83c, 0xddf9, 0x3a, 0x62, 0x74, 0x3a, 0x62, 0x74, 0xd83c,\n0xdde7, 0xd83c, 0xddf9, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62, 0x74, 0x3a,\n0x62, 0x74, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xddf4, 0x3a, 0x62,\n0x6f, 0x3a, 0x62, 0x6f, 0xd83c, 0xdde7, 0xd83c, 0xddf4, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x62, 0x6f, 0x3a, 0x62, 0x6f, 0x66, 0x6c, 0x61, 0x67, 0xd83c,\n0xdde7, 0xd83c, 0xdde6, 0x3a, 0x62, 0x61, 0x3a, 0x62, 0x61, 0xd83c, 0xdde7, 0xd83c,\n0xdde6, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62, 0x61, 0x3a, 0x62, 0x61,\n0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xddfc, 0x3a, 0x62, 0x77, 0x3a,\n0x62, 0x77, 0xd83c, 0xdde7, 0xd83c, 0xddfc, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x62, 0x77, 0x3a, 0x62, 0x77, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde7, 0xd83c,\n0xddf7, 0x3a, 0x62, 0x72, 0x3a, 0x62, 0x72, 0xd83c, 0xdde7, 0xd83c, 0xddf7, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62, 0x72, 0x3a, 0x62, 0x72, 0x66, 0x6c,\n0x61, 0x67, 0xd83c, 0xddee, 0xd83c, 0xddf4, 0x3a, 0x69, 0x6f, 0x3a, 0x69, 0x6f,\n0xd83c, 0xddee, 0xd83c, 0xddf4, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x69, 0x6f,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x69, 0x6f, 0xd83c, 0xddee, 0xd83c, 0xddf4, 0x3a,\n0x64, 0x67, 0x3a, 0x64, 0x67, 0xd83c, 0xddee, 0xd83c, 0xddf4, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x64, 0x67, 0x3a, 0x64, 0x67, 0x66, 0x6c, 0x61, 0x67,\n0xd83c, 0xddfb, 0xd83c, 0xddec, 0x3a, 0x76, 0x67, 0x3a, 0x76, 0x67, 0xd83c, 0xddfb,\n0xd83c, 0xddec, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x76, 0x67, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x76, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xddf3, 0x3a, 0x62, 0x6e,\n0x3a, 0x62, 0x6e, 0xd83c, 0xdde7, 0xd83c, 0xddf3, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x62, 0x6e, 0x3a, 0x62, 0x6e, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde7,\n0xd83c, 0xddec, 0x3a, 0x62, 0x67, 0x3a, 0x62, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xddec,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62, 0x67, 0x3a, 0x62, 0x67, 0x66,\n0x6c, 0x61, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xddeb, 0x3a, 0x62, 0x66, 0x3a, 0x62,\n0x66, 0xd83c, 0xdde7, 0xd83c, 0xddeb, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62,\n0x66, 0x3a, 0x62, 0x66, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xddee,\n0x3a, 0x62, 0x69, 0x3a, 0x62, 0x69, 0xd83c, 0xdde7, 0xd83c, 0xddee, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x62, 0x69, 0x3a, 0x62, 0x69, 0x66, 0x6c, 0x61,\n0x67, 0xd83c, 0xddf0, 0xd83c, 0xdded, 0x3a, 0x6b, 0x68, 0x3a, 0x6b, 0x68, 0xd83c,\n0xddf0, 0xd83c, 0xdded, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6b, 0x68, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x6b, 0x68, 0xd83c, 0xdde8, 0xd83c, 0xddf2, 0x3a, 0x63,\n0x6d, 0x3a, 0x63, 0x6d, 0xd83c, 0xdde8, 0xd83c, 0xddf2, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x63, 0x6d, 0x3a, 0x63, 0x6d, 0x66, 0x6c, 0x61, 0x67, 0xd83c,\n0xdde8, 0xd83c, 0xdde6, 0x3a, 0x63, 0x61, 0x3a, 0x63, 0x61, 0xd83c, 0xdde8, 0xd83c,\n0xdde6, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x61, 0x3a, 0x63, 0x61,\n0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddee, 0xd83c, 0xdde8, 0x3a, 0x69, 0x63, 0x3a,\n0x69, 0x63, 0xd83c, 0xddee, 0xd83c, 0xdde8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x69, 0x63, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x69, 0x63, 0xd83c, 0xdde8, 0xd83c,\n0xddfb, 0x3a, 0x63, 0x76, 0x3a, 0x63, 0x76, 0xd83c, 0xdde8, 0xd83c, 0xddfb, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x76, 0x3a, 0x63, 0x76, 0x66, 0x6c,\n0x61, 0x67, 0xd83c, 0xdde7, 0xd83c, 0xddf6, 0x3a, 0x62, 0x71, 0x3a, 0x62, 0x71,\n0xd83c, 0xdde7, 0xd83c, 0xddf6, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62, 0x71,\n0x3a, 0x62, 0x71, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddf0, 0xd83c, 0xddfe, 0x3a,\n0x6b, 0x79, 0x3a, 0x6b, 0x79, 0xd83c, 0xddf0, 0xd83c, 0xddfe, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x6b, 0x79, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6b, 0x79,\n0xd83c, 0xdde8, 0xd83c, 0xddeb, 0x3a, 0x63, 0x66, 0x3a, 0x63, 0x66, 0xd83c, 0xdde8,\n0xd83c, 0xddeb, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x66, 0x3a, 0x63,\n0x66, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddf9, 0xd83c, 0xdde9, 0x3a, 0x74, 0x64,\n0x3a, 0x74, 0x64, 0xd83c, 0xddf9, 0xd83c, 0xdde9, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x74, 0x64, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x74, 0x64, 0xd83c, 0xdde8,\n0xd83c, 0xddf1, 0x3a, 0x63, 0x68, 0x69, 0x6c, 0x65, 0x3a, 0x63, 0x68, 0x69,\n0x6c, 0x65, 0xd83c, 0xdde8, 0xd83c, 0xddf1, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x63, 0x6c, 0x3a, 0x63, 0x6c, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde8, 0xd83c,\n0xddf3, 0x3a, 0x63, 0x6e, 0x3a, 0x63, 0x6e, 0xd83c, 0xdde8, 0xd83c, 0xddf3, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x6e, 0x3a, 0x63, 0x6e, 0x66, 0x6c,\n0x61, 0x67, 0xd83c, 0xdde8, 0xd83c, 0xddfd, 0x3a, 0x63, 0x78, 0x3a, 0x63, 0x78,\n0xd83c, 0xdde8, 0xd83c, 0xddfd, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x78,\n0x3a, 0x63, 0x78, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde8, 0xd83c, 0xdde8, 0x3a,\n0x63, 0x63, 0x3a, 0x63, 0x63, 0xd83c, 0xdde8, 0xd83c, 0xdde8, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x63, 0x63, 0x3a, 0x63, 0x63, 0x66, 0x6c, 0x61, 0x67,\n0xd83c, 0xdde8, 0xd83c, 0xddf4, 0x3a, 0x63, 0x6f, 0x3a, 0x63, 0x6f, 0xd83c, 0xdde8,\n0xd83c, 0xddf4, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x6f, 0x3a, 0x63,\n0x6f, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddf0, 0xd83c, 0xddf2, 0x3a, 0x6b, 0x6d,\n0x3a, 0x6b, 0x6d, 0xd83c, 0xddf0, 0xd83c, 0xddf2, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x6b, 0x6d, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6b, 0x6d, 0xd83c, 0xdde8,\n0xd83c, 0xddec, 0x3a, 0x63, 0x67, 0x3a, 0x63, 0x67, 0xd83c, 0xdde8, 0xd83c, 0xddec,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x67, 0x3a, 0x63, 0x67, 0x66,\n0x6c, 0x61, 0x67, 0xd83c, 0xdde8, 0xd83c, 0xdde9, 0x3a, 0x63, 0x6f, 0x6e, 0x67,\n0x6f, 0x3a, 0x63, 0x6f, 0x6e, 0x67, 0x6f, 0xd83c, 0xdde8, 0xd83c, 0xdde9, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x64, 0x3a, 0x63, 0x64, 0x66, 0x6c,\n0x61, 0x67, 0xd83c, 0xdde8, 0xd83c, 0xddf0, 0x3a, 0x63, 0x6b, 0x3a, 0x63, 0x6b,\n0xd83c, 0xdde8, 0xd83c, 0xddf0, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x6b,\n0x3a, 0x63, 0x6b, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde8, 0xd83c, 0xddf7, 0x3a,\n0x63, 0x72, 0x3a, 0x63, 0x72, 0xd83c, 0xdde8, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x63, 0x72, 0x3a, 0x63, 0x72, 0x66, 0x6c, 0x61, 0x67,\n0xd83c, 0xdde8, 0xd83c, 0xddee, 0x3a, 0x63, 0x69, 0x3a, 0x63, 0x69, 0xd83c, 0xdde8,\n0xd83c, 0xddee, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x69, 0x3a, 0x63,\n0x69, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdded, 0xd83c, 0xddf7, 0x3a, 0x68, 0x72,\n0x3a, 0x68, 0x72, 0xd83c, 0xdded, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x68, 0x72, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x68, 0x72, 0xd83c, 0xdde8,\n0xd83c, 0xddfa, 0x3a, 0x63, 0x75, 0x3a, 0x63, 0x75, 0xd83c, 0xdde8, 0xd83c, 0xddfa,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x75, 0x3a, 0x63, 0x75, 0x66,\n0x6c, 0x61, 0x67, 0xd83c, 0xdde8, 0xd83c, 0xddfc, 0x3a, 0x63, 0x77, 0x3a, 0x63,\n0x77, 0xd83c, 0xdde8, 0xd83c, 0xddfc, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63,\n0x77, 0x3a, 0x63, 0x77, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde8, 0xd83c, 0xddfe,\n0x3a, 0x63, 0x79, 0x3a, 0x63, 0x79, 0xd83c, 0xdde8, 0xd83c, 0xddfe, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x63, 0x79, 0x3a, 0x63, 0x79, 0x66, 0x6c, 0x61,\n0x67, 0xd83c, 0xdde8, 0xd83c, 0xddff, 0x3a, 0x63, 0x7a, 0x3a, 0x63, 0x7a, 0xd83c,\n0xdde8, 0xd83c, 0xddff, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x7a, 0x3a,\n0x63, 0x7a, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde9, 0xd83c, 0xddf0, 0x3a, 0x64,\n0x6b, 0x3a, 0x64, 0x6b, 0xd83c, 0xdde9, 0xd83c, 0xddf0, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x64, 0x6b, 0x3a, 0x64, 0x6b, 0x66, 0x6c, 0x61, 0x67, 0xd83c,\n0xdde9, 0xd83c, 0xddef, 0x3a, 0x64, 0x6a, 0x3a, 0x64, 0x6a, 0xd83c, 0xdde9, 0xd83c,\n0xddef, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x64, 0x6a, 0x3a, 0x64, 0x6a,\n0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde9, 0xd83c, 0xddf2, 0x3a, 0x64, 0x6d, 0x3a,\n0x64, 0x6d, 0xd83c, 0xdde9, 0xd83c, 0xddf2, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x64, 0x6d, 0x3a, 0x64, 0x6d, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xdde9, 0xd83c,\n0xddf4, 0x3a, 0x64, 0x6f, 0x3a, 0x64, 0x6f, 0xd83c, 0xdde9, 0xd83c, 0xddf4, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x64, 0x6f, 0x3a, 0x64, 0x6f, 0x66, 0x6c,\n0x61, 0x67, 0xd83c, 0xddea, 0xd83c, 0xdde8, 0x3a, 0x65, 0x63, 0x3a, 0x65, 0x63,\n0xd83c, 0xddea, 0xd83c, 0xdde8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x65, 0x63,\n0x3a, 0x65, 0x63, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddea, 0xd83c, 0xddec, 0x3a,\n0x65, 0x67, 0x3a, 0x65, 0x67, 0xd83c, 0xddea, 0xd83c, 0xddec, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x65, 0x67, 0x3a, 0x65, 0x67, 0x66, 0x6c, 0x61, 0x67,\n0xd83c, 0xddf8, 0xd83c, 0xddfb, 0x3a, 0x73, 0x76, 0x3a, 0x73, 0x76, 0xd83c, 0xddf8,\n0xd83c, 0xddfb, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x76, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x73, 0x76, 0xd83c, 0xddec, 0xd83c, 0xddf6, 0x3a, 0x67, 0x71,\n0x3a, 0x67, 0x71, 0xd83c, 0xddec, 0xd83c, 0xddf6, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x67, 0x71, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x71, 0xd83c, 0xddea,\n0xd83c, 0xddf7, 0x3a, 0x65, 0x72, 0x3a, 0x65, 0x72, 0xd83c, 0xddea, 0xd83c, 0xddf7,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x65, 0x72, 0x3a, 0x65, 0x72, 0x66,\n0x6c, 0x61, 0x67, 0xd83c, 0xddea, 0xd83c, 0xddea, 0x3a, 0x65, 0x65, 0x3a, 0x65,\n0x65, 0xd83c, 0xddea, 0xd83c, 0xddea, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x65,\n0x65, 0x3a, 0x65, 0x65, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddea, 0xd83c, 0xddf9,\n0x3a, 0x65, 0x74, 0x3a, 0x65, 0x74, 0xd83c, 0xddea, 0xd83c, 0xddf9, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x65, 0x74, 0x3a, 0x65, 0x74, 0x66, 0x6c, 0x61,\n0x67, 0xd83c, 0xddea, 0xd83c, 0xddfa, 0x3a, 0x65, 0x75, 0x3a, 0x65, 0x75, 0xd83c,\n0xddea, 0xd83c, 0xddfa, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x65, 0x75, 0x3a,\n0x65, 0x75, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddeb, 0xd83c, 0xddf0, 0x3a, 0x66,\n0x6b, 0x3a, 0x66, 0x6b, 0xd83c, 0xddeb, 0xd83c, 0xddf0, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x66, 0x6b, 0x3a, 0x66, 0x6b, 0x66, 0x6c, 0x61, 0x67, 0xd83c,\n0xddeb, 0xd83c, 0xddf4, 0x3a, 0x66, 0x6f, 0x3a, 0x66, 0x6f, 0xd83c, 0xddeb, 0xd83c,\n0xddf4, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x66, 0x6f, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x66, 0x6f, 0xd83c, 0xddeb, 0xd83c, 0xddef, 0x3a, 0x66, 0x6a, 0x3a,\n0x66, 0x6a, 0xd83c, 0xddeb, 0xd83c, 0xddef, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x66, 0x6a, 0x3a, 0x66, 0x6a, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddeb, 0xd83c,\n0xddee, 0x3a, 0x66, 0x69, 0x3a, 0x66, 0x69, 0xd83c, 0xddeb, 0xd83c, 0xddee, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x66, 0x69, 0x3a, 0x66, 0x69, 0x66, 0x6c,\n0x61, 0x67, 0xd83c, 0xddeb, 0xd83c, 0xddf7, 0x3a, 0x6d, 0x66, 0x3a, 0x6d, 0x66,\n0xd83c, 0xddeb, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x66,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x66, 0xd83c, 0xddeb, 0xd83c, 0xddf7, 0x3a,\n0x66, 0x72, 0x3a, 0x66, 0x72, 0xd83c, 0xddeb, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x66, 0x72, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x66, 0x72,\n0xd83c, 0xddeb, 0xd83c, 0xddf7, 0x3a, 0x63, 0x70, 0x3a, 0x63, 0x70, 0xd83c, 0xddeb,\n0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x70, 0x3a, 0x63,\n0x70, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddec, 0xd83c, 0xddeb, 0x3a, 0x67, 0x66,\n0x3a, 0x67, 0x66, 0xd83c, 0xddec, 0xd83c, 0xddeb, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x67, 0x66, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x66, 0xd83c, 0xddf5,\n0xd83c, 0xddeb, 0x3a, 0x70, 0x66, 0x3a, 0x70, 0x66, 0xd83c, 0xddf5, 0xd83c, 0xddeb,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x70, 0x66, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x70, 0x66, 0xd83c, 0xddf9, 0xd83c, 0xddeb, 0x3a, 0x74, 0x66, 0x3a, 0x74,\n0x66, 0xd83c, 0xddf9, 0xd83c, 0xddeb, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74,\n0x66, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x74, 0x66, 0xd83c, 0xddec, 0xd83c, 0xdde6,\n0x3a, 0x67, 0x61, 0x3a, 0x67, 0x61, 0xd83c, 0xddec, 0xd83c, 0xdde6, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x67, 0x61, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67,\n0x61, 0xd83c, 0xddec, 0xd83c, 0xddf2, 0x3a, 0x67, 0x6d, 0x3a, 0x67, 0x6d, 0xd83c,\n0xddec, 0xd83c, 0xddf2, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x67, 0x6d, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x67, 0x6d, 0xd83c, 0xddec, 0xd83c, 0xddea, 0x3a, 0x67,\n0x65, 0x3a, 0x67, 0x65, 0xd83c, 0xddec, 0xd83c, 0xddea, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x67, 0x65, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x65, 0xd83c,\n0xdde9, 0xd83c, 0xddea, 0x3a, 0x64, 0x65, 0x3a, 0x64, 0x65, 0xd83c, 0xdde9, 0xd83c,\n0xddea, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x64, 0x65, 0x3a, 0x64, 0x65,\n0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddec, 0xd83c, 0xdded, 0x3a, 0x67, 0x68, 0x3a,\n0x67, 0x68, 0xd83c, 0xddec, 0xd83c, 0xdded, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x67, 0x68, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x68, 0xd83c, 0xddec, 0xd83c,\n0xddee, 0x3a, 0x67, 0x69, 0x3a, 0x67, 0x69, 0xd83c, 0xddec, 0xd83c, 0xddee, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x67, 0x69, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x67, 0x69, 0xd83c, 0xddec, 0xd83c, 0xddf7, 0x3a, 0x67, 0x72, 0x3a, 0x67, 0x72,\n0xd83c, 0xddec, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x67, 0x72,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x72, 0xd83c, 0xddec, 0xd83c, 0xddf1, 0x3a,\n0x67, 0x6c, 0x3a, 0x67, 0x6c, 0xd83c, 0xddec, 0xd83c, 0xddf1, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x67, 0x6c, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x6c,\n0xd83c, 0xddec, 0xd83c, 0xdde9, 0x3a, 0x67, 0x64, 0x3a, 0x67, 0x64, 0xd83c, 0xddec,\n0xd83c, 0xdde9, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x67, 0x64, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x67, 0x64, 0xd83c, 0xddec, 0xd83c, 0xddf5, 0x3a, 0x67, 0x70,\n0x3a, 0x67, 0x70, 0xd83c, 0xddec, 0xd83c, 0xddf5, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x67, 0x70, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x70, 0xd83c, 0xddec,\n0xd83c, 0xddfa, 0x3a, 0x67, 0x75, 0x3a, 0x67, 0x75, 0xd83c, 0xddec, 0xd83c, 0xddfa,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x67, 0x75, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x67, 0x75, 0xd83c, 0xddec, 0xd83c, 0xddf9, 0x3a, 0x67, 0x74, 0x3a, 0x67,\n0x74, 0xd83c, 0xddec, 0xd83c, 0xddf9, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x67,\n0x74, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x74, 0xd83c, 0xddec, 0xd83c, 0xddec,\n0x3a, 0x67, 0x67, 0x3a, 0x67, 0x67, 0xd83c, 0xddec, 0xd83c, 0xddec, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x67, 0x67, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67,\n0x67, 0xd83c, 0xddec, 0xd83c, 0xddf3, 0x3a, 0x67, 0x6e, 0x3a, 0x67, 0x6e, 0xd83c,\n0xddec, 0xd83c, 0xddf3, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x67, 0x6e, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x67, 0x6e, 0xd83c, 0xddec, 0xd83c, 0xddfc, 0x3a, 0x67,\n0x77, 0x3a, 0x67, 0x77, 0xd83c, 0xddec, 0xd83c, 0xddfc, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x67, 0x77, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x77, 0xd83c,\n0xddec, 0xd83c, 0xddfe, 0x3a, 0x67, 0x79, 0x3a, 0x67, 0x79, 0xd83c, 0xddec, 0xd83c,\n0xddfe, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x67, 0x79, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x67, 0x79, 0xd83c, 0xdded, 0xd83c, 0xddf9, 0x3a, 0x68, 0x74, 0x3a,\n0x68, 0x74, 0xd83c, 0xdded, 0xd83c, 0xddf9, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x68, 0x74, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x68, 0x74, 0xd83c, 0xdded, 0xd83c,\n0xddf3, 0x3a, 0x68, 0x6e, 0x3a, 0x68, 0x6e, 0xd83c, 0xdded, 0xd83c, 0xddf3, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x68, 0x6e, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x68, 0x6e, 0xd83c, 0xdded, 0xd83c, 0xddf0, 0x3a, 0x68, 0x6b, 0x3a, 0x68, 0x6b,\n0xd83c, 0xdded, 0xd83c, 0xddf0, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x68, 0x6b,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x68, 0x6b, 0xd83c, 0xdded, 0xd83c, 0xddfa, 0x3a,\n0x68, 0x75, 0x3a, 0x68, 0x75, 0xd83c, 0xdded, 0xd83c, 0xddfa, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x68, 0x75, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x68, 0x75,\n0xd83c, 0xddee, 0xd83c, 0xddf8, 0x3a, 0x69, 0x73, 0x3a, 0x69, 0x73, 0xd83c, 0xddee,\n0xd83c, 0xddf8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x69, 0x73, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x69, 0x73, 0xd83c, 0xddee, 0xd83c, 0xddf3, 0x3a, 0x69, 0x6e,\n0x3a, 0x69, 0x6e, 0xd83c, 0xddee, 0xd83c, 0xddf3, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x69, 0x6e, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x69, 0x6e, 0xd83c, 0xddee,\n0xd83c, 0xdde9, 0x3a, 0x69, 0x6e, 0x64, 0x6f, 0x6e, 0x65, 0x73, 0x69, 0x61,\n0x3a, 0x69, 0x6e, 0x64, 0x6f, 0x6e, 0x65, 0x73, 0x69, 0x61, 0xd83c, 0xddee,\n0xd83c, 0xdde9, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x69, 0x64, 0xd83c, 0xddee, 0xd83c, 0xddf7, 0x3a, 0x69, 0x72,\n0x3a, 0x69, 0x72, 0xd83c, 0xddee, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x69, 0x72, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x69, 0x72, 0xd83c, 0xddee,\n0xd83c, 0xddf6, 0x3a, 0x69, 0x71, 0x3a, 0x69, 0x71, 0xd83c, 0xddee, 0xd83c, 0xddf6,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x69, 0x71, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x69, 0x71, 0xd83c, 0xddee, 0xd83c, 0xddea, 0x3a, 0x69, 0x65, 0x3a, 0x69,\n0x65, 0xd83c, 0xddee, 0xd83c, 0xddea, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x69,\n0x65, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x69, 0x65, 0xd83c, 0xddee, 0xd83c, 0xddf2,\n0x3a, 0x69, 0x6d, 0x3a, 0x69, 0x6d, 0xd83c, 0xddee, 0xd83c, 0xddf2, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x69, 0x6d, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x69,\n0x6d, 0xd83c, 0xddee, 0xd83c, 0xddf1, 0x3a, 0x69, 0x6c, 0x3a, 0x69, 0x6c, 0xd83c,\n0xddee, 0xd83c, 0xddf1, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x69, 0x6c, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x69, 0x6c, 0xd83c, 0xddee, 0xd83c, 0xddf9, 0x3a, 0x69,\n0x74, 0x3a, 0x69, 0x74, 0xd83c, 0xddee, 0xd83c, 0xddf9, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x69, 0x74, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x69, 0x74, 0xd83c,\n0xddef, 0xd83c, 0xddf2, 0x3a, 0x6a, 0x6d, 0x3a, 0x6a, 0x6d, 0xd83c, 0xddef, 0xd83c,\n0xddf2, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6a, 0x6d, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x6a, 0x6d, 0xd83c, 0xddef, 0xd83c, 0xddf5, 0x3a, 0x6a, 0x70, 0x3a,\n0x6a, 0x70, 0xd83c, 0xddef, 0xd83c, 0xddf5, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x6a, 0x70, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6a, 0x70, 0xd83c, 0xdf8c, 0x3a,\n0x63, 0x72, 0x6f, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x61, 0x67,\n0x73, 0x3a, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x65, 0x64, 0x66, 0x6c, 0x61,\n0x67, 0x73, 0xd83c, 0xddef, 0xd83c, 0xddea, 0x3a, 0x6a, 0x65, 0x3a, 0x6a, 0x65,\n0xd83c, 0xddef, 0xd83c, 0xddea, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6a, 0x65,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6a, 0x65, 0xd83c, 0xddef, 0xd83c, 0xddf4, 0x3a,\n0x6a, 0x6f, 0x3a, 0x6a, 0x6f, 0xd83c, 0xddef, 0xd83c, 0xddf4, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x6a, 0x6f, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6a, 0x6f,\n0xd83c, 0xddf0, 0xd83c, 0xddff, 0x3a, 0x6b, 0x7a, 0x3a, 0x6b, 0x7a, 0xd83c, 0xddf0,\n0xd83c, 0xddff, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6b, 0x7a, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x6b, 0x7a, 0xd83c, 0xddf0, 0xd83c, 0xddea, 0x3a, 0x6b, 0x65,\n0x3a, 0x6b, 0x65, 0xd83c, 0xddf0, 0xd83c, 0xddea, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x6b, 0x65, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6b, 0x65, 0xd83c, 0xddf0,\n0xd83c, 0xddee, 0x3a, 0x6b, 0x69, 0x3a, 0x6b, 0x69, 0xd83c, 0xddf0, 0xd83c, 0xddee,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6b, 0x69, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x6b, 0x69, 0xd83c, 0xddfd, 0xd83c, 0xddf0, 0x3a, 0x78, 0x6b, 0x3a, 0x78,\n0x6b, 0xd83c, 0xddfd, 0xd83c, 0xddf0, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x78,\n0x6b, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x78, 0x6b, 0xd83c, 0xddf0, 0xd83c, 0xddfc,\n0x3a, 0x6b, 0x77, 0x3a, 0x6b, 0x77, 0xd83c, 0xddf0, 0xd83c, 0xddfc, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x6b, 0x77, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6b,\n0x77, 0xd83c, 0xddf0, 0xd83c, 0xddec, 0x3a, 0x6b, 0x67, 0x3a, 0x6b, 0x67, 0xd83c,\n0xddf0, 0xd83c, 0xddec, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6b, 0x67, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x6b, 0x67, 0xd83c, 0xddf1, 0xd83c, 0xdde6, 0x3a, 0x6c,\n0x61, 0x3a, 0x6c, 0x61, 0xd83c, 0xddf1, 0xd83c, 0xdde6, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x6c, 0x61, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6c, 0x61, 0xd83c,\n0xddf1, 0xd83c, 0xddfb, 0x3a, 0x6c, 0x76, 0x3a, 0x6c, 0x76, 0xd83c, 0xddf1, 0xd83c,\n0xddfb, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6c, 0x76, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x6c, 0x76, 0xd83c, 0xddf1, 0xd83c, 0xdde7, 0x3a, 0x6c, 0x62, 0x3a,\n0x6c, 0x62, 0xd83c, 0xddf1, 0xd83c, 0xdde7, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x6c, 0x62, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6c, 0x62, 0xd83c, 0xddf1, 0xd83c,\n0xddf8, 0x3a, 0x6c, 0x73, 0x3a, 0x6c, 0x73, 0xd83c, 0xddf1, 0xd83c, 0xddf8, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6c, 0x73, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x6c, 0x73, 0xd83c, 0xddf1, 0xd83c, 0xddf7, 0x3a, 0x6c, 0x72, 0x3a, 0x6c, 0x72,\n0xd83c, 0xddf1, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6c, 0x72,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6c, 0x72, 0xd83c, 0xddf1, 0xd83c, 0xddfe, 0x3a,\n0x6c, 0x79, 0x3a, 0x6c, 0x79, 0xd83c, 0xddf1, 0xd83c, 0xddfe, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x6c, 0x79, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6c, 0x79,\n0xd83c, 0xddf1, 0xd83c, 0xddee, 0x3a, 0x6c, 0x69, 0x3a, 0x6c, 0x69, 0xd83c, 0xddf1,\n0xd83c, 0xddee, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6c, 0x69, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x6c, 0x69, 0xd83c, 0xddf1, 0xd83c, 0xddf9, 0x3a, 0x6c, 0x74,\n0x3a, 0x6c, 0x74, 0xd83c, 0xddf1, 0xd83c, 0xddf9, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x6c, 0x74, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6c, 0x74, 0xd83c, 0xddf1,\n0xd83c, 0xddfa, 0x3a, 0x6c, 0x75, 0x3a, 0x6c, 0x75, 0xd83c, 0xddf1, 0xd83c, 0xddfa,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6c, 0x75, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x6c, 0x75, 0xd83c, 0xddf2, 0xd83c, 0xddf4, 0x3a, 0x6d, 0x6f, 0x3a, 0x6d,\n0x6f, 0xd83c, 0xddf2, 0xd83c, 0xddf4, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d,\n0x6f, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x6f, 0xd83c, 0xddf2, 0xd83c, 0xddf0,\n0x3a, 0x6d, 0x6b, 0x3a, 0x6d, 0x6b, 0xd83c, 0xddf2, 0xd83c, 0xddf0, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x6b, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d,\n0x6b, 0xd83c, 0xddf2, 0xd83c, 0xddec, 0x3a, 0x6d, 0x67, 0x3a, 0x6d, 0x67, 0xd83c,\n0xddf2, 0xd83c, 0xddec, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x67, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x6d, 0x67, 0xd83c, 0xddf2, 0xd83c, 0xddfc, 0x3a, 0x6d,\n0x77, 0x3a, 0x6d, 0x77, 0xd83c, 0xddf2, 0xd83c, 0xddfc, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x6d, 0x77, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x77, 0xd83c,\n0xddf2, 0xd83c, 0xddfe, 0x3a, 0x6d, 0x79, 0x3a, 0x6d, 0x79, 0xd83c, 0xddf2, 0xd83c,\n0xddfe, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x79, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x6d, 0x79, 0xd83c, 0xddf2, 0xd83c, 0xddfb, 0x3a, 0x6d, 0x76, 0x3a,\n0x6d, 0x76, 0xd83c, 0xddf2, 0xd83c, 0xddfb, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x6d, 0x76, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x76, 0xd83c, 0xddf2, 0xd83c,\n0xddf1, 0x3a, 0x6d, 0x6c, 0x3a, 0x6d, 0x6c, 0xd83c, 0xddf2, 0xd83c, 0xddf1, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x6c, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x6d, 0x6c, 0xd83c, 0xddf2, 0xd83c, 0xddf9, 0x3a, 0x6d, 0x74, 0x3a, 0x6d, 0x74,\n0xd83c, 0xddf2, 0xd83c, 0xddf9, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x74,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x74, 0xd83c, 0xddf2, 0xd83c, 0xdded, 0x3a,\n0x6d, 0x68, 0x3a, 0x6d, 0x68, 0xd83c, 0xddf2, 0xd83c, 0xdded, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x6d, 0x68, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x68,\n0xd83c, 0xddf2, 0xd83c, 0xddf6, 0x3a, 0x6d, 0x71, 0x3a, 0x6d, 0x71, 0xd83c, 0xddf2,\n0xd83c, 0xddf6, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x71, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x6d, 0x71, 0xd83c, 0xddf2, 0xd83c, 0xddf7, 0x3a, 0x6d, 0x72,\n0x3a, 0x6d, 0x72, 0xd83c, 0xddf2, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x6d, 0x72, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x72, 0xd83c, 0xddf2,\n0xd83c, 0xddfa, 0x3a, 0x6d, 0x75, 0x3a, 0x6d, 0x75, 0xd83c, 0xddf2, 0xd83c, 0xddfa,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x75, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x6d, 0x75, 0xd83c, 0xddfe, 0xd83c, 0xddf9, 0x3a, 0x79, 0x74, 0x3a, 0x79,\n0x74, 0xd83c, 0xddfe, 0xd83c, 0xddf9, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x79,\n0x74, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x79, 0x74, 0xd83c, 0xddf2, 0xd83c, 0xddfd,\n0x3a, 0x6d, 0x78, 0x3a, 0x6d, 0x78, 0xd83c, 0xddf2, 0xd83c, 0xddfd, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x78, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d,\n0x78, 0xd83c, 0xddeb, 0xd83c, 0xddf2, 0x3a, 0x66, 0x6d, 0x3a, 0x66, 0x6d, 0xd83c,\n0xddeb, 0xd83c, 0xddf2, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x66, 0x6d, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x66, 0x6d, 0xd83c, 0xddf2, 0xd83c, 0xdde9, 0x3a, 0x6d,\n0x64, 0x3a, 0x6d, 0x64, 0xd83c, 0xddf2, 0xd83c, 0xdde9, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x6d, 0x64, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x64, 0xd83c,\n0xddf2, 0xd83c, 0xdde8, 0x3a, 0x6d, 0x63, 0x3a, 0x6d, 0x63, 0xd83c, 0xddf2, 0xd83c,\n0xdde8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x63, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x6d, 0x63, 0xd83c, 0xddf2, 0xd83c, 0xddf3, 0x3a, 0x6d, 0x6e, 0x3a,\n0x6d, 0x6e, 0xd83c, 0xddf2, 0xd83c, 0xddf3, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x6d, 0x6e, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x6e, 0xd83c, 0xddf2, 0xd83c,\n0xddea, 0x3a, 0x6d, 0x65, 0x3a, 0x6d, 0x65, 0xd83c, 0xddf2, 0xd83c, 0xddea, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x65, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x6d, 0x65, 0xd83c, 0xddf2, 0xd83c, 0xddf8, 0x3a, 0x6d, 0x73, 0x3a, 0x6d, 0x73,\n0xd83c, 0xddf2, 0xd83c, 0xddf8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x73,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x73, 0xd83c, 0xddf2, 0xd83c, 0xdde6, 0x3a,\n0x6d, 0x61, 0x3a, 0x6d, 0x61, 0xd83c, 0xddf2, 0xd83c, 0xdde6, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x6d, 0x61, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x61,\n0xd83c, 0xddf2, 0xd83c, 0xddff, 0x3a, 0x6d, 0x7a, 0x3a, 0x6d, 0x7a, 0xd83c, 0xddf2,\n0xd83c, 0xddff, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x7a, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x6d, 0x7a, 0xd83c, 0xddf2, 0xd83c, 0xddf2, 0x3a, 0x6d, 0x6d,\n0x3a, 0x6d, 0x6d, 0xd83c, 0xddf2, 0xd83c, 0xddf2, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x6d, 0x6d, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d, 0x6d, 0xd83c, 0xddf3,\n0xd83c, 0xdde6, 0x3a, 0x6e, 0x61, 0x3a, 0x6e, 0x61, 0xd83c, 0xddf3, 0xd83c, 0xdde6,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x6e, 0x61, 0xd83c, 0xddf3, 0xd83c, 0xddf7, 0x3a, 0x6e, 0x72, 0x3a, 0x6e,\n0x72, 0xd83c, 0xddf3, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6e,\n0x72, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6e, 0x72, 0xd83c, 0xddf3, 0xd83c, 0xddf5,\n0x3a, 0x6e, 0x70, 0x3a, 0x6e, 0x70, 0xd83c, 0xddf3, 0xd83c, 0xddf5, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x70, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6e,\n0x70, 0xd83c, 0xddf3, 0xd83c, 0xddf1, 0x3a, 0x6e, 0x6c, 0x3a, 0x6e, 0x6c, 0xd83c,\n0xddf3, 0xd83c, 0xddf1, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x6c, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x6e, 0x6c, 0xd83c, 0xddf3, 0xd83c, 0xdde8, 0x3a, 0x6e,\n0x63, 0x3a, 0x6e, 0x63, 0xd83c, 0xddf3, 0xd83c, 0xdde8, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x6e, 0x63, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6e, 0x63, 0xd83c,\n0xddf3, 0xd83c, 0xddff, 0x3a, 0x6e, 0x7a, 0x3a, 0x6e, 0x7a, 0xd83c, 0xddf3, 0xd83c,\n0xddff, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x7a, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x6e, 0x7a, 0xd83c, 0xddf3, 0xd83c, 0xddee, 0x3a, 0x6e, 0x69, 0x3a,\n0x6e, 0x69, 0xd83c, 0xddf3, 0xd83c, 0xddee, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x6e, 0x69, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6e, 0x69, 0xd83c, 0xddf3, 0xd83c,\n0xddea, 0x3a, 0x6e, 0x65, 0x3a, 0x6e, 0x65, 0xd83c, 0xddf3, 0xd83c, 0xddea, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x65, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x6e, 0x65, 0xd83c, 0xddf3, 0xd83c, 0xddec, 0x3a, 0x6e, 0x69, 0x67, 0x65, 0x72,\n0x69, 0x61, 0x3a, 0x6e, 0x69, 0x67, 0x65, 0x72, 0x69, 0x61, 0xd83c, 0xddf3,\n0xd83c, 0xddec, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x67, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x6e, 0x67, 0xd83c, 0xddf3, 0xd83c, 0xddfa, 0x3a, 0x6e, 0x75,\n0x3a, 0x6e, 0x75, 0xd83c, 0xddf3, 0xd83c, 0xddfa, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x6e, 0x75, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6e, 0x75, 0xd83c, 0xddf3,\n0xd83c, 0xddeb, 0x3a, 0x6e, 0x66, 0x3a, 0x6e, 0x66, 0xd83c, 0xddf3, 0xd83c, 0xddeb,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x66, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x6e, 0x66, 0xd83c, 0xddf0, 0xd83c, 0xddf5, 0x3a, 0x6b, 0x70, 0x3a, 0x6b,\n0x70, 0xd83c, 0xddf0, 0xd83c, 0xddf5, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6b,\n0x70, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6b, 0x70, 0xd83c, 0xddf2, 0xd83c, 0xddf5,\n0x3a, 0x6d, 0x70, 0x3a, 0x6d, 0x70, 0xd83c, 0xddf2, 0xd83c, 0xddf5, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x70, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6d,\n0x70, 0xd83c, 0xddf3, 0xd83c, 0xddf4, 0x3a, 0x73, 0x6a, 0x3a, 0x73, 0x6a, 0xd83c,\n0xddf3, 0xd83c, 0xddf4, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x6a, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x73, 0x6a, 0xd83c, 0xddf3, 0xd83c, 0xddf4, 0x3a, 0x6e,\n0x6f, 0x3a, 0x6e, 0x6f, 0xd83c, 0xddf3, 0xd83c, 0xddf4, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x6e, 0x6f, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6e, 0x6f, 0xd83c,\n0xddf3, 0xd83c, 0xddf4, 0x3a, 0x62, 0x76, 0x3a, 0x62, 0x76, 0xd83c, 0xddf3, 0xd83c,\n0xddf4, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62, 0x76, 0x3a, 0x62, 0x76,\n0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddf4, 0xd83c, 0xddf2, 0x3a, 0x6f, 0x6d, 0x3a,\n0x6f, 0x6d, 0xd83c, 0xddf4, 0xd83c, 0xddf2, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x6f, 0x6d, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6f, 0x6d, 0xd83c, 0xddf5, 0xd83c,\n0xddf0, 0x3a, 0x70, 0x6b, 0x3a, 0x70, 0x6b, 0xd83c, 0xddf5, 0xd83c, 0xddf0, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x70, 0x6b, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x70, 0x6b, 0xd83c, 0xddf5, 0xd83c, 0xddfc, 0x3a, 0x70, 0x77, 0x3a, 0x70, 0x77,\n0xd83c, 0xddf5, 0xd83c, 0xddfc, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x70, 0x77,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x70, 0x77, 0xd83c, 0xddf5, 0xd83c, 0xddf8, 0x3a,\n0x70, 0x73, 0x3a, 0x70, 0x73, 0xd83c, 0xddf5, 0xd83c, 0xddf8, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x70, 0x73, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x70, 0x73,\n0xd83c, 0xddf5, 0xd83c, 0xdde6, 0x3a, 0x70, 0x61, 0x3a, 0x70, 0x61, 0xd83c, 0xddf5,\n0xd83c, 0xdde6, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x70, 0x61, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x70, 0x61, 0xd83c, 0xddf5, 0xd83c, 0xddec, 0x3a, 0x70, 0x67,\n0x3a, 0x70, 0x67, 0xd83c, 0xddf5, 0xd83c, 0xddec, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x70, 0x67, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x70, 0x67, 0xd83c, 0xddf5,\n0xd83c, 0xddfe, 0x3a, 0x70, 0x79, 0x3a, 0x70, 0x79, 0xd83c, 0xddf5, 0xd83c, 0xddfe,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x70, 0x79, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x70, 0x79, 0xd83c, 0xddf5, 0xd83c, 0xddea, 0x3a, 0x70, 0x65, 0x3a, 0x70,\n0x65, 0xd83c, 0xddf5, 0xd83c, 0xddea, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x70,\n0x65, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x70, 0x65, 0xd83c, 0xddf5, 0xd83c, 0xdded,\n0x3a, 0x70, 0x68, 0x3a, 0x70, 0x68, 0xd83c, 0xddf5, 0xd83c, 0xdded, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x70, 0x68, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x70,\n0x68, 0xd83c, 0xddf5, 0xd83c, 0xddf3, 0x3a, 0x70, 0x6e, 0x3a, 0x70, 0x6e, 0xd83c,\n0xddf5, 0xd83c, 0xddf3, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x70, 0x6e, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x70, 0x6e, 0xd83c, 0xddf5, 0xd83c, 0xddf1, 0x3a, 0x70,\n0x6c, 0x3a, 0x70, 0x6c, 0xd83c, 0xddf5, 0xd83c, 0xddf1, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x70, 0x6c, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x70, 0x6c, 0xd83c,\n0xddf5, 0xd83c, 0xddf9, 0x3a, 0x70, 0x74, 0x3a, 0x70, 0x74, 0xd83c, 0xddf5, 0xd83c,\n0xddf9, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x70, 0x74, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x70, 0x74, 0xd83c, 0xddf5, 0xd83c, 0xddf7, 0x3a, 0x70, 0x72, 0x3a,\n0x70, 0x72, 0xd83c, 0xddf5, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x70, 0x72, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x70, 0x72, 0xd83c, 0xddf6, 0xd83c,\n0xdde6, 0x3a, 0x71, 0x61, 0x3a, 0x71, 0x61, 0xd83c, 0xddf6, 0xd83c, 0xdde6, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x71, 0x61, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x71, 0x61, 0xd83c, 0xddf7, 0xd83c, 0xddea, 0x3a, 0x72, 0x65, 0x3a, 0x72, 0x65,\n0xd83c, 0xddf7, 0xd83c, 0xddea, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x72, 0x65,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x72, 0x65, 0xd83c, 0xddf7, 0xd83c, 0xddf4, 0x3a,\n0x72, 0x6f, 0x3a, 0x72, 0x6f, 0xd83c, 0xddf7, 0xd83c, 0xddf4, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x72, 0x6f, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x72, 0x6f,\n0xd83c, 0xddf7, 0xd83c, 0xddfa, 0x3a, 0x72, 0x75, 0x3a, 0x72, 0x75, 0xd83c, 0xddf7,\n0xd83c, 0xddfa, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x72, 0x75, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x72, 0x75, 0xd83c, 0xddf7, 0xd83c, 0xddfc, 0x3a, 0x72, 0x77,\n0x3a, 0x72, 0x77, 0xd83c, 0xddf7, 0xd83c, 0xddfc, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x72, 0x77, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x72, 0x77, 0xd83c, 0xddfc,\n0xd83c, 0xddf8, 0x3a, 0x77, 0x73, 0x3a, 0x77, 0x73, 0xd83c, 0xddfc, 0xd83c, 0xddf8,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x77, 0x73, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x77, 0x73, 0xd83c, 0xddf8, 0xd83c, 0xddf2, 0x3a, 0x73, 0x6d, 0x3a, 0x73,\n0x6d, 0xd83c, 0xddf8, 0xd83c, 0xddf2, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73,\n0x6d, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x6d, 0xd83c, 0xddf8, 0xd83c, 0xddf9,\n0x3a, 0x73, 0x74, 0x3a, 0x73, 0x74, 0xd83c, 0xddf8, 0xd83c, 0xddf9, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x73, 0x74, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73,\n0x74, 0xd83c, 0xddf8, 0xd83c, 0xdde6, 0x3a, 0x73, 0x61, 0x75, 0x64, 0x69, 0x3a,\n0x73, 0x61, 0x75, 0x64, 0x69, 0xd83c, 0xddf8, 0xd83c, 0xdde6, 0x3a, 0x73, 0x61,\n0x75, 0x64, 0x69, 0x61, 0x72, 0x61, 0x62, 0x69, 0x61, 0x3a, 0x73, 0x61,\n0x75, 0x64, 0x69, 0x61, 0x72, 0x61, 0x62, 0x69, 0x61, 0xd83c, 0xddf8, 0xd83c,\n0xdde6, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x61, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x73, 0x61, 0xd83c, 0xddf8, 0xd83c, 0xddf3, 0x3a, 0x73, 0x6e, 0x3a,\n0x73, 0x6e, 0xd83c, 0xddf8, 0xd83c, 0xddf3, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x73, 0x6e, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x6e, 0xd83c, 0xddf7, 0xd83c,\n0xddf8, 0x3a, 0x72, 0x73, 0x3a, 0x72, 0x73, 0xd83c, 0xddf7, 0xd83c, 0xddf8, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x72, 0x73, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x72, 0x73, 0xd83c, 0xddf8, 0xd83c, 0xdde8, 0x3a, 0x73, 0x63, 0x3a, 0x73, 0x63,\n0xd83c, 0xddf8, 0xd83c, 0xdde8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x63,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x63, 0xd83c, 0xddf8, 0xd83c, 0xddf1, 0x3a,\n0x73, 0x6c, 0x3a, 0x73, 0x6c, 0xd83c, 0xddf8, 0xd83c, 0xddf1, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x73, 0x6c, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x6c,\n0xd83c, 0xddf8, 0xd83c, 0xddec, 0x3a, 0x73, 0x67, 0x3a, 0x73, 0x67, 0xd83c, 0xddf8,\n0xd83c, 0xddec, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x67, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x73, 0x67, 0xd83c, 0xddf8, 0xd83c, 0xddfd, 0x3a, 0x73, 0x78,\n0x3a, 0x73, 0x78, 0xd83c, 0xddf8, 0xd83c, 0xddfd, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x73, 0x78, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x78, 0xd83c, 0xddf8,\n0xd83c, 0xddf0, 0x3a, 0x73, 0x6b, 0x3a, 0x73, 0x6b, 0xd83c, 0xddf8, 0xd83c, 0xddf0,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x6b, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x73, 0x6b, 0xd83c, 0xddf8, 0xd83c, 0xddee, 0x3a, 0x73, 0x69, 0x3a, 0x73,\n0x69, 0xd83c, 0xddf8, 0xd83c, 0xddee, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73,\n0x69, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x69, 0xd83c, 0xddec, 0xd83c, 0xddf8,\n0x3a, 0x67, 0x73, 0x3a, 0x67, 0x73, 0xd83c, 0xddec, 0xd83c, 0xddf8, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x67, 0x73, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x67,\n0x73, 0xd83c, 0xddf8, 0xd83c, 0xdde7, 0x3a, 0x73, 0x62, 0x3a, 0x73, 0x62, 0xd83c,\n0xddf8, 0xd83c, 0xdde7, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x62, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x73, 0x62, 0xd83c, 0xddf8, 0xd83c, 0xddf4, 0x3a, 0x73,\n0x6f, 0x3a, 0x73, 0x6f, 0xd83c, 0xddf8, 0xd83c, 0xddf4, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x73, 0x6f, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x6f, 0xd83c,\n0xddff, 0xd83c, 0xdde6, 0x3a, 0x7a, 0x61, 0x3a, 0x7a, 0x61, 0xd83c, 0xddff, 0xd83c,\n0xdde6, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x7a, 0x61, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x7a, 0x61, 0xd83c, 0xddf0, 0xd83c, 0xddf7, 0x3a, 0x6b, 0x72, 0x3a,\n0x6b, 0x72, 0xd83c, 0xddf0, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x6b, 0x72, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6b, 0x72, 0xd83c, 0xddf8, 0xd83c,\n0xddf8, 0x3a, 0x73, 0x73, 0x3a, 0x73, 0x73, 0xd83c, 0xddf8, 0xd83c, 0xddf8, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x73, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x73, 0x73, 0xd83c, 0xddea, 0xd83c, 0xddf8, 0x3a, 0x65, 0x73, 0x3a, 0x65, 0x73,\n0xd83c, 0xddea, 0xd83c, 0xddf8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x65, 0x73,\n0x3a, 0x65, 0x73, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddea, 0xd83c, 0xddf8, 0x3a,\n0x65, 0x61, 0x3a, 0x65, 0x61, 0xd83c, 0xddea, 0xd83c, 0xddf8, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x65, 0x61, 0x3a, 0x65, 0x61, 0x66, 0x6c, 0x61, 0x67,\n0xd83c, 0xddf1, 0xd83c, 0xddf0, 0x3a, 0x6c, 0x6b, 0x3a, 0x6c, 0x6b, 0xd83c, 0xddf1,\n0xd83c, 0xddf0, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6c, 0x6b, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x6c, 0x6b, 0xd83c, 0xdde7, 0xd83c, 0xddf1, 0x3a, 0x62, 0x6c,\n0x3a, 0x62, 0x6c, 0xd83c, 0xdde7, 0xd83c, 0xddf1, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x62, 0x6c, 0x3a, 0x62, 0x6c, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddf8,\n0xd83c, 0xdded, 0x3a, 0x74, 0x61, 0x3a, 0x74, 0x61, 0xd83c, 0xddf8, 0xd83c, 0xdded,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74, 0x61, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x74, 0x61, 0xd83c, 0xddf8, 0xd83c, 0xdded, 0x3a, 0x73, 0x68, 0x3a, 0x73,\n0x68, 0xd83c, 0xddf8, 0xd83c, 0xdded, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73,\n0x68, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x68, 0xd83c, 0xddf8, 0xd83c, 0xdded,\n0x3a, 0x61, 0x63, 0x3a, 0x61, 0x63, 0xd83c, 0xddf8, 0xd83c, 0xdded, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x61, 0x63, 0x3a, 0x61, 0x63, 0x66, 0x6c, 0x61,\n0x67, 0xd83c, 0xddf0, 0xd83c, 0xddf3, 0x3a, 0x6b, 0x6e, 0x3a, 0x6b, 0x6e, 0xd83c,\n0xddf0, 0xd83c, 0xddf3, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6b, 0x6e, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x6b, 0x6e, 0xd83c, 0xddf1, 0xd83c, 0xdde8, 0x3a, 0x6c,\n0x63, 0x3a, 0x6c, 0x63, 0xd83c, 0xddf1, 0xd83c, 0xdde8, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x6c, 0x63, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x6c, 0x63, 0xd83c,\n0xddf5, 0xd83c, 0xddf2, 0x3a, 0x70, 0x6d, 0x3a, 0x70, 0x6d, 0xd83c, 0xddf5, 0xd83c,\n0xddf2, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x70, 0x6d, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x70, 0x6d, 0xd83c, 0xddfb, 0xd83c, 0xdde8, 0x3a, 0x76, 0x63, 0x3a,\n0x76, 0x63, 0xd83c, 0xddfb, 0xd83c, 0xdde8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x76, 0x63, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x76, 0x63, 0xd83c, 0xddf8, 0xd83c,\n0xdde9, 0x3a, 0x73, 0x64, 0x3a, 0x73, 0x64, 0xd83c, 0xddf8, 0xd83c, 0xdde9, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x64, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x73, 0x64, 0xd83c, 0xddf8, 0xd83c, 0xddf7, 0x3a, 0x73, 0x72, 0x3a, 0x73, 0x72,\n0xd83c, 0xddf8, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x72,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x72, 0xd83c, 0xddf8, 0xd83c, 0xddff, 0x3a,\n0x73, 0x7a, 0x3a, 0x73, 0x7a, 0xd83c, 0xddf8, 0xd83c, 0xddff, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x73, 0x7a, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x7a,\n0xd83c, 0xddf8, 0xd83c, 0xddea, 0x3a, 0x73, 0x65, 0x3a, 0x73, 0x65, 0xd83c, 0xddf8,\n0xd83c, 0xddea, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x73, 0x65, 0xd83c, 0xdde8, 0xd83c, 0xdded, 0x3a, 0x63, 0x68,\n0x3a, 0x63, 0x68, 0xd83c, 0xdde8, 0xd83c, 0xdded, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x63, 0x68, 0x3a, 0x63, 0x68, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddf8,\n0xd83c, 0xddfe, 0x3a, 0x73, 0x79, 0x3a, 0x73, 0x79, 0xd83c, 0xddf8, 0xd83c, 0xddfe,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x79, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x73, 0x79, 0xd83c, 0xddf9, 0xd83c, 0xddfc, 0x3a, 0x74, 0x77, 0x3a, 0x74,\n0x77, 0xd83c, 0xddf9, 0xd83c, 0xddfc, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74,\n0x77, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x74, 0x77, 0xd83c, 0xddf9, 0xd83c, 0xddef,\n0x3a, 0x74, 0x6a, 0x3a, 0x74, 0x6a, 0xd83c, 0xddf9, 0xd83c, 0xddef, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x74, 0x6a, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x74,\n0x6a, 0xd83c, 0xddf9, 0xd83c, 0xddff, 0x3a, 0x74, 0x7a, 0x3a, 0x74, 0x7a, 0xd83c,\n0xddf9, 0xd83c, 0xddff, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74, 0x7a, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x74, 0x7a, 0xd83c, 0xddf9, 0xd83c, 0xdded, 0x3a, 0x74,\n0x68, 0x3a, 0x74, 0x68, 0xd83c, 0xddf9, 0xd83c, 0xdded, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x74, 0x68, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x74, 0x68, 0xd83c,\n0xddf9, 0xd83c, 0xddf1, 0x3a, 0x74, 0x6c, 0x3a, 0x74, 0x6c, 0xd83c, 0xddf9, 0xd83c,\n0xddf1, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74, 0x6c, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x74, 0x6c, 0xd83c, 0xddf9, 0xd83c, 0xddec, 0x3a, 0x74, 0x67, 0x3a,\n0x74, 0x67, 0xd83c, 0xddf9, 0xd83c, 0xddec, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x74, 0x67, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x74, 0x67, 0xd83c, 0xddf9, 0xd83c,\n0xddf0, 0x3a, 0x74, 0x6b, 0x3a, 0x74, 0x6b, 0xd83c, 0xddf9, 0xd83c, 0xddf0, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74, 0x6b, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x74, 0x6b, 0xd83c, 0xddf9, 0xd83c, 0xddf4, 0x3a, 0x74, 0x6f, 0x3a, 0x74, 0x6f,\n0xd83c, 0xddf9, 0xd83c, 0xddf4, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74, 0x6f,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x74, 0x6f, 0xd83c, 0xddf9, 0xd83c, 0xddf9, 0x3a,\n0x74, 0x74, 0x3a, 0x74, 0x74, 0xd83c, 0xddf9, 0xd83c, 0xddf9, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x74, 0x74, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x74, 0x74,\n0xd83c, 0xddf9, 0xd83c, 0xddf3, 0x3a, 0x74, 0x6e, 0x3a, 0x74, 0x6e, 0xd83c, 0xddf9,\n0xd83c, 0xddf3, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74, 0x6e, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x74, 0x6e, 0xd83c, 0xddf9, 0xd83c, 0xddf7, 0x3a, 0x74, 0x72,\n0x3a, 0x74, 0x72, 0xd83c, 0xddf9, 0xd83c, 0xddf7, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x74, 0x72, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x74, 0x72, 0xd83c, 0xddf9,\n0xd83c, 0xddf2, 0x3a, 0x74, 0x75, 0x72, 0x6b, 0x6d, 0x65, 0x6e, 0x69, 0x73,\n0x74, 0x61, 0x6e, 0x3a, 0x74, 0x75, 0x72, 0x6b, 0x6d, 0x65, 0x6e, 0x69,\n0x73, 0x74, 0x61, 0x6e, 0xd83c, 0xddf9, 0xd83c, 0xddf2, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x74, 0x6d, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x74, 0x6d, 0xd83c,\n0xddf9, 0xd83c, 0xdde8, 0x3a, 0x74, 0x63, 0x3a, 0x74, 0x63, 0xd83c, 0xddf9, 0xd83c,\n0xdde8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74, 0x63, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x74, 0x63, 0xd83c, 0xddf9, 0xd83c, 0xddfb, 0x3a, 0x74, 0x75, 0x76,\n0x61, 0x6c, 0x75, 0x3a, 0x74, 0x75, 0x76, 0x61, 0x6c, 0x75, 0xd83c, 0xddf9,\n0xd83c, 0xddfb, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74, 0x76, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x74, 0x76, 0xd83c, 0xddfb, 0xd83c, 0xddee, 0x3a, 0x76, 0x69,\n0x3a, 0x76, 0x69, 0xd83c, 0xddfb, 0xd83c, 0xddee, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x76, 0x69, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x76, 0x69, 0xd83c, 0xddfa,\n0xd83c, 0xddec, 0x3a, 0x75, 0x67, 0x3a, 0x75, 0x67, 0xd83c, 0xddfa, 0xd83c, 0xddec,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x75, 0x67, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x75, 0x67, 0xd83c, 0xddfa, 0xd83c, 0xdde6, 0x3a, 0x75, 0x61, 0x3a, 0x75,\n0x61, 0xd83c, 0xddfa, 0xd83c, 0xdde6, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x75,\n0x61, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x75, 0x61, 0xd83c, 0xdde6, 0xd83c, 0xddea,\n0x3a, 0x61, 0x65, 0x3a, 0x61, 0x65, 0xd83c, 0xdde6, 0xd83c, 0xddea, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x61, 0x65, 0x3a, 0x61, 0x65, 0x66, 0x6c, 0x61,\n0x67, 0xd83c, 0xddec, 0xd83c, 0xdde7, 0x3a, 0x67, 0x62, 0x3a, 0x67, 0x62, 0xd83c,\n0xddec, 0xd83c, 0xdde7, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x67, 0x62, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x67, 0x62, 0xd83c, 0xddfa, 0xd83c, 0xddf8, 0x3a, 0x75,\n0x73, 0x3a, 0x75, 0x73, 0xd83c, 0xddfa, 0xd83c, 0xddf8, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x75, 0x73, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x75, 0x73, 0xd83c,\n0xddfa, 0xd83c, 0xddf8, 0x3a, 0x75, 0x6d, 0x3a, 0x75, 0x6d, 0xd83c, 0xddfa, 0xd83c,\n0xddf8, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x75, 0x6d, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x75, 0x6d, 0xd83c, 0xddfa, 0xd83c, 0xddfe, 0x3a, 0x75, 0x79, 0x3a,\n0x75, 0x79, 0xd83c, 0xddfa, 0xd83c, 0xddfe, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f,\n0x75, 0x79, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x75, 0x79, 0xd83c, 0xddfa, 0xd83c,\n0xddff, 0x3a, 0x75, 0x7a, 0x3a, 0x75, 0x7a, 0xd83c, 0xddfa, 0xd83c, 0xddff, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x5f, 0x75, 0x7a, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x75, 0x7a, 0xd83c, 0xddfb, 0xd83c, 0xddfa, 0x3a, 0x76, 0x75, 0x3a, 0x76, 0x75,\n0xd83c, 0xddfb, 0xd83c, 0xddfa, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x76, 0x75,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x76, 0x75, 0xd83c, 0xddfb, 0xd83c, 0xdde6, 0x3a,\n0x76, 0x61, 0x3a, 0x76, 0x61, 0xd83c, 0xddfb, 0xd83c, 0xdde6, 0x3a, 0x66, 0x6c,\n0x61, 0x67, 0x5f, 0x76, 0x61, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x76, 0x61,\n0xd83c, 0xddfb, 0xd83c, 0xddea, 0x3a, 0x76, 0x65, 0x3a, 0x76, 0x65, 0xd83c, 0xddfb,\n0xd83c, 0xddea, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x76, 0x65, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x76, 0x65, 0xd83c, 0xddfb, 0xd83c, 0xddf3, 0x3a, 0x76, 0x6e,\n0x3a, 0x76, 0x6e, 0xd83c, 0xddfb, 0xd83c, 0xddf3, 0x3a, 0x66, 0x6c, 0x61, 0x67,\n0x5f, 0x76, 0x6e, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x76, 0x6e, 0xd83c, 0xddfc,\n0xd83c, 0xddeb, 0x3a, 0x77, 0x66, 0x3a, 0x77, 0x66, 0xd83c, 0xddfc, 0xd83c, 0xddeb,\n0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x77, 0x66, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x77, 0x66, 0xd83c, 0xddea, 0xd83c, 0xdded, 0x3a, 0x65, 0x68, 0x3a, 0x65,\n0x68, 0xd83c, 0xddea, 0xd83c, 0xdded, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x65,\n0x68, 0x3a, 0x65, 0x68, 0x66, 0x6c, 0x61, 0x67, 0xd83c, 0xddfe, 0xd83c, 0xddea,\n0x3a, 0x79, 0x65, 0x3a, 0x79, 0x65, 0xd83c, 0xddfe, 0xd83c, 0xddea, 0x3a, 0x66,\n0x6c, 0x61, 0x67, 0x5f, 0x79, 0x65, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x79,\n0x65, 0xd83c, 0xddff, 0xd83c, 0xddf2, 0x3a, 0x7a, 0x6d, 0x3a, 0x7a, 0x6d, 0xd83c,\n0xddff, 0xd83c, 0xddf2, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x7a, 0x6d, 0x3a,\n0x66, 0x6c, 0x61, 0x67, 0x7a, 0x6d, 0xd83c, 0xddff, 0xd83c, 0xddfc, 0x3a, 0x7a,\n0x77, 0x3a, 0x7a, 0x77, 0xd83c, 0xddff, 0xd83c, 0xddfc, 0x3a, 0x66, 0x6c, 0x61,\n0x67, 0x5f, 0x7a, 0x77, 0x3a, 0x66, 0x6c, 0x61, 0x67, 0x7a, 0x77 };\n\nconst small ReplacementWordLengths[] = {\n8, 6, 5, 4, 9, 8, 5, 5, 3, 5, 8, 2,\n7, 3, 4, 7, 5, 8, 4, 8, 7, 6, 5, 4,\n4, 6, 4, 6, 4, 8, 4, 5, 5, 7, 7, 4,\n7, 7, 6, 4, 7, 3, 3, 3, 5, 6, 7, 6,\n4, 3, 5, 6, 3, 5, 6, 4, 5, 5, 5, 5,\n4, 7, 7, 4, 4, 4, 10, 5, 4, 5, 6, 4,\n3, 4, 6, 5, 8, 12, 7, 7, 8, 4, 8, 8,\n5, 6, 4, 8, 5, 9, 9, 10, 4, 5, 5, 7,\n5, 4, 5, 2, 4, 7, 14, 6, 8, 9, 5, 4,\n10, 5, 4, 7, 6, 7, 4, 5, 3, 12, 8, 5,\n8, 4, 3, 5, 6, 8, 4, 4, 7, 4, 4, 7,\n3, 4, 8, 8, 4, 4, 5, 9, 4, 5, 6, 5,\n6, 4, 4, 9, 6, 4, 8, 4, 4, 11, 4, 4,\n11, 7, 4, 4, 4, 7, 4, 3, 7, 3, 8, 4,\n6, 8, 3, 6, 4, 4, 5, 8, 5, 3, 10, 5,\n10, 5, 5, 7, 5, 4, 5, 5, 4, 7, 1, 3,\n6, 3, 5, 3, 3, 3, 4, 5, 3, 5, 3, 7,\n3, 6, 3, 6, 4, 3, 7, 5, 4, 5, 6, 4,\n4, 5, 7, 9, 4, 7, 2, 8, 7, 9, 2, 10,\n5, 4, 4, 4, 6, 4, 4, 4, 5, 6, 4, 5,\n3, 7, 6, 4, 5, 6, 4, 7, 7, 1, 5, 2,\n4, 3, 5, 4, 2, 4, 5, 5, 5, 1, 5, 2,\n4, 5, 5, 2, 4, 6, 4, 4, 2, 4, 4, 2,\n6, 7, 4, 6, 7, 4, 4, 7, 3, 7, 7, 4,\n6, 4, 6, 4, 4, 6, 4, 4, 4, 2, 4, 2,\n6, 8, 6, 4, 6, 8, 4, 6, 6, 4, 7, 6,\n4, 4, 4, 8, 4, 4, 6, 3, 4, 10, 3, 4,\n4, 2, 10, 8, 4, 8, 4, 2, 10, 5, 2, 10,\n4, 3, 4, 3, 5, 5, 6, 5, 5, 6, 3, 5,\n4, 6, 4, 5, 6, 6, 3, 5, 7, 5, 5, 3,\n3, 3, 2, 4, 3, 7, 3, 4, 6, 7, 5, 3,\n6, 7, 3, 6, 4, 6, 6, 7, 7, 6, 5, 3,\n7, 6, 3, 7, 6, 12, 5, 6, 12, 3, 6, 12,\n6, 5, 5, 5, 3, 9, 5, 9, 5, 9, 3, 2,\n6, 3, 3, 9, 6, 5, 6, 6, 3, 6, 6, 5,\n6, 3, 4, 5, 4, 3, 7, 5, 3, 7, 6, 5,\n3, 6, 7, 5, 3, 7, 7, 5, 6, 7, 3, 6,\n12, 5, 3, 12, 6, 5, 6, 3, 6, 6, 8, 5,\n3, 8, 9, 5, 3, 9, 6, 5, 6, 3, 11, 5,\n11, 3, 5, 5, 3, 5, 9, 5, 9, 3, 5, 5,\n5, 3, 9, 6, 5, 3, 5, 8, 6, 5, 4, 4,\n2, 3, 6, 5, 9, 5, 8, 5, 6, 5, 6, 3,\n3, 6, 6, 4, 7, 5, 4, 11, 6, 4, 6, 7,\n4, 3, 7, 9, 2, 5, 4, 2, 9, 2, 6, 9,\n3, 2, 9, 2, 5, 2, 5, 9, 2, 6, 9, 3,\n2, 4, 7, 5, 4, 7, 4, 6, 7, 4, 3, 7,\n11, 5, 11, 3, 8, 4, 4, 11, 6, 9, 5, 5,\n6, 9, 3, 9, 7, 5, 4, 6, 7, 4, 6, 7,\n3, 7, 8, 5, 8, 6, 8, 3, 7, 7, 5, 7,\n7, 7, 6, 7, 7, 3, 4, 7, 7, 5, 7, 7,\n7, 6, 4, 7, 3, 7, 8, 2, 10, 3, 4, 6,\n6, 4, 7, 3, 5, 4, 8, 4, 5, 7, 5, 4,\n8, 6, 4, 5, 4, 3, 8, 4, 7, 5, 3, 7,\n7, 6, 7, 7, 5, 3, 7, 6, 6, 7, 6, 5,\n7, 3, 5, 5, 7, 3, 3, 6, 5, 4, 6, 5,\n3, 4, 5, 6, 5, 4, 2, 6, 2, 6, 5, 2,\n4, 6, 2, 10, 4, 3, 5, 10, 2, 4, 2, 10,\n2, 4, 2, 6, 3, 6, 3, 5, 6, 3, 6, 4,\n6, 4, 6, 4, 6, 3, 6, 3, 6, 4, 6, 4,\n6, 4, 6, 3, 6, 3, 6, 4, 6, 4, 6, 4,\n3, 6, 5, 6, 4, 5, 3, 6, 4, 5, 3, 3,\n6, 5, 6, 4, 4, 5, 3, 6, 3, 6, 4, 3,\n3, 6, 4, 3, 3, 3, 6, 3, 6, 4, 4, 3,\n7, 6, 5, 5, 7, 5, 6, 6, 4, 4, 6, 4,\n4, 4, 8, 4, 3, 6, 6, 5, 6, 5, 5, 6,\n5, 4, 5, 6, 4, 7, 6, 5, 5, 7, 9, 10,\n4, 10, 6, 8, 9, 3, 3, 5, 7, 6, 4, 3,\n3, 4, 4, 5, 5, 5, 4, 4, 4, 3, 3, 4,\n3, 4, 4, 6, 4, 2, 3, 4, 4, 2, 4, 2,\n5, 6, 7, 7, 4, 4, 5, 5, 8, 5, 7, 4,\n5, 3, 3, 4, 4, 5, 4, 7, 7, 3, 3, 9,\n5, 5, 6, 3, 6, 6, 3, 6, 5, 6, 8, 4,\n5, 7, 6, 4, 8, 4, 8, 7, 5, 5, 6, 9,\n7, 6, 7, 5, 2, 4, 4, 5, 9, 5, 8, 10,\n5, 7, 9, 4, 4, 3, 5, 4, 6, 4, 7, 6,\n4, 2, 5, 4, 7, 6, 3, 8, 3, 6, 4, 6,\n6, 4, 6, 9, 4, 9, 4, 9, 4, 4, 4, 8,\n4, 8, 6, 4, 4, 6, 8, 4, 6, 6, 4, 4,\n5, 8, 3, 2, 4, 7, 5, 4, 6, 6, 4, 6,\n9, 7, 7, 6, 8, 8, 5, 6, 5, 4, 5, 4,\n4, 7, 4, 6, 4, 4, 7, 8, 4, 6, 4, 3,\n8, 4, 6, 5, 4, 7, 7, 4, 6, 4, 4, 3,\n4, 4, 4, 4, 4, 4, 3, 4, 4, 5, 4, 7,\n4, 4, 4, 4, 7, 4, 8, 4, 5, 4, 5, 8,\n3, 5, 4, 4, 5, 5, 5, 5, 3, 5, 4, 5,\n5, 3, 5, 6, 5, 6, 5, 3, 5, 5, 3, 5,\n6, 5, 4, 3, 5, 4, 5, 4, 3, 5, 7, 5,\n5, 4, 4, 5, 4, 3, 5, 4, 7, 5, 4, 7,\n5, 9, 4, 5, 9, 5, 4, 4, 5, 4, 8, 7,\n9, 7, 4, 4, 4, 5, 7, 4, 5, 7, 3, 5,\n7, 5, 5, 8, 5, 5, 5, 4, 9, 5, 6, 10,\n6, 10, 5, 8, 5, 9, 9, 4, 7, 6, 8, 8,\n6, 4, 3, 6, 6, 6, 5, 8, 6, 7, 7, 5,\n3, 9, 5, 8, 5, 5, 6, 6, 5, 6, 3, 7,\n5, 8, 5, 6, 3, 7, 4, 4, 2, 5, 3, 3,\n6, 9, 5, 4, 7, 9, 7, 4, 7, 5, 5, 5,\n6, 4, 2, 3, 7, 9, 5, 4, 4, 4, 5, 5,\n5, 4, 4, 4, 7, 4, 4, 5, 3, 6, 5, 3,\n8, 4, 8, 4, 7, 7, 8, 5, 3, 9, 7, 8,\n6, 5, 4, 2, 4, 4, 6, 6, 3, 4, 4, 5,\n8, 5, 9, 5, 5, 4, 6, 5, 7, 8, 5, 8,\n6, 4, 7, 4, 9, 5, 3, 4, 5, 3, 4, 5,\n5, 4, 4, 5, 5, 6, 10, 8, 8, 6, 10, 8,\n5, 5, 5, 6, 4, 4, 9, 4, 3, 4, 6, 5,\n6, 4, 3, 7, 7, 4, 4, 7, 3, 5, 3, 3,\n4, 7, 4, 6, 6, 6, 5, 6, 7, 4, 7, 7,\n3, 5, 3, 5, 11, 7, 7, 5, 7, 3, 7, 6,\n6, 6, 7, 6, 7, 7, 6, 7, 6, 5, 9, 3,\n9, 9, 9, 6, 9, 12, 5, 12, 3, 9, 9, 5,\n6, 4, 8, 5, 4, 8, 3, 4, 6, 4, 10, 6,\n4, 8, 6, 8, 7, 5, 8, 8, 6, 7, 8, 3,\n7, 7, 5, 7, 3, 6, 7, 6, 7, 5, 3, 7,\n6, 6, 7, 8, 5, 3, 8, 7, 6, 8, 7, 4,\n5, 5, 3, 7, 4, 5, 4, 5, 6, 7, 4, 5,\n4, 6, 5, 4, 3, 6, 7, 4, 6, 6, 5, 6,\n6, 5, 6, 3, 9, 6, 6, 6, 8, 5, 6, 3,\n8, 9, 8, 6, 8, 6, 7, 4, 5, 4, 5, 6,\n5, 5, 8, 5, 5, 5, 5, 5, 5, 5, 6, 5,\n6, 5, 5, 5, 5, 5, 6, 7, 8, 6, 6, 9,\n7, 7, 6, 4, 8, 5, 8, 3, 7, 8, 8, 6,\n4, 10, 3, 7, 10, 10, 7, 5, 8, 7, 4, 10,\n4, 4, 9, 7, 6, 6, 3, 4, 4, 7, 4, 5,\n7, 4, 3, 3, 4, 4, 3, 3, 10, 3, 6, 3,\n4, 3, 6, 9, 6, 4, 7, 5, 11, 5, 7, 7,\n4, 9, 5, 7, 10, 6, 10, 5, 8, 3, 8, 6,\n3, 8, 10, 8, 8, 4, 6, 7, 8, 8, 7, 10,\n3, 7, 5, 8, 7, 8, 11, 4, 11, 5, 5, 4,\n10, 5, 6, 5, 4, 7, 10, 8, 5, 8, 5, 8,\n8, 9, 8, 8, 6, 7, 9, 4, 5, 5, 8, 9,\n9, 9, 4, 6, 4, 5, 4, 6, 12, 8, 7, 5,\n7, 8, 5, 7, 3, 5, 3, 5, 7, 2, 6, 8,\n5, 5, 6, 8, 6, 8, 7, 6, 5, 7, 6, 8,\n5, 6, 2, 8, 5, 8, 5, 8, 4, 5, 6, 6,\n6, 8, 6, 8, 4, 8, 4, 4, 5, 7, 6, 7,\n4, 8, 5, 7, 5, 8, 8, 12, 12, 4, 7, 5,\n6, 5, 4, 9, 5, 5, 8, 8, 5, 9, 5, 6,\n10, 5, 6, 4, 8, 6, 4, 8, 4, 5, 11, 5,\n6, 5, 4, 7, 8, 9, 6, 6, 9, 5, 6, 6,\n5, 4, 5, 8, 4, 4, 7, 9, 4, 7, 5, 8,\n9, 4, 7, 4, 6, 4, 4, 9, 5, 5, 4, 5,\n3, 2, 6, 5, 5, 5, 6, 7, 8, 8, 8, 7,\n7, 7, 6, 5, 5, 6, 5, 5, 9, 8, 11, 8,\n4, 6, 2, 3, 3, 6, 6, 5, 4, 6, 5, 6,\n5, 4, 9, 9, 4, 6, 8, 9, 9, 5, 3, 2,\n5, 10, 6, 11, 5, 6, 7, 5, 9, 5, 5, 5,\n5, 5, 5, 11, 5, 9, 7, 9, 4, 9, 7, 8,\n4, 4, 10, 6, 11, 4, 3, 3, 5, 5, 4, 6,\n3, 4, 5, 8, 4, 6, 3, 6, 6, 6, 3, 6,\n4, 6, 4, 3, 6, 6, 5, 4, 3, 4, 3, 4,\n6, 3, 4, 5, 6, 5, 6, 7, 6, 6, 7, 6,\n7, 3, 3, 7, 4, 7, 5, 6, 6, 7, 9, 10,\n4, 4, 7, 11, 6, 7, 5, 6, 7, 4, 4, 7,\n7, 3, 3, 3, 4, 4, 3, 5, 4, 5, 3, 13,\n8, 5, 7, 4, 5, 5, 4, 8, 8, 7, 4, 8,\n4, 7, 5, 6, 4, 8, 4, 5, 7, 7, 5, 4,\n8, 5, 8, 4, 8, 8, 5, 1, 4, 6, 4, 5,\n4, 6, 4, 7, 5, 6, 7, 7, 4, 7, 4, 4,\n7, 2, 4, 7, 4, 6, 6, 4, 4, 4, 6, 4,\n2, 8, 4, 3, 5, 5, 5, 7, 4, 5, 9, 5,\n4, 4, 3, 6, 7, 6, 8, 3, 6, 8, 6, 8,\n4, 4, 5, 3, 4, 4, 3, 4, 6, 6, 3, 4,\n6, 3, 7, 4, 9, 4, 6, 4, 6, 4, 4, 8,\n5, 8, 9, 6, 2, 10, 9, 8, 5, 10, 8, 4,\n6, 4, 6, 4, 5, 4, 4, 4, 6, 5, 4, 8,\n4, 9, 6, 10, 10, 5, 10, 5, 8, 7, 7, 5,\n8, 9, 4, 5, 3, 9, 3, 8, 4, 5, 3, 8,\n3, 5, 3, 4, 5, 10, 10, 6, 4, 5, 6, 4,\n6, 7, 3, 3, 5, 3, 4, 3, 4, 6, 3, 4,\n4, 4, 6, 5, 5, 6, 5, 5, 4, 5, 5, 6,\n5, 5, 6, 5, 11, 5, 5, 4, 8, 11, 5, 6,\n3, 6, 9, 9, 10, 5, 9, 5, 4, 5, 10, 5,\n5, 6, 5, 5, 5, 5, 3, 8, 4, 2, 6, 6,\n2, 5, 5, 2, 4, 7, 3, 4, 7, 4, 3, 5,\n8, 6, 7, 2, 5, 7, 9, 5, 6, 6, 6, 3,\n5, 5, 8, 11, 9, 8, 6, 2, 4, 6, 4, 6,\n11, 4, 11, 9, 4, 9, 6, 3, 5, 4, 9, 5,\n5, 5, 5, 5, 5, 5, 7, 4, 2, 6, 5, 9,\n9, 6, 15, 5, 5, 5, 5, 1, 1, 2, 2, 2,\n3, 1, 1, 4, 4, 9, 4, 5, 2, 5, 4, 5,\n2, 4, 3, 5, 10, 2, 11, 2, 6, 3, 8, 2,\n3, 7, 5, 8, 6, 2, 6, 2, 7, 11, 11, 4,\n8, 4, 8, 8, 11, 10, 3, 10, 4, 11, 4, 4,\n7, 8, 8, 7, 2, 5, 3, 8, 7, 5, 4, 5,\n5, 5, 7, 8, 5, 6, 5, 4, 8, 7, 5, 9,\n4, 1, 7, 3, 6, 5, 4, 1, 7, 3, 3, 2,\n10, 7, 5, 2, 7, 8, 7, 7, 5, 4, 7, 4,\n6, 4, 6, 8, 2, 3, 6, 5, 3, 6, 6, 8,\n4, 7, 11, 6, 3, 4, 4, 7, 2, 2, 2, 4,\n3, 4, 4, 3, 3, 5, 4, 4, 3, 5, 5, 4,\n6, 3, 4, 4, 8, 6, 8, 5, 7, 3, 6, 8,\n6, 5, 5, 4, 6, 4, 6, 6, 4, 5, 4, 5,\n8, 5, 8, 5, 4, 7, 6, 5, 6, 2, 5, 6,\n4, 5, 8, 5, 5, 2, 5, 4, 5, 5, 5, 5,\n4, 5, 2, 5, 4, 5, 5, 5, 5, 5, 5, 5,\n4, 5, 5, 4, 5, 5, 4, 2, 5, 4, 5, 5,\n4, 5, 5, 4, 9, 4, 5, 7, 2, 5, 4, 7,\n6, 10, 7, 6, 3, 6, 6, 16, 6, 9, 7, 4,\n5, 5, 4, 4, 5, 5, 4, 8, 5, 4, 5, 14,\n1, 6, 5, 4, 8, 8, 2, 9, 10, 4, 4, 5,\n4, 4, 3, 4, 2, 3, 4, 5, 5, 4, 6, 3,\n5, 4, 6, 5, 6, 5, 5, 6, 6, 3, 4, 6,\n3, 5, 8, 4, 3, 5, 8, 7, 6, 5, 4, 7,\n5, 7, 5, 6, 4, 7, 5, 6, 6, 5, 5, 6,\n6, 5, 5, 6, 5, 6, 5, 5, 6, 5, 6, 6,\n5, 6, 5, 5, 6, 6, 6, 6, 5, 5, 5, 6,\n5, 6, 5, 7, 4, 5, 4, 5, 4, 4, 2, 4,\n11, 6, 4, 6, 4, 6, 6, 3, 2, 6, 7, 6,\n7, 7, 5, 6, 5, 5, 5, 6, 5, 6, 8, 5,\n5, 5, 6, 7, 7, 6, 6, 6, 6, 6, 6, 6,\n6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8,\n8, 8, 9, 9, 9, 4, 6, 5, 4, 5, 5, 4,\n6, 5, 4, 9, 4, 4, 2, 4, 10, 4, 3, 5,\n4, 7, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,\n2, 4, 2, 2, 4, 2, 4, 2, 2, 2, 4, 2,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,\n4, 2, 2, 2, 4, 2, 4, 2, 2, 2, 4, 2,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 4, 2, 2,\n2, 4, 2, 2, 4, 2, 4, 2, 2, 2, 4, 2,\n2, 4, 2, 4, 2, 2, 2, 4, 2, 4, 2, 5,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,\n2, 4, 2, 4, 2, 2, 2, 4, 5, 2, 4, 2,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 4, 2, 2,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,\n2, 4, 2, 2, 4, 2, 4, 2, 2, 4, 2, 2,\n2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,\n2, 4, 2, 4, 2, 2, 2, 4, 2, 2, 4, 2,\n4, 2, 2, 4, 2, 2, 2, 4, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 2, 4, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 9,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 7, 5, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 7, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 2, 4, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,\n2, 2, 4, 2, 2, 4, 2, 5, 11, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 2, 4, 2, 2, 4, 2,\n4, 2, 2, 2, 4, 2, 4, 2, 2, 4, 2, 2,\n2, 4, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 2, 4, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 12, 4, 2, 2, 4, 2, 6,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n2, 4, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,\n4, 2, 2, 4, 2, 2, 4, 2, 2, 2, 4, 2,\n4, 2, 2, 4, 2, 2, 4, 2 };\n\nconst ReplacementStruct ReplacementInitData[] = {\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(31), small(5) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(23), small(3) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(22), small(3) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(30), small(5) },\n\t{ small(2), small(30), small(5) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(22), small(4) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(14), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(24), small(3) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(16), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(23), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(24), small(4) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(23), small(3) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(24), small(4) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(22), small(3) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(16), small(3) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(9), small(2) },\n\t{ small(2), small(16), small(3) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(17), small(3) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(43), small(7) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(3), small(1) },\n\t{ small(2), small(19), small(4) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(9), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(12), small(3) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(14), small(3) },\n\t{ small(2), small(21), small(4) },\n\t{ small(2), small(34), small(5) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(55), small(9) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(14), small(3) },\n\t{ small(2), small(9), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(43), small(6) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(29), small(4) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(5), small(20), small(3) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(24), small(4) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(21), small(5) },\n\t{ small(2), small(22), small(4) },\n\t{ small(5), small(22), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(17), small(3) },\n\t{ small(2), small(23), small(3) },\n\t{ small(5), small(22), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(5), small(27), small(3) },\n\t{ small(2), small(25), small(3) },\n\t{ small(2), small(21), small(2) },\n\t{ small(5), small(13), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(6), small(17), small(2) },\n\t{ small(3), small(15), small(2) },\n\t{ small(3), small(15), small(3) },\n\t{ small(3), small(5), small(1) },\n\t{ small(3), small(11), small(1) },\n\t{ small(5), small(21), small(3) },\n\t{ small(5), small(19), small(3) },\n\t{ small(5), small(14), small(2) },\n\t{ small(5), small(12), small(2) },\n\t{ small(5), small(12), small(2) },\n\t{ small(5), small(10), small(2) },\n\t{ small(5), small(15), small(2) },\n\t{ small(5), small(13), small(2) },\n\t{ small(5), small(14), small(2) },\n\t{ small(5), small(12), small(2) },\n\t{ small(5), small(15), small(2) },\n\t{ small(5), small(13), small(2) },\n\t{ small(5), small(22), small(3) },\n\t{ small(5), small(20), small(3) },\n\t{ small(5), small(20), small(2) },\n\t{ small(5), small(18), small(2) },\n\t{ small(5), small(21), small(3) },\n\t{ small(5), small(19), small(3) },\n\t{ small(5), small(16), small(2) },\n\t{ small(5), small(14), small(2) },\n\t{ small(5), small(17), small(2) },\n\t{ small(5), small(15), small(2) },\n\t{ small(5), small(14), small(2) },\n\t{ small(5), small(12), small(2) },\n\t{ small(5), small(19), small(2) },\n\t{ small(5), small(17), small(2) },\n\t{ small(5), small(13), small(2) },\n\t{ small(5), small(11), small(2) },\n\t{ small(5), small(17), small(2) },\n\t{ small(5), small(15), small(2) },\n\t{ small(5), small(13), small(2) },\n\t{ small(5), small(11), small(2) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(17), small(3) },\n\t{ small(2), small(15), small(3) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(5), small(14), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(25), small(3) },\n\t{ small(2), small(21), small(3) },\n\t{ small(5), small(18), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(9), small(2) },\n\t{ small(2), small(21), small(3) },\n\t{ small(5), small(18), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(21), small(3) },\n\t{ small(5), small(18), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(21), small(3) },\n\t{ small(5), small(18), small(3) },\n\t{ small(5), small(19), small(2) },\n\t{ small(5), small(17), small(2) },\n\t{ small(5), small(10), small(1) },\n\t{ small(5), small(11), small(2) },\n\t{ small(5), small(20), small(2) },\n\t{ small(5), small(17), small(2) },\n\t{ small(5), small(7), small(1) },\n\t{ small(5), small(18), small(2) },\n\t{ small(5), small(15), small(2) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(26), small(4) },\n\t{ small(2), small(16), small(2) },\n\t{ small(5), small(13), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(17), small(2) },\n\t{ small(5), small(14), small(2) },\n\t{ small(2), small(23), small(3) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(24), small(3) },\n\t{ small(5), small(21), small(3) },\n\t{ small(2), small(28), small(4) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(24), small(3) },\n\t{ small(5), small(26), small(4) },\n\t{ small(2), small(33), small(5) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(32), small(5) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(33), small(5) },\n\t{ small(5), small(30), small(5) },\n\t{ small(5), small(15), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(5), small(15), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(25), small(4) },\n\t{ small(2), small(23), small(4) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(29), small(5) },\n\t{ small(8), small(22), small(4) },\n\t{ small(8), small(11), small(2) },\n\t{ small(8), small(22), small(4) },\n\t{ small(8), small(11), small(2) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(16), small(3) },\n\t{ small(11), small(15), small(2) },\n\t{ small(11), small(9), small(2) },\n\t{ small(11), small(15), small(2) },\n\t{ small(11), small(9), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(22), small(4) },\n\t{ small(8), small(12), small(2) },\n\t{ small(11), small(13), small(2) },\n\t{ small(11), small(13), small(2) },\n\t{ small(11), small(13), small(2) },\n\t{ small(8), small(12), small(2) },\n\t{ small(8), small(12), small(2) },\n\t{ small(11), small(13), small(2) },\n\t{ small(11), small(13), small(2) },\n\t{ small(11), small(13), small(2) },\n\t{ small(8), small(12), small(2) },\n\t{ small(8), small(12), small(2) },\n\t{ small(11), small(13), small(2) },\n\t{ small(11), small(13), small(2) },\n\t{ small(11), small(13), small(2) },\n\t{ small(5), small(18), small(3) },\n\t{ small(5), small(19), small(3) },\n\t{ small(8), small(23), small(4) },\n\t{ small(8), small(22), small(4) },\n\t{ small(8), small(24), small(4) },\n\t{ small(5), small(16), small(3) },\n\t{ small(5), small(17), small(3) },\n\t{ small(8), small(21), small(4) },\n\t{ small(8), small(20), small(4) },\n\t{ small(8), small(22), small(4) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(1), small(25), small(4) },\n\t{ small(1), small(19), small(3) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(13), small(3) },\n\t{ small(2), small(14), small(3) },\n\t{ small(2), small(15), small(3) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(15), small(3) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(13), small(3) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(22), small(3) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(22), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(20), small(4) },\n\t{ small(2), small(21), small(4) },\n\t{ small(2), small(15), small(3) },\n\t{ small(2), small(30), small(5) },\n\t{ small(2), small(29), small(5) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(1), small(10), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(28), small(5) },\n\t{ small(2), small(23), small(4) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(24), small(4) },\n\t{ small(2), small(17), small(3) },\n\t{ small(2), small(34), small(6) },\n\t{ small(2), small(22), small(4) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(17), small(3) },\n\t{ small(2), small(12), small(2) },\n\t{ small(1), small(24), small(4) },\n\t{ small(1), small(20), small(3) },\n\t{ small(2), small(22), small(3) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(17), small(3) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(14), small(3) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(9), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(21), small(4) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(15), small(3) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(26), small(4) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(16), small(3) },\n\t{ small(2), small(27), small(5) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(15), small(3) },\n\t{ small(2), small(23), small(4) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(22), small(3) },\n\t{ small(1), small(11), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(1), small(7), small(1) },\n\t{ small(2), small(13), small(1) },\n\t{ small(6), small(23), small(3) },\n\t{ small(3), small(21), small(3) },\n\t{ small(3), small(15), small(2) },\n\t{ small(3), small(8), small(1) },\n\t{ small(3), small(24), small(3) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(5), small(17), small(2) },\n\t{ small(5), small(15), small(2) },\n\t{ small(5), small(11), small(1) },\n\t{ small(5), small(11), small(1) },\n\t{ small(5), small(18), small(2) },\n\t{ small(5), small(20), small(2) },\n\t{ small(5), small(18), small(2) },\n\t{ small(5), small(11), small(1) },\n\t{ small(5), small(24), small(3) },\n\t{ small(5), small(21), small(3) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(22), small(3) },\n\t{ small(5), small(24), small(3) },\n\t{ small(5), small(10), small(1) },\n\t{ small(5), small(25), small(3) },\n\t{ small(5), small(22), small(3) },\n\t{ small(6), small(15), small(2) },\n\t{ small(3), small(13), small(2) },\n\t{ small(3), small(8), small(1) },\n\t{ small(3), small(16), small(2) },\n\t{ small(5), small(15), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(5), small(16), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(17), small(2) },\n\t{ small(5), small(26), small(4) },\n\t{ small(5), small(24), small(4) },\n\t{ small(5), small(12), small(2) },\n\t{ small(5), small(27), small(4) },\n\t{ small(5), small(19), small(3) },\n\t{ small(2), small(17), small(3) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(14), small(2) },\n\t{ small(5), small(14), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(5), small(23), small(3) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(20), small(2) },\n\t{ small(2), small(24), small(3) },\n\t{ small(2), small(25), small(4) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(5), small(16), small(2) },\n\t{ small(5), small(14), small(2) },\n\t{ small(5), small(9), small(1) },\n\t{ small(5), small(10), small(1) },\n\t{ small(5), small(17), small(2) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(22), small(3) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(9), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(21), small(2) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(20), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(20), small(2) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(1), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(14), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(24), small(3) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(1), small(20), small(3) },\n\t{ small(1), small(16), small(2) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(1), small(10), small(1) },\n\t{ small(2), small(22), small(3) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(23), small(2) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(25), small(3) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(22), small(3) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(20), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(1), small(15), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(24), small(3) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(17), small(3) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(13), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(20), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(13), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(15), small(2) },\n\t{ small(1), small(11), small(1) },\n\t{ small(1), small(13), small(2) },\n\t{ small(1), small(7), small(1) },\n\t{ small(1), small(13), small(2) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(1), small(24), small(3) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(13), small(1) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(1), small(17), small(3) },\n\t{ small(1), small(13), small(2) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(7), small(1) },\n\t{ small(1), small(6), small(1) },\n\t{ small(2), small(14), small(3) },\n\t{ small(2), small(6), small(1) },\n\t{ small(1), small(8), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(13), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(9), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(16), small(3) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(24), small(2) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(22), small(4) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(16), small(3) },\n\t{ small(2), small(16), small(3) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(26), small(4) },\n\t{ small(2), small(28), small(4) },\n\t{ small(2), small(17), small(3) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(15), small(3) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(24), small(4) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(32), small(4) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(26), small(4) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(25), small(4) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(23), small(3) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(19), small(4) },\n\t{ small(2), small(22), small(4) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(39), small(5) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(17), small(3) },\n\t{ small(2), small(15), small(3) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(18), small(3) },\n\t{ small(1), small(11), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(13), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(13), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(3), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(26), small(4) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(21), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(17), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(3), small(3), small(1) },\n\t{ small(3), small(3), small(1) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(4), small(1) },\n\t{ small(3), small(4), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(1), small(3), small(1) },\n\t{ small(2), small(3), small(1) },\n\t{ small(2), small(11), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(15), small(3) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(15), small(3) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(13), small(1) },\n\t{ small(1), small(18), small(2) },\n\t{ small(1), small(10), small(1) },\n\t{ small(1), small(15), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(13), small(1) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(23), small(3) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(19), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(14), small(3) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(1), small(18), small(3) },\n\t{ small(3), small(7), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(23), small(3) },\n\t{ small(1), small(29), small(4) },\n\t{ small(2), small(22), small(3) },\n\t{ small(2), small(33), small(6) },\n\t{ small(2), small(3), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(12), small(1) },\n\t{ small(3), small(9), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(25), small(5) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(20), small(2) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(3), small(6), small(1) },\n\t{ small(3), small(5), small(1) },\n\t{ small(3), small(5), small(1) },\n\t{ small(3), small(7), small(1) },\n\t{ small(3), small(6), small(1) },\n\t{ small(3), small(6), small(1) },\n\t{ small(3), small(5), small(1) },\n\t{ small(3), small(7), small(1) },\n\t{ small(3), small(7), small(1) },\n\t{ small(3), small(6), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(3), small(6), small(1) },\n\t{ small(3), small(17), small(2) },\n\t{ small(3), small(10), small(1) },\n\t{ small(2), small(15), small(2) },\n\t{ small(1), small(21), small(3) },\n\t{ small(1), small(14), small(2) },\n\t{ small(1), small(12), small(2) },\n\t{ small(1), small(13), small(2) },\n\t{ small(1), small(15), small(2) },\n\t{ small(1), small(12), small(2) },\n\t{ small(1), small(12), small(2) },\n\t{ small(1), small(16), small(2) },\n\t{ small(1), small(16), small(2) },\n\t{ small(1), small(14), small(2) },\n\t{ small(1), small(8), small(1) },\n\t{ small(1), small(17), small(3) },\n\t{ small(1), small(19), small(3) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(16), small(3) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(10), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(15), small(3) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(27), small(4) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(27), small(3) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(25), small(2) },\n\t{ small(2), small(18), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(7), small(1) },\n\t{ small(1), small(17), small(3) },\n\t{ small(1), small(18), small(3) },\n\t{ small(1), small(21), small(3) },\n\t{ small(2), small(24), small(3) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(19), small(2) },\n\t{ small(1), small(4), small(1) },\n\t{ small(1), small(11), small(1) },\n\t{ small(1), small(12), small(1) },\n\t{ small(1), small(11), small(2) },\n\t{ small(1), small(12), small(2) },\n\t{ small(1), small(6), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(4), small(1) },\n\t{ small(2), small(5), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(18), small(3) },\n\t{ small(2), small(23), small(4) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(14), small(2) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(25), small(4) },\n\t{ small(2), small(22), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(22), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(27), small(4) },\n\t{ small(2), small(27), small(4) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(21), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(9), small(2) },\n\t{ small(2), small(6), small(1) },\n\t{ small(2), small(13), small(1) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(13), small(2) },\n\t{ small(5), small(22), small(4) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(17), small(2) },\n\t{ small(2), small(20), small(3) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(7), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(13), small(2) },\n\t{ small(2), small(22), small(3) },\n\t{ small(3), small(9), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(8), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(9), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(10), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(11), small(1) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(19), small(3) },\n\t{ small(2), small(12), small(2) },\n\t{ small(2), small(16), small(2) },\n\t{ small(2), small(25), small(4) },\n\t{ small(6), small(16), small(3) },\n\t{ small(6), small(14), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(7), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(7), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(11), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(2), small(15), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(9), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(7), small(1) },\n\t{ small(4), small(13), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(14), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(8), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n\t{ small(4), small(4), small(1) },\n\t{ small(4), small(9), small(2) },\n};\n\nconst medium ReplacementIndices[] = {\n131, 135, 1208, 1284, 151, 671, 54, 61, 63, 107, 109, 143,\n159, 240, 241, 246, 247, 257, 372, 431, 507, 508, 509, 545,\n563, 564, 578, 661, 662, 682, 683, 684, 688, 762, 770, 771,\n796, 800, 811, 813, 829, 830, 831, 832, 833, 846, 889, 922,\n962, 987, 989, 992, 1006, 1010, 1028, 1031, 1047, 1147, 1158, 1168,\n1171, 1172, 1173, 1188, 1195, 1197, 1209, 1226, 1237, 1240, 1244, 1264,\n1265, 1266, 1286, 1287, 1288, 1300, 1301, 1302, 1303, 1304, 1305, 1306,\n1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318,\n1319, 1322, 1323, 1379, 1380, 1420, 1421, 1422, 1423, 1424, 1425, 1428,\n1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440,\n1441, 1442, 1443, 1444, 1445, 1448, 1449, 1450, 1451, 1452, 1453, 1850,\n1851, 1906, 1907, 11, 94, 95, 155, 156, 159, 182, 183, 184,\n185, 189, 190, 191, 192, 255, 260, 261, 262, 263, 304, 308,\n310, 311, 336, 351, 353, 354, 356, 358, 359, 366, 370, 375,\n383, 395, 412, 413, 419, 421, 425, 426, 427, 430, 444, 452,\n491, 498, 504, 505, 531, 537, 539, 554, 568, 592, 593, 594,\n599, 603, 612, 622, 624, 633, 639, 645, 649, 650, 658, 665,\n667, 674, 679, 683, 685, 686, 710, 711, 712, 713, 714, 735,\n736, 738, 740, 741, 742, 743, 744, 745, 746, 747, 785, 790,\n791, 803, 810, 820, 821, 849, 865, 866, 867, 881, 886, 888,\n895, 901, 922, 932, 933, 968, 970, 992, 996, 1007, 1008, 1009,\n1020, 1021, 1022, 1023, 1030, 1034, 1038, 1041, 1065, 1066, 1076, 1077,\n1078, 1079, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1108, 1109, 1112,\n1129, 1131, 1132, 1176, 1177, 1185, 1196, 1206, 1213, 1222, 1224, 1225,\n1231, 1252, 1256, 1289, 1290, 1292, 1293, 1302, 1339, 1344, 1345, 1347,\n1349, 1353, 1355, 1356, 1357, 1358, 1360, 1362, 1364, 1370, 1371, 1374,\n1376, 1377, 1378, 1379, 1385, 1414, 1415, 1454, 1455, 1456, 1457, 1458,\n1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470,\n1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1488,\n1489, 1490, 1491, 1492, 1493, 1494, 1495, 1506, 1507, 1763, 1764, 1844,\n1845, 23, 26, 35, 36, 37, 38, 44, 50, 68, 69, 107,\n108, 114, 115, 116, 117, 118, 119, 120, 121, 122, 125, 143,\n144, 162, 163, 169, 197, 204, 206, 207, 208, 222, 223, 250,\n251, 320, 323, 324, 325, 326, 327, 328, 329, 331, 333, 361,\n376, 377, 378, 386, 389, 401, 410, 413, 414, 415, 438, 449,\n454, 456, 457, 469, 477, 482, 483, 490, 505, 513, 515, 523,\n532, 534, 535, 537, 538, 539, 540, 542, 543, 544, 545, 546,\n547, 548, 549, 550, 556, 557, 573, 581, 582, 583, 587, 591,\n595, 596, 598, 620, 623, 626, 630, 632, 636, 638, 639, 642,\n646, 651, 652, 656, 658, 659, 679, 680, 706, 707, 708, 709,\n764, 772, 788, 790, 793, 794, 795, 809, 814, 816, 838, 843,\n847, 858, 859, 862, 863, 871, 876, 881, 882, 897, 901, 902,\n916, 917, 918, 919, 926, 927, 929, 936, 939, 942, 943, 944,\n945, 958, 960, 962, 963, 964, 972, 982, 994, 1000, 1003, 1007,\n1028, 1029, 1036, 1041, 1045, 1056, 1063, 1066, 1067, 1068, 1071, 1072,\n1073, 1075, 1076, 1077, 1080, 1081, 1084, 1090, 1092, 1115, 1116, 1123,\n1140, 1145, 1146, 1147, 1154, 1161, 1167, 1190, 1198, 1228, 1233, 1235,\n1238, 1242, 1250, 1251, 1252, 1259, 1266, 1270, 1322, 1323, 1331, 1333,\n1336, 1343, 1344, 1346, 1347, 1348, 1349, 1382, 1386, 1388, 1389, 1390,\n1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402,\n1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1416, 1498, 1499,\n1500, 1501, 1504, 1505, 1510, 1511, 1514, 1515, 1516, 1517, 1518, 1519,\n1520, 1521, 1522, 1523, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533,\n1534, 1535, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1582, 1583,\n1652, 1868, 1869, 15, 16, 41, 64, 70, 71, 72, 133, 152,\n213, 214, 217, 265, 305, 306, 307, 309, 365, 385, 388, 416,\n445, 455, 456, 467, 472, 473, 480, 481, 485, 524, 555, 560,\n561, 605, 628, 641, 657, 709, 777, 778, 783, 784, 832, 868,\n875, 888, 891, 918, 929, 930, 938, 940, 974, 977, 998, 999,\n1027, 1043, 1068, 1074, 1084, 1085, 1090, 1142, 1149, 1150, 1212, 1230,\n1240, 1289, 1300, 1301, 1304, 1308, 1313, 1318, 1328, 1330, 1335, 1351,\n1352, 1353, 1354, 1355, 1384, 1426, 1427, 1484, 1485, 1546, 1547, 1548,\n1549, 1550, 1551, 1552, 1553, 1596, 1597, 19, 22, 23, 25, 26,\n58, 77, 78, 117, 165, 175, 178, 179, 258, 308, 310, 311,\n384, 406, 407, 408, 417, 458, 484, 497, 507, 508, 509, 580,\n597, 797, 858, 893, 969, 979, 1046, 1047, 1048, 1049, 1050, 1133,\n1134, 1185, 1205, 1207, 1218, 1219, 1237, 1281, 1331, 1338, 1376, 1554,\n1555, 1556, 1557, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1838,\n1839, 1840, 1841, 1928, 1929, 8, 13, 15, 28, 30, 32, 35,\n37, 45, 46, 47, 48, 51, 57, 60, 64, 65, 67, 72,\n77, 80, 83, 85, 88, 90, 92, 93, 94, 111, 121, 138,\n139, 140, 141, 142, 143, 144, 157, 159, 165, 166, 177, 220,\n221, 230, 231, 242, 243, 280, 281, 282, 283, 284, 290, 293,\n294, 295, 300, 303, 335, 336, 337, 338, 339, 340, 341, 342,\n343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,\n355, 356, 357, 358, 359, 360, 393, 394, 396, 400, 404, 405,\n423, 442, 443, 479, 481, 490, 494, 501, 510, 516, 518, 519,\n520, 521, 522, 529, 530, 554, 558, 594, 601, 608, 610, 616,\n620, 634, 661, 662, 663, 666, 670, 678, 684, 698, 699, 700,\n752, 753, 797, 821, 844, 848, 856, 861, 873, 883, 915, 923,\n938, 943, 946, 948, 952, 966, 971, 1004, 1032, 1033, 1039, 1064,\n1076, 1080, 1082, 1083, 1110, 1111, 1187, 1230, 1272, 1277, 1278, 1288,\n1298, 1386, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1421, 1423,\n1425, 1427, 1429, 1431, 1433, 1435, 1437, 1439, 1441, 1443, 1445, 1447,\n1449, 1451, 1453, 1455, 1457, 1459, 1461, 1463, 1465, 1467, 1469, 1471,\n1473, 1475, 1477, 1479, 1481, 1483, 1485, 1487, 1489, 1491, 1493, 1495,\n1497, 1499, 1501, 1503, 1505, 1507, 1509, 1511, 1513, 1515, 1517, 1519,\n1521, 1523, 1525, 1527, 1529, 1531, 1533, 1535, 1537, 1539, 1541, 1543,\n1545, 1547, 1549, 1551, 1553, 1555, 1557, 1559, 1561, 1563, 1565, 1567,\n1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1579, 1580, 1581,\n1583, 1585, 1587, 1589, 1591, 1593, 1595, 1597, 1599, 1601, 1603, 1605,\n1607, 1609, 1611, 1613, 1615, 1617, 1619, 1621, 1623, 1625, 1627, 1629,\n1631, 1633, 1635, 1637, 1639, 1641, 1643, 1645, 1647, 1649, 1651, 1652,\n1654, 1656, 1658, 1660, 1662, 1664, 1666, 1668, 1670, 1672, 1674, 1676,\n1678, 1680, 1682, 1684, 1686, 1688, 1690, 1692, 1694, 1696, 1698, 1700,\n1702, 1704, 1706, 1708, 1710, 1712, 1714, 1715, 1716, 1718, 1720, 1722,\n1724, 1726, 1728, 1730, 1732, 1734, 1736, 1738, 1740, 1742, 1744, 1746,\n1748, 1750, 1752, 1754, 1756, 1758, 1760, 1762, 1764, 1766, 1768, 1770,\n1772, 1774, 1776, 1778, 1780, 1782, 1784, 1786, 1788, 1790, 1792, 1794,\n1796, 1798, 1800, 1802, 1804, 1806, 1809, 1811, 1813, 1815, 1817, 1819,\n1821, 1823, 1825, 1827, 1829, 1831, 1833, 1835, 1837, 1839, 1841, 1843,\n1845, 1847, 1849, 1851, 1853, 1855, 1857, 1859, 1861, 1863, 1865, 1867,\n1869, 1871, 1873, 1875, 1877, 1879, 1881, 1883, 1885, 1887, 1889, 1891,\n1893, 1895, 1897, 1899, 1901, 1903, 1905, 1907, 1909, 1911, 1913, 1915,\n1917, 1919, 1921, 1923, 1925, 1927, 1929, 1931, 1933, 1935, 0, 3,\n84, 99, 104, 186, 194, 196, 209, 210, 211, 212, 268, 269,\n270, 271, 272, 274, 275, 296, 298, 299, 300, 302, 303, 352,\n353, 355, 357, 358, 360, 461, 464, 511, 517, 563, 570, 613,\n643, 651, 652, 653, 655, 675, 676, 680, 681, 685, 686, 719,\n720, 721, 722, 781, 783, 786, 864, 885, 983, 993, 995, 1037,\n1093, 1128, 1141, 1160, 1219, 1221, 1239, 1418, 1560, 1561, 1584, 1585,\n1590, 1591, 1592, 1593, 1594, 1595, 1598, 1599, 1600, 1601, 1602, 1603,\n1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615,\n1616, 1617, 1618, 1619, 1620, 1621, 1826, 1827, 1908, 1909, 19, 20,\n30, 31, 37, 59, 79, 94, 95, 101, 117, 123, 124, 127,\n128, 143, 146, 148, 154, 155, 156, 157, 158, 159, 162, 165,\n167, 180, 181, 189, 190, 191, 192, 218, 219, 264, 266, 267,\n276, 277, 278, 279, 296, 297, 298, 299, 321, 322, 323, 324,\n325, 327, 368, 373, 377, 378, 382, 391, 407, 414, 415, 422,\n488, 506, 584, 590, 605, 606, 607, 677, 678, 715, 716, 717,\n718, 739, 774, 828, 863, 884, 885, 886, 887, 888, 889, 894,\n896, 899, 965, 966, 986, 987, 988, 989, 1013, 1061, 1126, 1127,\n1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139,\n1141, 1142, 1210, 1225, 1285, 1315, 1316, 1317, 1318, 1326, 1327, 1328,\n1329, 1330, 1343, 1383, 1446, 1447, 1536, 1537, 1622, 1623, 1624, 1625,\n1626, 1627, 1628, 1629, 12, 96, 97, 110, 143, 180, 182, 183,\n256, 265, 304, 629, 630, 631, 689, 868, 869, 925, 1044, 1048,\n1052, 1075, 1084, 1122, 1170, 1188, 1223, 1240, 1258, 1263, 1376, 1482,\n1483, 1502, 1503, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638,\n1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 7, 98, 99,\n113, 116, 248, 249, 363, 765, 766, 767, 768, 769, 859, 907,\n935, 1385, 1648, 1649, 1650, 1651, 1653, 1654, 1655, 1656, 20, 21,\n22, 23, 119, 172, 330, 332, 334, 367, 397, 576, 577, 661,\n662, 663, 687, 776, 837, 905, 928, 958, 997, 998, 1024, 1025,\n1026, 1123, 1261, 1283, 1286, 1496, 1497, 1508, 1509, 1524, 1525, 1657,\n1658, 1659, 1660, 1661, 1662, 1665, 1666, 1667, 1668, 1755, 1756, 1834,\n1835, 1852, 1853, 5, 8, 82, 83, 113, 129, 139, 140, 149,\n171, 173, 304, 399, 400, 436, 450, 490, 493, 494, 495, 512,\n522, 547, 548, 567, 602, 637, 693, 694, 695, 696, 697, 800,\n808, 822, 823, 850, 851, 855, 899, 957, 1028, 1044, 1051, 1055,\n1091, 1099, 1101, 1108, 1110, 1113, 1115, 1122, 1123, 1124, 1145, 1162,\n1164, 1212, 1224, 1230, 1253, 1258, 1306, 1310, 1311, 1312, 1314, 1316,\n1336, 1337, 1354, 1355, 1364, 1365, 1369, 1373, 1374, 1375, 1669, 1670,\n1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682,\n1683, 1684, 1685, 1686, 1842, 1843, 1854, 1855, 28, 29, 56, 62,\n85, 86, 91, 143, 147, 159, 162, 163, 164, 165, 166, 187,\n190, 193, 196, 197, 199, 200, 203, 207, 210, 214, 219, 221,\n223, 225, 227, 229, 231, 233, 235, 236, 237, 239, 241, 243,\n245, 247, 249, 250, 251, 256, 261, 267, 271, 275, 279, 281,\n288, 292, 295, 299, 300, 301, 302, 303, 304, 306, 307, 311,\n313, 317, 322, 324, 327, 328, 330, 333, 334, 336, 337, 338,\n339, 340, 346, 347, 348, 349, 350, 356, 357, 358, 359, 360,\n371, 375, 390, 405, 409, 475, 495, 496, 510, 511, 512, 513,\n514, 515, 516, 517, 518, 519, 521, 522, 523, 572, 603, 643,\n644, 688, 694, 702, 707, 711, 718, 720, 724, 728, 732, 736,\n741, 744, 745, 746, 747, 749, 750, 751, 752, 754, 756, 766,\n773, 775, 776, 787, 798, 804, 805, 806, 807, 814, 818, 819,\n825, 840, 852, 853, 854, 870, 871, 872, 873, 880, 903, 912,\n921, 932, 933, 937, 945, 955, 956, 963, 976, 981, 1012, 1050,\n1056, 1057, 1058, 1059, 1117, 1120, 1121, 1133, 1152, 1178, 1179, 1216,\n1226, 1233, 1238, 1239, 1241, 1254, 1324, 1327, 1329, 1343, 1360, 1361,\n1362, 1363, 1367, 1372, 1387, 1578, 1579, 1687, 1688, 1689, 1690, 1691,\n1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703,\n1704, 1705, 1706, 1707, 1708, 1709, 1710, 1713, 1714, 1717, 1718, 1719,\n1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731,\n1732, 1757, 1758, 32, 33, 56, 57, 88, 169, 176, 268, 269,\n270, 271, 364, 403, 406, 407, 408, 514, 518, 675, 909, 920,\n922, 992, 1059, 1069, 1070, 1086, 1087, 1088, 1089, 1090, 1112, 1205,\n1206, 1207, 1211, 1212, 1213, 1214, 1216, 1217, 1238, 1267, 1271, 1282,\n1294, 1295, 1324, 1325, 1371, 1733, 1734, 1735, 1736, 1737, 1738, 1739,\n1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751,\n1752, 1753, 1754, 1761, 1762, 8, 25, 26, 27, 62, 98, 113,\n123, 146, 148, 155, 156, 193, 195, 202, 203, 205, 215, 234,\n235, 272, 273, 274, 275, 418, 440, 453, 472, 497, 559, 603,\n616, 627, 643, 809, 810, 811, 812, 835, 855, 864, 890, 892,\n893, 912, 974, 975, 1025, 1053, 1083, 1095, 1133, 1148, 1149, 1150,\n1154, 1156, 1157, 1178, 1199, 1202, 1204, 1268, 1274, 1321, 1340, 1352,\n1354, 1417, 1765, 1766, 42, 49, 100, 103, 122, 126, 137, 149,\n150, 151, 152, 153, 159, 191, 192, 196, 201, 202, 203, 205,\n244, 245, 253, 254, 259, 263, 265, 266, 270, 274, 278, 283,\n284, 287, 289, 290, 291, 292, 294, 298, 302, 308, 310, 311,\n315, 319, 380, 381, 396, 402, 403, 411, 463, 468, 472, 478,\n486, 536, 565, 574, 575, 584, 585, 586, 588, 589, 590, 600,\n602, 604, 609, 615, 616, 635, 640, 658, 662, 663, 673, 684,\n697, 700, 705, 709, 712, 713, 714, 715, 717, 718, 722, 726,\n730, 731, 732, 733, 734, 738, 743, 747, 752, 753, 754, 755,\n756, 757, 769, 770, 795, 809, 842, 892, 893, 909, 910, 931,\n946, 947, 951, 969, 980, 987, 988, 991, 1008, 1014, 1018, 1032,\n1033, 1054, 1060, 1061, 1063, 1064, 1069, 1071, 1100, 1101, 1102, 1105,\n1106, 1108, 1109, 1110, 1111, 1113, 1114, 1118, 1119, 1122, 1130, 1143,\n1144, 1151, 1156, 1169, 1178, 1185, 1211, 1214, 1216, 1226, 1247, 1250,\n1258, 1290, 1291, 1296, 1297, 1326, 1386, 1417, 1418, 1586, 1587, 1767,\n1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779,\n1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1856,\n1857, 512, 516, 521, 522, 1220, 1221, 1791, 1792, 8, 9, 10,\n18, 55, 70, 77, 78, 111, 112, 124, 141, 142, 150, 154,\n156, 157, 159, 165, 170, 276, 277, 278, 279, 316, 317, 318,\n319, 392, 459, 460, 462, 465, 470, 474, 476, 497, 500, 502,\n539, 540, 541, 543, 544, 545, 546, 618, 624, 625, 626, 670,\n735, 736, 737, 738, 739, 748, 759, 760, 788, 793, 794, 806,\n808, 815, 816, 818, 822, 834, 862, 878, 879, 908, 949, 954,\n1040, 1086, 1103, 1104, 1106, 1121, 1136, 1174, 1175, 1232, 1257, 1293,\n1299, 1305, 1309, 1310, 1314, 1315, 1319, 1320, 1321, 1334, 1345, 1348,\n1350, 1351, 1379, 1380, 1419, 1793, 1794, 1795, 1796, 1797, 1798, 1799,\n1800, 1812, 1813, 1, 2, 4, 6, 13, 14, 22, 25, 26,\n27, 34, 39, 45, 46, 66, 68, 73, 74, 75, 76, 87,\n89, 90, 96, 102, 105, 106, 107, 108, 110, 114, 115, 118,\n120, 127, 146, 157, 158, 168, 180, 181, 182, 183, 215, 216,\n224, 225, 226, 227, 238, 239, 252, 285, 286, 287, 288, 304,\n362, 369, 371, 372, 379, 385, 406, 408, 428, 429, 432, 433,\n435, 437, 439, 441, 446, 466, 487, 489, 503, 520, 525, 526,\n527, 533, 534, 535, 536, 537, 538, 539, 540, 549, 550, 551,\n552, 553, 561, 571, 586, 588, 601, 609, 610, 613, 614, 616,\n617, 619, 621, 629, 648, 660, 664, 689, 690, 691, 692, 723,\n724, 725, 726, 727, 728, 729, 730, 748, 749, 754, 755, 775,\n779, 787, 802, 805, 815, 820, 823, 827, 829, 830, 835, 836,\n839, 841, 842, 843, 845, 855, 860, 871, 872, 882, 891, 897,\n898, 904, 906, 908, 911, 912, 913, 914, 916, 917, 920, 955,\n957, 959, 966, 967, 984, 1000, 1001, 1002, 1015, 1019, 1031, 1034,\n1035, 1036, 1062, 1069, 1070, 1071, 1072, 1104, 1107, 1139, 1143, 1147,\n1148, 1150, 1151, 1155, 1165, 1166, 1171, 1174, 1176, 1185, 1189, 1200,\n1203, 1204, 1207, 1217, 1236, 1237, 1238, 1240, 1249, 1256, 1260, 1262,\n1263, 1279, 1280, 1292, 1303, 1304, 1326, 1327, 1328, 1330, 1342, 1350,\n1351, 1352, 1353, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364,\n1365, 1366, 1368, 1369, 1374, 1375, 1376, 1377, 1381, 1558, 1559, 1759,\n1760, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1814, 1815,\n1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1828, 1829,\n1830, 1831, 1836, 1837, 1848, 1849, 1860, 1861, 1862, 1863, 1864, 1865,\n1866, 1867, 1870, 1871, 8, 25, 26, 27, 51, 53, 80, 81,\n92, 93, 130, 132, 134, 136, 146, 174, 198, 199, 200, 201,\n228, 229, 232, 233, 256, 264, 266, 267, 321, 322, 374, 398,\n434, 442, 451, 471, 483, 484, 485, 486, 492, 499, 545, 546,\n556, 557, 566, 579, 611, 647, 655, 657, 668, 672, 756, 757,\n758, 761, 762, 763, 764, 780, 789, 792, 799, 801, 812, 813,\n817, 824, 826, 850, 851, 857, 877, 878, 879, 932, 933, 934,\n949, 950, 953, 960, 961, 990, 1011, 1016, 1017, 1035, 1042, 1052,\n1053, 1065, 1067, 1068, 1103, 1135, 1159, 1229, 1275, 1276, 1283, 1294,\n1295, 1296, 1297, 1319, 1332, 1341, 1350, 1351, 1378, 1417, 1512, 1513,\n1588, 1589, 1846, 1847, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879,\n1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891,\n1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 15, 16, 40, 151,\n153, 386, 387, 423, 424, 562, 687, 688, 864, 865, 866, 1004,\n1005, 1064, 1067, 1086, 1125, 1180, 1181, 1182, 1183, 1184, 1191, 1192,\n1193, 1194, 1215, 1234, 1248, 1269, 1300, 1303, 1307, 1309, 1312, 1313,\n1317, 1902, 1903, 1904, 1905, 1910, 1911, 1912, 1913, 1914, 1915, 1916,\n1917, 145, 160, 255, 669, 782, 786, 850, 874, 941, 944, 1163,\n1179, 1186, 1289, 1486, 1487, 1858, 1859, 1900, 1901, 1918, 1919, 1920,\n1921, 1922, 1923, 1924, 1925, 17, 25, 37, 43, 47, 52, 77,\n92, 94, 143, 157, 159, 161, 165, 167, 188, 189, 191, 195,\n196, 197, 198, 199, 200, 201, 202, 206, 207, 208, 209, 213,\n218, 219, 220, 222, 224, 226, 228, 230, 231, 232, 234, 235,\n236, 238, 240, 242, 244, 246, 248, 255, 258, 259, 260, 264,\n268, 272, 273, 276, 280, 285, 289, 290, 293, 296, 300, 308,\n310, 311, 312, 313, 314, 315, 316, 321, 323, 324, 325, 326,\n327, 330, 331, 332, 336, 341, 342, 343, 344, 345, 351, 352,\n353, 354, 355, 361, 373, 377, 378, 420, 433, 447, 448, 452,\n501, 502, 511, 513, 515, 517, 518, 519, 520, 521, 522, 534,\n535, 537, 538, 539, 540, 543, 547, 549, 554, 556, 569, 595,\n653, 654, 658, 662, 693, 694, 695, 697, 701, 702, 703, 704,\n705, 706, 710, 712, 715, 719, 723, 727, 731, 732, 733, 734,\n735, 740, 744, 748, 765, 777, 852, 861, 866, 885, 900, 920,\n921, 924, 943, 973, 976, 985, 989, 1018, 1032, 1045, 1047, 1058,\n1059, 1063, 1067, 1068, 1078, 1090, 1122, 1123, 1149, 1155, 1156, 1187,\n1214, 1227, 1233, 1239, 1240, 1245, 1246, 1255, 1316, 1335, 1344, 1346,\n1356, 1359, 1361, 1363, 1365, 1412, 1413, 1414, 1801, 1802, 1926, 1927,\n1201, 1329, 1663, 1664, 24, 978, 1127, 1153, 1711, 1712, 1930, 1931,\n85, 86, 528, 1243, 1273, 1832, 1833, 1932, 1933, 1934, 1935 };\n\nstruct ReplacementIndexStruct {\n\tutf16char ch;\n\tmedium count;\n};\n\nconst internal::checksum ReplacementChecksums[] = {\n\n0xAE1DAB16U, 0x8F27A2AU, 0x465496D5U, 0x892E9135U, 0xD621DD31U, 0x40D5B583U, 0x23598B8CU, 0x174C4A14U, 0x9739B1DAU, 0xF448853DU, 0xF3DF7DF2U, 0x15D5108FU,\n0xE8A0D4E8U, 0x8FBCAF62U, 0x95F9E2A9U, 0x47CEA738U, 0x839E1EBCU, 0xA58AFD2AU, 0xAAA850BDU, 0xBBEE1755U, 0x4F9A8CDDU, 0x77C2915FU, 0x42B9AA72U, 0xABB65511U,\n0x984E9DE9U, 0x229620B8U, 0x11744AD7U, 0xDEA4DF8BU, 0x3DDDF327U, 0xC9016AA9U, 0xDD058F8EU, 0x33167FFDU, 0xCF4EB7B4U, 0x5E990F1U, 0xB6610B6U, 0xF3DA224AU,\n0xDDF16CC9U, 0x26FBBFD8U, 0xF0D58D6U, 0x9F57820DU, 0xCAEFB5CCU, 0x868C5775U, 0x36F0B13EU, 0xC2104FC3U, 0x635ED438U, 0xFE76A6BFU, 0xAF98DEFEU, 0xC4A1CE0BU,\n0x24A144DU, 0xA07F4113U, 0xA1B56E69U, 0x7AC6D4C1U, 0xA6737D27U, 0x3841C7E7U, 0x7BD9C74BU, 0x57960B20U, 0xA3016C3FU, 0x47DE3B8DU, 0x347522B4U, 0x3DD97630U,\n0x283C812CU, 0x62FCCC72U, 0x2A8707F7U, 0x4CAAF872U, 0x7DE5251FU, 0xA1CE4738U, 0x65284ADEU, 0x3CAC3D83U, 0xBBB37EE8U, 0xB74B407AU, 0xBB721077U, 0xD5827C60U,\n0xE79C25ACU, 0xF3A0B08AU, 0x754CB19FU, 0xC53F5EC8U, 0x2FB36C45U, 0x8A111CA0U, 0x16625752U, 0xC7DA2CAAU, 0x50A359D4U, 0x9E85659AU, 0xA6832DF5U, 0x7F7A32B5U,\n0x349608E1U, 0x3CA5EFD1U, 0xBEEDA352U, 0x10FF4E8EU, 0x5A37598EU, 0x92500B16U, 0xD5E5CEF4U, 0xF9ABE6FBU, 0xEF0313FDU, 0x5D682C8AU, 0xD1D48498U, 0x4DA7CF6AU,\n0x2B17F5C6U, 0xA903A376U, 0xCA823961U, 0x829E9619U, 0x8F456FB4U, 0xCC6B224AU, 0x75B42ABFU, 0xCD7DECEFU, 0x73290221U, 0xDF8E5CD8U, 0x1D568D7CU, 0x7F2FCD63U,\n0x539DB28DU, 0xB9BB5841U, 0x88EB5D8DU, 0x30B6C9CCU, 0xEA5F5485U, 0xF282B417U, 0x46508060U, 0x8C9D5E3EU, 0xBC04162BU, 0xFA329E5DU, 0xC885E4CCU, 0xDCBF9DCAU,\n0x4715B337U, 0x2FDC1366U, 0x3E3BBA50U, 0x9F2BF2CU, 0x73F18BAU, 0xB561B097U, 0x6DC1E6EFU, 0x9000A7E8U, 0xEE613496U, 0xCAD661B5U, 0xADEFBC1EU, 0x717A2494U,\n0x10ED817CU, 0xD5497538U, 0xC264618U, 0xA723C789U, 0x365CA2E0U, 0xC4AE628U, 0xDAD44170U, 0x69B2A699U, 0xFA94A82BU, 0x9500E45FU, 0x641EDBEU, 0xBBC0F4D2U,\n0xE21AA1F5U, 0x7FDEA451U, 0x5F8E4A17U, 0x9682906DU, 0x41B84148U, 0x6659DDC9U, 0xBA4A5BADU, 0x14B31920U, 0x1360E730U, 0x590C5708U, 0xF019A4AAU, 0x5089CA96U,\n0xF0B0E775U, 0xFDD90E49U, 0x1BF1824BU, 0xE13025FCU, 0xEF137B9DU, 0x7935115AU, 0x718BD26AU, 0xF09E5811U, 0x7BA332A6U, 0xA7615393U, 0x73FAF11U, 0x55936B7CU,\n0x141AF304U, 0x65E071DDU, 0x97589D6U, 0x73A15F22U, 0xB2FDF279U, 0xD6B59BAEU, 0x27ABA3E6U, 0x2367BEC9U, 0xE7C938F9U, 0x560FEC09U, 0x12C5119U, 0x5001267U,\n0x85080CCDU, 0xA3B79EC5U, 0x960F8445U, 0xF895CC46U, 0x3A3AF35CU, 0xC4A951A1U, 0x6BE7869BU, 0xEA4D4D5BU, 0xAE72E7B2U, 0x4282D2C1U, 0x33ECB6EBU, 0x4415ADC3U,\n0xC78A4A6EU, 0xA58D62B2U, 0xF3E3048EU, 0x1B8D6392U, 0x147A0701U, 0xE63DAAF0U, 0x8DDD9273U, 0xF5A4B231U, 0x9FF25F7FU, 0xDDEA0DB3U, 0x5CEB285U, 0x7DB792C7U,\n0x750B1EB5U, 0x57AE509CU, 0xC8F777C2U, 0xBCD1360BU, 0x632D2CA8U, 0xBC462336U, 0x602E733DU, 0x2194100DU, 0x2FB69E71U, 0x58D9C98U, 0xD3907616U, 0x40B025B8U,\n0x8638D05AU, 0xE4433DD5U, 0xB399E080U, 0xEB05158DU, 0x21E41D29U, 0xA97B497EU, 0x7DF9E406U, 0x2B2DDA74U, 0xBA0D8072U, 0x23F15693U, 0x69AB4478U, 0xE134102FU,\n0x8522D229U, 0x1CDE04C8U, 0x1021B3B1U, 0x685893F3U, 0x548FAB48U, 0x3926C75EU, 0xCD7FFCC1U, 0x95E309CCU, 0x70DCC40DU, 0x5809E8BDU, 0xC3D9F1CBU, 0x15C41B45U,\n0x461F4802U, 0xCE801C55U, 0x39156F0DU, 0x3AE08EU, 0x8D001528U, 0x51684523U, 0x85F53FF7U, 0x53E8D579U, 0x81AED8F1U, 0x5DC688FAU, 0x88B16330U, 0x43104043U,\n0x364A68E3U, 0xA3F2B218U, 0x84AC213BU, 0x752D5FFCU, 0xA15A7026U, 0x2CD52C5U, 0x8C136450U, 0x1A32A58U, 0xBE1AD3FCU, 0x368587ABU, 0x24762692U, 0xDB6866FU,\n0xDBFE03C1U, 0x32805E0BU, 0xBDB344CU, 0xB6576FD7U, 0xCE602BD5U, 0xD9A1C5D8U, 0x1E451C58U, 0xA3C947C3U, 0x8A5E6F27U, 0xA76375AEU, 0x5A7B58AAU, 0xE7F70331U,\n0x9E18A785U, 0x5E2B2BB3U, 0x4E3D9008U, 0xF3B1CB93U, 0xFE1D8CFCU, 0xC732037FU, 0xE5F2028FU, 0x922F93ECU, 0x3B1CD1U, 0x489442A4U, 0xF7CEB34U, 0xE3308006U,\n0x9E89A82AU, 0x88E25FD7U, 0xBA9183F8U, 0xC98F90D9U, 0x111E8936U, 0xAB056753U, 0x3E5DD491U, 0x83D04BE3U, 0x7419BEF7U, 0xDEC343D9U, 0xDF53B75BU, 0x8D38CBC1U,\n0x9E65B31DU, 0x49E9647BU, 0x487990F9U, 0x8586DA3AU, 0x8D4BA4A5U, 0xE27A2FD3U, 0xCF0F75B3U, 0x506B7DCCU, 0x7729EE20U, 0x83A892CEU, 0x1724B686U, 0x1D5443E6U,\n0xF994FF2AU, 0x606829CBU, 0x4F6BD1AEU, 0xB8F93024U, 0xF6C1C490U, 0x6F3D1271U, 0xE8119B5BU, 0xB7AC0B9EU, 0xA93D2434U, 0x9CBC7723U, 0x5384167CU, 0x6CC02C32U,\n0xE3AEFA3BU, 0x96ACCCB8U, 0x93EDFEB5U, 0xB455ABEU, 0xE0468B3U, 0xD2638E77U, 0x85F33C85U, 0x53C0FE60U, 0x40A0CF69U, 0xCE296866U, 0xDD49596FU, 0x89ED9A7CU,\n0xB2168218U, 0x2A16FE9FU, 0xC6158813U, 0x96D819A0U, 0xF1CB7821U, 0xF0B3234EU, 0xC76DD37CU, 0xF6999932U, 0xA6540881U, 0xC1476900U, 0xBF852F50U, 0x885BDF62U,\n0x2B6EA5F0U, 0x7BA33443U, 0x1CB055C2U, 0x406B945CU, 0x21FBAB96U, 0x25A9EEF7U, 0x29D0280DU, 0xDCD83354U, 0x95D847CAU, 0x193AD0D7U, 0x65149603U, 0x875F1D51U,\n0xF2D6AE5EU, 0x9E89C614U, 0x71040E80U, 0x2F6DB3B1U, 0x4FBD2D4DU, 0x382CE581U, 0x8682E54AU, 0xC6CE3C16U, 0xD0CDB310U, 0xC097D2DCU, 0x61442A6DU, 0x803FC77EU,\n0xBFABF3D6U, 0x2AB83F69U, 0xB70E7066U, 0x1BED886U, 0xE496DD92U, 0x125067C1U, 0xF2BDF6E8U, 0xA1E56DA4U, 0x1D17DA74U, 0xD6E2180AU, 0x96AAE39BU, 0x9E79ED3CU,\n0xFE814EF2U, 0x55E387B6U, 0x38A8B47FU, 0x1BD7ADCCU, 0xB200788AU, 0xC063E892U, 0x7E1CEC20U, 0x62C476EDU, 0xF83527BEU, 0xCB64655U, 0xF85F383EU, 0xEFE50809U,\n0xA32D4B9DU, 0x14325108U, 0xC46CF3FCU, 0x8646A4A2U, 0x24231E6EU, 0xE8DC260CU, 0x9CA8A446U, 0x4A5517EBU, 0xCDBD569CU, 0xB4C0F066U, 0xF1C615D9U, 0x14C9784FU,\n0xC35ACFA4U, 0xA1F99F39U, 0xDB5D327U, 0x16208387U, 0x487A6530U, 0x8B83FB15U, 0x47AA297BU, 0xA6838556U, 0xFE99F07BU, 0xAAC72C75U, 0xD7EE632BU, 0xCC9E80CU,\n0xDC478D7BU, 0x7E2514C1U, 0xEC7A9229U, 0x7EFF1AE2U, 0xDA58F332U, 0x7FFD9AE0U, 0xD62250F0U, 0x36FF2FD3U, 0x5343E85AU, 0x8ADA0754U, 0x7DE1A231U, 0x73105D3AU,\n0x9EA10A8CU, 0x454632DU, 0x2AFBA286U, 0x638306DBU, 0xD0EE5B94U, 0xBDBA49B8U, 0x26400C9AU, 0xB8A32501U, 0xED50973AU, 0x96A4B4A6U, 0x532A2EC9U, 0xC01BA957U,\n0x11CDDFF8U, 0x38F60BF1U, 0xAA9B52FCU, 0x709E7D5BU, 0xD63F1DE9U, 0xE5D7E3BU, 0xF7AF95C2U, 0x3D792D12U, 0x77418D32U, 0x3AF7B59U, 0xDF7CC644U, 0x796A3A58U,\n0x2A0F1115U, 0x8E3D8B1FU, 0x3EE734ECU, 0xA157B457U, 0x19AD5091U, 0xA348A4DCU, 0x4F107817U, 0xD65CF7B3U, 0xBD678059U, 0x5D63C132U, 0xB71ABEBBU, 0x3E76DFA6U,\n0x7B931373U, 0x4C62A6D8U, 0x57F03940U, 0xB2A038EEU, 0x5FDF9A23U, 0xA0263983U, 0x7E882A01U, 0x9DFC1084U, 0x7072D927U, 0xD8FDE69FU, 0xE0E7157BU, 0x58F4B5B9U,\n0x57E98EE9U, 0x2B7F17D5U, 0xBF5D536FU, 0x19B4B8DDU, 0x670EE546U, 0x759F5B56U, 0x521D3385U, 0x54FF4F92U, 0x2D9CBF6AU, 0xD0F0ACFBU, 0x41F4137CU, 0x3ECD73DCU,\n0xD98F534U, 0xAFC9093DU, 0x11EB63E2U, 0x69341E0FU, 0x45C58EDBU, 0xDFF71D29U, 0xBACC8D3CU, 0x795F863CU, 0xDA5B599FU, 0x756A6CFCU, 0x492FD69AU, 0x29F01476U,\n0x6E924FB3U, 0xE8B85ECU, 0x2AC4EC3FU, 0xF77C2327U, 0x4D7BA0B7U, 0xC9C38BCEU, 0xC46345A2U, 0xA8C65A6U, 0x1A0CBBA0U, 0xC6B953FBU, 0xF469483CU, 0xE8DBA058U,\n0x55E1E9EDU, 0x220DF006U, 0x752BEE8CU, 0xFBB8B0D5U, 0x16F0C1B5U, 0x6F47CA15U, 0xE7DF0A66U, 0x93AA672CU, 0xA4B0DB5U, 0x9798D36AU, 0x210C73B2U, 0x2D884E0BU,\n0x2CF555C5U, 0x2594AF17U, 0xF92DA22FU, 0x4C553278U, 0x559C4DCU, 0x2FEF17FCU, 0xF479A777U, 0x13EC6D08U, 0x507AFB0FU, 0x3DBD6B73U, 0xD3DAA910U, 0x56D07CCDU,\n0x76F544DDU, 0x8D972880U, 0xFF842DA6U, 0xAB51C2E8U, 0xFE925847U, 0x1266FB35U, 0x9951A06U, 0xD3FF1DF6U, 0x51D302CEU, 0x66FB4072U, 0x3338DADDU, 0x67610EA3U,\n0x8FD669ECU, 0xE3411213U, 0xA28A9DA9U, 0x170B62DFU, 0x46D9B7D7U, 0x3BAA86EEU, 0xF0257FF7U, 0x6DBF878BU, 0x520CEC4CU, 0x4A7596BEU, 0x732E55FDU, 0x36069DA1U,\n0x17D3C5EEU, 0xCCBE59DCU, 0xF17154B8U, 0xFED05FF9U, 0x70F66BAAU, 0x668A255FU, 0x5E1E3F24U, 0xC6AA9101U, 0xA9DF1308U, 0x1CE8989FU, 0xF2C4756CU, 0x606CB509U,\n0x2394B2A6U, 0x16C80794U, 0x2A219240U, 0xAE1222A3U, 0x8CB97B86U, 0x4CACE737U, 0x8EC4A97AU, 0xE6AE7EDU, 0xB911D42CU, 0x6C05079AU, 0x2A97030AU, 0x1E97978CU,\n0xA9209129U, 0x859AA93BU, 0xC97EF510U, 0x66821408U, 0x54C18CD7U, 0x66B85367U, 0x5C604485U, 0x3A9FAE2U, 0x3CD0C352U, 0x92F9FA79U, 0xC17824C7U, 0xB803EAFU,\n0x538FB0D3U, 0x948FC967U, 0x41D70FEBU, 0x8F21EB7FU, 0x90F8A446U, 0xD768A2BEU, 0xDDABF113U, 0xD17178C2U, 0x56378FD7U, 0xBED2C72U, 0x93D47BEAU, 0xAEA4D915U,\n0xF5601C83U, 0x317F54CBU, 0x10AA0C84U, 0xD907DC46U, 0xE342A78AU, 0xBD65E28U, 0xB389E207U, 0x3BD7614EU, 0xC08B5199U, 0x4E118784U, 0x48C31E39U, 0x7CF71C84U,\n0xB0B24B2CU, 0x1FE25283U, 0x629F7C2DU, 0x57EF2916U, 0x2B576B96U, 0xCE051BEAU, 0xEC16C919U, 0xBFF3A0CBU, 0xE838218DU, 0xEE352A21U, 0xE38E5B7FU, 0x3A8BB7DFU,\n0x1F0ECE93U, 0x5385D9B7U, 0xAC29F8F4U, 0x575DB2ADU, 0xACBF183FU, 0x567EEE14U, 0xE8AD89DBU, 0xE3E9CEBBU, 0xD8CE4D00U, 0xBA789F5AU, 0xF87F77BBU, 0x4A4B351BU,\n0xCF96A065U, 0x74744A1FU, 0xD93F0955U, 0x4F6722B3U, 0xFDCD24EEU, 0xE6A9F921U, 0x166CC0D6U, 0xB92186A0U, 0x29211071U, 0xD978BCDDU, 0xB14992FCU, 0x19854E77U,\n0x3FE60A5U, 0x58FC1E58U, 0x10475664U, 0xDAFCA3E6U, 0xFDCAE1D1U, 0x82D2915DU, 0xE3DFF22AU, 0x130FDF55U, 0xD3B59A0FU, 0xD5F60290U, 0x6CCD0385U, 0x58438A99U,\n0xDE26F199U, 0x3E40DEB9U, 0x706B5E46U, 0x3B8DBFD5U, 0x28CAFF29U, 0xD0A47AE4U, 0x3AA9B57AU, 0x8504AFF7U, 0x5E28BCA3U, 0xFBE90C93U, 0xEAD04C12U, 0xCB24B726U,\n0xF6C65A18U, 0x2A34D380U, 0x62E270A6U, 0x6E546C36U, 0x31006A54U, 0x29503BFAU, 0xBF30759DU, 0xA18BD87CU, 0xA2D5259U, 0x34D4508EU, 0xCDF525B8U, 0xD28710F0U,\n0xB2863FDDU, 0x9F9E5922U, 0xE1642FD1U, 0x12D001U, 0x16F6CE5BU, 0x70B1EF12U, 0xA6AC059CU, 0xBBEBD881U, 0x472BCFE6U, 0xE62890CU, 0xA80B1464U, 0xC5A27872U,\n0x3BEA65ABU, 0xA8392847U, 0x279F356AU, 0x7F03C067U, 0x7D764E6CU, 0xA208B04BU, 0x110FA646U, 0xFC591AA1U, 0x4B671A82U, 0x8737FAAAU, 0x552AF746U, 0x21D61F84U,\n0xB82AC965U, 0x3B3F074FU, 0x60BBD08AU, 0x426CB588U, 0xDB906369U, 0x9B6900FEU, 0x3017A86U, 0xEEDF7292U, 0xC60A5E22U, 0x19DDB430U, 0x7B87C150U, 0x49FFE8C2U,\n0x875E3C9U, 0xEFB8D540U, 0xBB551FEU, 0x485E57B1U, 0x7171D832U, 0xAA37823U, 0xB678C79CU, 0x9AD6EC38U, 0x6CB5177AU, 0xE42A432DU, 0xA711D2F5U, 0xDF1942E9U,\n0x92D028AU, 0xF00C77BCU, 0x7049BC1CU, 0xA2670B26U, 0x20B4D99EU, 0x8BEAF43BU, 0xEA39A146U, 0x14F38D7U, 0x3A72453FU, 0x464E138BU, 0xC1B90DE8U, 0x9EAD10B7U,\n0x1E4CB9E4U, 0x2CF77C5BU, 0x8927E59AU, 0x7116D68AU, 0xBB545FEBU, 0x81B4AA98U, 0xD01859CAU, 0xDF71061U, 0x479A64C4U, 0x71B1C5DBU, 0x5964E96BU, 0xF1560394U,\n0xF28823A4U, 0xE4E97619U, 0x1295A088U, 0x7049FDAU, 0xE592D573U, 0x3535BE69U, 0x1619B844U, 0xD727F3DEU, 0x13232E2BU, 0x51338796U, 0x4B84738U, 0xF482392DU,\n0xAB40F973U, 0x9E36BDD6U, 0x3845F022U, 0xA2F40E8BU, 0xC698595DU, 0x87D8352DU, 0xEEB9CC7FU, 0xC644164DU, 0x4CDBDEAFU, 0xE2DE7491U, 0x31F7EB3DU, 0x9599038U,\n0x9D918DA1U, 0x65E89B01U, 0x886E82A6U, 0xFFFE534AU, 0xE151673CU, 0x2026F087U, 0x6D682B4EU, 0xDEF444BDU, 0xF1416D33U, 0xBA2D6D03U, 0xEEFF589AU, 0xD41F5106U,\n0xDE088E4CU, 0x999A79F6U, 0xE8AEA3D0U, 0xE93324AEU, 0xAD49F7U, 0x5FE7A23DU, 0xC1728CACU, 0x60B9C80EU, 0xE3F2AFEBU, 0x95F0722U, 0xA039D72EU, 0xD6262CCFU,\n0x76C373F8U, 0xB040A838U, 0xCF9DD85FU, 0x89EE399BU, 0x4280BC28U, 0xFC69FC63U, 0x3D05B634U, 0x49B5C357U, 0x6E56C308U, 0x1754FB6U, 0xBB51865DU, 0x8715888CU,\n0x1D1552DU, 0xB7351D91U, 0x4537E08EU, 0xAD2738D0U, 0xAE6891D3U, 0x3D480692U, 0x964B44CEU, 0x7F89BA71U, 0x2E2BD03U, 0x7686B89FU, 0xDC21E010U, 0xC76B9756U,\n0x51599457U, 0x9E6B1EDU, 0x9A6FBFC1U, 0xBBC871A0U, 0xC3FAEA7CU, 0xFAD6BDE8U, 0x1D426A4FU, 0x54E93201U, 0x23516287U, 0x7D2AAB9U, 0x3D14944U, 0x20F91670U,\n0x7A1502CDU, 0x5A8B6DF7U, 0x2D7BE547U, 0xC7686672U, 0x6101B9D7U, 0x6D9E58AFU, 0xEB0B3F26U, 0x92FD1CE6U, 0x10438777U, 0xB9A6DF98U, 0x8F21D6D6U, 0xA5DC42D9U,\n0xAA8A7A11U, 0x97ABDF97U, 0xF820B371U, 0x12E7060FU, 0x7898B7E6U, 0xECC6032BU, 0x9CD6CAB9U, 0x3BC2405BU, 0x16974E59U, 0xB1168D81U, 0x2F1E6611U, 0xCEFB7A8CU,\n0x399695C7U, 0x116814AFU, 0x588FA645U, 0xC9B298CDU, 0xC2BC200U, 0x264CB5CEU, 0x9C43107EU, 0xA1A8D07EU, 0xE6BF9B30U, 0xDAAEEB22U, 0x9AE019F0U, 0xE91C586BU,\n0x2C799952U, 0xE5A1E7CEU, 0x405A2DB6U, 0x804346D2U, 0xBE708250U, 0x67B107D0U, 0xC596A1FBU, 0xB7E8AC33U, 0x829235A2U, 0xA0D9823DU, 0x46D24122U, 0x2B9EA93U,\n0xA1C073C6U, 0xC4EAFBEU, 0x9CBCA0CEU, 0x87CB523EU, 0x93F53F24U, 0x30F100CBU, 0xC76E5C71U, 0xC5B21FE9U, 0xEEEE5BF8U, 0xBB647D0EU, 0xE0A73F06U, 0xC685C32DU,\n0x1C5C9B9BU, 0x2A44CEAU, 0x9534296EU, 0x5A5EC350U, 0xB3780B29U, 0xE8A4B00U, 0xF8327784U, 0x996FC0C8U, 0xD67C8539U, 0x621659DDU, 0x1FD6996U, 0xB398D6D2U,\n0xBBEC03D6U, 0x3F8504F6U, 0x9FA1B8CEU, 0x83ADB8A5U, 0x9004789FU, 0x99ED15F4U, 0x6883E2DU, 0x3C75FFACU, 0xD2391F74U, 0x66EE73F1U, 0x8FA89A21U, 0x801A7503U,\n0x522E1784U, 0x36392E2EU, 0x19DF8128U, 0x6EA25305U, 0x846C8437U, 0x4EE0BEACU, 0xF690FDC5U, 0xF6832E1EU, 0xA48C9379U, 0x5F8921B0U, 0xFE3D1F9CU, 0x4B6BADFEU,\n0x2DDBBD52U, 0xFA227036U, 0xFE4FE03AU, 0xD4BD8877U, 0xC255594EU, 0x8A61FE32U, 0x63B85E32U, 0xC24637DFU, 0x39229F39U, 0xF9B405A4U, 0x3EBF9329U, 0xF28B6E98U,\n0x81DAA8C9U, 0x55ACEF34U, 0x296DE97FU, 0x5953C3AU, 0x7268DC76U, 0x49C2BAAAU, 0x1FD82E79U, 0xE54C1803U, 0x9CD98442U, 0x4C57DE89U, 0x7FD97D63U, 0x5B3CB6F5U,\n0x67B3B2E4U, 0x3F4D318AU, 0x3EC0ABB7U, 0xEE3200C0U, 0x3FA3D082U, 0x4D0F7C4AU, 0x892D309CU, 0x56B3DD2CU, 0xEB5F7612U, 0x2EE42882U, 0xCF07E495U, 0xF2A9BC6BU,\n0x9DA909A4U, 0x937B3A8U, 0x363217CFU, 0x9AED0006U, 0x60362015U, 0x5226B280U, 0x8524AEA3U, 0xFBC8F58DU, 0x7B172312U, 0x9CCC34DU, 0xA8AE6F61U, 0xE3CA111EU,\n0x59FE8325U, 0x6EC95B2U, 0xF676DCD9U, 0x9A250AE3U, 0x99E585E7U, 0xA62C89BU, 0xC631DEF4U, 0x58BC30C1U, 0x470412E1U, 0xC05117F0U, 0xA51D983CU, 0x1E629C01U,\n0x541C0E33U, 0xEB80059DU, 0x129D07E0U, 0x48EDAAD6U, 0x8397F485U, 0x1857F8F0U, 0x97497FE1U, 0xA8AEC1F6U, 0xC8027F76U, 0x736E96A8U, 0x1A578E1AU, 0x6B9FD701U,\n0x8B4734B7U, 0x7102220U, 0x13FE645BU, 0xE25D1A59U, 0x7A7D69ECU, 0x9295838AU, 0x6761FB08U, 0x493105F6U, 0x13BF90E3U, 0x6691E578U, 0xC741FD85U, 0x62E01643U,\n0xE782CAB0U, 0x3223B5F4U, 0xB36E1464U, 0x2C04AA45U, 0x9260D4CBU, 0x660DB966U, 0x41F2BCF7U, 0xF17D8432U, 0x17C405A6U, 0x87274585U, 0x537E9E9EU, 0x7B344BCU,\n0x1E023531U, 0xDD6783A8U, 0xFA37738DU, 0xD7D7F72CU, 0xEAADB26BU, 0x5B511B45U, 0x240A687DU, 0x44E66B55U, 0xD0808C97U, 0xF31BFF35U, 0x9EE5345CU, 0x258906C2U,\n0x9860CC4AU, 0xB9CCB14FU, 0x5580726EU, 0x26B182EU, 0x4F6C5C89U, 0x5D26775DU, 0xF0CA22ADU, 0x2DD7CAC5U, 0xD0EDAF27U, 0x8C09D6DU, 0xDCFB88F2U, 0x71C63BCFU,\n0xAEC8C854U, 0xC3ADC8F6U, 0xE93C7B65U, 0xC698C893U, 0x8E574092U, 0x92FF3CB6U, 0xF8648ABAU, 0xB5BC2991U, 0x5E05BD9DU, 0xB09A78A0U, 0x15AB67C0U, 0x3FADF7CEU,\n0x2927A3FDU, 0x445BA5DBU, 0xFA3008B2U, 0x2891DB6BU, 0xDBB845FU, 0x573B85ECU, 0x18F54327U, 0x74F4356BU, 0x95971E70U, 0x4470A211U, 0xB905173DU, 0x414D94A9U,\n0xE929B3ADU, 0xAE3B8A7AU, 0xFF18EB1U, 0xEE383B0CU, 0x7B04D607U, 0x693E6DA4U, 0xC3FB577EU, 0x7AC48735U, 0x1A99C4ADU, 0x45B0C657U, 0x5CC05A5U, 0xE24AE587U,\n0x884FA08EU, 0x5BCE0610U, 0xCCBADA00U, 0xEEBE62E2U, 0x1BED96D4U, 0xFF9731C4U, 0x5644B2A0U, 0x9119ABCAU, 0x28FC1FE4U, 0x983CF251U, 0xF92F5A3BU, 0xDC9DC061U,\n0x5B150730U, 0xCB5F1CBDU, 0x5966470CU, 0xE5C92630U, 0x974502D1U, 0x2047F98CU, 0x444D6B88U, 0xFB8235EU, 0x359D6CU, 0xC34153C2U, 0x2A95D777U, 0x5B6E4E6FU,\n0xB408F38U, 0x2423E46EU, 0x4C85DCE9U, 0xBBEEC84BU, 0xE9D46305U, 0x30187C97U, 0x181599U, 0xF4F90026U, 0x952F111CU, 0x5B9D9750U, 0x624304BEU, 0xCE566F2EU,\n0xF5B066E3U, 0xC84AEDC4U, 0x26984E70U, 0xD637245CU, 0xAEADB1U, 0x7F65D377U, 0xDD7410C6U, 0xE156A6E8U, 0x2BDB808BU, 0x3107D6E5U, 0xA654151FU, 0x5DBD1349U,\n0x29676B1CU, 0xD9B9A12BU, 0x559571C7U, 0x17D9B1EFU, 0x8EBB69EAU, 0x6E834FD7U, 0x22AF6658U, 0x50FD3DEBU, 0xA35B6E1U, 0x87B78513U, 0x5CA68B6U, 0xF3B77C65U,\n0xDAE7ACC8U, 0xBD84E707U, 0xC0B1F2EEU, 0x7C5B280BU, 0x3C82C2A7U, 0xF1848767U, 0xCF397063U, 0x11293CECU, 0x86B3A406U, 0xCF0391E2U, 0xCAE6F488U, 0xA2130914U,\n0x80443800U, 0x75A52C98U, 0x255D3BC5U, 0x70B8141FU, 0x52A6D7E8U, 0xF3773CB5U, 0x16682961U, 0xE291D23CU, 0xEA1AB08DU, 0x3AF6AC29U, 0xF077AF0BU, 0xDB42975FU,\n0xE4B5A5C3U, 0x828767D9U, 0xCE511DFDU, 0x8FA20C6DU, 0xD4FEEEB4U, 0x3B75D536U, 0x81090466U, 0xB210CB77U, 0xA0A56499U, 0x601ADD2U, 0xAB167BEAU, 0xF706C300U,\n0x1B058070U, 0x9F01D362U, 0x52CFBC44U, 0x96A9AB7BU, 0x966588D6U, 0xB899A286U, 0x5EE0407AU, 0x681CEAFFU, 0x4C40811U, 0xB20B7269U, 0x367237BFU, 0x428A0B94U,\n0xD691C645U, 0xB12CFF27U, 0x9E6383BEU, 0x6176461EU, 0xFDB47228U, 0x51A94E60U, 0xFBD6A3E0U, 0xF187D05EU, 0x4DA143CFU, 0x49C7CCE6U, 0xB4B52BF7U, 0x3BA3A346U,\n0xA803AAFEU, 0x9FC8C67BU, 0xA639766CU, 0x4C6B2408U, 0xED09AD3DU, 0xDBBD48U, 0xE0E2196DU, 0xE9FFEE62U, 0xB50384FU, 0xDFE188A2U, 0x3633AE21U, 0xAEF9F8C9U,\n0x80178502U, 0xED42BC9CU, 0x85653DDDU, 0x394C79C4U, 0x71477B3DU, 0xF8C674CFU, 0xD4B8C4E9U, 0x2A5947F9U, 0xFC4C64D2U, 0x6B322B31U, 0xB9B20DFBU, 0x57BB1739U,\n0x3D915162U, 0x5AAAA1ACU, 0x91EB2A66U, 0x35CA03C9U, 0xDE6D0202U, 0xCB2E089FU, 0x57048634U, 0xEEBBC058U, 0x3813A5F6U, 0x722CE848U, 0x8479A8A6U, 0xE92B8076U,\n0x1B1F3F83U, 0x81D8932FU, 0xFDDDB092U, 0x30D5B4C9U, 0xC91CF267U, 0x36AD135BU, 0x71F52515U, 0xC089EF35U, 0x41038328U, 0x6456724BU, 0x1B2B3E23U, 0xD24210BBU,\n0xC62FBD71U, 0xFCAD3662U, 0x8E3F7FF2U, 0xE48AE1B8U, 0xD23BC8ABU, 0xEF89F436U, 0x62BCE039U, 0x1A5DE46CU, 0x16236FU, 0xCA241E6DU, 0x9EEE203BU, 0x3D3879E4U,\n0x1D1C6180U, 0xD378251U, 0xE2BA4A87U, 0x66DFA1A0U, 0x7418FB2CU, 0x6CB7295CU, 0x9F7002F9U, 0x1F7DE611U, 0x5FA0D6B3U, 0xA466F742U, 0x8E097065U, 0x7F7B3458U,\n0x25360EB8U, 0xE8ADA4B0U, 0x18B1FE00U, 0x2AC22D1CU, 0x4186B027U, 0x959C76EAU, 0x8872FA1EU, 0x486317D3U, 0xED35E29BU, 0xB17E878U, 0x8F6CC5FCU, 0x2E8831DBU,\n0xFA55FF05U, 0x6FEFF36U, 0xBE942D00U, 0x36B6480EU, 0x4C5D91EFU, 0xEB2C7AC2U, 0xEA33683AU, 0xB8A51C5EU, 0x8BF2227BU, 0xF37E24F6U, 0x864012FU, 0x5DE7786U,\n0x3EFEC660U, 0xE2761ACU, 0x54A6C4ABU, 0x4047D505U, 0x37FBD45CU, 0x65D5D78BU, 0xBE3CF030U, 0x4A150EFBU, 0x2F283083U, 0xCB47C04DU, 0x973EDABU, 0xD6BC301FU,\n0xD792EACU, 0xEEA55E7U, 0xAB40BD74U, 0x2CAC2CA8U, 0x9B8691CAU, 0xF0EF8D89U, 0xA743045FU, 0xB76BFEDU, 0x76DD731AU, 0x3752687U, 0x968C7740U, 0x770D8687U,\n0xF6DE8D96U, 0x91B3A983U, 0x7228545U, 0xA8134914U, 0xFD9A01E6U, 0x72386ADDU, 0x845A80A6U, 0x10675D75U, 0x31032835U, 0xB6510D2AU, 0x67E9C2D9U, 0x8C073B5FU,\n0x348F2BA5U, 0xE4DF38ECU, 0x535EDE00U, 0xE31FD2EFU, 0xAA5BD7DCU, 0x9D963F06U, 0x8D26D2E9U, 0x5D76C1A0U, 0x95131597U, 0x25521978U, 0xA549BA78U, 0xFC809EA1U,\n0x9CC1A4E2U, 0x58043720U, 0xE3BD3B7BU, 0xED684815U, 0x8A1B48E8U, 0x9C5BFCA1U, 0x1C5A009AU, 0x7485B1C1U, 0xCA86F28AU, 0x32FA853AU, 0xB3626483U, 0x972DA82DU,\n0xE492749AU, 0x35CA2D1DU, 0xC1E25D40U, 0xFAA559E2U, 0x27472E18U, 0xEA8FB72AU, 0x5D846824U, 0x77540CDAU, 0x45717960U, 0x57C4D68EU, 0xEF78B1EBU, 0x72AF8952U,\n0xCA13EE37U, 0xD8A641D9U, 0x601A26BCU, 0x387936EAU, 0x80C5518FU, 0x47E9CBACU, 0xFF55ACC9U, 0xEDE00327U, 0x835DF178U, 0xDD2F69BU, 0xC178F605U, 0xCBBDFF1CU,\n0x717FF82U, 0x8998F861U, 0x4532F8FFU, 0x9C12EA53U, 0x50B8EACDU, 0x2E8AEB86U, 0xE220EB18U, 0x6CAFECFBU, 0x6D9D258CU, 0xBC42E87CU, 0x61A4E33U, 0xCFB8C4FU,\n0x81664E1AU, 0x13BBA529U, 0x5BFB8755U, 0x5B9E60F1U, 0x89633A85U, 0x3E0560D0U, 0x39A51A29U, 0x8EC3407CU, 0xE6DEDAE1U, 0x51B880B4U, 0xC3614311U, 0x74071944U,\n0xEEA49D28U, 0x59C2C77DU, 0x236AF20EU, 0x940CA85BU, 0xF46B750FU, 0x430D2F5AU, 0xD1002AD3U, 0x66667086U, 0x44AD55A3U, 0xF3CB0FF6U, 0x31DF5DE0U, 0x86B907B5U,\n0x5618FA4DU, 0xE17EA018U, 0x5E62BD84U, 0xE904E7D1U, 0x61C60A7FU, 0xD6A0502AU, 0x796DEC4CU, 0xCE0BB619U, 0xCBCFC2F4U, 0x7CA998A1U, 0x7373A591U, 0xC415FFC4U,\n0x93ACD2A2U, 0x24CA88F7U, 0x6830EF86U, 0xDF56B5D3U, 0xEF283F18U, 0x584E654DU, 0xA5FE80A0U, 0x1298DAF5U, 0x8095DF7CU, 0x37F38529U, 0x78D0FE2U, 0xB0EB55B7U,\n0x1D42E7C5U, 0xAA24BD90U, 0x1538A00CU, 0xA25EFA59U, 0x4521F793U, 0xF247ADC6U, 0xD8F6CF2AU, 0x6F90957FU, 0xF5E7D73FU, 0x42818D6AU, 0x72FF07A1U, 0xC5995DF4U,\n0x92207092U, 0x25462AC7U, 0xE75278D1U, 0x50342284U, 0xD08C88E3U, 0x67EAD2B6U, 0x1838F762U, 0xAF5EAD37U, 0x6112CC53U, 0xD6749606U, 0x2F0C6FC3U, 0x986A3596U,\n0xCA4360C4U, 0x7D253A91U, 0xB74B2F4EU, 0x2D751BU, 0xFF7482BU, 0xB891127EU, 0x5794587DU, 0xE0F20228U, 0xC8276ED0U, 0x7F413485U, 0x13AA1C8FU, 0xA4CC46DAU,\n0x597CA337U, 0xEE1AF962U, 0x52EE48DAU, 0xE588128FU, 0x94B2CC11U, 0x23D49644U, 0xC239270DU, 0x755F7D58U, 0x20825E2AU, 0x97E4047FU, 0xC4AB9B8EU, 0x73CDC1DBU,\n0x70716126U, 0xC7173B73U, 0xAC65B06DU, 0x1C7021BFU, 0x11FB361U, 0xB679E934U, 0x746DBB22U, 0xC30BE177U, 0xF3756BBCU, 0x441331E9U, 0xB9A3D404U, 0xEC58E51U,\n0xFFF99EE2U, 0x489FC4B7U, 0x7C17FCEBU, 0xCB71A6BEU, 0x4106B2AAU, 0xD9C40950U, 0x36C14353U, 0x81A71906U, 0x1BD05B46U, 0xACB60113U, 0x9CC88BD8U, 0x2BAED18DU,\n0x7117AB85U, 0xC671F1D0U, 0x860763FFU, 0x316139AAU, 0x2C0EAB74U, 0x9B68F121U, 0xCCD1DC47U, 0x7BB78612U, 0xDE6473A9U, 0x690229FCU, 0x2BC473EBU, 0x9CA229BEU,\n0x9378148EU, 0x241E4EDBU, 0xEAF2C37U, 0xB9C97662U, 0xA4A6E4BCU, 0x13C0BEE9U, 0x252C88A1U, 0x924AD2F4U, 0xAA4E1FF6U, 0x1D2845A3U, 0x9764CE8AU, 0x200294DFU,\n0x92F4B6BEU, 0x2592ECEBU, 0xCD89B85BU, 0x7AEFE20EU, 0x47D77DU, 0xB7218D28U, 0xE8E2E787U, 0x5F84BDD2U, 0x505E80E2U, 0xE738DAB7U, 0x660CD2E0U, 0xD16A88B5U,\n0xE96E45B7U, 0x5E081FE2U, 0xDEB0B585U, 0x69D6EFD0U, 0xCC051A6BU, 0x7B63403EU, 0xFEA1FAFEU, 0x49C7A0ABU, 0x4B1DCAF5U, 0xFC7B90A0U, 0xB1D993CDU, 0x6BFC998U,\n0x5F3AD998U, 0xE85C83CDU, 0x41E9EBBBU, 0xF68FB1EEU, 0xDA78A9ADU, 0x6D1EF3F8U, 0xC2EDE121U, 0x758BBB74U, 0x883B5E99U, 0x3F5D04CCU, 0x4D8F7676U, 0xFAE92C23U,\n0xCB1B04D8U, 0x7C7D5E8DU, 0xBFE5AEABU, 0x883F4FEU, 0x759C9CEU, 0xB03F939BU, 0x80411950U, 0x37274305U, 0x308739FCU, 0x87E163A9U, 0xF5331113U, 0x42554B46U,\n0x2A48D1DBU, 0x9D2E8B8EU, 0x1D9621E9U, 0xAAF07BBCU, 0xA52A468CU, 0x124C1CD9U, 0xE786BEFDU, 0x50E0E4A8U, 0x9A8EF177U, 0x2DE8AB22U, 0xB79FE962U, 0xF9B337U,\n0x57409E51U, 0xE026C404U, 0x547CF459U, 0xE31AAE0CU, 0x6BD843A2U, 0xDCBE19F7U, 0x5C06B390U, 0xEB60E9C5U, 0xECC0933CU, 0x5BA6C969U, 0x2F71F45U, 0xB5914510U,\n0xA0849007U, 0x17E2CA52U, 0x5D8F4DD1U, 0x785F2A36U, 0xBA4B7820U, 0xD2D2275U, 0xA8FED7CEU, 0x1F988D9BU, 0x77851706U, 0xC0E34D53U, 0xB2313FE9U, 0x55765BCU,\n0xA8D588CU, 0xBDEB02D9U, 0x9F2027FCU, 0x28467DA9U, 0x34A54D47U, 0x83C31712U, 0x96D6C205U, 0x21B09850U, 0x335DBD17U, 0xF11165A8U, 0x46773FFDU, 0x9EAC85CCU,\n0x29CADF99U, 0x3237F1C4U, 0x8551AB91U, 0x3A4DB60DU, 0x8D2BEC58U, 0x709B09B5U, 0xC7FD53E0U, 0x5FD0B10BU, 0xE8B6EB5EU, 0xC05D2919U, 0x773B734CU, 0x90447E86U,\n0x272224D3U, 0xA82A11E2U, 0x1F4C4BB7U, 0x65E47EC4U, 0xD2822491U, 0xBA9FBE0CU, 0xDF9E459U, 0x523A8EF6U, 0xE55CD4A3U, 0xEA86E993U, 0x5DE0B3C6U, 0x3D876E92U,\n0x8AE134C7U, 0x6D9E390DU, 0xDAF86358U, 0xCFEDB64FU, 0x788BEC1AU, 0x7751D12AU, 0xC0378B7FU, 0x83A9B574U, 0x34CFEF21U, 0xCCB2223U, 0xBBAD7876U, 0x461D9D9BU,\n0xF17BC7CEU, 0x1604CA04U, 0xA1629051U, 0xF6DBBD37U, 0x41BDE762U, 0xAEB8AD61U, 0x19DEF734U, 0x911C1A9AU, 0x267A40CFU, 0x4B165EAU, 0xB3D73FBFU, 0x1E7E8DCDU,\n0xA918D798U, 0x336F95D8U, 0x8409CF8DU, 0x21DA3A36U, 0x96BC6063U, 0xBC0D028FU, 0xB6B58DAU, 0x9CF62567U, 0x2B907F32U, 0x4E67DA52U, 0xF9018007U, 0x43678D3CU,\n0xF401D769U, 0x54A83275U, 0xE3CE6820U, 0xC97F0ACCU, 0x7E195099U, 0x3B15D211U, 0x8C738844U, 0xEC145510U, 0x5B720F45U, 0x99665D53U, 0x2E000706U, 0x6376C247U,\n0xD4109812U, 0xE46E12D9U, 0x5308488CU, 0x29A07DFFU, 0x9EC627AAU, 0xE5E2B0E9U, 0x5284EABCU, 0xA74E4898U, 0x102812CDU, 0xD478013U, 0xBA21DA46U, 0x17886834U,\n0xA0EE3261U, 0x4FEB7862U, 0xF88D2237U, 0x62FA6077U, 0xD59C3A22U, 0x20569806U, 0x9730C253U, 0x6A8027BEU, 0xDDE67DEBU, 0x318A297CU, 0x77EFB560U, 0x3A997021U,\n0x8DFF2A74U, 0x78358850U, 0xCF53D205U, 0x5D8A11A0U, 0xEAEC4BF5U, 0x8BD3F2BDU, 0x3CB5A8E8U, 0x8DAB26ADU, 0x3ACD7CF8U, 0x53DC7DAU, 0xB25B9D8FU, 0x5FEE1FB4U,\n0xE88845E1U, 0x6468DCF4U, 0xD30E86A1U, 0xB3833366U, 0x4E56933U, 0xA94CDB41U, 0x1E2A8114U, 0x262E4C16U, 0x91481643U, 0xDC3ED302U, 0x6B588957U, 0xF9558CDEU,\n0x4E33D68BU, 0x4993AC72U, 0xFEF5F627U, 0x535C4455U, 0xE43A1E00U, 0xA1369C88U, 0x1650C6DDU, 0x845DC354U, 0x333B9901U, 0x2E540BDFU, 0x9932518AU, 0xBBF974AFU,\n0xC9F2EFAU, 0x9E922B73U, 0x29F47126U, 0x176200A7U, 0xA0045AF2U, 0x1E94E55EU, 0xA9F2BF0BU, 0x7129053AU, 0xC64F5F6FU, 0x4E8DB2C1U, 0xF9EBE894U, 0xE4847A4AU,\n0x53E2201FU, 0x3B2B7CAEU, 0x8C4D26FBU, 0x107C1E14U, 0xA71A4441U, 0x3D6D0601U, 0x8A0B5C54U, 0xD1F96FEAU, 0x701F8A2FU, 0xEDCCFBF9U, 0x2C9B1FAU, 0xB5AFEBAFU,\n0x6BE6ED1DU, 0xDC80B748U, 0xF0A36927U, 0x47C53372U, 0xA8C07971U, 0x1FA62324U, 0x7FC1FE70U, 0xC8A7A425U, 0x77BBB9B9U, 0xC0DDE3ECU, 0x351741C8U, 0x82711B9DU,\n0x9F1E8943U, 0x2878D316U, 0x38FD7E35U, 0x8F9B2460U, 0x481F0E42U, 0xFF795417U, 0xBA75D69FU, 0xD138CCAU, 0x7DA5F064U, 0xCAC3AA31U, 0xF783D92BU, 0x40E5837EU,\n0xA0BA3EB8U, 0x17DC64EDU, 0x7535DF3EU, 0xC253856BU, 0x8F25402AU, 0x38431A7FU, 0xC797F186U, 0x70F1ABD3U, 0x604AA84FU, 0xD72CF21AU, 0x47AF9114U, 0xF0C9CB41U,\n0x27A2EE26U, 0x90C4B473U, 0xBEBDCAB7U, 0x9DB90E2U, 0xED4C310CU, 0x5A2A6B59U, 0x223D969U, 0xB545833CU, 0x96E86CBAU, 0x218E36EFU, 0xA06EF894U, 0x1708A2C1U,\n0x6D74519EU, 0xDA120BCBU, 0x180659DDU, 0xAF600388U, 0xDDB27132U, 0x6AD42B67U, 0xD5C836FBU, 0x62AE6CAEU, 0x2474ECBDU, 0x9312B6E8U, 0xCF07DEDCU, 0x78618489U,\n0x32DD9957U, 0x85BBC302U, 0x90AE1615U, 0x27C84C40U, 0xC0B7418AU, 0x77D11BDFU, 0x3AA7DE9EU, 0x8DC184CBU, 0xB5C549C9U, 0x2A3139CU, 0x62C4CEC8U, 0xD5A2949DU,\n0x28127170U, 0x9F742B25U, 0xA770E627U, 0x1016BC72U, 0x206836B9U, 0x970E6CECU, 0x1FCC8142U, 0xA8AADB17U, 0x5036965U, 0xB2653330U, 0x52862C08U, 0xBA1F74F9U,\n0xEDA6599FU, 0x5AC003CAU, 0x47526A2CU, 0x3D07A467U, 0xCFD318F0U, 0x78B542A5U, 0xA9981D6DU, 0x1EFE4738U, 0x8CF342B1U, 0x3B9518E4U, 0x9BD6956BU, 0x2CB0CF3EU,\n0xD0584ECFU, 0x673E149AU, 0x76E3DDA5U, 0xC18587F0U, 0xC625FD09U, 0x7143A75CU, 0x195E3DC1U, 0xAE386794U, 0xBEB922FU, 0xBC8DC87AU, 0xD51CF0D7U, 0x627AAA82U,\n0xA67301FU, 0xBD016A4AU, 0x8505A748U, 0x3263FD1DU, 0x52042049U, 0xE5627A1CU, 0x5CECDB03U, 0xEB8A8156U, 0xF22D0FA0U, 0x454B55F5U, 0x7453159DU, 0xC3354FC8U,\n0x37734FDCU, 0x80151589U, 0x8D7F827U, 0xBFB1A272U };\n\nconst ReplacementIndexStruct ReplacementIndexData[] = {\n\t{ utf16char(43), medium(1) },\n\t{ utf16char(45), medium(1) },\n\t{ utf16char(49), medium(2) },\n\t{ utf16char(50), medium(1) },\n\t{ utf16char(56), medium(1) },\n\t{ utf16char(97), medium(129) },\n\t{ utf16char(98), medium(226) },\n\t{ utf16char(99), medium(290) },\n\t{ utf16char(100), medium(100) },\n\t{ utf16char(101), medium(70) },\n\t{ utf16char(102), medium(437) },\n\t{ utf16char(103), medium(108) },\n\t{ utf16char(104), medium(138) },\n\t{ utf16char(105), medium(53) },\n\t{ utf16char(106), medium(25) },\n\t{ utf16char(107), medium(53) },\n\t{ utf16char(108), medium(101) },\n\t{ utf16char(109), medium(247) },\n\t{ utf16char(110), medium(74) },\n\t{ utf16char(111), medium(71) },\n\t{ utf16char(112), medium(201) },\n\t{ utf16char(113), medium(8) },\n\t{ utf16char(114), medium(114) },\n\t{ utf16char(115), medium(289) },\n\t{ utf16char(116), medium(148) },\n\t{ utf16char(117), medium(53) },\n\t{ utf16char(118), medium(28) },\n\t{ utf16char(119), medium(211) },\n\t{ utf16char(120), medium(4) },\n\t{ utf16char(121), medium(8) },\n\t{ utf16char(122), medium(11) },\n};\n\nstd::vector<Replacement> Replacements;\nstd::map<utf16char, std::vector<const Replacement*>> ReplacementsMap;\nstd::map<internal::checksum, const Replacement*> ReplacementsHash;\n\n} // namespace\n\nvoid InitReplacements() {\n\tif (!Replacements.empty()) {\n\t\treturn;\n\t}\n\tauto data = ReplacementData;\n\tauto takeString = [&data](int size) {\n\t\tauto result = utf16string(data, size);\n\t\tdata += size;\n\t\treturn result;\n\t};\n\tauto wordSize = ReplacementWordLengths;\n\n\tReplacements.reserve(1936);\n\tfor (auto item : ReplacementInitData) {\n\t\tauto emoji = takeString(item.emojiSize);\n\t\tauto replacement = takeString(item.replacementSize);\n\t\tauto words = std::vector<utf16string>();\n\t\twords.reserve(item.wordsCount);\n\t\tfor (auto i = 0; i != item.wordsCount; ++i) {\n\t\t\twords.push_back(takeString(*wordSize++));\n\t\t}\n\t\tReplacements.push_back({ std::move(emoji), std::move(replacement), std::move(words) });\n\t}\n\n\tauto indices = ReplacementIndices;\n\tauto items = &Replacements[0];\n\tfor (auto item : ReplacementIndexData) {\n\t\tauto index = std::vector<const Replacement*>();\n\t\tindex.reserve(item.count);\n\t\tfor (auto i = 0; i != item.count; ++i) {\n\t\t\tindex.push_back(items + (*indices++));\n\t\t}\n\t\tReplacementsMap.emplace(item.ch, std::move(index));\n\t}\n\n\tfor (auto checksum : ReplacementChecksums) {\n\t\tReplacementsHash.emplace(checksum, items++);\n\t}\n}\n\nconst std::vector<const Replacement*> *GetReplacements(utf16char first) {\n\tif (ReplacementsMap.empty()) {\n\t\tInitReplacements();\n\t}\n\tauto it = ReplacementsMap.find(first);\n\treturn (it == ReplacementsMap.cend()) ? nullptr : &it->second;\n}\n\nutf16string GetReplacementEmoji(utf16string replacement) {\n\tauto code = internal::countChecksum(replacement.data(), replacement.size() * sizeof(utf16char));\n\tauto it = ReplacementsHash.find(code);\n\treturn (it == ReplacementsHash.cend()) ? utf16string() : it->second->emoji;\n}\n\n} // namespace internal\n} // namespace Emoji\n} // namespace Ui\n"
  },
  {
    "path": "TelegramClient.Native/emoji_suggestions_data.h",
    "content": "/*\nWARNING! All changes made in this file will be lost!\nCreated from 'empty' by 'codegen_emoji'\n\nThis file is part of Telegram Desktop,\nthe official desktop version of Telegram messaging app, see https://telegram.org\n\nTelegram Desktop is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nIt is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nIn addition, as a special exception, the copyright holders give permission\nto link the code of portions of this program with the OpenSSL library.\n\nFull license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\nCopyright (c) 2014-2017 John Preston, https://desktop.telegram.org\n*/\n#pragma once\n\n#include \"emoji_suggestions.h\"\n\nnamespace Ui {\nnamespace Emoji {\nnamespace internal {\n\nstruct Replacement {\n\tutf16string emoji;\n\tutf16string replacement;\n\tstd::vector<utf16string> words;\n};\n\nconst int kReplacementMaxLength = 55;\n\nvoid InitReplacements();\nconst std::vector<const Replacement*> *GetReplacements(utf16char first);\nutf16string GetReplacementEmoji(utf16string replacement);\n\n} // namespace internal\n} // namespace Emoji\n} // namespace Ui\n"
  },
  {
    "path": "TelegramClient.Native/pch.cpp",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"pch.h\"\r\n"
  },
  {
    "path": "TelegramClient.Native/pch.h",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n"
  },
  {
    "path": "TelegramClient.Opus/COpusCodec.cpp",
    "content": "//// (c) Seth Heeren 2013\r\n////\r\n//// Based on src/opus_demo.c in opus-1.0.2\r\n//// License see http://www.opus-codec.org/license/\r\n//#include \"COpusCodec.h\"\r\n//#include <vector>\r\n//#include <iomanip>\r\n//#include <memory>\r\n//#include <sstream>\r\n//#include <fstream>\r\n//\r\n//#include \"opus.h\"\r\n//\r\n//#define MAX_PACKET 1500\r\n//\r\n//const char* OpusErrorException::what()\r\n//{\r\n//    return opus_strerror(code);\r\n//}\r\n//\r\n//// I'd suggest reading with boost::spirit::big_dword or similar\r\n//static uint32_t char_to_int(char ch[4])\r\n//{\r\n//    return static_cast<uint32_t>(static_cast<unsigned char>(ch[0])<<24) |\r\n//           static_cast<uint32_t>(static_cast<unsigned char>(ch[1])<<16) |\r\n//           static_cast<uint32_t>(static_cast<unsigned char>(ch[2])<< 8) |\r\n//           static_cast<uint32_t>(static_cast<unsigned char>(ch[3])<< 0);\r\n//}\r\n//\r\n//struct COpusCodec::Impl\r\n//{\r\n//    Impl(int32_t sampling_rate = 48000, int channels = 1)\r\n//      : \r\n//          _channels(channels),\r\n//          _decoder(nullptr, &opus_decoder_destroy),\r\n//          _state(_max_frame_size, MAX_PACKET, channels)\r\n//    {\r\n//        int err = OPUS_OK;\r\n//        auto raw = opus_decoder_create(sampling_rate, _channels, &err);\r\n//        _decoder.reset(err == OPUS_OK? raw : throw OpusErrorException(err) );\r\n//    }\r\n//\r\n//    bool decode_frame(std::ifstream& fin, std::ofstream& fout)\r\n//    {\r\n//        char ch[4] = {0};\r\n//\r\n//        if (!fin.read(ch, 4) && fin.eof())\r\n//            return false;\r\n//\r\n//        uint32_t len = char_to_int(ch);\r\n//\r\n//        if(len>_state.data.size())\r\n//            throw std::runtime_error(\"Invalid payload length\");\r\n//\r\n//        fin.read(ch, 4);\r\n//        const uint32_t enc_final_range = char_to_int(ch);\r\n//        const auto data = reinterpret_cast<char*>(&_state.data.front());\r\n//\r\n//        size_t read = 0ul;\r\n//        for (auto append_position = data; fin && read<len; append_position += read)\r\n//        {\r\n//            read += fin.readsome(append_position, len-read);\r\n//        }\r\n//\r\n//        if(read<len)\r\n//        {\r\n//            std::ostringstream oss;\r\n//            oss << \"Ran out of input, expecting \" << len << \" bytes got \" << read << \" at \" << fin.tellg();\r\n//            throw std::runtime_error(oss.str());\r\n//        }\r\n//\r\n//        int output_samples;\r\n//        const bool lost = (len==0);\r\n//        if(lost)\r\n//        {\r\n//            opus_decoder_ctl(_decoder.get(), OPUS_GET_LAST_PACKET_DURATION(&output_samples));\r\n//        }\r\n//        else\r\n//        {\r\n//            output_samples = _max_frame_size;\r\n//        }\r\n//\r\n//        output_samples = opus_decode(\r\n//                _decoder.get(), \r\n//                lost ? NULL : _state.data.data(),\r\n//                len,\r\n//                _state.out.data(),\r\n//                output_samples,\r\n//                0);\r\n//\r\n//        if(output_samples>0)\r\n//        {\r\n//            for(int i=0; i<(output_samples)*_channels; i++)\r\n//            {\r\n//                short s;\r\n//                s=_state.out[i];\r\n//                _state.fbytes[2*i]   = s&0xFF;\r\n//                _state.fbytes[2*i+1] = (s>>8)&0xFF;\r\n//            }\r\n//            if(!fout.write(reinterpret_cast<char*>(_state.fbytes.data()), sizeof(short)* _channels * output_samples))\r\n//                throw std::runtime_error(\"Error writing\");\r\n//        }\r\n//        else\r\n//        {\r\n//            throw OpusErrorException(output_samples); // negative return is error code\r\n//        }\r\n//\r\n//        uint32_t dec_final_range;\r\n//        opus_decoder_ctl(_decoder.get(), OPUS_GET_FINAL_RANGE(&dec_final_range));\r\n//\r\n//        /* compare final range encoder rng values of encoder and decoder */\r\n//        if(enc_final_range!=0\r\n//                && !lost && !_state.lost_prev\r\n//                && dec_final_range != enc_final_range)\r\n//        {\r\n//            std::ostringstream oss;\r\n//            oss << \"Error: Range coder state mismatch between encoder and decoder in frame \" << _state.frameno << \": \" <<\r\n//                    \"0x\" << std::setw(8) << std::setfill('0') << std::hex << (unsigned long)enc_final_range <<\r\n//                    \"0x\" << std::setw(8) << std::setfill('0') << std::hex << (unsigned long)dec_final_range;\r\n//\r\n//            throw std::runtime_error(oss.str());\r\n//        }\r\n//\r\n//        _state.lost_prev = lost;\r\n//        _state.frameno++;\r\n//\r\n//        return true;\r\n//    }\r\n//private:\r\n//    const int _channels;\r\n//    const int _max_frame_size = 5760;// 960*6;\r\n//    std::unique_ptr<OpusDecoder, void(*)(OpusDecoder*)> _decoder;\r\n//\r\n//    struct State\r\n//    {\r\n//        State(int max_frame_size, int max_payload_bytes, int channels) :\r\n//            out   (max_frame_size*channels),\r\n//            fbytes(max_frame_size*channels*sizeof(decltype(out)::value_type)),\r\n//            data  (max_payload_bytes)\r\n//        { }\r\n//\r\n//        std::vector<short>         out;\r\n//        std::vector<unsigned char> fbytes, data;\r\n//        int32_t frameno   = 0;\r\n//        bool    lost_prev = true;\r\n//    };\r\n//    State _state;\r\n//};\r\n//\r\n//COpusCodec::COpusCodec(int32_t sampling_rate, int channels)\r\n//    : _pimpl(std::unique_ptr<Impl>(new Impl(sampling_rate, channels)))\r\n//{\r\n//    //\r\n//}\r\n//\r\n//COpusCodec::~COpusCodec()\r\n//{\r\n//    // this instantiates the pimpl deletor code on the, now-complete, pimpl class\r\n//}\r\n//\r\n//bool COpusCodec::decode_frame(\r\n//        std::ifstream& fin,\r\n//        std::ofstream& fout)\r\n//{\r\n//    return _pimpl->decode_frame(fin, fout);\r\n//}"
  },
  {
    "path": "TelegramClient.Opus/COpusCodec.h",
    "content": "//#include <stdexcept>\r\n//#include <memory>\r\n//\r\n//struct OpusErrorException : public virtual std::exception\r\n//{\r\n//\tOpusErrorException(int code) : code(code) {}\r\n//\tconst char* what();\r\n//private:\r\n//\tconst int code;\r\n//};\r\n//\r\n//struct COpusCodec\r\n//{\r\n//\tCOpusCodec(int32_t sampling_rate, int channels);\r\n//\t~COpusCodec();\r\n//\r\n//\tbool decode_frame(std::ifstream& fin, std::ofstream& fout);\r\n//\tprivate:\r\n//\tstruct Impl;\r\n//\tstd::unique_ptr<Impl> _pimpl;\r\n//};"
  },
  {
    "path": "TelegramClient.Opus/TelegramClient.Opus.cpp",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"opus_defines.h\"\r\n#include \"opus_types.h\"\r\n\r\n\r\n#include <ogg/ogg.h>\r\n#include <stdio.h>\r\n#include <opus.h>\r\n#include <stdlib.h>\r\n#include <string.h>\r\n#include <time.h>\r\n#include \"opusfile.h\"\r\n#include \"stdint.h\"\r\n#include \"stdio.h\"\r\n\r\n#include \"windows.h\"\r\n\r\n\r\n#include \"pch.h\"\r\n#include \"audio.c\"\r\n#include \"TelegramClient.Opus.h\"\r\n#include <string>\r\n\r\nusing namespace TelegramClient_Opus;\r\nusing namespace Platform;\r\n//using namespace Windows::Storage;\r\n\r\n//---------------\r\n\r\n\r\ntypedef struct {\r\n    int version;\r\n    int channels; /* Number of channels: 1..255 */\r\n    int preskip;\r\n    ogg_uint32_t input_sample_rate;\r\n    int gain; /* in dB S7.8 should be zero whenever possible */\r\n    int channel_mapping;\r\n    /* The rest is only used if channel_mapping != 0 */\r\n    int nb_streams;\r\n    int nb_coupled;\r\n    unsigned char stream_map[255];\r\n} OpusHeader;\r\n\r\ntypedef struct {\r\n    unsigned char *data;\r\n    int maxlen;\r\n    int pos;\r\n} Packet;\r\n\r\ntypedef struct {\r\n    const unsigned char *data;\r\n    int maxlen;\r\n    int pos;\r\n} ROPacket;\r\n\r\ntypedef struct {\r\n    void *readdata;\r\n    opus_int64 total_samples_per_channel;\r\n    int rawmode;\r\n    int channels;\r\n    long rate;\r\n    int gain;\r\n    int samplesize;\r\n    int endianness;\r\n    char *infilename;\r\n    int ignorelength;\r\n    int skip;\r\n    int extraout;\r\n    char *comments;\r\n    int comments_length;\r\n    int copy_comments;\r\n} oe_enc_opt;\r\n\r\nstatic int write_uint32(Packet *p, ogg_uint32_t val) {\r\n    if (p->pos > p->maxlen - 4) {\r\n        return 0;\r\n    }\r\n    p->data[p->pos  ] = (val    ) & 0xFF;\r\n    p->data[p->pos+1] = (val>> 8) & 0xFF;\r\n    p->data[p->pos+2] = (val>>16) & 0xFF;\r\n    p->data[p->pos+3] = (val>>24) & 0xFF;\r\n    p->pos += 4;\r\n    return 1;\r\n}\r\n\r\nstatic int write_uint16(Packet *p, ogg_uint16_t val) {\r\n    if (p->pos > p->maxlen-2) {\r\n        return 0;\r\n    }\r\n    p->data[p->pos  ] = (val    ) & 0xFF;\r\n    p->data[p->pos+1] = (val>> 8) & 0xFF;\r\n    p->pos += 2;\r\n    return 1;\r\n}\r\n\r\nstatic int write_chars(Packet *p, const unsigned char *str, int nb_chars)\r\n{\r\n    int i;\r\n    if (p->pos>p->maxlen-nb_chars)\r\n        return 0;\r\n    for (i=0;i<nb_chars;i++)\r\n        p->data[p->pos++] = str[i];\r\n    return 1;\r\n}\r\n\r\nstatic int read_uint32(ROPacket *p, ogg_uint32_t *val)\r\n{\r\n    if (p->pos>p->maxlen-4)\r\n        return 0;\r\n    *val =  (ogg_uint32_t)p->data[p->pos  ];\r\n    *val |= (ogg_uint32_t)p->data[p->pos+1]<< 8;\r\n    *val |= (ogg_uint32_t)p->data[p->pos+2]<<16;\r\n    *val |= (ogg_uint32_t)p->data[p->pos+3]<<24;\r\n    p->pos += 4;\r\n    return 1;\r\n}\r\n\r\nstatic int read_uint16(ROPacket *p, ogg_uint16_t *val)\r\n{\r\n    if (p->pos>p->maxlen-2)\r\n        return 0;\r\n    *val =  (ogg_uint16_t)p->data[p->pos  ];\r\n    *val |= (ogg_uint16_t)p->data[p->pos+1]<<8;\r\n    p->pos += 2;\r\n    return 1;\r\n}\r\n\r\nstatic int read_chars(ROPacket *p, unsigned char *str, int nb_chars)\r\n{\r\n    int i;\r\n    if (p->pos>p->maxlen-nb_chars)\r\n        return 0;\r\n    for (i=0;i<nb_chars;i++)\r\n        str[i] = p->data[p->pos++];\r\n    return 1;\r\n}\r\n\r\nint opus_header_to_packet(const OpusHeader *h, unsigned char *packet, int len) {\r\n    int i;\r\n    Packet p;\r\n    unsigned char ch;\r\n    \r\n    p.data = packet;\r\n    p.maxlen = len;\r\n    p.pos = 0;\r\n    if (len < 19) {\r\n        return 0;\r\n    }\r\n    if (!write_chars(&p, (const unsigned char *)\"OpusHead\", 8)) {\r\n        return 0;\r\n    }\r\n\r\n    ch = 1;\r\n    if (!write_chars(&p, &ch, 1)) {\r\n        return 0;\r\n    }\r\n    \r\n    ch = h->channels;\r\n    if (!write_chars(&p, &ch, 1)) {\r\n        return 0;\r\n    }\r\n    \r\n    if (!write_uint16(&p, h->preskip)) {\r\n        return 0;\r\n    }\r\n    \r\n    if (!write_uint32(&p, h->input_sample_rate)) {\r\n        return 0;\r\n    }\r\n    \r\n    if (!write_uint16(&p, h->gain)) {\r\n        return 0;\r\n    }\r\n    \r\n    ch = h->channel_mapping;\r\n    if (!write_chars(&p, &ch, 1)) {\r\n        return 0;\r\n    }\r\n    \r\n    if (h->channel_mapping != 0) {\r\n        ch = h->nb_streams;\r\n        if (!write_chars(&p, &ch, 1)) {\r\n            return 0;\r\n        }\r\n        \r\n        ch = h->nb_coupled;\r\n        if (!write_chars(&p, &ch, 1)) {\r\n            return 0;\r\n        }\r\n        \r\n        /* Multi-stream support */\r\n        for (i = 0; i < h->channels; i++) {\r\n            if (!write_chars(&p, &h->stream_map[i], 1)) {\r\n                return 0;\r\n            }\r\n        }\r\n    }\r\n    \r\n    return p.pos;\r\n}\r\n\r\n#define writeint(buf, base, val) do { buf[base + 3] = ((val) >> 24) & 0xff; \\\r\nbuf[base + 2]=((val) >> 16) & 0xff; \\\r\nbuf[base + 1]=((val) >> 8) & 0xff; \\\r\nbuf[base] = (val) & 0xff; \\\r\n} while(0)\r\n\r\nstatic void comment_init(char **comments, int *length, const char *vendor_string) {\r\n    // The 'vendor' field should be the actual encoding library used\r\n    int vendor_length = strlen(vendor_string);\r\n    int user_comment_list_length = 0;\r\n    int len = 8 + 4 + vendor_length + 4;\r\n    char *p = (char *)malloc(len);\r\n    memcpy(p, \"OpusTags\", 8);\r\n    writeint(p, 8, vendor_length);\r\n    memcpy(p + 12, vendor_string, vendor_length);\r\n    writeint(p, 12 + vendor_length, user_comment_list_length);\r\n    *length = len;\r\n    *comments = p;\r\n}\r\n\r\nstatic void comment_pad(char **comments, int* length, int amount) {\r\n\tchar* p;\r\n\tint newlen;\r\n\tint i;\r\n    if (amount > 0) {\r\n        p = *comments;\r\n        // Make sure there is at least amount worth of padding free, and round up to the maximum that fits in the current ogg segments\r\n        newlen = (*length + amount + 255) / 255 * 255 - 1;\r\n        p = (char*)realloc(p, newlen);\r\n        for (i = *length; i < newlen; i++) {\r\n            p[i] = 0;\r\n        }\r\n        *comments = p;\r\n        *length = newlen;\r\n    }\r\n}\r\n\r\nstatic int writeOggPage(ogg_page *page, FILE *os) {\r\n    int written = fwrite(page->header, sizeof(unsigned char), page->header_len, os);\r\n    written += fwrite(page->body, sizeof(unsigned char), page->body_len, os);\r\n    return written;\r\n}\r\n\r\nconst opus_int32 bitrate = 16000;\r\nconst opus_int32 rate = 16000;\r\nconst opus_int32 frame_size = 960;\r\nconst int with_cvbr = 1;\r\nconst int max_ogg_delay = 0;\r\nconst int comment_padding = 512;\r\n\r\nopus_int32 coding_rate = 16000;\r\nogg_int32_t _packetId;\r\nOpusEncoder *_encoder = 0;\r\nuint8_t *_packet = 0;\r\nogg_stream_state os;\r\nFILE *_fileOs = 0;\r\noe_enc_opt inopt;\r\nOpusHeader header;\r\nopus_int32 min_bytes;\r\nint max_frame_bytes;\r\nogg_packet op;\r\nogg_page og;\r\nopus_int64 bytes_written;\r\nopus_int64 pages_out;\r\nopus_int64 total_samples;\r\nogg_int64_t enc_granulepos;\r\nogg_int64_t last_granulepos;\r\nint size_segments;\r\nint last_segments;\r\n\r\nvoid cleanupRecorder() {\r\n    \r\n    ogg_stream_flush(&os, &og);\r\n    \r\n    if (_encoder) {\r\n        opus_encoder_destroy(_encoder);\r\n        _encoder = 0;\r\n    }\r\n    \r\n    ogg_stream_clear(&os);\r\n    \r\n    if (_packet) {\r\n        free(_packet);\r\n        _packet = 0;\r\n    }\r\n    \r\n    if (_fileOs) {\r\n        fclose(_fileOs);\r\n        _fileOs = 0;\r\n    }\r\n    \r\n    _packetId = -1;\r\n    bytes_written = 0;\r\n    pages_out = 0;\r\n    total_samples = 0;\r\n    enc_granulepos = 0;\r\n    size_segments = 0;\r\n    last_segments = 0;\r\n    last_granulepos = 0;\r\n    memset(&os, 0, sizeof(ogg_stream_state));\r\n    memset(&inopt, 0, sizeof(oe_enc_opt));\r\n    memset(&header, 0, sizeof(OpusHeader));\r\n    memset(&op, 0, sizeof(ogg_packet));\r\n    memset(&og, 0, sizeof(ogg_page));\r\n}\r\n\r\nint initRecorder(const char *path) {\r\n    cleanupRecorder();\r\n    \r\n    if (!path) {\r\n        return 0;\r\n    }\r\n    \r\n    _fileOs = fopen(path, \"wb\");\r\n    if (!_fileOs) {\r\n        return 0;\r\n    }\r\n    \r\n    inopt.rate = rate;\r\n    inopt.gain = 0;\r\n    inopt.endianness = 0;\r\n    inopt.copy_comments = 0;\r\n    inopt.rawmode = 1;\r\n    inopt.ignorelength = 1;\r\n    inopt.samplesize = 16;\r\n    inopt.channels = 1;\r\n    inopt.skip = 0;\r\n    \r\n    comment_init(&inopt.comments, &inopt.comments_length, opus_get_version_string());\r\n    \r\n    if (rate > 24000) {\r\n        coding_rate = 48000;\r\n    } else if (rate > 16000) {\r\n        coding_rate = 24000;\r\n    } else if (rate > 12000) {\r\n        coding_rate = 16000;\r\n    } else if (rate > 8000) {\r\n        coding_rate = 12000;\r\n    } else {\r\n        coding_rate = 8000;\r\n    }\r\n    \r\n    if (rate != coding_rate) {\r\n        //LOGE(\"Invalid rate\");\r\n        return 0;\r\n    }\r\n    \r\n    header.channels = 1;\r\n    header.channel_mapping = 0;\r\n    header.input_sample_rate = rate;\r\n    header.gain = inopt.gain;\r\n    header.nb_streams = 1;\r\n    \r\n    int result = OPUS_OK;\r\n    _encoder = opus_encoder_create(coding_rate, 1, OPUS_APPLICATION_AUDIO, &result);\r\n    if (result != OPUS_OK) {\r\n        //LOGE(\"Error cannot create encoder: %s\", opus_strerror(result));\r\n        return 0;\r\n    }\r\n    \r\n    min_bytes = max_frame_bytes = (1275 * 3 + 7) * header.nb_streams;\r\n\t_packet = (uint8_t*)malloc(max_frame_bytes);\r\n    \r\n    result = opus_encoder_ctl(_encoder, OPUS_SET_BITRATE(bitrate));\r\n    if (result != OPUS_OK) {\r\n        //LOGE(\"Error OPUS_SET_BITRATE returned: %s\", opus_strerror(result));\r\n        return 0;\r\n    }\r\n    \r\n#ifdef OPUS_SET_LSB_DEPTH\r\n    result = opus_encoder_ctl(_encoder, OPUS_SET_LSB_DEPTH(max(8, min(24, inopt.samplesize))));\r\n    if (result != OPUS_OK) {\r\n        //LOGE(\"Warning OPUS_SET_LSB_DEPTH returned: %s\", opus_strerror(result));\r\n    }\r\n#endif\r\n    \r\n    opus_int32 lookahead;\r\n    result = opus_encoder_ctl(_encoder, OPUS_GET_LOOKAHEAD(&lookahead));\r\n    if (result != OPUS_OK) {\r\n        //LOGE(\"Error OPUS_GET_LOOKAHEAD returned: %s\", opus_strerror(result));\r\n        return 0;\r\n    }\r\n    \r\n    inopt.skip += lookahead;\r\n    header.preskip = (int)(inopt.skip * (48000.0 / coding_rate));\r\n    inopt.extraout = (int)(header.preskip * (rate / 48000.0));\r\n    \r\n    if (ogg_stream_init(&os, rand()) == -1) {\r\n        //LOGE(\"Error: stream init failed\");\r\n        return 0;\r\n    }\r\n    \r\n    unsigned char header_data[100];\r\n    int packet_size = opus_header_to_packet(&header, header_data, 100);\r\n    op.packet = header_data;\r\n    op.bytes = packet_size;\r\n    op.b_o_s = 1;\r\n    op.e_o_s = 0;\r\n    op.granulepos = 0;\r\n    op.packetno = 0;\r\n    ogg_stream_packetin(&os, &op);\r\n    \r\n    while ((result = ogg_stream_flush(&os, &og))) {\r\n        if (!result) {\r\n            break;\r\n        }\r\n        \r\n        int pageBytesWritten = writeOggPage(&og, _fileOs);\r\n        if (pageBytesWritten != og.header_len + og.body_len) {\r\n            //LOGE(\"Error: failed writing header to output stream\");\r\n            return 0;\r\n        }\r\n        bytes_written += pageBytesWritten;\r\n        pages_out++;\r\n    }\r\n    \r\n    comment_pad(&inopt.comments, &inopt.comments_length, comment_padding);\r\n    op.packet = (unsigned char *)inopt.comments;\r\n    op.bytes = inopt.comments_length;\r\n    op.b_o_s = 0;\r\n    op.e_o_s = 0;\r\n    op.granulepos = 0;\r\n    op.packetno = 1;\r\n    ogg_stream_packetin(&os, &op);\r\n    \r\n    while ((result = ogg_stream_flush(&os, &og))) {\r\n        if (result == 0) {\r\n            break;\r\n        }\r\n        \r\n        int writtenPageBytes = writeOggPage(&og, _fileOs);\r\n        if (writtenPageBytes != og.header_len + og.body_len) {\r\n            //LOGE(\"Error: failed writing header to output stream\");\r\n            return 0;\r\n        }\r\n        \r\n        bytes_written += writtenPageBytes;\r\n        pages_out++;\r\n    }\r\n    \r\n    free(inopt.comments);\r\n    \r\n    return 1;\r\n}\r\n\r\nint writeFrame(uint8_t *framePcmBytes, unsigned int frameByteCount) {\r\n    int cur_frame_size = frame_size;\r\n    _packetId++;\r\n    \r\n    opus_int32 nb_samples = frameByteCount / 2;\r\n    total_samples += nb_samples;\r\n    if (nb_samples < frame_size) {\r\n        op.e_o_s = 1;\r\n    } else {\r\n        op.e_o_s = 0;\r\n    }\r\n    \r\n    int nbBytes = 0;\r\n    \r\n    if (nb_samples != 0) {\r\n        uint8_t *paddedFrameBytes = framePcmBytes;\r\n        int freePaddedFrameBytes = 0;\r\n        \r\n        if (nb_samples < cur_frame_size) {\r\n            paddedFrameBytes = (uint8_t*)malloc(cur_frame_size * 2);\r\n            freePaddedFrameBytes = 1;\r\n            memcpy(paddedFrameBytes, framePcmBytes, frameByteCount);\r\n            memset(paddedFrameBytes + nb_samples * 2, 0, cur_frame_size * 2 - nb_samples * 2);\r\n        }\r\n        \r\n        nbBytes = opus_encode(_encoder, (opus_int16 *)paddedFrameBytes, cur_frame_size, _packet, max_frame_bytes / 10);\r\n        if (freePaddedFrameBytes) {\r\n            free(paddedFrameBytes);\r\n            paddedFrameBytes = NULL;\r\n        }\r\n        \r\n        if (nbBytes < 0) {\r\n            //LOGE(\"Encoding failed: %s. Aborting.\", opus_strerror(nbBytes));\r\n            return 0;\r\n        }\r\n        \r\n        enc_granulepos += cur_frame_size * 48000 / coding_rate;\r\n        size_segments = (nbBytes + 255) / 255;\r\n        min_bytes = min(nbBytes, min_bytes);\r\n    }\r\n    \r\n    while ((((size_segments <= 255) && (last_segments + size_segments > 255)) || (enc_granulepos - last_granulepos > max_ogg_delay)) && ogg_stream_flush_fill(&os, &og, 255 * 255)) {\r\n        if (ogg_page_packets(&og) != 0) {\r\n            last_granulepos = ogg_page_granulepos(&og);\r\n        }\r\n        \r\n        last_segments -= og.header[26];\r\n        int writtenPageBytes = writeOggPage(&og, _fileOs);\r\n        if (writtenPageBytes != og.header_len + og.body_len) {\r\n            //LOGE(\"Error: failed writing data to output stream\");\r\n            return 0;\r\n        }\r\n        bytes_written += writtenPageBytes;\r\n        pages_out++;\r\n    }\r\n    \r\n    op.packet = (unsigned char *)_packet;\r\n    op.bytes = nbBytes;\r\n    op.b_o_s = 0;\r\n    op.granulepos = enc_granulepos;\r\n    if (op.e_o_s) {\r\n        op.granulepos = ((total_samples * 48000 + rate - 1) / rate) + header.preskip;\r\n    }\r\n    op.packetno = 2 + _packetId;\r\n    ogg_stream_packetin(&os, &op);\r\n    last_segments += size_segments;\r\n    \r\n    while ((op.e_o_s || (enc_granulepos + (frame_size * 48000 / coding_rate) - last_granulepos > max_ogg_delay) || (last_segments >= 255)) ? ogg_stream_flush_fill(&os, &og, 255 * 255) : ogg_stream_pageout_fill(&os, &og, 255 * 255)) {\r\n        if (ogg_page_packets(&og) != 0) {\r\n            last_granulepos = ogg_page_granulepos(&og);\r\n        }\r\n        last_segments -= og.header[26];\r\n        int writtenPageBytes = writeOggPage(&og, _fileOs);\r\n        if (writtenPageBytes != og.header_len + og.body_len) {\r\n            //LOGE(\"Error: failed writing data to output stream\");\r\n            return 0;\r\n        }\r\n        bytes_written += writtenPageBytes;\r\n        pages_out++;\r\n    }\r\n    \r\n    return 1;\r\n}\r\n\r\n//player\r\nOggOpusFile *_opusFile;\r\nint _isSeekable = 0;\r\nlong _totalPcmDuration = 0;\r\nlong _currentPcmOffset = 0;\r\nint _finished = 0;\r\nstatic const int playerBuffersCount = 3;\r\nstatic const int playerSampleRate = 48000;\r\n\r\nvoid cleanupPlayer() {\r\n    if (_opusFile) {\r\n        op_free(_opusFile);\r\n        _opusFile = 0;\r\n    }\r\n    _isSeekable = 0;\r\n    _totalPcmDuration = 0;\r\n    _currentPcmOffset = 0;\r\n    _finished = 0;\r\n}\r\n\r\nint seekPlayer(float position) {\r\n    int result;\r\n\togg_int64_t pcmPosition;\r\n\r\n\tif (!_opusFile || !_isSeekable || position < 0) {\r\n        return 0;\r\n    }\r\n    result = op_pcm_seek(_opusFile, (ogg_int64_t)(position * _totalPcmDuration));\r\n    if (result != OPUS_OK) {\r\n        //LOGE(\"op_pcm_seek failed: %d\", result);\r\n    }\r\n    pcmPosition = op_pcm_tell(_opusFile);\r\n    _currentPcmOffset = pcmPosition;\r\n    return result == OPUS_OK;\r\n}\r\n\r\nint initPlayer(const char *path) {\r\n    int openError = OPUS_OK;\r\n    cleanupPlayer();\r\n    \r\n    _opusFile = op_open_file(path, &openError);\r\n    if (!_opusFile || openError != OPUS_OK) {\r\n        //LOGE(\"op_open_file failed: %d\", openError);\r\n        cleanupPlayer();\r\n        return 0;\r\n    }\r\n    \r\n    _isSeekable = op_seekable(_opusFile);\r\n    _totalPcmDuration = op_pcm_total(_opusFile, -1);\r\n        \r\n    return 1;\r\n}\r\n\r\nvoid fillBuffer(uint8_t *buffer, int capacity, int *args) {\r\n    if (_opusFile) {\r\n\t\targs[1] = max((ogg_int64_t)0, op_pcm_tell(_opusFile));\r\n        \r\n        if (_finished) {\r\n            args[0] = 0;\r\n            args[1] = 0;\r\n            args[2] = 1;\r\n            return;\r\n        } else {\r\n            int writtenOutputBytes = 0;\r\n            int endOfFileReached = 0;\r\n            \r\n            while (writtenOutputBytes < capacity) {\r\n                int readSamples = op_read(_opusFile, (opus_int16 *)(buffer + writtenOutputBytes), (capacity - writtenOutputBytes) / 2, NULL);\r\n                \r\n                if (readSamples > 0) {\r\n                    writtenOutputBytes += readSamples * 2;\r\n                } else {\r\n                    if (readSamples < 0) {\r\n                        //LOGE(\"op_read failed: %d\", readSamples);\r\n                    }\r\n                    endOfFileReached = 1;\r\n                    break;\r\n                }\r\n            }\r\n            \r\n            args[0] = writtenOutputBytes;\r\n            \r\n            if (endOfFileReached || args[1] + args[0] == _totalPcmDuration) {\r\n                _finished = 1;\r\n                args[2] = 1;\r\n            } else {\r\n                args[2] = 0;\r\n            }\r\n        }\r\n    } else {\r\n        memset(buffer, 0, capacity);\r\n        args[0] = capacity;\r\n        args[1] = _totalPcmDuration;\r\n    }\r\n}\r\n\r\n//--------------------------------------------\r\n\r\nint startRecord(char* pathStr) {  \r\n    int result = initRecorder(pathStr);\r\n    \r\n    return result;\r\n}\r\n\r\nvoid stopRecord() {\r\n    cleanupRecorder();\r\n}\r\n\r\nlong getTotalPcmDuration() {\r\n    return _totalPcmDuration;\r\n}\r\n\r\nvoid readOpusFile(uint8_t* bufferBytes, int capacity, int* args) {\r\n    fillBuffer(bufferBytes, capacity, args);\r\n}\r\n\r\nint seekOpusFile(float position) {\r\n    return seekPlayer(position);\r\n}\r\n\r\nint openOpusFile(char* pathStr) {\r\n    \r\n    int result = initPlayer(pathStr);\r\n    \r\n    return result;\r\n}\r\n\r\nvoid closeOpusFile() {\r\n    cleanupPlayer();\r\n}\r\n\r\nint isOpusFile(char* pathStr) {    \r\n    int result = 0;\r\n    \r\n    int error = OPUS_OK;\r\n    OggOpusFile *file = op_test_file(pathStr, &error);\r\n    if (file != NULL) {\r\n        int error = op_test_open(file);\r\n        op_free(file);\r\n        \r\n        result = error == OPUS_OK;\r\n    }\r\n    \r\n    return result;\r\n}\r\n//---------------\r\n\r\nWindowsPhoneRuntimeComponent::WindowsPhoneRuntimeComponent()\r\n{\r\n\r\n}\r\n\r\nconst char* StringToCharArray(Platform::String^ str){\r\n\tstd::wstring fooW(str->Begin());\r\n\tstd::string fooA(fooW.begin(), fooW.end());\r\n\treturn fooA.c_str();\r\n}\r\n\r\nint WindowsPhoneRuntimeComponent::Sum(int a, int b)\r\n{\r\n\tauto local = Windows::Storage::ApplicationData::Current->LocalFolder;\r\n\tauto localFileNamePlatformString = local->Path + \"\\\\game.sav\";\r\n\treturn a + b;\r\n}\r\n\r\nint64 WindowsPhoneRuntimeComponent::GetTotalPcmDuration(){\r\n\treturn getTotalPcmDuration();\r\n}\r\n\r\nint WindowsPhoneRuntimeComponent::InitPlayer(Platform::String^ path){\r\n\tstd::wstring fooW(path->Begin());\r\n\tstd::string fooA(fooW.begin(), fooW.end());\r\n\tconst char* pathStr = fooA.c_str();\r\n\tint result = initPlayer(pathStr);\r\n\t//delete[] pathStr;\r\n\r\n\treturn result;\r\n}\r\n\t\t\r\nvoid WindowsPhoneRuntimeComponent::CleanupPlayer(){\r\n\tcleanupPlayer();\r\n}\r\n\r\nvoid WindowsPhoneRuntimeComponent::FillBuffer(Platform::WriteOnlyArray<uint8>^ buffer, int capacity, Platform::WriteOnlyArray<int>^ args){\r\n\tuint8_t* buf = new uint8_t[capacity]; \r\n\tint* bufArgs = new int[3];\r\n\r\n\tfillBuffer(buf, capacity, bufArgs);\r\n\r\n\tfor (int i = 0; i < capacity; i++){\r\n\t\tbuffer->set(i, buf[i]);\r\n\t}\r\n\r\n\targs->set(0, bufArgs[0]);\r\n\targs->set(1, bufArgs[1]);\r\n\targs->set(2, bufArgs[2]);\r\n\r\n\tdelete[] buf;\r\n\tdelete[] bufArgs;\r\n}\r\n\r\nbool WindowsPhoneRuntimeComponent::IsOpusFile(Platform::String^ path) {\r\n    Platform::String^ fooRT = path;\r\n\tstd::wstring fooW(fooRT->Begin());\r\n\tstd::string fooA(fooW.begin(), fooW.end());\r\n\tconst char* charStr = fooA.c_str();\r\n\t\r\n\t//const char *pathStr = (*env)->GetStringUTFChars(env, path, 0);\r\n    \r\n    int error = OPUS_OK;\r\n\tbool result = false;\r\n    OggOpusFile *file = op_test_file(charStr, &error);\r\n    if (file != NULL) {\r\n        int error = op_test_open(file);\r\n        op_free(file);\r\n        \r\n        result = error == OPUS_OK;\r\n    }\r\n\r\n    \r\n    /*if (pathStr != 0) {\r\n        (*env)->ReleaseStringUTFChars(env, path, pathStr);\r\n    }*/\r\n    \r\n    return result;\r\n}\r\n\r\nint WindowsPhoneRuntimeComponent::StartRecord(Platform::String^ path) {\r\n\tPlatform::String^ fooRT = path;\r\n\tstd::wstring fooW(fooRT->Begin());\r\n\tstd::string fooA(fooW.begin(), fooW.end());\r\n\tconst char* charStr = fooA.c_str();\r\n\r\n    int result = initRecorder(charStr);\r\n    \r\n    /*if (pathStr != 0) {\r\n        (*env)->ReleaseStringUTFChars(env, path, pathStr);\r\n    }*/\r\n    \r\n    return result;\r\n}\r\n\t\t\r\nint WindowsPhoneRuntimeComponent::WriteFrame(const Platform::Array<uint8>^ buffer, int length) {\r\n\treturn writeFrame(buffer->begin(), length);\r\n}\r\n\t\t\r\nvoid WindowsPhoneRuntimeComponent::StopRecord() {\r\n\tcleanupRecorder();\r\n}\r\n\r\nstatic inline void set_bits(uint8_t *bytes, int32_t bitOffset, int32_t numBits, int32_t value) {\r\n\tnumBits = (unsigned int)(2 << (numBits - 1)) - 1;\r\n\tbytes += bitOffset / 8;\r\n\tbitOffset %= 8;\r\n\t*((int32_t *)bytes) |= (value << bitOffset);\r\n}\r\n\r\nPlatform::Array<uint8>^ WindowsPhoneRuntimeComponent::GetWaveform(Platform::String^ path) {\r\n\tPlatform::String^ fooRT = path;\r\n\tstd::wstring fooW(fooRT->Begin());\r\n\tstd::string fooA(fooW.begin(), fooW.end());\r\n\tconst char* pathStr = fooA.c_str();\r\n\r\n\tPlatform::Array<uint8_t>^ result = ref new Platform::Array<uint8_t>(0);// ref new Platform::Array<unsigned char>(retData, retDataLength);\r\n\t//jbyteArray result = 0;\r\n\r\n\tint error = OPUS_OK;\r\n\tOggOpusFile *opusFile = op_open_file(pathStr, &error);\r\n\tif (opusFile != NULL && error == OPUS_OK) {\r\n\t\tint64_t totalSamples = op_pcm_total(opusFile, -1);\r\n\t\tint32_t resultSamples = 100;\r\n\t\tint32_t sampleRate = (int32_t)max(1, totalSamples / resultSamples);\r\n\r\n\t\tuint16_t *samples = new uint16_t[100];\r\n\r\n\t\tint bufferSize = 1024 * 128;\r\n\t\tint16_t *sampleBuffer = new int16_t[bufferSize];\r\n\t\tuint64_t sampleIndex = 0;\r\n\t\tuint16_t peakSample = 0;\r\n\r\n\t\tint index = 0;\r\n\r\n\t\twhile (1) {\r\n\t\t\tint readSamples = op_read(opusFile, sampleBuffer, bufferSize / 2, NULL);\r\n\t\t\tfor (int i = 0; i < readSamples; i++) {\r\n\t\t\t\tuint16_t sample = (uint16_t) abs(sampleBuffer[i]);\r\n\t\t\t\tif (sample > peakSample) {\r\n\t\t\t\t\tpeakSample = sample;\r\n\t\t\t\t}\r\n\t\t\t\tif (sampleIndex++ % sampleRate == 0) {\r\n\t\t\t\t\tif (index < resultSamples) {\r\n\t\t\t\t\t\tsamples[index++] = peakSample;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpeakSample = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (readSamples == 0) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*uint16_t peak = 0;\r\n\t\tfor (int i = 0; i < resultSamples; i++) {\r\n\t\t\tif (peak < samples[i]){\r\n\t\t\t\tpeak = samples[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdelete[] sampleBuffer;\r\n\t\top_free(opusFile);\r\n\r\n\t\tuint32_t bitstreamLength = (resultSamples * 5) / 8 + (((resultSamples * 5) % 8) == 0 ? 0 : 1);\r\n\r\n\t\tresult = ref new Platform::Array<unsigned char>(resultSamples);\r\n\r\n\t\tuint8_t* bytes = new uint8_t[bitstreamLength];\r\n\r\n\t\tfor (int i = 0; i < resultSamples; i++) {\r\n\t\t\tint32_t value = min(31, abs((int32_t)samples[i]) * 31 / peak);\r\n\r\n\t\t\tresult[i] = value & 31;\r\n\t\t\tset_bits(bytes, i * 5, 5, value & 31);\r\n\t\t}\r\n\r\n\t\tdelete[] bytes;\r\n\t\tdelete[] samples;*/\r\n\r\n\t\tint64_t sumSamples = 0;\r\n\t\tfor (int i = 0; i < resultSamples; i++) {\r\n\t\t\tsumSamples += samples[i];\r\n\t\t}\r\n\t\tuint16_t peak = (uint16_t) (sumSamples * 1.8f / resultSamples);\r\n\t\tif (peak < 7500) {\r\n\t\t\tpeak = 7500;\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < resultSamples; i++) {\r\n\t\t\tuint16_t sample = samples[i];//(uint16_t) ((int64_t) samples[i]);\r\n\t\t\tif (sample > peak) {\r\n\t\t\t\tsamples[i] = peak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdelete[] sampleBuffer;\r\n\t\top_free(opusFile);\r\n\r\n\t\tuint32_t bitstreamLength = (resultSamples * 5) / 8 + (((resultSamples * 5) % 8) == 0 ? 0 : 1);\r\n\r\n\t\tresult = ref new Platform::Array<unsigned char>(resultSamples);\r\n\t\t//result = ref new Platform::Array<unsigned char>(bitstreamLength);\r\n\t\t\r\n\t\tuint8_t* bytes = new uint8_t[bitstreamLength];\r\n\r\n\t\tfor (int i = 0; i < resultSamples; i++) {\r\n\t\t\tint32_t value = min(31, abs((int32_t)samples[i]) * 31 / peak);\r\n\t\t\t\r\n\t\t\tresult[i] = value & 31;\r\n\t\t\tset_bits(bytes, i * 5, 5, value & 31);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/*for (int i = 0; i < bitstreamLength; i++) {\r\n\t\t\tresult[i] = bytes[i];\r\n\t\t}*/\r\n\r\n\r\n\t\tdelete[] bytes;\r\n\t\tdelete[] samples;\r\n\t}\r\n\r\n\treturn result;\r\n}\r\n\r\n\r\n\r\n\r\n//void WindowsPhoneRuntimeComponent::WriteFile( String^ strFile, String^ strContent )\r\n//{\r\n//    auto folder = ApplicationData::Current->LocalFolder;\r\n    //task<StorageFile^> getFileTask(folder->CreateFileAsync( strFile, CreationCollisionOption::ReplaceExisting));\r\n\r\n    //// Create a local to allow the DataReader to be passed between lambdas.\r\n    //auto writer = std::make_shared<Streams::DataWriter^>(nullptr);\r\n\r\n    //getFileTask.then([](StorageFile^ file)\r\n    //{\r\n    //    return file->OpenAsync(FileAccessMode::ReadWrite);\r\n    //}).then([this, writer, strContent](Streams::IRandomAccessStream^ stream)\r\n    //{\r\n    //    Streams::DataWriter^ state = ref new Streams::DataWriter(stream);\r\n    //    *writer = state;\r\n\r\n    //    unsigned int codeUnits = state->MeasureString(strContent);\r\n    //    state->WriteUInt32(codeUnits);\r\n    //    state->WriteString(strContent);\r\n\r\n    //    return state->StoreAsync();\r\n    //}).then([writer](uint32 count)\r\n    //{\r\n    //    return (*writer)->FlushAsync();\r\n    //}).then([this, writer](bool flushed)\r\n    //{\r\n    //    delete (*writer);\r\n    //});\r\n//}\r\n\r\n//void WindowsPhoneRuntimeComponent::LoadFile(String^ strFile)\r\n//{\r\n //   auto folder = ApplicationData::Current->LocalFolder;\r\n    //task<StorageFile^> getFileTask(folder->GetFileAsync(strFile));\r\n\r\n    //// Create a local to allow the DataReader to be passed between lambdas.\r\n    //auto reader = std::make_shared<Streams::DataReader^>(nullptr);\r\n    //getFileTask.then([this, reader](task<StorageFile^> fileTask)\r\n    //{\r\n    //    try\r\n    //    {\r\n    //        StorageFile^ file = fileTask.get();\r\n\r\n    //        task<Streams::IRandomAccessStreamWithContentType^> (file->OpenReadAsync()).then([reader](Streams::IRandomAccessStreamWithContentType^ stream)\r\n    //        {\r\n    //            *reader = ref new Streams::DataReader(stream);\r\n    //            return (*reader)->LoadAsync(static_cast<uint32>(stream->Size));\r\n    //        }).then([this, reader](uint32 bytesRead)\r\n    //        {\r\n\r\n    //            Streams::DataReader^ state = (*reader);\r\n    //            try\r\n    //            {\r\n    //                    unsigned int codeUnits = state->ReadUInt32();\r\n    //                    Platform::String^ strContent = state->ReadString(codeUnits);\r\n\r\n    //            }\r\n    //            catch (Platform::Exception^ e)\r\n    //            {\r\n    //                // Do nothing.\r\n    //            }\r\n    //        });;\r\n    //    }\r\n    //    catch (Platform::Exception^ e)\r\n    //    {\r\n\r\n    //    }\r\n    //});\r\n//}\r\n\r\n"
  },
  {
    "path": "TelegramClient.Opus/TelegramClient.Opus.h",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n\r\n\r\n\r\nnamespace TelegramClient_Opus\r\n{\r\n\t//public ref class TestClass sealed{\r\n\t//public:\r\n\t//\t//property int IntValue;\r\n\t//\t//property String^ StringValue;\r\n\t//};\r\n\r\n    public ref class WindowsPhoneRuntimeComponent sealed\r\n    {\r\n\r\n\tpublic:\r\n\t\t//property int IntField;\r\n\t\t//property TestClass ClassField;\r\n\t\t//TestClass ClassField;\r\n        WindowsPhoneRuntimeComponent();\r\n\t\tint Sum(int a, int b);\r\n\t\tint InitPlayer(Platform::String^ path);\r\n\t\tvoid CleanupPlayer();\r\n\t\tvoid FillBuffer(Platform::WriteOnlyArray<uint8>^ buffer, int capacity, Platform::WriteOnlyArray<int>^ args);\r\n\t\tint64 GetTotalPcmDuration();\r\n\r\n\t\tint StartRecord(Platform::String^ path);\r\n\t\tint WriteFrame(const Platform::Array<uint8>^ buffer, int length);\r\n\t\tvoid StopRecord();\r\n\r\n\t\tbool IsOpusFile(Platform::String^ path);\r\n\r\n\t\tPlatform::Array<uint8>^ GetWaveform(Platform::String^ path);\r\n\r\n\t\t//void WriteFile( String^ strFile, String^ strContent );\r\n\t\t//void LoadFile(String^ strFile);\r\n    };\r\n\r\n}"
  },
  {
    "path": "TelegramClient.Opus/TelegramClient.Opus.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|ARM\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{5e327850-e16e-4642-957a-fd52bf8d3d02}</ProjectGuid>\r\n    <RootNamespace>TelegramClient_Opus</RootNamespace>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\r\n    <AppContainerApplication>true</AppContainerApplication>\r\n    <ApplicationType>Windows Phone</ApplicationType>\r\n    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup>\r\n    <GenerateManifest>false</GenerateManifest>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;OPUS_EXPORT=__declspec(dllexport);OPUS_BUILD;FIXED_POINT;USE_ALLOCA;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n      <AdditionalIncludeDirectories>.\\opus\\opusfile;.\\opus\\silk\\fixed;.\\opus\\ogg;.\\opus\\;.\\opus\\silk;.\\opus\\celt;.\\opus\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;OPUS_EXPORT=__declspec(dllexport);NDEBUG;OPUS_BUILD;FIXED_POINT;USE_ALLOCA;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n      <AdditionalIncludeDirectories>.\\opus\\opusfile;.\\opus\\silk\\fixed;.\\opus\\ogg;.\\opus\\;.\\opus\\silk;.\\opus\\celt;.\\opus\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;OPUS_EXPORT=__declspec(dllexport);OPUS_BUILD;FIXED_POINT;HAVE_LRINTF;HAVE_LRINT;USE_ALLOCA;DISABLE_FLOAT_API;OP_FIXED_POINT;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n      <AdditionalIncludeDirectories>.\\opus\\opusfile;.\\opus\\silk\\fixed;.\\opus\\ogg;.\\opus\\;.\\opus\\silk;.\\opus\\celt;.\\opus\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <Optimization>MaxSpeed</Optimization>\r\n      <BasicRuntimeChecks>Default</BasicRuntimeChecks>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;OPUS_EXPORT=__declspec(dllexport);NDEBUG;OPUS_BUILD;FIXED_POINT;USE_ALLOCA;HAVE_LRINTF;HAVE_LRINT;DISABLE_FLOAT_API;OP_FIXED_POINT;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n      <AdditionalIncludeDirectories>.\\opus\\opusfile;.\\opus\\silk\\fixed;.\\opus\\ogg;.\\opus\\;.\\opus\\silk;.\\opus\\celt;.\\opus\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"platform.winmd\">\r\n      <IsWinMDFile>true</IsWinMDFile>\r\n      <Private>false</Private>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"opus\\celt\\arch.h\" />\r\n    <ClInclude Include=\"opus\\celt\\arm\\armcpu.h\" />\r\n    <ClInclude Include=\"opus\\celt\\arm\\fixed_armv4.h\" />\r\n    <ClInclude Include=\"opus\\celt\\arm\\fixed_armv5e.h\" />\r\n    <ClInclude Include=\"opus\\celt\\arm\\kiss_fft_armv4.h\" />\r\n    <ClInclude Include=\"opus\\celt\\arm\\kiss_fft_armv5e.h\" />\r\n    <ClInclude Include=\"opus\\celt\\arm\\pitch_arm.h\" />\r\n    <ClInclude Include=\"opus\\celt\\bands.h\" />\r\n    <ClInclude Include=\"opus\\celt\\celt.h\" />\r\n    <ClInclude Include=\"opus\\celt\\celt_lpc.h\" />\r\n    <ClInclude Include=\"opus\\celt\\cpu_support.h\" />\r\n    <ClInclude Include=\"opus\\celt\\cwrs.h\" />\r\n    <ClInclude Include=\"opus\\celt\\ecintrin.h\" />\r\n    <ClInclude Include=\"opus\\celt\\entcode.h\" />\r\n    <ClInclude Include=\"opus\\celt\\entdec.h\" />\r\n    <ClInclude Include=\"opus\\celt\\entenc.h\" />\r\n    <ClInclude Include=\"opus\\celt\\fixed_debug.h\" />\r\n    <ClInclude Include=\"opus\\celt\\fixed_generic.h\" />\r\n    <ClInclude Include=\"opus\\celt\\float_cast.h\" />\r\n    <ClInclude Include=\"opus\\celt\\kiss_fft.h\" />\r\n    <ClInclude Include=\"opus\\celt\\laplace.h\" />\r\n    <ClInclude Include=\"opus\\celt\\mathops.h\" />\r\n    <ClInclude Include=\"opus\\celt\\mdct.h\" />\r\n    <ClInclude Include=\"opus\\celt\\mfrngcod.h\" />\r\n    <ClInclude Include=\"opus\\celt\\modes.h\" />\r\n    <ClInclude Include=\"opus\\celt\\os_support.h\" />\r\n    <ClInclude Include=\"opus\\celt\\pitch.h\" />\r\n    <ClInclude Include=\"opus\\celt\\quant_bands.h\" />\r\n    <ClInclude Include=\"opus\\celt\\rate.h\" />\r\n    <ClInclude Include=\"opus\\celt\\stack_alloc.h\" />\r\n    <ClInclude Include=\"opus\\celt\\static_modes_fixed.h\" />\r\n    <ClInclude Include=\"opus\\celt\\static_modes_float.h\" />\r\n    <ClInclude Include=\"opus\\celt\\vq.h\" />\r\n    <ClInclude Include=\"opus\\celt\\x86\\pitch_sse.h\" />\r\n    <ClInclude Include=\"opus\\celt\\_kiss_fft_guts.h\" />\r\n    <ClInclude Include=\"opus\\include\\opus.h\" />\r\n    <ClInclude Include=\"opus\\include\\opus_custom.h\" />\r\n    <ClInclude Include=\"opus\\include\\opus_defines.h\" />\r\n    <ClInclude Include=\"opus\\include\\opus_multistream.h\" />\r\n    <ClInclude Include=\"opus\\include\\opus_types.h\" />\r\n    <ClInclude Include=\"opus\\ogg\\ogg.h\" />\r\n    <ClInclude Include=\"opus\\ogg\\os_types.h\" />\r\n    <ClInclude Include=\"opus\\opusfile\\internal.h\" />\r\n    <ClInclude Include=\"opus\\opusfile\\opusfile.h\" />\r\n    <ClInclude Include=\"opus\\silk\\API.h\" />\r\n    <ClInclude Include=\"opus\\silk\\arm\\macros_armv4.h\" />\r\n    <ClInclude Include=\"opus\\silk\\arm\\macros_armv5e.h\" />\r\n    <ClInclude Include=\"opus\\silk\\arm\\SigProc_FIX_armv4.h\" />\r\n    <ClInclude Include=\"opus\\silk\\arm\\SigProc_FIX_armv5e.h\" />\r\n    <ClInclude Include=\"opus\\silk\\control.h\" />\r\n    <ClInclude Include=\"opus\\silk\\debug.h\" />\r\n    <ClInclude Include=\"opus\\silk\\define.h\" />\r\n    <ClInclude Include=\"opus\\silk\\errors.h\" />\r\n    <ClInclude Include=\"opus\\silk\\fixed\\main_FIX.h\" />\r\n    <ClInclude Include=\"opus\\silk\\fixed\\structs_FIX.h\" />\r\n    <ClInclude Include=\"opus\\silk\\Inlines.h\" />\r\n    <ClInclude Include=\"opus\\silk\\MacroCount.h\" />\r\n    <ClInclude Include=\"opus\\silk\\MacroDebug.h\" />\r\n    <ClInclude Include=\"opus\\silk\\macros.h\" />\r\n    <ClInclude Include=\"opus\\silk\\main.h\" />\r\n    <ClInclude Include=\"opus\\silk\\pitch_est_defines.h\" />\r\n    <ClInclude Include=\"opus\\silk\\PLC.h\" />\r\n    <ClInclude Include=\"opus\\silk\\resampler_private.h\" />\r\n    <ClInclude Include=\"opus\\silk\\resampler_rom.h\" />\r\n    <ClInclude Include=\"opus\\silk\\resampler_structs.h\" />\r\n    <ClInclude Include=\"opus\\silk\\SigProc_FIX.h\" />\r\n    <ClInclude Include=\"opus\\silk\\structs.h\" />\r\n    <ClInclude Include=\"opus\\silk\\tables.h\" />\r\n    <ClInclude Include=\"opus\\silk\\tuning_parameters.h\" />\r\n    <ClInclude Include=\"opus\\silk\\typedef.h\" />\r\n    <ClInclude Include=\"opus\\src\\analysis.h\" />\r\n    <ClInclude Include=\"opus\\src\\mlp.h\" />\r\n    <ClInclude Include=\"opus\\src\\opus_private.h\" />\r\n    <ClInclude Include=\"opus\\src\\tansig_table.h\" />\r\n    <ClInclude Include=\"pch.h\" />\r\n    <ClInclude Include=\"TelegramClient.Opus.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"audio.c\" />\r\n    <ClCompile Include=\"opus\\celt\\arm\\armcpu.c\" />\r\n    <ClCompile Include=\"opus\\celt\\arm\\arm_celt_map.c\" />\r\n    <ClCompile Include=\"opus\\celt\\bands.c\" />\r\n    <ClCompile Include=\"opus\\celt\\celt.c\" />\r\n    <ClCompile Include=\"opus\\celt\\celt_decoder.c\" />\r\n    <ClCompile Include=\"opus\\celt\\celt_encoder.c\" />\r\n    <ClCompile Include=\"opus\\celt\\celt_lpc.c\" />\r\n    <ClCompile Include=\"opus\\celt\\cwrs.c\" />\r\n    <ClCompile Include=\"opus\\celt\\entcode.c\" />\r\n    <ClCompile Include=\"opus\\celt\\entdec.c\" />\r\n    <ClCompile Include=\"opus\\celt\\entenc.c\" />\r\n    <ClCompile Include=\"opus\\celt\\kiss_fft.c\" />\r\n    <ClCompile Include=\"opus\\celt\\laplace.c\" />\r\n    <ClCompile Include=\"opus\\celt\\mathops.c\" />\r\n    <ClCompile Include=\"opus\\celt\\mdct.c\" />\r\n    <ClCompile Include=\"opus\\celt\\modes.c\" />\r\n    <ClCompile Include=\"opus\\celt\\pitch.c\" />\r\n    <ClCompile Include=\"opus\\celt\\quant_bands.c\" />\r\n    <ClCompile Include=\"opus\\celt\\rate.c\" />\r\n    <ClCompile Include=\"opus\\celt\\vq.c\" />\r\n    <ClCompile Include=\"opus\\ogg\\bitwise.c\" />\r\n    <ClCompile Include=\"opus\\ogg\\framing.c\" />\r\n    <ClCompile Include=\"opus\\opusfile\\info.c\" />\r\n    <ClCompile Include=\"opus\\opusfile\\internal.c\" />\r\n    <ClCompile Include=\"opus\\opusfile\\opusfile.c\" />\r\n    <ClCompile Include=\"opus\\opusfile\\stream.c\" />\r\n    <ClCompile Include=\"opus\\silk\\A2NLSF.c\" />\r\n    <ClCompile Include=\"opus\\silk\\ana_filt_bank_1.c\" />\r\n    <ClCompile Include=\"opus\\silk\\biquad_alt.c\" />\r\n    <ClCompile Include=\"opus\\silk\\bwexpander.c\" />\r\n    <ClCompile Include=\"opus\\silk\\bwexpander_32.c\" />\r\n    <ClCompile Include=\"opus\\silk\\check_control_input.c\" />\r\n    <ClCompile Include=\"opus\\silk\\CNG.c\" />\r\n    <ClCompile Include=\"opus\\silk\\code_signs.c\" />\r\n    <ClCompile Include=\"opus\\silk\\control_audio_bandwidth.c\" />\r\n    <ClCompile Include=\"opus\\silk\\control_codec.c\" />\r\n    <ClCompile Include=\"opus\\silk\\control_SNR.c\" />\r\n    <ClCompile Include=\"opus\\silk\\debug.c\" />\r\n    <ClCompile Include=\"opus\\silk\\decoder_set_fs.c\" />\r\n    <ClCompile Include=\"opus\\silk\\decode_core.c\" />\r\n    <ClCompile Include=\"opus\\silk\\decode_frame.c\" />\r\n    <ClCompile Include=\"opus\\silk\\decode_indices.c\" />\r\n    <ClCompile Include=\"opus\\silk\\decode_parameters.c\" />\r\n    <ClCompile Include=\"opus\\silk\\decode_pitch.c\" />\r\n    <ClCompile Include=\"opus\\silk\\decode_pulses.c\" />\r\n    <ClCompile Include=\"opus\\silk\\dec_API.c\" />\r\n    <ClCompile Include=\"opus\\silk\\encode_indices.c\" />\r\n    <ClCompile Include=\"opus\\silk\\encode_pulses.c\" />\r\n    <ClCompile Include=\"opus\\silk\\enc_API.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\apply_sine_window_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\autocorr_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\burg_modified_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\corrMatrix_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\encode_frame_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\find_LPC_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\find_LTP_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\find_pitch_lags_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\find_pred_coefs_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\k2a_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\k2a_Q16_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\LTP_analysis_filter_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\LTP_scale_ctrl_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\noise_shape_analysis_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\pitch_analysis_core_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\prefilter_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\process_gains_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\regularize_correlations_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\residual_energy16_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\residual_energy_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\schur64_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\schur_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\solve_LS_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\vector_ops_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\fixed\\warped_autocorrelation_FIX.c\" />\r\n    <ClCompile Include=\"opus\\silk\\gain_quant.c\" />\r\n    <ClCompile Include=\"opus\\silk\\HP_variable_cutoff.c\" />\r\n    <ClCompile Include=\"opus\\silk\\init_decoder.c\" />\r\n    <ClCompile Include=\"opus\\silk\\init_encoder.c\" />\r\n    <ClCompile Include=\"opus\\silk\\inner_prod_aligned.c\" />\r\n    <ClCompile Include=\"opus\\silk\\interpolate.c\" />\r\n    <ClCompile Include=\"opus\\silk\\lin2log.c\" />\r\n    <ClCompile Include=\"opus\\silk\\log2lin.c\" />\r\n    <ClCompile Include=\"opus\\silk\\LPC_analysis_filter.c\" />\r\n    <ClCompile Include=\"opus\\silk\\LPC_inv_pred_gain.c\" />\r\n    <ClCompile Include=\"opus\\silk\\LP_variable_cutoff.c\" />\r\n    <ClCompile Include=\"opus\\silk\\NLSF2A.c\" />\r\n    <ClCompile Include=\"opus\\silk\\NLSF_decode.c\" />\r\n    <ClCompile Include=\"opus\\silk\\NLSF_del_dec_quant.c\" />\r\n    <ClCompile Include=\"opus\\silk\\NLSF_encode.c\" />\r\n    <ClCompile Include=\"opus\\silk\\NLSF_stabilize.c\" />\r\n    <ClCompile Include=\"opus\\silk\\NLSF_unpack.c\" />\r\n    <ClCompile Include=\"opus\\silk\\NLSF_VQ.c\" />\r\n    <ClCompile Include=\"opus\\silk\\NLSF_VQ_weights_laroia.c\" />\r\n    <ClCompile Include=\"opus\\silk\\NSQ.c\" />\r\n    <ClCompile Include=\"opus\\silk\\NSQ_del_dec.c\" />\r\n    <ClCompile Include=\"opus\\silk\\pitch_est_tables.c\" />\r\n    <ClCompile Include=\"opus\\silk\\PLC.c\" />\r\n    <ClCompile Include=\"opus\\silk\\process_NLSFs.c\" />\r\n    <ClCompile Include=\"opus\\silk\\quant_LTP_gains.c\" />\r\n    <ClCompile Include=\"opus\\silk\\resampler.c\" />\r\n    <ClCompile Include=\"opus\\silk\\resampler_down2.c\" />\r\n    <ClCompile Include=\"opus\\silk\\resampler_down2_3.c\" />\r\n    <ClCompile Include=\"opus\\silk\\resampler_private_AR2.c\" />\r\n    <ClCompile Include=\"opus\\silk\\resampler_private_down_FIR.c\" />\r\n    <ClCompile Include=\"opus\\silk\\resampler_private_IIR_FIR.c\" />\r\n    <ClCompile Include=\"opus\\silk\\resampler_private_up2_HQ.c\" />\r\n    <ClCompile Include=\"opus\\silk\\resampler_rom.c\" />\r\n    <ClCompile Include=\"opus\\silk\\shell_coder.c\" />\r\n    <ClCompile Include=\"opus\\silk\\sigm_Q15.c\" />\r\n    <ClCompile Include=\"opus\\silk\\sort.c\" />\r\n    <ClCompile Include=\"opus\\silk\\stereo_decode_pred.c\" />\r\n    <ClCompile Include=\"opus\\silk\\stereo_encode_pred.c\" />\r\n    <ClCompile Include=\"opus\\silk\\stereo_find_predictor.c\" />\r\n    <ClCompile Include=\"opus\\silk\\stereo_LR_to_MS.c\" />\r\n    <ClCompile Include=\"opus\\silk\\stereo_MS_to_LR.c\" />\r\n    <ClCompile Include=\"opus\\silk\\stereo_quant_pred.c\" />\r\n    <ClCompile Include=\"opus\\silk\\sum_sqr_shift.c\" />\r\n    <ClCompile Include=\"opus\\silk\\tables_gain.c\" />\r\n    <ClCompile Include=\"opus\\silk\\tables_LTP.c\" />\r\n    <ClCompile Include=\"opus\\silk\\tables_NLSF_CB_NB_MB.c\" />\r\n    <ClCompile Include=\"opus\\silk\\tables_NLSF_CB_WB.c\" />\r\n    <ClCompile Include=\"opus\\silk\\tables_other.c\" />\r\n    <ClCompile Include=\"opus\\silk\\tables_pitch_lag.c\" />\r\n    <ClCompile Include=\"opus\\silk\\tables_pulses_per_block.c\" />\r\n    <ClCompile Include=\"opus\\silk\\table_LSF_cos.c\" />\r\n    <ClCompile Include=\"opus\\silk\\VAD.c\" />\r\n    <ClCompile Include=\"opus\\silk\\VQ_WMat_EC.c\" />\r\n    <ClCompile Include=\"opus\\src\\analysis.c\" />\r\n    <ClCompile Include=\"opus\\src\\mlp.c\" />\r\n    <ClCompile Include=\"opus\\src\\mlp_data.c\" />\r\n    <ClCompile Include=\"opus\\src\\opus.c\" />\r\n    <ClCompile Include=\"opus\\src\\opus_decoder.c\" />\r\n    <ClCompile Include=\"opus\\src\\opus_encoder.c\" />\r\n    <ClCompile Include=\"opus\\src\\opus_multistream.c\" />\r\n    <ClCompile Include=\"opus\\src\\opus_multistream_decoder.c\" />\r\n    <ClCompile Include=\"opus\\src\\opus_multistream_encoder.c\" />\r\n    <ClCompile Include=\"opus\\src\\repacketizer.c\" />\r\n    <ClCompile Include=\"opus\\src\\repacketizer_demo.c\" />\r\n    <ClCompile Include=\"pch.cpp\" />\r\n    <ClCompile Include=\"TelegramClient.Opus.cpp\">\r\n      <CompileAsWinRT Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</CompileAsWinRT>\r\n      <CompileAsWinRT Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</CompileAsWinRT>\r\n      <CompileAsWinRT Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">true</CompileAsWinRT>\r\n      <CompileAsWinRT Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">true</CompileAsWinRT>\r\n    </ClCompile>\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\WindowsPhone\\v$(TargetPlatformVersion)\\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "TelegramClient.Opus/TelegramClient.Opus.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup>\r\n    <Filter Include=\"Resources\">\r\n      <UniqueIdentifier>5fd0e509-b6ae-4f29-bd2a-4d2cc10f3aa0</UniqueIdentifier>\r\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r\n    </Filter>\r\n    <Filter Include=\"Source Files\">\r\n      <UniqueIdentifier>{53ba44f6-1989-4e6f-9e7c-4a6c8e85c1f6}</UniqueIdentifier>\r\n    </Filter>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"opus\\celt\\arch.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\arm\\armcpu.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\arm\\fixed_armv4.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\arm\\fixed_armv5e.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\arm\\kiss_fft_armv4.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\arm\\kiss_fft_armv5e.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\arm\\pitch_arm.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\bands.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\celt.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\celt_lpc.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\cpu_support.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\cwrs.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\ecintrin.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\entcode.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\entdec.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\entenc.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\fixed_debug.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\fixed_generic.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\float_cast.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\kiss_fft.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\laplace.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\mathops.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\mdct.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\mfrngcod.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\modes.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\os_support.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\pitch.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\quant_bands.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\rate.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\stack_alloc.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\static_modes_fixed.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\static_modes_float.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\vq.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\x86\\pitch_sse.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\celt\\_kiss_fft_guts.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\include\\opus.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\include\\opus_custom.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\include\\opus_defines.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\include\\opus_multistream.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\include\\opus_types.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\ogg\\ogg.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\ogg\\os_types.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\opusfile\\internal.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\opusfile\\opusfile.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\API.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\arm\\macros_armv4.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\arm\\macros_armv5e.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\arm\\SigProc_FIX_armv4.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\arm\\SigProc_FIX_armv5e.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\control.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\debug.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\define.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\errors.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\fixed\\main_FIX.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\fixed\\structs_FIX.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\Inlines.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\MacroCount.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\MacroDebug.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\macros.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\main.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\pitch_est_defines.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\PLC.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\resampler_private.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\resampler_rom.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\resampler_structs.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\SigProc_FIX.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\structs.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\tables.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\tuning_parameters.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\silk\\typedef.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\src\\analysis.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\src\\mlp.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\src\\opus_private.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"opus\\src\\tansig_table.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"TelegramClient.Opus.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"pch.h\">\r\n      <Filter>Source Files</Filter>\r\n    </ClInclude>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"opus\\celt\\arm\\armcpu.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\arm\\arm_celt_map.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\bands.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\celt.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\celt_decoder.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\celt_encoder.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\celt_lpc.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\cwrs.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\entcode.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\entdec.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\entenc.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\kiss_fft.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\laplace.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\mathops.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\mdct.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\modes.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\pitch.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\quant_bands.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\rate.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\celt\\vq.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\ogg\\bitwise.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\ogg\\framing.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\opusfile\\info.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\opusfile\\internal.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\opusfile\\opusfile.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\opusfile\\stream.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\A2NLSF.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\ana_filt_bank_1.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\biquad_alt.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\bwexpander.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\bwexpander_32.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\check_control_input.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\CNG.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\code_signs.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\control_audio_bandwidth.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\control_codec.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\control_SNR.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\debug.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\decoder_set_fs.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\decode_core.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\decode_frame.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\decode_indices.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\decode_parameters.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\decode_pitch.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\decode_pulses.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\dec_API.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\encode_indices.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\encode_pulses.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\enc_API.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\apply_sine_window_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\autocorr_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\burg_modified_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\corrMatrix_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\encode_frame_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\find_LPC_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\find_LTP_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\find_pitch_lags_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\find_pred_coefs_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\k2a_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\k2a_Q16_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\LTP_analysis_filter_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\LTP_scale_ctrl_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\noise_shape_analysis_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\pitch_analysis_core_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\prefilter_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\process_gains_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\regularize_correlations_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\residual_energy16_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\residual_energy_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\schur64_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\schur_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\solve_LS_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\vector_ops_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\fixed\\warped_autocorrelation_FIX.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\gain_quant.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\HP_variable_cutoff.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\init_decoder.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\init_encoder.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\inner_prod_aligned.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\interpolate.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\lin2log.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\log2lin.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\LPC_analysis_filter.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\LPC_inv_pred_gain.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\LP_variable_cutoff.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\NLSF2A.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\NLSF_decode.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\NLSF_del_dec_quant.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\NLSF_encode.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\NLSF_stabilize.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\NLSF_unpack.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\NLSF_VQ.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\NLSF_VQ_weights_laroia.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\NSQ.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\NSQ_del_dec.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\pitch_est_tables.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\PLC.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\process_NLSFs.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\quant_LTP_gains.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\resampler.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\resampler_down2.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\resampler_down2_3.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\resampler_private_AR2.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\resampler_private_down_FIR.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\resampler_private_IIR_FIR.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\resampler_private_up2_HQ.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\resampler_rom.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\shell_coder.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\sigm_Q15.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\sort.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\stereo_decode_pred.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\stereo_encode_pred.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\stereo_find_predictor.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\stereo_LR_to_MS.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\stereo_MS_to_LR.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\stereo_quant_pred.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\sum_sqr_shift.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\tables_gain.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\tables_LTP.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\tables_NLSF_CB_NB_MB.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\tables_NLSF_CB_WB.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\tables_other.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\tables_pitch_lag.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\tables_pulses_per_block.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\table_LSF_cos.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\VAD.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\silk\\VQ_WMat_EC.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\src\\analysis.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\src\\mlp.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\src\\mlp_data.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\src\\opus.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\src\\opus_decoder.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\src\\opus_encoder.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\src\\opus_multistream.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\src\\opus_multistream_decoder.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\src\\opus_multistream_encoder.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\src\\repacketizer.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"opus\\src\\repacketizer_demo.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"TelegramClient.Opus.cpp\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"pch.cpp\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"audio.c\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "TelegramClient.Opus/audio.c",
    "content": "\n\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/_kiss_fft_guts.h",
    "content": "/*Copyright (c) 2003-2004, Mark Borgerding\n\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    * Redistributions of source code must retain the above copyright notice,\n       this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright notice,\n       this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\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\n  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n  POSSIBILITY OF SUCH DAMAGE.*/\n\n#ifndef KISS_FFT_GUTS_H\n#define KISS_FFT_GUTS_H\n\n#define MIN(a,b) ((a)<(b) ? (a):(b))\n#define MAX(a,b) ((a)>(b) ? (a):(b))\n\n/* kiss_fft.h\n   defines kiss_fft_scalar as either short or a float type\n   and defines\n   typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */\n#include \"kiss_fft.h\"\n\n/*\n  Explanation of macros dealing with complex math:\n\n   C_MUL(m,a,b)         : m = a*b\n   C_FIXDIV( c , div )  : if a fixed point impl., c /= div. noop otherwise\n   C_SUB( res, a,b)     : res = a - b\n   C_SUBFROM( res , a)  : res -= a\n   C_ADDTO( res , a)    : res += a\n * */\n#ifdef FIXED_POINT\n#include \"arch.h\"\n\n\n#define SAMP_MAX 2147483647\n#define TWID_MAX 32767\n#define TRIG_UPSCALE 1\n\n#define SAMP_MIN -SAMP_MAX\n\n\n#   define S_MUL(a,b) MULT16_32_Q15(b, a)\n\n#   define C_MUL(m,a,b) \\\n      do{ (m).r = SUB32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)); \\\n          (m).i = ADD32(S_MUL((a).r,(b).i) , S_MUL((a).i,(b).r)); }while(0)\n\n#   define C_MULC(m,a,b) \\\n      do{ (m).r = ADD32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)); \\\n          (m).i = SUB32(S_MUL((a).i,(b).r) , S_MUL((a).r,(b).i)); }while(0)\n\n#   define C_MUL4(m,a,b) \\\n      do{ (m).r = SHR32(SUB32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)),2); \\\n          (m).i = SHR32(ADD32(S_MUL((a).r,(b).i) , S_MUL((a).i,(b).r)),2); }while(0)\n\n#   define C_MULBYSCALAR( c, s ) \\\n      do{ (c).r =  S_MUL( (c).r , s ) ;\\\n          (c).i =  S_MUL( (c).i , s ) ; }while(0)\n\n#   define DIVSCALAR(x,k) \\\n        (x) = S_MUL(  x, (TWID_MAX-((k)>>1))/(k)+1 )\n\n#   define C_FIXDIV(c,div) \\\n        do {    DIVSCALAR( (c).r , div);  \\\n                DIVSCALAR( (c).i  , div); }while (0)\n\n#define  C_ADD( res, a,b)\\\n    do {(res).r=ADD32((a).r,(b).r);  (res).i=ADD32((a).i,(b).i); \\\n    }while(0)\n#define  C_SUB( res, a,b)\\\n    do {(res).r=SUB32((a).r,(b).r);  (res).i=SUB32((a).i,(b).i); \\\n    }while(0)\n#define C_ADDTO( res , a)\\\n    do {(res).r = ADD32((res).r, (a).r);  (res).i = ADD32((res).i,(a).i);\\\n    }while(0)\n\n#define C_SUBFROM( res , a)\\\n    do {(res).r = ADD32((res).r,(a).r);  (res).i = SUB32((res).i,(a).i); \\\n    }while(0)\n\n#if defined(OPUS_ARM_INLINE_ASM)\n#include \"arm/kiss_fft_armv4.h\"\n#endif\n\n#if defined(OPUS_ARM_INLINE_EDSP)\n#include \"arm/kiss_fft_armv5e.h\"\n#endif\n\n#else  /* not FIXED_POINT*/\n\n#   define S_MUL(a,b) ( (a)*(b) )\n#define C_MUL(m,a,b) \\\n    do{ (m).r = (a).r*(b).r - (a).i*(b).i;\\\n        (m).i = (a).r*(b).i + (a).i*(b).r; }while(0)\n#define C_MULC(m,a,b) \\\n    do{ (m).r = (a).r*(b).r + (a).i*(b).i;\\\n        (m).i = (a).i*(b).r - (a).r*(b).i; }while(0)\n\n#define C_MUL4(m,a,b) C_MUL(m,a,b)\n\n#   define C_FIXDIV(c,div) /* NOOP */\n#   define C_MULBYSCALAR( c, s ) \\\n    do{ (c).r *= (s);\\\n        (c).i *= (s); }while(0)\n#endif\n\n#ifndef CHECK_OVERFLOW_OP\n#  define CHECK_OVERFLOW_OP(a,op,b) /* noop */\n#endif\n\n#ifndef C_ADD\n#define  C_ADD( res, a,b)\\\n    do { \\\n            CHECK_OVERFLOW_OP((a).r,+,(b).r)\\\n            CHECK_OVERFLOW_OP((a).i,+,(b).i)\\\n            (res).r=(a).r+(b).r;  (res).i=(a).i+(b).i; \\\n    }while(0)\n#define  C_SUB( res, a,b)\\\n    do { \\\n            CHECK_OVERFLOW_OP((a).r,-,(b).r)\\\n            CHECK_OVERFLOW_OP((a).i,-,(b).i)\\\n            (res).r=(a).r-(b).r;  (res).i=(a).i-(b).i; \\\n    }while(0)\n#define C_ADDTO( res , a)\\\n    do { \\\n            CHECK_OVERFLOW_OP((res).r,+,(a).r)\\\n            CHECK_OVERFLOW_OP((res).i,+,(a).i)\\\n            (res).r += (a).r;  (res).i += (a).i;\\\n    }while(0)\n\n#define C_SUBFROM( res , a)\\\n    do {\\\n            CHECK_OVERFLOW_OP((res).r,-,(a).r)\\\n            CHECK_OVERFLOW_OP((res).i,-,(a).i)\\\n            (res).r -= (a).r;  (res).i -= (a).i; \\\n    }while(0)\n#endif /* C_ADD defined */\n\n#ifdef FIXED_POINT\n/*#  define KISS_FFT_COS(phase)  TRIG_UPSCALE*floor(MIN(32767,MAX(-32767,.5+32768 * cos (phase))))\n#  define KISS_FFT_SIN(phase)  TRIG_UPSCALE*floor(MIN(32767,MAX(-32767,.5+32768 * sin (phase))))*/\n#  define KISS_FFT_COS(phase)  floor(.5+TWID_MAX*cos (phase))\n#  define KISS_FFT_SIN(phase)  floor(.5+TWID_MAX*sin (phase))\n#  define HALF_OF(x) ((x)>>1)\n#elif defined(USE_SIMD)\n#  define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) )\n#  define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) )\n#  define HALF_OF(x) ((x)*_mm_set1_ps(.5f))\n#else\n#  define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase)\n#  define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase)\n#  define HALF_OF(x) ((x)*.5f)\n#endif\n\n#define  kf_cexp(x,phase) \\\n        do{ \\\n                (x)->r = KISS_FFT_COS(phase);\\\n                (x)->i = KISS_FFT_SIN(phase);\\\n        }while(0)\n\n#define  kf_cexp2(x,phase) \\\n   do{ \\\n      (x)->r = TRIG_UPSCALE*celt_cos_norm((phase));\\\n      (x)->i = TRIG_UPSCALE*celt_cos_norm((phase)-32768);\\\n}while(0)\n\n#endif /* KISS_FFT_GUTS_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/arch.h",
    "content": "/* Copyright (c) 2003-2008 Jean-Marc Valin\n   Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\n/**\n   @file arch.h\n   @brief Various architecture definitions for CELT\n*/\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef ARCH_H\n#define ARCH_H\n\n#include \"opus_types.h\"\n#include \"opus_defines.h\"\n\n# if !defined(__GNUC_PREREQ)\n#  if defined(__GNUC__)&&defined(__GNUC_MINOR__)\n#   define __GNUC_PREREQ(_maj,_min) \\\n ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min))\n#  else\n#   define __GNUC_PREREQ(_maj,_min) 0\n#  endif\n# endif\n\n#define CELT_SIG_SCALE 32768.f\n\n#define celt_fatal(str) _celt_fatal(str, __FILE__, __LINE__);\n#ifdef ENABLE_ASSERTIONS\n#include <stdio.h>\n#include <stdlib.h>\n#ifdef __GNUC__\n__attribute__((noreturn))\n#endif\nstatic OPUS_INLINE void _celt_fatal(const char *str, const char *file, int line)\n{\n   fprintf (stderr, \"Fatal (internal) error in %s, line %d: %s\\n\", file, line, str);\n   abort();\n}\n#define celt_assert(cond) {if (!(cond)) {celt_fatal(\"assertion failed: \" #cond);}}\n#define celt_assert2(cond, message) {if (!(cond)) {celt_fatal(\"assertion failed: \" #cond \"\\n\" message);}}\n#else\n#define celt_assert(cond)\n#define celt_assert2(cond, message)\n#endif\n\n#define IMUL32(a,b) ((a)*(b))\n\n#define ABS(x) ((x) < 0 ? (-(x)) : (x))      /**< Absolute integer value. */\n#define ABS16(x) ((x) < 0 ? (-(x)) : (x))    /**< Absolute 16-bit value.  */\n#define MIN16(a,b) ((a) < (b) ? (a) : (b))   /**< Minimum 16-bit value.   */\n#define MAX16(a,b) ((a) > (b) ? (a) : (b))   /**< Maximum 16-bit value.   */\n#define ABS32(x) ((x) < 0 ? (-(x)) : (x))    /**< Absolute 32-bit value.  */\n#define MIN32(a,b) ((a) < (b) ? (a) : (b))   /**< Minimum 32-bit value.   */\n#define MAX32(a,b) ((a) > (b) ? (a) : (b))   /**< Maximum 32-bit value.   */\n#define IMIN(a,b) ((a) < (b) ? (a) : (b))   /**< Minimum int value.   */\n#define IMAX(a,b) ((a) > (b) ? (a) : (b))   /**< Maximum int value.   */\n#define UADD32(a,b) ((a)+(b))\n#define USUB32(a,b) ((a)-(b))\n\n#define PRINT_MIPS(file)\n\n#ifdef FIXED_POINT\n\ntypedef opus_int16 opus_val16;\ntypedef opus_int32 opus_val32;\n\ntypedef opus_val32 celt_sig;\ntypedef opus_val16 celt_norm;\ntypedef opus_val32 celt_ener;\n\n#define Q15ONE 32767\n\n#define SIG_SHIFT 12\n\n#define NORM_SCALING 16384\n\n#define DB_SHIFT 10\n\n#define EPSILON 1\n#define VERY_SMALL 0\n#define VERY_LARGE16 ((opus_val16)32767)\n#define Q15_ONE ((opus_val16)32767)\n\n#define SCALEIN(a)      (a)\n#define SCALEOUT(a)     (a)\n\n#ifdef FIXED_DEBUG\n#include \"fixed_debug.h\"\n#else\n\n#include \"fixed_generic.h\"\n\n#ifdef OPUS_ARM_INLINE_EDSP\n#include \"arm/fixed_armv5e.h\"\n#elif defined (OPUS_ARM_INLINE_ASM)\n#include \"arm/fixed_armv4.h\"\n#elif defined (BFIN_ASM)\n#include \"fixed_bfin.h\"\n#elif defined (TI_C5X_ASM)\n#include \"fixed_c5x.h\"\n#elif defined (TI_C6X_ASM)\n#include \"fixed_c6x.h\"\n#endif\n\n#endif\n\n#else /* FIXED_POINT */\n\ntypedef float opus_val16;\ntypedef float opus_val32;\n\ntypedef float celt_sig;\ntypedef float celt_norm;\ntypedef float celt_ener;\n\n#define Q15ONE 1.0f\n\n#define NORM_SCALING 1.f\n\n#define EPSILON 1e-15f\n#define VERY_SMALL 1e-30f\n#define VERY_LARGE16 1e15f\n#define Q15_ONE ((opus_val16)1.f)\n\n#define QCONST16(x,bits) (x)\n#define QCONST32(x,bits) (x)\n\n#define NEG16(x) (-(x))\n#define NEG32(x) (-(x))\n#define EXTRACT16(x) (x)\n#define EXTEND32(x) (x)\n#define SHR16(a,shift) (a)\n#define SHL16(a,shift) (a)\n#define SHR32(a,shift) (a)\n#define SHL32(a,shift) (a)\n#define PSHR32(a,shift) (a)\n#define VSHR32(a,shift) (a)\n\n#define PSHR(a,shift)   (a)\n#define SHR(a,shift)    (a)\n#define SHL(a,shift)    (a)\n#define SATURATE(x,a)   (x)\n#define SATURATE16(x)   (x)\n\n#define ROUND16(a,shift)  (a)\n#define HALF16(x)       (.5f*(x))\n#define HALF32(x)       (.5f*(x))\n\n#define ADD16(a,b) ((a)+(b))\n#define SUB16(a,b) ((a)-(b))\n#define ADD32(a,b) ((a)+(b))\n#define SUB32(a,b) ((a)-(b))\n#define MULT16_16_16(a,b)     ((a)*(b))\n#define MULT16_16(a,b)     ((opus_val32)(a)*(opus_val32)(b))\n#define MAC16_16(c,a,b)     ((c)+(opus_val32)(a)*(opus_val32)(b))\n\n#define MULT16_32_Q15(a,b)     ((a)*(b))\n#define MULT16_32_Q16(a,b)     ((a)*(b))\n\n#define MULT32_32_Q31(a,b)     ((a)*(b))\n\n#define MAC16_32_Q15(c,a,b)     ((c)+(a)*(b))\n\n#define MULT16_16_Q11_32(a,b)     ((a)*(b))\n#define MULT16_16_Q11(a,b)     ((a)*(b))\n#define MULT16_16_Q13(a,b)     ((a)*(b))\n#define MULT16_16_Q14(a,b)     ((a)*(b))\n#define MULT16_16_Q15(a,b)     ((a)*(b))\n#define MULT16_16_P15(a,b)     ((a)*(b))\n#define MULT16_16_P13(a,b)     ((a)*(b))\n#define MULT16_16_P14(a,b)     ((a)*(b))\n#define MULT16_32_P16(a,b)     ((a)*(b))\n\n#define DIV32_16(a,b)     (((opus_val32)(a))/(opus_val16)(b))\n#define DIV32(a,b)     (((opus_val32)(a))/(opus_val32)(b))\n\n#define SCALEIN(a)      ((a)*CELT_SIG_SCALE)\n#define SCALEOUT(a)     ((a)*(1/CELT_SIG_SCALE))\n\n#endif /* !FIXED_POINT */\n\n#ifndef GLOBAL_STACK_SIZE\n#ifdef FIXED_POINT\n#define GLOBAL_STACK_SIZE 100000\n#else\n#define GLOBAL_STACK_SIZE 100000\n#endif\n#endif\n\n#endif /* ARCH_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/arm/arm_celt_map.c",
    "content": "/* Copyright (c) 2010 Xiph.Org Foundation\n * Copyright (c) 2013 Parrot */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"pitch.h\"\n\n#if defined(OPUS_HAVE_RTCD)\n\n# if defined(FIXED_POINT)\nopus_val32 (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *,\n    const opus_val16 *, opus_val32 *, int , int) = {\n  celt_pitch_xcorr_c,               /* ARMv4 */\n  MAY_HAVE_EDSP(celt_pitch_xcorr),  /* EDSP */\n  MAY_HAVE_MEDIA(celt_pitch_xcorr), /* Media */\n  MAY_HAVE_NEON(celt_pitch_xcorr)   /* NEON */\n};\n# else\n#  error \"Floating-point implementation is not supported by ARM asm yet.\" \\\n \"Reconfigure with --disable-rtcd or send patches.\"\n# endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/arm/armcpu.c",
    "content": "/* Copyright (c) 2010 Xiph.Org Foundation\n * Copyright (c) 2013 Parrot */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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/* Original code from libtheora modified to suit to Opus */\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#ifdef OPUS_HAVE_RTCD\n\n#include \"armcpu.h\"\n#include \"cpu_support.h\"\n#include \"os_support.h\"\n#include \"opus_types.h\"\n\n#define OPUS_CPU_ARM_V4    (1)\n#define OPUS_CPU_ARM_EDSP  (1<<1)\n#define OPUS_CPU_ARM_MEDIA (1<<2)\n#define OPUS_CPU_ARM_NEON  (1<<3)\n\n#if defined(_MSC_VER)\n/*For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.*/\n# define WIN32_LEAN_AND_MEAN\n# define WIN32_EXTRA_LEAN\n# include <windows.h>\n\nstatic OPUS_INLINE opus_uint32 opus_cpu_capabilities(void){\n  opus_uint32 flags;\n  flags=0;\n  /* MSVC has no OPUS_INLINE __asm support for ARM, but it does let you __emit\n   * instructions via their assembled hex code.\n   * All of these instructions should be essentially nops. */\n# if defined(OPUS_ARM_MAY_HAVE_EDSP)\n  __try{\n    /*PLD [r13]*/\n    __emit(0xF5DDF000);\n    flags|=OPUS_CPU_ARM_EDSP;\n  }\n  __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){\n    /*Ignore exception.*/\n  }\n#  if defined(OPUS_ARM_MAY_HAVE_MEDIA)\n  __try{\n    /*SHADD8 r3,r3,r3*/\n    __emit(0xE6333F93);\n    flags|=OPUS_CPU_ARM_MEDIA;\n  }\n  __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){\n    /*Ignore exception.*/\n  }\n#   if defined(OPUS_ARM_MAY_HAVE_NEON)\n  __try{\n    /*VORR q0,q0,q0*/\n    __emit(0xF2200150);\n    flags|=OPUS_CPU_ARM_NEON;\n  }\n  __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){\n    /*Ignore exception.*/\n  }\n#   endif\n#  endif\n# endif\n  return flags;\n}\n\n#elif defined(__linux__)\n/* Linux based */\nopus_uint32 opus_cpu_capabilities(void)\n{\n  opus_uint32 flags = 0;\n  FILE *cpuinfo;\n\n  /* Reading /proc/self/auxv would be easier, but that doesn't work reliably on\n   * Android */\n  cpuinfo = fopen(\"/proc/cpuinfo\", \"r\");\n\n  if(cpuinfo != NULL)\n  {\n    /* 512 should be enough for anybody (it's even enough for all the flags that\n     * x86 has accumulated... so far). */\n    char buf[512];\n\n    while(fgets(buf, 512, cpuinfo) != NULL)\n    {\n# if defined(OPUS_ARM_MAY_HAVE_EDSP) || defined(OPUS_ARM_MAY_HAVE_NEON)\n      /* Search for edsp and neon flag */\n      if(memcmp(buf, \"Features\", 8) == 0)\n      {\n        char *p;\n#  if defined(OPUS_ARM_MAY_HAVE_EDSP)\n        p = strstr(buf, \" edsp\");\n        if(p != NULL && (p[5] == ' ' || p[5] == '\\n'))\n          flags |= OPUS_CPU_ARM_EDSP;\n#  endif\n\n#  if defined(OPUS_ARM_MAY_HAVE_NEON)\n        p = strstr(buf, \" neon\");\n        if(p != NULL && (p[5] == ' ' || p[5] == '\\n'))\n          flags |= OPUS_CPU_ARM_NEON;\n#  endif\n      }\n# endif\n\n# if defined(OPUS_ARM_MAY_HAVE_MEDIA)\n      /* Search for media capabilities (>= ARMv6) */\n      if(memcmp(buf, \"CPU architecture:\", 17) == 0)\n      {\n        int version;\n        version = atoi(buf+17);\n\n        if(version >= 6)\n          flags |= OPUS_CPU_ARM_MEDIA;\n      }\n# endif\n    }\n\n    fclose(cpuinfo);\n  }\n  return flags;\n}\n#else\n/* The feature registers which can tell us what the processor supports are\n * accessible in priveleged modes only, so we can't have a general user-space\n * detection method like on x86.*/\n# error \"Configured to use ARM asm but no CPU detection method available for \" \\\n   \"your platform.  Reconfigure with --disable-rtcd (or send patches).\"\n#endif\n\nint opus_select_arch(void)\n{\n  opus_uint32 flags = opus_cpu_capabilities();\n  int arch = 0;\n\n  if(!(flags & OPUS_CPU_ARM_EDSP))\n    return arch;\n  arch++;\n\n  if(!(flags & OPUS_CPU_ARM_MEDIA))\n    return arch;\n  arch++;\n\n  if(!(flags & OPUS_CPU_ARM_NEON))\n    return arch;\n  arch++;\n\n  return arch;\n}\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/arm/armcpu.h",
    "content": "/* Copyright (c) 2010 Xiph.Org Foundation\n * Copyright (c) 2013 Parrot */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#if !defined(ARMCPU_H)\n# define ARMCPU_H\n\n# if defined(OPUS_ARM_MAY_HAVE_EDSP)\n#  define MAY_HAVE_EDSP(name) name ## _edsp\n# else\n#  define MAY_HAVE_EDSP(name) name ## _c\n# endif\n\n# if defined(OPUS_ARM_MAY_HAVE_MEDIA)\n#  define MAY_HAVE_MEDIA(name) name ## _media\n# else\n#  define MAY_HAVE_MEDIA(name) MAY_HAVE_EDSP(name)\n# endif\n\n# if defined(OPUS_ARM_MAY_HAVE_NEON)\n#  define MAY_HAVE_NEON(name) name ## _neon\n# else\n#  define MAY_HAVE_NEON(name) MAY_HAVE_MEDIA(name)\n# endif\n\n# if defined(OPUS_ARM_PRESUME_EDSP)\n#  define PRESUME_EDSP(name) name ## _edsp\n# else\n#  define PRESUME_EDSP(name) name ## _c\n# endif\n\n# if defined(OPUS_ARM_PRESUME_MEDIA)\n#  define PRESUME_MEDIA(name) name ## _media\n# else\n#  define PRESUME_MEDIA(name) PRESUME_EDSP(name)\n# endif\n\n# if defined(OPUS_ARM_PRESUME_NEON)\n#  define PRESUME_NEON(name) name ## _neon\n# else\n#  define PRESUME_NEON(name) PRESUME_MEDIA(name)\n# endif\n\n# if defined(OPUS_HAVE_RTCD)\nint opus_select_arch(void);\n# endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/arm/fixed_armv4.h",
    "content": "/* Copyright (C) 2013 Xiph.Org Foundation and contributors */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef FIXED_ARMv4_H\n#define FIXED_ARMv4_H\n\n/** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */\n#undef MULT16_32_Q16\nstatic OPUS_INLINE opus_val32 MULT16_32_Q16_armv4(opus_val16 a, opus_val32 b)\n{\n  unsigned rd_lo;\n  int rd_hi;\n  __asm__(\n      \"#MULT16_32_Q16\\n\\t\"\n      \"smull %0, %1, %2, %3\\n\\t\"\n      : \"=&r\"(rd_lo), \"=&r\"(rd_hi)\n      : \"%r\"(b),\"r\"(a<<16)\n  );\n  return rd_hi;\n}\n#define MULT16_32_Q16(a, b) (MULT16_32_Q16_armv4(a, b))\n\n\n/** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */\n#undef MULT16_32_Q15\nstatic OPUS_INLINE opus_val32 MULT16_32_Q15_armv4(opus_val16 a, opus_val32 b)\n{\n  unsigned rd_lo;\n  int rd_hi;\n  __asm__(\n      \"#MULT16_32_Q15\\n\\t\"\n      \"smull %0, %1, %2, %3\\n\\t\"\n      : \"=&r\"(rd_lo), \"=&r\"(rd_hi)\n      : \"%r\"(b), \"r\"(a<<16)\n  );\n  /*We intentionally don't OR in the high bit of rd_lo for speed.*/\n  return rd_hi<<1;\n}\n#define MULT16_32_Q15(a, b) (MULT16_32_Q15_armv4(a, b))\n\n\n/** 16x32 multiply, followed by a 15-bit shift right and 32-bit add.\n    b must fit in 31 bits.\n    Result fits in 32 bits. */\n#undef MAC16_32_Q15\n#define MAC16_32_Q15(c, a, b) ADD32(c, MULT16_32_Q15(a, b))\n\n\n/** 32x32 multiplication, followed by a 31-bit shift right. Results fits in 32 bits */\n#undef MULT32_32_Q31\n#define MULT32_32_Q31(a,b) (opus_val32)((((opus_int64)(a)) * ((opus_int64)(b)))>>31)\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/arm/fixed_armv5e.h",
    "content": "/* Copyright (C) 2007-2009 Xiph.Org Foundation\n   Copyright (C) 2003-2008 Jean-Marc Valin\n   Copyright (C) 2007-2008 CSIRO\n   Copyright (C) 2013      Parrot */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef FIXED_ARMv5E_H\n#define FIXED_ARMv5E_H\n\n#include \"fixed_armv4.h\"\n\n/** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */\n#undef MULT16_32_Q16\nstatic OPUS_INLINE opus_val32 MULT16_32_Q16_armv5e(opus_val16 a, opus_val32 b)\n{\n  int res;\n  __asm__(\n      \"#MULT16_32_Q16\\n\\t\"\n      \"smulwb %0, %1, %2\\n\\t\"\n      : \"=r\"(res)\n      : \"r\"(b),\"r\"(a)\n  );\n  return res;\n}\n#define MULT16_32_Q16(a, b) (MULT16_32_Q16_armv5e(a, b))\n\n\n/** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */\n#undef MULT16_32_Q15\nstatic OPUS_INLINE opus_val32 MULT16_32_Q15_armv5e(opus_val16 a, opus_val32 b)\n{\n  int res;\n  __asm__(\n      \"#MULT16_32_Q15\\n\\t\"\n      \"smulwb %0, %1, %2\\n\\t\"\n      : \"=r\"(res)\n      : \"r\"(b), \"r\"(a)\n  );\n  return res<<1;\n}\n#define MULT16_32_Q15(a, b) (MULT16_32_Q15_armv5e(a, b))\n\n\n/** 16x32 multiply, followed by a 15-bit shift right and 32-bit add.\n    b must fit in 31 bits.\n    Result fits in 32 bits. */\n#undef MAC16_32_Q15\nstatic OPUS_INLINE opus_val32 MAC16_32_Q15_armv5e(opus_val32 c, opus_val16 a,\n opus_val32 b)\n{\n  int res;\n  __asm__(\n      \"#MAC16_32_Q15\\n\\t\"\n      \"smlawb %0, %1, %2, %3;\\n\"\n      : \"=r\"(res)\n      : \"r\"(b<<1), \"r\"(a), \"r\"(c)\n  );\n  return res;\n}\n#define MAC16_32_Q15(c, a, b) (MAC16_32_Q15_armv5e(c, a, b))\n\n/** 16x16 multiply-add where the result fits in 32 bits */\n#undef MAC16_16\nstatic OPUS_INLINE opus_val32 MAC16_16_armv5e(opus_val32 c, opus_val16 a,\n opus_val16 b)\n{\n  int res;\n  __asm__(\n      \"#MAC16_16\\n\\t\"\n      \"smlabb %0, %1, %2, %3;\\n\"\n      : \"=r\"(res)\n      : \"r\"(a), \"r\"(b), \"r\"(c)\n  );\n  return res;\n}\n#define MAC16_16(c, a, b) (MAC16_16_armv5e(c, a, b))\n\n/** 16x16 multiplication where the result fits in 32 bits */\n#undef MULT16_16\nstatic OPUS_INLINE opus_val32 MULT16_16_armv5e(opus_val16 a, opus_val16 b)\n{\n  int res;\n  __asm__(\n      \"#MULT16_16\\n\\t\"\n      \"smulbb %0, %1, %2;\\n\"\n      : \"=r\"(res)\n      : \"r\"(a), \"r\"(b)\n  );\n  return res;\n}\n#define MULT16_16(a, b) (MULT16_16_armv5e(a, b))\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/arm/kiss_fft_armv4.h",
    "content": "/*Copyright (c) 2013, Xiph.Org Foundation and contributors.\n\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    * Redistributions of source code must retain the above copyright notice,\n       this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright notice,\n       this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\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\n  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n  POSSIBILITY OF SUCH DAMAGE.*/\n\n#ifndef KISS_FFT_ARMv4_H\n#define KISS_FFT_ARMv4_H\n\n#if !defined(KISS_FFT_GUTS_H)\n#error \"This file should only be included from _kiss_fft_guts.h\"\n#endif\n\n#ifdef FIXED_POINT\n\n#undef C_MUL\n#define C_MUL(m,a,b) \\\n    do{ \\\n       int br__; \\\n       int bi__; \\\n       int tt__; \\\n        __asm__ __volatile__( \\\n            \"#C_MUL\\n\\t\" \\\n            \"ldrsh %[br], [%[bp], #0]\\n\\t\" \\\n            \"ldm %[ap], {r0,r1}\\n\\t\" \\\n            \"ldrsh %[bi], [%[bp], #2]\\n\\t\" \\\n            \"smull %[tt], %[mi], r1, %[br]\\n\\t\" \\\n            \"smlal %[tt], %[mi], r0, %[bi]\\n\\t\" \\\n            \"rsb %[bi], %[bi], #0\\n\\t\" \\\n            \"smull %[br], %[mr], r0, %[br]\\n\\t\" \\\n            \"mov %[tt], %[tt], lsr #15\\n\\t\" \\\n            \"smlal %[br], %[mr], r1, %[bi]\\n\\t\" \\\n            \"orr %[mi], %[tt], %[mi], lsl #17\\n\\t\" \\\n            \"mov %[br], %[br], lsr #15\\n\\t\" \\\n            \"orr %[mr], %[br], %[mr], lsl #17\\n\\t\" \\\n            : [mr]\"=r\"((m).r), [mi]\"=r\"((m).i), \\\n              [br]\"=&r\"(br__), [bi]\"=r\"(bi__), [tt]\"=r\"(tt__) \\\n            : [ap]\"r\"(&(a)), [bp]\"r\"(&(b)) \\\n            : \"r0\", \"r1\" \\\n        ); \\\n    } \\\n    while(0)\n\n#undef C_MUL4\n#define C_MUL4(m,a,b) \\\n    do{ \\\n       int br__; \\\n       int bi__; \\\n       int tt__; \\\n        __asm__ __volatile__( \\\n            \"#C_MUL4\\n\\t\" \\\n            \"ldrsh %[br], [%[bp], #0]\\n\\t\" \\\n            \"ldm %[ap], {r0,r1}\\n\\t\" \\\n            \"ldrsh %[bi], [%[bp], #2]\\n\\t\" \\\n            \"smull %[tt], %[mi], r1, %[br]\\n\\t\" \\\n            \"smlal %[tt], %[mi], r0, %[bi]\\n\\t\" \\\n            \"rsb %[bi], %[bi], #0\\n\\t\" \\\n            \"smull %[br], %[mr], r0, %[br]\\n\\t\" \\\n            \"mov %[tt], %[tt], lsr #17\\n\\t\" \\\n            \"smlal %[br], %[mr], r1, %[bi]\\n\\t\" \\\n            \"orr %[mi], %[tt], %[mi], lsl #15\\n\\t\" \\\n            \"mov %[br], %[br], lsr #17\\n\\t\" \\\n            \"orr %[mr], %[br], %[mr], lsl #15\\n\\t\" \\\n            : [mr]\"=r\"((m).r), [mi]\"=r\"((m).i), \\\n              [br]\"=&r\"(br__), [bi]\"=r\"(bi__), [tt]\"=r\"(tt__) \\\n            : [ap]\"r\"(&(a)), [bp]\"r\"(&(b)) \\\n            : \"r0\", \"r1\" \\\n        ); \\\n    } \\\n    while(0)\n\n#undef C_MULC\n#define C_MULC(m,a,b) \\\n    do{ \\\n       int br__; \\\n       int bi__; \\\n       int tt__; \\\n        __asm__ __volatile__( \\\n            \"#C_MULC\\n\\t\" \\\n            \"ldrsh %[br], [%[bp], #0]\\n\\t\" \\\n            \"ldm %[ap], {r0,r1}\\n\\t\" \\\n            \"ldrsh %[bi], [%[bp], #2]\\n\\t\" \\\n            \"smull %[tt], %[mr], r0, %[br]\\n\\t\" \\\n            \"smlal %[tt], %[mr], r1, %[bi]\\n\\t\" \\\n            \"rsb %[bi], %[bi], #0\\n\\t\" \\\n            \"smull %[br], %[mi], r1, %[br]\\n\\t\" \\\n            \"mov %[tt], %[tt], lsr #15\\n\\t\" \\\n            \"smlal %[br], %[mi], r0, %[bi]\\n\\t\" \\\n            \"orr %[mr], %[tt], %[mr], lsl #17\\n\\t\" \\\n            \"mov %[br], %[br], lsr #15\\n\\t\" \\\n            \"orr %[mi], %[br], %[mi], lsl #17\\n\\t\" \\\n            : [mr]\"=r\"((m).r), [mi]\"=r\"((m).i), \\\n              [br]\"=&r\"(br__), [bi]\"=r\"(bi__), [tt]\"=r\"(tt__) \\\n            : [ap]\"r\"(&(a)), [bp]\"r\"(&(b)) \\\n            : \"r0\", \"r1\" \\\n        ); \\\n    } \\\n    while(0)\n\n#endif /* FIXED_POINT */\n\n#endif /* KISS_FFT_ARMv4_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/arm/kiss_fft_armv5e.h",
    "content": "/*Copyright (c) 2013, Xiph.Org Foundation and contributors.\n\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    * Redistributions of source code must retain the above copyright notice,\n       this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright notice,\n       this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\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\n  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n  POSSIBILITY OF SUCH DAMAGE.*/\n\n#ifndef KISS_FFT_ARMv5E_H\n#define KISS_FFT_ARMv5E_H\n\n#if !defined(KISS_FFT_GUTS_H)\n#error \"This file should only be included from _kiss_fft_guts.h\"\n#endif\n\n#ifdef FIXED_POINT\n\n#if defined(__thumb__)||defined(__thumb2__)\n#define LDRD_CONS \"Q\"\n#else\n#define LDRD_CONS \"Uq\"\n#endif\n\n#undef C_MUL\n#define C_MUL(m,a,b) \\\n    do{ \\\n        int mr1__; \\\n        int mr2__; \\\n        int mi__; \\\n        long long aval__; \\\n        int bval__; \\\n        __asm__( \\\n            \"#C_MUL\\n\\t\" \\\n            \"ldrd %[aval], %H[aval], %[ap]\\n\\t\" \\\n            \"ldr %[bval], %[bp]\\n\\t\" \\\n            \"smulwb %[mi], %H[aval], %[bval]\\n\\t\" \\\n            \"smulwb %[mr1], %[aval], %[bval]\\n\\t\" \\\n            \"smulwt %[mr2], %H[aval], %[bval]\\n\\t\" \\\n            \"smlawt %[mi], %[aval], %[bval], %[mi]\\n\\t\" \\\n            : [mr1]\"=r\"(mr1__), [mr2]\"=r\"(mr2__), [mi]\"=r\"(mi__), \\\n              [aval]\"=&r\"(aval__), [bval]\"=r\"(bval__) \\\n            : [ap]LDRD_CONS(a), [bp]\"m\"(b) \\\n        ); \\\n        (m).r = SHL32(SUB32(mr1__, mr2__), 1); \\\n        (m).i = SHL32(mi__, 1); \\\n    } \\\n    while(0)\n\n#undef C_MUL4\n#define C_MUL4(m,a,b) \\\n    do{ \\\n        int mr1__; \\\n        int mr2__; \\\n        int mi__; \\\n        long long aval__; \\\n        int bval__; \\\n        __asm__( \\\n            \"#C_MUL4\\n\\t\" \\\n            \"ldrd %[aval], %H[aval], %[ap]\\n\\t\" \\\n            \"ldr %[bval], %[bp]\\n\\t\" \\\n            \"smulwb %[mi], %H[aval], %[bval]\\n\\t\" \\\n            \"smulwb %[mr1], %[aval], %[bval]\\n\\t\" \\\n            \"smulwt %[mr2], %H[aval], %[bval]\\n\\t\" \\\n            \"smlawt %[mi], %[aval], %[bval], %[mi]\\n\\t\" \\\n            : [mr1]\"=r\"(mr1__), [mr2]\"=r\"(mr2__), [mi]\"=r\"(mi__), \\\n              [aval]\"=&r\"(aval__), [bval]\"=r\"(bval__) \\\n            : [ap]LDRD_CONS(a), [bp]\"m\"(b) \\\n        ); \\\n        (m).r = SHR32(SUB32(mr1__, mr2__), 1); \\\n        (m).i = SHR32(mi__, 1); \\\n    } \\\n    while(0)\n\n#undef C_MULC\n#define C_MULC(m,a,b) \\\n    do{ \\\n        int mr__; \\\n        int mi1__; \\\n        int mi2__; \\\n        long long aval__; \\\n        int bval__; \\\n        __asm__( \\\n            \"#C_MULC\\n\\t\" \\\n            \"ldrd %[aval], %H[aval], %[ap]\\n\\t\" \\\n            \"ldr %[bval], %[bp]\\n\\t\" \\\n            \"smulwb %[mr], %[aval], %[bval]\\n\\t\" \\\n            \"smulwb %[mi1], %H[aval], %[bval]\\n\\t\" \\\n            \"smulwt %[mi2], %[aval], %[bval]\\n\\t\" \\\n            \"smlawt %[mr], %H[aval], %[bval], %[mr]\\n\\t\" \\\n            : [mr]\"=r\"(mr__), [mi1]\"=r\"(mi1__), [mi2]\"=r\"(mi2__), \\\n              [aval]\"=&r\"(aval__), [bval]\"=r\"(bval__) \\\n            : [ap]LDRD_CONS(a), [bp]\"m\"(b) \\\n        ); \\\n        (m).r = SHL32(mr__, 1); \\\n        (m).i = SHL32(SUB32(mi1__, mi2__), 1); \\\n    } \\\n    while(0)\n\n#endif /* FIXED_POINT */\n\n#endif /* KISS_FFT_GUTS_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/arm/pitch_arm.h",
    "content": "/* Copyright (c) 2010 Xiph.Org Foundation\n * Copyright (c) 2013 Parrot */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#if !defined(PITCH_ARM_H)\n# define PITCH_ARM_H\n\n# include \"armcpu.h\"\n\n# if defined(FIXED_POINT)\n\n#  if defined(OPUS_ARM_MAY_HAVE_NEON)\nopus_val32 celt_pitch_xcorr_neon(const opus_val16 *_x, const opus_val16 *_y,\n    opus_val32 *xcorr, int len, int max_pitch);\n#  endif\n\n#  if defined(OPUS_ARM_MAY_HAVE_MEDIA)\n#   define celt_pitch_xcorr_media MAY_HAVE_EDSP(celt_pitch_xcorr)\n#  endif\n\n#  if defined(OPUS_ARM_MAY_HAVE_EDSP)\nopus_val32 celt_pitch_xcorr_edsp(const opus_val16 *_x, const opus_val16 *_y,\n    opus_val32 *xcorr, int len, int max_pitch);\n#  endif\n\n#  if !defined(OPUS_HAVE_RTCD)\n#   define OVERRIDE_PITCH_XCORR (1)\n#   define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \\\n  ((void)(arch),PRESUME_NEON(celt_pitch_xcorr)(_x, _y, xcorr, len, max_pitch))\n#  endif\n\n# endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/bands.c",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Copyright (c) 2008-2009 Gregory Maxwell\n   Written by Jean-Marc Valin and Gregory Maxwell */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include <math.h>\n#include \"bands.h\"\n#include \"modes.h\"\n#include \"vq.h\"\n#include \"cwrs.h\"\n#include \"stack_alloc.h\"\n#include \"os_support.h\"\n#include \"mathops.h\"\n#include \"rate.h\"\n#include \"quant_bands.h\"\n#include \"pitch.h\"\n\nint hysteresis_decision(opus_val16 val, const opus_val16 *thresholds, const opus_val16 *hysteresis, int N, int prev)\n{\n   int i;\n   for (i=0;i<N;i++)\n   {\n      if (val < thresholds[i])\n         break;\n   }\n   if (i>prev && val < thresholds[prev]+hysteresis[prev])\n      i=prev;\n   if (i<prev && val > thresholds[prev-1]-hysteresis[prev-1])\n      i=prev;\n   return i;\n}\n\nopus_uint32 celt_lcg_rand(opus_uint32 seed)\n{\n   return 1664525 * seed + 1013904223;\n}\n\n/* This is a cos() approximation designed to be bit-exact on any platform. Bit exactness\n   with this approximation is important because it has an impact on the bit allocation */\nstatic opus_int16 bitexact_cos(opus_int16 x)\n{\n   opus_int32 tmp;\n   opus_int16 x2;\n   tmp = (4096+((opus_int32)(x)*(x)))>>13;\n   celt_assert(tmp<=32767);\n   x2 = tmp;\n   x2 = (32767-x2) + FRAC_MUL16(x2, (-7651 + FRAC_MUL16(x2, (8277 + FRAC_MUL16(-626, x2)))));\n   celt_assert(x2<=32766);\n   return 1+x2;\n}\n\nstatic int bitexact_log2tan(int isin,int icos)\n{\n   int lc;\n   int ls;\n   lc=EC_ILOG(icos);\n   ls=EC_ILOG(isin);\n   icos<<=15-lc;\n   isin<<=15-ls;\n   return (ls-lc)*(1<<11)\n         +FRAC_MUL16(isin, FRAC_MUL16(isin, -2597) + 7932)\n         -FRAC_MUL16(icos, FRAC_MUL16(icos, -2597) + 7932);\n}\n\n#ifdef FIXED_POINT\n/* Compute the amplitude (sqrt energy) in each of the bands */\nvoid compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int M)\n{\n   int i, c, N;\n   const opus_int16 *eBands = m->eBands;\n   N = M*m->shortMdctSize;\n   c=0; do {\n      for (i=0;i<end;i++)\n      {\n         int j;\n         opus_val32 maxval=0;\n         opus_val32 sum = 0;\n\n         j=M*eBands[i]; do {\n            maxval = MAX32(maxval, X[j+c*N]);\n            maxval = MAX32(maxval, -X[j+c*N]);\n         } while (++j<M*eBands[i+1]);\n\n         if (maxval > 0)\n         {\n            int shift = celt_ilog2(maxval)-10;\n            j=M*eBands[i]; do {\n               sum = MAC16_16(sum, EXTRACT16(VSHR32(X[j+c*N],shift)),\n                                   EXTRACT16(VSHR32(X[j+c*N],shift)));\n            } while (++j<M*eBands[i+1]);\n            /* We're adding one here to ensure the normalized band isn't larger than unity norm */\n            bandE[i+c*m->nbEBands] = EPSILON+VSHR32(EXTEND32(celt_sqrt(sum)),-shift);\n         } else {\n            bandE[i+c*m->nbEBands] = EPSILON;\n         }\n         /*printf (\"%f \", bandE[i+c*m->nbEBands]);*/\n      }\n   } while (++c<C);\n   /*printf (\"\\n\");*/\n}\n\n/* Normalise each band such that the energy is one. */\nvoid normalise_bands(const CELTMode *m, const celt_sig * OPUS_RESTRICT freq, celt_norm * OPUS_RESTRICT X, const celt_ener *bandE, int end, int C, int M)\n{\n   int i, c, N;\n   const opus_int16 *eBands = m->eBands;\n   N = M*m->shortMdctSize;\n   c=0; do {\n      i=0; do {\n         opus_val16 g;\n         int j,shift;\n         opus_val16 E;\n         shift = celt_zlog2(bandE[i+c*m->nbEBands])-13;\n         E = VSHR32(bandE[i+c*m->nbEBands], shift);\n         g = EXTRACT16(celt_rcp(SHL32(E,3)));\n         j=M*eBands[i]; do {\n            X[j+c*N] = MULT16_16_Q15(VSHR32(freq[j+c*N],shift-1),g);\n         } while (++j<M*eBands[i+1]);\n      } while (++i<end);\n   } while (++c<C);\n}\n\n#else /* FIXED_POINT */\n/* Compute the amplitude (sqrt energy) in each of the bands */\nvoid compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int M)\n{\n   int i, c, N;\n   const opus_int16 *eBands = m->eBands;\n   N = M*m->shortMdctSize;\n   c=0; do {\n      for (i=0;i<end;i++)\n      {\n         int j;\n         opus_val32 sum = 1e-27f;\n         for (j=M*eBands[i];j<M*eBands[i+1];j++)\n            sum += X[j+c*N]*X[j+c*N];\n         bandE[i+c*m->nbEBands] = celt_sqrt(sum);\n         /*printf (\"%f \", bandE[i+c*m->nbEBands]);*/\n      }\n   } while (++c<C);\n   /*printf (\"\\n\");*/\n}\n\n/* Normalise each band such that the energy is one. */\nvoid normalise_bands(const CELTMode *m, const celt_sig * OPUS_RESTRICT freq, celt_norm * OPUS_RESTRICT X, const celt_ener *bandE, int end, int C, int M)\n{\n   int i, c, N;\n   const opus_int16 *eBands = m->eBands;\n   N = M*m->shortMdctSize;\n   c=0; do {\n      for (i=0;i<end;i++)\n      {\n         int j;\n         opus_val16 g = 1.f/(1e-27f+bandE[i+c*m->nbEBands]);\n         for (j=M*eBands[i];j<M*eBands[i+1];j++)\n            X[j+c*N] = freq[j+c*N]*g;\n      }\n   } while (++c<C);\n}\n\n#endif /* FIXED_POINT */\n\n/* De-normalise the energy to produce the synthesis from the unit-energy bands */\nvoid denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X,\n      celt_sig * OPUS_RESTRICT freq, const opus_val16 *bandLogE, int start, int end, int C, int M)\n{\n   int i, c, N;\n   const opus_int16 *eBands = m->eBands;\n   N = M*m->shortMdctSize;\n   celt_assert2(C<=2, \"denormalise_bands() not implemented for >2 channels\");\n   c=0; do {\n      celt_sig * OPUS_RESTRICT f;\n      const celt_norm * OPUS_RESTRICT x;\n      f = freq+c*N;\n      x = X+c*N+M*eBands[start];\n      for (i=0;i<M*eBands[start];i++)\n         *f++ = 0;\n      for (i=start;i<end;i++)\n      {\n         int j, band_end;\n         opus_val16 g;\n         opus_val16 lg;\n#ifdef FIXED_POINT\n         int shift;\n#endif\n         j=M*eBands[i];\n         band_end = M*eBands[i+1];\n         lg = ADD16(bandLogE[i+c*m->nbEBands], SHL16((opus_val16)eMeans[i],6));\n#ifndef FIXED_POINT\n         g = celt_exp2(lg);\n#else\n         /* Handle the integer part of the log energy */\n         shift = 16-(lg>>DB_SHIFT);\n         if (shift>31)\n         {\n            shift=0;\n            g=0;\n         } else {\n            /* Handle the fractional part. */\n            g = celt_exp2_frac(lg&((1<<DB_SHIFT)-1));\n         }\n         /* Handle extreme gains with negative shift. */\n         if (shift<0)\n         {\n            /* For shift < -2 we'd be likely to overflow, so we're capping\n               the gain here. This shouldn't happen unless the bitstream is\n               already corrupted. */\n            if (shift < -2)\n            {\n               g = 32767;\n               shift = -2;\n            }\n            do {\n               *f++ = SHL32(MULT16_16(*x++, g), -shift);\n            } while (++j<band_end);\n         } else\n#endif\n         /* Be careful of the fixed-point \"else\" just above when changing this code */\n         do {\n            *f++ = SHR32(MULT16_16(*x++, g), shift);\n         } while (++j<band_end);\n      }\n      celt_assert(start <= end);\n      for (i=M*eBands[end];i<N;i++)\n         *f++ = 0;\n   } while (++c<C);\n}\n\n/* This prevents energy collapse for transients with multiple short MDCTs */\nvoid anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_masks, int LM, int C, int size,\n      int start, int end, opus_val16 *logE, opus_val16 *prev1logE,\n      opus_val16 *prev2logE, int *pulses, opus_uint32 seed)\n{\n   int c, i, j, k;\n   for (i=start;i<end;i++)\n   {\n      int N0;\n      opus_val16 thresh, sqrt_1;\n      int depth;\n#ifdef FIXED_POINT\n      int shift;\n      opus_val32 thresh32;\n#endif\n\n      N0 = m->eBands[i+1]-m->eBands[i];\n      /* depth in 1/8 bits */\n      depth = (1+pulses[i])/((m->eBands[i+1]-m->eBands[i])<<LM);\n\n#ifdef FIXED_POINT\n      thresh32 = SHR32(celt_exp2(-SHL16(depth, 10-BITRES)),1);\n      thresh = MULT16_32_Q15(QCONST16(0.5f, 15), MIN32(32767,thresh32));\n      {\n         opus_val32 t;\n         t = N0<<LM;\n         shift = celt_ilog2(t)>>1;\n         t = SHL32(t, (7-shift)<<1);\n         sqrt_1 = celt_rsqrt_norm(t);\n      }\n#else\n      thresh = .5f*celt_exp2(-.125f*depth);\n      sqrt_1 = celt_rsqrt(N0<<LM);\n#endif\n\n      c=0; do\n      {\n         celt_norm *X;\n         opus_val16 prev1;\n         opus_val16 prev2;\n         opus_val32 Ediff;\n         opus_val16 r;\n         int renormalize=0;\n         prev1 = prev1logE[c*m->nbEBands+i];\n         prev2 = prev2logE[c*m->nbEBands+i];\n         if (C==1)\n         {\n            prev1 = MAX16(prev1,prev1logE[m->nbEBands+i]);\n            prev2 = MAX16(prev2,prev2logE[m->nbEBands+i]);\n         }\n         Ediff = EXTEND32(logE[c*m->nbEBands+i])-EXTEND32(MIN16(prev1,prev2));\n         Ediff = MAX32(0, Ediff);\n\n#ifdef FIXED_POINT\n         if (Ediff < 16384)\n         {\n            opus_val32 r32 = SHR32(celt_exp2(-EXTRACT16(Ediff)),1);\n            r = 2*MIN16(16383,r32);\n         } else {\n            r = 0;\n         }\n         if (LM==3)\n            r = MULT16_16_Q14(23170, MIN32(23169, r));\n         r = SHR16(MIN16(thresh, r),1);\n         r = SHR32(MULT16_16_Q15(sqrt_1, r),shift);\n#else\n         /* r needs to be multiplied by 2 or 2*sqrt(2) depending on LM because\n            short blocks don't have the same energy as long */\n         r = 2.f*celt_exp2(-Ediff);\n         if (LM==3)\n            r *= 1.41421356f;\n         r = MIN16(thresh, r);\n         r = r*sqrt_1;\n#endif\n         X = X_+c*size+(m->eBands[i]<<LM);\n         for (k=0;k<1<<LM;k++)\n         {\n            /* Detect collapse */\n            if (!(collapse_masks[i*C+c]&1<<k))\n            {\n               /* Fill with noise */\n               for (j=0;j<N0;j++)\n               {\n                  seed = celt_lcg_rand(seed);\n                  X[(j<<LM)+k] = (seed&0x8000 ? r : -r);\n               }\n               renormalize = 1;\n            }\n         }\n         /* We just added some energy, so we need to renormalise */\n         if (renormalize)\n            renormalise_vector(X, N0<<LM, Q15ONE);\n      } while (++c<C);\n   }\n}\n\nstatic void intensity_stereo(const CELTMode *m, celt_norm *X, celt_norm *Y, const celt_ener *bandE, int bandID, int N)\n{\n   int i = bandID;\n   int j;\n   opus_val16 a1, a2;\n   opus_val16 left, right;\n   opus_val16 norm;\n#ifdef FIXED_POINT\n   int shift = celt_zlog2(MAX32(bandE[i], bandE[i+m->nbEBands]))-13;\n#endif\n   left = VSHR32(bandE[i],shift);\n   right = VSHR32(bandE[i+m->nbEBands],shift);\n   norm = EPSILON + celt_sqrt(EPSILON+MULT16_16(left,left)+MULT16_16(right,right));\n   a1 = DIV32_16(SHL32(EXTEND32(left),14),norm);\n   a2 = DIV32_16(SHL32(EXTEND32(right),14),norm);\n   for (j=0;j<N;j++)\n   {\n      celt_norm r, l;\n      l = X[j];\n      r = Y[j];\n      X[j] = MULT16_16_Q14(a1,l) + MULT16_16_Q14(a2,r);\n      /* Side is not encoded, no need to calculate */\n   }\n}\n\nstatic void stereo_split(celt_norm *X, celt_norm *Y, int N)\n{\n   int j;\n   for (j=0;j<N;j++)\n   {\n      celt_norm r, l;\n      l = MULT16_16_Q15(QCONST16(.70710678f,15), X[j]);\n      r = MULT16_16_Q15(QCONST16(.70710678f,15), Y[j]);\n      X[j] = l+r;\n      Y[j] = r-l;\n   }\n}\n\nstatic void stereo_merge(celt_norm *X, celt_norm *Y, opus_val16 mid, int N)\n{\n   int j;\n   opus_val32 xp=0, side=0;\n   opus_val32 El, Er;\n   opus_val16 mid2;\n#ifdef FIXED_POINT\n   int kl, kr;\n#endif\n   opus_val32 t, lgain, rgain;\n\n   /* Compute the norm of X+Y and X-Y as |X|^2 + |Y|^2 +/- sum(xy) */\n   dual_inner_prod(Y, X, Y, N, &xp, &side);\n   /* Compensating for the mid normalization */\n   xp = MULT16_32_Q15(mid, xp);\n   /* mid and side are in Q15, not Q14 like X and Y */\n   mid2 = SHR32(mid, 1);\n   El = MULT16_16(mid2, mid2) + side - 2*xp;\n   Er = MULT16_16(mid2, mid2) + side + 2*xp;\n   if (Er < QCONST32(6e-4f, 28) || El < QCONST32(6e-4f, 28))\n   {\n      for (j=0;j<N;j++)\n         Y[j] = X[j];\n      return;\n   }\n\n#ifdef FIXED_POINT\n   kl = celt_ilog2(El)>>1;\n   kr = celt_ilog2(Er)>>1;\n#endif\n   t = VSHR32(El, (kl-7)<<1);\n   lgain = celt_rsqrt_norm(t);\n   t = VSHR32(Er, (kr-7)<<1);\n   rgain = celt_rsqrt_norm(t);\n\n#ifdef FIXED_POINT\n   if (kl < 7)\n      kl = 7;\n   if (kr < 7)\n      kr = 7;\n#endif\n\n   for (j=0;j<N;j++)\n   {\n      celt_norm r, l;\n      /* Apply mid scaling (side is already scaled) */\n      l = MULT16_16_Q15(mid, X[j]);\n      r = Y[j];\n      X[j] = EXTRACT16(PSHR32(MULT16_16(lgain, SUB16(l,r)), kl+1));\n      Y[j] = EXTRACT16(PSHR32(MULT16_16(rgain, ADD16(l,r)), kr+1));\n   }\n}\n\n/* Decide whether we should spread the pulses in the current frame */\nint spreading_decision(const CELTMode *m, celt_norm *X, int *average,\n      int last_decision, int *hf_average, int *tapset_decision, int update_hf,\n      int end, int C, int M)\n{\n   int i, c, N0;\n   int sum = 0, nbBands=0;\n   const opus_int16 * OPUS_RESTRICT eBands = m->eBands;\n   int decision;\n   int hf_sum=0;\n\n   celt_assert(end>0);\n\n   N0 = M*m->shortMdctSize;\n\n   if (M*(eBands[end]-eBands[end-1]) <= 8)\n      return SPREAD_NONE;\n   c=0; do {\n      for (i=0;i<end;i++)\n      {\n         int j, N, tmp=0;\n         int tcount[3] = {0,0,0};\n         celt_norm * OPUS_RESTRICT x = X+M*eBands[i]+c*N0;\n         N = M*(eBands[i+1]-eBands[i]);\n         if (N<=8)\n            continue;\n         /* Compute rough CDF of |x[j]| */\n         for (j=0;j<N;j++)\n         {\n            opus_val32 x2N; /* Q13 */\n\n            x2N = MULT16_16(MULT16_16_Q15(x[j], x[j]), N);\n            if (x2N < QCONST16(0.25f,13))\n               tcount[0]++;\n            if (x2N < QCONST16(0.0625f,13))\n               tcount[1]++;\n            if (x2N < QCONST16(0.015625f,13))\n               tcount[2]++;\n         }\n\n         /* Only include four last bands (8 kHz and up) */\n         if (i>m->nbEBands-4)\n            hf_sum += 32*(tcount[1]+tcount[0])/N;\n         tmp = (2*tcount[2] >= N) + (2*tcount[1] >= N) + (2*tcount[0] >= N);\n         sum += tmp*256;\n         nbBands++;\n      }\n   } while (++c<C);\n\n   if (update_hf)\n   {\n      if (hf_sum)\n         hf_sum /= C*(4-m->nbEBands+end);\n      *hf_average = (*hf_average+hf_sum)>>1;\n      hf_sum = *hf_average;\n      if (*tapset_decision==2)\n         hf_sum += 4;\n      else if (*tapset_decision==0)\n         hf_sum -= 4;\n      if (hf_sum > 22)\n         *tapset_decision=2;\n      else if (hf_sum > 18)\n         *tapset_decision=1;\n      else\n         *tapset_decision=0;\n   }\n   /*printf(\"%d %d %d\\n\", hf_sum, *hf_average, *tapset_decision);*/\n   celt_assert(nbBands>0); /* end has to be non-zero */\n   sum /= nbBands;\n   /* Recursive averaging */\n   sum = (sum+*average)>>1;\n   *average = sum;\n   /* Hysteresis */\n   sum = (3*sum + (((3-last_decision)<<7) + 64) + 2)>>2;\n   if (sum < 80)\n   {\n      decision = SPREAD_AGGRESSIVE;\n   } else if (sum < 256)\n   {\n      decision = SPREAD_NORMAL;\n   } else if (sum < 384)\n   {\n      decision = SPREAD_LIGHT;\n   } else {\n      decision = SPREAD_NONE;\n   }\n#ifdef FUZZING\n   decision = rand()&0x3;\n   *tapset_decision=rand()%3;\n#endif\n   return decision;\n}\n\n/* Indexing table for converting from natural Hadamard to ordery Hadamard\n   This is essentially a bit-reversed Gray, on top of which we've added\n   an inversion of the order because we want the DC at the end rather than\n   the beginning. The lines are for N=2, 4, 8, 16 */\nstatic const int ordery_table[] = {\n       1,  0,\n       3,  0,  2,  1,\n       7,  0,  4,  3,  6,  1,  5,  2,\n      15,  0,  8,  7, 12,  3, 11,  4, 14,  1,  9,  6, 13,  2, 10,  5,\n};\n\nstatic void deinterleave_hadamard(celt_norm *X, int N0, int stride, int hadamard)\n{\n   int i,j;\n   VARDECL(celt_norm, tmp);\n   int N;\n   SAVE_STACK;\n   N = N0*stride;\n   ALLOC(tmp, N, celt_norm);\n   celt_assert(stride>0);\n   if (hadamard)\n   {\n      const int *ordery = ordery_table+stride-2;\n      for (i=0;i<stride;i++)\n      {\n         for (j=0;j<N0;j++)\n            tmp[ordery[i]*N0+j] = X[j*stride+i];\n      }\n   } else {\n      for (i=0;i<stride;i++)\n         for (j=0;j<N0;j++)\n            tmp[i*N0+j] = X[j*stride+i];\n   }\n   for (j=0;j<N;j++)\n      X[j] = tmp[j];\n   RESTORE_STACK;\n}\n\nstatic void interleave_hadamard(celt_norm *X, int N0, int stride, int hadamard)\n{\n   int i,j;\n   VARDECL(celt_norm, tmp);\n   int N;\n   SAVE_STACK;\n   N = N0*stride;\n   ALLOC(tmp, N, celt_norm);\n   if (hadamard)\n   {\n      const int *ordery = ordery_table+stride-2;\n      for (i=0;i<stride;i++)\n         for (j=0;j<N0;j++)\n            tmp[j*stride+i] = X[ordery[i]*N0+j];\n   } else {\n      for (i=0;i<stride;i++)\n         for (j=0;j<N0;j++)\n            tmp[j*stride+i] = X[i*N0+j];\n   }\n   for (j=0;j<N;j++)\n      X[j] = tmp[j];\n   RESTORE_STACK;\n}\n\nvoid haar1(celt_norm *X, int N0, int stride)\n{\n   int i, j;\n   N0 >>= 1;\n   for (i=0;i<stride;i++)\n      for (j=0;j<N0;j++)\n      {\n         celt_norm tmp1, tmp2;\n         tmp1 = MULT16_16_Q15(QCONST16(.70710678f,15), X[stride*2*j+i]);\n         tmp2 = MULT16_16_Q15(QCONST16(.70710678f,15), X[stride*(2*j+1)+i]);\n         X[stride*2*j+i] = tmp1 + tmp2;\n         X[stride*(2*j+1)+i] = tmp1 - tmp2;\n      }\n}\n\nstatic int compute_qn(int N, int b, int offset, int pulse_cap, int stereo)\n{\n   static const opus_int16 exp2_table8[8] =\n      {16384, 17866, 19483, 21247, 23170, 25267, 27554, 30048};\n   int qn, qb;\n   int N2 = 2*N-1;\n   if (stereo && N==2)\n      N2--;\n   /* The upper limit ensures that in a stereo split with itheta==16384, we'll\n       always have enough bits left over to code at least one pulse in the\n       side; otherwise it would collapse, since it doesn't get folded. */\n   qb = IMIN(b-pulse_cap-(4<<BITRES), (b+N2*offset)/N2);\n\n   qb = IMIN(8<<BITRES, qb);\n\n   if (qb<(1<<BITRES>>1)) {\n      qn = 1;\n   } else {\n      qn = exp2_table8[qb&0x7]>>(14-(qb>>BITRES));\n      qn = (qn+1)>>1<<1;\n   }\n   celt_assert(qn <= 256);\n   return qn;\n}\n\nstruct band_ctx {\n   int encode;\n   const CELTMode *m;\n   int i;\n   int intensity;\n   int spread;\n   int tf_change;\n   ec_ctx *ec;\n   opus_int32 remaining_bits;\n   const celt_ener *bandE;\n   opus_uint32 seed;\n};\n\nstruct split_ctx {\n   int inv;\n   int imid;\n   int iside;\n   int delta;\n   int itheta;\n   int qalloc;\n};\n\nstatic void compute_theta(struct band_ctx *ctx, struct split_ctx *sctx,\n      celt_norm *X, celt_norm *Y, int N, int *b, int B, int B0,\n      int LM,\n      int stereo, int *fill)\n{\n   int qn;\n   int itheta=0;\n   int delta;\n   int imid, iside;\n   int qalloc;\n   int pulse_cap;\n   int offset;\n   opus_int32 tell;\n   int inv=0;\n   int encode;\n   const CELTMode *m;\n   int i;\n   int intensity;\n   ec_ctx *ec;\n   const celt_ener *bandE;\n\n   encode = ctx->encode;\n   m = ctx->m;\n   i = ctx->i;\n   intensity = ctx->intensity;\n   ec = ctx->ec;\n   bandE = ctx->bandE;\n\n   /* Decide on the resolution to give to the split parameter theta */\n   pulse_cap = m->logN[i]+LM*(1<<BITRES);\n   offset = (pulse_cap>>1) - (stereo&&N==2 ? QTHETA_OFFSET_TWOPHASE : QTHETA_OFFSET);\n   qn = compute_qn(N, *b, offset, pulse_cap, stereo);\n   if (stereo && i>=intensity)\n      qn = 1;\n   if (encode)\n   {\n      /* theta is the atan() of the ratio between the (normalized)\n         side and mid. With just that parameter, we can re-scale both\n         mid and side because we know that 1) they have unit norm and\n         2) they are orthogonal. */\n      itheta = stereo_itheta(X, Y, stereo, N);\n   }\n   tell = ec_tell_frac(ec);\n   if (qn!=1)\n   {\n      if (encode)\n         itheta = (itheta*qn+8192)>>14;\n\n      /* Entropy coding of the angle. We use a uniform pdf for the\n         time split, a step for stereo, and a triangular one for the rest. */\n      if (stereo && N>2)\n      {\n         int p0 = 3;\n         int x = itheta;\n         int x0 = qn/2;\n         int ft = p0*(x0+1) + x0;\n         /* Use a probability of p0 up to itheta=8192 and then use 1 after */\n         if (encode)\n         {\n            ec_encode(ec,x<=x0?p0*x:(x-1-x0)+(x0+1)*p0,x<=x0?p0*(x+1):(x-x0)+(x0+1)*p0,ft);\n         } else {\n            int fs;\n            fs=ec_decode(ec,ft);\n            if (fs<(x0+1)*p0)\n               x=fs/p0;\n            else\n               x=x0+1+(fs-(x0+1)*p0);\n            ec_dec_update(ec,x<=x0?p0*x:(x-1-x0)+(x0+1)*p0,x<=x0?p0*(x+1):(x-x0)+(x0+1)*p0,ft);\n            itheta = x;\n         }\n      } else if (B0>1 || stereo) {\n         /* Uniform pdf */\n         if (encode)\n            ec_enc_uint(ec, itheta, qn+1);\n         else\n            itheta = ec_dec_uint(ec, qn+1);\n      } else {\n         int fs=1, ft;\n         ft = ((qn>>1)+1)*((qn>>1)+1);\n         if (encode)\n         {\n            int fl;\n\n            fs = itheta <= (qn>>1) ? itheta + 1 : qn + 1 - itheta;\n            fl = itheta <= (qn>>1) ? itheta*(itheta + 1)>>1 :\n             ft - ((qn + 1 - itheta)*(qn + 2 - itheta)>>1);\n\n            ec_encode(ec, fl, fl+fs, ft);\n         } else {\n            /* Triangular pdf */\n            int fl=0;\n            int fm;\n            fm = ec_decode(ec, ft);\n\n            if (fm < ((qn>>1)*((qn>>1) + 1)>>1))\n            {\n               itheta = (isqrt32(8*(opus_uint32)fm + 1) - 1)>>1;\n               fs = itheta + 1;\n               fl = itheta*(itheta + 1)>>1;\n            }\n            else\n            {\n               itheta = (2*(qn + 1)\n                - isqrt32(8*(opus_uint32)(ft - fm - 1) + 1))>>1;\n               fs = qn + 1 - itheta;\n               fl = ft - ((qn + 1 - itheta)*(qn + 2 - itheta)>>1);\n            }\n\n            ec_dec_update(ec, fl, fl+fs, ft);\n         }\n      }\n      itheta = (opus_int32)itheta*16384/qn;\n      if (encode && stereo)\n      {\n         if (itheta==0)\n            intensity_stereo(m, X, Y, bandE, i, N);\n         else\n            stereo_split(X, Y, N);\n      }\n      /* NOTE: Renormalising X and Y *may* help fixed-point a bit at very high rate.\n               Let's do that at higher complexity */\n   } else if (stereo) {\n      if (encode)\n      {\n         inv = itheta > 8192;\n         if (inv)\n         {\n            int j;\n            for (j=0;j<N;j++)\n               Y[j] = -Y[j];\n         }\n         intensity_stereo(m, X, Y, bandE, i, N);\n      }\n      if (*b>2<<BITRES && ctx->remaining_bits > 2<<BITRES)\n      {\n         if (encode)\n            ec_enc_bit_logp(ec, inv, 2);\n         else\n            inv = ec_dec_bit_logp(ec, 2);\n      } else\n         inv = 0;\n      itheta = 0;\n   }\n   qalloc = ec_tell_frac(ec) - tell;\n   *b -= qalloc;\n\n   if (itheta == 0)\n   {\n      imid = 32767;\n      iside = 0;\n      *fill &= (1<<B)-1;\n      delta = -16384;\n   } else if (itheta == 16384)\n   {\n      imid = 0;\n      iside = 32767;\n      *fill &= ((1<<B)-1)<<B;\n      delta = 16384;\n   } else {\n      imid = bitexact_cos((opus_int16)itheta);\n      iside = bitexact_cos((opus_int16)(16384-itheta));\n      /* This is the mid vs side allocation that minimizes squared error\n         in that band. */\n      delta = FRAC_MUL16((N-1)<<7,bitexact_log2tan(iside,imid));\n   }\n\n   sctx->inv = inv;\n   sctx->imid = imid;\n   sctx->iside = iside;\n   sctx->delta = delta;\n   sctx->itheta = itheta;\n   sctx->qalloc = qalloc;\n}\nstatic unsigned quant_band_n1(struct band_ctx *ctx, celt_norm *X, celt_norm *Y, int b,\n      celt_norm *lowband_out)\n{\n#ifdef RESYNTH\n   int resynth = 1;\n#else\n   int resynth = !ctx->encode;\n#endif\n   int c;\n   int stereo;\n   celt_norm *x = X;\n   int encode;\n   ec_ctx *ec;\n\n   encode = ctx->encode;\n   ec = ctx->ec;\n\n   stereo = Y != NULL;\n   c=0; do {\n      int sign=0;\n      if (ctx->remaining_bits>=1<<BITRES)\n      {\n         if (encode)\n         {\n            sign = x[0]<0;\n            ec_enc_bits(ec, sign, 1);\n         } else {\n            sign = ec_dec_bits(ec, 1);\n         }\n         ctx->remaining_bits -= 1<<BITRES;\n         b-=1<<BITRES;\n      }\n      if (resynth)\n         x[0] = sign ? -NORM_SCALING : NORM_SCALING;\n      x = Y;\n   } while (++c<1+stereo);\n   if (lowband_out)\n      lowband_out[0] = SHR16(X[0],4);\n   return 1;\n}\n\n/* This function is responsible for encoding and decoding a mono partition.\n   It can split the band in two and transmit the energy difference with\n   the two half-bands. It can be called recursively so bands can end up being\n   split in 8 parts. */\nstatic unsigned quant_partition(struct band_ctx *ctx, celt_norm *X,\n      int N, int b, int B, celt_norm *lowband,\n      int LM,\n      opus_val16 gain, int fill)\n{\n   const unsigned char *cache;\n   int q;\n   int curr_bits;\n   int imid=0, iside=0;\n   int B0=B;\n   opus_val16 mid=0, side=0;\n   unsigned cm=0;\n#ifdef RESYNTH\n   int resynth = 1;\n#else\n   int resynth = !ctx->encode;\n#endif\n   celt_norm *Y=NULL;\n   int encode;\n   const CELTMode *m;\n   int i;\n   int spread;\n   ec_ctx *ec;\n\n   encode = ctx->encode;\n   m = ctx->m;\n   i = ctx->i;\n   spread = ctx->spread;\n   ec = ctx->ec;\n\n   /* If we need 1.5 more bit than we can produce, split the band in two. */\n   cache = m->cache.bits + m->cache.index[(LM+1)*m->nbEBands+i];\n   if (LM != -1 && b > cache[cache[0]]+12 && N>2)\n   {\n      int mbits, sbits, delta;\n      int itheta;\n      int qalloc;\n      struct split_ctx sctx;\n      celt_norm *next_lowband2=NULL;\n      opus_int32 rebalance;\n\n      N >>= 1;\n      Y = X+N;\n      LM -= 1;\n      if (B==1)\n         fill = (fill&1)|(fill<<1);\n      B = (B+1)>>1;\n\n      compute_theta(ctx, &sctx, X, Y, N, &b, B, B0,\n            LM, 0, &fill);\n      imid = sctx.imid;\n      iside = sctx.iside;\n      delta = sctx.delta;\n      itheta = sctx.itheta;\n      qalloc = sctx.qalloc;\n#ifdef FIXED_POINT\n      mid = imid;\n      side = iside;\n#else\n      mid = (1.f/32768)*imid;\n      side = (1.f/32768)*iside;\n#endif\n\n      /* Give more bits to low-energy MDCTs than they would otherwise deserve */\n      if (B0>1 && (itheta&0x3fff))\n      {\n         if (itheta > 8192)\n            /* Rough approximation for pre-echo masking */\n            delta -= delta>>(4-LM);\n         else\n            /* Corresponds to a forward-masking slope of 1.5 dB per 10 ms */\n            delta = IMIN(0, delta + (N<<BITRES>>(5-LM)));\n      }\n      mbits = IMAX(0, IMIN(b, (b-delta)/2));\n      sbits = b-mbits;\n      ctx->remaining_bits -= qalloc;\n\n      if (lowband)\n         next_lowband2 = lowband+N; /* >32-bit split case */\n\n      rebalance = ctx->remaining_bits;\n      if (mbits >= sbits)\n      {\n         cm = quant_partition(ctx, X, N, mbits, B,\n               lowband, LM,\n               MULT16_16_P15(gain,mid), fill);\n         rebalance = mbits - (rebalance-ctx->remaining_bits);\n         if (rebalance > 3<<BITRES && itheta!=0)\n            sbits += rebalance - (3<<BITRES);\n         cm |= quant_partition(ctx, Y, N, sbits, B,\n               next_lowband2, LM,\n               MULT16_16_P15(gain,side), fill>>B)<<(B0>>1);\n      } else {\n         cm = quant_partition(ctx, Y, N, sbits, B,\n               next_lowband2, LM,\n               MULT16_16_P15(gain,side), fill>>B)<<(B0>>1);\n         rebalance = sbits - (rebalance-ctx->remaining_bits);\n         if (rebalance > 3<<BITRES && itheta!=16384)\n            mbits += rebalance - (3<<BITRES);\n         cm |= quant_partition(ctx, X, N, mbits, B,\n               lowband, LM,\n               MULT16_16_P15(gain,mid), fill);\n      }\n   } else {\n      /* This is the basic no-split case */\n      q = bits2pulses(m, i, LM, b);\n      curr_bits = pulses2bits(m, i, LM, q);\n      ctx->remaining_bits -= curr_bits;\n\n      /* Ensures we can never bust the budget */\n      while (ctx->remaining_bits < 0 && q > 0)\n      {\n         ctx->remaining_bits += curr_bits;\n         q--;\n         curr_bits = pulses2bits(m, i, LM, q);\n         ctx->remaining_bits -= curr_bits;\n      }\n\n      if (q!=0)\n      {\n         int K = get_pulses(q);\n\n         /* Finally do the actual quantization */\n         if (encode)\n         {\n            cm = alg_quant(X, N, K, spread, B, ec\n#ifdef RESYNTH\n                 , gain\n#endif\n                 );\n         } else {\n            cm = alg_unquant(X, N, K, spread, B, ec, gain);\n         }\n      } else {\n         /* If there's no pulse, fill the band anyway */\n         int j;\n         if (resynth)\n         {\n            unsigned cm_mask;\n            /* B can be as large as 16, so this shift might overflow an int on a\n               16-bit platform; use a long to get defined behavior.*/\n            cm_mask = (unsigned)(1UL<<B)-1;\n            fill &= cm_mask;\n            if (!fill)\n            {\n               for (j=0;j<N;j++)\n                  X[j] = 0;\n            } else {\n               if (lowband == NULL)\n               {\n                  /* Noise */\n                  for (j=0;j<N;j++)\n                  {\n                     ctx->seed = celt_lcg_rand(ctx->seed);\n                     X[j] = (celt_norm)((opus_int32)ctx->seed>>20);\n                  }\n                  cm = cm_mask;\n               } else {\n                  /* Folded spectrum */\n                  for (j=0;j<N;j++)\n                  {\n                     opus_val16 tmp;\n                     ctx->seed = celt_lcg_rand(ctx->seed);\n                     /* About 48 dB below the \"normal\" folding level */\n                     tmp = QCONST16(1.0f/256, 10);\n                     tmp = (ctx->seed)&0x8000 ? tmp : -tmp;\n                     X[j] = lowband[j]+tmp;\n                  }\n                  cm = fill;\n               }\n               renormalise_vector(X, N, gain);\n            }\n         }\n      }\n   }\n\n   return cm;\n}\n\n\n/* This function is responsible for encoding and decoding a band for the mono case. */\nstatic unsigned quant_band(struct band_ctx *ctx, celt_norm *X,\n      int N, int b, int B, celt_norm *lowband,\n      int LM, celt_norm *lowband_out,\n      opus_val16 gain, celt_norm *lowband_scratch, int fill)\n{\n   int N0=N;\n   int N_B=N;\n   int N_B0;\n   int B0=B;\n   int time_divide=0;\n   int recombine=0;\n   int longBlocks;\n   unsigned cm=0;\n#ifdef RESYNTH\n   int resynth = 1;\n#else\n   int resynth = !ctx->encode;\n#endif\n   int k;\n   int encode;\n   int tf_change;\n\n   encode = ctx->encode;\n   tf_change = ctx->tf_change;\n\n   longBlocks = B0==1;\n\n   N_B /= B;\n\n   /* Special case for one sample */\n   if (N==1)\n   {\n      return quant_band_n1(ctx, X, NULL, b, lowband_out);\n   }\n\n   if (tf_change>0)\n      recombine = tf_change;\n   /* Band recombining to increase frequency resolution */\n\n   if (lowband_scratch && lowband && (recombine || ((N_B&1) == 0 && tf_change<0) || B0>1))\n   {\n      int j;\n      for (j=0;j<N;j++)\n         lowband_scratch[j] = lowband[j];\n      lowband = lowband_scratch;\n   }\n\n   for (k=0;k<recombine;k++)\n   {\n      static const unsigned char bit_interleave_table[16]={\n            0,1,1,1,2,3,3,3,2,3,3,3,2,3,3,3\n      };\n      if (encode)\n         haar1(X, N>>k, 1<<k);\n      if (lowband)\n         haar1(lowband, N>>k, 1<<k);\n      fill = bit_interleave_table[fill&0xF]|bit_interleave_table[fill>>4]<<2;\n   }\n   B>>=recombine;\n   N_B<<=recombine;\n\n   /* Increasing the time resolution */\n   while ((N_B&1) == 0 && tf_change<0)\n   {\n      if (encode)\n         haar1(X, N_B, B);\n      if (lowband)\n         haar1(lowband, N_B, B);\n      fill |= fill<<B;\n      B <<= 1;\n      N_B >>= 1;\n      time_divide++;\n      tf_change++;\n   }\n   B0=B;\n   N_B0 = N_B;\n\n   /* Reorganize the samples in time order instead of frequency order */\n   if (B0>1)\n   {\n      if (encode)\n         deinterleave_hadamard(X, N_B>>recombine, B0<<recombine, longBlocks);\n      if (lowband)\n         deinterleave_hadamard(lowband, N_B>>recombine, B0<<recombine, longBlocks);\n   }\n\n   cm = quant_partition(ctx, X, N, b, B, lowband,\n         LM, gain, fill);\n\n   /* This code is used by the decoder and by the resynthesis-enabled encoder */\n   if (resynth)\n   {\n      /* Undo the sample reorganization going from time order to frequency order */\n      if (B0>1)\n         interleave_hadamard(X, N_B>>recombine, B0<<recombine, longBlocks);\n\n      /* Undo time-freq changes that we did earlier */\n      N_B = N_B0;\n      B = B0;\n      for (k=0;k<time_divide;k++)\n      {\n         B >>= 1;\n         N_B <<= 1;\n         cm |= cm>>B;\n         haar1(X, N_B, B);\n      }\n\n      for (k=0;k<recombine;k++)\n      {\n         static const unsigned char bit_deinterleave_table[16]={\n               0x00,0x03,0x0C,0x0F,0x30,0x33,0x3C,0x3F,\n               0xC0,0xC3,0xCC,0xCF,0xF0,0xF3,0xFC,0xFF\n         };\n         cm = bit_deinterleave_table[cm];\n         haar1(X, N0>>k, 1<<k);\n      }\n      B<<=recombine;\n\n      /* Scale output for later folding */\n      if (lowband_out)\n      {\n         int j;\n         opus_val16 n;\n         n = celt_sqrt(SHL32(EXTEND32(N0),22));\n         for (j=0;j<N0;j++)\n            lowband_out[j] = MULT16_16_Q15(n,X[j]);\n      }\n      cm &= (1<<B)-1;\n   }\n   return cm;\n}\n\n\n/* This function is responsible for encoding and decoding a band for the stereo case. */\nstatic unsigned quant_band_stereo(struct band_ctx *ctx, celt_norm *X, celt_norm *Y,\n      int N, int b, int B, celt_norm *lowband,\n      int LM, celt_norm *lowband_out,\n      celt_norm *lowband_scratch, int fill)\n{\n   int imid=0, iside=0;\n   int inv = 0;\n   opus_val16 mid=0, side=0;\n   unsigned cm=0;\n#ifdef RESYNTH\n   int resynth = 1;\n#else\n   int resynth = !ctx->encode;\n#endif\n   int mbits, sbits, delta;\n   int itheta;\n   int qalloc;\n   struct split_ctx sctx;\n   int orig_fill;\n   int encode;\n   ec_ctx *ec;\n\n   encode = ctx->encode;\n   ec = ctx->ec;\n\n   /* Special case for one sample */\n   if (N==1)\n   {\n      return quant_band_n1(ctx, X, Y, b, lowband_out);\n   }\n\n   orig_fill = fill;\n\n   compute_theta(ctx, &sctx, X, Y, N, &b, B, B,\n         LM, 1, &fill);\n   inv = sctx.inv;\n   imid = sctx.imid;\n   iside = sctx.iside;\n   delta = sctx.delta;\n   itheta = sctx.itheta;\n   qalloc = sctx.qalloc;\n#ifdef FIXED_POINT\n   mid = imid;\n   side = iside;\n#else\n   mid = (1.f/32768)*imid;\n   side = (1.f/32768)*iside;\n#endif\n\n   /* This is a special case for N=2 that only works for stereo and takes\n      advantage of the fact that mid and side are orthogonal to encode\n      the side with just one bit. */\n   if (N==2)\n   {\n      int c;\n      int sign=0;\n      celt_norm *x2, *y2;\n      mbits = b;\n      sbits = 0;\n      /* Only need one bit for the side. */\n      if (itheta != 0 && itheta != 16384)\n         sbits = 1<<BITRES;\n      mbits -= sbits;\n      c = itheta > 8192;\n      ctx->remaining_bits -= qalloc+sbits;\n\n      x2 = c ? Y : X;\n      y2 = c ? X : Y;\n      if (sbits)\n      {\n         if (encode)\n         {\n            /* Here we only need to encode a sign for the side. */\n            sign = x2[0]*y2[1] - x2[1]*y2[0] < 0;\n            ec_enc_bits(ec, sign, 1);\n         } else {\n            sign = ec_dec_bits(ec, 1);\n         }\n      }\n      sign = 1-2*sign;\n      /* We use orig_fill here because we want to fold the side, but if\n         itheta==16384, we'll have cleared the low bits of fill. */\n      cm = quant_band(ctx, x2, N, mbits, B, lowband,\n            LM, lowband_out, Q15ONE, lowband_scratch, orig_fill);\n      /* We don't split N=2 bands, so cm is either 1 or 0 (for a fold-collapse),\n         and there's no need to worry about mixing with the other channel. */\n      y2[0] = -sign*x2[1];\n      y2[1] = sign*x2[0];\n      if (resynth)\n      {\n         celt_norm tmp;\n         X[0] = MULT16_16_Q15(mid, X[0]);\n         X[1] = MULT16_16_Q15(mid, X[1]);\n         Y[0] = MULT16_16_Q15(side, Y[0]);\n         Y[1] = MULT16_16_Q15(side, Y[1]);\n         tmp = X[0];\n         X[0] = SUB16(tmp,Y[0]);\n         Y[0] = ADD16(tmp,Y[0]);\n         tmp = X[1];\n         X[1] = SUB16(tmp,Y[1]);\n         Y[1] = ADD16(tmp,Y[1]);\n      }\n   } else {\n      /* \"Normal\" split code */\n      opus_int32 rebalance;\n\n      mbits = IMAX(0, IMIN(b, (b-delta)/2));\n      sbits = b-mbits;\n      ctx->remaining_bits -= qalloc;\n\n      rebalance = ctx->remaining_bits;\n      if (mbits >= sbits)\n      {\n         /* In stereo mode, we do not apply a scaling to the mid because we need the normalized\n            mid for folding later. */\n         cm = quant_band(ctx, X, N, mbits, B,\n               lowband, LM, lowband_out,\n               Q15ONE, lowband_scratch, fill);\n         rebalance = mbits - (rebalance-ctx->remaining_bits);\n         if (rebalance > 3<<BITRES && itheta!=0)\n            sbits += rebalance - (3<<BITRES);\n\n         /* For a stereo split, the high bits of fill are always zero, so no\n            folding will be done to the side. */\n         cm |= quant_band(ctx, Y, N, sbits, B,\n               NULL, LM, NULL,\n               side, NULL, fill>>B);\n      } else {\n         /* For a stereo split, the high bits of fill are always zero, so no\n            folding will be done to the side. */\n         cm = quant_band(ctx, Y, N, sbits, B,\n               NULL, LM, NULL,\n               side, NULL, fill>>B);\n         rebalance = sbits - (rebalance-ctx->remaining_bits);\n         if (rebalance > 3<<BITRES && itheta!=16384)\n            mbits += rebalance - (3<<BITRES);\n         /* In stereo mode, we do not apply a scaling to the mid because we need the normalized\n            mid for folding later. */\n         cm |= quant_band(ctx, X, N, mbits, B,\n               lowband, LM, lowband_out,\n               Q15ONE, lowband_scratch, fill);\n      }\n   }\n\n\n   /* This code is used by the decoder and by the resynthesis-enabled encoder */\n   if (resynth)\n   {\n      if (N!=2)\n         stereo_merge(X, Y, mid, N);\n      if (inv)\n      {\n         int j;\n         for (j=0;j<N;j++)\n            Y[j] = -Y[j];\n      }\n   }\n   return cm;\n}\n\n\nvoid quant_all_bands(int encode, const CELTMode *m, int start, int end,\n      celt_norm *X_, celt_norm *Y_, unsigned char *collapse_masks, const celt_ener *bandE, int *pulses,\n      int shortBlocks, int spread, int dual_stereo, int intensity, int *tf_res,\n      opus_int32 total_bits, opus_int32 balance, ec_ctx *ec, int LM, int codedBands, opus_uint32 *seed)\n{\n   int i;\n   opus_int32 remaining_bits;\n   const opus_int16 * OPUS_RESTRICT eBands = m->eBands;\n   celt_norm * OPUS_RESTRICT norm, * OPUS_RESTRICT norm2;\n   VARDECL(celt_norm, _norm);\n   celt_norm *lowband_scratch;\n   int B;\n   int M;\n   int lowband_offset;\n   int update_lowband = 1;\n   int C = Y_ != NULL ? 2 : 1;\n   int norm_offset;\n#ifdef RESYNTH\n   int resynth = 1;\n#else\n   int resynth = !encode;\n#endif\n   struct band_ctx ctx;\n   SAVE_STACK;\n\n   M = 1<<LM;\n   B = shortBlocks ? M : 1;\n   norm_offset = M*eBands[start];\n   /* No need to allocate norm for the last band because we don't need an\n      output in that band. */\n   ALLOC(_norm, C*(M*eBands[m->nbEBands-1]-norm_offset), celt_norm);\n   norm = _norm;\n   norm2 = norm + M*eBands[m->nbEBands-1]-norm_offset;\n   /* We can use the last band as scratch space because we don't need that\n      scratch space for the last band. */\n   lowband_scratch = X_+M*eBands[m->nbEBands-1];\n\n   lowband_offset = 0;\n   ctx.bandE = bandE;\n   ctx.ec = ec;\n   ctx.encode = encode;\n   ctx.intensity = intensity;\n   ctx.m = m;\n   ctx.seed = *seed;\n   ctx.spread = spread;\n   for (i=start;i<end;i++)\n   {\n      opus_int32 tell;\n      int b;\n      int N;\n      opus_int32 curr_balance;\n      int effective_lowband=-1;\n      celt_norm * OPUS_RESTRICT X, * OPUS_RESTRICT Y;\n      int tf_change=0;\n      unsigned x_cm;\n      unsigned y_cm;\n      int last;\n\n      ctx.i = i;\n      last = (i==end-1);\n\n      X = X_+M*eBands[i];\n      if (Y_!=NULL)\n         Y = Y_+M*eBands[i];\n      else\n         Y = NULL;\n      N = M*eBands[i+1]-M*eBands[i];\n      tell = ec_tell_frac(ec);\n\n      /* Compute how many bits we want to allocate to this band */\n      if (i != start)\n         balance -= tell;\n      remaining_bits = total_bits-tell-1;\n      ctx.remaining_bits = remaining_bits;\n      if (i <= codedBands-1)\n      {\n         curr_balance = balance / IMIN(3, codedBands-i);\n         b = IMAX(0, IMIN(16383, IMIN(remaining_bits+1,pulses[i]+curr_balance)));\n      } else {\n         b = 0;\n      }\n\n      if (resynth && M*eBands[i]-N >= M*eBands[start] && (update_lowband || lowband_offset==0))\n            lowband_offset = i;\n\n      tf_change = tf_res[i];\n      ctx.tf_change = tf_change;\n      if (i>=m->effEBands)\n      {\n         X=norm;\n         if (Y_!=NULL)\n            Y = norm;\n         lowband_scratch = NULL;\n      }\n      if (i==end-1)\n         lowband_scratch = NULL;\n\n      /* Get a conservative estimate of the collapse_mask's for the bands we're\n         going to be folding from. */\n      if (lowband_offset != 0 && (spread!=SPREAD_AGGRESSIVE || B>1 || tf_change<0))\n      {\n         int fold_start;\n         int fold_end;\n         int fold_i;\n         /* This ensures we never repeat spectral content within one band */\n         effective_lowband = IMAX(0, M*eBands[lowband_offset]-norm_offset-N);\n         fold_start = lowband_offset;\n         while(M*eBands[--fold_start] > effective_lowband+norm_offset);\n         fold_end = lowband_offset-1;\n         while(M*eBands[++fold_end] < effective_lowband+norm_offset+N);\n         x_cm = y_cm = 0;\n         fold_i = fold_start; do {\n           x_cm |= collapse_masks[fold_i*C+0];\n           y_cm |= collapse_masks[fold_i*C+C-1];\n         } while (++fold_i<fold_end);\n      }\n      /* Otherwise, we'll be using the LCG to fold, so all blocks will (almost\n         always) be non-zero. */\n      else\n         x_cm = y_cm = (1<<B)-1;\n\n      if (dual_stereo && i==intensity)\n      {\n         int j;\n\n         /* Switch off dual stereo to do intensity. */\n         dual_stereo = 0;\n         if (resynth)\n            for (j=0;j<M*eBands[i]-norm_offset;j++)\n               norm[j] = HALF32(norm[j]+norm2[j]);\n      }\n      if (dual_stereo)\n      {\n         x_cm = quant_band(&ctx, X, N, b/2, B,\n               effective_lowband != -1 ? norm+effective_lowband : NULL, LM,\n               last?NULL:norm+M*eBands[i]-norm_offset, Q15ONE, lowband_scratch, x_cm);\n         y_cm = quant_band(&ctx, Y, N, b/2, B,\n               effective_lowband != -1 ? norm2+effective_lowband : NULL, LM,\n               last?NULL:norm2+M*eBands[i]-norm_offset, Q15ONE, lowband_scratch, y_cm);\n      } else {\n         if (Y!=NULL)\n         {\n            x_cm = quant_band_stereo(&ctx, X, Y, N, b, B,\n                  effective_lowband != -1 ? norm+effective_lowband : NULL, LM,\n                        last?NULL:norm+M*eBands[i]-norm_offset, lowband_scratch, x_cm|y_cm);\n         } else {\n            x_cm = quant_band(&ctx, X, N, b, B,\n                  effective_lowband != -1 ? norm+effective_lowband : NULL, LM,\n                        last?NULL:norm+M*eBands[i]-norm_offset, Q15ONE, lowband_scratch, x_cm|y_cm);\n         }\n         y_cm = x_cm;\n      }\n      collapse_masks[i*C+0] = (unsigned char)x_cm;\n      collapse_masks[i*C+C-1] = (unsigned char)y_cm;\n      balance += pulses[i] + tell;\n\n      /* Update the folding position only as long as we have 1 bit/sample depth. */\n      update_lowband = b>(N<<BITRES);\n   }\n   *seed = ctx.seed;\n\n   RESTORE_STACK;\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/bands.h",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Copyright (c) 2008-2009 Gregory Maxwell\n   Written by Jean-Marc Valin and Gregory Maxwell */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef BANDS_H\n#define BANDS_H\n\n#include \"arch.h\"\n#include \"modes.h\"\n#include \"entenc.h\"\n#include \"entdec.h\"\n#include \"rate.h\"\n\n/** Compute the amplitude (sqrt energy) in each of the bands\n * @param m Mode data\n * @param X Spectrum\n * @param bandE Square root of the energy for each band (returned)\n */\nvoid compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int M);\n\n/*void compute_noise_energies(const CELTMode *m, const celt_sig *X, const opus_val16 *tonality, celt_ener *bandE);*/\n\n/** Normalise each band of X such that the energy in each band is\n    equal to 1\n * @param m Mode data\n * @param X Spectrum (returned normalised)\n * @param bandE Square root of the energy for each band\n */\nvoid normalise_bands(const CELTMode *m, const celt_sig * OPUS_RESTRICT freq, celt_norm * OPUS_RESTRICT X, const celt_ener *bandE, int end, int C, int M);\n\n/** Denormalise each band of X to restore full amplitude\n * @param m Mode data\n * @param X Spectrum (returned de-normalised)\n * @param bandE Square root of the energy for each band\n */\nvoid denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X,\n      celt_sig * OPUS_RESTRICT freq, const opus_val16 *bandE, int start, int end, int C, int M);\n\n#define SPREAD_NONE       (0)\n#define SPREAD_LIGHT      (1)\n#define SPREAD_NORMAL     (2)\n#define SPREAD_AGGRESSIVE (3)\n\nint spreading_decision(const CELTMode *m, celt_norm *X, int *average,\n      int last_decision, int *hf_average, int *tapset_decision, int update_hf,\n      int end, int C, int M);\n\n#ifdef MEASURE_NORM_MSE\nvoid measure_norm_mse(const CELTMode *m, float *X, float *X0, float *bandE, float *bandE0, int M, int N, int C);\n#endif\n\nvoid haar1(celt_norm *X, int N0, int stride);\n\n/** Quantisation/encoding of the residual spectrum\n * @param encode flag that indicates whether we're encoding (1) or decoding (0)\n * @param m Mode data\n * @param start First band to process\n * @param end Last band to process + 1\n * @param X Residual (normalised)\n * @param Y Residual (normalised) for second channel (or NULL for mono)\n * @param collapse_masks Anti-collapse tracking mask\n * @param bandE Square root of the energy for each band\n * @param pulses Bit allocation (per band) for PVQ\n * @param shortBlocks Zero for long blocks, non-zero for short blocks\n * @param spread Amount of spreading to use\n * @param dual_stereo Zero for MS stereo, non-zero for dual stereo\n * @param intensity First band to use intensity stereo\n * @param tf_res Time-frequency resolution change\n * @param total_bits Total number of bits that can be used for the frame (including the ones already spent)\n * @param balance Number of unallocated bits\n * @param en Entropy coder state\n * @param LM log2() of the number of 2.5 subframes in the frame\n * @param codedBands Last band to receive bits + 1\n * @param seed Random generator seed\n */\nvoid quant_all_bands(int encode, const CELTMode *m, int start, int end,\n      celt_norm * X, celt_norm * Y, unsigned char *collapse_masks, const celt_ener *bandE, int *pulses,\n      int shortBlocks, int spread, int dual_stereo, int intensity, int *tf_res,\n      opus_int32 total_bits, opus_int32 balance, ec_ctx *ec, int M, int codedBands, opus_uint32 *seed);\n\nvoid anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_masks, int LM, int C, int size,\n      int start, int end, opus_val16 *logE, opus_val16 *prev1logE,\n      opus_val16 *prev2logE, int *pulses, opus_uint32 seed);\n\nopus_uint32 celt_lcg_rand(opus_uint32 seed);\n\nint hysteresis_decision(opus_val16 val, const opus_val16 *thresholds, const opus_val16 *hysteresis, int N, int prev);\n\n#endif /* BANDS_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/celt.c",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2010 Xiph.Org Foundation\n   Copyright (c) 2008 Gregory Maxwell\n   Written by Jean-Marc Valin and Gregory Maxwell */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#define CELT_C\n\n#include \"os_support.h\"\n#include \"mdct.h\"\n#include <math.h>\n#include \"celt.h\"\n#include \"pitch.h\"\n#include \"bands.h\"\n#include \"modes.h\"\n#include \"entcode.h\"\n#include \"quant_bands.h\"\n#include \"rate.h\"\n#include \"stack_alloc.h\"\n#include \"mathops.h\"\n#include \"float_cast.h\"\n#include <stdarg.h>\n#include \"celt_lpc.h\"\n#include \"vq.h\"\n\n#ifndef PACKAGE_VERSION\n#define PACKAGE_VERSION \"unknown\"\n#endif\n\n\nint resampling_factor(opus_int32 rate)\n{\n   int ret;\n   switch (rate)\n   {\n   case 48000:\n      ret = 1;\n      break;\n   case 24000:\n      ret = 2;\n      break;\n   case 16000:\n      ret = 3;\n      break;\n   case 12000:\n      ret = 4;\n      break;\n   case 8000:\n      ret = 6;\n      break;\n   default:\n#ifndef CUSTOM_MODES\n      celt_assert(0);\n#endif\n      ret = 0;\n      break;\n   }\n   return ret;\n}\n\n#ifndef OVERRIDE_COMB_FILTER_CONST\nstatic void comb_filter_const(opus_val32 *y, opus_val32 *x, int T, int N,\n      opus_val16 g10, opus_val16 g11, opus_val16 g12)\n{\n   opus_val32 x0, x1, x2, x3, x4;\n   int i;\n   x4 = x[-T-2];\n   x3 = x[-T-1];\n   x2 = x[-T];\n   x1 = x[-T+1];\n   for (i=0;i<N;i++)\n   {\n      x0=x[i-T+2];\n      y[i] = x[i]\n               + MULT16_32_Q15(g10,x2)\n               + MULT16_32_Q15(g11,ADD32(x1,x3))\n               + MULT16_32_Q15(g12,ADD32(x0,x4));\n      x4=x3;\n      x3=x2;\n      x2=x1;\n      x1=x0;\n   }\n\n}\n#endif\n\nvoid comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N,\n      opus_val16 g0, opus_val16 g1, int tapset0, int tapset1,\n      const opus_val16 *window, int overlap)\n{\n   int i;\n   /* printf (\"%d %d %f %f\\n\", T0, T1, g0, g1); */\n   opus_val16 g00, g01, g02, g10, g11, g12;\n   opus_val32 x0, x1, x2, x3, x4;\n   static const opus_val16 gains[3][3] = {\n         {QCONST16(0.3066406250f, 15), QCONST16(0.2170410156f, 15), QCONST16(0.1296386719f, 15)},\n         {QCONST16(0.4638671875f, 15), QCONST16(0.2680664062f, 15), QCONST16(0.f, 15)},\n         {QCONST16(0.7998046875f, 15), QCONST16(0.1000976562f, 15), QCONST16(0.f, 15)}};\n\n   if (g0==0 && g1==0)\n   {\n      /* OPT: Happens to work without the OPUS_MOVE(), but only because the current encoder already copies x to y */\n      if (x!=y)\n         OPUS_MOVE(y, x, N);\n      return;\n   }\n   g00 = MULT16_16_Q15(g0, gains[tapset0][0]);\n   g01 = MULT16_16_Q15(g0, gains[tapset0][1]);\n   g02 = MULT16_16_Q15(g0, gains[tapset0][2]);\n   g10 = MULT16_16_Q15(g1, gains[tapset1][0]);\n   g11 = MULT16_16_Q15(g1, gains[tapset1][1]);\n   g12 = MULT16_16_Q15(g1, gains[tapset1][2]);\n   x1 = x[-T1+1];\n   x2 = x[-T1  ];\n   x3 = x[-T1-1];\n   x4 = x[-T1-2];\n   for (i=0;i<overlap;i++)\n   {\n      opus_val16 f;\n      x0=x[i-T1+2];\n      f = MULT16_16_Q15(window[i],window[i]);\n      y[i] = x[i]\n               + MULT16_32_Q15(MULT16_16_Q15((Q15ONE-f),g00),x[i-T0])\n               + MULT16_32_Q15(MULT16_16_Q15((Q15ONE-f),g01),ADD32(x[i-T0+1],x[i-T0-1]))\n               + MULT16_32_Q15(MULT16_16_Q15((Q15ONE-f),g02),ADD32(x[i-T0+2],x[i-T0-2]))\n               + MULT16_32_Q15(MULT16_16_Q15(f,g10),x2)\n               + MULT16_32_Q15(MULT16_16_Q15(f,g11),ADD32(x1,x3))\n               + MULT16_32_Q15(MULT16_16_Q15(f,g12),ADD32(x0,x4));\n      x4=x3;\n      x3=x2;\n      x2=x1;\n      x1=x0;\n\n   }\n   if (g1==0)\n   {\n      /* OPT: Happens to work without the OPUS_MOVE(), but only because the current encoder already copies x to y */\n      if (x!=y)\n         OPUS_MOVE(y+overlap, x+overlap, N-overlap);\n      return;\n   }\n\n   /* Compute the part with the constant filter. */\n   comb_filter_const(y+i, x+i, T1, N-i, g10, g11, g12);\n}\n\nconst signed char tf_select_table[4][8] = {\n      {0, -1, 0, -1,    0,-1, 0,-1},\n      {0, -1, 0, -2,    1, 0, 1,-1},\n      {0, -2, 0, -3,    2, 0, 1,-1},\n      {0, -2, 0, -3,    3, 0, 1,-1},\n};\n\n\nvoid init_caps(const CELTMode *m,int *cap,int LM,int C)\n{\n   int i;\n   for (i=0;i<m->nbEBands;i++)\n   {\n      int N;\n      N=(m->eBands[i+1]-m->eBands[i])<<LM;\n      cap[i] = (m->cache.caps[m->nbEBands*(2*LM+C-1)+i]+64)*C*N>>2;\n   }\n}\n\n\n\nconst char *opus_strerror(int error)\n{\n   static const char * const error_strings[8] = {\n      \"success\",\n      \"invalid argument\",\n      \"buffer too small\",\n      \"internal error\",\n      \"corrupted stream\",\n      \"request not implemented\",\n      \"invalid state\",\n      \"memory allocation failed\"\n   };\n   if (error > 0 || error < -7)\n      return \"unknown error\";\n   else\n      return error_strings[-error];\n}\n\nconst char *opus_get_version_string(void)\n{\n    return \"libopus \" PACKAGE_VERSION\n#ifdef FIXED_POINT\n          \"-fixed\"\n#endif\n#ifdef FUZZING\n          \"-fuzzing\"\n#endif\n          ;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/celt.h",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Copyright (c) 2008 Gregory Maxwell\n   Written by Jean-Marc Valin and Gregory Maxwell */\n/**\n  @file celt.h\n  @brief Contains all the functions for encoding and decoding audio\n */\n\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef CELT_H\n#define CELT_H\n\n#include \"opus_types.h\"\n#include \"opus_defines.h\"\n#include \"opus_custom.h\"\n#include \"entenc.h\"\n#include \"entdec.h\"\n#include \"arch.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define CELTEncoder OpusCustomEncoder\n#define CELTDecoder OpusCustomDecoder\n#define CELTMode OpusCustomMode\n\ntypedef struct {\n   int valid;\n   float tonality;\n   float tonality_slope;\n   float noisiness;\n   float activity;\n   float music_prob;\n   int        bandwidth;\n}AnalysisInfo;\n\n#define __celt_check_mode_ptr_ptr(ptr) ((ptr) + ((ptr) - (const CELTMode**)(ptr)))\n\n#define __celt_check_analysis_ptr(ptr) ((ptr) + ((ptr) - (const AnalysisInfo*)(ptr)))\n\n/* Encoder/decoder Requests */\n\n/* Expose this option again when variable framesize actually works */\n#define OPUS_FRAMESIZE_VARIABLE              5010 /**< Optimize the frame size dynamically */\n\n\n#define CELT_SET_PREDICTION_REQUEST    10002\n/** Controls the use of interframe prediction.\n    0=Independent frames\n    1=Short term interframe prediction allowed\n    2=Long term prediction allowed\n */\n#define CELT_SET_PREDICTION(x) CELT_SET_PREDICTION_REQUEST, __opus_check_int(x)\n\n#define CELT_SET_INPUT_CLIPPING_REQUEST    10004\n#define CELT_SET_INPUT_CLIPPING(x) CELT_SET_INPUT_CLIPPING_REQUEST, __opus_check_int(x)\n\n#define CELT_GET_AND_CLEAR_ERROR_REQUEST   10007\n#define CELT_GET_AND_CLEAR_ERROR(x) CELT_GET_AND_CLEAR_ERROR_REQUEST, __opus_check_int_ptr(x)\n\n#define CELT_SET_CHANNELS_REQUEST    10008\n#define CELT_SET_CHANNELS(x) CELT_SET_CHANNELS_REQUEST, __opus_check_int(x)\n\n\n/* Internal */\n#define CELT_SET_START_BAND_REQUEST    10010\n#define CELT_SET_START_BAND(x) CELT_SET_START_BAND_REQUEST, __opus_check_int(x)\n\n#define CELT_SET_END_BAND_REQUEST    10012\n#define CELT_SET_END_BAND(x) CELT_SET_END_BAND_REQUEST, __opus_check_int(x)\n\n#define CELT_GET_MODE_REQUEST    10015\n/** Get the CELTMode used by an encoder or decoder */\n#define CELT_GET_MODE(x) CELT_GET_MODE_REQUEST, __celt_check_mode_ptr_ptr(x)\n\n#define CELT_SET_SIGNALLING_REQUEST    10016\n#define CELT_SET_SIGNALLING(x) CELT_SET_SIGNALLING_REQUEST, __opus_check_int(x)\n\n#define CELT_SET_TONALITY_REQUEST    10018\n#define CELT_SET_TONALITY(x) CELT_SET_TONALITY_REQUEST, __opus_check_int(x)\n#define CELT_SET_TONALITY_SLOPE_REQUEST    10020\n#define CELT_SET_TONALITY_SLOPE(x) CELT_SET_TONALITY_SLOPE_REQUEST, __opus_check_int(x)\n\n#define CELT_SET_ANALYSIS_REQUEST    10022\n#define CELT_SET_ANALYSIS(x) CELT_SET_ANALYSIS_REQUEST, __celt_check_analysis_ptr(x)\n\n#define OPUS_SET_LFE_REQUEST    10024\n#define OPUS_SET_LFE(x) OPUS_SET_LFE_REQUEST, __opus_check_int(x)\n\n#define OPUS_SET_ENERGY_MASK_REQUEST    10026\n#define OPUS_SET_ENERGY_MASK(x) OPUS_SET_ENERGY_MASK_REQUEST, __opus_check_val16_ptr(x)\n\n/* Encoder stuff */\n\nint celt_encoder_get_size(int channels);\n\nint celt_encode_with_ec(OpusCustomEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc);\n\nint celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels,\n                      int arch);\n\n\n\n/* Decoder stuff */\n\nint celt_decoder_get_size(int channels);\n\n\nint celt_decoder_init(CELTDecoder *st, opus_int32 sampling_rate, int channels);\n\nint celt_decode_with_ec(OpusCustomDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec);\n\n#define celt_encoder_ctl opus_custom_encoder_ctl\n#define celt_decoder_ctl opus_custom_decoder_ctl\n\n\n#ifdef CUSTOM_MODES\n#define OPUS_CUSTOM_NOSTATIC\n#else\n#define OPUS_CUSTOM_NOSTATIC static OPUS_INLINE\n#endif\n\nstatic const unsigned char trim_icdf[11] = {126, 124, 119, 109, 87, 41, 19, 9, 4, 2, 0};\n/* Probs: NONE: 21.875%, LIGHT: 6.25%, NORMAL: 65.625%, AGGRESSIVE: 6.25% */\nstatic const unsigned char spread_icdf[4] = {25, 23, 2, 0};\n\nstatic const unsigned char tapset_icdf[3]={2,1,0};\n\n#ifdef CUSTOM_MODES\nstatic const unsigned char toOpusTable[20] = {\n      0xE0, 0xE8, 0xF0, 0xF8,\n      0xC0, 0xC8, 0xD0, 0xD8,\n      0xA0, 0xA8, 0xB0, 0xB8,\n      0x00, 0x00, 0x00, 0x00,\n      0x80, 0x88, 0x90, 0x98,\n};\n\nstatic const unsigned char fromOpusTable[16] = {\n      0x80, 0x88, 0x90, 0x98,\n      0x40, 0x48, 0x50, 0x58,\n      0x20, 0x28, 0x30, 0x38,\n      0x00, 0x08, 0x10, 0x18\n};\n\nstatic OPUS_INLINE int toOpus(unsigned char c)\n{\n   int ret=0;\n   if (c<0xA0)\n      ret = toOpusTable[c>>3];\n   if (ret == 0)\n      return -1;\n   else\n      return ret|(c&0x7);\n}\n\nstatic OPUS_INLINE int fromOpus(unsigned char c)\n{\n   if (c<0x80)\n      return -1;\n   else\n      return fromOpusTable[(c>>3)-16] | (c&0x7);\n}\n#endif /* CUSTOM_MODES */\n\n#define COMBFILTER_MAXPERIOD 1024\n#define COMBFILTER_MINPERIOD 15\n\nextern const signed char tf_select_table[4][8];\n\nint resampling_factor(opus_int32 rate);\n\nvoid celt_preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RESTRICT inp,\n                        int N, int CC, int upsample, const opus_val16 *coef, celt_sig *mem, int clip);\n\nvoid comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N,\n      opus_val16 g0, opus_val16 g1, int tapset0, int tapset1,\n      const opus_val16 *window, int overlap);\n\nvoid init_caps(const CELTMode *m,int *cap,int LM,int C);\n\n#ifdef RESYNTH\nvoid deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem, celt_sig * OPUS_RESTRICT scratch);\n\nvoid compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig *X,\n      celt_sig * OPUS_RESTRICT out_mem[], int C, int LM);\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* CELT_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/celt_decoder.c",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2010 Xiph.Org Foundation\n   Copyright (c) 2008 Gregory Maxwell\n   Written by Jean-Marc Valin and Gregory Maxwell */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#define CELT_DECODER_C\n\n#include \"cpu_support.h\"\n#include \"os_support.h\"\n#include \"mdct.h\"\n#include <math.h>\n#include \"celt.h\"\n#include \"pitch.h\"\n#include \"bands.h\"\n#include \"modes.h\"\n#include \"entcode.h\"\n#include \"quant_bands.h\"\n#include \"rate.h\"\n#include \"stack_alloc.h\"\n#include \"mathops.h\"\n#include \"float_cast.h\"\n#include <stdarg.h>\n#include \"celt_lpc.h\"\n#include \"vq.h\"\n\n/**********************************************************************/\n/*                                                                    */\n/*                             DECODER                                */\n/*                                                                    */\n/**********************************************************************/\n#define DECODE_BUFFER_SIZE 2048\n\n/** Decoder state\n @brief Decoder state\n */\nstruct OpusCustomDecoder {\n   const OpusCustomMode *mode;\n   int overlap;\n   int channels;\n   int stream_channels;\n\n   int downsample;\n   int start, end;\n   int signalling;\n   int arch;\n\n   /* Everything beyond this point gets cleared on a reset */\n#define DECODER_RESET_START rng\n\n   opus_uint32 rng;\n   int error;\n   int last_pitch_index;\n   int loss_count;\n   int postfilter_period;\n   int postfilter_period_old;\n   opus_val16 postfilter_gain;\n   opus_val16 postfilter_gain_old;\n   int postfilter_tapset;\n   int postfilter_tapset_old;\n\n   celt_sig preemph_memD[2];\n\n   celt_sig _decode_mem[1]; /* Size = channels*(DECODE_BUFFER_SIZE+mode->overlap) */\n   /* opus_val16 lpc[],  Size = channels*LPC_ORDER */\n   /* opus_val16 oldEBands[], Size = 2*mode->nbEBands */\n   /* opus_val16 oldLogE[], Size = 2*mode->nbEBands */\n   /* opus_val16 oldLogE2[], Size = 2*mode->nbEBands */\n   /* opus_val16 backgroundLogE[], Size = 2*mode->nbEBands */\n};\n\nint celt_decoder_get_size(int channels)\n{\n   const CELTMode *mode = opus_custom_mode_create(48000, 960, NULL);\n   return opus_custom_decoder_get_size(mode, channels);\n}\n\nOPUS_CUSTOM_NOSTATIC int opus_custom_decoder_get_size(const CELTMode *mode, int channels)\n{\n   int size = sizeof(struct CELTDecoder)\n            + (channels*(DECODE_BUFFER_SIZE+mode->overlap)-1)*sizeof(celt_sig)\n            + channels*LPC_ORDER*sizeof(opus_val16)\n            + 4*2*mode->nbEBands*sizeof(opus_val16);\n   return size;\n}\n\n#ifdef CUSTOM_MODES\nCELTDecoder *opus_custom_decoder_create(const CELTMode *mode, int channels, int *error)\n{\n   int ret;\n   CELTDecoder *st = (CELTDecoder *)opus_alloc(opus_custom_decoder_get_size(mode, channels));\n   ret = opus_custom_decoder_init(st, mode, channels);\n   if (ret != OPUS_OK)\n   {\n      opus_custom_decoder_destroy(st);\n      st = NULL;\n   }\n   if (error)\n      *error = ret;\n   return st;\n}\n#endif /* CUSTOM_MODES */\n\nint celt_decoder_init(CELTDecoder *st, opus_int32 sampling_rate, int channels)\n{\n   int ret;\n   ret = opus_custom_decoder_init(st, opus_custom_mode_create(48000, 960, NULL), channels);\n   if (ret != OPUS_OK)\n      return ret;\n   st->downsample = resampling_factor(sampling_rate);\n   if (st->downsample==0)\n      return OPUS_BAD_ARG;\n   else\n      return OPUS_OK;\n}\n\nOPUS_CUSTOM_NOSTATIC int opus_custom_decoder_init(CELTDecoder *st, const CELTMode *mode, int channels)\n{\n   if (channels < 0 || channels > 2)\n      return OPUS_BAD_ARG;\n\n   if (st==NULL)\n      return OPUS_ALLOC_FAIL;\n\n   OPUS_CLEAR((char*)st, opus_custom_decoder_get_size(mode, channels));\n\n   st->mode = mode;\n   st->overlap = mode->overlap;\n   st->stream_channels = st->channels = channels;\n\n   st->downsample = 1;\n   st->start = 0;\n   st->end = st->mode->effEBands;\n   st->signalling = 1;\n   st->arch = opus_select_arch();\n\n   st->loss_count = 0;\n\n   opus_custom_decoder_ctl(st, OPUS_RESET_STATE);\n\n   return OPUS_OK;\n}\n\n#ifdef CUSTOM_MODES\nvoid opus_custom_decoder_destroy(CELTDecoder *st)\n{\n   opus_free(st);\n}\n#endif /* CUSTOM_MODES */\n\nstatic OPUS_INLINE opus_val16 SIG2WORD16(celt_sig x)\n{\n#ifdef FIXED_POINT\n   x = PSHR32(x, SIG_SHIFT);\n   x = MAX32(x, -32768);\n   x = MIN32(x, 32767);\n   return EXTRACT16(x);\n#else\n   return (opus_val16)x;\n#endif\n}\n\n#ifndef RESYNTH\nstatic\n#endif\nvoid deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem, celt_sig * OPUS_RESTRICT scratch)\n{\n   int c;\n   int Nd;\n   int apply_downsampling=0;\n   opus_val16 coef0;\n\n   coef0 = coef[0];\n   Nd = N/downsample;\n   c=0; do {\n      int j;\n      celt_sig * OPUS_RESTRICT x;\n      opus_val16  * OPUS_RESTRICT y;\n      celt_sig m = mem[c];\n      x =in[c];\n      y = pcm+c;\n#ifdef CUSTOM_MODES\n      if (coef[1] != 0)\n      {\n         opus_val16 coef1 = coef[1];\n         opus_val16 coef3 = coef[3];\n         for (j=0;j<N;j++)\n         {\n            celt_sig tmp = x[j] + m + VERY_SMALL;\n            m = MULT16_32_Q15(coef0, tmp)\n                          - MULT16_32_Q15(coef1, x[j]);\n            tmp = SHL32(MULT16_32_Q15(coef3, tmp), 2);\n            scratch[j] = tmp;\n         }\n         apply_downsampling=1;\n      } else\n#endif\n      if (downsample>1)\n      {\n         /* Shortcut for the standard (non-custom modes) case */\n         for (j=0;j<N;j++)\n         {\n            celt_sig tmp = x[j] + m + VERY_SMALL;\n            m = MULT16_32_Q15(coef0, tmp);\n            scratch[j] = tmp;\n         }\n         apply_downsampling=1;\n      } else {\n         /* Shortcut for the standard (non-custom modes) case */\n         for (j=0;j<N;j++)\n         {\n            celt_sig tmp = x[j] + m + VERY_SMALL;\n            m = MULT16_32_Q15(coef0, tmp);\n            y[j*C] = SCALEOUT(SIG2WORD16(tmp));\n         }\n      }\n      mem[c] = m;\n\n      if (apply_downsampling)\n      {\n         /* Perform down-sampling */\n         for (j=0;j<Nd;j++)\n            y[j*C] = SCALEOUT(SIG2WORD16(scratch[j*downsample]));\n      }\n   } while (++c<C);\n}\n\n/** Compute the IMDCT and apply window for all sub-frames and\n    all channels in a frame */\n#ifndef RESYNTH\nstatic\n#endif\nvoid compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig *X,\n      celt_sig * OPUS_RESTRICT out_mem[], int C, int LM)\n{\n   int b, c;\n   int B;\n   int N;\n   int shift;\n   const int overlap = OVERLAP(mode);\n\n   if (shortBlocks)\n   {\n      B = shortBlocks;\n      N = mode->shortMdctSize;\n      shift = mode->maxLM;\n   } else {\n      B = 1;\n      N = mode->shortMdctSize<<LM;\n      shift = mode->maxLM-LM;\n   }\n   c=0; do {\n      /* IMDCT on the interleaved the sub-frames, overlap-add is performed by the IMDCT */\n      for (b=0;b<B;b++)\n         clt_mdct_backward(&mode->mdct, &X[b+c*N*B], out_mem[c]+N*b, mode->window, overlap, shift, B);\n   } while (++c<C);\n}\n\nstatic void tf_decode(int start, int end, int isTransient, int *tf_res, int LM, ec_dec *dec)\n{\n   int i, curr, tf_select;\n   int tf_select_rsv;\n   int tf_changed;\n   int logp;\n   opus_uint32 budget;\n   opus_uint32 tell;\n\n   budget = dec->storage*8;\n   tell = ec_tell(dec);\n   logp = isTransient ? 2 : 4;\n   tf_select_rsv = LM>0 && tell+logp+1<=budget;\n   budget -= tf_select_rsv;\n   tf_changed = curr = 0;\n   for (i=start;i<end;i++)\n   {\n      if (tell+logp<=budget)\n      {\n         curr ^= ec_dec_bit_logp(dec, logp);\n         tell = ec_tell(dec);\n         tf_changed |= curr;\n      }\n      tf_res[i] = curr;\n      logp = isTransient ? 4 : 5;\n   }\n   tf_select = 0;\n   if (tf_select_rsv &&\n     tf_select_table[LM][4*isTransient+0+tf_changed] !=\n     tf_select_table[LM][4*isTransient+2+tf_changed])\n   {\n      tf_select = ec_dec_bit_logp(dec, 1);\n   }\n   for (i=start;i<end;i++)\n   {\n      tf_res[i] = tf_select_table[LM][4*isTransient+2*tf_select+tf_res[i]];\n   }\n}\n\n/* The maximum pitch lag to allow in the pitch-based PLC. It's possible to save\n   CPU time in the PLC pitch search by making this smaller than MAX_PERIOD. The\n   current value corresponds to a pitch of 66.67 Hz. */\n#define PLC_PITCH_LAG_MAX (720)\n/* The minimum pitch lag to allow in the pitch-based PLC. This corresponds to a\n   pitch of 480 Hz. */\n#define PLC_PITCH_LAG_MIN (100)\n\nstatic void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, opus_val16 * OPUS_RESTRICT pcm, int N, int LM)\n{\n   int c;\n   int i;\n   const int C = st->channels;\n   celt_sig *decode_mem[2];\n   celt_sig *out_syn[2];\n   opus_val16 *lpc;\n   opus_val16 *oldBandE, *oldLogE, *oldLogE2, *backgroundLogE;\n   const OpusCustomMode *mode;\n   int nbEBands;\n   int overlap;\n   int start;\n   int downsample;\n   int loss_count;\n   int noise_based;\n   const opus_int16 *eBands;\n   VARDECL(celt_sig, scratch);\n   SAVE_STACK;\n\n   mode = st->mode;\n   nbEBands = mode->nbEBands;\n   overlap = mode->overlap;\n   eBands = mode->eBands;\n\n   c=0; do {\n      decode_mem[c] = st->_decode_mem + c*(DECODE_BUFFER_SIZE+overlap);\n      out_syn[c] = decode_mem[c]+DECODE_BUFFER_SIZE-N;\n   } while (++c<C);\n   lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+overlap)*C);\n   oldBandE = lpc+C*LPC_ORDER;\n   oldLogE = oldBandE + 2*nbEBands;\n   oldLogE2 = oldLogE + 2*nbEBands;\n   backgroundLogE = oldLogE2  + 2*nbEBands;\n\n   loss_count = st->loss_count;\n   start = st->start;\n   downsample = st->downsample;\n   noise_based = loss_count >= 5 || start != 0;\n   ALLOC(scratch, noise_based?N*C:N, celt_sig);\n   if (noise_based)\n   {\n      /* Noise-based PLC/CNG */\n      celt_sig *freq;\n      VARDECL(celt_norm, X);\n      opus_uint32 seed;\n      opus_val16 *plcLogE;\n      int end;\n      int effEnd;\n\n      end = st->end;\n      effEnd = IMAX(start, IMIN(end, mode->effEBands));\n\n      /* Share the interleaved signal MDCT coefficient buffer with the\n         deemphasis scratch buffer. */\n      freq = scratch;\n      ALLOC(X, C*N, celt_norm);   /**< Interleaved normalised MDCTs */\n\n      if (loss_count >= 5)\n         plcLogE = backgroundLogE;\n      else {\n         /* Energy decay */\n         opus_val16 decay = loss_count==0 ?\n               QCONST16(1.5f, DB_SHIFT) : QCONST16(.5f, DB_SHIFT);\n         c=0; do\n         {\n            for (i=start;i<end;i++)\n               oldBandE[c*nbEBands+i] -= decay;\n         } while (++c<C);\n         plcLogE = oldBandE;\n      }\n      seed = st->rng;\n      for (c=0;c<C;c++)\n      {\n         for (i=start;i<effEnd;i++)\n         {\n            int j;\n            int boffs;\n            int blen;\n            boffs = N*c+(eBands[i]<<LM);\n            blen = (eBands[i+1]-eBands[i])<<LM;\n            for (j=0;j<blen;j++)\n            {\n               seed = celt_lcg_rand(seed);\n               X[boffs+j] = (celt_norm)((opus_int32)seed>>20);\n            }\n            renormalise_vector(X+boffs, blen, Q15ONE);\n         }\n      }\n      st->rng = seed;\n\n      denormalise_bands(mode, X, freq, plcLogE, start, effEnd, C, 1<<LM);\n\n      c=0; do {\n         int bound = eBands[effEnd]<<LM;\n         if (downsample!=1)\n            bound = IMIN(bound, N/downsample);\n         for (i=bound;i<N;i++)\n            freq[c*N+i] = 0;\n      } while (++c<C);\n      c=0; do {\n         OPUS_MOVE(decode_mem[c], decode_mem[c]+N,\n               DECODE_BUFFER_SIZE-N+(overlap>>1));\n      } while (++c<C);\n      compute_inv_mdcts(mode, 0, freq, out_syn, C, LM);\n   } else {\n      /* Pitch-based PLC */\n      const opus_val16 *window;\n      opus_val16 fade = Q15ONE;\n      int pitch_index;\n      VARDECL(opus_val32, etmp);\n      VARDECL(opus_val16, exc);\n\n      if (loss_count == 0)\n      {\n         VARDECL( opus_val16, lp_pitch_buf );\n         ALLOC( lp_pitch_buf, DECODE_BUFFER_SIZE>>1, opus_val16 );\n         pitch_downsample(decode_mem, lp_pitch_buf,\n               DECODE_BUFFER_SIZE, C, st->arch);\n         pitch_search(lp_pitch_buf+(PLC_PITCH_LAG_MAX>>1), lp_pitch_buf,\n               DECODE_BUFFER_SIZE-PLC_PITCH_LAG_MAX,\n               PLC_PITCH_LAG_MAX-PLC_PITCH_LAG_MIN, &pitch_index, st->arch);\n         pitch_index = PLC_PITCH_LAG_MAX-pitch_index;\n         st->last_pitch_index = pitch_index;\n      } else {\n         pitch_index = st->last_pitch_index;\n         fade = QCONST16(.8f,15);\n      }\n\n      ALLOC(etmp, overlap, opus_val32);\n      ALLOC(exc, MAX_PERIOD, opus_val16);\n      window = mode->window;\n      c=0; do {\n         opus_val16 decay;\n         opus_val16 attenuation;\n         opus_val32 S1=0;\n         celt_sig *buf;\n         int extrapolation_offset;\n         int extrapolation_len;\n         int exc_length;\n         int j;\n\n         buf = decode_mem[c];\n         for (i=0;i<MAX_PERIOD;i++) {\n            exc[i] = ROUND16(buf[DECODE_BUFFER_SIZE-MAX_PERIOD+i], SIG_SHIFT);\n         }\n\n         if (loss_count == 0)\n         {\n            opus_val32 ac[LPC_ORDER+1];\n            /* Compute LPC coefficients for the last MAX_PERIOD samples before\n               the first loss so we can work in the excitation-filter domain. */\n            _celt_autocorr(exc, ac, window, overlap,\n                   LPC_ORDER, MAX_PERIOD, st->arch);\n            /* Add a noise floor of -40 dB. */\n#ifdef FIXED_POINT\n            ac[0] += SHR32(ac[0],13);\n#else\n            ac[0] *= 1.0001f;\n#endif\n            /* Use lag windowing to stabilize the Levinson-Durbin recursion. */\n            for (i=1;i<=LPC_ORDER;i++)\n            {\n               /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/\n#ifdef FIXED_POINT\n               ac[i] -= MULT16_32_Q15(2*i*i, ac[i]);\n#else\n               ac[i] -= ac[i]*(0.008f*0.008f)*i*i;\n#endif\n            }\n            _celt_lpc(lpc+c*LPC_ORDER, ac, LPC_ORDER);\n         }\n         /* We want the excitation for 2 pitch periods in order to look for a\n            decaying signal, but we can't get more than MAX_PERIOD. */\n         exc_length = IMIN(2*pitch_index, MAX_PERIOD);\n         /* Initialize the LPC history with the samples just before the start\n            of the region for which we're computing the excitation. */\n         {\n            opus_val16 lpc_mem[LPC_ORDER];\n            for (i=0;i<LPC_ORDER;i++)\n            {\n               lpc_mem[i] =\n                     ROUND16(buf[DECODE_BUFFER_SIZE-exc_length-1-i], SIG_SHIFT);\n            }\n            /* Compute the excitation for exc_length samples before the loss. */\n            celt_fir(exc+MAX_PERIOD-exc_length, lpc+c*LPC_ORDER,\n                  exc+MAX_PERIOD-exc_length, exc_length, LPC_ORDER, lpc_mem);\n         }\n\n         /* Check if the waveform is decaying, and if so how fast.\n            We do this to avoid adding energy when concealing in a segment\n            with decaying energy. */\n         {\n            opus_val32 E1=1, E2=1;\n            int decay_length;\n#ifdef FIXED_POINT\n            int shift = IMAX(0,2*celt_zlog2(celt_maxabs16(&exc[MAX_PERIOD-exc_length], exc_length))-20);\n#endif\n            decay_length = exc_length>>1;\n            for (i=0;i<decay_length;i++)\n            {\n               opus_val16 e;\n               e = exc[MAX_PERIOD-decay_length+i];\n               E1 += SHR32(MULT16_16(e, e), shift);\n               e = exc[MAX_PERIOD-2*decay_length+i];\n               E2 += SHR32(MULT16_16(e, e), shift);\n            }\n            E1 = MIN32(E1, E2);\n            decay = celt_sqrt(frac_div32(SHR32(E1, 1), E2));\n         }\n\n         /* Move the decoder memory one frame to the left to give us room to\n            add the data for the new frame. We ignore the overlap that extends\n            past the end of the buffer, because we aren't going to use it. */\n         OPUS_MOVE(buf, buf+N, DECODE_BUFFER_SIZE-N);\n\n         /* Extrapolate from the end of the excitation with a period of\n            \"pitch_index\", scaling down each period by an additional factor of\n            \"decay\". */\n         extrapolation_offset = MAX_PERIOD-pitch_index;\n         /* We need to extrapolate enough samples to cover a complete MDCT\n            window (including overlap/2 samples on both sides). */\n         extrapolation_len = N+overlap;\n         /* We also apply fading if this is not the first loss. */\n         attenuation = MULT16_16_Q15(fade, decay);\n         for (i=j=0;i<extrapolation_len;i++,j++)\n         {\n            opus_val16 tmp;\n            if (j >= pitch_index) {\n               j -= pitch_index;\n               attenuation = MULT16_16_Q15(attenuation, decay);\n            }\n            buf[DECODE_BUFFER_SIZE-N+i] =\n                  SHL32(EXTEND32(MULT16_16_Q15(attenuation,\n                        exc[extrapolation_offset+j])), SIG_SHIFT);\n            /* Compute the energy of the previously decoded signal whose\n               excitation we're copying. */\n            tmp = ROUND16(\n                  buf[DECODE_BUFFER_SIZE-MAX_PERIOD-N+extrapolation_offset+j],\n                  SIG_SHIFT);\n            S1 += SHR32(MULT16_16(tmp, tmp), 8);\n         }\n\n         {\n            opus_val16 lpc_mem[LPC_ORDER];\n            /* Copy the last decoded samples (prior to the overlap region) to\n               synthesis filter memory so we can have a continuous signal. */\n            for (i=0;i<LPC_ORDER;i++)\n               lpc_mem[i] = ROUND16(buf[DECODE_BUFFER_SIZE-N-1-i], SIG_SHIFT);\n            /* Apply the synthesis filter to convert the excitation back into\n               the signal domain. */\n            celt_iir(buf+DECODE_BUFFER_SIZE-N, lpc+c*LPC_ORDER,\n                  buf+DECODE_BUFFER_SIZE-N, extrapolation_len, LPC_ORDER,\n                  lpc_mem);\n         }\n\n         /* Check if the synthesis energy is higher than expected, which can\n            happen with the signal changes during our window. If so,\n            attenuate. */\n         {\n            opus_val32 S2=0;\n            for (i=0;i<extrapolation_len;i++)\n            {\n               opus_val16 tmp = ROUND16(buf[DECODE_BUFFER_SIZE-N+i], SIG_SHIFT);\n               S2 += SHR32(MULT16_16(tmp, tmp), 8);\n            }\n            /* This checks for an \"explosion\" in the synthesis. */\n#ifdef FIXED_POINT\n            if (!(S1 > SHR32(S2,2)))\n#else\n            /* The float test is written this way to catch NaNs in the output\n               of the IIR filter at the same time. */\n            if (!(S1 > 0.2f*S2))\n#endif\n            {\n               for (i=0;i<extrapolation_len;i++)\n                  buf[DECODE_BUFFER_SIZE-N+i] = 0;\n            } else if (S1 < S2)\n            {\n               opus_val16 ratio = celt_sqrt(frac_div32(SHR32(S1,1)+1,S2+1));\n               for (i=0;i<overlap;i++)\n               {\n                  opus_val16 tmp_g = Q15ONE\n                        - MULT16_16_Q15(window[i], Q15ONE-ratio);\n                  buf[DECODE_BUFFER_SIZE-N+i] =\n                        MULT16_32_Q15(tmp_g, buf[DECODE_BUFFER_SIZE-N+i]);\n               }\n               for (i=overlap;i<extrapolation_len;i++)\n               {\n                  buf[DECODE_BUFFER_SIZE-N+i] =\n                        MULT16_32_Q15(ratio, buf[DECODE_BUFFER_SIZE-N+i]);\n               }\n            }\n         }\n\n         /* Apply the pre-filter to the MDCT overlap for the next frame because\n            the post-filter will be re-applied in the decoder after the MDCT\n            overlap. */\n         comb_filter(etmp, buf+DECODE_BUFFER_SIZE,\n              st->postfilter_period, st->postfilter_period, overlap,\n              -st->postfilter_gain, -st->postfilter_gain,\n              st->postfilter_tapset, st->postfilter_tapset, NULL, 0);\n\n         /* Simulate TDAC on the concealed audio so that it blends with the\n            MDCT of the next frame. */\n         for (i=0;i<overlap/2;i++)\n         {\n            buf[DECODE_BUFFER_SIZE+i] =\n               MULT16_32_Q15(window[i], etmp[overlap-1-i])\n               + MULT16_32_Q15(window[overlap-i-1], etmp[i]);\n         }\n      } while (++c<C);\n   }\n\n   deemphasis(out_syn, pcm, N, C, downsample,\n         mode->preemph, st->preemph_memD, scratch);\n\n   st->loss_count = loss_count+1;\n\n   RESTORE_STACK;\n}\n\nint celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec)\n{\n   int c, i, N;\n   int spread_decision;\n   opus_int32 bits;\n   ec_dec _dec;\n   VARDECL(celt_sig, freq);\n   VARDECL(celt_norm, X);\n   VARDECL(int, fine_quant);\n   VARDECL(int, pulses);\n   VARDECL(int, cap);\n   VARDECL(int, offsets);\n   VARDECL(int, fine_priority);\n   VARDECL(int, tf_res);\n   VARDECL(unsigned char, collapse_masks);\n   celt_sig *decode_mem[2];\n   celt_sig *out_syn[2];\n   opus_val16 *lpc;\n   opus_val16 *oldBandE, *oldLogE, *oldLogE2, *backgroundLogE;\n\n   int shortBlocks;\n   int isTransient;\n   int intra_ener;\n   const int CC = st->channels;\n   int LM, M;\n   int effEnd;\n   int codedBands;\n   int alloc_trim;\n   int postfilter_pitch;\n   opus_val16 postfilter_gain;\n   int intensity=0;\n   int dual_stereo=0;\n   opus_int32 total_bits;\n   opus_int32 balance;\n   opus_int32 tell;\n   int dynalloc_logp;\n   int postfilter_tapset;\n   int anti_collapse_rsv;\n   int anti_collapse_on=0;\n   int silence;\n   int C = st->stream_channels;\n   const OpusCustomMode *mode;\n   int nbEBands;\n   int overlap;\n   const opus_int16 *eBands;\n   ALLOC_STACK;\n\n   mode = st->mode;\n   nbEBands = mode->nbEBands;\n   overlap = mode->overlap;\n   eBands = mode->eBands;\n   frame_size *= st->downsample;\n\n   c=0; do {\n      decode_mem[c] = st->_decode_mem + c*(DECODE_BUFFER_SIZE+overlap);\n   } while (++c<CC);\n   lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+overlap)*CC);\n   oldBandE = lpc+CC*LPC_ORDER;\n   oldLogE = oldBandE + 2*nbEBands;\n   oldLogE2 = oldLogE + 2*nbEBands;\n   backgroundLogE = oldLogE2  + 2*nbEBands;\n\n#ifdef CUSTOM_MODES\n   if (st->signalling && data!=NULL)\n   {\n      int data0=data[0];\n      /* Convert \"standard mode\" to Opus header */\n      if (mode->Fs==48000 && mode->shortMdctSize==120)\n      {\n         data0 = fromOpus(data0);\n         if (data0<0)\n            return OPUS_INVALID_PACKET;\n      }\n      st->end = IMAX(1, mode->effEBands-2*(data0>>5));\n      LM = (data0>>3)&0x3;\n      C = 1 + ((data0>>2)&0x1);\n      data++;\n      len--;\n      if (LM>mode->maxLM)\n         return OPUS_INVALID_PACKET;\n      if (frame_size < mode->shortMdctSize<<LM)\n         return OPUS_BUFFER_TOO_SMALL;\n      else\n         frame_size = mode->shortMdctSize<<LM;\n   } else {\n#else\n   {\n#endif\n      for (LM=0;LM<=mode->maxLM;LM++)\n         if (mode->shortMdctSize<<LM==frame_size)\n            break;\n      if (LM>mode->maxLM)\n         return OPUS_BAD_ARG;\n   }\n   M=1<<LM;\n\n   if (len<0 || len>1275 || pcm==NULL)\n      return OPUS_BAD_ARG;\n\n   N = M*mode->shortMdctSize;\n\n   effEnd = st->end;\n   if (effEnd > mode->effEBands)\n      effEnd = mode->effEBands;\n\n   if (data == NULL || len<=1)\n   {\n      celt_decode_lost(st, pcm, N, LM);\n      RESTORE_STACK;\n      return frame_size/st->downsample;\n   }\n\n   if (dec == NULL)\n   {\n      ec_dec_init(&_dec,(unsigned char*)data,len);\n      dec = &_dec;\n   }\n\n   if (C==1)\n   {\n      for (i=0;i<nbEBands;i++)\n         oldBandE[i]=MAX16(oldBandE[i],oldBandE[nbEBands+i]);\n   }\n\n   total_bits = len*8;\n   tell = ec_tell(dec);\n\n   if (tell >= total_bits)\n      silence = 1;\n   else if (tell==1)\n      silence = ec_dec_bit_logp(dec, 15);\n   else\n      silence = 0;\n   if (silence)\n   {\n      /* Pretend we've read all the remaining bits */\n      tell = len*8;\n      dec->nbits_total+=tell-ec_tell(dec);\n   }\n\n   postfilter_gain = 0;\n   postfilter_pitch = 0;\n   postfilter_tapset = 0;\n   if (st->start==0 && tell+16 <= total_bits)\n   {\n      if(ec_dec_bit_logp(dec, 1))\n      {\n         int qg, octave;\n         octave = ec_dec_uint(dec, 6);\n         postfilter_pitch = (16<<octave)+ec_dec_bits(dec, 4+octave)-1;\n         qg = ec_dec_bits(dec, 3);\n         if (ec_tell(dec)+2<=total_bits)\n            postfilter_tapset = ec_dec_icdf(dec, tapset_icdf, 2);\n         postfilter_gain = QCONST16(.09375f,15)*(qg+1);\n      }\n      tell = ec_tell(dec);\n   }\n\n   if (LM > 0 && tell+3 <= total_bits)\n   {\n      isTransient = ec_dec_bit_logp(dec, 3);\n      tell = ec_tell(dec);\n   }\n   else\n      isTransient = 0;\n\n   if (isTransient)\n      shortBlocks = M;\n   else\n      shortBlocks = 0;\n\n   /* Decode the global flags (first symbols in the stream) */\n   intra_ener = tell+3<=total_bits ? ec_dec_bit_logp(dec, 3) : 0;\n   /* Get band energies */\n   unquant_coarse_energy(mode, st->start, st->end, oldBandE,\n         intra_ener, dec, C, LM);\n\n   ALLOC(tf_res, nbEBands, int);\n   tf_decode(st->start, st->end, isTransient, tf_res, LM, dec);\n\n   tell = ec_tell(dec);\n   spread_decision = SPREAD_NORMAL;\n   if (tell+4 <= total_bits)\n      spread_decision = ec_dec_icdf(dec, spread_icdf, 5);\n\n   ALLOC(cap, nbEBands, int);\n\n   init_caps(mode,cap,LM,C);\n\n   ALLOC(offsets, nbEBands, int);\n\n   dynalloc_logp = 6;\n   total_bits<<=BITRES;\n   tell = ec_tell_frac(dec);\n   for (i=st->start;i<st->end;i++)\n   {\n      int width, quanta;\n      int dynalloc_loop_logp;\n      int boost;\n      width = C*(eBands[i+1]-eBands[i])<<LM;\n      /* quanta is 6 bits, but no more than 1 bit/sample\n         and no less than 1/8 bit/sample */\n      quanta = IMIN(width<<BITRES, IMAX(6<<BITRES, width));\n      dynalloc_loop_logp = dynalloc_logp;\n      boost = 0;\n      while (tell+(dynalloc_loop_logp<<BITRES) < total_bits && boost < cap[i])\n      {\n         int flag;\n         flag = ec_dec_bit_logp(dec, dynalloc_loop_logp);\n         tell = ec_tell_frac(dec);\n         if (!flag)\n            break;\n         boost += quanta;\n         total_bits -= quanta;\n         dynalloc_loop_logp = 1;\n      }\n      offsets[i] = boost;\n      /* Making dynalloc more likely */\n      if (boost>0)\n         dynalloc_logp = IMAX(2, dynalloc_logp-1);\n   }\n\n   ALLOC(fine_quant, nbEBands, int);\n   alloc_trim = tell+(6<<BITRES) <= total_bits ?\n         ec_dec_icdf(dec, trim_icdf, 7) : 5;\n\n   bits = (((opus_int32)len*8)<<BITRES) - ec_tell_frac(dec) - 1;\n   anti_collapse_rsv = isTransient&&LM>=2&&bits>=((LM+2)<<BITRES) ? (1<<BITRES) : 0;\n   bits -= anti_collapse_rsv;\n\n   ALLOC(pulses, nbEBands, int);\n   ALLOC(fine_priority, nbEBands, int);\n\n   codedBands = compute_allocation(mode, st->start, st->end, offsets, cap,\n         alloc_trim, &intensity, &dual_stereo, bits, &balance, pulses,\n         fine_quant, fine_priority, C, LM, dec, 0, 0, 0);\n\n   unquant_fine_energy(mode, st->start, st->end, oldBandE, fine_quant, dec, C);\n\n   /* Decode fixed codebook */\n   ALLOC(collapse_masks, C*nbEBands, unsigned char);\n   ALLOC(X, C*N, celt_norm);   /**< Interleaved normalised MDCTs */\n\n   quant_all_bands(0, mode, st->start, st->end, X, C==2 ? X+N : NULL, collapse_masks,\n         NULL, pulses, shortBlocks, spread_decision, dual_stereo, intensity, tf_res,\n         len*(8<<BITRES)-anti_collapse_rsv, balance, dec, LM, codedBands, &st->rng);\n\n   if (anti_collapse_rsv > 0)\n   {\n      anti_collapse_on = ec_dec_bits(dec, 1);\n   }\n\n   unquant_energy_finalise(mode, st->start, st->end, oldBandE,\n         fine_quant, fine_priority, len*8-ec_tell(dec), dec, C);\n\n   if (anti_collapse_on)\n      anti_collapse(mode, X, collapse_masks, LM, C, N,\n            st->start, st->end, oldBandE, oldLogE, oldLogE2, pulses, st->rng);\n\n   ALLOC(freq, IMAX(CC,C)*N, celt_sig); /**< Interleaved signal MDCTs */\n\n   if (silence)\n   {\n      for (i=0;i<C*nbEBands;i++)\n         oldBandE[i] = -QCONST16(28.f,DB_SHIFT);\n      for (i=0;i<C*N;i++)\n         freq[i] = 0;\n   } else {\n      /* Synthesis */\n      denormalise_bands(mode, X, freq, oldBandE, st->start, effEnd, C, M);\n   }\n   c=0; do {\n      OPUS_MOVE(decode_mem[c], decode_mem[c]+N, DECODE_BUFFER_SIZE-N+overlap/2);\n   } while (++c<CC);\n\n   c=0; do {\n      int bound = M*eBands[effEnd];\n      if (st->downsample!=1)\n         bound = IMIN(bound, N/st->downsample);\n      for (i=bound;i<N;i++)\n         freq[c*N+i] = 0;\n   } while (++c<C);\n\n   c=0; do {\n      out_syn[c] = decode_mem[c]+DECODE_BUFFER_SIZE-N;\n   } while (++c<CC);\n\n   if (CC==2&&C==1)\n   {\n      for (i=0;i<N;i++)\n         freq[N+i] = freq[i];\n   }\n   if (CC==1&&C==2)\n   {\n      for (i=0;i<N;i++)\n         freq[i] = HALF32(ADD32(freq[i],freq[N+i]));\n   }\n\n   /* Compute inverse MDCTs */\n   compute_inv_mdcts(mode, shortBlocks, freq, out_syn, CC, LM);\n\n   c=0; do {\n      st->postfilter_period=IMAX(st->postfilter_period, COMBFILTER_MINPERIOD);\n      st->postfilter_period_old=IMAX(st->postfilter_period_old, COMBFILTER_MINPERIOD);\n      comb_filter(out_syn[c], out_syn[c], st->postfilter_period_old, st->postfilter_period, mode->shortMdctSize,\n            st->postfilter_gain_old, st->postfilter_gain, st->postfilter_tapset_old, st->postfilter_tapset,\n            mode->window, overlap);\n      if (LM!=0)\n         comb_filter(out_syn[c]+mode->shortMdctSize, out_syn[c]+mode->shortMdctSize, st->postfilter_period, postfilter_pitch, N-mode->shortMdctSize,\n               st->postfilter_gain, postfilter_gain, st->postfilter_tapset, postfilter_tapset,\n               mode->window, overlap);\n\n   } while (++c<CC);\n   st->postfilter_period_old = st->postfilter_period;\n   st->postfilter_gain_old = st->postfilter_gain;\n   st->postfilter_tapset_old = st->postfilter_tapset;\n   st->postfilter_period = postfilter_pitch;\n   st->postfilter_gain = postfilter_gain;\n   st->postfilter_tapset = postfilter_tapset;\n   if (LM!=0)\n   {\n      st->postfilter_period_old = st->postfilter_period;\n      st->postfilter_gain_old = st->postfilter_gain;\n      st->postfilter_tapset_old = st->postfilter_tapset;\n   }\n\n   if (C==1) {\n      for (i=0;i<nbEBands;i++)\n         oldBandE[nbEBands+i]=oldBandE[i];\n   }\n\n   /* In case start or end were to change */\n   if (!isTransient)\n   {\n      for (i=0;i<2*nbEBands;i++)\n         oldLogE2[i] = oldLogE[i];\n      for (i=0;i<2*nbEBands;i++)\n         oldLogE[i] = oldBandE[i];\n      for (i=0;i<2*nbEBands;i++)\n         backgroundLogE[i] = MIN16(backgroundLogE[i] + M*QCONST16(0.001f,DB_SHIFT), oldBandE[i]);\n   } else {\n      for (i=0;i<2*nbEBands;i++)\n         oldLogE[i] = MIN16(oldLogE[i], oldBandE[i]);\n   }\n   c=0; do\n   {\n      for (i=0;i<st->start;i++)\n      {\n         oldBandE[c*nbEBands+i]=0;\n         oldLogE[c*nbEBands+i]=oldLogE2[c*nbEBands+i]=-QCONST16(28.f,DB_SHIFT);\n      }\n      for (i=st->end;i<nbEBands;i++)\n      {\n         oldBandE[c*nbEBands+i]=0;\n         oldLogE[c*nbEBands+i]=oldLogE2[c*nbEBands+i]=-QCONST16(28.f,DB_SHIFT);\n      }\n   } while (++c<2);\n   st->rng = dec->rng;\n\n   /* We reuse freq[] as scratch space for the de-emphasis */\n   deemphasis(out_syn, pcm, N, CC, st->downsample, mode->preemph, st->preemph_memD, freq);\n   st->loss_count = 0;\n   RESTORE_STACK;\n   if (ec_tell(dec) > 8*len)\n      return OPUS_INTERNAL_ERROR;\n   if(ec_get_error(dec))\n      st->error = 1;\n   return frame_size/st->downsample;\n}\n\n\n#ifdef CUSTOM_MODES\n\n#ifdef FIXED_POINT\nint opus_custom_decode(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_int16 * OPUS_RESTRICT pcm, int frame_size)\n{\n   return celt_decode_with_ec(st, data, len, pcm, frame_size, NULL);\n}\n\n#ifndef DISABLE_FLOAT_API\nint opus_custom_decode_float(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, float * OPUS_RESTRICT pcm, int frame_size)\n{\n   int j, ret, C, N;\n   VARDECL(opus_int16, out);\n   ALLOC_STACK;\n\n   if (pcm==NULL)\n      return OPUS_BAD_ARG;\n\n   C = st->channels;\n   N = frame_size;\n\n   ALLOC(out, C*N, opus_int16);\n   ret=celt_decode_with_ec(st, data, len, out, frame_size, NULL);\n   if (ret>0)\n      for (j=0;j<C*ret;j++)\n         pcm[j]=out[j]*(1.f/32768.f);\n\n   RESTORE_STACK;\n   return ret;\n}\n#endif /* DISABLE_FLOAT_API */\n\n#else\n\nint opus_custom_decode_float(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, float * OPUS_RESTRICT pcm, int frame_size)\n{\n   return celt_decode_with_ec(st, data, len, pcm, frame_size, NULL);\n}\n\nint opus_custom_decode(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_int16 * OPUS_RESTRICT pcm, int frame_size)\n{\n   int j, ret, C, N;\n   VARDECL(celt_sig, out);\n   ALLOC_STACK;\n\n   if (pcm==NULL)\n      return OPUS_BAD_ARG;\n\n   C = st->channels;\n   N = frame_size;\n   ALLOC(out, C*N, celt_sig);\n\n   ret=celt_decode_with_ec(st, data, len, out, frame_size, NULL);\n\n   if (ret>0)\n      for (j=0;j<C*ret;j++)\n         pcm[j] = FLOAT2INT16 (out[j]);\n\n   RESTORE_STACK;\n   return ret;\n}\n\n#endif\n#endif /* CUSTOM_MODES */\n\nint opus_custom_decoder_ctl(CELTDecoder * OPUS_RESTRICT st, int request, ...)\n{\n   va_list ap;\n\n   va_start(ap, request);\n   switch (request)\n   {\n      case CELT_SET_START_BAND_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         if (value<0 || value>=st->mode->nbEBands)\n            goto bad_arg;\n         st->start = value;\n      }\n      break;\n      case CELT_SET_END_BAND_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         if (value<1 || value>st->mode->nbEBands)\n            goto bad_arg;\n         st->end = value;\n      }\n      break;\n      case CELT_SET_CHANNELS_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         if (value<1 || value>2)\n            goto bad_arg;\n         st->stream_channels = value;\n      }\n      break;\n      case CELT_GET_AND_CLEAR_ERROR_REQUEST:\n      {\n         opus_int32 *value = va_arg(ap, opus_int32*);\n         if (value==NULL)\n            goto bad_arg;\n         *value=st->error;\n         st->error = 0;\n      }\n      break;\n      case OPUS_GET_LOOKAHEAD_REQUEST:\n      {\n         opus_int32 *value = va_arg(ap, opus_int32*);\n         if (value==NULL)\n            goto bad_arg;\n         *value = st->overlap/st->downsample;\n      }\n      break;\n      case OPUS_RESET_STATE:\n      {\n         int i;\n         opus_val16 *lpc, *oldBandE, *oldLogE, *oldLogE2;\n         lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+st->overlap)*st->channels);\n         oldBandE = lpc+st->channels*LPC_ORDER;\n         oldLogE = oldBandE + 2*st->mode->nbEBands;\n         oldLogE2 = oldLogE + 2*st->mode->nbEBands;\n         OPUS_CLEAR((char*)&st->DECODER_RESET_START,\n               opus_custom_decoder_get_size(st->mode, st->channels)-\n               ((char*)&st->DECODER_RESET_START - (char*)st));\n         for (i=0;i<2*st->mode->nbEBands;i++)\n            oldLogE[i]=oldLogE2[i]=-QCONST16(28.f,DB_SHIFT);\n      }\n      break;\n      case OPUS_GET_PITCH_REQUEST:\n      {\n         opus_int32 *value = va_arg(ap, opus_int32*);\n         if (value==NULL)\n            goto bad_arg;\n         *value = st->postfilter_period;\n      }\n      break;\n      case CELT_GET_MODE_REQUEST:\n      {\n         const CELTMode ** value = va_arg(ap, const CELTMode**);\n         if (value==0)\n            goto bad_arg;\n         *value=st->mode;\n      }\n      break;\n      case CELT_SET_SIGNALLING_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         st->signalling = value;\n      }\n      break;\n      case OPUS_GET_FINAL_RANGE_REQUEST:\n      {\n         opus_uint32 * value = va_arg(ap, opus_uint32 *);\n         if (value==0)\n            goto bad_arg;\n         *value=st->rng;\n      }\n      break;\n      default:\n         goto bad_request;\n   }\n   va_end(ap);\n   return OPUS_OK;\nbad_arg:\n   va_end(ap);\n   return OPUS_BAD_ARG;\nbad_request:\n      va_end(ap);\n  return OPUS_UNIMPLEMENTED;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/celt_encoder.c",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2010 Xiph.Org Foundation\n   Copyright (c) 2008 Gregory Maxwell\n   Written by Jean-Marc Valin and Gregory Maxwell */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#define CELT_ENCODER_C\n\n#include \"cpu_support.h\"\n#include \"os_support.h\"\n#include \"mdct.h\"\n#include <math.h>\n#include \"celt.h\"\n#include \"pitch.h\"\n#include \"bands.h\"\n#include \"modes.h\"\n#include \"entcode.h\"\n#include \"quant_bands.h\"\n#include \"rate.h\"\n#include \"stack_alloc.h\"\n#include \"mathops.h\"\n#include \"float_cast.h\"\n#include <stdarg.h>\n#include \"celt_lpc.h\"\n#include \"vq.h\"\n\n\n/** Encoder state\n @brief Encoder state\n */\nstruct OpusCustomEncoder {\n   const OpusCustomMode *mode;     /**< Mode used by the encoder */\n   int overlap;\n   int channels;\n   int stream_channels;\n\n   int force_intra;\n   int clip;\n   int disable_pf;\n   int complexity;\n   int upsample;\n   int start, end;\n\n   opus_int32 bitrate;\n   int vbr;\n   int signalling;\n   int constrained_vbr;      /* If zero, VBR can do whatever it likes with the rate */\n   int loss_rate;\n   int lsb_depth;\n   int variable_duration;\n   int lfe;\n   int arch;\n\n   /* Everything beyond this point gets cleared on a reset */\n#define ENCODER_RESET_START rng\n\n   opus_uint32 rng;\n   int spread_decision;\n   opus_val32 delayedIntra;\n   int tonal_average;\n   int lastCodedBands;\n   int hf_average;\n   int tapset_decision;\n\n   int prefilter_period;\n   opus_val16 prefilter_gain;\n   int prefilter_tapset;\n#ifdef RESYNTH\n   int prefilter_period_old;\n   opus_val16 prefilter_gain_old;\n   int prefilter_tapset_old;\n#endif\n   int consec_transient;\n   AnalysisInfo analysis;\n\n   opus_val32 preemph_memE[2];\n   opus_val32 preemph_memD[2];\n\n   /* VBR-related parameters */\n   opus_int32 vbr_reservoir;\n   opus_int32 vbr_drift;\n   opus_int32 vbr_offset;\n   opus_int32 vbr_count;\n   opus_val32 overlap_max;\n   opus_val16 stereo_saving;\n   int intensity;\n   opus_val16 *energy_mask;\n   opus_val16 spec_avg;\n\n#ifdef RESYNTH\n   /* +MAX_PERIOD/2 to make space for overlap */\n   celt_sig syn_mem[2][2*MAX_PERIOD+MAX_PERIOD/2];\n#endif\n\n   celt_sig in_mem[1]; /* Size = channels*mode->overlap */\n   /* celt_sig prefilter_mem[],  Size = channels*COMBFILTER_MAXPERIOD */\n   /* opus_val16 oldBandE[],     Size = channels*mode->nbEBands */\n   /* opus_val16 oldLogE[],      Size = channels*mode->nbEBands */\n   /* opus_val16 oldLogE2[],     Size = channels*mode->nbEBands */\n};\n\nint celt_encoder_get_size(int channels)\n{\n   CELTMode *mode = opus_custom_mode_create(48000, 960, NULL);\n   return opus_custom_encoder_get_size(mode, channels);\n}\n\nOPUS_CUSTOM_NOSTATIC int opus_custom_encoder_get_size(const CELTMode *mode, int channels)\n{\n   int size = sizeof(struct CELTEncoder)\n         + (channels*mode->overlap-1)*sizeof(celt_sig)    /* celt_sig in_mem[channels*mode->overlap]; */\n         + channels*COMBFILTER_MAXPERIOD*sizeof(celt_sig) /* celt_sig prefilter_mem[channels*COMBFILTER_MAXPERIOD]; */\n         + 3*channels*mode->nbEBands*sizeof(opus_val16);  /* opus_val16 oldBandE[channels*mode->nbEBands]; */\n                                                          /* opus_val16 oldLogE[channels*mode->nbEBands]; */\n                                                          /* opus_val16 oldLogE2[channels*mode->nbEBands]; */\n   return size;\n}\n\n#ifdef CUSTOM_MODES\nCELTEncoder *opus_custom_encoder_create(const CELTMode *mode, int channels, int *error)\n{\n   int ret;\n   CELTEncoder *st = (CELTEncoder *)opus_alloc(opus_custom_encoder_get_size(mode, channels));\n   /* init will handle the NULL case */\n   ret = opus_custom_encoder_init(st, mode, channels);\n   if (ret != OPUS_OK)\n   {\n      opus_custom_encoder_destroy(st);\n      st = NULL;\n   }\n   if (error)\n      *error = ret;\n   return st;\n}\n#endif /* CUSTOM_MODES */\n\nstatic int opus_custom_encoder_init_arch(CELTEncoder *st, const CELTMode *mode,\n                                         int channels, int arch)\n{\n   if (channels < 0 || channels > 2)\n      return OPUS_BAD_ARG;\n\n   if (st==NULL || mode==NULL)\n      return OPUS_ALLOC_FAIL;\n\n   OPUS_CLEAR((char*)st, opus_custom_encoder_get_size(mode, channels));\n\n   st->mode = mode;\n   st->overlap = mode->overlap;\n   st->stream_channels = st->channels = channels;\n\n   st->upsample = 1;\n   st->start = 0;\n   st->end = st->mode->effEBands;\n   st->signalling = 1;\n\n   st->arch = arch;\n\n   st->constrained_vbr = 1;\n   st->clip = 1;\n\n   st->bitrate = OPUS_BITRATE_MAX;\n   st->vbr = 0;\n   st->force_intra  = 0;\n   st->complexity = 5;\n   st->lsb_depth=24;\n\n   opus_custom_encoder_ctl(st, OPUS_RESET_STATE);\n\n   return OPUS_OK;\n}\n\n#ifdef CUSTOM_MODES\nint opus_custom_encoder_init(CELTEncoder *st, const CELTMode *mode, int channels)\n{\n   return opus_custom_encoder_init_arch(st, mode, channels, opus_select_arch());\n}\n#endif\n\nint celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels,\n                      int arch)\n{\n   int ret;\n   ret = opus_custom_encoder_init_arch(st,\n           opus_custom_mode_create(48000, 960, NULL), channels, arch);\n   if (ret != OPUS_OK)\n      return ret;\n   st->upsample = resampling_factor(sampling_rate);\n   return OPUS_OK;\n}\n\n#ifdef CUSTOM_MODES\nvoid opus_custom_encoder_destroy(CELTEncoder *st)\n{\n   opus_free(st);\n}\n#endif /* CUSTOM_MODES */\n\n\nstatic int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int C,\n                              opus_val16 *tf_estimate, int *tf_chan)\n{\n   int i;\n   VARDECL(opus_val16, tmp);\n   opus_val32 mem0,mem1;\n   int is_transient = 0;\n   opus_int32 mask_metric = 0;\n   int c;\n   opus_val16 tf_max;\n   int len2;\n   /* Table of 6*64/x, trained on real data to minimize the average error */\n   static const unsigned char inv_table[128] = {\n         255,255,156,110, 86, 70, 59, 51, 45, 40, 37, 33, 31, 28, 26, 25,\n          23, 22, 21, 20, 19, 18, 17, 16, 16, 15, 15, 14, 13, 13, 12, 12,\n          12, 12, 11, 11, 11, 10, 10, 10,  9,  9,  9,  9,  9,  9,  8,  8,\n           8,  8,  8,  7,  7,  7,  7,  7,  7,  6,  6,  6,  6,  6,  6,  6,\n           6,  6,  6,  6,  6,  6,  6,  6,  6,  5,  5,  5,  5,  5,  5,  5,\n           5,  5,  5,  5,  5,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,\n           4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  3,  3,\n           3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  2,\n   };\n   SAVE_STACK;\n   ALLOC(tmp, len, opus_val16);\n\n   len2=len/2;\n   for (c=0;c<C;c++)\n   {\n      opus_val32 mean;\n      opus_int32 unmask=0;\n      opus_val32 norm;\n      opus_val16 maxE;\n      mem0=0;\n      mem1=0;\n      /* High-pass filter: (1 - 2*z^-1 + z^-2) / (1 - z^-1 + .5*z^-2) */\n      for (i=0;i<len;i++)\n      {\n         opus_val32 x,y;\n         x = SHR32(in[i+c*len],SIG_SHIFT);\n         y = ADD32(mem0, x);\n#ifdef FIXED_POINT\n         mem0 = mem1 + y - SHL32(x,1);\n         mem1 = x - SHR32(y,1);\n#else\n         mem0 = mem1 + y - 2*x;\n         mem1 = x - .5f*y;\n#endif\n         tmp[i] = EXTRACT16(SHR32(y,2));\n         /*printf(\"%f \", tmp[i]);*/\n      }\n      /*printf(\"\\n\");*/\n      /* First few samples are bad because we don't propagate the memory */\n      for (i=0;i<12;i++)\n         tmp[i] = 0;\n\n#ifdef FIXED_POINT\n      /* Normalize tmp to max range */\n      {\n         int shift=0;\n         shift = 14-celt_ilog2(1+celt_maxabs16(tmp, len));\n         if (shift!=0)\n         {\n            for (i=0;i<len;i++)\n               tmp[i] = SHL16(tmp[i], shift);\n         }\n      }\n#endif\n\n      mean=0;\n      mem0=0;\n      /* Grouping by two to reduce complexity */\n      /* Forward pass to compute the post-echo threshold*/\n      for (i=0;i<len2;i++)\n      {\n         opus_val16 x2 = PSHR32(MULT16_16(tmp[2*i],tmp[2*i]) + MULT16_16(tmp[2*i+1],tmp[2*i+1]),16);\n         mean += x2;\n#ifdef FIXED_POINT\n         /* FIXME: Use PSHR16() instead */\n         tmp[i] = mem0 + PSHR32(x2-mem0,4);\n#else\n         tmp[i] = mem0 + MULT16_16_P15(QCONST16(.0625f,15),x2-mem0);\n#endif\n         mem0 = tmp[i];\n      }\n\n      mem0=0;\n      maxE=0;\n      /* Backward pass to compute the pre-echo threshold */\n      for (i=len2-1;i>=0;i--)\n      {\n#ifdef FIXED_POINT\n         /* FIXME: Use PSHR16() instead */\n         tmp[i] = mem0 + PSHR32(tmp[i]-mem0,3);\n#else\n         tmp[i] = mem0 + MULT16_16_P15(QCONST16(0.125f,15),tmp[i]-mem0);\n#endif\n         mem0 = tmp[i];\n         maxE = MAX16(maxE, mem0);\n      }\n      /*for (i=0;i<len2;i++)printf(\"%f \", tmp[i]/mean);printf(\"\\n\");*/\n\n      /* Compute the ratio of the \"frame energy\" over the harmonic mean of the energy.\n         This essentially corresponds to a bitrate-normalized temporal noise-to-mask\n         ratio */\n\n      /* As a compromise with the old transient detector, frame energy is the\n         geometric mean of the energy and half the max */\n#ifdef FIXED_POINT\n      /* Costs two sqrt() to avoid overflows */\n      mean = MULT16_16(celt_sqrt(mean), celt_sqrt(MULT16_16(maxE,len2>>1)));\n#else\n      mean = celt_sqrt(mean * maxE*.5*len2);\n#endif\n      /* Inverse of the mean energy in Q15+6 */\n      norm = SHL32(EXTEND32(len2),6+14)/ADD32(EPSILON,SHR32(mean,1));\n      /* Compute harmonic mean discarding the unreliable boundaries\n         The data is smooth, so we only take 1/4th of the samples */\n      unmask=0;\n      for (i=12;i<len2-5;i+=4)\n      {\n         int id;\n#ifdef FIXED_POINT\n         id = IMAX(0,IMIN(127,MULT16_32_Q15(tmp[i],norm))); /* Do not round to nearest */\n#else\n         id = IMAX(0,IMIN(127,(int)floor(64*norm*tmp[i]))); /* Do not round to nearest */\n#endif\n         unmask += inv_table[id];\n      }\n      /*printf(\"%d\\n\", unmask);*/\n      /* Normalize, compensate for the 1/4th of the sample and the factor of 6 in the inverse table */\n      unmask = 64*unmask*4/(6*(len2-17));\n      if (unmask>mask_metric)\n      {\n         *tf_chan = c;\n         mask_metric = unmask;\n      }\n   }\n   is_transient = mask_metric>200;\n\n   /* Arbitrary metric for VBR boost */\n   tf_max = MAX16(0,celt_sqrt(27*mask_metric)-42);\n   /* *tf_estimate = 1 + MIN16(1, sqrt(MAX16(0, tf_max-30))/20); */\n   *tf_estimate = celt_sqrt(MAX16(0, SHL32(MULT16_16(QCONST16(0.0069,14),MIN16(163,tf_max)),14)-QCONST32(0.139,28)));\n   /*printf(\"%d %f\\n\", tf_max, mask_metric);*/\n   RESTORE_STACK;\n#ifdef FUZZING\n   is_transient = rand()&0x1;\n#endif\n   /*printf(\"%d %f %d\\n\", is_transient, (float)*tf_estimate, tf_max);*/\n   return is_transient;\n}\n\n/* Looks for sudden increases of energy to decide whether we need to patch\n   the transient decision */\nint patch_transient_decision(opus_val16 *newE, opus_val16 *oldE, int nbEBands,\n      int end, int C)\n{\n   int i, c;\n   opus_val32 mean_diff=0;\n   opus_val16 spread_old[26];\n   /* Apply an aggressive (-6 dB/Bark) spreading function to the old frame to\n      avoid false detection caused by irrelevant bands */\n   if (C==1)\n   {\n      spread_old[0] = oldE[0];\n      for (i=1;i<end;i++)\n         spread_old[i] = MAX16(spread_old[i-1]-QCONST16(1.0f, DB_SHIFT), oldE[i]);\n   } else {\n      spread_old[0] = MAX16(oldE[0],oldE[nbEBands]);\n      for (i=1;i<end;i++)\n         spread_old[i] = MAX16(spread_old[i-1]-QCONST16(1.0f, DB_SHIFT),\n                               MAX16(oldE[i],oldE[i+nbEBands]));\n   }\n   for (i=end-2;i>=0;i--)\n      spread_old[i] = MAX16(spread_old[i], spread_old[i+1]-QCONST16(1.0f, DB_SHIFT));\n   /* Compute mean increase */\n   c=0; do {\n      for (i=2;i<end-1;i++)\n      {\n         opus_val16 x1, x2;\n         x1 = MAX16(0, newE[i]);\n         x2 = MAX16(0, spread_old[i]);\n         mean_diff = ADD32(mean_diff, EXTEND32(MAX16(0, SUB16(x1, x2))));\n      }\n   } while (++c<C);\n   mean_diff = DIV32(mean_diff, C*(end-3));\n   /*printf(\"%f %f %d\\n\", mean_diff, max_diff, count);*/\n   return mean_diff > QCONST16(1.f, DB_SHIFT);\n}\n\n/** Apply window and compute the MDCT for all sub-frames and\n    all channels in a frame */\nstatic void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * OPUS_RESTRICT in,\n                          celt_sig * OPUS_RESTRICT out, int C, int CC, int LM, int upsample)\n{\n   const int overlap = OVERLAP(mode);\n   int N;\n   int B;\n   int shift;\n   int i, b, c;\n   if (shortBlocks)\n   {\n      B = shortBlocks;\n      N = mode->shortMdctSize;\n      shift = mode->maxLM;\n   } else {\n      B = 1;\n      N = mode->shortMdctSize<<LM;\n      shift = mode->maxLM-LM;\n   }\n   c=0; do {\n      for (b=0;b<B;b++)\n      {\n         /* Interleaving the sub-frames while doing the MDCTs */\n         clt_mdct_forward(&mode->mdct, in+c*(B*N+overlap)+b*N, &out[b+c*N*B], mode->window, overlap, shift, B);\n      }\n   } while (++c<CC);\n   if (CC==2&&C==1)\n   {\n      for (i=0;i<B*N;i++)\n         out[i] = ADD32(HALF32(out[i]), HALF32(out[B*N+i]));\n   }\n   if (upsample != 1)\n   {\n      c=0; do\n      {\n         int bound = B*N/upsample;\n         for (i=0;i<bound;i++)\n            out[c*B*N+i] *= upsample;\n         for (;i<B*N;i++)\n            out[c*B*N+i] = 0;\n      } while (++c<C);\n   }\n}\n\n\nvoid celt_preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RESTRICT inp,\n                        int N, int CC, int upsample, const opus_val16 *coef, celt_sig *mem, int clip)\n{\n   int i;\n   opus_val16 coef0;\n   celt_sig m;\n   int Nu;\n\n   coef0 = coef[0];\n\n\n   Nu = N/upsample;\n   if (upsample!=1)\n   {\n      for (i=0;i<N;i++)\n         inp[i] = 0;\n   }\n   for (i=0;i<Nu;i++)\n   {\n      celt_sig x;\n\n      x = SCALEIN(pcmp[CC*i]);\n#ifndef FIXED_POINT\n      /* Replace NaNs with zeros */\n      if (!(x==x))\n         x = 0;\n#endif\n      inp[i*upsample] = x;\n   }\n\n#ifndef FIXED_POINT\n   if (clip)\n   {\n      /* Clip input to avoid encoding non-portable files */\n      for (i=0;i<Nu;i++)\n         inp[i*upsample] = MAX32(-65536.f, MIN32(65536.f,inp[i*upsample]));\n   }\n#else\n   (void)clip; /* Avoids a warning about clip being unused. */\n#endif\n   m = *mem;\n#ifdef CUSTOM_MODES\n   if (coef[1] != 0)\n   {\n      opus_val16 coef1 = coef[1];\n      opus_val16 coef2 = coef[2];\n      for (i=0;i<N;i++)\n      {\n         celt_sig x, tmp;\n         x = inp[i];\n         /* Apply pre-emphasis */\n         tmp = MULT16_16(coef2, x);\n         inp[i] = tmp + m;\n         m = MULT16_32_Q15(coef1, inp[i]) - MULT16_32_Q15(coef0, tmp);\n      }\n   } else\n#endif\n   {\n      for (i=0;i<N;i++)\n      {\n         celt_sig x;\n         x = SHL32(inp[i], SIG_SHIFT);\n         /* Apply pre-emphasis */\n         inp[i] = x + m;\n         m = - MULT16_32_Q15(coef0, x);\n      }\n   }\n   *mem = m;\n}\n\n\n\nstatic opus_val32 l1_metric(const celt_norm *tmp, int N, int LM, opus_val16 bias)\n{\n   int i;\n   opus_val32 L1;\n   L1 = 0;\n   for (i=0;i<N;i++)\n      L1 += EXTEND32(ABS16(tmp[i]));\n   /* When in doubt, prefer good freq resolution */\n   L1 = MAC16_32_Q15(L1, LM*bias, L1);\n   return L1;\n\n}\n\nstatic int tf_analysis(const CELTMode *m, int len, int isTransient,\n      int *tf_res, int lambda, celt_norm *X, int N0, int LM,\n      int *tf_sum, opus_val16 tf_estimate, int tf_chan)\n{\n   int i;\n   VARDECL(int, metric);\n   int cost0;\n   int cost1;\n   VARDECL(int, path0);\n   VARDECL(int, path1);\n   VARDECL(celt_norm, tmp);\n   VARDECL(celt_norm, tmp_1);\n   int sel;\n   int selcost[2];\n   int tf_select=0;\n   opus_val16 bias;\n\n   SAVE_STACK;\n   bias = MULT16_16_Q14(QCONST16(.04f,15), MAX16(-QCONST16(.25f,14), QCONST16(.5f,14)-tf_estimate));\n   /*printf(\"%f \", bias);*/\n\n   ALLOC(metric, len, int);\n   ALLOC(tmp, (m->eBands[len]-m->eBands[len-1])<<LM, celt_norm);\n   ALLOC(tmp_1, (m->eBands[len]-m->eBands[len-1])<<LM, celt_norm);\n   ALLOC(path0, len, int);\n   ALLOC(path1, len, int);\n\n   *tf_sum = 0;\n   for (i=0;i<len;i++)\n   {\n      int j, k, N;\n      int narrow;\n      opus_val32 L1, best_L1;\n      int best_level=0;\n      N = (m->eBands[i+1]-m->eBands[i])<<LM;\n      /* band is too narrow to be split down to LM=-1 */\n      narrow = (m->eBands[i+1]-m->eBands[i])==1;\n      for (j=0;j<N;j++)\n         tmp[j] = X[tf_chan*N0 + j+(m->eBands[i]<<LM)];\n      /* Just add the right channel if we're in stereo */\n      /*if (C==2)\n         for (j=0;j<N;j++)\n            tmp[j] = ADD16(SHR16(tmp[j], 1),SHR16(X[N0+j+(m->eBands[i]<<LM)], 1));*/\n      L1 = l1_metric(tmp, N, isTransient ? LM : 0, bias);\n      best_L1 = L1;\n      /* Check the -1 case for transients */\n      if (isTransient && !narrow)\n      {\n         for (j=0;j<N;j++)\n            tmp_1[j] = tmp[j];\n         haar1(tmp_1, N>>LM, 1<<LM);\n         L1 = l1_metric(tmp_1, N, LM+1, bias);\n         if (L1<best_L1)\n         {\n            best_L1 = L1;\n            best_level = -1;\n         }\n      }\n      /*printf (\"%f \", L1);*/\n      for (k=0;k<LM+!(isTransient||narrow);k++)\n      {\n         int B;\n\n         if (isTransient)\n            B = (LM-k-1);\n         else\n            B = k+1;\n\n         haar1(tmp, N>>k, 1<<k);\n\n         L1 = l1_metric(tmp, N, B, bias);\n\n         if (L1 < best_L1)\n         {\n            best_L1 = L1;\n            best_level = k+1;\n         }\n      }\n      /*printf (\"%d \", isTransient ? LM-best_level : best_level);*/\n      /* metric is in Q1 to be able to select the mid-point (-0.5) for narrower bands */\n      if (isTransient)\n         metric[i] = 2*best_level;\n      else\n         metric[i] = -2*best_level;\n      *tf_sum += (isTransient ? LM : 0) - metric[i]/2;\n      /* For bands that can't be split to -1, set the metric to the half-way point to avoid\n         biasing the decision */\n      if (narrow && (metric[i]==0 || metric[i]==-2*LM))\n         metric[i]-=1;\n      /*printf(\"%d \", metric[i]);*/\n   }\n   /*printf(\"\\n\");*/\n   /* Search for the optimal tf resolution, including tf_select */\n   tf_select = 0;\n   for (sel=0;sel<2;sel++)\n   {\n      cost0 = 0;\n      cost1 = isTransient ? 0 : lambda;\n      for (i=1;i<len;i++)\n      {\n         int curr0, curr1;\n         curr0 = IMIN(cost0, cost1 + lambda);\n         curr1 = IMIN(cost0 + lambda, cost1);\n         cost0 = curr0 + abs(metric[i]-2*tf_select_table[LM][4*isTransient+2*sel+0]);\n         cost1 = curr1 + abs(metric[i]-2*tf_select_table[LM][4*isTransient+2*sel+1]);\n      }\n      cost0 = IMIN(cost0, cost1);\n      selcost[sel]=cost0;\n   }\n   /* For now, we're conservative and only allow tf_select=1 for transients.\n    * If tests confirm it's useful for non-transients, we could allow it. */\n   if (selcost[1]<selcost[0] && isTransient)\n      tf_select=1;\n   cost0 = 0;\n   cost1 = isTransient ? 0 : lambda;\n   /* Viterbi forward pass */\n   for (i=1;i<len;i++)\n   {\n      int curr0, curr1;\n      int from0, from1;\n\n      from0 = cost0;\n      from1 = cost1 + lambda;\n      if (from0 < from1)\n      {\n         curr0 = from0;\n         path0[i]= 0;\n      } else {\n         curr0 = from1;\n         path0[i]= 1;\n      }\n\n      from0 = cost0 + lambda;\n      from1 = cost1;\n      if (from0 < from1)\n      {\n         curr1 = from0;\n         path1[i]= 0;\n      } else {\n         curr1 = from1;\n         path1[i]= 1;\n      }\n      cost0 = curr0 + abs(metric[i]-2*tf_select_table[LM][4*isTransient+2*tf_select+0]);\n      cost1 = curr1 + abs(metric[i]-2*tf_select_table[LM][4*isTransient+2*tf_select+1]);\n   }\n   tf_res[len-1] = cost0 < cost1 ? 0 : 1;\n   /* Viterbi backward pass to check the decisions */\n   for (i=len-2;i>=0;i--)\n   {\n      if (tf_res[i+1] == 1)\n         tf_res[i] = path1[i+1];\n      else\n         tf_res[i] = path0[i+1];\n   }\n   /*printf(\"%d %f\\n\", *tf_sum, tf_estimate);*/\n   RESTORE_STACK;\n#ifdef FUZZING\n   tf_select = rand()&0x1;\n   tf_res[0] = rand()&0x1;\n   for (i=1;i<len;i++)\n      tf_res[i] = tf_res[i-1] ^ ((rand()&0xF) == 0);\n#endif\n   return tf_select;\n}\n\nstatic void tf_encode(int start, int end, int isTransient, int *tf_res, int LM, int tf_select, ec_enc *enc)\n{\n   int curr, i;\n   int tf_select_rsv;\n   int tf_changed;\n   int logp;\n   opus_uint32 budget;\n   opus_uint32 tell;\n   budget = enc->storage*8;\n   tell = ec_tell(enc);\n   logp = isTransient ? 2 : 4;\n   /* Reserve space to code the tf_select decision. */\n   tf_select_rsv = LM>0 && tell+logp+1 <= budget;\n   budget -= tf_select_rsv;\n   curr = tf_changed = 0;\n   for (i=start;i<end;i++)\n   {\n      if (tell+logp<=budget)\n      {\n         ec_enc_bit_logp(enc, tf_res[i] ^ curr, logp);\n         tell = ec_tell(enc);\n         curr = tf_res[i];\n         tf_changed |= curr;\n      }\n      else\n         tf_res[i] = curr;\n      logp = isTransient ? 4 : 5;\n   }\n   /* Only code tf_select if it would actually make a difference. */\n   if (tf_select_rsv &&\n         tf_select_table[LM][4*isTransient+0+tf_changed]!=\n         tf_select_table[LM][4*isTransient+2+tf_changed])\n      ec_enc_bit_logp(enc, tf_select, 1);\n   else\n      tf_select = 0;\n   for (i=start;i<end;i++)\n      tf_res[i] = tf_select_table[LM][4*isTransient+2*tf_select+tf_res[i]];\n   /*for(i=0;i<end;i++)printf(\"%d \", isTransient ? tf_res[i] : LM+tf_res[i]);printf(\"\\n\");*/\n}\n\n\nstatic int alloc_trim_analysis(const CELTMode *m, const celt_norm *X,\n      const opus_val16 *bandLogE, int end, int LM, int C, int N0,\n      AnalysisInfo *analysis, opus_val16 *stereo_saving, opus_val16 tf_estimate,\n      int intensity, opus_val16 surround_trim)\n{\n   int i;\n   opus_val32 diff=0;\n   int c;\n   int trim_index = 5;\n   opus_val16 trim = QCONST16(5.f, 8);\n   opus_val16 logXC, logXC2;\n   if (C==2)\n   {\n      opus_val16 sum = 0; /* Q10 */\n      opus_val16 minXC; /* Q10 */\n      /* Compute inter-channel correlation for low frequencies */\n      for (i=0;i<8;i++)\n      {\n         int j;\n         opus_val32 partial = 0;\n         for (j=m->eBands[i]<<LM;j<m->eBands[i+1]<<LM;j++)\n            partial = MAC16_16(partial, X[j], X[N0+j]);\n         sum = ADD16(sum, EXTRACT16(SHR32(partial, 18)));\n      }\n      sum = MULT16_16_Q15(QCONST16(1.f/8, 15), sum);\n      sum = MIN16(QCONST16(1.f, 10), ABS16(sum));\n      minXC = sum;\n      for (i=8;i<intensity;i++)\n      {\n         int j;\n         opus_val32 partial = 0;\n         for (j=m->eBands[i]<<LM;j<m->eBands[i+1]<<LM;j++)\n            partial = MAC16_16(partial, X[j], X[N0+j]);\n         minXC = MIN16(minXC, ABS16(EXTRACT16(SHR32(partial, 18))));\n      }\n      minXC = MIN16(QCONST16(1.f, 10), ABS16(minXC));\n      /*printf (\"%f\\n\", sum);*/\n      if (sum > QCONST16(.995f,10))\n         trim_index-=4;\n      else if (sum > QCONST16(.92f,10))\n         trim_index-=3;\n      else if (sum > QCONST16(.85f,10))\n         trim_index-=2;\n      else if (sum > QCONST16(.8f,10))\n         trim_index-=1;\n      /* mid-side savings estimations based on the LF average*/\n      logXC = celt_log2(QCONST32(1.001f, 20)-MULT16_16(sum, sum));\n      /* mid-side savings estimations based on min correlation */\n      logXC2 = MAX16(HALF16(logXC), celt_log2(QCONST32(1.001f, 20)-MULT16_16(minXC, minXC)));\n#ifdef FIXED_POINT\n      /* Compensate for Q20 vs Q14 input and convert output to Q8 */\n      logXC = PSHR32(logXC-QCONST16(6.f, DB_SHIFT),DB_SHIFT-8);\n      logXC2 = PSHR32(logXC2-QCONST16(6.f, DB_SHIFT),DB_SHIFT-8);\n#endif\n\n      trim += MAX16(-QCONST16(4.f, 8), MULT16_16_Q15(QCONST16(.75f,15),logXC));\n      *stereo_saving = MIN16(*stereo_saving + QCONST16(0.25f, 8), -HALF16(logXC2));\n   }\n\n   /* Estimate spectral tilt */\n   c=0; do {\n      for (i=0;i<end-1;i++)\n      {\n         diff += bandLogE[i+c*m->nbEBands]*(opus_int32)(2+2*i-end);\n      }\n   } while (++c<C);\n   diff /= C*(end-1);\n   /*printf(\"%f\\n\", diff);*/\n   if (diff > QCONST16(2.f, DB_SHIFT))\n      trim_index--;\n   if (diff > QCONST16(8.f, DB_SHIFT))\n      trim_index--;\n   if (diff < -QCONST16(4.f, DB_SHIFT))\n      trim_index++;\n   if (diff < -QCONST16(10.f, DB_SHIFT))\n      trim_index++;\n   trim -= MAX16(-QCONST16(2.f, 8), MIN16(QCONST16(2.f, 8), SHR16(diff+QCONST16(1.f, DB_SHIFT),DB_SHIFT-8)/6 ));\n   trim -= SHR16(surround_trim, DB_SHIFT-8);\n   trim -= 2*SHR16(tf_estimate, 14-8);\n#ifndef DISABLE_FLOAT_API\n   if (analysis->valid)\n   {\n      trim -= MAX16(-QCONST16(2.f, 8), MIN16(QCONST16(2.f, 8),\n            (opus_val16)(QCONST16(2.f, 8)*(analysis->tonality_slope+.05f))));\n   }\n#endif\n\n#ifdef FIXED_POINT\n   trim_index = PSHR32(trim, 8);\n#else\n   trim_index = (int)floor(.5f+trim);\n#endif\n   if (trim_index<0)\n      trim_index = 0;\n   if (trim_index>10)\n      trim_index = 10;\n   /*printf(\"%d\\n\", trim_index);*/\n#ifdef FUZZING\n   trim_index = rand()%11;\n#endif\n   return trim_index;\n}\n\nstatic int stereo_analysis(const CELTMode *m, const celt_norm *X,\n      int LM, int N0)\n{\n   int i;\n   int thetas;\n   opus_val32 sumLR = EPSILON, sumMS = EPSILON;\n\n   /* Use the L1 norm to model the entropy of the L/R signal vs the M/S signal */\n   for (i=0;i<13;i++)\n   {\n      int j;\n      for (j=m->eBands[i]<<LM;j<m->eBands[i+1]<<LM;j++)\n      {\n         opus_val32 L, R, M, S;\n         /* We cast to 32-bit first because of the -32768 case */\n         L = EXTEND32(X[j]);\n         R = EXTEND32(X[N0+j]);\n         M = ADD32(L, R);\n         S = SUB32(L, R);\n         sumLR = ADD32(sumLR, ADD32(ABS32(L), ABS32(R)));\n         sumMS = ADD32(sumMS, ADD32(ABS32(M), ABS32(S)));\n      }\n   }\n   sumMS = MULT16_32_Q15(QCONST16(0.707107f, 15), sumMS);\n   thetas = 13;\n   /* We don't need thetas for lower bands with LM<=1 */\n   if (LM<=1)\n      thetas -= 8;\n   return MULT16_32_Q15((m->eBands[13]<<(LM+1))+thetas, sumMS)\n         > MULT16_32_Q15(m->eBands[13]<<(LM+1), sumLR);\n}\n\nstatic opus_val16 dynalloc_analysis(const opus_val16 *bandLogE, const opus_val16 *bandLogE2,\n      int nbEBands, int start, int end, int C, int *offsets, int lsb_depth, const opus_int16 *logN,\n      int isTransient, int vbr, int constrained_vbr, const opus_int16 *eBands, int LM,\n      int effectiveBytes, opus_int32 *tot_boost_, int lfe, opus_val16 *surround_dynalloc)\n{\n   int i, c;\n   opus_int32 tot_boost=0;\n   opus_val16 maxDepth;\n   VARDECL(opus_val16, follower);\n   VARDECL(opus_val16, noise_floor);\n   SAVE_STACK;\n   ALLOC(follower, C*nbEBands, opus_val16);\n   ALLOC(noise_floor, C*nbEBands, opus_val16);\n   for (i=0;i<nbEBands;i++)\n      offsets[i] = 0;\n   /* Dynamic allocation code */\n   maxDepth=-QCONST16(31.9f, DB_SHIFT);\n   for (i=0;i<end;i++)\n   {\n      /* Noise floor must take into account eMeans, the depth, the width of the bands\n         and the preemphasis filter (approx. square of bark band ID) */\n      noise_floor[i] = MULT16_16(QCONST16(0.0625f, DB_SHIFT),logN[i])\n            +QCONST16(.5f,DB_SHIFT)+SHL16(9-lsb_depth,DB_SHIFT)-SHL16(eMeans[i],6)\n            +MULT16_16(QCONST16(.0062,DB_SHIFT),(i+5)*(i+5));\n   }\n   c=0;do\n   {\n      for (i=0;i<end;i++)\n         maxDepth = MAX16(maxDepth, bandLogE[c*nbEBands+i]-noise_floor[i]);\n   } while (++c<C);\n   /* Make sure that dynamic allocation can't make us bust the budget */\n   if (effectiveBytes > 50 && LM>=1 && !lfe)\n   {\n      int last=0;\n      c=0;do\n      {\n         follower[c*nbEBands] = bandLogE2[c*nbEBands];\n         for (i=1;i<end;i++)\n         {\n            /* The last band to be at least 3 dB higher than the previous one\n               is the last we'll consider. Otherwise, we run into problems on\n               bandlimited signals. */\n            if (bandLogE2[c*nbEBands+i] > bandLogE2[c*nbEBands+i-1]+QCONST16(.5f,DB_SHIFT))\n               last=i;\n            follower[c*nbEBands+i] = MIN16(follower[c*nbEBands+i-1]+QCONST16(1.5f,DB_SHIFT), bandLogE2[c*nbEBands+i]);\n         }\n         for (i=last-1;i>=0;i--)\n            follower[c*nbEBands+i] = MIN16(follower[c*nbEBands+i], MIN16(follower[c*nbEBands+i+1]+QCONST16(2.f,DB_SHIFT), bandLogE2[c*nbEBands+i]));\n         for (i=0;i<end;i++)\n            follower[c*nbEBands+i] = MAX16(follower[c*nbEBands+i], noise_floor[i]);\n      } while (++c<C);\n      if (C==2)\n      {\n         for (i=start;i<end;i++)\n         {\n            /* Consider 24 dB \"cross-talk\" */\n            follower[nbEBands+i] = MAX16(follower[nbEBands+i], follower[         i]-QCONST16(4.f,DB_SHIFT));\n            follower[         i] = MAX16(follower[         i], follower[nbEBands+i]-QCONST16(4.f,DB_SHIFT));\n            follower[i] = HALF16(MAX16(0, bandLogE[i]-follower[i]) + MAX16(0, bandLogE[nbEBands+i]-follower[nbEBands+i]));\n         }\n      } else {\n         for (i=start;i<end;i++)\n         {\n            follower[i] = MAX16(0, bandLogE[i]-follower[i]);\n         }\n      }\n      for (i=start;i<end;i++)\n         follower[i] = MAX16(follower[i], surround_dynalloc[i]);\n      /* For non-transient CBR/CVBR frames, halve the dynalloc contribution */\n      if ((!vbr || constrained_vbr)&&!isTransient)\n      {\n         for (i=start;i<end;i++)\n            follower[i] = HALF16(follower[i]);\n      }\n      for (i=start;i<end;i++)\n      {\n         int width;\n         int boost;\n         int boost_bits;\n\n         if (i<8)\n            follower[i] *= 2;\n         if (i>=12)\n            follower[i] = HALF16(follower[i]);\n         follower[i] = MIN16(follower[i], QCONST16(4, DB_SHIFT));\n\n         width = C*(eBands[i+1]-eBands[i])<<LM;\n         if (width<6)\n         {\n            boost = (int)SHR32(EXTEND32(follower[i]),DB_SHIFT);\n            boost_bits = boost*width<<BITRES;\n         } else if (width > 48) {\n            boost = (int)SHR32(EXTEND32(follower[i])*8,DB_SHIFT);\n            boost_bits = (boost*width<<BITRES)/8;\n         } else {\n            boost = (int)SHR32(EXTEND32(follower[i])*width/6,DB_SHIFT);\n            boost_bits = boost*6<<BITRES;\n         }\n         /* For CBR and non-transient CVBR frames, limit dynalloc to 1/4 of the bits */\n         if ((!vbr || (constrained_vbr&&!isTransient))\n               && (tot_boost+boost_bits)>>BITRES>>3 > effectiveBytes/4)\n         {\n            opus_int32 cap = ((effectiveBytes/4)<<BITRES<<3);\n            offsets[i] = cap-tot_boost;\n            tot_boost = cap;\n            break;\n         } else {\n            offsets[i] = boost;\n            tot_boost += boost_bits;\n         }\n      }\n   }\n   *tot_boost_ = tot_boost;\n   RESTORE_STACK;\n   return maxDepth;\n}\n\n\nstatic int run_prefilter(CELTEncoder *st, celt_sig *in, celt_sig *prefilter_mem, int CC, int N,\n      int prefilter_tapset, int *pitch, opus_val16 *gain, int *qgain, int enabled, int nbAvailableBytes)\n{\n   int c;\n   VARDECL(celt_sig, _pre);\n   celt_sig *pre[2];\n   const CELTMode *mode;\n   int pitch_index;\n   opus_val16 gain1;\n   opus_val16 pf_threshold;\n   int pf_on;\n   int qg;\n   SAVE_STACK;\n\n   mode = st->mode;\n   ALLOC(_pre, CC*(N+COMBFILTER_MAXPERIOD), celt_sig);\n\n   pre[0] = _pre;\n   pre[1] = _pre + (N+COMBFILTER_MAXPERIOD);\n\n\n   c=0; do {\n      OPUS_COPY(pre[c], prefilter_mem+c*COMBFILTER_MAXPERIOD, COMBFILTER_MAXPERIOD);\n      OPUS_COPY(pre[c]+COMBFILTER_MAXPERIOD, in+c*(N+st->overlap)+st->overlap, N);\n   } while (++c<CC);\n\n   if (enabled)\n   {\n      VARDECL(opus_val16, pitch_buf);\n      ALLOC(pitch_buf, (COMBFILTER_MAXPERIOD+N)>>1, opus_val16);\n\n      pitch_downsample(pre, pitch_buf, COMBFILTER_MAXPERIOD+N, CC, st->arch);\n      /* Don't search for the fir last 1.5 octave of the range because\n         there's too many false-positives due to short-term correlation */\n      pitch_search(pitch_buf+(COMBFILTER_MAXPERIOD>>1), pitch_buf, N,\n            COMBFILTER_MAXPERIOD-3*COMBFILTER_MINPERIOD, &pitch_index,\n            st->arch);\n      pitch_index = COMBFILTER_MAXPERIOD-pitch_index;\n\n      gain1 = remove_doubling(pitch_buf, COMBFILTER_MAXPERIOD, COMBFILTER_MINPERIOD,\n            N, &pitch_index, st->prefilter_period, st->prefilter_gain);\n      if (pitch_index > COMBFILTER_MAXPERIOD-2)\n         pitch_index = COMBFILTER_MAXPERIOD-2;\n      gain1 = MULT16_16_Q15(QCONST16(.7f,15),gain1);\n      /*printf(\"%d %d %f %f\\n\", pitch_change, pitch_index, gain1, st->analysis.tonality);*/\n      if (st->loss_rate>2)\n         gain1 = HALF32(gain1);\n      if (st->loss_rate>4)\n         gain1 = HALF32(gain1);\n      if (st->loss_rate>8)\n         gain1 = 0;\n   } else {\n      gain1 = 0;\n      pitch_index = COMBFILTER_MINPERIOD;\n   }\n\n   /* Gain threshold for enabling the prefilter/postfilter */\n   pf_threshold = QCONST16(.2f,15);\n\n   /* Adjusting the threshold based on rate and continuity */\n   if (abs(pitch_index-st->prefilter_period)*10>pitch_index)\n      pf_threshold += QCONST16(.2f,15);\n   if (nbAvailableBytes<25)\n      pf_threshold += QCONST16(.1f,15);\n   if (nbAvailableBytes<35)\n      pf_threshold += QCONST16(.1f,15);\n   if (st->prefilter_gain > QCONST16(.4f,15))\n      pf_threshold -= QCONST16(.1f,15);\n   if (st->prefilter_gain > QCONST16(.55f,15))\n      pf_threshold -= QCONST16(.1f,15);\n\n   /* Hard threshold at 0.2 */\n   pf_threshold = MAX16(pf_threshold, QCONST16(.2f,15));\n   if (gain1<pf_threshold)\n   {\n      gain1 = 0;\n      pf_on = 0;\n      qg = 0;\n   } else {\n      /*This block is not gated by a total bits check only because\n        of the nbAvailableBytes check above.*/\n      if (ABS16(gain1-st->prefilter_gain)<QCONST16(.1f,15))\n         gain1=st->prefilter_gain;\n\n#ifdef FIXED_POINT\n      qg = ((gain1+1536)>>10)/3-1;\n#else\n      qg = (int)floor(.5f+gain1*32/3)-1;\n#endif\n      qg = IMAX(0, IMIN(7, qg));\n      gain1 = QCONST16(0.09375f,15)*(qg+1);\n      pf_on = 1;\n   }\n   /*printf(\"%d %f\\n\", pitch_index, gain1);*/\n\n   c=0; do {\n      int offset = mode->shortMdctSize-st->overlap;\n      st->prefilter_period=IMAX(st->prefilter_period, COMBFILTER_MINPERIOD);\n      OPUS_COPY(in+c*(N+st->overlap), st->in_mem+c*(st->overlap), st->overlap);\n      if (offset)\n         comb_filter(in+c*(N+st->overlap)+st->overlap, pre[c]+COMBFILTER_MAXPERIOD,\n               st->prefilter_period, st->prefilter_period, offset, -st->prefilter_gain, -st->prefilter_gain,\n               st->prefilter_tapset, st->prefilter_tapset, NULL, 0);\n\n      comb_filter(in+c*(N+st->overlap)+st->overlap+offset, pre[c]+COMBFILTER_MAXPERIOD+offset,\n            st->prefilter_period, pitch_index, N-offset, -st->prefilter_gain, -gain1,\n            st->prefilter_tapset, prefilter_tapset, mode->window, st->overlap);\n      OPUS_COPY(st->in_mem+c*(st->overlap), in+c*(N+st->overlap)+N, st->overlap);\n\n      if (N>COMBFILTER_MAXPERIOD)\n      {\n         OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD, pre[c]+N, COMBFILTER_MAXPERIOD);\n      } else {\n         OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD, prefilter_mem+c*COMBFILTER_MAXPERIOD+N, COMBFILTER_MAXPERIOD-N);\n         OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD+COMBFILTER_MAXPERIOD-N, pre[c]+COMBFILTER_MAXPERIOD, N);\n      }\n   } while (++c<CC);\n\n   RESTORE_STACK;\n   *gain = gain1;\n   *pitch = pitch_index;\n   *qgain = qg;\n   return pf_on;\n}\n\nstatic int compute_vbr(const CELTMode *mode, AnalysisInfo *analysis, opus_int32 base_target,\n      int LM, opus_int32 bitrate, int lastCodedBands, int C, int intensity,\n      int constrained_vbr, opus_val16 stereo_saving, int tot_boost,\n      opus_val16 tf_estimate, int pitch_change, opus_val16 maxDepth,\n      int variable_duration, int lfe, int has_surround_mask, opus_val16 surround_masking,\n      opus_val16 temporal_vbr)\n{\n   /* The target rate in 8th bits per frame */\n   opus_int32 target;\n   int coded_bins;\n   int coded_bands;\n   opus_val16 tf_calibration;\n   int nbEBands;\n   const opus_int16 *eBands;\n\n   nbEBands = mode->nbEBands;\n   eBands = mode->eBands;\n\n   coded_bands = lastCodedBands ? lastCodedBands : nbEBands;\n   coded_bins = eBands[coded_bands]<<LM;\n   if (C==2)\n      coded_bins += eBands[IMIN(intensity, coded_bands)]<<LM;\n\n   target = base_target;\n\n   /*printf(\"%f %f %f %f %d %d \", st->analysis.activity, st->analysis.tonality, tf_estimate, st->stereo_saving, tot_boost, coded_bands);*/\n#ifndef DISABLE_FLOAT_API\n   if (analysis->valid && analysis->activity<.4)\n      target -= (opus_int32)((coded_bins<<BITRES)*(.4f-analysis->activity));\n#endif\n   /* Stereo savings */\n   if (C==2)\n   {\n      int coded_stereo_bands;\n      int coded_stereo_dof;\n      opus_val16 max_frac;\n      coded_stereo_bands = IMIN(intensity, coded_bands);\n      coded_stereo_dof = (eBands[coded_stereo_bands]<<LM)-coded_stereo_bands;\n      /* Maximum fraction of the bits we can save if the signal is mono. */\n      max_frac = DIV32_16(MULT16_16(QCONST16(0.8f, 15), coded_stereo_dof), coded_bins);\n      stereo_saving = MIN16(stereo_saving, QCONST16(1.f, 8));\n      /*printf(\"%d %d %d \", coded_stereo_dof, coded_bins, tot_boost);*/\n      target -= (opus_int32)MIN32(MULT16_32_Q15(max_frac,target),\n                      SHR32(MULT16_16(stereo_saving-QCONST16(0.1f,8),(coded_stereo_dof<<BITRES)),8));\n   }\n   /* Boost the rate according to dynalloc (minus the dynalloc average for calibration). */\n   target += tot_boost-(16<<LM);\n   /* Apply transient boost, compensating for average boost. */\n   tf_calibration = variable_duration==OPUS_FRAMESIZE_VARIABLE ?\n                    QCONST16(0.02f,14) : QCONST16(0.04f,14);\n   target += (opus_int32)SHL32(MULT16_32_Q15(tf_estimate-tf_calibration, target),1);\n\n#ifndef DISABLE_FLOAT_API\n   /* Apply tonality boost */\n   if (analysis->valid && !lfe)\n   {\n      opus_int32 tonal_target;\n      float tonal;\n\n      /* Tonality boost (compensating for the average). */\n      tonal = MAX16(0.f,analysis->tonality-.15f)-0.09f;\n      tonal_target = target + (opus_int32)((coded_bins<<BITRES)*1.2f*tonal);\n      if (pitch_change)\n         tonal_target +=  (opus_int32)((coded_bins<<BITRES)*.8f);\n      /*printf(\"%f %f \", analysis->tonality, tonal);*/\n      target = tonal_target;\n   }\n#endif\n\n   if (has_surround_mask&&!lfe)\n   {\n      opus_int32 surround_target = target + (opus_int32)SHR32(MULT16_16(surround_masking,coded_bins<<BITRES), DB_SHIFT);\n      /*printf(\"%f %d %d %d %d %d %d \", surround_masking, coded_bins, st->end, st->intensity, surround_target, target, st->bitrate);*/\n      target = IMAX(target/4, surround_target);\n   }\n\n   {\n      opus_int32 floor_depth;\n      int bins;\n      bins = eBands[nbEBands-2]<<LM;\n      /*floor_depth = SHR32(MULT16_16((C*bins<<BITRES),celt_log2(SHL32(MAX16(1,sample_max),13))), DB_SHIFT);*/\n      floor_depth = (opus_int32)SHR32(MULT16_16((C*bins<<BITRES),maxDepth), DB_SHIFT);\n      floor_depth = IMAX(floor_depth, target>>2);\n      target = IMIN(target, floor_depth);\n      /*printf(\"%f %d\\n\", maxDepth, floor_depth);*/\n   }\n\n   if ((!has_surround_mask||lfe) && (constrained_vbr || bitrate<64000))\n   {\n      opus_val16 rate_factor;\n#ifdef FIXED_POINT\n      rate_factor = MAX16(0,(bitrate-32000));\n#else\n      rate_factor = MAX16(0,(1.f/32768)*(bitrate-32000));\n#endif\n      if (constrained_vbr)\n         rate_factor = MIN16(rate_factor, QCONST16(0.67f, 15));\n      target = base_target + (opus_int32)MULT16_32_Q15(rate_factor, target-base_target);\n\n   }\n\n   if (!has_surround_mask && tf_estimate < QCONST16(.2f, 14))\n   {\n      opus_val16 amount;\n      opus_val16 tvbr_factor;\n      amount = MULT16_16_Q15(QCONST16(.0000031f, 30), IMAX(0, IMIN(32000, 96000-bitrate)));\n      tvbr_factor = SHR32(MULT16_16(temporal_vbr, amount), DB_SHIFT);\n      target += (opus_int32)MULT16_32_Q15(tvbr_factor, target);\n   }\n\n   /* Don't allow more than doubling the rate */\n   target = IMIN(2*base_target, target);\n\n   return target;\n}\n\nint celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc)\n{\n   int i, c, N;\n   opus_int32 bits;\n   ec_enc _enc;\n   VARDECL(celt_sig, in);\n   VARDECL(celt_sig, freq);\n   VARDECL(celt_norm, X);\n   VARDECL(celt_ener, bandE);\n   VARDECL(opus_val16, bandLogE);\n   VARDECL(opus_val16, bandLogE2);\n   VARDECL(int, fine_quant);\n   VARDECL(opus_val16, error);\n   VARDECL(int, pulses);\n   VARDECL(int, cap);\n   VARDECL(int, offsets);\n   VARDECL(int, fine_priority);\n   VARDECL(int, tf_res);\n   VARDECL(unsigned char, collapse_masks);\n   celt_sig *prefilter_mem;\n   opus_val16 *oldBandE, *oldLogE, *oldLogE2;\n   int shortBlocks=0;\n   int isTransient=0;\n   const int CC = st->channels;\n   const int C = st->stream_channels;\n   int LM, M;\n   int tf_select;\n   int nbFilledBytes, nbAvailableBytes;\n   int effEnd;\n   int codedBands;\n   int tf_sum;\n   int alloc_trim;\n   int pitch_index=COMBFILTER_MINPERIOD;\n   opus_val16 gain1 = 0;\n   int dual_stereo=0;\n   int effectiveBytes;\n   int dynalloc_logp;\n   opus_int32 vbr_rate;\n   opus_int32 total_bits;\n   opus_int32 total_boost;\n   opus_int32 balance;\n   opus_int32 tell;\n   int prefilter_tapset=0;\n   int pf_on;\n   int anti_collapse_rsv;\n   int anti_collapse_on=0;\n   int silence=0;\n   int tf_chan = 0;\n   opus_val16 tf_estimate;\n   int pitch_change=0;\n   opus_int32 tot_boost;\n   opus_val32 sample_max;\n   opus_val16 maxDepth;\n   const OpusCustomMode *mode;\n   int nbEBands;\n   int overlap;\n   const opus_int16 *eBands;\n   int secondMdct;\n   int signalBandwidth;\n   int transient_got_disabled=0;\n   opus_val16 surround_masking=0;\n   opus_val16 temporal_vbr=0;\n   opus_val16 surround_trim = 0;\n   opus_int32 equiv_rate = 510000;\n   VARDECL(opus_val16, surround_dynalloc);\n   ALLOC_STACK;\n\n   mode = st->mode;\n   nbEBands = mode->nbEBands;\n   overlap = mode->overlap;\n   eBands = mode->eBands;\n   tf_estimate = 0;\n   if (nbCompressedBytes<2 || pcm==NULL)\n   {\n      RESTORE_STACK;\n      return OPUS_BAD_ARG;\n   }\n\n   frame_size *= st->upsample;\n   for (LM=0;LM<=mode->maxLM;LM++)\n      if (mode->shortMdctSize<<LM==frame_size)\n         break;\n   if (LM>mode->maxLM)\n   {\n      RESTORE_STACK;\n      return OPUS_BAD_ARG;\n   }\n   M=1<<LM;\n   N = M*mode->shortMdctSize;\n\n   prefilter_mem = st->in_mem+CC*(st->overlap);\n   oldBandE = (opus_val16*)(st->in_mem+CC*(st->overlap+COMBFILTER_MAXPERIOD));\n   oldLogE = oldBandE + CC*nbEBands;\n   oldLogE2 = oldLogE + CC*nbEBands;\n\n   if (enc==NULL)\n   {\n      tell=1;\n      nbFilledBytes=0;\n   } else {\n      tell=ec_tell(enc);\n      nbFilledBytes=(tell+4)>>3;\n   }\n\n#ifdef CUSTOM_MODES\n   if (st->signalling && enc==NULL)\n   {\n      int tmp = (mode->effEBands-st->end)>>1;\n      st->end = IMAX(1, mode->effEBands-tmp);\n      compressed[0] = tmp<<5;\n      compressed[0] |= LM<<3;\n      compressed[0] |= (C==2)<<2;\n      /* Convert \"standard mode\" to Opus header */\n      if (mode->Fs==48000 && mode->shortMdctSize==120)\n      {\n         int c0 = toOpus(compressed[0]);\n         if (c0<0)\n         {\n            RESTORE_STACK;\n            return OPUS_BAD_ARG;\n         }\n         compressed[0] = c0;\n      }\n      compressed++;\n      nbCompressedBytes--;\n   }\n#else\n   celt_assert(st->signalling==0);\n#endif\n\n   /* Can't produce more than 1275 output bytes */\n   nbCompressedBytes = IMIN(nbCompressedBytes,1275);\n   nbAvailableBytes = nbCompressedBytes - nbFilledBytes;\n\n   if (st->vbr && st->bitrate!=OPUS_BITRATE_MAX)\n   {\n      opus_int32 den=mode->Fs>>BITRES;\n      vbr_rate=(st->bitrate*frame_size+(den>>1))/den;\n#ifdef CUSTOM_MODES\n      if (st->signalling)\n         vbr_rate -= 8<<BITRES;\n#endif\n      effectiveBytes = vbr_rate>>(3+BITRES);\n   } else {\n      opus_int32 tmp;\n      vbr_rate = 0;\n      tmp = st->bitrate*frame_size;\n      if (tell>1)\n         tmp += tell;\n      if (st->bitrate!=OPUS_BITRATE_MAX)\n         nbCompressedBytes = IMAX(2, IMIN(nbCompressedBytes,\n               (tmp+4*mode->Fs)/(8*mode->Fs)-!!st->signalling));\n      effectiveBytes = nbCompressedBytes;\n   }\n   if (st->bitrate != OPUS_BITRATE_MAX)\n      equiv_rate = st->bitrate - (40*C+20)*((400>>LM) - 50);\n\n   if (enc==NULL)\n   {\n      ec_enc_init(&_enc, compressed, nbCompressedBytes);\n      enc = &_enc;\n   }\n\n   if (vbr_rate>0)\n   {\n      /* Computes the max bit-rate allowed in VBR mode to avoid violating the\n          target rate and buffering.\n         We must do this up front so that bust-prevention logic triggers\n          correctly if we don't have enough bits. */\n      if (st->constrained_vbr)\n      {\n         opus_int32 vbr_bound;\n         opus_int32 max_allowed;\n         /* We could use any multiple of vbr_rate as bound (depending on the\n             delay).\n            This is clamped to ensure we use at least two bytes if the encoder\n             was entirely empty, but to allow 0 in hybrid mode. */\n         vbr_bound = vbr_rate;\n         max_allowed = IMIN(IMAX(tell==1?2:0,\n               (vbr_rate+vbr_bound-st->vbr_reservoir)>>(BITRES+3)),\n               nbAvailableBytes);\n         if(max_allowed < nbAvailableBytes)\n         {\n            nbCompressedBytes = nbFilledBytes+max_allowed;\n            nbAvailableBytes = max_allowed;\n            ec_enc_shrink(enc, nbCompressedBytes);\n         }\n      }\n   }\n   total_bits = nbCompressedBytes*8;\n\n   effEnd = st->end;\n   if (effEnd > mode->effEBands)\n      effEnd = mode->effEBands;\n\n   ALLOC(in, CC*(N+st->overlap), celt_sig);\n\n   sample_max=MAX32(st->overlap_max, celt_maxabs16(pcm, C*(N-overlap)/st->upsample));\n   st->overlap_max=celt_maxabs16(pcm+C*(N-overlap)/st->upsample, C*overlap/st->upsample);\n   sample_max=MAX32(sample_max, st->overlap_max);\n#ifdef FIXED_POINT\n   silence = (sample_max==0);\n#else\n   silence = (sample_max <= (opus_val16)1/(1<<st->lsb_depth));\n#endif\n#ifdef FUZZING\n   if ((rand()&0x3F)==0)\n      silence = 1;\n#endif\n   if (tell==1)\n      ec_enc_bit_logp(enc, silence, 15);\n   else\n      silence=0;\n   if (silence)\n   {\n      /*In VBR mode there is no need to send more than the minimum. */\n      if (vbr_rate>0)\n      {\n         effectiveBytes=nbCompressedBytes=IMIN(nbCompressedBytes, nbFilledBytes+2);\n         total_bits=nbCompressedBytes*8;\n         nbAvailableBytes=2;\n         ec_enc_shrink(enc, nbCompressedBytes);\n      }\n      /* Pretend we've filled all the remaining bits with zeros\n            (that's what the initialiser did anyway) */\n      tell = nbCompressedBytes*8;\n      enc->nbits_total+=tell-ec_tell(enc);\n   }\n   c=0; do {\n      celt_preemphasis(pcm+c, in+c*(N+st->overlap)+st->overlap, N, CC, st->upsample,\n                  mode->preemph, st->preemph_memE+c, st->clip);\n   } while (++c<CC);\n\n\n\n   /* Find pitch period and gain */\n   {\n      int enabled;\n      int qg;\n      enabled = ((st->lfe&&nbAvailableBytes>3) || nbAvailableBytes>12*C) && st->start==0 && !silence && !st->disable_pf\n            && st->complexity >= 5 && !(st->consec_transient && LM!=3 && st->variable_duration==OPUS_FRAMESIZE_VARIABLE);\n\n      prefilter_tapset = st->tapset_decision;\n      pf_on = run_prefilter(st, in, prefilter_mem, CC, N, prefilter_tapset, &pitch_index, &gain1, &qg, enabled, nbAvailableBytes);\n      if ((gain1 > QCONST16(.4f,15) || st->prefilter_gain > QCONST16(.4f,15)) && (!st->analysis.valid || st->analysis.tonality > .3)\n            && (pitch_index > 1.26*st->prefilter_period || pitch_index < .79*st->prefilter_period))\n         pitch_change = 1;\n      if (pf_on==0)\n      {\n         if(st->start==0 && tell+16<=total_bits)\n            ec_enc_bit_logp(enc, 0, 1);\n      } else {\n         /*This block is not gated by a total bits check only because\n           of the nbAvailableBytes check above.*/\n         int octave;\n         ec_enc_bit_logp(enc, 1, 1);\n         pitch_index += 1;\n         octave = EC_ILOG(pitch_index)-5;\n         ec_enc_uint(enc, octave, 6);\n         ec_enc_bits(enc, pitch_index-(16<<octave), 4+octave);\n         pitch_index -= 1;\n         ec_enc_bits(enc, qg, 3);\n         ec_enc_icdf(enc, prefilter_tapset, tapset_icdf, 2);\n      }\n   }\n\n   isTransient = 0;\n   shortBlocks = 0;\n   if (st->complexity >= 1 && !st->lfe)\n   {\n      isTransient = transient_analysis(in, N+st->overlap, CC,\n            &tf_estimate, &tf_chan);\n   }\n   if (LM>0 && ec_tell(enc)+3<=total_bits)\n   {\n      if (isTransient)\n         shortBlocks = M;\n   } else {\n      isTransient = 0;\n      transient_got_disabled=1;\n   }\n\n   ALLOC(freq, CC*N, celt_sig); /**< Interleaved signal MDCTs */\n   ALLOC(bandE,nbEBands*CC, celt_ener);\n   ALLOC(bandLogE,nbEBands*CC, opus_val16);\n\n   secondMdct = shortBlocks && st->complexity>=8;\n   ALLOC(bandLogE2, C*nbEBands, opus_val16);\n   if (secondMdct)\n   {\n      compute_mdcts(mode, 0, in, freq, C, CC, LM, st->upsample);\n      compute_band_energies(mode, freq, bandE, effEnd, C, M);\n      amp2Log2(mode, effEnd, st->end, bandE, bandLogE2, C);\n      for (i=0;i<C*nbEBands;i++)\n         bandLogE2[i] += HALF16(SHL16(LM, DB_SHIFT));\n   }\n\n   compute_mdcts(mode, shortBlocks, in, freq, C, CC, LM, st->upsample);\n   if (CC==2&&C==1)\n      tf_chan = 0;\n   compute_band_energies(mode, freq, bandE, effEnd, C, M);\n\n   if (st->lfe)\n   {\n      for (i=2;i<st->end;i++)\n      {\n         bandE[i] = IMIN(bandE[i], MULT16_32_Q15(QCONST16(1e-4f,15),bandE[0]));\n         bandE[i] = MAX32(bandE[i], EPSILON);\n      }\n   }\n   amp2Log2(mode, effEnd, st->end, bandE, bandLogE, C);\n\n   ALLOC(surround_dynalloc, C*nbEBands, opus_val16);\n   for(i=0;i<st->end;i++)\n      surround_dynalloc[i] = 0;\n   /* This computes how much masking takes place between surround channels */\n   if (st->start==0&&st->energy_mask&&!st->lfe)\n   {\n      int mask_end;\n      int midband;\n      int count_dynalloc;\n      opus_val32 mask_avg=0;\n      opus_val32 diff=0;\n      int count=0;\n      mask_end = IMAX(2,st->lastCodedBands);\n      for (c=0;c<C;c++)\n      {\n         for(i=0;i<mask_end;i++)\n         {\n            opus_val16 mask;\n            mask = MAX16(MIN16(st->energy_mask[nbEBands*c+i],\n                   QCONST16(.25f, DB_SHIFT)), -QCONST16(2.0f, DB_SHIFT));\n            if (mask > 0)\n               mask = HALF16(mask);\n            mask_avg += MULT16_16(mask, eBands[i+1]-eBands[i]);\n            count += eBands[i+1]-eBands[i];\n            diff += MULT16_16(mask, 1+2*i-mask_end);\n         }\n      }\n      mask_avg = DIV32_16(mask_avg,count);\n      mask_avg += QCONST16(.2f, DB_SHIFT);\n      diff = diff*6/(C*(mask_end-1)*(mask_end+1)*mask_end);\n      /* Again, being conservative */\n      diff = HALF32(diff);\n      diff = MAX32(MIN32(diff, QCONST32(.031f, DB_SHIFT)), -QCONST32(.031f, DB_SHIFT));\n      /* Find the band that's in the middle of the coded spectrum */\n      for (midband=0;eBands[midband+1] < eBands[mask_end]/2;midband++);\n      count_dynalloc=0;\n      for(i=0;i<mask_end;i++)\n      {\n         opus_val32 lin;\n         opus_val16 unmask;\n         lin = mask_avg + diff*(i-midband);\n         if (C==2)\n            unmask = MAX16(st->energy_mask[i], st->energy_mask[nbEBands+i]);\n         else\n            unmask = st->energy_mask[i];\n         unmask = MIN16(unmask, QCONST16(.0f, DB_SHIFT));\n         unmask -= lin;\n         if (unmask > QCONST16(.25f, DB_SHIFT))\n         {\n            surround_dynalloc[i] = unmask - QCONST16(.25f, DB_SHIFT);\n            count_dynalloc++;\n         }\n      }\n      if (count_dynalloc>=3)\n      {\n         /* If we need dynalloc in many bands, it's probably because our\n            initial masking rate was too low. */\n         mask_avg += QCONST16(.25f, DB_SHIFT);\n         if (mask_avg>0)\n         {\n            /* Something went really wrong in the original calculations,\n               disabling masking. */\n            mask_avg = 0;\n            diff = 0;\n            for(i=0;i<mask_end;i++)\n               surround_dynalloc[i] = 0;\n         } else {\n            for(i=0;i<mask_end;i++)\n               surround_dynalloc[i] = MAX16(0, surround_dynalloc[i]-QCONST16(.25f, DB_SHIFT));\n         }\n      }\n      mask_avg += QCONST16(.2f, DB_SHIFT);\n      /* Convert to 1/64th units used for the trim */\n      surround_trim = 64*diff;\n      /*printf(\"%d %d \", mask_avg, surround_trim);*/\n      surround_masking = mask_avg;\n   }\n   /* Temporal VBR (but not for LFE) */\n   if (!st->lfe)\n   {\n      opus_val16 follow=-QCONST16(10.0f,DB_SHIFT);\n      opus_val32 frame_avg=0;\n      opus_val16 offset = shortBlocks?HALF16(SHL16(LM, DB_SHIFT)):0;\n      for(i=st->start;i<st->end;i++)\n      {\n         follow = MAX16(follow-QCONST16(1.f, DB_SHIFT), bandLogE[i]-offset);\n         if (C==2)\n            follow = MAX16(follow, bandLogE[i+nbEBands]-offset);\n         frame_avg += follow;\n      }\n      frame_avg /= (st->end-st->start);\n      temporal_vbr = SUB16(frame_avg,st->spec_avg);\n      temporal_vbr = MIN16(QCONST16(3.f, DB_SHIFT), MAX16(-QCONST16(1.5f, DB_SHIFT), temporal_vbr));\n      st->spec_avg += MULT16_16_Q15(QCONST16(.02f, 15), temporal_vbr);\n   }\n   /*for (i=0;i<21;i++)\n      printf(\"%f \", bandLogE[i]);\n   printf(\"\\n\");*/\n\n   if (!secondMdct)\n   {\n      for (i=0;i<C*nbEBands;i++)\n         bandLogE2[i] = bandLogE[i];\n   }\n\n   /* Last chance to catch any transient we might have missed in the\n      time-domain analysis */\n   if (LM>0 && ec_tell(enc)+3<=total_bits && !isTransient && st->complexity>=5 && !st->lfe)\n   {\n      if (patch_transient_decision(bandLogE, oldBandE, nbEBands, st->end, C))\n      {\n         isTransient = 1;\n         shortBlocks = M;\n         compute_mdcts(mode, shortBlocks, in, freq, C, CC, LM, st->upsample);\n         compute_band_energies(mode, freq, bandE, effEnd, C, M);\n         amp2Log2(mode, effEnd, st->end, bandE, bandLogE, C);\n         /* Compensate for the scaling of short vs long mdcts */\n         for (i=0;i<C*nbEBands;i++)\n            bandLogE2[i] += HALF16(SHL16(LM, DB_SHIFT));\n         tf_estimate = QCONST16(.2f,14);\n      }\n   }\n\n   if (LM>0 && ec_tell(enc)+3<=total_bits)\n      ec_enc_bit_logp(enc, isTransient, 3);\n\n   ALLOC(X, C*N, celt_norm);         /**< Interleaved normalised MDCTs */\n\n   /* Band normalisation */\n   normalise_bands(mode, freq, X, bandE, effEnd, C, M);\n\n   ALLOC(tf_res, nbEBands, int);\n   /* Disable variable tf resolution for hybrid and at very low bitrate */\n   if (effectiveBytes>=15*C && st->start==0 && st->complexity>=2 && !st->lfe)\n   {\n      int lambda;\n      if (effectiveBytes<40)\n         lambda = 12;\n      else if (effectiveBytes<60)\n         lambda = 6;\n      else if (effectiveBytes<100)\n         lambda = 4;\n      else\n         lambda = 3;\n      lambda*=2;\n      tf_select = tf_analysis(mode, effEnd, isTransient, tf_res, lambda, X, N, LM, &tf_sum, tf_estimate, tf_chan);\n      for (i=effEnd;i<st->end;i++)\n         tf_res[i] = tf_res[effEnd-1];\n   } else {\n      tf_sum = 0;\n      for (i=0;i<st->end;i++)\n         tf_res[i] = isTransient;\n      tf_select=0;\n   }\n\n   ALLOC(error, C*nbEBands, opus_val16);\n   quant_coarse_energy(mode, st->start, st->end, effEnd, bandLogE,\n         oldBandE, total_bits, error, enc,\n         C, LM, nbAvailableBytes, st->force_intra,\n         &st->delayedIntra, st->complexity >= 4, st->loss_rate, st->lfe);\n\n   tf_encode(st->start, st->end, isTransient, tf_res, LM, tf_select, enc);\n\n   if (ec_tell(enc)+4<=total_bits)\n   {\n      if (st->lfe)\n      {\n         st->tapset_decision = 0;\n         st->spread_decision = SPREAD_NORMAL;\n      } else if (shortBlocks || st->complexity < 3 || nbAvailableBytes < 10*C || st->start != 0)\n      {\n         if (st->complexity == 0)\n            st->spread_decision = SPREAD_NONE;\n         else\n            st->spread_decision = SPREAD_NORMAL;\n      } else {\n         /* Disable new spreading+tapset estimator until we can show it works\n            better than the old one. So far it seems like spreading_decision()\n            works best. */\n#if 0\n         if (st->analysis.valid)\n         {\n            static const opus_val16 spread_thresholds[3] = {-QCONST16(.6f, 15), -QCONST16(.2f, 15), -QCONST16(.07f, 15)};\n            static const opus_val16 spread_histeresis[3] = {QCONST16(.15f, 15), QCONST16(.07f, 15), QCONST16(.02f, 15)};\n            static const opus_val16 tapset_thresholds[2] = {QCONST16(.0f, 15), QCONST16(.15f, 15)};\n            static const opus_val16 tapset_histeresis[2] = {QCONST16(.1f, 15), QCONST16(.05f, 15)};\n            st->spread_decision = hysteresis_decision(-st->analysis.tonality, spread_thresholds, spread_histeresis, 3, st->spread_decision);\n            st->tapset_decision = hysteresis_decision(st->analysis.tonality_slope, tapset_thresholds, tapset_histeresis, 2, st->tapset_decision);\n         } else\n#endif\n         {\n            st->spread_decision = spreading_decision(mode, X,\n                  &st->tonal_average, st->spread_decision, &st->hf_average,\n                  &st->tapset_decision, pf_on&&!shortBlocks, effEnd, C, M);\n         }\n         /*printf(\"%d %d\\n\", st->tapset_decision, st->spread_decision);*/\n         /*printf(\"%f %d %f %d\\n\\n\", st->analysis.tonality, st->spread_decision, st->analysis.tonality_slope, st->tapset_decision);*/\n      }\n      ec_enc_icdf(enc, st->spread_decision, spread_icdf, 5);\n   }\n\n   ALLOC(offsets, nbEBands, int);\n\n   maxDepth = dynalloc_analysis(bandLogE, bandLogE2, nbEBands, st->start, st->end, C, offsets,\n         st->lsb_depth, mode->logN, isTransient, st->vbr, st->constrained_vbr,\n         eBands, LM, effectiveBytes, &tot_boost, st->lfe, surround_dynalloc);\n   /* For LFE, everything interesting is in the first band */\n   if (st->lfe)\n      offsets[0] = IMIN(8, effectiveBytes/3);\n   ALLOC(cap, nbEBands, int);\n   init_caps(mode,cap,LM,C);\n\n   dynalloc_logp = 6;\n   total_bits<<=BITRES;\n   total_boost = 0;\n   tell = ec_tell_frac(enc);\n   for (i=st->start;i<st->end;i++)\n   {\n      int width, quanta;\n      int dynalloc_loop_logp;\n      int boost;\n      int j;\n      width = C*(eBands[i+1]-eBands[i])<<LM;\n      /* quanta is 6 bits, but no more than 1 bit/sample\n         and no less than 1/8 bit/sample */\n      quanta = IMIN(width<<BITRES, IMAX(6<<BITRES, width));\n      dynalloc_loop_logp = dynalloc_logp;\n      boost = 0;\n      for (j = 0; tell+(dynalloc_loop_logp<<BITRES) < total_bits-total_boost\n            && boost < cap[i]; j++)\n      {\n         int flag;\n         flag = j<offsets[i];\n         ec_enc_bit_logp(enc, flag, dynalloc_loop_logp);\n         tell = ec_tell_frac(enc);\n         if (!flag)\n            break;\n         boost += quanta;\n         total_boost += quanta;\n         dynalloc_loop_logp = 1;\n      }\n      /* Making dynalloc more likely */\n      if (j)\n         dynalloc_logp = IMAX(2, dynalloc_logp-1);\n      offsets[i] = boost;\n   }\n\n   if (C==2)\n   {\n      static const opus_val16 intensity_thresholds[21]=\n      /* 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19  20  off*/\n        {  1, 2, 3, 4, 5, 6, 7, 8,16,24,36,44,50,56,62,67,72,79,88,106,134};\n      static const opus_val16 intensity_histeresis[21]=\n        {  1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 5, 6,  8, 8};\n\n      /* Always use MS for 2.5 ms frames until we can do a better analysis */\n      if (LM!=0)\n         dual_stereo = stereo_analysis(mode, X, LM, N);\n\n      st->intensity = hysteresis_decision((opus_val16)(equiv_rate/1000),\n            intensity_thresholds, intensity_histeresis, 21, st->intensity);\n      st->intensity = IMIN(st->end,IMAX(st->start, st->intensity));\n   }\n\n   alloc_trim = 5;\n   if (tell+(6<<BITRES) <= total_bits - total_boost)\n   {\n      if (st->lfe)\n         alloc_trim = 5;\n      else\n         alloc_trim = alloc_trim_analysis(mode, X, bandLogE,\n            st->end, LM, C, N, &st->analysis, &st->stereo_saving, tf_estimate, st->intensity, surround_trim);\n      ec_enc_icdf(enc, alloc_trim, trim_icdf, 7);\n      tell = ec_tell_frac(enc);\n   }\n\n   /* Variable bitrate */\n   if (vbr_rate>0)\n   {\n     opus_val16 alpha;\n     opus_int32 delta;\n     /* The target rate in 8th bits per frame */\n     opus_int32 target, base_target;\n     opus_int32 min_allowed;\n     int lm_diff = mode->maxLM - LM;\n\n     /* Don't attempt to use more than 510 kb/s, even for frames smaller than 20 ms.\n        The CELT allocator will just not be able to use more than that anyway. */\n     nbCompressedBytes = IMIN(nbCompressedBytes,1275>>(3-LM));\n     base_target = vbr_rate - ((40*C+20)<<BITRES);\n\n     if (st->constrained_vbr)\n        base_target += (st->vbr_offset>>lm_diff);\n\n     target = compute_vbr(mode, &st->analysis, base_target, LM, equiv_rate,\n           st->lastCodedBands, C, st->intensity, st->constrained_vbr,\n           st->stereo_saving, tot_boost, tf_estimate, pitch_change, maxDepth,\n           st->variable_duration, st->lfe, st->energy_mask!=NULL, surround_masking,\n           temporal_vbr);\n\n     /* The current offset is removed from the target and the space used\n        so far is added*/\n     target=target+tell;\n     /* In VBR mode the frame size must not be reduced so much that it would\n         result in the encoder running out of bits.\n        The margin of 2 bytes ensures that none of the bust-prevention logic\n         in the decoder will have triggered so far. */\n     min_allowed = ((tell+total_boost+(1<<(BITRES+3))-1)>>(BITRES+3)) + 2 - nbFilledBytes;\n\n     nbAvailableBytes = (target+(1<<(BITRES+2)))>>(BITRES+3);\n     nbAvailableBytes = IMAX(min_allowed,nbAvailableBytes);\n     nbAvailableBytes = IMIN(nbCompressedBytes,nbAvailableBytes+nbFilledBytes) - nbFilledBytes;\n\n     /* By how much did we \"miss\" the target on that frame */\n     delta = target - vbr_rate;\n\n     target=nbAvailableBytes<<(BITRES+3);\n\n     /*If the frame is silent we don't adjust our drift, otherwise\n       the encoder will shoot to very high rates after hitting a\n       span of silence, but we do allow the bitres to refill.\n       This means that we'll undershoot our target in CVBR/VBR modes\n       on files with lots of silence. */\n     if(silence)\n     {\n       nbAvailableBytes = 2;\n       target = 2*8<<BITRES;\n       delta = 0;\n     }\n\n     if (st->vbr_count < 970)\n     {\n        st->vbr_count++;\n        alpha = celt_rcp(SHL32(EXTEND32(st->vbr_count+20),16));\n     } else\n        alpha = QCONST16(.001f,15);\n     /* How many bits have we used in excess of what we're allowed */\n     if (st->constrained_vbr)\n        st->vbr_reservoir += target - vbr_rate;\n     /*printf (\"%d\\n\", st->vbr_reservoir);*/\n\n     /* Compute the offset we need to apply in order to reach the target */\n     if (st->constrained_vbr)\n     {\n        st->vbr_drift += (opus_int32)MULT16_32_Q15(alpha,(delta*(1<<lm_diff))-st->vbr_offset-st->vbr_drift);\n        st->vbr_offset = -st->vbr_drift;\n     }\n     /*printf (\"%d\\n\", st->vbr_drift);*/\n\n     if (st->constrained_vbr && st->vbr_reservoir < 0)\n     {\n        /* We're under the min value -- increase rate */\n        int adjust = (-st->vbr_reservoir)/(8<<BITRES);\n        /* Unless we're just coding silence */\n        nbAvailableBytes += silence?0:adjust;\n        st->vbr_reservoir = 0;\n        /*printf (\"+%d\\n\", adjust);*/\n     }\n     nbCompressedBytes = IMIN(nbCompressedBytes,nbAvailableBytes+nbFilledBytes);\n     /*printf(\"%d\\n\", nbCompressedBytes*50*8);*/\n     /* This moves the raw bits to take into account the new compressed size */\n     ec_enc_shrink(enc, nbCompressedBytes);\n   }\n\n   /* Bit allocation */\n   ALLOC(fine_quant, nbEBands, int);\n   ALLOC(pulses, nbEBands, int);\n   ALLOC(fine_priority, nbEBands, int);\n\n   /* bits =           packet size                    - where we are - safety*/\n   bits = (((opus_int32)nbCompressedBytes*8)<<BITRES) - ec_tell_frac(enc) - 1;\n   anti_collapse_rsv = isTransient&&LM>=2&&bits>=((LM+2)<<BITRES) ? (1<<BITRES) : 0;\n   bits -= anti_collapse_rsv;\n   signalBandwidth = st->end-1;\n#ifndef DISABLE_FLOAT_API\n   if (st->analysis.valid)\n   {\n      int min_bandwidth;\n      if (equiv_rate < (opus_int32)32000*C)\n         min_bandwidth = 13;\n      else if (equiv_rate < (opus_int32)48000*C)\n         min_bandwidth = 16;\n      else if (equiv_rate < (opus_int32)60000*C)\n         min_bandwidth = 18;\n      else  if (equiv_rate < (opus_int32)80000*C)\n         min_bandwidth = 19;\n      else\n         min_bandwidth = 20;\n      signalBandwidth = IMAX(st->analysis.bandwidth, min_bandwidth);\n   }\n#endif\n   if (st->lfe)\n      signalBandwidth = 1;\n   codedBands = compute_allocation(mode, st->start, st->end, offsets, cap,\n         alloc_trim, &st->intensity, &dual_stereo, bits, &balance, pulses,\n         fine_quant, fine_priority, C, LM, enc, 1, st->lastCodedBands, signalBandwidth);\n   if (st->lastCodedBands)\n      st->lastCodedBands = IMIN(st->lastCodedBands+1,IMAX(st->lastCodedBands-1,codedBands));\n   else\n      st->lastCodedBands = codedBands;\n\n   quant_fine_energy(mode, st->start, st->end, oldBandE, error, fine_quant, enc, C);\n\n   /* Residual quantisation */\n   ALLOC(collapse_masks, C*nbEBands, unsigned char);\n   quant_all_bands(1, mode, st->start, st->end, X, C==2 ? X+N : NULL, collapse_masks,\n         bandE, pulses, shortBlocks, st->spread_decision, dual_stereo, st->intensity, tf_res,\n         nbCompressedBytes*(8<<BITRES)-anti_collapse_rsv, balance, enc, LM, codedBands, &st->rng);\n\n   if (anti_collapse_rsv > 0)\n   {\n      anti_collapse_on = st->consec_transient<2;\n#ifdef FUZZING\n      anti_collapse_on = rand()&0x1;\n#endif\n      ec_enc_bits(enc, anti_collapse_on, 1);\n   }\n   quant_energy_finalise(mode, st->start, st->end, oldBandE, error, fine_quant, fine_priority, nbCompressedBytes*8-ec_tell(enc), enc, C);\n\n   if (silence)\n   {\n      for (i=0;i<C*nbEBands;i++)\n         oldBandE[i] = -QCONST16(28.f,DB_SHIFT);\n   }\n\n#ifdef RESYNTH\n   /* Re-synthesis of the coded audio if required */\n   {\n      celt_sig *out_mem[2];\n\n      if (anti_collapse_on)\n      {\n         anti_collapse(mode, X, collapse_masks, LM, C, N,\n               st->start, st->end, oldBandE, oldLogE, oldLogE2, pulses, st->rng);\n      }\n\n      if (silence)\n      {\n         for (i=0;i<C*N;i++)\n            freq[i] = 0;\n      } else {\n         /* Synthesis */\n         denormalise_bands(mode, X, freq, oldBandE, st->start, effEnd, C, M);\n      }\n\n      c=0; do {\n         OPUS_MOVE(st->syn_mem[c], st->syn_mem[c]+N, 2*MAX_PERIOD-N+overlap/2);\n      } while (++c<CC);\n\n      if (CC==2&&C==1)\n      {\n         for (i=0;i<N;i++)\n            freq[N+i] = freq[i];\n      }\n\n      c=0; do {\n         out_mem[c] = st->syn_mem[c]+2*MAX_PERIOD-N;\n      } while (++c<CC);\n\n      compute_inv_mdcts(mode, shortBlocks, freq, out_mem, CC, LM);\n\n      c=0; do {\n         st->prefilter_period=IMAX(st->prefilter_period, COMBFILTER_MINPERIOD);\n         st->prefilter_period_old=IMAX(st->prefilter_period_old, COMBFILTER_MINPERIOD);\n         comb_filter(out_mem[c], out_mem[c], st->prefilter_period_old, st->prefilter_period, mode->shortMdctSize,\n               st->prefilter_gain_old, st->prefilter_gain, st->prefilter_tapset_old, st->prefilter_tapset,\n               mode->window, st->overlap);\n         if (LM!=0)\n            comb_filter(out_mem[c]+mode->shortMdctSize, out_mem[c]+mode->shortMdctSize, st->prefilter_period, pitch_index, N-mode->shortMdctSize,\n                  st->prefilter_gain, gain1, st->prefilter_tapset, prefilter_tapset,\n                  mode->window, overlap);\n      } while (++c<CC);\n\n      /* We reuse freq[] as scratch space for the de-emphasis */\n      deemphasis(out_mem, (opus_val16*)pcm, N, CC, st->upsample, mode->preemph, st->preemph_memD, freq);\n      st->prefilter_period_old = st->prefilter_period;\n      st->prefilter_gain_old = st->prefilter_gain;\n      st->prefilter_tapset_old = st->prefilter_tapset;\n   }\n#endif\n\n   st->prefilter_period = pitch_index;\n   st->prefilter_gain = gain1;\n   st->prefilter_tapset = prefilter_tapset;\n#ifdef RESYNTH\n   if (LM!=0)\n   {\n      st->prefilter_period_old = st->prefilter_period;\n      st->prefilter_gain_old = st->prefilter_gain;\n      st->prefilter_tapset_old = st->prefilter_tapset;\n   }\n#endif\n\n   if (CC==2&&C==1) {\n      for (i=0;i<nbEBands;i++)\n         oldBandE[nbEBands+i]=oldBandE[i];\n   }\n\n   if (!isTransient)\n   {\n      for (i=0;i<CC*nbEBands;i++)\n         oldLogE2[i] = oldLogE[i];\n      for (i=0;i<CC*nbEBands;i++)\n         oldLogE[i] = oldBandE[i];\n   } else {\n      for (i=0;i<CC*nbEBands;i++)\n         oldLogE[i] = MIN16(oldLogE[i], oldBandE[i]);\n   }\n   /* In case start or end were to change */\n   c=0; do\n   {\n      for (i=0;i<st->start;i++)\n      {\n         oldBandE[c*nbEBands+i]=0;\n         oldLogE[c*nbEBands+i]=oldLogE2[c*nbEBands+i]=-QCONST16(28.f,DB_SHIFT);\n      }\n      for (i=st->end;i<nbEBands;i++)\n      {\n         oldBandE[c*nbEBands+i]=0;\n         oldLogE[c*nbEBands+i]=oldLogE2[c*nbEBands+i]=-QCONST16(28.f,DB_SHIFT);\n      }\n   } while (++c<CC);\n\n   if (isTransient || transient_got_disabled)\n      st->consec_transient++;\n   else\n      st->consec_transient=0;\n   st->rng = enc->rng;\n\n   /* If there's any room left (can only happen for very high rates),\n      it's already filled with zeros */\n   ec_enc_done(enc);\n\n#ifdef CUSTOM_MODES\n   if (st->signalling)\n      nbCompressedBytes++;\n#endif\n\n   RESTORE_STACK;\n   if (ec_get_error(enc))\n      return OPUS_INTERNAL_ERROR;\n   else\n      return nbCompressedBytes;\n}\n\n\n#ifdef CUSTOM_MODES\n\n#ifdef FIXED_POINT\nint opus_custom_encode(CELTEncoder * OPUS_RESTRICT st, const opus_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes)\n{\n   return celt_encode_with_ec(st, pcm, frame_size, compressed, nbCompressedBytes, NULL);\n}\n\n#ifndef DISABLE_FLOAT_API\nint opus_custom_encode_float(CELTEncoder * OPUS_RESTRICT st, const float * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes)\n{\n   int j, ret, C, N;\n   VARDECL(opus_int16, in);\n   ALLOC_STACK;\n\n   if (pcm==NULL)\n      return OPUS_BAD_ARG;\n\n   C = st->channels;\n   N = frame_size;\n   ALLOC(in, C*N, opus_int16);\n\n   for (j=0;j<C*N;j++)\n     in[j] = FLOAT2INT16(pcm[j]);\n\n   ret=celt_encode_with_ec(st,in,frame_size,compressed,nbCompressedBytes, NULL);\n#ifdef RESYNTH\n   for (j=0;j<C*N;j++)\n      ((float*)pcm)[j]=in[j]*(1.f/32768.f);\n#endif\n   RESTORE_STACK;\n   return ret;\n}\n#endif /* DISABLE_FLOAT_API */\n#else\n\nint opus_custom_encode(CELTEncoder * OPUS_RESTRICT st, const opus_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes)\n{\n   int j, ret, C, N;\n   VARDECL(celt_sig, in);\n   ALLOC_STACK;\n\n   if (pcm==NULL)\n      return OPUS_BAD_ARG;\n\n   C=st->channels;\n   N=frame_size;\n   ALLOC(in, C*N, celt_sig);\n   for (j=0;j<C*N;j++) {\n     in[j] = SCALEOUT(pcm[j]);\n   }\n\n   ret = celt_encode_with_ec(st,in,frame_size,compressed,nbCompressedBytes, NULL);\n#ifdef RESYNTH\n   for (j=0;j<C*N;j++)\n      ((opus_int16*)pcm)[j] = FLOAT2INT16(in[j]);\n#endif\n   RESTORE_STACK;\n   return ret;\n}\n\nint opus_custom_encode_float(CELTEncoder * OPUS_RESTRICT st, const float * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes)\n{\n   return celt_encode_with_ec(st, pcm, frame_size, compressed, nbCompressedBytes, NULL);\n}\n\n#endif\n\n#endif /* CUSTOM_MODES */\n\nint opus_custom_encoder_ctl(CELTEncoder * OPUS_RESTRICT st, int request, ...)\n{\n   va_list ap;\n\n   va_start(ap, request);\n   switch (request)\n   {\n      case OPUS_SET_COMPLEXITY_REQUEST:\n      {\n         int value = va_arg(ap, opus_int32);\n         if (value<0 || value>10)\n            goto bad_arg;\n         st->complexity = value;\n      }\n      break;\n      case CELT_SET_START_BAND_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         if (value<0 || value>=st->mode->nbEBands)\n            goto bad_arg;\n         st->start = value;\n      }\n      break;\n      case CELT_SET_END_BAND_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         if (value<1 || value>st->mode->nbEBands)\n            goto bad_arg;\n         st->end = value;\n      }\n      break;\n      case CELT_SET_PREDICTION_REQUEST:\n      {\n         int value = va_arg(ap, opus_int32);\n         if (value<0 || value>2)\n            goto bad_arg;\n         st->disable_pf = value<=1;\n         st->force_intra = value==0;\n      }\n      break;\n      case OPUS_SET_PACKET_LOSS_PERC_REQUEST:\n      {\n         int value = va_arg(ap, opus_int32);\n         if (value<0 || value>100)\n            goto bad_arg;\n         st->loss_rate = value;\n      }\n      break;\n      case OPUS_SET_VBR_CONSTRAINT_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         st->constrained_vbr = value;\n      }\n      break;\n      case OPUS_SET_VBR_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         st->vbr = value;\n      }\n      break;\n      case OPUS_SET_BITRATE_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         if (value<=500 && value!=OPUS_BITRATE_MAX)\n            goto bad_arg;\n         value = IMIN(value, 260000*st->channels);\n         st->bitrate = value;\n      }\n      break;\n      case CELT_SET_CHANNELS_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         if (value<1 || value>2)\n            goto bad_arg;\n         st->stream_channels = value;\n      }\n      break;\n      case OPUS_SET_LSB_DEPTH_REQUEST:\n      {\n          opus_int32 value = va_arg(ap, opus_int32);\n          if (value<8 || value>24)\n             goto bad_arg;\n          st->lsb_depth=value;\n      }\n      break;\n      case OPUS_GET_LSB_DEPTH_REQUEST:\n      {\n          opus_int32 *value = va_arg(ap, opus_int32*);\n          *value=st->lsb_depth;\n      }\n      break;\n      case OPUS_SET_EXPERT_FRAME_DURATION_REQUEST:\n      {\n          opus_int32 value = va_arg(ap, opus_int32);\n          st->variable_duration = value;\n      }\n      break;\n      case OPUS_RESET_STATE:\n      {\n         int i;\n         opus_val16 *oldBandE, *oldLogE, *oldLogE2;\n         oldBandE = (opus_val16*)(st->in_mem+st->channels*(st->overlap+COMBFILTER_MAXPERIOD));\n         oldLogE = oldBandE + st->channels*st->mode->nbEBands;\n         oldLogE2 = oldLogE + st->channels*st->mode->nbEBands;\n         OPUS_CLEAR((char*)&st->ENCODER_RESET_START,\n               opus_custom_encoder_get_size(st->mode, st->channels)-\n               ((char*)&st->ENCODER_RESET_START - (char*)st));\n         for (i=0;i<st->channels*st->mode->nbEBands;i++)\n            oldLogE[i]=oldLogE2[i]=-QCONST16(28.f,DB_SHIFT);\n         st->vbr_offset = 0;\n         st->delayedIntra = 1;\n         st->spread_decision = SPREAD_NORMAL;\n         st->tonal_average = 256;\n         st->hf_average = 0;\n         st->tapset_decision = 0;\n      }\n      break;\n#ifdef CUSTOM_MODES\n      case CELT_SET_INPUT_CLIPPING_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         st->clip = value;\n      }\n      break;\n#endif\n      case CELT_SET_SIGNALLING_REQUEST:\n      {\n         opus_int32 value = va_arg(ap, opus_int32);\n         st->signalling = value;\n      }\n      break;\n      case CELT_SET_ANALYSIS_REQUEST:\n      {\n         AnalysisInfo *info = va_arg(ap, AnalysisInfo *);\n         if (info)\n            OPUS_COPY(&st->analysis, info, 1);\n      }\n      break;\n      case CELT_GET_MODE_REQUEST:\n      {\n         const CELTMode ** value = va_arg(ap, const CELTMode**);\n         if (value==0)\n            goto bad_arg;\n         *value=st->mode;\n      }\n      break;\n      case OPUS_GET_FINAL_RANGE_REQUEST:\n      {\n         opus_uint32 * value = va_arg(ap, opus_uint32 *);\n         if (value==0)\n            goto bad_arg;\n         *value=st->rng;\n      }\n      break;\n      case OPUS_SET_LFE_REQUEST:\n      {\n          opus_int32 value = va_arg(ap, opus_int32);\n          st->lfe = value;\n      }\n      break;\n      case OPUS_SET_ENERGY_MASK_REQUEST:\n      {\n          opus_val16 *value = va_arg(ap, opus_val16*);\n          st->energy_mask = value;\n      }\n      break;\n      default:\n         goto bad_request;\n   }\n   va_end(ap);\n   return OPUS_OK;\nbad_arg:\n   va_end(ap);\n   return OPUS_BAD_ARG;\nbad_request:\n   va_end(ap);\n   return OPUS_UNIMPLEMENTED;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/celt_lpc.c",
    "content": "/* Copyright (c) 2009-2010 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"celt_lpc.h\"\n#include \"stack_alloc.h\"\n#include \"mathops.h\"\n#include \"pitch.h\"\n\nvoid _celt_lpc(\n      opus_val16       *_lpc, /* out: [0...p-1] LPC coefficients      */\nconst opus_val32 *ac,  /* in:  [0...p] autocorrelation values  */\nint          p\n)\n{\n   int i, j;\n   opus_val32 r;\n   opus_val32 error = ac[0];\n#ifdef FIXED_POINT\n   opus_val32 lpc[LPC_ORDER];\n#else\n   float *lpc = _lpc;\n#endif\n\n   for (i = 0; i < p; i++)\n      lpc[i] = 0;\n   if (ac[0] != 0)\n   {\n      for (i = 0; i < p; i++) {\n         /* Sum up this iteration's reflection coefficient */\n         opus_val32 rr = 0;\n         for (j = 0; j < i; j++)\n            rr += MULT32_32_Q31(lpc[j],ac[i - j]);\n         rr += SHR32(ac[i + 1],3);\n         r = -frac_div32(SHL32(rr,3), error);\n         /*  Update LPC coefficients and total error */\n         lpc[i] = SHR32(r,3);\n         for (j = 0; j < (i+1)>>1; j++)\n         {\n            opus_val32 tmp1, tmp2;\n            tmp1 = lpc[j];\n            tmp2 = lpc[i-1-j];\n            lpc[j]     = tmp1 + MULT32_32_Q31(r,tmp2);\n            lpc[i-1-j] = tmp2 + MULT32_32_Q31(r,tmp1);\n         }\n\n         error = error - MULT32_32_Q31(MULT32_32_Q31(r,r),error);\n         /* Bail out once we get 30 dB gain */\n#ifdef FIXED_POINT\n         if (error<SHR32(ac[0],10))\n            break;\n#else\n         if (error<.001f*ac[0])\n            break;\n#endif\n      }\n   }\n#ifdef FIXED_POINT\n   for (i=0;i<p;i++)\n      _lpc[i] = ROUND16(lpc[i],16);\n#endif\n}\n\nvoid celt_fir(const opus_val16 *_x,\n         const opus_val16 *num,\n         opus_val16 *_y,\n         int N,\n         int ord,\n         opus_val16 *mem)\n{\n   int i,j;\n   VARDECL(opus_val16, rnum);\n   VARDECL(opus_val16, x);\n   SAVE_STACK;\n\n   ALLOC(rnum, ord, opus_val16);\n   ALLOC(x, N+ord, opus_val16);\n   for(i=0;i<ord;i++)\n      rnum[i] = num[ord-i-1];\n   for(i=0;i<ord;i++)\n      x[i] = mem[ord-i-1];\n   for (i=0;i<N;i++)\n      x[i+ord]=_x[i];\n   for(i=0;i<ord;i++)\n      mem[i] = _x[N-i-1];\n#ifdef SMALL_FOOTPRINT\n   for (i=0;i<N;i++)\n   {\n      opus_val32 sum = SHL32(EXTEND32(_x[i]), SIG_SHIFT);\n      for (j=0;j<ord;j++)\n      {\n         sum = MAC16_16(sum,rnum[j],x[i+j]);\n      }\n      _y[i] = SATURATE16(PSHR32(sum, SIG_SHIFT));\n   }\n#else\n   for (i=0;i<N-3;i+=4)\n   {\n      opus_val32 sum[4]={0,0,0,0};\n      xcorr_kernel(rnum, x+i, sum, ord);\n      _y[i  ] = SATURATE16(ADD32(EXTEND32(_x[i  ]), PSHR32(sum[0], SIG_SHIFT)));\n      _y[i+1] = SATURATE16(ADD32(EXTEND32(_x[i+1]), PSHR32(sum[1], SIG_SHIFT)));\n      _y[i+2] = SATURATE16(ADD32(EXTEND32(_x[i+2]), PSHR32(sum[2], SIG_SHIFT)));\n      _y[i+3] = SATURATE16(ADD32(EXTEND32(_x[i+3]), PSHR32(sum[3], SIG_SHIFT)));\n   }\n   for (;i<N;i++)\n   {\n      opus_val32 sum = 0;\n      for (j=0;j<ord;j++)\n         sum = MAC16_16(sum,rnum[j],x[i+j]);\n      _y[i] = SATURATE16(ADD32(EXTEND32(_x[i]), PSHR32(sum, SIG_SHIFT)));\n   }\n#endif\n   RESTORE_STACK;\n}\n\nvoid celt_iir(const opus_val32 *_x,\n         const opus_val16 *den,\n         opus_val32 *_y,\n         int N,\n         int ord,\n         opus_val16 *mem)\n{\n#ifdef SMALL_FOOTPRINT\n   int i,j;\n   for (i=0;i<N;i++)\n   {\n      opus_val32 sum = _x[i];\n      for (j=0;j<ord;j++)\n      {\n         sum -= MULT16_16(den[j],mem[j]);\n      }\n      for (j=ord-1;j>=1;j--)\n      {\n         mem[j]=mem[j-1];\n      }\n      mem[0] = ROUND16(sum,SIG_SHIFT);\n      _y[i] = sum;\n   }\n#else\n   int i,j;\n   VARDECL(opus_val16, rden);\n   VARDECL(opus_val16, y);\n   SAVE_STACK;\n\n   celt_assert((ord&3)==0);\n   ALLOC(rden, ord, opus_val16);\n   ALLOC(y, N+ord, opus_val16);\n   for(i=0;i<ord;i++)\n      rden[i] = den[ord-i-1];\n   for(i=0;i<ord;i++)\n      y[i] = -mem[ord-i-1];\n   for(;i<N+ord;i++)\n      y[i]=0;\n   for (i=0;i<N-3;i+=4)\n   {\n      /* Unroll by 4 as if it were an FIR filter */\n      opus_val32 sum[4];\n      sum[0]=_x[i];\n      sum[1]=_x[i+1];\n      sum[2]=_x[i+2];\n      sum[3]=_x[i+3];\n      xcorr_kernel(rden, y+i, sum, ord);\n\n      /* Patch up the result to compensate for the fact that this is an IIR */\n      y[i+ord  ] = -ROUND16(sum[0],SIG_SHIFT);\n      _y[i  ] = sum[0];\n      sum[1] = MAC16_16(sum[1], y[i+ord  ], den[0]);\n      y[i+ord+1] = -ROUND16(sum[1],SIG_SHIFT);\n      _y[i+1] = sum[1];\n      sum[2] = MAC16_16(sum[2], y[i+ord+1], den[0]);\n      sum[2] = MAC16_16(sum[2], y[i+ord  ], den[1]);\n      y[i+ord+2] = -ROUND16(sum[2],SIG_SHIFT);\n      _y[i+2] = sum[2];\n\n      sum[3] = MAC16_16(sum[3], y[i+ord+2], den[0]);\n      sum[3] = MAC16_16(sum[3], y[i+ord+1], den[1]);\n      sum[3] = MAC16_16(sum[3], y[i+ord  ], den[2]);\n      y[i+ord+3] = -ROUND16(sum[3],SIG_SHIFT);\n      _y[i+3] = sum[3];\n   }\n   for (;i<N;i++)\n   {\n      opus_val32 sum = _x[i];\n      for (j=0;j<ord;j++)\n         sum -= MULT16_16(rden[j],y[i+j]);\n      y[i+ord] = ROUND16(sum,SIG_SHIFT);\n      _y[i] = sum;\n   }\n   for(i=0;i<ord;i++)\n      mem[i] = _y[N-i-1];\n   RESTORE_STACK;\n#endif\n}\n\nint _celt_autocorr(\n                   const opus_val16 *x,   /*  in: [0...n-1] samples x   */\n                   opus_val32       *ac,  /* out: [0...lag-1] ac values */\n                   const opus_val16       *window,\n                   int          overlap,\n                   int          lag,\n                   int          n,\n                   int          arch\n                  )\n{\n   opus_val32 d;\n   int i, k;\n   int fastN=n-lag;\n   int shift;\n   const opus_val16 *xptr;\n   VARDECL(opus_val16, xx);\n   SAVE_STACK;\n   ALLOC(xx, n, opus_val16);\n   celt_assert(n>0);\n   celt_assert(overlap>=0);\n   if (overlap == 0)\n   {\n      xptr = x;\n   } else {\n      for (i=0;i<n;i++)\n         xx[i] = x[i];\n      for (i=0;i<overlap;i++)\n      {\n         xx[i] = MULT16_16_Q15(x[i],window[i]);\n         xx[n-i-1] = MULT16_16_Q15(x[n-i-1],window[i]);\n      }\n      xptr = xx;\n   }\n   shift=0;\n#ifdef FIXED_POINT\n   {\n      opus_val32 ac0;\n      ac0 = 1+(n<<7);\n      if (n&1) ac0 += SHR32(MULT16_16(xptr[0],xptr[0]),9);\n      for(i=(n&1);i<n;i+=2)\n      {\n         ac0 += SHR32(MULT16_16(xptr[i],xptr[i]),9);\n         ac0 += SHR32(MULT16_16(xptr[i+1],xptr[i+1]),9);\n      }\n\n      shift = celt_ilog2(ac0)-30+10;\n      shift = (shift)/2;\n      if (shift>0)\n      {\n         for(i=0;i<n;i++)\n            xx[i] = PSHR32(xptr[i], shift);\n         xptr = xx;\n      } else\n         shift = 0;\n   }\n#endif\n   celt_pitch_xcorr(xptr, xptr, ac, fastN, lag+1, arch);\n   for (k=0;k<=lag;k++)\n   {\n      for (i = k+fastN, d = 0; i < n; i++)\n         d = MAC16_16(d, xptr[i], xptr[i-k]);\n      ac[k] += d;\n   }\n#ifdef FIXED_POINT\n   shift = 2*shift;\n   if (shift<=0)\n      ac[0] += SHL32((opus_int32)1, -shift);\n   if (ac[0] < 268435456)\n   {\n      int shift2 = 29 - EC_ILOG(ac[0]);\n      for (i=0;i<=lag;i++)\n         ac[i] = SHL32(ac[i], shift2);\n      shift -= shift2;\n   } else if (ac[0] >= 536870912)\n   {\n      int shift2=1;\n      if (ac[0] >= 1073741824)\n         shift2++;\n      for (i=0;i<=lag;i++)\n         ac[i] = SHR32(ac[i], shift2);\n      shift += shift2;\n   }\n#endif\n\n   RESTORE_STACK;\n   return shift;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/celt_lpc.h",
    "content": "/* Copyright (c) 2009-2010 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef PLC_H\n#define PLC_H\n\n#include \"arch.h\"\n\n#define LPC_ORDER 24\n\nvoid _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p);\n\nvoid celt_fir(const opus_val16 *x,\n         const opus_val16 *num,\n         opus_val16 *y,\n         int N,\n         int ord,\n         opus_val16 *mem);\n\nvoid celt_iir(const opus_val32 *x,\n         const opus_val16 *den,\n         opus_val32 *y,\n         int N,\n         int ord,\n         opus_val16 *mem);\n\nint _celt_autocorr(const opus_val16 *x, opus_val32 *ac,\n         const opus_val16 *window, int overlap, int lag, int n, int arch);\n\n#endif /* PLC_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/cpu_support.h",
    "content": "/* Copyright (c) 2010 Xiph.Org Foundation\n * Copyright (c) 2013 Parrot */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef CPU_SUPPORT_H\n#define CPU_SUPPORT_H\n\n#include \"opus_types.h\"\n#include \"opus_defines.h\"\n\n#if defined(OPUS_HAVE_RTCD) && defined(OPUS_ARM_ASM)\n#include \"arm/armcpu.h\"\n\n/* We currently support 4 ARM variants:\n * arch[0] -> ARMv4\n * arch[1] -> ARMv5E\n * arch[2] -> ARMv6\n * arch[3] -> NEON\n */\n#define OPUS_ARCHMASK 3\n\n#else\n#define OPUS_ARCHMASK 0\n\nstatic OPUS_INLINE int opus_select_arch(void)\n{\n  return 0;\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/cwrs.c",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Copyright (c) 2007-2009 Timothy B. Terriberry\n   Written by Timothy B. Terriberry and Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"os_support.h\"\n#include \"cwrs.h\"\n#include \"mathops.h\"\n#include \"arch.h\"\n\n#ifdef CUSTOM_MODES\n\n/*Guaranteed to return a conservatively large estimate of the binary logarithm\n   with frac bits of fractional precision.\n  Tested for all possible 32-bit inputs with frac=4, where the maximum\n   overestimation is 0.06254243 bits.*/\nint log2_frac(opus_uint32 val, int frac)\n{\n  int l;\n  l=EC_ILOG(val);\n  if(val&(val-1)){\n    /*This is (val>>l-16), but guaranteed to round up, even if adding a bias\n       before the shift would cause overflow (e.g., for 0xFFFFxxxx).\n       Doesn't work for val=0, but that case fails the test above.*/\n    if(l>16)val=((val-1)>>(l-16))+1;\n    else val<<=16-l;\n    l=(l-1)<<frac;\n    /*Note that we always need one iteration, since the rounding up above means\n       that we might need to adjust the integer part of the logarithm.*/\n    do{\n      int b;\n      b=(int)(val>>16);\n      l+=b<<frac;\n      val=(val+b)>>b;\n      val=(val*val+0x7FFF)>>15;\n    }\n    while(frac-->0);\n    /*If val is not exactly 0x8000, then we have to round up the remainder.*/\n    return l+(val>0x8000);\n  }\n  /*Exact powers of two require no rounding.*/\n  else return (l-1)<<frac;\n}\n#endif\n\n/*Although derived separately, the pulse vector coding scheme is equivalent to\n   a Pyramid Vector Quantizer \\cite{Fis86}.\n  Some additional notes about an early version appear at\n   http://people.xiph.org/~tterribe/notes/cwrs.html, but the codebook ordering\n   and the definitions of some terms have evolved since that was written.\n\n  The conversion from a pulse vector to an integer index (encoding) and back\n   (decoding) is governed by two related functions, V(N,K) and U(N,K).\n\n  V(N,K) = the number of combinations, with replacement, of N items, taken K\n   at a time, when a sign bit is added to each item taken at least once (i.e.,\n   the number of N-dimensional unit pulse vectors with K pulses).\n  One way to compute this is via\n    V(N,K) = K>0 ? sum(k=1...K,2**k*choose(N,k)*choose(K-1,k-1)) : 1,\n   where choose() is the binomial function.\n  A table of values for N<10 and K<10 looks like:\n  V[10][10] = {\n    {1,  0,   0,    0,    0,     0,     0,      0,      0,       0},\n    {1,  2,   2,    2,    2,     2,     2,      2,      2,       2},\n    {1,  4,   8,   12,   16,    20,    24,     28,     32,      36},\n    {1,  6,  18,   38,   66,   102,   146,    198,    258,     326},\n    {1,  8,  32,   88,  192,   360,   608,    952,   1408,    1992},\n    {1, 10,  50,  170,  450,  1002,  1970,   3530,   5890,    9290},\n    {1, 12,  72,  292,  912,  2364,  5336,  10836,  20256,   35436},\n    {1, 14,  98,  462, 1666,  4942, 12642,  28814,  59906,  115598},\n    {1, 16, 128,  688, 2816,  9424, 27008,  68464, 157184,  332688},\n    {1, 18, 162,  978, 4482, 16722, 53154, 148626, 374274,  864146}\n  };\n\n  U(N,K) = the number of such combinations wherein N-1 objects are taken at\n   most K-1 at a time.\n  This is given by\n    U(N,K) = sum(k=0...K-1,V(N-1,k))\n           = K>0 ? (V(N-1,K-1) + V(N,K-1))/2 : 0.\n  The latter expression also makes clear that U(N,K) is half the number of such\n   combinations wherein the first object is taken at least once.\n  Although it may not be clear from either of these definitions, U(N,K) is the\n   natural function to work with when enumerating the pulse vector codebooks,\n   not V(N,K).\n  U(N,K) is not well-defined for N=0, but with the extension\n    U(0,K) = K>0 ? 0 : 1,\n   the function becomes symmetric: U(N,K) = U(K,N), with a similar table:\n  U[10][10] = {\n    {1, 0,  0,   0,    0,    0,     0,     0,      0,      0},\n    {0, 1,  1,   1,    1,    1,     1,     1,      1,      1},\n    {0, 1,  3,   5,    7,    9,    11,    13,     15,     17},\n    {0, 1,  5,  13,   25,   41,    61,    85,    113,    145},\n    {0, 1,  7,  25,   63,  129,   231,   377,    575,    833},\n    {0, 1,  9,  41,  129,  321,   681,  1289,   2241,   3649},\n    {0, 1, 11,  61,  231,  681,  1683,  3653,   7183,  13073},\n    {0, 1, 13,  85,  377, 1289,  3653,  8989,  19825,  40081},\n    {0, 1, 15, 113,  575, 2241,  7183, 19825,  48639, 108545},\n    {0, 1, 17, 145,  833, 3649, 13073, 40081, 108545, 265729}\n  };\n\n  With this extension, V(N,K) may be written in terms of U(N,K):\n    V(N,K) = U(N,K) + U(N,K+1)\n   for all N>=0, K>=0.\n  Thus U(N,K+1) represents the number of combinations where the first element\n   is positive or zero, and U(N,K) represents the number of combinations where\n   it is negative.\n  With a large enough table of U(N,K) values, we could write O(N) encoding\n   and O(min(N*log(K),N+K)) decoding routines, but such a table would be\n   prohibitively large for small embedded devices (K may be as large as 32767\n   for small N, and N may be as large as 200).\n\n  Both functions obey the same recurrence relation:\n    V(N,K) = V(N-1,K) + V(N,K-1) + V(N-1,K-1),\n    U(N,K) = U(N-1,K) + U(N,K-1) + U(N-1,K-1),\n   for all N>0, K>0, with different initial conditions at N=0 or K=0.\n  This allows us to construct a row of one of the tables above given the\n   previous row or the next row.\n  Thus we can derive O(NK) encoding and decoding routines with O(K) memory\n   using only addition and subtraction.\n\n  When encoding, we build up from the U(2,K) row and work our way forwards.\n  When decoding, we need to start at the U(N,K) row and work our way backwards,\n   which requires a means of computing U(N,K).\n  U(N,K) may be computed from two previous values with the same N:\n    U(N,K) = ((2*N-1)*U(N,K-1) - U(N,K-2))/(K-1) + U(N,K-2)\n   for all N>1, and since U(N,K) is symmetric, a similar relation holds for two\n   previous values with the same K:\n    U(N,K>1) = ((2*K-1)*U(N-1,K) - U(N-2,K))/(N-1) + U(N-2,K)\n   for all K>1.\n  This allows us to construct an arbitrary row of the U(N,K) table by starting\n   with the first two values, which are constants.\n  This saves roughly 2/3 the work in our O(NK) decoding routine, but costs O(K)\n   multiplications.\n  Similar relations can be derived for V(N,K), but are not used here.\n\n  For N>0 and K>0, U(N,K) and V(N,K) take on the form of an (N-1)-degree\n   polynomial for fixed N.\n  The first few are\n    U(1,K) = 1,\n    U(2,K) = 2*K-1,\n    U(3,K) = (2*K-2)*K+1,\n    U(4,K) = (((4*K-6)*K+8)*K-3)/3,\n    U(5,K) = ((((2*K-4)*K+10)*K-8)*K+3)/3,\n   and\n    V(1,K) = 2,\n    V(2,K) = 4*K,\n    V(3,K) = 4*K*K+2,\n    V(4,K) = 8*(K*K+2)*K/3,\n    V(5,K) = ((4*K*K+20)*K*K+6)/3,\n   for all K>0.\n  This allows us to derive O(N) encoding and O(N*log(K)) decoding routines for\n   small N (and indeed decoding is also O(N) for N<3).\n\n  @ARTICLE{Fis86,\n    author=\"Thomas R. Fischer\",\n    title=\"A Pyramid Vector Quantizer\",\n    journal=\"IEEE Transactions on Information Theory\",\n    volume=\"IT-32\",\n    number=4,\n    pages=\"568--583\",\n    month=Jul,\n    year=1986\n  }*/\n\n#if !defined(SMALL_FOOTPRINT)\n\n/*U(N,K) = U(K,N) := N>0?K>0?U(N-1,K)+U(N,K-1)+U(N-1,K-1):0:K>0?1:0*/\n# define CELT_PVQ_U(_n,_k) (CELT_PVQ_U_ROW[IMIN(_n,_k)][IMAX(_n,_k)])\n/*V(N,K) := U(N,K)+U(N,K+1) = the number of PVQ codewords for a band of size N\n   with K pulses allocated to it.*/\n# define CELT_PVQ_V(_n,_k) (CELT_PVQ_U(_n,_k)+CELT_PVQ_U(_n,(_k)+1))\n\n/*For each V(N,K) supported, we will access element U(min(N,K+1),max(N,K+1)).\n  Thus, the number of entries in row I is the larger of the maximum number of\n   pulses we will ever allocate for a given N=I (K=128, or however many fit in\n   32 bits, whichever is smaller), plus one, and the maximum N for which\n   K=I-1 pulses fit in 32 bits.\n  The largest band size in an Opus Custom mode is 208.\n  Otherwise, we can limit things to the set of N which can be achieved by\n   splitting a band from a standard Opus mode: 176, 144, 96, 88, 72, 64, 48,\n   44, 36, 32, 24, 22, 18, 16, 8, 4, 2).*/\n#if defined(CUSTOM_MODES)\nstatic const opus_uint32 CELT_PVQ_U_DATA[1488]={\n#else\nstatic const opus_uint32 CELT_PVQ_U_DATA[1272]={\n#endif\n  /*N=0, K=0...176:*/\n  1, 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,\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,\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,\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,\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,\n  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n#if defined(CUSTOM_MODES)\n  /*...208:*/\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,\n  0, 0, 0, 0, 0, 0,\n#endif\n  /*N=1, K=1...176:*/\n  1, 1, 1, 1, 1, 1, 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, 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, 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, 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, 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, 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#if defined(CUSTOM_MODES)\n  /*...208:*/\n  1, 1, 1, 1, 1, 1, 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,\n#endif\n  /*N=2, K=2...176:*/\n  3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41,\n  43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79,\n  81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113,\n  115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143,\n  145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173,\n  175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203,\n  205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233,\n  235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263,\n  265, 267, 269, 271, 273, 275, 277, 279, 281, 283, 285, 287, 289, 291, 293,\n  295, 297, 299, 301, 303, 305, 307, 309, 311, 313, 315, 317, 319, 321, 323,\n  325, 327, 329, 331, 333, 335, 337, 339, 341, 343, 345, 347, 349, 351,\n#if defined(CUSTOM_MODES)\n  /*...208:*/\n  353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 373, 375, 377, 379, 381,\n  383, 385, 387, 389, 391, 393, 395, 397, 399, 401, 403, 405, 407, 409, 411,\n  413, 415,\n#endif\n  /*N=3, K=3...176:*/\n  13, 25, 41, 61, 85, 113, 145, 181, 221, 265, 313, 365, 421, 481, 545, 613,\n  685, 761, 841, 925, 1013, 1105, 1201, 1301, 1405, 1513, 1625, 1741, 1861,\n  1985, 2113, 2245, 2381, 2521, 2665, 2813, 2965, 3121, 3281, 3445, 3613, 3785,\n  3961, 4141, 4325, 4513, 4705, 4901, 5101, 5305, 5513, 5725, 5941, 6161, 6385,\n  6613, 6845, 7081, 7321, 7565, 7813, 8065, 8321, 8581, 8845, 9113, 9385, 9661,\n  9941, 10225, 10513, 10805, 11101, 11401, 11705, 12013, 12325, 12641, 12961,\n  13285, 13613, 13945, 14281, 14621, 14965, 15313, 15665, 16021, 16381, 16745,\n  17113, 17485, 17861, 18241, 18625, 19013, 19405, 19801, 20201, 20605, 21013,\n  21425, 21841, 22261, 22685, 23113, 23545, 23981, 24421, 24865, 25313, 25765,\n  26221, 26681, 27145, 27613, 28085, 28561, 29041, 29525, 30013, 30505, 31001,\n  31501, 32005, 32513, 33025, 33541, 34061, 34585, 35113, 35645, 36181, 36721,\n  37265, 37813, 38365, 38921, 39481, 40045, 40613, 41185, 41761, 42341, 42925,\n  43513, 44105, 44701, 45301, 45905, 46513, 47125, 47741, 48361, 48985, 49613,\n  50245, 50881, 51521, 52165, 52813, 53465, 54121, 54781, 55445, 56113, 56785,\n  57461, 58141, 58825, 59513, 60205, 60901, 61601,\n#if defined(CUSTOM_MODES)\n  /*...208:*/\n  62305, 63013, 63725, 64441, 65161, 65885, 66613, 67345, 68081, 68821, 69565,\n  70313, 71065, 71821, 72581, 73345, 74113, 74885, 75661, 76441, 77225, 78013,\n  78805, 79601, 80401, 81205, 82013, 82825, 83641, 84461, 85285, 86113,\n#endif\n  /*N=4, K=4...176:*/\n  63, 129, 231, 377, 575, 833, 1159, 1561, 2047, 2625, 3303, 4089, 4991, 6017,\n  7175, 8473, 9919, 11521, 13287, 15225, 17343, 19649, 22151, 24857, 27775,\n  30913, 34279, 37881, 41727, 45825, 50183, 54809, 59711, 64897, 70375, 76153,\n  82239, 88641, 95367, 102425, 109823, 117569, 125671, 134137, 142975, 152193,\n  161799, 171801, 182207, 193025, 204263, 215929, 228031, 240577, 253575,\n  267033, 280959, 295361, 310247, 325625, 341503, 357889, 374791, 392217,\n  410175, 428673, 447719, 467321, 487487, 508225, 529543, 551449, 573951,\n  597057, 620775, 645113, 670079, 695681, 721927, 748825, 776383, 804609,\n  833511, 863097, 893375, 924353, 956039, 988441, 1021567, 1055425, 1090023,\n  1125369, 1161471, 1198337, 1235975, 1274393, 1313599, 1353601, 1394407,\n  1436025, 1478463, 1521729, 1565831, 1610777, 1656575, 1703233, 1750759,\n  1799161, 1848447, 1898625, 1949703, 2001689, 2054591, 2108417, 2163175,\n  2218873, 2275519, 2333121, 2391687, 2451225, 2511743, 2573249, 2635751,\n  2699257, 2763775, 2829313, 2895879, 2963481, 3032127, 3101825, 3172583,\n  3244409, 3317311, 3391297, 3466375, 3542553, 3619839, 3698241, 3777767,\n  3858425, 3940223, 4023169, 4107271, 4192537, 4278975, 4366593, 4455399,\n  4545401, 4636607, 4729025, 4822663, 4917529, 5013631, 5110977, 5209575,\n  5309433, 5410559, 5512961, 5616647, 5721625, 5827903, 5935489, 6044391,\n  6154617, 6266175, 6379073, 6493319, 6608921, 6725887, 6844225, 6963943,\n  7085049, 7207551,\n#if defined(CUSTOM_MODES)\n  /*...208:*/\n  7331457, 7456775, 7583513, 7711679, 7841281, 7972327, 8104825, 8238783,\n  8374209, 8511111, 8649497, 8789375, 8930753, 9073639, 9218041, 9363967,\n  9511425, 9660423, 9810969, 9963071, 10116737, 10271975, 10428793, 10587199,\n  10747201, 10908807, 11072025, 11236863, 11403329, 11571431, 11741177,\n  11912575,\n#endif\n  /*N=5, K=5...176:*/\n  321, 681, 1289, 2241, 3649, 5641, 8361, 11969, 16641, 22569, 29961, 39041,\n  50049, 63241, 78889, 97281, 118721, 143529, 172041, 204609, 241601, 283401,\n  330409, 383041, 441729, 506921, 579081, 658689, 746241, 842249, 947241,\n  1061761, 1186369, 1321641, 1468169, 1626561, 1797441, 1981449, 2179241,\n  2391489, 2618881, 2862121, 3121929, 3399041, 3694209, 4008201, 4341801,\n  4695809, 5071041, 5468329, 5888521, 6332481, 6801089, 7295241, 7815849,\n  8363841, 8940161, 9545769, 10181641, 10848769, 11548161, 12280841, 13047849,\n  13850241, 14689089, 15565481, 16480521, 17435329, 18431041, 19468809,\n  20549801, 21675201, 22846209, 24064041, 25329929, 26645121, 28010881,\n  29428489, 30899241, 32424449, 34005441, 35643561, 37340169, 39096641,\n  40914369, 42794761, 44739241, 46749249, 48826241, 50971689, 53187081,\n  55473921, 57833729, 60268041, 62778409, 65366401, 68033601, 70781609,\n  73612041, 76526529, 79526721, 82614281, 85790889, 89058241, 92418049,\n  95872041, 99421961, 103069569, 106816641, 110664969, 114616361, 118672641,\n  122835649, 127107241, 131489289, 135983681, 140592321, 145317129, 150160041,\n  155123009, 160208001, 165417001, 170752009, 176215041, 181808129, 187533321,\n  193392681, 199388289, 205522241, 211796649, 218213641, 224775361, 231483969,\n  238341641, 245350569, 252512961, 259831041, 267307049, 274943241, 282741889,\n  290705281, 298835721, 307135529, 315607041, 324252609, 333074601, 342075401,\n  351257409, 360623041, 370174729, 379914921, 389846081, 399970689, 410291241,\n  420810249, 431530241, 442453761, 453583369, 464921641, 476471169, 488234561,\n  500214441, 512413449, 524834241, 537479489, 550351881, 563454121, 576788929,\n  590359041, 604167209, 618216201, 632508801,\n#if defined(CUSTOM_MODES)\n  /*...208:*/\n  647047809, 661836041, 676876329, 692171521, 707724481, 723538089, 739615241,\n  755958849, 772571841, 789457161, 806617769, 824056641, 841776769, 859781161,\n  878072841, 896654849, 915530241, 934702089, 954173481, 973947521, 994027329,\n  1014416041, 1035116809, 1056132801, 1077467201, 1099123209, 1121104041,\n  1143412929, 1166053121, 1189027881, 1212340489, 1235994241,\n#endif\n  /*N=6, K=6...96:*/\n  1683, 3653, 7183, 13073, 22363, 36365, 56695, 85305, 124515, 177045, 246047,\n  335137, 448427, 590557, 766727, 982729, 1244979, 1560549, 1937199, 2383409,\n  2908411, 3522221, 4235671, 5060441, 6009091, 7095093, 8332863, 9737793,\n  11326283, 13115773, 15124775, 17372905, 19880915, 22670725, 25765455,\n  29189457, 32968347, 37129037, 41699767, 46710137, 52191139, 58175189,\n  64696159, 71789409, 79491819, 87841821, 96879431, 106646281, 117185651,\n  128542501, 140763503, 153897073, 167993403, 183104493, 199284183, 216588185,\n  235074115, 254801525, 275831935, 298228865, 322057867, 347386557, 374284647,\n  402823977, 433078547, 465124549, 499040399, 534906769, 572806619, 612825229,\n  655050231, 699571641, 746481891, 795875861, 847850911, 902506913, 959946283,\n  1020274013, 1083597703, 1150027593, 1219676595, 1292660325, 1369097135,\n  1449108145, 1532817275, 1620351277, 1711839767, 1807415257, 1907213187,\n  2011371957, 2120032959,\n#if defined(CUSTOM_MODES)\n  /*...109:*/\n  2233340609U, 2351442379U, 2474488829U, 2602633639U, 2736033641U, 2874848851U,\n  3019242501U, 3169381071U, 3325434321U, 3487575323U, 3655980493U, 3830829623U,\n  4012305913U,\n#endif\n  /*N=7, K=7...54*/\n  8989, 19825, 40081, 75517, 134245, 227305, 369305, 579125, 880685, 1303777,\n  1884961, 2668525, 3707509, 5064793, 6814249, 9041957, 11847485, 15345233,\n  19665841, 24957661, 31388293, 39146185, 48442297, 59511829, 72616013,\n  88043969, 106114625, 127178701, 151620757, 179861305, 212358985, 249612805,\n  292164445, 340600625, 395555537, 457713341, 527810725, 606639529, 695049433,\n  793950709, 904317037, 1027188385, 1163673953, 1314955181, 1482288821,\n  1667010073, 1870535785, 2094367717,\n#if defined(CUSTOM_MODES)\n  /*...60:*/\n  2340095869U, 2609401873U, 2904062449U, 3225952925U, 3577050821U, 3959439497U,\n#endif\n  /*N=8, K=8...37*/\n  48639, 108545, 224143, 433905, 795455, 1392065, 2340495, 3800305, 5984767,\n  9173505, 13726991, 20103025, 28875327, 40754369, 56610575, 77500017,\n  104692735, 139703809, 184327311, 240673265, 311207743, 398796225, 506750351,\n  638878193, 799538175, 993696769, 1226990095, 1505789553, 1837271615,\n  2229491905U,\n#if defined(CUSTOM_MODES)\n  /*...40:*/\n  2691463695U, 3233240945U, 3866006015U,\n#endif\n  /*N=9, K=9...28:*/\n  265729, 598417, 1256465, 2485825, 4673345, 8405905, 14546705, 24331777,\n  39490049, 62390545, 96220561, 145198913, 214828609, 312193553, 446304145,\n  628496897, 872893441, 1196924561, 1621925137, 2173806145U,\n#if defined(CUSTOM_MODES)\n  /*...29:*/\n  2883810113U,\n#endif\n  /*N=10, K=10...24:*/\n  1462563, 3317445, 7059735, 14218905, 27298155, 50250765, 89129247, 152951073,\n  254831667, 413442773, 654862247, 1014889769, 1541911931, 2300409629U,\n  3375210671U,\n  /*N=11, K=11...19:*/\n  8097453, 18474633, 39753273, 81270333, 158819253, 298199265, 540279585,\n  948062325, 1616336765,\n#if defined(CUSTOM_MODES)\n  /*...20:*/\n  2684641785U,\n#endif\n  /*N=12, K=12...18:*/\n  45046719, 103274625, 224298231, 464387817, 921406335, 1759885185,\n  3248227095U,\n  /*N=13, K=13...16:*/\n  251595969, 579168825, 1267854873, 2653649025U,\n  /*N=14, K=14:*/\n  1409933619\n};\n\n#if defined(CUSTOM_MODES)\nstatic const opus_uint32 *const CELT_PVQ_U_ROW[15]={\n  CELT_PVQ_U_DATA+   0,CELT_PVQ_U_DATA+ 208,CELT_PVQ_U_DATA+ 415,\n  CELT_PVQ_U_DATA+ 621,CELT_PVQ_U_DATA+ 826,CELT_PVQ_U_DATA+1030,\n  CELT_PVQ_U_DATA+1233,CELT_PVQ_U_DATA+1336,CELT_PVQ_U_DATA+1389,\n  CELT_PVQ_U_DATA+1421,CELT_PVQ_U_DATA+1441,CELT_PVQ_U_DATA+1455,\n  CELT_PVQ_U_DATA+1464,CELT_PVQ_U_DATA+1470,CELT_PVQ_U_DATA+1473\n};\n#else\nstatic const opus_uint32 *const CELT_PVQ_U_ROW[15]={\n  CELT_PVQ_U_DATA+   0,CELT_PVQ_U_DATA+ 176,CELT_PVQ_U_DATA+ 351,\n  CELT_PVQ_U_DATA+ 525,CELT_PVQ_U_DATA+ 698,CELT_PVQ_U_DATA+ 870,\n  CELT_PVQ_U_DATA+1041,CELT_PVQ_U_DATA+1131,CELT_PVQ_U_DATA+1178,\n  CELT_PVQ_U_DATA+1207,CELT_PVQ_U_DATA+1226,CELT_PVQ_U_DATA+1240,\n  CELT_PVQ_U_DATA+1248,CELT_PVQ_U_DATA+1254,CELT_PVQ_U_DATA+1257\n};\n#endif\n\n#if defined(CUSTOM_MODES)\nvoid get_required_bits(opus_int16 *_bits,int _n,int _maxk,int _frac){\n  int k;\n  /*_maxk==0 => there's nothing to do.*/\n  celt_assert(_maxk>0);\n  _bits[0]=0;\n  for(k=1;k<=_maxk;k++)_bits[k]=log2_frac(CELT_PVQ_V(_n,k),_frac);\n}\n#endif\n\nstatic opus_uint32 icwrs(int _n,const int *_y){\n  opus_uint32 i;\n  int         j;\n  int         k;\n  celt_assert(_n>=2);\n  j=_n-1;\n  i=_y[j]<0;\n  k=abs(_y[j]);\n  do{\n    j--;\n    i+=CELT_PVQ_U(_n-j,k);\n    k+=abs(_y[j]);\n    if(_y[j]<0)i+=CELT_PVQ_U(_n-j,k+1);\n  }\n  while(j>0);\n  return i;\n}\n\nvoid encode_pulses(const int *_y,int _n,int _k,ec_enc *_enc){\n  celt_assert(_k>0);\n  ec_enc_uint(_enc,icwrs(_n,_y),CELT_PVQ_V(_n,_k));\n}\n\nstatic void cwrsi(int _n,int _k,opus_uint32 _i,int *_y){\n  opus_uint32 p;\n  int         s;\n  int         k0;\n  celt_assert(_k>0);\n  celt_assert(_n>1);\n  while(_n>2){\n    opus_uint32 q;\n    /*Lots of pulses case:*/\n    if(_k>=_n){\n      const opus_uint32 *row;\n      row=CELT_PVQ_U_ROW[_n];\n      /*Are the pulses in this dimension negative?*/\n      p=row[_k+1];\n      s=-(_i>=p);\n      _i-=p&s;\n      /*Count how many pulses were placed in this dimension.*/\n      k0=_k;\n      q=row[_n];\n      if(q>_i){\n        celt_assert(p>q);\n        _k=_n;\n        do p=CELT_PVQ_U_ROW[--_k][_n];\n        while(p>_i);\n      }\n      else for(p=row[_k];p>_i;p=row[_k])_k--;\n      _i-=p;\n      *_y++=(k0-_k+s)^s;\n    }\n    /*Lots of dimensions case:*/\n    else{\n      /*Are there any pulses in this dimension at all?*/\n      p=CELT_PVQ_U_ROW[_k][_n];\n      q=CELT_PVQ_U_ROW[_k+1][_n];\n      if(p<=_i&&_i<q){\n        _i-=p;\n        *_y++=0;\n      }\n      else{\n        /*Are the pulses in this dimension negative?*/\n        s=-(_i>=q);\n        _i-=q&s;\n        /*Count how many pulses were placed in this dimension.*/\n        k0=_k;\n        do p=CELT_PVQ_U_ROW[--_k][_n];\n        while(p>_i);\n        _i-=p;\n        *_y++=(k0-_k+s)^s;\n      }\n    }\n    _n--;\n  }\n  /*_n==2*/\n  p=2*_k+1;\n  s=-(_i>=p);\n  _i-=p&s;\n  k0=_k;\n  _k=(_i+1)>>1;\n  if(_k)_i-=2*_k-1;\n  *_y++=(k0-_k+s)^s;\n  /*_n==1*/\n  s=-(int)_i;\n  *_y=(_k+s)^s;\n}\n\nvoid decode_pulses(int *_y,int _n,int _k,ec_dec *_dec){\n  cwrsi(_n,_k,ec_dec_uint(_dec,CELT_PVQ_V(_n,_k)),_y);\n}\n\n#else /* SMALL_FOOTPRINT */\n\n/*Computes the next row/column of any recurrence that obeys the relation\n   u[i][j]=u[i-1][j]+u[i][j-1]+u[i-1][j-1].\n  _ui0 is the base case for the new row/column.*/\nstatic OPUS_INLINE void unext(opus_uint32 *_ui,unsigned _len,opus_uint32 _ui0){\n  opus_uint32 ui1;\n  unsigned      j;\n  /*This do-while will overrun the array if we don't have storage for at least\n     2 values.*/\n  j=1; do {\n    ui1=UADD32(UADD32(_ui[j],_ui[j-1]),_ui0);\n    _ui[j-1]=_ui0;\n    _ui0=ui1;\n  } while (++j<_len);\n  _ui[j-1]=_ui0;\n}\n\n/*Computes the previous row/column of any recurrence that obeys the relation\n   u[i-1][j]=u[i][j]-u[i][j-1]-u[i-1][j-1].\n  _ui0 is the base case for the new row/column.*/\nstatic OPUS_INLINE void uprev(opus_uint32 *_ui,unsigned _n,opus_uint32 _ui0){\n  opus_uint32 ui1;\n  unsigned      j;\n  /*This do-while will overrun the array if we don't have storage for at least\n     2 values.*/\n  j=1; do {\n    ui1=USUB32(USUB32(_ui[j],_ui[j-1]),_ui0);\n    _ui[j-1]=_ui0;\n    _ui0=ui1;\n  } while (++j<_n);\n  _ui[j-1]=_ui0;\n}\n\n/*Compute V(_n,_k), as well as U(_n,0..._k+1).\n  _u: On exit, _u[i] contains U(_n,i) for i in [0..._k+1].*/\nstatic opus_uint32 ncwrs_urow(unsigned _n,unsigned _k,opus_uint32 *_u){\n  opus_uint32 um2;\n  unsigned      len;\n  unsigned      k;\n  len=_k+2;\n  /*We require storage at least 3 values (e.g., _k>0).*/\n  celt_assert(len>=3);\n  _u[0]=0;\n  _u[1]=um2=1;\n  /*If _n==0, _u[0] should be 1 and the rest should be 0.*/\n  /*If _n==1, _u[i] should be 1 for i>1.*/\n  celt_assert(_n>=2);\n  /*If _k==0, the following do-while loop will overflow the buffer.*/\n  celt_assert(_k>0);\n  k=2;\n  do _u[k]=(k<<1)-1;\n  while(++k<len);\n  for(k=2;k<_n;k++)unext(_u+1,_k+1,1);\n  return _u[_k]+_u[_k+1];\n}\n\n/*Returns the _i'th combination of _k elements chosen from a set of size _n\n   with associated sign bits.\n  _y: Returns the vector of pulses.\n  _u: Must contain entries [0..._k+1] of row _n of U() on input.\n      Its contents will be destructively modified.*/\nstatic void cwrsi(int _n,int _k,opus_uint32 _i,int *_y,opus_uint32 *_u){\n  int j;\n  celt_assert(_n>0);\n  j=0;\n  do{\n    opus_uint32 p;\n    int           s;\n    int           yj;\n    p=_u[_k+1];\n    s=-(_i>=p);\n    _i-=p&s;\n    yj=_k;\n    p=_u[_k];\n    while(p>_i)p=_u[--_k];\n    _i-=p;\n    yj-=_k;\n    _y[j]=(yj+s)^s;\n    uprev(_u,_k+2,0);\n  }\n  while(++j<_n);\n}\n\n/*Returns the index of the given combination of K elements chosen from a set\n   of size 1 with associated sign bits.\n  _y: The vector of pulses, whose sum of absolute values is K.\n  _k: Returns K.*/\nstatic OPUS_INLINE opus_uint32 icwrs1(const int *_y,int *_k){\n  *_k=abs(_y[0]);\n  return _y[0]<0;\n}\n\n/*Returns the index of the given combination of K elements chosen from a set\n   of size _n with associated sign bits.\n  _y:  The vector of pulses, whose sum of absolute values must be _k.\n  _nc: Returns V(_n,_k).*/\nstatic OPUS_INLINE opus_uint32 icwrs(int _n,int _k,opus_uint32 *_nc,const int *_y,\n opus_uint32 *_u){\n  opus_uint32 i;\n  int         j;\n  int         k;\n  /*We can't unroll the first two iterations of the loop unless _n>=2.*/\n  celt_assert(_n>=2);\n  _u[0]=0;\n  for(k=1;k<=_k+1;k++)_u[k]=(k<<1)-1;\n  i=icwrs1(_y+_n-1,&k);\n  j=_n-2;\n  i+=_u[k];\n  k+=abs(_y[j]);\n  if(_y[j]<0)i+=_u[k+1];\n  while(j-->0){\n    unext(_u,_k+2,0);\n    i+=_u[k];\n    k+=abs(_y[j]);\n    if(_y[j]<0)i+=_u[k+1];\n  }\n  *_nc=_u[k]+_u[k+1];\n  return i;\n}\n\n#ifdef CUSTOM_MODES\nvoid get_required_bits(opus_int16 *_bits,int _n,int _maxk,int _frac){\n  int k;\n  /*_maxk==0 => there's nothing to do.*/\n  celt_assert(_maxk>0);\n  _bits[0]=0;\n  if (_n==1)\n  {\n    for (k=1;k<=_maxk;k++)\n      _bits[k] = 1<<_frac;\n  }\n  else {\n    VARDECL(opus_uint32,u);\n    SAVE_STACK;\n    ALLOC(u,_maxk+2U,opus_uint32);\n    ncwrs_urow(_n,_maxk,u);\n    for(k=1;k<=_maxk;k++)\n      _bits[k]=log2_frac(u[k]+u[k+1],_frac);\n    RESTORE_STACK;\n  }\n}\n#endif /* CUSTOM_MODES */\n\nvoid encode_pulses(const int *_y,int _n,int _k,ec_enc *_enc){\n  opus_uint32 i;\n  VARDECL(opus_uint32,u);\n  opus_uint32 nc;\n  SAVE_STACK;\n  celt_assert(_k>0);\n  ALLOC(u,_k+2U,opus_uint32);\n  i=icwrs(_n,_k,&nc,_y,u);\n  ec_enc_uint(_enc,i,nc);\n  RESTORE_STACK;\n}\n\nvoid decode_pulses(int *_y,int _n,int _k,ec_dec *_dec){\n  VARDECL(opus_uint32,u);\n  SAVE_STACK;\n  celt_assert(_k>0);\n  ALLOC(u,_k+2U,opus_uint32);\n  cwrsi(_n,_k,ec_dec_uint(_dec,ncwrs_urow(_n,_k,u)),_y,u);\n  RESTORE_STACK;\n}\n\n#endif /* SMALL_FOOTPRINT */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/cwrs.h",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Copyright (c) 2007-2009 Timothy B. Terriberry\n   Written by Timothy B. Terriberry and Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef CWRS_H\n#define CWRS_H\n\n#include \"arch.h\"\n#include \"stack_alloc.h\"\n#include \"entenc.h\"\n#include \"entdec.h\"\n\n#ifdef CUSTOM_MODES\nint log2_frac(opus_uint32 val, int frac);\n#endif\n\nvoid get_required_bits(opus_int16 *bits, int N, int K, int frac);\n\nvoid encode_pulses(const int *_y, int N, int K, ec_enc *enc);\n\nvoid decode_pulses(int *_y, int N, int K, ec_dec *dec);\n\n#endif /* CWRS_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/ecintrin.h",
    "content": "/* Copyright (c) 2003-2008 Timothy B. Terriberry\n   Copyright (c) 2008 Xiph.Org Foundation */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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/*Some common macros for potential platform-specific optimization.*/\n#include \"opus_types.h\"\n#include <math.h>\n#include <limits.h>\n#include \"arch.h\"\n#if !defined(_ecintrin_H)\n# define _ecintrin_H (1)\n\n/*Some specific platforms may have optimized intrinsic or OPUS_INLINE assembly\n   versions of these functions which can substantially improve performance.\n  We define macros for them to allow easy incorporation of these non-ANSI\n   features.*/\n\n/*Modern gcc (4.x) can compile the naive versions of min and max with cmov if\n   given an appropriate architecture, but the branchless bit-twiddling versions\n   are just as fast, and do not require any special target architecture.\n  Earlier gcc versions (3.x) compiled both code to the same assembly\n   instructions, because of the way they represented ((_b)>(_a)) internally.*/\n# define EC_MINI(_a,_b)      ((_a)+(((_b)-(_a))&-((_b)<(_a))))\n\n/*Count leading zeros.\n  This macro should only be used for implementing ec_ilog(), if it is defined.\n  All other code should use EC_ILOG() instead.*/\n#if defined(_MSC_VER) && (_MSC_VER >= 1400)\n# include <intrin.h>\n/*In _DEBUG mode this is not an intrinsic by default.*/\n# pragma intrinsic(_BitScanReverse)\n\nstatic __inline int ec_bsr(unsigned long _x){\n  unsigned long ret;\n  _BitScanReverse(&ret,_x);\n  return (int)ret;\n}\n# define EC_CLZ0    (1)\n# define EC_CLZ(_x) (-ec_bsr(_x))\n#elif defined(ENABLE_TI_DSPLIB)\n# include \"dsplib.h\"\n# define EC_CLZ0    (31)\n# define EC_CLZ(_x) (_lnorm(_x))\n#elif __GNUC_PREREQ(3,4)\n# if INT_MAX>=2147483647\n#  define EC_CLZ0    ((int)sizeof(unsigned)*CHAR_BIT)\n#  define EC_CLZ(_x) (__builtin_clz(_x))\n# elif LONG_MAX>=2147483647L\n#  define EC_CLZ0    ((int)sizeof(unsigned long)*CHAR_BIT)\n#  define EC_CLZ(_x) (__builtin_clzl(_x))\n# endif\n#endif\n\n#if defined(EC_CLZ)\n/*Note that __builtin_clz is not defined when _x==0, according to the gcc\n   documentation (and that of the BSR instruction that implements it on x86).\n  The majority of the time we can never pass it zero.\n  When we need to, it can be special cased.*/\n# define EC_ILOG(_x) (EC_CLZ0-EC_CLZ(_x))\n#else\nint ec_ilog(opus_uint32 _v);\n# define EC_ILOG(_x) (ec_ilog(_x))\n#endif\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/entcode.c",
    "content": "/* Copyright (c) 2001-2011 Timothy B. Terriberry\n*/\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"entcode.h\"\n#include \"arch.h\"\n\n#if !defined(EC_CLZ)\n/*This is a fallback for systems where we don't know how to access\n   a BSR or CLZ instruction (see ecintrin.h).\n  If you are optimizing Opus on a new platform and it has a native CLZ or\n   BZR (e.g. cell, MIPS, x86, etc) then making it available to Opus will be\n   an easy performance win.*/\nint ec_ilog(opus_uint32 _v){\n  /*On a Pentium M, this branchless version tested as the fastest on\n     1,000,000,000 random 32-bit integers, edging out a similar version with\n     branches, and a 256-entry LUT version.*/\n  int ret;\n  int m;\n  ret=!!_v;\n  m=!!(_v&0xFFFF0000)<<4;\n  _v>>=m;\n  ret|=m;\n  m=!!(_v&0xFF00)<<3;\n  _v>>=m;\n  ret|=m;\n  m=!!(_v&0xF0)<<2;\n  _v>>=m;\n  ret|=m;\n  m=!!(_v&0xC)<<1;\n  _v>>=m;\n  ret|=m;\n  ret+=!!(_v&0x2);\n  return ret;\n}\n#endif\n\nopus_uint32 ec_tell_frac(ec_ctx *_this){\n  opus_uint32 nbits;\n  opus_uint32 r;\n  int         l;\n  int         i;\n  /*To handle the non-integral number of bits still left in the encoder/decoder\n     state, we compute the worst-case number of bits of val that must be\n     encoded to ensure that the value is inside the range for any possible\n     subsequent bits.\n    The computation here is independent of val itself (the decoder does not\n     even track that value), even though the real number of bits used after\n     ec_enc_done() may be 1 smaller if rng is a power of two and the\n     corresponding trailing bits of val are all zeros.\n    If we did try to track that special case, then coding a value with a\n     probability of 1/(1<<n) might sometimes appear to use more than n bits.\n    This may help explain the surprising result that a newly initialized\n     encoder or decoder claims to have used 1 bit.*/\n  nbits=_this->nbits_total<<BITRES;\n  l=EC_ILOG(_this->rng);\n  r=_this->rng>>(l-16);\n  for(i=BITRES;i-->0;){\n    int b;\n    r=r*r>>15;\n    b=(int)(r>>16);\n    l=l<<1|b;\n    r>>=b;\n  }\n  return nbits-l;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/entcode.h",
    "content": "/* Copyright (c) 2001-2011 Timothy B. Terriberry\n   Copyright (c) 2008-2009 Xiph.Org Foundation */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#include \"opus_types.h\"\n#include \"opus_defines.h\"\n\n#if !defined(_entcode_H)\n# define _entcode_H (1)\n# include <limits.h>\n# include <stddef.h>\n# include \"ecintrin.h\"\n\n/*OPT: ec_window must be at least 32 bits, but if you have fast arithmetic on a\n   larger type, you can speed up the decoder by using it here.*/\ntypedef opus_uint32           ec_window;\ntypedef struct ec_ctx         ec_ctx;\ntypedef struct ec_ctx         ec_enc;\ntypedef struct ec_ctx         ec_dec;\n\n# define EC_WINDOW_SIZE ((int)sizeof(ec_window)*CHAR_BIT)\n\n/*The number of bits to use for the range-coded part of unsigned integers.*/\n# define EC_UINT_BITS   (8)\n\n/*The resolution of fractional-precision bit usage measurements, i.e.,\n   3 => 1/8th bits.*/\n# define BITRES 3\n\n/*The entropy encoder/decoder context.\n  We use the same structure for both, so that common functions like ec_tell()\n   can be used on either one.*/\nstruct ec_ctx{\n   /*Buffered input/output.*/\n   unsigned char *buf;\n   /*The size of the buffer.*/\n   opus_uint32    storage;\n   /*The offset at which the last byte containing raw bits was read/written.*/\n   opus_uint32    end_offs;\n   /*Bits that will be read from/written at the end.*/\n   ec_window      end_window;\n   /*Number of valid bits in end_window.*/\n   int            nend_bits;\n   /*The total number of whole bits read/written.\n     This does not include partial bits currently in the range coder.*/\n   int            nbits_total;\n   /*The offset at which the next range coder byte will be read/written.*/\n   opus_uint32    offs;\n   /*The number of values in the current range.*/\n   opus_uint32    rng;\n   /*In the decoder: the difference between the top of the current range and\n      the input value, minus one.\n     In the encoder: the low end of the current range.*/\n   opus_uint32    val;\n   /*In the decoder: the saved normalization factor from ec_decode().\n     In the encoder: the number of oustanding carry propagating symbols.*/\n   opus_uint32    ext;\n   /*A buffered input/output symbol, awaiting carry propagation.*/\n   int            rem;\n   /*Nonzero if an error occurred.*/\n   int            error;\n};\n\nstatic OPUS_INLINE opus_uint32 ec_range_bytes(ec_ctx *_this){\n  return _this->offs;\n}\n\nstatic OPUS_INLINE unsigned char *ec_get_buffer(ec_ctx *_this){\n  return _this->buf;\n}\n\nstatic OPUS_INLINE int ec_get_error(ec_ctx *_this){\n  return _this->error;\n}\n\n/*Returns the number of bits \"used\" by the encoded or decoded symbols so far.\n  This same number can be computed in either the encoder or the decoder, and is\n   suitable for making coding decisions.\n  Return: The number of bits.\n          This will always be slightly larger than the exact value (e.g., all\n           rounding error is in the positive direction).*/\nstatic OPUS_INLINE int ec_tell(ec_ctx *_this){\n  return _this->nbits_total-EC_ILOG(_this->rng);\n}\n\n/*Returns the number of bits \"used\" by the encoded or decoded symbols so far.\n  This same number can be computed in either the encoder or the decoder, and is\n   suitable for making coding decisions.\n  Return: The number of bits scaled by 2**BITRES.\n          This will always be slightly larger than the exact value (e.g., all\n           rounding error is in the positive direction).*/\nopus_uint32 ec_tell_frac(ec_ctx *_this);\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/entdec.c",
    "content": "/* Copyright (c) 2001-2011 Timothy B. Terriberry\n   Copyright (c) 2008-2009 Xiph.Org Foundation */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include <stddef.h>\n#include \"os_support.h\"\n#include \"arch.h\"\n#include \"entdec.h\"\n#include \"mfrngcod.h\"\n\n/*A range decoder.\n  This is an entropy decoder based upon \\cite{Mar79}, which is itself a\n   rediscovery of the FIFO arithmetic code introduced by \\cite{Pas76}.\n  It is very similar to arithmetic encoding, except that encoding is done with\n   digits in any base, instead of with bits, and so it is faster when using\n   larger bases (i.e.: a byte).\n  The author claims an average waste of $\\frac{1}{2}\\log_b(2b)$ bits, where $b$\n   is the base, longer than the theoretical optimum, but to my knowledge there\n   is no published justification for this claim.\n  This only seems true when using near-infinite precision arithmetic so that\n   the process is carried out with no rounding errors.\n\n  An excellent description of implementation details is available at\n   http://www.arturocampos.com/ac_range.html\n  A recent work \\cite{MNW98} which proposes several changes to arithmetic\n   encoding for efficiency actually re-discovers many of the principles\n   behind range encoding, and presents a good theoretical analysis of them.\n\n  End of stream is handled by writing out the smallest number of bits that\n   ensures that the stream will be correctly decoded regardless of the value of\n   any subsequent bits.\n  ec_tell() can be used to determine how many bits were needed to decode\n   all the symbols thus far; other data can be packed in the remaining bits of\n   the input buffer.\n  @PHDTHESIS{Pas76,\n    author=\"Richard Clark Pasco\",\n    title=\"Source coding algorithms for fast data compression\",\n    school=\"Dept. of Electrical Engineering, Stanford University\",\n    address=\"Stanford, CA\",\n    month=May,\n    year=1976\n  }\n  @INPROCEEDINGS{Mar79,\n   author=\"Martin, G.N.N.\",\n   title=\"Range encoding: an algorithm for removing redundancy from a digitised\n    message\",\n   booktitle=\"Video & Data Recording Conference\",\n   year=1979,\n   address=\"Southampton\",\n   month=Jul\n  }\n  @ARTICLE{MNW98,\n   author=\"Alistair Moffat and Radford Neal and Ian H. Witten\",\n   title=\"Arithmetic Coding Revisited\",\n   journal=\"{ACM} Transactions on Information Systems\",\n   year=1998,\n   volume=16,\n   number=3,\n   pages=\"256--294\",\n   month=Jul,\n   URL=\"http://www.stanford.edu/class/ee398a/handouts/papers/Moffat98ArithmCoding.pdf\"\n  }*/\n\nstatic int ec_read_byte(ec_dec *_this){\n  return _this->offs<_this->storage?_this->buf[_this->offs++]:0;\n}\n\nstatic int ec_read_byte_from_end(ec_dec *_this){\n  return _this->end_offs<_this->storage?\n   _this->buf[_this->storage-++(_this->end_offs)]:0;\n}\n\n/*Normalizes the contents of val and rng so that rng lies entirely in the\n   high-order symbol.*/\nstatic void ec_dec_normalize(ec_dec *_this){\n  /*If the range is too small, rescale it and input some bits.*/\n  while(_this->rng<=EC_CODE_BOT){\n    int sym;\n    _this->nbits_total+=EC_SYM_BITS;\n    _this->rng<<=EC_SYM_BITS;\n    /*Use up the remaining bits from our last symbol.*/\n    sym=_this->rem;\n    /*Read the next value from the input.*/\n    _this->rem=ec_read_byte(_this);\n    /*Take the rest of the bits we need from this new symbol.*/\n    sym=(sym<<EC_SYM_BITS|_this->rem)>>(EC_SYM_BITS-EC_CODE_EXTRA);\n    /*And subtract them from val, capped to be less than EC_CODE_TOP.*/\n    _this->val=((_this->val<<EC_SYM_BITS)+(EC_SYM_MAX&~sym))&(EC_CODE_TOP-1);\n  }\n}\n\nvoid ec_dec_init(ec_dec *_this,unsigned char *_buf,opus_uint32 _storage){\n  _this->buf=_buf;\n  _this->storage=_storage;\n  _this->end_offs=0;\n  _this->end_window=0;\n  _this->nend_bits=0;\n  /*This is the offset from which ec_tell() will subtract partial bits.\n    The final value after the ec_dec_normalize() call will be the same as in\n     the encoder, but we have to compensate for the bits that are added there.*/\n  _this->nbits_total=EC_CODE_BITS+1\n   -((EC_CODE_BITS-EC_CODE_EXTRA)/EC_SYM_BITS)*EC_SYM_BITS;\n  _this->offs=0;\n  _this->rng=1U<<EC_CODE_EXTRA;\n  _this->rem=ec_read_byte(_this);\n  _this->val=_this->rng-1-(_this->rem>>(EC_SYM_BITS-EC_CODE_EXTRA));\n  _this->error=0;\n  /*Normalize the interval.*/\n  ec_dec_normalize(_this);\n}\n\nunsigned ec_decode(ec_dec *_this,unsigned _ft){\n  unsigned s;\n  _this->ext=_this->rng/_ft;\n  s=(unsigned)(_this->val/_this->ext);\n  return _ft-EC_MINI(s+1,_ft);\n}\n\nunsigned ec_decode_bin(ec_dec *_this,unsigned _bits){\n   unsigned s;\n   _this->ext=_this->rng>>_bits;\n   s=(unsigned)(_this->val/_this->ext);\n   return (1U<<_bits)-EC_MINI(s+1U,1U<<_bits);\n}\n\nvoid ec_dec_update(ec_dec *_this,unsigned _fl,unsigned _fh,unsigned _ft){\n  opus_uint32 s;\n  s=IMUL32(_this->ext,_ft-_fh);\n  _this->val-=s;\n  _this->rng=_fl>0?IMUL32(_this->ext,_fh-_fl):_this->rng-s;\n  ec_dec_normalize(_this);\n}\n\n/*The probability of having a \"one\" is 1/(1<<_logp).*/\nint ec_dec_bit_logp(ec_dec *_this,unsigned _logp){\n  opus_uint32 r;\n  opus_uint32 d;\n  opus_uint32 s;\n  int         ret;\n  r=_this->rng;\n  d=_this->val;\n  s=r>>_logp;\n  ret=d<s;\n  if(!ret)_this->val=d-s;\n  _this->rng=ret?s:r-s;\n  ec_dec_normalize(_this);\n  return ret;\n}\n\nint ec_dec_icdf(ec_dec *_this,const unsigned char *_icdf,unsigned _ftb){\n  opus_uint32 r;\n  opus_uint32 d;\n  opus_uint32 s;\n  opus_uint32 t;\n  int         ret;\n  s=_this->rng;\n  d=_this->val;\n  r=s>>_ftb;\n  ret=-1;\n  do{\n    t=s;\n    s=IMUL32(r,_icdf[++ret]);\n  }\n  while(d<s);\n  _this->val=d-s;\n  _this->rng=t-s;\n  ec_dec_normalize(_this);\n  return ret;\n}\n\nopus_uint32 ec_dec_uint(ec_dec *_this,opus_uint32 _ft){\n  unsigned ft;\n  unsigned s;\n  int      ftb;\n  /*In order to optimize EC_ILOG(), it is undefined for the value 0.*/\n  celt_assert(_ft>1);\n  _ft--;\n  ftb=EC_ILOG(_ft);\n  if(ftb>EC_UINT_BITS){\n    opus_uint32 t;\n    ftb-=EC_UINT_BITS;\n    ft=(unsigned)(_ft>>ftb)+1;\n    s=ec_decode(_this,ft);\n    ec_dec_update(_this,s,s+1,ft);\n    t=(opus_uint32)s<<ftb|ec_dec_bits(_this,ftb);\n    if(t<=_ft)return t;\n    _this->error=1;\n    return _ft;\n  }\n  else{\n    _ft++;\n    s=ec_decode(_this,(unsigned)_ft);\n    ec_dec_update(_this,s,s+1,(unsigned)_ft);\n    return s;\n  }\n}\n\nopus_uint32 ec_dec_bits(ec_dec *_this,unsigned _bits){\n  ec_window   window;\n  int         available;\n  opus_uint32 ret;\n  window=_this->end_window;\n  available=_this->nend_bits;\n  if((unsigned)available<_bits){\n    do{\n      window|=(ec_window)ec_read_byte_from_end(_this)<<available;\n      available+=EC_SYM_BITS;\n    }\n    while(available<=EC_WINDOW_SIZE-EC_SYM_BITS);\n  }\n  ret=(opus_uint32)window&(((opus_uint32)1<<_bits)-1U);\n  window>>=_bits;\n  available-=_bits;\n  _this->end_window=window;\n  _this->nend_bits=available;\n  _this->nbits_total+=_bits;\n  return ret;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/entdec.h",
    "content": "/* Copyright (c) 2001-2011 Timothy B. Terriberry\n   Copyright (c) 2008-2009 Xiph.Org Foundation */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#if !defined(_entdec_H)\n# define _entdec_H (1)\n# include <limits.h>\n# include \"entcode.h\"\n\n/*Initializes the decoder.\n  _buf: The input buffer to use.\n  Return: 0 on success, or a negative value on error.*/\nvoid ec_dec_init(ec_dec *_this,unsigned char *_buf,opus_uint32 _storage);\n\n/*Calculates the cumulative frequency for the next symbol.\n  This can then be fed into the probability model to determine what that\n   symbol is, and the additional frequency information required to advance to\n   the next symbol.\n  This function cannot be called more than once without a corresponding call to\n   ec_dec_update(), or decoding will not proceed correctly.\n  _ft: The total frequency of the symbols in the alphabet the next symbol was\n        encoded with.\n  Return: A cumulative frequency representing the encoded symbol.\n          If the cumulative frequency of all the symbols before the one that\n           was encoded was fl, and the cumulative frequency of all the symbols\n           up to and including the one encoded is fh, then the returned value\n           will fall in the range [fl,fh).*/\nunsigned ec_decode(ec_dec *_this,unsigned _ft);\n\n/*Equivalent to ec_decode() with _ft==1<<_bits.*/\nunsigned ec_decode_bin(ec_dec *_this,unsigned _bits);\n\n/*Advance the decoder past the next symbol using the frequency information the\n   symbol was encoded with.\n  Exactly one call to ec_decode() must have been made so that all necessary\n   intermediate calculations are performed.\n  _fl:  The cumulative frequency of all symbols that come before the symbol\n         decoded.\n  _fh:  The cumulative frequency of all symbols up to and including the symbol\n         decoded.\n        Together with _fl, this defines the range [_fl,_fh) in which the value\n         returned above must fall.\n  _ft:  The total frequency of the symbols in the alphabet the symbol decoded\n         was encoded in.\n        This must be the same as passed to the preceding call to ec_decode().*/\nvoid ec_dec_update(ec_dec *_this,unsigned _fl,unsigned _fh,unsigned _ft);\n\n/* Decode a bit that has a 1/(1<<_logp) probability of being a one */\nint ec_dec_bit_logp(ec_dec *_this,unsigned _logp);\n\n/*Decodes a symbol given an \"inverse\" CDF table.\n  No call to ec_dec_update() is necessary after this call.\n  _icdf: The \"inverse\" CDF, such that symbol s falls in the range\n          [s>0?ft-_icdf[s-1]:0,ft-_icdf[s]), where ft=1<<_ftb.\n         The values must be monotonically non-increasing, and the last value\n          must be 0.\n  _ftb: The number of bits of precision in the cumulative distribution.\n  Return: The decoded symbol s.*/\nint ec_dec_icdf(ec_dec *_this,const unsigned char *_icdf,unsigned _ftb);\n\n/*Extracts a raw unsigned integer with a non-power-of-2 range from the stream.\n  The bits must have been encoded with ec_enc_uint().\n  No call to ec_dec_update() is necessary after this call.\n  _ft: The number of integers that can be decoded (one more than the max).\n       This must be at least one, and no more than 2**32-1.\n  Return: The decoded bits.*/\nopus_uint32 ec_dec_uint(ec_dec *_this,opus_uint32 _ft);\n\n/*Extracts a sequence of raw bits from the stream.\n  The bits must have been encoded with ec_enc_bits().\n  No call to ec_dec_update() is necessary after this call.\n  _ftb: The number of bits to extract.\n        This must be between 0 and 25, inclusive.\n  Return: The decoded bits.*/\nopus_uint32 ec_dec_bits(ec_dec *_this,unsigned _ftb);\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/entenc.c",
    "content": "/* Copyright (c) 2001-2011 Timothy B. Terriberry\n   Copyright (c) 2008-2009 Xiph.Org Foundation */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#if defined(HAVE_CONFIG_H)\n# include \"config.h\"\n#endif\n#include \"os_support.h\"\n#include \"arch.h\"\n#include \"entenc.h\"\n#include \"mfrngcod.h\"\n\n/*A range encoder.\n  See entdec.c and the references for implementation details \\cite{Mar79,MNW98}.\n\n  @INPROCEEDINGS{Mar79,\n   author=\"Martin, G.N.N.\",\n   title=\"Range encoding: an algorithm for removing redundancy from a digitised\n    message\",\n   booktitle=\"Video \\& Data Recording Conference\",\n   year=1979,\n   address=\"Southampton\",\n   month=Jul\n  }\n  @ARTICLE{MNW98,\n   author=\"Alistair Moffat and Radford Neal and Ian H. Witten\",\n   title=\"Arithmetic Coding Revisited\",\n   journal=\"{ACM} Transactions on Information Systems\",\n   year=1998,\n   volume=16,\n   number=3,\n   pages=\"256--294\",\n   month=Jul,\n   URL=\"http://www.stanford.edu/class/ee398/handouts/papers/Moffat98ArithmCoding.pdf\"\n  }*/\n\nstatic int ec_write_byte(ec_enc *_this,unsigned _value){\n  if(_this->offs+_this->end_offs>=_this->storage)return -1;\n  _this->buf[_this->offs++]=(unsigned char)_value;\n  return 0;\n}\n\nstatic int ec_write_byte_at_end(ec_enc *_this,unsigned _value){\n  if(_this->offs+_this->end_offs>=_this->storage)return -1;\n  _this->buf[_this->storage-++(_this->end_offs)]=(unsigned char)_value;\n  return 0;\n}\n\n/*Outputs a symbol, with a carry bit.\n  If there is a potential to propagate a carry over several symbols, they are\n   buffered until it can be determined whether or not an actual carry will\n   occur.\n  If the counter for the buffered symbols overflows, then the stream becomes\n   undecodable.\n  This gives a theoretical limit of a few billion symbols in a single packet on\n   32-bit systems.\n  The alternative is to truncate the range in order to force a carry, but\n   requires similar carry tracking in the decoder, needlessly slowing it down.*/\nstatic void ec_enc_carry_out(ec_enc *_this,int _c){\n  if(_c!=EC_SYM_MAX){\n    /*No further carry propagation possible, flush buffer.*/\n    int carry;\n    carry=_c>>EC_SYM_BITS;\n    /*Don't output a byte on the first write.\n      This compare should be taken care of by branch-prediction thereafter.*/\n    if(_this->rem>=0)_this->error|=ec_write_byte(_this,_this->rem+carry);\n    if(_this->ext>0){\n      unsigned sym;\n      sym=(EC_SYM_MAX+carry)&EC_SYM_MAX;\n      do _this->error|=ec_write_byte(_this,sym);\n      while(--(_this->ext)>0);\n    }\n    _this->rem=_c&EC_SYM_MAX;\n  }\n  else _this->ext++;\n}\n\nstatic void ec_enc_normalize(ec_enc *_this){\n  /*If the range is too small, output some bits and rescale it.*/\n  while(_this->rng<=EC_CODE_BOT){\n    ec_enc_carry_out(_this,(int)(_this->val>>EC_CODE_SHIFT));\n    /*Move the next-to-high-order symbol into the high-order position.*/\n    _this->val=(_this->val<<EC_SYM_BITS)&(EC_CODE_TOP-1);\n    _this->rng<<=EC_SYM_BITS;\n    _this->nbits_total+=EC_SYM_BITS;\n  }\n}\n\nvoid ec_enc_init(ec_enc *_this,unsigned char *_buf,opus_uint32 _size){\n  _this->buf=_buf;\n  _this->end_offs=0;\n  _this->end_window=0;\n  _this->nend_bits=0;\n  /*This is the offset from which ec_tell() will subtract partial bits.*/\n  _this->nbits_total=EC_CODE_BITS+1;\n  _this->offs=0;\n  _this->rng=EC_CODE_TOP;\n  _this->rem=-1;\n  _this->val=0;\n  _this->ext=0;\n  _this->storage=_size;\n  _this->error=0;\n}\n\nvoid ec_encode(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _ft){\n  opus_uint32 r;\n  r=_this->rng/_ft;\n  if(_fl>0){\n    _this->val+=_this->rng-IMUL32(r,(_ft-_fl));\n    _this->rng=IMUL32(r,(_fh-_fl));\n  }\n  else _this->rng-=IMUL32(r,(_ft-_fh));\n  ec_enc_normalize(_this);\n}\n\nvoid ec_encode_bin(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _bits){\n  opus_uint32 r;\n  r=_this->rng>>_bits;\n  if(_fl>0){\n    _this->val+=_this->rng-IMUL32(r,((1U<<_bits)-_fl));\n    _this->rng=IMUL32(r,(_fh-_fl));\n  }\n  else _this->rng-=IMUL32(r,((1U<<_bits)-_fh));\n  ec_enc_normalize(_this);\n}\n\n/*The probability of having a \"one\" is 1/(1<<_logp).*/\nvoid ec_enc_bit_logp(ec_enc *_this,int _val,unsigned _logp){\n  opus_uint32 r;\n  opus_uint32 s;\n  opus_uint32 l;\n  r=_this->rng;\n  l=_this->val;\n  s=r>>_logp;\n  r-=s;\n  if(_val)_this->val=l+r;\n  _this->rng=_val?s:r;\n  ec_enc_normalize(_this);\n}\n\nvoid ec_enc_icdf(ec_enc *_this,int _s,const unsigned char *_icdf,unsigned _ftb){\n  opus_uint32 r;\n  r=_this->rng>>_ftb;\n  if(_s>0){\n    _this->val+=_this->rng-IMUL32(r,_icdf[_s-1]);\n    _this->rng=IMUL32(r,_icdf[_s-1]-_icdf[_s]);\n  }\n  else _this->rng-=IMUL32(r,_icdf[_s]);\n  ec_enc_normalize(_this);\n}\n\nvoid ec_enc_uint(ec_enc *_this,opus_uint32 _fl,opus_uint32 _ft){\n  unsigned  ft;\n  unsigned  fl;\n  int       ftb;\n  /*In order to optimize EC_ILOG(), it is undefined for the value 0.*/\n  celt_assert(_ft>1);\n  _ft--;\n  ftb=EC_ILOG(_ft);\n  if(ftb>EC_UINT_BITS){\n    ftb-=EC_UINT_BITS;\n    ft=(_ft>>ftb)+1;\n    fl=(unsigned)(_fl>>ftb);\n    ec_encode(_this,fl,fl+1,ft);\n    ec_enc_bits(_this,_fl&(((opus_uint32)1<<ftb)-1U),ftb);\n  }\n  else ec_encode(_this,_fl,_fl+1,_ft+1);\n}\n\nvoid ec_enc_bits(ec_enc *_this,opus_uint32 _fl,unsigned _bits){\n  ec_window window;\n  int       used;\n  window=_this->end_window;\n  used=_this->nend_bits;\n  celt_assert(_bits>0);\n  if(used+_bits>EC_WINDOW_SIZE){\n    do{\n      _this->error|=ec_write_byte_at_end(_this,(unsigned)window&EC_SYM_MAX);\n      window>>=EC_SYM_BITS;\n      used-=EC_SYM_BITS;\n    }\n    while(used>=EC_SYM_BITS);\n  }\n  window|=(ec_window)_fl<<used;\n  used+=_bits;\n  _this->end_window=window;\n  _this->nend_bits=used;\n  _this->nbits_total+=_bits;\n}\n\nvoid ec_enc_patch_initial_bits(ec_enc *_this,unsigned _val,unsigned _nbits){\n  int      shift;\n  unsigned mask;\n  celt_assert(_nbits<=EC_SYM_BITS);\n  shift=EC_SYM_BITS-_nbits;\n  mask=((1<<_nbits)-1)<<shift;\n  if(_this->offs>0){\n    /*The first byte has been finalized.*/\n    _this->buf[0]=(unsigned char)((_this->buf[0]&~mask)|_val<<shift);\n  }\n  else if(_this->rem>=0){\n    /*The first byte is still awaiting carry propagation.*/\n    _this->rem=(_this->rem&~mask)|_val<<shift;\n  }\n  else if(_this->rng<=(EC_CODE_TOP>>_nbits)){\n    /*The renormalization loop has never been run.*/\n    _this->val=(_this->val&~((opus_uint32)mask<<EC_CODE_SHIFT))|\n     (opus_uint32)_val<<(EC_CODE_SHIFT+shift);\n  }\n  /*The encoder hasn't even encoded _nbits of data yet.*/\n  else _this->error=-1;\n}\n\nvoid ec_enc_shrink(ec_enc *_this,opus_uint32 _size){\n  celt_assert(_this->offs+_this->end_offs<=_size);\n  OPUS_MOVE(_this->buf+_size-_this->end_offs,\n   _this->buf+_this->storage-_this->end_offs,_this->end_offs);\n  _this->storage=_size;\n}\n\nvoid ec_enc_done(ec_enc *_this){\n  ec_window   window;\n  int         used;\n  opus_uint32 msk;\n  opus_uint32 end;\n  int         l;\n  /*We output the minimum number of bits that ensures that the symbols encoded\n     thus far will be decoded correctly regardless of the bits that follow.*/\n  l=EC_CODE_BITS-EC_ILOG(_this->rng);\n  msk=(EC_CODE_TOP-1)>>l;\n  end=(_this->val+msk)&~msk;\n  if((end|msk)>=_this->val+_this->rng){\n    l++;\n    msk>>=1;\n    end=(_this->val+msk)&~msk;\n  }\n  while(l>0){\n    ec_enc_carry_out(_this,(int)(end>>EC_CODE_SHIFT));\n    end=(end<<EC_SYM_BITS)&(EC_CODE_TOP-1);\n    l-=EC_SYM_BITS;\n  }\n  /*If we have a buffered byte flush it into the output buffer.*/\n  if(_this->rem>=0||_this->ext>0)ec_enc_carry_out(_this,0);\n  /*If we have buffered extra bits, flush them as well.*/\n  window=_this->end_window;\n  used=_this->nend_bits;\n  while(used>=EC_SYM_BITS){\n    _this->error|=ec_write_byte_at_end(_this,(unsigned)window&EC_SYM_MAX);\n    window>>=EC_SYM_BITS;\n    used-=EC_SYM_BITS;\n  }\n  /*Clear any excess space and add any remaining extra bits to the last byte.*/\n  if(!_this->error){\n    OPUS_CLEAR(_this->buf+_this->offs,\n     _this->storage-_this->offs-_this->end_offs);\n    if(used>0){\n      /*If there's no range coder data at all, give up.*/\n      if(_this->end_offs>=_this->storage)_this->error=-1;\n      else{\n        l=-l;\n        /*If we've busted, don't add too many extra bits to the last byte; it\n           would corrupt the range coder data, and that's more important.*/\n        if(_this->offs+_this->end_offs>=_this->storage&&l<used){\n          window&=(1<<l)-1;\n          _this->error=-1;\n        }\n        _this->buf[_this->storage-_this->end_offs-1]|=(unsigned char)window;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/entenc.h",
    "content": "/* Copyright (c) 2001-2011 Timothy B. Terriberry\n   Copyright (c) 2008-2009 Xiph.Org Foundation */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#if !defined(_entenc_H)\n# define _entenc_H (1)\n# include <stddef.h>\n# include \"entcode.h\"\n\n/*Initializes the encoder.\n  _buf:  The buffer to store output bytes in.\n  _size: The size of the buffer, in chars.*/\nvoid ec_enc_init(ec_enc *_this,unsigned char *_buf,opus_uint32 _size);\n/*Encodes a symbol given its frequency information.\n  The frequency information must be discernable by the decoder, assuming it\n   has read only the previous symbols from the stream.\n  It is allowable to change the frequency information, or even the entire\n   source alphabet, so long as the decoder can tell from the context of the\n   previously encoded information that it is supposed to do so as well.\n  _fl: The cumulative frequency of all symbols that come before the one to be\n        encoded.\n  _fh: The cumulative frequency of all symbols up to and including the one to\n        be encoded.\n       Together with _fl, this defines the range [_fl,_fh) in which the\n        decoded value will fall.\n  _ft: The sum of the frequencies of all the symbols*/\nvoid ec_encode(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _ft);\n\n/*Equivalent to ec_encode() with _ft==1<<_bits.*/\nvoid ec_encode_bin(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _bits);\n\n/* Encode a bit that has a 1/(1<<_logp) probability of being a one */\nvoid ec_enc_bit_logp(ec_enc *_this,int _val,unsigned _logp);\n\n/*Encodes a symbol given an \"inverse\" CDF table.\n  _s:    The index of the symbol to encode.\n  _icdf: The \"inverse\" CDF, such that symbol _s falls in the range\n          [_s>0?ft-_icdf[_s-1]:0,ft-_icdf[_s]), where ft=1<<_ftb.\n         The values must be monotonically non-increasing, and the last value\n          must be 0.\n  _ftb: The number of bits of precision in the cumulative distribution.*/\nvoid ec_enc_icdf(ec_enc *_this,int _s,const unsigned char *_icdf,unsigned _ftb);\n\n/*Encodes a raw unsigned integer in the stream.\n  _fl: The integer to encode.\n  _ft: The number of integers that can be encoded (one more than the max).\n       This must be at least one, and no more than 2**32-1.*/\nvoid ec_enc_uint(ec_enc *_this,opus_uint32 _fl,opus_uint32 _ft);\n\n/*Encodes a sequence of raw bits in the stream.\n  _fl:  The bits to encode.\n  _ftb: The number of bits to encode.\n        This must be between 1 and 25, inclusive.*/\nvoid ec_enc_bits(ec_enc *_this,opus_uint32 _fl,unsigned _ftb);\n\n/*Overwrites a few bits at the very start of an existing stream, after they\n   have already been encoded.\n  This makes it possible to have a few flags up front, where it is easy for\n   decoders to access them without parsing the whole stream, even if their\n   values are not determined until late in the encoding process, without having\n   to buffer all the intermediate symbols in the encoder.\n  In order for this to work, at least _nbits bits must have already been\n   encoded using probabilities that are an exact power of two.\n  The encoder can verify the number of encoded bits is sufficient, but cannot\n   check this latter condition.\n  _val:   The bits to encode (in the least _nbits significant bits).\n          They will be decoded in order from most-significant to least.\n  _nbits: The number of bits to overwrite.\n          This must be no more than 8.*/\nvoid ec_enc_patch_initial_bits(ec_enc *_this,unsigned _val,unsigned _nbits);\n\n/*Compacts the data to fit in the target size.\n  This moves up the raw bits at the end of the current buffer so they are at\n   the end of the new buffer size.\n  The caller must ensure that the amount of data that's already been written\n   will fit in the new size.\n  _size: The number of bytes in the new buffer.\n         This must be large enough to contain the bits already written, and\n          must be no larger than the existing size.*/\nvoid ec_enc_shrink(ec_enc *_this,opus_uint32 _size);\n\n/*Indicates that there are no more symbols to encode.\n  All reamining output bytes are flushed to the output buffer.\n  ec_enc_init() must be called before the encoder can be used again.*/\nvoid ec_enc_done(ec_enc *_this);\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/fixed_debug.h",
    "content": "/* Copyright (C) 2003-2008 Jean-Marc Valin\n   Copyright (C) 2007-2012 Xiph.Org Foundation */\n/**\n   @file fixed_debug.h\n   @brief Fixed-point operations with debugging\n*/\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef FIXED_DEBUG_H\n#define FIXED_DEBUG_H\n\n#include <stdio.h>\n#include \"opus_defines.h\"\n\n#ifdef CELT_C\nOPUS_EXPORT opus_int64 celt_mips=0;\n#else\nextern opus_int64 celt_mips;\n#endif\n\n#define MULT16_16SU(a,b) ((opus_val32)(opus_val16)(a)*(opus_val32)(opus_uint16)(b))\n#define MULT32_32_Q31(a,b) ADD32(ADD32(SHL32(MULT16_16(SHR32((a),16),SHR((b),16)),1), SHR32(MULT16_16SU(SHR32((a),16),((b)&0x0000ffff)),15)), SHR32(MULT16_16SU(SHR32((b),16),((a)&0x0000ffff)),15))\n\n/** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */\n#define MULT16_32_Q16(a,b) ADD32(MULT16_16((a),SHR32((b),16)), SHR32(MULT16_16SU((a),((b)&0x0000ffff)),16))\n\n#define MULT16_32_P16(a,b) MULT16_32_PX(a,b,16)\n\n#define QCONST16(x,bits) ((opus_val16)(.5+(x)*(((opus_val32)1)<<(bits))))\n#define QCONST32(x,bits) ((opus_val32)(.5+(x)*(((opus_val32)1)<<(bits))))\n\n#define VERIFY_SHORT(x) ((x)<=32767&&(x)>=-32768)\n#define VERIFY_INT(x) ((x)<=2147483647LL&&(x)>=-2147483648LL)\n#define VERIFY_UINT(x) ((x)<=(2147483647LLU<<1))\n\n#define SHR(a,b) SHR32(a,b)\n#define PSHR(a,b) PSHR32(a,b)\n\nstatic OPUS_INLINE short NEG16(int x)\n{\n   int res;\n   if (!VERIFY_SHORT(x))\n   {\n      fprintf (stderr, \"NEG16: input is not short: %d\\n\", (int)x);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = -x;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"NEG16: output is not short: %d\\n\", (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips++;\n   return res;\n}\nstatic OPUS_INLINE int NEG32(opus_int64 x)\n{\n   opus_int64 res;\n   if (!VERIFY_INT(x))\n   {\n      fprintf (stderr, \"NEG16: input is not int: %d\\n\", (int)x);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = -x;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"NEG16: output is not int: %d\\n\", (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=2;\n   return res;\n}\n\n#define EXTRACT16(x) EXTRACT16_(x, __FILE__, __LINE__)\nstatic OPUS_INLINE short EXTRACT16_(int x, char *file, int line)\n{\n   int res;\n   if (!VERIFY_SHORT(x))\n   {\n      fprintf (stderr, \"EXTRACT16: input is not short: %d in %s: line %d\\n\", x, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = x;\n   celt_mips++;\n   return res;\n}\n\n#define EXTEND32(x) EXTEND32_(x, __FILE__, __LINE__)\nstatic OPUS_INLINE int EXTEND32_(int x, char *file, int line)\n{\n   int res;\n   if (!VERIFY_SHORT(x))\n   {\n      fprintf (stderr, \"EXTEND32: input is not short: %d in %s: line %d\\n\", x, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = x;\n   celt_mips++;\n   return res;\n}\n\n#define SHR16(a, shift) SHR16_(a, shift, __FILE__, __LINE__)\nstatic OPUS_INLINE short SHR16_(int a, int shift, char *file, int line)\n{\n   int res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))\n   {\n      fprintf (stderr, \"SHR16: inputs are not short: %d >> %d in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a>>shift;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"SHR16: output is not short: %d in %s: line %d\\n\", res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips++;\n   return res;\n}\n#define SHL16(a, shift) SHL16_(a, shift, __FILE__, __LINE__)\nstatic OPUS_INLINE short SHL16_(int a, int shift, char *file, int line)\n{\n   int res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))\n   {\n      fprintf (stderr, \"SHL16: inputs are not short: %d %d in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a<<shift;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"SHL16: output is not short: %d in %s: line %d\\n\", res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips++;\n   return res;\n}\n\nstatic OPUS_INLINE int SHR32(opus_int64 a, int shift)\n{\n   opus_int64  res;\n   if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))\n   {\n      fprintf (stderr, \"SHR32: inputs are not int: %d %d\\n\", (int)a, shift);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a>>shift;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"SHR32: output is not int: %d\\n\", (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=2;\n   return res;\n}\n#define SHL32(a, shift) SHL32_(a, shift, __FILE__, __LINE__)\nstatic OPUS_INLINE int SHL32_(opus_int64 a, int shift, char *file, int line)\n{\n   opus_int64  res;\n   if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))\n   {\n      fprintf (stderr, \"SHL32: inputs are not int: %lld %d in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a<<shift;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"SHL32: output is not int: %lld<<%d = %lld in %s: line %d\\n\", a, shift, res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=2;\n   return res;\n}\n\n#define PSHR32(a,shift) (celt_mips--,SHR32(ADD32((a),(((opus_val32)(1)<<((shift))>>1))),shift))\n#define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))\n\n#define ROUND16(x,a) (celt_mips--,EXTRACT16(PSHR32((x),(a))))\n#define HALF16(x)  (SHR16(x,1))\n#define HALF32(x)  (SHR32(x,1))\n\n//#define SHR(a,shift) ((a) >> (shift))\n//#define SHL(a,shift) ((a) << (shift))\n\n#define ADD16(a, b) ADD16_(a, b, __FILE__, __LINE__)\nstatic OPUS_INLINE short ADD16_(int a, int b, char *file, int line)\n{\n   int res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"ADD16: inputs are not short: %d %d in %s: line %d\\n\", a, b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a+b;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"ADD16: output is not short: %d+%d=%d in %s: line %d\\n\", a,b,res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips++;\n   return res;\n}\n\n#define SUB16(a, b) SUB16_(a, b, __FILE__, __LINE__)\nstatic OPUS_INLINE short SUB16_(int a, int b, char *file, int line)\n{\n   int res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"SUB16: inputs are not short: %d %d in %s: line %d\\n\", a, b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a-b;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"SUB16: output is not short: %d in %s: line %d\\n\", res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips++;\n   return res;\n}\n\n#define ADD32(a, b) ADD32_(a, b, __FILE__, __LINE__)\nstatic OPUS_INLINE int ADD32_(opus_int64 a, opus_int64 b, char *file, int line)\n{\n   opus_int64 res;\n   if (!VERIFY_INT(a) || !VERIFY_INT(b))\n   {\n      fprintf (stderr, \"ADD32: inputs are not int: %d %d in %s: line %d\\n\", (int)a, (int)b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a+b;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"ADD32: output is not int: %d in %s: line %d\\n\", (int)res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=2;\n   return res;\n}\n\n#define SUB32(a, b) SUB32_(a, b, __FILE__, __LINE__)\nstatic OPUS_INLINE int SUB32_(opus_int64 a, opus_int64 b, char *file, int line)\n{\n   opus_int64 res;\n   if (!VERIFY_INT(a) || !VERIFY_INT(b))\n   {\n      fprintf (stderr, \"SUB32: inputs are not int: %d %d in %s: line %d\\n\", (int)a, (int)b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a-b;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"SUB32: output is not int: %d in %s: line %d\\n\", (int)res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=2;\n   return res;\n}\n\n#undef UADD32\n#define UADD32(a, b) UADD32_(a, b, __FILE__, __LINE__)\nstatic OPUS_INLINE unsigned int UADD32_(opus_uint64 a, opus_uint64 b, char *file, int line)\n{\n   opus_uint64 res;\n   if (!VERIFY_UINT(a) || !VERIFY_UINT(b))\n   {\n      fprintf (stderr, \"UADD32: inputs are not uint32: %llu %llu in %s: line %d\\n\", a, b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a+b;\n   if (!VERIFY_UINT(res))\n   {\n      fprintf (stderr, \"UADD32: output is not uint32: %llu in %s: line %d\\n\", res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=2;\n   return res;\n}\n\n#undef USUB32\n#define USUB32(a, b) USUB32_(a, b, __FILE__, __LINE__)\nstatic OPUS_INLINE unsigned int USUB32_(opus_uint64 a, opus_uint64 b, char *file, int line)\n{\n   opus_uint64 res;\n   if (!VERIFY_UINT(a) || !VERIFY_UINT(b))\n   {\n      fprintf (stderr, \"USUB32: inputs are not uint32: %llu %llu in %s: line %d\\n\", a, b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   if (a<b)\n   {\n      fprintf (stderr, \"USUB32: inputs underflow: %llu < %llu in %s: line %d\\n\", a, b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a-b;\n   if (!VERIFY_UINT(res))\n   {\n      fprintf (stderr, \"USUB32: output is not uint32: %llu - %llu = %llu in %s: line %d\\n\", a, b, res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=2;\n   return res;\n}\n\n/* result fits in 16 bits */\nstatic OPUS_INLINE short MULT16_16_16(int a, int b)\n{\n   int res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"MULT16_16_16: inputs are not short: %d %d\\n\", a, b);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a*b;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"MULT16_16_16: output is not short: %d\\n\", res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips++;\n   return res;\n}\n\n#define MULT16_16(a, b) MULT16_16_(a, b, __FILE__, __LINE__)\nstatic OPUS_INLINE int MULT16_16_(int a, int b, char *file, int line)\n{\n   opus_int64 res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"MULT16_16: inputs are not short: %d %d in %s: line %d\\n\", a, b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = ((opus_int64)a)*b;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"MULT16_16: output is not int: %d in %s: line %d\\n\", (int)res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips++;\n   return res;\n}\n\n#define MAC16_16(c,a,b)     (celt_mips-=2,ADD32((c),MULT16_16((a),(b))))\n\n#define MULT16_32_QX(a, b, Q) MULT16_32_QX_(a, b, Q, __FILE__, __LINE__)\nstatic OPUS_INLINE int MULT16_32_QX_(int a, opus_int64 b, int Q, char *file, int line)\n{\n   opus_int64 res;\n   if (!VERIFY_SHORT(a) || !VERIFY_INT(b))\n   {\n      fprintf (stderr, \"MULT16_32_Q%d: inputs are not short+int: %d %d in %s: line %d\\n\", Q, (int)a, (int)b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   if (ABS32(b)>=((opus_val32)(1)<<(15+Q)))\n   {\n      fprintf (stderr, \"MULT16_32_Q%d: second operand too large: %d %d in %s: line %d\\n\", Q, (int)a, (int)b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = (((opus_int64)a)*(opus_int64)b) >> Q;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"MULT16_32_Q%d: output is not int: %d*%d=%d in %s: line %d\\n\", Q, (int)a, (int)b,(int)res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   if (Q==15)\n      celt_mips+=3;\n   else\n      celt_mips+=4;\n   return res;\n}\n\n#define MULT16_32_PX(a, b, Q) MULT16_32_PX_(a, b, Q, __FILE__, __LINE__)\nstatic OPUS_INLINE int MULT16_32_PX_(int a, opus_int64 b, int Q, char *file, int line)\n{\n   opus_int64 res;\n   if (!VERIFY_SHORT(a) || !VERIFY_INT(b))\n   {\n      fprintf (stderr, \"MULT16_32_P%d: inputs are not short+int: %d %d in %s: line %d\\n\\n\", Q, (int)a, (int)b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   if (ABS32(b)>=((opus_int64)(1)<<(15+Q)))\n   {\n      fprintf (stderr, \"MULT16_32_Q%d: second operand too large: %d %d in %s: line %d\\n\\n\", Q, (int)a, (int)b,file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = ((((opus_int64)a)*(opus_int64)b) + (((opus_val32)(1)<<Q)>>1))>> Q;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"MULT16_32_P%d: output is not int: %d*%d=%d in %s: line %d\\n\\n\", Q, (int)a, (int)b,(int)res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   if (Q==15)\n      celt_mips+=4;\n   else\n      celt_mips+=5;\n   return res;\n}\n\n#define MULT16_32_Q15(a,b) MULT16_32_QX(a,b,15)\n#define MAC16_32_Q15(c,a,b) (celt_mips-=2,ADD32((c),MULT16_32_Q15((a),(b))))\n\nstatic OPUS_INLINE int SATURATE(int a, int b)\n{\n   if (a>b)\n      a=b;\n   if (a<-b)\n      a = -b;\n   celt_mips+=3;\n   return a;\n}\n\nstatic OPUS_INLINE opus_int16 SATURATE16(opus_int32 a)\n{\n   celt_mips+=3;\n   if (a>32767)\n      return 32767;\n   else if (a<-32768)\n      return -32768;\n   else return a;\n}\n\nstatic OPUS_INLINE int MULT16_16_Q11_32(int a, int b)\n{\n   opus_int64 res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"MULT16_16_Q11: inputs are not short: %d %d\\n\", a, b);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = ((opus_int64)a)*b;\n   res >>= 11;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"MULT16_16_Q11: output is not short: %d*%d=%d\\n\", (int)a, (int)b, (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=3;\n   return res;\n}\nstatic OPUS_INLINE short MULT16_16_Q13(int a, int b)\n{\n   opus_int64 res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"MULT16_16_Q13: inputs are not short: %d %d\\n\", a, b);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = ((opus_int64)a)*b;\n   res >>= 13;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"MULT16_16_Q13: output is not short: %d*%d=%d\\n\", a, b, (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=3;\n   return res;\n}\nstatic OPUS_INLINE short MULT16_16_Q14(int a, int b)\n{\n   opus_int64 res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"MULT16_16_Q14: inputs are not short: %d %d\\n\", a, b);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = ((opus_int64)a)*b;\n   res >>= 14;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"MULT16_16_Q14: output is not short: %d\\n\", (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=3;\n   return res;\n}\n\n#define MULT16_16_Q15(a, b) MULT16_16_Q15_(a, b, __FILE__, __LINE__)\nstatic OPUS_INLINE short MULT16_16_Q15_(int a, int b, char *file, int line)\n{\n   opus_int64 res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"MULT16_16_Q15: inputs are not short: %d %d in %s: line %d\\n\", a, b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = ((opus_int64)a)*b;\n   res >>= 15;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"MULT16_16_Q15: output is not short: %d in %s: line %d\\n\", (int)res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=1;\n   return res;\n}\n\nstatic OPUS_INLINE short MULT16_16_P13(int a, int b)\n{\n   opus_int64 res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"MULT16_16_P13: inputs are not short: %d %d\\n\", a, b);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = ((opus_int64)a)*b;\n   res += 4096;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"MULT16_16_P13: overflow: %d*%d=%d\\n\", a, b, (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res >>= 13;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"MULT16_16_P13: output is not short: %d*%d=%d\\n\", a, b, (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=4;\n   return res;\n}\nstatic OPUS_INLINE short MULT16_16_P14(int a, int b)\n{\n   opus_int64 res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"MULT16_16_P14: inputs are not short: %d %d\\n\", a, b);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = ((opus_int64)a)*b;\n   res += 8192;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"MULT16_16_P14: overflow: %d*%d=%d\\n\", a, b, (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res >>= 14;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"MULT16_16_P14: output is not short: %d*%d=%d\\n\", a, b, (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=4;\n   return res;\n}\nstatic OPUS_INLINE short MULT16_16_P15(int a, int b)\n{\n   opus_int64 res;\n   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"MULT16_16_P15: inputs are not short: %d %d\\n\", a, b);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = ((opus_int64)a)*b;\n   res += 16384;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"MULT16_16_P15: overflow: %d*%d=%d\\n\", a, b, (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res >>= 15;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"MULT16_16_P15: output is not short: %d*%d=%d\\n\", a, b, (int)res);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=2;\n   return res;\n}\n\n#define DIV32_16(a, b) DIV32_16_(a, b, __FILE__, __LINE__)\n\nstatic OPUS_INLINE int DIV32_16_(opus_int64 a, opus_int64 b, char *file, int line)\n{\n   opus_int64 res;\n   if (b==0)\n   {\n      fprintf(stderr, \"DIV32_16: divide by zero: %d/%d in %s: line %d\\n\", (int)a, (int)b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n      return 0;\n   }\n   if (!VERIFY_INT(a) || !VERIFY_SHORT(b))\n   {\n      fprintf (stderr, \"DIV32_16: inputs are not int/short: %d %d in %s: line %d\\n\", (int)a, (int)b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a/b;\n   if (!VERIFY_SHORT(res))\n   {\n      fprintf (stderr, \"DIV32_16: output is not short: %d / %d = %d in %s: line %d\\n\", (int)a,(int)b,(int)res, file, line);\n      if (res>32767)\n         res = 32767;\n      if (res<-32768)\n         res = -32768;\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=35;\n   return res;\n}\n\n#define DIV32(a, b) DIV32_(a, b, __FILE__, __LINE__)\nstatic OPUS_INLINE int DIV32_(opus_int64 a, opus_int64 b, char *file, int line)\n{\n   opus_int64 res;\n   if (b==0)\n   {\n      fprintf(stderr, \"DIV32: divide by zero: %d/%d in %s: line %d\\n\", (int)a, (int)b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n      return 0;\n   }\n\n   if (!VERIFY_INT(a) || !VERIFY_INT(b))\n   {\n      fprintf (stderr, \"DIV32: inputs are not int/short: %d %d in %s: line %d\\n\", (int)a, (int)b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   res = a/b;\n   if (!VERIFY_INT(res))\n   {\n      fprintf (stderr, \"DIV32: output is not int: %d in %s: line %d\\n\", (int)res, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n      celt_assert(0);\n#endif\n   }\n   celt_mips+=70;\n   return res;\n}\n\n#undef PRINT_MIPS\n#define PRINT_MIPS(file) do {fprintf (file, \"total complexity = %llu MIPS\\n\", celt_mips);} while (0);\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/fixed_generic.h",
    "content": "/* Copyright (C) 2007-2009 Xiph.Org Foundation\n   Copyright (C) 2003-2008 Jean-Marc Valin\n   Copyright (C) 2007-2008 CSIRO */\n/**\n   @file fixed_generic.h\n   @brief Generic fixed-point operations\n*/\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef FIXED_GENERIC_H\n#define FIXED_GENERIC_H\n\n/** Multiply a 16-bit signed value by a 16-bit unsigned value. The result is a 32-bit signed value */\n#define MULT16_16SU(a,b) ((opus_val32)(opus_val16)(a)*(opus_val32)(opus_uint16)(b))\n\n/** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */\n#define MULT16_32_Q16(a,b) ADD32(MULT16_16((a),SHR((b),16)), SHR(MULT16_16SU((a),((b)&0x0000ffff)),16))\n\n/** 16x32 multiplication, followed by a 16-bit shift right (round-to-nearest). Results fits in 32 bits */\n#define MULT16_32_P16(a,b) ADD32(MULT16_16((a),SHR((b),16)), PSHR(MULT16_16SU((a),((b)&0x0000ffff)),16))\n\n/** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */\n#define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),((b)&0x0000ffff)),15))\n\n/** 32x32 multiplication, followed by a 31-bit shift right. Results fits in 32 bits */\n#define MULT32_32_Q31(a,b) ADD32(ADD32(SHL(MULT16_16(SHR((a),16),SHR((b),16)),1), SHR(MULT16_16SU(SHR((a),16),((b)&0x0000ffff)),15)), SHR(MULT16_16SU(SHR((b),16),((a)&0x0000ffff)),15))\n\n/** Compile-time conversion of float constant to 16-bit value */\n#define QCONST16(x,bits) ((opus_val16)(.5+(x)*(((opus_val32)1)<<(bits))))\n\n/** Compile-time conversion of float constant to 32-bit value */\n#define QCONST32(x,bits) ((opus_val32)(.5+(x)*(((opus_val32)1)<<(bits))))\n\n/** Negate a 16-bit value */\n#define NEG16(x) (-(x))\n/** Negate a 32-bit value */\n#define NEG32(x) (-(x))\n\n/** Change a 32-bit value into a 16-bit value. The value is assumed to fit in 16-bit, otherwise the result is undefined */\n#define EXTRACT16(x) ((opus_val16)(x))\n/** Change a 16-bit value into a 32-bit value */\n#define EXTEND32(x) ((opus_val32)(x))\n\n/** Arithmetic shift-right of a 16-bit value */\n#define SHR16(a,shift) ((a) >> (shift))\n/** Arithmetic shift-left of a 16-bit value */\n#define SHL16(a,shift) ((opus_int16)((opus_uint16)(a)<<(shift)))\n/** Arithmetic shift-right of a 32-bit value */\n#define SHR32(a,shift) ((a) >> (shift))\n/** Arithmetic shift-left of a 32-bit value */\n#define SHL32(a,shift) ((opus_int32)((opus_uint32)(a)<<(shift)))\n\n/** 32-bit arithmetic shift right with rounding-to-nearest instead of rounding down */\n#define PSHR32(a,shift) (SHR32((a)+((EXTEND32(1)<<((shift))>>1)),shift))\n/** 32-bit arithmetic shift right where the argument can be negative */\n#define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))\n\n/** \"RAW\" macros, should not be used outside of this header file */\n#define SHR(a,shift) ((a) >> (shift))\n#define SHL(a,shift) SHL32(a,shift)\n#define PSHR(a,shift) (SHR((a)+((EXTEND32(1)<<((shift))>>1)),shift))\n#define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))\n\n#define SATURATE16(x) (EXTRACT16((x)>32767 ? 32767 : (x)<-32768 ? -32768 : (x)))\n\n/** Shift by a and round-to-neareast 32-bit value. Result is a 16-bit value */\n#define ROUND16(x,a) (EXTRACT16(PSHR32((x),(a))))\n/** Divide by two */\n#define HALF16(x)  (SHR16(x,1))\n#define HALF32(x)  (SHR32(x,1))\n\n/** Add two 16-bit values */\n#define ADD16(a,b) ((opus_val16)((opus_val16)(a)+(opus_val16)(b)))\n/** Subtract two 16-bit values */\n#define SUB16(a,b) ((opus_val16)(a)-(opus_val16)(b))\n/** Add two 32-bit values */\n#define ADD32(a,b) ((opus_val32)(a)+(opus_val32)(b))\n/** Subtract two 32-bit values */\n#define SUB32(a,b) ((opus_val32)(a)-(opus_val32)(b))\n\n/** 16x16 multiplication where the result fits in 16 bits */\n#define MULT16_16_16(a,b)     ((((opus_val16)(a))*((opus_val16)(b))))\n\n/* (opus_val32)(opus_val16) gives TI compiler a hint that it's 16x16->32 multiply */\n/** 16x16 multiplication where the result fits in 32 bits */\n#define MULT16_16(a,b)     (((opus_val32)(opus_val16)(a))*((opus_val32)(opus_val16)(b)))\n\n/** 16x16 multiply-add where the result fits in 32 bits */\n#define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b))))\n/** 16x32 multiply, followed by a 15-bit shift right and 32-bit add.\n    b must fit in 31 bits.\n    Result fits in 32 bits. */\n#define MAC16_32_Q15(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15)))\n\n#define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11))\n#define MULT16_16_Q11(a,b) (SHR(MULT16_16((a),(b)),11))\n#define MULT16_16_Q13(a,b) (SHR(MULT16_16((a),(b)),13))\n#define MULT16_16_Q14(a,b) (SHR(MULT16_16((a),(b)),14))\n#define MULT16_16_Q15(a,b) (SHR(MULT16_16((a),(b)),15))\n\n#define MULT16_16_P13(a,b) (SHR(ADD32(4096,MULT16_16((a),(b))),13))\n#define MULT16_16_P14(a,b) (SHR(ADD32(8192,MULT16_16((a),(b))),14))\n#define MULT16_16_P15(a,b) (SHR(ADD32(16384,MULT16_16((a),(b))),15))\n\n/** Divide a 32-bit value by a 16-bit value. Result fits in 16 bits */\n#define DIV32_16(a,b) ((opus_val16)(((opus_val32)(a))/((opus_val16)(b))))\n\n/** Divide a 32-bit value by a 32-bit value. Result fits in 32 bits */\n#define DIV32(a,b) (((opus_val32)(a))/((opus_val32)(b)))\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/float_cast.h",
    "content": "/* Copyright (C) 2001 Erik de Castro Lopo <erikd AT mega-nerd DOT com> */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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/* Version 1.1 */\n\n#ifndef FLOAT_CAST_H\n#define FLOAT_CAST_H\n\n\n#include \"arch.h\"\n\n/*============================================================================\n**      On Intel Pentium processors (especially PIII and probably P4), converting\n**      from float to int is very slow. To meet the C specs, the code produced by\n**      most C compilers targeting Pentium needs to change the FPU rounding mode\n**      before the float to int conversion is performed.\n**\n**      Changing the FPU rounding mode causes the FPU pipeline to be flushed. It\n**      is this flushing of the pipeline which is so slow.\n**\n**      Fortunately the ISO C99 specifications define the functions lrint, lrintf,\n**      llrint and llrintf which fix this problem as a side effect.\n**\n**      On Unix-like systems, the configure process should have detected the\n**      presence of these functions. If they weren't found we have to replace them\n**      here with a standard C cast.\n*/\n\n/*\n**      The C99 prototypes for lrint and lrintf are as follows:\n**\n**              long int lrintf (float x) ;\n**              long int lrint  (double x) ;\n*/\n\n/*      The presence of the required functions are detected during the configure\n**      process and the values HAVE_LRINT and HAVE_LRINTF are set accordingly in\n**      the config.h file.\n*/\n\n#if (HAVE_LRINTF)\n\n/*      These defines enable functionality introduced with the 1999 ISO C\n**      standard. They must be defined before the inclusion of math.h to\n**      engage them. If optimisation is enabled, these functions will be\n**      inlined. With optimisation switched off, you have to link in the\n**      maths library using -lm.\n*/\n\n#define _ISOC9X_SOURCE 1\n#define _ISOC99_SOURCE 1\n\n#define __USE_ISOC9X 1\n#define __USE_ISOC99 1\n\n#include <math.h>\n#define float2int(x) lrintf(x)\n\n#elif (defined(HAVE_LRINT))\n\n#define _ISOC9X_SOURCE 1\n#define _ISOC99_SOURCE 1\n\n#define __USE_ISOC9X 1\n#define __USE_ISOC99 1\n\n#include <math.h>\n#define float2int(x) lrint(x)\n\n#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || defined (_WIN64))\n        #include <xmmintrin.h>\n\n        __inline long int float2int(float value)\n        {\n                return _mm_cvtss_si32(_mm_load_ss(&value));\n        }\n#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN32) || defined (_WIN32))\n        #include <math.h>\n\n        /*      Win32 doesn't seem to have these functions.\n        **      Therefore implement OPUS_INLINE versions of these functions here.\n        */\n\n        __inline long int\n        float2int (float flt)\n        {       int intgr;\n\n                _asm\n                {       fld flt\n                        fistp intgr\n                } ;\n\n                return intgr ;\n        }\n\n#else\n\n#if (defined(__GNUC__) && defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L)\n        /* supported by gcc in C99 mode, but not by all other compilers */\n        #warning \"Don't have the functions lrint() and lrintf ().\"\n        #warning \"Replacing these functions with a standard C cast.\"\n#endif /* __STDC_VERSION__ >= 199901L */\n        #include <math.h>\n        #define float2int(flt) ((int)(floor(.5+flt)))\n#endif\n\n#ifndef DISABLE_FLOAT_API\nstatic OPUS_INLINE opus_int16 FLOAT2INT16(float x)\n{\n   x = x*CELT_SIG_SCALE;\n   x = MAX32(x, -32768);\n   x = MIN32(x, 32767);\n   return (opus_int16)float2int(x);\n}\n#endif /* DISABLE_FLOAT_API */\n\n#endif /* FLOAT_CAST_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/kiss_fft.c",
    "content": "/*Copyright (c) 2003-2004, Mark Borgerding\n  Lots of modifications by Jean-Marc Valin\n  Copyright (c) 2005-2007, Xiph.Org Foundation\n  Copyright (c) 2008,      Xiph.Org Foundation, CSIRO\n\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    * Redistributions of source code must retain the above copyright notice,\n       this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright notice,\n       this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\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\n  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n  POSSIBILITY OF SUCH DAMAGE.*/\n\n/* This code is originally from Mark Borgerding's KISS-FFT but has been\n   heavily modified to better suit Opus */\n\n#ifndef SKIP_CONFIG_H\n#  ifdef HAVE_CONFIG_H\n#    include \"config.h\"\n#  endif\n#endif\n\n#include \"_kiss_fft_guts.h\"\n#include \"arch.h\"\n#include \"os_support.h\"\n#include \"mathops.h\"\n#include \"stack_alloc.h\"\n\n/* The guts header contains all the multiplication and addition macros that are defined for\n   complex numbers.  It also delares the kf_ internal functions.\n*/\n\nstatic void kf_bfly2(\n                     kiss_fft_cpx * Fout,\n                     const size_t fstride,\n                     const kiss_fft_state *st,\n                     int m,\n                     int N,\n                     int mm\n                    )\n{\n   kiss_fft_cpx * Fout2;\n   const kiss_twiddle_cpx * tw1;\n   int i,j;\n   kiss_fft_cpx * Fout_beg = Fout;\n   for (i=0;i<N;i++)\n   {\n      Fout = Fout_beg + i*mm;\n      Fout2 = Fout + m;\n      tw1 = st->twiddles;\n      for(j=0;j<m;j++)\n      {\n         kiss_fft_cpx t;\n         Fout->r = SHR32(Fout->r, 1);Fout->i = SHR32(Fout->i, 1);\n         Fout2->r = SHR32(Fout2->r, 1);Fout2->i = SHR32(Fout2->i, 1);\n         C_MUL (t,  *Fout2 , *tw1);\n         tw1 += fstride;\n         C_SUB( *Fout2 ,  *Fout , t );\n         C_ADDTO( *Fout ,  t );\n         ++Fout2;\n         ++Fout;\n      }\n   }\n}\n\nstatic void ki_bfly2(\n                     kiss_fft_cpx * Fout,\n                     const size_t fstride,\n                     const kiss_fft_state *st,\n                     int m,\n                     int N,\n                     int mm\n                    )\n{\n   kiss_fft_cpx * Fout2;\n   const kiss_twiddle_cpx * tw1;\n   kiss_fft_cpx t;\n   int i,j;\n   kiss_fft_cpx * Fout_beg = Fout;\n   for (i=0;i<N;i++)\n   {\n      Fout = Fout_beg + i*mm;\n      Fout2 = Fout + m;\n      tw1 = st->twiddles;\n      for(j=0;j<m;j++)\n      {\n         C_MULC (t,  *Fout2 , *tw1);\n         tw1 += fstride;\n         C_SUB( *Fout2 ,  *Fout , t );\n         C_ADDTO( *Fout ,  t );\n         ++Fout2;\n         ++Fout;\n      }\n   }\n}\n\nstatic void kf_bfly4(\n                     kiss_fft_cpx * Fout,\n                     const size_t fstride,\n                     const kiss_fft_state *st,\n                     int m,\n                     int N,\n                     int mm\n                    )\n{\n   const kiss_twiddle_cpx *tw1,*tw2,*tw3;\n   kiss_fft_cpx scratch[6];\n   const size_t m2=2*m;\n   const size_t m3=3*m;\n   int i, j;\n\n   kiss_fft_cpx * Fout_beg = Fout;\n   for (i=0;i<N;i++)\n   {\n      Fout = Fout_beg + i*mm;\n      tw3 = tw2 = tw1 = st->twiddles;\n      for (j=0;j<m;j++)\n      {\n         C_MUL4(scratch[0],Fout[m] , *tw1 );\n         C_MUL4(scratch[1],Fout[m2] , *tw2 );\n         C_MUL4(scratch[2],Fout[m3] , *tw3 );\n\n         Fout->r = PSHR32(Fout->r, 2);\n         Fout->i = PSHR32(Fout->i, 2);\n         C_SUB( scratch[5] , *Fout, scratch[1] );\n         C_ADDTO(*Fout, scratch[1]);\n         C_ADD( scratch[3] , scratch[0] , scratch[2] );\n         C_SUB( scratch[4] , scratch[0] , scratch[2] );\n         C_SUB( Fout[m2], *Fout, scratch[3] );\n         tw1 += fstride;\n         tw2 += fstride*2;\n         tw3 += fstride*3;\n         C_ADDTO( *Fout , scratch[3] );\n\n         Fout[m].r = scratch[5].r + scratch[4].i;\n         Fout[m].i = scratch[5].i - scratch[4].r;\n         Fout[m3].r = scratch[5].r - scratch[4].i;\n         Fout[m3].i = scratch[5].i + scratch[4].r;\n         ++Fout;\n      }\n   }\n}\n\nstatic void ki_bfly4(\n                     kiss_fft_cpx * Fout,\n                     const size_t fstride,\n                     const kiss_fft_state *st,\n                     int m,\n                     int N,\n                     int mm\n                    )\n{\n   const kiss_twiddle_cpx *tw1,*tw2,*tw3;\n   kiss_fft_cpx scratch[6];\n   const size_t m2=2*m;\n   const size_t m3=3*m;\n   int i, j;\n\n   kiss_fft_cpx * Fout_beg = Fout;\n   for (i=0;i<N;i++)\n   {\n      Fout = Fout_beg + i*mm;\n      tw3 = tw2 = tw1 = st->twiddles;\n      for (j=0;j<m;j++)\n      {\n         C_MULC(scratch[0],Fout[m] , *tw1 );\n         C_MULC(scratch[1],Fout[m2] , *tw2 );\n         C_MULC(scratch[2],Fout[m3] , *tw3 );\n\n         C_SUB( scratch[5] , *Fout, scratch[1] );\n         C_ADDTO(*Fout, scratch[1]);\n         C_ADD( scratch[3] , scratch[0] , scratch[2] );\n         C_SUB( scratch[4] , scratch[0] , scratch[2] );\n         C_SUB( Fout[m2], *Fout, scratch[3] );\n         tw1 += fstride;\n         tw2 += fstride*2;\n         tw3 += fstride*3;\n         C_ADDTO( *Fout , scratch[3] );\n\n         Fout[m].r = scratch[5].r - scratch[4].i;\n         Fout[m].i = scratch[5].i + scratch[4].r;\n         Fout[m3].r = scratch[5].r + scratch[4].i;\n         Fout[m3].i = scratch[5].i - scratch[4].r;\n         ++Fout;\n      }\n   }\n}\n\n#ifndef RADIX_TWO_ONLY\n\nstatic void kf_bfly3(\n                     kiss_fft_cpx * Fout,\n                     const size_t fstride,\n                     const kiss_fft_state *st,\n                     int m,\n                     int N,\n                     int mm\n                    )\n{\n   int i;\n   size_t k;\n   const size_t m2 = 2*m;\n   const kiss_twiddle_cpx *tw1,*tw2;\n   kiss_fft_cpx scratch[5];\n   kiss_twiddle_cpx epi3;\n\n   kiss_fft_cpx * Fout_beg = Fout;\n   epi3 = st->twiddles[fstride*m];\n   for (i=0;i<N;i++)\n   {\n      Fout = Fout_beg + i*mm;\n      tw1=tw2=st->twiddles;\n      k=m;\n      do {\n         C_FIXDIV(*Fout,3); C_FIXDIV(Fout[m],3); C_FIXDIV(Fout[m2],3);\n\n         C_MUL(scratch[1],Fout[m] , *tw1);\n         C_MUL(scratch[2],Fout[m2] , *tw2);\n\n         C_ADD(scratch[3],scratch[1],scratch[2]);\n         C_SUB(scratch[0],scratch[1],scratch[2]);\n         tw1 += fstride;\n         tw2 += fstride*2;\n\n         Fout[m].r = Fout->r - HALF_OF(scratch[3].r);\n         Fout[m].i = Fout->i - HALF_OF(scratch[3].i);\n\n         C_MULBYSCALAR( scratch[0] , epi3.i );\n\n         C_ADDTO(*Fout,scratch[3]);\n\n         Fout[m2].r = Fout[m].r + scratch[0].i;\n         Fout[m2].i = Fout[m].i - scratch[0].r;\n\n         Fout[m].r -= scratch[0].i;\n         Fout[m].i += scratch[0].r;\n\n         ++Fout;\n      } while(--k);\n   }\n}\n\nstatic void ki_bfly3(\n                     kiss_fft_cpx * Fout,\n                     const size_t fstride,\n                     const kiss_fft_state *st,\n                     int m,\n                     int N,\n                     int mm\n                    )\n{\n   int i, k;\n   const size_t m2 = 2*m;\n   const kiss_twiddle_cpx *tw1,*tw2;\n   kiss_fft_cpx scratch[5];\n   kiss_twiddle_cpx epi3;\n\n   kiss_fft_cpx * Fout_beg = Fout;\n   epi3 = st->twiddles[fstride*m];\n   for (i=0;i<N;i++)\n   {\n      Fout = Fout_beg + i*mm;\n      tw1=tw2=st->twiddles;\n      k=m;\n      do{\n\n         C_MULC(scratch[1],Fout[m] , *tw1);\n         C_MULC(scratch[2],Fout[m2] , *tw2);\n\n         C_ADD(scratch[3],scratch[1],scratch[2]);\n         C_SUB(scratch[0],scratch[1],scratch[2]);\n         tw1 += fstride;\n         tw2 += fstride*2;\n\n         Fout[m].r = Fout->r - HALF_OF(scratch[3].r);\n         Fout[m].i = Fout->i - HALF_OF(scratch[3].i);\n\n         C_MULBYSCALAR( scratch[0] , -epi3.i );\n\n         C_ADDTO(*Fout,scratch[3]);\n\n         Fout[m2].r = Fout[m].r + scratch[0].i;\n         Fout[m2].i = Fout[m].i - scratch[0].r;\n\n         Fout[m].r -= scratch[0].i;\n         Fout[m].i += scratch[0].r;\n\n         ++Fout;\n      }while(--k);\n   }\n}\n\nstatic void kf_bfly5(\n                     kiss_fft_cpx * Fout,\n                     const size_t fstride,\n                     const kiss_fft_state *st,\n                     int m,\n                     int N,\n                     int mm\n                    )\n{\n   kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4;\n   int i, u;\n   kiss_fft_cpx scratch[13];\n   const kiss_twiddle_cpx * twiddles = st->twiddles;\n   const kiss_twiddle_cpx *tw;\n   kiss_twiddle_cpx ya,yb;\n   kiss_fft_cpx * Fout_beg = Fout;\n\n   ya = twiddles[fstride*m];\n   yb = twiddles[fstride*2*m];\n   tw=st->twiddles;\n\n   for (i=0;i<N;i++)\n   {\n      Fout = Fout_beg + i*mm;\n      Fout0=Fout;\n      Fout1=Fout0+m;\n      Fout2=Fout0+2*m;\n      Fout3=Fout0+3*m;\n      Fout4=Fout0+4*m;\n\n      for ( u=0; u<m; ++u ) {\n         C_FIXDIV( *Fout0,5); C_FIXDIV( *Fout1,5); C_FIXDIV( *Fout2,5); C_FIXDIV( *Fout3,5); C_FIXDIV( *Fout4,5);\n         scratch[0] = *Fout0;\n\n         C_MUL(scratch[1] ,*Fout1, tw[u*fstride]);\n         C_MUL(scratch[2] ,*Fout2, tw[2*u*fstride]);\n         C_MUL(scratch[3] ,*Fout3, tw[3*u*fstride]);\n         C_MUL(scratch[4] ,*Fout4, tw[4*u*fstride]);\n\n         C_ADD( scratch[7],scratch[1],scratch[4]);\n         C_SUB( scratch[10],scratch[1],scratch[4]);\n         C_ADD( scratch[8],scratch[2],scratch[3]);\n         C_SUB( scratch[9],scratch[2],scratch[3]);\n\n         Fout0->r += scratch[7].r + scratch[8].r;\n         Fout0->i += scratch[7].i + scratch[8].i;\n\n         scratch[5].r = scratch[0].r + S_MUL(scratch[7].r,ya.r) + S_MUL(scratch[8].r,yb.r);\n         scratch[5].i = scratch[0].i + S_MUL(scratch[7].i,ya.r) + S_MUL(scratch[8].i,yb.r);\n\n         scratch[6].r =  S_MUL(scratch[10].i,ya.i) + S_MUL(scratch[9].i,yb.i);\n         scratch[6].i = -S_MUL(scratch[10].r,ya.i) - S_MUL(scratch[9].r,yb.i);\n\n         C_SUB(*Fout1,scratch[5],scratch[6]);\n         C_ADD(*Fout4,scratch[5],scratch[6]);\n\n         scratch[11].r = scratch[0].r + S_MUL(scratch[7].r,yb.r) + S_MUL(scratch[8].r,ya.r);\n         scratch[11].i = scratch[0].i + S_MUL(scratch[7].i,yb.r) + S_MUL(scratch[8].i,ya.r);\n         scratch[12].r = - S_MUL(scratch[10].i,yb.i) + S_MUL(scratch[9].i,ya.i);\n         scratch[12].i = S_MUL(scratch[10].r,yb.i) - S_MUL(scratch[9].r,ya.i);\n\n         C_ADD(*Fout2,scratch[11],scratch[12]);\n         C_SUB(*Fout3,scratch[11],scratch[12]);\n\n         ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4;\n      }\n   }\n}\n\nstatic void ki_bfly5(\n                     kiss_fft_cpx * Fout,\n                     const size_t fstride,\n                     const kiss_fft_state *st,\n                     int m,\n                     int N,\n                     int mm\n                    )\n{\n   kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4;\n   int i, u;\n   kiss_fft_cpx scratch[13];\n   const kiss_twiddle_cpx * twiddles = st->twiddles;\n   const kiss_twiddle_cpx *tw;\n   kiss_twiddle_cpx ya,yb;\n   kiss_fft_cpx * Fout_beg = Fout;\n\n   ya = twiddles[fstride*m];\n   yb = twiddles[fstride*2*m];\n   tw=st->twiddles;\n\n   for (i=0;i<N;i++)\n   {\n      Fout = Fout_beg + i*mm;\n      Fout0=Fout;\n      Fout1=Fout0+m;\n      Fout2=Fout0+2*m;\n      Fout3=Fout0+3*m;\n      Fout4=Fout0+4*m;\n\n      for ( u=0; u<m; ++u ) {\n         scratch[0] = *Fout0;\n\n         C_MULC(scratch[1] ,*Fout1, tw[u*fstride]);\n         C_MULC(scratch[2] ,*Fout2, tw[2*u*fstride]);\n         C_MULC(scratch[3] ,*Fout3, tw[3*u*fstride]);\n         C_MULC(scratch[4] ,*Fout4, tw[4*u*fstride]);\n\n         C_ADD( scratch[7],scratch[1],scratch[4]);\n         C_SUB( scratch[10],scratch[1],scratch[4]);\n         C_ADD( scratch[8],scratch[2],scratch[3]);\n         C_SUB( scratch[9],scratch[2],scratch[3]);\n\n         Fout0->r += scratch[7].r + scratch[8].r;\n         Fout0->i += scratch[7].i + scratch[8].i;\n\n         scratch[5].r = scratch[0].r + S_MUL(scratch[7].r,ya.r) + S_MUL(scratch[8].r,yb.r);\n         scratch[5].i = scratch[0].i + S_MUL(scratch[7].i,ya.r) + S_MUL(scratch[8].i,yb.r);\n\n         scratch[6].r = -S_MUL(scratch[10].i,ya.i) - S_MUL(scratch[9].i,yb.i);\n         scratch[6].i =  S_MUL(scratch[10].r,ya.i) + S_MUL(scratch[9].r,yb.i);\n\n         C_SUB(*Fout1,scratch[5],scratch[6]);\n         C_ADD(*Fout4,scratch[5],scratch[6]);\n\n         scratch[11].r = scratch[0].r + S_MUL(scratch[7].r,yb.r) + S_MUL(scratch[8].r,ya.r);\n         scratch[11].i = scratch[0].i + S_MUL(scratch[7].i,yb.r) + S_MUL(scratch[8].i,ya.r);\n         scratch[12].r =  S_MUL(scratch[10].i,yb.i) - S_MUL(scratch[9].i,ya.i);\n         scratch[12].i = -S_MUL(scratch[10].r,yb.i) + S_MUL(scratch[9].r,ya.i);\n\n         C_ADD(*Fout2,scratch[11],scratch[12]);\n         C_SUB(*Fout3,scratch[11],scratch[12]);\n\n         ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4;\n      }\n   }\n}\n\n#endif\n\n\n#ifdef CUSTOM_MODES\n\nstatic\nvoid compute_bitrev_table(\n         int Fout,\n         opus_int16 *f,\n         const size_t fstride,\n         int in_stride,\n         opus_int16 * factors,\n         const kiss_fft_state *st\n            )\n{\n   const int p=*factors++; /* the radix  */\n   const int m=*factors++; /* stage's fft length/p */\n\n    /*printf (\"fft %d %d %d %d %d %d\\n\", p*m, m, p, s2, fstride*in_stride, N);*/\n   if (m==1)\n   {\n      int j;\n      for (j=0;j<p;j++)\n      {\n         *f = Fout+j;\n         f += fstride*in_stride;\n      }\n   } else {\n      int j;\n      for (j=0;j<p;j++)\n      {\n         compute_bitrev_table( Fout , f, fstride*p, in_stride, factors,st);\n         f += fstride*in_stride;\n         Fout += m;\n      }\n   }\n}\n\n/*  facbuf is populated by p1,m1,p2,m2, ...\n    where\n    p[i] * m[i] = m[i-1]\n    m0 = n                  */\nstatic\nint kf_factor(int n,opus_int16 * facbuf)\n{\n    int p=4;\n\n    /*factor out powers of 4, powers of 2, then any remaining primes */\n    do {\n        while (n % p) {\n            switch (p) {\n                case 4: p = 2; break;\n                case 2: p = 3; break;\n                default: p += 2; break;\n            }\n            if (p>32000 || (opus_int32)p*(opus_int32)p > n)\n                p = n;          /* no more factors, skip to end */\n        }\n        n /= p;\n#ifdef RADIX_TWO_ONLY\n        if (p!=2 && p != 4)\n#else\n        if (p>5)\n#endif\n        {\n           return 0;\n        }\n        *facbuf++ = p;\n        *facbuf++ = n;\n    } while (n > 1);\n    return 1;\n}\n\nstatic void compute_twiddles(kiss_twiddle_cpx *twiddles, int nfft)\n{\n   int i;\n#ifdef FIXED_POINT\n   for (i=0;i<nfft;++i) {\n      opus_val32 phase = -i;\n      kf_cexp2(twiddles+i, DIV32(SHL32(phase,17),nfft));\n   }\n#else\n   for (i=0;i<nfft;++i) {\n      const double pi=3.14159265358979323846264338327;\n      double phase = ( -2*pi /nfft ) * i;\n      kf_cexp(twiddles+i, phase );\n   }\n#endif\n}\n\n/*\n *\n * Allocates all necessary storage space for the fft and ifft.\n * The return value is a contiguous block of memory.  As such,\n * It can be freed with free().\n * */\nkiss_fft_state *opus_fft_alloc_twiddles(int nfft,void * mem,size_t * lenmem,  const kiss_fft_state *base)\n{\n    kiss_fft_state *st=NULL;\n    size_t memneeded = sizeof(struct kiss_fft_state); /* twiddle factors*/\n\n    if ( lenmem==NULL ) {\n        st = ( kiss_fft_state*)KISS_FFT_MALLOC( memneeded );\n    }else{\n        if (mem != NULL && *lenmem >= memneeded)\n            st = (kiss_fft_state*)mem;\n        *lenmem = memneeded;\n    }\n    if (st) {\n        opus_int16 *bitrev;\n        kiss_twiddle_cpx *twiddles;\n\n        st->nfft=nfft;\n#ifndef FIXED_POINT\n        st->scale = 1.f/nfft;\n#endif\n        if (base != NULL)\n        {\n           st->twiddles = base->twiddles;\n           st->shift = 0;\n           while (nfft<<st->shift != base->nfft && st->shift < 32)\n              st->shift++;\n           if (st->shift>=32)\n              goto fail;\n        } else {\n           st->twiddles = twiddles = (kiss_twiddle_cpx*)KISS_FFT_MALLOC(sizeof(kiss_twiddle_cpx)*nfft);\n           compute_twiddles(twiddles, nfft);\n           st->shift = -1;\n        }\n        if (!kf_factor(nfft,st->factors))\n        {\n           goto fail;\n        }\n\n        /* bitrev */\n        st->bitrev = bitrev = (opus_int16*)KISS_FFT_MALLOC(sizeof(opus_int16)*nfft);\n        if (st->bitrev==NULL)\n            goto fail;\n        compute_bitrev_table(0, bitrev, 1,1, st->factors,st);\n    }\n    return st;\nfail:\n    opus_fft_free(st);\n    return NULL;\n}\n\nkiss_fft_state *opus_fft_alloc(int nfft,void * mem,size_t * lenmem )\n{\n   return opus_fft_alloc_twiddles(nfft, mem, lenmem, NULL);\n}\n\nvoid opus_fft_free(const kiss_fft_state *cfg)\n{\n   if (cfg)\n   {\n      opus_free((opus_int16*)cfg->bitrev);\n      if (cfg->shift < 0)\n         opus_free((kiss_twiddle_cpx*)cfg->twiddles);\n      opus_free((kiss_fft_state*)cfg);\n   }\n}\n\n#endif /* CUSTOM_MODES */\n\nvoid opus_fft(const kiss_fft_state *st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout)\n{\n    int m2, m;\n    int p;\n    int L;\n    int fstride[MAXFACTORS];\n    int i;\n    int shift;\n\n    /* st->shift can be -1 */\n    shift = st->shift>0 ? st->shift : 0;\n\n    celt_assert2 (fin != fout, \"In-place FFT not supported\");\n    /* Bit-reverse the input */\n    for (i=0;i<st->nfft;i++)\n    {\n       fout[st->bitrev[i]] = fin[i];\n#ifndef FIXED_POINT\n       fout[st->bitrev[i]].r *= st->scale;\n       fout[st->bitrev[i]].i *= st->scale;\n#endif\n    }\n\n    fstride[0] = 1;\n    L=0;\n    do {\n       p = st->factors[2*L];\n       m = st->factors[2*L+1];\n       fstride[L+1] = fstride[L]*p;\n       L++;\n    } while(m!=1);\n    m = st->factors[2*L-1];\n    for (i=L-1;i>=0;i--)\n    {\n       if (i!=0)\n          m2 = st->factors[2*i-1];\n       else\n          m2 = 1;\n       switch (st->factors[2*i])\n       {\n       case 2:\n          kf_bfly2(fout,fstride[i]<<shift,st,m, fstride[i], m2);\n          break;\n       case 4:\n          kf_bfly4(fout,fstride[i]<<shift,st,m, fstride[i], m2);\n          break;\n #ifndef RADIX_TWO_ONLY\n       case 3:\n          kf_bfly3(fout,fstride[i]<<shift,st,m, fstride[i], m2);\n          break;\n       case 5:\n          kf_bfly5(fout,fstride[i]<<shift,st,m, fstride[i], m2);\n          break;\n #endif\n       }\n       m = m2;\n    }\n}\n\nvoid opus_ifft(const kiss_fft_state *st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout)\n{\n   int m2, m;\n   int p;\n   int L;\n   int fstride[MAXFACTORS];\n   int i;\n   int shift;\n\n   /* st->shift can be -1 */\n   shift = st->shift>0 ? st->shift : 0;\n   celt_assert2 (fin != fout, \"In-place FFT not supported\");\n   /* Bit-reverse the input */\n   for (i=0;i<st->nfft;i++)\n      fout[st->bitrev[i]] = fin[i];\n\n   fstride[0] = 1;\n   L=0;\n   do {\n      p = st->factors[2*L];\n      m = st->factors[2*L+1];\n      fstride[L+1] = fstride[L]*p;\n      L++;\n   } while(m!=1);\n   m = st->factors[2*L-1];\n   for (i=L-1;i>=0;i--)\n   {\n      if (i!=0)\n         m2 = st->factors[2*i-1];\n      else\n         m2 = 1;\n      switch (st->factors[2*i])\n      {\n      case 2:\n         ki_bfly2(fout,fstride[i]<<shift,st,m, fstride[i], m2);\n         break;\n      case 4:\n         ki_bfly4(fout,fstride[i]<<shift,st,m, fstride[i], m2);\n         break;\n#ifndef RADIX_TWO_ONLY\n      case 3:\n         ki_bfly3(fout,fstride[i]<<shift,st,m, fstride[i], m2);\n         break;\n      case 5:\n         ki_bfly5(fout,fstride[i]<<shift,st,m, fstride[i], m2);\n         break;\n#endif\n      }\n      m = m2;\n   }\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/kiss_fft.h",
    "content": "/*Copyright (c) 2003-2004, Mark Borgerding\n  Lots of modifications by Jean-Marc Valin\n  Copyright (c) 2005-2007, Xiph.Org Foundation\n  Copyright (c) 2008,      Xiph.Org Foundation, CSIRO\n\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    * Redistributions of source code must retain the above copyright notice,\n       this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright notice,\n       this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\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\n  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n  POSSIBILITY OF SUCH DAMAGE.*/\n\n#ifndef KISS_FFT_H\n#define KISS_FFT_H\n\n#include <stdlib.h>\n#include <math.h>\n#include \"arch.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifdef USE_SIMD\n# include <xmmintrin.h>\n# define kiss_fft_scalar __m128\n#define KISS_FFT_MALLOC(nbytes) memalign(16,nbytes)\n#else\n#define KISS_FFT_MALLOC opus_alloc\n#endif\n\n#ifdef FIXED_POINT\n#include \"arch.h\"\n\n#  define kiss_fft_scalar opus_int32\n#  define kiss_twiddle_scalar opus_int16\n\n\n#else\n# ifndef kiss_fft_scalar\n/*  default is float */\n#   define kiss_fft_scalar float\n#   define kiss_twiddle_scalar float\n#   define KF_SUFFIX _celt_single\n# endif\n#endif\n\ntypedef struct {\n    kiss_fft_scalar r;\n    kiss_fft_scalar i;\n}kiss_fft_cpx;\n\ntypedef struct {\n   kiss_twiddle_scalar r;\n   kiss_twiddle_scalar i;\n}kiss_twiddle_cpx;\n\n#define MAXFACTORS 8\n/* e.g. an fft of length 128 has 4 factors\n as far as kissfft is concerned\n 4*4*4*2\n */\n\ntypedef struct kiss_fft_state{\n    int nfft;\n#ifndef FIXED_POINT\n    kiss_fft_scalar scale;\n#endif\n    int shift;\n    opus_int16 factors[2*MAXFACTORS];\n    const opus_int16 *bitrev;\n    const kiss_twiddle_cpx *twiddles;\n} kiss_fft_state;\n\n/*typedef struct kiss_fft_state* kiss_fft_cfg;*/\n\n/**\n *  opus_fft_alloc\n *\n *  Initialize a FFT (or IFFT) algorithm's cfg/state buffer.\n *\n *  typical usage:      kiss_fft_cfg mycfg=opus_fft_alloc(1024,0,NULL,NULL);\n *\n *  The return value from fft_alloc is a cfg buffer used internally\n *  by the fft routine or NULL.\n *\n *  If lenmem is NULL, then opus_fft_alloc will allocate a cfg buffer using malloc.\n *  The returned value should be free()d when done to avoid memory leaks.\n *\n *  The state can be placed in a user supplied buffer 'mem':\n *  If lenmem is not NULL and mem is not NULL and *lenmem is large enough,\n *      then the function places the cfg in mem and the size used in *lenmem\n *      and returns mem.\n *\n *  If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough),\n *      then the function returns NULL and places the minimum cfg\n *      buffer size in *lenmem.\n * */\n\nkiss_fft_state *opus_fft_alloc_twiddles(int nfft,void * mem,size_t * lenmem, const kiss_fft_state *base);\n\nkiss_fft_state *opus_fft_alloc(int nfft,void * mem,size_t * lenmem);\n\n/**\n * opus_fft(cfg,in_out_buf)\n *\n * Perform an FFT on a complex input buffer.\n * for a forward FFT,\n * fin should be  f[0] , f[1] , ... ,f[nfft-1]\n * fout will be   F[0] , F[1] , ... ,F[nfft-1]\n * Note that each element is complex and can be accessed like\n    f[k].r and f[k].i\n * */\nvoid opus_fft(const kiss_fft_state *cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);\nvoid opus_ifft(const kiss_fft_state *cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);\n\nvoid opus_fft_free(const kiss_fft_state *cfg);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/laplace.c",
    "content": "/* Copyright (c) 2007 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"laplace.h\"\n#include \"mathops.h\"\n\n/* The minimum probability of an energy delta (out of 32768). */\n#define LAPLACE_LOG_MINP (0)\n#define LAPLACE_MINP (1<<LAPLACE_LOG_MINP)\n/* The minimum number of guaranteed representable energy deltas (in one\n    direction). */\n#define LAPLACE_NMIN (16)\n\n/* When called, decay is positive and at most 11456. */\nstatic unsigned ec_laplace_get_freq1(unsigned fs0, int decay)\n{\n   unsigned ft;\n   ft = 32768 - LAPLACE_MINP*(2*LAPLACE_NMIN) - fs0;\n   return ft*(opus_int32)(16384-decay)>>15;\n}\n\nvoid ec_laplace_encode(ec_enc *enc, int *value, unsigned fs, int decay)\n{\n   unsigned fl;\n   int val = *value;\n   fl = 0;\n   if (val)\n   {\n      int s;\n      int i;\n      s = -(val<0);\n      val = (val+s)^s;\n      fl = fs;\n      fs = ec_laplace_get_freq1(fs, decay);\n      /* Search the decaying part of the PDF.*/\n      for (i=1; fs > 0 && i < val; i++)\n      {\n         fs *= 2;\n         fl += fs+2*LAPLACE_MINP;\n         fs = (fs*(opus_int32)decay)>>15;\n      }\n      /* Everything beyond that has probability LAPLACE_MINP. */\n      if (!fs)\n      {\n         int di;\n         int ndi_max;\n         ndi_max = (32768-fl+LAPLACE_MINP-1)>>LAPLACE_LOG_MINP;\n         ndi_max = (ndi_max-s)>>1;\n         di = IMIN(val - i, ndi_max - 1);\n         fl += (2*di+1+s)*LAPLACE_MINP;\n         fs = IMIN(LAPLACE_MINP, 32768-fl);\n         *value = (i+di+s)^s;\n      }\n      else\n      {\n         fs += LAPLACE_MINP;\n         fl += fs&~s;\n      }\n      celt_assert(fl+fs<=32768);\n      celt_assert(fs>0);\n   }\n   ec_encode_bin(enc, fl, fl+fs, 15);\n}\n\nint ec_laplace_decode(ec_dec *dec, unsigned fs, int decay)\n{\n   int val=0;\n   unsigned fl;\n   unsigned fm;\n   fm = ec_decode_bin(dec, 15);\n   fl = 0;\n   if (fm >= fs)\n   {\n      val++;\n      fl = fs;\n      fs = ec_laplace_get_freq1(fs, decay)+LAPLACE_MINP;\n      /* Search the decaying part of the PDF.*/\n      while(fs > LAPLACE_MINP && fm >= fl+2*fs)\n      {\n         fs *= 2;\n         fl += fs;\n         fs = ((fs-2*LAPLACE_MINP)*(opus_int32)decay)>>15;\n         fs += LAPLACE_MINP;\n         val++;\n      }\n      /* Everything beyond that has probability LAPLACE_MINP. */\n      if (fs <= LAPLACE_MINP)\n      {\n         int di;\n         di = (fm-fl)>>(LAPLACE_LOG_MINP+1);\n         val += di;\n         fl += 2*di*LAPLACE_MINP;\n      }\n      if (fm < fl+fs)\n         val = -val;\n      else\n         fl += fs;\n   }\n   celt_assert(fl<32768);\n   celt_assert(fs>0);\n   celt_assert(fl<=fm);\n   celt_assert(fm<IMIN(fl+fs,32768));\n   ec_dec_update(dec, fl, IMIN(fl+fs,32768), 32768);\n   return val;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/laplace.h",
    "content": "/* Copyright (c) 2007 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#include \"entenc.h\"\n#include \"entdec.h\"\n\n/** Encode a value that is assumed to be the realisation of a\n    Laplace-distributed random process\n @param enc Entropy encoder state\n @param value Value to encode\n @param fs Probability of 0, multiplied by 32768\n @param decay Probability of the value +/- 1, multiplied by 16384\n*/\nvoid ec_laplace_encode(ec_enc *enc, int *value, unsigned fs, int decay);\n\n/** Decode a value that is assumed to be the realisation of a\n    Laplace-distributed random process\n @param dec Entropy decoder state\n @param fs Probability of 0, multiplied by 32768\n @param decay Probability of the value +/- 1, multiplied by 16384\n @return Value decoded\n */\nint ec_laplace_decode(ec_dec *dec, unsigned fs, int decay);\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/mathops.c",
    "content": "/* Copyright (c) 2002-2008 Jean-Marc Valin\n   Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\n/**\n   @file mathops.h\n   @brief Various math functions\n*/\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"mathops.h\"\n\n/*Compute floor(sqrt(_val)) with exact arithmetic.\n  This has been tested on all possible 32-bit inputs.*/\nunsigned isqrt32(opus_uint32 _val){\n  unsigned b;\n  unsigned g;\n  int      bshift;\n  /*Uses the second method from\n     http://www.azillionmonkeys.com/qed/sqroot.html\n    The main idea is to search for the largest binary digit b such that\n     (g+b)*(g+b) <= _val, and add it to the solution g.*/\n  g=0;\n  bshift=(EC_ILOG(_val)-1)>>1;\n  b=1U<<bshift;\n  do{\n    opus_uint32 t;\n    t=(((opus_uint32)g<<1)+b)<<bshift;\n    if(t<=_val){\n      g+=b;\n      _val-=t;\n    }\n    b>>=1;\n    bshift--;\n  }\n  while(bshift>=0);\n  return g;\n}\n\n#ifdef FIXED_POINT\n\nopus_val32 frac_div32(opus_val32 a, opus_val32 b)\n{\n   opus_val16 rcp;\n   opus_val32 result, rem;\n   int shift = celt_ilog2(b)-29;\n   a = VSHR32(a,shift);\n   b = VSHR32(b,shift);\n   /* 16-bit reciprocal */\n   rcp = ROUND16(celt_rcp(ROUND16(b,16)),3);\n   result = MULT16_32_Q15(rcp, a);\n   rem = PSHR32(a,2)-MULT32_32_Q31(result, b);\n   result = ADD32(result, SHL32(MULT16_32_Q15(rcp, rem),2));\n   if (result >= 536870912)       /*  2^29 */\n      return 2147483647;          /*  2^31 - 1 */\n   else if (result <= -536870912) /* -2^29 */\n      return -2147483647;         /* -2^31 */\n   else\n      return SHL32(result, 2);\n}\n\n/** Reciprocal sqrt approximation in the range [0.25,1) (Q16 in, Q14 out) */\nopus_val16 celt_rsqrt_norm(opus_val32 x)\n{\n   opus_val16 n;\n   opus_val16 r;\n   opus_val16 r2;\n   opus_val16 y;\n   /* Range of n is [-16384,32767] ([-0.5,1) in Q15). */\n   n = x-32768;\n   /* Get a rough initial guess for the root.\n      The optimal minimax quadratic approximation (using relative error) is\n       r = 1.437799046117536+n*(-0.823394375837328+n*0.4096419668459485).\n      Coefficients here, and the final result r, are Q14.*/\n   r = ADD16(23557, MULT16_16_Q15(n, ADD16(-13490, MULT16_16_Q15(n, 6713))));\n   /* We want y = x*r*r-1 in Q15, but x is 32-bit Q16 and r is Q14.\n      We can compute the result from n and r using Q15 multiplies with some\n       adjustment, carefully done to avoid overflow.\n      Range of y is [-1564,1594]. */\n   r2 = MULT16_16_Q15(r, r);\n   y = SHL16(SUB16(ADD16(MULT16_16_Q15(r2, n), r2), 16384), 1);\n   /* Apply a 2nd-order Householder iteration: r += r*y*(y*0.375-0.5).\n      This yields the Q14 reciprocal square root of the Q16 x, with a maximum\n       relative error of 1.04956E-4, a (relative) RMSE of 2.80979E-5, and a\n       peak absolute error of 2.26591/16384. */\n   return ADD16(r, MULT16_16_Q15(r, MULT16_16_Q15(y,\n              SUB16(MULT16_16_Q15(y, 12288), 16384))));\n}\n\n/** Sqrt approximation (QX input, QX/2 output) */\nopus_val32 celt_sqrt(opus_val32 x)\n{\n   int k;\n   opus_val16 n;\n   opus_val32 rt;\n   static const opus_val16 C[5] = {23175, 11561, -3011, 1699, -664};\n   if (x==0)\n      return 0;\n   else if (x>=1073741824)\n      return 32767;\n   k = (celt_ilog2(x)>>1)-7;\n   x = VSHR32(x, 2*k);\n   n = x-32768;\n   rt = ADD16(C[0], MULT16_16_Q15(n, ADD16(C[1], MULT16_16_Q15(n, ADD16(C[2],\n              MULT16_16_Q15(n, ADD16(C[3], MULT16_16_Q15(n, (C[4])))))))));\n   rt = VSHR32(rt,7-k);\n   return rt;\n}\n\n#define L1 32767\n#define L2 -7651\n#define L3 8277\n#define L4 -626\n\nstatic OPUS_INLINE opus_val16 _celt_cos_pi_2(opus_val16 x)\n{\n   opus_val16 x2;\n\n   x2 = MULT16_16_P15(x,x);\n   return ADD16(1,MIN16(32766,ADD32(SUB16(L1,x2), MULT16_16_P15(x2, ADD32(L2, MULT16_16_P15(x2, ADD32(L3, MULT16_16_P15(L4, x2\n                                                                                ))))))));\n}\n\n#undef L1\n#undef L2\n#undef L3\n#undef L4\n\nopus_val16 celt_cos_norm(opus_val32 x)\n{\n   x = x&0x0001ffff;\n   if (x>SHL32(EXTEND32(1), 16))\n      x = SUB32(SHL32(EXTEND32(1), 17),x);\n   if (x&0x00007fff)\n   {\n      if (x<SHL32(EXTEND32(1), 15))\n      {\n         return _celt_cos_pi_2(EXTRACT16(x));\n      } else {\n         return NEG32(_celt_cos_pi_2(EXTRACT16(65536-x)));\n      }\n   } else {\n      if (x&0x0000ffff)\n         return 0;\n      else if (x&0x0001ffff)\n         return -32767;\n      else\n         return 32767;\n   }\n}\n\n/** Reciprocal approximation (Q15 input, Q16 output) */\nopus_val32 celt_rcp(opus_val32 x)\n{\n   int i;\n   opus_val16 n;\n   opus_val16 r;\n   celt_assert2(x>0, \"celt_rcp() only defined for positive values\");\n   i = celt_ilog2(x);\n   /* n is Q15 with range [0,1). */\n   n = VSHR32(x,i-15)-32768;\n   /* Start with a linear approximation:\n      r = 1.8823529411764706-0.9411764705882353*n.\n      The coefficients and the result are Q14 in the range [15420,30840].*/\n   r = ADD16(30840, MULT16_16_Q15(-15420, n));\n   /* Perform two Newton iterations:\n      r -= r*((r*n)-1.Q15)\n         = r*((r*n)+(r-1.Q15)). */\n   r = SUB16(r, MULT16_16_Q15(r,\n             ADD16(MULT16_16_Q15(r, n), ADD16(r, -32768))));\n   /* We subtract an extra 1 in the second iteration to avoid overflow; it also\n       neatly compensates for truncation error in the rest of the process. */\n   r = SUB16(r, ADD16(1, MULT16_16_Q15(r,\n             ADD16(MULT16_16_Q15(r, n), ADD16(r, -32768)))));\n   /* r is now the Q15 solution to 2/(n+1), with a maximum relative error\n       of 7.05346E-5, a (relative) RMSE of 2.14418E-5, and a peak absolute\n       error of 1.24665/32768. */\n   return VSHR32(EXTEND32(r),i-16);\n}\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/mathops.h",
    "content": "/* Copyright (c) 2002-2008 Jean-Marc Valin\n   Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\n/**\n   @file mathops.h\n   @brief Various math functions\n*/\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef MATHOPS_H\n#define MATHOPS_H\n\n#include \"arch.h\"\n#include \"entcode.h\"\n#include \"os_support.h\"\n\n/* Multiplies two 16-bit fractional values. Bit-exactness of this macro is important */\n#define FRAC_MUL16(a,b) ((16384+((opus_int32)(opus_int16)(a)*(opus_int16)(b)))>>15)\n\nunsigned isqrt32(opus_uint32 _val);\n\n#ifndef OVERRIDE_CELT_MAXABS16\nstatic OPUS_INLINE opus_val32 celt_maxabs16(const opus_val16 *x, int len)\n{\n   int i;\n   opus_val16 maxval = 0;\n   opus_val16 minval = 0;\n   for (i=0;i<len;i++)\n   {\n      maxval = MAX16(maxval, x[i]);\n      minval = MIN16(minval, x[i]);\n   }\n   return MAX32(EXTEND32(maxval),-EXTEND32(minval));\n}\n#endif\n\n#ifndef OVERRIDE_CELT_MAXABS32\n#ifdef FIXED_POINT\nstatic OPUS_INLINE opus_val32 celt_maxabs32(const opus_val32 *x, int len)\n{\n   int i;\n   opus_val32 maxval = 0;\n   opus_val32 minval = 0;\n   for (i=0;i<len;i++)\n   {\n      maxval = MAX32(maxval, x[i]);\n      minval = MIN32(minval, x[i]);\n   }\n   return MAX32(maxval, -minval);\n}\n#else\n#define celt_maxabs32(x,len) celt_maxabs16(x,len)\n#endif\n#endif\n\n\n#ifndef FIXED_POINT\n\n#define PI 3.141592653f\n#define celt_sqrt(x) ((float)sqrt(x))\n#define celt_rsqrt(x) (1.f/celt_sqrt(x))\n#define celt_rsqrt_norm(x) (celt_rsqrt(x))\n#define celt_cos_norm(x) ((float)cos((.5f*PI)*(x)))\n#define celt_rcp(x) (1.f/(x))\n#define celt_div(a,b) ((a)/(b))\n#define frac_div32(a,b) ((float)(a)/(b))\n\n#ifdef FLOAT_APPROX\n\n/* Note: This assumes radix-2 floating point with the exponent at bits 23..30 and an offset of 127\n         denorm, +/- inf and NaN are *not* handled */\n\n/** Base-2 log approximation (log2(x)). */\nstatic OPUS_INLINE float celt_log2(float x)\n{\n   int integer;\n   float frac;\n   union {\n      float f;\n      opus_uint32 i;\n   } in;\n   in.f = x;\n   integer = (in.i>>23)-127;\n   in.i -= integer<<23;\n   frac = in.f - 1.5f;\n   frac = -0.41445418f + frac*(0.95909232f\n          + frac*(-0.33951290f + frac*0.16541097f));\n   return 1+integer+frac;\n}\n\n/** Base-2 exponential approximation (2^x). */\nstatic OPUS_INLINE float celt_exp2(float x)\n{\n   int integer;\n   float frac;\n   union {\n      float f;\n      opus_uint32 i;\n   } res;\n   integer = floor(x);\n   if (integer < -50)\n      return 0;\n   frac = x-integer;\n   /* K0 = 1, K1 = log(2), K2 = 3-4*log(2), K3 = 3*log(2) - 2 */\n   res.f = 0.99992522f + frac * (0.69583354f\n           + frac * (0.22606716f + 0.078024523f*frac));\n   res.i = (res.i + (integer<<23)) & 0x7fffffff;\n   return res.f;\n}\n\n#else\n#define celt_log2(x) ((float)(1.442695040888963387*log(x)))\n#define celt_exp2(x) ((float)exp(0.6931471805599453094*(x)))\n#endif\n\n#endif\n\n#ifdef FIXED_POINT\n\n#include \"os_support.h\"\n\n#ifndef OVERRIDE_CELT_ILOG2\n/** Integer log in base2. Undefined for zero and negative numbers */\nstatic OPUS_INLINE opus_int16 celt_ilog2(opus_int32 x)\n{\n   celt_assert2(x>0, \"celt_ilog2() only defined for strictly positive numbers\");\n   return EC_ILOG(x)-1;\n}\n#endif\n\n\n/** Integer log in base2. Defined for zero, but not for negative numbers */\nstatic OPUS_INLINE opus_int16 celt_zlog2(opus_val32 x)\n{\n   return x <= 0 ? 0 : celt_ilog2(x);\n}\n\nopus_val16 celt_rsqrt_norm(opus_val32 x);\n\nopus_val32 celt_sqrt(opus_val32 x);\n\nopus_val16 celt_cos_norm(opus_val32 x);\n\n/** Base-2 logarithm approximation (log2(x)). (Q14 input, Q10 output) */\nstatic OPUS_INLINE opus_val16 celt_log2(opus_val32 x)\n{\n   int i;\n   opus_val16 n, frac;\n   /* -0.41509302963303146, 0.9609890551383969, -0.31836011537636605,\n       0.15530808010959576, -0.08556153059057618 */\n   static const opus_val16 C[5] = {-6801+(1<<(13-DB_SHIFT)), 15746, -5217, 2545, -1401};\n   if (x==0)\n      return -32767;\n   i = celt_ilog2(x);\n   n = VSHR32(x,i-15)-32768-16384;\n   frac = ADD16(C[0], MULT16_16_Q15(n, ADD16(C[1], MULT16_16_Q15(n, ADD16(C[2], MULT16_16_Q15(n, ADD16(C[3], MULT16_16_Q15(n, C[4]))))))));\n   return SHL16(i-13,DB_SHIFT)+SHR16(frac,14-DB_SHIFT);\n}\n\n/*\n K0 = 1\n K1 = log(2)\n K2 = 3-4*log(2)\n K3 = 3*log(2) - 2\n*/\n#define D0 16383\n#define D1 22804\n#define D2 14819\n#define D3 10204\n\nstatic OPUS_INLINE opus_val32 celt_exp2_frac(opus_val16 x)\n{\n   opus_val16 frac;\n   frac = SHL16(x, 4);\n   return ADD16(D0, MULT16_16_Q15(frac, ADD16(D1, MULT16_16_Q15(frac, ADD16(D2 , MULT16_16_Q15(D3,frac))))));\n}\n/** Base-2 exponential approximation (2^x). (Q10 input, Q16 output) */\nstatic OPUS_INLINE opus_val32 celt_exp2(opus_val16 x)\n{\n   int integer;\n   opus_val16 frac;\n   integer = SHR16(x,10);\n   if (integer>14)\n      return 0x7f000000;\n   else if (integer < -15)\n      return 0;\n   frac = celt_exp2_frac(x-SHL16(integer,10));\n   return VSHR32(EXTEND32(frac), -integer-2);\n}\n\nopus_val32 celt_rcp(opus_val32 x);\n\n#define celt_div(a,b) MULT32_32_Q31((opus_val32)(a),celt_rcp(b))\n\nopus_val32 frac_div32(opus_val32 a, opus_val32 b);\n\n#define M1 32767\n#define M2 -21\n#define M3 -11943\n#define M4 4936\n\n/* Atan approximation using a 4th order polynomial. Input is in Q15 format\n   and normalized by pi/4. Output is in Q15 format */\nstatic OPUS_INLINE opus_val16 celt_atan01(opus_val16 x)\n{\n   return MULT16_16_P15(x, ADD32(M1, MULT16_16_P15(x, ADD32(M2, MULT16_16_P15(x, ADD32(M3, MULT16_16_P15(M4, x)))))));\n}\n\n#undef M1\n#undef M2\n#undef M3\n#undef M4\n\n/* atan2() approximation valid for positive input values */\nstatic OPUS_INLINE opus_val16 celt_atan2p(opus_val16 y, opus_val16 x)\n{\n   if (y < x)\n   {\n      opus_val32 arg;\n      arg = celt_div(SHL32(EXTEND32(y),15),x);\n      if (arg >= 32767)\n         arg = 32767;\n      return SHR16(celt_atan01(EXTRACT16(arg)),1);\n   } else {\n      opus_val32 arg;\n      arg = celt_div(SHL32(EXTEND32(x),15),y);\n      if (arg >= 32767)\n         arg = 32767;\n      return 25736-SHR16(celt_atan01(EXTRACT16(arg)),1);\n   }\n}\n\n#endif /* FIXED_POINT */\n#endif /* MATHOPS_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/mdct.c",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2008 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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/* This is a simple MDCT implementation that uses a N/4 complex FFT\n   to do most of the work. It should be relatively straightforward to\n   plug in pretty much and FFT here.\n\n   This replaces the Vorbis FFT (and uses the exact same API), which\n   was a bit too messy and that was ending up duplicating code\n   (might as well use the same FFT everywhere).\n\n   The algorithm is similar to (and inspired from) Fabrice Bellard's\n   MDCT implementation in FFMPEG, but has differences in signs, ordering\n   and scaling in many places.\n*/\n\n#ifndef SKIP_CONFIG_H\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n#endif\n\n#include \"mdct.h\"\n#include \"kiss_fft.h\"\n#include \"_kiss_fft_guts.h\"\n#include <math.h>\n#include \"os_support.h\"\n#include \"mathops.h\"\n#include \"stack_alloc.h\"\n\n#ifdef CUSTOM_MODES\n\nint clt_mdct_init(mdct_lookup *l,int N, int maxshift)\n{\n   int i;\n   int N4;\n   kiss_twiddle_scalar *trig;\n#if defined(FIXED_POINT)\n   int N2=N>>1;\n#endif\n   l->n = N;\n   N4 = N>>2;\n   l->maxshift = maxshift;\n   for (i=0;i<=maxshift;i++)\n   {\n      if (i==0)\n         l->kfft[i] = opus_fft_alloc(N>>2>>i, 0, 0);\n      else\n         l->kfft[i] = opus_fft_alloc_twiddles(N>>2>>i, 0, 0, l->kfft[0]);\n#ifndef ENABLE_TI_DSPLIB55\n      if (l->kfft[i]==NULL)\n         return 0;\n#endif\n   }\n   l->trig = trig = (kiss_twiddle_scalar*)opus_alloc((N4+1)*sizeof(kiss_twiddle_scalar));\n   if (l->trig==NULL)\n     return 0;\n   /* We have enough points that sine isn't necessary */\n#if defined(FIXED_POINT)\n   for (i=0;i<=N4;i++)\n      trig[i] = TRIG_UPSCALE*celt_cos_norm(DIV32(ADD32(SHL32(EXTEND32(i),17),N2),N));\n#else\n   for (i=0;i<=N4;i++)\n      trig[i] = (kiss_twiddle_scalar)cos(2*PI*i/N);\n#endif\n   return 1;\n}\n\nvoid clt_mdct_clear(mdct_lookup *l)\n{\n   int i;\n   for (i=0;i<=l->maxshift;i++)\n      opus_fft_free(l->kfft[i]);\n   opus_free((kiss_twiddle_scalar*)l->trig);\n}\n\n#endif /* CUSTOM_MODES */\n\n/* Forward MDCT trashes the input array */\nvoid clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out,\n      const opus_val16 *window, int overlap, int shift, int stride)\n{\n   int i;\n   int N, N2, N4;\n   kiss_twiddle_scalar sine;\n   VARDECL(kiss_fft_scalar, f);\n   VARDECL(kiss_fft_scalar, f2);\n   SAVE_STACK;\n   N = l->n;\n   N >>= shift;\n   N2 = N>>1;\n   N4 = N>>2;\n   ALLOC(f, N2, kiss_fft_scalar);\n   ALLOC(f2, N2, kiss_fft_scalar);\n   /* sin(x) ~= x here */\n#ifdef FIXED_POINT\n   sine = TRIG_UPSCALE*(QCONST16(0.7853981f, 15)+N2)/N;\n#else\n   sine = (kiss_twiddle_scalar)2*PI*(.125f)/N;\n#endif\n\n   /* Consider the input to be composed of four blocks: [a, b, c, d] */\n   /* Window, shuffle, fold */\n   {\n      /* Temp pointers to make it really clear to the compiler what we're doing */\n      const kiss_fft_scalar * OPUS_RESTRICT xp1 = in+(overlap>>1);\n      const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+N2-1+(overlap>>1);\n      kiss_fft_scalar * OPUS_RESTRICT yp = f;\n      const opus_val16 * OPUS_RESTRICT wp1 = window+(overlap>>1);\n      const opus_val16 * OPUS_RESTRICT wp2 = window+(overlap>>1)-1;\n      for(i=0;i<((overlap+3)>>2);i++)\n      {\n         /* Real part arranged as -d-cR, Imag part arranged as -b+aR*/\n         *yp++ = MULT16_32_Q15(*wp2, xp1[N2]) + MULT16_32_Q15(*wp1,*xp2);\n         *yp++ = MULT16_32_Q15(*wp1, *xp1)    - MULT16_32_Q15(*wp2, xp2[-N2]);\n         xp1+=2;\n         xp2-=2;\n         wp1+=2;\n         wp2-=2;\n      }\n      wp1 = window;\n      wp2 = window+overlap-1;\n      for(;i<N4-((overlap+3)>>2);i++)\n      {\n         /* Real part arranged as a-bR, Imag part arranged as -c-dR */\n         *yp++ = *xp2;\n         *yp++ = *xp1;\n         xp1+=2;\n         xp2-=2;\n      }\n      for(;i<N4;i++)\n      {\n         /* Real part arranged as a-bR, Imag part arranged as -c-dR */\n         *yp++ =  -MULT16_32_Q15(*wp1, xp1[-N2]) + MULT16_32_Q15(*wp2, *xp2);\n         *yp++ = MULT16_32_Q15(*wp2, *xp1)     + MULT16_32_Q15(*wp1, xp2[N2]);\n         xp1+=2;\n         xp2-=2;\n         wp1+=2;\n         wp2-=2;\n      }\n   }\n   /* Pre-rotation */\n   {\n      kiss_fft_scalar * OPUS_RESTRICT yp = f;\n      const kiss_twiddle_scalar *t = &l->trig[0];\n      for(i=0;i<N4;i++)\n      {\n         kiss_fft_scalar re, im, yr, yi;\n         re = yp[0];\n         im = yp[1];\n         yr = -S_MUL(re,t[i<<shift])  -  S_MUL(im,t[(N4-i)<<shift]);\n         yi = -S_MUL(im,t[i<<shift])  +  S_MUL(re,t[(N4-i)<<shift]);\n         /* works because the cos is nearly one */\n         *yp++ = yr + S_MUL(yi,sine);\n         *yp++ = yi - S_MUL(yr,sine);\n      }\n   }\n\n   /* N/4 complex FFT, down-scales by 4/N */\n   opus_fft(l->kfft[shift], (kiss_fft_cpx *)f, (kiss_fft_cpx *)f2);\n\n   /* Post-rotate */\n   {\n      /* Temp pointers to make it really clear to the compiler what we're doing */\n      const kiss_fft_scalar * OPUS_RESTRICT fp = f2;\n      kiss_fft_scalar * OPUS_RESTRICT yp1 = out;\n      kiss_fft_scalar * OPUS_RESTRICT yp2 = out+stride*(N2-1);\n      const kiss_twiddle_scalar *t = &l->trig[0];\n      /* Temp pointers to make it really clear to the compiler what we're doing */\n      for(i=0;i<N4;i++)\n      {\n         kiss_fft_scalar yr, yi;\n         yr = S_MUL(fp[1],t[(N4-i)<<shift]) + S_MUL(fp[0],t[i<<shift]);\n         yi = S_MUL(fp[0],t[(N4-i)<<shift]) - S_MUL(fp[1],t[i<<shift]);\n         /* works because the cos is nearly one */\n         *yp1 = yr - S_MUL(yi,sine);\n         *yp2 = yi + S_MUL(yr,sine);;\n         fp += 2;\n         yp1 += 2*stride;\n         yp2 -= 2*stride;\n      }\n   }\n   RESTORE_STACK;\n}\n\nvoid clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out,\n      const opus_val16 * OPUS_RESTRICT window, int overlap, int shift, int stride)\n{\n   int i;\n   int N, N2, N4;\n   kiss_twiddle_scalar sine;\n   VARDECL(kiss_fft_scalar, f2);\n   SAVE_STACK;\n   N = l->n;\n   N >>= shift;\n   N2 = N>>1;\n   N4 = N>>2;\n   ALLOC(f2, N2, kiss_fft_scalar);\n   /* sin(x) ~= x here */\n#ifdef FIXED_POINT\n   sine = TRIG_UPSCALE*(QCONST16(0.7853981f, 15)+N2)/N;\n#else\n   sine = (kiss_twiddle_scalar)2*PI*(.125f)/N;\n#endif\n\n   /* Pre-rotate */\n   {\n      /* Temp pointers to make it really clear to the compiler what we're doing */\n      const kiss_fft_scalar * OPUS_RESTRICT xp1 = in;\n      const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+stride*(N2-1);\n      kiss_fft_scalar * OPUS_RESTRICT yp = f2;\n      const kiss_twiddle_scalar *t = &l->trig[0];\n      for(i=0;i<N4;i++)\n      {\n         kiss_fft_scalar yr, yi;\n         yr = -S_MUL(*xp2, t[i<<shift]) + S_MUL(*xp1,t[(N4-i)<<shift]);\n         yi =  -S_MUL(*xp2, t[(N4-i)<<shift]) - S_MUL(*xp1,t[i<<shift]);\n         /* works because the cos is nearly one */\n         *yp++ = yr - S_MUL(yi,sine);\n         *yp++ = yi + S_MUL(yr,sine);\n         xp1+=2*stride;\n         xp2-=2*stride;\n      }\n   }\n\n   /* Inverse N/4 complex FFT. This one should *not* downscale even in fixed-point */\n   opus_ifft(l->kfft[shift], (kiss_fft_cpx *)f2, (kiss_fft_cpx *)(out+(overlap>>1)));\n\n   /* Post-rotate and de-shuffle from both ends of the buffer at once to make\n      it in-place. */\n   {\n      kiss_fft_scalar * OPUS_RESTRICT yp0 = out+(overlap>>1);\n      kiss_fft_scalar * OPUS_RESTRICT yp1 = out+(overlap>>1)+N2-2;\n      const kiss_twiddle_scalar *t = &l->trig[0];\n      /* Loop to (N4+1)>>1 to handle odd N4. When N4 is odd, the\n         middle pair will be computed twice. */\n      for(i=0;i<(N4+1)>>1;i++)\n      {\n         kiss_fft_scalar re, im, yr, yi;\n         kiss_twiddle_scalar t0, t1;\n         re = yp0[0];\n         im = yp0[1];\n         t0 = t[i<<shift];\n         t1 = t[(N4-i)<<shift];\n         /* We'd scale up by 2 here, but instead it's done when mixing the windows */\n         yr = S_MUL(re,t0) - S_MUL(im,t1);\n         yi = S_MUL(im,t0) + S_MUL(re,t1);\n         re = yp1[0];\n         im = yp1[1];\n         /* works because the cos is nearly one */\n         yp0[0] = -(yr - S_MUL(yi,sine));\n         yp1[1] = yi + S_MUL(yr,sine);\n\n         t0 = t[(N4-i-1)<<shift];\n         t1 = t[(i+1)<<shift];\n         /* We'd scale up by 2 here, but instead it's done when mixing the windows */\n         yr = S_MUL(re,t0) - S_MUL(im,t1);\n         yi = S_MUL(im,t0) + S_MUL(re,t1);\n         /* works because the cos is nearly one */\n         yp1[0] = -(yr - S_MUL(yi,sine));\n         yp0[1] = yi + S_MUL(yr,sine);\n         yp0 += 2;\n         yp1 -= 2;\n      }\n   }\n\n   /* Mirror on both sides for TDAC */\n   {\n      kiss_fft_scalar * OPUS_RESTRICT xp1 = out+overlap-1;\n      kiss_fft_scalar * OPUS_RESTRICT yp1 = out;\n      const opus_val16 * OPUS_RESTRICT wp1 = window;\n      const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1;\n\n      for(i = 0; i < overlap/2; i++)\n      {\n         kiss_fft_scalar x1, x2;\n         x1 = *xp1;\n         x2 = *yp1;\n         *yp1++ = MULT16_32_Q15(*wp2, x2) - MULT16_32_Q15(*wp1, x1);\n         *xp1-- = MULT16_32_Q15(*wp1, x2) + MULT16_32_Q15(*wp2, x1);\n         wp1++;\n         wp2--;\n      }\n   }\n   RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/mdct.h",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2008 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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/* This is a simple MDCT implementation that uses a N/4 complex FFT\n   to do most of the work. It should be relatively straightforward to\n   plug in pretty much and FFT here.\n\n   This replaces the Vorbis FFT (and uses the exact same API), which\n   was a bit too messy and that was ending up duplicating code\n   (might as well use the same FFT everywhere).\n\n   The algorithm is similar to (and inspired from) Fabrice Bellard's\n   MDCT implementation in FFMPEG, but has differences in signs, ordering\n   and scaling in many places.\n*/\n\n#ifndef MDCT_H\n#define MDCT_H\n\n#include \"opus_defines.h\"\n#include \"kiss_fft.h\"\n#include \"arch.h\"\n\ntypedef struct {\n   int n;\n   int maxshift;\n   const kiss_fft_state *kfft[4];\n   const kiss_twiddle_scalar * OPUS_RESTRICT trig;\n} mdct_lookup;\n\nint clt_mdct_init(mdct_lookup *l,int N, int maxshift);\nvoid clt_mdct_clear(mdct_lookup *l);\n\n/** Compute a forward MDCT and scale by 4/N, trashes the input array */\nvoid clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in,\n      kiss_fft_scalar * OPUS_RESTRICT out,\n      const opus_val16 *window, int overlap, int shift, int stride);\n\n/** Compute a backward MDCT (no scaling) and performs weighted overlap-add\n    (scales implicitly by 1/2) */\nvoid clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in,\n      kiss_fft_scalar * OPUS_RESTRICT out,\n      const opus_val16 * OPUS_RESTRICT window, int overlap, int shift, int stride);\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/mfrngcod.h",
    "content": "/* Copyright (c) 2001-2008 Timothy B. Terriberry\n   Copyright (c) 2008-2009 Xiph.Org Foundation */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#if !defined(_mfrngcode_H)\n# define _mfrngcode_H (1)\n# include \"entcode.h\"\n\n/*Constants used by the entropy encoder/decoder.*/\n\n/*The number of bits to output at a time.*/\n# define EC_SYM_BITS   (8)\n/*The total number of bits in each of the state registers.*/\n# define EC_CODE_BITS  (32)\n/*The maximum symbol value.*/\n# define EC_SYM_MAX    ((1U<<EC_SYM_BITS)-1)\n/*Bits to shift by to move a symbol into the high-order position.*/\n# define EC_CODE_SHIFT (EC_CODE_BITS-EC_SYM_BITS-1)\n/*Carry bit of the high-order range symbol.*/\n# define EC_CODE_TOP   (((opus_uint32)1U)<<(EC_CODE_BITS-1))\n/*Low-order bit of the high-order range symbol.*/\n# define EC_CODE_BOT   (EC_CODE_TOP>>EC_SYM_BITS)\n/*The number of bits available for the last, partial symbol in the code field.*/\n# define EC_CODE_EXTRA ((EC_CODE_BITS-2)%EC_SYM_BITS+1)\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/modes.c",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Copyright (c) 2008 Gregory Maxwell\n   Written by Jean-Marc Valin and Gregory Maxwell */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"celt.h\"\n#include \"modes.h\"\n#include \"rate.h\"\n#include \"os_support.h\"\n#include \"stack_alloc.h\"\n#include \"quant_bands.h\"\n\nstatic const opus_int16 eband5ms[] = {\n/*0  200 400 600 800  1k 1.2 1.4 1.6  2k 2.4 2.8 3.2  4k 4.8 5.6 6.8  8k 9.6 12k 15.6 */\n  0,  1,  2,  3,  4,  5,  6,  7,  8, 10, 12, 14, 16, 20, 24, 28, 34, 40, 48, 60, 78, 100\n};\n\n/* Alternate tuning (partially derived from Vorbis) */\n#define BITALLOC_SIZE 11\n/* Bit allocation table in units of 1/32 bit/sample (0.1875 dB SNR) */\nstatic const unsigned char band_allocation[] = {\n/*0  200 400 600 800  1k 1.2 1.4 1.6  2k 2.4 2.8 3.2  4k 4.8 5.6 6.8  8k 9.6 12k 15.6 */\n  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n 90, 80, 75, 69, 63, 56, 49, 40, 34, 29, 20, 18, 10,  0,  0,  0,  0,  0,  0,  0,  0,\n110,100, 90, 84, 78, 71, 65, 58, 51, 45, 39, 32, 26, 20, 12,  0,  0,  0,  0,  0,  0,\n118,110,103, 93, 86, 80, 75, 70, 65, 59, 53, 47, 40, 31, 23, 15,  4,  0,  0,  0,  0,\n126,119,112,104, 95, 89, 83, 78, 72, 66, 60, 54, 47, 39, 32, 25, 17, 12,  1,  0,  0,\n134,127,120,114,103, 97, 91, 85, 78, 72, 66, 60, 54, 47, 41, 35, 29, 23, 16, 10,  1,\n144,137,130,124,113,107,101, 95, 88, 82, 76, 70, 64, 57, 51, 45, 39, 33, 26, 15,  1,\n152,145,138,132,123,117,111,105, 98, 92, 86, 80, 74, 67, 61, 55, 49, 43, 36, 20,  1,\n162,155,148,142,133,127,121,115,108,102, 96, 90, 84, 77, 71, 65, 59, 53, 46, 30,  1,\n172,165,158,152,143,137,131,125,118,112,106,100, 94, 87, 81, 75, 69, 63, 56, 45, 20,\n200,200,200,200,200,200,200,200,198,193,188,183,178,173,168,163,158,153,148,129,104,\n};\n\n#ifndef CUSTOM_MODES_ONLY\n #ifdef FIXED_POINT\n  #include \"static_modes_fixed.h\"\n #else\n  #include \"static_modes_float.h\"\n #endif\n#endif /* CUSTOM_MODES_ONLY */\n\n#ifndef M_PI\n#define M_PI 3.141592653\n#endif\n\n#ifdef CUSTOM_MODES\n\n/* Defining 25 critical bands for the full 0-20 kHz audio bandwidth\n   Taken from http://ccrma.stanford.edu/~jos/bbt/Bark_Frequency_Scale.html */\n#define BARK_BANDS 25\nstatic const opus_int16 bark_freq[BARK_BANDS+1] = {\n      0,   100,   200,   300,   400,\n    510,   630,   770,   920,  1080,\n   1270,  1480,  1720,  2000,  2320,\n   2700,  3150,  3700,  4400,  5300,\n   6400,  7700,  9500, 12000, 15500,\n  20000};\n\nstatic opus_int16 *compute_ebands(opus_int32 Fs, int frame_size, int res, int *nbEBands)\n{\n   opus_int16 *eBands;\n   int i, j, lin, low, high, nBark, offset=0;\n\n   /* All modes that have 2.5 ms short blocks use the same definition */\n   if (Fs == 400*(opus_int32)frame_size)\n   {\n      *nbEBands = sizeof(eband5ms)/sizeof(eband5ms[0])-1;\n      eBands = opus_alloc(sizeof(opus_int16)*(*nbEBands+1));\n      for (i=0;i<*nbEBands+1;i++)\n         eBands[i] = eband5ms[i];\n      return eBands;\n   }\n   /* Find the number of critical bands supported by our sampling rate */\n   for (nBark=1;nBark<BARK_BANDS;nBark++)\n    if (bark_freq[nBark+1]*2 >= Fs)\n       break;\n\n   /* Find where the linear part ends (i.e. where the spacing is more than min_width */\n   for (lin=0;lin<nBark;lin++)\n      if (bark_freq[lin+1]-bark_freq[lin] >= res)\n         break;\n\n   low = (bark_freq[lin]+res/2)/res;\n   high = nBark-lin;\n   *nbEBands = low+high;\n   eBands = opus_alloc(sizeof(opus_int16)*(*nbEBands+2));\n\n   if (eBands==NULL)\n      return NULL;\n\n   /* Linear spacing (min_width) */\n   for (i=0;i<low;i++)\n      eBands[i] = i;\n   if (low>0)\n      offset = eBands[low-1]*res - bark_freq[lin-1];\n   /* Spacing follows critical bands */\n   for (i=0;i<high;i++)\n   {\n      int target = bark_freq[lin+i];\n      /* Round to an even value */\n      eBands[i+low] = (target+offset/2+res)/(2*res)*2;\n      offset = eBands[i+low]*res - target;\n   }\n   /* Enforce the minimum spacing at the boundary */\n   for (i=0;i<*nbEBands;i++)\n      if (eBands[i] < i)\n         eBands[i] = i;\n   /* Round to an even value */\n   eBands[*nbEBands] = (bark_freq[nBark]+res)/(2*res)*2;\n   if (eBands[*nbEBands] > frame_size)\n      eBands[*nbEBands] = frame_size;\n   for (i=1;i<*nbEBands-1;i++)\n   {\n      if (eBands[i+1]-eBands[i] < eBands[i]-eBands[i-1])\n      {\n         eBands[i] -= (2*eBands[i]-eBands[i-1]-eBands[i+1])/2;\n      }\n   }\n   /* Remove any empty bands. */\n   for (i=j=0;i<*nbEBands;i++)\n      if(eBands[i+1]>eBands[j])\n         eBands[++j]=eBands[i+1];\n   *nbEBands=j;\n\n   for (i=1;i<*nbEBands;i++)\n   {\n      /* Every band must be smaller than the last band. */\n      celt_assert(eBands[i]-eBands[i-1]<=eBands[*nbEBands]-eBands[*nbEBands-1]);\n      /* Each band must be no larger than twice the size of the previous one. */\n      celt_assert(eBands[i+1]-eBands[i]<=2*(eBands[i]-eBands[i-1]));\n   }\n\n   return eBands;\n}\n\nstatic void compute_allocation_table(CELTMode *mode)\n{\n   int i, j;\n   unsigned char *allocVectors;\n   int maxBands = sizeof(eband5ms)/sizeof(eband5ms[0])-1;\n\n   mode->nbAllocVectors = BITALLOC_SIZE;\n   allocVectors = opus_alloc(sizeof(unsigned char)*(BITALLOC_SIZE*mode->nbEBands));\n   if (allocVectors==NULL)\n      return;\n\n   /* Check for standard mode */\n   if (mode->Fs == 400*(opus_int32)mode->shortMdctSize)\n   {\n      for (i=0;i<BITALLOC_SIZE*mode->nbEBands;i++)\n         allocVectors[i] = band_allocation[i];\n      mode->allocVectors = allocVectors;\n      return;\n   }\n   /* If not the standard mode, interpolate */\n   /* Compute per-codec-band allocation from per-critical-band matrix */\n   for (i=0;i<BITALLOC_SIZE;i++)\n   {\n      for (j=0;j<mode->nbEBands;j++)\n      {\n         int k;\n         for (k=0;k<maxBands;k++)\n         {\n            if (400*(opus_int32)eband5ms[k] > mode->eBands[j]*(opus_int32)mode->Fs/mode->shortMdctSize)\n               break;\n         }\n         if (k>maxBands-1)\n            allocVectors[i*mode->nbEBands+j] = band_allocation[i*maxBands + maxBands-1];\n         else {\n            opus_int32 a0, a1;\n            a1 = mode->eBands[j]*(opus_int32)mode->Fs/mode->shortMdctSize - 400*(opus_int32)eband5ms[k-1];\n            a0 = 400*(opus_int32)eband5ms[k] - mode->eBands[j]*(opus_int32)mode->Fs/mode->shortMdctSize;\n            allocVectors[i*mode->nbEBands+j] = (a0*band_allocation[i*maxBands+k-1]\n                                             + a1*band_allocation[i*maxBands+k])/(a0+a1);\n         }\n      }\n   }\n\n   /*printf (\"\\n\");\n   for (i=0;i<BITALLOC_SIZE;i++)\n   {\n      for (j=0;j<mode->nbEBands;j++)\n         printf (\"%d \", allocVectors[i*mode->nbEBands+j]);\n      printf (\"\\n\");\n   }\n   exit(0);*/\n\n   mode->allocVectors = allocVectors;\n}\n\n#endif /* CUSTOM_MODES */\n\nCELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error)\n{\n   int i;\n#ifdef CUSTOM_MODES\n   CELTMode *mode=NULL;\n   int res;\n   opus_val16 *window;\n   opus_int16 *logN;\n   int LM;\n   ALLOC_STACK;\n#if !defined(VAR_ARRAYS) && !defined(USE_ALLOCA)\n   if (global_stack==NULL)\n      goto failure;\n#endif\n#endif\n\n#ifndef CUSTOM_MODES_ONLY\n   for (i=0;i<TOTAL_MODES;i++)\n   {\n      int j;\n      for (j=0;j<4;j++)\n      {\n         if (Fs == static_mode_list[i]->Fs &&\n               (frame_size<<j) == static_mode_list[i]->shortMdctSize*static_mode_list[i]->nbShortMdcts)\n         {\n            if (error)\n               *error = OPUS_OK;\n            return (CELTMode*)static_mode_list[i];\n         }\n      }\n   }\n#endif /* CUSTOM_MODES_ONLY */\n\n#ifndef CUSTOM_MODES\n   if (error)\n      *error = OPUS_BAD_ARG;\n   return NULL;\n#else\n\n   /* The good thing here is that permutation of the arguments will automatically be invalid */\n\n   if (Fs < 8000 || Fs > 96000)\n   {\n      if (error)\n         *error = OPUS_BAD_ARG;\n      return NULL;\n   }\n   if (frame_size < 40 || frame_size > 1024 || frame_size%2!=0)\n   {\n      if (error)\n         *error = OPUS_BAD_ARG;\n      return NULL;\n   }\n   /* Frames of less than 1ms are not supported. */\n   if ((opus_int32)frame_size*1000 < Fs)\n   {\n      if (error)\n         *error = OPUS_BAD_ARG;\n      return NULL;\n   }\n\n   if ((opus_int32)frame_size*75 >= Fs && (frame_size%16)==0)\n   {\n     LM = 3;\n   } else if ((opus_int32)frame_size*150 >= Fs && (frame_size%8)==0)\n   {\n     LM = 2;\n   } else if ((opus_int32)frame_size*300 >= Fs && (frame_size%4)==0)\n   {\n     LM = 1;\n   } else\n   {\n     LM = 0;\n   }\n\n   /* Shorts longer than 3.3ms are not supported. */\n   if ((opus_int32)(frame_size>>LM)*300 > Fs)\n   {\n      if (error)\n         *error = OPUS_BAD_ARG;\n      return NULL;\n   }\n\n   mode = opus_alloc(sizeof(CELTMode));\n   if (mode==NULL)\n      goto failure;\n   mode->Fs = Fs;\n\n   /* Pre/de-emphasis depends on sampling rate. The \"standard\" pre-emphasis\n      is defined as A(z) = 1 - 0.85*z^-1 at 48 kHz. Other rates should\n      approximate that. */\n   if(Fs < 12000) /* 8 kHz */\n   {\n      mode->preemph[0] =  QCONST16(0.3500061035f, 15);\n      mode->preemph[1] = -QCONST16(0.1799926758f, 15);\n      mode->preemph[2] =  QCONST16(0.2719968125f, SIG_SHIFT); /* exact 1/preemph[3] */\n      mode->preemph[3] =  QCONST16(3.6765136719f, 13);\n   } else if(Fs < 24000) /* 16 kHz */\n   {\n      mode->preemph[0] =  QCONST16(0.6000061035f, 15);\n      mode->preemph[1] = -QCONST16(0.1799926758f, 15);\n      mode->preemph[2] =  QCONST16(0.4424998650f, SIG_SHIFT); /* exact 1/preemph[3] */\n      mode->preemph[3] =  QCONST16(2.2598876953f, 13);\n   } else if(Fs < 40000) /* 32 kHz */\n   {\n      mode->preemph[0] =  QCONST16(0.7799987793f, 15);\n      mode->preemph[1] = -QCONST16(0.1000061035f, 15);\n      mode->preemph[2] =  QCONST16(0.7499771125f, SIG_SHIFT); /* exact 1/preemph[3] */\n      mode->preemph[3] =  QCONST16(1.3333740234f, 13);\n   } else /* 48 kHz */\n   {\n      mode->preemph[0] =  QCONST16(0.8500061035f, 15);\n      mode->preemph[1] =  QCONST16(0.0f, 15);\n      mode->preemph[2] =  QCONST16(1.f, SIG_SHIFT);\n      mode->preemph[3] =  QCONST16(1.f, 13);\n   }\n\n   mode->maxLM = LM;\n   mode->nbShortMdcts = 1<<LM;\n   mode->shortMdctSize = frame_size/mode->nbShortMdcts;\n   res = (mode->Fs+mode->shortMdctSize)/(2*mode->shortMdctSize);\n\n   mode->eBands = compute_ebands(Fs, mode->shortMdctSize, res, &mode->nbEBands);\n   if (mode->eBands==NULL)\n      goto failure;\n#if !defined(SMALL_FOOTPRINT)\n   /* Make sure we don't allocate a band larger than our PVQ table.\n      208 should be enough, but let's be paranoid. */\n   if ((mode->eBands[mode->nbEBands] - mode->eBands[mode->nbEBands-1])<<LM >\n    208) {\n       goto failure;\n   }\n#endif\n\n   mode->effEBands = mode->nbEBands;\n   while (mode->eBands[mode->effEBands] > mode->shortMdctSize)\n      mode->effEBands--;\n\n   /* Overlap must be divisible by 4 */\n   mode->overlap = ((mode->shortMdctSize>>2)<<2);\n\n   compute_allocation_table(mode);\n   if (mode->allocVectors==NULL)\n      goto failure;\n\n   window = (opus_val16*)opus_alloc(mode->overlap*sizeof(opus_val16));\n   if (window==NULL)\n      goto failure;\n\n#ifndef FIXED_POINT\n   for (i=0;i<mode->overlap;i++)\n      window[i] = Q15ONE*sin(.5*M_PI* sin(.5*M_PI*(i+.5)/mode->overlap) * sin(.5*M_PI*(i+.5)/mode->overlap));\n#else\n   for (i=0;i<mode->overlap;i++)\n      window[i] = MIN32(32767,floor(.5+32768.*sin(.5*M_PI* sin(.5*M_PI*(i+.5)/mode->overlap) * sin(.5*M_PI*(i+.5)/mode->overlap))));\n#endif\n   mode->window = window;\n\n   logN = (opus_int16*)opus_alloc(mode->nbEBands*sizeof(opus_int16));\n   if (logN==NULL)\n      goto failure;\n\n   for (i=0;i<mode->nbEBands;i++)\n      logN[i] = log2_frac(mode->eBands[i+1]-mode->eBands[i], BITRES);\n   mode->logN = logN;\n\n   compute_pulse_cache(mode, mode->maxLM);\n\n   if (clt_mdct_init(&mode->mdct, 2*mode->shortMdctSize*mode->nbShortMdcts,\n           mode->maxLM) == 0)\n      goto failure;\n\n   if (error)\n      *error = OPUS_OK;\n\n   return mode;\nfailure:\n   if (error)\n      *error = OPUS_ALLOC_FAIL;\n   if (mode!=NULL)\n      opus_custom_mode_destroy(mode);\n   return NULL;\n#endif /* !CUSTOM_MODES */\n}\n\n#ifdef CUSTOM_MODES\nvoid opus_custom_mode_destroy(CELTMode *mode)\n{\n   if (mode == NULL)\n      return;\n#ifndef CUSTOM_MODES_ONLY\n   {\n     int i;\n     for (i=0;i<TOTAL_MODES;i++)\n     {\n        if (mode == static_mode_list[i])\n        {\n           return;\n        }\n     }\n   }\n#endif /* CUSTOM_MODES_ONLY */\n   opus_free((opus_int16*)mode->eBands);\n   opus_free((opus_int16*)mode->allocVectors);\n\n   opus_free((opus_val16*)mode->window);\n   opus_free((opus_int16*)mode->logN);\n\n   opus_free((opus_int16*)mode->cache.index);\n   opus_free((unsigned char*)mode->cache.bits);\n   opus_free((unsigned char*)mode->cache.caps);\n   clt_mdct_clear(&mode->mdct);\n\n   opus_free((CELTMode *)mode);\n}\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/modes.h",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Copyright (c) 2008 Gregory Maxwell\n   Written by Jean-Marc Valin and Gregory Maxwell */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef MODES_H\n#define MODES_H\n\n#include \"opus_types.h\"\n#include \"celt.h\"\n#include \"arch.h\"\n#include \"mdct.h\"\n#include \"entenc.h\"\n#include \"entdec.h\"\n\n#define MAX_PERIOD 1024\n\n#ifndef OVERLAP\n#define OVERLAP(mode) ((mode)->overlap)\n#endif\n\n#ifndef FRAMESIZE\n#define FRAMESIZE(mode) ((mode)->mdctSize)\n#endif\n\ntypedef struct {\n   int size;\n   const opus_int16 *index;\n   const unsigned char *bits;\n   const unsigned char *caps;\n} PulseCache;\n\n/** Mode definition (opaque)\n @brief Mode definition\n */\nstruct OpusCustomMode {\n   opus_int32 Fs;\n   int          overlap;\n\n   int          nbEBands;\n   int          effEBands;\n   opus_val16    preemph[4];\n   const opus_int16   *eBands;   /**< Definition for each \"pseudo-critical band\" */\n\n   int         maxLM;\n   int         nbShortMdcts;\n   int         shortMdctSize;\n\n   int          nbAllocVectors; /**< Number of lines in the matrix below */\n   const unsigned char   *allocVectors;   /**< Number of bits in each band for several rates */\n   const opus_int16 *logN;\n\n   const opus_val16 *window;\n   mdct_lookup mdct;\n   PulseCache cache;\n};\n\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/os_support.h",
    "content": "/* Copyright (C) 2007 Jean-Marc Valin\n\n   File: os_support.h\n   This is the (tiny) OS abstraction layer. Aside from math.h, this is the\n   only place where system headers are allowed.\n\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   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   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n   DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,\n   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n   ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n   POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#ifndef OS_SUPPORT_H\n#define OS_SUPPORT_H\n\n#ifdef CUSTOM_SUPPORT\n#  include \"custom_support.h\"\n#endif\n\n#include \"opus_types.h\"\n#include \"opus_defines.h\"\n\n#include <string.h>\n#include <stdio.h>\n#include <stdlib.h>\n\n/** Opus wrapper for malloc(). To do your own dynamic allocation, all you need to do is replace this function and opus_free */\n#ifndef OVERRIDE_OPUS_ALLOC\nstatic OPUS_INLINE void *opus_alloc (size_t size)\n{\n   return malloc(size);\n}\n#endif\n\n/** Same as celt_alloc(), except that the area is only needed inside a CELT call (might cause problem with wideband though) */\n#ifndef OVERRIDE_OPUS_ALLOC_SCRATCH\nstatic OPUS_INLINE void *opus_alloc_scratch (size_t size)\n{\n   /* Scratch space doesn't need to be cleared */\n   return opus_alloc(size);\n}\n#endif\n\n/** Opus wrapper for free(). To do your own dynamic allocation, all you need to do is replace this function and opus_alloc */\n#ifndef OVERRIDE_OPUS_FREE\nstatic OPUS_INLINE void opus_free (void *ptr)\n{\n   free(ptr);\n}\n#endif\n\n/** Copy n bytes of memory from src to dst. The 0* term provides compile-time type checking  */\n#ifndef OVERRIDE_OPUS_COPY\n#define OPUS_COPY(dst, src, n) (memcpy((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) ))\n#endif\n\n/** Copy n bytes of memory from src to dst, allowing overlapping regions. The 0* term\n    provides compile-time type checking */\n#ifndef OVERRIDE_OPUS_MOVE\n#define OPUS_MOVE(dst, src, n) (memmove((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) ))\n#endif\n\n/** Set n elements of dst to zero, starting at address s */\n#ifndef OVERRIDE_OPUS_CLEAR\n#define OPUS_CLEAR(dst, n) (memset((dst), 0, (n)*sizeof(*(dst))))\n#endif\n\n/*#ifdef __GNUC__\n#pragma GCC poison printf sprintf\n#pragma GCC poison malloc free realloc calloc\n#endif*/\n\n#endif /* OS_SUPPORT_H */\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/pitch.c",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\n/**\n   @file pitch.c\n   @brief Pitch analysis\n */\n\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"pitch.h\"\n#include \"os_support.h\"\n#include \"modes.h\"\n#include \"stack_alloc.h\"\n#include \"mathops.h\"\n#include \"celt_lpc.h\"\n\n\nstatic void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len,\n                            int max_pitch, int *best_pitch\n#ifdef FIXED_POINT\n                            , int yshift, opus_val32 maxcorr\n#endif\n                            )\n{\n   int i, j;\n   opus_val32 Syy=1;\n   opus_val16 best_num[2];\n   opus_val32 best_den[2];\n#ifdef FIXED_POINT\n   int xshift;\n\n   xshift = celt_ilog2(maxcorr)-14;\n#endif\n\n   best_num[0] = -1;\n   best_num[1] = -1;\n   best_den[0] = 0;\n   best_den[1] = 0;\n   best_pitch[0] = 0;\n   best_pitch[1] = 1;\n   for (j=0;j<len;j++)\n      Syy = ADD32(Syy, SHR32(MULT16_16(y[j],y[j]), yshift));\n   for (i=0;i<max_pitch;i++)\n   {\n      if (xcorr[i]>0)\n      {\n         opus_val16 num;\n         opus_val32 xcorr16;\n         xcorr16 = EXTRACT16(VSHR32(xcorr[i], xshift));\n#ifndef FIXED_POINT\n         /* Considering the range of xcorr16, this should avoid both underflows\n            and overflows (inf) when squaring xcorr16 */\n         xcorr16 *= 1e-12f;\n#endif\n         num = MULT16_16_Q15(xcorr16,xcorr16);\n         if (MULT16_32_Q15(num,best_den[1]) > MULT16_32_Q15(best_num[1],Syy))\n         {\n            if (MULT16_32_Q15(num,best_den[0]) > MULT16_32_Q15(best_num[0],Syy))\n            {\n               best_num[1] = best_num[0];\n               best_den[1] = best_den[0];\n               best_pitch[1] = best_pitch[0];\n               best_num[0] = num;\n               best_den[0] = Syy;\n               best_pitch[0] = i;\n            } else {\n               best_num[1] = num;\n               best_den[1] = Syy;\n               best_pitch[1] = i;\n            }\n         }\n      }\n      Syy += SHR32(MULT16_16(y[i+len],y[i+len]),yshift) - SHR32(MULT16_16(y[i],y[i]),yshift);\n      Syy = MAX32(1, Syy);\n   }\n}\n\nstatic void celt_fir5(const opus_val16 *x,\n         const opus_val16 *num,\n         opus_val16 *y,\n         int N,\n         opus_val16 *mem)\n{\n   int i;\n   opus_val16 num0, num1, num2, num3, num4;\n   opus_val32 mem0, mem1, mem2, mem3, mem4;\n   num0=num[0];\n   num1=num[1];\n   num2=num[2];\n   num3=num[3];\n   num4=num[4];\n   mem0=mem[0];\n   mem1=mem[1];\n   mem2=mem[2];\n   mem3=mem[3];\n   mem4=mem[4];\n   for (i=0;i<N;i++)\n   {\n      opus_val32 sum = SHL32(EXTEND32(x[i]), SIG_SHIFT);\n      sum = MAC16_16(sum,num0,mem0);\n      sum = MAC16_16(sum,num1,mem1);\n      sum = MAC16_16(sum,num2,mem2);\n      sum = MAC16_16(sum,num3,mem3);\n      sum = MAC16_16(sum,num4,mem4);\n      mem4 = mem3;\n      mem3 = mem2;\n      mem2 = mem1;\n      mem1 = mem0;\n      mem0 = x[i];\n      y[i] = ROUND16(sum, SIG_SHIFT);\n   }\n   mem[0]=mem0;\n   mem[1]=mem1;\n   mem[2]=mem2;\n   mem[3]=mem3;\n   mem[4]=mem4;\n}\n\n\nvoid pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x_lp,\n      int len, int C, int arch)\n{\n   int i;\n   opus_val32 ac[5];\n   opus_val16 tmp=Q15ONE;\n   opus_val16 lpc[4], mem[5]={0,0,0,0,0};\n   opus_val16 lpc2[5];\n   opus_val16 c1 = QCONST16(.8f,15);\n#ifdef FIXED_POINT\n   int shift;\n   opus_val32 maxabs = celt_maxabs32(x[0], len);\n   if (C==2)\n   {\n      opus_val32 maxabs_1 = celt_maxabs32(x[1], len);\n      maxabs = MAX32(maxabs, maxabs_1);\n   }\n   if (maxabs<1)\n      maxabs=1;\n   shift = celt_ilog2(maxabs)-10;\n   if (shift<0)\n      shift=0;\n   if (C==2)\n      shift++;\n#endif\n   for (i=1;i<len>>1;i++)\n      x_lp[i] = SHR32(HALF32(HALF32(x[0][(2*i-1)]+x[0][(2*i+1)])+x[0][2*i]), shift);\n   x_lp[0] = SHR32(HALF32(HALF32(x[0][1])+x[0][0]), shift);\n   if (C==2)\n   {\n      for (i=1;i<len>>1;i++)\n         x_lp[i] += SHR32(HALF32(HALF32(x[1][(2*i-1)]+x[1][(2*i+1)])+x[1][2*i]), shift);\n      x_lp[0] += SHR32(HALF32(HALF32(x[1][1])+x[1][0]), shift);\n   }\n\n   _celt_autocorr(x_lp, ac, NULL, 0,\n                  4, len>>1, arch);\n\n   /* Noise floor -40 dB */\n#ifdef FIXED_POINT\n   ac[0] += SHR32(ac[0],13);\n#else\n   ac[0] *= 1.0001f;\n#endif\n   /* Lag windowing */\n   for (i=1;i<=4;i++)\n   {\n      /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/\n#ifdef FIXED_POINT\n      ac[i] -= MULT16_32_Q15(2*i*i, ac[i]);\n#else\n      ac[i] -= ac[i]*(.008f*i)*(.008f*i);\n#endif\n   }\n\n   _celt_lpc(lpc, ac, 4);\n   for (i=0;i<4;i++)\n   {\n      tmp = MULT16_16_Q15(QCONST16(.9f,15), tmp);\n      lpc[i] = MULT16_16_Q15(lpc[i], tmp);\n   }\n   /* Add a zero */\n   lpc2[0] = lpc[0] + QCONST16(.8f,SIG_SHIFT);\n   lpc2[1] = lpc[1] + MULT16_16_Q15(c1,lpc[0]);\n   lpc2[2] = lpc[2] + MULT16_16_Q15(c1,lpc[1]);\n   lpc2[3] = lpc[3] + MULT16_16_Q15(c1,lpc[2]);\n   lpc2[4] = MULT16_16_Q15(c1,lpc[3]);\n   celt_fir5(x_lp, lpc2, x_lp, len>>1, mem);\n}\n\n#if 0 /* This is a simple version of the pitch correlation that should work\n         well on DSPs like Blackfin and TI C5x/C6x */\n\n#ifdef FIXED_POINT\nopus_val32\n#else\nvoid\n#endif\ncelt_pitch_xcorr(opus_val16 *x, opus_val16 *y, opus_val32 *xcorr, int len, int max_pitch)\n{\n   int i, j;\n#ifdef FIXED_POINT\n   opus_val32 maxcorr=1;\n#endif\n   for (i=0;i<max_pitch;i++)\n   {\n      opus_val32 sum = 0;\n      for (j=0;j<len;j++)\n         sum = MAC16_16(sum, x[j],y[i+j]);\n      xcorr[i] = sum;\n#ifdef FIXED_POINT\n      maxcorr = MAX32(maxcorr, sum);\n#endif\n   }\n#ifdef FIXED_POINT\n   return maxcorr;\n#endif\n}\n\n#else /* Unrolled version of the pitch correlation -- runs faster on x86 and ARM */\n\n#ifdef FIXED_POINT\nopus_val32\n#else\nvoid\n#endif\ncelt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y, opus_val32 *xcorr, int len, int max_pitch)\n{\n   int i,j;\n   /*The EDSP version requires that max_pitch is at least 1, and that _x is\n      32-bit aligned.\n     Since it's hard to put asserts in assembly, put them here.*/\n   //celt_assert(max_pitch>0);\n   //celt_assert((((unsigned char *)_x-(unsigned char *)NULL)&3)==0);\n#ifdef FIXED_POINT\n   opus_val32 maxcorr=1;\n#endif\n   for (i=0;i<max_pitch-3;i+=4)\n   {\n      opus_val32 sum[4]={0,0,0,0};\n      xcorr_kernel(_x, _y+i, sum, len);\n      xcorr[i]=sum[0];\n      xcorr[i+1]=sum[1];\n      xcorr[i+2]=sum[2];\n      xcorr[i+3]=sum[3];\n#ifdef FIXED_POINT\n      sum[0] = MAX32(sum[0], sum[1]);\n      sum[2] = MAX32(sum[2], sum[3]);\n      sum[0] = MAX32(sum[0], sum[2]);\n      maxcorr = MAX32(maxcorr, sum[0]);\n#endif\n   }\n   /* In case max_pitch isn't a multiple of 4, do non-unrolled version. */\n   for (;i<max_pitch;i++)\n   {\n      opus_val32 sum = 0;\n      for (j=0;j<len;j++)\n         sum = MAC16_16(sum, _x[j],_y[i+j]);\n      xcorr[i] = sum;\n#ifdef FIXED_POINT\n      maxcorr = MAX32(maxcorr, sum);\n#endif\n   }\n#ifdef FIXED_POINT\n   return maxcorr;\n#endif\n}\n\n#endif\nvoid pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTRICT y,\n                  int len, int max_pitch, int *pitch, int arch)\n{\n   int i, j;\n   int lag;\n   int best_pitch[2]={0,0};\n   VARDECL(opus_val16, x_lp4);\n   VARDECL(opus_val16, y_lp4);\n   VARDECL(opus_val32, xcorr);\n#ifdef FIXED_POINT\n   opus_val32 maxcorr;\n   opus_val32 xmax, ymax;\n   int shift=0;\n#endif\n   int offset;\n\n   SAVE_STACK;\n\n   celt_assert(len>0);\n   celt_assert(max_pitch>0);\n   lag = len+max_pitch;\n\n   ALLOC(x_lp4, len>>2, opus_val16);\n   ALLOC(y_lp4, lag>>2, opus_val16);\n   ALLOC(xcorr, max_pitch>>1, opus_val32);\n\n   /* Downsample by 2 again */\n   for (j=0;j<len>>2;j++)\n      x_lp4[j] = x_lp[2*j];\n   for (j=0;j<lag>>2;j++)\n      y_lp4[j] = y[2*j];\n\n#ifdef FIXED_POINT\n   xmax = celt_maxabs16(x_lp4, len>>2);\n   ymax = celt_maxabs16(y_lp4, lag>>2);\n   shift = celt_ilog2(MAX32(1, MAX32(xmax, ymax)))-11;\n   if (shift>0)\n   {\n      for (j=0;j<len>>2;j++)\n         x_lp4[j] = SHR16(x_lp4[j], shift);\n      for (j=0;j<lag>>2;j++)\n         y_lp4[j] = SHR16(y_lp4[j], shift);\n      /* Use double the shift for a MAC */\n      shift *= 2;\n   } else {\n      shift = 0;\n   }\n#endif\n\n   /* Coarse search with 4x decimation */\n\n#ifdef FIXED_POINT\n   maxcorr =\n#endif\n   celt_pitch_xcorr(x_lp4, y_lp4, xcorr, len>>2, max_pitch>>2, arch);\n\n   find_best_pitch(xcorr, y_lp4, len>>2, max_pitch>>2, best_pitch\n#ifdef FIXED_POINT\n                   , 0, maxcorr\n#endif\n                   );\n\n   /* Finer search with 2x decimation */\n#ifdef FIXED_POINT\n   maxcorr=1;\n#endif\n   for (i=0;i<max_pitch>>1;i++)\n   {\n      opus_val32 sum=0;\n      xcorr[i] = 0;\n      if (abs(i-2*best_pitch[0])>2 && abs(i-2*best_pitch[1])>2)\n         continue;\n      for (j=0;j<len>>1;j++)\n         sum += SHR32(MULT16_16(x_lp[j],y[i+j]), shift);\n      xcorr[i] = MAX32(-1, sum);\n#ifdef FIXED_POINT\n      maxcorr = MAX32(maxcorr, sum);\n#endif\n   }\n   find_best_pitch(xcorr, y, len>>1, max_pitch>>1, best_pitch\n#ifdef FIXED_POINT\n                   , shift+1, maxcorr\n#endif\n                   );\n\n   /* Refine by pseudo-interpolation */\n   if (best_pitch[0]>0 && best_pitch[0]<(max_pitch>>1)-1)\n   {\n      opus_val32 a, b, c;\n      a = xcorr[best_pitch[0]-1];\n      b = xcorr[best_pitch[0]];\n      c = xcorr[best_pitch[0]+1];\n      if ((c-a) > MULT16_32_Q15(QCONST16(.7f,15),b-a))\n         offset = 1;\n      else if ((a-c) > MULT16_32_Q15(QCONST16(.7f,15),b-c))\n         offset = -1;\n      else\n         offset = 0;\n   } else {\n      offset = 0;\n   }\n   *pitch = 2*best_pitch[0]-offset;\n\n   RESTORE_STACK;\n}\n\nstatic const int second_check[16] = {0, 0, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2};\nopus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,\n      int N, int *T0_, int prev_period, opus_val16 prev_gain)\n{\n   int k, i, T, T0;\n   opus_val16 g, g0;\n   opus_val16 pg;\n   opus_val32 xy,xx,yy,xy2;\n   opus_val32 xcorr[3];\n   opus_val32 best_xy, best_yy;\n   int offset;\n   int minperiod0;\n   VARDECL(opus_val32, yy_lookup);\n   SAVE_STACK;\n\n   minperiod0 = minperiod;\n   maxperiod /= 2;\n   minperiod /= 2;\n   *T0_ /= 2;\n   prev_period /= 2;\n   N /= 2;\n   x += maxperiod;\n   if (*T0_>=maxperiod)\n      *T0_=maxperiod-1;\n\n   T = T0 = *T0_;\n   ALLOC(yy_lookup, maxperiod+1, opus_val32);\n   dual_inner_prod(x, x, x-T0, N, &xx, &xy);\n   yy_lookup[0] = xx;\n   yy=xx;\n   for (i=1;i<=maxperiod;i++)\n   {\n      yy = yy+MULT16_16(x[-i],x[-i])-MULT16_16(x[N-i],x[N-i]);\n      yy_lookup[i] = MAX32(0, yy);\n   }\n   yy = yy_lookup[T0];\n   best_xy = xy;\n   best_yy = yy;\n#ifdef FIXED_POINT\n      {\n         opus_val32 x2y2;\n         int sh, t;\n         x2y2 = 1+HALF32(MULT32_32_Q31(xx,yy));\n         sh = celt_ilog2(x2y2)>>1;\n         t = VSHR32(x2y2, 2*(sh-7));\n         g = g0 = VSHR32(MULT16_32_Q15(celt_rsqrt_norm(t), xy),sh+1);\n      }\n#else\n      g = g0 = xy/celt_sqrt(1+xx*yy);\n#endif\n   /* Look for any pitch at T/k */\n   for (k=2;k<=15;k++)\n   {\n      int T1, T1b;\n      opus_val16 g1;\n      opus_val16 cont=0;\n      opus_val16 thresh;\n      T1 = (2*T0+k)/(2*k);\n      if (T1 < minperiod)\n         break;\n      /* Look for another strong correlation at T1b */\n      if (k==2)\n      {\n         if (T1+T0>maxperiod)\n            T1b = T0;\n         else\n            T1b = T0+T1;\n      } else\n      {\n         T1b = (2*second_check[k]*T0+k)/(2*k);\n      }\n      dual_inner_prod(x, &x[-T1], &x[-T1b], N, &xy, &xy2);\n      xy += xy2;\n      yy = yy_lookup[T1] + yy_lookup[T1b];\n#ifdef FIXED_POINT\n      {\n         opus_val32 x2y2;\n         int sh, t;\n         x2y2 = 1+MULT32_32_Q31(xx,yy);\n         sh = celt_ilog2(x2y2)>>1;\n         t = VSHR32(x2y2, 2*(sh-7));\n         g1 = VSHR32(MULT16_32_Q15(celt_rsqrt_norm(t), xy),sh+1);\n      }\n#else\n      g1 = xy/celt_sqrt(1+2.f*xx*1.f*yy);\n#endif\n      if (abs(T1-prev_period)<=1)\n         cont = prev_gain;\n      else if (abs(T1-prev_period)<=2 && 5*k*k < T0)\n         cont = HALF32(prev_gain);\n      else\n         cont = 0;\n      thresh = MAX16(QCONST16(.3f,15), MULT16_16_Q15(QCONST16(.7f,15),g0)-cont);\n      /* Bias against very high pitch (very short period) to avoid false-positives\n         due to short-term correlation */\n      if (T1<3*minperiod)\n         thresh = MAX16(QCONST16(.4f,15), MULT16_16_Q15(QCONST16(.85f,15),g0)-cont);\n      else if (T1<2*minperiod)\n         thresh = MAX16(QCONST16(.5f,15), MULT16_16_Q15(QCONST16(.9f,15),g0)-cont);\n      if (g1 > thresh)\n      {\n         best_xy = xy;\n         best_yy = yy;\n         T = T1;\n         g = g1;\n      }\n   }\n   best_xy = MAX32(0, best_xy);\n   if (best_yy <= best_xy)\n      pg = Q15ONE;\n   else\n      pg = SHR32(frac_div32(best_xy,best_yy+1),16);\n\n   for (k=0;k<3;k++)\n   {\n      int T1 = T+k-1;\n      xy = 0;\n      for (i=0;i<N;i++)\n         xy = MAC16_16(xy, x[i], x[i-T1]);\n      xcorr[k] = xy;\n   }\n   if ((xcorr[2]-xcorr[0]) > MULT16_32_Q15(QCONST16(.7f,15),xcorr[1]-xcorr[0]))\n      offset = 1;\n   else if ((xcorr[0]-xcorr[2]) > MULT16_32_Q15(QCONST16(.7f,15),xcorr[1]-xcorr[2]))\n      offset = -1;\n   else\n      offset = 0;\n   if (pg > g)\n      pg = g;\n   *T0_ = 2*T+offset;\n\n   if (*T0_<minperiod0)\n      *T0_=minperiod0;\n   RESTORE_STACK;\n   return pg;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/pitch.h",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\n/**\n   @file pitch.h\n   @brief Pitch analysis\n */\n\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef PITCH_H\n#define PITCH_H\n\n#include \"modes.h\"\n#include \"cpu_support.h\"\n\n#if defined(__SSE__) && !defined(FIXED_POINT)\n#include \"x86/pitch_sse.h\"\n#endif\n\n#if defined(OPUS_ARM_ASM) && defined(FIXED_POINT)\n# include \"arm/pitch_arm.h\"\n#endif\n\nvoid pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x_lp,\n      int len, int C, int arch);\n\nvoid pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTRICT y,\n                  int len, int max_pitch, int *pitch, int arch);\n\nopus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,\n      int N, int *T0, int prev_period, opus_val16 prev_gain);\n\n/* OPT: This is the kernel you really want to optimize. It gets used a lot\n   by the prefilter and by the PLC. */\n#ifndef OVERRIDE_XCORR_KERNEL\nstatic OPUS_INLINE void xcorr_kernel(const opus_val16 * x, const opus_val16 * y, opus_val32 sum[4], int len)\n{\n   int j;\n   opus_val16 y_0, y_1, y_2, y_3;\n   celt_assert(len>=3);\n   y_3=0; /* gcc doesn't realize that y_3 can't be used uninitialized */\n   y_0=*y++;\n   y_1=*y++;\n   y_2=*y++;\n   for (j=0;j<len-3;j+=4)\n   {\n      opus_val16 tmp;\n      tmp = *x++;\n      y_3=*y++;\n      sum[0] = MAC16_16(sum[0],tmp,y_0);\n      sum[1] = MAC16_16(sum[1],tmp,y_1);\n      sum[2] = MAC16_16(sum[2],tmp,y_2);\n      sum[3] = MAC16_16(sum[3],tmp,y_3);\n      tmp=*x++;\n      y_0=*y++;\n      sum[0] = MAC16_16(sum[0],tmp,y_1);\n      sum[1] = MAC16_16(sum[1],tmp,y_2);\n      sum[2] = MAC16_16(sum[2],tmp,y_3);\n      sum[3] = MAC16_16(sum[3],tmp,y_0);\n      tmp=*x++;\n      y_1=*y++;\n      sum[0] = MAC16_16(sum[0],tmp,y_2);\n      sum[1] = MAC16_16(sum[1],tmp,y_3);\n      sum[2] = MAC16_16(sum[2],tmp,y_0);\n      sum[3] = MAC16_16(sum[3],tmp,y_1);\n      tmp=*x++;\n      y_2=*y++;\n      sum[0] = MAC16_16(sum[0],tmp,y_3);\n      sum[1] = MAC16_16(sum[1],tmp,y_0);\n      sum[2] = MAC16_16(sum[2],tmp,y_1);\n      sum[3] = MAC16_16(sum[3],tmp,y_2);\n   }\n   if (j++<len)\n   {\n      opus_val16 tmp = *x++;\n      y_3=*y++;\n      sum[0] = MAC16_16(sum[0],tmp,y_0);\n      sum[1] = MAC16_16(sum[1],tmp,y_1);\n      sum[2] = MAC16_16(sum[2],tmp,y_2);\n      sum[3] = MAC16_16(sum[3],tmp,y_3);\n   }\n   if (j++<len)\n   {\n      opus_val16 tmp=*x++;\n      y_0=*y++;\n      sum[0] = MAC16_16(sum[0],tmp,y_1);\n      sum[1] = MAC16_16(sum[1],tmp,y_2);\n      sum[2] = MAC16_16(sum[2],tmp,y_3);\n      sum[3] = MAC16_16(sum[3],tmp,y_0);\n   }\n   if (j<len)\n   {\n      opus_val16 tmp=*x++;\n      y_1=*y++;\n      sum[0] = MAC16_16(sum[0],tmp,y_2);\n      sum[1] = MAC16_16(sum[1],tmp,y_3);\n      sum[2] = MAC16_16(sum[2],tmp,y_0);\n      sum[3] = MAC16_16(sum[3],tmp,y_1);\n   }\n}\n#endif /* OVERRIDE_XCORR_KERNEL */\n\n#ifndef OVERRIDE_DUAL_INNER_PROD\nstatic OPUS_INLINE void dual_inner_prod(const opus_val16 *x, const opus_val16 *y01, const opus_val16 *y02,\n      int N, opus_val32 *xy1, opus_val32 *xy2)\n{\n   int i;\n   opus_val32 xy01=0;\n   opus_val32 xy02=0;\n   for (i=0;i<N;i++)\n   {\n      xy01 = MAC16_16(xy01, x[i], y01[i]);\n      xy02 = MAC16_16(xy02, x[i], y02[i]);\n   }\n   *xy1 = xy01;\n   *xy2 = xy02;\n}\n#endif\n\n#ifdef FIXED_POINT\nopus_val32\n#else\nvoid\n#endif\ncelt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y,\n      opus_val32 *xcorr, int len, int max_pitch);\n\n#if !defined(OVERRIDE_PITCH_XCORR)\n/*Is run-time CPU detection enabled on this platform?*/\n# if defined(OPUS_HAVE_RTCD)\nextern\n#  if defined(FIXED_POINT)\nopus_val32\n#  else\nvoid\n#  endif\n(*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *,\n      const opus_val16 *, opus_val32 *, int, int);\n\n#  define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \\\n  ((*CELT_PITCH_XCORR_IMPL[(arch)&OPUS_ARCHMASK])(_x, _y, \\\n        xcorr, len, max_pitch))\n# else\n#  define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \\\n  ((void)(arch),celt_pitch_xcorr_c(_x, _y, xcorr, len, max_pitch))\n# endif\n#endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/quant_bands.c",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"quant_bands.h\"\n#include \"laplace.h\"\n#include <math.h>\n#include \"os_support.h\"\n#include \"arch.h\"\n#include \"mathops.h\"\n#include \"stack_alloc.h\"\n#include \"rate.h\"\n\n#ifdef FIXED_POINT\n/* Mean energy in each band quantized in Q4 */\nconst signed char eMeans[25] = {\n      103,100, 92, 85, 81,\n       77, 72, 70, 78, 75,\n       73, 71, 78, 74, 69,\n       72, 70, 74, 76, 71,\n       60, 60, 60, 60, 60\n};\n#else\n/* Mean energy in each band quantized in Q4 and converted back to float */\nconst opus_val16 eMeans[25] = {\n      6.437500f, 6.250000f, 5.750000f, 5.312500f, 5.062500f,\n      4.812500f, 4.500000f, 4.375000f, 4.875000f, 4.687500f,\n      4.562500f, 4.437500f, 4.875000f, 4.625000f, 4.312500f,\n      4.500000f, 4.375000f, 4.625000f, 4.750000f, 4.437500f,\n      3.750000f, 3.750000f, 3.750000f, 3.750000f, 3.750000f\n};\n#endif\n/* prediction coefficients: 0.9, 0.8, 0.65, 0.5 */\n#ifdef FIXED_POINT\nstatic const opus_val16 pred_coef[4] = {29440, 26112, 21248, 16384};\nstatic const opus_val16 beta_coef[4] = {30147, 22282, 12124, 6554};\nstatic const opus_val16 beta_intra = 4915;\n#else\nstatic const opus_val16 pred_coef[4] = {29440/32768., 26112/32768., 21248/32768., 16384/32768.};\nstatic const opus_val16 beta_coef[4] = {30147/32768., 22282/32768., 12124/32768., 6554/32768.};\nstatic const opus_val16 beta_intra = 4915/32768.;\n#endif\n\n/*Parameters of the Laplace-like probability models used for the coarse energy.\n  There is one pair of parameters for each frame size, prediction type\n   (inter/intra), and band number.\n  The first number of each pair is the probability of 0, and the second is the\n   decay rate, both in Q8 precision.*/\nstatic const unsigned char e_prob_model[4][2][42] = {\n   /*120 sample frames.*/\n   {\n      /*Inter*/\n      {\n          72, 127,  65, 129,  66, 128,  65, 128,  64, 128,  62, 128,  64, 128,\n          64, 128,  92,  78,  92,  79,  92,  78,  90,  79, 116,  41, 115,  40,\n         114,  40, 132,  26, 132,  26, 145,  17, 161,  12, 176,  10, 177,  11\n      },\n      /*Intra*/\n      {\n          24, 179,  48, 138,  54, 135,  54, 132,  53, 134,  56, 133,  55, 132,\n          55, 132,  61, 114,  70,  96,  74,  88,  75,  88,  87,  74,  89,  66,\n          91,  67, 100,  59, 108,  50, 120,  40, 122,  37,  97,  43,  78,  50\n      }\n   },\n   /*240 sample frames.*/\n   {\n      /*Inter*/\n      {\n          83,  78,  84,  81,  88,  75,  86,  74,  87,  71,  90,  73,  93,  74,\n          93,  74, 109,  40, 114,  36, 117,  34, 117,  34, 143,  17, 145,  18,\n         146,  19, 162,  12, 165,  10, 178,   7, 189,   6, 190,   8, 177,   9\n      },\n      /*Intra*/\n      {\n          23, 178,  54, 115,  63, 102,  66,  98,  69,  99,  74,  89,  71,  91,\n          73,  91,  78,  89,  86,  80,  92,  66,  93,  64, 102,  59, 103,  60,\n         104,  60, 117,  52, 123,  44, 138,  35, 133,  31,  97,  38,  77,  45\n      }\n   },\n   /*480 sample frames.*/\n   {\n      /*Inter*/\n      {\n          61,  90,  93,  60, 105,  42, 107,  41, 110,  45, 116,  38, 113,  38,\n         112,  38, 124,  26, 132,  27, 136,  19, 140,  20, 155,  14, 159,  16,\n         158,  18, 170,  13, 177,  10, 187,   8, 192,   6, 175,   9, 159,  10\n      },\n      /*Intra*/\n      {\n          21, 178,  59, 110,  71,  86,  75,  85,  84,  83,  91,  66,  88,  73,\n          87,  72,  92,  75,  98,  72, 105,  58, 107,  54, 115,  52, 114,  55,\n         112,  56, 129,  51, 132,  40, 150,  33, 140,  29,  98,  35,  77,  42\n      }\n   },\n   /*960 sample frames.*/\n   {\n      /*Inter*/\n      {\n          42, 121,  96,  66, 108,  43, 111,  40, 117,  44, 123,  32, 120,  36,\n         119,  33, 127,  33, 134,  34, 139,  21, 147,  23, 152,  20, 158,  25,\n         154,  26, 166,  21, 173,  16, 184,  13, 184,  10, 150,  13, 139,  15\n      },\n      /*Intra*/\n      {\n          22, 178,  63, 114,  74,  82,  84,  83,  92,  82, 103,  62,  96,  72,\n          96,  67, 101,  73, 107,  72, 113,  55, 118,  52, 125,  52, 118,  52,\n         117,  55, 135,  49, 137,  39, 157,  32, 145,  29,  97,  33,  77,  40\n      }\n   }\n};\n\nstatic const unsigned char small_energy_icdf[3]={2,1,0};\n\nstatic opus_val32 loss_distortion(const opus_val16 *eBands, opus_val16 *oldEBands, int start, int end, int len, int C)\n{\n   int c, i;\n   opus_val32 dist = 0;\n   c=0; do {\n      for (i=start;i<end;i++)\n      {\n         opus_val16 d = SUB16(SHR16(eBands[i+c*len], 3), SHR16(oldEBands[i+c*len], 3));\n         dist = MAC16_16(dist, d,d);\n      }\n   } while (++c<C);\n   return MIN32(200,SHR32(dist,2*DB_SHIFT-6));\n}\n\nstatic int quant_coarse_energy_impl(const CELTMode *m, int start, int end,\n      const opus_val16 *eBands, opus_val16 *oldEBands,\n      opus_int32 budget, opus_int32 tell,\n      const unsigned char *prob_model, opus_val16 *error, ec_enc *enc,\n      int C, int LM, int intra, opus_val16 max_decay, int lfe)\n{\n   int i, c;\n   int badness = 0;\n   opus_val32 prev[2] = {0,0};\n   opus_val16 coef;\n   opus_val16 beta;\n\n   if (tell+3 <= budget)\n      ec_enc_bit_logp(enc, intra, 3);\n   if (intra)\n   {\n      coef = 0;\n      beta = beta_intra;\n   } else {\n      beta = beta_coef[LM];\n      coef = pred_coef[LM];\n   }\n\n   /* Encode at a fixed coarse resolution */\n   for (i=start;i<end;i++)\n   {\n      c=0;\n      do {\n         int bits_left;\n         int qi, qi0;\n         opus_val32 q;\n         opus_val16 x;\n         opus_val32 f, tmp;\n         opus_val16 oldE;\n         opus_val16 decay_bound;\n         x = eBands[i+c*m->nbEBands];\n         oldE = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]);\n#ifdef FIXED_POINT\n         f = SHL32(EXTEND32(x),7) - PSHR32(MULT16_16(coef,oldE), 8) - prev[c];\n         /* Rounding to nearest integer here is really important! */\n         qi = (f+QCONST32(.5f,DB_SHIFT+7))>>(DB_SHIFT+7);\n         decay_bound = EXTRACT16(MAX32(-QCONST16(28.f,DB_SHIFT),\n               SUB32((opus_val32)oldEBands[i+c*m->nbEBands],max_decay)));\n#else\n         f = x-coef*oldE-prev[c];\n         /* Rounding to nearest integer here is really important! */\n         qi = (int)floor(.5f+f);\n         decay_bound = MAX16(-QCONST16(28.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]) - max_decay;\n#endif\n         /* Prevent the energy from going down too quickly (e.g. for bands\n            that have just one bin) */\n         if (qi < 0 && x < decay_bound)\n         {\n            qi += (int)SHR16(SUB16(decay_bound,x), DB_SHIFT);\n            if (qi > 0)\n               qi = 0;\n         }\n         qi0 = qi;\n         /* If we don't have enough bits to encode all the energy, just assume\n             something safe. */\n         tell = ec_tell(enc);\n         bits_left = budget-tell-3*C*(end-i);\n         if (i!=start && bits_left < 30)\n         {\n            if (bits_left < 24)\n               qi = IMIN(1, qi);\n            if (bits_left < 16)\n               qi = IMAX(-1, qi);\n         }\n         if (lfe && i>=2)\n            qi = IMIN(qi, 0);\n         if (budget-tell >= 15)\n         {\n            int pi;\n            pi = 2*IMIN(i,20);\n            ec_laplace_encode(enc, &qi,\n                  prob_model[pi]<<7, prob_model[pi+1]<<6);\n         }\n         else if(budget-tell >= 2)\n         {\n            qi = IMAX(-1, IMIN(qi, 1));\n            ec_enc_icdf(enc, 2*qi^-(qi<0), small_energy_icdf, 2);\n         }\n         else if(budget-tell >= 1)\n         {\n            qi = IMIN(0, qi);\n            ec_enc_bit_logp(enc, -qi, 1);\n         }\n         else\n            qi = -1;\n         error[i+c*m->nbEBands] = PSHR32(f,7) - SHL16(qi,DB_SHIFT);\n         badness += abs(qi0-qi);\n         q = (opus_val32)SHL32(EXTEND32(qi),DB_SHIFT);\n\n         tmp = PSHR32(MULT16_16(coef,oldE),8) + prev[c] + SHL32(q,7);\n#ifdef FIXED_POINT\n         tmp = MAX32(-QCONST32(28.f, DB_SHIFT+7), tmp);\n#endif\n         oldEBands[i+c*m->nbEBands] = PSHR32(tmp, 7);\n         prev[c] = prev[c] + SHL32(q,7) - MULT16_16(beta,PSHR32(q,8));\n      } while (++c < C);\n   }\n   return lfe ? 0 : badness;\n}\n\nvoid quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,\n      const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget,\n      opus_val16 *error, ec_enc *enc, int C, int LM, int nbAvailableBytes,\n      int force_intra, opus_val32 *delayedIntra, int two_pass, int loss_rate, int lfe)\n{\n   int intra;\n   opus_val16 max_decay;\n   VARDECL(opus_val16, oldEBands_intra);\n   VARDECL(opus_val16, error_intra);\n   ec_enc enc_start_state;\n   opus_uint32 tell;\n   int badness1=0;\n   opus_int32 intra_bias;\n   opus_val32 new_distortion;\n   SAVE_STACK;\n\n   intra = force_intra || (!two_pass && *delayedIntra>2*C*(end-start) && nbAvailableBytes > (end-start)*C);\n   intra_bias = (opus_int32)((budget**delayedIntra*loss_rate)/(C*512));\n   new_distortion = loss_distortion(eBands, oldEBands, start, effEnd, m->nbEBands, C);\n\n   tell = ec_tell(enc);\n   if (tell+3 > budget)\n      two_pass = intra = 0;\n\n   max_decay = QCONST16(16.f,DB_SHIFT);\n   if (end-start>10)\n   {\n#ifdef FIXED_POINT\n      max_decay = MIN32(max_decay, SHL32(EXTEND32(nbAvailableBytes),DB_SHIFT-3));\n#else\n      max_decay = MIN32(max_decay, .125f*nbAvailableBytes);\n#endif\n   }\n   if (lfe)\n      max_decay=3;\n   enc_start_state = *enc;\n\n   ALLOC(oldEBands_intra, C*m->nbEBands, opus_val16);\n   ALLOC(error_intra, C*m->nbEBands, opus_val16);\n   OPUS_COPY(oldEBands_intra, oldEBands, C*m->nbEBands);\n\n   if (two_pass || intra)\n   {\n      badness1 = quant_coarse_energy_impl(m, start, end, eBands, oldEBands_intra, budget,\n            tell, e_prob_model[LM][1], error_intra, enc, C, LM, 1, max_decay, lfe);\n   }\n\n   if (!intra)\n   {\n      unsigned char *intra_buf;\n      ec_enc enc_intra_state;\n      opus_int32 tell_intra;\n      opus_uint32 nstart_bytes;\n      opus_uint32 nintra_bytes;\n      opus_uint32 save_bytes;\n      int badness2;\n      VARDECL(unsigned char, intra_bits);\n\n      tell_intra = ec_tell_frac(enc);\n\n      enc_intra_state = *enc;\n\n      nstart_bytes = ec_range_bytes(&enc_start_state);\n      nintra_bytes = ec_range_bytes(&enc_intra_state);\n      intra_buf = ec_get_buffer(&enc_intra_state) + nstart_bytes;\n      save_bytes = nintra_bytes-nstart_bytes;\n      if (save_bytes == 0)\n         save_bytes = ALLOC_NONE;\n      ALLOC(intra_bits, save_bytes, unsigned char);\n      /* Copy bits from intra bit-stream */\n      OPUS_COPY(intra_bits, intra_buf, nintra_bytes - nstart_bytes);\n\n      *enc = enc_start_state;\n\n      badness2 = quant_coarse_energy_impl(m, start, end, eBands, oldEBands, budget,\n            tell, e_prob_model[LM][intra], error, enc, C, LM, 0, max_decay, lfe);\n\n      if (two_pass && (badness1 < badness2 || (badness1 == badness2 && ((opus_int32)ec_tell_frac(enc))+intra_bias > tell_intra)))\n      {\n         *enc = enc_intra_state;\n         /* Copy intra bits to bit-stream */\n         OPUS_COPY(intra_buf, intra_bits, nintra_bytes - nstart_bytes);\n         OPUS_COPY(oldEBands, oldEBands_intra, C*m->nbEBands);\n         OPUS_COPY(error, error_intra, C*m->nbEBands);\n         intra = 1;\n      }\n   } else {\n      OPUS_COPY(oldEBands, oldEBands_intra, C*m->nbEBands);\n      OPUS_COPY(error, error_intra, C*m->nbEBands);\n   }\n\n   if (intra)\n      *delayedIntra = new_distortion;\n   else\n      *delayedIntra = ADD32(MULT16_32_Q15(MULT16_16_Q15(pred_coef[LM], pred_coef[LM]),*delayedIntra),\n            new_distortion);\n\n   RESTORE_STACK;\n}\n\nvoid quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C)\n{\n   int i, c;\n\n   /* Encode finer resolution */\n   for (i=start;i<end;i++)\n   {\n      opus_int16 frac = 1<<fine_quant[i];\n      if (fine_quant[i] <= 0)\n         continue;\n      c=0;\n      do {\n         int q2;\n         opus_val16 offset;\n#ifdef FIXED_POINT\n         /* Has to be without rounding */\n         q2 = (error[i+c*m->nbEBands]+QCONST16(.5f,DB_SHIFT))>>(DB_SHIFT-fine_quant[i]);\n#else\n         q2 = (int)floor((error[i+c*m->nbEBands]+.5f)*frac);\n#endif\n         if (q2 > frac-1)\n            q2 = frac-1;\n         if (q2<0)\n            q2 = 0;\n         ec_enc_bits(enc, q2, fine_quant[i]);\n#ifdef FIXED_POINT\n         offset = SUB16(SHR32(SHL32(EXTEND32(q2),DB_SHIFT)+QCONST16(.5f,DB_SHIFT),fine_quant[i]),QCONST16(.5f,DB_SHIFT));\n#else\n         offset = (q2+.5f)*(1<<(14-fine_quant[i]))*(1.f/16384) - .5f;\n#endif\n         oldEBands[i+c*m->nbEBands] += offset;\n         error[i+c*m->nbEBands] -= offset;\n         /*printf (\"%f \", error[i] - offset);*/\n      } while (++c < C);\n   }\n}\n\nvoid quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C)\n{\n   int i, prio, c;\n\n   /* Use up the remaining bits */\n   for (prio=0;prio<2;prio++)\n   {\n      for (i=start;i<end && bits_left>=C ;i++)\n      {\n         if (fine_quant[i] >= MAX_FINE_BITS || fine_priority[i]!=prio)\n            continue;\n         c=0;\n         do {\n            int q2;\n            opus_val16 offset;\n            q2 = error[i+c*m->nbEBands]<0 ? 0 : 1;\n            ec_enc_bits(enc, q2, 1);\n#ifdef FIXED_POINT\n            offset = SHR16(SHL16(q2,DB_SHIFT)-QCONST16(.5f,DB_SHIFT),fine_quant[i]+1);\n#else\n            offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384);\n#endif\n            oldEBands[i+c*m->nbEBands] += offset;\n            bits_left--;\n         } while (++c < C);\n      }\n   }\n}\n\nvoid unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM)\n{\n   const unsigned char *prob_model = e_prob_model[LM][intra];\n   int i, c;\n   opus_val32 prev[2] = {0, 0};\n   opus_val16 coef;\n   opus_val16 beta;\n   opus_int32 budget;\n   opus_int32 tell;\n\n   if (intra)\n   {\n      coef = 0;\n      beta = beta_intra;\n   } else {\n      beta = beta_coef[LM];\n      coef = pred_coef[LM];\n   }\n\n   budget = dec->storage*8;\n\n   /* Decode at a fixed coarse resolution */\n   for (i=start;i<end;i++)\n   {\n      c=0;\n      do {\n         int qi;\n         opus_val32 q;\n         opus_val32 tmp;\n         /* It would be better to express this invariant as a\n            test on C at function entry, but that isn't enough\n            to make the static analyzer happy. */\n         celt_assert(c<2);\n         tell = ec_tell(dec);\n         if(budget-tell>=15)\n         {\n            int pi;\n            pi = 2*IMIN(i,20);\n            qi = ec_laplace_decode(dec,\n                  prob_model[pi]<<7, prob_model[pi+1]<<6);\n         }\n         else if(budget-tell>=2)\n         {\n            qi = ec_dec_icdf(dec, small_energy_icdf, 2);\n            qi = (qi>>1)^-(qi&1);\n         }\n         else if(budget-tell>=1)\n         {\n            qi = -ec_dec_bit_logp(dec, 1);\n         }\n         else\n            qi = -1;\n         q = (opus_val32)SHL32(EXTEND32(qi),DB_SHIFT);\n\n         oldEBands[i+c*m->nbEBands] = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]);\n         tmp = PSHR32(MULT16_16(coef,oldEBands[i+c*m->nbEBands]),8) + prev[c] + SHL32(q,7);\n#ifdef FIXED_POINT\n         tmp = MAX32(-QCONST32(28.f, DB_SHIFT+7), tmp);\n#endif\n         oldEBands[i+c*m->nbEBands] = PSHR32(tmp, 7);\n         prev[c] = prev[c] + SHL32(q,7) - MULT16_16(beta,PSHR32(q,8));\n      } while (++c < C);\n   }\n}\n\nvoid unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C)\n{\n   int i, c;\n   /* Decode finer resolution */\n   for (i=start;i<end;i++)\n   {\n      if (fine_quant[i] <= 0)\n         continue;\n      c=0;\n      do {\n         int q2;\n         opus_val16 offset;\n         q2 = ec_dec_bits(dec, fine_quant[i]);\n#ifdef FIXED_POINT\n         offset = SUB16(SHR32(SHL32(EXTEND32(q2),DB_SHIFT)+QCONST16(.5f,DB_SHIFT),fine_quant[i]),QCONST16(.5f,DB_SHIFT));\n#else\n         offset = (q2+.5f)*(1<<(14-fine_quant[i]))*(1.f/16384) - .5f;\n#endif\n         oldEBands[i+c*m->nbEBands] += offset;\n      } while (++c < C);\n   }\n}\n\nvoid unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant,  int *fine_priority, int bits_left, ec_dec *dec, int C)\n{\n   int i, prio, c;\n\n   /* Use up the remaining bits */\n   for (prio=0;prio<2;prio++)\n   {\n      for (i=start;i<end && bits_left>=C ;i++)\n      {\n         if (fine_quant[i] >= MAX_FINE_BITS || fine_priority[i]!=prio)\n            continue;\n         c=0;\n         do {\n            int q2;\n            opus_val16 offset;\n            q2 = ec_dec_bits(dec, 1);\n#ifdef FIXED_POINT\n            offset = SHR16(SHL16(q2,DB_SHIFT)-QCONST16(.5f,DB_SHIFT),fine_quant[i]+1);\n#else\n            offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384);\n#endif\n            oldEBands[i+c*m->nbEBands] += offset;\n            bits_left--;\n         } while (++c < C);\n      }\n   }\n}\n\nvoid amp2Log2(const CELTMode *m, int effEnd, int end,\n      celt_ener *bandE, opus_val16 *bandLogE, int C)\n{\n   int c, i;\n   c=0;\n   do {\n      for (i=0;i<effEnd;i++)\n         bandLogE[i+c*m->nbEBands] =\n               celt_log2(SHL32(bandE[i+c*m->nbEBands],2))\n               - SHL16((opus_val16)eMeans[i],6);\n      for (i=effEnd;i<end;i++)\n         bandLogE[c*m->nbEBands+i] = -QCONST16(14.f,DB_SHIFT);\n   } while (++c < C);\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/quant_bands.h",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef QUANT_BANDS\n#define QUANT_BANDS\n\n#include \"arch.h\"\n#include \"modes.h\"\n#include \"entenc.h\"\n#include \"entdec.h\"\n#include \"mathops.h\"\n\n#ifdef FIXED_POINT\nextern const signed char eMeans[25];\n#else\nextern const opus_val16 eMeans[25];\n#endif\n\nvoid amp2Log2(const CELTMode *m, int effEnd, int end,\n      celt_ener *bandE, opus_val16 *bandLogE, int C);\n\nvoid log2Amp(const CELTMode *m, int start, int end,\n      celt_ener *eBands, const opus_val16 *oldEBands, int C);\n\nvoid quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,\n      const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget,\n      opus_val16 *error, ec_enc *enc, int C, int LM,\n      int nbAvailableBytes, int force_intra, opus_val32 *delayedIntra,\n      int two_pass, int loss_rate, int lfe);\n\nvoid quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C);\n\nvoid quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C);\n\nvoid unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM);\n\nvoid unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C);\n\nvoid unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int C);\n\n#endif /* QUANT_BANDS */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/rate.c",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include <math.h>\n#include \"modes.h\"\n#include \"cwrs.h\"\n#include \"arch.h\"\n#include \"os_support.h\"\n\n#include \"entcode.h\"\n#include \"rate.h\"\n\nstatic const unsigned char LOG2_FRAC_TABLE[24]={\n   0,\n   8,13,\n  16,19,21,23,\n  24,26,27,28,29,30,31,32,\n  32,33,34,34,35,36,36,37,37\n};\n\n#ifdef CUSTOM_MODES\n\n/*Determines if V(N,K) fits in a 32-bit unsigned integer.\n  N and K are themselves limited to 15 bits.*/\nstatic int fits_in32(int _n, int _k)\n{\n   static const opus_int16 maxN[15] = {\n      32767, 32767, 32767, 1476, 283, 109,  60,  40,\n       29,  24,  20,  18,  16,  14,  13};\n   static const opus_int16 maxK[15] = {\n      32767, 32767, 32767, 32767, 1172, 238,  95,  53,\n       36,  27,  22,  18,  16,  15,  13};\n   if (_n>=14)\n   {\n      if (_k>=14)\n         return 0;\n      else\n         return _n <= maxN[_k];\n   } else {\n      return _k <= maxK[_n];\n   }\n}\n\nvoid compute_pulse_cache(CELTMode *m, int LM)\n{\n   int C;\n   int i;\n   int j;\n   int curr=0;\n   int nbEntries=0;\n   int entryN[100], entryK[100], entryI[100];\n   const opus_int16 *eBands = m->eBands;\n   PulseCache *cache = &m->cache;\n   opus_int16 *cindex;\n   unsigned char *bits;\n   unsigned char *cap;\n\n   cindex = (opus_int16 *)opus_alloc(sizeof(cache->index[0])*m->nbEBands*(LM+2));\n   cache->index = cindex;\n\n   /* Scan for all unique band sizes */\n   for (i=0;i<=LM+1;i++)\n   {\n      for (j=0;j<m->nbEBands;j++)\n      {\n         int k;\n         int N = (eBands[j+1]-eBands[j])<<i>>1;\n         cindex[i*m->nbEBands+j] = -1;\n         /* Find other bands that have the same size */\n         for (k=0;k<=i;k++)\n         {\n            int n;\n            for (n=0;n<m->nbEBands && (k!=i || n<j);n++)\n            {\n               if (N == (eBands[n+1]-eBands[n])<<k>>1)\n               {\n                  cindex[i*m->nbEBands+j] = cindex[k*m->nbEBands+n];\n                  break;\n               }\n            }\n         }\n         if (cache->index[i*m->nbEBands+j] == -1 && N!=0)\n         {\n            int K;\n            entryN[nbEntries] = N;\n            K = 0;\n            while (fits_in32(N,get_pulses(K+1)) && K<MAX_PSEUDO)\n               K++;\n            entryK[nbEntries] = K;\n            cindex[i*m->nbEBands+j] = curr;\n            entryI[nbEntries] = curr;\n\n            curr += K+1;\n            nbEntries++;\n         }\n      }\n   }\n   bits = (unsigned char *)opus_alloc(sizeof(unsigned char)*curr);\n   cache->bits = bits;\n   cache->size = curr;\n   /* Compute the cache for all unique sizes */\n   for (i=0;i<nbEntries;i++)\n   {\n      unsigned char *ptr = bits+entryI[i];\n      opus_int16 tmp[MAX_PULSES+1];\n      get_required_bits(tmp, entryN[i], get_pulses(entryK[i]), BITRES);\n      for (j=1;j<=entryK[i];j++)\n         ptr[j] = tmp[get_pulses(j)]-1;\n      ptr[0] = entryK[i];\n   }\n\n   /* Compute the maximum rate for each band at which we'll reliably use as\n       many bits as we ask for. */\n   cache->caps = cap = (unsigned char *)opus_alloc(sizeof(cache->caps[0])*(LM+1)*2*m->nbEBands);\n   for (i=0;i<=LM;i++)\n   {\n      for (C=1;C<=2;C++)\n      {\n         for (j=0;j<m->nbEBands;j++)\n         {\n            int N0;\n            int max_bits;\n            N0 = m->eBands[j+1]-m->eBands[j];\n            /* N=1 bands only have a sign bit and fine bits. */\n            if (N0<<i == 1)\n               max_bits = C*(1+MAX_FINE_BITS)<<BITRES;\n            else\n            {\n               const unsigned char *pcache;\n               opus_int32           num;\n               opus_int32           den;\n               int                  LM0;\n               int                  N;\n               int                  offset;\n               int                  ndof;\n               int                  qb;\n               int                  k;\n               LM0 = 0;\n               /* Even-sized bands bigger than N=2 can be split one more time.\n                  As of commit 44203907 all bands >1 are even, including custom modes.*/\n               if (N0 > 2)\n               {\n                  N0>>=1;\n                  LM0--;\n               }\n               /* N0=1 bands can't be split down to N<2. */\n               else if (N0 <= 1)\n               {\n                  LM0=IMIN(i,1);\n                  N0<<=LM0;\n               }\n               /* Compute the cost for the lowest-level PVQ of a fully split\n                   band. */\n               pcache = bits + cindex[(LM0+1)*m->nbEBands+j];\n               max_bits = pcache[pcache[0]]+1;\n               /* Add in the cost of coding regular splits. */\n               N = N0;\n               for(k=0;k<i-LM0;k++){\n                  max_bits <<= 1;\n                  /* Offset the number of qtheta bits by log2(N)/2\n                      + QTHETA_OFFSET compared to their \"fair share\" of\n                      total/N */\n                  offset = ((m->logN[j]+((LM0+k)<<BITRES))>>1)-QTHETA_OFFSET;\n                  /* The number of qtheta bits we'll allocate if the remainder\n                      is to be max_bits.\n                     The average measured cost for theta is 0.89701 times qb,\n                      approximated here as 459/512. */\n                  num=459*(opus_int32)((2*N-1)*offset+max_bits);\n                  den=((opus_int32)(2*N-1)<<9)-459;\n                  qb = IMIN((num+(den>>1))/den, 57);\n                  celt_assert(qb >= 0);\n                  max_bits += qb;\n                  N <<= 1;\n               }\n               /* Add in the cost of a stereo split, if necessary. */\n               if (C==2)\n               {\n                  max_bits <<= 1;\n                  offset = ((m->logN[j]+(i<<BITRES))>>1)-(N==2?QTHETA_OFFSET_TWOPHASE:QTHETA_OFFSET);\n                  ndof = 2*N-1-(N==2);\n                  /* The average measured cost for theta with the step PDF is\n                      0.95164 times qb, approximated here as 487/512. */\n                  num = (N==2?512:487)*(opus_int32)(max_bits+ndof*offset);\n                  den = ((opus_int32)ndof<<9)-(N==2?512:487);\n                  qb = IMIN((num+(den>>1))/den, (N==2?64:61));\n                  celt_assert(qb >= 0);\n                  max_bits += qb;\n               }\n               /* Add the fine bits we'll use. */\n               /* Compensate for the extra DoF in stereo */\n               ndof = C*N + ((C==2 && N>2) ? 1 : 0);\n               /* Offset the number of fine bits by log2(N)/2 + FINE_OFFSET\n                   compared to their \"fair share\" of total/N */\n               offset = ((m->logN[j] + (i<<BITRES))>>1)-FINE_OFFSET;\n               /* N=2 is the only point that doesn't match the curve */\n               if (N==2)\n                  offset += 1<<BITRES>>2;\n               /* The number of fine bits we'll allocate if the remainder is\n                   to be max_bits. */\n               num = max_bits+ndof*offset;\n               den = (ndof-1)<<BITRES;\n               qb = IMIN((num+(den>>1))/den, MAX_FINE_BITS);\n               celt_assert(qb >= 0);\n               max_bits += C*qb<<BITRES;\n            }\n            max_bits = (4*max_bits/(C*((m->eBands[j+1]-m->eBands[j])<<i)))-64;\n            celt_assert(max_bits >= 0);\n            celt_assert(max_bits < 256);\n            *cap++ = (unsigned char)max_bits;\n         }\n      }\n   }\n}\n\n#endif /* CUSTOM_MODES */\n\n#define ALLOC_STEPS 6\n\nstatic OPUS_INLINE int interp_bits2pulses(const CELTMode *m, int start, int end, int skip_start,\n      const int *bits1, const int *bits2, const int *thresh, const int *cap, opus_int32 total, opus_int32 *_balance,\n      int skip_rsv, int *intensity, int intensity_rsv, int *dual_stereo, int dual_stereo_rsv, int *bits,\n      int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev, int signalBandwidth)\n{\n   opus_int32 psum;\n   int lo, hi;\n   int i, j;\n   int logM;\n   int stereo;\n   int codedBands=-1;\n   int alloc_floor;\n   opus_int32 left, percoeff;\n   int done;\n   opus_int32 balance;\n   SAVE_STACK;\n\n   alloc_floor = C<<BITRES;\n   stereo = C>1;\n\n   logM = LM<<BITRES;\n   lo = 0;\n   hi = 1<<ALLOC_STEPS;\n   for (i=0;i<ALLOC_STEPS;i++)\n   {\n      int mid = (lo+hi)>>1;\n      psum = 0;\n      done = 0;\n      for (j=end;j-->start;)\n      {\n         int tmp = bits1[j] + (mid*(opus_int32)bits2[j]>>ALLOC_STEPS);\n         if (tmp >= thresh[j] || done)\n         {\n            done = 1;\n            /* Don't allocate more than we can actually use */\n            psum += IMIN(tmp, cap[j]);\n         } else {\n            if (tmp >= alloc_floor)\n               psum += alloc_floor;\n         }\n      }\n      if (psum > total)\n         hi = mid;\n      else\n         lo = mid;\n   }\n   psum = 0;\n   /*printf (\"interp bisection gave %d\\n\", lo);*/\n   done = 0;\n   for (j=end;j-->start;)\n   {\n      int tmp = bits1[j] + (lo*bits2[j]>>ALLOC_STEPS);\n      if (tmp < thresh[j] && !done)\n      {\n         if (tmp >= alloc_floor)\n            tmp = alloc_floor;\n         else\n            tmp = 0;\n      } else\n         done = 1;\n      /* Don't allocate more than we can actually use */\n      tmp = IMIN(tmp, cap[j]);\n      bits[j] = tmp;\n      psum += tmp;\n   }\n\n   /* Decide which bands to skip, working backwards from the end. */\n   for (codedBands=end;;codedBands--)\n   {\n      int band_width;\n      int band_bits;\n      int rem;\n      j = codedBands-1;\n      /* Never skip the first band, nor a band that has been boosted by\n          dynalloc.\n         In the first case, we'd be coding a bit to signal we're going to waste\n          all the other bits.\n         In the second case, we'd be coding a bit to redistribute all the bits\n          we just signaled should be cocentrated in this band. */\n      if (j<=skip_start)\n      {\n         /* Give the bit we reserved to end skipping back. */\n         total += skip_rsv;\n         break;\n      }\n      /*Figure out how many left-over bits we would be adding to this band.\n        This can include bits we've stolen back from higher, skipped bands.*/\n      left = total-psum;\n      percoeff = left/(m->eBands[codedBands]-m->eBands[start]);\n      left -= (m->eBands[codedBands]-m->eBands[start])*percoeff;\n      rem = IMAX(left-(m->eBands[j]-m->eBands[start]),0);\n      band_width = m->eBands[codedBands]-m->eBands[j];\n      band_bits = (int)(bits[j] + percoeff*band_width + rem);\n      /*Only code a skip decision if we're above the threshold for this band.\n        Otherwise it is force-skipped.\n        This ensures that we have enough bits to code the skip flag.*/\n      if (band_bits >= IMAX(thresh[j], alloc_floor+(1<<BITRES)))\n      {\n         if (encode)\n         {\n            /*This if() block is the only part of the allocation function that\n               is not a mandatory part of the bitstream: any bands we choose to\n               skip here must be explicitly signaled.*/\n            /*Choose a threshold with some hysteresis to keep bands from\n               fluctuating in and out.*/\n#ifdef FUZZING\n            if ((rand()&0x1) == 0)\n#else\n            if (codedBands<=start+2 || (band_bits > ((j<prev?7:9)*band_width<<LM<<BITRES)>>4 && j<=signalBandwidth))\n#endif\n            {\n               ec_enc_bit_logp(ec, 1, 1);\n               break;\n            }\n            ec_enc_bit_logp(ec, 0, 1);\n         } else if (ec_dec_bit_logp(ec, 1)) {\n            break;\n         }\n         /*We used a bit to skip this band.*/\n         psum += 1<<BITRES;\n         band_bits -= 1<<BITRES;\n      }\n      /*Reclaim the bits originally allocated to this band.*/\n      psum -= bits[j]+intensity_rsv;\n      if (intensity_rsv > 0)\n         intensity_rsv = LOG2_FRAC_TABLE[j-start];\n      psum += intensity_rsv;\n      if (band_bits >= alloc_floor)\n      {\n         /*If we have enough for a fine energy bit per channel, use it.*/\n         psum += alloc_floor;\n         bits[j] = alloc_floor;\n      } else {\n         /*Otherwise this band gets nothing at all.*/\n         bits[j] = 0;\n      }\n   }\n\n   celt_assert(codedBands > start);\n   /* Code the intensity and dual stereo parameters. */\n   if (intensity_rsv > 0)\n   {\n      if (encode)\n      {\n         *intensity = IMIN(*intensity, codedBands);\n         ec_enc_uint(ec, *intensity-start, codedBands+1-start);\n      }\n      else\n         *intensity = start+ec_dec_uint(ec, codedBands+1-start);\n   }\n   else\n      *intensity = 0;\n   if (*intensity <= start)\n   {\n      total += dual_stereo_rsv;\n      dual_stereo_rsv = 0;\n   }\n   if (dual_stereo_rsv > 0)\n   {\n      if (encode)\n         ec_enc_bit_logp(ec, *dual_stereo, 1);\n      else\n         *dual_stereo = ec_dec_bit_logp(ec, 1);\n   }\n   else\n      *dual_stereo = 0;\n\n   /* Allocate the remaining bits */\n   left = total-psum;\n   percoeff = left/(m->eBands[codedBands]-m->eBands[start]);\n   left -= (m->eBands[codedBands]-m->eBands[start])*percoeff;\n   for (j=start;j<codedBands;j++)\n      bits[j] += ((int)percoeff*(m->eBands[j+1]-m->eBands[j]));\n   for (j=start;j<codedBands;j++)\n   {\n      int tmp = (int)IMIN(left, m->eBands[j+1]-m->eBands[j]);\n      bits[j] += tmp;\n      left -= tmp;\n   }\n   /*for (j=0;j<end;j++)printf(\"%d \", bits[j]);printf(\"\\n\");*/\n\n   balance = 0;\n   for (j=start;j<codedBands;j++)\n   {\n      int N0, N, den;\n      int offset;\n      int NClogN;\n      opus_int32 excess, bit;\n\n      celt_assert(bits[j] >= 0);\n      N0 = m->eBands[j+1]-m->eBands[j];\n      N=N0<<LM;\n      bit = (opus_int32)bits[j]+balance;\n\n      if (N>1)\n      {\n         excess = MAX32(bit-cap[j],0);\n         bits[j] = bit-excess;\n\n         /* Compensate for the extra DoF in stereo */\n         den=(C*N+ ((C==2 && N>2 && !*dual_stereo && j<*intensity) ? 1 : 0));\n\n         NClogN = den*(m->logN[j] + logM);\n\n         /* Offset for the number of fine bits by log2(N)/2 + FINE_OFFSET\n            compared to their \"fair share\" of total/N */\n         offset = (NClogN>>1)-den*FINE_OFFSET;\n\n         /* N=2 is the only point that doesn't match the curve */\n         if (N==2)\n            offset += den<<BITRES>>2;\n\n         /* Changing the offset for allocating the second and third\n             fine energy bit */\n         if (bits[j] + offset < den*2<<BITRES)\n            offset += NClogN>>2;\n         else if (bits[j] + offset < den*3<<BITRES)\n            offset += NClogN>>3;\n\n         /* Divide with rounding */\n         ebits[j] = IMAX(0, (bits[j] + offset + (den<<(BITRES-1))) / (den<<BITRES));\n\n         /* Make sure not to bust */\n         if (C*ebits[j] > (bits[j]>>BITRES))\n            ebits[j] = bits[j] >> stereo >> BITRES;\n\n         /* More than that is useless because that's about as far as PVQ can go */\n         ebits[j] = IMIN(ebits[j], MAX_FINE_BITS);\n\n         /* If we rounded down or capped this band, make it a candidate for the\n             final fine energy pass */\n         fine_priority[j] = ebits[j]*(den<<BITRES) >= bits[j]+offset;\n\n         /* Remove the allocated fine bits; the rest are assigned to PVQ */\n         bits[j] -= C*ebits[j]<<BITRES;\n\n      } else {\n         /* For N=1, all bits go to fine energy except for a single sign bit */\n         excess = MAX32(0,bit-(C<<BITRES));\n         bits[j] = bit-excess;\n         ebits[j] = 0;\n         fine_priority[j] = 1;\n      }\n\n      /* Fine energy can't take advantage of the re-balancing in\n          quant_all_bands().\n         Instead, do the re-balancing here.*/\n      if(excess > 0)\n      {\n         int extra_fine;\n         int extra_bits;\n         extra_fine = IMIN(excess>>(stereo+BITRES),MAX_FINE_BITS-ebits[j]);\n         ebits[j] += extra_fine;\n         extra_bits = extra_fine*C<<BITRES;\n         fine_priority[j] = extra_bits >= excess-balance;\n         excess -= extra_bits;\n      }\n      balance = excess;\n\n      celt_assert(bits[j] >= 0);\n      celt_assert(ebits[j] >= 0);\n   }\n   /* Save any remaining bits over the cap for the rebalancing in\n       quant_all_bands(). */\n   *_balance = balance;\n\n   /* The skipped bands use all their bits for fine energy. */\n   for (;j<end;j++)\n   {\n      ebits[j] = bits[j] >> stereo >> BITRES;\n      celt_assert(C*ebits[j]<<BITRES == bits[j]);\n      bits[j] = 0;\n      fine_priority[j] = ebits[j]<1;\n   }\n   RESTORE_STACK;\n   return codedBands;\n}\n\nint compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stereo,\n      opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev, int signalBandwidth)\n{\n   int lo, hi, len, j;\n   int codedBands;\n   int skip_start;\n   int skip_rsv;\n   int intensity_rsv;\n   int dual_stereo_rsv;\n   VARDECL(int, bits1);\n   VARDECL(int, bits2);\n   VARDECL(int, thresh);\n   VARDECL(int, trim_offset);\n   SAVE_STACK;\n\n   total = IMAX(total, 0);\n   len = m->nbEBands;\n   skip_start = start;\n   /* Reserve a bit to signal the end of manually skipped bands. */\n   skip_rsv = total >= 1<<BITRES ? 1<<BITRES : 0;\n   total -= skip_rsv;\n   /* Reserve bits for the intensity and dual stereo parameters. */\n   intensity_rsv = dual_stereo_rsv = 0;\n   if (C==2)\n   {\n      intensity_rsv = LOG2_FRAC_TABLE[end-start];\n      if (intensity_rsv>total)\n         intensity_rsv = 0;\n      else\n      {\n         total -= intensity_rsv;\n         dual_stereo_rsv = total>=1<<BITRES ? 1<<BITRES : 0;\n         total -= dual_stereo_rsv;\n      }\n   }\n   ALLOC(bits1, len, int);\n   ALLOC(bits2, len, int);\n   ALLOC(thresh, len, int);\n   ALLOC(trim_offset, len, int);\n\n   for (j=start;j<end;j++)\n   {\n      /* Below this threshold, we're sure not to allocate any PVQ bits */\n      thresh[j] = IMAX((C)<<BITRES, (3*(m->eBands[j+1]-m->eBands[j])<<LM<<BITRES)>>4);\n      /* Tilt of the allocation curve */\n      trim_offset[j] = C*(m->eBands[j+1]-m->eBands[j])*(alloc_trim-5-LM)*(end-j-1)\n            *(1<<(LM+BITRES))>>6;\n      /* Giving less resolution to single-coefficient bands because they get\n         more benefit from having one coarse value per coefficient*/\n      if ((m->eBands[j+1]-m->eBands[j])<<LM==1)\n         trim_offset[j] -= C<<BITRES;\n   }\n   lo = 1;\n   hi = m->nbAllocVectors - 1;\n   do\n   {\n      int done = 0;\n      int psum = 0;\n      int mid = (lo+hi) >> 1;\n      for (j=end;j-->start;)\n      {\n         int bitsj;\n         int N = m->eBands[j+1]-m->eBands[j];\n         bitsj = C*N*m->allocVectors[mid*len+j]<<LM>>2;\n         if (bitsj > 0)\n            bitsj = IMAX(0, bitsj + trim_offset[j]);\n         bitsj += offsets[j];\n         if (bitsj >= thresh[j] || done)\n         {\n            done = 1;\n            /* Don't allocate more than we can actually use */\n            psum += IMIN(bitsj, cap[j]);\n         } else {\n            if (bitsj >= C<<BITRES)\n               psum += C<<BITRES;\n         }\n      }\n      if (psum > total)\n         hi = mid - 1;\n      else\n         lo = mid + 1;\n      /*printf (\"lo = %d, hi = %d\\n\", lo, hi);*/\n   }\n   while (lo <= hi);\n   hi = lo--;\n   /*printf (\"interp between %d and %d\\n\", lo, hi);*/\n   for (j=start;j<end;j++)\n   {\n      int bits1j, bits2j;\n      int N = m->eBands[j+1]-m->eBands[j];\n      bits1j = C*N*m->allocVectors[lo*len+j]<<LM>>2;\n      bits2j = hi>=m->nbAllocVectors ?\n            cap[j] : C*N*m->allocVectors[hi*len+j]<<LM>>2;\n      if (bits1j > 0)\n         bits1j = IMAX(0, bits1j + trim_offset[j]);\n      if (bits2j > 0)\n         bits2j = IMAX(0, bits2j + trim_offset[j]);\n      if (lo > 0)\n         bits1j += offsets[j];\n      bits2j += offsets[j];\n      if (offsets[j]>0)\n         skip_start = j;\n      bits2j = IMAX(0,bits2j-bits1j);\n      bits1[j] = bits1j;\n      bits2[j] = bits2j;\n   }\n   codedBands = interp_bits2pulses(m, start, end, skip_start, bits1, bits2, thresh, cap,\n         total, balance, skip_rsv, intensity, intensity_rsv, dual_stereo, dual_stereo_rsv,\n         pulses, ebits, fine_priority, C, LM, ec, encode, prev, signalBandwidth);\n   RESTORE_STACK;\n   return codedBands;\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/rate.h",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef RATE_H\n#define RATE_H\n\n#define MAX_PSEUDO 40\n#define LOG_MAX_PSEUDO 6\n\n#define MAX_PULSES 128\n\n#define MAX_FINE_BITS 8\n\n#define FINE_OFFSET 21\n#define QTHETA_OFFSET 4\n#define QTHETA_OFFSET_TWOPHASE 16\n\n#include \"cwrs.h\"\n#include \"modes.h\"\n\nvoid compute_pulse_cache(CELTMode *m, int LM);\n\nstatic OPUS_INLINE int get_pulses(int i)\n{\n   return i<8 ? i : (8 + (i&7)) << ((i>>3)-1);\n}\n\nstatic OPUS_INLINE int bits2pulses(const CELTMode *m, int band, int LM, int bits)\n{\n   int i;\n   int lo, hi;\n   const unsigned char *cache;\n\n   LM++;\n   cache = m->cache.bits + m->cache.index[LM*m->nbEBands+band];\n\n   lo = 0;\n   hi = cache[0];\n   bits--;\n   for (i=0;i<LOG_MAX_PSEUDO;i++)\n   {\n      int mid = (lo+hi+1)>>1;\n      /* OPT: Make sure this is implemented with a conditional move */\n      if ((int)cache[mid] >= bits)\n         hi = mid;\n      else\n         lo = mid;\n   }\n   if (bits- (lo == 0 ? -1 : (int)cache[lo]) <= (int)cache[hi]-bits)\n      return lo;\n   else\n      return hi;\n}\n\nstatic OPUS_INLINE int pulses2bits(const CELTMode *m, int band, int LM, int pulses)\n{\n   const unsigned char *cache;\n\n   LM++;\n   cache = m->cache.bits + m->cache.index[LM*m->nbEBands+band];\n   return pulses == 0 ? 0 : cache[pulses]+1;\n}\n\n/** Compute the pulse allocation, i.e. how many pulses will go in each\n  * band.\n @param m mode\n @param offsets Requested increase or decrease in the number of bits for\n                each band\n @param total Number of bands\n @param pulses Number of pulses per band (returned)\n @return Total number of bits allocated\n*/\nint compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stero,\n      opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev, int signalBandwidth);\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/stack_alloc.h",
    "content": "/* Copyright (C) 2002-2003 Jean-Marc Valin\n   Copyright (C) 2007-2009 Xiph.Org Foundation */\n/**\n   @file stack_alloc.h\n   @brief Temporary memory allocation on stack\n*/\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef STACK_ALLOC_H\n#define STACK_ALLOC_H\n\n#include \"opus_types.h\"\n#include \"opus_defines.h\"\n\n#if (!defined (VAR_ARRAYS) && !defined (USE_ALLOCA) && !defined (NONTHREADSAFE_PSEUDOSTACK))\n#error \"Opus requires one of VAR_ARRAYS, USE_ALLOCA, or NONTHREADSAFE_PSEUDOSTACK be defined to select the temporary allocation mode.\"\n#endif\n\n#ifdef USE_ALLOCA\n# ifdef WIN32\n#  include <malloc.h>\n# else\n#  ifdef HAVE_ALLOCA_H\n#   include <alloca.h>\n#  else\n#   include <stdlib.h>\n#  endif\n# endif\n#endif\n\n/**\n * @def ALIGN(stack, size)\n *\n * Aligns the stack to a 'size' boundary\n *\n * @param stack Stack\n * @param size  New size boundary\n */\n\n/**\n * @def PUSH(stack, size, type)\n *\n * Allocates 'size' elements of type 'type' on the stack\n *\n * @param stack Stack\n * @param size  Number of elements\n * @param type  Type of element\n */\n\n/**\n * @def VARDECL(var)\n *\n * Declare variable on stack\n *\n * @param var Variable to declare\n */\n\n/**\n * @def ALLOC(var, size, type)\n *\n * Allocate 'size' elements of 'type' on stack\n *\n * @param var  Name of variable to allocate\n * @param size Number of elements\n * @param type Type of element\n */\n\n#if defined(VAR_ARRAYS)\n\n#define VARDECL(type, var)\n#define ALLOC(var, size, type) type var[size]\n#define SAVE_STACK\n#define RESTORE_STACK\n#define ALLOC_STACK\n/* C99 does not allow VLAs of size zero */\n#define ALLOC_NONE 1\n\n#elif defined(USE_ALLOCA)\n\n#define VARDECL(type, var) type *var\n\n//# ifdef WIN32\n#  define ALLOC(var, size, type) var = ((type*)_alloca(sizeof(type)*(size)))\n//# else\n//#  define ALLOC(var, size, type) var = ((type*)alloca(sizeof(type)*(size)))\n//# endif\n\n#define SAVE_STACK\n#define RESTORE_STACK\n#define ALLOC_STACK\n#define ALLOC_NONE 0\n\n#else\n\n#ifdef CELT_C\nchar *global_stack=0;\n#else\nextern char *global_stack;\n#endif /* CELT_C */\n\n#ifdef ENABLE_VALGRIND\n\n#include <valgrind/memcheck.h>\n\n#ifdef CELT_C\nchar *global_stack_top=0;\n#else\nextern char *global_stack_top;\n#endif /* CELT_C */\n\n#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))\n#define PUSH(stack, size, type) (VALGRIND_MAKE_MEM_NOACCESS(stack, global_stack_top-stack),ALIGN((stack),sizeof(type)/sizeof(char)),VALGRIND_MAKE_MEM_UNDEFINED(stack, ((size)*sizeof(type)/sizeof(char))),(stack)+=(2*(size)*sizeof(type)/sizeof(char)),(type*)((stack)-(2*(size)*sizeof(type)/sizeof(char))))\n#define RESTORE_STACK ((global_stack = _saved_stack),VALGRIND_MAKE_MEM_NOACCESS(global_stack, global_stack_top-global_stack))\n#define ALLOC_STACK char *_saved_stack; ((global_stack = (global_stack==0) ? ((global_stack_top=opus_alloc_scratch(GLOBAL_STACK_SIZE*2)+(GLOBAL_STACK_SIZE*2))-(GLOBAL_STACK_SIZE*2)) : global_stack),VALGRIND_MAKE_MEM_NOACCESS(global_stack, global_stack_top-global_stack)); _saved_stack = global_stack;\n\n#else\n\n#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))\n#define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)/sizeof(char)),(stack)+=(size)*(sizeof(type)/sizeof(char)),(type*)((stack)-(size)*(sizeof(type)/sizeof(char))))\n#define RESTORE_STACK (global_stack = _saved_stack)\n#define ALLOC_STACK char *_saved_stack; (global_stack = (global_stack==0) ? opus_alloc_scratch(GLOBAL_STACK_SIZE) : global_stack); _saved_stack = global_stack;\n\n#endif /* ENABLE_VALGRIND */\n\n#include \"os_support.h\"\n#define VARDECL(type, var) type *var\n#define ALLOC(var, size, type) var = PUSH(global_stack, size, type)\n#define SAVE_STACK char *_saved_stack = global_stack;\n#define ALLOC_NONE 0\n\n#endif /* VAR_ARRAYS */\n\n\n#ifdef ENABLE_VALGRIND\n\n#include <valgrind/memcheck.h>\n#define OPUS_CHECK_ARRAY(ptr, len) VALGRIND_CHECK_MEM_IS_DEFINED(ptr, len*sizeof(*ptr))\n#define OPUS_CHECK_VALUE(value) VALGRIND_CHECK_VALUE_IS_DEFINED(value)\n#define OPUS_CHECK_ARRAY_COND(ptr, len) VALGRIND_CHECK_MEM_IS_DEFINED(ptr, len*sizeof(*ptr))\n#define OPUS_CHECK_VALUE_COND(value) VALGRIND_CHECK_VALUE_IS_DEFINED(value)\n#define OPUS_PRINT_INT(value) do {fprintf(stderr, #value \" = %d at %s:%d\\n\", value, __FILE__, __LINE__);}while(0)\n#define OPUS_FPRINTF fprintf\n\n#else\n\nstatic OPUS_INLINE int _opus_false(void) {return 0;}\n#define OPUS_CHECK_ARRAY(ptr, len) _opus_false()\n#define OPUS_CHECK_VALUE(value) _opus_false()\n#define OPUS_PRINT_INT(value) do{}while(0)\n#define OPUS_FPRINTF (void)\n\n#endif\n\n\n#endif /* STACK_ALLOC_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/static_modes_fixed.h",
    "content": "/* The contents of this file was automatically generated by dump_modes.c\n   with arguments: 48000 960\n   It contains static definitions for some pre-defined modes. */\n#include \"modes.h\"\n#include \"rate.h\"\n\n#ifndef DEF_WINDOW120\n#define DEF_WINDOW120\nstatic const opus_val16 window120[120] = {\n2, 20, 55, 108, 178,\n266, 372, 494, 635, 792,\n966, 1157, 1365, 1590, 1831,\n2089, 2362, 2651, 2956, 3276,\n3611, 3961, 4325, 4703, 5094,\n5499, 5916, 6346, 6788, 7241,\n7705, 8179, 8663, 9156, 9657,\n10167, 10684, 11207, 11736, 12271,\n12810, 13353, 13899, 14447, 14997,\n15547, 16098, 16648, 17197, 17744,\n18287, 18827, 19363, 19893, 20418,\n20936, 21447, 21950, 22445, 22931,\n23407, 23874, 24330, 24774, 25208,\n25629, 26039, 26435, 26819, 27190,\n27548, 27893, 28224, 28541, 28845,\n29135, 29411, 29674, 29924, 30160,\n30384, 30594, 30792, 30977, 31151,\n31313, 31463, 31602, 31731, 31849,\n31958, 32057, 32148, 32229, 32303,\n32370, 32429, 32481, 32528, 32568,\n32604, 32634, 32661, 32683, 32701,\n32717, 32729, 32740, 32748, 32754,\n32758, 32762, 32764, 32766, 32767,\n32767, 32767, 32767, 32767, 32767,\n};\n#endif\n\n#ifndef DEF_LOGN400\n#define DEF_LOGN400\nstatic const opus_int16 logN400[21] = {\n0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 16, 16, 16, 21, 21, 24, 29, 34, 36, };\n#endif\n\n#ifndef DEF_PULSE_CACHE50\n#define DEF_PULSE_CACHE50\nstatic const opus_int16 cache_index50[105] = {\n-1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 41, 41, 41,\n82, 82, 123, 164, 200, 222, 0, 0, 0, 0, 0, 0, 0, 0, 41,\n41, 41, 41, 123, 123, 123, 164, 164, 240, 266, 283, 295, 41, 41, 41,\n41, 41, 41, 41, 41, 123, 123, 123, 123, 240, 240, 240, 266, 266, 305,\n318, 328, 336, 123, 123, 123, 123, 123, 123, 123, 123, 240, 240, 240, 240,\n305, 305, 305, 318, 318, 343, 351, 358, 364, 240, 240, 240, 240, 240, 240,\n240, 240, 305, 305, 305, 305, 343, 343, 343, 351, 351, 370, 376, 382, 387,\n};\nstatic const unsigned char cache_bits50[392] = {\n40, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,\n7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,\n7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 40, 15, 23, 28,\n31, 34, 36, 38, 39, 41, 42, 43, 44, 45, 46, 47, 47, 49, 50,\n51, 52, 53, 54, 55, 55, 57, 58, 59, 60, 61, 62, 63, 63, 65,\n66, 67, 68, 69, 70, 71, 71, 40, 20, 33, 41, 48, 53, 57, 61,\n64, 66, 69, 71, 73, 75, 76, 78, 80, 82, 85, 87, 89, 91, 92,\n94, 96, 98, 101, 103, 105, 107, 108, 110, 112, 114, 117, 119, 121, 123,\n124, 126, 128, 40, 23, 39, 51, 60, 67, 73, 79, 83, 87, 91, 94,\n97, 100, 102, 105, 107, 111, 115, 118, 121, 124, 126, 129, 131, 135, 139,\n142, 145, 148, 150, 153, 155, 159, 163, 166, 169, 172, 174, 177, 179, 35,\n28, 49, 65, 78, 89, 99, 107, 114, 120, 126, 132, 136, 141, 145, 149,\n153, 159, 165, 171, 176, 180, 185, 189, 192, 199, 205, 211, 216, 220, 225,\n229, 232, 239, 245, 251, 21, 33, 58, 79, 97, 112, 125, 137, 148, 157,\n166, 174, 182, 189, 195, 201, 207, 217, 227, 235, 243, 251, 17, 35, 63,\n86, 106, 123, 139, 152, 165, 177, 187, 197, 206, 214, 222, 230, 237, 250,\n25, 31, 55, 75, 91, 105, 117, 128, 138, 146, 154, 161, 168, 174, 180,\n185, 190, 200, 208, 215, 222, 229, 235, 240, 245, 255, 16, 36, 65, 89,\n110, 128, 144, 159, 173, 185, 196, 207, 217, 226, 234, 242, 250, 11, 41,\n74, 103, 128, 151, 172, 191, 209, 225, 241, 255, 9, 43, 79, 110, 138,\n163, 186, 207, 227, 246, 12, 39, 71, 99, 123, 144, 164, 182, 198, 214,\n228, 241, 253, 9, 44, 81, 113, 142, 168, 192, 214, 235, 255, 7, 49,\n90, 127, 160, 191, 220, 247, 6, 51, 95, 134, 170, 203, 234, 7, 47,\n87, 123, 155, 184, 212, 237, 6, 52, 97, 137, 174, 208, 240, 5, 57,\n106, 151, 192, 231, 5, 59, 111, 158, 202, 243, 5, 55, 103, 147, 187,\n224, 5, 60, 113, 161, 206, 248, 4, 65, 122, 175, 224, 4, 67, 127,\n182, 234, };\nstatic const unsigned char cache_caps50[168] = {\n224, 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 185, 185, 185,\n178, 178, 168, 134, 61, 37, 224, 224, 224, 224, 224, 224, 224, 224, 240,\n240, 240, 240, 207, 207, 207, 198, 198, 183, 144, 66, 40, 160, 160, 160,\n160, 160, 160, 160, 160, 185, 185, 185, 185, 193, 193, 193, 183, 183, 172,\n138, 64, 38, 240, 240, 240, 240, 240, 240, 240, 240, 207, 207, 207, 207,\n204, 204, 204, 193, 193, 180, 143, 66, 40, 185, 185, 185, 185, 185, 185,\n185, 185, 193, 193, 193, 193, 193, 193, 193, 183, 183, 172, 138, 65, 39,\n207, 207, 207, 207, 207, 207, 207, 207, 204, 204, 204, 204, 201, 201, 201,\n188, 188, 176, 141, 66, 40, 193, 193, 193, 193, 193, 193, 193, 193, 193,\n193, 193, 193, 194, 194, 194, 184, 184, 173, 139, 65, 39, 204, 204, 204,\n204, 204, 204, 204, 204, 201, 201, 201, 201, 198, 198, 198, 187, 187, 175,\n140, 66, 40, };\n#endif\n\n#ifndef FFT_TWIDDLES48000_960\n#define FFT_TWIDDLES48000_960\nstatic const kiss_twiddle_cpx fft_twiddles48000_960[480] = {\n{32767, 0}, {32766, -429},\n{32757, -858}, {32743, -1287},\n{32724, -1715}, {32698, -2143},\n{32667, -2570}, {32631, -2998},\n{32588, -3425}, {32541, -3851},\n{32488, -4277}, {32429, -4701},\n{32364, -5125}, {32295, -5548},\n{32219, -5971}, {32138, -6393},\n{32051, -6813}, {31960, -7231},\n{31863, -7650}, {31760, -8067},\n{31652, -8481}, {31539, -8895},\n{31419, -9306}, {31294, -9716},\n{31165, -10126}, {31030, -10532},\n{30889, -10937}, {30743, -11340},\n{30592, -11741}, {30436, -12141},\n{30274, -12540}, {30107, -12935},\n{29936, -13328}, {29758, -13718},\n{29577, -14107}, {29390, -14493},\n{29197, -14875}, {29000, -15257},\n{28797, -15635}, {28590, -16010},\n{28379, -16384}, {28162, -16753},\n{27940, -17119}, {27714, -17484},\n{27482, -17845}, {27246, -18205},\n{27006, -18560}, {26760, -18911},\n{26510, -19260}, {26257, -19606},\n{25997, -19947}, {25734, -20286},\n{25466, -20621}, {25194, -20952},\n{24918, -21281}, {24637, -21605},\n{24353, -21926}, {24063, -22242},\n{23770, -22555}, {23473, -22865},\n{23171, -23171}, {22866, -23472},\n{22557, -23769}, {22244, -24063},\n{21927, -24352}, {21606, -24636},\n{21282, -24917}, {20954, -25194},\n{20622, -25465}, {20288, -25733},\n{19949, -25997}, {19607, -26255},\n{19261, -26509}, {18914, -26760},\n{18561, -27004}, {18205, -27246},\n{17846, -27481}, {17485, -27713},\n{17122, -27940}, {16755, -28162},\n{16385, -28378}, {16012, -28590},\n{15636, -28797}, {15258, -28999},\n{14878, -29197}, {14494, -29389},\n{14108, -29576}, {13720, -29757},\n{13329, -29934}, {12937, -30107},\n{12540, -30274}, {12142, -30435},\n{11744, -30592}, {11342, -30743},\n{10939, -30889}, {10534, -31030},\n{10127, -31164}, {9718, -31294},\n{9307, -31418}, {8895, -31537},\n{8482, -31652}, {8067, -31759},\n{7650, -31862}, {7233, -31960},\n{6815, -32051}, {6393, -32138},\n{5973, -32219}, {5549, -32294},\n{5127, -32364}, {4703, -32429},\n{4278, -32487}, {3852, -32541},\n{3426, -32588}, {2999, -32630},\n{2572, -32667}, {2144, -32698},\n{1716, -32724}, {1287, -32742},\n{860, -32757}, {430, -32766},\n{0, -32767}, {-429, -32766},\n{-858, -32757}, {-1287, -32743},\n{-1715, -32724}, {-2143, -32698},\n{-2570, -32667}, {-2998, -32631},\n{-3425, -32588}, {-3851, -32541},\n{-4277, -32488}, {-4701, -32429},\n{-5125, -32364}, {-5548, -32295},\n{-5971, -32219}, {-6393, -32138},\n{-6813, -32051}, {-7231, -31960},\n{-7650, -31863}, {-8067, -31760},\n{-8481, -31652}, {-8895, -31539},\n{-9306, -31419}, {-9716, -31294},\n{-10126, -31165}, {-10532, -31030},\n{-10937, -30889}, {-11340, -30743},\n{-11741, -30592}, {-12141, -30436},\n{-12540, -30274}, {-12935, -30107},\n{-13328, -29936}, {-13718, -29758},\n{-14107, -29577}, {-14493, -29390},\n{-14875, -29197}, {-15257, -29000},\n{-15635, -28797}, {-16010, -28590},\n{-16384, -28379}, {-16753, -28162},\n{-17119, -27940}, {-17484, -27714},\n{-17845, -27482}, {-18205, -27246},\n{-18560, -27006}, {-18911, -26760},\n{-19260, -26510}, {-19606, -26257},\n{-19947, -25997}, {-20286, -25734},\n{-20621, -25466}, {-20952, -25194},\n{-21281, -24918}, {-21605, -24637},\n{-21926, -24353}, {-22242, -24063},\n{-22555, -23770}, {-22865, -23473},\n{-23171, -23171}, {-23472, -22866},\n{-23769, -22557}, {-24063, -22244},\n{-24352, -21927}, {-24636, -21606},\n{-24917, -21282}, {-25194, -20954},\n{-25465, -20622}, {-25733, -20288},\n{-25997, -19949}, {-26255, -19607},\n{-26509, -19261}, {-26760, -18914},\n{-27004, -18561}, {-27246, -18205},\n{-27481, -17846}, {-27713, -17485},\n{-27940, -17122}, {-28162, -16755},\n{-28378, -16385}, {-28590, -16012},\n{-28797, -15636}, {-28999, -15258},\n{-29197, -14878}, {-29389, -14494},\n{-29576, -14108}, {-29757, -13720},\n{-29934, -13329}, {-30107, -12937},\n{-30274, -12540}, {-30435, -12142},\n{-30592, -11744}, {-30743, -11342},\n{-30889, -10939}, {-31030, -10534},\n{-31164, -10127}, {-31294, -9718},\n{-31418, -9307}, {-31537, -8895},\n{-31652, -8482}, {-31759, -8067},\n{-31862, -7650}, {-31960, -7233},\n{-32051, -6815}, {-32138, -6393},\n{-32219, -5973}, {-32294, -5549},\n{-32364, -5127}, {-32429, -4703},\n{-32487, -4278}, {-32541, -3852},\n{-32588, -3426}, {-32630, -2999},\n{-32667, -2572}, {-32698, -2144},\n{-32724, -1716}, {-32742, -1287},\n{-32757, -860}, {-32766, -430},\n{-32767, 0}, {-32766, 429},\n{-32757, 858}, {-32743, 1287},\n{-32724, 1715}, {-32698, 2143},\n{-32667, 2570}, {-32631, 2998},\n{-32588, 3425}, {-32541, 3851},\n{-32488, 4277}, {-32429, 4701},\n{-32364, 5125}, {-32295, 5548},\n{-32219, 5971}, {-32138, 6393},\n{-32051, 6813}, {-31960, 7231},\n{-31863, 7650}, {-31760, 8067},\n{-31652, 8481}, {-31539, 8895},\n{-31419, 9306}, {-31294, 9716},\n{-31165, 10126}, {-31030, 10532},\n{-30889, 10937}, {-30743, 11340},\n{-30592, 11741}, {-30436, 12141},\n{-30274, 12540}, {-30107, 12935},\n{-29936, 13328}, {-29758, 13718},\n{-29577, 14107}, {-29390, 14493},\n{-29197, 14875}, {-29000, 15257},\n{-28797, 15635}, {-28590, 16010},\n{-28379, 16384}, {-28162, 16753},\n{-27940, 17119}, {-27714, 17484},\n{-27482, 17845}, {-27246, 18205},\n{-27006, 18560}, {-26760, 18911},\n{-26510, 19260}, {-26257, 19606},\n{-25997, 19947}, {-25734, 20286},\n{-25466, 20621}, {-25194, 20952},\n{-24918, 21281}, {-24637, 21605},\n{-24353, 21926}, {-24063, 22242},\n{-23770, 22555}, {-23473, 22865},\n{-23171, 23171}, {-22866, 23472},\n{-22557, 23769}, {-22244, 24063},\n{-21927, 24352}, {-21606, 24636},\n{-21282, 24917}, {-20954, 25194},\n{-20622, 25465}, {-20288, 25733},\n{-19949, 25997}, {-19607, 26255},\n{-19261, 26509}, {-18914, 26760},\n{-18561, 27004}, {-18205, 27246},\n{-17846, 27481}, {-17485, 27713},\n{-17122, 27940}, {-16755, 28162},\n{-16385, 28378}, {-16012, 28590},\n{-15636, 28797}, {-15258, 28999},\n{-14878, 29197}, {-14494, 29389},\n{-14108, 29576}, {-13720, 29757},\n{-13329, 29934}, {-12937, 30107},\n{-12540, 30274}, {-12142, 30435},\n{-11744, 30592}, {-11342, 30743},\n{-10939, 30889}, {-10534, 31030},\n{-10127, 31164}, {-9718, 31294},\n{-9307, 31418}, {-8895, 31537},\n{-8482, 31652}, {-8067, 31759},\n{-7650, 31862}, {-7233, 31960},\n{-6815, 32051}, {-6393, 32138},\n{-5973, 32219}, {-5549, 32294},\n{-5127, 32364}, {-4703, 32429},\n{-4278, 32487}, {-3852, 32541},\n{-3426, 32588}, {-2999, 32630},\n{-2572, 32667}, {-2144, 32698},\n{-1716, 32724}, {-1287, 32742},\n{-860, 32757}, {-430, 32766},\n{0, 32767}, {429, 32766},\n{858, 32757}, {1287, 32743},\n{1715, 32724}, {2143, 32698},\n{2570, 32667}, {2998, 32631},\n{3425, 32588}, {3851, 32541},\n{4277, 32488}, {4701, 32429},\n{5125, 32364}, {5548, 32295},\n{5971, 32219}, {6393, 32138},\n{6813, 32051}, {7231, 31960},\n{7650, 31863}, {8067, 31760},\n{8481, 31652}, {8895, 31539},\n{9306, 31419}, {9716, 31294},\n{10126, 31165}, {10532, 31030},\n{10937, 30889}, {11340, 30743},\n{11741, 30592}, {12141, 30436},\n{12540, 30274}, {12935, 30107},\n{13328, 29936}, {13718, 29758},\n{14107, 29577}, {14493, 29390},\n{14875, 29197}, {15257, 29000},\n{15635, 28797}, {16010, 28590},\n{16384, 28379}, {16753, 28162},\n{17119, 27940}, {17484, 27714},\n{17845, 27482}, {18205, 27246},\n{18560, 27006}, {18911, 26760},\n{19260, 26510}, {19606, 26257},\n{19947, 25997}, {20286, 25734},\n{20621, 25466}, {20952, 25194},\n{21281, 24918}, {21605, 24637},\n{21926, 24353}, {22242, 24063},\n{22555, 23770}, {22865, 23473},\n{23171, 23171}, {23472, 22866},\n{23769, 22557}, {24063, 22244},\n{24352, 21927}, {24636, 21606},\n{24917, 21282}, {25194, 20954},\n{25465, 20622}, {25733, 20288},\n{25997, 19949}, {26255, 19607},\n{26509, 19261}, {26760, 18914},\n{27004, 18561}, {27246, 18205},\n{27481, 17846}, {27713, 17485},\n{27940, 17122}, {28162, 16755},\n{28378, 16385}, {28590, 16012},\n{28797, 15636}, {28999, 15258},\n{29197, 14878}, {29389, 14494},\n{29576, 14108}, {29757, 13720},\n{29934, 13329}, {30107, 12937},\n{30274, 12540}, {30435, 12142},\n{30592, 11744}, {30743, 11342},\n{30889, 10939}, {31030, 10534},\n{31164, 10127}, {31294, 9718},\n{31418, 9307}, {31537, 8895},\n{31652, 8482}, {31759, 8067},\n{31862, 7650}, {31960, 7233},\n{32051, 6815}, {32138, 6393},\n{32219, 5973}, {32294, 5549},\n{32364, 5127}, {32429, 4703},\n{32487, 4278}, {32541, 3852},\n{32588, 3426}, {32630, 2999},\n{32667, 2572}, {32698, 2144},\n{32724, 1716}, {32742, 1287},\n{32757, 860}, {32766, 430},\n};\n#ifndef FFT_BITREV480\n#define FFT_BITREV480\nstatic const opus_int16 fft_bitrev480[480] = {\n0, 120, 240, 360, 30, 150, 270, 390, 60, 180, 300, 420, 90, 210, 330,\n450, 15, 135, 255, 375, 45, 165, 285, 405, 75, 195, 315, 435, 105, 225,\n345, 465, 5, 125, 245, 365, 35, 155, 275, 395, 65, 185, 305, 425, 95,\n215, 335, 455, 20, 140, 260, 380, 50, 170, 290, 410, 80, 200, 320, 440,\n110, 230, 350, 470, 10, 130, 250, 370, 40, 160, 280, 400, 70, 190, 310,\n430, 100, 220, 340, 460, 25, 145, 265, 385, 55, 175, 295, 415, 85, 205,\n325, 445, 115, 235, 355, 475, 1, 121, 241, 361, 31, 151, 271, 391, 61,\n181, 301, 421, 91, 211, 331, 451, 16, 136, 256, 376, 46, 166, 286, 406,\n76, 196, 316, 436, 106, 226, 346, 466, 6, 126, 246, 366, 36, 156, 276,\n396, 66, 186, 306, 426, 96, 216, 336, 456, 21, 141, 261, 381, 51, 171,\n291, 411, 81, 201, 321, 441, 111, 231, 351, 471, 11, 131, 251, 371, 41,\n161, 281, 401, 71, 191, 311, 431, 101, 221, 341, 461, 26, 146, 266, 386,\n56, 176, 296, 416, 86, 206, 326, 446, 116, 236, 356, 476, 2, 122, 242,\n362, 32, 152, 272, 392, 62, 182, 302, 422, 92, 212, 332, 452, 17, 137,\n257, 377, 47, 167, 287, 407, 77, 197, 317, 437, 107, 227, 347, 467, 7,\n127, 247, 367, 37, 157, 277, 397, 67, 187, 307, 427, 97, 217, 337, 457,\n22, 142, 262, 382, 52, 172, 292, 412, 82, 202, 322, 442, 112, 232, 352,\n472, 12, 132, 252, 372, 42, 162, 282, 402, 72, 192, 312, 432, 102, 222,\n342, 462, 27, 147, 267, 387, 57, 177, 297, 417, 87, 207, 327, 447, 117,\n237, 357, 477, 3, 123, 243, 363, 33, 153, 273, 393, 63, 183, 303, 423,\n93, 213, 333, 453, 18, 138, 258, 378, 48, 168, 288, 408, 78, 198, 318,\n438, 108, 228, 348, 468, 8, 128, 248, 368, 38, 158, 278, 398, 68, 188,\n308, 428, 98, 218, 338, 458, 23, 143, 263, 383, 53, 173, 293, 413, 83,\n203, 323, 443, 113, 233, 353, 473, 13, 133, 253, 373, 43, 163, 283, 403,\n73, 193, 313, 433, 103, 223, 343, 463, 28, 148, 268, 388, 58, 178, 298,\n418, 88, 208, 328, 448, 118, 238, 358, 478, 4, 124, 244, 364, 34, 154,\n274, 394, 64, 184, 304, 424, 94, 214, 334, 454, 19, 139, 259, 379, 49,\n169, 289, 409, 79, 199, 319, 439, 109, 229, 349, 469, 9, 129, 249, 369,\n39, 159, 279, 399, 69, 189, 309, 429, 99, 219, 339, 459, 24, 144, 264,\n384, 54, 174, 294, 414, 84, 204, 324, 444, 114, 234, 354, 474, 14, 134,\n254, 374, 44, 164, 284, 404, 74, 194, 314, 434, 104, 224, 344, 464, 29,\n149, 269, 389, 59, 179, 299, 419, 89, 209, 329, 449, 119, 239, 359, 479,\n};\n#endif\n\n#ifndef FFT_BITREV240\n#define FFT_BITREV240\nstatic const opus_int16 fft_bitrev240[240] = {\n0, 60, 120, 180, 15, 75, 135, 195, 30, 90, 150, 210, 45, 105, 165,\n225, 5, 65, 125, 185, 20, 80, 140, 200, 35, 95, 155, 215, 50, 110,\n170, 230, 10, 70, 130, 190, 25, 85, 145, 205, 40, 100, 160, 220, 55,\n115, 175, 235, 1, 61, 121, 181, 16, 76, 136, 196, 31, 91, 151, 211,\n46, 106, 166, 226, 6, 66, 126, 186, 21, 81, 141, 201, 36, 96, 156,\n216, 51, 111, 171, 231, 11, 71, 131, 191, 26, 86, 146, 206, 41, 101,\n161, 221, 56, 116, 176, 236, 2, 62, 122, 182, 17, 77, 137, 197, 32,\n92, 152, 212, 47, 107, 167, 227, 7, 67, 127, 187, 22, 82, 142, 202,\n37, 97, 157, 217, 52, 112, 172, 232, 12, 72, 132, 192, 27, 87, 147,\n207, 42, 102, 162, 222, 57, 117, 177, 237, 3, 63, 123, 183, 18, 78,\n138, 198, 33, 93, 153, 213, 48, 108, 168, 228, 8, 68, 128, 188, 23,\n83, 143, 203, 38, 98, 158, 218, 53, 113, 173, 233, 13, 73, 133, 193,\n28, 88, 148, 208, 43, 103, 163, 223, 58, 118, 178, 238, 4, 64, 124,\n184, 19, 79, 139, 199, 34, 94, 154, 214, 49, 109, 169, 229, 9, 69,\n129, 189, 24, 84, 144, 204, 39, 99, 159, 219, 54, 114, 174, 234, 14,\n74, 134, 194, 29, 89, 149, 209, 44, 104, 164, 224, 59, 119, 179, 239,\n};\n#endif\n\n#ifndef FFT_BITREV120\n#define FFT_BITREV120\nstatic const opus_int16 fft_bitrev120[120] = {\n0, 30, 60, 90, 15, 45, 75, 105, 5, 35, 65, 95, 20, 50, 80,\n110, 10, 40, 70, 100, 25, 55, 85, 115, 1, 31, 61, 91, 16, 46,\n76, 106, 6, 36, 66, 96, 21, 51, 81, 111, 11, 41, 71, 101, 26,\n56, 86, 116, 2, 32, 62, 92, 17, 47, 77, 107, 7, 37, 67, 97,\n22, 52, 82, 112, 12, 42, 72, 102, 27, 57, 87, 117, 3, 33, 63,\n93, 18, 48, 78, 108, 8, 38, 68, 98, 23, 53, 83, 113, 13, 43,\n73, 103, 28, 58, 88, 118, 4, 34, 64, 94, 19, 49, 79, 109, 9,\n39, 69, 99, 24, 54, 84, 114, 14, 44, 74, 104, 29, 59, 89, 119,\n};\n#endif\n\n#ifndef FFT_BITREV60\n#define FFT_BITREV60\nstatic const opus_int16 fft_bitrev60[60] = {\n0, 15, 30, 45, 5, 20, 35, 50, 10, 25, 40, 55, 1, 16, 31,\n46, 6, 21, 36, 51, 11, 26, 41, 56, 2, 17, 32, 47, 7, 22,\n37, 52, 12, 27, 42, 57, 3, 18, 33, 48, 8, 23, 38, 53, 13,\n28, 43, 58, 4, 19, 34, 49, 9, 24, 39, 54, 14, 29, 44, 59,\n};\n#endif\n\n#ifndef FFT_STATE48000_960_0\n#define FFT_STATE48000_960_0\nstatic const kiss_fft_state fft_state48000_960_0 = {\n480,    /* nfft */\n-1,     /* shift */\n{4, 120, 4, 30, 2, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, }, /* factors */\nfft_bitrev480,  /* bitrev */\nfft_twiddles48000_960,  /* bitrev */\n};\n#endif\n\n#ifndef FFT_STATE48000_960_1\n#define FFT_STATE48000_960_1\nstatic const kiss_fft_state fft_state48000_960_1 = {\n240,    /* nfft */\n1,      /* shift */\n{4, 60, 4, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, },   /* factors */\nfft_bitrev240,  /* bitrev */\nfft_twiddles48000_960,  /* bitrev */\n};\n#endif\n\n#ifndef FFT_STATE48000_960_2\n#define FFT_STATE48000_960_2\nstatic const kiss_fft_state fft_state48000_960_2 = {\n120,    /* nfft */\n2,      /* shift */\n{4, 30, 2, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, },   /* factors */\nfft_bitrev120,  /* bitrev */\nfft_twiddles48000_960,  /* bitrev */\n};\n#endif\n\n#ifndef FFT_STATE48000_960_3\n#define FFT_STATE48000_960_3\nstatic const kiss_fft_state fft_state48000_960_3 = {\n60,     /* nfft */\n3,      /* shift */\n{4, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },    /* factors */\nfft_bitrev60,   /* bitrev */\nfft_twiddles48000_960,  /* bitrev */\n};\n#endif\n\n#endif\n\n#ifndef MDCT_TWIDDLES960\n#define MDCT_TWIDDLES960\nstatic const opus_val16 mdct_twiddles960[481] = {\n32767, 32767, 32767, 32767, 32766,\n32763, 32762, 32759, 32757, 32753,\n32751, 32747, 32743, 32738, 32733,\n32729, 32724, 32717, 32711, 32705,\n32698, 32690, 32683, 32676, 32667,\n32658, 32650, 32640, 32631, 32620,\n32610, 32599, 32588, 32577, 32566,\n32554, 32541, 32528, 32515, 32502,\n32487, 32474, 32459, 32444, 32429,\n32413, 32397, 32381, 32364, 32348,\n32331, 32313, 32294, 32277, 32257,\n32239, 32219, 32200, 32180, 32159,\n32138, 32118, 32096, 32074, 32051,\n32029, 32006, 31984, 31960, 31936,\n31912, 31888, 31863, 31837, 31812,\n31786, 31760, 31734, 31707, 31679,\n31652, 31624, 31596, 31567, 31539,\n31508, 31479, 31450, 31419, 31388,\n31357, 31326, 31294, 31262, 31230,\n31198, 31164, 31131, 31097, 31063,\n31030, 30994, 30959, 30924, 30889,\n30853, 30816, 30779, 30743, 30705,\n30668, 30629, 30592, 30553, 30515,\n30475, 30435, 30396, 30356, 30315,\n30274, 30233, 30191, 30149, 30107,\n30065, 30022, 29979, 29936, 29891,\n29847, 29803, 29758, 29713, 29668,\n29622, 29577, 29529, 29483, 29436,\n29390, 29341, 29293, 29246, 29197,\n29148, 29098, 29050, 29000, 28949,\n28899, 28848, 28797, 28746, 28694,\n28642, 28590, 28537, 28485, 28432,\n28378, 28324, 28271, 28217, 28162,\n28106, 28051, 27995, 27940, 27884,\n27827, 27770, 27713, 27657, 27598,\n27540, 27481, 27423, 27365, 27305,\n27246, 27187, 27126, 27066, 27006,\n26945, 26883, 26822, 26760, 26698,\n26636, 26574, 26510, 26448, 26383,\n26320, 26257, 26191, 26127, 26062,\n25997, 25931, 25866, 25800, 25734,\n25667, 25601, 25533, 25466, 25398,\n25330, 25262, 25194, 25125, 25056,\n24987, 24917, 24848, 24778, 24707,\n24636, 24566, 24495, 24424, 24352,\n24280, 24208, 24135, 24063, 23990,\n23917, 23842, 23769, 23695, 23622,\n23546, 23472, 23398, 23322, 23246,\n23171, 23095, 23018, 22942, 22866,\n22788, 22711, 22634, 22557, 22478,\n22400, 22322, 22244, 22165, 22085,\n22006, 21927, 21846, 21766, 21687,\n21606, 21524, 21443, 21363, 21282,\n21199, 21118, 21035, 20954, 20870,\n20788, 20705, 20621, 20538, 20455,\n20371, 20286, 20202, 20118, 20034,\n19947, 19863, 19777, 19692, 19606,\n19520, 19434, 19347, 19260, 19174,\n19088, 18999, 18911, 18825, 18737,\n18648, 18560, 18472, 18384, 18294,\n18205, 18116, 18025, 17936, 17846,\n17757, 17666, 17576, 17485, 17395,\n17303, 17212, 17122, 17030, 16937,\n16846, 16755, 16662, 16569, 16477,\n16385, 16291, 16198, 16105, 16012,\n15917, 15824, 15730, 15636, 15541,\n15447, 15352, 15257, 15162, 15067,\n14973, 14875, 14781, 14685, 14589,\n14493, 14396, 14300, 14204, 14107,\n14010, 13914, 13815, 13718, 13621,\n13524, 13425, 13328, 13230, 13133,\n13033, 12935, 12836, 12738, 12638,\n12540, 12441, 12341, 12241, 12142,\n12044, 11943, 11843, 11744, 11643,\n11542, 11442, 11342, 11241, 11139,\n11039, 10939, 10836, 10736, 10635,\n10534, 10431, 10330, 10228, 10127,\n10024, 9921, 9820, 9718, 9614,\n9512, 9410, 9306, 9204, 9101,\n8998, 8895, 8791, 8689, 8585,\n8481, 8377, 8274, 8171, 8067,\n7962, 7858, 7753, 7650, 7545,\n7441, 7336, 7231, 7129, 7023,\n6917, 6813, 6709, 6604, 6498,\n6393, 6288, 6182, 6077, 5973,\n5867, 5760, 5656, 5549, 5445,\n5339, 5232, 5127, 5022, 4914,\n4809, 4703, 4596, 4490, 4384,\n4278, 4171, 4065, 3958, 3852,\n3745, 3640, 3532, 3426, 3318,\n3212, 3106, 2998, 2891, 2786,\n2679, 2570, 2465, 2358, 2251,\n2143, 2037, 1929, 1823, 1715,\n1609, 1501, 1393, 1287, 1180,\n1073, 964, 858, 751, 644,\n535, 429, 322, 214, 107,\n0, };\n#endif\n\nstatic const CELTMode mode48000_960_120 = {\n48000,  /* Fs */\n120,    /* overlap */\n21,     /* nbEBands */\n21,     /* effEBands */\n{27853, 0, 4096, 8192, },       /* preemph */\neband5ms,       /* eBands */\n3,      /* maxLM */\n8,      /* nbShortMdcts */\n120,    /* shortMdctSize */\n11,     /* nbAllocVectors */\nband_allocation,        /* allocVectors */\nlogN400,        /* logN */\nwindow120,      /* window */\n{1920, 3, {&fft_state48000_960_0, &fft_state48000_960_1, &fft_state48000_960_2, &fft_state48000_960_3, }, mdct_twiddles960},    /* mdct */\n{392, cache_index50, cache_bits50, cache_caps50},       /* cache */\n};\n\n/* List of all the available modes */\n#define TOTAL_MODES 1\nstatic const CELTMode * const static_mode_list[TOTAL_MODES] = {\n&mode48000_960_120,\n};\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/static_modes_float.h",
    "content": "/* The contents of this file was automatically generated by dump_modes.c\n   with arguments: 48000 960\n   It contains static definitions for some pre-defined modes. */\n#include \"modes.h\"\n#include \"rate.h\"\n\n#ifndef DEF_WINDOW120\n#define DEF_WINDOW120\nstatic const opus_val16 window120[120] = {\n6.7286966e-05f, 0.00060551348f, 0.0016815970f, 0.0032947962f, 0.0054439943f,\n0.0081276923f, 0.011344001f, 0.015090633f, 0.019364886f, 0.024163635f,\n0.029483315f, 0.035319905f, 0.041668911f, 0.048525347f, 0.055883718f,\n0.063737999f, 0.072081616f, 0.080907428f, 0.090207705f, 0.099974111f,\n0.11019769f, 0.12086883f, 0.13197729f, 0.14351214f, 0.15546177f,\n0.16781389f, 0.18055550f, 0.19367290f, 0.20715171f, 0.22097682f,\n0.23513243f, 0.24960208f, 0.26436860f, 0.27941419f, 0.29472040f,\n0.31026818f, 0.32603788f, 0.34200931f, 0.35816177f, 0.37447407f,\n0.39092462f, 0.40749142f, 0.42415215f, 0.44088423f, 0.45766484f,\n0.47447104f, 0.49127978f, 0.50806798f, 0.52481261f, 0.54149077f,\n0.55807973f, 0.57455701f, 0.59090049f, 0.60708841f, 0.62309951f,\n0.63891306f, 0.65450896f, 0.66986776f, 0.68497077f, 0.69980010f,\n0.71433873f, 0.72857055f, 0.74248043f, 0.75605424f, 0.76927895f,\n0.78214257f, 0.79463430f, 0.80674445f, 0.81846456f, 0.82978733f,\n0.84070669f, 0.85121779f, 0.86131698f, 0.87100183f, 0.88027111f,\n0.88912479f, 0.89756398f, 0.90559094f, 0.91320904f, 0.92042270f,\n0.92723738f, 0.93365955f, 0.93969656f, 0.94535671f, 0.95064907f,\n0.95558353f, 0.96017067f, 0.96442171f, 0.96834849f, 0.97196334f,\n0.97527906f, 0.97830883f, 0.98106616f, 0.98356480f, 0.98581869f,\n0.98784191f, 0.98964856f, 0.99125274f, 0.99266849f, 0.99390969f,\n0.99499004f, 0.99592297f, 0.99672162f, 0.99739874f, 0.99796667f,\n0.99843728f, 0.99882195f, 0.99913147f, 0.99937606f, 0.99956527f,\n0.99970802f, 0.99981248f, 0.99988613f, 0.99993565f, 0.99996697f,\n0.99998518f, 0.99999457f, 0.99999859f, 0.99999982f, 1.0000000f,\n};\n#endif\n\n#ifndef DEF_LOGN400\n#define DEF_LOGN400\nstatic const opus_int16 logN400[21] = {\n0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 16, 16, 16, 21, 21, 24, 29, 34, 36, };\n#endif\n\n#ifndef DEF_PULSE_CACHE50\n#define DEF_PULSE_CACHE50\nstatic const opus_int16 cache_index50[105] = {\n-1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 41, 41, 41,\n82, 82, 123, 164, 200, 222, 0, 0, 0, 0, 0, 0, 0, 0, 41,\n41, 41, 41, 123, 123, 123, 164, 164, 240, 266, 283, 295, 41, 41, 41,\n41, 41, 41, 41, 41, 123, 123, 123, 123, 240, 240, 240, 266, 266, 305,\n318, 328, 336, 123, 123, 123, 123, 123, 123, 123, 123, 240, 240, 240, 240,\n305, 305, 305, 318, 318, 343, 351, 358, 364, 240, 240, 240, 240, 240, 240,\n240, 240, 305, 305, 305, 305, 343, 343, 343, 351, 351, 370, 376, 382, 387,\n};\nstatic const unsigned char cache_bits50[392] = {\n40, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,\n7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,\n7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 40, 15, 23, 28,\n31, 34, 36, 38, 39, 41, 42, 43, 44, 45, 46, 47, 47, 49, 50,\n51, 52, 53, 54, 55, 55, 57, 58, 59, 60, 61, 62, 63, 63, 65,\n66, 67, 68, 69, 70, 71, 71, 40, 20, 33, 41, 48, 53, 57, 61,\n64, 66, 69, 71, 73, 75, 76, 78, 80, 82, 85, 87, 89, 91, 92,\n94, 96, 98, 101, 103, 105, 107, 108, 110, 112, 114, 117, 119, 121, 123,\n124, 126, 128, 40, 23, 39, 51, 60, 67, 73, 79, 83, 87, 91, 94,\n97, 100, 102, 105, 107, 111, 115, 118, 121, 124, 126, 129, 131, 135, 139,\n142, 145, 148, 150, 153, 155, 159, 163, 166, 169, 172, 174, 177, 179, 35,\n28, 49, 65, 78, 89, 99, 107, 114, 120, 126, 132, 136, 141, 145, 149,\n153, 159, 165, 171, 176, 180, 185, 189, 192, 199, 205, 211, 216, 220, 225,\n229, 232, 239, 245, 251, 21, 33, 58, 79, 97, 112, 125, 137, 148, 157,\n166, 174, 182, 189, 195, 201, 207, 217, 227, 235, 243, 251, 17, 35, 63,\n86, 106, 123, 139, 152, 165, 177, 187, 197, 206, 214, 222, 230, 237, 250,\n25, 31, 55, 75, 91, 105, 117, 128, 138, 146, 154, 161, 168, 174, 180,\n185, 190, 200, 208, 215, 222, 229, 235, 240, 245, 255, 16, 36, 65, 89,\n110, 128, 144, 159, 173, 185, 196, 207, 217, 226, 234, 242, 250, 11, 41,\n74, 103, 128, 151, 172, 191, 209, 225, 241, 255, 9, 43, 79, 110, 138,\n163, 186, 207, 227, 246, 12, 39, 71, 99, 123, 144, 164, 182, 198, 214,\n228, 241, 253, 9, 44, 81, 113, 142, 168, 192, 214, 235, 255, 7, 49,\n90, 127, 160, 191, 220, 247, 6, 51, 95, 134, 170, 203, 234, 7, 47,\n87, 123, 155, 184, 212, 237, 6, 52, 97, 137, 174, 208, 240, 5, 57,\n106, 151, 192, 231, 5, 59, 111, 158, 202, 243, 5, 55, 103, 147, 187,\n224, 5, 60, 113, 161, 206, 248, 4, 65, 122, 175, 224, 4, 67, 127,\n182, 234, };\nstatic const unsigned char cache_caps50[168] = {\n224, 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 185, 185, 185,\n178, 178, 168, 134, 61, 37, 224, 224, 224, 224, 224, 224, 224, 224, 240,\n240, 240, 240, 207, 207, 207, 198, 198, 183, 144, 66, 40, 160, 160, 160,\n160, 160, 160, 160, 160, 185, 185, 185, 185, 193, 193, 193, 183, 183, 172,\n138, 64, 38, 240, 240, 240, 240, 240, 240, 240, 240, 207, 207, 207, 207,\n204, 204, 204, 193, 193, 180, 143, 66, 40, 185, 185, 185, 185, 185, 185,\n185, 185, 193, 193, 193, 193, 193, 193, 193, 183, 183, 172, 138, 65, 39,\n207, 207, 207, 207, 207, 207, 207, 207, 204, 204, 204, 204, 201, 201, 201,\n188, 188, 176, 141, 66, 40, 193, 193, 193, 193, 193, 193, 193, 193, 193,\n193, 193, 193, 194, 194, 194, 184, 184, 173, 139, 65, 39, 204, 204, 204,\n204, 204, 204, 204, 204, 201, 201, 201, 201, 198, 198, 198, 187, 187, 175,\n140, 66, 40, };\n#endif\n\n#ifndef FFT_TWIDDLES48000_960\n#define FFT_TWIDDLES48000_960\nstatic const kiss_twiddle_cpx fft_twiddles48000_960[480] = {\n{1.0000000f, -0.0000000f}, {0.99991433f, -0.013089596f},\n{0.99965732f, -0.026176948f}, {0.99922904f, -0.039259816f},\n{0.99862953f, -0.052335956f}, {0.99785892f, -0.065403129f},\n{0.99691733f, -0.078459096f}, {0.99580493f, -0.091501619f},\n{0.99452190f, -0.10452846f}, {0.99306846f, -0.11753740f},\n{0.99144486f, -0.13052619f}, {0.98965139f, -0.14349262f},\n{0.98768834f, -0.15643447f}, {0.98555606f, -0.16934950f},\n{0.98325491f, -0.18223553f}, {0.98078528f, -0.19509032f},\n{0.97814760f, -0.20791169f}, {0.97534232f, -0.22069744f},\n{0.97236992f, -0.23344536f}, {0.96923091f, -0.24615329f},\n{0.96592583f, -0.25881905f}, {0.96245524f, -0.27144045f},\n{0.95881973f, -0.28401534f}, {0.95501994f, -0.29654157f},\n{0.95105652f, -0.30901699f}, {0.94693013f, -0.32143947f},\n{0.94264149f, -0.33380686f}, {0.93819134f, -0.34611706f},\n{0.93358043f, -0.35836795f}, {0.92880955f, -0.37055744f},\n{0.92387953f, -0.38268343f}, {0.91879121f, -0.39474386f},\n{0.91354546f, -0.40673664f}, {0.90814317f, -0.41865974f},\n{0.90258528f, -0.43051110f}, {0.89687274f, -0.44228869f},\n{0.89100652f, -0.45399050f}, {0.88498764f, -0.46561452f},\n{0.87881711f, -0.47715876f}, {0.87249601f, -0.48862124f},\n{0.86602540f, -0.50000000f}, {0.85940641f, -0.51129309f},\n{0.85264016f, -0.52249856f}, {0.84572782f, -0.53361452f},\n{0.83867057f, -0.54463904f}, {0.83146961f, -0.55557023f},\n{0.82412619f, -0.56640624f}, {0.81664156f, -0.57714519f},\n{0.80901699f, -0.58778525f}, {0.80125381f, -0.59832460f},\n{0.79335334f, -0.60876143f}, {0.78531693f, -0.61909395f},\n{0.77714596f, -0.62932039f}, {0.76884183f, -0.63943900f},\n{0.76040597f, -0.64944805f}, {0.75183981f, -0.65934582f},\n{0.74314483f, -0.66913061f}, {0.73432251f, -0.67880075f},\n{0.72537437f, -0.68835458f}, {0.71630194f, -0.69779046f},\n{0.70710678f, -0.70710678f}, {0.69779046f, -0.71630194f},\n{0.68835458f, -0.72537437f}, {0.67880075f, -0.73432251f},\n{0.66913061f, -0.74314483f}, {0.65934582f, -0.75183981f},\n{0.64944805f, -0.76040597f}, {0.63943900f, -0.76884183f},\n{0.62932039f, -0.77714596f}, {0.61909395f, -0.78531693f},\n{0.60876143f, -0.79335334f}, {0.59832460f, -0.80125381f},\n{0.58778525f, -0.80901699f}, {0.57714519f, -0.81664156f},\n{0.56640624f, -0.82412619f}, {0.55557023f, -0.83146961f},\n{0.54463904f, -0.83867057f}, {0.53361452f, -0.84572782f},\n{0.52249856f, -0.85264016f}, {0.51129309f, -0.85940641f},\n{0.50000000f, -0.86602540f}, {0.48862124f, -0.87249601f},\n{0.47715876f, -0.87881711f}, {0.46561452f, -0.88498764f},\n{0.45399050f, -0.89100652f}, {0.44228869f, -0.89687274f},\n{0.43051110f, -0.90258528f}, {0.41865974f, -0.90814317f},\n{0.40673664f, -0.91354546f}, {0.39474386f, -0.91879121f},\n{0.38268343f, -0.92387953f}, {0.37055744f, -0.92880955f},\n{0.35836795f, -0.93358043f}, {0.34611706f, -0.93819134f},\n{0.33380686f, -0.94264149f}, {0.32143947f, -0.94693013f},\n{0.30901699f, -0.95105652f}, {0.29654157f, -0.95501994f},\n{0.28401534f, -0.95881973f}, {0.27144045f, -0.96245524f},\n{0.25881905f, -0.96592583f}, {0.24615329f, -0.96923091f},\n{0.23344536f, -0.97236992f}, {0.22069744f, -0.97534232f},\n{0.20791169f, -0.97814760f}, {0.19509032f, -0.98078528f},\n{0.18223553f, -0.98325491f}, {0.16934950f, -0.98555606f},\n{0.15643447f, -0.98768834f}, {0.14349262f, -0.98965139f},\n{0.13052619f, -0.99144486f}, {0.11753740f, -0.99306846f},\n{0.10452846f, -0.99452190f}, {0.091501619f, -0.99580493f},\n{0.078459096f, -0.99691733f}, {0.065403129f, -0.99785892f},\n{0.052335956f, -0.99862953f}, {0.039259816f, -0.99922904f},\n{0.026176948f, -0.99965732f}, {0.013089596f, -0.99991433f},\n{6.1230318e-17f, -1.0000000f}, {-0.013089596f, -0.99991433f},\n{-0.026176948f, -0.99965732f}, {-0.039259816f, -0.99922904f},\n{-0.052335956f, -0.99862953f}, {-0.065403129f, -0.99785892f},\n{-0.078459096f, -0.99691733f}, {-0.091501619f, -0.99580493f},\n{-0.10452846f, -0.99452190f}, {-0.11753740f, -0.99306846f},\n{-0.13052619f, -0.99144486f}, {-0.14349262f, -0.98965139f},\n{-0.15643447f, -0.98768834f}, {-0.16934950f, -0.98555606f},\n{-0.18223553f, -0.98325491f}, {-0.19509032f, -0.98078528f},\n{-0.20791169f, -0.97814760f}, {-0.22069744f, -0.97534232f},\n{-0.23344536f, -0.97236992f}, {-0.24615329f, -0.96923091f},\n{-0.25881905f, -0.96592583f}, {-0.27144045f, -0.96245524f},\n{-0.28401534f, -0.95881973f}, {-0.29654157f, -0.95501994f},\n{-0.30901699f, -0.95105652f}, {-0.32143947f, -0.94693013f},\n{-0.33380686f, -0.94264149f}, {-0.34611706f, -0.93819134f},\n{-0.35836795f, -0.93358043f}, {-0.37055744f, -0.92880955f},\n{-0.38268343f, -0.92387953f}, {-0.39474386f, -0.91879121f},\n{-0.40673664f, -0.91354546f}, {-0.41865974f, -0.90814317f},\n{-0.43051110f, -0.90258528f}, {-0.44228869f, -0.89687274f},\n{-0.45399050f, -0.89100652f}, {-0.46561452f, -0.88498764f},\n{-0.47715876f, -0.87881711f}, {-0.48862124f, -0.87249601f},\n{-0.50000000f, -0.86602540f}, {-0.51129309f, -0.85940641f},\n{-0.52249856f, -0.85264016f}, {-0.53361452f, -0.84572782f},\n{-0.54463904f, -0.83867057f}, {-0.55557023f, -0.83146961f},\n{-0.56640624f, -0.82412619f}, {-0.57714519f, -0.81664156f},\n{-0.58778525f, -0.80901699f}, {-0.59832460f, -0.80125381f},\n{-0.60876143f, -0.79335334f}, {-0.61909395f, -0.78531693f},\n{-0.62932039f, -0.77714596f}, {-0.63943900f, -0.76884183f},\n{-0.64944805f, -0.76040597f}, {-0.65934582f, -0.75183981f},\n{-0.66913061f, -0.74314483f}, {-0.67880075f, -0.73432251f},\n{-0.68835458f, -0.72537437f}, {-0.69779046f, -0.71630194f},\n{-0.70710678f, -0.70710678f}, {-0.71630194f, -0.69779046f},\n{-0.72537437f, -0.68835458f}, {-0.73432251f, -0.67880075f},\n{-0.74314483f, -0.66913061f}, {-0.75183981f, -0.65934582f},\n{-0.76040597f, -0.64944805f}, {-0.76884183f, -0.63943900f},\n{-0.77714596f, -0.62932039f}, {-0.78531693f, -0.61909395f},\n{-0.79335334f, -0.60876143f}, {-0.80125381f, -0.59832460f},\n{-0.80901699f, -0.58778525f}, {-0.81664156f, -0.57714519f},\n{-0.82412619f, -0.56640624f}, {-0.83146961f, -0.55557023f},\n{-0.83867057f, -0.54463904f}, {-0.84572782f, -0.53361452f},\n{-0.85264016f, -0.52249856f}, {-0.85940641f, -0.51129309f},\n{-0.86602540f, -0.50000000f}, {-0.87249601f, -0.48862124f},\n{-0.87881711f, -0.47715876f}, {-0.88498764f, -0.46561452f},\n{-0.89100652f, -0.45399050f}, {-0.89687274f, -0.44228869f},\n{-0.90258528f, -0.43051110f}, {-0.90814317f, -0.41865974f},\n{-0.91354546f, -0.40673664f}, {-0.91879121f, -0.39474386f},\n{-0.92387953f, -0.38268343f}, {-0.92880955f, -0.37055744f},\n{-0.93358043f, -0.35836795f}, {-0.93819134f, -0.34611706f},\n{-0.94264149f, -0.33380686f}, {-0.94693013f, -0.32143947f},\n{-0.95105652f, -0.30901699f}, {-0.95501994f, -0.29654157f},\n{-0.95881973f, -0.28401534f}, {-0.96245524f, -0.27144045f},\n{-0.96592583f, -0.25881905f}, {-0.96923091f, -0.24615329f},\n{-0.97236992f, -0.23344536f}, {-0.97534232f, -0.22069744f},\n{-0.97814760f, -0.20791169f}, {-0.98078528f, -0.19509032f},\n{-0.98325491f, -0.18223553f}, {-0.98555606f, -0.16934950f},\n{-0.98768834f, -0.15643447f}, {-0.98965139f, -0.14349262f},\n{-0.99144486f, -0.13052619f}, {-0.99306846f, -0.11753740f},\n{-0.99452190f, -0.10452846f}, {-0.99580493f, -0.091501619f},\n{-0.99691733f, -0.078459096f}, {-0.99785892f, -0.065403129f},\n{-0.99862953f, -0.052335956f}, {-0.99922904f, -0.039259816f},\n{-0.99965732f, -0.026176948f}, {-0.99991433f, -0.013089596f},\n{-1.0000000f, -1.2246064e-16f}, {-0.99991433f, 0.013089596f},\n{-0.99965732f, 0.026176948f}, {-0.99922904f, 0.039259816f},\n{-0.99862953f, 0.052335956f}, {-0.99785892f, 0.065403129f},\n{-0.99691733f, 0.078459096f}, {-0.99580493f, 0.091501619f},\n{-0.99452190f, 0.10452846f}, {-0.99306846f, 0.11753740f},\n{-0.99144486f, 0.13052619f}, {-0.98965139f, 0.14349262f},\n{-0.98768834f, 0.15643447f}, {-0.98555606f, 0.16934950f},\n{-0.98325491f, 0.18223553f}, {-0.98078528f, 0.19509032f},\n{-0.97814760f, 0.20791169f}, {-0.97534232f, 0.22069744f},\n{-0.97236992f, 0.23344536f}, {-0.96923091f, 0.24615329f},\n{-0.96592583f, 0.25881905f}, {-0.96245524f, 0.27144045f},\n{-0.95881973f, 0.28401534f}, {-0.95501994f, 0.29654157f},\n{-0.95105652f, 0.30901699f}, {-0.94693013f, 0.32143947f},\n{-0.94264149f, 0.33380686f}, {-0.93819134f, 0.34611706f},\n{-0.93358043f, 0.35836795f}, {-0.92880955f, 0.37055744f},\n{-0.92387953f, 0.38268343f}, {-0.91879121f, 0.39474386f},\n{-0.91354546f, 0.40673664f}, {-0.90814317f, 0.41865974f},\n{-0.90258528f, 0.43051110f}, {-0.89687274f, 0.44228869f},\n{-0.89100652f, 0.45399050f}, {-0.88498764f, 0.46561452f},\n{-0.87881711f, 0.47715876f}, {-0.87249601f, 0.48862124f},\n{-0.86602540f, 0.50000000f}, {-0.85940641f, 0.51129309f},\n{-0.85264016f, 0.52249856f}, {-0.84572782f, 0.53361452f},\n{-0.83867057f, 0.54463904f}, {-0.83146961f, 0.55557023f},\n{-0.82412619f, 0.56640624f}, {-0.81664156f, 0.57714519f},\n{-0.80901699f, 0.58778525f}, {-0.80125381f, 0.59832460f},\n{-0.79335334f, 0.60876143f}, {-0.78531693f, 0.61909395f},\n{-0.77714596f, 0.62932039f}, {-0.76884183f, 0.63943900f},\n{-0.76040597f, 0.64944805f}, {-0.75183981f, 0.65934582f},\n{-0.74314483f, 0.66913061f}, {-0.73432251f, 0.67880075f},\n{-0.72537437f, 0.68835458f}, {-0.71630194f, 0.69779046f},\n{-0.70710678f, 0.70710678f}, {-0.69779046f, 0.71630194f},\n{-0.68835458f, 0.72537437f}, {-0.67880075f, 0.73432251f},\n{-0.66913061f, 0.74314483f}, {-0.65934582f, 0.75183981f},\n{-0.64944805f, 0.76040597f}, {-0.63943900f, 0.76884183f},\n{-0.62932039f, 0.77714596f}, {-0.61909395f, 0.78531693f},\n{-0.60876143f, 0.79335334f}, {-0.59832460f, 0.80125381f},\n{-0.58778525f, 0.80901699f}, {-0.57714519f, 0.81664156f},\n{-0.56640624f, 0.82412619f}, {-0.55557023f, 0.83146961f},\n{-0.54463904f, 0.83867057f}, {-0.53361452f, 0.84572782f},\n{-0.52249856f, 0.85264016f}, {-0.51129309f, 0.85940641f},\n{-0.50000000f, 0.86602540f}, {-0.48862124f, 0.87249601f},\n{-0.47715876f, 0.87881711f}, {-0.46561452f, 0.88498764f},\n{-0.45399050f, 0.89100652f}, {-0.44228869f, 0.89687274f},\n{-0.43051110f, 0.90258528f}, {-0.41865974f, 0.90814317f},\n{-0.40673664f, 0.91354546f}, {-0.39474386f, 0.91879121f},\n{-0.38268343f, 0.92387953f}, {-0.37055744f, 0.92880955f},\n{-0.35836795f, 0.93358043f}, {-0.34611706f, 0.93819134f},\n{-0.33380686f, 0.94264149f}, {-0.32143947f, 0.94693013f},\n{-0.30901699f, 0.95105652f}, {-0.29654157f, 0.95501994f},\n{-0.28401534f, 0.95881973f}, {-0.27144045f, 0.96245524f},\n{-0.25881905f, 0.96592583f}, {-0.24615329f, 0.96923091f},\n{-0.23344536f, 0.97236992f}, {-0.22069744f, 0.97534232f},\n{-0.20791169f, 0.97814760f}, {-0.19509032f, 0.98078528f},\n{-0.18223553f, 0.98325491f}, {-0.16934950f, 0.98555606f},\n{-0.15643447f, 0.98768834f}, {-0.14349262f, 0.98965139f},\n{-0.13052619f, 0.99144486f}, {-0.11753740f, 0.99306846f},\n{-0.10452846f, 0.99452190f}, {-0.091501619f, 0.99580493f},\n{-0.078459096f, 0.99691733f}, {-0.065403129f, 0.99785892f},\n{-0.052335956f, 0.99862953f}, {-0.039259816f, 0.99922904f},\n{-0.026176948f, 0.99965732f}, {-0.013089596f, 0.99991433f},\n{-1.8369095e-16f, 1.0000000f}, {0.013089596f, 0.99991433f},\n{0.026176948f, 0.99965732f}, {0.039259816f, 0.99922904f},\n{0.052335956f, 0.99862953f}, {0.065403129f, 0.99785892f},\n{0.078459096f, 0.99691733f}, {0.091501619f, 0.99580493f},\n{0.10452846f, 0.99452190f}, {0.11753740f, 0.99306846f},\n{0.13052619f, 0.99144486f}, {0.14349262f, 0.98965139f},\n{0.15643447f, 0.98768834f}, {0.16934950f, 0.98555606f},\n{0.18223553f, 0.98325491f}, {0.19509032f, 0.98078528f},\n{0.20791169f, 0.97814760f}, {0.22069744f, 0.97534232f},\n{0.23344536f, 0.97236992f}, {0.24615329f, 0.96923091f},\n{0.25881905f, 0.96592583f}, {0.27144045f, 0.96245524f},\n{0.28401534f, 0.95881973f}, {0.29654157f, 0.95501994f},\n{0.30901699f, 0.95105652f}, {0.32143947f, 0.94693013f},\n{0.33380686f, 0.94264149f}, {0.34611706f, 0.93819134f},\n{0.35836795f, 0.93358043f}, {0.37055744f, 0.92880955f},\n{0.38268343f, 0.92387953f}, {0.39474386f, 0.91879121f},\n{0.40673664f, 0.91354546f}, {0.41865974f, 0.90814317f},\n{0.43051110f, 0.90258528f}, {0.44228869f, 0.89687274f},\n{0.45399050f, 0.89100652f}, {0.46561452f, 0.88498764f},\n{0.47715876f, 0.87881711f}, {0.48862124f, 0.87249601f},\n{0.50000000f, 0.86602540f}, {0.51129309f, 0.85940641f},\n{0.52249856f, 0.85264016f}, {0.53361452f, 0.84572782f},\n{0.54463904f, 0.83867057f}, {0.55557023f, 0.83146961f},\n{0.56640624f, 0.82412619f}, {0.57714519f, 0.81664156f},\n{0.58778525f, 0.80901699f}, {0.59832460f, 0.80125381f},\n{0.60876143f, 0.79335334f}, {0.61909395f, 0.78531693f},\n{0.62932039f, 0.77714596f}, {0.63943900f, 0.76884183f},\n{0.64944805f, 0.76040597f}, {0.65934582f, 0.75183981f},\n{0.66913061f, 0.74314483f}, {0.67880075f, 0.73432251f},\n{0.68835458f, 0.72537437f}, {0.69779046f, 0.71630194f},\n{0.70710678f, 0.70710678f}, {0.71630194f, 0.69779046f},\n{0.72537437f, 0.68835458f}, {0.73432251f, 0.67880075f},\n{0.74314483f, 0.66913061f}, {0.75183981f, 0.65934582f},\n{0.76040597f, 0.64944805f}, {0.76884183f, 0.63943900f},\n{0.77714596f, 0.62932039f}, {0.78531693f, 0.61909395f},\n{0.79335334f, 0.60876143f}, {0.80125381f, 0.59832460f},\n{0.80901699f, 0.58778525f}, {0.81664156f, 0.57714519f},\n{0.82412619f, 0.56640624f}, {0.83146961f, 0.55557023f},\n{0.83867057f, 0.54463904f}, {0.84572782f, 0.53361452f},\n{0.85264016f, 0.52249856f}, {0.85940641f, 0.51129309f},\n{0.86602540f, 0.50000000f}, {0.87249601f, 0.48862124f},\n{0.87881711f, 0.47715876f}, {0.88498764f, 0.46561452f},\n{0.89100652f, 0.45399050f}, {0.89687274f, 0.44228869f},\n{0.90258528f, 0.43051110f}, {0.90814317f, 0.41865974f},\n{0.91354546f, 0.40673664f}, {0.91879121f, 0.39474386f},\n{0.92387953f, 0.38268343f}, {0.92880955f, 0.37055744f},\n{0.93358043f, 0.35836795f}, {0.93819134f, 0.34611706f},\n{0.94264149f, 0.33380686f}, {0.94693013f, 0.32143947f},\n{0.95105652f, 0.30901699f}, {0.95501994f, 0.29654157f},\n{0.95881973f, 0.28401534f}, {0.96245524f, 0.27144045f},\n{0.96592583f, 0.25881905f}, {0.96923091f, 0.24615329f},\n{0.97236992f, 0.23344536f}, {0.97534232f, 0.22069744f},\n{0.97814760f, 0.20791169f}, {0.98078528f, 0.19509032f},\n{0.98325491f, 0.18223553f}, {0.98555606f, 0.16934950f},\n{0.98768834f, 0.15643447f}, {0.98965139f, 0.14349262f},\n{0.99144486f, 0.13052619f}, {0.99306846f, 0.11753740f},\n{0.99452190f, 0.10452846f}, {0.99580493f, 0.091501619f},\n{0.99691733f, 0.078459096f}, {0.99785892f, 0.065403129f},\n{0.99862953f, 0.052335956f}, {0.99922904f, 0.039259816f},\n{0.99965732f, 0.026176948f}, {0.99991433f, 0.013089596f},\n};\n#ifndef FFT_BITREV480\n#define FFT_BITREV480\nstatic const opus_int16 fft_bitrev480[480] = {\n0, 120, 240, 360, 30, 150, 270, 390, 60, 180, 300, 420, 90, 210, 330,\n450, 15, 135, 255, 375, 45, 165, 285, 405, 75, 195, 315, 435, 105, 225,\n345, 465, 5, 125, 245, 365, 35, 155, 275, 395, 65, 185, 305, 425, 95,\n215, 335, 455, 20, 140, 260, 380, 50, 170, 290, 410, 80, 200, 320, 440,\n110, 230, 350, 470, 10, 130, 250, 370, 40, 160, 280, 400, 70, 190, 310,\n430, 100, 220, 340, 460, 25, 145, 265, 385, 55, 175, 295, 415, 85, 205,\n325, 445, 115, 235, 355, 475, 1, 121, 241, 361, 31, 151, 271, 391, 61,\n181, 301, 421, 91, 211, 331, 451, 16, 136, 256, 376, 46, 166, 286, 406,\n76, 196, 316, 436, 106, 226, 346, 466, 6, 126, 246, 366, 36, 156, 276,\n396, 66, 186, 306, 426, 96, 216, 336, 456, 21, 141, 261, 381, 51, 171,\n291, 411, 81, 201, 321, 441, 111, 231, 351, 471, 11, 131, 251, 371, 41,\n161, 281, 401, 71, 191, 311, 431, 101, 221, 341, 461, 26, 146, 266, 386,\n56, 176, 296, 416, 86, 206, 326, 446, 116, 236, 356, 476, 2, 122, 242,\n362, 32, 152, 272, 392, 62, 182, 302, 422, 92, 212, 332, 452, 17, 137,\n257, 377, 47, 167, 287, 407, 77, 197, 317, 437, 107, 227, 347, 467, 7,\n127, 247, 367, 37, 157, 277, 397, 67, 187, 307, 427, 97, 217, 337, 457,\n22, 142, 262, 382, 52, 172, 292, 412, 82, 202, 322, 442, 112, 232, 352,\n472, 12, 132, 252, 372, 42, 162, 282, 402, 72, 192, 312, 432, 102, 222,\n342, 462, 27, 147, 267, 387, 57, 177, 297, 417, 87, 207, 327, 447, 117,\n237, 357, 477, 3, 123, 243, 363, 33, 153, 273, 393, 63, 183, 303, 423,\n93, 213, 333, 453, 18, 138, 258, 378, 48, 168, 288, 408, 78, 198, 318,\n438, 108, 228, 348, 468, 8, 128, 248, 368, 38, 158, 278, 398, 68, 188,\n308, 428, 98, 218, 338, 458, 23, 143, 263, 383, 53, 173, 293, 413, 83,\n203, 323, 443, 113, 233, 353, 473, 13, 133, 253, 373, 43, 163, 283, 403,\n73, 193, 313, 433, 103, 223, 343, 463, 28, 148, 268, 388, 58, 178, 298,\n418, 88, 208, 328, 448, 118, 238, 358, 478, 4, 124, 244, 364, 34, 154,\n274, 394, 64, 184, 304, 424, 94, 214, 334, 454, 19, 139, 259, 379, 49,\n169, 289, 409, 79, 199, 319, 439, 109, 229, 349, 469, 9, 129, 249, 369,\n39, 159, 279, 399, 69, 189, 309, 429, 99, 219, 339, 459, 24, 144, 264,\n384, 54, 174, 294, 414, 84, 204, 324, 444, 114, 234, 354, 474, 14, 134,\n254, 374, 44, 164, 284, 404, 74, 194, 314, 434, 104, 224, 344, 464, 29,\n149, 269, 389, 59, 179, 299, 419, 89, 209, 329, 449, 119, 239, 359, 479,\n};\n#endif\n\n#ifndef FFT_BITREV240\n#define FFT_BITREV240\nstatic const opus_int16 fft_bitrev240[240] = {\n0, 60, 120, 180, 15, 75, 135, 195, 30, 90, 150, 210, 45, 105, 165,\n225, 5, 65, 125, 185, 20, 80, 140, 200, 35, 95, 155, 215, 50, 110,\n170, 230, 10, 70, 130, 190, 25, 85, 145, 205, 40, 100, 160, 220, 55,\n115, 175, 235, 1, 61, 121, 181, 16, 76, 136, 196, 31, 91, 151, 211,\n46, 106, 166, 226, 6, 66, 126, 186, 21, 81, 141, 201, 36, 96, 156,\n216, 51, 111, 171, 231, 11, 71, 131, 191, 26, 86, 146, 206, 41, 101,\n161, 221, 56, 116, 176, 236, 2, 62, 122, 182, 17, 77, 137, 197, 32,\n92, 152, 212, 47, 107, 167, 227, 7, 67, 127, 187, 22, 82, 142, 202,\n37, 97, 157, 217, 52, 112, 172, 232, 12, 72, 132, 192, 27, 87, 147,\n207, 42, 102, 162, 222, 57, 117, 177, 237, 3, 63, 123, 183, 18, 78,\n138, 198, 33, 93, 153, 213, 48, 108, 168, 228, 8, 68, 128, 188, 23,\n83, 143, 203, 38, 98, 158, 218, 53, 113, 173, 233, 13, 73, 133, 193,\n28, 88, 148, 208, 43, 103, 163, 223, 58, 118, 178, 238, 4, 64, 124,\n184, 19, 79, 139, 199, 34, 94, 154, 214, 49, 109, 169, 229, 9, 69,\n129, 189, 24, 84, 144, 204, 39, 99, 159, 219, 54, 114, 174, 234, 14,\n74, 134, 194, 29, 89, 149, 209, 44, 104, 164, 224, 59, 119, 179, 239,\n};\n#endif\n\n#ifndef FFT_BITREV120\n#define FFT_BITREV120\nstatic const opus_int16 fft_bitrev120[120] = {\n0, 30, 60, 90, 15, 45, 75, 105, 5, 35, 65, 95, 20, 50, 80,\n110, 10, 40, 70, 100, 25, 55, 85, 115, 1, 31, 61, 91, 16, 46,\n76, 106, 6, 36, 66, 96, 21, 51, 81, 111, 11, 41, 71, 101, 26,\n56, 86, 116, 2, 32, 62, 92, 17, 47, 77, 107, 7, 37, 67, 97,\n22, 52, 82, 112, 12, 42, 72, 102, 27, 57, 87, 117, 3, 33, 63,\n93, 18, 48, 78, 108, 8, 38, 68, 98, 23, 53, 83, 113, 13, 43,\n73, 103, 28, 58, 88, 118, 4, 34, 64, 94, 19, 49, 79, 109, 9,\n39, 69, 99, 24, 54, 84, 114, 14, 44, 74, 104, 29, 59, 89, 119,\n};\n#endif\n\n#ifndef FFT_BITREV60\n#define FFT_BITREV60\nstatic const opus_int16 fft_bitrev60[60] = {\n0, 15, 30, 45, 5, 20, 35, 50, 10, 25, 40, 55, 1, 16, 31,\n46, 6, 21, 36, 51, 11, 26, 41, 56, 2, 17, 32, 47, 7, 22,\n37, 52, 12, 27, 42, 57, 3, 18, 33, 48, 8, 23, 38, 53, 13,\n28, 43, 58, 4, 19, 34, 49, 9, 24, 39, 54, 14, 29, 44, 59,\n};\n#endif\n\n#ifndef FFT_STATE48000_960_0\n#define FFT_STATE48000_960_0\nstatic const kiss_fft_state fft_state48000_960_0 = {\n480,    /* nfft */\n0.002083333f,   /* scale */\n-1,     /* shift */\n{4, 120, 4, 30, 2, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, }, /* factors */\nfft_bitrev480,  /* bitrev */\nfft_twiddles48000_960,  /* bitrev */\n};\n#endif\n\n#ifndef FFT_STATE48000_960_1\n#define FFT_STATE48000_960_1\nstatic const kiss_fft_state fft_state48000_960_1 = {\n240,    /* nfft */\n0.004166667f,   /* scale */\n1,      /* shift */\n{4, 60, 4, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, },   /* factors */\nfft_bitrev240,  /* bitrev */\nfft_twiddles48000_960,  /* bitrev */\n};\n#endif\n\n#ifndef FFT_STATE48000_960_2\n#define FFT_STATE48000_960_2\nstatic const kiss_fft_state fft_state48000_960_2 = {\n120,    /* nfft */\n0.008333333f,   /* scale */\n2,      /* shift */\n{4, 30, 2, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, },   /* factors */\nfft_bitrev120,  /* bitrev */\nfft_twiddles48000_960,  /* bitrev */\n};\n#endif\n\n#ifndef FFT_STATE48000_960_3\n#define FFT_STATE48000_960_3\nstatic const kiss_fft_state fft_state48000_960_3 = {\n60,     /* nfft */\n0.016666667f,   /* scale */\n3,      /* shift */\n{4, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },    /* factors */\nfft_bitrev60,   /* bitrev */\nfft_twiddles48000_960,  /* bitrev */\n};\n#endif\n\n#endif\n\n#ifndef MDCT_TWIDDLES960\n#define MDCT_TWIDDLES960\nstatic const opus_val16 mdct_twiddles960[481] = {\n1.0000000f, 0.99999465f, 0.99997858f, 0.99995181f, 0.99991433f,\n0.99986614f, 0.99980724f, 0.99973764f, 0.99965732f, 0.99956631f,\n0.99946459f, 0.99935216f, 0.99922904f, 0.99909521f, 0.99895068f,\n0.99879546f, 0.99862953f, 0.99845292f, 0.99826561f, 0.99806761f,\n0.99785892f, 0.99763955f, 0.99740949f, 0.99716875f, 0.99691733f,\n0.99665524f, 0.99638247f, 0.99609903f, 0.99580493f, 0.99550016f,\n0.99518473f, 0.99485864f, 0.99452190f, 0.99417450f, 0.99381646f,\n0.99344778f, 0.99306846f, 0.99267850f, 0.99227791f, 0.99186670f,\n0.99144486f, 0.99101241f, 0.99056934f, 0.99011566f, 0.98965139f,\n0.98917651f, 0.98869104f, 0.98819498f, 0.98768834f, 0.98717112f,\n0.98664333f, 0.98610497f, 0.98555606f, 0.98499659f, 0.98442657f,\n0.98384600f, 0.98325491f, 0.98265328f, 0.98204113f, 0.98141846f,\n0.98078528f, 0.98014159f, 0.97948742f, 0.97882275f, 0.97814760f,\n0.97746197f, 0.97676588f, 0.97605933f, 0.97534232f, 0.97461487f,\n0.97387698f, 0.97312866f, 0.97236992f, 0.97160077f, 0.97082121f,\n0.97003125f, 0.96923091f, 0.96842019f, 0.96759909f, 0.96676764f,\n0.96592582f, 0.96507367f, 0.96421118f, 0.96333837f, 0.96245523f,\n0.96156180f, 0.96065806f, 0.95974403f, 0.95881973f, 0.95788517f,\n0.95694034f, 0.95598526f, 0.95501995f, 0.95404440f, 0.95305864f,\n0.95206267f, 0.95105651f, 0.95004016f, 0.94901364f, 0.94797697f,\n0.94693013f, 0.94587315f, 0.94480604f, 0.94372882f, 0.94264149f,\n0.94154406f, 0.94043656f, 0.93931897f, 0.93819133f, 0.93705365f,\n0.93590592f, 0.93474818f, 0.93358042f, 0.93240268f, 0.93121493f,\n0.93001722f, 0.92880955f, 0.92759193f, 0.92636438f, 0.92512690f,\n0.92387953f, 0.92262225f, 0.92135509f, 0.92007809f, 0.91879121f,\n0.91749449f, 0.91618795f, 0.91487161f, 0.91354545f, 0.91220952f,\n0.91086382f, 0.90950836f, 0.90814316f, 0.90676824f, 0.90538363f,\n0.90398929f, 0.90258528f, 0.90117161f, 0.89974828f, 0.89831532f,\n0.89687273f, 0.89542055f, 0.89395877f, 0.89248742f, 0.89100652f,\n0.88951606f, 0.88801610f, 0.88650661f, 0.88498764f, 0.88345918f,\n0.88192125f, 0.88037390f, 0.87881711f, 0.87725090f, 0.87567531f,\n0.87409035f, 0.87249599f, 0.87089232f, 0.86927933f, 0.86765699f,\n0.86602540f, 0.86438453f, 0.86273437f, 0.86107503f, 0.85940641f,\n0.85772862f, 0.85604161f, 0.85434547f, 0.85264014f, 0.85092572f,\n0.84920218f, 0.84746955f, 0.84572781f, 0.84397704f, 0.84221721f,\n0.84044838f, 0.83867056f, 0.83688375f, 0.83508799f, 0.83328325f,\n0.83146961f, 0.82964704f, 0.82781562f, 0.82597530f, 0.82412620f,\n0.82226820f, 0.82040144f, 0.81852589f, 0.81664154f, 0.81474847f,\n0.81284665f, 0.81093620f, 0.80901698f, 0.80708914f, 0.80515262f,\n0.80320752f, 0.80125378f, 0.79929149f, 0.79732067f, 0.79534125f,\n0.79335335f, 0.79135691f, 0.78935204f, 0.78733867f, 0.78531691f,\n0.78328674f, 0.78124818f, 0.77920122f, 0.77714595f, 0.77508232f,\n0.77301043f, 0.77093026f, 0.76884183f, 0.76674517f, 0.76464026f,\n0.76252720f, 0.76040593f, 0.75827656f, 0.75613907f, 0.75399349f,\n0.75183978f, 0.74967807f, 0.74750833f, 0.74533054f, 0.74314481f,\n0.74095112f, 0.73874950f, 0.73653993f, 0.73432251f, 0.73209718f,\n0.72986405f, 0.72762307f, 0.72537438f, 0.72311787f, 0.72085359f,\n0.71858162f, 0.71630192f, 0.71401459f, 0.71171956f, 0.70941701f,\n0.70710677f, 0.70478900f, 0.70246363f, 0.70013079f, 0.69779041f,\n0.69544260f, 0.69308738f, 0.69072466f, 0.68835458f, 0.68597709f,\n0.68359229f, 0.68120013f, 0.67880072f, 0.67639404f, 0.67398011f,\n0.67155892f, 0.66913059f, 0.66669509f, 0.66425240f, 0.66180265f,\n0.65934581f, 0.65688191f, 0.65441092f, 0.65193298f, 0.64944801f,\n0.64695613f, 0.64445727f, 0.64195160f, 0.63943902f, 0.63691954f,\n0.63439328f, 0.63186019f, 0.62932037f, 0.62677377f, 0.62422055f,\n0.62166055f, 0.61909394f, 0.61652065f, 0.61394081f, 0.61135435f,\n0.60876139f, 0.60616195f, 0.60355593f, 0.60094349f, 0.59832457f,\n0.59569929f, 0.59306758f, 0.59042957f, 0.58778523f, 0.58513460f,\n0.58247766f, 0.57981452f, 0.57714518f, 0.57446961f, 0.57178793f,\n0.56910013f, 0.56640624f, 0.56370623f, 0.56100023f, 0.55828818f,\n0.55557020f, 0.55284627f, 0.55011641f, 0.54738067f, 0.54463901f,\n0.54189157f, 0.53913828f, 0.53637921f, 0.53361450f, 0.53084398f,\n0.52806787f, 0.52528601f, 0.52249852f, 0.51970543f, 0.51690688f,\n0.51410279f, 0.51129310f, 0.50847793f, 0.50565732f, 0.50283139f,\n0.49999997f, 0.49716321f, 0.49432122f, 0.49147383f, 0.48862118f,\n0.48576340f, 0.48290042f, 0.48003216f, 0.47715876f, 0.47428025f,\n0.47139677f, 0.46850813f, 0.46561448f, 0.46271584f, 0.45981235f,\n0.45690383f, 0.45399042f, 0.45107214f, 0.44814915f, 0.44522124f,\n0.44228868f, 0.43935137f, 0.43640926f, 0.43346247f, 0.43051104f,\n0.42755511f, 0.42459449f, 0.42162932f, 0.41865964f, 0.41568558f,\n0.41270697f, 0.40972393f, 0.40673661f, 0.40374494f, 0.40074884f,\n0.39774844f, 0.39474390f, 0.39173501f, 0.38872193f, 0.38570469f,\n0.38268343f, 0.37965796f, 0.37662842f, 0.37359496f, 0.37055739f,\n0.36751585f, 0.36447038f, 0.36142122f, 0.35836797f, 0.35531089f,\n0.35225000f, 0.34918544f, 0.34611704f, 0.34304493f, 0.33996926f,\n0.33688983f, 0.33380680f, 0.33072019f, 0.32763015f, 0.32453650f,\n0.32143936f, 0.31833890f, 0.31523503f, 0.31212767f, 0.30901696f,\n0.30590306f, 0.30278577f, 0.29966524f, 0.29654150f, 0.29341470f,\n0.29028464f, 0.28715147f, 0.28401522f, 0.28087605f, 0.27773376f,\n0.27458861f, 0.27144052f, 0.26828940f, 0.26513541f, 0.26197859f,\n0.25881907f, 0.25565666f, 0.25249152f, 0.24932367f, 0.24615327f,\n0.24298012f, 0.23980436f, 0.23662604f, 0.23344530f, 0.23026206f,\n0.22707623f, 0.22388809f, 0.22069744f, 0.21750443f, 0.21430908f,\n0.21111156f, 0.20791165f, 0.20470953f, 0.20150520f, 0.19829884f,\n0.19509024f, 0.19187955f, 0.18866692f, 0.18545227f, 0.18223552f,\n0.17901681f, 0.17579631f, 0.17257380f, 0.16934945f, 0.16612328f,\n0.16289546f, 0.15966577f, 0.15643437f, 0.15320141f, 0.14996669f,\n0.14673037f, 0.14349260f, 0.14025329f, 0.13701235f, 0.13376995f,\n0.13052612f, 0.12728101f, 0.12403442f, 0.12078650f, 0.11753740f,\n0.11428693f, 0.11103523f, 0.10778234f, 0.10452842f, 0.10127326f,\n0.098017137f, 0.094759842f, 0.091501652f, 0.088242363f, 0.084982129f,\n0.081721103f, 0.078459084f, 0.075196224f, 0.071932560f, 0.068668243f,\n0.065403073f, 0.062137201f, 0.058870665f, 0.055603617f, 0.052335974f,\n0.049067651f, 0.045798921f, 0.042529582f, 0.039259788f, 0.035989573f,\n0.032719092f, 0.029448142f, 0.026176876f, 0.022905329f, 0.019633657f,\n0.016361655f, 0.013089478f, 0.0098171604f, 0.0065449764f, 0.0032724839f,\n-4.3711390e-08f, };\n#endif\n\nstatic const CELTMode mode48000_960_120 = {\n48000,  /* Fs */\n120,    /* overlap */\n21,     /* nbEBands */\n21,     /* effEBands */\n{0.85000610f, 0.0000000f, 1.0000000f, 1.0000000f, },    /* preemph */\neband5ms,       /* eBands */\n3,      /* maxLM */\n8,      /* nbShortMdcts */\n120,    /* shortMdctSize */\n11,     /* nbAllocVectors */\nband_allocation,        /* allocVectors */\nlogN400,        /* logN */\nwindow120,      /* window */\n{1920, 3, {&fft_state48000_960_0, &fft_state48000_960_1, &fft_state48000_960_2, &fft_state48000_960_3, }, mdct_twiddles960},    /* mdct */\n{392, cache_index50, cache_bits50, cache_caps50},       /* cache */\n};\n\n/* List of all the available modes */\n#define TOTAL_MODES 1\nstatic const CELTMode * const static_mode_list[TOTAL_MODES] = {\n&mode48000_960_120,\n};\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/vq.c",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"mathops.h\"\n#include \"cwrs.h\"\n#include \"vq.h\"\n#include \"arch.h\"\n#include \"os_support.h\"\n#include \"bands.h\"\n#include \"rate.h\"\n\nstatic void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_val16 s)\n{\n   int i;\n   celt_norm *Xptr;\n   Xptr = X;\n   for (i=0;i<len-stride;i++)\n   {\n      celt_norm x1, x2;\n      x1 = Xptr[0];\n      x2 = Xptr[stride];\n      Xptr[stride] = EXTRACT16(SHR32(MULT16_16(c,x2) + MULT16_16(s,x1), 15));\n      *Xptr++      = EXTRACT16(SHR32(MULT16_16(c,x1) - MULT16_16(s,x2), 15));\n   }\n   Xptr = &X[len-2*stride-1];\n   for (i=len-2*stride-1;i>=0;i--)\n   {\n      celt_norm x1, x2;\n      x1 = Xptr[0];\n      x2 = Xptr[stride];\n      Xptr[stride] = EXTRACT16(SHR32(MULT16_16(c,x2) + MULT16_16(s,x1), 15));\n      *Xptr--      = EXTRACT16(SHR32(MULT16_16(c,x1) - MULT16_16(s,x2), 15));\n   }\n}\n\nstatic void exp_rotation(celt_norm *X, int len, int dir, int stride, int K, int spread)\n{\n   static const int SPREAD_FACTOR[3]={15,10,5};\n   int i;\n   opus_val16 c, s;\n   opus_val16 gain, theta;\n   int stride2=0;\n   int factor;\n\n   if (2*K>=len || spread==SPREAD_NONE)\n      return;\n   factor = SPREAD_FACTOR[spread-1];\n\n   gain = celt_div((opus_val32)MULT16_16(Q15_ONE,len),(opus_val32)(len+factor*K));\n   theta = HALF16(MULT16_16_Q15(gain,gain));\n\n   c = celt_cos_norm(EXTEND32(theta));\n   s = celt_cos_norm(EXTEND32(SUB16(Q15ONE,theta))); /*  sin(theta) */\n\n   if (len>=8*stride)\n   {\n      stride2 = 1;\n      /* This is just a simple (equivalent) way of computing sqrt(len/stride) with rounding.\n         It's basically incrementing long as (stride2+0.5)^2 < len/stride. */\n      while ((stride2*stride2+stride2)*stride + (stride>>2) < len)\n         stride2++;\n   }\n   /*NOTE: As a minor optimization, we could be passing around log2(B), not B, for both this and for\n      extract_collapse_mask().*/\n   len /= stride;\n   for (i=0;i<stride;i++)\n   {\n      if (dir < 0)\n      {\n         if (stride2)\n            exp_rotation1(X+i*len, len, stride2, s, c);\n         exp_rotation1(X+i*len, len, 1, c, s);\n      } else {\n         exp_rotation1(X+i*len, len, 1, c, -s);\n         if (stride2)\n            exp_rotation1(X+i*len, len, stride2, s, -c);\n      }\n   }\n}\n\n/** Takes the pitch vector and the decoded residual vector, computes the gain\n    that will give ||p+g*y||=1 and mixes the residual with the pitch. */\nstatic void normalise_residual(int * OPUS_RESTRICT iy, celt_norm * OPUS_RESTRICT X,\n      int N, opus_val32 Ryy, opus_val16 gain)\n{\n   int i;\n#ifdef FIXED_POINT\n   int k;\n#endif\n   opus_val32 t;\n   opus_val16 g;\n\n#ifdef FIXED_POINT\n   k = celt_ilog2(Ryy)>>1;\n#endif\n   t = VSHR32(Ryy, 2*(k-7));\n   g = MULT16_16_P15(celt_rsqrt_norm(t),gain);\n\n   i=0;\n   do\n      X[i] = EXTRACT16(PSHR32(MULT16_16(g, iy[i]), k+1));\n   while (++i < N);\n}\n\nstatic unsigned extract_collapse_mask(int *iy, int N, int B)\n{\n   unsigned collapse_mask;\n   int N0;\n   int i;\n   if (B<=1)\n      return 1;\n   /*NOTE: As a minor optimization, we could be passing around log2(B), not B, for both this and for\n      exp_rotation().*/\n   N0 = N/B;\n   collapse_mask = 0;\n   i=0; do {\n      int j;\n      j=0; do {\n         collapse_mask |= (iy[i*N0+j]!=0)<<i;\n      } while (++j<N0);\n   } while (++i<B);\n   return collapse_mask;\n}\n\nunsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, ec_enc *enc\n#ifdef RESYNTH\n   , opus_val16 gain\n#endif\n   )\n{\n   VARDECL(celt_norm, y);\n   VARDECL(int, iy);\n   VARDECL(opus_val16, signx);\n   int i, j;\n   opus_val16 s;\n   int pulsesLeft;\n   opus_val32 sum;\n   opus_val32 xy;\n   opus_val16 yy;\n   unsigned collapse_mask;\n   SAVE_STACK;\n\n   celt_assert2(K>0, \"alg_quant() needs at least one pulse\");\n   celt_assert2(N>1, \"alg_quant() needs at least two dimensions\");\n\n   ALLOC(y, N, celt_norm);\n   ALLOC(iy, N, int);\n   ALLOC(signx, N, opus_val16);\n\n   exp_rotation(X, N, 1, B, K, spread);\n\n   /* Get rid of the sign */\n   sum = 0;\n   j=0; do {\n      if (X[j]>0)\n         signx[j]=1;\n      else {\n         signx[j]=-1;\n         X[j]=-X[j];\n      }\n      iy[j] = 0;\n      y[j] = 0;\n   } while (++j<N);\n\n   xy = yy = 0;\n\n   pulsesLeft = K;\n\n   /* Do a pre-search by projecting on the pyramid */\n   if (K > (N>>1))\n   {\n      opus_val16 rcp;\n      j=0; do {\n         sum += X[j];\n      }  while (++j<N);\n\n      /* If X is too small, just replace it with a pulse at 0 */\n#ifdef FIXED_POINT\n      if (sum <= K)\n#else\n      /* Prevents infinities and NaNs from causing too many pulses\n         to be allocated. 64 is an approximation of infinity here. */\n      if (!(sum > EPSILON && sum < 64))\n#endif\n      {\n         X[0] = QCONST16(1.f,14);\n         j=1; do\n            X[j]=0;\n         while (++j<N);\n         sum = QCONST16(1.f,14);\n      }\n      rcp = EXTRACT16(MULT16_32_Q16(K-1, celt_rcp(sum)));\n      j=0; do {\n#ifdef FIXED_POINT\n         /* It's really important to round *towards zero* here */\n         iy[j] = MULT16_16_Q15(X[j],rcp);\n#else\n         iy[j] = (int)floor(rcp*X[j]);\n#endif\n         y[j] = (celt_norm)iy[j];\n         yy = MAC16_16(yy, y[j],y[j]);\n         xy = MAC16_16(xy, X[j],y[j]);\n         y[j] *= 2;\n         pulsesLeft -= iy[j];\n      }  while (++j<N);\n   }\n   celt_assert2(pulsesLeft>=1, \"Allocated too many pulses in the quick pass\");\n\n   /* This should never happen, but just in case it does (e.g. on silence)\n      we fill the first bin with pulses. */\n#ifdef FIXED_POINT_DEBUG\n   celt_assert2(pulsesLeft<=N+3, \"Not enough pulses in the quick pass\");\n#endif\n   if (pulsesLeft > N+3)\n   {\n      opus_val16 tmp = (opus_val16)pulsesLeft;\n      yy = MAC16_16(yy, tmp, tmp);\n      yy = MAC16_16(yy, tmp, y[0]);\n      iy[0] += pulsesLeft;\n      pulsesLeft=0;\n   }\n\n   s = 1;\n   for (i=0;i<pulsesLeft;i++)\n   {\n      int best_id;\n      opus_val32 best_num = -VERY_LARGE16;\n      opus_val16 best_den = 0;\n#ifdef FIXED_POINT\n      int rshift;\n#endif\n#ifdef FIXED_POINT\n      rshift = 1+celt_ilog2(K-pulsesLeft+i+1);\n#endif\n      best_id = 0;\n      /* The squared magnitude term gets added anyway, so we might as well\n         add it outside the loop */\n      yy = ADD32(yy, 1);\n      j=0;\n      do {\n         opus_val16 Rxy, Ryy;\n         /* Temporary sums of the new pulse(s) */\n         Rxy = EXTRACT16(SHR32(ADD32(xy, EXTEND32(X[j])),rshift));\n         /* We're multiplying y[j] by two so we don't have to do it here */\n         Ryy = ADD16(yy, y[j]);\n\n         /* Approximate score: we maximise Rxy/sqrt(Ryy) (we're guaranteed that\n            Rxy is positive because the sign is pre-computed) */\n         Rxy = MULT16_16_Q15(Rxy,Rxy);\n         /* The idea is to check for num/den >= best_num/best_den, but that way\n            we can do it without any division */\n         /* OPT: Make sure to use conditional moves here */\n         if (MULT16_16(best_den, Rxy) > MULT16_16(Ryy, best_num))\n         {\n            best_den = Ryy;\n            best_num = Rxy;\n            best_id = j;\n         }\n      } while (++j<N);\n\n      /* Updating the sums of the new pulse(s) */\n      xy = ADD32(xy, EXTEND32(X[best_id]));\n      /* We're multiplying y[j] by two so we don't have to do it here */\n      yy = ADD16(yy, y[best_id]);\n\n      /* Only now that we've made the final choice, update y/iy */\n      /* Multiplying y[j] by 2 so we don't have to do it everywhere else */\n      y[best_id] += 2*s;\n      iy[best_id]++;\n   }\n\n   /* Put the original sign back */\n   j=0;\n   do {\n      X[j] = MULT16_16(signx[j],X[j]);\n      if (signx[j] < 0)\n         iy[j] = -iy[j];\n   } while (++j<N);\n   encode_pulses(iy, N, K, enc);\n\n#ifdef RESYNTH\n   normalise_residual(iy, X, N, yy, gain);\n   exp_rotation(X, N, -1, B, K, spread);\n#endif\n\n   collapse_mask = extract_collapse_mask(iy, N, B);\n   RESTORE_STACK;\n   return collapse_mask;\n}\n\n/** Decode pulse vector and combine the result with the pitch vector to produce\n    the final normalised signal in the current band. */\nunsigned alg_unquant(celt_norm *X, int N, int K, int spread, int B,\n      ec_dec *dec, opus_val16 gain)\n{\n   int i;\n   opus_val32 Ryy;\n   unsigned collapse_mask;\n   VARDECL(int, iy);\n   SAVE_STACK;\n\n   celt_assert2(K>0, \"alg_unquant() needs at least one pulse\");\n   celt_assert2(N>1, \"alg_unquant() needs at least two dimensions\");\n   ALLOC(iy, N, int);\n   decode_pulses(iy, N, K, dec);\n   Ryy = 0;\n   i=0;\n   do {\n      Ryy = MAC16_16(Ryy, iy[i], iy[i]);\n   } while (++i < N);\n   normalise_residual(iy, X, N, Ryy, gain);\n   exp_rotation(X, N, -1, B, K, spread);\n   collapse_mask = extract_collapse_mask(iy, N, B);\n   RESTORE_STACK;\n   return collapse_mask;\n}\n\nvoid renormalise_vector(celt_norm *X, int N, opus_val16 gain)\n{\n   int i;\n#ifdef FIXED_POINT\n   int k;\n#endif\n   opus_val32 E = EPSILON;\n   opus_val16 g;\n   opus_val32 t;\n   celt_norm *xptr = X;\n   for (i=0;i<N;i++)\n   {\n      E = MAC16_16(E, *xptr, *xptr);\n      xptr++;\n   }\n#ifdef FIXED_POINT\n   k = celt_ilog2(E)>>1;\n#endif\n   t = VSHR32(E, 2*(k-7));\n   g = MULT16_16_P15(celt_rsqrt_norm(t),gain);\n\n   xptr = X;\n   for (i=0;i<N;i++)\n   {\n      *xptr = EXTRACT16(PSHR32(MULT16_16(g, *xptr), k+1));\n      xptr++;\n   }\n   /*return celt_sqrt(E);*/\n}\n\nint stereo_itheta(celt_norm *X, celt_norm *Y, int stereo, int N)\n{\n   int i;\n   int itheta;\n   opus_val16 mid, side;\n   opus_val32 Emid, Eside;\n\n   Emid = Eside = EPSILON;\n   if (stereo)\n   {\n      for (i=0;i<N;i++)\n      {\n         celt_norm m, s;\n         m = ADD16(SHR16(X[i],1),SHR16(Y[i],1));\n         s = SUB16(SHR16(X[i],1),SHR16(Y[i],1));\n         Emid = MAC16_16(Emid, m, m);\n         Eside = MAC16_16(Eside, s, s);\n      }\n   } else {\n      for (i=0;i<N;i++)\n      {\n         celt_norm m, s;\n         m = X[i];\n         s = Y[i];\n         Emid = MAC16_16(Emid, m, m);\n         Eside = MAC16_16(Eside, s, s);\n      }\n   }\n   mid = celt_sqrt(Emid);\n   side = celt_sqrt(Eside);\n#ifdef FIXED_POINT\n   /* 0.63662 = 2/pi */\n   itheta = MULT16_16_Q15(QCONST16(0.63662f,15),celt_atan2p(side, mid));\n#else\n   itheta = (int)floor(.5f+16384*0.63662f*atan2(side,mid));\n#endif\n\n   return itheta;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/vq.h",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\n/**\n   @file vq.h\n   @brief Vector quantisation of the residual\n */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef VQ_H\n#define VQ_H\n\n#include \"entenc.h\"\n#include \"entdec.h\"\n#include \"modes.h\"\n\n/** Algebraic pulse-vector quantiser. The signal x is replaced by the sum of\n  * the pitch and a combination of pulses such that its norm is still equal\n  * to 1. This is the function that will typically require the most CPU.\n * @param X Residual signal to quantise/encode (returns quantised version)\n * @param N Number of samples to encode\n * @param K Number of pulses to use\n * @param enc Entropy encoder state\n * @ret A mask indicating which blocks in the band received pulses\n*/\nunsigned alg_quant(celt_norm *X, int N, int K, int spread, int B,\n      ec_enc *enc\n#ifdef RESYNTH\n      , opus_val16 gain\n#endif\n      );\n\n/** Algebraic pulse decoder\n * @param X Decoded normalised spectrum (returned)\n * @param N Number of samples to decode\n * @param K Number of pulses to use\n * @param dec Entropy decoder state\n * @ret A mask indicating which blocks in the band received pulses\n */\nunsigned alg_unquant(celt_norm *X, int N, int K, int spread, int B,\n      ec_dec *dec, opus_val16 gain);\n\nvoid renormalise_vector(celt_norm *X, int N, opus_val16 gain);\n\nint stereo_itheta(celt_norm *X, celt_norm *Y, int stereo, int N);\n\n#endif /* VQ_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/celt/x86/pitch_sse.h",
    "content": "/* Copyright (c) 2013 Jean-Marc Valin and John Ridges */\n/**\n   @file pitch_sse.h\n   @brief Pitch analysis\n */\n\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef PITCH_SSE_H\n#define PITCH_SSE_H\n\n#include <xmmintrin.h>\n#include \"arch.h\"\n\n#define OVERRIDE_XCORR_KERNEL\nstatic OPUS_INLINE void xcorr_kernel(const opus_val16 *x, const opus_val16 *y, opus_val32 sum[4], int len)\n{\n   int j;\n   __m128 xsum1, xsum2;\n   xsum1 = _mm_loadu_ps(sum);\n   xsum2 = _mm_setzero_ps();\n\n   for (j = 0; j < len-3; j += 4)\n   {\n      __m128 x0 = _mm_loadu_ps(x+j);\n      __m128 yj = _mm_loadu_ps(y+j);\n      __m128 y3 = _mm_loadu_ps(y+j+3);\n\n      xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0x00),yj));\n      xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0x55),\n                                          _mm_shuffle_ps(yj,y3,0x49)));\n      xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0xaa),\n                                          _mm_shuffle_ps(yj,y3,0x9e)));\n      xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0xff),y3));\n   }\n   if (j < len)\n   {\n      xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j)));\n      if (++j < len)\n      {\n         xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j)));\n         if (++j < len)\n         {\n            xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j)));\n         }\n      }\n   }\n   _mm_storeu_ps(sum,_mm_add_ps(xsum1,xsum2));\n}\n\n#define OVERRIDE_DUAL_INNER_PROD\nstatic OPUS_INLINE void dual_inner_prod(const opus_val16 *x, const opus_val16 *y01, const opus_val16 *y02,\n      int N, opus_val32 *xy1, opus_val32 *xy2)\n{\n   int i;\n   __m128 xsum1, xsum2;\n   xsum1 = _mm_setzero_ps();\n   xsum2 = _mm_setzero_ps();\n   for (i=0;i<N-3;i+=4)\n   {\n      __m128 xi = _mm_loadu_ps(x+i);\n      __m128 y1i = _mm_loadu_ps(y01+i);\n      __m128 y2i = _mm_loadu_ps(y02+i);\n      xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(xi, y1i));\n      xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(xi, y2i));\n   }\n   /* Horizontal sum */\n   xsum1 = _mm_add_ps(xsum1, _mm_movehl_ps(xsum1, xsum1));\n   xsum1 = _mm_add_ss(xsum1, _mm_shuffle_ps(xsum1, xsum1, 0x55));\n   _mm_store_ss(xy1, xsum1);\n   xsum2 = _mm_add_ps(xsum2, _mm_movehl_ps(xsum2, xsum2));\n   xsum2 = _mm_add_ss(xsum2, _mm_shuffle_ps(xsum2, xsum2, 0x55));\n   _mm_store_ss(xy2, xsum2);\n   for (;i<N;i++)\n   {\n      *xy1 = MAC16_16(*xy1, x[i], y01[i]);\n      *xy2 = MAC16_16(*xy2, x[i], y02[i]);\n   }\n}\n\n#define OVERRIDE_COMB_FILTER_CONST\nstatic OPUS_INLINE void comb_filter_const(opus_val32 *y, opus_val32 *x, int T, int N,\n      opus_val16 g10, opus_val16 g11, opus_val16 g12)\n{\n   int i;\n   __m128 x0v;\n   __m128 g10v, g11v, g12v;\n   g10v = _mm_load1_ps(&g10);\n   g11v = _mm_load1_ps(&g11);\n   g12v = _mm_load1_ps(&g12);\n   x0v = _mm_loadu_ps(&x[-T-2]);\n   for (i=0;i<N-3;i+=4)\n   {\n      __m128 yi, yi2, x1v, x2v, x3v, x4v;\n      const opus_val32 *xp = &x[i-T-2];\n      yi = _mm_loadu_ps(x+i);\n      x4v = _mm_loadu_ps(xp+4);\n#if 0\n      /* Slower version with all loads */\n      x1v = _mm_loadu_ps(xp+1);\n      x2v = _mm_loadu_ps(xp+2);\n      x3v = _mm_loadu_ps(xp+3);\n#else\n      x2v = _mm_shuffle_ps(x0v, x4v, 0x4e);\n      x1v = _mm_shuffle_ps(x0v, x2v, 0x99);\n      x3v = _mm_shuffle_ps(x2v, x4v, 0x99);\n#endif\n\n      yi = _mm_add_ps(yi, _mm_mul_ps(g10v,x2v));\n#if 0 /* Set to 1 to make it bit-exact with the non-SSE version */\n      yi = _mm_add_ps(yi, _mm_mul_ps(g11v,_mm_add_ps(x3v,x1v)));\n      yi = _mm_add_ps(yi, _mm_mul_ps(g12v,_mm_add_ps(x4v,x0v)));\n#else\n      /* Use partial sums */\n      yi2 = _mm_add_ps(_mm_mul_ps(g11v,_mm_add_ps(x3v,x1v)),\n                       _mm_mul_ps(g12v,_mm_add_ps(x4v,x0v)));\n      yi = _mm_add_ps(yi, yi2);\n#endif\n      x0v=x4v;\n      _mm_storeu_ps(y+i, yi);\n   }\n#ifdef CUSTOM_MODES\n   for (;i<N;i++)\n   {\n      y[i] = x[i]\n               + MULT16_32_Q15(g10,x[i-T])\n               + MULT16_32_Q15(g11,ADD32(x[i-T+1],x[i-T-1]))\n               + MULT16_32_Q15(g12,ADD32(x[i-T+2],x[i-T-2]));\n   }\n#endif\n}\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/include/opus.h",
    "content": "/* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited\n   Written by Jean-Marc Valin and Koen Vos */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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 * @file opus.h\n * @brief Opus reference implementation API\n */\n\n#ifndef OPUS_H\n#define OPUS_H\n\n#include \"opus_types.h\"\n#include \"opus_defines.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @mainpage Opus\n *\n * The Opus codec is designed for interactive speech and audio transmission over the Internet.\n * It is designed by the IETF Codec Working Group and incorporates technology from\n * Skype's SILK codec and Xiph.Org's CELT codec.\n *\n * The Opus codec is designed to handle a wide range of interactive audio applications,\n * including Voice over IP, videoconferencing, in-game chat, and even remote live music\n * performances. It can scale from low bit-rate narrowband speech to very high quality\n * stereo music. Its main features are:\n\n * @li Sampling rates from 8 to 48 kHz\n * @li Bit-rates from 6 kb/s to 510 kb/s\n * @li Support for both constant bit-rate (CBR) and variable bit-rate (VBR)\n * @li Audio bandwidth from narrowband to full-band\n * @li Support for speech and music\n * @li Support for mono and stereo\n * @li Support for multichannel (up to 255 channels)\n * @li Frame sizes from 2.5 ms to 60 ms\n * @li Good loss robustness and packet loss concealment (PLC)\n * @li Floating point and fixed-point implementation\n *\n * Documentation sections:\n * @li @ref opus_encoder\n * @li @ref opus_decoder\n * @li @ref opus_repacketizer\n * @li @ref opus_multistream\n * @li @ref opus_libinfo\n * @li @ref opus_custom\n */\n\n/** @defgroup opus_encoder Opus Encoder\n  * @{\n  *\n  * @brief This page describes the process and functions used to encode Opus.\n  *\n  * Since Opus is a stateful codec, the encoding process starts with creating an encoder\n  * state. This can be done with:\n  *\n  * @code\n  * int          error;\n  * OpusEncoder *enc;\n  * enc = opus_encoder_create(Fs, channels, application, &error);\n  * @endcode\n  *\n  * From this point, @c enc can be used for encoding an audio stream. An encoder state\n  * @b must @b not be used for more than one stream at the same time. Similarly, the encoder\n  * state @b must @b not be re-initialized for each frame.\n  *\n  * While opus_encoder_create() allocates memory for the state, it's also possible\n  * to initialize pre-allocated memory:\n  *\n  * @code\n  * int          size;\n  * int          error;\n  * OpusEncoder *enc;\n  * size = opus_encoder_get_size(channels);\n  * enc = malloc(size);\n  * error = opus_encoder_init(enc, Fs, channels, application);\n  * @endcode\n  *\n  * where opus_encoder_get_size() returns the required size for the encoder state. Note that\n  * future versions of this code may change the size, so no assuptions should be made about it.\n  *\n  * The encoder state is always continuous in memory and only a shallow copy is sufficient\n  * to copy it (e.g. memcpy())\n  *\n  * It is possible to change some of the encoder's settings using the opus_encoder_ctl()\n  * interface. All these settings already default to the recommended value, so they should\n  * only be changed when necessary. The most common settings one may want to change are:\n  *\n  * @code\n  * opus_encoder_ctl(enc, OPUS_SET_BITRATE(bitrate));\n  * opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(complexity));\n  * opus_encoder_ctl(enc, OPUS_SET_SIGNAL(signal_type));\n  * @endcode\n  *\n  * where\n  *\n  * @arg bitrate is in bits per second (b/s)\n  * @arg complexity is a value from 1 to 10, where 1 is the lowest complexity and 10 is the highest\n  * @arg signal_type is either OPUS_AUTO (default), OPUS_SIGNAL_VOICE, or OPUS_SIGNAL_MUSIC\n  *\n  * See @ref opus_encoderctls and @ref opus_genericctls for a complete list of parameters that can be set or queried. Most parameters can be set or changed at any time during a stream.\n  *\n  * To encode a frame, opus_encode() or opus_encode_float() must be called with exactly one frame (2.5, 5, 10, 20, 40 or 60 ms) of audio data:\n  * @code\n  * len = opus_encode(enc, audio_frame, frame_size, packet, max_packet);\n  * @endcode\n  *\n  * where\n  * <ul>\n  * <li>audio_frame is the audio data in opus_int16 (or float for opus_encode_float())</li>\n  * <li>frame_size is the duration of the frame in samples (per channel)</li>\n  * <li>packet is the byte array to which the compressed data is written</li>\n  * <li>max_packet is the maximum number of bytes that can be written in the packet (4000 bytes is recommended).\n  *     Do not use max_packet to control VBR target bitrate, instead use the #OPUS_SET_BITRATE CTL.</li>\n  * </ul>\n  *\n  * opus_encode() and opus_encode_float() return the number of bytes actually written to the packet.\n  * The return value <b>can be negative</b>, which indicates that an error has occurred. If the return value\n  * is 1 byte, then the packet does not need to be transmitted (DTX).\n  *\n  * Once the encoder state if no longer needed, it can be destroyed with\n  *\n  * @code\n  * opus_encoder_destroy(enc);\n  * @endcode\n  *\n  * If the encoder was created with opus_encoder_init() rather than opus_encoder_create(),\n  * then no action is required aside from potentially freeing the memory that was manually\n  * allocated for it (calling free(enc) for the example above)\n  *\n  */\n\n/** Opus encoder state.\n  * This contains the complete state of an Opus encoder.\n  * It is position independent and can be freely copied.\n  * @see opus_encoder_create,opus_encoder_init\n  */\ntypedef struct OpusEncoder OpusEncoder;\n\n/** Gets the size of an <code>OpusEncoder</code> structure.\n  * @param[in] channels <tt>int</tt>: Number of channels.\n  *                                   This must be 1 or 2.\n  * @returns The size in bytes.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_encoder_get_size(int channels);\n\n/**\n */\n\n/** Allocates and initializes an encoder state.\n * There are three coding modes:\n *\n * @ref OPUS_APPLICATION_VOIP gives best quality at a given bitrate for voice\n *    signals. It enhances the  input signal by high-pass filtering and\n *    emphasizing formants and harmonics. Optionally  it includes in-band\n *    forward error correction to protect against packet loss. Use this\n *    mode for typical VoIP applications. Because of the enhancement,\n *    even at high bitrates the output may sound different from the input.\n *\n * @ref OPUS_APPLICATION_AUDIO gives best quality at a given bitrate for most\n *    non-voice signals like music. Use this mode for music and mixed\n *    (music/voice) content, broadcast, and applications requiring less\n *    than 15 ms of coding delay.\n *\n * @ref OPUS_APPLICATION_RESTRICTED_LOWDELAY configures low-delay mode that\n *    disables the speech-optimized mode in exchange for slightly reduced delay.\n *    This mode can only be set on an newly initialized or freshly reset encoder\n *    because it changes the codec delay.\n *\n * This is useful when the caller knows that the speech-optimized modes will not be needed (use with caution).\n * @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz)\n *                                     This must be one of 8000, 12000, 16000,\n *                                     24000, or 48000.\n * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal\n * @param [in] application <tt>int</tt>: Coding mode (@ref OPUS_APPLICATION_VOIP/@ref OPUS_APPLICATION_AUDIO/@ref OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n * @param [out] error <tt>int*</tt>: @ref opus_errorcodes\n * @note Regardless of the sampling rate and number channels selected, the Opus encoder\n * can switch to a lower audio bandwidth or number of channels if the bitrate\n * selected is too low. This also means that it is safe to always use 48 kHz stereo input\n * and let the encoder optimize the encoding.\n */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusEncoder *opus_encoder_create(\n    opus_int32 Fs,\n    int channels,\n    int application,\n    int *error\n);\n\n/** Initializes a previously allocated encoder state\n  * The memory pointed to by st must be at least the size returned by opus_encoder_get_size().\n  * This is intended for applications which use their own allocator instead of malloc.\n  * @see opus_encoder_create(),opus_encoder_get_size()\n  * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.\n  * @param [in] st <tt>OpusEncoder*</tt>: Encoder state\n  * @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz)\n *                                      This must be one of 8000, 12000, 16000,\n *                                      24000, or 48000.\n  * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal\n  * @param [in] application <tt>int</tt>: Coding mode (OPUS_APPLICATION_VOIP/OPUS_APPLICATION_AUDIO/OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n  * @retval #OPUS_OK Success or @ref opus_errorcodes\n  */\nOPUS_EXPORT int opus_encoder_init(\n    OpusEncoder *st,\n    opus_int32 Fs,\n    int channels,\n    int application\n) OPUS_ARG_NONNULL(1);\n\n/** Encodes an Opus frame.\n  * @param [in] st <tt>OpusEncoder*</tt>: Encoder state\n  * @param [in] pcm <tt>opus_int16*</tt>: Input signal (interleaved if 2 channels). length is frame_size*channels*sizeof(opus_int16)\n  * @param [in] frame_size <tt>int</tt>: Number of samples per channel in the\n  *                                      input signal.\n  *                                      This must be an Opus frame size for\n  *                                      the encoder's sampling rate.\n  *                                      For example, at 48 kHz the permitted\n  *                                      values are 120, 240, 480, 960, 1920,\n  *                                      and 2880.\n  *                                      Passing in a duration of less than\n  *                                      10 ms (480 samples at 48 kHz) will\n  *                                      prevent the encoder from using the LPC\n  *                                      or hybrid modes.\n  * @param [out] data <tt>unsigned char*</tt>: Output payload.\n  *                                            This must contain storage for at\n  *                                            least \\a max_data_bytes.\n  * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated\n  *                                                 memory for the output\n  *                                                 payload. This may be\n  *                                                 used to impose an upper limit on\n  *                                                 the instant bitrate, but should\n  *                                                 not be used as the only bitrate\n  *                                                 control. Use #OPUS_SET_BITRATE to\n  *                                                 control the bitrate.\n  * @returns The length of the encoded packet (in bytes) on success or a\n  *          negative error code (see @ref opus_errorcodes) on failure.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_encode(\n    OpusEncoder *st,\n    const opus_int16 *pcm,\n    int frame_size,\n    unsigned char *data,\n    opus_int32 max_data_bytes\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);\n\n/** Encodes an Opus frame from floating point input.\n  * @param [in] st <tt>OpusEncoder*</tt>: Encoder state\n  * @param [in] pcm <tt>float*</tt>: Input in float format (interleaved if 2 channels), with a normal range of +/-1.0.\n  *          Samples with a range beyond +/-1.0 are supported but will\n  *          be clipped by decoders using the integer API and should\n  *          only be used if it is known that the far end supports\n  *          extended dynamic range.\n  *          length is frame_size*channels*sizeof(float)\n  * @param [in] frame_size <tt>int</tt>: Number of samples per channel in the\n  *                                      input signal.\n  *                                      This must be an Opus frame size for\n  *                                      the encoder's sampling rate.\n  *                                      For example, at 48 kHz the permitted\n  *                                      values are 120, 240, 480, 960, 1920,\n  *                                      and 2880.\n  *                                      Passing in a duration of less than\n  *                                      10 ms (480 samples at 48 kHz) will\n  *                                      prevent the encoder from using the LPC\n  *                                      or hybrid modes.\n  * @param [out] data <tt>unsigned char*</tt>: Output payload.\n  *                                            This must contain storage for at\n  *                                            least \\a max_data_bytes.\n  * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated\n  *                                                 memory for the output\n  *                                                 payload. This may be\n  *                                                 used to impose an upper limit on\n  *                                                 the instant bitrate, but should\n  *                                                 not be used as the only bitrate\n  *                                                 control. Use #OPUS_SET_BITRATE to\n  *                                                 control the bitrate.\n  * @returns The length of the encoded packet (in bytes) on success or a\n  *          negative error code (see @ref opus_errorcodes) on failure.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_encode_float(\n    OpusEncoder *st,\n    const float *pcm,\n    int frame_size,\n    unsigned char *data,\n    opus_int32 max_data_bytes\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);\n\n/** Frees an <code>OpusEncoder</code> allocated by opus_encoder_create().\n  * @param[in] st <tt>OpusEncoder*</tt>: State to be freed.\n  */\nOPUS_EXPORT void opus_encoder_destroy(OpusEncoder *st);\n\n/** Perform a CTL function on an Opus encoder.\n  *\n  * Generally the request and subsequent arguments are generated\n  * by a convenience macro.\n  * @param st <tt>OpusEncoder*</tt>: Encoder state.\n  * @param request This and all remaining parameters should be replaced by one\n  *                of the convenience macros in @ref opus_genericctls or\n  *                @ref opus_encoderctls.\n  * @see opus_genericctls\n  * @see opus_encoderctls\n  */\nOPUS_EXPORT int opus_encoder_ctl(OpusEncoder *st, int request, ...) OPUS_ARG_NONNULL(1);\n/**@}*/\n\n/** @defgroup opus_decoder Opus Decoder\n  * @{\n  *\n  * @brief This page describes the process and functions used to decode Opus.\n  *\n  * The decoding process also starts with creating a decoder\n  * state. This can be done with:\n  * @code\n  * int          error;\n  * OpusDecoder *dec;\n  * dec = opus_decoder_create(Fs, channels, &error);\n  * @endcode\n  * where\n  * @li Fs is the sampling rate and must be 8000, 12000, 16000, 24000, or 48000\n  * @li channels is the number of channels (1 or 2)\n  * @li error will hold the error code in case of failure (or #OPUS_OK on success)\n  * @li the return value is a newly created decoder state to be used for decoding\n  *\n  * While opus_decoder_create() allocates memory for the state, it's also possible\n  * to initialize pre-allocated memory:\n  * @code\n  * int          size;\n  * int          error;\n  * OpusDecoder *dec;\n  * size = opus_decoder_get_size(channels);\n  * dec = malloc(size);\n  * error = opus_decoder_init(dec, Fs, channels);\n  * @endcode\n  * where opus_decoder_get_size() returns the required size for the decoder state. Note that\n  * future versions of this code may change the size, so no assuptions should be made about it.\n  *\n  * The decoder state is always continuous in memory and only a shallow copy is sufficient\n  * to copy it (e.g. memcpy())\n  *\n  * To decode a frame, opus_decode() or opus_decode_float() must be called with a packet of compressed audio data:\n  * @code\n  * frame_size = opus_decode(dec, packet, len, decoded, max_size, 0);\n  * @endcode\n  * where\n  *\n  * @li packet is the byte array containing the compressed data\n  * @li len is the exact number of bytes contained in the packet\n  * @li decoded is the decoded audio data in opus_int16 (or float for opus_decode_float())\n  * @li max_size is the max duration of the frame in samples (per channel) that can fit into the decoded_frame array\n  *\n  * opus_decode() and opus_decode_float() return the number of samples (per channel) decoded from the packet.\n  * If that value is negative, then an error has occurred. This can occur if the packet is corrupted or if the audio\n  * buffer is too small to hold the decoded audio.\n  *\n  * Opus is a stateful codec with overlapping blocks and as a result Opus\n  * packets are not coded independently of each other. Packets must be\n  * passed into the decoder serially and in the correct order for a correct\n  * decode. Lost packets can be replaced with loss concealment by calling\n  * the decoder with a null pointer and zero length for the missing packet.\n  *\n  * A single codec state may only be accessed from a single thread at\n  * a time and any required locking must be performed by the caller. Separate\n  * streams must be decoded with separate decoder states and can be decoded\n  * in parallel unless the library was compiled with NONTHREADSAFE_PSEUDOSTACK\n  * defined.\n  *\n  */\n\n/** Opus decoder state.\n  * This contains the complete state of an Opus decoder.\n  * It is position independent and can be freely copied.\n  * @see opus_decoder_create,opus_decoder_init\n  */\ntypedef struct OpusDecoder OpusDecoder;\n\n/** Gets the size of an <code>OpusDecoder</code> structure.\n  * @param [in] channels <tt>int</tt>: Number of channels.\n  *                                    This must be 1 or 2.\n  * @returns The size in bytes.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decoder_get_size(int channels);\n\n/** Allocates and initializes a decoder state.\n  * @param [in] Fs <tt>opus_int32</tt>: Sample rate to decode at (Hz).\n  *                                     This must be one of 8000, 12000, 16000,\n  *                                     24000, or 48000.\n  * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode\n  * @param [out] error <tt>int*</tt>: #OPUS_OK Success or @ref opus_errorcodes\n  *\n  * Internally Opus stores data at 48000 Hz, so that should be the default\n  * value for Fs. However, the decoder can efficiently decode to buffers\n  * at 8, 12, 16, and 24 kHz so if for some reason the caller cannot use\n  * data at the full sample rate, or knows the compressed data doesn't\n  * use the full frequency range, it can request decoding at a reduced\n  * rate. Likewise, the decoder is capable of filling in either mono or\n  * interleaved stereo pcm buffers, at the caller's request.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusDecoder *opus_decoder_create(\n    opus_int32 Fs,\n    int channels,\n    int *error\n);\n\n/** Initializes a previously allocated decoder state.\n  * The state must be at least the size returned by opus_decoder_get_size().\n  * This is intended for applications which use their own allocator instead of malloc. @see opus_decoder_create,opus_decoder_get_size\n  * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.\n  * @param [in] st <tt>OpusDecoder*</tt>: Decoder state.\n  * @param [in] Fs <tt>opus_int32</tt>: Sampling rate to decode to (Hz).\n  *                                     This must be one of 8000, 12000, 16000,\n  *                                     24000, or 48000.\n  * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode\n  * @retval #OPUS_OK Success or @ref opus_errorcodes\n  */\nOPUS_EXPORT int opus_decoder_init(\n    OpusDecoder *st,\n    opus_int32 Fs,\n    int channels\n) OPUS_ARG_NONNULL(1);\n\n/** Decode an Opus packet.\n  * @param [in] st <tt>OpusDecoder*</tt>: Decoder state\n  * @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss\n  * @param [in] len <tt>opus_int32</tt>: Number of bytes in payload*\n  * @param [out] pcm <tt>opus_int16*</tt>: Output signal (interleaved if 2 channels). length\n  *  is frame_size*channels*sizeof(opus_int16)\n  * @param [in] frame_size Number of samples per channel of available space in \\a pcm.\n  *  If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will\n  *  not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1),\n  *  then frame_size needs to be exactly the duration of audio that is missing, otherwise the\n  *  decoder will not be in the optimal state to decode the next incoming packet. For the PLC and\n  *  FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms.\n  * @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be\n  *  decoded. If no such data is available, the frame is decoded as if it were lost.\n  * @returns Number of decoded samples or @ref opus_errorcodes\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decode(\n    OpusDecoder *st,\n    const unsigned char *data,\n    opus_int32 len,\n    opus_int16 *pcm,\n    int frame_size,\n    int decode_fec\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);\n\n/** Decode an Opus packet with floating point output.\n  * @param [in] st <tt>OpusDecoder*</tt>: Decoder state\n  * @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss\n  * @param [in] len <tt>opus_int32</tt>: Number of bytes in payload\n  * @param [out] pcm <tt>float*</tt>: Output signal (interleaved if 2 channels). length\n  *  is frame_size*channels*sizeof(float)\n  * @param [in] frame_size Number of samples per channel of available space in \\a pcm.\n  *  If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will\n  *  not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1),\n  *  then frame_size needs to be exactly the duration of audio that is missing, otherwise the\n  *  decoder will not be in the optimal state to decode the next incoming packet. For the PLC and\n  *  FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms.\n  * @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be\n  *  decoded. If no such data is available the frame is decoded as if it were lost.\n  * @returns Number of decoded samples or @ref opus_errorcodes\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decode_float(\n    OpusDecoder *st,\n    const unsigned char *data,\n    opus_int32 len,\n    float *pcm,\n    int frame_size,\n    int decode_fec\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);\n\n/** Perform a CTL function on an Opus decoder.\n  *\n  * Generally the request and subsequent arguments are generated\n  * by a convenience macro.\n  * @param st <tt>OpusDecoder*</tt>: Decoder state.\n  * @param request This and all remaining parameters should be replaced by one\n  *                of the convenience macros in @ref opus_genericctls or\n  *                @ref opus_decoderctls.\n  * @see opus_genericctls\n  * @see opus_decoderctls\n  */\nOPUS_EXPORT int opus_decoder_ctl(OpusDecoder *st, int request, ...) OPUS_ARG_NONNULL(1);\n\n/** Frees an <code>OpusDecoder</code> allocated by opus_decoder_create().\n  * @param[in] st <tt>OpusDecoder*</tt>: State to be freed.\n  */\nOPUS_EXPORT void opus_decoder_destroy(OpusDecoder *st);\n\n/** Parse an opus packet into one or more frames.\n  * Opus_decode will perform this operation internally so most applications do\n  * not need to use this function.\n  * This function does not copy the frames, the returned pointers are pointers into\n  * the input packet.\n  * @param [in] data <tt>char*</tt>: Opus packet to be parsed\n  * @param [in] len <tt>opus_int32</tt>: size of data\n  * @param [out] out_toc <tt>char*</tt>: TOC pointer\n  * @param [out] frames <tt>char*[48]</tt> encapsulated frames\n  * @param [out] size <tt>opus_int16[48]</tt> sizes of the encapsulated frames\n  * @param [out] payload_offset <tt>int*</tt>: returns the position of the payload within the packet (in bytes)\n  * @returns number of frames\n  */\nOPUS_EXPORT int opus_packet_parse(\n   const unsigned char *data,\n   opus_int32 len,\n   unsigned char *out_toc,\n   const unsigned char *frames[48],\n   opus_int16 size[48],\n   int *payload_offset\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);\n\n/** Gets the bandwidth of an Opus packet.\n  * @param [in] data <tt>char*</tt>: Opus packet\n  * @retval OPUS_BANDWIDTH_NARROWBAND Narrowband (4kHz bandpass)\n  * @retval OPUS_BANDWIDTH_MEDIUMBAND Mediumband (6kHz bandpass)\n  * @retval OPUS_BANDWIDTH_WIDEBAND Wideband (8kHz bandpass)\n  * @retval OPUS_BANDWIDTH_SUPERWIDEBAND Superwideband (12kHz bandpass)\n  * @retval OPUS_BANDWIDTH_FULLBAND Fullband (20kHz bandpass)\n  * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_bandwidth(const unsigned char *data) OPUS_ARG_NONNULL(1);\n\n/** Gets the number of samples per frame from an Opus packet.\n  * @param [in] data <tt>char*</tt>: Opus packet.\n  *                                  This must contain at least one byte of\n  *                                  data.\n  * @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz.\n  *                                     This must be a multiple of 400, or\n  *                                     inaccurate results will be returned.\n  * @returns Number of samples per frame.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_samples_per_frame(const unsigned char *data, opus_int32 Fs) OPUS_ARG_NONNULL(1);\n\n/** Gets the number of channels from an Opus packet.\n  * @param [in] data <tt>char*</tt>: Opus packet\n  * @returns Number of channels\n  * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_channels(const unsigned char *data) OPUS_ARG_NONNULL(1);\n\n/** Gets the number of frames in an Opus packet.\n  * @param [in] packet <tt>char*</tt>: Opus packet\n  * @param [in] len <tt>opus_int32</tt>: Length of packet\n  * @returns Number of frames\n  * @retval OPUS_BAD_ARG Insufficient data was passed to the function\n  * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_frames(const unsigned char packet[], opus_int32 len) OPUS_ARG_NONNULL(1);\n\n/** Gets the number of samples of an Opus packet.\n  * @param [in] packet <tt>char*</tt>: Opus packet\n  * @param [in] len <tt>opus_int32</tt>: Length of packet\n  * @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz.\n  *                                     This must be a multiple of 400, or\n  *                                     inaccurate results will be returned.\n  * @returns Number of samples\n  * @retval OPUS_BAD_ARG Insufficient data was passed to the function\n  * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_samples(const unsigned char packet[], opus_int32 len, opus_int32 Fs) OPUS_ARG_NONNULL(1);\n\n/** Gets the number of samples of an Opus packet.\n  * @param [in] dec <tt>OpusDecoder*</tt>: Decoder state\n  * @param [in] packet <tt>char*</tt>: Opus packet\n  * @param [in] len <tt>opus_int32</tt>: Length of packet\n  * @returns Number of samples\n  * @retval OPUS_BAD_ARG Insufficient data was passed to the function\n  * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decoder_get_nb_samples(const OpusDecoder *dec, const unsigned char packet[], opus_int32 len) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);\n\n/** Applies soft-clipping to bring a float signal within the [-1,1] range. If\n  * the signal is already in that range, nothing is done. If there are values\n  * outside of [-1,1], then the signal is clipped as smoothly as possible to\n  * both fit in the range and avoid creating excessive distortion in the\n  * process.\n  * @param [in,out] pcm <tt>float*</tt>: Input PCM and modified PCM\n  * @param [in] frame_size <tt>int</tt> Number of samples per channel to process\n  * @param [in] channels <tt>int</tt>: Number of channels\n  * @param [in,out] softclip_mem <tt>float*</tt>: State memory for the soft clipping process (one float per channel, initialized to zero)\n  */\nOPUS_EXPORT void opus_pcm_soft_clip(float *pcm, int frame_size, int channels, float *softclip_mem);\n\n\n/**@}*/\n\n/** @defgroup opus_repacketizer Repacketizer\n  * @{\n  *\n  * The repacketizer can be used to merge multiple Opus packets into a single\n  * packet or alternatively to split Opus packets that have previously been\n  * merged. Splitting valid Opus packets is always guaranteed to succeed,\n  * whereas merging valid packets only succeeds if all frames have the same\n  * mode, bandwidth, and frame size, and when the total duration of the merged\n  * packet is no more than 120 ms.\n  * The repacketizer currently only operates on elementary Opus\n  * streams. It will not manipualte multistream packets successfully, except in\n  * the degenerate case where they consist of data from a single stream.\n  *\n  * The repacketizing process starts with creating a repacketizer state, either\n  * by calling opus_repacketizer_create() or by allocating the memory yourself,\n  * e.g.,\n  * @code\n  * OpusRepacketizer *rp;\n  * rp = (OpusRepacketizer*)malloc(opus_repacketizer_get_size());\n  * if (rp != NULL)\n  *     opus_repacketizer_init(rp);\n  * @endcode\n  *\n  * Then the application should submit packets with opus_repacketizer_cat(),\n  * extract new packets with opus_repacketizer_out() or\n  * opus_repacketizer_out_range(), and then reset the state for the next set of\n  * input packets via opus_repacketizer_init().\n  *\n  * For example, to split a sequence of packets into individual frames:\n  * @code\n  * unsigned char *data;\n  * int len;\n  * while (get_next_packet(&data, &len))\n  * {\n  *   unsigned char out[1276];\n  *   opus_int32 out_len;\n  *   int nb_frames;\n  *   int err;\n  *   int i;\n  *   err = opus_repacketizer_cat(rp, data, len);\n  *   if (err != OPUS_OK)\n  *   {\n  *     release_packet(data);\n  *     return err;\n  *   }\n  *   nb_frames = opus_repacketizer_get_nb_frames(rp);\n  *   for (i = 0; i < nb_frames; i++)\n  *   {\n  *     out_len = opus_repacketizer_out_range(rp, i, i+1, out, sizeof(out));\n  *     if (out_len < 0)\n  *     {\n  *        release_packet(data);\n  *        return (int)out_len;\n  *     }\n  *     output_next_packet(out, out_len);\n  *   }\n  *   opus_repacketizer_init(rp);\n  *   release_packet(data);\n  * }\n  * @endcode\n  *\n  * Alternatively, to combine a sequence of frames into packets that each\n  * contain up to <code>TARGET_DURATION_MS</code> milliseconds of data:\n  * @code\n  * // The maximum number of packets with duration TARGET_DURATION_MS occurs\n  * // when the frame size is 2.5 ms, for a total of (TARGET_DURATION_MS*2/5)\n  * // packets.\n  * unsigned char *data[(TARGET_DURATION_MS*2/5)+1];\n  * opus_int32 len[(TARGET_DURATION_MS*2/5)+1];\n  * int nb_packets;\n  * unsigned char out[1277*(TARGET_DURATION_MS*2/2)];\n  * opus_int32 out_len;\n  * int prev_toc;\n  * nb_packets = 0;\n  * while (get_next_packet(data+nb_packets, len+nb_packets))\n  * {\n  *   int nb_frames;\n  *   int err;\n  *   nb_frames = opus_packet_get_nb_frames(data[nb_packets], len[nb_packets]);\n  *   if (nb_frames < 1)\n  *   {\n  *     release_packets(data, nb_packets+1);\n  *     return nb_frames;\n  *   }\n  *   nb_frames += opus_repacketizer_get_nb_frames(rp);\n  *   // If adding the next packet would exceed our target, or it has an\n  *   // incompatible TOC sequence, output the packets we already have before\n  *   // submitting it.\n  *   // N.B., The nb_packets > 0 check ensures we've submitted at least one\n  *   // packet since the last call to opus_repacketizer_init(). Otherwise a\n  *   // single packet longer than TARGET_DURATION_MS would cause us to try to\n  *   // output an (invalid) empty packet. It also ensures that prev_toc has\n  *   // been set to a valid value. Additionally, len[nb_packets] > 0 is\n  *   // guaranteed by the call to opus_packet_get_nb_frames() above, so the\n  *   // reference to data[nb_packets][0] should be valid.\n  *   if (nb_packets > 0 && (\n  *       ((prev_toc & 0xFC) != (data[nb_packets][0] & 0xFC)) ||\n  *       opus_packet_get_samples_per_frame(data[nb_packets], 48000)*nb_frames >\n  *       TARGET_DURATION_MS*48))\n  *   {\n  *     out_len = opus_repacketizer_out(rp, out, sizeof(out));\n  *     if (out_len < 0)\n  *     {\n  *        release_packets(data, nb_packets+1);\n  *        return (int)out_len;\n  *     }\n  *     output_next_packet(out, out_len);\n  *     opus_repacketizer_init(rp);\n  *     release_packets(data, nb_packets);\n  *     data[0] = data[nb_packets];\n  *     len[0] = len[nb_packets];\n  *     nb_packets = 0;\n  *   }\n  *   err = opus_repacketizer_cat(rp, data[nb_packets], len[nb_packets]);\n  *   if (err != OPUS_OK)\n  *   {\n  *     release_packets(data, nb_packets+1);\n  *     return err;\n  *   }\n  *   prev_toc = data[nb_packets][0];\n  *   nb_packets++;\n  * }\n  * // Output the final, partial packet.\n  * if (nb_packets > 0)\n  * {\n  *   out_len = opus_repacketizer_out(rp, out, sizeof(out));\n  *   release_packets(data, nb_packets);\n  *   if (out_len < 0)\n  *     return (int)out_len;\n  *   output_next_packet(out, out_len);\n  * }\n  * @endcode\n  *\n  * An alternate way of merging packets is to simply call opus_repacketizer_cat()\n  * unconditionally until it fails. At that point, the merged packet can be\n  * obtained with opus_repacketizer_out() and the input packet for which\n  * opus_repacketizer_cat() needs to be re-added to a newly reinitialized\n  * repacketizer state.\n  */\n\ntypedef struct OpusRepacketizer OpusRepacketizer;\n\n/** Gets the size of an <code>OpusRepacketizer</code> structure.\n  * @returns The size in bytes.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_repacketizer_get_size(void);\n\n/** (Re)initializes a previously allocated repacketizer state.\n  * The state must be at least the size returned by opus_repacketizer_get_size().\n  * This can be used for applications which use their own allocator instead of\n  * malloc().\n  * It must also be called to reset the queue of packets waiting to be\n  * repacketized, which is necessary if the maximum packet duration of 120 ms\n  * is reached or if you wish to submit packets with a different Opus\n  * configuration (coding mode, audio bandwidth, frame size, or channel count).\n  * Failure to do so will prevent a new packet from being added with\n  * opus_repacketizer_cat().\n  * @see opus_repacketizer_create\n  * @see opus_repacketizer_get_size\n  * @see opus_repacketizer_cat\n  * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to\n  *                                       (re)initialize.\n  * @returns A pointer to the same repacketizer state that was passed in.\n  */\nOPUS_EXPORT OpusRepacketizer *opus_repacketizer_init(OpusRepacketizer *rp) OPUS_ARG_NONNULL(1);\n\n/** Allocates memory and initializes the new repacketizer with\n * opus_repacketizer_init().\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusRepacketizer *opus_repacketizer_create(void);\n\n/** Frees an <code>OpusRepacketizer</code> allocated by\n  * opus_repacketizer_create().\n  * @param[in] rp <tt>OpusRepacketizer*</tt>: State to be freed.\n  */\nOPUS_EXPORT void opus_repacketizer_destroy(OpusRepacketizer *rp);\n\n/** Add a packet to the current repacketizer state.\n  * This packet must match the configuration of any packets already submitted\n  * for repacketization since the last call to opus_repacketizer_init().\n  * This means that it must have the same coding mode, audio bandwidth, frame\n  * size, and channel count.\n  * This can be checked in advance by examining the top 6 bits of the first\n  * byte of the packet, and ensuring they match the top 6 bits of the first\n  * byte of any previously submitted packet.\n  * The total duration of audio in the repacketizer state also must not exceed\n  * 120 ms, the maximum duration of a single packet, after adding this packet.\n  *\n  * The contents of the current repacketizer state can be extracted into new\n  * packets using opus_repacketizer_out() or opus_repacketizer_out_range().\n  *\n  * In order to add a packet with a different configuration or to add more\n  * audio beyond 120 ms, you must clear the repacketizer state by calling\n  * opus_repacketizer_init().\n  * If a packet is too large to add to the current repacketizer state, no part\n  * of it is added, even if it contains multiple frames, some of which might\n  * fit.\n  * If you wish to be able to add parts of such packets, you should first use\n  * another repacketizer to split the packet into pieces and add them\n  * individually.\n  * @see opus_repacketizer_out_range\n  * @see opus_repacketizer_out\n  * @see opus_repacketizer_init\n  * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to which to\n  *                                       add the packet.\n  * @param[in] data <tt>const unsigned char*</tt>: The packet data.\n  *                                                The application must ensure\n  *                                                this pointer remains valid\n  *                                                until the next call to\n  *                                                opus_repacketizer_init() or\n  *                                                opus_repacketizer_destroy().\n  * @param len <tt>opus_int32</tt>: The number of bytes in the packet data.\n  * @returns An error code indicating whether or not the operation succeeded.\n  * @retval #OPUS_OK The packet's contents have been added to the repacketizer\n  *                  state.\n  * @retval #OPUS_INVALID_PACKET The packet did not have a valid TOC sequence,\n  *                              the packet's TOC sequence was not compatible\n  *                              with previously submitted packets (because\n  *                              the coding mode, audio bandwidth, frame size,\n  *                              or channel count did not match), or adding\n  *                              this packet would increase the total amount of\n  *                              audio stored in the repacketizer state to more\n  *                              than 120 ms.\n  */\nOPUS_EXPORT int opus_repacketizer_cat(OpusRepacketizer *rp, const unsigned char *data, opus_int32 len) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);\n\n\n/** Construct a new packet from data previously submitted to the repacketizer\n  * state via opus_repacketizer_cat().\n  * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to\n  *                                       construct the new packet.\n  * @param begin <tt>int</tt>: The index of the first frame in the current\n  *                            repacketizer state to include in the output.\n  * @param end <tt>int</tt>: One past the index of the last frame in the\n  *                          current repacketizer state to include in the\n  *                          output.\n  * @param[out] data <tt>const unsigned char*</tt>: The buffer in which to\n  *                                                 store the output packet.\n  * @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in\n  *                                    the output buffer. In order to guarantee\n  *                                    success, this should be at least\n  *                                    <code>1276</code> for a single frame,\n  *                                    or for multiple frames,\n  *                                    <code>1277*(end-begin)</code>.\n  *                                    However, <code>1*(end-begin)</code> plus\n  *                                    the size of all packet data submitted to\n  *                                    the repacketizer since the last call to\n  *                                    opus_repacketizer_init() or\n  *                                    opus_repacketizer_create() is also\n  *                                    sufficient, and possibly much smaller.\n  * @returns The total size of the output packet on success, or an error code\n  *          on failure.\n  * @retval #OPUS_BAD_ARG <code>[begin,end)</code> was an invalid range of\n  *                       frames (begin < 0, begin >= end, or end >\n  *                       opus_repacketizer_get_nb_frames()).\n  * @retval #OPUS_BUFFER_TOO_SMALL \\a maxlen was insufficient to contain the\n  *                                complete output packet.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_repacketizer_out_range(OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);\n\n/** Return the total number of frames contained in packet data submitted to\n  * the repacketizer state so far via opus_repacketizer_cat() since the last\n  * call to opus_repacketizer_init() or opus_repacketizer_create().\n  * This defines the valid range of packets that can be extracted with\n  * opus_repacketizer_out_range() or opus_repacketizer_out().\n  * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state containing the\n  *                                       frames.\n  * @returns The total number of frames contained in the packet data submitted\n  *          to the repacketizer state.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_repacketizer_get_nb_frames(OpusRepacketizer *rp) OPUS_ARG_NONNULL(1);\n\n/** Construct a new packet from data previously submitted to the repacketizer\n  * state via opus_repacketizer_cat().\n  * This is a convenience routine that returns all the data submitted so far\n  * in a single packet.\n  * It is equivalent to calling\n  * @code\n  * opus_repacketizer_out_range(rp, 0, opus_repacketizer_get_nb_frames(rp),\n  *                             data, maxlen)\n  * @endcode\n  * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to\n  *                                       construct the new packet.\n  * @param[out] data <tt>const unsigned char*</tt>: The buffer in which to\n  *                                                 store the output packet.\n  * @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in\n  *                                    the output buffer. In order to guarantee\n  *                                    success, this should be at least\n  *                                    <code>1277*opus_repacketizer_get_nb_frames(rp)</code>.\n  *                                    However,\n  *                                    <code>1*opus_repacketizer_get_nb_frames(rp)</code>\n  *                                    plus the size of all packet data\n  *                                    submitted to the repacketizer since the\n  *                                    last call to opus_repacketizer_init() or\n  *                                    opus_repacketizer_create() is also\n  *                                    sufficient, and possibly much smaller.\n  * @returns The total size of the output packet on success, or an error code\n  *          on failure.\n  * @retval #OPUS_BUFFER_TOO_SMALL \\a maxlen was insufficient to contain the\n  *                                complete output packet.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_repacketizer_out(OpusRepacketizer *rp, unsigned char *data, opus_int32 maxlen) OPUS_ARG_NONNULL(1);\n\n/** Pads a given Opus packet to a larger size (possibly changing the TOC sequence).\n  * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the\n  *                                                   packet to pad.\n  * @param len <tt>opus_int32</tt>: The size of the packet.\n  *                                 This must be at least 1.\n  * @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding.\n  *                                 This must be at least as large as len.\n  * @returns an error code\n  * @retval #OPUS_OK \\a on success.\n  * @retval #OPUS_BAD_ARG \\a len was less than 1 or new_len was less than len.\n  * @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet.\n  */\nOPUS_EXPORT int opus_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len);\n\n/** Remove all padding from a given Opus packet and rewrite the TOC sequence to\n  * minimize space usage.\n  * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the\n  *                                                   packet to strip.\n  * @param len <tt>opus_int32</tt>: The size of the packet.\n  *                                 This must be at least 1.\n  * @returns The new size of the output packet on success, or an error code\n  *          on failure.\n  * @retval #OPUS_BAD_ARG \\a len was less than 1.\n  * @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_packet_unpad(unsigned char *data, opus_int32 len);\n\n/** Pads a given Opus multi-stream packet to a larger size (possibly changing the TOC sequence).\n  * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the\n  *                                                   packet to pad.\n  * @param len <tt>opus_int32</tt>: The size of the packet.\n  *                                 This must be at least 1.\n  * @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding.\n  *                                 This must be at least 1.\n  * @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet.\n  *                                 This must be at least as large as len.\n  * @returns an error code\n  * @retval #OPUS_OK \\a on success.\n  * @retval #OPUS_BAD_ARG \\a len was less than 1.\n  * @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet.\n  */\nOPUS_EXPORT int opus_multistream_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len, int nb_streams);\n\n/** Remove all padding from a given Opus multi-stream packet and rewrite the TOC sequence to\n  * minimize space usage.\n  * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the\n  *                                                   packet to strip.\n  * @param len <tt>opus_int32</tt>: The size of the packet.\n  *                                 This must be at least 1.\n  * @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet.\n  *                                 This must be at least 1.\n  * @returns The new size of the output packet on success, or an error code\n  *          on failure.\n  * @retval #OPUS_BAD_ARG \\a len was less than 1 or new_len was less than len.\n  * @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_packet_unpad(unsigned char *data, opus_int32 len, int nb_streams);\n\n/**@}*/\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* OPUS_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/include/opus_custom.h",
    "content": "/* Copyright (c) 2007-2008 CSIRO\n   Copyright (c) 2007-2009 Xiph.Org Foundation\n   Copyright (c) 2008-2012 Gregory Maxwell\n   Written by Jean-Marc Valin and Gregory Maxwell */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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  @file opus_custom.h\n  @brief Opus-Custom reference implementation API\n */\n\n#ifndef OPUS_CUSTOM_H\n#define OPUS_CUSTOM_H\n\n#include \"opus_defines.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifdef CUSTOM_MODES\n# define OPUS_CUSTOM_EXPORT OPUS_EXPORT\n# define OPUS_CUSTOM_EXPORT_STATIC OPUS_EXPORT\n#else\n# define OPUS_CUSTOM_EXPORT\n# ifdef OPUS_BUILD\n#  define OPUS_CUSTOM_EXPORT_STATIC static OPUS_INLINE\n# else\n#  define OPUS_CUSTOM_EXPORT_STATIC\n# endif\n#endif\n\n/** @defgroup opus_custom Opus Custom\n  * @{\n  *  Opus Custom is an optional part of the Opus specification and\n  * reference implementation which uses a distinct API from the regular\n  * API and supports frame sizes that are not normally supported.\\ Use\n  * of Opus Custom is discouraged for all but very special applications\n  * for which a frame size different from 2.5, 5, 10, or 20 ms is needed\n  * (for either complexity or latency reasons) and where interoperability\n  * is less important.\n  *\n  * In addition to the interoperability limitations the use of Opus custom\n  * disables a substantial chunk of the codec and generally lowers the\n  * quality available at a given bitrate. Normally when an application needs\n  * a different frame size from the codec it should buffer to match the\n  * sizes but this adds a small amount of delay which may be important\n  * in some very low latency applications. Some transports (especially\n  * constant rate RF transports) may also work best with frames of\n  * particular durations.\n  *\n  * Libopus only supports custom modes if they are enabled at compile time.\n  *\n  * The Opus Custom API is similar to the regular API but the\n  * @ref opus_encoder_create and @ref opus_decoder_create calls take\n  * an additional mode parameter which is a structure produced by\n  * a call to @ref opus_custom_mode_create. Both the encoder and decoder\n  * must create a mode using the same sample rate (fs) and frame size\n  * (frame size) so these parameters must either be signaled out of band\n  * or fixed in a particular implementation.\n  *\n  * Similar to regular Opus the custom modes support on the fly frame size\n  * switching, but the sizes available depend on the particular frame size in\n  * use. For some initial frame sizes on a single on the fly size is available.\n  */\n\n/** Contains the state of an encoder. One encoder state is needed\n    for each stream. It is initialized once at the beginning of the\n    stream. Do *not* re-initialize the state for every frame.\n   @brief Encoder state\n */\ntypedef struct OpusCustomEncoder OpusCustomEncoder;\n\n/** State of the decoder. One decoder state is needed for each stream.\n    It is initialized once at the beginning of the stream. Do *not*\n    re-initialize the state for every frame.\n   @brief Decoder state\n */\ntypedef struct OpusCustomDecoder OpusCustomDecoder;\n\n/** The mode contains all the information necessary to create an\n    encoder. Both the encoder and decoder need to be initialized\n    with exactly the same mode, otherwise the output will be\n    corrupted.\n   @brief Mode configuration\n */\ntypedef struct OpusCustomMode OpusCustomMode;\n\n/** Creates a new mode struct. This will be passed to an encoder or\n  * decoder. The mode MUST NOT BE DESTROYED until the encoders and\n  * decoders that use it are destroyed as well.\n  * @param [in] Fs <tt>int</tt>: Sampling rate (8000 to 96000 Hz)\n  * @param [in] frame_size <tt>int</tt>: Number of samples (per channel) to encode in each\n  *        packet (64 - 1024, prime factorization must contain zero or more 2s, 3s, or 5s and no other primes)\n  * @param [out] error <tt>int*</tt>: Returned error code (if NULL, no error will be returned)\n  * @return A newly created mode\n  */\nOPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error);\n\n/** Destroys a mode struct. Only call this after all encoders and\n  * decoders using this mode are destroyed as well.\n  * @param [in] mode <tt>OpusCustomMode*</tt>: Mode to be freed.\n  */\nOPUS_CUSTOM_EXPORT void opus_custom_mode_destroy(OpusCustomMode *mode);\n\n\n#if !defined(OPUS_BUILD) || defined(CELT_ENCODER_C)\n\n/* Encoder */\n/** Gets the size of an OpusCustomEncoder structure.\n  * @param [in] mode <tt>OpusCustomMode *</tt>: Mode configuration\n  * @param [in] channels <tt>int</tt>: Number of channels\n  * @returns size\n  */\nOPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_encoder_get_size(\n    const OpusCustomMode *mode,\n    int channels\n) OPUS_ARG_NONNULL(1);\n\n# ifdef CUSTOM_MODES\n/** Initializes a previously allocated encoder state\n  * The memory pointed to by st must be the size returned by opus_custom_encoder_get_size.\n  * This is intended for applications which use their own allocator instead of malloc.\n  * @see opus_custom_encoder_create(),opus_custom_encoder_get_size()\n  * To reset a previously initialized state use the OPUS_RESET_STATE CTL.\n  * @param [in] st <tt>OpusCustomEncoder*</tt>: Encoder state\n  * @param [in] mode <tt>OpusCustomMode *</tt>: Contains all the information about the characteristics of\n  *  the stream (must be the same characteristics as used for the\n  *  decoder)\n  * @param [in] channels <tt>int</tt>: Number of channels\n  * @return OPUS_OK Success or @ref opus_errorcodes\n  */\nOPUS_CUSTOM_EXPORT int opus_custom_encoder_init(\n    OpusCustomEncoder *st,\n    const OpusCustomMode *mode,\n    int channels\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);\n# endif\n#endif\n\n\n/** Creates a new encoder state. Each stream needs its own encoder\n  * state (can't be shared across simultaneous streams).\n  * @param [in] mode <tt>OpusCustomMode*</tt>: Contains all the information about the characteristics of\n  *  the stream (must be the same characteristics as used for the\n  *  decoder)\n  * @param [in] channels <tt>int</tt>: Number of channels\n  * @param [out] error <tt>int*</tt>: Returns an error code\n  * @return Newly created encoder state.\n*/\nOPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomEncoder *opus_custom_encoder_create(\n    const OpusCustomMode *mode,\n    int channels,\n    int *error\n) OPUS_ARG_NONNULL(1);\n\n\n/** Destroys a an encoder state.\n  * @param[in] st <tt>OpusCustomEncoder*</tt>: State to be freed.\n  */\nOPUS_CUSTOM_EXPORT void opus_custom_encoder_destroy(OpusCustomEncoder *st);\n\n/** Encodes a frame of audio.\n  * @param [in] st <tt>OpusCustomEncoder*</tt>: Encoder state\n  * @param [in] pcm <tt>float*</tt>: PCM audio in float format, with a normal range of +/-1.0.\n  *          Samples with a range beyond +/-1.0 are supported but will\n  *          be clipped by decoders using the integer API and should\n  *          only be used if it is known that the far end supports\n  *          extended dynamic range. There must be exactly\n  *          frame_size samples per channel.\n  * @param [in] frame_size <tt>int</tt>: Number of samples per frame of input signal\n  * @param [out] compressed <tt>char *</tt>: The compressed data is written here. This may not alias pcm and must be at least maxCompressedBytes long.\n  * @param [in] maxCompressedBytes <tt>int</tt>: Maximum number of bytes to use for compressing the frame\n  *          (can change from one frame to another)\n  * @return Number of bytes written to \"compressed\".\n  *       If negative, an error has occurred (see error codes). It is IMPORTANT that\n  *       the length returned be somehow transmitted to the decoder. Otherwise, no\n  *       decoding is possible.\n  */\nOPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_encode_float(\n    OpusCustomEncoder *st,\n    const float *pcm,\n    int frame_size,\n    unsigned char *compressed,\n    int maxCompressedBytes\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);\n\n/** Encodes a frame of audio.\n  * @param [in] st <tt>OpusCustomEncoder*</tt>: Encoder state\n  * @param [in] pcm <tt>opus_int16*</tt>: PCM audio in signed 16-bit format (native endian).\n  *          There must be exactly frame_size samples per channel.\n  * @param [in] frame_size <tt>int</tt>: Number of samples per frame of input signal\n  * @param [out] compressed <tt>char *</tt>: The compressed data is written here. This may not alias pcm and must be at least maxCompressedBytes long.\n  * @param [in] maxCompressedBytes <tt>int</tt>: Maximum number of bytes to use for compressing the frame\n  *          (can change from one frame to another)\n  * @return Number of bytes written to \"compressed\".\n  *       If negative, an error has occurred (see error codes). It is IMPORTANT that\n  *       the length returned be somehow transmitted to the decoder. Otherwise, no\n  *       decoding is possible.\n */\nOPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_encode(\n    OpusCustomEncoder *st,\n    const opus_int16 *pcm,\n    int frame_size,\n    unsigned char *compressed,\n    int maxCompressedBytes\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);\n\n/** Perform a CTL function on an Opus custom encoder.\n  *\n  * Generally the request and subsequent arguments are generated\n  * by a convenience macro.\n  * @see opus_encoderctls\n  */\nOPUS_CUSTOM_EXPORT int opus_custom_encoder_ctl(OpusCustomEncoder * OPUS_RESTRICT st, int request, ...) OPUS_ARG_NONNULL(1);\n\n\n#if !defined(OPUS_BUILD) || defined(CELT_DECODER_C)\n/* Decoder */\n\n/** Gets the size of an OpusCustomDecoder structure.\n  * @param [in] mode <tt>OpusCustomMode *</tt>: Mode configuration\n  * @param [in] channels <tt>int</tt>: Number of channels\n  * @returns size\n  */\nOPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_decoder_get_size(\n    const OpusCustomMode *mode,\n    int channels\n) OPUS_ARG_NONNULL(1);\n\n/** Initializes a previously allocated decoder state\n  * The memory pointed to by st must be the size returned by opus_custom_decoder_get_size.\n  * This is intended for applications which use their own allocator instead of malloc.\n  * @see opus_custom_decoder_create(),opus_custom_decoder_get_size()\n  * To reset a previously initialized state use the OPUS_RESET_STATE CTL.\n  * @param [in] st <tt>OpusCustomDecoder*</tt>: Decoder state\n  * @param [in] mode <tt>OpusCustomMode *</tt>: Contains all the information about the characteristics of\n  *  the stream (must be the same characteristics as used for the\n  *  encoder)\n  * @param [in] channels <tt>int</tt>: Number of channels\n  * @return OPUS_OK Success or @ref opus_errorcodes\n  */\nOPUS_CUSTOM_EXPORT_STATIC int opus_custom_decoder_init(\n    OpusCustomDecoder *st,\n    const OpusCustomMode *mode,\n    int channels\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);\n\n#endif\n\n\n/** Creates a new decoder state. Each stream needs its own decoder state (can't\n  * be shared across simultaneous streams).\n  * @param [in] mode <tt>OpusCustomMode</tt>: Contains all the information about the characteristics of the\n  *          stream (must be the same characteristics as used for the encoder)\n  * @param [in] channels <tt>int</tt>: Number of channels\n  * @param [out] error <tt>int*</tt>: Returns an error code\n  * @return Newly created decoder state.\n  */\nOPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomDecoder *opus_custom_decoder_create(\n    const OpusCustomMode *mode,\n    int channels,\n    int *error\n) OPUS_ARG_NONNULL(1);\n\n/** Destroys a an decoder state.\n  * @param[in] st <tt>OpusCustomDecoder*</tt>: State to be freed.\n  */\nOPUS_CUSTOM_EXPORT void opus_custom_decoder_destroy(OpusCustomDecoder *st);\n\n/** Decode an opus custom frame with floating point output\n  * @param [in] st <tt>OpusCustomDecoder*</tt>: Decoder state\n  * @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss\n  * @param [in] len <tt>int</tt>: Number of bytes in payload\n  * @param [out] pcm <tt>float*</tt>: Output signal (interleaved if 2 channels). length\n  *  is frame_size*channels*sizeof(float)\n  * @param [in] frame_size Number of samples per channel of available space in *pcm.\n  * @returns Number of decoded samples or @ref opus_errorcodes\n  */\nOPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_decode_float(\n    OpusCustomDecoder *st,\n    const unsigned char *data,\n    int len,\n    float *pcm,\n    int frame_size\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);\n\n/** Decode an opus custom frame\n  * @param [in] st <tt>OpusCustomDecoder*</tt>: Decoder state\n  * @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss\n  * @param [in] len <tt>int</tt>: Number of bytes in payload\n  * @param [out] pcm <tt>opus_int16*</tt>: Output signal (interleaved if 2 channels). length\n  *  is frame_size*channels*sizeof(opus_int16)\n  * @param [in] frame_size Number of samples per channel of available space in *pcm.\n  * @returns Number of decoded samples or @ref opus_errorcodes\n  */\nOPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_decode(\n    OpusCustomDecoder *st,\n    const unsigned char *data,\n    int len,\n    opus_int16 *pcm,\n    int frame_size\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);\n\n/** Perform a CTL function on an Opus custom decoder.\n  *\n  * Generally the request and subsequent arguments are generated\n  * by a convenience macro.\n  * @see opus_genericctls\n  */\nOPUS_CUSTOM_EXPORT int opus_custom_decoder_ctl(OpusCustomDecoder * OPUS_RESTRICT st, int request, ...) OPUS_ARG_NONNULL(1);\n\n/**@}*/\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* OPUS_CUSTOM_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/include/opus_defines.h",
    "content": "/* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited\n   Written by Jean-Marc Valin and Koen Vos */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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 * @file opus_defines.h\n * @brief Opus reference implementation constants\n */\n\n#ifndef OPUS_DEFINES_H\n#define OPUS_DEFINES_H\n\n#include \"opus_types.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @defgroup opus_errorcodes Error codes\n * @{\n */\n/** No error @hideinitializer*/\n#define OPUS_OK                0\n/** One or more invalid/out of range arguments @hideinitializer*/\n#define OPUS_BAD_ARG          -1\n/** The mode struct passed is invalid @hideinitializer*/\n#define OPUS_BUFFER_TOO_SMALL -2\n/** An internal error was detected @hideinitializer*/\n#define OPUS_INTERNAL_ERROR   -3\n/** The compressed data passed is corrupted @hideinitializer*/\n#define OPUS_INVALID_PACKET   -4\n/** Invalid/unsupported request number @hideinitializer*/\n#define OPUS_UNIMPLEMENTED    -5\n/** An encoder or decoder structure is invalid or already freed @hideinitializer*/\n#define OPUS_INVALID_STATE    -6\n/** Memory allocation has failed @hideinitializer*/\n#define OPUS_ALLOC_FAIL       -7\n/**@}*/\n\n/** @cond OPUS_INTERNAL_DOC */\n/**Export control for opus functions */\n\n#ifndef OPUS_EXPORT\n# if defined(WIN32)\n#  ifdef OPUS_BUILD\n#   define OPUS_EXPORT __declspec(dllexport)\n#  else\n#   define OPUS_EXPORT\n#  endif\n# elif defined(__GNUC__) && defined(OPUS_BUILD)\n#  define OPUS_EXPORT __attribute__ ((visibility (\"default\")))\n# else\n#  define OPUS_EXPORT\n# endif\n#endif\n\n# if !defined(OPUS_GNUC_PREREQ)\n#  if defined(__GNUC__)&&defined(__GNUC_MINOR__)\n#   define OPUS_GNUC_PREREQ(_maj,_min) \\\n ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min))\n#  else\n#   define OPUS_GNUC_PREREQ(_maj,_min) 0\n#  endif\n# endif\n\n#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )\n# if OPUS_GNUC_PREREQ(3,0)\n#  define OPUS_RESTRICT __restrict__\n# elif (defined(_MSC_VER) && _MSC_VER >= 1400)\n#  define OPUS_RESTRICT __restrict\n# else\n#  define OPUS_RESTRICT\n# endif\n#else\n# define OPUS_RESTRICT restrict\n#endif\n\n#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )\n# if OPUS_GNUC_PREREQ(2,7)\n#  define OPUS_INLINE __inline__\n# elif (defined(_MSC_VER))\n#  define OPUS_INLINE __inline\n# else\n#  define OPUS_INLINE\n# endif\n#else\n# define OPUS_INLINE inline\n#endif\n\n/**Warning attributes for opus functions\n  * NONNULL is not used in OPUS_BUILD to avoid the compiler optimizing out\n  * some paranoid null checks. */\n#if defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4)\n# define OPUS_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))\n#else\n# define OPUS_WARN_UNUSED_RESULT\n#endif\n#if !defined(OPUS_BUILD) && defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4)\n# define OPUS_ARG_NONNULL(_x)  __attribute__ ((__nonnull__(_x)))\n#else\n# define OPUS_ARG_NONNULL(_x)\n#endif\n\n/** These are the actual Encoder CTL ID numbers.\n  * They should not be used directly by applications.\n  * In general, SETs should be even and GETs should be odd.*/\n#define OPUS_SET_APPLICATION_REQUEST         4000\n#define OPUS_GET_APPLICATION_REQUEST         4001\n#define OPUS_SET_BITRATE_REQUEST             4002\n#define OPUS_GET_BITRATE_REQUEST             4003\n#define OPUS_SET_MAX_BANDWIDTH_REQUEST       4004\n#define OPUS_GET_MAX_BANDWIDTH_REQUEST       4005\n#define OPUS_SET_VBR_REQUEST                 4006\n#define OPUS_GET_VBR_REQUEST                 4007\n#define OPUS_SET_BANDWIDTH_REQUEST           4008\n#define OPUS_GET_BANDWIDTH_REQUEST           4009\n#define OPUS_SET_COMPLEXITY_REQUEST          4010\n#define OPUS_GET_COMPLEXITY_REQUEST          4011\n#define OPUS_SET_INBAND_FEC_REQUEST          4012\n#define OPUS_GET_INBAND_FEC_REQUEST          4013\n#define OPUS_SET_PACKET_LOSS_PERC_REQUEST    4014\n#define OPUS_GET_PACKET_LOSS_PERC_REQUEST    4015\n#define OPUS_SET_DTX_REQUEST                 4016\n#define OPUS_GET_DTX_REQUEST                 4017\n#define OPUS_SET_VBR_CONSTRAINT_REQUEST      4020\n#define OPUS_GET_VBR_CONSTRAINT_REQUEST      4021\n#define OPUS_SET_FORCE_CHANNELS_REQUEST      4022\n#define OPUS_GET_FORCE_CHANNELS_REQUEST      4023\n#define OPUS_SET_SIGNAL_REQUEST              4024\n#define OPUS_GET_SIGNAL_REQUEST              4025\n#define OPUS_GET_LOOKAHEAD_REQUEST           4027\n/* #define OPUS_RESET_STATE 4028 */\n#define OPUS_GET_SAMPLE_RATE_REQUEST         4029\n#define OPUS_GET_FINAL_RANGE_REQUEST         4031\n#define OPUS_GET_PITCH_REQUEST               4033\n#define OPUS_SET_GAIN_REQUEST                4034\n#define OPUS_GET_GAIN_REQUEST                4045 /* Should have been 4035 */\n#define OPUS_SET_LSB_DEPTH_REQUEST           4036\n#define OPUS_GET_LSB_DEPTH_REQUEST           4037\n#define OPUS_GET_LAST_PACKET_DURATION_REQUEST 4039\n#define OPUS_SET_EXPERT_FRAME_DURATION_REQUEST 4040\n#define OPUS_GET_EXPERT_FRAME_DURATION_REQUEST 4041\n#define OPUS_SET_PREDICTION_DISABLED_REQUEST 4042\n#define OPUS_GET_PREDICTION_DISABLED_REQUEST 4043\n\n/* Don't use 4045, it's already taken by OPUS_GET_GAIN_REQUEST */\n\n/* Macros to trigger compilation errors when the wrong types are provided to a CTL */\n#define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))\n#define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))\n#define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr)))\n#define __opus_check_val16_ptr(ptr) ((ptr) + ((ptr) - (opus_val16*)(ptr)))\n/** @endcond */\n\n/** @defgroup opus_ctlvalues Pre-defined values for CTL interface\n  * @see opus_genericctls, opus_encoderctls\n  * @{\n  */\n/* Values for the various encoder CTLs */\n#define OPUS_AUTO                           -1000 /**<Auto/default setting @hideinitializer*/\n#define OPUS_BITRATE_MAX                       -1 /**<Maximum bitrate @hideinitializer*/\n\n/** Best for most VoIP/videoconference applications where listening quality and intelligibility matter most\n * @hideinitializer */\n#define OPUS_APPLICATION_VOIP                2048\n/** Best for broadcast/high-fidelity application where the decoded audio should be as close as possible to the input\n * @hideinitializer */\n#define OPUS_APPLICATION_AUDIO               2049\n/** Only use when lowest-achievable latency is what matters most. Voice-optimized modes cannot be used.\n * @hideinitializer */\n#define OPUS_APPLICATION_RESTRICTED_LOWDELAY 2051\n\n#define OPUS_SIGNAL_VOICE                    3001 /**< Signal being encoded is voice */\n#define OPUS_SIGNAL_MUSIC                    3002 /**< Signal being encoded is music */\n#define OPUS_BANDWIDTH_NARROWBAND            1101 /**< 4 kHz bandpass @hideinitializer*/\n#define OPUS_BANDWIDTH_MEDIUMBAND            1102 /**< 6 kHz bandpass @hideinitializer*/\n#define OPUS_BANDWIDTH_WIDEBAND              1103 /**< 8 kHz bandpass @hideinitializer*/\n#define OPUS_BANDWIDTH_SUPERWIDEBAND         1104 /**<12 kHz bandpass @hideinitializer*/\n#define OPUS_BANDWIDTH_FULLBAND              1105 /**<20 kHz bandpass @hideinitializer*/\n\n#define OPUS_FRAMESIZE_ARG                   5000 /**< Select frame size from the argument (default) */\n#define OPUS_FRAMESIZE_2_5_MS                5001 /**< Use 2.5 ms frames */\n#define OPUS_FRAMESIZE_5_MS                  5002 /**< Use 5 ms frames */\n#define OPUS_FRAMESIZE_10_MS                 5003 /**< Use 10 ms frames */\n#define OPUS_FRAMESIZE_20_MS                 5004 /**< Use 20 ms frames */\n#define OPUS_FRAMESIZE_40_MS                 5005 /**< Use 40 ms frames */\n#define OPUS_FRAMESIZE_60_MS                 5006 /**< Use 60 ms frames */\n\n/**@}*/\n\n\n/** @defgroup opus_encoderctls Encoder related CTLs\n  *\n  * These are convenience macros for use with the \\c opus_encode_ctl\n  * interface. They are used to generate the appropriate series of\n  * arguments for that call, passing the correct type, size and so\n  * on as expected for each particular request.\n  *\n  * Some usage examples:\n  *\n  * @code\n  * int ret;\n  * ret = opus_encoder_ctl(enc_ctx, OPUS_SET_BANDWIDTH(OPUS_AUTO));\n  * if (ret != OPUS_OK) return ret;\n  *\n  * opus_int32 rate;\n  * opus_encoder_ctl(enc_ctx, OPUS_GET_BANDWIDTH(&rate));\n  *\n  * opus_encoder_ctl(enc_ctx, OPUS_RESET_STATE);\n  * @endcode\n  *\n  * @see opus_genericctls, opus_encoder\n  * @{\n  */\n\n/** Configures the encoder's computational complexity.\n  * The supported range is 0-10 inclusive with 10 representing the highest complexity.\n  * @see OPUS_GET_COMPLEXITY\n  * @param[in] x <tt>opus_int32</tt>: Allowed values: 0-10, inclusive.\n  *\n  * @hideinitializer */\n#define OPUS_SET_COMPLEXITY(x) OPUS_SET_COMPLEXITY_REQUEST, __opus_check_int(x)\n/** Gets the encoder's complexity configuration.\n  * @see OPUS_SET_COMPLEXITY\n  * @param[out] x <tt>opus_int32 *</tt>: Returns a value in the range 0-10,\n  *                                      inclusive.\n  * @hideinitializer */\n#define OPUS_GET_COMPLEXITY(x) OPUS_GET_COMPLEXITY_REQUEST, __opus_check_int_ptr(x)\n\n/** Configures the bitrate in the encoder.\n  * Rates from 500 to 512000 bits per second are meaningful, as well as the\n  * special values #OPUS_AUTO and #OPUS_BITRATE_MAX.\n  * The value #OPUS_BITRATE_MAX can be used to cause the codec to use as much\n  * rate as it can, which is useful for controlling the rate by adjusting the\n  * output buffer size.\n  * @see OPUS_GET_BITRATE\n  * @param[in] x <tt>opus_int32</tt>: Bitrate in bits per second. The default\n  *                                   is determined based on the number of\n  *                                   channels and the input sampling rate.\n  * @hideinitializer */\n#define OPUS_SET_BITRATE(x) OPUS_SET_BITRATE_REQUEST, __opus_check_int(x)\n/** Gets the encoder's bitrate configuration.\n  * @see OPUS_SET_BITRATE\n  * @param[out] x <tt>opus_int32 *</tt>: Returns the bitrate in bits per second.\n  *                                      The default is determined based on the\n  *                                      number of channels and the input\n  *                                      sampling rate.\n  * @hideinitializer */\n#define OPUS_GET_BITRATE(x) OPUS_GET_BITRATE_REQUEST, __opus_check_int_ptr(x)\n\n/** Enables or disables variable bitrate (VBR) in the encoder.\n  * The configured bitrate may not be met exactly because frames must\n  * be an integer number of bytes in length.\n  * @warning Only the MDCT mode of Opus can provide hard CBR behavior.\n  * @see OPUS_GET_VBR\n  * @see OPUS_SET_VBR_CONSTRAINT\n  * @param[in] x <tt>opus_int32</tt>: Allowed values:\n  * <dl>\n  * <dt>0</dt><dd>Hard CBR. For LPC/hybrid modes at very low bit-rate, this can\n  *               cause noticeable quality degradation.</dd>\n  * <dt>1</dt><dd>VBR (default). The exact type of VBR is controlled by\n  *               #OPUS_SET_VBR_CONSTRAINT.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_SET_VBR(x) OPUS_SET_VBR_REQUEST, __opus_check_int(x)\n/** Determine if variable bitrate (VBR) is enabled in the encoder.\n  * @see OPUS_SET_VBR\n  * @see OPUS_GET_VBR_CONSTRAINT\n  * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:\n  * <dl>\n  * <dt>0</dt><dd>Hard CBR.</dd>\n  * <dt>1</dt><dd>VBR (default). The exact type of VBR may be retrieved via\n  *               #OPUS_GET_VBR_CONSTRAINT.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_GET_VBR(x) OPUS_GET_VBR_REQUEST, __opus_check_int_ptr(x)\n\n/** Enables or disables constrained VBR in the encoder.\n  * This setting is ignored when the encoder is in CBR mode.\n  * @warning Only the MDCT mode of Opus currently heeds the constraint.\n  *  Speech mode ignores it completely, hybrid mode may fail to obey it\n  *  if the LPC layer uses more bitrate than the constraint would have\n  *  permitted.\n  * @see OPUS_GET_VBR_CONSTRAINT\n  * @see OPUS_SET_VBR\n  * @param[in] x <tt>opus_int32</tt>: Allowed values:\n  * <dl>\n  * <dt>0</dt><dd>Unconstrained VBR.</dd>\n  * <dt>1</dt><dd>Constrained VBR (default). This creates a maximum of one\n  *               frame of buffering delay assuming a transport with a\n  *               serialization speed of the nominal bitrate.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_SET_VBR_CONSTRAINT(x) OPUS_SET_VBR_CONSTRAINT_REQUEST, __opus_check_int(x)\n/** Determine if constrained VBR is enabled in the encoder.\n  * @see OPUS_SET_VBR_CONSTRAINT\n  * @see OPUS_GET_VBR\n  * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:\n  * <dl>\n  * <dt>0</dt><dd>Unconstrained VBR.</dd>\n  * <dt>1</dt><dd>Constrained VBR (default).</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_GET_VBR_CONSTRAINT(x) OPUS_GET_VBR_CONSTRAINT_REQUEST, __opus_check_int_ptr(x)\n\n/** Configures mono/stereo forcing in the encoder.\n  * This can force the encoder to produce packets encoded as either mono or\n  * stereo, regardless of the format of the input audio. This is useful when\n  * the caller knows that the input signal is currently a mono source embedded\n  * in a stereo stream.\n  * @see OPUS_GET_FORCE_CHANNELS\n  * @param[in] x <tt>opus_int32</tt>: Allowed values:\n  * <dl>\n  * <dt>#OPUS_AUTO</dt><dd>Not forced (default)</dd>\n  * <dt>1</dt>         <dd>Forced mono</dd>\n  * <dt>2</dt>         <dd>Forced stereo</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_SET_FORCE_CHANNELS(x) OPUS_SET_FORCE_CHANNELS_REQUEST, __opus_check_int(x)\n/** Gets the encoder's forced channel configuration.\n  * @see OPUS_SET_FORCE_CHANNELS\n  * @param[out] x <tt>opus_int32 *</tt>:\n  * <dl>\n  * <dt>#OPUS_AUTO</dt><dd>Not forced (default)</dd>\n  * <dt>1</dt>         <dd>Forced mono</dd>\n  * <dt>2</dt>         <dd>Forced stereo</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_GET_FORCE_CHANNELS(x) OPUS_GET_FORCE_CHANNELS_REQUEST, __opus_check_int_ptr(x)\n\n/** Configures the maximum bandpass that the encoder will select automatically.\n  * Applications should normally use this instead of #OPUS_SET_BANDWIDTH\n  * (leaving that set to the default, #OPUS_AUTO). This allows the\n  * application to set an upper bound based on the type of input it is\n  * providing, but still gives the encoder the freedom to reduce the bandpass\n  * when the bitrate becomes too low, for better overall quality.\n  * @see OPUS_GET_MAX_BANDWIDTH\n  * @param[in] x <tt>opus_int32</tt>: Allowed values:\n  * <dl>\n  * <dt>OPUS_BANDWIDTH_NARROWBAND</dt>    <dd>4 kHz passband</dd>\n  * <dt>OPUS_BANDWIDTH_MEDIUMBAND</dt>    <dd>6 kHz passband</dd>\n  * <dt>OPUS_BANDWIDTH_WIDEBAND</dt>      <dd>8 kHz passband</dd>\n  * <dt>OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>\n  * <dt>OPUS_BANDWIDTH_FULLBAND</dt>     <dd>20 kHz passband (default)</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_SET_MAX_BANDWIDTH(x) OPUS_SET_MAX_BANDWIDTH_REQUEST, __opus_check_int(x)\n\n/** Gets the encoder's configured maximum allowed bandpass.\n  * @see OPUS_SET_MAX_BANDWIDTH\n  * @param[out] x <tt>opus_int32 *</tt>: Allowed values:\n  * <dl>\n  * <dt>#OPUS_BANDWIDTH_NARROWBAND</dt>    <dd>4 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt>    <dd>6 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_WIDEBAND</dt>      <dd>8 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_FULLBAND</dt>     <dd>20 kHz passband (default)</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_GET_MAX_BANDWIDTH(x) OPUS_GET_MAX_BANDWIDTH_REQUEST, __opus_check_int_ptr(x)\n\n/** Sets the encoder's bandpass to a specific value.\n  * This prevents the encoder from automatically selecting the bandpass based\n  * on the available bitrate. If an application knows the bandpass of the input\n  * audio it is providing, it should normally use #OPUS_SET_MAX_BANDWIDTH\n  * instead, which still gives the encoder the freedom to reduce the bandpass\n  * when the bitrate becomes too low, for better overall quality.\n  * @see OPUS_GET_BANDWIDTH\n  * @param[in] x <tt>opus_int32</tt>: Allowed values:\n  * <dl>\n  * <dt>#OPUS_AUTO</dt>                    <dd>(default)</dd>\n  * <dt>#OPUS_BANDWIDTH_NARROWBAND</dt>    <dd>4 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt>    <dd>6 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_WIDEBAND</dt>      <dd>8 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_FULLBAND</dt>     <dd>20 kHz passband</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_SET_BANDWIDTH(x) OPUS_SET_BANDWIDTH_REQUEST, __opus_check_int(x)\n\n/** Configures the type of signal being encoded.\n  * This is a hint which helps the encoder's mode selection.\n  * @see OPUS_GET_SIGNAL\n  * @param[in] x <tt>opus_int32</tt>: Allowed values:\n  * <dl>\n  * <dt>#OPUS_AUTO</dt>        <dd>(default)</dd>\n  * <dt>#OPUS_SIGNAL_VOICE</dt><dd>Bias thresholds towards choosing LPC or Hybrid modes.</dd>\n  * <dt>#OPUS_SIGNAL_MUSIC</dt><dd>Bias thresholds towards choosing MDCT modes.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_SET_SIGNAL(x) OPUS_SET_SIGNAL_REQUEST, __opus_check_int(x)\n/** Gets the encoder's configured signal type.\n  * @see OPUS_SET_SIGNAL\n  * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:\n  * <dl>\n  * <dt>#OPUS_AUTO</dt>        <dd>(default)</dd>\n  * <dt>#OPUS_SIGNAL_VOICE</dt><dd>Bias thresholds towards choosing LPC or Hybrid modes.</dd>\n  * <dt>#OPUS_SIGNAL_MUSIC</dt><dd>Bias thresholds towards choosing MDCT modes.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, __opus_check_int_ptr(x)\n\n\n/** Configures the encoder's intended application.\n  * The initial value is a mandatory argument to the encoder_create function.\n  * @see OPUS_GET_APPLICATION\n  * @param[in] x <tt>opus_int32</tt>: Returns one of the following values:\n  * <dl>\n  * <dt>#OPUS_APPLICATION_VOIP</dt>\n  * <dd>Process signal for improved speech intelligibility.</dd>\n  * <dt>#OPUS_APPLICATION_AUDIO</dt>\n  * <dd>Favor faithfulness to the original input.</dd>\n  * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>\n  * <dd>Configure the minimum possible coding delay by disabling certain modes\n  * of operation.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_SET_APPLICATION(x) OPUS_SET_APPLICATION_REQUEST, __opus_check_int(x)\n/** Gets the encoder's configured application.\n  * @see OPUS_SET_APPLICATION\n  * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:\n  * <dl>\n  * <dt>#OPUS_APPLICATION_VOIP</dt>\n  * <dd>Process signal for improved speech intelligibility.</dd>\n  * <dt>#OPUS_APPLICATION_AUDIO</dt>\n  * <dd>Favor faithfulness to the original input.</dd>\n  * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>\n  * <dd>Configure the minimum possible coding delay by disabling certain modes\n  * of operation.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_GET_APPLICATION(x) OPUS_GET_APPLICATION_REQUEST, __opus_check_int_ptr(x)\n\n/** Gets the sampling rate the encoder or decoder was initialized with.\n  * This simply returns the <code>Fs</code> value passed to opus_encoder_init()\n  * or opus_decoder_init().\n  * @param[out] x <tt>opus_int32 *</tt>: Sampling rate of encoder or decoder.\n  * @hideinitializer\n  */\n#define OPUS_GET_SAMPLE_RATE(x) OPUS_GET_SAMPLE_RATE_REQUEST, __opus_check_int_ptr(x)\n\n/** Gets the total samples of delay added by the entire codec.\n  * This can be queried by the encoder and then the provided number of samples can be\n  * skipped on from the start of the decoder's output to provide time aligned input\n  * and output. From the perspective of a decoding application the real data begins this many\n  * samples late.\n  *\n  * The decoder contribution to this delay is identical for all decoders, but the\n  * encoder portion of the delay may vary from implementation to implementation,\n  * version to version, or even depend on the encoder's initial configuration.\n  * Applications needing delay compensation should call this CTL rather than\n  * hard-coding a value.\n  * @param[out] x <tt>opus_int32 *</tt>:   Number of lookahead samples\n  * @hideinitializer */\n#define OPUS_GET_LOOKAHEAD(x) OPUS_GET_LOOKAHEAD_REQUEST, __opus_check_int_ptr(x)\n\n/** Configures the encoder's use of inband forward error correction (FEC).\n  * @note This is only applicable to the LPC layer\n  * @see OPUS_GET_INBAND_FEC\n  * @param[in] x <tt>opus_int32</tt>: Allowed values:\n  * <dl>\n  * <dt>0</dt><dd>Disable inband FEC (default).</dd>\n  * <dt>1</dt><dd>Enable inband FEC.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_SET_INBAND_FEC(x) OPUS_SET_INBAND_FEC_REQUEST, __opus_check_int(x)\n/** Gets encoder's configured use of inband forward error correction.\n  * @see OPUS_SET_INBAND_FEC\n  * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:\n  * <dl>\n  * <dt>0</dt><dd>Inband FEC disabled (default).</dd>\n  * <dt>1</dt><dd>Inband FEC enabled.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_GET_INBAND_FEC(x) OPUS_GET_INBAND_FEC_REQUEST, __opus_check_int_ptr(x)\n\n/** Configures the encoder's expected packet loss percentage.\n  * Higher values with trigger progressively more loss resistant behavior in the encoder\n  * at the expense of quality at a given bitrate in the lossless case, but greater quality\n  * under loss.\n  * @see OPUS_GET_PACKET_LOSS_PERC\n  * @param[in] x <tt>opus_int32</tt>:   Loss percentage in the range 0-100, inclusive (default: 0).\n  * @hideinitializer */\n#define OPUS_SET_PACKET_LOSS_PERC(x) OPUS_SET_PACKET_LOSS_PERC_REQUEST, __opus_check_int(x)\n/** Gets the encoder's configured packet loss percentage.\n  * @see OPUS_SET_PACKET_LOSS_PERC\n  * @param[out] x <tt>opus_int32 *</tt>: Returns the configured loss percentage\n  *                                      in the range 0-100, inclusive (default: 0).\n  * @hideinitializer */\n#define OPUS_GET_PACKET_LOSS_PERC(x) OPUS_GET_PACKET_LOSS_PERC_REQUEST, __opus_check_int_ptr(x)\n\n/** Configures the encoder's use of discontinuous transmission (DTX).\n  * @note This is only applicable to the LPC layer\n  * @see OPUS_GET_DTX\n  * @param[in] x <tt>opus_int32</tt>: Allowed values:\n  * <dl>\n  * <dt>0</dt><dd>Disable DTX (default).</dd>\n  * <dt>1</dt><dd>Enabled DTX.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_SET_DTX(x) OPUS_SET_DTX_REQUEST, __opus_check_int(x)\n/** Gets encoder's configured use of discontinuous transmission.\n  * @see OPUS_SET_DTX\n  * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:\n  * <dl>\n  * <dt>0</dt><dd>DTX disabled (default).</dd>\n  * <dt>1</dt><dd>DTX enabled.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __opus_check_int_ptr(x)\n/** Configures the depth of signal being encoded.\n  * This is a hint which helps the encoder identify silence and near-silence.\n  * @see OPUS_GET_LSB_DEPTH\n  * @param[in] x <tt>opus_int32</tt>: Input precision in bits, between 8 and 24\n  *                                   (default: 24).\n  * @hideinitializer */\n#define OPUS_SET_LSB_DEPTH(x) OPUS_SET_LSB_DEPTH_REQUEST, __opus_check_int(x)\n/** Gets the encoder's configured signal depth.\n  * @see OPUS_SET_LSB_DEPTH\n  * @param[out] x <tt>opus_int32 *</tt>: Input precision in bits, between 8 and\n  *                                      24 (default: 24).\n  * @hideinitializer */\n#define OPUS_GET_LSB_DEPTH(x) OPUS_GET_LSB_DEPTH_REQUEST, __opus_check_int_ptr(x)\n\n/** Gets the duration (in samples) of the last packet successfully decoded or concealed.\n  * @param[out] x <tt>opus_int32 *</tt>: Number of samples (at current sampling rate).\n  * @hideinitializer */\n#define OPUS_GET_LAST_PACKET_DURATION(x) OPUS_GET_LAST_PACKET_DURATION_REQUEST, __opus_check_int_ptr(x)\n\n/** Configures the encoder's use of variable duration frames.\n  * When variable duration is enabled, the encoder is free to use a shorter frame\n  * size than the one requested in the opus_encode*() call.\n  * It is then the user's responsibility\n  * to verify how much audio was encoded by checking the ToC byte of the encoded\n  * packet. The part of the audio that was not encoded needs to be resent to the\n  * encoder for the next call. Do not use this option unless you <b>really</b>\n  * know what you are doing.\n  * @see OPUS_GET_EXPERT_VARIABLE_DURATION\n  * @param[in] x <tt>opus_int32</tt>: Allowed values:\n  * <dl>\n  * <dt>OPUS_FRAMESIZE_ARG</dt><dd>Select frame size from the argument (default).</dd>\n  * <dt>OPUS_FRAMESIZE_2_5_MS</dt><dd>Use 2.5 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_5_MS</dt><dd>Use 2.5 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_10_MS</dt><dd>Use 10 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_20_MS</dt><dd>Use 20 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_40_MS</dt><dd>Use 40 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_60_MS</dt><dd>Use 60 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_VARIABLE</dt><dd>Optimize the frame size dynamically.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_SET_EXPERT_FRAME_DURATION(x) OPUS_SET_EXPERT_FRAME_DURATION_REQUEST, __opus_check_int(x)\n/** Gets the encoder's configured use of variable duration frames.\n  * @see OPUS_SET_EXPERT_VARIABLE_DURATION\n  * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:\n  * <dl>\n  * <dt>OPUS_FRAMESIZE_ARG</dt><dd>Select frame size from the argument (default).</dd>\n  * <dt>OPUS_FRAMESIZE_2_5_MS</dt><dd>Use 2.5 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_5_MS</dt><dd>Use 2.5 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_10_MS</dt><dd>Use 10 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_20_MS</dt><dd>Use 20 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_40_MS</dt><dd>Use 40 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_60_MS</dt><dd>Use 60 ms frames.</dd>\n  * <dt>OPUS_FRAMESIZE_VARIABLE</dt><dd>Optimize the frame size dynamically.</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_GET_EXPERT_FRAME_DURATION(x) OPUS_GET_EXPERT_FRAME_DURATION_REQUEST, __opus_check_int_ptr(x)\n\n/** If set to 1, disables almost all use of prediction, making frames almost\n    completely independent. This reduces quality. (default : 0)\n  * @hideinitializer */\n#define OPUS_SET_PREDICTION_DISABLED(x) OPUS_SET_PREDICTION_DISABLED_REQUEST, __opus_check_int(x)\n/** Gets the encoder's configured prediction status.\n  * @hideinitializer */\n#define OPUS_GET_PREDICTION_DISABLED(x) OPUS_GET_PREDICTION_DISABLED_REQUEST, __opus_check_int_ptr(x)\n\n/**@}*/\n\n/** @defgroup opus_genericctls Generic CTLs\n  *\n  * These macros are used with the \\c opus_decoder_ctl and\n  * \\c opus_encoder_ctl calls to generate a particular\n  * request.\n  *\n  * When called on an \\c OpusDecoder they apply to that\n  * particular decoder instance. When called on an\n  * \\c OpusEncoder they apply to the corresponding setting\n  * on that encoder instance, if present.\n  *\n  * Some usage examples:\n  *\n  * @code\n  * int ret;\n  * opus_int32 pitch;\n  * ret = opus_decoder_ctl(dec_ctx, OPUS_GET_PITCH(&pitch));\n  * if (ret == OPUS_OK) return ret;\n  *\n  * opus_encoder_ctl(enc_ctx, OPUS_RESET_STATE);\n  * opus_decoder_ctl(dec_ctx, OPUS_RESET_STATE);\n  *\n  * opus_int32 enc_bw, dec_bw;\n  * opus_encoder_ctl(enc_ctx, OPUS_GET_BANDWIDTH(&enc_bw));\n  * opus_decoder_ctl(dec_ctx, OPUS_GET_BANDWIDTH(&dec_bw));\n  * if (enc_bw != dec_bw) {\n  *   printf(\"packet bandwidth mismatch!\\n\");\n  * }\n  * @endcode\n  *\n  * @see opus_encoder, opus_decoder_ctl, opus_encoder_ctl, opus_decoderctls, opus_encoderctls\n  * @{\n  */\n\n/** Resets the codec state to be equivalent to a freshly initialized state.\n  * This should be called when switching streams in order to prevent\n  * the back to back decoding from giving different results from\n  * one at a time decoding.\n  * @hideinitializer */\n#define OPUS_RESET_STATE 4028\n\n/** Gets the final state of the codec's entropy coder.\n  * This is used for testing purposes,\n  * The encoder and decoder state should be identical after coding a payload\n  * (assuming no data corruption or software bugs)\n  *\n  * @param[out] x <tt>opus_uint32 *</tt>: Entropy coder state\n  *\n  * @hideinitializer */\n#define OPUS_GET_FINAL_RANGE(x) OPUS_GET_FINAL_RANGE_REQUEST, __opus_check_uint_ptr(x)\n\n/** Gets the pitch of the last decoded frame, if available.\n  * This can be used for any post-processing algorithm requiring the use of pitch,\n  * e.g. time stretching/shortening. If the last frame was not voiced, or if the\n  * pitch was not coded in the frame, then zero is returned.\n  *\n  * This CTL is only implemented for decoder instances.\n  *\n  * @param[out] x <tt>opus_int32 *</tt>: pitch period at 48 kHz (or 0 if not available)\n  *\n  * @hideinitializer */\n#define OPUS_GET_PITCH(x) OPUS_GET_PITCH_REQUEST, __opus_check_int_ptr(x)\n\n/** Gets the encoder's configured bandpass or the decoder's last bandpass.\n  * @see OPUS_SET_BANDWIDTH\n  * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:\n  * <dl>\n  * <dt>#OPUS_AUTO</dt>                    <dd>(default)</dd>\n  * <dt>#OPUS_BANDWIDTH_NARROWBAND</dt>    <dd>4 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt>    <dd>6 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_WIDEBAND</dt>      <dd>8 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>\n  * <dt>#OPUS_BANDWIDTH_FULLBAND</dt>     <dd>20 kHz passband</dd>\n  * </dl>\n  * @hideinitializer */\n#define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __opus_check_int_ptr(x)\n\n/**@}*/\n\n/** @defgroup opus_decoderctls Decoder related CTLs\n  * @see opus_genericctls, opus_encoderctls, opus_decoder\n  * @{\n  */\n\n/** Configures decoder gain adjustment.\n  * Scales the decoded output by a factor specified in Q8 dB units.\n  * This has a maximum range of -32768 to 32767 inclusive, and returns\n  * OPUS_BAD_ARG otherwise. The default is zero indicating no adjustment.\n  * This setting survives decoder reset.\n  *\n  * gain = pow(10, x/(20.0*256))\n  *\n  * @param[in] x <tt>opus_int32</tt>:   Amount to scale PCM signal by in Q8 dB units.\n  * @hideinitializer */\n#define OPUS_SET_GAIN(x) OPUS_SET_GAIN_REQUEST, __opus_check_int(x)\n/** Gets the decoder's configured gain adjustment. @see OPUS_SET_GAIN\n  *\n  * @param[out] x <tt>opus_int32 *</tt>: Amount to scale PCM signal by in Q8 dB units.\n  * @hideinitializer */\n#define OPUS_GET_GAIN(x) OPUS_GET_GAIN_REQUEST, __opus_check_int_ptr(x)\n\n/**@}*/\n\n/** @defgroup opus_libinfo Opus library information functions\n  * @{\n  */\n\n/** Converts an opus error code into a human readable string.\n  *\n  * @param[in] error <tt>int</tt>: Error number\n  * @returns Error string\n  */\nOPUS_EXPORT const char *opus_strerror(int error);\n\n/** Gets the libopus version string.\n  *\n  * @returns Version string\n  */\nOPUS_EXPORT const char *opus_get_version_string(void);\n/**@}*/\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* OPUS_DEFINES_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/include/opus_multistream.h",
    "content": "/* Copyright (c) 2011 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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 * @file opus_multistream.h\n * @brief Opus reference implementation multistream API\n */\n\n#ifndef OPUS_MULTISTREAM_H\n#define OPUS_MULTISTREAM_H\n\n#include \"opus.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @cond OPUS_INTERNAL_DOC */\n\n/** Macros to trigger compilation errors when the wrong types are provided to a\n  * CTL. */\n/**@{*/\n#define __opus_check_encstate_ptr(ptr) ((ptr) + ((ptr) - (OpusEncoder**)(ptr)))\n#define __opus_check_decstate_ptr(ptr) ((ptr) + ((ptr) - (OpusDecoder**)(ptr)))\n/**@}*/\n\n/** These are the actual encoder and decoder CTL ID numbers.\n  * They should not be used directly by applications.\n  * In general, SETs should be even and GETs should be odd.*/\n/**@{*/\n#define OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST 5120\n#define OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST 5122\n/**@}*/\n\n/** @endcond */\n\n/** @defgroup opus_multistream_ctls Multistream specific encoder and decoder CTLs\n  *\n  * These are convenience macros that are specific to the\n  * opus_multistream_encoder_ctl() and opus_multistream_decoder_ctl()\n  * interface.\n  * The CTLs from @ref opus_genericctls, @ref opus_encoderctls, and\n  * @ref opus_decoderctls may be applied to a multistream encoder or decoder as\n  * well.\n  * In addition, you may retrieve the encoder or decoder state for an specific\n  * stream via #OPUS_MULTISTREAM_GET_ENCODER_STATE or\n  * #OPUS_MULTISTREAM_GET_DECODER_STATE and apply CTLs to it individually.\n  */\n/**@{*/\n\n/** Gets the encoder state for an individual stream of a multistream encoder.\n  * @param[in] x <tt>opus_int32</tt>: The index of the stream whose encoder you\n  *                                   wish to retrieve.\n  *                                   This must be non-negative and less than\n  *                                   the <code>streams</code> parameter used\n  *                                   to initialize the encoder.\n  * @param[out] y <tt>OpusEncoder**</tt>: Returns a pointer to the given\n  *                                       encoder state.\n  * @retval OPUS_BAD_ARG The index of the requested stream was out of range.\n  * @hideinitializer\n  */\n#define OPUS_MULTISTREAM_GET_ENCODER_STATE(x,y) OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST, __opus_check_int(x), __opus_check_encstate_ptr(y)\n\n/** Gets the decoder state for an individual stream of a multistream decoder.\n  * @param[in] x <tt>opus_int32</tt>: The index of the stream whose decoder you\n  *                                   wish to retrieve.\n  *                                   This must be non-negative and less than\n  *                                   the <code>streams</code> parameter used\n  *                                   to initialize the decoder.\n  * @param[out] y <tt>OpusDecoder**</tt>: Returns a pointer to the given\n  *                                       decoder state.\n  * @retval OPUS_BAD_ARG The index of the requested stream was out of range.\n  * @hideinitializer\n  */\n#define OPUS_MULTISTREAM_GET_DECODER_STATE(x,y) OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST, __opus_check_int(x), __opus_check_decstate_ptr(y)\n\n/**@}*/\n\n/** @defgroup opus_multistream Opus Multistream API\n  * @{\n  *\n  * The multistream API allows individual Opus streams to be combined into a\n  * single packet, enabling support for up to 255 channels. Unlike an\n  * elementary Opus stream, the encoder and decoder must negotiate the channel\n  * configuration before the decoder can successfully interpret the data in the\n  * packets produced by the encoder. Some basic information, such as packet\n  * duration, can be computed without any special negotiation.\n  *\n  * The format for multistream Opus packets is defined in the\n  * <a href=\"http://tools.ietf.org/html/draft-terriberry-oggopus\">Ogg\n  * encapsulation specification</a> and is based on the self-delimited Opus\n  * framing described in Appendix B of <a href=\"http://tools.ietf.org/html/rfc6716\">RFC 6716</a>.\n  * Normal Opus packets are just a degenerate case of multistream Opus packets,\n  * and can be encoded or decoded with the multistream API by setting\n  * <code>streams</code> to <code>1</code> when initializing the encoder or\n  * decoder.\n  *\n  * Multistream Opus streams can contain up to 255 elementary Opus streams.\n  * These may be either \"uncoupled\" or \"coupled\", indicating that the decoder\n  * is configured to decode them to either 1 or 2 channels, respectively.\n  * The streams are ordered so that all coupled streams appear at the\n  * beginning.\n  *\n  * A <code>mapping</code> table defines which decoded channel <code>i</code>\n  * should be used for each input/output (I/O) channel <code>j</code>. This table is\n  * typically provided as an unsigned char array.\n  * Let <code>i = mapping[j]</code> be the index for I/O channel <code>j</code>.\n  * If <code>i < 2*coupled_streams</code>, then I/O channel <code>j</code> is\n  * encoded as the left channel of stream <code>(i/2)</code> if <code>i</code>\n  * is even, or  as the right channel of stream <code>(i/2)</code> if\n  * <code>i</code> is odd. Otherwise, I/O channel <code>j</code> is encoded as\n  * mono in stream <code>(i - coupled_streams)</code>, unless it has the special\n  * value 255, in which case it is omitted from the encoding entirely (the\n  * decoder will reproduce it as silence). Each value <code>i</code> must either\n  * be the special value 255 or be less than <code>streams + coupled_streams</code>.\n  *\n  * The output channels specified by the encoder\n  * should use the\n  * <a href=\"http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9\">Vorbis\n  * channel ordering</a>. A decoder may wish to apply an additional permutation\n  * to the mapping the encoder used to achieve a different output channel\n  * order (e.g. for outputing in WAV order).\n  *\n  * Each multistream packet contains an Opus packet for each stream, and all of\n  * the Opus packets in a single multistream packet must have the same\n  * duration. Therefore the duration of a multistream packet can be extracted\n  * from the TOC sequence of the first stream, which is located at the\n  * beginning of the packet, just like an elementary Opus stream:\n  *\n  * @code\n  * int nb_samples;\n  * int nb_frames;\n  * nb_frames = opus_packet_get_nb_frames(data, len);\n  * if (nb_frames < 1)\n  *   return nb_frames;\n  * nb_samples = opus_packet_get_samples_per_frame(data, 48000) * nb_frames;\n  * @endcode\n  *\n  * The general encoding and decoding process proceeds exactly the same as in\n  * the normal @ref opus_encoder and @ref opus_decoder APIs.\n  * See their documentation for an overview of how to use the corresponding\n  * multistream functions.\n  */\n\n/** Opus multistream encoder state.\n  * This contains the complete state of a multistream Opus encoder.\n  * It is position independent and can be freely copied.\n  * @see opus_multistream_encoder_create\n  * @see opus_multistream_encoder_init\n  */\ntypedef struct OpusMSEncoder OpusMSEncoder;\n\n/** Opus multistream decoder state.\n  * This contains the complete state of a multistream Opus decoder.\n  * It is position independent and can be freely copied.\n  * @see opus_multistream_decoder_create\n  * @see opus_multistream_decoder_init\n  */\ntypedef struct OpusMSDecoder OpusMSDecoder;\n\n/**\\name Multistream encoder functions */\n/**@{*/\n\n/** Gets the size of an OpusMSEncoder structure.\n  * @param streams <tt>int</tt>: The total number of streams to encode from the\n  *                              input.\n  *                              This must be no more than 255.\n  * @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams\n  *                                      to encode.\n  *                                      This must be no larger than the total\n  *                                      number of streams.\n  *                                      Additionally, The total number of\n  *                                      encoded channels (<code>streams +\n  *                                      coupled_streams</code>) must be no\n  *                                      more than 255.\n  * @returns The size in bytes on success, or a negative error code\n  *          (see @ref opus_errorcodes) on error.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_encoder_get_size(\n      int streams,\n      int coupled_streams\n);\n\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_surround_encoder_get_size(\n      int channels,\n      int mapping_family\n);\n\n\n/** Allocates and initializes a multistream encoder state.\n  * Call opus_multistream_encoder_destroy() to release\n  * this object when finished.\n  * @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).\n  *                                This must be one of 8000, 12000, 16000,\n  *                                24000, or 48000.\n  * @param channels <tt>int</tt>: Number of channels in the input signal.\n  *                               This must be at most 255.\n  *                               It may be greater than the number of\n  *                               coded channels (<code>streams +\n  *                               coupled_streams</code>).\n  * @param streams <tt>int</tt>: The total number of streams to encode from the\n  *                              input.\n  *                              This must be no more than the number of channels.\n  * @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams\n  *                                      to encode.\n  *                                      This must be no larger than the total\n  *                                      number of streams.\n  *                                      Additionally, The total number of\n  *                                      encoded channels (<code>streams +\n  *                                      coupled_streams</code>) must be no\n  *                                      more than the number of input channels.\n  * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from\n  *                    encoded channels to input channels, as described in\n  *                    @ref opus_multistream. As an extra constraint, the\n  *                    multistream encoder does not allow encoding coupled\n  *                    streams for which one channel is unused since this\n  *                    is never a good idea.\n  * @param application <tt>int</tt>: The target encoder application.\n  *                                  This must be one of the following:\n  * <dl>\n  * <dt>#OPUS_APPLICATION_VOIP</dt>\n  * <dd>Process signal for improved speech intelligibility.</dd>\n  * <dt>#OPUS_APPLICATION_AUDIO</dt>\n  * <dd>Favor faithfulness to the original input.</dd>\n  * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>\n  * <dd>Configure the minimum possible coding delay by disabling certain modes\n  * of operation.</dd>\n  * </dl>\n  * @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error\n  *                                   code (see @ref opus_errorcodes) on\n  *                                   failure.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_encoder_create(\n      opus_int32 Fs,\n      int channels,\n      int streams,\n      int coupled_streams,\n      const unsigned char *mapping,\n      int application,\n      int *error\n) OPUS_ARG_NONNULL(5);\n\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_surround_encoder_create(\n      opus_int32 Fs,\n      int channels,\n      int mapping_family,\n      int *streams,\n      int *coupled_streams,\n      unsigned char *mapping,\n      int application,\n      int *error\n) OPUS_ARG_NONNULL(5);\n\n/** Initialize a previously allocated multistream encoder state.\n  * The memory pointed to by \\a st must be at least the size returned by\n  * opus_multistream_encoder_get_size().\n  * This is intended for applications which use their own allocator instead of\n  * malloc.\n  * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.\n  * @see opus_multistream_encoder_create\n  * @see opus_multistream_encoder_get_size\n  * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initialize.\n  * @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).\n  *                                This must be one of 8000, 12000, 16000,\n  *                                24000, or 48000.\n  * @param channels <tt>int</tt>: Number of channels in the input signal.\n  *                               This must be at most 255.\n  *                               It may be greater than the number of\n  *                               coded channels (<code>streams +\n  *                               coupled_streams</code>).\n  * @param streams <tt>int</tt>: The total number of streams to encode from the\n  *                              input.\n  *                              This must be no more than the number of channels.\n  * @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams\n  *                                      to encode.\n  *                                      This must be no larger than the total\n  *                                      number of streams.\n  *                                      Additionally, The total number of\n  *                                      encoded channels (<code>streams +\n  *                                      coupled_streams</code>) must be no\n  *                                      more than the number of input channels.\n  * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from\n  *                    encoded channels to input channels, as described in\n  *                    @ref opus_multistream. As an extra constraint, the\n  *                    multistream encoder does not allow encoding coupled\n  *                    streams for which one channel is unused since this\n  *                    is never a good idea.\n  * @param application <tt>int</tt>: The target encoder application.\n  *                                  This must be one of the following:\n  * <dl>\n  * <dt>#OPUS_APPLICATION_VOIP</dt>\n  * <dd>Process signal for improved speech intelligibility.</dd>\n  * <dt>#OPUS_APPLICATION_AUDIO</dt>\n  * <dd>Favor faithfulness to the original input.</dd>\n  * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>\n  * <dd>Configure the minimum possible coding delay by disabling certain modes\n  * of operation.</dd>\n  * </dl>\n  * @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)\n  *          on failure.\n  */\nOPUS_EXPORT int opus_multistream_encoder_init(\n      OpusMSEncoder *st,\n      opus_int32 Fs,\n      int channels,\n      int streams,\n      int coupled_streams,\n      const unsigned char *mapping,\n      int application\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);\n\nOPUS_EXPORT int opus_multistream_surround_encoder_init(\n      OpusMSEncoder *st,\n      opus_int32 Fs,\n      int channels,\n      int mapping_family,\n      int *streams,\n      int *coupled_streams,\n      unsigned char *mapping,\n      int application\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);\n\n/** Encodes a multistream Opus frame.\n  * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.\n  * @param[in] pcm <tt>const opus_int16*</tt>: The input signal as interleaved\n  *                                            samples.\n  *                                            This must contain\n  *                                            <code>frame_size*channels</code>\n  *                                            samples.\n  * @param frame_size <tt>int</tt>: Number of samples per channel in the input\n  *                                 signal.\n  *                                 This must be an Opus frame size for the\n  *                                 encoder's sampling rate.\n  *                                 For example, at 48 kHz the permitted values\n  *                                 are 120, 240, 480, 960, 1920, and 2880.\n  *                                 Passing in a duration of less than 10 ms\n  *                                 (480 samples at 48 kHz) will prevent the\n  *                                 encoder from using the LPC or hybrid modes.\n  * @param[out] data <tt>unsigned char*</tt>: Output payload.\n  *                                           This must contain storage for at\n  *                                           least \\a max_data_bytes.\n  * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated\n  *                                                 memory for the output\n  *                                                 payload. This may be\n  *                                                 used to impose an upper limit on\n  *                                                 the instant bitrate, but should\n  *                                                 not be used as the only bitrate\n  *                                                 control. Use #OPUS_SET_BITRATE to\n  *                                                 control the bitrate.\n  * @returns The length of the encoded packet (in bytes) on success or a\n  *          negative error code (see @ref opus_errorcodes) on failure.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_encode(\n    OpusMSEncoder *st,\n    const opus_int16 *pcm,\n    int frame_size,\n    unsigned char *data,\n    opus_int32 max_data_bytes\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);\n\n/** Encodes a multistream Opus frame from floating point input.\n  * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.\n  * @param[in] pcm <tt>const float*</tt>: The input signal as interleaved\n  *                                       samples with a normal range of\n  *                                       +/-1.0.\n  *                                       Samples with a range beyond +/-1.0\n  *                                       are supported but will be clipped by\n  *                                       decoders using the integer API and\n  *                                       should only be used if it is known\n  *                                       that the far end supports extended\n  *                                       dynamic range.\n  *                                       This must contain\n  *                                       <code>frame_size*channels</code>\n  *                                       samples.\n  * @param frame_size <tt>int</tt>: Number of samples per channel in the input\n  *                                 signal.\n  *                                 This must be an Opus frame size for the\n  *                                 encoder's sampling rate.\n  *                                 For example, at 48 kHz the permitted values\n  *                                 are 120, 240, 480, 960, 1920, and 2880.\n  *                                 Passing in a duration of less than 10 ms\n  *                                 (480 samples at 48 kHz) will prevent the\n  *                                 encoder from using the LPC or hybrid modes.\n  * @param[out] data <tt>unsigned char*</tt>: Output payload.\n  *                                           This must contain storage for at\n  *                                           least \\a max_data_bytes.\n  * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated\n  *                                                 memory for the output\n  *                                                 payload. This may be\n  *                                                 used to impose an upper limit on\n  *                                                 the instant bitrate, but should\n  *                                                 not be used as the only bitrate\n  *                                                 control. Use #OPUS_SET_BITRATE to\n  *                                                 control the bitrate.\n  * @returns The length of the encoded packet (in bytes) on success or a\n  *          negative error code (see @ref opus_errorcodes) on failure.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_encode_float(\n      OpusMSEncoder *st,\n      const float *pcm,\n      int frame_size,\n      unsigned char *data,\n      opus_int32 max_data_bytes\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);\n\n/** Frees an <code>OpusMSEncoder</code> allocated by\n  * opus_multistream_encoder_create().\n  * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to be freed.\n  */\nOPUS_EXPORT void opus_multistream_encoder_destroy(OpusMSEncoder *st);\n\n/** Perform a CTL function on a multistream Opus encoder.\n  *\n  * Generally the request and subsequent arguments are generated by a\n  * convenience macro.\n  * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.\n  * @param request This and all remaining parameters should be replaced by one\n  *                of the convenience macros in @ref opus_genericctls,\n  *                @ref opus_encoderctls, or @ref opus_multistream_ctls.\n  * @see opus_genericctls\n  * @see opus_encoderctls\n  * @see opus_multistream_ctls\n  */\nOPUS_EXPORT int opus_multistream_encoder_ctl(OpusMSEncoder *st, int request, ...) OPUS_ARG_NONNULL(1);\n\n/**@}*/\n\n/**\\name Multistream decoder functions */\n/**@{*/\n\n/** Gets the size of an <code>OpusMSDecoder</code> structure.\n  * @param streams <tt>int</tt>: The total number of streams coded in the\n  *                              input.\n  *                              This must be no more than 255.\n  * @param coupled_streams <tt>int</tt>: Number streams to decode as coupled\n  *                                      (2 channel) streams.\n  *                                      This must be no larger than the total\n  *                                      number of streams.\n  *                                      Additionally, The total number of\n  *                                      coded channels (<code>streams +\n  *                                      coupled_streams</code>) must be no\n  *                                      more than 255.\n  * @returns The size in bytes on success, or a negative error code\n  *          (see @ref opus_errorcodes) on error.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_decoder_get_size(\n      int streams,\n      int coupled_streams\n);\n\n/** Allocates and initializes a multistream decoder state.\n  * Call opus_multistream_decoder_destroy() to release\n  * this object when finished.\n  * @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).\n  *                                This must be one of 8000, 12000, 16000,\n  *                                24000, or 48000.\n  * @param channels <tt>int</tt>: Number of channels to output.\n  *                               This must be at most 255.\n  *                               It may be different from the number of coded\n  *                               channels (<code>streams +\n  *                               coupled_streams</code>).\n  * @param streams <tt>int</tt>: The total number of streams coded in the\n  *                              input.\n  *                              This must be no more than 255.\n  * @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled\n  *                                      (2 channel) streams.\n  *                                      This must be no larger than the total\n  *                                      number of streams.\n  *                                      Additionally, The total number of\n  *                                      coded channels (<code>streams +\n  *                                      coupled_streams</code>) must be no\n  *                                      more than 255.\n  * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from\n  *                    coded channels to output channels, as described in\n  *                    @ref opus_multistream.\n  * @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error\n  *                                   code (see @ref opus_errorcodes) on\n  *                                   failure.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSDecoder *opus_multistream_decoder_create(\n      opus_int32 Fs,\n      int channels,\n      int streams,\n      int coupled_streams,\n      const unsigned char *mapping,\n      int *error\n) OPUS_ARG_NONNULL(5);\n\n/** Intialize a previously allocated decoder state object.\n  * The memory pointed to by \\a st must be at least the size returned by\n  * opus_multistream_encoder_get_size().\n  * This is intended for applications which use their own allocator instead of\n  * malloc.\n  * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.\n  * @see opus_multistream_decoder_create\n  * @see opus_multistream_deocder_get_size\n  * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initialize.\n  * @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).\n  *                                This must be one of 8000, 12000, 16000,\n  *                                24000, or 48000.\n  * @param channels <tt>int</tt>: Number of channels to output.\n  *                               This must be at most 255.\n  *                               It may be different from the number of coded\n  *                               channels (<code>streams +\n  *                               coupled_streams</code>).\n  * @param streams <tt>int</tt>: The total number of streams coded in the\n  *                              input.\n  *                              This must be no more than 255.\n  * @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled\n  *                                      (2 channel) streams.\n  *                                      This must be no larger than the total\n  *                                      number of streams.\n  *                                      Additionally, The total number of\n  *                                      coded channels (<code>streams +\n  *                                      coupled_streams</code>) must be no\n  *                                      more than 255.\n  * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from\n  *                    coded channels to output channels, as described in\n  *                    @ref opus_multistream.\n  * @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)\n  *          on failure.\n  */\nOPUS_EXPORT int opus_multistream_decoder_init(\n      OpusMSDecoder *st,\n      opus_int32 Fs,\n      int channels,\n      int streams,\n      int coupled_streams,\n      const unsigned char *mapping\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);\n\n/** Decode a multistream Opus packet.\n  * @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.\n  * @param[in] data <tt>const unsigned char*</tt>: Input payload.\n  *                                                Use a <code>NULL</code>\n  *                                                pointer to indicate packet\n  *                                                loss.\n  * @param len <tt>opus_int32</tt>: Number of bytes in payload.\n  * @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved\n  *                                       samples.\n  *                                       This must contain room for\n  *                                       <code>frame_size*channels</code>\n  *                                       samples.\n  * @param frame_size <tt>int</tt>: The number of samples per channel of\n  *                                 available space in \\a pcm.\n  *                                 If this is less than the maximum packet duration\n  *                                 (120 ms; 5760 for 48kHz), this function will not be capable\n  *                                 of decoding some packets. In the case of PLC (data==NULL)\n  *                                 or FEC (decode_fec=1), then frame_size needs to be exactly\n  *                                 the duration of audio that is missing, otherwise the\n  *                                 decoder will not be in the optimal state to decode the\n  *                                 next incoming packet. For the PLC and FEC cases, frame_size\n  *                                 <b>must</b> be a multiple of 2.5 ms.\n  * @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band\n  *                                 forward error correction data be decoded.\n  *                                 If no such data is available, the frame is\n  *                                 decoded as if it were lost.\n  * @returns Number of samples decoded on success or a negative error code\n  *          (see @ref opus_errorcodes) on failure.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_decode(\n    OpusMSDecoder *st,\n    const unsigned char *data,\n    opus_int32 len,\n    opus_int16 *pcm,\n    int frame_size,\n    int decode_fec\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);\n\n/** Decode a multistream Opus packet with floating point output.\n  * @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.\n  * @param[in] data <tt>const unsigned char*</tt>: Input payload.\n  *                                                Use a <code>NULL</code>\n  *                                                pointer to indicate packet\n  *                                                loss.\n  * @param len <tt>opus_int32</tt>: Number of bytes in payload.\n  * @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved\n  *                                       samples.\n  *                                       This must contain room for\n  *                                       <code>frame_size*channels</code>\n  *                                       samples.\n  * @param frame_size <tt>int</tt>: The number of samples per channel of\n  *                                 available space in \\a pcm.\n  *                                 If this is less than the maximum packet duration\n  *                                 (120 ms; 5760 for 48kHz), this function will not be capable\n  *                                 of decoding some packets. In the case of PLC (data==NULL)\n  *                                 or FEC (decode_fec=1), then frame_size needs to be exactly\n  *                                 the duration of audio that is missing, otherwise the\n  *                                 decoder will not be in the optimal state to decode the\n  *                                 next incoming packet. For the PLC and FEC cases, frame_size\n  *                                 <b>must</b> be a multiple of 2.5 ms.\n  * @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band\n  *                                 forward error correction data be decoded.\n  *                                 If no such data is available, the frame is\n  *                                 decoded as if it were lost.\n  * @returns Number of samples decoded on success or a negative error code\n  *          (see @ref opus_errorcodes) on failure.\n  */\nOPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_decode_float(\n    OpusMSDecoder *st,\n    const unsigned char *data,\n    opus_int32 len,\n    float *pcm,\n    int frame_size,\n    int decode_fec\n) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);\n\n/** Perform a CTL function on a multistream Opus decoder.\n  *\n  * Generally the request and subsequent arguments are generated by a\n  * convenience macro.\n  * @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.\n  * @param request This and all remaining parameters should be replaced by one\n  *                of the convenience macros in @ref opus_genericctls,\n  *                @ref opus_decoderctls, or @ref opus_multistream_ctls.\n  * @see opus_genericctls\n  * @see opus_decoderctls\n  * @see opus_multistream_ctls\n  */\nOPUS_EXPORT int opus_multistream_decoder_ctl(OpusMSDecoder *st, int request, ...) OPUS_ARG_NONNULL(1);\n\n/** Frees an <code>OpusMSDecoder</code> allocated by\n  * opus_multistream_decoder_create().\n  * @param st <tt>OpusMSDecoder</tt>: Multistream decoder state to be freed.\n  */\nOPUS_EXPORT void opus_multistream_decoder_destroy(OpusMSDecoder *st);\n\n/**@}*/\n\n/**@}*/\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* OPUS_MULTISTREAM_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/include/opus_types.h",
    "content": "/* (C) COPYRIGHT 1994-2002 Xiph.Org Foundation */\n/* Modified by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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/* opus_types.h based on ogg_types.h from libogg */\n\n/**\n   @file opus_types.h\n   @brief Opus reference implementation types\n*/\n#ifndef OPUS_TYPES_H\n#define OPUS_TYPES_H\n\n/* Use the real stdint.h if it's there (taken from Paul Hsieh's pstdint.h) */\n#if (defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) || defined (HAVE_STDINT_H))\n#include <stdint.h>\n\n   typedef int16_t opus_int16;\n   typedef uint16_t opus_uint16;\n   typedef int32_t opus_int32;\n   typedef uint32_t opus_uint32;\n#elif defined(_WIN32)\n\n#  if defined(__CYGWIN__)\n#    include <_G_config.h>\n     typedef _G_int32_t opus_int32;\n     typedef _G_uint32_t opus_uint32;\n     typedef _G_int16 opus_int16;\n     typedef _G_uint16 opus_uint16;\n#  elif defined(__MINGW32__)\n     typedef short opus_int16;\n     typedef unsigned short opus_uint16;\n     typedef int opus_int32;\n     typedef unsigned int opus_uint32;\n#  elif defined(__MWERKS__)\n     typedef int opus_int32;\n     typedef unsigned int opus_uint32;\n     typedef short opus_int16;\n     typedef unsigned short opus_uint16;\n#  else\n     /* MSVC/Borland */\n     typedef __int32 opus_int32;\n     typedef unsigned __int32 opus_uint32;\n     typedef __int16 opus_int16;\n     typedef unsigned __int16 opus_uint16;\n#  endif\n\n#elif defined(__MACOS__)\n\n#  include <sys/types.h>\n   typedef SInt16 opus_int16;\n   typedef UInt16 opus_uint16;\n   typedef SInt32 opus_int32;\n   typedef UInt32 opus_uint32;\n\n#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */\n\n#  include <sys/types.h>\n   typedef int16_t opus_int16;\n   typedef u_int16_t opus_uint16;\n   typedef int32_t opus_int32;\n   typedef u_int32_t opus_uint32;\n\n#elif defined(__BEOS__)\n\n   /* Be */\n#  include <inttypes.h>\n   typedef int16 opus_int16;\n   typedef u_int16 opus_uint16;\n   typedef int32_t opus_int32;\n   typedef u_int32_t opus_uint32;\n\n#elif defined (__EMX__)\n\n   /* OS/2 GCC */\n   typedef short opus_int16;\n   typedef unsigned short opus_uint16;\n   typedef int opus_int32;\n   typedef unsigned int opus_uint32;\n\n#elif defined (DJGPP)\n\n   /* DJGPP */\n   typedef short opus_int16;\n   typedef unsigned short opus_uint16;\n   typedef int opus_int32;\n   typedef unsigned int opus_uint32;\n\n#elif defined(R5900)\n\n   /* PS2 EE */\n   typedef int opus_int32;\n   typedef unsigned opus_uint32;\n   typedef short opus_int16;\n   typedef unsigned short opus_uint16;\n\n#elif defined(__SYMBIAN32__)\n\n   /* Symbian GCC */\n   typedef signed short opus_int16;\n   typedef unsigned short opus_uint16;\n   typedef signed int opus_int32;\n   typedef unsigned int opus_uint32;\n\n#elif defined(CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)\n\n   typedef short opus_int16;\n   typedef unsigned short opus_uint16;\n   typedef long opus_int32;\n   typedef unsigned long opus_uint32;\n\n#elif defined(CONFIG_TI_C6X)\n\n   typedef short opus_int16;\n   typedef unsigned short opus_uint16;\n   typedef int opus_int32;\n   typedef unsigned int opus_uint32;\n\n#else\n\n   /* Give up, take a reasonable guess */\n   typedef short opus_int16;\n   typedef unsigned short opus_uint16;\n   typedef int opus_int32;\n   typedef unsigned int opus_uint32;\n\n#endif\n\n#define opus_int         int                     /* used for counters etc; at least 16 bits */\n#define opus_int64       long long\n#define opus_int8        signed char\n\n#define opus_uint        unsigned int            /* used for counters etc; at least 16 bits */\n#define opus_uint64      unsigned long long\n#define opus_uint8       unsigned char\n\n#endif  /* OPUS_TYPES_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/ogg/bitwise.c",
    "content": "/********************************************************************\n *                                                                  *\n * THIS FILE IS PART OF THE Ogg CONTAINER SOURCE CODE.              *\n * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *\n * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *\n * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *\n *                                                                  *\n * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010             *\n * by the Xiph.Org Foundation http://www.xiph.org/                  *\n *                                                                  *\n ********************************************************************\n\n  function: packing variable sized words into an octet stream\n  last mod: $Id: bitwise.c 18051 2011-08-04 17:56:39Z giles $\n\n ********************************************************************/\n\n/* We're 'LSb' endian; if we write a word but read individual bits,\n   then we'll read the lsb first */\n\n#include <string.h>\n#include <stdlib.h>\n#include <limits.h>\n#include <ogg.h>\n\n#define BUFFER_INCREMENT 256\n\nstatic const unsigned long mask[]=\n{0x00000000,0x00000001,0x00000003,0x00000007,0x0000000f,\n 0x0000001f,0x0000003f,0x0000007f,0x000000ff,0x000001ff,\n 0x000003ff,0x000007ff,0x00000fff,0x00001fff,0x00003fff,\n 0x00007fff,0x0000ffff,0x0001ffff,0x0003ffff,0x0007ffff,\n 0x000fffff,0x001fffff,0x003fffff,0x007fffff,0x00ffffff,\n 0x01ffffff,0x03ffffff,0x07ffffff,0x0fffffff,0x1fffffff,\n 0x3fffffff,0x7fffffff,0xffffffff };\n\nstatic const unsigned int mask8B[]=\n{0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};\n\nvoid oggpack_writeinit(oggpack_buffer *b){\n  memset(b,0,sizeof(*b));\n  b->ptr=b->buffer=_ogg_malloc(BUFFER_INCREMENT);\n  b->buffer[0]='\\0';\n  b->storage=BUFFER_INCREMENT;\n}\n\nvoid oggpackB_writeinit(oggpack_buffer *b){\n  oggpack_writeinit(b);\n}\n\nint oggpack_writecheck(oggpack_buffer *b){\n  if(!b->ptr || !b->storage)return -1;\n  return 0;\n}\n\nint oggpackB_writecheck(oggpack_buffer *b){\n  return oggpack_writecheck(b);\n}\n\nvoid oggpack_writetrunc(oggpack_buffer *b,long bits){\n  long bytes=bits>>3;\n  if(b->ptr){\n    bits-=bytes*8;\n    b->ptr=b->buffer+bytes;\n    b->endbit=bits;\n    b->endbyte=bytes;\n    *b->ptr&=mask[bits];\n  }\n}\n\nvoid oggpackB_writetrunc(oggpack_buffer *b,long bits){\n  long bytes=bits>>3;\n  if(b->ptr){\n    bits-=bytes*8;\n    b->ptr=b->buffer+bytes;\n    b->endbit=bits;\n    b->endbyte=bytes;\n    *b->ptr&=mask8B[bits];\n  }\n}\n\n/* Takes only up to 32 bits. */\nvoid oggpack_write(oggpack_buffer *b,unsigned long value,int bits){\n  if(bits<0 || bits>32) goto err;\n  if(b->endbyte>=b->storage-4){\n    void *ret;\n    if(!b->ptr)return;\n    if(b->storage>LONG_MAX-BUFFER_INCREMENT) goto err;\n    ret=_ogg_realloc(b->buffer,b->storage+BUFFER_INCREMENT);\n    if(!ret) goto err;\n    b->buffer=ret;\n    b->storage+=BUFFER_INCREMENT;\n    b->ptr=b->buffer+b->endbyte;\n  }\n\n  value&=mask[bits];\n  bits+=b->endbit;\n\n  b->ptr[0]|=value<<b->endbit;\n\n  if(bits>=8){\n    b->ptr[1]=(unsigned char)(value>>(8-b->endbit));\n    if(bits>=16){\n      b->ptr[2]=(unsigned char)(value>>(16-b->endbit));\n      if(bits>=24){\n        b->ptr[3]=(unsigned char)(value>>(24-b->endbit));\n        if(bits>=32){\n          if(b->endbit)\n            b->ptr[4]=(unsigned char)(value>>(32-b->endbit));\n          else\n            b->ptr[4]=0;\n        }\n      }\n    }\n  }\n\n  b->endbyte+=bits/8;\n  b->ptr+=bits/8;\n  b->endbit=bits&7;\n  return;\n err:\n  oggpack_writeclear(b);\n}\n\n/* Takes only up to 32 bits. */\nvoid oggpackB_write(oggpack_buffer *b,unsigned long value,int bits){\n  if(bits<0 || bits>32) goto err;\n  if(b->endbyte>=b->storage-4){\n    void *ret;\n    if(!b->ptr)return;\n    if(b->storage>LONG_MAX-BUFFER_INCREMENT) goto err;\n    ret=_ogg_realloc(b->buffer,b->storage+BUFFER_INCREMENT);\n    if(!ret) goto err;\n    b->buffer=ret;\n    b->storage+=BUFFER_INCREMENT;\n    b->ptr=b->buffer+b->endbyte;\n  }\n\n  value=(value&mask[bits])<<(32-bits);\n  bits+=b->endbit;\n\n  b->ptr[0]|=value>>(24+b->endbit);\n\n  if(bits>=8){\n    b->ptr[1]=(unsigned char)(value>>(16+b->endbit));\n    if(bits>=16){\n      b->ptr[2]=(unsigned char)(value>>(8+b->endbit));\n      if(bits>=24){\n        b->ptr[3]=(unsigned char)(value>>(b->endbit));\n        if(bits>=32){\n          if(b->endbit)\n            b->ptr[4]=(unsigned char)(value<<(8-b->endbit));\n          else\n            b->ptr[4]=0;\n        }\n      }\n    }\n  }\n\n  b->endbyte+=bits/8;\n  b->ptr+=bits/8;\n  b->endbit=bits&7;\n  return;\n err:\n  oggpack_writeclear(b);\n}\n\nvoid oggpack_writealign(oggpack_buffer *b){\n  int bits=8-b->endbit;\n  if(bits<8)\n    oggpack_write(b,0,bits);\n}\n\nvoid oggpackB_writealign(oggpack_buffer *b){\n  int bits=8-b->endbit;\n  if(bits<8)\n    oggpackB_write(b,0,bits);\n}\n\nstatic void oggpack_writecopy_helper(oggpack_buffer *b,\n                                     void *source,\n                                     long bits,\n                                     void (*w)(oggpack_buffer *,\n                                               unsigned long,\n                                               int),\n                                     int msb){\n  unsigned char *ptr=(unsigned char *)source;\n\n  long bytes=bits/8;\n  bits-=bytes*8;\n\n  if(b->endbit){\n    int i;\n    /* unaligned copy.  Do it the hard way. */\n    for(i=0;i<bytes;i++)\n      w(b,(unsigned long)(ptr[i]),8);\n  }else{\n    /* aligned block copy */\n    if(b->endbyte+bytes+1>=b->storage){\n      void *ret;\n      if(!b->ptr) goto err;\n      if(b->endbyte+bytes+BUFFER_INCREMENT>b->storage) goto err;\n      b->storage=b->endbyte+bytes+BUFFER_INCREMENT;\n      ret=_ogg_realloc(b->buffer,b->storage);\n      if(!ret) goto err;\n      b->buffer=ret;\n      b->ptr=b->buffer+b->endbyte;\n    }\n\n    memmove(b->ptr,source,bytes);\n    b->ptr+=bytes;\n    b->endbyte+=bytes;\n    *b->ptr=0;\n\n  }\n  if(bits){\n    if(msb)\n      w(b,(unsigned long)(ptr[bytes]>>(8-bits)),bits);\n    else\n      w(b,(unsigned long)(ptr[bytes]),bits);\n  }\n  return;\n err:\n  oggpack_writeclear(b);\n}\n\nvoid oggpack_writecopy(oggpack_buffer *b,void *source,long bits){\n  oggpack_writecopy_helper(b,source,bits,oggpack_write,0);\n}\n\nvoid oggpackB_writecopy(oggpack_buffer *b,void *source,long bits){\n  oggpack_writecopy_helper(b,source,bits,oggpackB_write,1);\n}\n\nvoid oggpack_reset(oggpack_buffer *b){\n  if(!b->ptr)return;\n  b->ptr=b->buffer;\n  b->buffer[0]=0;\n  b->endbit=b->endbyte=0;\n}\n\nvoid oggpackB_reset(oggpack_buffer *b){\n  oggpack_reset(b);\n}\n\nvoid oggpack_writeclear(oggpack_buffer *b){\n  if(b->buffer)_ogg_free(b->buffer);\n  memset(b,0,sizeof(*b));\n}\n\nvoid oggpackB_writeclear(oggpack_buffer *b){\n  oggpack_writeclear(b);\n}\n\nvoid oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes){\n  memset(b,0,sizeof(*b));\n  b->buffer=b->ptr=buf;\n  b->storage=bytes;\n}\n\nvoid oggpackB_readinit(oggpack_buffer *b,unsigned char *buf,int bytes){\n  oggpack_readinit(b,buf,bytes);\n}\n\n/* Read in bits without advancing the bitptr; bits <= 32 */\nlong oggpack_look(oggpack_buffer *b,int bits){\n  unsigned long ret;\n  unsigned long m;\n\n  if(bits<0 || bits>32) return -1;\n  m=mask[bits];\n  bits+=b->endbit;\n\n  if(b->endbyte >= b->storage-4){\n    /* not the main path */\n    if(b->endbyte > b->storage-((bits+7)>>3)) return -1;\n    /* special case to avoid reading b->ptr[0], which might be past the end of\n        the buffer; also skips some useless accounting */\n    else if(!bits)return(0L);\n  }\n\n  ret=b->ptr[0]>>b->endbit;\n  if(bits>8){\n    ret|=b->ptr[1]<<(8-b->endbit);\n    if(bits>16){\n      ret|=b->ptr[2]<<(16-b->endbit);\n      if(bits>24){\n        ret|=b->ptr[3]<<(24-b->endbit);\n        if(bits>32 && b->endbit)\n          ret|=b->ptr[4]<<(32-b->endbit);\n      }\n    }\n  }\n  return(m&ret);\n}\n\n/* Read in bits without advancing the bitptr; bits <= 32 */\nlong oggpackB_look(oggpack_buffer *b,int bits){\n  unsigned long ret;\n  int m=32-bits;\n\n  if(m<0 || m>32) return -1;\n  bits+=b->endbit;\n\n  if(b->endbyte >= b->storage-4){\n    /* not the main path */\n    if(b->endbyte > b->storage-((bits+7)>>3)) return -1;\n    /* special case to avoid reading b->ptr[0], which might be past the end of\n        the buffer; also skips some useless accounting */\n    else if(!bits)return(0L);\n  }\n\n  ret=b->ptr[0]<<(24+b->endbit);\n  if(bits>8){\n    ret|=b->ptr[1]<<(16+b->endbit);\n    if(bits>16){\n      ret|=b->ptr[2]<<(8+b->endbit);\n      if(bits>24){\n        ret|=b->ptr[3]<<(b->endbit);\n        if(bits>32 && b->endbit)\n          ret|=b->ptr[4]>>(8-b->endbit);\n      }\n    }\n  }\n  return ((ret&0xffffffff)>>(m>>1))>>((m+1)>>1);\n}\n\nlong oggpack_look1(oggpack_buffer *b){\n  if(b->endbyte>=b->storage)return(-1);\n  return((b->ptr[0]>>b->endbit)&1);\n}\n\nlong oggpackB_look1(oggpack_buffer *b){\n  if(b->endbyte>=b->storage)return(-1);\n  return((b->ptr[0]>>(7-b->endbit))&1);\n}\n\nvoid oggpack_adv(oggpack_buffer *b,int bits){\n  bits+=b->endbit;\n\n  if(b->endbyte > b->storage-((bits+7)>>3)) goto overflow;\n\n  b->ptr+=bits/8;\n  b->endbyte+=bits/8;\n  b->endbit=bits&7;\n  return;\n\n overflow:\n  b->ptr=NULL;\n  b->endbyte=b->storage;\n  b->endbit=1;\n}\n\nvoid oggpackB_adv(oggpack_buffer *b,int bits){\n  oggpack_adv(b,bits);\n}\n\nvoid oggpack_adv1(oggpack_buffer *b){\n  if(++(b->endbit)>7){\n    b->endbit=0;\n    b->ptr++;\n    b->endbyte++;\n  }\n}\n\nvoid oggpackB_adv1(oggpack_buffer *b){\n  oggpack_adv1(b);\n}\n\n/* bits <= 32 */\nlong oggpack_read(oggpack_buffer *b,int bits){\n  long ret;\n  unsigned long m;\n\n  if(bits<0 || bits>32) goto err;\n  m=mask[bits];\n  bits+=b->endbit;\n\n  if(b->endbyte >= b->storage-4){\n    /* not the main path */\n    if(b->endbyte > b->storage-((bits+7)>>3)) goto overflow;\n    /* special case to avoid reading b->ptr[0], which might be past the end of\n        the buffer; also skips some useless accounting */\n    else if(!bits)return(0L);\n  }\n\n  ret=b->ptr[0]>>b->endbit;\n  if(bits>8){\n    ret|=b->ptr[1]<<(8-b->endbit);\n    if(bits>16){\n      ret|=b->ptr[2]<<(16-b->endbit);\n      if(bits>24){\n        ret|=b->ptr[3]<<(24-b->endbit);\n        if(bits>32 && b->endbit){\n          ret|=b->ptr[4]<<(32-b->endbit);\n        }\n      }\n    }\n  }\n  ret&=m;\n  b->ptr+=bits/8;\n  b->endbyte+=bits/8;\n  b->endbit=bits&7;\n  return ret;\n\n overflow:\n err:\n  b->ptr=NULL;\n  b->endbyte=b->storage;\n  b->endbit=1;\n  return -1L;\n}\n\n/* bits <= 32 */\nlong oggpackB_read(oggpack_buffer *b,int bits){\n  long ret;\n  long m=32-bits;\n\n  if(m<0 || m>32) goto err;\n  bits+=b->endbit;\n\n  if(b->endbyte+4>=b->storage){\n    /* not the main path */\n    if(b->endbyte > b->storage-((bits+7)>>3)) goto overflow;\n    /* special case to avoid reading b->ptr[0], which might be past the end of\n        the buffer; also skips some useless accounting */\n    else if(!bits)return(0L);\n  }\n\n  ret=b->ptr[0]<<(24+b->endbit);\n  if(bits>8){\n    ret|=b->ptr[1]<<(16+b->endbit);\n    if(bits>16){\n      ret|=b->ptr[2]<<(8+b->endbit);\n      if(bits>24){\n        ret|=b->ptr[3]<<(b->endbit);\n        if(bits>32 && b->endbit)\n          ret|=b->ptr[4]>>(8-b->endbit);\n      }\n    }\n  }\n  ret=((ret&0xffffffffUL)>>(m>>1))>>((m+1)>>1);\n\n  b->ptr+=bits/8;\n  b->endbyte+=bits/8;\n  b->endbit=bits&7;\n  return ret;\n\n overflow:\n err:\n  b->ptr=NULL;\n  b->endbyte=b->storage;\n  b->endbit=1;\n  return -1L;\n}\n\nlong oggpack_read1(oggpack_buffer *b){\n  long ret;\n\n  if(b->endbyte >= b->storage) goto overflow;\n  ret=(b->ptr[0]>>b->endbit)&1;\n\n  b->endbit++;\n  if(b->endbit>7){\n    b->endbit=0;\n    b->ptr++;\n    b->endbyte++;\n  }\n  return ret;\n\n overflow:\n  b->ptr=NULL;\n  b->endbyte=b->storage;\n  b->endbit=1;\n  return -1L;\n}\n\nlong oggpackB_read1(oggpack_buffer *b){\n  long ret;\n\n  if(b->endbyte >= b->storage) goto overflow;\n  ret=(b->ptr[0]>>(7-b->endbit))&1;\n\n  b->endbit++;\n  if(b->endbit>7){\n    b->endbit=0;\n    b->ptr++;\n    b->endbyte++;\n  }\n  return ret;\n\n overflow:\n  b->ptr=NULL;\n  b->endbyte=b->storage;\n  b->endbit=1;\n  return -1L;\n}\n\nlong oggpack_bytes(oggpack_buffer *b){\n  return(b->endbyte+(b->endbit+7)/8);\n}\n\nlong oggpack_bits(oggpack_buffer *b){\n  return(b->endbyte*8+b->endbit);\n}\n\nlong oggpackB_bytes(oggpack_buffer *b){\n  return oggpack_bytes(b);\n}\n\nlong oggpackB_bits(oggpack_buffer *b){\n  return oggpack_bits(b);\n}\n\nunsigned char *oggpack_get_buffer(oggpack_buffer *b){\n  return(b->buffer);\n}\n\nunsigned char *oggpackB_get_buffer(oggpack_buffer *b){\n  return oggpack_get_buffer(b);\n}\n\n/* Self test of the bitwise routines; everything else is based on\n   them, so they damned well better be solid. */\n\n#ifdef _V_SELFTEST\n#include <stdio.h>\n\nstatic int ilog(unsigned int v){\n  int ret=0;\n  while(v){\n    ret++;\n    v>>=1;\n  }\n  return(ret);\n}\n\noggpack_buffer o;\noggpack_buffer r;\n\nvoid report(char *in){\n  fprintf(stderr,\"%s\",in);\n  exit(1);\n}\n\nvoid cliptest(unsigned long *b,int vals,int bits,int *comp,int compsize){\n  long bytes,i;\n  unsigned char *buffer;\n\n  oggpack_reset(&o);\n  for(i=0;i<vals;i++)\n    oggpack_write(&o,b[i],bits?bits:ilog(b[i]));\n  buffer=oggpack_get_buffer(&o);\n  bytes=oggpack_bytes(&o);\n  if(bytes!=compsize)report(\"wrong number of bytes!\\n\");\n  for(i=0;i<bytes;i++)if(buffer[i]!=comp[i]){\n    for(i=0;i<bytes;i++)fprintf(stderr,\"%x %x\\n\",(int)buffer[i],(int)comp[i]);\n    report(\"wrote incorrect value!\\n\");\n  }\n  oggpack_readinit(&r,buffer,bytes);\n  for(i=0;i<vals;i++){\n    int tbit=bits?bits:ilog(b[i]);\n    if(oggpack_look(&r,tbit)==-1)\n      report(\"out of data!\\n\");\n    if(oggpack_look(&r,tbit)!=(b[i]&mask[tbit]))\n      report(\"looked at incorrect value!\\n\");\n    if(tbit==1)\n      if(oggpack_look1(&r)!=(b[i]&mask[tbit]))\n        report(\"looked at single bit incorrect value!\\n\");\n    if(tbit==1){\n      if(oggpack_read1(&r)!=(b[i]&mask[tbit]))\n        report(\"read incorrect single bit value!\\n\");\n    }else{\n    if(oggpack_read(&r,tbit)!=(b[i]&mask[tbit]))\n      report(\"read incorrect value!\\n\");\n    }\n  }\n  if(oggpack_bytes(&r)!=bytes)report(\"leftover bytes after read!\\n\");\n}\n\nvoid cliptestB(unsigned long *b,int vals,int bits,int *comp,int compsize){\n  long bytes,i;\n  unsigned char *buffer;\n\n  oggpackB_reset(&o);\n  for(i=0;i<vals;i++)\n    oggpackB_write(&o,b[i],bits?bits:ilog(b[i]));\n  buffer=oggpackB_get_buffer(&o);\n  bytes=oggpackB_bytes(&o);\n  if(bytes!=compsize)report(\"wrong number of bytes!\\n\");\n  for(i=0;i<bytes;i++)if(buffer[i]!=comp[i]){\n    for(i=0;i<bytes;i++)fprintf(stderr,\"%x %x\\n\",(int)buffer[i],(int)comp[i]);\n    report(\"wrote incorrect value!\\n\");\n  }\n  oggpackB_readinit(&r,buffer,bytes);\n  for(i=0;i<vals;i++){\n    int tbit=bits?bits:ilog(b[i]);\n    if(oggpackB_look(&r,tbit)==-1)\n      report(\"out of data!\\n\");\n    if(oggpackB_look(&r,tbit)!=(b[i]&mask[tbit]))\n      report(\"looked at incorrect value!\\n\");\n    if(tbit==1)\n      if(oggpackB_look1(&r)!=(b[i]&mask[tbit]))\n        report(\"looked at single bit incorrect value!\\n\");\n    if(tbit==1){\n      if(oggpackB_read1(&r)!=(b[i]&mask[tbit]))\n        report(\"read incorrect single bit value!\\n\");\n    }else{\n    if(oggpackB_read(&r,tbit)!=(b[i]&mask[tbit]))\n      report(\"read incorrect value!\\n\");\n    }\n  }\n  if(oggpackB_bytes(&r)!=bytes)report(\"leftover bytes after read!\\n\");\n}\n\nint main(void){\n  unsigned char *buffer;\n  long bytes,i;\n  static unsigned long testbuffer1[]=\n    {18,12,103948,4325,543,76,432,52,3,65,4,56,32,42,34,21,1,23,32,546,456,7,\n       567,56,8,8,55,3,52,342,341,4,265,7,67,86,2199,21,7,1,5,1,4};\n  int test1size=43;\n\n  static unsigned long testbuffer2[]=\n    {216531625L,1237861823,56732452,131,3212421,12325343,34547562,12313212,\n       1233432,534,5,346435231,14436467,7869299,76326614,167548585,\n       85525151,0,12321,1,349528352};\n  int test2size=21;\n\n  static unsigned long testbuffer3[]=\n    {1,0,14,0,1,0,12,0,1,0,0,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,1,1,1,1,0,0,1,\n       0,1,30,1,1,1,0,0,1,0,0,0,12,0,11,0,1,0,0,1};\n  int test3size=56;\n\n  static unsigned long large[]=\n    {2136531625L,2137861823,56732452,131,3212421,12325343,34547562,12313212,\n       1233432,534,5,2146435231,14436467,7869299,76326614,167548585,\n       85525151,0,12321,1,2146528352};\n\n  int onesize=33;\n  static int one[33]={146,25,44,151,195,15,153,176,233,131,196,65,85,172,47,40,\n                    34,242,223,136,35,222,211,86,171,50,225,135,214,75,172,\n                    223,4};\n  static int oneB[33]={150,101,131,33,203,15,204,216,105,193,156,65,84,85,222,\n                       8,139,145,227,126,34,55,244,171,85,100,39,195,173,18,\n                       245,251,128};\n\n  int twosize=6;\n  static int two[6]={61,255,255,251,231,29};\n  static int twoB[6]={247,63,255,253,249,120};\n\n  int threesize=54;\n  static int three[54]={169,2,232,252,91,132,156,36,89,13,123,176,144,32,254,\n                      142,224,85,59,121,144,79,124,23,67,90,90,216,79,23,83,\n                      58,135,196,61,55,129,183,54,101,100,170,37,127,126,10,\n                      100,52,4,14,18,86,77,1};\n  static int threeB[54]={206,128,42,153,57,8,183,251,13,89,36,30,32,144,183,\n                         130,59,240,121,59,85,223,19,228,180,134,33,107,74,98,\n                         233,253,196,135,63,2,110,114,50,155,90,127,37,170,104,\n                         200,20,254,4,58,106,176,144,0};\n\n  int foursize=38;\n  static int four[38]={18,6,163,252,97,194,104,131,32,1,7,82,137,42,129,11,72,\n                     132,60,220,112,8,196,109,64,179,86,9,137,195,208,122,169,\n                     28,2,133,0,1};\n  static int fourB[38]={36,48,102,83,243,24,52,7,4,35,132,10,145,21,2,93,2,41,\n                        1,219,184,16,33,184,54,149,170,132,18,30,29,98,229,67,\n                        129,10,4,32};\n\n  int fivesize=45;\n  static int five[45]={169,2,126,139,144,172,30,4,80,72,240,59,130,218,73,62,\n                     241,24,210,44,4,20,0,248,116,49,135,100,110,130,181,169,\n                     84,75,159,2,1,0,132,192,8,0,0,18,22};\n  static int fiveB[45]={1,84,145,111,245,100,128,8,56,36,40,71,126,78,213,226,\n                        124,105,12,0,133,128,0,162,233,242,67,152,77,205,77,\n                        172,150,169,129,79,128,0,6,4,32,0,27,9,0};\n\n  int sixsize=7;\n  static int six[7]={17,177,170,242,169,19,148};\n  static int sixB[7]={136,141,85,79,149,200,41};\n\n  /* Test read/write together */\n  /* Later we test against pregenerated bitstreams */\n  oggpack_writeinit(&o);\n\n  fprintf(stderr,\"\\nSmall preclipped packing (LSb): \");\n  cliptest(testbuffer1,test1size,0,one,onesize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nNull bit call (LSb): \");\n  cliptest(testbuffer3,test3size,0,two,twosize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nLarge preclipped packing (LSb): \");\n  cliptest(testbuffer2,test2size,0,three,threesize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\n32 bit preclipped packing (LSb): \");\n  oggpack_reset(&o);\n  for(i=0;i<test2size;i++)\n    oggpack_write(&o,large[i],32);\n  buffer=oggpack_get_buffer(&o);\n  bytes=oggpack_bytes(&o);\n  oggpack_readinit(&r,buffer,bytes);\n  for(i=0;i<test2size;i++){\n    if(oggpack_look(&r,32)==-1)report(\"out of data. failed!\");\n    if(oggpack_look(&r,32)!=large[i]){\n      fprintf(stderr,\"%ld != %ld (%lx!=%lx):\",oggpack_look(&r,32),large[i],\n              oggpack_look(&r,32),large[i]);\n      report(\"read incorrect value!\\n\");\n    }\n    oggpack_adv(&r,32);\n  }\n  if(oggpack_bytes(&r)!=bytes)report(\"leftover bytes after read!\\n\");\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nSmall unclipped packing (LSb): \");\n  cliptest(testbuffer1,test1size,7,four,foursize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nLarge unclipped packing (LSb): \");\n  cliptest(testbuffer2,test2size,17,five,fivesize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nSingle bit unclipped packing (LSb): \");\n  cliptest(testbuffer3,test3size,1,six,sixsize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nTesting read past end (LSb): \");\n  oggpack_readinit(&r,(unsigned char *)\"\\0\\0\\0\\0\\0\\0\\0\\0\",8);\n  for(i=0;i<64;i++){\n    if(oggpack_read(&r,1)!=0){\n      fprintf(stderr,\"failed; got -1 prematurely.\\n\");\n      exit(1);\n    }\n  }\n  if(oggpack_look(&r,1)!=-1 ||\n     oggpack_read(&r,1)!=-1){\n      fprintf(stderr,\"failed; read past end without -1.\\n\");\n      exit(1);\n  }\n  oggpack_readinit(&r,(unsigned char *)\"\\0\\0\\0\\0\\0\\0\\0\\0\",8);\n  if(oggpack_read(&r,30)!=0 || oggpack_read(&r,16)!=0){\n      fprintf(stderr,\"failed 2; got -1 prematurely.\\n\");\n      exit(1);\n  }\n\n  if(oggpack_look(&r,18)!=0 ||\n     oggpack_look(&r,18)!=0){\n    fprintf(stderr,\"failed 3; got -1 prematurely.\\n\");\n      exit(1);\n  }\n  if(oggpack_look(&r,19)!=-1 ||\n     oggpack_look(&r,19)!=-1){\n    fprintf(stderr,\"failed; read past end without -1.\\n\");\n      exit(1);\n  }\n  if(oggpack_look(&r,32)!=-1 ||\n     oggpack_look(&r,32)!=-1){\n    fprintf(stderr,\"failed; read past end without -1.\\n\");\n      exit(1);\n  }\n  oggpack_writeclear(&o);\n  fprintf(stderr,\"ok.\\n\");\n\n  /********** lazy, cut-n-paste retest with MSb packing ***********/\n\n  /* Test read/write together */\n  /* Later we test against pregenerated bitstreams */\n  oggpackB_writeinit(&o);\n\n  fprintf(stderr,\"\\nSmall preclipped packing (MSb): \");\n  cliptestB(testbuffer1,test1size,0,oneB,onesize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nNull bit call (MSb): \");\n  cliptestB(testbuffer3,test3size,0,twoB,twosize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nLarge preclipped packing (MSb): \");\n  cliptestB(testbuffer2,test2size,0,threeB,threesize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\n32 bit preclipped packing (MSb): \");\n  oggpackB_reset(&o);\n  for(i=0;i<test2size;i++)\n    oggpackB_write(&o,large[i],32);\n  buffer=oggpackB_get_buffer(&o);\n  bytes=oggpackB_bytes(&o);\n  oggpackB_readinit(&r,buffer,bytes);\n  for(i=0;i<test2size;i++){\n    if(oggpackB_look(&r,32)==-1)report(\"out of data. failed!\");\n    if(oggpackB_look(&r,32)!=large[i]){\n      fprintf(stderr,\"%ld != %ld (%lx!=%lx):\",oggpackB_look(&r,32),large[i],\n              oggpackB_look(&r,32),large[i]);\n      report(\"read incorrect value!\\n\");\n    }\n    oggpackB_adv(&r,32);\n  }\n  if(oggpackB_bytes(&r)!=bytes)report(\"leftover bytes after read!\\n\");\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nSmall unclipped packing (MSb): \");\n  cliptestB(testbuffer1,test1size,7,fourB,foursize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nLarge unclipped packing (MSb): \");\n  cliptestB(testbuffer2,test2size,17,fiveB,fivesize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nSingle bit unclipped packing (MSb): \");\n  cliptestB(testbuffer3,test3size,1,sixB,sixsize);\n  fprintf(stderr,\"ok.\");\n\n  fprintf(stderr,\"\\nTesting read past end (MSb): \");\n  oggpackB_readinit(&r,(unsigned char *)\"\\0\\0\\0\\0\\0\\0\\0\\0\",8);\n  for(i=0;i<64;i++){\n    if(oggpackB_read(&r,1)!=0){\n      fprintf(stderr,\"failed; got -1 prematurely.\\n\");\n      exit(1);\n    }\n  }\n  if(oggpackB_look(&r,1)!=-1 ||\n     oggpackB_read(&r,1)!=-1){\n      fprintf(stderr,\"failed; read past end without -1.\\n\");\n      exit(1);\n  }\n  oggpackB_readinit(&r,(unsigned char *)\"\\0\\0\\0\\0\\0\\0\\0\\0\",8);\n  if(oggpackB_read(&r,30)!=0 || oggpackB_read(&r,16)!=0){\n      fprintf(stderr,\"failed 2; got -1 prematurely.\\n\");\n      exit(1);\n  }\n\n  if(oggpackB_look(&r,18)!=0 ||\n     oggpackB_look(&r,18)!=0){\n    fprintf(stderr,\"failed 3; got -1 prematurely.\\n\");\n      exit(1);\n  }\n  if(oggpackB_look(&r,19)!=-1 ||\n     oggpackB_look(&r,19)!=-1){\n    fprintf(stderr,\"failed; read past end without -1.\\n\");\n      exit(1);\n  }\n  if(oggpackB_look(&r,32)!=-1 ||\n     oggpackB_look(&r,32)!=-1){\n    fprintf(stderr,\"failed; read past end without -1.\\n\");\n      exit(1);\n  }\n  oggpackB_writeclear(&o);\n  fprintf(stderr,\"ok.\\n\\n\");\n\n\n  return(0);\n}\n#endif  /* _V_SELFTEST */\n\n#undef BUFFER_INCREMENT\n"
  },
  {
    "path": "TelegramClient.Opus/opus/ogg/framing.c",
    "content": "/********************************************************************\n *                                                                  *\n * THIS FILE IS PART OF THE Ogg CONTAINER SOURCE CODE.              *\n * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *\n * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *\n * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *\n *                                                                  *\n * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010             *\n * by the Xiph.Org Foundation http://www.xiph.org/                  *\n *                                                                  *\n ********************************************************************\n\n function: code raw packets into framed OggSquish stream and\n           decode Ogg streams back into raw packets\n last mod: $Id: framing.c 18758 2013-01-08 16:29:56Z tterribe $\n\n note: The CRC code is directly derived from public domain code by\n Ross Williams (ross@guest.adelaide.edu.au).  See docs/framing.html\n for details.\n\n ********************************************************************/\n\n#include <stdlib.h>\n#include <limits.h>\n#include <string.h>\n#include <ogg.h>\n\n/* A complete description of Ogg framing exists in docs/framing.html */\n\nint ogg_page_version(const ogg_page *og){\n  return((int)(og->header[4]));\n}\n\nint ogg_page_continued(const ogg_page *og){\n  return((int)(og->header[5]&0x01));\n}\n\nint ogg_page_bos(const ogg_page *og){\n  return((int)(og->header[5]&0x02));\n}\n\nint ogg_page_eos(const ogg_page *og){\n  return((int)(og->header[5]&0x04));\n}\n\nogg_int64_t ogg_page_granulepos(const ogg_page *og){\n  unsigned char *page=og->header;\n  ogg_int64_t granulepos=page[13]&(0xff);\n  granulepos= (granulepos<<8)|(page[12]&0xff);\n  granulepos= (granulepos<<8)|(page[11]&0xff);\n  granulepos= (granulepos<<8)|(page[10]&0xff);\n  granulepos= (granulepos<<8)|(page[9]&0xff);\n  granulepos= (granulepos<<8)|(page[8]&0xff);\n  granulepos= (granulepos<<8)|(page[7]&0xff);\n  granulepos= (granulepos<<8)|(page[6]&0xff);\n  return(granulepos);\n}\n\nint ogg_page_serialno(const ogg_page *og){\n  return(og->header[14] |\n         (og->header[15]<<8) |\n         (og->header[16]<<16) |\n         (og->header[17]<<24));\n}\n\nlong ogg_page_pageno(const ogg_page *og){\n  return(og->header[18] |\n         (og->header[19]<<8) |\n         (og->header[20]<<16) |\n         (og->header[21]<<24));\n}\n\n\n\n/* returns the number of packets that are completed on this page (if\n   the leading packet is begun on a previous page, but ends on this\n   page, it's counted */\n\n/* NOTE:\n   If a page consists of a packet begun on a previous page, and a new\n   packet begun (but not completed) on this page, the return will be:\n     ogg_page_packets(page)   ==1,\n     ogg_page_continued(page) !=0\n\n   If a page happens to be a single packet that was begun on a\n   previous page, and spans to the next page (in the case of a three or\n   more page packet), the return will be:\n     ogg_page_packets(page)   ==0,\n     ogg_page_continued(page) !=0\n*/\n\nint ogg_page_packets(const ogg_page *og){\n  int i,n=og->header[26],count=0;\n  for(i=0;i<n;i++)\n    if(og->header[27+i]<255)count++;\n  return(count);\n}\n\n\n#if 0\n/* helper to initialize lookup for direct-table CRC (illustrative; we\n   use the static init below) */\n\nstatic ogg_uint32_t _ogg_crc_entry(unsigned long index){\n  int           i;\n  unsigned long r;\n\n  r = index << 24;\n  for (i=0; i<8; i++)\n    if (r & 0x80000000UL)\n      r = (r << 1) ^ 0x04c11db7; /* The same as the ethernet generator\n                                    polynomial, although we use an\n                                    unreflected alg and an init/final\n                                    of 0, not 0xffffffff */\n    else\n       r<<=1;\n return (r & 0xffffffffUL);\n}\n#endif\n\nstatic const ogg_uint32_t crc_lookup[256]={\n  0x00000000,0x04c11db7,0x09823b6e,0x0d4326d9,\n  0x130476dc,0x17c56b6b,0x1a864db2,0x1e475005,\n  0x2608edb8,0x22c9f00f,0x2f8ad6d6,0x2b4bcb61,\n  0x350c9b64,0x31cd86d3,0x3c8ea00a,0x384fbdbd,\n  0x4c11db70,0x48d0c6c7,0x4593e01e,0x4152fda9,\n  0x5f15adac,0x5bd4b01b,0x569796c2,0x52568b75,\n  0x6a1936c8,0x6ed82b7f,0x639b0da6,0x675a1011,\n  0x791d4014,0x7ddc5da3,0x709f7b7a,0x745e66cd,\n  0x9823b6e0,0x9ce2ab57,0x91a18d8e,0x95609039,\n  0x8b27c03c,0x8fe6dd8b,0x82a5fb52,0x8664e6e5,\n  0xbe2b5b58,0xbaea46ef,0xb7a96036,0xb3687d81,\n  0xad2f2d84,0xa9ee3033,0xa4ad16ea,0xa06c0b5d,\n  0xd4326d90,0xd0f37027,0xddb056fe,0xd9714b49,\n  0xc7361b4c,0xc3f706fb,0xceb42022,0xca753d95,\n  0xf23a8028,0xf6fb9d9f,0xfbb8bb46,0xff79a6f1,\n  0xe13ef6f4,0xe5ffeb43,0xe8bccd9a,0xec7dd02d,\n  0x34867077,0x30476dc0,0x3d044b19,0x39c556ae,\n  0x278206ab,0x23431b1c,0x2e003dc5,0x2ac12072,\n  0x128e9dcf,0x164f8078,0x1b0ca6a1,0x1fcdbb16,\n  0x018aeb13,0x054bf6a4,0x0808d07d,0x0cc9cdca,\n  0x7897ab07,0x7c56b6b0,0x71159069,0x75d48dde,\n  0x6b93dddb,0x6f52c06c,0x6211e6b5,0x66d0fb02,\n  0x5e9f46bf,0x5a5e5b08,0x571d7dd1,0x53dc6066,\n  0x4d9b3063,0x495a2dd4,0x44190b0d,0x40d816ba,\n  0xaca5c697,0xa864db20,0xa527fdf9,0xa1e6e04e,\n  0xbfa1b04b,0xbb60adfc,0xb6238b25,0xb2e29692,\n  0x8aad2b2f,0x8e6c3698,0x832f1041,0x87ee0df6,\n  0x99a95df3,0x9d684044,0x902b669d,0x94ea7b2a,\n  0xe0b41de7,0xe4750050,0xe9362689,0xedf73b3e,\n  0xf3b06b3b,0xf771768c,0xfa325055,0xfef34de2,\n  0xc6bcf05f,0xc27dede8,0xcf3ecb31,0xcbffd686,\n  0xd5b88683,0xd1799b34,0xdc3abded,0xd8fba05a,\n  0x690ce0ee,0x6dcdfd59,0x608edb80,0x644fc637,\n  0x7a089632,0x7ec98b85,0x738aad5c,0x774bb0eb,\n  0x4f040d56,0x4bc510e1,0x46863638,0x42472b8f,\n  0x5c007b8a,0x58c1663d,0x558240e4,0x51435d53,\n  0x251d3b9e,0x21dc2629,0x2c9f00f0,0x285e1d47,\n  0x36194d42,0x32d850f5,0x3f9b762c,0x3b5a6b9b,\n  0x0315d626,0x07d4cb91,0x0a97ed48,0x0e56f0ff,\n  0x1011a0fa,0x14d0bd4d,0x19939b94,0x1d528623,\n  0xf12f560e,0xf5ee4bb9,0xf8ad6d60,0xfc6c70d7,\n  0xe22b20d2,0xe6ea3d65,0xeba91bbc,0xef68060b,\n  0xd727bbb6,0xd3e6a601,0xdea580d8,0xda649d6f,\n  0xc423cd6a,0xc0e2d0dd,0xcda1f604,0xc960ebb3,\n  0xbd3e8d7e,0xb9ff90c9,0xb4bcb610,0xb07daba7,\n  0xae3afba2,0xaafbe615,0xa7b8c0cc,0xa379dd7b,\n  0x9b3660c6,0x9ff77d71,0x92b45ba8,0x9675461f,\n  0x8832161a,0x8cf30bad,0x81b02d74,0x857130c3,\n  0x5d8a9099,0x594b8d2e,0x5408abf7,0x50c9b640,\n  0x4e8ee645,0x4a4ffbf2,0x470cdd2b,0x43cdc09c,\n  0x7b827d21,0x7f436096,0x7200464f,0x76c15bf8,\n  0x68860bfd,0x6c47164a,0x61043093,0x65c52d24,\n  0x119b4be9,0x155a565e,0x18197087,0x1cd86d30,\n  0x029f3d35,0x065e2082,0x0b1d065b,0x0fdc1bec,\n  0x3793a651,0x3352bbe6,0x3e119d3f,0x3ad08088,\n  0x2497d08d,0x2056cd3a,0x2d15ebe3,0x29d4f654,\n  0xc5a92679,0xc1683bce,0xcc2b1d17,0xc8ea00a0,\n  0xd6ad50a5,0xd26c4d12,0xdf2f6bcb,0xdbee767c,\n  0xe3a1cbc1,0xe760d676,0xea23f0af,0xeee2ed18,\n  0xf0a5bd1d,0xf464a0aa,0xf9278673,0xfde69bc4,\n  0x89b8fd09,0x8d79e0be,0x803ac667,0x84fbdbd0,\n  0x9abc8bd5,0x9e7d9662,0x933eb0bb,0x97ffad0c,\n  0xafb010b1,0xab710d06,0xa6322bdf,0xa2f33668,\n  0xbcb4666d,0xb8757bda,0xb5365d03,0xb1f740b4};\n\n/* init the encode/decode logical stream state */\n\nint ogg_stream_init(ogg_stream_state *os,int serialno){\n  if(os){\n    memset(os,0,sizeof(*os));\n    os->body_storage=16*1024;\n    os->lacing_storage=1024;\n\n    os->body_data=_ogg_malloc(os->body_storage*sizeof(*os->body_data));\n    os->lacing_vals=_ogg_malloc(os->lacing_storage*sizeof(*os->lacing_vals));\n    os->granule_vals=_ogg_malloc(os->lacing_storage*sizeof(*os->granule_vals));\n\n    if(!os->body_data || !os->lacing_vals || !os->granule_vals){\n      ogg_stream_clear(os);\n      return -1;\n    }\n\n    os->serialno=serialno;\n\n    return(0);\n  }\n  return(-1);\n}\n\n/* async/delayed error detection for the ogg_stream_state */\nint ogg_stream_check(ogg_stream_state *os){\n  if(!os || !os->body_data) return -1;\n  return 0;\n}\n\n/* _clear does not free os, only the non-flat storage within */\nint ogg_stream_clear(ogg_stream_state *os){\n  if(os){\n    if(os->body_data)_ogg_free(os->body_data);\n    if(os->lacing_vals)_ogg_free(os->lacing_vals);\n    if(os->granule_vals)_ogg_free(os->granule_vals);\n\n    memset(os,0,sizeof(*os));\n  }\n  return(0);\n}\n\nint ogg_stream_destroy(ogg_stream_state *os){\n  if(os){\n    ogg_stream_clear(os);\n    _ogg_free(os);\n  }\n  return(0);\n}\n\n/* Helpers for ogg_stream_encode; this keeps the structure and\n   what's happening fairly clear */\n\nstatic int _os_body_expand(ogg_stream_state *os,long needed){\n  if(os->body_storage-needed<=os->body_fill){\n    long body_storage;\n    void *ret;\n    if(os->body_storage>LONG_MAX-needed){\n      ogg_stream_clear(os);\n      return -1;\n    }\n    body_storage=os->body_storage+needed;\n    if(body_storage<LONG_MAX-1024)body_storage+=1024;\n    ret=_ogg_realloc(os->body_data,body_storage*sizeof(*os->body_data));\n    if(!ret){\n      ogg_stream_clear(os);\n      return -1;\n    }\n    os->body_storage=body_storage;\n    os->body_data=ret;\n  }\n  return 0;\n}\n\nstatic int _os_lacing_expand(ogg_stream_state *os,long needed){\n  if(os->lacing_storage-needed<=os->lacing_fill){\n    long lacing_storage;\n    void *ret;\n    if(os->lacing_storage>LONG_MAX-needed){\n      ogg_stream_clear(os);\n      return -1;\n    }\n    lacing_storage=os->lacing_storage+needed;\n    if(lacing_storage<LONG_MAX-32)lacing_storage+=32;\n    ret=_ogg_realloc(os->lacing_vals,lacing_storage*sizeof(*os->lacing_vals));\n    if(!ret){\n      ogg_stream_clear(os);\n      return -1;\n    }\n    os->lacing_vals=ret;\n    ret=_ogg_realloc(os->granule_vals,lacing_storage*\n                     sizeof(*os->granule_vals));\n    if(!ret){\n      ogg_stream_clear(os);\n      return -1;\n    }\n    os->granule_vals=ret;\n    os->lacing_storage=lacing_storage;\n  }\n  return 0;\n}\n\n/* checksum the page */\n/* Direct table CRC; note that this will be faster in the future if we\n   perform the checksum simultaneously with other copies */\n\nvoid ogg_page_checksum_set(ogg_page *og){\n  if(og){\n    ogg_uint32_t crc_reg=0;\n    int i;\n\n    /* safety; needed for API behavior, but not framing code */\n    og->header[22]=0;\n    og->header[23]=0;\n    og->header[24]=0;\n    og->header[25]=0;\n\n    for(i=0;i<og->header_len;i++)\n      crc_reg=(crc_reg<<8)^crc_lookup[((crc_reg >> 24)&0xff)^og->header[i]];\n    for(i=0;i<og->body_len;i++)\n      crc_reg=(crc_reg<<8)^crc_lookup[((crc_reg >> 24)&0xff)^og->body[i]];\n\n    og->header[22]=(unsigned char)(crc_reg&0xff);\n    og->header[23]=(unsigned char)((crc_reg>>8)&0xff);\n    og->header[24]=(unsigned char)((crc_reg>>16)&0xff);\n    og->header[25]=(unsigned char)((crc_reg>>24)&0xff);\n  }\n}\n\n/* submit data to the internal buffer of the framing engine */\nint ogg_stream_iovecin(ogg_stream_state *os, ogg_iovec_t *iov, int count,\n                       long e_o_s, ogg_int64_t granulepos){\n\n  long bytes = 0, lacing_vals;\n  int i;\n\n  if(ogg_stream_check(os)) return -1;\n  if(!iov) return 0;\n\n  for (i = 0; i < count; ++i){\n    if(iov[i].iov_len>LONG_MAX) return -1;\n    if(bytes>LONG_MAX-(long)iov[i].iov_len) return -1;\n    bytes += (long)iov[i].iov_len;\n  }\n  lacing_vals=bytes/255+1;\n\n  if(os->body_returned){\n    /* advance packet data according to the body_returned pointer. We\n       had to keep it around to return a pointer into the buffer last\n       call */\n\n    os->body_fill-=os->body_returned;\n    if(os->body_fill)\n      memmove(os->body_data,os->body_data+os->body_returned,\n              os->body_fill);\n    os->body_returned=0;\n  }\n\n  /* make sure we have the buffer storage */\n  if(_os_body_expand(os,bytes) || _os_lacing_expand(os,lacing_vals))\n    return -1;\n\n  /* Copy in the submitted packet.  Yes, the copy is a waste; this is\n     the liability of overly clean abstraction for the time being.  It\n     will actually be fairly easy to eliminate the extra copy in the\n     future */\n\n  for (i = 0; i < count; ++i) {\n    memcpy(os->body_data+os->body_fill, iov[i].iov_base, iov[i].iov_len);\n    os->body_fill += (int)iov[i].iov_len;\n  }\n\n  /* Store lacing vals for this packet */\n  for(i=0;i<lacing_vals-1;i++){\n    os->lacing_vals[os->lacing_fill+i]=255;\n    os->granule_vals[os->lacing_fill+i]=os->granulepos;\n  }\n  os->lacing_vals[os->lacing_fill+i]=bytes%255;\n  os->granulepos=os->granule_vals[os->lacing_fill+i]=granulepos;\n\n  /* flag the first segment as the beginning of the packet */\n  os->lacing_vals[os->lacing_fill]|= 0x100;\n\n  os->lacing_fill+=lacing_vals;\n\n  /* for the sake of completeness */\n  os->packetno++;\n\n  if(e_o_s)os->e_o_s=1;\n\n  return(0);\n}\n\nint ogg_stream_packetin(ogg_stream_state *os,ogg_packet *op){\n  ogg_iovec_t iov;\n  iov.iov_base = op->packet;\n  iov.iov_len = op->bytes;\n  return ogg_stream_iovecin(os, &iov, 1, op->e_o_s, op->granulepos);\n}\n\n/* Conditionally flush a page; force==0 will only flush nominal-size\n   pages, force==1 forces us to flush a page regardless of page size\n   so long as there's any data available at all. */\nstatic int ogg_stream_flush_i(ogg_stream_state *os,ogg_page *og, int force, int nfill){\n  int i;\n  int vals=0;\n  int maxvals=(os->lacing_fill>255?255:os->lacing_fill);\n  int bytes=0;\n  long acc=0;\n  ogg_int64_t granule_pos=-1;\n\n  if(ogg_stream_check(os)) return(0);\n  if(maxvals==0) return(0);\n\n  /* construct a page */\n  /* decide how many segments to include */\n\n  /* If this is the initial header case, the first page must only include\n     the initial header packet */\n  if(os->b_o_s==0){  /* 'initial header page' case */\n    granule_pos=0;\n    for(vals=0;vals<maxvals;vals++){\n      if((os->lacing_vals[vals]&0x0ff)<255){\n        vals++;\n        break;\n      }\n    }\n  }else{\n\n    /* The extra packets_done, packet_just_done logic here attempts to do two things:\n       1) Don't unneccessarily span pages.\n       2) Unless necessary, don't flush pages if there are less than four packets on\n          them; this expands page size to reduce unneccessary overhead if incoming packets\n          are large.\n       These are not necessary behaviors, just 'always better than naive flushing'\n       without requiring an application to explicitly request a specific optimized\n       behavior. We'll want an explicit behavior setup pathway eventually as well. */\n\n    int packets_done=0;\n    int packet_just_done=0;\n    for(vals=0;vals<maxvals;vals++){\n      if(acc>nfill && packet_just_done>=4){\n        force=1;\n        break;\n      }\n      acc+=os->lacing_vals[vals]&0x0ff;\n      if((os->lacing_vals[vals]&0xff)<255){\n        granule_pos=os->granule_vals[vals];\n        packet_just_done=++packets_done;\n      }else\n        packet_just_done=0;\n    }\n    if(vals==255)force=1;\n  }\n\n  if(!force) return(0);\n\n  /* construct the header in temp storage */\n  memcpy(os->header,\"OggS\",4);\n\n  /* stream structure version */\n  os->header[4]=0x00;\n\n  /* continued packet flag? */\n  os->header[5]=0x00;\n  if((os->lacing_vals[0]&0x100)==0)os->header[5]|=0x01;\n  /* first page flag? */\n  if(os->b_o_s==0)os->header[5]|=0x02;\n  /* last page flag? */\n  if(os->e_o_s && os->lacing_fill==vals)os->header[5]|=0x04;\n  os->b_o_s=1;\n\n  /* 64 bits of PCM position */\n  for(i=6;i<14;i++){\n    os->header[i]=(unsigned char)(granule_pos&0xff);\n    granule_pos>>=8;\n  }\n\n  /* 32 bits of stream serial number */\n  {\n    long serialno=os->serialno;\n    for(i=14;i<18;i++){\n      os->header[i]=(unsigned char)(serialno&0xff);\n      serialno>>=8;\n    }\n  }\n\n  /* 32 bits of page counter (we have both counter and page header\n     because this val can roll over) */\n  if(os->pageno==-1)os->pageno=0; /* because someone called\n                                     stream_reset; this would be a\n                                     strange thing to do in an\n                                     encode stream, but it has\n                                     plausible uses */\n  {\n    long pageno=os->pageno++;\n    for(i=18;i<22;i++){\n      os->header[i]=(unsigned char)(pageno&0xff);\n      pageno>>=8;\n    }\n  }\n\n  /* zero for computation; filled in later */\n  os->header[22]=0;\n  os->header[23]=0;\n  os->header[24]=0;\n  os->header[25]=0;\n\n  /* segment table */\n  os->header[26]=(unsigned char)(vals&0xff);\n  for(i=0;i<vals;i++)\n    bytes+=os->header[i+27]=(unsigned char)(os->lacing_vals[i]&0xff);\n\n  /* set pointers in the ogg_page struct */\n  og->header=os->header;\n  og->header_len=os->header_fill=vals+27;\n  og->body=os->body_data+os->body_returned;\n  og->body_len=bytes;\n\n  /* advance the lacing data and set the body_returned pointer */\n\n  os->lacing_fill-=vals;\n  memmove(os->lacing_vals,os->lacing_vals+vals,os->lacing_fill*sizeof(*os->lacing_vals));\n  memmove(os->granule_vals,os->granule_vals+vals,os->lacing_fill*sizeof(*os->granule_vals));\n  os->body_returned+=bytes;\n\n  /* calculate the checksum */\n\n  ogg_page_checksum_set(og);\n\n  /* done */\n  return(1);\n}\n\n/* This will flush remaining packets into a page (returning nonzero),\n   even if there is not enough data to trigger a flush normally\n   (undersized page). If there are no packets or partial packets to\n   flush, ogg_stream_flush returns 0.  Note that ogg_stream_flush will\n   try to flush a normal sized page like ogg_stream_pageout; a call to\n   ogg_stream_flush does not guarantee that all packets have flushed.\n   Only a return value of 0 from ogg_stream_flush indicates all packet\n   data is flushed into pages.\n\n   since ogg_stream_flush will flush the last page in a stream even if\n   it's undersized, you almost certainly want to use ogg_stream_pageout\n   (and *not* ogg_stream_flush) unless you specifically need to flush\n   a page regardless of size in the middle of a stream. */\n\nint ogg_stream_flush(ogg_stream_state *os,ogg_page *og){\n  return ogg_stream_flush_i(os,og,1,4096);\n}\n\n/* Like the above, but an argument is provided to adjust the nominal\n   page size for applications which are smart enough to provide their\n   own delay based flushing */\n\nint ogg_stream_flush_fill(ogg_stream_state *os,ogg_page *og, int nfill){\n  return ogg_stream_flush_i(os,og,1,nfill);\n}\n\n/* This constructs pages from buffered packet segments.  The pointers\nreturned are to static buffers; do not free. The returned buffers are\ngood only until the next call (using the same ogg_stream_state) */\n\nint ogg_stream_pageout(ogg_stream_state *os, ogg_page *og){\n  int force=0;\n  if(ogg_stream_check(os)) return 0;\n\n  if((os->e_o_s&&os->lacing_fill) ||          /* 'were done, now flush' case */\n     (os->lacing_fill&&!os->b_o_s))           /* 'initial header page' case */\n    force=1;\n\n  return(ogg_stream_flush_i(os,og,force,4096));\n}\n\n/* Like the above, but an argument is provided to adjust the nominal\npage size for applications which are smart enough to provide their\nown delay based flushing */\n\nint ogg_stream_pageout_fill(ogg_stream_state *os, ogg_page *og, int nfill){\n  int force=0;\n  if(ogg_stream_check(os)) return 0;\n\n  if((os->e_o_s&&os->lacing_fill) ||          /* 'were done, now flush' case */\n     (os->lacing_fill&&!os->b_o_s))           /* 'initial header page' case */\n    force=1;\n\n  return(ogg_stream_flush_i(os,og,force,nfill));\n}\n\nint ogg_stream_eos(ogg_stream_state *os){\n  if(ogg_stream_check(os)) return 1;\n  return os->e_o_s;\n}\n\n/* DECODING PRIMITIVES: packet streaming layer **********************/\n\n/* This has two layers to place more of the multi-serialno and paging\n   control in the application's hands.  First, we expose a data buffer\n   using ogg_sync_buffer().  The app either copies into the\n   buffer, or passes it directly to read(), etc.  We then call\n   ogg_sync_wrote() to tell how many bytes we just added.\n\n   Pages are returned (pointers into the buffer in ogg_sync_state)\n   by ogg_sync_pageout().  The page is then submitted to\n   ogg_stream_pagein() along with the appropriate\n   ogg_stream_state* (ie, matching serialno).  We then get raw\n   packets out calling ogg_stream_packetout() with a\n   ogg_stream_state. */\n\n/* initialize the struct to a known state */\nint ogg_sync_init(ogg_sync_state *oy){\n  if(oy){\n    oy->storage = -1; /* used as a readiness flag */\n    memset(oy,0,sizeof(*oy));\n  }\n  return(0);\n}\n\n/* clear non-flat storage within */\nint ogg_sync_clear(ogg_sync_state *oy){\n  if(oy){\n    if(oy->data)_ogg_free(oy->data);\n    memset(oy,0,sizeof(*oy));\n  }\n  return(0);\n}\n\nint ogg_sync_destroy(ogg_sync_state *oy){\n  if(oy){\n    ogg_sync_clear(oy);\n    _ogg_free(oy);\n  }\n  return(0);\n}\n\nint ogg_sync_check(ogg_sync_state *oy){\n  if(oy->storage<0) return -1;\n  return 0;\n}\n\nchar *ogg_sync_buffer(ogg_sync_state *oy, long size){\n  if(ogg_sync_check(oy)) return NULL;\n\n  /* first, clear out any space that has been previously returned */\n  if(oy->returned){\n    oy->fill-=oy->returned;\n    if(oy->fill>0)\n      memmove(oy->data,oy->data+oy->returned,oy->fill);\n    oy->returned=0;\n  }\n\n  if(size>oy->storage-oy->fill){\n    /* We need to extend the internal buffer */\n    long newsize=size+oy->fill+4096; /* an extra page to be nice */\n    void *ret;\n\n    if(oy->data)\n      ret=_ogg_realloc(oy->data,newsize);\n    else\n      ret=_ogg_malloc(newsize);\n    if(!ret){\n      ogg_sync_clear(oy);\n      return NULL;\n    }\n    oy->data=ret;\n    oy->storage=newsize;\n  }\n\n  /* expose a segment at least as large as requested at the fill mark */\n  return((char *)oy->data+oy->fill);\n}\n\nint ogg_sync_wrote(ogg_sync_state *oy, long bytes){\n  if(ogg_sync_check(oy))return -1;\n  if(oy->fill+bytes>oy->storage)return -1;\n  oy->fill+=bytes;\n  return(0);\n}\n\n/* sync the stream.  This is meant to be useful for finding page\n   boundaries.\n\n   return values for this:\n  -n) skipped n bytes\n   0) page not ready; more data (no bytes skipped)\n   n) page synced at current location; page length n bytes\n\n*/\n\nlong ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og){\n  unsigned char *page=oy->data+oy->returned;\n  unsigned char *next;\n  long bytes=oy->fill-oy->returned;\n\n  if(ogg_sync_check(oy))return 0;\n\n  if(oy->headerbytes==0){\n    int headerbytes,i;\n    if(bytes<27)return(0); /* not enough for a header */\n\n    /* verify capture pattern */\n    if(memcmp(page,\"OggS\",4))goto sync_fail;\n\n    headerbytes=page[26]+27;\n    if(bytes<headerbytes)return(0); /* not enough for header + seg table */\n\n    /* count up body length in the segment table */\n\n    for(i=0;i<page[26];i++)\n      oy->bodybytes+=page[27+i];\n    oy->headerbytes=headerbytes;\n  }\n\n  if(oy->bodybytes+oy->headerbytes>bytes)return(0);\n\n  /* The whole test page is buffered.  Verify the checksum */\n  {\n    /* Grab the checksum bytes, set the header field to zero */\n    char chksum[4];\n    ogg_page log;\n\n    memcpy(chksum,page+22,4);\n    memset(page+22,0,4);\n\n    /* set up a temp page struct and recompute the checksum */\n    log.header=page;\n    log.header_len=oy->headerbytes;\n    log.body=page+oy->headerbytes;\n    log.body_len=oy->bodybytes;\n    ogg_page_checksum_set(&log);\n\n    /* Compare */\n    if(memcmp(chksum,page+22,4)){\n      /* D'oh.  Mismatch! Corrupt page (or miscapture and not a page\n         at all) */\n      /* replace the computed checksum with the one actually read in */\n      memcpy(page+22,chksum,4);\n\n      /* Bad checksum. Lose sync */\n      goto sync_fail;\n    }\n  }\n\n  /* yes, have a whole page all ready to go */\n  {\n    unsigned char *page=oy->data+oy->returned;\n    long bytes;\n\n    if(og){\n      og->header=page;\n      og->header_len=oy->headerbytes;\n      og->body=page+oy->headerbytes;\n      og->body_len=oy->bodybytes;\n    }\n\n    oy->unsynced=0;\n    oy->returned+=(bytes=oy->headerbytes+oy->bodybytes);\n    oy->headerbytes=0;\n    oy->bodybytes=0;\n    return(bytes);\n  }\n\n sync_fail:\n\n  oy->headerbytes=0;\n  oy->bodybytes=0;\n\n  /* search for possible capture */\n  next=memchr(page+1,'O',bytes-1);\n  if(!next)\n    next=oy->data+oy->fill;\n\n  oy->returned=(int)(next-oy->data);\n  return((long)-(next-page));\n}\n\n/* sync the stream and get a page.  Keep trying until we find a page.\n   Suppress 'sync errors' after reporting the first.\n\n   return values:\n   -1) recapture (hole in data)\n    0) need more data\n    1) page returned\n\n   Returns pointers into buffered data; invalidated by next call to\n   _stream, _clear, _init, or _buffer */\n\nint ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og){\n\n  if(ogg_sync_check(oy))return 0;\n\n  /* all we need to do is verify a page at the head of the stream\n     buffer.  If it doesn't verify, we look for the next potential\n     frame */\n\n  for(;;){\n    long ret=ogg_sync_pageseek(oy,og);\n    if(ret>0){\n      /* have a page */\n      return(1);\n    }\n    if(ret==0){\n      /* need more data */\n      return(0);\n    }\n\n    /* head did not start a synced page... skipped some bytes */\n    if(!oy->unsynced){\n      oy->unsynced=1;\n      return(-1);\n    }\n\n    /* loop. keep looking */\n\n  }\n}\n\n/* add the incoming page to the stream state; we decompose the page\n   into packet segments here as well. */\n\nint ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){\n  unsigned char *header=og->header;\n  unsigned char *body=og->body;\n  long           bodysize=og->body_len;\n  int            segptr=0;\n\n  int version=ogg_page_version(og);\n  int continued=ogg_page_continued(og);\n  int bos=ogg_page_bos(og);\n  int eos=ogg_page_eos(og);\n  ogg_int64_t granulepos=ogg_page_granulepos(og);\n  int serialno=ogg_page_serialno(og);\n  long pageno=ogg_page_pageno(og);\n  int segments=header[26];\n\n  if(ogg_stream_check(os)) return -1;\n\n  /* clean up 'returned data' */\n  {\n    long lr=os->lacing_returned;\n    long br=os->body_returned;\n\n    /* body data */\n    if(br){\n      os->body_fill-=br;\n      if(os->body_fill)\n        memmove(os->body_data,os->body_data+br,os->body_fill);\n      os->body_returned=0;\n    }\n\n    if(lr){\n      /* segment table */\n      if(os->lacing_fill-lr){\n        memmove(os->lacing_vals,os->lacing_vals+lr,\n                (os->lacing_fill-lr)*sizeof(*os->lacing_vals));\n        memmove(os->granule_vals,os->granule_vals+lr,\n                (os->lacing_fill-lr)*sizeof(*os->granule_vals));\n      }\n      os->lacing_fill-=lr;\n      os->lacing_packet-=lr;\n      os->lacing_returned=0;\n    }\n  }\n\n  /* check the serial number */\n  if(serialno!=os->serialno)return(-1);\n  if(version>0)return(-1);\n\n  if(_os_lacing_expand(os,segments+1)) return -1;\n\n  /* are we in sequence? */\n  if(pageno!=os->pageno){\n    int i;\n\n    /* unroll previous partial packet (if any) */\n    for(i=os->lacing_packet;i<os->lacing_fill;i++)\n      os->body_fill-=os->lacing_vals[i]&0xff;\n    os->lacing_fill=os->lacing_packet;\n\n    /* make a note of dropped data in segment table */\n    if(os->pageno!=-1){\n      os->lacing_vals[os->lacing_fill++]=0x400;\n      os->lacing_packet++;\n    }\n  }\n\n  /* are we a 'continued packet' page?  If so, we may need to skip\n     some segments */\n  if(continued){\n    if(os->lacing_fill<1 ||\n       os->lacing_vals[os->lacing_fill-1]==0x400){\n      bos=0;\n      for(;segptr<segments;segptr++){\n        int val=header[27+segptr];\n        body+=val;\n        bodysize-=val;\n        if(val<255){\n          segptr++;\n          break;\n        }\n      }\n    }\n  }\n\n  if(bodysize){\n    if(_os_body_expand(os,bodysize)) return -1;\n    memcpy(os->body_data+os->body_fill,body,bodysize);\n    os->body_fill+=bodysize;\n  }\n\n  {\n    int saved=-1;\n    while(segptr<segments){\n      int val=header[27+segptr];\n      os->lacing_vals[os->lacing_fill]=val;\n      os->granule_vals[os->lacing_fill]=-1;\n\n      if(bos){\n        os->lacing_vals[os->lacing_fill]|=0x100;\n        bos=0;\n      }\n\n      if(val<255)saved=os->lacing_fill;\n\n      os->lacing_fill++;\n      segptr++;\n\n      if(val<255)os->lacing_packet=os->lacing_fill;\n    }\n\n    /* set the granulepos on the last granuleval of the last full packet */\n    if(saved!=-1){\n      os->granule_vals[saved]=granulepos;\n    }\n\n  }\n\n  if(eos){\n    os->e_o_s=1;\n    if(os->lacing_fill>0)\n      os->lacing_vals[os->lacing_fill-1]|=0x200;\n  }\n\n  os->pageno=pageno+1;\n\n  return(0);\n}\n\n/* clear things to an initial state.  Good to call, eg, before seeking */\nint ogg_sync_reset(ogg_sync_state *oy){\n  if(ogg_sync_check(oy))return -1;\n\n  oy->fill=0;\n  oy->returned=0;\n  oy->unsynced=0;\n  oy->headerbytes=0;\n  oy->bodybytes=0;\n  return(0);\n}\n\nint ogg_stream_reset(ogg_stream_state *os){\n  if(ogg_stream_check(os)) return -1;\n\n  os->body_fill=0;\n  os->body_returned=0;\n\n  os->lacing_fill=0;\n  os->lacing_packet=0;\n  os->lacing_returned=0;\n\n  os->header_fill=0;\n\n  os->e_o_s=0;\n  os->b_o_s=0;\n  os->pageno=-1;\n  os->packetno=0;\n  os->granulepos=0;\n\n  return(0);\n}\n\nint ogg_stream_reset_serialno(ogg_stream_state *os,int serialno){\n  if(ogg_stream_check(os)) return -1;\n  ogg_stream_reset(os);\n  os->serialno=serialno;\n  return(0);\n}\n\nstatic int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){\n\n  /* The last part of decode. We have the stream broken into packet\n     segments.  Now we need to group them into packets (or return the\n     out of sync markers) */\n\n  int ptr=os->lacing_returned;\n\n  if(os->lacing_packet<=ptr)return(0);\n\n  if(os->lacing_vals[ptr]&0x400){\n    /* we need to tell the codec there's a gap; it might need to\n       handle previous packet dependencies. */\n    os->lacing_returned++;\n    os->packetno++;\n    return(-1);\n  }\n\n  if(!op && !adv)return(1); /* just using peek as an inexpensive way\n                               to ask if there's a whole packet\n                               waiting */\n\n  /* Gather the whole packet. We'll have no holes or a partial packet */\n  {\n    int size=os->lacing_vals[ptr]&0xff;\n    long bytes=size;\n    int eos=os->lacing_vals[ptr]&0x200; /* last packet of the stream? */\n    int bos=os->lacing_vals[ptr]&0x100; /* first packet of the stream? */\n\n    while(size==255){\n      int val=os->lacing_vals[++ptr];\n      size=val&0xff;\n      if(val&0x200)eos=0x200;\n      bytes+=size;\n    }\n\n    if(op){\n      op->e_o_s=eos;\n      op->b_o_s=bos;\n      op->packet=os->body_data+os->body_returned;\n      op->packetno=os->packetno;\n      op->granulepos=os->granule_vals[ptr];\n      op->bytes=bytes;\n    }\n\n    if(adv){\n      os->body_returned+=bytes;\n      os->lacing_returned=ptr+1;\n      os->packetno++;\n    }\n  }\n  return(1);\n}\n\nint ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op){\n  if(ogg_stream_check(os)) return 0;\n  return _packetout(os,op,1);\n}\n\nint ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op){\n  if(ogg_stream_check(os)) return 0;\n  return _packetout(os,op,0);\n}\n\nvoid ogg_packet_clear(ogg_packet *op) {\n  _ogg_free(op->packet);\n  memset(op, 0, sizeof(*op));\n}\n\n#ifdef _V_SELFTEST\n#include <stdio.h>\n\nogg_stream_state os_en, os_de;\nogg_sync_state oy;\n\nvoid checkpacket(ogg_packet *op,long len, int no, long pos){\n  long j;\n  static int sequence=0;\n  static int lastno=0;\n\n  if(op->bytes!=len){\n    fprintf(stderr,\"incorrect packet length (%ld != %ld)!\\n\",op->bytes,len);\n    exit(1);\n  }\n  if(op->granulepos!=pos){\n    fprintf(stderr,\"incorrect packet granpos (%ld != %ld)!\\n\",(long)op->granulepos,pos);\n    exit(1);\n  }\n\n  /* packet number just follows sequence/gap; adjust the input number\n     for that */\n  if(no==0){\n    sequence=0;\n  }else{\n    sequence++;\n    if(no>lastno+1)\n      sequence++;\n  }\n  lastno=no;\n  if(op->packetno!=sequence){\n    fprintf(stderr,\"incorrect packet sequence %ld != %d\\n\",\n            (long)(op->packetno),sequence);\n    exit(1);\n  }\n\n  /* Test data */\n  for(j=0;j<op->bytes;j++)\n    if(op->packet[j]!=((j+no)&0xff)){\n      fprintf(stderr,\"body data mismatch (1) at pos %ld: %x!=%lx!\\n\\n\",\n              j,op->packet[j],(j+no)&0xff);\n      exit(1);\n    }\n}\n\nvoid check_page(unsigned char *data,const int *header,ogg_page *og){\n  long j;\n  /* Test data */\n  for(j=0;j<og->body_len;j++)\n    if(og->body[j]!=data[j]){\n      fprintf(stderr,\"body data mismatch (2) at pos %ld: %x!=%x!\\n\\n\",\n              j,data[j],og->body[j]);\n      exit(1);\n    }\n\n  /* Test header */\n  for(j=0;j<og->header_len;j++){\n    if(og->header[j]!=header[j]){\n      fprintf(stderr,\"header content mismatch at pos %ld:\\n\",j);\n      for(j=0;j<header[26]+27;j++)\n        fprintf(stderr,\" (%ld)%02x:%02x\",j,header[j],og->header[j]);\n      fprintf(stderr,\"\\n\");\n      exit(1);\n    }\n  }\n  if(og->header_len!=header[26]+27){\n    fprintf(stderr,\"header length incorrect! (%ld!=%d)\\n\",\n            og->header_len,header[26]+27);\n    exit(1);\n  }\n}\n\nvoid print_header(ogg_page *og){\n  int j;\n  fprintf(stderr,\"\\nHEADER:\\n\");\n  fprintf(stderr,\"  capture: %c %c %c %c  version: %d  flags: %x\\n\",\n          og->header[0],og->header[1],og->header[2],og->header[3],\n          (int)og->header[4],(int)og->header[5]);\n\n  fprintf(stderr,\"  granulepos: %d  serialno: %d  pageno: %ld\\n\",\n          (og->header[9]<<24)|(og->header[8]<<16)|\n          (og->header[7]<<8)|og->header[6],\n          (og->header[17]<<24)|(og->header[16]<<16)|\n          (og->header[15]<<8)|og->header[14],\n          ((long)(og->header[21])<<24)|(og->header[20]<<16)|\n          (og->header[19]<<8)|og->header[18]);\n\n  fprintf(stderr,\"  checksum: %02x:%02x:%02x:%02x\\n  segments: %d (\",\n          (int)og->header[22],(int)og->header[23],\n          (int)og->header[24],(int)og->header[25],\n          (int)og->header[26]);\n\n  for(j=27;j<og->header_len;j++)\n    fprintf(stderr,\"%d \",(int)og->header[j]);\n  fprintf(stderr,\")\\n\\n\");\n}\n\nvoid copy_page(ogg_page *og){\n  unsigned char *temp=_ogg_malloc(og->header_len);\n  memcpy(temp,og->header,og->header_len);\n  og->header=temp;\n\n  temp=_ogg_malloc(og->body_len);\n  memcpy(temp,og->body,og->body_len);\n  og->body=temp;\n}\n\nvoid free_page(ogg_page *og){\n  _ogg_free (og->header);\n  _ogg_free (og->body);\n}\n\nvoid error(void){\n  fprintf(stderr,\"error!\\n\");\n  exit(1);\n}\n\n/* 17 only */\nconst int head1_0[] = {0x4f,0x67,0x67,0x53,0,0x06,\n                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,0,0,0,0,\n                       0x15,0xed,0xec,0x91,\n                       1,\n                       17};\n\n/* 17, 254, 255, 256, 500, 510, 600 byte, pad */\nconst int head1_1[] = {0x4f,0x67,0x67,0x53,0,0x02,\n                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,0,0,0,0,\n                       0x59,0x10,0x6c,0x2c,\n                       1,\n                       17};\nconst int head2_1[] = {0x4f,0x67,0x67,0x53,0,0x04,\n                       0x07,0x18,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,1,0,0,0,\n                       0x89,0x33,0x85,0xce,\n                       13,\n                       254,255,0,255,1,255,245,255,255,0,\n                       255,255,90};\n\n/* nil packets; beginning,middle,end */\nconst int head1_2[] = {0x4f,0x67,0x67,0x53,0,0x02,\n                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,0,0,0,0,\n                       0xff,0x7b,0x23,0x17,\n                       1,\n                       0};\nconst int head2_2[] = {0x4f,0x67,0x67,0x53,0,0x04,\n                       0x07,0x28,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,1,0,0,0,\n                       0x5c,0x3f,0x66,0xcb,\n                       17,\n                       17,254,255,0,0,255,1,0,255,245,255,255,0,\n                       255,255,90,0};\n\n/* large initial packet */\nconst int head1_3[] = {0x4f,0x67,0x67,0x53,0,0x02,\n                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,0,0,0,0,\n                       0x01,0x27,0x31,0xaa,\n                       18,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,255,10};\n\nconst int head2_3[] = {0x4f,0x67,0x67,0x53,0,0x04,\n                       0x07,0x08,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,1,0,0,0,\n                       0x7f,0x4e,0x8a,0xd2,\n                       4,\n                       255,4,255,0};\n\n\n/* continuing packet test */\nconst int head1_4[] = {0x4f,0x67,0x67,0x53,0,0x02,\n                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,0,0,0,0,\n                       0xff,0x7b,0x23,0x17,\n                       1,\n                       0};\n\nconst int head2_4[] = {0x4f,0x67,0x67,0x53,0,0x00,\n                       0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,\n                       0x01,0x02,0x03,0x04,1,0,0,0,\n                       0xf8,0x3c,0x19,0x79,\n                       255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255};\n\nconst int head3_4[] = {0x4f,0x67,0x67,0x53,0,0x05,\n                       0x07,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,2,0,0,0,\n                       0x38,0xe6,0xb6,0x28,\n                       6,\n                       255,220,255,4,255,0};\n\n\n/* spill expansion test */\nconst int head1_4b[] = {0x4f,0x67,0x67,0x53,0,0x02,\n                        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n                        0x01,0x02,0x03,0x04,0,0,0,0,\n                        0xff,0x7b,0x23,0x17,\n                        1,\n                        0};\n\nconst int head2_4b[] = {0x4f,0x67,0x67,0x53,0,0x00,\n                        0x07,0x10,0x00,0x00,0x00,0x00,0x00,0x00,\n                        0x01,0x02,0x03,0x04,1,0,0,0,\n                        0xce,0x8f,0x17,0x1a,\n                        23,\n                        255,255,255,255,255,255,255,255,\n                        255,255,255,255,255,255,255,255,255,10,255,4,255,0,0};\n\n\nconst int head3_4b[] = {0x4f,0x67,0x67,0x53,0,0x04,\n                        0x07,0x14,0x00,0x00,0x00,0x00,0x00,0x00,\n                        0x01,0x02,0x03,0x04,2,0,0,0,\n                        0x9b,0xb2,0x50,0xa1,\n                        1,\n                        0};\n\n/* page with the 255 segment limit */\nconst int head1_5[] = {0x4f,0x67,0x67,0x53,0,0x02,\n                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,0,0,0,0,\n                       0xff,0x7b,0x23,0x17,\n                       1,\n                       0};\n\nconst int head2_5[] = {0x4f,0x67,0x67,0x53,0,0x00,\n                       0x07,0xfc,0x03,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,1,0,0,0,\n                       0xed,0x2a,0x2e,0xa7,\n                       255,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10,10,\n                       10,10,10,10,10,10,10};\n\nconst int head3_5[] = {0x4f,0x67,0x67,0x53,0,0x04,\n                       0x07,0x00,0x04,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,2,0,0,0,\n                       0x6c,0x3b,0x82,0x3d,\n                       1,\n                       50};\n\n\n/* packet that overspans over an entire page */\nconst int head1_6[] = {0x4f,0x67,0x67,0x53,0,0x02,\n                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,0,0,0,0,\n                       0xff,0x7b,0x23,0x17,\n                       1,\n                       0};\n\nconst int head2_6[] = {0x4f,0x67,0x67,0x53,0,0x00,\n                       0x07,0x04,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,1,0,0,0,\n                       0x68,0x22,0x7c,0x3d,\n                       255,\n                       100,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255};\n\nconst int head3_6[] = {0x4f,0x67,0x67,0x53,0,0x01,\n                       0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,\n                       0x01,0x02,0x03,0x04,2,0,0,0,\n                       0xf4,0x87,0xba,0xf3,\n                       255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255};\n\nconst int head4_6[] = {0x4f,0x67,0x67,0x53,0,0x05,\n                       0x07,0x10,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,3,0,0,0,\n                       0xf7,0x2f,0x6c,0x60,\n                       5,\n                       254,255,4,255,0};\n\n/* packet that overspans over an entire page */\nconst int head1_7[] = {0x4f,0x67,0x67,0x53,0,0x02,\n                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,0,0,0,0,\n                       0xff,0x7b,0x23,0x17,\n                       1,\n                       0};\n\nconst int head2_7[] = {0x4f,0x67,0x67,0x53,0,0x00,\n                       0x07,0x04,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,1,0,0,0,\n                       0x68,0x22,0x7c,0x3d,\n                       255,\n                       100,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255,255,255,\n                       255,255,255,255,255,255};\n\nconst int head3_7[] = {0x4f,0x67,0x67,0x53,0,0x05,\n                       0x07,0x08,0x00,0x00,0x00,0x00,0x00,0x00,\n                       0x01,0x02,0x03,0x04,2,0,0,0,\n                       0xd4,0xe0,0x60,0xe5,\n                       1,\n                       0};\n\nvoid test_pack(const int *pl, const int **headers, int byteskip,\n               int pageskip, int packetskip){\n  unsigned char *data=_ogg_malloc(1024*1024); /* for scripted test cases only */\n  long inptr=0;\n  long outptr=0;\n  long deptr=0;\n  long depacket=0;\n  long granule_pos=7,pageno=0;\n  int i,j,packets,pageout=pageskip;\n  int eosflag=0;\n  int bosflag=0;\n\n  int byteskipcount=0;\n\n  ogg_stream_reset(&os_en);\n  ogg_stream_reset(&os_de);\n  ogg_sync_reset(&oy);\n\n  for(packets=0;packets<packetskip;packets++)\n    depacket+=pl[packets];\n\n  for(packets=0;;packets++)if(pl[packets]==-1)break;\n\n  for(i=0;i<packets;i++){\n    /* construct a test packet */\n    ogg_packet op;\n    int len=pl[i];\n\n    op.packet=data+inptr;\n    op.bytes=len;\n    op.e_o_s=(pl[i+1]<0?1:0);\n    op.granulepos=granule_pos;\n\n    granule_pos+=1024;\n\n    for(j=0;j<len;j++)data[inptr++]=i+j;\n\n    /* submit the test packet */\n    ogg_stream_packetin(&os_en,&op);\n\n    /* retrieve any finished pages */\n    {\n      ogg_page og;\n\n      while(ogg_stream_pageout(&os_en,&og)){\n        /* We have a page.  Check it carefully */\n\n        fprintf(stderr,\"%ld, \",pageno);\n\n        if(headers[pageno]==NULL){\n          fprintf(stderr,\"coded too many pages!\\n\");\n          exit(1);\n        }\n\n        check_page(data+outptr,headers[pageno],&og);\n\n        outptr+=og.body_len;\n        pageno++;\n        if(pageskip){\n          bosflag=1;\n          pageskip--;\n          deptr+=og.body_len;\n        }\n\n        /* have a complete page; submit it to sync/decode */\n\n        {\n          ogg_page og_de;\n          ogg_packet op_de,op_de2;\n          char *buf=ogg_sync_buffer(&oy,og.header_len+og.body_len);\n          char *next=buf;\n          byteskipcount+=og.header_len;\n          if(byteskipcount>byteskip){\n            memcpy(next,og.header,byteskipcount-byteskip);\n            next+=byteskipcount-byteskip;\n            byteskipcount=byteskip;\n          }\n\n          byteskipcount+=og.body_len;\n          if(byteskipcount>byteskip){\n            memcpy(next,og.body,byteskipcount-byteskip);\n            next+=byteskipcount-byteskip;\n            byteskipcount=byteskip;\n          }\n\n          ogg_sync_wrote(&oy,next-buf);\n\n          while(1){\n            int ret=ogg_sync_pageout(&oy,&og_de);\n            if(ret==0)break;\n            if(ret<0)continue;\n            /* got a page.  Happy happy.  Verify that it's good. */\n\n            fprintf(stderr,\"(%d), \",pageout);\n\n            check_page(data+deptr,headers[pageout],&og_de);\n            deptr+=og_de.body_len;\n            pageout++;\n\n            /* submit it to deconstitution */\n            ogg_stream_pagein(&os_de,&og_de);\n\n            /* packets out? */\n            while(ogg_stream_packetpeek(&os_de,&op_de2)>0){\n              ogg_stream_packetpeek(&os_de,NULL);\n              ogg_stream_packetout(&os_de,&op_de); /* just catching them all */\n\n              /* verify peek and out match */\n              if(memcmp(&op_de,&op_de2,sizeof(op_de))){\n                fprintf(stderr,\"packetout != packetpeek! pos=%ld\\n\",\n                        depacket);\n                exit(1);\n              }\n\n              /* verify the packet! */\n              /* check data */\n              if(memcmp(data+depacket,op_de.packet,op_de.bytes)){\n                fprintf(stderr,\"packet data mismatch in decode! pos=%ld\\n\",\n                        depacket);\n                exit(1);\n              }\n              /* check bos flag */\n              if(bosflag==0 && op_de.b_o_s==0){\n                fprintf(stderr,\"b_o_s flag not set on packet!\\n\");\n                exit(1);\n              }\n              if(bosflag && op_de.b_o_s){\n                fprintf(stderr,\"b_o_s flag incorrectly set on packet!\\n\");\n                exit(1);\n              }\n              bosflag=1;\n              depacket+=op_de.bytes;\n\n              /* check eos flag */\n              if(eosflag){\n                fprintf(stderr,\"Multiple decoded packets with eos flag!\\n\");\n                exit(1);\n              }\n\n              if(op_de.e_o_s)eosflag=1;\n\n              /* check granulepos flag */\n              if(op_de.granulepos!=-1){\n                fprintf(stderr,\" granule:%ld \",(long)op_de.granulepos);\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  _ogg_free(data);\n  if(headers[pageno]!=NULL){\n    fprintf(stderr,\"did not write last page!\\n\");\n    exit(1);\n  }\n  if(headers[pageout]!=NULL){\n    fprintf(stderr,\"did not decode last page!\\n\");\n    exit(1);\n  }\n  if(inptr!=outptr){\n    fprintf(stderr,\"encoded page data incomplete!\\n\");\n    exit(1);\n  }\n  if(inptr!=deptr){\n    fprintf(stderr,\"decoded page data incomplete!\\n\");\n    exit(1);\n  }\n  if(inptr!=depacket){\n    fprintf(stderr,\"decoded packet data incomplete!\\n\");\n    exit(1);\n  }\n  if(!eosflag){\n    fprintf(stderr,\"Never got a packet with EOS set!\\n\");\n    exit(1);\n  }\n  fprintf(stderr,\"ok.\\n\");\n}\n\nint main(void){\n\n  ogg_stream_init(&os_en,0x04030201);\n  ogg_stream_init(&os_de,0x04030201);\n  ogg_sync_init(&oy);\n\n  /* Exercise each code path in the framing code.  Also verify that\n     the checksums are working.  */\n\n  {\n    /* 17 only */\n    const int packets[]={17, -1};\n    const int *headret[]={head1_0,NULL};\n\n    fprintf(stderr,\"testing single page encoding... \");\n    test_pack(packets,headret,0,0,0);\n  }\n\n  {\n    /* 17, 254, 255, 256, 500, 510, 600 byte, pad */\n    const int packets[]={17, 254, 255, 256, 500, 510, 600, -1};\n    const int *headret[]={head1_1,head2_1,NULL};\n\n    fprintf(stderr,\"testing basic page encoding... \");\n    test_pack(packets,headret,0,0,0);\n  }\n\n  {\n    /* nil packets; beginning,middle,end */\n    const int packets[]={0,17, 254, 255, 0, 256, 0, 500, 510, 600, 0, -1};\n    const int *headret[]={head1_2,head2_2,NULL};\n\n    fprintf(stderr,\"testing basic nil packets... \");\n    test_pack(packets,headret,0,0,0);\n  }\n\n  {\n    /* large initial packet */\n    const int packets[]={4345,259,255,-1};\n    const int *headret[]={head1_3,head2_3,NULL};\n\n    fprintf(stderr,\"testing initial-packet lacing > 4k... \");\n    test_pack(packets,headret,0,0,0);\n  }\n\n  {\n    /* continuing packet test; with page spill expansion, we have to\n       overflow the lacing table. */\n    const int packets[]={0,65500,259,255,-1};\n    const int *headret[]={head1_4,head2_4,head3_4,NULL};\n\n    fprintf(stderr,\"testing single packet page span... \");\n    test_pack(packets,headret,0,0,0);\n  }\n\n  {\n    /* spill expand packet test */\n    const int packets[]={0,4345,259,255,0,0,-1};\n    const int *headret[]={head1_4b,head2_4b,head3_4b,NULL};\n\n    fprintf(stderr,\"testing page spill expansion... \");\n    test_pack(packets,headret,0,0,0);\n  }\n\n  /* page with the 255 segment limit */\n  {\n\n    const int packets[]={0,10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,10,\n                   10,10,10,10,10,10,10,50,-1};\n    const int *headret[]={head1_5,head2_5,head3_5,NULL};\n\n    fprintf(stderr,\"testing max packet segments... \");\n    test_pack(packets,headret,0,0,0);\n  }\n\n  {\n    /* packet that overspans over an entire page */\n    const int packets[]={0,100,130049,259,255,-1};\n    const int *headret[]={head1_6,head2_6,head3_6,head4_6,NULL};\n\n    fprintf(stderr,\"testing very large packets... \");\n    test_pack(packets,headret,0,0,0);\n  }\n\n  {\n    /* test for the libogg 1.1.1 resync in large continuation bug\n       found by Josh Coalson)  */\n    const int packets[]={0,100,130049,259,255,-1};\n    const int *headret[]={head1_6,head2_6,head3_6,head4_6,NULL};\n\n    fprintf(stderr,\"testing continuation resync in very large packets... \");\n    test_pack(packets,headret,100,2,3);\n  }\n\n  {\n    /* term only page.  why not? */\n    const int packets[]={0,100,64770,-1};\n    const int *headret[]={head1_7,head2_7,head3_7,NULL};\n\n    fprintf(stderr,\"testing zero data page (1 nil packet)... \");\n    test_pack(packets,headret,0,0,0);\n  }\n\n\n\n  {\n    /* build a bunch of pages for testing */\n    unsigned char *data=_ogg_malloc(1024*1024);\n    int pl[]={0, 1,1,98,4079, 1,1,2954,2057, 76,34,912,0,234,1000,1000, 1000,300,-1};\n    int inptr=0,i,j;\n    ogg_page og[5];\n\n    ogg_stream_reset(&os_en);\n\n    for(i=0;pl[i]!=-1;i++){\n      ogg_packet op;\n      int len=pl[i];\n\n      op.packet=data+inptr;\n      op.bytes=len;\n      op.e_o_s=(pl[i+1]<0?1:0);\n      op.granulepos=(i+1)*1000;\n\n      for(j=0;j<len;j++)data[inptr++]=i+j;\n      ogg_stream_packetin(&os_en,&op);\n    }\n\n    _ogg_free(data);\n\n    /* retrieve finished pages */\n    for(i=0;i<5;i++){\n      if(ogg_stream_pageout(&os_en,&og[i])==0){\n        fprintf(stderr,\"Too few pages output building sync tests!\\n\");\n        exit(1);\n      }\n      copy_page(&og[i]);\n    }\n\n    /* Test lost pages on pagein/packetout: no rollback */\n    {\n      ogg_page temp;\n      ogg_packet test;\n\n      fprintf(stderr,\"Testing loss of pages... \");\n\n      ogg_sync_reset(&oy);\n      ogg_stream_reset(&os_de);\n      for(i=0;i<5;i++){\n        memcpy(ogg_sync_buffer(&oy,og[i].header_len),og[i].header,\n               og[i].header_len);\n        ogg_sync_wrote(&oy,og[i].header_len);\n        memcpy(ogg_sync_buffer(&oy,og[i].body_len),og[i].body,og[i].body_len);\n        ogg_sync_wrote(&oy,og[i].body_len);\n      }\n\n      ogg_sync_pageout(&oy,&temp);\n      ogg_stream_pagein(&os_de,&temp);\n      ogg_sync_pageout(&oy,&temp);\n      ogg_stream_pagein(&os_de,&temp);\n      ogg_sync_pageout(&oy,&temp);\n      /* skip */\n      ogg_sync_pageout(&oy,&temp);\n      ogg_stream_pagein(&os_de,&temp);\n\n      /* do we get the expected results/packets? */\n\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,0,0,0);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,1,1,-1);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,1,2,-1);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,98,3,-1);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,4079,4,5000);\n      if(ogg_stream_packetout(&os_de,&test)!=-1){\n        fprintf(stderr,\"Error: loss of page did not return error\\n\");\n        exit(1);\n      }\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,76,9,-1);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,34,10,-1);\n      fprintf(stderr,\"ok.\\n\");\n    }\n\n    /* Test lost pages on pagein/packetout: rollback with continuation */\n    {\n      ogg_page temp;\n      ogg_packet test;\n\n      fprintf(stderr,\"Testing loss of pages (rollback required)... \");\n\n      ogg_sync_reset(&oy);\n      ogg_stream_reset(&os_de);\n      for(i=0;i<5;i++){\n        memcpy(ogg_sync_buffer(&oy,og[i].header_len),og[i].header,\n               og[i].header_len);\n        ogg_sync_wrote(&oy,og[i].header_len);\n        memcpy(ogg_sync_buffer(&oy,og[i].body_len),og[i].body,og[i].body_len);\n        ogg_sync_wrote(&oy,og[i].body_len);\n      }\n\n      ogg_sync_pageout(&oy,&temp);\n      ogg_stream_pagein(&os_de,&temp);\n      ogg_sync_pageout(&oy,&temp);\n      ogg_stream_pagein(&os_de,&temp);\n      ogg_sync_pageout(&oy,&temp);\n      ogg_stream_pagein(&os_de,&temp);\n      ogg_sync_pageout(&oy,&temp);\n      /* skip */\n      ogg_sync_pageout(&oy,&temp);\n      ogg_stream_pagein(&os_de,&temp);\n\n      /* do we get the expected results/packets? */\n\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,0,0,0);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,1,1,-1);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,1,2,-1);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,98,3,-1);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,4079,4,5000);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,1,5,-1);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,1,6,-1);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,2954,7,-1);\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,2057,8,9000);\n      if(ogg_stream_packetout(&os_de,&test)!=-1){\n        fprintf(stderr,\"Error: loss of page did not return error\\n\");\n        exit(1);\n      }\n      if(ogg_stream_packetout(&os_de,&test)!=1)error();\n      checkpacket(&test,300,17,18000);\n      fprintf(stderr,\"ok.\\n\");\n    }\n\n    /* the rest only test sync */\n    {\n      ogg_page og_de;\n      /* Test fractional page inputs: incomplete capture */\n      fprintf(stderr,\"Testing sync on partial inputs... \");\n      ogg_sync_reset(&oy);\n      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header,\n             3);\n      ogg_sync_wrote(&oy,3);\n      if(ogg_sync_pageout(&oy,&og_de)>0)error();\n\n      /* Test fractional page inputs: incomplete fixed header */\n      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+3,\n             20);\n      ogg_sync_wrote(&oy,20);\n      if(ogg_sync_pageout(&oy,&og_de)>0)error();\n\n      /* Test fractional page inputs: incomplete header */\n      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+23,\n             5);\n      ogg_sync_wrote(&oy,5);\n      if(ogg_sync_pageout(&oy,&og_de)>0)error();\n\n      /* Test fractional page inputs: incomplete body */\n\n      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+28,\n             og[1].header_len-28);\n      ogg_sync_wrote(&oy,og[1].header_len-28);\n      if(ogg_sync_pageout(&oy,&og_de)>0)error();\n\n      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,1000);\n      ogg_sync_wrote(&oy,1000);\n      if(ogg_sync_pageout(&oy,&og_de)>0)error();\n\n      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body+1000,\n             og[1].body_len-1000);\n      ogg_sync_wrote(&oy,og[1].body_len-1000);\n      if(ogg_sync_pageout(&oy,&og_de)<=0)error();\n\n      fprintf(stderr,\"ok.\\n\");\n    }\n\n    /* Test fractional page inputs: page + incomplete capture */\n    {\n      ogg_page og_de;\n      fprintf(stderr,\"Testing sync on 1+partial inputs... \");\n      ogg_sync_reset(&oy);\n\n      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header,\n             og[1].header_len);\n      ogg_sync_wrote(&oy,og[1].header_len);\n\n      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,\n             og[1].body_len);\n      ogg_sync_wrote(&oy,og[1].body_len);\n\n      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header,\n             20);\n      ogg_sync_wrote(&oy,20);\n      if(ogg_sync_pageout(&oy,&og_de)<=0)error();\n      if(ogg_sync_pageout(&oy,&og_de)>0)error();\n\n      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+20,\n             og[1].header_len-20);\n      ogg_sync_wrote(&oy,og[1].header_len-20);\n      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,\n             og[1].body_len);\n      ogg_sync_wrote(&oy,og[1].body_len);\n      if(ogg_sync_pageout(&oy,&og_de)<=0)error();\n\n      fprintf(stderr,\"ok.\\n\");\n    }\n\n    /* Test recapture: garbage + page */\n    {\n      ogg_page og_de;\n      fprintf(stderr,\"Testing search for capture... \");\n      ogg_sync_reset(&oy);\n\n      /* 'garbage' */\n      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,\n             og[1].body_len);\n      ogg_sync_wrote(&oy,og[1].body_len);\n\n      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header,\n             og[1].header_len);\n      ogg_sync_wrote(&oy,og[1].header_len);\n\n      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,\n             og[1].body_len);\n      ogg_sync_wrote(&oy,og[1].body_len);\n\n      memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header,\n             20);\n      ogg_sync_wrote(&oy,20);\n      if(ogg_sync_pageout(&oy,&og_de)>0)error();\n      if(ogg_sync_pageout(&oy,&og_de)<=0)error();\n      if(ogg_sync_pageout(&oy,&og_de)>0)error();\n\n      memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header+20,\n             og[2].header_len-20);\n      ogg_sync_wrote(&oy,og[2].header_len-20);\n      memcpy(ogg_sync_buffer(&oy,og[2].body_len),og[2].body,\n             og[2].body_len);\n      ogg_sync_wrote(&oy,og[2].body_len);\n      if(ogg_sync_pageout(&oy,&og_de)<=0)error();\n\n      fprintf(stderr,\"ok.\\n\");\n    }\n\n    /* Test recapture: page + garbage + page */\n    {\n      ogg_page og_de;\n      fprintf(stderr,\"Testing recapture... \");\n      ogg_sync_reset(&oy);\n\n      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header,\n             og[1].header_len);\n      ogg_sync_wrote(&oy,og[1].header_len);\n\n      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,\n             og[1].body_len);\n      ogg_sync_wrote(&oy,og[1].body_len);\n\n      memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header,\n             og[2].header_len);\n      ogg_sync_wrote(&oy,og[2].header_len);\n\n      memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header,\n             og[2].header_len);\n      ogg_sync_wrote(&oy,og[2].header_len);\n\n      if(ogg_sync_pageout(&oy,&og_de)<=0)error();\n\n      memcpy(ogg_sync_buffer(&oy,og[2].body_len),og[2].body,\n             og[2].body_len-5);\n      ogg_sync_wrote(&oy,og[2].body_len-5);\n\n      memcpy(ogg_sync_buffer(&oy,og[3].header_len),og[3].header,\n             og[3].header_len);\n      ogg_sync_wrote(&oy,og[3].header_len);\n\n      memcpy(ogg_sync_buffer(&oy,og[3].body_len),og[3].body,\n             og[3].body_len);\n      ogg_sync_wrote(&oy,og[3].body_len);\n\n      if(ogg_sync_pageout(&oy,&og_de)>0)error();\n      if(ogg_sync_pageout(&oy,&og_de)<=0)error();\n\n      fprintf(stderr,\"ok.\\n\");\n    }\n\n    /* Free page data that was previously copied */\n    {\n      for(i=0;i<5;i++){\n        free_page(&og[i]);\n      }\n    }\n  }\n\n  return(0);\n}\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/ogg/ogg.h",
    "content": "/********************************************************************\n *                                                                  *\n * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *\n * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *\n * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *\n * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *\n *                                                                  *\n * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007             *\n * by the Xiph.Org Foundation http://www.xiph.org/                  *\n *                                                                  *\n ********************************************************************\n\n function: toplevel libogg include\n last mod: $Id: ogg.h 18044 2011-08-01 17:55:20Z gmaxwell $\n\n ********************************************************************/\n#ifndef _OGG_H\n#define _OGG_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <stddef.h>\n#include <os_types.h>\n\ntypedef struct {\n  void *iov_base;\n  size_t iov_len;\n} ogg_iovec_t;\n\ntypedef struct {\n  long endbyte;\n  int  endbit;\n\n  unsigned char *buffer;\n  unsigned char *ptr;\n  long storage;\n} oggpack_buffer;\n\n/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/\n\ntypedef struct {\n  unsigned char *header;\n  long header_len;\n  unsigned char *body;\n  long body_len;\n} ogg_page;\n\n/* ogg_stream_state contains the current encode/decode state of a logical\n   Ogg bitstream **********************************************************/\n\ntypedef struct {\n  unsigned char   *body_data;    /* bytes from packet bodies */\n  long    body_storage;          /* storage elements allocated */\n  long    body_fill;             /* elements stored; fill mark */\n  long    body_returned;         /* elements of fill returned */\n\n\n  int     *lacing_vals;      /* The values that will go to the segment table */\n  ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact\n                                this way, but it is simple coupled to the\n                                lacing fifo */\n  long    lacing_storage;\n  long    lacing_fill;\n  long    lacing_packet;\n  long    lacing_returned;\n\n  unsigned char    header[282];      /* working space for header encode */\n  int              header_fill;\n\n  int     e_o_s;          /* set when we have buffered the last packet in the\n                             logical bitstream */\n  int     b_o_s;          /* set after we've written the initial page\n                             of a logical bitstream */\n  long    serialno;\n  long    pageno;\n  ogg_int64_t  packetno;  /* sequence number for decode; the framing\n                             knows where there's a hole in the data,\n                             but we need coupling so that the codec\n                             (which is in a separate abstraction\n                             layer) also knows about the gap */\n  ogg_int64_t   granulepos;\n\n} ogg_stream_state;\n\n/* ogg_packet is used to encapsulate the data and metadata belonging\n   to a single raw Ogg/Vorbis packet *************************************/\n\ntypedef struct {\n  unsigned char *packet;\n  long  bytes;\n  long  b_o_s;\n  long  e_o_s;\n\n  ogg_int64_t  granulepos;\n\n  ogg_int64_t  packetno;     /* sequence number for decode; the framing\n                                knows where there's a hole in the data,\n                                but we need coupling so that the codec\n                                (which is in a separate abstraction\n                                layer) also knows about the gap */\n} ogg_packet;\n\ntypedef struct {\n  unsigned char *data;\n  int storage;\n  int fill;\n  int returned;\n\n  int unsynced;\n  int headerbytes;\n  int bodybytes;\n} ogg_sync_state;\n\n/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/\n\nextern void  oggpack_writeinit(oggpack_buffer *b);\nextern int   oggpack_writecheck(oggpack_buffer *b);\nextern void  oggpack_writetrunc(oggpack_buffer *b,long bits);\nextern void  oggpack_writealign(oggpack_buffer *b);\nextern void  oggpack_writecopy(oggpack_buffer *b,void *source,long bits);\nextern void  oggpack_reset(oggpack_buffer *b);\nextern void  oggpack_writeclear(oggpack_buffer *b);\nextern void  oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);\nextern void  oggpack_write(oggpack_buffer *b,unsigned long value,int bits);\nextern long  oggpack_look(oggpack_buffer *b,int bits);\nextern long  oggpack_look1(oggpack_buffer *b);\nextern void  oggpack_adv(oggpack_buffer *b,int bits);\nextern void  oggpack_adv1(oggpack_buffer *b);\nextern long  oggpack_read(oggpack_buffer *b,int bits);\nextern long  oggpack_read1(oggpack_buffer *b);\nextern long  oggpack_bytes(oggpack_buffer *b);\nextern long  oggpack_bits(oggpack_buffer *b);\nextern unsigned char *oggpack_get_buffer(oggpack_buffer *b);\n\nextern void  oggpackB_writeinit(oggpack_buffer *b);\nextern int   oggpackB_writecheck(oggpack_buffer *b);\nextern void  oggpackB_writetrunc(oggpack_buffer *b,long bits);\nextern void  oggpackB_writealign(oggpack_buffer *b);\nextern void  oggpackB_writecopy(oggpack_buffer *b,void *source,long bits);\nextern void  oggpackB_reset(oggpack_buffer *b);\nextern void  oggpackB_writeclear(oggpack_buffer *b);\nextern void  oggpackB_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);\nextern void  oggpackB_write(oggpack_buffer *b,unsigned long value,int bits);\nextern long  oggpackB_look(oggpack_buffer *b,int bits);\nextern long  oggpackB_look1(oggpack_buffer *b);\nextern void  oggpackB_adv(oggpack_buffer *b,int bits);\nextern void  oggpackB_adv1(oggpack_buffer *b);\nextern long  oggpackB_read(oggpack_buffer *b,int bits);\nextern long  oggpackB_read1(oggpack_buffer *b);\nextern long  oggpackB_bytes(oggpack_buffer *b);\nextern long  oggpackB_bits(oggpack_buffer *b);\nextern unsigned char *oggpackB_get_buffer(oggpack_buffer *b);\n\n/* Ogg BITSTREAM PRIMITIVES: encoding **************************/\n\nextern int      ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op);\nextern int      ogg_stream_iovecin(ogg_stream_state *os, ogg_iovec_t *iov,\n                                   int count, long e_o_s, ogg_int64_t granulepos);\nextern int      ogg_stream_pageout(ogg_stream_state *os, ogg_page *og);\nextern int      ogg_stream_pageout_fill(ogg_stream_state *os, ogg_page *og, int nfill);\nextern int      ogg_stream_flush(ogg_stream_state *os, ogg_page *og);\nextern int      ogg_stream_flush_fill(ogg_stream_state *os, ogg_page *og, int nfill);\n\n/* Ogg BITSTREAM PRIMITIVES: decoding **************************/\n\nextern int      ogg_sync_init(ogg_sync_state *oy);\nextern int      ogg_sync_clear(ogg_sync_state *oy);\nextern int      ogg_sync_reset(ogg_sync_state *oy);\nextern int      ogg_sync_destroy(ogg_sync_state *oy);\nextern int      ogg_sync_check(ogg_sync_state *oy);\n\nextern char    *ogg_sync_buffer(ogg_sync_state *oy, long size);\nextern int      ogg_sync_wrote(ogg_sync_state *oy, long bytes);\nextern long     ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og);\nextern int      ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);\nextern int      ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);\nextern int      ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);\nextern int      ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);\n\n/* Ogg BITSTREAM PRIMITIVES: general ***************************/\n\nextern int      ogg_stream_init(ogg_stream_state *os,int serialno);\nextern int      ogg_stream_clear(ogg_stream_state *os);\nextern int      ogg_stream_reset(ogg_stream_state *os);\nextern int      ogg_stream_reset_serialno(ogg_stream_state *os,int serialno);\nextern int      ogg_stream_destroy(ogg_stream_state *os);\nextern int      ogg_stream_check(ogg_stream_state *os);\nextern int      ogg_stream_eos(ogg_stream_state *os);\n\nextern void     ogg_page_checksum_set(ogg_page *og);\n\nextern int      ogg_page_version(const ogg_page *og);\nextern int      ogg_page_continued(const ogg_page *og);\nextern int      ogg_page_bos(const ogg_page *og);\nextern int      ogg_page_eos(const ogg_page *og);\nextern ogg_int64_t  ogg_page_granulepos(const ogg_page *og);\nextern int      ogg_page_serialno(const ogg_page *og);\nextern long     ogg_page_pageno(const ogg_page *og);\nextern int      ogg_page_packets(const ogg_page *og);\n\nextern void     ogg_packet_clear(ogg_packet *op);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* _OGG_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/ogg/os_types.h",
    "content": "/********************************************************************\n *                                                                  *\n * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *\n * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *\n * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *\n * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *\n *                                                                  *\n * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *\n * by the Xiph.Org Foundation http://www.xiph.org/                  *\n *                                                                  *\n ********************************************************************\n\n function: #ifdef jail to whip a few platforms into the UNIX ideal.\n last mod: $Id: os_types.h 17712 2010-12-03 17:10:02Z xiphmont $\n\n ********************************************************************/\n#ifndef _OS_TYPES_H\n#define _OS_TYPES_H\n\n/* make it easy on the folks that want to compile the libs with a\n   different malloc than stdlib */\n#define _ogg_malloc  malloc\n#define _ogg_calloc  calloc\n#define _ogg_realloc realloc\n#define _ogg_free    free\n\n#if defined(_WIN32) \n\n#  if defined(__CYGWIN__)\n#    include <stdint.h>\n     typedef int16_t ogg_int16_t;\n     typedef uint16_t ogg_uint16_t;\n     typedef int32_t ogg_int32_t;\n     typedef uint32_t ogg_uint32_t;\n     typedef int64_t ogg_int64_t;\n     typedef uint64_t ogg_uint64_t;\n#  elif defined(__MINGW32__)\n#    include <sys/types.h>\n     typedef short ogg_int16_t;\n     typedef unsigned short ogg_uint16_t;\n     typedef int ogg_int32_t;\n     typedef unsigned int ogg_uint32_t;\n     typedef long long ogg_int64_t;\n     typedef unsigned long long ogg_uint64_t;\n#  elif defined(__MWERKS__)\n     typedef long long ogg_int64_t;\n     typedef int ogg_int32_t;\n     typedef unsigned int ogg_uint32_t;\n     typedef short ogg_int16_t;\n     typedef unsigned short ogg_uint16_t;\n#  else\n     /* MSVC/Borland */\n     typedef __int64 ogg_int64_t;\n     typedef __int32 ogg_int32_t;\n     typedef unsigned __int32 ogg_uint32_t;\n     typedef __int16 ogg_int16_t;\n     typedef unsigned __int16 ogg_uint16_t;\n#  endif\n\n#elif defined(__MACOS__)\n\n#  include <sys/types.h>\n   typedef SInt16 ogg_int16_t;\n   typedef UInt16 ogg_uint16_t;\n   typedef SInt32 ogg_int32_t;\n   typedef UInt32 ogg_uint32_t;\n   typedef SInt64 ogg_int64_t;\n\n#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */\n\n#  include <inttypes.h>\n   typedef int16_t ogg_int16_t;\n   typedef uint16_t ogg_uint16_t;\n   typedef int32_t ogg_int32_t;\n   typedef uint32_t ogg_uint32_t;\n   typedef int64_t ogg_int64_t;\n\n#elif defined(__HAIKU__)\n\n  /* Haiku */\n#  include <sys/types.h>\n   typedef short ogg_int16_t;\n   typedef unsigned short ogg_uint16_t;\n   typedef int ogg_int32_t;\n   typedef unsigned int ogg_uint32_t;\n   typedef long long ogg_int64_t;\n\n#elif defined(__BEOS__)\n\n   /* Be */\n#  include <inttypes.h>\n   typedef int16_t ogg_int16_t;\n   typedef uint16_t ogg_uint16_t;\n   typedef int32_t ogg_int32_t;\n   typedef uint32_t ogg_uint32_t;\n   typedef int64_t ogg_int64_t;\n\n#elif defined (__EMX__)\n\n   /* OS/2 GCC */\n   typedef short ogg_int16_t;\n   typedef unsigned short ogg_uint16_t;\n   typedef int ogg_int32_t;\n   typedef unsigned int ogg_uint32_t;\n   typedef long long ogg_int64_t;\n\n#elif defined (DJGPP)\n\n   /* DJGPP */\n   typedef short ogg_int16_t;\n   typedef int ogg_int32_t;\n   typedef unsigned int ogg_uint32_t;\n   typedef long long ogg_int64_t;\n\n#elif defined(R5900)\n\n   /* PS2 EE */\n   typedef long ogg_int64_t;\n   typedef int ogg_int32_t;\n   typedef unsigned ogg_uint32_t;\n   typedef short ogg_int16_t;\n\n#elif defined(__SYMBIAN32__)\n\n   /* Symbian GCC */\n   typedef signed short ogg_int16_t;\n   typedef unsigned short ogg_uint16_t;\n   typedef signed int ogg_int32_t;\n   typedef unsigned int ogg_uint32_t;\n   typedef long long int ogg_int64_t;\n\n#elif defined(__TMS320C6X__)\n\n   /* TI C64x compiler */\n   typedef signed short ogg_int16_t;\n   typedef unsigned short ogg_uint16_t;\n   typedef signed int ogg_int32_t;\n   typedef unsigned int ogg_uint32_t;\n   typedef long long int ogg_int64_t;\n\n#else\n\n#  include <ogg/config_types.h>\n\n#endif\n\n#endif  /* _OS_TYPES_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/opusfile/info.c",
    "content": "/********************************************************************\n *                                                                  *\n * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *\n * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *\n * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *\n * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *\n *                                                                  *\n * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2012                *\n * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *\n *                                                                  *\n ********************************************************************/\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"internal.h\"\n#include <limits.h>\n#include <string.h>\n\nstatic unsigned op_parse_uint16le(const unsigned char *_data){\n  return _data[0]|_data[1]<<8;\n}\n\nstatic int op_parse_int16le(const unsigned char *_data){\n  int ret;\n  ret=_data[0]|_data[1]<<8;\n  return (ret^0x8000)-0x8000;\n}\n\nstatic opus_uint32 op_parse_uint32le(const unsigned char *_data){\n  return _data[0]|_data[1]<<8|_data[2]<<16|_data[3]<<24;\n}\n\nstatic opus_uint32 op_parse_uint32be(const unsigned char *_data){\n  return _data[3]|_data[2]<<8|_data[1]<<16|_data[0]<<24;\n}\n\nint opus_head_parse(OpusHead *_head,const unsigned char *_data,size_t _len){\n  OpusHead head;\n  if(_len<8)return OP_ENOTFORMAT;\n  if(memcmp(_data,\"OpusHead\",8)!=0)return OP_ENOTFORMAT;\n  if(_len<9)return OP_EBADHEADER;\n  head.version=_data[8];\n  if(head.version>15)return OP_EVERSION;\n  if(_len<19)return OP_EBADHEADER;\n  head.channel_count=_data[9];\n  head.pre_skip=op_parse_uint16le(_data+10);\n  head.input_sample_rate=op_parse_uint32le(_data+12);\n  head.output_gain=op_parse_int16le(_data+16);\n  head.mapping_family=_data[18];\n  if(head.mapping_family==0){\n    if(head.channel_count<1||head.channel_count>2)return OP_EBADHEADER;\n    if(head.version<=1&&_len>19)return OP_EBADHEADER;\n    head.stream_count=1;\n    head.coupled_count=head.channel_count-1;\n    if(_head!=NULL){\n      _head->mapping[0]=0;\n      _head->mapping[1]=1;\n    }\n  }\n  else if(head.mapping_family==1){\n    size_t size;\n    int    ci;\n    if(head.channel_count<1||head.channel_count>8)return OP_EBADHEADER;\n    size=21+head.channel_count;\n    if(_len<size||head.version<=1&&_len>size)return OP_EBADHEADER;\n    head.stream_count=_data[19];\n    if(head.stream_count<1)return OP_EBADHEADER;\n    head.coupled_count=_data[20];\n    if(head.coupled_count>head.stream_count)return OP_EBADHEADER;\n    for(ci=0;ci<head.channel_count;ci++){\n      if(_data[21+ci]>=head.stream_count+head.coupled_count\n       &&_data[21+ci]!=255){\n        return OP_EBADHEADER;\n      }\n    }\n    if(_head!=NULL)memcpy(_head->mapping,_data+21,head.channel_count);\n  }\n  /*General purpose players should not attempt to play back content with\n     channel mapping family 255.*/\n  else if(head.mapping_family==255)return OP_EIMPL;\n  /*No other channel mapping families are currently defined.*/\n  else return OP_EBADHEADER;\n  if(_head!=NULL)memcpy(_head,&head,head.mapping-(unsigned char *)&head);\n  return 0;\n}\n\nvoid opus_tags_init(OpusTags *_tags){\n  memset(_tags,0,sizeof(*_tags));\n}\n\nvoid opus_tags_clear(OpusTags *_tags){\n  int ci;\n  for(ci=_tags->comments;ci-->0;)_ogg_free(_tags->user_comments[ci]);\n  _ogg_free(_tags->user_comments);\n  _ogg_free(_tags->comment_lengths);\n  _ogg_free(_tags->vendor);\n}\n\n/*Ensure there's room for up to _ncomments comments.*/\nstatic int op_tags_ensure_capacity(OpusTags *_tags,size_t _ncomments){\n  char   **user_comments;\n  int     *comment_lengths;\n  size_t   size;\n  if(OP_UNLIKELY(_ncomments>=(size_t)INT_MAX))return OP_EFAULT;\n  size=sizeof(*_tags->comment_lengths)*(_ncomments+1);\n  if(size/sizeof(*_tags->comment_lengths)!=_ncomments+1)return OP_EFAULT;\n  comment_lengths=(int *)_ogg_realloc(_tags->comment_lengths,size);\n  if(OP_UNLIKELY(comment_lengths==NULL))return OP_EFAULT;\n  comment_lengths[_ncomments]=0;\n  _tags->comment_lengths=comment_lengths;\n  size=sizeof(*_tags->user_comments)*(_ncomments+1);\n  if(size/sizeof(*_tags->user_comments)!=_ncomments+1)return OP_EFAULT;\n  user_comments=(char **)_ogg_realloc(_tags->user_comments,size);\n  if(OP_UNLIKELY(user_comments==NULL))return OP_EFAULT;\n  user_comments[_ncomments]=NULL;\n  _tags->user_comments=user_comments;\n  return 0;\n}\n\n/*Duplicate a (possibly non-NUL terminated) string with a known length.*/\nstatic char *op_strdup_with_len(const char *_s,size_t _len){\n  size_t  size;\n  char   *ret;\n  size=sizeof(*ret)*(_len+1);\n  if(OP_UNLIKELY(size<_len))return NULL;\n  ret=(char *)_ogg_malloc(size);\n  if(OP_LIKELY(ret!=NULL)){\n    ret=(char *)memcpy(ret,_s,sizeof(*ret)*_len);\n    ret[_len]='\\0';\n  }\n  return ret;\n}\n\n/*The actual implementation of opus_tags_parse().\n  Unlike the public API, this function requires _tags to already be\n   initialized, modifies its contents before success is guaranteed, and assumes\n   the caller will clear it on error.*/\nstatic int opus_tags_parse_impl(OpusTags *_tags,\n const unsigned char *_data,size_t _len){\n  opus_uint32 count;\n  size_t      len;\n  int         ncomments;\n  int         ci;\n  len=_len;\n  if(len<8)return OP_ENOTFORMAT;\n  if(memcmp(_data,\"OpusTags\",8)!=0)return OP_ENOTFORMAT;\n  if(len<16)return OP_EBADHEADER;\n  _data+=8;\n  len-=8;\n  count=op_parse_uint32le(_data);\n  _data+=4;\n  len-=4;\n  if(count>len)return OP_EBADHEADER;\n  if(_tags!=NULL){\n    _tags->vendor=op_strdup_with_len((char *)_data,count);\n    if(_tags->vendor==NULL)return OP_EFAULT;\n  }\n  _data+=count;\n  len-=count;\n  if(len<4)return OP_EBADHEADER;\n  count=op_parse_uint32le(_data);\n  _data+=4;\n  len-=4;\n  /*Check to make sure there's minimally sufficient data left in the packet.*/\n  if(count>len>>2)return OP_EBADHEADER;\n  /*Check for overflow (the API limits this to an int).*/\n  if(count>(opus_uint32)INT_MAX-1)return OP_EFAULT;\n  if(_tags!=NULL){\n    int ret;\n    ret=op_tags_ensure_capacity(_tags,count);\n    if(ret<0)return ret;\n  }\n  ncomments=(int)count;\n  for(ci=0;ci<ncomments;ci++){\n    /*Check to make sure there's minimally sufficient data left in the packet.*/\n    if((size_t)(ncomments-ci)>len>>2)return OP_EBADHEADER;\n    count=op_parse_uint32le(_data);\n    _data+=4;\n    len-=4;\n    if(count>len)return OP_EBADHEADER;\n    /*Check for overflow (the API limits this to an int).*/\n    if(count>(opus_uint32)INT_MAX)return OP_EFAULT;\n    if(_tags!=NULL){\n      _tags->user_comments[ci]=op_strdup_with_len((char *)_data,count);\n      if(_tags->user_comments[ci]==NULL)return OP_EFAULT;\n      _tags->comment_lengths[ci]=(int)count;\n      _tags->comments=ci+1;\n    }\n    _data+=count;\n    len-=count;\n  }\n  return 0;\n}\n\nint opus_tags_parse(OpusTags *_tags,const unsigned char *_data,size_t _len){\n  if(_tags!=NULL){\n    OpusTags tags;\n    int      ret;\n    opus_tags_init(&tags);\n    ret=opus_tags_parse_impl(&tags,_data,_len);\n    if(ret<0)opus_tags_clear(&tags);\n    else *_tags=*&tags;\n    return ret;\n  }\n  else return opus_tags_parse_impl(NULL,_data,_len);\n}\n\n/*The actual implementation of opus_tags_copy().\n  Unlike the public API, this function requires _dst to already be\n   initialized, modifies its contents before success is guaranteed, and assumes\n   the caller will clear it on error.*/\nstatic int opus_tags_copy_impl(OpusTags *_dst,const OpusTags *_src){\n  char *vendor;\n  int   ncomments;\n  int   ret;\n  int   ci;\n  vendor=_src->vendor;\n  _dst->vendor=op_strdup_with_len(vendor,strlen(vendor));\n  if(OP_UNLIKELY(_dst->vendor==NULL))return OP_EFAULT;\n  ncomments=_src->comments;\n  ret=op_tags_ensure_capacity(_dst,ncomments);\n  if(OP_UNLIKELY(ret<0))return ret;\n  for(ci=0;ci<ncomments;ci++){\n    int len;\n    len=_src->comment_lengths[ci];\n    OP_ASSERT(len>=0);\n    _dst->user_comments[ci]=op_strdup_with_len(_src->user_comments[ci],len);\n    if(OP_UNLIKELY(_dst->user_comments[ci]==NULL))return OP_EFAULT;\n    _dst->comment_lengths[ci]=len;\n    _dst->comments=ci+1;\n  }\n  return 0;\n}\n\nint opus_tags_copy(OpusTags *_dst,const OpusTags *_src){\n  OpusTags dst;\n  int      ret;\n  opus_tags_init(&dst);\n  ret=opus_tags_copy_impl(&dst,_src);\n  if(OP_UNLIKELY(ret<0))opus_tags_clear(&dst);\n  else *_dst=*&dst;\n  return 0;\n}\n\nint opus_tags_add(OpusTags *_tags,const char *_tag,const char *_value){\n  char *comment;\n  int   tag_len;\n  int   value_len;\n  int   ncomments;\n  int   ret;\n  ncomments=_tags->comments;\n  ret=op_tags_ensure_capacity(_tags,ncomments+1);\n  if(OP_UNLIKELY(ret<0))return ret;\n  tag_len=strlen(_tag);\n  value_len=strlen(_value);\n  /*+2 for '=' and '\\0'.*/\n  _tags->comment_lengths[ncomments]=0;\n  _tags->user_comments[ncomments]=comment=\n   (char *)_ogg_malloc(sizeof(*comment)*(tag_len+value_len+2));\n  if(OP_UNLIKELY(comment==NULL))return OP_EFAULT;\n  _tags->comment_lengths[ncomments]=tag_len+value_len+1;\n  memcpy(comment,_tag,sizeof(*comment)*tag_len);\n  comment[tag_len]='=';\n  memcpy(comment+tag_len+1,_value,sizeof(*comment)*(value_len+1));\n  return 0;\n}\n\nint opus_tags_add_comment(OpusTags *_tags,const char *_comment){\n  int comment_len;\n  int ncomments;\n  int ret;\n  ncomments=_tags->comments;\n  ret=op_tags_ensure_capacity(_tags,ncomments+1);\n  if(OP_UNLIKELY(ret<0))return ret;\n  comment_len=(int)strlen(_comment);\n  _tags->comment_lengths[ncomments]=0;\n  _tags->user_comments[ncomments]=op_strdup_with_len(_comment,comment_len);\n  if(OP_UNLIKELY(_tags->user_comments[ncomments]==NULL))return OP_EFAULT;\n  _tags->comment_lengths[ncomments]=comment_len;\n  return 0;\n}\n\nint opus_tagcompare(const char *_tag_name,const char *_comment){\n  return opus_tagncompare(_tag_name,strlen(_tag_name),_comment);\n}\n\nint opus_tagncompare(const char *_tag_name,int _tag_len,const char *_comment){\n  int ret;\n  OP_ASSERT(_tag_len>=0);\n  ret=op_strncasecmp(_tag_name,_comment,_tag_len);\n  return ret?ret:'='-_comment[_tag_len];\n}\n\nconst char *opus_tags_query(const OpusTags *_tags,const char *_tag,int _count){\n  char **user_comments;\n  int    tag_len;\n  int    found;\n  int    ncomments;\n  int    ci;\n  tag_len=strlen(_tag);\n  ncomments=_tags->comments;\n  user_comments=_tags->user_comments;\n  found=0;\n  for(ci=0;ci<ncomments;ci++){\n    if(!opus_tagncompare(_tag,tag_len,user_comments[ci])){\n      /*We return a pointer to the data, not a copy.*/\n      if(_count==found++)return user_comments[ci]+tag_len+1;\n    }\n  }\n  /*Didn't find anything.*/\n  return NULL;\n}\n\nint opus_tags_query_count(const OpusTags *_tags,const char *_tag){\n  char **user_comments;\n  int    tag_len;\n  int    found;\n  int    ncomments;\n  int    ci;\n  tag_len=strlen(_tag);\n  ncomments=_tags->comments;\n  user_comments=_tags->user_comments;\n  found=0;\n  for(ci=0;ci<ncomments;ci++){\n    if(!opus_tagncompare(_tag,tag_len,user_comments[ci]))found++;\n  }\n  return found;\n}\n\nint opus_tags_get_track_gain(const OpusTags *_tags,int *_gain_q8){\n  char **comments;\n  int    ncomments;\n  int    ci;\n  comments=_tags->user_comments;\n  ncomments=_tags->comments;\n  /*Look for the first valid R128_TRACK_GAIN tag and use that.*/\n  for(ci=0;ci<ncomments;ci++){\n    if(opus_tagncompare(\"R128_TRACK_GAIN\",15,comments[ci])==0){\n      char       *p;\n      opus_int32  gain_q8;\n      int         negative;\n      p=comments[ci]+16;\n      negative=0;\n      if(*p=='-'){\n        negative=-1;\n        p++;\n      }\n      else if(*p=='+')p++;\n      gain_q8=0;\n      while(*p>='0'&&*p<='9'){\n        gain_q8=10*gain_q8+*p-'0';\n        if(gain_q8>32767-negative)break;\n        p++;\n      }\n      /*This didn't look like a signed 16-bit decimal integer.\n        Not a valid R128_TRACK_GAIN tag.*/\n      if(*p!='\\0')continue;\n      *_gain_q8=(int)(gain_q8+negative^negative);\n      return 0;\n    }\n  }\n  return OP_FALSE;\n}\n\nstatic int op_is_jpeg(const unsigned char *_buf,size_t _buf_sz){\n  return _buf_sz>=11&&memcmp(_buf,\"\\xFF\\xD8\\xFF\\xE0\",4)==0\n   &&(_buf[4]<<8|_buf[5])>=16&&memcmp(_buf+6,\"JFIF\",5)==0;\n}\n\n/*Tries to extract the width, height, bits per pixel, and palette size of a\n   JPEG.\n  On failure, simply leaves its outputs unmodified.*/\nstatic void op_extract_jpeg_params(const unsigned char *_buf,size_t _buf_sz,\n opus_uint32 *_width,opus_uint32 *_height,\n opus_uint32 *_depth,opus_uint32 *_colors,int *_has_palette){\n  if(op_is_jpeg(_buf,_buf_sz)){\n    size_t offs;\n    offs=2;\n    for(;;){\n      size_t segment_len;\n      int    marker;\n      while(offs<_buf_sz&&_buf[offs]!=0xFF)offs++;\n      while(offs<_buf_sz&&_buf[offs]==0xFF)offs++;\n      marker=_buf[offs];\n      offs++;\n      /*If we hit EOI* (end of image), or another SOI* (start of image),\n         or SOS (start of scan), then stop now.*/\n      if(offs>=_buf_sz||(marker>=0xD8&&marker<=0xDA))break;\n      /*RST* (restart markers): skip (no segment length).*/\n      else if(marker>=0xD0&&marker<=0xD7)continue;\n      /*Read the length of the marker segment.*/\n      if(_buf_sz-offs<2)break;\n      segment_len=_buf[offs]<<8|_buf[offs+1];\n      if(segment_len<2||_buf_sz-offs<segment_len)break;\n      if(marker==0xC0||(marker>0xC0&&marker<0xD0&&(marker&3)!=0)){\n        /*Found a SOFn (start of frame) marker segment:*/\n        if(segment_len>=8){\n          *_height=_buf[offs+3]<<8|_buf[offs+4];\n          *_width=_buf[offs+5]<<8|_buf[offs+6];\n          *_depth=_buf[offs+2]*_buf[offs+7];\n          *_colors=0;\n          *_has_palette=0;\n        }\n        break;\n      }\n      /*Other markers: skip the whole marker segment.*/\n      offs+=segment_len;\n    }\n  }\n}\n\nstatic int op_is_png(const unsigned char *_buf,size_t _buf_sz){\n  return _buf_sz>=8&&memcmp(_buf,\"\\x89PNG\\x0D\\x0A\\x1A\\x0A\",8)==0;\n}\n\n/*Tries to extract the width, height, bits per pixel, and palette size of a\n   PNG.\n  On failure, simply leaves its outputs unmodified.*/\nstatic void op_extract_png_params(const unsigned char *_buf,size_t _buf_sz,\n opus_uint32 *_width,opus_uint32 *_height,\n opus_uint32 *_depth,opus_uint32 *_colors,int *_has_palette){\n  if(op_is_png(_buf,_buf_sz)){\n    size_t offs;\n    offs=8;\n    while(_buf_sz-offs>=12){\n      ogg_uint32_t chunk_len;\n      chunk_len=op_parse_uint32be(_buf+offs);\n      if(chunk_len>_buf_sz-(offs+12))break;\n      else if(chunk_len==13&&memcmp(_buf+offs+4,\"IHDR\",4)==0){\n        int color_type;\n        *_width=op_parse_uint32be(_buf+offs+8);\n        *_height=op_parse_uint32be(_buf+offs+12);\n        color_type=_buf[offs+17];\n        if(color_type==3){\n          *_depth=24;\n          *_has_palette=1;\n        }\n        else{\n          int sample_depth;\n          sample_depth=_buf[offs+16];\n          if(color_type==0)*_depth=sample_depth;\n          else if(color_type==2)*_depth=sample_depth*3;\n          else if(color_type==4)*_depth=sample_depth*2;\n          else if(color_type==6)*_depth=sample_depth*4;\n          *_colors=0;\n          *_has_palette=0;\n          break;\n        }\n      }\n      else if(*_has_palette>0&&memcmp(_buf+offs+4,\"PLTE\",4)==0){\n        *_colors=chunk_len/3;\n        break;\n      }\n      offs+=12+chunk_len;\n    }\n  }\n}\n\nstatic int op_is_gif(const unsigned char *_buf,size_t _buf_sz){\n  return _buf_sz>=6&&(memcmp(_buf,\"GIF87a\",6)==0||memcmp(_buf,\"GIF89a\",6)==0);\n}\n\n/*Tries to extract the width, height, bits per pixel, and palette size of a\n   GIF.\n  On failure, simply leaves its outputs unmodified.*/\nstatic void op_extract_gif_params(const unsigned char *_buf,size_t _buf_sz,\n opus_uint32 *_width,opus_uint32 *_height,\n opus_uint32 *_depth,opus_uint32 *_colors,int *_has_palette){\n  if(op_is_gif(_buf,_buf_sz)&&_buf_sz>=14){\n    *_width=_buf[6]|_buf[7]<<8;\n    *_height=_buf[8]|_buf[9]<<8;\n    /*libFLAC hard-codes the depth to 24.*/\n    *_depth=24;\n    *_colors=1<<((_buf[10]&7)+1);\n    *_has_palette=1;\n  }\n}\n\n/*The actual implementation of opus_picture_tag_parse().\n  Unlike the public API, this function requires _pic to already be\n   initialized, modifies its contents before success is guaranteed, and assumes\n   the caller will clear it on error.*/\nstatic int opus_picture_tag_parse_impl(OpusPictureTag *_pic,const char *_tag,\n unsigned char *_buf,size_t _buf_sz,size_t _base64_sz){\n  opus_int32   picture_type;\n  opus_uint32  mime_type_length;\n  char        *mime_type;\n  opus_uint32  description_length;\n  char        *description;\n  opus_uint32  width;\n  opus_uint32  height;\n  opus_uint32  depth;\n  opus_uint32  colors;\n  opus_uint32  data_length;\n  opus_uint32  file_width;\n  opus_uint32  file_height;\n  opus_uint32  file_depth;\n  opus_uint32  file_colors;\n  int          format;\n  int          has_palette;\n  int          colors_set;\n  size_t       i;\n  /*Decode the BASE64 data.*/\n  for(i=0;i<_base64_sz;i++){\n    opus_uint32 value;\n    int         j;\n    value=0;\n    for(j=0;j<4;j++){\n      unsigned c;\n      unsigned d;\n      c=(unsigned char)_tag[4*i+j];\n      if(c=='+')d=62;\n      else if(c=='/')d=63;\n      else if(c>='0'&&c<='9')d=52+c-'0';\n      else if(c>='a'&&c<='z')d=26+c-'a';\n      else if(c>='A'&&c<='Z')d=c-'A';\n      else if(c=='='&&3*i+j>_buf_sz)d=0;\n      else return OP_ENOTFORMAT;\n      value=value<<6|d;\n    }\n    _buf[3*i]=(unsigned char)(value>>16);\n    if(3*i+1<_buf_sz){\n      _buf[3*i+1]=(unsigned char)(value>>8);\n      if(3*i+2<_buf_sz)_buf[3*i+2]=(unsigned char)value;\n    }\n  }\n  i=0;\n  picture_type=op_parse_uint32be(_buf+i);\n  i+=4;\n  /*Extract the MIME type.*/\n  mime_type_length=op_parse_uint32be(_buf+i);\n  i+=4;\n  if(mime_type_length>_buf_sz-32)return OP_ENOTFORMAT;\n  mime_type=(char *)_ogg_malloc(sizeof(*_pic->mime_type)*(mime_type_length+1));\n  if(mime_type==NULL)return OP_EFAULT;\n  memcpy(mime_type,_buf+i,sizeof(*mime_type)*mime_type_length);\n  mime_type[mime_type_length]='\\0';\n  _pic->mime_type=mime_type;\n  i+=mime_type_length;\n  /*Extract the description string.*/\n  description_length=op_parse_uint32be(_buf+i);\n  i+=4;\n  if(description_length>_buf_sz-mime_type_length-32)return OP_ENOTFORMAT;\n  description=\n   (char *)_ogg_malloc(sizeof(*_pic->mime_type)*(description_length+1));\n  if(description==NULL)return OP_EFAULT;\n  memcpy(description,_buf+i,sizeof(*description)*description_length);\n  description[description_length]='\\0';\n  _pic->description=description;\n  i+=description_length;\n  /*Extract the remaining fields.*/\n  width=op_parse_uint32be(_buf+i);\n  i+=4;\n  height=op_parse_uint32be(_buf+i);\n  i+=4;\n  depth=op_parse_uint32be(_buf+i);\n  i+=4;\n  colors=op_parse_uint32be(_buf+i);\n  i+=4;\n  /*If one of these is set, they all must be, but colors==0 is a valid value.*/\n  colors_set=width!=0||height!=0||depth!=0||colors!=0;\n  if(width==0||height==0||depth==0&&colors_set)return OP_ENOTFORMAT;\n  data_length=op_parse_uint32be(_buf+i);\n  i+=4;\n  if(data_length>_buf_sz-i)return OP_ENOTFORMAT;\n  /*Trim extraneous data so we don't copy it below.*/\n  _buf_sz=i+data_length;\n  /*Attempt to determine the image format.*/\n  format=OP_PIC_FORMAT_UNKNOWN;\n  if(mime_type_length==3&&strcmp(mime_type,\"-->\")==0){\n    format=OP_PIC_FORMAT_URL;\n    /*Picture type 1 must be a 32x32 PNG.*/\n    if(picture_type==1&&(width!=0||height!=0)&&(width!=32||height!=32)){\n      return OP_ENOTFORMAT;\n    }\n    /*Append a terminating NUL for the convenience of our callers.*/\n    _buf[_buf_sz++]='\\0';\n  }\n  else{\n    if(mime_type_length==10\n     &&op_strncasecmp(mime_type,\"image/jpeg\",mime_type_length)==0){\n      if(op_is_jpeg(_buf+i,data_length))format=OP_PIC_FORMAT_JPEG;\n    }\n    else if(mime_type_length==9\n     &&op_strncasecmp(mime_type,\"image/png\",mime_type_length)==0){\n      if(op_is_png(_buf+i,data_length))format=OP_PIC_FORMAT_PNG;\n    }\n    else if(mime_type_length==9\n     &&op_strncasecmp(mime_type,\"image/gif\",mime_type_length)==0){\n      if(op_is_gif(_buf+i,data_length))format=OP_PIC_FORMAT_GIF;\n    }\n    else if(mime_type_length==0||(mime_type_length==6\n     &&op_strncasecmp(mime_type,\"image/\",mime_type_length)==0)){\n      if(op_is_jpeg(_buf+i,data_length))format=OP_PIC_FORMAT_JPEG;\n      else if(op_is_png(_buf+i,data_length))format=OP_PIC_FORMAT_PNG;\n      else if(op_is_gif(_buf+i,data_length))format=OP_PIC_FORMAT_GIF;\n    }\n    file_width=file_height=file_depth=file_colors=0;\n    has_palette=-1;\n    switch(format){\n      case OP_PIC_FORMAT_JPEG:{\n        op_extract_jpeg_params(_buf+i,data_length,\n         &file_width,&file_height,&file_depth,&file_colors,&has_palette);\n      }break;\n      case OP_PIC_FORMAT_PNG:{\n        op_extract_png_params(_buf+i,data_length,\n         &file_width,&file_height,&file_depth,&file_colors,&has_palette);\n      }break;\n      case OP_PIC_FORMAT_GIF:{\n        op_extract_gif_params(_buf+i,data_length,\n         &file_width,&file_height,&file_depth,&file_colors,&has_palette);\n      }break;\n    }\n    if(has_palette>=0){\n      /*If we successfully extracted these parameters from the image, override\n         any declared values.*/\n      width=file_width;\n      height=file_height;\n      depth=file_depth;\n      colors=file_colors;\n    }\n    /*Picture type 1 must be a 32x32 PNG.*/\n    if(picture_type==1&&(format!=OP_PIC_FORMAT_PNG||width!=32||height!=32)){\n      return OP_ENOTFORMAT;\n    }\n  }\n  /*Adjust _buf_sz instead of using data_length to capture the terminating NUL\n     for URLs.*/\n  _buf_sz-=i;\n  memmove(_buf,_buf+i,sizeof(*_buf)*_buf_sz);\n  _buf=(unsigned char *)_ogg_realloc(_buf,_buf_sz);\n  if(_buf_sz>0&&_buf==NULL)return OP_EFAULT;\n  _pic->type=picture_type;\n  _pic->width=width;\n  _pic->height=height;\n  _pic->depth=depth;\n  _pic->colors=colors;\n  _pic->data_length=data_length;\n  _pic->data=_buf;\n  _pic->format=format;\n  return 0;\n}\n\nint opus_picture_tag_parse(OpusPictureTag *_pic,const char *_tag){\n  OpusPictureTag  pic;\n  unsigned char  *buf;\n  size_t          base64_sz;\n  size_t          buf_sz;\n  size_t          tag_length;\n  int             ret;\n  if(opus_tagncompare(\"METADATA_BLOCK_PICTURE\",22,_tag)==0)_tag+=23;\n  /*Figure out how much BASE64-encoded data we have.*/\n  tag_length=strlen(_tag);\n  if(tag_length&3)return OP_ENOTFORMAT;\n  base64_sz=tag_length>>2;\n  buf_sz=3*base64_sz;\n  if(buf_sz<32)return OP_ENOTFORMAT;\n  if(_tag[tag_length-1]=='=')buf_sz--;\n  if(_tag[tag_length-2]=='=')buf_sz--;\n  if(buf_sz<32)return OP_ENOTFORMAT;\n  /*Allocate an extra byte to allow appending a terminating NUL to URL data.*/\n  buf=(unsigned char *)_ogg_malloc(sizeof(*buf)*(buf_sz+1));\n  if(buf==NULL)return OP_EFAULT;\n  opus_picture_tag_init(&pic);\n  ret=opus_picture_tag_parse_impl(&pic,_tag,buf,buf_sz,base64_sz);\n  if(ret<0){\n    opus_picture_tag_clear(&pic);\n    _ogg_free(buf);\n  }\n  else *_pic=*&pic;\n  return ret;\n}\n\nvoid opus_picture_tag_init(OpusPictureTag *_pic){\n  memset(_pic,0,sizeof(*_pic));\n}\n\nvoid opus_picture_tag_clear(OpusPictureTag *_pic){\n  _ogg_free(_pic->description);\n  _ogg_free(_pic->mime_type);\n  _ogg_free(_pic->data);\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/opusfile/internal.c",
    "content": "/********************************************************************\n *                                                                  *\n * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *\n * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *\n * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *\n * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *\n *                                                                  *\n * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2012                *\n * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *\n *                                                                  *\n ********************************************************************/\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"internal.h\"\n\n#if defined(OP_ENABLE_ASSERTIONS)\nvoid op_fatal_impl(const char *_str,const char *_file,int _line){\n  fprintf(stderr,\"Fatal (internal) error in %s, line %i: %s\\n\",\n   _file,_line,_str);\n  abort();\n}\n#endif\n\n/*A version of strncasecmp() that is guaranteed to only ignore the case of\n   ASCII characters.*/\nint op_strncasecmp(const char *_a,const char *_b,int _n){\n  int i;\n  for(i=0;i<_n;i++){\n    int a;\n    int b;\n    int d;\n    a=_a[i];\n    b=_b[i];\n    if(a>='a'&&a<='z')a-='a'-'A';\n    if(b>='a'&&b<='z')b-='a'-'A';\n    d=a-b;\n    if(d)return d;\n  }\n  return 0;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/opusfile/internal.h",
    "content": "/********************************************************************\n *                                                                  *\n * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *\n * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *\n * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *\n * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *\n *                                                                  *\n * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2012                *\n * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *\n *                                                                  *\n ********************************************************************/\n#if !defined(_opusfile_internal_h)\n# define _opusfile_internal_h (1)\n\n# if !defined(_REENTRANT)\n#  define _REENTRANT\n# endif\n# if !defined(_GNU_SOURCE)\n#  define _GNU_SOURCE\n# endif\n# if !defined(_LARGEFILE_SOURCE)\n#  define _LARGEFILE_SOURCE\n# endif\n# if !defined(_LARGEFILE64_SOURCE)\n#  define _LARGEFILE64_SOURCE\n# endif\n# if !defined(_FILE_OFFSET_BITS)\n#  define _FILE_OFFSET_BITS 64\n# endif\n\n# include <stdlib.h>\n# include \"opusfile.h\"\n\ntypedef struct OggOpusLink OggOpusLink;\n\n# if defined(OP_FIXED_POINT)\n\ntypedef opus_int16 op_sample;\n\n# else\n\ntypedef float      op_sample;\n\n/*We're using this define to test for libopus 1.1 or later until libopus\n   provides a better mechanism.*/\n#  if defined(OPUS_GET_EXPERT_FRAME_DURATION_REQUEST)\n/*Enable soft clipping prevention in 16-bit decodes.*/\n#   define OP_SOFT_CLIP (1)\n#  endif\n\n# endif\n\n# if OP_GNUC_PREREQ(4,2)\n/*Disable excessive warnings about the order of operations.*/\n#  pragma GCC diagnostic ignored \"-Wparentheses\"\n# elif defined(_MSC_VER)\n/*Disable excessive warnings about the order of operations.*/\n#  pragma warning(disable:4554)\n/*Disable warnings about \"deprecated\" POSIX functions.*/\n#  pragma warning(disable:4996)\n# endif\n\n# if OP_GNUC_PREREQ(3,0)\n/*Another alternative is\n    (__builtin_constant_p(_x)?!!(_x):__builtin_expect(!!(_x),1))\n   but that evaluates _x multiple times, which may be bad.*/\n#  define OP_LIKELY(_x) (__builtin_expect(!!(_x),1))\n#  define OP_UNLIKELY(_x) (__builtin_expect(!!(_x),0))\n# else\n#  define OP_LIKELY(_x)   (!!(_x))\n#  define OP_UNLIKELY(_x) (!!(_x))\n# endif\n\n# if defined(OP_ENABLE_ASSERTIONS)\n#  if OP_GNUC_PREREQ(2,5)||__SUNPRO_C>=0x590\n__attribute__((noreturn))\n#  endif\nvoid op_fatal_impl(const char *_str,const char *_file,int _line);\n\n#  define OP_FATAL(_str) (op_fatal_impl(_str,__FILE__,__LINE__))\n\n#  define OP_ASSERT(_cond) \\\n  do{ \\\n    if(OP_UNLIKELY(!(_cond)))OP_FATAL(\"assertion failed: \" #_cond); \\\n  } \\\n  while(0)\n#  define OP_ALWAYS_TRUE(_cond) OP_ASSERT(_cond)\n\n# else\n#  define OP_FATAL(_str) abort()\n#  define OP_ASSERT(_cond)\n#  define OP_ALWAYS_TRUE(_cond) ((void)(_cond))\n# endif\n\n# define OP_INT64_MAX (2*(((ogg_int64_t)1<<62)-1)|1)\n# define OP_INT64_MIN (-OP_INT64_MAX-1)\n# define OP_INT32_MAX (2*(((ogg_int32_t)1<<30)-1)|1)\n# define OP_INT32_MIN (-OP_INT32_MAX-1)\n\n# define OP_MIN(_a,_b)        ((_a)<(_b)?(_a):(_b))\n# define OP_MAX(_a,_b)        ((_a)>(_b)?(_a):(_b))\n# define OP_CLAMP(_lo,_x,_hi) (OP_MAX(_lo,OP_MIN(_x,_hi)))\n\n/*Advance a file offset by the given amount, clamping against OP_INT64_MAX.\n  This is used to advance a known offset by things like OP_CHUNK_SIZE or\n   OP_PAGE_SIZE_MAX, while making sure to avoid signed overflow.\n  It assumes that both _offset and _amount are non-negative.*/\n#define OP_ADV_OFFSET(_offset,_amount) \\\n (OP_MIN(_offset,OP_INT64_MAX-(_amount))+(_amount))\n\n/*The maximum channel count for any mapping we'll actually decode.*/\n# define OP_NCHANNELS_MAX (8)\n\n/*Initial state.*/\n# define  OP_NOTOPEN   (0)\n/*We've found the first Opus stream in the first link.*/\n# define  OP_PARTOPEN  (1)\n# define  OP_OPENED    (2)\n/*We've found the first Opus stream in the current link.*/\n# define  OP_STREAMSET (3)\n/*We've initialized the decoder for the chosen Opus stream in the current\n   link.*/\n# define  OP_INITSET   (4)\n\n/*Information cached for a single link in a chained Ogg Opus file.\n  We choose the first Opus stream encountered in each link to play back (and\n   require at least one).*/\nstruct OggOpusLink{\n  /*The byte offset of the first header page in this link.*/\n  opus_int64   offset;\n  /*The byte offset of the first data page from the chosen Opus stream in this\n     link (after the headers).*/\n  opus_int64   data_offset;\n  /*The byte offset of the last page from the chosen Opus stream in this link.\n    This is used when seeking to ensure we find a page before the last one, so\n     that end-trimming calculations work properly.\n    This is only valid for seekable sources.*/\n  opus_int64   end_offset;\n  /*The granule position of the last sample.\n    This is only valid for seekable sources.*/\n  ogg_int64_t  pcm_end;\n  /*The granule position before the first sample.*/\n  ogg_int64_t  pcm_start;\n  /*The serial number.*/\n  ogg_uint32_t serialno;\n  /*The contents of the info header.*/\n  OpusHead     head;\n  /*The contents of the comment header.*/\n  OpusTags     tags;\n};\n\nstruct OggOpusFile{\n  /*The callbacks used to access the data source.*/\n  OpusFileCallbacks  callbacks;\n  /*A FILE *, memory bufer, etc.*/\n  void              *source;\n  /*Whether or not we can seek with this data source.*/\n  int                seekable;\n  /*The number of links in this chained Ogg Opus file.*/\n  int                nlinks;\n  /*The cached information from each link in a chained Ogg Opus file.\n    If source isn't seekable (e.g., it's a pipe), only the current link\n     appears.*/\n  OggOpusLink       *links;\n  /*The number of serial numbers from a single link.*/\n  int                nserialnos;\n  /*The capacity of the list of serial numbers from a single link.*/\n  int                cserialnos;\n  /*Storage for the list of serial numbers from a single link.*/\n  ogg_uint32_t      *serialnos;\n  /*This is the current offset of the data processed by the ogg_sync_state.\n    After a seek, this should be set to the target offset so that we can track\n     the byte offsets of subsequent pages.\n    After a call to op_get_next_page(), this will point to the first byte after\n     that page.*/\n  opus_int64         offset;\n  /*The total size of this data source, or -1 if it's unseekable.*/\n  opus_int64         end;\n  /*Used to locate pages in the data source.*/\n  ogg_sync_state     oy;\n  /*One of OP_NOTOPEN, OP_PARTOPEN, OP_OPENED, OP_STREAMSET, OP_INITSET.*/\n  int                ready_state;\n  /*The current link being played back.*/\n  int                cur_link;\n  /*The number of decoded samples to discard from the start of decoding.*/\n  opus_int32         cur_discard_count;\n  /*The granule position of the previous packet (current packet start time).*/\n  ogg_int64_t        prev_packet_gp;\n  /*The number of bytes read since the last bitrate query, including framing.*/\n  opus_int64         bytes_tracked;\n  /*The number of samples decoded since the last bitrate query.*/\n  ogg_int64_t        samples_tracked;\n  /*Takes physical pages and welds them into a logical stream of packets.*/\n  ogg_stream_state   os;\n  /*Re-timestamped packets from a single page.\n    Buffering these relies on the undocumented libogg behavior that ogg_packet\n     pointers remain valid until the next page is submitted to the\n     ogg_stream_state they came from.*/\n  ogg_packet         op[255];\n  /*The index of the next packet to return.*/\n  int                op_pos;\n  /*The total number of packets available.*/\n  int                op_count;\n  /*Central working state for the packet-to-PCM decoder.*/\n  OpusMSDecoder     *od;\n  /*The application-provided packet decode callback.*/\n  op_decode_cb_func  decode_cb;\n  /*The application-provided packet decode callback context.*/\n  void              *decode_cb_ctx;\n  /*The stream count used to initialize the decoder.*/\n  int                od_stream_count;\n  /*The coupled stream count used to initialize the decoder.*/\n  int                od_coupled_count;\n  /*The channel count used to initialize the decoder.*/\n  int                od_channel_count;\n  /*The channel mapping used to initialize the decoder.*/\n  unsigned char      od_mapping[OP_NCHANNELS_MAX];\n  /*The buffered data for one decoded packet.*/\n  op_sample         *od_buffer;\n  /*The current position in the decoded buffer.*/\n  int                od_buffer_pos;\n  /*The number of valid samples in the decoded buffer.*/\n  int                od_buffer_size;\n  /*The type of gain offset to apply.\n    One of OP_HEADER_GAIN, OP_TRACK_GAIN, or OP_ABSOLUTE_GAIN.*/\n  int                gain_type;\n  /*The offset to apply to the gain.*/\n  opus_int32         gain_offset_q8;\n  /*Internal state for soft clipping and dithering float->short output.*/\n#if !defined(OP_FIXED_POINT)\n# if defined(OP_SOFT_CLIP)\n  float              clip_state[OP_NCHANNELS_MAX];\n# endif\n  float              dither_a[OP_NCHANNELS_MAX*4];\n  float              dither_b[OP_NCHANNELS_MAX*4];\n  opus_uint32        dither_seed;\n  int                dither_mute;\n  int                dither_disabled;\n  /*The number of channels represented by the internal state.\n    This gets set to 0 whenever anything that would prevent state propagation\n     occurs (switching between the float/short APIs, or between the\n     stereo/multistream APIs).*/\n  int                state_channel_count;\n#endif\n};\n\nint op_strncasecmp(const char *_a,const char *_b,int _n);\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/opusfile/opusfile.c",
    "content": "/********************************************************************\n *                                                                  *\n * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *\n * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *\n * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *\n * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *\n *                                                                  *\n * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 1994-2012           *\n * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *\n *                                                                  *\n ********************************************************************\n\n function: stdio-based convenience library for opening/seeking/decoding\n last mod: $Id: vorbisfile.c 17573 2010-10-27 14:53:59Z xiphmont $\n\n ********************************************************************/\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"internal.h\"\n#include <stdio.h>\n#include <stdlib.h>\n#include <errno.h>\n#include <limits.h>\n#include <string.h>\n#include <math.h>\n\n#include \"opusfile.h\"\n\n/*This implementation is largely based off of libvorbisfile.\n  All of the Ogg bits work roughly the same, though I have made some\n   \"improvements\" that have not been folded back there, yet.*/\n\n/*A 'chained bitstream' is an Ogg Opus bitstream that contains more than one\n   logical bitstream arranged end to end (the only form of Ogg multiplexing\n   supported by this library.\n  Grouping (parallel multiplexing) is not supported, except to the extent that\n   if there are multiple logical Ogg streams in a single link of the chain, we\n   will ignore all but the first Opus stream we find.*/\n\n/*An Ogg Opus file can be played beginning to end (streamed) without worrying\n   ahead of time about chaining (see opusdec from the opus-tools package).\n  If we have the whole file, however, and want random access\n   (seeking/scrubbing) or desire to know the total length/time of a file, we\n   need to account for the possibility of chaining.*/\n\n/*We can handle things a number of ways.\n  We can determine the entire bitstream structure right off the bat, or find\n   pieces on demand.\n  This library determines and caches structure for the entire bitstream, but\n   builds a virtual decoder on the fly when moving between links in the chain.*/\n\n/*There are also different ways to implement seeking.\n  Enough information exists in an Ogg bitstream to seek to sample-granularity\n   positions in the output.\n  Or, one can seek by picking some portion of the stream roughly in the desired\n   area if we only want coarse navigation through the stream.\n  We implement and expose both strategies.*/\n\n/*The maximum number of bytes in a page (including the page headers).*/\n#define OP_PAGE_SIZE_MAX  (65307)\n/*The default amount to seek backwards per step when trying to find the\n   previous page.\n  This must be at least as large as the maximum size of a page.*/\n#define OP_CHUNK_SIZE     (65536)\n/*The maximum amount to seek backwards per step when trying to find the\n   previous page.*/\n#define OP_CHUNK_SIZE_MAX (1024*(opus_int32)1024)\n/*A smaller read size is needed for low-rate streaming.*/\n#define OP_READ_SIZE      (2048)\n\nint op_test(OpusHead *_head,\n const unsigned char *_initial_data,size_t _initial_bytes){\n  ogg_sync_state  oy;\n  char           *data;\n  int             err;\n  /*The first page of a normal Opus file will be at most 57 bytes (27 Ogg\n     page header bytes + 1 lacing value + 21 Opus header bytes + 8 channel\n     mapping bytes).\n    It will be at least 47 bytes (27 Ogg page header bytes + 1 lacing value +\n     19 Opus header bytes using channel mapping family 0).\n    If we don't have at least that much data, give up now.*/\n  if(_initial_bytes<47)return OP_FALSE;\n  /*Only proceed if we start with the magic OggS string.\n    This is to prevent us spending a lot of time allocating memory and looking\n     for Ogg pages in non-Ogg files.*/\n  if(memcmp(_initial_data,\"OggS\",4)!=0)return OP_ENOTFORMAT;\n  ogg_sync_init(&oy);\n  data=ogg_sync_buffer(&oy,_initial_bytes);\n  if(data!=NULL){\n    ogg_stream_state os;\n    ogg_page         og;\n    int              ret;\n    memcpy(data,_initial_data,_initial_bytes);\n    ogg_sync_wrote(&oy,_initial_bytes);\n    ogg_stream_init(&os,-1);\n    err=OP_FALSE;\n    do{\n      ogg_packet op;\n      ret=ogg_sync_pageout(&oy,&og);\n      /*Ignore holes.*/\n      if(ret<0)continue;\n      /*Stop if we run out of data.*/\n      if(!ret)break;\n      ogg_stream_reset_serialno(&os,ogg_page_serialno(&og));\n      ogg_stream_pagein(&os,&og);\n      /*Only process the first packet on this page (if it's a BOS packet,\n         it's required to be the only one).*/\n      if(ogg_stream_packetout(&os,&op)==1){\n        if(op.b_o_s){\n          ret=opus_head_parse(_head,op.packet,op.bytes);\n          /*If this didn't look like Opus, keep going.*/\n          if(ret==OP_ENOTFORMAT)continue;\n          /*Otherwise we're done, one way or another.*/\n          err=ret;\n        }\n        /*We finished parsing the headers.\n          There is no Opus to be found.*/\n        else err=OP_ENOTFORMAT;\n      }\n    }\n    while(err==OP_FALSE);\n    ogg_stream_clear(&os);\n  }\n  else err=OP_EFAULT;\n  ogg_sync_clear(&oy);\n  return err;\n}\n\n/*Many, many internal helpers.\n  The intention is not to be confusing.\n  Rampant duplication and monolithic function implementation (though we do have\n   some large, omnibus functions still) would be harder to understand anyway.\n  The high level functions are last.\n  Begin grokking near the end of the file if you prefer to read things\n   top-down.*/\n\n/*The read/seek functions track absolute position within the stream.*/\n\n/*Read a little more data from the file/pipe into the ogg_sync framer.\n  _nbytes: The maximum number of bytes to read.\n  Return: A positive number of bytes read on success, 0 on end-of-file, or a\n           negative value on failure.*/\nstatic int op_get_data(OggOpusFile *_of,int _nbytes){\n  unsigned char *buffer;\n  int            nbytes;\n  OP_ASSERT(_nbytes>0);\n  buffer=(unsigned char *)ogg_sync_buffer(&_of->oy,_nbytes);\n  nbytes=(int)(*_of->callbacks.read)(_of->source,buffer,_nbytes);\n  OP_ASSERT(nbytes<=_nbytes);\n  if(OP_LIKELY(nbytes>0))ogg_sync_wrote(&_of->oy,nbytes);\n  return nbytes;\n}\n\n/*Save a tiny smidge of verbosity to make the code more readable.*/\nstatic int op_seek_helper(OggOpusFile *_of,opus_int64 _offset){\n  if(_offset==_of->offset)return 0;\n  if(_of->callbacks.seek==NULL||\n   (*_of->callbacks.seek)(_of->source,_offset,SEEK_SET)){\n    return OP_EREAD;\n  }\n  _of->offset=_offset;\n  ogg_sync_reset(&_of->oy);\n  return 0;\n}\n\n/*Get the current position indicator of the underlying source.\n  This should be the same as the value reported by tell().*/\nstatic opus_int64 op_position(const OggOpusFile *_of){\n  /*The current position indicator is _not_ simply offset.\n    We may also have unprocessed, buffered data in the sync state.*/\n  return _of->offset+_of->oy.fill-_of->oy.returned;\n}\n\n/*From the head of the stream, get the next page.\n  _boundary specifies if the function is allowed to fetch more data from the\n   stream (and how much) or only use internally buffered data.\n  _boundary: -1: Unbounded search.\n              0: Read no additional data.\n                 Use only cached data.\n              n: Search for the start of a new page up to file position n.\n  Return: n>=0:       Found a page at absolute offset n.\n          OP_FALSE:   Hit the _boundary limit.\n          OP_EREAD:   An underlying read operation failed.\n          OP_BADLINK: We hit end-of-file before reaching _boundary.*/\nstatic opus_int64 op_get_next_page(OggOpusFile *_of,ogg_page *_og,\n opus_int64 _boundary){\n  while(_boundary<=0||_of->offset<_boundary){\n    int more;\n    more=ogg_sync_pageseek(&_of->oy,_og);\n    /*Skipped (-more) bytes.*/\n    if(OP_UNLIKELY(more<0))_of->offset-=more;\n    else if(more==0){\n      int read_nbytes;\n      int ret;\n      /*Send more paramedics.*/\n      if(!_boundary)return OP_FALSE;\n      if(_boundary<0)read_nbytes=OP_READ_SIZE;\n      else{\n        opus_int64 position;\n        position=op_position(_of);\n        if(position>=_boundary)return OP_FALSE;\n        read_nbytes=(int)OP_MIN(_boundary-position,OP_READ_SIZE);\n      }\n      ret=op_get_data(_of,read_nbytes);\n      if(OP_UNLIKELY(ret<0))return OP_EREAD;\n      if(OP_UNLIKELY(ret==0)){\n        /*Only fail cleanly on EOF if we didn't have a known boundary.\n          Otherwise, we should have been able to reach that boundary, and this\n           is a fatal error.*/\n        return OP_UNLIKELY(_boundary<0)?OP_FALSE:OP_EBADLINK;\n      }\n    }\n    else{\n      /*Got a page.\n        Return the page start offset and advance the internal offset past the\n         page end.*/\n      opus_int64 page_offset;\n      page_offset=_of->offset;\n      _of->offset+=more;\n      OP_ASSERT(page_offset>=0);\n      return page_offset;\n    }\n  }\n  return OP_FALSE;\n}\n\nstatic int op_add_serialno(const ogg_page *_og,\n ogg_uint32_t **_serialnos,int *_nserialnos,int *_cserialnos){\n  ogg_uint32_t *serialnos;\n  int           nserialnos;\n  int           cserialnos;\n  ogg_uint32_t s;\n  s=ogg_page_serialno(_og);\n  serialnos=*_serialnos;\n  nserialnos=*_nserialnos;\n  cserialnos=*_cserialnos;\n  if(OP_UNLIKELY(nserialnos>=cserialnos)){\n    if(OP_UNLIKELY(cserialnos>INT_MAX-1>>1))return OP_EFAULT;\n    cserialnos=2*cserialnos+1;\n    OP_ASSERT(nserialnos<cserialnos);\n    serialnos=(ogg_uint32_t *)_ogg_realloc(serialnos,\n     sizeof(*serialnos)*cserialnos);\n    if(OP_UNLIKELY(serialnos==NULL))return OP_EFAULT;\n  }\n  serialnos[nserialnos++]=s;\n  *_serialnos=serialnos;\n  *_nserialnos=nserialnos;\n  *_cserialnos=cserialnos;\n  return 0;\n}\n\n/*Returns nonzero if found.*/\nstatic int op_lookup_serialno(ogg_uint32_t _s,\n const ogg_uint32_t *_serialnos,int _nserialnos){\n  int i;\n  for(i=0;i<_nserialnos&&_serialnos[i]!=_s;i++);\n  return i<_nserialnos;\n}\n\nstatic int op_lookup_page_serialno(const ogg_page *_og,\n const ogg_uint32_t *_serialnos,int _nserialnos){\n  return op_lookup_serialno(ogg_page_serialno(_og),_serialnos,_nserialnos);\n}\n\ntypedef struct OpusSeekRecord OpusSeekRecord;\n\n/*We use this to remember the pages we found while enumerating the links of a\n   chained stream.\n  We keep track of the starting and ending offsets, as well as the point we\n   started searching from, so we know where to bisect.\n  We also keep the serial number, so we can tell if the page belonged to the\n   current link or not, as well as the granule position, to aid in estimating\n   the start of the link.*/\nstruct OpusSeekRecord{\n  /*The earliest byte we know of such that reading forward from it causes\n     capture to be regained at this page.*/\n  opus_int64   search_start;\n  /*The offset of this page.*/\n  opus_int64   offset;\n  /*The size of this page.*/\n  opus_int32   size;\n  /*The serial number of this page.*/\n  ogg_uint32_t serialno;\n  /*The granule position of this page.*/\n  ogg_int64_t  gp;\n};\n\n/*Find the last page beginning before _offset with a valid granule position.\n  There is no '_boundary' parameter as it will always have to read more data.\n  This is much dirtier than the above, as Ogg doesn't have any backward search\n   linkage.\n  This search prefers pages of the specified serial number.\n  If a page of the specified serial number is spotted during the\n   seek-back-and-read-forward, it will return the info of last page of the\n   matching serial number, instead of the very last page, unless the very last\n   page belongs to a different link than preferred serial number.\n  If no page of the specified serial number is seen, it will return the info of\n   the last page.\n  [out] _sr:   Returns information about the page that was found on success.\n  _offset:     The _offset before which to find a page.\n               Any page returned will consist of data entirely before _offset.\n  _serialno:   The preferred serial number.\n               If a page with this serial number is found, it will be returned\n                even if another page in the same link is found closer to\n                _offset.\n               This is purely opportunistic: there is no guarantee such a page\n                will be found if it exists.\n  _serialnos:  The list of serial numbers in the link that contains the\n                preferred serial number.\n  _nserialnos: The number of serial numbers in the current link.\n  Return: 0 on success, or a negative value on failure.\n          OP_EREAD:    Failed to read more data (error or EOF).\n          OP_EBADLINK: We couldn't find a page even after seeking back to the\n                        start of the stream.*/\nstatic int op_get_prev_page_serial(OggOpusFile *_of,OpusSeekRecord *_sr,\n opus_int64 _offset,ogg_uint32_t _serialno,\n const ogg_uint32_t *_serialnos,int _nserialnos){\n  OpusSeekRecord preferred_sr;\n  ogg_page       og;\n  opus_int64     begin;\n  opus_int64     end;\n  opus_int64     original_end;\n  opus_int32     chunk_size;\n  int            preferred_found;\n  original_end=end=begin=_offset;\n  preferred_found=0;\n  _offset=-1;\n  chunk_size=OP_CHUNK_SIZE;\n  do{\n    opus_int64 search_start;\n    int        ret;\n    OP_ASSERT(chunk_size>=OP_PAGE_SIZE_MAX);\n    begin=OP_MAX(begin-chunk_size,0);\n    ret=op_seek_helper(_of,begin);\n    if(OP_UNLIKELY(ret<0))return ret;\n    search_start=begin;\n    while(_of->offset<end){\n      opus_int64   llret;\n      ogg_uint32_t serialno;\n      llret=op_get_next_page(_of,&og,end);\n      if(OP_UNLIKELY(llret<OP_FALSE))return (int)llret;\n      else if(llret==OP_FALSE)break;\n      serialno=ogg_page_serialno(&og);\n      /*Save the information for this page.\n        We're not interested in the page itself... just the serial number, byte\n         offset, page size, and granule position.*/\n      _sr->search_start=search_start;\n      _sr->offset=_offset=llret;\n      _sr->serialno=serialno;\n      OP_ASSERT(_of->offset-_offset>=0);\n      OP_ASSERT(_of->offset-_offset<=OP_PAGE_SIZE_MAX);\n      _sr->size=(opus_int32)(_of->offset-_offset);\n      _sr->gp=ogg_page_granulepos(&og);\n      /*If this page is from the stream we're looking for, remember it.*/\n      if(serialno==_serialno){\n        preferred_found=1;\n        *&preferred_sr=*_sr;\n      }\n      if(!op_lookup_serialno(serialno,_serialnos,_nserialnos)){\n        /*We fell off the end of the link, which means we seeked back too far\n           and shouldn't have been looking in that link to begin with.\n          If we found the preferred serial number, forget that we saw it.*/\n        preferred_found=0;\n      }\n      search_start=llret+1;\n    }\n    /*We started from the beginning of the stream and found nothing.\n      This should be impossible unless the contents of the source changed out\n       from under us after we read from it.*/\n    if(OP_UNLIKELY(!begin)&&OP_UNLIKELY(_offset<0))return OP_EBADLINK;\n    /*Bump up the chunk size.\n      This is mildly helpful when seeks are very expensive (http).*/\n    chunk_size=OP_MIN(2*chunk_size,OP_CHUNK_SIZE_MAX);\n    /*Avoid quadratic complexity if we hit an invalid patch of the file.*/\n    end=OP_MIN(begin+OP_PAGE_SIZE_MAX-1,original_end);\n  }\n  while(_offset<0);\n  if(preferred_found)*_sr=*&preferred_sr;\n  return 0;\n}\n\n/*Find the last page beginning before _offset with the given serial number and\n   a valid granule position.\n  Unlike the above search, this continues until it finds such a page, but does\n   not stray outside the current link.\n  We could implement it (inefficiently) by calling op_get_prev_page_serial()\n   repeatedly until it returned a page that had both our preferred serial\n   number and a valid granule position, but doing it with a separate function\n   allows us to avoid repeatedly re-scanning valid pages from other streams as\n   we seek-back-and-read-forward.\n  [out] _gp:   Returns the granule position of the page that was found on\n                success.\n  _offset:     The _offset before which to find a page.\n               Any page returned will consist of data entirely before _offset.\n  _serialno:   The target serial number.\n  _serialnos:  The list of serial numbers in the link that contains the\n                preferred serial number.\n  _nserialnos: The number of serial numbers in the current link.\n  Return: The offset of the page on success, or a negative value on failure.\n          OP_EREAD:    Failed to read more data (error or EOF).\n          OP_EBADLINK: We couldn't find a page even after seeking back past the\n                        beginning of the link.*/\nstatic opus_int64 op_get_last_page(OggOpusFile *_of,ogg_int64_t *_gp,\n opus_int64 _offset,ogg_uint32_t _serialno,\n const ogg_uint32_t *_serialnos,int _nserialnos){\n  ogg_page    og;\n  ogg_int64_t gp;\n  opus_int64  begin;\n  opus_int64  end;\n  opus_int64  original_end;\n  opus_int32  chunk_size;\n  /*The target serial number must belong to the current link.*/\n  OP_ASSERT(op_lookup_serialno(_serialno,_serialnos,_nserialnos));\n  original_end=end=begin=_offset;\n  _offset=-1;\n  /*We shouldn't have to initialize gp, but gcc is too dumb to figure out that\n     ret>=0 implies we entered the if(page_gp!=-1) block at least once.*/\n  gp=-1;\n  chunk_size=OP_CHUNK_SIZE;\n  do{\n    int left_link;\n    int ret;\n    OP_ASSERT(chunk_size>=OP_PAGE_SIZE_MAX);\n    begin=OP_MAX(begin-chunk_size,0);\n    ret=op_seek_helper(_of,begin);\n    if(OP_UNLIKELY(ret<0))return ret;\n    left_link=0;\n    while(_of->offset<end){\n      opus_int64   llret;\n      ogg_uint32_t serialno;\n      llret=op_get_next_page(_of,&og,end);\n      if(OP_UNLIKELY(llret<OP_FALSE))return llret;\n      else if(llret==OP_FALSE)break;\n      serialno=ogg_page_serialno(&og);\n      if(serialno==_serialno){\n        ogg_int64_t page_gp;\n        /*The page is from the right stream...*/\n        page_gp=ogg_page_granulepos(&og);\n        if(page_gp!=-1){\n          /*And has a valid granule position.\n            Let's remember it.*/\n          _offset=llret;\n          gp=page_gp;\n        }\n      }\n      else if(OP_UNLIKELY(!op_lookup_serialno(serialno,\n       _serialnos,_nserialnos))){\n        /*We fell off the start of the link, which means we don't need to keep\n           seeking any farther back.*/\n        left_link=1;\n      }\n    }\n    /*We started from at or before the beginning of the link and found nothing.\n      This should be impossible unless the contents of the source changed out\n       from under us after we read from it.*/\n    if((OP_UNLIKELY(left_link)||OP_UNLIKELY(!begin))&&OP_UNLIKELY(_offset<0)){\n      return OP_EBADLINK;\n    }\n    /*Bump up the chunk size.\n      This is mildly helpful when seeks are very expensive (http).*/\n    chunk_size=OP_MIN(2*chunk_size,OP_CHUNK_SIZE_MAX);\n    /*Avoid quadratic complexity if we hit an invalid patch of the file.*/\n    end=OP_MIN(begin+OP_PAGE_SIZE_MAX-1,original_end);\n  }\n  while(_offset<0);\n  *_gp=gp;\n  return _offset;\n}\n\n/*Uses the local ogg_stream storage in _of.\n  This is important for non-streaming input sources.*/\nstatic int op_fetch_headers_impl(OggOpusFile *_of,OpusHead *_head,\n OpusTags *_tags,ogg_uint32_t **_serialnos,int *_nserialnos,\n int *_cserialnos,ogg_page *_og){\n  ogg_packet op;\n  int        ret;\n  if(_serialnos!=NULL)*_nserialnos=0;\n  /*Extract the serialnos of all BOS pages plus the first set of Opus headers\n     we see in the link.*/\n  while(ogg_page_bos(_og)){\n    if(_serialnos!=NULL){\n      if(OP_UNLIKELY(op_lookup_page_serialno(_og,*_serialnos,*_nserialnos))){\n        /*A dupe serialnumber in an initial header packet set==invalid stream.*/\n        return OP_EBADHEADER;\n      }\n      ret=op_add_serialno(_og,_serialnos,_nserialnos,_cserialnos);\n      if(OP_UNLIKELY(ret<0))return ret;\n    }\n    if(_of->ready_state<OP_STREAMSET){\n      /*We don't have an Opus stream in this link yet, so begin prospective\n         stream setup.\n        We need a stream to get packets.*/\n      ogg_stream_reset_serialno(&_of->os,ogg_page_serialno(_og));\n      ogg_stream_pagein(&_of->os,_og);\n      if(OP_LIKELY(ogg_stream_packetout(&_of->os,&op)>0)){\n        ret=opus_head_parse(_head,op.packet,op.bytes);\n        /*If it's just a stream type we don't recognize, ignore it.*/\n        if(ret==OP_ENOTFORMAT)continue;\n        /*Everything else is fatal.*/\n        if(OP_UNLIKELY(ret<0))return ret;\n        /*Found a valid Opus header.\n          Continue setup.*/\n        _of->ready_state=OP_STREAMSET;\n      }\n    }\n    /*Get the next page.\n      No need to clamp the boundary offset against _of->end, as all errors\n       become OP_ENOTFORMAT.*/\n    if(OP_UNLIKELY(op_get_next_page(_of,_og,\n     OP_ADV_OFFSET(_of->offset,OP_CHUNK_SIZE))<0)){\n      return OP_ENOTFORMAT;\n    }\n    /*If this page also belongs to our Opus stream, submit it and break.*/\n    if(_of->ready_state==OP_STREAMSET\n     &&_of->os.serialno==ogg_page_serialno(_og)){\n      ogg_stream_pagein(&_of->os,_og);\n      break;\n    }\n  }\n  if(OP_UNLIKELY(_of->ready_state!=OP_STREAMSET))return OP_ENOTFORMAT;\n  /*Loop getting packets.*/\n  for(;;){\n    switch(ogg_stream_packetout(&_of->os,&op)){\n      case 0:{\n        /*Loop getting pages.*/\n        for(;;){\n          /*No need to clamp the boundary offset against _of->end, as all\n             errors become OP_EBADHEADER.*/\n          if(OP_UNLIKELY(op_get_next_page(_of,_og,\n           OP_ADV_OFFSET(_of->offset,OP_CHUNK_SIZE))<0)){\n            return OP_EBADHEADER;\n          }\n          /*If this page belongs to the correct stream, go parse it.*/\n          if(_of->os.serialno==ogg_page_serialno(_og)){\n            ogg_stream_pagein(&_of->os,_og);\n            break;\n          }\n          /*If the link ends before we see the Opus comment header, abort.*/\n          if(OP_UNLIKELY(ogg_page_bos(_og)))return OP_EBADHEADER;\n          /*Otherwise, keep looking.*/\n        }\n      }break;\n      /*We shouldn't get a hole in the headers!*/\n      case -1:return OP_EBADHEADER;\n      default:{\n        /*Got a packet.\n          It should be the comment header.*/\n        ret=opus_tags_parse(_tags,op.packet,op.bytes);\n        if(OP_UNLIKELY(ret<0))return ret;\n        /*Make sure the page terminated at the end of the comment header.\n          If there is another packet on the page, or part of a packet, then\n           reject the stream.\n          Otherwise seekable sources won't be able to seek back to the start\n           properly.*/\n        ret=ogg_stream_packetout(&_of->os,&op);\n        if(OP_UNLIKELY(ret!=0)\n         ||OP_UNLIKELY(_og->header[_og->header_len-1]==255)){\n          /*If we fail, the caller assumes our tags are uninitialized.*/\n          opus_tags_clear(_tags);\n          return OP_EBADHEADER;\n        }\n        return 0;\n      }\n    }\n  }\n}\n\nstatic int op_fetch_headers(OggOpusFile *_of,OpusHead *_head,\n OpusTags *_tags,ogg_uint32_t **_serialnos,int *_nserialnos,\n int *_cserialnos,ogg_page *_og){\n  ogg_page og;\n  int      ret;\n  if(!_og){\n    /*No need to clamp the boundary offset against _of->end, as all errors\n       become OP_ENOTFORMAT.*/\n    if(OP_UNLIKELY(op_get_next_page(_of,&og,\n     OP_ADV_OFFSET(_of->offset,OP_CHUNK_SIZE))<0)){\n      return OP_ENOTFORMAT;\n    }\n    _og=&og;\n  }\n  _of->ready_state=OP_OPENED;\n  ret=op_fetch_headers_impl(_of,_head,_tags,_serialnos,_nserialnos,\n   _cserialnos,_og);\n  /*Revert back from OP_STREAMSET to OP_OPENED on failure, to prevent\n     double-free of the tags in an unseekable stream.*/\n  if(OP_UNLIKELY(ret<0))_of->ready_state=OP_OPENED;\n  return ret;\n}\n\n/*Granule position manipulation routines.\n  A granule position is defined to be an unsigned 64-bit integer, with the\n   special value -1 in two's complement indicating an unset or invalid granule\n   position.\n  We are not guaranteed to have an unsigned 64-bit type, so we construct the\n   following routines that\n   a) Properly order negative numbers as larger than positive numbers, and\n   b) Check for underflow or overflow past the special -1 value.\n  This lets us operate on the full, valid range of granule positions in a\n   consistent and safe manner.\n  This full range is organized into distinct regions:\n   [ -1 (invalid) ][ 0 ... OP_INT64_MAX ][ OP_INT64_MIN ... -2 ][-1 (invalid) ]\n\n  No one should actually use granule positions so large that they're negative,\n   even if they are technically valid, as very little software handles them\n   correctly (including most of Xiph.Org's).\n  This library also refuses to support durations so large they won't fit in a\n   signed 64-bit integer (to avoid exposing this mess to the application, and\n   to simplify a good deal of internal arithmetic), so the only way to use them\n   successfully is if pcm_start is very large.\n  This means there isn't anything you can do with negative granule positions\n   that you couldn't have done with purely non-negative ones.\n  The main purpose of these routines is to allow us to think very explicitly\n   about the possible failure cases of all granule position manipulations.*/\n\n/*Safely adds a small signed integer to a valid (not -1) granule position.\n  The result can use the full 64-bit range of values (both positive and\n   negative), but will fail on overflow (wrapping past -1; wrapping past\n   OP_INT64_MAX is explicitly okay).\n  [out] _dst_gp: The resulting granule position.\n                 Only modified on success.\n  _src_gp:       The granule position to add to.\n                 This must not be -1.\n  _delta:        The amount to add.\n                 This is allowed to be up to 32 bits to support the maximum\n                  duration of a single Ogg page (255 packets * 120 ms per\n                  packet == 1,468,800 samples at 48 kHz).\n  Return: 0 on success, or OP_EINVAL if the result would wrap around past -1.*/\nstatic int op_granpos_add(ogg_int64_t *_dst_gp,ogg_int64_t _src_gp,\n opus_int32 _delta){\n  /*The code below handles this case correctly, but there's no reason we\n     should ever be called with these values, so make sure we aren't.*/\n  OP_ASSERT(_src_gp!=-1);\n  if(_delta>0){\n    /*Adding this amount to the granule position would overflow its 64-bit\n       range.*/\n    if(OP_UNLIKELY(_src_gp<0)&&OP_UNLIKELY(_src_gp>=-1-_delta))return OP_EINVAL;\n    if(OP_UNLIKELY(_src_gp>OP_INT64_MAX-_delta)){\n      /*Adding this amount to the granule position would overflow the positive\n         half of its 64-bit range.\n        Since signed overflow is undefined in C, do it in a way the compiler\n         isn't allowed to screw up.*/\n      _delta-=(opus_int32)(OP_INT64_MAX-_src_gp)+1;\n      _src_gp=OP_INT64_MIN;\n    }\n  }\n  else if(_delta<0){\n    /*Subtracting this amount from the granule position would underflow its\n       64-bit range.*/\n    if(_src_gp>=0&&OP_UNLIKELY(_src_gp<-_delta))return OP_EINVAL;\n    if(OP_UNLIKELY(_src_gp<OP_INT64_MIN-_delta)){\n      /*Subtracting this amount from the granule position would underflow the\n         negative half of its 64-bit range.\n        Since signed underflow is undefined in C, do it in a way the compiler\n         isn't allowed to screw up.*/\n      _delta+=(opus_int32)(_src_gp-OP_INT64_MIN)+1;\n      _src_gp=OP_INT64_MAX;\n    }\n  }\n  *_dst_gp=_src_gp+_delta;\n  return 0;\n}\n\n/*Safely computes the difference between two granule positions.\n  The difference must fit in a signed 64-bit integer, or the function fails.\n  It correctly handles the case where the granule position has wrapped around\n   from positive values to negative ones.\n  [out] _delta: The difference between the granule positions.\n                Only modified on success.\n  _gp_a:        The granule position to subtract from.\n                This must not be -1.\n  _gp_b:        The granule position to subtract.\n                This must not be -1.\n  Return: 0 on success, or OP_EINVAL if the result would not fit in a signed\n           64-bit integer.*/\nstatic int op_granpos_diff(ogg_int64_t *_delta,\n ogg_int64_t _gp_a,ogg_int64_t _gp_b){\n  int gp_a_negative;\n  int gp_b_negative;\n  /*The code below handles these cases correctly, but there's no reason we\n     should ever be called with these values, so make sure we aren't.*/\n  OP_ASSERT(_gp_a!=-1);\n  OP_ASSERT(_gp_b!=-1);\n  gp_a_negative=OP_UNLIKELY(_gp_a<0);\n  gp_b_negative=OP_UNLIKELY(_gp_b<0);\n  if(OP_UNLIKELY(gp_a_negative^gp_b_negative)){\n    ogg_int64_t da;\n    ogg_int64_t db;\n    if(gp_a_negative){\n      /*_gp_a has wrapped to a negative value but _gp_b hasn't: the difference\n         should be positive.*/\n      /*Step 1: Handle wrapping.*/\n      /*_gp_a < 0 => da < 0.*/\n      da=(OP_INT64_MIN-_gp_a)-1;\n      /*_gp_b >= 0  => db >= 0.*/\n      db=OP_INT64_MAX-_gp_b;\n      /*Step 2: Check for overflow.*/\n      if(OP_UNLIKELY(OP_INT64_MAX+da<db))return OP_EINVAL;\n      *_delta=db-da;\n    }\n    else{\n      /*_gp_b has wrapped to a negative value but _gp_a hasn't: the difference\n         should be negative.*/\n      /*Step 1: Handle wrapping.*/\n      /*_gp_a >= 0 => da <= 0*/\n      da=_gp_a+OP_INT64_MIN;\n      /*_gp_b < 0 => db <= 0*/\n      db=OP_INT64_MIN-_gp_b;\n      /*Step 2: Check for overflow.*/\n      if(OP_UNLIKELY(da<OP_INT64_MIN-db))return OP_EINVAL;\n      *_delta=da+db;\n    }\n  }\n  else *_delta=_gp_a-_gp_b;\n  return 0;\n}\n\nstatic int op_granpos_cmp(ogg_int64_t _gp_a,ogg_int64_t _gp_b){\n  /*The invalid granule position -1 should behave like NaN: neither greater\n     than nor less than any other granule position, nor equal to any other\n     granule position, including itself.\n    However, that means there isn't anything we could sensibly return from this\n     function for it.*/\n  OP_ASSERT(_gp_a!=-1);\n  OP_ASSERT(_gp_b!=-1);\n  /*Handle the wrapping cases.*/\n  if(OP_UNLIKELY(_gp_a<0)){\n    if(_gp_b>=0)return 1;\n    /*Else fall through.*/\n  }\n  else if(OP_UNLIKELY(_gp_b<0))return -1;\n  /*No wrapping case.*/\n  return (_gp_a>_gp_b)-(_gp_b>_gp_a);\n}\n\n/*Returns the duration of the packet (in samples at 48 kHz), or a negative\n   value on error.*/\nstatic int op_get_packet_duration(const unsigned char *_data,int _len){\n  int nframes;\n  int frame_size;\n  int nsamples;\n  nframes=opus_packet_get_nb_frames(_data,_len);\n  if(OP_UNLIKELY(nframes<0))return OP_EBADPACKET;\n  frame_size=opus_packet_get_samples_per_frame(_data,48000);\n  nsamples=nframes*frame_size;\n  if(OP_UNLIKELY(nsamples>120*48))return OP_EBADPACKET;\n  return nsamples;\n}\n\n/*This function more properly belongs in info.c, but we define it here to allow\n   the static granule position manipulation functions to remain static.*/\nogg_int64_t opus_granule_sample(const OpusHead *_head,ogg_int64_t _gp){\n  opus_int32 pre_skip;\n  pre_skip=_head->pre_skip;\n  if(_gp!=-1&&op_granpos_add(&_gp,_gp,-pre_skip))_gp=-1;\n  return _gp;\n}\n\n/*Grab all the packets currently in the stream state, and compute their\n   durations.\n  _of->op_count is set to the number of packets collected.\n  [out] _durations: Returns the durations of the individual packets.\n  Return: The total duration of all packets, or OP_HOLE if there was a hole.*/\nstatic opus_int32 op_collect_audio_packets(OggOpusFile *_of,\n int _durations[255]){\n  opus_int32 total_duration;\n  int        op_count;\n  /*Count the durations of all packets in the page.*/\n  op_count=0;\n  total_duration=0;\n  for(;;){\n    int ret;\n    /*This takes advantage of undocumented libogg behavior that returned\n       ogg_packet buffers are valid at least until the next page is\n       submitted.\n      Relying on this is not too terrible, as _none_ of the Ogg memory\n       ownership/lifetime rules are well-documented.\n      But I can read its code and know this will work.*/\n    ret=ogg_stream_packetout(&_of->os,_of->op+op_count);\n    if(!ret)break;\n    if(OP_UNLIKELY(ret<0)){\n      /*We shouldn't get holes in the middle of pages.*/\n      OP_ASSERT(op_count==0);\n      /*Set the return value and break out of the loop.\n        We want to make sure op_count gets set to 0, because we've ingested a\n         page, so any previously loaded packets are now invalid.*/\n      total_duration=OP_HOLE;\n      break;\n    }\n    /*Unless libogg is broken, we can't get more than 255 packets from a\n       single page.*/\n    OP_ASSERT(op_count<255);\n    _durations[op_count]=op_get_packet_duration(_of->op[op_count].packet,\n     _of->op[op_count].bytes);\n    if(OP_LIKELY(_durations[op_count]>0)){\n      /*With at most 255 packets on a page, this can't overflow.*/\n      total_duration+=_durations[op_count++];\n    }\n    /*Ignore packets with an invalid TOC sequence.*/\n    else if(op_count>0){\n      /*But save the granule position, if there was one.*/\n      _of->op[op_count-1].granulepos=_of->op[op_count].granulepos;\n    }\n  }\n  _of->op_pos=0;\n  _of->op_count=op_count;\n  return total_duration;\n}\n\n/*Starting from current cursor position, get the initial PCM offset of the next\n   page.\n  This also validates the granule position on the first page with a completed\n   audio data packet, as required by the spec.\n  If this link is completely empty (no pages with completed packets), then this\n   function sets pcm_start=pcm_end=0 and returns the BOS page of the next link\n   (if any).\n  In the seekable case, we initialize pcm_end=-1 before calling this function,\n   so that later we can detect that the link was empty before calling\n   op_find_final_pcm_offset().\n  [inout] _link: The link for which to find pcm_start.\n  [out] _og:     Returns the BOS page of the next link if this link was empty.\n                 In the unseekable case, we can then feed this to\n                  op_fetch_headers() to start the next link.\n                 The caller may pass NULL (e.g., for seekable streams), in\n                  which case this page will be discarded.\n  Return: 0 on success, 1 if there is a buffered BOS page available, or a\n           negative value on unrecoverable error.*/\nstatic int op_find_initial_pcm_offset(OggOpusFile *_of,\n OggOpusLink *_link,ogg_page *_og){\n  ogg_page     og;\n  ogg_int64_t  pcm_start;\n  ogg_int64_t  prev_packet_gp;\n  ogg_int64_t  cur_page_gp;\n  ogg_uint32_t serialno;\n  opus_int32   total_duration;\n  int          durations[255];\n  int          cur_page_eos;\n  int          op_count;\n  int          pi;\n  if(_og==NULL)_og=&og;\n  serialno=_of->os.serialno;\n  op_count=0;\n  /*We shouldn't have to initialize total_duration, but gcc is too dumb to\n     figure out that op_count>0 implies we've been through the whole loop at\n     least once.*/\n  total_duration=0;\n  do{\n    opus_int64 llret;\n    llret=op_get_next_page(_of,_og,_of->end);\n    /*We should get a page unless the file is truncated or mangled.\n      Otherwise there are no audio data packets in the whole logical stream.*/\n    if(OP_UNLIKELY(llret<0)){\n      /*Fail if there was a read error.*/\n      if(llret<OP_FALSE)return (int)llret;\n      /*Fail if the pre-skip is non-zero, since it's asking us to skip more\n         samples than exist.*/\n      if(_link->head.pre_skip>0)return OP_EBADTIMESTAMP;\n      /*Set pcm_end and end_offset so we can skip the call to\n         op_find_final_pcm_offset().*/\n      _link->pcm_start=_link->pcm_end=0;\n      _link->end_offset=_link->data_offset;\n      return 0;\n    }\n    /*Similarly, if we hit the next link in the chain, we've gone too far.*/\n    if(OP_UNLIKELY(ogg_page_bos(_og))){\n      if(_link->head.pre_skip>0)return OP_EBADTIMESTAMP;\n      /*Set pcm_end and end_offset so we can skip the call to\n         op_find_final_pcm_offset().*/\n      _link->pcm_end=_link->pcm_start=0;\n      _link->end_offset=_link->data_offset;\n      /*Tell the caller we've got a buffered page for them.*/\n      return 1;\n    }\n    /*Ignore pages from other streams (not strictly necessary, because of the\n       checks in ogg_stream_pagein(), but saves some work).*/\n    if(serialno!=(ogg_uint32_t)ogg_page_serialno(_og))continue;\n    ogg_stream_pagein(&_of->os,_og);\n    /*Bitrate tracking: add the header's bytes here.\n      The body bytes are counted when we consume the packets.*/\n    _of->bytes_tracked+=_og->header_len;\n    /*Count the durations of all packets in the page.*/\n    do total_duration=op_collect_audio_packets(_of,durations);\n    /*Ignore holes.*/\n    while(OP_UNLIKELY(total_duration<0));\n    op_count=_of->op_count;\n  }\n  while(op_count<=0);\n  /*We found the first page with a completed audio data packet: actually look\n     at the granule position.\n    RFC 3533 says, \"A special value of -1 (in two's complement) indicates that\n     no packets finish on this page,\" which does not say that a granule\n     position that is NOT -1 indicates that some packets DO finish on that page\n     (even though this was the intention, libogg itself violated this intention\n     for years before we fixed it).\n    The Ogg Opus specification only imposes its start-time requirements\n     on the granule position of the first page with completed packets,\n     so we ignore any set granule positions until then.*/\n  cur_page_gp=_of->op[op_count-1].granulepos;\n  /*But getting a packet without a valid granule position on the page is not\n     okay.*/\n  if(cur_page_gp==-1)return OP_EBADTIMESTAMP;\n  cur_page_eos=_of->op[op_count-1].e_o_s;\n  if(OP_LIKELY(!cur_page_eos)){\n    /*The EOS flag wasn't set.\n      Work backwards from the provided granule position to get the starting PCM\n       offset.*/\n    if(OP_UNLIKELY(op_granpos_add(&pcm_start,cur_page_gp,-total_duration)<0)){\n      /*The starting granule position MUST not be smaller than the amount of\n         audio on the first page with completed packets.*/\n      return OP_EBADTIMESTAMP;\n    }\n  }\n  else{\n    /*The first page with completed packets was also the last.*/\n    if(OP_LIKELY(op_granpos_add(&pcm_start,cur_page_gp,-total_duration)<0)){\n      /*If there's less audio on the page than indicated by the granule\n         position, then we're doing end-trimming, and the starting PCM offset\n         is zero by spec mandate.*/\n      pcm_start=0;\n      /*However, the end-trimming MUST not ask us to trim more samples than\n         exist after applying the pre-skip.*/\n      if(OP_UNLIKELY(op_granpos_cmp(cur_page_gp,_link->head.pre_skip)<0)){\n        return OP_EBADTIMESTAMP;\n      }\n    }\n  }\n  /*Timestamp the individual packets.*/\n  prev_packet_gp=pcm_start;\n  for(pi=0;pi<op_count;pi++){\n    if(cur_page_eos){\n      ogg_int64_t diff;\n      OP_ALWAYS_TRUE(!op_granpos_diff(&diff,cur_page_gp,prev_packet_gp));\n      diff=durations[pi]-diff;\n      /*If we have samples to trim...*/\n      if(diff>0){\n        /*If we trimmed the entire packet, stop (the spec says encoders\n           shouldn't do this, but we support it anyway).*/\n        if(OP_UNLIKELY(diff>durations[pi]))break;\n        _of->op[pi].granulepos=prev_packet_gp=cur_page_gp;\n        /*Move the EOS flag to this packet, if necessary, so we'll trim the\n           samples.*/\n        _of->op[pi].e_o_s=1;\n        continue;\n      }\n    }\n    /*Update the granule position as normal.*/\n    OP_ALWAYS_TRUE(!op_granpos_add(&_of->op[pi].granulepos,\n     prev_packet_gp,durations[pi]));\n    prev_packet_gp=_of->op[pi].granulepos;\n  }\n  /*Update the packet count after end-trimming.*/\n  _of->op_count=pi;\n  _of->cur_discard_count=_link->head.pre_skip;\n  _of->prev_packet_gp=_link->pcm_start=pcm_start;\n  return 0;\n}\n\n/*Starting from current cursor position, get the final PCM offset of the\n   previous page.\n  This also validates the duration of the link, which, while not strictly\n   required by the spec, we need to ensure duration calculations don't\n   overflow.\n  This is only done for seekable sources.\n  We must validate that op_find_initial_pcm_offset() succeeded for this link\n   before calling this function, otherwise it will scan the entire stream\n   backwards until it reaches the start, and then fail.*/\nstatic int op_find_final_pcm_offset(OggOpusFile *_of,\n const ogg_uint32_t *_serialnos,int _nserialnos,OggOpusLink *_link,\n opus_int64 _offset,ogg_uint32_t _end_serialno,ogg_int64_t _end_gp,\n ogg_int64_t *_total_duration){\n  ogg_int64_t  total_duration;\n  ogg_int64_t  duration;\n  ogg_uint32_t cur_serialno;\n  /*For the time being, fetch end PCM offset the simple way.*/\n  cur_serialno=_link->serialno;\n  if(_end_serialno!=cur_serialno||_end_gp==-1){\n    _offset=op_get_last_page(_of,&_end_gp,_offset,\n     cur_serialno,_serialnos,_nserialnos);\n    if(OP_UNLIKELY(_offset<0))return (int)_offset;\n  }\n  /*At worst we should have found the first page with completed packets.*/\n  if(OP_UNLIKELY(_offset<_link->data_offset))return OP_EBADLINK;\n  /*This implementation requires that the difference between the first and last\n     granule positions in each link be representable in a signed, 64-bit\n     number, and that each link also have at least as many samples as the\n     pre-skip requires.*/\n  if(OP_UNLIKELY(op_granpos_diff(&duration,_end_gp,_link->pcm_start)<0)\n   ||OP_UNLIKELY(duration<_link->head.pre_skip)){\n    return OP_EBADTIMESTAMP;\n  }\n  /*We also require that the total duration be representable in a signed,\n     64-bit number.*/\n  duration-=_link->head.pre_skip;\n  total_duration=*_total_duration;\n  if(OP_UNLIKELY(OP_INT64_MAX-duration<total_duration))return OP_EBADTIMESTAMP;\n  *_total_duration=total_duration+duration;\n  _link->pcm_end=_end_gp;\n  _link->end_offset=_offset;\n  return 0;\n}\n\n/*Rescale the number _x from the range [0,_from] to [0,_to].\n  _from and _to must be positive.*/\nstatic opus_int64 op_rescale64(opus_int64 _x,opus_int64 _from,opus_int64 _to){\n  opus_int64 frac;\n  opus_int64 ret;\n  int        i;\n  if(_x>=_from)return _to;\n  if(_x<=0)return 0;\n  frac=0;\n  for(i=0;i<63;i++){\n    frac<<=1;\n    OP_ASSERT(_x<=_from);\n    if(_x>=_from>>1){\n      _x-=_from-_x;\n      frac|=1;\n    }\n    else _x<<=1;\n  }\n  ret=0;\n  for(i=0;i<63;i++){\n    if(frac&1)ret=(ret&_to&1)+(ret>>1)+(_to>>1);\n    else ret>>=1;\n    frac>>=1;\n  }\n  return ret;\n}\n\n/*The minimum granule position spacing allowed for making predictions.\n  This corresponds to about 1 second of audio at 48 kHz for both Opus and\n   Vorbis, or one keyframe interval in Theora with the default keyframe spacing\n   of 256.*/\n#define OP_GP_SPACING_MIN (48000)\n\n/*Try to estimate the location of the next link using the current seek\n   records, assuming the initial granule position of any streams we've found is\n   0.*/\nstatic opus_int64 op_predict_link_start(const OpusSeekRecord *_sr,int _nsr,\n opus_int64 _searched,opus_int64 _end_searched,opus_int32 _bias){\n  opus_int64 bisect;\n  int        sri;\n  int        srj;\n  /*Require that we be at least OP_CHUNK_SIZE from the end.\n    We don't require that we be at least OP_CHUNK_SIZE from the beginning,\n     because if we are we'll just scan forward without seeking.*/\n  _end_searched-=OP_CHUNK_SIZE;\n  if(_searched>=_end_searched)return -1;\n  bisect=_end_searched;\n  for(sri=0;sri<_nsr;sri++){\n    ogg_int64_t  gp1;\n    ogg_int64_t  gp2_min;\n    ogg_uint32_t serialno1;\n    opus_int64   offset1;\n    /*If the granule position is negative, either it's invalid or we'd cause\n       overflow.*/\n    gp1=_sr[sri].gp;\n    if(gp1<0)continue;\n    /*We require some minimum distance between granule positions to make an\n       estimate.\n      We don't actually know what granule position scheme is being used,\n       because we have no idea what kind of stream these came from.\n      Therefore we require a minimum spacing between them, with the\n       expectation that while bitrates and granule position increments might\n       vary locally in quite complex ways, they are globally smooth.*/\n    if(OP_UNLIKELY(op_granpos_add(&gp2_min,gp1,OP_GP_SPACING_MIN)<0)){\n      /*No granule position would satisfy us.*/\n      continue;\n    }\n    offset1=_sr[sri].offset;\n    serialno1=_sr[sri].serialno;\n    for(srj=sri;srj-->0;){\n      ogg_int64_t gp2;\n      opus_int64  offset2;\n      opus_int64  num;\n      ogg_int64_t den;\n      ogg_int64_t ipart;\n      gp2=_sr[srj].gp;\n      if(gp2<gp2_min)continue;\n      /*Oh, and also make sure these came from the same stream.*/\n      if(_sr[srj].serialno!=serialno1)continue;\n      offset2=_sr[srj].offset;\n      /*For once, we can subtract with impunity.*/\n      den=gp2-gp1;\n      ipart=gp2/den;\n      num=offset2-offset1;\n      OP_ASSERT(num>0);\n      if(ipart>0&&(offset2-_searched)/ipart<num)continue;\n      offset2-=ipart*num;\n      gp2-=ipart*den;\n      offset2-=op_rescale64(gp2,den,num)-_bias;\n      if(offset2<_searched)continue;\n      bisect=OP_MIN(bisect,offset2);\n      break;\n    }\n  }\n  return bisect>=_end_searched?-1:bisect;\n}\n\n/*Finds each bitstream link, one at a time, using a bisection search.\n  This has to begin by knowing the offset of the first link's initial page.*/\nstatic int op_bisect_forward_serialno(OggOpusFile *_of,\n opus_int64 _searched,OpusSeekRecord *_sr,int _csr,\n ogg_uint32_t **_serialnos,int *_nserialnos,int *_cserialnos){\n  ogg_page      og;\n  OggOpusLink  *links;\n  int           nlinks;\n  int           clinks;\n  ogg_uint32_t *serialnos;\n  int           nserialnos;\n  ogg_int64_t   total_duration;\n  int           nsr;\n  int           ret;\n  links=_of->links;\n  nlinks=clinks=_of->nlinks;\n  total_duration=0;\n  /*We start with one seek record, for the last page in the file.\n    We build up a list of records for places we seek to during link\n     enumeration.\n    This list is kept sorted in reverse order.\n    We only care about seek locations that were _not_ in the current link,\n     therefore we can add them one at a time to the end of the list as we\n     improve the lower bound on the location where the next link starts.*/\n  nsr=1;\n  for(;;){\n    opus_int64  end_searched;\n    opus_int64  bisect;\n    opus_int64  next;\n    opus_int64  last;\n    ogg_int64_t end_offset;\n    ogg_int64_t end_gp;\n    int         sri;\n    serialnos=*_serialnos;\n    nserialnos=*_nserialnos;\n    if(OP_UNLIKELY(nlinks>=clinks)){\n      if(OP_UNLIKELY(clinks>INT_MAX-1>>1))return OP_EFAULT;\n      clinks=2*clinks+1;\n      OP_ASSERT(nlinks<clinks);\n      links=(OggOpusLink *)_ogg_realloc(links,sizeof(*links)*clinks);\n      if(OP_UNLIKELY(links==NULL))return OP_EFAULT;\n      _of->links=links;\n    }\n    /*Invariants:\n      We have the headers and serial numbers for the link beginning at 'begin'.\n      We have the offset and granule position of the last page in the file\n       (potentially not a page we care about).*/\n    /*Scan the seek records we already have to save us some bisection.*/\n    for(sri=0;sri<nsr;sri++){\n      if(op_lookup_serialno(_sr[sri].serialno,serialnos,nserialnos))break;\n    }\n    /*Is the last page in our current list of serial numbers?*/\n    if(sri<=0)break;\n    /*Last page wasn't found.\n      We have at least one more link.*/\n    last=-1;\n    end_searched=_sr[sri-1].search_start;\n    next=_sr[sri-1].offset;\n    end_gp=-1;\n    if(sri<nsr){\n      _searched=_sr[sri].offset+_sr[sri].size;\n      if(_sr[sri].serialno==links[nlinks-1].serialno){\n        end_gp=_sr[sri].gp;\n        end_offset=_sr[sri].offset;\n      }\n    }\n    nsr=sri;\n    bisect=-1;\n    /*If we've already found the end of at least one link, try to pick the\n       first bisection point at twice the average link size.\n      This is a good choice for files with lots of links that are all about the\n       same size.*/\n    if(nlinks>1){\n      opus_int64 last_offset;\n      opus_int64 avg_link_size;\n      opus_int64 upper_limit;\n      last_offset=links[nlinks-1].offset;\n      avg_link_size=last_offset/(nlinks-1);\n      upper_limit=end_searched-OP_CHUNK_SIZE-avg_link_size;\n      if(OP_LIKELY(last_offset>_searched-avg_link_size)\n       &&OP_LIKELY(last_offset<upper_limit)){\n        bisect=last_offset+avg_link_size;\n        if(OP_LIKELY(bisect<upper_limit))bisect+=avg_link_size;\n      }\n    }\n    /*We guard against garbage separating the last and first pages of two\n       links below.*/\n    while(_searched<end_searched){\n      opus_int32 next_bias;\n      /*If we don't have a better estimate, use simple bisection.*/\n      if(bisect==-1)bisect=_searched+(end_searched-_searched>>1);\n      /*If we're within OP_CHUNK_SIZE of the start, scan forward.*/\n      if(bisect-_searched<OP_CHUNK_SIZE)bisect=_searched;\n      /*Otherwise we're skipping data.\n        Forget the end page, if we saw one, as we might miss a later one.*/\n      else end_gp=-1;\n      ret=op_seek_helper(_of,bisect);\n      if(OP_UNLIKELY(ret<0))return ret;\n      last=op_get_next_page(_of,&og,_sr[nsr-1].offset);\n      if(OP_UNLIKELY(last<OP_FALSE))return (int)last;\n      next_bias=0;\n      if(last==OP_FALSE)end_searched=bisect;\n      else{\n        ogg_uint32_t serialno;\n        ogg_int64_t  gp;\n        serialno=ogg_page_serialno(&og);\n        gp=ogg_page_granulepos(&og);\n        if(!op_lookup_serialno(serialno,serialnos,nserialnos)){\n          end_searched=bisect;\n          next=last;\n          /*In reality we should always have enough room, but be paranoid.*/\n          if(OP_LIKELY(nsr<_csr)){\n            _sr[nsr].search_start=bisect;\n            _sr[nsr].offset=last;\n            OP_ASSERT(_of->offset-last>=0);\n            OP_ASSERT(_of->offset-last<=OP_PAGE_SIZE_MAX);\n            _sr[nsr].size=(opus_int32)(_of->offset-last);\n            _sr[nsr].serialno=serialno;\n            _sr[nsr].gp=gp;\n            nsr++;\n          }\n        }\n        else{\n          _searched=_of->offset;\n          next_bias=OP_CHUNK_SIZE;\n          if(serialno==links[nlinks-1].serialno){\n            /*This page was from the stream we want, remember it.\n              If it's the last such page in the link, we won't have to go back\n               looking for it later.*/\n            end_gp=gp;\n            end_offset=last;\n          }\n        }\n      }\n      bisect=op_predict_link_start(_sr,nsr,_searched,end_searched,next_bias);\n    }\n    /*Bisection point found.\n      Get the final granule position of the previous link, assuming\n       op_find_initial_pcm_offset() didn't already determine the link was\n       empty.*/\n    if(OP_LIKELY(links[nlinks-1].pcm_end==-1)){\n      if(end_gp==-1){\n        /*If we don't know where the end page is, we'll have to seek back and\n           look for it, starting from the end of the link.*/\n        end_offset=next;\n        /*Also forget the last page we read.\n          It won't be available after the seek.*/\n        last=-1;\n      }\n      ret=op_find_final_pcm_offset(_of,serialnos,nserialnos,\n       links+nlinks-1,end_offset,links[nlinks-1].serialno,end_gp,\n       &total_duration);\n      if(OP_UNLIKELY(ret<0))return ret;\n    }\n    if(last!=next){\n      /*The last page we read was not the first page the next link.\n        Move the cursor position to the offset of that first page.\n        This only performs an actual seek if the first page of the next link\n         does not start at the end of the last page from the current Opus\n         stream with a valid granule position.*/\n      ret=op_seek_helper(_of,next);\n      if(OP_UNLIKELY(ret<0))return ret;\n    }\n    ret=op_fetch_headers(_of,&links[nlinks].head,&links[nlinks].tags,\n     _serialnos,_nserialnos,_cserialnos,last!=next?NULL:&og);\n    if(OP_UNLIKELY(ret<0))return ret;\n    links[nlinks].offset=next;\n    links[nlinks].data_offset=_of->offset;\n    links[nlinks].serialno=_of->os.serialno;\n    links[nlinks].pcm_end=-1;\n    /*This might consume a page from the next link, however the next bisection\n       always starts with a seek.*/\n    ret=op_find_initial_pcm_offset(_of,links+nlinks,NULL);\n    if(OP_UNLIKELY(ret<0))return ret;\n    _searched=_of->offset;\n    /*Mark the current link count so it can be cleaned up on error.*/\n    _of->nlinks=++nlinks;\n  }\n  /*Last page is in the starting serialno list, so we've reached the last link.\n    Now find the last granule position for it (if we didn't the first time we\n     looked at the end of the stream, and if op_find_initial_pcm_offset()\n     didn't already determine the link was empty).*/\n  if(OP_LIKELY(links[nlinks-1].pcm_end==-1)){\n    ret=op_find_final_pcm_offset(_of,serialnos,nserialnos,\n     links+nlinks-1,_sr[0].offset,_sr[0].serialno,_sr[0].gp,&total_duration);\n    if(OP_UNLIKELY(ret<0))return ret;\n  }\n  /*Trim back the links array if necessary.*/\n  links=(OggOpusLink *)_ogg_realloc(links,sizeof(*links)*nlinks);\n  if(OP_LIKELY(links!=NULL))_of->links=links;\n  /*We also don't need these anymore.*/\n  _ogg_free(*_serialnos);\n  *_serialnos=NULL;\n  *_cserialnos=*_nserialnos=0;\n  return 0;\n}\n\nstatic void op_update_gain(OggOpusFile *_of){\n  OpusHead   *head;\n  opus_int32  gain_q8;\n  int         li;\n  /*If decode isn't ready, then we'll apply the gain when we initialize the\n     decoder.*/\n  if(_of->ready_state<OP_INITSET)return;\n  gain_q8=_of->gain_offset_q8;\n  li=_of->seekable?_of->cur_link:0;\n  head=&_of->links[li].head;\n  /*We don't have to worry about overflow here because the header gain and\n     track gain must lie in the range [-32768,32767], and the user-supplied\n     offset has been pre-clamped to [-98302,98303].*/\n  switch(_of->gain_type){\n    case OP_TRACK_GAIN:{\n      int track_gain_q8;\n      track_gain_q8=0;\n      opus_tags_get_track_gain(&_of->links[li].tags,&track_gain_q8);\n      gain_q8+=track_gain_q8;\n    }\n    /*Fall through.*/\n    case OP_HEADER_GAIN:gain_q8+=head->output_gain;break;\n    case OP_ABSOLUTE_GAIN:break;\n    default:OP_ASSERT(0);\n  }\n  gain_q8=OP_CLAMP(-32768,gain_q8,32767);\n  OP_ASSERT(_of->od!=NULL);\n#if defined(OPUS_SET_GAIN)\n  opus_multistream_decoder_ctl(_of->od,OPUS_SET_GAIN(gain_q8));\n#else\n/*A fallback that works with both float and fixed-point is a bunch of work,\n   so just force people to use a sufficiently new version.\n  This is deployed well enough at this point that this shouldn't be a burden.*/\n# error \"libopus 1.0.1 or later required\"\n#endif\n}\n\nstatic int op_make_decode_ready(OggOpusFile *_of){\n  const OpusHead *head;\n  int             li;\n  int             stream_count;\n  int             coupled_count;\n  int             channel_count;\n  if(_of->ready_state>OP_STREAMSET)return 0;\n  if(OP_UNLIKELY(_of->ready_state<OP_STREAMSET))return OP_EFAULT;\n  li=_of->seekable?_of->cur_link:0;\n  head=&_of->links[li].head;\n  stream_count=head->stream_count;\n  coupled_count=head->coupled_count;\n  channel_count=head->channel_count;\n  /*Check to see if the current decoder is compatible with the current link.*/\n  if(_of->od!=NULL&&_of->od_stream_count==stream_count\n   &&_of->od_coupled_count==coupled_count&&_of->od_channel_count==channel_count\n   &&memcmp(_of->od_mapping,head->mapping,\n   sizeof(*head->mapping)*channel_count)==0){\n    opus_multistream_decoder_ctl(_of->od,OPUS_RESET_STATE);\n  }\n  else{\n    int err;\n    opus_multistream_decoder_destroy(_of->od);\n    _of->od=opus_multistream_decoder_create(48000,channel_count,\n     stream_count,coupled_count,head->mapping,&err);\n    if(_of->od==NULL)return OP_EFAULT;\n    _of->od_stream_count=stream_count;\n    _of->od_coupled_count=coupled_count;\n    _of->od_channel_count=channel_count;\n    memcpy(_of->od_mapping,head->mapping,sizeof(*head->mapping)*channel_count);\n  }\n  _of->ready_state=OP_INITSET;\n  _of->bytes_tracked=0;\n  _of->samples_tracked=0;\n#if !defined(OP_FIXED_POINT)\n  _of->state_channel_count=0;\n  /*Use the serial number for the PRNG seed to get repeatable output for\n     straight play-throughs.*/\n  _of->dither_seed=_of->links[li].serialno;\n#endif\n  op_update_gain(_of);\n  return 0;\n}\n\nstatic int op_open_seekable2_impl(OggOpusFile *_of){\n  /*64 seek records should be enough for anybody.\n    Actually, with a bisection search in a 63-bit range down to OP_CHUNK_SIZE\n     granularity, much more than enough.*/\n  OpusSeekRecord sr[64];\n  opus_int64     data_offset;\n  int            ret;\n  /*We can seek, so set out learning all about this file.*/\n  (*_of->callbacks.seek)(_of->source,0,SEEK_END);\n  _of->offset=_of->end=(*_of->callbacks.tell)(_of->source);\n  if(OP_UNLIKELY(_of->end<0))return OP_EREAD;\n  data_offset=_of->links[0].data_offset;\n  if(OP_UNLIKELY(_of->end<data_offset))return OP_EBADLINK;\n  /*Get the offset of the last page of the physical bitstream, or, if we're\n     lucky, the last Opus page of the first link, as most Ogg Opus files will\n     contain a single logical bitstream.*/\n  ret=op_get_prev_page_serial(_of,sr,_of->end,\n   _of->links[0].serialno,_of->serialnos,_of->nserialnos);\n  if(OP_UNLIKELY(ret<0))return ret;\n  /*If there's any trailing junk, forget about it.*/\n  _of->end=sr[0].offset+sr[0].size;\n  if(OP_UNLIKELY(_of->end<data_offset))return OP_EBADLINK;\n  /*Now enumerate the bitstream structure.*/\n  return op_bisect_forward_serialno(_of,data_offset,sr,sizeof(sr)/sizeof(*sr),\n   &_of->serialnos,&_of->nserialnos,&_of->cserialnos);\n}\n\nstatic int op_open_seekable2(OggOpusFile *_of){\n  ogg_sync_state    oy_start;\n  ogg_stream_state  os_start;\n  ogg_packet       *op_start;\n  opus_int64        start_offset;\n  int               start_op_count;\n  int               ret;\n  /*We're partially open and have a first link header state in storage in _of.\n    Save off that stream state so we can come back to it.\n    It would be simpler to just dump all this state and seek back to\n     links[0].data_offset when we're done.\n    But we do the extra work to allow us to seek back to _exactly_ the same\n     stream position we're at now.\n    This allows, e.g., the HTTP backend to continue reading from the original\n     connection (if it's still available), instead of opening a new one.\n    This means we can open and start playing a normal Opus file with a single\n     link and reasonable packet sizes using only two HTTP requests.*/\n  start_op_count=_of->op_count;\n  /*This is a bit too large to put on the stack unconditionally.*/\n  op_start=(ogg_packet *)_ogg_malloc(sizeof(*op_start)*start_op_count);\n  if(op_start==NULL)return OP_EFAULT;\n  *&oy_start=_of->oy;\n  *&os_start=_of->os;\n  start_offset=_of->offset;\n  memcpy(op_start,_of->op,sizeof(*op_start)*start_op_count);\n  OP_ASSERT((*_of->callbacks.tell)(_of->source)==op_position(_of));\n  ogg_sync_init(&_of->oy);\n  ogg_stream_init(&_of->os,-1);\n  ret=op_open_seekable2_impl(_of);\n  /*Restore the old stream state.*/\n  ogg_stream_clear(&_of->os);\n  ogg_sync_clear(&_of->oy);\n  *&_of->oy=*&oy_start;\n  *&_of->os=*&os_start;\n  _of->offset=start_offset;\n  _of->op_count=start_op_count;\n  memcpy(_of->op,op_start,sizeof(*_of->op)*start_op_count);\n  _ogg_free(op_start);\n  _of->prev_packet_gp=_of->links[0].pcm_start;\n  _of->cur_discard_count=_of->links[0].head.pre_skip;\n  if(OP_UNLIKELY(ret<0))return ret;\n  /*And restore the position indicator.*/\n  ret=(*_of->callbacks.seek)(_of->source,op_position(_of),SEEK_SET);\n  return OP_UNLIKELY(ret<0)?OP_EREAD:0;\n}\n\n/*Clear out the current logical bitstream decoder.*/\nstatic void op_decode_clear(OggOpusFile *_of){\n  /*We don't actually free the decoder.\n    We might be able to re-use it for the next link.*/\n  _of->op_count=0;\n  _of->od_buffer_size=0;\n  _of->prev_packet_gp=-1;\n  if(!_of->seekable){\n    OP_ASSERT(_of->ready_state>=OP_INITSET);\n    opus_tags_clear(&_of->links[0].tags);\n  }\n  _of->ready_state=OP_OPENED;\n}\n\nstatic void op_clear(OggOpusFile *_of){\n  OggOpusLink *links;\n  _ogg_free(_of->od_buffer);\n  if(_of->od!=NULL)opus_multistream_decoder_destroy(_of->od);\n  links=_of->links;\n  if(!_of->seekable){\n    if(_of->ready_state>OP_OPENED||_of->ready_state==OP_PARTOPEN){\n      opus_tags_clear(&links[0].tags);\n    }\n  }\n  else if(OP_LIKELY(links!=NULL)){\n    int nlinks;\n    int link;\n    nlinks=_of->nlinks;\n    for(link=0;link<nlinks;link++)opus_tags_clear(&links[link].tags);\n  }\n  _ogg_free(links);\n  _ogg_free(_of->serialnos);\n  ogg_stream_clear(&_of->os);\n  ogg_sync_clear(&_of->oy);\n  if(_of->callbacks.close!=NULL)(*_of->callbacks.close)(_of->source);\n}\n\nstatic int op_open1(OggOpusFile *_of,\n void *_source,const OpusFileCallbacks *_cb,\n const unsigned char *_initial_data,size_t _initial_bytes){\n  ogg_page  og;\n  ogg_page *pog;\n  int       seekable;\n  int       ret;\n  memset(_of,0,sizeof(*_of));\n  _of->end=-1;\n  _of->source=_source;\n  *&_of->callbacks=*_cb;\n  /*At a minimum, we need to be able to read data.*/\n  if(OP_UNLIKELY(_of->callbacks.read==NULL))return OP_EREAD;\n  /*Initialize the framing state.*/\n  ogg_sync_init(&_of->oy);\n  /*Perhaps some data was previously read into a buffer for testing against\n     other stream types.\n    Allow initialization from this previously read data (especially as we may\n     be reading from a non-seekable stream).\n    This requires copying it into a buffer allocated by ogg_sync_buffer() and\n     doesn't support seeking, so this is not a good mechanism to use for\n     decoding entire files from RAM.*/\n  if(_initial_bytes>0){\n    char *buffer;\n    buffer=ogg_sync_buffer(&_of->oy,_initial_bytes);\n    memcpy(buffer,_initial_data,_initial_bytes*sizeof(*buffer));\n    ogg_sync_wrote(&_of->oy,_initial_bytes);\n  }\n  /*Can we seek?\n    Stevens suggests the seek test is portable.*/\n  seekable=_cb->seek!=NULL&&(*_cb->seek)(_source,0,SEEK_CUR)!=-1;\n  /*If seek is implemented, tell must also be implemented.*/\n  if(seekable){\n    opus_int64 pos;\n    if(OP_UNLIKELY(_of->callbacks.tell==NULL))return OP_EINVAL;\n    pos=(*_of->callbacks.tell)(_of->source);\n    /*If the current position is not equal to the initial bytes consumed,\n       absolute seeking will not work.*/\n    if(OP_UNLIKELY(pos!=(opus_int64)_initial_bytes))return OP_EINVAL;\n  }\n  _of->seekable=seekable;\n  /*Don't seek yet.\n    Set up a 'single' (current) logical bitstream entry for partial open.*/\n  _of->links=(OggOpusLink *)_ogg_malloc(sizeof(*_of->links));\n  /*The serialno gets filled in later by op_fetch_headers().*/\n  ogg_stream_init(&_of->os,-1);\n  pog=NULL;\n  for(;;){\n    /*Fetch all BOS pages, store the Opus header and all seen serial numbers,\n      and load subsequent Opus setup headers.*/\n    ret=op_fetch_headers(_of,&_of->links[0].head,&_of->links[0].tags,\n     &_of->serialnos,&_of->nserialnos,&_of->cserialnos,pog);\n    if(OP_UNLIKELY(ret<0))break;\n    _of->nlinks=1;\n    _of->links[0].offset=0;\n    _of->links[0].data_offset=_of->offset;\n    _of->links[0].pcm_end=-1;\n    _of->links[0].serialno=_of->os.serialno;\n    /*Fetch the initial PCM offset.*/\n    ret=op_find_initial_pcm_offset(_of,_of->links,&og);\n    if(seekable||OP_LIKELY(ret<=0))break;\n    /*This link was empty, but we already have the BOS page for the next one in\n       og.\n      We can't seek, so start processing the next link right now.*/\n    opus_tags_clear(&_of->links[0].tags);\n    _of->nlinks=0;\n    if(!seekable)_of->cur_link++;\n    pog=&og;\n  }\n  if(OP_LIKELY(ret>=0))_of->ready_state=OP_PARTOPEN;\n  return ret;\n}\n\nstatic int op_open2(OggOpusFile *_of){\n  int ret;\n  OP_ASSERT(_of->ready_state==OP_PARTOPEN);\n  if(_of->seekable){\n    _of->ready_state=OP_OPENED;\n    ret=op_open_seekable2(_of);\n  }\n  else ret=0;\n  if(OP_LIKELY(ret>=0)){\n    /*We have buffered packets from op_find_initial_pcm_offset().\n      Move to OP_INITSET so we can use them.*/\n    _of->ready_state=OP_STREAMSET;\n    ret=op_make_decode_ready(_of);\n    if(OP_LIKELY(ret>=0))return 0;\n  }\n  /*Don't auto-close the stream on failure.*/\n  _of->callbacks.close=NULL;\n  op_clear(_of);\n  return ret;\n}\n\nOggOpusFile *op_test_callbacks(void *_source,const OpusFileCallbacks *_cb,\n const unsigned char *_initial_data,size_t _initial_bytes,int *_error){\n  OggOpusFile *of;\n  int          ret;\n  of=(OggOpusFile *)_ogg_malloc(sizeof(*of));\n  ret=OP_EFAULT;\n  if(OP_LIKELY(of!=NULL)){\n    ret=op_open1(of,_source,_cb,_initial_data,_initial_bytes);\n    if(OP_LIKELY(ret>=0)){\n      if(_error!=NULL)*_error=0;\n      return of;\n    }\n    /*Don't auto-close the stream on failure.*/\n    of->callbacks.close=NULL;\n    op_clear(of);\n    _ogg_free(of);\n  }\n  if(_error!=NULL)*_error=ret;\n  return NULL;\n}\n\nOggOpusFile *op_open_callbacks(void *_source,const OpusFileCallbacks *_cb,\n const unsigned char *_initial_data,size_t _initial_bytes,int *_error){\n  OggOpusFile *of;\n  of=op_test_callbacks(_source,_cb,_initial_data,_initial_bytes,_error);\n  if(OP_LIKELY(of!=NULL)){\n    int ret;\n    ret=op_open2(of);\n    if(OP_LIKELY(ret>=0))return of;\n    if(_error!=NULL)*_error=ret;\n    _ogg_free(of);\n  }\n  return NULL;\n}\n\n/*Convenience routine to clean up from failure for the open functions that\n   create their own streams.*/\nstatic OggOpusFile *op_open_close_on_failure(void *_source,\n const OpusFileCallbacks *_cb,int *_error){\n  OggOpusFile *of;\n  if(OP_UNLIKELY(_source==NULL)){\n    if(_error!=NULL)*_error=OP_EFAULT;\n    return NULL;\n  }\n  of=op_open_callbacks(_source,_cb,NULL,0,_error);\n  if(OP_UNLIKELY(of==NULL))(*_cb->close)(_source);\n  return of;\n}\n\nOggOpusFile *op_open_file(const char *_path,int *_error){\n  OpusFileCallbacks cb;\n  return op_open_close_on_failure(op_fopen(&cb,_path,\"rb\"),&cb,_error);\n}\n\nOggOpusFile *op_open_memory(const unsigned char *_data,size_t _size,\n int *_error){\n  OpusFileCallbacks cb;\n  return op_open_close_on_failure(op_mem_stream_create(&cb,_data,_size),&cb,\n   _error);\n}\n\n/*Convenience routine to clean up from failure for the open functions that\n   create their own streams.*/\nstatic OggOpusFile *op_test_close_on_failure(void *_source,\n const OpusFileCallbacks *_cb,int *_error){\n  OggOpusFile *of;\n  if(OP_UNLIKELY(_source==NULL)){\n    if(_error!=NULL)*_error=OP_EFAULT;\n    return NULL;\n  }\n  of=op_test_callbacks(_source,_cb,NULL,0,_error);\n  if(OP_UNLIKELY(of==NULL))(*_cb->close)(_source);\n  return of;\n}\n\nOggOpusFile *op_test_file(const char *_path,int *_error){\n  OpusFileCallbacks cb;\n  return op_test_close_on_failure(op_fopen(&cb,_path,\"rb\"),&cb,_error);\n}\n\nOggOpusFile *op_test_memory(const unsigned char *_data,size_t _size,\n int *_error){\n  OpusFileCallbacks cb;\n  return op_test_close_on_failure(op_mem_stream_create(&cb,_data,_size),&cb,\n   _error);\n}\n\nint op_test_open(OggOpusFile *_of){\n  int ret;\n  if(OP_UNLIKELY(_of->ready_state!=OP_PARTOPEN))return OP_EINVAL;\n  ret=op_open2(_of);\n  /*op_open2() will clear this structure on failure.\n    Reset its contents to prevent double-frees in op_free().*/\n  if(OP_UNLIKELY(ret<0))memset(_of,0,sizeof(*_of));\n  return ret;\n}\n\nvoid op_free(OggOpusFile *_of){\n  if(OP_LIKELY(_of!=NULL)){\n    op_clear(_of);\n    _ogg_free(_of);\n  }\n}\n\nint op_seekable(const OggOpusFile *_of){\n  return _of->seekable;\n}\n\nint op_link_count(const OggOpusFile *_of){\n  return _of->nlinks;\n}\n\nogg_uint32_t op_serialno(const OggOpusFile *_of,int _li){\n  if(OP_UNLIKELY(_li>=_of->nlinks))_li=_of->nlinks-1;\n  if(!_of->seekable)_li=0;\n  return _of->links[_li<0?_of->cur_link:_li].serialno;\n}\n\nint op_channel_count(const OggOpusFile *_of,int _li){\n  return op_head(_of,_li)->channel_count;\n}\n\nopus_int64 op_raw_total(const OggOpusFile *_of,int _li){\n  if(OP_UNLIKELY(_of->ready_state<OP_OPENED)\n   ||OP_UNLIKELY(!_of->seekable)\n   ||OP_UNLIKELY(_li>=_of->nlinks)){\n    return OP_EINVAL;\n  }\n  if(_li<0)return _of->end-_of->links[0].offset;\n  return (_li+1>=_of->nlinks?_of->end:_of->links[_li+1].offset)\n   -_of->links[_li].offset;\n}\n\nogg_int64_t op_pcm_total(const OggOpusFile *_of,int _li){\n  OggOpusLink *links;\n  ogg_int64_t  diff;\n  int          nlinks;\n  nlinks=_of->nlinks;\n  if(OP_UNLIKELY(_of->ready_state<OP_OPENED)\n   ||OP_UNLIKELY(!_of->seekable)\n   ||OP_UNLIKELY(_li>=nlinks)){\n    return OP_EINVAL;\n  }\n  links=_of->links;\n  /*We verify that the granule position differences are larger than the\n     pre-skip and that the total duration does not overflow during link\n     enumeration, so we don't have to check here.*/\n  if(_li<0){\n    ogg_int64_t pcm_total;\n    int         li;\n    pcm_total=0;\n    for(li=0;li<nlinks;li++){\n      OP_ALWAYS_TRUE(!op_granpos_diff(&diff,\n       links[li].pcm_end,links[li].pcm_start));\n      pcm_total+=diff-links[li].head.pre_skip;\n    }\n    return pcm_total;\n  }\n  OP_ALWAYS_TRUE(!op_granpos_diff(&diff,\n   links[_li].pcm_end,links[_li].pcm_start));\n  return diff-links[_li].head.pre_skip;\n}\n\nconst OpusHead *op_head(const OggOpusFile *_of,int _li){\n  if(OP_UNLIKELY(_li>=_of->nlinks))_li=_of->nlinks-1;\n  if(!_of->seekable)_li=0;\n  return &_of->links[_li<0?_of->cur_link:_li].head;\n}\n\nconst OpusTags *op_tags(const OggOpusFile *_of,int _li){\n  if(OP_UNLIKELY(_li>=_of->nlinks))_li=_of->nlinks-1;\n  if(!_of->seekable){\n    if(_of->ready_state<OP_STREAMSET&&_of->ready_state!=OP_PARTOPEN){\n      return NULL;\n    }\n    _li=0;\n  }\n  else if(_li<0)_li=_of->ready_state>=OP_STREAMSET?_of->cur_link:0;\n  return &_of->links[_li].tags;\n}\n\nint op_current_link(const OggOpusFile *_of){\n  if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL;\n  return _of->cur_link;\n}\n\n/*Compute an average bitrate given a byte and sample count.\n  Return: The bitrate in bits per second.*/\nstatic opus_int32 op_calc_bitrate(opus_int64 _bytes,ogg_int64_t _samples){\n  /*These rates are absurd, but let's handle them anyway.*/\n  if(OP_UNLIKELY(_bytes>(OP_INT64_MAX-(_samples>>1))/(48000*8))){\n    ogg_int64_t den;\n    if(OP_UNLIKELY(_bytes/(OP_INT32_MAX/(48000*8))>=_samples)){\n      return OP_INT32_MAX;\n    }\n    den=_samples/(48000*8);\n    return (opus_int32)((_bytes+(den>>1))/den);\n  }\n  if(OP_UNLIKELY(_samples<=0))return OP_INT32_MAX;\n  /*This can't actually overflow in normal operation: even with a pre-skip of\n     545 2.5 ms frames with 8 streams running at 1282*8+1 bytes per packet\n     (1275 byte frames + Opus framing overhead + Ogg lacing values), that all\n     produce a single sample of decoded output, we still don't top 45 Mbps.\n    The only way to get bitrates larger than that is with excessive Opus\n     padding, more encoded streams than output channels, or lots and lots of\n     Ogg pages with no packets on them.*/\n  return (opus_int32)OP_MIN((_bytes*48000*8+(_samples>>1))/_samples,\n   OP_INT32_MAX);\n}\n\nopus_int32 op_bitrate(const OggOpusFile *_of,int _li){\n  if(OP_UNLIKELY(_of->ready_state<OP_OPENED)||OP_UNLIKELY(!_of->seekable)\n   ||OP_UNLIKELY(_li>=_of->nlinks)){\n    return OP_EINVAL;\n  }\n  return op_calc_bitrate(op_raw_total(_of,_li),op_pcm_total(_of,_li));\n}\n\nopus_int32 op_bitrate_instant(OggOpusFile *_of){\n  ogg_int64_t samples_tracked;\n  opus_int32  ret;\n  if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL;\n  samples_tracked=_of->samples_tracked;\n  if(OP_UNLIKELY(samples_tracked==0))return OP_FALSE;\n  ret=op_calc_bitrate(_of->bytes_tracked,samples_tracked);\n  _of->bytes_tracked=0;\n  _of->samples_tracked=0;\n  return ret;\n}\n\n/*Fetch and process a page.\n  This handles the case where we're at a bitstream boundary and dumps the\n   decoding machine.\n  If the decoding machine is unloaded, it loads it.\n  It also keeps prev_packet_gp up to date (seek and read both use this; seek\n   uses a special hack with _readp).\n  Return: <0) Error, OP_HOLE (lost packet), or OP_EOF.\n           0) Need more data (only if _readp==0).\n           1) Got at least one audio data packet.*/\nstatic int op_fetch_and_process_page(OggOpusFile *_of,\n ogg_page *_og,opus_int64 _page_pos,int _readp,int _spanp,int _ignore_holes){\n  OggOpusLink  *links;\n  ogg_uint32_t  cur_serialno;\n  int           seekable;\n  int           cur_link;\n  int           ret;\n  /*We shouldn't get here if we have unprocessed packets.*/\n  OP_ASSERT(_of->ready_state<OP_INITSET||_of->op_pos>=_of->op_count);\n  if(!_readp)return 0;\n  seekable=_of->seekable;\n  links=_of->links;\n  cur_link=seekable?_of->cur_link:0;\n  cur_serialno=links[cur_link].serialno;\n  /*Handle one page.*/\n  for(;;){\n    ogg_page og;\n    OP_ASSERT(_of->ready_state>=OP_OPENED);\n    /*This loop is not strictly necessary, but there's no sense in doing the\n       extra checks of the larger loop for the common case in a multiplexed\n       bistream where the page is simply part of a different logical\n       bitstream.*/\n    do{\n      /*If we were given a page to use, use it.*/\n      if(_og!=NULL){\n        *&og=*_og;\n        _og=NULL;\n      }\n      /*Keep reading until we get a page with the correct serialno.*/\n      else _page_pos=op_get_next_page(_of,&og,_of->end);\n      /*EOF: Leave uninitialized.*/\n      if(_page_pos<0)return _page_pos<OP_FALSE?(int)_page_pos:OP_EOF;\n      if(OP_LIKELY(_of->ready_state>=OP_STREAMSET)){\n        if(cur_serialno!=(ogg_uint32_t)ogg_page_serialno(&og)){\n          /*Two possibilities:\n             1) Another stream is multiplexed into this logical section, or*/\n          if(OP_LIKELY(!ogg_page_bos(&og)))continue;\n          /* 2) Our decoding just traversed a bitstream boundary.*/\n          if(!_spanp)return OP_EOF;\n          if(OP_LIKELY(_of->ready_state>=OP_INITSET))op_decode_clear(_of);\n          break;\n        }\n      }\n      /*Bitrate tracking: add the header's bytes here.\n        The body bytes are counted when we consume the packets.*/\n      _of->bytes_tracked+=og.header_len;\n    }\n    while(0);\n    /*Do we need to load a new machine before submitting the page?\n      This is different in the seekable and non-seekable cases.\n      In the seekable case, we already have all the header information loaded\n       and cached.\n      We just initialize the machine with it and continue on our merry way.\n      In the non-seekable (streaming) case, we'll only be at a boundary if we\n       just left the previous logical bitstream, and we're now nominally at the\n       header of the next bitstream.*/\n    if(OP_UNLIKELY(_of->ready_state<OP_STREAMSET)){\n      if(seekable){\n        ogg_uint32_t serialno;\n        int          nlinks;\n        int          li;\n        serialno=ogg_page_serialno(&og);\n        /*Match the serialno to bitstream section.\n          We use this rather than offset positions to avoid problems near\n           logical bitstream boundaries.*/\n        nlinks=_of->nlinks;\n        for(li=0;li<nlinks&&links[li].serialno!=serialno;li++);\n        /*Not a desired Opus bitstream section.\n          Keep trying.*/\n        if(li>=nlinks)continue;\n        cur_serialno=serialno;\n        _of->cur_link=cur_link=li;\n        ogg_stream_reset_serialno(&_of->os,serialno);\n        _of->ready_state=OP_STREAMSET;\n        /*If we're at the start of this link, initialize the granule position\n           and pre-skip tracking.*/\n        if(_page_pos<=links[cur_link].data_offset){\n          _of->prev_packet_gp=links[cur_link].pcm_start;\n          _of->cur_discard_count=links[cur_link].head.pre_skip;\n          /*Ignore a hole at the start of a new link (this is common for\n             streams joined in the middle) or after seeking.*/\n          _ignore_holes=1;\n        }\n      }\n      else{\n        do{\n          /*We're streaming.\n            Fetch the two header packets, build the info struct.*/\n          ret=op_fetch_headers(_of,&links[0].head,&links[0].tags,\n           NULL,NULL,NULL,&og);\n          if(OP_UNLIKELY(ret<0))return ret;\n          /*op_find_initial_pcm_offset() will suppress any initial hole for us,\n             so no need to set _ignore_holes.*/\n          ret=op_find_initial_pcm_offset(_of,links,&og);\n          if(OP_UNLIKELY(ret<0))return ret;\n          _of->links[0].serialno=cur_serialno=_of->os.serialno;\n          _of->cur_link++;\n        }\n        /*If the link was empty, keep going, because we already have the\n           BOS page of the next one in og.*/\n        while(OP_UNLIKELY(ret>0));\n        /*If we didn't get any packets out of op_find_initial_pcm_offset(),\n           keep going (this is possible if end-trimming trimmed them all).*/\n        if(_of->op_count<=0)continue;\n        /*Otherwise, we're done.*/\n        ret=op_make_decode_ready(_of);\n        if(OP_UNLIKELY(ret<0))return ret;\n        return 1;\n      }\n    }\n    /*The buffered page is the data we want, and we're ready for it.\n      Add it to the stream state.*/\n    if(OP_UNLIKELY(_of->ready_state==OP_STREAMSET)){\n      ret=op_make_decode_ready(_of);\n      if(OP_UNLIKELY(ret<0))return ret;\n    }\n    /*Extract all the packets from the current page.*/\n    ogg_stream_pagein(&_of->os,&og);\n    if(OP_LIKELY(_of->ready_state>=OP_INITSET)){\n      opus_int32 total_duration;\n      int        durations[255];\n      int        op_count;\n      total_duration=op_collect_audio_packets(_of,durations);\n      if(OP_UNLIKELY(total_duration<0)){\n        /*Drain the packets from the page anyway.*/\n        total_duration=op_collect_audio_packets(_of,durations);\n        OP_ASSERT(total_duration>=0);\n        /*Report holes to the caller.*/\n        if(!_ignore_holes)return OP_HOLE;\n      }\n      op_count=_of->op_count;\n      /*If we found at least one audio data packet, compute per-packet granule\n         positions for them.*/\n      if(op_count>0){\n        ogg_int64_t diff;\n        ogg_int64_t prev_packet_gp;\n        ogg_int64_t cur_packet_gp;\n        ogg_int64_t cur_page_gp;\n        int         cur_page_eos;\n        int         pi;\n        cur_page_gp=_of->op[op_count-1].granulepos;\n        cur_page_eos=_of->op[op_count-1].e_o_s;\n        prev_packet_gp=_of->prev_packet_gp;\n        if(OP_UNLIKELY(prev_packet_gp==-1)){\n          opus_int32 cur_discard_count;\n          /*This is the first call after a raw seek.\n            Try to reconstruct prev_packet_gp from scratch.*/\n          OP_ASSERT(seekable);\n          if(OP_UNLIKELY(cur_page_eos)){\n            /*If the first page we hit after our seek was the EOS page, and\n               we didn't start from data_offset or before, we don't have\n               enough information to do end-trimming.\n              Proceed to the next link, rather than risk playing back some\n               samples that shouldn't have been played.*/\n            _of->op_count=0;\n            continue;\n          }\n          /*By default discard 80 ms of data after a seek, unless we seek\n             into the pre-skip region.*/\n          cur_discard_count=80*48;\n          cur_page_gp=_of->op[op_count-1].granulepos;\n          /*Try to initialize prev_packet_gp.\n            If the current page had packets but didn't have a granule\n             position, or the granule position it had was too small (both\n             illegal), just use the starting granule position for the link.*/\n          prev_packet_gp=links[cur_link].pcm_start;\n          if(OP_LIKELY(cur_page_gp!=-1)){\n            op_granpos_add(&prev_packet_gp,cur_page_gp,-total_duration);\n          }\n          if(OP_LIKELY(!op_granpos_diff(&diff,\n           prev_packet_gp,links[cur_link].pcm_start))){\n            opus_int32 pre_skip;\n            /*If we start at the beginning of the pre-skip region, or we're\n               at least 80 ms from the end of the pre-skip region, we discard\n               to the end of the pre-skip region.\n              Otherwise, we still use the 80 ms default, which will discard\n               past the end of the pre-skip region.*/\n            pre_skip=links[cur_link].head.pre_skip;\n            if(diff>=0&&diff<=OP_MAX(0,pre_skip-80*48)){\n              cur_discard_count=pre_skip-(int)diff;\n            }\n          }\n          _of->cur_discard_count=cur_discard_count;\n        }\n        if(OP_UNLIKELY(cur_page_gp==-1)){\n          /*This page had completed packets but didn't have a valid granule\n             position.\n            This is illegal, but we'll try to handle it by continuing to count\n             forwards from the previous page.*/\n          if(op_granpos_add(&cur_page_gp,prev_packet_gp,total_duration)<0){\n            /*The timestamp for this page overflowed.*/\n            cur_page_gp=links[cur_link].pcm_end;\n          }\n        }\n        /*If we hit the last page, handle end-trimming.*/\n        if(OP_UNLIKELY(cur_page_eos)\n         &&OP_LIKELY(!op_granpos_diff(&diff,cur_page_gp,prev_packet_gp))\n         &&OP_LIKELY(diff<total_duration)){\n          cur_packet_gp=prev_packet_gp;\n          for(pi=0;pi<op_count;pi++){\n            diff=durations[pi]-diff;\n            /*If we have samples to trim...*/\n            if(diff>0){\n              /*If we trimmed the entire packet, stop (the spec says encoders\n                 shouldn't do this, but we support it anyway).*/\n              if(OP_UNLIKELY(diff>durations[pi]))break;\n              cur_packet_gp=cur_page_gp;\n              /*Move the EOS flag to this packet, if necessary, so we'll trim\n                 the samples during decode.*/\n              _of->op[pi].e_o_s=1;\n            }\n            else{\n              /*Update the granule position as normal.*/\n              OP_ALWAYS_TRUE(!op_granpos_add(&cur_packet_gp,\n               cur_packet_gp,durations[pi]));\n            }\n            _of->op[pi].granulepos=cur_packet_gp;\n            OP_ALWAYS_TRUE(!op_granpos_diff(&diff,cur_page_gp,cur_packet_gp));\n          }\n        }\n        else{\n          /*Propagate timestamps to earlier packets.\n            op_granpos_add(&prev_packet_gp,prev_packet_gp,total_duration)\n             should succeed and give prev_packet_gp==cur_page_gp.\n            But we don't bother to check that, as there isn't much we can do\n             if it's not true.\n            The only thing we guarantee is that the start and end granule\n             positions of the packets are valid, and that they are monotonic\n             within a page.\n            They might be completely out of range for this link (we'll check\n             that elsewhere), or non-monotonic between pages.*/\n          if(OP_UNLIKELY(op_granpos_add(&prev_packet_gp,\n           cur_page_gp,-total_duration)<0)){\n            /*The starting timestamp for the first packet on this page\n               underflowed.\n              This is illegal, but we ignore it.*/\n            prev_packet_gp=0;\n          }\n          for(pi=0;pi<op_count;pi++){\n            if(OP_UNLIKELY(op_granpos_add(&cur_packet_gp,\n             cur_page_gp,-total_duration)<0)){\n              /*The start timestamp for this packet underflowed.\n                This is illegal, but we ignore it.*/\n              cur_packet_gp=0;\n            }\n            total_duration-=durations[pi];\n            OP_ASSERT(total_duration>=0);\n            OP_ALWAYS_TRUE(!op_granpos_add(&cur_packet_gp,\n             cur_packet_gp,durations[pi]));\n            _of->op[pi].granulepos=cur_packet_gp;\n          }\n          OP_ASSERT(total_duration==0);\n        }\n        _of->prev_packet_gp=prev_packet_gp;\n        _of->op_count=pi;\n        /*If end-trimming didn't trim all the packets, we're done.*/\n        if(OP_LIKELY(pi>0))return 1;\n      }\n    }\n  }\n}\n\nint op_raw_seek(OggOpusFile *_of,opus_int64 _pos){\n  int ret;\n  if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL;\n  /*Don't dump the decoder state if we can't seek.*/\n  if(OP_UNLIKELY(!_of->seekable))return OP_ENOSEEK;\n  if(OP_UNLIKELY(_pos<0)||OP_UNLIKELY(_pos>_of->end))return OP_EINVAL;\n  /*Clear out any buffered, decoded data.*/\n  op_decode_clear(_of);\n  _of->bytes_tracked=0;\n  _of->samples_tracked=0;\n  ret=op_seek_helper(_of,_pos);\n  if(OP_UNLIKELY(ret<0))return OP_EREAD;\n  ret=op_fetch_and_process_page(_of,NULL,-1,1,1,1);\n  /*If we hit EOF, op_fetch_and_process_page() leaves us uninitialized.\n    Instead, jump to the end.*/\n  if(ret==OP_EOF){\n    int cur_link;\n    op_decode_clear(_of);\n    cur_link=_of->nlinks-1;\n    _of->cur_link=cur_link;\n    _of->prev_packet_gp=_of->links[cur_link].pcm_end;\n    _of->cur_discard_count=0;\n    ret=0;\n  }\n  else if(ret>0)ret=0;\n  return ret;\n}\n\n/*Convert a PCM offset relative to the start of the whole stream to a granule\n   position in an individual link.*/\nstatic ogg_int64_t op_get_granulepos(const OggOpusFile *_of,\n ogg_int64_t _pcm_offset,int *_li){\n  const OggOpusLink *links;\n  ogg_int64_t        duration;\n  int                nlinks;\n  int                li;\n  OP_ASSERT(_pcm_offset>=0);\n  nlinks=_of->nlinks;\n  links=_of->links;\n  for(li=0;OP_LIKELY(li<nlinks);li++){\n    ogg_int64_t pcm_start;\n    opus_int32  pre_skip;\n    pcm_start=links[li].pcm_start;\n    pre_skip=links[li].head.pre_skip;\n    OP_ALWAYS_TRUE(!op_granpos_diff(&duration,links[li].pcm_end,pcm_start));\n    duration-=pre_skip;\n    if(_pcm_offset<duration){\n      _pcm_offset+=pre_skip;\n      if(OP_UNLIKELY(pcm_start>OP_INT64_MAX-_pcm_offset)){\n        /*Adding this amount to the granule position would overflow the positive\n           half of its 64-bit range.\n          Since signed overflow is undefined in C, do it in a way the compiler\n           isn't allowed to screw up.*/\n        _pcm_offset-=OP_INT64_MAX-pcm_start+1;\n        pcm_start=OP_INT64_MIN;\n      }\n      pcm_start+=_pcm_offset;\n      *_li=li;\n      return pcm_start;\n    }\n    _pcm_offset-=duration;\n  }\n  return -1;\n}\n\n/*This controls how close the target has to be to use the current stream\n   position to subdivide the initial range.\n  Two minutes seems to be a good default.*/\n#define OP_CUR_TIME_THRESH (120*48*(opus_int32)1000)\n\n/*Note: The OP_SMALL_FOOTPRINT #define doesn't (currently) save much code size,\n   but it's meant to serve as documentation for portions of the seeking\n   algorithm that are purely optional, to aid others learning from/porting this\n   code to other contexts.*/\n/*#define OP_SMALL_FOOTPRINT (1)*/\n\n/*Search within link _li for the page with the highest granule position\n   preceding (or equal to) _target_gp.\n  There is a danger here: missing pages or incorrect frame number information\n   in the bitstream could make our task impossible.\n  Account for that (and report it as an error condition).*/\nstatic int op_pcm_seek_page(OggOpusFile *_of,\n ogg_int64_t _target_gp,int _li){\n  const OggOpusLink *link;\n  ogg_page           og;\n  ogg_int64_t        pcm_pre_skip;\n  ogg_int64_t        pcm_start;\n  ogg_int64_t        pcm_end;\n  ogg_int64_t        best_gp;\n  ogg_int64_t        diff;\n  ogg_uint32_t       serialno;\n  opus_int32         pre_skip;\n  opus_int64         begin;\n  opus_int64         end;\n  opus_int64         boundary;\n  opus_int64         best;\n  opus_int64         page_offset;\n  opus_int64         d0;\n  opus_int64         d1;\n  opus_int64         d2;\n  int                force_bisect;\n  int                ret;\n  _of->bytes_tracked=0;\n  _of->samples_tracked=0;\n  link=_of->links+_li;\n  best_gp=pcm_start=link->pcm_start;\n  pcm_end=link->pcm_end;\n  serialno=link->serialno;\n  best=begin=link->data_offset;\n  page_offset=-1;\n  /*We discard the first 80 ms of data after a seek, so seek back that much\n     farther.\n    If we can't, simply seek to the beginning of the link.*/\n  if(OP_UNLIKELY(op_granpos_add(&_target_gp,_target_gp,-80*48)<0)\n   ||OP_UNLIKELY(op_granpos_cmp(_target_gp,pcm_start)<0)){\n    _target_gp=pcm_start;\n  }\n  /*Special case seeking to the start of the link.*/\n  pre_skip=link->head.pre_skip;\n  OP_ALWAYS_TRUE(!op_granpos_add(&pcm_pre_skip,pcm_start,pre_skip));\n  if(op_granpos_cmp(_target_gp,pcm_pre_skip)<0)end=boundary=begin;\n  else{\n    end=boundary=link->end_offset;\n#if !defined(OP_SMALL_FOOTPRINT)\n    /*If we were decoding from this link, we can narrow the range a bit.*/\n    if(_li==_of->cur_link&&_of->ready_state>=OP_INITSET){\n      opus_int64 offset;\n      int        op_count;\n      op_count=_of->op_count;\n      /*The only way the offset can be invalid _and_ we can fail the granule\n         position checks below is if someone changed the contents of the last\n         page since we read it.\n        We'd be within our rights to just return OP_EBADLINK in that case, but\n         we'll simply ignore the current position instead.*/\n      offset=_of->offset;\n      if(op_count>0&&OP_LIKELY(offset<=end)){\n        ogg_int64_t gp;\n        /*Make sure the timestamp is valid.\n          The granule position might be -1 if we collected the packets from a\n           page without a granule position after reporting a hole.*/\n        gp=_of->op[op_count-1].granulepos;\n        if(OP_LIKELY(gp!=-1)&&OP_LIKELY(op_granpos_cmp(pcm_start,gp)<0)\n         &&OP_LIKELY(op_granpos_cmp(pcm_end,gp)>0)){\n          OP_ALWAYS_TRUE(!op_granpos_diff(&diff,gp,_target_gp));\n          /*We only actually use the current time if either\n            a) We can cut off at least half the range, or\n            b) We're seeking sufficiently close to the current position that\n                it's likely to be informative.\n            Otherwise it appears using the whole link range to estimate the\n             first seek location gives better results, on average.*/\n          if(diff<0){\n            OP_ASSERT(offset>=begin);\n            if(offset-begin>=end-begin>>1||diff>-OP_CUR_TIME_THRESH){\n              best=begin=offset;\n              best_gp=pcm_start=gp;\n            }\n          }\n          else{\n            ogg_int64_t prev_page_gp;\n            /*We might get lucky and already have the packet with the target\n               buffered.\n              Worth checking.\n              For very small files (with all of the data in a single page,\n               generally 1 second or less), we can loop them continuously\n               without seeking at all.*/\n            OP_ALWAYS_TRUE(!op_granpos_add(&prev_page_gp,_of->op[0].granulepos,\n             op_get_packet_duration(_of->op[0].packet,_of->op[0].bytes)));\n            if(op_granpos_cmp(prev_page_gp,_target_gp)<=0){\n              /*Don't call op_decode_clear(), because it will dump our\n                 packets.*/\n              _of->op_pos=0;\n              _of->od_buffer_size=0;\n              _of->prev_packet_gp=prev_page_gp;\n              _of->ready_state=OP_STREAMSET;\n              return op_make_decode_ready(_of);\n            }\n            /*No such luck.\n              Check if we can cut off at least half the range, though.*/\n            if(offset-begin<=end-begin>>1||diff<OP_CUR_TIME_THRESH){\n              /*We really want the page start here, but this will do.*/\n              end=boundary=offset;\n              pcm_end=gp;\n            }\n          }\n        }\n      }\n    }\n#endif\n  }\n  /*This code was originally based on the \"new search algorithm by HB (Nicholas\n     Vinen)\" from libvorbisfile.\n    It has been modified substantially since.*/\n  op_decode_clear(_of);\n  /*Initialize the interval size history.*/\n  d2=d1=d0=end-begin;\n  force_bisect=0;\n  while(begin<end){\n    opus_int64 bisect;\n    opus_int64 next_boundary;\n    opus_int32 chunk_size;\n    if(end-begin<OP_CHUNK_SIZE)bisect=begin;\n    else{\n      /*Update the interval size history.*/\n      d0=d1>>1;\n      d1=d2>>1;\n      d2=end-begin>>1;\n      if(force_bisect)bisect=begin+(end-begin>>1);\n      else{\n        ogg_int64_t diff2;\n        OP_ALWAYS_TRUE(!op_granpos_diff(&diff,_target_gp,pcm_start));\n        OP_ALWAYS_TRUE(!op_granpos_diff(&diff2,pcm_end,pcm_start));\n        /*Take a (pretty decent) guess.*/\n        bisect=begin+op_rescale64(diff,diff2,end-begin)-OP_CHUNK_SIZE;\n      }\n      if(bisect-OP_CHUNK_SIZE<begin)bisect=begin;\n      force_bisect=0;\n    }\n    if(bisect!=_of->offset){\n      page_offset=-1;\n      ret=op_seek_helper(_of,bisect);\n      if(OP_UNLIKELY(ret<0))return ret;\n    }\n    chunk_size=OP_CHUNK_SIZE;\n    next_boundary=boundary;\n    while(begin<end){\n      page_offset=op_get_next_page(_of,&og,boundary);\n      if(page_offset<0){\n        if(page_offset<OP_FALSE)return (int)page_offset;\n        /*There are no more pages in our interval from our stream with a valid\n           timestamp that start at position bisect or later.*/\n        /*If we scanned the whole interval, we're done.*/\n        if(bisect<=begin+1)end=begin;\n        else{\n          /*Otherwise, back up one chunk.*/\n          bisect=OP_MAX(bisect-chunk_size,begin);\n          ret=op_seek_helper(_of,bisect);\n          if(OP_UNLIKELY(ret<0))return ret;\n          /*Bump up the chunk size.*/\n          chunk_size=OP_MIN(2*chunk_size,OP_CHUNK_SIZE_MAX);\n          /*If we did find a page from another stream or without a timestamp,\n             don't read past it.*/\n          boundary=next_boundary;\n        }\n      }\n      else{\n        ogg_int64_t gp;\n        /*Save the offset of the first page we found after the seek, regardless\n           of the stream it came from or whether or not it has a timestamp.*/\n        next_boundary=OP_MIN(page_offset,next_boundary);\n        if(serialno!=(ogg_uint32_t)ogg_page_serialno(&og))continue;\n        gp=ogg_page_granulepos(&og);\n        if(gp==-1)continue;\n        if(op_granpos_cmp(gp,_target_gp)<0){\n          /*We found a page that ends before our target.\n            Advance to the raw offset of the next page.*/\n          begin=_of->offset;\n          if(OP_UNLIKELY(op_granpos_cmp(pcm_start,gp)>0)\n           ||OP_UNLIKELY(op_granpos_cmp(pcm_end,gp)<0)){\n            /*Don't let pcm_start get out of range!\n              That could happen with an invalid timestamp.*/\n            break;\n          }\n          /*Save the byte offset of the end of the page with this granule\n             position.*/\n          best=begin;\n          best_gp=pcm_start=gp;\n          OP_ALWAYS_TRUE(!op_granpos_diff(&diff,_target_gp,pcm_start));\n          /*If we're more than a second away from our target, break out and\n             do another bisection.*/\n          if(diff>48000)break;\n          /*Otherwise, keep scanning forward (do NOT use begin+1).*/\n          bisect=begin;\n        }\n        else{\n          /*We found a page that ends after our target.*/\n          /*If we scanned the whole interval before we found it, we're done.*/\n          if(bisect<=begin+1)end=begin;\n          else{\n            end=bisect;\n            /*In later iterations, don't read past the first page we found.*/\n            boundary=next_boundary;\n            /*If we're not making much progress shrinking the interval size,\n               start forcing straight bisection to limit the worst case.*/\n            force_bisect=end-begin>d0*2;\n            /*Don't let pcm_end get out of range!\n              That could happen with an invalid timestamp.*/\n            if(OP_LIKELY(op_granpos_cmp(pcm_end,gp)>0)\n             &&OP_LIKELY(op_granpos_cmp(pcm_start,gp)<=0)){\n              pcm_end=gp;\n            }\n            break;\n          }\n        }\n      }\n    }\n  }\n  /*Found our page.\n    Seek to the end of it and update prev_packet_gp.\n    Our caller will set cur_discard_count.\n    This is an easier case than op_raw_seek(), as we don't need to keep any\n     packets from the page we found.*/\n  /*Seek, if necessary.*/\n  if(best!=page_offset){\n    page_offset=-1;\n    ret=op_seek_helper(_of,best);\n    if(OP_UNLIKELY(ret<0))return ret;\n  }\n  OP_ASSERT(op_granpos_cmp(best_gp,pcm_start)>=0);\n  _of->cur_link=_li;\n  _of->ready_state=OP_STREAMSET;\n  _of->prev_packet_gp=best_gp;\n  ogg_stream_reset_serialno(&_of->os,serialno);\n  ret=op_fetch_and_process_page(_of,page_offset<0?NULL:&og,page_offset,1,0,1);\n  if(OP_UNLIKELY(ret<=0))return OP_EBADLINK;\n  /*Verify result.*/\n  if(OP_UNLIKELY(op_granpos_cmp(_of->prev_packet_gp,_target_gp)>0)){\n    return OP_EBADLINK;\n  }\n  return 0;\n}\n\nint op_pcm_seek(OggOpusFile *_of,ogg_int64_t _pcm_offset){\n  const OggOpusLink *link;\n  ogg_int64_t        pcm_start;\n  ogg_int64_t        target_gp;\n  ogg_int64_t        prev_packet_gp;\n  ogg_int64_t        skip;\n  ogg_int64_t        diff;\n  int                op_count;\n  int                op_pos;\n  int                ret;\n  int                li;\n  if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL;\n  if(OP_UNLIKELY(!_of->seekable))return OP_ENOSEEK;\n  if(OP_UNLIKELY(_pcm_offset<0))return OP_EINVAL;\n  target_gp=op_get_granulepos(_of,_pcm_offset,&li);\n  if(OP_UNLIKELY(target_gp==-1))return OP_EINVAL;\n  link=_of->links+li;\n  pcm_start=link->pcm_start;\n  OP_ALWAYS_TRUE(!op_granpos_diff(&_pcm_offset,target_gp,pcm_start));\n#if !defined(OP_SMALL_FOOTPRINT)\n  /*For small (90 ms or less) forward seeks within the same link, just decode\n     forward.\n    This also optimizes the case of seeking to the current position.*/\n  if(li==_of->cur_link&&_of->ready_state>=OP_INITSET){\n    ogg_int64_t gp;\n    gp=_of->prev_packet_gp;\n    if(OP_LIKELY(gp!=-1)){\n      int nbuffered;\n      nbuffered=OP_MAX(_of->od_buffer_size-_of->od_buffer_pos,0);\n      OP_ALWAYS_TRUE(!op_granpos_add(&gp,gp,-nbuffered));\n      /*We do _not_ add cur_discard_count to gp.\n        Otherwise the total amount to discard could grow without bound, and it\n         would be better just to do a full seek.*/\n      if(OP_LIKELY(!op_granpos_diff(&diff,gp,pcm_start))){\n        ogg_int64_t discard_count;\n        discard_count=_pcm_offset-diff;\n        /*We use a threshold of 90 ms instead of 80, since 80 ms is the\n           _minimum_ we would have discarded after a full seek.\n          Assuming 20 ms frames (the default), we'd discard 90 ms on average.*/\n        if(discard_count>=0&&OP_UNLIKELY(discard_count<90*48)){\n          _of->cur_discard_count=(opus_int32)discard_count;\n          return 0;\n        }\n      }\n    }\n  }\n#endif\n  ret=op_pcm_seek_page(_of,target_gp,li);\n  if(OP_UNLIKELY(ret<0))return ret;\n  /*Now skip samples until we actually get to our target.*/\n  /*Figure out where we should skip to.*/\n  if(_pcm_offset<=link->head.pre_skip)skip=0;\n  else skip=OP_MAX(_pcm_offset-80*48,0);\n  OP_ASSERT(_pcm_offset-skip>=0);\n  OP_ASSERT(_pcm_offset-skip<OP_INT32_MAX-120*48);\n  /*Skip packets until we find one with samples past our skip target.*/\n  for(;;){\n    op_count=_of->op_count;\n    prev_packet_gp=_of->prev_packet_gp;\n    for(op_pos=_of->op_pos;op_pos<op_count;op_pos++){\n      ogg_int64_t cur_packet_gp;\n      cur_packet_gp=_of->op[op_pos].granulepos;\n      if(OP_LIKELY(!op_granpos_diff(&diff,cur_packet_gp,pcm_start))\n       &&diff>skip){\n        break;\n      }\n      prev_packet_gp=cur_packet_gp;\n    }\n    _of->prev_packet_gp=prev_packet_gp;\n    _of->op_pos=op_pos;\n    if(op_pos<op_count)break;\n    /*We skipped all the packets on this page.\n      Fetch another.*/\n    ret=op_fetch_and_process_page(_of,NULL,-1,1,0,1);\n    if(OP_UNLIKELY(ret<=0))return OP_EBADLINK;\n  }\n  OP_ALWAYS_TRUE(!op_granpos_diff(&diff,prev_packet_gp,pcm_start));\n  /*We skipped too far.\n    Either the timestamps were illegal or there was a hole in the data.*/\n  if(diff>skip)return OP_EBADLINK;\n  OP_ASSERT(_pcm_offset-diff<OP_INT32_MAX);\n  /*TODO: If there are further holes/illegal timestamps, we still won't decode\n     to the correct sample.\n    However, at least op_pcm_tell() will report the correct value immediately\n     after returning.*/\n  _of->cur_discard_count=(opus_int32)(_pcm_offset-diff);\n  return 0;\n}\n\nopus_int64 op_raw_tell(const OggOpusFile *_of){\n  if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL;\n  return _of->offset;\n}\n\n/*Convert a granule position from a given link to a PCM offset relative to the\n   start of the whole stream.\n  For unseekable sources, this gets reset to 0 at the beginning of each link.*/\nstatic ogg_int64_t op_get_pcm_offset(const OggOpusFile *_of,\n ogg_int64_t _gp,int _li){\n  const OggOpusLink *links;\n  ogg_int64_t        pcm_offset;\n  ogg_int64_t        delta;\n  int                li;\n  links=_of->links;\n  pcm_offset=0;\n  OP_ASSERT(_li<_of->nlinks);\n  for(li=0;li<_li;li++){\n    OP_ALWAYS_TRUE(!op_granpos_diff(&delta,\n     links[li].pcm_end,links[li].pcm_start));\n    delta-=links[li].head.pre_skip;\n    pcm_offset+=delta;\n  }\n  OP_ASSERT(_li>=0);\n  if(_of->seekable&&OP_UNLIKELY(op_granpos_cmp(_gp,links[_li].pcm_end)>0)){\n    _gp=links[_li].pcm_end;\n  }\n  if(OP_LIKELY(op_granpos_cmp(_gp,links[_li].pcm_start)>0)){\n    if(OP_UNLIKELY(op_granpos_diff(&delta,_gp,links[_li].pcm_start)<0)){\n      /*This means an unseekable stream claimed to have a page from more than\n         2 billion days after we joined.*/\n      OP_ASSERT(!_of->seekable);\n      return OP_INT64_MAX;\n    }\n    if(delta<links[_li].head.pre_skip)delta=0;\n    else delta-=links[_li].head.pre_skip;\n    /*In the seekable case, _gp was limited by pcm_end.\n      In the unseekable case, pcm_offset should be 0.*/\n    OP_ASSERT(pcm_offset<=OP_INT64_MAX-delta);\n    pcm_offset+=delta;\n  }\n  return pcm_offset;\n}\n\nogg_int64_t op_pcm_tell(const OggOpusFile *_of){\n  ogg_int64_t gp;\n  int         nbuffered;\n  int         li;\n  if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL;\n  gp=_of->prev_packet_gp;\n  if(gp==-1)return 0;\n  nbuffered=OP_MAX(_of->od_buffer_size-_of->od_buffer_pos,0);\n  OP_ALWAYS_TRUE(!op_granpos_add(&gp,gp,-nbuffered));\n  li=_of->seekable?_of->cur_link:0;\n  if(op_granpos_add(&gp,gp,_of->cur_discard_count)<0){\n    gp=_of->links[li].pcm_end;\n  }\n  return op_get_pcm_offset(_of,gp,li);\n}\n\nvoid op_set_decode_callback(OggOpusFile *_of,\n op_decode_cb_func _decode_cb,void *_ctx){\n  _of->decode_cb=_decode_cb;\n  _of->decode_cb_ctx=_ctx;\n}\n\nint op_set_gain_offset(OggOpusFile *_of,\n int _gain_type,opus_int32 _gain_offset_q8){\n  if(_gain_type!=OP_HEADER_GAIN&&_gain_type!=OP_TRACK_GAIN\n   &&_gain_type!=OP_ABSOLUTE_GAIN){\n    return OP_EINVAL;\n  }\n  _of->gain_type=_gain_type;\n  /*The sum of header gain and track gain lies in the range [-65536,65534].\n    These bounds allow the offset to set the final value to anywhere in the\n     range [-32768,32767], which is what we'll clamp it to before applying.*/\n  _of->gain_offset_q8=OP_CLAMP(-98302,_gain_offset_q8,98303);\n  op_update_gain(_of);\n  return 0;\n}\n\nvoid op_set_dither_enabled(OggOpusFile *_of,int _enabled){\n#if !defined(OP_FIXED_POINT)\n  _of->dither_disabled=!_enabled;\n  if(!_enabled)_of->dither_mute=65;\n#endif\n}\n\n/*Allocate the decoder scratch buffer.\n  This is done lazily, since if the user provides large enough buffers, we'll\n   never need it.*/\nstatic int op_init_buffer(OggOpusFile *_of){\n  int nchannels_max;\n  if(_of->seekable){\n    const OggOpusLink *links;\n    int                nlinks;\n    int                li;\n    links=_of->links;\n    nlinks=_of->nlinks;\n    nchannels_max=1;\n    for(li=0;li<nlinks;li++){\n      nchannels_max=OP_MAX(nchannels_max,links[li].head.channel_count);\n    }\n  }\n  else nchannels_max=OP_NCHANNELS_MAX;\n  _of->od_buffer=(op_sample *)_ogg_malloc(\n   sizeof(*_of->od_buffer)*nchannels_max*120*48);\n  if(_of->od_buffer==NULL)return OP_EFAULT;\n  return 0;\n}\n\n/*Decode a single packet into the target buffer.*/\nstatic int op_decode(OggOpusFile *_of,op_sample *_pcm,\n const ogg_packet *_op,int _nsamples,int _nchannels){\n  int ret;\n  /*First we try using the application-provided decode callback.*/\n  if(_of->decode_cb!=NULL){\n#if defined(OP_FIXED_POINT)\n    ret=(*_of->decode_cb)(_of->decode_cb_ctx,_of->od,_pcm,_op,\n     _nsamples,_nchannels,OP_DEC_FORMAT_SHORT,_of->cur_link);\n#else\n    ret=(*_of->decode_cb)(_of->decode_cb_ctx,_of->od,_pcm,_op,\n     _nsamples,_nchannels,OP_DEC_FORMAT_FLOAT,_of->cur_link);\n#endif\n  }\n  else ret=OP_DEC_USE_DEFAULT;\n  /*If the application didn't want to handle decoding, do it ourselves.*/\n  if(ret==OP_DEC_USE_DEFAULT){\n#if defined(OP_FIXED_POINT)\n    ret=opus_multistream_decode(_of->od,\n     _op->packet,_op->bytes,_pcm,_nsamples,0);\n#else\n    ret=opus_multistream_decode_float(_of->od,\n     _op->packet,_op->bytes,_pcm,_nsamples,0);\n#endif\n    OP_ASSERT(ret<0||ret==_nsamples);\n  }\n  /*If the application returned a positive value other than 0 or\n     OP_DEC_USE_DEFAULT, fail.*/\n  else if(OP_UNLIKELY(ret>0))return OP_EBADPACKET;\n  if(OP_UNLIKELY(ret<0))return OP_EBADPACKET;\n  return ret;\n}\n\n/*Read more samples from the stream, using the same API as op_read() or\n   op_read_float().*/\nstatic int op_read_native(OggOpusFile *_of,\n op_sample *_pcm,int _buf_size,int *_li){\n  if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL;\n  for(;;){\n    int ret;\n    if(OP_LIKELY(_of->ready_state>=OP_INITSET)){\n      int nchannels;\n      int od_buffer_pos;\n      int nsamples;\n      int op_pos;\n      nchannels=_of->links[_of->seekable?_of->cur_link:0].head.channel_count;\n      od_buffer_pos=_of->od_buffer_pos;\n      nsamples=_of->od_buffer_size-od_buffer_pos;\n      /*If we have buffered samples, return them.*/\n      if(nsamples>0){\n        if(nsamples*nchannels>_buf_size)nsamples=_buf_size/nchannels;\n        memcpy(_pcm,_of->od_buffer+nchannels*od_buffer_pos,\n         sizeof(*_pcm)*nchannels*nsamples);\n        od_buffer_pos+=nsamples;\n        _of->od_buffer_pos=od_buffer_pos;\n        if(_li!=NULL)*_li=_of->cur_link;\n        return nsamples;\n      }\n      /*If we have buffered packets, decode one.*/\n      op_pos=_of->op_pos;\n      if(OP_LIKELY(op_pos<_of->op_count)){\n        const ogg_packet *pop;\n        ogg_int64_t       diff;\n        opus_int32        cur_discard_count;\n        int               duration;\n        int               trimmed_duration;\n        pop=_of->op+op_pos++;\n        _of->op_pos=op_pos;\n        cur_discard_count=_of->cur_discard_count;\n        duration=op_get_packet_duration(pop->packet,pop->bytes);\n        /*We don't buffer packets with an invalid TOC sequence.*/\n        OP_ASSERT(duration>0);\n        trimmed_duration=duration;\n        /*Perform end-trimming.*/\n        if(OP_UNLIKELY(pop->e_o_s)){\n          if(OP_UNLIKELY(op_granpos_cmp(pop->granulepos,\n           _of->prev_packet_gp)<=0)){\n            trimmed_duration=0;\n          }\n          else if(OP_LIKELY(!op_granpos_diff(&diff,\n           pop->granulepos,_of->prev_packet_gp))){\n            trimmed_duration=(int)OP_MIN(diff,trimmed_duration);\n          }\n        }\n        _of->prev_packet_gp=pop->granulepos;\n        if(OP_UNLIKELY(duration*nchannels>_buf_size)){\n          op_sample *buf;\n          /*If the user's buffer is too small, decode into a scratch buffer.*/\n          buf=_of->od_buffer;\n          if(OP_UNLIKELY(buf==NULL)){\n            ret=op_init_buffer(_of);\n            if(OP_UNLIKELY(ret<0))return ret;\n            buf=_of->od_buffer;\n          }\n          ret=op_decode(_of,buf,pop,duration,nchannels);\n          if(OP_UNLIKELY(ret<0))return ret;\n          /*Perform pre-skip/pre-roll.*/\n          od_buffer_pos=(int)OP_MIN(trimmed_duration,cur_discard_count);\n          cur_discard_count-=od_buffer_pos;\n          _of->cur_discard_count=cur_discard_count;\n          _of->od_buffer_pos=od_buffer_pos;\n          _of->od_buffer_size=trimmed_duration;\n          /*Update bitrate tracking based on the actual samples we used from\n             what was decoded.*/\n          _of->bytes_tracked+=pop->bytes;\n          _of->samples_tracked+=trimmed_duration-od_buffer_pos;\n        }\n        else{\n          /*Otherwise decode directly into the user's buffer.*/\n          ret=op_decode(_of,_pcm,pop,duration,nchannels);\n          if(OP_UNLIKELY(ret<0))return ret;\n          if(OP_LIKELY(trimmed_duration>0)){\n            /*Perform pre-skip/pre-roll.*/\n            od_buffer_pos=(int)OP_MIN(trimmed_duration,cur_discard_count);\n            cur_discard_count-=od_buffer_pos;\n            _of->cur_discard_count=cur_discard_count;\n            trimmed_duration-=od_buffer_pos;\n            if(OP_LIKELY(trimmed_duration>0)\n             &&OP_UNLIKELY(od_buffer_pos>0)){\n              memmove(_pcm,_pcm+od_buffer_pos*nchannels,\n               sizeof(*_pcm)*trimmed_duration*nchannels);\n            }\n            /*Update bitrate tracking based on the actual samples we used from\n               what was decoded.*/\n            _of->bytes_tracked+=pop->bytes;\n            _of->samples_tracked+=trimmed_duration;\n            if(OP_LIKELY(trimmed_duration>0)){\n              if(_li!=NULL)*_li=_of->cur_link;\n              return trimmed_duration;\n            }\n          }\n        }\n        /*Don't grab another page yet.\n          This one might have more packets, or might have buffered data now.*/\n        continue;\n      }\n    }\n    /*Suck in another page.*/\n    ret=op_fetch_and_process_page(_of,NULL,-1,1,1,0);\n    if(OP_UNLIKELY(ret==OP_EOF)){\n      if(_li!=NULL)*_li=_of->cur_link;\n      return 0;\n    }\n    if(OP_UNLIKELY(ret<0))return ret;\n  }\n}\n\n/*A generic filter to apply to the decoded audio data.\n  _src is non-const because we will destructively modify the contents of the\n   source buffer that we consume in some cases.*/\ntypedef int (*op_read_filter_func)(OggOpusFile *_of,void *_dst,int _dst_sz,\n op_sample *_src,int _nsamples,int _nchannels);\n\n/*Decode some samples and then apply a custom filter to them.\n  This is used to convert to different output formats.*/\nstatic int op_filter_read_native(OggOpusFile *_of,void *_dst,int _dst_sz,\n op_read_filter_func _filter,int *_li){\n  int ret;\n  /*Ensure we have some decoded samples in our buffer.*/\n  ret=op_read_native(_of,NULL,0,_li);\n  /*Now apply the filter to them.*/\n  if(OP_LIKELY(ret>=0)&&OP_LIKELY(_of->ready_state>=OP_INITSET)){\n    int od_buffer_pos;\n    od_buffer_pos=_of->od_buffer_pos;\n    ret=_of->od_buffer_size-od_buffer_pos;\n    if(OP_LIKELY(ret>0)){\n      int nchannels;\n      nchannels=_of->links[_of->seekable?_of->cur_link:0].head.channel_count;\n      ret=(*_filter)(_of,_dst,_dst_sz,\n       _of->od_buffer+nchannels*od_buffer_pos,ret,nchannels);\n      OP_ASSERT(ret>=0);\n      OP_ASSERT(ret<=_of->od_buffer_size-od_buffer_pos);\n      od_buffer_pos+=ret;\n      _of->od_buffer_pos=od_buffer_pos;\n    }\n  }\n  return ret;\n}\n\n#if !defined(OP_FIXED_POINT)||!defined(OP_DISABLE_FLOAT_API)\n\n/*Matrices for downmixing from the supported channel counts to stereo.\n  The matrices with 5 or more channels are normalized to a total volume of 2.0,\n   since most mixes sound too quiet if normalized to 1.0 (as there is generally\n   little volume in the side/rear channels).*/\nstatic const float OP_STEREO_DOWNMIX[OP_NCHANNELS_MAX-2][OP_NCHANNELS_MAX][2]={\n  /*3.0*/\n  {\n    {0.5858F,0.0F},{0.4142F,0.4142F},{0.0F,0.5858F}\n  },\n  /*quadrophonic*/\n  {\n    {0.4226F,0.0F},{0.0F,0.4226F},{0.366F,0.2114F},{0.2114F,0.336F}\n  },\n  /*5.0*/\n  {\n    {0.651F,0.0F},{0.46F,0.46F},{0.0F,0.651F},{0.5636F,0.3254F},\n    {0.3254F,0.5636F}\n  },\n  /*5.1*/\n  {\n    {0.529F,0.0F},{0.3741F,0.3741F},{0.0F,0.529F},{0.4582F,0.2645F},\n    {0.2645F,0.4582F},{0.3741F,0.3741F}\n  },\n  /*6.1*/\n  {\n    {0.4553F,0.0F},{0.322F,0.322F},{0.0F,0.4553F},{0.3943F,0.2277F},\n    {0.2277F,0.3943F},{0.2788F,0.2788F},{0.322F,0.322F}\n  },\n  /*7.1*/\n  {\n    {0.3886F,0.0F},{0.2748F,0.2748F},{0.0F,0.3886F},{0.3366F,0.1943F},\n    {0.1943F,0.3366F},{0.3366F,0.1943F},{0.1943F,0.3366F},{0.2748F,0.2748F}\n  }\n};\n\n#endif\n\n#if defined(OP_FIXED_POINT)\n\n/*Matrices for downmixing from the supported channel counts to stereo.\n  The matrices with 5 or more channels are normalized to a total volume of 2.0,\n   since most mixes sound too quiet if normalized to 1.0 (as there is generally\n   little volume in the side/rear channels).\n  Hence we keep the coefficients in Q14, so the downmix values won't overflow a\n   32-bit number.*/\nstatic const opus_int16 OP_STEREO_DOWNMIX_Q14\n [OP_NCHANNELS_MAX-2][OP_NCHANNELS_MAX][2]={\n  /*3.0*/\n  {\n    {9598,0},{6786,6786},{0,9598}\n  },\n  /*quadrophonic*/\n  {\n    {6924,0},{0,6924},{5996,3464},{3464,5996}\n  },\n  /*5.0*/\n  {\n    {10666,0},{7537,7537},{0,10666},{9234,5331},{5331,9234}\n  },\n  /*5.1*/\n  {\n    {8668,0},{6129,6129},{0,8668},{7507,4335},{4335,7507},{6129,6129}\n  },\n  /*6.1*/\n  {\n    {7459,0},{5275,5275},{0,7459},{6460,3731},{3731,6460},{4568,4568},\n    {5275,5275}\n  },\n  /*7.1*/\n  {\n    {6368,0},{4502,4502},{0,6368},{5515,3183},{3183,5515},{5515,3183},\n    {3183,5515},{4502,4502}\n  }\n};\n\nint op_read(OggOpusFile *_of,opus_int16 *_pcm,int _buf_size,int *_li){\n  return op_read_native(_of,_pcm,_buf_size,_li);\n}\n\nstatic int op_stereo_filter(OggOpusFile *_of,void *_dst,int _dst_sz,\n op_sample *_src,int _nsamples,int _nchannels){\n  (void)_of;\n  _nsamples=OP_MIN(_nsamples,_dst_sz>>1);\n  if(_nchannels==2)memcpy(_dst,_src,_nsamples*2*sizeof(*_src));\n  else{\n    opus_int16 *dst;\n    int         i;\n    dst=(opus_int16 *)_dst;\n    if(_nchannels==1){\n      for(i=0;i<_nsamples;i++)dst[2*i+0]=dst[2*i+1]=_src[i];\n    }\n    else{\n      for(i=0;i<_nsamples;i++){\n        opus_int32 l;\n        opus_int32 r;\n        int        ci;\n        l=r=0;\n        for(ci=0;ci<_nchannels;ci++){\n          opus_int32 s;\n          s=_src[_nchannels*i+ci];\n          l+=OP_STEREO_DOWNMIX_Q14[_nchannels-3][ci][0]*s;\n          r+=OP_STEREO_DOWNMIX_Q14[_nchannels-3][ci][1]*s;\n        }\n        /*TODO: For 5 or more channels, we should do soft clipping here.*/\n        dst[2*i+0]=(opus_int16)OP_CLAMP(-32768,l+8192>>14,32767);\n        dst[2*i+1]=(opus_int16)OP_CLAMP(-32768,r+8192>>14,32767);\n      }\n    }\n  }\n  return _nsamples;\n}\n\nint op_read_stereo(OggOpusFile *_of,opus_int16 *_pcm,int _buf_size){\n  return op_filter_read_native(_of,_pcm,_buf_size,op_stereo_filter,NULL);\n}\n\n# if !defined(OP_DISABLE_FLOAT_API)\n\nstatic int op_short2float_filter(OggOpusFile *_of,void *_dst,int _dst_sz,\n op_sample *_src,int _nsamples,int _nchannels){\n  float *dst;\n  int    i;\n  (void)_of;\n  dst=(float *)_dst;\n  if(OP_UNLIKELY(_nsamples*_nchannels>_dst_sz))_nsamples=_dst_sz/_nchannels;\n  _dst_sz=_nsamples*_nchannels;\n  for(i=0;i<_dst_sz;i++)dst[i]=(1.0F/32768)*_src[i];\n  return _nsamples;\n}\n\nint op_read_float(OggOpusFile *_of,float *_pcm,int _buf_size,int *_li){\n  return op_filter_read_native(_of,_pcm,_buf_size,op_short2float_filter,_li);\n}\n\nstatic int op_short2float_stereo_filter(OggOpusFile *_of,\n void *_dst,int _dst_sz,op_sample *_src,int _nsamples,int _nchannels){\n  float *dst;\n  int    i;\n  dst=(float *)_dst;\n  _nsamples=OP_MIN(_nsamples,_dst_sz>>1);\n  if(_nchannels==1){\n    _nsamples=op_short2float_filter(_of,dst,_nsamples,_src,_nsamples,1);\n    for(i=_nsamples;i-->0;)dst[2*i+0]=dst[2*i+1]=dst[i];\n  }\n  else if(_nchannels<5){\n    /*For 3 or 4 channels, we can downmix in fixed point without risk of\n       clipping.*/\n    if(_nchannels>2){\n      _nsamples=op_stereo_filter(_of,_src,_nsamples*2,\n       _src,_nsamples,_nchannels);\n    }\n    return op_short2float_filter(_of,dst,_dst_sz,_src,_nsamples,2);\n  }\n  else{\n    /*For 5 or more channels, we convert to floats and then downmix (so that we\n       don't risk clipping).*/\n    for(i=0;i<_nsamples;i++){\n      float l;\n      float r;\n      int   ci;\n      l=r=0;\n      for(ci=0;ci<_nchannels;ci++){\n        float s;\n        s=(1.0F/32768)*_src[_nchannels*i+ci];\n        l+=OP_STEREO_DOWNMIX[_nchannels-3][ci][0]*s;\n        r+=OP_STEREO_DOWNMIX[_nchannels-3][ci][1]*s;\n      }\n      dst[2*i+0]=l;\n      dst[2*i+1]=r;\n    }\n  }\n  return _nsamples;\n}\n\nint op_read_float_stereo(OggOpusFile *_of,float *_pcm,int _buf_size){\n  return op_filter_read_native(_of,_pcm,_buf_size,\n   op_short2float_stereo_filter,NULL);\n}\n\n# endif\n\n#else\n\n# if defined(OP_HAVE_LRINTF)\n#  include <math.h>\n#  define op_float2int(_x) (lrintf(_x))\n# else\n#  define op_float2int(_x) ((int)((_x)+((_x)<0?-0.5F:0.5F)))\n# endif\n\n/*The dithering code here is adapted from opusdec, part of opus-tools.\n  It was originally written by Greg Maxwell.*/\n\nstatic opus_uint32 op_rand(opus_uint32 _seed){\n  return _seed*96314165+907633515&0xFFFFFFFFU;\n}\n\n/*This implements 16-bit quantization with full triangular dither and IIR noise\n   shaping.\n  The noise shaping filters were designed by Sebastian Gesemann, and are based\n   on the LAME ATH curves with flattening to limit their peak gain to 20 dB.\n  Everyone else's noise shaping filters are mildly crazy.\n  The 48 kHz version of this filter is just a warped version of the 44.1 kHz\n   filter and probably could be improved by shifting the HF shelf up in\n   frequency a little bit, since 48 kHz has a bit more room and being more\n   conservative against bat-ears is probably more important than more noise\n   suppression.\n  This process can increase the peak level of the signal (in theory by the peak\n   error of 1.5 +20 dB, though that is unobservably rare).\n  To avoid clipping, the signal is attenuated by a couple thousandths of a dB.\n  Initially, the approach taken here was to only attenuate by the 99.9th\n   percentile, making clipping rare but not impossible (like SoX), but the\n   limited gain of the filter means that the worst case was only two\n   thousandths of a dB more, so this just uses the worst case.\n  The attenuation is probably also helpful to prevent clipping in the DAC\n   reconstruction filters or downstream resampling, in any case.*/\n\n# define OP_GAIN (32753.0F)\n\n# define OP_PRNG_GAIN (1.0F/0xFFFFFFFF)\n\n/*48 kHz noise shaping filter, sd=2.34.*/\n\nstatic const float OP_FCOEF_B[4]={\n  2.2374F,-0.7339F,-0.1251F,-0.6033F\n};\n\nstatic const float OP_FCOEF_A[4]={\n  0.9030F,0.0116F,-0.5853F,-0.2571F\n};\n\nstatic int op_float2short_filter(OggOpusFile *_of,void *_dst,int _dst_sz,\n float *_src,int _nsamples,int _nchannels){\n  opus_int16 *dst;\n  int         ci;\n  int         i;\n  dst=(opus_int16 *)_dst;\n  if(OP_UNLIKELY(_nsamples*_nchannels>_dst_sz))_nsamples=_dst_sz/_nchannels;\n# if defined(OP_SOFT_CLIP)\n  if(_of->state_channel_count!=_nchannels){\n    for(ci=0;ci<_nchannels;ci++)_of->clip_state[ci]=0;\n  }\n  opus_pcm_soft_clip(_src,_nsamples,_nchannels,_of->clip_state);\n# endif\n  if(_of->dither_disabled){\n    for(i=0;i<_nchannels*_nsamples;i++){\n      dst[i]=op_float2int(OP_CLAMP(-32768,32768.0F*_src[i],32767));\n    }\n  }\n  else{\n    opus_uint32 seed;\n    int         mute;\n    seed=_of->dither_seed;\n    mute=_of->dither_mute;\n    if(_of->state_channel_count!=_nchannels)mute=65;\n    /*In order to avoid replacing digital silence with quiet dither noise, we\n       mute if the output has been silent for a while.*/\n    if(mute>64)memset(_of->dither_a,0,sizeof(*_of->dither_a)*4*_nchannels);\n    for(i=0;i<_nsamples;i++){\n      int silent;\n      silent=1;\n      for(ci=0;ci<_nchannels;ci++){\n        float r;\n        float s;\n        float err;\n        int   si;\n        int   j;\n        s=_src[_nchannels*i+ci];\n        silent&=s==0;\n        s*=OP_GAIN;\n        err=0;\n        for(j=0;j<4;j++){\n          err+=OP_FCOEF_B[j]*_of->dither_b[ci*4+j]\n           -OP_FCOEF_A[j]*_of->dither_a[ci*4+j];\n        }\n        for(j=3;j-->0;)_of->dither_a[ci*4+j+1]=_of->dither_a[ci*4+j];\n        for(j=3;j-->0;)_of->dither_b[ci*4+j+1]=_of->dither_b[ci*4+j];\n        _of->dither_a[ci*4]=err;\n        s-=err;\n        if(mute>16)r=0;\n        else{\n          seed=op_rand(seed);\n          r=seed*OP_PRNG_GAIN;\n          seed=op_rand(seed);\n          r-=seed*OP_PRNG_GAIN;\n        }\n        /*Clamp in float out of paranoia that the input will be > 96 dBFS and\n           wrap if the integer is clamped.*/\n        si=op_float2int(OP_CLAMP(-32768,s+r,32767));\n        dst[_nchannels*i+ci]=(opus_int16)si;\n        /*Including clipping in the noise shaping is generally disastrous: the\n           futile effort to restore the clipped energy results in more clipping.\n          However, small amounts---at the level which could normally be created\n           by dither and rounding---are harmless and can even reduce clipping\n           somewhat due to the clipping sometimes reducing the dither + rounding\n           error.*/\n        _of->dither_b[ci*4]=mute>16?0:OP_CLAMP(-1.5F,si-s,1.5F);\n      }\n      mute++;\n      if(!silent)mute=0;\n    }\n    _of->dither_mute=OP_MIN(mute,65);\n    _of->dither_seed=seed;\n  }\n  _of->state_channel_count=_nchannels;\n  return _nsamples;\n}\n\nint op_read(OggOpusFile *_of,opus_int16 *_pcm,int _buf_size,int *_li){\n  return op_filter_read_native(_of,_pcm,_buf_size,op_float2short_filter,_li);\n}\n\nint op_read_float(OggOpusFile *_of,float *_pcm,int _buf_size,int *_li){\n  _of->state_channel_count=0;\n  return op_read_native(_of,_pcm,_buf_size,_li);\n}\n\nstatic int op_stereo_filter(OggOpusFile *_of,void *_dst,int _dst_sz,\n op_sample *_src,int _nsamples,int _nchannels){\n  (void)_of;\n  _nsamples=OP_MIN(_nsamples,_dst_sz>>1);\n  if(_nchannels==2)memcpy(_dst,_src,_nsamples*2*sizeof(*_src));\n  else{\n    float *dst;\n    int    i;\n    dst=(float *)_dst;\n    if(_nchannels==1){\n      for(i=0;i<_nsamples;i++)dst[2*i+0]=dst[2*i+1]=_src[i];\n    }\n    else{\n      for(i=0;i<_nsamples;i++){\n        float l;\n        float r;\n        int   ci;\n        l=r=0;\n        for(ci=0;ci<_nchannels;ci++){\n          l+=OP_STEREO_DOWNMIX[_nchannels-3][ci][0]*_src[_nchannels*i+ci];\n          r+=OP_STEREO_DOWNMIX[_nchannels-3][ci][1]*_src[_nchannels*i+ci];\n        }\n        dst[2*i+0]=l;\n        dst[2*i+1]=r;\n      }\n    }\n  }\n  return _nsamples;\n}\n\nstatic int op_float2short_stereo_filter(OggOpusFile *_of,\n void *_dst,int _dst_sz,op_sample *_src,int _nsamples,int _nchannels){\n  opus_int16 *dst;\n  dst=(opus_int16 *)_dst;\n  if(_nchannels==1){\n    int i;\n    _nsamples=op_float2short_filter(_of,dst,_dst_sz>>1,_src,_nsamples,1);\n    for(i=_nsamples;i-->0;)dst[2*i+0]=dst[2*i+1]=dst[i];\n  }\n  else{\n    if(_nchannels>2){\n      _nsamples=OP_MIN(_nsamples,_dst_sz>>1);\n      _nsamples=op_stereo_filter(_of,_src,_nsamples*2,\n       _src,_nsamples,_nchannels);\n    }\n    _nsamples=op_float2short_filter(_of,dst,_dst_sz,_src,_nsamples,2);\n  }\n  return _nsamples;\n}\n\nint op_read_stereo(OggOpusFile *_of,opus_int16 *_pcm,int _buf_size){\n  return op_filter_read_native(_of,_pcm,_buf_size,\n   op_float2short_stereo_filter,NULL);\n}\n\nint op_read_float_stereo(OggOpusFile *_of,float *_pcm,int _buf_size){\n  _of->state_channel_count=0;\n  return op_filter_read_native(_of,_pcm,_buf_size,op_stereo_filter,NULL);\n}\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/opusfile/opusfile.h",
    "content": "/********************************************************************\n *                                                                  *\n * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *\n * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *\n * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *\n * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *\n *                                                                  *\n * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 1994-2012           *\n * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *\n *                                                                  *\n ********************************************************************\n\n function: stdio-based convenience library for opening/seeking/decoding\n last mod: $Id: vorbisfile.h 17182 2010-04-29 03:48:32Z xiphmont $\n\n ********************************************************************/\n#if !defined(_opusfile_h)\n# define _opusfile_h (1)\n\n/**\\mainpage\n   \\section Introduction\n\n   This is the documentation for the <tt>libopusfile</tt> C API.\n\n   The <tt>libopusfile</tt> package provides a convenient high-level API for\n    decoding and basic manipulation of all Ogg Opus audio streams.\n   <tt>libopusfile</tt> is implemented as a layer on top of Xiph.Org's\n    reference\n    <tt><a href=\"https://www.xiph.org/ogg/doc/libogg/reference.html\">libogg</a></tt>\n    and\n    <tt><a href=\"https://mf4.xiph.org/jenkins/view/opus/job/opus/ws/doc/html/index.html\">libopus</a></tt>\n    libraries.\n\n   <tt>libopusfile</tt> provides several sets of built-in routines for\n    file/stream access, and may also use custom stream I/O routines provided by\n    the embedded environment.\n   There are built-in I/O routines provided for ANSI-compliant\n    <code>stdio</code> (<code>FILE *</code>), memory buffers, and URLs\n    (including <file:> URLs, plus optionally <http:> and <https:> URLs).\n\n   \\section Organization\n\n   The main API is divided into several sections:\n   - \\ref stream_open_close\n   - \\ref stream_info\n   - \\ref stream_decoding\n   - \\ref stream_seeking\n\n   Several additional sections are not tied to the main API.\n   - \\ref stream_callbacks\n   - \\ref header_info\n   - \\ref error_codes\n\n   \\section Overview\n\n   The <tt>libopusfile</tt> API always decodes files to 48&nbsp;kHz.\n   The original sample rate is not preserved by the lossy compression, though\n    it is stored in the header to allow you to resample to it after decoding\n    (the <tt>libopusfile</tt> API does not currently provide a resampler,\n    but the\n    <a href=\"http://www.speex.org/docs/manual/speex-manual/node7.html#SECTION00760000000000000000\">the\n    Speex resampler</a> is a good choice if you need one).\n   In general, if you are playing back the audio, you should leave it at\n    48&nbsp;kHz, provided your audio hardware supports it.\n   When decoding to a file, it may be worth resampling back to the original\n    sample rate, so as not to surprise users who might not expect the sample\n    rate to change after encoding to Opus and decoding.\n\n   Opus files can contain anywhere from 1 to 255 channels of audio.\n   The channel mappings for up to 8 channels are the same as the\n    <a href=\"http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9\">Vorbis\n    mappings</a>.\n   A special stereo API can convert everything to 2 channels, making it simple\n    to support multichannel files in an application which only has stereo\n    output.\n   Although the <tt>libopusfile</tt> ABI provides support for the theoretical\n    maximum number of channels, the current implementation does not support\n    files with more than 8 channels, as they do not have well-defined channel\n    mappings.\n\n   Like all Ogg files, Opus files may be \"chained\".\n   That is, multiple Opus files may be combined into a single, longer file just\n    by concatenating the original files.\n   This is commonly done in internet radio streaming, as it allows the title\n    and artist to be updated each time the song changes, since each link in the\n    chain includes its own set of metadata.\n\n   <tt>libopusfile</tt> fully supports chained files.\n   It will decode the first Opus stream found in each link of a chained file\n    (ignoring any other streams that might be concurrently multiplexed with it,\n    such as a video stream).\n\n   The channel count can also change between links.\n   If your application is not prepared to deal with this, it can use the stereo\n    API to ensure the audio from all links will always get decoded into a\n    common format.\n   Since <tt>libopusfile</tt> always decodes to 48&nbsp;kHz, you do not have to\n    worry about the sample rate changing between links (as was possible with\n    Vorbis).\n   This makes application support for chained files with <tt>libopusfile</tt>\n    very easy.*/\n\n# if defined(__cplusplus)\nextern \"C\" {\n# endif\n\n# include <stdarg.h>\n# include <stdio.h>\n# include <ogg/ogg.h>\n# include \"opus_multistream.h\"\n\n/**@cond PRIVATE*/\n\n/*Enable special features for gcc and gcc-compatible compilers.*/\n# if !defined(OP_GNUC_PREREQ)\n#  if defined(__GNUC__)&&defined(__GNUC_MINOR__)\n#   define OP_GNUC_PREREQ(_maj,_min) \\\n ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min))\n#  else\n#   define OP_GNUC_PREREQ(_maj,_min) 0\n#  endif\n# endif\n\n# if OP_GNUC_PREREQ(4,0)\n#  pragma GCC visibility push(default)\n# endif\n\ntypedef struct OpusHead          OpusHead;\ntypedef struct OpusTags          OpusTags;\ntypedef struct OpusPictureTag    OpusPictureTag;\ntypedef struct OpusServerInfo    OpusServerInfo;\ntypedef struct OpusFileCallbacks OpusFileCallbacks;\ntypedef struct OggOpusFile       OggOpusFile;\n\n/*Warning attributes for libopusfile functions.*/\n# if OP_GNUC_PREREQ(3,4)\n#  define OP_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))\n# else\n#  define OP_WARN_UNUSED_RESULT\n# endif\n# if OP_GNUC_PREREQ(3,4)\n#  define OP_ARG_NONNULL(_x) __attribute__((__nonnull__(_x)))\n# else\n#  define OP_ARG_NONNULL(_x)\n# endif\n\n/**@endcond*/\n\n/**\\defgroup error_codes Error Codes*/\n/*@{*/\n/**\\name List of possible error codes\n   Many of the functions in this library return a negative error code when a\n    function fails.\n   This list provides a brief explanation of the common errors.\n   See each individual function for more details on what a specific error code\n    means in that context.*/\n/*@{*/\n\n/**A request did not succeed.*/\n#define OP_FALSE         (-1)\n/*Currently not used externally.*/\n#define OP_EOF           (-2)\n/**There was a hole in the page sequence numbers (e.g., a page was corrupt or\n    missing).*/\n#define OP_HOLE          (-3)\n/**An underlying read, seek, or tell operation failed when it should have\n    succeeded.*/\n#define OP_EREAD         (-128)\n/**A <code>NULL</code> pointer was passed where one was unexpected, or an\n    internal memory allocation failed, or an internal library error was\n    encountered.*/\n#define OP_EFAULT        (-129)\n/**The stream used a feature that is not implemented, such as an unsupported\n    channel family.*/\n#define OP_EIMPL         (-130)\n/**One or more parameters to a function were invalid.*/\n#define OP_EINVAL        (-131)\n/**A purported Ogg Opus stream did not begin with an Ogg page, a purported\n    header packet did not start with one of the required strings, \"OpusHead\" or\n    \"OpusTags\", or a link in a chained file was encountered that did not\n    contain any logical Opus streams.*/\n#define OP_ENOTFORMAT    (-132)\n/**A required header packet was not properly formatted, contained illegal\n    values, or was missing altogether.*/\n#define OP_EBADHEADER    (-133)\n/**The ID header contained an unrecognized version number.*/\n#define OP_EVERSION      (-134)\n/*Currently not used at all.*/\n#define OP_ENOTAUDIO     (-135)\n/**An audio packet failed to decode properly.\n   This is usually caused by a multistream Ogg packet where the durations of\n    the individual Opus packets contained in it are not all the same.*/\n#define OP_EBADPACKET    (-136)\n/**We failed to find data we had seen before, or the bitstream structure was\n    sufficiently malformed that seeking to the target destination was\n    impossible.*/\n#define OP_EBADLINK      (-137)\n/**An operation that requires seeking was requested on an unseekable stream.*/\n#define OP_ENOSEEK       (-138)\n/**The first or last granule position of a link failed basic validity checks.*/\n#define OP_EBADTIMESTAMP (-139)\n\n/*@}*/\n/*@}*/\n\n/**\\defgroup header_info Header Information*/\n/*@{*/\n\n/**The maximum number of channels in an Ogg Opus stream.*/\n#define OPUS_CHANNEL_COUNT_MAX (255)\n\n/**Ogg Opus bitstream information.\n   This contains the basic playback parameters for a stream, and corresponds to\n    the initial ID header packet of an Ogg Opus stream.*/\nstruct OpusHead{\n  /**The Ogg Opus format version, in the range 0...255.\n     The top 4 bits represent a \"major\" version, and the bottom four bits\n      represent backwards-compatible \"minor\" revisions.\n     The current specification describes version 1.\n     This library will recognize versions up through 15 as backwards compatible\n      with the current specification.\n     An earlier draft of the specification described a version 0, but the only\n      difference between version 1 and version 0 is that version 0 did\n      not specify the semantics for handling the version field.*/\n  int           version;\n  /**The number of channels, in the range 1...255.*/\n  int           channel_count;\n  /**The number of samples that should be discarded from the beginning of the\n      stream.*/\n  unsigned      pre_skip;\n  /**The sampling rate of the original input.\n     All Opus audio is coded at 48 kHz, and should also be decoded at 48 kHz\n      for playback (unless the target hardware does not support this sampling\n      rate).\n     However, this field may be used to resample the audio back to the original\n      sampling rate, for example, when saving the output to a file.*/\n  opus_uint32   input_sample_rate;\n  /**The gain to apply to the decoded output, in dB, as a Q8 value in the range\n      -32768...32767.\n     The <tt>libopusfile</tt> API will automatically apply this gain to the\n      decoded output before returning it, scaling it by\n      <code>pow(10,output_gain/(20.0*256))</code>.*/\n  int           output_gain;\n  /**The channel mapping family, in the range 0...255.\n     Channel mapping family 0 covers mono or stereo in a single stream.\n     Channel mapping family 1 covers 1 to 8 channels in one or more streams,\n      using the Vorbis speaker assignments.\n     Channel mapping family 255 covers 1 to 255 channels in one or more\n      streams, but without any defined speaker assignment.*/\n  int           mapping_family;\n  /**The number of Opus streams in each Ogg packet, in the range 1...255.*/\n  int           stream_count;\n  /**The number of coupled Opus streams in each Ogg packet, in the range\n      0...127.\n     This must satisfy <code>0 <= coupled_count <= stream_count</code> and\n      <code>coupled_count + stream_count <= 255</code>.\n     The coupled streams appear first, before all uncoupled streams, in an Ogg\n      Opus packet.*/\n  int           coupled_count;\n  /**The mapping from coded stream channels to output channels.\n     Let <code>index=mapping[k]</code> be the value for channel <code>k</code>.\n     If <code>index<2*coupled_count</code>, then it refers to the left channel\n      from stream <code>(index/2)</code> if even, and the right channel from\n      stream <code>(index/2)</code> if odd.\n     Otherwise, it refers to the output of the uncoupled stream\n      <code>(index-coupled_count)</code>.*/\n  unsigned char mapping[OPUS_CHANNEL_COUNT_MAX];\n};\n\n/**The metadata from an Ogg Opus stream.\n\n   This structure holds the in-stream metadata corresponding to the 'comment'\n    header packet of an Ogg Opus stream.\n   The comment header is meant to be used much like someone jotting a quick\n    note on the label of a CD.\n   It should be a short, to the point text note that can be more than a couple\n    words, but not more than a short paragraph.\n\n   The metadata is stored as a series of (tag, value) pairs, in length-encoded\n    string vectors, using the same format as Vorbis (without the final \"framing\n    bit\"), Theora, and Speex, except for the packet header.\n   The first occurrence of the '=' character delimits the tag and value.\n   A particular tag may occur more than once, and order is significant.\n   The character set encoding for the strings is always UTF-8, but the tag\n    names are limited to ASCII, and treated as case-insensitive.\n   See <a href=\"http://www.xiph.org/vorbis/doc/v-comment.html\">the Vorbis\n    comment header specification</a> for details.\n\n   In filling in this structure, <tt>libopusfile</tt> will null-terminate the\n    #user_comments strings for safety.\n   However, the bitstream format itself treats them as 8-bit clean vectors,\n    possibly containing NUL characters, so the #comment_lengths array should be\n    treated as their authoritative length.\n\n   This structure is binary and source-compatible with a\n    <code>vorbis_comment</code>, and pointers to it may be freely cast to\n    <code>vorbis_comment</code> pointers, and vice versa.\n   It is provided as a separate type to avoid introducing a compile-time\n    dependency on the libvorbis headers.*/\nstruct OpusTags{\n  /**The array of comment string vectors.*/\n  char **user_comments;\n  /**An array of the corresponding length of each vector, in bytes.*/\n  int   *comment_lengths;\n  /**The total number of comment streams.*/\n  int    comments;\n  /**The null-terminated vendor string.\n     This identifies the software used to encode the stream.*/\n  char  *vendor;\n};\n\n/**\\name Picture tag image formats*/\n/*@{*/\n\n/**The MIME type was not recognized, or the image data did not match the\n    declared MIME type.*/\n#define OP_PIC_FORMAT_UNKNOWN (-1)\n/**The MIME type indicates the image data is really a URL.*/\n#define OP_PIC_FORMAT_URL     (0)\n/**The image is a JPEG.*/\n#define OP_PIC_FORMAT_JPEG    (1)\n/**The image is a PNG.*/\n#define OP_PIC_FORMAT_PNG     (2)\n/**The image is a GIF.*/\n#define OP_PIC_FORMAT_GIF     (3)\n\n/*@}*/\n\n/**The contents of a METADATA_BLOCK_PICTURE tag.*/\nstruct OpusPictureTag{\n  /**The picture type according to the ID3v2 APIC frame:\n     <ol start=\"0\">\n     <li>Other</li>\n     <li>32x32 pixels 'file icon' (PNG only)</li>\n     <li>Other file icon</li>\n     <li>Cover (front)</li>\n     <li>Cover (back)</li>\n     <li>Leaflet page</li>\n     <li>Media (e.g. label side of CD)</li>\n     <li>Lead artist/lead performer/soloist</li>\n     <li>Artist/performer</li>\n     <li>Conductor</li>\n     <li>Band/Orchestra</li>\n     <li>Composer</li>\n     <li>Lyricist/text writer</li>\n     <li>Recording Location</li>\n     <li>During recording</li>\n     <li>During performance</li>\n     <li>Movie/video screen capture</li>\n     <li>A bright colored fish</li>\n     <li>Illustration</li>\n     <li>Band/artist logotype</li>\n     <li>Publisher/Studio logotype</li>\n     </ol>\n     Others are reserved and should not be used.\n     There may only be one each of picture type 1 and 2 in a file.*/\n  opus_int32     type;\n  /**The MIME type of the picture, in printable ASCII characters 0x20-0x7E.\n     The MIME type may also be <code>\"-->\"</code> to signify that the data part\n      is a URL pointing to the picture instead of the picture data itself.\n     In this case, a terminating NUL is appended to the URL string in #data,\n      but #data_length is set to the length of the string excluding that\n      terminating NUL.*/\n  char          *mime_type;\n  /**The description of the picture, in UTF-8.*/\n  char          *description;\n  /**The width of the picture in pixels.*/\n  opus_uint32    width;\n  /**The height of the picture in pixels.*/\n  opus_uint32    height;\n  /**The color depth of the picture in bits-per-pixel (<em>not</em>\n      bits-per-channel).*/\n  opus_uint32    depth;\n  /**For indexed-color pictures (e.g., GIF), the number of colors used, or 0\n      for non-indexed pictures.*/\n  opus_uint32    colors;\n  /**The length of the picture data in bytes.*/\n  opus_uint32    data_length;\n  /**The binary picture data.*/\n  unsigned char *data;\n  /**The format of the picture data, if known.\n     One of\n     <ul>\n     <li>#OP_PIC_FORMAT_UNKNOWN,</li>\n     <li>#OP_PIC_FORMAT_URL,</li>\n     <li>#OP_PIC_FORMAT_JPEG,</li>\n     <li>#OP_PIC_FORMAT_PNG, or</li>\n     <li>#OP_PIC_FORMAT_GIF.</li>\n     </ul>*/\n  int            format;\n};\n\n/**\\name Functions for manipulating header data\n\n   These functions manipulate the #OpusHead and #OpusTags structures,\n    which describe the audio parameters and tag-value metadata, respectively.\n   These can be used to query the headers returned by <tt>libopusfile</tt>, or\n    to parse Opus headers from sources other than an Ogg Opus stream, provided\n    they use the same format.*/\n/*@{*/\n\n/**Parses the contents of the ID header packet of an Ogg Opus stream.\n   \\param[out] _head Returns the contents of the parsed packet.\n                     The contents of this structure are untouched on error.\n                     This may be <code>NULL</code> to merely test the header\n                      for validity.\n   \\param[in]  _data The contents of the ID header packet.\n   \\param      _len  The number of bytes of data in the ID header packet.\n   \\return 0 on success or a negative value on error.\n   \\retval #OP_ENOTFORMAT If the data does not start with the \"OpusHead\"\n                           string.\n   \\retval #OP_EVERSION   If the version field signaled a version this library\n                           does not know how to parse.\n   \\retval #OP_EIMPL      If the channel mapping family was 255, which general\n                           purpose players should not attempt to play.\n   \\retval #OP_EBADHEADER If the contents of the packet otherwise violate the\n                           Ogg Opus specification:\n                          <ul>\n                           <li>Insufficient data,</li>\n                           <li>Too much data for the known minor versions,</li>\n                           <li>An unrecognized channel mapping family,</li>\n                           <li>Zero channels or too many channels,</li>\n                           <li>Zero coded streams,</li>\n                           <li>Too many coupled streams, or</li>\n                           <li>An invalid channel mapping index.</li>\n                          </ul>*/\nOP_WARN_UNUSED_RESULT int opus_head_parse(OpusHead *_head,\n const unsigned char *_data,size_t _len) OP_ARG_NONNULL(2);\n\n/**Converts a granule position to a sample offset for a given Ogg Opus stream.\n   The sample offset is simply <code>_gp-_head->pre_skip</code>.\n   Granule position values smaller than OpusHead#pre_skip correspond to audio\n    that should never be played, and thus have no associated sample offset.\n   This function returns -1 for such values.\n   This function also correctly handles extremely large granule positions,\n    which may have wrapped around to a negative number when stored in a signed\n    ogg_int64_t value.\n   \\param _head The #OpusHead information from the ID header of the stream.\n   \\param _gp   The granule position to convert.\n   \\return The sample offset associated with the given granule position\n            (counting at a 48 kHz sampling rate), or the special value -1 on\n            error (i.e., the granule position was smaller than the pre-skip\n            amount).*/\nogg_int64_t opus_granule_sample(const OpusHead *_head,ogg_int64_t _gp)\n OP_ARG_NONNULL(1);\n\n/**Parses the contents of the 'comment' header packet of an Ogg Opus stream.\n   \\param[out] _tags An uninitialized #OpusTags structure.\n                     This returns the contents of the parsed packet.\n                     The contents of this structure are untouched on error.\n                     This may be <code>NULL</code> to merely test the header\n                      for validity.\n   \\param[in]  _data The contents of the 'comment' header packet.\n   \\param      _len  The number of bytes of data in the 'info' header packet.\n   \\retval 0              Success.\n   \\retval #OP_ENOTFORMAT If the data does not start with the \"OpusTags\"\n                           string.\n   \\retval #OP_EBADHEADER If the contents of the packet otherwise violate the\n                           Ogg Opus specification.\n   \\retval #OP_EFAULT     If there wasn't enough memory to store the tags.*/\nOP_WARN_UNUSED_RESULT int opus_tags_parse(OpusTags *_tags,\n const unsigned char *_data,size_t _len) OP_ARG_NONNULL(2);\n\n/**Performs a deep copy of an #OpusTags structure.\n   \\param _dst The #OpusTags structure to copy into.\n               If this function fails, the contents of this structure remain\n                untouched.\n   \\param _src The #OpusTags structure to copy from.\n   \\retval 0          Success.\n   \\retval #OP_EFAULT If there wasn't enough memory to copy the tags.*/\nint opus_tags_copy(OpusTags *_dst,const OpusTags *_src) OP_ARG_NONNULL(1);\n\n/**Initializes an #OpusTags structure.\n   This should be called on a freshly allocated #OpusTags structure before\n    attempting to use it.\n   \\param _tags The #OpusTags structure to initialize.*/\nvoid opus_tags_init(OpusTags *_tags) OP_ARG_NONNULL(1);\n\n/**Add a (tag, value) pair to an initialized #OpusTags structure.\n   \\note Neither opus_tags_add() nor opus_tags_add_comment() support values\n    containing embedded NULs, although the bitstream format does support them.\n   To add such tags, you will need to manipulate the #OpusTags structure\n    directly.\n   \\param _tags  The #OpusTags structure to add the (tag, value) pair to.\n   \\param _tag   A NUL-terminated, case-insensitive, ASCII string containing\n                  the tag to add (without an '=' character).\n   \\param _value A NUL-terminated UTF-8 containing the corresponding value.\n   \\return 0 on success, or a negative value on failure.\n   \\retval #OP_EFAULT An internal memory allocation failed.*/\nint opus_tags_add(OpusTags *_tags,const char *_tag,const char *_value)\n OP_ARG_NONNULL(1) OP_ARG_NONNULL(2) OP_ARG_NONNULL(3);\n\n/**Add a comment to an initialized #OpusTags structure.\n   \\note Neither opus_tags_add_comment() nor opus_tags_add() support comments\n    containing embedded NULs, although the bitstream format does support them.\n   To add such tags, you will need to manipulate the #OpusTags structure\n    directly.\n   \\param _tags    The #OpusTags structure to add the comment to.\n   \\param _comment A NUL-terminated UTF-8 string containing the comment in\n                    \"TAG=value\" form.\n   \\return 0 on success, or a negative value on failure.\n   \\retval #OP_EFAULT An internal memory allocation failed.*/\nint opus_tags_add_comment(OpusTags *_tags,const char *_comment)\n OP_ARG_NONNULL(1) OP_ARG_NONNULL(2);\n\n/**Look up a comment value by its tag.\n   \\param _tags  An initialized #OpusTags structure.\n   \\param _tag   The tag to look up.\n   \\param _count The instance of the tag.\n                 The same tag can appear multiple times, each with a distinct\n                  value, so an index is required to retrieve them all.\n                 The order in which these values appear is significant and\n                  should be preserved.\n                 Use opus_tags_query_count() to get the legal range for the\n                  \\a _count parameter.\n   \\return A pointer to the queried tag's value.\n           This points directly to data in the #OpusTags structure.\n           It should not be modified or freed by the application, and\n            modifications to the structure may invalidate the pointer.\n   \\retval NULL If no matching tag is found.*/\nconst char *opus_tags_query(const OpusTags *_tags,const char *_tag,int _count)\n OP_ARG_NONNULL(1) OP_ARG_NONNULL(2);\n\n/**Look up the number of instances of a tag.\n   Call this first when querying for a specific tag and then iterate over the\n    number of instances with separate calls to opus_tags_query() to retrieve\n    all the values for that tag in order.\n   \\param _tags An initialized #OpusTags structure.\n   \\param _tag  The tag to look up.\n   \\return The number of instances of this particular tag.*/\nint opus_tags_query_count(const OpusTags *_tags,const char *_tag)\n OP_ARG_NONNULL(1) OP_ARG_NONNULL(2);\n\n/**Get the track gain from an R128_TRACK_GAIN tag, if one was specified.\n   This searches for the first R128_TRACK_GAIN tag with a valid signed,\n    16-bit decimal integer value and returns the value.\n   This routine is exposed merely for convenience for applications which wish\n    to do something special with the track gain (i.e., display it).\n   If you simply wish to apply the track gain instead of the header gain, you\n    can use op_set_gain_offset() with an #OP_TRACK_GAIN type and no offset.\n   \\param      _tags    An initialized #OpusTags structure.\n   \\param[out] _gain_q8 The track gain, in 1/256ths of a dB.\n                        This will lie in the range [-32768,32767], and should\n                         be applied in <em>addition</em> to the header gain.\n                        On error, no value is returned, and the previous\n                         contents remain unchanged.\n   \\return 0 on success, or a negative value on error.\n   \\retval #OP_FALSE There was no track gain available in the given tags.*/\nint opus_tags_get_track_gain(const OpusTags *_tags,int *_gain_q8)\n OP_ARG_NONNULL(1) OP_ARG_NONNULL(2);\n\n/**Clears the #OpusTags structure.\n   This should be called on an #OpusTags structure after it is no longer\n    needed.\n   It will free all memory used by the structure members.\n   \\param _tags The #OpusTags structure to clear.*/\nvoid opus_tags_clear(OpusTags *_tags) OP_ARG_NONNULL(1);\n\n/**Check if \\a _comment is an instance of a \\a _tag_name tag.\n   \\see opus_tagncompare\n   \\param _tag_name A NUL-terminated, case-insensitive, ASCII string containing\n                     the name of the tag to check for (without the terminating\n                     '=' character).\n   \\param _comment  The comment string to check.\n   \\return An integer less than, equal to, or greater than zero if \\a _comment\n            is found respectively, to be less than, to match, or be greater\n            than a \"tag=value\" string whose tag matches \\a _tag_name.*/\nint opus_tagcompare(const char *_tag_name,const char *_comment);\n\n/**Check if \\a _comment is an instance of a \\a _tag_name tag.\n   This version is slightly more efficient than opus_tagcompare() if the length\n    of the tag name is already known (e.g., because it is a constant).\n   \\see opus_tagcompare\n   \\param _tag_name A case-insensitive ASCII string containing the name of the\n                     tag to check for (without the terminating '=' character).\n   \\param _tag_len  The number of characters in the tag name.\n                    This must be non-negative.\n   \\param _comment  The comment string to check.\n   \\return An integer less than, equal to, or greater than zero if \\a _comment\n            is found respectively, to be less than, to match, or be greater\n            than a \"tag=value\" string whose tag matches the first \\a _tag_len\n            characters of \\a _tag_name.*/\nint opus_tagncompare(const char *_tag_name,int _tag_len,const char *_comment);\n\n/**Parse a single METADATA_BLOCK_PICTURE tag.\n   This decodes the BASE64-encoded content of the tag and returns a structure\n    with the MIME type, description, image parameters (if known), and the\n    compressed image data.\n   If the MIME type indicates the presence of an image format we recognize\n    (JPEG, PNG, or GIF) and the actual image data contains the magic signature\n    associated with that format, then the OpusPictureTag::format field will be\n    set to the corresponding format.\n   This is provided as a convenience to avoid requiring applications to parse\n    the MIME type and/or do their own format detection for the commonly used\n    formats.\n   In this case, we also attempt to extract the image parameters directly from\n    the image data (overriding any that were present in the tag, which the\n    specification says applications are not meant to rely on).\n   The application must still provide its own support for actually decoding the\n    image data and, if applicable, retrieving that data from URLs.\n   \\param[out] _pic Returns the parsed picture data.\n                    No sanitation is done on the type, MIME type, or\n                     description fields, so these might return invalid values.\n                    The contents of this structure are left unmodified on\n                     failure.\n   \\param      _tag The METADATA_BLOCK_PICTURE tag contents.\n                    The leading \"METADATA_BLOCK_PICTURE=\" portion is optional,\n                     to allow the function to be used on either directly on the\n                     values in OpusTags::user_comments or on the return value\n                     of opus_tags_query().\n   \\return 0 on success or a negative value on error.\n   \\retval #OP_ENOTFORMAT The METADATA_BLOCK_PICTURE contents were not valid.\n   \\retval #OP_EFAULT     There was not enough memory to store the picture tag\n                           contents.*/\nOP_WARN_UNUSED_RESULT int opus_picture_tag_parse(OpusPictureTag *_pic,\n const char *_tag) OP_ARG_NONNULL(1) OP_ARG_NONNULL(2);\n\n/**Initializes an #OpusPictureTag structure.\n   This should be called on a freshly allocated #OpusPictureTag structure\n    before attempting to use it.\n   \\param _pic The #OpusPictureTag structure to initialize.*/\nvoid opus_picture_tag_init(OpusPictureTag *_pic) OP_ARG_NONNULL(1);\n\n/**Clears the #OpusPictureTag structure.\n   This should be called on an #OpusPictureTag structure after it is no longer\n    needed.\n   It will free all memory used by the structure members.\n   \\param _pic The #OpusPictureTag structure to clear.*/\nvoid opus_picture_tag_clear(OpusPictureTag *_pic) OP_ARG_NONNULL(1);\n\n/*@}*/\n\n/*@}*/\n\n/**\\defgroup url_options URL Reading Options*/\n/*@{*/\n/**\\name URL reading options\n   Options for op_url_stream_create() and associated functions.\n   These allow you to provide proxy configuration parameters, skip SSL\n    certificate checks, etc.\n   Options are processed in order, and if the same option is passed multiple\n    times, only the value specified by the last occurrence has an effect\n    (unless otherwise specified).\n   They may be expanded in the future.*/\n/*@{*/\n\n/**@cond PRIVATE*/\n\n/*These are the raw numbers used to define the request codes.\n  They should not be used directly.*/\n#define OP_SSL_SKIP_CERTIFICATE_CHECK_REQUEST (6464)\n#define OP_HTTP_PROXY_HOST_REQUEST            (6528)\n#define OP_HTTP_PROXY_PORT_REQUEST            (6592)\n#define OP_HTTP_PROXY_USER_REQUEST            (6656)\n#define OP_HTTP_PROXY_PASS_REQUEST            (6720)\n#define OP_GET_SERVER_INFO_REQUEST            (6784)\n\n#define OP_URL_OPT(_request) ((_request)+(char *)0)\n\n/*These macros trigger compilation errors or warnings if the wrong types are\n   provided to one of the URL options.*/\n#define OP_CHECK_INT(_x) ((void)((_x)==(opus_int32)0),(opus_int32)(_x))\n#define OP_CHECK_CONST_CHAR_PTR(_x) ((_x)+((_x)-(const char *)(_x)))\n#define OP_CHECK_SERVER_INFO_PTR(_x) ((_x)+((_x)-(OpusServerInfo *)(_x)))\n\n/**@endcond*/\n\n/**HTTP/Shoutcast/Icecast server information associated with a URL.*/\nstruct OpusServerInfo{\n  /**The name of the server (icy-name/ice-name).\n     This is <code>NULL</code> if there was no <code>icy-name</code> or\n      <code>ice-name</code> header.*/\n  char        *name;\n  /**A short description of the server (icy-description/ice-description).\n     This is <code>NULL</code> if there was no <code>icy-description</code> or\n      <code>ice-description</code> header.*/\n  char        *description;\n  /**The genre the server falls under (icy-genre/ice-genre).\n     This is <code>NULL</code> if there was no <code>icy-genre</code> or\n      <code>ice-genre</code> header.*/\n  char        *genre;\n  /**The homepage for the server (icy-url/ice-url).\n     This is <code>NULL</code> if there was no <code>icy-url</code> or\n      <code>ice-url</code> header.*/\n  char        *url;\n  /**The software used by the origin server (Server).\n     This is <code>NULL</code> if there was no <code>Server</code> header.*/\n  char        *server;\n  /**The media type of the entity sent to the recepient (Content-Type).\n     This is <code>NULL</code> if there was no <code>Content-Type</code>\n      header.*/\n  char        *content_type;\n  /**The nominal stream bitrate in kbps (icy-br/ice-bitrate).\n     This is <code>-1</code> if there was no <code>icy-br</code> or\n      <code>ice-bitrate</code> header.*/\n  opus_int32   bitrate_kbps;\n  /**Flag indicating whether the server is public (<code>1</code>) or not\n      (<code>0</code>) (icy-pub/ice-public).\n     This is <code>-1</code> if there was no <code>icy-pub</code> or\n      <code>ice-public</code> header.*/\n  int          is_public;\n  /**Flag indicating whether the server is using HTTPS instead of HTTP.\n     This is <code>0</code> unless HTTPS is being used.\n     This may not match the protocol used in the original URL if there were\n      redirections.*/\n  int          is_ssl;\n};\n\n/**Initializes an #OpusServerInfo structure.\n   All fields are set as if the corresponding header was not available.\n   \\param _info The #OpusServerInfo structure to initialize.\n   \\note If you use this function, you must link against <tt>libopusurl</tt>.*/\nvoid opus_server_info_init(OpusServerInfo *_info) OP_ARG_NONNULL(1);\n\n/**Clears the #OpusServerInfo structure.\n   This should be called on an #OpusServerInfo structure after it is no longer\n    needed.\n   It will free all memory used by the structure members.\n   \\param _info The #OpusServerInfo structure to clear.\n   \\note If you use this function, you must link against <tt>libopusurl</tt>.*/\nvoid opus_server_info_clear(OpusServerInfo *_info) OP_ARG_NONNULL(1);\n\n/**Skip the certificate check when connecting via TLS/SSL (https).\n   \\param _b <code>opus_int32</code>: Whether or not to skip the certificate\n              check.\n             The check will be skipped if \\a _b is non-zero, and will not be\n              skipped if \\a _b is zero.\n   \\hideinitializer*/\n#define OP_SSL_SKIP_CERTIFICATE_CHECK(_b) \\\n OP_URL_OPT(OP_SSL_SKIP_CERTIFICATE_CHECK_REQUEST),OP_CHECK_INT(_b)\n\n/**Proxy connections through the given host.\n   If no port is specified via #OP_HTTP_PROXY_PORT, the port number defaults\n    to 8080 (http-alt).\n   All proxy parameters are ignored for non-http and non-https URLs.\n   \\param _host <code>const char *</code>: The proxy server hostname.\n                This may be <code>NULL</code> to disable the use of a proxy\n                 server.\n   \\hideinitializer*/\n#define OP_HTTP_PROXY_HOST(_host) \\\n OP_URL_OPT(OP_HTTP_PROXY_HOST_REQUEST),OP_CHECK_CONST_CHAR_PTR(_host)\n\n/**Use the given port when proxying connections.\n   This option only has an effect if #OP_HTTP_PROXY_HOST is specified with a\n    non-<code>NULL</code> \\a _host.\n   If this option is not provided, the proxy port number defaults to 8080\n    (http-alt).\n   All proxy parameters are ignored for non-http and non-https URLs.\n   \\param _port <code>opus_int32</code>: The proxy server port.\n                This must be in the range 0...65535 (inclusive), or the\n                 URL function this is passed to will fail.\n   \\hideinitializer*/\n#define OP_HTTP_PROXY_PORT(_port) \\\n OP_URL_OPT(OP_HTTP_PROXY_PORT_REQUEST),OP_CHECK_INT(_port)\n\n/**Use the given user name for authentication when proxying connections.\n   All proxy parameters are ignored for non-http and non-https URLs.\n   \\param _user const char *: The proxy server user name.\n                              This may be <code>NULL</code> to disable proxy\n                               authentication.\n                              A non-<code>NULL</code> value only has an effect\n                               if #OP_HTTP_PROXY_HOST and #OP_HTTP_PROXY_PASS\n                               are also specified with non-<code>NULL</code>\n                               arguments.\n   \\hideinitializer*/\n#define OP_HTTP_PROXY_USER(_user) \\\n OP_URL_OPT(OP_HTTP_PROXY_USER_REQUEST),OP_CHECK_CONST_CHAR_PTR(_user)\n\n/**Use the given password for authentication when proxying connections.\n   All proxy parameters are ignored for non-http and non-https URLs.\n   \\param _pass const char *: The proxy server password.\n                              This may be <code>NULL</code> to disable proxy\n                               authentication.\n                              A non-<code>NULL</code> value only has an effect\n                               if #OP_HTTP_PROXY_HOST and #OP_HTTP_PROXY_USER\n                               are also specified with non-<code>NULL</code>\n                               arguments.\n   \\hideinitializer*/\n#define OP_HTTP_PROXY_PASS(_pass) \\\n OP_URL_OPT(OP_HTTP_PROXY_PASS_REQUEST),OP_CHECK_CONST_CHAR_PTR(_pass)\n\n/**Parse information about the streaming server (if any) and return it.\n   Very little validation is done.\n   In particular, OpusServerInfo::url may not be a valid URL,\n    OpusServerInfo::bitrate_kbps may not really be in kbps, and\n    OpusServerInfo::content_type may not be a valid MIME type.\n   The character set of the string fields is not specified anywhere, and should\n    not be assumed to be valid UTF-8.\n   \\param _info OpusServerInfo *: Returns information about the server.\n                                  If there is any error opening the stream, the\n                                   contents of this structure remain\n                                   unmodified.\n                                  On success, fills in the structure with the\n                                   server information that was available, if\n                                   any.\n                                  After a successful return, the contents of\n                                   this structure should be freed by calling\n                                   opus_server_info_clear().\n   \\hideinitializer*/\n#define OP_GET_SERVER_INFO(_info) \\\n OP_URL_OPT(OP_GET_SERVER_INFO_REQUEST),OP_CHECK_SERVER_INFO_PTR(_info)\n\n/*@}*/\n/*@}*/\n\n/**\\defgroup stream_callbacks Abstract Stream Reading Interface*/\n/*@{*/\n/**\\name Functions for reading from streams\n   These functions define the interface used to read from and seek in a stream\n    of data.\n   A stream does not need to implement seeking, but the decoder will not be\n    able to seek if it does not do so.\n   These functions also include some convenience routines for working with\n    standard <code>FILE</code> pointers, complete streams stored in a single\n    block of memory, or URLs.*/\n/*@{*/\n\n/**Reads up to \\a _nbytes bytes of data from \\a _stream.\n   \\param      _stream The stream to read from.\n   \\param[out] _ptr    The buffer to store the data in.\n   \\param      _nbytes The maximum number of bytes to read.\n                       This function may return fewer, though it will not\n                        return zero unless it reaches end-of-file.\n   \\return The number of bytes successfully read, or a negative value on\n            error.*/\ntypedef int (*op_read_func)(void *_stream,unsigned char *_ptr,int _nbytes);\n\n/**Sets the position indicator for \\a _stream.\n   The new position, measured in bytes, is obtained by adding \\a _offset\n    bytes to the position specified by \\a _whence.\n   If \\a _whence is set to <code>SEEK_SET</code>, <code>SEEK_CUR</code>, or\n    <code>SEEK_END</code>, the offset is relative to the start of the stream,\n    the current position indicator, or end-of-file, respectively.\n   \\retval 0  Success.\n   \\retval -1 Seeking is not supported or an error occurred.\n              <code>errno</code> need not be set.*/\ntypedef int (*op_seek_func)(void *_stream,opus_int64 _offset,int _whence);\n\n/**Obtains the current value of the position indicator for \\a _stream.\n   \\return The current position indicator.*/\ntypedef opus_int64 (*op_tell_func)(void *_stream);\n\n/**Closes the underlying stream.\n   \\retval 0   Success.\n   \\retval EOF An error occurred.\n               <code>errno</code> need not be set.*/\ntypedef int (*op_close_func)(void *_stream);\n\n/**The callbacks used to access non-<code>FILE</code> stream resources.\n   The function prototypes are basically the same as for the stdio functions\n    <code>fread()</code>, <code>fseek()</code>, <code>ftell()</code>, and\n    <code>fclose()</code>.\n   The differences are that the <code>FILE *</code> arguments have been\n    replaced with a <code>void *</code>, which is to be used as a pointer to\n    whatever internal data these functions might need, that #seek and #tell\n    take and return 64-bit offsets, and that #seek <em>must</em> return -1 if\n    the stream is unseekable.*/\nstruct OpusFileCallbacks{\n  /**Used to read data from the stream.\n     This must not be <code>NULL</code>.*/\n  op_read_func  read;\n  /**Used to seek in the stream.\n     This may be <code>NULL</code> if seeking is not implemented.*/\n  op_seek_func  seek;\n  /**Used to return the current read position in the stream.\n     This may be <code>NULL</code> if seeking is not implemented.*/\n  op_tell_func  tell;\n  /**Used to close the stream when the decoder is freed.\n     This may be <code>NULL</code> to leave the stream open.*/\n  op_close_func close;\n};\n\n/**Opens a stream with <code>fopen()</code> and fills in a set of callbacks\n    that can be used to access it.\n   This is useful to avoid writing your own portable 64-bit seeking wrappers,\n    and also avoids cross-module linking issues on Windows, where a\n    <code>FILE *</code> must be accessed by routines defined in the same module\n    that opened it.\n   \\param[out] _cb   The callbacks to use for this file.\n                     If there is an error opening the file, nothing will be\n                      filled in here.\n   \\param      _path The path to the file to open.\n                     On Windows, this string must be UTF-8 (to allow access to\n                      files whose names cannot be represented in the current\n                      MBCS code page).\n                     All other systems use the native character encoding.\n   \\param      _mode The mode to open the file in.\n   \\return A stream handle to use with the callbacks, or <code>NULL</code> on\n            error.*/\nOP_WARN_UNUSED_RESULT void *op_fopen(OpusFileCallbacks *_cb,\n const char *_path,const char *_mode) OP_ARG_NONNULL(1) OP_ARG_NONNULL(2)\n OP_ARG_NONNULL(3);\n\n/**Opens a stream with <code>fdopen()</code> and fills in a set of callbacks\n    that can be used to access it.\n   This is useful to avoid writing your own portable 64-bit seeking wrappers,\n    and also avoids cross-module linking issues on Windows, where a\n    <code>FILE *</code> must be accessed by routines defined in the same module\n    that opened it.\n   \\param[out] _cb   The callbacks to use for this file.\n                     If there is an error opening the file, nothing will be\n                      filled in here.\n   \\param      _fd   The file descriptor to open.\n   \\param      _mode The mode to open the file in.\n   \\return A stream handle to use with the callbacks, or <code>NULL</code> on\n            error.*/\nOP_WARN_UNUSED_RESULT void *op_fdopen(OpusFileCallbacks *_cb,\n int _fd,const char *_mode) OP_ARG_NONNULL(1) OP_ARG_NONNULL(3);\n\n/**Opens a stream with <code>freopen()</code> and fills in a set of callbacks\n    that can be used to access it.\n   This is useful to avoid writing your own portable 64-bit seeking wrappers,\n    and also avoids cross-module linking issues on Windows, where a\n    <code>FILE *</code> must be accessed by routines defined in the same module\n    that opened it.\n   \\param[out] _cb     The callbacks to use for this file.\n                       If there is an error opening the file, nothing will be\n                        filled in here.\n   \\param      _path   The path to the file to open.\n                       On Windows, this string must be UTF-8 (to allow access\n                        to files whose names cannot be represented in the\n                        current MBCS code page).\n                       All other systems use the native character encoding.\n   \\param      _mode   The mode to open the file in.\n   \\param      _stream A stream previously returned by op_fopen(), op_fdopen(),\n                        or op_freopen().\n   \\return A stream handle to use with the callbacks, or <code>NULL</code> on\n            error.*/\nOP_WARN_UNUSED_RESULT void *op_freopen(OpusFileCallbacks *_cb,\n const char *_path,const char *_mode,void *_stream) OP_ARG_NONNULL(1)\n OP_ARG_NONNULL(2) OP_ARG_NONNULL(3) OP_ARG_NONNULL(4);\n\n/**Creates a stream that reads from the given block of memory.\n   This block of memory must contain the complete stream to decode.\n   This is useful for caching small streams (e.g., sound effects) in RAM.\n   \\param[out] _cb   The callbacks to use for this stream.\n                     If there is an error creating the stream, nothing will be\n                      filled in here.\n   \\param      _data The block of memory to read from.\n   \\param      _size The size of the block of memory.\n   \\return A stream handle to use with the callbacks, or <code>NULL</code> on\n            error.*/\nOP_WARN_UNUSED_RESULT void *op_mem_stream_create(OpusFileCallbacks *_cb,\n const unsigned char *_data,size_t _size) OP_ARG_NONNULL(1);\n\n/**Creates a stream that reads from the given URL.\n   This function behaves identically to op_url_stream_create(), except that it\n    takes a va_list instead of a variable number of arguments.\n   It does not call the <code>va_end</code> macro, and because it invokes the\n    <code>va_arg</code> macro, the value of \\a _ap is undefined after the call.\n   \\note If you use this function, you must link against <tt>libopusurl</tt>.\n   \\param[out]    _cb  The callbacks to use for this stream.\n                       If there is an error creating the stream, nothing will\n                        be filled in here.\n   \\param         _url The URL to read from.\n                       Currently only the <file:>, <http:>, and <https:>\n                        schemes are supported.\n                       Both <http:> and <https:> may be disabled at compile\n                        time, in which case opening such URLs will always fail.\n                       Currently this only supports URIs.\n                       IRIs should be converted to UTF-8 and URL-escaped, with\n                        internationalized domain names encoded in punycode,\n                        before passing them to this function.\n   \\param[in,out] _ap  A list of the \\ref url_options \"optional flags\" to use.\n                       This is a variable-length list of options terminated\n                        with <code>NULL</code>.\n   \\return A stream handle to use with the callbacks, or <code>NULL</code> on\n            error.*/\nOP_WARN_UNUSED_RESULT void *op_url_stream_vcreate(OpusFileCallbacks *_cb,\n const char *_url,va_list _ap) OP_ARG_NONNULL(1) OP_ARG_NONNULL(2);\n\n/**Creates a stream that reads from the given URL.\n   \\note If you use this function, you must link against <tt>libopusurl</tt>.\n   \\param[out] _cb  The callbacks to use for this stream.\n                    If there is an error creating the stream, nothing will be\n                     filled in here.\n   \\param      _url The URL to read from.\n                    Currently only the <file:>, <http:>, and <https:> schemes\n                     are supported.\n                    Both <http:> and <https:> may be disabled at compile time,\n                     in which case opening such URLs will always fail.\n                    Currently this only supports URIs.\n                    IRIs should be converted to UTF-8 and URL-escaped, with\n                     internationalized domain names encoded in punycode, before\n                     passing them to this function.\n   \\param      ...  The \\ref url_options \"optional flags\" to use.\n                    This is a variable-length list of options terminated with\n                     <code>NULL</code>.\n   \\return A stream handle to use with the callbacks, or <code>NULL</code> on\n            error.*/\nOP_WARN_UNUSED_RESULT void *op_url_stream_create(OpusFileCallbacks *_cb,\n const char *_url,...) OP_ARG_NONNULL(1) OP_ARG_NONNULL(2);\n\n/*@}*/\n/*@}*/\n\n/**\\defgroup stream_open_close Opening and Closing*/\n/*@{*/\n/**\\name Functions for opening and closing streams\n\n   These functions allow you to test a stream to see if it is Opus, open it,\n    and close it.\n   Several flavors are provided for each of the built-in stream types, plus a\n    more general version which takes a set of application-provided callbacks.*/\n/*@{*/\n\n/**Test to see if this is an Opus stream.\n   For good results, you will need at least 57 bytes (for a pure Opus-only\n    stream).\n   Something like 512 bytes will give more reliable results for multiplexed\n    streams.\n   This function is meant to be a quick-rejection filter.\n   Its purpose is not to guarantee that a stream is a valid Opus stream, but to\n    ensure that it looks enough like Opus that it isn't going to be recognized\n    as some other format (except possibly an Opus stream that is also\n    multiplexed with other codecs, such as video).\n   \\param[out] _head     The parsed ID header contents.\n                         You may pass <code>NULL</code> if you do not need\n                          this information.\n                         If the function fails, the contents of this structure\n                          remain untouched.\n   \\param _initial_data  An initial buffer of data from the start of the\n                          stream.\n   \\param _initial_bytes The number of bytes in \\a _initial_data.\n   \\return 0 if the data appears to be Opus, or a negative value on error.\n   \\retval #OP_FALSE      There was not enough data to tell if this was an Opus\n                           stream or not.\n   \\retval #OP_EFAULT     An internal memory allocation failed.\n   \\retval #OP_EIMPL      The stream used a feature that is not implemented,\n                           such as an unsupported channel family.\n   \\retval #OP_ENOTFORMAT If the data did not contain a recognizable ID\n                           header for an Opus stream.\n   \\retval #OP_EVERSION   If the version field signaled a version this library\n                           does not know how to parse.\n   \\retval #OP_EBADHEADER The ID header was not properly formatted or contained\n                           illegal values.*/\nint op_test(OpusHead *_head,\n const unsigned char *_initial_data,size_t _initial_bytes);\n\n/**Open a stream from the given file path.\n   \\param      _path  The path to the file to open.\n   \\param[out] _error Returns 0 on success, or a failure code on error.\n                      You may pass in <code>NULL</code> if you don't want the\n                       failure code.\n                      The failure code will be #OP_EFAULT if the file could not\n                       be opened, or one of the other failure codes from\n                       op_open_callbacks() otherwise.\n   \\return A freshly opened \\c OggOpusFile, or <code>NULL</code> on error.*/\nOP_WARN_UNUSED_RESULT OggOpusFile *op_open_file(const char *_path,int *_error)\n OP_ARG_NONNULL(1);\n\n/**Open a stream from a memory buffer.\n   \\param      _data  The memory buffer to open.\n   \\param      _size  The number of bytes in the buffer.\n   \\param[out] _error Returns 0 on success, or a failure code on error.\n                      You may pass in <code>NULL</code> if you don't want the\n                       failure code.\n                      See op_open_callbacks() for a full list of failure codes.\n   \\return A freshly opened \\c OggOpusFile, or <code>NULL</code> on error.*/\nOP_WARN_UNUSED_RESULT OggOpusFile *op_open_memory(const unsigned char *_data,\n size_t _size,int *_error);\n\n/**Open a stream from a URL.\n   This function behaves identically to op_open_url(), except that it\n    takes a va_list instead of a variable number of arguments.\n   It does not call the <code>va_end</code> macro, and because it invokes the\n    <code>va_arg</code> macro, the value of \\a _ap is undefined after the call.\n   \\note If you use this function, you must link against <tt>libopusurl</tt>.\n   \\param         _url   The URL to open.\n                         Currently only the <file:>, <http:>, and <https:>\n                          schemes are supported.\n                         Both <http:> and <https:> may be disabled at compile\n                          time, in which case opening such URLs will always\n                          fail.\n                         Currently this only supports URIs.\n                         IRIs should be converted to UTF-8 and URL-escaped,\n                          with internationalized domain names encoded in\n                          punycode, before passing them to this function.\n   \\param[out]    _error Returns 0 on success, or a failure code on error.\n                         You may pass in <code>NULL</code> if you don't want\n                          the failure code.\n                         See op_open_callbacks() for a full list of failure\n                          codes.\n   \\param[in,out] _ap    A list of the \\ref url_options \"optional flags\" to\n                          use.\n                         This is a variable-length list of options terminated\n                          with <code>NULL</code>.\n   \\return A freshly opened \\c OggOpusFile, or <code>NULL</code> on error.*/\nOP_WARN_UNUSED_RESULT OggOpusFile *op_vopen_url(const char *_url,\n int *_error,va_list _ap) OP_ARG_NONNULL(1);\n\n/**Open a stream from a URL.\n   \\note If you use this function, you must link against <tt>libopusurl</tt>.\n   \\param      _url   The URL to open.\n                      Currently only the <file:>, <http:>, and <https:> schemes\n                       are supported.\n                      Both <http:> and <https:> may be disabled at compile\n                       time, in which case opening such URLs will always fail.\n                      Currently this only supports URIs.\n                      IRIs should be converted to UTF-8 and URL-escaped, with\n                       internationalized domain names encoded in punycode,\n                       before passing them to this function.\n   \\param[out] _error Returns 0 on success, or a failure code on error.\n                      You may pass in <code>NULL</code> if you don't want the\n                       failure code.\n                      See op_open_callbacks() for a full list of failure codes.\n   \\param      ...    The \\ref url_options \"optional flags\" to use.\n                      This is a variable-length list of options terminated with\n                       <code>NULL</code>.\n   \\return A freshly opened \\c OggOpusFile, or <code>NULL</code> on error.*/\nOP_WARN_UNUSED_RESULT OggOpusFile *op_open_url(const char *_url,\n int *_error,...) OP_ARG_NONNULL(1);\n\n/**Open a stream using the given set of callbacks to access it.\n   \\param _source        The stream to read from (e.g., a <code>FILE *</code>).\n   \\param _cb            The callbacks with which to access the stream.\n                         <code><a href=\"#op_read_func\">read()</a></code> must\n                          be implemented.\n                         <code><a href=\"#op_seek_func\">seek()</a></code> and\n                          <code><a href=\"#op_tell_func\">tell()</a></code> may\n                          be <code>NULL</code>, or may always return -1 to\n                          indicate a source is unseekable, but if\n                          <code><a href=\"#op_seek_func\">seek()</a></code> is\n                          implemented and succeeds on a particular source, then\n                          <code><a href=\"#op_tell_func\">tell()</a></code> must\n                          also.\n                         <code><a href=\"#op_close_func\">close()</a></code> may\n                          be <code>NULL</code>, but if it is not, it will be\n                          called when the \\c OggOpusFile is destroyed by\n                          op_free().\n                         It will not be called if op_open_callbacks() fails\n                          with an error.\n   \\param _initial_data  An initial buffer of data from the start of the\n                          stream.\n                         Applications can read some number of bytes from the\n                          start of the stream to help identify this as an Opus\n                          stream, and then provide them here to allow the\n                          stream to be opened, even if it is unseekable.\n   \\param _initial_bytes The number of bytes in \\a _initial_data.\n                         If the stream is seekable, its current position (as\n                          reported by\n                          <code><a href=\"#opus_tell_func\">tell()</a></code>\n                          at the start of this function) must be equal to\n                          \\a _initial_bytes.\n                         Otherwise, seeking to absolute positions will\n                          generate inconsistent results.\n   \\param[out] _error    Returns 0 on success, or a failure code on error.\n                         You may pass in <code>NULL</code> if you don't want\n                          the failure code.\n                         The failure code will be one of\n                         <dl>\n                           <dt>#OP_EREAD</dt>\n                           <dd>An underlying read, seek, or tell operation\n                            failed when it should have succeeded, or we failed\n                            to find data in the stream we had seen before.</dd>\n                           <dt>#OP_EFAULT</dt>\n                           <dd>There was a memory allocation failure, or an\n                            internal library error.</dd>\n                           <dt>#OP_EIMPL</dt>\n                           <dd>The stream used a feature that is not\n                            implemented, such as an unsupported channel\n                            family.</dd>\n                           <dt>#OP_EINVAL</dt>\n                           <dd><code><a href=\"#op_seek_func\">seek()</a></code>\n                            was implemented and succeeded on this source, but\n                            <code><a href=\"#op_tell_func\">tell()</a></code>\n                            did not, or the starting position indicator was\n                            not equal to \\a _initial_bytes.</dd>\n                           <dt>#OP_ENOTFORMAT</dt>\n                           <dd>The stream contained a link that did not have\n                            any logical Opus streams in it.</dd>\n                           <dt>#OP_EBADHEADER</dt>\n                           <dd>A required header packet was not properly\n                            formatted, contained illegal values, or was missing\n                            altogether.</dd>\n                           <dt>#OP_EVERSION</dt>\n                           <dd>An ID header contained an unrecognized version\n                            number.</dd>\n                           <dt>#OP_EBADLINK</dt>\n                           <dd>We failed to find data we had seen before after\n                            seeking.</dd>\n                           <dt>#OP_EBADTIMESTAMP</dt>\n                           <dd>The first or last timestamp in a link failed\n                            basic validity checks.</dd>\n                         </dl>\n   \\return A freshly opened \\c OggOpusFile, or <code>NULL</code> on error.\n           <tt>libopusfile</tt> does <em>not</em> take ownership of the source\n            if the call fails.\n           The calling application is responsible for closing the source if\n            this call returns an error.*/\nOP_WARN_UNUSED_RESULT OggOpusFile *op_open_callbacks(void *_source,\n const OpusFileCallbacks *_cb,const unsigned char *_initial_data,\n size_t _initial_bytes,int *_error) OP_ARG_NONNULL(2);\n\n/**Partially open a stream from the given file path.\n   \\see op_test_callbacks\n   \\param      _path  The path to the file to open.\n   \\param[out] _error Returns 0 on success, or a failure code on error.\n                      You may pass in <code>NULL</code> if you don't want the\n                       failure code.\n                      The failure code will be #OP_EFAULT if the file could not\n                       be opened, or one of the other failure codes from\n                       op_open_callbacks() otherwise.\n   \\return A partially opened \\c OggOpusFile, or <code>NULL</code> on error.*/\nOP_WARN_UNUSED_RESULT OggOpusFile *op_test_file(const char *_path,int *_error)\n OP_ARG_NONNULL(1);\n\n/**Partially open a stream from a memory buffer.\n   \\see op_test_callbacks\n   \\param      _data  The memory buffer to open.\n   \\param      _size  The number of bytes in the buffer.\n   \\param[out] _error Returns 0 on success, or a failure code on error.\n                      You may pass in <code>NULL</code> if you don't want the\n                       failure code.\n                      See op_open_callbacks() for a full list of failure codes.\n   \\return A partially opened \\c OggOpusFile, or <code>NULL</code> on error.*/\nOP_WARN_UNUSED_RESULT OggOpusFile *op_test_memory(const unsigned char *_data,\n size_t _size,int *_error);\n\n/**Partially open a stream from a URL.\n   This function behaves identically to op_test_url(), except that it\n    takes a va_list instead of a variable number of arguments.\n   It does not call the <code>va_end</code> macro, and because it invokes the\n    <code>va_arg</code> macro, the value of \\a _ap is undefined after the call.\n   \\note If you use this function, you must link against <tt>libopusurl</tt>.\n   \\see op_test_url\n   \\see op_test_callbacks\n   \\param         _url    The URL to open.\n                          Currently only the <file:>, <http:>, and <https:>\n                           schemes are supported.\n                          Both <http:> and <https:> may be disabled at compile\n                           time, in which case opening such URLs will always\n                           fail.\n                          Currently this only supports URIs.\n                          IRIs should be converted to UTF-8 and URL-escaped,\n                           with internationalized domain names encoded in\n                           punycode, before passing them to this function.\n   \\param[out]    _error  Returns 0 on success, or a failure code on error.\n                          You may pass in <code>NULL</code> if you don't want\n                           the failure code.\n                          See op_open_callbacks() for a full list of failure\n                           codes.\n   \\param[in,out] _ap     A list of the \\ref url_options \"optional flags\" to\n                           use.\n                          This is a variable-length list of options terminated\n                           with <code>NULL</code>.\n   \\return A partially opened \\c OggOpusFile, or <code>NULL</code> on error.*/\nOP_WARN_UNUSED_RESULT OggOpusFile *op_vtest_url(const char *_url,\n int *_error,va_list _ap) OP_ARG_NONNULL(1);\n\n/**Partially open a stream from a URL.\n   \\note If you use this function, you must link against <tt>libopusurl</tt>.\n   \\see op_test_callbacks\n   \\param      _url    The URL to open.\n                       Currently only the <file:>, <http:>, and <https:>\n                        schemes are supported.\n                       Both <http:> and <https:> may be disabled at compile\n                        time, in which case opening such URLs will always fail.\n                       Currently this only supports URIs.\n                       IRIs should be converted to UTF-8 and URL-escaped, with\n                        internationalized domain names encoded in punycode,\n                        before passing them to this function.\n   \\param[out] _error  Returns 0 on success, or a failure code on error.\n                       You may pass in <code>NULL</code> if you don't want the\n                        failure code.\n                       See op_open_callbacks() for a full list of failure\n                        codes.\n   \\param      ...     The \\ref url_options \"optional flags\" to use.\n                       This is a variable-length list of options terminated\n                        with <code>NULL</code>.\n   \\return A partially opened \\c OggOpusFile, or <code>NULL</code> on error.*/\nOP_WARN_UNUSED_RESULT OggOpusFile *op_test_url(const char *_url,\n int *_error,...) OP_ARG_NONNULL(1);\n\n/**Partially open a stream using the given set of callbacks to access it.\n   This tests for Opusness and loads the headers for the first link.\n   It does not seek (although it tests for seekability).\n   You can query a partially open stream for the few pieces of basic\n    information returned by op_serialno(), op_channel_count(), op_head(), and\n    op_tags() (but only for the first link).\n   You may also determine if it is seekable via a call to op_seekable().\n   You cannot read audio from the stream, seek, get the size or duration,\n    get information from links other than the first one, or even get the total\n    number of links until you finish opening the stream with op_test_open().\n   If you do not need to do any of these things, you can dispose of it with\n    op_free() instead.\n\n   This function is provided mostly to simplify porting existing code that used\n    <tt>libvorbisfile</tt>.\n   For new code, you are likely better off using op_test() instead, which\n    is less resource-intensive, requires less data to succeed, and imposes a\n    hard limit on the amount of data it examines (important for unseekable\n    sources, where all such data must be buffered until you are sure of the\n    stream type).\n   \\param _source        The stream to read from (e.g., a <code>FILE *</code>).\n   \\param _cb            The callbacks with which to access the stream.\n                         <code><a href=\"#op_read_func\">read()</a></code> must\n                          be implemented.\n                         <code><a href=\"#op_seek_func\">seek()</a></code> and\n                          <code><a href=\"#op_tell_func\">tell()</a></code> may\n                          be <code>NULL</code>, or may always return -1 to\n                          indicate a source is unseekable, but if\n                          <code><a href=\"#op_seek_func\">seek()</a></code> is\n                          implemented and succeeds on a particular source, then\n                          <code><a href=\"#op_tell_func\">tell()</a></code> must\n                          also.\n                         <code><a href=\"#op_close_func\">close()</a></code> may\n                          be <code>NULL</code>, but if it is not, it will be\n                          called when the \\c OggOpusFile is destroyed by\n                          op_free().\n                         It will not be called if op_open_callbacks() fails\n                          with an error.\n   \\param _initial_data  An initial buffer of data from the start of the\n                          stream.\n                         Applications can read some number of bytes from the\n                          start of the stream to help identify this as an Opus\n                          stream, and then provide them here to allow the\n                          stream to be tested more thoroughly, even if it is\n                          unseekable.\n   \\param _initial_bytes The number of bytes in \\a _initial_data.\n                         If the stream is seekable, its current position (as\n                          reported by\n                          <code><a href=\"#opus_tell_func\">tell()</a></code>\n                          at the start of this function) must be equal to\n                          \\a _initial_bytes.\n                         Otherwise, seeking to absolute positions will\n                          generate inconsistent results.\n   \\param[out] _error    Returns 0 on success, or a failure code on error.\n                         You may pass in <code>NULL</code> if you don't want\n                          the failure code.\n                         See op_open_callbacks() for a full list of failure\n                          codes.\n   \\return A partially opened \\c OggOpusFile, or <code>NULL</code> on error.\n           <tt>libopusfile</tt> does <em>not</em> take ownership of the source\n            if the call fails.\n           The calling application is responsible for closing the source if\n            this call returns an error.*/\nOP_WARN_UNUSED_RESULT OggOpusFile *op_test_callbacks(void *_source,\n const OpusFileCallbacks *_cb,const unsigned char *_initial_data,\n size_t _initial_bytes,int *_error) OP_ARG_NONNULL(2);\n\n/**Finish opening a stream partially opened with op_test_callbacks() or one of\n    the associated convenience functions.\n   If this function fails, you are still responsible for freeing the\n    \\c OggOpusFile with op_free().\n   \\param _of The \\c OggOpusFile to finish opening.\n   \\return 0 on success, or a negative value on error.\n   \\retval #OP_EREAD         An underlying read, seek, or tell operation failed\n                              when it should have succeeded.\n   \\retval #OP_EFAULT        There was a memory allocation failure, or an\n                              internal library error.\n   \\retval #OP_EIMPL         The stream used a feature that is not implemented,\n                              such as an unsupported channel family.\n   \\retval #OP_EINVAL        The stream was not partially opened with\n                              op_test_callbacks() or one of the associated\n                              convenience functions.\n   \\retval #OP_ENOTFORMAT    The stream contained a link that did not have any\n                              logical Opus streams in it.\n   \\retval #OP_EBADHEADER    A required header packet was not properly\n                              formatted, contained illegal values, or was\n                              missing altogether.\n   \\retval #OP_EVERSION      An ID header contained an unrecognized version\n                              number.\n   \\retval #OP_EBADLINK      We failed to find data we had seen before after\n                              seeking.\n   \\retval #OP_EBADTIMESTAMP The first or last timestamp in a link failed basic\n                              validity checks.*/\nint op_test_open(OggOpusFile *_of) OP_ARG_NONNULL(1);\n\n/**Release all memory used by an \\c OggOpusFile.\n   \\param _of The \\c OggOpusFile to free.*/\nvoid op_free(OggOpusFile *_of);\n\n/*@}*/\n/*@}*/\n\n/**\\defgroup stream_info Stream Information*/\n/*@{*/\n/**\\name Functions for obtaining information about streams\n\n   These functions allow you to get basic information about a stream, including\n    seekability, the number of links (for chained streams), plus the size,\n    duration, bitrate, header parameters, and meta information for each link\n    (or, where available, the stream as a whole).\n   Some of these (size, duration) are only available for seekable streams.\n   You can also query the current stream position, link, and playback time,\n    and instantaneous bitrate during playback.\n\n   Some of these functions may be used successfully on the partially open\n    streams returned by op_test_callbacks() or one of the associated\n    convenience functions.\n   Their documention will indicate so explicitly.*/\n/*@{*/\n\n/**Returns whether or not the data source being read is seekable.\n   This is true if\n   <ol>\n   <li>The <code><a href=\"#op_seek_func\">seek()</a></code> and\n    <code><a href=\"#op_tell_func\">tell()</a></code> callbacks are both\n    non-<code>NULL</code>,</li>\n   <li>The <code><a href=\"#op_seek_func\">seek()</a></code> callback was\n    successfully executed at least once, and</li>\n   <li>The <code><a href=\"#op_tell_func\">tell()</a></code> callback was\n    successfully able to report the position indicator afterwards.</li>\n   </ol>\n   This function may be called on partially-opened streams.\n   \\param _of The \\c OggOpusFile whose seekable status is to be returned.\n   \\return A non-zero value if seekable, and 0 if unseekable.*/\nint op_seekable(const OggOpusFile *_of) OP_ARG_NONNULL(1);\n\n/**Returns the number of links in this chained stream.\n   This function may be called on partially-opened streams, but it will always\n    return 1.\n   The actual number of links is not known until the stream is fully opened.\n   \\param _of The \\c OggOpusFile from which to retrieve the link count.\n   \\return For fully-open seekable sources, this returns the total number of\n            links in the whole stream, which will be at least 1.\n           For partially-open or unseekable sources, this always returns 1.*/\nint op_link_count(const OggOpusFile *_of) OP_ARG_NONNULL(1);\n\n/**Get the serial number of the given link in a (possibly-chained) Ogg Opus\n    stream.\n   This function may be called on partially-opened streams, but it will always\n    return the serial number of the Opus stream in the first link.\n   \\param _of The \\c OggOpusFile from which to retrieve the serial number.\n   \\param _li The index of the link whose serial number should be retrieved.\n              Use a negative number to get the serial number of the current\n               link.\n   \\return The serial number of the given link.\n           If \\a _li is greater than the total number of links, this returns\n            the serial number of the last link.\n           If the source is not seekable, this always returns the serial number\n            of the current link.*/\nopus_uint32 op_serialno(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1);\n\n/**Get the channel count of the given link in a (possibly-chained) Ogg Opus\n    stream.\n   This is equivalent to <code>op_head(_of,_li)->channel_count</code>, but\n    is provided for convenience.\n   This function may be called on partially-opened streams, but it will always\n    return the channel count of the Opus stream in the first link.\n   \\param _of The \\c OggOpusFile from which to retrieve the channel count.\n   \\param _li The index of the link whose channel count should be retrieved.\n              Use a negative number to get the channel count of the current\n               link.\n   \\return The channel count of the given link.\n           If \\a _li is greater than the total number of links, this returns\n            the channel count of the last link.\n           If the source is not seekable, this always returns the channel count\n            of the current link.*/\nint op_channel_count(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1);\n\n/**Get the total (compressed) size of the stream, or of an individual link in\n    a (possibly-chained) Ogg Opus stream, including all headers and Ogg muxing\n    overhead.\n   \\param _of The \\c OggOpusFile from which to retrieve the compressed size.\n   \\param _li The index of the link whose compressed size should be computed.\n              Use a negative number to get the compressed size of the entire\n               stream.\n   \\return The compressed size of the entire stream if \\a _li is negative, the\n            compressed size of link \\a _li if it is non-negative, or a negative\n            value on error.\n           The compressed size of the entire stream may be smaller than that\n            of the underlying source if trailing garbage was detected in the\n            file.\n   \\retval #OP_EINVAL The source is not seekable (so we can't know the length),\n                       \\a _li wasn't less than the total number of links in\n                       the stream, or the stream was only partially open.*/\nopus_int64 op_raw_total(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1);\n\n/**Get the total PCM length (number of samples at 48 kHz) of the stream, or of\n    an individual link in a (possibly-chained) Ogg Opus stream.\n   Users looking for <code>op_time_total()</code> should use op_pcm_total()\n    instead.\n   Because timestamps in Opus are fixed at 48 kHz, there is no need for a\n    separate function to convert this to seconds (and leaving it out avoids\n    introducing floating point to the API, for those that wish to avoid it).\n   \\param _of The \\c OggOpusFile from which to retrieve the PCM offset.\n   \\param _li The index of the link whose PCM length should be computed.\n              Use a negative number to get the PCM length of the entire stream.\n   \\return The PCM length of the entire stream if \\a _li is negative, the PCM\n            length of link \\a _li if it is non-negative, or a negative value on\n            error.\n   \\retval #OP_EINVAL The source is not seekable (so we can't know the length),\n                       \\a _li wasn't less than the total number of links in\n                       the stream, or the stream was only partially open.*/\nogg_int64_t op_pcm_total(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1);\n\n/**Get the ID header information for the given link in a (possibly chained) Ogg\n    Opus stream.\n   This function may be called on partially-opened streams, but it will always\n    return the ID header information of the Opus stream in the first link.\n   \\param _of The \\c OggOpusFile from which to retrieve the ID header\n               information.\n   \\param _li The index of the link whose ID header information should be\n               retrieved.\n              Use a negative number to get the ID header information of the\n               current link.\n              For an unseekable stream, \\a _li is ignored, and the ID header\n               information for the current link is always returned, if\n               available.\n   \\return The contents of the ID header for the given link.*/\nconst OpusHead *op_head(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1);\n\n/**Get the comment header information for the given link in a (possibly\n    chained) Ogg Opus stream.\n   This function may be called on partially-opened streams, but it will always\n    return the tags from the Opus stream in the first link.\n   \\param _of The \\c OggOpusFile from which to retrieve the comment header\n               information.\n   \\param _li The index of the link whose comment header information should be\n               retrieved.\n              Use a negative number to get the comment header information of\n               the current link.\n              For an unseekable stream, \\a _li is ignored, and the comment\n               header information for the current link is always returned, if\n               available.\n   \\return The contents of the comment header for the given link, or\n            <code>NULL</code> if this is an unseekable stream that encountered\n            an invalid link.*/\nconst OpusTags *op_tags(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1);\n\n/**Retrieve the index of the current link.\n   This is the link that produced the data most recently read by\n    op_read_float() or its associated functions, or, after a seek, the link\n    that the seek target landed in.\n   Reading more data may advance the link index (even on the first read after a\n    seek).\n   \\param _of The \\c OggOpusFile from which to retrieve the current link index.\n   \\return The index of the current link on success, or a negative value on\n            failure.\n           For seekable streams, this is a number between 0 and the value\n            returned by op_link_count().\n           For unseekable streams, this value starts at 0 and increments by one\n            each time a new link is encountered (even though op_link_count()\n            always returns 1).\n   \\retval #OP_EINVAL The stream was only partially open.*/\nint op_current_link(const OggOpusFile *_of) OP_ARG_NONNULL(1);\n\n/**Computes the bitrate for a given link in a (possibly chained) Ogg Opus\n    stream.\n   The stream must be seekable to compute the bitrate.\n   For unseekable streams, use op_bitrate_instant() to get periodic estimates.\n   \\param _of The \\c OggOpusFile from which to retrieve the bitrate.\n   \\param _li The index of the link whose bitrate should be computed.\n              USe a negative number to get the bitrate of the whole stream.\n   \\return The bitrate on success, or a negative value on error.\n   \\retval #OP_EINVAL The stream was only partially open, the stream was not\n                       seekable, or \\a _li was larger than the number of\n                       links.*/\nopus_int32 op_bitrate(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1);\n\n/**Compute the instantaneous bitrate, measured as the ratio of bits to playable\n    samples decoded since a) the last call to op_bitrate_instant(), b) the last\n    seek, or c) the start of playback, whichever was most recent.\n   This will spike somewhat after a seek or at the start/end of a chain\n    boundary, as pre-skip, pre-roll, and end-trimming causes samples to be\n    decoded but not played.\n   \\param _of The \\c OggOpusFile from which to retrieve the bitrate.\n   \\return The bitrate, in bits per second, or a negative value on error.\n   \\retval #OP_FALSE  No data has been decoded since any of the events\n                       described above.\n   \\retval #OP_EINVAL The stream was only partially open.*/\nopus_int32 op_bitrate_instant(OggOpusFile *_of) OP_ARG_NONNULL(1);\n\n/**Obtain the current value of the position indicator for \\a _of.\n   \\param _of The \\c OggOpusFile from which to retrieve the position indicator.\n   \\return The byte position that is currently being read from.\n   \\retval #OP_EINVAL The stream was only partially open.*/\nopus_int64 op_raw_tell(const OggOpusFile *_of) OP_ARG_NONNULL(1);\n\n/**Obtain the PCM offset of the next sample to be read.\n   If the stream is not properly timestamped, this might not increment by the\n    proper amount between reads, or even return monotonically increasing\n    values.\n   \\param _of The \\c OggOpusFile from which to retrieve the PCM offset.\n   \\return The PCM offset of the next sample to be read.\n   \\retval #OP_EINVAL The stream was only partially open.*/\nogg_int64_t op_pcm_tell(const OggOpusFile *_of) OP_ARG_NONNULL(1);\n\n/*@}*/\n/*@}*/\n\n/**\\defgroup stream_seeking Seeking*/\n/*@{*/\n/**\\name Functions for seeking in Opus streams\n\n   These functions let you seek in Opus streams, if the underlying source\n    support it.\n   Seeking is implemented for all built-in stream I/O routines, though some\n    individual sources may not be seekable (pipes, live HTTP streams, or HTTP\n    streams from a server that does not support <code>Range</code> requests).\n\n   op_raw_seek() is the fastest: it is guaranteed to perform at most one\n    physical seek, but, since the target is a byte position, makes no guarantee\n    how close to a given time it will come.\n   op_pcm_seek() provides sample-accurate seeking.\n   The number of physical seeks it requires is still quite small (often 1 or\n    2, even in highly variable bitrate streams).\n\n   Seeking in Opus requires decoding some pre-roll amount before playback to\n    allow the internal state to converge (as if recovering from packet loss).\n   This is handled internally by <tt>libopusfile</tt>, but means there is\n    little extra overhead for decoding up to the exact position requested\n    (since it must decode some amount of audio anyway).\n   It also means that decoding after seeking may not return exactly the same\n    values as would be obtained by decoding the stream straight through.\n   However, such differences are expected to be smaller than the loss\n    introduced by Opus's lossy compression.*/\n/*@{*/\n\n/**Seek to a byte offset relative to the <b>compressed</b> data.\n   This also scans packets to update the PCM cursor.\n   It will cross a logical bitstream boundary, but only if it can't get any\n    packets out of the tail of the link to which it seeks.\n   \\param _of          The \\c OggOpusFile in which to seek.\n   \\param _byte_offset The byte position to seek to.\n   \\return 0 on success, or a negative error code on failure.\n   \\retval #OP_EREAD    The underlying seek operation failed.\n   \\retval #OP_EINVAL   The stream was only partially open, or the target was\n                         outside the valid range for the stream.\n   \\retval #OP_ENOSEEK  This stream is not seekable.\n   \\retval #OP_EBADLINK Failed to initialize a decoder for a stream for an\n                         unknown reason.*/\nint op_raw_seek(OggOpusFile *_of,opus_int64 _byte_offset) OP_ARG_NONNULL(1);\n\n/**Seek to the specified PCM offset, such that decoding will begin at exactly\n    the requested position.\n   \\param _of         The \\c OggOpusFile in which to seek.\n   \\param _pcm_offset The PCM offset to seek to.\n                      This is in samples at 48 kHz relative to the start of the\n                       stream.\n   \\return 0 on success, or a negative value on error.\n   \\retval #OP_EREAD    An underlying read or seek operation failed.\n   \\retval #OP_EINVAL   The stream was only partially open, or the target was\n                         outside the valid range for the stream.\n   \\retval #OP_ENOSEEK  This stream is not seekable.\n   \\retval #OP_EBADLINK We failed to find data we had seen before, or the\n                         bitstream structure was sufficiently malformed that\n                         seeking to the target destination was impossible.*/\nint op_pcm_seek(OggOpusFile *_of,ogg_int64_t _pcm_offset) OP_ARG_NONNULL(1);\n\n/*@}*/\n/*@}*/\n\n/**\\defgroup stream_decoding Decoding*/\n/*@{*/\n/**\\name Functions for decoding audio data\n\n   These functions retrieve actual decoded audio data from the stream.\n   The general functions, op_read() and op_read_float() return 16-bit or\n    floating-point output, both using native endian ordering.\n   The number of channels returned can change from link to link in a chained\n    stream.\n   There are special functions, op_read_stereo() and op_read_float_stereo(),\n    which always output two channels, to simplify applications which do not\n    wish to handle multichannel audio.\n   These downmix multichannel files to two channels, so they can always return\n    samples in the same format for every link in a chained file.\n\n   If the rest of your audio processing chain can handle floating point, those\n    routines should be preferred, as floating point output avoids introducing\n    clipping and other issues which might be avoided entirely if, e.g., you\n    scale down the volume at some other stage.\n   However, if you intend to direct consume 16-bit samples, the conversion in\n    <tt>libopusfile</tt> provides noise-shaping dithering and, if compiled\n    against <tt>libopus</tt>&nbsp;1.1 or later, soft-clipping prevention.\n\n   <tt>libopusfile</tt> can also be configured at compile time to use the\n    fixed-point <tt>libopus</tt> API.\n   If so, <tt>libopusfile</tt>'s floating-point API may also be disabled.\n   In that configuration, nothing in <tt>libopusfile</tt> will use any\n    floating-point operations, to simplify support on devices without an\n    adequate FPU.\n\n   \\warning HTTPS streams may be be vulnerable to truncation attacks if you do\n    not check the error return code from op_read_float() or its associated\n    functions.\n   If the remote peer does not close the connection gracefully (with a TLS\n    \"close notify\" message), these functions will return #OP_EREAD instead of 0\n    when they reach the end of the file.\n   If you are reading from an <https:> URL (particularly if seeking is not\n    supported), you should make sure to check for this error and warn the user\n    appropriately.*/\n/*@{*/\n\n/**Indicates that the decoding callback should produce signed 16-bit\n    native-endian output samples.*/\n#define OP_DEC_FORMAT_SHORT (7008)\n/**Indicates that the decoding callback should produce 32-bit native-endian\n    float samples.*/\n#define OP_DEC_FORMAT_FLOAT (7040)\n\n/**Indicates that the decoding callback did not decode anything, and that\n    <tt>libopusfile</tt> should decode normally instead.*/\n#define OP_DEC_USE_DEFAULT  (6720)\n\n/**Called to decode an Opus packet.\n   This should invoke the functional equivalent of opus_multistream_decode() or\n    opus_multistream_decode_float(), except that it returns 0 on success\n    instead of the number of decoded samples (which is known a priori).\n   \\param _ctx       The application-provided callback context.\n   \\param _decoder   The decoder to use to decode the packet.\n   \\param[out] _pcm  The buffer to decode into.\n                     This will always have enough room for \\a _nchannels of\n                      \\a _nsamples samples, which should be placed into this\n                      buffer interleaved.\n   \\param _op        The packet to decode.\n                     This will always have its granule position set to a valid\n                      value.\n   \\param _nsamples  The number of samples expected from the packet.\n   \\param _nchannels The number of channels expected from the packet.\n   \\param _format    The desired sample output format.\n                     This is either #OP_DEC_FORMAT_SHORT or\n                      #OP_DEC_FORMAT_FLOAT.\n   \\param _li        The index of the link from which this packet was decoded.\n   \\return A non-negative value on success, or a negative value on error.\n           The error codes should be the same as those returned by\n            opus_multistream_decode() or opus_multistream_decode_float().\n   \\retval 0                   Decoding was successful.\n                               The application has filled the buffer with\n                                exactly <code>\\a _nsamples*\\a\n                                _nchannels</code> samples in the requested\n                                format.\n   \\retval #OP_DEC_USE_DEFAULT No decoding was done.\n                               <tt>libopusfile</tt> should decode normally\n                                instead.*/\ntypedef int (*op_decode_cb_func)(void *_ctx,OpusMSDecoder *_decoder,void *_pcm,\n const ogg_packet *_op,int _nsamples,int _nchannels,int _format,int _li);\n\n/**Sets the packet decode callback function.\n   This is called once for each packet that needs to be decoded.\n   A call to this function is no guarantee that the audio will eventually be\n    delivered to the application.\n   Some or all of the data from the packet may be discarded (i.e., at the\n    beginning or end of a link, or after a seek), however the callback is\n    required to provide all of it.\n   \\param _of        The \\c OggOpusFile on which to set the decode callback.\n   \\param _decode_cb The callback function to call.\n                     This may be <code>NULL</code> to disable calling the\n                      callback.\n   \\param _ctx       The application-provided context pointer to pass to the\n                      callback on each call.*/\nvoid op_set_decode_callback(OggOpusFile *_of,\n op_decode_cb_func _decode_cb,void *_ctx) OP_ARG_NONNULL(1);\n\n/**Gain offset type that indicates that the provided offset is relative to the\n    header gain.\n   This is the default.*/\n#define OP_HEADER_GAIN   (0)\n\n/**Gain offset type that indicates that the provided offset is relative to the\n    R128_TRACK_GAIN value (if any), in addition to the header gain.*/\n#define OP_TRACK_GAIN    (3008)\n\n/**Gain offset type that indicates that the provided offset should be used as\n    the gain directly, without applying any the header or track gains.*/\n#define OP_ABSOLUTE_GAIN (3009)\n\n/**Sets the gain to be used for decoded output.\n   By default, the gain in the header is applied with no additional offset.\n   The total gain (including header gain and/or track gain, if applicable, and\n    this offset), will be clamped to [-32768,32767]/256 dB.\n   This is more than enough to saturate or underflow 16-bit PCM.\n   \\note The new gain will not be applied to any already buffered, decoded\n    output.\n   This means you cannot change it sample-by-sample, as at best it will be\n    updated packet-by-packet.\n   It is meant for setting a target volume level, rather than applying smooth\n    fades, etc.\n   \\param _of             The \\c OggOpusFile on which to set the gain offset.\n   \\param _gain_type      One of #OP_HEADER_GAIN, #OP_TRACK_GAIN, or\n                           #OP_ABSOLUTE_GAIN.\n   \\param _gain_offset_q8 The gain offset to apply, in 1/256ths of a dB.\n   \\return 0 on success or a negative value on error.\n   \\retval #OP_EINVAL The \\a _gain_type was unrecognized.*/\nint op_set_gain_offset(OggOpusFile *_of,\n int _gain_type,opus_int32 _gain_offset_q8) OP_ARG_NONNULL(1);\n\n/**Sets whether or not dithering is enabled for 16-bit decoding.\n   By default, when <tt>libopusfile</tt> is compiled to use floating-point\n    internally, calling op_read() or op_read_stereo() will first decode to\n    float, and then convert to fixed-point using noise-shaping dithering.\n   This flag can be used to disable that dithering.\n   When the application uses op_read_float() or op_read_float_stereo(), or when\n    the library has been compiled to decode directly to fixed point, this flag\n    has no effect.\n   \\param _of      The \\c OggOpusFile on which to enable or disable dithering.\n   \\param _enabled A non-zero value to enable dithering, or 0 to disable it.*/\nvoid op_set_dither_enabled(OggOpusFile *_of,int _enabled) OP_ARG_NONNULL(1);\n\n/**Reads more samples from the stream.\n   \\note Although \\a _buf_size must indicate the total number of values that\n    can be stored in \\a _pcm, the return value is the number of samples\n    <em>per channel</em>.\n   This is done because\n   <ol>\n   <li>The channel count cannot be known a priori (reading more samples might\n        advance us into the next link, with a different channel count), so\n        \\a _buf_size cannot also be in units of samples per channel,</li>\n   <li>Returning the samples per channel matches the <code>libopus</code> API\n        as closely as we're able,</li>\n   <li>Returning the total number of values instead of samples per channel\n        would mean the caller would need a division to compute the samples per\n        channel, and might worry about the possibility of getting back samples\n        for some channels and not others, and</li>\n   <li>This approach is relatively fool-proof: if an application passes too\n        small a value to \\a _buf_size, they will simply get fewer samples back,\n        and if they assume the return value is the total number of values, then\n        they will simply read too few (rather than reading too many and going\n        off the end of the buffer).</li>\n   </ol>\n   \\param      _of       The \\c OggOpusFile from which to read.\n   \\param[out] _pcm      A buffer in which to store the output PCM samples, as\n                          signed native-endian 16-bit values at 48&nbsp;kHz\n                          with a nominal range of <code>[-32768,32767)</code>.\n                         Multiple channels are interleaved using the\n                          <a href=\"http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9\">Vorbis\n                          channel ordering</a>.\n                         This must have room for at least \\a _buf_size values.\n   \\param      _buf_size The number of values that can be stored in \\a _pcm.\n                         It is recommended that this be large enough for at\n                          least 120 ms of data at 48 kHz per channel (5760\n                          values per channel).\n                         Smaller buffers will simply return less data, possibly\n                          consuming more memory to buffer the data internally.\n                         <tt>libopusfile</tt> may return less data than\n                          requested.\n                         If so, there is no guarantee that the remaining data\n                          in \\a _pcm will be unmodified.\n   \\param[out] _li       The index of the link this data was decoded from.\n                         You may pass <code>NULL</code> if you do not need this\n                          information.\n                         If this function fails (returning a negative value),\n                          this parameter is left unset.\n   \\return The number of samples read per channel on success, or a negative\n            value on failure.\n           The channel count can be retrieved on success by calling\n            <code>op_head(_of,*_li)</code>.\n           The number of samples returned may be 0 if the buffer was too small\n            to store even a single sample for all channels, or if end-of-file\n            was reached.\n           The list of possible failure codes follows.\n           Most of them can only be returned by unseekable, chained streams\n            that encounter a new link.\n   \\retval #OP_HOLE          There was a hole in the data, and some samples\n                              may have been skipped.\n                             Call this function again to continue decoding\n                              past the hole.\n   \\retval #OP_EREAD         An underlying read operation failed.\n                             This may signal a truncation attack from an\n                              <https:> source.\n   \\retval #OP_EFAULT        An internal memory allocation failed.\n   \\retval #OP_EIMPL         An unseekable stream encountered a new link that\n                              used a feature that is not implemented, such as\n                              an unsupported channel family.\n   \\retval #OP_EINVAL        The stream was only partially open.\n   \\retval #OP_ENOTFORMAT    An unseekable stream encountered a new link that\n                              did not have any logical Opus streams in it.\n   \\retval #OP_EBADHEADER    An unseekable stream encountered a new link with a\n                              required header packet that was not properly\n                              formatted, contained illegal values, or was\n                              missing altogether.\n   \\retval #OP_EVERSION      An unseekable stream encountered a new link with\n                              an ID header that contained an unrecognized\n                              version number.\n   \\retval #OP_EBADPACKET    Failed to properly decode the next packet.\n   \\retval #OP_EBADLINK      We failed to find data we had seen before.\n   \\retval #OP_EBADTIMESTAMP An unseekable stream encountered a new link with\n                              a starting timestamp that failed basic validity\n                              checks.*/\nOP_WARN_UNUSED_RESULT int op_read(OggOpusFile *_of,\n opus_int16 *_pcm,int _buf_size,int *_li) OP_ARG_NONNULL(1);\n\n/**Reads more samples from the stream.\n   \\note Although \\a _buf_size must indicate the total number of values that\n    can be stored in \\a _pcm, the return value is the number of samples\n    <em>per channel</em>.\n   <ol>\n   <li>The channel count cannot be known a priori (reading more samples might\n        advance us into the next link, with a different channel count), so\n        \\a _buf_size cannot also be in units of samples per channel,</li>\n   <li>Returning the samples per channel matches the <code>libopus</code> API\n        as closely as we're able,</li>\n   <li>Returning the total number of values instead of samples per channel\n        would mean the caller would need a division to compute the samples per\n        channel, and might worry about the possibility of getting back samples\n        for some channels and not others, and</li>\n   <li>This approach is relatively fool-proof: if an application passes too\n        small a value to \\a _buf_size, they will simply get fewer samples back,\n        and if they assume the return value is the total number of values, then\n        they will simply read too few (rather than reading too many and going\n        off the end of the buffer).</li>\n   </ol>\n   \\param      _of       The \\c OggOpusFile from which to read.\n   \\param[out] _pcm      A buffer in which to store the output PCM samples as\n                          signed floats at 48&nbsp;kHz with a nominal range of\n                          <code>[-1.0,1.0]</code>.\n                         Multiple channels are interleaved using the\n                          <a href=\"http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9\">Vorbis\n                          channel ordering</a>.\n                         This must have room for at least \\a _buf_size floats.\n   \\param      _buf_size The number of floats that can be stored in \\a _pcm.\n                         It is recommended that this be large enough for at\n                          least 120 ms of data at 48 kHz per channel (5760\n                          samples per channel).\n                         Smaller buffers will simply return less data, possibly\n                          consuming more memory to buffer the data internally.\n                         If less than \\a _buf_size values are returned,\n                          <tt>libopusfile</tt> makes no guarantee that the\n                          remaining data in \\a _pcm will be unmodified.\n   \\param[out] _li       The index of the link this data was decoded from.\n                         You may pass <code>NULL</code> if you do not need this\n                          information.\n                         If this function fails (returning a negative value),\n                          this parameter is left unset.\n   \\return The number of samples read per channel on success, or a negative\n            value on failure.\n           The channel count can be retrieved on success by calling\n            <code>op_head(_of,*_li)</code>.\n           The number of samples returned may be 0 if the buffer was too small\n            to store even a single sample for all channels, or if end-of-file\n            was reached.\n           The list of possible failure codes follows.\n           Most of them can only be returned by unseekable, chained streams\n            that encounter a new link.\n   \\retval #OP_HOLE          There was a hole in the data, and some samples\n                              may have been skipped.\n                             Call this function again to continue decoding\n                              past the hole.\n   \\retval #OP_EREAD         An underlying read operation failed.\n                             This may signal a truncation attack from an\n                              <https:> source.\n   \\retval #OP_EFAULT        An internal memory allocation failed.\n   \\retval #OP_EIMPL         An unseekable stream encountered a new link that\n                              used a feature that is not implemented, such as\n                              an unsupported channel family.\n   \\retval #OP_EINVAL        The stream was only partially open.\n   \\retval #OP_ENOTFORMAT    An unseekable stream encountered a new link that\n                              did not have any logical Opus streams in it.\n   \\retval #OP_EBADHEADER    An unseekable stream encountered a new link with a\n                              required header packet that was not properly\n                              formatted, contained illegal values, or was\n                              missing altogether.\n   \\retval #OP_EVERSION      An unseekable stream encountered a new link with\n                              an ID header that contained an unrecognized\n                              version number.\n   \\retval #OP_EBADPACKET    Failed to properly decode the next packet.\n   \\retval #OP_EBADLINK      We failed to find data we had seen before.\n   \\retval #OP_EBADTIMESTAMP An unseekable stream encountered a new link with\n                              a starting timestamp that failed basic validity\n                              checks.*/\nOP_WARN_UNUSED_RESULT int op_read_float(OggOpusFile *_of,\n float *_pcm,int _buf_size,int *_li) OP_ARG_NONNULL(1);\n\n/**Reads more samples from the stream and downmixes to stereo, if necessary.\n   This function is intended for simple players that want a uniform output\n    format, even if the channel count changes between links in a chained\n    stream.\n   \\note \\a _buf_size indicates the total number of values that can be stored\n    in \\a _pcm, while the return value is the number of samples <em>per\n    channel</em>, even though the channel count is known, for consistency with\n    op_read().\n   \\param      _of       The \\c OggOpusFile from which to read.\n   \\param[out] _pcm      A buffer in which to store the output PCM samples, as\n                          signed native-endian 16-bit values at 48&nbsp;kHz\n                          with a nominal range of <code>[-32768,32767)</code>.\n                         The left and right channels are interleaved in the\n                          buffer.\n                         This must have room for at least \\a _buf_size values.\n   \\param      _buf_size The number of values that can be stored in \\a _pcm.\n                         It is recommended that this be large enough for at\n                          least 120 ms of data at 48 kHz per channel (11520\n                          values total).\n                         Smaller buffers will simply return less data, possibly\n                          consuming more memory to buffer the data internally.\n                         If less than \\a _buf_size values are returned,\n                          <tt>libopusfile</tt> makes no guarantee that the\n                          remaining data in \\a _pcm will be unmodified.\n   \\return The number of samples read per channel on success, or a negative\n            value on failure.\n           The number of samples returned may be 0 if the buffer was too small\n            to store even a single sample for both channels, or if end-of-file\n            was reached.\n           The list of possible failure codes follows.\n           Most of them can only be returned by unseekable, chained streams\n            that encounter a new link.\n   \\retval #OP_HOLE          There was a hole in the data, and some samples\n                              may have been skipped.\n                             Call this function again to continue decoding\n                              past the hole.\n   \\retval #OP_EREAD         An underlying read operation failed.\n                             This may signal a truncation attack from an\n                              <https:> source.\n   \\retval #OP_EFAULT        An internal memory allocation failed.\n   \\retval #OP_EIMPL         An unseekable stream encountered a new link that\n                              used a feature that is not implemented, such as\n                              an unsupported channel family.\n   \\retval #OP_EINVAL        The stream was only partially open.\n   \\retval #OP_ENOTFORMAT    An unseekable stream encountered a new link that\n                              did not have any logical Opus streams in it.\n   \\retval #OP_EBADHEADER    An unseekable stream encountered a new link with a\n                              required header packet that was not properly\n                              formatted, contained illegal values, or was\n                              missing altogether.\n   \\retval #OP_EVERSION      An unseekable stream encountered a new link with\n                              an ID header that contained an unrecognized\n                              version number.\n   \\retval #OP_EBADPACKET    Failed to properly decode the next packet.\n   \\retval #OP_EBADLINK      We failed to find data we had seen before.\n   \\retval #OP_EBADTIMESTAMP An unseekable stream encountered a new link with\n                              a starting timestamp that failed basic validity\n                              checks.*/\nOP_WARN_UNUSED_RESULT int op_read_stereo(OggOpusFile *_of,\n opus_int16 *_pcm,int _buf_size) OP_ARG_NONNULL(1);\n\n/**Reads more samples from the stream and downmixes to stereo, if necessary.\n   This function is intended for simple players that want a uniform output\n    format, even if the channel count changes between links in a chained\n    stream.\n   \\note \\a _buf_size indicates the total number of values that can be stored\n    in \\a _pcm, while the return value is the number of samples <em>per\n    channel</em>, even though the channel count is known, for consistency with\n    op_read_float().\n   \\param      _of       The \\c OggOpusFile from which to read.\n   \\param[out] _pcm      A buffer in which to store the output PCM samples, as\n                          signed floats at 48&nbsp;kHz with a nominal range of\n                          <code>[-1.0,1.0]</code>.\n                         The left and right channels are interleaved in the\n                          buffer.\n                         This must have room for at least \\a _buf_size values.\n   \\param      _buf_size The number of values that can be stored in \\a _pcm.\n                         It is recommended that this be large enough for at\n                          least 120 ms of data at 48 kHz per channel (11520\n                          values total).\n                         Smaller buffers will simply return less data, possibly\n                          consuming more memory to buffer the data internally.\n                         If less than \\a _buf_size values are returned,\n                          <tt>libopusfile</tt> makes no guarantee that the\n                          remaining data in \\a _pcm will be unmodified.\n   \\return The number of samples read per channel on success, or a negative\n            value on failure.\n           The number of samples returned may be 0 if the buffer was too small\n            to store even a single sample for both channels, or if end-of-file\n            was reached.\n           The list of possible failure codes follows.\n           Most of them can only be returned by unseekable, chained streams\n            that encounter a new link.\n   \\retval #OP_HOLE          There was a hole in the data, and some samples\n                              may have been skipped.\n                             Call this function again to continue decoding\n                              past the hole.\n   \\retval #OP_EREAD         An underlying read operation failed.\n                             This may signal a truncation attack from an\n                              <https:> source.\n   \\retval #OP_EFAULT        An internal memory allocation failed.\n   \\retval #OP_EIMPL         An unseekable stream encountered a new link that\n                              used a feature that is not implemented, such as\n                              an unsupported channel family.\n   \\retval #OP_EINVAL        The stream was only partially open.\n   \\retval #OP_ENOTFORMAT    An unseekable stream encountered a new link that\n                              that did not have any logical Opus streams in it.\n   \\retval #OP_EBADHEADER    An unseekable stream encountered a new link with a\n                              required header packet that was not properly\n                              formatted, contained illegal values, or was\n                              missing altogether.\n   \\retval #OP_EVERSION      An unseekable stream encountered a new link with\n                              an ID header that contained an unrecognized\n                              version number.\n   \\retval #OP_EBADPACKET    Failed to properly decode the next packet.\n   \\retval #OP_EBADLINK      We failed to find data we had seen before.\n   \\retval #OP_EBADTIMESTAMP An unseekable stream encountered a new link with\n                              a starting timestamp that failed basic validity\n                              checks.*/\nOP_WARN_UNUSED_RESULT int op_read_float_stereo(OggOpusFile *_of,\n float *_pcm,int _buf_size) OP_ARG_NONNULL(1);\n\n/*@}*/\n/*@}*/\n\n# if OP_GNUC_PREREQ(4,0)\n#  pragma GCC visibility pop\n# endif\n\n# if defined(__cplusplus)\n}\n# endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/opusfile/stream.c",
    "content": "/********************************************************************\n *                                                                  *\n * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *\n * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *\n * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *\n * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *\n *                                                                  *\n * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 1994-2012           *\n * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *\n *                                                                  *\n ********************************************************************\n\n function: stdio-based convenience library for opening/seeking/decoding\n last mod: $Id: vorbisfile.c 17573 2010-10-27 14:53:59Z xiphmont $\n\n ********************************************************************/\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"internal.h\"\n#include <sys/types.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <errno.h>\n#include <string.h>\n#if defined(_WIN32)\n# include <io.h>\n#endif\n\ntypedef struct OpusMemStream OpusMemStream;\n\n#define OP_MEM_SIZE_MAX (~(size_t)0>>1)\n#define OP_MEM_DIFF_MAX ((ptrdiff_t)OP_MEM_SIZE_MAX)\n\n/*The context information needed to read from a block of memory as if it were a\n   file.*/\nstruct OpusMemStream{\n  /*The block of memory to read from.*/\n  const unsigned char *data;\n  /*The total size of the block.\n    This must be at most OP_MEM_SIZE_MAX to prevent signed overflow while\n     seeking.*/\n  ptrdiff_t            size;\n  /*The current file position.\n    This is allowed to be set arbitrarily greater than size (i.e., past the end\n     of the block, though we will not read data past the end of the block), but\n     is not allowed to be negative (i.e., before the beginning of the block).*/\n  ptrdiff_t            pos;\n};\n\nstatic int op_fread(void *_stream,unsigned char *_ptr,int _buf_size){\n  FILE   *stream;\n  size_t  ret;\n  /*Check for empty read.*/\n  if(_buf_size<=0)return 0;\n  stream=(FILE *)_stream;\n  ret=fread(_ptr,1,_buf_size,stream);\n  OP_ASSERT(ret<=(size_t)_buf_size);\n  /*If ret==0 and !feof(stream), there was a read error.*/\n  return ret>0||feof(stream)?(int)ret:OP_EREAD;\n}\n\nstatic int op_fseek(void *_stream,opus_int64 _offset,int _whence){\n#if defined(_WIN32)\n  /*_fseeki64() is not exposed until MSCVCRT80.\n    This is the default starting with MSVC 2005 (_MSC_VER>=1400), but we want\n     to allow linking against older MSVCRT versions for compatibility back to\n     XP without installing extra runtime libraries.\n    i686-pc-mingw32 does not have fseeko() and requires\n     __MSVCRT_VERSION__>=0x800 for _fseeki64(), which screws up linking with\n     other libraries (that don't use MSVCRT80 from MSVC 2005 by default).\n    i686-w64-mingw32 does have fseeko() and respects _FILE_OFFSET_BITS, but I\n     don't know how to detect that at compile time.\n    We could just use fseeko64() (which is available in both), but its\n     implemented using fgetpos()/fsetpos() just like this code, except without\n     the overflow checking, so we prefer our version.*/\n  opus_int64 pos;\n  /*We don't use fpos_t directly because it might be a struct if __STDC__ is\n     non-zero or _INTEGRAL_MAX_BITS < 64.\n    I'm not certain when the latter is true, but someone could in theory set\n     the former.\n    Either way, it should be binary compatible with a normal 64-bit int (this\n     assumption is not portable, but I believe it is true for MSVCRT).*/\n  OP_ASSERT(sizeof(pos)==sizeof(fpos_t));\n  /*Translate the seek to an absolute one.*/\n  if(_whence==SEEK_CUR){\n    int ret;\n    ret=fgetpos((FILE *)_stream,(fpos_t *)&pos);\n    if(ret)return ret;\n  }\n  else if(_whence==SEEK_END)pos=_filelengthi64(_fileno((FILE *)_stream));\n  else if(_whence==SEEK_SET)pos=0;\n  else return -1;\n  /*Check for errors or overflow.*/\n  if(pos<0||_offset<-pos||_offset>OP_INT64_MAX-pos)return -1;\n  pos+=_offset;\n  return fsetpos((FILE *)_stream,(fpos_t *)&pos);\n#else\n  /*This function actually conforms to the SUSv2 and POSIX.1-2001, so we prefer\n     it except on Windows.*/\n  return fseeko((FILE *)_stream,(off_t)_offset,_whence);\n#endif\n}\n\nstatic opus_int64 op_ftell(void *_stream){\n#if defined(_WIN32)\n  /*_ftelli64() is not exposed until MSCVCRT80, and ftello()/ftello64() have\n     the same problems as fseeko()/fseeko64() in MingW.\n    See above for a more detailed explanation.*/\n  opus_int64 pos;\n  OP_ASSERT(sizeof(pos)==sizeof(fpos_t));\n  return fgetpos((FILE *)_stream,(fpos_t *)&pos)?-1:pos;\n#else\n  /*This function actually conforms to the SUSv2 and POSIX.1-2001, so we prefer\n     it except on Windows.*/\n  return ftello((FILE *)_stream);\n#endif\n}\n\nstatic const OpusFileCallbacks OP_FILE_CALLBACKS={\n  op_fread,\n  op_fseek,\n  op_ftell,\n  (op_close_func)fclose\n};\n\n#if defined(_WIN32)\n# include <stddef.h>\n# include <errno.h>\n\n/*Windows doesn't accept UTF-8 by default, and we don't have a wchar_t API,\n   so if we just pass the path to fopen(), then there'd be no way for a user\n   of our API to open a Unicode filename.\n  Instead, we translate from UTF-8 to UTF-16 and use Windows' wchar_t API.\n  This makes this API more consistent with platforms where the character set\n   used by fopen is the same as used on disk, which is generally UTF-8, and\n   with our metadata API, which always uses UTF-8.*/\nstatic wchar_t *op_utf8_to_utf16(const char *_src){\n  wchar_t *dst;\n  size_t   len;\n  len=strlen(_src);\n  /*Worst-case output is 1 wide character per 1 input character.*/\n  dst=(wchar_t *)_ogg_malloc(sizeof(*dst)*(len+1));\n  if(dst!=NULL){\n    size_t si;\n    size_t di;\n    for(di=si=0;si<len;si++){\n      int c0;\n      c0=(unsigned char)_src[si];\n      if(!(c0&0x80)){\n        /*Start byte says this is a 1-byte sequence.*/\n        dst[di++]=(wchar_t)c0;\n        continue;\n      }\n      else{\n        int c1;\n        /*This is safe, because c0 was not 0 and _src is NUL-terminated.*/\n        c1=(unsigned char)_src[si+1];\n        if((c1&0xC0)==0x80){\n          /*Found at least one continuation byte.*/\n          if((c0&0xE0)==0xC0){\n            wchar_t w;\n            /*Start byte says this is a 2-byte sequence.*/\n            w=(c0&0x1F)<<6|c1&0x3F;\n            if(w>=0x80U){\n              /*This is a 2-byte sequence that is not overlong.*/\n              dst[di++]=w;\n              si++;\n              continue;\n            }\n          }\n          else{\n            int c2;\n            /*This is safe, because c1 was not 0 and _src is NUL-terminated.*/\n            c2=(unsigned char)_src[si+2];\n            if((c2&0xC0)==0x80){\n              /*Found at least two continuation bytes.*/\n              if((c0&0xF0)==0xE0){\n                wchar_t w;\n                /*Start byte says this is a 3-byte sequence.*/\n                w=(c0&0xF)<<12|(c1&0x3F)<<6|c2&0x3F;\n                if(w>=0x800U&&(w<0xD800||w>=0xE000)&&w<0xFFFE){\n                  /*This is a 3-byte sequence that is not overlong, not a\n                     UTF-16 surrogate pair value, and not a 'not a character'\n                     value.*/\n                  dst[di++]=w;\n                  si+=2;\n                  continue;\n                }\n              }\n              else{\n                int c3;\n                /*This is safe, because c2 was not 0 and _src is\n                   NUL-terminated.*/\n                c3=(unsigned char)_src[si+3];\n                if((c3&0xC0)==0x80){\n                  /*Found at least three continuation bytes.*/\n                  if((c0&0xF8)==0xF0){\n                    opus_uint32 w;\n                    /*Start byte says this is a 4-byte sequence.*/\n                    w=(c0&7)<<18|(c1&0x3F)<<12|(c2&0x3F)<<6&(c3&0x3F);\n                    if(w>=0x10000U&&w<0x110000U){\n                      /*This is a 4-byte sequence that is not overlong and not\n                         greater than the largest valid Unicode code point.\n                        Convert it to a surrogate pair.*/\n                      w-=0x10000;\n                      dst[di++]=(wchar_t)(0xD800+(w>>10));\n                      dst[di++]=(wchar_t)(0xDC00+(w&0x3FF));\n                      si+=3;\n                      continue;\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n      /*If we got here, we encountered an illegal UTF-8 sequence.*/\n      _ogg_free(dst);\n      return NULL;\n    }\n    OP_ASSERT(di<=len);\n    dst[di]='\\0';\n  }\n  return dst;\n}\n\n#endif\n\nvoid *op_fopen(OpusFileCallbacks *_cb,const char *_path,const char *_mode){\n  FILE *fp;\n#if !defined(_WIN32)\n  fp=fopen(_path,_mode);\n#else\n  fp=NULL;\n  if(_path==NULL||_mode==NULL)errno=EINVAL;\n  else{\n    wchar_t *wpath;\n    wchar_t *wmode;\n    wpath=op_utf8_to_utf16(_path);\n    wmode=op_utf8_to_utf16(_mode);\n    if(wmode==NULL)errno=EINVAL;\n    else if(wpath==NULL)errno=ENOENT;\n    else fp=_wfopen(wpath,wmode);\n    _ogg_free(wmode);\n    _ogg_free(wpath);\n  }\n#endif\n  if(fp!=NULL)*_cb=*&OP_FILE_CALLBACKS;\n  return fp;\n}\n\nvoid *op_fdopen(OpusFileCallbacks *_cb,int _fd,const char *_mode){\n  FILE *fp;\n  fp=fdopen(_fd,_mode);\n  if(fp!=NULL)*_cb=*&OP_FILE_CALLBACKS;\n  return fp;\n}\n\nvoid *op_freopen(OpusFileCallbacks *_cb,const char *_path,const char *_mode,\n void *_stream){\n  FILE *fp;\n#if !defined(_WIN32)\n  fp=freopen(_path,_mode,(FILE *)_stream);\n#else\n  fp=NULL;\n  if(_path==NULL||_mode==NULL)errno=EINVAL;\n  else{\n    wchar_t *wpath;\n    wchar_t *wmode;\n    wpath=op_utf8_to_utf16(_path);\n    wmode=op_utf8_to_utf16(_mode);\n    if(wmode==NULL)errno=EINVAL;\n    else if(wpath==NULL)errno=ENOENT;\n    else fp=_wfreopen(wpath,wmode,(FILE *)_stream);\n    _ogg_free(wmode);\n    _ogg_free(wpath);\n  }\n#endif\n  if(fp!=NULL)*_cb=*&OP_FILE_CALLBACKS;\n  return fp;\n}\n\nstatic int op_mem_read(void *_stream,unsigned char *_ptr,int _buf_size){\n  OpusMemStream *stream;\n  ptrdiff_t      size;\n  ptrdiff_t      pos;\n  stream=(OpusMemStream *)_stream;\n  /*Check for empty read.*/\n  if(_buf_size<=0)return 0;\n  size=stream->size;\n  pos=stream->pos;\n  /*Check for EOF.*/\n  if(pos>=size)return 0;\n  /*Check for a short read.*/\n  _buf_size=(int)OP_MIN(size-pos,_buf_size);\n  memcpy(_ptr,stream->data+pos,_buf_size);\n  pos+=_buf_size;\n  stream->pos=pos;\n  return _buf_size;\n}\n\nstatic int op_mem_seek(void *_stream,opus_int64 _offset,int _whence){\n  OpusMemStream *stream;\n  ptrdiff_t      pos;\n  stream=(OpusMemStream *)_stream;\n  pos=stream->pos;\n  OP_ASSERT(pos>=0);\n  switch(_whence){\n    case SEEK_SET:{\n      /*Check for overflow:*/\n      if(_offset<0||_offset>OP_MEM_DIFF_MAX)return -1;\n      pos=(ptrdiff_t)_offset;\n    }break;\n    case SEEK_CUR:{\n      /*Check for overflow:*/\n      if(_offset<-pos||_offset>OP_MEM_DIFF_MAX-pos)return -1;\n      pos=(ptrdiff_t)(pos+_offset);\n    }break;\n    case SEEK_END:{\n      ptrdiff_t size;\n      size=stream->size;\n      OP_ASSERT(size>=0);\n      /*Check for overflow:*/\n      if(_offset>size||_offset<size-OP_MEM_DIFF_MAX)return -1;\n      pos=(ptrdiff_t)(size-_offset);\n    }break;\n    default:return -1;\n  }\n  stream->pos=pos;\n  return 0;\n}\n\nstatic opus_int64 op_mem_tell(void *_stream){\n  OpusMemStream *stream;\n  stream=(OpusMemStream *)_stream;\n  return (ogg_int64_t)stream->pos;\n}\n\nstatic int op_mem_close(void *_stream){\n  _ogg_free(_stream);\n  return 0;\n}\n\nstatic const OpusFileCallbacks OP_MEM_CALLBACKS={\n  op_mem_read,\n  op_mem_seek,\n  op_mem_tell,\n  op_mem_close\n};\n\nvoid *op_mem_stream_create(OpusFileCallbacks *_cb,\n const unsigned char *_data,size_t _size){\n  OpusMemStream *stream;\n  if(_size>OP_MEM_SIZE_MAX)return NULL;\n  stream=(OpusMemStream *)_ogg_malloc(sizeof(*stream));\n  if(stream!=NULL){\n    *_cb=*&OP_MEM_CALLBACKS;\n    stream->data=_data;\n    stream->size=_size;\n    stream->pos=0;\n  }\n  return stream;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/A2NLSF.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n/* Conversion between prediction filter coefficients and NLSFs  */\n/* Requires the order to be an even number                      */\n/* A piecewise linear approximation maps LSF <-> cos(LSF)       */\n/* Therefore the result is not accurate NLSFs, but the two      */\n/* functions are accurate inverses of each other                */\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n#include \"tables.h\"\n\n/* Number of binary divisions, when not in low complexity mode */\n#define BIN_DIV_STEPS_A2NLSF_FIX      3 /* must be no higher than 16 - log2( LSF_COS_TAB_SZ_FIX ) */\n#define MAX_ITERATIONS_A2NLSF_FIX    30\n\n/* Helper function for A2NLSF(..)                    */\n/* Transforms polynomials from cos(n*f) to cos(f)^n  */\nstatic OPUS_INLINE void silk_A2NLSF_trans_poly(\n    opus_int32          *p,                     /* I/O    Polynomial                                */\n    const opus_int      dd                      /* I      Polynomial order (= filter order / 2 )    */\n)\n{\n    opus_int k, n;\n\n    for( k = 2; k <= dd; k++ ) {\n        for( n = dd; n > k; n-- ) {\n            p[ n - 2 ] -= p[ n ];\n        }\n        p[ k - 2 ] -= silk_LSHIFT( p[ k ], 1 );\n    }\n}\n/* Helper function for A2NLSF(..) */\n/* Polynomial evaluation          */\nstatic OPUS_INLINE opus_int32 silk_A2NLSF_eval_poly( /* return the polynomial evaluation, in Q16     */\n    opus_int32          *p,                     /* I    Polynomial, Q16                         */\n    const opus_int32    x,                      /* I    Evaluation point, Q12                   */\n    const opus_int      dd                      /* I    Order                                   */\n)\n{\n    opus_int   n;\n    opus_int32 x_Q16, y32;\n\n    y32 = p[ dd ];                                  /* Q16 */\n    x_Q16 = silk_LSHIFT( x, 4 );\n    for( n = dd - 1; n >= 0; n-- ) {\n        y32 = silk_SMLAWW( p[ n ], y32, x_Q16 );    /* Q16 */\n    }\n    return y32;\n}\n\nstatic OPUS_INLINE void silk_A2NLSF_init(\n     const opus_int32    *a_Q16,\n     opus_int32          *P,\n     opus_int32          *Q,\n     const opus_int      dd\n)\n{\n    opus_int k;\n\n    /* Convert filter coefs to even and odd polynomials */\n    P[dd] = silk_LSHIFT( 1, 16 );\n    Q[dd] = silk_LSHIFT( 1, 16 );\n    for( k = 0; k < dd; k++ ) {\n        P[ k ] = -a_Q16[ dd - k - 1 ] - a_Q16[ dd + k ];    /* Q16 */\n        Q[ k ] = -a_Q16[ dd - k - 1 ] + a_Q16[ dd + k ];    /* Q16 */\n    }\n\n    /* Divide out zeros as we have that for even filter orders, */\n    /* z =  1 is always a root in Q, and                        */\n    /* z = -1 is always a root in P                             */\n    for( k = dd; k > 0; k-- ) {\n        P[ k - 1 ] -= P[ k ];\n        Q[ k - 1 ] += Q[ k ];\n    }\n\n    /* Transform polynomials from cos(n*f) to cos(f)^n */\n    silk_A2NLSF_trans_poly( P, dd );\n    silk_A2NLSF_trans_poly( Q, dd );\n}\n\n/* Compute Normalized Line Spectral Frequencies (NLSFs) from whitening filter coefficients      */\n/* If not all roots are found, the a_Q16 coefficients are bandwidth expanded until convergence. */\nvoid silk_A2NLSF(\n    opus_int16                  *NLSF,              /* O    Normalized Line Spectral Frequencies in Q15 (0..2^15-1) [d] */\n    opus_int32                  *a_Q16,             /* I/O  Monic whitening filter coefficients in Q16 [d]              */\n    const opus_int              d                   /* I    Filter order (must be even)                                 */\n)\n{\n    opus_int      i, k, m, dd, root_ix, ffrac;\n    opus_int32 xlo, xhi, xmid;\n    opus_int32 ylo, yhi, ymid, thr;\n    opus_int32 nom, den;\n    opus_int32 P[ SILK_MAX_ORDER_LPC / 2 + 1 ];\n    opus_int32 Q[ SILK_MAX_ORDER_LPC / 2 + 1 ];\n    opus_int32 *PQ[ 2 ];\n    opus_int32 *p;\n\n    /* Store pointers to array */\n    PQ[ 0 ] = P;\n    PQ[ 1 ] = Q;\n\n    dd = silk_RSHIFT( d, 1 );\n\n    silk_A2NLSF_init( a_Q16, P, Q, dd );\n\n    /* Find roots, alternating between P and Q */\n    p = P;                          /* Pointer to polynomial */\n\n    xlo = silk_LSFCosTab_FIX_Q12[ 0 ]; /* Q12*/\n    ylo = silk_A2NLSF_eval_poly( p, xlo, dd );\n\n    if( ylo < 0 ) {\n        /* Set the first NLSF to zero and move on to the next */\n        NLSF[ 0 ] = 0;\n        p = Q;                      /* Pointer to polynomial */\n        ylo = silk_A2NLSF_eval_poly( p, xlo, dd );\n        root_ix = 1;                /* Index of current root */\n    } else {\n        root_ix = 0;                /* Index of current root */\n    }\n    k = 1;                          /* Loop counter */\n    i = 0;                          /* Counter for bandwidth expansions applied */\n    thr = 0;\n    while( 1 ) {\n        /* Evaluate polynomial */\n        xhi = silk_LSFCosTab_FIX_Q12[ k ]; /* Q12 */\n        yhi = silk_A2NLSF_eval_poly( p, xhi, dd );\n\n        /* Detect zero crossing */\n        if( ( ylo <= 0 && yhi >= thr ) || ( ylo >= 0 && yhi <= -thr ) ) {\n            if( yhi == 0 ) {\n                /* If the root lies exactly at the end of the current       */\n                /* interval, look for the next root in the next interval    */\n                thr = 1;\n            } else {\n                thr = 0;\n            }\n            /* Binary division */\n            ffrac = -256;\n            for( m = 0; m < BIN_DIV_STEPS_A2NLSF_FIX; m++ ) {\n                /* Evaluate polynomial */\n                xmid = silk_RSHIFT_ROUND( xlo + xhi, 1 );\n                ymid = silk_A2NLSF_eval_poly( p, xmid, dd );\n\n                /* Detect zero crossing */\n                if( ( ylo <= 0 && ymid >= 0 ) || ( ylo >= 0 && ymid <= 0 ) ) {\n                    /* Reduce frequency */\n                    xhi = xmid;\n                    yhi = ymid;\n                } else {\n                    /* Increase frequency */\n                    xlo = xmid;\n                    ylo = ymid;\n                    ffrac = silk_ADD_RSHIFT( ffrac, 128, m );\n                }\n            }\n\n            /* Interpolate */\n            if( silk_abs( ylo ) < 65536 ) {\n                /* Avoid dividing by zero */\n                den = ylo - yhi;\n                nom = silk_LSHIFT( ylo, 8 - BIN_DIV_STEPS_A2NLSF_FIX ) + silk_RSHIFT( den, 1 );\n                if( den != 0 ) {\n                    ffrac += silk_DIV32( nom, den );\n                }\n            } else {\n                /* No risk of dividing by zero because abs(ylo - yhi) >= abs(ylo) >= 65536 */\n                ffrac += silk_DIV32( ylo, silk_RSHIFT( ylo - yhi, 8 - BIN_DIV_STEPS_A2NLSF_FIX ) );\n            }\n            NLSF[ root_ix ] = (opus_int16)silk_min_32( silk_LSHIFT( (opus_int32)k, 8 ) + ffrac, silk_int16_MAX );\n\n            silk_assert( NLSF[ root_ix ] >= 0 );\n\n            root_ix++;        /* Next root */\n            if( root_ix >= d ) {\n                /* Found all roots */\n                break;\n            }\n            /* Alternate pointer to polynomial */\n            p = PQ[ root_ix & 1 ];\n\n            /* Evaluate polynomial */\n            xlo = silk_LSFCosTab_FIX_Q12[ k - 1 ]; /* Q12*/\n            ylo = silk_LSHIFT( 1 - ( root_ix & 2 ), 12 );\n        } else {\n            /* Increment loop counter */\n            k++;\n            xlo = xhi;\n            ylo = yhi;\n            thr = 0;\n\n            if( k > LSF_COS_TAB_SZ_FIX ) {\n                i++;\n                if( i > MAX_ITERATIONS_A2NLSF_FIX ) {\n                    /* Set NLSFs to white spectrum and exit */\n                    NLSF[ 0 ] = (opus_int16)silk_DIV32_16( 1 << 15, d + 1 );\n                    for( k = 1; k < d; k++ ) {\n                        NLSF[ k ] = (opus_int16)silk_SMULBB( k + 1, NLSF[ 0 ] );\n                    }\n                    return;\n                }\n\n                /* Error: Apply progressively more bandwidth expansion and run again */\n                silk_bwexpander_32( a_Q16, d, 65536 - silk_SMULBB( 10 + i, i ) ); /* 10_Q16 = 0.00015*/\n\n                silk_A2NLSF_init( a_Q16, P, Q, dd );\n                p = P;                            /* Pointer to polynomial */\n                xlo = silk_LSFCosTab_FIX_Q12[ 0 ]; /* Q12*/\n                ylo = silk_A2NLSF_eval_poly( p, xlo, dd );\n                if( ylo < 0 ) {\n                    /* Set the first NLSF to zero and move on to the next */\n                    NLSF[ 0 ] = 0;\n                    p = Q;                        /* Pointer to polynomial */\n                    ylo = silk_A2NLSF_eval_poly( p, xlo, dd );\n                    root_ix = 1;                  /* Index of current root */\n                } else {\n                    root_ix = 0;                  /* Index of current root */\n                }\n                k = 1;                            /* Reset loop counter */\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/API.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_API_H\n#define SILK_API_H\n\n#include \"control.h\"\n#include \"typedef.h\"\n#include \"errors.h\"\n#include \"entenc.h\"\n#include \"entdec.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n#define SILK_MAX_FRAMES_PER_PACKET  3\n\n/* Struct for TOC (Table of Contents) */\ntypedef struct {\n    opus_int    VADFlag;                                /* Voice activity for packet                            */\n    opus_int    VADFlags[ SILK_MAX_FRAMES_PER_PACKET ]; /* Voice activity for each frame in packet              */\n    opus_int    inbandFECFlag;                          /* Flag indicating if packet contains in-band FEC       */\n} silk_TOC_struct;\n\n/****************************************/\n/* Encoder functions                    */\n/****************************************/\n\n/***********************************************/\n/* Get size in bytes of the Silk encoder state */\n/***********************************************/\nopus_int silk_Get_Encoder_Size(                         /* O    Returns error code                              */\n    opus_int                        *encSizeBytes       /* O    Number of bytes in SILK encoder state           */\n);\n\n/*************************/\n/* Init or reset encoder */\n/*************************/\nopus_int silk_InitEncoder(                              /* O    Returns error code                              */\n    void                            *encState,          /* I/O  State                                           */\n    int                              arch,              /* I    Run-time architecture                           */\n    silk_EncControlStruct           *encStatus          /* O    Encoder Status                                  */\n);\n\n/**************************/\n/* Encode frame with Silk */\n/**************************/\n/* Note: if prefillFlag is set, the input must contain 10 ms of audio, irrespective of what                     */\n/* encControl->payloadSize_ms is set to                                                                         */\nopus_int silk_Encode(                                   /* O    Returns error code                              */\n    void                            *encState,          /* I/O  State                                           */\n    silk_EncControlStruct           *encControl,        /* I    Control status                                  */\n    const opus_int16                *samplesIn,         /* I    Speech sample input vector                      */\n    opus_int                        nSamplesIn,         /* I    Number of samples in input vector               */\n    ec_enc                          *psRangeEnc,        /* I/O  Compressor data structure                       */\n    opus_int32                      *nBytesOut,         /* I/O  Number of bytes in payload (input: Max bytes)   */\n    const opus_int                  prefillFlag         /* I    Flag to indicate prefilling buffers no coding   */\n);\n\n/****************************************/\n/* Decoder functions                    */\n/****************************************/\n\n/***********************************************/\n/* Get size in bytes of the Silk decoder state */\n/***********************************************/\nopus_int silk_Get_Decoder_Size(                         /* O    Returns error code                              */\n    opus_int                        *decSizeBytes       /* O    Number of bytes in SILK decoder state           */\n);\n\n/*************************/\n/* Init or Reset decoder */\n/*************************/\nopus_int silk_InitDecoder(                              /* O    Returns error code                              */\n    void                            *decState           /* I/O  State                                           */\n);\n\n/******************/\n/* Decode a frame */\n/******************/\nopus_int silk_Decode(                                   /* O    Returns error code                              */\n    void*                           decState,           /* I/O  State                                           */\n    silk_DecControlStruct*          decControl,         /* I/O  Control Structure                               */\n    opus_int                        lostFlag,           /* I    0: no loss, 1 loss, 2 decode fec                */\n    opus_int                        newPacketFlag,      /* I    Indicates first decoder call for this packet    */\n    ec_dec                          *psRangeDec,        /* I/O  Compressor data structure                       */\n    opus_int16                      *samplesOut,        /* O    Decoded output speech vector                    */\n    opus_int32                      *nSamplesOut        /* O    Number of samples decoded                       */\n);\n\n#if 0\n/**************************************/\n/* Get table of contents for a packet */\n/**************************************/\nopus_int silk_get_TOC(\n    const opus_uint8                *payload,           /* I    Payload data                                */\n    const opus_int                  nBytesIn,           /* I    Number of input bytes                       */\n    const opus_int                  nFramesPerPayload,  /* I    Number of SILK frames per payload           */\n    silk_TOC_struct                 *Silk_TOC           /* O    Type of content                             */\n);\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/CNG.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"stack_alloc.h\"\n\n/* Generates excitation for CNG LPC synthesis */\nstatic OPUS_INLINE void silk_CNG_exc(\n    opus_int32                       residual_Q10[],     /* O    CNG residual signal Q10                     */\n    opus_int32                       exc_buf_Q14[],      /* I    Random samples buffer Q10                   */\n    opus_int32                       Gain_Q16,           /* I    Gain to apply                               */\n    opus_int                         length,             /* I    Length                                      */\n    opus_int32                       *rand_seed          /* I/O  Seed to random index generator              */\n)\n{\n    opus_int32 seed;\n    opus_int   i, idx, exc_mask;\n\n    exc_mask = CNG_BUF_MASK_MAX;\n    while( exc_mask > length ) {\n        exc_mask = silk_RSHIFT( exc_mask, 1 );\n    }\n\n    seed = *rand_seed;\n    for( i = 0; i < length; i++ ) {\n        seed = silk_RAND( seed );\n        idx = (opus_int)( silk_RSHIFT( seed, 24 ) & exc_mask );\n        silk_assert( idx >= 0 );\n        silk_assert( idx <= CNG_BUF_MASK_MAX );\n        residual_Q10[ i ] = (opus_int16)silk_SAT16( silk_SMULWW( exc_buf_Q14[ idx ], Gain_Q16 >> 4 ) );\n    }\n    *rand_seed = seed;\n}\n\nvoid silk_CNG_Reset(\n    silk_decoder_state          *psDec                          /* I/O  Decoder state                               */\n)\n{\n    opus_int i, NLSF_step_Q15, NLSF_acc_Q15;\n\n    NLSF_step_Q15 = silk_DIV32_16( silk_int16_MAX, psDec->LPC_order + 1 );\n    NLSF_acc_Q15 = 0;\n    for( i = 0; i < psDec->LPC_order; i++ ) {\n        NLSF_acc_Q15 += NLSF_step_Q15;\n        psDec->sCNG.CNG_smth_NLSF_Q15[ i ] = NLSF_acc_Q15;\n    }\n    psDec->sCNG.CNG_smth_Gain_Q16 = 0;\n    psDec->sCNG.rand_seed = 3176576;\n}\n\n/* Updates CNG estimate, and applies the CNG when packet was lost   */\nvoid silk_CNG(\n    silk_decoder_state          *psDec,                         /* I/O  Decoder state                               */\n    silk_decoder_control        *psDecCtrl,                     /* I/O  Decoder control                             */\n    opus_int16                  frame[],                        /* I/O  Signal                                      */\n    opus_int                    length                          /* I    Length of residual                          */\n)\n{\n    opus_int   i, subfr;\n    opus_int32 sum_Q6, max_Gain_Q16;\n    opus_int16 A_Q12[ MAX_LPC_ORDER ];\n    silk_CNG_struct *psCNG = &psDec->sCNG;\n    SAVE_STACK;\n\n    if( psDec->fs_kHz != psCNG->fs_kHz ) {\n        /* Reset state */\n        silk_CNG_Reset( psDec );\n\n        psCNG->fs_kHz = psDec->fs_kHz;\n    }\n    if( psDec->lossCnt == 0 && psDec->prevSignalType == TYPE_NO_VOICE_ACTIVITY ) {\n        /* Update CNG parameters */\n\n        /* Smoothing of LSF's  */\n        for( i = 0; i < psDec->LPC_order; i++ ) {\n            psCNG->CNG_smth_NLSF_Q15[ i ] += silk_SMULWB( (opus_int32)psDec->prevNLSF_Q15[ i ] - (opus_int32)psCNG->CNG_smth_NLSF_Q15[ i ], CNG_NLSF_SMTH_Q16 );\n        }\n        /* Find the subframe with the highest gain */\n        max_Gain_Q16 = 0;\n        subfr        = 0;\n        for( i = 0; i < psDec->nb_subfr; i++ ) {\n            if( psDecCtrl->Gains_Q16[ i ] > max_Gain_Q16 ) {\n                max_Gain_Q16 = psDecCtrl->Gains_Q16[ i ];\n                subfr        = i;\n            }\n        }\n        /* Update CNG excitation buffer with excitation from this subframe */\n        silk_memmove( &psCNG->CNG_exc_buf_Q14[ psDec->subfr_length ], psCNG->CNG_exc_buf_Q14, ( psDec->nb_subfr - 1 ) * psDec->subfr_length * sizeof( opus_int32 ) );\n        silk_memcpy(   psCNG->CNG_exc_buf_Q14, &psDec->exc_Q14[ subfr * psDec->subfr_length ], psDec->subfr_length * sizeof( opus_int32 ) );\n\n        /* Smooth gains */\n        for( i = 0; i < psDec->nb_subfr; i++ ) {\n            psCNG->CNG_smth_Gain_Q16 += silk_SMULWB( psDecCtrl->Gains_Q16[ i ] - psCNG->CNG_smth_Gain_Q16, CNG_GAIN_SMTH_Q16 );\n        }\n    }\n\n    /* Add CNG when packet is lost or during DTX */\n    if( psDec->lossCnt ) {\n        VARDECL( opus_int32, CNG_sig_Q10 );\n\n        ALLOC( CNG_sig_Q10, length + MAX_LPC_ORDER, opus_int32 );\n\n        /* Generate CNG excitation */\n        silk_CNG_exc( CNG_sig_Q10 + MAX_LPC_ORDER, psCNG->CNG_exc_buf_Q14, psCNG->CNG_smth_Gain_Q16, length, &psCNG->rand_seed );\n\n        /* Convert CNG NLSF to filter representation */\n        silk_NLSF2A( A_Q12, psCNG->CNG_smth_NLSF_Q15, psDec->LPC_order );\n\n        /* Generate CNG signal, by synthesis filtering */\n        silk_memcpy( CNG_sig_Q10, psCNG->CNG_synth_state, MAX_LPC_ORDER * sizeof( opus_int32 ) );\n        for( i = 0; i < length; i++ ) {\n            silk_assert( psDec->LPC_order == 10 || psDec->LPC_order == 16 );\n            /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */\n            sum_Q6 = silk_RSHIFT( psDec->LPC_order, 1 );\n            sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i -  1 ], A_Q12[ 0 ] );\n            sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i -  2 ], A_Q12[ 1 ] );\n            sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i -  3 ], A_Q12[ 2 ] );\n            sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i -  4 ], A_Q12[ 3 ] );\n            sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i -  5 ], A_Q12[ 4 ] );\n            sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i -  6 ], A_Q12[ 5 ] );\n            sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i -  7 ], A_Q12[ 6 ] );\n            sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i -  8 ], A_Q12[ 7 ] );\n            sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i -  9 ], A_Q12[ 8 ] );\n            sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 10 ], A_Q12[ 9 ] );\n            if( psDec->LPC_order == 16 ) {\n                sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 11 ], A_Q12[ 10 ] );\n                sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 12 ], A_Q12[ 11 ] );\n                sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 13 ], A_Q12[ 12 ] );\n                sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 14 ], A_Q12[ 13 ] );\n                sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 15 ], A_Q12[ 14 ] );\n                sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 16 ], A_Q12[ 15 ] );\n            }\n\n            /* Update states */\n            CNG_sig_Q10[ MAX_LPC_ORDER + i ] = silk_ADD_LSHIFT( CNG_sig_Q10[ MAX_LPC_ORDER + i ], sum_Q6, 4 );\n\n            frame[ i ] = silk_ADD_SAT16( frame[ i ], silk_RSHIFT_ROUND( sum_Q6, 6 ) );\n        }\n        silk_memcpy( psCNG->CNG_synth_state, &CNG_sig_Q10[ length ], MAX_LPC_ORDER * sizeof( opus_int32 ) );\n    } else {\n        silk_memset( psCNG->CNG_synth_state, 0, psDec->LPC_order *  sizeof( opus_int32 ) );\n    }\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/HP_variable_cutoff.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n#ifdef FIXED_POINT\n#include \"main_FIX.h\"\n#else\n#include \"main_FLP.h\"\n#endif\n#include \"tuning_parameters.h\"\n\n/* High-pass filter with cutoff frequency adaptation based on pitch lag statistics */\nvoid silk_HP_variable_cutoff(\n    silk_encoder_state_Fxx          state_Fxx[]                         /* I/O  Encoder states                              */\n)\n{\n   opus_int   quality_Q15;\n   opus_int32 pitch_freq_Hz_Q16, pitch_freq_log_Q7, delta_freq_Q7;\n   silk_encoder_state *psEncC1 = &state_Fxx[ 0 ].sCmn;\n\n   /* Adaptive cutoff frequency: estimate low end of pitch frequency range */\n   if( psEncC1->prevSignalType == TYPE_VOICED ) {\n      /* difference, in log domain */\n      pitch_freq_Hz_Q16 = silk_DIV32_16( silk_LSHIFT( silk_MUL( psEncC1->fs_kHz, 1000 ), 16 ), psEncC1->prevLag );\n      pitch_freq_log_Q7 = silk_lin2log( pitch_freq_Hz_Q16 ) - ( 16 << 7 );\n\n      /* adjustment based on quality */\n      quality_Q15 = psEncC1->input_quality_bands_Q15[ 0 ];\n      pitch_freq_log_Q7 = silk_SMLAWB( pitch_freq_log_Q7, silk_SMULWB( silk_LSHIFT( -quality_Q15, 2 ), quality_Q15 ),\n            pitch_freq_log_Q7 - ( silk_lin2log( SILK_FIX_CONST( VARIABLE_HP_MIN_CUTOFF_HZ, 16 ) ) - ( 16 << 7 ) ) );\n\n      /* delta_freq = pitch_freq_log - psEnc->variable_HP_smth1; */\n      delta_freq_Q7 = pitch_freq_log_Q7 - silk_RSHIFT( psEncC1->variable_HP_smth1_Q15, 8 );\n      if( delta_freq_Q7 < 0 ) {\n         /* less smoothing for decreasing pitch frequency, to track something close to the minimum */\n         delta_freq_Q7 = silk_MUL( delta_freq_Q7, 3 );\n      }\n\n      /* limit delta, to reduce impact of outliers in pitch estimation */\n      delta_freq_Q7 = silk_LIMIT_32( delta_freq_Q7, -SILK_FIX_CONST( VARIABLE_HP_MAX_DELTA_FREQ, 7 ), SILK_FIX_CONST( VARIABLE_HP_MAX_DELTA_FREQ, 7 ) );\n\n      /* update smoother */\n      psEncC1->variable_HP_smth1_Q15 = silk_SMLAWB( psEncC1->variable_HP_smth1_Q15,\n            silk_SMULBB( psEncC1->speech_activity_Q8, delta_freq_Q7 ), SILK_FIX_CONST( VARIABLE_HP_SMTH_COEF1, 16 ) );\n\n      /* limit frequency range */\n      psEncC1->variable_HP_smth1_Q15 = silk_LIMIT_32( psEncC1->variable_HP_smth1_Q15,\n            silk_LSHIFT( silk_lin2log( VARIABLE_HP_MIN_CUTOFF_HZ ), 8 ),\n            silk_LSHIFT( silk_lin2log( VARIABLE_HP_MAX_CUTOFF_HZ ), 8 ) );\n   }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/Inlines.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n/*! \\file silk_Inlines.h\n *  \\brief silk_Inlines.h defines OPUS_INLINE signal processing functions.\n */\n\n#ifndef SILK_FIX_INLINES_H\n#define SILK_FIX_INLINES_H\n\n#ifdef  __cplusplus\nextern \"C\"\n{\n#endif\n\n/* count leading zeros of opus_int64 */\nstatic OPUS_INLINE opus_int32 silk_CLZ64( opus_int64 in )\n{\n    opus_int32 in_upper;\n\n    in_upper = (opus_int32)silk_RSHIFT64(in, 32);\n    if (in_upper == 0) {\n        /* Search in the lower 32 bits */\n        return 32 + silk_CLZ32( (opus_int32) in );\n    } else {\n        /* Search in the upper 32 bits */\n        return silk_CLZ32( in_upper );\n    }\n}\n\n/* get number of leading zeros and fractional part (the bits right after the leading one */\nstatic OPUS_INLINE void silk_CLZ_FRAC(\n    opus_int32 in,            /* I  input                               */\n    opus_int32 *lz,           /* O  number of leading zeros             */\n    opus_int32 *frac_Q7       /* O  the 7 bits right after the leading one */\n)\n{\n    opus_int32 lzeros = silk_CLZ32(in);\n\n    * lz = lzeros;\n    * frac_Q7 = silk_ROR32(in, 24 - lzeros) & 0x7f;\n}\n\n/* Approximation of square root                                          */\n/* Accuracy: < +/- 10%  for output values > 15                           */\n/*           < +/- 2.5% for output values > 120                          */\nstatic OPUS_INLINE opus_int32 silk_SQRT_APPROX( opus_int32 x )\n{\n    opus_int32 y, lz, frac_Q7;\n\n    if( x <= 0 ) {\n        return 0;\n    }\n\n    silk_CLZ_FRAC(x, &lz, &frac_Q7);\n\n    if( lz & 1 ) {\n        y = 32768;\n    } else {\n        y = 46214;        /* 46214 = sqrt(2) * 32768 */\n    }\n\n    /* get scaling right */\n    y >>= silk_RSHIFT(lz, 1);\n\n    /* increment using fractional part of input */\n    y = silk_SMLAWB(y, y, silk_SMULBB(213, frac_Q7));\n\n    return y;\n}\n\n/* Divide two int32 values and return result as int32 in a given Q-domain */\nstatic OPUS_INLINE opus_int32 silk_DIV32_varQ(   /* O    returns a good approximation of \"(a32 << Qres) / b32\" */\n    const opus_int32     a32,               /* I    numerator (Q0)                  */\n    const opus_int32     b32,               /* I    denominator (Q0)                */\n    const opus_int       Qres               /* I    Q-domain of result (>= 0)       */\n)\n{\n    opus_int   a_headrm, b_headrm, lshift;\n    opus_int32 b32_inv, a32_nrm, b32_nrm, result;\n\n    silk_assert( b32 != 0 );\n    silk_assert( Qres >= 0 );\n\n    /* Compute number of bits head room and normalize inputs */\n    a_headrm = silk_CLZ32( silk_abs(a32) ) - 1;\n    a32_nrm = silk_LSHIFT(a32, a_headrm);                                       /* Q: a_headrm                  */\n    b_headrm = silk_CLZ32( silk_abs(b32) ) - 1;\n    b32_nrm = silk_LSHIFT(b32, b_headrm);                                       /* Q: b_headrm                  */\n\n    /* Inverse of b32, with 14 bits of precision */\n    b32_inv = silk_DIV32_16( silk_int32_MAX >> 2, silk_RSHIFT(b32_nrm, 16) );   /* Q: 29 + 16 - b_headrm        */\n\n    /* First approximation */\n    result = silk_SMULWB(a32_nrm, b32_inv);                                     /* Q: 29 + a_headrm - b_headrm  */\n\n    /* Compute residual by subtracting product of denominator and first approximation */\n    /* It's OK to overflow because the final value of a32_nrm should always be small */\n    a32_nrm = silk_SUB32_ovflw(a32_nrm, silk_LSHIFT_ovflw( silk_SMMUL(b32_nrm, result), 3 ));  /* Q: a_headrm   */\n\n    /* Refinement */\n    result = silk_SMLAWB(result, a32_nrm, b32_inv);                             /* Q: 29 + a_headrm - b_headrm  */\n\n    /* Convert to Qres domain */\n    lshift = 29 + a_headrm - b_headrm - Qres;\n    if( lshift < 0 ) {\n        return silk_LSHIFT_SAT32(result, -lshift);\n    } else {\n        if( lshift < 32){\n            return silk_RSHIFT(result, lshift);\n        } else {\n            /* Avoid undefined result */\n            return 0;\n        }\n    }\n}\n\n/* Invert int32 value and return result as int32 in a given Q-domain */\nstatic OPUS_INLINE opus_int32 silk_INVERSE32_varQ(   /* O    returns a good approximation of \"(1 << Qres) / b32\" */\n    const opus_int32     b32,                   /* I    denominator (Q0)                */\n    const opus_int       Qres                   /* I    Q-domain of result (> 0)        */\n)\n{\n    opus_int   b_headrm, lshift;\n    opus_int32 b32_inv, b32_nrm, err_Q32, result;\n\n    silk_assert( b32 != 0 );\n    silk_assert( Qres > 0 );\n\n    /* Compute number of bits head room and normalize input */\n    b_headrm = silk_CLZ32( silk_abs(b32) ) - 1;\n    b32_nrm = silk_LSHIFT(b32, b_headrm);                                       /* Q: b_headrm                */\n\n    /* Inverse of b32, with 14 bits of precision */\n    b32_inv = silk_DIV32_16( silk_int32_MAX >> 2, silk_RSHIFT(b32_nrm, 16) );   /* Q: 29 + 16 - b_headrm    */\n\n    /* First approximation */\n    result = silk_LSHIFT(b32_inv, 16);                                          /* Q: 61 - b_headrm            */\n\n    /* Compute residual by subtracting product of denominator and first approximation from one */\n    err_Q32 = silk_LSHIFT( ((opus_int32)1<<29) - silk_SMULWB(b32_nrm, b32_inv), 3 );        /* Q32                        */\n\n    /* Refinement */\n    result = silk_SMLAWW(result, err_Q32, b32_inv);                             /* Q: 61 - b_headrm            */\n\n    /* Convert to Qres domain */\n    lshift = 61 - b_headrm - Qres;\n    if( lshift <= 0 ) {\n        return silk_LSHIFT_SAT32(result, -lshift);\n    } else {\n        if( lshift < 32){\n            return silk_RSHIFT(result, lshift);\n        }else{\n            /* Avoid undefined result */\n            return 0;\n        }\n    }\n}\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif /* SILK_FIX_INLINES_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/LPC_analysis_filter.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n#include \"celt_lpc.h\"\n\n/*******************************************/\n/* LPC analysis filter                     */\n/* NB! State is kept internally and the    */\n/* filter always starts with zero state    */\n/* first d output samples are set to zero  */\n/*******************************************/\n\nvoid silk_LPC_analysis_filter(\n    opus_int16                  *out,               /* O    Output signal                                               */\n    const opus_int16            *in,                /* I    Input signal                                                */\n    const opus_int16            *B,                 /* I    MA prediction coefficients, Q12 [order]                     */\n    const opus_int32            len,                /* I    Signal length                                               */\n    const opus_int32            d                   /* I    Filter order                                                */\n)\n{\n    opus_int   j;\n#ifdef FIXED_POINT\n    opus_int16 mem[SILK_MAX_ORDER_LPC];\n    opus_int16 num[SILK_MAX_ORDER_LPC];\n#else\n    int ix;\n    opus_int32       out32_Q12, out32;\n    const opus_int16 *in_ptr;\n#endif\n\n    silk_assert( d >= 6 );\n    silk_assert( (d & 1) == 0 );\n    silk_assert( d <= len );\n\n#ifdef FIXED_POINT\n    silk_assert( d <= SILK_MAX_ORDER_LPC );\n    for ( j = 0; j < d; j++ ) {\n        num[ j ] = -B[ j ];\n    }\n    for (j=0;j<d;j++) {\n        mem[ j ] = in[ d - j - 1 ];\n    }\n    celt_fir( in + d, num, out + d, len - d, d, mem );\n    for ( j = 0; j < d; j++ ) {\n        out[ j ] = 0;\n    }\n#else\n    for( ix = d; ix < len; ix++ ) {\n        in_ptr = &in[ ix - 1 ];\n\n        out32_Q12 = silk_SMULBB( in_ptr[  0 ], B[ 0 ] );\n        /* Allowing wrap around so that two wraps can cancel each other. The rare\n           cases where the result wraps around can only be triggered by invalid streams*/\n        out32_Q12 = silk_SMLABB_ovflw( out32_Q12, in_ptr[ -1 ], B[ 1 ] );\n        out32_Q12 = silk_SMLABB_ovflw( out32_Q12, in_ptr[ -2 ], B[ 2 ] );\n        out32_Q12 = silk_SMLABB_ovflw( out32_Q12, in_ptr[ -3 ], B[ 3 ] );\n        out32_Q12 = silk_SMLABB_ovflw( out32_Q12, in_ptr[ -4 ], B[ 4 ] );\n        out32_Q12 = silk_SMLABB_ovflw( out32_Q12, in_ptr[ -5 ], B[ 5 ] );\n        for( j = 6; j < d; j += 2 ) {\n            out32_Q12 = silk_SMLABB_ovflw( out32_Q12, in_ptr[ -j     ], B[ j     ] );\n            out32_Q12 = silk_SMLABB_ovflw( out32_Q12, in_ptr[ -j - 1 ], B[ j + 1 ] );\n        }\n\n        /* Subtract prediction */\n        out32_Q12 = silk_SUB32_ovflw( silk_LSHIFT( (opus_int32)in_ptr[ 1 ], 12 ), out32_Q12 );\n\n        /* Scale to Q0 */\n        out32 = silk_RSHIFT_ROUND( out32_Q12, 12 );\n\n        /* Saturate output */\n        out[ ix ] = (opus_int16)silk_SAT16( out32 );\n    }\n\n    /* Set first d output samples to zero */\n    silk_memset( out, 0, d * sizeof( opus_int16 ) );\n#endif\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/LPC_inv_pred_gain.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n#define QA                          24\n#define A_LIMIT                     SILK_FIX_CONST( 0.99975, QA )\n\n#define MUL32_FRAC_Q(a32, b32, Q)   ((opus_int32)(silk_RSHIFT_ROUND64(silk_SMULL(a32, b32), Q)))\n\n/* Compute inverse of LPC prediction gain, and                          */\n/* test if LPC coefficients are stable (all poles within unit circle)   */\nstatic opus_int32 LPC_inverse_pred_gain_QA(                 /* O   Returns inverse prediction gain in energy domain, Q30    */\n    opus_int32           A_QA[ 2 ][ SILK_MAX_ORDER_LPC ],   /* I   Prediction coefficients                                  */\n    const opus_int       order                              /* I   Prediction order                                         */\n)\n{\n    opus_int   k, n, mult2Q;\n    opus_int32 invGain_Q30, rc_Q31, rc_mult1_Q30, rc_mult2, tmp_QA;\n    opus_int32 *Aold_QA, *Anew_QA;\n\n    Anew_QA = A_QA[ order & 1 ];\n\n    invGain_Q30 = (opus_int32)1 << 30;\n    for( k = order - 1; k > 0; k-- ) {\n        /* Check for stability */\n        if( ( Anew_QA[ k ] > A_LIMIT ) || ( Anew_QA[ k ] < -A_LIMIT ) ) {\n            return 0;\n        }\n\n        /* Set RC equal to negated AR coef */\n        rc_Q31 = -silk_LSHIFT( Anew_QA[ k ], 31 - QA );\n\n        /* rc_mult1_Q30 range: [ 1 : 2^30 ] */\n        rc_mult1_Q30 = ( (opus_int32)1 << 30 ) - silk_SMMUL( rc_Q31, rc_Q31 );\n        silk_assert( rc_mult1_Q30 > ( 1 << 15 ) );                   /* reduce A_LIMIT if fails */\n        silk_assert( rc_mult1_Q30 <= ( 1 << 30 ) );\n\n        /* rc_mult2 range: [ 2^30 : silk_int32_MAX ] */\n        mult2Q = 32 - silk_CLZ32( silk_abs( rc_mult1_Q30 ) );\n        rc_mult2 = silk_INVERSE32_varQ( rc_mult1_Q30, mult2Q + 30 );\n\n        /* Update inverse gain */\n        /* invGain_Q30 range: [ 0 : 2^30 ] */\n        invGain_Q30 = silk_LSHIFT( silk_SMMUL( invGain_Q30, rc_mult1_Q30 ), 2 );\n        silk_assert( invGain_Q30 >= 0           );\n        silk_assert( invGain_Q30 <= ( 1 << 30 ) );\n\n        /* Swap pointers */\n        Aold_QA = Anew_QA;\n        Anew_QA = A_QA[ k & 1 ];\n\n        /* Update AR coefficient */\n        for( n = 0; n < k; n++ ) {\n            tmp_QA = Aold_QA[ n ] - MUL32_FRAC_Q( Aold_QA[ k - n - 1 ], rc_Q31, 31 );\n            Anew_QA[ n ] = MUL32_FRAC_Q( tmp_QA, rc_mult2 , mult2Q );\n        }\n    }\n\n    /* Check for stability */\n    if( ( Anew_QA[ 0 ] > A_LIMIT ) || ( Anew_QA[ 0 ] < -A_LIMIT ) ) {\n        return 0;\n    }\n\n    /* Set RC equal to negated AR coef */\n    rc_Q31 = -silk_LSHIFT( Anew_QA[ 0 ], 31 - QA );\n\n    /* Range: [ 1 : 2^30 ] */\n    rc_mult1_Q30 = ( (opus_int32)1 << 30 ) - silk_SMMUL( rc_Q31, rc_Q31 );\n\n    /* Update inverse gain */\n    /* Range: [ 0 : 2^30 ] */\n    invGain_Q30 = silk_LSHIFT( silk_SMMUL( invGain_Q30, rc_mult1_Q30 ), 2 );\n    silk_assert( invGain_Q30 >= 0     );\n    silk_assert( invGain_Q30 <= 1<<30 );\n\n    return invGain_Q30;\n}\n\n/* For input in Q12 domain */\nopus_int32 silk_LPC_inverse_pred_gain(              /* O   Returns inverse prediction gain in energy domain, Q30        */\n    const opus_int16            *A_Q12,             /* I   Prediction coefficients, Q12 [order]                         */\n    const opus_int              order               /* I   Prediction order                                             */\n)\n{\n    opus_int   k;\n    opus_int32 Atmp_QA[ 2 ][ SILK_MAX_ORDER_LPC ];\n    opus_int32 *Anew_QA;\n    opus_int32 DC_resp = 0;\n\n    Anew_QA = Atmp_QA[ order & 1 ];\n\n    /* Increase Q domain of the AR coefficients */\n    for( k = 0; k < order; k++ ) {\n        DC_resp += (opus_int32)A_Q12[ k ];\n        Anew_QA[ k ] = silk_LSHIFT32( (opus_int32)A_Q12[ k ], QA - 12 );\n    }\n    /* If the DC is unstable, we don't even need to do the full calculations */\n    if( DC_resp >= 4096 ) {\n        return 0;\n    }\n    return LPC_inverse_pred_gain_QA( Atmp_QA, order );\n}\n\n#ifdef FIXED_POINT\n\n/* For input in Q24 domain */\nopus_int32 silk_LPC_inverse_pred_gain_Q24(          /* O    Returns inverse prediction gain in energy domain, Q30       */\n    const opus_int32            *A_Q24,             /* I    Prediction coefficients [order]                             */\n    const opus_int              order               /* I    Prediction order                                            */\n)\n{\n    opus_int   k;\n    opus_int32 Atmp_QA[ 2 ][ SILK_MAX_ORDER_LPC ];\n    opus_int32 *Anew_QA;\n\n    Anew_QA = Atmp_QA[ order & 1 ];\n\n    /* Increase Q domain of the AR coefficients */\n    for( k = 0; k < order; k++ ) {\n        Anew_QA[ k ] = silk_RSHIFT32( A_Q24[ k ], 24 - QA );\n    }\n\n    return LPC_inverse_pred_gain_QA( Atmp_QA, order );\n}\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/LP_variable_cutoff.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n/*\n    Elliptic/Cauer filters designed with 0.1 dB passband ripple,\n    80 dB minimum stopband attenuation, and\n    [0.95 : 0.15 : 0.35] normalized cut off frequencies.\n*/\n\n#include \"main.h\"\n\n/* Helper function, interpolates the filter taps */\nstatic OPUS_INLINE void silk_LP_interpolate_filter_taps(\n    opus_int32           B_Q28[ TRANSITION_NB ],\n    opus_int32           A_Q28[ TRANSITION_NA ],\n    const opus_int       ind,\n    const opus_int32     fac_Q16\n)\n{\n    opus_int nb, na;\n\n    if( ind < TRANSITION_INT_NUM - 1 ) {\n        if( fac_Q16 > 0 ) {\n            if( fac_Q16 < 32768 ) { /* fac_Q16 is in range of a 16-bit int */\n                /* Piece-wise linear interpolation of B and A */\n                for( nb = 0; nb < TRANSITION_NB; nb++ ) {\n                    B_Q28[ nb ] = silk_SMLAWB(\n                        silk_Transition_LP_B_Q28[ ind     ][ nb ],\n                        silk_Transition_LP_B_Q28[ ind + 1 ][ nb ] -\n                        silk_Transition_LP_B_Q28[ ind     ][ nb ],\n                        fac_Q16 );\n                }\n                for( na = 0; na < TRANSITION_NA; na++ ) {\n                    A_Q28[ na ] = silk_SMLAWB(\n                        silk_Transition_LP_A_Q28[ ind     ][ na ],\n                        silk_Transition_LP_A_Q28[ ind + 1 ][ na ] -\n                        silk_Transition_LP_A_Q28[ ind     ][ na ],\n                        fac_Q16 );\n                }\n            } else { /* ( fac_Q16 - ( 1 << 16 ) ) is in range of a 16-bit int */\n                silk_assert( fac_Q16 - ( 1 << 16 ) == silk_SAT16( fac_Q16 - ( 1 << 16 ) ) );\n                /* Piece-wise linear interpolation of B and A */\n                for( nb = 0; nb < TRANSITION_NB; nb++ ) {\n                    B_Q28[ nb ] = silk_SMLAWB(\n                        silk_Transition_LP_B_Q28[ ind + 1 ][ nb ],\n                        silk_Transition_LP_B_Q28[ ind + 1 ][ nb ] -\n                        silk_Transition_LP_B_Q28[ ind     ][ nb ],\n                        fac_Q16 - ( (opus_int32)1 << 16 ) );\n                }\n                for( na = 0; na < TRANSITION_NA; na++ ) {\n                    A_Q28[ na ] = silk_SMLAWB(\n                        silk_Transition_LP_A_Q28[ ind + 1 ][ na ],\n                        silk_Transition_LP_A_Q28[ ind + 1 ][ na ] -\n                        silk_Transition_LP_A_Q28[ ind     ][ na ],\n                        fac_Q16 - ( (opus_int32)1 << 16 ) );\n                }\n            }\n        } else {\n            silk_memcpy( B_Q28, silk_Transition_LP_B_Q28[ ind ], TRANSITION_NB * sizeof( opus_int32 ) );\n            silk_memcpy( A_Q28, silk_Transition_LP_A_Q28[ ind ], TRANSITION_NA * sizeof( opus_int32 ) );\n        }\n    } else {\n        silk_memcpy( B_Q28, silk_Transition_LP_B_Q28[ TRANSITION_INT_NUM - 1 ], TRANSITION_NB * sizeof( opus_int32 ) );\n        silk_memcpy( A_Q28, silk_Transition_LP_A_Q28[ TRANSITION_INT_NUM - 1 ], TRANSITION_NA * sizeof( opus_int32 ) );\n    }\n}\n\n/* Low-pass filter with variable cutoff frequency based on  */\n/* piece-wise linear interpolation between elliptic filters */\n/* Start by setting psEncC->mode <> 0;                      */\n/* Deactivate by setting psEncC->mode = 0;                  */\nvoid silk_LP_variable_cutoff(\n    silk_LP_state               *psLP,                          /* I/O  LP filter state                             */\n    opus_int16                  *frame,                         /* I/O  Low-pass filtered output signal             */\n    const opus_int              frame_length                    /* I    Frame length                                */\n)\n{\n    opus_int32   B_Q28[ TRANSITION_NB ], A_Q28[ TRANSITION_NA ], fac_Q16 = 0;\n    opus_int     ind = 0;\n\n    silk_assert( psLP->transition_frame_no >= 0 && psLP->transition_frame_no <= TRANSITION_FRAMES );\n\n    /* Run filter if needed */\n    if( psLP->mode != 0 ) {\n        /* Calculate index and interpolation factor for interpolation */\n#if( TRANSITION_INT_STEPS == 64 )\n        fac_Q16 = silk_LSHIFT( TRANSITION_FRAMES - psLP->transition_frame_no, 16 - 6 );\n#else\n        fac_Q16 = silk_DIV32_16( silk_LSHIFT( TRANSITION_FRAMES - psLP->transition_frame_no, 16 ), TRANSITION_FRAMES );\n#endif\n        ind      = silk_RSHIFT( fac_Q16, 16 );\n        fac_Q16 -= silk_LSHIFT( ind, 16 );\n\n        silk_assert( ind >= 0 );\n        silk_assert( ind < TRANSITION_INT_NUM );\n\n        /* Interpolate filter coefficients */\n        silk_LP_interpolate_filter_taps( B_Q28, A_Q28, ind, fac_Q16 );\n\n        /* Update transition frame number for next frame */\n        psLP->transition_frame_no = silk_LIMIT( psLP->transition_frame_no + psLP->mode, 0, TRANSITION_FRAMES );\n\n        /* ARMA low-pass filtering */\n        silk_assert( TRANSITION_NB == 3 && TRANSITION_NA == 2 );\n        silk_biquad_alt( frame, B_Q28, A_Q28, psLP->In_LP_State, frame, frame_length, 1);\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/MacroCount.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SIGPROCFIX_API_MACROCOUNT_H\n#define SIGPROCFIX_API_MACROCOUNT_H\n#include <stdio.h>\n\n#ifdef    silk_MACRO_COUNT\n#define varDefine opus_int64 ops_count = 0;\n\nextern opus_int64 ops_count;\n\nstatic OPUS_INLINE opus_int64 silk_SaveCount(){\n    return(ops_count);\n}\n\nstatic OPUS_INLINE opus_int64 silk_SaveResetCount(){\n    opus_int64 ret;\n\n    ret = ops_count;\n    ops_count = 0;\n    return(ret);\n}\n\nstatic OPUS_INLINE silk_PrintCount(){\n    printf(\"ops_count = %d \\n \", (opus_int32)ops_count);\n}\n\n#undef silk_MUL\nstatic OPUS_INLINE opus_int32 silk_MUL(opus_int32 a32, opus_int32 b32){\n    opus_int32 ret;\n    ops_count += 4;\n    ret = a32 * b32;\n    return ret;\n}\n\n#undef silk_MUL_uint\nstatic OPUS_INLINE opus_uint32 silk_MUL_uint(opus_uint32 a32, opus_uint32 b32){\n    opus_uint32 ret;\n    ops_count += 4;\n    ret = a32 * b32;\n    return ret;\n}\n#undef silk_MLA\nstatic OPUS_INLINE opus_int32 silk_MLA(opus_int32 a32, opus_int32 b32, opus_int32 c32){\n    opus_int32 ret;\n    ops_count += 4;\n    ret = a32 + b32 * c32;\n    return ret;\n}\n\n#undef silk_MLA_uint\nstatic OPUS_INLINE opus_int32 silk_MLA_uint(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32){\n    opus_uint32 ret;\n    ops_count += 4;\n    ret = a32 + b32 * c32;\n    return ret;\n}\n\n#undef silk_SMULWB\nstatic OPUS_INLINE opus_int32 silk_SMULWB(opus_int32 a32, opus_int32 b32){\n    opus_int32 ret;\n    ops_count += 5;\n    ret = (a32 >> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16);\n    return ret;\n}\n#undef    silk_SMLAWB\nstatic OPUS_INLINE opus_int32 silk_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 c32){\n    opus_int32 ret;\n    ops_count += 5;\n    ret = ((a32) + ((((b32) >> 16) * (opus_int32)((opus_int16)(c32))) + ((((b32) & 0x0000FFFF) * (opus_int32)((opus_int16)(c32))) >> 16)));\n    return ret;\n}\n\n#undef silk_SMULWT\nstatic OPUS_INLINE opus_int32 silk_SMULWT(opus_int32 a32, opus_int32 b32){\n    opus_int32 ret;\n    ops_count += 4;\n    ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16);\n    return ret;\n}\n#undef silk_SMLAWT\nstatic OPUS_INLINE opus_int32 silk_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 c32){\n    opus_int32 ret;\n    ops_count += 4;\n    ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16));\n    return ret;\n}\n\n#undef silk_SMULBB\nstatic OPUS_INLINE opus_int32 silk_SMULBB(opus_int32 a32, opus_int32 b32){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = (opus_int32)((opus_int16)a32) * (opus_int32)((opus_int16)b32);\n    return ret;\n}\n#undef silk_SMLABB\nstatic OPUS_INLINE opus_int32 silk_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 c32){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32);\n    return ret;\n}\n\n#undef silk_SMULBT\nstatic OPUS_INLINE opus_int32 silk_SMULBT(opus_int32 a32, opus_int32 b32 ){\n    opus_int32 ret;\n    ops_count += 4;\n    ret = ((opus_int32)((opus_int16)a32)) * (b32 >> 16);\n    return ret;\n}\n\n#undef silk_SMLABT\nstatic OPUS_INLINE opus_int32 silk_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 c32){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16);\n    return ret;\n}\n\n#undef silk_SMULTT\nstatic OPUS_INLINE opus_int32 silk_SMULTT(opus_int32 a32, opus_int32 b32){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = (a32 >> 16) * (b32 >> 16);\n    return ret;\n}\n\n#undef    silk_SMLATT\nstatic OPUS_INLINE opus_int32 silk_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 c32){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a32 + (b32 >> 16) * (c32 >> 16);\n    return ret;\n}\n\n\n/* multiply-accumulate macros that allow overflow in the addition (ie, no asserts in debug mode)*/\n#undef    silk_MLA_ovflw\n#define silk_MLA_ovflw silk_MLA\n\n#undef silk_SMLABB_ovflw\n#define silk_SMLABB_ovflw silk_SMLABB\n\n#undef silk_SMLABT_ovflw\n#define silk_SMLABT_ovflw silk_SMLABT\n\n#undef silk_SMLATT_ovflw\n#define silk_SMLATT_ovflw silk_SMLATT\n\n#undef silk_SMLAWB_ovflw\n#define silk_SMLAWB_ovflw silk_SMLAWB\n\n#undef silk_SMLAWT_ovflw\n#define silk_SMLAWT_ovflw silk_SMLAWT\n\n#undef silk_SMULL\nstatic OPUS_INLINE opus_int64 silk_SMULL(opus_int32 a32, opus_int32 b32){\n    opus_int64 ret;\n    ops_count += 8;\n    ret = ((opus_int64)(a32) * /*(opus_int64)*/(b32));\n    return ret;\n}\n\n#undef    silk_SMLAL\nstatic OPUS_INLINE opus_int64 silk_SMLAL(opus_int64 a64, opus_int32 b32, opus_int32 c32){\n    opus_int64 ret;\n    ops_count += 8;\n    ret = a64 + ((opus_int64)(b32) * /*(opus_int64)*/(c32));\n    return ret;\n}\n#undef    silk_SMLALBB\nstatic OPUS_INLINE opus_int64 silk_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16 c16){\n    opus_int64 ret;\n    ops_count += 4;\n    ret = a64 + ((opus_int64)(b16) * /*(opus_int64)*/(c16));\n    return ret;\n}\n\n#undef    SigProcFIX_CLZ16\nstatic OPUS_INLINE opus_int32 SigProcFIX_CLZ16(opus_int16 in16)\n{\n    opus_int32 out32 = 0;\n    ops_count += 10;\n    if( in16 == 0 ) {\n        return 16;\n    }\n    /* test nibbles */\n    if( in16 & 0xFF00 ) {\n        if( in16 & 0xF000 ) {\n            in16 >>= 12;\n        } else {\n            out32 += 4;\n            in16 >>= 8;\n        }\n    } else {\n        if( in16 & 0xFFF0 ) {\n            out32 += 8;\n            in16 >>= 4;\n        } else {\n            out32 += 12;\n        }\n    }\n    /* test bits and return */\n    if( in16 & 0xC ) {\n        if( in16 & 0x8 )\n            return out32 + 0;\n        else\n            return out32 + 1;\n    } else {\n        if( in16 & 0xE )\n            return out32 + 2;\n        else\n            return out32 + 3;\n    }\n}\n\n#undef SigProcFIX_CLZ32\nstatic OPUS_INLINE opus_int32 SigProcFIX_CLZ32(opus_int32 in32)\n{\n    /* test highest 16 bits and convert to opus_int16 */\n    ops_count += 2;\n    if( in32 & 0xFFFF0000 ) {\n        return SigProcFIX_CLZ16((opus_int16)(in32 >> 16));\n    } else {\n        return SigProcFIX_CLZ16((opus_int16)in32) + 16;\n    }\n}\n\n#undef silk_DIV32\nstatic OPUS_INLINE opus_int32 silk_DIV32(opus_int32 a32, opus_int32 b32){\n    ops_count += 64;\n    return a32 / b32;\n}\n\n#undef silk_DIV32_16\nstatic OPUS_INLINE opus_int32 silk_DIV32_16(opus_int32 a32, opus_int32 b32){\n    ops_count += 32;\n    return a32 / b32;\n}\n\n#undef silk_SAT8\nstatic OPUS_INLINE opus_int8 silk_SAT8(opus_int64 a){\n    opus_int8 tmp;\n    ops_count += 1;\n    tmp = (opus_int8)((a) > silk_int8_MAX ? silk_int8_MAX  : \\\n                    ((a) < silk_int8_MIN ? silk_int8_MIN  : (a)));\n    return(tmp);\n}\n\n#undef silk_SAT16\nstatic OPUS_INLINE opus_int16 silk_SAT16(opus_int64 a){\n    opus_int16 tmp;\n    ops_count += 1;\n    tmp = (opus_int16)((a) > silk_int16_MAX ? silk_int16_MAX  : \\\n                     ((a) < silk_int16_MIN ? silk_int16_MIN  : (a)));\n    return(tmp);\n}\n#undef silk_SAT32\nstatic OPUS_INLINE opus_int32 silk_SAT32(opus_int64 a){\n    opus_int32 tmp;\n    ops_count += 1;\n    tmp = (opus_int32)((a) > silk_int32_MAX ? silk_int32_MAX  : \\\n                     ((a) < silk_int32_MIN ? silk_int32_MIN  : (a)));\n    return(tmp);\n}\n#undef silk_POS_SAT32\nstatic OPUS_INLINE opus_int32 silk_POS_SAT32(opus_int64 a){\n    opus_int32 tmp;\n    ops_count += 1;\n    tmp = (opus_int32)((a) > silk_int32_MAX ? silk_int32_MAX : (a));\n    return(tmp);\n}\n\n#undef silk_ADD_POS_SAT8\nstatic OPUS_INLINE opus_int8 silk_ADD_POS_SAT8(opus_int64 a, opus_int64 b){\n    opus_int8 tmp;\n    ops_count += 1;\n    tmp = (opus_int8)((((a)+(b)) & 0x80) ? silk_int8_MAX  : ((a)+(b)));\n    return(tmp);\n}\n#undef silk_ADD_POS_SAT16\nstatic OPUS_INLINE opus_int16 silk_ADD_POS_SAT16(opus_int64 a, opus_int64 b){\n    opus_int16 tmp;\n    ops_count += 1;\n    tmp = (opus_int16)((((a)+(b)) & 0x8000) ? silk_int16_MAX : ((a)+(b)));\n    return(tmp);\n}\n\n#undef silk_ADD_POS_SAT32\nstatic OPUS_INLINE opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){\n    opus_int32 tmp;\n    ops_count += 1;\n    tmp = (opus_int32)((((a)+(b)) & 0x80000000) ? silk_int32_MAX : ((a)+(b)));\n    return(tmp);\n}\n\n#undef silk_ADD_POS_SAT64\nstatic OPUS_INLINE opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){\n    opus_int64 tmp;\n    ops_count += 1;\n    tmp = ((((a)+(b)) & 0x8000000000000000LL) ? silk_int64_MAX : ((a)+(b)));\n    return(tmp);\n}\n\n#undef    silk_LSHIFT8\nstatic OPUS_INLINE opus_int8 silk_LSHIFT8(opus_int8 a, opus_int32 shift){\n    opus_int8 ret;\n    ops_count += 1;\n    ret = a << shift;\n    return ret;\n}\n#undef    silk_LSHIFT16\nstatic OPUS_INLINE opus_int16 silk_LSHIFT16(opus_int16 a, opus_int32 shift){\n    opus_int16 ret;\n    ops_count += 1;\n    ret = a << shift;\n    return ret;\n}\n#undef    silk_LSHIFT32\nstatic OPUS_INLINE opus_int32 silk_LSHIFT32(opus_int32 a, opus_int32 shift){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a << shift;\n    return ret;\n}\n#undef    silk_LSHIFT64\nstatic OPUS_INLINE opus_int64 silk_LSHIFT64(opus_int64 a, opus_int shift){\n    ops_count += 1;\n    return a << shift;\n}\n\n#undef    silk_LSHIFT_ovflw\nstatic OPUS_INLINE opus_int32 silk_LSHIFT_ovflw(opus_int32 a, opus_int32 shift){\n    ops_count += 1;\n    return a << shift;\n}\n\n#undef    silk_LSHIFT_uint\nstatic OPUS_INLINE opus_uint32 silk_LSHIFT_uint(opus_uint32 a, opus_int32 shift){\n    opus_uint32 ret;\n    ops_count += 1;\n    ret = a << shift;\n    return ret;\n}\n\n#undef    silk_RSHIFT8\nstatic OPUS_INLINE opus_int8 silk_RSHIFT8(opus_int8 a, opus_int32 shift){\n    ops_count += 1;\n    return a >> shift;\n}\n#undef    silk_RSHIFT16\nstatic OPUS_INLINE opus_int16 silk_RSHIFT16(opus_int16 a, opus_int32 shift){\n    ops_count += 1;\n    return a >> shift;\n}\n#undef    silk_RSHIFT32\nstatic OPUS_INLINE opus_int32 silk_RSHIFT32(opus_int32 a, opus_int32 shift){\n    ops_count += 1;\n    return a >> shift;\n}\n#undef    silk_RSHIFT64\nstatic OPUS_INLINE opus_int64 silk_RSHIFT64(opus_int64 a, opus_int64 shift){\n    ops_count += 1;\n    return a >> shift;\n}\n\n#undef    silk_RSHIFT_uint\nstatic OPUS_INLINE opus_uint32 silk_RSHIFT_uint(opus_uint32 a, opus_int32 shift){\n    ops_count += 1;\n    return a >> shift;\n}\n\n#undef    silk_ADD_LSHIFT\nstatic OPUS_INLINE opus_int32 silk_ADD_LSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a + (b << shift);\n    return ret;                /* shift >= 0*/\n}\n#undef    silk_ADD_LSHIFT32\nstatic OPUS_INLINE opus_int32 silk_ADD_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a + (b << shift);\n    return ret;                /* shift >= 0*/\n}\n#undef    silk_ADD_LSHIFT_uint\nstatic OPUS_INLINE opus_uint32 silk_ADD_LSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){\n    opus_uint32 ret;\n    ops_count += 1;\n    ret = a + (b << shift);\n    return ret;                /* shift >= 0*/\n}\n#undef    silk_ADD_RSHIFT\nstatic OPUS_INLINE opus_int32 silk_ADD_RSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a + (b >> shift);\n    return ret;                /* shift  > 0*/\n}\n#undef    silk_ADD_RSHIFT32\nstatic OPUS_INLINE opus_int32 silk_ADD_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a + (b >> shift);\n    return ret;                /* shift  > 0*/\n}\n#undef    silk_ADD_RSHIFT_uint\nstatic OPUS_INLINE opus_uint32 silk_ADD_RSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){\n    opus_uint32 ret;\n    ops_count += 1;\n    ret = a + (b >> shift);\n    return ret;                /* shift  > 0*/\n}\n#undef    silk_SUB_LSHIFT32\nstatic OPUS_INLINE opus_int32 silk_SUB_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a - (b << shift);\n    return ret;                /* shift >= 0*/\n}\n#undef    silk_SUB_RSHIFT32\nstatic OPUS_INLINE opus_int32 silk_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a - (b >> shift);\n    return ret;                /* shift  > 0*/\n}\n\n#undef    silk_RSHIFT_ROUND\nstatic OPUS_INLINE opus_int32 silk_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){\n    opus_int32 ret;\n    ops_count += 3;\n    ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1;\n    return ret;\n}\n\n#undef    silk_RSHIFT_ROUND64\nstatic OPUS_INLINE opus_int64 silk_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){\n    opus_int64 ret;\n    ops_count += 6;\n    ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1;\n    return ret;\n}\n\n#undef    silk_abs_int64\nstatic OPUS_INLINE opus_int64 silk_abs_int64(opus_int64 a){\n    ops_count += 1;\n    return (((a) >  0)  ? (a) : -(a));            /* Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN*/\n}\n\n#undef    silk_abs_int32\nstatic OPUS_INLINE opus_int32 silk_abs_int32(opus_int32 a){\n    ops_count += 1;\n    return silk_abs(a);\n}\n\n\n#undef silk_min\nstatic silk_min(a, b){\n    ops_count += 1;\n    return (((a) < (b)) ? (a) :  (b));\n}\n#undef silk_max\nstatic silk_max(a, b){\n    ops_count += 1;\n    return (((a) > (b)) ? (a) :  (b));\n}\n#undef silk_sign\nstatic silk_sign(a){\n    ops_count += 1;\n    return ((a) > 0 ? 1 : ( (a) < 0 ? -1 : 0 ));\n}\n\n#undef    silk_ADD16\nstatic OPUS_INLINE opus_int16 silk_ADD16(opus_int16 a, opus_int16 b){\n    opus_int16 ret;\n    ops_count += 1;\n    ret = a + b;\n    return ret;\n}\n\n#undef    silk_ADD32\nstatic OPUS_INLINE opus_int32 silk_ADD32(opus_int32 a, opus_int32 b){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a + b;\n    return ret;\n}\n\n#undef    silk_ADD64\nstatic OPUS_INLINE opus_int64 silk_ADD64(opus_int64 a, opus_int64 b){\n    opus_int64 ret;\n    ops_count += 2;\n    ret = a + b;\n    return ret;\n}\n\n#undef    silk_SUB16\nstatic OPUS_INLINE opus_int16 silk_SUB16(opus_int16 a, opus_int16 b){\n    opus_int16 ret;\n    ops_count += 1;\n    ret = a - b;\n    return ret;\n}\n\n#undef    silk_SUB32\nstatic OPUS_INLINE opus_int32 silk_SUB32(opus_int32 a, opus_int32 b){\n    opus_int32 ret;\n    ops_count += 1;\n    ret = a - b;\n    return ret;\n}\n\n#undef    silk_SUB64\nstatic OPUS_INLINE opus_int64 silk_SUB64(opus_int64 a, opus_int64 b){\n    opus_int64 ret;\n    ops_count += 2;\n    ret = a - b;\n    return ret;\n}\n\n#undef silk_ADD_SAT16\nstatic OPUS_INLINE opus_int16 silk_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) {\n    opus_int16 res;\n    /* Nb will be counted in AKP_add32 and silk_SAT16*/\n    res = (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a16), (b16) ) );\n    return res;\n}\n\n#undef silk_ADD_SAT32\nstatic OPUS_INLINE opus_int32 silk_ADD_SAT32(opus_int32 a32, opus_int32 b32){\n    opus_int32 res;\n    ops_count += 1;\n    res =    ((((a32) + (b32)) & 0x80000000) == 0 ?                                    \\\n            ((((a32) & (b32)) & 0x80000000) != 0 ? silk_int32_MIN : (a32)+(b32)) :    \\\n            ((((a32) | (b32)) & 0x80000000) == 0 ? silk_int32_MAX : (a32)+(b32)) );\n    return res;\n}\n\n#undef silk_ADD_SAT64\nstatic OPUS_INLINE opus_int64 silk_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) {\n    opus_int64 res;\n    ops_count += 1;\n    res =    ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ?                                \\\n            ((((a64) & (b64)) & 0x8000000000000000LL) != 0 ? silk_int64_MIN : (a64)+(b64)) :    \\\n            ((((a64) | (b64)) & 0x8000000000000000LL) == 0 ? silk_int64_MAX : (a64)+(b64)) );\n    return res;\n}\n\n#undef silk_SUB_SAT16\nstatic OPUS_INLINE opus_int16 silk_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) {\n    opus_int16 res;\n    silk_assert(0);\n    /* Nb will be counted in sub-macros*/\n    res = (opus_int16)silk_SAT16( silk_SUB32( (opus_int32)(a16), (b16) ) );\n    return res;\n}\n\n#undef silk_SUB_SAT32\nstatic OPUS_INLINE opus_int32 silk_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) {\n    opus_int32 res;\n    ops_count += 1;\n    res =     ((((a32)-(b32)) & 0x80000000) == 0 ?                                            \\\n            (( (a32) & ((b32)^0x80000000) & 0x80000000) ? silk_int32_MIN : (a32)-(b32)) :    \\\n            ((((a32)^0x80000000) & (b32)  & 0x80000000) ? silk_int32_MAX : (a32)-(b32)) );\n    return res;\n}\n\n#undef silk_SUB_SAT64\nstatic OPUS_INLINE opus_int64 silk_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) {\n    opus_int64 res;\n    ops_count += 1;\n    res =    ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ?                                                        \\\n            (( (a64) & ((b64)^0x8000000000000000LL) & 0x8000000000000000LL) ? silk_int64_MIN : (a64)-(b64)) :    \\\n            ((((a64)^0x8000000000000000LL) & (b64)  & 0x8000000000000000LL) ? silk_int64_MAX : (a64)-(b64)) );\n\n    return res;\n}\n\n#undef    silk_SMULWW\nstatic OPUS_INLINE opus_int32 silk_SMULWW(opus_int32 a32, opus_int32 b32){\n    opus_int32 ret;\n    /* Nb will be counted in sub-macros*/\n    ret = silk_MLA(silk_SMULWB((a32), (b32)), (a32), silk_RSHIFT_ROUND((b32), 16));\n    return ret;\n}\n\n#undef    silk_SMLAWW\nstatic OPUS_INLINE opus_int32 silk_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 c32){\n    opus_int32 ret;\n    /* Nb will be counted in sub-macros*/\n    ret = silk_MLA(silk_SMLAWB((a32), (b32), (c32)), (b32), silk_RSHIFT_ROUND((c32), 16));\n    return ret;\n}\n\n#undef    silk_min_int\nstatic OPUS_INLINE opus_int silk_min_int(opus_int a, opus_int b)\n{\n    ops_count += 1;\n    return (((a) < (b)) ? (a) : (b));\n}\n\n#undef    silk_min_16\nstatic OPUS_INLINE opus_int16 silk_min_16(opus_int16 a, opus_int16 b)\n{\n    ops_count += 1;\n    return (((a) < (b)) ? (a) : (b));\n}\n#undef    silk_min_32\nstatic OPUS_INLINE opus_int32 silk_min_32(opus_int32 a, opus_int32 b)\n{\n    ops_count += 1;\n    return (((a) < (b)) ? (a) : (b));\n}\n#undef    silk_min_64\nstatic OPUS_INLINE opus_int64 silk_min_64(opus_int64 a, opus_int64 b)\n{\n    ops_count += 1;\n    return (((a) < (b)) ? (a) : (b));\n}\n\n/* silk_min() versions with typecast in the function call */\n#undef    silk_max_int\nstatic OPUS_INLINE opus_int silk_max_int(opus_int a, opus_int b)\n{\n    ops_count += 1;\n    return (((a) > (b)) ? (a) : (b));\n}\n#undef    silk_max_16\nstatic OPUS_INLINE opus_int16 silk_max_16(opus_int16 a, opus_int16 b)\n{\n    ops_count += 1;\n    return (((a) > (b)) ? (a) : (b));\n}\n#undef    silk_max_32\nstatic OPUS_INLINE opus_int32 silk_max_32(opus_int32 a, opus_int32 b)\n{\n    ops_count += 1;\n    return (((a) > (b)) ? (a) : (b));\n}\n\n#undef    silk_max_64\nstatic OPUS_INLINE opus_int64 silk_max_64(opus_int64 a, opus_int64 b)\n{\n    ops_count += 1;\n    return (((a) > (b)) ? (a) : (b));\n}\n\n\n#undef silk_LIMIT_int\nstatic OPUS_INLINE opus_int silk_LIMIT_int(opus_int a, opus_int limit1, opus_int limit2)\n{\n    opus_int ret;\n    ops_count += 6;\n\n    ret = ((limit1) > (limit2) ? ((a) > (limit1) ? (limit1) : ((a) < (limit2) ? (limit2) : (a))) \\\n        : ((a) > (limit2) ? (limit2) : ((a) < (limit1) ? (limit1) : (a))));\n\n    return(ret);\n}\n\n#undef silk_LIMIT_16\nstatic OPUS_INLINE opus_int16 silk_LIMIT_16(opus_int16 a, opus_int16 limit1, opus_int16 limit2)\n{\n    opus_int16 ret;\n    ops_count += 6;\n\n    ret = ((limit1) > (limit2) ? ((a) > (limit1) ? (limit1) : ((a) < (limit2) ? (limit2) : (a))) \\\n        : ((a) > (limit2) ? (limit2) : ((a) < (limit1) ? (limit1) : (a))));\n\nreturn(ret);\n}\n\n\n#undef silk_LIMIT_32\nstatic OPUS_INLINE opus_int silk_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_int32 limit2)\n{\n    opus_int32 ret;\n    ops_count += 6;\n\n    ret = ((limit1) > (limit2) ? ((a) > (limit1) ? (limit1) : ((a) < (limit2) ? (limit2) : (a))) \\\n        : ((a) > (limit2) ? (limit2) : ((a) < (limit1) ? (limit1) : (a))));\n    return(ret);\n}\n\n#else\n#define varDefine\n#define silk_SaveCount()\n\n#endif\n#endif\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/MacroDebug.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nCopyright (C) 2012 Xiph.Org Foundation\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef MACRO_DEBUG_H\n#define MACRO_DEBUG_H\n\n/* Redefine macro functions with extensive assertion in DEBUG mode.\n   As functions can't be undefined, this file can't work with SigProcFIX_MacroCount.h */\n\n#if ( defined (FIXED_DEBUG) || ( 0 && defined (_DEBUG) ) ) && !defined (silk_MACRO_COUNT)\n\n#undef silk_ADD16\n#define silk_ADD16(a,b) silk_ADD16_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int16 silk_ADD16_(opus_int16 a, opus_int16 b, char *file, int line){\n    opus_int16 ret;\n\n    ret = a + b;\n    if ( ret != silk_ADD_SAT16( a, b ) )\n    {\n        fprintf (stderr, \"silk_ADD16(%d, %d) in %s: line %d\\n\", a, b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_ADD32\n#define silk_ADD32(a,b) silk_ADD32_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_ADD32_(opus_int32 a, opus_int32 b, char *file, int line){\n    opus_int32 ret;\n\n    ret = a + b;\n    if ( ret != silk_ADD_SAT32( a, b ) )\n    {\n        fprintf (stderr, \"silk_ADD32(%d, %d) in %s: line %d\\n\", a, b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_ADD64\n#define silk_ADD64(a,b) silk_ADD64_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int64 silk_ADD64_(opus_int64 a, opus_int64 b, char *file, int line){\n    opus_int64 ret;\n\n    ret = a + b;\n    if ( ret != silk_ADD_SAT64( a, b ) )\n    {\n        fprintf (stderr, \"silk_ADD64(%lld, %lld) in %s: line %d\\n\", (long long)a, (long long)b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_SUB16\n#define silk_SUB16(a,b) silk_SUB16_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int16 silk_SUB16_(opus_int16 a, opus_int16 b, char *file, int line){\n    opus_int16 ret;\n\n    ret = a - b;\n    if ( ret != silk_SUB_SAT16( a, b ) )\n    {\n        fprintf (stderr, \"silk_SUB16(%d, %d) in %s: line %d\\n\", a, b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_SUB32\n#define silk_SUB32(a,b) silk_SUB32_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SUB32_(opus_int32 a, opus_int32 b, char *file, int line){\n    opus_int32 ret;\n\n    ret = a - b;\n    if ( ret != silk_SUB_SAT32( a, b ) )\n    {\n        fprintf (stderr, \"silk_SUB32(%d, %d) in %s: line %d\\n\", a, b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_SUB64\n#define silk_SUB64(a,b) silk_SUB64_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int64 silk_SUB64_(opus_int64 a, opus_int64 b, char *file, int line){\n    opus_int64 ret;\n\n    ret = a - b;\n    if ( ret != silk_SUB_SAT64( a, b ) )\n    {\n        fprintf (stderr, \"silk_SUB64(%lld, %lld) in %s: line %d\\n\", (long long)a, (long long)b, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_ADD_SAT16\n#define silk_ADD_SAT16(a,b) silk_ADD_SAT16_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int16 silk_ADD_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line) {\n    opus_int16 res;\n    res = (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a16), (b16) ) );\n    if ( res != silk_SAT16( (opus_int32)a16 + (opus_int32)b16 ) )\n    {\n        fprintf (stderr, \"silk_ADD_SAT16(%d, %d) in %s: line %d\\n\", a16, b16, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return res;\n}\n\n#undef silk_ADD_SAT32\n#define silk_ADD_SAT32(a,b) silk_ADD_SAT32_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_ADD_SAT32_(opus_int32 a32, opus_int32 b32, char *file, int line){\n    opus_int32 res;\n    res =   ((((opus_uint32)(a32) + (opus_uint32)(b32)) & 0x80000000) == 0 ?       \\\n            ((((a32) & (b32)) & 0x80000000) != 0 ? silk_int32_MIN : (a32)+(b32)) : \\\n            ((((a32) | (b32)) & 0x80000000) == 0 ? silk_int32_MAX : (a32)+(b32)) );\n    if ( res != silk_SAT32( (opus_int64)a32 + (opus_int64)b32 ) )\n    {\n        fprintf (stderr, \"silk_ADD_SAT32(%d, %d) in %s: line %d\\n\", a32, b32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return res;\n}\n\n#undef silk_ADD_SAT64\n#define silk_ADD_SAT64(a,b) silk_ADD_SAT64_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int64 silk_ADD_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line) {\n    opus_int64 res;\n    int        fail = 0;\n    res =   ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ?                                 \\\n            ((((a64) & (b64)) & 0x8000000000000000LL) != 0 ? silk_int64_MIN : (a64)+(b64)) : \\\n            ((((a64) | (b64)) & 0x8000000000000000LL) == 0 ? silk_int64_MAX : (a64)+(b64)) );\n    if( res != a64 + b64 ) {\n        /* Check that we saturated to the correct extreme value */\n        if ( !(( res == silk_int64_MAX && ( ( a64 >> 1 ) + ( b64 >> 1 ) > ( silk_int64_MAX >> 3 ) ) ) ||\n               ( res == silk_int64_MIN && ( ( a64 >> 1 ) + ( b64 >> 1 ) < ( silk_int64_MIN >> 3 ) ) ) ) )\n        {\n            fail = 1;\n        }\n    } else {\n        /* Saturation not necessary */\n        fail = res != a64 + b64;\n    }\n    if ( fail )\n    {\n        fprintf (stderr, \"silk_ADD_SAT64(%lld, %lld) in %s: line %d\\n\", (long long)a64, (long long)b64, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return res;\n}\n\n#undef silk_SUB_SAT16\n#define silk_SUB_SAT16(a,b) silk_SUB_SAT16_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int16 silk_SUB_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line ) {\n    opus_int16 res;\n    res = (opus_int16)silk_SAT16( silk_SUB32( (opus_int32)(a16), (b16) ) );\n    if ( res != silk_SAT16( (opus_int32)a16 - (opus_int32)b16 ) )\n    {\n        fprintf (stderr, \"silk_SUB_SAT16(%d, %d) in %s: line %d\\n\", a16, b16, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return res;\n}\n\n#undef silk_SUB_SAT32\n#define silk_SUB_SAT32(a,b) silk_SUB_SAT32_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SUB_SAT32_( opus_int32 a32, opus_int32 b32, char *file, int line ) {\n    opus_int32 res;\n    res =   ((((opus_uint32)(a32)-(opus_uint32)(b32)) & 0x80000000) == 0 ?                \\\n            (( (a32) & ((b32)^0x80000000) & 0x80000000) ? silk_int32_MIN : (a32)-(b32)) : \\\n            ((((a32)^0x80000000) & (b32)  & 0x80000000) ? silk_int32_MAX : (a32)-(b32)) );\n    if ( res != silk_SAT32( (opus_int64)a32 - (opus_int64)b32 ) )\n    {\n        fprintf (stderr, \"silk_SUB_SAT32(%d, %d) in %s: line %d\\n\", a32, b32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return res;\n}\n\n#undef silk_SUB_SAT64\n#define silk_SUB_SAT64(a,b) silk_SUB_SAT64_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int64 silk_SUB_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line ) {\n    opus_int64 res;\n    int        fail = 0;\n    res =   ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ?                                                    \\\n            (( (a64) & ((b64)^0x8000000000000000LL) & 0x8000000000000000LL) ? silk_int64_MIN : (a64)-(b64)) : \\\n            ((((a64)^0x8000000000000000LL) & (b64)  & 0x8000000000000000LL) ? silk_int64_MAX : (a64)-(b64)) );\n    if( res != a64 - b64 ) {\n        /* Check that we saturated to the correct extreme value */\n        if( !(( res == silk_int64_MAX && ( ( a64 >> 1 ) + ( b64 >> 1 ) > ( silk_int64_MAX >> 3 ) ) ) ||\n              ( res == silk_int64_MIN && ( ( a64 >> 1 ) + ( b64 >> 1 ) < ( silk_int64_MIN >> 3 ) ) ) ))\n        {\n            fail = 1;\n        }\n    } else {\n        /* Saturation not necessary */\n        fail = res != a64 - b64;\n    }\n    if ( fail )\n    {\n        fprintf (stderr, \"silk_SUB_SAT64(%lld, %lld) in %s: line %d\\n\", (long long)a64, (long long)b64, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return res;\n}\n\n#undef silk_MUL\n#define silk_MUL(a,b) silk_MUL_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_MUL_(opus_int32 a32, opus_int32 b32, char *file, int line){\n    opus_int32 ret;\n    opus_int64 ret64;\n    ret = a32 * b32;\n    ret64 = (opus_int64)a32 * (opus_int64)b32;\n    if ( (opus_int64)ret != ret64 )\n    {\n        fprintf (stderr, \"silk_MUL(%d, %d) in %s: line %d\\n\", a32, b32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_MUL_uint\n#define silk_MUL_uint(a,b) silk_MUL_uint_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_uint32 silk_MUL_uint_(opus_uint32 a32, opus_uint32 b32, char *file, int line){\n    opus_uint32 ret;\n    ret = a32 * b32;\n    if ( (opus_uint64)ret != (opus_uint64)a32 * (opus_uint64)b32 )\n    {\n        fprintf (stderr, \"silk_MUL_uint(%u, %u) in %s: line %d\\n\", a32, b32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_MLA\n#define silk_MLA(a,b,c) silk_MLA_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_MLA_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){\n    opus_int32 ret;\n    ret = a32 + b32 * c32;\n    if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32 )\n    {\n        fprintf (stderr, \"silk_MLA(%d, %d, %d) in %s: line %d\\n\", a32, b32, c32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_MLA_uint\n#define silk_MLA_uint(a,b,c) silk_MLA_uint_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_MLA_uint_(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32, char *file, int line){\n    opus_uint32 ret;\n    ret = a32 + b32 * c32;\n    if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32 )\n    {\n        fprintf (stderr, \"silk_MLA_uint(%d, %d, %d) in %s: line %d\\n\", a32, b32, c32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_SMULWB\n#define silk_SMULWB(a,b) silk_SMULWB_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SMULWB_(opus_int32 a32, opus_int32 b32, char *file, int line){\n    opus_int32 ret;\n    ret = (a32 >> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16);\n    if ( (opus_int64)ret != ((opus_int64)a32 * (opus_int16)b32) >> 16 )\n    {\n        fprintf (stderr, \"silk_SMULWB(%d, %d) in %s: line %d\\n\", a32, b32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_SMLAWB\n#define silk_SMLAWB(a,b,c) silk_SMLAWB_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SMLAWB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){\n    opus_int32 ret;\n    ret = silk_ADD32( a32, silk_SMULWB( b32, c32 ) );\n    if ( silk_ADD32( a32, silk_SMULWB( b32, c32 ) ) != silk_ADD_SAT32( a32, silk_SMULWB( b32, c32 ) ) )\n    {\n        fprintf (stderr, \"silk_SMLAWB(%d, %d, %d) in %s: line %d\\n\", a32, b32, c32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_SMULWT\n#define silk_SMULWT(a,b) silk_SMULWT_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SMULWT_(opus_int32 a32, opus_int32 b32, char *file, int line){\n    opus_int32 ret;\n    ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16);\n    if ( (opus_int64)ret != ((opus_int64)a32 * (b32 >> 16)) >> 16 )\n    {\n        fprintf (stderr, \"silk_SMULWT(%d, %d) in %s: line %d\\n\", a32, b32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_SMLAWT\n#define silk_SMLAWT(a,b,c) silk_SMLAWT_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SMLAWT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){\n    opus_int32 ret;\n    ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16));\n    if ( (opus_int64)ret != (opus_int64)a32 + (((opus_int64)b32 * (c32 >> 16)) >> 16) )\n    {\n        fprintf (stderr, \"silk_SMLAWT(%d, %d, %d) in %s: line %d\\n\", a32, b32, c32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_SMULL\n#define silk_SMULL(a,b) silk_SMULL_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int64 silk_SMULL_(opus_int64 a64, opus_int64 b64, char *file, int line){\n    opus_int64 ret64;\n    int        fail = 0;\n    ret64 = a64 * b64;\n    if( b64 != 0 ) {\n        fail = a64 != (ret64 / b64);\n    } else if( a64 != 0 ) {\n        fail = b64 != (ret64 / a64);\n    }\n    if ( fail )\n    {\n        fprintf (stderr, \"silk_SMULL(%lld, %lld) in %s: line %d\\n\", (long long)a64, (long long)b64, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret64;\n}\n\n/* no checking needed for silk_SMULBB */\n#undef silk_SMLABB\n#define silk_SMLABB(a,b,c) silk_SMLABB_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SMLABB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){\n    opus_int32 ret;\n    ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32);\n    if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int16)c32 )\n    {\n        fprintf (stderr, \"silk_SMLABB(%d, %d, %d) in %s: line %d\\n\", a32, b32, c32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n/* no checking needed for silk_SMULBT */\n#undef silk_SMLABT\n#define silk_SMLABT(a,b,c) silk_SMLABT_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SMLABT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){\n    opus_int32 ret;\n    ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16);\n    if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (c32 >> 16) )\n    {\n        fprintf (stderr, \"silk_SMLABT(%d, %d, %d) in %s: line %d\\n\", a32, b32, c32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n/* no checking needed for silk_SMULTT */\n#undef silk_SMLATT\n#define silk_SMLATT(a,b,c) silk_SMLATT_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SMLATT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){\n    opus_int32 ret;\n    ret = a32 + (b32 >> 16) * (c32 >> 16);\n    if ( (opus_int64)ret != (opus_int64)a32 + (b32 >> 16) * (c32 >> 16) )\n    {\n        fprintf (stderr, \"silk_SMLATT(%d, %d, %d) in %s: line %d\\n\", a32, b32, c32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_SMULWW\n#define silk_SMULWW(a,b) silk_SMULWW_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SMULWW_(opus_int32 a32, opus_int32 b32, char *file, int line){\n    opus_int32 ret, tmp1, tmp2;\n    opus_int64 ret64;\n    int        fail = 0;\n\n    ret  = silk_SMULWB( a32, b32 );\n    tmp1 = silk_RSHIFT_ROUND( b32, 16 );\n    tmp2 = silk_MUL( a32, tmp1 );\n\n    fail |= (opus_int64)tmp2 != (opus_int64) a32 * (opus_int64) tmp1;\n\n    tmp1 = ret;\n    ret  = silk_ADD32( tmp1, tmp2 );\n    fail |= silk_ADD32( tmp1, tmp2 ) != silk_ADD_SAT32( tmp1, tmp2 );\n\n    ret64 = silk_RSHIFT64( silk_SMULL( a32, b32 ), 16 );\n    fail |= (opus_int64)ret != ret64;\n\n    if ( fail )\n    {\n        fprintf (stderr, \"silk_SMULWT(%d, %d) in %s: line %d\\n\", a32, b32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n\n    return ret;\n}\n\n#undef silk_SMLAWW\n#define silk_SMLAWW(a,b,c) silk_SMLAWW_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SMLAWW_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){\n    opus_int32 ret, tmp;\n\n    tmp = silk_SMULWW( b32, c32 );\n    ret = silk_ADD32( a32, tmp );\n    if ( ret != silk_ADD_SAT32( a32, tmp ) )\n    {\n        fprintf (stderr, \"silk_SMLAWW(%d, %d, %d) in %s: line %d\\n\", a32, b32, c32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n/* Multiply-accumulate macros that allow overflow in the addition (ie, no asserts in debug mode) */\n#undef  silk_MLA_ovflw\n#define silk_MLA_ovflw(a32, b32, c32)    ((a32) + ((b32) * (c32)))\n#undef  silk_SMLABB_ovflw\n#define silk_SMLABB_ovflw(a32, b32, c32)    ((a32) + ((opus_int32)((opus_int16)(b32))) * (opus_int32)((opus_int16)(c32)))\n\n/* no checking needed for silk_SMULL\n   no checking needed for silk_SMLAL\n   no checking needed for silk_SMLALBB\n   no checking needed for SigProcFIX_CLZ16\n   no checking needed for SigProcFIX_CLZ32*/\n\n#undef silk_DIV32\n#define silk_DIV32(a,b) silk_DIV32_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_DIV32_(opus_int32 a32, opus_int32 b32, char *file, int line){\n    if ( b32 == 0 )\n    {\n        fprintf (stderr, \"silk_DIV32(%d, %d) in %s: line %d\\n\", a32, b32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return a32 / b32;\n}\n\n#undef silk_DIV32_16\n#define silk_DIV32_16(a,b) silk_DIV32_16_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_DIV32_16_(opus_int32 a32, opus_int32 b32, char *file, int line){\n    int fail = 0;\n    fail |= b32 == 0;\n    fail |= b32 > silk_int16_MAX;\n    fail |= b32 < silk_int16_MIN;\n    if ( fail )\n    {\n        fprintf (stderr, \"silk_DIV32_16(%d, %d) in %s: line %d\\n\", a32, b32, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return a32 / b32;\n}\n\n/* no checking needed for silk_SAT8\n   no checking needed for silk_SAT16\n   no checking needed for silk_SAT32\n   no checking needed for silk_POS_SAT32\n   no checking needed for silk_ADD_POS_SAT8\n   no checking needed for silk_ADD_POS_SAT16\n   no checking needed for silk_ADD_POS_SAT32\n   no checking needed for silk_ADD_POS_SAT64 */\n\n#undef silk_LSHIFT8\n#define silk_LSHIFT8(a,b) silk_LSHIFT8_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int8 silk_LSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){\n    opus_int8 ret;\n    int       fail = 0;\n    ret = a << shift;\n    fail |= shift < 0;\n    fail |= shift >= 8;\n    fail |= (opus_int64)ret != ((opus_int64)a) << shift;\n    if ( fail )\n    {\n        fprintf (stderr, \"silk_LSHIFT8(%d, %d) in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_LSHIFT16\n#define silk_LSHIFT16(a,b) silk_LSHIFT16_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int16 silk_LSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){\n    opus_int16 ret;\n    int        fail = 0;\n    ret = a << shift;\n    fail |= shift < 0;\n    fail |= shift >= 16;\n    fail |= (opus_int64)ret != ((opus_int64)a) << shift;\n    if ( fail )\n    {\n        fprintf (stderr, \"silk_LSHIFT16(%d, %d) in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_LSHIFT32\n#define silk_LSHIFT32(a,b) silk_LSHIFT32_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_LSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){\n    opus_int32 ret;\n    int        fail = 0;\n    ret = a << shift;\n    fail |= shift < 0;\n    fail |= shift >= 32;\n    fail |= (opus_int64)ret != ((opus_int64)a) << shift;\n    if ( fail )\n    {\n        fprintf (stderr, \"silk_LSHIFT32(%d, %d) in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_LSHIFT64\n#define silk_LSHIFT64(a,b) silk_LSHIFT64_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int64 silk_LSHIFT64_(opus_int64 a, opus_int shift, char *file, int line){\n    opus_int64 ret;\n    int        fail = 0;\n    ret = a << shift;\n    fail |= shift < 0;\n    fail |= shift >= 64;\n    fail |= (ret>>shift) != ((opus_int64)a);\n    if ( fail )\n    {\n        fprintf (stderr, \"silk_LSHIFT64(%lld, %d) in %s: line %d\\n\", (long long)a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_LSHIFT_ovflw\n#define silk_LSHIFT_ovflw(a,b) silk_LSHIFT_ovflw_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_LSHIFT_ovflw_(opus_int32 a, opus_int32 shift, char *file, int line){\n    if ( (shift < 0) || (shift >= 32) ) /* no check for overflow */\n    {\n        fprintf (stderr, \"silk_LSHIFT_ovflw(%d, %d) in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return a << shift;\n}\n\n#undef silk_LSHIFT_uint\n#define silk_LSHIFT_uint(a,b) silk_LSHIFT_uint_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_uint32 silk_LSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){\n    opus_uint32 ret;\n    ret = a << shift;\n    if ( (shift < 0) || ((opus_int64)ret != ((opus_int64)a) << shift))\n    {\n        fprintf (stderr, \"silk_LSHIFT_uint(%u, %d) in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_RSHIFT8\n#define silk_RSHITF8(a,b) silk_RSHIFT8_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int8 silk_RSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){\n    if ( (shift < 0) || (shift>=8) )\n    {\n        fprintf (stderr, \"silk_RSHITF8(%d, %d) in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return a >> shift;\n}\n\n#undef silk_RSHIFT16\n#define silk_RSHITF16(a,b) silk_RSHIFT16_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int16 silk_RSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){\n    if ( (shift < 0) || (shift>=16) )\n    {\n        fprintf (stderr, \"silk_RSHITF16(%d, %d) in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return a >> shift;\n}\n\n#undef silk_RSHIFT32\n#define silk_RSHIFT32(a,b) silk_RSHIFT32_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_RSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){\n    if ( (shift < 0) || (shift>=32) )\n    {\n        fprintf (stderr, \"silk_RSHITF32(%d, %d) in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return a >> shift;\n}\n\n#undef silk_RSHIFT64\n#define silk_RSHIFT64(a,b) silk_RSHIFT64_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int64 silk_RSHIFT64_(opus_int64 a, opus_int64 shift, char *file, int line){\n    if ( (shift < 0) || (shift>=64) )\n    {\n        fprintf (stderr, \"silk_RSHITF64(%lld, %lld) in %s: line %d\\n\", (long long)a, (long long)shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return a >> shift;\n}\n\n#undef silk_RSHIFT_uint\n#define silk_RSHIFT_uint(a,b) silk_RSHIFT_uint_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_uint32 silk_RSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){\n    if ( (shift < 0) || (shift>32) )\n    {\n        fprintf (stderr, \"silk_RSHIFT_uint(%u, %d) in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return a >> shift;\n}\n\n#undef silk_ADD_LSHIFT\n#define silk_ADD_LSHIFT(a,b,c) silk_ADD_LSHIFT_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int line){\n    opus_int16 ret;\n    ret = a + (b << shift);\n    if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) )\n    {\n        fprintf (stderr, \"silk_ADD_LSHIFT(%d, %d, %d) in %s: line %d\\n\", a, b, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;                /* shift >= 0 */\n}\n\n#undef silk_ADD_LSHIFT32\n#define silk_ADD_LSHIFT32(a,b,c) silk_ADD_LSHIFT32_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_ADD_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){\n    opus_int32 ret;\n    ret = a + (b << shift);\n    if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) )\n    {\n        fprintf (stderr, \"silk_ADD_LSHIFT32(%d, %d, %d) in %s: line %d\\n\", a, b, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;                /* shift >= 0 */\n}\n\n#undef silk_ADD_LSHIFT_uint\n#define silk_ADD_LSHIFT_uint(a,b,c) silk_ADD_LSHIFT_uint_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_uint32 silk_ADD_LSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){\n    opus_uint32 ret;\n    ret = a + (b << shift);\n    if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) )\n    {\n        fprintf (stderr, \"silk_ADD_LSHIFT_uint(%u, %u, %d) in %s: line %d\\n\", a, b, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;                /* shift >= 0 */\n}\n\n#undef silk_ADD_RSHIFT\n#define silk_ADD_RSHIFT(a,b,c) silk_ADD_RSHIFT_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int line){\n    opus_int16 ret;\n    ret = a + (b >> shift);\n    if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) )\n    {\n        fprintf (stderr, \"silk_ADD_RSHIFT(%d, %d, %d) in %s: line %d\\n\", a, b, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;                /* shift  > 0 */\n}\n\n#undef silk_ADD_RSHIFT32\n#define silk_ADD_RSHIFT32(a,b,c) silk_ADD_RSHIFT32_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_ADD_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){\n    opus_int32 ret;\n    ret = a + (b >> shift);\n    if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) )\n    {\n        fprintf (stderr, \"silk_ADD_RSHIFT32(%d, %d, %d) in %s: line %d\\n\", a, b, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;                /* shift  > 0 */\n}\n\n#undef silk_ADD_RSHIFT_uint\n#define silk_ADD_RSHIFT_uint(a,b,c) silk_ADD_RSHIFT_uint_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){\n    opus_uint32 ret;\n    ret = a + (b >> shift);\n    if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) )\n    {\n        fprintf (stderr, \"silk_ADD_RSHIFT_uint(%u, %u, %d) in %s: line %d\\n\", a, b, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;                /* shift  > 0 */\n}\n\n#undef silk_SUB_LSHIFT32\n#define silk_SUB_LSHIFT32(a,b,c) silk_SUB_LSHIFT32_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){\n    opus_int32 ret;\n    ret = a - (b << shift);\n    if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) << shift)) )\n    {\n        fprintf (stderr, \"silk_SUB_LSHIFT32(%d, %d, %d) in %s: line %d\\n\", a, b, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;                /* shift >= 0 */\n}\n\n#undef silk_SUB_RSHIFT32\n#define silk_SUB_RSHIFT32(a,b,c) silk_SUB_RSHIFT32_((a), (b), (c), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_SUB_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){\n    opus_int32 ret;\n    ret = a - (b >> shift);\n    if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) >> shift)) )\n    {\n        fprintf (stderr, \"silk_SUB_RSHIFT32(%d, %d, %d) in %s: line %d\\n\", a, b, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;                /* shift  > 0 */\n}\n\n#undef silk_RSHIFT_ROUND\n#define silk_RSHIFT_ROUND(a,b) silk_RSHIFT_ROUND_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_RSHIFT_ROUND_(opus_int32 a, opus_int32 shift, char *file, int line){\n    opus_int32 ret;\n    ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1;\n    /* the marco definition can't handle a shift of zero */\n    if ( (shift <= 0) || (shift>31) || ((opus_int64)ret != ((opus_int64)a + ((opus_int64)1 << (shift - 1))) >> shift) )\n    {\n        fprintf (stderr, \"silk_RSHIFT_ROUND(%d, %d) in %s: line %d\\n\", a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return ret;\n}\n\n#undef silk_RSHIFT_ROUND64\n#define silk_RSHIFT_ROUND64(a,b) silk_RSHIFT_ROUND64_((a), (b), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int64 silk_RSHIFT_ROUND64_(opus_int64 a, opus_int32 shift, char *file, int line){\n    opus_int64 ret;\n    /* the marco definition can't handle a shift of zero */\n    if ( (shift <= 0) || (shift>=64) )\n    {\n        fprintf (stderr, \"silk_RSHIFT_ROUND64(%lld, %d) in %s: line %d\\n\", (long long)a, shift, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1;\n    return ret;\n}\n\n/* silk_abs is used on floats also, so doesn't work... */\n/*#undef silk_abs\nstatic OPUS_INLINE opus_int32 silk_abs(opus_int32 a){\n    silk_assert(a != 0x80000000);\n    return (((a) >  0)  ? (a) : -(a));            // Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN\n}*/\n\n#undef silk_abs_int64\n#define silk_abs_int64(a) silk_abs_int64_((a), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int64 silk_abs_int64_(opus_int64 a, char *file, int line){\n    if ( a == silk_int64_MIN )\n    {\n        fprintf (stderr, \"silk_abs_int64(%lld) in %s: line %d\\n\", (long long)a, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return (((a) >  0)  ? (a) : -(a));            /* Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN */\n}\n\n#undef silk_abs_int32\n#define silk_abs_int32(a) silk_abs_int32_((a), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_abs_int32_(opus_int32 a, char *file, int line){\n    if ( a == silk_int32_MIN )\n    {\n        fprintf (stderr, \"silk_abs_int32(%d) in %s: line %d\\n\", a, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return silk_abs(a);\n}\n\n#undef silk_CHECK_FIT8\n#define silk_CHECK_FIT8(a) silk_CHECK_FIT8_((a), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int8 silk_CHECK_FIT8_( opus_int64 a, char *file, int line ){\n    opus_int8 ret;\n    ret = (opus_int8)a;\n    if ( (opus_int64)ret != a )\n    {\n        fprintf (stderr, \"silk_CHECK_FIT8(%lld) in %s: line %d\\n\", (long long)a, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return( ret );\n}\n\n#undef silk_CHECK_FIT16\n#define silk_CHECK_FIT16(a) silk_CHECK_FIT16_((a), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int16 silk_CHECK_FIT16_( opus_int64 a, char *file, int line ){\n    opus_int16 ret;\n    ret = (opus_int16)a;\n    if ( (opus_int64)ret != a )\n    {\n        fprintf (stderr, \"silk_CHECK_FIT16(%lld) in %s: line %d\\n\", (long long)a, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return( ret );\n}\n\n#undef silk_CHECK_FIT32\n#define silk_CHECK_FIT32(a) silk_CHECK_FIT32_((a), __FILE__, __LINE__)\nstatic OPUS_INLINE opus_int32 silk_CHECK_FIT32_( opus_int64 a, char *file, int line ){\n    opus_int32 ret;\n    ret = (opus_int32)a;\n    if ( (opus_int64)ret != a )\n    {\n        fprintf (stderr, \"silk_CHECK_FIT32(%lld) in %s: line %d\\n\", (long long)a, file, line);\n#ifdef FIXED_DEBUG_ASSERT\n        silk_assert( 0 );\n#endif\n    }\n    return( ret );\n}\n\n/* no checking for silk_NSHIFT_MUL_32_32\n   no checking for silk_NSHIFT_MUL_16_16\n   no checking needed for silk_min\n   no checking needed for silk_max\n   no checking needed for silk_sign\n*/\n\n#endif\n#endif /* MACRO_DEBUG_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/NLSF2A.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n/* conversion between prediction filter coefficients and LSFs   */\n/* order should be even                                         */\n/* a piecewise linear approximation maps LSF <-> cos(LSF)       */\n/* therefore the result is not accurate LSFs, but the two       */\n/* functions are accurate inverses of each other                */\n\n#include \"SigProc_FIX.h\"\n#include \"tables.h\"\n\n#define QA      16\n\n/* helper function for NLSF2A(..) */\nstatic OPUS_INLINE void silk_NLSF2A_find_poly(\n    opus_int32          *out,      /* O    intermediate polynomial, QA [dd+1]        */\n    const opus_int32    *cLSF,     /* I    vector of interleaved 2*cos(LSFs), QA [d] */\n    opus_int            dd         /* I    polynomial order (= 1/2 * filter order)   */\n)\n{\n    opus_int   k, n;\n    opus_int32 ftmp;\n\n    out[0] = silk_LSHIFT( 1, QA );\n    out[1] = -cLSF[0];\n    for( k = 1; k < dd; k++ ) {\n        ftmp = cLSF[2*k];            /* QA*/\n        out[k+1] = silk_LSHIFT( out[k-1], 1 ) - (opus_int32)silk_RSHIFT_ROUND64( silk_SMULL( ftmp, out[k] ), QA );\n        for( n = k; n > 1; n-- ) {\n            out[n] += out[n-2] - (opus_int32)silk_RSHIFT_ROUND64( silk_SMULL( ftmp, out[n-1] ), QA );\n        }\n        out[1] -= ftmp;\n    }\n}\n\n/* compute whitening filter coefficients from normalized line spectral frequencies */\nvoid silk_NLSF2A(\n    opus_int16                  *a_Q12,             /* O    monic whitening filter coefficients in Q12,  [ d ]          */\n    const opus_int16            *NLSF,              /* I    normalized line spectral frequencies in Q15, [ d ]          */\n    const opus_int              d                   /* I    filter order (should be even)                               */\n)\n{\n    /* This ordering was found to maximize quality. It improves numerical accuracy of\n       silk_NLSF2A_find_poly() compared to \"standard\" ordering. */\n    static const unsigned char ordering16[16] = {\n      0, 15, 8, 7, 4, 11, 12, 3, 2, 13, 10, 5, 6, 9, 14, 1\n    };\n    static const unsigned char ordering10[10] = {\n      0, 9, 6, 3, 4, 5, 8, 1, 2, 7\n    };\n    const unsigned char *ordering;\n    opus_int   k, i, dd;\n    opus_int32 cos_LSF_QA[ SILK_MAX_ORDER_LPC ];\n    opus_int32 P[ SILK_MAX_ORDER_LPC / 2 + 1 ], Q[ SILK_MAX_ORDER_LPC / 2 + 1 ];\n    opus_int32 Ptmp, Qtmp, f_int, f_frac, cos_val, delta;\n    opus_int32 a32_QA1[ SILK_MAX_ORDER_LPC ];\n    opus_int32 maxabs, absval, idx=0, sc_Q16;\n\n    silk_assert( LSF_COS_TAB_SZ_FIX == 128 );\n    silk_assert( d==10||d==16 );\n\n    /* convert LSFs to 2*cos(LSF), using piecewise linear curve from table */\n    ordering = d == 16 ? ordering16 : ordering10;\n    for( k = 0; k < d; k++ ) {\n        silk_assert(NLSF[k] >= 0 );\n\n        /* f_int on a scale 0-127 (rounded down) */\n        f_int = silk_RSHIFT( NLSF[k], 15 - 7 );\n\n        /* f_frac, range: 0..255 */\n        f_frac = NLSF[k] - silk_LSHIFT( f_int, 15 - 7 );\n\n        silk_assert(f_int >= 0);\n        silk_assert(f_int < LSF_COS_TAB_SZ_FIX );\n\n        /* Read start and end value from table */\n        cos_val = silk_LSFCosTab_FIX_Q12[ f_int ];                /* Q12 */\n        delta   = silk_LSFCosTab_FIX_Q12[ f_int + 1 ] - cos_val;  /* Q12, with a range of 0..200 */\n\n        /* Linear interpolation */\n        cos_LSF_QA[ordering[k]] = silk_RSHIFT_ROUND( silk_LSHIFT( cos_val, 8 ) + silk_MUL( delta, f_frac ), 20 - QA ); /* QA */\n    }\n\n    dd = silk_RSHIFT( d, 1 );\n\n    /* generate even and odd polynomials using convolution */\n    silk_NLSF2A_find_poly( P, &cos_LSF_QA[ 0 ], dd );\n    silk_NLSF2A_find_poly( Q, &cos_LSF_QA[ 1 ], dd );\n\n    /* convert even and odd polynomials to opus_int32 Q12 filter coefs */\n    for( k = 0; k < dd; k++ ) {\n        Ptmp = P[ k+1 ] + P[ k ];\n        Qtmp = Q[ k+1 ] - Q[ k ];\n\n        /* the Ptmp and Qtmp values at this stage need to fit in int32 */\n        a32_QA1[ k ]     = -Qtmp - Ptmp;        /* QA+1 */\n        a32_QA1[ d-k-1 ] =  Qtmp - Ptmp;        /* QA+1 */\n    }\n\n    /* Limit the maximum absolute value of the prediction coefficients, so that they'll fit in int16 */\n    for( i = 0; i < 10; i++ ) {\n        /* Find maximum absolute value and its index */\n        maxabs = 0;\n        for( k = 0; k < d; k++ ) {\n            absval = silk_abs( a32_QA1[k] );\n            if( absval > maxabs ) {\n                maxabs = absval;\n                idx    = k;\n            }\n        }\n        maxabs = silk_RSHIFT_ROUND( maxabs, QA + 1 - 12 );                                          /* QA+1 -> Q12 */\n\n        if( maxabs > silk_int16_MAX ) {\n            /* Reduce magnitude of prediction coefficients */\n            maxabs = silk_min( maxabs, 163838 );  /* ( silk_int32_MAX >> 14 ) + silk_int16_MAX = 163838 */\n            sc_Q16 = SILK_FIX_CONST( 0.999, 16 ) - silk_DIV32( silk_LSHIFT( maxabs - silk_int16_MAX, 14 ),\n                                        silk_RSHIFT32( silk_MUL( maxabs, idx + 1), 2 ) );\n            silk_bwexpander_32( a32_QA1, d, sc_Q16 );\n        } else {\n            break;\n        }\n    }\n\n    if( i == 10 ) {\n        /* Reached the last iteration, clip the coefficients */\n        for( k = 0; k < d; k++ ) {\n            a_Q12[ k ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( a32_QA1[ k ], QA + 1 - 12 ) );  /* QA+1 -> Q12 */\n            a32_QA1[ k ] = silk_LSHIFT( (opus_int32)a_Q12[ k ], QA + 1 - 12 );\n        }\n    } else {\n        for( k = 0; k < d; k++ ) {\n            a_Q12[ k ] = (opus_int16)silk_RSHIFT_ROUND( a32_QA1[ k ], QA + 1 - 12 );                /* QA+1 -> Q12 */\n        }\n    }\n\n    for( i = 0; i < MAX_LPC_STABILIZE_ITERATIONS; i++ ) {\n        if( silk_LPC_inverse_pred_gain( a_Q12, d ) < SILK_FIX_CONST( 1.0 / MAX_PREDICTION_POWER_GAIN, 30 ) ) {\n            /* Prediction coefficients are (too close to) unstable; apply bandwidth expansion   */\n            /* on the unscaled coefficients, convert to Q12 and measure again                   */\n            silk_bwexpander_32( a32_QA1, d, 65536 - silk_LSHIFT( 2, i ) );\n            for( k = 0; k < d; k++ ) {\n                a_Q12[ k ] = (opus_int16)silk_RSHIFT_ROUND( a32_QA1[ k ], QA + 1 - 12 );            /* QA+1 -> Q12 */\n            }\n        } else {\n            break;\n        }\n    }\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/NLSF_VQ.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Compute quantization errors for an LPC_order element input vector for a VQ codebook */\nvoid silk_NLSF_VQ(\n    opus_int32                  err_Q26[],                      /* O    Quantization errors [K]                     */\n    const opus_int16            in_Q15[],                       /* I    Input vectors to be quantized [LPC_order]   */\n    const opus_uint8            pCB_Q8[],                       /* I    Codebook vectors [K*LPC_order]              */\n    const opus_int              K,                              /* I    Number of codebook vectors                  */\n    const opus_int              LPC_order                       /* I    Number of LPCs                              */\n)\n{\n    opus_int        i, m;\n    opus_int32      diff_Q15, sum_error_Q30, sum_error_Q26;\n\n    silk_assert( LPC_order <= 16 );\n    silk_assert( ( LPC_order & 1 ) == 0 );\n\n    /* Loop over codebook */\n    for( i = 0; i < K; i++ ) {\n        sum_error_Q26 = 0;\n        for( m = 0; m < LPC_order; m += 2 ) {\n            /* Compute weighted squared quantization error for index m */\n            diff_Q15 = silk_SUB_LSHIFT32( in_Q15[ m ], (opus_int32)*pCB_Q8++, 7 ); /* range: [ -32767 : 32767 ]*/\n            sum_error_Q30 = silk_SMULBB( diff_Q15, diff_Q15 );\n\n            /* Compute weighted squared quantization error for index m + 1 */\n            diff_Q15 = silk_SUB_LSHIFT32( in_Q15[m + 1], (opus_int32)*pCB_Q8++, 7 ); /* range: [ -32767 : 32767 ]*/\n            sum_error_Q30 = silk_SMLABB( sum_error_Q30, diff_Q15, diff_Q15 );\n\n            sum_error_Q26 = silk_ADD_RSHIFT32( sum_error_Q26, sum_error_Q30, 4 );\n\n            silk_assert( sum_error_Q26 >= 0 );\n            silk_assert( sum_error_Q30 >= 0 );\n        }\n        err_Q26[ i ] = sum_error_Q26;\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/NLSF_VQ_weights_laroia.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"define.h\"\n#include \"SigProc_FIX.h\"\n\n/*\nR. Laroia, N. Phamdo and N. Farvardin, \"Robust and Efficient Quantization of Speech LSP\nParameters Using Structured Vector Quantization\", Proc. IEEE Int. Conf. Acoust., Speech,\nSignal Processing, pp. 641-644, 1991.\n*/\n\n/* Laroia low complexity NLSF weights */\nvoid silk_NLSF_VQ_weights_laroia(\n    opus_int16                  *pNLSFW_Q_OUT,      /* O     Pointer to input vector weights [D]                        */\n    const opus_int16            *pNLSF_Q15,         /* I     Pointer to input vector         [D]                        */\n    const opus_int              D                   /* I     Input vector dimension (even)                              */\n)\n{\n    opus_int   k;\n    opus_int32 tmp1_int, tmp2_int;\n\n    silk_assert( D > 0 );\n    silk_assert( ( D & 1 ) == 0 );\n\n    /* First value */\n    tmp1_int = silk_max_int( pNLSF_Q15[ 0 ], 1 );\n    tmp1_int = silk_DIV32_16( (opus_int32)1 << ( 15 + NLSF_W_Q ), tmp1_int );\n    tmp2_int = silk_max_int( pNLSF_Q15[ 1 ] - pNLSF_Q15[ 0 ], 1 );\n    tmp2_int = silk_DIV32_16( (opus_int32)1 << ( 15 + NLSF_W_Q ), tmp2_int );\n    pNLSFW_Q_OUT[ 0 ] = (opus_int16)silk_min_int( tmp1_int + tmp2_int, silk_int16_MAX );\n    silk_assert( pNLSFW_Q_OUT[ 0 ] > 0 );\n\n    /* Main loop */\n    for( k = 1; k < D - 1; k += 2 ) {\n        tmp1_int = silk_max_int( pNLSF_Q15[ k + 1 ] - pNLSF_Q15[ k ], 1 );\n        tmp1_int = silk_DIV32_16( (opus_int32)1 << ( 15 + NLSF_W_Q ), tmp1_int );\n        pNLSFW_Q_OUT[ k ] = (opus_int16)silk_min_int( tmp1_int + tmp2_int, silk_int16_MAX );\n        silk_assert( pNLSFW_Q_OUT[ k ] > 0 );\n\n        tmp2_int = silk_max_int( pNLSF_Q15[ k + 2 ] - pNLSF_Q15[ k + 1 ], 1 );\n        tmp2_int = silk_DIV32_16( (opus_int32)1 << ( 15 + NLSF_W_Q ), tmp2_int );\n        pNLSFW_Q_OUT[ k + 1 ] = (opus_int16)silk_min_int( tmp1_int + tmp2_int, silk_int16_MAX );\n        silk_assert( pNLSFW_Q_OUT[ k + 1 ] > 0 );\n    }\n\n    /* Last value */\n    tmp1_int = silk_max_int( ( 1 << 15 ) - pNLSF_Q15[ D - 1 ], 1 );\n    tmp1_int = silk_DIV32_16( (opus_int32)1 << ( 15 + NLSF_W_Q ), tmp1_int );\n    pNLSFW_Q_OUT[ D - 1 ] = (opus_int16)silk_min_int( tmp1_int + tmp2_int, silk_int16_MAX );\n    silk_assert( pNLSFW_Q_OUT[ D - 1 ] > 0 );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/NLSF_decode.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Predictive dequantizer for NLSF residuals */\nstatic OPUS_INLINE void silk_NLSF_residual_dequant(               /* O    Returns RD value in Q30                     */\n          opus_int16         x_Q10[],                        /* O    Output [ order ]                            */\n    const opus_int8          indices[],                      /* I    Quantization indices [ order ]              */\n    const opus_uint8         pred_coef_Q8[],                 /* I    Backward predictor coefs [ order ]          */\n    const opus_int           quant_step_size_Q16,            /* I    Quantization step size                      */\n    const opus_int16         order                           /* I    Number of input values                      */\n)\n{\n    opus_int     i, out_Q10, pred_Q10;\n\n    out_Q10 = 0;\n    for( i = order-1; i >= 0; i-- ) {\n        pred_Q10 = silk_RSHIFT( silk_SMULBB( out_Q10, (opus_int16)pred_coef_Q8[ i ] ), 8 );\n        out_Q10  = silk_LSHIFT( indices[ i ], 10 );\n        if( out_Q10 > 0 ) {\n            out_Q10 = silk_SUB16( out_Q10, SILK_FIX_CONST( NLSF_QUANT_LEVEL_ADJ, 10 ) );\n        } else if( out_Q10 < 0 ) {\n            out_Q10 = silk_ADD16( out_Q10, SILK_FIX_CONST( NLSF_QUANT_LEVEL_ADJ, 10 ) );\n        }\n        out_Q10  = silk_SMLAWB( pred_Q10, (opus_int32)out_Q10, quant_step_size_Q16 );\n        x_Q10[ i ] = out_Q10;\n    }\n}\n\n\n/***********************/\n/* NLSF vector decoder */\n/***********************/\nvoid silk_NLSF_decode(\n          opus_int16            *pNLSF_Q15,                     /* O    Quantized NLSF vector [ LPC_ORDER ]         */\n          opus_int8             *NLSFIndices,                   /* I    Codebook path vector [ LPC_ORDER + 1 ]      */\n    const silk_NLSF_CB_struct   *psNLSF_CB                      /* I    Codebook object                             */\n)\n{\n    opus_int         i;\n    opus_uint8       pred_Q8[  MAX_LPC_ORDER ];\n    opus_int16       ec_ix[    MAX_LPC_ORDER ];\n    opus_int16       res_Q10[  MAX_LPC_ORDER ];\n    opus_int16       W_tmp_QW[ MAX_LPC_ORDER ];\n    opus_int32       W_tmp_Q9, NLSF_Q15_tmp;\n    const opus_uint8 *pCB_element;\n\n    /* Decode first stage */\n    pCB_element = &psNLSF_CB->CB1_NLSF_Q8[ NLSFIndices[ 0 ] * psNLSF_CB->order ];\n    for( i = 0; i < psNLSF_CB->order; i++ ) {\n        pNLSF_Q15[ i ] = silk_LSHIFT( (opus_int16)pCB_element[ i ], 7 );\n    }\n\n    /* Unpack entropy table indices and predictor for current CB1 index */\n    silk_NLSF_unpack( ec_ix, pred_Q8, psNLSF_CB, NLSFIndices[ 0 ] );\n\n    /* Predictive residual dequantizer */\n    silk_NLSF_residual_dequant( res_Q10, &NLSFIndices[ 1 ], pred_Q8, psNLSF_CB->quantStepSize_Q16, psNLSF_CB->order );\n\n    /* Weights from codebook vector */\n    silk_NLSF_VQ_weights_laroia( W_tmp_QW, pNLSF_Q15, psNLSF_CB->order );\n\n    /* Apply inverse square-rooted weights and add to output */\n    for( i = 0; i < psNLSF_CB->order; i++ ) {\n        W_tmp_Q9 = silk_SQRT_APPROX( silk_LSHIFT( (opus_int32)W_tmp_QW[ i ], 18 - NLSF_W_Q ) );\n        NLSF_Q15_tmp = silk_ADD32( pNLSF_Q15[ i ], silk_DIV32_16( silk_LSHIFT( (opus_int32)res_Q10[ i ], 14 ), W_tmp_Q9 ) );\n        pNLSF_Q15[ i ] = (opus_int16)silk_LIMIT( NLSF_Q15_tmp, 0, 32767 );\n    }\n\n    /* NLSF stabilization */\n    silk_NLSF_stabilize( pNLSF_Q15, psNLSF_CB->deltaMin_Q15, psNLSF_CB->order );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/NLSF_del_dec_quant.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Delayed-decision quantizer for NLSF residuals */\nopus_int32 silk_NLSF_del_dec_quant(                             /* O    Returns RD value in Q25                     */\n    opus_int8                   indices[],                      /* O    Quantization indices [ order ]              */\n    const opus_int16            x_Q10[],                        /* I    Input [ order ]                             */\n    const opus_int16            w_Q5[],                         /* I    Weights [ order ]                           */\n    const opus_uint8            pred_coef_Q8[],                 /* I    Backward predictor coefs [ order ]          */\n    const opus_int16            ec_ix[],                        /* I    Indices to entropy coding tables [ order ]  */\n    const opus_uint8            ec_rates_Q5[],                  /* I    Rates []                                    */\n    const opus_int              quant_step_size_Q16,            /* I    Quantization step size                      */\n    const opus_int16            inv_quant_step_size_Q6,         /* I    Inverse quantization step size              */\n    const opus_int32            mu_Q20,                         /* I    R/D tradeoff                                */\n    const opus_int16            order                           /* I    Number of input values                      */\n)\n{\n    opus_int         i, j, nStates, ind_tmp, ind_min_max, ind_max_min, in_Q10, res_Q10;\n    opus_int         pred_Q10, diff_Q10, out0_Q10, out1_Q10, rate0_Q5, rate1_Q5;\n    opus_int32       RD_tmp_Q25, min_Q25, min_max_Q25, max_min_Q25, pred_coef_Q16;\n    opus_int         ind_sort[         NLSF_QUANT_DEL_DEC_STATES ];\n    opus_int8        ind[              NLSF_QUANT_DEL_DEC_STATES ][ MAX_LPC_ORDER ];\n    opus_int16       prev_out_Q10[ 2 * NLSF_QUANT_DEL_DEC_STATES ];\n    opus_int32       RD_Q25[       2 * NLSF_QUANT_DEL_DEC_STATES ];\n    opus_int32       RD_min_Q25[       NLSF_QUANT_DEL_DEC_STATES ];\n    opus_int32       RD_max_Q25[       NLSF_QUANT_DEL_DEC_STATES ];\n    const opus_uint8 *rates_Q5;\n\n    silk_assert( (NLSF_QUANT_DEL_DEC_STATES & (NLSF_QUANT_DEL_DEC_STATES-1)) == 0 );     /* must be power of two */\n\n    nStates = 1;\n    RD_Q25[ 0 ] = 0;\n    prev_out_Q10[ 0 ] = 0;\n    for( i = order - 1; ; i-- ) {\n        rates_Q5 = &ec_rates_Q5[ ec_ix[ i ] ];\n        pred_coef_Q16 = silk_LSHIFT( (opus_int32)pred_coef_Q8[ i ], 8 );\n        in_Q10 = x_Q10[ i ];\n        for( j = 0; j < nStates; j++ ) {\n            pred_Q10 = silk_SMULWB( pred_coef_Q16, prev_out_Q10[ j ] );\n            res_Q10  = silk_SUB16( in_Q10, pred_Q10 );\n            ind_tmp  = silk_SMULWB( (opus_int32)inv_quant_step_size_Q6, res_Q10 );\n            ind_tmp  = silk_LIMIT( ind_tmp, -NLSF_QUANT_MAX_AMPLITUDE_EXT, NLSF_QUANT_MAX_AMPLITUDE_EXT-1 );\n            ind[ j ][ i ] = (opus_int8)ind_tmp;\n\n            /* compute outputs for ind_tmp and ind_tmp + 1 */\n            out0_Q10 = silk_LSHIFT( ind_tmp, 10 );\n            out1_Q10 = silk_ADD16( out0_Q10, 1024 );\n            if( ind_tmp > 0 ) {\n                out0_Q10 = silk_SUB16( out0_Q10, SILK_FIX_CONST( NLSF_QUANT_LEVEL_ADJ, 10 ) );\n                out1_Q10 = silk_SUB16( out1_Q10, SILK_FIX_CONST( NLSF_QUANT_LEVEL_ADJ, 10 ) );\n            } else if( ind_tmp == 0 ) {\n                out1_Q10 = silk_SUB16( out1_Q10, SILK_FIX_CONST( NLSF_QUANT_LEVEL_ADJ, 10 ) );\n            } else if( ind_tmp == -1 ) {\n                out0_Q10 = silk_ADD16( out0_Q10, SILK_FIX_CONST( NLSF_QUANT_LEVEL_ADJ, 10 ) );\n            } else {\n                out0_Q10 = silk_ADD16( out0_Q10, SILK_FIX_CONST( NLSF_QUANT_LEVEL_ADJ, 10 ) );\n                out1_Q10 = silk_ADD16( out1_Q10, SILK_FIX_CONST( NLSF_QUANT_LEVEL_ADJ, 10 ) );\n            }\n            out0_Q10  = silk_SMULWB( (opus_int32)out0_Q10, quant_step_size_Q16 );\n            out1_Q10  = silk_SMULWB( (opus_int32)out1_Q10, quant_step_size_Q16 );\n            out0_Q10  = silk_ADD16( out0_Q10, pred_Q10 );\n            out1_Q10  = silk_ADD16( out1_Q10, pred_Q10 );\n            prev_out_Q10[ j           ] = out0_Q10;\n            prev_out_Q10[ j + nStates ] = out1_Q10;\n\n            /* compute RD for ind_tmp and ind_tmp + 1 */\n            if( ind_tmp + 1 >= NLSF_QUANT_MAX_AMPLITUDE ) {\n                if( ind_tmp + 1 == NLSF_QUANT_MAX_AMPLITUDE ) {\n                    rate0_Q5 = rates_Q5[ ind_tmp + NLSF_QUANT_MAX_AMPLITUDE ];\n                    rate1_Q5 = 280;\n                } else {\n                    rate0_Q5 = silk_SMLABB( 280 - 43 * NLSF_QUANT_MAX_AMPLITUDE, 43, ind_tmp );\n                    rate1_Q5 = silk_ADD16( rate0_Q5, 43 );\n                }\n            } else if( ind_tmp <= -NLSF_QUANT_MAX_AMPLITUDE ) {\n                if( ind_tmp == -NLSF_QUANT_MAX_AMPLITUDE ) {\n                    rate0_Q5 = 280;\n                    rate1_Q5 = rates_Q5[ ind_tmp + 1 + NLSF_QUANT_MAX_AMPLITUDE ];\n                } else {\n                    rate0_Q5 = silk_SMLABB( 280 - 43 * NLSF_QUANT_MAX_AMPLITUDE, -43, ind_tmp );\n                    rate1_Q5 = silk_SUB16( rate0_Q5, 43 );\n                }\n            } else {\n                rate0_Q5 = rates_Q5[ ind_tmp +     NLSF_QUANT_MAX_AMPLITUDE ];\n                rate1_Q5 = rates_Q5[ ind_tmp + 1 + NLSF_QUANT_MAX_AMPLITUDE ];\n            }\n            RD_tmp_Q25            = RD_Q25[ j ];\n            diff_Q10              = silk_SUB16( in_Q10, out0_Q10 );\n            RD_Q25[ j ]           = silk_SMLABB( silk_MLA( RD_tmp_Q25, silk_SMULBB( diff_Q10, diff_Q10 ), w_Q5[ i ] ), mu_Q20, rate0_Q5 );\n            diff_Q10              = silk_SUB16( in_Q10, out1_Q10 );\n            RD_Q25[ j + nStates ] = silk_SMLABB( silk_MLA( RD_tmp_Q25, silk_SMULBB( diff_Q10, diff_Q10 ), w_Q5[ i ] ), mu_Q20, rate1_Q5 );\n        }\n\n        if( nStates <= ( NLSF_QUANT_DEL_DEC_STATES >> 1 ) ) {\n            /* double number of states and copy */\n            for( j = 0; j < nStates; j++ ) {\n                ind[ j + nStates ][ i ] = ind[ j ][ i ] + 1;\n            }\n            nStates = silk_LSHIFT( nStates, 1 );\n            for( j = nStates; j < NLSF_QUANT_DEL_DEC_STATES; j++ ) {\n                ind[ j ][ i ] = ind[ j - nStates ][ i ];\n            }\n        } else if( i > 0 ) {\n            /* sort lower and upper half of RD_Q25, pairwise */\n            for( j = 0; j < NLSF_QUANT_DEL_DEC_STATES; j++ ) {\n                if( RD_Q25[ j ] > RD_Q25[ j + NLSF_QUANT_DEL_DEC_STATES ] ) {\n                    RD_max_Q25[ j ]                         = RD_Q25[ j ];\n                    RD_min_Q25[ j ]                         = RD_Q25[ j + NLSF_QUANT_DEL_DEC_STATES ];\n                    RD_Q25[ j ]                             = RD_min_Q25[ j ];\n                    RD_Q25[ j + NLSF_QUANT_DEL_DEC_STATES ] = RD_max_Q25[ j ];\n                    /* swap prev_out values */\n                    out0_Q10 = prev_out_Q10[ j ];\n                    prev_out_Q10[ j ] = prev_out_Q10[ j + NLSF_QUANT_DEL_DEC_STATES ];\n                    prev_out_Q10[ j + NLSF_QUANT_DEL_DEC_STATES ] = out0_Q10;\n                    ind_sort[ j ] = j + NLSF_QUANT_DEL_DEC_STATES;\n                } else {\n                    RD_min_Q25[ j ] = RD_Q25[ j ];\n                    RD_max_Q25[ j ] = RD_Q25[ j + NLSF_QUANT_DEL_DEC_STATES ];\n                    ind_sort[ j ] = j;\n                }\n            }\n            /* compare the highest RD values of the winning half with the lowest one in the losing half, and copy if necessary */\n            /* afterwards ind_sort[] will contain the indices of the NLSF_QUANT_DEL_DEC_STATES winning RD values */\n            while( 1 ) {\n                min_max_Q25 = silk_int32_MAX;\n                max_min_Q25 = 0;\n                ind_min_max = 0;\n                ind_max_min = 0;\n                for( j = 0; j < NLSF_QUANT_DEL_DEC_STATES; j++ ) {\n                    if( min_max_Q25 > RD_max_Q25[ j ] ) {\n                        min_max_Q25 = RD_max_Q25[ j ];\n                        ind_min_max = j;\n                    }\n                    if( max_min_Q25 < RD_min_Q25[ j ] ) {\n                        max_min_Q25 = RD_min_Q25[ j ];\n                        ind_max_min = j;\n                    }\n                }\n                if( min_max_Q25 >= max_min_Q25 ) {\n                    break;\n                }\n                /* copy ind_min_max to ind_max_min */\n                ind_sort[     ind_max_min ] = ind_sort[     ind_min_max ] ^ NLSF_QUANT_DEL_DEC_STATES;\n                RD_Q25[       ind_max_min ] = RD_Q25[       ind_min_max + NLSF_QUANT_DEL_DEC_STATES ];\n                prev_out_Q10[ ind_max_min ] = prev_out_Q10[ ind_min_max + NLSF_QUANT_DEL_DEC_STATES ];\n                RD_min_Q25[   ind_max_min ] = 0;\n                RD_max_Q25[   ind_min_max ] = silk_int32_MAX;\n                silk_memcpy( ind[ ind_max_min ], ind[ ind_min_max ], MAX_LPC_ORDER * sizeof( opus_int8 ) );\n            }\n            /* increment index if it comes from the upper half */\n            for( j = 0; j < NLSF_QUANT_DEL_DEC_STATES; j++ ) {\n                ind[ j ][ i ] += silk_RSHIFT( ind_sort[ j ], NLSF_QUANT_DEL_DEC_STATES_LOG2 );\n            }\n        } else {  /* i == 0 */\n            break;\n        }\n    }\n\n    /* last sample: find winner, copy indices and return RD value */\n    ind_tmp = 0;\n    min_Q25 = silk_int32_MAX;\n    for( j = 0; j < 2 * NLSF_QUANT_DEL_DEC_STATES; j++ ) {\n        if( min_Q25 > RD_Q25[ j ] ) {\n            min_Q25 = RD_Q25[ j ];\n            ind_tmp = j;\n        }\n    }\n    for( j = 0; j < order; j++ ) {\n        indices[ j ] = ind[ ind_tmp & ( NLSF_QUANT_DEL_DEC_STATES - 1 ) ][ j ];\n        silk_assert( indices[ j ] >= -NLSF_QUANT_MAX_AMPLITUDE_EXT );\n        silk_assert( indices[ j ] <=  NLSF_QUANT_MAX_AMPLITUDE_EXT );\n    }\n    indices[ 0 ] += silk_RSHIFT( ind_tmp, NLSF_QUANT_DEL_DEC_STATES_LOG2 );\n    silk_assert( indices[ 0 ] <= NLSF_QUANT_MAX_AMPLITUDE_EXT );\n    silk_assert( min_Q25 >= 0 );\n    return min_Q25;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/NLSF_encode.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"stack_alloc.h\"\n\n/***********************/\n/* NLSF vector encoder */\n/***********************/\nopus_int32 silk_NLSF_encode(                                    /* O    Returns RD value in Q25                     */\n          opus_int8             *NLSFIndices,                   /* I    Codebook path vector [ LPC_ORDER + 1 ]      */\n          opus_int16            *pNLSF_Q15,                     /* I/O  Quantized NLSF vector [ LPC_ORDER ]         */\n    const silk_NLSF_CB_struct   *psNLSF_CB,                     /* I    Codebook object                             */\n    const opus_int16            *pW_QW,                         /* I    NLSF weight vector [ LPC_ORDER ]            */\n    const opus_int              NLSF_mu_Q20,                    /* I    Rate weight for the RD optimization         */\n    const opus_int              nSurvivors,                     /* I    Max survivors after first stage             */\n    const opus_int              signalType                      /* I    Signal type: 0/1/2                          */\n)\n{\n    opus_int         i, s, ind1, bestIndex, prob_Q8, bits_q7;\n    opus_int32       W_tmp_Q9;\n    VARDECL( opus_int32, err_Q26 );\n    VARDECL( opus_int32, RD_Q25 );\n    VARDECL( opus_int, tempIndices1 );\n    VARDECL( opus_int8, tempIndices2 );\n    opus_int16       res_Q15[      MAX_LPC_ORDER ];\n    opus_int16       res_Q10[      MAX_LPC_ORDER ];\n    opus_int16       NLSF_tmp_Q15[ MAX_LPC_ORDER ];\n    opus_int16       W_tmp_QW[     MAX_LPC_ORDER ];\n    opus_int16       W_adj_Q5[     MAX_LPC_ORDER ];\n    opus_uint8       pred_Q8[      MAX_LPC_ORDER ];\n    opus_int16       ec_ix[        MAX_LPC_ORDER ];\n    const opus_uint8 *pCB_element, *iCDF_ptr;\n    SAVE_STACK;\n\n    silk_assert( nSurvivors <= NLSF_VQ_MAX_SURVIVORS );\n    silk_assert( signalType >= 0 && signalType <= 2 );\n    silk_assert( NLSF_mu_Q20 <= 32767 && NLSF_mu_Q20 >= 0 );\n\n    /* NLSF stabilization */\n    silk_NLSF_stabilize( pNLSF_Q15, psNLSF_CB->deltaMin_Q15, psNLSF_CB->order );\n\n    /* First stage: VQ */\n    ALLOC( err_Q26, psNLSF_CB->nVectors, opus_int32 );\n    silk_NLSF_VQ( err_Q26, pNLSF_Q15, psNLSF_CB->CB1_NLSF_Q8, psNLSF_CB->nVectors, psNLSF_CB->order );\n\n    /* Sort the quantization errors */\n    ALLOC( tempIndices1, nSurvivors, opus_int );\n    silk_insertion_sort_increasing( err_Q26, tempIndices1, psNLSF_CB->nVectors, nSurvivors );\n\n    ALLOC( RD_Q25, nSurvivors, opus_int32 );\n    ALLOC( tempIndices2, nSurvivors * MAX_LPC_ORDER, opus_int8 );\n\n    /* Loop over survivors */\n    for( s = 0; s < nSurvivors; s++ ) {\n        ind1 = tempIndices1[ s ];\n\n        /* Residual after first stage */\n        pCB_element = &psNLSF_CB->CB1_NLSF_Q8[ ind1 * psNLSF_CB->order ];\n        for( i = 0; i < psNLSF_CB->order; i++ ) {\n            NLSF_tmp_Q15[ i ] = silk_LSHIFT16( (opus_int16)pCB_element[ i ], 7 );\n            res_Q15[ i ] = pNLSF_Q15[ i ] - NLSF_tmp_Q15[ i ];\n        }\n\n        /* Weights from codebook vector */\n        silk_NLSF_VQ_weights_laroia( W_tmp_QW, NLSF_tmp_Q15, psNLSF_CB->order );\n\n        /* Apply square-rooted weights */\n        for( i = 0; i < psNLSF_CB->order; i++ ) {\n            W_tmp_Q9 = silk_SQRT_APPROX( silk_LSHIFT( (opus_int32)W_tmp_QW[ i ], 18 - NLSF_W_Q ) );\n            res_Q10[ i ] = (opus_int16)silk_RSHIFT( silk_SMULBB( res_Q15[ i ], W_tmp_Q9 ), 14 );\n        }\n\n        /* Modify input weights accordingly */\n        for( i = 0; i < psNLSF_CB->order; i++ ) {\n            W_adj_Q5[ i ] = silk_DIV32_16( silk_LSHIFT( (opus_int32)pW_QW[ i ], 5 ), W_tmp_QW[ i ] );\n        }\n\n        /* Unpack entropy table indices and predictor for current CB1 index */\n        silk_NLSF_unpack( ec_ix, pred_Q8, psNLSF_CB, ind1 );\n\n        /* Trellis quantizer */\n        RD_Q25[ s ] = silk_NLSF_del_dec_quant( &tempIndices2[ s * MAX_LPC_ORDER ], res_Q10, W_adj_Q5, pred_Q8, ec_ix,\n            psNLSF_CB->ec_Rates_Q5, psNLSF_CB->quantStepSize_Q16, psNLSF_CB->invQuantStepSize_Q6, NLSF_mu_Q20, psNLSF_CB->order );\n\n        /* Add rate for first stage */\n        iCDF_ptr = &psNLSF_CB->CB1_iCDF[ ( signalType >> 1 ) * psNLSF_CB->nVectors ];\n        if( ind1 == 0 ) {\n            prob_Q8 = 256 - iCDF_ptr[ ind1 ];\n        } else {\n            prob_Q8 = iCDF_ptr[ ind1 - 1 ] - iCDF_ptr[ ind1 ];\n        }\n        bits_q7 = ( 8 << 7 ) - silk_lin2log( prob_Q8 );\n        RD_Q25[ s ] = silk_SMLABB( RD_Q25[ s ], bits_q7, silk_RSHIFT( NLSF_mu_Q20, 2 ) );\n    }\n\n    /* Find the lowest rate-distortion error */\n    silk_insertion_sort_increasing( RD_Q25, &bestIndex, nSurvivors, 1 );\n\n    NLSFIndices[ 0 ] = (opus_int8)tempIndices1[ bestIndex ];\n    silk_memcpy( &NLSFIndices[ 1 ], &tempIndices2[ bestIndex * MAX_LPC_ORDER ], psNLSF_CB->order * sizeof( opus_int8 ) );\n\n    /* Decode */\n    silk_NLSF_decode( pNLSF_Q15, NLSFIndices, psNLSF_CB );\n\n    RESTORE_STACK;\n    return RD_Q25[ 0 ];\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/NLSF_stabilize.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n/* NLSF stabilizer:                                         */\n/*                                                          */\n/* - Moves NLSFs further apart if they are too close        */\n/* - Moves NLSFs away from borders if they are too close    */\n/* - High effort to achieve a modification with minimum     */\n/*     Euclidean distance to input vector                   */\n/* - Output are sorted NLSF coefficients                    */\n/*                                                          */\n\n#include \"SigProc_FIX.h\"\n\n/* Constant Definitions */\n#define MAX_LOOPS        20\n\n/* NLSF stabilizer, for a single input data vector */\nvoid silk_NLSF_stabilize(\n          opus_int16            *NLSF_Q15,          /* I/O   Unstable/stabilized normalized LSF vector in Q15 [L]       */\n    const opus_int16            *NDeltaMin_Q15,     /* I     Min distance vector, NDeltaMin_Q15[L] must be >= 1 [L+1]   */\n    const opus_int              L                   /* I     Number of NLSF parameters in the input vector              */\n)\n{\n    opus_int   i, I=0, k, loops;\n    opus_int16 center_freq_Q15;\n    opus_int32 diff_Q15, min_diff_Q15, min_center_Q15, max_center_Q15;\n\n    /* This is necessary to ensure an output within range of a opus_int16 */\n    silk_assert( NDeltaMin_Q15[L] >= 1 );\n\n    for( loops = 0; loops < MAX_LOOPS; loops++ ) {\n        /**************************/\n        /* Find smallest distance */\n        /**************************/\n        /* First element */\n        min_diff_Q15 = NLSF_Q15[0] - NDeltaMin_Q15[0];\n        I = 0;\n        /* Middle elements */\n        for( i = 1; i <= L-1; i++ ) {\n            diff_Q15 = NLSF_Q15[i] - ( NLSF_Q15[i-1] + NDeltaMin_Q15[i] );\n            if( diff_Q15 < min_diff_Q15 ) {\n                min_diff_Q15 = diff_Q15;\n                I = i;\n            }\n        }\n        /* Last element */\n        diff_Q15 = ( 1 << 15 ) - ( NLSF_Q15[L-1] + NDeltaMin_Q15[L] );\n        if( diff_Q15 < min_diff_Q15 ) {\n            min_diff_Q15 = diff_Q15;\n            I = L;\n        }\n\n        /***************************************************/\n        /* Now check if the smallest distance non-negative */\n        /***************************************************/\n        if( min_diff_Q15 >= 0 ) {\n            return;\n        }\n\n        if( I == 0 ) {\n            /* Move away from lower limit */\n            NLSF_Q15[0] = NDeltaMin_Q15[0];\n\n        } else if( I == L) {\n            /* Move away from higher limit */\n            NLSF_Q15[L-1] = ( 1 << 15 ) - NDeltaMin_Q15[L];\n\n        } else {\n            /* Find the lower extreme for the location of the current center frequency */\n            min_center_Q15 = 0;\n            for( k = 0; k < I; k++ ) {\n                min_center_Q15 += NDeltaMin_Q15[k];\n            }\n            min_center_Q15 += silk_RSHIFT( NDeltaMin_Q15[I], 1 );\n\n            /* Find the upper extreme for the location of the current center frequency */\n            max_center_Q15 = 1 << 15;\n            for( k = L; k > I; k-- ) {\n                max_center_Q15 -= NDeltaMin_Q15[k];\n            }\n            max_center_Q15 -= silk_RSHIFT( NDeltaMin_Q15[I], 1 );\n\n            /* Move apart, sorted by value, keeping the same center frequency */\n            center_freq_Q15 = (opus_int16)silk_LIMIT_32( silk_RSHIFT_ROUND( (opus_int32)NLSF_Q15[I-1] + (opus_int32)NLSF_Q15[I], 1 ),\n                min_center_Q15, max_center_Q15 );\n            NLSF_Q15[I-1] = center_freq_Q15 - silk_RSHIFT( NDeltaMin_Q15[I], 1 );\n            NLSF_Q15[I] = NLSF_Q15[I-1] + NDeltaMin_Q15[I];\n        }\n    }\n\n    /* Safe and simple fall back method, which is less ideal than the above */\n    if( loops == MAX_LOOPS )\n    {\n        /* Insertion sort (fast for already almost sorted arrays):   */\n        /* Best case:  O(n)   for an already sorted array            */\n        /* Worst case: O(n^2) for an inversely sorted array          */\n        silk_insertion_sort_increasing_all_values_int16( &NLSF_Q15[0], L );\n\n        /* First NLSF should be no less than NDeltaMin[0] */\n        NLSF_Q15[0] = silk_max_int( NLSF_Q15[0], NDeltaMin_Q15[0] );\n\n        /* Keep delta_min distance between the NLSFs */\n        for( i = 1; i < L; i++ )\n            NLSF_Q15[i] = silk_max_int( NLSF_Q15[i], NLSF_Q15[i-1] + NDeltaMin_Q15[i] );\n\n        /* Last NLSF should be no higher than 1 - NDeltaMin[L] */\n        NLSF_Q15[L-1] = silk_min_int( NLSF_Q15[L-1], (1<<15) - NDeltaMin_Q15[L] );\n\n        /* Keep NDeltaMin distance between the NLSFs */\n        for( i = L-2; i >= 0; i-- )\n            NLSF_Q15[i] = silk_min_int( NLSF_Q15[i], NLSF_Q15[i+1] - NDeltaMin_Q15[i+1] );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/NLSF_unpack.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Unpack predictor values and indices for entropy coding tables */\nvoid silk_NLSF_unpack(\n          opus_int16            ec_ix[],                        /* O    Indices to entropy tables [ LPC_ORDER ]     */\n          opus_uint8            pred_Q8[],                      /* O    LSF predictor [ LPC_ORDER ]                 */\n    const silk_NLSF_CB_struct   *psNLSF_CB,                     /* I    Codebook object                             */\n    const opus_int              CB1_index                       /* I    Index of vector in first LSF codebook       */\n)\n{\n    opus_int   i;\n    opus_uint8 entry;\n    const opus_uint8 *ec_sel_ptr;\n\n    ec_sel_ptr = &psNLSF_CB->ec_sel[ CB1_index * psNLSF_CB->order / 2 ];\n    for( i = 0; i < psNLSF_CB->order; i += 2 ) {\n        entry = *ec_sel_ptr++;\n        ec_ix  [ i     ] = silk_SMULBB( silk_RSHIFT( entry, 1 ) & 7, 2 * NLSF_QUANT_MAX_AMPLITUDE + 1 );\n        pred_Q8[ i     ] = psNLSF_CB->pred_Q8[ i + ( entry & 1 ) * ( psNLSF_CB->order - 1 ) ];\n        ec_ix  [ i + 1 ] = silk_SMULBB( silk_RSHIFT( entry, 5 ) & 7, 2 * NLSF_QUANT_MAX_AMPLITUDE + 1 );\n        pred_Q8[ i + 1 ] = psNLSF_CB->pred_Q8[ i + ( silk_RSHIFT( entry, 4 ) & 1 ) * ( psNLSF_CB->order - 1 ) + 1 ];\n    }\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/NSQ.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"stack_alloc.h\"\n\nstatic OPUS_INLINE void silk_nsq_scale_states(\n    const silk_encoder_state *psEncC,           /* I    Encoder State                   */\n    silk_nsq_state      *NSQ,                   /* I/O  NSQ state                       */\n    const opus_int32    x_Q3[],                 /* I    input in Q3                     */\n    opus_int32          x_sc_Q10[],             /* O    input scaled with 1/Gain        */\n    const opus_int16    sLTP[],                 /* I    re-whitened LTP state in Q0     */\n    opus_int32          sLTP_Q15[],             /* O    LTP state matching scaled input */\n    opus_int            subfr,                  /* I    subframe number                 */\n    const opus_int      LTP_scale_Q14,          /* I                                    */\n    const opus_int32    Gains_Q16[ MAX_NB_SUBFR ], /* I                                 */\n    const opus_int      pitchL[ MAX_NB_SUBFR ], /* I    Pitch lag                       */\n    const opus_int      signal_type             /* I    Signal type                     */\n);\n\nstatic OPUS_INLINE void silk_noise_shape_quantizer(\n    silk_nsq_state      *NSQ,                   /* I/O  NSQ state                       */\n    opus_int            signalType,             /* I    Signal type                     */\n    const opus_int32    x_sc_Q10[],             /* I                                    */\n    opus_int8           pulses[],               /* O                                    */\n    opus_int16          xq[],                   /* O                                    */\n    opus_int32          sLTP_Q15[],             /* I/O  LTP state                       */\n    const opus_int16    a_Q12[],                /* I    Short term prediction coefs     */\n    const opus_int16    b_Q14[],                /* I    Long term prediction coefs      */\n    const opus_int16    AR_shp_Q13[],           /* I    Noise shaping AR coefs          */\n    opus_int            lag,                    /* I    Pitch lag                       */\n    opus_int32          HarmShapeFIRPacked_Q14, /* I                                    */\n    opus_int            Tilt_Q14,               /* I    Spectral tilt                   */\n    opus_int32          LF_shp_Q14,             /* I                                    */\n    opus_int32          Gain_Q16,               /* I                                    */\n    opus_int            Lambda_Q10,             /* I                                    */\n    opus_int            offset_Q10,             /* I                                    */\n    opus_int            length,                 /* I    Input length                    */\n    opus_int            shapingLPCOrder,        /* I    Noise shaping AR filter order   */\n    opus_int            predictLPCOrder         /* I    Prediction filter order         */\n);\n\nvoid silk_NSQ(\n    const silk_encoder_state    *psEncC,                                    /* I/O  Encoder State                   */\n    silk_nsq_state              *NSQ,                                       /* I/O  NSQ state                       */\n    SideInfoIndices             *psIndices,                                 /* I/O  Quantization Indices            */\n    const opus_int32            x_Q3[],                                     /* I    Prefiltered input signal        */\n    opus_int8                   pulses[],                                   /* O    Quantized pulse signal          */\n    const opus_int16            PredCoef_Q12[ 2 * MAX_LPC_ORDER ],          /* I    Short term prediction coefs     */\n    const opus_int16            LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],    /* I    Long term prediction coefs      */\n    const opus_int16            AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs             */\n    const opus_int              HarmShapeGain_Q14[ MAX_NB_SUBFR ],          /* I    Long term shaping coefs         */\n    const opus_int              Tilt_Q14[ MAX_NB_SUBFR ],                   /* I    Spectral tilt                   */\n    const opus_int32            LF_shp_Q14[ MAX_NB_SUBFR ],                 /* I    Low frequency shaping coefs     */\n    const opus_int32            Gains_Q16[ MAX_NB_SUBFR ],                  /* I    Quantization step sizes         */\n    const opus_int              pitchL[ MAX_NB_SUBFR ],                     /* I    Pitch lags                      */\n    const opus_int              Lambda_Q10,                                 /* I    Rate/distortion tradeoff        */\n    const opus_int              LTP_scale_Q14                               /* I    LTP state scaling               */\n)\n{\n    opus_int            k, lag, start_idx, LSF_interpolation_flag;\n    const opus_int16    *A_Q12, *B_Q14, *AR_shp_Q13;\n    opus_int16          *pxq;\n    VARDECL( opus_int32, sLTP_Q15 );\n    VARDECL( opus_int16, sLTP );\n    opus_int32          HarmShapeFIRPacked_Q14;\n    opus_int            offset_Q10;\n    VARDECL( opus_int32, x_sc_Q10 );\n    SAVE_STACK;\n\n    NSQ->rand_seed = psIndices->Seed;\n\n    /* Set unvoiced lag to the previous one, overwrite later for voiced */\n    lag = NSQ->lagPrev;\n\n    silk_assert( NSQ->prev_gain_Q16 != 0 );\n\n    offset_Q10 = silk_Quantization_Offsets_Q10[ psIndices->signalType >> 1 ][ psIndices->quantOffsetType ];\n\n    if( psIndices->NLSFInterpCoef_Q2 == 4 ) {\n        LSF_interpolation_flag = 0;\n    } else {\n        LSF_interpolation_flag = 1;\n    }\n\n    ALLOC( sLTP_Q15,\n           psEncC->ltp_mem_length + psEncC->frame_length, opus_int32 );\n    ALLOC( sLTP, psEncC->ltp_mem_length + psEncC->frame_length, opus_int16 );\n    ALLOC( x_sc_Q10, psEncC->subfr_length, opus_int32 );\n    /* Set up pointers to start of sub frame */\n    NSQ->sLTP_shp_buf_idx = psEncC->ltp_mem_length;\n    NSQ->sLTP_buf_idx     = psEncC->ltp_mem_length;\n    pxq                   = &NSQ->xq[ psEncC->ltp_mem_length ];\n    for( k = 0; k < psEncC->nb_subfr; k++ ) {\n        A_Q12      = &PredCoef_Q12[ (( k >> 1 ) | ( 1 - LSF_interpolation_flag )) * MAX_LPC_ORDER ];\n        B_Q14      = &LTPCoef_Q14[ k * LTP_ORDER ];\n        AR_shp_Q13 = &AR2_Q13[     k * MAX_SHAPE_LPC_ORDER ];\n\n        /* Noise shape parameters */\n        silk_assert( HarmShapeGain_Q14[ k ] >= 0 );\n        HarmShapeFIRPacked_Q14  =                          silk_RSHIFT( HarmShapeGain_Q14[ k ], 2 );\n        HarmShapeFIRPacked_Q14 |= silk_LSHIFT( (opus_int32)silk_RSHIFT( HarmShapeGain_Q14[ k ], 1 ), 16 );\n\n        NSQ->rewhite_flag = 0;\n        if( psIndices->signalType == TYPE_VOICED ) {\n            /* Voiced */\n            lag = pitchL[ k ];\n\n            /* Re-whitening */\n            if( ( k & ( 3 - silk_LSHIFT( LSF_interpolation_flag, 1 ) ) ) == 0 ) {\n                /* Rewhiten with new A coefs */\n                start_idx = psEncC->ltp_mem_length - lag - psEncC->predictLPCOrder - LTP_ORDER / 2;\n                silk_assert( start_idx > 0 );\n\n                silk_LPC_analysis_filter( &sLTP[ start_idx ], &NSQ->xq[ start_idx + k * psEncC->subfr_length ],\n                    A_Q12, psEncC->ltp_mem_length - start_idx, psEncC->predictLPCOrder );\n\n                NSQ->rewhite_flag = 1;\n                NSQ->sLTP_buf_idx = psEncC->ltp_mem_length;\n            }\n        }\n\n        silk_nsq_scale_states( psEncC, NSQ, x_Q3, x_sc_Q10, sLTP, sLTP_Q15, k, LTP_scale_Q14, Gains_Q16, pitchL, psIndices->signalType );\n\n        silk_noise_shape_quantizer( NSQ, psIndices->signalType, x_sc_Q10, pulses, pxq, sLTP_Q15, A_Q12, B_Q14,\n            AR_shp_Q13, lag, HarmShapeFIRPacked_Q14, Tilt_Q14[ k ], LF_shp_Q14[ k ], Gains_Q16[ k ], Lambda_Q10,\n            offset_Q10, psEncC->subfr_length, psEncC->shapingLPCOrder, psEncC->predictLPCOrder );\n\n        x_Q3   += psEncC->subfr_length;\n        pulses += psEncC->subfr_length;\n        pxq    += psEncC->subfr_length;\n    }\n\n    /* Update lagPrev for next frame */\n    NSQ->lagPrev = pitchL[ psEncC->nb_subfr - 1 ];\n\n    /* Save quantized speech and noise shaping signals */\n    /* DEBUG_STORE_DATA( enc.pcm, &NSQ->xq[ psEncC->ltp_mem_length ], psEncC->frame_length * sizeof( opus_int16 ) ) */\n    silk_memmove( NSQ->xq,           &NSQ->xq[           psEncC->frame_length ], psEncC->ltp_mem_length * sizeof( opus_int16 ) );\n    silk_memmove( NSQ->sLTP_shp_Q14, &NSQ->sLTP_shp_Q14[ psEncC->frame_length ], psEncC->ltp_mem_length * sizeof( opus_int32 ) );\n    RESTORE_STACK;\n}\n\n/***********************************/\n/* silk_noise_shape_quantizer  */\n/***********************************/\nstatic OPUS_INLINE void silk_noise_shape_quantizer(\n    silk_nsq_state      *NSQ,                   /* I/O  NSQ state                       */\n    opus_int            signalType,             /* I    Signal type                     */\n    const opus_int32    x_sc_Q10[],             /* I                                    */\n    opus_int8           pulses[],               /* O                                    */\n    opus_int16          xq[],                   /* O                                    */\n    opus_int32          sLTP_Q15[],             /* I/O  LTP state                       */\n    const opus_int16    a_Q12[],                /* I    Short term prediction coefs     */\n    const opus_int16    b_Q14[],                /* I    Long term prediction coefs      */\n    const opus_int16    AR_shp_Q13[],           /* I    Noise shaping AR coefs          */\n    opus_int            lag,                    /* I    Pitch lag                       */\n    opus_int32          HarmShapeFIRPacked_Q14, /* I                                    */\n    opus_int            Tilt_Q14,               /* I    Spectral tilt                   */\n    opus_int32          LF_shp_Q14,             /* I                                    */\n    opus_int32          Gain_Q16,               /* I                                    */\n    opus_int            Lambda_Q10,             /* I                                    */\n    opus_int            offset_Q10,             /* I                                    */\n    opus_int            length,                 /* I    Input length                    */\n    opus_int            shapingLPCOrder,        /* I    Noise shaping AR filter order   */\n    opus_int            predictLPCOrder         /* I    Prediction filter order         */\n)\n{\n    opus_int     i, j;\n    opus_int32   LTP_pred_Q13, LPC_pred_Q10, n_AR_Q12, n_LTP_Q13;\n    opus_int32   n_LF_Q12, r_Q10, rr_Q10, q1_Q0, q1_Q10, q2_Q10, rd1_Q20, rd2_Q20;\n    opus_int32   exc_Q14, LPC_exc_Q14, xq_Q14, Gain_Q10;\n    opus_int32   tmp1, tmp2, sLF_AR_shp_Q14;\n    opus_int32   *psLPC_Q14, *shp_lag_ptr, *pred_lag_ptr;\n\n    shp_lag_ptr  = &NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - lag + HARM_SHAPE_FIR_TAPS / 2 ];\n    pred_lag_ptr = &sLTP_Q15[ NSQ->sLTP_buf_idx - lag + LTP_ORDER / 2 ];\n    Gain_Q10     = silk_RSHIFT( Gain_Q16, 6 );\n\n    /* Set up short term AR state */\n    psLPC_Q14 = &NSQ->sLPC_Q14[ NSQ_LPC_BUF_LENGTH - 1 ];\n\n    for( i = 0; i < length; i++ ) {\n        /* Generate dither */\n        NSQ->rand_seed = silk_RAND( NSQ->rand_seed );\n\n        /* Short-term prediction */\n        silk_assert( predictLPCOrder == 10 || predictLPCOrder == 16 );\n        /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */\n        LPC_pred_Q10 = silk_RSHIFT( predictLPCOrder, 1 );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[  0 ], a_Q12[ 0 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -1 ], a_Q12[ 1 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -2 ], a_Q12[ 2 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -3 ], a_Q12[ 3 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -4 ], a_Q12[ 4 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -5 ], a_Q12[ 5 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -6 ], a_Q12[ 6 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -7 ], a_Q12[ 7 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -8 ], a_Q12[ 8 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -9 ], a_Q12[ 9 ] );\n        if( predictLPCOrder == 16 ) {\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -10 ], a_Q12[ 10 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -11 ], a_Q12[ 11 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -12 ], a_Q12[ 12 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -13 ], a_Q12[ 13 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -14 ], a_Q12[ 14 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -15 ], a_Q12[ 15 ] );\n        }\n\n        /* Long-term prediction */\n        if( signalType == TYPE_VOICED ) {\n            /* Unrolled loop */\n            /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */\n            LTP_pred_Q13 = 2;\n            LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[  0 ], b_Q14[ 0 ] );\n            LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -1 ], b_Q14[ 1 ] );\n            LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -2 ], b_Q14[ 2 ] );\n            LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -3 ], b_Q14[ 3 ] );\n            LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -4 ], b_Q14[ 4 ] );\n            pred_lag_ptr++;\n        } else {\n            LTP_pred_Q13 = 0;\n        }\n\n        /* Noise shape feedback */\n        silk_assert( ( shapingLPCOrder & 1 ) == 0 );   /* check that order is even */\n        tmp2 = psLPC_Q14[ 0 ];\n        tmp1 = NSQ->sAR2_Q14[ 0 ];\n        NSQ->sAR2_Q14[ 0 ] = tmp2;\n        n_AR_Q12 = silk_RSHIFT( shapingLPCOrder, 1 );\n        n_AR_Q12 = silk_SMLAWB( n_AR_Q12, tmp2, AR_shp_Q13[ 0 ] );\n        for( j = 2; j < shapingLPCOrder; j += 2 ) {\n            tmp2 = NSQ->sAR2_Q14[ j - 1 ];\n            NSQ->sAR2_Q14[ j - 1 ] = tmp1;\n            n_AR_Q12 = silk_SMLAWB( n_AR_Q12, tmp1, AR_shp_Q13[ j - 1 ] );\n            tmp1 = NSQ->sAR2_Q14[ j + 0 ];\n            NSQ->sAR2_Q14[ j + 0 ] = tmp2;\n            n_AR_Q12 = silk_SMLAWB( n_AR_Q12, tmp2, AR_shp_Q13[ j ] );\n        }\n        NSQ->sAR2_Q14[ shapingLPCOrder - 1 ] = tmp1;\n        n_AR_Q12 = silk_SMLAWB( n_AR_Q12, tmp1, AR_shp_Q13[ shapingLPCOrder - 1 ] );\n\n        n_AR_Q12 = silk_LSHIFT32( n_AR_Q12, 1 );                                /* Q11 -> Q12 */\n        n_AR_Q12 = silk_SMLAWB( n_AR_Q12, NSQ->sLF_AR_shp_Q14, Tilt_Q14 );\n\n        n_LF_Q12 = silk_SMULWB( NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - 1 ], LF_shp_Q14 );\n        n_LF_Q12 = silk_SMLAWT( n_LF_Q12, NSQ->sLF_AR_shp_Q14, LF_shp_Q14 );\n\n        silk_assert( lag > 0 || signalType != TYPE_VOICED );\n\n        /* Combine prediction and noise shaping signals */\n        tmp1 = silk_SUB32( silk_LSHIFT32( LPC_pred_Q10, 2 ), n_AR_Q12 );        /* Q12 */\n        tmp1 = silk_SUB32( tmp1, n_LF_Q12 );                                    /* Q12 */\n        if( lag > 0 ) {\n            /* Symmetric, packed FIR coefficients */\n            n_LTP_Q13 = silk_SMULWB( silk_ADD32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 );\n            n_LTP_Q13 = silk_SMLAWT( n_LTP_Q13, shp_lag_ptr[ -1 ],                      HarmShapeFIRPacked_Q14 );\n            n_LTP_Q13 = silk_LSHIFT( n_LTP_Q13, 1 );\n            shp_lag_ptr++;\n\n            tmp2 = silk_SUB32( LTP_pred_Q13, n_LTP_Q13 );                       /* Q13 */\n            tmp1 = silk_ADD_LSHIFT32( tmp2, tmp1, 1 );                          /* Q13 */\n            tmp1 = silk_RSHIFT_ROUND( tmp1, 3 );                                /* Q10 */\n        } else {\n            tmp1 = silk_RSHIFT_ROUND( tmp1, 2 );                                /* Q10 */\n        }\n\n        r_Q10 = silk_SUB32( x_sc_Q10[ i ], tmp1 );                              /* residual error Q10 */\n\n        /* Flip sign depending on dither */\n        if ( NSQ->rand_seed < 0 ) {\n           r_Q10 = -r_Q10;\n        }\n        r_Q10 = silk_LIMIT_32( r_Q10, -(31 << 10), 30 << 10 );\n\n        /* Find two quantization level candidates and measure their rate-distortion */\n        q1_Q10 = silk_SUB32( r_Q10, offset_Q10 );\n        q1_Q0 = silk_RSHIFT( q1_Q10, 10 );\n        if( q1_Q0 > 0 ) {\n            q1_Q10  = silk_SUB32( silk_LSHIFT( q1_Q0, 10 ), QUANT_LEVEL_ADJUST_Q10 );\n            q1_Q10  = silk_ADD32( q1_Q10, offset_Q10 );\n            q2_Q10  = silk_ADD32( q1_Q10, 1024 );\n            rd1_Q20 = silk_SMULBB( q1_Q10, Lambda_Q10 );\n            rd2_Q20 = silk_SMULBB( q2_Q10, Lambda_Q10 );\n        } else if( q1_Q0 == 0 ) {\n            q1_Q10  = offset_Q10;\n            q2_Q10  = silk_ADD32( q1_Q10, 1024 - QUANT_LEVEL_ADJUST_Q10 );\n            rd1_Q20 = silk_SMULBB( q1_Q10, Lambda_Q10 );\n            rd2_Q20 = silk_SMULBB( q2_Q10, Lambda_Q10 );\n        } else if( q1_Q0 == -1 ) {\n            q2_Q10  = offset_Q10;\n            q1_Q10  = silk_SUB32( q2_Q10, 1024 - QUANT_LEVEL_ADJUST_Q10 );\n            rd1_Q20 = silk_SMULBB( -q1_Q10, Lambda_Q10 );\n            rd2_Q20 = silk_SMULBB(  q2_Q10, Lambda_Q10 );\n        } else {            /* Q1_Q0 < -1 */\n            q1_Q10  = silk_ADD32( silk_LSHIFT( q1_Q0, 10 ), QUANT_LEVEL_ADJUST_Q10 );\n            q1_Q10  = silk_ADD32( q1_Q10, offset_Q10 );\n            q2_Q10  = silk_ADD32( q1_Q10, 1024 );\n            rd1_Q20 = silk_SMULBB( -q1_Q10, Lambda_Q10 );\n            rd2_Q20 = silk_SMULBB( -q2_Q10, Lambda_Q10 );\n        }\n        rr_Q10  = silk_SUB32( r_Q10, q1_Q10 );\n        rd1_Q20 = silk_SMLABB( rd1_Q20, rr_Q10, rr_Q10 );\n        rr_Q10  = silk_SUB32( r_Q10, q2_Q10 );\n        rd2_Q20 = silk_SMLABB( rd2_Q20, rr_Q10, rr_Q10 );\n\n        if( rd2_Q20 < rd1_Q20 ) {\n            q1_Q10 = q2_Q10;\n        }\n\n        pulses[ i ] = (opus_int8)silk_RSHIFT_ROUND( q1_Q10, 10 );\n\n        /* Excitation */\n        exc_Q14 = silk_LSHIFT( q1_Q10, 4 );\n        if ( NSQ->rand_seed < 0 ) {\n           exc_Q14 = -exc_Q14;\n        }\n\n        /* Add predictions */\n        LPC_exc_Q14 = silk_ADD_LSHIFT32( exc_Q14, LTP_pred_Q13, 1 );\n        xq_Q14      = silk_ADD_LSHIFT32( LPC_exc_Q14, LPC_pred_Q10, 4 );\n\n        /* Scale XQ back to normal level before saving */\n        xq[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( silk_SMULWW( xq_Q14, Gain_Q10 ), 8 ) );\n\n        /* Update states */\n        psLPC_Q14++;\n        *psLPC_Q14 = xq_Q14;\n        sLF_AR_shp_Q14 = silk_SUB_LSHIFT32( xq_Q14, n_AR_Q12, 2 );\n        NSQ->sLF_AR_shp_Q14 = sLF_AR_shp_Q14;\n\n        NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx ] = silk_SUB_LSHIFT32( sLF_AR_shp_Q14, n_LF_Q12, 2 );\n        sLTP_Q15[ NSQ->sLTP_buf_idx ] = silk_LSHIFT( LPC_exc_Q14, 1 );\n        NSQ->sLTP_shp_buf_idx++;\n        NSQ->sLTP_buf_idx++;\n\n        /* Make dither dependent on quantized signal */\n        NSQ->rand_seed = silk_ADD32_ovflw( NSQ->rand_seed, pulses[ i ] );\n    }\n\n    /* Update LPC synth buffer */\n    silk_memcpy( NSQ->sLPC_Q14, &NSQ->sLPC_Q14[ length ], NSQ_LPC_BUF_LENGTH * sizeof( opus_int32 ) );\n}\n\nstatic OPUS_INLINE void silk_nsq_scale_states(\n    const silk_encoder_state *psEncC,           /* I    Encoder State                   */\n    silk_nsq_state      *NSQ,                   /* I/O  NSQ state                       */\n    const opus_int32    x_Q3[],                 /* I    input in Q3                     */\n    opus_int32          x_sc_Q10[],             /* O    input scaled with 1/Gain        */\n    const opus_int16    sLTP[],                 /* I    re-whitened LTP state in Q0     */\n    opus_int32          sLTP_Q15[],             /* O    LTP state matching scaled input */\n    opus_int            subfr,                  /* I    subframe number                 */\n    const opus_int      LTP_scale_Q14,          /* I                                    */\n    const opus_int32    Gains_Q16[ MAX_NB_SUBFR ], /* I                                 */\n    const opus_int      pitchL[ MAX_NB_SUBFR ], /* I    Pitch lag                       */\n    const opus_int      signal_type             /* I    Signal type                     */\n)\n{\n    opus_int   i, lag;\n    opus_int32 gain_adj_Q16, inv_gain_Q31, inv_gain_Q23;\n\n    lag          = pitchL[ subfr ];\n    inv_gain_Q31 = silk_INVERSE32_varQ( silk_max( Gains_Q16[ subfr ], 1 ), 47 );\n    silk_assert( inv_gain_Q31 != 0 );\n\n    /* Calculate gain adjustment factor */\n    if( Gains_Q16[ subfr ] != NSQ->prev_gain_Q16 ) {\n        gain_adj_Q16 =  silk_DIV32_varQ( NSQ->prev_gain_Q16, Gains_Q16[ subfr ], 16 );\n    } else {\n        gain_adj_Q16 = (opus_int32)1 << 16;\n    }\n\n    /* Scale input */\n    inv_gain_Q23 = silk_RSHIFT_ROUND( inv_gain_Q31, 8 );\n    for( i = 0; i < psEncC->subfr_length; i++ ) {\n        x_sc_Q10[ i ] = silk_SMULWW( x_Q3[ i ], inv_gain_Q23 );\n    }\n\n    /* Save inverse gain */\n    NSQ->prev_gain_Q16 = Gains_Q16[ subfr ];\n\n    /* After rewhitening the LTP state is un-scaled, so scale with inv_gain_Q16 */\n    if( NSQ->rewhite_flag ) {\n        if( subfr == 0 ) {\n            /* Do LTP downscaling */\n            inv_gain_Q31 = silk_LSHIFT( silk_SMULWB( inv_gain_Q31, LTP_scale_Q14 ), 2 );\n        }\n        for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) {\n            silk_assert( i < MAX_FRAME_LENGTH );\n            sLTP_Q15[ i ] = silk_SMULWB( inv_gain_Q31, sLTP[ i ] );\n        }\n    }\n\n    /* Adjust for changing gain */\n    if( gain_adj_Q16 != (opus_int32)1 << 16 ) {\n        /* Scale long-term shaping state */\n        for( i = NSQ->sLTP_shp_buf_idx - psEncC->ltp_mem_length; i < NSQ->sLTP_shp_buf_idx; i++ ) {\n            NSQ->sLTP_shp_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q14[ i ] );\n        }\n\n        /* Scale long-term prediction state */\n        if( signal_type == TYPE_VOICED && NSQ->rewhite_flag == 0 ) {\n            for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) {\n                sLTP_Q15[ i ] = silk_SMULWW( gain_adj_Q16, sLTP_Q15[ i ] );\n            }\n        }\n\n        NSQ->sLF_AR_shp_Q14 = silk_SMULWW( gain_adj_Q16, NSQ->sLF_AR_shp_Q14 );\n\n        /* Scale short-term prediction and shaping states */\n        for( i = 0; i < NSQ_LPC_BUF_LENGTH; i++ ) {\n            NSQ->sLPC_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sLPC_Q14[ i ] );\n        }\n        for( i = 0; i < MAX_SHAPE_LPC_ORDER; i++ ) {\n            NSQ->sAR2_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sAR2_Q14[ i ] );\n        }\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/NSQ_del_dec.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"stack_alloc.h\"\n\ntypedef struct {\n    opus_int32 sLPC_Q14[ MAX_SUB_FRAME_LENGTH + NSQ_LPC_BUF_LENGTH ];\n    opus_int32 RandState[ DECISION_DELAY ];\n    opus_int32 Q_Q10[     DECISION_DELAY ];\n    opus_int32 Xq_Q14[    DECISION_DELAY ];\n    opus_int32 Pred_Q15[  DECISION_DELAY ];\n    opus_int32 Shape_Q14[ DECISION_DELAY ];\n    opus_int32 sAR2_Q14[ MAX_SHAPE_LPC_ORDER ];\n    opus_int32 LF_AR_Q14;\n    opus_int32 Seed;\n    opus_int32 SeedInit;\n    opus_int32 RD_Q10;\n} NSQ_del_dec_struct;\n\ntypedef struct {\n    opus_int32 Q_Q10;\n    opus_int32 RD_Q10;\n    opus_int32 xq_Q14;\n    opus_int32 LF_AR_Q14;\n    opus_int32 sLTP_shp_Q14;\n    opus_int32 LPC_exc_Q14;\n} NSQ_sample_struct;\n\ntypedef NSQ_sample_struct  NSQ_sample_pair[ 2 ];\n\nstatic OPUS_INLINE void silk_nsq_del_dec_scale_states(\n    const silk_encoder_state *psEncC,               /* I    Encoder State                       */\n    silk_nsq_state      *NSQ,                       /* I/O  NSQ state                           */\n    NSQ_del_dec_struct  psDelDec[],                 /* I/O  Delayed decision states             */\n    const opus_int32    x_Q3[],                     /* I    Input in Q3                         */\n    opus_int32          x_sc_Q10[],                 /* O    Input scaled with 1/Gain in Q10     */\n    const opus_int16    sLTP[],                     /* I    Re-whitened LTP state in Q0         */\n    opus_int32          sLTP_Q15[],                 /* O    LTP state matching scaled input     */\n    opus_int            subfr,                      /* I    Subframe number                     */\n    opus_int            nStatesDelayedDecision,     /* I    Number of del dec states            */\n    const opus_int      LTP_scale_Q14,              /* I    LTP state scaling                   */\n    const opus_int32    Gains_Q16[ MAX_NB_SUBFR ],  /* I                                        */\n    const opus_int      pitchL[ MAX_NB_SUBFR ],     /* I    Pitch lag                           */\n    const opus_int      signal_type,                /* I    Signal type                         */\n    const opus_int      decisionDelay               /* I    Decision delay                      */\n);\n\n/******************************************/\n/* Noise shape quantizer for one subframe */\n/******************************************/\nstatic OPUS_INLINE void silk_noise_shape_quantizer_del_dec(\n    silk_nsq_state      *NSQ,                   /* I/O  NSQ state                           */\n    NSQ_del_dec_struct  psDelDec[],             /* I/O  Delayed decision states             */\n    opus_int            signalType,             /* I    Signal type                         */\n    const opus_int32    x_Q10[],                /* I                                        */\n    opus_int8           pulses[],               /* O                                        */\n    opus_int16          xq[],                   /* O                                        */\n    opus_int32          sLTP_Q15[],             /* I/O  LTP filter state                    */\n    opus_int32          delayedGain_Q10[],      /* I/O  Gain delay buffer                   */\n    const opus_int16    a_Q12[],                /* I    Short term prediction coefs         */\n    const opus_int16    b_Q14[],                /* I    Long term prediction coefs          */\n    const opus_int16    AR_shp_Q13[],           /* I    Noise shaping coefs                 */\n    opus_int            lag,                    /* I    Pitch lag                           */\n    opus_int32          HarmShapeFIRPacked_Q14, /* I                                        */\n    opus_int            Tilt_Q14,               /* I    Spectral tilt                       */\n    opus_int32          LF_shp_Q14,             /* I                                        */\n    opus_int32          Gain_Q16,               /* I                                        */\n    opus_int            Lambda_Q10,             /* I                                        */\n    opus_int            offset_Q10,             /* I                                        */\n    opus_int            length,                 /* I    Input length                        */\n    opus_int            subfr,                  /* I    Subframe number                     */\n    opus_int            shapingLPCOrder,        /* I    Shaping LPC filter order            */\n    opus_int            predictLPCOrder,        /* I    Prediction filter order             */\n    opus_int            warping_Q16,            /* I                                        */\n    opus_int            nStatesDelayedDecision, /* I    Number of states in decision tree   */\n    opus_int            *smpl_buf_idx,          /* I    Index to newest samples in buffers  */\n    opus_int            decisionDelay           /* I                                        */\n);\n\nvoid silk_NSQ_del_dec(\n    const silk_encoder_state    *psEncC,                                    /* I/O  Encoder State                   */\n    silk_nsq_state              *NSQ,                                       /* I/O  NSQ state                       */\n    SideInfoIndices             *psIndices,                                 /* I/O  Quantization Indices            */\n    const opus_int32            x_Q3[],                                     /* I    Prefiltered input signal        */\n    opus_int8                   pulses[],                                   /* O    Quantized pulse signal          */\n    const opus_int16            PredCoef_Q12[ 2 * MAX_LPC_ORDER ],          /* I    Short term prediction coefs     */\n    const opus_int16            LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],    /* I    Long term prediction coefs      */\n    const opus_int16            AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs             */\n    const opus_int              HarmShapeGain_Q14[ MAX_NB_SUBFR ],          /* I    Long term shaping coefs         */\n    const opus_int              Tilt_Q14[ MAX_NB_SUBFR ],                   /* I    Spectral tilt                   */\n    const opus_int32            LF_shp_Q14[ MAX_NB_SUBFR ],                 /* I    Low frequency shaping coefs     */\n    const opus_int32            Gains_Q16[ MAX_NB_SUBFR ],                  /* I    Quantization step sizes         */\n    const opus_int              pitchL[ MAX_NB_SUBFR ],                     /* I    Pitch lags                      */\n    const opus_int              Lambda_Q10,                                 /* I    Rate/distortion tradeoff        */\n    const opus_int              LTP_scale_Q14                               /* I    LTP state scaling               */\n)\n{\n    opus_int            i, k, lag, start_idx, LSF_interpolation_flag, Winner_ind, subfr;\n    opus_int            last_smple_idx, smpl_buf_idx, decisionDelay;\n    const opus_int16    *A_Q12, *B_Q14, *AR_shp_Q13;\n    opus_int16          *pxq;\n    VARDECL( opus_int32, sLTP_Q15 );\n    VARDECL( opus_int16, sLTP );\n    opus_int32          HarmShapeFIRPacked_Q14;\n    opus_int            offset_Q10;\n    opus_int32          RDmin_Q10, Gain_Q10;\n    VARDECL( opus_int32, x_sc_Q10 );\n    VARDECL( opus_int32, delayedGain_Q10 );\n    VARDECL( NSQ_del_dec_struct, psDelDec );\n    NSQ_del_dec_struct  *psDD;\n    SAVE_STACK;\n\n    /* Set unvoiced lag to the previous one, overwrite later for voiced */\n    lag = NSQ->lagPrev;\n\n    silk_assert( NSQ->prev_gain_Q16 != 0 );\n\n    /* Initialize delayed decision states */\n    ALLOC( psDelDec, psEncC->nStatesDelayedDecision, NSQ_del_dec_struct );\n    silk_memset( psDelDec, 0, psEncC->nStatesDelayedDecision * sizeof( NSQ_del_dec_struct ) );\n    for( k = 0; k < psEncC->nStatesDelayedDecision; k++ ) {\n        psDD                 = &psDelDec[ k ];\n        psDD->Seed           = ( k + psIndices->Seed ) & 3;\n        psDD->SeedInit       = psDD->Seed;\n        psDD->RD_Q10         = 0;\n        psDD->LF_AR_Q14      = NSQ->sLF_AR_shp_Q14;\n        psDD->Shape_Q14[ 0 ] = NSQ->sLTP_shp_Q14[ psEncC->ltp_mem_length - 1 ];\n        silk_memcpy( psDD->sLPC_Q14, NSQ->sLPC_Q14, NSQ_LPC_BUF_LENGTH * sizeof( opus_int32 ) );\n        silk_memcpy( psDD->sAR2_Q14, NSQ->sAR2_Q14, sizeof( NSQ->sAR2_Q14 ) );\n    }\n\n    offset_Q10   = silk_Quantization_Offsets_Q10[ psIndices->signalType >> 1 ][ psIndices->quantOffsetType ];\n    smpl_buf_idx = 0; /* index of oldest samples */\n\n    decisionDelay = silk_min_int( DECISION_DELAY, psEncC->subfr_length );\n\n    /* For voiced frames limit the decision delay to lower than the pitch lag */\n    if( psIndices->signalType == TYPE_VOICED ) {\n        for( k = 0; k < psEncC->nb_subfr; k++ ) {\n            decisionDelay = silk_min_int( decisionDelay, pitchL[ k ] - LTP_ORDER / 2 - 1 );\n        }\n    } else {\n        if( lag > 0 ) {\n            decisionDelay = silk_min_int( decisionDelay, lag - LTP_ORDER / 2 - 1 );\n        }\n    }\n\n    if( psIndices->NLSFInterpCoef_Q2 == 4 ) {\n        LSF_interpolation_flag = 0;\n    } else {\n        LSF_interpolation_flag = 1;\n    }\n\n    ALLOC( sLTP_Q15,\n           psEncC->ltp_mem_length + psEncC->frame_length, opus_int32 );\n    ALLOC( sLTP, psEncC->ltp_mem_length + psEncC->frame_length, opus_int16 );\n    ALLOC( x_sc_Q10, psEncC->subfr_length, opus_int32 );\n    ALLOC( delayedGain_Q10, DECISION_DELAY, opus_int32 );\n    /* Set up pointers to start of sub frame */\n    pxq                   = &NSQ->xq[ psEncC->ltp_mem_length ];\n    NSQ->sLTP_shp_buf_idx = psEncC->ltp_mem_length;\n    NSQ->sLTP_buf_idx     = psEncC->ltp_mem_length;\n    subfr = 0;\n    for( k = 0; k < psEncC->nb_subfr; k++ ) {\n        A_Q12      = &PredCoef_Q12[ ( ( k >> 1 ) | ( 1 - LSF_interpolation_flag ) ) * MAX_LPC_ORDER ];\n        B_Q14      = &LTPCoef_Q14[ k * LTP_ORDER           ];\n        AR_shp_Q13 = &AR2_Q13[     k * MAX_SHAPE_LPC_ORDER ];\n\n        /* Noise shape parameters */\n        silk_assert( HarmShapeGain_Q14[ k ] >= 0 );\n        HarmShapeFIRPacked_Q14  =                          silk_RSHIFT( HarmShapeGain_Q14[ k ], 2 );\n        HarmShapeFIRPacked_Q14 |= silk_LSHIFT( (opus_int32)silk_RSHIFT( HarmShapeGain_Q14[ k ], 1 ), 16 );\n\n        NSQ->rewhite_flag = 0;\n        if( psIndices->signalType == TYPE_VOICED ) {\n            /* Voiced */\n            lag = pitchL[ k ];\n\n            /* Re-whitening */\n            if( ( k & ( 3 - silk_LSHIFT( LSF_interpolation_flag, 1 ) ) ) == 0 ) {\n                if( k == 2 ) {\n                    /* RESET DELAYED DECISIONS */\n                    /* Find winner */\n                    RDmin_Q10 = psDelDec[ 0 ].RD_Q10;\n                    Winner_ind = 0;\n                    for( i = 1; i < psEncC->nStatesDelayedDecision; i++ ) {\n                        if( psDelDec[ i ].RD_Q10 < RDmin_Q10 ) {\n                            RDmin_Q10 = psDelDec[ i ].RD_Q10;\n                            Winner_ind = i;\n                        }\n                    }\n                    for( i = 0; i < psEncC->nStatesDelayedDecision; i++ ) {\n                        if( i != Winner_ind ) {\n                            psDelDec[ i ].RD_Q10 += ( silk_int32_MAX >> 4 );\n                            silk_assert( psDelDec[ i ].RD_Q10 >= 0 );\n                        }\n                    }\n\n                    /* Copy final part of signals from winner state to output and long-term filter states */\n                    psDD = &psDelDec[ Winner_ind ];\n                    last_smple_idx = smpl_buf_idx + decisionDelay;\n                    for( i = 0; i < decisionDelay; i++ ) {\n                        last_smple_idx = ( last_smple_idx - 1 ) & DECISION_DELAY_MASK;\n                        pulses[   i - decisionDelay ] = (opus_int8)silk_RSHIFT_ROUND( psDD->Q_Q10[ last_smple_idx ], 10 );\n                        pxq[ i - decisionDelay ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND(\n                            silk_SMULWW( psDD->Xq_Q14[ last_smple_idx ], Gains_Q16[ 1 ] ), 14 ) );\n                        NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - decisionDelay + i ] = psDD->Shape_Q14[ last_smple_idx ];\n                    }\n\n                    subfr = 0;\n                }\n\n                /* Rewhiten with new A coefs */\n                start_idx = psEncC->ltp_mem_length - lag - psEncC->predictLPCOrder - LTP_ORDER / 2;\n                silk_assert( start_idx > 0 );\n\n                silk_LPC_analysis_filter( &sLTP[ start_idx ], &NSQ->xq[ start_idx + k * psEncC->subfr_length ],\n                    A_Q12, psEncC->ltp_mem_length - start_idx, psEncC->predictLPCOrder );\n\n                NSQ->sLTP_buf_idx = psEncC->ltp_mem_length;\n                NSQ->rewhite_flag = 1;\n            }\n        }\n\n        silk_nsq_del_dec_scale_states( psEncC, NSQ, psDelDec, x_Q3, x_sc_Q10, sLTP, sLTP_Q15, k,\n            psEncC->nStatesDelayedDecision, LTP_scale_Q14, Gains_Q16, pitchL, psIndices->signalType, decisionDelay );\n\n        silk_noise_shape_quantizer_del_dec( NSQ, psDelDec, psIndices->signalType, x_sc_Q10, pulses, pxq, sLTP_Q15,\n            delayedGain_Q10, A_Q12, B_Q14, AR_shp_Q13, lag, HarmShapeFIRPacked_Q14, Tilt_Q14[ k ], LF_shp_Q14[ k ],\n            Gains_Q16[ k ], Lambda_Q10, offset_Q10, psEncC->subfr_length, subfr++, psEncC->shapingLPCOrder,\n            psEncC->predictLPCOrder, psEncC->warping_Q16, psEncC->nStatesDelayedDecision, &smpl_buf_idx, decisionDelay );\n\n        x_Q3   += psEncC->subfr_length;\n        pulses += psEncC->subfr_length;\n        pxq    += psEncC->subfr_length;\n    }\n\n    /* Find winner */\n    RDmin_Q10 = psDelDec[ 0 ].RD_Q10;\n    Winner_ind = 0;\n    for( k = 1; k < psEncC->nStatesDelayedDecision; k++ ) {\n        if( psDelDec[ k ].RD_Q10 < RDmin_Q10 ) {\n            RDmin_Q10 = psDelDec[ k ].RD_Q10;\n            Winner_ind = k;\n        }\n    }\n\n    /* Copy final part of signals from winner state to output and long-term filter states */\n    psDD = &psDelDec[ Winner_ind ];\n    psIndices->Seed = psDD->SeedInit;\n    last_smple_idx = smpl_buf_idx + decisionDelay;\n    Gain_Q10 = silk_RSHIFT32( Gains_Q16[ psEncC->nb_subfr - 1 ], 6 );\n    for( i = 0; i < decisionDelay; i++ ) {\n        last_smple_idx = ( last_smple_idx - 1 ) & DECISION_DELAY_MASK;\n        pulses[   i - decisionDelay ] = (opus_int8)silk_RSHIFT_ROUND( psDD->Q_Q10[ last_smple_idx ], 10 );\n        pxq[ i - decisionDelay ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND(\n            silk_SMULWW( psDD->Xq_Q14[ last_smple_idx ], Gain_Q10 ), 8 ) );\n        NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - decisionDelay + i ] = psDD->Shape_Q14[ last_smple_idx ];\n    }\n    silk_memcpy( NSQ->sLPC_Q14, &psDD->sLPC_Q14[ psEncC->subfr_length ], NSQ_LPC_BUF_LENGTH * sizeof( opus_int32 ) );\n    silk_memcpy( NSQ->sAR2_Q14, psDD->sAR2_Q14, sizeof( psDD->sAR2_Q14 ) );\n\n    /* Update states */\n    NSQ->sLF_AR_shp_Q14 = psDD->LF_AR_Q14;\n    NSQ->lagPrev        = pitchL[ psEncC->nb_subfr - 1 ];\n\n    /* Save quantized speech signal */\n    /* DEBUG_STORE_DATA( enc.pcm, &NSQ->xq[psEncC->ltp_mem_length], psEncC->frame_length * sizeof( opus_int16 ) ) */\n    silk_memmove( NSQ->xq,           &NSQ->xq[           psEncC->frame_length ], psEncC->ltp_mem_length * sizeof( opus_int16 ) );\n    silk_memmove( NSQ->sLTP_shp_Q14, &NSQ->sLTP_shp_Q14[ psEncC->frame_length ], psEncC->ltp_mem_length * sizeof( opus_int32 ) );\n    RESTORE_STACK;\n}\n\n/******************************************/\n/* Noise shape quantizer for one subframe */\n/******************************************/\nstatic OPUS_INLINE void silk_noise_shape_quantizer_del_dec(\n    silk_nsq_state      *NSQ,                   /* I/O  NSQ state                           */\n    NSQ_del_dec_struct  psDelDec[],             /* I/O  Delayed decision states             */\n    opus_int            signalType,             /* I    Signal type                         */\n    const opus_int32    x_Q10[],                /* I                                        */\n    opus_int8           pulses[],               /* O                                        */\n    opus_int16          xq[],                   /* O                                        */\n    opus_int32          sLTP_Q15[],             /* I/O  LTP filter state                    */\n    opus_int32          delayedGain_Q10[],      /* I/O  Gain delay buffer                   */\n    const opus_int16    a_Q12[],                /* I    Short term prediction coefs         */\n    const opus_int16    b_Q14[],                /* I    Long term prediction coefs          */\n    const opus_int16    AR_shp_Q13[],           /* I    Noise shaping coefs                 */\n    opus_int            lag,                    /* I    Pitch lag                           */\n    opus_int32          HarmShapeFIRPacked_Q14, /* I                                        */\n    opus_int            Tilt_Q14,               /* I    Spectral tilt                       */\n    opus_int32          LF_shp_Q14,             /* I                                        */\n    opus_int32          Gain_Q16,               /* I                                        */\n    opus_int            Lambda_Q10,             /* I                                        */\n    opus_int            offset_Q10,             /* I                                        */\n    opus_int            length,                 /* I    Input length                        */\n    opus_int            subfr,                  /* I    Subframe number                     */\n    opus_int            shapingLPCOrder,        /* I    Shaping LPC filter order            */\n    opus_int            predictLPCOrder,        /* I    Prediction filter order             */\n    opus_int            warping_Q16,            /* I                                        */\n    opus_int            nStatesDelayedDecision, /* I    Number of states in decision tree   */\n    opus_int            *smpl_buf_idx,          /* I    Index to newest samples in buffers  */\n    opus_int            decisionDelay           /* I                                        */\n)\n{\n    opus_int     i, j, k, Winner_ind, RDmin_ind, RDmax_ind, last_smple_idx;\n    opus_int32   Winner_rand_state;\n    opus_int32   LTP_pred_Q14, LPC_pred_Q14, n_AR_Q14, n_LTP_Q14;\n    opus_int32   n_LF_Q14, r_Q10, rr_Q10, rd1_Q10, rd2_Q10, RDmin_Q10, RDmax_Q10;\n    opus_int32   q1_Q0, q1_Q10, q2_Q10, exc_Q14, LPC_exc_Q14, xq_Q14, Gain_Q10;\n    opus_int32   tmp1, tmp2, sLF_AR_shp_Q14;\n    opus_int32   *pred_lag_ptr, *shp_lag_ptr, *psLPC_Q14;\n    VARDECL( NSQ_sample_pair, psSampleState );\n    NSQ_del_dec_struct *psDD;\n    NSQ_sample_struct  *psSS;\n    SAVE_STACK;\n\n    silk_assert( nStatesDelayedDecision > 0 );\n    ALLOC( psSampleState, nStatesDelayedDecision, NSQ_sample_pair );\n\n    shp_lag_ptr  = &NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - lag + HARM_SHAPE_FIR_TAPS / 2 ];\n    pred_lag_ptr = &sLTP_Q15[ NSQ->sLTP_buf_idx - lag + LTP_ORDER / 2 ];\n    Gain_Q10     = silk_RSHIFT( Gain_Q16, 6 );\n\n    for( i = 0; i < length; i++ ) {\n        /* Perform common calculations used in all states */\n\n        /* Long-term prediction */\n        if( signalType == TYPE_VOICED ) {\n            /* Unrolled loop */\n            /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */\n            LTP_pred_Q14 = 2;\n            LTP_pred_Q14 = silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[  0 ], b_Q14[ 0 ] );\n            LTP_pred_Q14 = silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -1 ], b_Q14[ 1 ] );\n            LTP_pred_Q14 = silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -2 ], b_Q14[ 2 ] );\n            LTP_pred_Q14 = silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -3 ], b_Q14[ 3 ] );\n            LTP_pred_Q14 = silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -4 ], b_Q14[ 4 ] );\n            LTP_pred_Q14 = silk_LSHIFT( LTP_pred_Q14, 1 );                          /* Q13 -> Q14 */\n            pred_lag_ptr++;\n        } else {\n            LTP_pred_Q14 = 0;\n        }\n\n        /* Long-term shaping */\n        if( lag > 0 ) {\n            /* Symmetric, packed FIR coefficients */\n            n_LTP_Q14 = silk_SMULWB( silk_ADD32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 );\n            n_LTP_Q14 = silk_SMLAWT( n_LTP_Q14, shp_lag_ptr[ -1 ],                      HarmShapeFIRPacked_Q14 );\n            n_LTP_Q14 = silk_SUB_LSHIFT32( LTP_pred_Q14, n_LTP_Q14, 2 );            /* Q12 -> Q14 */\n            shp_lag_ptr++;\n        } else {\n            n_LTP_Q14 = 0;\n        }\n\n        for( k = 0; k < nStatesDelayedDecision; k++ ) {\n            /* Delayed decision state */\n            psDD = &psDelDec[ k ];\n\n            /* Sample state */\n            psSS = psSampleState[ k ];\n\n            /* Generate dither */\n            psDD->Seed = silk_RAND( psDD->Seed );\n\n            /* Pointer used in short term prediction and shaping */\n            psLPC_Q14 = &psDD->sLPC_Q14[ NSQ_LPC_BUF_LENGTH - 1 + i ];\n            /* Short-term prediction */\n            silk_assert( predictLPCOrder == 10 || predictLPCOrder == 16 );\n            /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */\n            LPC_pred_Q14 = silk_RSHIFT( predictLPCOrder, 1 );\n            LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[  0 ], a_Q12[ 0 ] );\n            LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -1 ], a_Q12[ 1 ] );\n            LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -2 ], a_Q12[ 2 ] );\n            LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -3 ], a_Q12[ 3 ] );\n            LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -4 ], a_Q12[ 4 ] );\n            LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -5 ], a_Q12[ 5 ] );\n            LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -6 ], a_Q12[ 6 ] );\n            LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -7 ], a_Q12[ 7 ] );\n            LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -8 ], a_Q12[ 8 ] );\n            LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -9 ], a_Q12[ 9 ] );\n            if( predictLPCOrder == 16 ) {\n                LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -10 ], a_Q12[ 10 ] );\n                LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -11 ], a_Q12[ 11 ] );\n                LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -12 ], a_Q12[ 12 ] );\n                LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -13 ], a_Q12[ 13 ] );\n                LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -14 ], a_Q12[ 14 ] );\n                LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -15 ], a_Q12[ 15 ] );\n            }\n            LPC_pred_Q14 = silk_LSHIFT( LPC_pred_Q14, 4 );                              /* Q10 -> Q14 */\n\n            /* Noise shape feedback */\n            silk_assert( ( shapingLPCOrder & 1 ) == 0 );   /* check that order is even */\n            /* Output of lowpass section */\n            tmp2 = silk_SMLAWB( psLPC_Q14[ 0 ], psDD->sAR2_Q14[ 0 ], warping_Q16 );\n            /* Output of allpass section */\n            tmp1 = silk_SMLAWB( psDD->sAR2_Q14[ 0 ], psDD->sAR2_Q14[ 1 ] - tmp2, warping_Q16 );\n            psDD->sAR2_Q14[ 0 ] = tmp2;\n            n_AR_Q14 = silk_RSHIFT( shapingLPCOrder, 1 );\n            n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ 0 ] );\n            /* Loop over allpass sections */\n            for( j = 2; j < shapingLPCOrder; j += 2 ) {\n                /* Output of allpass section */\n                tmp2 = silk_SMLAWB( psDD->sAR2_Q14[ j - 1 ], psDD->sAR2_Q14[ j + 0 ] - tmp1, warping_Q16 );\n                psDD->sAR2_Q14[ j - 1 ] = tmp1;\n                n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ j - 1 ] );\n                /* Output of allpass section */\n                tmp1 = silk_SMLAWB( psDD->sAR2_Q14[ j + 0 ], psDD->sAR2_Q14[ j + 1 ] - tmp2, warping_Q16 );\n                psDD->sAR2_Q14[ j + 0 ] = tmp2;\n                n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ j ] );\n            }\n            psDD->sAR2_Q14[ shapingLPCOrder - 1 ] = tmp1;\n            n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ shapingLPCOrder - 1 ] );\n\n            n_AR_Q14 = silk_LSHIFT( n_AR_Q14, 1 );                                      /* Q11 -> Q12 */\n            n_AR_Q14 = silk_SMLAWB( n_AR_Q14, psDD->LF_AR_Q14, Tilt_Q14 );              /* Q12 */\n            n_AR_Q14 = silk_LSHIFT( n_AR_Q14, 2 );                                      /* Q12 -> Q14 */\n\n            n_LF_Q14 = silk_SMULWB( psDD->Shape_Q14[ *smpl_buf_idx ], LF_shp_Q14 );     /* Q12 */\n            n_LF_Q14 = silk_SMLAWT( n_LF_Q14, psDD->LF_AR_Q14, LF_shp_Q14 );            /* Q12 */\n            n_LF_Q14 = silk_LSHIFT( n_LF_Q14, 2 );                                      /* Q12 -> Q14 */\n\n            /* Input minus prediction plus noise feedback                       */\n            /* r = x[ i ] - LTP_pred - LPC_pred + n_AR + n_Tilt + n_LF + n_LTP  */\n            tmp1 = silk_ADD32( n_AR_Q14, n_LF_Q14 );                                    /* Q14 */\n            tmp2 = silk_ADD32( n_LTP_Q14, LPC_pred_Q14 );                               /* Q13 */\n            tmp1 = silk_SUB32( tmp2, tmp1 );                                            /* Q13 */\n            tmp1 = silk_RSHIFT_ROUND( tmp1, 4 );                                        /* Q10 */\n\n            r_Q10 = silk_SUB32( x_Q10[ i ], tmp1 );                                     /* residual error Q10 */\n\n            /* Flip sign depending on dither */\n            if ( psDD->Seed < 0 ) {\n                r_Q10 = -r_Q10;\n            }\n            r_Q10 = silk_LIMIT_32( r_Q10, -(31 << 10), 30 << 10 );\n\n            /* Find two quantization level candidates and measure their rate-distortion */\n            q1_Q10 = silk_SUB32( r_Q10, offset_Q10 );\n            q1_Q0 = silk_RSHIFT( q1_Q10, 10 );\n            if( q1_Q0 > 0 ) {\n                q1_Q10  = silk_SUB32( silk_LSHIFT( q1_Q0, 10 ), QUANT_LEVEL_ADJUST_Q10 );\n                q1_Q10  = silk_ADD32( q1_Q10, offset_Q10 );\n                q2_Q10  = silk_ADD32( q1_Q10, 1024 );\n                rd1_Q10 = silk_SMULBB( q1_Q10, Lambda_Q10 );\n                rd2_Q10 = silk_SMULBB( q2_Q10, Lambda_Q10 );\n            } else if( q1_Q0 == 0 ) {\n                q1_Q10  = offset_Q10;\n                q2_Q10  = silk_ADD32( q1_Q10, 1024 - QUANT_LEVEL_ADJUST_Q10 );\n                rd1_Q10 = silk_SMULBB( q1_Q10, Lambda_Q10 );\n                rd2_Q10 = silk_SMULBB( q2_Q10, Lambda_Q10 );\n            } else if( q1_Q0 == -1 ) {\n                q2_Q10  = offset_Q10;\n                q1_Q10  = silk_SUB32( q2_Q10, 1024 - QUANT_LEVEL_ADJUST_Q10 );\n                rd1_Q10 = silk_SMULBB( -q1_Q10, Lambda_Q10 );\n                rd2_Q10 = silk_SMULBB(  q2_Q10, Lambda_Q10 );\n            } else {            /* q1_Q0 < -1 */\n                q1_Q10  = silk_ADD32( silk_LSHIFT( q1_Q0, 10 ), QUANT_LEVEL_ADJUST_Q10 );\n                q1_Q10  = silk_ADD32( q1_Q10, offset_Q10 );\n                q2_Q10  = silk_ADD32( q1_Q10, 1024 );\n                rd1_Q10 = silk_SMULBB( -q1_Q10, Lambda_Q10 );\n                rd2_Q10 = silk_SMULBB( -q2_Q10, Lambda_Q10 );\n            }\n            rr_Q10  = silk_SUB32( r_Q10, q1_Q10 );\n            rd1_Q10 = silk_RSHIFT( silk_SMLABB( rd1_Q10, rr_Q10, rr_Q10 ), 10 );\n            rr_Q10  = silk_SUB32( r_Q10, q2_Q10 );\n            rd2_Q10 = silk_RSHIFT( silk_SMLABB( rd2_Q10, rr_Q10, rr_Q10 ), 10 );\n\n            if( rd1_Q10 < rd2_Q10 ) {\n                psSS[ 0 ].RD_Q10 = silk_ADD32( psDD->RD_Q10, rd1_Q10 );\n                psSS[ 1 ].RD_Q10 = silk_ADD32( psDD->RD_Q10, rd2_Q10 );\n                psSS[ 0 ].Q_Q10  = q1_Q10;\n                psSS[ 1 ].Q_Q10  = q2_Q10;\n            } else {\n                psSS[ 0 ].RD_Q10 = silk_ADD32( psDD->RD_Q10, rd2_Q10 );\n                psSS[ 1 ].RD_Q10 = silk_ADD32( psDD->RD_Q10, rd1_Q10 );\n                psSS[ 0 ].Q_Q10  = q2_Q10;\n                psSS[ 1 ].Q_Q10  = q1_Q10;\n            }\n\n            /* Update states for best quantization */\n\n            /* Quantized excitation */\n            exc_Q14 = silk_LSHIFT32( psSS[ 0 ].Q_Q10, 4 );\n            if ( psDD->Seed < 0 ) {\n                exc_Q14 = -exc_Q14;\n            }\n\n            /* Add predictions */\n            LPC_exc_Q14 = silk_ADD32( exc_Q14, LTP_pred_Q14 );\n            xq_Q14      = silk_ADD32( LPC_exc_Q14, LPC_pred_Q14 );\n\n            /* Update states */\n            sLF_AR_shp_Q14         = silk_SUB32( xq_Q14, n_AR_Q14 );\n            psSS[ 0 ].sLTP_shp_Q14 = silk_SUB32( sLF_AR_shp_Q14, n_LF_Q14 );\n            psSS[ 0 ].LF_AR_Q14    = sLF_AR_shp_Q14;\n            psSS[ 0 ].LPC_exc_Q14  = LPC_exc_Q14;\n            psSS[ 0 ].xq_Q14       = xq_Q14;\n\n            /* Update states for second best quantization */\n\n            /* Quantized excitation */\n            exc_Q14 = silk_LSHIFT32( psSS[ 1 ].Q_Q10, 4 );\n            if ( psDD->Seed < 0 ) {\n                exc_Q14 = -exc_Q14;\n            }\n\n\n            /* Add predictions */\n            LPC_exc_Q14 = silk_ADD32( exc_Q14, LTP_pred_Q14 );\n            xq_Q14      = silk_ADD32( LPC_exc_Q14, LPC_pred_Q14 );\n\n            /* Update states */\n            sLF_AR_shp_Q14         = silk_SUB32( xq_Q14, n_AR_Q14 );\n            psSS[ 1 ].sLTP_shp_Q14 = silk_SUB32( sLF_AR_shp_Q14, n_LF_Q14 );\n            psSS[ 1 ].LF_AR_Q14    = sLF_AR_shp_Q14;\n            psSS[ 1 ].LPC_exc_Q14  = LPC_exc_Q14;\n            psSS[ 1 ].xq_Q14       = xq_Q14;\n        }\n\n        *smpl_buf_idx  = ( *smpl_buf_idx - 1 ) & DECISION_DELAY_MASK;                   /* Index to newest samples              */\n        last_smple_idx = ( *smpl_buf_idx + decisionDelay ) & DECISION_DELAY_MASK;       /* Index to decisionDelay old samples   */\n\n        /* Find winner */\n        RDmin_Q10 = psSampleState[ 0 ][ 0 ].RD_Q10;\n        Winner_ind = 0;\n        for( k = 1; k < nStatesDelayedDecision; k++ ) {\n            if( psSampleState[ k ][ 0 ].RD_Q10 < RDmin_Q10 ) {\n                RDmin_Q10  = psSampleState[ k ][ 0 ].RD_Q10;\n                Winner_ind = k;\n            }\n        }\n\n        /* Increase RD values of expired states */\n        Winner_rand_state = psDelDec[ Winner_ind ].RandState[ last_smple_idx ];\n        for( k = 0; k < nStatesDelayedDecision; k++ ) {\n            if( psDelDec[ k ].RandState[ last_smple_idx ] != Winner_rand_state ) {\n                psSampleState[ k ][ 0 ].RD_Q10 = silk_ADD32( psSampleState[ k ][ 0 ].RD_Q10, silk_int32_MAX >> 4 );\n                psSampleState[ k ][ 1 ].RD_Q10 = silk_ADD32( psSampleState[ k ][ 1 ].RD_Q10, silk_int32_MAX >> 4 );\n                silk_assert( psSampleState[ k ][ 0 ].RD_Q10 >= 0 );\n            }\n        }\n\n        /* Find worst in first set and best in second set */\n        RDmax_Q10  = psSampleState[ 0 ][ 0 ].RD_Q10;\n        RDmin_Q10  = psSampleState[ 0 ][ 1 ].RD_Q10;\n        RDmax_ind = 0;\n        RDmin_ind = 0;\n        for( k = 1; k < nStatesDelayedDecision; k++ ) {\n            /* find worst in first set */\n            if( psSampleState[ k ][ 0 ].RD_Q10 > RDmax_Q10 ) {\n                RDmax_Q10  = psSampleState[ k ][ 0 ].RD_Q10;\n                RDmax_ind = k;\n            }\n            /* find best in second set */\n            if( psSampleState[ k ][ 1 ].RD_Q10 < RDmin_Q10 ) {\n                RDmin_Q10  = psSampleState[ k ][ 1 ].RD_Q10;\n                RDmin_ind = k;\n            }\n        }\n\n        /* Replace a state if best from second set outperforms worst in first set */\n        if( RDmin_Q10 < RDmax_Q10 ) {\n            silk_memcpy( ( (opus_int32 *)&psDelDec[ RDmax_ind ] ) + i,\n                         ( (opus_int32 *)&psDelDec[ RDmin_ind ] ) + i, sizeof( NSQ_del_dec_struct ) - i * sizeof( opus_int32) );\n            silk_memcpy( &psSampleState[ RDmax_ind ][ 0 ], &psSampleState[ RDmin_ind ][ 1 ], sizeof( NSQ_sample_struct ) );\n        }\n\n        /* Write samples from winner to output and long-term filter states */\n        psDD = &psDelDec[ Winner_ind ];\n        if( subfr > 0 || i >= decisionDelay ) {\n            pulses[  i - decisionDelay ] = (opus_int8)silk_RSHIFT_ROUND( psDD->Q_Q10[ last_smple_idx ], 10 );\n            xq[ i - decisionDelay ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND(\n                silk_SMULWW( psDD->Xq_Q14[ last_smple_idx ], delayedGain_Q10[ last_smple_idx ] ), 8 ) );\n            NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - decisionDelay ] = psDD->Shape_Q14[ last_smple_idx ];\n            sLTP_Q15[          NSQ->sLTP_buf_idx     - decisionDelay ] = psDD->Pred_Q15[  last_smple_idx ];\n        }\n        NSQ->sLTP_shp_buf_idx++;\n        NSQ->sLTP_buf_idx++;\n\n        /* Update states */\n        for( k = 0; k < nStatesDelayedDecision; k++ ) {\n            psDD                                     = &psDelDec[ k ];\n            psSS                                     = &psSampleState[ k ][ 0 ];\n            psDD->LF_AR_Q14                          = psSS->LF_AR_Q14;\n            psDD->sLPC_Q14[ NSQ_LPC_BUF_LENGTH + i ] = psSS->xq_Q14;\n            psDD->Xq_Q14[    *smpl_buf_idx ]         = psSS->xq_Q14;\n            psDD->Q_Q10[     *smpl_buf_idx ]         = psSS->Q_Q10;\n            psDD->Pred_Q15[  *smpl_buf_idx ]         = silk_LSHIFT32( psSS->LPC_exc_Q14, 1 );\n            psDD->Shape_Q14[ *smpl_buf_idx ]         = psSS->sLTP_shp_Q14;\n            psDD->Seed                               = silk_ADD32_ovflw( psDD->Seed, silk_RSHIFT_ROUND( psSS->Q_Q10, 10 ) );\n            psDD->RandState[ *smpl_buf_idx ]         = psDD->Seed;\n            psDD->RD_Q10                             = psSS->RD_Q10;\n        }\n        delayedGain_Q10[     *smpl_buf_idx ]         = Gain_Q10;\n    }\n    /* Update LPC states */\n    for( k = 0; k < nStatesDelayedDecision; k++ ) {\n        psDD = &psDelDec[ k ];\n        silk_memcpy( psDD->sLPC_Q14, &psDD->sLPC_Q14[ length ], NSQ_LPC_BUF_LENGTH * sizeof( opus_int32 ) );\n    }\n    RESTORE_STACK;\n}\n\nstatic OPUS_INLINE void silk_nsq_del_dec_scale_states(\n    const silk_encoder_state *psEncC,               /* I    Encoder State                       */\n    silk_nsq_state      *NSQ,                       /* I/O  NSQ state                           */\n    NSQ_del_dec_struct  psDelDec[],                 /* I/O  Delayed decision states             */\n    const opus_int32    x_Q3[],                     /* I    Input in Q3                         */\n    opus_int32          x_sc_Q10[],                 /* O    Input scaled with 1/Gain in Q10     */\n    const opus_int16    sLTP[],                     /* I    Re-whitened LTP state in Q0         */\n    opus_int32          sLTP_Q15[],                 /* O    LTP state matching scaled input     */\n    opus_int            subfr,                      /* I    Subframe number                     */\n    opus_int            nStatesDelayedDecision,     /* I    Number of del dec states            */\n    const opus_int      LTP_scale_Q14,              /* I    LTP state scaling                   */\n    const opus_int32    Gains_Q16[ MAX_NB_SUBFR ],  /* I                                        */\n    const opus_int      pitchL[ MAX_NB_SUBFR ],     /* I    Pitch lag                           */\n    const opus_int      signal_type,                /* I    Signal type                         */\n    const opus_int      decisionDelay               /* I    Decision delay                      */\n)\n{\n    opus_int            i, k, lag;\n    opus_int32          gain_adj_Q16, inv_gain_Q31, inv_gain_Q23;\n    NSQ_del_dec_struct  *psDD;\n\n    lag          = pitchL[ subfr ];\n    inv_gain_Q31 = silk_INVERSE32_varQ( silk_max( Gains_Q16[ subfr ], 1 ), 47 );\n    silk_assert( inv_gain_Q31 != 0 );\n\n    /* Calculate gain adjustment factor */\n    if( Gains_Q16[ subfr ] != NSQ->prev_gain_Q16 ) {\n        gain_adj_Q16 =  silk_DIV32_varQ( NSQ->prev_gain_Q16, Gains_Q16[ subfr ], 16 );\n    } else {\n        gain_adj_Q16 = (opus_int32)1 << 16;\n    }\n\n    /* Scale input */\n    inv_gain_Q23 = silk_RSHIFT_ROUND( inv_gain_Q31, 8 );\n    for( i = 0; i < psEncC->subfr_length; i++ ) {\n        x_sc_Q10[ i ] = silk_SMULWW( x_Q3[ i ], inv_gain_Q23 );\n    }\n\n    /* Save inverse gain */\n    NSQ->prev_gain_Q16 = Gains_Q16[ subfr ];\n\n    /* After rewhitening the LTP state is un-scaled, so scale with inv_gain_Q16 */\n    if( NSQ->rewhite_flag ) {\n        if( subfr == 0 ) {\n            /* Do LTP downscaling */\n            inv_gain_Q31 = silk_LSHIFT( silk_SMULWB( inv_gain_Q31, LTP_scale_Q14 ), 2 );\n        }\n        for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) {\n            silk_assert( i < MAX_FRAME_LENGTH );\n            sLTP_Q15[ i ] = silk_SMULWB( inv_gain_Q31, sLTP[ i ] );\n        }\n    }\n\n    /* Adjust for changing gain */\n    if( gain_adj_Q16 != (opus_int32)1 << 16 ) {\n        /* Scale long-term shaping state */\n        for( i = NSQ->sLTP_shp_buf_idx - psEncC->ltp_mem_length; i < NSQ->sLTP_shp_buf_idx; i++ ) {\n            NSQ->sLTP_shp_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q14[ i ] );\n        }\n\n        /* Scale long-term prediction state */\n        if( signal_type == TYPE_VOICED && NSQ->rewhite_flag == 0 ) {\n            for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx - decisionDelay; i++ ) {\n                sLTP_Q15[ i ] = silk_SMULWW( gain_adj_Q16, sLTP_Q15[ i ] );\n            }\n        }\n\n        for( k = 0; k < nStatesDelayedDecision; k++ ) {\n            psDD = &psDelDec[ k ];\n\n            /* Scale scalar states */\n            psDD->LF_AR_Q14 = silk_SMULWW( gain_adj_Q16, psDD->LF_AR_Q14 );\n\n            /* Scale short-term prediction and shaping states */\n            for( i = 0; i < NSQ_LPC_BUF_LENGTH; i++ ) {\n                psDD->sLPC_Q14[ i ] = silk_SMULWW( gain_adj_Q16, psDD->sLPC_Q14[ i ] );\n            }\n            for( i = 0; i < MAX_SHAPE_LPC_ORDER; i++ ) {\n                psDD->sAR2_Q14[ i ] = silk_SMULWW( gain_adj_Q16, psDD->sAR2_Q14[ i ] );\n            }\n            for( i = 0; i < DECISION_DELAY; i++ ) {\n                psDD->Pred_Q15[  i ] = silk_SMULWW( gain_adj_Q16, psDD->Pred_Q15[  i ] );\n                psDD->Shape_Q14[ i ] = silk_SMULWW( gain_adj_Q16, psDD->Shape_Q14[ i ] );\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/PLC.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"stack_alloc.h\"\n#include \"PLC.h\"\n\n#define NB_ATT 2\nstatic const opus_int16 HARM_ATT_Q15[NB_ATT]              = { 32440, 31130 }; /* 0.99, 0.95 */\nstatic const opus_int16 PLC_RAND_ATTENUATE_V_Q15[NB_ATT]  = { 31130, 26214 }; /* 0.95, 0.8 */\nstatic const opus_int16 PLC_RAND_ATTENUATE_UV_Q15[NB_ATT] = { 32440, 29491 }; /* 0.99, 0.9 */\n\nstatic OPUS_INLINE void silk_PLC_update(\n    silk_decoder_state                  *psDec,             /* I/O Decoder state        */\n    silk_decoder_control                *psDecCtrl          /* I/O Decoder control      */\n);\n\nstatic OPUS_INLINE void silk_PLC_conceal(\n    silk_decoder_state                  *psDec,             /* I/O Decoder state        */\n    silk_decoder_control                *psDecCtrl,         /* I/O Decoder control      */\n    opus_int16                          frame[]             /* O LPC residual signal    */\n);\n\n\nvoid silk_PLC_Reset(\n    silk_decoder_state                  *psDec              /* I/O Decoder state        */\n)\n{\n    psDec->sPLC.pitchL_Q8 = silk_LSHIFT( psDec->frame_length, 8 - 1 );\n    psDec->sPLC.prevGain_Q16[ 0 ] = SILK_FIX_CONST( 1, 16 );\n    psDec->sPLC.prevGain_Q16[ 1 ] = SILK_FIX_CONST( 1, 16 );\n    psDec->sPLC.subfr_length = 20;\n    psDec->sPLC.nb_subfr = 2;\n}\n\nvoid silk_PLC(\n    silk_decoder_state                  *psDec,             /* I/O Decoder state        */\n    silk_decoder_control                *psDecCtrl,         /* I/O Decoder control      */\n    opus_int16                          frame[],            /* I/O  signal              */\n    opus_int                            lost                /* I Loss flag              */\n)\n{\n    /* PLC control function */\n    if( psDec->fs_kHz != psDec->sPLC.fs_kHz ) {\n        silk_PLC_Reset( psDec );\n        psDec->sPLC.fs_kHz = psDec->fs_kHz;\n    }\n\n    if( lost ) {\n        /****************************/\n        /* Generate Signal          */\n        /****************************/\n        silk_PLC_conceal( psDec, psDecCtrl, frame );\n\n        psDec->lossCnt++;\n    } else {\n        /****************************/\n        /* Update state             */\n        /****************************/\n        silk_PLC_update( psDec, psDecCtrl );\n    }\n}\n\n/**************************************************/\n/* Update state of PLC                            */\n/**************************************************/\nstatic OPUS_INLINE void silk_PLC_update(\n    silk_decoder_state                  *psDec,             /* I/O Decoder state        */\n    silk_decoder_control                *psDecCtrl          /* I/O Decoder control      */\n)\n{\n    opus_int32 LTP_Gain_Q14, temp_LTP_Gain_Q14;\n    opus_int   i, j;\n    silk_PLC_struct *psPLC;\n\n    psPLC = &psDec->sPLC;\n\n    /* Update parameters used in case of packet loss */\n    psDec->prevSignalType = psDec->indices.signalType;\n    LTP_Gain_Q14 = 0;\n    if( psDec->indices.signalType == TYPE_VOICED ) {\n        /* Find the parameters for the last subframe which contains a pitch pulse */\n        for( j = 0; j * psDec->subfr_length < psDecCtrl->pitchL[ psDec->nb_subfr - 1 ]; j++ ) {\n            if( j == psDec->nb_subfr ) {\n                break;\n            }\n            temp_LTP_Gain_Q14 = 0;\n            for( i = 0; i < LTP_ORDER; i++ ) {\n                temp_LTP_Gain_Q14 += psDecCtrl->LTPCoef_Q14[ ( psDec->nb_subfr - 1 - j ) * LTP_ORDER  + i ];\n            }\n            if( temp_LTP_Gain_Q14 > LTP_Gain_Q14 ) {\n                LTP_Gain_Q14 = temp_LTP_Gain_Q14;\n                silk_memcpy( psPLC->LTPCoef_Q14,\n                    &psDecCtrl->LTPCoef_Q14[ silk_SMULBB( psDec->nb_subfr - 1 - j, LTP_ORDER ) ],\n                    LTP_ORDER * sizeof( opus_int16 ) );\n\n                psPLC->pitchL_Q8 = silk_LSHIFT( psDecCtrl->pitchL[ psDec->nb_subfr - 1 - j ], 8 );\n            }\n        }\n\n        silk_memset( psPLC->LTPCoef_Q14, 0, LTP_ORDER * sizeof( opus_int16 ) );\n        psPLC->LTPCoef_Q14[ LTP_ORDER / 2 ] = LTP_Gain_Q14;\n\n        /* Limit LT coefs */\n        if( LTP_Gain_Q14 < V_PITCH_GAIN_START_MIN_Q14 ) {\n            opus_int   scale_Q10;\n            opus_int32 tmp;\n\n            tmp = silk_LSHIFT( V_PITCH_GAIN_START_MIN_Q14, 10 );\n            scale_Q10 = silk_DIV32( tmp, silk_max( LTP_Gain_Q14, 1 ) );\n            for( i = 0; i < LTP_ORDER; i++ ) {\n                psPLC->LTPCoef_Q14[ i ] = silk_RSHIFT( silk_SMULBB( psPLC->LTPCoef_Q14[ i ], scale_Q10 ), 10 );\n            }\n        } else if( LTP_Gain_Q14 > V_PITCH_GAIN_START_MAX_Q14 ) {\n            opus_int   scale_Q14;\n            opus_int32 tmp;\n\n            tmp = silk_LSHIFT( V_PITCH_GAIN_START_MAX_Q14, 14 );\n            scale_Q14 = silk_DIV32( tmp, silk_max( LTP_Gain_Q14, 1 ) );\n            for( i = 0; i < LTP_ORDER; i++ ) {\n                psPLC->LTPCoef_Q14[ i ] = silk_RSHIFT( silk_SMULBB( psPLC->LTPCoef_Q14[ i ], scale_Q14 ), 14 );\n            }\n        }\n    } else {\n        psPLC->pitchL_Q8 = silk_LSHIFT( silk_SMULBB( psDec->fs_kHz, 18 ), 8 );\n        silk_memset( psPLC->LTPCoef_Q14, 0, LTP_ORDER * sizeof( opus_int16 ));\n    }\n\n    /* Save LPC coeficients */\n    silk_memcpy( psPLC->prevLPC_Q12, psDecCtrl->PredCoef_Q12[ 1 ], psDec->LPC_order * sizeof( opus_int16 ) );\n    psPLC->prevLTP_scale_Q14 = psDecCtrl->LTP_scale_Q14;\n\n    /* Save last two gains */\n    silk_memcpy( psPLC->prevGain_Q16, &psDecCtrl->Gains_Q16[ psDec->nb_subfr - 2 ], 2 * sizeof( opus_int32 ) );\n\n    psPLC->subfr_length = psDec->subfr_length;\n    psPLC->nb_subfr = psDec->nb_subfr;\n}\n\nstatic OPUS_INLINE void silk_PLC_conceal(\n    silk_decoder_state                  *psDec,             /* I/O Decoder state        */\n    silk_decoder_control                *psDecCtrl,         /* I/O Decoder control      */\n    opus_int16                          frame[]             /* O LPC residual signal    */\n)\n{\n    opus_int   i, j, k;\n    opus_int   lag, idx, sLTP_buf_idx, shift1, shift2;\n    opus_int32 rand_seed, harm_Gain_Q15, rand_Gain_Q15, inv_gain_Q30;\n    opus_int32 energy1, energy2, *rand_ptr, *pred_lag_ptr;\n    opus_int32 LPC_pred_Q10, LTP_pred_Q12;\n    opus_int16 rand_scale_Q14;\n    opus_int16 *B_Q14, *exc_buf_ptr;\n    opus_int32 *sLPC_Q14_ptr;\n    VARDECL( opus_int16, exc_buf );\n    opus_int16 A_Q12[ MAX_LPC_ORDER ];\n    VARDECL( opus_int16, sLTP );\n    VARDECL( opus_int32, sLTP_Q14 );\n    silk_PLC_struct *psPLC = &psDec->sPLC;\n    opus_int32 prevGain_Q10[2];\n    SAVE_STACK;\n\n    ALLOC( exc_buf, 2*psPLC->subfr_length, opus_int16 );\n    ALLOC( sLTP, psDec->ltp_mem_length, opus_int16 );\n    ALLOC( sLTP_Q14, psDec->ltp_mem_length + psDec->frame_length, opus_int32 );\n\n    prevGain_Q10[0] = silk_RSHIFT( psPLC->prevGain_Q16[ 0 ], 6);\n    prevGain_Q10[1] = silk_RSHIFT( psPLC->prevGain_Q16[ 1 ], 6);\n\n    if( psDec->first_frame_after_reset ) {\n       silk_memset( psPLC->prevLPC_Q12, 0, sizeof( psPLC->prevLPC_Q12 ) );\n    }\n\n    /* Find random noise component */\n    /* Scale previous excitation signal */\n    exc_buf_ptr = exc_buf;\n    for( k = 0; k < 2; k++ ) {\n        for( i = 0; i < psPLC->subfr_length; i++ ) {\n            exc_buf_ptr[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT(\n                silk_SMULWW( psDec->exc_Q14[ i + ( k + psPLC->nb_subfr - 2 ) * psPLC->subfr_length ], prevGain_Q10[ k ] ), 8 ) );\n        }\n        exc_buf_ptr += psPLC->subfr_length;\n    }\n    /* Find the subframe with lowest energy of the last two and use that as random noise generator */\n    silk_sum_sqr_shift( &energy1, &shift1, exc_buf,                         psPLC->subfr_length );\n    silk_sum_sqr_shift( &energy2, &shift2, &exc_buf[ psPLC->subfr_length ], psPLC->subfr_length );\n\n    if( silk_RSHIFT( energy1, shift2 ) < silk_RSHIFT( energy2, shift1 ) ) {\n        /* First sub-frame has lowest energy */\n        rand_ptr = &psDec->exc_Q14[ silk_max_int( 0, ( psPLC->nb_subfr - 1 ) * psPLC->subfr_length - RAND_BUF_SIZE ) ];\n    } else {\n        /* Second sub-frame has lowest energy */\n        rand_ptr = &psDec->exc_Q14[ silk_max_int( 0, psPLC->nb_subfr * psPLC->subfr_length - RAND_BUF_SIZE ) ];\n    }\n\n    /* Set up Gain to random noise component */\n    B_Q14          = psPLC->LTPCoef_Q14;\n    rand_scale_Q14 = psPLC->randScale_Q14;\n\n    /* Set up attenuation gains */\n    harm_Gain_Q15 = HARM_ATT_Q15[ silk_min_int( NB_ATT - 1, psDec->lossCnt ) ];\n    if( psDec->prevSignalType == TYPE_VOICED ) {\n        rand_Gain_Q15 = PLC_RAND_ATTENUATE_V_Q15[  silk_min_int( NB_ATT - 1, psDec->lossCnt ) ];\n    } else {\n        rand_Gain_Q15 = PLC_RAND_ATTENUATE_UV_Q15[ silk_min_int( NB_ATT - 1, psDec->lossCnt ) ];\n    }\n\n    /* LPC concealment. Apply BWE to previous LPC */\n    silk_bwexpander( psPLC->prevLPC_Q12, psDec->LPC_order, SILK_FIX_CONST( BWE_COEF, 16 ) );\n\n    /* Preload LPC coeficients to array on stack. Gives small performance gain */\n    silk_memcpy( A_Q12, psPLC->prevLPC_Q12, psDec->LPC_order * sizeof( opus_int16 ) );\n\n    /* First Lost frame */\n    if( psDec->lossCnt == 0 ) {\n        rand_scale_Q14 = 1 << 14;\n\n        /* Reduce random noise Gain for voiced frames */\n        if( psDec->prevSignalType == TYPE_VOICED ) {\n            for( i = 0; i < LTP_ORDER; i++ ) {\n                rand_scale_Q14 -= B_Q14[ i ];\n            }\n            rand_scale_Q14 = silk_max_16( 3277, rand_scale_Q14 ); /* 0.2 */\n            rand_scale_Q14 = (opus_int16)silk_RSHIFT( silk_SMULBB( rand_scale_Q14, psPLC->prevLTP_scale_Q14 ), 14 );\n        } else {\n            /* Reduce random noise for unvoiced frames with high LPC gain */\n            opus_int32 invGain_Q30, down_scale_Q30;\n\n            invGain_Q30 = silk_LPC_inverse_pred_gain( psPLC->prevLPC_Q12, psDec->LPC_order );\n\n            down_scale_Q30 = silk_min_32( silk_RSHIFT( (opus_int32)1 << 30, LOG2_INV_LPC_GAIN_HIGH_THRES ), invGain_Q30 );\n            down_scale_Q30 = silk_max_32( silk_RSHIFT( (opus_int32)1 << 30, LOG2_INV_LPC_GAIN_LOW_THRES ), down_scale_Q30 );\n            down_scale_Q30 = silk_LSHIFT( down_scale_Q30, LOG2_INV_LPC_GAIN_HIGH_THRES );\n\n            rand_Gain_Q15 = silk_RSHIFT( silk_SMULWB( down_scale_Q30, rand_Gain_Q15 ), 14 );\n        }\n    }\n\n    rand_seed    = psPLC->rand_seed;\n    lag          = silk_RSHIFT_ROUND( psPLC->pitchL_Q8, 8 );\n    sLTP_buf_idx = psDec->ltp_mem_length;\n\n    /* Rewhiten LTP state */\n    idx = psDec->ltp_mem_length - lag - psDec->LPC_order - LTP_ORDER / 2;\n    silk_assert( idx > 0 );\n    silk_LPC_analysis_filter( &sLTP[ idx ], &psDec->outBuf[ idx ], A_Q12, psDec->ltp_mem_length - idx, psDec->LPC_order );\n    /* Scale LTP state */\n    inv_gain_Q30 = silk_INVERSE32_varQ( psPLC->prevGain_Q16[ 1 ], 46 );\n    inv_gain_Q30 = silk_min( inv_gain_Q30, silk_int32_MAX >> 1 );\n    for( i = idx + psDec->LPC_order; i < psDec->ltp_mem_length; i++ ) {\n        sLTP_Q14[ i ] = silk_SMULWB( inv_gain_Q30, sLTP[ i ] );\n    }\n\n    /***************************/\n    /* LTP synthesis filtering */\n    /***************************/\n    for( k = 0; k < psDec->nb_subfr; k++ ) {\n        /* Set up pointer */\n        pred_lag_ptr = &sLTP_Q14[ sLTP_buf_idx - lag + LTP_ORDER / 2 ];\n        for( i = 0; i < psDec->subfr_length; i++ ) {\n            /* Unrolled loop */\n            /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */\n            LTP_pred_Q12 = 2;\n            LTP_pred_Q12 = silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[  0 ], B_Q14[ 0 ] );\n            LTP_pred_Q12 = silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -1 ], B_Q14[ 1 ] );\n            LTP_pred_Q12 = silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -2 ], B_Q14[ 2 ] );\n            LTP_pred_Q12 = silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -3 ], B_Q14[ 3 ] );\n            LTP_pred_Q12 = silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -4 ], B_Q14[ 4 ] );\n            pred_lag_ptr++;\n\n            /* Generate LPC excitation */\n            rand_seed = silk_RAND( rand_seed );\n            idx = silk_RSHIFT( rand_seed, 25 ) & RAND_BUF_MASK;\n            sLTP_Q14[ sLTP_buf_idx ] = silk_LSHIFT32( silk_SMLAWB( LTP_pred_Q12, rand_ptr[ idx ], rand_scale_Q14 ), 2 );\n            sLTP_buf_idx++;\n        }\n\n        /* Gradually reduce LTP gain */\n        for( j = 0; j < LTP_ORDER; j++ ) {\n            B_Q14[ j ] = silk_RSHIFT( silk_SMULBB( harm_Gain_Q15, B_Q14[ j ] ), 15 );\n        }\n        /* Gradually reduce excitation gain */\n        rand_scale_Q14 = silk_RSHIFT( silk_SMULBB( rand_scale_Q14, rand_Gain_Q15 ), 15 );\n\n        /* Slowly increase pitch lag */\n        psPLC->pitchL_Q8 = silk_SMLAWB( psPLC->pitchL_Q8, psPLC->pitchL_Q8, PITCH_DRIFT_FAC_Q16 );\n        psPLC->pitchL_Q8 = silk_min_32( psPLC->pitchL_Q8, silk_LSHIFT( silk_SMULBB( MAX_PITCH_LAG_MS, psDec->fs_kHz ), 8 ) );\n        lag = silk_RSHIFT_ROUND( psPLC->pitchL_Q8, 8 );\n    }\n\n    /***************************/\n    /* LPC synthesis filtering */\n    /***************************/\n    sLPC_Q14_ptr = &sLTP_Q14[ psDec->ltp_mem_length - MAX_LPC_ORDER ];\n\n    /* Copy LPC state */\n    silk_memcpy( sLPC_Q14_ptr, psDec->sLPC_Q14_buf, MAX_LPC_ORDER * sizeof( opus_int32 ) );\n\n    silk_assert( psDec->LPC_order >= 10 ); /* check that unrolling works */\n    for( i = 0; i < psDec->frame_length; i++ ) {\n        /* partly unrolled */\n        /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */\n        LPC_pred_Q10 = silk_RSHIFT( psDec->LPC_order, 1 );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i -  1 ], A_Q12[ 0 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i -  2 ], A_Q12[ 1 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i -  3 ], A_Q12[ 2 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i -  4 ], A_Q12[ 3 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i -  5 ], A_Q12[ 4 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i -  6 ], A_Q12[ 5 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i -  7 ], A_Q12[ 6 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i -  8 ], A_Q12[ 7 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i -  9 ], A_Q12[ 8 ] );\n        LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 10 ], A_Q12[ 9 ] );\n        for( j = 10; j < psDec->LPC_order; j++ ) {\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - j - 1 ], A_Q12[ j ] );\n        }\n\n        /* Add prediction to LPC excitation */\n        sLPC_Q14_ptr[ MAX_LPC_ORDER + i ] = silk_ADD_LSHIFT32( sLPC_Q14_ptr[ MAX_LPC_ORDER + i ], LPC_pred_Q10, 4 );\n\n        /* Scale with Gain */\n        frame[ i ] = (opus_int16)silk_SAT16( silk_SAT16( silk_RSHIFT_ROUND( silk_SMULWW( sLPC_Q14_ptr[ MAX_LPC_ORDER + i ], prevGain_Q10[ 1 ] ), 8 ) ) );\n    }\n\n    /* Save LPC state */\n    silk_memcpy( psDec->sLPC_Q14_buf, &sLPC_Q14_ptr[ psDec->frame_length ], MAX_LPC_ORDER * sizeof( opus_int32 ) );\n\n    /**************************************/\n    /* Update states                      */\n    /**************************************/\n    psPLC->rand_seed     = rand_seed;\n    psPLC->randScale_Q14 = rand_scale_Q14;\n    for( i = 0; i < MAX_NB_SUBFR; i++ ) {\n        psDecCtrl->pitchL[ i ] = lag;\n    }\n    RESTORE_STACK;\n}\n\n/* Glues concealed frames with new good received frames */\nvoid silk_PLC_glue_frames(\n    silk_decoder_state                  *psDec,             /* I/O decoder state        */\n    opus_int16                          frame[],            /* I/O signal               */\n    opus_int                            length              /* I length of signal       */\n)\n{\n    opus_int   i, energy_shift;\n    opus_int32 energy;\n    silk_PLC_struct *psPLC;\n    psPLC = &psDec->sPLC;\n\n    if( psDec->lossCnt ) {\n        /* Calculate energy in concealed residual */\n        silk_sum_sqr_shift( &psPLC->conc_energy, &psPLC->conc_energy_shift, frame, length );\n\n        psPLC->last_frame_lost = 1;\n    } else {\n        if( psDec->sPLC.last_frame_lost ) {\n            /* Calculate residual in decoded signal if last frame was lost */\n            silk_sum_sqr_shift( &energy, &energy_shift, frame, length );\n\n            /* Normalize energies */\n            if( energy_shift > psPLC->conc_energy_shift ) {\n                psPLC->conc_energy = silk_RSHIFT( psPLC->conc_energy, energy_shift - psPLC->conc_energy_shift );\n            } else if( energy_shift < psPLC->conc_energy_shift ) {\n                energy = silk_RSHIFT( energy, psPLC->conc_energy_shift - energy_shift );\n            }\n\n            /* Fade in the energy difference */\n            if( energy > psPLC->conc_energy ) {\n                opus_int32 frac_Q24, LZ;\n                opus_int32 gain_Q16, slope_Q16;\n\n                LZ = silk_CLZ32( psPLC->conc_energy );\n                LZ = LZ - 1;\n                psPLC->conc_energy = silk_LSHIFT( psPLC->conc_energy, LZ );\n                energy = silk_RSHIFT( energy, silk_max_32( 24 - LZ, 0 ) );\n\n                frac_Q24 = silk_DIV32( psPLC->conc_energy, silk_max( energy, 1 ) );\n\n                gain_Q16 = silk_LSHIFT( silk_SQRT_APPROX( frac_Q24 ), 4 );\n                slope_Q16 = silk_DIV32_16( ( (opus_int32)1 << 16 ) - gain_Q16, length );\n                /* Make slope 4x steeper to avoid missing onsets after DTX */\n                slope_Q16 = silk_LSHIFT( slope_Q16, 2 );\n\n                for( i = 0; i < length; i++ ) {\n                    frame[ i ] = silk_SMULWB( gain_Q16, frame[ i ] );\n                    gain_Q16 += slope_Q16;\n                    if( gain_Q16 > (opus_int32)1 << 16 ) {\n                        break;\n                    }\n                }\n            }\n        }\n        psPLC->last_frame_lost = 0;\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/PLC.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_PLC_H\n#define SILK_PLC_H\n\n#include \"main.h\"\n\n#define BWE_COEF                        0.99\n#define V_PITCH_GAIN_START_MIN_Q14      11469               /* 0.7 in Q14               */\n#define V_PITCH_GAIN_START_MAX_Q14      15565               /* 0.95 in Q14              */\n#define MAX_PITCH_LAG_MS                18\n#define RAND_BUF_SIZE                   128\n#define RAND_BUF_MASK                   ( RAND_BUF_SIZE - 1 )\n#define LOG2_INV_LPC_GAIN_HIGH_THRES    3                   /* 2^3 = 8 dB LPC gain      */\n#define LOG2_INV_LPC_GAIN_LOW_THRES     8                   /* 2^8 = 24 dB LPC gain     */\n#define PITCH_DRIFT_FAC_Q16             655                 /* 0.01 in Q16              */\n\nvoid silk_PLC_Reset(\n    silk_decoder_state                  *psDec              /* I/O Decoder state        */\n);\n\nvoid silk_PLC(\n    silk_decoder_state                  *psDec,             /* I/O Decoder state        */\n    silk_decoder_control                *psDecCtrl,         /* I/O Decoder control      */\n    opus_int16                          frame[],            /* I/O  signal              */\n    opus_int                            lost                /* I Loss flag              */\n);\n\nvoid silk_PLC_glue_frames(\n    silk_decoder_state                  *psDec,             /* I/O decoder state        */\n    opus_int16                          frame[],            /* I/O signal               */\n    opus_int                            length              /* I length of signal       */\n);\n\n#endif\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/SigProc_FIX.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_SIGPROC_FIX_H\n#define SILK_SIGPROC_FIX_H\n\n#ifdef  __cplusplus\nextern \"C\"\n{\n#endif\n\n/*#define silk_MACRO_COUNT */          /* Used to enable WMOPS counting */\n\n#define SILK_MAX_ORDER_LPC            16            /* max order of the LPC analysis in schur() and k2a() */\n\n#include <string.h>                                 /* for memset(), memcpy(), memmove() */\n#include \"typedef.h\"\n#include \"resampler_structs.h\"\n#include \"macros.h\"\n\n\n/********************************************************************/\n/*                    SIGNAL PROCESSING FUNCTIONS                   */\n/********************************************************************/\n\n/*!\n * Initialize/reset the resampler state for a given pair of input/output sampling rates\n*/\nopus_int silk_resampler_init(\n    silk_resampler_state_struct *S,                 /* I/O  Resampler state                                             */\n    opus_int32                  Fs_Hz_in,           /* I    Input sampling rate (Hz)                                    */\n    opus_int32                  Fs_Hz_out,          /* I    Output sampling rate (Hz)                                   */\n    opus_int                    forEnc              /* I    If 1: encoder; if 0: decoder                                */\n);\n\n/*!\n * Resampler: convert from one sampling rate to another\n */\nopus_int silk_resampler(\n    silk_resampler_state_struct *S,                 /* I/O  Resampler state                                             */\n    opus_int16                  out[],              /* O    Output signal                                               */\n    const opus_int16            in[],               /* I    Input signal                                                */\n    opus_int32                  inLen               /* I    Number of input samples                                     */\n);\n\n/*!\n* Downsample 2x, mediocre quality\n*/\nvoid silk_resampler_down2(\n    opus_int32                  *S,                 /* I/O  State vector [ 2 ]                                          */\n    opus_int16                  *out,               /* O    Output signal [ len ]                                       */\n    const opus_int16            *in,                /* I    Input signal [ floor(len/2) ]                               */\n    opus_int32                  inLen               /* I    Number of input samples                                     */\n);\n\n/*!\n * Downsample by a factor 2/3, low quality\n*/\nvoid silk_resampler_down2_3(\n    opus_int32                  *S,                 /* I/O  State vector [ 6 ]                                          */\n    opus_int16                  *out,               /* O    Output signal [ floor(2*inLen/3) ]                          */\n    const opus_int16            *in,                /* I    Input signal [ inLen ]                                      */\n    opus_int32                  inLen               /* I    Number of input samples                                     */\n);\n\n/*!\n * second order ARMA filter;\n * slower than biquad() but uses more precise coefficients\n * can handle (slowly) varying coefficients\n */\nvoid silk_biquad_alt(\n    const opus_int16            *in,                /* I     input signal                                               */\n    const opus_int32            *B_Q28,             /* I     MA coefficients [3]                                        */\n    const opus_int32            *A_Q28,             /* I     AR coefficients [2]                                        */\n    opus_int32                  *S,                 /* I/O   State vector [2]                                           */\n    opus_int16                  *out,               /* O     output signal                                              */\n    const opus_int32            len,                /* I     signal length (must be even)                               */\n    opus_int                    stride              /* I     Operate on interleaved signal if > 1                       */\n);\n\n/* Variable order MA prediction error filter. */\nvoid silk_LPC_analysis_filter(\n    opus_int16                  *out,               /* O    Output signal                                               */\n    const opus_int16            *in,                /* I    Input signal                                                */\n    const opus_int16            *B,                 /* I    MA prediction coefficients, Q12 [order]                     */\n    const opus_int32            len,                /* I    Signal length                                               */\n    const opus_int32            d                   /* I    Filter order                                                */\n);\n\n/* Chirp (bandwidth expand) LP AR filter */\nvoid silk_bwexpander(\n    opus_int16                  *ar,                /* I/O  AR filter to be expanded (without leading 1)                */\n    const opus_int              d,                  /* I    Length of ar                                                */\n    opus_int32                  chirp_Q16           /* I    Chirp factor (typically in the range 0 to 1)                */\n);\n\n/* Chirp (bandwidth expand) LP AR filter */\nvoid silk_bwexpander_32(\n    opus_int32                  *ar,                /* I/O  AR filter to be expanded (without leading 1)                */\n    const opus_int              d,                  /* I    Length of ar                                                */\n    opus_int32                  chirp_Q16           /* I    Chirp factor in Q16                                         */\n);\n\n/* Compute inverse of LPC prediction gain, and                           */\n/* test if LPC coefficients are stable (all poles within unit circle)    */\nopus_int32 silk_LPC_inverse_pred_gain(              /* O   Returns inverse prediction gain in energy domain, Q30        */\n    const opus_int16            *A_Q12,             /* I   Prediction coefficients, Q12 [order]                         */\n    const opus_int              order               /* I   Prediction order                                             */\n);\n\n/* For input in Q24 domain */\nopus_int32 silk_LPC_inverse_pred_gain_Q24(          /* O    Returns inverse prediction gain in energy domain, Q30       */\n    const opus_int32            *A_Q24,             /* I    Prediction coefficients [order]                             */\n    const opus_int              order               /* I    Prediction order                                            */\n);\n\n/* Split signal in two decimated bands using first-order allpass filters */\nvoid silk_ana_filt_bank_1(\n    const opus_int16            *in,                /* I    Input signal [N]                                            */\n    opus_int32                  *S,                 /* I/O  State vector [2]                                            */\n    opus_int16                  *outL,              /* O    Low band [N/2]                                              */\n    opus_int16                  *outH,              /* O    High band [N/2]                                             */\n    const opus_int32            N                   /* I    Number of input samples                                     */\n);\n\n/********************************************************************/\n/*                        SCALAR FUNCTIONS                          */\n/********************************************************************/\n\n/* Approximation of 128 * log2() (exact inverse of approx 2^() below) */\n/* Convert input to a log scale    */\nopus_int32 silk_lin2log(\n    const opus_int32            inLin               /* I  input in linear scale                                         */\n);\n\n/* Approximation of a sigmoid function */\nopus_int silk_sigm_Q15(\n    opus_int                    in_Q5               /* I                                                                */\n);\n\n/* Approximation of 2^() (exact inverse of approx log2() above) */\n/* Convert input to a linear scale */\nopus_int32 silk_log2lin(\n    const opus_int32            inLog_Q7            /* I  input on log scale                                            */\n);\n\n/* Compute number of bits to right shift the sum of squares of a vector    */\n/* of int16s to make it fit in an int32                                    */\nvoid silk_sum_sqr_shift(\n    opus_int32                  *energy,            /* O   Energy of x, after shifting to the right                     */\n    opus_int                    *shift,             /* O   Number of bits right shift applied to energy                 */\n    const opus_int16            *x,                 /* I   Input vector                                                 */\n    opus_int                    len                 /* I   Length of input vector                                       */\n);\n\n/* Calculates the reflection coefficients from the correlation sequence    */\n/* Faster than schur64(), but much less accurate.                          */\n/* uses SMLAWB(), requiring armv5E and higher.                             */\nopus_int32 silk_schur(                              /* O    Returns residual energy                                     */\n    opus_int16                  *rc_Q15,            /* O    reflection coefficients [order] Q15                         */\n    const opus_int32            *c,                 /* I    correlations [order+1]                                      */\n    const opus_int32            order               /* I    prediction order                                            */\n);\n\n/* Calculates the reflection coefficients from the correlation sequence    */\n/* Slower than schur(), but more accurate.                                 */\n/* Uses SMULL(), available on armv4                                        */\nopus_int32 silk_schur64(                            /* O    returns residual energy                                     */\n    opus_int32                  rc_Q16[],           /* O    Reflection coefficients [order] Q16                         */\n    const opus_int32            c[],                /* I    Correlations [order+1]                                      */\n    opus_int32                  order               /* I    Prediction order                                            */\n);\n\n/* Step up function, converts reflection coefficients to prediction coefficients */\nvoid silk_k2a(\n    opus_int32                  *A_Q24,             /* O    Prediction coefficients [order] Q24                         */\n    const opus_int16            *rc_Q15,            /* I    Reflection coefficients [order] Q15                         */\n    const opus_int32            order               /* I    Prediction order                                            */\n);\n\n/* Step up function, converts reflection coefficients to prediction coefficients */\nvoid silk_k2a_Q16(\n    opus_int32                  *A_Q24,             /* O    Prediction coefficients [order] Q24                         */\n    const opus_int32            *rc_Q16,            /* I    Reflection coefficients [order] Q16                         */\n    const opus_int32            order               /* I    Prediction order                                            */\n);\n\n/* Apply sine window to signal vector.                              */\n/* Window types:                                                    */\n/*    1 -> sine window from 0 to pi/2                               */\n/*    2 -> sine window from pi/2 to pi                              */\n/* every other sample of window is linearly interpolated, for speed */\nvoid silk_apply_sine_window(\n    opus_int16                  px_win[],           /* O    Pointer to windowed signal                                  */\n    const opus_int16            px[],               /* I    Pointer to input signal                                     */\n    const opus_int              win_type,           /* I    Selects a window type                                       */\n    const opus_int              length              /* I    Window length, multiple of 4                                */\n);\n\n/* Compute autocorrelation */\nvoid silk_autocorr(\n    opus_int32                  *results,           /* O    Result (length correlationCount)                            */\n    opus_int                    *scale,             /* O    Scaling of the correlation vector                           */\n    const opus_int16            *inputData,         /* I    Input data to correlate                                     */\n    const opus_int              inputDataSize,      /* I    Length of input                                             */\n    const opus_int              correlationCount,   /* I    Number of correlation taps to compute                       */\n    int                         arch                /* I    Run-time architecture                                       */\n);\n\nvoid silk_decode_pitch(\n    opus_int16                  lagIndex,           /* I                                                                */\n    opus_int8                   contourIndex,       /* O                                                                */\n    opus_int                    pitch_lags[],       /* O    4 pitch values                                              */\n    const opus_int              Fs_kHz,             /* I    sampling frequency (kHz)                                    */\n    const opus_int              nb_subfr            /* I    number of sub frames                                        */\n);\n\nopus_int silk_pitch_analysis_core(                  /* O    Voicing estimate: 0 voiced, 1 unvoiced                      */\n    const opus_int16            *frame,             /* I    Signal of length PE_FRAME_LENGTH_MS*Fs_kHz                  */\n    opus_int                    *pitch_out,         /* O    4 pitch lag values                                          */\n    opus_int16                  *lagIndex,          /* O    Lag Index                                                   */\n    opus_int8                   *contourIndex,      /* O    Pitch contour Index                                         */\n    opus_int                    *LTPCorr_Q15,       /* I/O  Normalized correlation; input: value from previous frame    */\n    opus_int                    prevLag,            /* I    Last lag of previous frame; set to zero is unvoiced         */\n    const opus_int32            search_thres1_Q16,  /* I    First stage threshold for lag candidates 0 - 1              */\n    const opus_int              search_thres2_Q13,  /* I    Final threshold for lag candidates 0 - 1                    */\n    const opus_int              Fs_kHz,             /* I    Sample frequency (kHz)                                      */\n    const opus_int              complexity,         /* I    Complexity setting, 0-2, where 2 is highest                 */\n    const opus_int              nb_subfr,           /* I    number of 5 ms subframes                                    */\n    int                         arch                /* I    Run-time architecture                                       */\n);\n\n/* Compute Normalized Line Spectral Frequencies (NLSFs) from whitening filter coefficients      */\n/* If not all roots are found, the a_Q16 coefficients are bandwidth expanded until convergence. */\nvoid silk_A2NLSF(\n    opus_int16                  *NLSF,              /* O    Normalized Line Spectral Frequencies in Q15 (0..2^15-1) [d] */\n    opus_int32                  *a_Q16,             /* I/O  Monic whitening filter coefficients in Q16 [d]              */\n    const opus_int              d                   /* I    Filter order (must be even)                                 */\n);\n\n/* compute whitening filter coefficients from normalized line spectral frequencies */\nvoid silk_NLSF2A(\n    opus_int16                  *a_Q12,             /* O    monic whitening filter coefficients in Q12,  [ d ]          */\n    const opus_int16            *NLSF,              /* I    normalized line spectral frequencies in Q15, [ d ]          */\n    const opus_int              d                   /* I    filter order (should be even)                               */\n);\n\nvoid silk_insertion_sort_increasing(\n    opus_int32                  *a,                 /* I/O   Unsorted / Sorted vector                                   */\n    opus_int                    *idx,               /* O     Index vector for the sorted elements                       */\n    const opus_int              L,                  /* I     Vector length                                              */\n    const opus_int              K                   /* I     Number of correctly sorted positions                       */\n);\n\nvoid silk_insertion_sort_decreasing_int16(\n    opus_int16                  *a,                 /* I/O   Unsorted / Sorted vector                                   */\n    opus_int                    *idx,               /* O     Index vector for the sorted elements                       */\n    const opus_int              L,                  /* I     Vector length                                              */\n    const opus_int              K                   /* I     Number of correctly sorted positions                       */\n);\n\nvoid silk_insertion_sort_increasing_all_values_int16(\n     opus_int16                 *a,                 /* I/O   Unsorted / Sorted vector                                   */\n     const opus_int             L                   /* I     Vector length                                              */\n);\n\n/* NLSF stabilizer, for a single input data vector */\nvoid silk_NLSF_stabilize(\n          opus_int16            *NLSF_Q15,          /* I/O   Unstable/stabilized normalized LSF vector in Q15 [L]       */\n    const opus_int16            *NDeltaMin_Q15,     /* I     Min distance vector, NDeltaMin_Q15[L] must be >= 1 [L+1]   */\n    const opus_int              L                   /* I     Number of NLSF parameters in the input vector              */\n);\n\n/* Laroia low complexity NLSF weights */\nvoid silk_NLSF_VQ_weights_laroia(\n    opus_int16                  *pNLSFW_Q_OUT,      /* O     Pointer to input vector weights [D]                        */\n    const opus_int16            *pNLSF_Q15,         /* I     Pointer to input vector         [D]                        */\n    const opus_int              D                   /* I     Input vector dimension (even)                              */\n);\n\n/* Compute reflection coefficients from input signal */\nvoid silk_burg_modified(\n    opus_int32                  *res_nrg,           /* O    Residual energy                                             */\n    opus_int                    *res_nrg_Q,         /* O    Residual energy Q value                                     */\n    opus_int32                  A_Q16[],            /* O    Prediction coefficients (length order)                      */\n    const opus_int16            x[],                /* I    Input signal, length: nb_subfr * ( D + subfr_length )       */\n    const opus_int32            minInvGain_Q30,     /* I    Inverse of max prediction gain                              */\n    const opus_int              subfr_length,       /* I    Input signal subframe length (incl. D preceding samples)    */\n    const opus_int              nb_subfr,           /* I    Number of subframes stacked in x                            */\n    const opus_int              D,                  /* I    Order                                                       */\n    int                         arch                /* I    Run-time architecture                                       */\n);\n\n/* Copy and multiply a vector by a constant */\nvoid silk_scale_copy_vector16(\n    opus_int16                  *data_out,\n    const opus_int16            *data_in,\n    opus_int32                  gain_Q16,           /* I    Gain in Q16                                                 */\n    const opus_int              dataSize            /* I    Length                                                      */\n);\n\n/* Some for the LTP related function requires Q26 to work.*/\nvoid silk_scale_vector32_Q26_lshift_18(\n    opus_int32                  *data1,             /* I/O  Q0/Q18                                                      */\n    opus_int32                  gain_Q26,           /* I    Q26                                                         */\n    opus_int                    dataSize            /* I    length                                                      */\n);\n\n/********************************************************************/\n/*                        INLINE ARM MATH                           */\n/********************************************************************/\n\n/*    return sum( inVec1[i] * inVec2[i] ) */\nopus_int32 silk_inner_prod_aligned(\n    const opus_int16 *const     inVec1,             /*    I input vector 1                                              */\n    const opus_int16 *const     inVec2,             /*    I input vector 2                                              */\n    const opus_int              len                 /*    I vector lengths                                              */\n);\n\nopus_int32 silk_inner_prod_aligned_scale(\n    const opus_int16 *const     inVec1,             /*    I input vector 1                                              */\n    const opus_int16 *const     inVec2,             /*    I input vector 2                                              */\n    const opus_int              scale,              /*    I number of bits to shift                                     */\n    const opus_int              len                 /*    I vector lengths                                              */\n);\n\nopus_int64 silk_inner_prod16_aligned_64(\n    const opus_int16            *inVec1,            /*    I input vector 1                                              */\n    const opus_int16            *inVec2,            /*    I input vector 2                                              */\n    const opus_int              len                 /*    I vector lengths                                              */\n);\n\n/********************************************************************/\n/*                                MACROS                            */\n/********************************************************************/\n\n/* Rotate a32 right by 'rot' bits. Negative rot values result in rotating\n   left. Output is 32bit int.\n   Note: contemporary compilers recognize the C expression below and\n   compile it into a 'ror' instruction if available. No need for OPUS_INLINE ASM! */\nstatic OPUS_INLINE opus_int32 silk_ROR32( opus_int32 a32, opus_int rot )\n{\n    opus_uint32 x = (opus_uint32) a32;\n    opus_uint32 r = (opus_uint32) rot;\n    opus_uint32 m = (opus_uint32) -rot;\n    if( rot == 0 ) {\n        return a32;\n    } else if( rot < 0 ) {\n        return (opus_int32) ((x << m) | (x >> (32 - m)));\n    } else {\n        return (opus_int32) ((x << (32 - r)) | (x >> r));\n    }\n}\n\n/* Allocate opus_int16 aligned to 4-byte memory address */\n#if EMBEDDED_ARM\n#define silk_DWORD_ALIGN __attribute__((aligned(4)))\n#else\n#define silk_DWORD_ALIGN\n#endif\n\n/* Useful Macros that can be adjusted to other platforms */\n#define silk_memcpy(dest, src, size)        memcpy((dest), (src), (size))\n#define silk_memset(dest, src, size)        memset((dest), (src), (size))\n#define silk_memmove(dest, src, size)       memmove((dest), (src), (size))\n\n/* Fixed point macros */\n\n/* (a32 * b32) output have to be 32bit int */\n#define silk_MUL(a32, b32)                  ((a32) * (b32))\n\n/* (a32 * b32) output have to be 32bit uint */\n#define silk_MUL_uint(a32, b32)             silk_MUL(a32, b32)\n\n/* a32 + (b32 * c32) output have to be 32bit int */\n#define silk_MLA(a32, b32, c32)             silk_ADD32((a32),((b32) * (c32)))\n\n/* a32 + (b32 * c32) output have to be 32bit uint */\n#define silk_MLA_uint(a32, b32, c32)        silk_MLA(a32, b32, c32)\n\n/* ((a32 >> 16)  * (b32 >> 16)) output have to be 32bit int */\n#define silk_SMULTT(a32, b32)               (((a32) >> 16) * ((b32) >> 16))\n\n/* a32 + ((a32 >> 16)  * (b32 >> 16)) output have to be 32bit int */\n#define silk_SMLATT(a32, b32, c32)          silk_ADD32((a32),((b32) >> 16) * ((c32) >> 16))\n\n#define silk_SMLALBB(a64, b16, c16)         silk_ADD64((a64),(opus_int64)((opus_int32)(b16) * (opus_int32)(c16)))\n\n/* (a32 * b32) */\n#define silk_SMULL(a32, b32)                ((opus_int64)(a32) * /*(opus_int64)*/(b32))\n\n/* Adds two signed 32-bit values in a way that can overflow, while not relying on undefined behaviour\n   (just standard two's complement implementation-specific behaviour) */\n#define silk_ADD32_ovflw(a, b)              ((opus_int32)((opus_uint32)(a) + (opus_uint32)(b)))\n/* Subtractss two signed 32-bit values in a way that can overflow, while not relying on undefined behaviour\n   (just standard two's complement implementation-specific behaviour) */\n#define silk_SUB32_ovflw(a, b)              ((opus_int32)((opus_uint32)(a) - (opus_uint32)(b)))\n\n/* Multiply-accumulate macros that allow overflow in the addition (ie, no asserts in debug mode) */\n#define silk_MLA_ovflw(a32, b32, c32)       silk_ADD32_ovflw((a32), (opus_uint32)(b32) * (opus_uint32)(c32))\n#define silk_SMLABB_ovflw(a32, b32, c32)    (silk_ADD32_ovflw((a32) , ((opus_int32)((opus_int16)(b32))) * (opus_int32)((opus_int16)(c32))))\n\n#define silk_DIV32_16(a32, b16)             ((opus_int32)((a32) / (b16)))\n#define silk_DIV32(a32, b32)                ((opus_int32)((a32) / (b32)))\n\n/* These macros enables checking for overflow in silk_API_Debug.h*/\n#define silk_ADD16(a, b)                    ((a) + (b))\n#define silk_ADD32(a, b)                    ((a) + (b))\n#define silk_ADD64(a, b)                    ((a) + (b))\n\n#define silk_SUB16(a, b)                    ((a) - (b))\n#define silk_SUB32(a, b)                    ((a) - (b))\n#define silk_SUB64(a, b)                    ((a) - (b))\n\n#define silk_SAT8(a)                        ((a) > silk_int8_MAX ? silk_int8_MAX  :       \\\n                                            ((a) < silk_int8_MIN ? silk_int8_MIN  : (a)))\n#define silk_SAT16(a)                       ((a) > silk_int16_MAX ? silk_int16_MAX :      \\\n                                            ((a) < silk_int16_MIN ? silk_int16_MIN : (a)))\n#define silk_SAT32(a)                       ((a) > silk_int32_MAX ? silk_int32_MAX :      \\\n                                            ((a) < silk_int32_MIN ? silk_int32_MIN : (a)))\n\n#define silk_CHECK_FIT8(a)                  (a)\n#define silk_CHECK_FIT16(a)                 (a)\n#define silk_CHECK_FIT32(a)                 (a)\n\n#define silk_ADD_SAT16(a, b)                (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a), (b) ) )\n#define silk_ADD_SAT64(a, b)                ((((a) + (b)) & 0x8000000000000000LL) == 0 ?                            \\\n                                            ((((a) & (b)) & 0x8000000000000000LL) != 0 ? silk_int64_MIN : (a)+(b)) : \\\n                                            ((((a) | (b)) & 0x8000000000000000LL) == 0 ? silk_int64_MAX : (a)+(b)) )\n\n#define silk_SUB_SAT16(a, b)                (opus_int16)silk_SAT16( silk_SUB32( (opus_int32)(a), (b) ) )\n#define silk_SUB_SAT64(a, b)                ((((a)-(b)) & 0x8000000000000000LL) == 0 ?                                               \\\n                                            (( (a) & ((b)^0x8000000000000000LL) & 0x8000000000000000LL) ? silk_int64_MIN : (a)-(b)) : \\\n                                            ((((a)^0x8000000000000000LL) & (b)  & 0x8000000000000000LL) ? silk_int64_MAX : (a)-(b)) )\n\n/* Saturation for positive input values */\n#define silk_POS_SAT32(a)                   ((a) > silk_int32_MAX ? silk_int32_MAX : (a))\n\n/* Add with saturation for positive input values */\n#define silk_ADD_POS_SAT8(a, b)             ((((a)+(b)) & 0x80)                 ? silk_int8_MAX  : ((a)+(b)))\n#define silk_ADD_POS_SAT16(a, b)            ((((a)+(b)) & 0x8000)               ? silk_int16_MAX : ((a)+(b)))\n#define silk_ADD_POS_SAT32(a, b)            ((((a)+(b)) & 0x80000000)           ? silk_int32_MAX : ((a)+(b)))\n#define silk_ADD_POS_SAT64(a, b)            ((((a)+(b)) & 0x8000000000000000LL) ? silk_int64_MAX : ((a)+(b)))\n\n#define silk_LSHIFT8(a, shift)              ((opus_int8)((opus_uint8)(a)<<(shift)))         /* shift >= 0, shift < 8  */\n#define silk_LSHIFT16(a, shift)             ((opus_int16)((opus_uint16)(a)<<(shift)))       /* shift >= 0, shift < 16 */\n#define silk_LSHIFT32(a, shift)             ((opus_int32)((opus_uint32)(a)<<(shift)))       /* shift >= 0, shift < 32 */\n#define silk_LSHIFT64(a, shift)             ((opus_int64)((opus_uint64)(a)<<(shift)))       /* shift >= 0, shift < 64 */\n#define silk_LSHIFT(a, shift)               silk_LSHIFT32(a, shift)                         /* shift >= 0, shift < 32 */\n\n#define silk_RSHIFT8(a, shift)              ((a)>>(shift))                                  /* shift >= 0, shift < 8  */\n#define silk_RSHIFT16(a, shift)             ((a)>>(shift))                                  /* shift >= 0, shift < 16 */\n#define silk_RSHIFT32(a, shift)             ((a)>>(shift))                                  /* shift >= 0, shift < 32 */\n#define silk_RSHIFT64(a, shift)             ((a)>>(shift))                                  /* shift >= 0, shift < 64 */\n#define silk_RSHIFT(a, shift)               silk_RSHIFT32(a, shift)                         /* shift >= 0, shift < 32 */\n\n/* saturates before shifting */\n#define silk_LSHIFT_SAT32(a, shift)         (silk_LSHIFT32( silk_LIMIT( (a), silk_RSHIFT32( silk_int32_MIN, (shift) ), \\\n                                                    silk_RSHIFT32( silk_int32_MAX, (shift) ) ), (shift) ))\n\n#define silk_LSHIFT_ovflw(a, shift)         ((opus_int32)((opus_uint32)(a) << (shift)))     /* shift >= 0, allowed to overflow */\n#define silk_LSHIFT_uint(a, shift)          ((a) << (shift))                                /* shift >= 0 */\n#define silk_RSHIFT_uint(a, shift)          ((a) >> (shift))                                /* shift >= 0 */\n\n#define silk_ADD_LSHIFT(a, b, shift)        ((a) + silk_LSHIFT((b), (shift)))               /* shift >= 0 */\n#define silk_ADD_LSHIFT32(a, b, shift)      silk_ADD32((a), silk_LSHIFT32((b), (shift)))    /* shift >= 0 */\n#define silk_ADD_LSHIFT_uint(a, b, shift)   ((a) + silk_LSHIFT_uint((b), (shift)))          /* shift >= 0 */\n#define silk_ADD_RSHIFT(a, b, shift)        ((a) + silk_RSHIFT((b), (shift)))               /* shift >= 0 */\n#define silk_ADD_RSHIFT32(a, b, shift)      silk_ADD32((a), silk_RSHIFT32((b), (shift)))    /* shift >= 0 */\n#define silk_ADD_RSHIFT_uint(a, b, shift)   ((a) + silk_RSHIFT_uint((b), (shift)))          /* shift >= 0 */\n#define silk_SUB_LSHIFT32(a, b, shift)      silk_SUB32((a), silk_LSHIFT32((b), (shift)))    /* shift >= 0 */\n#define silk_SUB_RSHIFT32(a, b, shift)      silk_SUB32((a), silk_RSHIFT32((b), (shift)))    /* shift >= 0 */\n\n/* Requires that shift > 0 */\n#define silk_RSHIFT_ROUND(a, shift)         ((shift) == 1 ? ((a) >> 1) + ((a) & 1) : (((a) >> ((shift) - 1)) + 1) >> 1)\n#define silk_RSHIFT_ROUND64(a, shift)       ((shift) == 1 ? ((a) >> 1) + ((a) & 1) : (((a) >> ((shift) - 1)) + 1) >> 1)\n\n/* Number of rightshift required to fit the multiplication */\n#define silk_NSHIFT_MUL_32_32(a, b)         ( -(31- (32-silk_CLZ32(silk_abs(a)) + (32-silk_CLZ32(silk_abs(b))))) )\n#define silk_NSHIFT_MUL_16_16(a, b)         ( -(15- (16-silk_CLZ16(silk_abs(a)) + (16-silk_CLZ16(silk_abs(b))))) )\n\n\n#define silk_min(a, b)                      (((a) < (b)) ? (a) : (b))\n#define silk_max(a, b)                      (((a) > (b)) ? (a) : (b))\n\n/* Macro to convert floating-point constants to fixed-point */\n#define SILK_FIX_CONST( C, Q )              ((opus_int32)((C) * ((opus_int64)1 << (Q)) + 0.5))\n\n/* silk_min() versions with typecast in the function call */\nstatic OPUS_INLINE opus_int silk_min_int(opus_int a, opus_int b)\n{\n    return (((a) < (b)) ? (a) : (b));\n}\nstatic OPUS_INLINE opus_int16 silk_min_16(opus_int16 a, opus_int16 b)\n{\n    return (((a) < (b)) ? (a) : (b));\n}\nstatic OPUS_INLINE opus_int32 silk_min_32(opus_int32 a, opus_int32 b)\n{\n    return (((a) < (b)) ? (a) : (b));\n}\nstatic OPUS_INLINE opus_int64 silk_min_64(opus_int64 a, opus_int64 b)\n{\n    return (((a) < (b)) ? (a) : (b));\n}\n\n/* silk_min() versions with typecast in the function call */\nstatic OPUS_INLINE opus_int silk_max_int(opus_int a, opus_int b)\n{\n    return (((a) > (b)) ? (a) : (b));\n}\nstatic OPUS_INLINE opus_int16 silk_max_16(opus_int16 a, opus_int16 b)\n{\n    return (((a) > (b)) ? (a) : (b));\n}\nstatic OPUS_INLINE opus_int32 silk_max_32(opus_int32 a, opus_int32 b)\n{\n    return (((a) > (b)) ? (a) : (b));\n}\nstatic OPUS_INLINE opus_int64 silk_max_64(opus_int64 a, opus_int64 b)\n{\n    return (((a) > (b)) ? (a) : (b));\n}\n\n#define silk_LIMIT( a, limit1, limit2)      ((limit1) > (limit2) ? ((a) > (limit1) ? (limit1) : ((a) < (limit2) ? (limit2) : (a))) \\\n                                                                 : ((a) > (limit2) ? (limit2) : ((a) < (limit1) ? (limit1) : (a))))\n\n#define silk_LIMIT_int                      silk_LIMIT\n#define silk_LIMIT_16                       silk_LIMIT\n#define silk_LIMIT_32                       silk_LIMIT\n\n#define silk_abs(a)                         (((a) >  0)  ? (a) : -(a))            /* Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN */\n#define silk_abs_int(a)                     (((a) ^ ((a) >> (8 * sizeof(a) - 1))) - ((a) >> (8 * sizeof(a) - 1)))\n#define silk_abs_int32(a)                   (((a) ^ ((a) >> 31)) - ((a) >> 31))\n#define silk_abs_int64(a)                   (((a) >  0)  ? (a) : -(a))\n\n#define silk_sign(a)                        ((a) > 0 ? 1 : ( (a) < 0 ? -1 : 0 ))\n\n/* PSEUDO-RANDOM GENERATOR                                                          */\n/* Make sure to store the result as the seed for the next call (also in between     */\n/* frames), otherwise result won't be random at all. When only using some of the    */\n/* bits, take the most significant bits by right-shifting.                          */\n#define silk_RAND(seed)                     (silk_MLA_ovflw(907633515, (seed), 196314165))\n\n/*  Add some multiplication functions that can be easily mapped to ARM. */\n\n/*    silk_SMMUL: Signed top word multiply.\n          ARMv6        2 instruction cycles.\n          ARMv3M+      3 instruction cycles. use SMULL and ignore LSB registers.(except xM)*/\n/*#define silk_SMMUL(a32, b32)                (opus_int32)silk_RSHIFT(silk_SMLAL(silk_SMULWB((a32), (b32)), (a32), silk_RSHIFT_ROUND((b32), 16)), 16)*/\n/* the following seems faster on x86 */\n#define silk_SMMUL(a32, b32)                (opus_int32)silk_RSHIFT64(silk_SMULL((a32), (b32)), 32)\n\n#include \"Inlines.h\"\n#include \"MacroCount.h\"\n#include \"MacroDebug.h\"\n\n#ifdef OPUS_ARM_INLINE_ASM\n#include \"arm/SigProc_FIX_armv4.h\"\n#endif\n\n#ifdef OPUS_ARM_INLINE_EDSP\n#include \"arm/SigProc_FIX_armv5e.h\"\n#endif\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif /* SILK_SIGPROC_FIX_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/VAD.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"stack_alloc.h\"\n\n/* Silk VAD noise level estimation */\nstatic OPUS_INLINE void silk_VAD_GetNoiseLevels(\n    const opus_int32             pX[ VAD_N_BANDS ], /* I    subband energies                            */\n    silk_VAD_state              *psSilk_VAD         /* I/O  Pointer to Silk VAD state                   */\n);\n\n/**********************************/\n/* Initialization of the Silk VAD */\n/**********************************/\nopus_int silk_VAD_Init(                                         /* O    Return value, 0 if success                  */\n    silk_VAD_state              *psSilk_VAD                     /* I/O  Pointer to Silk VAD state                   */\n)\n{\n    opus_int b, ret = 0;\n\n    /* reset state memory */\n    silk_memset( psSilk_VAD, 0, sizeof( silk_VAD_state ) );\n\n    /* init noise levels */\n    /* Initialize array with approx pink noise levels (psd proportional to inverse of frequency) */\n    for( b = 0; b < VAD_N_BANDS; b++ ) {\n        psSilk_VAD->NoiseLevelBias[ b ] = silk_max_32( silk_DIV32_16( VAD_NOISE_LEVELS_BIAS, b + 1 ), 1 );\n    }\n\n    /* Initialize state */\n    for( b = 0; b < VAD_N_BANDS; b++ ) {\n        psSilk_VAD->NL[ b ]     = silk_MUL( 100, psSilk_VAD->NoiseLevelBias[ b ] );\n        psSilk_VAD->inv_NL[ b ] = silk_DIV32( silk_int32_MAX, psSilk_VAD->NL[ b ] );\n    }\n    psSilk_VAD->counter = 15;\n\n    /* init smoothed energy-to-noise ratio*/\n    for( b = 0; b < VAD_N_BANDS; b++ ) {\n        psSilk_VAD->NrgRatioSmth_Q8[ b ] = 100 * 256;       /* 100 * 256 --> 20 dB SNR */\n    }\n\n    return( ret );\n}\n\n/* Weighting factors for tilt measure */\nstatic const opus_int32 tiltWeights[ VAD_N_BANDS ] = { 30000, 6000, -12000, -12000 };\n\n/***************************************/\n/* Get the speech activity level in Q8 */\n/***************************************/\nopus_int silk_VAD_GetSA_Q8(                                     /* O    Return value, 0 if success                  */\n    silk_encoder_state          *psEncC,                        /* I/O  Encoder state                               */\n    const opus_int16            pIn[]                           /* I    PCM input                                   */\n)\n{\n    opus_int   SA_Q15, pSNR_dB_Q7, input_tilt;\n    opus_int   decimated_framelength1, decimated_framelength2;\n    opus_int   decimated_framelength;\n    opus_int   dec_subframe_length, dec_subframe_offset, SNR_Q7, i, b, s;\n    opus_int32 sumSquared, smooth_coef_Q16;\n    opus_int16 HPstateTmp;\n    VARDECL( opus_int16, X );\n    opus_int32 Xnrg[ VAD_N_BANDS ];\n    opus_int32 NrgToNoiseRatio_Q8[ VAD_N_BANDS ];\n    opus_int32 speech_nrg, x_tmp;\n    opus_int   X_offset[ VAD_N_BANDS ];\n    opus_int   ret = 0;\n    silk_VAD_state *psSilk_VAD = &psEncC->sVAD;\n    SAVE_STACK;\n\n    /* Safety checks */\n    silk_assert( VAD_N_BANDS == 4 );\n    silk_assert( MAX_FRAME_LENGTH >= psEncC->frame_length );\n    silk_assert( psEncC->frame_length <= 512 );\n    silk_assert( psEncC->frame_length == 8 * silk_RSHIFT( psEncC->frame_length, 3 ) );\n\n    /***********************/\n    /* Filter and Decimate */\n    /***********************/\n    decimated_framelength1 = silk_RSHIFT( psEncC->frame_length, 1 );\n    decimated_framelength2 = silk_RSHIFT( psEncC->frame_length, 2 );\n    decimated_framelength = silk_RSHIFT( psEncC->frame_length, 3 );\n    /* Decimate into 4 bands:\n       0       L      3L       L              3L                             5L\n               -      --       -              --                             --\n               8       8       2               4                              4\n\n       [0-1 kHz| temp. |1-2 kHz|    2-4 kHz    |            4-8 kHz           |\n\n       They're arranged to allow the minimal ( frame_length / 4 ) extra\n       scratch space during the downsampling process */\n    X_offset[ 0 ] = 0;\n    X_offset[ 1 ] = decimated_framelength + decimated_framelength2;\n    X_offset[ 2 ] = X_offset[ 1 ] + decimated_framelength;\n    X_offset[ 3 ] = X_offset[ 2 ] + decimated_framelength2;\n    ALLOC( X, X_offset[ 3 ] + decimated_framelength1, opus_int16 );\n\n    /* 0-8 kHz to 0-4 kHz and 4-8 kHz */\n    silk_ana_filt_bank_1( pIn, &psSilk_VAD->AnaState[  0 ],\n        X, &X[ X_offset[ 3 ] ], psEncC->frame_length );\n\n    /* 0-4 kHz to 0-2 kHz and 2-4 kHz */\n    silk_ana_filt_bank_1( X, &psSilk_VAD->AnaState1[ 0 ],\n        X, &X[ X_offset[ 2 ] ], decimated_framelength1 );\n\n    /* 0-2 kHz to 0-1 kHz and 1-2 kHz */\n    silk_ana_filt_bank_1( X, &psSilk_VAD->AnaState2[ 0 ],\n        X, &X[ X_offset[ 1 ] ], decimated_framelength2 );\n\n    /*********************************************/\n    /* HP filter on lowest band (differentiator) */\n    /*********************************************/\n    X[ decimated_framelength - 1 ] = silk_RSHIFT( X[ decimated_framelength - 1 ], 1 );\n    HPstateTmp = X[ decimated_framelength - 1 ];\n    for( i = decimated_framelength - 1; i > 0; i-- ) {\n        X[ i - 1 ]  = silk_RSHIFT( X[ i - 1 ], 1 );\n        X[ i ]     -= X[ i - 1 ];\n    }\n    X[ 0 ] -= psSilk_VAD->HPstate;\n    psSilk_VAD->HPstate = HPstateTmp;\n\n    /*************************************/\n    /* Calculate the energy in each band */\n    /*************************************/\n    for( b = 0; b < VAD_N_BANDS; b++ ) {\n        /* Find the decimated framelength in the non-uniformly divided bands */\n        decimated_framelength = silk_RSHIFT( psEncC->frame_length, silk_min_int( VAD_N_BANDS - b, VAD_N_BANDS - 1 ) );\n\n        /* Split length into subframe lengths */\n        dec_subframe_length = silk_RSHIFT( decimated_framelength, VAD_INTERNAL_SUBFRAMES_LOG2 );\n        dec_subframe_offset = 0;\n\n        /* Compute energy per sub-frame */\n        /* initialize with summed energy of last subframe */\n        Xnrg[ b ] = psSilk_VAD->XnrgSubfr[ b ];\n        for( s = 0; s < VAD_INTERNAL_SUBFRAMES; s++ ) {\n            sumSquared = 0;\n            for( i = 0; i < dec_subframe_length; i++ ) {\n                /* The energy will be less than dec_subframe_length * ( silk_int16_MIN / 8 ) ^ 2.            */\n                /* Therefore we can accumulate with no risk of overflow (unless dec_subframe_length > 128)  */\n                x_tmp = silk_RSHIFT(\n                    X[ X_offset[ b ] + i + dec_subframe_offset ], 3 );\n                sumSquared = silk_SMLABB( sumSquared, x_tmp, x_tmp );\n\n                /* Safety check */\n                silk_assert( sumSquared >= 0 );\n            }\n\n            /* Add/saturate summed energy of current subframe */\n            if( s < VAD_INTERNAL_SUBFRAMES - 1 ) {\n                Xnrg[ b ] = silk_ADD_POS_SAT32( Xnrg[ b ], sumSquared );\n            } else {\n                /* Look-ahead subframe */\n                Xnrg[ b ] = silk_ADD_POS_SAT32( Xnrg[ b ], silk_RSHIFT( sumSquared, 1 ) );\n            }\n\n            dec_subframe_offset += dec_subframe_length;\n        }\n        psSilk_VAD->XnrgSubfr[ b ] = sumSquared;\n    }\n\n    /********************/\n    /* Noise estimation */\n    /********************/\n    silk_VAD_GetNoiseLevels( &Xnrg[ 0 ], psSilk_VAD );\n\n    /***********************************************/\n    /* Signal-plus-noise to noise ratio estimation */\n    /***********************************************/\n    sumSquared = 0;\n    input_tilt = 0;\n    for( b = 0; b < VAD_N_BANDS; b++ ) {\n        speech_nrg = Xnrg[ b ] - psSilk_VAD->NL[ b ];\n        if( speech_nrg > 0 ) {\n            /* Divide, with sufficient resolution */\n            if( ( Xnrg[ b ] & 0xFF800000 ) == 0 ) {\n                NrgToNoiseRatio_Q8[ b ] = silk_DIV32( silk_LSHIFT( Xnrg[ b ], 8 ), psSilk_VAD->NL[ b ] + 1 );\n            } else {\n                NrgToNoiseRatio_Q8[ b ] = silk_DIV32( Xnrg[ b ], silk_RSHIFT( psSilk_VAD->NL[ b ], 8 ) + 1 );\n            }\n\n            /* Convert to log domain */\n            SNR_Q7 = silk_lin2log( NrgToNoiseRatio_Q8[ b ] ) - 8 * 128;\n\n            /* Sum-of-squares */\n            sumSquared = silk_SMLABB( sumSquared, SNR_Q7, SNR_Q7 );          /* Q14 */\n\n            /* Tilt measure */\n            if( speech_nrg < ( (opus_int32)1 << 20 ) ) {\n                /* Scale down SNR value for small subband speech energies */\n                SNR_Q7 = silk_SMULWB( silk_LSHIFT( silk_SQRT_APPROX( speech_nrg ), 6 ), SNR_Q7 );\n            }\n            input_tilt = silk_SMLAWB( input_tilt, tiltWeights[ b ], SNR_Q7 );\n        } else {\n            NrgToNoiseRatio_Q8[ b ] = 256;\n        }\n    }\n\n    /* Mean-of-squares */\n    sumSquared = silk_DIV32_16( sumSquared, VAD_N_BANDS ); /* Q14 */\n\n    /* Root-mean-square approximation, scale to dBs, and write to output pointer */\n    pSNR_dB_Q7 = (opus_int16)( 3 * silk_SQRT_APPROX( sumSquared ) ); /* Q7 */\n\n    /*********************************/\n    /* Speech Probability Estimation */\n    /*********************************/\n    SA_Q15 = silk_sigm_Q15( silk_SMULWB( VAD_SNR_FACTOR_Q16, pSNR_dB_Q7 ) - VAD_NEGATIVE_OFFSET_Q5 );\n\n    /**************************/\n    /* Frequency Tilt Measure */\n    /**************************/\n    psEncC->input_tilt_Q15 = silk_LSHIFT( silk_sigm_Q15( input_tilt ) - 16384, 1 );\n\n    /**************************************************/\n    /* Scale the sigmoid output based on power levels */\n    /**************************************************/\n    speech_nrg = 0;\n    for( b = 0; b < VAD_N_BANDS; b++ ) {\n        /* Accumulate signal-without-noise energies, higher frequency bands have more weight */\n        speech_nrg += ( b + 1 ) * silk_RSHIFT( Xnrg[ b ] - psSilk_VAD->NL[ b ], 4 );\n    }\n\n    /* Power scaling */\n    if( speech_nrg <= 0 ) {\n        SA_Q15 = silk_RSHIFT( SA_Q15, 1 );\n    } else if( speech_nrg < 32768 ) {\n        if( psEncC->frame_length == 10 * psEncC->fs_kHz ) {\n            speech_nrg = silk_LSHIFT_SAT32( speech_nrg, 16 );\n        } else {\n            speech_nrg = silk_LSHIFT_SAT32( speech_nrg, 15 );\n        }\n\n        /* square-root */\n        speech_nrg = silk_SQRT_APPROX( speech_nrg );\n        SA_Q15 = silk_SMULWB( 32768 + speech_nrg, SA_Q15 );\n    }\n\n    /* Copy the resulting speech activity in Q8 */\n    psEncC->speech_activity_Q8 = silk_min_int( silk_RSHIFT( SA_Q15, 7 ), silk_uint8_MAX );\n\n    /***********************************/\n    /* Energy Level and SNR estimation */\n    /***********************************/\n    /* Smoothing coefficient */\n    smooth_coef_Q16 = silk_SMULWB( VAD_SNR_SMOOTH_COEF_Q18, silk_SMULWB( (opus_int32)SA_Q15, SA_Q15 ) );\n\n    if( psEncC->frame_length == 10 * psEncC->fs_kHz ) {\n        smooth_coef_Q16 >>= 1;\n    }\n\n    for( b = 0; b < VAD_N_BANDS; b++ ) {\n        /* compute smoothed energy-to-noise ratio per band */\n        psSilk_VAD->NrgRatioSmth_Q8[ b ] = silk_SMLAWB( psSilk_VAD->NrgRatioSmth_Q8[ b ],\n            NrgToNoiseRatio_Q8[ b ] - psSilk_VAD->NrgRatioSmth_Q8[ b ], smooth_coef_Q16 );\n\n        /* signal to noise ratio in dB per band */\n        SNR_Q7 = 3 * ( silk_lin2log( psSilk_VAD->NrgRatioSmth_Q8[b] ) - 8 * 128 );\n        /* quality = sigmoid( 0.25 * ( SNR_dB - 16 ) ); */\n        psEncC->input_quality_bands_Q15[ b ] = silk_sigm_Q15( silk_RSHIFT( SNR_Q7 - 16 * 128, 4 ) );\n    }\n\n    RESTORE_STACK;\n    return( ret );\n}\n\n/**************************/\n/* Noise level estimation */\n/**************************/\nstatic OPUS_INLINE void silk_VAD_GetNoiseLevels(\n    const opus_int32            pX[ VAD_N_BANDS ],  /* I    subband energies                            */\n    silk_VAD_state              *psSilk_VAD         /* I/O  Pointer to Silk VAD state                   */\n)\n{\n    opus_int   k;\n    opus_int32 nl, nrg, inv_nrg;\n    opus_int   coef, min_coef;\n\n    /* Initially faster smoothing */\n    if( psSilk_VAD->counter < 1000 ) { /* 1000 = 20 sec */\n        min_coef = silk_DIV32_16( silk_int16_MAX, silk_RSHIFT( psSilk_VAD->counter, 4 ) + 1 );\n    } else {\n        min_coef = 0;\n    }\n\n    for( k = 0; k < VAD_N_BANDS; k++ ) {\n        /* Get old noise level estimate for current band */\n        nl = psSilk_VAD->NL[ k ];\n        silk_assert( nl >= 0 );\n\n        /* Add bias */\n        nrg = silk_ADD_POS_SAT32( pX[ k ], psSilk_VAD->NoiseLevelBias[ k ] );\n        silk_assert( nrg > 0 );\n\n        /* Invert energies */\n        inv_nrg = silk_DIV32( silk_int32_MAX, nrg );\n        silk_assert( inv_nrg >= 0 );\n\n        /* Less update when subband energy is high */\n        if( nrg > silk_LSHIFT( nl, 3 ) ) {\n            coef = VAD_NOISE_LEVEL_SMOOTH_COEF_Q16 >> 3;\n        } else if( nrg < nl ) {\n            coef = VAD_NOISE_LEVEL_SMOOTH_COEF_Q16;\n        } else {\n            coef = silk_SMULWB( silk_SMULWW( inv_nrg, nl ), VAD_NOISE_LEVEL_SMOOTH_COEF_Q16 << 1 );\n        }\n\n        /* Initially faster smoothing */\n        coef = silk_max_int( coef, min_coef );\n\n        /* Smooth inverse energies */\n        psSilk_VAD->inv_NL[ k ] = silk_SMLAWB( psSilk_VAD->inv_NL[ k ], inv_nrg - psSilk_VAD->inv_NL[ k ], coef );\n        silk_assert( psSilk_VAD->inv_NL[ k ] >= 0 );\n\n        /* Compute noise level by inverting again */\n        nl = silk_DIV32( silk_int32_MAX, psSilk_VAD->inv_NL[ k ] );\n        silk_assert( nl >= 0 );\n\n        /* Limit noise levels (guarantee 7 bits of head room) */\n        nl = silk_min( nl, 0x00FFFFFF );\n\n        /* Store as part of state */\n        psSilk_VAD->NL[ k ] = nl;\n    }\n\n    /* Increment frame counter */\n    psSilk_VAD->counter++;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/VQ_WMat_EC.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Entropy constrained matrix-weighted VQ, hard-coded to 5-element vectors, for a single input data vector */\nvoid silk_VQ_WMat_EC(\n    opus_int8                   *ind,                           /* O    index of best codebook vector               */\n    opus_int32                  *rate_dist_Q14,                 /* O    best weighted quant error + mu * rate       */\n    opus_int                    *gain_Q7,                       /* O    sum of absolute LTP coefficients            */\n    const opus_int16            *in_Q14,                        /* I    input vector to be quantized                */\n    const opus_int32            *W_Q18,                         /* I    weighting matrix                            */\n    const opus_int8             *cb_Q7,                         /* I    codebook                                    */\n    const opus_uint8            *cb_gain_Q7,                    /* I    codebook effective gain                     */\n    const opus_uint8            *cl_Q5,                         /* I    code length for each codebook vector        */\n    const opus_int              mu_Q9,                          /* I    tradeoff betw. weighted error and rate      */\n    const opus_int32            max_gain_Q7,                    /* I    maximum sum of absolute LTP coefficients    */\n    opus_int                    L                               /* I    number of vectors in codebook               */\n)\n{\n    opus_int   k, gain_tmp_Q7;\n    const opus_int8 *cb_row_Q7;\n    opus_int16 diff_Q14[ 5 ];\n    opus_int32 sum1_Q14, sum2_Q16;\n\n    /* Loop over codebook */\n    *rate_dist_Q14 = silk_int32_MAX;\n    cb_row_Q7 = cb_Q7;\n    for( k = 0; k < L; k++ ) {\n\t    gain_tmp_Q7 = cb_gain_Q7[k];\n\n        diff_Q14[ 0 ] = in_Q14[ 0 ] - silk_LSHIFT( cb_row_Q7[ 0 ], 7 );\n        diff_Q14[ 1 ] = in_Q14[ 1 ] - silk_LSHIFT( cb_row_Q7[ 1 ], 7 );\n        diff_Q14[ 2 ] = in_Q14[ 2 ] - silk_LSHIFT( cb_row_Q7[ 2 ], 7 );\n        diff_Q14[ 3 ] = in_Q14[ 3 ] - silk_LSHIFT( cb_row_Q7[ 3 ], 7 );\n        diff_Q14[ 4 ] = in_Q14[ 4 ] - silk_LSHIFT( cb_row_Q7[ 4 ], 7 );\n\n        /* Weighted rate */\n        sum1_Q14 = silk_SMULBB( mu_Q9, cl_Q5[ k ] );\n\n\t\t/* Penalty for too large gain */\n\t\tsum1_Q14 = silk_ADD_LSHIFT32( sum1_Q14, silk_max( silk_SUB32( gain_tmp_Q7, max_gain_Q7 ), 0 ), 10 );\n\n        silk_assert( sum1_Q14 >= 0 );\n\n        /* first row of W_Q18 */\n        sum2_Q16 = silk_SMULWB(           W_Q18[  1 ], diff_Q14[ 1 ] );\n        sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[  2 ], diff_Q14[ 2 ] );\n        sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[  3 ], diff_Q14[ 3 ] );\n        sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[  4 ], diff_Q14[ 4 ] );\n        sum2_Q16 = silk_LSHIFT( sum2_Q16, 1 );\n        sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[  0 ], diff_Q14[ 0 ] );\n        sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16,    diff_Q14[ 0 ] );\n\n        /* second row of W_Q18 */\n        sum2_Q16 = silk_SMULWB(           W_Q18[  7 ], diff_Q14[ 2 ] );\n        sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[  8 ], diff_Q14[ 3 ] );\n        sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[  9 ], diff_Q14[ 4 ] );\n        sum2_Q16 = silk_LSHIFT( sum2_Q16, 1 );\n        sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[  6 ], diff_Q14[ 1 ] );\n        sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16,    diff_Q14[ 1 ] );\n\n        /* third row of W_Q18 */\n        sum2_Q16 = silk_SMULWB(           W_Q18[ 13 ], diff_Q14[ 3 ] );\n        sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 14 ], diff_Q14[ 4 ] );\n        sum2_Q16 = silk_LSHIFT( sum2_Q16, 1 );\n        sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 12 ], diff_Q14[ 2 ] );\n        sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16,    diff_Q14[ 2 ] );\n\n        /* fourth row of W_Q18 */\n        sum2_Q16 = silk_SMULWB(           W_Q18[ 19 ], diff_Q14[ 4 ] );\n        sum2_Q16 = silk_LSHIFT( sum2_Q16, 1 );\n        sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 18 ], diff_Q14[ 3 ] );\n        sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16,    diff_Q14[ 3 ] );\n\n        /* last row of W_Q18 */\n        sum2_Q16 = silk_SMULWB(           W_Q18[ 24 ], diff_Q14[ 4 ] );\n        sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16,    diff_Q14[ 4 ] );\n\n        silk_assert( sum1_Q14 >= 0 );\n\n        /* find best */\n        if( sum1_Q14 < *rate_dist_Q14 ) {\n            *rate_dist_Q14 = sum1_Q14;\n            *ind = (opus_int8)k;\n\t\t\t*gain_Q7 = gain_tmp_Q7;\n        }\n\n        /* Go to next cbk vector */\n        cb_row_Q7 += LTP_ORDER;\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/ana_filt_bank_1.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Coefficients for 2-band filter bank based on first-order allpass filters */\nstatic opus_int16 A_fb1_20 = 5394 << 1;\nstatic opus_int16 A_fb1_21 = -24290; /* (opus_int16)(20623 << 1) */\n\n/* Split signal into two decimated bands using first-order allpass filters */\nvoid silk_ana_filt_bank_1(\n    const opus_int16            *in,                /* I    Input signal [N]                                            */\n    opus_int32                  *S,                 /* I/O  State vector [2]                                            */\n    opus_int16                  *outL,              /* O    Low band [N/2]                                              */\n    opus_int16                  *outH,              /* O    High band [N/2]                                             */\n    const opus_int32            N                   /* I    Number of input samples                                     */\n)\n{\n    opus_int      k, N2 = silk_RSHIFT( N, 1 );\n    opus_int32    in32, X, Y, out_1, out_2;\n\n    /* Internal variables and state are in Q10 format */\n    for( k = 0; k < N2; k++ ) {\n        /* Convert to Q10 */\n        in32 = silk_LSHIFT( (opus_int32)in[ 2 * k ], 10 );\n\n        /* All-pass section for even input sample */\n        Y      = silk_SUB32( in32, S[ 0 ] );\n        X      = silk_SMLAWB( Y, Y, A_fb1_21 );\n        out_1  = silk_ADD32( S[ 0 ], X );\n        S[ 0 ] = silk_ADD32( in32, X );\n\n        /* Convert to Q10 */\n        in32 = silk_LSHIFT( (opus_int32)in[ 2 * k + 1 ], 10 );\n\n        /* All-pass section for odd input sample, and add to output of previous section */\n        Y      = silk_SUB32( in32, S[ 1 ] );\n        X      = silk_SMULWB( Y, A_fb1_20 );\n        out_2  = silk_ADD32( S[ 1 ], X );\n        S[ 1 ] = silk_ADD32( in32, X );\n\n        /* Add/subtract, convert back to int16 and store to output */\n        outL[ k ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( silk_ADD32( out_2, out_1 ), 11 ) );\n        outH[ k ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( silk_SUB32( out_2, out_1 ), 11 ) );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/arm/SigProc_FIX_armv4.h",
    "content": "/***********************************************************************\nCopyright (C) 2013 Xiph.Org Foundation and contributors\nCopyright (c) 2013       Parrot\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_SIGPROC_FIX_ARMv4_H\n#define SILK_SIGPROC_FIX_ARMv4_H\n\n#undef silk_MLA\nstatic OPUS_INLINE opus_int32 silk_MLA_armv4(opus_int32 a, opus_int32 b,\n opus_int32 c)\n{\n  opus_int32 res;\n  __asm__(\n      \"#silk_MLA\\n\\t\"\n      \"mla %0, %1, %2, %3\\n\\t\"\n      : \"=&r\"(res)\n      : \"r\"(b), \"r\"(c), \"r\"(a)\n  );\n  return res;\n}\n#define silk_MLA(a, b, c) (silk_MLA_armv4(a, b, c))\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/arm/SigProc_FIX_armv5e.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nCopyright (c) 2013       Parrot\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_SIGPROC_FIX_ARMv5E_H\n#define SILK_SIGPROC_FIX_ARMv5E_H\n\n#undef silk_SMULTT\nstatic OPUS_INLINE opus_int32 silk_SMULTT_armv5e(opus_int32 a, opus_int32 b)\n{\n  opus_int32 res;\n  __asm__(\n      \"#silk_SMULTT\\n\\t\"\n      \"smultt %0, %1, %2\\n\\t\"\n      : \"=r\"(res)\n      : \"%r\"(a), \"r\"(b)\n  );\n  return res;\n}\n#define silk_SMULTT(a, b) (silk_SMULTT_armv5e(a, b))\n\n#undef silk_SMLATT\nstatic OPUS_INLINE opus_int32 silk_SMLATT_armv5e(opus_int32 a, opus_int32 b,\n opus_int32 c)\n{\n  opus_int32 res;\n  __asm__(\n      \"#silk_SMLATT\\n\\t\"\n      \"smlatt %0, %1, %2, %3\\n\\t\"\n      : \"=r\"(res)\n      : \"%r\"(b), \"r\"(c), \"r\"(a)\n  );\n  return res;\n}\n#define silk_SMLATT(a, b, c) (silk_SMLATT_armv5e(a, b, c))\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/arm/macros_armv4.h",
    "content": "/***********************************************************************\nCopyright (C) 2013 Xiph.Org Foundation and contributors.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_MACROS_ARMv4_H\n#define SILK_MACROS_ARMv4_H\n\n/* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */\n#undef silk_SMULWB\nstatic OPUS_INLINE opus_int32 silk_SMULWB_armv4(opus_int32 a, opus_int16 b)\n{\n  unsigned rd_lo;\n  int rd_hi;\n  __asm__(\n      \"#silk_SMULWB\\n\\t\"\n      \"smull %0, %1, %2, %3\\n\\t\"\n      : \"=&r\"(rd_lo), \"=&r\"(rd_hi)\n      : \"%r\"(a), \"r\"(b<<16)\n  );\n  return rd_hi;\n}\n#define silk_SMULWB(a, b) (silk_SMULWB_armv4(a, b))\n\n/* a32 + (b32 * (opus_int32)((opus_int16)(c32))) >> 16 output have to be 32bit int */\n#undef silk_SMLAWB\n#define silk_SMLAWB(a, b, c) ((a) + silk_SMULWB(b, c))\n\n/* (a32 * (b32 >> 16)) >> 16 */\n#undef silk_SMULWT\nstatic OPUS_INLINE opus_int32 silk_SMULWT_armv4(opus_int32 a, opus_int32 b)\n{\n  unsigned rd_lo;\n  int rd_hi;\n  __asm__(\n      \"#silk_SMULWT\\n\\t\"\n      \"smull %0, %1, %2, %3\\n\\t\"\n      : \"=&r\"(rd_lo), \"=&r\"(rd_hi)\n      : \"%r\"(a), \"r\"(b&~0xFFFF)\n  );\n  return rd_hi;\n}\n#define silk_SMULWT(a, b) (silk_SMULWT_armv4(a, b))\n\n/* a32 + (b32 * (c32 >> 16)) >> 16 */\n#undef silk_SMLAWT\n#define silk_SMLAWT(a, b, c) ((a) + silk_SMULWT(b, c))\n\n/* (a32 * b32) >> 16 */\n#undef silk_SMULWW\nstatic OPUS_INLINE opus_int32 silk_SMULWW_armv4(opus_int32 a, opus_int32 b)\n{\n  unsigned rd_lo;\n  int rd_hi;\n  __asm__(\n    \"#silk_SMULWW\\n\\t\"\n    \"smull %0, %1, %2, %3\\n\\t\"\n    : \"=&r\"(rd_lo), \"=&r\"(rd_hi)\n    : \"%r\"(a), \"r\"(b)\n  );\n  return (rd_hi<<16)+(rd_lo>>16);\n}\n#define silk_SMULWW(a, b) (silk_SMULWW_armv4(a, b))\n\n#undef silk_SMLAWW\nstatic OPUS_INLINE opus_int32 silk_SMLAWW_armv4(opus_int32 a, opus_int32 b,\n opus_int32 c)\n{\n  unsigned rd_lo;\n  int rd_hi;\n  __asm__(\n    \"#silk_SMLAWW\\n\\t\"\n    \"smull %0, %1, %2, %3\\n\\t\"\n    : \"=&r\"(rd_lo), \"=&r\"(rd_hi)\n    : \"%r\"(b), \"r\"(c)\n  );\n  return a+(rd_hi<<16)+(rd_lo>>16);\n}\n#define silk_SMLAWW(a, b, c) (silk_SMLAWW_armv4(a, b, c))\n\n#endif /* SILK_MACROS_ARMv4_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/arm/macros_armv5e.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nCopyright (c) 2013       Parrot\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_MACROS_ARMv5E_H\n#define SILK_MACROS_ARMv5E_H\n\n/* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */\n#undef silk_SMULWB\nstatic OPUS_INLINE opus_int32 silk_SMULWB_armv5e(opus_int32 a, opus_int16 b)\n{\n  int res;\n  __asm__(\n      \"#silk_SMULWB\\n\\t\"\n      \"smulwb %0, %1, %2\\n\\t\"\n      : \"=r\"(res)\n      : \"r\"(a), \"r\"(b)\n  );\n  return res;\n}\n#define silk_SMULWB(a, b) (silk_SMULWB_armv5e(a, b))\n\n/* a32 + (b32 * (opus_int32)((opus_int16)(c32))) >> 16 output have to be 32bit int */\n#undef silk_SMLAWB\nstatic OPUS_INLINE opus_int32 silk_SMLAWB_armv5e(opus_int32 a, opus_int32 b,\n opus_int16 c)\n{\n  int res;\n  __asm__(\n      \"#silk_SMLAWB\\n\\t\"\n      \"smlawb %0, %1, %2, %3\\n\\t\"\n      : \"=r\"(res)\n      : \"r\"(b), \"r\"(c), \"r\"(a)\n  );\n  return res;\n}\n#define silk_SMLAWB(a, b, c) (silk_SMLAWB_armv5e(a, b, c))\n\n/* (a32 * (b32 >> 16)) >> 16 */\n#undef silk_SMULWT\nstatic OPUS_INLINE opus_int32 silk_SMULWT_armv5e(opus_int32 a, opus_int32 b)\n{\n  int res;\n  __asm__(\n      \"#silk_SMULWT\\n\\t\"\n      \"smulwt %0, %1, %2\\n\\t\"\n      : \"=r\"(res)\n      : \"r\"(a), \"r\"(b)\n  );\n  return res;\n}\n#define silk_SMULWT(a, b) (silk_SMULWT_armv5e(a, b))\n\n/* a32 + (b32 * (c32 >> 16)) >> 16 */\n#undef silk_SMLAWT\nstatic OPUS_INLINE opus_int32 silk_SMLAWT_armv5e(opus_int32 a, opus_int32 b,\n opus_int32 c)\n{\n  int res;\n  __asm__(\n      \"#silk_SMLAWT\\n\\t\"\n      \"smlawt %0, %1, %2, %3\\n\\t\"\n      : \"=r\"(res)\n      : \"r\"(b), \"r\"(c), \"r\"(a)\n  );\n  return res;\n}\n#define silk_SMLAWT(a, b, c) (silk_SMLAWT_armv5e(a, b, c))\n\n/* (opus_int32)((opus_int16)(a3))) * (opus_int32)((opus_int16)(b32)) output have to be 32bit int */\n#undef silk_SMULBB\nstatic OPUS_INLINE opus_int32 silk_SMULBB_armv5e(opus_int32 a, opus_int32 b)\n{\n  int res;\n  __asm__(\n      \"#silk_SMULBB\\n\\t\"\n      \"smulbb %0, %1, %2\\n\\t\"\n      : \"=r\"(res)\n      : \"%r\"(a), \"r\"(b)\n  );\n  return res;\n}\n#define silk_SMULBB(a, b) (silk_SMULBB_armv5e(a, b))\n\n/* a32 + (opus_int32)((opus_int16)(b32)) * (opus_int32)((opus_int16)(c32)) output have to be 32bit int */\n#undef silk_SMLABB\nstatic OPUS_INLINE opus_int32 silk_SMLABB_armv5e(opus_int32 a, opus_int32 b,\n opus_int32 c)\n{\n  int res;\n  __asm__(\n      \"#silk_SMLABB\\n\\t\"\n      \"smlabb %0, %1, %2, %3\\n\\t\"\n      : \"=r\"(res)\n      : \"%r\"(b), \"r\"(c), \"r\"(a)\n  );\n  return res;\n}\n#define silk_SMLABB(a, b, c) (silk_SMLABB_armv5e(a, b, c))\n\n/* (opus_int32)((opus_int16)(a32)) * (b32 >> 16) */\n#undef silk_SMULBT\nstatic OPUS_INLINE opus_int32 silk_SMULBT_armv5e(opus_int32 a, opus_int32 b)\n{\n  int res;\n  __asm__(\n      \"#silk_SMULBT\\n\\t\"\n      \"smulbt %0, %1, %2\\n\\t\"\n      : \"=r\"(res)\n      : \"r\"(a), \"r\"(b)\n  );\n  return res;\n}\n#define silk_SMULBT(a, b) (silk_SMULBT_armv5e(a, b))\n\n/* a32 + (opus_int32)((opus_int16)(b32)) * (c32 >> 16) */\n#undef silk_SMLABT\nstatic OPUS_INLINE opus_int32 silk_SMLABT_armv5e(opus_int32 a, opus_int32 b,\n opus_int32 c)\n{\n  int res;\n  __asm__(\n      \"#silk_SMLABT\\n\\t\"\n      \"smlabt %0, %1, %2, %3\\n\\t\"\n      : \"=r\"(res)\n      : \"r\"(b), \"r\"(c), \"r\"(a)\n  );\n  return res;\n}\n#define silk_SMLABT(a, b, c) (silk_SMLABT_armv5e(a, b, c))\n\n/* add/subtract with output saturated */\n#undef silk_ADD_SAT32\nstatic OPUS_INLINE opus_int32 silk_ADD_SAT32_armv5e(opus_int32 a, opus_int32 b)\n{\n  int res;\n  __asm__(\n      \"#silk_ADD_SAT32\\n\\t\"\n      \"qadd %0, %1, %2\\n\\t\"\n      : \"=r\"(res)\n      : \"%r\"(a), \"r\"(b)\n  );\n  return res;\n}\n#define silk_ADD_SAT32(a, b) (silk_ADD_SAT32_armv5e(a, b))\n\n#undef silk_SUB_SAT32\nstatic OPUS_INLINE opus_int32 silk_SUB_SAT32_armv5e(opus_int32 a, opus_int32 b)\n{\n  int res;\n  __asm__(\n      \"#silk_SUB_SAT32\\n\\t\"\n      \"qsub %0, %1, %2\\n\\t\"\n      : \"=r\"(res)\n      : \"r\"(a), \"r\"(b)\n  );\n  return res;\n}\n#define silk_SUB_SAT32(a, b) (silk_SUB_SAT32_armv5e(a, b))\n\n#undef silk_CLZ16\nstatic OPUS_INLINE opus_int32 silk_CLZ16_armv5(opus_int16 in16)\n{\n  int res;\n  __asm__(\n      \"#silk_CLZ16\\n\\t\"\n      \"clz %0, %1;\\n\"\n      : \"=r\"(res)\n      : \"r\"(in16<<16|0x8000)\n  );\n  return res;\n}\n#define silk_CLZ16(in16) (silk_CLZ16_armv5(in16))\n\n#undef silk_CLZ32\nstatic OPUS_INLINE opus_int32 silk_CLZ32_armv5(opus_int32 in32)\n{\n  int res;\n  __asm__(\n      \"#silk_CLZ32\\n\\t\"\n      \"clz %0, %1\\n\\t\"\n      : \"=r\"(res)\n      : \"r\"(in32)\n  );\n  return res;\n}\n#define silk_CLZ32(in32) (silk_CLZ32_armv5(in32))\n\n#endif /* SILK_MACROS_ARMv5E_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/biquad_alt.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n/*                                                                      *\n * silk_biquad_alt.c                                              *\n *                                                                      *\n * Second order ARMA filter                                             *\n * Can handle slowly varying filter coefficients                        *\n *                                                                      */\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Second order ARMA filter, alternative implementation */\nvoid silk_biquad_alt(\n    const opus_int16            *in,                /* I     input signal                                               */\n    const opus_int32            *B_Q28,             /* I     MA coefficients [3]                                        */\n    const opus_int32            *A_Q28,             /* I     AR coefficients [2]                                        */\n    opus_int32                  *S,                 /* I/O   State vector [2]                                           */\n    opus_int16                  *out,               /* O     output signal                                              */\n    const opus_int32            len,                /* I     signal length (must be even)                               */\n    opus_int                    stride              /* I     Operate on interleaved signal if > 1                       */\n)\n{\n    /* DIRECT FORM II TRANSPOSED (uses 2 element state vector) */\n    opus_int   k;\n    opus_int32 inval, A0_U_Q28, A0_L_Q28, A1_U_Q28, A1_L_Q28, out32_Q14;\n\n    /* Negate A_Q28 values and split in two parts */\n    A0_L_Q28 = ( -A_Q28[ 0 ] ) & 0x00003FFF;        /* lower part */\n    A0_U_Q28 = silk_RSHIFT( -A_Q28[ 0 ], 14 );      /* upper part */\n    A1_L_Q28 = ( -A_Q28[ 1 ] ) & 0x00003FFF;        /* lower part */\n    A1_U_Q28 = silk_RSHIFT( -A_Q28[ 1 ], 14 );      /* upper part */\n\n    for( k = 0; k < len; k++ ) {\n        /* S[ 0 ], S[ 1 ]: Q12 */\n        inval = in[ k * stride ];\n        out32_Q14 = silk_LSHIFT( silk_SMLAWB( S[ 0 ], B_Q28[ 0 ], inval ), 2 );\n\n        S[ 0 ] = S[1] + silk_RSHIFT_ROUND( silk_SMULWB( out32_Q14, A0_L_Q28 ), 14 );\n        S[ 0 ] = silk_SMLAWB( S[ 0 ], out32_Q14, A0_U_Q28 );\n        S[ 0 ] = silk_SMLAWB( S[ 0 ], B_Q28[ 1 ], inval);\n\n        S[ 1 ] = silk_RSHIFT_ROUND( silk_SMULWB( out32_Q14, A1_L_Q28 ), 14 );\n        S[ 1 ] = silk_SMLAWB( S[ 1 ], out32_Q14, A1_U_Q28 );\n        S[ 1 ] = silk_SMLAWB( S[ 1 ], B_Q28[ 2 ], inval );\n\n        /* Scale back to Q0 and saturate */\n        out[ k * stride ] = (opus_int16)silk_SAT16( silk_RSHIFT( out32_Q14 + (1<<14) - 1, 14 ) );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/bwexpander.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Chirp (bandwidth expand) LP AR filter */\nvoid silk_bwexpander(\n    opus_int16                  *ar,                /* I/O  AR filter to be expanded (without leading 1)                */\n    const opus_int              d,                  /* I    Length of ar                                                */\n    opus_int32                  chirp_Q16           /* I    Chirp factor (typically in the range 0 to 1)                */\n)\n{\n    opus_int   i;\n    opus_int32 chirp_minus_one_Q16 = chirp_Q16 - 65536;\n\n    /* NB: Dont use silk_SMULWB, instead of silk_RSHIFT_ROUND( silk_MUL(), 16 ), below.  */\n    /* Bias in silk_SMULWB can lead to unstable filters                                */\n    for( i = 0; i < d - 1; i++ ) {\n        ar[ i ]    = (opus_int16)silk_RSHIFT_ROUND( silk_MUL( chirp_Q16, ar[ i ]             ), 16 );\n        chirp_Q16 +=            silk_RSHIFT_ROUND( silk_MUL( chirp_Q16, chirp_minus_one_Q16 ), 16 );\n    }\n    ar[ d - 1 ] = (opus_int16)silk_RSHIFT_ROUND( silk_MUL( chirp_Q16, ar[ d - 1 ] ), 16 );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/bwexpander_32.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Chirp (bandwidth expand) LP AR filter */\nvoid silk_bwexpander_32(\n    opus_int32                  *ar,                /* I/O  AR filter to be expanded (without leading 1)                */\n    const opus_int              d,                  /* I    Length of ar                                                */\n    opus_int32                  chirp_Q16           /* I    Chirp factor in Q16                                         */\n)\n{\n    opus_int   i;\n    opus_int32 chirp_minus_one_Q16 = chirp_Q16 - 65536;\n\n    for( i = 0; i < d - 1; i++ ) {\n        ar[ i ]    = silk_SMULWW( chirp_Q16, ar[ i ] );\n        chirp_Q16 += silk_RSHIFT_ROUND( silk_MUL( chirp_Q16, chirp_minus_one_Q16 ), 16 );\n    }\n    ar[ d - 1 ] = silk_SMULWW( chirp_Q16, ar[ d - 1 ] );\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/check_control_input.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"control.h\"\n#include \"errors.h\"\n\n/* Check encoder control struct */\nopus_int check_control_input(\n    silk_EncControlStruct        *encControl                    /* I    Control structure                           */\n)\n{\n    silk_assert( encControl != NULL );\n\n    if( ( ( encControl->API_sampleRate            !=  8000 ) &&\n          ( encControl->API_sampleRate            != 12000 ) &&\n          ( encControl->API_sampleRate            != 16000 ) &&\n          ( encControl->API_sampleRate            != 24000 ) &&\n          ( encControl->API_sampleRate            != 32000 ) &&\n          ( encControl->API_sampleRate            != 44100 ) &&\n          ( encControl->API_sampleRate            != 48000 ) ) ||\n        ( ( encControl->desiredInternalSampleRate !=  8000 ) &&\n          ( encControl->desiredInternalSampleRate != 12000 ) &&\n          ( encControl->desiredInternalSampleRate != 16000 ) ) ||\n        ( ( encControl->maxInternalSampleRate     !=  8000 ) &&\n          ( encControl->maxInternalSampleRate     != 12000 ) &&\n          ( encControl->maxInternalSampleRate     != 16000 ) ) ||\n        ( ( encControl->minInternalSampleRate     !=  8000 ) &&\n          ( encControl->minInternalSampleRate     != 12000 ) &&\n          ( encControl->minInternalSampleRate     != 16000 ) ) ||\n          ( encControl->minInternalSampleRate > encControl->desiredInternalSampleRate ) ||\n          ( encControl->maxInternalSampleRate < encControl->desiredInternalSampleRate ) ||\n          ( encControl->minInternalSampleRate > encControl->maxInternalSampleRate ) ) {\n        silk_assert( 0 );\n        return SILK_ENC_FS_NOT_SUPPORTED;\n    }\n    if( encControl->payloadSize_ms != 10 &&\n        encControl->payloadSize_ms != 20 &&\n        encControl->payloadSize_ms != 40 &&\n        encControl->payloadSize_ms != 60 ) {\n        silk_assert( 0 );\n        return SILK_ENC_PACKET_SIZE_NOT_SUPPORTED;\n    }\n    if( encControl->packetLossPercentage < 0 || encControl->packetLossPercentage > 100 ) {\n        silk_assert( 0 );\n        return SILK_ENC_INVALID_LOSS_RATE;\n    }\n    if( encControl->useDTX < 0 || encControl->useDTX > 1 ) {\n        silk_assert( 0 );\n        return SILK_ENC_INVALID_DTX_SETTING;\n    }\n    if( encControl->useCBR < 0 || encControl->useCBR > 1 ) {\n        silk_assert( 0 );\n        return SILK_ENC_INVALID_CBR_SETTING;\n    }\n    if( encControl->useInBandFEC < 0 || encControl->useInBandFEC > 1 ) {\n        silk_assert( 0 );\n        return SILK_ENC_INVALID_INBAND_FEC_SETTING;\n    }\n    if( encControl->nChannelsAPI < 1 || encControl->nChannelsAPI > ENCODER_NUM_CHANNELS ) {\n        silk_assert( 0 );\n        return SILK_ENC_INVALID_NUMBER_OF_CHANNELS_ERROR;\n    }\n    if( encControl->nChannelsInternal < 1 || encControl->nChannelsInternal > ENCODER_NUM_CHANNELS ) {\n        silk_assert( 0 );\n        return SILK_ENC_INVALID_NUMBER_OF_CHANNELS_ERROR;\n    }\n    if( encControl->nChannelsInternal > encControl->nChannelsAPI ) {\n        silk_assert( 0 );\n        return SILK_ENC_INVALID_NUMBER_OF_CHANNELS_ERROR;\n    }\n    if( encControl->complexity < 0 || encControl->complexity > 10 ) {\n        silk_assert( 0 );\n        return SILK_ENC_INVALID_COMPLEXITY_SETTING;\n    }\n\n    return SILK_NO_ERROR;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/code_signs.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/*#define silk_enc_map(a)                ((a) > 0 ? 1 : 0)*/\n/*#define silk_dec_map(a)                ((a) > 0 ? 1 : -1)*/\n/* shifting avoids if-statement */\n#define silk_enc_map(a)                  ( silk_RSHIFT( (a), 15 ) + 1 )\n#define silk_dec_map(a)                  ( silk_LSHIFT( (a),  1 ) - 1 )\n\n/* Encodes signs of excitation */\nvoid silk_encode_signs(\n    ec_enc                      *psRangeEnc,                        /* I/O  Compressor data structure                   */\n    const opus_int8             pulses[],                           /* I    pulse signal                                */\n    opus_int                    length,                             /* I    length of input                             */\n    const opus_int              signalType,                         /* I    Signal type                                 */\n    const opus_int              quantOffsetType,                    /* I    Quantization offset type                    */\n    const opus_int              sum_pulses[ MAX_NB_SHELL_BLOCKS ]   /* I    Sum of absolute pulses per block            */\n)\n{\n    opus_int         i, j, p;\n    opus_uint8       icdf[ 2 ];\n    const opus_int8  *q_ptr;\n    const opus_uint8 *icdf_ptr;\n\n    icdf[ 1 ] = 0;\n    q_ptr = pulses;\n    i = silk_SMULBB( 7, silk_ADD_LSHIFT( quantOffsetType, signalType, 1 ) );\n    icdf_ptr = &silk_sign_iCDF[ i ];\n    length = silk_RSHIFT( length + SHELL_CODEC_FRAME_LENGTH/2, LOG2_SHELL_CODEC_FRAME_LENGTH );\n    for( i = 0; i < length; i++ ) {\n        p = sum_pulses[ i ];\n        if( p > 0 ) {\n            icdf[ 0 ] = icdf_ptr[ silk_min( p & 0x1F, 6 ) ];\n            for( j = 0; j < SHELL_CODEC_FRAME_LENGTH; j++ ) {\n                if( q_ptr[ j ] != 0 ) {\n                    ec_enc_icdf( psRangeEnc, silk_enc_map( q_ptr[ j ]), icdf, 8 );\n                }\n            }\n        }\n        q_ptr += SHELL_CODEC_FRAME_LENGTH;\n    }\n}\n\n/* Decodes signs of excitation */\nvoid silk_decode_signs(\n    ec_dec                      *psRangeDec,                        /* I/O  Compressor data structure                   */\n    opus_int                    pulses[],                           /* I/O  pulse signal                                */\n    opus_int                    length,                             /* I    length of input                             */\n    const opus_int              signalType,                         /* I    Signal type                                 */\n    const opus_int              quantOffsetType,                    /* I    Quantization offset type                    */\n    const opus_int              sum_pulses[ MAX_NB_SHELL_BLOCKS ]   /* I    Sum of absolute pulses per block            */\n)\n{\n    opus_int         i, j, p;\n    opus_uint8       icdf[ 2 ];\n    opus_int         *q_ptr;\n    const opus_uint8 *icdf_ptr;\n\n    icdf[ 1 ] = 0;\n    q_ptr = pulses;\n    i = silk_SMULBB( 7, silk_ADD_LSHIFT( quantOffsetType, signalType, 1 ) );\n    icdf_ptr = &silk_sign_iCDF[ i ];\n    length = silk_RSHIFT( length + SHELL_CODEC_FRAME_LENGTH/2, LOG2_SHELL_CODEC_FRAME_LENGTH );\n    for( i = 0; i < length; i++ ) {\n        p = sum_pulses[ i ];\n        if( p > 0 ) {\n            icdf[ 0 ] = icdf_ptr[ silk_min( p & 0x1F, 6 ) ];\n            for( j = 0; j < SHELL_CODEC_FRAME_LENGTH; j++ ) {\n                if( q_ptr[ j ] > 0 ) {\n                    /* attach sign */\n#if 0\n                    /* conditional implementation */\n                    if( ec_dec_icdf( psRangeDec, icdf, 8 ) == 0 ) {\n                        q_ptr[ j ] = -q_ptr[ j ];\n                    }\n#else\n                    /* implementation with shift, subtraction, multiplication */\n                    q_ptr[ j ] *= silk_dec_map( ec_dec_icdf( psRangeDec, icdf, 8 ) );\n#endif\n                }\n            }\n        }\n        q_ptr += SHELL_CODEC_FRAME_LENGTH;\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/control.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_CONTROL_H\n#define SILK_CONTROL_H\n\n#include \"typedef.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n/* Decoder API flags */\n#define FLAG_DECODE_NORMAL                      0\n#define FLAG_PACKET_LOST                        1\n#define FLAG_DECODE_LBRR                        2\n\n/***********************************************/\n/* Structure for controlling encoder operation */\n/***********************************************/\ntypedef struct {\n    /* I:   Number of channels; 1/2                                                         */\n    opus_int32 nChannelsAPI;\n\n    /* I:   Number of channels; 1/2                                                         */\n    opus_int32 nChannelsInternal;\n\n    /* I:   Input signal sampling rate in Hertz; 8000/12000/16000/24000/32000/44100/48000   */\n    opus_int32 API_sampleRate;\n\n    /* I:   Maximum internal sampling rate in Hertz; 8000/12000/16000                       */\n    opus_int32 maxInternalSampleRate;\n\n    /* I:   Minimum internal sampling rate in Hertz; 8000/12000/16000                       */\n    opus_int32 minInternalSampleRate;\n\n    /* I:   Soft request for internal sampling rate in Hertz; 8000/12000/16000              */\n    opus_int32 desiredInternalSampleRate;\n\n    /* I:   Number of samples per packet in milliseconds; 10/20/40/60                       */\n    opus_int payloadSize_ms;\n\n    /* I:   Bitrate during active speech in bits/second; internally limited                 */\n    opus_int32 bitRate;\n\n    /* I:   Uplink packet loss in percent (0-100)                                           */\n    opus_int packetLossPercentage;\n\n    /* I:   Complexity mode; 0 is lowest, 10 is highest complexity                          */\n    opus_int complexity;\n\n    /* I:   Flag to enable in-band Forward Error Correction (FEC); 0/1                      */\n    opus_int useInBandFEC;\n\n    /* I:   Flag to enable discontinuous transmission (DTX); 0/1                            */\n    opus_int useDTX;\n\n    /* I:   Flag to use constant bitrate                                                    */\n    opus_int useCBR;\n\n    /* I:   Maximum number of bits allowed for the frame                                    */\n    opus_int maxBits;\n\n    /* I:   Causes a smooth downmix to mono                                                 */\n    opus_int toMono;\n\n    /* I:   Opus encoder is allowing us to switch bandwidth                                 */\n    opus_int opusCanSwitch;\n\n    /* I: Make frames as independent as possible (but still use LPC)                        */\n    opus_int reducedDependency;\n\n    /* O:   Internal sampling rate used, in Hertz; 8000/12000/16000                         */\n    opus_int32 internalSampleRate;\n\n    /* O: Flag that bandwidth switching is allowed (because low voice activity)             */\n    opus_int allowBandwidthSwitch;\n\n    /* O:   Flag that SILK runs in WB mode without variable LP filter (use for switching between WB/SWB/FB) */\n    opus_int inWBmodeWithoutVariableLP;\n\n    /* O:   Stereo width */\n    opus_int stereoWidth_Q14;\n\n    /* O:   Tells the Opus encoder we're ready to switch                                    */\n    opus_int switchReady;\n\n} silk_EncControlStruct;\n\n/**************************************************************************/\n/* Structure for controlling decoder operation and reading decoder status */\n/**************************************************************************/\ntypedef struct {\n    /* I:   Number of channels; 1/2                                                         */\n    opus_int32 nChannelsAPI;\n\n    /* I:   Number of channels; 1/2                                                         */\n    opus_int32 nChannelsInternal;\n\n    /* I:   Output signal sampling rate in Hertz; 8000/12000/16000/24000/32000/44100/48000  */\n    opus_int32 API_sampleRate;\n\n    /* I:   Internal sampling rate used, in Hertz; 8000/12000/16000                         */\n    opus_int32 internalSampleRate;\n\n    /* I:   Number of samples per packet in milliseconds; 10/20/40/60                       */\n    opus_int payloadSize_ms;\n\n    /* O:   Pitch lag of previous frame (0 if unvoiced), measured in samples at 48 kHz      */\n    opus_int prevPitchLag;\n} silk_DecControlStruct;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/control_SNR.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"tuning_parameters.h\"\n\n/* Control SNR of redidual quantizer */\nopus_int silk_control_SNR(\n    silk_encoder_state          *psEncC,                        /* I/O  Pointer to Silk encoder state               */\n    opus_int32                  TargetRate_bps                  /* I    Target max bitrate (bps)                    */\n)\n{\n    opus_int k, ret = SILK_NO_ERROR;\n    opus_int32 frac_Q6;\n    const opus_int32 *rateTable;\n\n    /* Set bitrate/coding quality */\n    TargetRate_bps = silk_LIMIT( TargetRate_bps, MIN_TARGET_RATE_BPS, MAX_TARGET_RATE_BPS );\n    if( TargetRate_bps != psEncC->TargetRate_bps ) {\n        psEncC->TargetRate_bps = TargetRate_bps;\n\n        /* If new TargetRate_bps, translate to SNR_dB value */\n        if( psEncC->fs_kHz == 8 ) {\n            rateTable = silk_TargetRate_table_NB;\n        } else if( psEncC->fs_kHz == 12 ) {\n            rateTable = silk_TargetRate_table_MB;\n        } else {\n            rateTable = silk_TargetRate_table_WB;\n        }\n\n        /* Reduce bitrate for 10 ms modes in these calculations */\n        if( psEncC->nb_subfr == 2 ) {\n            TargetRate_bps -= REDUCE_BITRATE_10_MS_BPS;\n        }\n\n        /* Find bitrate interval in table and interpolate */\n        for( k = 1; k < TARGET_RATE_TAB_SZ; k++ ) {\n            if( TargetRate_bps <= rateTable[ k ] ) {\n                frac_Q6 = silk_DIV32( silk_LSHIFT( TargetRate_bps - rateTable[ k - 1 ], 6 ),\n                                                 rateTable[ k ] - rateTable[ k - 1 ] );\n                psEncC->SNR_dB_Q7 = silk_LSHIFT( silk_SNR_table_Q1[ k - 1 ], 6 ) + silk_MUL( frac_Q6, silk_SNR_table_Q1[ k ] - silk_SNR_table_Q1[ k - 1 ] );\n                break;\n            }\n        }\n\n        /* Reduce coding quality whenever LBRR is enabled, to free up some bits */\n        if( psEncC->LBRR_enabled ) {\n            psEncC->SNR_dB_Q7 = silk_SMLABB( psEncC->SNR_dB_Q7, 12 - psEncC->LBRR_GainIncreases, SILK_FIX_CONST( -0.25, 7 ) );\n        }\n    }\n\n    return ret;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/control_audio_bandwidth.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"tuning_parameters.h\"\n\n/* Control internal sampling rate */\nopus_int silk_control_audio_bandwidth(\n    silk_encoder_state          *psEncC,                        /* I/O  Pointer to Silk encoder state               */\n    silk_EncControlStruct       *encControl                     /* I    Control structure                           */\n)\n{\n    opus_int   fs_kHz;\n    opus_int32 fs_Hz;\n\n    fs_kHz = psEncC->fs_kHz;\n    fs_Hz = silk_SMULBB( fs_kHz, 1000 );\n    if( fs_Hz == 0 ) {\n        /* Encoder has just been initialized */\n        fs_Hz  = silk_min( psEncC->desiredInternal_fs_Hz, psEncC->API_fs_Hz );\n        fs_kHz = silk_DIV32_16( fs_Hz, 1000 );\n    } else if( fs_Hz > psEncC->API_fs_Hz || fs_Hz > psEncC->maxInternal_fs_Hz || fs_Hz < psEncC->minInternal_fs_Hz ) {\n        /* Make sure internal rate is not higher than external rate or maximum allowed, or lower than minimum allowed */\n        fs_Hz  = psEncC->API_fs_Hz;\n        fs_Hz  = silk_min( fs_Hz, psEncC->maxInternal_fs_Hz );\n        fs_Hz  = silk_max( fs_Hz, psEncC->minInternal_fs_Hz );\n        fs_kHz = silk_DIV32_16( fs_Hz, 1000 );\n    } else {\n        /* State machine for the internal sampling rate switching */\n        if( psEncC->sLP.transition_frame_no >= TRANSITION_FRAMES ) {\n            /* Stop transition phase */\n            psEncC->sLP.mode = 0;\n        }\n        if( psEncC->allow_bandwidth_switch || encControl->opusCanSwitch ) {\n            /* Check if we should switch down */\n            if( silk_SMULBB( psEncC->fs_kHz, 1000 ) > psEncC->desiredInternal_fs_Hz )\n            {\n                /* Switch down */\n                if( psEncC->sLP.mode == 0 ) {\n                    /* New transition */\n                    psEncC->sLP.transition_frame_no = TRANSITION_FRAMES;\n\n                    /* Reset transition filter state */\n                    silk_memset( psEncC->sLP.In_LP_State, 0, sizeof( psEncC->sLP.In_LP_State ) );\n                }\n                if( encControl->opusCanSwitch ) {\n                    /* Stop transition phase */\n                    psEncC->sLP.mode = 0;\n\n                    /* Switch to a lower sample frequency */\n                    fs_kHz = psEncC->fs_kHz == 16 ? 12 : 8;\n                } else {\n                   if( psEncC->sLP.transition_frame_no <= 0 ) {\n                       encControl->switchReady = 1;\n                       /* Make room for redundancy */\n                       encControl->maxBits -= encControl->maxBits * 5 / ( encControl->payloadSize_ms + 5 );\n                   } else {\n                       /* Direction: down (at double speed) */\n                       psEncC->sLP.mode = -2;\n                   }\n                }\n            }\n            else\n            /* Check if we should switch up */\n            if( silk_SMULBB( psEncC->fs_kHz, 1000 ) < psEncC->desiredInternal_fs_Hz )\n            {\n                /* Switch up */\n                if( encControl->opusCanSwitch ) {\n                    /* Switch to a higher sample frequency */\n                    fs_kHz = psEncC->fs_kHz == 8 ? 12 : 16;\n\n                    /* New transition */\n                    psEncC->sLP.transition_frame_no = 0;\n\n                    /* Reset transition filter state */\n                    silk_memset( psEncC->sLP.In_LP_State, 0, sizeof( psEncC->sLP.In_LP_State ) );\n\n                    /* Direction: up */\n                    psEncC->sLP.mode = 1;\n                } else {\n                   if( psEncC->sLP.mode == 0 ) {\n                       encControl->switchReady = 1;\n                       /* Make room for redundancy */\n                       encControl->maxBits -= encControl->maxBits * 5 / ( encControl->payloadSize_ms + 5 );\n                   } else {\n                       /* Direction: up */\n                       psEncC->sLP.mode = 1;\n                   }\n                }\n            } else {\n               if (psEncC->sLP.mode<0)\n                  psEncC->sLP.mode = 1;\n            }\n        }\n    }\n\n    return fs_kHz;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/control_codec.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n#ifdef FIXED_POINT\n#include \"main_FIX.h\"\n#define silk_encoder_state_Fxx      silk_encoder_state_FIX\n#else\n#include \"main_FLP.h\"\n#define silk_encoder_state_Fxx      silk_encoder_state_FLP\n#endif\n#include \"stack_alloc.h\"\n#include \"tuning_parameters.h\"\n#include \"pitch_est_defines.h\"\n\nstatic opus_int silk_setup_resamplers(\n    silk_encoder_state_Fxx          *psEnc,             /* I/O                      */\n    opus_int                        fs_kHz              /* I                        */\n);\n\nstatic opus_int silk_setup_fs(\n    silk_encoder_state_Fxx          *psEnc,             /* I/O                      */\n    opus_int                        fs_kHz,             /* I                        */\n    opus_int                        PacketSize_ms       /* I                        */\n);\n\nstatic opus_int silk_setup_complexity(\n    silk_encoder_state              *psEncC,            /* I/O                      */\n    opus_int                        Complexity          /* I                        */\n);\n\nstatic OPUS_INLINE opus_int silk_setup_LBRR(\n    silk_encoder_state              *psEncC,            /* I/O                      */\n    const opus_int32                TargetRate_bps      /* I                        */\n);\n\n\n/* Control encoder */\nopus_int silk_control_encoder(\n    silk_encoder_state_Fxx          *psEnc,                                 /* I/O  Pointer to Silk encoder state                                               */\n    silk_EncControlStruct           *encControl,                            /* I    Control structure                                                           */\n    const opus_int32                TargetRate_bps,                         /* I    Target max bitrate (bps)                                                    */\n    const opus_int                  allow_bw_switch,                        /* I    Flag to allow switching audio bandwidth                                     */\n    const opus_int                  channelNb,                              /* I    Channel number                                                              */\n    const opus_int                  force_fs_kHz\n)\n{\n    opus_int   fs_kHz, ret = 0;\n\n    psEnc->sCmn.useDTX                 = encControl->useDTX;\n    psEnc->sCmn.useCBR                 = encControl->useCBR;\n    psEnc->sCmn.API_fs_Hz              = encControl->API_sampleRate;\n    psEnc->sCmn.maxInternal_fs_Hz      = encControl->maxInternalSampleRate;\n    psEnc->sCmn.minInternal_fs_Hz      = encControl->minInternalSampleRate;\n    psEnc->sCmn.desiredInternal_fs_Hz  = encControl->desiredInternalSampleRate;\n    psEnc->sCmn.useInBandFEC           = encControl->useInBandFEC;\n    psEnc->sCmn.nChannelsAPI           = encControl->nChannelsAPI;\n    psEnc->sCmn.nChannelsInternal      = encControl->nChannelsInternal;\n    psEnc->sCmn.allow_bandwidth_switch = allow_bw_switch;\n    psEnc->sCmn.channelNb              = channelNb;\n\n    if( psEnc->sCmn.controlled_since_last_payload != 0 && psEnc->sCmn.prefillFlag == 0 ) {\n        if( psEnc->sCmn.API_fs_Hz != psEnc->sCmn.prev_API_fs_Hz && psEnc->sCmn.fs_kHz > 0 ) {\n            /* Change in API sampling rate in the middle of encoding a packet */\n            ret += silk_setup_resamplers( psEnc, psEnc->sCmn.fs_kHz );\n        }\n        return ret;\n    }\n\n    /* Beyond this point we know that there are no previously coded frames in the payload buffer */\n\n    /********************************************/\n    /* Determine internal sampling rate         */\n    /********************************************/\n    fs_kHz = silk_control_audio_bandwidth( &psEnc->sCmn, encControl );\n    if( force_fs_kHz ) {\n       fs_kHz = force_fs_kHz;\n    }\n    /********************************************/\n    /* Prepare resampler and buffered data      */\n    /********************************************/\n    ret += silk_setup_resamplers( psEnc, fs_kHz );\n\n    /********************************************/\n    /* Set internal sampling frequency          */\n    /********************************************/\n    ret += silk_setup_fs( psEnc, fs_kHz, encControl->payloadSize_ms );\n\n    /********************************************/\n    /* Set encoding complexity                  */\n    /********************************************/\n    ret += silk_setup_complexity( &psEnc->sCmn, encControl->complexity  );\n\n    /********************************************/\n    /* Set packet loss rate measured by farend  */\n    /********************************************/\n    psEnc->sCmn.PacketLoss_perc = encControl->packetLossPercentage;\n\n    /********************************************/\n    /* Set LBRR usage                           */\n    /********************************************/\n    ret += silk_setup_LBRR( &psEnc->sCmn, TargetRate_bps );\n\n    psEnc->sCmn.controlled_since_last_payload = 1;\n\n    return ret;\n}\n\nstatic opus_int silk_setup_resamplers(\n    silk_encoder_state_Fxx          *psEnc,             /* I/O                      */\n    opus_int                         fs_kHz              /* I                        */\n)\n{\n    opus_int   ret = SILK_NO_ERROR;\n    SAVE_STACK;\n\n    if( psEnc->sCmn.fs_kHz != fs_kHz || psEnc->sCmn.prev_API_fs_Hz != psEnc->sCmn.API_fs_Hz )\n    {\n        if( psEnc->sCmn.fs_kHz == 0 ) {\n            /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */\n            ret += silk_resampler_init( &psEnc->sCmn.resampler_state, psEnc->sCmn.API_fs_Hz, fs_kHz * 1000, 1 );\n        } else {\n            VARDECL( opus_int16, x_buf_API_fs_Hz );\n            VARDECL( silk_resampler_state_struct, temp_resampler_state );\n#ifdef FIXED_POINT\n            opus_int16 *x_bufFIX = psEnc->x_buf;\n#else\n            VARDECL( opus_int16, x_bufFIX );\n            opus_int32 new_buf_samples;\n#endif\n            opus_int32 api_buf_samples;\n            opus_int32 old_buf_samples;\n            opus_int32 buf_length_ms;\n\n            buf_length_ms = silk_LSHIFT( psEnc->sCmn.nb_subfr * 5, 1 ) + LA_SHAPE_MS;\n            old_buf_samples = buf_length_ms * psEnc->sCmn.fs_kHz;\n\n#ifndef FIXED_POINT\n            new_buf_samples = buf_length_ms * fs_kHz;\n            ALLOC( x_bufFIX, silk_max( old_buf_samples, new_buf_samples ),\n                   opus_int16 );\n            silk_float2short_array( x_bufFIX, psEnc->x_buf, old_buf_samples );\n#endif\n\n            /* Initialize resampler for temporary resampling of x_buf data to API_fs_Hz */\n            ALLOC( temp_resampler_state, 1, silk_resampler_state_struct );\n            ret += silk_resampler_init( temp_resampler_state, silk_SMULBB( psEnc->sCmn.fs_kHz, 1000 ), psEnc->sCmn.API_fs_Hz, 0 );\n\n            /* Calculate number of samples to temporarily upsample */\n            api_buf_samples = buf_length_ms * silk_DIV32_16( psEnc->sCmn.API_fs_Hz, 1000 );\n\n            /* Temporary resampling of x_buf data to API_fs_Hz */\n            ALLOC( x_buf_API_fs_Hz, api_buf_samples, opus_int16 );\n            ret += silk_resampler( temp_resampler_state, x_buf_API_fs_Hz, x_bufFIX, old_buf_samples );\n\n            /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */\n            ret += silk_resampler_init( &psEnc->sCmn.resampler_state, psEnc->sCmn.API_fs_Hz, silk_SMULBB( fs_kHz, 1000 ), 1 );\n\n            /* Correct resampler state by resampling buffered data from API_fs_Hz to fs_kHz */\n            ret += silk_resampler( &psEnc->sCmn.resampler_state, x_bufFIX, x_buf_API_fs_Hz, api_buf_samples );\n\n#ifndef FIXED_POINT\n            silk_short2float_array( psEnc->x_buf, x_bufFIX, new_buf_samples);\n#endif\n        }\n    }\n\n    psEnc->sCmn.prev_API_fs_Hz = psEnc->sCmn.API_fs_Hz;\n\n    RESTORE_STACK;\n    return ret;\n}\n\nstatic opus_int silk_setup_fs(\n    silk_encoder_state_Fxx          *psEnc,             /* I/O                      */\n    opus_int                        fs_kHz,             /* I                        */\n    opus_int                        PacketSize_ms       /* I                        */\n)\n{\n    opus_int ret = SILK_NO_ERROR;\n\n    /* Set packet size */\n    if( PacketSize_ms != psEnc->sCmn.PacketSize_ms ) {\n        if( ( PacketSize_ms !=  10 ) &&\n            ( PacketSize_ms !=  20 ) &&\n            ( PacketSize_ms !=  40 ) &&\n            ( PacketSize_ms !=  60 ) ) {\n            ret = SILK_ENC_PACKET_SIZE_NOT_SUPPORTED;\n        }\n        if( PacketSize_ms <= 10 ) {\n            psEnc->sCmn.nFramesPerPacket = 1;\n            psEnc->sCmn.nb_subfr = PacketSize_ms == 10 ? 2 : 1;\n            psEnc->sCmn.frame_length = silk_SMULBB( PacketSize_ms, fs_kHz );\n            psEnc->sCmn.pitch_LPC_win_length = silk_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, fs_kHz );\n            if( psEnc->sCmn.fs_kHz == 8 ) {\n                psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_10_ms_NB_iCDF;\n            } else {\n                psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_10_ms_iCDF;\n            }\n        } else {\n            psEnc->sCmn.nFramesPerPacket = silk_DIV32_16( PacketSize_ms, MAX_FRAME_LENGTH_MS );\n            psEnc->sCmn.nb_subfr = MAX_NB_SUBFR;\n            psEnc->sCmn.frame_length = silk_SMULBB( 20, fs_kHz );\n            psEnc->sCmn.pitch_LPC_win_length = silk_SMULBB( FIND_PITCH_LPC_WIN_MS, fs_kHz );\n            if( psEnc->sCmn.fs_kHz == 8 ) {\n                psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_NB_iCDF;\n            } else {\n                psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_iCDF;\n            }\n        }\n        psEnc->sCmn.PacketSize_ms  = PacketSize_ms;\n        psEnc->sCmn.TargetRate_bps = 0;         /* trigger new SNR computation */\n    }\n\n    /* Set internal sampling frequency */\n    silk_assert( fs_kHz == 8 || fs_kHz == 12 || fs_kHz == 16 );\n    silk_assert( psEnc->sCmn.nb_subfr == 2 || psEnc->sCmn.nb_subfr == 4 );\n    if( psEnc->sCmn.fs_kHz != fs_kHz ) {\n        /* reset part of the state */\n        silk_memset( &psEnc->sShape,               0, sizeof( psEnc->sShape ) );\n        silk_memset( &psEnc->sPrefilt,             0, sizeof( psEnc->sPrefilt ) );\n        silk_memset( &psEnc->sCmn.sNSQ,            0, sizeof( psEnc->sCmn.sNSQ ) );\n        silk_memset( psEnc->sCmn.prev_NLSFq_Q15,   0, sizeof( psEnc->sCmn.prev_NLSFq_Q15 ) );\n        silk_memset( &psEnc->sCmn.sLP.In_LP_State, 0, sizeof( psEnc->sCmn.sLP.In_LP_State ) );\n        psEnc->sCmn.inputBufIx                  = 0;\n        psEnc->sCmn.nFramesEncoded              = 0;\n        psEnc->sCmn.TargetRate_bps              = 0;     /* trigger new SNR computation */\n\n        /* Initialize non-zero parameters */\n        psEnc->sCmn.prevLag                     = 100;\n        psEnc->sCmn.first_frame_after_reset     = 1;\n        psEnc->sPrefilt.lagPrev                 = 100;\n        psEnc->sShape.LastGainIndex             = 10;\n        psEnc->sCmn.sNSQ.lagPrev                = 100;\n        psEnc->sCmn.sNSQ.prev_gain_Q16          = 65536;\n        psEnc->sCmn.prevSignalType              = TYPE_NO_VOICE_ACTIVITY;\n\n        psEnc->sCmn.fs_kHz = fs_kHz;\n        if( psEnc->sCmn.fs_kHz == 8 ) {\n            if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ) {\n                psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_NB_iCDF;\n            } else {\n                psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_10_ms_NB_iCDF;\n            }\n        } else {\n            if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ) {\n                psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_iCDF;\n            } else {\n                psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_10_ms_iCDF;\n            }\n        }\n        if( psEnc->sCmn.fs_kHz == 8 || psEnc->sCmn.fs_kHz == 12 ) {\n            psEnc->sCmn.predictLPCOrder = MIN_LPC_ORDER;\n            psEnc->sCmn.psNLSF_CB  = &silk_NLSF_CB_NB_MB;\n        } else {\n            psEnc->sCmn.predictLPCOrder = MAX_LPC_ORDER;\n            psEnc->sCmn.psNLSF_CB  = &silk_NLSF_CB_WB;\n        }\n        psEnc->sCmn.subfr_length   = SUB_FRAME_LENGTH_MS * fs_kHz;\n        psEnc->sCmn.frame_length   = silk_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );\n        psEnc->sCmn.ltp_mem_length = silk_SMULBB( LTP_MEM_LENGTH_MS, fs_kHz );\n        psEnc->sCmn.la_pitch       = silk_SMULBB( LA_PITCH_MS, fs_kHz );\n        psEnc->sCmn.max_pitch_lag  = silk_SMULBB( 18, fs_kHz );\n        if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ) {\n            psEnc->sCmn.pitch_LPC_win_length = silk_SMULBB( FIND_PITCH_LPC_WIN_MS, fs_kHz );\n        } else {\n            psEnc->sCmn.pitch_LPC_win_length = silk_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, fs_kHz );\n        }\n        if( psEnc->sCmn.fs_kHz == 16 ) {\n            psEnc->sCmn.mu_LTP_Q9 = SILK_FIX_CONST( MU_LTP_QUANT_WB, 9 );\n            psEnc->sCmn.pitch_lag_low_bits_iCDF = silk_uniform8_iCDF;\n        } else if( psEnc->sCmn.fs_kHz == 12 ) {\n            psEnc->sCmn.mu_LTP_Q9 = SILK_FIX_CONST( MU_LTP_QUANT_MB, 9 );\n            psEnc->sCmn.pitch_lag_low_bits_iCDF = silk_uniform6_iCDF;\n        } else {\n            psEnc->sCmn.mu_LTP_Q9 = SILK_FIX_CONST( MU_LTP_QUANT_NB, 9 );\n            psEnc->sCmn.pitch_lag_low_bits_iCDF = silk_uniform4_iCDF;\n        }\n    }\n\n    /* Check that settings are valid */\n    silk_assert( ( psEnc->sCmn.subfr_length * psEnc->sCmn.nb_subfr ) == psEnc->sCmn.frame_length );\n\n    return ret;\n}\n\nstatic opus_int silk_setup_complexity(\n    silk_encoder_state              *psEncC,            /* I/O                      */\n    opus_int                        Complexity          /* I                        */\n)\n{\n    opus_int ret = 0;\n\n    /* Set encoding complexity */\n    silk_assert( Complexity >= 0 && Complexity <= 10 );\n    if( Complexity < 2 ) {\n        psEncC->pitchEstimationComplexity       = SILK_PE_MIN_COMPLEX;\n        psEncC->pitchEstimationThreshold_Q16    = SILK_FIX_CONST( 0.8, 16 );\n        psEncC->pitchEstimationLPCOrder         = 6;\n        psEncC->shapingLPCOrder                 = 8;\n        psEncC->la_shape                        = 3 * psEncC->fs_kHz;\n        psEncC->nStatesDelayedDecision          = 1;\n        psEncC->useInterpolatedNLSFs            = 0;\n        psEncC->LTPQuantLowComplexity           = 1;\n        psEncC->NLSF_MSVQ_Survivors             = 2;\n        psEncC->warping_Q16                     = 0;\n    } else if( Complexity < 4 ) {\n        psEncC->pitchEstimationComplexity       = SILK_PE_MID_COMPLEX;\n        psEncC->pitchEstimationThreshold_Q16    = SILK_FIX_CONST( 0.76, 16 );\n        psEncC->pitchEstimationLPCOrder         = 8;\n        psEncC->shapingLPCOrder                 = 10;\n        psEncC->la_shape                        = 5 * psEncC->fs_kHz;\n        psEncC->nStatesDelayedDecision          = 1;\n        psEncC->useInterpolatedNLSFs            = 0;\n        psEncC->LTPQuantLowComplexity           = 0;\n        psEncC->NLSF_MSVQ_Survivors             = 4;\n        psEncC->warping_Q16                     = 0;\n    } else if( Complexity < 6 ) {\n        psEncC->pitchEstimationComplexity       = SILK_PE_MID_COMPLEX;\n        psEncC->pitchEstimationThreshold_Q16    = SILK_FIX_CONST( 0.74, 16 );\n        psEncC->pitchEstimationLPCOrder         = 10;\n        psEncC->shapingLPCOrder                 = 12;\n        psEncC->la_shape                        = 5 * psEncC->fs_kHz;\n        psEncC->nStatesDelayedDecision          = 2;\n        psEncC->useInterpolatedNLSFs            = 1;\n        psEncC->LTPQuantLowComplexity           = 0;\n        psEncC->NLSF_MSVQ_Survivors             = 8;\n        psEncC->warping_Q16                     = psEncC->fs_kHz * SILK_FIX_CONST( WARPING_MULTIPLIER, 16 );\n    } else if( Complexity < 8 ) {\n        psEncC->pitchEstimationComplexity       = SILK_PE_MID_COMPLEX;\n        psEncC->pitchEstimationThreshold_Q16    = SILK_FIX_CONST( 0.72, 16 );\n        psEncC->pitchEstimationLPCOrder         = 12;\n        psEncC->shapingLPCOrder                 = 14;\n        psEncC->la_shape                        = 5 * psEncC->fs_kHz;\n        psEncC->nStatesDelayedDecision          = 3;\n        psEncC->useInterpolatedNLSFs            = 1;\n        psEncC->LTPQuantLowComplexity           = 0;\n        psEncC->NLSF_MSVQ_Survivors             = 16;\n        psEncC->warping_Q16                     = psEncC->fs_kHz * SILK_FIX_CONST( WARPING_MULTIPLIER, 16 );\n    } else {\n        psEncC->pitchEstimationComplexity       = SILK_PE_MAX_COMPLEX;\n        psEncC->pitchEstimationThreshold_Q16    = SILK_FIX_CONST( 0.7, 16 );\n        psEncC->pitchEstimationLPCOrder         = 16;\n        psEncC->shapingLPCOrder                 = 16;\n        psEncC->la_shape                        = 5 * psEncC->fs_kHz;\n        psEncC->nStatesDelayedDecision          = MAX_DEL_DEC_STATES;\n        psEncC->useInterpolatedNLSFs            = 1;\n        psEncC->LTPQuantLowComplexity           = 0;\n        psEncC->NLSF_MSVQ_Survivors             = 32;\n        psEncC->warping_Q16                     = psEncC->fs_kHz * SILK_FIX_CONST( WARPING_MULTIPLIER, 16 );\n    }\n\n    /* Do not allow higher pitch estimation LPC order than predict LPC order */\n    psEncC->pitchEstimationLPCOrder = silk_min_int( psEncC->pitchEstimationLPCOrder, psEncC->predictLPCOrder );\n    psEncC->shapeWinLength          = SUB_FRAME_LENGTH_MS * psEncC->fs_kHz + 2 * psEncC->la_shape;\n    psEncC->Complexity              = Complexity;\n\n    silk_assert( psEncC->pitchEstimationLPCOrder <= MAX_FIND_PITCH_LPC_ORDER );\n    silk_assert( psEncC->shapingLPCOrder         <= MAX_SHAPE_LPC_ORDER      );\n    silk_assert( psEncC->nStatesDelayedDecision  <= MAX_DEL_DEC_STATES       );\n    silk_assert( psEncC->warping_Q16             <= 32767                    );\n    silk_assert( psEncC->la_shape                <= LA_SHAPE_MAX             );\n    silk_assert( psEncC->shapeWinLength          <= SHAPE_LPC_WIN_MAX        );\n    silk_assert( psEncC->NLSF_MSVQ_Survivors     <= NLSF_VQ_MAX_SURVIVORS    );\n\n    return ret;\n}\n\nstatic OPUS_INLINE opus_int silk_setup_LBRR(\n    silk_encoder_state          *psEncC,            /* I/O                      */\n    const opus_int32            TargetRate_bps      /* I                        */\n)\n{\n    opus_int   ret = SILK_NO_ERROR;\n    opus_int32 LBRR_rate_thres_bps;\n\n    psEncC->LBRR_enabled = 0;\n    if( psEncC->useInBandFEC && psEncC->PacketLoss_perc > 0 ) {\n        if( psEncC->fs_kHz == 8 ) {\n            LBRR_rate_thres_bps = LBRR_NB_MIN_RATE_BPS;\n        } else if( psEncC->fs_kHz == 12 ) {\n            LBRR_rate_thres_bps = LBRR_MB_MIN_RATE_BPS;\n        } else {\n            LBRR_rate_thres_bps = LBRR_WB_MIN_RATE_BPS;\n        }\n        LBRR_rate_thres_bps = silk_SMULWB( silk_MUL( LBRR_rate_thres_bps, 125 - silk_min( psEncC->PacketLoss_perc, 25 ) ), SILK_FIX_CONST( 0.01, 16 ) );\n\n        if( TargetRate_bps > LBRR_rate_thres_bps ) {\n            /* Set gain increase for coding LBRR excitation */\n            psEncC->LBRR_enabled = 1;\n            psEncC->LBRR_GainIncreases = silk_max_int( 7 - silk_SMULWB( (opus_int32)psEncC->PacketLoss_perc, SILK_FIX_CONST( 0.4, 16 ) ), 2 );\n        }\n    }\n\n    return ret;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/debug.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"debug.h\"\n#include \"SigProc_FIX.h\"\n\n#if SILK_TIC_TOC\n\n#ifdef _WIN32\n\n#if (defined(_WIN32) || defined(_WINCE))\n#include <windows.h>    /* timer */\n#else   /* Linux or Mac*/\n#include <sys/time.h>\n#endif\n\nunsigned long silk_GetHighResolutionTime(void) /* O  time in usec*/\n{\n    /* Returns a time counter in microsec   */\n    /* the resolution is platform dependent */\n    /* but is typically 1.62 us resolution  */\n    LARGE_INTEGER lpPerformanceCount;\n    LARGE_INTEGER lpFrequency;\n    QueryPerformanceCounter(&lpPerformanceCount);\n    QueryPerformanceFrequency(&lpFrequency);\n    return (unsigned long)((1000000*(lpPerformanceCount.QuadPart)) / lpFrequency.QuadPart);\n}\n#else   /* Linux or Mac*/\nunsigned long GetHighResolutionTime(void) /* O  time in usec*/\n{\n    struct timeval tv;\n    gettimeofday(&tv, 0);\n    return((tv.tv_sec*1000000)+(tv.tv_usec));\n}\n#endif\n\nint           silk_Timer_nTimers = 0;\nint           silk_Timer_depth_ctr = 0;\nchar          silk_Timer_tags[silk_NUM_TIMERS_MAX][silk_NUM_TIMERS_MAX_TAG_LEN];\n#ifdef WIN32\nLARGE_INTEGER silk_Timer_start[silk_NUM_TIMERS_MAX];\n#else\nunsigned long silk_Timer_start[silk_NUM_TIMERS_MAX];\n#endif\nunsigned int  silk_Timer_cnt[silk_NUM_TIMERS_MAX];\nopus_int64     silk_Timer_min[silk_NUM_TIMERS_MAX];\nopus_int64     silk_Timer_sum[silk_NUM_TIMERS_MAX];\nopus_int64     silk_Timer_max[silk_NUM_TIMERS_MAX];\nopus_int64     silk_Timer_depth[silk_NUM_TIMERS_MAX];\n\n#ifdef WIN32\nvoid silk_TimerSave(char *file_name)\n{\n    if( silk_Timer_nTimers > 0 )\n    {\n        int k;\n        FILE *fp;\n        LARGE_INTEGER lpFrequency;\n        LARGE_INTEGER lpPerformanceCount1, lpPerformanceCount2;\n        int del = 0x7FFFFFFF;\n        double avg, sum_avg;\n        /* estimate overhead of calling performance counters */\n        for( k = 0; k < 1000; k++ ) {\n            QueryPerformanceCounter(&lpPerformanceCount1);\n            QueryPerformanceCounter(&lpPerformanceCount2);\n            lpPerformanceCount2.QuadPart -= lpPerformanceCount1.QuadPart;\n            if( (int)lpPerformanceCount2.LowPart < del )\n                del = lpPerformanceCount2.LowPart;\n        }\n        QueryPerformanceFrequency(&lpFrequency);\n        /* print results to file */\n        sum_avg = 0.0f;\n        for( k = 0; k < silk_Timer_nTimers; k++ ) {\n            if (silk_Timer_depth[k] == 0) {\n                sum_avg += (1e6 * silk_Timer_sum[k] / silk_Timer_cnt[k] - del) / lpFrequency.QuadPart * silk_Timer_cnt[k];\n            }\n        }\n        fp = fopen(file_name, \"w\");\n        fprintf(fp, \"                                min         avg     %%         max      count\\n\");\n        for( k = 0; k < silk_Timer_nTimers; k++ ) {\n            if (silk_Timer_depth[k] == 0) {\n                fprintf(fp, \"%-28s\", silk_Timer_tags[k]);\n            } else if (silk_Timer_depth[k] == 1) {\n                fprintf(fp, \" %-27s\", silk_Timer_tags[k]);\n            } else if (silk_Timer_depth[k] == 2) {\n                fprintf(fp, \"  %-26s\", silk_Timer_tags[k]);\n            } else if (silk_Timer_depth[k] == 3) {\n                fprintf(fp, \"   %-25s\", silk_Timer_tags[k]);\n            } else {\n                fprintf(fp, \"    %-24s\", silk_Timer_tags[k]);\n            }\n            avg = (1e6 * silk_Timer_sum[k] / silk_Timer_cnt[k] - del) / lpFrequency.QuadPart;\n            fprintf(fp, \"%8.2f\", (1e6 * (silk_max_64(silk_Timer_min[k] - del, 0))) / lpFrequency.QuadPart);\n            fprintf(fp, \"%12.2f %6.2f\", avg, 100.0 * avg / sum_avg * silk_Timer_cnt[k]);\n            fprintf(fp, \"%12.2f\", (1e6 * (silk_max_64(silk_Timer_max[k] - del, 0))) / lpFrequency.QuadPart);\n            fprintf(fp, \"%10d\\n\", silk_Timer_cnt[k]);\n        }\n        fprintf(fp, \"                                microseconds\\n\");\n        fclose(fp);\n    }\n}\n#else\nvoid silk_TimerSave(char *file_name)\n{\n    if( silk_Timer_nTimers > 0 )\n    {\n        int k;\n        FILE *fp;\n        /* print results to file */\n        fp = fopen(file_name, \"w\");\n        fprintf(fp, \"                                min         avg         max      count\\n\");\n        for( k = 0; k < silk_Timer_nTimers; k++ )\n        {\n            if (silk_Timer_depth[k] == 0) {\n                fprintf(fp, \"%-28s\", silk_Timer_tags[k]);\n            } else if (silk_Timer_depth[k] == 1) {\n                fprintf(fp, \" %-27s\", silk_Timer_tags[k]);\n            } else if (silk_Timer_depth[k] == 2) {\n                fprintf(fp, \"  %-26s\", silk_Timer_tags[k]);\n            } else if (silk_Timer_depth[k] == 3) {\n                fprintf(fp, \"   %-25s\", silk_Timer_tags[k]);\n            } else {\n                fprintf(fp, \"    %-24s\", silk_Timer_tags[k]);\n            }\n            fprintf(fp, \"%d \", silk_Timer_min[k]);\n            fprintf(fp, \"%f \", (double)silk_Timer_sum[k] / (double)silk_Timer_cnt[k]);\n            fprintf(fp, \"%d \", silk_Timer_max[k]);\n            fprintf(fp, \"%10d\\n\", silk_Timer_cnt[k]);\n        }\n        fprintf(fp, \"                                microseconds\\n\");\n        fclose(fp);\n    }\n}\n#endif\n\n#endif /* SILK_TIC_TOC */\n\n#if SILK_DEBUG\nFILE *silk_debug_store_fp[ silk_NUM_STORES_MAX ];\nint silk_debug_store_count = 0;\n#endif /* SILK_DEBUG */\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/debug.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_DEBUG_H\n#define SILK_DEBUG_H\n\n#include \"typedef.h\"\n#include <stdio.h>      /* file writing */\n#include <string.h>     /* strcpy, strcmp */\n\n#ifdef  __cplusplus\nextern \"C\"\n{\n#endif\n\nunsigned long GetHighResolutionTime(void); /* O  time in usec*/\n\n/* make SILK_DEBUG dependent on compiler's _DEBUG */\n#if defined _WIN32\n    #ifdef _DEBUG\n        #define SILK_DEBUG  1\n    #else\n        #define SILK_DEBUG  0\n    #endif\n\n    /* overrule the above */\n    #if 0\n    /*  #define NO_ASSERTS*/\n    #undef  SILK_DEBUG\n    #define SILK_DEBUG  1\n    #endif\n#else\n    #define SILK_DEBUG  0\n#endif\n\n/* Flag for using timers */\n#define SILK_TIC_TOC    0\n\n\n#if SILK_TIC_TOC\n\n#if (defined(_WIN32) || defined(_WINCE))\n#include <windows.h>    /* timer */\n#else   /* Linux or Mac*/\n#include <sys/time.h>\n#endif\n\n/*********************************/\n/* timer functions for profiling */\n/*********************************/\n/* example:                                                         */\n/*                                                                  */\n/* TIC(LPC)                                                         */\n/* do_LPC(in_vec, order, acoef);    // do LPC analysis              */\n/* TOC(LPC)                                                         */\n/*                                                                  */\n/* and call the following just before exiting (from main)           */\n/*                                                                  */\n/* silk_TimerSave(\"silk_TimingData.txt\");                           */\n/*                                                                  */\n/* results are now in silk_TimingData.txt                           */\n\nvoid silk_TimerSave(char *file_name);\n\n/* max number of timers (in different locations) */\n#define silk_NUM_TIMERS_MAX                  50\n/* max length of name tags in TIC(..), TOC(..) */\n#define silk_NUM_TIMERS_MAX_TAG_LEN          30\n\nextern int           silk_Timer_nTimers;\nextern int           silk_Timer_depth_ctr;\nextern char          silk_Timer_tags[silk_NUM_TIMERS_MAX][silk_NUM_TIMERS_MAX_TAG_LEN];\n#ifdef _WIN32\nextern LARGE_INTEGER silk_Timer_start[silk_NUM_TIMERS_MAX];\n#else\nextern unsigned long silk_Timer_start[silk_NUM_TIMERS_MAX];\n#endif\nextern unsigned int  silk_Timer_cnt[silk_NUM_TIMERS_MAX];\nextern opus_int64    silk_Timer_sum[silk_NUM_TIMERS_MAX];\nextern opus_int64    silk_Timer_max[silk_NUM_TIMERS_MAX];\nextern opus_int64    silk_Timer_min[silk_NUM_TIMERS_MAX];\nextern opus_int64    silk_Timer_depth[silk_NUM_TIMERS_MAX];\n\n/* WARNING: TIC()/TOC can measure only up to 0.1 seconds at a time */\n#ifdef _WIN32\n#define TIC(TAG_NAME) {                                     \\\n    static int init = 0;                                    \\\n    static int ID = -1;                                     \\\n    if( init == 0 )                                         \\\n    {                                                       \\\n        int k;                                              \\\n        init = 1;                                           \\\n        for( k = 0; k < silk_Timer_nTimers; k++ ) {         \\\n            if( strcmp(silk_Timer_tags[k], #TAG_NAME) == 0 ) { \\\n                ID = k;                                     \\\n                break;                                      \\\n            }                                               \\\n        }                                                   \\\n        if (ID == -1) {                                     \\\n            ID = silk_Timer_nTimers;                        \\\n            silk_Timer_nTimers++;                           \\\n            silk_Timer_depth[ID] = silk_Timer_depth_ctr;    \\\n            strcpy(silk_Timer_tags[ID], #TAG_NAME);         \\\n            silk_Timer_cnt[ID] = 0;                         \\\n            silk_Timer_sum[ID] = 0;                         \\\n            silk_Timer_min[ID] = 0xFFFFFFFF;                \\\n            silk_Timer_max[ID] = 0;                         \\\n        }                                                   \\\n    }                                                       \\\n    silk_Timer_depth_ctr++;                                 \\\n    QueryPerformanceCounter(&silk_Timer_start[ID]);         \\\n}\n#else\n#define TIC(TAG_NAME) {                                     \\\n    static int init = 0;                                    \\\n    static int ID = -1;                                     \\\n    if( init == 0 )                                         \\\n    {                                                       \\\n        int k;                                              \\\n        init = 1;                                           \\\n        for( k = 0; k < silk_Timer_nTimers; k++ ) {         \\\n        if( strcmp(silk_Timer_tags[k], #TAG_NAME) == 0 ) {  \\\n                ID = k;                                     \\\n                break;                                      \\\n            }                                               \\\n        }                                                   \\\n        if (ID == -1) {                                     \\\n            ID = silk_Timer_nTimers;                        \\\n            silk_Timer_nTimers++;                           \\\n            silk_Timer_depth[ID] = silk_Timer_depth_ctr;    \\\n            strcpy(silk_Timer_tags[ID], #TAG_NAME);         \\\n            silk_Timer_cnt[ID] = 0;                         \\\n            silk_Timer_sum[ID] = 0;                         \\\n            silk_Timer_min[ID] = 0xFFFFFFFF;                \\\n            silk_Timer_max[ID] = 0;                         \\\n        }                                                   \\\n    }                                                       \\\n    silk_Timer_depth_ctr++;                                 \\\n    silk_Timer_start[ID] = GetHighResolutionTime();         \\\n}\n#endif\n\n#ifdef _WIN32\n#define TOC(TAG_NAME) {                                             \\\n    LARGE_INTEGER lpPerformanceCount;                               \\\n    static int init = 0;                                            \\\n    static int ID = 0;                                              \\\n    if( init == 0 )                                                 \\\n    {                                                               \\\n        int k;                                                      \\\n        init = 1;                                                   \\\n        for( k = 0; k < silk_Timer_nTimers; k++ ) {                 \\\n            if( strcmp(silk_Timer_tags[k], #TAG_NAME) == 0 ) {      \\\n                ID = k;                                             \\\n                break;                                              \\\n            }                                                       \\\n        }                                                           \\\n    }                                                               \\\n    QueryPerformanceCounter(&lpPerformanceCount);                   \\\n    lpPerformanceCount.QuadPart -= silk_Timer_start[ID].QuadPart;   \\\n    if((lpPerformanceCount.QuadPart < 100000000) &&                 \\\n        (lpPerformanceCount.QuadPart >= 0)) {                       \\\n        silk_Timer_cnt[ID]++;                                       \\\n        silk_Timer_sum[ID] += lpPerformanceCount.QuadPart;          \\\n        if( lpPerformanceCount.QuadPart > silk_Timer_max[ID] )      \\\n            silk_Timer_max[ID] = lpPerformanceCount.QuadPart;       \\\n        if( lpPerformanceCount.QuadPart < silk_Timer_min[ID] )      \\\n            silk_Timer_min[ID] = lpPerformanceCount.QuadPart;       \\\n    }                                                               \\\n    silk_Timer_depth_ctr--;                                         \\\n}\n#else\n#define TOC(TAG_NAME) {                                             \\\n    unsigned long endTime;                                          \\\n    static int init = 0;                                            \\\n    static int ID = 0;                                              \\\n    if( init == 0 )                                                 \\\n    {                                                               \\\n        int k;                                                      \\\n        init = 1;                                                   \\\n        for( k = 0; k < silk_Timer_nTimers; k++ ) {                 \\\n            if( strcmp(silk_Timer_tags[k], #TAG_NAME) == 0 ) {      \\\n                ID = k;                                             \\\n                break;                                              \\\n            }                                                       \\\n        }                                                           \\\n    }                                                               \\\n    endTime = GetHighResolutionTime();                              \\\n    endTime -= silk_Timer_start[ID];                                \\\n    if((endTime < 100000000) &&                                     \\\n        (endTime >= 0)) {                                           \\\n        silk_Timer_cnt[ID]++;                                       \\\n        silk_Timer_sum[ID] += endTime;                              \\\n        if( endTime > silk_Timer_max[ID] )                          \\\n            silk_Timer_max[ID] = endTime;                           \\\n        if( endTime < silk_Timer_min[ID] )                          \\\n            silk_Timer_min[ID] = endTime;                           \\\n    }                                                               \\\n        silk_Timer_depth_ctr--;                                     \\\n}\n#endif\n\n#else /* SILK_TIC_TOC */\n\n/* define macros as empty strings */\n#define TIC(TAG_NAME)\n#define TOC(TAG_NAME)\n#define silk_TimerSave(FILE_NAME)\n\n#endif /* SILK_TIC_TOC */\n\n\n#if SILK_DEBUG\n/************************************/\n/* write data to file for debugging */\n/************************************/\n/* Example: DEBUG_STORE_DATA(testfile.pcm, &RIN[0], 160*sizeof(opus_int16)); */\n\n#define silk_NUM_STORES_MAX                                  100\nextern FILE *silk_debug_store_fp[ silk_NUM_STORES_MAX ];\nextern int silk_debug_store_count;\n\n/* Faster way of storing the data */\n#define DEBUG_STORE_DATA( FILE_NAME, DATA_PTR, N_BYTES ) {          \\\n    static opus_int init = 0, cnt = 0;                              \\\n    static FILE **fp;                                               \\\n    if (init == 0) {                                                \\\n        init = 1;                                                   \\\n        cnt = silk_debug_store_count++;                             \\\n        silk_debug_store_fp[ cnt ] = fopen(#FILE_NAME, \"wb\");       \\\n    }                                                               \\\n    fwrite((DATA_PTR), (N_BYTES), 1, silk_debug_store_fp[ cnt ]);   \\\n}\n\n/* Call this at the end of main() */\n#define SILK_DEBUG_STORE_CLOSE_FILES {                              \\\n    opus_int i;                                                     \\\n    for( i = 0; i < silk_debug_store_count; i++ ) {                 \\\n        fclose( silk_debug_store_fp[ i ] );                         \\\n    }                                                               \\\n}\n\n#else /* SILK_DEBUG */\n\n/* define macros as empty strings */\n#define DEBUG_STORE_DATA(FILE_NAME, DATA_PTR, N_BYTES)\n#define SILK_DEBUG_STORE_CLOSE_FILES\n\n#endif /* SILK_DEBUG */\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif /* SILK_DEBUG_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/dec_API.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n#include \"API.h\"\n#include \"main.h\"\n#include \"stack_alloc.h\"\n\n/************************/\n/* Decoder Super Struct */\n/************************/\ntypedef struct {\n    silk_decoder_state          channel_state[ DECODER_NUM_CHANNELS ];\n    stereo_dec_state                sStereo;\n    opus_int                         nChannelsAPI;\n    opus_int                         nChannelsInternal;\n    opus_int                         prev_decode_only_middle;\n} silk_decoder;\n\n/*********************/\n/* Decoder functions */\n/*********************/\n\nopus_int silk_Get_Decoder_Size(                         /* O    Returns error code                              */\n    opus_int                        *decSizeBytes       /* O    Number of bytes in SILK decoder state           */\n)\n{\n    opus_int ret = SILK_NO_ERROR;\n\n    *decSizeBytes = sizeof( silk_decoder );\n\n    return ret;\n}\n\n/* Reset decoder state */\nopus_int silk_InitDecoder(                              /* O    Returns error code                              */\n    void                            *decState           /* I/O  State                                           */\n)\n{\n    opus_int n, ret = SILK_NO_ERROR;\n    silk_decoder_state *channel_state = ((silk_decoder *)decState)->channel_state;\n\n    for( n = 0; n < DECODER_NUM_CHANNELS; n++ ) {\n        ret  = silk_init_decoder( &channel_state[ n ] );\n    }\n    silk_memset(&((silk_decoder *)decState)->sStereo, 0, sizeof(((silk_decoder *)decState)->sStereo));\n    /* Not strictly needed, but it's cleaner that way */\n    ((silk_decoder *)decState)->prev_decode_only_middle = 0;\n\n    return ret;\n}\n\n/* Decode a frame */\nopus_int silk_Decode(                                   /* O    Returns error code                              */\n    void*                           decState,           /* I/O  State                                           */\n    silk_DecControlStruct*          decControl,         /* I/O  Control Structure                               */\n    opus_int                        lostFlag,           /* I    0: no loss, 1 loss, 2 decode fec                */\n    opus_int                        newPacketFlag,      /* I    Indicates first decoder call for this packet    */\n    ec_dec                          *psRangeDec,        /* I/O  Compressor data structure                       */\n    opus_int16                      *samplesOut,        /* O    Decoded output speech vector                    */\n    opus_int32                      *nSamplesOut        /* O    Number of samples decoded                       */\n)\n{\n    opus_int   i, n, decode_only_middle = 0, ret = SILK_NO_ERROR;\n    opus_int32 nSamplesOutDec, LBRR_symbol;\n    opus_int16 *samplesOut1_tmp[ 2 ];\n    VARDECL( opus_int16, samplesOut1_tmp_storage );\n    VARDECL( opus_int16, samplesOut2_tmp );\n    opus_int32 MS_pred_Q13[ 2 ] = { 0 };\n    opus_int16 *resample_out_ptr;\n    silk_decoder *psDec = ( silk_decoder * )decState;\n    silk_decoder_state *channel_state = psDec->channel_state;\n    opus_int has_side;\n    opus_int stereo_to_mono;\n    SAVE_STACK;\n\n    silk_assert( decControl->nChannelsInternal == 1 || decControl->nChannelsInternal == 2 );\n\n    /**********************************/\n    /* Test if first frame in payload */\n    /**********************************/\n    if( newPacketFlag ) {\n        for( n = 0; n < decControl->nChannelsInternal; n++ ) {\n            channel_state[ n ].nFramesDecoded = 0;  /* Used to count frames in packet */\n        }\n    }\n\n    /* If Mono -> Stereo transition in bitstream: init state of second channel */\n    if( decControl->nChannelsInternal > psDec->nChannelsInternal ) {\n        ret += silk_init_decoder( &channel_state[ 1 ] );\n    }\n\n    stereo_to_mono = decControl->nChannelsInternal == 1 && psDec->nChannelsInternal == 2 &&\n                     ( decControl->internalSampleRate == 1000*channel_state[ 0 ].fs_kHz );\n\n    if( channel_state[ 0 ].nFramesDecoded == 0 ) {\n        for( n = 0; n < decControl->nChannelsInternal; n++ ) {\n            opus_int fs_kHz_dec;\n            if( decControl->payloadSize_ms == 0 ) {\n                /* Assuming packet loss, use 10 ms */\n                channel_state[ n ].nFramesPerPacket = 1;\n                channel_state[ n ].nb_subfr = 2;\n            } else if( decControl->payloadSize_ms == 10 ) {\n                channel_state[ n ].nFramesPerPacket = 1;\n                channel_state[ n ].nb_subfr = 2;\n            } else if( decControl->payloadSize_ms == 20 ) {\n                channel_state[ n ].nFramesPerPacket = 1;\n                channel_state[ n ].nb_subfr = 4;\n            } else if( decControl->payloadSize_ms == 40 ) {\n                channel_state[ n ].nFramesPerPacket = 2;\n                channel_state[ n ].nb_subfr = 4;\n            } else if( decControl->payloadSize_ms == 60 ) {\n                channel_state[ n ].nFramesPerPacket = 3;\n                channel_state[ n ].nb_subfr = 4;\n            } else {\n                silk_assert( 0 );\n                RESTORE_STACK;\n                return SILK_DEC_INVALID_FRAME_SIZE;\n            }\n            fs_kHz_dec = ( decControl->internalSampleRate >> 10 ) + 1;\n            if( fs_kHz_dec != 8 && fs_kHz_dec != 12 && fs_kHz_dec != 16 ) {\n                silk_assert( 0 );\n                RESTORE_STACK;\n                return SILK_DEC_INVALID_SAMPLING_FREQUENCY;\n            }\n            ret += silk_decoder_set_fs( &channel_state[ n ], fs_kHz_dec, decControl->API_sampleRate );\n        }\n    }\n\n    if( decControl->nChannelsAPI == 2 && decControl->nChannelsInternal == 2 && ( psDec->nChannelsAPI == 1 || psDec->nChannelsInternal == 1 ) ) {\n        silk_memset( psDec->sStereo.pred_prev_Q13, 0, sizeof( psDec->sStereo.pred_prev_Q13 ) );\n        silk_memset( psDec->sStereo.sSide, 0, sizeof( psDec->sStereo.sSide ) );\n        silk_memcpy( &channel_state[ 1 ].resampler_state, &channel_state[ 0 ].resampler_state, sizeof( silk_resampler_state_struct ) );\n    }\n    psDec->nChannelsAPI      = decControl->nChannelsAPI;\n    psDec->nChannelsInternal = decControl->nChannelsInternal;\n\n    if( decControl->API_sampleRate > (opus_int32)MAX_API_FS_KHZ * 1000 || decControl->API_sampleRate < 8000 ) {\n        ret = SILK_DEC_INVALID_SAMPLING_FREQUENCY;\n        RESTORE_STACK;\n        return( ret );\n    }\n\n    if( lostFlag != FLAG_PACKET_LOST && channel_state[ 0 ].nFramesDecoded == 0 ) {\n        /* First decoder call for this payload */\n        /* Decode VAD flags and LBRR flag */\n        for( n = 0; n < decControl->nChannelsInternal; n++ ) {\n            for( i = 0; i < channel_state[ n ].nFramesPerPacket; i++ ) {\n                channel_state[ n ].VAD_flags[ i ] = ec_dec_bit_logp(psRangeDec, 1);\n            }\n            channel_state[ n ].LBRR_flag = ec_dec_bit_logp(psRangeDec, 1);\n        }\n        /* Decode LBRR flags */\n        for( n = 0; n < decControl->nChannelsInternal; n++ ) {\n            silk_memset( channel_state[ n ].LBRR_flags, 0, sizeof( channel_state[ n ].LBRR_flags ) );\n            if( channel_state[ n ].LBRR_flag ) {\n                if( channel_state[ n ].nFramesPerPacket == 1 ) {\n                    channel_state[ n ].LBRR_flags[ 0 ] = 1;\n                } else {\n                    LBRR_symbol = ec_dec_icdf( psRangeDec, silk_LBRR_flags_iCDF_ptr[ channel_state[ n ].nFramesPerPacket - 2 ], 8 ) + 1;\n                    for( i = 0; i < channel_state[ n ].nFramesPerPacket; i++ ) {\n                        channel_state[ n ].LBRR_flags[ i ] = silk_RSHIFT( LBRR_symbol, i ) & 1;\n                    }\n                }\n            }\n        }\n\n        if( lostFlag == FLAG_DECODE_NORMAL ) {\n            /* Regular decoding: skip all LBRR data */\n            for( i = 0; i < channel_state[ 0 ].nFramesPerPacket; i++ ) {\n                for( n = 0; n < decControl->nChannelsInternal; n++ ) {\n                    if( channel_state[ n ].LBRR_flags[ i ] ) {\n                        opus_int pulses[ MAX_FRAME_LENGTH ];\n                        opus_int condCoding;\n\n                        if( decControl->nChannelsInternal == 2 && n == 0 ) {\n                            silk_stereo_decode_pred( psRangeDec, MS_pred_Q13 );\n                            if( channel_state[ 1 ].LBRR_flags[ i ] == 0 ) {\n                                silk_stereo_decode_mid_only( psRangeDec, &decode_only_middle );\n                            }\n                        }\n                        /* Use conditional coding if previous frame available */\n                        if( i > 0 && channel_state[ n ].LBRR_flags[ i - 1 ] ) {\n                            condCoding = CODE_CONDITIONALLY;\n                        } else {\n                            condCoding = CODE_INDEPENDENTLY;\n                        }\n                        silk_decode_indices( &channel_state[ n ], psRangeDec, i, 1, condCoding );\n                        silk_decode_pulses( psRangeDec, pulses, channel_state[ n ].indices.signalType,\n                            channel_state[ n ].indices.quantOffsetType, channel_state[ n ].frame_length );\n                    }\n                }\n            }\n        }\n    }\n\n    /* Get MS predictor index */\n    if( decControl->nChannelsInternal == 2 ) {\n        if(   lostFlag == FLAG_DECODE_NORMAL ||\n            ( lostFlag == FLAG_DECODE_LBRR && channel_state[ 0 ].LBRR_flags[ channel_state[ 0 ].nFramesDecoded ] == 1 ) )\n        {\n            silk_stereo_decode_pred( psRangeDec, MS_pred_Q13 );\n            /* For LBRR data, decode mid-only flag only if side-channel's LBRR flag is false */\n            if( ( lostFlag == FLAG_DECODE_NORMAL && channel_state[ 1 ].VAD_flags[ channel_state[ 0 ].nFramesDecoded ] == 0 ) ||\n                ( lostFlag == FLAG_DECODE_LBRR && channel_state[ 1 ].LBRR_flags[ channel_state[ 0 ].nFramesDecoded ] == 0 ) )\n            {\n                silk_stereo_decode_mid_only( psRangeDec, &decode_only_middle );\n            } else {\n                decode_only_middle = 0;\n            }\n        } else {\n            for( n = 0; n < 2; n++ ) {\n                MS_pred_Q13[ n ] = psDec->sStereo.pred_prev_Q13[ n ];\n            }\n        }\n    }\n\n    /* Reset side channel decoder prediction memory for first frame with side coding */\n    if( decControl->nChannelsInternal == 2 && decode_only_middle == 0 && psDec->prev_decode_only_middle == 1 ) {\n        silk_memset( psDec->channel_state[ 1 ].outBuf, 0, sizeof(psDec->channel_state[ 1 ].outBuf) );\n        silk_memset( psDec->channel_state[ 1 ].sLPC_Q14_buf, 0, sizeof(psDec->channel_state[ 1 ].sLPC_Q14_buf) );\n        psDec->channel_state[ 1 ].lagPrev        = 100;\n        psDec->channel_state[ 1 ].LastGainIndex  = 10;\n        psDec->channel_state[ 1 ].prevSignalType = TYPE_NO_VOICE_ACTIVITY;\n        psDec->channel_state[ 1 ].first_frame_after_reset = 1;\n    }\n\n    ALLOC( samplesOut1_tmp_storage,\n           decControl->nChannelsInternal*(\n               channel_state[ 0 ].frame_length + 2 ),\n           opus_int16 );\n    samplesOut1_tmp[ 0 ] = samplesOut1_tmp_storage;\n    samplesOut1_tmp[ 1 ] = samplesOut1_tmp_storage\n                           + channel_state[ 0 ].frame_length + 2;\n\n    if( lostFlag == FLAG_DECODE_NORMAL ) {\n        has_side = !decode_only_middle;\n    } else {\n        has_side = !psDec->prev_decode_only_middle\n              || (decControl->nChannelsInternal == 2 && lostFlag == FLAG_DECODE_LBRR && channel_state[1].LBRR_flags[ channel_state[1].nFramesDecoded ] == 1 );\n    }\n    /* Call decoder for one frame */\n    for( n = 0; n < decControl->nChannelsInternal; n++ ) {\n        if( n == 0 || has_side ) {\n            opus_int FrameIndex;\n            opus_int condCoding;\n\n            FrameIndex = channel_state[ 0 ].nFramesDecoded - n;\n            /* Use independent coding if no previous frame available */\n            if( FrameIndex <= 0 ) {\n                condCoding = CODE_INDEPENDENTLY;\n            } else if( lostFlag == FLAG_DECODE_LBRR ) {\n                condCoding = channel_state[ n ].LBRR_flags[ FrameIndex - 1 ] ? CODE_CONDITIONALLY : CODE_INDEPENDENTLY;\n            } else if( n > 0 && psDec->prev_decode_only_middle ) {\n                /* If we skipped a side frame in this packet, we don't\n                   need LTP scaling; the LTP state is well-defined. */\n                condCoding = CODE_INDEPENDENTLY_NO_LTP_SCALING;\n            } else {\n                condCoding = CODE_CONDITIONALLY;\n            }\n            ret += silk_decode_frame( &channel_state[ n ], psRangeDec, &samplesOut1_tmp[ n ][ 2 ], &nSamplesOutDec, lostFlag, condCoding);\n        } else {\n            silk_memset( &samplesOut1_tmp[ n ][ 2 ], 0, nSamplesOutDec * sizeof( opus_int16 ) );\n        }\n        channel_state[ n ].nFramesDecoded++;\n    }\n\n    if( decControl->nChannelsAPI == 2 && decControl->nChannelsInternal == 2 ) {\n        /* Convert Mid/Side to Left/Right */\n        silk_stereo_MS_to_LR( &psDec->sStereo, samplesOut1_tmp[ 0 ], samplesOut1_tmp[ 1 ], MS_pred_Q13, channel_state[ 0 ].fs_kHz, nSamplesOutDec );\n    } else {\n        /* Buffering */\n        silk_memcpy( samplesOut1_tmp[ 0 ], psDec->sStereo.sMid, 2 * sizeof( opus_int16 ) );\n        silk_memcpy( psDec->sStereo.sMid, &samplesOut1_tmp[ 0 ][ nSamplesOutDec ], 2 * sizeof( opus_int16 ) );\n    }\n\n    /* Number of output samples */\n    *nSamplesOut = silk_DIV32( nSamplesOutDec * decControl->API_sampleRate, silk_SMULBB( channel_state[ 0 ].fs_kHz, 1000 ) );\n\n    /* Set up pointers to temp buffers */\n    ALLOC( samplesOut2_tmp,\n           decControl->nChannelsAPI == 2 ? *nSamplesOut : ALLOC_NONE, opus_int16 );\n    if( decControl->nChannelsAPI == 2 ) {\n        resample_out_ptr = samplesOut2_tmp;\n    } else {\n        resample_out_ptr = samplesOut;\n    }\n\n    for( n = 0; n < silk_min( decControl->nChannelsAPI, decControl->nChannelsInternal ); n++ ) {\n\n        /* Resample decoded signal to API_sampleRate */\n        ret += silk_resampler( &channel_state[ n ].resampler_state, resample_out_ptr, &samplesOut1_tmp[ n ][ 1 ], nSamplesOutDec );\n\n        /* Interleave if stereo output and stereo stream */\n        if( decControl->nChannelsAPI == 2 ) {\n            for( i = 0; i < *nSamplesOut; i++ ) {\n                samplesOut[ n + 2 * i ] = resample_out_ptr[ i ];\n            }\n        }\n    }\n\n    /* Create two channel output from mono stream */\n    if( decControl->nChannelsAPI == 2 && decControl->nChannelsInternal == 1 ) {\n        if ( stereo_to_mono ){\n            /* Resample right channel for newly collapsed stereo just in case\n               we weren't doing collapsing when switching to mono */\n            ret += silk_resampler( &channel_state[ 1 ].resampler_state, resample_out_ptr, &samplesOut1_tmp[ 0 ][ 1 ], nSamplesOutDec );\n\n            for( i = 0; i < *nSamplesOut; i++ ) {\n                samplesOut[ 1 + 2 * i ] = resample_out_ptr[ i ];\n            }\n        } else {\n            for( i = 0; i < *nSamplesOut; i++ ) {\n                samplesOut[ 1 + 2 * i ] = samplesOut[ 0 + 2 * i ];\n            }\n        }\n    }\n\n    /* Export pitch lag, measured at 48 kHz sampling rate */\n    if( channel_state[ 0 ].prevSignalType == TYPE_VOICED ) {\n        int mult_tab[ 3 ] = { 6, 4, 3 };\n        decControl->prevPitchLag = channel_state[ 0 ].lagPrev * mult_tab[ ( channel_state[ 0 ].fs_kHz - 8 ) >> 2 ];\n    } else {\n        decControl->prevPitchLag = 0;\n    }\n\n    if( lostFlag == FLAG_PACKET_LOST ) {\n       /* On packet loss, remove the gain clamping to prevent having the energy \"bounce back\"\n          if we lose packets when the energy is going down */\n       for ( i = 0; i < psDec->nChannelsInternal; i++ )\n          psDec->channel_state[ i ].LastGainIndex = 10;\n    } else {\n       psDec->prev_decode_only_middle = decode_only_middle;\n    }\n    RESTORE_STACK;\n    return ret;\n}\n\n#if 0\n/* Getting table of contents for a packet */\nopus_int silk_get_TOC(\n    const opus_uint8                *payload,           /* I    Payload data                                */\n    const opus_int                  nBytesIn,           /* I    Number of input bytes                       */\n    const opus_int                  nFramesPerPayload,  /* I    Number of SILK frames per payload           */\n    silk_TOC_struct                 *Silk_TOC           /* O    Type of content                             */\n)\n{\n    opus_int i, flags, ret = SILK_NO_ERROR;\n\n    if( nBytesIn < 1 ) {\n        return -1;\n    }\n    if( nFramesPerPayload < 0 || nFramesPerPayload > 3 ) {\n        return -1;\n    }\n\n    silk_memset( Silk_TOC, 0, sizeof( *Silk_TOC ) );\n\n    /* For stereo, extract the flags for the mid channel */\n    flags = silk_RSHIFT( payload[ 0 ], 7 - nFramesPerPayload ) & ( silk_LSHIFT( 1, nFramesPerPayload + 1 ) - 1 );\n\n    Silk_TOC->inbandFECFlag = flags & 1;\n    for( i = nFramesPerPayload - 1; i >= 0 ; i-- ) {\n        flags = silk_RSHIFT( flags, 1 );\n        Silk_TOC->VADFlags[ i ] = flags & 1;\n        Silk_TOC->VADFlag |= flags & 1;\n    }\n\n    return ret;\n}\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/decode_core.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"stack_alloc.h\"\n\n/**********************************************************/\n/* Core decoder. Performs inverse NSQ operation LTP + LPC */\n/**********************************************************/\nvoid silk_decode_core(\n    silk_decoder_state          *psDec,                         /* I/O  Decoder state                               */\n    silk_decoder_control        *psDecCtrl,                     /* I    Decoder control                             */\n    opus_int16                  xq[],                           /* O    Decoded speech                              */\n    const opus_int              pulses[ MAX_FRAME_LENGTH ]      /* I    Pulse signal                                */\n)\n{\n    opus_int   i, k, lag = 0, start_idx, sLTP_buf_idx, NLSF_interpolation_flag, signalType;\n    opus_int16 *A_Q12, *B_Q14, *pxq, A_Q12_tmp[ MAX_LPC_ORDER ];\n    VARDECL( opus_int16, sLTP );\n    VARDECL( opus_int32, sLTP_Q15 );\n    opus_int32 LTP_pred_Q13, LPC_pred_Q10, Gain_Q10, inv_gain_Q31, gain_adj_Q16, rand_seed, offset_Q10;\n    opus_int32 *pred_lag_ptr, *pexc_Q14, *pres_Q14;\n    VARDECL( opus_int32, res_Q14 );\n    VARDECL( opus_int32, sLPC_Q14 );\n    SAVE_STACK;\n\n    silk_assert( psDec->prev_gain_Q16 != 0 );\n\n    ALLOC( sLTP, psDec->ltp_mem_length, opus_int16 );\n    ALLOC( sLTP_Q15, psDec->ltp_mem_length + psDec->frame_length, opus_int32 );\n    ALLOC( res_Q14, psDec->subfr_length, opus_int32 );\n    ALLOC( sLPC_Q14, psDec->subfr_length + MAX_LPC_ORDER, opus_int32 );\n\n    offset_Q10 = silk_Quantization_Offsets_Q10[ psDec->indices.signalType >> 1 ][ psDec->indices.quantOffsetType ];\n\n    if( psDec->indices.NLSFInterpCoef_Q2 < 1 << 2 ) {\n        NLSF_interpolation_flag = 1;\n    } else {\n        NLSF_interpolation_flag = 0;\n    }\n\n    /* Decode excitation */\n    rand_seed = psDec->indices.Seed;\n    for( i = 0; i < psDec->frame_length; i++ ) {\n        rand_seed = silk_RAND( rand_seed );\n        psDec->exc_Q14[ i ] = silk_LSHIFT( (opus_int32)pulses[ i ], 14 );\n        if( psDec->exc_Q14[ i ] > 0 ) {\n            psDec->exc_Q14[ i ] -= QUANT_LEVEL_ADJUST_Q10 << 4;\n        } else\n        if( psDec->exc_Q14[ i ] < 0 ) {\n            psDec->exc_Q14[ i ] += QUANT_LEVEL_ADJUST_Q10 << 4;\n        }\n        psDec->exc_Q14[ i ] += offset_Q10 << 4;\n        if( rand_seed < 0 ) {\n           psDec->exc_Q14[ i ] = -psDec->exc_Q14[ i ];\n        }\n\n        rand_seed = silk_ADD32_ovflw( rand_seed, pulses[ i ] );\n    }\n\n    /* Copy LPC state */\n    silk_memcpy( sLPC_Q14, psDec->sLPC_Q14_buf, MAX_LPC_ORDER * sizeof( opus_int32 ) );\n\n    pexc_Q14 = psDec->exc_Q14;\n    pxq      = xq;\n    sLTP_buf_idx = psDec->ltp_mem_length;\n    /* Loop over subframes */\n    for( k = 0; k < psDec->nb_subfr; k++ ) {\n        pres_Q14 = res_Q14;\n        A_Q12 = psDecCtrl->PredCoef_Q12[ k >> 1 ];\n\n        /* Preload LPC coeficients to array on stack. Gives small performance gain */\n        silk_memcpy( A_Q12_tmp, A_Q12, psDec->LPC_order * sizeof( opus_int16 ) );\n        B_Q14        = &psDecCtrl->LTPCoef_Q14[ k * LTP_ORDER ];\n        signalType   = psDec->indices.signalType;\n\n        Gain_Q10     = silk_RSHIFT( psDecCtrl->Gains_Q16[ k ], 6 );\n        inv_gain_Q31 = silk_INVERSE32_varQ( psDecCtrl->Gains_Q16[ k ], 47 );\n\n        /* Calculate gain adjustment factor */\n        if( psDecCtrl->Gains_Q16[ k ] != psDec->prev_gain_Q16 ) {\n            gain_adj_Q16 =  silk_DIV32_varQ( psDec->prev_gain_Q16, psDecCtrl->Gains_Q16[ k ], 16 );\n\n            /* Scale short term state */\n            for( i = 0; i < MAX_LPC_ORDER; i++ ) {\n                sLPC_Q14[ i ] = silk_SMULWW( gain_adj_Q16, sLPC_Q14[ i ] );\n            }\n        } else {\n            gain_adj_Q16 = (opus_int32)1 << 16;\n        }\n\n        /* Save inv_gain */\n        silk_assert( inv_gain_Q31 != 0 );\n        psDec->prev_gain_Q16 = psDecCtrl->Gains_Q16[ k ];\n\n        /* Avoid abrupt transition from voiced PLC to unvoiced normal decoding */\n        if( psDec->lossCnt && psDec->prevSignalType == TYPE_VOICED &&\n            psDec->indices.signalType != TYPE_VOICED && k < MAX_NB_SUBFR/2 ) {\n\n            silk_memset( B_Q14, 0, LTP_ORDER * sizeof( opus_int16 ) );\n            B_Q14[ LTP_ORDER/2 ] = SILK_FIX_CONST( 0.25, 14 );\n\n            signalType = TYPE_VOICED;\n            psDecCtrl->pitchL[ k ] = psDec->lagPrev;\n        }\n\n        if( signalType == TYPE_VOICED ) {\n            /* Voiced */\n            lag = psDecCtrl->pitchL[ k ];\n\n            /* Re-whitening */\n            if( k == 0 || ( k == 2 && NLSF_interpolation_flag ) ) {\n                /* Rewhiten with new A coefs */\n                start_idx = psDec->ltp_mem_length - lag - psDec->LPC_order - LTP_ORDER / 2;\n                silk_assert( start_idx > 0 );\n\n                if( k == 2 ) {\n                    silk_memcpy( &psDec->outBuf[ psDec->ltp_mem_length ], xq, 2 * psDec->subfr_length * sizeof( opus_int16 ) );\n                }\n\n                silk_LPC_analysis_filter( &sLTP[ start_idx ], &psDec->outBuf[ start_idx + k * psDec->subfr_length ],\n                    A_Q12, psDec->ltp_mem_length - start_idx, psDec->LPC_order );\n\n                /* After rewhitening the LTP state is unscaled */\n                if( k == 0 ) {\n                    /* Do LTP downscaling to reduce inter-packet dependency */\n                    inv_gain_Q31 = silk_LSHIFT( silk_SMULWB( inv_gain_Q31, psDecCtrl->LTP_scale_Q14 ), 2 );\n                }\n                for( i = 0; i < lag + LTP_ORDER/2; i++ ) {\n                    sLTP_Q15[ sLTP_buf_idx - i - 1 ] = silk_SMULWB( inv_gain_Q31, sLTP[ psDec->ltp_mem_length - i - 1 ] );\n                }\n            } else {\n                /* Update LTP state when Gain changes */\n                if( gain_adj_Q16 != (opus_int32)1 << 16 ) {\n                    for( i = 0; i < lag + LTP_ORDER/2; i++ ) {\n                        sLTP_Q15[ sLTP_buf_idx - i - 1 ] = silk_SMULWW( gain_adj_Q16, sLTP_Q15[ sLTP_buf_idx - i - 1 ] );\n                    }\n                }\n            }\n        }\n\n        /* Long-term prediction */\n        if( signalType == TYPE_VOICED ) {\n            /* Set up pointer */\n            pred_lag_ptr = &sLTP_Q15[ sLTP_buf_idx - lag + LTP_ORDER / 2 ];\n            for( i = 0; i < psDec->subfr_length; i++ ) {\n                /* Unrolled loop */\n                /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */\n                LTP_pred_Q13 = 2;\n                LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[  0 ], B_Q14[ 0 ] );\n                LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -1 ], B_Q14[ 1 ] );\n                LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -2 ], B_Q14[ 2 ] );\n                LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -3 ], B_Q14[ 3 ] );\n                LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -4 ], B_Q14[ 4 ] );\n                pred_lag_ptr++;\n\n                /* Generate LPC excitation */\n                pres_Q14[ i ] = silk_ADD_LSHIFT32( pexc_Q14[ i ], LTP_pred_Q13, 1 );\n\n                /* Update states */\n                sLTP_Q15[ sLTP_buf_idx ] = silk_LSHIFT( pres_Q14[ i ], 1 );\n                sLTP_buf_idx++;\n            }\n        } else {\n            pres_Q14 = pexc_Q14;\n        }\n\n        for( i = 0; i < psDec->subfr_length; i++ ) {\n            /* Short-term prediction */\n            silk_assert( psDec->LPC_order == 10 || psDec->LPC_order == 16 );\n            /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */\n            LPC_pred_Q10 = silk_RSHIFT( psDec->LPC_order, 1 );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i -  1 ], A_Q12_tmp[ 0 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i -  2 ], A_Q12_tmp[ 1 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i -  3 ], A_Q12_tmp[ 2 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i -  4 ], A_Q12_tmp[ 3 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i -  5 ], A_Q12_tmp[ 4 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i -  6 ], A_Q12_tmp[ 5 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i -  7 ], A_Q12_tmp[ 6 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i -  8 ], A_Q12_tmp[ 7 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i -  9 ], A_Q12_tmp[ 8 ] );\n            LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 10 ], A_Q12_tmp[ 9 ] );\n            if( psDec->LPC_order == 16 ) {\n                LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 11 ], A_Q12_tmp[ 10 ] );\n                LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 12 ], A_Q12_tmp[ 11 ] );\n                LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 13 ], A_Q12_tmp[ 12 ] );\n                LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 14 ], A_Q12_tmp[ 13 ] );\n                LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 15 ], A_Q12_tmp[ 14 ] );\n                LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 16 ], A_Q12_tmp[ 15 ] );\n            }\n\n            /* Add prediction to LPC excitation */\n            sLPC_Q14[ MAX_LPC_ORDER + i ] = silk_ADD_LSHIFT32( pres_Q14[ i ], LPC_pred_Q10, 4 );\n\n            /* Scale with gain */\n            pxq[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( silk_SMULWW( sLPC_Q14[ MAX_LPC_ORDER + i ], Gain_Q10 ), 8 ) );\n        }\n\n        /* DEBUG_STORE_DATA( dec.pcm, pxq, psDec->subfr_length * sizeof( opus_int16 ) ) */\n\n        /* Update LPC filter state */\n        silk_memcpy( sLPC_Q14, &sLPC_Q14[ psDec->subfr_length ], MAX_LPC_ORDER * sizeof( opus_int32 ) );\n        pexc_Q14 += psDec->subfr_length;\n        pxq      += psDec->subfr_length;\n    }\n\n    /* Save LPC state */\n    silk_memcpy( psDec->sLPC_Q14_buf, sLPC_Q14, MAX_LPC_ORDER * sizeof( opus_int32 ) );\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/decode_frame.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"stack_alloc.h\"\n#include \"PLC.h\"\n\n/****************/\n/* Decode frame */\n/****************/\nopus_int silk_decode_frame(\n    silk_decoder_state          *psDec,                         /* I/O  Pointer to Silk decoder state               */\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    opus_int16                  pOut[],                         /* O    Pointer to output speech frame              */\n    opus_int32                  *pN,                            /* O    Pointer to size of output frame             */\n    opus_int                    lostFlag,                       /* I    0: no loss, 1 loss, 2 decode fec            */\n    opus_int                    condCoding                      /* I    The type of conditional coding to use       */\n)\n{\n    VARDECL( silk_decoder_control, psDecCtrl );\n    opus_int         L, mv_len, ret = 0;\n    VARDECL( opus_int, pulses );\n    SAVE_STACK;\n\n    L = psDec->frame_length;\n    ALLOC( psDecCtrl, 1, silk_decoder_control );\n    ALLOC( pulses, (L + SHELL_CODEC_FRAME_LENGTH - 1) &\n                   ~(SHELL_CODEC_FRAME_LENGTH - 1), opus_int );\n    psDecCtrl->LTP_scale_Q14 = 0;\n\n    /* Safety checks */\n    silk_assert( L > 0 && L <= MAX_FRAME_LENGTH );\n\n    if(   lostFlag == FLAG_DECODE_NORMAL ||\n        ( lostFlag == FLAG_DECODE_LBRR && psDec->LBRR_flags[ psDec->nFramesDecoded ] == 1 ) )\n    {\n        /*********************************************/\n        /* Decode quantization indices of side info  */\n        /*********************************************/\n        silk_decode_indices( psDec, psRangeDec, psDec->nFramesDecoded, lostFlag, condCoding );\n\n        /*********************************************/\n        /* Decode quantization indices of excitation */\n        /*********************************************/\n        silk_decode_pulses( psRangeDec, pulses, psDec->indices.signalType,\n                psDec->indices.quantOffsetType, psDec->frame_length );\n\n        /********************************************/\n        /* Decode parameters and pulse signal       */\n        /********************************************/\n        silk_decode_parameters( psDec, psDecCtrl, condCoding );\n\n        /********************************************************/\n        /* Run inverse NSQ                                      */\n        /********************************************************/\n        silk_decode_core( psDec, psDecCtrl, pOut, pulses );\n\n        /********************************************************/\n        /* Update PLC state                                     */\n        /********************************************************/\n        silk_PLC( psDec, psDecCtrl, pOut, 0 );\n\n        psDec->lossCnt = 0;\n        psDec->prevSignalType = psDec->indices.signalType;\n        silk_assert( psDec->prevSignalType >= 0 && psDec->prevSignalType <= 2 );\n\n        /* A frame has been decoded without errors */\n        psDec->first_frame_after_reset = 0;\n    } else {\n        /* Handle packet loss by extrapolation */\n        silk_PLC( psDec, psDecCtrl, pOut, 1 );\n    }\n\n    /*************************/\n    /* Update output buffer. */\n    /*************************/\n    silk_assert( psDec->ltp_mem_length >= psDec->frame_length );\n    mv_len = psDec->ltp_mem_length - psDec->frame_length;\n    silk_memmove( psDec->outBuf, &psDec->outBuf[ psDec->frame_length ], mv_len * sizeof(opus_int16) );\n    silk_memcpy( &psDec->outBuf[ mv_len ], pOut, psDec->frame_length * sizeof( opus_int16 ) );\n\n    /****************************************************************/\n    /* Ensure smooth connection of extrapolated and good frames     */\n    /****************************************************************/\n    silk_PLC_glue_frames( psDec, pOut, L );\n\n    /************************************************/\n    /* Comfort noise generation / estimation        */\n    /************************************************/\n    silk_CNG( psDec, psDecCtrl, pOut, L );\n\n    /* Update some decoder state variables */\n    psDec->lagPrev = psDecCtrl->pitchL[ psDec->nb_subfr - 1 ];\n\n    /* Set output frame length */\n    *pN = L;\n\n    RESTORE_STACK;\n    return ret;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/decode_indices.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Decode side-information parameters from payload */\nvoid silk_decode_indices(\n    silk_decoder_state          *psDec,                         /* I/O  State                                       */\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    opus_int                    FrameIndex,                     /* I    Frame number                                */\n    opus_int                    decode_LBRR,                    /* I    Flag indicating LBRR data is being decoded  */\n    opus_int                    condCoding                      /* I    The type of conditional coding to use       */\n)\n{\n    opus_int   i, k, Ix;\n    opus_int   decode_absolute_lagIndex, delta_lagIndex;\n    opus_int16 ec_ix[ MAX_LPC_ORDER ];\n    opus_uint8 pred_Q8[ MAX_LPC_ORDER ];\n\n    /*******************************************/\n    /* Decode signal type and quantizer offset */\n    /*******************************************/\n    if( decode_LBRR || psDec->VAD_flags[ FrameIndex ] ) {\n        Ix = ec_dec_icdf( psRangeDec, silk_type_offset_VAD_iCDF, 8 ) + 2;\n    } else {\n        Ix = ec_dec_icdf( psRangeDec, silk_type_offset_no_VAD_iCDF, 8 );\n    }\n    psDec->indices.signalType      = (opus_int8)silk_RSHIFT( Ix, 1 );\n    psDec->indices.quantOffsetType = (opus_int8)( Ix & 1 );\n\n    /****************/\n    /* Decode gains */\n    /****************/\n    /* First subframe */\n    if( condCoding == CODE_CONDITIONALLY ) {\n        /* Conditional coding */\n        psDec->indices.GainsIndices[ 0 ] = (opus_int8)ec_dec_icdf( psRangeDec, silk_delta_gain_iCDF, 8 );\n    } else {\n        /* Independent coding, in two stages: MSB bits followed by 3 LSBs */\n        psDec->indices.GainsIndices[ 0 ]  = (opus_int8)silk_LSHIFT( ec_dec_icdf( psRangeDec, silk_gain_iCDF[ psDec->indices.signalType ], 8 ), 3 );\n        psDec->indices.GainsIndices[ 0 ] += (opus_int8)ec_dec_icdf( psRangeDec, silk_uniform8_iCDF, 8 );\n    }\n\n    /* Remaining subframes */\n    for( i = 1; i < psDec->nb_subfr; i++ ) {\n        psDec->indices.GainsIndices[ i ] = (opus_int8)ec_dec_icdf( psRangeDec, silk_delta_gain_iCDF, 8 );\n    }\n\n    /**********************/\n    /* Decode LSF Indices */\n    /**********************/\n    psDec->indices.NLSFIndices[ 0 ] = (opus_int8)ec_dec_icdf( psRangeDec, &psDec->psNLSF_CB->CB1_iCDF[ ( psDec->indices.signalType >> 1 ) * psDec->psNLSF_CB->nVectors ], 8 );\n    silk_NLSF_unpack( ec_ix, pred_Q8, psDec->psNLSF_CB, psDec->indices.NLSFIndices[ 0 ] );\n    silk_assert( psDec->psNLSF_CB->order == psDec->LPC_order );\n    for( i = 0; i < psDec->psNLSF_CB->order; i++ ) {\n        Ix = ec_dec_icdf( psRangeDec, &psDec->psNLSF_CB->ec_iCDF[ ec_ix[ i ] ], 8 );\n        if( Ix == 0 ) {\n            Ix -= ec_dec_icdf( psRangeDec, silk_NLSF_EXT_iCDF, 8 );\n        } else if( Ix == 2 * NLSF_QUANT_MAX_AMPLITUDE ) {\n            Ix += ec_dec_icdf( psRangeDec, silk_NLSF_EXT_iCDF, 8 );\n        }\n        psDec->indices.NLSFIndices[ i+1 ] = (opus_int8)( Ix - NLSF_QUANT_MAX_AMPLITUDE );\n    }\n\n    /* Decode LSF interpolation factor */\n    if( psDec->nb_subfr == MAX_NB_SUBFR ) {\n        psDec->indices.NLSFInterpCoef_Q2 = (opus_int8)ec_dec_icdf( psRangeDec, silk_NLSF_interpolation_factor_iCDF, 8 );\n    } else {\n        psDec->indices.NLSFInterpCoef_Q2 = 4;\n    }\n\n    if( psDec->indices.signalType == TYPE_VOICED )\n    {\n        /*********************/\n        /* Decode pitch lags */\n        /*********************/\n        /* Get lag index */\n        decode_absolute_lagIndex = 1;\n        if( condCoding == CODE_CONDITIONALLY && psDec->ec_prevSignalType == TYPE_VOICED ) {\n            /* Decode Delta index */\n            delta_lagIndex = (opus_int16)ec_dec_icdf( psRangeDec, silk_pitch_delta_iCDF, 8 );\n            if( delta_lagIndex > 0 ) {\n                delta_lagIndex = delta_lagIndex - 9;\n                psDec->indices.lagIndex = (opus_int16)( psDec->ec_prevLagIndex + delta_lagIndex );\n                decode_absolute_lagIndex = 0;\n            }\n        }\n        if( decode_absolute_lagIndex ) {\n            /* Absolute decoding */\n            psDec->indices.lagIndex  = (opus_int16)ec_dec_icdf( psRangeDec, silk_pitch_lag_iCDF, 8 ) * silk_RSHIFT( psDec->fs_kHz, 1 );\n            psDec->indices.lagIndex += (opus_int16)ec_dec_icdf( psRangeDec, psDec->pitch_lag_low_bits_iCDF, 8 );\n        }\n        psDec->ec_prevLagIndex = psDec->indices.lagIndex;\n\n        /* Get countour index */\n        psDec->indices.contourIndex = (opus_int8)ec_dec_icdf( psRangeDec, psDec->pitch_contour_iCDF, 8 );\n\n        /********************/\n        /* Decode LTP gains */\n        /********************/\n        /* Decode PERIndex value */\n        psDec->indices.PERIndex = (opus_int8)ec_dec_icdf( psRangeDec, silk_LTP_per_index_iCDF, 8 );\n\n        for( k = 0; k < psDec->nb_subfr; k++ ) {\n            psDec->indices.LTPIndex[ k ] = (opus_int8)ec_dec_icdf( psRangeDec, silk_LTP_gain_iCDF_ptrs[ psDec->indices.PERIndex ], 8 );\n        }\n\n        /**********************/\n        /* Decode LTP scaling */\n        /**********************/\n        if( condCoding == CODE_INDEPENDENTLY ) {\n            psDec->indices.LTP_scaleIndex = (opus_int8)ec_dec_icdf( psRangeDec, silk_LTPscale_iCDF, 8 );\n        } else {\n            psDec->indices.LTP_scaleIndex = 0;\n        }\n    }\n    psDec->ec_prevSignalType = psDec->indices.signalType;\n\n    /***************/\n    /* Decode seed */\n    /***************/\n    psDec->indices.Seed = (opus_int8)ec_dec_icdf( psRangeDec, silk_uniform4_iCDF, 8 );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/decode_parameters.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Decode parameters from payload */\nvoid silk_decode_parameters(\n    silk_decoder_state          *psDec,                         /* I/O  State                                       */\n    silk_decoder_control        *psDecCtrl,                     /* I/O  Decoder control                             */\n    opus_int                    condCoding                      /* I    The type of conditional coding to use       */\n)\n{\n    opus_int   i, k, Ix;\n    opus_int16 pNLSF_Q15[ MAX_LPC_ORDER ], pNLSF0_Q15[ MAX_LPC_ORDER ];\n    const opus_int8 *cbk_ptr_Q7;\n\n    /* Dequant Gains */\n    silk_gains_dequant( psDecCtrl->Gains_Q16, psDec->indices.GainsIndices,\n        &psDec->LastGainIndex, condCoding == CODE_CONDITIONALLY, psDec->nb_subfr );\n\n    /****************/\n    /* Decode NLSFs */\n    /****************/\n    silk_NLSF_decode( pNLSF_Q15, psDec->indices.NLSFIndices, psDec->psNLSF_CB );\n\n    /* Convert NLSF parameters to AR prediction filter coefficients */\n    silk_NLSF2A( psDecCtrl->PredCoef_Q12[ 1 ], pNLSF_Q15, psDec->LPC_order );\n\n    /* If just reset, e.g., because internal Fs changed, do not allow interpolation */\n    /* improves the case of packet loss in the first frame after a switch           */\n    if( psDec->first_frame_after_reset == 1 ) {\n        psDec->indices.NLSFInterpCoef_Q2 = 4;\n    }\n\n    if( psDec->indices.NLSFInterpCoef_Q2 < 4 ) {\n        /* Calculation of the interpolated NLSF0 vector from the interpolation factor, */\n        /* the previous NLSF1, and the current NLSF1                                   */\n        for( i = 0; i < psDec->LPC_order; i++ ) {\n            pNLSF0_Q15[ i ] = psDec->prevNLSF_Q15[ i ] + silk_RSHIFT( silk_MUL( psDec->indices.NLSFInterpCoef_Q2,\n                pNLSF_Q15[ i ] - psDec->prevNLSF_Q15[ i ] ), 2 );\n        }\n\n        /* Convert NLSF parameters to AR prediction filter coefficients */\n        silk_NLSF2A( psDecCtrl->PredCoef_Q12[ 0 ], pNLSF0_Q15, psDec->LPC_order );\n    } else {\n        /* Copy LPC coefficients for first half from second half */\n        silk_memcpy( psDecCtrl->PredCoef_Q12[ 0 ], psDecCtrl->PredCoef_Q12[ 1 ], psDec->LPC_order * sizeof( opus_int16 ) );\n    }\n\n    silk_memcpy( psDec->prevNLSF_Q15, pNLSF_Q15, psDec->LPC_order * sizeof( opus_int16 ) );\n\n    /* After a packet loss do BWE of LPC coefs */\n    if( psDec->lossCnt ) {\n        silk_bwexpander( psDecCtrl->PredCoef_Q12[ 0 ], psDec->LPC_order, BWE_AFTER_LOSS_Q16 );\n        silk_bwexpander( psDecCtrl->PredCoef_Q12[ 1 ], psDec->LPC_order, BWE_AFTER_LOSS_Q16 );\n    }\n\n    if( psDec->indices.signalType == TYPE_VOICED ) {\n        /*********************/\n        /* Decode pitch lags */\n        /*********************/\n\n        /* Decode pitch values */\n        silk_decode_pitch( psDec->indices.lagIndex, psDec->indices.contourIndex, psDecCtrl->pitchL, psDec->fs_kHz, psDec->nb_subfr );\n\n        /* Decode Codebook Index */\n        cbk_ptr_Q7 = silk_LTP_vq_ptrs_Q7[ psDec->indices.PERIndex ]; /* set pointer to start of codebook */\n\n        for( k = 0; k < psDec->nb_subfr; k++ ) {\n            Ix = psDec->indices.LTPIndex[ k ];\n            for( i = 0; i < LTP_ORDER; i++ ) {\n                psDecCtrl->LTPCoef_Q14[ k * LTP_ORDER + i ] = silk_LSHIFT( cbk_ptr_Q7[ Ix * LTP_ORDER + i ], 7 );\n            }\n        }\n\n        /**********************/\n        /* Decode LTP scaling */\n        /**********************/\n        Ix = psDec->indices.LTP_scaleIndex;\n        psDecCtrl->LTP_scale_Q14 = silk_LTPScales_table_Q14[ Ix ];\n    } else {\n        silk_memset( psDecCtrl->pitchL,      0,             psDec->nb_subfr * sizeof( opus_int   ) );\n        silk_memset( psDecCtrl->LTPCoef_Q14, 0, LTP_ORDER * psDec->nb_subfr * sizeof( opus_int16 ) );\n        psDec->indices.PERIndex  = 0;\n        psDecCtrl->LTP_scale_Q14 = 0;\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/decode_pitch.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n/***********************************************************\n* Pitch analyser function\n********************************************************** */\n#include \"SigProc_FIX.h\"\n#include \"pitch_est_defines.h\"\n\nvoid silk_decode_pitch(\n    opus_int16                  lagIndex,           /* I                                                                */\n    opus_int8                   contourIndex,       /* O                                                                */\n    opus_int                    pitch_lags[],       /* O    4 pitch values                                              */\n    const opus_int              Fs_kHz,             /* I    sampling frequency (kHz)                                    */\n    const opus_int              nb_subfr            /* I    number of sub frames                                        */\n)\n{\n    opus_int   lag, k, min_lag, max_lag, cbk_size;\n    const opus_int8 *Lag_CB_ptr;\n\n    if( Fs_kHz == 8 ) {\n        if( nb_subfr == PE_MAX_NB_SUBFR ) {\n            Lag_CB_ptr = &silk_CB_lags_stage2[ 0 ][ 0 ];\n            cbk_size   = PE_NB_CBKS_STAGE2_EXT;\n        } else {\n            silk_assert( nb_subfr == PE_MAX_NB_SUBFR >> 1 );\n            Lag_CB_ptr = &silk_CB_lags_stage2_10_ms[ 0 ][ 0 ];\n            cbk_size   = PE_NB_CBKS_STAGE2_10MS;\n        }\n    } else {\n        if( nb_subfr == PE_MAX_NB_SUBFR ) {\n            Lag_CB_ptr = &silk_CB_lags_stage3[ 0 ][ 0 ];\n            cbk_size   = PE_NB_CBKS_STAGE3_MAX;\n        } else {\n            silk_assert( nb_subfr == PE_MAX_NB_SUBFR >> 1 );\n            Lag_CB_ptr = &silk_CB_lags_stage3_10_ms[ 0 ][ 0 ];\n            cbk_size   = PE_NB_CBKS_STAGE3_10MS;\n        }\n    }\n\n    min_lag = silk_SMULBB( PE_MIN_LAG_MS, Fs_kHz );\n    max_lag = silk_SMULBB( PE_MAX_LAG_MS, Fs_kHz );\n    lag = min_lag + lagIndex;\n\n    for( k = 0; k < nb_subfr; k++ ) {\n        pitch_lags[ k ] = lag + matrix_ptr( Lag_CB_ptr, k, contourIndex, cbk_size );\n        pitch_lags[ k ] = silk_LIMIT( pitch_lags[ k ], min_lag, max_lag );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/decode_pulses.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/*********************************************/\n/* Decode quantization indices of excitation */\n/*********************************************/\nvoid silk_decode_pulses(\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    opus_int                    pulses[],                       /* O    Excitation signal                           */\n    const opus_int              signalType,                     /* I    Sigtype                                     */\n    const opus_int              quantOffsetType,                /* I    quantOffsetType                             */\n    const opus_int              frame_length                    /* I    Frame length                                */\n)\n{\n    opus_int   i, j, k, iter, abs_q, nLS, RateLevelIndex;\n    opus_int   sum_pulses[ MAX_NB_SHELL_BLOCKS ], nLshifts[ MAX_NB_SHELL_BLOCKS ];\n    opus_int   *pulses_ptr;\n    const opus_uint8 *cdf_ptr;\n\n    /*********************/\n    /* Decode rate level */\n    /*********************/\n    RateLevelIndex = ec_dec_icdf( psRangeDec, silk_rate_levels_iCDF[ signalType >> 1 ], 8 );\n\n    /* Calculate number of shell blocks */\n    silk_assert( 1 << LOG2_SHELL_CODEC_FRAME_LENGTH == SHELL_CODEC_FRAME_LENGTH );\n    iter = silk_RSHIFT( frame_length, LOG2_SHELL_CODEC_FRAME_LENGTH );\n    if( iter * SHELL_CODEC_FRAME_LENGTH < frame_length ) {\n        silk_assert( frame_length == 12 * 10 ); /* Make sure only happens for 10 ms @ 12 kHz */\n        iter++;\n    }\n\n    /***************************************************/\n    /* Sum-Weighted-Pulses Decoding                    */\n    /***************************************************/\n    cdf_ptr = silk_pulses_per_block_iCDF[ RateLevelIndex ];\n    for( i = 0; i < iter; i++ ) {\n        nLshifts[ i ] = 0;\n        sum_pulses[ i ] = ec_dec_icdf( psRangeDec, cdf_ptr, 8 );\n\n        /* LSB indication */\n        while( sum_pulses[ i ] == MAX_PULSES + 1 ) {\n            nLshifts[ i ]++;\n            /* When we've already got 10 LSBs, we shift the table to not allow (MAX_PULSES + 1) */\n            sum_pulses[ i ] = ec_dec_icdf( psRangeDec,\n                    silk_pulses_per_block_iCDF[ N_RATE_LEVELS - 1] + ( nLshifts[ i ] == 10 ), 8 );\n        }\n    }\n\n    /***************************************************/\n    /* Shell decoding                                  */\n    /***************************************************/\n    for( i = 0; i < iter; i++ ) {\n        if( sum_pulses[ i ] > 0 ) {\n            silk_shell_decoder( &pulses[ silk_SMULBB( i, SHELL_CODEC_FRAME_LENGTH ) ], psRangeDec, sum_pulses[ i ] );\n        } else {\n            silk_memset( &pulses[ silk_SMULBB( i, SHELL_CODEC_FRAME_LENGTH ) ], 0, SHELL_CODEC_FRAME_LENGTH * sizeof( opus_int ) );\n        }\n    }\n\n    /***************************************************/\n    /* LSB Decoding                                    */\n    /***************************************************/\n    for( i = 0; i < iter; i++ ) {\n        if( nLshifts[ i ] > 0 ) {\n            nLS = nLshifts[ i ];\n            pulses_ptr = &pulses[ silk_SMULBB( i, SHELL_CODEC_FRAME_LENGTH ) ];\n            for( k = 0; k < SHELL_CODEC_FRAME_LENGTH; k++ ) {\n                abs_q = pulses_ptr[ k ];\n                for( j = 0; j < nLS; j++ ) {\n                    abs_q = silk_LSHIFT( abs_q, 1 );\n                    abs_q += ec_dec_icdf( psRangeDec, silk_lsb_iCDF, 8 );\n                }\n                pulses_ptr[ k ] = abs_q;\n            }\n            /* Mark the number of pulses non-zero for sign decoding. */\n            sum_pulses[ i ] |= nLS << 5;\n        }\n    }\n\n    /****************************************/\n    /* Decode and add signs to pulse signal */\n    /****************************************/\n    silk_decode_signs( psRangeDec, pulses, frame_length, signalType, quantOffsetType, sum_pulses );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/decoder_set_fs.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Set decoder sampling rate */\nopus_int silk_decoder_set_fs(\n    silk_decoder_state          *psDec,                         /* I/O  Decoder state pointer                       */\n    opus_int                    fs_kHz,                         /* I    Sampling frequency (kHz)                    */\n    opus_int32                  fs_API_Hz                       /* I    API Sampling frequency (Hz)                 */\n)\n{\n    opus_int frame_length, ret = 0;\n\n    silk_assert( fs_kHz == 8 || fs_kHz == 12 || fs_kHz == 16 );\n    silk_assert( psDec->nb_subfr == MAX_NB_SUBFR || psDec->nb_subfr == MAX_NB_SUBFR/2 );\n\n    /* New (sub)frame length */\n    psDec->subfr_length = silk_SMULBB( SUB_FRAME_LENGTH_MS, fs_kHz );\n    frame_length = silk_SMULBB( psDec->nb_subfr, psDec->subfr_length );\n\n    /* Initialize resampler when switching internal or external sampling frequency */\n    if( psDec->fs_kHz != fs_kHz || psDec->fs_API_hz != fs_API_Hz ) {\n        /* Initialize the resampler for dec_API.c preparing resampling from fs_kHz to API_fs_Hz */\n        ret += silk_resampler_init( &psDec->resampler_state, silk_SMULBB( fs_kHz, 1000 ), fs_API_Hz, 0 );\n\n        psDec->fs_API_hz = fs_API_Hz;\n    }\n\n    if( psDec->fs_kHz != fs_kHz || frame_length != psDec->frame_length ) {\n        if( fs_kHz == 8 ) {\n            if( psDec->nb_subfr == MAX_NB_SUBFR ) {\n                psDec->pitch_contour_iCDF = silk_pitch_contour_NB_iCDF;\n            } else {\n                psDec->pitch_contour_iCDF = silk_pitch_contour_10_ms_NB_iCDF;\n            }\n        } else {\n            if( psDec->nb_subfr == MAX_NB_SUBFR ) {\n                psDec->pitch_contour_iCDF = silk_pitch_contour_iCDF;\n            } else {\n                psDec->pitch_contour_iCDF = silk_pitch_contour_10_ms_iCDF;\n            }\n        }\n        if( psDec->fs_kHz != fs_kHz ) {\n            psDec->ltp_mem_length = silk_SMULBB( LTP_MEM_LENGTH_MS, fs_kHz );\n            if( fs_kHz == 8 || fs_kHz == 12 ) {\n                psDec->LPC_order = MIN_LPC_ORDER;\n                psDec->psNLSF_CB = &silk_NLSF_CB_NB_MB;\n            } else {\n                psDec->LPC_order = MAX_LPC_ORDER;\n                psDec->psNLSF_CB = &silk_NLSF_CB_WB;\n            }\n            if( fs_kHz == 16 ) {\n                psDec->pitch_lag_low_bits_iCDF = silk_uniform8_iCDF;\n            } else if( fs_kHz == 12 ) {\n                psDec->pitch_lag_low_bits_iCDF = silk_uniform6_iCDF;\n            } else if( fs_kHz == 8 ) {\n                psDec->pitch_lag_low_bits_iCDF = silk_uniform4_iCDF;\n            } else {\n                /* unsupported sampling rate */\n                silk_assert( 0 );\n            }\n            psDec->first_frame_after_reset = 1;\n            psDec->lagPrev                 = 100;\n            psDec->LastGainIndex           = 10;\n            psDec->prevSignalType          = TYPE_NO_VOICE_ACTIVITY;\n            silk_memset( psDec->outBuf, 0, sizeof(psDec->outBuf));\n            silk_memset( psDec->sLPC_Q14_buf, 0, sizeof(psDec->sLPC_Q14_buf) );\n        }\n\n        psDec->fs_kHz       = fs_kHz;\n        psDec->frame_length = frame_length;\n    }\n\n    /* Check that settings are valid */\n    silk_assert( psDec->frame_length > 0 && psDec->frame_length <= MAX_FRAME_LENGTH );\n\n    return ret;\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/define.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_DEFINE_H\n#define SILK_DEFINE_H\n\n#include \"errors.h\"\n#include \"typedef.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n/* Max number of encoder channels (1/2) */\n#define ENCODER_NUM_CHANNELS                    2\n/* Number of decoder channels (1/2) */\n#define DECODER_NUM_CHANNELS                    2\n\n#define MAX_FRAMES_PER_PACKET                   3\n\n/* Limits on bitrate */\n#define MIN_TARGET_RATE_BPS                     5000\n#define MAX_TARGET_RATE_BPS                     80000\n#define TARGET_RATE_TAB_SZ                      8\n\n/* LBRR thresholds */\n#define LBRR_NB_MIN_RATE_BPS                    12000\n#define LBRR_MB_MIN_RATE_BPS                    14000\n#define LBRR_WB_MIN_RATE_BPS                    16000\n\n/* DTX settings */\n#define NB_SPEECH_FRAMES_BEFORE_DTX             10      /* eq 200 ms */\n#define MAX_CONSECUTIVE_DTX                     20      /* eq 400 ms */\n\n/* Maximum sampling frequency */\n#define MAX_FS_KHZ                              16\n#define MAX_API_FS_KHZ                          48\n\n/* Signal types */\n#define TYPE_NO_VOICE_ACTIVITY                  0\n#define TYPE_UNVOICED                           1\n#define TYPE_VOICED                             2\n\n/* Conditional coding types */\n#define CODE_INDEPENDENTLY                      0\n#define CODE_INDEPENDENTLY_NO_LTP_SCALING       1\n#define CODE_CONDITIONALLY                      2\n\n/* Settings for stereo processing */\n#define STEREO_QUANT_TAB_SIZE                   16\n#define STEREO_QUANT_SUB_STEPS                  5\n#define STEREO_INTERP_LEN_MS                    8       /* must be even */\n#define STEREO_RATIO_SMOOTH_COEF                0.01    /* smoothing coef for signal norms and stereo width */\n\n/* Range of pitch lag estimates */\n#define PITCH_EST_MIN_LAG_MS                    2       /* 2 ms -> 500 Hz */\n#define PITCH_EST_MAX_LAG_MS                    18      /* 18 ms -> 56 Hz */\n\n/* Maximum number of subframes */\n#define MAX_NB_SUBFR                            4\n\n/* Number of samples per frame */\n#define LTP_MEM_LENGTH_MS                       20\n#define SUB_FRAME_LENGTH_MS                     5\n#define MAX_SUB_FRAME_LENGTH                    ( SUB_FRAME_LENGTH_MS * MAX_FS_KHZ )\n#define MAX_FRAME_LENGTH_MS                     ( SUB_FRAME_LENGTH_MS * MAX_NB_SUBFR )\n#define MAX_FRAME_LENGTH                        ( MAX_FRAME_LENGTH_MS * MAX_FS_KHZ )\n\n/* Milliseconds of lookahead for pitch analysis */\n#define LA_PITCH_MS                             2\n#define LA_PITCH_MAX                            ( LA_PITCH_MS * MAX_FS_KHZ )\n\n/* Order of LPC used in find pitch */\n#define MAX_FIND_PITCH_LPC_ORDER                16\n\n/* Length of LPC window used in find pitch */\n#define FIND_PITCH_LPC_WIN_MS                   ( 20 + (LA_PITCH_MS << 1) )\n#define FIND_PITCH_LPC_WIN_MS_2_SF              ( 10 + (LA_PITCH_MS << 1) )\n#define FIND_PITCH_LPC_WIN_MAX                  ( FIND_PITCH_LPC_WIN_MS * MAX_FS_KHZ )\n\n/* Milliseconds of lookahead for noise shape analysis */\n#define LA_SHAPE_MS                             5\n#define LA_SHAPE_MAX                            ( LA_SHAPE_MS * MAX_FS_KHZ )\n\n/* Maximum length of LPC window used in noise shape analysis */\n#define SHAPE_LPC_WIN_MAX                       ( 15 * MAX_FS_KHZ )\n\n/* dB level of lowest gain quantization level */\n#define MIN_QGAIN_DB                            2\n/* dB level of highest gain quantization level */\n#define MAX_QGAIN_DB                            88\n/* Number of gain quantization levels */\n#define N_LEVELS_QGAIN                          64\n/* Max increase in gain quantization index */\n#define MAX_DELTA_GAIN_QUANT                    36\n/* Max decrease in gain quantization index */\n#define MIN_DELTA_GAIN_QUANT                    -4\n\n/* Quantization offsets (multiples of 4) */\n#define OFFSET_VL_Q10                           32\n#define OFFSET_VH_Q10                           100\n#define OFFSET_UVL_Q10                          100\n#define OFFSET_UVH_Q10                          240\n\n#define QUANT_LEVEL_ADJUST_Q10                  80\n\n/* Maximum numbers of iterations used to stabilize an LPC vector */\n#define MAX_LPC_STABILIZE_ITERATIONS            16\n#define MAX_PREDICTION_POWER_GAIN               1e4f\n#define MAX_PREDICTION_POWER_GAIN_AFTER_RESET   1e2f\n\n#define MAX_LPC_ORDER                           16\n#define MIN_LPC_ORDER                           10\n\n/* Find Pred Coef defines */\n#define LTP_ORDER                               5\n\n/* LTP quantization settings */\n#define NB_LTP_CBKS                             3\n\n/* Flag to use harmonic noise shaping */\n#define USE_HARM_SHAPING                        1\n\n/* Max LPC order of noise shaping filters */\n#define MAX_SHAPE_LPC_ORDER                     16\n\n#define HARM_SHAPE_FIR_TAPS                     3\n\n/* Maximum number of delayed decision states */\n#define MAX_DEL_DEC_STATES                      4\n\n#define LTP_BUF_LENGTH                          512\n#define LTP_MASK                                ( LTP_BUF_LENGTH - 1 )\n\n#define DECISION_DELAY                          32\n#define DECISION_DELAY_MASK                     ( DECISION_DELAY - 1 )\n\n/* Number of subframes for excitation entropy coding */\n#define SHELL_CODEC_FRAME_LENGTH                16\n#define LOG2_SHELL_CODEC_FRAME_LENGTH           4\n#define MAX_NB_SHELL_BLOCKS                     ( MAX_FRAME_LENGTH / SHELL_CODEC_FRAME_LENGTH )\n\n/* Number of rate levels, for entropy coding of excitation */\n#define N_RATE_LEVELS                           10\n\n/* Maximum sum of pulses per shell coding frame */\n#define MAX_PULSES                              16\n\n#define MAX_MATRIX_SIZE                         MAX_LPC_ORDER /* Max of LPC Order and LTP order */\n\n#if( MAX_LPC_ORDER > DECISION_DELAY )\n# define NSQ_LPC_BUF_LENGTH                     MAX_LPC_ORDER\n#else\n# define NSQ_LPC_BUF_LENGTH                     DECISION_DELAY\n#endif\n\n/***************************/\n/* Voice activity detector */\n/***************************/\n#define VAD_N_BANDS                             4\n\n#define VAD_INTERNAL_SUBFRAMES_LOG2             2\n#define VAD_INTERNAL_SUBFRAMES                  ( 1 << VAD_INTERNAL_SUBFRAMES_LOG2 )\n\n#define VAD_NOISE_LEVEL_SMOOTH_COEF_Q16         1024    /* Must be <  4096 */\n#define VAD_NOISE_LEVELS_BIAS                   50\n\n/* Sigmoid settings */\n#define VAD_NEGATIVE_OFFSET_Q5                  128     /* sigmoid is 0 at -128 */\n#define VAD_SNR_FACTOR_Q16                      45000\n\n/* smoothing for SNR measurement */\n#define VAD_SNR_SMOOTH_COEF_Q18                 4096\n\n/* Size of the piecewise linear cosine approximation table for the LSFs */\n#define LSF_COS_TAB_SZ_FIX                      128\n\n/******************/\n/* NLSF quantizer */\n/******************/\n#define NLSF_W_Q                                2\n#define NLSF_VQ_MAX_VECTORS                     32\n#define NLSF_VQ_MAX_SURVIVORS                   32\n#define NLSF_QUANT_MAX_AMPLITUDE                4\n#define NLSF_QUANT_MAX_AMPLITUDE_EXT            10\n#define NLSF_QUANT_LEVEL_ADJ                    0.1\n#define NLSF_QUANT_DEL_DEC_STATES_LOG2          2\n#define NLSF_QUANT_DEL_DEC_STATES               ( 1 << NLSF_QUANT_DEL_DEC_STATES_LOG2 )\n\n/* Transition filtering for mode switching */\n#define TRANSITION_TIME_MS                      5120    /* 5120 = 64 * FRAME_LENGTH_MS * ( TRANSITION_INT_NUM - 1 ) = 64*(20*4)*/\n#define TRANSITION_NB                           3       /* Hardcoded in tables */\n#define TRANSITION_NA                           2       /* Hardcoded in tables */\n#define TRANSITION_INT_NUM                      5       /* Hardcoded in tables */\n#define TRANSITION_FRAMES                       ( TRANSITION_TIME_MS / MAX_FRAME_LENGTH_MS )\n#define TRANSITION_INT_STEPS                    ( TRANSITION_FRAMES  / ( TRANSITION_INT_NUM - 1 ) )\n\n/* BWE factors to apply after packet loss */\n#define BWE_AFTER_LOSS_Q16                      63570\n\n/* Defines for CN generation */\n#define CNG_BUF_MASK_MAX                        255     /* 2^floor(log2(MAX_FRAME_LENGTH))-1    */\n#define CNG_GAIN_SMTH_Q16                       4634    /* 0.25^(1/4)                           */\n#define CNG_NLSF_SMTH_Q16                       16348   /* 0.25                                 */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/enc_API.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n#include \"define.h\"\n#include \"API.h\"\n#include \"control.h\"\n#include \"typedef.h\"\n#include \"stack_alloc.h\"\n#include \"structs.h\"\n#include \"tuning_parameters.h\"\n#ifdef FIXED_POINT\n#include \"main_FIX.h\"\n#else\n#include \"main_FLP.h\"\n#endif\n\n/***************************************/\n/* Read control structure from encoder */\n/***************************************/\nstatic opus_int silk_QueryEncoder(                      /* O    Returns error code                              */\n    const void                      *encState,          /* I    State                                           */\n    silk_EncControlStruct           *encStatus          /* O    Encoder Status                                  */\n);\n\n/****************************************/\n/* Encoder functions                    */\n/****************************************/\n\nopus_int silk_Get_Encoder_Size(                         /* O    Returns error code                              */\n    opus_int                        *encSizeBytes       /* O    Number of bytes in SILK encoder state           */\n)\n{\n    opus_int ret = SILK_NO_ERROR;\n\n    *encSizeBytes = sizeof( silk_encoder );\n\n    return ret;\n}\n\n/*************************/\n/* Init or Reset encoder */\n/*************************/\nopus_int silk_InitEncoder(                              /* O    Returns error code                              */\n    void                            *encState,          /* I/O  State                                           */\n    int                              arch,              /* I    Run-time architecture                           */\n    silk_EncControlStruct           *encStatus          /* O    Encoder Status                                  */\n)\n{\n    silk_encoder *psEnc;\n    opus_int n, ret = SILK_NO_ERROR;\n\n    psEnc = (silk_encoder *)encState;\n\n    /* Reset encoder */\n    silk_memset( psEnc, 0, sizeof( silk_encoder ) );\n    for( n = 0; n < ENCODER_NUM_CHANNELS; n++ ) {\n        if( ret += silk_init_encoder( &psEnc->state_Fxx[ n ], arch ) ) {\n            silk_assert( 0 );\n        }\n    }\n\n    psEnc->nChannelsAPI = 1;\n    psEnc->nChannelsInternal = 1;\n\n    /* Read control structure */\n    if( ret += silk_QueryEncoder( encState, encStatus ) ) {\n        silk_assert( 0 );\n    }\n\n    return ret;\n}\n\n/***************************************/\n/* Read control structure from encoder */\n/***************************************/\nstatic opus_int silk_QueryEncoder(                      /* O    Returns error code                              */\n    const void                      *encState,          /* I    State                                           */\n    silk_EncControlStruct           *encStatus          /* O    Encoder Status                                  */\n)\n{\n    opus_int ret = SILK_NO_ERROR;\n    silk_encoder_state_Fxx *state_Fxx;\n    silk_encoder *psEnc = (silk_encoder *)encState;\n\n    state_Fxx = psEnc->state_Fxx;\n\n    encStatus->nChannelsAPI              = psEnc->nChannelsAPI;\n    encStatus->nChannelsInternal         = psEnc->nChannelsInternal;\n    encStatus->API_sampleRate            = state_Fxx[ 0 ].sCmn.API_fs_Hz;\n    encStatus->maxInternalSampleRate     = state_Fxx[ 0 ].sCmn.maxInternal_fs_Hz;\n    encStatus->minInternalSampleRate     = state_Fxx[ 0 ].sCmn.minInternal_fs_Hz;\n    encStatus->desiredInternalSampleRate = state_Fxx[ 0 ].sCmn.desiredInternal_fs_Hz;\n    encStatus->payloadSize_ms            = state_Fxx[ 0 ].sCmn.PacketSize_ms;\n    encStatus->bitRate                   = state_Fxx[ 0 ].sCmn.TargetRate_bps;\n    encStatus->packetLossPercentage      = state_Fxx[ 0 ].sCmn.PacketLoss_perc;\n    encStatus->complexity                = state_Fxx[ 0 ].sCmn.Complexity;\n    encStatus->useInBandFEC              = state_Fxx[ 0 ].sCmn.useInBandFEC;\n    encStatus->useDTX                    = state_Fxx[ 0 ].sCmn.useDTX;\n    encStatus->useCBR                    = state_Fxx[ 0 ].sCmn.useCBR;\n    encStatus->internalSampleRate        = silk_SMULBB( state_Fxx[ 0 ].sCmn.fs_kHz, 1000 );\n    encStatus->allowBandwidthSwitch      = state_Fxx[ 0 ].sCmn.allow_bandwidth_switch;\n    encStatus->inWBmodeWithoutVariableLP = state_Fxx[ 0 ].sCmn.fs_kHz == 16 && state_Fxx[ 0 ].sCmn.sLP.mode == 0;\n\n    return ret;\n}\n\n\n/**************************/\n/* Encode frame with Silk */\n/**************************/\n/* Note: if prefillFlag is set, the input must contain 10 ms of audio, irrespective of what                     */\n/* encControl->payloadSize_ms is set to                                                                         */\nopus_int silk_Encode(                                   /* O    Returns error code                              */\n    void                            *encState,          /* I/O  State                                           */\n    silk_EncControlStruct           *encControl,        /* I    Control status                                  */\n    const opus_int16                *samplesIn,         /* I    Speech sample input vector                      */\n    opus_int                        nSamplesIn,         /* I    Number of samples in input vector               */\n    ec_enc                          *psRangeEnc,        /* I/O  Compressor data structure                       */\n    opus_int32                      *nBytesOut,         /* I/O  Number of bytes in payload (input: Max bytes)   */\n    const opus_int                  prefillFlag         /* I    Flag to indicate prefilling buffers no coding   */\n)\n{\n    opus_int   n, i, nBits, flags, tmp_payloadSize_ms = 0, tmp_complexity = 0, ret = 0;\n    opus_int   nSamplesToBuffer, nSamplesToBufferMax, nBlocksOf10ms;\n    opus_int   nSamplesFromInput = 0, nSamplesFromInputMax;\n    opus_int   speech_act_thr_for_switch_Q8;\n    opus_int32 TargetRate_bps, MStargetRates_bps[ 2 ], channelRate_bps, LBRR_symbol, sum;\n    silk_encoder *psEnc = ( silk_encoder * )encState;\n    VARDECL( opus_int16, buf );\n    opus_int transition, curr_block, tot_blocks;\n    SAVE_STACK;\n\n    if (encControl->reducedDependency)\n    {\n       psEnc->state_Fxx[0].sCmn.first_frame_after_reset = 1;\n       psEnc->state_Fxx[1].sCmn.first_frame_after_reset = 1;\n    }\n    psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded = psEnc->state_Fxx[ 1 ].sCmn.nFramesEncoded = 0;\n\n    /* Check values in encoder control structure */\n    if( ( ret = check_control_input( encControl ) != 0 ) ) {\n        silk_assert( 0 );\n        RESTORE_STACK;\n        return ret;\n    }\n\n    encControl->switchReady = 0;\n\n    if( encControl->nChannelsInternal > psEnc->nChannelsInternal ) {\n        /* Mono -> Stereo transition: init state of second channel and stereo state */\n        ret += silk_init_encoder( &psEnc->state_Fxx[ 1 ], psEnc->state_Fxx[ 0 ].sCmn.arch );\n        silk_memset( psEnc->sStereo.pred_prev_Q13, 0, sizeof( psEnc->sStereo.pred_prev_Q13 ) );\n        silk_memset( psEnc->sStereo.sSide, 0, sizeof( psEnc->sStereo.sSide ) );\n        psEnc->sStereo.mid_side_amp_Q0[ 0 ] = 0;\n        psEnc->sStereo.mid_side_amp_Q0[ 1 ] = 1;\n        psEnc->sStereo.mid_side_amp_Q0[ 2 ] = 0;\n        psEnc->sStereo.mid_side_amp_Q0[ 3 ] = 1;\n        psEnc->sStereo.width_prev_Q14 = 0;\n        psEnc->sStereo.smth_width_Q14 = SILK_FIX_CONST( 1, 14 );\n        if( psEnc->nChannelsAPI == 2 ) {\n            silk_memcpy( &psEnc->state_Fxx[ 1 ].sCmn.resampler_state, &psEnc->state_Fxx[ 0 ].sCmn.resampler_state, sizeof( silk_resampler_state_struct ) );\n            silk_memcpy( &psEnc->state_Fxx[ 1 ].sCmn.In_HP_State,     &psEnc->state_Fxx[ 0 ].sCmn.In_HP_State,     sizeof( psEnc->state_Fxx[ 1 ].sCmn.In_HP_State ) );\n        }\n    }\n\n    transition = (encControl->payloadSize_ms != psEnc->state_Fxx[ 0 ].sCmn.PacketSize_ms) || (psEnc->nChannelsInternal != encControl->nChannelsInternal);\n\n    psEnc->nChannelsAPI = encControl->nChannelsAPI;\n    psEnc->nChannelsInternal = encControl->nChannelsInternal;\n\n    nBlocksOf10ms = silk_DIV32( 100 * nSamplesIn, encControl->API_sampleRate );\n    tot_blocks = ( nBlocksOf10ms > 1 ) ? nBlocksOf10ms >> 1 : 1;\n    curr_block = 0;\n    if( prefillFlag ) {\n        /* Only accept input length of 10 ms */\n        if( nBlocksOf10ms != 1 ) {\n            silk_assert( 0 );\n            RESTORE_STACK;\n            return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;\n        }\n        /* Reset Encoder */\n        for( n = 0; n < encControl->nChannelsInternal; n++ ) {\n            ret = silk_init_encoder( &psEnc->state_Fxx[ n ], psEnc->state_Fxx[ n ].sCmn.arch );\n            silk_assert( !ret );\n        }\n        tmp_payloadSize_ms = encControl->payloadSize_ms;\n        encControl->payloadSize_ms = 10;\n        tmp_complexity = encControl->complexity;\n        encControl->complexity = 0;\n        for( n = 0; n < encControl->nChannelsInternal; n++ ) {\n            psEnc->state_Fxx[ n ].sCmn.controlled_since_last_payload = 0;\n            psEnc->state_Fxx[ n ].sCmn.prefillFlag = 1;\n        }\n    } else {\n        /* Only accept input lengths that are a multiple of 10 ms */\n        if( nBlocksOf10ms * encControl->API_sampleRate != 100 * nSamplesIn || nSamplesIn < 0 ) {\n            silk_assert( 0 );\n            RESTORE_STACK;\n            return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;\n        }\n        /* Make sure no more than one packet can be produced */\n        if( 1000 * (opus_int32)nSamplesIn > encControl->payloadSize_ms * encControl->API_sampleRate ) {\n            silk_assert( 0 );\n            RESTORE_STACK;\n            return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;\n        }\n    }\n\n    TargetRate_bps = silk_RSHIFT32( encControl->bitRate, encControl->nChannelsInternal - 1 );\n    for( n = 0; n < encControl->nChannelsInternal; n++ ) {\n        /* Force the side channel to the same rate as the mid */\n        opus_int force_fs_kHz = (n==1) ? psEnc->state_Fxx[0].sCmn.fs_kHz : 0;\n        if( ( ret = silk_control_encoder( &psEnc->state_Fxx[ n ], encControl, TargetRate_bps, psEnc->allowBandwidthSwitch, n, force_fs_kHz ) ) != 0 ) {\n            silk_assert( 0 );\n            RESTORE_STACK;\n            return ret;\n        }\n        if( psEnc->state_Fxx[n].sCmn.first_frame_after_reset || transition ) {\n            for( i = 0; i < psEnc->state_Fxx[ 0 ].sCmn.nFramesPerPacket; i++ ) {\n                psEnc->state_Fxx[ n ].sCmn.LBRR_flags[ i ] = 0;\n            }\n        }\n        psEnc->state_Fxx[ n ].sCmn.inDTX = psEnc->state_Fxx[ n ].sCmn.useDTX;\n    }\n    silk_assert( encControl->nChannelsInternal == 1 || psEnc->state_Fxx[ 0 ].sCmn.fs_kHz == psEnc->state_Fxx[ 1 ].sCmn.fs_kHz );\n\n    /* Input buffering/resampling and encoding */\n    nSamplesToBufferMax =\n        10 * nBlocksOf10ms * psEnc->state_Fxx[ 0 ].sCmn.fs_kHz;\n    nSamplesFromInputMax =\n        silk_DIV32_16( nSamplesToBufferMax *\n                           psEnc->state_Fxx[ 0 ].sCmn.API_fs_Hz,\n                       psEnc->state_Fxx[ 0 ].sCmn.fs_kHz * 1000 );\n    ALLOC( buf, nSamplesFromInputMax, opus_int16 );\n    while( 1 ) {\n        nSamplesToBuffer  = psEnc->state_Fxx[ 0 ].sCmn.frame_length - psEnc->state_Fxx[ 0 ].sCmn.inputBufIx;\n        nSamplesToBuffer  = silk_min( nSamplesToBuffer, nSamplesToBufferMax );\n        nSamplesFromInput = silk_DIV32_16( nSamplesToBuffer * psEnc->state_Fxx[ 0 ].sCmn.API_fs_Hz, psEnc->state_Fxx[ 0 ].sCmn.fs_kHz * 1000 );\n        /* Resample and write to buffer */\n        if( encControl->nChannelsAPI == 2 && encControl->nChannelsInternal == 2 ) {\n            opus_int id = psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded;\n            for( n = 0; n < nSamplesFromInput; n++ ) {\n                buf[ n ] = samplesIn[ 2 * n ];\n            }\n            /* Making sure to start both resamplers from the same state when switching from mono to stereo */\n            if( psEnc->nPrevChannelsInternal == 1 && id==0 ) {\n               silk_memcpy( &psEnc->state_Fxx[ 1 ].sCmn.resampler_state, &psEnc->state_Fxx[ 0 ].sCmn.resampler_state, sizeof(psEnc->state_Fxx[ 1 ].sCmn.resampler_state));\n            }\n\n            ret += silk_resampler( &psEnc->state_Fxx[ 0 ].sCmn.resampler_state,\n                &psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn.inputBufIx + 2 ], buf, nSamplesFromInput );\n            psEnc->state_Fxx[ 0 ].sCmn.inputBufIx += nSamplesToBuffer;\n\n            nSamplesToBuffer  = psEnc->state_Fxx[ 1 ].sCmn.frame_length - psEnc->state_Fxx[ 1 ].sCmn.inputBufIx;\n            nSamplesToBuffer  = silk_min( nSamplesToBuffer, 10 * nBlocksOf10ms * psEnc->state_Fxx[ 1 ].sCmn.fs_kHz );\n            for( n = 0; n < nSamplesFromInput; n++ ) {\n                buf[ n ] = samplesIn[ 2 * n + 1 ];\n            }\n            ret += silk_resampler( &psEnc->state_Fxx[ 1 ].sCmn.resampler_state,\n                &psEnc->state_Fxx[ 1 ].sCmn.inputBuf[ psEnc->state_Fxx[ 1 ].sCmn.inputBufIx + 2 ], buf, nSamplesFromInput );\n\n            psEnc->state_Fxx[ 1 ].sCmn.inputBufIx += nSamplesToBuffer;\n        } else if( encControl->nChannelsAPI == 2 && encControl->nChannelsInternal == 1 ) {\n            /* Combine left and right channels before resampling */\n            for( n = 0; n < nSamplesFromInput; n++ ) {\n                sum = samplesIn[ 2 * n ] + samplesIn[ 2 * n + 1 ];\n                buf[ n ] = (opus_int16)silk_RSHIFT_ROUND( sum,  1 );\n            }\n            ret += silk_resampler( &psEnc->state_Fxx[ 0 ].sCmn.resampler_state,\n                &psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn.inputBufIx + 2 ], buf, nSamplesFromInput );\n            /* On the first mono frame, average the results for the two resampler states  */\n            if( psEnc->nPrevChannelsInternal == 2 && psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded == 0 ) {\n               ret += silk_resampler( &psEnc->state_Fxx[ 1 ].sCmn.resampler_state,\n                   &psEnc->state_Fxx[ 1 ].sCmn.inputBuf[ psEnc->state_Fxx[ 1 ].sCmn.inputBufIx + 2 ], buf, nSamplesFromInput );\n               for( n = 0; n < psEnc->state_Fxx[ 0 ].sCmn.frame_length; n++ ) {\n                  psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn.inputBufIx+n+2 ] =\n                        silk_RSHIFT(psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn.inputBufIx+n+2 ]\n                                  + psEnc->state_Fxx[ 1 ].sCmn.inputBuf[ psEnc->state_Fxx[ 1 ].sCmn.inputBufIx+n+2 ], 1);\n               }\n            }\n            psEnc->state_Fxx[ 0 ].sCmn.inputBufIx += nSamplesToBuffer;\n        } else {\n            silk_assert( encControl->nChannelsAPI == 1 && encControl->nChannelsInternal == 1 );\n            silk_memcpy(buf, samplesIn, nSamplesFromInput*sizeof(opus_int16));\n            ret += silk_resampler( &psEnc->state_Fxx[ 0 ].sCmn.resampler_state,\n                &psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn.inputBufIx + 2 ], buf, nSamplesFromInput );\n            psEnc->state_Fxx[ 0 ].sCmn.inputBufIx += nSamplesToBuffer;\n        }\n\n        samplesIn  += nSamplesFromInput * encControl->nChannelsAPI;\n        nSamplesIn -= nSamplesFromInput;\n\n        /* Default */\n        psEnc->allowBandwidthSwitch = 0;\n\n        /* Silk encoder */\n        if( psEnc->state_Fxx[ 0 ].sCmn.inputBufIx >= psEnc->state_Fxx[ 0 ].sCmn.frame_length ) {\n            /* Enough data in input buffer, so encode */\n            silk_assert( psEnc->state_Fxx[ 0 ].sCmn.inputBufIx == psEnc->state_Fxx[ 0 ].sCmn.frame_length );\n            silk_assert( encControl->nChannelsInternal == 1 || psEnc->state_Fxx[ 1 ].sCmn.inputBufIx == psEnc->state_Fxx[ 1 ].sCmn.frame_length );\n\n            /* Deal with LBRR data */\n            if( psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded == 0 && !prefillFlag ) {\n                /* Create space at start of payload for VAD and FEC flags */\n                opus_uint8 iCDF[ 2 ] = { 0, 0 };\n                iCDF[ 0 ] = 256 - silk_RSHIFT( 256, ( psEnc->state_Fxx[ 0 ].sCmn.nFramesPerPacket + 1 ) * encControl->nChannelsInternal );\n                ec_enc_icdf( psRangeEnc, 0, iCDF, 8 );\n\n                /* Encode any LBRR data from previous packet */\n                /* Encode LBRR flags */\n                for( n = 0; n < encControl->nChannelsInternal; n++ ) {\n                    LBRR_symbol = 0;\n                    for( i = 0; i < psEnc->state_Fxx[ n ].sCmn.nFramesPerPacket; i++ ) {\n                        LBRR_symbol |= silk_LSHIFT( psEnc->state_Fxx[ n ].sCmn.LBRR_flags[ i ], i );\n                    }\n                    psEnc->state_Fxx[ n ].sCmn.LBRR_flag = LBRR_symbol > 0 ? 1 : 0;\n                    if( LBRR_symbol && psEnc->state_Fxx[ n ].sCmn.nFramesPerPacket > 1 ) {\n                        ec_enc_icdf( psRangeEnc, LBRR_symbol - 1, silk_LBRR_flags_iCDF_ptr[ psEnc->state_Fxx[ n ].sCmn.nFramesPerPacket - 2 ], 8 );\n                    }\n                }\n\n                /* Code LBRR indices and excitation signals */\n                for( i = 0; i < psEnc->state_Fxx[ 0 ].sCmn.nFramesPerPacket; i++ ) {\n                    for( n = 0; n < encControl->nChannelsInternal; n++ ) {\n                        if( psEnc->state_Fxx[ n ].sCmn.LBRR_flags[ i ] ) {\n                            opus_int condCoding;\n\n                            if( encControl->nChannelsInternal == 2 && n == 0 ) {\n                                silk_stereo_encode_pred( psRangeEnc, psEnc->sStereo.predIx[ i ] );\n                                /* For LBRR data there's no need to code the mid-only flag if the side-channel LBRR flag is set */\n                                if( psEnc->state_Fxx[ 1 ].sCmn.LBRR_flags[ i ] == 0 ) {\n                                    silk_stereo_encode_mid_only( psRangeEnc, psEnc->sStereo.mid_only_flags[ i ] );\n                                }\n                            }\n                            /* Use conditional coding if previous frame available */\n                            if( i > 0 && psEnc->state_Fxx[ n ].sCmn.LBRR_flags[ i - 1 ] ) {\n                                condCoding = CODE_CONDITIONALLY;\n                            } else {\n                                condCoding = CODE_INDEPENDENTLY;\n                            }\n                            silk_encode_indices( &psEnc->state_Fxx[ n ].sCmn, psRangeEnc, i, 1, condCoding );\n                            silk_encode_pulses( psRangeEnc, psEnc->state_Fxx[ n ].sCmn.indices_LBRR[i].signalType, psEnc->state_Fxx[ n ].sCmn.indices_LBRR[i].quantOffsetType,\n                                psEnc->state_Fxx[ n ].sCmn.pulses_LBRR[ i ], psEnc->state_Fxx[ n ].sCmn.frame_length );\n                        }\n                    }\n                }\n\n                /* Reset LBRR flags */\n                for( n = 0; n < encControl->nChannelsInternal; n++ ) {\n                    silk_memset( psEnc->state_Fxx[ n ].sCmn.LBRR_flags, 0, sizeof( psEnc->state_Fxx[ n ].sCmn.LBRR_flags ) );\n                }\n            }\n\n            silk_HP_variable_cutoff( psEnc->state_Fxx );\n\n            /* Total target bits for packet */\n            nBits = silk_DIV32_16( silk_MUL( encControl->bitRate, encControl->payloadSize_ms ), 1000 );\n            /* Subtract half of the bits already used */\n            if( !prefillFlag ) {\n                nBits -= ec_tell( psRangeEnc ) >> 1;\n            }\n            /* Divide by number of uncoded frames left in packet */\n            nBits = silk_DIV32_16( nBits, psEnc->state_Fxx[ 0 ].sCmn.nFramesPerPacket - psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded );\n            /* Convert to bits/second */\n            if( encControl->payloadSize_ms == 10 ) {\n                TargetRate_bps = silk_SMULBB( nBits, 100 );\n            } else {\n                TargetRate_bps = silk_SMULBB( nBits, 50 );\n            }\n            /* Subtract fraction of bits in excess of target in previous packets */\n            TargetRate_bps -= silk_DIV32_16( silk_MUL( psEnc->nBitsExceeded, 1000 ), BITRESERVOIR_DECAY_TIME_MS );\n            /* Never exceed input bitrate */\n            TargetRate_bps = silk_LIMIT( TargetRate_bps, encControl->bitRate, 5000 );\n\n            /* Convert Left/Right to Mid/Side */\n            if( encControl->nChannelsInternal == 2 ) {\n                silk_stereo_LR_to_MS( &psEnc->sStereo, &psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ 2 ], &psEnc->state_Fxx[ 1 ].sCmn.inputBuf[ 2 ],\n                    psEnc->sStereo.predIx[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded ], &psEnc->sStereo.mid_only_flags[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded ],\n                    MStargetRates_bps, TargetRate_bps, psEnc->state_Fxx[ 0 ].sCmn.speech_activity_Q8, encControl->toMono,\n                    psEnc->state_Fxx[ 0 ].sCmn.fs_kHz, psEnc->state_Fxx[ 0 ].sCmn.frame_length );\n                if( psEnc->sStereo.mid_only_flags[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded ] == 0 ) {\n                    /* Reset side channel encoder memory for first frame with side coding */\n                    if( psEnc->prev_decode_only_middle == 1 ) {\n                        silk_memset( &psEnc->state_Fxx[ 1 ].sShape,               0, sizeof( psEnc->state_Fxx[ 1 ].sShape ) );\n                        silk_memset( &psEnc->state_Fxx[ 1 ].sPrefilt,             0, sizeof( psEnc->state_Fxx[ 1 ].sPrefilt ) );\n                        silk_memset( &psEnc->state_Fxx[ 1 ].sCmn.sNSQ,            0, sizeof( psEnc->state_Fxx[ 1 ].sCmn.sNSQ ) );\n                        silk_memset( psEnc->state_Fxx[ 1 ].sCmn.prev_NLSFq_Q15,   0, sizeof( psEnc->state_Fxx[ 1 ].sCmn.prev_NLSFq_Q15 ) );\n                        silk_memset( &psEnc->state_Fxx[ 1 ].sCmn.sLP.In_LP_State, 0, sizeof( psEnc->state_Fxx[ 1 ].sCmn.sLP.In_LP_State ) );\n                        psEnc->state_Fxx[ 1 ].sCmn.prevLag                 = 100;\n                        psEnc->state_Fxx[ 1 ].sCmn.sNSQ.lagPrev            = 100;\n                        psEnc->state_Fxx[ 1 ].sShape.LastGainIndex         = 10;\n                        psEnc->state_Fxx[ 1 ].sCmn.prevSignalType          = TYPE_NO_VOICE_ACTIVITY;\n                        psEnc->state_Fxx[ 1 ].sCmn.sNSQ.prev_gain_Q16      = 65536;\n                        psEnc->state_Fxx[ 1 ].sCmn.first_frame_after_reset = 1;\n                    }\n                    silk_encode_do_VAD_Fxx( &psEnc->state_Fxx[ 1 ] );\n                } else {\n                    psEnc->state_Fxx[ 1 ].sCmn.VAD_flags[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded ] = 0;\n                }\n                if( !prefillFlag ) {\n                    silk_stereo_encode_pred( psRangeEnc, psEnc->sStereo.predIx[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded ] );\n                    if( psEnc->state_Fxx[ 1 ].sCmn.VAD_flags[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded ] == 0 ) {\n                        silk_stereo_encode_mid_only( psRangeEnc, psEnc->sStereo.mid_only_flags[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded ] );\n                    }\n                }\n            } else {\n                /* Buffering */\n                silk_memcpy( psEnc->state_Fxx[ 0 ].sCmn.inputBuf, psEnc->sStereo.sMid, 2 * sizeof( opus_int16 ) );\n                silk_memcpy( psEnc->sStereo.sMid, &psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn.frame_length ], 2 * sizeof( opus_int16 ) );\n            }\n            silk_encode_do_VAD_Fxx( &psEnc->state_Fxx[ 0 ] );\n\n            /* Encode */\n            for( n = 0; n < encControl->nChannelsInternal; n++ ) {\n                opus_int maxBits, useCBR;\n\n                /* Handling rate constraints */\n                maxBits = encControl->maxBits;\n                if( tot_blocks == 2 && curr_block == 0 ) {\n                    maxBits = maxBits * 3 / 5;\n                } else if( tot_blocks == 3 ) {\n                    if( curr_block == 0 ) {\n                        maxBits = maxBits * 2 / 5;\n                    } else if( curr_block == 1 ) {\n                        maxBits = maxBits * 3 / 4;\n                    }\n                }\n                useCBR = encControl->useCBR && curr_block == tot_blocks - 1;\n\n                if( encControl->nChannelsInternal == 1 ) {\n                    channelRate_bps = TargetRate_bps;\n                } else {\n                    channelRate_bps = MStargetRates_bps[ n ];\n                    if( n == 0 && MStargetRates_bps[ 1 ] > 0 ) {\n                        useCBR = 0;\n                        /* Give mid up to 1/2 of the max bits for that frame */\n                        maxBits -= encControl->maxBits / ( tot_blocks * 2 );\n                    }\n                }\n\n                if( channelRate_bps > 0 ) {\n                    opus_int condCoding;\n\n                    silk_control_SNR( &psEnc->state_Fxx[ n ].sCmn, channelRate_bps );\n\n                    /* Use independent coding if no previous frame available */\n                    if( psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded - n <= 0 ) {\n                        condCoding = CODE_INDEPENDENTLY;\n                    } else if( n > 0 && psEnc->prev_decode_only_middle ) {\n                        /* If we skipped a side frame in this packet, we don't\n                           need LTP scaling; the LTP state is well-defined. */\n                        condCoding = CODE_INDEPENDENTLY_NO_LTP_SCALING;\n                    } else {\n                        condCoding = CODE_CONDITIONALLY;\n                    }\n                    if( ( ret = silk_encode_frame_Fxx( &psEnc->state_Fxx[ n ], nBytesOut, psRangeEnc, condCoding, maxBits, useCBR ) ) != 0 ) {\n                        silk_assert( 0 );\n                    }\n                }\n                psEnc->state_Fxx[ n ].sCmn.controlled_since_last_payload = 0;\n                psEnc->state_Fxx[ n ].sCmn.inputBufIx = 0;\n                psEnc->state_Fxx[ n ].sCmn.nFramesEncoded++;\n            }\n            psEnc->prev_decode_only_middle = psEnc->sStereo.mid_only_flags[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded - 1 ];\n\n            /* Insert VAD and FEC flags at beginning of bitstream */\n            if( *nBytesOut > 0 && psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded == psEnc->state_Fxx[ 0 ].sCmn.nFramesPerPacket) {\n                flags = 0;\n                for( n = 0; n < encControl->nChannelsInternal; n++ ) {\n                    for( i = 0; i < psEnc->state_Fxx[ n ].sCmn.nFramesPerPacket; i++ ) {\n                        flags  = silk_LSHIFT( flags, 1 );\n                        flags |= psEnc->state_Fxx[ n ].sCmn.VAD_flags[ i ];\n                    }\n                    flags  = silk_LSHIFT( flags, 1 );\n                    flags |= psEnc->state_Fxx[ n ].sCmn.LBRR_flag;\n                }\n                if( !prefillFlag ) {\n                    ec_enc_patch_initial_bits( psRangeEnc, flags, ( psEnc->state_Fxx[ 0 ].sCmn.nFramesPerPacket + 1 ) * encControl->nChannelsInternal );\n                }\n\n                /* Return zero bytes if all channels DTXed */\n                if( psEnc->state_Fxx[ 0 ].sCmn.inDTX && ( encControl->nChannelsInternal == 1 || psEnc->state_Fxx[ 1 ].sCmn.inDTX ) ) {\n                    *nBytesOut = 0;\n                }\n\n                psEnc->nBitsExceeded += *nBytesOut * 8;\n                psEnc->nBitsExceeded -= silk_DIV32_16( silk_MUL( encControl->bitRate, encControl->payloadSize_ms ), 1000 );\n                psEnc->nBitsExceeded  = silk_LIMIT( psEnc->nBitsExceeded, 0, 10000 );\n\n                /* Update flag indicating if bandwidth switching is allowed */\n                speech_act_thr_for_switch_Q8 = silk_SMLAWB( SILK_FIX_CONST( SPEECH_ACTIVITY_DTX_THRES, 8 ),\n                    SILK_FIX_CONST( ( 1 - SPEECH_ACTIVITY_DTX_THRES ) / MAX_BANDWIDTH_SWITCH_DELAY_MS, 16 + 8 ), psEnc->timeSinceSwitchAllowed_ms );\n                if( psEnc->state_Fxx[ 0 ].sCmn.speech_activity_Q8 < speech_act_thr_for_switch_Q8 ) {\n                    psEnc->allowBandwidthSwitch = 1;\n                    psEnc->timeSinceSwitchAllowed_ms = 0;\n                } else {\n                    psEnc->allowBandwidthSwitch = 0;\n                    psEnc->timeSinceSwitchAllowed_ms += encControl->payloadSize_ms;\n                }\n            }\n\n            if( nSamplesIn == 0 ) {\n                break;\n            }\n        } else {\n            break;\n        }\n        curr_block++;\n    }\n\n    psEnc->nPrevChannelsInternal = encControl->nChannelsInternal;\n\n    encControl->allowBandwidthSwitch = psEnc->allowBandwidthSwitch;\n    encControl->inWBmodeWithoutVariableLP = psEnc->state_Fxx[ 0 ].sCmn.fs_kHz == 16 && psEnc->state_Fxx[ 0 ].sCmn.sLP.mode == 0;\n    encControl->internalSampleRate = silk_SMULBB( psEnc->state_Fxx[ 0 ].sCmn.fs_kHz, 1000 );\n    encControl->stereoWidth_Q14 = encControl->toMono ? 0 : psEnc->sStereo.smth_width_Q14;\n    if( prefillFlag ) {\n        encControl->payloadSize_ms = tmp_payloadSize_ms;\n        encControl->complexity = tmp_complexity;\n        for( n = 0; n < encControl->nChannelsInternal; n++ ) {\n            psEnc->state_Fxx[ n ].sCmn.controlled_since_last_payload = 0;\n            psEnc->state_Fxx[ n ].sCmn.prefillFlag = 0;\n        }\n    }\n\n    RESTORE_STACK;\n    return ret;\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/encode_indices.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Encode side-information parameters to payload */\nvoid silk_encode_indices(\n    silk_encoder_state          *psEncC,                        /* I/O  Encoder state                               */\n    ec_enc                      *psRangeEnc,                    /* I/O  Compressor data structure                   */\n    opus_int                    FrameIndex,                     /* I    Frame number                                */\n    opus_int                    encode_LBRR,                    /* I    Flag indicating LBRR data is being encoded  */\n    opus_int                    condCoding                      /* I    The type of conditional coding to use       */\n)\n{\n    opus_int   i, k, typeOffset;\n    opus_int   encode_absolute_lagIndex, delta_lagIndex;\n    opus_int16 ec_ix[ MAX_LPC_ORDER ];\n    opus_uint8 pred_Q8[ MAX_LPC_ORDER ];\n    const SideInfoIndices *psIndices;\n\n    if( encode_LBRR ) {\n         psIndices = &psEncC->indices_LBRR[ FrameIndex ];\n    } else {\n         psIndices = &psEncC->indices;\n    }\n\n    /*******************************************/\n    /* Encode signal type and quantizer offset */\n    /*******************************************/\n    typeOffset = 2 * psIndices->signalType + psIndices->quantOffsetType;\n    silk_assert( typeOffset >= 0 && typeOffset < 6 );\n    silk_assert( encode_LBRR == 0 || typeOffset >= 2 );\n    if( encode_LBRR || typeOffset >= 2 ) {\n        ec_enc_icdf( psRangeEnc, typeOffset - 2, silk_type_offset_VAD_iCDF, 8 );\n    } else {\n        ec_enc_icdf( psRangeEnc, typeOffset, silk_type_offset_no_VAD_iCDF, 8 );\n    }\n\n    /****************/\n    /* Encode gains */\n    /****************/\n    /* first subframe */\n    if( condCoding == CODE_CONDITIONALLY ) {\n        /* conditional coding */\n        silk_assert( psIndices->GainsIndices[ 0 ] >= 0 && psIndices->GainsIndices[ 0 ] < MAX_DELTA_GAIN_QUANT - MIN_DELTA_GAIN_QUANT + 1 );\n        ec_enc_icdf( psRangeEnc, psIndices->GainsIndices[ 0 ], silk_delta_gain_iCDF, 8 );\n    } else {\n        /* independent coding, in two stages: MSB bits followed by 3 LSBs */\n        silk_assert( psIndices->GainsIndices[ 0 ] >= 0 && psIndices->GainsIndices[ 0 ] < N_LEVELS_QGAIN );\n        ec_enc_icdf( psRangeEnc, silk_RSHIFT( psIndices->GainsIndices[ 0 ], 3 ), silk_gain_iCDF[ psIndices->signalType ], 8 );\n        ec_enc_icdf( psRangeEnc, psIndices->GainsIndices[ 0 ] & 7, silk_uniform8_iCDF, 8 );\n    }\n\n    /* remaining subframes */\n    for( i = 1; i < psEncC->nb_subfr; i++ ) {\n        silk_assert( psIndices->GainsIndices[ i ] >= 0 && psIndices->GainsIndices[ i ] < MAX_DELTA_GAIN_QUANT - MIN_DELTA_GAIN_QUANT + 1 );\n        ec_enc_icdf( psRangeEnc, psIndices->GainsIndices[ i ], silk_delta_gain_iCDF, 8 );\n    }\n\n    /****************/\n    /* Encode NLSFs */\n    /****************/\n    ec_enc_icdf( psRangeEnc, psIndices->NLSFIndices[ 0 ], &psEncC->psNLSF_CB->CB1_iCDF[ ( psIndices->signalType >> 1 ) * psEncC->psNLSF_CB->nVectors ], 8 );\n    silk_NLSF_unpack( ec_ix, pred_Q8, psEncC->psNLSF_CB, psIndices->NLSFIndices[ 0 ] );\n    silk_assert( psEncC->psNLSF_CB->order == psEncC->predictLPCOrder );\n    for( i = 0; i < psEncC->psNLSF_CB->order; i++ ) {\n        if( psIndices->NLSFIndices[ i+1 ] >= NLSF_QUANT_MAX_AMPLITUDE ) {\n            ec_enc_icdf( psRangeEnc, 2 * NLSF_QUANT_MAX_AMPLITUDE, &psEncC->psNLSF_CB->ec_iCDF[ ec_ix[ i ] ], 8 );\n            ec_enc_icdf( psRangeEnc, psIndices->NLSFIndices[ i+1 ] - NLSF_QUANT_MAX_AMPLITUDE, silk_NLSF_EXT_iCDF, 8 );\n        } else if( psIndices->NLSFIndices[ i+1 ] <= -NLSF_QUANT_MAX_AMPLITUDE ) {\n            ec_enc_icdf( psRangeEnc, 0, &psEncC->psNLSF_CB->ec_iCDF[ ec_ix[ i ] ], 8 );\n            ec_enc_icdf( psRangeEnc, -psIndices->NLSFIndices[ i+1 ] - NLSF_QUANT_MAX_AMPLITUDE, silk_NLSF_EXT_iCDF, 8 );\n        } else {\n            ec_enc_icdf( psRangeEnc, psIndices->NLSFIndices[ i+1 ] + NLSF_QUANT_MAX_AMPLITUDE, &psEncC->psNLSF_CB->ec_iCDF[ ec_ix[ i ] ], 8 );\n        }\n    }\n\n    /* Encode NLSF interpolation factor */\n    if( psEncC->nb_subfr == MAX_NB_SUBFR ) {\n        silk_assert( psIndices->NLSFInterpCoef_Q2 >= 0 && psIndices->NLSFInterpCoef_Q2 < 5 );\n        ec_enc_icdf( psRangeEnc, psIndices->NLSFInterpCoef_Q2, silk_NLSF_interpolation_factor_iCDF, 8 );\n    }\n\n    if( psIndices->signalType == TYPE_VOICED )\n    {\n        /*********************/\n        /* Encode pitch lags */\n        /*********************/\n        /* lag index */\n        encode_absolute_lagIndex = 1;\n        if( condCoding == CODE_CONDITIONALLY && psEncC->ec_prevSignalType == TYPE_VOICED ) {\n            /* Delta Encoding */\n            delta_lagIndex = psIndices->lagIndex - psEncC->ec_prevLagIndex;\n            if( delta_lagIndex < -8 || delta_lagIndex > 11 ) {\n                delta_lagIndex = 0;\n            } else {\n                delta_lagIndex = delta_lagIndex + 9;\n                encode_absolute_lagIndex = 0; /* Only use delta */\n            }\n            silk_assert( delta_lagIndex >= 0 && delta_lagIndex < 21 );\n            ec_enc_icdf( psRangeEnc, delta_lagIndex, silk_pitch_delta_iCDF, 8 );\n        }\n        if( encode_absolute_lagIndex ) {\n            /* Absolute encoding */\n            opus_int32 pitch_high_bits, pitch_low_bits;\n            pitch_high_bits = silk_DIV32_16( psIndices->lagIndex, silk_RSHIFT( psEncC->fs_kHz, 1 ) );\n            pitch_low_bits = psIndices->lagIndex - silk_SMULBB( pitch_high_bits, silk_RSHIFT( psEncC->fs_kHz, 1 ) );\n            silk_assert( pitch_low_bits < psEncC->fs_kHz / 2 );\n            silk_assert( pitch_high_bits < 32 );\n            ec_enc_icdf( psRangeEnc, pitch_high_bits, silk_pitch_lag_iCDF, 8 );\n            ec_enc_icdf( psRangeEnc, pitch_low_bits, psEncC->pitch_lag_low_bits_iCDF, 8 );\n        }\n        psEncC->ec_prevLagIndex = psIndices->lagIndex;\n\n        /* Countour index */\n        silk_assert(   psIndices->contourIndex  >= 0 );\n        silk_assert( ( psIndices->contourIndex < 34 && psEncC->fs_kHz  > 8 && psEncC->nb_subfr == 4 ) ||\n                    ( psIndices->contourIndex < 11 && psEncC->fs_kHz == 8 && psEncC->nb_subfr == 4 ) ||\n                    ( psIndices->contourIndex < 12 && psEncC->fs_kHz  > 8 && psEncC->nb_subfr == 2 ) ||\n                    ( psIndices->contourIndex <  3 && psEncC->fs_kHz == 8 && psEncC->nb_subfr == 2 ) );\n        ec_enc_icdf( psRangeEnc, psIndices->contourIndex, psEncC->pitch_contour_iCDF, 8 );\n\n        /********************/\n        /* Encode LTP gains */\n        /********************/\n        /* PERIndex value */\n        silk_assert( psIndices->PERIndex >= 0 && psIndices->PERIndex < 3 );\n        ec_enc_icdf( psRangeEnc, psIndices->PERIndex, silk_LTP_per_index_iCDF, 8 );\n\n        /* Codebook Indices */\n        for( k = 0; k < psEncC->nb_subfr; k++ ) {\n            silk_assert( psIndices->LTPIndex[ k ] >= 0 && psIndices->LTPIndex[ k ] < ( 8 << psIndices->PERIndex ) );\n            ec_enc_icdf( psRangeEnc, psIndices->LTPIndex[ k ], silk_LTP_gain_iCDF_ptrs[ psIndices->PERIndex ], 8 );\n        }\n\n        /**********************/\n        /* Encode LTP scaling */\n        /**********************/\n        if( condCoding == CODE_INDEPENDENTLY ) {\n            silk_assert( psIndices->LTP_scaleIndex >= 0 && psIndices->LTP_scaleIndex < 3 );\n            ec_enc_icdf( psRangeEnc, psIndices->LTP_scaleIndex, silk_LTPscale_iCDF, 8 );\n        }\n        silk_assert( !condCoding || psIndices->LTP_scaleIndex == 0 );\n    }\n\n    psEncC->ec_prevSignalType = psIndices->signalType;\n\n    /***************/\n    /* Encode seed */\n    /***************/\n    silk_assert( psIndices->Seed >= 0 && psIndices->Seed < 4 );\n    ec_enc_icdf( psRangeEnc, psIndices->Seed, silk_uniform4_iCDF, 8 );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/encode_pulses.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"stack_alloc.h\"\n\n/*********************************************/\n/* Encode quantization indices of excitation */\n/*********************************************/\n\nstatic OPUS_INLINE opus_int combine_and_check(    /* return ok                           */\n    opus_int         *pulses_comb,           /* O                                   */\n    const opus_int   *pulses_in,             /* I                                   */\n    opus_int         max_pulses,             /* I    max value for sum of pulses    */\n    opus_int         len                     /* I    number of output values        */\n)\n{\n    opus_int k, sum;\n\n    for( k = 0; k < len; k++ ) {\n        sum = pulses_in[ 2 * k ] + pulses_in[ 2 * k + 1 ];\n        if( sum > max_pulses ) {\n            return 1;\n        }\n        pulses_comb[ k ] = sum;\n    }\n\n    return 0;\n}\n\n/* Encode quantization indices of excitation */\nvoid silk_encode_pulses(\n    ec_enc                      *psRangeEnc,                    /* I/O  compressor data structure                   */\n    const opus_int              signalType,                     /* I    Signal type                                 */\n    const opus_int              quantOffsetType,                /* I    quantOffsetType                             */\n    opus_int8                   pulses[],                       /* I    quantization indices                        */\n    const opus_int              frame_length                    /* I    Frame length                                */\n)\n{\n    opus_int   i, k, j, iter, bit, nLS, scale_down, RateLevelIndex = 0;\n    opus_int32 abs_q, minSumBits_Q5, sumBits_Q5;\n    VARDECL( opus_int, abs_pulses );\n    VARDECL( opus_int, sum_pulses );\n    VARDECL( opus_int, nRshifts );\n    opus_int   pulses_comb[ 8 ];\n    opus_int   *abs_pulses_ptr;\n    const opus_int8 *pulses_ptr;\n    const opus_uint8 *cdf_ptr;\n    const opus_uint8 *nBits_ptr;\n    SAVE_STACK;\n\n    silk_memset( pulses_comb, 0, 8 * sizeof( opus_int ) ); /* Fixing Valgrind reported problem*/\n\n    /****************************/\n    /* Prepare for shell coding */\n    /****************************/\n    /* Calculate number of shell blocks */\n    silk_assert( 1 << LOG2_SHELL_CODEC_FRAME_LENGTH == SHELL_CODEC_FRAME_LENGTH );\n    iter = silk_RSHIFT( frame_length, LOG2_SHELL_CODEC_FRAME_LENGTH );\n    if( iter * SHELL_CODEC_FRAME_LENGTH < frame_length ) {\n        silk_assert( frame_length == 12 * 10 ); /* Make sure only happens for 10 ms @ 12 kHz */\n        iter++;\n        silk_memset( &pulses[ frame_length ], 0, SHELL_CODEC_FRAME_LENGTH * sizeof(opus_int8));\n    }\n\n    /* Take the absolute value of the pulses */\n    ALLOC( abs_pulses, iter * SHELL_CODEC_FRAME_LENGTH, opus_int );\n    silk_assert( !( SHELL_CODEC_FRAME_LENGTH & 3 ) );\n    for( i = 0; i < iter * SHELL_CODEC_FRAME_LENGTH; i+=4 ) {\n        abs_pulses[i+0] = ( opus_int )silk_abs( pulses[ i + 0 ] );\n        abs_pulses[i+1] = ( opus_int )silk_abs( pulses[ i + 1 ] );\n        abs_pulses[i+2] = ( opus_int )silk_abs( pulses[ i + 2 ] );\n        abs_pulses[i+3] = ( opus_int )silk_abs( pulses[ i + 3 ] );\n    }\n\n    /* Calc sum pulses per shell code frame */\n    ALLOC( sum_pulses, iter, opus_int );\n    ALLOC( nRshifts, iter, opus_int );\n    abs_pulses_ptr = abs_pulses;\n    for( i = 0; i < iter; i++ ) {\n        nRshifts[ i ] = 0;\n\n        while( 1 ) {\n            /* 1+1 -> 2 */\n            scale_down = combine_and_check( pulses_comb, abs_pulses_ptr, silk_max_pulses_table[ 0 ], 8 );\n            /* 2+2 -> 4 */\n            scale_down += combine_and_check( pulses_comb, pulses_comb, silk_max_pulses_table[ 1 ], 4 );\n            /* 4+4 -> 8 */\n            scale_down += combine_and_check( pulses_comb, pulses_comb, silk_max_pulses_table[ 2 ], 2 );\n            /* 8+8 -> 16 */\n            scale_down += combine_and_check( &sum_pulses[ i ], pulses_comb, silk_max_pulses_table[ 3 ], 1 );\n\n            if( scale_down ) {\n                /* We need to downscale the quantization signal */\n                nRshifts[ i ]++;\n                for( k = 0; k < SHELL_CODEC_FRAME_LENGTH; k++ ) {\n                    abs_pulses_ptr[ k ] = silk_RSHIFT( abs_pulses_ptr[ k ], 1 );\n                }\n            } else {\n                /* Jump out of while(1) loop and go to next shell coding frame */\n                break;\n            }\n        }\n        abs_pulses_ptr += SHELL_CODEC_FRAME_LENGTH;\n    }\n\n    /**************/\n    /* Rate level */\n    /**************/\n    /* find rate level that leads to fewest bits for coding of pulses per block info */\n    minSumBits_Q5 = silk_int32_MAX;\n    for( k = 0; k < N_RATE_LEVELS - 1; k++ ) {\n        nBits_ptr  = silk_pulses_per_block_BITS_Q5[ k ];\n        sumBits_Q5 = silk_rate_levels_BITS_Q5[ signalType >> 1 ][ k ];\n        for( i = 0; i < iter; i++ ) {\n            if( nRshifts[ i ] > 0 ) {\n                sumBits_Q5 += nBits_ptr[ MAX_PULSES + 1 ];\n            } else {\n                sumBits_Q5 += nBits_ptr[ sum_pulses[ i ] ];\n            }\n        }\n        if( sumBits_Q5 < minSumBits_Q5 ) {\n            minSumBits_Q5 = sumBits_Q5;\n            RateLevelIndex = k;\n        }\n    }\n    ec_enc_icdf( psRangeEnc, RateLevelIndex, silk_rate_levels_iCDF[ signalType >> 1 ], 8 );\n\n    /***************************************************/\n    /* Sum-Weighted-Pulses Encoding                    */\n    /***************************************************/\n    cdf_ptr = silk_pulses_per_block_iCDF[ RateLevelIndex ];\n    for( i = 0; i < iter; i++ ) {\n        if( nRshifts[ i ] == 0 ) {\n            ec_enc_icdf( psRangeEnc, sum_pulses[ i ], cdf_ptr, 8 );\n        } else {\n            ec_enc_icdf( psRangeEnc, MAX_PULSES + 1, cdf_ptr, 8 );\n            for( k = 0; k < nRshifts[ i ] - 1; k++ ) {\n                ec_enc_icdf( psRangeEnc, MAX_PULSES + 1, silk_pulses_per_block_iCDF[ N_RATE_LEVELS - 1 ], 8 );\n            }\n            ec_enc_icdf( psRangeEnc, sum_pulses[ i ], silk_pulses_per_block_iCDF[ N_RATE_LEVELS - 1 ], 8 );\n        }\n    }\n\n    /******************/\n    /* Shell Encoding */\n    /******************/\n    for( i = 0; i < iter; i++ ) {\n        if( sum_pulses[ i ] > 0 ) {\n            silk_shell_encoder( psRangeEnc, &abs_pulses[ i * SHELL_CODEC_FRAME_LENGTH ] );\n        }\n    }\n\n    /****************/\n    /* LSB Encoding */\n    /****************/\n    for( i = 0; i < iter; i++ ) {\n        if( nRshifts[ i ] > 0 ) {\n            pulses_ptr = &pulses[ i * SHELL_CODEC_FRAME_LENGTH ];\n            nLS = nRshifts[ i ] - 1;\n            for( k = 0; k < SHELL_CODEC_FRAME_LENGTH; k++ ) {\n                abs_q = (opus_int8)silk_abs( pulses_ptr[ k ] );\n                for( j = nLS; j > 0; j-- ) {\n                    bit = silk_RSHIFT( abs_q, j ) & 1;\n                    ec_enc_icdf( psRangeEnc, bit, silk_lsb_iCDF, 8 );\n                }\n                bit = abs_q & 1;\n                ec_enc_icdf( psRangeEnc, bit, silk_lsb_iCDF, 8 );\n            }\n        }\n    }\n\n    /****************/\n    /* Encode signs */\n    /****************/\n    silk_encode_signs( psRangeEnc, pulses, frame_length, signalType, quantOffsetType, sum_pulses );\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/errors.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_ERRORS_H\n#define SILK_ERRORS_H\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n/******************/\n/* Error messages */\n/******************/\n#define SILK_NO_ERROR                               0\n\n/**************************/\n/* Encoder error messages */\n/**************************/\n\n/* Input length is not a multiple of 10 ms, or length is longer than the packet length */\n#define SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES        -101\n\n/* Sampling frequency not 8000, 12000 or 16000 Hertz */\n#define SILK_ENC_FS_NOT_SUPPORTED                   -102\n\n/* Packet size not 10, 20, 40, or 60 ms */\n#define SILK_ENC_PACKET_SIZE_NOT_SUPPORTED          -103\n\n/* Allocated payload buffer too short */\n#define SILK_ENC_PAYLOAD_BUF_TOO_SHORT              -104\n\n/* Loss rate not between 0 and 100 percent */\n#define SILK_ENC_INVALID_LOSS_RATE                  -105\n\n/* Complexity setting not valid, use 0...10 */\n#define SILK_ENC_INVALID_COMPLEXITY_SETTING         -106\n\n/* Inband FEC setting not valid, use 0 or 1 */\n#define SILK_ENC_INVALID_INBAND_FEC_SETTING         -107\n\n/* DTX setting not valid, use 0 or 1 */\n#define SILK_ENC_INVALID_DTX_SETTING                -108\n\n/* CBR setting not valid, use 0 or 1 */\n#define SILK_ENC_INVALID_CBR_SETTING                -109\n\n/* Internal encoder error */\n#define SILK_ENC_INTERNAL_ERROR                     -110\n\n/* Internal encoder error */\n#define SILK_ENC_INVALID_NUMBER_OF_CHANNELS_ERROR   -111\n\n/**************************/\n/* Decoder error messages */\n/**************************/\n\n/* Output sampling frequency lower than internal decoded sampling frequency */\n#define SILK_DEC_INVALID_SAMPLING_FREQUENCY         -200\n\n/* Payload size exceeded the maximum allowed 1024 bytes */\n#define SILK_DEC_PAYLOAD_TOO_LARGE                  -201\n\n/* Payload has bit errors */\n#define SILK_DEC_PAYLOAD_ERROR                      -202\n\n/* Payload has bit errors */\n#define SILK_DEC_INVALID_FRAME_SIZE                 -203\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/LTP_analysis_filter_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n\nvoid silk_LTP_analysis_filter_FIX(\n    opus_int16                      *LTP_res,                               /* O    LTP residual signal of length MAX_NB_SUBFR * ( pre_length + subfr_length )  */\n    const opus_int16                *x,                                     /* I    Pointer to input signal with at least max( pitchL ) preceding samples       */\n    const opus_int16                LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],/* I    LTP_ORDER LTP coefficients for each MAX_NB_SUBFR subframe                   */\n    const opus_int                  pitchL[ MAX_NB_SUBFR ],                 /* I    Pitch lag, one for each subframe                                            */\n    const opus_int32                invGains_Q16[ MAX_NB_SUBFR ],           /* I    Inverse quantization gains, one for each subframe                           */\n    const opus_int                  subfr_length,                           /* I    Length of each subframe                                                     */\n    const opus_int                  nb_subfr,                               /* I    Number of subframes                                                         */\n    const opus_int                  pre_length                              /* I    Length of the preceding samples starting at &x[0] for each subframe         */\n)\n{\n    const opus_int16 *x_ptr, *x_lag_ptr;\n    opus_int16   Btmp_Q14[ LTP_ORDER ];\n    opus_int16   *LTP_res_ptr;\n    opus_int     k, i, j;\n    opus_int32   LTP_est;\n\n    x_ptr = x;\n    LTP_res_ptr = LTP_res;\n    for( k = 0; k < nb_subfr; k++ ) {\n\n        x_lag_ptr = x_ptr - pitchL[ k ];\n        for( i = 0; i < LTP_ORDER; i++ ) {\n            Btmp_Q14[ i ] = LTPCoef_Q14[ k * LTP_ORDER + i ];\n        }\n\n        /* LTP analysis FIR filter */\n        for( i = 0; i < subfr_length + pre_length; i++ ) {\n            LTP_res_ptr[ i ] = x_ptr[ i ];\n\n            /* Long-term prediction */\n            LTP_est = silk_SMULBB( x_lag_ptr[ LTP_ORDER / 2 ], Btmp_Q14[ 0 ] );\n            for( j = 1; j < LTP_ORDER; j++ ) {\n                LTP_est = silk_SMLABB_ovflw( LTP_est, x_lag_ptr[ LTP_ORDER / 2 - j ], Btmp_Q14[ j ] );\n            }\n            LTP_est = silk_RSHIFT_ROUND( LTP_est, 14 ); /* round and -> Q0*/\n\n            /* Subtract long-term prediction */\n            LTP_res_ptr[ i ] = (opus_int16)silk_SAT16( (opus_int32)x_ptr[ i ] - LTP_est );\n\n            /* Scale residual */\n            LTP_res_ptr[ i ] = silk_SMULWB( invGains_Q16[ k ], LTP_res_ptr[ i ] );\n\n            x_lag_ptr++;\n        }\n\n        /* Update pointers */\n        LTP_res_ptr += subfr_length + pre_length;\n        x_ptr       += subfr_length;\n    }\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/LTP_scale_ctrl_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n\n/* Calculation of LTP state scaling */\nvoid silk_LTP_scale_ctrl_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  encoder state                                                               */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  encoder control                                                             */\n    opus_int                        condCoding                              /* I    The type of conditional coding to use                                       */\n)\n{\n    opus_int round_loss;\n\n    if( condCoding == CODE_INDEPENDENTLY ) {\n        /* Only scale if first frame in packet */\n        round_loss = psEnc->sCmn.PacketLoss_perc + psEnc->sCmn.nFramesPerPacket;\n        psEnc->sCmn.indices.LTP_scaleIndex = (opus_int8)silk_LIMIT(\n            silk_SMULWB( silk_SMULBB( round_loss, psEncCtrl->LTPredCodGain_Q7 ), SILK_FIX_CONST( 0.1, 9 ) ), 0, 2 );\n    } else {\n        /* Default is minimum scaling */\n        psEnc->sCmn.indices.LTP_scaleIndex = 0;\n    }\n    psEncCtrl->LTP_scale_Q14 = silk_LTPScales_table_Q14[ psEnc->sCmn.indices.LTP_scaleIndex ];\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/apply_sine_window_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Apply sine window to signal vector.                                      */\n/* Window types:                                                            */\n/*    1 -> sine window from 0 to pi/2                                       */\n/*    2 -> sine window from pi/2 to pi                                      */\n/* Every other sample is linearly interpolated, for speed.                  */\n/* Window length must be between 16 and 120 (incl) and a multiple of 4.     */\n\n/* Matlab code for table:\n   for k=16:9*4:16+2*9*4, fprintf(' %7.d,', -round(65536*pi ./ (k:4:k+8*4))); fprintf('\\n'); end\n*/\nstatic const opus_int16 freq_table_Q16[ 27 ] = {\n   12111,    9804,    8235,    7100,    6239,    5565,    5022,    4575,    4202,\n    3885,    3612,    3375,    3167,    2984,    2820,    2674,    2542,    2422,\n    2313,    2214,    2123,    2038,    1961,    1889,    1822,    1760,    1702,\n};\n\nvoid silk_apply_sine_window(\n    opus_int16                  px_win[],           /* O    Pointer to windowed signal                                  */\n    const opus_int16            px[],               /* I    Pointer to input signal                                     */\n    const opus_int              win_type,           /* I    Selects a window type                                       */\n    const opus_int              length              /* I    Window length, multiple of 4                                */\n)\n{\n    opus_int   k, f_Q16, c_Q16;\n    opus_int32 S0_Q16, S1_Q16;\n\n    silk_assert( win_type == 1 || win_type == 2 );\n\n    /* Length must be in a range from 16 to 120 and a multiple of 4 */\n    silk_assert( length >= 16 && length <= 120 );\n    silk_assert( ( length & 3 ) == 0 );\n\n    /* Frequency */\n    k = ( length >> 2 ) - 4;\n    silk_assert( k >= 0 && k <= 26 );\n    f_Q16 = (opus_int)freq_table_Q16[ k ];\n\n    /* Factor used for cosine approximation */\n    c_Q16 = silk_SMULWB( (opus_int32)f_Q16, -f_Q16 );\n    silk_assert( c_Q16 >= -32768 );\n\n    /* initialize state */\n    if( win_type == 1 ) {\n        /* start from 0 */\n        S0_Q16 = 0;\n        /* approximation of sin(f) */\n        S1_Q16 = f_Q16 + silk_RSHIFT( length, 3 );\n    } else {\n        /* start from 1 */\n        S0_Q16 = ( (opus_int32)1 << 16 );\n        /* approximation of cos(f) */\n        S1_Q16 = ( (opus_int32)1 << 16 ) + silk_RSHIFT( c_Q16, 1 ) + silk_RSHIFT( length, 4 );\n    }\n\n    /* Uses the recursive equation:   sin(n*f) = 2 * cos(f) * sin((n-1)*f) - sin((n-2)*f)    */\n    /* 4 samples at a time */\n    for( k = 0; k < length; k += 4 ) {\n        px_win[ k ]     = (opus_int16)silk_SMULWB( silk_RSHIFT( S0_Q16 + S1_Q16, 1 ), px[ k ] );\n        px_win[ k + 1 ] = (opus_int16)silk_SMULWB( S1_Q16, px[ k + 1] );\n        S0_Q16 = silk_SMULWB( S1_Q16, c_Q16 ) + silk_LSHIFT( S1_Q16, 1 ) - S0_Q16 + 1;\n        S0_Q16 = silk_min( S0_Q16, ( (opus_int32)1 << 16 ) );\n\n        px_win[ k + 2 ] = (opus_int16)silk_SMULWB( silk_RSHIFT( S0_Q16 + S1_Q16, 1 ), px[ k + 2] );\n        px_win[ k + 3 ] = (opus_int16)silk_SMULWB( S0_Q16, px[ k + 3 ] );\n        S1_Q16 = silk_SMULWB( S0_Q16, c_Q16 ) + silk_LSHIFT( S0_Q16, 1 ) - S1_Q16;\n        S1_Q16 = silk_min( S1_Q16, ( (opus_int32)1 << 16 ) );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/autocorr_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n#include \"celt_lpc.h\"\n\n/* Compute autocorrelation */\nvoid silk_autocorr(\n    opus_int32                  *results,           /* O    Result (length correlationCount)                            */\n    opus_int                    *scale,             /* O    Scaling of the correlation vector                           */\n    const opus_int16            *inputData,         /* I    Input data to correlate                                     */\n    const opus_int              inputDataSize,      /* I    Length of input                                             */\n    const opus_int              correlationCount,   /* I    Number of correlation taps to compute                       */\n    int                         arch                /* I    Run-time architecture                                       */\n)\n{\n    opus_int   corrCount;\n    corrCount = silk_min_int( inputDataSize, correlationCount );\n    *scale = _celt_autocorr(inputData, results, NULL, 0, corrCount-1, inputDataSize, arch);\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/burg_modified_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n#include \"define.h\"\n#include \"tuning_parameters.h\"\n#include \"pitch.h\"\n\n#define MAX_FRAME_SIZE              384             /* subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384 */\n\n#define QA                          25\n#define N_BITS_HEAD_ROOM            2\n#define MIN_RSHIFTS                 -16\n#define MAX_RSHIFTS                 (32 - QA)\n\n/* Compute reflection coefficients from input signal */\nvoid silk_burg_modified(\n    opus_int32                  *res_nrg,           /* O    Residual energy                                             */\n    opus_int                    *res_nrg_Q,         /* O    Residual energy Q value                                     */\n    opus_int32                  A_Q16[],            /* O    Prediction coefficients (length order)                      */\n    const opus_int16            x[],                /* I    Input signal, length: nb_subfr * ( D + subfr_length )       */\n    const opus_int32            minInvGain_Q30,     /* I    Inverse of max prediction gain                              */\n    const opus_int              subfr_length,       /* I    Input signal subframe length (incl. D preceding samples)    */\n    const opus_int              nb_subfr,           /* I    Number of subframes stacked in x                            */\n    const opus_int              D,                  /* I    Order                                                       */\n    int                         arch                /* I    Run-time architecture                                       */\n)\n{\n    opus_int         k, n, s, lz, rshifts, rshifts_extra, reached_max_gain;\n    opus_int32       C0, num, nrg, rc_Q31, invGain_Q30, Atmp_QA, Atmp1, tmp1, tmp2, x1, x2;\n    const opus_int16 *x_ptr;\n    opus_int32       C_first_row[ SILK_MAX_ORDER_LPC ];\n    opus_int32       C_last_row[  SILK_MAX_ORDER_LPC ];\n    opus_int32       Af_QA[       SILK_MAX_ORDER_LPC ];\n    opus_int32       CAf[ SILK_MAX_ORDER_LPC + 1 ];\n    opus_int32       CAb[ SILK_MAX_ORDER_LPC + 1 ];\n    opus_int32       xcorr[ SILK_MAX_ORDER_LPC ];\n\n    silk_assert( subfr_length * nb_subfr <= MAX_FRAME_SIZE );\n\n    /* Compute autocorrelations, added over subframes */\n    silk_sum_sqr_shift( &C0, &rshifts, x, nb_subfr * subfr_length );\n    if( rshifts > MAX_RSHIFTS ) {\n        C0 = silk_LSHIFT32( C0, rshifts - MAX_RSHIFTS );\n        silk_assert( C0 > 0 );\n        rshifts = MAX_RSHIFTS;\n    } else {\n        lz = silk_CLZ32( C0 ) - 1;\n        rshifts_extra = N_BITS_HEAD_ROOM - lz;\n        if( rshifts_extra > 0 ) {\n            rshifts_extra = silk_min( rshifts_extra, MAX_RSHIFTS - rshifts );\n            C0 = silk_RSHIFT32( C0, rshifts_extra );\n        } else {\n            rshifts_extra = silk_max( rshifts_extra, MIN_RSHIFTS - rshifts );\n            C0 = silk_LSHIFT32( C0, -rshifts_extra );\n        }\n        rshifts += rshifts_extra;\n    }\n    CAb[ 0 ] = CAf[ 0 ] = C0 + silk_SMMUL( SILK_FIX_CONST( FIND_LPC_COND_FAC, 32 ), C0 ) + 1;                                /* Q(-rshifts) */\n    silk_memset( C_first_row, 0, SILK_MAX_ORDER_LPC * sizeof( opus_int32 ) );\n    if( rshifts > 0 ) {\n        for( s = 0; s < nb_subfr; s++ ) {\n            x_ptr = x + s * subfr_length;\n            for( n = 1; n < D + 1; n++ ) {\n                C_first_row[ n - 1 ] += (opus_int32)silk_RSHIFT64(\n                    silk_inner_prod16_aligned_64( x_ptr, x_ptr + n, subfr_length - n ), rshifts );\n            }\n        }\n    } else {\n        for( s = 0; s < nb_subfr; s++ ) {\n            int i;\n            opus_int32 d;\n            x_ptr = x + s * subfr_length;\n            celt_pitch_xcorr(x_ptr, x_ptr + 1, xcorr, subfr_length - D, D, arch );\n            for( n = 1; n < D + 1; n++ ) {\n               for ( i = n + subfr_length - D, d = 0; i < subfr_length; i++ )\n                  d = MAC16_16( d, x_ptr[ i ], x_ptr[ i - n ] );\n               xcorr[ n - 1 ] += d;\n            }\n            for( n = 1; n < D + 1; n++ ) {\n                C_first_row[ n - 1 ] += silk_LSHIFT32( xcorr[ n - 1 ], -rshifts );\n            }\n        }\n    }\n    silk_memcpy( C_last_row, C_first_row, SILK_MAX_ORDER_LPC * sizeof( opus_int32 ) );\n\n    /* Initialize */\n    CAb[ 0 ] = CAf[ 0 ] = C0 + silk_SMMUL( SILK_FIX_CONST( FIND_LPC_COND_FAC, 32 ), C0 ) + 1;                                /* Q(-rshifts) */\n\n    invGain_Q30 = (opus_int32)1 << 30;\n    reached_max_gain = 0;\n    for( n = 0; n < D; n++ ) {\n        /* Update first row of correlation matrix (without first element) */\n        /* Update last row of correlation matrix (without last element, stored in reversed order) */\n        /* Update C * Af */\n        /* Update C * flipud(Af) (stored in reversed order) */\n        if( rshifts > -2 ) {\n            for( s = 0; s < nb_subfr; s++ ) {\n                x_ptr = x + s * subfr_length;\n                x1  = -silk_LSHIFT32( (opus_int32)x_ptr[ n ],                    16 - rshifts );        /* Q(16-rshifts) */\n                x2  = -silk_LSHIFT32( (opus_int32)x_ptr[ subfr_length - n - 1 ], 16 - rshifts );        /* Q(16-rshifts) */\n                tmp1 = silk_LSHIFT32( (opus_int32)x_ptr[ n ],                    QA - 16 );             /* Q(QA-16) */\n                tmp2 = silk_LSHIFT32( (opus_int32)x_ptr[ subfr_length - n - 1 ], QA - 16 );             /* Q(QA-16) */\n                for( k = 0; k < n; k++ ) {\n                    C_first_row[ k ] = silk_SMLAWB( C_first_row[ k ], x1, x_ptr[ n - k - 1 ]            ); /* Q( -rshifts ) */\n                    C_last_row[ k ]  = silk_SMLAWB( C_last_row[ k ],  x2, x_ptr[ subfr_length - n + k ] ); /* Q( -rshifts ) */\n                    Atmp_QA = Af_QA[ k ];\n                    tmp1 = silk_SMLAWB( tmp1, Atmp_QA, x_ptr[ n - k - 1 ]            );                 /* Q(QA-16) */\n                    tmp2 = silk_SMLAWB( tmp2, Atmp_QA, x_ptr[ subfr_length - n + k ] );                 /* Q(QA-16) */\n                }\n                tmp1 = silk_LSHIFT32( -tmp1, 32 - QA - rshifts );                                       /* Q(16-rshifts) */\n                tmp2 = silk_LSHIFT32( -tmp2, 32 - QA - rshifts );                                       /* Q(16-rshifts) */\n                for( k = 0; k <= n; k++ ) {\n                    CAf[ k ] = silk_SMLAWB( CAf[ k ], tmp1, x_ptr[ n - k ]                    );        /* Q( -rshift ) */\n                    CAb[ k ] = silk_SMLAWB( CAb[ k ], tmp2, x_ptr[ subfr_length - n + k - 1 ] );        /* Q( -rshift ) */\n                }\n            }\n        } else {\n            for( s = 0; s < nb_subfr; s++ ) {\n                x_ptr = x + s * subfr_length;\n                x1  = -silk_LSHIFT32( (opus_int32)x_ptr[ n ],                    -rshifts );            /* Q( -rshifts ) */\n                x2  = -silk_LSHIFT32( (opus_int32)x_ptr[ subfr_length - n - 1 ], -rshifts );            /* Q( -rshifts ) */\n                tmp1 = silk_LSHIFT32( (opus_int32)x_ptr[ n ],                    17 );                  /* Q17 */\n                tmp2 = silk_LSHIFT32( (opus_int32)x_ptr[ subfr_length - n - 1 ], 17 );                  /* Q17 */\n                for( k = 0; k < n; k++ ) {\n                    C_first_row[ k ] = silk_MLA( C_first_row[ k ], x1, x_ptr[ n - k - 1 ]            ); /* Q( -rshifts ) */\n                    C_last_row[ k ]  = silk_MLA( C_last_row[ k ],  x2, x_ptr[ subfr_length - n + k ] ); /* Q( -rshifts ) */\n                    Atmp1 = silk_RSHIFT_ROUND( Af_QA[ k ], QA - 17 );                                   /* Q17 */\n                    tmp1 = silk_MLA( tmp1, x_ptr[ n - k - 1 ],            Atmp1 );                      /* Q17 */\n                    tmp2 = silk_MLA( tmp2, x_ptr[ subfr_length - n + k ], Atmp1 );                      /* Q17 */\n                }\n                tmp1 = -tmp1;                                                                           /* Q17 */\n                tmp2 = -tmp2;                                                                           /* Q17 */\n                for( k = 0; k <= n; k++ ) {\n                    CAf[ k ] = silk_SMLAWW( CAf[ k ], tmp1,\n                        silk_LSHIFT32( (opus_int32)x_ptr[ n - k ], -rshifts - 1 ) );                    /* Q( -rshift ) */\n                    CAb[ k ] = silk_SMLAWW( CAb[ k ], tmp2,\n                        silk_LSHIFT32( (opus_int32)x_ptr[ subfr_length - n + k - 1 ], -rshifts - 1 ) ); /* Q( -rshift ) */\n                }\n            }\n        }\n\n        /* Calculate nominator and denominator for the next order reflection (parcor) coefficient */\n        tmp1 = C_first_row[ n ];                                                                        /* Q( -rshifts ) */\n        tmp2 = C_last_row[ n ];                                                                         /* Q( -rshifts ) */\n        num  = 0;                                                                                       /* Q( -rshifts ) */\n        nrg  = silk_ADD32( CAb[ 0 ], CAf[ 0 ] );                                                        /* Q( 1-rshifts ) */\n        for( k = 0; k < n; k++ ) {\n            Atmp_QA = Af_QA[ k ];\n            lz = silk_CLZ32( silk_abs( Atmp_QA ) ) - 1;\n            lz = silk_min( 32 - QA, lz );\n            Atmp1 = silk_LSHIFT32( Atmp_QA, lz );                                                       /* Q( QA + lz ) */\n\n            tmp1 = silk_ADD_LSHIFT32( tmp1, silk_SMMUL( C_last_row[  n - k - 1 ], Atmp1 ), 32 - QA - lz );  /* Q( -rshifts ) */\n            tmp2 = silk_ADD_LSHIFT32( tmp2, silk_SMMUL( C_first_row[ n - k - 1 ], Atmp1 ), 32 - QA - lz );  /* Q( -rshifts ) */\n            num  = silk_ADD_LSHIFT32( num,  silk_SMMUL( CAb[ n - k ],             Atmp1 ), 32 - QA - lz );  /* Q( -rshifts ) */\n            nrg  = silk_ADD_LSHIFT32( nrg,  silk_SMMUL( silk_ADD32( CAb[ k + 1 ], CAf[ k + 1 ] ),\n                                                                                Atmp1 ), 32 - QA - lz );    /* Q( 1-rshifts ) */\n        }\n        CAf[ n + 1 ] = tmp1;                                                                            /* Q( -rshifts ) */\n        CAb[ n + 1 ] = tmp2;                                                                            /* Q( -rshifts ) */\n        num = silk_ADD32( num, tmp2 );                                                                  /* Q( -rshifts ) */\n        num = silk_LSHIFT32( -num, 1 );                                                                 /* Q( 1-rshifts ) */\n\n        /* Calculate the next order reflection (parcor) coefficient */\n        if( silk_abs( num ) < nrg ) {\n            rc_Q31 = silk_DIV32_varQ( num, nrg, 31 );\n        } else {\n            rc_Q31 = ( num > 0 ) ? silk_int32_MAX : silk_int32_MIN;\n        }\n\n        /* Update inverse prediction gain */\n        tmp1 = ( (opus_int32)1 << 30 ) - silk_SMMUL( rc_Q31, rc_Q31 );\n        tmp1 = silk_LSHIFT( silk_SMMUL( invGain_Q30, tmp1 ), 2 );\n        if( tmp1 <= minInvGain_Q30 ) {\n            /* Max prediction gain exceeded; set reflection coefficient such that max prediction gain is exactly hit */\n            tmp2 = ( (opus_int32)1 << 30 ) - silk_DIV32_varQ( minInvGain_Q30, invGain_Q30, 30 );            /* Q30 */\n            rc_Q31 = silk_SQRT_APPROX( tmp2 );                                                  /* Q15 */\n            /* Newton-Raphson iteration */\n            rc_Q31 = silk_RSHIFT32( rc_Q31 + silk_DIV32( tmp2, rc_Q31 ), 1 );                   /* Q15 */\n            rc_Q31 = silk_LSHIFT32( rc_Q31, 16 );                                               /* Q31 */\n            if( num < 0 ) {\n                /* Ensure adjusted reflection coefficients has the original sign */\n                rc_Q31 = -rc_Q31;\n            }\n            invGain_Q30 = minInvGain_Q30;\n            reached_max_gain = 1;\n        } else {\n            invGain_Q30 = tmp1;\n        }\n\n        /* Update the AR coefficients */\n        for( k = 0; k < (n + 1) >> 1; k++ ) {\n            tmp1 = Af_QA[ k ];                                                                  /* QA */\n            tmp2 = Af_QA[ n - k - 1 ];                                                          /* QA */\n            Af_QA[ k ]         = silk_ADD_LSHIFT32( tmp1, silk_SMMUL( tmp2, rc_Q31 ), 1 );      /* QA */\n            Af_QA[ n - k - 1 ] = silk_ADD_LSHIFT32( tmp2, silk_SMMUL( tmp1, rc_Q31 ), 1 );      /* QA */\n        }\n        Af_QA[ n ] = silk_RSHIFT32( rc_Q31, 31 - QA );                                          /* QA */\n\n        if( reached_max_gain ) {\n            /* Reached max prediction gain; set remaining coefficients to zero and exit loop */\n            for( k = n + 1; k < D; k++ ) {\n                Af_QA[ k ] = 0;\n            }\n            break;\n        }\n\n        /* Update C * Af and C * Ab */\n        for( k = 0; k <= n + 1; k++ ) {\n            tmp1 = CAf[ k ];                                                                    /* Q( -rshifts ) */\n            tmp2 = CAb[ n - k + 1 ];                                                            /* Q( -rshifts ) */\n            CAf[ k ]         = silk_ADD_LSHIFT32( tmp1, silk_SMMUL( tmp2, rc_Q31 ), 1 );        /* Q( -rshifts ) */\n            CAb[ n - k + 1 ] = silk_ADD_LSHIFT32( tmp2, silk_SMMUL( tmp1, rc_Q31 ), 1 );        /* Q( -rshifts ) */\n        }\n    }\n\n    if( reached_max_gain ) {\n        for( k = 0; k < D; k++ ) {\n            /* Scale coefficients */\n            A_Q16[ k ] = -silk_RSHIFT_ROUND( Af_QA[ k ], QA - 16 );\n        }\n        /* Subtract energy of preceding samples from C0 */\n        if( rshifts > 0 ) {\n            for( s = 0; s < nb_subfr; s++ ) {\n                x_ptr = x + s * subfr_length;\n                C0 -= (opus_int32)silk_RSHIFT64( silk_inner_prod16_aligned_64( x_ptr, x_ptr, D ), rshifts );\n            }\n        } else {\n            for( s = 0; s < nb_subfr; s++ ) {\n                x_ptr = x + s * subfr_length;\n                C0 -= silk_LSHIFT32( silk_inner_prod_aligned( x_ptr, x_ptr, D ), -rshifts );\n            }\n        }\n        /* Approximate residual energy */\n        *res_nrg = silk_LSHIFT( silk_SMMUL( invGain_Q30, C0 ), 2 );\n        *res_nrg_Q = -rshifts;\n    } else {\n        /* Return residual energy */\n        nrg  = CAf[ 0 ];                                                                            /* Q( -rshifts ) */\n        tmp1 = (opus_int32)1 << 16;                                                                             /* Q16 */\n        for( k = 0; k < D; k++ ) {\n            Atmp1 = silk_RSHIFT_ROUND( Af_QA[ k ], QA - 16 );                                       /* Q16 */\n            nrg  = silk_SMLAWW( nrg, CAf[ k + 1 ], Atmp1 );                                         /* Q( -rshifts ) */\n            tmp1 = silk_SMLAWW( tmp1, Atmp1, Atmp1 );                                               /* Q16 */\n            A_Q16[ k ] = -Atmp1;\n        }\n        *res_nrg = silk_SMLAWW( nrg, silk_SMMUL( SILK_FIX_CONST( FIND_LPC_COND_FAC, 32 ), C0 ), -tmp1 );/* Q( -rshifts ) */\n        *res_nrg_Q = -rshifts;\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/corrMatrix_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n/**********************************************************************\n * Correlation Matrix Computations for LS estimate.\n **********************************************************************/\n\n#include \"main_FIX.h\"\n\n/* Calculates correlation vector X'*t */\nvoid silk_corrVector_FIX(\n    const opus_int16                *x,                                     /* I    x vector [L + order - 1] used to form data matrix X                         */\n    const opus_int16                *t,                                     /* I    Target vector [L]                                                           */\n    const opus_int                  L,                                      /* I    Length of vectors                                                           */\n    const opus_int                  order,                                  /* I    Max lag for correlation                                                     */\n    opus_int32                      *Xt,                                    /* O    Pointer to X'*t correlation vector [order]                                  */\n    const opus_int                  rshifts                                 /* I    Right shifts of correlations                                                */\n)\n{\n    opus_int         lag, i;\n    const opus_int16 *ptr1, *ptr2;\n    opus_int32       inner_prod;\n\n    ptr1 = &x[ order - 1 ]; /* Points to first sample of column 0 of X: X[:,0] */\n    ptr2 = t;\n    /* Calculate X'*t */\n    if( rshifts > 0 ) {\n        /* Right shifting used */\n        for( lag = 0; lag < order; lag++ ) {\n            inner_prod = 0;\n            for( i = 0; i < L; i++ ) {\n                inner_prod += silk_RSHIFT32( silk_SMULBB( ptr1[ i ], ptr2[i] ), rshifts );\n            }\n            Xt[ lag ] = inner_prod; /* X[:,lag]'*t */\n            ptr1--; /* Go to next column of X */\n        }\n    } else {\n        silk_assert( rshifts == 0 );\n        for( lag = 0; lag < order; lag++ ) {\n            Xt[ lag ] = silk_inner_prod_aligned( ptr1, ptr2, L ); /* X[:,lag]'*t */\n            ptr1--; /* Go to next column of X */\n        }\n    }\n}\n\n/* Calculates correlation matrix X'*X */\nvoid silk_corrMatrix_FIX(\n    const opus_int16                *x,                                     /* I    x vector [L + order - 1] used to form data matrix X                         */\n    const opus_int                  L,                                      /* I    Length of vectors                                                           */\n    const opus_int                  order,                                  /* I    Max lag for correlation                                                     */\n    const opus_int                  head_room,                              /* I    Desired headroom                                                            */\n    opus_int32                      *XX,                                    /* O    Pointer to X'*X correlation matrix [ order x order ]                        */\n    opus_int                        *rshifts                                /* I/O  Right shifts of correlations                                                */\n)\n{\n    opus_int         i, j, lag, rshifts_local, head_room_rshifts;\n    opus_int32       energy;\n    const opus_int16 *ptr1, *ptr2;\n\n    /* Calculate energy to find shift used to fit in 32 bits */\n    silk_sum_sqr_shift( &energy, &rshifts_local, x, L + order - 1 );\n    /* Add shifts to get the desired head room */\n    head_room_rshifts = silk_max( head_room - silk_CLZ32( energy ), 0 );\n\n    energy = silk_RSHIFT32( energy, head_room_rshifts );\n    rshifts_local += head_room_rshifts;\n\n    /* Calculate energy of first column (0) of X: X[:,0]'*X[:,0] */\n    /* Remove contribution of first order - 1 samples */\n    for( i = 0; i < order - 1; i++ ) {\n        energy -= silk_RSHIFT32( silk_SMULBB( x[ i ], x[ i ] ), rshifts_local );\n    }\n    if( rshifts_local < *rshifts ) {\n        /* Adjust energy */\n        energy = silk_RSHIFT32( energy, *rshifts - rshifts_local );\n        rshifts_local = *rshifts;\n    }\n\n    /* Calculate energy of remaining columns of X: X[:,j]'*X[:,j] */\n    /* Fill out the diagonal of the correlation matrix */\n    matrix_ptr( XX, 0, 0, order ) = energy;\n    ptr1 = &x[ order - 1 ]; /* First sample of column 0 of X */\n    for( j = 1; j < order; j++ ) {\n        energy = silk_SUB32( energy, silk_RSHIFT32( silk_SMULBB( ptr1[ L - j ], ptr1[ L - j ] ), rshifts_local ) );\n        energy = silk_ADD32( energy, silk_RSHIFT32( silk_SMULBB( ptr1[ -j ], ptr1[ -j ] ), rshifts_local ) );\n        matrix_ptr( XX, j, j, order ) = energy;\n    }\n\n    ptr2 = &x[ order - 2 ]; /* First sample of column 1 of X */\n    /* Calculate the remaining elements of the correlation matrix */\n    if( rshifts_local > 0 ) {\n        /* Right shifting used */\n        for( lag = 1; lag < order; lag++ ) {\n            /* Inner product of column 0 and column lag: X[:,0]'*X[:,lag] */\n            energy = 0;\n            for( i = 0; i < L; i++ ) {\n                energy += silk_RSHIFT32( silk_SMULBB( ptr1[ i ], ptr2[i] ), rshifts_local );\n            }\n            /* Calculate remaining off diagonal: X[:,j]'*X[:,j + lag] */\n            matrix_ptr( XX, lag, 0, order ) = energy;\n            matrix_ptr( XX, 0, lag, order ) = energy;\n            for( j = 1; j < ( order - lag ); j++ ) {\n                energy = silk_SUB32( energy, silk_RSHIFT32( silk_SMULBB( ptr1[ L - j ], ptr2[ L - j ] ), rshifts_local ) );\n                energy = silk_ADD32( energy, silk_RSHIFT32( silk_SMULBB( ptr1[ -j ], ptr2[ -j ] ), rshifts_local ) );\n                matrix_ptr( XX, lag + j, j, order ) = energy;\n                matrix_ptr( XX, j, lag + j, order ) = energy;\n            }\n            ptr2--; /* Update pointer to first sample of next column (lag) in X */\n        }\n    } else {\n        for( lag = 1; lag < order; lag++ ) {\n            /* Inner product of column 0 and column lag: X[:,0]'*X[:,lag] */\n            energy = silk_inner_prod_aligned( ptr1, ptr2, L );\n            matrix_ptr( XX, lag, 0, order ) = energy;\n            matrix_ptr( XX, 0, lag, order ) = energy;\n            /* Calculate remaining off diagonal: X[:,j]'*X[:,j + lag] */\n            for( j = 1; j < ( order - lag ); j++ ) {\n                energy = silk_SUB32( energy, silk_SMULBB( ptr1[ L - j ], ptr2[ L - j ] ) );\n                energy = silk_SMLABB( energy, ptr1[ -j ], ptr2[ -j ] );\n                matrix_ptr( XX, lag + j, j, order ) = energy;\n                matrix_ptr( XX, j, lag + j, order ) = energy;\n            }\n            ptr2--;/* Update pointer to first sample of next column (lag) in X */\n        }\n    }\n    *rshifts = rshifts_local;\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/encode_frame_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n#include \"stack_alloc.h\"\n#include \"tuning_parameters.h\"\n\n/* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate           */\nstatic OPUS_INLINE void silk_LBRR_encode_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  Pointer to Silk FIX encoder state                                           */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  Pointer to Silk FIX encoder control struct                                  */\n    const opus_int32                xfw_Q3[],                               /* I    Input signal                                                                */\n    opus_int                        condCoding                              /* I    The type of conditional coding used so far for this frame                   */\n);\n\nvoid silk_encode_do_VAD_FIX(\n    silk_encoder_state_FIX          *psEnc                                  /* I/O  Pointer to Silk FIX encoder state                                           */\n)\n{\n    /****************************/\n    /* Voice Activity Detection */\n    /****************************/\n    silk_VAD_GetSA_Q8( &psEnc->sCmn, psEnc->sCmn.inputBuf + 1 );\n\n    /**************************************************/\n    /* Convert speech activity into VAD and DTX flags */\n    /**************************************************/\n    if( psEnc->sCmn.speech_activity_Q8 < SILK_FIX_CONST( SPEECH_ACTIVITY_DTX_THRES, 8 ) ) {\n        psEnc->sCmn.indices.signalType = TYPE_NO_VOICE_ACTIVITY;\n        psEnc->sCmn.noSpeechCounter++;\n        if( psEnc->sCmn.noSpeechCounter < NB_SPEECH_FRAMES_BEFORE_DTX ) {\n            psEnc->sCmn.inDTX = 0;\n        } else if( psEnc->sCmn.noSpeechCounter > MAX_CONSECUTIVE_DTX + NB_SPEECH_FRAMES_BEFORE_DTX ) {\n            psEnc->sCmn.noSpeechCounter = NB_SPEECH_FRAMES_BEFORE_DTX;\n            psEnc->sCmn.inDTX           = 0;\n        }\n        psEnc->sCmn.VAD_flags[ psEnc->sCmn.nFramesEncoded ] = 0;\n    } else {\n        psEnc->sCmn.noSpeechCounter    = 0;\n        psEnc->sCmn.inDTX              = 0;\n        psEnc->sCmn.indices.signalType = TYPE_UNVOICED;\n        psEnc->sCmn.VAD_flags[ psEnc->sCmn.nFramesEncoded ] = 1;\n    }\n}\n\n/****************/\n/* Encode frame */\n/****************/\nopus_int silk_encode_frame_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  Pointer to Silk FIX encoder state                                           */\n    opus_int32                      *pnBytesOut,                            /* O    Pointer to number of payload bytes;                                         */\n    ec_enc                          *psRangeEnc,                            /* I/O  compressor data structure                                                   */\n    opus_int                        condCoding,                             /* I    The type of conditional coding to use                                       */\n    opus_int                        maxBits,                                /* I    If > 0: maximum number of output bits                                       */\n    opus_int                        useCBR                                  /* I    Flag to force constant-bitrate operation                                    */\n)\n{\n    silk_encoder_control_FIX sEncCtrl;\n    opus_int     i, iter, maxIter, found_upper, found_lower, ret = 0;\n    opus_int16   *x_frame;\n    ec_enc       sRangeEnc_copy, sRangeEnc_copy2;\n    silk_nsq_state sNSQ_copy, sNSQ_copy2;\n    opus_int32   seed_copy, nBits, nBits_lower, nBits_upper, gainMult_lower, gainMult_upper;\n    opus_int32   gainsID, gainsID_lower, gainsID_upper;\n    opus_int16   gainMult_Q8;\n    opus_int16   ec_prevLagIndex_copy;\n    opus_int     ec_prevSignalType_copy;\n    opus_int8    LastGainIndex_copy2;\n    SAVE_STACK;\n\n    /* This is totally unnecessary but many compilers (including gcc) are too dumb to realise it */\n    LastGainIndex_copy2 = nBits_lower = nBits_upper = gainMult_lower = gainMult_upper = 0;\n\n    psEnc->sCmn.indices.Seed = psEnc->sCmn.frameCounter++ & 3;\n\n    /**************************************************************/\n    /* Set up Input Pointers, and insert frame in input buffer   */\n    /*************************************************************/\n    /* start of frame to encode */\n    x_frame = psEnc->x_buf + psEnc->sCmn.ltp_mem_length;\n\n    /***************************************/\n    /* Ensure smooth bandwidth transitions */\n    /***************************************/\n    silk_LP_variable_cutoff( &psEnc->sCmn.sLP, psEnc->sCmn.inputBuf + 1, psEnc->sCmn.frame_length );\n\n    /*******************************************/\n    /* Copy new frame to front of input buffer */\n    /*******************************************/\n    silk_memcpy( x_frame + LA_SHAPE_MS * psEnc->sCmn.fs_kHz, psEnc->sCmn.inputBuf + 1, psEnc->sCmn.frame_length * sizeof( opus_int16 ) );\n\n    if( !psEnc->sCmn.prefillFlag ) {\n        VARDECL( opus_int32, xfw_Q3 );\n        VARDECL( opus_int16, res_pitch );\n        VARDECL( opus_uint8, ec_buf_copy );\n        opus_int16 *res_pitch_frame;\n\n        ALLOC( res_pitch,\n               psEnc->sCmn.la_pitch + psEnc->sCmn.frame_length\n                   + psEnc->sCmn.ltp_mem_length, opus_int16 );\n        /* start of pitch LPC residual frame */\n        res_pitch_frame = res_pitch + psEnc->sCmn.ltp_mem_length;\n\n        /*****************************************/\n        /* Find pitch lags, initial LPC analysis */\n        /*****************************************/\n        silk_find_pitch_lags_FIX( psEnc, &sEncCtrl, res_pitch, x_frame, psEnc->sCmn.arch );\n\n        /************************/\n        /* Noise shape analysis */\n        /************************/\n        silk_noise_shape_analysis_FIX( psEnc, &sEncCtrl, res_pitch_frame, x_frame, psEnc->sCmn.arch );\n\n        /***************************************************/\n        /* Find linear prediction coefficients (LPC + LTP) */\n        /***************************************************/\n        silk_find_pred_coefs_FIX( psEnc, &sEncCtrl, res_pitch, x_frame, condCoding );\n\n        /****************************************/\n        /* Process gains                        */\n        /****************************************/\n        silk_process_gains_FIX( psEnc, &sEncCtrl, condCoding );\n\n        /*****************************************/\n        /* Prefiltering for noise shaper         */\n        /*****************************************/\n        ALLOC( xfw_Q3, psEnc->sCmn.frame_length, opus_int32 );\n        silk_prefilter_FIX( psEnc, &sEncCtrl, xfw_Q3, x_frame );\n\n        /****************************************/\n        /* Low Bitrate Redundant Encoding       */\n        /****************************************/\n        silk_LBRR_encode_FIX( psEnc, &sEncCtrl, xfw_Q3, condCoding );\n\n        /* Loop over quantizer and entropy coding to control bitrate */\n        maxIter = 6;\n        gainMult_Q8 = SILK_FIX_CONST( 1, 8 );\n        found_lower = 0;\n        found_upper = 0;\n        gainsID = silk_gains_ID( psEnc->sCmn.indices.GainsIndices, psEnc->sCmn.nb_subfr );\n        gainsID_lower = -1;\n        gainsID_upper = -1;\n        /* Copy part of the input state */\n        silk_memcpy( &sRangeEnc_copy, psRangeEnc, sizeof( ec_enc ) );\n        silk_memcpy( &sNSQ_copy, &psEnc->sCmn.sNSQ, sizeof( silk_nsq_state ) );\n        seed_copy = psEnc->sCmn.indices.Seed;\n        ec_prevLagIndex_copy = psEnc->sCmn.ec_prevLagIndex;\n        ec_prevSignalType_copy = psEnc->sCmn.ec_prevSignalType;\n        ALLOC( ec_buf_copy, 1275, opus_uint8 );\n        for( iter = 0; ; iter++ ) {\n            if( gainsID == gainsID_lower ) {\n                nBits = nBits_lower;\n            } else if( gainsID == gainsID_upper ) {\n                nBits = nBits_upper;\n            } else {\n                /* Restore part of the input state */\n                if( iter > 0 ) {\n                    silk_memcpy( psRangeEnc, &sRangeEnc_copy, sizeof( ec_enc ) );\n                    silk_memcpy( &psEnc->sCmn.sNSQ, &sNSQ_copy, sizeof( silk_nsq_state ) );\n                    psEnc->sCmn.indices.Seed = seed_copy;\n                    psEnc->sCmn.ec_prevLagIndex = ec_prevLagIndex_copy;\n                    psEnc->sCmn.ec_prevSignalType = ec_prevSignalType_copy;\n                }\n\n                /*****************************************/\n                /* Noise shaping quantization            */\n                /*****************************************/\n                if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) {\n                    silk_NSQ_del_dec( &psEnc->sCmn, &psEnc->sCmn.sNSQ, &psEnc->sCmn.indices, xfw_Q3, psEnc->sCmn.pulses,\n                           sEncCtrl.PredCoef_Q12[ 0 ], sEncCtrl.LTPCoef_Q14, sEncCtrl.AR2_Q13, sEncCtrl.HarmShapeGain_Q14,\n                           sEncCtrl.Tilt_Q14, sEncCtrl.LF_shp_Q14, sEncCtrl.Gains_Q16, sEncCtrl.pitchL, sEncCtrl.Lambda_Q10, sEncCtrl.LTP_scale_Q14 );\n                } else {\n                    silk_NSQ( &psEnc->sCmn, &psEnc->sCmn.sNSQ, &psEnc->sCmn.indices, xfw_Q3, psEnc->sCmn.pulses,\n                            sEncCtrl.PredCoef_Q12[ 0 ], sEncCtrl.LTPCoef_Q14, sEncCtrl.AR2_Q13, sEncCtrl.HarmShapeGain_Q14,\n                            sEncCtrl.Tilt_Q14, sEncCtrl.LF_shp_Q14, sEncCtrl.Gains_Q16, sEncCtrl.pitchL, sEncCtrl.Lambda_Q10, sEncCtrl.LTP_scale_Q14 );\n                }\n\n                /****************************************/\n                /* Encode Parameters                    */\n                /****************************************/\n                silk_encode_indices( &psEnc->sCmn, psRangeEnc, psEnc->sCmn.nFramesEncoded, 0, condCoding );\n\n                /****************************************/\n                /* Encode Excitation Signal             */\n                /****************************************/\n                silk_encode_pulses( psRangeEnc, psEnc->sCmn.indices.signalType, psEnc->sCmn.indices.quantOffsetType,\n                    psEnc->sCmn.pulses, psEnc->sCmn.frame_length );\n\n                nBits = ec_tell( psRangeEnc );\n\n                if( useCBR == 0 && iter == 0 && nBits <= maxBits ) {\n                    break;\n                }\n            }\n\n            if( iter == maxIter ) {\n                if( found_lower && ( gainsID == gainsID_lower || nBits > maxBits ) ) {\n                    /* Restore output state from earlier iteration that did meet the bitrate budget */\n                    silk_memcpy( psRangeEnc, &sRangeEnc_copy2, sizeof( ec_enc ) );\n                    silk_assert( sRangeEnc_copy2.offs <= 1275 );\n                    silk_memcpy( psRangeEnc->buf, ec_buf_copy, sRangeEnc_copy2.offs );\n                    silk_memcpy( &psEnc->sCmn.sNSQ, &sNSQ_copy2, sizeof( silk_nsq_state ) );\n                    psEnc->sShape.LastGainIndex = LastGainIndex_copy2;\n                }\n                break;\n            }\n\n            if( nBits > maxBits ) {\n                if( found_lower == 0 && iter >= 2 ) {\n                    /* Adjust the quantizer's rate/distortion tradeoff and discard previous \"upper\" results */\n                    sEncCtrl.Lambda_Q10 = silk_ADD_RSHIFT32( sEncCtrl.Lambda_Q10, sEncCtrl.Lambda_Q10, 1 );\n                    found_upper = 0;\n                    gainsID_upper = -1;\n                } else {\n                    found_upper = 1;\n                    nBits_upper = nBits;\n                    gainMult_upper = gainMult_Q8;\n                    gainsID_upper = gainsID;\n                }\n            } else if( nBits < maxBits - 5 ) {\n                found_lower = 1;\n                nBits_lower = nBits;\n                gainMult_lower = gainMult_Q8;\n                if( gainsID != gainsID_lower ) {\n                    gainsID_lower = gainsID;\n                    /* Copy part of the output state */\n                    silk_memcpy( &sRangeEnc_copy2, psRangeEnc, sizeof( ec_enc ) );\n                    silk_assert( psRangeEnc->offs <= 1275 );\n                    silk_memcpy( ec_buf_copy, psRangeEnc->buf, psRangeEnc->offs );\n                    silk_memcpy( &sNSQ_copy2, &psEnc->sCmn.sNSQ, sizeof( silk_nsq_state ) );\n                    LastGainIndex_copy2 = psEnc->sShape.LastGainIndex;\n                }\n            } else {\n                /* Within 5 bits of budget: close enough */\n                break;\n            }\n\n            if( ( found_lower & found_upper ) == 0 ) {\n                /* Adjust gain according to high-rate rate/distortion curve */\n                opus_int32 gain_factor_Q16;\n                gain_factor_Q16 = silk_log2lin( silk_LSHIFT( nBits - maxBits, 7 ) / psEnc->sCmn.frame_length + SILK_FIX_CONST( 16, 7 ) );\n                gain_factor_Q16 = silk_min_32( gain_factor_Q16, SILK_FIX_CONST( 2, 16 ) );\n                if( nBits > maxBits ) {\n                    gain_factor_Q16 = silk_max_32( gain_factor_Q16, SILK_FIX_CONST( 1.3, 16 ) );\n                }\n                gainMult_Q8 = silk_SMULWB( gain_factor_Q16, gainMult_Q8 );\n            } else {\n                /* Adjust gain by interpolating */\n                gainMult_Q8 = gainMult_lower + silk_DIV32_16( silk_MUL( gainMult_upper - gainMult_lower, maxBits - nBits_lower ), nBits_upper - nBits_lower );\n                /* New gain multplier must be between 25% and 75% of old range (note that gainMult_upper < gainMult_lower) */\n                if( gainMult_Q8 > silk_ADD_RSHIFT32( gainMult_lower, gainMult_upper - gainMult_lower, 2 ) ) {\n                    gainMult_Q8 = silk_ADD_RSHIFT32( gainMult_lower, gainMult_upper - gainMult_lower, 2 );\n                } else\n                if( gainMult_Q8 < silk_SUB_RSHIFT32( gainMult_upper, gainMult_upper - gainMult_lower, 2 ) ) {\n                    gainMult_Q8 = silk_SUB_RSHIFT32( gainMult_upper, gainMult_upper - gainMult_lower, 2 );\n                }\n            }\n\n            for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) {\n                sEncCtrl.Gains_Q16[ i ] = silk_LSHIFT_SAT32( silk_SMULWB( sEncCtrl.GainsUnq_Q16[ i ], gainMult_Q8 ), 8 );\n            }\n \n            /* Quantize gains */\n            psEnc->sShape.LastGainIndex = sEncCtrl.lastGainIndexPrev;\n            silk_gains_quant( psEnc->sCmn.indices.GainsIndices, sEncCtrl.Gains_Q16,\n                  &psEnc->sShape.LastGainIndex, condCoding == CODE_CONDITIONALLY, psEnc->sCmn.nb_subfr );\n\n            /* Unique identifier of gains vector */\n            gainsID = silk_gains_ID( psEnc->sCmn.indices.GainsIndices, psEnc->sCmn.nb_subfr );\n        }\n    }\n\n    /* Update input buffer */\n    silk_memmove( psEnc->x_buf, &psEnc->x_buf[ psEnc->sCmn.frame_length ],\n        ( psEnc->sCmn.ltp_mem_length + LA_SHAPE_MS * psEnc->sCmn.fs_kHz ) * sizeof( opus_int16 ) );\n\n    /* Exit without entropy coding */\n    if( psEnc->sCmn.prefillFlag ) {\n        /* No payload */\n        *pnBytesOut = 0;\n        RESTORE_STACK;\n        return ret;\n    }\n\n    /* Parameters needed for next frame */\n    psEnc->sCmn.prevLag        = sEncCtrl.pitchL[ psEnc->sCmn.nb_subfr - 1 ];\n    psEnc->sCmn.prevSignalType = psEnc->sCmn.indices.signalType;\n\n    /****************************************/\n    /* Finalize payload                     */\n    /****************************************/\n    psEnc->sCmn.first_frame_after_reset = 0;\n    /* Payload size */\n    *pnBytesOut = silk_RSHIFT( ec_tell( psRangeEnc ) + 7, 3 );\n\n    RESTORE_STACK;\n    return ret;\n}\n\n/* Low-Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode excitation at lower bitrate  */\nstatic OPUS_INLINE void silk_LBRR_encode_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  Pointer to Silk FIX encoder state                                           */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  Pointer to Silk FIX encoder control struct                                  */\n    const opus_int32                xfw_Q3[],                               /* I    Input signal                                                                */\n    opus_int                        condCoding                              /* I    The type of conditional coding used so far for this frame                   */\n)\n{\n    opus_int32   TempGains_Q16[ MAX_NB_SUBFR ];\n    SideInfoIndices *psIndices_LBRR = &psEnc->sCmn.indices_LBRR[ psEnc->sCmn.nFramesEncoded ];\n    silk_nsq_state sNSQ_LBRR;\n\n    /*******************************************/\n    /* Control use of inband LBRR              */\n    /*******************************************/\n    if( psEnc->sCmn.LBRR_enabled && psEnc->sCmn.speech_activity_Q8 > SILK_FIX_CONST( LBRR_SPEECH_ACTIVITY_THRES, 8 ) ) {\n        psEnc->sCmn.LBRR_flags[ psEnc->sCmn.nFramesEncoded ] = 1;\n\n        /* Copy noise shaping quantizer state and quantization indices from regular encoding */\n        silk_memcpy( &sNSQ_LBRR, &psEnc->sCmn.sNSQ, sizeof( silk_nsq_state ) );\n        silk_memcpy( psIndices_LBRR, &psEnc->sCmn.indices, sizeof( SideInfoIndices ) );\n\n        /* Save original gains */\n        silk_memcpy( TempGains_Q16, psEncCtrl->Gains_Q16, psEnc->sCmn.nb_subfr * sizeof( opus_int32 ) );\n\n        if( psEnc->sCmn.nFramesEncoded == 0 || psEnc->sCmn.LBRR_flags[ psEnc->sCmn.nFramesEncoded - 1 ] == 0 ) {\n            /* First frame in packet or previous frame not LBRR coded */\n            psEnc->sCmn.LBRRprevLastGainIndex = psEnc->sShape.LastGainIndex;\n\n            /* Increase Gains to get target LBRR rate */\n            psIndices_LBRR->GainsIndices[ 0 ] = psIndices_LBRR->GainsIndices[ 0 ] + psEnc->sCmn.LBRR_GainIncreases;\n            psIndices_LBRR->GainsIndices[ 0 ] = silk_min_int( psIndices_LBRR->GainsIndices[ 0 ], N_LEVELS_QGAIN - 1 );\n        }\n\n        /* Decode to get gains in sync with decoder         */\n        /* Overwrite unquantized gains with quantized gains */\n        silk_gains_dequant( psEncCtrl->Gains_Q16, psIndices_LBRR->GainsIndices,\n            &psEnc->sCmn.LBRRprevLastGainIndex, condCoding == CODE_CONDITIONALLY, psEnc->sCmn.nb_subfr );\n\n        /*****************************************/\n        /* Noise shaping quantization            */\n        /*****************************************/\n        if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) {\n            silk_NSQ_del_dec( &psEnc->sCmn, &sNSQ_LBRR, psIndices_LBRR, xfw_Q3,\n                psEnc->sCmn.pulses_LBRR[ psEnc->sCmn.nFramesEncoded ], psEncCtrl->PredCoef_Q12[ 0 ], psEncCtrl->LTPCoef_Q14,\n                psEncCtrl->AR2_Q13, psEncCtrl->HarmShapeGain_Q14, psEncCtrl->Tilt_Q14, psEncCtrl->LF_shp_Q14,\n                psEncCtrl->Gains_Q16, psEncCtrl->pitchL, psEncCtrl->Lambda_Q10, psEncCtrl->LTP_scale_Q14 );\n        } else {\n            silk_NSQ( &psEnc->sCmn, &sNSQ_LBRR, psIndices_LBRR, xfw_Q3,\n                psEnc->sCmn.pulses_LBRR[ psEnc->sCmn.nFramesEncoded ], psEncCtrl->PredCoef_Q12[ 0 ], psEncCtrl->LTPCoef_Q14,\n                psEncCtrl->AR2_Q13, psEncCtrl->HarmShapeGain_Q14, psEncCtrl->Tilt_Q14, psEncCtrl->LF_shp_Q14,\n                psEncCtrl->Gains_Q16, psEncCtrl->pitchL, psEncCtrl->Lambda_Q10, psEncCtrl->LTP_scale_Q14 );\n        }\n\n        /* Restore original gains */\n        silk_memcpy( psEncCtrl->Gains_Q16, TempGains_Q16, psEnc->sCmn.nb_subfr * sizeof( opus_int32 ) );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/find_LPC_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n#include \"stack_alloc.h\"\n#include \"tuning_parameters.h\"\n\n/* Finds LPC vector from correlations, and converts to NLSF */\nvoid silk_find_LPC_FIX(\n    silk_encoder_state              *psEncC,                                /* I/O  Encoder state                                                               */\n    opus_int16                      NLSF_Q15[],                             /* O    NLSFs                                                                       */\n    const opus_int16                x[],                                    /* I    Input signal                                                                */\n    const opus_int32                minInvGain_Q30                          /* I    Inverse of max prediction gain                                              */\n)\n{\n    opus_int     k, subfr_length;\n    opus_int32   a_Q16[ MAX_LPC_ORDER ];\n    opus_int     isInterpLower, shift;\n    opus_int32   res_nrg0, res_nrg1;\n    opus_int     rshift0, rshift1;\n\n    /* Used only for LSF interpolation */\n    opus_int32   a_tmp_Q16[ MAX_LPC_ORDER ], res_nrg_interp, res_nrg, res_tmp_nrg;\n    opus_int     res_nrg_interp_Q, res_nrg_Q, res_tmp_nrg_Q;\n    opus_int16   a_tmp_Q12[ MAX_LPC_ORDER ];\n    opus_int16   NLSF0_Q15[ MAX_LPC_ORDER ];\n    SAVE_STACK;\n\n    subfr_length = psEncC->subfr_length + psEncC->predictLPCOrder;\n\n    /* Default: no interpolation */\n    psEncC->indices.NLSFInterpCoef_Q2 = 4;\n\n    /* Burg AR analysis for the full frame */\n    silk_burg_modified( &res_nrg, &res_nrg_Q, a_Q16, x, minInvGain_Q30, subfr_length, psEncC->nb_subfr, psEncC->predictLPCOrder, psEncC->arch );\n\n    if( psEncC->useInterpolatedNLSFs && !psEncC->first_frame_after_reset && psEncC->nb_subfr == MAX_NB_SUBFR ) {\n        VARDECL( opus_int16, LPC_res );\n\n        /* Optimal solution for last 10 ms */\n        silk_burg_modified( &res_tmp_nrg, &res_tmp_nrg_Q, a_tmp_Q16, x + 2 * subfr_length, minInvGain_Q30, subfr_length, 2, psEncC->predictLPCOrder, psEncC->arch );\n\n        /* subtract residual energy here, as that's easier than adding it to the    */\n        /* residual energy of the first 10 ms in each iteration of the search below */\n        shift = res_tmp_nrg_Q - res_nrg_Q;\n        if( shift >= 0 ) {\n            if( shift < 32 ) {\n                res_nrg = res_nrg - silk_RSHIFT( res_tmp_nrg, shift );\n            }\n        } else {\n            silk_assert( shift > -32 );\n            res_nrg   = silk_RSHIFT( res_nrg, -shift ) - res_tmp_nrg;\n            res_nrg_Q = res_tmp_nrg_Q;\n        }\n\n        /* Convert to NLSFs */\n        silk_A2NLSF( NLSF_Q15, a_tmp_Q16, psEncC->predictLPCOrder );\n\n        ALLOC( LPC_res, 2 * subfr_length, opus_int16 );\n\n        /* Search over interpolation indices to find the one with lowest residual energy */\n        for( k = 3; k >= 0; k-- ) {\n            /* Interpolate NLSFs for first half */\n            silk_interpolate( NLSF0_Q15, psEncC->prev_NLSFq_Q15, NLSF_Q15, k, psEncC->predictLPCOrder );\n\n            /* Convert to LPC for residual energy evaluation */\n            silk_NLSF2A( a_tmp_Q12, NLSF0_Q15, psEncC->predictLPCOrder );\n\n            /* Calculate residual energy with NLSF interpolation */\n            silk_LPC_analysis_filter( LPC_res, x, a_tmp_Q12, 2 * subfr_length, psEncC->predictLPCOrder );\n\n            silk_sum_sqr_shift( &res_nrg0, &rshift0, LPC_res + psEncC->predictLPCOrder,                subfr_length - psEncC->predictLPCOrder );\n            silk_sum_sqr_shift( &res_nrg1, &rshift1, LPC_res + psEncC->predictLPCOrder + subfr_length, subfr_length - psEncC->predictLPCOrder );\n\n            /* Add subframe energies from first half frame */\n            shift = rshift0 - rshift1;\n            if( shift >= 0 ) {\n                res_nrg1         = silk_RSHIFT( res_nrg1, shift );\n                res_nrg_interp_Q = -rshift0;\n            } else {\n                res_nrg0         = silk_RSHIFT( res_nrg0, -shift );\n                res_nrg_interp_Q = -rshift1;\n            }\n            res_nrg_interp = silk_ADD32( res_nrg0, res_nrg1 );\n\n            /* Compare with first half energy without NLSF interpolation, or best interpolated value so far */\n            shift = res_nrg_interp_Q - res_nrg_Q;\n            if( shift >= 0 ) {\n                if( silk_RSHIFT( res_nrg_interp, shift ) < res_nrg ) {\n                    isInterpLower = silk_TRUE;\n                } else {\n                    isInterpLower = silk_FALSE;\n                }\n            } else {\n                if( -shift < 32 ) {\n                    if( res_nrg_interp < silk_RSHIFT( res_nrg, -shift ) ) {\n                        isInterpLower = silk_TRUE;\n                    } else {\n                        isInterpLower = silk_FALSE;\n                    }\n                } else {\n                    isInterpLower = silk_FALSE;\n                }\n            }\n\n            /* Determine whether current interpolated NLSFs are best so far */\n            if( isInterpLower == silk_TRUE ) {\n                /* Interpolation has lower residual energy */\n                res_nrg   = res_nrg_interp;\n                res_nrg_Q = res_nrg_interp_Q;\n                psEncC->indices.NLSFInterpCoef_Q2 = (opus_int8)k;\n            }\n        }\n    }\n\n    if( psEncC->indices.NLSFInterpCoef_Q2 == 4 ) {\n        /* NLSF interpolation is currently inactive, calculate NLSFs from full frame AR coefficients */\n        silk_A2NLSF( NLSF_Q15, a_Q16, psEncC->predictLPCOrder );\n    }\n\n    silk_assert( psEncC->indices.NLSFInterpCoef_Q2 == 4 || ( psEncC->useInterpolatedNLSFs && !psEncC->first_frame_after_reset && psEncC->nb_subfr == MAX_NB_SUBFR ) );\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/find_LTP_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n#include \"tuning_parameters.h\"\n\n/* Head room for correlations */\n#define LTP_CORRS_HEAD_ROOM                             2\n\nvoid silk_fit_LTP(\n    opus_int32 LTP_coefs_Q16[ LTP_ORDER ],\n    opus_int16 LTP_coefs_Q14[ LTP_ORDER ]\n);\n\nvoid silk_find_LTP_FIX(\n    opus_int16                      b_Q14[ MAX_NB_SUBFR * LTP_ORDER ],      /* O    LTP coefs                                                                   */\n    opus_int32                      WLTP[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* O    Weight for LTP quantization                                           */\n    opus_int                        *LTPredCodGain_Q7,                      /* O    LTP coding gain                                                             */\n    const opus_int16                r_lpc[],                                /* I    residual signal after LPC signal + state for first 10 ms                    */\n    const opus_int                  lag[ MAX_NB_SUBFR ],                    /* I    LTP lags                                                                    */\n    const opus_int32                Wght_Q15[ MAX_NB_SUBFR ],               /* I    weights                                                                     */\n    const opus_int                  subfr_length,                           /* I    subframe length                                                             */\n    const opus_int                  nb_subfr,                               /* I    number of subframes                                                         */\n    const opus_int                  mem_offset,                             /* I    number of samples in LTP memory                                             */\n    opus_int                        corr_rshifts[ MAX_NB_SUBFR ]            /* O    right shifts applied to correlations                                        */\n)\n{\n    opus_int   i, k, lshift;\n    const opus_int16 *r_ptr, *lag_ptr;\n    opus_int16 *b_Q14_ptr;\n\n    opus_int32 regu;\n    opus_int32 *WLTP_ptr;\n    opus_int32 b_Q16[ LTP_ORDER ], delta_b_Q14[ LTP_ORDER ], d_Q14[ MAX_NB_SUBFR ], nrg[ MAX_NB_SUBFR ], g_Q26;\n    opus_int32 w[ MAX_NB_SUBFR ], WLTP_max, max_abs_d_Q14, max_w_bits;\n\n    opus_int32 temp32, denom32;\n    opus_int   extra_shifts;\n    opus_int   rr_shifts, maxRshifts, maxRshifts_wxtra, LZs;\n    opus_int32 LPC_res_nrg, LPC_LTP_res_nrg, div_Q16;\n    opus_int32 Rr[ LTP_ORDER ], rr[ MAX_NB_SUBFR ];\n    opus_int32 wd, m_Q12;\n\n    b_Q14_ptr = b_Q14;\n    WLTP_ptr  = WLTP;\n    r_ptr     = &r_lpc[ mem_offset ];\n    for( k = 0; k < nb_subfr; k++ ) {\n        lag_ptr = r_ptr - ( lag[ k ] + LTP_ORDER / 2 );\n\n        silk_sum_sqr_shift( &rr[ k ], &rr_shifts, r_ptr, subfr_length ); /* rr[ k ] in Q( -rr_shifts ) */\n\n        /* Assure headroom */\n        LZs = silk_CLZ32( rr[k] );\n        if( LZs < LTP_CORRS_HEAD_ROOM ) {\n            rr[ k ] = silk_RSHIFT_ROUND( rr[ k ], LTP_CORRS_HEAD_ROOM - LZs );\n            rr_shifts += ( LTP_CORRS_HEAD_ROOM - LZs );\n        }\n        corr_rshifts[ k ] = rr_shifts;\n        silk_corrMatrix_FIX( lag_ptr, subfr_length, LTP_ORDER, LTP_CORRS_HEAD_ROOM, WLTP_ptr, &corr_rshifts[ k ] );  /* WLTP_fix_ptr in Q( -corr_rshifts[ k ] ) */\n\n        /* The correlation vector always has lower max abs value than rr and/or RR so head room is assured */\n        silk_corrVector_FIX( lag_ptr, r_ptr, subfr_length, LTP_ORDER, Rr, corr_rshifts[ k ] );  /* Rr_fix_ptr   in Q( -corr_rshifts[ k ] ) */\n        if( corr_rshifts[ k ] > rr_shifts ) {\n            rr[ k ] = silk_RSHIFT( rr[ k ], corr_rshifts[ k ] - rr_shifts ); /* rr[ k ] in Q( -corr_rshifts[ k ] ) */\n        }\n        silk_assert( rr[ k ] >= 0 );\n\n        regu = 1;\n        regu = silk_SMLAWB( regu, rr[ k ], SILK_FIX_CONST( LTP_DAMPING/3, 16 ) );\n        regu = silk_SMLAWB( regu, matrix_ptr( WLTP_ptr, 0, 0, LTP_ORDER ), SILK_FIX_CONST( LTP_DAMPING/3, 16 ) );\n        regu = silk_SMLAWB( regu, matrix_ptr( WLTP_ptr, LTP_ORDER-1, LTP_ORDER-1, LTP_ORDER ), SILK_FIX_CONST( LTP_DAMPING/3, 16 ) );\n        silk_regularize_correlations_FIX( WLTP_ptr, &rr[k], regu, LTP_ORDER );\n\n        silk_solve_LDL_FIX( WLTP_ptr, LTP_ORDER, Rr, b_Q16 ); /* WLTP_fix_ptr and Rr_fix_ptr both in Q(-corr_rshifts[k]) */\n\n        /* Limit and store in Q14 */\n        silk_fit_LTP( b_Q16, b_Q14_ptr );\n\n        /* Calculate residual energy */\n        nrg[ k ] = silk_residual_energy16_covar_FIX( b_Q14_ptr, WLTP_ptr, Rr, rr[ k ], LTP_ORDER, 14 ); /* nrg_fix in Q( -corr_rshifts[ k ] ) */\n\n        /* temp = Wght[ k ] / ( nrg[ k ] * Wght[ k ] + 0.01f * subfr_length ); */\n        extra_shifts = silk_min_int( corr_rshifts[ k ], LTP_CORRS_HEAD_ROOM );\n        denom32 = silk_LSHIFT_SAT32( silk_SMULWB( nrg[ k ], Wght_Q15[ k ] ), 1 + extra_shifts ) + /* Q( -corr_rshifts[ k ] + extra_shifts ) */\n            silk_RSHIFT( silk_SMULWB( (opus_int32)subfr_length, 655 ), corr_rshifts[ k ] - extra_shifts );    /* Q( -corr_rshifts[ k ] + extra_shifts ) */\n        denom32 = silk_max( denom32, 1 );\n        silk_assert( ((opus_int64)Wght_Q15[ k ] << 16 ) < silk_int32_MAX );                       /* Wght always < 0.5 in Q0 */\n        temp32 = silk_DIV32( silk_LSHIFT( (opus_int32)Wght_Q15[ k ], 16 ), denom32 );             /* Q( 15 + 16 + corr_rshifts[k] - extra_shifts ) */\n        temp32 = silk_RSHIFT( temp32, 31 + corr_rshifts[ k ] - extra_shifts - 26 );               /* Q26 */\n\n        /* Limit temp such that the below scaling never wraps around */\n        WLTP_max = 0;\n        for( i = 0; i < LTP_ORDER * LTP_ORDER; i++ ) {\n            WLTP_max = silk_max( WLTP_ptr[ i ], WLTP_max );\n        }\n        lshift = silk_CLZ32( WLTP_max ) - 1 - 3; /* keep 3 bits free for vq_nearest_neighbor_fix */\n        silk_assert( 26 - 18 + lshift >= 0 );\n        if( 26 - 18 + lshift < 31 ) {\n            temp32 = silk_min_32( temp32, silk_LSHIFT( (opus_int32)1, 26 - 18 + lshift ) );\n        }\n\n        silk_scale_vector32_Q26_lshift_18( WLTP_ptr, temp32, LTP_ORDER * LTP_ORDER ); /* WLTP_ptr in Q( 18 - corr_rshifts[ k ] ) */\n\n        w[ k ] = matrix_ptr( WLTP_ptr, LTP_ORDER/2, LTP_ORDER/2, LTP_ORDER ); /* w in Q( 18 - corr_rshifts[ k ] ) */\n        silk_assert( w[k] >= 0 );\n\n        r_ptr     += subfr_length;\n        b_Q14_ptr += LTP_ORDER;\n        WLTP_ptr  += LTP_ORDER * LTP_ORDER;\n    }\n\n    maxRshifts = 0;\n    for( k = 0; k < nb_subfr; k++ ) {\n        maxRshifts = silk_max_int( corr_rshifts[ k ], maxRshifts );\n    }\n\n    /* Compute LTP coding gain */\n    if( LTPredCodGain_Q7 != NULL ) {\n        LPC_LTP_res_nrg = 0;\n        LPC_res_nrg     = 0;\n        silk_assert( LTP_CORRS_HEAD_ROOM >= 2 ); /* Check that no overflow will happen when adding */\n        for( k = 0; k < nb_subfr; k++ ) {\n            LPC_res_nrg     = silk_ADD32( LPC_res_nrg,     silk_RSHIFT( silk_ADD32( silk_SMULWB(  rr[ k ], Wght_Q15[ k ] ), 1 ), 1 + ( maxRshifts - corr_rshifts[ k ] ) ) ); /* Q( -maxRshifts ) */\n            LPC_LTP_res_nrg = silk_ADD32( LPC_LTP_res_nrg, silk_RSHIFT( silk_ADD32( silk_SMULWB( nrg[ k ], Wght_Q15[ k ] ), 1 ), 1 + ( maxRshifts - corr_rshifts[ k ] ) ) ); /* Q( -maxRshifts ) */\n        }\n        LPC_LTP_res_nrg = silk_max( LPC_LTP_res_nrg, 1 ); /* avoid division by zero */\n\n        div_Q16 = silk_DIV32_varQ( LPC_res_nrg, LPC_LTP_res_nrg, 16 );\n        *LTPredCodGain_Q7 = ( opus_int )silk_SMULBB( 3, silk_lin2log( div_Q16 ) - ( 16 << 7 ) );\n\n        silk_assert( *LTPredCodGain_Q7 == ( opus_int )silk_SAT16( silk_MUL( 3, silk_lin2log( div_Q16 ) - ( 16 << 7 ) ) ) );\n    }\n\n    /* smoothing */\n    /* d = sum( B, 1 ); */\n    b_Q14_ptr = b_Q14;\n    for( k = 0; k < nb_subfr; k++ ) {\n        d_Q14[ k ] = 0;\n        for( i = 0; i < LTP_ORDER; i++ ) {\n            d_Q14[ k ] += b_Q14_ptr[ i ];\n        }\n        b_Q14_ptr += LTP_ORDER;\n    }\n\n    /* m = ( w * d' ) / ( sum( w ) + 1e-3 ); */\n\n    /* Find maximum absolute value of d_Q14 and the bits used by w in Q0 */\n    max_abs_d_Q14 = 0;\n    max_w_bits    = 0;\n    for( k = 0; k < nb_subfr; k++ ) {\n        max_abs_d_Q14 = silk_max_32( max_abs_d_Q14, silk_abs( d_Q14[ k ] ) );\n        /* w[ k ] is in Q( 18 - corr_rshifts[ k ] ) */\n        /* Find bits needed in Q( 18 - maxRshifts ) */\n        max_w_bits = silk_max_32( max_w_bits, 32 - silk_CLZ32( w[ k ] ) + corr_rshifts[ k ] - maxRshifts );\n    }\n\n    /* max_abs_d_Q14 = (5 << 15); worst case, i.e. LTP_ORDER * -silk_int16_MIN */\n    silk_assert( max_abs_d_Q14 <= ( 5 << 15 ) );\n\n    /* How many bits is needed for w*d' in Q( 18 - maxRshifts ) in the worst case, of all d_Q14's being equal to max_abs_d_Q14 */\n    extra_shifts = max_w_bits + 32 - silk_CLZ32( max_abs_d_Q14 ) - 14;\n\n    /* Subtract what we got available; bits in output var plus maxRshifts */\n    extra_shifts -= ( 32 - 1 - 2 + maxRshifts ); /* Keep sign bit free as well as 2 bits for accumulation */\n    extra_shifts = silk_max_int( extra_shifts, 0 );\n\n    maxRshifts_wxtra = maxRshifts + extra_shifts;\n\n    temp32 = silk_RSHIFT( 262, maxRshifts + extra_shifts ) + 1; /* 1e-3f in Q( 18 - (maxRshifts + extra_shifts) ) */\n    wd = 0;\n    for( k = 0; k < nb_subfr; k++ ) {\n        /* w has at least 2 bits of headroom so no overflow should happen */\n        temp32 = silk_ADD32( temp32,                     silk_RSHIFT( w[ k ], maxRshifts_wxtra - corr_rshifts[ k ] ) );                      /* Q( 18 - maxRshifts_wxtra ) */\n        wd     = silk_ADD32( wd, silk_LSHIFT( silk_SMULWW( silk_RSHIFT( w[ k ], maxRshifts_wxtra - corr_rshifts[ k ] ), d_Q14[ k ] ), 2 ) ); /* Q( 18 - maxRshifts_wxtra ) */\n    }\n    m_Q12 = silk_DIV32_varQ( wd, temp32, 12 );\n\n    b_Q14_ptr = b_Q14;\n    for( k = 0; k < nb_subfr; k++ ) {\n        /* w_fix[ k ] from Q( 18 - corr_rshifts[ k ] ) to Q( 16 ) */\n        if( 2 - corr_rshifts[k] > 0 ) {\n            temp32 = silk_RSHIFT( w[ k ], 2 - corr_rshifts[ k ] );\n        } else {\n            temp32 = silk_LSHIFT_SAT32( w[ k ], corr_rshifts[ k ] - 2 );\n        }\n\n        g_Q26 = silk_MUL(\n            silk_DIV32(\n                SILK_FIX_CONST( LTP_SMOOTHING, 26 ),\n                silk_RSHIFT( SILK_FIX_CONST( LTP_SMOOTHING, 26 ), 10 ) + temp32 ),                          /* Q10 */\n            silk_LSHIFT_SAT32( silk_SUB_SAT32( (opus_int32)m_Q12, silk_RSHIFT( d_Q14[ k ], 2 ) ), 4 ) );    /* Q16 */\n\n        temp32 = 0;\n        for( i = 0; i < LTP_ORDER; i++ ) {\n            delta_b_Q14[ i ] = silk_max_16( b_Q14_ptr[ i ], 1638 );     /* 1638_Q14 = 0.1_Q0 */\n            temp32 += delta_b_Q14[ i ];                                 /* Q14 */\n        }\n        temp32 = silk_DIV32( g_Q26, temp32 );                           /* Q14 -> Q12 */\n        for( i = 0; i < LTP_ORDER; i++ ) {\n            b_Q14_ptr[ i ] = silk_LIMIT_32( (opus_int32)b_Q14_ptr[ i ] + silk_SMULWB( silk_LSHIFT_SAT32( temp32, 4 ), delta_b_Q14[ i ] ), -16000, 28000 );\n        }\n        b_Q14_ptr += LTP_ORDER;\n    }\n}\n\nvoid silk_fit_LTP(\n    opus_int32 LTP_coefs_Q16[ LTP_ORDER ],\n    opus_int16 LTP_coefs_Q14[ LTP_ORDER ]\n)\n{\n    opus_int i;\n\n    for( i = 0; i < LTP_ORDER; i++ ) {\n        LTP_coefs_Q14[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( LTP_coefs_Q16[ i ], 2 ) );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/find_pitch_lags_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n#include \"stack_alloc.h\"\n#include \"tuning_parameters.h\"\n\n/* Find pitch lags */\nvoid silk_find_pitch_lags_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  encoder state                                                               */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  encoder control                                                             */\n    opus_int16                      res[],                                  /* O    residual                                                                    */\n    const opus_int16                x[],                                    /* I    Speech signal                                                               */\n    int                             arch                                    /* I    Run-time architecture                                                       */\n)\n{\n    opus_int   buf_len, i, scale;\n    opus_int32 thrhld_Q13, res_nrg;\n    const opus_int16 *x_buf, *x_buf_ptr;\n    VARDECL( opus_int16, Wsig );\n    opus_int16 *Wsig_ptr;\n    opus_int32 auto_corr[ MAX_FIND_PITCH_LPC_ORDER + 1 ];\n    opus_int16 rc_Q15[    MAX_FIND_PITCH_LPC_ORDER ];\n    opus_int32 A_Q24[     MAX_FIND_PITCH_LPC_ORDER ];\n    opus_int16 A_Q12[     MAX_FIND_PITCH_LPC_ORDER ];\n    SAVE_STACK;\n\n    /******************************************/\n    /* Set up buffer lengths etc based on Fs  */\n    /******************************************/\n    buf_len = psEnc->sCmn.la_pitch + psEnc->sCmn.frame_length + psEnc->sCmn.ltp_mem_length;\n\n    /* Safety check */\n    silk_assert( buf_len >= psEnc->sCmn.pitch_LPC_win_length );\n\n    x_buf = x - psEnc->sCmn.ltp_mem_length;\n\n    /*************************************/\n    /* Estimate LPC AR coefficients      */\n    /*************************************/\n\n    /* Calculate windowed signal */\n\n    ALLOC( Wsig, psEnc->sCmn.pitch_LPC_win_length, opus_int16 );\n\n    /* First LA_LTP samples */\n    x_buf_ptr = x_buf + buf_len - psEnc->sCmn.pitch_LPC_win_length;\n    Wsig_ptr  = Wsig;\n    silk_apply_sine_window( Wsig_ptr, x_buf_ptr, 1, psEnc->sCmn.la_pitch );\n\n    /* Middle un - windowed samples */\n    Wsig_ptr  += psEnc->sCmn.la_pitch;\n    x_buf_ptr += psEnc->sCmn.la_pitch;\n    silk_memcpy( Wsig_ptr, x_buf_ptr, ( psEnc->sCmn.pitch_LPC_win_length - silk_LSHIFT( psEnc->sCmn.la_pitch, 1 ) ) * sizeof( opus_int16 ) );\n\n    /* Last LA_LTP samples */\n    Wsig_ptr  += psEnc->sCmn.pitch_LPC_win_length - silk_LSHIFT( psEnc->sCmn.la_pitch, 1 );\n    x_buf_ptr += psEnc->sCmn.pitch_LPC_win_length - silk_LSHIFT( psEnc->sCmn.la_pitch, 1 );\n    silk_apply_sine_window( Wsig_ptr, x_buf_ptr, 2, psEnc->sCmn.la_pitch );\n\n    /* Calculate autocorrelation sequence */\n    silk_autocorr( auto_corr, &scale, Wsig, psEnc->sCmn.pitch_LPC_win_length, psEnc->sCmn.pitchEstimationLPCOrder + 1, arch );\n\n    /* Add white noise, as fraction of energy */\n    auto_corr[ 0 ] = silk_SMLAWB( auto_corr[ 0 ], auto_corr[ 0 ], SILK_FIX_CONST( FIND_PITCH_WHITE_NOISE_FRACTION, 16 ) ) + 1;\n\n    /* Calculate the reflection coefficients using schur */\n    res_nrg = silk_schur( rc_Q15, auto_corr, psEnc->sCmn.pitchEstimationLPCOrder );\n\n    /* Prediction gain */\n    psEncCtrl->predGain_Q16 = silk_DIV32_varQ( auto_corr[ 0 ], silk_max_int( res_nrg, 1 ), 16 );\n\n    /* Convert reflection coefficients to prediction coefficients */\n    silk_k2a( A_Q24, rc_Q15, psEnc->sCmn.pitchEstimationLPCOrder );\n\n    /* Convert From 32 bit Q24 to 16 bit Q12 coefs */\n    for( i = 0; i < psEnc->sCmn.pitchEstimationLPCOrder; i++ ) {\n        A_Q12[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT( A_Q24[ i ], 12 ) );\n    }\n\n    /* Do BWE */\n    silk_bwexpander( A_Q12, psEnc->sCmn.pitchEstimationLPCOrder, SILK_FIX_CONST( FIND_PITCH_BANDWIDTH_EXPANSION, 16 ) );\n\n    /*****************************************/\n    /* LPC analysis filtering                */\n    /*****************************************/\n    silk_LPC_analysis_filter( res, x_buf, A_Q12, buf_len, psEnc->sCmn.pitchEstimationLPCOrder );\n\n    if( psEnc->sCmn.indices.signalType != TYPE_NO_VOICE_ACTIVITY && psEnc->sCmn.first_frame_after_reset == 0 ) {\n        /* Threshold for pitch estimator */\n        thrhld_Q13 = SILK_FIX_CONST( 0.6, 13 );\n        thrhld_Q13 = silk_SMLABB( thrhld_Q13, SILK_FIX_CONST( -0.004, 13 ), psEnc->sCmn.pitchEstimationLPCOrder );\n        thrhld_Q13 = silk_SMLAWB( thrhld_Q13, SILK_FIX_CONST( -0.1,   21  ), psEnc->sCmn.speech_activity_Q8 );\n        thrhld_Q13 = silk_SMLABB( thrhld_Q13, SILK_FIX_CONST( -0.15,  13 ), silk_RSHIFT( psEnc->sCmn.prevSignalType, 1 ) );\n        thrhld_Q13 = silk_SMLAWB( thrhld_Q13, SILK_FIX_CONST( -0.1,   14 ), psEnc->sCmn.input_tilt_Q15 );\n        thrhld_Q13 = silk_SAT16(  thrhld_Q13 );\n\n        /*****************************************/\n        /* Call pitch estimator                  */\n        /*****************************************/\n        if( silk_pitch_analysis_core( res, psEncCtrl->pitchL, &psEnc->sCmn.indices.lagIndex, &psEnc->sCmn.indices.contourIndex,\n                &psEnc->LTPCorr_Q15, psEnc->sCmn.prevLag, psEnc->sCmn.pitchEstimationThreshold_Q16,\n                (opus_int)thrhld_Q13, psEnc->sCmn.fs_kHz, psEnc->sCmn.pitchEstimationComplexity, psEnc->sCmn.nb_subfr,\n                psEnc->sCmn.arch) == 0 )\n        {\n            psEnc->sCmn.indices.signalType = TYPE_VOICED;\n        } else {\n            psEnc->sCmn.indices.signalType = TYPE_UNVOICED;\n        }\n    } else {\n        silk_memset( psEncCtrl->pitchL, 0, sizeof( psEncCtrl->pitchL ) );\n        psEnc->sCmn.indices.lagIndex = 0;\n        psEnc->sCmn.indices.contourIndex = 0;\n        psEnc->LTPCorr_Q15 = 0;\n    }\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/find_pred_coefs_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n#include \"stack_alloc.h\"\n\nvoid silk_find_pred_coefs_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  encoder state                                                               */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  encoder control                                                             */\n    const opus_int16                res_pitch[],                            /* I    Residual from pitch analysis                                                */\n    const opus_int16                x[],                                    /* I    Speech signal                                                               */\n    opus_int                        condCoding                              /* I    The type of conditional coding to use                                       */\n)\n{\n    opus_int         i;\n    opus_int32       invGains_Q16[ MAX_NB_SUBFR ], local_gains[ MAX_NB_SUBFR ], Wght_Q15[ MAX_NB_SUBFR ];\n    opus_int16       NLSF_Q15[ MAX_LPC_ORDER ];\n    const opus_int16 *x_ptr;\n    opus_int16       *x_pre_ptr;\n    VARDECL( opus_int16, LPC_in_pre );\n    opus_int32       tmp, min_gain_Q16, minInvGain_Q30;\n    opus_int         LTP_corrs_rshift[ MAX_NB_SUBFR ];\n    SAVE_STACK;\n\n    /* weighting for weighted least squares */\n    min_gain_Q16 = silk_int32_MAX >> 6;\n    for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) {\n        min_gain_Q16 = silk_min( min_gain_Q16, psEncCtrl->Gains_Q16[ i ] );\n    }\n    for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) {\n        /* Divide to Q16 */\n        silk_assert( psEncCtrl->Gains_Q16[ i ] > 0 );\n        /* Invert and normalize gains, and ensure that maximum invGains_Q16 is within range of a 16 bit int */\n        invGains_Q16[ i ] = silk_DIV32_varQ( min_gain_Q16, psEncCtrl->Gains_Q16[ i ], 16 - 2 );\n\n        /* Ensure Wght_Q15 a minimum value 1 */\n        invGains_Q16[ i ] = silk_max( invGains_Q16[ i ], 363 );\n\n        /* Square the inverted gains */\n        silk_assert( invGains_Q16[ i ] == silk_SAT16( invGains_Q16[ i ] ) );\n        tmp = silk_SMULWB( invGains_Q16[ i ], invGains_Q16[ i ] );\n        Wght_Q15[ i ] = silk_RSHIFT( tmp, 1 );\n\n        /* Invert the inverted and normalized gains */\n        local_gains[ i ] = silk_DIV32( ( (opus_int32)1 << 16 ), invGains_Q16[ i ] );\n    }\n\n    ALLOC( LPC_in_pre,\n           psEnc->sCmn.nb_subfr * psEnc->sCmn.predictLPCOrder\n               + psEnc->sCmn.frame_length, opus_int16 );\n    if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) {\n        VARDECL( opus_int32, WLTP );\n\n        /**********/\n        /* VOICED */\n        /**********/\n        silk_assert( psEnc->sCmn.ltp_mem_length - psEnc->sCmn.predictLPCOrder >= psEncCtrl->pitchL[ 0 ] + LTP_ORDER / 2 );\n\n        ALLOC( WLTP, psEnc->sCmn.nb_subfr * LTP_ORDER * LTP_ORDER, opus_int32 );\n\n        /* LTP analysis */\n        silk_find_LTP_FIX( psEncCtrl->LTPCoef_Q14, WLTP, &psEncCtrl->LTPredCodGain_Q7,\n            res_pitch, psEncCtrl->pitchL, Wght_Q15, psEnc->sCmn.subfr_length,\n            psEnc->sCmn.nb_subfr, psEnc->sCmn.ltp_mem_length, LTP_corrs_rshift );\n\n        /* Quantize LTP gain parameters */\n        silk_quant_LTP_gains( psEncCtrl->LTPCoef_Q14, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.PERIndex,\n            &psEnc->sCmn.sum_log_gain_Q7, WLTP, psEnc->sCmn.mu_LTP_Q9, psEnc->sCmn.LTPQuantLowComplexity, psEnc->sCmn.nb_subfr);\n\n        /* Control LTP scaling */\n        silk_LTP_scale_ctrl_FIX( psEnc, psEncCtrl, condCoding );\n\n        /* Create LTP residual */\n        silk_LTP_analysis_filter_FIX( LPC_in_pre, x - psEnc->sCmn.predictLPCOrder, psEncCtrl->LTPCoef_Q14,\n            psEncCtrl->pitchL, invGains_Q16, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.predictLPCOrder );\n\n    } else {\n        /************/\n        /* UNVOICED */\n        /************/\n        /* Create signal with prepended subframes, scaled by inverse gains */\n        x_ptr     = x - psEnc->sCmn.predictLPCOrder;\n        x_pre_ptr = LPC_in_pre;\n        for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) {\n            silk_scale_copy_vector16( x_pre_ptr, x_ptr, invGains_Q16[ i ],\n                psEnc->sCmn.subfr_length + psEnc->sCmn.predictLPCOrder );\n            x_pre_ptr += psEnc->sCmn.subfr_length + psEnc->sCmn.predictLPCOrder;\n            x_ptr     += psEnc->sCmn.subfr_length;\n        }\n\n        silk_memset( psEncCtrl->LTPCoef_Q14, 0, psEnc->sCmn.nb_subfr * LTP_ORDER * sizeof( opus_int16 ) );\n        psEncCtrl->LTPredCodGain_Q7 = 0;\n\t\tpsEnc->sCmn.sum_log_gain_Q7 = 0;\n    }\n\n    /* Limit on total predictive coding gain */\n    if( psEnc->sCmn.first_frame_after_reset ) {\n        minInvGain_Q30 = SILK_FIX_CONST( 1.0f / MAX_PREDICTION_POWER_GAIN_AFTER_RESET, 30 );\n    } else {        \n        minInvGain_Q30 = silk_log2lin( silk_SMLAWB( 16 << 7, (opus_int32)psEncCtrl->LTPredCodGain_Q7, SILK_FIX_CONST( 1.0 / 3, 16 ) ) );      /* Q16 */\n        minInvGain_Q30 = silk_DIV32_varQ( minInvGain_Q30, \n            silk_SMULWW( SILK_FIX_CONST( MAX_PREDICTION_POWER_GAIN, 0 ), \n                silk_SMLAWB( SILK_FIX_CONST( 0.25, 18 ), SILK_FIX_CONST( 0.75, 18 ), psEncCtrl->coding_quality_Q14 ) ), 14 );\n    }\n\n    /* LPC_in_pre contains the LTP-filtered input for voiced, and the unfiltered input for unvoiced */\n    silk_find_LPC_FIX( &psEnc->sCmn, NLSF_Q15, LPC_in_pre, minInvGain_Q30 );\n\n    /* Quantize LSFs */\n    silk_process_NLSFs( &psEnc->sCmn, psEncCtrl->PredCoef_Q12, NLSF_Q15, psEnc->sCmn.prev_NLSFq_Q15 );\n\n    /* Calculate residual energy using quantized LPC coefficients */\n    silk_residual_energy_FIX( psEncCtrl->ResNrg, psEncCtrl->ResNrgQ, LPC_in_pre, psEncCtrl->PredCoef_Q12, local_gains,\n        psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.predictLPCOrder );\n\n    /* Copy to prediction struct for use in next frame for interpolation */\n    silk_memcpy( psEnc->sCmn.prev_NLSFq_Q15, NLSF_Q15, sizeof( psEnc->sCmn.prev_NLSFq_Q15 ) );\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/k2a_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Step up function, converts reflection coefficients to prediction coefficients */\nvoid silk_k2a(\n    opus_int32                  *A_Q24,             /* O    Prediction coefficients [order] Q24                         */\n    const opus_int16            *rc_Q15,            /* I    Reflection coefficients [order] Q15                         */\n    const opus_int32            order               /* I    Prediction order                                            */\n)\n{\n    opus_int   k, n;\n    opus_int32 Atmp[ SILK_MAX_ORDER_LPC ];\n\n    for( k = 0; k < order; k++ ) {\n        for( n = 0; n < k; n++ ) {\n            Atmp[ n ] = A_Q24[ n ];\n        }\n        for( n = 0; n < k; n++ ) {\n            A_Q24[ n ] = silk_SMLAWB( A_Q24[ n ], silk_LSHIFT( Atmp[ k - n - 1 ], 1 ), rc_Q15[ k ] );\n        }\n        A_Q24[ k ] = -silk_LSHIFT( (opus_int32)rc_Q15[ k ], 9 );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/k2a_Q16_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Step up function, converts reflection coefficients to prediction coefficients */\nvoid silk_k2a_Q16(\n    opus_int32                  *A_Q24,             /* O    Prediction coefficients [order] Q24                         */\n    const opus_int32            *rc_Q16,            /* I    Reflection coefficients [order] Q16                         */\n    const opus_int32            order               /* I    Prediction order                                            */\n)\n{\n    opus_int   k, n;\n    opus_int32 Atmp[ SILK_MAX_ORDER_LPC ];\n\n    for( k = 0; k < order; k++ ) {\n        for( n = 0; n < k; n++ ) {\n            Atmp[ n ] = A_Q24[ n ];\n        }\n        for( n = 0; n < k; n++ ) {\n            A_Q24[ n ] = silk_SMLAWW( A_Q24[ n ], Atmp[ k - n - 1 ], rc_Q16[ k ] );\n        }\n        A_Q24[ k ] = -silk_LSHIFT( rc_Q16[ k ], 8 );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/main_FIX.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_MAIN_FIX_H\n#define SILK_MAIN_FIX_H\n\n#include \"SigProc_FIX.h\"\n#include \"structs_FIX.h\"\n#include \"control.h\"\n#include \"main.h\"\n#include \"PLC.h\"\n#include \"debug.h\"\n#include \"entenc.h\"\n\n#ifndef FORCE_CPP_BUILD\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n#endif\n\n#define silk_encoder_state_Fxx      silk_encoder_state_FIX\n#define silk_encode_do_VAD_Fxx      silk_encode_do_VAD_FIX\n#define silk_encode_frame_Fxx       silk_encode_frame_FIX\n\n/*********************/\n/* Encoder Functions */\n/*********************/\n\n/* High-pass filter with cutoff frequency adaptation based on pitch lag statistics */\nvoid silk_HP_variable_cutoff(\n    silk_encoder_state_Fxx          state_Fxx[]                             /* I/O  Encoder states                                                              */\n);\n\n/* Encoder main function */\nvoid silk_encode_do_VAD_FIX(\n    silk_encoder_state_FIX          *psEnc                                  /* I/O  Pointer to Silk FIX encoder state                                           */\n);\n\n/* Encoder main function */\nopus_int silk_encode_frame_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  Pointer to Silk FIX encoder state                                           */\n    opus_int32                      *pnBytesOut,                            /* O    Pointer to number of payload bytes;                                         */\n    ec_enc                          *psRangeEnc,                            /* I/O  compressor data structure                                                   */\n    opus_int                        condCoding,                             /* I    The type of conditional coding to use                                       */\n    opus_int                        maxBits,                                /* I    If > 0: maximum number of output bits                                       */\n    opus_int                        useCBR                                  /* I    Flag to force constant-bitrate operation                                    */\n);\n\n/* Initializes the Silk encoder state */\nopus_int silk_init_encoder(\n    silk_encoder_state_Fxx          *psEnc,                                 /* I/O  Pointer to Silk FIX encoder state                                           */\n    int                              arch                                   /* I    Run-time architecture                                                       */\n);\n\n/* Control the Silk encoder */\nopus_int silk_control_encoder(\n    silk_encoder_state_Fxx          *psEnc,                                 /* I/O  Pointer to Silk encoder state                                               */\n    silk_EncControlStruct           *encControl,                            /* I    Control structure                                                           */\n    const opus_int32                TargetRate_bps,                         /* I    Target max bitrate (bps)                                                    */\n    const opus_int                  allow_bw_switch,                        /* I    Flag to allow switching audio bandwidth                                     */\n    const opus_int                  channelNb,                              /* I    Channel number                                                              */\n    const opus_int                  force_fs_kHz\n);\n\n/****************/\n/* Prefiltering */\n/****************/\nvoid silk_prefilter_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  Encoder state                                                               */\n    const silk_encoder_control_FIX  *psEncCtrl,                             /* I    Encoder control                                                             */\n    opus_int32                      xw_Q10[],                               /* O    Weighted signal                                                             */\n    const opus_int16                x[]                                     /* I    Speech signal                                                               */\n);\n\n/**************************/\n/* Noise shaping analysis */\n/**************************/\n/* Compute noise shaping coefficients and initial gain values */\nvoid silk_noise_shape_analysis_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  Encoder state FIX                                                           */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  Encoder control FIX                                                         */\n    const opus_int16                *pitch_res,                             /* I    LPC residual from pitch analysis                                            */\n    const opus_int16                *x,                                     /* I    Input signal [ frame_length + la_shape ]                                    */\n    int                              arch                                   /* I    Run-time architecture                                                       */\n);\n\n/* Autocorrelations for a warped frequency axis */\nvoid silk_warped_autocorrelation_FIX(\n          opus_int32                *corr,                                  /* O    Result [order + 1]                                                          */\n          opus_int                  *scale,                                 /* O    Scaling of the correlation vector                                           */\n    const opus_int16                *input,                                 /* I    Input data to correlate                                                     */\n    const opus_int                  warping_Q16,                            /* I    Warping coefficient                                                         */\n    const opus_int                  length,                                 /* I    Length of input                                                             */\n    const opus_int                  order                                   /* I    Correlation order (even)                                                    */\n);\n\n/* Calculation of LTP state scaling */\nvoid silk_LTP_scale_ctrl_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  encoder state                                                               */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  encoder control                                                             */\n    opus_int                        condCoding                              /* I    The type of conditional coding to use                                       */\n);\n\n/**********************************************/\n/* Prediction Analysis                        */\n/**********************************************/\n/* Find pitch lags */\nvoid silk_find_pitch_lags_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  encoder state                                                               */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  encoder control                                                             */\n    opus_int16                      res[],                                  /* O    residual                                                                    */\n    const opus_int16                x[],                                    /* I    Speech signal                                                               */\n    int                             arch                                    /* I    Run-time architecture                                                       */\n);\n\n/* Find LPC and LTP coefficients */\nvoid silk_find_pred_coefs_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  encoder state                                                               */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  encoder control                                                             */\n    const opus_int16                res_pitch[],                            /* I    Residual from pitch analysis                                                */\n    const opus_int16                x[],                                    /* I    Speech signal                                                               */\n    opus_int                        condCoding                              /* I    The type of conditional coding to use                                       */\n);\n\n/* LPC analysis */\nvoid silk_find_LPC_FIX(\n    silk_encoder_state              *psEncC,                                /* I/O  Encoder state                                                               */\n    opus_int16                      NLSF_Q15[],                             /* O    NLSFs                                                                       */\n    const opus_int16                x[],                                    /* I    Input signal                                                                */\n    const opus_int32                minInvGain_Q30                          /* I    Inverse of max prediction gain                                              */\n);\n\n/* LTP analysis */\nvoid silk_find_LTP_FIX(\n    opus_int16                      b_Q14[ MAX_NB_SUBFR * LTP_ORDER ],      /* O    LTP coefs                                                                   */\n    opus_int32                      WLTP[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* O    Weight for LTP quantization                                           */\n    opus_int                        *LTPredCodGain_Q7,                      /* O    LTP coding gain                                                             */\n    const opus_int16                r_lpc[],                                /* I    residual signal after LPC signal + state for first 10 ms                    */\n    const opus_int                  lag[ MAX_NB_SUBFR ],                    /* I    LTP lags                                                                    */\n    const opus_int32                Wght_Q15[ MAX_NB_SUBFR ],               /* I    weights                                                                     */\n    const opus_int                  subfr_length,                           /* I    subframe length                                                             */\n    const opus_int                  nb_subfr,                               /* I    number of subframes                                                         */\n    const opus_int                  mem_offset,                             /* I    number of samples in LTP memory                                             */\n    opus_int                        corr_rshifts[ MAX_NB_SUBFR ]            /* O    right shifts applied to correlations                                        */\n);\n\nvoid silk_LTP_analysis_filter_FIX(\n    opus_int16                      *LTP_res,                               /* O    LTP residual signal of length MAX_NB_SUBFR * ( pre_length + subfr_length )  */\n    const opus_int16                *x,                                     /* I    Pointer to input signal with at least max( pitchL ) preceding samples       */\n    const opus_int16                LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],/* I    LTP_ORDER LTP coefficients for each MAX_NB_SUBFR subframe                   */\n    const opus_int                  pitchL[ MAX_NB_SUBFR ],                 /* I    Pitch lag, one for each subframe                                            */\n    const opus_int32                invGains_Q16[ MAX_NB_SUBFR ],           /* I    Inverse quantization gains, one for each subframe                           */\n    const opus_int                  subfr_length,                           /* I    Length of each subframe                                                     */\n    const opus_int                  nb_subfr,                               /* I    Number of subframes                                                         */\n    const opus_int                  pre_length                              /* I    Length of the preceding samples starting at &x[0] for each subframe         */\n);\n\n/* Calculates residual energies of input subframes where all subframes have LPC_order   */\n/* of preceding samples                                                                 */\nvoid silk_residual_energy_FIX(\n          opus_int32                nrgs[ MAX_NB_SUBFR ],                   /* O    Residual energy per subframe                                                */\n          opus_int                  nrgsQ[ MAX_NB_SUBFR ],                  /* O    Q value per subframe                                                        */\n    const opus_int16                x[],                                    /* I    Input signal                                                                */\n          opus_int16                a_Q12[ 2 ][ MAX_LPC_ORDER ],            /* I    AR coefs for each frame half                                                */\n    const opus_int32                gains[ MAX_NB_SUBFR ],                  /* I    Quantization gains                                                          */\n    const opus_int                  subfr_length,                           /* I    Subframe length                                                             */\n    const opus_int                  nb_subfr,                               /* I    Number of subframes                                                         */\n    const opus_int                  LPC_order                               /* I    LPC order                                                                   */\n);\n\n/* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */\nopus_int32 silk_residual_energy16_covar_FIX(\n    const opus_int16                *c,                                     /* I    Prediction vector                                                           */\n    const opus_int32                *wXX,                                   /* I    Correlation matrix                                                          */\n    const opus_int32                *wXx,                                   /* I    Correlation vector                                                          */\n    opus_int32                      wxx,                                    /* I    Signal energy                                                               */\n    opus_int                        D,                                      /* I    Dimension                                                                   */\n    opus_int                        cQ                                      /* I    Q value for c vector 0 - 15                                                 */\n);\n\n/* Processing of gains */\nvoid silk_process_gains_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  Encoder state                                                               */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  Encoder control                                                             */\n    opus_int                        condCoding                              /* I    The type of conditional coding to use                                       */\n);\n\n/******************/\n/* Linear Algebra */\n/******************/\n/* Calculates correlation matrix X'*X */\nvoid silk_corrMatrix_FIX(\n    const opus_int16                *x,                                     /* I    x vector [L + order - 1] used to form data matrix X                         */\n    const opus_int                  L,                                      /* I    Length of vectors                                                           */\n    const opus_int                  order,                                  /* I    Max lag for correlation                                                     */\n    const opus_int                  head_room,                              /* I    Desired headroom                                                            */\n    opus_int32                      *XX,                                    /* O    Pointer to X'*X correlation matrix [ order x order ]                        */\n    opus_int                        *rshifts                                /* I/O  Right shifts of correlations                                                */\n);\n\n/* Calculates correlation vector X'*t */\nvoid silk_corrVector_FIX(\n    const opus_int16                *x,                                     /* I    x vector [L + order - 1] used to form data matrix X                         */\n    const opus_int16                *t,                                     /* I    Target vector [L]                                                           */\n    const opus_int                  L,                                      /* I    Length of vectors                                                           */\n    const opus_int                  order,                                  /* I    Max lag for correlation                                                     */\n    opus_int32                      *Xt,                                    /* O    Pointer to X'*t correlation vector [order]                                  */\n    const opus_int                  rshifts                                 /* I    Right shifts of correlations                                                */\n);\n\n/* Add noise to matrix diagonal */\nvoid silk_regularize_correlations_FIX(\n    opus_int32                      *XX,                                    /* I/O  Correlation matrices                                                        */\n    opus_int32                      *xx,                                    /* I/O  Correlation values                                                          */\n    opus_int32                      noise,                                  /* I    Noise to add                                                                */\n    opus_int                        D                                       /* I    Dimension of XX                                                             */\n);\n\n/* Solves Ax = b, assuming A is symmetric */\nvoid silk_solve_LDL_FIX(\n    opus_int32                      *A,                                     /* I    Pointer to symetric square matrix A                                         */\n    opus_int                        M,                                      /* I    Size of matrix                                                              */\n    const opus_int32                *b,                                     /* I    Pointer to b vector                                                         */\n    opus_int32                      *x_Q16                                  /* O    Pointer to x solution vector                                                */\n);\n\n#ifndef FORCE_CPP_BUILD\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* FORCE_CPP_BUILD */\n#endif /* SILK_MAIN_FIX_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/noise_shape_analysis_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n#include \"stack_alloc.h\"\n#include \"tuning_parameters.h\"\n\n/* Compute gain to make warped filter coefficients have a zero mean log frequency response on a   */\n/* non-warped frequency scale. (So that it can be implemented with a minimum-phase monic filter.) */\n/* Note: A monic filter is one with the first coefficient equal to 1.0. In Silk we omit the first */\n/* coefficient in an array of coefficients, for monic filters.                                    */\nstatic OPUS_INLINE opus_int32 warped_gain( /* gain in Q16*/\n    const opus_int32     *coefs_Q24,\n    opus_int             lambda_Q16,\n    opus_int             order\n) {\n    opus_int   i;\n    opus_int32 gain_Q24;\n\n    lambda_Q16 = -lambda_Q16;\n    gain_Q24 = coefs_Q24[ order - 1 ];\n    for( i = order - 2; i >= 0; i-- ) {\n        gain_Q24 = silk_SMLAWB( coefs_Q24[ i ], gain_Q24, lambda_Q16 );\n    }\n    gain_Q24  = silk_SMLAWB( SILK_FIX_CONST( 1.0, 24 ), gain_Q24, -lambda_Q16 );\n    return silk_INVERSE32_varQ( gain_Q24, 40 );\n}\n\n/* Convert warped filter coefficients to monic pseudo-warped coefficients and limit maximum     */\n/* amplitude of monic warped coefficients by using bandwidth expansion on the true coefficients */\nstatic OPUS_INLINE void limit_warped_coefs(\n    opus_int32           *coefs_syn_Q24,\n    opus_int32           *coefs_ana_Q24,\n    opus_int             lambda_Q16,\n    opus_int32           limit_Q24,\n    opus_int             order\n) {\n    opus_int   i, iter, ind = 0;\n    opus_int32 tmp, maxabs_Q24, chirp_Q16, gain_syn_Q16, gain_ana_Q16;\n    opus_int32 nom_Q16, den_Q24;\n\n    /* Convert to monic coefficients */\n    lambda_Q16 = -lambda_Q16;\n    for( i = order - 1; i > 0; i-- ) {\n        coefs_syn_Q24[ i - 1 ] = silk_SMLAWB( coefs_syn_Q24[ i - 1 ], coefs_syn_Q24[ i ], lambda_Q16 );\n        coefs_ana_Q24[ i - 1 ] = silk_SMLAWB( coefs_ana_Q24[ i - 1 ], coefs_ana_Q24[ i ], lambda_Q16 );\n    }\n    lambda_Q16 = -lambda_Q16;\n    nom_Q16  = silk_SMLAWB( SILK_FIX_CONST( 1.0, 16 ), -(opus_int32)lambda_Q16,        lambda_Q16 );\n    den_Q24  = silk_SMLAWB( SILK_FIX_CONST( 1.0, 24 ), coefs_syn_Q24[ 0 ], lambda_Q16 );\n    gain_syn_Q16 = silk_DIV32_varQ( nom_Q16, den_Q24, 24 );\n    den_Q24  = silk_SMLAWB( SILK_FIX_CONST( 1.0, 24 ), coefs_ana_Q24[ 0 ], lambda_Q16 );\n    gain_ana_Q16 = silk_DIV32_varQ( nom_Q16, den_Q24, 24 );\n    for( i = 0; i < order; i++ ) {\n        coefs_syn_Q24[ i ] = silk_SMULWW( gain_syn_Q16, coefs_syn_Q24[ i ] );\n        coefs_ana_Q24[ i ] = silk_SMULWW( gain_ana_Q16, coefs_ana_Q24[ i ] );\n    }\n\n    for( iter = 0; iter < 10; iter++ ) {\n        /* Find maximum absolute value */\n        maxabs_Q24 = -1;\n        for( i = 0; i < order; i++ ) {\n            tmp = silk_max( silk_abs_int32( coefs_syn_Q24[ i ] ), silk_abs_int32( coefs_ana_Q24[ i ] ) );\n            if( tmp > maxabs_Q24 ) {\n                maxabs_Q24 = tmp;\n                ind = i;\n            }\n        }\n        if( maxabs_Q24 <= limit_Q24 ) {\n            /* Coefficients are within range - done */\n            return;\n        }\n\n        /* Convert back to true warped coefficients */\n        for( i = 1; i < order; i++ ) {\n            coefs_syn_Q24[ i - 1 ] = silk_SMLAWB( coefs_syn_Q24[ i - 1 ], coefs_syn_Q24[ i ], lambda_Q16 );\n            coefs_ana_Q24[ i - 1 ] = silk_SMLAWB( coefs_ana_Q24[ i - 1 ], coefs_ana_Q24[ i ], lambda_Q16 );\n        }\n        gain_syn_Q16 = silk_INVERSE32_varQ( gain_syn_Q16, 32 );\n        gain_ana_Q16 = silk_INVERSE32_varQ( gain_ana_Q16, 32 );\n        for( i = 0; i < order; i++ ) {\n            coefs_syn_Q24[ i ] = silk_SMULWW( gain_syn_Q16, coefs_syn_Q24[ i ] );\n            coefs_ana_Q24[ i ] = silk_SMULWW( gain_ana_Q16, coefs_ana_Q24[ i ] );\n        }\n\n        /* Apply bandwidth expansion */\n        chirp_Q16 = SILK_FIX_CONST( 0.99, 16 ) - silk_DIV32_varQ(\n            silk_SMULWB( maxabs_Q24 - limit_Q24, silk_SMLABB( SILK_FIX_CONST( 0.8, 10 ), SILK_FIX_CONST( 0.1, 10 ), iter ) ),\n            silk_MUL( maxabs_Q24, ind + 1 ), 22 );\n        silk_bwexpander_32( coefs_syn_Q24, order, chirp_Q16 );\n        silk_bwexpander_32( coefs_ana_Q24, order, chirp_Q16 );\n\n        /* Convert to monic warped coefficients */\n        lambda_Q16 = -lambda_Q16;\n        for( i = order - 1; i > 0; i-- ) {\n            coefs_syn_Q24[ i - 1 ] = silk_SMLAWB( coefs_syn_Q24[ i - 1 ], coefs_syn_Q24[ i ], lambda_Q16 );\n            coefs_ana_Q24[ i - 1 ] = silk_SMLAWB( coefs_ana_Q24[ i - 1 ], coefs_ana_Q24[ i ], lambda_Q16 );\n        }\n        lambda_Q16 = -lambda_Q16;\n        nom_Q16  = silk_SMLAWB( SILK_FIX_CONST( 1.0, 16 ), -(opus_int32)lambda_Q16,        lambda_Q16 );\n        den_Q24  = silk_SMLAWB( SILK_FIX_CONST( 1.0, 24 ), coefs_syn_Q24[ 0 ], lambda_Q16 );\n        gain_syn_Q16 = silk_DIV32_varQ( nom_Q16, den_Q24, 24 );\n        den_Q24  = silk_SMLAWB( SILK_FIX_CONST( 1.0, 24 ), coefs_ana_Q24[ 0 ], lambda_Q16 );\n        gain_ana_Q16 = silk_DIV32_varQ( nom_Q16, den_Q24, 24 );\n        for( i = 0; i < order; i++ ) {\n            coefs_syn_Q24[ i ] = silk_SMULWW( gain_syn_Q16, coefs_syn_Q24[ i ] );\n            coefs_ana_Q24[ i ] = silk_SMULWW( gain_ana_Q16, coefs_ana_Q24[ i ] );\n        }\n    }\n    silk_assert( 0 );\n}\n\n/**************************************************************/\n/* Compute noise shaping coefficients and initial gain values */\n/**************************************************************/\nvoid silk_noise_shape_analysis_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  Encoder state FIX                                                           */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  Encoder control FIX                                                         */\n    const opus_int16                *pitch_res,                             /* I    LPC residual from pitch analysis                                            */\n    const opus_int16                *x,                                     /* I    Input signal [ frame_length + la_shape ]                                    */\n    int                              arch                                   /* I    Run-time architecture                                                       */\n)\n{\n    silk_shape_state_FIX *psShapeSt = &psEnc->sShape;\n    opus_int     k, i, nSamples, Qnrg, b_Q14, warping_Q16, scale = 0;\n    opus_int32   SNR_adj_dB_Q7, HarmBoost_Q16, HarmShapeGain_Q16, Tilt_Q16, tmp32;\n    opus_int32   nrg, pre_nrg_Q30, log_energy_Q7, log_energy_prev_Q7, energy_variation_Q7;\n    opus_int32   delta_Q16, BWExp1_Q16, BWExp2_Q16, gain_mult_Q16, gain_add_Q16, strength_Q16, b_Q8;\n    opus_int32   auto_corr[     MAX_SHAPE_LPC_ORDER + 1 ];\n    opus_int32   refl_coef_Q16[ MAX_SHAPE_LPC_ORDER ];\n    opus_int32   AR1_Q24[       MAX_SHAPE_LPC_ORDER ];\n    opus_int32   AR2_Q24[       MAX_SHAPE_LPC_ORDER ];\n    VARDECL( opus_int16, x_windowed );\n    const opus_int16 *x_ptr, *pitch_res_ptr;\n    SAVE_STACK;\n\n    /* Point to start of first LPC analysis block */\n    x_ptr = x - psEnc->sCmn.la_shape;\n\n    /****************/\n    /* GAIN CONTROL */\n    /****************/\n    SNR_adj_dB_Q7 = psEnc->sCmn.SNR_dB_Q7;\n\n    /* Input quality is the average of the quality in the lowest two VAD bands */\n    psEncCtrl->input_quality_Q14 = ( opus_int )silk_RSHIFT( (opus_int32)psEnc->sCmn.input_quality_bands_Q15[ 0 ]\n        + psEnc->sCmn.input_quality_bands_Q15[ 1 ], 2 );\n\n    /* Coding quality level, between 0.0_Q0 and 1.0_Q0, but in Q14 */\n    psEncCtrl->coding_quality_Q14 = silk_RSHIFT( silk_sigm_Q15( silk_RSHIFT_ROUND( SNR_adj_dB_Q7 -\n        SILK_FIX_CONST( 20.0, 7 ), 4 ) ), 1 );\n\n    /* Reduce coding SNR during low speech activity */\n    if( psEnc->sCmn.useCBR == 0 ) {\n        b_Q8 = SILK_FIX_CONST( 1.0, 8 ) - psEnc->sCmn.speech_activity_Q8;\n        b_Q8 = silk_SMULWB( silk_LSHIFT( b_Q8, 8 ), b_Q8 );\n        SNR_adj_dB_Q7 = silk_SMLAWB( SNR_adj_dB_Q7,\n            silk_SMULBB( SILK_FIX_CONST( -BG_SNR_DECR_dB, 7 ) >> ( 4 + 1 ), b_Q8 ),                                       /* Q11*/\n            silk_SMULWB( SILK_FIX_CONST( 1.0, 14 ) + psEncCtrl->input_quality_Q14, psEncCtrl->coding_quality_Q14 ) );     /* Q12*/\n    }\n\n    if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) {\n        /* Reduce gains for periodic signals */\n        SNR_adj_dB_Q7 = silk_SMLAWB( SNR_adj_dB_Q7, SILK_FIX_CONST( HARM_SNR_INCR_dB, 8 ), psEnc->LTPCorr_Q15 );\n    } else {\n        /* For unvoiced signals and low-quality input, adjust the quality slower than SNR_dB setting */\n        SNR_adj_dB_Q7 = silk_SMLAWB( SNR_adj_dB_Q7,\n            silk_SMLAWB( SILK_FIX_CONST( 6.0, 9 ), -SILK_FIX_CONST( 0.4, 18 ), psEnc->sCmn.SNR_dB_Q7 ),\n            SILK_FIX_CONST( 1.0, 14 ) - psEncCtrl->input_quality_Q14 );\n    }\n\n    /*************************/\n    /* SPARSENESS PROCESSING */\n    /*************************/\n    /* Set quantizer offset */\n    if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) {\n        /* Initially set to 0; may be overruled in process_gains(..) */\n        psEnc->sCmn.indices.quantOffsetType = 0;\n        psEncCtrl->sparseness_Q8 = 0;\n    } else {\n        /* Sparseness measure, based on relative fluctuations of energy per 2 milliseconds */\n        nSamples = silk_LSHIFT( psEnc->sCmn.fs_kHz, 1 );\n        energy_variation_Q7 = 0;\n        log_energy_prev_Q7  = 0;\n        pitch_res_ptr = pitch_res;\n        for( k = 0; k < silk_SMULBB( SUB_FRAME_LENGTH_MS, psEnc->sCmn.nb_subfr ) / 2; k++ ) {\n            silk_sum_sqr_shift( &nrg, &scale, pitch_res_ptr, nSamples );\n            nrg += silk_RSHIFT( nSamples, scale );           /* Q(-scale)*/\n\n            log_energy_Q7 = silk_lin2log( nrg );\n            if( k > 0 ) {\n                energy_variation_Q7 += silk_abs( log_energy_Q7 - log_energy_prev_Q7 );\n            }\n            log_energy_prev_Q7 = log_energy_Q7;\n            pitch_res_ptr += nSamples;\n        }\n\n        psEncCtrl->sparseness_Q8 = silk_RSHIFT( silk_sigm_Q15( silk_SMULWB( energy_variation_Q7 -\n            SILK_FIX_CONST( 5.0, 7 ), SILK_FIX_CONST( 0.1, 16 ) ) ), 7 );\n\n        /* Set quantization offset depending on sparseness measure */\n        if( psEncCtrl->sparseness_Q8 > SILK_FIX_CONST( SPARSENESS_THRESHOLD_QNT_OFFSET, 8 ) ) {\n            psEnc->sCmn.indices.quantOffsetType = 0;\n        } else {\n            psEnc->sCmn.indices.quantOffsetType = 1;\n        }\n\n        /* Increase coding SNR for sparse signals */\n        SNR_adj_dB_Q7 = silk_SMLAWB( SNR_adj_dB_Q7, SILK_FIX_CONST( SPARSE_SNR_INCR_dB, 15 ), psEncCtrl->sparseness_Q8 - SILK_FIX_CONST( 0.5, 8 ) );\n    }\n\n    /*******************************/\n    /* Control bandwidth expansion */\n    /*******************************/\n    /* More BWE for signals with high prediction gain */\n    strength_Q16 = silk_SMULWB( psEncCtrl->predGain_Q16, SILK_FIX_CONST( FIND_PITCH_WHITE_NOISE_FRACTION, 16 ) );\n    BWExp1_Q16 = BWExp2_Q16 = silk_DIV32_varQ( SILK_FIX_CONST( BANDWIDTH_EXPANSION, 16 ),\n        silk_SMLAWW( SILK_FIX_CONST( 1.0, 16 ), strength_Q16, strength_Q16 ), 16 );\n    delta_Q16  = silk_SMULWB( SILK_FIX_CONST( 1.0, 16 ) - silk_SMULBB( 3, psEncCtrl->coding_quality_Q14 ),\n        SILK_FIX_CONST( LOW_RATE_BANDWIDTH_EXPANSION_DELTA, 16 ) );\n    BWExp1_Q16 = silk_SUB32( BWExp1_Q16, delta_Q16 );\n    BWExp2_Q16 = silk_ADD32( BWExp2_Q16, delta_Q16 );\n    /* BWExp1 will be applied after BWExp2, so make it relative */\n    BWExp1_Q16 = silk_DIV32_16( silk_LSHIFT( BWExp1_Q16, 14 ), silk_RSHIFT( BWExp2_Q16, 2 ) );\n\n    if( psEnc->sCmn.warping_Q16 > 0 ) {\n        /* Slightly more warping in analysis will move quantization noise up in frequency, where it's better masked */\n        warping_Q16 = silk_SMLAWB( psEnc->sCmn.warping_Q16, (opus_int32)psEncCtrl->coding_quality_Q14, SILK_FIX_CONST( 0.01, 18 ) );\n    } else {\n        warping_Q16 = 0;\n    }\n\n    /********************************************/\n    /* Compute noise shaping AR coefs and gains */\n    /********************************************/\n    ALLOC( x_windowed, psEnc->sCmn.shapeWinLength, opus_int16 );\n    for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\n        /* Apply window: sine slope followed by flat part followed by cosine slope */\n        opus_int shift, slope_part, flat_part;\n        flat_part = psEnc->sCmn.fs_kHz * 3;\n        slope_part = silk_RSHIFT( psEnc->sCmn.shapeWinLength - flat_part, 1 );\n\n        silk_apply_sine_window( x_windowed, x_ptr, 1, slope_part );\n        shift = slope_part;\n        silk_memcpy( x_windowed + shift, x_ptr + shift, flat_part * sizeof(opus_int16) );\n        shift += flat_part;\n        silk_apply_sine_window( x_windowed + shift, x_ptr + shift, 2, slope_part );\n\n        /* Update pointer: next LPC analysis block */\n        x_ptr += psEnc->sCmn.subfr_length;\n\n        if( psEnc->sCmn.warping_Q16 > 0 ) {\n            /* Calculate warped auto correlation */\n            silk_warped_autocorrelation_FIX( auto_corr, &scale, x_windowed, warping_Q16, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder );\n        } else {\n            /* Calculate regular auto correlation */\n            silk_autocorr( auto_corr, &scale, x_windowed, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder + 1, arch );\n        }\n\n        /* Add white noise, as a fraction of energy */\n        auto_corr[0] = silk_ADD32( auto_corr[0], silk_max_32( silk_SMULWB( silk_RSHIFT( auto_corr[ 0 ], 4 ),\n            SILK_FIX_CONST( SHAPE_WHITE_NOISE_FRACTION, 20 ) ), 1 ) );\n\n        /* Calculate the reflection coefficients using schur */\n        nrg = silk_schur64( refl_coef_Q16, auto_corr, psEnc->sCmn.shapingLPCOrder );\n        silk_assert( nrg >= 0 );\n\n        /* Convert reflection coefficients to prediction coefficients */\n        silk_k2a_Q16( AR2_Q24, refl_coef_Q16, psEnc->sCmn.shapingLPCOrder );\n\n        Qnrg = -scale;          /* range: -12...30*/\n        silk_assert( Qnrg >= -12 );\n        silk_assert( Qnrg <=  30 );\n\n        /* Make sure that Qnrg is an even number */\n        if( Qnrg & 1 ) {\n            Qnrg -= 1;\n            nrg >>= 1;\n        }\n\n        tmp32 = silk_SQRT_APPROX( nrg );\n        Qnrg >>= 1;             /* range: -6...15*/\n\n        psEncCtrl->Gains_Q16[ k ] = silk_LSHIFT_SAT32( tmp32, 16 - Qnrg );\n\n        if( psEnc->sCmn.warping_Q16 > 0 ) {\n            /* Adjust gain for warping */\n            gain_mult_Q16 = warped_gain( AR2_Q24, warping_Q16, psEnc->sCmn.shapingLPCOrder );\n            silk_assert( psEncCtrl->Gains_Q16[ k ] >= 0 );\n            if ( silk_SMULWW( silk_RSHIFT_ROUND( psEncCtrl->Gains_Q16[ k ], 1 ), gain_mult_Q16 ) >= ( silk_int32_MAX >> 1 ) ) {\n               psEncCtrl->Gains_Q16[ k ] = silk_int32_MAX;\n            } else {\n               psEncCtrl->Gains_Q16[ k ] = silk_SMULWW( psEncCtrl->Gains_Q16[ k ], gain_mult_Q16 );\n            }\n        }\n\n        /* Bandwidth expansion for synthesis filter shaping */\n        silk_bwexpander_32( AR2_Q24, psEnc->sCmn.shapingLPCOrder, BWExp2_Q16 );\n\n        /* Compute noise shaping filter coefficients */\n        silk_memcpy( AR1_Q24, AR2_Q24, psEnc->sCmn.shapingLPCOrder * sizeof( opus_int32 ) );\n\n        /* Bandwidth expansion for analysis filter shaping */\n        silk_assert( BWExp1_Q16 <= SILK_FIX_CONST( 1.0, 16 ) );\n        silk_bwexpander_32( AR1_Q24, psEnc->sCmn.shapingLPCOrder, BWExp1_Q16 );\n\n        /* Ratio of prediction gains, in energy domain */\n        pre_nrg_Q30 = silk_LPC_inverse_pred_gain_Q24( AR2_Q24, psEnc->sCmn.shapingLPCOrder );\n        nrg         = silk_LPC_inverse_pred_gain_Q24( AR1_Q24, psEnc->sCmn.shapingLPCOrder );\n\n        /*psEncCtrl->GainsPre[ k ] = 1.0f - 0.7f * ( 1.0f - pre_nrg / nrg ) = 0.3f + 0.7f * pre_nrg / nrg;*/\n        pre_nrg_Q30 = silk_LSHIFT32( silk_SMULWB( pre_nrg_Q30, SILK_FIX_CONST( 0.7, 15 ) ), 1 );\n        psEncCtrl->GainsPre_Q14[ k ] = ( opus_int ) SILK_FIX_CONST( 0.3, 14 ) + silk_DIV32_varQ( pre_nrg_Q30, nrg, 14 );\n\n        /* Convert to monic warped prediction coefficients and limit absolute values */\n        limit_warped_coefs( AR2_Q24, AR1_Q24, warping_Q16, SILK_FIX_CONST( 3.999, 24 ), psEnc->sCmn.shapingLPCOrder );\n\n        /* Convert from Q24 to Q13 and store in int16 */\n        for( i = 0; i < psEnc->sCmn.shapingLPCOrder; i++ ) {\n            psEncCtrl->AR1_Q13[ k * MAX_SHAPE_LPC_ORDER + i ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( AR1_Q24[ i ], 11 ) );\n            psEncCtrl->AR2_Q13[ k * MAX_SHAPE_LPC_ORDER + i ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( AR2_Q24[ i ], 11 ) );\n        }\n    }\n\n    /*****************/\n    /* Gain tweaking */\n    /*****************/\n    /* Increase gains during low speech activity and put lower limit on gains */\n    gain_mult_Q16 = silk_log2lin( -silk_SMLAWB( -SILK_FIX_CONST( 16.0, 7 ), SNR_adj_dB_Q7, SILK_FIX_CONST( 0.16, 16 ) ) );\n    gain_add_Q16  = silk_log2lin(  silk_SMLAWB(  SILK_FIX_CONST( 16.0, 7 ), SILK_FIX_CONST( MIN_QGAIN_DB, 7 ), SILK_FIX_CONST( 0.16, 16 ) ) );\n    silk_assert( gain_mult_Q16 > 0 );\n    for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\n        psEncCtrl->Gains_Q16[ k ] = silk_SMULWW( psEncCtrl->Gains_Q16[ k ], gain_mult_Q16 );\n        silk_assert( psEncCtrl->Gains_Q16[ k ] >= 0 );\n        psEncCtrl->Gains_Q16[ k ] = silk_ADD_POS_SAT32( psEncCtrl->Gains_Q16[ k ], gain_add_Q16 );\n    }\n\n    gain_mult_Q16 = SILK_FIX_CONST( 1.0, 16 ) + silk_RSHIFT_ROUND( silk_MLA( SILK_FIX_CONST( INPUT_TILT, 26 ),\n        psEncCtrl->coding_quality_Q14, SILK_FIX_CONST( HIGH_RATE_INPUT_TILT, 12 ) ), 10 );\n    for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\n        psEncCtrl->GainsPre_Q14[ k ] = silk_SMULWB( gain_mult_Q16, psEncCtrl->GainsPre_Q14[ k ] );\n    }\n\n    /************************************************/\n    /* Control low-frequency shaping and noise tilt */\n    /************************************************/\n    /* Less low frequency shaping for noisy inputs */\n    strength_Q16 = silk_MUL( SILK_FIX_CONST( LOW_FREQ_SHAPING, 4 ), silk_SMLAWB( SILK_FIX_CONST( 1.0, 12 ),\n        SILK_FIX_CONST( LOW_QUALITY_LOW_FREQ_SHAPING_DECR, 13 ), psEnc->sCmn.input_quality_bands_Q15[ 0 ] - SILK_FIX_CONST( 1.0, 15 ) ) );\n    strength_Q16 = silk_RSHIFT( silk_MUL( strength_Q16, psEnc->sCmn.speech_activity_Q8 ), 8 );\n    if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) {\n        /* Reduce low frequencies quantization noise for periodic signals, depending on pitch lag */\n        /*f = 400; freqz([1, -0.98 + 2e-4 * f], [1, -0.97 + 7e-4 * f], 2^12, Fs); axis([0, 1000, -10, 1])*/\n        opus_int fs_kHz_inv = silk_DIV32_16( SILK_FIX_CONST( 0.2, 14 ), psEnc->sCmn.fs_kHz );\n        for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\n            b_Q14 = fs_kHz_inv + silk_DIV32_16( SILK_FIX_CONST( 3.0, 14 ), psEncCtrl->pitchL[ k ] );\n            /* Pack two coefficients in one int32 */\n            psEncCtrl->LF_shp_Q14[ k ]  = silk_LSHIFT( SILK_FIX_CONST( 1.0, 14 ) - b_Q14 - silk_SMULWB( strength_Q16, b_Q14 ), 16 );\n            psEncCtrl->LF_shp_Q14[ k ] |= (opus_uint16)( b_Q14 - SILK_FIX_CONST( 1.0, 14 ) );\n        }\n        silk_assert( SILK_FIX_CONST( HARM_HP_NOISE_COEF, 24 ) < SILK_FIX_CONST( 0.5, 24 ) ); /* Guarantees that second argument to SMULWB() is within range of an opus_int16*/\n        Tilt_Q16 = - SILK_FIX_CONST( HP_NOISE_COEF, 16 ) -\n            silk_SMULWB( SILK_FIX_CONST( 1.0, 16 ) - SILK_FIX_CONST( HP_NOISE_COEF, 16 ),\n                silk_SMULWB( SILK_FIX_CONST( HARM_HP_NOISE_COEF, 24 ), psEnc->sCmn.speech_activity_Q8 ) );\n    } else {\n        b_Q14 = silk_DIV32_16( 21299, psEnc->sCmn.fs_kHz ); /* 1.3_Q0 = 21299_Q14*/\n        /* Pack two coefficients in one int32 */\n        psEncCtrl->LF_shp_Q14[ 0 ]  = silk_LSHIFT( SILK_FIX_CONST( 1.0, 14 ) - b_Q14 -\n            silk_SMULWB( strength_Q16, silk_SMULWB( SILK_FIX_CONST( 0.6, 16 ), b_Q14 ) ), 16 );\n        psEncCtrl->LF_shp_Q14[ 0 ] |= (opus_uint16)( b_Q14 - SILK_FIX_CONST( 1.0, 14 ) );\n        for( k = 1; k < psEnc->sCmn.nb_subfr; k++ ) {\n            psEncCtrl->LF_shp_Q14[ k ] = psEncCtrl->LF_shp_Q14[ 0 ];\n        }\n        Tilt_Q16 = -SILK_FIX_CONST( HP_NOISE_COEF, 16 );\n    }\n\n    /****************************/\n    /* HARMONIC SHAPING CONTROL */\n    /****************************/\n    /* Control boosting of harmonic frequencies */\n    HarmBoost_Q16 = silk_SMULWB( silk_SMULWB( SILK_FIX_CONST( 1.0, 17 ) - silk_LSHIFT( psEncCtrl->coding_quality_Q14, 3 ),\n        psEnc->LTPCorr_Q15 ), SILK_FIX_CONST( LOW_RATE_HARMONIC_BOOST, 16 ) );\n\n    /* More harmonic boost for noisy input signals */\n    HarmBoost_Q16 = silk_SMLAWB( HarmBoost_Q16,\n        SILK_FIX_CONST( 1.0, 16 ) - silk_LSHIFT( psEncCtrl->input_quality_Q14, 2 ), SILK_FIX_CONST( LOW_INPUT_QUALITY_HARMONIC_BOOST, 16 ) );\n\n    if( USE_HARM_SHAPING && psEnc->sCmn.indices.signalType == TYPE_VOICED ) {\n        /* More harmonic noise shaping for high bitrates or noisy input */\n        HarmShapeGain_Q16 = silk_SMLAWB( SILK_FIX_CONST( HARMONIC_SHAPING, 16 ),\n                SILK_FIX_CONST( 1.0, 16 ) - silk_SMULWB( SILK_FIX_CONST( 1.0, 18 ) - silk_LSHIFT( psEncCtrl->coding_quality_Q14, 4 ),\n                psEncCtrl->input_quality_Q14 ), SILK_FIX_CONST( HIGH_RATE_OR_LOW_QUALITY_HARMONIC_SHAPING, 16 ) );\n\n        /* Less harmonic noise shaping for less periodic signals */\n        HarmShapeGain_Q16 = silk_SMULWB( silk_LSHIFT( HarmShapeGain_Q16, 1 ),\n            silk_SQRT_APPROX( silk_LSHIFT( psEnc->LTPCorr_Q15, 15 ) ) );\n    } else {\n        HarmShapeGain_Q16 = 0;\n    }\n\n    /*************************/\n    /* Smooth over subframes */\n    /*************************/\n    for( k = 0; k < MAX_NB_SUBFR; k++ ) {\n        psShapeSt->HarmBoost_smth_Q16 =\n            silk_SMLAWB( psShapeSt->HarmBoost_smth_Q16,     HarmBoost_Q16     - psShapeSt->HarmBoost_smth_Q16,     SILK_FIX_CONST( SUBFR_SMTH_COEF, 16 ) );\n        psShapeSt->HarmShapeGain_smth_Q16 =\n            silk_SMLAWB( psShapeSt->HarmShapeGain_smth_Q16, HarmShapeGain_Q16 - psShapeSt->HarmShapeGain_smth_Q16, SILK_FIX_CONST( SUBFR_SMTH_COEF, 16 ) );\n        psShapeSt->Tilt_smth_Q16 =\n            silk_SMLAWB( psShapeSt->Tilt_smth_Q16,          Tilt_Q16          - psShapeSt->Tilt_smth_Q16,          SILK_FIX_CONST( SUBFR_SMTH_COEF, 16 ) );\n\n        psEncCtrl->HarmBoost_Q14[ k ]     = ( opus_int )silk_RSHIFT_ROUND( psShapeSt->HarmBoost_smth_Q16,     2 );\n        psEncCtrl->HarmShapeGain_Q14[ k ] = ( opus_int )silk_RSHIFT_ROUND( psShapeSt->HarmShapeGain_smth_Q16, 2 );\n        psEncCtrl->Tilt_Q14[ k ]          = ( opus_int )silk_RSHIFT_ROUND( psShapeSt->Tilt_smth_Q16,          2 );\n    }\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/pitch_analysis_core_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n/***********************************************************\n* Pitch analyser function\n********************************************************** */\n#include \"SigProc_FIX.h\"\n#include \"pitch_est_defines.h\"\n#include \"stack_alloc.h\"\n#include \"debug.h\"\n#include \"pitch.h\"\n\n#define SCRATCH_SIZE    22\n#define SF_LENGTH_4KHZ  ( PE_SUBFR_LENGTH_MS * 4 )\n#define SF_LENGTH_8KHZ  ( PE_SUBFR_LENGTH_MS * 8 )\n#define MIN_LAG_4KHZ    ( PE_MIN_LAG_MS * 4 )\n#define MIN_LAG_8KHZ    ( PE_MIN_LAG_MS * 8 )\n#define MAX_LAG_4KHZ    ( PE_MAX_LAG_MS * 4 )\n#define MAX_LAG_8KHZ    ( PE_MAX_LAG_MS * 8 - 1 )\n#define CSTRIDE_4KHZ    ( MAX_LAG_4KHZ + 1 - MIN_LAG_4KHZ )\n#define CSTRIDE_8KHZ    ( MAX_LAG_8KHZ + 3 - ( MIN_LAG_8KHZ - 2 ) )\n#define D_COMP_MIN      ( MIN_LAG_8KHZ - 3 )\n#define D_COMP_MAX      ( MAX_LAG_8KHZ + 4 )\n#define D_COMP_STRIDE   ( D_COMP_MAX - D_COMP_MIN )\n\ntypedef opus_int32 silk_pe_stage3_vals[ PE_NB_STAGE3_LAGS ];\n\n/************************************************************/\n/* Internally used functions                                */\n/************************************************************/\nstatic void silk_P_Ana_calc_corr_st3(\n    silk_pe_stage3_vals cross_corr_st3[],              /* O 3 DIM correlation array */\n    const opus_int16  frame[],                         /* I vector to correlate         */\n    opus_int          start_lag,                       /* I lag offset to search around */\n    opus_int          sf_length,                       /* I length of a 5 ms subframe   */\n    opus_int          nb_subfr,                        /* I number of subframes         */\n    opus_int          complexity,                      /* I Complexity setting          */\n    int               arch                             /* I Run-time architecture       */\n);\n\nstatic void silk_P_Ana_calc_energy_st3(\n    silk_pe_stage3_vals energies_st3[],                /* O 3 DIM energy array */\n    const opus_int16  frame[],                         /* I vector to calc energy in    */\n    opus_int          start_lag,                       /* I lag offset to search around */\n    opus_int          sf_length,                       /* I length of one 5 ms subframe */\n    opus_int          nb_subfr,                        /* I number of subframes         */\n    opus_int          complexity                       /* I Complexity setting          */\n);\n\n/*************************************************************/\n/*      FIXED POINT CORE PITCH ANALYSIS FUNCTION             */\n/*************************************************************/\nopus_int silk_pitch_analysis_core(                  /* O    Voicing estimate: 0 voiced, 1 unvoiced                      */\n    const opus_int16            *frame,             /* I    Signal of length PE_FRAME_LENGTH_MS*Fs_kHz                  */\n    opus_int                    *pitch_out,         /* O    4 pitch lag values                                          */\n    opus_int16                  *lagIndex,          /* O    Lag Index                                                   */\n    opus_int8                   *contourIndex,      /* O    Pitch contour Index                                         */\n    opus_int                    *LTPCorr_Q15,       /* I/O  Normalized correlation; input: value from previous frame    */\n    opus_int                    prevLag,            /* I    Last lag of previous frame; set to zero is unvoiced         */\n    const opus_int32            search_thres1_Q16,  /* I    First stage threshold for lag candidates 0 - 1              */\n    const opus_int              search_thres2_Q13,  /* I    Final threshold for lag candidates 0 - 1                    */\n    const opus_int              Fs_kHz,             /* I    Sample frequency (kHz)                                      */\n    const opus_int              complexity,         /* I    Complexity setting, 0-2, where 2 is highest                 */\n    const opus_int              nb_subfr,           /* I    number of 5 ms subframes                                    */\n    int                         arch                /* I    Run-time architecture                                       */\n)\n{\n    VARDECL( opus_int16, frame_8kHz );\n    VARDECL( opus_int16, frame_4kHz );\n    opus_int32 filt_state[ 6 ];\n    const opus_int16 *input_frame_ptr;\n    opus_int   i, k, d, j;\n    VARDECL( opus_int16, C );\n    VARDECL( opus_int32, xcorr32 );\n    const opus_int16 *target_ptr, *basis_ptr;\n    opus_int32 cross_corr, normalizer, energy, shift, energy_basis, energy_target;\n    opus_int   d_srch[ PE_D_SRCH_LENGTH ], Cmax, length_d_srch, length_d_comp;\n    VARDECL( opus_int16, d_comp );\n    opus_int32 sum, threshold, lag_counter;\n    opus_int   CBimax, CBimax_new, CBimax_old, lag, start_lag, end_lag, lag_new;\n    opus_int32 CC[ PE_NB_CBKS_STAGE2_EXT ], CCmax, CCmax_b, CCmax_new_b, CCmax_new;\n    VARDECL( silk_pe_stage3_vals, energies_st3 );\n    VARDECL( silk_pe_stage3_vals, cross_corr_st3 );\n    opus_int   frame_length, frame_length_8kHz, frame_length_4kHz;\n    opus_int   sf_length;\n    opus_int   min_lag;\n    opus_int   max_lag;\n    opus_int32 contour_bias_Q15, diff;\n    opus_int   nb_cbk_search, cbk_size;\n    opus_int32 delta_lag_log2_sqr_Q7, lag_log2_Q7, prevLag_log2_Q7, prev_lag_bias_Q13;\n    const opus_int8 *Lag_CB_ptr;\n    SAVE_STACK;\n    /* Check for valid sampling frequency */\n    silk_assert( Fs_kHz == 8 || Fs_kHz == 12 || Fs_kHz == 16 );\n\n    /* Check for valid complexity setting */\n    silk_assert( complexity >= SILK_PE_MIN_COMPLEX );\n    silk_assert( complexity <= SILK_PE_MAX_COMPLEX );\n\n    silk_assert( search_thres1_Q16 >= 0 && search_thres1_Q16 <= (1<<16) );\n    silk_assert( search_thres2_Q13 >= 0 && search_thres2_Q13 <= (1<<13) );\n\n    /* Set up frame lengths max / min lag for the sampling frequency */\n    frame_length      = ( PE_LTP_MEM_LENGTH_MS + nb_subfr * PE_SUBFR_LENGTH_MS ) * Fs_kHz;\n    frame_length_4kHz = ( PE_LTP_MEM_LENGTH_MS + nb_subfr * PE_SUBFR_LENGTH_MS ) * 4;\n    frame_length_8kHz = ( PE_LTP_MEM_LENGTH_MS + nb_subfr * PE_SUBFR_LENGTH_MS ) * 8;\n    sf_length         = PE_SUBFR_LENGTH_MS * Fs_kHz;\n    min_lag           = PE_MIN_LAG_MS * Fs_kHz;\n    max_lag           = PE_MAX_LAG_MS * Fs_kHz - 1;\n\n    /* Resample from input sampled at Fs_kHz to 8 kHz */\n    ALLOC( frame_8kHz, frame_length_8kHz, opus_int16 );\n    if( Fs_kHz == 16 ) {\n        silk_memset( filt_state, 0, 2 * sizeof( opus_int32 ) );\n        silk_resampler_down2( filt_state, frame_8kHz, frame, frame_length );\n    } else if( Fs_kHz == 12 ) {\n        silk_memset( filt_state, 0, 6 * sizeof( opus_int32 ) );\n        silk_resampler_down2_3( filt_state, frame_8kHz, frame, frame_length );\n    } else {\n        silk_assert( Fs_kHz == 8 );\n        silk_memcpy( frame_8kHz, frame, frame_length_8kHz * sizeof(opus_int16) );\n    }\n\n    /* Decimate again to 4 kHz */\n    silk_memset( filt_state, 0, 2 * sizeof( opus_int32 ) );/* Set state to zero */\n    ALLOC( frame_4kHz, frame_length_4kHz, opus_int16 );\n    silk_resampler_down2( filt_state, frame_4kHz, frame_8kHz, frame_length_8kHz );\n\n    /* Low-pass filter */\n    for( i = frame_length_4kHz - 1; i > 0; i-- ) {\n        frame_4kHz[ i ] = silk_ADD_SAT16( frame_4kHz[ i ], frame_4kHz[ i - 1 ] );\n    }\n\n    /*******************************************************************************\n    ** Scale 4 kHz signal down to prevent correlations measures from overflowing\n    ** find scaling as max scaling for each 8kHz(?) subframe\n    *******************************************************************************/\n\n    /* Inner product is calculated with different lengths, so scale for the worst case */\n    silk_sum_sqr_shift( &energy, &shift, frame_4kHz, frame_length_4kHz );\n    if( shift > 0 ) {\n        shift = silk_RSHIFT( shift, 1 );\n        for( i = 0; i < frame_length_4kHz; i++ ) {\n            frame_4kHz[ i ] = silk_RSHIFT( frame_4kHz[ i ], shift );\n        }\n    }\n\n    /******************************************************************************\n    * FIRST STAGE, operating in 4 khz\n    ******************************************************************************/\n    ALLOC( C, nb_subfr * CSTRIDE_8KHZ, opus_int16 );\n    ALLOC( xcorr32, MAX_LAG_4KHZ-MIN_LAG_4KHZ+1, opus_int32 );\n    silk_memset( C, 0, (nb_subfr >> 1) * CSTRIDE_4KHZ * sizeof( opus_int16 ) );\n    target_ptr = &frame_4kHz[ silk_LSHIFT( SF_LENGTH_4KHZ, 2 ) ];\n    for( k = 0; k < nb_subfr >> 1; k++ ) {\n        /* Check that we are within range of the array */\n        silk_assert( target_ptr >= frame_4kHz );\n        silk_assert( target_ptr + SF_LENGTH_8KHZ <= frame_4kHz + frame_length_4kHz );\n\n        basis_ptr = target_ptr - MIN_LAG_4KHZ;\n\n        /* Check that we are within range of the array */\n        silk_assert( basis_ptr >= frame_4kHz );\n        silk_assert( basis_ptr + SF_LENGTH_8KHZ <= frame_4kHz + frame_length_4kHz );\n\n        celt_pitch_xcorr( target_ptr, target_ptr - MAX_LAG_4KHZ, xcorr32, SF_LENGTH_8KHZ, MAX_LAG_4KHZ - MIN_LAG_4KHZ + 1, arch );\n\n        /* Calculate first vector products before loop */\n        cross_corr = xcorr32[ MAX_LAG_4KHZ - MIN_LAG_4KHZ ];\n        normalizer = silk_inner_prod_aligned( target_ptr, target_ptr, SF_LENGTH_8KHZ );\n        normalizer = silk_ADD32( normalizer, silk_inner_prod_aligned( basis_ptr,  basis_ptr, SF_LENGTH_8KHZ ) );\n        normalizer = silk_ADD32( normalizer, silk_SMULBB( SF_LENGTH_8KHZ, 4000 ) );\n\n        matrix_ptr( C, k, 0, CSTRIDE_4KHZ ) =\n            (opus_int16)silk_DIV32_varQ( cross_corr, normalizer, 13 + 1 );                      /* Q13 */\n\n        /* From now on normalizer is computed recursively */\n        for( d = MIN_LAG_4KHZ + 1; d <= MAX_LAG_4KHZ; d++ ) {\n            basis_ptr--;\n\n            /* Check that we are within range of the array */\n            silk_assert( basis_ptr >= frame_4kHz );\n            silk_assert( basis_ptr + SF_LENGTH_8KHZ <= frame_4kHz + frame_length_4kHz );\n\n            cross_corr = xcorr32[ MAX_LAG_4KHZ - d ];\n\n            /* Add contribution of new sample and remove contribution from oldest sample */\n            normalizer = silk_ADD32( normalizer,\n                silk_SMULBB( basis_ptr[ 0 ], basis_ptr[ 0 ] ) -\n                silk_SMULBB( basis_ptr[ SF_LENGTH_8KHZ ], basis_ptr[ SF_LENGTH_8KHZ ] ) );\n\n            matrix_ptr( C, k, d - MIN_LAG_4KHZ, CSTRIDE_4KHZ) =\n                (opus_int16)silk_DIV32_varQ( cross_corr, normalizer, 13 + 1 );                  /* Q13 */\n        }\n        /* Update target pointer */\n        target_ptr += SF_LENGTH_8KHZ;\n    }\n\n    /* Combine two subframes into single correlation measure and apply short-lag bias */\n    if( nb_subfr == PE_MAX_NB_SUBFR ) {\n        for( i = MAX_LAG_4KHZ; i >= MIN_LAG_4KHZ; i-- ) {\n            sum = (opus_int32)matrix_ptr( C, 0, i - MIN_LAG_4KHZ, CSTRIDE_4KHZ )\n                + (opus_int32)matrix_ptr( C, 1, i - MIN_LAG_4KHZ, CSTRIDE_4KHZ );               /* Q14 */\n            sum = silk_SMLAWB( sum, sum, silk_LSHIFT( -i, 4 ) );                                /* Q14 */\n            C[ i - MIN_LAG_4KHZ ] = (opus_int16)sum;                                            /* Q14 */\n        }\n    } else {\n        /* Only short-lag bias */\n        for( i = MAX_LAG_4KHZ; i >= MIN_LAG_4KHZ; i-- ) {\n            sum = silk_LSHIFT( (opus_int32)C[ i - MIN_LAG_4KHZ ], 1 );                          /* Q14 */\n            sum = silk_SMLAWB( sum, sum, silk_LSHIFT( -i, 4 ) );                                /* Q14 */\n            C[ i - MIN_LAG_4KHZ ] = (opus_int16)sum;                                            /* Q14 */\n        }\n    }\n\n    /* Sort */\n    length_d_srch = silk_ADD_LSHIFT32( 4, complexity, 1 );\n    silk_assert( 3 * length_d_srch <= PE_D_SRCH_LENGTH );\n    silk_insertion_sort_decreasing_int16( C, d_srch, CSTRIDE_4KHZ,\n                                          length_d_srch );\n\n    /* Escape if correlation is very low already here */\n    Cmax = (opus_int)C[ 0 ];                                                    /* Q14 */\n    if( Cmax < SILK_FIX_CONST( 0.2, 14 ) ) {\n        silk_memset( pitch_out, 0, nb_subfr * sizeof( opus_int ) );\n        *LTPCorr_Q15  = 0;\n        *lagIndex     = 0;\n        *contourIndex = 0;\n        RESTORE_STACK;\n        return 1;\n    }\n\n    threshold = silk_SMULWB( search_thres1_Q16, Cmax );\n    for( i = 0; i < length_d_srch; i++ ) {\n        /* Convert to 8 kHz indices for the sorted correlation that exceeds the threshold */\n        if( C[ i ] > threshold ) {\n            d_srch[ i ] = silk_LSHIFT( d_srch[ i ] + MIN_LAG_4KHZ, 1 );\n        } else {\n            length_d_srch = i;\n            break;\n        }\n    }\n    silk_assert( length_d_srch > 0 );\n\n    ALLOC( d_comp, D_COMP_STRIDE, opus_int16 );\n    for( i = D_COMP_MIN; i < D_COMP_MAX; i++ ) {\n        d_comp[ i - D_COMP_MIN ] = 0;\n    }\n    for( i = 0; i < length_d_srch; i++ ) {\n        d_comp[ d_srch[ i ] - D_COMP_MIN ] = 1;\n    }\n\n    /* Convolution */\n    for( i = D_COMP_MAX - 1; i >= MIN_LAG_8KHZ; i-- ) {\n        d_comp[ i - D_COMP_MIN ] +=\n            d_comp[ i - 1 - D_COMP_MIN ] + d_comp[ i - 2 - D_COMP_MIN ];\n    }\n\n    length_d_srch = 0;\n    for( i = MIN_LAG_8KHZ; i < MAX_LAG_8KHZ + 1; i++ ) {\n        if( d_comp[ i + 1 - D_COMP_MIN ] > 0 ) {\n            d_srch[ length_d_srch ] = i;\n            length_d_srch++;\n        }\n    }\n\n    /* Convolution */\n    for( i = D_COMP_MAX - 1; i >= MIN_LAG_8KHZ; i-- ) {\n        d_comp[ i - D_COMP_MIN ] += d_comp[ i - 1 - D_COMP_MIN ]\n            + d_comp[ i - 2 - D_COMP_MIN ] + d_comp[ i - 3 - D_COMP_MIN ];\n    }\n\n    length_d_comp = 0;\n    for( i = MIN_LAG_8KHZ; i < D_COMP_MAX; i++ ) {\n        if( d_comp[ i - D_COMP_MIN ] > 0 ) {\n            d_comp[ length_d_comp ] = i - 2;\n            length_d_comp++;\n        }\n    }\n\n    /**********************************************************************************\n    ** SECOND STAGE, operating at 8 kHz, on lag sections with high correlation\n    *************************************************************************************/\n\n    /******************************************************************************\n    ** Scale signal down to avoid correlations measures from overflowing\n    *******************************************************************************/\n    /* find scaling as max scaling for each subframe */\n    silk_sum_sqr_shift( &energy, &shift, frame_8kHz, frame_length_8kHz );\n    if( shift > 0 ) {\n        shift = silk_RSHIFT( shift, 1 );\n        for( i = 0; i < frame_length_8kHz; i++ ) {\n            frame_8kHz[ i ] = silk_RSHIFT( frame_8kHz[ i ], shift );\n        }\n    }\n\n    /*********************************************************************************\n    * Find energy of each subframe projected onto its history, for a range of delays\n    *********************************************************************************/\n    silk_memset( C, 0, nb_subfr * CSTRIDE_8KHZ * sizeof( opus_int16 ) );\n\n    target_ptr = &frame_8kHz[ PE_LTP_MEM_LENGTH_MS * 8 ];\n    for( k = 0; k < nb_subfr; k++ ) {\n\n        /* Check that we are within range of the array */\n        silk_assert( target_ptr >= frame_8kHz );\n        silk_assert( target_ptr + SF_LENGTH_8KHZ <= frame_8kHz + frame_length_8kHz );\n\n        energy_target = silk_ADD32( silk_inner_prod_aligned( target_ptr, target_ptr, SF_LENGTH_8KHZ ), 1 );\n        for( j = 0; j < length_d_comp; j++ ) {\n            d = d_comp[ j ];\n            basis_ptr = target_ptr - d;\n\n            /* Check that we are within range of the array */\n            silk_assert( basis_ptr >= frame_8kHz );\n            silk_assert( basis_ptr + SF_LENGTH_8KHZ <= frame_8kHz + frame_length_8kHz );\n\n            cross_corr = silk_inner_prod_aligned( target_ptr, basis_ptr, SF_LENGTH_8KHZ );\n            if( cross_corr > 0 ) {\n                energy_basis = silk_inner_prod_aligned( basis_ptr, basis_ptr, SF_LENGTH_8KHZ );\n                matrix_ptr( C, k, d - ( MIN_LAG_8KHZ - 2 ), CSTRIDE_8KHZ ) =\n                    (opus_int16)silk_DIV32_varQ( cross_corr,\n                                                 silk_ADD32( energy_target,\n                                                             energy_basis ),\n                                                 13 + 1 );                                      /* Q13 */\n            } else {\n                matrix_ptr( C, k, d - ( MIN_LAG_8KHZ - 2 ), CSTRIDE_8KHZ ) = 0;\n            }\n        }\n        target_ptr += SF_LENGTH_8KHZ;\n    }\n\n    /* search over lag range and lags codebook */\n    /* scale factor for lag codebook, as a function of center lag */\n\n    CCmax   = silk_int32_MIN;\n    CCmax_b = silk_int32_MIN;\n\n    CBimax = 0; /* To avoid returning undefined lag values */\n    lag = -1;   /* To check if lag with strong enough correlation has been found */\n\n    if( prevLag > 0 ) {\n        if( Fs_kHz == 12 ) {\n            prevLag = silk_DIV32_16( silk_LSHIFT( prevLag, 1 ), 3 );\n        } else if( Fs_kHz == 16 ) {\n            prevLag = silk_RSHIFT( prevLag, 1 );\n        }\n        prevLag_log2_Q7 = silk_lin2log( (opus_int32)prevLag );\n    } else {\n        prevLag_log2_Q7 = 0;\n    }\n    silk_assert( search_thres2_Q13 == silk_SAT16( search_thres2_Q13 ) );\n    /* Set up stage 2 codebook based on number of subframes */\n    if( nb_subfr == PE_MAX_NB_SUBFR ) {\n        cbk_size   = PE_NB_CBKS_STAGE2_EXT;\n        Lag_CB_ptr = &silk_CB_lags_stage2[ 0 ][ 0 ];\n        if( Fs_kHz == 8 && complexity > SILK_PE_MIN_COMPLEX ) {\n            /* If input is 8 khz use a larger codebook here because it is last stage */\n            nb_cbk_search = PE_NB_CBKS_STAGE2_EXT;\n        } else {\n            nb_cbk_search = PE_NB_CBKS_STAGE2;\n        }\n    } else {\n        cbk_size       = PE_NB_CBKS_STAGE2_10MS;\n        Lag_CB_ptr     = &silk_CB_lags_stage2_10_ms[ 0 ][ 0 ];\n        nb_cbk_search  = PE_NB_CBKS_STAGE2_10MS;\n    }\n\n    for( k = 0; k < length_d_srch; k++ ) {\n        d = d_srch[ k ];\n        for( j = 0; j < nb_cbk_search; j++ ) {\n            CC[ j ] = 0;\n            for( i = 0; i < nb_subfr; i++ ) {\n                opus_int d_subfr;\n                /* Try all codebooks */\n                d_subfr = d + matrix_ptr( Lag_CB_ptr, i, j, cbk_size );\n                CC[ j ] = CC[ j ]\n                    + (opus_int32)matrix_ptr( C, i,\n                                              d_subfr - ( MIN_LAG_8KHZ - 2 ),\n                                              CSTRIDE_8KHZ );\n            }\n        }\n        /* Find best codebook */\n        CCmax_new = silk_int32_MIN;\n        CBimax_new = 0;\n        for( i = 0; i < nb_cbk_search; i++ ) {\n            if( CC[ i ] > CCmax_new ) {\n                CCmax_new = CC[ i ];\n                CBimax_new = i;\n            }\n        }\n\n        /* Bias towards shorter lags */\n        lag_log2_Q7 = silk_lin2log( d ); /* Q7 */\n        silk_assert( lag_log2_Q7 == silk_SAT16( lag_log2_Q7 ) );\n        silk_assert( nb_subfr * SILK_FIX_CONST( PE_SHORTLAG_BIAS, 13 ) == silk_SAT16( nb_subfr * SILK_FIX_CONST( PE_SHORTLAG_BIAS, 13 ) ) );\n        CCmax_new_b = CCmax_new - silk_RSHIFT( silk_SMULBB( nb_subfr * SILK_FIX_CONST( PE_SHORTLAG_BIAS, 13 ), lag_log2_Q7 ), 7 ); /* Q13 */\n\n        /* Bias towards previous lag */\n        silk_assert( nb_subfr * SILK_FIX_CONST( PE_PREVLAG_BIAS, 13 ) == silk_SAT16( nb_subfr * SILK_FIX_CONST( PE_PREVLAG_BIAS, 13 ) ) );\n        if( prevLag > 0 ) {\n            delta_lag_log2_sqr_Q7 = lag_log2_Q7 - prevLag_log2_Q7;\n            silk_assert( delta_lag_log2_sqr_Q7 == silk_SAT16( delta_lag_log2_sqr_Q7 ) );\n            delta_lag_log2_sqr_Q7 = silk_RSHIFT( silk_SMULBB( delta_lag_log2_sqr_Q7, delta_lag_log2_sqr_Q7 ), 7 );\n            prev_lag_bias_Q13 = silk_RSHIFT( silk_SMULBB( nb_subfr * SILK_FIX_CONST( PE_PREVLAG_BIAS, 13 ), *LTPCorr_Q15 ), 15 ); /* Q13 */\n            prev_lag_bias_Q13 = silk_DIV32( silk_MUL( prev_lag_bias_Q13, delta_lag_log2_sqr_Q7 ), delta_lag_log2_sqr_Q7 + SILK_FIX_CONST( 0.5, 7 ) );\n            CCmax_new_b -= prev_lag_bias_Q13; /* Q13 */\n        }\n\n        if( CCmax_new_b > CCmax_b                                   &&  /* Find maximum biased correlation                  */\n            CCmax_new > silk_SMULBB( nb_subfr, search_thres2_Q13 )  &&  /* Correlation needs to be high enough to be voiced */\n            silk_CB_lags_stage2[ 0 ][ CBimax_new ] <= MIN_LAG_8KHZ      /* Lag must be in range                             */\n         ) {\n            CCmax_b = CCmax_new_b;\n            CCmax   = CCmax_new;\n            lag     = d;\n            CBimax  = CBimax_new;\n        }\n    }\n\n    if( lag == -1 ) {\n        /* No suitable candidate found */\n        silk_memset( pitch_out, 0, nb_subfr * sizeof( opus_int ) );\n        *LTPCorr_Q15  = 0;\n        *lagIndex     = 0;\n        *contourIndex = 0;\n        RESTORE_STACK;\n        return 1;\n    }\n\n    /* Output normalized correlation */\n    *LTPCorr_Q15 = (opus_int)silk_LSHIFT( silk_DIV32_16( CCmax, nb_subfr ), 2 );\n    silk_assert( *LTPCorr_Q15 >= 0 );\n\n    if( Fs_kHz > 8 ) {\n        VARDECL( opus_int16, scratch_mem );\n        /***************************************************************************/\n        /* Scale input signal down to avoid correlations measures from overflowing */\n        /***************************************************************************/\n        /* find scaling as max scaling for each subframe */\n        silk_sum_sqr_shift( &energy, &shift, frame, frame_length );\n        ALLOC( scratch_mem, shift > 0 ? frame_length : ALLOC_NONE, opus_int16 );\n        if( shift > 0 ) {\n            /* Move signal to scratch mem because the input signal should be unchanged */\n            shift = silk_RSHIFT( shift, 1 );\n            for( i = 0; i < frame_length; i++ ) {\n                scratch_mem[ i ] = silk_RSHIFT( frame[ i ], shift );\n            }\n            input_frame_ptr = scratch_mem;\n        } else {\n            input_frame_ptr = frame;\n        }\n\n        /* Search in original signal */\n\n        CBimax_old = CBimax;\n        /* Compensate for decimation */\n        silk_assert( lag == silk_SAT16( lag ) );\n        if( Fs_kHz == 12 ) {\n            lag = silk_RSHIFT( silk_SMULBB( lag, 3 ), 1 );\n        } else if( Fs_kHz == 16 ) {\n            lag = silk_LSHIFT( lag, 1 );\n        } else {\n            lag = silk_SMULBB( lag, 3 );\n        }\n\n        lag = silk_LIMIT_int( lag, min_lag, max_lag );\n        start_lag = silk_max_int( lag - 2, min_lag );\n        end_lag   = silk_min_int( lag + 2, max_lag );\n        lag_new   = lag;                                    /* to avoid undefined lag */\n        CBimax    = 0;                                      /* to avoid undefined lag */\n\n        CCmax = silk_int32_MIN;\n        /* pitch lags according to second stage */\n        for( k = 0; k < nb_subfr; k++ ) {\n            pitch_out[ k ] = lag + 2 * silk_CB_lags_stage2[ k ][ CBimax_old ];\n        }\n\n        /* Set up codebook parameters according to complexity setting and frame length */\n        if( nb_subfr == PE_MAX_NB_SUBFR ) {\n            nb_cbk_search   = (opus_int)silk_nb_cbk_searchs_stage3[ complexity ];\n            cbk_size        = PE_NB_CBKS_STAGE3_MAX;\n            Lag_CB_ptr      = &silk_CB_lags_stage3[ 0 ][ 0 ];\n        } else {\n            nb_cbk_search   = PE_NB_CBKS_STAGE3_10MS;\n            cbk_size        = PE_NB_CBKS_STAGE3_10MS;\n            Lag_CB_ptr      = &silk_CB_lags_stage3_10_ms[ 0 ][ 0 ];\n        }\n\n        /* Calculate the correlations and energies needed in stage 3 */\n        ALLOC( energies_st3, nb_subfr * nb_cbk_search, silk_pe_stage3_vals );\n        ALLOC( cross_corr_st3, nb_subfr * nb_cbk_search, silk_pe_stage3_vals );\n        silk_P_Ana_calc_corr_st3(  cross_corr_st3, input_frame_ptr, start_lag, sf_length, nb_subfr, complexity, arch );\n        silk_P_Ana_calc_energy_st3( energies_st3, input_frame_ptr, start_lag, sf_length, nb_subfr, complexity );\n\n        lag_counter = 0;\n        silk_assert( lag == silk_SAT16( lag ) );\n        contour_bias_Q15 = silk_DIV32_16( SILK_FIX_CONST( PE_FLATCONTOUR_BIAS, 15 ), lag );\n\n        target_ptr = &input_frame_ptr[ PE_LTP_MEM_LENGTH_MS * Fs_kHz ];\n        energy_target = silk_ADD32( silk_inner_prod_aligned( target_ptr, target_ptr, nb_subfr * sf_length ), 1 );\n        for( d = start_lag; d <= end_lag; d++ ) {\n            for( j = 0; j < nb_cbk_search; j++ ) {\n                cross_corr = 0;\n                energy     = energy_target;\n                for( k = 0; k < nb_subfr; k++ ) {\n                    cross_corr = silk_ADD32( cross_corr,\n                        matrix_ptr( cross_corr_st3, k, j,\n                                    nb_cbk_search )[ lag_counter ] );\n                    energy     = silk_ADD32( energy,\n                        matrix_ptr( energies_st3, k, j,\n                                    nb_cbk_search )[ lag_counter ] );\n                    silk_assert( energy >= 0 );\n                }\n                if( cross_corr > 0 ) {\n                    CCmax_new = silk_DIV32_varQ( cross_corr, energy, 13 + 1 );          /* Q13 */\n                    /* Reduce depending on flatness of contour */\n                    diff = silk_int16_MAX - silk_MUL( contour_bias_Q15, j );            /* Q15 */\n                    silk_assert( diff == silk_SAT16( diff ) );\n                    CCmax_new = silk_SMULWB( CCmax_new, diff );                         /* Q14 */\n                } else {\n                    CCmax_new = 0;\n                }\n\n                if( CCmax_new > CCmax && ( d + silk_CB_lags_stage3[ 0 ][ j ] ) <= max_lag ) {\n                    CCmax   = CCmax_new;\n                    lag_new = d;\n                    CBimax  = j;\n                }\n            }\n            lag_counter++;\n        }\n\n        for( k = 0; k < nb_subfr; k++ ) {\n            pitch_out[ k ] = lag_new + matrix_ptr( Lag_CB_ptr, k, CBimax, cbk_size );\n            pitch_out[ k ] = silk_LIMIT( pitch_out[ k ], min_lag, PE_MAX_LAG_MS * Fs_kHz );\n        }\n        *lagIndex = (opus_int16)( lag_new - min_lag);\n        *contourIndex = (opus_int8)CBimax;\n    } else {        /* Fs_kHz == 8 */\n        /* Save Lags */\n        for( k = 0; k < nb_subfr; k++ ) {\n            pitch_out[ k ] = lag + matrix_ptr( Lag_CB_ptr, k, CBimax, cbk_size );\n            pitch_out[ k ] = silk_LIMIT( pitch_out[ k ], MIN_LAG_8KHZ, PE_MAX_LAG_MS * 8 );\n        }\n        *lagIndex = (opus_int16)( lag - MIN_LAG_8KHZ );\n        *contourIndex = (opus_int8)CBimax;\n    }\n    silk_assert( *lagIndex >= 0 );\n    /* return as voiced */\n    RESTORE_STACK;\n    return 0;\n}\n\n/***********************************************************************\n * Calculates the correlations used in stage 3 search. In order to cover\n * the whole lag codebook for all the searched offset lags (lag +- 2),\n * the following correlations are needed in each sub frame:\n *\n * sf1: lag range [-8,...,7] total 16 correlations\n * sf2: lag range [-4,...,4] total 9 correlations\n * sf3: lag range [-3,....4] total 8 correltions\n * sf4: lag range [-6,....8] total 15 correlations\n *\n * In total 48 correlations. The direct implementation computed in worst\n * case 4*12*5 = 240 correlations, but more likely around 120.\n ***********************************************************************/\nstatic void silk_P_Ana_calc_corr_st3(\n    silk_pe_stage3_vals cross_corr_st3[],              /* O 3 DIM correlation array */\n    const opus_int16  frame[],                         /* I vector to correlate         */\n    opus_int          start_lag,                       /* I lag offset to search around */\n    opus_int          sf_length,                       /* I length of a 5 ms subframe   */\n    opus_int          nb_subfr,                        /* I number of subframes         */\n    opus_int          complexity,                      /* I Complexity setting          */\n    int               arch                             /* I Run-time architecture       */\n)\n{\n    const opus_int16 *target_ptr;\n    opus_int   i, j, k, lag_counter, lag_low, lag_high;\n    opus_int   nb_cbk_search, delta, idx, cbk_size;\n    VARDECL( opus_int32, scratch_mem );\n    VARDECL( opus_int32, xcorr32 );\n    const opus_int8 *Lag_range_ptr, *Lag_CB_ptr;\n    SAVE_STACK;\n\n    silk_assert( complexity >= SILK_PE_MIN_COMPLEX );\n    silk_assert( complexity <= SILK_PE_MAX_COMPLEX );\n\n    if( nb_subfr == PE_MAX_NB_SUBFR ) {\n        Lag_range_ptr = &silk_Lag_range_stage3[ complexity ][ 0 ][ 0 ];\n        Lag_CB_ptr    = &silk_CB_lags_stage3[ 0 ][ 0 ];\n        nb_cbk_search = silk_nb_cbk_searchs_stage3[ complexity ];\n        cbk_size      = PE_NB_CBKS_STAGE3_MAX;\n    } else {\n        silk_assert( nb_subfr == PE_MAX_NB_SUBFR >> 1);\n        Lag_range_ptr = &silk_Lag_range_stage3_10_ms[ 0 ][ 0 ];\n        Lag_CB_ptr    = &silk_CB_lags_stage3_10_ms[ 0 ][ 0 ];\n        nb_cbk_search = PE_NB_CBKS_STAGE3_10MS;\n        cbk_size      = PE_NB_CBKS_STAGE3_10MS;\n    }\n    ALLOC( scratch_mem, SCRATCH_SIZE, opus_int32 );\n    ALLOC( xcorr32, SCRATCH_SIZE, opus_int32 );\n\n    target_ptr = &frame[ silk_LSHIFT( sf_length, 2 ) ]; /* Pointer to middle of frame */\n    for( k = 0; k < nb_subfr; k++ ) {\n        lag_counter = 0;\n\n        /* Calculate the correlations for each subframe */\n        lag_low  = matrix_ptr( Lag_range_ptr, k, 0, 2 );\n        lag_high = matrix_ptr( Lag_range_ptr, k, 1, 2 );\n        silk_assert(lag_high-lag_low+1 <= SCRATCH_SIZE);\n        celt_pitch_xcorr( target_ptr, target_ptr - start_lag - lag_high, xcorr32, sf_length, lag_high - lag_low + 1, arch );\n        for( j = lag_low; j <= lag_high; j++ ) {\n            silk_assert( lag_counter < SCRATCH_SIZE );\n            scratch_mem[ lag_counter ] = xcorr32[ lag_high - j ];\n            lag_counter++;\n        }\n\n        delta = matrix_ptr( Lag_range_ptr, k, 0, 2 );\n        for( i = 0; i < nb_cbk_search; i++ ) {\n            /* Fill out the 3 dim array that stores the correlations for */\n            /* each code_book vector for each start lag */\n            idx = matrix_ptr( Lag_CB_ptr, k, i, cbk_size ) - delta;\n            for( j = 0; j < PE_NB_STAGE3_LAGS; j++ ) {\n                silk_assert( idx + j < SCRATCH_SIZE );\n                silk_assert( idx + j < lag_counter );\n                matrix_ptr( cross_corr_st3, k, i, nb_cbk_search )[ j ] =\n                    scratch_mem[ idx + j ];\n            }\n        }\n        target_ptr += sf_length;\n    }\n    RESTORE_STACK;\n}\n\n/********************************************************************/\n/* Calculate the energies for first two subframes. The energies are */\n/* calculated recursively.                                          */\n/********************************************************************/\nstatic void silk_P_Ana_calc_energy_st3(\n    silk_pe_stage3_vals energies_st3[],                 /* O 3 DIM energy array */\n    const opus_int16  frame[],                          /* I vector to calc energy in    */\n    opus_int          start_lag,                        /* I lag offset to search around */\n    opus_int          sf_length,                        /* I length of one 5 ms subframe */\n    opus_int          nb_subfr,                         /* I number of subframes         */\n    opus_int          complexity                        /* I Complexity setting          */\n)\n{\n    const opus_int16 *target_ptr, *basis_ptr;\n    opus_int32 energy;\n    opus_int   k, i, j, lag_counter;\n    opus_int   nb_cbk_search, delta, idx, cbk_size, lag_diff;\n    VARDECL( opus_int32, scratch_mem );\n    const opus_int8 *Lag_range_ptr, *Lag_CB_ptr;\n    SAVE_STACK;\n\n    silk_assert( complexity >= SILK_PE_MIN_COMPLEX );\n    silk_assert( complexity <= SILK_PE_MAX_COMPLEX );\n\n    if( nb_subfr == PE_MAX_NB_SUBFR ) {\n        Lag_range_ptr = &silk_Lag_range_stage3[ complexity ][ 0 ][ 0 ];\n        Lag_CB_ptr    = &silk_CB_lags_stage3[ 0 ][ 0 ];\n        nb_cbk_search = silk_nb_cbk_searchs_stage3[ complexity ];\n        cbk_size      = PE_NB_CBKS_STAGE3_MAX;\n    } else {\n        silk_assert( nb_subfr == PE_MAX_NB_SUBFR >> 1);\n        Lag_range_ptr = &silk_Lag_range_stage3_10_ms[ 0 ][ 0 ];\n        Lag_CB_ptr    = &silk_CB_lags_stage3_10_ms[ 0 ][ 0 ];\n        nb_cbk_search = PE_NB_CBKS_STAGE3_10MS;\n        cbk_size      = PE_NB_CBKS_STAGE3_10MS;\n    }\n    ALLOC( scratch_mem, SCRATCH_SIZE, opus_int32 );\n\n    target_ptr = &frame[ silk_LSHIFT( sf_length, 2 ) ];\n    for( k = 0; k < nb_subfr; k++ ) {\n        lag_counter = 0;\n\n        /* Calculate the energy for first lag */\n        basis_ptr = target_ptr - ( start_lag + matrix_ptr( Lag_range_ptr, k, 0, 2 ) );\n        energy = silk_inner_prod_aligned( basis_ptr, basis_ptr, sf_length );\n        silk_assert( energy >= 0 );\n        scratch_mem[ lag_counter ] = energy;\n        lag_counter++;\n\n        lag_diff = ( matrix_ptr( Lag_range_ptr, k, 1, 2 ) -  matrix_ptr( Lag_range_ptr, k, 0, 2 ) + 1 );\n        for( i = 1; i < lag_diff; i++ ) {\n            /* remove part outside new window */\n            energy -= silk_SMULBB( basis_ptr[ sf_length - i ], basis_ptr[ sf_length - i ] );\n            silk_assert( energy >= 0 );\n\n            /* add part that comes into window */\n            energy = silk_ADD_SAT32( energy, silk_SMULBB( basis_ptr[ -i ], basis_ptr[ -i ] ) );\n            silk_assert( energy >= 0 );\n            silk_assert( lag_counter < SCRATCH_SIZE );\n            scratch_mem[ lag_counter ] = energy;\n            lag_counter++;\n        }\n\n        delta = matrix_ptr( Lag_range_ptr, k, 0, 2 );\n        for( i = 0; i < nb_cbk_search; i++ ) {\n            /* Fill out the 3 dim array that stores the correlations for    */\n            /* each code_book vector for each start lag                     */\n            idx = matrix_ptr( Lag_CB_ptr, k, i, cbk_size ) - delta;\n            for( j = 0; j < PE_NB_STAGE3_LAGS; j++ ) {\n                silk_assert( idx + j < SCRATCH_SIZE );\n                silk_assert( idx + j < lag_counter );\n                matrix_ptr( energies_st3, k, i, nb_cbk_search )[ j ] =\n                    scratch_mem[ idx + j ];\n                silk_assert(\n                    matrix_ptr( energies_st3, k, i, nb_cbk_search )[ j ] >= 0 );\n            }\n        }\n        target_ptr += sf_length;\n    }\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/prefilter_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n#include \"stack_alloc.h\"\n#include \"tuning_parameters.h\"\n\n/* Prefilter for finding Quantizer input signal */\nstatic OPUS_INLINE void silk_prefilt_FIX(\n    silk_prefilter_state_FIX    *P,                         /* I/O  state                               */\n    opus_int32                  st_res_Q12[],               /* I    short term residual signal          */\n    opus_int32                  xw_Q3[],                    /* O    prefiltered signal                  */\n    opus_int32                  HarmShapeFIRPacked_Q12,     /* I    Harmonic shaping coeficients        */\n    opus_int                    Tilt_Q14,                   /* I    Tilt shaping coeficient             */\n    opus_int32                  LF_shp_Q14,                 /* I    Low-frequancy shaping coeficients   */\n    opus_int                    lag,                        /* I    Lag for harmonic shaping            */\n    opus_int                    length                      /* I    Length of signals                   */\n);\n\nvoid silk_warped_LPC_analysis_filter_FIX(\n          opus_int32            state[],                    /* I/O  State [order + 1]                   */\n          opus_int32            res_Q2[],                   /* O    Residual signal [length]            */\n    const opus_int16            coef_Q13[],                 /* I    Coefficients [order]                */\n    const opus_int16            input[],                    /* I    Input signal [length]               */\n    const opus_int16            lambda_Q16,                 /* I    Warping factor                      */\n    const opus_int              length,                     /* I    Length of input signal              */\n    const opus_int              order                       /* I    Filter order (even)                 */\n)\n{\n    opus_int     n, i;\n    opus_int32   acc_Q11, tmp1, tmp2;\n\n    /* Order must be even */\n    silk_assert( ( order & 1 ) == 0 );\n\n    for( n = 0; n < length; n++ ) {\n        /* Output of lowpass section */\n        tmp2 = silk_SMLAWB( state[ 0 ], state[ 1 ], lambda_Q16 );\n        state[ 0 ] = silk_LSHIFT( input[ n ], 14 );\n        /* Output of allpass section */\n        tmp1 = silk_SMLAWB( state[ 1 ], state[ 2 ] - tmp2, lambda_Q16 );\n        state[ 1 ] = tmp2;\n        acc_Q11 = silk_RSHIFT( order, 1 );\n        acc_Q11 = silk_SMLAWB( acc_Q11, tmp2, coef_Q13[ 0 ] );\n        /* Loop over allpass sections */\n        for( i = 2; i < order; i += 2 ) {\n            /* Output of allpass section */\n            tmp2 = silk_SMLAWB( state[ i ], state[ i + 1 ] - tmp1, lambda_Q16 );\n            state[ i ] = tmp1;\n            acc_Q11 = silk_SMLAWB( acc_Q11, tmp1, coef_Q13[ i - 1 ] );\n            /* Output of allpass section */\n            tmp1 = silk_SMLAWB( state[ i + 1 ], state[ i + 2 ] - tmp2, lambda_Q16 );\n            state[ i + 1 ] = tmp2;\n            acc_Q11 = silk_SMLAWB( acc_Q11, tmp2, coef_Q13[ i ] );\n        }\n        state[ order ] = tmp1;\n        acc_Q11 = silk_SMLAWB( acc_Q11, tmp1, coef_Q13[ order - 1 ] );\n        res_Q2[ n ] = silk_LSHIFT( (opus_int32)input[ n ], 2 ) - silk_RSHIFT_ROUND( acc_Q11, 9 );\n    }\n}\n\nvoid silk_prefilter_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  Encoder state                                                               */\n    const silk_encoder_control_FIX  *psEncCtrl,                             /* I    Encoder control                                                             */\n    opus_int32                      xw_Q3[],                                /* O    Weighted signal                                                             */\n    const opus_int16                x[]                                     /* I    Speech signal                                                               */\n)\n{\n    silk_prefilter_state_FIX *P = &psEnc->sPrefilt;\n    opus_int   j, k, lag;\n    opus_int32 tmp_32;\n    const opus_int16 *AR1_shp_Q13;\n    const opus_int16 *px;\n    opus_int32 *pxw_Q3;\n    opus_int   HarmShapeGain_Q12, Tilt_Q14;\n    opus_int32 HarmShapeFIRPacked_Q12, LF_shp_Q14;\n    VARDECL( opus_int32, x_filt_Q12 );\n    VARDECL( opus_int32, st_res_Q2 );\n    opus_int16 B_Q10[ 2 ];\n    SAVE_STACK;\n\n    /* Set up pointers */\n    px  = x;\n    pxw_Q3 = xw_Q3;\n    lag = P->lagPrev;\n    ALLOC( x_filt_Q12, psEnc->sCmn.subfr_length, opus_int32 );\n    ALLOC( st_res_Q2, psEnc->sCmn.subfr_length, opus_int32 );\n    for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\n        /* Update Variables that change per sub frame */\n        if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) {\n            lag = psEncCtrl->pitchL[ k ];\n        }\n\n        /* Noise shape parameters */\n        HarmShapeGain_Q12 = silk_SMULWB( (opus_int32)psEncCtrl->HarmShapeGain_Q14[ k ], 16384 - psEncCtrl->HarmBoost_Q14[ k ] );\n        silk_assert( HarmShapeGain_Q12 >= 0 );\n        HarmShapeFIRPacked_Q12  =                          silk_RSHIFT( HarmShapeGain_Q12, 2 );\n        HarmShapeFIRPacked_Q12 |= silk_LSHIFT( (opus_int32)silk_RSHIFT( HarmShapeGain_Q12, 1 ), 16 );\n        Tilt_Q14    = psEncCtrl->Tilt_Q14[   k ];\n        LF_shp_Q14  = psEncCtrl->LF_shp_Q14[ k ];\n        AR1_shp_Q13 = &psEncCtrl->AR1_Q13[   k * MAX_SHAPE_LPC_ORDER ];\n\n        /* Short term FIR filtering*/\n        silk_warped_LPC_analysis_filter_FIX( P->sAR_shp, st_res_Q2, AR1_shp_Q13, px,\n            psEnc->sCmn.warping_Q16, psEnc->sCmn.subfr_length, psEnc->sCmn.shapingLPCOrder );\n\n        /* Reduce (mainly) low frequencies during harmonic emphasis */\n        B_Q10[ 0 ] = silk_RSHIFT_ROUND( psEncCtrl->GainsPre_Q14[ k ], 4 );\n        tmp_32 = silk_SMLABB( SILK_FIX_CONST( INPUT_TILT, 26 ), psEncCtrl->HarmBoost_Q14[ k ], HarmShapeGain_Q12 );   /* Q26 */\n        tmp_32 = silk_SMLABB( tmp_32, psEncCtrl->coding_quality_Q14, SILK_FIX_CONST( HIGH_RATE_INPUT_TILT, 12 ) );    /* Q26 */\n        tmp_32 = silk_SMULWB( tmp_32, -psEncCtrl->GainsPre_Q14[ k ] );                                                /* Q24 */\n        tmp_32 = silk_RSHIFT_ROUND( tmp_32, 14 );                                                                     /* Q10 */\n        B_Q10[ 1 ]= silk_SAT16( tmp_32 );\n        x_filt_Q12[ 0 ] = silk_MLA( silk_MUL( st_res_Q2[ 0 ], B_Q10[ 0 ] ), P->sHarmHP_Q2, B_Q10[ 1 ] );\n        for( j = 1; j < psEnc->sCmn.subfr_length; j++ ) {\n            x_filt_Q12[ j ] = silk_MLA( silk_MUL( st_res_Q2[ j ], B_Q10[ 0 ] ), st_res_Q2[ j - 1 ], B_Q10[ 1 ] );\n        }\n        P->sHarmHP_Q2 = st_res_Q2[ psEnc->sCmn.subfr_length - 1 ];\n\n        silk_prefilt_FIX( P, x_filt_Q12, pxw_Q3, HarmShapeFIRPacked_Q12, Tilt_Q14, LF_shp_Q14, lag, psEnc->sCmn.subfr_length );\n\n        px  += psEnc->sCmn.subfr_length;\n        pxw_Q3 += psEnc->sCmn.subfr_length;\n    }\n\n    P->lagPrev = psEncCtrl->pitchL[ psEnc->sCmn.nb_subfr - 1 ];\n    RESTORE_STACK;\n}\n\n/* Prefilter for finding Quantizer input signal */\nstatic OPUS_INLINE void silk_prefilt_FIX(\n    silk_prefilter_state_FIX    *P,                         /* I/O  state                               */\n    opus_int32                  st_res_Q12[],               /* I    short term residual signal          */\n    opus_int32                  xw_Q3[],                    /* O    prefiltered signal                  */\n    opus_int32                  HarmShapeFIRPacked_Q12,     /* I    Harmonic shaping coeficients        */\n    opus_int                    Tilt_Q14,                   /* I    Tilt shaping coeficient             */\n    opus_int32                  LF_shp_Q14,                 /* I    Low-frequancy shaping coeficients   */\n    opus_int                    lag,                        /* I    Lag for harmonic shaping            */\n    opus_int                    length                      /* I    Length of signals                   */\n)\n{\n    opus_int   i, idx, LTP_shp_buf_idx;\n    opus_int32 n_LTP_Q12, n_Tilt_Q10, n_LF_Q10;\n    opus_int32 sLF_MA_shp_Q12, sLF_AR_shp_Q12;\n    opus_int16 *LTP_shp_buf;\n\n    /* To speed up use temp variables instead of using the struct */\n    LTP_shp_buf     = P->sLTP_shp;\n    LTP_shp_buf_idx = P->sLTP_shp_buf_idx;\n    sLF_AR_shp_Q12  = P->sLF_AR_shp_Q12;\n    sLF_MA_shp_Q12  = P->sLF_MA_shp_Q12;\n\n    for( i = 0; i < length; i++ ) {\n        if( lag > 0 ) {\n            /* unrolled loop */\n            silk_assert( HARM_SHAPE_FIR_TAPS == 3 );\n            idx = lag + LTP_shp_buf_idx;\n            n_LTP_Q12 = silk_SMULBB(            LTP_shp_buf[ ( idx - HARM_SHAPE_FIR_TAPS / 2 - 1) & LTP_MASK ], HarmShapeFIRPacked_Q12 );\n            n_LTP_Q12 = silk_SMLABT( n_LTP_Q12, LTP_shp_buf[ ( idx - HARM_SHAPE_FIR_TAPS / 2    ) & LTP_MASK ], HarmShapeFIRPacked_Q12 );\n            n_LTP_Q12 = silk_SMLABB( n_LTP_Q12, LTP_shp_buf[ ( idx - HARM_SHAPE_FIR_TAPS / 2 + 1) & LTP_MASK ], HarmShapeFIRPacked_Q12 );\n        } else {\n            n_LTP_Q12 = 0;\n        }\n\n        n_Tilt_Q10 = silk_SMULWB( sLF_AR_shp_Q12, Tilt_Q14 );\n        n_LF_Q10   = silk_SMLAWB( silk_SMULWT( sLF_AR_shp_Q12, LF_shp_Q14 ), sLF_MA_shp_Q12, LF_shp_Q14 );\n\n        sLF_AR_shp_Q12 = silk_SUB32( st_res_Q12[ i ], silk_LSHIFT( n_Tilt_Q10, 2 ) );\n        sLF_MA_shp_Q12 = silk_SUB32( sLF_AR_shp_Q12,  silk_LSHIFT( n_LF_Q10,   2 ) );\n\n        LTP_shp_buf_idx = ( LTP_shp_buf_idx - 1 ) & LTP_MASK;\n        LTP_shp_buf[ LTP_shp_buf_idx ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( sLF_MA_shp_Q12, 12 ) );\n\n        xw_Q3[i] = silk_RSHIFT_ROUND( silk_SUB32( sLF_MA_shp_Q12, n_LTP_Q12 ), 9 );\n    }\n\n    /* Copy temp variable back to state */\n    P->sLF_AR_shp_Q12   = sLF_AR_shp_Q12;\n    P->sLF_MA_shp_Q12   = sLF_MA_shp_Q12;\n    P->sLTP_shp_buf_idx = LTP_shp_buf_idx;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/process_gains_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n#include \"tuning_parameters.h\"\n\n/* Processing of gains */\nvoid silk_process_gains_FIX(\n    silk_encoder_state_FIX          *psEnc,                                 /* I/O  Encoder state                                                               */\n    silk_encoder_control_FIX        *psEncCtrl,                             /* I/O  Encoder control                                                             */\n    opus_int                        condCoding                              /* I    The type of conditional coding to use                                       */\n)\n{\n    silk_shape_state_FIX *psShapeSt = &psEnc->sShape;\n    opus_int     k;\n    opus_int32   s_Q16, InvMaxSqrVal_Q16, gain, gain_squared, ResNrg, ResNrgPart, quant_offset_Q10;\n\n    /* Gain reduction when LTP coding gain is high */\n    if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) {\n        /*s = -0.5f * silk_sigmoid( 0.25f * ( psEncCtrl->LTPredCodGain - 12.0f ) ); */\n        s_Q16 = -silk_sigm_Q15( silk_RSHIFT_ROUND( psEncCtrl->LTPredCodGain_Q7 - SILK_FIX_CONST( 12.0, 7 ), 4 ) );\n        for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\n            psEncCtrl->Gains_Q16[ k ] = silk_SMLAWB( psEncCtrl->Gains_Q16[ k ], psEncCtrl->Gains_Q16[ k ], s_Q16 );\n        }\n    }\n\n    /* Limit the quantized signal */\n    /* InvMaxSqrVal = pow( 2.0f, 0.33f * ( 21.0f - SNR_dB ) ) / subfr_length; */\n    InvMaxSqrVal_Q16 = silk_DIV32_16( silk_log2lin(\n        silk_SMULWB( SILK_FIX_CONST( 21 + 16 / 0.33, 7 ) - psEnc->sCmn.SNR_dB_Q7, SILK_FIX_CONST( 0.33, 16 ) ) ), psEnc->sCmn.subfr_length );\n\n    for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\n        /* Soft limit on ratio residual energy and squared gains */\n        ResNrg     = psEncCtrl->ResNrg[ k ];\n        ResNrgPart = silk_SMULWW( ResNrg, InvMaxSqrVal_Q16 );\n        if( psEncCtrl->ResNrgQ[ k ] > 0 ) {\n            ResNrgPart = silk_RSHIFT_ROUND( ResNrgPart, psEncCtrl->ResNrgQ[ k ] );\n        } else {\n            if( ResNrgPart >= silk_RSHIFT( silk_int32_MAX, -psEncCtrl->ResNrgQ[ k ] ) ) {\n                ResNrgPart = silk_int32_MAX;\n            } else {\n                ResNrgPart = silk_LSHIFT( ResNrgPart, -psEncCtrl->ResNrgQ[ k ] );\n            }\n        }\n        gain = psEncCtrl->Gains_Q16[ k ];\n        gain_squared = silk_ADD_SAT32( ResNrgPart, silk_SMMUL( gain, gain ) );\n        if( gain_squared < silk_int16_MAX ) {\n            /* recalculate with higher precision */\n            gain_squared = silk_SMLAWW( silk_LSHIFT( ResNrgPart, 16 ), gain, gain );\n            silk_assert( gain_squared > 0 );\n            gain = silk_SQRT_APPROX( gain_squared );                    /* Q8   */\n            gain = silk_min( gain, silk_int32_MAX >> 8 );\n            psEncCtrl->Gains_Q16[ k ] = silk_LSHIFT_SAT32( gain, 8 );   /* Q16  */\n        } else {\n            gain = silk_SQRT_APPROX( gain_squared );                    /* Q0   */\n            gain = silk_min( gain, silk_int32_MAX >> 16 );\n            psEncCtrl->Gains_Q16[ k ] = silk_LSHIFT_SAT32( gain, 16 );  /* Q16  */\n        }\n    }\n\n    /* Save unquantized gains and gain Index */\n    silk_memcpy( psEncCtrl->GainsUnq_Q16, psEncCtrl->Gains_Q16, psEnc->sCmn.nb_subfr * sizeof( opus_int32 ) );\n    psEncCtrl->lastGainIndexPrev = psShapeSt->LastGainIndex;\n\n    /* Quantize gains */\n    silk_gains_quant( psEnc->sCmn.indices.GainsIndices, psEncCtrl->Gains_Q16,\n        &psShapeSt->LastGainIndex, condCoding == CODE_CONDITIONALLY, psEnc->sCmn.nb_subfr );\n\n    /* Set quantizer offset for voiced signals. Larger offset when LTP coding gain is low or tilt is high (ie low-pass) */\n    if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) {\n        if( psEncCtrl->LTPredCodGain_Q7 + silk_RSHIFT( psEnc->sCmn.input_tilt_Q15, 8 ) > SILK_FIX_CONST( 1.0, 7 ) ) {\n            psEnc->sCmn.indices.quantOffsetType = 0;\n        } else {\n            psEnc->sCmn.indices.quantOffsetType = 1;\n        }\n    }\n\n    /* Quantizer boundary adjustment */\n    quant_offset_Q10 = silk_Quantization_Offsets_Q10[ psEnc->sCmn.indices.signalType >> 1 ][ psEnc->sCmn.indices.quantOffsetType ];\n    psEncCtrl->Lambda_Q10 = SILK_FIX_CONST( LAMBDA_OFFSET, 10 )\n                          + silk_SMULBB( SILK_FIX_CONST( LAMBDA_DELAYED_DECISIONS, 10 ), psEnc->sCmn.nStatesDelayedDecision )\n                          + silk_SMULWB( SILK_FIX_CONST( LAMBDA_SPEECH_ACT,        18 ), psEnc->sCmn.speech_activity_Q8     )\n                          + silk_SMULWB( SILK_FIX_CONST( LAMBDA_INPUT_QUALITY,     12 ), psEncCtrl->input_quality_Q14       )\n                          + silk_SMULWB( SILK_FIX_CONST( LAMBDA_CODING_QUALITY,    12 ), psEncCtrl->coding_quality_Q14      )\n                          + silk_SMULWB( SILK_FIX_CONST( LAMBDA_QUANT_OFFSET,      16 ), quant_offset_Q10                   );\n\n    silk_assert( psEncCtrl->Lambda_Q10 > 0 );\n    silk_assert( psEncCtrl->Lambda_Q10 < SILK_FIX_CONST( 2, 10 ) );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/regularize_correlations_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n\n/* Add noise to matrix diagonal */\nvoid silk_regularize_correlations_FIX(\n    opus_int32                      *XX,                                    /* I/O  Correlation matrices                                                        */\n    opus_int32                      *xx,                                    /* I/O  Correlation values                                                          */\n    opus_int32                      noise,                                  /* I    Noise to add                                                                */\n    opus_int                        D                                       /* I    Dimension of XX                                                             */\n)\n{\n    opus_int i;\n    for( i = 0; i < D; i++ ) {\n        matrix_ptr( &XX[ 0 ], i, i, D ) = silk_ADD32( matrix_ptr( &XX[ 0 ], i, i, D ), noise );\n    }\n    xx[ 0 ] += noise;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/residual_energy16_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n\n/* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */\nopus_int32 silk_residual_energy16_covar_FIX(\n    const opus_int16                *c,                                     /* I    Prediction vector                                                           */\n    const opus_int32                *wXX,                                   /* I    Correlation matrix                                                          */\n    const opus_int32                *wXx,                                   /* I    Correlation vector                                                          */\n    opus_int32                      wxx,                                    /* I    Signal energy                                                               */\n    opus_int                        D,                                      /* I    Dimension                                                                   */\n    opus_int                        cQ                                      /* I    Q value for c vector 0 - 15                                                 */\n)\n{\n    opus_int   i, j, lshifts, Qxtra;\n    opus_int32 c_max, w_max, tmp, tmp2, nrg;\n    opus_int   cn[ MAX_MATRIX_SIZE ];\n    const opus_int32 *pRow;\n\n    /* Safety checks */\n    silk_assert( D >=  0 );\n    silk_assert( D <= 16 );\n    silk_assert( cQ >  0 );\n    silk_assert( cQ < 16 );\n\n    lshifts = 16 - cQ;\n    Qxtra = lshifts;\n\n    c_max = 0;\n    for( i = 0; i < D; i++ ) {\n        c_max = silk_max_32( c_max, silk_abs( (opus_int32)c[ i ] ) );\n    }\n    Qxtra = silk_min_int( Qxtra, silk_CLZ32( c_max ) - 17 );\n\n    w_max = silk_max_32( wXX[ 0 ], wXX[ D * D - 1 ] );\n    Qxtra = silk_min_int( Qxtra, silk_CLZ32( silk_MUL( D, silk_RSHIFT( silk_SMULWB( w_max, c_max ), 4 ) ) ) - 5 );\n    Qxtra = silk_max_int( Qxtra, 0 );\n    for( i = 0; i < D; i++ ) {\n        cn[ i ] = silk_LSHIFT( ( opus_int )c[ i ], Qxtra );\n        silk_assert( silk_abs(cn[i]) <= ( silk_int16_MAX + 1 ) ); /* Check that silk_SMLAWB can be used */\n    }\n    lshifts -= Qxtra;\n\n    /* Compute wxx - 2 * wXx * c */\n    tmp = 0;\n    for( i = 0; i < D; i++ ) {\n        tmp = silk_SMLAWB( tmp, wXx[ i ], cn[ i ] );\n    }\n    nrg = silk_RSHIFT( wxx, 1 + lshifts ) - tmp;                         /* Q: -lshifts - 1 */\n\n    /* Add c' * wXX * c, assuming wXX is symmetric */\n    tmp2 = 0;\n    for( i = 0; i < D; i++ ) {\n        tmp = 0;\n        pRow = &wXX[ i * D ];\n        for( j = i + 1; j < D; j++ ) {\n            tmp = silk_SMLAWB( tmp, pRow[ j ], cn[ j ] );\n        }\n        tmp  = silk_SMLAWB( tmp,  silk_RSHIFT( pRow[ i ], 1 ), cn[ i ] );\n        tmp2 = silk_SMLAWB( tmp2, tmp,                        cn[ i ] );\n    }\n    nrg = silk_ADD_LSHIFT32( nrg, tmp2, lshifts );                       /* Q: -lshifts - 1 */\n\n    /* Keep one bit free always, because we add them for LSF interpolation */\n    if( nrg < 1 ) {\n        nrg = 1;\n    } else if( nrg > silk_RSHIFT( silk_int32_MAX, lshifts + 2 ) ) {\n        nrg = silk_int32_MAX >> 1;\n    } else {\n        nrg = silk_LSHIFT( nrg, lshifts + 1 );                           /* Q0 */\n    }\n    return nrg;\n\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/residual_energy_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n#include \"stack_alloc.h\"\n\n/* Calculates residual energies of input subframes where all subframes have LPC_order   */\n/* of preceding samples                                                                 */\nvoid silk_residual_energy_FIX(\n          opus_int32                nrgs[ MAX_NB_SUBFR ],                   /* O    Residual energy per subframe                                                */\n          opus_int                  nrgsQ[ MAX_NB_SUBFR ],                  /* O    Q value per subframe                                                        */\n    const opus_int16                x[],                                    /* I    Input signal                                                                */\n          opus_int16                a_Q12[ 2 ][ MAX_LPC_ORDER ],            /* I    AR coefs for each frame half                                                */\n    const opus_int32                gains[ MAX_NB_SUBFR ],                  /* I    Quantization gains                                                          */\n    const opus_int                  subfr_length,                           /* I    Subframe length                                                             */\n    const opus_int                  nb_subfr,                               /* I    Number of subframes                                                         */\n    const opus_int                  LPC_order                               /* I    LPC order                                                                   */\n)\n{\n    opus_int         offset, i, j, rshift, lz1, lz2;\n    opus_int16       *LPC_res_ptr;\n    VARDECL( opus_int16, LPC_res );\n    const opus_int16 *x_ptr;\n    opus_int32       tmp32;\n    SAVE_STACK;\n\n    x_ptr  = x;\n    offset = LPC_order + subfr_length;\n\n    /* Filter input to create the LPC residual for each frame half, and measure subframe energies */\n    ALLOC( LPC_res, ( MAX_NB_SUBFR >> 1 ) * offset, opus_int16 );\n    silk_assert( ( nb_subfr >> 1 ) * ( MAX_NB_SUBFR >> 1 ) == nb_subfr );\n    for( i = 0; i < nb_subfr >> 1; i++ ) {\n        /* Calculate half frame LPC residual signal including preceding samples */\n        silk_LPC_analysis_filter( LPC_res, x_ptr, a_Q12[ i ], ( MAX_NB_SUBFR >> 1 ) * offset, LPC_order );\n\n        /* Point to first subframe of the just calculated LPC residual signal */\n        LPC_res_ptr = LPC_res + LPC_order;\n        for( j = 0; j < ( MAX_NB_SUBFR >> 1 ); j++ ) {\n            /* Measure subframe energy */\n            silk_sum_sqr_shift( &nrgs[ i * ( MAX_NB_SUBFR >> 1 ) + j ], &rshift, LPC_res_ptr, subfr_length );\n\n            /* Set Q values for the measured energy */\n            nrgsQ[ i * ( MAX_NB_SUBFR >> 1 ) + j ] = -rshift;\n\n            /* Move to next subframe */\n            LPC_res_ptr += offset;\n        }\n        /* Move to next frame half */\n        x_ptr += ( MAX_NB_SUBFR >> 1 ) * offset;\n    }\n\n    /* Apply the squared subframe gains */\n    for( i = 0; i < nb_subfr; i++ ) {\n        /* Fully upscale gains and energies */\n        lz1 = silk_CLZ32( nrgs[  i ] ) - 1;\n        lz2 = silk_CLZ32( gains[ i ] ) - 1;\n\n        tmp32 = silk_LSHIFT32( gains[ i ], lz2 );\n\n        /* Find squared gains */\n        tmp32 = silk_SMMUL( tmp32, tmp32 ); /* Q( 2 * lz2 - 32 )*/\n\n        /* Scale energies */\n        nrgs[ i ] = silk_SMMUL( tmp32, silk_LSHIFT32( nrgs[ i ], lz1 ) ); /* Q( nrgsQ[ i ] + lz1 + 2 * lz2 - 32 - 32 )*/\n        nrgsQ[ i ] += lz1 + 2 * lz2 - 32 - 32;\n    }\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/schur64_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Slower than schur(), but more accurate.                              */\n/* Uses SMULL(), available on armv4                                     */\nopus_int32 silk_schur64(                            /* O    returns residual energy                                     */\n    opus_int32                  rc_Q16[],           /* O    Reflection coefficients [order] Q16                         */\n    const opus_int32            c[],                /* I    Correlations [order+1]                                      */\n    opus_int32                  order               /* I    Prediction order                                            */\n)\n{\n    opus_int   k, n;\n    opus_int32 C[ SILK_MAX_ORDER_LPC + 1 ][ 2 ];\n    opus_int32 Ctmp1_Q30, Ctmp2_Q30, rc_tmp_Q31;\n\n    silk_assert( order==6||order==8||order==10||order==12||order==14||order==16 );\n\n    /* Check for invalid input */\n    if( c[ 0 ] <= 0 ) {\n        silk_memset( rc_Q16, 0, order * sizeof( opus_int32 ) );\n        return 0;\n    }\n\n    for( k = 0; k < order + 1; k++ ) {\n        C[ k ][ 0 ] = C[ k ][ 1 ] = c[ k ];\n    }\n\n    for( k = 0; k < order; k++ ) {\n        /* Check that we won't be getting an unstable rc, otherwise stop here. */\n        if (silk_abs_int32(C[ k + 1 ][ 0 ]) >= C[ 0 ][ 1 ]) {\n           if ( C[ k + 1 ][ 0 ] > 0 ) {\n              rc_Q16[ k ] = -SILK_FIX_CONST( .99f, 16 );\n           } else {\n              rc_Q16[ k ] = SILK_FIX_CONST( .99f, 16 );\n           }\n           k++;\n           break;\n        }\n\n        /* Get reflection coefficient: divide two Q30 values and get result in Q31 */\n        rc_tmp_Q31 = silk_DIV32_varQ( -C[ k + 1 ][ 0 ], C[ 0 ][ 1 ], 31 );\n\n        /* Save the output */\n        rc_Q16[ k ] = silk_RSHIFT_ROUND( rc_tmp_Q31, 15 );\n\n        /* Update correlations */\n        for( n = 0; n < order - k; n++ ) {\n            Ctmp1_Q30 = C[ n + k + 1 ][ 0 ];\n            Ctmp2_Q30 = C[ n ][ 1 ];\n\n            /* Multiply and add the highest int32 */\n            C[ n + k + 1 ][ 0 ] = Ctmp1_Q30 + silk_SMMUL( silk_LSHIFT( Ctmp2_Q30, 1 ), rc_tmp_Q31 );\n            C[ n ][ 1 ]         = Ctmp2_Q30 + silk_SMMUL( silk_LSHIFT( Ctmp1_Q30, 1 ), rc_tmp_Q31 );\n        }\n    }\n\n    for(; k < order; k++ ) {\n       rc_Q16[ k ] = 0;\n    }\n\n    return silk_max_32( 1, C[ 0 ][ 1 ] );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/schur_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Faster than schur64(), but much less accurate.                       */\n/* uses SMLAWB(), requiring armv5E and higher.                          */\nopus_int32 silk_schur(                              /* O    Returns residual energy                                     */\n    opus_int16                  *rc_Q15,            /* O    reflection coefficients [order] Q15                         */\n    const opus_int32            *c,                 /* I    correlations [order+1]                                      */\n    const opus_int32            order               /* I    prediction order                                            */\n)\n{\n    opus_int        k, n, lz;\n    opus_int32    C[ SILK_MAX_ORDER_LPC + 1 ][ 2 ];\n    opus_int32    Ctmp1, Ctmp2, rc_tmp_Q15;\n\n    silk_assert( order==6||order==8||order==10||order==12||order==14||order==16 );\n\n    /* Get number of leading zeros */\n    lz = silk_CLZ32( c[ 0 ] );\n\n    /* Copy correlations and adjust level to Q30 */\n    if( lz < 2 ) {\n        /* lz must be 1, so shift one to the right */\n        for( k = 0; k < order + 1; k++ ) {\n            C[ k ][ 0 ] = C[ k ][ 1 ] = silk_RSHIFT( c[ k ], 1 );\n        }\n    } else if( lz > 2 ) {\n        /* Shift to the left */\n        lz -= 2;\n        for( k = 0; k < order + 1; k++ ) {\n            C[ k ][ 0 ] = C[ k ][ 1 ] = silk_LSHIFT( c[ k ], lz );\n        }\n    } else {\n        /* No need to shift */\n        for( k = 0; k < order + 1; k++ ) {\n            C[ k ][ 0 ] = C[ k ][ 1 ] = c[ k ];\n        }\n    }\n\n    for( k = 0; k < order; k++ ) {\n        /* Check that we won't be getting an unstable rc, otherwise stop here. */\n        if (silk_abs_int32(C[ k + 1 ][ 0 ]) >= C[ 0 ][ 1 ]) {\n           if ( C[ k + 1 ][ 0 ] > 0 ) {\n              rc_Q15[ k ] = -SILK_FIX_CONST( .99f, 15 );\n           } else {\n              rc_Q15[ k ] = SILK_FIX_CONST( .99f, 15 );\n           }\n           k++;\n           break;\n        }\n\n        /* Get reflection coefficient */\n        rc_tmp_Q15 = -silk_DIV32_16( C[ k + 1 ][ 0 ], silk_max_32( silk_RSHIFT( C[ 0 ][ 1 ], 15 ), 1 ) );\n\n        /* Clip (shouldn't happen for properly conditioned inputs) */\n        rc_tmp_Q15 = silk_SAT16( rc_tmp_Q15 );\n\n        /* Store */\n        rc_Q15[ k ] = (opus_int16)rc_tmp_Q15;\n\n        /* Update correlations */\n        for( n = 0; n < order - k; n++ ) {\n            Ctmp1 = C[ n + k + 1 ][ 0 ];\n            Ctmp2 = C[ n ][ 1 ];\n            C[ n + k + 1 ][ 0 ] = silk_SMLAWB( Ctmp1, silk_LSHIFT( Ctmp2, 1 ), rc_tmp_Q15 );\n            C[ n ][ 1 ]         = silk_SMLAWB( Ctmp2, silk_LSHIFT( Ctmp1, 1 ), rc_tmp_Q15 );\n        }\n    }\n\n    for(; k < order; k++ ) {\n       rc_Q15[ k ] = 0;\n    }\n\n    /* return residual energy */\n    return silk_max_32( 1, C[ 0 ][ 1 ] );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/solve_LS_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n#include \"stack_alloc.h\"\n#include \"tuning_parameters.h\"\n\n/*****************************/\n/* Internal function headers */\n/*****************************/\n\ntypedef struct {\n    opus_int32 Q36_part;\n    opus_int32 Q48_part;\n} inv_D_t;\n\n/* Factorize square matrix A into LDL form */\nstatic OPUS_INLINE void silk_LDL_factorize_FIX(\n    opus_int32          *A,         /* I/O Pointer to Symetric Square Matrix                            */\n    opus_int            M,          /* I   Size of Matrix                                               */\n    opus_int32          *L_Q16,     /* I/O Pointer to Square Upper triangular Matrix                    */\n    inv_D_t             *inv_D      /* I/O Pointer to vector holding inverted diagonal elements of D    */\n);\n\n/* Solve Lx = b, when L is lower triangular and has ones on the diagonal */\nstatic OPUS_INLINE void silk_LS_SolveFirst_FIX(\n    const opus_int32    *L_Q16,     /* I    Pointer to Lower Triangular Matrix                          */\n    opus_int            M,          /* I    Dim of Matrix equation                                      */\n    const opus_int32    *b,         /* I    b Vector                                                    */\n    opus_int32          *x_Q16      /* O    x Vector                                                    */\n);\n\n/* Solve L^t*x = b, where L is lower triangular with ones on the diagonal */\nstatic OPUS_INLINE void silk_LS_SolveLast_FIX(\n    const opus_int32    *L_Q16,     /* I    Pointer to Lower Triangular Matrix                          */\n    const opus_int      M,          /* I    Dim of Matrix equation                                      */\n    const opus_int32    *b,         /* I    b Vector                                                    */\n    opus_int32          *x_Q16      /* O    x Vector                                                    */\n);\n\nstatic OPUS_INLINE void silk_LS_divide_Q16_FIX(\n    opus_int32          T[],        /* I/O  Numenator vector                                            */\n    inv_D_t             *inv_D,     /* I    1 / D vector                                                */\n    opus_int            M           /* I    dimension                                                   */\n);\n\n/* Solves Ax = b, assuming A is symmetric */\nvoid silk_solve_LDL_FIX(\n    opus_int32                      *A,                                     /* I    Pointer to symetric square matrix A                                         */\n    opus_int                        M,                                      /* I    Size of matrix                                                              */\n    const opus_int32                *b,                                     /* I    Pointer to b vector                                                         */\n    opus_int32                      *x_Q16                                  /* O    Pointer to x solution vector                                                */\n)\n{\n    VARDECL( opus_int32, L_Q16 );\n    opus_int32 Y[      MAX_MATRIX_SIZE ];\n    inv_D_t   inv_D[  MAX_MATRIX_SIZE ];\n    SAVE_STACK;\n\n    silk_assert( M <= MAX_MATRIX_SIZE );\n    ALLOC( L_Q16, M * M, opus_int32 );\n\n    /***************************************************\n    Factorize A by LDL such that A = L*D*L',\n    where L is lower triangular with ones on diagonal\n    ****************************************************/\n    silk_LDL_factorize_FIX( A, M, L_Q16, inv_D );\n\n    /****************************************************\n    * substitute D*L'*x = Y. ie:\n    L*D*L'*x = b => L*Y = b <=> Y = inv(L)*b\n    ******************************************************/\n    silk_LS_SolveFirst_FIX( L_Q16, M, b, Y );\n\n    /****************************************************\n    D*L'*x = Y <=> L'*x = inv(D)*Y, because D is\n    diagonal just multiply with 1/d_i\n    ****************************************************/\n    silk_LS_divide_Q16_FIX( Y, inv_D, M );\n\n    /****************************************************\n    x = inv(L') * inv(D) * Y\n    *****************************************************/\n    silk_LS_SolveLast_FIX( L_Q16, M, Y, x_Q16 );\n    RESTORE_STACK;\n}\n\nstatic OPUS_INLINE void silk_LDL_factorize_FIX(\n    opus_int32          *A,         /* I/O Pointer to Symetric Square Matrix                            */\n    opus_int            M,          /* I   Size of Matrix                                               */\n    opus_int32          *L_Q16,     /* I/O Pointer to Square Upper triangular Matrix                    */\n    inv_D_t             *inv_D      /* I/O Pointer to vector holding inverted diagonal elements of D    */\n)\n{\n    opus_int   i, j, k, status, loop_count;\n    const opus_int32 *ptr1, *ptr2;\n    opus_int32 diag_min_value, tmp_32, err;\n    opus_int32 v_Q0[ MAX_MATRIX_SIZE ], D_Q0[ MAX_MATRIX_SIZE ];\n    opus_int32 one_div_diag_Q36, one_div_diag_Q40, one_div_diag_Q48;\n\n    silk_assert( M <= MAX_MATRIX_SIZE );\n\n    status = 1;\n    diag_min_value = silk_max_32( silk_SMMUL( silk_ADD_SAT32( A[ 0 ], A[ silk_SMULBB( M, M ) - 1 ] ), SILK_FIX_CONST( FIND_LTP_COND_FAC, 31 ) ), 1 << 9 );\n    for( loop_count = 0; loop_count < M && status == 1; loop_count++ ) {\n        status = 0;\n        for( j = 0; j < M; j++ ) {\n            ptr1 = matrix_adr( L_Q16, j, 0, M );\n            tmp_32 = 0;\n            for( i = 0; i < j; i++ ) {\n                v_Q0[ i ] = silk_SMULWW(         D_Q0[ i ], ptr1[ i ] ); /* Q0 */\n                tmp_32    = silk_SMLAWW( tmp_32, v_Q0[ i ], ptr1[ i ] ); /* Q0 */\n            }\n            tmp_32 = silk_SUB32( matrix_ptr( A, j, j, M ), tmp_32 );\n\n            if( tmp_32 < diag_min_value ) {\n                tmp_32 = silk_SUB32( silk_SMULBB( loop_count + 1, diag_min_value ), tmp_32 );\n                /* Matrix not positive semi-definite, or ill conditioned */\n                for( i = 0; i < M; i++ ) {\n                    matrix_ptr( A, i, i, M ) = silk_ADD32( matrix_ptr( A, i, i, M ), tmp_32 );\n                }\n                status = 1;\n                break;\n            }\n            D_Q0[ j ] = tmp_32;                         /* always < max(Correlation) */\n\n            /* two-step division */\n            one_div_diag_Q36 = silk_INVERSE32_varQ( tmp_32, 36 );                    /* Q36 */\n            one_div_diag_Q40 = silk_LSHIFT( one_div_diag_Q36, 4 );                   /* Q40 */\n            err = silk_SUB32( (opus_int32)1 << 24, silk_SMULWW( tmp_32, one_div_diag_Q40 ) );     /* Q24 */\n            one_div_diag_Q48 = silk_SMULWW( err, one_div_diag_Q40 );                 /* Q48 */\n\n            /* Save 1/Ds */\n            inv_D[ j ].Q36_part = one_div_diag_Q36;\n            inv_D[ j ].Q48_part = one_div_diag_Q48;\n\n            matrix_ptr( L_Q16, j, j, M ) = 65536; /* 1.0 in Q16 */\n            ptr1 = matrix_adr( A, j, 0, M );\n            ptr2 = matrix_adr( L_Q16, j + 1, 0, M );\n            for( i = j + 1; i < M; i++ ) {\n                tmp_32 = 0;\n                for( k = 0; k < j; k++ ) {\n                    tmp_32 = silk_SMLAWW( tmp_32, v_Q0[ k ], ptr2[ k ] ); /* Q0 */\n                }\n                tmp_32 = silk_SUB32( ptr1[ i ], tmp_32 ); /* always < max(Correlation) */\n\n                /* tmp_32 / D_Q0[j] : Divide to Q16 */\n                matrix_ptr( L_Q16, i, j, M ) = silk_ADD32( silk_SMMUL( tmp_32, one_div_diag_Q48 ),\n                    silk_RSHIFT( silk_SMULWW( tmp_32, one_div_diag_Q36 ), 4 ) );\n\n                /* go to next column */\n                ptr2 += M;\n            }\n        }\n    }\n\n    silk_assert( status == 0 );\n}\n\nstatic OPUS_INLINE void silk_LS_divide_Q16_FIX(\n    opus_int32          T[],        /* I/O  Numenator vector                                            */\n    inv_D_t             *inv_D,     /* I    1 / D vector                                                */\n    opus_int            M           /* I    dimension                                                   */\n)\n{\n    opus_int   i;\n    opus_int32 tmp_32;\n    opus_int32 one_div_diag_Q36, one_div_diag_Q48;\n\n    for( i = 0; i < M; i++ ) {\n        one_div_diag_Q36 = inv_D[ i ].Q36_part;\n        one_div_diag_Q48 = inv_D[ i ].Q48_part;\n\n        tmp_32 = T[ i ];\n        T[ i ] = silk_ADD32( silk_SMMUL( tmp_32, one_div_diag_Q48 ), silk_RSHIFT( silk_SMULWW( tmp_32, one_div_diag_Q36 ), 4 ) );\n    }\n}\n\n/* Solve Lx = b, when L is lower triangular and has ones on the diagonal */\nstatic OPUS_INLINE void silk_LS_SolveFirst_FIX(\n    const opus_int32    *L_Q16,     /* I    Pointer to Lower Triangular Matrix                          */\n    opus_int            M,          /* I    Dim of Matrix equation                                      */\n    const opus_int32    *b,         /* I    b Vector                                                    */\n    opus_int32          *x_Q16      /* O    x Vector                                                    */\n)\n{\n    opus_int i, j;\n    const opus_int32 *ptr32;\n    opus_int32 tmp_32;\n\n    for( i = 0; i < M; i++ ) {\n        ptr32 = matrix_adr( L_Q16, i, 0, M );\n        tmp_32 = 0;\n        for( j = 0; j < i; j++ ) {\n            tmp_32 = silk_SMLAWW( tmp_32, ptr32[ j ], x_Q16[ j ] );\n        }\n        x_Q16[ i ] = silk_SUB32( b[ i ], tmp_32 );\n    }\n}\n\n/* Solve L^t*x = b, where L is lower triangular with ones on the diagonal */\nstatic OPUS_INLINE void silk_LS_SolveLast_FIX(\n    const opus_int32    *L_Q16,     /* I    Pointer to Lower Triangular Matrix                          */\n    const opus_int      M,          /* I    Dim of Matrix equation                                      */\n    const opus_int32    *b,         /* I    b Vector                                                    */\n    opus_int32          *x_Q16      /* O    x Vector                                                    */\n)\n{\n    opus_int i, j;\n    const opus_int32 *ptr32;\n    opus_int32 tmp_32;\n\n    for( i = M - 1; i >= 0; i-- ) {\n        ptr32 = matrix_adr( L_Q16, 0, i, M );\n        tmp_32 = 0;\n        for( j = M - 1; j > i; j-- ) {\n            tmp_32 = silk_SMLAWW( tmp_32, ptr32[ silk_SMULBB( j, M ) ], x_Q16[ j ] );\n        }\n        x_Q16[ i ] = silk_SUB32( b[ i ], tmp_32 );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/structs_FIX.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_STRUCTS_FIX_H\n#define SILK_STRUCTS_FIX_H\n\n#include \"typedef.h\"\n#include \"main.h\"\n#include \"structs.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n/********************************/\n/* Noise shaping analysis state */\n/********************************/\ntypedef struct {\n    opus_int8                   LastGainIndex;\n    opus_int32                  HarmBoost_smth_Q16;\n    opus_int32                  HarmShapeGain_smth_Q16;\n    opus_int32                  Tilt_smth_Q16;\n} silk_shape_state_FIX;\n\n/********************************/\n/* Prefilter state              */\n/********************************/\ntypedef struct {\n    opus_int16                  sLTP_shp[ LTP_BUF_LENGTH ];\n    opus_int32                  sAR_shp[ MAX_SHAPE_LPC_ORDER + 1 ];\n    opus_int                    sLTP_shp_buf_idx;\n    opus_int32                  sLF_AR_shp_Q12;\n    opus_int32                  sLF_MA_shp_Q12;\n    opus_int32                  sHarmHP_Q2;\n    opus_int32                  rand_seed;\n    opus_int                    lagPrev;\n} silk_prefilter_state_FIX;\n\n/********************************/\n/* Encoder state FIX            */\n/********************************/\ntypedef struct {\n    silk_encoder_state          sCmn;                                   /* Common struct, shared with floating-point code       */\n    silk_shape_state_FIX        sShape;                                 /* Shape state                                          */\n    silk_prefilter_state_FIX    sPrefilt;                               /* Prefilter State                                      */\n\n    /* Buffer for find pitch and noise shape analysis */\n    silk_DWORD_ALIGN opus_int16 x_buf[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ];/* Buffer for find pitch and noise shape analysis  */\n    opus_int                    LTPCorr_Q15;                            /* Normalized correlation from pitch lag estimator      */\n} silk_encoder_state_FIX;\n\n/************************/\n/* Encoder control FIX  */\n/************************/\ntypedef struct {\n    /* Prediction and coding parameters */\n    opus_int32                  Gains_Q16[ MAX_NB_SUBFR ];\n    silk_DWORD_ALIGN opus_int16 PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ];\n    opus_int16                  LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ];\n    opus_int                    LTP_scale_Q14;\n    opus_int                    pitchL[ MAX_NB_SUBFR ];\n\n    /* Noise shaping parameters */\n    /* Testing */\n    silk_DWORD_ALIGN opus_int16 AR1_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ];\n    silk_DWORD_ALIGN opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ];\n    opus_int32                  LF_shp_Q14[        MAX_NB_SUBFR ];      /* Packs two int16 coefficients per int32 value         */\n    opus_int                    GainsPre_Q14[      MAX_NB_SUBFR ];\n    opus_int                    HarmBoost_Q14[     MAX_NB_SUBFR ];\n    opus_int                    Tilt_Q14[          MAX_NB_SUBFR ];\n    opus_int                    HarmShapeGain_Q14[ MAX_NB_SUBFR ];\n    opus_int                    Lambda_Q10;\n    opus_int                    input_quality_Q14;\n    opus_int                    coding_quality_Q14;\n\n    /* measures */\n    opus_int                    sparseness_Q8;\n    opus_int32                  predGain_Q16;\n    opus_int                    LTPredCodGain_Q7;\n    opus_int32                  ResNrg[ MAX_NB_SUBFR ];                 /* Residual energy per subframe                         */\n    opus_int                    ResNrgQ[ MAX_NB_SUBFR ];                /* Q domain for the residual energy > 0                 */\n\n    /* Parameters for CBR mode */\n    opus_int32                  GainsUnq_Q16[ MAX_NB_SUBFR ];\n    opus_int8                   lastGainIndexPrev;\n} silk_encoder_control_FIX;\n\n/************************/\n/* Encoder Super Struct */\n/************************/\ntypedef struct {\n    silk_encoder_state_FIX      state_Fxx[ ENCODER_NUM_CHANNELS ];\n    stereo_enc_state            sStereo;\n    opus_int32                  nBitsExceeded;\n    opus_int                    nChannelsAPI;\n    opus_int                    nChannelsInternal;\n    opus_int                    nPrevChannelsInternal;\n    opus_int                    timeSinceSwitchAllowed_ms;\n    opus_int                    allowBandwidthSwitch;\n    opus_int                    prev_decode_only_middle;\n} silk_encoder;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/vector_ops_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Copy and multiply a vector by a constant */\nvoid silk_scale_copy_vector16(\n    opus_int16                  *data_out,\n    const opus_int16            *data_in,\n    opus_int32                  gain_Q16,           /* I    Gain in Q16                                                 */\n    const opus_int              dataSize            /* I    Length                                                      */\n)\n{\n    opus_int  i;\n    opus_int32 tmp32;\n\n    for( i = 0; i < dataSize; i++ ) {\n        tmp32 = silk_SMULWB( gain_Q16, data_in[ i ] );\n        data_out[ i ] = (opus_int16)silk_CHECK_FIT16( tmp32 );\n    }\n}\n\n/* Multiply a vector by a constant */\nvoid silk_scale_vector32_Q26_lshift_18(\n    opus_int32                  *data1,             /* I/O  Q0/Q18                                                      */\n    opus_int32                  gain_Q26,           /* I    Q26                                                         */\n    opus_int                    dataSize            /* I    length                                                      */\n)\n{\n    opus_int  i;\n\n    for( i = 0; i < dataSize; i++ ) {\n        data1[ i ] = (opus_int32)silk_CHECK_FIT32( silk_RSHIFT64( silk_SMULL( data1[ i ], gain_Q26 ), 8 ) );    /* OUTPUT: Q18 */\n    }\n}\n\n/* sum = for(i=0;i<len;i++)inVec1[i]*inVec2[i];      ---        inner product   */\n/* Note for ARM asm:                                                            */\n/*        * inVec1 and inVec2 should be at least 2 byte aligned.                */\n/*        * len should be positive 16bit integer.                               */\n/*        * only when len>6, memory access can be reduced by half.              */\nopus_int32 silk_inner_prod_aligned(\n    const opus_int16 *const     inVec1,             /*    I input vector 1                                              */\n    const opus_int16 *const     inVec2,             /*    I input vector 2                                              */\n    const opus_int              len                 /*    I vector lengths                                              */\n)\n{\n    opus_int   i;\n    opus_int32 sum = 0;\n    for( i = 0; i < len; i++ ) {\n        sum = silk_SMLABB( sum, inVec1[ i ], inVec2[ i ] );\n    }\n    return sum;\n}\n\nopus_int64 silk_inner_prod16_aligned_64(\n    const opus_int16            *inVec1,            /*    I input vector 1                                              */\n    const opus_int16            *inVec2,            /*    I input vector 2                                              */\n    const opus_int              len                 /*    I vector lengths                                              */\n)\n{\n    opus_int   i;\n    opus_int64 sum = 0;\n    for( i = 0; i < len; i++ ) {\n        sum = silk_SMLALBB( sum, inVec1[ i ], inVec2[ i ] );\n    }\n    return sum;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/fixed/warped_autocorrelation_FIX.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main_FIX.h\"\n\n#define QC  10\n#define QS  14\n\n/* Autocorrelations for a warped frequency axis */\nvoid silk_warped_autocorrelation_FIX(\n          opus_int32                *corr,                                  /* O    Result [order + 1]                                                          */\n          opus_int                  *scale,                                 /* O    Scaling of the correlation vector                                           */\n    const opus_int16                *input,                                 /* I    Input data to correlate                                                     */\n    const opus_int                  warping_Q16,                            /* I    Warping coefficient                                                         */\n    const opus_int                  length,                                 /* I    Length of input                                                             */\n    const opus_int                  order                                   /* I    Correlation order (even)                                                    */\n)\n{\n    opus_int   n, i, lsh;\n    opus_int32 tmp1_QS, tmp2_QS;\n    opus_int32 state_QS[ MAX_SHAPE_LPC_ORDER + 1 ] = { 0 };\n    opus_int64 corr_QC[  MAX_SHAPE_LPC_ORDER + 1 ] = { 0 };\n\n    /* Order must be even */\n    silk_assert( ( order & 1 ) == 0 );\n    silk_assert( 2 * QS - QC >= 0 );\n\n    /* Loop over samples */\n    for( n = 0; n < length; n++ ) {\n        tmp1_QS = silk_LSHIFT32( (opus_int32)input[ n ], QS );\n        /* Loop over allpass sections */\n        for( i = 0; i < order; i += 2 ) {\n            /* Output of allpass section */\n            tmp2_QS = silk_SMLAWB( state_QS[ i ], state_QS[ i + 1 ] - tmp1_QS, warping_Q16 );\n            state_QS[ i ]  = tmp1_QS;\n            corr_QC[  i ] += silk_RSHIFT64( silk_SMULL( tmp1_QS, state_QS[ 0 ] ), 2 * QS - QC );\n            /* Output of allpass section */\n            tmp1_QS = silk_SMLAWB( state_QS[ i + 1 ], state_QS[ i + 2 ] - tmp2_QS, warping_Q16 );\n            state_QS[ i + 1 ]  = tmp2_QS;\n            corr_QC[  i + 1 ] += silk_RSHIFT64( silk_SMULL( tmp2_QS, state_QS[ 0 ] ), 2 * QS - QC );\n        }\n        state_QS[ order ] = tmp1_QS;\n        corr_QC[  order ] += silk_RSHIFT64( silk_SMULL( tmp1_QS, state_QS[ 0 ] ), 2 * QS - QC );\n    }\n\n    lsh = silk_CLZ64( corr_QC[ 0 ] ) - 35;\n    lsh = silk_LIMIT( lsh, -12 - QC, 30 - QC );\n    *scale = -( QC + lsh );\n    silk_assert( *scale >= -30 && *scale <= 12 );\n    if( lsh >= 0 ) {\n        for( i = 0; i < order + 1; i++ ) {\n            corr[ i ] = (opus_int32)silk_CHECK_FIT32( silk_LSHIFT64( corr_QC[ i ], lsh ) );\n        }\n    } else {\n        for( i = 0; i < order + 1; i++ ) {\n            corr[ i ] = (opus_int32)silk_CHECK_FIT32( silk_RSHIFT64( corr_QC[ i ], -lsh ) );\n        }\n    }\n    silk_assert( corr_QC[ 0 ] >= 0 ); /* If breaking, decrease QC*/\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/gain_quant.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n#define OFFSET                  ( ( MIN_QGAIN_DB * 128 ) / 6 + 16 * 128 )\n#define SCALE_Q16               ( ( 65536 * ( N_LEVELS_QGAIN - 1 ) ) / ( ( ( MAX_QGAIN_DB - MIN_QGAIN_DB ) * 128 ) / 6 ) )\n#define INV_SCALE_Q16           ( ( 65536 * ( ( ( MAX_QGAIN_DB - MIN_QGAIN_DB ) * 128 ) / 6 ) ) / ( N_LEVELS_QGAIN - 1 ) )\n\n/* Gain scalar quantization with hysteresis, uniform on log scale */\nvoid silk_gains_quant(\n    opus_int8                   ind[ MAX_NB_SUBFR ],            /* O    gain indices                                */\n    opus_int32                  gain_Q16[ MAX_NB_SUBFR ],       /* I/O  gains (quantized out)                       */\n    opus_int8                   *prev_ind,                      /* I/O  last index in previous frame                */\n    const opus_int              conditional,                    /* I    first gain is delta coded if 1              */\n    const opus_int              nb_subfr                        /* I    number of subframes                         */\n)\n{\n    opus_int k, double_step_size_threshold;\n\n    for( k = 0; k < nb_subfr; k++ ) {\n        /* Convert to log scale, scale, floor() */\n        ind[ k ] = silk_SMULWB( SCALE_Q16, silk_lin2log( gain_Q16[ k ] ) - OFFSET );\n\n        /* Round towards previous quantized gain (hysteresis) */\n        if( ind[ k ] < *prev_ind ) {\n            ind[ k ]++;\n        }\n        ind[ k ] = silk_LIMIT_int( ind[ k ], 0, N_LEVELS_QGAIN - 1 );\n\n        /* Compute delta indices and limit */\n        if( k == 0 && conditional == 0 ) {\n            /* Full index */\n            ind[ k ] = silk_LIMIT_int( ind[ k ], *prev_ind + MIN_DELTA_GAIN_QUANT, N_LEVELS_QGAIN - 1 );\n            *prev_ind = ind[ k ];\n        } else {\n            /* Delta index */\n            ind[ k ] = ind[ k ] - *prev_ind;\n\n            /* Double the quantization step size for large gain increases, so that the max gain level can be reached */\n            double_step_size_threshold = 2 * MAX_DELTA_GAIN_QUANT - N_LEVELS_QGAIN + *prev_ind;\n            if( ind[ k ] > double_step_size_threshold ) {\n                ind[ k ] = double_step_size_threshold + silk_RSHIFT( ind[ k ] - double_step_size_threshold + 1, 1 );\n            }\n\n            ind[ k ] = silk_LIMIT_int( ind[ k ], MIN_DELTA_GAIN_QUANT, MAX_DELTA_GAIN_QUANT );\n\n            /* Accumulate deltas */\n            if( ind[ k ] > double_step_size_threshold ) {\n                *prev_ind += silk_LSHIFT( ind[ k ], 1 ) - double_step_size_threshold;\n            } else {\n                *prev_ind += ind[ k ];\n            }\n\n            /* Shift to make non-negative */\n            ind[ k ] -= MIN_DELTA_GAIN_QUANT;\n        }\n\n        /* Scale and convert to linear scale */\n        gain_Q16[ k ] = silk_log2lin( silk_min_32( silk_SMULWB( INV_SCALE_Q16, *prev_ind ) + OFFSET, 3967 ) ); /* 3967 = 31 in Q7 */\n    }\n}\n\n/* Gains scalar dequantization, uniform on log scale */\nvoid silk_gains_dequant(\n    opus_int32                  gain_Q16[ MAX_NB_SUBFR ],       /* O    quantized gains                             */\n    const opus_int8             ind[ MAX_NB_SUBFR ],            /* I    gain indices                                */\n    opus_int8                   *prev_ind,                      /* I/O  last index in previous frame                */\n    const opus_int              conditional,                    /* I    first gain is delta coded if 1              */\n    const opus_int              nb_subfr                        /* I    number of subframes                          */\n)\n{\n    opus_int   k, ind_tmp, double_step_size_threshold;\n\n    for( k = 0; k < nb_subfr; k++ ) {\n        if( k == 0 && conditional == 0 ) {\n            /* Gain index is not allowed to go down more than 16 steps (~21.8 dB) */\n            *prev_ind = silk_max_int( ind[ k ], *prev_ind - 16 );\n        } else {\n            /* Delta index */\n            ind_tmp = ind[ k ] + MIN_DELTA_GAIN_QUANT;\n\n            /* Accumulate deltas */\n            double_step_size_threshold = 2 * MAX_DELTA_GAIN_QUANT - N_LEVELS_QGAIN + *prev_ind;\n            if( ind_tmp > double_step_size_threshold ) {\n                *prev_ind += silk_LSHIFT( ind_tmp, 1 ) - double_step_size_threshold;\n            } else {\n                *prev_ind += ind_tmp;\n            }\n        }\n        *prev_ind = silk_LIMIT_int( *prev_ind, 0, N_LEVELS_QGAIN - 1 );\n\n        /* Scale and convert to linear scale */\n        gain_Q16[ k ] = silk_log2lin( silk_min_32( silk_SMULWB( INV_SCALE_Q16, *prev_ind ) + OFFSET, 3967 ) ); /* 3967 = 31 in Q7 */\n    }\n}\n\n/* Compute unique identifier of gain indices vector */\nopus_int32 silk_gains_ID(                                       /* O    returns unique identifier of gains          */\n    const opus_int8             ind[ MAX_NB_SUBFR ],            /* I    gain indices                                */\n    const opus_int              nb_subfr                        /* I    number of subframes                         */\n)\n{\n    opus_int   k;\n    opus_int32 gainsID;\n\n    gainsID = 0;\n    for( k = 0; k < nb_subfr; k++ ) {\n        gainsID = silk_ADD_LSHIFT32( ind[ k ], gainsID, 8 );\n    }\n\n    return gainsID;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/init_decoder.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/************************/\n/* Init Decoder State   */\n/************************/\nopus_int silk_init_decoder(\n    silk_decoder_state          *psDec                          /* I/O  Decoder state pointer                       */\n)\n{\n    /* Clear the entire encoder state, except anything copied */\n    silk_memset( psDec, 0, sizeof( silk_decoder_state ) );\n\n    /* Used to deactivate LSF interpolation */\n    psDec->first_frame_after_reset = 1;\n    psDec->prev_gain_Q16 = 65536;\n\n    /* Reset CNG state */\n    silk_CNG_Reset( psDec );\n\n    /* Reset PLC state */\n    silk_PLC_Reset( psDec );\n\n    return(0);\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/init_encoder.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n#ifdef FIXED_POINT\n#include \"main_FIX.h\"\n#else\n#include \"main_FLP.h\"\n#endif\n#include \"tuning_parameters.h\"\n#include \"cpu_support.h\"\n\n/*********************************/\n/* Initialize Silk Encoder state */\n/*********************************/\nopus_int silk_init_encoder(\n    silk_encoder_state_Fxx          *psEnc,                                 /* I/O  Pointer to Silk FIX encoder state                                           */\n    int                              arch                                   /* I    Run-time architecture                                                       */\n)\n{\n    opus_int ret = 0;\n\n    /* Clear the entire encoder state */\n    silk_memset( psEnc, 0, sizeof( silk_encoder_state_Fxx ) );\n\n    psEnc->sCmn.arch = arch;\n\n    psEnc->sCmn.variable_HP_smth1_Q15 = silk_LSHIFT( silk_lin2log( SILK_FIX_CONST( VARIABLE_HP_MIN_CUTOFF_HZ, 16 ) ) - ( 16 << 7 ), 8 );\n    psEnc->sCmn.variable_HP_smth2_Q15 = psEnc->sCmn.variable_HP_smth1_Q15;\n\n    /* Used to deactivate LSF interpolation, pitch prediction */\n    psEnc->sCmn.first_frame_after_reset = 1;\n\n    /* Initialize Silk VAD */\n    ret += silk_VAD_Init( &psEnc->sCmn.sVAD );\n\n    return  ret;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/inner_prod_aligned.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\nopus_int32 silk_inner_prod_aligned_scale(\n    const opus_int16 *const     inVec1,             /*    I input vector 1                                              */\n    const opus_int16 *const     inVec2,             /*    I input vector 2                                              */\n    const opus_int              scale,              /*    I number of bits to shift                                     */\n    const opus_int              len                 /*    I vector lengths                                              */\n)\n{\n    opus_int   i;\n    opus_int32 sum = 0;\n    for( i = 0; i < len; i++ ) {\n        sum = silk_ADD_RSHIFT32( sum, silk_SMULBB( inVec1[ i ], inVec2[ i ] ), scale );\n    }\n    return sum;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/interpolate.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Interpolate two vectors */\nvoid silk_interpolate(\n    opus_int16                  xi[ MAX_LPC_ORDER ],            /* O    interpolated vector                         */\n    const opus_int16            x0[ MAX_LPC_ORDER ],            /* I    first vector                                */\n    const opus_int16            x1[ MAX_LPC_ORDER ],            /* I    second vector                               */\n    const opus_int              ifact_Q2,                       /* I    interp. factor, weight on 2nd vector        */\n    const opus_int              d                               /* I    number of parameters                        */\n)\n{\n    opus_int i;\n\n    silk_assert( ifact_Q2 >= 0 );\n    silk_assert( ifact_Q2 <= 4 );\n\n    for( i = 0; i < d; i++ ) {\n        xi[ i ] = (opus_int16)silk_ADD_RSHIFT( x0[ i ], silk_SMULBB( x1[ i ] - x0[ i ], ifact_Q2 ), 2 );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/lin2log.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n/* Approximation of 128 * log2() (very close inverse of silk_log2lin()) */\n/* Convert input to a log scale    */\nopus_int32 silk_lin2log(\n    const opus_int32            inLin               /* I  input in linear scale                                         */\n)\n{\n    opus_int32 lz, frac_Q7;\n\n    silk_CLZ_FRAC( inLin, &lz, &frac_Q7 );\n\n    /* Piece-wise parabolic approximation */\n    return silk_LSHIFT( 31 - lz, 7 ) + silk_SMLAWB( frac_Q7, silk_MUL( frac_Q7, 128 - frac_Q7 ), 179 );\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/log2lin.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Approximation of 2^() (very close inverse of silk_lin2log()) */\n/* Convert input to a linear scale    */\nopus_int32 silk_log2lin( \n    const opus_int32            inLog_Q7            /* I  input on log scale                                            */\n)\n{\n    opus_int32 out, frac_Q7;\n\n    if( inLog_Q7 < 0 ) {\n        return 0;\n    } else if ( inLog_Q7 >= 3967 ) {\n\t\treturn silk_int32_MAX;\n\t}\n\n    out = silk_LSHIFT( 1, silk_RSHIFT( inLog_Q7, 7 ) );\n    frac_Q7 = inLog_Q7 & 0x7F;\n    if( inLog_Q7 < 2048 ) {\n        /* Piece-wise parabolic approximation */\n        out = silk_ADD_RSHIFT32( out, silk_MUL( out, silk_SMLAWB( frac_Q7, silk_SMULBB( frac_Q7, 128 - frac_Q7 ), -174 ) ), 7 );\n    } else {\n        /* Piece-wise parabolic approximation */\n        out = silk_MLA( out, silk_RSHIFT( out, 7 ), silk_SMLAWB( frac_Q7, silk_SMULBB( frac_Q7, 128 - frac_Q7 ), -174 ) );\n    }\n    return out;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/macros.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_MACROS_H\n#define SILK_MACROS_H\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"opus_types.h\"\n#include \"opus_defines.h\"\n\n/* This is an OPUS_INLINE header file for general platform. */\n\n/* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */\n#define silk_SMULWB(a32, b32)            ((((a32) >> 16) * (opus_int32)((opus_int16)(b32))) + ((((a32) & 0x0000FFFF) * (opus_int32)((opus_int16)(b32))) >> 16))\n\n/* a32 + (b32 * (opus_int32)((opus_int16)(c32))) >> 16 output have to be 32bit int */\n#define silk_SMLAWB(a32, b32, c32)       ((a32) + ((((b32) >> 16) * (opus_int32)((opus_int16)(c32))) + ((((b32) & 0x0000FFFF) * (opus_int32)((opus_int16)(c32))) >> 16)))\n\n/* (a32 * (b32 >> 16)) >> 16 */\n#define silk_SMULWT(a32, b32)            (((a32) >> 16) * ((b32) >> 16) + ((((a32) & 0x0000FFFF) * ((b32) >> 16)) >> 16))\n\n/* a32 + (b32 * (c32 >> 16)) >> 16 */\n#define silk_SMLAWT(a32, b32, c32)       ((a32) + (((b32) >> 16) * ((c32) >> 16)) + ((((b32) & 0x0000FFFF) * ((c32) >> 16)) >> 16))\n\n/* (opus_int32)((opus_int16)(a3))) * (opus_int32)((opus_int16)(b32)) output have to be 32bit int */\n#define silk_SMULBB(a32, b32)            ((opus_int32)((opus_int16)(a32)) * (opus_int32)((opus_int16)(b32)))\n\n/* a32 + (opus_int32)((opus_int16)(b32)) * (opus_int32)((opus_int16)(c32)) output have to be 32bit int */\n#define silk_SMLABB(a32, b32, c32)       ((a32) + ((opus_int32)((opus_int16)(b32))) * (opus_int32)((opus_int16)(c32)))\n\n/* (opus_int32)((opus_int16)(a32)) * (b32 >> 16) */\n#define silk_SMULBT(a32, b32)            ((opus_int32)((opus_int16)(a32)) * ((b32) >> 16))\n\n/* a32 + (opus_int32)((opus_int16)(b32)) * (c32 >> 16) */\n#define silk_SMLABT(a32, b32, c32)       ((a32) + ((opus_int32)((opus_int16)(b32))) * ((c32) >> 16))\n\n/* a64 + (b32 * c32) */\n#define silk_SMLAL(a64, b32, c32)        (silk_ADD64((a64), ((opus_int64)(b32) * (opus_int64)(c32))))\n\n/* (a32 * b32) >> 16 */\n#define silk_SMULWW(a32, b32)            silk_MLA(silk_SMULWB((a32), (b32)), (a32), silk_RSHIFT_ROUND((b32), 16))\n\n/* a32 + ((b32 * c32) >> 16) */\n#define silk_SMLAWW(a32, b32, c32)       silk_MLA(silk_SMLAWB((a32), (b32), (c32)), (b32), silk_RSHIFT_ROUND((c32), 16))\n\n/* add/subtract with output saturated */\n#define silk_ADD_SAT32(a, b)             ((((opus_uint32)(a) + (opus_uint32)(b)) & 0x80000000) == 0 ?                              \\\n                                        ((((a) & (b)) & 0x80000000) != 0 ? silk_int32_MIN : (a)+(b)) :   \\\n                                        ((((a) | (b)) & 0x80000000) == 0 ? silk_int32_MAX : (a)+(b)) )\n\n#define silk_SUB_SAT32(a, b)             ((((opus_uint32)(a)-(opus_uint32)(b)) & 0x80000000) == 0 ?                                        \\\n                                        (( (a) & ((b)^0x80000000) & 0x80000000) ? silk_int32_MIN : (a)-(b)) :    \\\n                                        ((((a)^0x80000000) & (b)  & 0x80000000) ? silk_int32_MAX : (a)-(b)) )\n\n#include \"ecintrin.h\"\n\nstatic OPUS_INLINE opus_int32 silk_CLZ16(opus_int16 in16)\n{\n    return 32 - EC_ILOG(in16<<16|0x8000);\n}\n\nstatic OPUS_INLINE opus_int32 silk_CLZ32(opus_int32 in32)\n{\n    return in32 ? 32 - EC_ILOG(in32) : 32;\n}\n\n/* Row based */\n#define matrix_ptr(Matrix_base_adr, row, column, N) \\\n    (*((Matrix_base_adr) + ((row)*(N)+(column))))\n#define matrix_adr(Matrix_base_adr, row, column, N) \\\n      ((Matrix_base_adr) + ((row)*(N)+(column)))\n\n/* Column based */\n#ifndef matrix_c_ptr\n#   define matrix_c_ptr(Matrix_base_adr, row, column, M) \\\n    (*((Matrix_base_adr) + ((row)+(M)*(column))))\n#endif\n\n#ifdef OPUS_ARM_INLINE_ASM\n#include \"arm/macros_armv4.h\"\n#endif\n\n#ifdef OPUS_ARM_INLINE_EDSP\n#include \"arm/macros_armv5e.h\"\n#endif\n\n#endif /* SILK_MACROS_H */\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/main.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_MAIN_H\n#define SILK_MAIN_H\n\n#include \"SigProc_FIX.h\"\n#include \"define.h\"\n#include \"structs.h\"\n#include \"tables.h\"\n#include \"PLC.h\"\n#include \"control.h\"\n#include \"debug.h\"\n#include \"entenc.h\"\n#include \"entdec.h\"\n\n/* Convert Left/Right stereo signal to adaptive Mid/Side representation */\nvoid silk_stereo_LR_to_MS(\n    stereo_enc_state            *state,                         /* I/O  State                                       */\n    opus_int16                  x1[],                           /* I/O  Left input signal, becomes mid signal       */\n    opus_int16                  x2[],                           /* I/O  Right input signal, becomes side signal     */\n    opus_int8                   ix[ 2 ][ 3 ],                   /* O    Quantization indices                        */\n    opus_int8                   *mid_only_flag,                 /* O    Flag: only mid signal coded                 */\n    opus_int32                  mid_side_rates_bps[],           /* O    Bitrates for mid and side signals           */\n    opus_int32                  total_rate_bps,                 /* I    Total bitrate                               */\n    opus_int                    prev_speech_act_Q8,             /* I    Speech activity level in previous frame     */\n    opus_int                    toMono,                         /* I    Last frame before a stereo->mono transition */\n    opus_int                    fs_kHz,                         /* I    Sample rate (kHz)                           */\n    opus_int                    frame_length                    /* I    Number of samples                           */\n);\n\n/* Convert adaptive Mid/Side representation to Left/Right stereo signal */\nvoid silk_stereo_MS_to_LR(\n    stereo_dec_state            *state,                         /* I/O  State                                       */\n    opus_int16                  x1[],                           /* I/O  Left input signal, becomes mid signal       */\n    opus_int16                  x2[],                           /* I/O  Right input signal, becomes side signal     */\n    const opus_int32            pred_Q13[],                     /* I    Predictors                                  */\n    opus_int                    fs_kHz,                         /* I    Samples rate (kHz)                          */\n    opus_int                    frame_length                    /* I    Number of samples                           */\n);\n\n/* Find least-squares prediction gain for one signal based on another and quantize it */\nopus_int32 silk_stereo_find_predictor(                          /* O    Returns predictor in Q13                    */\n    opus_int32                  *ratio_Q14,                     /* O    Ratio of residual and mid energies          */\n    const opus_int16            x[],                            /* I    Basis signal                                */\n    const opus_int16            y[],                            /* I    Target signal                               */\n    opus_int32                  mid_res_amp_Q0[],               /* I/O  Smoothed mid, residual norms                */\n    opus_int                    length,                         /* I    Number of samples                           */\n    opus_int                    smooth_coef_Q16                 /* I    Smoothing coefficient                       */\n);\n\n/* Quantize mid/side predictors */\nvoid silk_stereo_quant_pred(\n    opus_int32                  pred_Q13[],                     /* I/O  Predictors (out: quantized)                 */\n    opus_int8                   ix[ 2 ][ 3 ]                    /* O    Quantization indices                        */\n);\n\n/* Entropy code the mid/side quantization indices */\nvoid silk_stereo_encode_pred(\n    ec_enc                      *psRangeEnc,                    /* I/O  Compressor data structure                   */\n    opus_int8                   ix[ 2 ][ 3 ]                    /* I    Quantization indices                        */\n);\n\n/* Entropy code the mid-only flag */\nvoid silk_stereo_encode_mid_only(\n    ec_enc                      *psRangeEnc,                    /* I/O  Compressor data structure                   */\n    opus_int8                   mid_only_flag\n);\n\n/* Decode mid/side predictors */\nvoid silk_stereo_decode_pred(\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    opus_int32                  pred_Q13[]                      /* O    Predictors                                  */\n);\n\n/* Decode mid-only flag */\nvoid silk_stereo_decode_mid_only(\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    opus_int                    *decode_only_mid                /* O    Flag that only mid channel has been coded   */\n);\n\n/* Encodes signs of excitation */\nvoid silk_encode_signs(\n    ec_enc                      *psRangeEnc,                        /* I/O  Compressor data structure                   */\n    const opus_int8             pulses[],                           /* I    pulse signal                                */\n    opus_int                    length,                             /* I    length of input                             */\n    const opus_int              signalType,                         /* I    Signal type                                 */\n    const opus_int              quantOffsetType,                    /* I    Quantization offset type                    */\n    const opus_int              sum_pulses[ MAX_NB_SHELL_BLOCKS ]   /* I    Sum of absolute pulses per block            */\n);\n\n/* Decodes signs of excitation */\nvoid silk_decode_signs(\n    ec_dec                      *psRangeDec,                        /* I/O  Compressor data structure                   */\n    opus_int                    pulses[],                           /* I/O  pulse signal                                */\n    opus_int                    length,                             /* I    length of input                             */\n    const opus_int              signalType,                         /* I    Signal type                                 */\n    const opus_int              quantOffsetType,                    /* I    Quantization offset type                    */\n    const opus_int              sum_pulses[ MAX_NB_SHELL_BLOCKS ]   /* I    Sum of absolute pulses per block            */\n);\n\n/* Check encoder control struct */\nopus_int check_control_input(\n    silk_EncControlStruct        *encControl                    /* I    Control structure                           */\n);\n\n/* Control internal sampling rate */\nopus_int silk_control_audio_bandwidth(\n    silk_encoder_state          *psEncC,                        /* I/O  Pointer to Silk encoder state               */\n    silk_EncControlStruct       *encControl                     /* I    Control structure                           */\n);\n\n/* Control SNR of redidual quantizer */\nopus_int silk_control_SNR(\n    silk_encoder_state          *psEncC,                        /* I/O  Pointer to Silk encoder state               */\n    opus_int32                  TargetRate_bps                  /* I    Target max bitrate (bps)                    */\n);\n\n/***************/\n/* Shell coder */\n/***************/\n\n/* Encode quantization indices of excitation */\nvoid silk_encode_pulses(\n    ec_enc                      *psRangeEnc,                    /* I/O  compressor data structure                   */\n    const opus_int              signalType,                     /* I    Signal type                                 */\n    const opus_int              quantOffsetType,                /* I    quantOffsetType                             */\n    opus_int8                   pulses[],                       /* I    quantization indices                        */\n    const opus_int              frame_length                    /* I    Frame length                                */\n);\n\n/* Shell encoder, operates on one shell code frame of 16 pulses */\nvoid silk_shell_encoder(\n    ec_enc                      *psRangeEnc,                    /* I/O  compressor data structure                   */\n    const opus_int              *pulses0                        /* I    data: nonnegative pulse amplitudes          */\n);\n\n/* Shell decoder, operates on one shell code frame of 16 pulses */\nvoid silk_shell_decoder(\n    opus_int                    *pulses0,                       /* O    data: nonnegative pulse amplitudes          */\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    const opus_int              pulses4                         /* I    number of pulses per pulse-subframe         */\n);\n\n/* Gain scalar quantization with hysteresis, uniform on log scale */\nvoid silk_gains_quant(\n    opus_int8                   ind[ MAX_NB_SUBFR ],            /* O    gain indices                                */\n    opus_int32                  gain_Q16[ MAX_NB_SUBFR ],       /* I/O  gains (quantized out)                       */\n    opus_int8                   *prev_ind,                      /* I/O  last index in previous frame                */\n    const opus_int              conditional,                    /* I    first gain is delta coded if 1              */\n    const opus_int              nb_subfr                        /* I    number of subframes                         */\n);\n\n/* Gains scalar dequantization, uniform on log scale */\nvoid silk_gains_dequant(\n    opus_int32                  gain_Q16[ MAX_NB_SUBFR ],       /* O    quantized gains                             */\n    const opus_int8             ind[ MAX_NB_SUBFR ],            /* I    gain indices                                */\n    opus_int8                   *prev_ind,                      /* I/O  last index in previous frame                */\n    const opus_int              conditional,                    /* I    first gain is delta coded if 1              */\n    const opus_int              nb_subfr                        /* I    number of subframes                          */\n);\n\n/* Compute unique identifier of gain indices vector */\nopus_int32 silk_gains_ID(                                       /* O    returns unique identifier of gains          */\n    const opus_int8             ind[ MAX_NB_SUBFR ],            /* I    gain indices                                */\n    const opus_int              nb_subfr                        /* I    number of subframes                         */\n);\n\n/* Interpolate two vectors */\nvoid silk_interpolate(\n    opus_int16                  xi[ MAX_LPC_ORDER ],            /* O    interpolated vector                         */\n    const opus_int16            x0[ MAX_LPC_ORDER ],            /* I    first vector                                */\n    const opus_int16            x1[ MAX_LPC_ORDER ],            /* I    second vector                               */\n    const opus_int              ifact_Q2,                       /* I    interp. factor, weight on 2nd vector        */\n    const opus_int              d                               /* I    number of parameters                        */\n);\n\n/* LTP tap quantizer */\nvoid silk_quant_LTP_gains(\n    opus_int16                  B_Q14[ MAX_NB_SUBFR * LTP_ORDER ],          /* I/O  (un)quantized LTP gains         */\n    opus_int8                   cbk_index[ MAX_NB_SUBFR ],                  /* O    Codebook Index                  */\n    opus_int8                   *periodicity_index,                         /* O    Periodicity Index               */\n\topus_int32\t\t\t\t\t*sum_gain_dB_Q7,\t\t\t\t\t\t\t/* I/O  Cumulative max prediction gain  */\n    const opus_int32            W_Q18[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ],  /* I    Error Weights in Q18            */\n    opus_int                    mu_Q9,                                      /* I    Mu value (R/D tradeoff)         */\n    opus_int                    lowComplexity,                              /* I    Flag for low complexity         */\n    const opus_int              nb_subfr                                    /* I    number of subframes             */\n);\n\n/* Entropy constrained matrix-weighted VQ, for a single input data vector */\nvoid silk_VQ_WMat_EC(\n    opus_int8                   *ind,                           /* O    index of best codebook vector               */\n    opus_int32                  *rate_dist_Q14,                 /* O    best weighted quant error + mu * rate       */\n    opus_int                    *gain_Q7,                       /* O    sum of absolute LTP coefficients            */\n    const opus_int16            *in_Q14,                        /* I    input vector to be quantized                */\n    const opus_int32            *W_Q18,                         /* I    weighting matrix                            */\n    const opus_int8             *cb_Q7,                         /* I    codebook                                    */\n    const opus_uint8            *cb_gain_Q7,                    /* I    codebook effective gain                     */\n    const opus_uint8            *cl_Q5,                         /* I    code length for each codebook vector        */\n    const opus_int              mu_Q9,                          /* I    tradeoff betw. weighted error and rate      */\n    const opus_int32            max_gain_Q7,                    /* I    maximum sum of absolute LTP coefficients    */\n    opus_int                    L                               /* I    number of vectors in codebook               */\n);\n\n/************************************/\n/* Noise shaping quantization (NSQ) */\n/************************************/\nvoid silk_NSQ(\n    const silk_encoder_state    *psEncC,                                    /* I/O  Encoder State                   */\n    silk_nsq_state              *NSQ,                                       /* I/O  NSQ state                       */\n    SideInfoIndices             *psIndices,                                 /* I/O  Quantization Indices            */\n    const opus_int32            x_Q3[],                                     /* I    Prefiltered input signal        */\n    opus_int8                   pulses[],                                   /* O    Quantized pulse signal          */\n    const opus_int16            PredCoef_Q12[ 2 * MAX_LPC_ORDER ],          /* I    Short term prediction coefs     */\n    const opus_int16            LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],    /* I    Long term prediction coefs      */\n    const opus_int16            AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs             */\n    const opus_int              HarmShapeGain_Q14[ MAX_NB_SUBFR ],          /* I    Long term shaping coefs         */\n    const opus_int              Tilt_Q14[ MAX_NB_SUBFR ],                   /* I    Spectral tilt                   */\n    const opus_int32            LF_shp_Q14[ MAX_NB_SUBFR ],                 /* I    Low frequency shaping coefs     */\n    const opus_int32            Gains_Q16[ MAX_NB_SUBFR ],                  /* I    Quantization step sizes         */\n    const opus_int              pitchL[ MAX_NB_SUBFR ],                     /* I    Pitch lags                      */\n    const opus_int              Lambda_Q10,                                 /* I    Rate/distortion tradeoff        */\n    const opus_int              LTP_scale_Q14                               /* I    LTP state scaling               */\n);\n\n/* Noise shaping using delayed decision */\nvoid silk_NSQ_del_dec(\n    const silk_encoder_state    *psEncC,                                    /* I/O  Encoder State                   */\n    silk_nsq_state              *NSQ,                                       /* I/O  NSQ state                       */\n    SideInfoIndices             *psIndices,                                 /* I/O  Quantization Indices            */\n    const opus_int32            x_Q3[],                                     /* I    Prefiltered input signal        */\n    opus_int8                   pulses[],                                   /* O    Quantized pulse signal          */\n    const opus_int16            PredCoef_Q12[ 2 * MAX_LPC_ORDER ],          /* I    Short term prediction coefs     */\n    const opus_int16            LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],    /* I    Long term prediction coefs      */\n    const opus_int16            AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I Noise shaping coefs             */\n    const opus_int              HarmShapeGain_Q14[ MAX_NB_SUBFR ],          /* I    Long term shaping coefs         */\n    const opus_int              Tilt_Q14[ MAX_NB_SUBFR ],                   /* I    Spectral tilt                   */\n    const opus_int32            LF_shp_Q14[ MAX_NB_SUBFR ],                 /* I    Low frequency shaping coefs     */\n    const opus_int32            Gains_Q16[ MAX_NB_SUBFR ],                  /* I    Quantization step sizes         */\n    const opus_int              pitchL[ MAX_NB_SUBFR ],                     /* I    Pitch lags                      */\n    const opus_int              Lambda_Q10,                                 /* I    Rate/distortion tradeoff        */\n    const opus_int              LTP_scale_Q14                               /* I    LTP state scaling               */\n);\n\n/************/\n/* Silk VAD */\n/************/\n/* Initialize the Silk VAD */\nopus_int silk_VAD_Init(                                         /* O    Return value, 0 if success                  */\n    silk_VAD_state              *psSilk_VAD                     /* I/O  Pointer to Silk VAD state                   */\n);\n\n/* Get speech activity level in Q8 */\nopus_int silk_VAD_GetSA_Q8(                                     /* O    Return value, 0 if success                  */\n    silk_encoder_state          *psEncC,                        /* I/O  Encoder state                               */\n    const opus_int16            pIn[]                           /* I    PCM input                                   */\n);\n\n/* Low-pass filter with variable cutoff frequency based on  */\n/* piece-wise linear interpolation between elliptic filters */\n/* Start by setting transition_frame_no = 1;                */\nvoid silk_LP_variable_cutoff(\n    silk_LP_state               *psLP,                          /* I/O  LP filter state                             */\n    opus_int16                  *frame,                         /* I/O  Low-pass filtered output signal             */\n    const opus_int              frame_length                    /* I    Frame length                                */\n);\n\n/******************/\n/* NLSF Quantizer */\n/******************/\n/* Limit, stabilize, convert and quantize NLSFs */\nvoid silk_process_NLSFs(\n    silk_encoder_state          *psEncC,                            /* I/O  Encoder state                               */\n    opus_int16                  PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ], /* O    Prediction coefficients                     */\n    opus_int16                  pNLSF_Q15[         MAX_LPC_ORDER ], /* I/O  Normalized LSFs (quant out) (0 - (2^15-1))  */\n    const opus_int16            prev_NLSFq_Q15[    MAX_LPC_ORDER ]  /* I    Previous Normalized LSFs (0 - (2^15-1))     */\n);\n\nopus_int32 silk_NLSF_encode(                                    /* O    Returns RD value in Q25                     */\n          opus_int8             *NLSFIndices,                   /* I    Codebook path vector [ LPC_ORDER + 1 ]      */\n          opus_int16            *pNLSF_Q15,                     /* I/O  Quantized NLSF vector [ LPC_ORDER ]         */\n    const silk_NLSF_CB_struct   *psNLSF_CB,                     /* I    Codebook object                             */\n    const opus_int16            *pW_QW,                         /* I    NLSF weight vector [ LPC_ORDER ]            */\n    const opus_int              NLSF_mu_Q20,                    /* I    Rate weight for the RD optimization         */\n    const opus_int              nSurvivors,                     /* I    Max survivors after first stage             */\n    const opus_int              signalType                      /* I    Signal type: 0/1/2                          */\n);\n\n/* Compute quantization errors for an LPC_order element input vector for a VQ codebook */\nvoid silk_NLSF_VQ(\n    opus_int32                  err_Q26[],                      /* O    Quantization errors [K]                     */\n    const opus_int16            in_Q15[],                       /* I    Input vectors to be quantized [LPC_order]   */\n    const opus_uint8            pCB_Q8[],                       /* I    Codebook vectors [K*LPC_order]              */\n    const opus_int              K,                              /* I    Number of codebook vectors                  */\n    const opus_int              LPC_order                       /* I    Number of LPCs                              */\n);\n\n/* Delayed-decision quantizer for NLSF residuals */\nopus_int32 silk_NLSF_del_dec_quant(                             /* O    Returns RD value in Q25                     */\n    opus_int8                   indices[],                      /* O    Quantization indices [ order ]              */\n    const opus_int16            x_Q10[],                        /* I    Input [ order ]                             */\n    const opus_int16            w_Q5[],                         /* I    Weights [ order ]                           */\n    const opus_uint8            pred_coef_Q8[],                 /* I    Backward predictor coefs [ order ]          */\n    const opus_int16            ec_ix[],                        /* I    Indices to entropy coding tables [ order ]  */\n    const opus_uint8            ec_rates_Q5[],                  /* I    Rates []                                    */\n    const opus_int              quant_step_size_Q16,            /* I    Quantization step size                      */\n    const opus_int16            inv_quant_step_size_Q6,         /* I    Inverse quantization step size              */\n    const opus_int32            mu_Q20,                         /* I    R/D tradeoff                                */\n    const opus_int16            order                           /* I    Number of input values                      */\n);\n\n/* Unpack predictor values and indices for entropy coding tables */\nvoid silk_NLSF_unpack(\n          opus_int16            ec_ix[],                        /* O    Indices to entropy tables [ LPC_ORDER ]     */\n          opus_uint8            pred_Q8[],                      /* O    LSF predictor [ LPC_ORDER ]                 */\n    const silk_NLSF_CB_struct   *psNLSF_CB,                     /* I    Codebook object                             */\n    const opus_int              CB1_index                       /* I    Index of vector in first LSF codebook       */\n);\n\n/***********************/\n/* NLSF vector decoder */\n/***********************/\nvoid silk_NLSF_decode(\n          opus_int16            *pNLSF_Q15,                     /* O    Quantized NLSF vector [ LPC_ORDER ]         */\n          opus_int8             *NLSFIndices,                   /* I    Codebook path vector [ LPC_ORDER + 1 ]      */\n    const silk_NLSF_CB_struct   *psNLSF_CB                      /* I    Codebook object                             */\n);\n\n/****************************************************/\n/* Decoder Functions                                */\n/****************************************************/\nopus_int silk_init_decoder(\n    silk_decoder_state          *psDec                          /* I/O  Decoder state pointer                       */\n);\n\n/* Set decoder sampling rate */\nopus_int silk_decoder_set_fs(\n    silk_decoder_state          *psDec,                         /* I/O  Decoder state pointer                       */\n    opus_int                    fs_kHz,                         /* I    Sampling frequency (kHz)                    */\n    opus_int32                  fs_API_Hz                       /* I    API Sampling frequency (Hz)                 */\n);\n\n/****************/\n/* Decode frame */\n/****************/\nopus_int silk_decode_frame(\n    silk_decoder_state          *psDec,                         /* I/O  Pointer to Silk decoder state               */\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    opus_int16                  pOut[],                         /* O    Pointer to output speech frame              */\n    opus_int32                  *pN,                            /* O    Pointer to size of output frame             */\n    opus_int                    lostFlag,                       /* I    0: no loss, 1 loss, 2 decode fec            */\n    opus_int                    condCoding                      /* I    The type of conditional coding to use       */\n);\n\n/* Decode indices from bitstream */\nvoid silk_decode_indices(\n    silk_decoder_state          *psDec,                         /* I/O  State                                       */\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    opus_int                    FrameIndex,                     /* I    Frame number                                */\n    opus_int                    decode_LBRR,                    /* I    Flag indicating LBRR data is being decoded  */\n    opus_int                    condCoding                      /* I    The type of conditional coding to use       */\n);\n\n/* Decode parameters from payload */\nvoid silk_decode_parameters(\n    silk_decoder_state          *psDec,                         /* I/O  State                                       */\n    silk_decoder_control        *psDecCtrl,                     /* I/O  Decoder control                             */\n    opus_int                    condCoding                      /* I    The type of conditional coding to use       */\n);\n\n/* Core decoder. Performs inverse NSQ operation LTP + LPC */\nvoid silk_decode_core(\n    silk_decoder_state          *psDec,                         /* I/O  Decoder state                               */\n    silk_decoder_control        *psDecCtrl,                     /* I    Decoder control                             */\n    opus_int16                  xq[],                           /* O    Decoded speech                              */\n    const opus_int              pulses[ MAX_FRAME_LENGTH ]      /* I    Pulse signal                                */\n);\n\n/* Decode quantization indices of excitation (Shell coding) */\nvoid silk_decode_pulses(\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    opus_int                    pulses[],                       /* O    Excitation signal                           */\n    const opus_int              signalType,                     /* I    Sigtype                                     */\n    const opus_int              quantOffsetType,                /* I    quantOffsetType                             */\n    const opus_int              frame_length                    /* I    Frame length                                */\n);\n\n/******************/\n/* CNG */\n/******************/\n\n/* Reset CNG */\nvoid silk_CNG_Reset(\n    silk_decoder_state          *psDec                          /* I/O  Decoder state                               */\n);\n\n/* Updates CNG estimate, and applies the CNG when packet was lost */\nvoid silk_CNG(\n    silk_decoder_state          *psDec,                         /* I/O  Decoder state                               */\n    silk_decoder_control        *psDecCtrl,                     /* I/O  Decoder control                             */\n    opus_int16                  frame[],                        /* I/O  Signal                                      */\n    opus_int                    length                          /* I    Length of residual                          */\n);\n\n/* Encoding of various parameters */\nvoid silk_encode_indices(\n    silk_encoder_state          *psEncC,                        /* I/O  Encoder state                               */\n    ec_enc                      *psRangeEnc,                    /* I/O  Compressor data structure                   */\n    opus_int                    FrameIndex,                     /* I    Frame number                                */\n    opus_int                    encode_LBRR,                    /* I    Flag indicating LBRR data is being encoded  */\n    opus_int                    condCoding                      /* I    The type of conditional coding to use       */\n);\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/pitch_est_defines.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_PE_DEFINES_H\n#define SILK_PE_DEFINES_H\n\n#include \"SigProc_FIX.h\"\n\n/********************************************************/\n/* Definitions for pitch estimator                      */\n/********************************************************/\n\n#define PE_MAX_FS_KHZ               16 /* Maximum sampling frequency used */\n\n#define PE_MAX_NB_SUBFR             4\n#define PE_SUBFR_LENGTH_MS          5   /* 5 ms */\n\n#define PE_LTP_MEM_LENGTH_MS        ( 4 * PE_SUBFR_LENGTH_MS )\n\n#define PE_MAX_FRAME_LENGTH_MS      ( PE_LTP_MEM_LENGTH_MS + PE_MAX_NB_SUBFR * PE_SUBFR_LENGTH_MS )\n#define PE_MAX_FRAME_LENGTH         ( PE_MAX_FRAME_LENGTH_MS * PE_MAX_FS_KHZ )\n#define PE_MAX_FRAME_LENGTH_ST_1    ( PE_MAX_FRAME_LENGTH >> 2 )\n#define PE_MAX_FRAME_LENGTH_ST_2    ( PE_MAX_FRAME_LENGTH >> 1 )\n\n#define PE_MAX_LAG_MS               18           /* 18 ms -> 56 Hz */\n#define PE_MIN_LAG_MS               2            /* 2 ms -> 500 Hz */\n#define PE_MAX_LAG                  ( PE_MAX_LAG_MS * PE_MAX_FS_KHZ )\n#define PE_MIN_LAG                  ( PE_MIN_LAG_MS * PE_MAX_FS_KHZ )\n\n#define PE_D_SRCH_LENGTH            24\n\n#define PE_NB_STAGE3_LAGS           5\n\n#define PE_NB_CBKS_STAGE2           3\n#define PE_NB_CBKS_STAGE2_EXT       11\n\n#define PE_NB_CBKS_STAGE3_MAX       34\n#define PE_NB_CBKS_STAGE3_MID       24\n#define PE_NB_CBKS_STAGE3_MIN       16\n\n#define PE_NB_CBKS_STAGE3_10MS      12\n#define PE_NB_CBKS_STAGE2_10MS      3\n\n#define PE_SHORTLAG_BIAS            0.2f    /* for logarithmic weighting    */\n#define PE_PREVLAG_BIAS             0.2f    /* for logarithmic weighting    */\n#define PE_FLATCONTOUR_BIAS         0.05f\n\n#define SILK_PE_MIN_COMPLEX         0\n#define SILK_PE_MID_COMPLEX         1\n#define SILK_PE_MAX_COMPLEX         2\n\n/* Tables for 20 ms frames */\nextern const opus_int8 silk_CB_lags_stage2[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE2_EXT ];\nextern const opus_int8 silk_CB_lags_stage3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ];\nextern const opus_int8 silk_Lag_range_stage3[ SILK_PE_MAX_COMPLEX + 1 ] [ PE_MAX_NB_SUBFR ][ 2 ];\nextern const opus_int8 silk_nb_cbk_searchs_stage3[ SILK_PE_MAX_COMPLEX + 1 ];\n\n/* Tables for 10 ms frames */\nextern const opus_int8 silk_CB_lags_stage2_10_ms[ PE_MAX_NB_SUBFR >> 1][ 3 ];\nextern const opus_int8 silk_CB_lags_stage3_10_ms[ PE_MAX_NB_SUBFR >> 1 ][ 12 ];\nextern const opus_int8 silk_Lag_range_stage3_10_ms[ PE_MAX_NB_SUBFR >> 1 ][ 2 ];\n\n#endif\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/pitch_est_tables.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"typedef.h\"\n#include \"pitch_est_defines.h\"\n\nconst opus_int8 silk_CB_lags_stage2_10_ms[ PE_MAX_NB_SUBFR >> 1][ PE_NB_CBKS_STAGE2_10MS ] =\n{\n    {0, 1, 0},\n    {0, 0, 1}\n};\n\nconst opus_int8 silk_CB_lags_stage3_10_ms[ PE_MAX_NB_SUBFR >> 1 ][ PE_NB_CBKS_STAGE3_10MS ] =\n{\n    { 0, 0, 1,-1, 1,-1, 2,-2, 2,-2, 3,-3},\n    { 0, 1, 0, 1,-1, 2,-1, 2,-2, 3,-2, 3}\n};\n\nconst opus_int8 silk_Lag_range_stage3_10_ms[ PE_MAX_NB_SUBFR >> 1 ][ 2 ] =\n{\n    {-3, 7},\n    {-2, 7}\n};\n\nconst opus_int8 silk_CB_lags_stage2[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE2_EXT ] =\n{\n    {0, 2,-1,-1,-1, 0, 0, 1, 1, 0, 1},\n    {0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0},\n    {0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0},\n    {0,-1, 2, 1, 0, 1, 1, 0, 0,-1,-1}\n};\n\nconst opus_int8 silk_CB_lags_stage3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ] =\n{\n    {0, 0, 1,-1, 0, 1,-1, 0,-1, 1,-2, 2,-2,-2, 2,-3, 2, 3,-3,-4, 3,-4, 4, 4,-5, 5,-6,-5, 6,-7, 6, 5, 8,-9},\n    {0, 0, 1, 0, 0, 0, 0, 0, 0, 0,-1, 1, 0, 0, 1,-1, 0, 1,-1,-1, 1,-1, 2, 1,-1, 2,-2,-2, 2,-2, 2, 2, 3,-3},\n    {0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1,-1, 1, 0, 0, 2, 1,-1, 2,-1,-1, 2,-1, 2, 2,-1, 3,-2,-2,-2, 3},\n    {0, 1, 0, 0, 1, 0, 1,-1, 2,-1, 2,-1, 2, 3,-2, 3,-2,-2, 4, 4,-3, 5,-3,-4, 6,-4, 6, 5,-5, 8,-6,-5,-7, 9}\n};\n\nconst opus_int8 silk_Lag_range_stage3[ SILK_PE_MAX_COMPLEX + 1 ] [ PE_MAX_NB_SUBFR ][ 2 ] =\n{\n    /* Lags to search for low number of stage3 cbks */\n    {\n        {-5,8},\n        {-1,6},\n        {-1,6},\n        {-4,10}\n    },\n    /* Lags to search for middle number of stage3 cbks */\n    {\n        {-6,10},\n        {-2,6},\n        {-1,6},\n        {-5,10}\n    },\n    /* Lags to search for max number of stage3 cbks */\n    {\n        {-9,12},\n        {-3,7},\n        {-2,7},\n        {-7,13}\n    }\n};\n\nconst opus_int8 silk_nb_cbk_searchs_stage3[ SILK_PE_MAX_COMPLEX + 1 ] =\n{\n    PE_NB_CBKS_STAGE3_MIN,\n    PE_NB_CBKS_STAGE3_MID,\n    PE_NB_CBKS_STAGE3_MAX\n};\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/process_NLSFs.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Limit, stabilize, convert and quantize NLSFs */\nvoid silk_process_NLSFs(\n    silk_encoder_state          *psEncC,                            /* I/O  Encoder state                               */\n    opus_int16                  PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ], /* O    Prediction coefficients                     */\n    opus_int16                  pNLSF_Q15[         MAX_LPC_ORDER ], /* I/O  Normalized LSFs (quant out) (0 - (2^15-1))  */\n    const opus_int16            prev_NLSFq_Q15[    MAX_LPC_ORDER ]  /* I    Previous Normalized LSFs (0 - (2^15-1))     */\n)\n{\n    opus_int     i, doInterpolate;\n    opus_int     NLSF_mu_Q20;\n    opus_int32   i_sqr_Q15;\n    opus_int16   pNLSF0_temp_Q15[ MAX_LPC_ORDER ];\n    opus_int16   pNLSFW_QW[ MAX_LPC_ORDER ];\n    opus_int16   pNLSFW0_temp_QW[ MAX_LPC_ORDER ];\n\n    silk_assert( psEncC->speech_activity_Q8 >=   0 );\n    silk_assert( psEncC->speech_activity_Q8 <= SILK_FIX_CONST( 1.0, 8 ) );\n    silk_assert( psEncC->useInterpolatedNLSFs == 1 || psEncC->indices.NLSFInterpCoef_Q2 == ( 1 << 2 ) );\n\n    /***********************/\n    /* Calculate mu values */\n    /***********************/\n    /* NLSF_mu  = 0.003 - 0.0015 * psEnc->speech_activity; */\n    NLSF_mu_Q20 = silk_SMLAWB( SILK_FIX_CONST( 0.003, 20 ), SILK_FIX_CONST( -0.001, 28 ), psEncC->speech_activity_Q8 );\n    if( psEncC->nb_subfr == 2 ) {\n        /* Multiply by 1.5 for 10 ms packets */\n        NLSF_mu_Q20 = silk_ADD_RSHIFT( NLSF_mu_Q20, NLSF_mu_Q20, 1 );\n    }\n\n    silk_assert( NLSF_mu_Q20 >  0 );\n    silk_assert( NLSF_mu_Q20 <= SILK_FIX_CONST( 0.005, 20 ) );\n\n    /* Calculate NLSF weights */\n    silk_NLSF_VQ_weights_laroia( pNLSFW_QW, pNLSF_Q15, psEncC->predictLPCOrder );\n\n    /* Update NLSF weights for interpolated NLSFs */\n    doInterpolate = ( psEncC->useInterpolatedNLSFs == 1 ) && ( psEncC->indices.NLSFInterpCoef_Q2 < 4 );\n    if( doInterpolate ) {\n        /* Calculate the interpolated NLSF vector for the first half */\n        silk_interpolate( pNLSF0_temp_Q15, prev_NLSFq_Q15, pNLSF_Q15,\n            psEncC->indices.NLSFInterpCoef_Q2, psEncC->predictLPCOrder );\n\n        /* Calculate first half NLSF weights for the interpolated NLSFs */\n        silk_NLSF_VQ_weights_laroia( pNLSFW0_temp_QW, pNLSF0_temp_Q15, psEncC->predictLPCOrder );\n\n        /* Update NLSF weights with contribution from first half */\n        i_sqr_Q15 = silk_LSHIFT( silk_SMULBB( psEncC->indices.NLSFInterpCoef_Q2, psEncC->indices.NLSFInterpCoef_Q2 ), 11 );\n        for( i = 0; i < psEncC->predictLPCOrder; i++ ) {\n            pNLSFW_QW[ i ] = silk_SMLAWB( silk_RSHIFT( pNLSFW_QW[ i ], 1 ), (opus_int32)pNLSFW0_temp_QW[ i ], i_sqr_Q15 );\n            silk_assert( pNLSFW_QW[ i ] >= 1 );\n        }\n    }\n\n    silk_NLSF_encode( psEncC->indices.NLSFIndices, pNLSF_Q15, psEncC->psNLSF_CB, pNLSFW_QW,\n        NLSF_mu_Q20, psEncC->NLSF_MSVQ_Survivors, psEncC->indices.signalType );\n\n    /* Convert quantized NLSFs back to LPC coefficients */\n    silk_NLSF2A( PredCoef_Q12[ 1 ], pNLSF_Q15, psEncC->predictLPCOrder );\n\n    if( doInterpolate ) {\n        /* Calculate the interpolated, quantized LSF vector for the first half */\n        silk_interpolate( pNLSF0_temp_Q15, prev_NLSFq_Q15, pNLSF_Q15,\n            psEncC->indices.NLSFInterpCoef_Q2, psEncC->predictLPCOrder );\n\n        /* Convert back to LPC coefficients */\n        silk_NLSF2A( PredCoef_Q12[ 0 ], pNLSF0_temp_Q15, psEncC->predictLPCOrder );\n\n    } else {\n        /* Copy LPC coefficients for first half from second half */\n        silk_memcpy( PredCoef_Q12[ 0 ], PredCoef_Q12[ 1 ], psEncC->predictLPCOrder * sizeof( opus_int16 ) );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/quant_LTP_gains.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"tuning_parameters.h\"\n\nvoid silk_quant_LTP_gains(\n    opus_int16                  B_Q14[ MAX_NB_SUBFR * LTP_ORDER ],          /* I/O  (un)quantized LTP gains         */\n    opus_int8                   cbk_index[ MAX_NB_SUBFR ],                  /* O    Codebook Index                  */\n    opus_int8                   *periodicity_index,                         /* O    Periodicity Index               */\n\topus_int32\t\t\t\t\t*sum_log_gain_Q7,\t\t\t\t\t\t\t/* I/O  Cumulative max prediction gain  */\n    const opus_int32            W_Q18[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ],  /* I    Error Weights in Q18            */\n    opus_int                    mu_Q9,                                      /* I    Mu value (R/D tradeoff)         */\n    opus_int                    lowComplexity,                              /* I    Flag for low complexity         */\n    const opus_int              nb_subfr                                    /* I    number of subframes             */\n)\n{\n    opus_int             j, k, cbk_size;\n    opus_int8            temp_idx[ MAX_NB_SUBFR ];\n    const opus_uint8     *cl_ptr_Q5;\n    const opus_int8      *cbk_ptr_Q7;\n    const opus_uint8     *cbk_gain_ptr_Q7;\n    const opus_int16     *b_Q14_ptr;\n    const opus_int32     *W_Q18_ptr;\n    opus_int32           rate_dist_Q14_subfr, rate_dist_Q14, min_rate_dist_Q14;\n\topus_int32           sum_log_gain_tmp_Q7, best_sum_log_gain_Q7, max_gain_Q7, gain_Q7;\n\n    /***************************************************/\n    /* iterate over different codebooks with different */\n    /* rates/distortions, and choose best */\n    /***************************************************/\n    min_rate_dist_Q14 = silk_int32_MAX;\n    best_sum_log_gain_Q7 = 0;\n    for( k = 0; k < 3; k++ ) {\n        /* Safety margin for pitch gain control, to take into account factors\n           such as state rescaling/rewhitening. */\n        opus_int32 gain_safety = SILK_FIX_CONST( 0.4, 7 );\n\n        cl_ptr_Q5  = silk_LTP_gain_BITS_Q5_ptrs[ k ];\n        cbk_ptr_Q7 = silk_LTP_vq_ptrs_Q7[        k ];\n        cbk_gain_ptr_Q7 = silk_LTP_vq_gain_ptrs_Q7[ k ];\n        cbk_size   = silk_LTP_vq_sizes[          k ];\n\n        /* Set up pointer to first subframe */\n        W_Q18_ptr = W_Q18;\n        b_Q14_ptr = B_Q14;\n\n        rate_dist_Q14 = 0;\n\t\tsum_log_gain_tmp_Q7 = *sum_log_gain_Q7;\n        for( j = 0; j < nb_subfr; j++ ) {\n\t\t\tmax_gain_Q7 = silk_log2lin( ( SILK_FIX_CONST( MAX_SUM_LOG_GAIN_DB / 6.0, 7 ) - sum_log_gain_tmp_Q7 ) \n\t\t\t\t\t\t\t\t\t\t+ SILK_FIX_CONST( 7, 7 ) ) - gain_safety;\n\n            silk_VQ_WMat_EC(\n                &temp_idx[ j ],         /* O    index of best codebook vector                           */\n                &rate_dist_Q14_subfr,   /* O    best weighted quantization error + mu * rate            */\n\t\t\t\t&gain_Q7,               /* O    sum of absolute LTP coefficients                        */\n                b_Q14_ptr,              /* I    input vector to be quantized                            */\n                W_Q18_ptr,              /* I    weighting matrix                                        */\n                cbk_ptr_Q7,             /* I    codebook                                                */\n                cbk_gain_ptr_Q7,        /* I    codebook effective gains                                */\n                cl_ptr_Q5,              /* I    code length for each codebook vector                    */\n                mu_Q9,                  /* I    tradeoff between weighted error and rate                */\n\t\t\t\tmax_gain_Q7,            /* I    maximum sum of absolute LTP coefficients                */\n                cbk_size                /* I    number of vectors in codebook                           */\n            );\n\n            rate_dist_Q14 = silk_ADD_POS_SAT32( rate_dist_Q14, rate_dist_Q14_subfr );\n            sum_log_gain_tmp_Q7 = silk_max(0, sum_log_gain_tmp_Q7\n                                + silk_lin2log( gain_safety + gain_Q7 ) - SILK_FIX_CONST( 7, 7 ));\n\n            b_Q14_ptr += LTP_ORDER;\n            W_Q18_ptr += LTP_ORDER * LTP_ORDER;\n        }\n\n        /* Avoid never finding a codebook */\n        rate_dist_Q14 = silk_min( silk_int32_MAX - 1, rate_dist_Q14 );\n\n        if( rate_dist_Q14 < min_rate_dist_Q14 ) {\n            min_rate_dist_Q14 = rate_dist_Q14;\n            *periodicity_index = (opus_int8)k;\n            silk_memcpy( cbk_index, temp_idx, nb_subfr * sizeof( opus_int8 ) );\n\t\t\tbest_sum_log_gain_Q7 = sum_log_gain_tmp_Q7;\n        }\n\n        /* Break early in low-complexity mode if rate distortion is below threshold */\n        if( lowComplexity && ( rate_dist_Q14 < silk_LTP_gain_middle_avg_RD_Q14 ) ) {\n            break;\n        }\n    }\n\n    cbk_ptr_Q7 = silk_LTP_vq_ptrs_Q7[ *periodicity_index ];\n    for( j = 0; j < nb_subfr; j++ ) {\n        for( k = 0; k < LTP_ORDER; k++ ) {\n            B_Q14[ j * LTP_ORDER + k ] = silk_LSHIFT( cbk_ptr_Q7[ cbk_index[ j ] * LTP_ORDER + k ], 7 );\n        }\n    }\n\t*sum_log_gain_Q7 = best_sum_log_gain_Q7;\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/resampler.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n/*\n * Matrix of resampling methods used:\n *                                 Fs_out (kHz)\n *                        8      12     16     24     48\n *\n *               8        C      UF     U      UF     UF\n *              12        AF     C      UF     U      UF\n * Fs_in (kHz)  16        D      AF     C      UF     UF\n *              24        AF     D      AF     C      U\n *              48        AF     AF     AF     D      C\n *\n * C   -> Copy (no resampling)\n * D   -> Allpass-based 2x downsampling\n * U   -> Allpass-based 2x upsampling\n * UF  -> Allpass-based 2x upsampling followed by FIR interpolation\n * AF  -> AR2 filter followed by FIR interpolation\n */\n\n#include \"resampler_private.h\"\n\n/* Tables with delay compensation values to equalize total delay for different modes */\nstatic const opus_int8 delay_matrix_enc[ 5 ][ 3 ] = {\n/* in  \\ out  8  12  16 */\n/*  8 */   {  6,  0,  3 },\n/* 12 */   {  0,  7,  3 },\n/* 16 */   {  0,  1, 10 },\n/* 24 */   {  0,  2,  6 },\n/* 48 */   { 18, 10, 12 }\n};\n\nstatic const opus_int8 delay_matrix_dec[ 3 ][ 5 ] = {\n/* in  \\ out  8  12  16  24  48 */\n/*  8 */   {  4,  0,  2,  0,  0 },\n/* 12 */   {  0,  9,  4,  7,  4 },\n/* 16 */   {  0,  3, 12,  7,  7 }\n};\n\n/* Simple way to make [8000, 12000, 16000, 24000, 48000] to [0, 1, 2, 3, 4] */\n#define rateID(R) ( ( ( ((R)>>12) - ((R)>16000) ) >> ((R)>24000) ) - 1 )\n\n#define USE_silk_resampler_copy                     (0)\n#define USE_silk_resampler_private_up2_HQ_wrapper   (1)\n#define USE_silk_resampler_private_IIR_FIR          (2)\n#define USE_silk_resampler_private_down_FIR         (3)\n\n/* Initialize/reset the resampler state for a given pair of input/output sampling rates */\nopus_int silk_resampler_init(\n    silk_resampler_state_struct *S,                 /* I/O  Resampler state                                             */\n    opus_int32                  Fs_Hz_in,           /* I    Input sampling rate (Hz)                                    */\n    opus_int32                  Fs_Hz_out,          /* I    Output sampling rate (Hz)                                   */\n    opus_int                    forEnc              /* I    If 1: encoder; if 0: decoder                                */\n)\n{\n    opus_int up2x;\n\n    /* Clear state */\n    silk_memset( S, 0, sizeof( silk_resampler_state_struct ) );\n\n    /* Input checking */\n    if( forEnc ) {\n        if( ( Fs_Hz_in  != 8000 && Fs_Hz_in  != 12000 && Fs_Hz_in  != 16000 && Fs_Hz_in  != 24000 && Fs_Hz_in  != 48000 ) ||\n            ( Fs_Hz_out != 8000 && Fs_Hz_out != 12000 && Fs_Hz_out != 16000 ) ) {\n            silk_assert( 0 );\n            return -1;\n        }\n        S->inputDelay = delay_matrix_enc[ rateID( Fs_Hz_in ) ][ rateID( Fs_Hz_out ) ];\n    } else {\n        if( ( Fs_Hz_in  != 8000 && Fs_Hz_in  != 12000 && Fs_Hz_in  != 16000 ) ||\n            ( Fs_Hz_out != 8000 && Fs_Hz_out != 12000 && Fs_Hz_out != 16000 && Fs_Hz_out != 24000 && Fs_Hz_out != 48000 ) ) {\n            silk_assert( 0 );\n            return -1;\n        }\n        S->inputDelay = delay_matrix_dec[ rateID( Fs_Hz_in ) ][ rateID( Fs_Hz_out ) ];\n    }\n\n    S->Fs_in_kHz  = silk_DIV32_16( Fs_Hz_in,  1000 );\n    S->Fs_out_kHz = silk_DIV32_16( Fs_Hz_out, 1000 );\n\n    /* Number of samples processed per batch */\n    S->batchSize = S->Fs_in_kHz * RESAMPLER_MAX_BATCH_SIZE_MS;\n\n    /* Find resampler with the right sampling ratio */\n    up2x = 0;\n    if( Fs_Hz_out > Fs_Hz_in ) {\n        /* Upsample */\n        if( Fs_Hz_out == silk_MUL( Fs_Hz_in, 2 ) ) {                            /* Fs_out : Fs_in = 2 : 1 */\n            /* Special case: directly use 2x upsampler */\n            S->resampler_function = USE_silk_resampler_private_up2_HQ_wrapper;\n        } else {\n            /* Default resampler */\n            S->resampler_function = USE_silk_resampler_private_IIR_FIR;\n            up2x = 1;\n        }\n    } else if ( Fs_Hz_out < Fs_Hz_in ) {\n        /* Downsample */\n         S->resampler_function = USE_silk_resampler_private_down_FIR;\n        if( silk_MUL( Fs_Hz_out, 4 ) == silk_MUL( Fs_Hz_in, 3 ) ) {             /* Fs_out : Fs_in = 3 : 4 */\n            S->FIR_Fracs = 3;\n            S->FIR_Order = RESAMPLER_DOWN_ORDER_FIR0;\n            S->Coefs = silk_Resampler_3_4_COEFS;\n        } else if( silk_MUL( Fs_Hz_out, 3 ) == silk_MUL( Fs_Hz_in, 2 ) ) {      /* Fs_out : Fs_in = 2 : 3 */\n            S->FIR_Fracs = 2;\n            S->FIR_Order = RESAMPLER_DOWN_ORDER_FIR0;\n            S->Coefs = silk_Resampler_2_3_COEFS;\n        } else if( silk_MUL( Fs_Hz_out, 2 ) == Fs_Hz_in ) {                     /* Fs_out : Fs_in = 1 : 2 */\n            S->FIR_Fracs = 1;\n            S->FIR_Order = RESAMPLER_DOWN_ORDER_FIR1;\n            S->Coefs = silk_Resampler_1_2_COEFS;\n        } else if( silk_MUL( Fs_Hz_out, 3 ) == Fs_Hz_in ) {                     /* Fs_out : Fs_in = 1 : 3 */\n            S->FIR_Fracs = 1;\n            S->FIR_Order = RESAMPLER_DOWN_ORDER_FIR2;\n            S->Coefs = silk_Resampler_1_3_COEFS;\n        } else if( silk_MUL( Fs_Hz_out, 4 ) == Fs_Hz_in ) {                     /* Fs_out : Fs_in = 1 : 4 */\n            S->FIR_Fracs = 1;\n            S->FIR_Order = RESAMPLER_DOWN_ORDER_FIR2;\n            S->Coefs = silk_Resampler_1_4_COEFS;\n        } else if( silk_MUL( Fs_Hz_out, 6 ) == Fs_Hz_in ) {                     /* Fs_out : Fs_in = 1 : 6 */\n            S->FIR_Fracs = 1;\n            S->FIR_Order = RESAMPLER_DOWN_ORDER_FIR2;\n            S->Coefs = silk_Resampler_1_6_COEFS;\n        } else {\n            /* None available */\n            silk_assert( 0 );\n            return -1;\n        }\n    } else {\n        /* Input and output sampling rates are equal: copy */\n        S->resampler_function = USE_silk_resampler_copy;\n    }\n\n    /* Ratio of input/output samples */\n    S->invRatio_Q16 = silk_LSHIFT32( silk_DIV32( silk_LSHIFT32( Fs_Hz_in, 14 + up2x ), Fs_Hz_out ), 2 );\n    /* Make sure the ratio is rounded up */\n    while( silk_SMULWW( S->invRatio_Q16, Fs_Hz_out ) < silk_LSHIFT32( Fs_Hz_in, up2x ) ) {\n        S->invRatio_Q16++;\n    }\n\n    return 0;\n}\n\n/* Resampler: convert from one sampling rate to another */\n/* Input and output sampling rate are at most 48000 Hz  */\nopus_int silk_resampler(\n    silk_resampler_state_struct *S,                 /* I/O  Resampler state                                             */\n    opus_int16                  out[],              /* O    Output signal                                               */\n    const opus_int16            in[],               /* I    Input signal                                                */\n    opus_int32                  inLen               /* I    Number of input samples                                     */\n)\n{\n    opus_int nSamples;\n\n    /* Need at least 1 ms of input data */\n    silk_assert( inLen >= S->Fs_in_kHz );\n    /* Delay can't exceed the 1 ms of buffering */\n    silk_assert( S->inputDelay <= S->Fs_in_kHz );\n\n    nSamples = S->Fs_in_kHz - S->inputDelay;\n\n    /* Copy to delay buffer */\n    silk_memcpy( &S->delayBuf[ S->inputDelay ], in, nSamples * sizeof( opus_int16 ) );\n\n    switch( S->resampler_function ) {\n        case USE_silk_resampler_private_up2_HQ_wrapper:\n            silk_resampler_private_up2_HQ_wrapper( S, out, S->delayBuf, S->Fs_in_kHz );\n            silk_resampler_private_up2_HQ_wrapper( S, &out[ S->Fs_out_kHz ], &in[ nSamples ], inLen - S->Fs_in_kHz );\n            break;\n        case USE_silk_resampler_private_IIR_FIR:\n            silk_resampler_private_IIR_FIR( S, out, S->delayBuf, S->Fs_in_kHz );\n            silk_resampler_private_IIR_FIR( S, &out[ S->Fs_out_kHz ], &in[ nSamples ], inLen - S->Fs_in_kHz );\n            break;\n        case USE_silk_resampler_private_down_FIR:\n            silk_resampler_private_down_FIR( S, out, S->delayBuf, S->Fs_in_kHz );\n            silk_resampler_private_down_FIR( S, &out[ S->Fs_out_kHz ], &in[ nSamples ], inLen - S->Fs_in_kHz );\n            break;\n        default:\n            silk_memcpy( out, S->delayBuf, S->Fs_in_kHz * sizeof( opus_int16 ) );\n            silk_memcpy( &out[ S->Fs_out_kHz ], &in[ nSamples ], ( inLen - S->Fs_in_kHz ) * sizeof( opus_int16 ) );\n    }\n\n    /* Copy to delay buffer */\n    silk_memcpy( S->delayBuf, &in[ inLen - S->inputDelay ], S->inputDelay * sizeof( opus_int16 ) );\n\n    return 0;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/resampler_down2.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n#include \"resampler_rom.h\"\n\n/* Downsample by a factor 2 */\nvoid silk_resampler_down2(\n    opus_int32                  *S,                 /* I/O  State vector [ 2 ]                                          */\n    opus_int16                  *out,               /* O    Output signal [ floor(len/2) ]                              */\n    const opus_int16            *in,                /* I    Input signal [ len ]                                        */\n    opus_int32                  inLen               /* I    Number of input samples                                     */\n)\n{\n    opus_int32 k, len2 = silk_RSHIFT32( inLen, 1 );\n    opus_int32 in32, out32, Y, X;\n\n    silk_assert( silk_resampler_down2_0 > 0 );\n    silk_assert( silk_resampler_down2_1 < 0 );\n\n    /* Internal variables and state are in Q10 format */\n    for( k = 0; k < len2; k++ ) {\n        /* Convert to Q10 */\n        in32 = silk_LSHIFT( (opus_int32)in[ 2 * k ], 10 );\n\n        /* All-pass section for even input sample */\n        Y      = silk_SUB32( in32, S[ 0 ] );\n        X      = silk_SMLAWB( Y, Y, silk_resampler_down2_1 );\n        out32  = silk_ADD32( S[ 0 ], X );\n        S[ 0 ] = silk_ADD32( in32, X );\n\n        /* Convert to Q10 */\n        in32 = silk_LSHIFT( (opus_int32)in[ 2 * k + 1 ], 10 );\n\n        /* All-pass section for odd input sample, and add to output of previous section */\n        Y      = silk_SUB32( in32, S[ 1 ] );\n        X      = silk_SMULWB( Y, silk_resampler_down2_0 );\n        out32  = silk_ADD32( out32, S[ 1 ] );\n        out32  = silk_ADD32( out32, X );\n        S[ 1 ] = silk_ADD32( in32, X );\n\n        /* Add, convert back to int16 and store to output */\n        out[ k ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( out32, 11 ) );\n    }\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/resampler_down2_3.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n#include \"resampler_private.h\"\n#include \"stack_alloc.h\"\n\n#define ORDER_FIR                   4\n\n/* Downsample by a factor 2/3, low quality */\nvoid silk_resampler_down2_3(\n    opus_int32                  *S,                 /* I/O  State vector [ 6 ]                                          */\n    opus_int16                  *out,               /* O    Output signal [ floor(2*inLen/3) ]                          */\n    const opus_int16            *in,                /* I    Input signal [ inLen ]                                      */\n    opus_int32                  inLen               /* I    Number of input samples                                     */\n)\n{\n    opus_int32 nSamplesIn, counter, res_Q6;\n    VARDECL( opus_int32, buf );\n    opus_int32 *buf_ptr;\n    SAVE_STACK;\n\n    ALLOC( buf, RESAMPLER_MAX_BATCH_SIZE_IN + ORDER_FIR, opus_int32 );\n\n    /* Copy buffered samples to start of buffer */\n    silk_memcpy( buf, S, ORDER_FIR * sizeof( opus_int32 ) );\n\n    /* Iterate over blocks of frameSizeIn input samples */\n    while( 1 ) {\n        nSamplesIn = silk_min( inLen, RESAMPLER_MAX_BATCH_SIZE_IN );\n\n        /* Second-order AR filter (output in Q8) */\n        silk_resampler_private_AR2( &S[ ORDER_FIR ], &buf[ ORDER_FIR ], in,\n            silk_Resampler_2_3_COEFS_LQ, nSamplesIn );\n\n        /* Interpolate filtered signal */\n        buf_ptr = buf;\n        counter = nSamplesIn;\n        while( counter > 2 ) {\n            /* Inner product */\n            res_Q6 = silk_SMULWB(         buf_ptr[ 0 ], silk_Resampler_2_3_COEFS_LQ[ 2 ] );\n            res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 1 ], silk_Resampler_2_3_COEFS_LQ[ 3 ] );\n            res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 2 ], silk_Resampler_2_3_COEFS_LQ[ 5 ] );\n            res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 3 ], silk_Resampler_2_3_COEFS_LQ[ 4 ] );\n\n            /* Scale down, saturate and store in output array */\n            *out++ = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( res_Q6, 6 ) );\n\n            res_Q6 = silk_SMULWB(         buf_ptr[ 1 ], silk_Resampler_2_3_COEFS_LQ[ 4 ] );\n            res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 2 ], silk_Resampler_2_3_COEFS_LQ[ 5 ] );\n            res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 3 ], silk_Resampler_2_3_COEFS_LQ[ 3 ] );\n            res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 4 ], silk_Resampler_2_3_COEFS_LQ[ 2 ] );\n\n            /* Scale down, saturate and store in output array */\n            *out++ = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( res_Q6, 6 ) );\n\n            buf_ptr += 3;\n            counter -= 3;\n        }\n\n        in += nSamplesIn;\n        inLen -= nSamplesIn;\n\n        if( inLen > 0 ) {\n            /* More iterations to do; copy last part of filtered signal to beginning of buffer */\n            silk_memcpy( buf, &buf[ nSamplesIn ], ORDER_FIR * sizeof( opus_int32 ) );\n        } else {\n            break;\n        }\n    }\n\n    /* Copy last part of filtered signal to the state for the next call */\n    silk_memcpy( S, &buf[ nSamplesIn ], ORDER_FIR * sizeof( opus_int32 ) );\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/resampler_private.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_RESAMPLER_PRIVATE_H\n#define SILK_RESAMPLER_PRIVATE_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"SigProc_FIX.h\"\n#include \"resampler_structs.h\"\n#include \"resampler_rom.h\"\n\n/* Number of input samples to process in the inner loop */\n#define RESAMPLER_MAX_BATCH_SIZE_MS             10\n#define RESAMPLER_MAX_FS_KHZ                    48\n#define RESAMPLER_MAX_BATCH_SIZE_IN             ( RESAMPLER_MAX_BATCH_SIZE_MS * RESAMPLER_MAX_FS_KHZ )\n\n/* Description: Hybrid IIR/FIR polyphase implementation of resampling */\nvoid silk_resampler_private_IIR_FIR(\n    void                            *SS,            /* I/O  Resampler state             */\n    opus_int16                      out[],          /* O    Output signal               */\n    const opus_int16                in[],           /* I    Input signal                */\n    opus_int32                      inLen           /* I    Number of input samples     */\n);\n\n/* Description: Hybrid IIR/FIR polyphase implementation of resampling */\nvoid silk_resampler_private_down_FIR(\n    void                            *SS,            /* I/O  Resampler state             */\n    opus_int16                      out[],          /* O    Output signal               */\n    const opus_int16                in[],           /* I    Input signal                */\n    opus_int32                      inLen           /* I    Number of input samples     */\n);\n\n/* Upsample by a factor 2, high quality */\nvoid silk_resampler_private_up2_HQ_wrapper(\n    void                            *SS,            /* I/O  Resampler state (unused)    */\n    opus_int16                      *out,           /* O    Output signal [ 2 * len ]   */\n    const opus_int16                *in,            /* I    Input signal [ len ]        */\n    opus_int32                      len             /* I    Number of input samples     */\n);\n\n/* Upsample by a factor 2, high quality */\nvoid silk_resampler_private_up2_HQ(\n    opus_int32                      *S,             /* I/O  Resampler state [ 6 ]       */\n    opus_int16                      *out,           /* O    Output signal [ 2 * len ]   */\n    const opus_int16                *in,            /* I    Input signal [ len ]        */\n    opus_int32                      len             /* I    Number of input samples     */\n);\n\n/* Second order AR filter */\nvoid silk_resampler_private_AR2(\n    opus_int32                      S[],            /* I/O  State vector [ 2 ]          */\n    opus_int32                      out_Q8[],       /* O    Output signal               */\n    const opus_int16                in[],           /* I    Input signal                */\n    const opus_int16                A_Q14[],        /* I    AR coefficients, Q14        */\n    opus_int32                      len             /* I    Signal length               */\n);\n\n#ifdef __cplusplus\n}\n#endif\n#endif /* SILK_RESAMPLER_PRIVATE_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/resampler_private_AR2.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n#include \"resampler_private.h\"\n\n/* Second order AR filter with single delay elements */\nvoid silk_resampler_private_AR2(\n    opus_int32                      S[],            /* I/O  State vector [ 2 ]          */\n    opus_int32                      out_Q8[],       /* O    Output signal               */\n    const opus_int16                in[],           /* I    Input signal                */\n    const opus_int16                A_Q14[],        /* I    AR coefficients, Q14        */\n    opus_int32                      len             /* I    Signal length               */\n)\n{\n    opus_int32    k;\n    opus_int32    out32;\n\n    for( k = 0; k < len; k++ ) {\n        out32       = silk_ADD_LSHIFT32( S[ 0 ], (opus_int32)in[ k ], 8 );\n        out_Q8[ k ] = out32;\n        out32       = silk_LSHIFT( out32, 2 );\n        S[ 0 ]      = silk_SMLAWB( S[ 1 ], out32, A_Q14[ 0 ] );\n        S[ 1 ]      = silk_SMULWB( out32, A_Q14[ 1 ] );\n    }\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/resampler_private_IIR_FIR.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n#include \"resampler_private.h\"\n#include \"stack_alloc.h\"\n\nstatic OPUS_INLINE opus_int16 *silk_resampler_private_IIR_FIR_INTERPOL(\n    opus_int16  *out,\n    opus_int16  *buf,\n    opus_int32  max_index_Q16,\n    opus_int32  index_increment_Q16\n)\n{\n    opus_int32 index_Q16, res_Q15;\n    opus_int16 *buf_ptr;\n    opus_int32 table_index;\n\n    /* Interpolate upsampled signal and store in output array */\n    for( index_Q16 = 0; index_Q16 < max_index_Q16; index_Q16 += index_increment_Q16 ) {\n        table_index = silk_SMULWB( index_Q16 & 0xFFFF, 12 );\n        buf_ptr = &buf[ index_Q16 >> 16 ];\n\n        res_Q15 = silk_SMULBB(          buf_ptr[ 0 ], silk_resampler_frac_FIR_12[      table_index ][ 0 ] );\n        res_Q15 = silk_SMLABB( res_Q15, buf_ptr[ 1 ], silk_resampler_frac_FIR_12[      table_index ][ 1 ] );\n        res_Q15 = silk_SMLABB( res_Q15, buf_ptr[ 2 ], silk_resampler_frac_FIR_12[      table_index ][ 2 ] );\n        res_Q15 = silk_SMLABB( res_Q15, buf_ptr[ 3 ], silk_resampler_frac_FIR_12[      table_index ][ 3 ] );\n        res_Q15 = silk_SMLABB( res_Q15, buf_ptr[ 4 ], silk_resampler_frac_FIR_12[ 11 - table_index ][ 3 ] );\n        res_Q15 = silk_SMLABB( res_Q15, buf_ptr[ 5 ], silk_resampler_frac_FIR_12[ 11 - table_index ][ 2 ] );\n        res_Q15 = silk_SMLABB( res_Q15, buf_ptr[ 6 ], silk_resampler_frac_FIR_12[ 11 - table_index ][ 1 ] );\n        res_Q15 = silk_SMLABB( res_Q15, buf_ptr[ 7 ], silk_resampler_frac_FIR_12[ 11 - table_index ][ 0 ] );\n        *out++ = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( res_Q15, 15 ) );\n    }\n    return out;\n}\n/* Upsample using a combination of allpass-based 2x upsampling and FIR interpolation */\nvoid silk_resampler_private_IIR_FIR(\n    void                            *SS,            /* I/O  Resampler state             */\n    opus_int16                      out[],          /* O    Output signal               */\n    const opus_int16                in[],           /* I    Input signal                */\n    opus_int32                      inLen           /* I    Number of input samples     */\n)\n{\n    silk_resampler_state_struct *S = (silk_resampler_state_struct *)SS;\n    opus_int32 nSamplesIn;\n    opus_int32 max_index_Q16, index_increment_Q16;\n    VARDECL( opus_int16, buf );\n    SAVE_STACK;\n\n    ALLOC( buf, 2 * S->batchSize + RESAMPLER_ORDER_FIR_12, opus_int16 );\n\n    /* Copy buffered samples to start of buffer */\n    silk_memcpy( buf, S->sFIR.i16, RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) );\n\n    /* Iterate over blocks of frameSizeIn input samples */\n    index_increment_Q16 = S->invRatio_Q16;\n    while( 1 ) {\n        nSamplesIn = silk_min( inLen, S->batchSize );\n\n        /* Upsample 2x */\n        silk_resampler_private_up2_HQ( S->sIIR, &buf[ RESAMPLER_ORDER_FIR_12 ], in, nSamplesIn );\n\n        max_index_Q16 = silk_LSHIFT32( nSamplesIn, 16 + 1 );         /* + 1 because 2x upsampling */\n        out = silk_resampler_private_IIR_FIR_INTERPOL( out, buf, max_index_Q16, index_increment_Q16 );\n        in += nSamplesIn;\n        inLen -= nSamplesIn;\n\n        if( inLen > 0 ) {\n            /* More iterations to do; copy last part of filtered signal to beginning of buffer */\n            silk_memcpy( buf, &buf[ nSamplesIn << 1 ], RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) );\n        } else {\n            break;\n        }\n    }\n\n    /* Copy last part of filtered signal to the state for the next call */\n    silk_memcpy( S->sFIR.i16, &buf[ nSamplesIn << 1 ], RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) );\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/resampler_private_down_FIR.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n#include \"resampler_private.h\"\n#include \"stack_alloc.h\"\n\nstatic OPUS_INLINE opus_int16 *silk_resampler_private_down_FIR_INTERPOL(\n    opus_int16          *out,\n    opus_int32          *buf,\n    const opus_int16    *FIR_Coefs,\n    opus_int            FIR_Order,\n    opus_int            FIR_Fracs,\n    opus_int32          max_index_Q16,\n    opus_int32          index_increment_Q16\n)\n{\n    opus_int32 index_Q16, res_Q6;\n    opus_int32 *buf_ptr;\n    opus_int32 interpol_ind;\n    const opus_int16 *interpol_ptr;\n\n    switch( FIR_Order ) {\n        case RESAMPLER_DOWN_ORDER_FIR0:\n            for( index_Q16 = 0; index_Q16 < max_index_Q16; index_Q16 += index_increment_Q16 ) {\n                /* Integer part gives pointer to buffered input */\n                buf_ptr = buf + silk_RSHIFT( index_Q16, 16 );\n\n                /* Fractional part gives interpolation coefficients */\n                interpol_ind = silk_SMULWB( index_Q16 & 0xFFFF, FIR_Fracs );\n\n                /* Inner product */\n                interpol_ptr = &FIR_Coefs[ RESAMPLER_DOWN_ORDER_FIR0 / 2 * interpol_ind ];\n                res_Q6 = silk_SMULWB(         buf_ptr[ 0 ], interpol_ptr[ 0 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 1 ], interpol_ptr[ 1 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 2 ], interpol_ptr[ 2 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 3 ], interpol_ptr[ 3 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 4 ], interpol_ptr[ 4 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 5 ], interpol_ptr[ 5 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 6 ], interpol_ptr[ 6 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 7 ], interpol_ptr[ 7 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 8 ], interpol_ptr[ 8 ] );\n                interpol_ptr = &FIR_Coefs[ RESAMPLER_DOWN_ORDER_FIR0 / 2 * ( FIR_Fracs - 1 - interpol_ind ) ];\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 17 ], interpol_ptr[ 0 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 16 ], interpol_ptr[ 1 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 15 ], interpol_ptr[ 2 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 14 ], interpol_ptr[ 3 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 13 ], interpol_ptr[ 4 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 12 ], interpol_ptr[ 5 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 11 ], interpol_ptr[ 6 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 10 ], interpol_ptr[ 7 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[  9 ], interpol_ptr[ 8 ] );\n\n                /* Scale down, saturate and store in output array */\n                *out++ = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( res_Q6, 6 ) );\n            }\n            break;\n        case RESAMPLER_DOWN_ORDER_FIR1:\n            for( index_Q16 = 0; index_Q16 < max_index_Q16; index_Q16 += index_increment_Q16 ) {\n                /* Integer part gives pointer to buffered input */\n                buf_ptr = buf + silk_RSHIFT( index_Q16, 16 );\n\n                /* Inner product */\n                res_Q6 = silk_SMULWB(         silk_ADD32( buf_ptr[  0 ], buf_ptr[ 23 ] ), FIR_Coefs[  0 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  1 ], buf_ptr[ 22 ] ), FIR_Coefs[  1 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  2 ], buf_ptr[ 21 ] ), FIR_Coefs[  2 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  3 ], buf_ptr[ 20 ] ), FIR_Coefs[  3 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  4 ], buf_ptr[ 19 ] ), FIR_Coefs[  4 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  5 ], buf_ptr[ 18 ] ), FIR_Coefs[  5 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  6 ], buf_ptr[ 17 ] ), FIR_Coefs[  6 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  7 ], buf_ptr[ 16 ] ), FIR_Coefs[  7 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  8 ], buf_ptr[ 15 ] ), FIR_Coefs[  8 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  9 ], buf_ptr[ 14 ] ), FIR_Coefs[  9 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 10 ], buf_ptr[ 13 ] ), FIR_Coefs[ 10 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 11 ], buf_ptr[ 12 ] ), FIR_Coefs[ 11 ] );\n\n                /* Scale down, saturate and store in output array */\n                *out++ = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( res_Q6, 6 ) );\n            }\n            break;\n        case RESAMPLER_DOWN_ORDER_FIR2:\n            for( index_Q16 = 0; index_Q16 < max_index_Q16; index_Q16 += index_increment_Q16 ) {\n                /* Integer part gives pointer to buffered input */\n                buf_ptr = buf + silk_RSHIFT( index_Q16, 16 );\n\n                /* Inner product */\n                res_Q6 = silk_SMULWB(         silk_ADD32( buf_ptr[  0 ], buf_ptr[ 35 ] ), FIR_Coefs[  0 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  1 ], buf_ptr[ 34 ] ), FIR_Coefs[  1 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  2 ], buf_ptr[ 33 ] ), FIR_Coefs[  2 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  3 ], buf_ptr[ 32 ] ), FIR_Coefs[  3 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  4 ], buf_ptr[ 31 ] ), FIR_Coefs[  4 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  5 ], buf_ptr[ 30 ] ), FIR_Coefs[  5 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  6 ], buf_ptr[ 29 ] ), FIR_Coefs[  6 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  7 ], buf_ptr[ 28 ] ), FIR_Coefs[  7 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  8 ], buf_ptr[ 27 ] ), FIR_Coefs[  8 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[  9 ], buf_ptr[ 26 ] ), FIR_Coefs[  9 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 10 ], buf_ptr[ 25 ] ), FIR_Coefs[ 10 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 11 ], buf_ptr[ 24 ] ), FIR_Coefs[ 11 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 12 ], buf_ptr[ 23 ] ), FIR_Coefs[ 12 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 13 ], buf_ptr[ 22 ] ), FIR_Coefs[ 13 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 14 ], buf_ptr[ 21 ] ), FIR_Coefs[ 14 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 15 ], buf_ptr[ 20 ] ), FIR_Coefs[ 15 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 16 ], buf_ptr[ 19 ] ), FIR_Coefs[ 16 ] );\n                res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 17 ], buf_ptr[ 18 ] ), FIR_Coefs[ 17 ] );\n\n                /* Scale down, saturate and store in output array */\n                *out++ = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( res_Q6, 6 ) );\n            }\n            break;\n        default:\n            silk_assert( 0 );\n    }\n    return out;\n}\n\n/* Resample with a 2nd order AR filter followed by FIR interpolation */\nvoid silk_resampler_private_down_FIR(\n    void                            *SS,            /* I/O  Resampler state             */\n    opus_int16                      out[],          /* O    Output signal               */\n    const opus_int16                in[],           /* I    Input signal                */\n    opus_int32                      inLen           /* I    Number of input samples     */\n)\n{\n    silk_resampler_state_struct *S = (silk_resampler_state_struct *)SS;\n    opus_int32 nSamplesIn;\n    opus_int32 max_index_Q16, index_increment_Q16;\n    VARDECL( opus_int32, buf );\n    const opus_int16 *FIR_Coefs;\n    SAVE_STACK;\n\n    ALLOC( buf, S->batchSize + S->FIR_Order, opus_int32 );\n\n    /* Copy buffered samples to start of buffer */\n    silk_memcpy( buf, S->sFIR.i32, S->FIR_Order * sizeof( opus_int32 ) );\n\n    FIR_Coefs = &S->Coefs[ 2 ];\n\n    /* Iterate over blocks of frameSizeIn input samples */\n    index_increment_Q16 = S->invRatio_Q16;\n    while( 1 ) {\n        nSamplesIn = silk_min( inLen, S->batchSize );\n\n        /* Second-order AR filter (output in Q8) */\n        silk_resampler_private_AR2( S->sIIR, &buf[ S->FIR_Order ], in, S->Coefs, nSamplesIn );\n\n        max_index_Q16 = silk_LSHIFT32( nSamplesIn, 16 );\n\n        /* Interpolate filtered signal */\n        out = silk_resampler_private_down_FIR_INTERPOL( out, buf, FIR_Coefs, S->FIR_Order,\n            S->FIR_Fracs, max_index_Q16, index_increment_Q16 );\n\n        in += nSamplesIn;\n        inLen -= nSamplesIn;\n\n        if( inLen > 1 ) {\n            /* More iterations to do; copy last part of filtered signal to beginning of buffer */\n            silk_memcpy( buf, &buf[ nSamplesIn ], S->FIR_Order * sizeof( opus_int32 ) );\n        } else {\n            break;\n        }\n    }\n\n    /* Copy last part of filtered signal to the state for the next call */\n    silk_memcpy( S->sFIR.i32, &buf[ nSamplesIn ], S->FIR_Order * sizeof( opus_int32 ) );\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/resampler_private_up2_HQ.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n#include \"resampler_private.h\"\n\n/* Upsample by a factor 2, high quality */\n/* Uses 2nd order allpass filters for the 2x upsampling, followed by a      */\n/* notch filter just above Nyquist.                                         */\nvoid silk_resampler_private_up2_HQ(\n    opus_int32                      *S,             /* I/O  Resampler state [ 6 ]       */\n    opus_int16                      *out,           /* O    Output signal [ 2 * len ]   */\n    const opus_int16                *in,            /* I    Input signal [ len ]        */\n    opus_int32                      len             /* I    Number of input samples     */\n)\n{\n    opus_int32 k;\n    opus_int32 in32, out32_1, out32_2, Y, X;\n\n    silk_assert( silk_resampler_up2_hq_0[ 0 ] > 0 );\n    silk_assert( silk_resampler_up2_hq_0[ 1 ] > 0 );\n    silk_assert( silk_resampler_up2_hq_0[ 2 ] < 0 );\n    silk_assert( silk_resampler_up2_hq_1[ 0 ] > 0 );\n    silk_assert( silk_resampler_up2_hq_1[ 1 ] > 0 );\n    silk_assert( silk_resampler_up2_hq_1[ 2 ] < 0 );\n\n    /* Internal variables and state are in Q10 format */\n    for( k = 0; k < len; k++ ) {\n        /* Convert to Q10 */\n        in32 = silk_LSHIFT( (opus_int32)in[ k ], 10 );\n\n        /* First all-pass section for even output sample */\n        Y       = silk_SUB32( in32, S[ 0 ] );\n        X       = silk_SMULWB( Y, silk_resampler_up2_hq_0[ 0 ] );\n        out32_1 = silk_ADD32( S[ 0 ], X );\n        S[ 0 ]  = silk_ADD32( in32, X );\n\n        /* Second all-pass section for even output sample */\n        Y       = silk_SUB32( out32_1, S[ 1 ] );\n        X       = silk_SMULWB( Y, silk_resampler_up2_hq_0[ 1 ] );\n        out32_2 = silk_ADD32( S[ 1 ], X );\n        S[ 1 ]  = silk_ADD32( out32_1, X );\n\n        /* Third all-pass section for even output sample */\n        Y       = silk_SUB32( out32_2, S[ 2 ] );\n        X       = silk_SMLAWB( Y, Y, silk_resampler_up2_hq_0[ 2 ] );\n        out32_1 = silk_ADD32( S[ 2 ], X );\n        S[ 2 ]  = silk_ADD32( out32_2, X );\n\n        /* Apply gain in Q15, convert back to int16 and store to output */\n        out[ 2 * k ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( out32_1, 10 ) );\n\n        /* First all-pass section for odd output sample */\n        Y       = silk_SUB32( in32, S[ 3 ] );\n        X       = silk_SMULWB( Y, silk_resampler_up2_hq_1[ 0 ] );\n        out32_1 = silk_ADD32( S[ 3 ], X );\n        S[ 3 ]  = silk_ADD32( in32, X );\n\n        /* Second all-pass section for odd output sample */\n        Y       = silk_SUB32( out32_1, S[ 4 ] );\n        X       = silk_SMULWB( Y, silk_resampler_up2_hq_1[ 1 ] );\n        out32_2 = silk_ADD32( S[ 4 ], X );\n        S[ 4 ]  = silk_ADD32( out32_1, X );\n\n        /* Third all-pass section for odd output sample */\n        Y       = silk_SUB32( out32_2, S[ 5 ] );\n        X       = silk_SMLAWB( Y, Y, silk_resampler_up2_hq_1[ 2 ] );\n        out32_1 = silk_ADD32( S[ 5 ], X );\n        S[ 5 ]  = silk_ADD32( out32_2, X );\n\n        /* Apply gain in Q15, convert back to int16 and store to output */\n        out[ 2 * k + 1 ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( out32_1, 10 ) );\n    }\n}\n\nvoid silk_resampler_private_up2_HQ_wrapper(\n    void                            *SS,            /* I/O  Resampler state (unused)    */\n    opus_int16                      *out,           /* O    Output signal [ 2 * len ]   */\n    const opus_int16                *in,            /* I    Input signal [ len ]        */\n    opus_int32                      len             /* I    Number of input samples     */\n)\n{\n    silk_resampler_state_struct *S = (silk_resampler_state_struct *)SS;\n    silk_resampler_private_up2_HQ( S->sIIR, out, in, len );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/resampler_rom.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n/* Filter coefficients for IIR/FIR polyphase resampling     *\n * Total size: 179 Words (358 Bytes)                        */\n\n#include \"resampler_private.h\"\n\n/* Matlab code for the notch filter coefficients: */\n/* B = [1, 0.147, 1];  A = [1, 0.107, 0.89]; G = 0.93; freqz(G * B, A, 2^14, 16e3); axis([0, 8000, -10, 1]) */\n/* fprintf('\\t%6d, %6d, %6d, %6d\\n', round(B(2)*2^16), round(-A(2)*2^16), round((1-A(3))*2^16), round(G*2^15)) */\n/* const opus_int16 silk_resampler_up2_hq_notch[ 4 ] = { 9634,  -7012,   7209,  30474 }; */\n\n/* Tables with IIR and FIR coefficients for fractional downsamplers (123 Words) */\nsilk_DWORD_ALIGN const opus_int16 silk_Resampler_3_4_COEFS[ 2 + 3 * RESAMPLER_DOWN_ORDER_FIR0 / 2 ] = {\n\t-20694, -13867,\n\t   -49,     64,     17,   -157,    353,   -496,    163,  11047,  22205,\n\t   -39,      6,     91,   -170,    186,     23,   -896,   6336,  19928,\n\t   -19,    -36,    102,    -89,    -24,    328,   -951,   2568,  15909,\n};\n\nsilk_DWORD_ALIGN const opus_int16 silk_Resampler_2_3_COEFS[ 2 + 2 * RESAMPLER_DOWN_ORDER_FIR0 / 2 ] = {\n\t-14457, -14019,\n\t    64,    128,   -122,     36,    310,   -768,    584,   9267,  17733,\n\t    12,    128,     18,   -142,    288,   -117,   -865,   4123,  14459,\n};\n\nsilk_DWORD_ALIGN const opus_int16 silk_Resampler_1_2_COEFS[ 2 + RESAMPLER_DOWN_ORDER_FIR1 / 2 ] = {\n\t   616, -14323,\n\t   -10,     39,     58,    -46,    -84,    120,    184,   -315,   -541,   1284,   5380,   9024,\n};\n\nsilk_DWORD_ALIGN const opus_int16 silk_Resampler_1_3_COEFS[ 2 + RESAMPLER_DOWN_ORDER_FIR2 / 2 ] = {\n\t 16102, -15162,\n\t   -13,      0,     20,     26,      5,    -31,    -43,     -4,     65,     90,      7,   -157,   -248,    -44,    593,   1583,   2612,   3271,\n};\n\nsilk_DWORD_ALIGN const opus_int16 silk_Resampler_1_4_COEFS[ 2 + RESAMPLER_DOWN_ORDER_FIR2 / 2 ] = {\n\t 22500, -15099,\n\t     3,    -14,    -20,    -15,      2,     25,     37,     25,    -16,    -71,   -107,    -79,     50,    292,    623,    982,   1288,   1464,\n};\n\nsilk_DWORD_ALIGN const opus_int16 silk_Resampler_1_6_COEFS[ 2 + RESAMPLER_DOWN_ORDER_FIR2 / 2 ] = {\n\t 27540, -15257,\n\t    17,     12,      8,      1,    -10,    -22,    -30,    -32,    -22,      3,     44,    100,    168,    243,    317,    381,    429,    455,\n};\n\nsilk_DWORD_ALIGN const opus_int16 silk_Resampler_2_3_COEFS_LQ[ 2 + 2 * 2 ] = {\n     -2797,  -6507,\n      4697,  10739,\n      1567,   8276,\n};\n\n/* Table with interplation fractions of 1/24, 3/24, 5/24, ... , 23/24 : 23/24 (46 Words) */\nsilk_DWORD_ALIGN const opus_int16 silk_resampler_frac_FIR_12[ 12 ][ RESAMPLER_ORDER_FIR_12 / 2 ] = {\n\t{  189,  -600,   617, 30567 },\n\t{  117,  -159, -1070, 29704 },\n\t{   52,   221, -2392, 28276 },\n\t{   -4,   529, -3350, 26341 },\n\t{  -48,   758, -3956, 23973 },\n\t{  -80,   905, -4235, 21254 },\n\t{  -99,   972, -4222, 18278 },\n\t{ -107,   967, -3957, 15143 },\n\t{ -103,   896, -3487, 11950 },\n\t{  -91,   773, -2865,  8798 },\n\t{  -71,   611, -2143,  5784 },\n\t{  -46,   425, -1375,  2996 },\n};\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/resampler_rom.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_FIX_RESAMPLER_ROM_H\n#define SILK_FIX_RESAMPLER_ROM_H\n\n#ifdef  __cplusplus\nextern \"C\"\n{\n#endif\n\n#include \"typedef.h\"\n#include \"resampler_structs.h\"\n\n#define RESAMPLER_DOWN_ORDER_FIR0               18\n#define RESAMPLER_DOWN_ORDER_FIR1               24\n#define RESAMPLER_DOWN_ORDER_FIR2               36\n#define RESAMPLER_ORDER_FIR_12                  8\n\n/* Tables for 2x downsampler */\nstatic const opus_int16 silk_resampler_down2_0 = 9872;\nstatic const opus_int16 silk_resampler_down2_1 = 39809 - 65536;\n\n/* Tables for 2x upsampler, high quality */\nstatic const opus_int16 silk_resampler_up2_hq_0[ 3 ] = { 1746, 14986, 39083 - 65536 };\nstatic const opus_int16 silk_resampler_up2_hq_1[ 3 ] = { 6854, 25769, 55542 - 65536 };\n\n/* Tables with IIR and FIR coefficients for fractional downsamplers */\nextern const opus_int16 silk_Resampler_3_4_COEFS[ 2 + 3 * RESAMPLER_DOWN_ORDER_FIR0 / 2 ];\nextern const opus_int16 silk_Resampler_2_3_COEFS[ 2 + 2 * RESAMPLER_DOWN_ORDER_FIR0 / 2 ];\nextern const opus_int16 silk_Resampler_1_2_COEFS[ 2 +     RESAMPLER_DOWN_ORDER_FIR1 / 2 ];\nextern const opus_int16 silk_Resampler_1_3_COEFS[ 2 +     RESAMPLER_DOWN_ORDER_FIR2 / 2 ];\nextern const opus_int16 silk_Resampler_1_4_COEFS[ 2 +     RESAMPLER_DOWN_ORDER_FIR2 / 2 ];\nextern const opus_int16 silk_Resampler_1_6_COEFS[ 2 +     RESAMPLER_DOWN_ORDER_FIR2 / 2 ];\nextern const opus_int16 silk_Resampler_2_3_COEFS_LQ[ 2 + 2 * 2 ];\n\n/* Table with interplation fractions of 1/24, 3/24, ..., 23/24 */\nextern const opus_int16 silk_resampler_frac_FIR_12[ 12 ][ RESAMPLER_ORDER_FIR_12 / 2 ];\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif /* SILK_FIX_RESAMPLER_ROM_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/resampler_structs.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_RESAMPLER_STRUCTS_H\n#define SILK_RESAMPLER_STRUCTS_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define SILK_RESAMPLER_MAX_FIR_ORDER                 36\n#define SILK_RESAMPLER_MAX_IIR_ORDER                 6\n\ntypedef struct _silk_resampler_state_struct{\n    opus_int32       sIIR[ SILK_RESAMPLER_MAX_IIR_ORDER ]; /* this must be the first element of this struct */\n    union{\n        opus_int32   i32[ SILK_RESAMPLER_MAX_FIR_ORDER ];\n        opus_int16   i16[ SILK_RESAMPLER_MAX_FIR_ORDER ];\n    }                sFIR;\n    opus_int16       delayBuf[ 48 ];\n    opus_int         resampler_function;\n    opus_int         batchSize;\n    opus_int32       invRatio_Q16;\n    opus_int         FIR_Order;\n    opus_int         FIR_Fracs;\n    opus_int         Fs_in_kHz;\n    opus_int         Fs_out_kHz;\n    opus_int         inputDelay;\n    const opus_int16 *Coefs;\n} silk_resampler_state_struct;\n\n#ifdef __cplusplus\n}\n#endif\n#endif /* SILK_RESAMPLER_STRUCTS_H */\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/shell_coder.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* shell coder; pulse-subframe length is hardcoded */\n\nstatic OPUS_INLINE void combine_pulses(\n    opus_int         *out,   /* O    combined pulses vector [len] */\n    const opus_int   *in,    /* I    input vector       [2 * len] */\n    const opus_int   len     /* I    number of OUTPUT samples     */\n)\n{\n    opus_int k;\n    for( k = 0; k < len; k++ ) {\n        out[ k ] = in[ 2 * k ] + in[ 2 * k + 1 ];\n    }\n}\n\nstatic OPUS_INLINE void encode_split(\n    ec_enc                      *psRangeEnc,    /* I/O  compressor data structure                   */\n    const opus_int              p_child1,       /* I    pulse amplitude of first child subframe     */\n    const opus_int              p,              /* I    pulse amplitude of current subframe         */\n    const opus_uint8            *shell_table    /* I    table of shell cdfs                         */\n)\n{\n    if( p > 0 ) {\n        ec_enc_icdf( psRangeEnc, p_child1, &shell_table[ silk_shell_code_table_offsets[ p ] ], 8 );\n    }\n}\n\nstatic OPUS_INLINE void decode_split(\n    opus_int                    *p_child1,      /* O    pulse amplitude of first child subframe     */\n    opus_int                    *p_child2,      /* O    pulse amplitude of second child subframe    */\n    ec_dec                      *psRangeDec,    /* I/O  Compressor data structure                   */\n    const opus_int              p,              /* I    pulse amplitude of current subframe         */\n    const opus_uint8            *shell_table    /* I    table of shell cdfs                         */\n)\n{\n    if( p > 0 ) {\n        p_child1[ 0 ] = ec_dec_icdf( psRangeDec, &shell_table[ silk_shell_code_table_offsets[ p ] ], 8 );\n        p_child2[ 0 ] = p - p_child1[ 0 ];\n    } else {\n        p_child1[ 0 ] = 0;\n        p_child2[ 0 ] = 0;\n    }\n}\n\n/* Shell encoder, operates on one shell code frame of 16 pulses */\nvoid silk_shell_encoder(\n    ec_enc                      *psRangeEnc,                    /* I/O  compressor data structure                   */\n    const opus_int              *pulses0                        /* I    data: nonnegative pulse amplitudes          */\n)\n{\n    opus_int pulses1[ 8 ], pulses2[ 4 ], pulses3[ 2 ], pulses4[ 1 ];\n\n    /* this function operates on one shell code frame of 16 pulses */\n    silk_assert( SHELL_CODEC_FRAME_LENGTH == 16 );\n\n    /* tree representation per pulse-subframe */\n    combine_pulses( pulses1, pulses0, 8 );\n    combine_pulses( pulses2, pulses1, 4 );\n    combine_pulses( pulses3, pulses2, 2 );\n    combine_pulses( pulses4, pulses3, 1 );\n\n    encode_split( psRangeEnc, pulses3[  0 ], pulses4[ 0 ], silk_shell_code_table3 );\n\n    encode_split( psRangeEnc, pulses2[  0 ], pulses3[ 0 ], silk_shell_code_table2 );\n\n    encode_split( psRangeEnc, pulses1[  0 ], pulses2[ 0 ], silk_shell_code_table1 );\n    encode_split( psRangeEnc, pulses0[  0 ], pulses1[ 0 ], silk_shell_code_table0 );\n    encode_split( psRangeEnc, pulses0[  2 ], pulses1[ 1 ], silk_shell_code_table0 );\n\n    encode_split( psRangeEnc, pulses1[  2 ], pulses2[ 1 ], silk_shell_code_table1 );\n    encode_split( psRangeEnc, pulses0[  4 ], pulses1[ 2 ], silk_shell_code_table0 );\n    encode_split( psRangeEnc, pulses0[  6 ], pulses1[ 3 ], silk_shell_code_table0 );\n\n    encode_split( psRangeEnc, pulses2[  2 ], pulses3[ 1 ], silk_shell_code_table2 );\n\n    encode_split( psRangeEnc, pulses1[  4 ], pulses2[ 2 ], silk_shell_code_table1 );\n    encode_split( psRangeEnc, pulses0[  8 ], pulses1[ 4 ], silk_shell_code_table0 );\n    encode_split( psRangeEnc, pulses0[ 10 ], pulses1[ 5 ], silk_shell_code_table0 );\n\n    encode_split( psRangeEnc, pulses1[  6 ], pulses2[ 3 ], silk_shell_code_table1 );\n    encode_split( psRangeEnc, pulses0[ 12 ], pulses1[ 6 ], silk_shell_code_table0 );\n    encode_split( psRangeEnc, pulses0[ 14 ], pulses1[ 7 ], silk_shell_code_table0 );\n}\n\n\n/* Shell decoder, operates on one shell code frame of 16 pulses */\nvoid silk_shell_decoder(\n    opus_int                    *pulses0,                       /* O    data: nonnegative pulse amplitudes          */\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    const opus_int              pulses4                         /* I    number of pulses per pulse-subframe         */\n)\n{\n    opus_int pulses3[ 2 ], pulses2[ 4 ], pulses1[ 8 ];\n\n    /* this function operates on one shell code frame of 16 pulses */\n    silk_assert( SHELL_CODEC_FRAME_LENGTH == 16 );\n\n    decode_split( &pulses3[  0 ], &pulses3[  1 ], psRangeDec, pulses4,      silk_shell_code_table3 );\n\n    decode_split( &pulses2[  0 ], &pulses2[  1 ], psRangeDec, pulses3[ 0 ], silk_shell_code_table2 );\n\n    decode_split( &pulses1[  0 ], &pulses1[  1 ], psRangeDec, pulses2[ 0 ], silk_shell_code_table1 );\n    decode_split( &pulses0[  0 ], &pulses0[  1 ], psRangeDec, pulses1[ 0 ], silk_shell_code_table0 );\n    decode_split( &pulses0[  2 ], &pulses0[  3 ], psRangeDec, pulses1[ 1 ], silk_shell_code_table0 );\n\n    decode_split( &pulses1[  2 ], &pulses1[  3 ], psRangeDec, pulses2[ 1 ], silk_shell_code_table1 );\n    decode_split( &pulses0[  4 ], &pulses0[  5 ], psRangeDec, pulses1[ 2 ], silk_shell_code_table0 );\n    decode_split( &pulses0[  6 ], &pulses0[  7 ], psRangeDec, pulses1[ 3 ], silk_shell_code_table0 );\n\n    decode_split( &pulses2[  2 ], &pulses2[  3 ], psRangeDec, pulses3[ 1 ], silk_shell_code_table2 );\n\n    decode_split( &pulses1[  4 ], &pulses1[  5 ], psRangeDec, pulses2[ 2 ], silk_shell_code_table1 );\n    decode_split( &pulses0[  8 ], &pulses0[  9 ], psRangeDec, pulses1[ 4 ], silk_shell_code_table0 );\n    decode_split( &pulses0[ 10 ], &pulses0[ 11 ], psRangeDec, pulses1[ 5 ], silk_shell_code_table0 );\n\n    decode_split( &pulses1[  6 ], &pulses1[  7 ], psRangeDec, pulses2[ 3 ], silk_shell_code_table1 );\n    decode_split( &pulses0[ 12 ], &pulses0[ 13 ], psRangeDec, pulses1[ 6 ], silk_shell_code_table0 );\n    decode_split( &pulses0[ 14 ], &pulses0[ 15 ], psRangeDec, pulses1[ 7 ], silk_shell_code_table0 );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/sigm_Q15.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n/* Approximate sigmoid function */\n\n#include \"SigProc_FIX.h\"\n\n/* fprintf(1, '%d, ', round(1024 * ([1 ./ (1 + exp(-(1:5))), 1] - 1 ./ (1 + exp(-(0:5)))))); */\nstatic const opus_int32 sigm_LUT_slope_Q10[ 6 ] = {\n    237, 153, 73, 30, 12, 7\n};\n/* fprintf(1, '%d, ', round(32767 * 1 ./ (1 + exp(-(0:5))))); */\nstatic const opus_int32 sigm_LUT_pos_Q15[ 6 ] = {\n    16384, 23955, 28861, 31213, 32178, 32548\n};\n/* fprintf(1, '%d, ', round(32767 * 1 ./ (1 + exp((0:5))))); */\nstatic const opus_int32 sigm_LUT_neg_Q15[ 6 ] = {\n    16384, 8812, 3906, 1554, 589, 219\n};\n\nopus_int silk_sigm_Q15(\n    opus_int                    in_Q5               /* I                                                                */\n)\n{\n    opus_int ind;\n\n    if( in_Q5 < 0 ) {\n        /* Negative input */\n        in_Q5 = -in_Q5;\n        if( in_Q5 >= 6 * 32 ) {\n            return 0;        /* Clip */\n        } else {\n            /* Linear interpolation of look up table */\n            ind = silk_RSHIFT( in_Q5, 5 );\n            return( sigm_LUT_neg_Q15[ ind ] - silk_SMULBB( sigm_LUT_slope_Q10[ ind ], in_Q5 & 0x1F ) );\n        }\n    } else {\n        /* Positive input */\n        if( in_Q5 >= 6 * 32 ) {\n            return 32767;        /* clip */\n        } else {\n            /* Linear interpolation of look up table */\n            ind = silk_RSHIFT( in_Q5, 5 );\n            return( sigm_LUT_pos_Q15[ ind ] + silk_SMULBB( sigm_LUT_slope_Q10[ ind ], in_Q5 & 0x1F ) );\n        }\n    }\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/sort.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n/* Insertion sort (fast for already almost sorted arrays):   */\n/* Best case:  O(n)   for an already sorted array            */\n/* Worst case: O(n^2) for an inversely sorted array          */\n/*                                                           */\n/* Shell short:    http://en.wikipedia.org/wiki/Shell_sort   */\n\n#include \"SigProc_FIX.h\"\n\nvoid silk_insertion_sort_increasing(\n    opus_int32           *a,             /* I/O   Unsorted / Sorted vector               */\n    opus_int             *idx,           /* O     Index vector for the sorted elements   */\n    const opus_int       L,              /* I     Vector length                          */\n    const opus_int       K               /* I     Number of correctly sorted positions   */\n)\n{\n    opus_int32    value;\n    opus_int        i, j;\n\n    /* Safety checks */\n    silk_assert( K >  0 );\n    silk_assert( L >  0 );\n    silk_assert( L >= K );\n\n    /* Write start indices in index vector */\n    for( i = 0; i < K; i++ ) {\n        idx[ i ] = i;\n    }\n\n    /* Sort vector elements by value, increasing order */\n    for( i = 1; i < K; i++ ) {\n        value = a[ i ];\n        for( j = i - 1; ( j >= 0 ) && ( value < a[ j ] ); j-- ) {\n            a[ j + 1 ]   = a[ j ];       /* Shift value */\n            idx[ j + 1 ] = idx[ j ];     /* Shift index */\n        }\n        a[ j + 1 ]   = value;   /* Write value */\n        idx[ j + 1 ] = i;       /* Write index */\n    }\n\n    /* If less than L values are asked for, check the remaining values, */\n    /* but only spend CPU to ensure that the K first values are correct */\n    for( i = K; i < L; i++ ) {\n        value = a[ i ];\n        if( value < a[ K - 1 ] ) {\n            for( j = K - 2; ( j >= 0 ) && ( value < a[ j ] ); j-- ) {\n                a[ j + 1 ]   = a[ j ];       /* Shift value */\n                idx[ j + 1 ] = idx[ j ];     /* Shift index */\n            }\n            a[ j + 1 ]   = value;   /* Write value */\n            idx[ j + 1 ] = i;       /* Write index */\n        }\n    }\n}\n\n#ifdef FIXED_POINT\n/* This function is only used by the fixed-point build */\nvoid silk_insertion_sort_decreasing_int16(\n    opus_int16                  *a,                 /* I/O   Unsorted / Sorted vector                                   */\n    opus_int                    *idx,               /* O     Index vector for the sorted elements                       */\n    const opus_int              L,                  /* I     Vector length                                              */\n    const opus_int              K                   /* I     Number of correctly sorted positions                       */\n)\n{\n    opus_int i, j;\n    opus_int value;\n\n    /* Safety checks */\n    silk_assert( K >  0 );\n    silk_assert( L >  0 );\n    silk_assert( L >= K );\n\n    /* Write start indices in index vector */\n    for( i = 0; i < K; i++ ) {\n        idx[ i ] = i;\n    }\n\n    /* Sort vector elements by value, decreasing order */\n    for( i = 1; i < K; i++ ) {\n        value = a[ i ];\n        for( j = i - 1; ( j >= 0 ) && ( value > a[ j ] ); j-- ) {\n            a[ j + 1 ]   = a[ j ];     /* Shift value */\n            idx[ j + 1 ] = idx[ j ];   /* Shift index */\n        }\n        a[ j + 1 ]   = value;   /* Write value */\n        idx[ j + 1 ] = i;       /* Write index */\n    }\n\n    /* If less than L values are asked for, check the remaining values, */\n    /* but only spend CPU to ensure that the K first values are correct */\n    for( i = K; i < L; i++ ) {\n        value = a[ i ];\n        if( value > a[ K - 1 ] ) {\n            for( j = K - 2; ( j >= 0 ) && ( value > a[ j ] ); j-- ) {\n                a[ j + 1 ]   = a[ j ];     /* Shift value */\n                idx[ j + 1 ] = idx[ j ];   /* Shift index */\n            }\n            a[ j + 1 ]   = value;   /* Write value */\n            idx[ j + 1 ] = i;       /* Write index */\n        }\n    }\n}\n#endif\n\nvoid silk_insertion_sort_increasing_all_values_int16(\n     opus_int16                 *a,                 /* I/O   Unsorted / Sorted vector                                   */\n     const opus_int             L                   /* I     Vector length                                              */\n)\n{\n    opus_int    value;\n    opus_int    i, j;\n\n    /* Safety checks */\n    silk_assert( L >  0 );\n\n    /* Sort vector elements by value, increasing order */\n    for( i = 1; i < L; i++ ) {\n        value = a[ i ];\n        for( j = i - 1; ( j >= 0 ) && ( value < a[ j ] ); j-- ) {\n            a[ j + 1 ] = a[ j ]; /* Shift value */\n        }\n        a[ j + 1 ] = value; /* Write value */\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/stereo_LR_to_MS.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n#include \"stack_alloc.h\"\n\n/* Convert Left/Right stereo signal to adaptive Mid/Side representation */\nvoid silk_stereo_LR_to_MS(\n    stereo_enc_state            *state,                         /* I/O  State                                       */\n    opus_int16                  x1[],                           /* I/O  Left input signal, becomes mid signal       */\n    opus_int16                  x2[],                           /* I/O  Right input signal, becomes side signal     */\n    opus_int8                   ix[ 2 ][ 3 ],                   /* O    Quantization indices                        */\n    opus_int8                   *mid_only_flag,                 /* O    Flag: only mid signal coded                 */\n    opus_int32                  mid_side_rates_bps[],           /* O    Bitrates for mid and side signals           */\n    opus_int32                  total_rate_bps,                 /* I    Total bitrate                               */\n    opus_int                    prev_speech_act_Q8,             /* I    Speech activity level in previous frame     */\n    opus_int                    toMono,                         /* I    Last frame before a stereo->mono transition */\n    opus_int                    fs_kHz,                         /* I    Sample rate (kHz)                           */\n    opus_int                    frame_length                    /* I    Number of samples                           */\n)\n{\n    opus_int   n, is10msFrame, denom_Q16, delta0_Q13, delta1_Q13;\n    opus_int32 sum, diff, smooth_coef_Q16, pred_Q13[ 2 ], pred0_Q13, pred1_Q13;\n    opus_int32 LP_ratio_Q14, HP_ratio_Q14, frac_Q16, frac_3_Q16, min_mid_rate_bps, width_Q14, w_Q24, deltaw_Q24;\n    VARDECL( opus_int16, side );\n    VARDECL( opus_int16, LP_mid );\n    VARDECL( opus_int16, HP_mid );\n    VARDECL( opus_int16, LP_side );\n    VARDECL( opus_int16, HP_side );\n    opus_int16 *mid = &x1[ -2 ];\n    SAVE_STACK;\n\n    ALLOC( side, frame_length + 2, opus_int16 );\n    /* Convert to basic mid/side signals */\n    for( n = 0; n < frame_length + 2; n++ ) {\n        sum  = x1[ n - 2 ] + (opus_int32)x2[ n - 2 ];\n        diff = x1[ n - 2 ] - (opus_int32)x2[ n - 2 ];\n        mid[  n ] = (opus_int16)silk_RSHIFT_ROUND( sum, 1 );\n        side[ n ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( diff, 1 ) );\n    }\n\n    /* Buffering */\n    silk_memcpy( mid,  state->sMid,  2 * sizeof( opus_int16 ) );\n    silk_memcpy( side, state->sSide, 2 * sizeof( opus_int16 ) );\n    silk_memcpy( state->sMid,  &mid[  frame_length ], 2 * sizeof( opus_int16 ) );\n    silk_memcpy( state->sSide, &side[ frame_length ], 2 * sizeof( opus_int16 ) );\n\n    /* LP and HP filter mid signal */\n    ALLOC( LP_mid, frame_length, opus_int16 );\n    ALLOC( HP_mid, frame_length, opus_int16 );\n    for( n = 0; n < frame_length; n++ ) {\n        sum = silk_RSHIFT_ROUND( silk_ADD_LSHIFT( mid[ n ] + mid[ n + 2 ], mid[ n + 1 ], 1 ), 2 );\n        LP_mid[ n ] = sum;\n        HP_mid[ n ] = mid[ n + 1 ] - sum;\n    }\n\n    /* LP and HP filter side signal */\n    ALLOC( LP_side, frame_length, opus_int16 );\n    ALLOC( HP_side, frame_length, opus_int16 );\n    for( n = 0; n < frame_length; n++ ) {\n        sum = silk_RSHIFT_ROUND( silk_ADD_LSHIFT( side[ n ] + side[ n + 2 ], side[ n + 1 ], 1 ), 2 );\n        LP_side[ n ] = sum;\n        HP_side[ n ] = side[ n + 1 ] - sum;\n    }\n\n    /* Find energies and predictors */\n    is10msFrame = frame_length == 10 * fs_kHz;\n    smooth_coef_Q16 = is10msFrame ?\n        SILK_FIX_CONST( STEREO_RATIO_SMOOTH_COEF / 2, 16 ) :\n        SILK_FIX_CONST( STEREO_RATIO_SMOOTH_COEF,     16 );\n    smooth_coef_Q16 = silk_SMULWB( silk_SMULBB( prev_speech_act_Q8, prev_speech_act_Q8 ), smooth_coef_Q16 );\n\n    pred_Q13[ 0 ] = silk_stereo_find_predictor( &LP_ratio_Q14, LP_mid, LP_side, &state->mid_side_amp_Q0[ 0 ], frame_length, smooth_coef_Q16 );\n    pred_Q13[ 1 ] = silk_stereo_find_predictor( &HP_ratio_Q14, HP_mid, HP_side, &state->mid_side_amp_Q0[ 2 ], frame_length, smooth_coef_Q16 );\n    /* Ratio of the norms of residual and mid signals */\n    frac_Q16 = silk_SMLABB( HP_ratio_Q14, LP_ratio_Q14, 3 );\n    frac_Q16 = silk_min( frac_Q16, SILK_FIX_CONST( 1, 16 ) );\n\n    /* Determine bitrate distribution between mid and side, and possibly reduce stereo width */\n    total_rate_bps -= is10msFrame ? 1200 : 600;      /* Subtract approximate bitrate for coding stereo parameters */\n    if( total_rate_bps < 1 ) {\n        total_rate_bps = 1;\n    }\n    min_mid_rate_bps = silk_SMLABB( 2000, fs_kHz, 900 );\n    silk_assert( min_mid_rate_bps < 32767 );\n    /* Default bitrate distribution: 8 parts for Mid and (5+3*frac) parts for Side. so: mid_rate = ( 8 / ( 13 + 3 * frac ) ) * total_ rate */\n    frac_3_Q16 = silk_MUL( 3, frac_Q16 );\n    mid_side_rates_bps[ 0 ] = silk_DIV32_varQ( total_rate_bps, SILK_FIX_CONST( 8 + 5, 16 ) + frac_3_Q16, 16+3 );\n    /* If Mid bitrate below minimum, reduce stereo width */\n    if( mid_side_rates_bps[ 0 ] < min_mid_rate_bps ) {\n        mid_side_rates_bps[ 0 ] = min_mid_rate_bps;\n        mid_side_rates_bps[ 1 ] = total_rate_bps - mid_side_rates_bps[ 0 ];\n        /* width = 4 * ( 2 * side_rate - min_rate ) / ( ( 1 + 3 * frac ) * min_rate ) */\n        width_Q14 = silk_DIV32_varQ( silk_LSHIFT( mid_side_rates_bps[ 1 ], 1 ) - min_mid_rate_bps,\n            silk_SMULWB( SILK_FIX_CONST( 1, 16 ) + frac_3_Q16, min_mid_rate_bps ), 14+2 );\n        width_Q14 = silk_LIMIT( width_Q14, 0, SILK_FIX_CONST( 1, 14 ) );\n    } else {\n        mid_side_rates_bps[ 1 ] = total_rate_bps - mid_side_rates_bps[ 0 ];\n        width_Q14 = SILK_FIX_CONST( 1, 14 );\n    }\n\n    /* Smoother */\n    state->smth_width_Q14 = (opus_int16)silk_SMLAWB( state->smth_width_Q14, width_Q14 - state->smth_width_Q14, smooth_coef_Q16 );\n\n    /* At very low bitrates or for inputs that are nearly amplitude panned, switch to panned-mono coding */\n    *mid_only_flag = 0;\n    if( toMono ) {\n        /* Last frame before stereo->mono transition; collapse stereo width */\n        width_Q14 = 0;\n        pred_Q13[ 0 ] = 0;\n        pred_Q13[ 1 ] = 0;\n        silk_stereo_quant_pred( pred_Q13, ix );\n    } else if( state->width_prev_Q14 == 0 &&\n        ( 8 * total_rate_bps < 13 * min_mid_rate_bps || silk_SMULWB( frac_Q16, state->smth_width_Q14 ) < SILK_FIX_CONST( 0.05, 14 ) ) )\n    {\n        /* Code as panned-mono; previous frame already had zero width */\n        /* Scale down and quantize predictors */\n        pred_Q13[ 0 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 0 ] ), 14 );\n        pred_Q13[ 1 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 1 ] ), 14 );\n        silk_stereo_quant_pred( pred_Q13, ix );\n        /* Collapse stereo width */\n        width_Q14 = 0;\n        pred_Q13[ 0 ] = 0;\n        pred_Q13[ 1 ] = 0;\n        mid_side_rates_bps[ 0 ] = total_rate_bps;\n        mid_side_rates_bps[ 1 ] = 0;\n        *mid_only_flag = 1;\n    } else if( state->width_prev_Q14 != 0 &&\n        ( 8 * total_rate_bps < 11 * min_mid_rate_bps || silk_SMULWB( frac_Q16, state->smth_width_Q14 ) < SILK_FIX_CONST( 0.02, 14 ) ) )\n    {\n        /* Transition to zero-width stereo */\n        /* Scale down and quantize predictors */\n        pred_Q13[ 0 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 0 ] ), 14 );\n        pred_Q13[ 1 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 1 ] ), 14 );\n        silk_stereo_quant_pred( pred_Q13, ix );\n        /* Collapse stereo width */\n        width_Q14 = 0;\n        pred_Q13[ 0 ] = 0;\n        pred_Q13[ 1 ] = 0;\n    } else if( state->smth_width_Q14 > SILK_FIX_CONST( 0.95, 14 ) ) {\n        /* Full-width stereo coding */\n        silk_stereo_quant_pred( pred_Q13, ix );\n        width_Q14 = SILK_FIX_CONST( 1, 14 );\n    } else {\n        /* Reduced-width stereo coding; scale down and quantize predictors */\n        pred_Q13[ 0 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 0 ] ), 14 );\n        pred_Q13[ 1 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 1 ] ), 14 );\n        silk_stereo_quant_pred( pred_Q13, ix );\n        width_Q14 = state->smth_width_Q14;\n    }\n\n    /* Make sure to keep on encoding until the tapered output has been transmitted */\n    if( *mid_only_flag == 1 ) {\n        state->silent_side_len += frame_length - STEREO_INTERP_LEN_MS * fs_kHz;\n        if( state->silent_side_len < LA_SHAPE_MS * fs_kHz ) {\n            *mid_only_flag = 0;\n        } else {\n            /* Limit to avoid wrapping around */\n            state->silent_side_len = 10000;\n        }\n    } else {\n        state->silent_side_len = 0;\n    }\n\n    if( *mid_only_flag == 0 && mid_side_rates_bps[ 1 ] < 1 ) {\n        mid_side_rates_bps[ 1 ] = 1;\n        mid_side_rates_bps[ 0 ] = silk_max_int( 1, total_rate_bps - mid_side_rates_bps[ 1 ]);\n    }\n\n    /* Interpolate predictors and subtract prediction from side channel */\n    pred0_Q13  = -state->pred_prev_Q13[ 0 ];\n    pred1_Q13  = -state->pred_prev_Q13[ 1 ];\n    w_Q24      =  silk_LSHIFT( state->width_prev_Q14, 10 );\n    denom_Q16  = silk_DIV32_16( (opus_int32)1 << 16, STEREO_INTERP_LEN_MS * fs_kHz );\n    delta0_Q13 = -silk_RSHIFT_ROUND( silk_SMULBB( pred_Q13[ 0 ] - state->pred_prev_Q13[ 0 ], denom_Q16 ), 16 );\n    delta1_Q13 = -silk_RSHIFT_ROUND( silk_SMULBB( pred_Q13[ 1 ] - state->pred_prev_Q13[ 1 ], denom_Q16 ), 16 );\n    deltaw_Q24 =  silk_LSHIFT( silk_SMULWB( width_Q14 - state->width_prev_Q14, denom_Q16 ), 10 );\n    for( n = 0; n < STEREO_INTERP_LEN_MS * fs_kHz; n++ ) {\n        pred0_Q13 += delta0_Q13;\n        pred1_Q13 += delta1_Q13;\n        w_Q24   += deltaw_Q24;\n        sum = silk_LSHIFT( silk_ADD_LSHIFT( mid[ n ] + mid[ n + 2 ], mid[ n + 1 ], 1 ), 9 );    /* Q11 */\n        sum = silk_SMLAWB( silk_SMULWB( w_Q24, side[ n + 1 ] ), sum, pred0_Q13 );               /* Q8  */\n        sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)mid[ n + 1 ], 11 ), pred1_Q13 );       /* Q8  */\n        x2[ n - 1 ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( sum, 8 ) );\n    }\n\n    pred0_Q13 = -pred_Q13[ 0 ];\n    pred1_Q13 = -pred_Q13[ 1 ];\n    w_Q24     =  silk_LSHIFT( width_Q14, 10 );\n    for( n = STEREO_INTERP_LEN_MS * fs_kHz; n < frame_length; n++ ) {\n        sum = silk_LSHIFT( silk_ADD_LSHIFT( mid[ n ] + mid[ n + 2 ], mid[ n + 1 ], 1 ), 9 );    /* Q11 */\n        sum = silk_SMLAWB( silk_SMULWB( w_Q24, side[ n + 1 ] ), sum, pred0_Q13 );               /* Q8  */\n        sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)mid[ n + 1 ], 11 ), pred1_Q13 );       /* Q8  */\n        x2[ n - 1 ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( sum, 8 ) );\n    }\n    state->pred_prev_Q13[ 0 ] = (opus_int16)pred_Q13[ 0 ];\n    state->pred_prev_Q13[ 1 ] = (opus_int16)pred_Q13[ 1 ];\n    state->width_prev_Q14     = (opus_int16)width_Q14;\n    RESTORE_STACK;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/stereo_MS_to_LR.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Convert adaptive Mid/Side representation to Left/Right stereo signal */\nvoid silk_stereo_MS_to_LR(\n    stereo_dec_state            *state,                         /* I/O  State                                       */\n    opus_int16                  x1[],                           /* I/O  Left input signal, becomes mid signal       */\n    opus_int16                  x2[],                           /* I/O  Right input signal, becomes side signal     */\n    const opus_int32            pred_Q13[],                     /* I    Predictors                                  */\n    opus_int                    fs_kHz,                         /* I    Samples rate (kHz)                          */\n    opus_int                    frame_length                    /* I    Number of samples                           */\n)\n{\n    opus_int   n, denom_Q16, delta0_Q13, delta1_Q13;\n    opus_int32 sum, diff, pred0_Q13, pred1_Q13;\n\n    /* Buffering */\n    silk_memcpy( x1, state->sMid,  2 * sizeof( opus_int16 ) );\n    silk_memcpy( x2, state->sSide, 2 * sizeof( opus_int16 ) );\n    silk_memcpy( state->sMid,  &x1[ frame_length ], 2 * sizeof( opus_int16 ) );\n    silk_memcpy( state->sSide, &x2[ frame_length ], 2 * sizeof( opus_int16 ) );\n\n    /* Interpolate predictors and add prediction to side channel */\n    pred0_Q13  = state->pred_prev_Q13[ 0 ];\n    pred1_Q13  = state->pred_prev_Q13[ 1 ];\n    denom_Q16  = silk_DIV32_16( (opus_int32)1 << 16, STEREO_INTERP_LEN_MS * fs_kHz );\n    delta0_Q13 = silk_RSHIFT_ROUND( silk_SMULBB( pred_Q13[ 0 ] - state->pred_prev_Q13[ 0 ], denom_Q16 ), 16 );\n    delta1_Q13 = silk_RSHIFT_ROUND( silk_SMULBB( pred_Q13[ 1 ] - state->pred_prev_Q13[ 1 ], denom_Q16 ), 16 );\n    for( n = 0; n < STEREO_INTERP_LEN_MS * fs_kHz; n++ ) {\n        pred0_Q13 += delta0_Q13;\n        pred1_Q13 += delta1_Q13;\n        sum = silk_LSHIFT( silk_ADD_LSHIFT( x1[ n ] + x1[ n + 2 ], x1[ n + 1 ], 1 ), 9 );       /* Q11 */\n        sum = silk_SMLAWB( silk_LSHIFT( (opus_int32)x2[ n + 1 ], 8 ), sum, pred0_Q13 );         /* Q8  */\n        sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)x1[ n + 1 ], 11 ), pred1_Q13 );        /* Q8  */\n        x2[ n + 1 ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( sum, 8 ) );\n    }\n    pred0_Q13 = pred_Q13[ 0 ];\n    pred1_Q13 = pred_Q13[ 1 ];\n    for( n = STEREO_INTERP_LEN_MS * fs_kHz; n < frame_length; n++ ) {\n        sum = silk_LSHIFT( silk_ADD_LSHIFT( x1[ n ] + x1[ n + 2 ], x1[ n + 1 ], 1 ), 9 );       /* Q11 */\n        sum = silk_SMLAWB( silk_LSHIFT( (opus_int32)x2[ n + 1 ], 8 ), sum, pred0_Q13 );         /* Q8  */\n        sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)x1[ n + 1 ], 11 ), pred1_Q13 );        /* Q8  */\n        x2[ n + 1 ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( sum, 8 ) );\n    }\n    state->pred_prev_Q13[ 0 ] = pred_Q13[ 0 ];\n    state->pred_prev_Q13[ 1 ] = pred_Q13[ 1 ];\n\n    /* Convert to left/right signals */\n    for( n = 0; n < frame_length; n++ ) {\n        sum  = x1[ n + 1 ] + (opus_int32)x2[ n + 1 ];\n        diff = x1[ n + 1 ] - (opus_int32)x2[ n + 1 ];\n        x1[ n + 1 ] = (opus_int16)silk_SAT16( sum );\n        x2[ n + 1 ] = (opus_int16)silk_SAT16( diff );\n    }\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/stereo_decode_pred.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Decode mid/side predictors */\nvoid silk_stereo_decode_pred(\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    opus_int32                  pred_Q13[]                      /* O    Predictors                                  */\n)\n{\n    opus_int   n, ix[ 2 ][ 3 ];\n    opus_int32 low_Q13, step_Q13;\n\n    /* Entropy decoding */\n    n = ec_dec_icdf( psRangeDec, silk_stereo_pred_joint_iCDF, 8 );\n    ix[ 0 ][ 2 ] = silk_DIV32_16( n, 5 );\n    ix[ 1 ][ 2 ] = n - 5 * ix[ 0 ][ 2 ];\n    for( n = 0; n < 2; n++ ) {\n        ix[ n ][ 0 ] = ec_dec_icdf( psRangeDec, silk_uniform3_iCDF, 8 );\n        ix[ n ][ 1 ] = ec_dec_icdf( psRangeDec, silk_uniform5_iCDF, 8 );\n    }\n\n    /* Dequantize */\n    for( n = 0; n < 2; n++ ) {\n        ix[ n ][ 0 ] += 3 * ix[ n ][ 2 ];\n        low_Q13 = silk_stereo_pred_quant_Q13[ ix[ n ][ 0 ] ];\n        step_Q13 = silk_SMULWB( silk_stereo_pred_quant_Q13[ ix[ n ][ 0 ] + 1 ] - low_Q13,\n            SILK_FIX_CONST( 0.5 / STEREO_QUANT_SUB_STEPS, 16 ) );\n        pred_Q13[ n ] = silk_SMLABB( low_Q13, step_Q13, 2 * ix[ n ][ 1 ] + 1 );\n    }\n\n    /* Subtract second from first predictor (helps when actually applying these) */\n    pred_Q13[ 0 ] -= pred_Q13[ 1 ];\n}\n\n/* Decode mid-only flag */\nvoid silk_stereo_decode_mid_only(\n    ec_dec                      *psRangeDec,                    /* I/O  Compressor data structure                   */\n    opus_int                    *decode_only_mid                /* O    Flag that only mid channel has been coded   */\n)\n{\n    /* Decode flag that only mid channel is coded */\n    *decode_only_mid = ec_dec_icdf( psRangeDec, silk_stereo_only_code_mid_iCDF, 8 );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/stereo_encode_pred.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Entropy code the mid/side quantization indices */\nvoid silk_stereo_encode_pred(\n    ec_enc                      *psRangeEnc,                    /* I/O  Compressor data structure                   */\n    opus_int8                   ix[ 2 ][ 3 ]                    /* I    Quantization indices                        */\n)\n{\n    opus_int   n;\n\n    /* Entropy coding */\n    n = 5 * ix[ 0 ][ 2 ] + ix[ 1 ][ 2 ];\n    silk_assert( n < 25 );\n    ec_enc_icdf( psRangeEnc, n, silk_stereo_pred_joint_iCDF, 8 );\n    for( n = 0; n < 2; n++ ) {\n        silk_assert( ix[ n ][ 0 ] < 3 );\n        silk_assert( ix[ n ][ 1 ] < STEREO_QUANT_SUB_STEPS );\n        ec_enc_icdf( psRangeEnc, ix[ n ][ 0 ], silk_uniform3_iCDF, 8 );\n        ec_enc_icdf( psRangeEnc, ix[ n ][ 1 ], silk_uniform5_iCDF, 8 );\n    }\n}\n\n/* Entropy code the mid-only flag */\nvoid silk_stereo_encode_mid_only(\n    ec_enc                      *psRangeEnc,                    /* I/O  Compressor data structure                   */\n    opus_int8                   mid_only_flag\n)\n{\n    /* Encode flag that only mid channel is coded */\n    ec_enc_icdf( psRangeEnc, mid_only_flag, silk_stereo_only_code_mid_iCDF, 8 );\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/stereo_find_predictor.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Find least-squares prediction gain for one signal based on another and quantize it */\nopus_int32 silk_stereo_find_predictor(                          /* O    Returns predictor in Q13                    */\n    opus_int32                  *ratio_Q14,                     /* O    Ratio of residual and mid energies          */\n    const opus_int16            x[],                            /* I    Basis signal                                */\n    const opus_int16            y[],                            /* I    Target signal                               */\n    opus_int32                  mid_res_amp_Q0[],               /* I/O  Smoothed mid, residual norms                */\n    opus_int                    length,                         /* I    Number of samples                           */\n    opus_int                    smooth_coef_Q16                 /* I    Smoothing coefficient                       */\n)\n{\n    opus_int   scale, scale1, scale2;\n    opus_int32 nrgx, nrgy, corr, pred_Q13, pred2_Q10;\n\n    /* Find  predictor */\n    silk_sum_sqr_shift( &nrgx, &scale1, x, length );\n    silk_sum_sqr_shift( &nrgy, &scale2, y, length );\n    scale = silk_max_int( scale1, scale2 );\n    scale = scale + ( scale & 1 );          /* make even */\n    nrgy = silk_RSHIFT32( nrgy, scale - scale2 );\n    nrgx = silk_RSHIFT32( nrgx, scale - scale1 );\n    nrgx = silk_max_int( nrgx, 1 );\n    corr = silk_inner_prod_aligned_scale( x, y, scale, length );\n    pred_Q13 = silk_DIV32_varQ( corr, nrgx, 13 );\n    pred_Q13 = silk_LIMIT( pred_Q13, -(1 << 14), 1 << 14 );\n    pred2_Q10 = silk_SMULWB( pred_Q13, pred_Q13 );\n\n    /* Faster update for signals with large prediction parameters */\n    smooth_coef_Q16 = (opus_int)silk_max_int( smooth_coef_Q16, silk_abs( pred2_Q10 ) );\n\n    /* Smoothed mid and residual norms */\n    silk_assert( smooth_coef_Q16 < 32768 );\n    scale = silk_RSHIFT( scale, 1 );\n    mid_res_amp_Q0[ 0 ] = silk_SMLAWB( mid_res_amp_Q0[ 0 ], silk_LSHIFT( silk_SQRT_APPROX( nrgx ), scale ) - mid_res_amp_Q0[ 0 ],\n        smooth_coef_Q16 );\n    /* Residual energy = nrgy - 2 * pred * corr + pred^2 * nrgx */\n    nrgy = silk_SUB_LSHIFT32( nrgy, silk_SMULWB( corr, pred_Q13 ), 3 + 1 );\n    nrgy = silk_ADD_LSHIFT32( nrgy, silk_SMULWB( nrgx, pred2_Q10 ), 6 );\n    mid_res_amp_Q0[ 1 ] = silk_SMLAWB( mid_res_amp_Q0[ 1 ], silk_LSHIFT( silk_SQRT_APPROX( nrgy ), scale ) - mid_res_amp_Q0[ 1 ],\n        smooth_coef_Q16 );\n\n    /* Ratio of smoothed residual and mid norms */\n    *ratio_Q14 = silk_DIV32_varQ( mid_res_amp_Q0[ 1 ], silk_max( mid_res_amp_Q0[ 0 ], 1 ), 14 );\n    *ratio_Q14 = silk_LIMIT( *ratio_Q14, 0, 32767 );\n\n    return pred_Q13;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/stereo_quant_pred.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"main.h\"\n\n/* Quantize mid/side predictors */\nvoid silk_stereo_quant_pred(\n    opus_int32                  pred_Q13[],                     /* I/O  Predictors (out: quantized)                 */\n    opus_int8                   ix[ 2 ][ 3 ]                    /* O    Quantization indices                        */\n)\n{\n    opus_int   i, j, n;\n    opus_int32 low_Q13, step_Q13, lvl_Q13, err_min_Q13, err_Q13, quant_pred_Q13 = 0;\n\n    /* Quantize */\n    for( n = 0; n < 2; n++ ) {\n        /* Brute-force search over quantization levels */\n        err_min_Q13 = silk_int32_MAX;\n        for( i = 0; i < STEREO_QUANT_TAB_SIZE - 1; i++ ) {\n            low_Q13 = silk_stereo_pred_quant_Q13[ i ];\n            step_Q13 = silk_SMULWB( silk_stereo_pred_quant_Q13[ i + 1 ] - low_Q13,\n                SILK_FIX_CONST( 0.5 / STEREO_QUANT_SUB_STEPS, 16 ) );\n            for( j = 0; j < STEREO_QUANT_SUB_STEPS; j++ ) {\n                lvl_Q13 = silk_SMLABB( low_Q13, step_Q13, 2 * j + 1 );\n                err_Q13 = silk_abs( pred_Q13[ n ] - lvl_Q13 );\n                if( err_Q13 < err_min_Q13 ) {\n                    err_min_Q13 = err_Q13;\n                    quant_pred_Q13 = lvl_Q13;\n                    ix[ n ][ 0 ] = i;\n                    ix[ n ][ 1 ] = j;\n                } else {\n                    /* Error increasing, so we're past the optimum */\n                    goto done;\n                }\n            }\n        }\n        done:\n        ix[ n ][ 2 ]  = silk_DIV32_16( ix[ n ][ 0 ], 3 );\n        ix[ n ][ 0 ] -= ix[ n ][ 2 ] * 3;\n        pred_Q13[ n ] = quant_pred_Q13;\n    }\n\n    /* Subtract second from first predictor (helps when actually applying these) */\n    pred_Q13[ 0 ] -= pred_Q13[ 1 ];\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/structs.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_STRUCTS_H\n#define SILK_STRUCTS_H\n\n#include \"typedef.h\"\n#include \"SigProc_FIX.h\"\n#include \"define.h\"\n#include \"entenc.h\"\n#include \"entdec.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n/************************************/\n/* Noise shaping quantization state */\n/************************************/\ntypedef struct {\n    opus_int16                  xq[           2 * MAX_FRAME_LENGTH ]; /* Buffer for quantized output signal                             */\n    opus_int32                  sLTP_shp_Q14[ 2 * MAX_FRAME_LENGTH ];\n    opus_int32                  sLPC_Q14[ MAX_SUB_FRAME_LENGTH + NSQ_LPC_BUF_LENGTH ];\n    opus_int32                  sAR2_Q14[ MAX_SHAPE_LPC_ORDER ];\n    opus_int32                  sLF_AR_shp_Q14;\n    opus_int                    lagPrev;\n    opus_int                    sLTP_buf_idx;\n    opus_int                    sLTP_shp_buf_idx;\n    opus_int32                  rand_seed;\n    opus_int32                  prev_gain_Q16;\n    opus_int                    rewhite_flag;\n} silk_nsq_state;\n\n/********************************/\n/* VAD state                    */\n/********************************/\ntypedef struct {\n    opus_int32                  AnaState[ 2 ];                  /* Analysis filterbank state: 0-8 kHz                                   */\n    opus_int32                  AnaState1[ 2 ];                 /* Analysis filterbank state: 0-4 kHz                                   */\n    opus_int32                  AnaState2[ 2 ];                 /* Analysis filterbank state: 0-2 kHz                                   */\n    opus_int32                  XnrgSubfr[ VAD_N_BANDS ];       /* Subframe energies                                                    */\n    opus_int32                  NrgRatioSmth_Q8[ VAD_N_BANDS ]; /* Smoothed energy level in each band                                   */\n    opus_int16                  HPstate;                        /* State of differentiator in the lowest band                           */\n    opus_int32                  NL[ VAD_N_BANDS ];              /* Noise energy level in each band                                      */\n    opus_int32                  inv_NL[ VAD_N_BANDS ];          /* Inverse noise energy level in each band                              */\n    opus_int32                  NoiseLevelBias[ VAD_N_BANDS ];  /* Noise level estimator bias/offset                                    */\n    opus_int32                  counter;                        /* Frame counter used in the initial phase                              */\n} silk_VAD_state;\n\n/* Variable cut-off low-pass filter state */\ntypedef struct {\n    opus_int32                   In_LP_State[ 2 ];           /* Low pass filter state */\n    opus_int32                   transition_frame_no;        /* Counter which is mapped to a cut-off frequency */\n    opus_int                     mode;                       /* Operating mode, <0: switch down, >0: switch up; 0: do nothing           */\n} silk_LP_state;\n\n/* Structure containing NLSF codebook */\ntypedef struct {\n    const opus_int16             nVectors;\n    const opus_int16             order;\n    const opus_int16             quantStepSize_Q16;\n    const opus_int16             invQuantStepSize_Q6;\n    const opus_uint8             *CB1_NLSF_Q8;\n    const opus_uint8             *CB1_iCDF;\n    const opus_uint8             *pred_Q8;\n    const opus_uint8             *ec_sel;\n    const opus_uint8             *ec_iCDF;\n    const opus_uint8             *ec_Rates_Q5;\n    const opus_int16             *deltaMin_Q15;\n} silk_NLSF_CB_struct;\n\ntypedef struct {\n    opus_int16                   pred_prev_Q13[ 2 ];\n    opus_int16                   sMid[ 2 ];\n    opus_int16                   sSide[ 2 ];\n    opus_int32                   mid_side_amp_Q0[ 4 ];\n    opus_int16                   smth_width_Q14;\n    opus_int16                   width_prev_Q14;\n    opus_int16                   silent_side_len;\n    opus_int8                    predIx[ MAX_FRAMES_PER_PACKET ][ 2 ][ 3 ];\n    opus_int8                    mid_only_flags[ MAX_FRAMES_PER_PACKET ];\n} stereo_enc_state;\n\ntypedef struct {\n    opus_int16                   pred_prev_Q13[ 2 ];\n    opus_int16                   sMid[ 2 ];\n    opus_int16                   sSide[ 2 ];\n} stereo_dec_state;\n\ntypedef struct {\n    opus_int8                    GainsIndices[ MAX_NB_SUBFR ];\n    opus_int8                    LTPIndex[ MAX_NB_SUBFR ];\n    opus_int8                    NLSFIndices[ MAX_LPC_ORDER + 1 ];\n    opus_int16                   lagIndex;\n    opus_int8                    contourIndex;\n    opus_int8                    signalType;\n    opus_int8                    quantOffsetType;\n    opus_int8                    NLSFInterpCoef_Q2;\n    opus_int8                    PERIndex;\n    opus_int8                    LTP_scaleIndex;\n    opus_int8                    Seed;\n} SideInfoIndices;\n\n/********************************/\n/* Encoder state                */\n/********************************/\ntypedef struct {\n    opus_int32                   In_HP_State[ 2 ];                  /* High pass filter state                                           */\n    opus_int32                   variable_HP_smth1_Q15;             /* State of first smoother                                          */\n    opus_int32                   variable_HP_smth2_Q15;             /* State of second smoother                                         */\n    silk_LP_state                sLP;                               /* Low pass filter state                                            */\n    silk_VAD_state               sVAD;                              /* Voice activity detector state                                    */\n    silk_nsq_state               sNSQ;                              /* Noise Shape Quantizer State                                      */\n    opus_int16                   prev_NLSFq_Q15[ MAX_LPC_ORDER ];   /* Previously quantized NLSF vector                                 */\n    opus_int                     speech_activity_Q8;                /* Speech activity                                                  */\n    opus_int                     allow_bandwidth_switch;            /* Flag indicating that switching of internal bandwidth is allowed  */\n    opus_int8                    LBRRprevLastGainIndex;\n    opus_int8                    prevSignalType;\n    opus_int                     prevLag;\n    opus_int                     pitch_LPC_win_length;\n    opus_int                     max_pitch_lag;                     /* Highest possible pitch lag (samples)                             */\n    opus_int32                   API_fs_Hz;                         /* API sampling frequency (Hz)                                      */\n    opus_int32                   prev_API_fs_Hz;                    /* Previous API sampling frequency (Hz)                             */\n    opus_int                     maxInternal_fs_Hz;                 /* Maximum internal sampling frequency (Hz)                         */\n    opus_int                     minInternal_fs_Hz;                 /* Minimum internal sampling frequency (Hz)                         */\n    opus_int                     desiredInternal_fs_Hz;             /* Soft request for internal sampling frequency (Hz)                */\n    opus_int                     fs_kHz;                            /* Internal sampling frequency (kHz)                                */\n    opus_int                     nb_subfr;                          /* Number of 5 ms subframes in a frame                              */\n    opus_int                     frame_length;                      /* Frame length (samples)                                           */\n    opus_int                     subfr_length;                      /* Subframe length (samples)                                        */\n    opus_int                     ltp_mem_length;                    /* Length of LTP memory                                             */\n    opus_int                     la_pitch;                          /* Look-ahead for pitch analysis (samples)                          */\n    opus_int                     la_shape;                          /* Look-ahead for noise shape analysis (samples)                    */\n    opus_int                     shapeWinLength;                    /* Window length for noise shape analysis (samples)                 */\n    opus_int32                   TargetRate_bps;                    /* Target bitrate (bps)                                             */\n    opus_int                     PacketSize_ms;                     /* Number of milliseconds to put in each packet                     */\n    opus_int                     PacketLoss_perc;                   /* Packet loss rate measured by farend                              */\n    opus_int32                   frameCounter;\n    opus_int                     Complexity;                        /* Complexity setting                                               */\n    opus_int                     nStatesDelayedDecision;            /* Number of states in delayed decision quantization                */\n    opus_int                     useInterpolatedNLSFs;              /* Flag for using NLSF interpolation                                */\n    opus_int                     shapingLPCOrder;                   /* Filter order for noise shaping filters                           */\n    opus_int                     predictLPCOrder;                   /* Filter order for prediction filters                              */\n    opus_int                     pitchEstimationComplexity;         /* Complexity level for pitch estimator                             */\n    opus_int                     pitchEstimationLPCOrder;           /* Whitening filter order for pitch estimator                       */\n    opus_int32                   pitchEstimationThreshold_Q16;      /* Threshold for pitch estimator                                    */\n    opus_int                     LTPQuantLowComplexity;             /* Flag for low complexity LTP quantization                         */\n    opus_int                     mu_LTP_Q9;                         /* Rate-distortion tradeoff in LTP quantization                     */\n    opus_int32                   sum_log_gain_Q7;\t\t\t\t\t/* Cumulative max prediction gain\t\t\t\t\t\t\t\t\t*/\n    opus_int                     NLSF_MSVQ_Survivors;               /* Number of survivors in NLSF MSVQ                                 */\n    opus_int                     first_frame_after_reset;           /* Flag for deactivating NLSF interpolation, pitch prediction       */\n    opus_int                     controlled_since_last_payload;     /* Flag for ensuring codec_control only runs once per packet        */\n    opus_int                     warping_Q16;                       /* Warping parameter for warped noise shaping                       */\n    opus_int                     useCBR;                            /* Flag to enable constant bitrate                                  */\n    opus_int                     prefillFlag;                       /* Flag to indicate that only buffers are prefilled, no coding      */\n    const opus_uint8             *pitch_lag_low_bits_iCDF;          /* Pointer to iCDF table for low bits of pitch lag index            */\n    const opus_uint8             *pitch_contour_iCDF;               /* Pointer to iCDF table for pitch contour index                    */\n    const silk_NLSF_CB_struct    *psNLSF_CB;                        /* Pointer to NLSF codebook                                         */\n    opus_int                     input_quality_bands_Q15[ VAD_N_BANDS ];\n    opus_int                     input_tilt_Q15;\n    opus_int                     SNR_dB_Q7;                         /* Quality setting                                                  */\n\n    opus_int8                    VAD_flags[ MAX_FRAMES_PER_PACKET ];\n    opus_int8                    LBRR_flag;\n    opus_int                     LBRR_flags[ MAX_FRAMES_PER_PACKET ];\n\n    SideInfoIndices              indices;\n    opus_int8                    pulses[ MAX_FRAME_LENGTH ];\n\n    int                          arch;\n\n    /* Input/output buffering */\n    opus_int16                   inputBuf[ MAX_FRAME_LENGTH + 2 ];  /* Buffer containing input signal                                   */\n    opus_int                     inputBufIx;\n    opus_int                     nFramesPerPacket;\n    opus_int                     nFramesEncoded;                    /* Number of frames analyzed in current packet                      */\n\n    opus_int                     nChannelsAPI;\n    opus_int                     nChannelsInternal;\n    opus_int                     channelNb;\n\n    /* Parameters For LTP scaling Control */\n    opus_int                     frames_since_onset;\n\n    /* Specifically for entropy coding */\n    opus_int                     ec_prevSignalType;\n    opus_int16                   ec_prevLagIndex;\n\n    silk_resampler_state_struct resampler_state;\n\n    /* DTX */\n    opus_int                     useDTX;                            /* Flag to enable DTX                                               */\n    opus_int                     inDTX;                             /* Flag to signal DTX period                                        */\n    opus_int                     noSpeechCounter;                   /* Counts concecutive nonactive frames, used by DTX                 */\n\n    /* Inband Low Bitrate Redundancy (LBRR) data */\n    opus_int                     useInBandFEC;                      /* Saves the API setting for query                                  */\n    opus_int                     LBRR_enabled;                      /* Depends on useInBandFRC, bitrate and packet loss rate            */\n    opus_int                     LBRR_GainIncreases;                /* Gains increment for coding LBRR frames                           */\n    SideInfoIndices              indices_LBRR[ MAX_FRAMES_PER_PACKET ];\n    opus_int8                    pulses_LBRR[ MAX_FRAMES_PER_PACKET ][ MAX_FRAME_LENGTH ];\n} silk_encoder_state;\n\n\n/* Struct for Packet Loss Concealment */\ntypedef struct {\n    opus_int32                  pitchL_Q8;                          /* Pitch lag to use for voiced concealment                          */\n    opus_int16                  LTPCoef_Q14[ LTP_ORDER ];           /* LTP coeficients to use for voiced concealment                    */\n    opus_int16                  prevLPC_Q12[ MAX_LPC_ORDER ];\n    opus_int                    last_frame_lost;                    /* Was previous frame lost                                          */\n    opus_int32                  rand_seed;                          /* Seed for unvoiced signal generation                              */\n    opus_int16                  randScale_Q14;                      /* Scaling of unvoiced random signal                                */\n    opus_int32                  conc_energy;\n    opus_int                    conc_energy_shift;\n    opus_int16                  prevLTP_scale_Q14;\n    opus_int32                  prevGain_Q16[ 2 ];\n    opus_int                    fs_kHz;\n    opus_int                    nb_subfr;\n    opus_int                    subfr_length;\n} silk_PLC_struct;\n\n/* Struct for CNG */\ntypedef struct {\n    opus_int32                  CNG_exc_buf_Q14[ MAX_FRAME_LENGTH ];\n    opus_int16                  CNG_smth_NLSF_Q15[ MAX_LPC_ORDER ];\n    opus_int32                  CNG_synth_state[ MAX_LPC_ORDER ];\n    opus_int32                  CNG_smth_Gain_Q16;\n    opus_int32                  rand_seed;\n    opus_int                    fs_kHz;\n} silk_CNG_struct;\n\n/********************************/\n/* Decoder state                */\n/********************************/\ntypedef struct {\n    opus_int32                  prev_gain_Q16;\n    opus_int32                  exc_Q14[ MAX_FRAME_LENGTH ];\n    opus_int32                  sLPC_Q14_buf[ MAX_LPC_ORDER ];\n    opus_int16                  outBuf[ MAX_FRAME_LENGTH + 2 * MAX_SUB_FRAME_LENGTH ];  /* Buffer for output signal                     */\n    opus_int                    lagPrev;                            /* Previous Lag                                                     */\n    opus_int8                   LastGainIndex;                      /* Previous gain index                                              */\n    opus_int                    fs_kHz;                             /* Sampling frequency in kHz                                        */\n    opus_int32                  fs_API_hz;                          /* API sample frequency (Hz)                                        */\n    opus_int                    nb_subfr;                           /* Number of 5 ms subframes in a frame                              */\n    opus_int                    frame_length;                       /* Frame length (samples)                                           */\n    opus_int                    subfr_length;                       /* Subframe length (samples)                                        */\n    opus_int                    ltp_mem_length;                     /* Length of LTP memory                                             */\n    opus_int                    LPC_order;                          /* LPC order                                                        */\n    opus_int16                  prevNLSF_Q15[ MAX_LPC_ORDER ];      /* Used to interpolate LSFs                                         */\n    opus_int                    first_frame_after_reset;            /* Flag for deactivating NLSF interpolation                         */\n    const opus_uint8            *pitch_lag_low_bits_iCDF;           /* Pointer to iCDF table for low bits of pitch lag index            */\n    const opus_uint8            *pitch_contour_iCDF;                /* Pointer to iCDF table for pitch contour index                    */\n\n    /* For buffering payload in case of more frames per packet */\n    opus_int                    nFramesDecoded;\n    opus_int                    nFramesPerPacket;\n\n    /* Specifically for entropy coding */\n    opus_int                    ec_prevSignalType;\n    opus_int16                  ec_prevLagIndex;\n\n    opus_int                    VAD_flags[ MAX_FRAMES_PER_PACKET ];\n    opus_int                    LBRR_flag;\n    opus_int                    LBRR_flags[ MAX_FRAMES_PER_PACKET ];\n\n    silk_resampler_state_struct resampler_state;\n\n    const silk_NLSF_CB_struct   *psNLSF_CB;                         /* Pointer to NLSF codebook                                         */\n\n    /* Quantization indices */\n    SideInfoIndices             indices;\n\n    /* CNG state */\n    silk_CNG_struct             sCNG;\n\n    /* Stuff used for PLC */\n    opus_int                    lossCnt;\n    opus_int                    prevSignalType;\n\n    silk_PLC_struct sPLC;\n\n} silk_decoder_state;\n\n/************************/\n/* Decoder control      */\n/************************/\ntypedef struct {\n    /* Prediction and coding parameters */\n    opus_int                    pitchL[ MAX_NB_SUBFR ];\n    opus_int32                  Gains_Q16[ MAX_NB_SUBFR ];\n    /* Holds interpolated and final coefficients, 4-byte aligned */\n    silk_DWORD_ALIGN opus_int16 PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ];\n    opus_int16                  LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ];\n    opus_int                    LTP_scale_Q14;\n} silk_decoder_control;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/sum_sqr_shift.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"SigProc_FIX.h\"\n\n/* Compute number of bits to right shift the sum of squares of a vector */\n/* of int16s to make it fit in an int32                                 */\nvoid silk_sum_sqr_shift(\n    opus_int32                  *energy,            /* O   Energy of x, after shifting to the right                     */\n    opus_int                    *shift,             /* O   Number of bits right shift applied to energy                 */\n    const opus_int16            *x,                 /* I   Input vector                                                 */\n    opus_int                    len                 /* I   Length of input vector                                       */\n)\n{\n    opus_int   i, shft;\n    opus_int32 nrg_tmp, nrg;\n\n    nrg  = 0;\n    shft = 0;\n    len--;\n    for( i = 0; i < len; i += 2 ) {\n        nrg = silk_SMLABB_ovflw( nrg, x[ i ], x[ i ] );\n        nrg = silk_SMLABB_ovflw( nrg, x[ i + 1 ], x[ i + 1 ] );\n        if( nrg < 0 ) {\n            /* Scale down */\n            nrg = (opus_int32)silk_RSHIFT_uint( (opus_uint32)nrg, 2 );\n            shft = 2;\n            break;\n        }\n    }\n    for( ; i < len; i += 2 ) {\n        nrg_tmp = silk_SMULBB( x[ i ], x[ i ] );\n        nrg_tmp = silk_SMLABB_ovflw( nrg_tmp, x[ i + 1 ], x[ i + 1 ] );\n        nrg = (opus_int32)silk_ADD_RSHIFT_uint( nrg, (opus_uint32)nrg_tmp, shft );\n        if( nrg < 0 ) {\n            /* Scale down */\n            nrg = (opus_int32)silk_RSHIFT_uint( (opus_uint32)nrg, 2 );\n            shft += 2;\n        }\n    }\n    if( i == len ) {\n        /* One sample left to process */\n        nrg_tmp = silk_SMULBB( x[ i ], x[ i ] );\n        nrg = (opus_int32)silk_ADD_RSHIFT_uint( nrg, nrg_tmp, shft );\n    }\n\n    /* Make sure to have at least one extra leading zero (two leading zeros in total) */\n    if( nrg & 0xC0000000 ) {\n        nrg = silk_RSHIFT_uint( (opus_uint32)nrg, 2 );\n        shft += 2;\n    }\n\n    /* Output arguments */\n    *shift  = shft;\n    *energy = nrg;\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/table_LSF_cos.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"tables.h\"\n\n/* Cosine approximation table for LSF conversion */\n/* Q12 values (even) */\nconst opus_int16 silk_LSFCosTab_FIX_Q12[ LSF_COS_TAB_SZ_FIX + 1 ] = {\n            8192,             8190,             8182,             8170,\n            8152,             8130,             8104,             8072,\n            8034,             7994,             7946,             7896,\n            7840,             7778,             7714,             7644,\n            7568,             7490,             7406,             7318,\n            7226,             7128,             7026,             6922,\n            6812,             6698,             6580,             6458,\n            6332,             6204,             6070,             5934,\n            5792,             5648,             5502,             5352,\n            5198,             5040,             4880,             4718,\n            4552,             4382,             4212,             4038,\n            3862,             3684,             3502,             3320,\n            3136,             2948,             2760,             2570,\n            2378,             2186,             1990,             1794,\n            1598,             1400,             1202,             1002,\n             802,              602,              402,              202,\n               0,             -202,             -402,             -602,\n            -802,            -1002,            -1202,            -1400,\n           -1598,            -1794,            -1990,            -2186,\n           -2378,            -2570,            -2760,            -2948,\n           -3136,            -3320,            -3502,            -3684,\n           -3862,            -4038,            -4212,            -4382,\n           -4552,            -4718,            -4880,            -5040,\n           -5198,            -5352,            -5502,            -5648,\n           -5792,            -5934,            -6070,            -6204,\n           -6332,            -6458,            -6580,            -6698,\n           -6812,            -6922,            -7026,            -7128,\n           -7226,            -7318,            -7406,            -7490,\n           -7568,            -7644,            -7714,            -7778,\n           -7840,            -7896,            -7946,            -7994,\n           -8034,            -8072,            -8104,            -8130,\n           -8152,            -8170,            -8182,            -8190,\n           -8192\n};\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/tables.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_TABLES_H\n#define SILK_TABLES_H\n\n#include \"define.h\"\n#include \"structs.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n/* Entropy coding tables (with size in bytes indicated) */\nextern const opus_uint8  silk_gain_iCDF[ 3 ][ N_LEVELS_QGAIN / 8 ];                                 /* 24 */\nextern const opus_uint8  silk_delta_gain_iCDF[ MAX_DELTA_GAIN_QUANT - MIN_DELTA_GAIN_QUANT + 1 ];   /* 41 */\n\nextern const opus_uint8  silk_pitch_lag_iCDF[ 2 * ( PITCH_EST_MAX_LAG_MS - PITCH_EST_MIN_LAG_MS ) ];/* 32 */\nextern const opus_uint8  silk_pitch_delta_iCDF[ 21 ];                                               /*  21 */\nextern const opus_uint8  silk_pitch_contour_iCDF[ 34 ];                                             /*  34 */\nextern const opus_uint8  silk_pitch_contour_NB_iCDF[ 11 ];                                          /*  11 */\nextern const opus_uint8  silk_pitch_contour_10_ms_iCDF[ 12 ];                                       /*  12 */\nextern const opus_uint8  silk_pitch_contour_10_ms_NB_iCDF[ 3 ];                                     /*   3 */\n\nextern const opus_uint8  silk_pulses_per_block_iCDF[ N_RATE_LEVELS ][ MAX_PULSES + 2 ];             /* 180 */\nextern const opus_uint8  silk_pulses_per_block_BITS_Q5[ N_RATE_LEVELS - 1 ][ MAX_PULSES + 2 ];      /* 162 */\n\nextern const opus_uint8  silk_rate_levels_iCDF[ 2 ][ N_RATE_LEVELS - 1 ];                           /*  18 */\nextern const opus_uint8  silk_rate_levels_BITS_Q5[ 2 ][ N_RATE_LEVELS - 1 ];                        /*  18 */\n\nextern const opus_uint8  silk_max_pulses_table[ 4 ];                                                /*   4 */\n\nextern const opus_uint8  silk_shell_code_table0[ 152 ];                                             /* 152 */\nextern const opus_uint8  silk_shell_code_table1[ 152 ];                                             /* 152 */\nextern const opus_uint8  silk_shell_code_table2[ 152 ];                                             /* 152 */\nextern const opus_uint8  silk_shell_code_table3[ 152 ];                                             /* 152 */\nextern const opus_uint8  silk_shell_code_table_offsets[ MAX_PULSES + 1 ];                           /*  17 */\n\nextern const opus_uint8  silk_lsb_iCDF[ 2 ];                                                        /*   2 */\n\nextern const opus_uint8  silk_sign_iCDF[ 42 ];                                                      /*  42 */\n\nextern const opus_uint8  silk_uniform3_iCDF[ 3 ];                                                   /*   3 */\nextern const opus_uint8  silk_uniform4_iCDF[ 4 ];                                                   /*   4 */\nextern const opus_uint8  silk_uniform5_iCDF[ 5 ];                                                   /*   5 */\nextern const opus_uint8  silk_uniform6_iCDF[ 6 ];                                                   /*   6 */\nextern const opus_uint8  silk_uniform8_iCDF[ 8 ];                                                   /*   8 */\n\nextern const opus_uint8  silk_NLSF_EXT_iCDF[ 7 ];                                                   /*   7 */\n\nextern const opus_uint8  silk_LTP_per_index_iCDF[ 3 ];                                              /*   3 */\nextern const opus_uint8  * const silk_LTP_gain_iCDF_ptrs[ NB_LTP_CBKS ];                            /*   3 */\nextern const opus_uint8  * const silk_LTP_gain_BITS_Q5_ptrs[ NB_LTP_CBKS ];                         /*   3 */\nextern const opus_int16  silk_LTP_gain_middle_avg_RD_Q14;\nextern const opus_int8   * const silk_LTP_vq_ptrs_Q7[ NB_LTP_CBKS ];                                /* 168 */\nextern const opus_uint8  * const silk_LTP_vq_gain_ptrs_Q7[NB_LTP_CBKS];\n\nextern const opus_int8   silk_LTP_vq_sizes[ NB_LTP_CBKS ];                                          /*   3 */\n\nextern const opus_uint8  silk_LTPscale_iCDF[ 3 ];                                                   /*   4 */\nextern const opus_int16  silk_LTPScales_table_Q14[ 3 ];                                             /*   6 */\n\nextern const opus_uint8  silk_type_offset_VAD_iCDF[ 4 ];                                            /*   4 */\nextern const opus_uint8  silk_type_offset_no_VAD_iCDF[ 2 ];                                         /*   2 */\n\nextern const opus_int16  silk_stereo_pred_quant_Q13[ STEREO_QUANT_TAB_SIZE ];                       /*  32 */\nextern const opus_uint8  silk_stereo_pred_joint_iCDF[ 25 ];                                         /*  25 */\nextern const opus_uint8  silk_stereo_only_code_mid_iCDF[ 2 ];                                       /*   2 */\n\nextern const opus_uint8  * const silk_LBRR_flags_iCDF_ptr[ 2 ];                                     /*  10 */\n\nextern const opus_uint8  silk_NLSF_interpolation_factor_iCDF[ 5 ];                                  /*   5 */\n\nextern const silk_NLSF_CB_struct silk_NLSF_CB_WB;                                                   /* 1040 */\nextern const silk_NLSF_CB_struct silk_NLSF_CB_NB_MB;                                                /* 728 */\n\n/* Piece-wise linear mapping from bitrate in kbps to coding quality in dB SNR */\nextern const opus_int32  silk_TargetRate_table_NB[  TARGET_RATE_TAB_SZ ];                           /*  32 */\nextern const opus_int32  silk_TargetRate_table_MB[  TARGET_RATE_TAB_SZ ];                           /*  32 */\nextern const opus_int32  silk_TargetRate_table_WB[  TARGET_RATE_TAB_SZ ];                           /*  32 */\nextern const opus_int16  silk_SNR_table_Q1[         TARGET_RATE_TAB_SZ ];                           /*  32 */\n\n/* Quantization offsets */\nextern const opus_int16  silk_Quantization_Offsets_Q10[ 2 ][ 2 ];                                   /*   8 */\n\n/* Interpolation points for filter coefficients used in the bandwidth transition smoother */\nextern const opus_int32  silk_Transition_LP_B_Q28[ TRANSITION_INT_NUM ][ TRANSITION_NB ];           /*  60 */\nextern const opus_int32  silk_Transition_LP_A_Q28[ TRANSITION_INT_NUM ][ TRANSITION_NA ];           /*  60 */\n\n/* Rom table with cosine values */\nextern const opus_int16  silk_LSFCosTab_FIX_Q12[ LSF_COS_TAB_SZ_FIX + 1 ];                          /* 258 */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/tables_LTP.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"tables.h\"\n\nconst opus_uint8 silk_LTP_per_index_iCDF[3] = {\n       179,     99,      0\n};\n\nstatic const opus_uint8 silk_LTP_gain_iCDF_0[8] = {\n        71,     56,     43,     30,     21,     12,      6,      0\n};\n\nstatic const opus_uint8 silk_LTP_gain_iCDF_1[16] = {\n       199,    165,    144,    124,    109,     96,     84,     71,\n        61,     51,     42,     32,     23,     15,      8,      0\n};\n\nstatic const opus_uint8 silk_LTP_gain_iCDF_2[32] = {\n       241,    225,    211,    199,    187,    175,    164,    153,\n       142,    132,    123,    114,    105,     96,     88,     80,\n        72,     64,     57,     50,     44,     38,     33,     29,\n        24,     20,     16,     12,      9,      5,      2,      0\n};\n\nconst opus_int16 silk_LTP_gain_middle_avg_RD_Q14 = 12304;\n\nstatic const opus_uint8 silk_LTP_gain_BITS_Q5_0[8] = {\n        15,    131,    138,    138,    155,    155,    173,    173\n};\n\nstatic const opus_uint8 silk_LTP_gain_BITS_Q5_1[16] = {\n        69,     93,    115,    118,    131,    138,    141,    138,\n       150,    150,    155,    150,    155,    160,    166,    160\n};\n\nstatic const opus_uint8 silk_LTP_gain_BITS_Q5_2[32] = {\n       131,    128,    134,    141,    141,    141,    145,    145,\n       145,    150,    155,    155,    155,    155,    160,    160,\n       160,    160,    166,    166,    173,    173,    182,    192,\n       182,    192,    192,    192,    205,    192,    205,    224\n};\n\nconst opus_uint8 * const silk_LTP_gain_iCDF_ptrs[NB_LTP_CBKS] = {\n    silk_LTP_gain_iCDF_0,\n    silk_LTP_gain_iCDF_1,\n    silk_LTP_gain_iCDF_2\n};\n\nconst opus_uint8 * const silk_LTP_gain_BITS_Q5_ptrs[NB_LTP_CBKS] = {\n    silk_LTP_gain_BITS_Q5_0,\n    silk_LTP_gain_BITS_Q5_1,\n    silk_LTP_gain_BITS_Q5_2\n};\n\nstatic const opus_int8 silk_LTP_gain_vq_0[8][5] =\n{\n{\n         4,      6,     24,      7,      5\n},\n{\n         0,      0,      2,      0,      0\n},\n{\n        12,     28,     41,     13,     -4\n},\n{\n        -9,     15,     42,     25,     14\n},\n{\n         1,     -2,     62,     41,     -9\n},\n{\n       -10,     37,     65,     -4,      3\n},\n{\n        -6,      4,     66,      7,     -8\n},\n{\n        16,     14,     38,     -3,     33\n}\n};\n\nstatic const opus_int8 silk_LTP_gain_vq_1[16][5] =\n{\n{\n        13,     22,     39,     23,     12\n},\n{\n        -1,     36,     64,     27,     -6\n},\n{\n        -7,     10,     55,     43,     17\n},\n{\n         1,      1,      8,      1,      1\n},\n{\n         6,    -11,     74,     53,     -9\n},\n{\n       -12,     55,     76,    -12,      8\n},\n{\n        -3,      3,     93,     27,     -4\n},\n{\n        26,     39,     59,      3,     -8\n},\n{\n         2,      0,     77,     11,      9\n},\n{\n        -8,     22,     44,     -6,      7\n},\n{\n        40,      9,     26,      3,      9\n},\n{\n        -7,     20,    101,     -7,      4\n},\n{\n         3,     -8,     42,     26,      0\n},\n{\n       -15,     33,     68,      2,     23\n},\n{\n        -2,     55,     46,     -2,     15\n},\n{\n         3,     -1,     21,     16,     41\n}\n};\n\nstatic const opus_int8 silk_LTP_gain_vq_2[32][5] =\n{\n{\n        -6,     27,     61,     39,      5\n},\n{\n       -11,     42,     88,      4,      1\n},\n{\n        -2,     60,     65,      6,     -4\n},\n{\n        -1,     -5,     73,     56,      1\n},\n{\n        -9,     19,     94,     29,     -9\n},\n{\n         0,     12,     99,      6,      4\n},\n{\n         8,    -19,    102,     46,    -13\n},\n{\n         3,      2,     13,      3,      2\n},\n{\n         9,    -21,     84,     72,    -18\n},\n{\n       -11,     46,    104,    -22,      8\n},\n{\n        18,     38,     48,     23,      0\n},\n{\n       -16,     70,     83,    -21,     11\n},\n{\n         5,    -11,    117,     22,     -8\n},\n{\n        -6,     23,    117,    -12,      3\n},\n{\n         3,     -8,     95,     28,      4\n},\n{\n       -10,     15,     77,     60,    -15\n},\n{\n        -1,      4,    124,      2,     -4\n},\n{\n         3,     38,     84,     24,    -25\n},\n{\n         2,     13,     42,     13,     31\n},\n{\n        21,     -4,     56,     46,     -1\n},\n{\n        -1,     35,     79,    -13,     19\n},\n{\n        -7,     65,     88,     -9,    -14\n},\n{\n        20,      4,     81,     49,    -29\n},\n{\n        20,      0,     75,      3,    -17\n},\n{\n         5,     -9,     44,     92,     -8\n},\n{\n         1,     -3,     22,     69,     31\n},\n{\n        -6,     95,     41,    -12,      5\n},\n{\n        39,     67,     16,     -4,      1\n},\n{\n         0,     -6,    120,     55,    -36\n},\n{\n       -13,     44,    122,      4,    -24\n},\n{\n        81,      5,     11,      3,      7\n},\n{\n         2,      0,      9,     10,     88\n}\n};\n\nconst opus_int8 * const silk_LTP_vq_ptrs_Q7[NB_LTP_CBKS] = {\n    (opus_int8 *)&silk_LTP_gain_vq_0[0][0],\n    (opus_int8 *)&silk_LTP_gain_vq_1[0][0],\n    (opus_int8 *)&silk_LTP_gain_vq_2[0][0]\n};\n\n/* Maximum frequency-dependent response of the pitch taps above,\n   computed as max(abs(freqz(taps))) */\nstatic const opus_uint8 silk_LTP_gain_vq_0_gain[8] = {\n      46,      2,     90,     87,     93,     91,     82,     98\n};\n\nstatic const opus_uint8 silk_LTP_gain_vq_1_gain[16] = {\n     109,    120,    118,     12,    113,    115,    117,    119,\n      99,     59,     87,    111,     63,    111,    112,     80\n};\n\nstatic const opus_uint8 silk_LTP_gain_vq_2_gain[32] = {\n     126,    124,    125,    124,    129,    121,    126,     23,\n     132,    127,    127,    127,    126,    127,    122,    133,\n     130,    134,    101,    118,    119,    145,    126,     86,\n     124,    120,    123,    119,    170,    173,    107,    109\n};\n\nconst opus_uint8 * const silk_LTP_vq_gain_ptrs_Q7[NB_LTP_CBKS] = {\n    &silk_LTP_gain_vq_0_gain[0],\n    &silk_LTP_gain_vq_1_gain[0],\n    &silk_LTP_gain_vq_2_gain[0]\n};\n\nconst opus_int8 silk_LTP_vq_sizes[NB_LTP_CBKS] = {\n    8, 16, 32\n};\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/tables_NLSF_CB_NB_MB.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"tables.h\"\n\nstatic const opus_uint8 silk_NLSF_CB1_NB_MB_Q8[ 320 ] = {\n        12,     35,     60,     83,    108,    132,    157,    180,\n       206,    228,     15,     32,     55,     77,    101,    125,\n       151,    175,    201,    225,     19,     42,     66,     89,\n       114,    137,    162,    184,    209,    230,     12,     25,\n        50,     72,     97,    120,    147,    172,    200,    223,\n        26,     44,     69,     90,    114,    135,    159,    180,\n       205,    225,     13,     22,     53,     80,    106,    130,\n       156,    180,    205,    228,     15,     25,     44,     64,\n        90,    115,    142,    168,    196,    222,     19,     24,\n        62,     82,    100,    120,    145,    168,    190,    214,\n        22,     31,     50,     79,    103,    120,    151,    170,\n       203,    227,     21,     29,     45,     65,    106,    124,\n       150,    171,    196,    224,     30,     49,     75,     97,\n       121,    142,    165,    186,    209,    229,     19,     25,\n        52,     70,     93,    116,    143,    166,    192,    219,\n        26,     34,     62,     75,     97,    118,    145,    167,\n       194,    217,     25,     33,     56,     70,     91,    113,\n       143,    165,    196,    223,     21,     34,     51,     72,\n        97,    117,    145,    171,    196,    222,     20,     29,\n        50,     67,     90,    117,    144,    168,    197,    221,\n        22,     31,     48,     66,     95,    117,    146,    168,\n       196,    222,     24,     33,     51,     77,    116,    134,\n       158,    180,    200,    224,     21,     28,     70,     87,\n       106,    124,    149,    170,    194,    217,     26,     33,\n        53,     64,     83,    117,    152,    173,    204,    225,\n        27,     34,     65,     95,    108,    129,    155,    174,\n       210,    225,     20,     26,     72,     99,    113,    131,\n       154,    176,    200,    219,     34,     43,     61,     78,\n        93,    114,    155,    177,    205,    229,     23,     29,\n        54,     97,    124,    138,    163,    179,    209,    229,\n        30,     38,     56,     89,    118,    129,    158,    178,\n       200,    231,     21,     29,     49,     63,     85,    111,\n       142,    163,    193,    222,     27,     48,     77,    103,\n       133,    158,    179,    196,    215,    232,     29,     47,\n        74,     99,    124,    151,    176,    198,    220,    237,\n        33,     42,     61,     76,     93,    121,    155,    174,\n       207,    225,     29,     53,     87,    112,    136,    154,\n       170,    188,    208,    227,     24,     30,     52,     84,\n       131,    150,    166,    186,    203,    229,     37,     48,\n        64,     84,    104,    118,    156,    177,    201,    230\n};\n\nstatic const opus_uint8 silk_NLSF_CB1_iCDF_NB_MB[ 64 ] = {\n       212,    178,    148,    129,    108,     96,     85,     82,\n        79,     77,     61,     59,     57,     56,     51,     49,\n        48,     45,     42,     41,     40,     38,     36,     34,\n        31,     30,     21,     12,     10,      3,      1,      0,\n       255,    245,    244,    236,    233,    225,    217,    203,\n       190,    176,    175,    161,    149,    136,    125,    114,\n       102,     91,     81,     71,     60,     52,     43,     35,\n        28,     20,     19,     18,     12,     11,      5,      0\n};\n\nstatic const opus_uint8 silk_NLSF_CB2_SELECT_NB_MB[ 160 ] = {\n        16,      0,      0,      0,      0,     99,     66,     36,\n        36,     34,     36,     34,     34,     34,     34,     83,\n        69,     36,     52,     34,    116,    102,     70,     68,\n        68,    176,    102,     68,     68,     34,     65,     85,\n        68,     84,     36,    116,    141,    152,    139,    170,\n       132,    187,    184,    216,    137,    132,    249,    168,\n       185,    139,    104,    102,    100,     68,     68,    178,\n       218,    185,    185,    170,    244,    216,    187,    187,\n       170,    244,    187,    187,    219,    138,    103,    155,\n       184,    185,    137,    116,    183,    155,    152,    136,\n       132,    217,    184,    184,    170,    164,    217,    171,\n       155,    139,    244,    169,    184,    185,    170,    164,\n       216,    223,    218,    138,    214,    143,    188,    218,\n       168,    244,    141,    136,    155,    170,    168,    138,\n       220,    219,    139,    164,    219,    202,    216,    137,\n       168,    186,    246,    185,    139,    116,    185,    219,\n       185,    138,    100,    100,    134,    100,    102,     34,\n        68,     68,    100,     68,    168,    203,    221,    218,\n       168,    167,    154,    136,    104,     70,    164,    246,\n       171,    137,    139,    137,    155,    218,    219,    139\n};\n\nstatic const opus_uint8 silk_NLSF_CB2_iCDF_NB_MB[ 72 ] = {\n       255,    254,    253,    238,     14,      3,      2,      1,\n         0,    255,    254,    252,    218,     35,      3,      2,\n         1,      0,    255,    254,    250,    208,     59,      4,\n         2,      1,      0,    255,    254,    246,    194,     71,\n        10,      2,      1,      0,    255,    252,    236,    183,\n        82,      8,      2,      1,      0,    255,    252,    235,\n       180,     90,     17,      2,      1,      0,    255,    248,\n       224,    171,     97,     30,      4,      1,      0,    255,\n       254,    236,    173,     95,     37,      7,      1,      0\n};\n\nstatic const opus_uint8 silk_NLSF_CB2_BITS_NB_MB_Q5[ 72 ] = {\n       255,    255,    255,    131,      6,    145,    255,    255,\n       255,    255,    255,    236,     93,     15,     96,    255,\n       255,    255,    255,    255,    194,     83,     25,     71,\n       221,    255,    255,    255,    255,    162,     73,     34,\n        66,    162,    255,    255,    255,    210,    126,     73,\n        43,     57,    173,    255,    255,    255,    201,    125,\n        71,     48,     58,    130,    255,    255,    255,    166,\n       110,     73,     57,     62,    104,    210,    255,    255,\n       251,    123,     65,     55,     68,    100,    171,    255\n};\n\nstatic const opus_uint8 silk_NLSF_PRED_NB_MB_Q8[ 18 ] = {\n       179,    138,    140,    148,    151,    149,    153,    151,\n       163,    116,     67,     82,     59,     92,     72,    100,\n        89,     92\n};\n\nstatic const opus_int16 silk_NLSF_DELTA_MIN_NB_MB_Q15[ 11 ] = {\n       250,      3,      6,      3,      3,      3,      4,      3,\n         3,      3,    461\n};\n\nconst silk_NLSF_CB_struct silk_NLSF_CB_NB_MB =\n{\n    32,\n    10,\n    SILK_FIX_CONST( 0.18, 16 ),\n    SILK_FIX_CONST( 1.0 / 0.18, 6 ),\n    silk_NLSF_CB1_NB_MB_Q8,\n    silk_NLSF_CB1_iCDF_NB_MB,\n    silk_NLSF_PRED_NB_MB_Q8,\n    silk_NLSF_CB2_SELECT_NB_MB,\n    silk_NLSF_CB2_iCDF_NB_MB,\n    silk_NLSF_CB2_BITS_NB_MB_Q5,\n    silk_NLSF_DELTA_MIN_NB_MB_Q15,\n};\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/tables_NLSF_CB_WB.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"tables.h\"\n\nstatic const opus_uint8 silk_NLSF_CB1_WB_Q8[ 512 ] = {\n         7,     23,     38,     54,     69,     85,    100,    116,\n       131,    147,    162,    178,    193,    208,    223,    239,\n        13,     25,     41,     55,     69,     83,     98,    112,\n       127,    142,    157,    171,    187,    203,    220,    236,\n        15,     21,     34,     51,     61,     78,     92,    106,\n       126,    136,    152,    167,    185,    205,    225,    240,\n        10,     21,     36,     50,     63,     79,     95,    110,\n       126,    141,    157,    173,    189,    205,    221,    237,\n        17,     20,     37,     51,     59,     78,     89,    107,\n       123,    134,    150,    164,    184,    205,    224,    240,\n        10,     15,     32,     51,     67,     81,     96,    112,\n       129,    142,    158,    173,    189,    204,    220,    236,\n         8,     21,     37,     51,     65,     79,     98,    113,\n       126,    138,    155,    168,    179,    192,    209,    218,\n        12,     15,     34,     55,     63,     78,     87,    108,\n       118,    131,    148,    167,    185,    203,    219,    236,\n        16,     19,     32,     36,     56,     79,     91,    108,\n       118,    136,    154,    171,    186,    204,    220,    237,\n        11,     28,     43,     58,     74,     89,    105,    120,\n       135,    150,    165,    180,    196,    211,    226,    241,\n         6,     16,     33,     46,     60,     75,     92,    107,\n       123,    137,    156,    169,    185,    199,    214,    225,\n        11,     19,     30,     44,     57,     74,     89,    105,\n       121,    135,    152,    169,    186,    202,    218,    234,\n        12,     19,     29,     46,     57,     71,     88,    100,\n       120,    132,    148,    165,    182,    199,    216,    233,\n        17,     23,     35,     46,     56,     77,     92,    106,\n       123,    134,    152,    167,    185,    204,    222,    237,\n        14,     17,     45,     53,     63,     75,     89,    107,\n       115,    132,    151,    171,    188,    206,    221,    240,\n         9,     16,     29,     40,     56,     71,     88,    103,\n       119,    137,    154,    171,    189,    205,    222,    237,\n        16,     19,     36,     48,     57,     76,     87,    105,\n       118,    132,    150,    167,    185,    202,    218,    236,\n        12,     17,     29,     54,     71,     81,     94,    104,\n       126,    136,    149,    164,    182,    201,    221,    237,\n        15,     28,     47,     62,     79,     97,    115,    129,\n       142,    155,    168,    180,    194,    208,    223,    238,\n         8,     14,     30,     45,     62,     78,     94,    111,\n       127,    143,    159,    175,    192,    207,    223,    239,\n        17,     30,     49,     62,     79,     92,    107,    119,\n       132,    145,    160,    174,    190,    204,    220,    235,\n        14,     19,     36,     45,     61,     76,     91,    108,\n       121,    138,    154,    172,    189,    205,    222,    238,\n        12,     18,     31,     45,     60,     76,     91,    107,\n       123,    138,    154,    171,    187,    204,    221,    236,\n        13,     17,     31,     43,     53,     70,     83,    103,\n       114,    131,    149,    167,    185,    203,    220,    237,\n        17,     22,     35,     42,     58,     78,     93,    110,\n       125,    139,    155,    170,    188,    206,    224,    240,\n         8,     15,     34,     50,     67,     83,     99,    115,\n       131,    146,    162,    178,    193,    209,    224,    239,\n        13,     16,     41,     66,     73,     86,     95,    111,\n       128,    137,    150,    163,    183,    206,    225,    241,\n        17,     25,     37,     52,     63,     75,     92,    102,\n       119,    132,    144,    160,    175,    191,    212,    231,\n        19,     31,     49,     65,     83,    100,    117,    133,\n       147,    161,    174,    187,    200,    213,    227,    242,\n        18,     31,     52,     68,     88,    103,    117,    126,\n       138,    149,    163,    177,    192,    207,    223,    239,\n        16,     29,     47,     61,     76,     90,    106,    119,\n       133,    147,    161,    176,    193,    209,    224,    240,\n        15,     21,     35,     50,     61,     73,     86,     97,\n       110,    119,    129,    141,    175,    198,    218,    237\n};\n\nstatic const opus_uint8 silk_NLSF_CB1_iCDF_WB[ 64 ] = {\n       225,    204,    201,    184,    183,    175,    158,    154,\n       153,    135,    119,    115,    113,    110,    109,     99,\n        98,     95,     79,     68,     52,     50,     48,     45,\n        43,     32,     31,     27,     18,     10,      3,      0,\n       255,    251,    235,    230,    212,    201,    196,    182,\n       167,    166,    163,    151,    138,    124,    110,    104,\n        90,     78,     76,     70,     69,     57,     45,     34,\n        24,     21,     11,      6,      5,      4,      3,      0\n};\n\nstatic const opus_uint8 silk_NLSF_CB2_SELECT_WB[ 256 ] = {\n         0,      0,      0,      0,      0,      0,      0,      1,\n       100,    102,    102,     68,     68,     36,     34,     96,\n       164,    107,    158,    185,    180,    185,    139,    102,\n        64,     66,     36,     34,     34,      0,      1,     32,\n       208,    139,    141,    191,    152,    185,    155,    104,\n        96,    171,    104,    166,    102,    102,    102,    132,\n         1,      0,      0,      0,      0,     16,     16,      0,\n        80,    109,     78,    107,    185,    139,    103,    101,\n       208,    212,    141,    139,    173,    153,    123,    103,\n        36,      0,      0,      0,      0,      0,      0,      1,\n        48,      0,      0,      0,      0,      0,      0,     32,\n        68,    135,    123,    119,    119,    103,     69,     98,\n        68,    103,    120,    118,    118,    102,     71,     98,\n       134,    136,    157,    184,    182,    153,    139,    134,\n       208,    168,    248,     75,    189,    143,    121,    107,\n        32,     49,     34,     34,     34,      0,     17,      2,\n       210,    235,    139,    123,    185,    137,    105,    134,\n        98,    135,    104,    182,    100,    183,    171,    134,\n       100,     70,     68,     70,     66,     66,     34,    131,\n        64,    166,    102,     68,     36,      2,      1,      0,\n       134,    166,    102,     68,     34,     34,     66,    132,\n       212,    246,    158,    139,    107,    107,     87,    102,\n       100,    219,    125,    122,    137,    118,    103,    132,\n       114,    135,    137,    105,    171,    106,     50,     34,\n       164,    214,    141,    143,    185,    151,    121,    103,\n       192,     34,      0,      0,      0,      0,      0,      1,\n       208,    109,     74,    187,    134,    249,    159,    137,\n       102,    110,    154,    118,     87,    101,    119,    101,\n         0,      2,      0,     36,     36,     66,     68,     35,\n        96,    164,    102,    100,     36,      0,      2,     33,\n       167,    138,    174,    102,    100,     84,      2,      2,\n       100,    107,    120,    119,     36,    197,     24,      0\n};\n\nstatic const opus_uint8 silk_NLSF_CB2_iCDF_WB[ 72 ] = {\n       255,    254,    253,    244,     12,      3,      2,      1,\n         0,    255,    254,    252,    224,     38,      3,      2,\n         1,      0,    255,    254,    251,    209,     57,      4,\n         2,      1,      0,    255,    254,    244,    195,     69,\n         4,      2,      1,      0,    255,    251,    232,    184,\n        84,      7,      2,      1,      0,    255,    254,    240,\n       186,     86,     14,      2,      1,      0,    255,    254,\n       239,    178,     91,     30,      5,      1,      0,    255,\n       248,    227,    177,    100,     19,      2,      1,      0\n};\n\nstatic const opus_uint8 silk_NLSF_CB2_BITS_WB_Q5[ 72 ] = {\n       255,    255,    255,    156,      4,    154,    255,    255,\n       255,    255,    255,    227,    102,     15,     92,    255,\n       255,    255,    255,    255,    213,     83,     24,     72,\n       236,    255,    255,    255,    255,    150,     76,     33,\n        63,    214,    255,    255,    255,    190,    121,     77,\n        43,     55,    185,    255,    255,    255,    245,    137,\n        71,     43,     59,    139,    255,    255,    255,    255,\n       131,     66,     50,     66,    107,    194,    255,    255,\n       166,    116,     76,     55,     53,    125,    255,    255\n};\n\nstatic const opus_uint8 silk_NLSF_PRED_WB_Q8[ 30 ] = {\n       175,    148,    160,    176,    178,    173,    174,    164,\n       177,    174,    196,    182,    198,    192,    182,     68,\n        62,     66,     60,     72,    117,     85,     90,    118,\n       136,    151,    142,    160,    142,    155\n};\n\nstatic const opus_int16 silk_NLSF_DELTA_MIN_WB_Q15[ 17 ] = {\n       100,      3,     40,      3,      3,      3,      5,     14,\n        14,     10,     11,      3,      8,      9,      7,      3,\n       347\n};\n\nconst silk_NLSF_CB_struct silk_NLSF_CB_WB =\n{\n    32,\n    16,\n    SILK_FIX_CONST( 0.15, 16 ),\n    SILK_FIX_CONST( 1.0 / 0.15, 6 ),\n    silk_NLSF_CB1_WB_Q8,\n    silk_NLSF_CB1_iCDF_WB,\n    silk_NLSF_PRED_WB_Q8,\n    silk_NLSF_CB2_SELECT_WB,\n    silk_NLSF_CB2_iCDF_WB,\n    silk_NLSF_CB2_BITS_WB_Q5,\n    silk_NLSF_DELTA_MIN_WB_Q15,\n};\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/tables_gain.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"tables.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\nconst opus_uint8 silk_gain_iCDF[ 3 ][ N_LEVELS_QGAIN / 8 ] =\n{\n{\n       224,    112,     44,     15,      3,      2,      1,      0\n},\n{\n       254,    237,    192,    132,     70,     23,      4,      0\n},\n{\n       255,    252,    226,    155,     61,     11,      2,      0\n}\n};\n\nconst opus_uint8 silk_delta_gain_iCDF[ MAX_DELTA_GAIN_QUANT - MIN_DELTA_GAIN_QUANT + 1 ] = {\n       250,    245,    234,    203,     71,     50,     42,     38,\n        35,     33,     31,     29,     28,     27,     26,     25,\n        24,     23,     22,     21,     20,     19,     18,     17,\n        16,     15,     14,     13,     12,     11,     10,      9,\n         8,      7,      6,      5,      4,      3,      2,      1,\n         0\n};\n\n#ifdef __cplusplus\n}\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/tables_other.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"structs.h\"\n#include \"define.h\"\n#include \"tables.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n/* Piece-wise linear mapping from bitrate in kbps to coding quality in dB SNR */\nconst opus_int32 silk_TargetRate_table_NB[ TARGET_RATE_TAB_SZ ] = {\n    0,      8000,   9400,   11500,  13500,  17500,  25000,  MAX_TARGET_RATE_BPS\n};\nconst opus_int32 silk_TargetRate_table_MB[ TARGET_RATE_TAB_SZ ] = {\n    0,      9000,   12000,  14500,  18500,  24500,  35500,  MAX_TARGET_RATE_BPS\n};\nconst opus_int32 silk_TargetRate_table_WB[ TARGET_RATE_TAB_SZ ] = {\n    0,      10500,  14000,  17000,  21500,  28500,  42000,  MAX_TARGET_RATE_BPS\n};\nconst opus_int16 silk_SNR_table_Q1[ TARGET_RATE_TAB_SZ ] = {\n    18,     29,     38,     40,     46,     52,     62,     84\n};\n\n/* Tables for stereo predictor coding */\nconst opus_int16 silk_stereo_pred_quant_Q13[ STEREO_QUANT_TAB_SIZE ] = {\n    -13732, -10050, -8266, -7526, -6500, -5000, -2950,  -820,\n       820,   2950,  5000,  6500,  7526,  8266, 10050, 13732\n};\nconst opus_uint8  silk_stereo_pred_joint_iCDF[ 25 ] = {\n    249, 247, 246, 245, 244,\n    234, 210, 202, 201, 200,\n    197, 174,  82,  59,  56,\n     55,  54,  46,  22,  12,\n     11,  10,   9,   7,   0\n};\nconst opus_uint8  silk_stereo_only_code_mid_iCDF[ 2 ] = { 64, 0 };\n\n/* Tables for LBRR flags */\nstatic const opus_uint8 silk_LBRR_flags_2_iCDF[ 3 ] = { 203, 150, 0 };\nstatic const opus_uint8 silk_LBRR_flags_3_iCDF[ 7 ] = { 215, 195, 166, 125, 110, 82, 0 };\nconst opus_uint8 * const silk_LBRR_flags_iCDF_ptr[ 2 ] = {\n    silk_LBRR_flags_2_iCDF,\n    silk_LBRR_flags_3_iCDF\n};\n\n/* Table for LSB coding */\nconst opus_uint8 silk_lsb_iCDF[ 2 ] = { 120, 0 };\n\n/* Tables for LTPScale */\nconst opus_uint8 silk_LTPscale_iCDF[ 3 ] = { 128, 64, 0 };\n\n/* Tables for signal type and offset coding */\nconst opus_uint8 silk_type_offset_VAD_iCDF[ 4 ] = {\n       232,    158,    10,      0\n};\nconst opus_uint8 silk_type_offset_no_VAD_iCDF[ 2 ] = {\n       230,      0\n};\n\n/* Tables for NLSF interpolation factor */\nconst opus_uint8 silk_NLSF_interpolation_factor_iCDF[ 5 ] = { 243, 221, 192, 181, 0 };\n\n/* Quantization offsets */\nconst opus_int16  silk_Quantization_Offsets_Q10[ 2 ][ 2 ] = {\n    { OFFSET_UVL_Q10, OFFSET_UVH_Q10 }, { OFFSET_VL_Q10, OFFSET_VH_Q10 }\n};\n\n/* Table for LTPScale */\nconst opus_int16 silk_LTPScales_table_Q14[ 3 ] = { 15565, 12288, 8192 };\n\n/* Uniform entropy tables */\nconst opus_uint8 silk_uniform3_iCDF[ 3 ] = { 171, 85, 0 };\nconst opus_uint8 silk_uniform4_iCDF[ 4 ] = { 192, 128, 64, 0 };\nconst opus_uint8 silk_uniform5_iCDF[ 5 ] = { 205, 154, 102, 51, 0 };\nconst opus_uint8 silk_uniform6_iCDF[ 6 ] = { 213, 171, 128, 85, 43, 0 };\nconst opus_uint8 silk_uniform8_iCDF[ 8 ] = { 224, 192, 160, 128, 96, 64, 32, 0 };\n\nconst opus_uint8 silk_NLSF_EXT_iCDF[ 7 ] = { 100, 40, 16, 7, 3, 1, 0 };\n\n/*  Elliptic/Cauer filters designed with 0.1 dB passband ripple,\n        80 dB minimum stopband attenuation, and\n        [0.95 : 0.15 : 0.35] normalized cut off frequencies. */\n\n/* Interpolation points for filter coefficients used in the bandwidth transition smoother */\nconst opus_int32 silk_Transition_LP_B_Q28[ TRANSITION_INT_NUM ][ TRANSITION_NB ] =\n{\n{    250767114,  501534038,  250767114  },\n{    209867381,  419732057,  209867381  },\n{    170987846,  341967853,  170987846  },\n{    131531482,  263046905,  131531482  },\n{     89306658,  178584282,   89306658  }\n};\n\n/* Interpolation points for filter coefficients used in the bandwidth transition smoother */\nconst opus_int32 silk_Transition_LP_A_Q28[ TRANSITION_INT_NUM ][ TRANSITION_NA ] =\n{\n{    506393414,  239854379  },\n{    411067935,  169683996  },\n{    306733530,  116694253  },\n{    185807084,   77959395  },\n{     35497197,   57401098  }\n};\n\n#ifdef __cplusplus\n}\n#endif\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/tables_pitch_lag.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"tables.h\"\n\nconst opus_uint8 silk_pitch_lag_iCDF[ 2 * ( PITCH_EST_MAX_LAG_MS - PITCH_EST_MIN_LAG_MS ) ] = {\n       253,    250,    244,    233,    212,    182,    150,    131,\n       120,    110,     98,     85,     72,     60,     49,     40,\n        32,     25,     19,     15,     13,     11,      9,      8,\n         7,      6,      5,      4,      3,      2,      1,      0\n};\n\nconst opus_uint8 silk_pitch_delta_iCDF[21] = {\n       210,    208,    206,    203,    199,    193,    183,    168,\n       142,    104,     74,     52,     37,     27,     20,     14,\n        10,      6,      4,      2,      0\n};\n\nconst opus_uint8 silk_pitch_contour_iCDF[34] = {\n       223,    201,    183,    167,    152,    138,    124,    111,\n        98,     88,     79,     70,     62,     56,     50,     44,\n        39,     35,     31,     27,     24,     21,     18,     16,\n        14,     12,     10,      8,      6,      4,      3,      2,\n         1,      0\n};\n\nconst opus_uint8 silk_pitch_contour_NB_iCDF[11] = {\n       188,    176,    155,    138,    119,     97,     67,     43,\n        26,     10,      0\n};\n\nconst opus_uint8 silk_pitch_contour_10_ms_iCDF[12] = {\n       165,    119,     80,     61,     47,     35,     27,     20,\n        14,      9,      4,      0\n};\n\nconst opus_uint8 silk_pitch_contour_10_ms_NB_iCDF[3] = {\n       113,     63,      0\n};\n\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/tables_pulses_per_block.c",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"tables.h\"\n\nconst opus_uint8 silk_max_pulses_table[ 4 ] = {\n         8,     10,     12,     16\n};\n\nconst opus_uint8 silk_pulses_per_block_iCDF[ 10 ][ 18 ] = {\n{\n       125,     51,     26,     18,     15,     12,     11,     10,\n         9,      8,      7,      6,      5,      4,      3,      2,\n         1,      0\n},\n{\n       198,    105,     45,     22,     15,     12,     11,     10,\n         9,      8,      7,      6,      5,      4,      3,      2,\n         1,      0\n},\n{\n       213,    162,    116,     83,     59,     43,     32,     24,\n        18,     15,     12,      9,      7,      6,      5,      3,\n         2,      0\n},\n{\n       239,    187,    116,     59,     28,     16,     11,     10,\n         9,      8,      7,      6,      5,      4,      3,      2,\n         1,      0\n},\n{\n       250,    229,    188,    135,     86,     51,     30,     19,\n        13,     10,      8,      6,      5,      4,      3,      2,\n         1,      0\n},\n{\n       249,    235,    213,    185,    156,    128,    103,     83,\n        66,     53,     42,     33,     26,     21,     17,     13,\n        10,      0\n},\n{\n       254,    249,    235,    206,    164,    118,     77,     46,\n        27,     16,     10,      7,      5,      4,      3,      2,\n         1,      0\n},\n{\n       255,    253,    249,    239,    220,    191,    156,    119,\n        85,     57,     37,     23,     15,     10,      6,      4,\n         2,      0\n},\n{\n       255,    253,    251,    246,    237,    223,    203,    179,\n       152,    124,     98,     75,     55,     40,     29,     21,\n        15,      0\n},\n{\n       255,    254,    253,    247,    220,    162,    106,     67,\n        42,     28,     18,     12,      9,      6,      4,      3,\n         2,      0\n}\n};\n\nconst opus_uint8 silk_pulses_per_block_BITS_Q5[ 9 ][ 18 ] = {\n{\n        31,     57,    107,    160,    205,    205,    255,    255,\n       255,    255,    255,    255,    255,    255,    255,    255,\n       255,    255\n},\n{\n        69,     47,     67,    111,    166,    205,    255,    255,\n       255,    255,    255,    255,    255,    255,    255,    255,\n       255,    255\n},\n{\n        82,     74,     79,     95,    109,    128,    145,    160,\n       173,    205,    205,    205,    224,    255,    255,    224,\n       255,    224\n},\n{\n       125,     74,     59,     69,     97,    141,    182,    255,\n       255,    255,    255,    255,    255,    255,    255,    255,\n       255,    255\n},\n{\n       173,    115,     85,     73,     76,     92,    115,    145,\n       173,    205,    224,    224,    255,    255,    255,    255,\n       255,    255\n},\n{\n       166,    134,    113,    102,    101,    102,    107,    118,\n       125,    138,    145,    155,    166,    182,    192,    192,\n       205,    150\n},\n{\n       224,    182,    134,    101,     83,     79,     85,     97,\n       120,    145,    173,    205,    224,    255,    255,    255,\n       255,    255\n},\n{\n       255,    224,    192,    150,    120,    101,     92,     89,\n        93,    102,    118,    134,    160,    182,    192,    224,\n       224,    224\n},\n{\n       255,    224,    224,    182,    155,    134,    118,    109,\n       104,    102,    106,    111,    118,    131,    145,    160,\n       173,    131\n}\n};\n\nconst opus_uint8 silk_rate_levels_iCDF[ 2 ][ 9 ] =\n{\n{\n       241,    190,    178,    132,     87,     74,     41,     14,\n         0\n},\n{\n       223,    193,    157,    140,    106,     57,     39,     18,\n         0\n}\n};\n\nconst opus_uint8 silk_rate_levels_BITS_Q5[ 2 ][ 9 ] =\n{\n{\n       131,     74,    141,     79,     80,    138,     95,    104,\n       134\n},\n{\n        95,     99,     91,    125,     93,     76,    123,    115,\n       123\n}\n};\n\nconst opus_uint8 silk_shell_code_table0[ 152 ] = {\n       128,      0,    214,     42,      0,    235,    128,     21,\n         0,    244,    184,     72,     11,      0,    248,    214,\n       128,     42,      7,      0,    248,    225,    170,     80,\n        25,      5,      0,    251,    236,    198,    126,     54,\n        18,      3,      0,    250,    238,    211,    159,     82,\n        35,     15,      5,      0,    250,    231,    203,    168,\n       128,     88,     53,     25,      6,      0,    252,    238,\n       216,    185,    148,    108,     71,     40,     18,      4,\n         0,    253,    243,    225,    199,    166,    128,     90,\n        57,     31,     13,      3,      0,    254,    246,    233,\n       212,    183,    147,    109,     73,     44,     23,     10,\n         2,      0,    255,    250,    240,    223,    198,    166,\n       128,     90,     58,     33,     16,      6,      1,      0,\n       255,    251,    244,    231,    210,    181,    146,    110,\n        75,     46,     25,     12,      5,      1,      0,    255,\n       253,    248,    238,    221,    196,    164,    128,     92,\n        60,     35,     18,      8,      3,      1,      0,    255,\n       253,    249,    242,    229,    208,    180,    146,    110,\n        76,     48,     27,     14,      7,      3,      1,      0\n};\n\nconst opus_uint8 silk_shell_code_table1[ 152 ] = {\n       129,      0,    207,     50,      0,    236,    129,     20,\n         0,    245,    185,     72,     10,      0,    249,    213,\n       129,     42,      6,      0,    250,    226,    169,     87,\n        27,      4,      0,    251,    233,    194,    130,     62,\n        20,      4,      0,    250,    236,    207,    160,     99,\n        47,     17,      3,      0,    255,    240,    217,    182,\n       131,     81,     41,     11,      1,      0,    255,    254,\n       233,    201,    159,    107,     61,     20,      2,      1,\n         0,    255,    249,    233,    206,    170,    128,     86,\n        50,     23,      7,      1,      0,    255,    250,    238,\n       217,    186,    148,    108,     70,     39,     18,      6,\n         1,      0,    255,    252,    243,    226,    200,    166,\n       128,     90,     56,     30,     13,      4,      1,      0,\n       255,    252,    245,    231,    209,    180,    146,    110,\n        76,     47,     25,     11,      4,      1,      0,    255,\n       253,    248,    237,    219,    194,    163,    128,     93,\n        62,     37,     19,      8,      3,      1,      0,    255,\n       254,    250,    241,    226,    205,    177,    145,    111,\n        79,     51,     30,     15,      6,      2,      1,      0\n};\n\nconst opus_uint8 silk_shell_code_table2[ 152 ] = {\n       129,      0,    203,     54,      0,    234,    129,     23,\n         0,    245,    184,     73,     10,      0,    250,    215,\n       129,     41,      5,      0,    252,    232,    173,     86,\n        24,      3,      0,    253,    240,    200,    129,     56,\n        15,      2,      0,    253,    244,    217,    164,     94,\n        38,     10,      1,      0,    253,    245,    226,    189,\n       132,     71,     27,      7,      1,      0,    253,    246,\n       231,    203,    159,    105,     56,     23,      6,      1,\n         0,    255,    248,    235,    213,    179,    133,     85,\n        47,     19,      5,      1,      0,    255,    254,    243,\n       221,    194,    159,    117,     70,     37,     12,      2,\n         1,      0,    255,    254,    248,    234,    208,    171,\n       128,     85,     48,     22,      8,      2,      1,      0,\n       255,    254,    250,    240,    220,    189,    149,    107,\n        67,     36,     16,      6,      2,      1,      0,    255,\n       254,    251,    243,    227,    201,    166,    128,     90,\n        55,     29,     13,      5,      2,      1,      0,    255,\n       254,    252,    246,    234,    213,    183,    147,    109,\n        73,     43,     22,     10,      4,      2,      1,      0\n};\n\nconst opus_uint8 silk_shell_code_table3[ 152 ] = {\n       130,      0,    200,     58,      0,    231,    130,     26,\n         0,    244,    184,     76,     12,      0,    249,    214,\n       130,     43,      6,      0,    252,    232,    173,     87,\n        24,      3,      0,    253,    241,    203,    131,     56,\n        14,      2,      0,    254,    246,    221,    167,     94,\n        35,      8,      1,      0,    254,    249,    232,    193,\n       130,     65,     23,      5,      1,      0,    255,    251,\n       239,    211,    162,     99,     45,     15,      4,      1,\n         0,    255,    251,    243,    223,    186,    131,     74,\n        33,     11,      3,      1,      0,    255,    252,    245,\n       230,    202,    158,    105,     57,     24,      8,      2,\n         1,      0,    255,    253,    247,    235,    214,    179,\n       132,     84,     44,     19,      7,      2,      1,      0,\n       255,    254,    250,    240,    223,    196,    159,    112,\n        69,     36,     15,      6,      2,      1,      0,    255,\n       254,    253,    245,    231,    209,    176,    136,     93,\n        55,     27,     11,      3,      2,      1,      0,    255,\n       254,    253,    252,    239,    221,    194,    158,    117,\n        76,     42,     18,      4,      3,      2,      1,      0\n};\n\nconst opus_uint8 silk_shell_code_table_offsets[ 17 ] = {\n         0,      0,      2,      5,      9,     14,     20,     27,\n        35,     44,     54,     65,     77,     90,    104,    119,\n       135\n};\n\nconst opus_uint8 silk_sign_iCDF[ 42 ] = {\n       254,     49,     67,     77,     82,     93,     99,\n       198,     11,     18,     24,     31,     36,     45,\n       255,     46,     66,     78,     87,     94,    104,\n       208,     14,     21,     32,     42,     51,     66,\n       255,     94,    104,    109,    112,    115,    118,\n       248,     53,     69,     80,     88,     95,    102\n};\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/tuning_parameters.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_TUNING_PARAMETERS_H\n#define SILK_TUNING_PARAMETERS_H\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n/* Decay time for bitreservoir */\n#define BITRESERVOIR_DECAY_TIME_MS                      500\n\n/*******************/\n/* Pitch estimator */\n/*******************/\n\n/* Level of noise floor for whitening filter LPC analysis in pitch analysis */\n#define FIND_PITCH_WHITE_NOISE_FRACTION                 1e-3f\n\n/* Bandwidth expansion for whitening filter in pitch analysis */\n#define FIND_PITCH_BANDWIDTH_EXPANSION                  0.99f\n\n/*********************/\n/* Linear prediction */\n/*********************/\n\n/* LPC analysis regularization */\n#define FIND_LPC_COND_FAC                               1e-5f\n\n/* LTP analysis defines */\n#define FIND_LTP_COND_FAC                               1e-5f\n#define LTP_DAMPING                                     0.05f\n#define LTP_SMOOTHING                                   0.1f\n\n/* LTP quantization settings */\n#define MU_LTP_QUANT_NB                                 0.03f\n#define MU_LTP_QUANT_MB                                 0.025f\n#define MU_LTP_QUANT_WB                                 0.02f\n\n/* Max cumulative LTP gain */\n#define MAX_SUM_LOG_GAIN_DB\t\t\t\t\t\t\t\t250.0f\n\n/***********************/\n/* High pass filtering */\n/***********************/\n\n/* Smoothing parameters for low end of pitch frequency range estimation */\n#define VARIABLE_HP_SMTH_COEF1                          0.1f\n#define VARIABLE_HP_SMTH_COEF2                          0.015f\n#define VARIABLE_HP_MAX_DELTA_FREQ                      0.4f\n\n/* Min and max cut-off frequency values (-3 dB points) */\n#define VARIABLE_HP_MIN_CUTOFF_HZ                       60\n#define VARIABLE_HP_MAX_CUTOFF_HZ                       100\n\n/***********/\n/* Various */\n/***********/\n\n/* VAD threshold */\n#define SPEECH_ACTIVITY_DTX_THRES                       0.05f\n\n/* Speech Activity LBRR enable threshold */\n#define LBRR_SPEECH_ACTIVITY_THRES                      0.3f\n\n/*************************/\n/* Perceptual parameters */\n/*************************/\n\n/* reduction in coding SNR during low speech activity */\n#define BG_SNR_DECR_dB                                  2.0f\n\n/* factor for reducing quantization noise during voiced speech */\n#define HARM_SNR_INCR_dB                                2.0f\n\n/* factor for reducing quantization noise for unvoiced sparse signals */\n#define SPARSE_SNR_INCR_dB                              2.0f\n\n/* threshold for sparseness measure above which to use lower quantization offset during unvoiced */\n#define SPARSENESS_THRESHOLD_QNT_OFFSET                 0.75f\n\n/* warping control */\n#define WARPING_MULTIPLIER                              0.015f\n\n/* fraction added to first autocorrelation value */\n#define SHAPE_WHITE_NOISE_FRACTION                      5e-5f\n\n/* noise shaping filter chirp factor */\n#define BANDWIDTH_EXPANSION                             0.95f\n\n/* difference between chirp factors for analysis and synthesis noise shaping filters at low bitrates */\n#define LOW_RATE_BANDWIDTH_EXPANSION_DELTA              0.01f\n\n/* extra harmonic boosting (signal shaping) at low bitrates */\n#define LOW_RATE_HARMONIC_BOOST                         0.1f\n\n/* extra harmonic boosting (signal shaping) for noisy input signals */\n#define LOW_INPUT_QUALITY_HARMONIC_BOOST                0.1f\n\n/* harmonic noise shaping */\n#define HARMONIC_SHAPING                                0.3f\n\n/* extra harmonic noise shaping for high bitrates or noisy input */\n#define HIGH_RATE_OR_LOW_QUALITY_HARMONIC_SHAPING       0.2f\n\n/* parameter for shaping noise towards higher frequencies */\n#define HP_NOISE_COEF                                   0.25f\n\n/* parameter for shaping noise even more towards higher frequencies during voiced speech */\n#define HARM_HP_NOISE_COEF                              0.35f\n\n/* parameter for applying a high-pass tilt to the input signal */\n#define INPUT_TILT                                      0.05f\n\n/* parameter for extra high-pass tilt to the input signal at high rates */\n#define HIGH_RATE_INPUT_TILT                            0.1f\n\n/* parameter for reducing noise at the very low frequencies */\n#define LOW_FREQ_SHAPING                                4.0f\n\n/* less reduction of noise at the very low frequencies for signals with low SNR at low frequencies */\n#define LOW_QUALITY_LOW_FREQ_SHAPING_DECR               0.5f\n\n/* subframe smoothing coefficient for HarmBoost, HarmShapeGain, Tilt (lower -> more smoothing) */\n#define SUBFR_SMTH_COEF                                 0.4f\n\n/* parameters defining the R/D tradeoff in the residual quantizer */\n#define LAMBDA_OFFSET                                   1.2f\n#define LAMBDA_SPEECH_ACT                               -0.2f\n#define LAMBDA_DELAYED_DECISIONS                        -0.05f\n#define LAMBDA_INPUT_QUALITY                            -0.1f\n#define LAMBDA_CODING_QUALITY                           -0.2f\n#define LAMBDA_QUANT_OFFSET                             0.8f\n\n/* Compensation in bitrate calculations for 10 ms modes */\n#define REDUCE_BITRATE_10_MS_BPS                        2200\n\n/* Maximum time before allowing a bandwidth transition */\n#define MAX_BANDWIDTH_SWITCH_DELAY_MS                   5000\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* SILK_TUNING_PARAMETERS_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/silk/typedef.h",
    "content": "/***********************************************************************\nCopyright (c) 2006-2011, Skype Limited. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n- Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n- Neither the name of Internet Society, IETF or IETF Trust, nor the\nnames of specific contributors, may be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n***********************************************************************/\n\n#ifndef SILK_TYPEDEF_H\n#define SILK_TYPEDEF_H\n\n#include \"opus_types.h\"\n#include \"opus_defines.h\"\n\n#ifndef FIXED_POINT\n# include <float.h>\n# define silk_float      float\n# define silk_float_MAX  FLT_MAX\n#endif\n\n#define silk_int64_MAX   ((opus_int64)0x7FFFFFFFFFFFFFFFLL)   /*  2^63 - 1 */\n#define silk_int64_MIN   ((opus_int64)0x8000000000000000LL)   /* -2^63 */\n#define silk_int32_MAX   0x7FFFFFFF                           /*  2^31 - 1 =  2147483647 */\n#define silk_int32_MIN   ((opus_int32)0x80000000)             /* -2^31     = -2147483648 */\n#define silk_int16_MAX   0x7FFF                               /*  2^15 - 1 =  32767 */\n#define silk_int16_MIN   ((opus_int16)0x8000)                 /* -2^15     = -32768 */\n#define silk_int8_MAX    0x7F                                 /*  2^7 - 1  =  127 */\n#define silk_int8_MIN    ((opus_int8)0x80)                    /* -2^7      = -128 */\n#define silk_uint8_MAX   0xFF                                 /*  2^8 - 1 = 255 */\n\n#define silk_TRUE        1\n#define silk_FALSE       0\n\n/* assertions */\n#if (defined _WIN32 && !defined _WINCE && !defined(__GNUC__) && !defined(NO_ASSERTS))\n# ifndef silk_assert\n#  include <crtdbg.h>      /* ASSERTE() */\n#  define silk_assert(COND)   _ASSERTE(COND)\n# endif\n#else\n# ifdef ENABLE_ASSERTIONS\n#  include <stdio.h>\n#  include <stdlib.h>\n#define silk_fatal(str) _silk_fatal(str, __FILE__, __LINE__);\n#ifdef __GNUC__\n__attribute__((noreturn))\n#endif\nstatic OPUS_INLINE void _silk_fatal(const char *str, const char *file, int line)\n{\n   fprintf (stderr, \"Fatal (internal) error in %s, line %d: %s\\n\", file, line, str);\n   abort();\n}\n#  define silk_assert(COND) {if (!(COND)) {silk_fatal(\"assertion failed: \" #COND);}}\n# else\n#  define silk_assert(COND)\n# endif\n#endif\n\n#endif /* SILK_TYPEDEF_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/analysis.c",
    "content": "/* Copyright (c) 2011 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 FOUNDATION OR\n   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"kiss_fft.h\"\n#include \"celt.h\"\n#include \"modes.h\"\n#include \"arch.h\"\n#include \"quant_bands.h\"\n#include <stdio.h>\n#include \"analysis.h\"\n#include \"mlp.h\"\n#include \"stack_alloc.h\"\n\nextern const MLP net;\n\n#ifndef M_PI\n#define M_PI 3.141592653\n#endif\n\nstatic const float dct_table[128] = {\n        0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f,\n        0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f,\n        0.351851f, 0.338330f, 0.311806f, 0.273300f, 0.224292f, 0.166664f, 0.102631f, 0.034654f,\n       -0.034654f,-0.102631f,-0.166664f,-0.224292f,-0.273300f,-0.311806f,-0.338330f,-0.351851f,\n        0.346760f, 0.293969f, 0.196424f, 0.068975f,-0.068975f,-0.196424f,-0.293969f,-0.346760f,\n       -0.346760f,-0.293969f,-0.196424f,-0.068975f, 0.068975f, 0.196424f, 0.293969f, 0.346760f,\n        0.338330f, 0.224292f, 0.034654f,-0.166664f,-0.311806f,-0.351851f,-0.273300f,-0.102631f,\n        0.102631f, 0.273300f, 0.351851f, 0.311806f, 0.166664f,-0.034654f,-0.224292f,-0.338330f,\n        0.326641f, 0.135299f,-0.135299f,-0.326641f,-0.326641f,-0.135299f, 0.135299f, 0.326641f,\n        0.326641f, 0.135299f,-0.135299f,-0.326641f,-0.326641f,-0.135299f, 0.135299f, 0.326641f,\n        0.311806f, 0.034654f,-0.273300f,-0.338330f,-0.102631f, 0.224292f, 0.351851f, 0.166664f,\n       -0.166664f,-0.351851f,-0.224292f, 0.102631f, 0.338330f, 0.273300f,-0.034654f,-0.311806f,\n        0.293969f,-0.068975f,-0.346760f,-0.196424f, 0.196424f, 0.346760f, 0.068975f,-0.293969f,\n       -0.293969f, 0.068975f, 0.346760f, 0.196424f,-0.196424f,-0.346760f,-0.068975f, 0.293969f,\n        0.273300f,-0.166664f,-0.338330f, 0.034654f, 0.351851f, 0.102631f,-0.311806f,-0.224292f,\n        0.224292f, 0.311806f,-0.102631f,-0.351851f,-0.034654f, 0.338330f, 0.166664f,-0.273300f,\n};\n\nstatic const float analysis_window[240] = {\n      0.000043f, 0.000171f, 0.000385f, 0.000685f, 0.001071f, 0.001541f, 0.002098f, 0.002739f,\n      0.003466f, 0.004278f, 0.005174f, 0.006156f, 0.007222f, 0.008373f, 0.009607f, 0.010926f,\n      0.012329f, 0.013815f, 0.015385f, 0.017037f, 0.018772f, 0.020590f, 0.022490f, 0.024472f,\n      0.026535f, 0.028679f, 0.030904f, 0.033210f, 0.035595f, 0.038060f, 0.040604f, 0.043227f,\n      0.045928f, 0.048707f, 0.051564f, 0.054497f, 0.057506f, 0.060591f, 0.063752f, 0.066987f,\n      0.070297f, 0.073680f, 0.077136f, 0.080665f, 0.084265f, 0.087937f, 0.091679f, 0.095492f,\n      0.099373f, 0.103323f, 0.107342f, 0.111427f, 0.115579f, 0.119797f, 0.124080f, 0.128428f,\n      0.132839f, 0.137313f, 0.141849f, 0.146447f, 0.151105f, 0.155823f, 0.160600f, 0.165435f,\n      0.170327f, 0.175276f, 0.180280f, 0.185340f, 0.190453f, 0.195619f, 0.200838f, 0.206107f,\n      0.211427f, 0.216797f, 0.222215f, 0.227680f, 0.233193f, 0.238751f, 0.244353f, 0.250000f,\n      0.255689f, 0.261421f, 0.267193f, 0.273005f, 0.278856f, 0.284744f, 0.290670f, 0.296632f,\n      0.302628f, 0.308658f, 0.314721f, 0.320816f, 0.326941f, 0.333097f, 0.339280f, 0.345492f,\n      0.351729f, 0.357992f, 0.364280f, 0.370590f, 0.376923f, 0.383277f, 0.389651f, 0.396044f,\n      0.402455f, 0.408882f, 0.415325f, 0.421783f, 0.428254f, 0.434737f, 0.441231f, 0.447736f,\n      0.454249f, 0.460770f, 0.467298f, 0.473832f, 0.480370f, 0.486912f, 0.493455f, 0.500000f,\n      0.506545f, 0.513088f, 0.519630f, 0.526168f, 0.532702f, 0.539230f, 0.545751f, 0.552264f,\n      0.558769f, 0.565263f, 0.571746f, 0.578217f, 0.584675f, 0.591118f, 0.597545f, 0.603956f,\n      0.610349f, 0.616723f, 0.623077f, 0.629410f, 0.635720f, 0.642008f, 0.648271f, 0.654508f,\n      0.660720f, 0.666903f, 0.673059f, 0.679184f, 0.685279f, 0.691342f, 0.697372f, 0.703368f,\n      0.709330f, 0.715256f, 0.721144f, 0.726995f, 0.732807f, 0.738579f, 0.744311f, 0.750000f,\n      0.755647f, 0.761249f, 0.766807f, 0.772320f, 0.777785f, 0.783203f, 0.788573f, 0.793893f,\n      0.799162f, 0.804381f, 0.809547f, 0.814660f, 0.819720f, 0.824724f, 0.829673f, 0.834565f,\n      0.839400f, 0.844177f, 0.848895f, 0.853553f, 0.858151f, 0.862687f, 0.867161f, 0.871572f,\n      0.875920f, 0.880203f, 0.884421f, 0.888573f, 0.892658f, 0.896677f, 0.900627f, 0.904508f,\n      0.908321f, 0.912063f, 0.915735f, 0.919335f, 0.922864f, 0.926320f, 0.929703f, 0.933013f,\n      0.936248f, 0.939409f, 0.942494f, 0.945503f, 0.948436f, 0.951293f, 0.954072f, 0.956773f,\n      0.959396f, 0.961940f, 0.964405f, 0.966790f, 0.969096f, 0.971321f, 0.973465f, 0.975528f,\n      0.977510f, 0.979410f, 0.981228f, 0.982963f, 0.984615f, 0.986185f, 0.987671f, 0.989074f,\n      0.990393f, 0.991627f, 0.992778f, 0.993844f, 0.994826f, 0.995722f, 0.996534f, 0.997261f,\n      0.997902f, 0.998459f, 0.998929f, 0.999315f, 0.999615f, 0.999829f, 0.999957f, 1.000000f,\n};\n\nstatic const int tbands[NB_TBANDS+1] = {\n       2,  4,  6,  8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 68, 80, 96, 120\n};\n\nstatic const int extra_bands[NB_TOT_BANDS+1] = {\n      1, 2,  4,  6,  8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 68, 80, 96, 120, 160, 200\n};\n\n/*static const float tweight[NB_TBANDS+1] = {\n      .3, .4, .5, .6, .7, .8, .9, 1., 1., 1., 1., 1., 1., 1., .8, .7, .6, .5\n};*/\n\n#define NB_TONAL_SKIP_BANDS 9\n\n#define cA 0.43157974f\n#define cB 0.67848403f\n#define cC 0.08595542f\n#define cE ((float)M_PI/2)\nstatic OPUS_INLINE float fast_atan2f(float y, float x) {\n   float x2, y2;\n   /* Should avoid underflow on the values we'll get */\n   if (ABS16(x)+ABS16(y)<1e-9f)\n   {\n      x*=1e12f;\n      y*=1e12f;\n   }\n   x2 = x*x;\n   y2 = y*y;\n   if(x2<y2){\n      float den = (y2 + cB*x2) * (y2 + cC*x2);\n      if (den!=0)\n         return -x*y*(y2 + cA*x2) / den + (y<0 ? -cE : cE);\n      else\n         return (y<0 ? -cE : cE);\n   }else{\n      float den = (x2 + cB*y2) * (x2 + cC*y2);\n      if (den!=0)\n         return  x*y*(x2 + cA*y2) / den + (y<0 ? -cE : cE) - (x*y<0 ? -cE : cE);\n      else\n         return (y<0 ? -cE : cE) - (x*y<0 ? -cE : cE);\n   }\n}\n\nvoid tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int len)\n{\n   int pos;\n   int curr_lookahead;\n   float psum;\n   int i;\n\n   pos = tonal->read_pos;\n   curr_lookahead = tonal->write_pos-tonal->read_pos;\n   if (curr_lookahead<0)\n      curr_lookahead += DETECT_SIZE;\n\n   if (len > 480 && pos != tonal->write_pos)\n   {\n      pos++;\n      if (pos==DETECT_SIZE)\n         pos=0;\n   }\n   if (pos == tonal->write_pos)\n      pos--;\n   if (pos<0)\n      pos = DETECT_SIZE-1;\n   OPUS_COPY(info_out, &tonal->info[pos], 1);\n   tonal->read_subframe += len/120;\n   while (tonal->read_subframe>=4)\n   {\n      tonal->read_subframe -= 4;\n      tonal->read_pos++;\n   }\n   if (tonal->read_pos>=DETECT_SIZE)\n      tonal->read_pos-=DETECT_SIZE;\n\n   /* Compensate for the delay in the features themselves.\n      FIXME: Need a better estimate the 10 I just made up */\n   curr_lookahead = IMAX(curr_lookahead-10, 0);\n\n   psum=0;\n   /* Summing the probability of transition patterns that involve music at\n      time (DETECT_SIZE-curr_lookahead-1) */\n   for (i=0;i<DETECT_SIZE-curr_lookahead;i++)\n      psum += tonal->pmusic[i];\n   for (;i<DETECT_SIZE;i++)\n      psum += tonal->pspeech[i];\n   psum = psum*tonal->music_confidence + (1-psum)*tonal->speech_confidence;\n   /*printf(\"%f %f %f\\n\", psum, info_out->music_prob, info_out->tonality);*/\n\n   info_out->music_prob = psum;\n}\n\nvoid tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info_out, const CELTMode *celt_mode, const void *x, int len, int offset, int c1, int c2, int C, int lsb_depth, downmix_func downmix)\n{\n    int i, b;\n    const kiss_fft_state *kfft;\n    VARDECL(kiss_fft_cpx, in);\n    VARDECL(kiss_fft_cpx, out);\n    int N = 480, N2=240;\n    float * OPUS_RESTRICT A = tonal->angle;\n    float * OPUS_RESTRICT dA = tonal->d_angle;\n    float * OPUS_RESTRICT d2A = tonal->d2_angle;\n    VARDECL(float, tonality);\n    VARDECL(float, noisiness);\n    float band_tonality[NB_TBANDS];\n    float logE[NB_TBANDS];\n    float BFCC[8];\n    float features[25];\n    float frame_tonality;\n    float max_frame_tonality;\n    /*float tw_sum=0;*/\n    float frame_noisiness;\n    const float pi4 = (float)(M_PI*M_PI*M_PI*M_PI);\n    float slope=0;\n    float frame_stationarity;\n    float relativeE;\n    float frame_probs[2];\n    float alpha, alphaE, alphaE2;\n    float frame_loudness;\n    float bandwidth_mask;\n    int bandwidth=0;\n    float maxE = 0;\n    float noise_floor;\n    int remaining;\n    AnalysisInfo *info;\n    SAVE_STACK;\n\n    tonal->last_transition++;\n    alpha = 1.f/IMIN(20, 1+tonal->count);\n    alphaE = 1.f/IMIN(50, 1+tonal->count);\n    alphaE2 = 1.f/IMIN(1000, 1+tonal->count);\n\n    if (tonal->count<4)\n       tonal->music_prob = .5;\n    kfft = celt_mode->mdct.kfft[0];\n    if (tonal->count==0)\n       tonal->mem_fill = 240;\n    downmix(x, &tonal->inmem[tonal->mem_fill], IMIN(len, ANALYSIS_BUF_SIZE-tonal->mem_fill), offset, c1, c2, C);\n    if (tonal->mem_fill+len < ANALYSIS_BUF_SIZE)\n    {\n       tonal->mem_fill += len;\n       /* Don't have enough to update the analysis */\n       RESTORE_STACK;\n       return;\n    }\n    info = &tonal->info[tonal->write_pos++];\n    if (tonal->write_pos>=DETECT_SIZE)\n       tonal->write_pos-=DETECT_SIZE;\n\n    ALLOC(in, 480, kiss_fft_cpx);\n    ALLOC(out, 480, kiss_fft_cpx);\n    ALLOC(tonality, 240, float);\n    ALLOC(noisiness, 240, float);\n    for (i=0;i<N2;i++)\n    {\n       float w = analysis_window[i];\n       in[i].r = (kiss_fft_scalar)(w*tonal->inmem[i]);\n       in[i].i = (kiss_fft_scalar)(w*tonal->inmem[N2+i]);\n       in[N-i-1].r = (kiss_fft_scalar)(w*tonal->inmem[N-i-1]);\n       in[N-i-1].i = (kiss_fft_scalar)(w*tonal->inmem[N+N2-i-1]);\n    }\n    OPUS_MOVE(tonal->inmem, tonal->inmem+ANALYSIS_BUF_SIZE-240, 240);\n    remaining = len - (ANALYSIS_BUF_SIZE-tonal->mem_fill);\n    downmix(x, &tonal->inmem[240], remaining, offset+ANALYSIS_BUF_SIZE-tonal->mem_fill, c1, c2, C);\n    tonal->mem_fill = 240 + remaining;\n    opus_fft(kfft, in, out);\n\n    for (i=1;i<N2;i++)\n    {\n       float X1r, X2r, X1i, X2i;\n       float angle, d_angle, d2_angle;\n       float angle2, d_angle2, d2_angle2;\n       float mod1, mod2, avg_mod;\n       X1r = (float)out[i].r+out[N-i].r;\n       X1i = (float)out[i].i-out[N-i].i;\n       X2r = (float)out[i].i+out[N-i].i;\n       X2i = (float)out[N-i].r-out[i].r;\n\n       angle = (float)(.5f/M_PI)*fast_atan2f(X1i, X1r);\n       d_angle = angle - A[i];\n       d2_angle = d_angle - dA[i];\n\n       angle2 = (float)(.5f/M_PI)*fast_atan2f(X2i, X2r);\n       d_angle2 = angle2 - angle;\n       d2_angle2 = d_angle2 - d_angle;\n\n       mod1 = d2_angle - (float)floor(.5+d2_angle);\n       noisiness[i] = ABS16(mod1);\n       mod1 *= mod1;\n       mod1 *= mod1;\n\n       mod2 = d2_angle2 - (float)floor(.5+d2_angle2);\n       noisiness[i] += ABS16(mod2);\n       mod2 *= mod2;\n       mod2 *= mod2;\n\n       avg_mod = .25f*(d2A[i]+2.f*mod1+mod2);\n       tonality[i] = 1.f/(1.f+40.f*16.f*pi4*avg_mod)-.015f;\n\n       A[i] = angle2;\n       dA[i] = d_angle2;\n       d2A[i] = mod2;\n    }\n\n    frame_tonality = 0;\n    max_frame_tonality = 0;\n    /*tw_sum = 0;*/\n    info->activity = 0;\n    frame_noisiness = 0;\n    frame_stationarity = 0;\n    if (!tonal->count)\n    {\n       for (b=0;b<NB_TBANDS;b++)\n       {\n          tonal->lowE[b] = 1e10;\n          tonal->highE[b] = -1e10;\n       }\n    }\n    relativeE = 0;\n    frame_loudness = 0;\n    for (b=0;b<NB_TBANDS;b++)\n    {\n       float E=0, tE=0, nE=0;\n       float L1, L2;\n       float stationarity;\n       for (i=tbands[b];i<tbands[b+1];i++)\n       {\n          float binE = out[i].r*(float)out[i].r + out[N-i].r*(float)out[N-i].r\n                     + out[i].i*(float)out[i].i + out[N-i].i*(float)out[N-i].i;\n#ifdef FIXED_POINT\n          /* FIXME: It's probably best to change the BFCC filter initial state instead */\n          binE *= 5.55e-17f;\n#endif\n          E += binE;\n          tE += binE*tonality[i];\n          nE += binE*2.f*(.5f-noisiness[i]);\n       }\n       tonal->E[tonal->E_count][b] = E;\n       frame_noisiness += nE/(1e-15f+E);\n\n       frame_loudness += (float)sqrt(E+1e-10f);\n       logE[b] = (float)log(E+1e-10f);\n       tonal->lowE[b] = MIN32(logE[b], tonal->lowE[b]+.01f);\n       tonal->highE[b] = MAX32(logE[b], tonal->highE[b]-.1f);\n       if (tonal->highE[b] < tonal->lowE[b]+1.f)\n       {\n          tonal->highE[b]+=.5f;\n          tonal->lowE[b]-=.5f;\n       }\n       relativeE += (logE[b]-tonal->lowE[b])/(1e-15f+tonal->highE[b]-tonal->lowE[b]);\n\n       L1=L2=0;\n       for (i=0;i<NB_FRAMES;i++)\n       {\n          L1 += (float)sqrt(tonal->E[i][b]);\n          L2 += tonal->E[i][b];\n       }\n\n       stationarity = MIN16(0.99f,L1/(float)sqrt(1e-15+NB_FRAMES*L2));\n       stationarity *= stationarity;\n       stationarity *= stationarity;\n       frame_stationarity += stationarity;\n       /*band_tonality[b] = tE/(1e-15+E)*/;\n       band_tonality[b] = MAX16(tE/(1e-15f+E), stationarity*tonal->prev_band_tonality[b]);\n#if 0\n       if (b>=NB_TONAL_SKIP_BANDS)\n       {\n          frame_tonality += tweight[b]*band_tonality[b];\n          tw_sum += tweight[b];\n       }\n#else\n       frame_tonality += band_tonality[b];\n       if (b>=NB_TBANDS-NB_TONAL_SKIP_BANDS)\n          frame_tonality -= band_tonality[b-NB_TBANDS+NB_TONAL_SKIP_BANDS];\n#endif\n       max_frame_tonality = MAX16(max_frame_tonality, (1.f+.03f*(b-NB_TBANDS))*frame_tonality);\n       slope += band_tonality[b]*(b-8);\n       /*printf(\"%f %f \", band_tonality[b], stationarity);*/\n       tonal->prev_band_tonality[b] = band_tonality[b];\n    }\n\n    bandwidth_mask = 0;\n    bandwidth = 0;\n    maxE = 0;\n    noise_floor = 5.7e-4f/(1<<(IMAX(0,lsb_depth-8)));\n#ifdef FIXED_POINT\n    noise_floor *= 1<<(15+SIG_SHIFT);\n#endif\n    noise_floor *= noise_floor;\n    for (b=0;b<NB_TOT_BANDS;b++)\n    {\n       float E=0;\n       int band_start, band_end;\n       /* Keep a margin of 300 Hz for aliasing */\n       band_start = extra_bands[b];\n       band_end = extra_bands[b+1];\n       for (i=band_start;i<band_end;i++)\n       {\n          float binE = out[i].r*(float)out[i].r + out[N-i].r*(float)out[N-i].r\n                     + out[i].i*(float)out[i].i + out[N-i].i*(float)out[N-i].i;\n          E += binE;\n       }\n       maxE = MAX32(maxE, E);\n       tonal->meanE[b] = MAX32((1-alphaE2)*tonal->meanE[b], E);\n       E = MAX32(E, tonal->meanE[b]);\n       /* Use a simple follower with 13 dB/Bark slope for spreading function */\n       bandwidth_mask = MAX32(.05f*bandwidth_mask, E);\n       /* Consider the band \"active\" only if all these conditions are met:\n          1) less than 10 dB below the simple follower\n          2) less than 90 dB below the peak band (maximal masking possible considering\n             both the ATH and the loudness-dependent slope of the spreading function)\n          3) above the PCM quantization noise floor\n       */\n       if (E>.1*bandwidth_mask && E*1e9f > maxE && E > noise_floor*(band_end-band_start))\n          bandwidth = b;\n    }\n    if (tonal->count<=2)\n       bandwidth = 20;\n    frame_loudness = 20*(float)log10(frame_loudness);\n    tonal->Etracker = MAX32(tonal->Etracker-.03f, frame_loudness);\n    tonal->lowECount *= (1-alphaE);\n    if (frame_loudness < tonal->Etracker-30)\n       tonal->lowECount += alphaE;\n\n    for (i=0;i<8;i++)\n    {\n       float sum=0;\n       for (b=0;b<16;b++)\n          sum += dct_table[i*16+b]*logE[b];\n       BFCC[i] = sum;\n    }\n\n    frame_stationarity /= NB_TBANDS;\n    relativeE /= NB_TBANDS;\n    if (tonal->count<10)\n       relativeE = .5;\n    frame_noisiness /= NB_TBANDS;\n#if 1\n    info->activity = frame_noisiness + (1-frame_noisiness)*relativeE;\n#else\n    info->activity = .5*(1+frame_noisiness-frame_stationarity);\n#endif\n    frame_tonality = (max_frame_tonality/(NB_TBANDS-NB_TONAL_SKIP_BANDS));\n    frame_tonality = MAX16(frame_tonality, tonal->prev_tonality*.8f);\n    tonal->prev_tonality = frame_tonality;\n\n    slope /= 8*8;\n    info->tonality_slope = slope;\n\n    tonal->E_count = (tonal->E_count+1)%NB_FRAMES;\n    tonal->count++;\n    info->tonality = frame_tonality;\n\n    for (i=0;i<4;i++)\n       features[i] = -0.12299f*(BFCC[i]+tonal->mem[i+24]) + 0.49195f*(tonal->mem[i]+tonal->mem[i+16]) + 0.69693f*tonal->mem[i+8] - 1.4349f*tonal->cmean[i];\n\n    for (i=0;i<4;i++)\n       tonal->cmean[i] = (1-alpha)*tonal->cmean[i] + alpha*BFCC[i];\n\n    for (i=0;i<4;i++)\n        features[4+i] = 0.63246f*(BFCC[i]-tonal->mem[i+24]) + 0.31623f*(tonal->mem[i]-tonal->mem[i+16]);\n    for (i=0;i<3;i++)\n        features[8+i] = 0.53452f*(BFCC[i]+tonal->mem[i+24]) - 0.26726f*(tonal->mem[i]+tonal->mem[i+16]) -0.53452f*tonal->mem[i+8];\n\n    if (tonal->count > 5)\n    {\n       for (i=0;i<9;i++)\n          tonal->std[i] = (1-alpha)*tonal->std[i] + alpha*features[i]*features[i];\n    }\n\n    for (i=0;i<8;i++)\n    {\n       tonal->mem[i+24] = tonal->mem[i+16];\n       tonal->mem[i+16] = tonal->mem[i+8];\n       tonal->mem[i+8] = tonal->mem[i];\n       tonal->mem[i] = BFCC[i];\n    }\n    for (i=0;i<9;i++)\n       features[11+i] = (float)sqrt(tonal->std[i]);\n    features[20] = info->tonality;\n    features[21] = info->activity;\n    features[22] = frame_stationarity;\n    features[23] = info->tonality_slope;\n    features[24] = tonal->lowECount;\n\n#ifndef DISABLE_FLOAT_API\n    mlp_process(&net, features, frame_probs);\n    frame_probs[0] = .5f*(frame_probs[0]+1);\n    /* Curve fitting between the MLP probability and the actual probability */\n    frame_probs[0] = .01f + 1.21f*frame_probs[0]*frame_probs[0] - .23f*(float)pow(frame_probs[0], 10);\n    /* Probability of active audio (as opposed to silence) */\n    frame_probs[1] = .5f*frame_probs[1]+.5f;\n    /* Consider that silence has a 50-50 probability. */\n    frame_probs[0] = frame_probs[1]*frame_probs[0] + (1-frame_probs[1])*.5f;\n\n    /*printf(\"%f %f \", frame_probs[0], frame_probs[1]);*/\n    {\n       /* Probability of state transition */\n       float tau;\n       /* Represents independence of the MLP probabilities, where\n          beta=1 means fully independent. */\n       float beta;\n       /* Denormalized probability of speech (p0) and music (p1) after update */\n       float p0, p1;\n       /* Probabilities for \"all speech\" and \"all music\" */\n       float s0, m0;\n       /* Probability sum for renormalisation */\n       float psum;\n       /* Instantaneous probability of speech and music, with beta pre-applied. */\n       float speech0;\n       float music0;\n\n       /* One transition every 3 minutes of active audio */\n       tau = .00005f*frame_probs[1];\n       beta = .05f;\n       if (1) {\n          /* Adapt beta based on how \"unexpected\" the new prob is */\n          float p, q;\n          p = MAX16(.05f,MIN16(.95f,frame_probs[0]));\n          q = MAX16(.05f,MIN16(.95f,tonal->music_prob));\n          beta = .01f+.05f*ABS16(p-q)/(p*(1-q)+q*(1-p));\n       }\n       /* p0 and p1 are the probabilities of speech and music at this frame\n          using only information from previous frame and applying the\n          state transition model */\n       p0 = (1-tonal->music_prob)*(1-tau) +    tonal->music_prob *tau;\n       p1 =    tonal->music_prob *(1-tau) + (1-tonal->music_prob)*tau;\n       /* We apply the current probability with exponent beta to work around\n          the fact that the probability estimates aren't independent. */\n       p0 *= (float)pow(1-frame_probs[0], beta);\n       p1 *= (float)pow(frame_probs[0], beta);\n       /* Normalise the probabilities to get the Marokv probability of music. */\n       tonal->music_prob = p1/(p0+p1);\n       info->music_prob = tonal->music_prob;\n\n       /* This chunk of code deals with delayed decision. */\n       psum=1e-20f;\n       /* Instantaneous probability of speech and music, with beta pre-applied. */\n       speech0 = (float)pow(1-frame_probs[0], beta);\n       music0  = (float)pow(frame_probs[0], beta);\n       if (tonal->count==1)\n       {\n          tonal->pspeech[0]=.5;\n          tonal->pmusic [0]=.5;\n       }\n       /* Updated probability of having only speech (s0) or only music (m0),\n          before considering the new observation. */\n       s0 = tonal->pspeech[0] + tonal->pspeech[1];\n       m0 = tonal->pmusic [0] + tonal->pmusic [1];\n       /* Updates s0 and m0 with instantaneous probability. */\n       tonal->pspeech[0] = s0*(1-tau)*speech0;\n       tonal->pmusic [0] = m0*(1-tau)*music0;\n       /* Propagate the transition probabilities */\n       for (i=1;i<DETECT_SIZE-1;i++)\n       {\n          tonal->pspeech[i] = tonal->pspeech[i+1]*speech0;\n          tonal->pmusic [i] = tonal->pmusic [i+1]*music0;\n       }\n       /* Probability that the latest frame is speech, when all the previous ones were music. */\n       tonal->pspeech[DETECT_SIZE-1] = m0*tau*speech0;\n       /* Probability that the latest frame is music, when all the previous ones were speech. */\n       tonal->pmusic [DETECT_SIZE-1] = s0*tau*music0;\n\n       /* Renormalise probabilities to 1 */\n       for (i=0;i<DETECT_SIZE;i++)\n          psum += tonal->pspeech[i] + tonal->pmusic[i];\n       psum = 1.f/psum;\n       for (i=0;i<DETECT_SIZE;i++)\n       {\n          tonal->pspeech[i] *= psum;\n          tonal->pmusic [i] *= psum;\n       }\n       psum = tonal->pmusic[0];\n       for (i=1;i<DETECT_SIZE;i++)\n          psum += tonal->pspeech[i];\n\n       /* Estimate our confidence in the speech/music decisions */\n       if (frame_probs[1]>.75)\n       {\n          if (tonal->music_prob>.9)\n          {\n             float adapt;\n             adapt = 1.f/(++tonal->music_confidence_count);\n             tonal->music_confidence_count = IMIN(tonal->music_confidence_count, 500);\n             tonal->music_confidence += adapt*MAX16(-.2f,frame_probs[0]-tonal->music_confidence);\n          }\n          if (tonal->music_prob<.1)\n          {\n             float adapt;\n             adapt = 1.f/(++tonal->speech_confidence_count);\n             tonal->speech_confidence_count = IMIN(tonal->speech_confidence_count, 500);\n             tonal->speech_confidence += adapt*MIN16(.2f,frame_probs[0]-tonal->speech_confidence);\n          }\n       } else {\n          if (tonal->music_confidence_count==0)\n             tonal->music_confidence = .9f;\n          if (tonal->speech_confidence_count==0)\n             tonal->speech_confidence = .1f;\n       }\n    }\n    if (tonal->last_music != (tonal->music_prob>.5f))\n       tonal->last_transition=0;\n    tonal->last_music = tonal->music_prob>.5f;\n#else\n    info->music_prob = 0;\n#endif\n    /*for (i=0;i<25;i++)\n       printf(\"%f \", features[i]);\n    printf(\"\\n\");*/\n\n    info->bandwidth = bandwidth;\n    /*printf(\"%d %d\\n\", info->bandwidth, info->opus_bandwidth);*/\n    info->noisiness = frame_noisiness;\n    info->valid = 1;\n    if (info_out!=NULL)\n       OPUS_COPY(info_out, info, 1);\n    RESTORE_STACK;\n}\n\nvoid run_analysis(TonalityAnalysisState *analysis, const CELTMode *celt_mode, const void *analysis_pcm,\n                 int analysis_frame_size, int frame_size, int c1, int c2, int C, opus_int32 Fs,\n                 int lsb_depth, downmix_func downmix, AnalysisInfo *analysis_info)\n{\n   int offset;\n   int pcm_len;\n\n   if (analysis_pcm != NULL)\n   {\n      /* Avoid overflow/wrap-around of the analysis buffer */\n      analysis_frame_size = IMIN((DETECT_SIZE-5)*Fs/100, analysis_frame_size);\n\n      pcm_len = analysis_frame_size - analysis->analysis_offset;\n      offset = analysis->analysis_offset;\n      do {\n         tonality_analysis(analysis, NULL, celt_mode, analysis_pcm, IMIN(480, pcm_len), offset, c1, c2, C, lsb_depth, downmix);\n         offset += 480;\n         pcm_len -= 480;\n      } while (pcm_len>0);\n      analysis->analysis_offset = analysis_frame_size;\n\n      analysis->analysis_offset -= frame_size;\n   }\n\n   analysis_info->valid = 0;\n   tonality_get_info(analysis, analysis_info, frame_size);\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/analysis.h",
    "content": "/* Copyright (c) 2011 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 FOUNDATION OR\n   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef ANALYSIS_H\n#define ANALYSIS_H\n\n#include \"celt.h\"\n#include \"opus_private.h\"\n\n#define NB_FRAMES 8\n#define NB_TBANDS 18\n#define NB_TOT_BANDS 21\n#define ANALYSIS_BUF_SIZE 720 /* 15 ms at 48 kHz */\n\n#define DETECT_SIZE 200\n\ntypedef struct {\n   float angle[240];\n   float d_angle[240];\n   float d2_angle[240];\n   opus_val32 inmem[ANALYSIS_BUF_SIZE];\n   int   mem_fill;                      /* number of usable samples in the buffer */\n   float prev_band_tonality[NB_TBANDS];\n   float prev_tonality;\n   float E[NB_FRAMES][NB_TBANDS];\n   float lowE[NB_TBANDS];\n   float highE[NB_TBANDS];\n   float meanE[NB_TOT_BANDS];\n   float mem[32];\n   float cmean[8];\n   float std[9];\n   float music_prob;\n   float Etracker;\n   float lowECount;\n   int E_count;\n   int last_music;\n   int last_transition;\n   int count;\n   float subframe_mem[3];\n   int analysis_offset;\n   /** Probability of having speech for time i to DETECT_SIZE-1 (and music before).\n       pspeech[0] is the probability that all frames in the window are speech. */\n   float pspeech[DETECT_SIZE];\n   /** Probability of having music for time i to DETECT_SIZE-1 (and speech before).\n       pmusic[0] is the probability that all frames in the window are music. */\n   float pmusic[DETECT_SIZE];\n   float speech_confidence;\n   float music_confidence;\n   int speech_confidence_count;\n   int music_confidence_count;\n   int write_pos;\n   int read_pos;\n   int read_subframe;\n   AnalysisInfo info[DETECT_SIZE];\n} TonalityAnalysisState;\n\nvoid tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info,\n     const CELTMode *celt_mode, const void *x, int len, int offset, int c1, int c2, int C, int lsb_depth, downmix_func downmix);\n\nvoid tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int len);\n\nvoid run_analysis(TonalityAnalysisState *analysis, const CELTMode *celt_mode, const void *analysis_pcm,\n                 int analysis_frame_size, int frame_size, int c1, int c2, int C, opus_int32 Fs,\n                 int lsb_depth, downmix_func downmix, AnalysisInfo *analysis_info);\n\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/mlp.c",
    "content": "/* Copyright (c) 2008-2011 Octasic Inc.\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 FOUNDATION OR\n   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"opus_types.h\"\n#include \"opus_defines.h\"\n\n#include <math.h>\n#include \"mlp.h\"\n#include \"arch.h\"\n#include \"tansig_table.h\"\n#define MAX_NEURONS 100\n\n#if 0\nstatic OPUS_INLINE opus_val16 tansig_approx(opus_val32 _x) /* Q19 */\n{\n\tint i;\n\topus_val16 xx; /* Q11 */\n\t/*double x, y;*/\n\topus_val16 dy, yy; /* Q14 */\n\t/*x = 1.9073e-06*_x;*/\n\tif (_x>=QCONST32(8,19))\n\t\treturn QCONST32(1.,14);\n\tif (_x<=-QCONST32(8,19))\n\t\treturn -QCONST32(1.,14);\n\txx = EXTRACT16(SHR32(_x, 8));\n\t/*i = lrint(25*x);*/\n\ti = SHR32(ADD32(1024,MULT16_16(25, xx)),11);\n\t/*x -= .04*i;*/\n\txx -= EXTRACT16(SHR32(MULT16_16(20972,i),8));\n\t/*x = xx*(1./2048);*/\n\t/*y = tansig_table[250+i];*/\n\tyy = tansig_table[250+i];\n\t/*y = yy*(1./16384);*/\n\tdy = 16384-MULT16_16_Q14(yy,yy);\n\tyy = yy + MULT16_16_Q14(MULT16_16_Q11(xx,dy),(16384 - MULT16_16_Q11(yy,xx)));\n\treturn yy;\n}\n#else\n/*extern const float tansig_table[501];*/\nstatic OPUS_INLINE float tansig_approx(float x)\n{\n\tint i;\n\tfloat y, dy;\n\tfloat sign=1;\n\t/* Tests are reversed to catch NaNs */\n    if (!(x<8))\n        return 1;\n    if (!(x>-8))\n        return -1;\n\tif (x<0)\n\t{\n\t   x=-x;\n\t   sign=-1;\n\t}\n\ti = (int)floor(.5f+25*x);\n\tx -= .04f*i;\n\ty = tansig_table[i];\n\tdy = 1-y*y;\n\ty = y + x*dy*(1 - y*x);\n\treturn sign*y;\n}\n#endif\n\n#if 0\nvoid mlp_process(const MLP *m, const opus_val16 *in, opus_val16 *out)\n{\n\tint j;\n\topus_val16 hidden[MAX_NEURONS];\n\tconst opus_val16 *W = m->weights;\n\t/* Copy to tmp_in */\n\tfor (j=0;j<m->topo[1];j++)\n\t{\n\t\tint k;\n\t\topus_val32 sum = SHL32(EXTEND32(*W++),8);\n\t\tfor (k=0;k<m->topo[0];k++)\n\t\t\tsum = MAC16_16(sum, in[k],*W++);\n\t\thidden[j] = tansig_approx(sum);\n\t}\n\tfor (j=0;j<m->topo[2];j++)\n\t{\n\t\tint k;\n\t\topus_val32 sum = SHL32(EXTEND32(*W++),14);\n\t\tfor (k=0;k<m->topo[1];k++)\n\t\t\tsum = MAC16_16(sum, hidden[k], *W++);\n\t\tout[j] = tansig_approx(EXTRACT16(PSHR32(sum,17)));\n\t}\n}\n#else\nvoid mlp_process(const MLP *m, const float *in, float *out)\n{\n    int j;\n    float hidden[MAX_NEURONS];\n    const float *W = m->weights;\n    /* Copy to tmp_in */\n    for (j=0;j<m->topo[1];j++)\n    {\n        int k;\n        float sum = *W++;\n        for (k=0;k<m->topo[0];k++)\n            sum = sum + in[k]**W++;\n        hidden[j] = tansig_approx(sum);\n    }\n    for (j=0;j<m->topo[2];j++)\n    {\n        int k;\n        float sum = *W++;\n        for (k=0;k<m->topo[1];k++)\n            sum = sum + hidden[k]**W++;\n        out[j] = tansig_approx(sum);\n    }\n}\n#endif\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/mlp.h",
    "content": "/* Copyright (c) 2008-2011 Octasic Inc.\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 FOUNDATION OR\n   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef _MLP_H_\n#define _MLP_H_\n\n#include \"arch.h\"\n\ntypedef struct {\n\tint layers;\n\tconst int *topo;\n\tconst float *weights;\n} MLP;\n\nvoid mlp_process(const MLP *m, const float *in, float *out);\n\n#endif /* _MLP_H_ */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/mlp_data.c",
    "content": "/* The contents of this file was automatically generated by mlp_train.c\n   It contains multi-layer perceptron (MLP) weights. */\n\n#include \"mlp.h\"\n\n/* RMS error was 0.138320, seed was 1361535663 */\n\nstatic const float weights[422] = {\n\n/* hidden layer */\n-0.0941125f, -0.302976f, -0.603555f, -0.19393f, -0.185983f,\n-0.601617f, -0.0465317f, -0.114563f, -0.103599f, -0.618938f,\n-0.317859f, -0.169949f, -0.0702885f, 0.148065f, 0.409524f,\n0.548432f, 0.367649f, -0.494393f, 0.764306f, -1.83957f,\n0.170849f, 12.786f, -1.08848f, -1.27284f, -16.2606f,\n24.1773f, -5.57454f, -0.17276f, -0.163388f, -0.224421f,\n-0.0948944f, -0.0728695f, -0.26557f, -0.100283f, -0.0515459f,\n-0.146142f, -0.120674f, -0.180655f, 0.12857f, 0.442138f,\n-0.493735f, 0.167767f, 0.206699f, -0.197567f, 0.417999f,\n1.50364f, -0.773341f, -10.0401f, 0.401872f, 2.97966f,\n15.2165f, -1.88905f, -1.19254f, 0.0285397f, -0.00405139f,\n0.0707565f, 0.00825699f, -0.0927269f, -0.010393f, -0.00428882f,\n-0.00489743f, -0.0709731f, -0.00255992f, 0.0395619f, 0.226424f,\n0.0325231f, 0.162175f, -0.100118f, 0.485789f, 0.12697f,\n0.285937f, 0.0155637f, 0.10546f, 3.05558f, 1.15059f,\n-1.00904f, -1.83088f, 3.31766f, -3.42516f, -0.119135f,\n-0.0405654f, 0.00690068f, 0.0179877f, -0.0382487f, 0.00597941f,\n-0.0183611f, 0.00190395f, -0.144322f, -0.0435671f, 0.000990594f,\n0.221087f, 0.142405f, 0.484066f, 0.404395f, 0.511955f,\n-0.237255f, 0.241742f, 0.35045f, -0.699428f, 10.3993f,\n2.6507f, -2.43459f, -4.18838f, 1.05928f, 1.71067f,\n0.00667811f, -0.0721335f, -0.0397346f, 0.0362704f, -0.11496f,\n-0.0235776f, 0.0082161f, -0.0141741f, -0.0329699f, -0.0354253f,\n0.00277404f, -0.290654f, -1.14767f, -0.319157f, -0.686544f,\n0.36897f, 0.478899f, 0.182579f, -0.411069f, 0.881104f,\n-4.60683f, 1.4697f, 0.335845f, -1.81905f, -30.1699f,\n5.55225f, 0.0019508f, -0.123576f, -0.0727332f, -0.0641597f,\n-0.0534458f, -0.108166f, -0.0937368f, -0.0697883f, -0.0275475f,\n-0.192309f, -0.110074f, 0.285375f, -0.405597f, 0.0926724f,\n-0.287881f, -0.851193f, -0.099493f, -0.233764f, -1.2852f,\n1.13611f, 3.12168f, -0.0699f, -1.86216f, 2.65292f,\n-7.31036f, 2.44776f, -0.00111802f, -0.0632786f, -0.0376296f,\n-0.149851f, 0.142963f, 0.184368f, 0.123433f, 0.0756158f,\n0.117312f, 0.0933395f, 0.0692163f, 0.0842592f, 0.0704683f,\n0.0589963f, 0.0942205f, -0.448862f, 0.0262677f, 0.270352f,\n-0.262317f, 0.172586f, 2.00227f, -0.159216f, 0.038422f,\n10.2073f, 4.15536f, -2.3407f, -0.0550265f, 0.00964792f,\n-0.141336f, 0.0274501f, 0.0343921f, -0.0487428f, 0.0950172f,\n-0.00775017f, -0.0372492f, -0.00548121f, -0.0663695f, 0.0960506f,\n-0.200008f, -0.0412827f, 0.58728f, 0.0515787f, 0.337254f,\n0.855024f, 0.668371f, -0.114904f, -3.62962f, -0.467477f,\n-0.215472f, 2.61537f, 0.406117f, -1.36373f, 0.0425394f,\n0.12208f, 0.0934502f, 0.123055f, 0.0340935f, -0.142466f,\n0.035037f, -0.0490666f, 0.0733208f, 0.0576672f, 0.123984f,\n-0.0517194f, -0.253018f, 0.590565f, 0.145849f, 0.315185f,\n0.221534f, -0.149081f, 0.216161f, -0.349575f, 24.5664f,\n-0.994196f, 0.614289f, -18.7905f, -2.83277f, -0.716801f,\n-0.347201f, 0.479515f, -0.246027f, 0.0758683f, 0.137293f,\n-0.17781f, 0.118751f, -0.00108329f, -0.237334f, 0.355732f,\n-0.12991f, -0.0547627f, -0.318576f, -0.325524f, 0.180494f,\n-0.0625604f, 0.141219f, 0.344064f, 0.37658f, -0.591772f,\n5.8427f, -0.38075f, 0.221894f, -1.41934f, -1.87943e+06f,\n1.34114f, 0.0283355f, -0.0447856f, -0.0211466f, -0.0256927f,\n0.0139618f, 0.0207934f, -0.0107666f, 0.0110969f, 0.0586069f,\n-0.0253545f, -0.0328433f, 0.11872f, -0.216943f, 0.145748f,\n0.119808f, -0.0915211f, -0.120647f, -0.0787719f, -0.143644f,\n-0.595116f, -1.152f, -1.25335f, -1.17092f, 4.34023f,\n-975268.f, -1.37033f, -0.0401123f, 0.210602f, -0.136656f,\n0.135962f, -0.0523293f, 0.0444604f, 0.0143928f, 0.00412666f,\n-0.0193003f, 0.218452f, -0.110204f, -2.02563f, 0.918238f,\n-2.45362f, 1.19542f, -0.061362f, -1.92243f, 0.308111f,\n0.49764f, 0.912356f, 0.209272f, -2.34525f, 2.19326f,\n-6.47121f, 1.69771f, -0.725123f, 0.0118929f, 0.0377944f,\n0.0554003f, 0.0226452f, -0.0704421f, -0.0300309f, 0.0122978f,\n-0.0041782f, -0.0686612f, 0.0313115f, 0.039111f, 0.364111f,\n-0.0945548f, 0.0229876f, -0.17414f, 0.329795f, 0.114714f,\n0.30022f, 0.106997f, 0.132355f, 5.79932f, 0.908058f,\n-0.905324f, -3.3561f, 0.190647f, 0.184211f, -0.673648f,\n0.231807f, -0.0586222f, 0.230752f, -0.438277f, 0.245857f,\n-0.17215f, 0.0876383f, -0.720512f, 0.162515f, 0.0170571f,\n0.101781f, 0.388477f, 1.32931f, 1.08548f, -0.936301f,\n-2.36958f, -6.71988f, -3.44376f, 2.13818f, 14.2318f,\n4.91459f, -3.09052f, -9.69191f, -0.768234f, 1.79604f,\n0.0549653f, 0.163399f, 0.0797025f, 0.0343933f, -0.0555876f,\n-0.00505673f, 0.0187258f, 0.0326628f, 0.0231486f, 0.15573f,\n0.0476223f, -0.254824f, 1.60155f, -0.801221f, 2.55496f,\n0.737629f, -1.36249f, -0.695463f, -2.44301f, -1.73188f,\n3.95279f, 1.89068f, 0.486087f, -11.3343f, 3.9416e+06f,\n\n/* output layer */\n-0.381439f, 0.12115f, -0.906927f, 2.93878f, 1.6388f,\n0.882811f, 0.874344f, 1.21726f, -0.874545f, 0.321706f,\n0.785055f, 0.946558f, -0.575066f, -3.46553f, 0.884905f,\n0.0924047f, -9.90712f, 0.391338f, 0.160103f, -2.04954f,\n4.1455f, 0.0684029f, -0.144761f, -0.285282f, 0.379244f,\n-1.1584f, -0.0277241f, -9.85f, -4.82386f, 3.71333f,\n3.87308f, 3.52558f};\n\nstatic const int topo[3] = {25, 15, 2};\n\nconst MLP net = {\n    3,\n    topo,\n    weights\n};\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/opus.c",
    "content": "/* Copyright (c) 2011 Xiph.Org Foundation, Skype Limited\n   Written by Jean-Marc Valin and Koen Vos */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"opus.h\"\n#include \"opus_private.h\"\n\n#ifndef DISABLE_FLOAT_API\nOPUS_EXPORT void opus_pcm_soft_clip(float *_x, int N, int C, float *declip_mem)\n{\n   int c;\n   int i;\n   float *x;\n\n   if (C<1 || N<1 || !_x || !declip_mem) return;\n\n   /* First thing: saturate everything to +/- 2 which is the highest level our\n      non-linearity can handle. At the point where the signal reaches +/-2,\n      the derivative will be zero anyway, so this doesn't introduce any\n      discontinuity in the derivative. */\n   for (i=0;i<N*C;i++)\n      _x[i] = MAX16(-2.f, MIN16(2.f, _x[i]));\n   for (c=0;c<C;c++)\n   {\n      float a;\n      float x0;\n      int curr;\n\n      x = _x+c;\n      a = declip_mem[c];\n      /* Continue applying the non-linearity from the previous frame to avoid\n         any discontinuity. */\n      for (i=0;i<N;i++)\n      {\n         if (x[i*C]*a>=0)\n            break;\n         x[i*C] = x[i*C]+a*x[i*C]*x[i*C];\n      }\n\n      curr=0;\n      x0 = x[0];\n      while(1)\n      {\n         int start, end;\n         float maxval;\n         int special=0;\n         int peak_pos;\n         for (i=curr;i<N;i++)\n         {\n            if (x[i*C]>1 || x[i*C]<-1)\n               break;\n         }\n         if (i==N)\n         {\n            a=0;\n            break;\n         }\n         peak_pos = i;\n         start=end=i;\n         maxval=ABS16(x[i*C]);\n         /* Look for first zero crossing before clipping */\n         while (start>0 && x[i*C]*x[(start-1)*C]>=0)\n            start--;\n         /* Look for first zero crossing after clipping */\n         while (end<N && x[i*C]*x[end*C]>=0)\n         {\n            /* Look for other peaks until the next zero-crossing. */\n            if (ABS16(x[end*C])>maxval)\n            {\n               maxval = ABS16(x[end*C]);\n               peak_pos = end;\n            }\n            end++;\n         }\n         /* Detect the special case where we clip before the first zero crossing */\n         special = (start==0 && x[i*C]*x[0]>=0);\n\n         /* Compute a such that maxval + a*maxval^2 = 1 */\n         a=(maxval-1)/(maxval*maxval);\n         if (x[i*C]>0)\n            a = -a;\n         /* Apply soft clipping */\n         for (i=start;i<end;i++)\n            x[i*C] = x[i*C]+a*x[i*C]*x[i*C];\n\n         if (special && peak_pos>=2)\n         {\n            /* Add a linear ramp from the first sample to the signal peak.\n               This avoids a discontinuity at the beginning of the frame. */\n            float delta;\n            float offset = x0-x[0];\n            delta = offset / peak_pos;\n            for (i=curr;i<peak_pos;i++)\n            {\n               offset -= delta;\n               x[i*C] += offset;\n               x[i*C] = MAX16(-1.f, MIN16(1.f, x[i*C]));\n            }\n         }\n         curr = end;\n         if (curr==N)\n            break;\n      }\n      declip_mem[c] = a;\n   }\n}\n#endif\n\nint encode_size(int size, unsigned char *data)\n{\n   if (size < 252)\n   {\n      data[0] = size;\n      return 1;\n   } else {\n      data[0] = 252+(size&0x3);\n      data[1] = (size-(int)data[0])>>2;\n      return 2;\n   }\n}\n\nstatic int parse_size(const unsigned char *data, opus_int32 len, opus_int16 *size)\n{\n   if (len<1)\n   {\n      *size = -1;\n      return -1;\n   } else if (data[0]<252)\n   {\n      *size = data[0];\n      return 1;\n   } else if (len<2)\n   {\n      *size = -1;\n      return -1;\n   } else {\n      *size = 4*data[1] + data[0];\n      return 2;\n   }\n}\n\nint opus_packet_parse_impl(const unsigned char *data, opus_int32 len,\n      int self_delimited, unsigned char *out_toc,\n      const unsigned char *frames[48], opus_int16 size[48],\n      int *payload_offset, opus_int32 *packet_offset)\n{\n   int i, bytes;\n   int count;\n   int cbr;\n   unsigned char ch, toc;\n   int framesize;\n   opus_int32 last_size;\n   opus_int32 pad = 0;\n   const unsigned char *data0 = data;\n\n   if (size==NULL)\n      return OPUS_BAD_ARG;\n\n   framesize = opus_packet_get_samples_per_frame(data, 48000);\n\n   cbr = 0;\n   toc = *data++;\n   len--;\n   last_size = len;\n   switch (toc&0x3)\n   {\n   /* One frame */\n   case 0:\n      count=1;\n      break;\n   /* Two CBR frames */\n   case 1:\n      count=2;\n      cbr = 1;\n      if (!self_delimited)\n      {\n         if (len&0x1)\n            return OPUS_INVALID_PACKET;\n         last_size = len/2;\n         /* If last_size doesn't fit in size[0], we'll catch it later */\n         size[0] = (opus_int16)last_size;\n      }\n      break;\n   /* Two VBR frames */\n   case 2:\n      count = 2;\n      bytes = parse_size(data, len, size);\n      len -= bytes;\n      if (size[0]<0 || size[0] > len)\n         return OPUS_INVALID_PACKET;\n      data += bytes;\n      last_size = len-size[0];\n      break;\n   /* Multiple CBR/VBR frames (from 0 to 120 ms) */\n   default: /*case 3:*/\n      if (len<1)\n         return OPUS_INVALID_PACKET;\n      /* Number of frames encoded in bits 0 to 5 */\n      ch = *data++;\n      count = ch&0x3F;\n      if (count <= 0 || framesize*count > 5760)\n         return OPUS_INVALID_PACKET;\n      len--;\n      /* Padding flag is bit 6 */\n      if (ch&0x40)\n      {\n         int p;\n         do {\n            int tmp;\n            if (len<=0)\n               return OPUS_INVALID_PACKET;\n            p = *data++;\n            len--;\n            tmp = p==255 ? 254: p;\n            len -= tmp;\n            pad += tmp;\n         } while (p==255);\n      }\n      if (len<0)\n         return OPUS_INVALID_PACKET;\n      /* VBR flag is bit 7 */\n      cbr = !(ch&0x80);\n      if (!cbr)\n      {\n         /* VBR case */\n         last_size = len;\n         for (i=0;i<count-1;i++)\n         {\n            bytes = parse_size(data, len, size+i);\n            len -= bytes;\n            if (size[i]<0 || size[i] > len)\n               return OPUS_INVALID_PACKET;\n            data += bytes;\n            last_size -= bytes+size[i];\n         }\n         if (last_size<0)\n            return OPUS_INVALID_PACKET;\n      } else if (!self_delimited)\n      {\n         /* CBR case */\n         last_size = len/count;\n         if (last_size*count!=len)\n            return OPUS_INVALID_PACKET;\n         for (i=0;i<count-1;i++)\n            size[i] = (opus_int16)last_size;\n      }\n      break;\n   }\n   /* Self-delimited framing has an extra size for the last frame. */\n   if (self_delimited)\n   {\n      bytes = parse_size(data, len, size+count-1);\n      len -= bytes;\n      if (size[count-1]<0 || size[count-1] > len)\n         return OPUS_INVALID_PACKET;\n      data += bytes;\n      /* For CBR packets, apply the size to all the frames. */\n      if (cbr)\n      {\n         if (size[count-1]*count > len)\n            return OPUS_INVALID_PACKET;\n         for (i=0;i<count-1;i++)\n            size[i] = size[count-1];\n      } else if (bytes+size[count-1] > last_size)\n         return OPUS_INVALID_PACKET;\n   } else\n   {\n      /* Because it's not encoded explicitly, it's possible the size of the\n         last packet (or all the packets, for the CBR case) is larger than\n         1275. Reject them here.*/\n      if (last_size > 1275)\n         return OPUS_INVALID_PACKET;\n      size[count-1] = (opus_int16)last_size;\n   }\n\n   if (payload_offset)\n      *payload_offset = (int)(data-data0);\n\n   for (i=0;i<count;i++)\n   {\n      if (frames)\n         frames[i] = data;\n      data += size[i];\n   }\n\n   if (packet_offset)\n      *packet_offset = pad+(opus_int32)(data-data0);\n\n   if (out_toc)\n      *out_toc = toc;\n\n   return count;\n}\n\nint opus_packet_parse(const unsigned char *data, opus_int32 len,\n      unsigned char *out_toc, const unsigned char *frames[48],\n      opus_int16 size[48], int *payload_offset)\n{\n   return opus_packet_parse_impl(data, len, 0, out_toc,\n                                 frames, size, payload_offset, NULL);\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/opus_decoder.c",
    "content": "/* Copyright (c) 2010 Xiph.Org Foundation, Skype Limited\n   Written by Jean-Marc Valin and Koen Vos */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n# include \"config.h\"\n#endif\n\n#ifndef OPUS_BUILD\n# error \"OPUS_BUILD _MUST_ be defined to build Opus. This probably means you need other defines as well, as in a config.h. See the included build files for details.\"\n#endif\n\n#if defined(__GNUC__) && (__GNUC__ >= 2) && !defined(__OPTIMIZE__)\n# pragma message \"You appear to be compiling without optimization, if so opus will be very slow.\"\n#endif\n\n#include <stdarg.h>\n#include \"celt.h\"\n#include \"opus.h\"\n#include \"entdec.h\"\n#include \"modes.h\"\n#include \"API.h\"\n#include \"stack_alloc.h\"\n#include \"float_cast.h\"\n#include \"opus_private.h\"\n#include \"os_support.h\"\n#include \"structs.h\"\n#include \"define.h\"\n#include \"mathops.h\"\n#include \"cpu_support.h\"\n\nstruct OpusDecoder {\n   int          celt_dec_offset;\n   int          silk_dec_offset;\n   int          channels;\n   opus_int32   Fs;          /** Sampling rate (at the API level) */\n   silk_DecControlStruct DecControl;\n   int          decode_gain;\n\n   /* Everything beyond this point gets cleared on a reset */\n#define OPUS_DECODER_RESET_START stream_channels\n   int          stream_channels;\n\n   int          bandwidth;\n   int          mode;\n   int          prev_mode;\n   int          frame_size;\n   int          prev_redundancy;\n   int          last_packet_duration;\n#ifndef FIXED_POINT\n   opus_val16   softclip_mem[2];\n#endif\n\n   opus_uint32  rangeFinal;\n};\n\n#ifdef FIXED_POINT\nstatic OPUS_INLINE opus_int16 SAT16(opus_int32 x) {\n   return x > 32767 ? 32767 : x < -32768 ? -32768 : (opus_int16)x;\n}\n#endif\n\n\nint opus_decoder_get_size(int channels)\n{\n   int silkDecSizeBytes, celtDecSizeBytes;\n   int ret;\n   if (channels<1 || channels > 2)\n      return 0;\n   ret = silk_Get_Decoder_Size( &silkDecSizeBytes );\n   if(ret)\n      return 0;\n   silkDecSizeBytes = align(silkDecSizeBytes);\n   celtDecSizeBytes = celt_decoder_get_size(channels);\n   return align(sizeof(OpusDecoder))+silkDecSizeBytes+celtDecSizeBytes;\n}\n\nint opus_decoder_init(OpusDecoder *st, opus_int32 Fs, int channels)\n{\n   void *silk_dec;\n   CELTDecoder *celt_dec;\n   int ret, silkDecSizeBytes;\n\n   if ((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)\n    || (channels!=1&&channels!=2))\n      return OPUS_BAD_ARG;\n\n   OPUS_CLEAR((char*)st, opus_decoder_get_size(channels));\n   /* Initialize SILK encoder */\n   ret = silk_Get_Decoder_Size(&silkDecSizeBytes);\n   if (ret)\n      return OPUS_INTERNAL_ERROR;\n\n   silkDecSizeBytes = align(silkDecSizeBytes);\n   st->silk_dec_offset = align(sizeof(OpusDecoder));\n   st->celt_dec_offset = st->silk_dec_offset+silkDecSizeBytes;\n   silk_dec = (char*)st+st->silk_dec_offset;\n   celt_dec = (CELTDecoder*)((char*)st+st->celt_dec_offset);\n   st->stream_channels = st->channels = channels;\n\n   st->Fs = Fs;\n   st->DecControl.API_sampleRate = st->Fs;\n   st->DecControl.nChannelsAPI      = st->channels;\n\n   /* Reset decoder */\n   ret = silk_InitDecoder( silk_dec );\n   if(ret)return OPUS_INTERNAL_ERROR;\n\n   /* Initialize CELT decoder */\n   ret = celt_decoder_init(celt_dec, Fs, channels);\n   if(ret!=OPUS_OK)return OPUS_INTERNAL_ERROR;\n\n   celt_decoder_ctl(celt_dec, CELT_SET_SIGNALLING(0));\n\n   st->prev_mode = 0;\n   st->frame_size = Fs/400;\n   return OPUS_OK;\n}\n\nOpusDecoder *opus_decoder_create(opus_int32 Fs, int channels, int *error)\n{\n   int ret;\n   OpusDecoder *st;\n   if ((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)\n    || (channels!=1&&channels!=2))\n   {\n      if (error)\n         *error = OPUS_BAD_ARG;\n      return NULL;\n   }\n   st = (OpusDecoder *)opus_alloc(opus_decoder_get_size(channels));\n   if (st == NULL)\n   {\n      if (error)\n         *error = OPUS_ALLOC_FAIL;\n      return NULL;\n   }\n   ret = opus_decoder_init(st, Fs, channels);\n   if (error)\n      *error = ret;\n   if (ret != OPUS_OK)\n   {\n      opus_free(st);\n      st = NULL;\n   }\n   return st;\n}\n\nstatic void smooth_fade(const opus_val16 *in1, const opus_val16 *in2,\n      opus_val16 *out, int overlap, int channels,\n      const opus_val16 *window, opus_int32 Fs)\n{\n   int i, c;\n   int inc = 48000/Fs;\n   for (c=0;c<channels;c++)\n   {\n      for (i=0;i<overlap;i++)\n      {\n         opus_val16 w = MULT16_16_Q15(window[i*inc], window[i*inc]);\n         out[i*channels+c] = SHR32(MAC16_16(MULT16_16(w,in2[i*channels+c]),\n                                   Q15ONE-w, in1[i*channels+c]), 15);\n      }\n   }\n}\n\nstatic int opus_packet_get_mode(const unsigned char *data)\n{\n   int mode;\n   if (data[0]&0x80)\n   {\n      mode = MODE_CELT_ONLY;\n   } else if ((data[0]&0x60) == 0x60)\n   {\n      mode = MODE_HYBRID;\n   } else {\n      mode = MODE_SILK_ONLY;\n   }\n   return mode;\n}\n\nstatic int opus_decode_frame(OpusDecoder *st, const unsigned char *data,\n      opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec)\n{\n   void *silk_dec;\n   CELTDecoder *celt_dec;\n   int i, silk_ret=0, celt_ret=0;\n   ec_dec dec;\n   opus_int32 silk_frame_size;\n   int pcm_silk_size;\n   VARDECL(opus_int16, pcm_silk);\n   int pcm_transition_silk_size;\n   VARDECL(opus_val16, pcm_transition_silk);\n   int pcm_transition_celt_size;\n   VARDECL(opus_val16, pcm_transition_celt);\n   opus_val16 *pcm_transition = NULL;\n   int redundant_audio_size;\n   VARDECL(opus_val16, redundant_audio);\n\n   int audiosize;\n   int mode;\n   int transition=0;\n   int start_band;\n   int redundancy=0;\n   int redundancy_bytes = 0;\n   int celt_to_silk=0;\n   int c;\n   int F2_5, F5, F10, F20;\n   const opus_val16 *window;\n   opus_uint32 redundant_rng = 0;\n   ALLOC_STACK;\n\n   silk_dec = (char*)st+st->silk_dec_offset;\n   celt_dec = (CELTDecoder*)((char*)st+st->celt_dec_offset);\n   F20 = st->Fs/50;\n   F10 = F20>>1;\n   F5 = F10>>1;\n   F2_5 = F5>>1;\n   if (frame_size < F2_5)\n   {\n      RESTORE_STACK;\n      return OPUS_BUFFER_TOO_SMALL;\n   }\n   /* Limit frame_size to avoid excessive stack allocations. */\n   frame_size = IMIN(frame_size, st->Fs/25*3);\n   /* Payloads of 1 (2 including ToC) or 0 trigger the PLC/DTX */\n   if (len<=1)\n   {\n      data = NULL;\n      /* In that case, don't conceal more than what the ToC says */\n      frame_size = IMIN(frame_size, st->frame_size);\n   }\n   if (data != NULL)\n   {\n      audiosize = st->frame_size;\n      mode = st->mode;\n      ec_dec_init(&dec,(unsigned char*)data,len);\n   } else {\n      audiosize = frame_size;\n      mode = st->prev_mode;\n\n      if (mode == 0)\n      {\n         /* If we haven't got any packet yet, all we can do is return zeros */\n         for (i=0;i<audiosize*st->channels;i++)\n            pcm[i] = 0;\n         RESTORE_STACK;\n         return audiosize;\n      }\n\n      /* Avoids trying to run the PLC on sizes other than 2.5 (CELT), 5 (CELT),\n         10, or 20 (e.g. 12.5 or 30 ms). */\n      if (audiosize > F20)\n      {\n         do {\n            int ret = opus_decode_frame(st, NULL, 0, pcm, IMIN(audiosize, F20), 0);\n            if (ret<0)\n            {\n               RESTORE_STACK;\n               return ret;\n            }\n            pcm += ret*st->channels;\n            audiosize -= ret;\n         } while (audiosize > 0);\n         RESTORE_STACK;\n         return frame_size;\n      } else if (audiosize < F20)\n      {\n         if (audiosize > F10)\n            audiosize = F10;\n         else if (mode != MODE_SILK_ONLY && audiosize > F5 && audiosize < F10)\n            audiosize = F5;\n      }\n   }\n\n   pcm_transition_silk_size = ALLOC_NONE;\n   pcm_transition_celt_size = ALLOC_NONE;\n   if (data!=NULL && st->prev_mode > 0 && (\n       (mode == MODE_CELT_ONLY && st->prev_mode != MODE_CELT_ONLY && !st->prev_redundancy)\n    || (mode != MODE_CELT_ONLY && st->prev_mode == MODE_CELT_ONLY) )\n      )\n   {\n      transition = 1;\n      /* Decide where to allocate the stack memory for pcm_transition */\n      if (mode == MODE_CELT_ONLY)\n         pcm_transition_celt_size = F5*st->channels;\n      else\n         pcm_transition_silk_size = F5*st->channels;\n   }\n   ALLOC(pcm_transition_celt, pcm_transition_celt_size, opus_val16);\n   if (transition && mode == MODE_CELT_ONLY)\n   {\n      pcm_transition = pcm_transition_celt;\n      opus_decode_frame(st, NULL, 0, pcm_transition, IMIN(F5, audiosize), 0);\n   }\n   if (audiosize > frame_size)\n   {\n      /*fprintf(stderr, \"PCM buffer too small: %d vs %d (mode = %d)\\n\", audiosize, frame_size, mode);*/\n      RESTORE_STACK;\n      return OPUS_BAD_ARG;\n   } else {\n      frame_size = audiosize;\n   }\n\n   /* Don't allocate any memory when in CELT-only mode */\n   pcm_silk_size = (mode != MODE_CELT_ONLY) ? IMAX(F10, frame_size)*st->channels : ALLOC_NONE;\n   ALLOC(pcm_silk, pcm_silk_size, opus_int16);\n\n   /* SILK processing */\n   if (mode != MODE_CELT_ONLY)\n   {\n      int lost_flag, decoded_samples;\n      opus_int16 *pcm_ptr = pcm_silk;\n\n      if (st->prev_mode==MODE_CELT_ONLY)\n         silk_InitDecoder( silk_dec );\n\n      /* The SILK PLC cannot produce frames of less than 10 ms */\n      st->DecControl.payloadSize_ms = IMAX(10, 1000 * audiosize / st->Fs);\n\n      if (data != NULL)\n      {\n        st->DecControl.nChannelsInternal = st->stream_channels;\n        if( mode == MODE_SILK_ONLY ) {\n           if( st->bandwidth == OPUS_BANDWIDTH_NARROWBAND ) {\n              st->DecControl.internalSampleRate = 8000;\n           } else if( st->bandwidth == OPUS_BANDWIDTH_MEDIUMBAND ) {\n              st->DecControl.internalSampleRate = 12000;\n           } else if( st->bandwidth == OPUS_BANDWIDTH_WIDEBAND ) {\n              st->DecControl.internalSampleRate = 16000;\n           } else {\n              st->DecControl.internalSampleRate = 16000;\n              silk_assert( 0 );\n           }\n        } else {\n           /* Hybrid mode */\n           st->DecControl.internalSampleRate = 16000;\n        }\n     }\n\n     lost_flag = data == NULL ? 1 : 2 * decode_fec;\n     decoded_samples = 0;\n     do {\n        /* Call SILK decoder */\n        int first_frame = decoded_samples == 0;\n        silk_ret = silk_Decode( silk_dec, &st->DecControl,\n                                lost_flag, first_frame, &dec, pcm_ptr, &silk_frame_size );\n        if( silk_ret ) {\n           if (lost_flag) {\n              /* PLC failure should not be fatal */\n              silk_frame_size = frame_size;\n              for (i=0;i<frame_size*st->channels;i++)\n                 pcm_ptr[i] = 0;\n           } else {\n             RESTORE_STACK;\n             return OPUS_INTERNAL_ERROR;\n           }\n        }\n        pcm_ptr += silk_frame_size * st->channels;\n        decoded_samples += silk_frame_size;\n      } while( decoded_samples < frame_size );\n   }\n\n   start_band = 0;\n   if (!decode_fec && mode != MODE_CELT_ONLY && data != NULL\n    && ec_tell(&dec)+17+20*(st->mode == MODE_HYBRID) <= 8*len)\n   {\n      /* Check if we have a redundant 0-8 kHz band */\n      if (mode == MODE_HYBRID)\n         redundancy = ec_dec_bit_logp(&dec, 12);\n      else\n         redundancy = 1;\n      if (redundancy)\n      {\n         celt_to_silk = ec_dec_bit_logp(&dec, 1);\n         /* redundancy_bytes will be at least two, in the non-hybrid\n            case due to the ec_tell() check above */\n         redundancy_bytes = mode==MODE_HYBRID ?\n               (opus_int32)ec_dec_uint(&dec, 256)+2 :\n               len-((ec_tell(&dec)+7)>>3);\n         len -= redundancy_bytes;\n         /* This is a sanity check. It should never happen for a valid\n            packet, so the exact behaviour is not normative. */\n         if (len*8 < ec_tell(&dec))\n         {\n            len = 0;\n            redundancy_bytes = 0;\n            redundancy = 0;\n         }\n         /* Shrink decoder because of raw bits */\n         dec.storage -= redundancy_bytes;\n      }\n   }\n   if (mode != MODE_CELT_ONLY)\n      start_band = 17;\n\n   {\n      int endband=21;\n\n      switch(st->bandwidth)\n      {\n      case OPUS_BANDWIDTH_NARROWBAND:\n         endband = 13;\n         break;\n      case OPUS_BANDWIDTH_MEDIUMBAND:\n      case OPUS_BANDWIDTH_WIDEBAND:\n         endband = 17;\n         break;\n      case OPUS_BANDWIDTH_SUPERWIDEBAND:\n         endband = 19;\n         break;\n      case OPUS_BANDWIDTH_FULLBAND:\n         endband = 21;\n         break;\n      }\n      celt_decoder_ctl(celt_dec, CELT_SET_END_BAND(endband));\n      celt_decoder_ctl(celt_dec, CELT_SET_CHANNELS(st->stream_channels));\n   }\n\n   if (redundancy)\n   {\n      transition = 0;\n      pcm_transition_silk_size=ALLOC_NONE;\n   }\n\n   ALLOC(pcm_transition_silk, pcm_transition_silk_size, opus_val16);\n\n   if (transition && mode != MODE_CELT_ONLY)\n   {\n      pcm_transition = pcm_transition_silk;\n      opus_decode_frame(st, NULL, 0, pcm_transition, IMIN(F5, audiosize), 0);\n   }\n\n   /* Only allocation memory for redundancy if/when needed */\n   redundant_audio_size = redundancy ? F5*st->channels : ALLOC_NONE;\n   ALLOC(redundant_audio, redundant_audio_size, opus_val16);\n\n   /* 5 ms redundant frame for CELT->SILK*/\n   if (redundancy && celt_to_silk)\n   {\n      celt_decoder_ctl(celt_dec, CELT_SET_START_BAND(0));\n      celt_decode_with_ec(celt_dec, data+len, redundancy_bytes,\n                          redundant_audio, F5, NULL);\n      celt_decoder_ctl(celt_dec, OPUS_GET_FINAL_RANGE(&redundant_rng));\n   }\n\n   /* MUST be after PLC */\n   celt_decoder_ctl(celt_dec, CELT_SET_START_BAND(start_band));\n\n   if (mode != MODE_SILK_ONLY)\n   {\n      int celt_frame_size = IMIN(F20, frame_size);\n      /* Make sure to discard any previous CELT state */\n      if (mode != st->prev_mode && st->prev_mode > 0 && !st->prev_redundancy)\n         celt_decoder_ctl(celt_dec, OPUS_RESET_STATE);\n      /* Decode CELT */\n      celt_ret = celt_decode_with_ec(celt_dec, decode_fec ? NULL : data,\n                                     len, pcm, celt_frame_size, &dec);\n   } else {\n      unsigned char silence[2] = {0xFF, 0xFF};\n      for (i=0;i<frame_size*st->channels;i++)\n         pcm[i] = 0;\n      /* For hybrid -> SILK transitions, we let the CELT MDCT\n         do a fade-out by decoding a silence frame */\n      if (st->prev_mode == MODE_HYBRID && !(redundancy && celt_to_silk && st->prev_redundancy) )\n      {\n         celt_decoder_ctl(celt_dec, CELT_SET_START_BAND(0));\n         celt_decode_with_ec(celt_dec, silence, 2, pcm, F2_5, NULL);\n      }\n   }\n\n   if (mode != MODE_CELT_ONLY)\n   {\n#ifdef FIXED_POINT\n      for (i=0;i<frame_size*st->channels;i++)\n         pcm[i] = SAT16(pcm[i] + pcm_silk[i]);\n#else\n      for (i=0;i<frame_size*st->channels;i++)\n         pcm[i] = pcm[i] + (opus_val16)((1.f/32768.f)*pcm_silk[i]);\n#endif\n   }\n\n   {\n      const CELTMode *celt_mode;\n      celt_decoder_ctl(celt_dec, CELT_GET_MODE(&celt_mode));\n      window = celt_mode->window;\n   }\n\n   /* 5 ms redundant frame for SILK->CELT */\n   if (redundancy && !celt_to_silk)\n   {\n      celt_decoder_ctl(celt_dec, OPUS_RESET_STATE);\n      celt_decoder_ctl(celt_dec, CELT_SET_START_BAND(0));\n\n      celt_decode_with_ec(celt_dec, data+len, redundancy_bytes, redundant_audio, F5, NULL);\n      celt_decoder_ctl(celt_dec, OPUS_GET_FINAL_RANGE(&redundant_rng));\n      smooth_fade(pcm+st->channels*(frame_size-F2_5), redundant_audio+st->channels*F2_5,\n                  pcm+st->channels*(frame_size-F2_5), F2_5, st->channels, window, st->Fs);\n   }\n   if (redundancy && celt_to_silk)\n   {\n      for (c=0;c<st->channels;c++)\n      {\n         for (i=0;i<F2_5;i++)\n            pcm[st->channels*i+c] = redundant_audio[st->channels*i+c];\n      }\n      smooth_fade(redundant_audio+st->channels*F2_5, pcm+st->channels*F2_5,\n                  pcm+st->channels*F2_5, F2_5, st->channels, window, st->Fs);\n   }\n   if (transition)\n   {\n      if (audiosize >= F5)\n      {\n         for (i=0;i<st->channels*F2_5;i++)\n            pcm[i] = pcm_transition[i];\n         smooth_fade(pcm_transition+st->channels*F2_5, pcm+st->channels*F2_5,\n                     pcm+st->channels*F2_5, F2_5,\n                     st->channels, window, st->Fs);\n      } else {\n         /* Not enough time to do a clean transition, but we do it anyway\n            This will not preserve amplitude perfectly and may introduce\n            a bit of temporal aliasing, but it shouldn't be too bad and\n            that's pretty much the best we can do. In any case, generating this\n            transition it pretty silly in the first place */\n         smooth_fade(pcm_transition, pcm,\n                     pcm, F2_5,\n                     st->channels, window, st->Fs);\n      }\n   }\n\n   if(st->decode_gain)\n   {\n      opus_val32 gain;\n      gain = celt_exp2(MULT16_16_P15(QCONST16(6.48814081e-4f, 25), st->decode_gain));\n      for (i=0;i<frame_size*st->channels;i++)\n      {\n         opus_val32 x;\n         x = MULT16_32_P16(pcm[i],gain);\n         pcm[i] = SATURATE(x, 32767);\n      }\n   }\n\n   if (len <= 1)\n      st->rangeFinal = 0;\n   else\n      st->rangeFinal = dec.rng ^ redundant_rng;\n\n   st->prev_mode = mode;\n   st->prev_redundancy = redundancy && !celt_to_silk;\n\n   if (celt_ret>=0)\n   {\n      if (OPUS_CHECK_ARRAY(pcm, audiosize*st->channels))\n         OPUS_PRINT_INT(audiosize);\n   }\n\n   RESTORE_STACK;\n   return celt_ret < 0 ? celt_ret : audiosize;\n\n}\n\nint opus_decode_native(OpusDecoder *st, const unsigned char *data,\n      opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec,\n      int self_delimited, opus_int32 *packet_offset, int soft_clip)\n{\n   int i, nb_samples;\n   int count, offset;\n   unsigned char toc;\n   int packet_frame_size, packet_bandwidth, packet_mode, packet_stream_channels;\n   /* 48 x 2.5 ms = 120 ms */\n   opus_int16 size[48];\n   if (decode_fec<0 || decode_fec>1)\n      return OPUS_BAD_ARG;\n   /* For FEC/PLC, frame_size has to be to have a multiple of 2.5 ms */\n   if ((decode_fec || len==0 || data==NULL) && frame_size%(st->Fs/400)!=0)\n      return OPUS_BAD_ARG;\n   if (len==0 || data==NULL)\n   {\n      int pcm_count=0;\n      do {\n         int ret;\n         ret = opus_decode_frame(st, NULL, 0, pcm+pcm_count*st->channels, frame_size-pcm_count, 0);\n         if (ret<0)\n            return ret;\n         pcm_count += ret;\n      } while (pcm_count < frame_size);\n      celt_assert(pcm_count == frame_size);\n      if (OPUS_CHECK_ARRAY(pcm, pcm_count*st->channels))\n         OPUS_PRINT_INT(pcm_count);\n      st->last_packet_duration = pcm_count;\n      return pcm_count;\n   } else if (len<0)\n      return OPUS_BAD_ARG;\n\n   packet_mode = opus_packet_get_mode(data);\n   packet_bandwidth = opus_packet_get_bandwidth(data);\n   packet_frame_size = opus_packet_get_samples_per_frame(data, st->Fs);\n   packet_stream_channels = opus_packet_get_nb_channels(data);\n\n   count = opus_packet_parse_impl(data, len, self_delimited, &toc, NULL,\n                                  size, &offset, packet_offset);\n   if (count<0)\n      return count;\n\n   data += offset;\n\n   if (decode_fec)\n   {\n      int duration_copy;\n      int ret;\n      /* If no FEC can be present, run the PLC (recursive call) */\n      if (frame_size < packet_frame_size || packet_mode == MODE_CELT_ONLY || st->mode == MODE_CELT_ONLY)\n         return opus_decode_native(st, NULL, 0, pcm, frame_size, 0, 0, NULL, soft_clip);\n      /* Otherwise, run the PLC on everything except the size for which we might have FEC */\n      duration_copy = st->last_packet_duration;\n      if (frame_size-packet_frame_size!=0)\n      {\n         ret = opus_decode_native(st, NULL, 0, pcm, frame_size-packet_frame_size, 0, 0, NULL, soft_clip);\n         if (ret<0)\n         {\n            st->last_packet_duration = duration_copy;\n            return ret;\n         }\n         celt_assert(ret==frame_size-packet_frame_size);\n      }\n      /* Complete with FEC */\n      st->mode = packet_mode;\n      st->bandwidth = packet_bandwidth;\n      st->frame_size = packet_frame_size;\n      st->stream_channels = packet_stream_channels;\n      ret = opus_decode_frame(st, data, size[0], pcm+st->channels*(frame_size-packet_frame_size),\n            packet_frame_size, 1);\n      if (ret<0)\n         return ret;\n      else {\n         if (OPUS_CHECK_ARRAY(pcm, frame_size*st->channels))\n            OPUS_PRINT_INT(frame_size);\n         st->last_packet_duration = frame_size;\n         return frame_size;\n      }\n   }\n\n   if (count*packet_frame_size > frame_size)\n      return OPUS_BUFFER_TOO_SMALL;\n\n   /* Update the state as the last step to avoid updating it on an invalid packet */\n   st->mode = packet_mode;\n   st->bandwidth = packet_bandwidth;\n   st->frame_size = packet_frame_size;\n   st->stream_channels = packet_stream_channels;\n\n   nb_samples=0;\n   for (i=0;i<count;i++)\n   {\n      int ret;\n      ret = opus_decode_frame(st, data, size[i], pcm+nb_samples*st->channels, frame_size-nb_samples, 0);\n      if (ret<0)\n         return ret;\n      celt_assert(ret==packet_frame_size);\n      data += size[i];\n      nb_samples += ret;\n   }\n   st->last_packet_duration = nb_samples;\n   if (OPUS_CHECK_ARRAY(pcm, nb_samples*st->channels))\n      OPUS_PRINT_INT(nb_samples);\n#ifndef FIXED_POINT\n   if (soft_clip)\n      opus_pcm_soft_clip(pcm, nb_samples, st->channels, st->softclip_mem);\n   else\n      st->softclip_mem[0]=st->softclip_mem[1]=0;\n#endif\n   return nb_samples;\n}\n\n#ifdef FIXED_POINT\n\nint opus_decode(OpusDecoder *st, const unsigned char *data,\n      opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec)\n{\n   if(frame_size<=0)\n      return OPUS_BAD_ARG;\n   return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL, 0);\n}\n\n#ifndef DISABLE_FLOAT_API\nint opus_decode_float(OpusDecoder *st, const unsigned char *data,\n      opus_int32 len, float *pcm, int frame_size, int decode_fec)\n{\n   VARDECL(opus_int16, out);\n   int ret, i;\n   ALLOC_STACK;\n\n   if(frame_size<=0)\n   {\n      RESTORE_STACK;\n      return OPUS_BAD_ARG;\n   }\n   ALLOC(out, frame_size*st->channels, opus_int16);\n\n   ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL, 0);\n   if (ret > 0)\n   {\n      for (i=0;i<ret*st->channels;i++)\n         pcm[i] = (1.f/32768.f)*(out[i]);\n   }\n   RESTORE_STACK;\n   return ret;\n}\n#endif\n\n\n#else\nint opus_decode(OpusDecoder *st, const unsigned char *data,\n      opus_int32 len, opus_int16 *pcm, int frame_size, int decode_fec)\n{\n   VARDECL(float, out);\n   int ret, i;\n   ALLOC_STACK;\n\n   if(frame_size<=0)\n   {\n      RESTORE_STACK;\n      return OPUS_BAD_ARG;\n   }\n\n   ALLOC(out, frame_size*st->channels, float);\n\n   ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL, 1);\n   if (ret > 0)\n   {\n      for (i=0;i<ret*st->channels;i++)\n         pcm[i] = FLOAT2INT16(out[i]);\n   }\n   RESTORE_STACK;\n   return ret;\n}\n\nint opus_decode_float(OpusDecoder *st, const unsigned char *data,\n      opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec)\n{\n   if(frame_size<=0)\n      return OPUS_BAD_ARG;\n   return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL, 0);\n}\n\n#endif\n\nint opus_decoder_ctl(OpusDecoder *st, int request, ...)\n{\n   int ret = OPUS_OK;\n   va_list ap;\n   void *silk_dec;\n   CELTDecoder *celt_dec;\n\n   silk_dec = (char*)st+st->silk_dec_offset;\n   celt_dec = (CELTDecoder*)((char*)st+st->celt_dec_offset);\n\n\n   va_start(ap, request);\n\n   switch (request)\n   {\n   case OPUS_GET_BANDWIDTH_REQUEST:\n   {\n      opus_int32 *value = va_arg(ap, opus_int32*);\n      if (!value)\n      {\n         goto bad_arg;\n      }\n      *value = st->bandwidth;\n   }\n   break;\n   case OPUS_GET_FINAL_RANGE_REQUEST:\n   {\n      opus_uint32 *value = va_arg(ap, opus_uint32*);\n      if (!value)\n      {\n         goto bad_arg;\n      }\n      *value = st->rangeFinal;\n   }\n   break;\n   case OPUS_RESET_STATE:\n   {\n      OPUS_CLEAR((char*)&st->OPUS_DECODER_RESET_START,\n            sizeof(OpusDecoder)-\n            ((char*)&st->OPUS_DECODER_RESET_START - (char*)st));\n\n      celt_decoder_ctl(celt_dec, OPUS_RESET_STATE);\n      silk_InitDecoder( silk_dec );\n      st->stream_channels = st->channels;\n      st->frame_size = st->Fs/400;\n   }\n   break;\n   case OPUS_GET_SAMPLE_RATE_REQUEST:\n   {\n      opus_int32 *value = va_arg(ap, opus_int32*);\n      if (!value)\n      {\n         goto bad_arg;\n      }\n      *value = st->Fs;\n   }\n   break;\n   case OPUS_GET_PITCH_REQUEST:\n   {\n      opus_int32 *value = va_arg(ap, opus_int32*);\n      if (!value)\n      {\n         goto bad_arg;\n      }\n      if (st->prev_mode == MODE_CELT_ONLY)\n         celt_decoder_ctl(celt_dec, OPUS_GET_PITCH(value));\n      else\n         *value = st->DecControl.prevPitchLag;\n   }\n   break;\n   case OPUS_GET_GAIN_REQUEST:\n   {\n      opus_int32 *value = va_arg(ap, opus_int32*);\n      if (!value)\n      {\n         goto bad_arg;\n      }\n      *value = st->decode_gain;\n   }\n   break;\n   case OPUS_SET_GAIN_REQUEST:\n   {\n       opus_int32 value = va_arg(ap, opus_int32);\n       if (value<-32768 || value>32767)\n       {\n          goto bad_arg;\n       }\n       st->decode_gain = value;\n   }\n   break;\n   case OPUS_GET_LAST_PACKET_DURATION_REQUEST:\n   {\n      opus_uint32 *value = va_arg(ap, opus_uint32*);\n      if (!value)\n      {\n         goto bad_arg;\n      }\n      *value = st->last_packet_duration;\n   }\n   break;\n   default:\n      /*fprintf(stderr, \"unknown opus_decoder_ctl() request: %d\", request);*/\n      ret = OPUS_UNIMPLEMENTED;\n      break;\n   }\n\n   va_end(ap);\n   return ret;\nbad_arg:\n   va_end(ap);\n   return OPUS_BAD_ARG;\n}\n\nvoid opus_decoder_destroy(OpusDecoder *st)\n{\n   opus_free(st);\n}\n\n\nint opus_packet_get_bandwidth(const unsigned char *data)\n{\n   int bandwidth;\n   if (data[0]&0x80)\n   {\n      bandwidth = OPUS_BANDWIDTH_MEDIUMBAND + ((data[0]>>5)&0x3);\n      if (bandwidth == OPUS_BANDWIDTH_MEDIUMBAND)\n         bandwidth = OPUS_BANDWIDTH_NARROWBAND;\n   } else if ((data[0]&0x60) == 0x60)\n   {\n      bandwidth = (data[0]&0x10) ? OPUS_BANDWIDTH_FULLBAND :\n                                   OPUS_BANDWIDTH_SUPERWIDEBAND;\n   } else {\n      bandwidth = OPUS_BANDWIDTH_NARROWBAND + ((data[0]>>5)&0x3);\n   }\n   return bandwidth;\n}\n\nint opus_packet_get_samples_per_frame(const unsigned char *data,\n      opus_int32 Fs)\n{\n   int audiosize;\n   if (data[0]&0x80)\n   {\n      audiosize = ((data[0]>>3)&0x3);\n      audiosize = (Fs<<audiosize)/400;\n   } else if ((data[0]&0x60) == 0x60)\n   {\n      audiosize = (data[0]&0x08) ? Fs/50 : Fs/100;\n   } else {\n      audiosize = ((data[0]>>3)&0x3);\n      if (audiosize == 3)\n         audiosize = Fs*60/1000;\n      else\n         audiosize = (Fs<<audiosize)/100;\n   }\n   return audiosize;\n}\n\nint opus_packet_get_nb_channels(const unsigned char *data)\n{\n   return (data[0]&0x4) ? 2 : 1;\n}\n\nint opus_packet_get_nb_frames(const unsigned char packet[], opus_int32 len)\n{\n   int count;\n   if (len<1)\n      return OPUS_BAD_ARG;\n   count = packet[0]&0x3;\n   if (count==0)\n      return 1;\n   else if (count!=3)\n      return 2;\n   else if (len<2)\n      return OPUS_INVALID_PACKET;\n   else\n      return packet[1]&0x3F;\n}\n\nint opus_packet_get_nb_samples(const unsigned char packet[], opus_int32 len,\n      opus_int32 Fs)\n{\n   int samples;\n   int count = opus_packet_get_nb_frames(packet, len);\n\n   if (count<0)\n      return count;\n\n   samples = count*opus_packet_get_samples_per_frame(packet, Fs);\n   /* Can't have more than 120 ms */\n   if (samples*25 > Fs*3)\n      return OPUS_INVALID_PACKET;\n   else\n      return samples;\n}\n\nint opus_decoder_get_nb_samples(const OpusDecoder *dec,\n      const unsigned char packet[], opus_int32 len)\n{\n   return opus_packet_get_nb_samples(packet, len, dec->Fs);\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/opus_encoder.c",
    "content": "/* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited\n   Written by Jean-Marc Valin and Koen Vos */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include <stdarg.h>\n#include \"celt.h\"\n#include \"entenc.h\"\n#include \"modes.h\"\n#include \"API.h\"\n#include \"stack_alloc.h\"\n#include \"float_cast.h\"\n#include \"opus.h\"\n#include \"arch.h\"\n#include \"opus_private.h\"\n#include \"os_support.h\"\n#include \"cpu_support.h\"\n#include \"analysis.h\"\n#include \"mathops.h\"\n#include \"tuning_parameters.h\"\n#ifdef FIXED_POINT\n#include \"fixed/structs_FIX.h\"\n#else\n#include \"float/structs_FLP.h\"\n#endif\n\n#define MAX_ENCODER_BUFFER 480\n\ntypedef struct {\n   opus_val32 XX, XY, YY;\n   opus_val16 smoothed_width;\n   opus_val16 max_follower;\n} StereoWidthState;\n\nstruct OpusEncoder {\n    int          celt_enc_offset;\n    int          silk_enc_offset;\n    silk_EncControlStruct silk_mode;\n    int          application;\n    int          channels;\n    int          delay_compensation;\n    int          force_channels;\n    int          signal_type;\n    int          user_bandwidth;\n    int          max_bandwidth;\n    int          user_forced_mode;\n    int          voice_ratio;\n    opus_int32   Fs;\n    int          use_vbr;\n    int          vbr_constraint;\n    int          variable_duration;\n    opus_int32   bitrate_bps;\n    opus_int32   user_bitrate_bps;\n    int          lsb_depth;\n    int          encoder_buffer;\n    int          lfe;\n\n#define OPUS_ENCODER_RESET_START stream_channels\n    int          stream_channels;\n    opus_int16   hybrid_stereo_width_Q14;\n    opus_int32   variable_HP_smth2_Q15;\n    opus_val16   prev_HB_gain;\n    opus_val32   hp_mem[4];\n    int          mode;\n    int          prev_mode;\n    int          prev_channels;\n    int          prev_framesize;\n    int          bandwidth;\n    int          silk_bw_switch;\n    /* Sampling rate (at the API level) */\n    int          first;\n    opus_val16 * energy_masking;\n    StereoWidthState width_mem;\n    opus_val16   delay_buffer[MAX_ENCODER_BUFFER*2];\n#ifndef DISABLE_FLOAT_API\n    TonalityAnalysisState analysis;\n    int          detected_bandwidth;\n    int          analysis_offset;\n#endif\n    opus_uint32  rangeFinal;\n    int          arch;\n};\n\n/* Transition tables for the voice and music. First column is the\n   middle (memoriless) threshold. The second column is the hysteresis\n   (difference with the middle) */\nstatic const opus_int32 mono_voice_bandwidth_thresholds[8] = {\n        11000, 1000, /* NB<->MB */\n        14000, 1000, /* MB<->WB */\n        17000, 1000, /* WB<->SWB */\n        21000, 2000, /* SWB<->FB */\n};\nstatic const opus_int32 mono_music_bandwidth_thresholds[8] = {\n        12000, 1000, /* NB<->MB */\n        15000, 1000, /* MB<->WB */\n        18000, 2000, /* WB<->SWB */\n        22000, 2000, /* SWB<->FB */\n};\nstatic const opus_int32 stereo_voice_bandwidth_thresholds[8] = {\n        11000, 1000, /* NB<->MB */\n        14000, 1000, /* MB<->WB */\n        21000, 2000, /* WB<->SWB */\n        28000, 2000, /* SWB<->FB */\n};\nstatic const opus_int32 stereo_music_bandwidth_thresholds[8] = {\n        12000, 1000, /* NB<->MB */\n        18000, 2000, /* MB<->WB */\n        21000, 2000, /* WB<->SWB */\n        30000, 2000, /* SWB<->FB */\n};\n/* Threshold bit-rates for switching between mono and stereo */\nstatic const opus_int32 stereo_voice_threshold = 30000;\nstatic const opus_int32 stereo_music_threshold = 30000;\n\n/* Threshold bit-rate for switching between SILK/hybrid and CELT-only */\nstatic const opus_int32 mode_thresholds[2][2] = {\n      /* voice */ /* music */\n      {  64000,      16000}, /* mono */\n      {  36000,      16000}, /* stereo */\n};\n\nint opus_encoder_get_size(int channels)\n{\n    int silkEncSizeBytes, celtEncSizeBytes;\n    int ret;\n    if (channels<1 || channels > 2)\n        return 0;\n    ret = silk_Get_Encoder_Size( &silkEncSizeBytes );\n    if (ret)\n        return 0;\n    silkEncSizeBytes = align(silkEncSizeBytes);\n    celtEncSizeBytes = celt_encoder_get_size(channels);\n    return align(sizeof(OpusEncoder))+silkEncSizeBytes+celtEncSizeBytes;\n}\n\nint opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int application)\n{\n    void *silk_enc;\n    CELTEncoder *celt_enc;\n    int err;\n    int ret, silkEncSizeBytes;\n\n   if((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)||(channels!=1&&channels!=2)||\n        (application != OPUS_APPLICATION_VOIP && application != OPUS_APPLICATION_AUDIO\n        && application != OPUS_APPLICATION_RESTRICTED_LOWDELAY))\n        return OPUS_BAD_ARG;\n\n    OPUS_CLEAR((char*)st, opus_encoder_get_size(channels));\n    /* Create SILK encoder */\n    ret = silk_Get_Encoder_Size( &silkEncSizeBytes );\n    if (ret)\n        return OPUS_BAD_ARG;\n    silkEncSizeBytes = align(silkEncSizeBytes);\n    st->silk_enc_offset = align(sizeof(OpusEncoder));\n    st->celt_enc_offset = st->silk_enc_offset+silkEncSizeBytes;\n    silk_enc = (char*)st+st->silk_enc_offset;\n    celt_enc = (CELTEncoder*)((char*)st+st->celt_enc_offset);\n\n    st->stream_channels = st->channels = channels;\n\n    st->Fs = Fs;\n\n    st->arch = opus_select_arch();\n\n    ret = silk_InitEncoder( silk_enc, st->arch, &st->silk_mode );\n    if(ret)return OPUS_INTERNAL_ERROR;\n\n    /* default SILK parameters */\n    st->silk_mode.nChannelsAPI              = channels;\n    st->silk_mode.nChannelsInternal         = channels;\n    st->silk_mode.API_sampleRate            = st->Fs;\n    st->silk_mode.maxInternalSampleRate     = 16000;\n    st->silk_mode.minInternalSampleRate     = 8000;\n    st->silk_mode.desiredInternalSampleRate = 16000;\n    st->silk_mode.payloadSize_ms            = 20;\n    st->silk_mode.bitRate                   = 25000;\n    st->silk_mode.packetLossPercentage      = 0;\n    st->silk_mode.complexity                = 9;\n    st->silk_mode.useInBandFEC              = 0;\n    st->silk_mode.useDTX                    = 0;\n    st->silk_mode.useCBR                    = 0;\n    st->silk_mode.reducedDependency         = 0;\n\n    /* Create CELT encoder */\n    /* Initialize CELT encoder */\n    err = celt_encoder_init(celt_enc, Fs, channels, st->arch);\n    if(err!=OPUS_OK)return OPUS_INTERNAL_ERROR;\n\n    celt_encoder_ctl(celt_enc, CELT_SET_SIGNALLING(0));\n    celt_encoder_ctl(celt_enc, OPUS_SET_COMPLEXITY(st->silk_mode.complexity));\n\n    st->use_vbr = 1;\n    /* Makes constrained VBR the default (safer for real-time use) */\n    st->vbr_constraint = 1;\n    st->user_bitrate_bps = OPUS_AUTO;\n    st->bitrate_bps = 3000+Fs*channels;\n    st->application = application;\n    st->signal_type = OPUS_AUTO;\n    st->user_bandwidth = OPUS_AUTO;\n    st->max_bandwidth = OPUS_BANDWIDTH_FULLBAND;\n    st->force_channels = OPUS_AUTO;\n    st->user_forced_mode = OPUS_AUTO;\n    st->voice_ratio = -1;\n    st->encoder_buffer = st->Fs/100;\n    st->lsb_depth = 24;\n    st->variable_duration = OPUS_FRAMESIZE_ARG;\n\n    /* Delay compensation of 4 ms (2.5 ms for SILK's extra look-ahead \n       + 1.5 ms for SILK resamplers and stereo prediction) */\n    st->delay_compensation = st->Fs/250;\n\n    st->hybrid_stereo_width_Q14 = 1 << 14;\n    st->prev_HB_gain = Q15ONE;\n    st->variable_HP_smth2_Q15 = silk_LSHIFT( silk_lin2log( VARIABLE_HP_MIN_CUTOFF_HZ ), 8 );\n    st->first = 1;\n    st->mode = MODE_HYBRID;\n    st->bandwidth = OPUS_BANDWIDTH_FULLBAND;\n\n    return OPUS_OK;\n}\n\nstatic unsigned char gen_toc(int mode, int framerate, int bandwidth, int channels)\n{\n   int period;\n   unsigned char toc;\n   period = 0;\n   while (framerate < 400)\n   {\n       framerate <<= 1;\n       period++;\n   }\n   if (mode == MODE_SILK_ONLY)\n   {\n       toc = (bandwidth-OPUS_BANDWIDTH_NARROWBAND)<<5;\n       toc |= (period-2)<<3;\n   } else if (mode == MODE_CELT_ONLY)\n   {\n       int tmp = bandwidth-OPUS_BANDWIDTH_MEDIUMBAND;\n       if (tmp < 0)\n           tmp = 0;\n       toc = 0x80;\n       toc |= tmp << 5;\n       toc |= period<<3;\n   } else /* Hybrid */\n   {\n       toc = 0x60;\n       toc |= (bandwidth-OPUS_BANDWIDTH_SUPERWIDEBAND)<<4;\n       toc |= (period-2)<<3;\n   }\n   toc |= (channels==2)<<2;\n   return toc;\n}\n\n#ifndef FIXED_POINT\nstatic void silk_biquad_float(\n    const opus_val16      *in,            /* I:    Input signal                   */\n    const opus_int32      *B_Q28,         /* I:    MA coefficients [3]            */\n    const opus_int32      *A_Q28,         /* I:    AR coefficients [2]            */\n    opus_val32            *S,             /* I/O:  State vector [2]               */\n    opus_val16            *out,           /* O:    Output signal                  */\n    const opus_int32      len,            /* I:    Signal length (must be even)   */\n    int stride\n)\n{\n    /* DIRECT FORM II TRANSPOSED (uses 2 element state vector) */\n    opus_int   k;\n    opus_val32 vout;\n    opus_val32 inval;\n    opus_val32 A[2], B[3];\n\n    A[0] = (opus_val32)(A_Q28[0] * (1.f/((opus_int32)1<<28)));\n    A[1] = (opus_val32)(A_Q28[1] * (1.f/((opus_int32)1<<28)));\n    B[0] = (opus_val32)(B_Q28[0] * (1.f/((opus_int32)1<<28)));\n    B[1] = (opus_val32)(B_Q28[1] * (1.f/((opus_int32)1<<28)));\n    B[2] = (opus_val32)(B_Q28[2] * (1.f/((opus_int32)1<<28)));\n\n    /* Negate A_Q28 values and split in two parts */\n\n    for( k = 0; k < len; k++ ) {\n        /* S[ 0 ], S[ 1 ]: Q12 */\n        inval = in[ k*stride ];\n        vout = S[ 0 ] + B[0]*inval;\n\n        S[ 0 ] = S[1] - vout*A[0] + B[1]*inval;\n\n        S[ 1 ] = - vout*A[1] + B[2]*inval + VERY_SMALL;\n\n        /* Scale back to Q0 and saturate */\n        out[ k*stride ] = vout;\n    }\n}\n#endif\n\nstatic void hp_cutoff(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs)\n{\n   opus_int32 B_Q28[ 3 ], A_Q28[ 2 ];\n   opus_int32 Fc_Q19, r_Q28, r_Q22;\n\n   silk_assert( cutoff_Hz <= silk_int32_MAX / SILK_FIX_CONST( 1.5 * 3.14159 / 1000, 19 ) );\n   Fc_Q19 = silk_DIV32_16( silk_SMULBB( SILK_FIX_CONST( 1.5 * 3.14159 / 1000, 19 ), cutoff_Hz ), Fs/1000 );\n   silk_assert( Fc_Q19 > 0 && Fc_Q19 < 32768 );\n\n   r_Q28 = SILK_FIX_CONST( 1.0, 28 ) - silk_MUL( SILK_FIX_CONST( 0.92, 9 ), Fc_Q19 );\n\n   /* b = r * [ 1; -2; 1 ]; */\n   /* a = [ 1; -2 * r * ( 1 - 0.5 * Fc^2 ); r^2 ]; */\n   B_Q28[ 0 ] = r_Q28;\n   B_Q28[ 1 ] = silk_LSHIFT( -r_Q28, 1 );\n   B_Q28[ 2 ] = r_Q28;\n\n   /* -r * ( 2 - Fc * Fc ); */\n   r_Q22  = silk_RSHIFT( r_Q28, 6 );\n   A_Q28[ 0 ] = silk_SMULWW( r_Q22, silk_SMULWW( Fc_Q19, Fc_Q19 ) - SILK_FIX_CONST( 2.0,  22 ) );\n   A_Q28[ 1 ] = silk_SMULWW( r_Q22, r_Q22 );\n\n#ifdef FIXED_POINT\n   silk_biquad_alt( in, B_Q28, A_Q28, hp_mem, out, len, channels );\n   if( channels == 2 ) {\n       silk_biquad_alt( in+1, B_Q28, A_Q28, hp_mem+2, out+1, len, channels );\n   }\n#else\n   silk_biquad_float( in, B_Q28, A_Q28, hp_mem, out, len, channels );\n   if( channels == 2 ) {\n       silk_biquad_float( in+1, B_Q28, A_Q28, hp_mem+2, out+1, len, channels );\n   }\n#endif\n}\n\n#ifdef FIXED_POINT\nstatic void dc_reject(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs)\n{\n   int c, i;\n   int shift;\n\n   /* Approximates -round(log2(4.*cutoff_Hz/Fs)) */\n   shift=celt_ilog2(Fs/(cutoff_Hz*3));\n   for (c=0;c<channels;c++)\n   {\n      for (i=0;i<len;i++)\n      {\n         opus_val32 x, tmp, y;\n         x = SHL32(EXTEND32(in[channels*i+c]), 15);\n         /* First stage */\n         tmp = x-hp_mem[2*c];\n         hp_mem[2*c] = hp_mem[2*c] + PSHR32(x - hp_mem[2*c], shift);\n         /* Second stage */\n         y = tmp - hp_mem[2*c+1];\n         hp_mem[2*c+1] = hp_mem[2*c+1] + PSHR32(tmp - hp_mem[2*c+1], shift);\n         out[channels*i+c] = EXTRACT16(SATURATE(PSHR32(y, 15), 32767));\n      }\n   }\n}\n\n#else\nstatic void dc_reject(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs)\n{\n   int c, i;\n   float coef;\n\n   coef = 4.0f*cutoff_Hz/Fs;\n   for (c=0;c<channels;c++)\n   {\n      for (i=0;i<len;i++)\n      {\n         opus_val32 x, tmp, y;\n         x = in[channels*i+c];\n         /* First stage */\n         tmp = x-hp_mem[2*c];\n         hp_mem[2*c] = hp_mem[2*c] + coef*(x - hp_mem[2*c]) + VERY_SMALL;\n         /* Second stage */\n         y = tmp - hp_mem[2*c+1];\n         hp_mem[2*c+1] = hp_mem[2*c+1] + coef*(tmp - hp_mem[2*c+1]) + VERY_SMALL;\n         out[channels*i+c] = y;\n      }\n   }\n}\n#endif\n\nstatic void stereo_fade(const opus_val16 *in, opus_val16 *out, opus_val16 g1, opus_val16 g2,\n        int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs)\n{\n    int i;\n    int overlap;\n    int inc;\n    inc = 48000/Fs;\n    overlap=overlap48/inc;\n    g1 = Q15ONE-g1;\n    g2 = Q15ONE-g2;\n    for (i=0;i<overlap;i++)\n    {\n       opus_val32 diff;\n       opus_val16 g, w;\n       w = MULT16_16_Q15(window[i*inc], window[i*inc]);\n       g = SHR32(MAC16_16(MULT16_16(w,g2),\n             Q15ONE-w, g1), 15);\n       diff = EXTRACT16(HALF32((opus_val32)in[i*channels] - (opus_val32)in[i*channels+1]));\n       diff = MULT16_16_Q15(g, diff);\n       out[i*channels] = out[i*channels] - diff;\n       out[i*channels+1] = out[i*channels+1] + diff;\n    }\n    for (;i<frame_size;i++)\n    {\n       opus_val32 diff;\n       diff = EXTRACT16(HALF32((opus_val32)in[i*channels] - (opus_val32)in[i*channels+1]));\n       diff = MULT16_16_Q15(g2, diff);\n       out[i*channels] = out[i*channels] - diff;\n       out[i*channels+1] = out[i*channels+1] + diff;\n    }\n}\n\nstatic void gain_fade(const opus_val16 *in, opus_val16 *out, opus_val16 g1, opus_val16 g2,\n        int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs)\n{\n    int i;\n    int inc;\n    int overlap;\n    int c;\n    inc = 48000/Fs;\n    overlap=overlap48/inc;\n    if (channels==1)\n    {\n       for (i=0;i<overlap;i++)\n       {\n          opus_val16 g, w;\n          w = MULT16_16_Q15(window[i*inc], window[i*inc]);\n          g = SHR32(MAC16_16(MULT16_16(w,g2),\n                Q15ONE-w, g1), 15);\n          out[i] = MULT16_16_Q15(g, in[i]);\n       }\n    } else {\n       for (i=0;i<overlap;i++)\n       {\n          opus_val16 g, w;\n          w = MULT16_16_Q15(window[i*inc], window[i*inc]);\n          g = SHR32(MAC16_16(MULT16_16(w,g2),\n                Q15ONE-w, g1), 15);\n          out[i*2] = MULT16_16_Q15(g, in[i*2]);\n          out[i*2+1] = MULT16_16_Q15(g, in[i*2+1]);\n       }\n    }\n    c=0;do {\n       for (i=overlap;i<frame_size;i++)\n       {\n          out[i*channels+c] = MULT16_16_Q15(g2, in[i*channels+c]);\n       }\n    }\n    while (++c<channels);\n}\n\nOpusEncoder *opus_encoder_create(opus_int32 Fs, int channels, int application, int *error)\n{\n   int ret;\n   OpusEncoder *st;\n   if((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)||(channels!=1&&channels!=2)||\n       (application != OPUS_APPLICATION_VOIP && application != OPUS_APPLICATION_AUDIO\n       && application != OPUS_APPLICATION_RESTRICTED_LOWDELAY))\n   {\n      if (error)\n         *error = OPUS_BAD_ARG;\n      return NULL;\n   }\n   st = (OpusEncoder *)opus_alloc(opus_encoder_get_size(channels));\n   if (st == NULL)\n   {\n      if (error)\n         *error = OPUS_ALLOC_FAIL;\n      return NULL;\n   }\n   ret = opus_encoder_init(st, Fs, channels, application);\n   if (error)\n      *error = ret;\n   if (ret != OPUS_OK)\n   {\n      opus_free(st);\n      st = NULL;\n   }\n   return st;\n}\n\nstatic opus_int32 user_bitrate_to_bitrate(OpusEncoder *st, int frame_size, int max_data_bytes)\n{\n  if(!frame_size)frame_size=st->Fs/400;\n  if (st->user_bitrate_bps==OPUS_AUTO)\n    return 60*st->Fs/frame_size + st->Fs*st->channels;\n  else if (st->user_bitrate_bps==OPUS_BITRATE_MAX)\n    return max_data_bytes*8*st->Fs/frame_size;\n  else\n    return st->user_bitrate_bps;\n}\n\n#ifndef DISABLE_FLOAT_API\n/* Don't use more than 60 ms for the frame size analysis */\n#define MAX_DYNAMIC_FRAMESIZE 24\n/* Estimates how much the bitrate will be boosted based on the sub-frame energy */\nstatic float transient_boost(const float *E, const float *E_1, int LM, int maxM)\n{\n   int i;\n   int M;\n   float sumE=0, sumE_1=0;\n   float metric;\n\n   M = IMIN(maxM, (1<<LM)+1);\n   for (i=0;i<M;i++)\n   {\n      sumE += E[i];\n      sumE_1 += E_1[i];\n   }\n   metric = sumE*sumE_1/(M*M);\n   /*if (LM==3)\n      printf(\"%f\\n\", metric);*/\n   /*return metric>10 ? 1 : 0;*/\n   /*return MAX16(0,1-exp(-.25*(metric-2.)));*/\n   return MIN16(1,(float)sqrt(MAX16(0,.05f*(metric-2))));\n}\n\n/* Viterbi decoding trying to find the best frame size combination using look-ahead\n\n   State numbering:\n    0: unused\n    1:  2.5 ms\n    2:  5 ms (#1)\n    3:  5 ms (#2)\n    4: 10 ms (#1)\n    5: 10 ms (#2)\n    6: 10 ms (#3)\n    7: 10 ms (#4)\n    8: 20 ms (#1)\n    9: 20 ms (#2)\n   10: 20 ms (#3)\n   11: 20 ms (#4)\n   12: 20 ms (#5)\n   13: 20 ms (#6)\n   14: 20 ms (#7)\n   15: 20 ms (#8)\n*/\nstatic int transient_viterbi(const float *E, const float *E_1, int N, int frame_cost, int rate)\n{\n   int i;\n   float cost[MAX_DYNAMIC_FRAMESIZE][16];\n   int states[MAX_DYNAMIC_FRAMESIZE][16];\n   float best_cost;\n   int best_state;\n   float factor;\n   /* Take into account that we damp VBR in the 32 kb/s to 64 kb/s range. */\n   if (rate<80)\n      factor=0;\n   else if (rate>160)\n      factor=1;\n   else\n      factor = (rate-80.f)/80.f;\n   /* Makes variable framesize less aggressive at lower bitrates, but I can't\n      find any valid theoretical justification for this (other than it seems\n      to help) */\n   for (i=0;i<16;i++)\n   {\n      /* Impossible state */\n      states[0][i] = -1;\n      cost[0][i] = 1e10;\n   }\n   for (i=0;i<4;i++)\n   {\n      cost[0][1<<i] = (frame_cost + rate*(1<<i))*(1+factor*transient_boost(E, E_1, i, N+1));\n      states[0][1<<i] = i;\n   }\n   for (i=1;i<N;i++)\n   {\n      int j;\n\n      /* Follow continuations */\n      for (j=2;j<16;j++)\n      {\n         cost[i][j] = cost[i-1][j-1];\n         states[i][j] = j-1;\n      }\n\n      /* New frames */\n      for(j=0;j<4;j++)\n      {\n         int k;\n         float min_cost;\n         float curr_cost;\n         states[i][1<<j] = 1;\n         min_cost = cost[i-1][1];\n         for(k=1;k<4;k++)\n         {\n            float tmp = cost[i-1][(1<<(k+1))-1];\n            if (tmp < min_cost)\n            {\n               states[i][1<<j] = (1<<(k+1))-1;\n               min_cost = tmp;\n            }\n         }\n         curr_cost = (frame_cost + rate*(1<<j))*(1+factor*transient_boost(E+i, E_1+i, j, N-i+1));\n         cost[i][1<<j] = min_cost;\n         /* If part of the frame is outside the analysis window, only count part of the cost */\n         if (N-i < (1<<j))\n            cost[i][1<<j] += curr_cost*(float)(N-i)/(1<<j);\n         else\n            cost[i][1<<j] += curr_cost;\n      }\n   }\n\n   best_state=1;\n   best_cost = cost[N-1][1];\n   /* Find best end state (doesn't force a frame to end at N-1) */\n   for (i=2;i<16;i++)\n   {\n      if (cost[N-1][i]<best_cost)\n      {\n         best_cost = cost[N-1][i];\n         best_state = i;\n      }\n   }\n\n   /* Follow transitions back */\n   for (i=N-1;i>=0;i--)\n   {\n      /*printf(\"%d \", best_state);*/\n      best_state = states[i][best_state];\n   }\n   /*printf(\"%d\\n\", best_state);*/\n   return best_state;\n}\n\nint optimize_framesize(const opus_val16 *x, int len, int C, opus_int32 Fs,\n                int bitrate, opus_val16 tonality, float *mem, int buffering,\n                downmix_func downmix)\n{\n   int N;\n   int i;\n   float e[MAX_DYNAMIC_FRAMESIZE+4];\n   float e_1[MAX_DYNAMIC_FRAMESIZE+3];\n   opus_val32 memx;\n   int bestLM=0;\n   int subframe;\n   int pos;\n   VARDECL(opus_val32, sub);\n\n   subframe = Fs/400;\n   ALLOC(sub, subframe, opus_val32);\n   e[0]=mem[0];\n   e_1[0]=1.f/(EPSILON+mem[0]);\n   if (buffering)\n   {\n      /* Consider the CELT delay when not in restricted-lowdelay */\n      /* We assume the buffering is between 2.5 and 5 ms */\n      int offset = 2*subframe - buffering;\n      celt_assert(offset>=0 && offset <= subframe);\n      x += C*offset;\n      len -= offset;\n      e[1]=mem[1];\n      e_1[1]=1.f/(EPSILON+mem[1]);\n      e[2]=mem[2];\n      e_1[2]=1.f/(EPSILON+mem[2]);\n      pos = 3;\n   } else {\n      pos=1;\n   }\n   N=IMIN(len/subframe, MAX_DYNAMIC_FRAMESIZE);\n   /* Just silencing a warning, it's really initialized later */\n   memx = 0;\n   for (i=0;i<N;i++)\n   {\n      float tmp;\n      opus_val32 tmpx;\n      int j;\n      tmp=EPSILON;\n\n      downmix(x, sub, subframe, i*subframe, 0, -2, C);\n      if (i==0)\n         memx = sub[0];\n      for (j=0;j<subframe;j++)\n      {\n         tmpx = sub[j];\n         tmp += (tmpx-memx)*(float)(tmpx-memx);\n         memx = tmpx;\n      }\n      e[i+pos] = tmp;\n      e_1[i+pos] = 1.f/tmp;\n   }\n   /* Hack to get 20 ms working with APPLICATION_AUDIO\n      The real problem is that the corresponding memory needs to use 1.5 ms\n      from this frame and 1 ms from the next frame */\n   e[i+pos] = e[i+pos-1];\n   if (buffering)\n      N=IMIN(MAX_DYNAMIC_FRAMESIZE, N+2);\n   bestLM = transient_viterbi(e, e_1, N, (int)((1.f+.5f*tonality)*(60*C+40)), bitrate/400);\n   mem[0] = e[1<<bestLM];\n   if (buffering)\n   {\n      mem[1] = e[(1<<bestLM)+1];\n      mem[2] = e[(1<<bestLM)+2];\n   }\n   return bestLM;\n}\n\n#endif\n\n#ifndef DISABLE_FLOAT_API\n#ifdef FIXED_POINT\n#define PCM2VAL(x) FLOAT2INT16(x)\n#else\n#define PCM2VAL(x) SCALEIN(x)\n#endif\nvoid downmix_float(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C)\n{\n   const float *x;\n   opus_val32 scale;\n   int j;\n   x = (const float *)_x;\n   for (j=0;j<subframe;j++)\n      sub[j] = PCM2VAL(x[(j+offset)*C+c1]);\n   if (c2>-1)\n   {\n      for (j=0;j<subframe;j++)\n         sub[j] += PCM2VAL(x[(j+offset)*C+c2]);\n   } else if (c2==-2)\n   {\n      int c;\n      for (c=1;c<C;c++)\n      {\n         for (j=0;j<subframe;j++)\n            sub[j] += PCM2VAL(x[(j+offset)*C+c]);\n      }\n   }\n#ifdef FIXED_POINT\n   scale = (1<<SIG_SHIFT);\n#else\n   scale = 1.f;\n#endif\n   if (C==-2)\n      scale /= C;\n   else\n      scale /= 2;\n   for (j=0;j<subframe;j++)\n      sub[j] *= scale;\n}\n#endif\n\nvoid downmix_int(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C)\n{\n   const opus_int16 *x;\n   opus_val32 scale;\n   int j;\n   x = (const opus_int16 *)_x;\n   for (j=0;j<subframe;j++)\n      sub[j] = x[(j+offset)*C+c1];\n   if (c2>-1)\n   {\n      for (j=0;j<subframe;j++)\n         sub[j] += x[(j+offset)*C+c2];\n   } else if (c2==-2)\n   {\n      int c;\n      for (c=1;c<C;c++)\n      {\n         for (j=0;j<subframe;j++)\n            sub[j] += x[(j+offset)*C+c];\n      }\n   }\n#ifdef FIXED_POINT\n   scale = (1<<SIG_SHIFT);\n#else\n   scale = 1.f/32768;\n#endif\n   if (C==-2)\n      scale /= C;\n   else\n      scale /= 2;\n   for (j=0;j<subframe;j++)\n      sub[j] *= scale;\n}\n\nopus_int32 frame_size_select(opus_int32 frame_size, int variable_duration, opus_int32 Fs)\n{\n   int new_size;\n   if (frame_size<Fs/400)\n      return -1;\n   if (variable_duration == OPUS_FRAMESIZE_ARG)\n      new_size = frame_size;\n   else if (variable_duration == OPUS_FRAMESIZE_VARIABLE)\n      new_size = Fs/50;\n   else if (variable_duration >= OPUS_FRAMESIZE_2_5_MS && variable_duration <= OPUS_FRAMESIZE_60_MS)\n      new_size = IMIN(3*Fs/50, (Fs/400)<<(variable_duration-OPUS_FRAMESIZE_2_5_MS));\n   else\n      return -1;\n   if (new_size>frame_size)\n      return -1;\n   if (400*new_size!=Fs && 200*new_size!=Fs && 100*new_size!=Fs &&\n            50*new_size!=Fs && 25*new_size!=Fs && 50*new_size!=3*Fs)\n      return -1;\n   return new_size;\n}\n\nopus_int32 compute_frame_size(const void *analysis_pcm, int frame_size,\n      int variable_duration, int C, opus_int32 Fs, int bitrate_bps,\n      int delay_compensation, downmix_func downmix\n#ifndef DISABLE_FLOAT_API\n      , float *subframe_mem\n#endif\n      )\n{\n#ifndef DISABLE_FLOAT_API\n   if (variable_duration == OPUS_FRAMESIZE_VARIABLE && frame_size >= Fs/200)\n   {\n      int LM = 3;\n      LM = optimize_framesize(analysis_pcm, frame_size, C, Fs, bitrate_bps,\n            0, subframe_mem, delay_compensation, downmix);\n      while ((Fs/400<<LM)>frame_size)\n         LM--;\n      frame_size = (Fs/400<<LM);\n   } else\n#endif\n   {\n      frame_size = frame_size_select(frame_size, variable_duration, Fs);\n   }\n   if (frame_size<0)\n      return -1;\n   return frame_size;\n}\n\nopus_val16 compute_stereo_width(const opus_val16 *pcm, int frame_size, opus_int32 Fs, StereoWidthState *mem)\n{\n   opus_val16 corr;\n   opus_val16 ldiff;\n   opus_val16 width;\n   opus_val32 xx, xy, yy;\n   opus_val16 sqrt_xx, sqrt_yy;\n   opus_val16 qrrt_xx, qrrt_yy;\n   int frame_rate;\n   int i;\n   opus_val16 short_alpha;\n\n   frame_rate = Fs/frame_size;\n   short_alpha = Q15ONE - 25*Q15ONE/IMAX(50,frame_rate);\n   xx=xy=yy=0;\n   for (i=0;i<frame_size;i+=4)\n   {\n      opus_val32 pxx=0;\n      opus_val32 pxy=0;\n      opus_val32 pyy=0;\n      opus_val16 x, y;\n      x = pcm[2*i];\n      y = pcm[2*i+1];\n      pxx = SHR32(MULT16_16(x,x),2);\n      pxy = SHR32(MULT16_16(x,y),2);\n      pyy = SHR32(MULT16_16(y,y),2);\n      x = pcm[2*i+2];\n      y = pcm[2*i+3];\n      pxx += SHR32(MULT16_16(x,x),2);\n      pxy += SHR32(MULT16_16(x,y),2);\n      pyy += SHR32(MULT16_16(y,y),2);\n      x = pcm[2*i+4];\n      y = pcm[2*i+5];\n      pxx += SHR32(MULT16_16(x,x),2);\n      pxy += SHR32(MULT16_16(x,y),2);\n      pyy += SHR32(MULT16_16(y,y),2);\n      x = pcm[2*i+6];\n      y = pcm[2*i+7];\n      pxx += SHR32(MULT16_16(x,x),2);\n      pxy += SHR32(MULT16_16(x,y),2);\n      pyy += SHR32(MULT16_16(y,y),2);\n\n      xx += SHR32(pxx, 10);\n      xy += SHR32(pxy, 10);\n      yy += SHR32(pyy, 10);\n   }\n   mem->XX += MULT16_32_Q15(short_alpha, xx-mem->XX);\n   mem->XY += MULT16_32_Q15(short_alpha, xy-mem->XY);\n   mem->YY += MULT16_32_Q15(short_alpha, yy-mem->YY);\n   mem->XX = MAX32(0, mem->XX);\n   mem->XY = MAX32(0, mem->XY);\n   mem->YY = MAX32(0, mem->YY);\n   if (MAX32(mem->XX, mem->YY)>QCONST16(8e-4f, 18))\n   {\n      sqrt_xx = celt_sqrt(mem->XX);\n      sqrt_yy = celt_sqrt(mem->YY);\n      qrrt_xx = celt_sqrt(sqrt_xx);\n      qrrt_yy = celt_sqrt(sqrt_yy);\n      /* Inter-channel correlation */\n      mem->XY = MIN32(mem->XY, sqrt_xx*sqrt_yy);\n      corr = SHR32(frac_div32(mem->XY,EPSILON+MULT16_16(sqrt_xx,sqrt_yy)),16);\n      /* Approximate loudness difference */\n      ldiff = Q15ONE*ABS16(qrrt_xx-qrrt_yy)/(EPSILON+qrrt_xx+qrrt_yy);\n      width = MULT16_16_Q15(celt_sqrt(QCONST32(1.f,30)-MULT16_16(corr,corr)), ldiff);\n      /* Smoothing over one second */\n      mem->smoothed_width += (width-mem->smoothed_width)/frame_rate;\n      /* Peak follower */\n      mem->max_follower = MAX16(mem->max_follower-QCONST16(.02f,15)/frame_rate, mem->smoothed_width);\n   } else {\n      width = 0;\n      corr=Q15ONE;\n      ldiff=0;\n   }\n   /*printf(\"%f %f %f %f %f \", corr/(float)Q15ONE, ldiff/(float)Q15ONE, width/(float)Q15ONE, mem->smoothed_width/(float)Q15ONE, mem->max_follower/(float)Q15ONE);*/\n   return EXTRACT16(MIN32(Q15ONE,20*mem->max_follower));\n}\n\nopus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size,\n                unsigned char *data, opus_int32 out_data_bytes, int lsb_depth,\n                const void *analysis_pcm, opus_int32 analysis_size, int c1, int c2, int analysis_channels, downmix_func downmix)\n{\n    void *silk_enc;\n    CELTEncoder *celt_enc;\n    int i;\n    int ret=0;\n    opus_int32 nBytes;\n    ec_enc enc;\n    int bytes_target;\n    int prefill=0;\n    int start_band = 0;\n    int redundancy = 0;\n    int redundancy_bytes = 0; /* Number of bytes to use for redundancy frame */\n    int celt_to_silk = 0;\n    VARDECL(opus_val16, pcm_buf);\n    int nb_compr_bytes;\n    int to_celt = 0;\n    opus_uint32 redundant_rng = 0;\n    int cutoff_Hz, hp_freq_smth1;\n    int voice_est; /* Probability of voice in Q7 */\n    opus_int32 equiv_rate;\n    int delay_compensation;\n    int frame_rate;\n    opus_int32 max_rate; /* Max bitrate we're allowed to use */\n    int curr_bandwidth;\n    opus_val16 HB_gain;\n    opus_int32 max_data_bytes; /* Max number of bytes we're allowed to use */\n    int total_buffer;\n    opus_val16 stereo_width;\n    const CELTMode *celt_mode;\n    AnalysisInfo analysis_info;\n    int analysis_read_pos_bak=-1;\n    int analysis_read_subframe_bak=-1;\n    VARDECL(opus_val16, tmp_prefill);\n\n    ALLOC_STACK;\n\n    max_data_bytes = IMIN(1276, out_data_bytes);\n\n    st->rangeFinal = 0;\n    if ((!st->variable_duration && 400*frame_size != st->Fs && 200*frame_size != st->Fs && 100*frame_size != st->Fs &&\n         50*frame_size != st->Fs &&  25*frame_size != st->Fs &&  50*frame_size != 3*st->Fs)\n         || (400*frame_size < st->Fs)\n         || max_data_bytes<=0\n         )\n    {\n       RESTORE_STACK;\n       return OPUS_BAD_ARG;\n    }\n    silk_enc = (char*)st+st->silk_enc_offset;\n    celt_enc = (CELTEncoder*)((char*)st+st->celt_enc_offset);\n    if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n       delay_compensation = 0;\n    else\n       delay_compensation = st->delay_compensation;\n\n    lsb_depth = IMIN(lsb_depth, st->lsb_depth);\n\n    analysis_info.valid = 0;\n    celt_encoder_ctl(celt_enc, CELT_GET_MODE(&celt_mode));\n#ifndef DISABLE_FLOAT_API\n#ifdef FIXED_POINT\n    if (st->silk_mode.complexity >= 10 && st->Fs==48000)\n#else\n    if (st->silk_mode.complexity >= 7 && st->Fs==48000)\n#endif\n    {\n       analysis_read_pos_bak = st->analysis.read_pos;\n       analysis_read_subframe_bak = st->analysis.read_subframe;\n       run_analysis(&st->analysis, celt_mode, analysis_pcm, analysis_size, frame_size,\n             c1, c2, analysis_channels, st->Fs,\n             lsb_depth, downmix, &analysis_info);\n    }\n#endif\n\n    st->voice_ratio = -1;\n\n#ifndef DISABLE_FLOAT_API\n    st->detected_bandwidth = 0;\n    if (analysis_info.valid)\n    {\n       int analysis_bandwidth;\n       if (st->signal_type == OPUS_AUTO)\n          st->voice_ratio = (int)floor(.5+100*(1-analysis_info.music_prob));\n\n       analysis_bandwidth = analysis_info.bandwidth;\n       if (analysis_bandwidth<=12)\n          st->detected_bandwidth = OPUS_BANDWIDTH_NARROWBAND;\n       else if (analysis_bandwidth<=14)\n          st->detected_bandwidth = OPUS_BANDWIDTH_MEDIUMBAND;\n       else if (analysis_bandwidth<=16)\n          st->detected_bandwidth = OPUS_BANDWIDTH_WIDEBAND;\n       else if (analysis_bandwidth<=18)\n          st->detected_bandwidth = OPUS_BANDWIDTH_SUPERWIDEBAND;\n       else\n          st->detected_bandwidth = OPUS_BANDWIDTH_FULLBAND;\n    }\n#endif\n\n    if (st->channels==2 && st->force_channels!=1)\n       stereo_width = compute_stereo_width(pcm, frame_size, st->Fs, &st->width_mem);\n    else\n       stereo_width = 0;\n    total_buffer = delay_compensation;\n    st->bitrate_bps = user_bitrate_to_bitrate(st, frame_size, max_data_bytes);\n\n    frame_rate = st->Fs/frame_size;\n    if (max_data_bytes<3 || st->bitrate_bps < 3*frame_rate*8\n       || (frame_rate<50 && (max_data_bytes*frame_rate<300 || st->bitrate_bps < 2400)))\n    {\n       /*If the space is too low to do something useful, emit 'PLC' frames.*/\n       int tocmode = st->mode;\n       int bw = st->bandwidth == 0 ? OPUS_BANDWIDTH_NARROWBAND : st->bandwidth;\n       if (tocmode==0)\n          tocmode = MODE_SILK_ONLY;\n       if (frame_rate>100)\n          tocmode = MODE_CELT_ONLY;\n       if (frame_rate < 50)\n          tocmode = MODE_SILK_ONLY;\n       if(tocmode==MODE_SILK_ONLY&&bw>OPUS_BANDWIDTH_WIDEBAND)\n          bw=OPUS_BANDWIDTH_WIDEBAND;\n       else if (tocmode==MODE_CELT_ONLY&&bw==OPUS_BANDWIDTH_MEDIUMBAND)\n          bw=OPUS_BANDWIDTH_NARROWBAND;\n       else if (bw<=OPUS_BANDWIDTH_SUPERWIDEBAND)\n          bw=OPUS_BANDWIDTH_SUPERWIDEBAND;\n       data[0] = gen_toc(tocmode, frame_rate, bw, st->stream_channels);\n       RESTORE_STACK;\n       return 1;\n    }\n    if (!st->use_vbr)\n    {\n       int cbrBytes;\n       cbrBytes = IMIN( (st->bitrate_bps + 4*frame_rate)/(8*frame_rate) , max_data_bytes);\n       st->bitrate_bps = cbrBytes * (8*frame_rate);\n       max_data_bytes = cbrBytes;\n    }\n    max_rate = frame_rate*max_data_bytes*8;\n\n    /* Equivalent 20-ms rate for mode/channel/bandwidth decisions */\n    equiv_rate = st->bitrate_bps - (40*st->channels+20)*(st->Fs/frame_size - 50);\n\n    if (st->signal_type == OPUS_SIGNAL_VOICE)\n       voice_est = 127;\n    else if (st->signal_type == OPUS_SIGNAL_MUSIC)\n       voice_est = 0;\n    else if (st->voice_ratio >= 0)\n    {\n       voice_est = st->voice_ratio*327>>8;\n       /* For AUDIO, never be more than 90% confident of having speech */\n       if (st->application == OPUS_APPLICATION_AUDIO)\n          voice_est = IMIN(voice_est, 115);\n    } else if (st->application == OPUS_APPLICATION_VOIP)\n       voice_est = 115;\n    else\n       voice_est = 48;\n\n    if (st->force_channels!=OPUS_AUTO && st->channels == 2)\n    {\n        st->stream_channels = st->force_channels;\n    } else {\n#ifdef FUZZING\n       /* Random mono/stereo decision */\n       if (st->channels == 2 && (rand()&0x1F)==0)\n          st->stream_channels = 3-st->stream_channels;\n#else\n       /* Rate-dependent mono-stereo decision */\n       if (st->channels == 2)\n       {\n          opus_int32 stereo_threshold;\n          stereo_threshold = stereo_music_threshold + ((voice_est*voice_est*(stereo_voice_threshold-stereo_music_threshold))>>14);\n          if (st->stream_channels == 2)\n             stereo_threshold -= 1000;\n          else\n             stereo_threshold += 1000;\n          st->stream_channels = (equiv_rate > stereo_threshold) ? 2 : 1;\n       } else {\n          st->stream_channels = st->channels;\n       }\n#endif\n    }\n    equiv_rate = st->bitrate_bps - (40*st->stream_channels+20)*(st->Fs/frame_size - 50);\n\n    /* Mode selection depending on application and signal type */\n    if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n    {\n       st->mode = MODE_CELT_ONLY;\n    } else if (st->user_forced_mode == OPUS_AUTO)\n    {\n#ifdef FUZZING\n       /* Random mode switching */\n       if ((rand()&0xF)==0)\n       {\n          if ((rand()&0x1)==0)\n             st->mode = MODE_CELT_ONLY;\n          else\n             st->mode = MODE_SILK_ONLY;\n       } else {\n          if (st->prev_mode==MODE_CELT_ONLY)\n             st->mode = MODE_CELT_ONLY;\n          else\n             st->mode = MODE_SILK_ONLY;\n       }\n#else\n       opus_int32 mode_voice, mode_music;\n       opus_int32 threshold;\n\n       /* Interpolate based on stereo width */\n       mode_voice = (opus_int32)(MULT16_32_Q15(Q15ONE-stereo_width,mode_thresholds[0][0])\n             + MULT16_32_Q15(stereo_width,mode_thresholds[1][0]));\n       mode_music = (opus_int32)(MULT16_32_Q15(Q15ONE-stereo_width,mode_thresholds[1][1])\n             + MULT16_32_Q15(stereo_width,mode_thresholds[1][1]));\n       /* Interpolate based on speech/music probability */\n       threshold = mode_music + ((voice_est*voice_est*(mode_voice-mode_music))>>14);\n       /* Bias towards SILK for VoIP because of some useful features */\n       if (st->application == OPUS_APPLICATION_VOIP)\n          threshold += 8000;\n\n       /*printf(\"%f %d\\n\", stereo_width/(float)Q15ONE, threshold);*/\n       /* Hysteresis */\n       if (st->prev_mode == MODE_CELT_ONLY)\n           threshold -= 4000;\n       else if (st->prev_mode>0)\n           threshold += 4000;\n\n       st->mode = (equiv_rate >= threshold) ? MODE_CELT_ONLY: MODE_SILK_ONLY;\n\n       /* When FEC is enabled and there's enough packet loss, use SILK */\n       if (st->silk_mode.useInBandFEC && st->silk_mode.packetLossPercentage > (128-voice_est)>>4)\n          st->mode = MODE_SILK_ONLY;\n       /* When encoding voice and DTX is enabled, set the encoder to SILK mode (at least for now) */\n       if (st->silk_mode.useDTX && voice_est > 100)\n          st->mode = MODE_SILK_ONLY;\n#endif\n    } else {\n       st->mode = st->user_forced_mode;\n    }\n\n    /* Override the chosen mode to make sure we meet the requested frame size */\n    if (st->mode != MODE_CELT_ONLY && frame_size < st->Fs/100)\n       st->mode = MODE_CELT_ONLY;\n    if (st->lfe)\n       st->mode = MODE_CELT_ONLY;\n    /* If max_data_bytes represents less than 8 kb/s, switch to CELT-only mode */\n    if (max_data_bytes < (frame_rate > 50 ? 12000 : 8000)*frame_size / (st->Fs * 8))\n       st->mode = MODE_CELT_ONLY;\n\n    if (st->stream_channels == 1 && st->prev_channels ==2 && st->silk_mode.toMono==0\n          && st->mode != MODE_CELT_ONLY && st->prev_mode != MODE_CELT_ONLY)\n    {\n       /* Delay stereo->mono transition by two frames so that SILK can do a smooth downmix */\n       st->silk_mode.toMono = 1;\n       st->stream_channels = 2;\n    } else {\n       st->silk_mode.toMono = 0;\n    }\n\n    if (st->prev_mode > 0 &&\n        ((st->mode != MODE_CELT_ONLY && st->prev_mode == MODE_CELT_ONLY) ||\n    (st->mode == MODE_CELT_ONLY && st->prev_mode != MODE_CELT_ONLY)))\n    {\n        redundancy = 1;\n        celt_to_silk = (st->mode != MODE_CELT_ONLY);\n        if (!celt_to_silk)\n        {\n            /* Switch to SILK/hybrid if frame size is 10 ms or more*/\n            if (frame_size >= st->Fs/100)\n            {\n                st->mode = st->prev_mode;\n                to_celt = 1;\n            } else {\n                redundancy=0;\n            }\n        }\n    }\n    /* For the first frame at a new SILK bandwidth */\n    if (st->silk_bw_switch)\n    {\n       redundancy = 1;\n       celt_to_silk = 1;\n       st->silk_bw_switch = 0;\n       prefill=1;\n    }\n\n    if (redundancy)\n    {\n       /* Fair share of the max size allowed */\n       redundancy_bytes = IMIN(257, max_data_bytes*(opus_int32)(st->Fs/200)/(frame_size+st->Fs/200));\n       /* For VBR, target the actual bitrate (subject to the limit above) */\n       if (st->use_vbr)\n          redundancy_bytes = IMIN(redundancy_bytes, st->bitrate_bps/1600);\n    }\n\n    if (st->mode != MODE_CELT_ONLY && st->prev_mode == MODE_CELT_ONLY)\n    {\n        silk_EncControlStruct dummy;\n        silk_InitEncoder( silk_enc, st->arch, &dummy);\n        prefill=1;\n    }\n\n    /* Automatic (rate-dependent) bandwidth selection */\n    if (st->mode == MODE_CELT_ONLY || st->first || st->silk_mode.allowBandwidthSwitch)\n    {\n        const opus_int32 *voice_bandwidth_thresholds, *music_bandwidth_thresholds;\n        opus_int32 bandwidth_thresholds[8];\n        int bandwidth = OPUS_BANDWIDTH_FULLBAND;\n        opus_int32 equiv_rate2;\n\n        equiv_rate2 = equiv_rate;\n        if (st->mode != MODE_CELT_ONLY)\n        {\n           /* Adjust the threshold +/- 10% depending on complexity */\n           equiv_rate2 = equiv_rate2 * (45+st->silk_mode.complexity)/50;\n           /* CBR is less efficient by ~1 kb/s */\n           if (!st->use_vbr)\n              equiv_rate2 -= 1000;\n        }\n        if (st->channels==2 && st->force_channels!=1)\n        {\n           voice_bandwidth_thresholds = stereo_voice_bandwidth_thresholds;\n           music_bandwidth_thresholds = stereo_music_bandwidth_thresholds;\n        } else {\n           voice_bandwidth_thresholds = mono_voice_bandwidth_thresholds;\n           music_bandwidth_thresholds = mono_music_bandwidth_thresholds;\n        }\n        /* Interpolate bandwidth thresholds depending on voice estimation */\n        for (i=0;i<8;i++)\n        {\n           bandwidth_thresholds[i] = music_bandwidth_thresholds[i]\n                    + ((voice_est*voice_est*(voice_bandwidth_thresholds[i]-music_bandwidth_thresholds[i]))>>14);\n        }\n        do {\n            int threshold, hysteresis;\n            threshold = bandwidth_thresholds[2*(bandwidth-OPUS_BANDWIDTH_MEDIUMBAND)];\n            hysteresis = bandwidth_thresholds[2*(bandwidth-OPUS_BANDWIDTH_MEDIUMBAND)+1];\n            if (!st->first)\n            {\n                if (st->bandwidth >= bandwidth)\n                    threshold -= hysteresis;\n                else\n                    threshold += hysteresis;\n            }\n            if (equiv_rate2 >= threshold)\n                break;\n        } while (--bandwidth>OPUS_BANDWIDTH_NARROWBAND);\n        st->bandwidth = bandwidth;\n        /* Prevents any transition to SWB/FB until the SILK layer has fully\n           switched to WB mode and turned the variable LP filter off */\n        if (!st->first && st->mode != MODE_CELT_ONLY && !st->silk_mode.inWBmodeWithoutVariableLP && st->bandwidth > OPUS_BANDWIDTH_WIDEBAND)\n            st->bandwidth = OPUS_BANDWIDTH_WIDEBAND;\n    }\n\n    if (st->bandwidth>st->max_bandwidth)\n       st->bandwidth = st->max_bandwidth;\n\n    if (st->user_bandwidth != OPUS_AUTO)\n        st->bandwidth = st->user_bandwidth;\n\n    /* This prevents us from using hybrid at unsafe CBR/max rates */\n    if (st->mode != MODE_CELT_ONLY && max_rate < 15000)\n    {\n       st->bandwidth = IMIN(st->bandwidth, OPUS_BANDWIDTH_WIDEBAND);\n    }\n\n    /* Prevents Opus from wasting bits on frequencies that are above\n       the Nyquist rate of the input signal */\n    if (st->Fs <= 24000 && st->bandwidth > OPUS_BANDWIDTH_SUPERWIDEBAND)\n        st->bandwidth = OPUS_BANDWIDTH_SUPERWIDEBAND;\n    if (st->Fs <= 16000 && st->bandwidth > OPUS_BANDWIDTH_WIDEBAND)\n        st->bandwidth = OPUS_BANDWIDTH_WIDEBAND;\n    if (st->Fs <= 12000 && st->bandwidth > OPUS_BANDWIDTH_MEDIUMBAND)\n        st->bandwidth = OPUS_BANDWIDTH_MEDIUMBAND;\n    if (st->Fs <= 8000 && st->bandwidth > OPUS_BANDWIDTH_NARROWBAND)\n        st->bandwidth = OPUS_BANDWIDTH_NARROWBAND;\n#ifndef DISABLE_FLOAT_API\n    /* Use detected bandwidth to reduce the encoded bandwidth. */\n    if (st->detected_bandwidth && st->user_bandwidth == OPUS_AUTO)\n    {\n       int min_detected_bandwidth;\n       /* Makes bandwidth detection more conservative just in case the detector\n          gets it wrong when we could have coded a high bandwidth transparently.\n          When operating in SILK/hybrid mode, we don't go below wideband to avoid\n          more complicated switches that require redundancy. */\n       if (equiv_rate <= 18000*st->stream_channels && st->mode == MODE_CELT_ONLY)\n          min_detected_bandwidth = OPUS_BANDWIDTH_NARROWBAND;\n       else if (equiv_rate <= 24000*st->stream_channels && st->mode == MODE_CELT_ONLY)\n          min_detected_bandwidth = OPUS_BANDWIDTH_MEDIUMBAND;\n       else if (equiv_rate <= 30000*st->stream_channels)\n          min_detected_bandwidth = OPUS_BANDWIDTH_WIDEBAND;\n       else if (equiv_rate <= 44000*st->stream_channels)\n          min_detected_bandwidth = OPUS_BANDWIDTH_SUPERWIDEBAND;\n       else\n          min_detected_bandwidth = OPUS_BANDWIDTH_FULLBAND;\n\n       st->detected_bandwidth = IMAX(st->detected_bandwidth, min_detected_bandwidth);\n       st->bandwidth = IMIN(st->bandwidth, st->detected_bandwidth);\n    }\n#endif\n    celt_encoder_ctl(celt_enc, OPUS_SET_LSB_DEPTH(lsb_depth));\n\n    /* CELT mode doesn't support mediumband, use wideband instead */\n    if (st->mode == MODE_CELT_ONLY && st->bandwidth == OPUS_BANDWIDTH_MEDIUMBAND)\n        st->bandwidth = OPUS_BANDWIDTH_WIDEBAND;\n    if (st->lfe)\n       st->bandwidth = OPUS_BANDWIDTH_NARROWBAND;\n\n    /* Can't support higher than wideband for >20 ms frames */\n    if (frame_size > st->Fs/50 && (st->mode == MODE_CELT_ONLY || st->bandwidth > OPUS_BANDWIDTH_WIDEBAND))\n    {\n       VARDECL(unsigned char, tmp_data);\n       int nb_frames;\n       int bak_mode, bak_bandwidth, bak_channels, bak_to_mono;\n       VARDECL(OpusRepacketizer, rp);\n       opus_int32 bytes_per_frame;\n       opus_int32 repacketize_len;\n\n#ifndef DISABLE_FLOAT_API\n       if (analysis_read_pos_bak!= -1)\n       {\n          st->analysis.read_pos = analysis_read_pos_bak;\n          st->analysis.read_subframe = analysis_read_subframe_bak;\n       }\n#endif\n\n       nb_frames = frame_size > st->Fs/25 ? 3 : 2;\n       bytes_per_frame = IMIN(1276,(out_data_bytes-3)/nb_frames);\n\n       ALLOC(tmp_data, nb_frames*bytes_per_frame, unsigned char);\n\n       ALLOC(rp, 1, OpusRepacketizer);\n       opus_repacketizer_init(rp);\n\n       bak_mode = st->user_forced_mode;\n       bak_bandwidth = st->user_bandwidth;\n       bak_channels = st->force_channels;\n\n       st->user_forced_mode = st->mode;\n       st->user_bandwidth = st->bandwidth;\n       st->force_channels = st->stream_channels;\n       bak_to_mono = st->silk_mode.toMono;\n\n       if (bak_to_mono)\n          st->force_channels = 1;\n       else\n          st->prev_channels = st->stream_channels;\n       for (i=0;i<nb_frames;i++)\n       {\n          int tmp_len;\n          st->silk_mode.toMono = 0;\n          /* When switching from SILK/Hybrid to CELT, only ask for a switch at the last frame */\n          if (to_celt && i==nb_frames-1)\n             st->user_forced_mode = MODE_CELT_ONLY;\n          tmp_len = opus_encode_native(st, pcm+i*(st->channels*st->Fs/50), st->Fs/50,\n                tmp_data+i*bytes_per_frame, bytes_per_frame, lsb_depth,\n                NULL, 0, c1, c2, analysis_channels, downmix);\n          if (tmp_len<0)\n          {\n             RESTORE_STACK;\n             return OPUS_INTERNAL_ERROR;\n          }\n          ret = opus_repacketizer_cat(rp, tmp_data+i*bytes_per_frame, tmp_len);\n          if (ret<0)\n          {\n             RESTORE_STACK;\n             return OPUS_INTERNAL_ERROR;\n          }\n       }\n       if (st->use_vbr)\n          repacketize_len = out_data_bytes;\n       else\n          repacketize_len = IMIN(3*st->bitrate_bps/(3*8*50/nb_frames), out_data_bytes);\n       ret = opus_repacketizer_out_range_impl(rp, 0, nb_frames, data, repacketize_len, 0, !st->use_vbr);\n       if (ret<0)\n       {\n          RESTORE_STACK;\n          return OPUS_INTERNAL_ERROR;\n       }\n       st->user_forced_mode = bak_mode;\n       st->user_bandwidth = bak_bandwidth;\n       st->force_channels = bak_channels;\n       st->silk_mode.toMono = bak_to_mono;\n       RESTORE_STACK;\n       return ret;\n    }\n    curr_bandwidth = st->bandwidth;\n\n    /* Chooses the appropriate mode for speech\n       *NEVER* switch to/from CELT-only mode here as this will invalidate some assumptions */\n    if (st->mode == MODE_SILK_ONLY && curr_bandwidth > OPUS_BANDWIDTH_WIDEBAND)\n        st->mode = MODE_HYBRID;\n    if (st->mode == MODE_HYBRID && curr_bandwidth <= OPUS_BANDWIDTH_WIDEBAND)\n        st->mode = MODE_SILK_ONLY;\n\n    /* printf(\"%d %d %d %d\\n\", st->bitrate_bps, st->stream_channels, st->mode, curr_bandwidth); */\n    bytes_target = IMIN(max_data_bytes-redundancy_bytes, st->bitrate_bps * frame_size / (st->Fs * 8)) - 1;\n\n    data += 1;\n\n    ec_enc_init(&enc, data, max_data_bytes-1);\n\n    ALLOC(pcm_buf, (total_buffer+frame_size)*st->channels, opus_val16);\n    for (i=0;i<total_buffer*st->channels;i++)\n       pcm_buf[i] = st->delay_buffer[(st->encoder_buffer-total_buffer)*st->channels+i];\n\n    if (st->mode == MODE_CELT_ONLY)\n       hp_freq_smth1 = silk_LSHIFT( silk_lin2log( VARIABLE_HP_MIN_CUTOFF_HZ ), 8 );\n    else\n       hp_freq_smth1 = ((silk_encoder*)silk_enc)->state_Fxx[0].sCmn.variable_HP_smth1_Q15;\n\n    st->variable_HP_smth2_Q15 = silk_SMLAWB( st->variable_HP_smth2_Q15,\n          hp_freq_smth1 - st->variable_HP_smth2_Q15, SILK_FIX_CONST( VARIABLE_HP_SMTH_COEF2, 16 ) );\n\n    /* convert from log scale to Hertz */\n    cutoff_Hz = silk_log2lin( silk_RSHIFT( st->variable_HP_smth2_Q15, 8 ) );\n\n    if (st->application == OPUS_APPLICATION_VOIP)\n    {\n       hp_cutoff(pcm, cutoff_Hz, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs);\n    } else {\n       dc_reject(pcm, 3, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs);\n    }\n\n\n\n    /* SILK processing */\n    HB_gain = Q15ONE;\n    if (st->mode != MODE_CELT_ONLY)\n    {\n        opus_int32 total_bitRate, celt_rate;\n#ifdef FIXED_POINT\n       const opus_int16 *pcm_silk;\n#else\n       VARDECL(opus_int16, pcm_silk);\n       ALLOC(pcm_silk, st->channels*frame_size, opus_int16);\n#endif\n\n        /* Distribute bits between SILK and CELT */\n        total_bitRate = 8 * bytes_target * frame_rate;\n        if( st->mode == MODE_HYBRID ) {\n            int HB_gain_ref;\n            /* Base rate for SILK */\n            st->silk_mode.bitRate = st->stream_channels * ( 5000 + 1000 * ( st->Fs == 100 * frame_size ) );\n            if( curr_bandwidth == OPUS_BANDWIDTH_SUPERWIDEBAND ) {\n                /* SILK gets 2/3 of the remaining bits */\n                st->silk_mode.bitRate += ( total_bitRate - st->silk_mode.bitRate ) * 2 / 3;\n            } else { /* FULLBAND */\n                /* SILK gets 3/5 of the remaining bits */\n                st->silk_mode.bitRate += ( total_bitRate - st->silk_mode.bitRate ) * 3 / 5;\n            }\n            /* Don't let SILK use more than 80% */\n            if( st->silk_mode.bitRate > total_bitRate * 4/5 ) {\n                st->silk_mode.bitRate = total_bitRate * 4/5;\n            }\n            if (!st->energy_masking)\n            {\n               /* Increasingly attenuate high band when it gets allocated fewer bits */\n               celt_rate = total_bitRate - st->silk_mode.bitRate;\n               HB_gain_ref = (curr_bandwidth == OPUS_BANDWIDTH_SUPERWIDEBAND) ? 3000 : 3600;\n               HB_gain = SHL32((opus_val32)celt_rate, 9) / SHR32((opus_val32)celt_rate + st->stream_channels * HB_gain_ref, 6);\n               HB_gain = HB_gain < Q15ONE*6/7 ? HB_gain + Q15ONE/7 : Q15ONE;\n            }\n        } else {\n            /* SILK gets all bits */\n            st->silk_mode.bitRate = total_bitRate;\n        }\n\n        /* Surround masking for SILK */\n        if (st->energy_masking && st->use_vbr && !st->lfe)\n        {\n           opus_val32 mask_sum=0;\n           opus_val16 masking_depth;\n           opus_int32 rate_offset;\n           int c;\n           int end = 17;\n           opus_int16 srate = 16000;\n           if (st->bandwidth == OPUS_BANDWIDTH_NARROWBAND)\n           {\n              end = 13;\n              srate = 8000;\n           } else if (st->bandwidth == OPUS_BANDWIDTH_MEDIUMBAND)\n           {\n              end = 15;\n              srate = 12000;\n           }\n           for (c=0;c<st->channels;c++)\n           {\n              for(i=0;i<end;i++)\n              {\n                 opus_val16 mask;\n                 mask = MAX16(MIN16(st->energy_masking[21*c+i],\n                        QCONST16(.5f, DB_SHIFT)), -QCONST16(2.0f, DB_SHIFT));\n                 if (mask > 0)\n                    mask = HALF16(mask);\n                 mask_sum += mask;\n              }\n           }\n           /* Conservative rate reduction, we cut the masking in half */\n           masking_depth = mask_sum / end*st->channels;\n           masking_depth += QCONST16(.2f, DB_SHIFT);\n           rate_offset = (opus_int32)PSHR32(MULT16_16(srate, masking_depth), DB_SHIFT);\n           rate_offset = MAX32(rate_offset, -2*st->silk_mode.bitRate/3);\n           /* Split the rate change between the SILK and CELT part for hybrid. */\n           if (st->bandwidth==OPUS_BANDWIDTH_SUPERWIDEBAND || st->bandwidth==OPUS_BANDWIDTH_FULLBAND)\n              st->silk_mode.bitRate += 3*rate_offset/5;\n           else\n              st->silk_mode.bitRate += rate_offset;\n           bytes_target += rate_offset * frame_size / (8 * st->Fs);\n        }\n\n        st->silk_mode.payloadSize_ms = 1000 * frame_size / st->Fs;\n        st->silk_mode.nChannelsAPI = st->channels;\n        st->silk_mode.nChannelsInternal = st->stream_channels;\n        if (curr_bandwidth == OPUS_BANDWIDTH_NARROWBAND) {\n            st->silk_mode.desiredInternalSampleRate = 8000;\n        } else if (curr_bandwidth == OPUS_BANDWIDTH_MEDIUMBAND) {\n            st->silk_mode.desiredInternalSampleRate = 12000;\n        } else {\n            silk_assert( st->mode == MODE_HYBRID || curr_bandwidth == OPUS_BANDWIDTH_WIDEBAND );\n            st->silk_mode.desiredInternalSampleRate = 16000;\n        }\n        if( st->mode == MODE_HYBRID ) {\n            /* Don't allow bandwidth reduction at lowest bitrates in hybrid mode */\n            st->silk_mode.minInternalSampleRate = 16000;\n        } else {\n            st->silk_mode.minInternalSampleRate = 8000;\n        }\n\n        if (st->mode == MODE_SILK_ONLY)\n        {\n           opus_int32 effective_max_rate = max_rate;\n           st->silk_mode.maxInternalSampleRate = 16000;\n           if (frame_rate > 50)\n              effective_max_rate = effective_max_rate*2/3;\n           if (effective_max_rate < 13000)\n           {\n              st->silk_mode.maxInternalSampleRate = 12000;\n              st->silk_mode.desiredInternalSampleRate = IMIN(12000, st->silk_mode.desiredInternalSampleRate);\n           }\n           if (effective_max_rate < 9600)\n           {\n              st->silk_mode.maxInternalSampleRate = 8000;\n              st->silk_mode.desiredInternalSampleRate = IMIN(8000, st->silk_mode.desiredInternalSampleRate);\n           }\n        } else {\n           st->silk_mode.maxInternalSampleRate = 16000;\n        }\n\n        st->silk_mode.useCBR = !st->use_vbr;\n\n        /* Call SILK encoder for the low band */\n        nBytes = IMIN(1275, max_data_bytes-1-redundancy_bytes);\n\n        st->silk_mode.maxBits = nBytes*8;\n        /* Only allow up to 90% of the bits for hybrid mode*/\n        if (st->mode == MODE_HYBRID)\n           st->silk_mode.maxBits = (opus_int32)st->silk_mode.maxBits*9/10;\n        if (st->silk_mode.useCBR)\n        {\n           st->silk_mode.maxBits = (st->silk_mode.bitRate * frame_size / (st->Fs * 8))*8;\n           /* Reduce the initial target to make it easier to reach the CBR rate */\n           st->silk_mode.bitRate = IMAX(1, st->silk_mode.bitRate-2000);\n        }\n\n        if (prefill)\n        {\n            opus_int32 zero=0;\n            int prefill_offset;\n            /* Use a smooth onset for the SILK prefill to avoid the encoder trying to encode\n               a discontinuity. The exact location is what we need to avoid leaving any \"gap\"\n               in the audio when mixing with the redundant CELT frame. Here we can afford to\n               overwrite st->delay_buffer because the only thing that uses it before it gets\n               rewritten is tmp_prefill[] and even then only the part after the ramp really\n               gets used (rather than sent to the encoder and discarded) */\n            prefill_offset = st->channels*(st->encoder_buffer-st->delay_compensation-st->Fs/400);\n            gain_fade(st->delay_buffer+prefill_offset, st->delay_buffer+prefill_offset,\n                  0, Q15ONE, celt_mode->overlap, st->Fs/400, st->channels, celt_mode->window, st->Fs);\n            for(i=0;i<prefill_offset;i++)\n               st->delay_buffer[i]=0;\n#ifdef FIXED_POINT\n            pcm_silk = st->delay_buffer;\n#else\n            for (i=0;i<st->encoder_buffer*st->channels;i++)\n                pcm_silk[i] = FLOAT2INT16(st->delay_buffer[i]);\n#endif\n            silk_Encode( silk_enc, &st->silk_mode, pcm_silk, st->encoder_buffer, NULL, &zero, 1 );\n        }\n\n#ifdef FIXED_POINT\n        pcm_silk = pcm_buf+total_buffer*st->channels;\n#else\n        for (i=0;i<frame_size*st->channels;i++)\n            pcm_silk[i] = FLOAT2INT16(pcm_buf[total_buffer*st->channels + i]);\n#endif\n        ret = silk_Encode( silk_enc, &st->silk_mode, pcm_silk, frame_size, &enc, &nBytes, 0 );\n        if( ret ) {\n            /*fprintf (stderr, \"SILK encode error: %d\\n\", ret);*/\n            /* Handle error */\n           RESTORE_STACK;\n           return OPUS_INTERNAL_ERROR;\n        }\n        if (nBytes==0)\n        {\n           st->rangeFinal = 0;\n           data[-1] = gen_toc(st->mode, st->Fs/frame_size, curr_bandwidth, st->stream_channels);\n           RESTORE_STACK;\n           return 1;\n        }\n        /* Extract SILK internal bandwidth for signaling in first byte */\n        if( st->mode == MODE_SILK_ONLY ) {\n            if( st->silk_mode.internalSampleRate == 8000 ) {\n               curr_bandwidth = OPUS_BANDWIDTH_NARROWBAND;\n            } else if( st->silk_mode.internalSampleRate == 12000 ) {\n               curr_bandwidth = OPUS_BANDWIDTH_MEDIUMBAND;\n            } else if( st->silk_mode.internalSampleRate == 16000 ) {\n               curr_bandwidth = OPUS_BANDWIDTH_WIDEBAND;\n            }\n        } else {\n            silk_assert( st->silk_mode.internalSampleRate == 16000 );\n        }\n\n        st->silk_mode.opusCanSwitch = st->silk_mode.switchReady;\n        /* FIXME: How do we allocate the redundancy for CBR? */\n        if (st->silk_mode.opusCanSwitch)\n        {\n           redundancy = 1;\n           celt_to_silk = 0;\n           st->silk_bw_switch = 1;\n        }\n    }\n\n    /* CELT processing */\n    {\n        int endband=21;\n\n        switch(curr_bandwidth)\n        {\n            case OPUS_BANDWIDTH_NARROWBAND:\n                endband = 13;\n                break;\n            case OPUS_BANDWIDTH_MEDIUMBAND:\n            case OPUS_BANDWIDTH_WIDEBAND:\n                endband = 17;\n                break;\n            case OPUS_BANDWIDTH_SUPERWIDEBAND:\n                endband = 19;\n                break;\n            case OPUS_BANDWIDTH_FULLBAND:\n                endband = 21;\n                break;\n        }\n        celt_encoder_ctl(celt_enc, CELT_SET_END_BAND(endband));\n        celt_encoder_ctl(celt_enc, CELT_SET_CHANNELS(st->stream_channels));\n    }\n    celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(OPUS_BITRATE_MAX));\n    if (st->mode != MODE_SILK_ONLY)\n    {\n        opus_val32 celt_pred=2;\n        celt_encoder_ctl(celt_enc, OPUS_SET_VBR(0));\n        /* We may still decide to disable prediction later */\n        if (st->silk_mode.reducedDependency)\n           celt_pred = 0;\n        celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(celt_pred));\n\n        if (st->mode == MODE_HYBRID)\n        {\n            int len;\n\n            len = (ec_tell(&enc)+7)>>3;\n            if (redundancy)\n               len += st->mode == MODE_HYBRID ? 3 : 1;\n            if( st->use_vbr ) {\n                nb_compr_bytes = len + bytes_target - (st->silk_mode.bitRate * frame_size) / (8 * st->Fs);\n            } else {\n                /* check if SILK used up too much */\n                nb_compr_bytes = len > bytes_target ? len : bytes_target;\n            }\n        } else {\n            if (st->use_vbr)\n            {\n                opus_int32 bonus=0;\n#ifndef DISABLE_FLOAT_API\n                if (st->variable_duration==OPUS_FRAMESIZE_VARIABLE && frame_size != st->Fs/50)\n                {\n                   bonus = (60*st->stream_channels+40)*(st->Fs/frame_size-50);\n                   if (analysis_info.valid)\n                      bonus = (opus_int32)(bonus*(1.f+.5f*analysis_info.tonality));\n                }\n#endif\n                celt_encoder_ctl(celt_enc, OPUS_SET_VBR(1));\n                celt_encoder_ctl(celt_enc, OPUS_SET_VBR_CONSTRAINT(st->vbr_constraint));\n                celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(st->bitrate_bps+bonus));\n                nb_compr_bytes = max_data_bytes-1-redundancy_bytes;\n            } else {\n                nb_compr_bytes = bytes_target;\n            }\n        }\n\n    } else {\n        nb_compr_bytes = 0;\n    }\n\n    ALLOC(tmp_prefill, st->channels*st->Fs/400, opus_val16);\n    if (st->mode != MODE_SILK_ONLY && st->mode != st->prev_mode && st->prev_mode > 0)\n    {\n       for (i=0;i<st->channels*st->Fs/400;i++)\n          tmp_prefill[i] = st->delay_buffer[(st->encoder_buffer-total_buffer-st->Fs/400)*st->channels + i];\n    }\n\n    for (i=0;i<st->channels*(st->encoder_buffer-(frame_size+total_buffer));i++)\n        st->delay_buffer[i] = st->delay_buffer[i+st->channels*frame_size];\n    for (;i<st->encoder_buffer*st->channels;i++)\n        st->delay_buffer[i] = pcm_buf[(frame_size+total_buffer-st->encoder_buffer)*st->channels+i];\n\n    /* gain_fade() and stereo_fade() need to be after the buffer copying\n       because we don't want any of this to affect the SILK part */\n    if( st->prev_HB_gain < Q15ONE || HB_gain < Q15ONE ) {\n       gain_fade(pcm_buf, pcm_buf,\n             st->prev_HB_gain, HB_gain, celt_mode->overlap, frame_size, st->channels, celt_mode->window, st->Fs);\n    }\n    st->prev_HB_gain = HB_gain;\n    if (st->mode != MODE_HYBRID || st->stream_channels==1)\n       st->silk_mode.stereoWidth_Q14 = IMIN((1<<14),2*IMAX(0,equiv_rate-30000));\n    if( !st->energy_masking && st->channels == 2 ) {\n        /* Apply stereo width reduction (at low bitrates) */\n        if( st->hybrid_stereo_width_Q14 < (1 << 14) || st->silk_mode.stereoWidth_Q14 < (1 << 14) ) {\n            opus_val16 g1, g2;\n            g1 = st->hybrid_stereo_width_Q14;\n            g2 = (opus_val16)(st->silk_mode.stereoWidth_Q14);\n#ifdef FIXED_POINT\n            g1 = g1==16384 ? Q15ONE : SHL16(g1,1);\n            g2 = g2==16384 ? Q15ONE : SHL16(g2,1);\n#else\n            g1 *= (1.f/16384);\n            g2 *= (1.f/16384);\n#endif\n            stereo_fade(pcm_buf, pcm_buf, g1, g2, celt_mode->overlap,\n                  frame_size, st->channels, celt_mode->window, st->Fs);\n            st->hybrid_stereo_width_Q14 = st->silk_mode.stereoWidth_Q14;\n        }\n    }\n\n    if ( st->mode != MODE_CELT_ONLY && ec_tell(&enc)+17+20*(st->mode == MODE_HYBRID) <= 8*(max_data_bytes-1))\n    {\n        /* For SILK mode, the redundancy is inferred from the length */\n        if (st->mode == MODE_HYBRID && (redundancy || ec_tell(&enc)+37 <= 8*nb_compr_bytes))\n           ec_enc_bit_logp(&enc, redundancy, 12);\n        if (redundancy)\n        {\n            int max_redundancy;\n            ec_enc_bit_logp(&enc, celt_to_silk, 1);\n            if (st->mode == MODE_HYBRID)\n               max_redundancy = (max_data_bytes-1)-nb_compr_bytes;\n            else\n               max_redundancy = (max_data_bytes-1)-((ec_tell(&enc)+7)>>3);\n            /* Target the same bit-rate for redundancy as for the rest,\n               up to a max of 257 bytes */\n            redundancy_bytes = IMIN(max_redundancy, st->bitrate_bps/1600);\n            redundancy_bytes = IMIN(257, IMAX(2, redundancy_bytes));\n            if (st->mode == MODE_HYBRID)\n                ec_enc_uint(&enc, redundancy_bytes-2, 256);\n        }\n    } else {\n        redundancy = 0;\n    }\n\n    if (!redundancy)\n    {\n       st->silk_bw_switch = 0;\n       redundancy_bytes = 0;\n    }\n    if (st->mode != MODE_CELT_ONLY)start_band=17;\n\n    if (st->mode == MODE_SILK_ONLY)\n    {\n        ret = (ec_tell(&enc)+7)>>3;\n        ec_enc_done(&enc);\n        nb_compr_bytes = ret;\n    } else {\n       nb_compr_bytes = IMIN((max_data_bytes-1)-redundancy_bytes, nb_compr_bytes);\n       ec_enc_shrink(&enc, nb_compr_bytes);\n    }\n\n#ifndef DISABLE_FLOAT_API\n    if (redundancy || st->mode != MODE_SILK_ONLY)\n       celt_encoder_ctl(celt_enc, CELT_SET_ANALYSIS(&analysis_info));\n#endif\n\n    /* 5 ms redundant frame for CELT->SILK */\n    if (redundancy && celt_to_silk)\n    {\n        int err;\n        celt_encoder_ctl(celt_enc, CELT_SET_START_BAND(0));\n        celt_encoder_ctl(celt_enc, OPUS_SET_VBR(0));\n        err = celt_encode_with_ec(celt_enc, pcm_buf, st->Fs/200, data+nb_compr_bytes, redundancy_bytes, NULL);\n        if (err < 0)\n        {\n           RESTORE_STACK;\n           return OPUS_INTERNAL_ERROR;\n        }\n        celt_encoder_ctl(celt_enc, OPUS_GET_FINAL_RANGE(&redundant_rng));\n        celt_encoder_ctl(celt_enc, OPUS_RESET_STATE);\n    }\n\n    celt_encoder_ctl(celt_enc, CELT_SET_START_BAND(start_band));\n\n    if (st->mode != MODE_SILK_ONLY)\n    {\n        if (st->mode != st->prev_mode && st->prev_mode > 0)\n        {\n           unsigned char dummy[2];\n           celt_encoder_ctl(celt_enc, OPUS_RESET_STATE);\n\n           /* Prefilling */\n           celt_encode_with_ec(celt_enc, tmp_prefill, st->Fs/400, dummy, 2, NULL);\n           celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(0));\n        }\n        /* If false, we already busted the budget and we'll end up with a \"PLC packet\" */\n        if (ec_tell(&enc) <= 8*nb_compr_bytes)\n        {\n           ret = celt_encode_with_ec(celt_enc, pcm_buf, frame_size, NULL, nb_compr_bytes, &enc);\n           if (ret < 0)\n           {\n              RESTORE_STACK;\n              return OPUS_INTERNAL_ERROR;\n           }\n        }\n    }\n\n    /* 5 ms redundant frame for SILK->CELT */\n    if (redundancy && !celt_to_silk)\n    {\n        int err;\n        unsigned char dummy[2];\n        int N2, N4;\n        N2 = st->Fs/200;\n        N4 = st->Fs/400;\n\n        celt_encoder_ctl(celt_enc, OPUS_RESET_STATE);\n        celt_encoder_ctl(celt_enc, CELT_SET_START_BAND(0));\n        celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(0));\n\n        /* NOTE: We could speed this up slightly (at the expense of code size) by just adding a function that prefills the buffer */\n        celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2-N4), N4, dummy, 2, NULL);\n\n        err = celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2), N2, data+nb_compr_bytes, redundancy_bytes, NULL);\n        if (err < 0)\n        {\n           RESTORE_STACK;\n           return OPUS_INTERNAL_ERROR;\n        }\n        celt_encoder_ctl(celt_enc, OPUS_GET_FINAL_RANGE(&redundant_rng));\n    }\n\n\n\n    /* Signalling the mode in the first byte */\n    data--;\n    data[0] = gen_toc(st->mode, st->Fs/frame_size, curr_bandwidth, st->stream_channels);\n\n    st->rangeFinal = enc.rng ^ redundant_rng;\n\n    if (to_celt)\n        st->prev_mode = MODE_CELT_ONLY;\n    else\n        st->prev_mode = st->mode;\n    st->prev_channels = st->stream_channels;\n    st->prev_framesize = frame_size;\n\n    st->first = 0;\n\n    /* In the unlikely case that the SILK encoder busted its target, tell\n       the decoder to call the PLC */\n    if (ec_tell(&enc) > (max_data_bytes-1)*8)\n    {\n       if (max_data_bytes < 2)\n       {\n          RESTORE_STACK;\n          return OPUS_BUFFER_TOO_SMALL;\n       }\n       data[1] = 0;\n       ret = 1;\n       st->rangeFinal = 0;\n    } else if (st->mode==MODE_SILK_ONLY&&!redundancy)\n    {\n       /*When in LPC only mode it's perfectly\n         reasonable to strip off trailing zero bytes as\n         the required range decoder behavior is to\n         fill these in. This can't be done when the MDCT\n         modes are used because the decoder needs to know\n         the actual length for allocation purposes.*/\n       while(ret>2&&data[ret]==0)ret--;\n    }\n    /* Count ToC and redundancy */\n    ret += 1+redundancy_bytes;\n    if (!st->use_vbr)\n    {\n       if (opus_packet_pad(data, ret, max_data_bytes) != OPUS_OK)\n\n       {\n          RESTORE_STACK;\n          return OPUS_INTERNAL_ERROR;\n       }\n       ret = max_data_bytes;\n    }\n    RESTORE_STACK;\n    return ret;\n}\n\n#ifdef FIXED_POINT\n\n#ifndef DISABLE_FLOAT_API\nopus_int32 opus_encode_float(OpusEncoder *st, const float *pcm, int analysis_frame_size,\n      unsigned char *data, opus_int32 max_data_bytes)\n{\n   int i, ret;\n   int frame_size;\n   int delay_compensation;\n   VARDECL(opus_int16, in);\n   ALLOC_STACK;\n\n   if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n      delay_compensation = 0;\n   else\n      delay_compensation = st->delay_compensation;\n   frame_size = compute_frame_size(pcm, analysis_frame_size,\n         st->variable_duration, st->channels, st->Fs, st->bitrate_bps,\n         delay_compensation, downmix_float, st->analysis.subframe_mem);\n\n   ALLOC(in, frame_size*st->channels, opus_int16);\n\n   for (i=0;i<frame_size*st->channels;i++)\n      in[i] = FLOAT2INT16(pcm[i]);\n   ret = opus_encode_native(st, in, frame_size, data, max_data_bytes, 16, pcm, analysis_frame_size, 0, -2, st->channels, downmix_float);\n   RESTORE_STACK;\n   return ret;\n}\n#endif\n\nopus_int32 opus_encode(OpusEncoder *st, const opus_int16 *pcm, int analysis_frame_size,\n                unsigned char *data, opus_int32 out_data_bytes)\n{\n   int frame_size;\n   int delay_compensation;\n   if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n      delay_compensation = 0;\n   else\n      delay_compensation = st->delay_compensation;\n   frame_size = compute_frame_size(pcm, analysis_frame_size,\n         st->variable_duration, st->channels, st->Fs, st->bitrate_bps,\n         delay_compensation, downmix_int\n#ifndef DISABLE_FLOAT_API\n         , st->analysis.subframe_mem\n#endif\n         );\n   return opus_encode_native(st, pcm, frame_size, data, out_data_bytes, 16, pcm, analysis_frame_size, 0, -2, st->channels, downmix_int);\n}\n\n#else\nopus_int32 opus_encode(OpusEncoder *st, const opus_int16 *pcm, int analysis_frame_size,\n      unsigned char *data, opus_int32 max_data_bytes)\n{\n   int i, ret;\n   int frame_size;\n   int delay_compensation;\n   VARDECL(float, in);\n   ALLOC_STACK;\n\n   if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n      delay_compensation = 0;\n   else\n      delay_compensation = st->delay_compensation;\n   frame_size = compute_frame_size(pcm, analysis_frame_size,\n         st->variable_duration, st->channels, st->Fs, st->bitrate_bps,\n         delay_compensation, downmix_int, st->analysis.subframe_mem);\n\n   ALLOC(in, frame_size*st->channels, float);\n\n   for (i=0;i<frame_size*st->channels;i++)\n      in[i] = (1.0f/32768)*pcm[i];\n   ret = opus_encode_native(st, in, frame_size, data, max_data_bytes, 16, pcm, analysis_frame_size, 0, -2, st->channels, downmix_int);\n   RESTORE_STACK;\n   return ret;\n}\nopus_int32 opus_encode_float(OpusEncoder *st, const float *pcm, int analysis_frame_size,\n                      unsigned char *data, opus_int32 out_data_bytes)\n{\n   int frame_size;\n   int delay_compensation;\n   if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n      delay_compensation = 0;\n   else\n      delay_compensation = st->delay_compensation;\n   frame_size = compute_frame_size(pcm, analysis_frame_size,\n         st->variable_duration, st->channels, st->Fs, st->bitrate_bps,\n         delay_compensation, downmix_float, st->analysis.subframe_mem);\n   return opus_encode_native(st, pcm, frame_size, data, out_data_bytes, 24,\n                             pcm, analysis_frame_size, 0, -2, st->channels, downmix_float);\n}\n#endif\n\n\nint opus_encoder_ctl(OpusEncoder *st, int request, ...)\n{\n    int ret;\n    CELTEncoder *celt_enc;\n    va_list ap;\n\n    ret = OPUS_OK;\n    va_start(ap, request);\n\n    celt_enc = (CELTEncoder*)((char*)st+st->celt_enc_offset);\n\n    switch (request)\n    {\n        case OPUS_SET_APPLICATION_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if (   (value != OPUS_APPLICATION_VOIP && value != OPUS_APPLICATION_AUDIO\n                 && value != OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n               || (!st->first && st->application != value))\n            {\n               ret = OPUS_BAD_ARG;\n               break;\n            }\n            st->application = value;\n        }\n        break;\n        case OPUS_GET_APPLICATION_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->application;\n        }\n        break;\n        case OPUS_SET_BITRATE_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if (value != OPUS_AUTO && value != OPUS_BITRATE_MAX)\n            {\n                if (value <= 0)\n                    goto bad_arg;\n                else if (value <= 500)\n                    value = 500;\n                else if (value > (opus_int32)300000*st->channels)\n                    value = (opus_int32)300000*st->channels;\n            }\n            st->user_bitrate_bps = value;\n        }\n        break;\n        case OPUS_GET_BITRATE_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = user_bitrate_to_bitrate(st, st->prev_framesize, 1276);\n        }\n        break;\n        case OPUS_SET_FORCE_CHANNELS_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if((value<1 || value>st->channels) && value != OPUS_AUTO)\n            {\n               goto bad_arg;\n            }\n            st->force_channels = value;\n        }\n        break;\n        case OPUS_GET_FORCE_CHANNELS_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->force_channels;\n        }\n        break;\n        case OPUS_SET_MAX_BANDWIDTH_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if (value < OPUS_BANDWIDTH_NARROWBAND || value > OPUS_BANDWIDTH_FULLBAND) \n            {\n               goto bad_arg;\n            }\n            st->max_bandwidth = value;\n            if (st->max_bandwidth == OPUS_BANDWIDTH_NARROWBAND) {\n                st->silk_mode.maxInternalSampleRate = 8000;\n            } else if (st->max_bandwidth == OPUS_BANDWIDTH_MEDIUMBAND) {\n                st->silk_mode.maxInternalSampleRate = 12000;\n            } else {\n                st->silk_mode.maxInternalSampleRate = 16000;\n            }\n        }\n        break;\n        case OPUS_GET_MAX_BANDWIDTH_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->max_bandwidth;\n        }\n        break;\n        case OPUS_SET_BANDWIDTH_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if ((value < OPUS_BANDWIDTH_NARROWBAND || value > OPUS_BANDWIDTH_FULLBAND) && value != OPUS_AUTO)\n            {\n               goto bad_arg;\n            }\n            st->user_bandwidth = value;\n            if (st->user_bandwidth == OPUS_BANDWIDTH_NARROWBAND) {\n                st->silk_mode.maxInternalSampleRate = 8000;\n            } else if (st->user_bandwidth == OPUS_BANDWIDTH_MEDIUMBAND) {\n                st->silk_mode.maxInternalSampleRate = 12000;\n            } else {\n                st->silk_mode.maxInternalSampleRate = 16000;\n            }\n        }\n        break;\n        case OPUS_GET_BANDWIDTH_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->bandwidth;\n        }\n        break;\n        case OPUS_SET_DTX_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if(value<0 || value>1)\n            {\n               goto bad_arg;\n            }\n            st->silk_mode.useDTX = value;\n        }\n        break;\n        case OPUS_GET_DTX_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->silk_mode.useDTX;\n        }\n        break;\n        case OPUS_SET_COMPLEXITY_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if(value<0 || value>10)\n            {\n               goto bad_arg;\n            }\n            st->silk_mode.complexity = value;\n            celt_encoder_ctl(celt_enc, OPUS_SET_COMPLEXITY(value));\n        }\n        break;\n        case OPUS_GET_COMPLEXITY_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->silk_mode.complexity;\n        }\n        break;\n        case OPUS_SET_INBAND_FEC_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if(value<0 || value>1)\n            {\n               goto bad_arg;\n            }\n            st->silk_mode.useInBandFEC = value;\n        }\n        break;\n        case OPUS_GET_INBAND_FEC_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->silk_mode.useInBandFEC;\n        }\n        break;\n        case OPUS_SET_PACKET_LOSS_PERC_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if (value < 0 || value > 100)\n            {\n               goto bad_arg;\n            }\n            st->silk_mode.packetLossPercentage = value;\n            celt_encoder_ctl(celt_enc, OPUS_SET_PACKET_LOSS_PERC(value));\n        }\n        break;\n        case OPUS_GET_PACKET_LOSS_PERC_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->silk_mode.packetLossPercentage;\n        }\n        break;\n        case OPUS_SET_VBR_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if(value<0 || value>1)\n            {\n               goto bad_arg;\n            }\n            st->use_vbr = value;\n            st->silk_mode.useCBR = 1-value;\n        }\n        break;\n        case OPUS_GET_VBR_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->use_vbr;\n        }\n        break;\n        case OPUS_SET_VOICE_RATIO_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if (value<-1 || value>100)\n            {\n               goto bad_arg;\n            }\n            st->voice_ratio = value;\n        }\n        break;\n        case OPUS_GET_VOICE_RATIO_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->voice_ratio;\n        }\n        break;\n        case OPUS_SET_VBR_CONSTRAINT_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if(value<0 || value>1)\n            {\n               goto bad_arg;\n            }\n            st->vbr_constraint = value;\n        }\n        break;\n        case OPUS_GET_VBR_CONSTRAINT_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->vbr_constraint;\n        }\n        break;\n        case OPUS_SET_SIGNAL_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if(value!=OPUS_AUTO && value!=OPUS_SIGNAL_VOICE && value!=OPUS_SIGNAL_MUSIC)\n            {\n               goto bad_arg;\n            }\n            st->signal_type = value;\n        }\n        break;\n        case OPUS_GET_SIGNAL_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->signal_type;\n        }\n        break;\n        case OPUS_GET_LOOKAHEAD_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->Fs/400;\n            if (st->application != OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n                *value += st->delay_compensation;\n        }\n        break;\n        case OPUS_GET_SAMPLE_RATE_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->Fs;\n        }\n        break;\n        case OPUS_GET_FINAL_RANGE_REQUEST:\n        {\n            opus_uint32 *value = va_arg(ap, opus_uint32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->rangeFinal;\n        }\n        break;\n        case OPUS_SET_LSB_DEPTH_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if (value<8 || value>24)\n            {\n               goto bad_arg;\n            }\n            st->lsb_depth=value;\n        }\n        break;\n        case OPUS_GET_LSB_DEPTH_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->lsb_depth;\n        }\n        break;\n        case OPUS_SET_EXPERT_FRAME_DURATION_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if (value != OPUS_FRAMESIZE_ARG   && value != OPUS_FRAMESIZE_2_5_MS &&\n                value != OPUS_FRAMESIZE_5_MS  && value != OPUS_FRAMESIZE_10_MS  &&\n                value != OPUS_FRAMESIZE_20_MS && value != OPUS_FRAMESIZE_40_MS  &&\n                value != OPUS_FRAMESIZE_60_MS && value != OPUS_FRAMESIZE_VARIABLE)\n            {\n               goto bad_arg;\n            }\n            st->variable_duration = value;\n            celt_encoder_ctl(celt_enc, OPUS_SET_EXPERT_FRAME_DURATION(value));\n        }\n        break;\n        case OPUS_GET_EXPERT_FRAME_DURATION_REQUEST:\n        {\n            opus_int32 *value = va_arg(ap, opus_int32*);\n            if (!value)\n            {\n               goto bad_arg;\n            }\n            *value = st->variable_duration;\n        }\n        break;\n        case OPUS_SET_PREDICTION_DISABLED_REQUEST:\n        {\n           opus_int32 value = va_arg(ap, opus_int32);\n           if (value > 1 || value < 0)\n              goto bad_arg;\n           st->silk_mode.reducedDependency = value;\n        }\n        break;\n        case OPUS_GET_PREDICTION_DISABLED_REQUEST:\n        {\n           opus_int32 *value = va_arg(ap, opus_int32*);\n           if (!value)\n              goto bad_arg;\n           *value = st->silk_mode.reducedDependency;\n        }\n        break;\n        case OPUS_RESET_STATE:\n        {\n           void *silk_enc;\n           silk_EncControlStruct dummy;\n           silk_enc = (char*)st+st->silk_enc_offset;\n\n           OPUS_CLEAR((char*)&st->OPUS_ENCODER_RESET_START,\n                 sizeof(OpusEncoder)-\n                 ((char*)&st->OPUS_ENCODER_RESET_START - (char*)st));\n\n           celt_encoder_ctl(celt_enc, OPUS_RESET_STATE);\n           silk_InitEncoder( silk_enc, st->arch, &dummy );\n           st->stream_channels = st->channels;\n           st->hybrid_stereo_width_Q14 = 1 << 14;\n           st->prev_HB_gain = Q15ONE;\n           st->first = 1;\n           st->mode = MODE_HYBRID;\n           st->bandwidth = OPUS_BANDWIDTH_FULLBAND;\n           st->variable_HP_smth2_Q15 = silk_LSHIFT( silk_lin2log( VARIABLE_HP_MIN_CUTOFF_HZ ), 8 );\n        }\n        break;\n        case OPUS_SET_FORCE_MODE_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            if ((value < MODE_SILK_ONLY || value > MODE_CELT_ONLY) && value != OPUS_AUTO)\n            {\n               goto bad_arg;\n            }\n            st->user_forced_mode = value;\n        }\n        break;\n        case OPUS_SET_LFE_REQUEST:\n        {\n            opus_int32 value = va_arg(ap, opus_int32);\n            st->lfe = value;\n            ret = celt_encoder_ctl(celt_enc, OPUS_SET_LFE(value));\n        }\n        break;\n        case OPUS_SET_ENERGY_MASK_REQUEST:\n        {\n            opus_val16 *value = va_arg(ap, opus_val16*);\n            st->energy_masking = value;\n            ret = celt_encoder_ctl(celt_enc, OPUS_SET_ENERGY_MASK(value));\n        }\n        break;\n\n        case CELT_GET_MODE_REQUEST:\n        {\n           const CELTMode ** value = va_arg(ap, const CELTMode**);\n           if (!value)\n           {\n              goto bad_arg;\n           }\n           ret = celt_encoder_ctl(celt_enc, CELT_GET_MODE(value));\n        }\n        break;\n        default:\n            /* fprintf(stderr, \"unknown opus_encoder_ctl() request: %d\", request);*/\n            ret = OPUS_UNIMPLEMENTED;\n            break;\n    }\n    va_end(ap);\n    return ret;\nbad_arg:\n    va_end(ap);\n    return OPUS_BAD_ARG;\n}\n\nvoid opus_encoder_destroy(OpusEncoder *st)\n{\n    opus_free(st);\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/opus_multistream.c",
    "content": "/* Copyright (c) 2011 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"opus_multistream.h\"\n#include \"opus.h\"\n#include \"opus_private.h\"\n#include \"stack_alloc.h\"\n#include <stdarg.h>\n#include \"float_cast.h\"\n#include \"os_support.h\"\n\n\nint validate_layout(const ChannelLayout *layout)\n{\n   int i, max_channel;\n\n   max_channel = layout->nb_streams+layout->nb_coupled_streams;\n   if (max_channel>255)\n      return 0;\n   for (i=0;i<layout->nb_channels;i++)\n   {\n      if (layout->mapping[i] >= max_channel && layout->mapping[i] != 255)\n         return 0;\n   }\n   return 1;\n}\n\n\nint get_left_channel(const ChannelLayout *layout, int stream_id, int prev)\n{\n   int i;\n   i = (prev<0) ? 0 : prev+1;\n   for (;i<layout->nb_channels;i++)\n   {\n      if (layout->mapping[i]==stream_id*2)\n         return i;\n   }\n   return -1;\n}\n\nint get_right_channel(const ChannelLayout *layout, int stream_id, int prev)\n{\n   int i;\n   i = (prev<0) ? 0 : prev+1;\n   for (;i<layout->nb_channels;i++)\n   {\n      if (layout->mapping[i]==stream_id*2+1)\n         return i;\n   }\n   return -1;\n}\n\nint get_mono_channel(const ChannelLayout *layout, int stream_id, int prev)\n{\n   int i;\n   i = (prev<0) ? 0 : prev+1;\n   for (;i<layout->nb_channels;i++)\n   {\n      if (layout->mapping[i]==stream_id+layout->nb_coupled_streams)\n         return i;\n   }\n   return -1;\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/opus_multistream_decoder.c",
    "content": "/* Copyright (c) 2011 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"opus_multistream.h\"\n#include \"opus.h\"\n#include \"opus_private.h\"\n#include \"stack_alloc.h\"\n#include <stdarg.h>\n#include \"float_cast.h\"\n#include \"os_support.h\"\n\nstruct OpusMSDecoder {\n   ChannelLayout layout;\n   /* Decoder states go here */\n};\n\n\n\n\n/* DECODER */\n\nopus_int32 opus_multistream_decoder_get_size(int nb_streams, int nb_coupled_streams)\n{\n   int coupled_size;\n   int mono_size;\n\n   if(nb_streams<1||nb_coupled_streams>nb_streams||nb_coupled_streams<0)return 0;\n   coupled_size = opus_decoder_get_size(2);\n   mono_size = opus_decoder_get_size(1);\n   return align(sizeof(OpusMSDecoder))\n         + nb_coupled_streams * align(coupled_size)\n         + (nb_streams-nb_coupled_streams) * align(mono_size);\n}\n\nint opus_multistream_decoder_init(\n      OpusMSDecoder *st,\n      opus_int32 Fs,\n      int channels,\n      int streams,\n      int coupled_streams,\n      const unsigned char *mapping\n)\n{\n   int coupled_size;\n   int mono_size;\n   int i, ret;\n   char *ptr;\n\n   if ((channels>255) || (channels<1) || (coupled_streams>streams) ||\n       (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0))\n      return OPUS_BAD_ARG;\n\n   st->layout.nb_channels = channels;\n   st->layout.nb_streams = streams;\n   st->layout.nb_coupled_streams = coupled_streams;\n\n   for (i=0;i<st->layout.nb_channels;i++)\n      st->layout.mapping[i] = mapping[i];\n   if (!validate_layout(&st->layout))\n      return OPUS_BAD_ARG;\n\n   ptr = (char*)st + align(sizeof(OpusMSDecoder));\n   coupled_size = opus_decoder_get_size(2);\n   mono_size = opus_decoder_get_size(1);\n\n   for (i=0;i<st->layout.nb_coupled_streams;i++)\n   {\n      ret=opus_decoder_init((OpusDecoder*)ptr, Fs, 2);\n      if(ret!=OPUS_OK)return ret;\n      ptr += align(coupled_size);\n   }\n   for (;i<st->layout.nb_streams;i++)\n   {\n      ret=opus_decoder_init((OpusDecoder*)ptr, Fs, 1);\n      if(ret!=OPUS_OK)return ret;\n      ptr += align(mono_size);\n   }\n   return OPUS_OK;\n}\n\n\nOpusMSDecoder *opus_multistream_decoder_create(\n      opus_int32 Fs,\n      int channels,\n      int streams,\n      int coupled_streams,\n      const unsigned char *mapping,\n      int *error\n)\n{\n   int ret;\n   OpusMSDecoder *st;\n   if ((channels>255) || (channels<1) || (coupled_streams>streams) ||\n       (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0))\n   {\n      if (error)\n         *error = OPUS_BAD_ARG;\n      return NULL;\n   }\n   st = (OpusMSDecoder *)opus_alloc(opus_multistream_decoder_get_size(streams, coupled_streams));\n   if (st==NULL)\n   {\n      if (error)\n         *error = OPUS_ALLOC_FAIL;\n      return NULL;\n   }\n   ret = opus_multistream_decoder_init(st, Fs, channels, streams, coupled_streams, mapping);\n   if (error)\n      *error = ret;\n   if (ret != OPUS_OK)\n   {\n      opus_free(st);\n      st = NULL;\n   }\n   return st;\n}\n\ntypedef void (*opus_copy_channel_out_func)(\n  void *dst,\n  int dst_stride,\n  int dst_channel,\n  const opus_val16 *src,\n  int src_stride,\n  int frame_size\n);\n\nstatic int opus_multistream_packet_validate(const unsigned char *data,\n      opus_int32 len, int nb_streams, opus_int32 Fs)\n{\n   int s;\n   int count;\n   unsigned char toc;\n   opus_int16 size[48];\n   int samples=0;\n   opus_int32 packet_offset;\n\n   for (s=0;s<nb_streams;s++)\n   {\n      int tmp_samples;\n      if (len<=0)\n         return OPUS_INVALID_PACKET;\n      count = opus_packet_parse_impl(data, len, s!=nb_streams-1, &toc, NULL,\n                                     size, NULL, &packet_offset);\n      if (count<0)\n         return count;\n      tmp_samples = opus_packet_get_nb_samples(data, packet_offset, Fs);\n      if (s!=0 && samples != tmp_samples)\n         return OPUS_INVALID_PACKET;\n      samples = tmp_samples;\n      data += packet_offset;\n      len -= packet_offset;\n   }\n   return samples;\n}\n\nstatic int opus_multistream_decode_native(\n      OpusMSDecoder *st,\n      const unsigned char *data,\n      opus_int32 len,\n      void *pcm,\n      opus_copy_channel_out_func copy_channel_out,\n      int frame_size,\n      int decode_fec,\n      int soft_clip\n)\n{\n   opus_int32 Fs;\n   int coupled_size;\n   int mono_size;\n   int s, c;\n   char *ptr;\n   int do_plc=0;\n   VARDECL(opus_val16, buf);\n   ALLOC_STACK;\n\n   /* Limit frame_size to avoid excessive stack allocations. */\n   opus_multistream_decoder_ctl(st, OPUS_GET_SAMPLE_RATE(&Fs));\n   frame_size = IMIN(frame_size, Fs/25*3);\n   ALLOC(buf, 2*frame_size, opus_val16);\n   ptr = (char*)st + align(sizeof(OpusMSDecoder));\n   coupled_size = opus_decoder_get_size(2);\n   mono_size = opus_decoder_get_size(1);\n\n   if (len==0)\n      do_plc = 1;\n   if (len < 0)\n   {\n      RESTORE_STACK;\n      return OPUS_BAD_ARG;\n   }\n   if (!do_plc && len < 2*st->layout.nb_streams-1)\n   {\n      RESTORE_STACK;\n      return OPUS_INVALID_PACKET;\n   }\n   if (!do_plc)\n   {\n      int ret = opus_multistream_packet_validate(data, len, st->layout.nb_streams, Fs);\n      if (ret < 0)\n      {\n         RESTORE_STACK;\n         return ret;\n      } else if (ret > frame_size)\n      {\n         RESTORE_STACK;\n         return OPUS_BUFFER_TOO_SMALL;\n      }\n   }\n   for (s=0;s<st->layout.nb_streams;s++)\n   {\n      OpusDecoder *dec;\n      int packet_offset, ret;\n\n      dec = (OpusDecoder*)ptr;\n      ptr += (s < st->layout.nb_coupled_streams) ? align(coupled_size) : align(mono_size);\n\n      if (!do_plc && len<=0)\n      {\n         RESTORE_STACK;\n         return OPUS_INTERNAL_ERROR;\n      }\n      packet_offset = 0;\n      ret = opus_decode_native(dec, data, len, buf, frame_size, decode_fec, s!=st->layout.nb_streams-1, &packet_offset, soft_clip);\n      data += packet_offset;\n      len -= packet_offset;\n      if (ret <= 0)\n      {\n         RESTORE_STACK;\n         return ret;\n      }\n      frame_size = ret;\n      if (s < st->layout.nb_coupled_streams)\n      {\n         int chan, prev;\n         prev = -1;\n         /* Copy \"left\" audio to the channel(s) where it belongs */\n         while ( (chan = get_left_channel(&st->layout, s, prev)) != -1)\n         {\n            (*copy_channel_out)(pcm, st->layout.nb_channels, chan,\n               buf, 2, frame_size);\n            prev = chan;\n         }\n         prev = -1;\n         /* Copy \"right\" audio to the channel(s) where it belongs */\n         while ( (chan = get_right_channel(&st->layout, s, prev)) != -1)\n         {\n            (*copy_channel_out)(pcm, st->layout.nb_channels, chan,\n               buf+1, 2, frame_size);\n            prev = chan;\n         }\n      } else {\n         int chan, prev;\n         prev = -1;\n         /* Copy audio to the channel(s) where it belongs */\n         while ( (chan = get_mono_channel(&st->layout, s, prev)) != -1)\n         {\n            (*copy_channel_out)(pcm, st->layout.nb_channels, chan,\n               buf, 1, frame_size);\n            prev = chan;\n         }\n      }\n   }\n   /* Handle muted channels */\n   for (c=0;c<st->layout.nb_channels;c++)\n   {\n      if (st->layout.mapping[c] == 255)\n      {\n         (*copy_channel_out)(pcm, st->layout.nb_channels, c,\n            NULL, 0, frame_size);\n      }\n   }\n   RESTORE_STACK;\n   return frame_size;\n}\n\n#if !defined(DISABLE_FLOAT_API)\nstatic void opus_copy_channel_out_float(\n  void *dst,\n  int dst_stride,\n  int dst_channel,\n  const opus_val16 *src,\n  int src_stride,\n  int frame_size\n)\n{\n   float *float_dst;\n   opus_int32 i;\n   float_dst = (float*)dst;\n   if (src != NULL)\n   {\n      for (i=0;i<frame_size;i++)\n#if defined(FIXED_POINT)\n         float_dst[i*dst_stride+dst_channel] = (1/32768.f)*src[i*src_stride];\n#else\n         float_dst[i*dst_stride+dst_channel] = src[i*src_stride];\n#endif\n   }\n   else\n   {\n      for (i=0;i<frame_size;i++)\n         float_dst[i*dst_stride+dst_channel] = 0;\n   }\n}\n#endif\n\nstatic void opus_copy_channel_out_short(\n  void *dst,\n  int dst_stride,\n  int dst_channel,\n  const opus_val16 *src,\n  int src_stride,\n  int frame_size\n)\n{\n   opus_int16 *short_dst;\n   opus_int32 i;\n   short_dst = (opus_int16*)dst;\n   if (src != NULL)\n   {\n      for (i=0;i<frame_size;i++)\n#if defined(FIXED_POINT)\n         short_dst[i*dst_stride+dst_channel] = src[i*src_stride];\n#else\n         short_dst[i*dst_stride+dst_channel] = FLOAT2INT16(src[i*src_stride]);\n#endif\n   }\n   else\n   {\n      for (i=0;i<frame_size;i++)\n         short_dst[i*dst_stride+dst_channel] = 0;\n   }\n}\n\n\n\n#ifdef FIXED_POINT\nint opus_multistream_decode(\n      OpusMSDecoder *st,\n      const unsigned char *data,\n      opus_int32 len,\n      opus_int16 *pcm,\n      int frame_size,\n      int decode_fec\n)\n{\n   return opus_multistream_decode_native(st, data, len,\n       pcm, opus_copy_channel_out_short, frame_size, decode_fec, 0);\n}\n\n#ifndef DISABLE_FLOAT_API\nint opus_multistream_decode_float(OpusMSDecoder *st, const unsigned char *data,\n      opus_int32 len, float *pcm, int frame_size, int decode_fec)\n{\n   return opus_multistream_decode_native(st, data, len,\n       pcm, opus_copy_channel_out_float, frame_size, decode_fec, 0);\n}\n#endif\n\n#else\n\nint opus_multistream_decode(OpusMSDecoder *st, const unsigned char *data,\n      opus_int32 len, opus_int16 *pcm, int frame_size, int decode_fec)\n{\n   return opus_multistream_decode_native(st, data, len,\n       pcm, opus_copy_channel_out_short, frame_size, decode_fec, 1);\n}\n\nint opus_multistream_decode_float(\n      OpusMSDecoder *st,\n      const unsigned char *data,\n      opus_int32 len,\n      float *pcm,\n      int frame_size,\n      int decode_fec\n)\n{\n   return opus_multistream_decode_native(st, data, len,\n       pcm, opus_copy_channel_out_float, frame_size, decode_fec, 0);\n}\n#endif\n\nint opus_multistream_decoder_ctl(OpusMSDecoder *st, int request, ...)\n{\n   va_list ap;\n   int coupled_size, mono_size;\n   char *ptr;\n   int ret = OPUS_OK;\n\n   va_start(ap, request);\n\n   coupled_size = opus_decoder_get_size(2);\n   mono_size = opus_decoder_get_size(1);\n   ptr = (char*)st + align(sizeof(OpusMSDecoder));\n   switch (request)\n   {\n       case OPUS_GET_BANDWIDTH_REQUEST:\n       case OPUS_GET_SAMPLE_RATE_REQUEST:\n       case OPUS_GET_GAIN_REQUEST:\n       case OPUS_GET_LAST_PACKET_DURATION_REQUEST:\n       {\n          OpusDecoder *dec;\n          /* For int32* GET params, just query the first stream */\n          opus_int32 *value = va_arg(ap, opus_int32*);\n          dec = (OpusDecoder*)ptr;\n          ret = opus_decoder_ctl(dec, request, value);\n       }\n       break;\n       case OPUS_GET_FINAL_RANGE_REQUEST:\n       {\n          int s;\n          opus_uint32 *value = va_arg(ap, opus_uint32*);\n          opus_uint32 tmp;\n          if (!value)\n          {\n             goto bad_arg;\n          }\n          *value = 0;\n          for (s=0;s<st->layout.nb_streams;s++)\n          {\n             OpusDecoder *dec;\n             dec = (OpusDecoder*)ptr;\n             if (s < st->layout.nb_coupled_streams)\n                ptr += align(coupled_size);\n             else\n                ptr += align(mono_size);\n             ret = opus_decoder_ctl(dec, request, &tmp);\n             if (ret != OPUS_OK) break;\n             *value ^= tmp;\n          }\n       }\n       break;\n       case OPUS_RESET_STATE:\n       {\n          int s;\n          for (s=0;s<st->layout.nb_streams;s++)\n          {\n             OpusDecoder *dec;\n\n             dec = (OpusDecoder*)ptr;\n             if (s < st->layout.nb_coupled_streams)\n                ptr += align(coupled_size);\n             else\n                ptr += align(mono_size);\n             ret = opus_decoder_ctl(dec, OPUS_RESET_STATE);\n             if (ret != OPUS_OK)\n                break;\n          }\n       }\n       break;\n       case OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST:\n       {\n          int s;\n          opus_int32 stream_id;\n          OpusDecoder **value;\n          stream_id = va_arg(ap, opus_int32);\n          if (stream_id<0 || stream_id >= st->layout.nb_streams)\n             ret = OPUS_BAD_ARG;\n          value = va_arg(ap, OpusDecoder**);\n          if (!value)\n          {\n             goto bad_arg;\n          }\n          for (s=0;s<stream_id;s++)\n          {\n             if (s < st->layout.nb_coupled_streams)\n                ptr += align(coupled_size);\n             else\n                ptr += align(mono_size);\n          }\n          *value = (OpusDecoder*)ptr;\n       }\n       break;\n       case OPUS_SET_GAIN_REQUEST:\n       {\n          int s;\n          /* This works for int32 params */\n          opus_int32 value = va_arg(ap, opus_int32);\n          for (s=0;s<st->layout.nb_streams;s++)\n          {\n             OpusDecoder *dec;\n\n             dec = (OpusDecoder*)ptr;\n             if (s < st->layout.nb_coupled_streams)\n                ptr += align(coupled_size);\n             else\n                ptr += align(mono_size);\n             ret = opus_decoder_ctl(dec, request, value);\n             if (ret != OPUS_OK)\n                break;\n          }\n       }\n       break;\n       default:\n          ret = OPUS_UNIMPLEMENTED;\n       break;\n   }\n\n   va_end(ap);\n   return ret;\nbad_arg:\n   va_end(ap);\n   return OPUS_BAD_ARG;\n}\n\n\nvoid opus_multistream_decoder_destroy(OpusMSDecoder *st)\n{\n    opus_free(st);\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/opus_multistream_encoder.c",
    "content": "/* Copyright (c) 2011 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"opus_multistream.h\"\n#include \"opus.h\"\n#include \"opus_private.h\"\n#include \"stack_alloc.h\"\n#include <stdarg.h>\n#include \"float_cast.h\"\n#include \"os_support.h\"\n#include \"mathops.h\"\n#include \"mdct.h\"\n#include \"modes.h\"\n#include \"bands.h\"\n#include \"quant_bands.h\"\n\ntypedef struct {\n   int nb_streams;\n   int nb_coupled_streams;\n   unsigned char mapping[8];\n} VorbisLayout;\n\n/* Index is nb_channel-1*/\nstatic const VorbisLayout vorbis_mappings[8] = {\n      {1, 0, {0}},                      /* 1: mono */\n      {1, 1, {0, 1}},                   /* 2: stereo */\n      {2, 1, {0, 2, 1}},                /* 3: 1-d surround */\n      {2, 2, {0, 1, 2, 3}},             /* 4: quadraphonic surround */\n      {3, 2, {0, 4, 1, 2, 3}},          /* 5: 5-channel surround */\n      {4, 2, {0, 4, 1, 2, 3, 5}},       /* 6: 5.1 surround */\n      {4, 3, {0, 4, 1, 2, 3, 5, 6}},    /* 7: 6.1 surround */\n      {5, 3, {0, 6, 1, 2, 3, 4, 5, 7}}, /* 8: 7.1 surround */\n};\n\ntypedef void (*opus_copy_channel_in_func)(\n  opus_val16 *dst,\n  int dst_stride,\n  const void *src,\n  int src_stride,\n  int src_channel,\n  int frame_size\n);\n\nstruct OpusMSEncoder {\n   ChannelLayout layout;\n   int lfe_stream;\n   int application;\n   int variable_duration;\n   int surround;\n   opus_int32 bitrate_bps;\n   float subframe_mem[3];\n   /* Encoder states go here */\n   /* then opus_val32 window_mem[channels*120]; */\n   /* then opus_val32 preemph_mem[channels]; */\n};\n\nstatic opus_val32 *ms_get_preemph_mem(OpusMSEncoder *st)\n{\n   int s;\n   char *ptr;\n   int coupled_size, mono_size;\n\n   coupled_size = opus_encoder_get_size(2);\n   mono_size = opus_encoder_get_size(1);\n   ptr = (char*)st + align(sizeof(OpusMSEncoder));\n   for (s=0;s<st->layout.nb_streams;s++)\n   {\n      if (s < st->layout.nb_coupled_streams)\n         ptr += align(coupled_size);\n      else\n         ptr += align(mono_size);\n   }\n   return (opus_val32*)(ptr+st->layout.nb_channels*120*sizeof(opus_val32));\n}\n\nstatic opus_val32 *ms_get_window_mem(OpusMSEncoder *st)\n{\n   int s;\n   char *ptr;\n   int coupled_size, mono_size;\n\n   coupled_size = opus_encoder_get_size(2);\n   mono_size = opus_encoder_get_size(1);\n   ptr = (char*)st + align(sizeof(OpusMSEncoder));\n   for (s=0;s<st->layout.nb_streams;s++)\n   {\n      if (s < st->layout.nb_coupled_streams)\n         ptr += align(coupled_size);\n      else\n         ptr += align(mono_size);\n   }\n   return (opus_val32*)ptr;\n}\n\nstatic int validate_encoder_layout(const ChannelLayout *layout)\n{\n   int s;\n   for (s=0;s<layout->nb_streams;s++)\n   {\n      if (s < layout->nb_coupled_streams)\n      {\n         if (get_left_channel(layout, s, -1)==-1)\n            return 0;\n         if (get_right_channel(layout, s, -1)==-1)\n            return 0;\n      } else {\n         if (get_mono_channel(layout, s, -1)==-1)\n            return 0;\n      }\n   }\n   return 1;\n}\n\nstatic void channel_pos(int channels, int pos[8])\n{\n   /* Position in the mix: 0 don't mix, 1: left, 2: center, 3:right */\n   if (channels==4)\n   {\n      pos[0]=1;\n      pos[1]=3;\n      pos[2]=1;\n      pos[3]=3;\n   } else if (channels==3||channels==5||channels==6)\n   {\n      pos[0]=1;\n      pos[1]=2;\n      pos[2]=3;\n      pos[3]=1;\n      pos[4]=3;\n      pos[5]=0;\n   } else if (channels==7)\n   {\n      pos[0]=1;\n      pos[1]=2;\n      pos[2]=3;\n      pos[3]=1;\n      pos[4]=3;\n      pos[5]=2;\n      pos[6]=0;\n   } else if (channels==8)\n   {\n      pos[0]=1;\n      pos[1]=2;\n      pos[2]=3;\n      pos[3]=1;\n      pos[4]=3;\n      pos[5]=1;\n      pos[6]=3;\n      pos[7]=0;\n   }\n}\n\n#if 1\n/* Computes a rough approximation of log2(2^a + 2^b) */\nstatic opus_val16 logSum(opus_val16 a, opus_val16 b)\n{\n   opus_val16 max;\n   opus_val32 diff;\n   opus_val16 frac;\n   static const opus_val16 diff_table[17] = {\n         QCONST16(0.5000000f, DB_SHIFT), QCONST16(0.2924813f, DB_SHIFT), QCONST16(0.1609640f, DB_SHIFT), QCONST16(0.0849625f, DB_SHIFT),\n         QCONST16(0.0437314f, DB_SHIFT), QCONST16(0.0221971f, DB_SHIFT), QCONST16(0.0111839f, DB_SHIFT), QCONST16(0.0056136f, DB_SHIFT),\n         QCONST16(0.0028123f, DB_SHIFT)\n   };\n   int low;\n   if (a>b)\n   {\n      max = a;\n      diff = SUB32(EXTEND32(a),EXTEND32(b));\n   } else {\n      max = b;\n      diff = SUB32(EXTEND32(b),EXTEND32(a));\n   }\n   if (diff >= QCONST16(8.f, DB_SHIFT))\n      return max;\n#ifdef FIXED_POINT\n   low = SHR32(diff, DB_SHIFT-1);\n   frac = SHL16(diff - SHL16(low, DB_SHIFT-1), 16-DB_SHIFT);\n#else\n   low = (int)floor(2*diff);\n   frac = 2*diff - low;\n#endif\n   return max + diff_table[low] + MULT16_16_Q15(frac, SUB16(diff_table[low+1], diff_table[low]));\n}\n#else\nopus_val16 logSum(opus_val16 a, opus_val16 b)\n{\n   return log2(pow(4, a)+ pow(4, b))/2;\n}\n#endif\n\nvoid surround_analysis(const CELTMode *celt_mode, const void *pcm, opus_val16 *bandLogE, opus_val32 *mem, opus_val32 *preemph_mem,\n      int len, int overlap, int channels, int rate, opus_copy_channel_in_func copy_channel_in\n)\n{\n   int c;\n   int i;\n   int LM;\n   int pos[8] = {0};\n   int upsample;\n   int frame_size;\n   opus_val16 channel_offset;\n   opus_val32 bandE[21];\n   opus_val16 maskLogE[3][21];\n   VARDECL(opus_val32, in);\n   VARDECL(opus_val16, x);\n   VARDECL(opus_val32, freq);\n   SAVE_STACK;\n\n   upsample = resampling_factor(rate);\n   frame_size = len*upsample;\n\n   for (LM=0;LM<celt_mode->maxLM;LM++)\n      if (celt_mode->shortMdctSize<<LM==frame_size)\n         break;\n\n   ALLOC(in, frame_size+overlap, opus_val32);\n   ALLOC(x, len, opus_val16);\n   ALLOC(freq, frame_size, opus_val32);\n\n   channel_pos(channels, pos);\n\n   for (c=0;c<3;c++)\n      for (i=0;i<21;i++)\n         maskLogE[c][i] = -QCONST16(28.f, DB_SHIFT);\n\n   for (c=0;c<channels;c++)\n   {\n      OPUS_COPY(in, mem+c*overlap, overlap);\n      (*copy_channel_in)(x, 1, pcm, channels, c, len);\n      celt_preemphasis(x, in+overlap, frame_size, 1, upsample, celt_mode->preemph, preemph_mem+c, 0);\n      clt_mdct_forward(&celt_mode->mdct, in, freq, celt_mode->window, overlap, celt_mode->maxLM-LM, 1);\n      if (upsample != 1)\n      {\n         int bound = len;\n         for (i=0;i<bound;i++)\n            freq[i] *= upsample;\n         for (;i<frame_size;i++)\n            freq[i] = 0;\n      }\n\n      compute_band_energies(celt_mode, freq, bandE, 21, 1, 1<<LM);\n      amp2Log2(celt_mode, 21, 21, bandE, bandLogE+21*c, 1);\n      /* Apply spreading function with -6 dB/band going up and -12 dB/band going down. */\n      for (i=1;i<21;i++)\n         bandLogE[21*c+i] = MAX16(bandLogE[21*c+i], bandLogE[21*c+i-1]-QCONST16(1.f, DB_SHIFT));\n      for (i=19;i>=0;i--)\n         bandLogE[21*c+i] = MAX16(bandLogE[21*c+i], bandLogE[21*c+i+1]-QCONST16(2.f, DB_SHIFT));\n      if (pos[c]==1)\n      {\n         for (i=0;i<21;i++)\n            maskLogE[0][i] = logSum(maskLogE[0][i], bandLogE[21*c+i]);\n      } else if (pos[c]==3)\n      {\n         for (i=0;i<21;i++)\n            maskLogE[2][i] = logSum(maskLogE[2][i], bandLogE[21*c+i]);\n      } else if (pos[c]==2)\n      {\n         for (i=0;i<21;i++)\n         {\n            maskLogE[0][i] = logSum(maskLogE[0][i], bandLogE[21*c+i]-QCONST16(.5f, DB_SHIFT));\n            maskLogE[2][i] = logSum(maskLogE[2][i], bandLogE[21*c+i]-QCONST16(.5f, DB_SHIFT));\n         }\n      }\n#if 0\n      for (i=0;i<21;i++)\n         printf(\"%f \", bandLogE[21*c+i]);\n      float sum=0;\n      for (i=0;i<21;i++)\n         sum += bandLogE[21*c+i];\n      printf(\"%f \", sum/21);\n#endif\n      OPUS_COPY(mem+c*overlap, in+frame_size, overlap);\n   }\n   for (i=0;i<21;i++)\n      maskLogE[1][i] = MIN32(maskLogE[0][i],maskLogE[2][i]);\n   channel_offset = HALF16(celt_log2(QCONST32(2.f,14)/(channels-1)));\n   for (c=0;c<3;c++)\n      for (i=0;i<21;i++)\n         maskLogE[c][i] += channel_offset;\n#if 0\n   for (c=0;c<3;c++)\n   {\n      for (i=0;i<21;i++)\n         printf(\"%f \", maskLogE[c][i]);\n   }\n#endif\n   for (c=0;c<channels;c++)\n   {\n      opus_val16 *mask;\n      if (pos[c]!=0)\n      {\n         mask = &maskLogE[pos[c]-1][0];\n         for (i=0;i<21;i++)\n            bandLogE[21*c+i] = bandLogE[21*c+i] - mask[i];\n      } else {\n         for (i=0;i<21;i++)\n            bandLogE[21*c+i] = 0;\n      }\n#if 0\n      for (i=0;i<21;i++)\n         printf(\"%f \", bandLogE[21*c+i]);\n      printf(\"\\n\");\n#endif\n#if 0\n      float sum=0;\n      for (i=0;i<21;i++)\n         sum += bandLogE[21*c+i];\n      printf(\"%f \", sum/(float)QCONST32(21.f, DB_SHIFT));\n      printf(\"\\n\");\n#endif\n   }\n   RESTORE_STACK;\n}\n\nopus_int32 opus_multistream_encoder_get_size(int nb_streams, int nb_coupled_streams)\n{\n   int coupled_size;\n   int mono_size;\n\n   if(nb_streams<1||nb_coupled_streams>nb_streams||nb_coupled_streams<0)return 0;\n   coupled_size = opus_encoder_get_size(2);\n   mono_size = opus_encoder_get_size(1);\n   return align(sizeof(OpusMSEncoder))\n        + nb_coupled_streams * align(coupled_size)\n        + (nb_streams-nb_coupled_streams) * align(mono_size);\n}\n\nopus_int32 opus_multistream_surround_encoder_get_size(int channels, int mapping_family)\n{\n   int nb_streams;\n   int nb_coupled_streams;\n   opus_int32 size;\n\n   if (mapping_family==0)\n   {\n      if (channels==1)\n      {\n         nb_streams=1;\n         nb_coupled_streams=0;\n      } else if (channels==2)\n      {\n         nb_streams=1;\n         nb_coupled_streams=1;\n      } else\n         return 0;\n   } else if (mapping_family==1 && channels<=8 && channels>=1)\n   {\n      nb_streams=vorbis_mappings[channels-1].nb_streams;\n      nb_coupled_streams=vorbis_mappings[channels-1].nb_coupled_streams;\n   } else if (mapping_family==255)\n   {\n      nb_streams=channels;\n      nb_coupled_streams=0;\n   } else\n      return 0;\n   size = opus_multistream_encoder_get_size(nb_streams, nb_coupled_streams);\n   if (channels>2)\n   {\n      size += channels*(120*sizeof(opus_val32) + sizeof(opus_val32));\n   }\n   return size;\n}\n\n\nstatic int opus_multistream_encoder_init_impl(\n      OpusMSEncoder *st,\n      opus_int32 Fs,\n      int channels,\n      int streams,\n      int coupled_streams,\n      const unsigned char *mapping,\n      int application,\n      int surround\n)\n{\n   int coupled_size;\n   int mono_size;\n   int i, ret;\n   char *ptr;\n\n   if ((channels>255) || (channels<1) || (coupled_streams>streams) ||\n       (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0))\n      return OPUS_BAD_ARG;\n\n   st->layout.nb_channels = channels;\n   st->layout.nb_streams = streams;\n   st->layout.nb_coupled_streams = coupled_streams;\n   st->subframe_mem[0]=st->subframe_mem[1]=st->subframe_mem[2]=0;\n   if (!surround)\n      st->lfe_stream = -1;\n   st->bitrate_bps = OPUS_AUTO;\n   st->application = application;\n   st->variable_duration = OPUS_FRAMESIZE_ARG;\n   for (i=0;i<st->layout.nb_channels;i++)\n      st->layout.mapping[i] = mapping[i];\n   if (!validate_layout(&st->layout) || !validate_encoder_layout(&st->layout))\n      return OPUS_BAD_ARG;\n   ptr = (char*)st + align(sizeof(OpusMSEncoder));\n   coupled_size = opus_encoder_get_size(2);\n   mono_size = opus_encoder_get_size(1);\n\n   for (i=0;i<st->layout.nb_coupled_streams;i++)\n   {\n      ret = opus_encoder_init((OpusEncoder*)ptr, Fs, 2, application);\n      if(ret!=OPUS_OK)return ret;\n      if (i==st->lfe_stream)\n         opus_encoder_ctl((OpusEncoder*)ptr, OPUS_SET_LFE(1));\n      ptr += align(coupled_size);\n   }\n   for (;i<st->layout.nb_streams;i++)\n   {\n      ret = opus_encoder_init((OpusEncoder*)ptr, Fs, 1, application);\n      if (i==st->lfe_stream)\n         opus_encoder_ctl((OpusEncoder*)ptr, OPUS_SET_LFE(1));\n      if(ret!=OPUS_OK)return ret;\n      ptr += align(mono_size);\n   }\n   if (surround)\n   {\n      OPUS_CLEAR(ms_get_preemph_mem(st), channels);\n      OPUS_CLEAR(ms_get_window_mem(st), channels*120);\n   }\n   st->surround = surround;\n   return OPUS_OK;\n}\n\nint opus_multistream_encoder_init(\n      OpusMSEncoder *st,\n      opus_int32 Fs,\n      int channels,\n      int streams,\n      int coupled_streams,\n      const unsigned char *mapping,\n      int application\n)\n{\n   return opus_multistream_encoder_init_impl(st, Fs, channels, streams, coupled_streams, mapping, application, 0);\n}\n\nint opus_multistream_surround_encoder_init(\n      OpusMSEncoder *st,\n      opus_int32 Fs,\n      int channels,\n      int mapping_family,\n      int *streams,\n      int *coupled_streams,\n      unsigned char *mapping,\n      int application\n)\n{\n   if ((channels>255) || (channels<1))\n      return OPUS_BAD_ARG;\n   st->lfe_stream = -1;\n   if (mapping_family==0)\n   {\n      if (channels==1)\n      {\n         *streams=1;\n         *coupled_streams=0;\n         mapping[0]=0;\n      } else if (channels==2)\n      {\n         *streams=1;\n         *coupled_streams=1;\n         mapping[0]=0;\n         mapping[1]=1;\n      } else\n         return OPUS_UNIMPLEMENTED;\n   } else if (mapping_family==1 && channels<=8 && channels>=1)\n   {\n      int i;\n      *streams=vorbis_mappings[channels-1].nb_streams;\n      *coupled_streams=vorbis_mappings[channels-1].nb_coupled_streams;\n      for (i=0;i<channels;i++)\n         mapping[i] = vorbis_mappings[channels-1].mapping[i];\n      if (channels>=6)\n         st->lfe_stream = *streams-1;\n   } else if (mapping_family==255)\n   {\n      int i;\n      *streams=channels;\n      *coupled_streams=0;\n      for(i=0;i<channels;i++)\n         mapping[i] = i;\n   } else\n      return OPUS_UNIMPLEMENTED;\n   return opus_multistream_encoder_init_impl(st, Fs, channels, *streams, *coupled_streams,\n         mapping, application, channels>2&&mapping_family==1);\n}\n\nOpusMSEncoder *opus_multistream_encoder_create(\n      opus_int32 Fs,\n      int channels,\n      int streams,\n      int coupled_streams,\n      const unsigned char *mapping,\n      int application,\n      int *error\n)\n{\n   int ret;\n   OpusMSEncoder *st;\n   if ((channels>255) || (channels<1) || (coupled_streams>streams) ||\n       (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0))\n   {\n      if (error)\n         *error = OPUS_BAD_ARG;\n      return NULL;\n   }\n   st = (OpusMSEncoder *)opus_alloc(opus_multistream_encoder_get_size(streams, coupled_streams));\n   if (st==NULL)\n   {\n      if (error)\n         *error = OPUS_ALLOC_FAIL;\n      return NULL;\n   }\n   ret = opus_multistream_encoder_init(st, Fs, channels, streams, coupled_streams, mapping, application);\n   if (ret != OPUS_OK)\n   {\n      opus_free(st);\n      st = NULL;\n   }\n   if (error)\n      *error = ret;\n   return st;\n}\n\nOpusMSEncoder *opus_multistream_surround_encoder_create(\n      opus_int32 Fs,\n      int channels,\n      int mapping_family,\n      int *streams,\n      int *coupled_streams,\n      unsigned char *mapping,\n      int application,\n      int *error\n)\n{\n   int ret;\n   OpusMSEncoder *st;\n   if ((channels>255) || (channels<1))\n   {\n      if (error)\n         *error = OPUS_BAD_ARG;\n      return NULL;\n   }\n   st = (OpusMSEncoder *)opus_alloc(opus_multistream_surround_encoder_get_size(channels, mapping_family));\n   if (st==NULL)\n   {\n      if (error)\n         *error = OPUS_ALLOC_FAIL;\n      return NULL;\n   }\n   ret = opus_multistream_surround_encoder_init(st, Fs, channels, mapping_family, streams, coupled_streams, mapping, application);\n   if (ret != OPUS_OK)\n   {\n      opus_free(st);\n      st = NULL;\n   }\n   if (error)\n      *error = ret;\n   return st;\n}\n\nstatic void surround_rate_allocation(\n      OpusMSEncoder *st,\n      opus_int32 *rate,\n      int frame_size\n      )\n{\n   int i;\n   opus_int32 channel_rate;\n   opus_int32 Fs;\n   char *ptr;\n   int stream_offset;\n   int lfe_offset;\n   int coupled_ratio; /* Q8 */\n   int lfe_ratio;     /* Q8 */\n\n   ptr = (char*)st + align(sizeof(OpusMSEncoder));\n   opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_SAMPLE_RATE(&Fs));\n\n   if (st->bitrate_bps > st->layout.nb_channels*40000)\n      stream_offset = 20000;\n   else\n      stream_offset = st->bitrate_bps/st->layout.nb_channels/2;\n   stream_offset += 60*(Fs/frame_size-50);\n   /* We start by giving each stream (coupled or uncoupled) the same bitrate.\n      This models the main saving of coupled channels over uncoupled. */\n   /* The LFE stream is an exception to the above and gets fewer bits. */\n   lfe_offset = 3500 + 60*(Fs/frame_size-50);\n   /* Coupled streams get twice the mono rate after the first 20 kb/s. */\n   coupled_ratio = 512;\n   /* Should depend on the bitrate, for now we assume LFE gets 1/8 the bits of mono */\n   lfe_ratio = 32;\n\n   /* Compute bitrate allocation between streams */\n   if (st->bitrate_bps==OPUS_AUTO)\n   {\n      channel_rate = Fs+60*Fs/frame_size;\n   } else if (st->bitrate_bps==OPUS_BITRATE_MAX)\n   {\n      channel_rate = 300000;\n   } else {\n      int nb_lfe;\n      int nb_uncoupled;\n      int nb_coupled;\n      int total;\n      nb_lfe = (st->lfe_stream!=-1);\n      nb_coupled = st->layout.nb_coupled_streams;\n      nb_uncoupled = st->layout.nb_streams-nb_coupled-nb_lfe;\n      total = (nb_uncoupled<<8)         /* mono */\n            + coupled_ratio*nb_coupled /* stereo */\n            + nb_lfe*lfe_ratio;\n      channel_rate = 256*(st->bitrate_bps-lfe_offset*nb_lfe-stream_offset*(nb_coupled+nb_uncoupled))/total;\n   }\n#ifndef FIXED_POINT\n   if (st->variable_duration==OPUS_FRAMESIZE_VARIABLE && frame_size != Fs/50)\n   {\n      opus_int32 bonus;\n      bonus = 60*(Fs/frame_size-50);\n      channel_rate += bonus;\n   }\n#endif\n\n   for (i=0;i<st->layout.nb_streams;i++)\n   {\n      if (i<st->layout.nb_coupled_streams)\n         rate[i] = stream_offset+(channel_rate*coupled_ratio>>8);\n      else if (i!=st->lfe_stream)\n         rate[i] = stream_offset+channel_rate;\n      else\n         rate[i] = lfe_offset+(channel_rate*lfe_ratio>>8);\n   }\n}\n\n/* Max size in case the encoder decides to return three frames */\n#define MS_FRAME_TMP (3*1275+7)\nstatic int opus_multistream_encode_native\n(\n    OpusMSEncoder *st,\n    opus_copy_channel_in_func copy_channel_in,\n    const void *pcm,\n    int analysis_frame_size,\n    unsigned char *data,\n    opus_int32 max_data_bytes,\n    int lsb_depth,\n    downmix_func downmix\n)\n{\n   opus_int32 Fs;\n   int coupled_size;\n   int mono_size;\n   int s;\n   char *ptr;\n   int tot_size;\n   VARDECL(opus_val16, buf);\n   VARDECL(opus_val16, bandSMR);\n   unsigned char tmp_data[MS_FRAME_TMP];\n   OpusRepacketizer rp;\n   opus_int32 vbr;\n   const CELTMode *celt_mode;\n   opus_int32 bitrates[256];\n   opus_val16 bandLogE[42];\n   opus_val32 *mem = NULL;\n   opus_val32 *preemph_mem=NULL;\n   int frame_size;\n   ALLOC_STACK;\n\n   if (st->surround)\n   {\n      preemph_mem = ms_get_preemph_mem(st);\n      mem = ms_get_window_mem(st);\n   }\n\n   ptr = (char*)st + align(sizeof(OpusMSEncoder));\n   opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_SAMPLE_RATE(&Fs));\n   opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_VBR(&vbr));\n   opus_encoder_ctl((OpusEncoder*)ptr, CELT_GET_MODE(&celt_mode));\n\n   {\n      opus_int32 delay_compensation;\n      int channels;\n\n      channels = st->layout.nb_streams + st->layout.nb_coupled_streams;\n      opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_LOOKAHEAD(&delay_compensation));\n      delay_compensation -= Fs/400;\n      frame_size = compute_frame_size(pcm, analysis_frame_size,\n            st->variable_duration, channels, Fs, st->bitrate_bps,\n            delay_compensation, downmix\n#ifndef DISABLE_FLOAT_API\n            , st->subframe_mem\n#endif\n            );\n   }\n\n   if (400*frame_size < Fs)\n   {\n      RESTORE_STACK;\n      return OPUS_BAD_ARG;\n   }\n   /* Validate frame_size before using it to allocate stack space.\n      This mirrors the checks in opus_encode[_float](). */\n   if (400*frame_size != Fs && 200*frame_size != Fs &&\n       100*frame_size != Fs &&  50*frame_size != Fs &&\n        25*frame_size != Fs &&  50*frame_size != 3*Fs)\n   {\n      RESTORE_STACK;\n      return OPUS_BAD_ARG;\n   }\n   ALLOC(buf, 2*frame_size, opus_val16);\n   coupled_size = opus_encoder_get_size(2);\n   mono_size = opus_encoder_get_size(1);\n\n   ALLOC(bandSMR, 21*st->layout.nb_channels, opus_val16);\n   if (st->surround)\n   {\n      surround_analysis(celt_mode, pcm, bandSMR, mem, preemph_mem, frame_size, 120, st->layout.nb_channels, Fs, copy_channel_in);\n   }\n\n   if (max_data_bytes < 4*st->layout.nb_streams-1)\n   {\n      RESTORE_STACK;\n      return OPUS_BUFFER_TOO_SMALL;\n   }\n\n   /* Compute bitrate allocation between streams (this could be a lot better) */\n   surround_rate_allocation(st, bitrates, frame_size);\n\n   if (!vbr)\n      max_data_bytes = IMIN(max_data_bytes, 3*st->bitrate_bps/(3*8*Fs/frame_size));\n\n   ptr = (char*)st + align(sizeof(OpusMSEncoder));\n   for (s=0;s<st->layout.nb_streams;s++)\n   {\n      OpusEncoder *enc;\n      enc = (OpusEncoder*)ptr;\n      if (s < st->layout.nb_coupled_streams)\n         ptr += align(coupled_size);\n      else\n         ptr += align(mono_size);\n      opus_encoder_ctl(enc, OPUS_SET_BITRATE(bitrates[s]));\n      if (st->surround)\n      {\n         opus_int32 equiv_rate;\n         equiv_rate = st->bitrate_bps;\n         if (frame_size*50 < Fs)\n            equiv_rate -= 60*(Fs/frame_size - 50)*st->layout.nb_channels;\n         if (equiv_rate > 10000*st->layout.nb_channels)\n            opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_FULLBAND));\n         else if (equiv_rate > 7000*st->layout.nb_channels)\n            opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_SUPERWIDEBAND));\n         else if (equiv_rate > 5000*st->layout.nb_channels)\n            opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_WIDEBAND));\n         else\n            opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_NARROWBAND));\n         if (s < st->layout.nb_coupled_streams)\n         {\n            /* To preserve the spatial image, force stereo CELT on coupled streams */\n            opus_encoder_ctl(enc, OPUS_SET_FORCE_MODE(MODE_CELT_ONLY));\n            opus_encoder_ctl(enc, OPUS_SET_FORCE_CHANNELS(2));\n         }\n      }\n   }\n\n   ptr = (char*)st + align(sizeof(OpusMSEncoder));\n   /* Counting ToC */\n   tot_size = 0;\n   for (s=0;s<st->layout.nb_streams;s++)\n   {\n      OpusEncoder *enc;\n      int len;\n      int curr_max;\n      int c1, c2;\n\n      opus_repacketizer_init(&rp);\n      enc = (OpusEncoder*)ptr;\n      if (s < st->layout.nb_coupled_streams)\n      {\n         int i;\n         int left, right;\n         left = get_left_channel(&st->layout, s, -1);\n         right = get_right_channel(&st->layout, s, -1);\n         (*copy_channel_in)(buf, 2,\n            pcm, st->layout.nb_channels, left, frame_size);\n         (*copy_channel_in)(buf+1, 2,\n            pcm, st->layout.nb_channels, right, frame_size);\n         ptr += align(coupled_size);\n         if (st->surround)\n         {\n            for (i=0;i<21;i++)\n            {\n               bandLogE[i] = bandSMR[21*left+i];\n               bandLogE[21+i] = bandSMR[21*right+i];\n            }\n         }\n         c1 = left;\n         c2 = right;\n      } else {\n         int i;\n         int chan = get_mono_channel(&st->layout, s, -1);\n         (*copy_channel_in)(buf, 1,\n            pcm, st->layout.nb_channels, chan, frame_size);\n         ptr += align(mono_size);\n         if (st->surround)\n         {\n            for (i=0;i<21;i++)\n               bandLogE[i] = bandSMR[21*chan+i];\n         }\n         c1 = chan;\n         c2 = -1;\n      }\n      if (st->surround)\n         opus_encoder_ctl(enc, OPUS_SET_ENERGY_MASK(bandLogE));\n      /* number of bytes left (+Toc) */\n      curr_max = max_data_bytes - tot_size;\n      /* Reserve three bytes for the last stream and four for the others */\n      curr_max -= IMAX(0,4*(st->layout.nb_streams-s-1)-1);\n      curr_max = IMIN(curr_max,MS_FRAME_TMP);\n      if (!vbr && s == st->layout.nb_streams-1)\n         opus_encoder_ctl(enc, OPUS_SET_BITRATE(curr_max*(8*Fs/frame_size)));\n      len = opus_encode_native(enc, buf, frame_size, tmp_data, curr_max, lsb_depth,\n            pcm, analysis_frame_size, c1, c2, st->layout.nb_channels, downmix);\n      if (len<0)\n      {\n         RESTORE_STACK;\n         return len;\n      }\n      /* We need to use the repacketizer to add the self-delimiting lengths\n         while taking into account the fact that the encoder can now return\n         more than one frame at a time (e.g. 60 ms CELT-only) */\n      opus_repacketizer_cat(&rp, tmp_data, len);\n      len = opus_repacketizer_out_range_impl(&rp, 0, opus_repacketizer_get_nb_frames(&rp),\n            data, max_data_bytes-tot_size, s != st->layout.nb_streams-1, !vbr && s == st->layout.nb_streams-1);\n      data += len;\n      tot_size += len;\n   }\n   /*printf(\"\\n\");*/\n   RESTORE_STACK;\n   return tot_size;\n}\n\n#if !defined(DISABLE_FLOAT_API)\nstatic void opus_copy_channel_in_float(\n  opus_val16 *dst,\n  int dst_stride,\n  const void *src,\n  int src_stride,\n  int src_channel,\n  int frame_size\n)\n{\n   const float *float_src;\n   opus_int32 i;\n   float_src = (const float *)src;\n   for (i=0;i<frame_size;i++)\n#if defined(FIXED_POINT)\n      dst[i*dst_stride] = FLOAT2INT16(float_src[i*src_stride+src_channel]);\n#else\n      dst[i*dst_stride] = float_src[i*src_stride+src_channel];\n#endif\n}\n#endif\n\nstatic void opus_copy_channel_in_short(\n  opus_val16 *dst,\n  int dst_stride,\n  const void *src,\n  int src_stride,\n  int src_channel,\n  int frame_size\n)\n{\n   const opus_int16 *short_src;\n   opus_int32 i;\n   short_src = (const opus_int16 *)src;\n   for (i=0;i<frame_size;i++)\n#if defined(FIXED_POINT)\n      dst[i*dst_stride] = short_src[i*src_stride+src_channel];\n#else\n      dst[i*dst_stride] = (1/32768.f)*short_src[i*src_stride+src_channel];\n#endif\n}\n\n\n#ifdef FIXED_POINT\nint opus_multistream_encode(\n    OpusMSEncoder *st,\n    const opus_val16 *pcm,\n    int frame_size,\n    unsigned char *data,\n    opus_int32 max_data_bytes\n)\n{\n   return opus_multistream_encode_native(st, opus_copy_channel_in_short,\n      pcm, frame_size, data, max_data_bytes, 16, downmix_int);\n}\n\n#ifndef DISABLE_FLOAT_API\nint opus_multistream_encode_float(\n    OpusMSEncoder *st,\n    const float *pcm,\n    int frame_size,\n    unsigned char *data,\n    opus_int32 max_data_bytes\n)\n{\n   return opus_multistream_encode_native(st, opus_copy_channel_in_float,\n      pcm, frame_size, data, max_data_bytes, 16, downmix_float);\n}\n#endif\n\n#else\n\nint opus_multistream_encode_float\n(\n    OpusMSEncoder *st,\n    const opus_val16 *pcm,\n    int frame_size,\n    unsigned char *data,\n    opus_int32 max_data_bytes\n)\n{\n   return opus_multistream_encode_native(st, opus_copy_channel_in_float,\n      pcm, frame_size, data, max_data_bytes, 24, downmix_float);\n}\n\nint opus_multistream_encode(\n    OpusMSEncoder *st,\n    const opus_int16 *pcm,\n    int frame_size,\n    unsigned char *data,\n    opus_int32 max_data_bytes\n)\n{\n   return opus_multistream_encode_native(st, opus_copy_channel_in_short,\n      pcm, frame_size, data, max_data_bytes, 16, downmix_int);\n}\n#endif\n\nint opus_multistream_encoder_ctl(OpusMSEncoder *st, int request, ...)\n{\n   va_list ap;\n   int coupled_size, mono_size;\n   char *ptr;\n   int ret = OPUS_OK;\n\n   va_start(ap, request);\n\n   coupled_size = opus_encoder_get_size(2);\n   mono_size = opus_encoder_get_size(1);\n   ptr = (char*)st + align(sizeof(OpusMSEncoder));\n   switch (request)\n   {\n   case OPUS_SET_BITRATE_REQUEST:\n   {\n      opus_int32 value = va_arg(ap, opus_int32);\n      if (value<0 && value!=OPUS_AUTO && value!=OPUS_BITRATE_MAX)\n      {\n         goto bad_arg;\n      }\n      st->bitrate_bps = value;\n   }\n   break;\n   case OPUS_GET_BITRATE_REQUEST:\n   {\n      int s;\n      opus_int32 *value = va_arg(ap, opus_int32*);\n      if (!value)\n      {\n         goto bad_arg;\n      }\n      *value = 0;\n      for (s=0;s<st->layout.nb_streams;s++)\n      {\n         opus_int32 rate;\n         OpusEncoder *enc;\n         enc = (OpusEncoder*)ptr;\n         if (s < st->layout.nb_coupled_streams)\n            ptr += align(coupled_size);\n         else\n            ptr += align(mono_size);\n         opus_encoder_ctl(enc, request, &rate);\n         *value += rate;\n      }\n   }\n   break;\n   case OPUS_GET_LSB_DEPTH_REQUEST:\n   case OPUS_GET_VBR_REQUEST:\n   case OPUS_GET_APPLICATION_REQUEST:\n   case OPUS_GET_BANDWIDTH_REQUEST:\n   case OPUS_GET_COMPLEXITY_REQUEST:\n   case OPUS_GET_PACKET_LOSS_PERC_REQUEST:\n   case OPUS_GET_DTX_REQUEST:\n   case OPUS_GET_VOICE_RATIO_REQUEST:\n   case OPUS_GET_VBR_CONSTRAINT_REQUEST:\n   case OPUS_GET_SIGNAL_REQUEST:\n   case OPUS_GET_LOOKAHEAD_REQUEST:\n   case OPUS_GET_SAMPLE_RATE_REQUEST:\n   case OPUS_GET_INBAND_FEC_REQUEST:\n   case OPUS_GET_FORCE_CHANNELS_REQUEST:\n   case OPUS_GET_PREDICTION_DISABLED_REQUEST:\n   {\n      OpusEncoder *enc;\n      /* For int32* GET params, just query the first stream */\n      opus_int32 *value = va_arg(ap, opus_int32*);\n      enc = (OpusEncoder*)ptr;\n      ret = opus_encoder_ctl(enc, request, value);\n   }\n   break;\n   case OPUS_GET_FINAL_RANGE_REQUEST:\n   {\n      int s;\n      opus_uint32 *value = va_arg(ap, opus_uint32*);\n      opus_uint32 tmp;\n      if (!value)\n      {\n         goto bad_arg;\n      }\n      *value=0;\n      for (s=0;s<st->layout.nb_streams;s++)\n      {\n         OpusEncoder *enc;\n         enc = (OpusEncoder*)ptr;\n         if (s < st->layout.nb_coupled_streams)\n            ptr += align(coupled_size);\n         else\n            ptr += align(mono_size);\n         ret = opus_encoder_ctl(enc, request, &tmp);\n         if (ret != OPUS_OK) break;\n         *value ^= tmp;\n      }\n   }\n   break;\n   case OPUS_SET_LSB_DEPTH_REQUEST:\n   case OPUS_SET_COMPLEXITY_REQUEST:\n   case OPUS_SET_VBR_REQUEST:\n   case OPUS_SET_VBR_CONSTRAINT_REQUEST:\n   case OPUS_SET_MAX_BANDWIDTH_REQUEST:\n   case OPUS_SET_BANDWIDTH_REQUEST:\n   case OPUS_SET_SIGNAL_REQUEST:\n   case OPUS_SET_APPLICATION_REQUEST:\n   case OPUS_SET_INBAND_FEC_REQUEST:\n   case OPUS_SET_PACKET_LOSS_PERC_REQUEST:\n   case OPUS_SET_DTX_REQUEST:\n   case OPUS_SET_FORCE_MODE_REQUEST:\n   case OPUS_SET_FORCE_CHANNELS_REQUEST:\n   case OPUS_SET_PREDICTION_DISABLED_REQUEST:\n   {\n      int s;\n      /* This works for int32 params */\n      opus_int32 value = va_arg(ap, opus_int32);\n      for (s=0;s<st->layout.nb_streams;s++)\n      {\n         OpusEncoder *enc;\n\n         enc = (OpusEncoder*)ptr;\n         if (s < st->layout.nb_coupled_streams)\n            ptr += align(coupled_size);\n         else\n            ptr += align(mono_size);\n         ret = opus_encoder_ctl(enc, request, value);\n         if (ret != OPUS_OK)\n            break;\n      }\n   }\n   break;\n   case OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST:\n   {\n      int s;\n      opus_int32 stream_id;\n      OpusEncoder **value;\n      stream_id = va_arg(ap, opus_int32);\n      if (stream_id<0 || stream_id >= st->layout.nb_streams)\n         ret = OPUS_BAD_ARG;\n      value = va_arg(ap, OpusEncoder**);\n      if (!value)\n      {\n         goto bad_arg;\n      }\n      for (s=0;s<stream_id;s++)\n      {\n         if (s < st->layout.nb_coupled_streams)\n            ptr += align(coupled_size);\n         else\n            ptr += align(mono_size);\n      }\n      *value = (OpusEncoder*)ptr;\n   }\n   break;\n   case OPUS_SET_EXPERT_FRAME_DURATION_REQUEST:\n   {\n       opus_int32 value = va_arg(ap, opus_int32);\n       st->variable_duration = value;\n   }\n   break;\n   case OPUS_GET_EXPERT_FRAME_DURATION_REQUEST:\n   {\n       opus_int32 *value = va_arg(ap, opus_int32*);\n       if (!value)\n       {\n          goto bad_arg;\n       }\n       *value = st->variable_duration;\n   }\n   break;\n   case OPUS_RESET_STATE:\n   {\n      int s;\n      st->subframe_mem[0] = st->subframe_mem[1] = st->subframe_mem[2] = 0;\n      if (st->surround)\n      {\n         OPUS_CLEAR(ms_get_preemph_mem(st), st->layout.nb_channels);\n         OPUS_CLEAR(ms_get_window_mem(st), st->layout.nb_channels*120);\n      }\n      for (s=0;s<st->layout.nb_streams;s++)\n      {\n         OpusEncoder *enc;\n         enc = (OpusEncoder*)ptr;\n         if (s < st->layout.nb_coupled_streams)\n            ptr += align(coupled_size);\n         else\n            ptr += align(mono_size);\n         ret = opus_encoder_ctl(enc, OPUS_RESET_STATE);\n         if (ret != OPUS_OK)\n            break;\n      }\n   }\n   break;\n   default:\n      ret = OPUS_UNIMPLEMENTED;\n      break;\n   }\n\n   va_end(ap);\n   return ret;\nbad_arg:\n   va_end(ap);\n   return OPUS_BAD_ARG;\n}\n\nvoid opus_multistream_encoder_destroy(OpusMSEncoder *st)\n{\n    opus_free(st);\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/opus_private.h",
    "content": "/* Copyright (c) 2012 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifndef OPUS_PRIVATE_H\n#define OPUS_PRIVATE_H\n\n#include \"arch.h\"\n#include \"opus.h\"\n#include \"celt.h\"\n\nstruct OpusRepacketizer {\n   unsigned char toc;\n   int nb_frames;\n   const unsigned char *frames[48];\n   opus_int16 len[48];\n   int framesize;\n};\n\ntypedef struct ChannelLayout {\n   int nb_channels;\n   int nb_streams;\n   int nb_coupled_streams;\n   unsigned char mapping[256];\n} ChannelLayout;\n\nint validate_layout(const ChannelLayout *layout);\nint get_left_channel(const ChannelLayout *layout, int stream_id, int prev);\nint get_right_channel(const ChannelLayout *layout, int stream_id, int prev);\nint get_mono_channel(const ChannelLayout *layout, int stream_id, int prev);\n\n\n\n#define MODE_SILK_ONLY          1000\n#define MODE_HYBRID             1001\n#define MODE_CELT_ONLY          1002\n\n#define OPUS_SET_VOICE_RATIO_REQUEST         11018\n#define OPUS_GET_VOICE_RATIO_REQUEST         11019\n\n/** Configures the encoder's expected percentage of voice\n  * opposed to music or other signals.\n  *\n  * @note This interface is currently more aspiration than actuality. It's\n  * ultimately expected to bias an automatic signal classifier, but it currently\n  * just shifts the static bitrate to mode mapping around a little bit.\n  *\n  * @param[in] x <tt>int</tt>:   Voice percentage in the range 0-100, inclusive.\n  * @hideinitializer */\n#define OPUS_SET_VOICE_RATIO(x) OPUS_SET_VOICE_RATIO_REQUEST, __opus_check_int(x)\n/** Gets the encoder's configured voice ratio value, @see OPUS_SET_VOICE_RATIO\n  *\n  * @param[out] x <tt>int*</tt>:  Voice percentage in the range 0-100, inclusive.\n  * @hideinitializer */\n#define OPUS_GET_VOICE_RATIO(x) OPUS_GET_VOICE_RATIO_REQUEST, __opus_check_int_ptr(x)\n\n\n#define OPUS_SET_FORCE_MODE_REQUEST    11002\n#define OPUS_SET_FORCE_MODE(x) OPUS_SET_FORCE_MODE_REQUEST, __opus_check_int(x)\n\ntypedef void (*downmix_func)(const void *, opus_val32 *, int, int, int, int, int);\nvoid downmix_float(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C);\nvoid downmix_int(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C);\n\nint optimize_framesize(const opus_val16 *x, int len, int C, opus_int32 Fs,\n                int bitrate, opus_val16 tonality, float *mem, int buffering,\n                downmix_func downmix);\n\nint encode_size(int size, unsigned char *data);\n\nopus_int32 frame_size_select(opus_int32 frame_size, int variable_duration, opus_int32 Fs);\n\nopus_int32 compute_frame_size(const void *analysis_pcm, int frame_size,\n      int variable_duration, int C, opus_int32 Fs, int bitrate_bps,\n      int delay_compensation, downmix_func downmix\n#ifndef DISABLE_FLOAT_API\n      , float *subframe_mem\n#endif\n      );\n\nopus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size,\n      unsigned char *data, opus_int32 out_data_bytes, int lsb_depth,\n      const void *analysis_pcm, opus_int32 analysis_size, int c1, int c2, int analysis_channels, downmix_func downmix);\n\nint opus_decode_native(OpusDecoder *st, const unsigned char *data, opus_int32 len,\n      opus_val16 *pcm, int frame_size, int decode_fec, int self_delimited,\n      opus_int32 *packet_offset, int soft_clip);\n\n/* Make sure everything's aligned to sizeof(void *) bytes */\nstatic OPUS_INLINE int align(int i)\n{\n    return (i+(int)sizeof(void *)-1)&-(int)sizeof(void *);\n}\n\nint opus_packet_parse_impl(const unsigned char *data, opus_int32 len,\n      int self_delimited, unsigned char *out_toc,\n      const unsigned char *frames[48], opus_int16 size[48],\n      int *payload_offset, opus_int32 *packet_offset);\n\nopus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end,\n      unsigned char *data, opus_int32 maxlen, int self_delimited, int pad);\n\nint pad_frame(unsigned char *data, opus_int32 len, opus_int32 new_len);\n\n#endif /* OPUS_PRIVATE_H */\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/repacketizer.c",
    "content": "/* Copyright (c) 2011 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"opus.h\"\n#include \"opus_private.h\"\n#include \"os_support.h\"\n\n\nint opus_repacketizer_get_size(void)\n{\n   return sizeof(OpusRepacketizer);\n}\n\nOpusRepacketizer *opus_repacketizer_init(OpusRepacketizer *rp)\n{\n   rp->nb_frames = 0;\n   return rp;\n}\n\nOpusRepacketizer *opus_repacketizer_create(void)\n{\n   OpusRepacketizer *rp;\n   rp=(OpusRepacketizer *)opus_alloc(opus_repacketizer_get_size());\n   if(rp==NULL)return NULL;\n   return opus_repacketizer_init(rp);\n}\n\nvoid opus_repacketizer_destroy(OpusRepacketizer *rp)\n{\n   opus_free(rp);\n}\n\nstatic int opus_repacketizer_cat_impl(OpusRepacketizer *rp, const unsigned char *data, opus_int32 len, int self_delimited)\n{\n   unsigned char tmp_toc;\n   int curr_nb_frames,ret;\n   /* Set of check ToC */\n   if (len<1) return OPUS_INVALID_PACKET;\n   if (rp->nb_frames == 0)\n   {\n      rp->toc = data[0];\n      rp->framesize = opus_packet_get_samples_per_frame(data, 8000);\n   } else if ((rp->toc&0xFC) != (data[0]&0xFC))\n   {\n      /*fprintf(stderr, \"toc mismatch: 0x%x vs 0x%x\\n\", rp->toc, data[0]);*/\n      return OPUS_INVALID_PACKET;\n   }\n   curr_nb_frames = opus_packet_get_nb_frames(data, len);\n   if(curr_nb_frames<1) return OPUS_INVALID_PACKET;\n\n   /* Check the 120 ms maximum packet size */\n   if ((curr_nb_frames+rp->nb_frames)*rp->framesize > 960)\n   {\n      return OPUS_INVALID_PACKET;\n   }\n\n   ret=opus_packet_parse_impl(data, len, self_delimited, &tmp_toc, &rp->frames[rp->nb_frames], &rp->len[rp->nb_frames], NULL, NULL);\n   if(ret<1)return ret;\n\n   rp->nb_frames += curr_nb_frames;\n   return OPUS_OK;\n}\n\nint opus_repacketizer_cat(OpusRepacketizer *rp, const unsigned char *data, opus_int32 len)\n{\n   return opus_repacketizer_cat_impl(rp, data, len, 0);\n}\n\nint opus_repacketizer_get_nb_frames(OpusRepacketizer *rp)\n{\n   return rp->nb_frames;\n}\n\nopus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end,\n      unsigned char *data, opus_int32 maxlen, int self_delimited, int pad)\n{\n   int i, count;\n   opus_int32 tot_size;\n   opus_int16 *len;\n   const unsigned char **frames;\n   unsigned char * ptr;\n\n   if (begin<0 || begin>=end || end>rp->nb_frames)\n   {\n      /*fprintf(stderr, \"%d %d %d\\n\", begin, end, rp->nb_frames);*/\n      return OPUS_BAD_ARG;\n   }\n   count = end-begin;\n\n   len = rp->len+begin;\n   frames = rp->frames+begin;\n   if (self_delimited)\n      tot_size = 1 + (len[count-1]>=252);\n   else\n      tot_size = 0;\n\n   ptr = data;\n   if (count==1)\n   {\n      /* Code 0 */\n      tot_size += len[0]+1;\n      if (tot_size > maxlen)\n         return OPUS_BUFFER_TOO_SMALL;\n      *ptr++ = rp->toc&0xFC;\n   } else if (count==2)\n   {\n      if (len[1] == len[0])\n      {\n         /* Code 1 */\n         tot_size += 2*len[0]+1;\n         if (tot_size > maxlen)\n            return OPUS_BUFFER_TOO_SMALL;\n         *ptr++ = (rp->toc&0xFC) | 0x1;\n      } else {\n         /* Code 2 */\n         tot_size += len[0]+len[1]+2+(len[0]>=252);\n         if (tot_size > maxlen)\n            return OPUS_BUFFER_TOO_SMALL;\n         *ptr++ = (rp->toc&0xFC) | 0x2;\n         ptr += encode_size(len[0], ptr);\n      }\n   }\n   if (count > 2 || (pad && tot_size < maxlen))\n   {\n      /* Code 3 */\n      int vbr;\n      int pad_amount=0;\n\n      /* Restart the process for the padding case */\n      ptr = data;\n      if (self_delimited)\n         tot_size = 1 + (len[count-1]>=252);\n      else\n         tot_size = 0;\n      vbr = 0;\n      for (i=1;i<count;i++)\n      {\n         if (len[i] != len[0])\n         {\n            vbr=1;\n            break;\n         }\n      }\n      if (vbr)\n      {\n         tot_size += 2;\n         for (i=0;i<count-1;i++)\n            tot_size += 1 + (len[i]>=252) + len[i];\n         tot_size += len[count-1];\n\n         if (tot_size > maxlen)\n            return OPUS_BUFFER_TOO_SMALL;\n         *ptr++ = (rp->toc&0xFC) | 0x3;\n         *ptr++ = count | 0x80;\n      } else {\n         tot_size += count*len[0]+2;\n         if (tot_size > maxlen)\n            return OPUS_BUFFER_TOO_SMALL;\n         *ptr++ = (rp->toc&0xFC) | 0x3;\n         *ptr++ = count;\n      }\n      pad_amount = pad ? (maxlen-tot_size) : 0;\n      if (pad_amount != 0)\n      {\n         int nb_255s;\n         data[1] |= 0x40;\n         nb_255s = (pad_amount-1)/255;\n         for (i=0;i<nb_255s;i++)\n            *ptr++ = 255;\n         *ptr++ = pad_amount-255*nb_255s-1;\n         tot_size += pad_amount;\n      }\n      if (vbr)\n      {\n         for (i=0;i<count-1;i++)\n            ptr += encode_size(len[i], ptr);\n      }\n   }\n   if (self_delimited) {\n      int sdlen = encode_size(len[count-1], ptr);\n      ptr += sdlen;\n   }\n   /* Copy the actual data */\n   for (i=0;i<count;i++)\n   {\n      /* Using OPUS_MOVE() instead of OPUS_COPY() in case we're doing in-place\n         padding from opus_packet_pad or opus_packet_unpad(). */\n      celt_assert(frames[i] + len[i] <= data || ptr <= frames[i]);\n      OPUS_MOVE(ptr, frames[i], len[i]);\n      ptr += len[i];\n   }\n   if (pad)\n   {\n      for (i=ptr-data;i<maxlen;i++)\n         data[i] = 0;\n   }\n   return tot_size;\n}\n\nopus_int32 opus_repacketizer_out_range(OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen)\n{\n   return opus_repacketizer_out_range_impl(rp, begin, end, data, maxlen, 0, 0);\n}\n\nopus_int32 opus_repacketizer_out(OpusRepacketizer *rp, unsigned char *data, opus_int32 maxlen)\n{\n   return opus_repacketizer_out_range_impl(rp, 0, rp->nb_frames, data, maxlen, 0, 0);\n}\n\nint opus_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len)\n{\n   OpusRepacketizer rp;\n   opus_int32 ret;\n   if (len < 1)\n      return OPUS_BAD_ARG;\n   if (len==new_len)\n      return OPUS_OK;\n   else if (len > new_len)\n      return OPUS_BAD_ARG;\n   opus_repacketizer_init(&rp);\n   /* Moving payload to the end of the packet so we can do in-place padding */\n   OPUS_MOVE(data+new_len-len, data, len);\n   opus_repacketizer_cat(&rp, data+new_len-len, len);\n   ret = opus_repacketizer_out_range_impl(&rp, 0, rp.nb_frames, data, new_len, 0, 1);\n   if (ret > 0)\n      return OPUS_OK;\n   else\n      return ret;\n}\n\nopus_int32 opus_packet_unpad(unsigned char *data, opus_int32 len)\n{\n   OpusRepacketizer rp;\n   opus_int32 ret;\n   if (len < 1)\n      return OPUS_BAD_ARG;\n   opus_repacketizer_init(&rp);\n   ret = opus_repacketizer_cat(&rp, data, len);\n   if (ret < 0)\n      return ret;\n   ret = opus_repacketizer_out_range_impl(&rp, 0, rp.nb_frames, data, len, 0, 0);\n   celt_assert(ret > 0 && ret <= len);\n   return ret;\n}\n\nint opus_multistream_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len, int nb_streams)\n{\n   int s;\n   int count;\n   unsigned char toc;\n   opus_int16 size[48];\n   opus_int32 packet_offset;\n   opus_int32 amount;\n\n   if (len < 1)\n      return OPUS_BAD_ARG;\n   if (len==new_len)\n      return OPUS_OK;\n   else if (len > new_len)\n      return OPUS_BAD_ARG;\n   amount = new_len - len;\n   /* Seek to last stream */\n   for (s=0;s<nb_streams-1;s++)\n   {\n      if (len<=0)\n         return OPUS_INVALID_PACKET;\n      count = opus_packet_parse_impl(data, len, 1, &toc, NULL,\n                                     size, NULL, &packet_offset);\n      if (count<0)\n         return count;\n      data += packet_offset;\n      len -= packet_offset;\n   }\n   return opus_packet_pad(data, len, len+amount);\n}\n\nopus_int32 opus_multistream_packet_unpad(unsigned char *data, opus_int32 len, int nb_streams)\n{\n   int s;\n   unsigned char toc;\n   opus_int16 size[48];\n   opus_int32 packet_offset;\n   OpusRepacketizer rp;\n   unsigned char *dst;\n   opus_int32 dst_len;\n\n   if (len < 1)\n      return OPUS_BAD_ARG;\n   dst = data;\n   dst_len = 0;\n   /* Unpad all frames */\n   for (s=0;s<nb_streams;s++)\n   {\n      opus_int32 ret;\n      int self_delimited = s!=nb_streams-1;\n      if (len<=0)\n         return OPUS_INVALID_PACKET;\n      opus_repacketizer_init(&rp);\n      ret = opus_packet_parse_impl(data, len, self_delimited, &toc, NULL,\n                                     size, NULL, &packet_offset);\n      if (ret<0)\n         return ret;\n      ret = opus_repacketizer_cat_impl(&rp, data, packet_offset, self_delimited);\n      if (ret < 0)\n         return ret;\n      ret = opus_repacketizer_out_range_impl(&rp, 0, rp.nb_frames, dst, len, self_delimited, 0);\n      if (ret < 0)\n         return ret;\n      else\n         dst_len += ret;\n      dst += ret;\n      data += packet_offset;\n      len -= packet_offset;\n   }\n   return dst_len;\n}\n\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/repacketizer_demo.c",
    "content": "/* Copyright (c) 2011 Xiph.Org Foundation\n   Written by Jean-Marc Valin */\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   - Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   - 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   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 OWNER\n   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n   LIABILITY, 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#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"opus.h\"\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define MAX_PACKETOUT 32000\n\nvoid usage(char *argv0)\n{\n   fprintf(stderr, \"usage: %s [options] input_file output_file\\n\", argv0);\n}\n\nstatic void int_to_char(opus_uint32 i, unsigned char ch[4])\n{\n    ch[0] = i>>24;\n    ch[1] = (i>>16)&0xFF;\n    ch[2] = (i>>8)&0xFF;\n    ch[3] = i&0xFF;\n}\n\nstatic opus_uint32 char_to_int(unsigned char ch[4])\n{\n    return ((opus_uint32)ch[0]<<24) | ((opus_uint32)ch[1]<<16)\n         | ((opus_uint32)ch[2]<< 8) |  (opus_uint32)ch[3];\n}\n\nint main(int argc, char *argv[])\n{\n   int i, eof=0;\n   FILE *fin, *fout;\n   unsigned char packets[48][1500];\n   int len[48];\n   int rng[48];\n   OpusRepacketizer *rp;\n   unsigned char output_packet[MAX_PACKETOUT];\n   int merge = 1, split=0;\n\n   if (argc < 3)\n   {\n      usage(argv[0]);\n      return EXIT_FAILURE;\n   }\n   for (i=1;i<argc-2;i++)\n   {\n      if (strcmp(argv[i], \"-merge\")==0)\n      {\n         merge = atoi(argv[i+1]);\n         if(merge<1)\n         {\n            fprintf(stderr, \"-merge parameter must be at least 1.\\n\");\n            return EXIT_FAILURE;\n         }\n         if(merge>48)\n         {\n            fprintf(stderr, \"-merge parameter must be less than 48.\\n\");\n            return EXIT_FAILURE;\n         }\n         i++;\n      } else if (strcmp(argv[i], \"-split\")==0)\n         split = 1;\n      else\n      {\n         fprintf(stderr, \"Unknown option: %s\\n\", argv[i]);\n         usage(argv[0]);\n         return EXIT_FAILURE;\n      }\n   }\n   fin = fopen(argv[argc-2], \"r\");\n   if(fin==NULL)\n   {\n     fprintf(stderr, \"Error opening input file: %s\\n\", argv[argc-2]);\n     return EXIT_FAILURE;\n   }\n   fout = fopen(argv[argc-1], \"w\");\n   if(fout==NULL)\n   {\n     fprintf(stderr, \"Error opening output file: %s\\n\", argv[argc-1]);\n     fclose(fin);\n     return EXIT_FAILURE;\n   }\n\n   rp = opus_repacketizer_create();\n   while (!eof)\n   {\n      int err;\n      int nb_packets=merge;\n      opus_repacketizer_init(rp);\n      for (i=0;i<nb_packets;i++)\n      {\n         unsigned char ch[4];\n         err = fread(ch, 1, 4, fin);\n         len[i] = char_to_int(ch);\n         /*fprintf(stderr, \"in len = %d\\n\", len[i]);*/\n         if (len[i]>1500 || len[i]<0)\n         {\n             if (feof(fin))\n             {\n                eof = 1;\n             } else {\n                fprintf(stderr, \"Invalid payload length\\n\");\n                fclose(fin);\n                fclose(fout);\n                return EXIT_FAILURE;\n             }\n             break;\n         }\n         err = fread(ch, 1, 4, fin);\n         rng[i] = char_to_int(ch);\n         err = fread(packets[i], 1, len[i], fin);\n         if (feof(fin))\n         {\n            eof = 1;\n            break;\n         }\n         err = opus_repacketizer_cat(rp, packets[i], len[i]);\n         if (err!=OPUS_OK)\n         {\n            fprintf(stderr, \"opus_repacketizer_cat() failed: %s\\n\", opus_strerror(err));\n            break;\n         }\n      }\n      nb_packets = i;\n\n      if (eof)\n         break;\n\n      if (!split)\n      {\n         err = opus_repacketizer_out(rp, output_packet, MAX_PACKETOUT);\n         if (err>0) {\n            unsigned char int_field[4];\n            int_to_char(err, int_field);\n            if(fwrite(int_field, 1, 4, fout)!=4){\n               fprintf(stderr, \"Error writing.\\n\");\n               return EXIT_FAILURE;\n            }\n            int_to_char(rng[nb_packets-1], int_field);\n            if (fwrite(int_field, 1, 4, fout)!=4) {\n               fprintf(stderr, \"Error writing.\\n\");\n               return EXIT_FAILURE;\n            }\n            if (fwrite(output_packet, 1, err, fout)!=(unsigned)err) {\n               fprintf(stderr, \"Error writing.\\n\");\n               return EXIT_FAILURE;\n            }\n            /*fprintf(stderr, \"out len = %d\\n\", err);*/\n         } else {\n            fprintf(stderr, \"opus_repacketizer_out() failed: %s\\n\", opus_strerror(err));\n         }\n      } else {\n         int nb_frames = opus_repacketizer_get_nb_frames(rp);\n         for (i=0;i<nb_frames;i++)\n         {\n            err = opus_repacketizer_out_range(rp, i, i+1, output_packet, MAX_PACKETOUT);\n            if (err>0) {\n               unsigned char int_field[4];\n               int_to_char(err, int_field);\n               if (fwrite(int_field, 1, 4, fout)!=4) {\n                  fprintf(stderr, \"Error writing.\\n\");\n                  return EXIT_FAILURE;\n               }\n               if (i==nb_frames-1)\n                  int_to_char(rng[nb_packets-1], int_field);\n               else\n                  int_to_char(0, int_field);\n               if (fwrite(int_field, 1, 4, fout)!=4) {\n                  fprintf(stderr, \"Error writing.\\n\");\n                  return EXIT_FAILURE;\n               }\n               if (fwrite(output_packet, 1, err, fout)!=(unsigned)err) {\n                  fprintf(stderr, \"Error writing.\\n\");\n                  return EXIT_FAILURE;\n               }\n               /*fprintf(stderr, \"out len = %d\\n\", err);*/\n            } else {\n               fprintf(stderr, \"opus_repacketizer_out() failed: %s\\n\", opus_strerror(err));\n            }\n\n         }\n      }\n   }\n\n   fclose(fin);\n   fclose(fout);\n   return EXIT_SUCCESS;\n}\n"
  },
  {
    "path": "TelegramClient.Opus/opus/src/tansig_table.h",
    "content": "/* This file is auto-generated by gen_tables */\n\nstatic const float tansig_table[201] = {\n0.000000f, 0.039979f, 0.079830f, 0.119427f, 0.158649f,\n0.197375f, 0.235496f, 0.272905f, 0.309507f, 0.345214f,\n0.379949f, 0.413644f, 0.446244f, 0.477700f, 0.507977f,\n0.537050f, 0.564900f, 0.591519f, 0.616909f, 0.641077f,\n0.664037f, 0.685809f, 0.706419f, 0.725897f, 0.744277f,\n0.761594f, 0.777888f, 0.793199f, 0.807569f, 0.821040f,\n0.833655f, 0.845456f, 0.856485f, 0.866784f, 0.876393f,\n0.885352f, 0.893698f, 0.901468f, 0.908698f, 0.915420f,\n0.921669f, 0.927473f, 0.932862f, 0.937863f, 0.942503f,\n0.946806f, 0.950795f, 0.954492f, 0.957917f, 0.961090f,\n0.964028f, 0.966747f, 0.969265f, 0.971594f, 0.973749f,\n0.975743f, 0.977587f, 0.979293f, 0.980869f, 0.982327f,\n0.983675f, 0.984921f, 0.986072f, 0.987136f, 0.988119f,\n0.989027f, 0.989867f, 0.990642f, 0.991359f, 0.992020f,\n0.992631f, 0.993196f, 0.993718f, 0.994199f, 0.994644f,\n0.995055f, 0.995434f, 0.995784f, 0.996108f, 0.996407f,\n0.996682f, 0.996937f, 0.997172f, 0.997389f, 0.997590f,\n0.997775f, 0.997946f, 0.998104f, 0.998249f, 0.998384f,\n0.998508f, 0.998623f, 0.998728f, 0.998826f, 0.998916f,\n0.999000f, 0.999076f, 0.999147f, 0.999213f, 0.999273f,\n0.999329f, 0.999381f, 0.999428f, 0.999472f, 0.999513f,\n0.999550f, 0.999585f, 0.999617f, 0.999646f, 0.999673f,\n0.999699f, 0.999722f, 0.999743f, 0.999763f, 0.999781f,\n0.999798f, 0.999813f, 0.999828f, 0.999841f, 0.999853f,\n0.999865f, 0.999875f, 0.999885f, 0.999893f, 0.999902f,\n0.999909f, 0.999916f, 0.999923f, 0.999929f, 0.999934f,\n0.999939f, 0.999944f, 0.999948f, 0.999952f, 0.999956f,\n0.999959f, 0.999962f, 0.999965f, 0.999968f, 0.999970f,\n0.999973f, 0.999975f, 0.999977f, 0.999978f, 0.999980f,\n0.999982f, 0.999983f, 0.999984f, 0.999986f, 0.999987f,\n0.999988f, 0.999989f, 0.999990f, 0.999990f, 0.999991f,\n0.999992f, 0.999992f, 0.999993f, 0.999994f, 0.999994f,\n0.999994f, 0.999995f, 0.999995f, 0.999996f, 0.999996f,\n0.999996f, 0.999997f, 0.999997f, 0.999997f, 0.999997f,\n0.999997f, 0.999998f, 0.999998f, 0.999998f, 0.999998f,\n0.999998f, 0.999998f, 0.999999f, 0.999999f, 0.999999f,\n0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f,\n0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f,\n1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,\n1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,\n1.000000f,\n};\n"
  },
  {
    "path": "TelegramClient.Opus/pch.cpp",
    "content": "﻿//\r\n// pch.cpp\r\n// Include the standard header and generate the precompiled header.\r\n//\r\n\r\n#include \"pch.h\"\r\n"
  },
  {
    "path": "TelegramClient.Opus/pch.h",
    "content": "﻿//\r\n// pch.h\r\n// Header for standard system include files.\r\n//\r\n\r\n#pragma once\r\n"
  },
  {
    "path": "TelegramClient.Player/AudioPlayer.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing Microsoft.Phone.BackgroundAudio;\r\nusing System.Collections.Generic;\r\n\r\nnamespace TelegramClient.Player\r\n{\r\n    public class AudioPlayer : AudioPlayerAgent\r\n    {\r\n        private static volatile bool _classInitialized;\r\n\r\n        // What's the current track?\r\n        static int currentTrackNumber = 0;\r\n\r\n        // A playlist made up of AudioTrack items.\r\n        private static List<AudioTrack> _playList = new List<AudioTrack>\r\n        {\r\n\r\n            // A remote URI\r\n            new AudioTrack(new Uri(\"http://traffic.libsyn.com/wpradio/WPRadio_29.mp3\", UriKind.Absolute), \r\n                            \"Episode 29\", \r\n                            \"Windows Phone Radio\", \r\n                            \"Windows Phone Radio Podcast\",\r\n                            new Uri(\"shared/media/Episode29.jpg\", UriKind.Relative))\r\n        };\r\n\r\n\r\n        /// <remarks>\r\n        /// AudioPlayer instances can share the same process. \r\n        /// Static fields can be used to share state between AudioPlayer instances\r\n        /// or to communicate with the Audio Streaming agent.\r\n        /// </remarks>\r\n        public AudioPlayer()\r\n        {\r\n            if (!_classInitialized)\r\n            {\r\n                _classInitialized = true;\r\n                // Subscribe to the managed exception handler\r\n                Deployment.Current.Dispatcher.BeginInvoke(delegate\r\n                {\r\n                    Application.Current.UnhandledException += AudioPlayer_UnhandledException;\r\n                });\r\n            }\r\n        }\r\n\r\n        /// Code to execute on Unhandled Exceptions\r\n        private void AudioPlayer_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)\r\n        {\r\n            if (System.Diagnostics.Debugger.IsAttached)\r\n            {\r\n                // An unhandled exception has occurred; break into the debugger\r\n                System.Diagnostics.Debugger.Break();\r\n            }\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Increments the currentTrackNumber and plays the correpsonding track.\r\n        /// </summary>\r\n        /// <param name=\"player\">The BackgroundAudioPlayer</param>\r\n        private void PlayNextTrack(BackgroundAudioPlayer player)\r\n        {\r\n            if (++currentTrackNumber >= _playList.Count)\r\n            {\r\n                currentTrackNumber = 0;\r\n            }\r\n\r\n            PlayTrack(player);\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Decrements the currentTrackNumber and plays the correpsonding track.\r\n        /// </summary>\r\n        /// <param name=\"player\">The BackgroundAudioPlayer</param>\r\n        private void PlayPreviousTrack(BackgroundAudioPlayer player)\r\n        {\r\n            if (--currentTrackNumber < 0)\r\n            {\r\n                currentTrackNumber = _playList.Count - 1;\r\n            }\r\n\r\n            PlayTrack(player);\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Plays the track in our playlist at the currentTrackNumber position.\r\n        /// </summary>\r\n        /// <param name=\"player\">The BackgroundAudioPlayer</param>\r\n        private void PlayTrack(BackgroundAudioPlayer player)\r\n        {\r\n            if (PlayState.Paused == player.PlayerState)\r\n            {\r\n                // If we're paused, we already have \r\n                // the track set, so just resume playing.\r\n                player.Play();\r\n            }\r\n            else\r\n            {\r\n                // Set which track to play. When the TrackReady state is received \r\n                // in the OnPlayStateChanged handler, call player.Play().\r\n                //player.Track = _playList[currentTrackNumber];\r\n\r\n                if (player.Track != null) player.Play();\r\n            }\r\n\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Called when the playstate changes, except for the Error state (see OnError)\r\n        /// </summary>\r\n        /// <param name=\"player\">The BackgroundAudioPlayer</param>\r\n        /// <param name=\"track\">The track playing at the time the playstate changed</param>\r\n        /// <param name=\"playState\">The new playstate of the player</param>\r\n        /// <remarks>\r\n        /// Play State changes cannot be cancelled. They are raised even if the application\r\n        /// caused the state change itself, assuming the application has opted-in to the callback.\r\n        /// \r\n        /// Notable playstate events: \r\n        /// (a) TrackEnded: invoked when the player has no current track. The agent can set the next track.\r\n        /// (b) TrackReady: an audio track has been set and it is now ready for playack.\r\n        /// \r\n        /// Call NotifyComplete() only once, after the agent request has been completed, including async callbacks.\r\n        /// </remarks>\r\n        protected override void OnPlayStateChanged(BackgroundAudioPlayer player, AudioTrack track, PlayState playState)\r\n        {\r\n            switch (playState)\r\n            {\r\n                case PlayState.TrackEnded:\r\n                    //PlayNextTrack(player);\r\n                    player.Stop();\r\n                    break;\r\n\r\n                case PlayState.TrackReady:\r\n                    // The track to play is set in the PlayTrack method.\r\n                    player.Play();\r\n                    break;\r\n            }\r\n\r\n            NotifyComplete();\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Called when the user requests an action using application/system provided UI\r\n        /// </summary>\r\n        /// <param name=\"player\">The BackgroundAudioPlayer</param>\r\n        /// <param name=\"track\">The track playing at the time of the user action</param>\r\n        /// <param name=\"action\">The action the user has requested</param>\r\n        /// <param name=\"param\">The data associated with the requested action.\r\n        /// In the current version this parameter is only for use with the Seek action,\r\n        /// to indicate the requested position of an audio track</param>\r\n        /// <remarks>\r\n        /// User actions do not automatically make any changes in system state; the agent is responsible\r\n        /// for carrying out the user actions if they are supported.\r\n        /// \r\n        /// Call NotifyComplete() only once, after the agent request has been completed, including async callbacks.\r\n        /// </remarks>\r\n        protected override void OnUserAction(BackgroundAudioPlayer player, AudioTrack track, UserAction action, object param)\r\n        {\r\n            switch (action)\r\n            {\r\n                case UserAction.Play:\r\n                    PlayTrack(player);\r\n                    break;\r\n\r\n                case UserAction.Pause:\r\n                    player.Pause();\r\n                    break;\r\n\r\n                case UserAction.SkipPrevious:\r\n                    PlayPreviousTrack(player);\r\n                    break;\r\n\r\n                case UserAction.SkipNext:\r\n                    PlayNextTrack(player);\r\n                    break;\r\n                case UserAction.Seek:\r\n                    player.Position = (TimeSpan)param;\r\n                    break;\r\n            }\r\n\r\n            NotifyComplete();\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Called whenever there is an error with playback, such as an AudioTrack not downloading correctly\r\n        /// </summary>\r\n        /// <param name=\"player\">The BackgroundAudioPlayer</param>\r\n        /// <param name=\"track\">The track that had the error</param>\r\n        /// <param name=\"error\">The error that occured</param>\r\n        /// <param name=\"isFatal\">If true, playback cannot continue and playback of the track will stop</param>\r\n        /// <remarks>\r\n        /// This method is not guaranteed to be called in all cases. For example, if the background agent \r\n        /// itself has an unhandled exception, it won't get called back to handle its own errors.\r\n        /// </remarks>\r\n        protected override void OnError(BackgroundAudioPlayer player, AudioTrack track, Exception error, bool isFatal)\r\n        {\r\n            if (isFatal)\r\n            {\r\n                Abort();\r\n            }\r\n            else\r\n            {\r\n                NotifyComplete();\r\n            }\r\n\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the agent request is getting cancelled\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// Once the request is Cancelled, the agent gets 5 seconds to finish its work,\r\n        /// by calling NotifyComplete()/Abort().\r\n        /// </remarks>\r\n        protected override void OnCancel()\r\n        {\r\n            base.OnCancel();\r\n            NotifyComplete();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.Player/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"TelegramClient.Player\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"TelegramClient.Player\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2015\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"c5f29433-1957-4c9e-a7d6-56e52a89afa4\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "TelegramClient.Player/TelegramClient.Player.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>TelegramClient.Player</RootNamespace>\r\n    <AssemblyName>TelegramClient.Player</AssemblyName>\r\n    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>\r\n    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <BackgroundAgentType>AudioPlayerAgent</BackgroundAgentType>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Microsoft.Phone\" />\r\n    <Reference Include=\"System.Windows\" />\r\n    <Reference Include=\"system\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Net\" />\r\n    <Reference Include=\"mscorlib.extensions\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"AudioPlayer.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "TelegramClient.Player.WP8/Properties/AssemblyInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"TelegramClient.Player.WP8\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"TelegramClient.Player.WP8\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2015\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"62c14349-ed3b-4ff0-8635-f970aa1a8e32\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "TelegramClient.Player.WP8/TelegramClient.Player.WP8.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{62C14349-ED3B-4FF0-8635-F970AA1A8E32}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>TelegramClient.Player</RootNamespace>\r\n    <AssemblyName>TelegramClient.Player</AssemblyName>\r\n    <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>\r\n    <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n    <BackgroundAgentType>AgentLibrary</BackgroundAgentType>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|x86' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\x86\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|x86' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\x86\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|ARM' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\ARM\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|ARM' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\ARM\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"..\\TelegramClient.Player\\AudioPlayer.cs\">\r\n      <Link>AudioPlayer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "TelegramClient.ScheduledTaskAgent/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"TelegramClient.ScheduledTaskAgent\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"TelegramClient.ScheduledTaskAgent\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"218abb75-04fb-4e0e-bbb5-69dd36b204b5\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "TelegramClient.ScheduledTaskAgent/ScheduledAgent.cs",
    "content": "﻿using System;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Microsoft.Phone.Scheduler;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.ScheduledTaskAgent\r\n{\r\n    public class ScheduledAgent : Microsoft.Phone.Scheduler.ScheduledTaskAgent\r\n    {\r\n        private static volatile bool _classInitialized;\r\n\r\n        /// <remarks>\r\n        /// ScheduledAgent constructor, initializes the UnhandledException handler\r\n        /// </remarks>\r\n        public ScheduledAgent()\r\n        {\r\n            if (!_classInitialized)\r\n            {\r\n                _classInitialized = true;\r\n                // Subscribe to the managed exception handler\r\n                Deployment.Current.Dispatcher.BeginInvoke(delegate\r\n                {\r\n                    Application.Current.UnhandledException += ScheduledAgent_UnhandledException;\r\n                });\r\n            }\r\n        }\r\n\r\n        /// Code to execute on Unhandled Exceptions\r\n        private void ScheduledAgent_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)\r\n        {\r\n            if (System.Diagnostics.Debugger.IsAttached)\r\n            {\r\n                // An unhandled exception has occurred; break into the debugger\r\n                System.Diagnostics.Debugger.Break();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Agent that runs a scheduled task\r\n        /// </summary>\r\n        /// <param name=\"task\">\r\n        /// The invoked task\r\n        /// </param>\r\n        /// <remarks>\r\n        /// This method is called when a periodic or resource intensive task is invoked\r\n        /// </remarks>\r\n        protected override void OnInvoke(ScheduledTask task)\r\n        {\r\n//            var manualResetEvent = new ManualResetEvent(false);\r\n//            var eventAggregator = new EventAggregator();\r\n//            var cacheService = new InMemoryCacheService(eventAggregator);\r\n//            var updatesService = new UpdatesService(cacheService, eventAggregator);\r\n//            //TODO: Add code to perform your task in background\r\n//            if (ShellTile.ActiveTiles.FirstOrDefault() == null) return;\r\n\r\n//            ShellTileData tileData;\r\n//#if WP8\r\n//            tileData = new StandardTileData { Count = 99 };\r\n//            //tileDate = new IconicTileData { Count = 99, WideContent1 = \"\", WideContent2 = \"\", WideContent3 = \"\" };\r\n//#else\r\n//            tileData = new StandardTileData { BackTitle = DateTime.Now.ToString(\"dd-MMM HH:mm\") };\r\n//#endif\r\n//            try\r\n//            {\r\n//                var tile = ShellTile.ActiveTiles.FirstOrDefault();\r\n//                if (tile != null)\r\n//                { \r\n//                    tile.Update(tileData);\r\n//                }\r\n//            }\r\n//            catch (Exception e)\r\n//            {\r\n\r\n//            }\r\n\r\n\r\n\r\n//            try\r\n//            {\r\n//                //var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n//                //if (!isAuthorized) return;\r\n\r\n//                var mtProtoService = new MTProtoService(updatesService, cacheService, new TransportService());\r\n//                //var stateService = IoC.Get<IStateService>();\r\n\r\n//                //TLUtils.WritePerformance(\">>OnActivate GetDifferenceAsync\");\r\n//                updatesService.GetCurrentUserId = () => mtProtoService.CurrentUserId;\r\n//                updatesService.GetStateAsync = mtProtoService.GetStateAsync;\r\n//                updatesService.GetDHConfigAsync = mtProtoService.GetDHConfigAsync;\r\n//                updatesService.GetDifferenceAsync = mtProtoService.GetDifferenceAsync;\r\n//                updatesService.AcceptEncryptionAsync = mtProtoService.AcceptEncryptionAsync;\r\n//                //stateService.SuppressNotifications = true;\r\n\r\n//                var timer = Stopwatch.StartNew();\r\n//                updatesService.LoadStateAndUpdate(false, () =>\r\n//                {\r\n//                    //TLUtils.WritePerformance(\"::GetDifference time: \" + timer.Elapsed);\r\n//                    //stateService.SuppressNotifications = false;\r\n//                });\r\n//            }\r\n//            catch (Exception e)\r\n//            {\r\n//                //TLUtils.WriteException(e);\r\n//            }\r\n\r\n//            manualResetEvent.WaitOne(20000);\r\n            NotifyComplete();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.ScheduledTaskAgent/TelegramClient.ScheduledTaskAgent.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>TelegramClient.ScheduledTaskAgent</RootNamespace>\r\n    <AssemblyName>TelegramClient.ScheduledTaskAgent</AssemblyName>\r\n    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>\r\n    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <BackgroundAgentType>ScheduledTaskAgent</BackgroundAgentType>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Caliburn.Micro\">\r\n      <HintPath>..\\packages\\Caliburn.Micro.1.5.2\\lib\\wp71\\Caliburn.Micro.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Phone\" />\r\n    <Reference Include=\"System.Windows\" />\r\n    <Reference Include=\"system\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.Xml\" />\r\n    <Reference Include=\"System.Net\" />\r\n    <Reference Include=\"mscorlib.extensions\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"ScheduledAgent.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight for Phone\\$(TargetFrameworkVersion)\\Microsoft.Silverlight.CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "TelegramClient.ScheduledTaskAgent.WP8/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"TelegramClient.ScheduledTaskAgent.WP8\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"TelegramClient.ScheduledTaskAgent.WP8\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"30ada306-4873-4af3-99d3-be57e723013c\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en-US\")]\r\n"
  },
  {
    "path": "TelegramClient.ScheduledTaskAgent.WP8/TelegramClient.ScheduledTaskAgent.WP8.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{30ADA306-4873-4AF3-99D3-BE57E723013C}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>TelegramClient.ScheduledTaskAgent</RootNamespace>\r\n    <AssemblyName>TelegramClient.ScheduledTaskAgent</AssemblyName>\r\n    <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>\r\n    <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>\r\n    <SilverlightApplication>false</SilverlightApplication>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n    <BackgroundAgentType>AgentLibrary</BackgroundAgentType>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|x86' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\x86\\Debug</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|x86' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\x86\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|ARM' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\ARM\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|ARM' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\ARM\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"..\\TelegramClient.ScheduledTaskAgent\\ScheduledAgent.cs\">\r\n      <Link>ScheduledAgent.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\Telegram.Api.WP8\\Telegram.Api.WP8.csproj\">\r\n      <Project>{e79d5093-8038-4a5f-8a98-ca38c0d0886f}</Project>\r\n      <Name>Telegram.Api.WP8</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets\" />\r\n  <ProjectExtensions />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "TelegramClient.Tasks/BackgroundDifferenceLoader.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing Windows.ApplicationModel.Background;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Connection;\r\nusing Telegram.Api.Services.DeviceInfo;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace TelegramClient.Tasks\r\n{\r\n    public sealed class BackgroundDifferenceLoader : IBackgroundTask\r\n    {\r\n        private readonly Mutex _appOpenMutex = new Mutex(false, Constants.TelegramMessengerMutexName);\r\n\r\n        private static bool _logEnabled = true;\r\n\r\n        private static void Log(string message, Action callback = null)\r\n        {\r\n            if (!_logEnabled) return;\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"::BackgroundDifferenceLoader {0} {1}\", _id, message), callback.SafeInvoke);\r\n#if DEBUG\r\n            //PushUtils.AddToast(\"difference\", string.Format(\"{0} {1}\", _id, message), string.Empty, string.Empty, null, null);\r\n#endif\r\n        }\r\n\r\n        private static readonly int _id = new Random().Next(999);\r\n\r\n        private TLInitConnection GetInitConnection()\r\n        {\r\n            return TLUtils.OpenObjectFromMTProtoFile<TLInitConnection>(_initConnectionSyncRoot, Constants.InitConnectionFileName) ??\r\n                new TLInitConnection\r\n                {\r\n                    DeviceModel = new TLString(\"unknown\"),\r\n                    AppVersion = new TLString(\"background task\"),\r\n                    SystemVersion = new TLString(\"8.10.0.0\")\r\n                };\r\n        }\r\n\r\n        public void Run(IBackgroundTaskInstance taskInstance)\r\n        {\r\n            Telegram.Logs.Log.WriteSync = true;\r\n\r\n            var stopwatch = Stopwatch.StartNew();\r\n\r\n            if (!_appOpenMutex.WaitOne(0))\r\n            {\r\n                Log(\"cancel\");\r\n\r\n                return;\r\n            }\r\n            _appOpenMutex.ReleaseMutex();\r\n\r\n            var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n            if (!isAuthorized)\r\n            {\r\n                Log(\"cancel isAuthorized=false\");\r\n            }\r\n\r\n            var deferral = taskInstance.GetDeferral();\r\n            RunAsync(() =>\r\n                {\r\n                    Log(string.Format(\"stop elapsed={0}\", stopwatch.Elapsed));\r\n                    deferral.Complete();\r\n                });\r\n        }\r\n\r\n        private readonly object _stateRoot = new object();\r\n\r\n        private readonly object _initConnectionSyncRoot = new object();\r\n\r\n        private void RunAsync(Action callback)\r\n        {\r\n            var deviceInfoService = new DeviceInfoService(GetInitConnection(), true, \"BackgroundDifferenceLoader\", _id);\r\n            var eventAggregator = new TelegramEventAggregator();\r\n            var cacheService = new InMemoryCacheService(eventAggregator);\r\n            var updatesService = new UpdatesService(cacheService, eventAggregator);\r\n            var transportService = new TransportService();\r\n            var connectionService = new ConnectionService(deviceInfoService);\r\n            var publicConfigService = new MockupPublicConfigService();\r\n\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            var mtProtoService = new MTProtoService(deviceInfoService, updatesService, cacheService, transportService, connectionService, publicConfigService);\r\n            mtProtoService.Initialized += (o, e) =>\r\n            {\r\n                var lastTime = TLUtils.OpenObjectFromMTProtoFile<TLInt>(_differenceTimeSyncRoot, Constants.DifferenceTimeFileName);\r\n                if (lastTime != null)\r\n                {\r\n                    var now = TLUtils.DateToUniversalTimeTLInt(mtProtoService.ClientTicksDelta, DateTime.Now);\r\n\r\n                    if (lastTime.Value + Constants.DifferenceMinInterval > now.Value)\r\n                    {\r\n                        manualResetEvent.Set();\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var clientState = TLUtils.OpenObjectFromMTProtoFile<TLState>(_stateRoot, Constants.StateFileName);\r\n                _results = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLDifference>>(_differenceFileSyncRoot, Constants.DifferenceFileName) ?? new TLVector<TLDifference>();\r\n                var state = GetState(clientState, _results);\r\n\r\n                if (state != null)\r\n                {\r\n                    GetDifferenceAsync(mtProtoService, state, () => manualResetEvent.Set());\r\n                }\r\n                else\r\n                {\r\n                    manualResetEvent.Set();\r\n                }\r\n            };\r\n            mtProtoService.InitializationFailed += (o, e) =>\r\n            {\r\n                manualResetEvent.Set();\r\n            };\r\n            mtProtoService.Initialize();\r\n\r\n#if DEBUG\r\n            manualResetEvent.WaitOne(15000);\r\n#else\r\n            manualResetEvent.WaitOne(15000);\r\n#endif\r\n\r\n            callback.SafeInvoke();\r\n        }\r\n\r\n        private static TLState GetState(TLState clientState, TLVector<TLDifference> results)\r\n        {\r\n            var state = clientState;\r\n            for (var i = 0; i < results.Count; i++)\r\n            {\r\n                var difference = results[i];\r\n                if (difference != null)\r\n                {\r\n                    if (difference.State.Pts.Value < clientState.Pts.Value)\r\n                    {\r\n                        results.RemoveAt(i--);\r\n                        continue;\r\n                    }\r\n\r\n                    if (difference.State.Pts.Value > state.Pts.Value)\r\n                    {\r\n                        state = difference.State;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return state;\r\n        }\r\n\r\n        private void GetDifferenceAsync(IMTProtoService mtProtoService, TLState state, Action callback)\r\n        {\r\n            Log(string.Format(\"get_diff [{0}]\", state));\r\n            mtProtoService.GetDifferenceWithoutUpdatesAsync(state.Pts, state.Date, state.Qts,\r\n                result =>\r\n                {\r\n                    var now = TLUtils.DateToUniversalTimeTLInt(mtProtoService.ClientTicksDelta, DateTime.Now);\r\n                    TLUtils.SaveObjectToMTProtoFile(_differenceTimeSyncRoot, Constants.DifferenceTimeFileName, now);\r\n\r\n                    var differenceEmpty = result as TLDifferenceEmpty;\r\n                    if (differenceEmpty != null)\r\n                    {\r\n                        Log(string.Format(\"diff_empty date={0} seq={1}\", differenceEmpty.Date, differenceEmpty.Seq));\r\n            \r\n                        //DeleteFile();\r\n\r\n                        callback.SafeInvoke();\r\n                    }\r\n\r\n                    var difference = result as TLDifference;\r\n                    if (difference != null)\r\n                    {\r\n                        SaveToFile(difference);\r\n\r\n                        var differenceSlice = result as TLDifferenceSlice;\r\n                        if (differenceSlice != null)\r\n                        {\r\n                            Log(string.Format(\"diff_slice [{0}]\", differenceSlice.State));\r\n\r\n                            GetDifferenceAsync(mtProtoService, differenceSlice.State, callback);\r\n                        }\r\n                        else\r\n                        {\r\n                            Log(string.Format(\"diff [{0}]\", difference.State));\r\n\r\n                            callback.SafeInvoke();\r\n                        }\r\n                    }\r\n                },\r\n                error =>\r\n                {\r\n                    Log(string.Format(\"diff_error={0}\\n{1}\", error, error.Exception));\r\n\r\n                    callback.SafeInvoke();\r\n                });\r\n        }\r\n\r\n        private readonly object _differenceFileSyncRoot = new object();\r\n\r\n        private readonly object _differenceTimeSyncRoot = new object();\r\n\r\n        private TLVector<TLDifference> _results;\r\n\r\n        private void SaveToFile(TLDifference result)\r\n        {\r\n            if (result == null) return;\r\n\r\n            AddResult(_results, result);\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(_differenceFileSyncRoot, Constants.DifferenceFileName, _results);\r\n        }\r\n\r\n        private void AddResult(TLVector<TLDifference> results, TLDifference result)\r\n        {\r\n            if (results.Count > 0)\r\n            {\r\n                var firstResult = results.FirstOrDefault();\r\n                var usersCache = new Dictionary<int, TLUserBase>();\r\n                var chatsCache = new Dictionary<int, TLChatBase>();\r\n\r\n                foreach (var user in firstResult.Users)\r\n                {\r\n                    usersCache[user.Index] = user;\r\n                }\r\n\r\n                foreach (var chat in firstResult.Chats)\r\n                {\r\n                    chatsCache[chat.Index] = chat;\r\n                }\r\n\r\n                foreach (var user in result.Users)\r\n                {\r\n                    usersCache[user.Index] = user;\r\n                }\r\n\r\n                foreach (var chat in result.Chats)\r\n                {\r\n                    chatsCache[chat.Index] = chat;\r\n                }\r\n\r\n                result.Users = new TLVector<TLUserBase>();\r\n                result.Chats = new TLVector<TLChatBase>();\r\n\r\n                var users = new TLVector<TLUserBase>();\r\n                foreach (var user in usersCache.Values)\r\n                {\r\n                    users.Add(user);\r\n                }\r\n                firstResult.Users = users;\r\n\r\n                var chats = new TLVector<TLChatBase>();\r\n                foreach (var chat in chatsCache.Values)\r\n                {\r\n                    chats.Add(chat);\r\n                }\r\n                firstResult.Chats = chats;\r\n            }\r\n\r\n            _results.Add(result);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.Tasks/InteractiveNotificationsBackgroundTask.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing Windows.ApplicationModel.Background;\r\nusing Windows.Foundation.Collections;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Connection;\r\nusing Telegram.Api.Services.DeviceInfo;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Functions.Channels;\r\nusing Telegram.Api.TL.Functions.Messages;\r\nusing Telegram.Api.Transport;\r\nusing Windows.Foundation.Metadata;\r\n\r\n\r\nnamespace TelegramClient.Tasks\r\n{\r\n    public sealed class InteractiveNotificationsBackgroundTask : IBackgroundTask\r\n    {\r\n        private readonly Mutex _appOpenMutex = new Mutex(false, Constants.TelegramMessengerMutexName);\r\n\r\n        private bool _logEnabled = true;\r\n\r\n        private void Log(string message, Action callback = null)\r\n        {\r\n            if (!_logEnabled) return;\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"::InteractiveNotificationsBackgroundTask {0} {1}\", _id, message), callback.SafeInvoke);\r\n#if DEBUG\r\n            //PushUtils.AddToast(\"scheduler\", message, string.Empty, string.Empty, null, null);\r\n#endif\r\n        }\r\n\r\n        private static readonly int _id = new Random().Next(999);\r\n\r\n        private readonly object _initConnectionSyncRoot = new object();\r\n\r\n        private TLInitConnection GetInitConnection()\r\n        {\r\n            return TLUtils.OpenObjectFromMTProtoFile<TLInitConnection>(_initConnectionSyncRoot, Constants.InitConnectionFileName) ??\r\n                new TLInitConnection\r\n                {\r\n                    DeviceModel = new TLString(\"unknown\"),\r\n                    AppVersion = new TLString(\"background task\"),\r\n                    SystemVersion = new TLString(\"10.0.0.0\")\r\n                };\r\n        }\r\n\r\n        private readonly object _actionInfoSyncRoot = new object();\r\n\r\n        public void Run(IBackgroundTaskInstance taskInstance)\r\n        {\r\n            var details = taskInstance.TriggerDetails as IToastNotificationActionTriggerDetail;\r\n            if (details == null) return;\r\n            if (string.IsNullOrEmpty(details.Argument)) return;\r\n            object message;\r\n            if (!details.UserInput.TryGetValue(\"message\", out message)) return;\r\n\r\n            var inputPeer = GetInputPeer(details.Argument);\r\n            if (inputPeer == null) return;\r\n\r\n            var msgId = GetMsgId(details.Argument);\r\n\r\n            Telegram.Logs.Log.WriteSync = true;\r\n\r\n            taskInstance.Canceled += OnTaskCanceled;\r\n            var deferral = taskInstance.GetDeferral();\r\n\r\n            var stopwatch = Stopwatch.StartNew();\r\n\r\n            var task = taskInstance.Task;\r\n            var name = task != null ? task.Name : null;\r\n            Log(\"start \" + name);\r\n            if (!_appOpenMutex.WaitOne(0))\r\n            {\r\n                Log(\"cancel\", deferral.Complete);\r\n\r\n                return;\r\n            }\r\n            _appOpenMutex.ReleaseMutex();\r\n            Log(\"release mutex\");\r\n\r\n            var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n            if (!isAuthorized)\r\n            {\r\n                Log(\"cancel isAuthorized=false\", deferral.Complete);\r\n\r\n                return;\r\n            }\r\n            Log(\"isAuthorized=true\");\r\n\r\n\r\n            if (details.Argument.StartsWith(\"action=reply\"))\r\n            {\r\n                SendReply(inputPeer, new TLString(message.ToString()), new TLInt(int.MaxValue));\r\n            }\r\n            else if (details.Argument.StartsWith(\"action=mute\"))\r\n            {\r\n                UpdateNotifySettings(inputPeer, new TLInt(1 * 60 * 60));\r\n            }\r\n            else if (details.Argument.StartsWith(\"action=disable\"))\r\n            {\r\n                UpdateNotifySettings(inputPeer, new TLInt(int.MaxValue));\r\n            }\r\n\r\n            Log(\"stop \" + stopwatch.Elapsed, deferral.Complete);\r\n        }\r\n\r\n        private void UpdateNotifySettings(TLInputPeerBase inputPeer, TLInt muteUntil)\r\n        {\r\n            var deviceInfoService = new DeviceInfoService(GetInitConnection(), true, \"InteractiveNotificationsBackgroundTask\", _id);\r\n            var eventAggregator = new TelegramEventAggregator();\r\n            var cacheService = new InMemoryCacheService(eventAggregator);\r\n            var updatesService = new UpdatesService(cacheService, eventAggregator);\r\n            var transportService = new TransportService();\r\n            var connectionService = new ConnectionService(deviceInfoService);\r\n            var publicConfigService = new MockupPublicConfigService();\r\n\r\n            var manualResetEvent = new ManualResetEvent(false);\r\n            Log(\"before init\");\r\n            var mtProtoService = new MTProtoService(deviceInfoService, updatesService, cacheService, transportService, connectionService, publicConfigService);\r\n            mtProtoService.Initialized += (o, e) =>\r\n            {\r\n                Log(\"init completed\");\r\n\r\n                mtProtoService.GetNotifySettingsAsync(new TLInputNotifyPeer { Peer = inputPeer },\r\n                    result =>\r\n                    {\r\n                        Log(\"getNotifySettings completed\", () =>\r\n                        {\r\n                            var peerNotifySettings = result as TLPeerNotifySettings;\r\n                            if (peerNotifySettings != null)\r\n                            {\r\n                                if (muteUntil.Value < int.MaxValue)\r\n                                {\r\n                                    muteUntil = TLUtils.DateToUniversalTimeTLInt(mtProtoService.ClientTicksDelta, DateTime.Now.AddSeconds(muteUntil.Value));\r\n                                }\r\n\r\n                                var inputPeerNotifySettings = new TLInputPeerNotifySettings78\r\n                                {\r\n                                    Flags = new TLInt(0),\r\n                                    MuteUntil = muteUntil,\r\n                                    Sound = peerNotifySettings.Sound,\r\n                                };\r\n\r\n                                mtProtoService.UpdateNotifySettingsAsync(new TLInputNotifyPeer { Peer = inputPeer },\r\n                                    inputPeerNotifySettings,\r\n                                    result2 =>\r\n                                    {\r\n                                        Log(\"setNotifySettings completed\", () =>\r\n                                        {\r\n                                            manualResetEvent.Set();\r\n                                        });\r\n                                    },\r\n                                    error2 =>\r\n                                    {\r\n                                        Log(string.Format(\"setNotifySettings error={0}\\n{1}\", error2, error2.Exception),\r\n                                            async () =>\r\n                                            {\r\n                                                await Task.Delay(TimeSpan.FromSeconds(1.0));\r\n                                                manualResetEvent.Set();\r\n                                            });\r\n                                    });\r\n                            }\r\n                            else\r\n                            {\r\n                                manualResetEvent.Set();\r\n                            }\r\n                        });\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Log(string.Format(\"getNotifySettings error={0}\\n{1}\", error, error.Exception),\r\n                            async () =>\r\n                            {\r\n                                await Task.Delay(TimeSpan.FromSeconds(1.0));\r\n                                manualResetEvent.Set();\r\n                            });\r\n                    });\r\n            };\r\n            mtProtoService.InitializationFailed += (o, e) =>\r\n            {\r\n                Log(\"init failed\");\r\n\r\n                manualResetEvent.Set();\r\n            };\r\n            mtProtoService.Initialize();\r\n#if DEBUG\r\n            manualResetEvent.WaitOne();\r\n#else\r\n            manualResetEvent.WaitOne(15000);\r\n#endif\r\n        }\r\n\r\n        private void SendReply(TLInputPeerBase inputPeer, TLString message, TLInt msgId)\r\n        {\r\n            if (msgId == null) return;\r\n            if (TLString.IsNullOrEmpty(message)) return;\r\n\r\n            var actionInfo = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLActionInfo>>(_actionInfoSyncRoot, Constants.ActionQueueFileName) ?? new TLVector<TLActionInfo>();\r\n\r\n            var count = actionInfo.Count;\r\n            Log(\"send count=\" + count);\r\n\r\n            var peerChannel = inputPeer as TLInputPeerChannel;\r\n            var readHistory = peerChannel != null\r\n                ? (TLObject)new TLReadChannelHistory { Channel = new TLInputChannel { ChannelId = peerChannel.ChatId, AccessHash = peerChannel.AccessHash }, MaxId = msgId }\r\n                : new TLReadHistory { Peer = inputPeer, MaxId = msgId };\r\n\r\n            var readHistoryActionInfo = new TLActionInfo();\r\n            readHistoryActionInfo.SendBefore = new TLInt(0);\r\n            readHistoryActionInfo.Action = readHistory;\r\n\r\n            actionInfo.Add(readHistoryActionInfo);\r\n\r\n            var sendMessage = new TLSendMessage();\r\n            sendMessage.Flags = new TLInt(0);\r\n            sendMessage.Peer = inputPeer;\r\n            sendMessage.Message = message;\r\n            sendMessage.RandomId = TLLong.Random();\r\n\r\n            var sendMessageActionInfo = new TLActionInfo();\r\n            sendMessageActionInfo.SendBefore = new TLInt(0);\r\n            sendMessageActionInfo.Action = sendMessage;\r\n\r\n            actionInfo.Add(sendMessageActionInfo);\r\n\r\n            TLUtils.SaveObjectToMTProtoFile(new object(), Constants.ActionQueueFileName, actionInfo);\r\n\r\n            if (actionInfo.Count > 0)\r\n            {\r\n                var deviceInfoService = new DeviceInfoService(GetInitConnection(), true, \"InteractiveNotificationsBackgroundTask\", _id);\r\n                var eventAggregator = new TelegramEventAggregator();\r\n                var cacheService = new InMemoryCacheService(eventAggregator);\r\n                var updatesService = new UpdatesService(cacheService, eventAggregator);\r\n                var transportService = new TransportService();\r\n                var connectionService = new ConnectionService(deviceInfoService);\r\n                var publicConfigService = new MockupPublicConfigService();\r\n\r\n                var manualResetEvent = new ManualResetEvent(false);\r\n                Log(\"before init\");\r\n                var requestsToRemove = new List<TLObject>();\r\n                var mtProtoService = new MTProtoService(deviceInfoService, updatesService, cacheService, transportService, connectionService, publicConfigService);\r\n                mtProtoService.Initialized += async (o, e) =>\r\n                {\r\n                    Log(\"init completed\");\r\n\r\n                    var actionsString = new StringBuilder();\r\n                    foreach (var info in actionInfo)\r\n                    {\r\n                        actionsString.AppendLine(info.ToString());\r\n                    }\r\n                    Log(actionsString.ToString());\r\n\r\n                    var sendMessageActions = new List<TLObject>();\r\n                    const int maxActionCount = 10;\r\n                    var currentCount = 0;\r\n                    foreach (var ai in actionInfo)\r\n                    {\r\n                        if (TLUtils.IsValidAction(ai.Action) && currentCount < maxActionCount)\r\n                        {\r\n                            currentCount++;\r\n                            sendMessageActions.Add(ai.Action);\r\n                        }\r\n                    }\r\n\r\n                    if (sendMessageActions.Count > 0)\r\n                    {\r\n                        mtProtoService.SendActionsAsync(sendMessageActions,\r\n                            (request, result) => // will be invoked for each sent action\r\n                            {\r\n                                requestsToRemove.Add(request);\r\n                                var sendingMessages = mtProtoService.SendingMessages;\r\n                                Log(\"send completed count=\" + sendingMessages, () =>\r\n                                {\r\n                                    if (sendingMessages == 0)\r\n                                    {\r\n                                        _clearActionInfoFile = true;\r\n\r\n                                        manualResetEvent.Set();\r\n                                    }\r\n                                });\r\n                            },\r\n                            error =>\r\n                            {\r\n                                Log(string.Format(\"send error={0}\\n{1}\", error, error.Exception),\r\n                                    async () =>\r\n                                    {\r\n                                        await Task.Delay(TimeSpan.FromSeconds(1.0));\r\n                                        manualResetEvent.Set();\r\n                                    });\r\n                            });\r\n                    }\r\n                    else\r\n                    {\r\n                        manualResetEvent.Set();\r\n                    }\r\n                };\r\n                mtProtoService.InitializationFailed += (o, e) =>\r\n                {\r\n                    Log(\"init failed\");\r\n\r\n                    manualResetEvent.Set();\r\n                };\r\n                mtProtoService.Initialize();\r\n#if DEBUG\r\n                manualResetEvent.WaitOne();\r\n#else\r\n                manualResetEvent.WaitOne(15000);\r\n#endif\r\n                if (_clearActionInfoFile)\r\n                {\r\n                    Log(\"clear\");\r\n                    lock (_actionInfoSyncRoot)\r\n                    {\r\n                        var actions = actionInfo;\r\n\r\n                        foreach (var o in requestsToRemove)\r\n                        {\r\n                            MTProtoService.RemoveActionInfoCommon(actions, o);\r\n                        }\r\n\r\n                        TLUtils.SaveObjectToMTProtoFile(_actionInfoSyncRoot, Constants.ActionQueueFileName, actions);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private static TLInt GetMsgId(string argument)\r\n        {\r\n            var parameters = argument.Split(' ');\r\n            foreach (var parameter in parameters)\r\n            {\r\n                if (parameter.StartsWith(\"msg_id\"))\r\n                {\r\n                    int msgId;\r\n                    var split = parameter.Split('=');\r\n                    if (split.Length == 2 && Int32.TryParse(split[1], out msgId))\r\n                    {\r\n                        return new TLInt(msgId);\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static TLInputPeerBase GetInputPeer(string argument)\r\n        {\r\n            var parameters = argument.Split(' ');\r\n            if (parameters.Length >= 2)\r\n            {\r\n                if (parameters[1].StartsWith(\"chat_id\"))\r\n                {\r\n                    int chatId;\r\n                    var split1 = parameters[1].Split('=');\r\n                    if (split1.Length == 2 && Int32.TryParse(split1[1], out chatId))\r\n                    {\r\n                        return new TLInputPeerChat { ChatId = new TLInt(chatId) };\r\n                    }\r\n                }\r\n                else if (parameters[1].StartsWith(\"from_id\"))\r\n                {\r\n                    if (parameters.Length >= 3)\r\n                    {\r\n                        if (parameters[2].StartsWith(\"access_hash\"))\r\n                        {\r\n                            int fromId;\r\n                            long accessHash;\r\n                            var split1 = parameters[1].Split('=');\r\n                            var split2 = parameters[2].Split('=');\r\n                            if (split1.Length == 2 && Int32.TryParse(split1[1], out fromId)\r\n                                && split2.Length == 2 && Int64.TryParse(split2[1], out accessHash))\r\n                            {\r\n                                return new TLInputPeerUser { UserId = new TLInt(fromId), AccessHash = new TLLong(accessHash) };\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else if (parameters[1].StartsWith(\"channel_id\"))\r\n                {\r\n                    if (parameters.Length >= 3)\r\n                    {\r\n                        if (parameters[2].StartsWith(\"access_hash\"))\r\n                        {\r\n                            int chatId;\r\n                            long accessHash;\r\n                            var split1 = parameters[1].Split('=');\r\n                            var split2 = parameters[2].Split('=');\r\n                            if (split1.Length == 2 && Int32.TryParse(split1[1], out chatId)\r\n                                && split2.Length == 2 && Int64.TryParse(split2[1], out accessHash))\r\n                            {\r\n                                return new TLInputPeerChannel { ChatId = new TLInt(chatId), AccessHash = new TLLong(accessHash) };\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private void OnTaskCanceled(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason)\r\n        {\r\n            Log(string.Format(\"cancel reason={0}\", reason));\r\n        }\r\n\r\n        private bool _clearActionInfoFile;\r\n    }\r\n\r\n    [Guid(2487554906, 14579, 17142, 150, 170, 121, 85, 176, 240, 61, 162)]\r\n    public interface IToastNotificationActionTriggerDetail\r\n    {\r\n        string Argument { get; }\r\n\r\n        ValueSet UserInput { get; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.Tasks/MessageSchedulerBackgroundTask.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing Windows.ApplicationModel.Background;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Connection;\r\nusing Telegram.Api.Services.DeviceInfo;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.Transport;\r\n\r\nnamespace TelegramClient.Tasks\r\n{\r\n    public sealed class MessageSchedulerBackgroundTask : IBackgroundTask\r\n    {\r\n        private readonly Mutex _appOpenMutex = new Mutex(false, Constants.TelegramMessengerMutexName);\r\n        \r\n        private bool _logEnabled = true;\r\n\r\n        private void Log(string message, Action callback = null)\r\n        {\r\n            if (!_logEnabled) return;\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"::MessageSchedulerBackgroundTask {0} {1}\", _id, message), callback.SafeInvoke);\r\n#if DEBUG\r\n            //PushUtils.AddToast(\"scheduler\", message, string.Empty, string.Empty, null, null);\r\n#endif\r\n        }\r\n\r\n        private static readonly int _id = new Random().Next(999);\r\n\r\n        private readonly object _initConnectionSyncRoot = new object();\r\n\r\n        private TLInitConnection GetInitConnection()\r\n        {\r\n            return TLUtils.OpenObjectFromMTProtoFile<TLInitConnection>(_initConnectionSyncRoot, Constants.InitConnectionFileName) ??\r\n                new TLInitConnection\r\n                {\r\n                    DeviceModel = new TLString(\"unknown\"),\r\n                    AppVersion = new TLString(\"background task\"),\r\n                    SystemVersion = new TLString(\"8.10.0.0\")\r\n                };\r\n        }\r\n\r\n        private readonly object _actionInfoSyncRoot = new object();\r\n\r\n        public async void Run(IBackgroundTaskInstance taskInstance)\r\n        {\r\n            try\r\n            {\r\n\r\n\r\n                Telegram.Logs.Log.WriteSync = true;\r\n\r\n                taskInstance.Canceled += OnTaskCanceled;\r\n                var deferral = taskInstance.GetDeferral();\r\n\r\n                var stopwatch = Stopwatch.StartNew();\r\n                var task = taskInstance.Task;\r\n                var name = task != null ? task.Name : null;\r\n                Log(\"start \" + name);\r\n                if (!_appOpenMutex.WaitOne(0))\r\n                {\r\n                    Log(\"cancel\", deferral.Complete);\r\n\r\n                    return;\r\n                }\r\n                _appOpenMutex.ReleaseMutex();\r\n                Log(\"release mutex\");\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (!isAuthorized)\r\n                {\r\n                    Log(\"cancel isAuthorized=false\", deferral.Complete);\r\n\r\n                    return;\r\n                }\r\n                Log(\"isAuthorized=true\");\r\n\r\n                var actionInfo = TLUtils.OpenObjectFromMTProtoFile<TLVector<TLActionInfo>>(_actionInfoSyncRoot, Constants.ActionQueueFileName) ?? new TLVector<TLActionInfo>();\r\n                var count = actionInfo.Count;\r\n                Log(\"send count=\" + count);\r\n\r\n                if (count > 0)\r\n                {\r\n                    var deviceInfoService = new DeviceInfoService(GetInitConnection(), true, \"MessageSchedulerBackgroundTask\", _id);\r\n\r\n                    var publicConfigService = new MockupPublicConfigService();\r\n                    var eventAggregator = new TelegramEventAggregator();\r\n                    var cacheService = new InMemoryCacheService(eventAggregator);\r\n                    var updatesService = new UpdatesService(cacheService, eventAggregator);\r\n                    var transportService = new TransportService();\r\n                    var connectionService = new ConnectionService(deviceInfoService);\r\n\r\n                    var manualResetEvent = new ManualResetEvent(false);\r\n                    Log(\"before init\");\r\n                    var requestsToRemove = new List<TLObject>();\r\n                    var mtProtoService = new MTProtoService(deviceInfoService, updatesService, cacheService, transportService, connectionService, publicConfigService);\r\n                    mtProtoService.Initialized += async (o, e) =>\r\n                    {\r\n                        Log(\"init completed\");\r\n\r\n                        var actionsString = new StringBuilder();\r\n                        foreach (var info in actionInfo)\r\n                        {\r\n                            actionsString.AppendLine(info.ToString());\r\n                        }\r\n                        Log(actionsString.ToString());\r\n\r\n                        var sendMessageActions = new List<TLObject>();\r\n                        const int maxActionCount = 10;\r\n                        var currentCount = 0;\r\n                        foreach (var ai in actionInfo)\r\n                        {\r\n                            if (TLUtils.IsValidAction(ai.Action) && currentCount < maxActionCount)\r\n                            {\r\n                                currentCount++;\r\n                                sendMessageActions.Add(ai.Action);\r\n                            }\r\n                        }\r\n\r\n                        if (sendMessageActions.Count > 0)\r\n                        {\r\n                            await Task.Delay(TimeSpan.FromSeconds(3.0));\r\n\r\n                            mtProtoService.SendActionsAsync(sendMessageActions,\r\n                                (request, result) => // will be invoked for each sent action\r\n                                {\r\n                                    requestsToRemove.Add(request);\r\n                                    var sendingMessages = mtProtoService.SendingMessages;\r\n                                    Log(\"send completed count=\" + sendingMessages, () =>\r\n                                    {\r\n                                        if (sendingMessages == 0)\r\n                                        {\r\n                                            _clearActionInfoFile = true;\r\n\r\n                                            manualResetEvent.Set();\r\n                                        }\r\n                                    });\r\n                                },\r\n                                error =>\r\n                                {\r\n                                    Log(string.Format(\"send error={0}\\n{1}\", error, error.Exception),\r\n                                        async () =>\r\n                                        {\r\n                                            await Task.Delay(TimeSpan.FromSeconds(1.0));\r\n                                            manualResetEvent.Set();\r\n                                        });\r\n                                });\r\n                        }\r\n                        else\r\n                        {\r\n                            manualResetEvent.Set();\r\n                        }\r\n                    };\r\n                    mtProtoService.InitializationFailed += (o, e) =>\r\n                    {\r\n                        Log(\"init failed\");\r\n\r\n                        manualResetEvent.Set();\r\n                    };\r\n                    mtProtoService.Initialize();\r\n#if DEBUG\r\n                    manualResetEvent.WaitOne();\r\n#else\r\n                manualResetEvent.WaitOne(15000);\r\n#endif\r\n                    if (_clearActionInfoFile)\r\n                    {\r\n                        Log(\"clear\");\r\n                        lock (_actionInfoSyncRoot)\r\n                        {\r\n                            var actions = actionInfo;\r\n\r\n                            foreach (var o in requestsToRemove)\r\n                            {\r\n                                MTProtoService.RemoveActionInfoCommon(actions, o);\r\n                            }\r\n\r\n                            TLUtils.SaveObjectToMTProtoFile(_actionInfoSyncRoot, Constants.ActionQueueFileName, actions);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                Log(\"stop \" + stopwatch.Elapsed, deferral.Complete);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                \r\n            }\r\n        }\r\n\r\n        private void OnTaskCanceled(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason)\r\n        {\r\n            Log(string.Format(\"cancel reason={0}\", reason));\r\n        }\r\n\r\n        private bool _clearActionInfoFile;\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.Tasks/Properties/AssemblyInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"TelegramClient.Tasks\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"TelegramClient.Tasks\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2015\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: ComVisible(false)]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en\")]\r\n"
  },
  {
    "path": "TelegramClient.Tasks/PushNotificationsBackgroundTask.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing Windows.ApplicationModel.Background;\r\nusing Windows.ApplicationModel.Resources;\r\n#if WNS_PUSH_SERVICE\r\nusing Windows.Networking.PushNotifications;\r\n#endif\r\nusing Windows.UI.Xaml;\r\nusing Telegram.Api;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Tasks\r\n{\r\n    public sealed class PushNotificationsBackgroundTask : IBackgroundTask\r\n    {\r\n        private readonly Mutex _appOpenMutex = new Mutex(false, Constants.TelegramMessengerMutexName);\r\n\r\n        private static bool _logEnabled = true;\r\n\r\n        private static readonly int _id = new Random().Next(999);\r\n\r\n        private static void Log(string message, Action callback = null)\r\n        {\r\n            if (!_logEnabled) return;\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"::PushNotificationsBackgroundTask {0} {1}\", _id, message), callback.SafeInvoke);\r\n#if DEBUG\r\n            //PushUtils.AddToast(\"push\", message, string.Empty, string.Empty, null, null);\r\n#endif\r\n        }\r\n\r\n        public void Run(IBackgroundTaskInstance taskInstance)\r\n        {\r\n#if WNS_PUSH_SERVICE\r\n            Telegram.Logs.Log.WriteSync = true;\r\n\r\n            var stopwatch = Stopwatch.StartNew();\r\n\r\n            var rawNotification = taskInstance.TriggerDetails as RawNotification;\r\n            var payload = rawNotification != null ? rawNotification.Content : null;\r\n            var rootObject = payload != null ? PushUtils.GetRootObject(payload) : null;\r\n            var data = rootObject != null ? rootObject.data : null;\r\n            var locKey = data != null ? data.loc_key : null;\r\n\r\n            Log(string.Format(\"start locKey={0}\", locKey));\r\n            if (!_appOpenMutex.WaitOne(0))\r\n            {\r\n                Log(\"cancel\");\r\n\r\n                return;\r\n            }\r\n            _appOpenMutex.ReleaseMutex();\r\n\r\n            var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n            if (!isAuthorized)\r\n            {\r\n                Log(string.Format(\"cancel isAuthorized=false\\npayload={0}\", payload));\r\n                return;\r\n            }\r\n\r\n            try\r\n            {\r\n                var initConnection = GetInitConnection();\r\n                if (initConnection != null)\r\n                {\r\n                    SystemVersion = initConnection.SystemVersion != null\r\n                        ? initConnection.SystemVersion.ToString()\r\n                        : string.Empty;\r\n                    Log(string.Format(initConnection.ToString()));\r\n                }\r\n                else\r\n                {\r\n                    Log(string.Format(\"empty init_connection\"));\r\n                }\r\n                //string[] supportedLanguages = { \"de\", \"en\", \"es\", \"it\", \"nl\", \"pt\" };\r\n                //var language = initConnection != null ? initConnection.LangCode.ToString() : \"en\";\r\n                //language = supportedLanguages.Contains(language) ? language : \"en\"; \r\n                Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = \"\";               \r\n\r\n                PushUtils.UpdateToastAndTiles(taskInstance.TriggerDetails as RawNotification);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Log(string.Format(\"ex={0}\\npayload={1}\", ex, payload));\r\n            }\r\n\r\n            Log(string.Format(\"stop elapsed={0}\", stopwatch.Elapsed));\r\n#endif\r\n        }\r\n\r\n        public static string SystemVersion { get; set; }\r\n\r\n        private readonly object _initConnectionSyncRoot = new object();\r\n\r\n        private TLInitConnection GetInitConnection()\r\n        {\r\n            return TLUtils.OpenObjectFromMTProtoFile<TLInitConnection>(_initConnectionSyncRoot, Constants.InitConnectionFileName);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.Tasks/PushUtils.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define INTERACTIVE_NOTIFICATIONS\r\n//#endif\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Runtime.InteropServices;\r\nusing System.Runtime.Serialization.Json;\r\nusing System.Text;\r\nusing System.Text.RegularExpressions;\r\nusing System.Threading.Tasks;\r\nusing System.Xml;\r\nusing System.Xml.Linq;\r\nusing Windows.ApplicationModel.Resources;\r\nusing Windows.ApplicationModel.Resources.Core;\r\nusing Windows.Data.Xml.Dom;\r\nusing Windows.Storage;\r\nusing Windows.Storage.Search;\r\n#if WNS_PUSH_SERVICE\r\nusing Windows.Networking.PushNotifications;\r\nusing Windows.UI.Notifications;\r\n#endif\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Tasks\r\n{\r\n    public static class PushUtils\r\n    {\r\n#if WNS_PUSH_SERVICE\r\n        public static void UpdateToastAndTiles(RawNotification rawNotification)\r\n        {\r\n            var payload = rawNotification != null ? rawNotification.Content : null;\r\n            if (payload == null) return;\r\n\r\n            var rootObject = GetRootObject(payload);\r\n            if (rootObject == null) return;\r\n            if (rootObject.data == null) return;\r\n\r\n            if (rootObject.data.loc_key == null)\r\n            {\r\n                var groupname = GetGroup(rootObject.data);\r\n                RemoveToastGroup(groupname);\r\n                return;\r\n            }\r\n\r\n            var caption = GetCaption(rootObject.data);\r\n            var message = GetMessage(rootObject.data);\r\n            var sound = GetSound(rootObject.data);\r\n            var launch = GetLaunch(rootObject.data);\r\n            var tag = GetTag(rootObject.data);\r\n            var group = GetGroup(rootObject.data);\r\n\r\n            if (!IsMuted(rootObject.data) && !Notifications.IsDisabled)\r\n            {\r\n                AddToast(rootObject, caption, message, sound, launch, tag, group);\r\n            }\r\n            if (!IsServiceNotification(rootObject.data))\r\n            {\r\n                UpdateTile(caption, message);\r\n            }\r\n            UpdateBadge(rootObject.data.badge);\r\n        }\r\n#endif\r\n\r\n        private static bool IsMuted(Data data)\r\n        {\r\n            return data.mute == \"1\";\r\n        }\r\n\r\n        private static bool IsServiceNotification(Data data)\r\n        {\r\n            return data.loc_key == \"DC_UPDATE\";\r\n        }\r\n\r\n        public static RootObject GetRootObject(string payload)\r\n        {\r\n            var serializer = new DataContractJsonSerializer(typeof(RootObject));\r\n            RootObject rootObject;\r\n            using (var stream = new MemoryStream(Encoding.Unicode.GetBytes(payload)))\r\n            {\r\n                rootObject = serializer.ReadObject(stream) as RootObject;\r\n            }\r\n\r\n            return rootObject;\r\n        }\r\n\r\n        private static string GetCaption(Data data)\r\n        {\r\n            var locKey = data.loc_key;\r\n            if (locKey == null)\r\n            {\r\n                return \"locKey=null\";\r\n            }\r\n\r\n            if (locKey.StartsWith(\"CHAT\") || locKey.StartsWith(\"GEOCHAT\"))\r\n            {\r\n                return data.loc_args[1];\r\n            }\r\n\r\n            if (locKey.StartsWith(\"MESSAGE\"))\r\n            {\r\n                return data.loc_args[0];\r\n            }\r\n\r\n            if (locKey.StartsWith(\"CHANNEL\"))\r\n            {\r\n                return data.loc_args[0];\r\n            }\r\n            \r\n            if (locKey.StartsWith(\"PINNED\"))\r\n            {\r\n                return data.loc_args[0];\r\n            }\r\n\r\n            if (locKey.StartsWith(\"AUTH\")\r\n                || locKey.StartsWith(\"CONTACT\")\r\n                || locKey.StartsWith(\"ENCRYPTED\")\r\n                || locKey.StartsWith(\"ENCRYPTION\")\r\n                || locKey.StartsWith(\"PHONE\"))\r\n            {\r\n                return \"Telegram\";\r\n            }\r\n\r\n#if DEBUG\r\n            return locKey;\r\n#else\r\n            return \"Telegram\";\r\n#endif\r\n        }\r\n\r\n        private static string GetSound(Data data)\r\n        {\r\n            return data.sound;\r\n        }\r\n\r\n        private static string GetGroup(Data data)\r\n        {\r\n            return data.group;\r\n        }\r\n\r\n        private static string GetTag(Data data)\r\n        {\r\n            return data.tag;\r\n        }\r\n\r\n        private static string GetLaunch(Data data)\r\n        {\r\n            var locKey = data.loc_key;\r\n            if (locKey == null) return null;\r\n\r\n            var path = \"/Views/ShellView.xaml\";\r\n            if (locKey == \"DC_UPDATE\")\r\n            { \r\n                path = \"/Views/Additional/SettingsView.xaml\";\r\n            }\r\n\r\n            var customParams = new List<string> {\"Action=\" + locKey};\r\n            if (data.custom != null)\r\n            {\r\n                customParams.AddRange(data.custom.GetParams());\r\n            }\r\n\r\n            return string.Format(\"{0}?{1}\", path, string.Join(\"&\", customParams));\r\n        }\r\n\r\n        private static string GetMessage(Data data)\r\n        {\r\n            var locKey = data.loc_key;\r\n            if (locKey == null)\r\n            {\r\n                Telegram.Logs.Log.Write(\"::PushNotificationsBackgroundTask locKey=null text=\" + data.text);\r\n                return string.Empty;\r\n            }\r\n\r\n            string locValue;\r\n            var resourceLoader = ResourceLoader.GetForViewIndependentUse(\"TelegramClient.Tasks/Resources\");\r\n\r\n            locValue = resourceLoader.GetString(locKey);\r\n            if (locValue != \"\")\r\n            {\r\n                return string.Format(locValue, data.loc_args).Replace(\"\\r\\n\", \"\\n\").Replace(\"\\n\", \" \");\r\n            }\r\n            var builder = new StringBuilder();\r\n            if (data.loc_args != null)\r\n            {\r\n                builder.AppendLine(\"loc_args\");\r\n                foreach (var locArg in data.loc_args)\r\n                {\r\n                    builder.AppendLine(locArg);\r\n                }\r\n            }\r\n            Telegram.Logs.Log.Write(string.Format(\"::PushNotificationsBackgroundTask missing locKey={0} locArgs={1}\", locKey, builder.ToString()));\r\n\r\n            //if (locKey.StartsWith(\"CHAT\") || locKey.StartsWith(\"GEOCHAT\"))\r\n            //{\r\n            //    return data.text;\r\n            //}\r\n\r\n            //if (locKey.StartsWith(\"MESSAGE\"))\r\n            //{\r\n            //    if (locKey == \"MESSAGE_TEXT\")\r\n            //    {\r\n            //        return data.loc_args[1];\r\n            //    }\r\n\r\n            //    return data.text; //add localization string here \r\n            //}\r\n\r\n#if DEBUG\r\n            return data.text;\r\n#else\r\n            return string.Empty;\r\n#endif\r\n        }\r\n\r\n        private static void UpdateBadge(int badgeNumber)\r\n        {\r\n#if WNS_PUSH_SERVICE\r\n            var badgeUpdater = BadgeUpdateManager.CreateBadgeUpdaterForApplication();\r\n            if (badgeNumber == 0)\r\n            {\r\n                badgeUpdater.Clear();\r\n                return;\r\n            }\r\n\r\n            var badgeXml = BadgeUpdateManager.GetTemplateContent(BadgeTemplateType.BadgeNumber);\r\n\r\n            var badgeElement = (XmlElement)badgeXml.SelectSingleNode(\"/badge\");\r\n            badgeElement.SetAttribute(\"value\", badgeNumber.ToString());\r\n\r\n            try\r\n            {\r\n                badgeUpdater.Update(new BadgeNotification(badgeXml));\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(ex.ToString());\r\n            }\r\n#endif\r\n        }\r\n\r\n        private static async Task<bool> IsFileExists(string fileName)\r\n        {\r\n            bool fileExists = true;\r\n            Stream fileStream = null;\r\n            StorageFile file = null;\r\n\r\n            try\r\n            {\r\n                file = await ApplicationData.Current.LocalFolder.GetFileAsync(fileName);\r\n                fileStream = await file.OpenStreamForReadAsync();\r\n                fileStream.Dispose();\r\n            }\r\n            catch (FileNotFoundException)\r\n            {\r\n                // If the file dosn't exits it throws an exception, make fileExists false in this case \r\n                fileExists = false;\r\n            }\r\n            finally\r\n            {\r\n                if (fileStream != null)\r\n                {\r\n                    fileStream.Dispose();\r\n                }\r\n            }\r\n\r\n            return fileExists;\r\n        }\r\n\r\n        public static void AddToast(RootObject rootObject, string caption, string message, string sound, string launch, string tag, string group)\r\n        {\r\n#if WNS_PUSH_SERVICE\r\n#if INTERACTIVE_NOTIFICATIONS\r\n\r\n            var toastNotifier = ToastNotificationManager.CreateToastNotifier();\r\n            Version version = null;\r\n            if (rootObject.data.system != null && rootObject.data.system != null)\r\n            {\r\n                Version.TryParse(rootObject.data.system, out version);\r\n            }\r\n            var toastXml = new XmlDocument();\r\n            if (version != null && version.Major >= 10)\r\n            {\r\n                string arguments;\r\n                string imageSource;\r\n                GetArgumentsAndImageSource(rootObject, out arguments, out imageSource);\r\n\r\n                var xml =\r\n                    \"<toast>\" +\r\n                    \"<visual>\" +\r\n                    \"<binding template=\\\"ToastImageAndText02\\\">\" +\r\n                    \"<text id=\\\"1\\\"></text>\" +\r\n                    \"<text id=\\\"2\\\"></text>\" +\r\n                    \"<image id=\\\"1\\\" placement=\\\"appLogoOverride\\\" src=\\\"\\\" hint-crop=\\\"circle\\\" />\" +\r\n                    \"</binding>\" +\r\n                    \"</visual>\" +\r\n                    \"</toast>\";\r\n                    //\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\"\r\n                    //+ \"<wp:Notification xmlns:wp=\\\"WPNotification\\\">\"\r\n                    //+    \"<wp:Toast>\"\r\n                    //+        \"<wp:Text1>Text1</wp:Text1>\"\r\n                    //+        \"<wp:Text2>Text2</wp:Text2>\"\r\n                    //+        \"<wp:Param>/Page1.xaml</wp:Param>\"\r\n                    //+    \"</wp:Toast>\"\r\n                    //+ \"</wp:Notification>\";\r\n\r\n                toastXml.LoadXml(xml);\r\n                SetToastImage(toastXml, imageSource, arguments != null && arguments.StartsWith(\"from_id\"));\r\n                SetActions(toastXml, arguments);\r\n            }\r\n            else\r\n            {\r\n                toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);\r\n            }\r\n\r\n            SetText(toastXml, caption, message);\r\n            SetLaunch(toastXml, launch);\r\n\r\n            if (!string.IsNullOrEmpty(sound) \r\n                && !string.Equals(sound, \"default\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                SetSound(toastXml, sound);\r\n            }\r\n\r\n            try\r\n            {\r\n                var toast = new ToastNotification(toastXml);\r\n                if (tag != null) toast.Tag = tag;\r\n                if (group != null) toast.Group = group;\r\n                //RemoveToastGroup(group);\r\n                toastNotifier.Show(toast);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(ex.ToString());\r\n            }\r\n#else\r\n            var toastNotifier = ToastNotificationManager.CreateToastNotifier();\r\n\r\n            var toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);\r\n            SetText(toastXml, caption, message);\r\n            SetLaunch(toastXml, launch);\r\n\r\n            if (!string.IsNullOrEmpty(sound)\r\n                && !string.Equals(sound, \"default\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                SetSound(toastXml, sound);\r\n            }\r\n\r\n            try\r\n            {\r\n                var toast = new ToastNotification(toastXml);\r\n                if (tag != null) toast.Tag = tag;\r\n                if (group != null) toast.Group = group;\r\n                //RemoveToastGroup(group);\r\n                toastNotifier.Show(toast);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(ex.ToString());\r\n            }\r\n#endif\r\n#endif\r\n        }\r\n\r\n        private static void GetArgumentsAndImageSource(RootObject rootObject, out string arguments, out string imageSource)\r\n        {\r\n            arguments = null;\r\n            imageSource = null;\r\n\r\n            if (rootObject != null)\r\n            {\r\n                var data = rootObject.data;\r\n                if (data != null)\r\n                {\r\n                    var custom = data.custom;\r\n                    if (custom != null)\r\n                    {\r\n                        if (custom.from_id != null)\r\n                        {\r\n                            int fromId;\r\n                            if (Int32.TryParse(custom.from_id, out fromId))\r\n                            {\r\n                                arguments = GetArguments(\"from_id\", custom.from_id, true, custom);\r\n                            }\r\n                        }\r\n                        else if (custom.chat_id != null)\r\n                        {\r\n                            int chatId;\r\n                            if (Int32.TryParse(custom.chat_id, out chatId))\r\n                            {\r\n                                arguments = GetArguments(\"chat_id\", custom.chat_id, false, custom);\r\n                            }\r\n                        }\r\n                        else if (custom.channel_id != null)\r\n                        {\r\n                            int channelId;\r\n                            if (Int32.TryParse(custom.channel_id, out channelId))\r\n                            {\r\n                                if (data.loc_key != null \r\n                                    && data.loc_key.StartsWith(\"CHAT\"))\r\n                                {\r\n                                    arguments = GetArguments(\"channel_id\", custom.channel_id, true, custom);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        imageSource = GetImageSource(custom);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private static string GetImageSource(Custom custom)\r\n        {\r\n            string imageSource = null;\r\n            if (custom.mtpeer != null)\r\n            {\r\n                var location = custom.mtpeer.ph;\r\n                if (location != null)\r\n                {\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        location.volume_id,\r\n                        location.local_id,\r\n                        location.secret);\r\n\r\n                    if (IsFileExists(fileName).Result)\r\n                    {\r\n                        imageSource = fileName;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return imageSource;\r\n        }\r\n\r\n        private static string GetArguments(string peer, string peerId, bool needAccessHash, Custom custom)\r\n        {\r\n            string arguments = null;\r\n\r\n            if (custom.mtpeer != null && custom.mtpeer.ah != null || !needAccessHash)\r\n            {\r\n                arguments = string.Format(\"{0}={1}\", peer, peerId);\r\n                \r\n                if (custom.mtpeer != null && custom.mtpeer.ah != null)\r\n                {\r\n                    arguments += string.Format(\" access_hash={0}\", custom.mtpeer.ah);\r\n                }\r\n\r\n                if (custom.msg_id != null)\r\n                {\r\n                    arguments += string.Format(\" msg_id={0}\", custom.msg_id);\r\n                }\r\n            }\r\n\r\n            return arguments;\r\n        }\r\n\r\n        private static void RemoveToastGroup(string groupname)\r\n        {\r\n#if WNS_PUSH_SERVICE\r\n            ToastNotificationManager.History.RemoveGroup(groupname);\r\n#endif\r\n        }\r\n\r\n        private static void UpdateTile(string caption, string message)\r\n        {\r\n#if WNS_PUSH_SERVICE\r\n            var tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication();\r\n            //tileUpdater.EnableNotificationQueue(false);\r\n            tileUpdater.EnableNotificationQueue(true);\r\n            tileUpdater.EnableNotificationQueueForSquare150x150(false);\r\n            //tileUpdater.EnableNotificationQueueForWide310x150(true);\r\n\r\n            var wideTileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWide310x150IconWithBadgeAndText);\r\n            SetImage(wideTileXml, \"IconicSmall110.png\");\r\n            SetText(wideTileXml, caption, message);\r\n\r\n            var squareTile150Xml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare150x150IconWithBadge);\r\n            SetImage(squareTile150Xml, \"IconicTileMedium202.png\");\r\n            AppendTile(wideTileXml, squareTile150Xml);\r\n\r\n            var squareTile71Xml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare71x71IconWithBadge);\r\n            SetImage(squareTile71Xml, \"IconicSmall110.png\");\r\n            AppendTile(wideTileXml, squareTile71Xml);\r\n\r\n            try\r\n            {\r\n                tileUpdater.Update(new TileNotification(wideTileXml));\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(ex.ToString());\r\n            }\r\n#endif\r\n        }\r\n\r\n        private static void AppendTile(XmlDocument toTile, XmlDocument fromTile)\r\n        {\r\n            var fromTileNode = toTile.ImportNode(fromTile.GetElementsByTagName(\"binding\").Item(0), true);\r\n            toTile.GetElementsByTagName(\"visual\")[0].AppendChild(fromTileNode);\r\n        }\r\n\r\n        private static void SetText(XmlDocument document, string caption, string message)\r\n        {\r\n            var toastTextElements = document.GetElementsByTagName(\"text\");\r\n            toastTextElements[0].InnerText = caption ?? string.Empty;\r\n            toastTextElements[1].InnerText = message ?? string.Empty;\r\n        }\r\n\r\n        private static void SetActions(XmlDocument document, string arguments)\r\n        {\r\n            if (arguments == null) return;\r\n\r\n            var resourceLoader = ResourceLoader.GetForViewIndependentUse(\"TelegramClient.Tasks/Resources\");\r\n\r\n            //\"<actions>\" +\r\n            //\"<input id=\\\"message\\\" type=\\\"text\\\" placeHolderContent=\\\"Type a reply\\\" />\" +\r\n            //\"<action activationType=\\\"background\\\" content=\\\"Reply\\\" arguments=\\\"{0}\\\" hint-inputId=\\\"message\\\" imageUri=\\\"Assets/Icons/send.png\\\"/>\" +\r\n            //\"</actions>\"\r\n\r\n            var toastNode = document.SelectSingleNode(\"/toast\");\r\n            var actionsElement = document.CreateElement(\"actions\");\r\n\r\n            var inputElement = document.CreateElement(\"input\");\r\n            inputElement.SetAttribute(\"id\", \"message\");\r\n            inputElement.SetAttribute(\"type\", \"text\");\r\n            inputElement.SetAttribute(\"placeHolderContent\", resourceLoader.GetString(\"TypeReply\"));\r\n            actionsElement.AppendChild(inputElement);\r\n\r\n            var replyAction = document.CreateElement(\"action\");\r\n            replyAction.SetAttribute(\"activationType\", \"background\");\r\n            replyAction.SetAttribute(\"content\", resourceLoader.GetString(\"Reply\"));\r\n            replyAction.SetAttribute(\"arguments\", \"action=reply \" + arguments);\r\n            replyAction.SetAttribute(\"hint-inputId\", \"message\");\r\n            replyAction.SetAttribute(\"imageUri\", \"Images/W10M/ic_send_2x.png\");\r\n            actionsElement.AppendChild(replyAction);\r\n\r\n            var muteAction = document.CreateElement(\"action\");\r\n            muteAction.SetAttribute(\"activationType\", \"background\");\r\n            muteAction.SetAttribute(\"content\", resourceLoader.GetString(\"Mute1Hour\"));\r\n            muteAction.SetAttribute(\"arguments\", \"action=mute \" + arguments);\r\n            actionsElement.AppendChild(muteAction);\r\n\r\n            var disableAction = document.CreateElement(\"action\");\r\n            disableAction.SetAttribute(\"activationType\", \"background\");\r\n            disableAction.SetAttribute(\"content\", resourceLoader.GetString(\"Disable\"));\r\n            disableAction.SetAttribute(\"arguments\", \"action=disable \" + arguments);\r\n            actionsElement.AppendChild(disableAction);\r\n\r\n            toastNode.AppendChild(actionsElement);\r\n        }\r\n\r\n        private static void SetToastImage(XmlDocument document, string imageSource, bool isUserPlaceholder)\r\n        {\r\n            var imageElements = document.GetElementsByTagName(\"image\");\r\n            if (imageSource == null)\r\n            {\r\n                ((XmlElement)imageElements[0]).SetAttribute(\"src\", isUserPlaceholder ? \"ms-appx:///Images/W10M/user_placeholder.png\" : \"ms-appx:///Images/W10M/group_placeholder.png\");\r\n            }\r\n            else\r\n            {\r\n                ((XmlElement)imageElements[0]).SetAttribute(\"src\", \"ms-appdata:///local/\" + imageSource);\r\n            }\r\n        }\r\n\r\n        private static void SetImage(XmlDocument document, string imageSource)\r\n        {\r\n            var imageElements = document.GetElementsByTagName(\"image\");\r\n            ((XmlElement)imageElements[0]).SetAttribute(\"src\", imageSource);\r\n        }\r\n\r\n        private static void SetSound(XmlDocument document, string soundSource)\r\n        {\r\n            //return;\r\n\r\n            if (!Regex.IsMatch(soundSource, @\"^sound[1-6]$\", RegexOptions.IgnoreCase))\r\n            {\r\n                return;\r\n            }\r\n\r\n            var toastNode = document.SelectSingleNode(\"/toast\");\r\n            ((XmlElement)toastNode).SetAttribute(\"duration\", \"long\");\r\n            var audioElement = document.CreateElement(\"audio\");\r\n            audioElement.SetAttribute(\"src\", \"ms-appx:///Sounds/\" + soundSource + \".wav\");\r\n            audioElement.SetAttribute(\"loop\", \"false\");\r\n\r\n            toastNode.AppendChild(audioElement);\r\n        }\r\n\r\n        private static void SetLaunch(XmlDocument document, string launch)\r\n        {\r\n            if (string.IsNullOrEmpty(launch))\r\n            {\r\n                return;\r\n            }\r\n            if (PushNotificationsBackgroundTask.SystemVersion != null\r\n                && PushNotificationsBackgroundTask.SystemVersion.StartsWith(\"10\")) //10.0.10572.0 or less\r\n            {\r\n                try\r\n                {\r\n                    var currentVersion = new Version(PushNotificationsBackgroundTask.SystemVersion);\r\n                    var minVersion = new Version(\"10.0.10572.0\");\r\n                    if (currentVersion < minVersion)\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Telegram.Logs.Log.Write(ex.ToString());\r\n                }\r\n            }\r\n            //launch = \"/Views/ShellView.xaml\";\r\n            var toastNode = document.SelectSingleNode(\"/toast\");\r\n            ((XmlElement)toastNode).SetAttribute(\"launch\", launch);\r\n        }\r\n\r\n        //private static readonly Dictionary<string, string> _locKeys = new Dictionary<string, string>\r\n        //{\r\n        //    {\"MESSAGE_FWDS\", \"forwarded you {1} messages\"},\r\n        //    {\"MESSAGE_TEXT\", \"{1}\"},\r\n        //    {\"MESSAGE_NOTEXT\", \"sent you a message\"},\r\n        //    {\"MESSAGE_PHOTO\", \"sent you a photo\"},\r\n        //    {\"MESSAGE_VIDEO\", \"sent you a video\"},\r\n        //    {\"MESSAGE_DOC\", \"sent you a document\"},\r\n        //    {\"MESSAGE_GIF\", \"sent you a GIF\"},\r\n        //    {\"MESSAGE_AUDIO\", \"sent you a voice message\"},\r\n        //    {\"MESSAGE_CONTACT\", \"shared a contact with you\"},\r\n        //    {\"MESSAGE_GEO\", \"sent you a map\"},\r\n        //    {\"MESSAGE_STICKER\", \"sent you a sticker\"},\r\n\r\n        //    {\"CHAT_MESSAGE_FWDS\", \"{0} forwarded {2} messages to the group\"},\r\n        //    {\"CHAT_MESSAGE_TEXT\", \"{0}: {2}\"},\r\n        //    {\"CHAT_MESSAGE_NOTEXT\", \"{0} sent a message to the group\"},\r\n        //    {\"CHAT_MESSAGE_PHOTO\", \"{0} sent a photo to the group\"},\r\n        //    {\"CHAT_MESSAGE_VIDEO\", \"{0} sent a video to the group\"},\r\n        //    {\"CHAT_MESSAGE_DOC\", \"{0} sent a document to the group\"},\r\n        //    {\"CHAT_MESSAGE_GIF\", \"{0} sent a GIF to the group\"},\r\n        //    {\"CHAT_MESSAGE_AUDIO\", \"{0} sent a voice message to the group\"},\r\n        //    {\"CHAT_MESSAGE_CONTACT\", \"{0} shared a contact in the group\"},\r\n        //    {\"CHAT_MESSAGE_GEO\", \"{0} sent a map to the group\"},\r\n        //    {\"CHAT_MESSAGE_STICKER\", \"{0} sent a sticker to the group\"},\r\n            \r\n        //    {\"CHANNEL_MESSAGE_FWDS\", \"posted {1} forwarded messages\"},\r\n        //    {\"CHANNEL_MESSAGE_TEXT\", \"{1}\"},\r\n        //    {\"CHANNEL_MESSAGE_NOTEXT\", \"posted a message\"},\r\n        //    {\"CHANNEL_MESSAGE_PHOTO\", \"posted a photo\"},\r\n        //    {\"CHANNEL_MESSAGE_VIDEO\", \"posted a video\"},\r\n        //    {\"CHANNEL_MESSAGE_DOC\", \"posted a document\"},\r\n        //    {\"CHANNEL_MESSAGE_GIF\", \"posted a GIF\"},\r\n        //    {\"CHANNEL_MESSAGE_AUDIO\", \"posted a voice message\"},\r\n        //    {\"CHANNEL_MESSAGE_CONTACT\", \"posted a contact\"},\r\n        //    {\"CHANNEL_MESSAGE_GEO\", \"posted a map\"},\r\n        //    {\"CHANNEL_MESSAGE_STICKER\", \"posted a sticker\"},\r\n\r\n        //    {\"CHAT_CREATED\", \"{0} invited you to the group\"},\r\n        //    {\"CHAT_TITLE_EDITED\", \"{0} edited the group's name\"},\r\n        //    {\"CHAT_PHOTO_EDITED\", \"{0} edited the group's photo\"},\r\n        //    {\"CHAT_ADD_MEMBER\", \"{0} invited {2} to the group\"},\r\n        //    {\"CHAT_ADD_YOU\", \"{0} invited you to the group\"},\r\n        //    {\"CHAT_DELETE_MEMBER\", \"{0} kicked {2} from the group\"},\r\n        //    {\"CHAT_DELETE_YOU\", \"{0} kicked you from the group\"},\r\n        //    {\"CHAT_LEFT\", \"{0} has left the group\"},\r\n        //    {\"CHAT_RETURNED\", \"{0} has returned to the group\"},\r\n        //    {\"GEOCHAT_CHECKIN\", \"{0} has checked-in\"},\r\n        //    {\"CHAT_JOINED\", \"{0} has joined the group\"},\r\n\r\n        //    {\"CONTACT_JOINED\", \"{0} joined the App!\"},\r\n        //    {\"AUTH_UNKNOWN\", \"New login from unrecognized device {0}\"},\r\n        //    {\"AUTH_REGION\", \"New login from unrecognized device {0}, location: {1}\"},\r\n\r\n        //    {\"CONTACT_PHOTO\", \"updated profile photo\"},\r\n            \r\n        //    {\"ENCRYPTION_REQUEST\", \"You have a new message\"},\r\n        //    {\"ENCRYPTION_ACCEPT\", \"You have a new message\"},\r\n        //    {\"ENCRYPTED_MESSAGE\", \"You have a new message\"},\r\n            \r\n        //    {\"DC_UPDATE\", \"Open this notification to update app settings\"},\r\n            \r\n        //    {\"LOCKED_MESSAGE\", \"You have a new message\"}\r\n        //};\r\n    }\r\n\r\n\r\n    public sealed class Photo\r\n    {\r\n        public string volume_id { get; set; }\r\n        public string local_id { get; set; }\r\n        public string secret { get; set; }\r\n        public int dc_id { get; set; }\r\n    }\r\n\r\n    public sealed class MTPeer\r\n    {\r\n        public string ah { get; set; }\r\n        public Photo ph { get; set; }\r\n    }\r\n\r\n    public sealed class Custom\r\n    {\r\n        public string msg_id { get; set; }\r\n        public string from_id { get; set; }\r\n        public string chat_id { get; set; }\r\n        public string channel_id { get; set; }\r\n        public MTPeer mtpeer { get; set; }\r\n        public string call_id { get; set; }\r\n        public string call_ah { get; set; }\r\n\r\n        public string group\r\n        {\r\n            get\r\n            {\r\n                if (chat_id != null) return \"c\" + chat_id;\r\n                if (channel_id != null) return \"c\" + chat_id;\r\n                if (from_id != null) return \"u\" + from_id;\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public string tag { get { return msg_id; } }\r\n\r\n        public IEnumerable<string> GetParams()\r\n        {\r\n            if (msg_id != null) yield return \"msg_id=\" + msg_id;\r\n            if (from_id != null) yield return \"from_id=\" + from_id;\r\n            if (chat_id != null) yield return \"chat_id=\" + chat_id;\r\n            if (channel_id != null) yield return \"channel_id=\" + channel_id;\r\n        } \r\n    }\r\n\r\n    public sealed class Data\r\n    {\r\n        public Custom custom { get; set; }\r\n        public string sound { get; set; }\r\n        public string mute { get; set; }\r\n        public int badge { get; set; }\r\n        public string loc_key { get; set; }\r\n        public string[] loc_args { get; set; }\r\n        public int random_id { get; set; }\r\n        public int user_id { get; set; }\r\n        public string text { get; set; }\r\n        public string system { get; set; }\r\n\r\n        public string group { get { return custom != null ? custom.group : null; } }\r\n        public string tag { get { return custom != null ? custom.tag : null; } }\r\n    }\r\n\r\n    public sealed class RootObject\r\n    {\r\n        public int date { get; set; }\r\n        public Data data { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.Tasks/Resources/de/Resources.resw",
    "content": "﻿<?xml version='1.0' encoding='UTF-8'?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" id=\"root\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/>\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"AUTH_REGION\" xml:space=\"preserve\">\n    <value>Zugriff von unbekanntem Gerät {0}, Standort: {1}</value>\n  </data>\n  <data name=\"AUTH_UNKNOWN\" xml:space=\"preserve\">\n    <value>Zugriff von unbekanntem Gerät {0}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>hat eine Sprachnachricht gesendet</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>hat einen Kontakt gesendet</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>hat eine Datei gesendet</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>hat {1} Nachrichten weitergeleitet</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>hat dich eingeladen, {1} zu spielen</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>hat einen Standort gesendet</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>hat ein GIF gesendet</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>hat eine Nachricht gesendet</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>hat ein Bild gesendet</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>hat einen Sticker gesendet</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{1}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>hat ein Video gesendet</value>\n  </data>\n  <data name=\"CHAT_ADD_MEMBER\" xml:space=\"preserve\">\n    <value>{0} hat {2} in die Gruppe eingeladen</value>\n  </data>\n  <data name=\"CHAT_ADD_YOU\" xml:space=\"preserve\">\n    <value>{0} hat dich in die Gruppe eingeladen</value>\n  </data>\n  <data name=\"CHAT_CREATED\" xml:space=\"preserve\">\n    <value>{0} hat dich in die Gruppe eingeladen</value>\n  </data>\n  <data name=\"CHAT_DELETE_MEMBER\" xml:space=\"preserve\">\n    <value>{0} hat {2} aus der Gruppe entfernt</value>\n  </data>\n  <data name=\"CHAT_DELETE_YOU\" xml:space=\"preserve\">\n    <value>{0} hat dich aus der Gruppe entfernt</value>\n  </data>\n  <data name=\"CHAT_JOINED\" xml:space=\"preserve\">\n    <value>{0} ist der Gruppe beigetreten</value>\n  </data>\n  <data name=\"CHAT_LEFT\" xml:space=\"preserve\">\n    <value>{0} hat die Gruppe verlassen</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>{0} hat eine Sprachnachricht an die Gruppe gesendet</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>{0} hat einen Kontakt an die Gruppe gesendet</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>{0} hat ein Dokument an die Gruppe gesendet</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>{0} hat an die Gruppe {2} Nachrichten weitergeleitet</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>{0} hat die Gruppe eingeladen, {2} zu spielen</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>{0} hat einen Standort an die Gruppe gesendet</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>{0} hat ein GIF an die Gruppe gesendet</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_INVOICE\" xml:space=\"preserve\">\n    <value>{0} hat eine Rechnung für {2} gesendet</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>{0} hat eine Nachricht an die Gruppe gesendet</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>{0} hat ein Bild an die Gruppe gesendet</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>{0} hat einen Sticker an die Gruppe gesendet</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{0}: {2}</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>{0} hat ein Video an die Gruppe gesendet</value>\n  </data>\n  <data name=\"CHAT_PHOTO_EDITED\" xml:space=\"preserve\">\n    <value>{0} hat das Bild der Gruppe geändert</value>\n  </data>\n  <data name=\"CHAT_RETURNED\" xml:space=\"preserve\">\n    <value>{0} ist in die Gruppe zurückgekehrt</value>\n  </data>\n  <data name=\"CHAT_TITLE_EDITED\" xml:space=\"preserve\">\n    <value>{0} hat den Namen der Gruppe geändert</value>\n  </data>\n  <data name=\"CONTACT_JOINED\" xml:space=\"preserve\">\n    <value>{0} benutzt jetzt Telegram!</value>\n  </data>\n  <data name=\"CONTACT_PHOTO\" xml:space=\"preserve\">\n    <value>hat das Profilbild geändert</value>\n  </data>\n  <data name=\"DC_UPDATE\" xml:space=\"preserve\">\n    <value>Diese Mitteilung öffnen, um die App-Einstellungen zu aktualisieren</value>\n  </data>\n  <data name=\"Disable\" xml:space=\"preserve\">\n    <value>Deaktivieren</value>\n  </data>\n  <data name=\"ENCRYPTED_MESSAGE\" xml:space=\"preserve\">\n    <value>Du hast eine neue Nachricht</value>\n  </data>\n  <data name=\"ENCRYPTION_ACCEPT\" xml:space=\"preserve\">\n    <value>Du hast eine neue Nachricht</value>\n  </data>\n  <data name=\"ENCRYPTION_REQUEST\" xml:space=\"preserve\">\n    <value>Du hast eine neue Nachricht</value>\n  </data>\n  <data name=\"GEOCHAT_CHECKIN\" xml:space=\"preserve\">\n    <value>{0} hat eingecheckt</value>\n  </data>\n  <data name=\"LOCKED_MESSAGE\" xml:space=\"preserve\">\n    <value>Du hast eine neue Nachricht</value>\n  </data>\n  <data name=\"MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>hat dir eine Sprachnachricht gesendet</value>\n  </data>\n  <data name=\"MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>hat dir einen Kontakt gesendet</value>\n  </data>\n  <data name=\"MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>hat dir ein Dokument gesendet</value>\n  </data>\n  <data name=\"MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value> hat dir {1} Nachrichten weitergeleitet</value>\n  </data>\n  <data name=\"MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>hat dich eingeladen, {1} zu spielen</value>\n  </data>\n  <data name=\"MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>hat dir einen Standort gesendet</value>\n  </data>\n  <data name=\"MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>hat dir ein GIF gesendet</value>\n  </data>\n  <data name=\"MESSAGE_INVOICE\" xml:space=\"preserve\">\n    <value>hat dir eine Rechnung für {1} gesendet</value>\n  </data>\n  <data name=\"MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>hat dir eine Nachricht gesendet</value>\n  </data>\n  <data name=\"MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>hat dir ein Bild gesendet</value>\n  </data>\n  <data name=\"MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>hat dir einen Sticker gesendet</value>\n  </data>\n  <data name=\"MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{1}</value>\n  </data>\n  <data name=\"MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>hat dir ein Video gesendet</value>\n  </data>\n  <data name=\"Mute1Hour\" xml:space=\"preserve\">\n    <value>Stumm für 1 Stunde</value>\n  </data>\n  <data name=\"PHONE_CALL_MISSED\" xml:space=\"preserve\">\n    <value>Du hast einen Anruf von {0} verpasst</value>\n  </data>\n  <data name=\"PHONE_CALL_REQUEST\" xml:space=\"preserve\">\n    <value>{0} ruft dich an!</value>\n  </data>\n  <data name=\"PINNED_AUDIO\" xml:space=\"preserve\">\n    <value>hat eine Sprachnachricht angeheftet</value>\n  </data>\n  <data name=\"PINNED_CONTACT\" xml:space=\"preserve\">\n    <value>hat einen Kontakt angeheftet</value>\n  </data>\n  <data name=\"PINNED_DOC\" xml:space=\"preserve\">\n    <value>hat eine Datei angeheftet</value>\n  </data>\n  <data name=\"PINNED_GAME\" xml:space=\"preserve\">\n    <value>hat ein Spiel angeheftet</value>\n  </data>\n  <data name=\"PINNED_GEO\" xml:space=\"preserve\">\n    <value>hat einen Standort angeheftet</value>\n  </data>\n  <data name=\"PINNED_GIF\" xml:space=\"preserve\">\n    <value>hat ein GIF angeheftet</value>\n  </data>\n  <data name=\"PINNED_INVOICE\" xml:space=\"preserve\">\n    <value>hat eine Rechnung anheftet</value>\n  </data>\n  <data name=\"PINNED_NOTEXT\" xml:space=\"preserve\">\n    <value>hat eine Nachricht angeheftet</value>\n  </data>\n  <data name=\"PINNED_PHOTO\" xml:space=\"preserve\">\n    <value>hat ein Bild angeheftet</value>\n  </data>\n  <data name=\"PINNED_STICKER\" xml:space=\"preserve\">\n    <value>hat einen Sticker angeheftet</value>\n  </data>\n  <data name=\"PINNED_TEXT\" xml:space=\"preserve\">\n    <value>hat \"{1}\" angeheftet</value>\n  </data>\n  <data name=\"PINNED_VIDEO\" xml:space=\"preserve\">\n    <value>hat ein Video angeheftet</value>\n  </data>\n  <data name=\"Reply\" xml:space=\"preserve\">\n    <value>Antworten</value>\n  </data>\n  <data name=\"TypReply\" xml:space=\"preserve\">\n    <value>Tippe deine Antwort</value>\n  </data>\n</root>\n"
  },
  {
    "path": "TelegramClient.Tasks/Resources/en/Resources.resw",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"AUTH_REGION\" xml:space=\"preserve\">\r\n    <value>New login from unrecognized device {0}, location: {1}</value>\r\n  </data>\r\n  <data name=\"AUTH_UNKNOWN\" xml:space=\"preserve\">\r\n    <value>New login from unrecognized device {0}</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_AUDIO\" xml:space=\"preserve\">\r\n    <value>posted a voice message</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_CONTACT\" xml:space=\"preserve\">\r\n    <value>posted a contact</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_DOC\" xml:space=\"preserve\">\r\n    <value>posted a document</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_FWDS\" xml:space=\"preserve\">\r\n    <value>posted {1} forwarded messages</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_GAME\" xml:space=\"preserve\">\r\n    <value>invited you to play {1}</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_GEO\" xml:space=\"preserve\">\r\n    <value>posted a map</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_GIF\" xml:space=\"preserve\">\r\n    <value>posted a GIF</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_NOTEXT\" xml:space=\"preserve\">\r\n    <value>posted a message</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_PHOTO\" xml:space=\"preserve\">\r\n    <value>posted a photo</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_STICKER\" xml:space=\"preserve\">\r\n    <value>posted a sticker</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_TEXT\" xml:space=\"preserve\">\r\n    <value>{1}</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_VIDEO\" xml:space=\"preserve\">\r\n    <value>posted a video</value>\r\n  </data>\r\n  <data name=\"CHAT_ADD_MEMBER\" xml:space=\"preserve\">\r\n    <value>{0} invited {2} to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_ADD_YOU\" xml:space=\"preserve\">\r\n    <value>{0} invited you to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_CREATED\" xml:space=\"preserve\">\r\n    <value>{0} invited you to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_DELETE_MEMBER\" xml:space=\"preserve\">\r\n    <value>{0} kicked {2} from the group</value>\r\n  </data>\r\n  <data name=\"CHAT_DELETE_YOU\" xml:space=\"preserve\">\r\n    <value>{0} kicked you from the group</value>\r\n  </data>\r\n  <data name=\"CHAT_JOINED\" xml:space=\"preserve\">\r\n    <value>{0} has joined the group</value>\r\n  </data>\r\n  <data name=\"CHAT_LEFT\" xml:space=\"preserve\">\r\n    <value>{0} has left the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_AUDIO\" xml:space=\"preserve\">\r\n    <value>{0} sent a voice message to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_CONTACT\" xml:space=\"preserve\">\r\n    <value>{0} shared a contact in the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_DOC\" xml:space=\"preserve\">\r\n    <value>{0} sent a document to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_FWDS\" xml:space=\"preserve\">\r\n    <value>{0} forwarded {2} messages to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_GAME\" xml:space=\"preserve\">\r\n    <value>{0} invited the group to play {2}</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_GEO\" xml:space=\"preserve\">\r\n    <value>{0} sent a map to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_GIF\" xml:space=\"preserve\">\r\n    <value>{0} sent a GIF to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_INVOICE\" xml:space=\"preserve\">\r\n    <value>{0} sent an invoice for {2}</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_NOTEXT\" xml:space=\"preserve\">\r\n    <value>{0} sent a message to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_PHOTO\" xml:space=\"preserve\">\r\n    <value>{0} sent a photo to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_STICKER\" xml:space=\"preserve\">\r\n    <value>{0} sent a sticker to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_TEXT\" xml:space=\"preserve\">\r\n    <value>{0}: {2}</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_VIDEO\" xml:space=\"preserve\">\r\n    <value>{0} sent a video to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_PHOTO_EDITED\" xml:space=\"preserve\">\r\n    <value>{0} edited the group's photo</value>\r\n  </data>\r\n  <data name=\"CHAT_RETURNED\" xml:space=\"preserve\">\r\n    <value>{0} has returned to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_TITLE_EDITED\" xml:space=\"preserve\">\r\n    <value>{0} edited the group's name</value>\r\n  </data>\r\n  <data name=\"CONTACT_JOINED\" xml:space=\"preserve\">\r\n    <value>{0} joined the App!</value>\r\n  </data>\r\n  <data name=\"CONTACT_PHOTO\" xml:space=\"preserve\">\r\n    <value>updated profile photo</value>\r\n  </data>\r\n  <data name=\"DC_UPDATE\" xml:space=\"preserve\">\r\n    <value>Open this notification to update app settings</value>\r\n  </data>\r\n  <data name=\"Disable\" xml:space=\"preserve\">\r\n    <value>Disable</value>\r\n  </data>\r\n  <data name=\"ENCRYPTED_MESSAGE\" xml:space=\"preserve\">\r\n    <value>You have a new message</value>\r\n  </data>\r\n  <data name=\"ENCRYPTION_ACCEPT\" xml:space=\"preserve\">\r\n    <value>You have a new message</value>\r\n  </data>\r\n  <data name=\"ENCRYPTION_REQUEST\" xml:space=\"preserve\">\r\n    <value>You have a new message</value>\r\n  </data>\r\n  <data name=\"GEOCHAT_CHECKIN\" xml:space=\"preserve\">\r\n    <value>{0} has checked-in</value>\r\n  </data>\r\n  <data name=\"LOCKED_MESSAGE\" xml:space=\"preserve\">\r\n    <value>You have a new message</value>\r\n  </data>\r\n  <data name=\"MESSAGE_AUDIO\" xml:space=\"preserve\">\r\n    <value>sent you a voice message</value>\r\n  </data>\r\n  <data name=\"MESSAGE_CONTACT\" xml:space=\"preserve\">\r\n    <value>shared a contact with you</value>\r\n  </data>\r\n  <data name=\"MESSAGE_DOC\" xml:space=\"preserve\">\r\n    <value>sent you a document</value>\r\n  </data>\r\n  <data name=\"MESSAGE_FWDS\" xml:space=\"preserve\">\r\n    <value>forwarded you {1} messages</value>\r\n  </data>\r\n  <data name=\"MESSAGE_GAME\" xml:space=\"preserve\">\r\n    <value>invited you to play {1}</value>\r\n  </data>\r\n  <data name=\"MESSAGE_GEO\" xml:space=\"preserve\">\r\n    <value>sent you a map</value>\r\n  </data>\r\n  <data name=\"MESSAGE_GIF\" xml:space=\"preserve\">\r\n    <value>sent you a GIF</value>\r\n  </data>\r\n  <data name=\"MESSAGE_INVOICE\" xml:space=\"preserve\">\r\n    <value>sent you an invoice for {1}</value>\r\n  </data>\r\n  <data name=\"MESSAGE_NOTEXT\" xml:space=\"preserve\">\r\n    <value>sent you a message</value>\r\n  </data>\r\n  <data name=\"MESSAGE_PHOTO\" xml:space=\"preserve\">\r\n    <value>sent you a photo</value>\r\n  </data>\r\n  <data name=\"MESSAGE_STICKER\" xml:space=\"preserve\">\r\n    <value>sent you a sticker</value>\r\n  </data>\r\n  <data name=\"MESSAGE_TEXT\" xml:space=\"preserve\">\r\n    <value>{1}</value>\r\n  </data>\r\n  <data name=\"MESSAGE_VIDEO\" xml:space=\"preserve\">\r\n    <value>sent you a video</value>\r\n  </data>\r\n  <data name=\"Mute1Hour\" xml:space=\"preserve\">\r\n    <value>Mute for 1 hour</value>\r\n  </data>\r\n  <data name=\"PHONE_CALL_MISSED\" xml:space=\"preserve\">\r\n    <value>You missed a call from {0}</value>\r\n  </data>\r\n  <data name=\"PHONE_CALL_REQUEST\" xml:space=\"preserve\">\r\n    <value>{0} is calling you!</value>\r\n  </data>\r\n  <data name=\"PINNED_AUDIO\" xml:space=\"preserve\">\r\n    <value>pinned a voice message</value>\r\n  </data>\r\n  <data name=\"PINNED_CONTACT\" xml:space=\"preserve\">\r\n    <value>pinned a contact</value>\r\n  </data>\r\n  <data name=\"PINNED_DOC\" xml:space=\"preserve\">\r\n    <value>pinned a file</value>\r\n  </data>\r\n  <data name=\"PINNED_GAME\" xml:space=\"preserve\">\r\n    <value>pinned a game</value>\r\n  </data>\r\n  <data name=\"PINNED_GEO\" xml:space=\"preserve\">\r\n    <value>pinned a map</value>\r\n  </data>\r\n  <data name=\"PINNED_GIF\" xml:space=\"preserve\">\r\n    <value>pinned a GIF</value>\r\n  </data>\r\n  <data name=\"PINNED_INVOICE\" xml:space=\"preserve\">\r\n    <value>pinned an invoice</value>\r\n  </data>\r\n  <data name=\"PINNED_NOTEXT\" xml:space=\"preserve\">\r\n    <value>pinned a message</value>\r\n  </data>\r\n  <data name=\"PINNED_PHOTO\" xml:space=\"preserve\">\r\n    <value>pinned a photo</value>\r\n  </data>\r\n  <data name=\"PINNED_STICKER\" xml:space=\"preserve\">\r\n    <value>pinned a sticker</value>\r\n  </data>\r\n  <data name=\"PINNED_TEXT\" xml:space=\"preserve\">\r\n    <value>pinned \"{1}\"</value>\r\n  </data>\r\n  <data name=\"PINNED_VIDEO\" xml:space=\"preserve\">\r\n    <value>pinned a video</value>\r\n  </data>\r\n  <data name=\"Reply\" xml:space=\"preserve\">\r\n    <value>Reply</value>\r\n  </data>\r\n  <data name=\"TypReply\" xml:space=\"preserve\">\r\n    <value>Type a reply</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "TelegramClient.Tasks/Resources/es/Resources.resw",
    "content": "﻿<?xml version='1.0' encoding='UTF-8'?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" id=\"root\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/>\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"AUTH_REGION\" xml:space=\"preserve\">\n    <value>Inicio de sesión en un dispositivo desconocido {0}, ubicación: {1}</value>\n  </data>\n  <data name=\"AUTH_UNKNOWN\" xml:space=\"preserve\">\n    <value>Inicio de sesión en un dispositivo desconocido {0}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>publicó un mensaje de voz</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>publicó un contacto</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>publicó un archivo</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>publicó {1} mensajes reenviados</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>te invitó a jugar {1}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>publicó un mapa</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>publicó un GIF</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>publicó un mensaje</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>publicó una foto</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>publicó un sticker</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{1}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>publicó un vídeo</value>\n  </data>\n  <data name=\"CHAT_ADD_MEMBER\" xml:space=\"preserve\">\n    <value>{0} invitó {2} al grupo</value>\n  </data>\n  <data name=\"CHAT_ADD_YOU\" xml:space=\"preserve\">\n    <value>{0} te invitó al grupo</value>\n  </data>\n  <data name=\"CHAT_CREATED\" xml:space=\"preserve\">\n    <value>{0} te invitó al grupo</value>\n  </data>\n  <data name=\"CHAT_DELETE_MEMBER\" xml:space=\"preserve\">\n    <value>{0} expulsó a {2} del grupo</value>\n  </data>\n  <data name=\"CHAT_DELETE_YOU\" xml:space=\"preserve\">\n    <value>{0} te expulsó del grupo</value>\n  </data>\n  <data name=\"CHAT_JOINED\" xml:space=\"preserve\">\n    <value>{0} se unió al grupo</value>\n  </data>\n  <data name=\"CHAT_LEFT\" xml:space=\"preserve\">\n    <value>{0} dejó el grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>{0} envío un mensaje de voz al grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>{0} compartió un contacto en el grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>{0} envió un archivo al grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>{0} reenvió {2} mensajes al grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>{0} invitó al grupo a jugar a {2}</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>{0} envió un mapa al grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>{0} envió un GIF al grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_INVOICE\" xml:space=\"preserve\">\n    <value>{0} envió una factura por {2}</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>{0} envió un mensaje al grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>{0} envió una foto al grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>{0} envió un sticker al grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{0}: {2}</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>{0} envió un vídeo al grupo</value>\n  </data>\n  <data name=\"CHAT_PHOTO_EDITED\" xml:space=\"preserve\">\n    <value>{0} editó la foto del grupo</value>\n  </data>\n  <data name=\"CHAT_RETURNED\" xml:space=\"preserve\">\n    <value>{0} volvió al grupo</value>\n  </data>\n  <data name=\"CHAT_TITLE_EDITED\" xml:space=\"preserve\">\n    <value>{0} editó el nombre del grupo</value>\n  </data>\n  <data name=\"CONTACT_JOINED\" xml:space=\"preserve\">\n    <value>¡{0} se unió a Telegram!</value>\n  </data>\n  <data name=\"CONTACT_PHOTO\" xml:space=\"preserve\">\n    <value>actualizó la foto de perfil</value>\n  </data>\n  <data name=\"DC_UPDATE\" xml:space=\"preserve\">\n    <value>Abre esta notificación para actualizar los ajustes de la aplicación</value>\n  </data>\n  <data name=\"Disable\" xml:space=\"preserve\">\n    <value>Desactivar</value>\n  </data>\n  <data name=\"ENCRYPTED_MESSAGE\" xml:space=\"preserve\">\n    <value>Tienes un nuevo mensaje</value>\n  </data>\n  <data name=\"ENCRYPTION_ACCEPT\" xml:space=\"preserve\">\n    <value>Tienes un nuevo mensaje</value>\n  </data>\n  <data name=\"ENCRYPTION_REQUEST\" xml:space=\"preserve\">\n    <value>Tienes un nuevo mensaje</value>\n  </data>\n  <data name=\"GEOCHAT_CHECKIN\" xml:space=\"preserve\">\n    <value>{0} hizo check-in</value>\n  </data>\n  <data name=\"LOCKED_MESSAGE\" xml:space=\"preserve\">\n    <value>Tienes un mensaje nuevo</value>\n  </data>\n  <data name=\"MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>te envió un mensaje de voz</value>\n  </data>\n  <data name=\"MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>compartió un contacto contigo</value>\n  </data>\n  <data name=\"MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>te envió un archivo</value>\n  </data>\n  <data name=\"MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>te reenvió {1} mensajes</value>\n  </data>\n  <data name=\"MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>te invitó a jugar a {1}</value>\n  </data>\n  <data name=\"MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>te envió un mapa</value>\n  </data>\n  <data name=\"MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>te envió un GIF</value>\n  </data>\n  <data name=\"MESSAGE_INVOICE\" xml:space=\"preserve\">\n    <value>te envió una factura por {1}</value>\n  </data>\n  <data name=\"MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>te envió un mensaje</value>\n  </data>\n  <data name=\"MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>te envió una foto</value>\n  </data>\n  <data name=\"MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>te envió un sticker</value>\n  </data>\n  <data name=\"MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{1}</value>\n  </data>\n  <data name=\"MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>te envió un vídeo</value>\n  </data>\n  <data name=\"Mute1Hour\" xml:space=\"preserve\">\n    <value>Silenciar 1 hora</value>\n  </data>\n  <data name=\"PHONE_CALL_MISSED\" xml:space=\"preserve\">\n    <value>Perdiste una llamada de {0}</value>\n  </data>\n  <data name=\"PHONE_CALL_REQUEST\" xml:space=\"preserve\">\n    <value>¡{0} te está llamando!</value>\n  </data>\n  <data name=\"PINNED_AUDIO\" xml:space=\"preserve\">\n    <value>ancló un mensaje de voz</value>\n  </data>\n  <data name=\"PINNED_CONTACT\" xml:space=\"preserve\">\n    <value>ancló un contacto</value>\n  </data>\n  <data name=\"PINNED_DOC\" xml:space=\"preserve\">\n    <value>ancló un archivo</value>\n  </data>\n  <data name=\"PINNED_GAME\" xml:space=\"preserve\">\n    <value>ancló un juego</value>\n  </data>\n  <data name=\"PINNED_GEO\" xml:space=\"preserve\">\n    <value>ancló un mapa</value>\n  </data>\n  <data name=\"PINNED_GIF\" xml:space=\"preserve\">\n    <value>ancló un GIF</value>\n  </data>\n  <data name=\"PINNED_INVOICE\" xml:space=\"preserve\">\n    <value>ancló una factura</value>\n  </data>\n  <data name=\"PINNED_NOTEXT\" xml:space=\"preserve\">\n    <value>ancló un mensaje</value>\n  </data>\n  <data name=\"PINNED_PHOTO\" xml:space=\"preserve\">\n    <value>ancló una foto</value>\n  </data>\n  <data name=\"PINNED_STICKER\" xml:space=\"preserve\">\n    <value>ancló un sticker</value>\n  </data>\n  <data name=\"PINNED_TEXT\" xml:space=\"preserve\">\n    <value>ancló \"{1}\"</value>\n  </data>\n  <data name=\"PINNED_VIDEO\" xml:space=\"preserve\">\n    <value>ancló un vídeo</value>\n  </data>\n  <data name=\"Reply\" xml:space=\"preserve\">\n    <value>Responder</value>\n  </data>\n  <data name=\"TypReply\" xml:space=\"preserve\">\n    <value>Escribe una respuesta</value>\n  </data>\n</root>\n"
  },
  {
    "path": "TelegramClient.Tasks/Resources/it/Resources.resw",
    "content": "﻿<?xml version='1.0' encoding='UTF-8'?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" id=\"root\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/>\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"AUTH_REGION\" xml:space=\"preserve\">\n    <value>Accesso da un nuovo dispositivo {0}, posizione: {1}</value>\n  </data>\n  <data name=\"AUTH_UNKNOWN\" xml:space=\"preserve\">\n    <value>Accesso da un nuovo dispositivo {0}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>ha pubblicato un messaggio vocale</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>ha pubblicato un contatto</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>ha pubblicato un documento</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>ha pubblicato {1} messaggi inoltrati</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>ti ha invitato a giocare a {1}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>ha pubblicato una posizione</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>ha pubblicato una GIF</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>ha pubblicato un messaggio</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>ha pubblicato una foto</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>ha pubblicato uno sticker</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{1}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>ha pubblicato un video</value>\n  </data>\n  <data name=\"CHAT_ADD_MEMBER\" xml:space=\"preserve\">\n    <value>{0} ha aggiunto {2} al gruppo</value>\n  </data>\n  <data name=\"CHAT_ADD_YOU\" xml:space=\"preserve\">\n    <value>{0} ti ha aggiunto al gruppo</value>\n  </data>\n  <data name=\"CHAT_CREATED\" xml:space=\"preserve\">\n    <value>{0} ti ha aggiunto al gruppo</value>\n  </data>\n  <data name=\"CHAT_DELETE_MEMBER\" xml:space=\"preserve\">\n    <value>{0} ha rimosso {2} dal gruppo</value>\n  </data>\n  <data name=\"CHAT_DELETE_YOU\" xml:space=\"preserve\">\n    <value>{0} ti ha rimosso dal gruppo</value>\n  </data>\n  <data name=\"CHAT_JOINED\" xml:space=\"preserve\">\n    <value>{0} si è unito al gruppo</value>\n  </data>\n  <data name=\"CHAT_LEFT\" xml:space=\"preserve\">\n    <value>{0} ha lasciato il gruppo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>{0} ha inviato una nota vocale al gruppo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>{0} ha condiviso un contatto con il gruppo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>{0} ha inviato un file al gruppo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>{0} ha inoltrato {2} messaggi al gruppo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>{0} ha invitato il gruppo a giocare a {2}</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>{0} ha inviato una posizione al gruppo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>{0} ha inviato una GIF al gruppo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_INVOICE\" xml:space=\"preserve\">\n    <value>{0} ha inviato una fattura per {2}</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>{0} ha inviato un messaggio al gruppo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>{0} ha inviato una foto al gruppo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>{0} ha inviato uno sticker al gruppo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{0}: {2}</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>{0} ha inviato un video al gruppo</value>\n  </data>\n  <data name=\"CHAT_PHOTO_EDITED\" xml:space=\"preserve\">\n    <value>{0} ha cambiato la foto del gruppo</value>\n  </data>\n  <data name=\"CHAT_RETURNED\" xml:space=\"preserve\">\n    <value>{0} è tornato nel gruppo</value>\n  </data>\n  <data name=\"CHAT_TITLE_EDITED\" xml:space=\"preserve\">\n    <value>{0} ha cambiato il nome del gruppo</value>\n  </data>\n  <data name=\"CONTACT_JOINED\" xml:space=\"preserve\">\n    <value>{0} si è unito a Telegram</value>\n  </data>\n  <data name=\"CONTACT_PHOTO\" xml:space=\"preserve\">\n    <value>ha aggiornato la foto profilo</value>\n  </data>\n  <data name=\"DC_UPDATE\" xml:space=\"preserve\">\n    <value>Apri questa notifica per aggiornare le impostazioni dell'applicazione</value>\n  </data>\n  <data name=\"Disable\" xml:space=\"preserve\">\n    <value>Disabilita</value>\n  </data>\n  <data name=\"ENCRYPTED_MESSAGE\" xml:space=\"preserve\">\n    <value>Hai un nuovo messaggio</value>\n  </data>\n  <data name=\"ENCRYPTION_ACCEPT\" xml:space=\"preserve\">\n    <value>Hai un nuovo messaggio</value>\n  </data>\n  <data name=\"ENCRYPTION_REQUEST\" xml:space=\"preserve\">\n    <value>Hai un nuovo messaggio</value>\n  </data>\n  <data name=\"GEOCHAT_CHECKIN\" xml:space=\"preserve\">\n    <value>{0} ha fatto il check-in</value>\n  </data>\n  <data name=\"LOCKED_MESSAGE\" xml:space=\"preserve\">\n    <value>Hai un nuovo messaggio</value>\n  </data>\n  <data name=\"MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>ti ha inviato una nota vocale</value>\n  </data>\n  <data name=\"MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>ha condiviso un contatto con te</value>\n  </data>\n  <data name=\"MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>ti ha inviato un file</value>\n  </data>\n  <data name=\"MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>ti ha inoltrato {1} messaggi</value>\n  </data>\n  <data name=\"MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>ti ha invitato a giocare a {1}</value>\n  </data>\n  <data name=\"MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>ti ha inviato una posizione</value>\n  </data>\n  <data name=\"MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>ti ha inviato una GIF</value>\n  </data>\n  <data name=\"MESSAGE_INVOICE\" xml:space=\"preserve\">\n    <value>ti ha inviato una fattura per {1}</value>\n  </data>\n  <data name=\"MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>ti ha inviato un messaggio</value>\n  </data>\n  <data name=\"MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>ti ha inviato una foto</value>\n  </data>\n  <data name=\"MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>ti ha inviato uno sticker</value>\n  </data>\n  <data name=\"MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{1}</value>\n  </data>\n  <data name=\"MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>ti ha inviato un video</value>\n  </data>\n  <data name=\"Mute1Hour\" xml:space=\"preserve\">\n    <value>Silenzia per 1 ora</value>\n  </data>\n  <data name=\"PHONE_CALL_MISSED\" xml:space=\"preserve\">\n    <value>Hai perso una chiamata da {0}</value>\n  </data>\n  <data name=\"PHONE_CALL_REQUEST\" xml:space=\"preserve\">\n    <value>{0} ti sta chiamando!</value>\n  </data>\n  <data name=\"PINNED_AUDIO\" xml:space=\"preserve\">\n    <value>ha fissato un messaggio vocale</value>\n  </data>\n  <data name=\"PINNED_CONTACT\" xml:space=\"preserve\">\n    <value>ha fissato un contatto</value>\n  </data>\n  <data name=\"PINNED_DOC\" xml:space=\"preserve\">\n    <value>ha fissato un file</value>\n  </data>\n  <data name=\"PINNED_GAME\" xml:space=\"preserve\">\n    <value>ha fissato un gioco</value>\n  </data>\n  <data name=\"PINNED_GEO\" xml:space=\"preserve\">\n    <value>ha fissato una posizione</value>\n  </data>\n  <data name=\"PINNED_GIF\" xml:space=\"preserve\">\n    <value>ha fissato una GIF</value>\n  </data>\n  <data name=\"PINNED_INVOICE\" xml:space=\"preserve\">\n    <value>ha fissato una fattura</value>\n  </data>\n  <data name=\"PINNED_NOTEXT\" xml:space=\"preserve\">\n    <value>ha fissato un messaggio</value>\n  </data>\n  <data name=\"PINNED_PHOTO\" xml:space=\"preserve\">\n    <value>ha fissato una foto</value>\n  </data>\n  <data name=\"PINNED_STICKER\" xml:space=\"preserve\">\n    <value>ha fissato uno sticker</value>\n  </data>\n  <data name=\"PINNED_TEXT\" xml:space=\"preserve\">\n    <value>ha fissato \"{1}\"</value>\n  </data>\n  <data name=\"PINNED_VIDEO\" xml:space=\"preserve\">\n    <value>ha fissato un video</value>\n  </data>\n  <data name=\"Reply\" xml:space=\"preserve\">\n    <value>Rispondi</value>\n  </data>\n  <data name=\"TypReply\" xml:space=\"preserve\">\n    <value>Scrivi una risposta</value>\n  </data>\n</root>\n"
  },
  {
    "path": "TelegramClient.Tasks/Resources/nl/Resources.resw",
    "content": "﻿<?xml version='1.0' encoding='UTF-8'?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" id=\"root\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/>\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"AUTH_REGION\" xml:space=\"preserve\">\n    <value>Ingelogd vanaf een nieuw apparaat: {0}, locatie: {1}</value>\n  </data>\n  <data name=\"AUTH_UNKNOWN\" xml:space=\"preserve\">\n    <value>Ingelogd vanaf een nieuw apparaat: {0}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>plaatste een spraakbericht</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>plaatste een contact</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>plaatste een bestand</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>plaatste {1} doorgestuurde berichten</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>wil {1} met je spelen</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>plaatste een kaart</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>plaatste een GIF</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>plaatste een bericht</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>plaatste een foto</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>plaatste een sticker</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{1}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>plaatste een video</value>\n  </data>\n  <data name=\"CHAT_ADD_MEMBER\" xml:space=\"preserve\">\n    <value>{0} heeft {2} uitgenodigd voor de groep</value>\n  </data>\n  <data name=\"CHAT_ADD_YOU\" xml:space=\"preserve\">\n    <value>{0} heeft je uitgenodigd voor de groep</value>\n  </data>\n  <data name=\"CHAT_CREATED\" xml:space=\"preserve\">\n    <value>{0} heeft je uitgenodigd voor de groep</value>\n  </data>\n  <data name=\"CHAT_DELETE_MEMBER\" xml:space=\"preserve\">\n    <value>{0} heeft {2} verwijderd uit de groep</value>\n  </data>\n  <data name=\"CHAT_DELETE_YOU\" xml:space=\"preserve\">\n    <value>{0} heeft je verwijderd uit de groep</value>\n  </data>\n  <data name=\"CHAT_JOINED\" xml:space=\"preserve\">\n    <value>{0} is nu lid van de groep</value>\n  </data>\n  <data name=\"CHAT_LEFT\" xml:space=\"preserve\">\n    <value>{0} heeft de groep verlaten</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>{0} heeft een spraakbericht gestuurd naar de groep</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>{0} heeft een contact gedeeld met de groep</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>{0} heeft een bestand gestuurd naar de groep</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>{0} heeft {2} berichten doorgestuurd naar de groep</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>{0} wil {2} met de groep spelen</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>{0} heeft een kaart gestuurd naar de groep</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>{0} heeft een GIF gestuurd naar de groep</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_INVOICE\" xml:space=\"preserve\">\n    <value>{0} heeft je een factuur van {2} gestuurd</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>{0} heeft een bericht gestuurd naar de groep</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>{0} heeft een foto gestuurd naar de groep</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>{0} heeft een sticker gestuurd naar de groep</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{0}: {2}</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>{0} heeft een video gestuurd naar de groep</value>\n  </data>\n  <data name=\"CHAT_PHOTO_EDITED\" xml:space=\"preserve\">\n    <value>{0} heeft de groepsafbeelding gewijzigd</value>\n  </data>\n  <data name=\"CHAT_RETURNED\" xml:space=\"preserve\">\n    <value>{0} is teruggekeerd naar de groep</value>\n  </data>\n  <data name=\"CHAT_TITLE_EDITED\" xml:space=\"preserve\">\n    <value>{0} heeft de groepsnaam gewijzigd</value>\n  </data>\n  <data name=\"CONTACT_JOINED\" xml:space=\"preserve\">\n    <value>{0} heeft nu Telegram!</value>\n  </data>\n  <data name=\"CONTACT_PHOTO\" xml:space=\"preserve\">\n    <value>heeft zijn/haar profielfoto gewijzigd</value>\n  </data>\n  <data name=\"DC_UPDATE\" xml:space=\"preserve\">\n    <value>Open deze melding om app-instellingen bij te werken</value>\n  </data>\n  <data name=\"Disable\" xml:space=\"preserve\">\n    <value>Uitschakelen</value>\n  </data>\n  <data name=\"ENCRYPTED_MESSAGE\" xml:space=\"preserve\">\n    <value>Je hebt een nieuw bericht</value>\n  </data>\n  <data name=\"ENCRYPTION_ACCEPT\" xml:space=\"preserve\">\n    <value>Je hebt een nieuw bericht</value>\n  </data>\n  <data name=\"ENCRYPTION_REQUEST\" xml:space=\"preserve\">\n    <value>Je hebt een nieuw bericht</value>\n  </data>\n  <data name=\"GEOCHAT_CHECKIN\" xml:space=\"preserve\">\n    <value>{0} is ingecheckt</value>\n  </data>\n  <data name=\"LOCKED_MESSAGE\" xml:space=\"preserve\">\n    <value>Je hebt een nieuw bericht</value>\n  </data>\n  <data name=\"MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>heeft je een spraakbericht gestuurd</value>\n  </data>\n  <data name=\"MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>heeft een contact met je gedeeld</value>\n  </data>\n  <data name=\"MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>heeft je een bestand gestuurd</value>\n  </data>\n  <data name=\"MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>Stuurde {1} berichten door</value>\n  </data>\n  <data name=\"MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>wil {1} met je spelen</value>\n  </data>\n  <data name=\"MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>heeft je een kaart gestuurd</value>\n  </data>\n  <data name=\"MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>heeft je een GIF gestuurd</value>\n  </data>\n  <data name=\"MESSAGE_INVOICE\" xml:space=\"preserve\">\n    <value>heeft je een factuur van {1} gestuurd</value>\n  </data>\n  <data name=\"MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>heeft je een bericht gestuurd</value>\n  </data>\n  <data name=\"MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>heeft je een foto gestuurd</value>\n  </data>\n  <data name=\"MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>heeft je een sticker gestuurd</value>\n  </data>\n  <data name=\"MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{1}</value>\n  </data>\n  <data name=\"MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>heeft je een video gestuurd</value>\n  </data>\n  <data name=\"Mute1Hour\" xml:space=\"preserve\">\n    <value>1 uur stil</value>\n  </data>\n  <data name=\"PHONE_CALL_MISSED\" xml:space=\"preserve\">\n    <value>Gemiste oproep van {0}</value>\n  </data>\n  <data name=\"PHONE_CALL_REQUEST\" xml:space=\"preserve\">\n    <value>{0} belt je</value>\n  </data>\n  <data name=\"PINNED_AUDIO\" xml:space=\"preserve\">\n    <value>heeft spraakbericht vastgezet</value>\n  </data>\n  <data name=\"PINNED_CONTACT\" xml:space=\"preserve\">\n    <value>heeft contact vastgezet</value>\n  </data>\n  <data name=\"PINNED_DOC\" xml:space=\"preserve\">\n    <value>heeft bestand vastgezet</value>\n  </data>\n  <data name=\"PINNED_GAME\" xml:space=\"preserve\">\n    <value>heeft een spel vastgezet</value>\n  </data>\n  <data name=\"PINNED_GEO\" xml:space=\"preserve\">\n    <value>heeft locatie vastgezet</value>\n  </data>\n  <data name=\"PINNED_GIF\" xml:space=\"preserve\">\n    <value>heeft GIF vastgezet</value>\n  </data>\n  <data name=\"PINNED_INVOICE\" xml:space=\"preserve\">\n    <value>factuur vastgezet</value>\n  </data>\n  <data name=\"PINNED_NOTEXT\" xml:space=\"preserve\">\n    <value>heeft bericht vastgezet</value>\n  </data>\n  <data name=\"PINNED_PHOTO\" xml:space=\"preserve\">\n    <value>heeft foto vastgezet</value>\n  </data>\n  <data name=\"PINNED_STICKER\" xml:space=\"preserve\">\n    <value>heeft sticker vastgezet</value>\n  </data>\n  <data name=\"PINNED_TEXT\" xml:space=\"preserve\">\n    <value>vastgezet \"{1}\"</value>\n  </data>\n  <data name=\"PINNED_VIDEO\" xml:space=\"preserve\">\n    <value>heeft video vastgezet</value>\n  </data>\n  <data name=\"Reply\" xml:space=\"preserve\">\n    <value>Antwoord</value>\n  </data>\n  <data name=\"TypReply\" xml:space=\"preserve\">\n    <value>Tik je antwoord</value>\n  </data>\n</root>\n"
  },
  {
    "path": "TelegramClient.Tasks/Resources/pt/Resources.resw",
    "content": "﻿<?xml version='1.0' encoding='UTF-8'?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" id=\"root\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/>\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\"/>\n              <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/>\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/>\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/>\n              <xsd:attribute ref=\"xml:space\"/>\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/>\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"AUTH_REGION\" xml:space=\"preserve\">\n    <value>Novo login de um dispositivo desconhecido {0}, localização: {1}</value>\n  </data>\n  <data name=\"AUTH_UNKNOWN\" xml:space=\"preserve\">\n    <value>Novo login de dispositivo desconhecido {0}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>postou uma mensagem de voz</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>postou um contato</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>postou um documento</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>postou {1} mensagens encaminhadas</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>te convidou para jogar {1}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>postou um mapa</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>postou um GIF</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>postou uma mensagem</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>postou uma foto</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>postou um sticker</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{1}</value>\n  </data>\n  <data name=\"CHANNEL_MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>postou um vídeo</value>\n  </data>\n  <data name=\"CHAT_ADD_MEMBER\" xml:space=\"preserve\">\n    <value>{0} convidou {2} para o grupo</value>\n  </data>\n  <data name=\"CHAT_ADD_YOU\" xml:space=\"preserve\">\n    <value>{0} convidou você para o grupo </value>\n  </data>\n  <data name=\"CHAT_CREATED\" xml:space=\"preserve\">\n    <value>{0} convidou você para o grupo </value>\n  </data>\n  <data name=\"CHAT_DELETE_MEMBER\" xml:space=\"preserve\">\n    <value>{0} removeu {2} do grupo</value>\n  </data>\n  <data name=\"CHAT_DELETE_YOU\" xml:space=\"preserve\">\n    <value>{0} removeu você do grupo </value>\n  </data>\n  <data name=\"CHAT_JOINED\" xml:space=\"preserve\">\n    <value>{0} entrou no grupo</value>\n  </data>\n  <data name=\"CHAT_LEFT\" xml:space=\"preserve\">\n    <value>{0} deixou o grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>{0} enviou uma mensagem de voz para o grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>{0} compartilhou um contato no grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>{0} enviou um documento para o grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value>{0} encaminhou {2} mensagens para o grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>{0} convidou o grupo para jogar {2}</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>{0} enviou um mapa para o grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_GIF\" xml:space=\"preserve\">\n    <value>{0} enviou um GIF para o grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_INVOICE\" xml:space=\"preserve\">\n    <value>{0} enviou uma fatura para {2}</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>{0} enviou uma mensagem para o grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>{0} enviou uma foto para o grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>{0} enviou um sticker para o grupo</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{0}: {2}</value>\n  </data>\n  <data name=\"CHAT_MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value>{0} enviou um vídeo para o grupo</value>\n  </data>\n  <data name=\"CHAT_PHOTO_EDITED\" xml:space=\"preserve\">\n    <value>{0} alterou a foto do grupo</value>\n  </data>\n  <data name=\"CHAT_RETURNED\" xml:space=\"preserve\">\n    <value>{0} retornou ao grupo</value>\n  </data>\n  <data name=\"CHAT_TITLE_EDITED\" xml:space=\"preserve\">\n    <value>{0} editou o nome do grupo</value>\n  </data>\n  <data name=\"CONTACT_JOINED\" xml:space=\"preserve\">\n    <value>{0} entrou para o Telegram!</value>\n  </data>\n  <data name=\"CONTACT_PHOTO\" xml:space=\"preserve\">\n    <value>atualizou a foto do perfil</value>\n  </data>\n  <data name=\"DC_UPDATE\" xml:space=\"preserve\">\n    <value>Abra essa notificação para atualizar as configurações</value>\n  </data>\n  <data name=\"Disable\" xml:space=\"preserve\">\n    <value>Desativar</value>\n  </data>\n  <data name=\"ENCRYPTED_MESSAGE\" xml:space=\"preserve\">\n    <value>Você tem uma nova mensagem</value>\n  </data>\n  <data name=\"ENCRYPTION_ACCEPT\" xml:space=\"preserve\">\n    <value>Você tem uma nova mensagem</value>\n  </data>\n  <data name=\"ENCRYPTION_REQUEST\" xml:space=\"preserve\">\n    <value>Você tem uma nova mensagem</value>\n  </data>\n  <data name=\"GEOCHAT_CHECKIN\" xml:space=\"preserve\">\n    <value>{0} foi verificado</value>\n  </data>\n  <data name=\"LOCKED_MESSAGE\" xml:space=\"preserve\">\n    <value>Você tem uma nova mensagem</value>\n  </data>\n  <data name=\"MESSAGE_AUDIO\" xml:space=\"preserve\">\n    <value>te enviou uma mensagem de voz</value>\n  </data>\n  <data name=\"MESSAGE_CONTACT\" xml:space=\"preserve\">\n    <value>compartilhou um contato com você</value>\n  </data>\n  <data name=\"MESSAGE_DOC\" xml:space=\"preserve\">\n    <value>te enviou um documento</value>\n  </data>\n  <data name=\"MESSAGE_FWDS\" xml:space=\"preserve\">\n    <value> encaminhou para você {1} mensagens</value>\n  </data>\n  <data name=\"MESSAGE_GAME\" xml:space=\"preserve\">\n    <value>te convidou para jogar {1}</value>\n  </data>\n  <data name=\"MESSAGE_GEO\" xml:space=\"preserve\">\n    <value>te enviou um mapa</value>\n  </data>\n  <data name=\"MESSAGE_GIF\" xml:space=\"preserve\">\n    <value> te enviou um GIF</value>\n  </data>\n  <data name=\"MESSAGE_INVOICE\" xml:space=\"preserve\">\n    <value>enviou uma fatura para {1}</value>\n  </data>\n  <data name=\"MESSAGE_NOTEXT\" xml:space=\"preserve\">\n    <value>te enviou uma mensagem</value>\n  </data>\n  <data name=\"MESSAGE_PHOTO\" xml:space=\"preserve\">\n    <value>te enviou uma foto</value>\n  </data>\n  <data name=\"MESSAGE_STICKER\" xml:space=\"preserve\">\n    <value>te enviou um sticker</value>\n  </data>\n  <data name=\"MESSAGE_TEXT\" xml:space=\"preserve\">\n    <value>{1}</value>\n  </data>\n  <data name=\"MESSAGE_VIDEO\" xml:space=\"preserve\">\n    <value> te enviou um vídeo</value>\n  </data>\n  <data name=\"Mute1Hour\" xml:space=\"preserve\">\n    <value>Silenciar por 1 hora</value>\n  </data>\n  <data name=\"PHONE_CALL_MISSED\" xml:space=\"preserve\">\n    <value>Você perdeu uma chamada de {0}</value>\n  </data>\n  <data name=\"PHONE_CALL_REQUEST\" xml:space=\"preserve\">\n    <value>{0} está te ligando!</value>\n  </data>\n  <data name=\"PINNED_AUDIO\" xml:space=\"preserve\">\n    <value>fixou uma mensagem de voz</value>\n  </data>\n  <data name=\"PINNED_CONTACT\" xml:space=\"preserve\">\n    <value>fixou um contato</value>\n  </data>\n  <data name=\"PINNED_DOC\" xml:space=\"preserve\">\n    <value>fixou um arquivo</value>\n  </data>\n  <data name=\"PINNED_GAME\" xml:space=\"preserve\">\n    <value>fixou um jogo</value>\n  </data>\n  <data name=\"PINNED_GEO\" xml:space=\"preserve\">\n    <value>fixou um mapa</value>\n  </data>\n  <data name=\"PINNED_GIF\" xml:space=\"preserve\">\n    <value>fixou um GIF</value>\n  </data>\n  <data name=\"PINNED_INVOICE\" xml:space=\"preserve\">\n    <value>fixou uma fatura</value>\n  </data>\n  <data name=\"PINNED_NOTEXT\" xml:space=\"preserve\">\n    <value>fixou uma mensagem</value>\n  </data>\n  <data name=\"PINNED_PHOTO\" xml:space=\"preserve\">\n    <value>fixou uma foto</value>\n  </data>\n  <data name=\"PINNED_STICKER\" xml:space=\"preserve\">\n    <value>fixou um sticker</value>\n  </data>\n  <data name=\"PINNED_TEXT\" xml:space=\"preserve\">\n    <value>fixou \"{1}\"</value>\n  </data>\n  <data name=\"PINNED_VIDEO\" xml:space=\"preserve\">\n    <value>fixou um vídeo</value>\n  </data>\n  <data name=\"Reply\" xml:space=\"preserve\">\n    <value>Responder</value>\n  </data>\n  <data name=\"TypReply\" xml:space=\"preserve\">\n    <value>Escrever uma resposta</value>\n  </data>\n</root>\n"
  },
  {
    "path": "TelegramClient.Tasks/Resources/ru/Resources.resw",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"AUTH_REGION\" xml:space=\"preserve\">\r\n    <value>New login from unrecognized device {0}, location: {1}</value>\r\n  </data>\r\n  <data name=\"AUTH_UNKNOWN\" xml:space=\"preserve\">\r\n    <value>New login from unrecognized device {0}</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_AUDIO\" xml:space=\"preserve\">\r\n    <value>posted a voice message</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_CONTACT\" xml:space=\"preserve\">\r\n    <value>posted a contact</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_DOC\" xml:space=\"preserve\">\r\n    <value>posted a document</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_FWDS\" xml:space=\"preserve\">\r\n    <value>posted {1} forwarded messages</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_GAME\" xml:space=\"preserve\">\r\n    <value>invited you to play {1}</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_GEO\" xml:space=\"preserve\">\r\n    <value>posted a map</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_GIF\" xml:space=\"preserve\">\r\n    <value>posted a GIF</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_NOTEXT\" xml:space=\"preserve\">\r\n    <value>posted a message</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_PHOTO\" xml:space=\"preserve\">\r\n    <value>posted a photo</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_STICKER\" xml:space=\"preserve\">\r\n    <value>posted a sticker</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_TEXT\" xml:space=\"preserve\">\r\n    <value>{1}</value>\r\n  </data>\r\n  <data name=\"CHANNEL_MESSAGE_VIDEO\" xml:space=\"preserve\">\r\n    <value>posted a video</value>\r\n  </data>\r\n  <data name=\"CHAT_ADD_MEMBER\" xml:space=\"preserve\">\r\n    <value>{0} invited {2} to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_ADD_YOU\" xml:space=\"preserve\">\r\n    <value>{0} invited you to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_CREATED\" xml:space=\"preserve\">\r\n    <value>{0} invited you to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_DELETE_MEMBER\" xml:space=\"preserve\">\r\n    <value>{0} kicked {2} from the group</value>\r\n  </data>\r\n  <data name=\"CHAT_DELETE_YOU\" xml:space=\"preserve\">\r\n    <value>{0} kicked you from the group</value>\r\n  </data>\r\n  <data name=\"CHAT_JOINED\" xml:space=\"preserve\">\r\n    <value>{0} has joined the group</value>\r\n  </data>\r\n  <data name=\"CHAT_LEFT\" xml:space=\"preserve\">\r\n    <value>{0} has left the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_AUDIO\" xml:space=\"preserve\">\r\n    <value>{0} sent a voice message to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_CONTACT\" xml:space=\"preserve\">\r\n    <value>{0} shared a contact in the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_DOC\" xml:space=\"preserve\">\r\n    <value>{0} sent a document to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_FWDS\" xml:space=\"preserve\">\r\n    <value>{0} forwarded {2} messages to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_GAME\" xml:space=\"preserve\">\r\n    <value>{0} invited the group to play {2}</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_GEO\" xml:space=\"preserve\">\r\n    <value>{0} sent a map to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_GIF\" xml:space=\"preserve\">\r\n    <value>{0} sent a GIF to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_INVOICE\" xml:space=\"preserve\">\r\n    <value>{0} sent an invoice for {2}</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_NOTEXT\" xml:space=\"preserve\">\r\n    <value>{0} sent a message to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_PHOTO\" xml:space=\"preserve\">\r\n    <value>{0} sent a photo to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_STICKER\" xml:space=\"preserve\">\r\n    <value>{0} sent a sticker to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_TEXT\" xml:space=\"preserve\">\r\n    <value>{0}: {2}</value>\r\n  </data>\r\n  <data name=\"CHAT_MESSAGE_VIDEO\" xml:space=\"preserve\">\r\n    <value>{0} sent a video to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_PHOTO_EDITED\" xml:space=\"preserve\">\r\n    <value>{0} edited the group's photo</value>\r\n  </data>\r\n  <data name=\"CHAT_RETURNED\" xml:space=\"preserve\">\r\n    <value>{0} has returned to the group</value>\r\n  </data>\r\n  <data name=\"CHAT_TITLE_EDITED\" xml:space=\"preserve\">\r\n    <value>{0} edited the group's name</value>\r\n  </data>\r\n  <data name=\"CONTACT_JOINED\" xml:space=\"preserve\">\r\n    <value>{0} joined the App!</value>\r\n  </data>\r\n  <data name=\"CONTACT_PHOTO\" xml:space=\"preserve\">\r\n    <value>updated profile photo</value>\r\n  </data>\r\n  <data name=\"DC_UPDATE\" xml:space=\"preserve\">\r\n    <value>Open this notification to update app settings</value>\r\n  </data>\r\n  <data name=\"Disable\" xml:space=\"preserve\">\r\n    <value>Disable</value>\r\n  </data>\r\n  <data name=\"ENCRYPTED_MESSAGE\" xml:space=\"preserve\">\r\n    <value>You have a new message</value>\r\n  </data>\r\n  <data name=\"ENCRYPTION_ACCEPT\" xml:space=\"preserve\">\r\n    <value>You have a new message</value>\r\n  </data>\r\n  <data name=\"ENCRYPTION_REQUEST\" xml:space=\"preserve\">\r\n    <value>You have a new message</value>\r\n  </data>\r\n  <data name=\"GEOCHAT_CHECKIN\" xml:space=\"preserve\">\r\n    <value>{0} has checked-in</value>\r\n  </data>\r\n  <data name=\"LOCKED_MESSAGE\" xml:space=\"preserve\">\r\n    <value>You have a new message</value>\r\n  </data>\r\n  <data name=\"MESSAGE_AUDIO\" xml:space=\"preserve\">\r\n    <value>sent you a voice message</value>\r\n  </data>\r\n  <data name=\"MESSAGE_CONTACT\" xml:space=\"preserve\">\r\n    <value>shared a contact with you</value>\r\n  </data>\r\n  <data name=\"MESSAGE_DOC\" xml:space=\"preserve\">\r\n    <value>sent you a document</value>\r\n  </data>\r\n  <data name=\"MESSAGE_FWDS\" xml:space=\"preserve\">\r\n    <value>forwarded you {1} messages</value>\r\n  </data>\r\n  <data name=\"MESSAGE_GAME\" xml:space=\"preserve\">\r\n    <value>invited you to play {1}</value>\r\n  </data>\r\n  <data name=\"MESSAGE_GEO\" xml:space=\"preserve\">\r\n    <value>sent you a map</value>\r\n  </data>\r\n  <data name=\"MESSAGE_GIF\" xml:space=\"preserve\">\r\n    <value>sent you a GIF</value>\r\n  </data>\r\n  <data name=\"MESSAGE_INVOICE\" xml:space=\"preserve\">\r\n    <value>sent you an invoice for {1}</value>\r\n  </data>\r\n  <data name=\"MESSAGE_NOTEXT\" xml:space=\"preserve\">\r\n    <value>sent you a message</value>\r\n  </data>\r\n  <data name=\"MESSAGE_PHOTO\" xml:space=\"preserve\">\r\n    <value>sent you a photo</value>\r\n  </data>\r\n  <data name=\"MESSAGE_STICKER\" xml:space=\"preserve\">\r\n    <value>sent you a sticker</value>\r\n  </data>\r\n  <data name=\"MESSAGE_TEXT\" xml:space=\"preserve\">\r\n    <value>{1}</value>\r\n  </data>\r\n  <data name=\"MESSAGE_VIDEO\" xml:space=\"preserve\">\r\n    <value>sent you a video</value>\r\n  </data>\r\n  <data name=\"Mute1Hour\" xml:space=\"preserve\">\r\n    <value>Mute for 1 hour</value>\r\n  </data>\r\n  <data name=\"PHONE_CALL_MISSED\" xml:space=\"preserve\">\r\n    <value>You missed a call from {0}</value>\r\n  </data>\r\n  <data name=\"PHONE_CALL_REQUEST\" xml:space=\"preserve\">\r\n    <value>{0} is calling you!</value>\r\n  </data>\r\n  <data name=\"PINNED_AUDIO\" xml:space=\"preserve\">\r\n    <value>pinned a voice message</value>\r\n  </data>\r\n  <data name=\"PINNED_CONTACT\" xml:space=\"preserve\">\r\n    <value>pinned a contact</value>\r\n  </data>\r\n  <data name=\"PINNED_DOC\" xml:space=\"preserve\">\r\n    <value>pinned a file</value>\r\n  </data>\r\n  <data name=\"PINNED_GAME\" xml:space=\"preserve\">\r\n    <value>pinned a game</value>\r\n  </data>\r\n  <data name=\"PINNED_GEO\" xml:space=\"preserve\">\r\n    <value>pinned a map</value>\r\n  </data>\r\n  <data name=\"PINNED_GIF\" xml:space=\"preserve\">\r\n    <value>pinned a GIF</value>\r\n  </data>\r\n  <data name=\"PINNED_INVOICE\" xml:space=\"preserve\">\r\n    <value>pinned an invoice</value>\r\n  </data>\r\n  <data name=\"PINNED_NOTEXT\" xml:space=\"preserve\">\r\n    <value>pinned a message</value>\r\n  </data>\r\n  <data name=\"PINNED_PHOTO\" xml:space=\"preserve\">\r\n    <value>pinned a photo</value>\r\n  </data>\r\n  <data name=\"PINNED_STICKER\" xml:space=\"preserve\">\r\n    <value>pinned a sticker</value>\r\n  </data>\r\n  <data name=\"PINNED_TEXT\" xml:space=\"preserve\">\r\n    <value>pinned \"{1}\"</value>\r\n  </data>\r\n  <data name=\"PINNED_VIDEO\" xml:space=\"preserve\">\r\n    <value>pinned a video</value>\r\n  </data>\r\n  <data name=\"Reply\" xml:space=\"preserve\">\r\n    <value>Reply</value>\r\n  </data>\r\n  <data name=\"TypReply\" xml:space=\"preserve\">\r\n    <value>Type a reply</value>\r\n  </data>\r\n</root>"
  },
  {
    "path": "TelegramClient.Tasks/TelegramClient.Tasks.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>8.0.30703</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{997BD0C4-68E8-4495-904A-EB798B166832}</ProjectGuid>\r\n    <OutputType>winmdobj</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>TelegramClient.Tasks</RootNamespace>\r\n    <DefaultLanguage>en</DefaultLanguage>\r\n    <SupportedCultures>en;de;es;it;nl;pt;</SupportedCultures>\r\n    <AssemblyName>TelegramClient.Tasks</AssemblyName>\r\n    <TargetPlatformVersion>8.1</TargetPlatformVersion>\r\n    <MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>\r\n    <FileAlignment>512</FileAlignment>\r\n    <ProjectTypeGuids>{76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|ARM'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\ARM\\Debug\\</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;NETFX_CORE;WINDOWS_PHONE_APP;</DefineConstants>\r\n    <NoWarn>;2008</NoWarn>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>ARM</PlatformTarget>\r\n    <UseVSHostingProcess>false</UseVSHostingProcess>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <Prefer32Bit>true</Prefer32Bit>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|ARM'\">\r\n    <OutputPath>bin\\ARM\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP;</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoWarn>;2008</NoWarn>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>ARM</PlatformTarget>\r\n    <UseVSHostingProcess>false</UseVSHostingProcess>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <Prefer32Bit>true</Prefer32Bit>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x86'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\x86\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>\r\n    <NoWarn>;2008</NoWarn>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>x86</PlatformTarget>\r\n    <UseVSHostingProcess>false</UseVSHostingProcess>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <Prefer32Bit>true</Prefer32Bit>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x86'\">\r\n    <OutputPath>bin\\x86\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoWarn>;2008</NoWarn>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>x86</PlatformTarget>\r\n    <UseVSHostingProcess>false</UseVSHostingProcess>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <Prefer32Bit>true</Prefer32Bit>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->\r\n    <ProjectReference Include=\"..\\Telegram.Api.PCL\\Telegram.Api.PCL.csproj\">\r\n      <Project>{de897f51-af1f-48fe-9dbb-6b308f9740d1}</Project>\r\n      <Name>Telegram.Api.PCL</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"BackgroundDifferenceLoader.cs\" />\r\n    <Compile Include=\"InteractiveNotificationsBackgroundTask.cs\" />\r\n    <Compile Include=\"PushNotificationsBackgroundTask.cs\" />\r\n    <Compile Include=\"MessageSchedulerBackgroundTask.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"PushUtils.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <PRIResource Include=\"Resources\\en\\Resources.resw\" />\r\n    <PRIResource Include=\"Resources\\de\\Resources.resw\">\r\n      <SubType>Designer</SubType>\r\n    </PRIResource>\r\n    <PRIResource Include=\"Resources\\es\\Resources.resw\">\r\n      <SubType>Designer</SubType>\r\n    </PRIResource>\r\n    <PRIResource Include=\"Resources\\it\\Resources.resw\">\r\n      <SubType>Designer</SubType>\r\n    </PRIResource>\r\n    <PRIResource Include=\"Resources\\nl\\Resources.resw\">\r\n      <SubType>Designer</SubType>\r\n    </PRIResource>\r\n    <PRIResource Include=\"Resources\\pt\\Resources.resw\">\r\n      <SubType>Designer</SubType>\r\n    </PRIResource>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <PRIResource Include=\"Resources\\ru\\Resources.resw\" />\r\n  </ItemGroup>\r\n  <PropertyGroup Condition=\" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0' \">\r\n    <VisualStudioVersion>12.0</VisualStudioVersion>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(TargetPlatformIdentifier)' == '' \">\r\n    <TargetPlatformIdentifier>WindowsPhoneApp</TargetPlatformIdentifier>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\WindowsXaml\\v$(VisualStudioVersion)\\Microsoft.Windows.UI.Xaml.CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n</Project>"
  },
  {
    "path": "TelegramClient.WP8/Behaviors/InfiniteScrollingBehavior.cs",
    "content": "﻿using System.Windows.Interactivity;\r\nusing Microsoft.Phone.Controls;\r\n\r\nnamespace TelegramClient.Behaviors\r\n{\r\n    public class IncrementalLoadingTrigger : TriggerBase<LongListSelector>\r\n    {\r\n        private int _knob = 1;\r\n\r\n        public int Knob\r\n        {\r\n            get { return _knob; }\r\n            set { _knob = value; }\r\n        }\r\n\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n            AssociatedObject.ItemRealized += OnItemRealized;\r\n        }\r\n\r\n        private void OnItemRealized(object sender, ItemRealizationEventArgs e)\r\n        {\r\n            var longListSelector = sender as LongListSelector;\r\n            if (longListSelector == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var item = e.Container.Content;\r\n            var items = longListSelector.ItemsSource;\r\n            var index = items.IndexOf(item);\r\n\r\n            //if (items.Count >= Knob\r\n            //    && e.Container.Content.Equals(longListSelector.ItemsSource[longListSelector.ItemsSource.Count - Knob]))\r\n            //{\r\n            //    InvokeActions(null);\r\n            //}\r\n\r\n            if (items.Count - index <= Knob)\r\n            {\r\n                InvokeActions(null);\r\n            }\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            base.OnDetaching();\r\n            AssociatedObject.ItemRealized -= OnItemRealized;\r\n        }\r\n    }\r\n\r\n    public class InfiniteScrollingBehavior : Behavior<LongListSelector>\r\n    {\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/DragEventArgs.cs",
    "content": "﻿using System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal class DragEventArgs : GestureEventArgs\r\n    {\r\n        public DragEventArgs()\r\n        {\r\n        }\r\n\r\n        public DragEventArgs(InputDeltaArgs args)\r\n        {\r\n            if (args != null)\r\n            {\r\n                CumulativeDistance = args.CumulativeTranslation;\r\n                DeltaDistance = args.DeltaTranslation;\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n        public bool IsTouchComplete { get; private set; }\r\n\r\n        public Point DeltaDistance { get; private set; }\r\n\r\n        public Point CumulativeDistance { get; internal set; }\r\n\r\n        public void MarkAsFinalTouchManipulation()\r\n        {\r\n            IsTouchComplete = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/FlickEventArgs.cs",
    "content": "﻿namespace TelegramClient.Controls.StartView\r\n{\r\n    internal class FlickEventArgs : GestureEventArgs\r\n    {\r\n        public double Angle { get; internal set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/GestureEventArgs.cs",
    "content": "﻿namespace TelegramClient.Controls.StartView\r\n{\r\n    internal class GestureEventArgs : System.EventArgs\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/GestureHelper.cs",
    "content": "﻿using System;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing TelegramClient.Controls.StartView;\r\nusing DragEventArgs = TelegramClient.Controls.StartView.DragEventArgs;\r\n\r\ninternal abstract class GestureHelper\r\n{\r\n    private readonly Size DeadZoneInPixels = new Size(12, 12);\r\n\r\n    private DragLock _dragLock;\r\n    private bool _dragging;\r\n    private WeakReference _gestureSource;\r\n    private Point _gestureOrigin;\r\n\r\n    protected GestureHelper(UIElement target, bool shouldHandleAllDrags)\r\n    {\r\n        Target = target;\r\n        ShouldHandleAllDrags = shouldHandleAllDrags;\r\n    }\r\n\r\n    [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n    protected bool ShouldHandleAllDrags { get; private set; }\r\n\r\n    protected UIElement Target { get; private set; }\r\n\r\n    public event EventHandler<GestureEventArgs> GestureStart;\r\n\r\n    public event EventHandler<FlickEventArgs> Flick;\r\n\r\n    public event EventHandler<EventArgs> GestureEnd;\r\n\r\n    public event EventHandler<DragEventArgs> HorizontalDrag;\r\n\r\n    public event EventHandler<DragEventArgs> VerticalDrag;\r\n\r\n    [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n    public static GestureHelper Create(UIElement target)\r\n    {\r\n        return GestureHelper.Create(target, true);\r\n    }\r\n\r\n    public static GestureHelper Create(UIElement target, bool shouldHandleAllDrags)\r\n    {\r\n        GestureHelper gestureHelper = new ManipulationGestureHelper(target, shouldHandleAllDrags);\r\n        gestureHelper.Start();\r\n        return gestureHelper;\r\n    }\r\n\r\n    protected abstract void HookEvents();\r\n\r\n    public void Start()\r\n    {\r\n        HookEvents();\r\n    }\r\n\r\n    protected void NotifyDown(InputBaseArgs args)\r\n    {\r\n        GestureEventArgs e = new GestureEventArgs();\r\n        _gestureSource = new WeakReference(args.Source);\r\n        _gestureOrigin = args.Origin;\r\n        _dragLock = DragLock.Unset;\r\n        _dragging = false;\r\n        RaiseGestureStart(e);\r\n    }\r\n\r\n    protected void NotifyMove(InputDeltaArgs args)\r\n    {\r\n        if (Math.Abs(args.CumulativeTranslation.X) > DeadZoneInPixels.Width || Math.Abs(args.CumulativeTranslation.Y) > DeadZoneInPixels.Height)\r\n        {\r\n            if (!_dragging)\r\n            {\r\n                ReleaseMouseCaptureAtGestureOrigin();\r\n            }\r\n\r\n            _dragging = true;\r\n\r\n            if (_dragLock == DragLock.Unset)\r\n            {\r\n                double angle = GestureHelper.AngleFromVector(args.CumulativeTranslation.X, args.CumulativeTranslation.Y) % 180;\r\n                _dragLock = angle <= 45 || angle >= 135 ? DragLock.Horizontal : DragLock.Vertical;\r\n            }\r\n        }\r\n\r\n        if (_dragging)\r\n        {\r\n            RaiseDragEvents(args);\r\n        }\r\n    }\r\n\r\n    private void ReleaseMouseCaptureAtGestureOrigin()\r\n    {\r\n        if (_gestureSource != null)\r\n        {\r\n            FrameworkElement gestureSource = _gestureSource.Target as FrameworkElement;\r\n            if (gestureSource != null)\r\n            {\r\n                foreach (UIElement element in VisualTreeHelper.FindElementsInHostCoordinates(\r\n                        gestureSource.TransformToVisual(null).Transform(_gestureOrigin), Application.Current.RootVisual))\r\n                {\r\n                    element.ReleaseMouseCapture();\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    protected void NotifyUp(InputCompletedArgs args)\r\n    {\r\n        EventArgs e = EventArgs.Empty;\r\n        _dragLock = DragLock.Unset;\r\n        _dragging = false;\r\n\r\n        if (args.IsInertial)\r\n        {\r\n            double angle = GestureHelper.AngleFromVector(args.FinalLinearVelocity.X, args.FinalLinearVelocity.Y);\r\n            if (angle <= 45 || angle >= 315)\r\n            {\r\n                angle = 0;\r\n            }\r\n            else if (angle >= 135 && angle <= 225)\r\n            {\r\n                angle = 180;\r\n            }\r\n\r\n            FlickEventArgs flickEventArgs = new FlickEventArgs\r\n            {\r\n                Angle = angle\r\n            };\r\n            ReleaseMouseCaptureAtGestureOrigin();\r\n            RaiseFlick(flickEventArgs);\r\n        }\r\n        else if (args.TotalTranslation.X != 0 || args.TotalTranslation.Y != 0)\r\n        {\r\n            DragEventArgs dragEventArgs = new DragEventArgs\r\n            {\r\n                CumulativeDistance = args.TotalTranslation\r\n            };\r\n            dragEventArgs.MarkAsFinalTouchManipulation();\r\n            e = dragEventArgs;\r\n        }\r\n\r\n        RaiseGestureEnd(e);\r\n    }\r\n\r\n    private void RaiseGestureStart(GestureEventArgs args)\r\n    {\r\n        SafeRaise.Raise<GestureEventArgs>(GestureStart, this, args);\r\n    }\r\n\r\n    private void RaiseFlick(FlickEventArgs args)\r\n    {\r\n        SafeRaise.Raise<FlickEventArgs>(Flick, this, args);\r\n    }\r\n\r\n    private void RaiseGestureEnd(EventArgs args)\r\n    {\r\n        SafeRaise.Raise<EventArgs>(GestureEnd, this, args);\r\n    }\r\n\r\n    private void RaiseDragEvents(InputDeltaArgs args)\r\n    {\r\n        DragEventArgs e = new DragEventArgs(args);\r\n        if (args.DeltaTranslation.X != 0 && _dragLock == DragLock.Horizontal)\r\n        {\r\n            RaiseHorizontalDrag(e);\r\n        }\r\n        else if (args.DeltaTranslation.Y != 0 && _dragLock == DragLock.Vertical)\r\n        {\r\n            RaiseVerticalDrag(e);\r\n        }\r\n    }\r\n\r\n    private void RaiseHorizontalDrag(DragEventArgs args)\r\n    {\r\n        SafeRaise.Raise<DragEventArgs>(HorizontalDrag, this, args);\r\n    }\r\n\r\n    private void RaiseVerticalDrag(DragEventArgs args)\r\n    {\r\n        SafeRaise.Raise<DragEventArgs>(VerticalDrag, this, args);\r\n    }\r\n\r\n    private static double AngleFromVector(double x, double y)\r\n    {\r\n        double num = Math.Atan2(y, x);\r\n        if (num < 0)\r\n        {\r\n            num = 2 * Math.PI + num;\r\n        }\r\n        return num * 360 / (2 * Math.PI);\r\n    }\r\n\r\n    private enum DragLock\r\n    {\r\n        Unset,\r\n        Free,\r\n        Vertical,\r\n        Horizontal,\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/InputBaseArgs.cs",
    "content": "﻿using System.Windows;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal class InputBaseArgs\r\n    {\r\n        protected InputBaseArgs(UIElement source, Point origin)\r\n        {\r\n            Source = source;\r\n            Origin = origin;\r\n        }\r\n\r\n        public UIElement Source { get; private set; }\r\n\r\n        public Point Origin { get; private set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/InputCompletedArgs.cs",
    "content": "﻿using System.Windows;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal abstract class InputCompletedArgs : InputBaseArgs\r\n    {\r\n        protected InputCompletedArgs(UIElement source, Point origin)\r\n            : base(source, origin)\r\n        {\r\n        }\r\n\r\n        public abstract Point TotalTranslation { get; }\r\n\r\n        public abstract Point FinalLinearVelocity { get; }\r\n\r\n        public abstract bool IsInertial { get; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/InputDeltaArgs.cs",
    "content": "﻿using System.Windows;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal abstract class InputDeltaArgs : InputBaseArgs\r\n    {\r\n        protected InputDeltaArgs(UIElement source, Point origin)\r\n            : base(source, origin)\r\n        {\r\n        }\r\n\r\n        public abstract Point DeltaTranslation { get; }\r\n\r\n        public abstract Point CumulativeTranslation { get; }\r\n\r\n        public abstract Point ExpansionVelocity { get; }\r\n\r\n        public abstract Point LinearVelocity { get; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/ManipulationGestureHelper.cs",
    "content": "﻿using System.Windows;\r\nusing System.Windows.Input;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal class ManipulationGestureHelper : GestureHelper\r\n    {\r\n        public ManipulationGestureHelper(UIElement target, bool shouldHandleAllDrags)\r\n            : base(target, shouldHandleAllDrags)\r\n        {\r\n        }\r\n\r\n        protected override void HookEvents()\r\n        {\r\n            Target.ManipulationStarted += Target_ManipulationStarted;\r\n            Target.ManipulationDelta += Target_ManipulationDelta;\r\n            Target.ManipulationCompleted += Target_ManipulationCompleted;\r\n        }\r\n\r\n        private void Target_ManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            NotifyDown(new ManipulationBaseArgs(e));\r\n        }\r\n\r\n        private void Target_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            NotifyMove(new ManipulationDeltaArgs(e));\r\n        }\r\n\r\n        private void Target_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            NotifyUp(new ManiulationCompletedArgs(e));\r\n        }\r\n\r\n        private class ManipulationBaseArgs : InputBaseArgs\r\n        {\r\n            public ManipulationBaseArgs(ManipulationStartedEventArgs args)\r\n                : base(args.ManipulationContainer, args.ManipulationOrigin)\r\n            {\r\n            }\r\n        }\r\n\r\n        private class ManipulationDeltaArgs : InputDeltaArgs\r\n        {\r\n            private ManipulationDeltaEventArgs _args;\r\n\r\n            public ManipulationDeltaArgs(ManipulationDeltaEventArgs args)\r\n                : base(args.ManipulationContainer, args.ManipulationOrigin)\r\n            {\r\n                _args = args;\r\n            }\r\n\r\n\r\n            public override Point DeltaTranslation\r\n            {\r\n                get\r\n                {\r\n                    return _args.DeltaManipulation.Translation;\r\n                }\r\n            }\r\n\r\n            public override Point CumulativeTranslation\r\n            {\r\n                get\r\n                {\r\n                    return _args.CumulativeManipulation.Translation;\r\n                }\r\n            }\r\n\r\n            public override Point ExpansionVelocity\r\n            {\r\n                get\r\n                {\r\n                    return _args.Velocities.ExpansionVelocity;\r\n                }\r\n            }\r\n\r\n            public override Point LinearVelocity\r\n            {\r\n                get\r\n                {\r\n                    return _args.Velocities.LinearVelocity;\r\n                }\r\n            }\r\n        }\r\n\r\n        private class ManiulationCompletedArgs : InputCompletedArgs\r\n        {\r\n            private ManipulationCompletedEventArgs _args;\r\n\r\n            public ManiulationCompletedArgs(ManipulationCompletedEventArgs args)\r\n                : base(args.ManipulationContainer, args.ManipulationOrigin)\r\n            {\r\n                _args = args;\r\n            }\r\n\r\n            public override Point TotalTranslation\r\n            {\r\n                get\r\n                {\r\n                    return _args.TotalManipulation.Translation;\r\n                }\r\n            }\r\n\r\n            public override Point FinalLinearVelocity\r\n            {\r\n                get\r\n                {\r\n                    if (_args.FinalVelocities != null)\r\n                        return _args.FinalVelocities.LinearVelocity;\r\n                    else\r\n                        return new Point(0, 0);\r\n                }\r\n            }\r\n\r\n            public override bool IsInertial\r\n            {\r\n                get\r\n                {\r\n                    return _args.IsInertial;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/SafeRaise.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    /// <summary>\r\n    /// A helper class for raising events safely.\r\n    /// </summary>\r\n    internal static class SafeRaise\r\n    {\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping existing implementation.\")]\r\n        public static void Raise(EventHandler eventToRaise, object sender)\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, System.EventArgs.Empty);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        public static void Raise(EventHandler<System.EventArgs> eventToRaise, object sender)\r\n        {\r\n            Raise(eventToRaise, sender, System.EventArgs.Empty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event args type.</typeparam>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"args\">The event args.</param>\r\n        public static void Raise<T>(EventHandler<T> eventToRaise, object sender, T args) where T : System.EventArgs\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, args);\r\n            }\r\n        }\r\n\r\n        // Lazy event args creation example:\r\n        //\r\n        // public class MyEventArgs : EventArgs\r\n        // {\r\n        //     public MyEventArgs(int x) { X = x; }\r\n        //     public int X { get; set; }\r\n        // }\r\n        //\r\n        // event EventHandler<MyEventArgs> Foo;\r\n        //\r\n        // public void Bar()\r\n        // {\r\n        //     int y = 2;\r\n        //     Raise(Foo, null, () => { return new MyEventArgs(y); });\r\n        // }\r\n\r\n        /// <summary>\r\n        /// This is a method that returns event args, used for lazy creation.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event type.</typeparam>\r\n        /// <returns></returns>\r\n        public delegate T GetEventArgs<T>() where T : System.EventArgs;\r\n\r\n        /// <summary>\r\n        /// Raise an event in a thread-safe manner, with the required null check. Lazily creates event args.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event args type.</typeparam>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"getEventArgs\">The delegate to return the event args if needed.</param>\r\n        public static void Raise<T>(EventHandler<T> eventToRaise, object sender, GetEventArgs<T> getEventArgs) where T : System.EventArgs\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, getEventArgs());\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/StartView.cs",
    "content": "﻿using System;\r\nusing System.Collections.Specialized;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Controls.Primitives;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    /// <summary>\r\n    /// Creates a panoramic view of items that can be panned side-to-side, similar to the Start screen.\r\n    /// </summary>\r\n    [TemplatePart(Name = PanningTransformName, Type = typeof(TranslateTransform))]\r\n    [StyleTypedProperty(Property = \"ItemContainerStyle\", StyleTargetType = typeof(StartViewItem))]\r\n    public class StartView : TemplatedItemsControl<StartViewItem>, ISupportInitialize\r\n    {\r\n        internal static readonly Duration Immediately = TimeSpan.Zero;\r\n        private static readonly Duration DefaultDuration = TimeSpan.FromMilliseconds(300);\r\n        private static readonly Duration FlickDuration = DefaultDuration;\r\n        private static readonly Duration SnapDuration = DefaultDuration;\r\n        private static readonly Duration PanDuration = TimeSpan.FromMilliseconds(300);\r\n\r\n        private const string PanningTransformName = \"PanningTransform\";\r\n\r\n        private readonly IEasingFunction _easingFunction = new ExponentialEase { Exponent = 5 };\r\n\r\n        private int _cumulativeDragDelta;\r\n        private int _effectiveDragDelta;\r\n        private int _flickDirection;\r\n        private int _targetOffset;\r\n        private bool _dragged;\r\n        private bool _adjustSelectedRequested;\r\n        private bool _suppressSelectionChangedEvent;\r\n        private bool _loaded;\r\n        private TransformAnimator _animator;\r\n        private bool _suppressAnimation;\r\n        private bool _ignorePropertyChange;\r\n        private bool _isDesignTime;\r\n        private InitializingData _initializingData;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the StartView class.\r\n        /// </summary>\r\n        public StartView()\r\n        {\r\n            DefaultStyleKey = typeof(StartView);\r\n\r\n            GestureHelper gestureHelper = GestureHelper.Create(this, true);\r\n            gestureHelper.GestureStart += (sender, args) => GestureStart();\r\n            gestureHelper.HorizontalDrag += (sender, args) => HorizontalDrag(args);\r\n            gestureHelper.Flick += (sender, args) => Flick(args);\r\n            gestureHelper.GestureEnd += (sender, args) => GestureEnd();\r\n\r\n            SizeChanged += OnSizeChanged;\r\n\r\n            Loaded += OnLoaded;\r\n            Unloaded += OnUnloaded;\r\n\r\n            _isDesignTime = DesignerProperties.IsInDesignTool;\r\n        }\r\n\r\n        internal StartViewPanel Panel { get; set; }\r\n\r\n        internal int ItemsWidth { get; set; }\r\n\r\n        internal int ViewportWidth { get; private set; }\r\n\r\n        internal int ViewportHeight { get; private set; }\r\n\r\n        private TranslateTransform PanningTransform { get; set; }\r\n\r\n        private int ActualOffset\r\n        {\r\n            get { return PanningTransform == null ? 0 : (int)PanningTransform.X; }\r\n        }\r\n\r\n        private int SelectionOffset\r\n        {\r\n            get\r\n            {\r\n                StartViewItem container = GetContainer(SelectedItem);\r\n                if (container != null)\r\n                {\r\n                    return -container.StartPosition;\r\n                }\r\n                return 0;\r\n            }\r\n        }\r\n\r\n        private bool IsInit\r\n        {\r\n            get { return _initializingData != null; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedItem dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedItemProperty = DependencyProperty.Register(\r\n            \"SelectedItem\",\r\n            typeof(object),\r\n            typeof(StartView),\r\n            new PropertyMetadata(null, (d, e) => ((StartView)d).OnSelectedItemChanged(e)));\r\n\r\n        /// <summary>\r\n        /// Gets the selected item.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Returns <see cref=\"T:System.Object\"/>.\r\n        /// </returns>\r\n        public object SelectedItem\r\n        {\r\n            get { return GetValue(SelectedItemProperty); }\r\n            set { SetValue(SelectedItemProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedIndex dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedIndexProperty = DependencyProperty.Register(\r\n            \"SelectedIndex\",\r\n            typeof(int),\r\n            typeof(StartView),\r\n            new PropertyMetadata(-1, (d, e) => ((StartView)d).OnSelectedIndexChanged(e)));\r\n\r\n        /// <summary>\r\n        /// Gets the selected index.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Returns <see cref=\"T:System.Int32\"/>.\r\n        /// </returns>\r\n        public int SelectedIndex\r\n        {\r\n            get { return (int)GetValue(SelectedIndexProperty); }\r\n            set { SetValue(SelectedIndexProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Event that is invoked when selection changes.\r\n        /// </summary>\r\n        public event EventHandler<SelectionChangedEventArgs> SelectionChanged;\r\n\r\n        /// <summary>\r\n        /// Handles the application of a new Template.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            PanningTransform = GetTemplateChild(PanningTransformName) as TranslateTransform;\r\n\r\n            _animator = PanningTransform != null ? new TransformAnimator(PanningTransform) : null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the measurement of the control.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Desired size.\r\n        /// </returns>\r\n        /// <param name=\"availableSize\">Available size.</param>\r\n        protected override Size MeasureOverride(Size availableSize)\r\n        {\r\n            if (Application.Current.Host.Content.ActualWidth > 0)\r\n            {\r\n                ViewportWidth = !double.IsInfinity(availableSize.Width) ? (int)availableSize.Width : (int)Application.Current.Host.Content.ActualWidth;\r\n                ViewportHeight = !double.IsInfinity(availableSize.Height) ? (int)availableSize.Height : (int)Application.Current.Host.Content.ActualHeight;\r\n            }\r\n            else\r\n            {\r\n                ViewportWidth = (int)Math.Min(availableSize.Width, 480);\r\n                ViewportHeight = (int)Math.Min(availableSize.Height, 800);\r\n            }\r\n\r\n            base.MeasureOverride(new Size(double.PositiveInfinity, ViewportHeight));\r\n\r\n            if (double.IsInfinity(availableSize.Width))\r\n            {\r\n                availableSize.Width = ViewportWidth;\r\n            }\r\n\r\n            if (double.IsInfinity(availableSize.Height))\r\n            {\r\n                availableSize.Height = ViewportHeight;\r\n            }\r\n\r\n            return availableSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the arrange pass for the control.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Render size.\r\n        /// </returns>\r\n        /// <param name=\"finalSize\">Final size.</param>\r\n        protected override Size ArrangeOverride(Size finalSize)\r\n        {\r\n            finalSize.Width = DesiredSize.Width;\r\n            base.ArrangeOverride(finalSize);\r\n            return finalSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// When the items have changed, we need to adjust the selection.\r\n        /// </summary>\r\n        /// <param name=\"e\">The changed item.</param>\r\n        protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)\r\n        {\r\n            base.OnItemsChanged(e);\r\n\r\n            if (!IsInit)\r\n            {\r\n                RequestAdjustSelection();\r\n            }\r\n        }\r\n\r\n        internal void RequestAdjustSelection()\r\n        {\r\n            if (_adjustSelectedRequested)\r\n            {\r\n                return;\r\n            }\r\n\r\n            LayoutUpdated += LayoutUpdatedAdjustSelection;\r\n            _adjustSelectedRequested = true;\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            _loaded = true;\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            _loaded = false;\r\n        }\r\n\r\n        private void LayoutUpdatedAdjustSelection(object sender, System.EventArgs e)\r\n        {\r\n            _adjustSelectedRequested = false;\r\n            LayoutUpdated -= LayoutUpdatedAdjustSelection;\r\n            AdjustSelection();\r\n        }\r\n\r\n        private void AdjustSelection()\r\n        {\r\n            if (_isDesignTime)\r\n            {\r\n                if (_loaded)\r\n                {\r\n                    _targetOffset = 0;\r\n                    GoTo(_targetOffset, Immediately);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                object oldSelectedItem = SelectedItem;\r\n                object newSelectedItem = null;\r\n\r\n                if (Panel != null && Panel.VisibleChildren.Count > 0)\r\n                {\r\n                    if (oldSelectedItem == null)\r\n                    {\r\n                        newSelectedItem = GetItem(Panel.VisibleChildren[0]);\r\n                    }\r\n                    else\r\n                    {\r\n                        StartViewItem oldContainer = GetContainer(oldSelectedItem);\r\n                        newSelectedItem = oldContainer == null || !Panel.VisibleChildren.Contains(oldContainer) ? GetItem(Panel.VisibleChildren[0]) : oldSelectedItem;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    _targetOffset = 0;\r\n                    GoTo(_targetOffset, Immediately);\r\n                }\r\n\r\n                SetSelectionInternal(newSelectedItem);\r\n\r\n                StartViewItem newContainer = GetContainer(newSelectedItem);\r\n                if (newContainer != null)\r\n                {\r\n                    _targetOffset = -newContainer.StartPosition;\r\n                    GoTo(_targetOffset, Immediately);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void GestureStart()\r\n        {\r\n            _targetOffset = ActualOffset;\r\n            _flickDirection = 0;\r\n            _cumulativeDragDelta = 0;\r\n            _effectiveDragDelta = 0;\r\n            _dragged = false;\r\n        }\r\n\r\n        private void HorizontalDrag(DragEventArgs args)\r\n        {\r\n            if (_flickDirection == 0)\r\n            {\r\n                _cumulativeDragDelta = (int)args.CumulativeDistance.X;\r\n                _effectiveDragDelta += (int)args.DeltaDistance.X;\r\n                _targetOffset += (int)args.DeltaDistance.X;\r\n                if (Math.Abs(_cumulativeDragDelta) <= ViewportWidth)\r\n                {\r\n                    if (_effectiveDragDelta > 0 && SelectedIndex == 0 || _effectiveDragDelta < 0 && SelectedIndex == Items.Count - 1)\r\n                    {\r\n                        _effectiveDragDelta = 0;\r\n                        _targetOffset = ActualOffset;\r\n                        return;\r\n                    }\r\n\r\n                    _dragged = true;\r\n                    GoTo(_targetOffset, PanDuration);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Flick(FlickEventArgs e)\r\n        {\r\n            if (e.Angle == 180)\r\n            {\r\n                _flickDirection = -1;\r\n            }\r\n            else if (e.Angle == 0)\r\n            {\r\n                _flickDirection = 1;\r\n            }\r\n        }\r\n\r\n        private void GestureEnd()\r\n        {\r\n            if (_flickDirection == 0)\r\n            {\r\n                if (_dragged)\r\n                {\r\n                    int snapTo;\r\n                    int newDirection;\r\n                    StartViewItem newSelection;\r\n\r\n                    Panel.GetSnapOffset(_targetOffset, ViewportWidth, Math.Sign(_cumulativeDragDelta), out snapTo, out newDirection, out newSelection);\r\n\r\n                    object newSelectedItem = GetItem(newSelection);\r\n                    if (newSelectedItem != null)\r\n                    {\r\n                        _suppressAnimation = true;\r\n                        SelectedItem = newSelectedItem;\r\n                        _suppressAnimation = false;\r\n                    }\r\n\r\n                    GoTo(snapTo, SnapDuration);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                ProcessFlick();\r\n            }\r\n        }\r\n\r\n        private void ProcessFlick()\r\n        {\r\n            if (_flickDirection != 0)\r\n            {\r\n                StartViewPanel.ItemStop previous;\r\n                StartViewPanel.ItemStop current;\r\n                StartViewPanel.ItemStop next;\r\n\r\n                Panel.GetStops(SelectionOffset, ItemsWidth, out previous, out current, out next);\r\n\r\n                if (previous == current && current == next && next == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                if (_flickDirection < 0 && next == null || _flickDirection > 0 && previous == null)\r\n                {\r\n                    if (current != null)\r\n                    {\r\n                        GoTo(-current.Position, Immediately);\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                _targetOffset = _flickDirection < 0 ? -next.Position : -previous.Position;\r\n\r\n                _suppressAnimation = true;\r\n                SelectedItem = GetItem(_flickDirection < 0 ? next.Item : previous.Item);\r\n                _suppressAnimation = false;\r\n\r\n                GoTo(_targetOffset, FlickDuration);\r\n            }\r\n        }\r\n\r\n        private void GoTo(int offset, Duration duration, Action completionAction)\r\n        {\r\n            if (_animator != null)\r\n            {\r\n                _animator.GoTo(offset, duration, _easingFunction, completionAction);\r\n            }\r\n        }\r\n\r\n        private void GoTo(int offset)\r\n        {\r\n            GoTo(offset, null);\r\n        }\r\n\r\n        private void GoTo(int offset, Action completionAction)\r\n        {\r\n            int delta = Math.Abs(ActualOffset - offset);\r\n            GoTo(offset, TimeSpan.FromMilliseconds(delta * 2), completionAction);\r\n        }\r\n\r\n        private void GoTo(int offset, Duration duration)\r\n        {\r\n            GoTo(offset, duration, null);\r\n        }\r\n\r\n        private void SetSelectionInternal(object selectedItem)\r\n        {\r\n            _suppressSelectionChangedEvent = true;\r\n            SelectedItem = selectedItem;\r\n            _suppressSelectionChangedEvent = false;\r\n        }\r\n\r\n        private void OnSelectedItemChanged(DependencyPropertyChangedEventArgs args)\r\n        {\r\n            if (IsInit)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_ignorePropertyChange)\r\n            {\r\n                _ignorePropertyChange = false;\r\n                return;\r\n            }\r\n\r\n            if (!_isDesignTime)\r\n            {\r\n                if (args.NewValue == null && Items.Count > 0)\r\n                {\r\n                    _ignorePropertyChange = true;\r\n                    SelectedItem = args.OldValue;\r\n                    throw new ArgumentException(\"SelectedItem\");\r\n                }\r\n                else if (args.NewValue != null && !Items.Contains(args.NewValue))\r\n                {\r\n                    _ignorePropertyChange = true;\r\n                    SelectedItem = args.OldValue;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            SelectedIndex = Items.IndexOf(args.NewValue);\r\n\r\n            if (_suppressSelectionChangedEvent)\r\n            {\r\n                return;\r\n            }\r\n\r\n            SafeRaise.Raise<SelectionChangedEventArgs>(SelectionChanged, this, (() =>\r\n            {\r\n                object[] unselected;\r\n                if (args.OldValue != null)\r\n                {\r\n                    unselected = new object[1] { args.OldValue };\r\n                }\r\n                else\r\n                {\r\n                    unselected = new object[0];\r\n                }\r\n\r\n                object[] selected;\r\n                if (args.NewValue != null)\r\n                {\r\n                    selected = new object[1] { args.NewValue };\r\n                }\r\n                else\r\n                {\r\n                    selected = new object[0];\r\n                }\r\n\r\n                return new SelectionChangedEventArgs(unselected, selected);\r\n            }));\r\n\r\n            if (!_suppressAnimation)\r\n            {\r\n                GoTo(SelectionOffset, _loaded ? DefaultDuration : Immediately);\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2208:InstantiateArgumentExceptionsCorrectly\")]\r\n        private void OnSelectedIndexChanged(DependencyPropertyChangedEventArgs args)\r\n        {\r\n            if (IsInit)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_ignorePropertyChange)\r\n            {\r\n                _ignorePropertyChange = false;\r\n                return;\r\n            }\r\n\r\n            int newSelectedIndex = (int)args.NewValue;\r\n            int itemsCount = Items.Count;\r\n\r\n            if (newSelectedIndex >= 0 && newSelectedIndex < itemsCount)\r\n            {\r\n                SelectedItem = Items[newSelectedIndex];\r\n            }\r\n            else if (newSelectedIndex == -1 && itemsCount == 0)\r\n            {\r\n                SelectedItem = null;\r\n            }\r\n            else if (!_isDesignTime)\r\n            {\r\n                _ignorePropertyChange = true;\r\n                SelectedIndex = (int)args.OldValue;\r\n                throw new ArgumentOutOfRangeException(\"SelectedIndex\");\r\n            }\r\n        }\r\n\r\n        private void OnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            ViewportWidth = (int)e.NewSize.Width;\r\n            ViewportHeight = (int)e.NewSize.Height;\r\n            ItemsWidth = (int)Panel.ActualWidth;\r\n        }\r\n\r\n        void ISupportInitialize.BeginInit()\r\n        {\r\n            _initializingData = new InitializingData\r\n            {\r\n                InitialItem = SelectedItem,\r\n                InitialIndex = SelectedIndex\r\n            };\r\n        }\r\n\r\n        void ISupportInitialize.EndInit()\r\n        {\r\n            if (_initializingData == null)\r\n            {\r\n                throw new InvalidOperationException();\r\n            }\r\n\r\n            int selectedIndex = SelectedIndex;\r\n            object selectedItem = SelectedItem;\r\n\r\n            if (_initializingData.InitialIndex != selectedIndex)\r\n            {\r\n                SelectedIndex = _initializingData.InitialIndex;\r\n                _initializingData = null;\r\n                SelectedIndex = selectedIndex;\r\n            }\r\n            else if (!ReferenceEquals(_initializingData.InitialItem, selectedItem))\r\n            {\r\n                SelectedItem = _initializingData.InitialItem;\r\n                _initializingData = null;\r\n                SelectedItem = selectedItem;\r\n            }\r\n\r\n            _initializingData = null;\r\n        }\r\n\r\n        private class InitializingData\r\n        {\r\n            public int InitialIndex;\r\n            public object InitialItem;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/StartViewItem.cs",
    "content": "﻿using System.Windows.Controls;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    /// <summary>\r\n    /// Represents an item in a StartView control.\r\n    /// </summary>\r\n    public class StartViewItem : ContentControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the StartViewItem class.\r\n        /// </summary>\r\n        public StartViewItem()\r\n        {\r\n            DefaultStyleKey = typeof(StartViewItem);\r\n        }\r\n\r\n        internal int StartPosition { get; set; }\r\n\r\n        internal int ItemWidth { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/StartViewPanel.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    /// <summary>\r\n    /// Implements a custom Panel for the StartView control.\r\n    /// </summary>\r\n    public class StartViewPanel : Panel\r\n    {\r\n        private const int SnapThresholdDivisor = 2;\r\n\r\n        private readonly List<StartViewItem> _visibleChildren = new List<StartViewItem>();\r\n        private readonly List<ItemStop> _itemStops = new List<ItemStop>();\r\n        private StartView _owner;\r\n        private StartViewItem _selectedItem;\r\n\r\n        internal IList<StartViewItem> VisibleChildren\r\n        {\r\n            get { return _visibleChildren; }\r\n        }\r\n\r\n        private StartView Owner\r\n        {\r\n            get { return _owner; }\r\n            set\r\n            {\r\n                if (_owner != value)\r\n                {\r\n                    if (_owner != null)\r\n                    {\r\n                        _owner.Panel = null;\r\n                    }\r\n\r\n                    _owner = value;\r\n\r\n                    if (_owner != null)\r\n                    {\r\n                        _owner.Panel = this;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the StartViewPanel class.\r\n        /// </summary>\r\n        public StartViewPanel()\r\n        {\r\n            SizeChanged += OnSizeChanged;\r\n            Unloaded += OnUnloaded;\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            _owner = null;\r\n        }\r\n\r\n        private void OnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            Owner.ItemsWidth = (int)e.NewSize.Width;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the measure pass for the control.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Desired size.\r\n        /// </returns>\r\n        /// <param name=\"availableSize\">Available size.</param>\r\n        protected override Size MeasureOverride(Size availableSize)\r\n        {\r\n            if (_owner == null)\r\n            {\r\n                FindOwner();\r\n            }\r\n\r\n            Size desiredSize = new Size(0, availableSize.Height);\r\n\r\n            int childWidth = Owner.ViewportWidth;\r\n            int childHeight = (int)Math.Min(availableSize.Height, Owner.ViewportHeight);\r\n            Size childSize = new Size(childWidth, childHeight);\r\n\r\n            _visibleChildren.Clear();\r\n\r\n            foreach (StartViewItem child in Children)\r\n            {\r\n                if (child.Visibility == Visibility.Visible)\r\n                {\r\n                    _visibleChildren.Add(child);\r\n                    child.Measure(childSize);\r\n                    desiredSize.Width += childWidth;\r\n                }\r\n            }\r\n\r\n            return desiredSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the arrange pass for the control.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Render size.\r\n        /// </returns>\r\n        /// <param name=\"finalSize\">Final size.</param>\r\n        protected override Size ArrangeOverride(Size finalSize)\r\n        {\r\n            _itemStops.Clear();\r\n            double x = 0;\r\n            Rect finalRect = new Rect(0, 0, 0, finalSize.Height);\r\n\r\n            for (int index = 0; index < _visibleChildren.Count; ++index)\r\n            {\r\n                StartViewItem child = _visibleChildren[index];\r\n                finalRect.X = child.StartPosition = (int)x;\r\n                _itemStops.Add(new ItemStop(child, child.StartPosition));\r\n                finalRect.Width = Owner.ViewportWidth;\r\n                child.ItemWidth = (int)finalRect.Width;\r\n                child.Arrange(finalRect);\r\n                x += finalRect.Width;\r\n            }\r\n\r\n            Owner.RequestAdjustSelection();\r\n\r\n            return finalSize;\r\n        }\r\n\r\n        private void GetItemsInView(int offset, int viewportWidth, out int leftIndex, out int leftInView, out int centerIndex, out int rightIndex, out int rightInView)\r\n        {\r\n            leftIndex = leftInView = centerIndex = rightIndex = rightInView = -1;\r\n\r\n            int count = VisibleChildren.Count;\r\n            if (count == 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            for (int index = 0; index < count; ++index)\r\n            {\r\n                StartViewItem child = _visibleChildren[index];\r\n\r\n                int leftOffset = child.StartPosition + offset;\r\n                int rightOffset = leftOffset + child.ItemWidth - 1;\r\n\r\n                if (leftOffset <= 0 && rightOffset >= 0)\r\n                {\r\n                    leftIndex = index;\r\n                    leftInView = Math.Min(viewportWidth, child.ItemWidth + leftOffset);\r\n                }\r\n\r\n                if (leftOffset < viewportWidth && rightOffset >= viewportWidth)\r\n                {\r\n                    rightIndex = index;\r\n                    rightInView = Math.Min(viewportWidth, viewportWidth - leftOffset);\r\n                }\r\n\r\n                if (leftOffset > 0 && rightOffset < viewportWidth)\r\n                {\r\n                    centerIndex = index;\r\n                }\r\n\r\n                if (index == 0 && leftInView == -1)\r\n                {\r\n                    leftInView = leftOffset;\r\n                }\r\n\r\n                if (index == count - 1 && rightInView == -1)\r\n                {\r\n                    rightInView = viewportWidth - rightOffset - 1;\r\n                }\r\n            }\r\n        }\r\n\r\n        internal void GetStops(int offset, int totalWidth, out ItemStop previous, out ItemStop current, out ItemStop next)\r\n        {\r\n            next = current = previous = null;\r\n\r\n            if (VisibleChildren.Count == 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            int nextIndex = -1;\r\n            int currentIndex = -1;\r\n            int previousIndex = -1;\r\n\r\n            int position = -offset % totalWidth;\r\n            int itemStopIndex = 0;\r\n\r\n            foreach (ItemStop itemStop in _itemStops)\r\n            {\r\n                if (itemStop.Position < position)\r\n                {\r\n                    previousIndex = itemStopIndex;\r\n                }\r\n                else if (itemStop.Position > position)\r\n                {\r\n                    nextIndex = itemStopIndex;\r\n                    break;\r\n                }\r\n                else if (itemStop.Position == position)\r\n                {\r\n                    currentIndex = itemStopIndex;\r\n                }\r\n\r\n                ++itemStopIndex;\r\n            }\r\n\r\n            if (previousIndex != -1)\r\n            {\r\n                previous = _itemStops[previousIndex];\r\n            }\r\n\r\n            if (currentIndex != -1)\r\n            {\r\n                current = _itemStops[currentIndex];\r\n            }\r\n\r\n            if (nextIndex != -1)\r\n            {\r\n                next = _itemStops[nextIndex];\r\n            }\r\n        }\r\n\r\n        internal void GetSnapOffset(int offset, int viewportWidth, int direction, out int snapTo, out int newDirection, out StartViewItem newSelection)\r\n        {\r\n            int snapThreshold = viewportWidth / SnapThresholdDivisor;\r\n\r\n            snapTo = offset;\r\n            newDirection = direction;\r\n            newSelection = _selectedItem;\r\n\r\n            if (VisibleChildren.Count == 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            foreach (ItemStop itemStop in _itemStops)\r\n            {\r\n                if (itemStop.Position == -offset)\r\n                {\r\n                    newSelection = itemStop.Item;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            int leftIndex;\r\n            int leftInView;\r\n            int centerIndex;\r\n            int rightIndex;\r\n            int rightInView;\r\n\r\n            GetItemsInView(offset, viewportWidth, out leftIndex, out leftInView, out centerIndex, out rightIndex, out rightInView);\r\n\r\n            if (leftIndex == rightIndex && leftIndex != -1)\r\n            {\r\n                newSelection = _selectedItem = _visibleChildren[leftIndex];\r\n            }\r\n            else\r\n            {\r\n                if (leftIndex == -1)\r\n                {\r\n                    leftIndex = _visibleChildren.Count - 1;\r\n                }\r\n\r\n                if (rightIndex == -1)\r\n                {\r\n                    rightIndex = 0;\r\n                }\r\n\r\n                int index;\r\n                if (direction < 0)\r\n                {\r\n                    if (rightInView > snapThreshold)\r\n                    {\r\n                        index = GetBestIndex(centerIndex, rightIndex, leftIndex);\r\n                        newDirection = -1;\r\n                    }\r\n                    else\r\n                    {\r\n                        index = GetBestIndex(leftIndex, centerIndex, rightIndex);\r\n                        newDirection = 1;\r\n                    }\r\n                }\r\n                else if (direction > 0)\r\n                {\r\n                    if (leftInView > snapThreshold)\r\n                    {\r\n                        index = StartViewPanel.GetBestIndex(leftIndex, centerIndex, rightIndex);\r\n                        newDirection = 1;\r\n                    }\r\n                    else\r\n                    {\r\n                        index = StartViewPanel.GetBestIndex(centerIndex, rightIndex, leftIndex);\r\n                        newDirection = -1;\r\n                    }\r\n                }\r\n                else if (centerIndex != -1)\r\n                {\r\n                    index = centerIndex;\r\n                    newDirection = -1;\r\n                }\r\n                else if (leftInView > rightInView)\r\n                {\r\n                    index = leftIndex;\r\n                    newDirection = -1;\r\n                }\r\n                else\r\n                {\r\n                    index = rightIndex;\r\n                    newDirection = 1;\r\n                }\r\n\r\n                _selectedItem = _visibleChildren[index];\r\n                snapTo = -_selectedItem.StartPosition;\r\n                newSelection = _selectedItem;\r\n            }\r\n        }\r\n\r\n        private static int GetBestIndex(int n0, int n1, int n2)\r\n        {\r\n            if (n0 >= 0)\r\n            {\r\n                return n0;\r\n            }\r\n\r\n            if (n1 >= 0)\r\n            {\r\n                return n1;\r\n            }\r\n\r\n            if (n2 >= 0)\r\n            {\r\n                return n2;\r\n            }\r\n\r\n            throw new InvalidOperationException(\"No best index.\");\r\n        }\r\n\r\n        private void FindOwner()\r\n        {\r\n            FrameworkElement frameworkElement = this;\r\n            StartView owner;\r\n            do\r\n            {\r\n                frameworkElement = (FrameworkElement)VisualTreeHelper.GetParent(frameworkElement);\r\n                owner = frameworkElement as StartView;\r\n            }\r\n            while (frameworkElement != null && owner == null);\r\n            Owner = owner;\r\n        }\r\n\r\n        internal class ItemStop\r\n        {\r\n            public ItemStop(StartViewItem item, int position)\r\n            {\r\n                Item = item;\r\n                Position = position;\r\n            }\r\n\r\n            public int Position { get; private set; }\r\n\r\n            public StartViewItem Item { get; private set; }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Controls/StartView/TransformAnimator.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    /// <summary>\r\n    /// A utility for animating a horizontal translation value.\r\n    /// </summary>\r\n    internal sealed class TransformAnimator\r\n    {\r\n        /// <summary>\r\n        /// Single static instance of a PropertyPath with string path \"X\".\r\n        /// </summary>\r\n        private static readonly PropertyPath TranslateXPropertyPath = new PropertyPath(\"X\");\r\n\r\n        /// <summary>\r\n        /// The Storyboard instance for the animation.\r\n        /// </summary>\r\n        private readonly Storyboard _sbRunning = new Storyboard();\r\n\r\n        /// <summary>\r\n        /// The DoubleAnimation instance for a running animation.\r\n        /// </summary>\r\n        private readonly DoubleAnimation _daRunning = new DoubleAnimation();\r\n\r\n        /// <summary>\r\n        /// The target translate transform instance.\r\n        /// </summary>\r\n        private TranslateTransform _transform;\r\n\r\n        /// <summary>\r\n        /// A one-time action for the current GoTo statement only. Cleared if\r\n        /// GoTo is called before the action runs.\r\n        /// </summary>\r\n        private Action _oneTimeAction;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the TransformAnimator class.\r\n        /// </summary>\r\n        /// <param name=\"translateTransform\">TranslateTransform instance.</param>\r\n        public TransformAnimator(TranslateTransform translateTransform)\r\n        {\r\n            Debug.Assert(translateTransform != null);\r\n            _transform = translateTransform;\r\n\r\n            _sbRunning.Completed += OnCompleted;\r\n            _sbRunning.Children.Add(_daRunning);\r\n            Storyboard.SetTarget(_daRunning, _transform);\r\n            Storyboard.SetTargetProperty(_daRunning, TranslateXPropertyPath);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the current offset value from the translate transform object.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public double CurrentOffset\r\n        {\r\n            get { return _transform.X; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Targets a new horizontal offset over a specified duration.\r\n        /// </summary>\r\n        /// <param name=\"targetOffset\">The target offset value.</param>\r\n        /// <param name=\"duration\">The duration for the animation.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public void GoTo(double targetOffset, Duration duration)\r\n        {\r\n            GoTo(targetOffset, duration, null, null);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public void GoTo(double targetOffset, Duration duration, Action completionAction)\r\n        {\r\n            GoTo(targetOffset, duration, null, completionAction);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public void GoTo(double targetOffset, Duration duration, IEasingFunction easingFunction)\r\n        {\r\n            GoTo(targetOffset, duration, easingFunction, null);\r\n        }\r\n\r\n        public void GoTo(double targetOffset, Duration duration, IEasingFunction easingFunction, Action completionAction)\r\n        {\r\n            _daRunning.To = targetOffset;\r\n            _daRunning.Duration = duration;\r\n            _daRunning.EasingFunction = easingFunction;\r\n            _sbRunning.Begin();\r\n            _sbRunning.SeekAlignedToLastTick(TimeSpan.Zero);\r\n            _oneTimeAction = completionAction;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the easing function of the double animation.\r\n        /// </summary>\r\n        /// <param name=\"ease\">The easing funciton, if any, to use.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping existing implementation.\")]\r\n        public void UpdateEasingFunction(IEasingFunction ease)\r\n        {\r\n            if (_daRunning != null && _daRunning.EasingFunction != ease)\r\n            {\r\n                _daRunning.EasingFunction = ease;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Immediately updates the duration of the running double animation.\r\n        /// </summary>\r\n        /// <param name=\"duration\">The new duration value to use.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public void UpdateDuration(Duration duration)\r\n        {\r\n            if (_daRunning != null)\r\n            {\r\n                _daRunning.Duration = duration;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles animation completed\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            // Make sure the action is called when the animation is Stopped\r\n            // The complete event is triggered when it changes to Filling\r\n            // This is also called before the state has been changed so the state\r\n            // is still Active when switching to Filling\r\n            Action action = _oneTimeAction;\r\n            if (action != null && _sbRunning.GetCurrentState() != ClockState.Active)\r\n            {\r\n                _oneTimeAction = null;\r\n                action();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Ensures and creates if needed the animator for an element. Will also\r\n        /// verify that a translate transform is present.\r\n        /// </summary>\r\n        /// <param name=\"targetElement\">The target element.</param>\r\n        /// <param name=\"animator\">The animator reference.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public static void EnsureAnimator(FrameworkElement targetElement, ref TransformAnimator animator)\r\n        {\r\n            if (animator == null)\r\n            {\r\n                TranslateTransform transform = TransformAnimator.GetTranslateTransform(targetElement);\r\n                if (transform != null)\r\n                {\r\n                    animator = new TransformAnimator(transform);\r\n                }\r\n            }\r\n            if (animator == null)\r\n            {\r\n                throw new InvalidOperationException(\"The animation system could not be prepared for the target element.\");\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Find a translate transform for the container or create one.\r\n        /// </summary>\r\n        /// <param name=\"container\">The container.</param>\r\n        /// <returns>Returns the TranslateTransform reference.</returns>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public static TranslateTransform GetTranslateTransform(UIElement container)\r\n        {\r\n            if (container == null)\r\n            {\r\n                throw new ArgumentNullException(\"container\");\r\n            }\r\n\r\n            TranslateTransform transform = container.RenderTransform as TranslateTransform;\r\n            if (transform == null)\r\n            {\r\n                if (container.RenderTransform == null)\r\n                {\r\n                    transform = new TranslateTransform();\r\n                    container.RenderTransform = transform;\r\n                }\r\n                else if (container.RenderTransform is TransformGroup)\r\n                {\r\n                    TransformGroup g = container.RenderTransform as TransformGroup;\r\n                    transform = (from t in g.Children\r\n                                 where t is TranslateTransform\r\n                                 select (TranslateTransform)t).FirstOrDefault();\r\n                    if (transform == null)\r\n                    {\r\n                        transform = new TranslateTransform();\r\n                        g.Children.Add(transform);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    TransformGroup tg = new TransformGroup();\r\n                    var existing = container.RenderTransform;\r\n                    container.RenderTransform = null;\r\n                    tg.Children.Add(existing);\r\n                    transform = new TranslateTransform();\r\n                    tg.Children.Add(transform);\r\n                    container.RenderTransform = tg;\r\n                }\r\n            }\r\n            return transform;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP8/LongListSelectorEx.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Runtime.InteropServices;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\n\r\nnamespace TelegramClient\r\n{\r\n    public class LongListSelectorEx : LongListSelector\r\n    {\r\n        public static readonly DependencyProperty IsSelectionEnabledProperty = DependencyProperty.Register(\r\n            \"IsSelectionEnabled\", typeof (bool), typeof (LongListSelectorEx), new PropertyMetadata(OnIsSelectionEnabledChanged));\r\n\r\n        private static void OnIsSelectionEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var lls = (LongListSelectorEx) d;\r\n            \r\n            var projection = lls.Projection as PlaneProjection;\r\n            var upDown = projection != null && projection.RotationZ == 180.0;\r\n            var x = upDown ? -48.0 : 48.0;\r\n            \r\n            var viewport = lls.Viewport;\r\n            if ((bool)e.NewValue)\r\n            {\r\n                var storyboard = new Storyboard();\r\n                if (!(viewport.RenderTransform is CompositeTransform))\r\n                {\r\n                    viewport.RenderTransform = new CompositeTransform();\r\n                }\r\n\r\n                if (viewport.CacheMode == null)\r\n                {\r\n                    viewport.CacheMode = new BitmapCache();\r\n                }\r\n\r\n                var translateXAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n                translateXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.55), Value = x, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } });\r\n                Storyboard.SetTarget(translateXAnimation, viewport);\r\n                Storyboard.SetTargetProperty(translateXAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n                storyboard.Children.Add(translateXAnimation);\r\n\r\n                //storyboard.Begin();\r\n                Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n            }\r\n            else\r\n            {\r\n                var storyboard = new Storyboard();\r\n                if (!(viewport.RenderTransform is CompositeTransform))\r\n                {\r\n                    viewport.RenderTransform = new CompositeTransform();\r\n                }\r\n\r\n                var translateXAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = x });\r\n                translateXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.55), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } });\r\n                Storyboard.SetTarget(translateXAnimation, viewport);\r\n                Storyboard.SetTargetProperty(translateXAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n                storyboard.Children.Add(translateXAnimation);\r\n\r\n                //storyboard.Begin();\r\n                Deployment.Current.Dispatcher.BeginInvoke(() => storyboard.Begin());\r\n            }\r\n        }\r\n\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return (bool) GetValue(IsSelectionEnabledProperty); }\r\n            set { SetValue(IsSelectionEnabledProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty IsFirstSliceLoadedProperty = DependencyProperty.Register(\r\n            \"IsFirstSliceLoaded\", typeof(bool), typeof(LongListSelectorEx), new PropertyMetadata(true));\r\n\r\n        public bool IsFirstSliceLoaded\r\n        {\r\n            get { return (bool)GetValue(IsFirstSliceLoadedProperty); }\r\n            set { SetValue(IsFirstSliceLoadedProperty, value); }\r\n        }\r\n\r\n        public int MeasureOverrideCount { get; set; }\r\n\r\n        protected override Size MeasureOverride(Size availableSize)\r\n        {\r\n            try\r\n            {\r\n                //System.Diagnostics.Debug.WriteLine(\"LLS MeasureOverride \" + MeasureOverrideCount);\r\n                MeasureOverrideCount++;\r\n                return base.MeasureOverride(availableSize);\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                //System.Diagnostics.Debug.WriteLine(\"LLS MeasureOverride catch \" + MeasureOverrideCount);\r\n\r\n#if DEBUG\r\n                MessageBox.Show(\"LongListSelectorEx.MeasureOverride ex \" + e);\r\n#endif\r\n\r\n                return base.MeasureOverride(availableSize);\r\n            }\r\n        }\r\n\r\n        private int _knob = 1;\r\n\r\n        public int Knob\r\n        {\r\n            get { return _knob; }\r\n            set { _knob = value; }\r\n        }\r\n\r\n        public ScrollBar VerticalScrollBar { get; protected set; }\r\n\r\n        public ViewportControl Viewport { get; protected set; }\r\n\r\n        public LongListSelectorEx()\r\n        {\r\n            ItemRealized += OnItemRealized;\r\n        }\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            Viewport = (ViewportControl)GetTemplateChild(\"ViewportControl\");\r\n\r\n            \r\n\r\n            Viewport.ViewportChanged += OnViewportChanged;\r\n            Viewport.ManipulationStateChanged += OnManipulationStateChanged;\r\n\r\n            base.OnApplyTemplate();\r\n        }\r\n\r\n        public static T GetChildOfType<T>(DependencyObject depObj) where T : DependencyObject\r\n        {\r\n            if (depObj == null) return null;\r\n\r\n            for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)\r\n            {\r\n                var child = VisualTreeHelper.GetChild(depObj, i);\r\n\r\n                var result = (child as T) ?? GetChildOfType<T>(child);\r\n                if (result != null) return result;\r\n            }\r\n            return null;\r\n        }\r\n\r\n        public static IEnumerable<T> GetChildrenOfType<T>(DependencyObject depObj) where T : DependencyObject\r\n        {\r\n            if (depObj == null) yield break;\r\n\r\n            for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)\r\n            {\r\n                var child = VisualTreeHelper.GetChild(depObj, i) as T;\r\n\r\n                if (child != null) yield return child;\r\n            }\r\n        }\r\n\r\n        private void OnManipulationStateChanged(object sender, ManipulationStateChangedEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private double _fromBegin;\r\n\r\n        private void OnViewportChanged(object sender, ViewportChangedEventArgs e)\r\n        {\r\n            if (Viewport.Bounds.Y - Viewport.Viewport.Y == 0.0)\r\n            {\r\n                RaiseBegin();\r\n            }\r\n\r\n            var fromBegin = Viewport.Viewport.Y - Viewport.Bounds.Y;\r\n            if (fromBegin >= 500.0 && _fromBegin < 500.0)\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(\"RaiseShowScrollButton\");\r\n                RaiseShowScrollButton();\r\n            }\r\n            _fromBegin = fromBegin;\r\n\r\n            if ((Viewport.Bounds.Height + Viewport.Bounds.Y) >= ActualHeight\r\n                && (Viewport.Bounds.Height + Viewport.Bounds.Y) == (Viewport.Viewport.Height + Viewport.Viewport.Y))\r\n            {\r\n                //Telegram.Api.Helpers.Execute.ShowDebugMessage(\"CloseToEnd ActualHeight=\" + ActualHeight + \" Height+Y=\" + (Viewport.Bounds.Height + Viewport.Bounds.Y));\r\n                RaiseCloseToEnd();\r\n            }\r\n\r\n            RaiseViewportChanged(e);\r\n            //System.Diagnostics.Debug.WriteLine(\"bounds={0} viewport={1}\", Viewport.Bounds, Viewport.Viewport);\r\n        }\r\n\r\n        public bool IsHoldingScrollingPosition\r\n        {\r\n            get { return ListHeader != null; }\r\n        }\r\n\r\n        public void HoldScrollingPosition()\r\n        {\r\n            ListHeader = null;\r\n        }\r\n\r\n        public void UnholdScrollingPosition()\r\n        {\r\n            ListHeader = new Border { Visibility = Visibility.Collapsed };\r\n        }\r\n\r\n        public void ScrollToItem(object item)\r\n        {\r\n            if (ItemsSource.Count > 0 && ItemsSource[0] == item)\r\n            {\r\n                if (ItemsSource[0] == item && Viewport.Bounds.Y == Viewport.Viewport.Y)\r\n                {\r\n                    //MessageBox.Show(\"ScrollToBottom optimization\");\r\n                    return;\r\n                }\r\n            }\r\n\r\n            ScrollTo(item);\r\n        }\r\n\r\n        public event EventHandler<ViewportChangedEventArgs> ViewportChanged;\r\n\r\n        protected virtual void RaiseViewportChanged(ViewportChangedEventArgs e)\r\n        {\r\n            var handler = ViewportChanged;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public event EventHandler ShowScrollButton;\r\n\r\n        protected virtual void RaiseShowScrollButton()\r\n        {\r\n            var handler = ShowScrollButton;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler CloseToEnd;\r\n\r\n        protected virtual void RaiseCloseToEnd()\r\n        {\r\n            var handler = CloseToEnd;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler CloseToBegin;\r\n\r\n        protected virtual void RaiseCloseToBegin()\r\n        {\r\n            var handler = CloseToBegin;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler Begin;\r\n\r\n        protected virtual void RaiseBegin()\r\n        {\r\n            var handler = Begin;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n\r\n        public static readonly DependencyProperty DownButtonVisibilityProperty = DependencyProperty.Register(\r\n            \"DownButtonVisibility\", typeof(Visibility), typeof(LongListSelectorEx), new PropertyMetadata(Visibility.Collapsed));\r\n\r\n        public Visibility DownButtonVisibility\r\n        {\r\n            get { return (Visibility)GetValue(DownButtonVisibilityProperty); }\r\n            set { SetValue(DownButtonVisibilityProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty PrevIndexProperty = DependencyProperty.Register(\r\n            \"PrevIndex\", typeof(int), typeof(LongListSelectorEx), new PropertyMetadata(default(int)));\r\n\r\n        public int PrevIndex\r\n        {\r\n            get { return (int)GetValue(PrevIndexProperty); }\r\n            set { SetValue(PrevIndexProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty IndexProperty = DependencyProperty.Register(\r\n            \"Index\", typeof(int), typeof(LongListSelectorEx), new PropertyMetadata(default(int)));\r\n\r\n        private Canvas _canvas;\r\n\r\n        public int Index\r\n        {\r\n            get { return (int)GetValue(IndexProperty); }\r\n            set { SetValue(IndexProperty, value); }\r\n        }\r\n\r\n        private bool _check;\r\n\r\n        private void OnItemRealized(object sender, ItemRealizationEventArgs e)\r\n        {\r\n            if (_check)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"OnItemRealized \" + InView(e.Container));\r\n            }\r\n            //MessageBox.Show(\"ItemRealized\");\r\n            //OnViewportChanged(sender, new ViewportChangedEventArgs());\r\n\r\n            var longListSelector = this;\r\n\r\n            var item = e.Container.Content;\r\n\r\n\r\n            var items = longListSelector.ItemsSource;\r\n            var index = items.IndexOf(item);\r\n\r\n            //if (items.Count >= Knob\r\n            //    && e.Container.Content.Equals(longListSelector.ItemsSource[longListSelector.ItemsSource.Count - Knob]))\r\n            //{\r\n            //    InvokeActions(null);\r\n            //}\r\n            if (index > 20\r\n                && IsFirstSliceLoaded\r\n                && PrevIndex > index)\r\n            {\r\n                DownButtonVisibility = Visibility.Visible;\r\n            }\r\n            else\r\n            {\r\n                DownButtonVisibility = Visibility.Collapsed;\r\n                //_prevIndex = 0;\r\n            }\r\n\r\n            PrevIndex = index;\r\n\r\n            if (items.Count - index <= Knob)\r\n            {\r\n                if (ManipulationState != ManipulationState.Idle)\r\n                {\r\n                    RaiseCloseToEnd();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (index <= Knob)\r\n            {\r\n                if (ManipulationState != ManipulationState.Idle)\r\n                {\r\n                    RaiseCloseToBegin();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (LayoutMode == LongListSelectorLayoutMode.List)\r\n            {\r\n                var message = e.Container.Content as TLMessageBase;\r\n                if (message == null) return;\r\n\r\n                if (!message._isAnimated)\r\n                {\r\n                    e.Container.Opacity = 1.0;\r\n                    return;\r\n                }\r\n\r\n                message._isAnimated = false;\r\n\r\n                if (Visibility == Visibility.Collapsed) return;\r\n\r\n                e.Container.Opacity = 0.0;\r\n\r\n                if (e.Container.Tag != null && (bool) e.Container.Tag)\r\n                {\r\n                    StartLoadingAnimation(e.Container);\r\n                    return;\r\n                }\r\n                e.Container.Loaded += OnContainerLoaded;\r\n                e.Container.Unloaded += OnContainerUnloaded;\r\n            }\r\n        }\r\n\r\n        private void OnContainerUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var container = (ContentPresenter)sender;\r\n            container.Tag = false;\r\n            container.Unloaded -= OnContainerUnloaded;\r\n        }\r\n\r\n        private void OnContainerLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var container = (ContentPresenter)sender;\r\n            container.Tag = true;\r\n            container.Loaded -= OnContainerLoaded;\r\n            \r\n            StartLoadingAnimation(container);\r\n        }\r\n\r\n        private void StartLoadingAnimation(ContentPresenter container)\r\n        {\r\n            var message = container.Content as TLMessageBase;\r\n            if (message!= null\r\n                && message.Index == 160952)\r\n            {\r\n                TLUtils.WriteLine(\"startAnimation\", LogSeverity.Error);\r\n            }\r\n\r\n            container.CacheMode = new BitmapCache();\r\n            var storyboard = new Storyboard();\r\n            var opacityAnimation = new DoubleAnimation { To = 1.0, Duration = TimeSpan.FromSeconds(1.0) };\r\n            Storyboard.SetTarget(opacityAnimation, container);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        public IList<ContentPresenter> GetItemsInView()\r\n        {\r\n            if (_canvas == null)\r\n            {\r\n                var contentPresenter = GetChildOfType<ContentPresenter>(Viewport);\r\n                var canvas = GetChildOfType<Canvas>(contentPresenter);\r\n                _canvas = GetChildOfType<Canvas>(canvas);\r\n            }\r\n\r\n            var items = new List<ContentPresenter>();\r\n            foreach (var item in GetChildrenOfType<ContentPresenter>(_canvas))\r\n            {\r\n                if (InView(item))items.Add(item);\r\n                //var itemViewModel = item.DataContext as ItemViewModel;\r\n                //if (itemViewModel != null)\r\n                //{\r\n                //    itemViewModel.IsSelected = isSelected;\r\n                //}\r\n                //Debug.WriteLine(Canvas.GetTop(item) + \" \" + item.ActualHeight + \" \" + item.DataContext);\r\n            }\r\n\r\n            return items;\r\n        }\r\n\r\n        private bool InView(ContentPresenter item)\r\n        {\r\n            var height = Viewport.Viewport.Height < ActualHeight ? ActualHeight : Viewport.Viewport.Height;\r\n            var top = Canvas.GetTop(item);\r\n            if (top >= (Viewport.Viewport.Y - item.ActualHeight / 3.0 * 2.0) && (top + item.ActualHeight <= Viewport.Viewport.Y + height + item.ActualHeight / 3.0 * 2.0))\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Properties/AppManifest.xml",
    "content": "﻿<Deployment xmlns=\"http://schemas.microsoft.com/client/2007/deployment\"\r\n        xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n>\r\n    <Deployment.Parts>\r\n    </Deployment.Parts>\r\n</Deployment>\r\n"
  },
  {
    "path": "TelegramClient.WP8/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"TelegramClient.WP8\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"TelegramClient.WP8\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"71105f98-f9d4-469f-a185-640c6024c9a0\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en\")]\r\n"
  },
  {
    "path": "TelegramClient.WP8/Properties/WMAppManifest.Private.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2012/deployment\" AppPlatformVersion=\"8.0\">\r\n  <DefaultLanguage xmlns=\"\" code=\"en\" />\r\n  <Languages xmlns=\"\">\r\n    <Language code=\"en\" />\r\n    <Language code=\"de\" />\r\n    <Language code=\"es\" />\r\n    <Language code=\"pt\" />\r\n    <Language code=\"nl\" />\r\n    <Language code=\"it\" />\r\n  </Languages>\r\n  <AppExtra AppPlatformVersion=\"8.0\" xmlns=\"\">\r\n    <Extra Name=\"SDOptOut\" />\r\n  </AppExtra>\r\n  <App xmlns=\"\" ProductID=\"{cee0f789-8059-4881-8883-347265c01f92}\" Title=\"Telegram Messenger\" RuntimeType=\"Silverlight\" Version=\"1.12.1.0\" Genre=\"apps.normal\" Author=\"Telegram Messenger LLC\" Description=\"Fast and secure messaging app\" Publisher=\"Telegram\" PublisherID=\"{a652821a-0986-4366-8fe7-f00379d89c9b}\">\r\n    <IconPath IsRelative=\"true\" IsResource=\"false\">ApplicationIcon210.png</IconPath>\r\n    <Capabilities>\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO_FULL\" />\r\n      <Capability Name=\"ID_CAP_IDENTITY_DEVICE\" />\r\n      <Capability Name=\"ID_CAP_LOCATION\" />\r\n      <Capability Name=\"ID_CAP_MICROPHONE\" />\r\n      <Capability Name=\"ID_CAP_NETWORKING\" />\r\n      <Capability Name=\"ID_CAP_PHONEDIALER\" />\r\n      <Capability Name=\"ID_CAP_PUSH_NOTIFICATION\" />\r\n      <Capability Name=\"ID_CAP_SENSORS\" />\r\n      <Capability Name=\"ID_CAP_WEBBROWSERCOMPONENT\" />\r\n      <Capability Name=\"ID_CAP_ISV_CAMERA\" />\r\n      <Capability Name=\"ID_CAP_CONTACTS\" />\r\n      <Capability Name=\"ID_CAP_APPOINTMENTS\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_AUDIO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PLAYBACK\" />\r\n    </Capabilities>\r\n    <Tasks>\r\n      <DefaultTask Name=\"_default\" NavigationPage=\"Views/ShellView.xaml\" ActivationPolicy=\"Resume\"/>\r\n      <ExtendedTask Name=\"BackgroundTask\">\r\n        <BackgroundServiceAgent Specifier=\"AudioPlayerAgent\" Name=\"TelegramClient.Player\" Source=\"TelegramClient.Player\" Type=\"TelegramClient.Player.AudioPlayer\" />\r\n        <!--<BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"TelegramClient.ScheduledTaskAgent\" Source=\"TelegramClient.ScheduledTaskAgent\" Type=\"TelegramClient.ScheduledTaskAgent.ScheduledAgent\" />-->\r\n      </ExtendedTask>\r\n    </Tasks>\r\n    <Tokens>\r\n      <PrimaryToken TokenID=\"TelegramClient.WP8Token\" TaskName=\"_default\">\r\n        <TemplateIconic>\r\n          <SmallImageURI IsRelative=\"true\" IsResource=\"false\">IconicSmall110.png</SmallImageURI>\r\n          <Count>0</Count>\r\n          <IconImageURI IsRelative=\"true\" IsResource=\"false\">IconicTileMedium202.png</IconImageURI>\r\n          <Title>Telegram</Title>\r\n          <Message></Message>\r\n          <BackgroundColor></BackgroundColor>\r\n          <HasLarge>true</HasLarge>\r\n          <LargeContent1></LargeContent1>\r\n          <LargeContent2></LargeContent2>\r\n          <LargeContent3></LargeContent3>\r\n          <DeviceLockImageURI IsRelative=\"true\" IsResource=\"false\">Images\\LockScreen\\Lockscreen.png</DeviceLockImageURI>\r\n        </TemplateIconic>\r\n      </PrimaryToken>\r\n    </Tokens>\r\n    <Extensions>\r\n      <Extension ExtensionName=\"Photos_Extra_Share\" ConsumerID=\"{5B04B775-356B-4AA0-AAF8-6491FFEA5632}\" TaskID=\"_default\" />\r\n      <Extension ExtensionName=\"LockScreen_Notification_IconCount\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n      <Extension ExtensionName=\"LockScreen_Notification_TextField\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n    </Extensions>\r\n    <ScreenResolutions>\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WVGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WXGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_HD720P\" />\r\n    </ScreenResolutions>\r\n  </App>\r\n</Deployment>"
  },
  {
    "path": "TelegramClient.WP8/Properties/WMAppManifest.Public.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2012/deployment\" AppPlatformVersion=\"8.0\">\r\n  <DefaultLanguage xmlns=\"\" code=\"en\" />\r\n  <Languages xmlns=\"\">\r\n    <Language code=\"en\" />\r\n    <Language code=\"de\" />\r\n    <Language code=\"es\" />\r\n    <Language code=\"pt\" />\r\n    <Language code=\"nl\" />\r\n    <Language code=\"it\" />\r\n  </Languages>\r\n  <AppExtra AppPlatformVersion=\"8.0\" xmlns=\"\">\r\n    <Extra Name=\"SDOptOut\" />\r\n  </AppExtra>\r\n  <App xmlns=\"\" ProductID=\"{cee0f789-8059-4881-8883-347265c01f93}\" Title=\"Telegram Messenger\" RuntimeType=\"Silverlight\" Version=\"1.12.1.0\" Genre=\"apps.normal\" Author=\"Telegram Messenger LLC\" Description=\"Fast and secure messaging app\" Publisher=\"Telegram\" PublisherID=\"{a652821a-0986-4366-8fe7-f00379d89c9b}\">\r\n    <IconPath IsRelative=\"true\" IsResource=\"false\">ApplicationIcon210.png</IconPath>\r\n    <Capabilities>\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO_FULL\" />\r\n      <Capability Name=\"ID_CAP_IDENTITY_DEVICE\" />\r\n      <Capability Name=\"ID_CAP_LOCATION\" />\r\n      <Capability Name=\"ID_CAP_MICROPHONE\" />\r\n      <Capability Name=\"ID_CAP_NETWORKING\" />\r\n      <Capability Name=\"ID_CAP_PHONEDIALER\" />\r\n      <Capability Name=\"ID_CAP_PUSH_NOTIFICATION\" />\r\n      <Capability Name=\"ID_CAP_SENSORS\" />\r\n      <Capability Name=\"ID_CAP_WEBBROWSERCOMPONENT\" />\r\n      <Capability Name=\"ID_CAP_ISV_CAMERA\" />\r\n      <Capability Name=\"ID_CAP_CONTACTS\" />\r\n      <Capability Name=\"ID_CAP_APPOINTMENTS\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_AUDIO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PLAYBACK\" />\r\n    </Capabilities>\r\n    <Tasks>\r\n      <DefaultTask Name=\"_default\" NavigationPage=\"Views/ShellView.xaml\" ActivationPolicy=\"Resume\"/>\r\n      <ExtendedTask Name=\"BackgroundTask\">\r\n        <BackgroundServiceAgent Specifier=\"AudioPlayerAgent\" Name=\"TelegramClient.Player\" Source=\"TelegramClient.Player\" Type=\"TelegramClient.Player.AudioPlayer\" />\r\n        <!--<BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"TelegramClient.ScheduledTaskAgent\" Source=\"TelegramClient.ScheduledTaskAgent\" Type=\"TelegramClient.ScheduledTaskAgent.ScheduledAgent\" />-->\r\n      </ExtendedTask>\r\n    </Tasks>\r\n    <Tokens>\r\n      <PrimaryToken TokenID=\"TelegramClient.WP8Token\" TaskName=\"_default\">\r\n        <TemplateIconic>\r\n          <SmallImageURI IsRelative=\"true\" IsResource=\"false\">IconicSmall110.png</SmallImageURI>\r\n          <Count>0</Count>\r\n          <IconImageURI IsRelative=\"true\" IsResource=\"false\">IconicTileMedium202.png</IconImageURI>\r\n          <Title>Telegram</Title>\r\n          <Message></Message>\r\n          <BackgroundColor></BackgroundColor>\r\n          <HasLarge>true</HasLarge>\r\n          <LargeContent1></LargeContent1>\r\n          <LargeContent2></LargeContent2>\r\n          <LargeContent3></LargeContent3>\r\n          <DeviceLockImageURI IsRelative=\"true\" IsResource=\"false\">Images\\LockScreen\\Lockscreen.png</DeviceLockImageURI>\r\n        </TemplateIconic>\r\n      </PrimaryToken>\r\n    </Tokens>\r\n    <Extensions>\r\n      <Extension ExtensionName=\"Photos_Extra_Share\" ConsumerID=\"{5B04B775-356B-4AA0-AAF8-6491FFEA5632}\" TaskID=\"_default\" />\r\n      <Extension ExtensionName=\"LockScreen_Notification_IconCount\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n      <Extension ExtensionName=\"LockScreen_Notification_TextField\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n    </Extensions>\r\n    <ScreenResolutions>\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WVGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WXGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_HD720P\" />\r\n    </ScreenResolutions>\r\n  </App>\r\n</Deployment>"
  },
  {
    "path": "TelegramClient.WP8/Properties/WMAppManifest.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2012/deployment\" AppPlatformVersion=\"8.0\">\r\n  <DefaultLanguage xmlns=\"\" code=\"en\" />\r\n  <Languages xmlns=\"\">\r\n    <Language code=\"en\" />\r\n    <Language code=\"de\" />\r\n    <Language code=\"es\" />\r\n    <Language code=\"pt\" />\r\n    <Language code=\"nl\" />\r\n    <Language code=\"it\" />\r\n  </Languages>\r\n  <AppExtra AppPlatformVersion=\"8.0\" xmlns=\"\">\r\n    <Extra Name=\"SDOptOut\" />\r\n  </AppExtra>\r\n  <App xmlns=\"\" ProductID=\"{cee0f789-8059-4881-8883-347265c01f93}\" Title=\"Telegram Messenger\" RuntimeType=\"Silverlight\" Version=\"1.12.1.0\" Genre=\"apps.normal\" Author=\"Telegram Messenger LLC\" Description=\"Fast and secure messaging app\" Publisher=\"Telegram\" PublisherID=\"{a652821a-0986-4366-8fe7-f00379d89c9b}\">\r\n    <IconPath IsRelative=\"true\" IsResource=\"false\">ApplicationIcon210.png</IconPath>\r\n    <Capabilities>\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO_FULL\" />\r\n      <Capability Name=\"ID_CAP_IDENTITY_DEVICE\" />\r\n      <Capability Name=\"ID_CAP_LOCATION\" />\r\n      <Capability Name=\"ID_CAP_MICROPHONE\" />\r\n      <Capability Name=\"ID_CAP_NETWORKING\" />\r\n      <Capability Name=\"ID_CAP_PHONEDIALER\" />\r\n      <Capability Name=\"ID_CAP_PUSH_NOTIFICATION\" />\r\n      <Capability Name=\"ID_CAP_SENSORS\" />\r\n      <Capability Name=\"ID_CAP_WEBBROWSERCOMPONENT\" />\r\n      <Capability Name=\"ID_CAP_ISV_CAMERA\" />\r\n      <Capability Name=\"ID_CAP_CONTACTS\" />\r\n      <Capability Name=\"ID_CAP_APPOINTMENTS\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_AUDIO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PLAYBACK\" />\r\n    </Capabilities>\r\n    <Tasks>\r\n      <DefaultTask Name=\"_default\" NavigationPage=\"Views/ShellView.xaml\" ActivationPolicy=\"Resume\"/>\r\n      <ExtendedTask Name=\"BackgroundTask\">\r\n        <BackgroundServiceAgent Specifier=\"AudioPlayerAgent\" Name=\"TelegramClient.Player\" Source=\"TelegramClient.Player\" Type=\"TelegramClient.Player.AudioPlayer\" />\r\n        <!--<BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"TelegramClient.ScheduledTaskAgent\" Source=\"TelegramClient.ScheduledTaskAgent\" Type=\"TelegramClient.ScheduledTaskAgent.ScheduledAgent\" />-->\r\n      </ExtendedTask>\r\n    </Tasks>\r\n    <Tokens>\r\n      <PrimaryToken TokenID=\"TelegramClient.WP8Token\" TaskName=\"_default\">\r\n        <TemplateIconic>\r\n          <SmallImageURI IsRelative=\"true\" IsResource=\"false\">IconicSmall110.png</SmallImageURI>\r\n          <Count>0</Count>\r\n          <IconImageURI IsRelative=\"true\" IsResource=\"false\">IconicTileMedium202.png</IconImageURI>\r\n          <Title>Telegram</Title>\r\n          <Message></Message>\r\n          <BackgroundColor></BackgroundColor>\r\n          <HasLarge>true</HasLarge>\r\n          <LargeContent1></LargeContent1>\r\n          <LargeContent2></LargeContent2>\r\n          <LargeContent3></LargeContent3>\r\n          <DeviceLockImageURI IsRelative=\"true\" IsResource=\"false\">Images\\LockScreen\\Lockscreen.png</DeviceLockImageURI>\r\n        </TemplateIconic>\r\n      </PrimaryToken>\r\n    </Tokens>\r\n    <Extensions>\r\n      <Extension ExtensionName=\"Photos_Extra_Share\" ConsumerID=\"{5B04B775-356B-4AA0-AAF8-6491FFEA5632}\" TaskID=\"_default\" />\r\n      <Extension ExtensionName=\"LockScreen_Notification_IconCount\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n      <Extension ExtensionName=\"LockScreen_Notification_TextField\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n    </Extensions>\r\n    <ScreenResolutions>\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WVGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WXGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_HD720P\" />\r\n    </ScreenResolutions>\r\n  </App>\r\n</Deployment>"
  },
  {
    "path": "TelegramClient.WP8/TelegramClient.WP8.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>TelegramClient</RootNamespace>\r\n    <AssemblyName>TelegramClient.WP8</AssemblyName>\r\n    <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>\r\n    <SilverlightVersion>\r\n    </SilverlightVersion>\r\n    <TargetFrameworkProfile>\r\n    </TargetFrameworkProfile>\r\n    <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>\r\n    <SilverlightApplication>true</SilverlightApplication>\r\n    <SupportedCultures>ru%3bde%3bes%3bpt%3bnl%3bit</SupportedCultures>\r\n    <XapOutputs>true</XapOutputs>\r\n    <GenerateSilverlightManifest>true</GenerateSilverlightManifest>\r\n    <XapFilename>Telegram_1.11.0.0_wp8.xap</XapFilename>\r\n    <SilverlightManifestTemplate>Properties\\AppManifest.xml</SilverlightManifestTemplate>\r\n    <SilverlightAppEntry>TelegramClient.App</SilverlightAppEntry>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <Prefer32Bit>false</Prefer32Bit>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <Prefer32Bit>false</Prefer32Bit>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x86'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>Bin\\x86\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;SECRET_CHAT_17</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>\r\n    </PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n    <Optimize>false</Optimize>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x86'\">\r\n    <OutputPath>Bin\\x86\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;SECRET_CHAT_17</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>\r\n    </PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|ARM'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>Bin\\ARM\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;LOG_REGISTRATION</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>\r\n    </PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n    <Optimize>false</Optimize>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|ARM'\">\r\n    <OutputPath>Bin\\ARM\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;LOG_REGISTRATION;LAYER_26</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>\r\n    </PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug Private Beta|AnyCPU'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\Debug Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;PRIVATE_BETA;</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug Private Beta|x86'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\x86\\Debug Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;PRIVATE_BETA;</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug Private Beta|ARM'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\ARM\\Debug Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;PRIVATE_BETA;</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release Private Beta|AnyCPU'\">\r\n    <OutputPath>bin\\Release Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;PRIVATE_BETA;</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release Private Beta|x86'\">\r\n    <OutputPath>bin\\x86\\Release Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;PRIVATE_BETA;</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release Private Beta|ARM'\">\r\n    <OutputPath>bin\\ARM\\Release Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;PRIVATE_BETA;LOG_REGISTRATION;</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"BugSense\">\r\n      <HintPath>..\\Libraries\\BugSense.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Caliburn.Micro\">\r\n      <HintPath>..\\packages\\Caliburn.Micro.1.5.2\\lib\\wp71\\Caliburn.Micro.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Caliburn.Micro.Extensions\">\r\n      <HintPath>..\\packages\\Caliburn.Micro.1.5.2\\lib\\wp71\\Caliburn.Micro.Extensions.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Coding4Fun.Toolkit.Controls\">\r\n      <HintPath>..\\packages\\Coding4Fun.Toolkit.Controls.2.0.7\\lib\\wp71\\Coding4Fun.Toolkit.Controls.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Google.WebAnalytics\">\r\n      <HintPath>..\\Libraries\\Google.WebAnalytics.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ICSharpCode.SharpZLib.Phone\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ICSharpCode.SharpZLib.Phone.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Id3\">\r\n      <HintPath>..\\packages\\ID3.0.3.0\\lib\\sl4-wp71\\Id3.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.Controls\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.Controls.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.Filtering\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.Filtering.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.IO.Bmp\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.IO.Bmp.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.IO.Gif\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.IO.Gif.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.IO.Png\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.IO.Png.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.Utils\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.Utils.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"LayoutTransformer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=455a3b926e06b656, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\Libraries\\LayoutTransformer.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"libphonenumber-csharp-portable\">\r\n      <HintPath>..\\packages\\libphonenumber-csharp-portable.1.0.0.2\\lib\\libphonenumber-csharp-portable.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Expression.Interactions, Version=3.8.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls.Maps, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls.Toolkit, Version=8.0.1.0, Culture=neutral, PublicKeyToken=b772ad94eb9ca604, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\WPtoolkit.4.2013.08.16\\lib\\wp8\\Microsoft.Phone.Controls.Toolkit.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.SilverlightMediaFramework.Compatibility.Phone\">\r\n      <HintPath>..\\Libraries\\Microsoft.SilverlightMediaFramework.Compatibility.Phone.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.WebAnalytics\">\r\n      <HintPath>..\\Libraries\\Microsoft.WebAnalytics.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.WebAnalytics.Behaviors\">\r\n      <HintPath>..\\Libraries\\Microsoft.WebAnalytics.Behaviors.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"PhoneCodeContractsAssemblies\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\PhoneCodeContractsAssemblies.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Core\">\r\n      <HintPath>..\\packages\\Rx-Core.2.2.2\\lib\\windowsphone71\\System.Reactive.Core.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Interfaces\">\r\n      <HintPath>..\\packages\\Rx-Interfaces.2.2.2\\lib\\windowsphone71\\System.Reactive.Interfaces.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Linq\">\r\n      <HintPath>..\\packages\\Rx-Linq.2.2.2\\lib\\windowsphone71\\System.Reactive.Linq.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.PlatformServices\">\r\n      <HintPath>..\\packages\\Rx-PlatformServices.2.2.3\\lib\\windowsphone71\\System.Reactive.PlatformServices.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Windows.Threading\">\r\n      <HintPath>..\\packages\\Rx-XAML.2.2.2\\lib\\windowsphone71\\System.Reactive.Windows.Threading.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Windows.Interactivity, Version=3.8.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\">\r\n      <HintPath>..\\packages\\Caliburn.Micro.1.5.2\\lib\\wp71\\System.Windows.Interactivity.dll</HintPath>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"..\\TelegramClient\\Analytics\\AnalyticsProperties.cs\">\r\n      <Link>Analytics\\AnalyticsProperties.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Analytics\\AnalyticsService.cs\">\r\n      <Link>Analytics\\AnalyticsService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Analytics\\AnalyticsTracker.cs\">\r\n      <Link>Analytics\\AnalyticsTracker.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Analytics\\ReviewRequester.cs\">\r\n      <Link>Analytics\\ReviewRequester.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\LinqToVisualTree.cs\">\r\n      <Link>Animation\\LinqToVisualTree.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\MetroInMotion.cs\">\r\n      <Link>Animation\\MetroInMotion.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\AnimatedBasePage.cs\">\r\n      <Link>Animation\\Navigation\\AnimatedBasePage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\AnimatorHelperBase.cs\">\r\n      <Link>Animation\\Navigation\\AnimatorHelperBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\ContinuumAnimator.cs\">\r\n      <Link>Animation\\Navigation\\ContinuumAnimator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\SlideAnimator.cs\">\r\n      <Link>Animation\\Navigation\\SlideAnimator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\Storyboards.cs\">\r\n      <Link>Animation\\Navigation\\Storyboards.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\SwivelAnimator.cs\">\r\n      <Link>Animation\\Navigation\\SwivelAnimator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\TurnstileAnimator.cs\">\r\n      <Link>Animation\\Navigation\\TurnstileAnimator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\TurnstileFeatherAnimator.cs\">\r\n      <Link>Animation\\Navigation\\TurnstileFeatherAnimator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\App.xaml.cs\">\r\n      <Link>App.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\MarkTapAsHandledBehavior.cs\">\r\n      <Link>Behaviors\\MarkTapAsHandledBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\PanAndZoomBehavior.cs\">\r\n      <Link>Behaviors\\PanAndZoomBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\ProgressBarSmoother.cs\">\r\n      <Link>Behaviors\\ProgressBarSmoother.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\SelectionBehavior.cs\">\r\n      <Link>Behaviors\\SelectionBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\ThemeToStateBehavior.cs\">\r\n      <Link>Behaviors\\ThemeToStateBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\ToggleSwitchLocalizedContentBehavior.cs\">\r\n      <Link>Behaviors\\ToggleSwitchLocalizedContentBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\UpdateTextBindingBehavior.cs\">\r\n      <Link>Behaviors\\UpdateTextBindingBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Bootstrapper.cs\">\r\n      <Link>Bootstrapper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\CapabilityPlaceholder.cs\">\r\n      <Link>CapabilityPlaceholder.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Commands.cs\">\r\n      <Link>Commands.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Constants.cs\">\r\n      <Link>Constants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\BrowserNavigationService.cs\">\r\n      <Link>Controls\\BrowserNavigationService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramNavigationInTransition.cs\">\r\n      <Link>Controls\\TelegramNavigationInTransition.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramNavigationOutTransition.cs\">\r\n      <Link>Controls\\TelegramNavigationOutTransition.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramNavigationTransition.cs\">\r\n      <Link>Controls\\TelegramNavigationTransition.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramRichTextBox.cs\">\r\n      <Link>Controls\\TelegramRichTextBox.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramTransitionFrame.cs\">\r\n      <Link>Controls\\TelegramTransitionFrame.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramTransitionService.cs\">\r\n      <Link>Controls\\TelegramTransitionService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramTurnstileTransition.cs\">\r\n      <Link>Controls\\TelegramTurnstileTransition.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TestScrollableTextBlock.cs\">\r\n      <Link>Controls\\TestScrollableTextBlock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TransitionFrame.cs\">\r\n      <Link>Controls\\TransitionFrame.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\BackgroundImageConverter.cs\">\r\n      <Link>Converters\\BackgroundImageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\BooleanToValueConverter.cs\">\r\n      <Link>Converters\\BooleanToValueConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\BooleanToVisibilityConverter.cs\">\r\n      <Link>Converters\\BooleanToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ChatForbiddenToVisibilityConverter.cs\">\r\n      <Link>Converters\\ChatForbiddenToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ChatToMaxHeight.cs\">\r\n      <Link>Converters\\ChatToMaxHeight.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ChatToVisibilityConverter.cs\">\r\n      <Link>Converters\\ChatToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\CountToVisibilityConverter.cs\">\r\n      <Link>Converters\\CountToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DebugVisibilityConverter.cs\">\r\n      <Link>Converters\\DebugVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DefaultPhotoConverter.cs\">\r\n      <Link>Converters\\DefaultPhotoConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DialogCaptionConverter.cs\">\r\n      <Link>Converters\\DialogCaptionConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DialogDetailsBackgroundConverter.cs\">\r\n      <Link>Converters\\DialogDetailsBackgroundConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DialogMessageFromConverter.cs\">\r\n      <Link>Converters\\DialogMessageFromConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DistanceAwayConverter.cs\">\r\n      <Link>Converters\\DistanceAwayConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\EmptyDialogMessageConverter.cs\">\r\n      <Link>Converters\\EmptyDialogMessageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\EmptyPhotoToVisibilityConverter.cs\">\r\n      <Link>Converters\\EmptyPhotoToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\EmptyStringToVisibilityConverter.cs\">\r\n      <Link>Converters\\EmptyStringToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ExistsToVisibilityConverter.cs\">\r\n      <Link>Converters\\ExistsToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ExtendedImageConverter.cs\">\r\n      <Link>Converters\\ExtendedImageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\FileExtToColorConverter.cs\">\r\n      <Link>Converters\\FileExtToColorConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\FileNameConverter.cs\">\r\n      <Link>Converters\\FileNameConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\FileSizeConverter.cs\">\r\n      <Link>Converters\\FileSizeConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ForwardedMessageConverter.cs\">\r\n      <Link>Converters\\ForwardedMessageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\GeoLocationToVisibilityConverter.cs\">\r\n      <Link>Converters\\GeoLocationToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\GeoPointToStaticGoogleMapsConverter.cs\">\r\n      <Link>Converters\\GeoPointToStaticGoogleMapsConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\GroupToBackgroundBrushValueConverter.cs\">\r\n      <Link>Converters\\GroupToBackgroundBrushValueConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\GroupToForegroundBrushValueConverter.cs\">\r\n      <Link>Converters\\GroupToForegroundBrushValueConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\IdToPlaceholderBackgroundConverter.cs\">\r\n      <Link>Converters\\IdToPlaceholderBackgroundConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\IntToVisibilityConverter.cs\">\r\n      <Link>Converters\\IntToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\InvertBooleanConverter.cs\">\r\n      <Link>Converters\\InvertBooleanConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\IsSelectedToBackgroundConverter.cs\">\r\n      <Link>Converters\\IsSelectedToBackgroundConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\LowercaseConverter.cs\">\r\n      <Link>Converters\\LowercaseConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MaskConverter.cs\">\r\n      <Link>Converters\\MaskConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MediaContactToPhotoConverter.cs\">\r\n      <Link>Converters\\MediaContactToPhotoConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MediaEmptyToVisibilityConverter.cs\">\r\n      <Link>Converters\\MediaEmptyToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MediaSizeConverter.cs\">\r\n      <Link>Converters\\MediaSizeConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MergeBrushesConverter.cs\">\r\n      <Link>Converters\\MergeBrushesConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MessageStateToForegroundConverter.cs\">\r\n      <Link>Converters\\MessageStateToForegroundConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MessageStatusConverter.cs\">\r\n      <Link>Converters\\MessageStatusConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MessageToBriefInfoConverter.cs\">\r\n      <Link>Converters\\MessageToBriefInfoConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MessageToFontFamilyConverter.cs\">\r\n      <Link>Converters\\MessageToFontFamilyConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MuteUntilToStringConverter.cs\">\r\n      <Link>Converters\\MuteUntilToStringConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\NotifySettingsToVisibilityConverter.cs\">\r\n      <Link>Converters\\NotifySettingsToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\NotServiceMessageToVisibilityConverter.cs\">\r\n      <Link>Converters\\NotServiceMessageToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\OverlayAccentBrushConverter.cs\">\r\n      <Link>Converters\\OverlayAccentBrushConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PhoneNumberConverter.cs\">\r\n      <Link>Converters\\PhoneNumberConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PhotoBytesToImageConverter.cs\">\r\n      <Link>Converters\\PhotoBytesToImageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PhotoToDimensionConverter.cs\">\r\n      <Link>Converters\\PhotoToDimensionConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PhotoToThumbConverter.cs\">\r\n      <Link>Converters\\PhotoToThumbConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PlaceholderDefaultImageConverter.cs\">\r\n      <Link>Converters\\PlaceholderDefaultImageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PrivateBetaToVisibilityConverter.cs\">\r\n      <Link>Converters\\PrivateBetaToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ProgressToVisibilityConverter.cs\">\r\n      <Link>Converters\\ProgressToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ReplyMarkupButtonVisibilityConverter.cs\">\r\n      <Link>Converters\\ReplyMarkupButtonVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\SecretChatsAvailabilityConverter.cs\">\r\n      <Link>Converters\\SecretChatsAvailabilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\SecretChatsForegroundConverter.cs\">\r\n      <Link>Converters\\SecretChatsForegroundConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ServiceMessageToTextConverter.cs\">\r\n      <Link>Converters\\ServiceMessageToTextConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\StatusToImageConverter.cs\">\r\n      <Link>Converters\\StatusToImageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\StickerSetToCountStringConverter.cs\">\r\n      <Link>Converters\\StickerSetToCountStringConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\StringEqualsToVisibilityConverter.cs\">\r\n      <Link>Converters\\StringEqualsToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\StringFormatConverter.cs\">\r\n      <Link>Converters\\StringFormatConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\TestBindingConverter.cs\">\r\n      <Link>Converters\\TestBindingConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\TextMessageToVisibilityConverter.cs\">\r\n      <Link>Converters\\TextMessageToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\TextSizeToVisibilityConverter.cs\">\r\n      <Link>Converters\\TextSizeToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\TLIntToDateTimeConverter.cs\">\r\n      <Link>Converters\\TLIntToDateTimeConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UnreadCountToVisibilityConverter.cs\">\r\n      <Link>Converters\\UnreadCountToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UnreadMessageConverter.cs\">\r\n      <Link>Converters\\UnreadMessageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UnregisteredUserIdToVisibilityConverter.cs\">\r\n      <Link>Converters\\UnregisteredUserIdToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UppercaseConverter.cs\">\r\n      <Link>Converters\\UppercaseConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UserStatusToBrushConverter.cs\">\r\n      <Link>Converters\\UserStatusToBrushConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UserStatusToStringConverter.cs\">\r\n      <Link>Converters\\UserStatusToStringConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UserStatusToVisibilityConverter.cs\">\r\n      <Link>Converters\\UserStatusToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UserToActionStringConverter.cs\">\r\n      <Link>Converters\\UserToActionStringConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\WP8VisibilityConverter.cs\">\r\n      <Link>Converters\\WP8VisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml.cs\">\r\n      <Link>EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Emoji\\EmojiData.cs\">\r\n      <Link>EmojiPanel\\Controls\\Emoji\\EmojiData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Emoji\\EmojiSpriteItem.cs\">\r\n      <Link>EmojiPanel\\Controls\\Emoji\\EmojiSpriteItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Emoji\\StickerSpriteItem.cs\">\r\n      <Link>EmojiPanel\\Controls\\Emoji\\StickerSpriteItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\DelayedExecutor.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\DelayedExecutor.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\Helpers.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\Helpers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\MyListItemBase.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\MyListItemBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\MyVirtualizingPanel.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\MyVirtualizingPanel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\VirtSegment.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\VirtSegment.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\VListItemBase.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\VListItemBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EventArgs\\UpdateChatTitleEventArgs.cs\">\r\n      <Link>EventArgs\\UpdateChatTitleEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Extensions\\ApplicationExtensions.cs\">\r\n      <Link>Extensions\\ApplicationExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Extensions\\CollectionExtensions.cs\">\r\n      <Link>Extensions\\CollectionExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\Clip.cs\">\r\n      <Link>Helpers\\Clip.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\CollectionHelper.cs\">\r\n      <Link>Helpers\\CollectionHelper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\ImageUtils.cs\">\r\n      <Link>Helpers\\ImageUtils.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\ItemsControlHelper.cs\">\r\n      <Link>Helpers\\ItemsControlHelper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\Property.cs\">\r\n      <Link>Helpers\\Property.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\DocumentTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\DocumentTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\EmptyDialogToDescriptionConverter.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\EmptyDialogToDescriptionConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\ItemsPanelTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\ItemsPanelTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\LocationTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\LocationTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\MediaTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\MediaTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\MessageTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\MessageTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\SearchContactsTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\SearchContactsTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\AlphaKeyGroup.cs\">\r\n      <Link>ViewModels\\Contacts\\AlphaKeyGroup.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\ContactsByLastName.cs\">\r\n      <Link>Models\\ContactsByLastName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\Country.cs\">\r\n      <Link>Models\\Country.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\InAppNotifications.cs\">\r\n      <Link>Models\\InAppNotifications.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\Settings.cs\">\r\n      <Link>Models\\Settings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\UsersByFirstName.cs\">\r\n      <Link>Models\\UsersByFirstName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\UsersByLastName.cs\">\r\n      <Link>Models\\UsersByLastName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.de.Designer.cs\">\r\n      <Link>Resources\\AppResources.de.Designer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.Designer.cs\">\r\n      <Link>Resources\\AppResources.Designer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.es.Designer.cs\">\r\n      <Link>Resources\\AppResources.es.Designer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.it.Designer.cs\">\r\n      <Link>Resources\\AppResources.it.Designer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.nl.Designer.cs\">\r\n      <Link>Resources\\AppResources.nl.Designer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.pt.Designer.cs\">\r\n      <Link>Resources\\AppResources.pt.Designer.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\LocalizationConverter.cs\">\r\n      <Link>Resources\\LocalizationConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\LocalizedStrings.cs\">\r\n      <Link>Resources\\LocalizedStrings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\CommonErrorHandler.cs\">\r\n      <Link>Services\\CommonErrorHandler.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\ICommonErrorHandler.cs\">\r\n      <Link>Services\\ICommonErrorHandler.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\IPushService.cs\">\r\n      <Link>Services\\IPushService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\IStateService.cs\">\r\n      <Link>Services\\IStateService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\PushService.cs\">\r\n      <Link>Services\\PushService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\PushServiceBase.cs\">\r\n      <Link>Services\\PushServiceBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\StateService.cs\">\r\n      <Link>Services\\StateService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Utils\\Color.cs\">\r\n      <Link>Utils\\Color.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Utils\\Language.cs\">\r\n      <Link>Utils\\Language.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Utils\\TelegramUriMapper.cs\">\r\n      <Link>Utils\\TelegramUriMapper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\AboutViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\AboutViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\AccountSelfDestructsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\AccountSelfDestructsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\AddChatParticipantConfirmationViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\AddChatParticipantConfirmationViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\AllowUsersViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\AllowUsersViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\AskQuestionConfirmationViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\AskQuestionConfirmationViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\BlockedContactsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\BlockedContactsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\CacheViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\CacheViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChangePasscodeViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChangePasscodeViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChangePasswordEmailViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChangePasswordEmailViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChangePasswordHintViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChangePasswordHintViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChangePasswordViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChangePasswordViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChangePhoneNumberViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChangePhoneNumberViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChooseAttachmentViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChooseAttachmentViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChooseBackgroundViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChooseBackgroundViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChooseCountryViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChooseCountryViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChooseNotificationSpanViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChooseNotificationSpanViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChooseTTLViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChooseTTLViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EditCurrentUserViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EditCurrentUserViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EditPhoneNumberViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EditPhoneNumberViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EditUsernameViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EditUsernameViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EncryptionKeyViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EncryptionKeyViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EnterPasscodeViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EnterPasscodeViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EnterPasswordViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EnterPasswordViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\LastSeenViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\LastSeenViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\LockscreenViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\LockscreenViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\NotificationsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\NotificationsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\PasscodeViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\PasscodeViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\PasswordRecoveryViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\PasswordRecoveryViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\PasswordViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\PasswordViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\PrivacySecureViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\PrivacySecureViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\PrivacyStatementViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\PrivacyStatementViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\SelectMultipleUsersViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\SelectMultipleUsersViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\SessionsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\SessionsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\SettingsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\SettingsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ShareViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ShareViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\SnapshotsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\SnapshotsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\SpecialThanksViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\SpecialThanksViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\StartupViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\StartupViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\StickersViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\StickersViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Auth\\ConfirmPasswordViewModel.cs\">\r\n      <Link>ViewModels\\Auth\\ConfirmPasswordViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Auth\\ConfirmViewModel.cs\">\r\n      <Link>ViewModels\\Auth\\ConfirmViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Auth\\SignInViewModel.cs\">\r\n      <Link>ViewModels\\Auth\\SignInViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Auth\\SignUpViewModel.cs\">\r\n      <Link>ViewModels\\Auth\\SignUpViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\AddChannelManagerViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\AddChannelManagerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\AddChatParticipantViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\AddChatParticipantViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\AddSecretChatParticipantViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\AddSecretChatParticipantViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\Chat2ViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\Chat2ViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\ChatDetailsViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\ChatDetailsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\ChatViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\ChatViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\EditChatViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\EditChatViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\InviteLinkViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\InviteLinkViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\ContactDetailsViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\ContactDetailsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\ContactInfoViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\ContactInfoViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\ContactsViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\ContactsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\ContactViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\ContactViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\EditContactViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\EditContactViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\SecretContactDetailsViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\SecretContactDetailsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\SecretContactViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\SecretContactViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\ShareContactViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\ShareContactViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Debug\\DebugViewModel.cs\">\r\n      <Link>ViewModels\\Debug\\DebugViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Debug\\LogViewModel.cs\">\r\n      <Link>ViewModels\\Debug\\LogViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Debug\\LongPollViewModel.cs\">\r\n      <Link>ViewModels\\Debug\\LongPollViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Debug\\PerformanceViewModel.cs\">\r\n      <Link>ViewModels\\Debug\\PerformanceViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\ChooseDialogViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\ChooseDialogViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\ChooseParticipantsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\ChooseParticipantsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\CommandHintsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\CommandHintsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\CreateBroadcastViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\CreateBroadcastViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\CreateChannelViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\CreateChannelViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\CreateDialogViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\CreateDialogViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsMode.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsMode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Actions.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Actions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Channel.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Channel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Contact.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Contact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Document.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Document.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.GeoPoint.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.GeoPoint.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Handle.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Handle.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Media.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Media.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Photo.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Photo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Reply.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Reply.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Search.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Search.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Video.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Video.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogSearchMessagesViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogSearchMessagesViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogsViewModel.Common.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogsViewModel.Common.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\HashtagHintsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\HashtagHintsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\MessageViewerViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\MessageViewerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretChatDebugViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretChatDebugViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Document.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Document.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.GeoPoint.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.GeoPoint.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Handle.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Handle.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Media.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Media.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Photo.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Photo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Text.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Text.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Video.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Video.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\UserActionViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\UserActionViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\UsernameHintsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\UsernameHintsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\ItemDetailsViewModelBase.cs\">\r\n      <Link>ViewModels\\ItemDetailsViewModelBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\ItemsViewModelBase.cs\">\r\n      <Link>ViewModels\\ItemsViewModelBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\AnimatedImageViewerViewModel.cs\">\r\n      <Link>ViewModels\\Media\\AnimatedImageViewerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\DecryptedImageViewerViewModel.cs\">\r\n      <Link>ViewModels\\Media\\DecryptedImageViewerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\FilesViewModel.cs\">\r\n      <Link>ViewModels\\Media\\FilesViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\FullMediaViewModel.cs\">\r\n      <Link>ViewModels\\Media\\FullMediaViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\ImageEditorViewModel.cs\">\r\n      <Link>ViewModels\\Media\\ImageEditorViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\ImageViewerViewModel.cs\">\r\n      <Link>ViewModels\\Media\\ImageViewerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\LinksViewModel.cs\">\r\n      <Link>ViewModels\\Media\\LinksViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\MapViewModel.cs\">\r\n      <Link>ViewModels\\Media\\MapViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\MediaViewModel.cs\">\r\n      <Link>ViewModels\\Media\\MediaViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\ProfilePhotoViewerViewModel.cs\">\r\n      <Link>ViewModels\\Media\\ProfilePhotoViewerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\SecretMediaViewModel.cs\">\r\n      <Link>ViewModels\\Media\\SecretMediaViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\VideoCaptureViewModel.cs\">\r\n      <Link>ViewModels\\Media\\VideoCaptureViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\VideoPlayerViewModel.cs\">\r\n      <Link>ViewModels\\Media\\VideoPlayerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\ISearch.cs\">\r\n      <Link>ViewModels\\Search\\ISearch.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchContactsViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchContactsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchDialogsViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchDialogsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchFilesViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchFilesViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchItemsViewModelBase.cs\">\r\n      <Link>ViewModels\\Search\\SearchItemsViewModelBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchLinksViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchLinksViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchMessagesViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchMessagesViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchShellViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchShellViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchVenuesViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchVenuesViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\ShellViewModel.cs\">\r\n      <Link>ViewModels\\ShellViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\ViewModelBase.cs\">\r\n      <Link>ViewModels\\ViewModelBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\AboutView.xaml.cs\">\r\n      <Link>Views\\Additional\\AboutView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\AccountSelfDestructsView.xaml.cs\">\r\n      <Link>Views\\Additional\\AccountSelfDestructsView.xaml.cs</Link>\r\n      <DependentUpon>AccountSelfDestructsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\AddChatParticipantConfirmationView.xaml.cs\">\r\n      <Link>Views\\Additional\\AddChatParticipantConfirmationView.xaml.cs</Link>\r\n      <DependentUpon>AddChatParticipantConfirmationView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\AllowUsersView.xaml.cs\">\r\n      <Link>Views\\Additional\\AllowUsersView.xaml.cs</Link>\r\n      <DependentUpon>AllowUsersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\AskQuestionConfirmationView.xaml.cs\">\r\n      <Link>Views\\Additional\\AskQuestionConfirmationView.xaml.cs</Link>\r\n      <DependentUpon>AskQuestionConfirmationView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\BlockedContactsView.xaml.cs\">\r\n      <Link>Views\\Additional\\BlockedContactsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\BubbleBackgroundControl.xaml.cs\">\r\n      <Link>Views\\Additional\\BubbleBackgroundControl.xaml.cs</Link>\r\n      <DependentUpon>BubbleBackgroundControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\CacheView.xaml.cs\">\r\n      <Link>Views\\Additional\\CacheView.xaml.cs</Link>\r\n      <DependentUpon>CacheView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasscodeView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChangePasscodeView.xaml.cs</Link>\r\n      <DependentUpon>ChangePasscodeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordEmailView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChangePasswordEmailView.xaml.cs</Link>\r\n      <DependentUpon>ChangePasswordEmailView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordHintView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChangePasswordHintView.xaml.cs</Link>\r\n      <DependentUpon>ChangePasswordHintView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChangePasswordView.xaml.cs</Link>\r\n      <DependentUpon>ChangePasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChangePhoneNumberView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChangePhoneNumberView.xaml.cs</Link>\r\n      <DependentUpon>ChangePhoneNumberView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChooseAttachmentView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChooseAttachmentView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChooseBackgroundView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChooseBackgroundView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChooseCountryView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChooseCountryView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChooseNotificationSpanView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChooseNotificationSpanView.xaml.cs</Link>\r\n      <DependentUpon>ChooseNotificationSpanView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChooseTTLView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChooseTTLView.xaml.cs</Link>\r\n      <DependentUpon>ChooseTTLView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EditCurrentUserView.xaml.cs\">\r\n      <Link>Views\\Additional\\EditCurrentUserView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EditPhoneNumberView.xaml.cs\">\r\n      <Link>Views\\Additional\\EditPhoneNumberView.xaml.cs</Link>\r\n      <DependentUpon>EditPhoneNumberView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EditUsernameView.xaml.cs\">\r\n      <Link>Views\\Additional\\EditUsernameView.xaml.cs</Link>\r\n      <DependentUpon>EditUsernameView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EncryptionKeyView.xaml.cs\">\r\n      <Link>Views\\Additional\\EncryptionKeyView.xaml.cs</Link>\r\n      <DependentUpon>EncryptionKeyView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EnterPasscodeView.xaml.cs\">\r\n      <Link>Views\\Additional\\EnterPasscodeView.xaml.cs</Link>\r\n      <DependentUpon>EnterPasscodeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EnterPasswordView.xaml.cs\">\r\n      <Link>Views\\Additional\\EnterPasswordView.xaml.cs</Link>\r\n      <DependentUpon>EnterPasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\FallingSnowControl.xaml.cs\">\r\n      <Link>Views\\Additional\\FallingSnowControl.xaml.cs</Link>\r\n      <DependentUpon>FallingSnowControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\LastSeenView.xaml.cs\">\r\n      <Link>Views\\Additional\\LastSeenView.xaml.cs</Link>\r\n      <DependentUpon>LastSeenView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\LockscreenView.xaml.cs\">\r\n      <Link>Views\\Additional\\LockscreenView.xaml.cs</Link>\r\n      <DependentUpon>LockscreenView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\NotificationsView.xaml.cs\">\r\n      <Link>Views\\Additional\\NotificationsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\NumericKeyboard.xaml.cs\">\r\n      <Link>Views\\Additional\\NumericKeyboard.xaml.cs</Link>\r\n      <DependentUpon>NumericKeyboard.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\PasscodeView.xaml.cs\">\r\n      <Link>Views\\Additional\\PasscodeView.xaml.cs</Link>\r\n      <DependentUpon>PasscodeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\PasswordRecoveryView.xaml.cs\">\r\n      <Link>Views\\Additional\\PasswordRecoveryView.xaml.cs</Link>\r\n      <DependentUpon>PasswordRecoveryView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\PasswordView.xaml.cs\">\r\n      <Link>Views\\Additional\\PasswordView.xaml.cs</Link>\r\n      <DependentUpon>PasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\PrivacySecurityView.xaml.cs\">\r\n      <Link>Views\\Additional\\PrivacySecurityView.xaml.cs</Link>\r\n      <DependentUpon>PrivacySecurityView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\PrivacyStatementView.xaml.cs\">\r\n      <Link>Views\\Additional\\PrivacyStatementView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\SelectMultipleUsersView.xaml.cs\">\r\n      <Link>Views\\Additional\\SelectMultipleUsersView.xaml.cs</Link>\r\n      <DependentUpon>SelectMultipleUsersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\SessionsView.xaml.cs\">\r\n      <Link>Views\\Additional\\SessionsView.xaml.cs</Link>\r\n      <DependentUpon>SessionsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\SettingsView.xaml.cs\">\r\n      <Link>Views\\Additional\\SettingsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ShareView.xaml.cs\">\r\n      <Link>Views\\Additional\\ShareView.xaml.cs</Link>\r\n      <DependentUpon>ShareView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\SnapshotsView.xaml.cs\">\r\n      <Link>Views\\Additional\\SnapshotsView.xaml.cs</Link>\r\n      <DependentUpon>SnapshotsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\SpecialThanksView.xaml.cs\">\r\n      <Link>Views\\Additional\\SpecialThanksView.xaml.cs</Link>\r\n      <DependentUpon>SpecialThanksView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\StickersView.xaml.cs\">\r\n      <Link>Views\\Additional\\StickersView.xaml.cs</Link>\r\n      <DependentUpon>StickersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\TelegramPasswordBox.xaml.cs\">\r\n      <Link>Views\\Additional\\TelegramPasswordBox.xaml.cs</Link>\r\n      <DependentUpon>TelegramPasswordBox.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Auth\\ConfirmPasswordView.xaml.cs\">\r\n      <Link>Views\\Auth\\ConfirmPasswordView.xaml.cs</Link>\r\n      <DependentUpon>ConfirmPasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Auth\\ConfirmView.xaml.cs\">\r\n      <Link>Views\\Auth\\ConfirmView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Auth\\SignInView.xaml.cs\">\r\n      <Link>Views\\Auth\\SignInView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Auth\\SignUpView.xaml.cs\">\r\n      <Link>Views\\Auth\\SignUpView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\AddChannelManagerView.xaml.cs\">\r\n      <Link>Views\\Chats\\AddChannelManagerView.xaml.cs</Link>\r\n      <DependentUpon>AddChannelManagerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\AddChatParticipantView.xaml.cs\">\r\n      <Link>Views\\Chats\\AddChatParticipantView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\AddSecretChatParticipantView.xaml.cs\">\r\n      <Link>Views\\Chats\\AddSecretChatParticipantView.xaml.cs</Link>\r\n      <DependentUpon>AddSecretChatParticipantView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\Chat2View.xaml.cs\">\r\n      <Link>Views\\Chats\\Chat2View.xaml.cs</Link>\r\n      <DependentUpon>Chat2View.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\ChatDetailsView.xaml.cs\">\r\n      <Link>Views\\Chats\\ChatDetailsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\ChatView.xaml.cs\">\r\n      <Link>Views\\Chats\\ChatView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\EditChatView.xaml.cs\">\r\n      <Link>Views\\Chats\\EditChatView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\InviteLinkView.xaml.cs\">\r\n      <Link>Views\\Chats\\InviteLinkView.xaml.cs</Link>\r\n      <DependentUpon>InviteLinkView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\ContactDetailsView.xaml.cs\">\r\n      <Link>Views\\Contacts\\ContactDetailsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\ContactInfoView.xaml.cs\">\r\n      <Link>Views\\Contacts\\ContactInfoView.xaml.cs</Link>\r\n      <DependentUpon>ContactInfoView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\ContactView.xaml.cs\">\r\n      <Link>Views\\Contacts\\ContactView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\EditContactView.xaml.cs\">\r\n      <Link>Views\\Contacts\\EditContactView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\SecretContactDetailsView.xaml.cs\">\r\n      <Link>Views\\Contacts\\SecretContactDetailsView.xaml.cs</Link>\r\n      <DependentUpon>SecretContactDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\SecretContactView.xaml.cs\">\r\n      <Link>Views\\Contacts\\SecretContactView.xaml.cs</Link>\r\n      <DependentUpon>SecretContactView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\ShareContactView.xaml.cs\">\r\n      <Link>Views\\Contacts\\ShareContactView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\ConversationTileControl.xaml.cs\">\r\n      <Link>Views\\Controls\\ConversationTileControl.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\MainTitleControl.xaml.cs\">\r\n      <Link>Views\\Controls\\MainTitleControl.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\MessagePlayerControl.xaml.cs\">\r\n      <Link>Views\\Controls\\MessagePlayerControl.xaml.cs</Link>\r\n      <DependentUpon>MessagePlayerControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\MessageStatusControl.xaml.cs\">\r\n      <Link>Views\\Controls\\MessageStatusControl.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\PieSlice.cs\">\r\n      <Link>Views\\Controls\\PieSlice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\SecretPhotoPlaceholder.xaml.cs\">\r\n      <Link>Views\\Controls\\SecretPhotoPlaceholder.xaml.cs</Link>\r\n      <DependentUpon>SecretPhotoPlaceholder.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Debug\\DebugView.xaml.cs\">\r\n      <Link>Views\\Debug\\DebugView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Debug\\LongPollView.xaml.cs\">\r\n      <Link>Views\\Debug\\LongPollView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Debug\\PerformanceView.xaml.cs\">\r\n      <Link>Views\\Debug\\PerformanceView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\ChooseDialogView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\ChooseDialogView.xaml.cs</Link>\r\n      <DependentUpon>ChooseDialogView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\ChooseParticipantsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\ChooseParticipantsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CommandHintsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CommandHintsView.xaml.cs</Link>\r\n      <DependentUpon>CommandHintsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CommandsControl.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CommandsControl.xaml.cs</Link>\r\n      <DependentUpon>CommandsControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateBroadcastView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CreateBroadcastView.xaml.cs</Link>\r\n      <DependentUpon>CreateBroadcastView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateChannelView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CreateChannelView.xaml.cs</Link>\r\n      <DependentUpon>CreateChannelView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateDialogView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CreateDialogView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\DialogSearchMessagesView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\DialogSearchMessagesView.xaml.cs</Link>\r\n      <DependentUpon>DialogSearchMessagesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\EmojiKeyboardControl.xaml.cs\">\r\n      <Link>Views\\Dialogs\\EmojiKeyboardControl.xaml.cs</Link>\r\n      <DependentUpon>EmojiKeyboardControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\HashtagHintsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\HashtagHintsView.xaml.cs</Link>\r\n      <DependentUpon>HashtagHintsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\MessageViewerView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\MessageViewerView.xaml.cs</Link>\r\n      <DependentUpon>MessageViewerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\SecretChatDebugView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\SecretChatDebugView.xaml.cs</Link>\r\n      <DependentUpon>SecretChatDebugView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\UserActionView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\UserActionView.xaml.cs</Link>\r\n      <DependentUpon>UserActionView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\UsernameHintsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\UsernameHintsView.xaml.cs</Link>\r\n      <DependentUpon>UsernameHintsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\AnimatedImageViewerView.xaml.cs\">\r\n      <Link>Views\\Media\\AnimatedImageViewerView.xaml.cs</Link>\r\n      <DependentUpon>AnimatedImageViewerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\DecryptedImageViewerView.xaml.cs\">\r\n      <Link>Views\\Media\\DecryptedImageViewerView.xaml.cs</Link>\r\n      <DependentUpon>DecryptedImageViewerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\FullMediaView.xaml.cs\">\r\n      <Link>Views\\Media\\FullMediaView.xaml.cs</Link>\r\n      <DependentUpon>FullMediaView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\ImageEditorView.xaml.cs\">\r\n      <Link>Views\\Media\\ImageEditorView.xaml.cs</Link>\r\n      <DependentUpon>ImageEditorView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\ImageViewerView.xaml.cs\">\r\n      <Link>Views\\Media\\ImageViewerView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\MapTileSources\\GoogleMapsTileSource.cs\">\r\n      <Link>Views\\Media\\MapTileSources\\GoogleMapsTileSource.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\MapTileSources\\OpenAeralMapTileSource.cs\">\r\n      <Link>Views\\Media\\MapTileSources\\OpenAeralMapTileSource.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\MapTileSources\\OpenStreetMapTileSource.cs\">\r\n      <Link>Views\\Media\\MapTileSources\\OpenStreetMapTileSource.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\MapView.xaml.cs\">\r\n      <Link>Views\\Media\\MapView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\ProfilePhotoViewerView.xaml.cs\">\r\n      <Link>Views\\Media\\ProfilePhotoViewerView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\SecretMediaView.xaml.cs\">\r\n      <Link>Views\\Media\\SecretMediaView.xaml.cs</Link>\r\n      <DependentUpon>SecretMediaView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\VideoCaptureView.xaml.cs\">\r\n      <Link>Views\\Media\\VideoCaptureView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\VideoPlayerView.xaml.cs\">\r\n      <Link>Views\\Media\\VideoPlayerView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchContactsView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchContactsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchDialogsView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchDialogsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchFilesView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchFilesView.xaml.cs</Link>\r\n      <DependentUpon>SearchFilesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchLinksView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchLinksView.xaml.cs</Link>\r\n      <DependentUpon>SearchLinksView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchMessagesView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchMessagesView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchShellView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchShellView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchVenuesView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchVenuesView.xaml.cs</Link>\r\n      <DependentUpon>SearchVenuesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\ShellView.xaml.cs\">\r\n      <Link>Views\\ShellView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\TelegramViewBase.cs\">\r\n      <Link>Views\\TelegramViewBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"Behaviors\\InfiniteScrollingBehavior.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\DragEventArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\FlickEventArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\GestureEventArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\GestureHelper.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\InputBaseArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\InputCompletedArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\InputDeltaArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\ManipulationGestureHelper.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\SafeRaise.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\StartView.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\StartViewItem.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\StartViewPanel.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\TransformAnimator.cs\" />\r\n    <Compile Include=\"LongListSelectorEx.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Audio.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Audio.cs\" />\r\n    <Compile Include=\"Views\\Additional\\StartupView.xaml.cs\">\r\n      <DependentUpon>StartupView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Contacts\\ContactsView.xaml.cs\">\r\n      <DependentUpon>ContactsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\AudioRecorderControl.xaml.cs\">\r\n      <DependentUpon>AudioRecorderControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\DialogDetailsView.xaml.cs\">\r\n      <DependentUpon>DialogDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\DialogsView.xaml.cs\">\r\n      <DependentUpon>DialogsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\SecretDialogDetailsView.xaml.cs\">\r\n      <DependentUpon>SecretDialogDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\LinksView.xaml.cs\">\r\n      <DependentUpon>LinksView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\FilesView.xaml.cs\">\r\n      <DependentUpon>FilesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\MediaView.xaml.cs\">\r\n      <DependentUpon>MediaView.xaml</DependentUpon>\r\n    </Compile>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"app.config\" />\r\n    <None Include=\"packages.config\" />\r\n    <None Include=\"Properties\\AppManifest.xml\" />\r\n    <None Include=\"Properties\\WMAppManifest.xml\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Page Include=\"..\\TelegramClient\\App.xaml\">\r\n      <Link>App.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml\">\r\n      <Link>EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Button.xaml\">\r\n      <Link>Themes\\Default\\Button.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\CheckBox.xaml\">\r\n      <Link>Themes\\Default\\CheckBox.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\ListBox.xaml\">\r\n      <Link>Themes\\Default\\ListBox.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\ScrollViewer.xaml\">\r\n      <Link>Themes\\Default\\ScrollViewer.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Slider.xaml\">\r\n      <Link>Themes\\Default\\Slider.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Templates\\DataTemplates.xaml\">\r\n      <Link>Themes\\Default\\Templates\\DataTemplates.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Templates\\ItemsPanel.xaml\">\r\n      <Link>Themes\\Default\\Templates\\ItemsPanel.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Templates\\Media.xaml\">\r\n      <Link>Themes\\Default\\Templates\\Media.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\TextBlock.xaml\">\r\n      <Link>Themes\\Default\\TextBlock.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\TextBox.xaml\">\r\n      <Link>Themes\\Default\\TextBox.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Theme.xaml\">\r\n      <Link>Themes\\Default\\Theme.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\ToggleButton.xaml\">\r\n      <Link>Themes\\Default\\ToggleButton.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Transitions.xaml\">\r\n      <Link>Themes\\Default\\Transitions.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\AboutView.xaml\">\r\n      <Link>Views\\Additional\\AboutView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\AccountSelfDestructsView.xaml\">\r\n      <Link>Views\\Additional\\AccountSelfDestructsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\AddChatParticipantConfirmationView.xaml\">\r\n      <Link>Views\\Additional\\AddChatParticipantConfirmationView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\AllowUsersView.xaml\">\r\n      <Link>Views\\Additional\\AllowUsersView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\AskQuestionConfirmationView.xaml\">\r\n      <Link>Views\\Additional\\AskQuestionConfirmationView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\BlockedContactsView.xaml\">\r\n      <Link>Views\\Additional\\BlockedContactsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\BubbleBackgroundControl.xaml\">\r\n      <Link>Views\\Additional\\BubbleBackgroundControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\CacheView.xaml\">\r\n      <Link>Views\\Additional\\CacheView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasscodeView.xaml\">\r\n      <Link>Views\\Additional\\ChangePasscodeView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordEmailView.xaml\">\r\n      <Link>Views\\Additional\\ChangePasswordEmailView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordHintView.xaml\">\r\n      <Link>Views\\Additional\\ChangePasswordHintView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordView.xaml\">\r\n      <Link>Views\\Additional\\ChangePasswordView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChangePhoneNumberView.xaml\">\r\n      <Link>Views\\Additional\\ChangePhoneNumberView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChooseAttachmentView.xaml\">\r\n      <Link>Views\\Additional\\ChooseAttachmentView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChooseBackgroundView.xaml\">\r\n      <Link>Views\\Additional\\ChooseBackgroundView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChooseCountryView.xaml\">\r\n      <Link>Views\\Additional\\ChooseCountryView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChooseNotificationSpanView.xaml\">\r\n      <Link>Views\\Additional\\ChooseNotificationSpanView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChooseTTLView.xaml\">\r\n      <Link>Views\\Additional\\ChooseTTLView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EditCurrentUserView.xaml\">\r\n      <Link>Views\\Additional\\EditCurrentUserView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EditPhoneNumberView.xaml\">\r\n      <Link>Views\\Additional\\EditPhoneNumberView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EditUsernameView.xaml\">\r\n      <Link>Views\\Additional\\EditUsernameView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EncryptionKeyView.xaml\">\r\n      <Link>Views\\Additional\\EncryptionKeyView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EnterPasscodeView.xaml\">\r\n      <Link>Views\\Additional\\EnterPasscodeView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EnterPasswordView.xaml\">\r\n      <Link>Views\\Additional\\EnterPasswordView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\FallingSnowControl.xaml\">\r\n      <Link>Views\\Additional\\FallingSnowControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\LastSeenView.xaml\">\r\n      <Link>Views\\Additional\\LastSeenView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\LockscreenView.xaml\">\r\n      <Link>Views\\Additional\\LockscreenView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\NotificationsView.xaml\">\r\n      <Link>Views\\Additional\\NotificationsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\NumericKeyboard.xaml\">\r\n      <Link>Views\\Additional\\NumericKeyboard.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\PasscodeView.xaml\">\r\n      <Link>Views\\Additional\\PasscodeView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\PasswordRecoveryView.xaml\">\r\n      <Link>Views\\Additional\\PasswordRecoveryView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\PasswordView.xaml\">\r\n      <Link>Views\\Additional\\PasswordView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\PrivacySecurityView.xaml\">\r\n      <Link>Views\\Additional\\PrivacySecurityView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\PrivacyStatementView.xaml\">\r\n      <Link>Views\\Additional\\PrivacyStatementView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\SelectMultipleUsersView.xaml\">\r\n      <Link>Views\\Additional\\SelectMultipleUsersView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\SessionsView.xaml\">\r\n      <Link>Views\\Additional\\SessionsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\SettingsView.xaml\">\r\n      <Link>Views\\Additional\\SettingsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ShareView.xaml\">\r\n      <Link>Views\\Additional\\ShareView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\SnapshotsView.xaml\">\r\n      <Link>Views\\Additional\\SnapshotsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\SpecialThanksView.xaml\">\r\n      <Link>Views\\Additional\\SpecialThanksView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\StickersView.xaml\">\r\n      <Link>Views\\Additional\\StickersView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\TelegramPasswordBox.xaml\">\r\n      <Link>Views\\Additional\\TelegramPasswordBox.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Auth\\ConfirmPasswordView.xaml\">\r\n      <Link>Views\\Auth\\ConfirmPasswordView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Auth\\ConfirmView.xaml\">\r\n      <Link>Views\\Auth\\ConfirmView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Auth\\SignInView.xaml\">\r\n      <Link>Views\\Auth\\SignInView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Auth\\SignUpView.xaml\">\r\n      <Link>Views\\Auth\\SignUpView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\AddChannelManagerView.xaml\">\r\n      <Link>Views\\Chats\\AddChannelManagerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\AddChatParticipantView.xaml\">\r\n      <Link>Views\\Chats\\AddChatParticipantView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\AddSecretChatParticipantView.xaml\">\r\n      <Link>Views\\Chats\\AddSecretChatParticipantView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\Chat2View.xaml\">\r\n      <Link>Views\\Chats\\Chat2View.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\ChatDetailsView.xaml\">\r\n      <Link>Views\\Chats\\ChatDetailsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\ChatView.xaml\">\r\n      <Link>Views\\Chats\\ChatView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\EditChatView.xaml\">\r\n      <Link>Views\\Chats\\EditChatView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\InviteLinkView.xaml\">\r\n      <Link>Views\\Chats\\InviteLinkView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\ContactDetailsView.xaml\">\r\n      <Link>Views\\Contacts\\ContactDetailsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\ContactInfoView.xaml\">\r\n      <Link>Views\\Contacts\\ContactInfoView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\ContactView.xaml\">\r\n      <Link>Views\\Contacts\\ContactView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\EditContactView.xaml\">\r\n      <Link>Views\\Contacts\\EditContactView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\SecretContactDetailsView.xaml\">\r\n      <Link>Views\\Contacts\\SecretContactDetailsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\SecretContactView.xaml\">\r\n      <Link>Views\\Contacts\\SecretContactView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\ShareContactView.xaml\">\r\n      <Link>Views\\Contacts\\ShareContactView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\ConversationTileControl.xaml\">\r\n      <Link>Views\\Controls\\ConversationTileControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\MainTitleControl.xaml\">\r\n      <Link>Views\\Controls\\MainTitleControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\MessagePlayerControl.xaml\">\r\n      <Link>Views\\Controls\\MessagePlayerControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\MessageStatusControl.xaml\">\r\n      <Link>Views\\Controls\\MessageStatusControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\SecretPhotoPlaceholder.xaml\">\r\n      <Link>Views\\Controls\\SecretPhotoPlaceholder.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Debug\\DebugView.xaml\">\r\n      <Link>Views\\Debug\\DebugView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Debug\\LongPollView.xaml\">\r\n      <Link>Views\\Debug\\LongPollView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Debug\\PerformanceView.xaml\">\r\n      <Link>Views\\Debug\\PerformanceView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\ChooseDialogView.xaml\">\r\n      <Link>Views\\Dialogs\\ChooseDialogView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\ChooseParticipantsView.xaml\">\r\n      <Link>Views\\Dialogs\\ChooseParticipantsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CommandHintsView.xaml\">\r\n      <Link>Views\\Dialogs\\CommandHintsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CommandsControl.xaml\">\r\n      <Link>Views\\Dialogs\\CommandsControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateBroadcastView.xaml\">\r\n      <Link>Views\\Dialogs\\CreateBroadcastView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateChannelView.xaml\">\r\n      <Link>Views\\Dialogs\\CreateChannelView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateDialogView.xaml\">\r\n      <Link>Views\\Dialogs\\CreateDialogView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\DialogSearchMessagesView.xaml\">\r\n      <Link>Views\\Dialogs\\DialogSearchMessagesView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\EmojiKeyboardControl.xaml\">\r\n      <Link>Views\\Dialogs\\EmojiKeyboardControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\HashtagHintsView.xaml\">\r\n      <Link>Views\\Dialogs\\HashtagHintsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\MessageViewerView.xaml\">\r\n      <Link>Views\\Dialogs\\MessageViewerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\SecretChatDebugView.xaml\">\r\n      <Link>Views\\Dialogs\\SecretChatDebugView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\UserActionView.xaml\">\r\n      <Link>Views\\Dialogs\\UserActionView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\UsernameHintsView.xaml\">\r\n      <Link>Views\\Dialogs\\UsernameHintsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\AnimatedImageViewerView.xaml\">\r\n      <Link>Views\\Media\\AnimatedImageViewerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\DecryptedImageViewerView.xaml\">\r\n      <Link>Views\\Media\\DecryptedImageViewerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\FullMediaView.xaml\">\r\n      <Link>Views\\Media\\FullMediaView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\ImageEditorView.xaml\">\r\n      <Link>Views\\Media\\ImageEditorView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\ImageViewerView.xaml\">\r\n      <Link>Views\\Media\\ImageViewerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\MapView.xaml\">\r\n      <Link>Views\\Media\\MapView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\ProfilePhotoViewerView.xaml\">\r\n      <Link>Views\\Media\\ProfilePhotoViewerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\SecretMediaView.xaml\">\r\n      <Link>Views\\Media\\SecretMediaView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\VideoCaptureView.xaml\">\r\n      <Link>Views\\Media\\VideoCaptureView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\VideoPlayerView.xaml\">\r\n      <Link>Views\\Media\\VideoPlayerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchContactsView.xaml\">\r\n      <Link>Views\\Search\\SearchContactsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchDialogsView.xaml\">\r\n      <Link>Views\\Search\\SearchDialogsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchFilesView.xaml\">\r\n      <Link>Views\\Search\\SearchFilesView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchLinksView.xaml\">\r\n      <Link>Views\\Search\\SearchLinksView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchMessagesView.xaml\">\r\n      <Link>Views\\Search\\SearchMessagesView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchShellView.xaml\">\r\n      <Link>Views\\Search\\SearchShellView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchVenuesView.xaml\">\r\n      <Link>Views\\Search\\SearchVenuesView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\ShellView.xaml\">\r\n      <Link>Views\\ShellView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\LongListSelector.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\ToggleSwitch.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Generic.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\StartupView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Contacts\\ContactsView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\AudioRecorderControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\DialogDetailsView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\DialogsView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\SecretDialogDetailsView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\LinksView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\FilesView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\MediaView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.abc-WXGA.png\">\r\n      <Link>Assets\\emoji.abc-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.backspace-WXGA.png\">\r\n      <Link>Assets\\emoji.backspace-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.category.1-WXGA.png\">\r\n      <Link>Assets\\emoji.category.1-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.category.2-WXGA.png\">\r\n      <Link>Assets\\emoji.category.2-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.category.3-WXGA.png\">\r\n      <Link>Assets\\emoji.category.3-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.category.4-WXGA.png\">\r\n      <Link>Assets\\emoji.category.4-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.category.5-WXGA.png\">\r\n      <Link>Assets\\emoji.category.5-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.recent-WXGA.png\">\r\n      <Link>Assets\\emoji.recent-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.sticker-WXGA.png\">\r\n      <Link>Assets\\emoji.sticker-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\002320E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\002320E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003020E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003020E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003120E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003120E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003220E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003220E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003320E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003320E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003420E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003420E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003520E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003520E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003620E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003620E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003720E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003720E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003820E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003820E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003920E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003920E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\00a9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\00a9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\00ae.png\">\r\n      <Link>Assets\\Emoji\\Separated\\00ae.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\203C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\203C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2049.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2049.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2122.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2122.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2139.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2139.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2194.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2194.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2195.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2195.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2196.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2196.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2197.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2197.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2198.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2198.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2199.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2199.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\21A9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\21A9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\21AA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\21AA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\231A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\231A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\231B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\231B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23e9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23e9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23ea.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23ea.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23eb.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23eb.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23ec.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23ec.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23f0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23f0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23f3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23f3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\24C2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\24C2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25AA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25AA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25AB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25AB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25B6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25B6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25C0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25C0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25FB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25FC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25FD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25FE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2600.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2600.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2601.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2601.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2602.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2602.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2603.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2603.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2604.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2604.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\260E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\260E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2611.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2611.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2614.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2614.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2615.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2615.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2618.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2618.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261DD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261DD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261DD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261DD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261DD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261DD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261DD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261DD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261DD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261DD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2620.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2620.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\263A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\263A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2648.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2648.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2649.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2649.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2650.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2650.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2651.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2651.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2652.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2652.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2653.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2653.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2660.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2660.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2663.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2663.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2665.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2665.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2666.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2666.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2668.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2668.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\267B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\267B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\267F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\267F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2692.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2692.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2693.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2693.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2694.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2694.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2697.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2697.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2699.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2699.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26A0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26A0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26A1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26A1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26AA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26AA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26AB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26AB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26B0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26B0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26B1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26B1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26BD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26BD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26BE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26BE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26C4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26C4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26C5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26C5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26C8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26C8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26ce.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26ce.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26CF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26CF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26D1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26D1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26D3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26D3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26D4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26D4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26E9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26E9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26EA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26EA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26FA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26FA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26FD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26FD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2702.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2702.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2705.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2705.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2709.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2709.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270a.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270a.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270AD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270AD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270AD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270AD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270AD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270AD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270AD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270AD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270AD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270AD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270b.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270b.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270BD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270BD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270BD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270BD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270BD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270BD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270BD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270BD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270BD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270BD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270CD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270CD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270CD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270CD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270CD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270CD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270CD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270CD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270CD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270CD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270DD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270DD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270DD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270DD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270DD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270DD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270DD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270DD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270DD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270DD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2712.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2712.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2714.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2714.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2716.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2716.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2728.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2728.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2733.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2733.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2734.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2734.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2744.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2744.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2747.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2747.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\274c.png\">\r\n      <Link>Assets\\Emoji\\Separated\\274c.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\274e.png\">\r\n      <Link>Assets\\Emoji\\Separated\\274e.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2753.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2753.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2754.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2754.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2755.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2755.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2757.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2757.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2764.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2764.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2795.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2795.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2796.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2796.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2797.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2797.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\27A1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\27A1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\27b0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\27b0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\27bf.png\">\r\n      <Link>Assets\\Emoji\\Separated\\27bf.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2934.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2934.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2935.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2935.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\3030.png\">\r\n      <Link>Assets\\Emoji\\Separated\\3030.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\303D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\303D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\3297.png\">\r\n      <Link>Assets\\Emoji\\Separated\\3297.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\3299.png\">\r\n      <Link>Assets\\Emoji\\Separated\\3299.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDC04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDC04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDCCF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDCCF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD70.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD70.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD71.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD71.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD7E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD7E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD7F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD7F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD94.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD94.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD95.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD95.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD97.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD97.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD98.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD98.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD99.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD99.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD9A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD9A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE9D83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE9D83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEAD83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEAD83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEBD83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEBD83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEFD83CDDF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEFD83CDDF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF7D83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF7D83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFAD83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFAD83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF26.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF26.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF28.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF28.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF29.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF29.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF40.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF40.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF41.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF41.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF42.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF42.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF43.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF43.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF44.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF44.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF45.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF45.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF46.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF46.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF47.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF47.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF48.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF48.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF49.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF49.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF52.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF52.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF53.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF53.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF54.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF54.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF56.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF56.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF57.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF57.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF58.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF58.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF59.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF59.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF60.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF60.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF61.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF61.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF62.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF62.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF63.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF63.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF64.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF64.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF65.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF65.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF68.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF68.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF69.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF69.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF70.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF70.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF71.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF71.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF72.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF72.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF74.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF74.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF75.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF75.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF76.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF76.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF77.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF77.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF78.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF78.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF79.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF79.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF84.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF84.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF86.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF86.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF88.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF88.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF89.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF89.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF97.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF97.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF9F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF9F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFEF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC22.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC22.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC23.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC23.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC26.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC26.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC28.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC28.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC29.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC29.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC40.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC40.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC41.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC41.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC44.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC44.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC45.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC45.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4AD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4AD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4AD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4AD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4AD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4AD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4AD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4AD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4AD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4AD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4BD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4BD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4BD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4BD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4BD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4BD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4BD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4BD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4BD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4BD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4CD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4CD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4CD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4CD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4CD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4CD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4CD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4CD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4CD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4CD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4DD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4DD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4DD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4DD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4DD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4DD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4DD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4DD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4DD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4DD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4ED83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4ED83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4ED83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4ED83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4ED83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4ED83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4ED83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4ED83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4ED83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4ED83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4FD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4FD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4FD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4FD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4FD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4FD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4FD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4FD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4FD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4FD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC52.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC52.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC53.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC53.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC54.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC54.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC56.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC56.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC57.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC57.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC58.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC58.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC59.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC59.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC60.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC60.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC61.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC61.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC62.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC62.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC63.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC63.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC64.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC64.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC65.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC65.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC79.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC79.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7CD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7CD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7CD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7CD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7CD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7CD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7CD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7CD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7CD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7CD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC84.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC84.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC88.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC88.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC89.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC89.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC94.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC94.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC95.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC95.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC97.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC97.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC98.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC98.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC99.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC99.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAAD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAAD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAAD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAAD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAAD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAAD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAAD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAAD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAAD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAAD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC70.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC70.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC70D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC70D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC70D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC70D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC70D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC70D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC70D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC70D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC70D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC70D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC77.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC77.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC77D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC77D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC77D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC77D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC77D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC77D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC77D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC77D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC77D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC77D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC78.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC78.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC78D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC78D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC78D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC78D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC78D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC78D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC78D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC78D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC78D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC78D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC7C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC7C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC7CD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC7CD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC7CD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC7CD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC7CD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC7CD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC7CD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC7CD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC7CD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC7CD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC81D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC81D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC81D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC81D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC81D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC81D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC81D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC81D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC81D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC81D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC82D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC82D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC82D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC82D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC82D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC82D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC82D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC82D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC82D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC82D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC83D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC83D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC83D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC83D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC83D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC83D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC83D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC83D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC83D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC83D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE45.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE45.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE45D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE45D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE45D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE45D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE45D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE45D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE45D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE45D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE45D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE45D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE46.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE46.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE46D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE46D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE46D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE46D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE46D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE46D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE46D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE46D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE46D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE46D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE47.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE47.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE47D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE47D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE47D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE47D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE47D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE47D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE47D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE47D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE47D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE47D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCEF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD22.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD22.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD23.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD23.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD26.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD26.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD28.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD28.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD29.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD29.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD4C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD4C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD4D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD4D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD52.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD52.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD53.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD53.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD54.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD54.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD56.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD56.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD57.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD57.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD58.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD58.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD59.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD59.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD60.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD60.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD61.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD61.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD62.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD62.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD63.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD63.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD64.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD64.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD65.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD65.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD6F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD6F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD74.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD74.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD76.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD76.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD77.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD77.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD78.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD78.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDC2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDC2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDC3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDC3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDC4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDC4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDD1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDD1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDD2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDD2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDD3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDD3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDDD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDDD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDDE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDDE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDE1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDE1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDE3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDE3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE22.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE22.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE23.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE23.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE26.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE26.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE28.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE28.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE29.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE29.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE40.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE40.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE48.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE48.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE49.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE49.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4CD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4CD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4CD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4CD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4CD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4CD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4CD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4CD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4CD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4CD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4FD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4FD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4FD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4FD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4FD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4FD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4FD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4FD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4FD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4FD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE84.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE84.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE85.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE85.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE86.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE86.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE88.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE88.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE89.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE89.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE94.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE94.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE95.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE95.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE97.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE97.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE98.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE98.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE99.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE99.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDECB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDECB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDECC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDECC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDECD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDECD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDECE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDECE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDECF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDECF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD18D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD18D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD18D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD18D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD18D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD18D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD18D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD18D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD18D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD18D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD84.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD84.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDDC0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDDC0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat0_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat1_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat2_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat3_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSpritesLandscape\\sprite64_landscape_cat4_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part5.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part5.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part6.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part5.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.abc-WXGA.png\">\r\n      <Link>Assets\\light.emoji.abc-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.backspace-WXGA.png\">\r\n      <Link>Assets\\light.emoji.backspace-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.category.1-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.1-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.category.2-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.2-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.category.3-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.3-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.category.4-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.4-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.category.5-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.5-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.recent-WXGA.png\">\r\n      <Link>Assets\\light.emoji.recent-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.sticker-WXGA.png\">\r\n      <Link>Assets\\light.emoji.sticker-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.add.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.add.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.attach.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.attach.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.basecircle.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.basecircle.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.cancel.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.cancel.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.check.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.check.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.delete.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.delete.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.edit.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.edit.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.feature.search.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.feature.search.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.feature.video.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.feature.video.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.forwardmessage.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.forwardmessage.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.manage.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.manage.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.map.centerme.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.map.centerme.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.map.checkin.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.map.checkin.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.map.direction.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.map.direction.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.next.light.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.next.light.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.next.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.next.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.refresh.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.refresh.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.save.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.save.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.send.text.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.send.text.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.share.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.share.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.smile.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.smile.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.stop.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.stop.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.transport.play.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.transport.play.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Audio\\appbar.basecircle.rest.png\">\r\n      <Link>Images\\Audio\\appbar.basecircle.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Audio\\appbar.download.rest.png\">\r\n      <Link>Images\\Audio\\appbar.download.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Audio\\appbar.transport.pause.rest.png\">\r\n      <Link>Images\\Audio\\appbar.transport.pause.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Audio\\appbar.transport.play.rest.png\">\r\n      <Link>Images\\Audio\\appbar.transport.play.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Backgrounds\\gallery_WXGA.png\">\r\n      <Link>Images\\Backgrounds\\gallery_WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Backgrounds\\wallpapercheck_WXGA.png\">\r\n      <Link>Images\\Backgrounds\\wallpapercheck_WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\broadcast-WXGA.png\">\r\n      <Link>Images\\Dialogs\\broadcast-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.check-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.check-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.commands-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.commands-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.customkeyboard-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.customkeyboard-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.gas-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.gas-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.keyboard-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.keyboard-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.mute-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.mute-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.state.read-black-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.state.read-black-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.state.sent-black-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.state.sent-black-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\group-WXGA.png\">\r\n      <Link>Images\\Dialogs\\group-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\passcode.close-WXGA.png\">\r\n      <Link>Images\\Dialogs\\passcode.close-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\passcode.open-WXGA.png\">\r\n      <Link>Images\\Dialogs\\passcode.open-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\secretchat-black-WXGA.png\">\r\n      <Link>Images\\Dialogs\\secretchat-black-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\secretchat-white-WXGA.png\">\r\n      <Link>Images\\Dialogs\\secretchat-white-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\secretchat-WXGA.png\">\r\n      <Link>Images\\Dialogs\\secretchat-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\LockScreen\\lockscreen.logo.png\">\r\n      <Link>Images\\LockScreen\\lockscreen.logo.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\LockScreen\\lockscreen.logo.white.png\">\r\n      <Link>Images\\LockScreen\\lockscreen.logo.white.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\LockScreen\\lockscreen.png\">\r\n      <Link>Images\\LockScreen\\lockscreen.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Maps\\4SQ.png\">\r\n      <Link>Images\\Maps\\4SQ.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Maps\\attach-location-black.png\">\r\n      <Link>Images\\Maps\\attach-location-black.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Maps\\Map_Pin.png\">\r\n      <Link>Images\\Maps\\Map_Pin.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\channel.broadcast-WXGA.png\">\r\n      <Link>Images\\Messages\\channel.broadcast-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\chat.nomessages-white-WXGA.png\">\r\n      <Link>Images\\Messages\\chat.nomessages-white-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\chat.nomessages-WXGA.png\">\r\n      <Link>Images\\Messages\\chat.nomessages-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\chat_doc-WXGA.png\">\r\n      <Link>Images\\Messages\\chat_doc-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\file.black-WXGA.png\">\r\n      <Link>Images\\Messages\\file.black-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\file.white-WXGA.png\">\r\n      <Link>Images\\Messages\\file.white-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\link.png\">\r\n      <Link>Images\\Messages\\link.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\media.black-WXGA.png\">\r\n      <Link>Images\\Messages\\media.black-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\media.download-WXGA.png\">\r\n      <Link>Images\\Messages\\media.download-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\media.white-WXGA.png\">\r\n      <Link>Images\\Messages\\media.white-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.deletereply.png\">\r\n      <Link>Images\\Messages\\message.deletereply.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.state.broadcast.png\">\r\n      <Link>Images\\Messages\\message.state.broadcast.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.state.read-WXGA.png\">\r\n      <Link>Images\\Messages\\message.state.read-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.state.sending-WXGA.png\">\r\n      <Link>Images\\Messages\\message.state.sending-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.state.sent-WXGA.png\">\r\n      <Link>Images\\Messages\\message.state.sent-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.state.views-WXGA.png\">\r\n      <Link>Images\\Messages\\message.state.views-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\unreadmessages.png\">\r\n      <Link>Images\\Messages\\unreadmessages.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\NumericKeyboard\\back.png\">\r\n      <Link>Images\\NumericKeyboard\\back.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\NumericKeyboard\\back.white.png\">\r\n      <Link>Images\\NumericKeyboard\\back.white.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\PhoneNumber\\changenumber_2x.png\">\r\n      <Link>Images\\PhoneNumber\\changenumber_2x.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Placeholder\\placeholder.broadcast.png\">\r\n      <Link>Images\\Placeholder\\placeholder.broadcast.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Placeholder\\placeholder.group.transparent-WXGA.png\">\r\n      <Link>Images\\Placeholder\\placeholder.group.transparent-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Placeholder\\placeholder.user.transparent-WXGA.png\">\r\n      <Link>Images\\Placeholder\\placeholder.user.transparent-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.1-720p.png\">\r\n      <Link>Images\\Startup\\intro.1-720p.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.2-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.2-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.3-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.3-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.4-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.4-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.5-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.5-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.6-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.6-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Default.wav\">\r\n      <Link>Sounds\\Default.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound1.wav\">\r\n      <Link>Sounds\\Sound1.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound2.wav\">\r\n      <Link>Sounds\\Sound2.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound3.wav\">\r\n      <Link>Sounds\\Sound3.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound4.wav\">\r\n      <Link>Sounds\\Sound4.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound5.wav\">\r\n      <Link>Sounds\\Sound5.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound6.wav\">\r\n      <Link>Sounds\\Sound6.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\ToastPromptIcon.png\">\r\n      <Link>ToastPromptIcon.png</Link>\r\n    </Content>\r\n    <Content Include=\"ApplicationIcon210.png\" />\r\n    <Content Include=\"ARM\\libwebp.dll\">\r\n      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"IconicSmall110.png\" />\r\n    <Content Include=\"IconicTileMedium159.png\" />\r\n    <Content Include=\"IconicTileMedium202.png\" />\r\n    <None Include=\"Properties\\WMAppManifest.Public.xml\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n    <None Include=\"Properties\\WMAppManifest.Private.xml\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n    <Content Include=\"Images\\Audio\\microphone.dark.png\" />\r\n    <Content Include=\"Images\\Audio\\microphone.light.png\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\ExifLib\\ExifLib.csproj\">\r\n      <Project>{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}</Project>\r\n      <Name>ExifLib</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\Telegram.Api.WP8\\Telegram.Api.WP8.csproj\">\r\n      <Project>{E79D5093-8038-4A5F-8A98-CA38C0D0886F}</Project>\r\n      <Name>Telegram.Api.WP8</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\Telegram.Controls\\Telegram.Controls.csproj\">\r\n      <Project>{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}</Project>\r\n      <Name>Telegram.Controls</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\TelegramClient.Opus\\TelegramClient.Opus.vcxproj\">\r\n      <Project>{5E327850-E16E-4642-957A-FD52BF8D3D02}</Project>\r\n      <Name>TelegramClient.Opus</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\TelegramClient.Player\\TelegramClient.Player.csproj\">\r\n      <Project>{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}</Project>\r\n      <Name>TelegramClient.Player</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\TelegramClient.ScheduledTaskAgent.WP8\\TelegramClient.ScheduledTaskAgent.WP8.csproj\">\r\n      <Project>{30ADA306-4873-4AF3-99D3-BE57E723013C}</Project>\r\n      <Name>TelegramClient.ScheduledTaskAgent.WP8</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\TelegramClient.WebP\\TelegramClient.WebP.vcxproj\">\r\n      <Project>{FAE12FD9-EDCA-433E-AD11-F1663A998F35}</Project>\r\n      <Name>TelegramClient.WebP</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.de.resx\">\r\n      <Link>Resources\\AppResources.de.resx</Link>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.es.resx\">\r\n      <Link>Resources\\AppResources.es.resx</Link>\r\n      <SubType>Designer</SubType>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.it.resx\">\r\n      <Link>Resources\\AppResources.it.resx</Link>\r\n      <SubType>Designer</SubType>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.nl.resx\">\r\n      <Link>Resources\\AppResources.nl.resx</Link>\r\n      <SubType>Designer</SubType>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.pt.resx\">\r\n      <Link>Resources\\AppResources.pt.resx</Link>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.resx\">\r\n      <Link>Resources\\AppResources.resx</Link>\r\n      <SubType>Designer</SubType>\r\n    </EmbeddedResource>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"Images\\Backgrounds\\Dark\\\" />\r\n    <Folder Include=\"Images\\Backgrounds\\Light\\\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n  <Target Name=\"BeforeBuild\">\r\n    <Delete Files=\"Properties\\WMAppManifest.xml\" />\r\n    <Copy SourceFiles=\"Properties\\WMAppManifest.Private.xml\" DestinationFiles=\"Properties\\WMAppManifest.xml\" OverwriteReadOnlyFiles=\"True\" Condition=\" '$(Configuration)' == 'Release Private Beta' Or '$(Configuration)' == 'Debug Private Beta'\" />\r\n    <Copy SourceFiles=\"Properties\\WMAppManifest.Public.xml\" DestinationFiles=\"Properties\\WMAppManifest.xml\" OverwriteReadOnlyFiles=\"True\" Condition=\" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Debug'\" />\r\n  </Target>\r\n  <ProjectExtensions />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n</Project>"
  },
  {
    "path": "TelegramClient.WP8/Themes/Default/LongListSelector.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\">\r\n\r\n    <Style x:Key=\"ViewportControlStyle1\" TargetType=\"ViewportControl\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ViewportControl\">\r\n                    <ContentPresenter x:Name=\"ContentElement\" Cursor=\"{TemplateBinding Cursor}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    \r\n    <Style x:Key=\"LazyLongListSelectorStyle2\" TargetType=\"phone:LongListSelector\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"phone:LongListSelector\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Scrolling\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"NotScrolling\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Margin=\"{TemplateBinding Padding}\">\r\n                            <ViewportControl x:Name=\"ViewportControl\" Margin=\"0,0,0,0\" HorizontalContentAlignment=\"Stretch\" VerticalAlignment=\"Top\" Style=\"{StaticResource ViewportControlStyle1}\"/>\r\n                            <ScrollBar x:Name=\"VerticalScrollBar\" Margin=\"0,0,0,0\" Opacity=\"0\" HorizontalAlignment=\"Right\" Orientation=\"Vertical\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"LazyLongListSelectorStyle\" TargetType=\"phone:LongListSelector\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"phone:LongListSelector\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Scrolling\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"NotScrolling\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Margin=\"{TemplateBinding Padding}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <!--<ColumnDefinition Width=\"auto\"/>-->\r\n                            </Grid.ColumnDefinitions>\r\n                            <ViewportControl x:Name=\"ViewportControl\" Margin=\"0,0,-48,0\" HorizontalContentAlignment=\"Stretch\" VerticalAlignment=\"Top\" Style=\"{StaticResource ViewportControlStyle1}\"/>\r\n                            <ScrollBar x:Name=\"VerticalScrollBar\" Margin=\"0,0,0,0\" Opacity=\"0\" HorizontalAlignment=\"Left\" Orientation=\"Vertical\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "TelegramClient.WP8/Themes/Default/ToggleSwitch.xaml",
    "content": "﻿<ResourceDictionary\r\n\txmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n\txmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n\txmlns:toolkitPrimitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n\txmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\">\r\n\r\n\r\n    <Style TargetType=\"toolkit:ToggleSwitch\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyLight}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeLarge}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"SwitchForeground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkit:ToggleSwitch\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CacheMode=\"BitmapCache\" Padding=\"{TemplateBinding Padding}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.3\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Header\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.3\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Content\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Margin=\"12,5,12,42\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <ContentControl x:Name=\"Header\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" Content=\"{TemplateBinding Header}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"{StaticResource PhoneFontSizeNormal}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" HorizontalAlignment=\"Left\" IsTabStop=\"False\" Margin=\"-1,0,0,0\" Opacity=\"{TemplateBinding Opacity}\" VerticalAlignment=\"Bottom\"/>\r\n                            <ContentControl x:Name=\"Content\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsTabStop=\"False\" Margin=\"-1,1,0,-7\" Opacity=\"{TemplateBinding Opacity}\" Grid.Row=\"1\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            <toolkitPrimitives:ToggleSwitchButton x:Name=\"Switch\" Background=\"{TemplateBinding Background}\" Grid.Column=\"1\" Margin=\"-22,-29,0,-28\" Opacity=\"{TemplateBinding Opacity}\" Grid.RowSpan=\"2\" SwitchForeground=\"{TemplateBinding SwitchForeground}\" VerticalAlignment=\"Bottom\"/>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "TelegramClient.WP8/Themes/Generic.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:startView=\"clr-namespace:TelegramClient.Controls.StartView\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\">\r\n    <Style TargetType=\"emojiPanel:TestScrollableTextBlock\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"emojiPanel:TestScrollableTextBlock\">\r\n                    <StackPanel x:Name=\"StackPanel\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"emojiPanel:TelegramRichTextBox\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n        <Setter Property=\"Padding\" Value=\"12,0\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"emojiPanel:TelegramRichTextBox\">\r\n                    <StackPanel Orientation=\"Vertical\" x:Name=\"StackPanel\"/>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    \n    <Style TargetType=\"startView:StartViewItem\">\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\n        <Setter Property=\"Template\">\n            <Setter.Value>\n                <ControlTemplate TargetType=\"startView:StartViewItem\">\n                    <Border Margin=\"{StaticResource PhoneHorizontalMargin}\" Background=\"{TemplateBinding Background}\">\n                        <ContentPresenter Content=\"{TemplateBinding Content}\" Margin=\"{TemplateBinding Padding}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\n                    </Border>\n                </ControlTemplate>\n            </Setter.Value>\n        </Setter>\n    </Style>\n\n    <Style TargetType=\"startView:StartView\">\n        <Setter Property=\"ItemsPanel\">\n            <Setter.Value>\n                <ItemsPanelTemplate>\n                    <startView:StartViewPanel/>\n                </ItemsPanelTemplate>\n            </Setter.Value>\n        </Setter>\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\n        <Setter Property=\"Template\">\n            <Setter.Value>\n                <ControlTemplate TargetType=\"startView:StartView\">\n                    \n                    <Border Background=\"{TemplateBinding Background}\">\n                        <StackPanel Orientation=\"Horizontal\" HorizontalAlignment=\"Left\">\n                            <StackPanel.RenderTransform>\n                                <TranslateTransform x:Name=\"PanningTransform\"/>\n                            </StackPanel.RenderTransform>\n                            <ItemsPresenter CacheMode=\"BitmapCache\"/>\n                        </StackPanel>\n                        \n                    </Border>\n                </ControlTemplate>\n            </Setter.Value>\n        </Setter>\n    </Style>\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "TelegramClient.WP8/ViewModels/Contacts/ContactsViewModel.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Globalization;\r\nusing Microsoft.Phone.Tasks;\r\nusing Microsoft.Phone.UserData;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Search;\r\n\r\nnamespace TelegramClient.ViewModels.Contacts\r\n{\r\n    public class ContactsViewModel : ItemsViewModelBase<TLUserBase>,\r\n        IHandle<string>,\r\n        IHandle<TLUserBase>,\r\n        IHandle<TaskCompleted<SaveContactResult>>\r\n    {\r\n        private ObservableCollection<AlphaKeyGroup<TLUserBase>> _contacts;\r\n\r\n        public ObservableCollection<AlphaKeyGroup<TLUserBase>> Contacts\r\n        {\r\n            get { return _contacts; }\r\n            set { SetField(ref _contacts, value, () => Contacts); }\r\n        }\r\n\r\n        private volatile bool _isGettingContacts;\r\n\r\n        public bool FirstRun { get; set; }\r\n\r\n        public ContactsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, IEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Items = new AlphaKeyGroup<TLUserBase>(\"@\");\r\n\r\n            _contacts = new ObservableCollection<AlphaKeyGroup<TLUserBase>>();\r\n            _contacts.Add((AlphaKeyGroup<TLUserBase>)Items);\r\n\r\n            DisplayName = LowercaseConverter.Convert(AppResources.Contacts);\r\n            Status = AppResources.Loading;\r\n\r\n            EventAggregator.Subscribe(this);\r\n        }\r\n\r\n        private void UpdateItemsAsync()\r\n        {\r\n            _isGettingContacts = true;\r\n            //IsWorking = true;\r\n            var contactIds = string.Join(\",\", Items.Select(x => x.Index).OrderBy(x => x));\r\n            var hash = MD5Core.GetHash(contactIds);\r\n            var hashString = BitConverter.ToString(hash).Replace(\"-\", string.Empty).ToLower();\r\n            MTProtoService.GetContactsAsync(new TLString(hashString),\r\n                result =>\r\n                {\r\n                    _isGettingContacts = false;\r\n\r\n                    //IsWorking = false;\r\n                    if (result is TLContactsNotModified)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    InsertContacts(((TLContacts)result).Users, false);\r\n                },\r\n                error =>\r\n                {\r\n                    _isGettingContacts = false;\r\n                    //IsWorking = false;\r\n                });\r\n        }\r\n\r\n        private bool _runOnce = true;\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            //if (FirstRun)\r\n            //{\r\n            //    SignInImport();\r\n            //}\r\n            //else\r\n            {\r\n                if (!_runOnce)\r\n                {\r\n                    BeginOnThreadPool(() =>\r\n                    {\r\n                        Thread.Sleep(300);\r\n                        try\r\n                        {\r\n                            foreach (var item in Items)\r\n                            {\r\n                                item.NotifyOfPropertyChange(\"Status\");\r\n                            }\r\n\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            TLUtils.WriteLine(e.ToString(), LogSeverity.Error);\r\n                        }\r\n                    });\r\n\r\n                    return;\r\n                }\r\n                _runOnce = false;\r\n                //BeginOnThreadPool(() =>\r\n                {\r\n#if WP7\r\n                    Thread.Sleep(400);\r\n#endif\r\n                    var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                    if (isAuthorized)\r\n                    {\r\n                        Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.Loading : string.Empty;\r\n                        var contacts = CacheService.GetContacts();\r\n                        Status = string.Empty;\r\n                        var orderedContacts = contacts.OrderBy(x => x.FullName).ToList();\r\n                        var count = 0;\r\n\r\n                        Items.Clear();\r\n                        for (var i = 0; count < 10 && i < orderedContacts.Count; i++)\r\n                        {\r\n                            if (!(orderedContacts[i] is TLUserEmpty)\r\n                                && orderedContacts[i].Index != StateService.CurrentUserId)\r\n                            {\r\n                                Items.Add(orderedContacts[i]);\r\n                            }\r\n                            count++;\r\n                        }\r\n\r\n                        LazyItems.Clear();\r\n                        for (var i = count; i < orderedContacts.Count; i++)\r\n                        {\r\n                            if (!(orderedContacts[i] is TLUserEmpty) && orderedContacts[i].Index != StateService.CurrentUserId)\r\n                            {\r\n                                LazyItems.Add(orderedContacts[i]);\r\n                            }\r\n                        }\r\n\r\n\r\n                        Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.Loading : string.Empty;\r\n                        if (LazyItems.Count > 0)\r\n                        {\r\n                            PopulateItems(() =>\r\n                            {\r\n                                ImportContactsAsync();\r\n                                UpdateItemsAsync();\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            ImportContactsAsync();\r\n                            UpdateItemsAsync();\r\n                        }\r\n                    }\r\n                }//);\r\n            }\r\n        }\r\n\r\n        #region Commands\r\n\r\n        public void AddContact()\r\n        {\r\n            EventAggregator.RequestTask<SaveContactTask>();\r\n        }\r\n\r\n        public void DeleteContact(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            MTProtoService.DeleteContactAsync(\r\n                user.ToInputUser(),\r\n                link => Items.Remove(user),\r\n                error =>\r\n                {\r\n                    \r\n                });\r\n        }\r\n\r\n        public void UserAction(TLUserBase user)\r\n        {\r\n            OpenContactDetails(user);\r\n        }\r\n\r\n        public FrameworkElement OpenContactElement;\r\n\r\n        public void SetOpenContactElement(object element)\r\n        {\r\n            OpenContactElement = element as FrameworkElement;\r\n        }\r\n\r\n        public void OpenContactDetails(TLUserBase user)\r\n        {\r\n            if (user == null || user is TLUserEmpty) return;\r\n\r\n            if (user is TLUserNotRegistered)\r\n            {\r\n                //return;\r\n\r\n                EventAggregator.RequestTask<SmsComposeTask>(t =>\r\n                {\r\n                    t.Body = AppResources.InviteFriendMessage;\r\n                    t.To = user.Phone.ToString();\r\n                });\r\n                return;\r\n            }\r\n\r\n            StateService.DialogMessages = CacheService.GetHistory(user.Index);\r\n            StateService.With = user;\r\n            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n        }\r\n\r\n        private Stopwatch _stopwatch;\r\n\r\n        private void ImportContactsAsync(bool fullReplace = false)\r\n        {\r\n            var contacts = new Microsoft.Phone.UserData.Contacts();\r\n            contacts.SearchCompleted += (e, args) => OnSearchCompleted(e, args, fullReplace);\r\n            _stopwatch = Stopwatch.StartNew();\r\n            contacts.SearchAsync(string.Empty, FilterKind.None, null);\r\n        }\r\n\r\n        private char _prevKey = '#';\r\n\r\n        private void OnSearchCompleted(object sender, ContactsSearchEventArgs args, bool fullReplace)\r\n        {\r\n\r\n            TLUtils.WritePerformance(\"::Search contacts time: \" + _stopwatch.Elapsed);\r\n            _stopwatch = Stopwatch.StartNew();\r\n            var contacts = args.Results;\r\n\r\n            //var usersCache = Items.ToDictionary(x => x.Index);\r\n\r\n            var contactsCache = new Dictionary<string, Contact>();\r\n            var notRegisteredContacts = new List<TLUserNotRegistered>();\r\n            foreach (var contact in contacts)\r\n            {\r\n                foreach (var phoneNumber in contact.PhoneNumbers)\r\n                {\r\n                    if (!contactsCache.ContainsKey(phoneNumber.PhoneNumber))\r\n                    {\r\n                        contactsCache.Add(phoneNumber.PhoneNumber, contact);\r\n                    }\r\n                }\r\n                var completeName = contact.CompleteName;\r\n                var firstName = completeName != null ? completeName.FirstName ?? \"\" : \"\";\r\n                var lastName = completeName != null ? completeName.LastName ?? \"\" : \"\";\r\n\r\n\r\n                if (string.IsNullOrEmpty(firstName) \r\n                    && string.IsNullOrEmpty(lastName))\r\n                {\r\n                    if (!string.IsNullOrEmpty(contact.DisplayName))\r\n                    {\r\n                        firstName = contact.DisplayName;\r\n                    }\r\n                    else\r\n                    {\r\n                        continue;\r\n                    }\r\n                }\r\n\r\n                var clientId = contact.GetHashCode();\r\n                var phone = contact.PhoneNumbers.FirstOrDefault();\r\n                if (phone != null)\r\n                    //&& !usersCache.ContainsKey(clientId))\r\n                {\r\n                    var notRegisteredUser = new TLUserNotRegistered\r\n                    {\r\n                        Id = new TLInt(-1),\r\n                        Phone = new TLString(phone.PhoneNumber),\r\n                        _firstName = new TLString(firstName),\r\n                        _lastName = new TLString(lastName),\r\n                        ClientId = new TLLong(clientId),\r\n                        _photo = new TLPhotoEmpty(),\r\n                        PhoneNumbers = contact.PhoneNumbers\r\n                    };\r\n\r\n                    if (lastName.Length > 0)\r\n                    {\r\n                        notRegisteredContacts.Add(notRegisteredUser);\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            TLUtils.WritePerformance(\"::Get not registered phones time: \" + _stopwatch.Elapsed);\r\n\r\n            _stopwatch = Stopwatch.StartNew();\r\n\r\n            var groups = AlphaKeyGroup<TLUserBase>.CreateGroups(\r\n                notRegisteredContacts,\r\n                Thread.CurrentThread.CurrentUICulture,\r\n                x => x.FullName,\r\n                false);\r\n\r\n\r\n            TLUtils.WritePerformance(\"::Get groups time: \" + _stopwatch.Elapsed);\r\n\r\n            foreach (var @group in groups)\r\n            {\r\n                var gr = new AlphaKeyGroup<TLUserBase>(@group.Key);\r\n                foreach (var u in @group.OrderBy(x => x.FullName))\r\n                {\r\n                    gr.Add(u);\r\n                }\r\n\r\n                BeginOnUIThread(() =>\r\n                {\r\n                    Contacts.Add(gr);\r\n                });\r\n            }\r\n\r\n            var phones = contactsCache.Keys.Take(Constants.MaxImportingContactsCount).ToList();\r\n            var importingContacts = new TLVector<TLInputContactBase>();\r\n            foreach (var phone in phones)\r\n            {\r\n                var completeName = contactsCache[phone].CompleteName;\r\n\r\n                var firstName = completeName != null ? completeName.FirstName ?? \"\" : \"\";\r\n                var lastName = completeName != null ? completeName.LastName ?? \"\" : \"\";\r\n\r\n                if (string.IsNullOrEmpty(firstName)\r\n                    && string.IsNullOrEmpty(lastName))\r\n                {\r\n                    if (!string.IsNullOrEmpty(contactsCache[phone].DisplayName))\r\n                    {\r\n                        firstName = contactsCache[phone].DisplayName;\r\n                    }\r\n                    else\r\n                    {\r\n                        continue;\r\n                    }\r\n                }\r\n\r\n                if (firstName == \"\" && lastName == \"\") continue;\r\n\r\n\r\n                var contact = new TLInputContact\r\n                {\r\n                    Phone = new TLString(phone),\r\n                    FirstName = new TLString(firstName),\r\n                    LastName = new TLString(lastName),\r\n                    ClientId = new TLLong(contactsCache[phone].GetHashCode())\r\n                };\r\n\r\n                importingContacts.Add(contact);\r\n            }\r\n\r\n            _isLoading = true;\r\n            var getResponse = false;\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                Thread.Sleep(1500);\r\n                if (!getResponse)\r\n                {\r\n                    IsWorking = true;\r\n                }\r\n            });\r\n            //IsWorking = true;\r\n            MTProtoService.ImportContactsAsync(importingContacts, new TLBool(false),\r\n                importedContacts =>\r\n                {\r\n                    getResponse = true;\r\n                    _isLoading = true;\r\n                    IsWorking = false;\r\n                    Status = Items.Count == 0 && LazyItems.Count == 0 && importedContacts.Users.Count == 0\r\n                        ? string.Format(\"{0}\", AppResources.NoContactsHere)\r\n                        : string.Empty;\r\n                    InsertContacts(importedContacts.Users, fullReplace);\r\n                },\r\n                error =>\r\n                {\r\n                    getResponse = true;\r\n                    _isLoading = true;\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                });\r\n        }\r\n\r\n        private bool _isLoading;\r\n\r\n        public override void RefreshItems()\r\n        {\r\n            ImportContactsAsync(true);\r\n        }\r\n\r\n        public void InviteFriends()\r\n        {\r\n            EventAggregator.RequestTask<SmsComposeTask>(t => t.Body = AppResources.InviteFriendMessage);\r\n        }\r\n\r\n        private void InsertContacts(IEnumerable<TLUserBase> newUsers, bool fullReplace)\r\n        {\r\n            var itemsCache = Items.OfType<TLUserContact>().ToDictionary(x => x.Index);\r\n            \r\n\r\n\r\n            var users = newUsers.OrderByDescending(x => x.FullName);\r\n            var addingUsers = new List<TLUserBase>();\r\n\r\n            //if (fullReplace)\r\n            //{\r\n            //    Items.Clear();\r\n            //    addingUsers.AddRange(users);\r\n            //}\r\n            //else\r\n            {\r\n                foreach (var user in users)\r\n                {\r\n                    if (!itemsCache.ContainsKey(user.Index) && !(user is TLUserEmpty) && user.Index != StateService.CurrentUserId)\r\n                    {\r\n                        addingUsers.Add(user);\r\n                    }\r\n                }\r\n            }\r\n\r\n            Status = addingUsers.Count != 0 || Items.Count != 0 || LazyItems.Count != 0 ? string.Empty : Status;\r\n            foreach (var addingUser in addingUsers)\r\n            {\r\n                InsertContact(addingUser);\r\n            }\r\n        }\r\n\r\n        private void InsertContact(TLUserBase user)\r\n        {\r\n            var comparer = Comparer<string>.Default;\r\n            var position = 0;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                if (comparer.Compare(Items[i].FullName, user.FullName) == 0)\r\n                {\r\n                    position = -1;\r\n                    break;\r\n                }\r\n                if (comparer.Compare(Items[i].FullName, user.FullName) > 0)\r\n                {\r\n                    position = i;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (position != -1)\r\n            {\r\n                BeginOnUIThread(() => Items.Insert(position, user));\r\n                //Thread.Sleep(20);\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        public void Handle(string command)\r\n        {\r\n            if (string.Equals(command, Commands.LogOutCommand))\r\n            {\r\n                _runOnce = true;\r\n                LazyItems.Clear();\r\n                Items.Clear();\r\n                Status = string.Empty;\r\n                IsWorking = false;\r\n            }\r\n        }\r\n\r\n        public void Handle(TaskCompleted<SaveContactResult> taskCompleted)\r\n        {\r\n            if (taskCompleted.Result.TaskResult == TaskResult.OK)\r\n            {\r\n                ImportContactsAsync();\r\n            }\r\n        }\r\n\r\n        public void Search()\r\n        {\r\n            NavigationService.UriFor<SearchContactsViewModel>().Navigate();\r\n        }\r\n\r\n        public void Handle(TLUserBase user)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var item = Items.FirstOrDefault(x => x.Index == user.Index);\r\n                if (item != null)\r\n                {\r\n                    if (!(user is TLUserContact))\r\n                    {\r\n                        Items.Remove(item);\r\n                    }\r\n                }\r\n                else if (user is TLUserContact)\r\n                {\r\n                    InsertContact(user);\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    public class AlphaKeyGroup<T> : ObservableCollection<T>\r\n    {\r\n        /// <summary>\r\n        /// The delegate that is used to get the key information.\r\n        /// </summary>\r\n        /// <param name=\"item\">An object of type T</param>\r\n        /// <returns>The key value to use for this object</returns>\r\n        public delegate string GetKeyDelegate(T item);\r\n\r\n        /// <summary>\r\n        /// The Key of this group.\r\n        /// </summary>\r\n        public string Key { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Public constructor.\r\n        /// </summary>\r\n        /// <param name=\"key\">The key for this group.</param>\r\n        public AlphaKeyGroup(string key)\r\n        {\r\n            Key = key;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Create a list of AlphaGroup<T> with keys set by a SortedLocaleGrouping.\r\n        /// </summary>\r\n        /// <param name=\"slg\">The </param>\r\n        /// <returns>Theitems source for a LongListSelector</returns>\r\n        private static List<AlphaKeyGroup<T>> CreateGroups(SortedLocaleGrouping slg)\r\n        {\r\n            List<AlphaKeyGroup<T>> list = new List<AlphaKeyGroup<T>>();\r\n\r\n            foreach (string key in slg.GroupDisplayNames)\r\n            {\r\n                list.Add(new AlphaKeyGroup<T>(key));\r\n            }\r\n\r\n            return list;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Create a list of AlphaGroup<T> with keys set by a SortedLocaleGrouping.\r\n        /// </summary>\r\n        /// <param name=\"items\">The items to place in the groups.</param>\r\n        /// <param name=\"ci\">The CultureInfo to group and sort by.</param>\r\n        /// <param name=\"getKey\">A delegate to get the key from an item.</param>\r\n        /// <param name=\"sort\">Will sort the data if true.</param>\r\n        /// <returns>An items source for a LongListSelector</returns>\r\n        public static List<AlphaKeyGroup<T>> CreateGroups(IEnumerable<T> items, CultureInfo ci, GetKeyDelegate getKey, bool sort)\r\n        {\r\n            SortedLocaleGrouping slg = new SortedLocaleGrouping(ci);\r\n            List<AlphaKeyGroup<T>> list = CreateGroups(slg);\r\n\r\n            foreach (T item in items)\r\n            {\r\n                int index = 0;\r\n                if (slg.SupportsPhonetics)\r\n                {\r\n                    //check if your database has yomi string for item\r\n                    //if it does not, then do you want to generate Yomi or ask the user for this item.\r\n                    //index = slg.GetGroupIndex(getKey(Yomiof(item)));\r\n                }\r\n                else\r\n                {\r\n                    index = slg.GetGroupIndex(getKey(item));\r\n                }\r\n                if (index >= 0 && index < list.Count)\r\n                {\r\n                    list[index].Add(item);\r\n                }\r\n            }\r\n\r\n            //if (sort)\r\n            //{\r\n            //    foreach (AlphaKeyGroup<T> group in list)\r\n            //    {\r\n            //        group.Sort((c0, c1) => { return ci.CompareInfo.Compare(getKey(c0), getKey(c1)); });\r\n            //    }\r\n            //}\r\n\r\n            return list;\r\n        }\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/ViewModels/Dialogs/DialogDetailsViewModel.Audio.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Text;\r\nusing Windows.Storage;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Views.Controls;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        public void SendAudio(AudioEventArgs args)\r\n        {\r\n            Telegram.Logs.Log.Write(\"DialogDetailsViewModel.SendAudio file_name=\" + args.OggFileName);\r\n\r\n            if (string.IsNullOrEmpty(args.OggFileName)) return;\r\n\r\n            Telegram.Logs.Log.Write(\"DialogDetailsViewModel.SendAudio check_disable_feature file_name=\" + args.OggFileName);\r\n\r\n            var id = TLLong.Random();\r\n            var accessHash = TLLong.Random();\r\n\r\n            var oggFileName = string.Format(\"audio{0}_{1}.mp3\", id, accessHash);\r\n            var wavFileName = Path.GetFileNameWithoutExtension(oggFileName) + \".wav\";\r\n\r\n            long size = 0;\r\n            using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                storage.MoveFile(args.OggFileName, oggFileName);\r\n                using (var file = storage.OpenFile(oggFileName, FileMode.Open, FileAccess.Read))\r\n                {\r\n                    size = file.Length;\r\n                }\r\n\r\n                var wavStream = args.PcmStream.GetWavAsMemoryStream(16000, 1, 16);\r\n                using (var file = new IsolatedStorageFileStream(wavFileName, FileMode.OpenOrCreate, storage))\r\n                {\r\n                    wavStream.Seek(0, SeekOrigin.Begin);\r\n                    wavStream.CopyTo(file);\r\n                    file.Flush();\r\n                }\r\n            }\r\n\r\n            var opus = new TelegramClient_Opus.WindowsPhoneRuntimeComponent();\r\n            var bytes = opus.GetWaveform(ApplicationData.Current.LocalFolder.Path + \"\\\\\" + oggFileName);\r\n            var resultSamples = bytes.Length;\r\n            var bites2 = new BitArray(5 * bytes.Length);\r\n            var count = 0;\r\n            for (var i = 0; i < bytes.Length; i++)\r\n            {\r\n                var result = bytes[i];\r\n                var bit1 = result >> 0 & 0x1;\r\n                var bit2 = result >> 1 & 0x1;\r\n                var bit3 = result >> 2 & 0x1;\r\n                var bit4 = result >> 3 & 0x1;\r\n                var bit5 = result >> 4 & 0x1;\r\n                bites2[count] = Convert.ToBoolean(bit1);\r\n                bites2[count + 1] = Convert.ToBoolean(bit2);\r\n                bites2[count + 2] = Convert.ToBoolean(bit3);\r\n                bites2[count + 3] = Convert.ToBoolean(bit4);\r\n                bites2[count + 4] = Convert.ToBoolean(bit5);\r\n                count = count + 5;\r\n            }\r\n\r\n            var bytesCount = (resultSamples * 5) / 8 + (((resultSamples * 5) % 8) == 0 ? 0 : 1);\r\n            var waveformBytes = new byte[bytesCount];\r\n            bites2.CopyTo(waveformBytes, 0);\r\n            var waveform = waveformBytes != null ? TLString.FromBigEndianData(waveformBytes) : TLString.Empty;\r\n\r\n            var audioAttribute = new TLDocumentAttributeAudio46\r\n            {\r\n                Flags = new TLInt((int)DocumentAttributeAudioFlags.Voice),\r\n                Duration = new TLInt((int)args.Duration)\r\n            };\r\n\r\n            if (waveformBytes != null)\r\n            {\r\n                audioAttribute.Waveform = waveform;\r\n            }\r\n\r\n            var attributes = new TLVector<TLDocumentAttributeBase>\r\n                    {\r\n                        audioAttribute\r\n                    };\r\n\r\n            var document = new TLDocument54\r\n            {\r\n                Id = id,\r\n                AccessHash = accessHash,\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                //Duration = new TLInt((int)args.Duration),\r\n                MimeType = new TLString(\"audio/ogg\"),\r\n                Size = new TLInt((int)size),\r\n                Thumb = new TLPhotoSizeEmpty { Type = TLString.Empty },\r\n                DCId = new TLInt(0),\r\n                Version = new TLInt(0),\r\n                Attributes = attributes\r\n            };\r\n\r\n            var channel = With as TLChannel;\r\n            var isChannel = channel != null && !channel.IsMegaGroup;\r\n\r\n            var media = new TLMessageMediaDocument75 { Flags = new TLInt(0), Document = document, Caption = TLString.Empty, IsoFileName = oggFileName, NotListened = !isChannel };\r\n\r\n            var message = GetMessage(TLString.Empty, media);\r\n\r\n            message.NotListened = !isChannel;\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"DialogDetailsViewModel.SendAudio start sending file_name={0} rnd_id={1}\", args.OggFileName, message.RandomId));\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var previousMessage = InsertSendingMessage(message);\r\n                message.NotifyOfPropertyChange(() => message.Media);\r\n                IsEmptyDialog = Items.Count == 0 && (_messages == null || _messages.Count == 0) && LazyItems.Count == 0;\r\n\r\n                BeginOnThreadPool(() =>\r\n                    CacheService.SyncSendingMessage(\r\n                       message, previousMessage,\r\n                       m => SendAudioInternal(message, args)));\r\n            });\r\n        }\r\n\r\n        private void SendAudioInternal(TLMessage message, AudioEventArgs args = null)\r\n        {\r\n            Telegram.Logs.Log.Write(\"DialogDetailsViewModel.SendAudioInternal rnd_id=\" + message.RandomId);\r\n\r\n            var documentMedia = message.Media as TLMessageMediaDocument;\r\n            if (documentMedia != null)\r\n            {\r\n                var fileName = documentMedia.IsoFileName;\r\n                if (string.IsNullOrEmpty(fileName))\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var document = documentMedia.Document as TLDocument;\r\n                if (document == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                if (args != null)\r\n                {\r\n                    var stringBuilder = new StringBuilder();\r\n                    stringBuilder.AppendLine(\"parts\");\r\n                    foreach (var part in args.Parts)\r\n                    {\r\n                        stringBuilder.AppendLine(string.Format(\"file_part={0} position={1} count={2} status={3}\", part.FilePart, part.Position, part.Count, part.Status));\r\n                    }\r\n\r\n                    Telegram.Logs.Log.Write(\"DialogDetailsViewModel.SendAudioInternal uploading rnd_id=\" + message.RandomId + Environment.NewLine + stringBuilder);\r\n\r\n                    var fileId = args.FileId ?? TLLong.Random();\r\n                    message.Media.FileId = fileId;\r\n                    message.Media.UploadingProgress = 0.001;\r\n                    UploadAudioFileManager.UploadFile(fileId, message, fileName, args.Parts);\r\n                }\r\n                else\r\n                {\r\n                    var fileId = TLLong.Random();\r\n                    message.Media.FileId = fileId;\r\n                    message.Media.UploadingProgress = 0.001;\r\n                    UploadAudioFileManager.UploadFile(fileId, message, fileName);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var audioMedia = message.Media as TLMessageMediaAudio;\r\n            if (audioMedia != null)\r\n            {\r\n                var fileName = audioMedia.IsoFileName;\r\n                if (string.IsNullOrEmpty(fileName))\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var audio = audioMedia.Audio as TLAudio;\r\n                if (audio == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                if (args != null)\r\n                {\r\n                    var fileId = args.FileId ?? TLLong.Random();\r\n                    message.Media.FileId = fileId;\r\n                    message.Media.UploadingProgress = 0.001;\r\n                    UploadAudioFileManager.UploadFile(fileId, message, fileName, args.Parts);\r\n                }\r\n                else\r\n                {\r\n                    var fileId = TLLong.Random();\r\n                    message.Media.FileId = fileId;\r\n                    message.Media.UploadingProgress = 0.001;\r\n                    UploadAudioFileManager.UploadFile(fileId, message, fileName);\r\n                }\r\n\r\n                return;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/ViewModels/Dialogs/DialogsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.Views;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing TypingTuple = Telegram.Api.WindowsPhone.Tuple<Telegram.Api.TL.TLDialogBase, TelegramClient.ViewModels.Dialogs.InputTypingManager>;\r\nusing TypingUser = Telegram.Api.WindowsPhone.Tuple<int, Telegram.Api.TL.TLSendMessageActionBase>;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogsViewModel : ItemsViewModelBase<TLDialogBase>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateContactLinkBase>,\r\n        Telegram.Api.Aggregator.IHandle<TopMessageUpdatedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<DialogAddedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<DialogRemovedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<DownloadableItem>,\r\n        Telegram.Api.Aggregator.IHandle<UploadableItem>,\r\n        Telegram.Api.Aggregator.IHandle<string>,\r\n        Telegram.Api.Aggregator.IHandle<TLEncryptedChatBase>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserName>,\r\n        Telegram.Api.Aggregator.IHandle<UpdateCompletedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<ChannelUpdateCompletedEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateNotifySettings>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateNewAuthorization>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateServiceNotification>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateUserTyping>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChatUserTyping>,\r\n        Telegram.Api.Aggregator.IHandle<ClearCacheEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<ClearLocalDatabaseEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateEditMessage>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateEditChannelMessage>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateDraftMessage>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateChannel>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateDialogPinned76>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdatePinnedDialogs>,\r\n        Telegram.Api.Aggregator.IHandle<TLUpdateEncryptedChatTyping>,\r\n        Telegram.Api.Aggregator.IHandle<ProxyDataChangedEventArgs>\r\n    {\r\n        #region Workaround\r\n        public Visibility EncryptedChatVisibility { get { return Visibility.Collapsed; } }\r\n\r\n        public TLObject With { get { return null; } }\r\n\r\n        public Visibility VerifiedVisibility { get { return Visibility.Collapsed; } }\r\n\r\n        public TLDialogBase Self { get { return null; } }\r\n\r\n        public TLMessageBase TopMessage { get { return null; } }\r\n\r\n        public Brush MuteIconBackground { get { return new SolidColorBrush(Colors.White); } }\r\n\r\n        public TLPeerNotifySettings NotifySettings { get { return null; } }\r\n\r\n        public TLInt UnreadCount { get { return new TLInt(0); } }\r\n        #endregion\r\n\r\n        public bool FirstRun { get; set; }\r\n\r\n        public ICollectionView FilteredItems { get; set; }\r\n\r\n        public bool TestMode { get; set; }\r\n\r\n        public DialogsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            App.Log(\"start DialogsViewModel.ctor\");\r\n\r\n            //Items = new ObservableCollection<TLDialogBase>();\r\n            FilteredItems = new CollectionViewSource { Source = Items }.View;\r\n            FilteredItems.Filter += item =>\r\n            {\r\n                var dialog = item as TLDialog;\r\n                if (dialog != null)\r\n                {\r\n                    var chat = dialog.With as TLChat41;\r\n                    if (chat != null)\r\n                    {\r\n                        return !chat.IsMigrated;\r\n                    }\r\n                }\r\n\r\n                return true;\r\n            };\r\n\r\n#if DEBUG\r\n            Items.CollectionChanged += (sender, args) =>\r\n            {\r\n                TLDialog71 promoDialog = null;\r\n                TLDialogBase firstDialog = Items.FirstOrDefault();\r\n                if (args.NewItems != null)\r\n                {\r\n                    for (int i = 0; i < args.NewItems.Count; i++)\r\n                    {\r\n                        var newItem = args.NewItems[i] as TLDialog71;\r\n                        if (newItem != null && newItem.IsPromo)\r\n                        {\r\n                            promoDialog = newItem;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (promoDialog != null)\r\n                {\r\n                    var stackTrace = string.Format(\"Promo action={0} dialog={1} first_dialog={2}\\n{3}\", args.Action, promoDialog.Index, firstDialog != null ? firstDialog.Index.ToString() : null, TLObjectGenerator.GetStackTrace());\r\n                    Execute.BeginOnUIThread(TimeSpan.FromSeconds(20.0), () =>\r\n                    {\r\n                        TLUtils.WriteException(\":::Promo:::\", new Exception(stackTrace));\r\n                    });\r\n                }\r\n            };\r\n#endif\r\n\r\n            EventAggregator.Subscribe(this);\r\n            DisplayName = LowercaseConverter.Convert(AppResources.Dialogs);\r\n            Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.Loading : string.Empty;\r\n\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (isAuthorized)\r\n                {\r\n                    var dialogs = CacheService.GetDialogs();\r\n\r\n                    var dialogsCache = new Dictionary<int, TLDialogBase>();\r\n                    var clearedDialogs = new List<TLDialogBase>();\r\n                    foreach (var dialog in dialogs)\r\n                    {\r\n                        if (!dialogsCache.ContainsKey(dialog.Index))\r\n                        {\r\n                            clearedDialogs.Add(dialog);\r\n                            dialogsCache[dialog.Index] = dialog;\r\n                        }\r\n                        else\r\n                        {\r\n                            var cachedDialog = dialogsCache[dialog.Index];\r\n                            if (cachedDialog.Peer is TLPeerUser && dialog.Peer is TLPeerUser)\r\n                            {\r\n                                CacheService.DeleteDialog(dialog);\r\n                                continue;\r\n                            }\r\n                            if (cachedDialog.Peer is TLPeerChat && dialog.Peer is TLPeerChat)\r\n                            {\r\n                                CacheService.DeleteDialog(dialog);\r\n                                continue;\r\n                            }\r\n                            if (cachedDialog.Peer is TLPeerChannel && dialog.Peer is TLPeerChannel)\r\n                            {\r\n                                CacheService.DeleteDialog(dialog);\r\n                                continue;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    ReorderDrafts(clearedDialogs);\r\n\r\n                    // load cache\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        Status = dialogs.Count == 0 ? AppResources.Loading : string.Empty;\r\n                        Items.Clear();\r\n\r\n                        const int maxDialogSlice = 8;\r\n                        var importantCount = 0;\r\n                        var count = 0;\r\n                        for (var i = 0; i < clearedDialogs.Count && importantCount < maxDialogSlice; i++, count++)\r\n                        {\r\n                            Items.Add(clearedDialogs[i]);\r\n                            var chat41 = clearedDialogs[i].With as TLChat41;\r\n                            if (chat41 == null || !chat41.IsMigrated)\r\n                            {\r\n                                importantCount++;\r\n                            }\r\n                        }\r\n\r\n\r\n                        if (count < clearedDialogs.Count)\r\n                        {\r\n                            BeginOnUIThread(() =>\r\n                            {\r\n                                for (var i = count; i < clearedDialogs.Count; i++)\r\n                                {\r\n                                    Items.Add(clearedDialogs[i]);\r\n                                }\r\n\r\n                                CheckPromoChannel();\r\n\r\n                                var importantDialogsCount = Math.Max(Telegram.Api.Constants.CachedDialogsCount, Items.OfType<TLDialog>().Count());\r\n                                UpdateItemsAsync(importantDialogsCount);\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            var importantDialogsCount = Math.Max(Telegram.Api.Constants.CachedDialogsCount, Items.OfType<TLDialog>().Count());\r\n                            UpdateItemsAsync(importantDialogsCount);\r\n                        }\r\n                    });\r\n                }\r\n            });\r\n\r\n            App.Log(\"stop DialogsViewModel.ctor\");\r\n        }\r\n\r\n        public void CheckPromoChannel(bool force = false)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (!isAuthorized)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var updateProxyData = false;\r\n                var proxyDataBase = CacheService.GetProxyData();\r\n                var proxyDataPromo = proxyDataBase as TLProxyDataPromo;\r\n                if (proxyDataBase == null)\r\n                {\r\n                    //Execute.ShowDebugMessage(\"GetPromoDialog\");\r\n\r\n                    MTProtoService.GetProxyDataAsync(\r\n                        result =>\r\n                        {\r\n                            proxyDataPromo = result as TLProxyDataPromo;\r\n                            if (proxyDataPromo != null)\r\n                            {\r\n                                MTProtoService.GetPromoDialogAsync(MTProtoService.PeerToInputPeer(proxyDataPromo.Peer),\r\n                                    result2 =>\r\n                                    {\r\n\r\n                                    });\r\n                            }\r\n                        });\r\n\r\n                    return;\r\n                }\r\n\r\n                if (proxyDataPromo != null)\r\n                {\r\n                    var now = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n                    var promoChannel = CacheService.GetChat(proxyDataPromo.Peer.Id) as TLChannel;\r\n                    var promoDialog = CacheService.GetDialogs().OfType<TLDialog71>().FirstOrDefault(x => x.IsPromo && x.Peer.Id.Value == proxyDataPromo.Peer.Id.Value);\r\n                    if (promoDialog == null && (promoChannel == null || promoChannel.Left.Value))\r\n                    {\r\n                        //Execute.ShowDebugMessage(\"GetPromoDialog\");\r\n\r\n                        MTProtoService.GetPromoDialogAsync(MTProtoService.PeerToInputPeer(proxyDataPromo.Peer),\r\n                            result =>\r\n                            {\r\n\r\n                            });\r\n                    }\r\n                    else\r\n//#if !DEBUG\r\n                        if (proxyDataPromo.Expires.Value <= now.Value || force)\r\n//#endif\r\n                    {\r\n                        //Execute.ShowDebugMessage(\"GetPromoDialog\");\r\n\r\n                        MTProtoService.GetProxyDataAsync(\r\n                        result =>\r\n                        {\r\n                            proxyDataPromo = result as TLProxyDataPromo;\r\n                            if (proxyDataPromo != null)\r\n                            {\r\n                                MTProtoService.GetPromoDialogAsync(MTProtoService.PeerToInputPeer(proxyDataPromo.Peer),\r\n                                    result2 =>\r\n                                    {\r\n\r\n                                    });\r\n                            }\r\n                        });\r\n\r\n                        return;\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private static void ReorderDrafts(IList<TLDialogBase> dialogs)\r\n        {\r\n            for (var i = 0; i < dialogs.Count; i++)\r\n            {\r\n                var dialog53 = dialogs[i] as TLDialog53;\r\n                if (dialog53 != null)\r\n                {\r\n                    var draft = dialog53.Draft as TLDraftMessage;\r\n                    if (draft != null && dialog53.GetDateIndexWithDraft() > dialog53.GetDateIndex())\r\n                    {\r\n                        var dateWithDraft = dialog53.GetDateIndexWithDraft();\r\n                        for (var j = 0; j < i; j++)\r\n                        {\r\n                            if (dateWithDraft >= dialogs[j].GetDateIndexWithDraft())\r\n                            {\r\n                                dialogs.RemoveAt(i);\r\n                                dialogs.Insert(j, dialog53);\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private volatile bool _isUpdated;\r\n\r\n        private void UpdateItemsAsync(int limit)\r\n        {\r\n            IsWorking = true;\r\n\r\n            var stopwatch = Stopwatch.StartNew();\r\n            //TLObject.LogNotify = true;\r\n            //TelegramEventAggregator.LogPublish = true;\r\n            MTProtoService.GetDialogsAsync(stopwatch,\r\n                new TLInt(0), \r\n                new TLInt(0), \r\n                new TLInputPeerEmpty(),\r\n                new TLInt(limit),\r\n                new TLInt(0),\r\n                result =>\r\n                {\r\n                    //System.Diagnostics.Debug.WriteLine(\"messages.getDialogs elapsed=\" + stopwatch.Elapsed);\r\n\r\n                    // сортируем, т.к. при синхронизации, если есть отправляющиеся сообщений, то TopMessage будет замещен на них\r\n                    // и начальная сортировка сломается\r\n                    var orderedDialogs = new TLVector<TLDialogBase>(result.Dialogs.Count);\r\n                    foreach (var orderedDialog in result.Dialogs.OrderByDescending(x => x.GetDateIndexWithDraft()))\r\n                    {\r\n                        orderedDialogs.Add(orderedDialog);\r\n                    }\r\n                    result.Dialogs = orderedDialogs;\r\n\r\n                    //System.Diagnostics.Debug.WriteLine(\"messages.getDialogs ordering elapsed=\" + stopwatch.Elapsed);\r\n\r\n                    BeginOnUIThread(() =>\r\n                    {\r\n                        //System.Diagnostics.Debug.WriteLine(\"messages.getDialogs ui elapsed=\" + stopwatch.Elapsed);\r\n                        //TelegramEventAggregator.LogPublish = false;\r\n                        //TLObject.LogNotify = false;\r\n                        IsWorking = false;\r\n                        IsLastSliceLoaded = result.Dialogs.Count < limit;\r\n\r\n                        _offset = limit;\r\n\r\n                        var needUpdate = Items.Count == 0;\r\n                        var itemsCount = Items.Count;\r\n                        int i = 0, j = 0;\r\n                        var contactRegisteredDialogs = new List<TLDialog>();\r\n                        var promoDialogs = new List<TLDialog>();\r\n                        for (; i < result.Dialogs.Count && j < Items.Count; i++, j++)\r\n                        {\r\n                            if (itemsCount - 1 < i || result.Dialogs[i] != Items[j])\r\n                            {\r\n                                // skip \"User joined Telegram!\" message\r\n                                var dialog = Items[j] as TLDialog;\r\n                                if (dialog != null)\r\n                                {\r\n                                    var messageService = dialog.TopMessage as TLMessageService;\r\n                                    if (messageService != null && messageService.Action is TLMessageActionContactRegistered)\r\n                                    {\r\n                                        i--;\r\n                                        contactRegisteredDialogs.Add(dialog);\r\n                                        continue;\r\n                                    }\r\n                                }\r\n\r\n                                var dialog71 = Items[j] as TLDialog71;\r\n                                if (dialog71 != null && dialog71.IsPromo)\r\n                                {\r\n                                    i--;\r\n                                    promoDialogs.Add(dialog);\r\n                                    continue;\r\n                                }\r\n\r\n                                var encryptedDialog = Items[j] as TLEncryptedDialog;\r\n                                if (encryptedDialog != null)\r\n                                {\r\n                                    i--;\r\n                                    continue;\r\n                                }\r\n\r\n\r\n                                needUpdate = true;\r\n                                break;\r\n                            }\r\n                        }\r\n\r\n                        if (i < j)\r\n                        {\r\n                            for (var k = i; k < j; k++)\r\n                            {\r\n                                if (k < result.Dialogs.Count)\r\n                                {\r\n                                    Items.Add(result.Dialogs[k]);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        // load updated cache\r\n                        Status = Items.Count == 0 && LazyItems.Count == 0 && result.Dialogs.Count == 0 ? AppResources.NoDialogsHere : string.Empty;\r\n\r\n                        if (needUpdate)\r\n                        {\r\n                            var startIndex = 0;\r\n                            foreach (var dialog in contactRegisteredDialogs)\r\n                            {\r\n                                for (var k = startIndex; k < result.Dialogs.Count; k++)\r\n                                {\r\n                                    if (dialog.GetDateIndexWithDraft() > result.Dialogs[k].GetDateIndexWithDraft())\r\n                                    {\r\n                                        result.Dialogs.Insert(k, dialog);\r\n                                        startIndex = k;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            startIndex = 0;\r\n                            foreach (var dialog in promoDialogs)\r\n                            {\r\n                                for (var k = startIndex; k < result.Dialogs.Count; k++)\r\n                                {\r\n                                    if (dialog.GetDateIndexWithDraft() > result.Dialogs[k].GetDateIndexWithDraft())\r\n                                    {\r\n                                        result.Dialogs.Insert(k, dialog);\r\n                                        startIndex = k;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            var encryptedDialogs = Items.OfType<TLEncryptedDialog>();\r\n                            startIndex = 0;\r\n                            foreach (var encryptedDialog in encryptedDialogs)\r\n                            {\r\n                                for (var k = startIndex; k < result.Dialogs.Count; k++)\r\n                                {\r\n                                    if (encryptedDialog.GetDateIndexWithDraft() > result.Dialogs[k].GetDateIndexWithDraft())\r\n                                    {\r\n                                        result.Dialogs.Insert(k, encryptedDialog);\r\n                                        startIndex = k;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            var broadcasts = Items.OfType<TLBroadcastDialog>();\r\n                            startIndex = 0;\r\n                            foreach (var broadcast in broadcasts)\r\n                            {\r\n                                for (var k = startIndex; k < result.Dialogs.Count; k++)\r\n                                {\r\n                                    if (broadcast.GetDateIndexWithDraft() > result.Dialogs[k].GetDateIndexWithDraft())\r\n                                    {\r\n                                        result.Dialogs.Insert(k, broadcast);\r\n                                        startIndex = k;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            Items.Clear();\r\n                            foreach (var dialog in result.Dialogs)\r\n                            {\r\n                                Items.Add(dialog);\r\n                            }\r\n\r\n                            IsLastSliceLoaded = false;\r\n                            _isUpdated = true;\r\n                        }\r\n                        else\r\n                        {\r\n                            _isUpdated = true;\r\n                        }\r\n                        //System.Diagnostics.Debug.WriteLine(\"messages.getDialogs end ui elapsed=\" + stopwatch.Elapsed);\r\n                    });\r\n                },\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _isUpdated = true;\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                }));\r\n        }\r\n\r\n        private bool _checkPromoChannel;\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            if (FirstRun)\r\n            {\r\n                OnInitialize();\r\n            }\r\n\r\n            if (_checkPromoChannel)\r\n            {\r\n                CheckPromoChannel();\r\n            }\r\n            else\r\n            {\r\n                _checkPromoChannel = true;\r\n            }\r\n        }\r\n\r\n        protected override void OnInitialize()\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                if (!FirstRun)\r\n                {\r\n                    return;\r\n                }\r\n                if (!isAuthorized)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                FirstRun = false;\r\n\r\n                Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.Loading : string.Empty;\r\n                var limit = Constants.DialogsSlice;\r\n                MTProtoService.GetDialogsAsync(Stopwatch.StartNew(),\r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInputPeerEmpty(),\r\n                    new TLInt(limit),\r\n                    new TLInt(0),\r\n                    dialogs => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsLastSliceLoaded = dialogs.Dialogs.Count < limit;\r\n                        _offset = Constants.DialogsSlice;\r\n\r\n                        _isUpdated = true;\r\n\r\n                        const int maxDialogSlice = 8;\r\n                        var importantCount = 0;\r\n                        Items.Clear();\r\n                        for (var i = 0; i < dialogs.Dialogs.Count; i++)\r\n                        {\r\n                            if (importantCount < maxDialogSlice)\r\n                            {\r\n                                Items.Add(dialogs.Dialogs[i]);\r\n                            }\r\n                            else\r\n                            {\r\n                                LazyItems.Add(dialogs.Dialogs[i]);\r\n                            }\r\n\r\n                            var chat41 = dialogs.Dialogs[i].With as TLChat41;\r\n                            if (chat41 == null || !chat41.IsMigrated)\r\n                            {\r\n                                importantCount++;\r\n                            }\r\n                        }\r\n\r\n                        Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.NoDialogsHere : string.Empty;\r\n\r\n                        if (LazyItems.Count > 0)\r\n                        {\r\n                            BeginOnUIThread(() =>\r\n                            {\r\n                                for (var i = 0; i < LazyItems.Count; i++)\r\n                                {\r\n                                    Items.Add(LazyItems[i]);\r\n                                }\r\n                                LazyItems.Clear();\r\n\r\n                                InvokeImportContacts();\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            InvokeImportContacts();\r\n                        }\r\n                    }),\r\n                    error => BeginOnUIThread(() =>\r\n                    {\r\n                        InvokeImportContacts();\r\n\r\n                        Execute.ShowDebugMessage(\"messages.getDialogs error \" + error);\r\n                        _isUpdated = true;\r\n                        Status = string.Empty;\r\n                    }));\r\n            });\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        private void InvokeImportContacts()\r\n        {\r\n            var contacts = IoC.Get<ContactsViewModel>();\r\n            contacts.Handle(new InvokeImportContacts());\r\n        }\r\n\r\n        #region Actions\r\n\r\n\r\n\r\n        public FrameworkElement OpenDialogElement;\r\n\r\n        public void SetOpenDialogElement(object element)\r\n        {\r\n            OpenDialogElement = element as FrameworkElement;\r\n        }\r\n\r\n\r\n\r\n        public override void RefreshItems()\r\n        {\r\n            UpdateItemsAsync(Constants.DialogsSlice);\r\n        }\r\n\r\n        #endregion\r\n\r\n        public void Handle(TopMessageUpdatedEventArgs eventArgs)\r\n        {\r\n            eventArgs.Dialog.NotifyOfPropertyChange(() => eventArgs.Dialog.With);\r\n            OnTopMessageUpdated(this, eventArgs);\r\n        }\r\n\r\n        public void Handle(TLUpdatePinnedDialogs update)\r\n        {\r\n            Handle(new UpdateCompletedEventArgs());\r\n        }\r\n\r\n        public void Handle(TLUpdateDialogPinned76 update)\r\n        {\r\n            var dialogPeer = update.Peer as TLDialogPeer;\r\n            if (dialogPeer != null)\r\n            {\r\n                OnTopMessageUpdated(this, new TopMessageUpdatedEventArgs(dialogPeer.Peer) { NotifyPinned = true });\r\n            }\r\n\r\n            return;\r\n        }\r\n\r\n        public void Handle(TLUpdateDraftMessage update)\r\n        {\r\n            OnTopMessageUpdated(this, new TopMessageUpdatedEventArgs(update.Peer));\r\n            return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                TLDialog53 dialog53 = null;\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (Items[i].Index == update.Peer.Id.Value)\r\n                    {\r\n                        dialog53 = Items[i] as TLDialog53;\r\n                        if (dialog53 != null)\r\n                        {\r\n                            dialog53.Draft = update.Draft;\r\n\r\n                            dialog53.NotifyOfPropertyChange(() => dialog53.Self);\r\n                        }\r\n                        Items.RemoveAt(i);\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (dialog53 != null)\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (Items[i].GetDateIndexWithDraft() <= dialog53.GetDateIndexWithDraft())\r\n                        {\r\n                            Items.Insert(i, dialog53);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(ChannelUpdateCompletedEventArgs args)\r\n        {\r\n            var dialog = CacheService.GetDialog(new TLPeerChannel { Id = args.ChannelId });\r\n            if (dialog != null)\r\n            {\r\n                var topMessage = dialog.Messages.FirstOrDefault();\r\n                if (topMessage != null)\r\n                {\r\n                    Handle(new TopMessageUpdatedEventArgs(dialog, topMessage));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Handle(DialogAddedEventArgs eventArgs)\r\n        {\r\n            OnDialogAdded(this, eventArgs);\r\n        }\r\n\r\n        private void OnTopMessageUpdatedInternal(object sender, TopMessageUpdatedEventArgs e)\r\n        {\r\n            if (e.Dialog == null)\r\n            {\r\n                if (e.Peer != null)\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (Items[i].Peer.GetType() == e.Peer.GetType()\r\n                            && Items[i].Index == e.Peer.Id.Value)\r\n                        {\r\n                            e = new TopMessageUpdatedEventArgs(Items[i], (TLMessageBase)null);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (e.Dialog == null) return;\r\n            }\r\n\r\n            if (e.NotifyPinned) e.Dialog.NotifyOfPropertyChange(() => e.Dialog.IsPinned);\r\n\r\n            int currentPosition;\r\n            int newPosition;\r\n            try\r\n            {\r\n                var chat = e.Dialog.With as TLChat;\r\n                if (chat != null)\r\n                {\r\n                    var dialog = e.Dialog as TLDialog;\r\n                    if (dialog != null)\r\n                    {\r\n                        var topMessage = dialog.TopMessage as TLMessageService;\r\n                        if (topMessage != null)\r\n                        {\r\n                            var actionChatMigratedTo = topMessage.Action as TLMessageActionChatMigrateTo;\r\n                            if (actionChatMigratedTo != null)\r\n                            {\r\n                                Items.Remove(e.Dialog);\r\n                                return;\r\n                            }\r\n\r\n                            var actionChatDeleteUser = topMessage.Action as TLMessageActionChatDeleteUser;\r\n                            if (actionChatDeleteUser != null)\r\n                            {\r\n                                if (actionChatDeleteUser.UserId.Value == StateService.CurrentUserId)\r\n                                {\r\n                                    Items.Remove(e.Dialog);\r\n                                    return;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var channel = e.Dialog.With as TLChannel;\r\n                if (channel != null)\r\n                {\r\n                    var dialog = e.Dialog as TLDialog;\r\n                    if (dialog != null)\r\n                    {\r\n                        var topMessage = dialog.TopMessage as TLMessageService;\r\n                        if (topMessage != null)\r\n                        {\r\n                            var actionChatDeleteUser = topMessage.Action as TLMessageActionChatDeleteUser;\r\n                            if (actionChatDeleteUser != null)\r\n                            {\r\n                                if (actionChatDeleteUser.UserId.Value == StateService.CurrentUserId)\r\n                                {\r\n                                    Items.Remove(e.Dialog);\r\n                                    return;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                e.Dialog.Typing = null;\r\n\r\n                currentPosition = Items.IndexOf(e.Dialog);\r\n\r\n                newPosition = currentPosition;\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (// мигает диалог, если просто обновляется последнее сообщение, то номер становится на 1 больше\r\n                        // и сначала удаляем, а потом вставляем на туже позицию\r\n                        i != currentPosition\r\n                        && Items[i].GetDateIndexWithDraft() <= e.Dialog.GetDateIndexWithDraft())\r\n                    {\r\n                        newPosition = i;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (currentPosition == -1\r\n                    && currentPosition == newPosition)\r\n                {\r\n                    Execute.ShowDebugMessage(\"TLDialog with=\" + e.Dialog.With + \" curPos=newPos=-1 isLastSliceLoaded=\" + IsLastSliceLoaded);\r\n\r\n                    // channels not from current slice\r\n                    if (IsLastSliceLoaded)\r\n                    {\r\n                        Items.Add(e.Dialog);\r\n                        Status = Items.Count > 0 || LazyItems.Count > 0 ? string.Empty : Status;\r\n\r\n                        return;\r\n                    }\r\n                    else\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                if (currentPosition != newPosition)\r\n                {\r\n                    if (currentPosition >= 0\r\n                        && currentPosition < newPosition)\r\n                    {\r\n                        // т.к. будем сначала удалять диалог а потом вставлять, то\r\n                        // curPos + 1 = newPos - это вставка на тоже место и не имеет смысла\r\n                        // Update: имеет, т.к. обновляется инфа о последнем сообщении\r\n                        if (currentPosition + 1 == newPosition)\r\n                        {\r\n                            Items[currentPosition].NotifyOfPropertyChange(() => Items[currentPosition].Self);\r\n                            Items[currentPosition].NotifyOfPropertyChange(() => Items[currentPosition].UnreadCount);\r\n                            var dialog71 = Items[currentPosition] as TLDialog71;\r\n                            if (dialog71 != null)\r\n                            {\r\n                                dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMentionsCount);\r\n                            }\r\n\r\n                            return;\r\n                        }\r\n                        Items.Remove(e.Dialog);\r\n                        Items.Insert(newPosition - 1, e.Dialog);\r\n                    }\r\n                    else\r\n                    {\r\n                        Items.Remove(e.Dialog);\r\n                        Items.Insert(newPosition, e.Dialog);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    // удалили сообщение и диалог должен переместиться ниже загруженной части списка\r\n                    if (!IsLastSliceLoaded\r\n                        && Items.Count > 0\r\n                        && Items[Items.Count - 1].GetDateIndexWithDraft() > e.Dialog.GetDateIndexWithDraft())\r\n                    {\r\n                        Items.Remove(e.Dialog);\r\n                    }\r\n\r\n                    Items[currentPosition].NotifyOfPropertyChange(() => Items[currentPosition].Self);\r\n                    Items[currentPosition].NotifyOfPropertyChange(() => Items[currentPosition].UnreadCount);\r\n                    var dialog71 = Items[currentPosition] as TLDialog71;\r\n                    if (dialog71 != null)\r\n                    {\r\n                        dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMentionsCount);\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Logs.Log.Write(string.Format(\"DialogsViewModel.Handle OnTopMessageUpdatedEventArgs ex \" + ex));\r\n                throw ex;\r\n            }\r\n        }\r\n\r\n        private void OnTopMessageUpdated(object sender, TopMessageUpdatedEventArgs e)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                OnTopMessageUpdatedInternal(sender, e);\r\n            });\r\n        }\r\n\r\n        private void OnDialogAdded(object sender, DialogAddedEventArgs e)\r\n        {\r\n            var dialog = e.Dialog;\r\n            if (dialog == null) return;\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var index = -1;\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (Items[i].Index == e.Dialog.Index\r\n                        && Items[i].Peer.GetType() == e.Dialog.Peer.GetType())\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    if (Items[i] == e.Dialog)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    if (Items[i].GetDateIndexWithDraft() < dialog.GetDateIndexWithDraft())\r\n                    {\r\n                        index = i;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (e.Dialog.Peer is TLPeerChannel)\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (e.Dialog.Peer.GetType() == Items[i].Peer.GetType()\r\n                            && e.Dialog.Peer.Id.Value == Items[i].Peer.Id.Value)\r\n                        {\r\n                            Items.RemoveAt(i);\r\n                            Execute.ShowDebugMessage(\"OnDialogAdded RemoveAt=\" + i);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (index == -1)\r\n                {\r\n                    Items.Add(dialog);\r\n                }\r\n                else\r\n                {\r\n                    Items.Insert(index, dialog);\r\n                }\r\n                Status = Items.Count > 0 || LazyItems.Count > 0 ? string.Empty : Status;\r\n            });\r\n        }\r\n\r\n        public void Handle(DialogRemovedEventArgs args)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                var dialog = Items.FirstOrDefault(x => x.Index == args.Dialog.Index);\r\n\r\n                if (dialog != null)\r\n                {\r\n                    Items.Remove(dialog);\r\n                    Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.NoDialogsHere : string.Empty;\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var photo = item.Owner as TLUserProfilePhoto;\r\n            if (photo != null)\r\n            {\r\n                var user = CacheService.GetUser(photo);\r\n                if (user != null)\r\n                {\r\n                    user.NotifyOfPropertyChange(() => user.Photo);\r\n                }\r\n                else\r\n                {\r\n                    Execute.ShowDebugMessage(\"Handle TLUserProfilePhoto user=null\");\r\n                }\r\n                return;\r\n            }\r\n\r\n            var chatPhoto = item.Owner as TLChatPhoto;\r\n            if (chatPhoto != null)\r\n            {\r\n                var chat = CacheService.GetChat(chatPhoto);\r\n                if (chat != null)\r\n                {\r\n                    chat.NotifyOfPropertyChange(() => chat.Photo);\r\n                    return;\r\n                }\r\n\r\n                var channel = CacheService.GetChannel(chatPhoto);\r\n                if (channel != null)\r\n                {\r\n                    channel.NotifyOfPropertyChange(() => channel.Photo);\r\n                    return;\r\n                }\r\n\r\n                Execute.ShowDebugMessage(\"Handle TLChatPhoto chat=null\");\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Handle(string command)\r\n        {\r\n            if (string.Equals(command, Commands.LogOutCommand))\r\n            {\r\n                LazyItems.Clear();\r\n                BeginOnUIThread(() => Items.Clear());\r\n                Status = string.Empty;\r\n                IsWorking = false;\r\n            }\r\n        }\r\n\r\n        public void Handle(TLUpdateUserName userName)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (Items[i].WithId == userName.UserId.Value\r\n                        && Items[i].With is TLUserBase)\r\n                    {\r\n                        var user = (TLUserBase)Items[i].With;\r\n                        user.FirstName = userName.FirstName;\r\n                        user.LastName = userName.LastName;\r\n\r\n                        var userWithUserName = user as IUserName;\r\n                        if (userWithUserName != null)\r\n                        {\r\n                            userWithUserName.UserName = userName.UserName;\r\n                        }\r\n\r\n                        Items[i].NotifyOfPropertyChange(() => Items[i].With);\r\n                        break;\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n            var userBase = item.Owner as TLUserBase;\r\n            if (userBase != null && userBase.IsSelf)\r\n            {\r\n                MTProtoService.UploadProfilePhotoAsync(\r\n                    new TLInputFile\r\n                    {\r\n                        Id = item.FileId,\r\n                        MD5Checksum = new TLString(MD5Core.GetHashString(item.Bytes).ToLowerInvariant()),\r\n                        Name = new TLString(Guid.NewGuid() + \".jpg\"),\r\n                        Parts = new TLInt(item.Parts.Count)\r\n                    },\r\n                    result =>\r\n                    {\r\n                        MTProtoService.GetFullUserAsync(new TLInputUserSelf(),\r\n                            userFull => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                userFull.User.NotifyOfPropertyChange(() => userFull.User.Photo);\r\n                            }),\r\n                            error =>\r\n                            {\r\n\r\n                            });\r\n                    },\r\n                    error =>\r\n                    {\r\n\r\n                    });\r\n                return;\r\n            }\r\n\r\n            var channel = item.Owner as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                if (channel.Id != null)\r\n                {\r\n                    MTProtoService.EditPhotoAsync(\r\n                        channel,\r\n                        new TLInputChatUploadedPhoto56\r\n                        {\r\n                            File = new TLInputFile\r\n                            {\r\n                                Id = item.FileId,\r\n                                MD5Checksum = new TLString(MD5Core.GetHashString(item.Bytes).ToLowerInvariant()),\r\n                                Name = new TLString(\"channelPhoto.jpg\"),\r\n                                Parts = new TLInt(item.Parts.Count)\r\n                            }\r\n                        },\r\n                        result =>\r\n                        {\r\n\r\n                        },\r\n                        error =>\r\n                        {\r\n                            Execute.ShowDebugMessage(\"messages.editChatPhoto error \" + error);\r\n                        });\r\n                }\r\n            }\r\n\r\n            var chat = item.Owner as TLChat;\r\n            if (chat != null)\r\n            {\r\n                MTProtoService.EditChatPhotoAsync(\r\n                    chat.Id,\r\n                    new TLInputChatUploadedPhoto56\r\n                    {\r\n                        File = new TLInputFile\r\n                        {\r\n                            Id = item.FileId,\r\n                            MD5Checksum = new TLString(MD5Core.GetHashString(item.Bytes).ToLowerInvariant()),\r\n                            Name = new TLString(\"chatPhoto.jpg\"),\r\n                            Parts = new TLInt(item.Parts.Count)\r\n                        }\r\n                    },\r\n                    result =>\r\n                    {\r\n\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.editChatPhoto error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        public void Handle(TLEncryptedChatBase chat)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                int index = -1;\r\n                TLDialogBase dialog = null;\r\n                for (int i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (Items[i].Peer is TLPeerEncryptedChat\r\n                        && Items[i].Peer.Id.Value == chat.Id.Value)\r\n                    {\r\n                        index = i;\r\n                        dialog = Items[i];\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (index != -1 && dialog != null)\r\n                {\r\n                    dialog.NotifyOfPropertyChange(() => dialog.Self);\r\n                }\r\n            });\r\n        }\r\n\r\n        public IList<TLDialogBase> UpdateCompletedDialogs { get; set; }\r\n\r\n        public void Handle(UpdateCompletedEventArgs args)\r\n        {\r\n            var dialogs = CacheService.GetDialogs();\r\n\r\n            var promoDialogs = dialogs.OfType<TLDialog71>().Where(x => x.IsPromo).ToList();\r\n            if (promoDialogs.Count > 1)\r\n            {\r\n                var hasPromo = false;\r\n                for (var i = 0; i < dialogs.Count; i++)\r\n                {\r\n                    var dialog71 = dialogs[i] as TLDialog71;\r\n                    if (dialog71 != null && dialog71.IsPromo)\r\n                    {\r\n                        if (hasPromo)\r\n                        {\r\n                            dialogs.RemoveAt(i--);\r\n                        }\r\n                        else\r\n                        {\r\n                            hasPromo = true;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var error = new StringBuilder();\r\n                error.AppendLine(\"promo_count=\" + promoDialogs.Count);\r\n                foreach (var promoDialog in promoDialogs)\r\n                {\r\n                    error.AppendLine(string.Format(\"id={0} hash={1}\", promoDialog.Index, promoDialog.GetHashCode()));\r\n                }\r\n\r\n                Execute.ShowDebugMessage(error.ToString());\r\n            }\r\n\r\n            ReorderDrafts(dialogs);\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var rootFrame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n                if (rootFrame != null)\r\n                {\r\n                    var shellView = rootFrame.Content as ShellView;\r\n                    if (shellView == null)\r\n                    {\r\n                        UpdateCompletedDialogs = dialogs;\r\n                    }\r\n                    else\r\n                    {\r\n                        UpdateCompleted(dialogs);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void UpdateCompleted(IList<TLDialogBase> dialogs)\r\n        {\r\n            var count = Items.Count == 0 ? dialogs.Count : Items.Count;\r\n\r\n            ((BindableCollection<TLDialogBase>)Items).IsNotifying = false;\r\n            Items.Clear();\r\n            foreach (var dialog in dialogs.Take(count))\r\n            {\r\n                Items.Add(dialog);\r\n            }\r\n            ((BindableCollection<TLDialogBase>)Items).IsNotifying = true;\r\n            ((BindableCollection<TLDialogBase>)Items).Refresh();\r\n\r\n#if DEBUG\r\n            if (Items.Count >= 2 && Items[0].Index == Items[1].Index)\r\n            {\r\n                Execute.ShowDebugMessage(\"UpdateCompleted same dialog\");\r\n            }\r\n#endif\r\n\r\n            Status = Items.Count > 0 || LazyItems.Count > 0 ? string.Empty : Status;\r\n        }\r\n\r\n        private void HandleTypingCommon(TLInt chatId, TLSendMessageActionBase action, Dictionary<int, TypingTuple> typingCache)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                if (frame != null)\r\n                {\r\n                    var shellView = frame.Content as ShellView;\r\n                    if (shellView == null)\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                TypingTuple tuple;\r\n                if (!typingCache.TryGetValue(chatId.Value, out tuple))\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        var dialog = Items[i] as TLEncryptedDialog;\r\n                        if (dialog != null && dialog.Peer.Id.Value == chatId.Value)\r\n                        {\r\n                            tuple = new TypingTuple(dialog, new InputTypingManager(\r\n                                users => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    dialog.Typing = GetTyping(dialog.Peer, users, CacheService.GetUser, GetFullInfoAsync);\r\n                                    dialog.NotifyOfPropertyChange(() => dialog.Self.Typing);\r\n                                }),\r\n                                () => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    dialog.Typing = null;\r\n                                    dialog.NotifyOfPropertyChange(() => dialog.Self.Typing);\r\n                                })));\r\n                            typingCache[chatId.Value] = tuple;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (tuple != null)\r\n                {\r\n                    if (action is TLSendMessageCancelAction)\r\n                    {\r\n                        tuple.Item2.RemoveTypingUser(tuple.Item1.WithId);\r\n                    }\r\n                    else\r\n                    {\r\n                        tuple.Item2.AddTypingUser(tuple.Item1.WithId, action);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private void HandleTypingCommon(TLUpdateTypingBase updateTyping, Dictionary<int, TypingTuple> typingCache)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                if (frame != null)\r\n                {\r\n                    var shellView = frame.Content as ShellView;\r\n                    if (shellView == null)\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                var updateChatUserTyping = updateTyping as TLUpdateChatUserTyping;\r\n                var id = updateChatUserTyping != null ? updateChatUserTyping.ChatId : updateTyping.UserId;\r\n                TypingTuple tuple;\r\n                if (!typingCache.TryGetValue(id.Value, out tuple))\r\n                {\r\n                    for (var i = 0; i < Items.Count; i++)\r\n                    {\r\n                        if (updateChatUserTyping == null\r\n                            && Items[i].Peer is TLPeerUser\r\n                            && Items[i].Peer.Id.Value == id.Value\r\n                            || (updateChatUserTyping != null\r\n                                && Items[i].Peer is TLPeerChat\r\n                                && Items[i].Peer.Id.Value == id.Value)\r\n                            || (updateChatUserTyping != null\r\n                                && Items[i].Peer is TLPeerChannel\r\n                                && Items[i].Peer.Id.Value == id.Value))\r\n                        {\r\n                            var dialog = Items[i] as TLDialog;\r\n                            if (dialog != null)\r\n                            {\r\n                                tuple = new TypingTuple(dialog, new InputTypingManager(\r\n                                    users => Execute.BeginOnUIThread(() =>\r\n                                    {\r\n                                        dialog.Typing = GetTyping(dialog.Peer, users, CacheService.GetUser, GetFullInfoAsync);\r\n                                        dialog.NotifyOfPropertyChange(() => dialog.Self.Typing);\r\n                                    }),\r\n                                    () => Execute.BeginOnUIThread(() =>\r\n                                    {\r\n                                        dialog.Typing = null;\r\n                                        dialog.NotifyOfPropertyChange(() => dialog.Self.Typing);\r\n                                    })));\r\n                                typingCache[id.Value] = tuple;\r\n                            }\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (tuple != null)\r\n                {\r\n                    TLSendMessageActionBase action = null;\r\n                    var typingAction = updateTyping as IUserTypingAction;\r\n                    if (typingAction != null)\r\n                    {\r\n                        action = typingAction.Action;\r\n                    }\r\n\r\n                    if (action is TLSendMessageCancelAction)\r\n                    {\r\n                        tuple.Item2.RemoveTypingUser(updateTyping.UserId.Value);\r\n                    }\r\n                    else\r\n                    {\r\n                        tuple.Item2.AddTypingUser(updateTyping.UserId.Value, action);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private readonly Dictionary<int, TypingTuple> _encryptedChatTypingCache = new Dictionary<int, TypingTuple>();\r\n\r\n        public void Handle(TLUpdateEncryptedChatTyping encryptedChatTyping)\r\n        {\r\n            HandleTypingCommon(encryptedChatTyping.ChatId, new TLSendMessageTypingAction(), _encryptedChatTypingCache);\r\n        }\r\n\r\n        public void Handle(TLDecryptedMessageBase messageBase)\r\n        {\r\n            var serviceMessage = messageBase as TLDecryptedMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                var typingAction = serviceMessage.Action as TLDecryptedMessageActionTyping;\r\n                if (typingAction != null)\r\n                {\r\n                    HandleTypingCommon(messageBase.ChatId, typingAction.Action, _encryptedChatTypingCache);\r\n                }\r\n            }\r\n        }\r\n\r\n        private readonly Dictionary<int, TypingTuple> _userTypingCache = new Dictionary<int, TypingTuple>();\r\n\r\n        public void Handle(TLUpdateUserTyping userTyping)\r\n        {\r\n            HandleTypingCommon(userTyping, _userTypingCache);\r\n        }\r\n\r\n        private readonly Dictionary<int, TypingTuple> _chatUserTypingCache = new Dictionary<int, TypingTuple>();\r\n\r\n        public void Handle(TLUpdateChatUserTyping chatUserTyping)\r\n        {\r\n            HandleTypingCommon(chatUserTyping, _chatUserTypingCache);\r\n        }\r\n\r\n        public static Typing GetTyping(TLPeerBase peer, IList<TypingUser> typingUsers, Func<TLInt, TLUserBase> getUser, Action<TLPeerBase> getFullInfoAction)\r\n        {\r\n            if (peer is TLPeerUser\r\n                || peer is TLPeerEncryptedChat)\r\n            {\r\n                var typingUser = typingUsers.FirstOrDefault();\r\n                if (typingUser != null)\r\n                {\r\n                    var action = typingUser.Item2;\r\n                    if (action is TLSendMessageUploadPhotoAction)\r\n                    {\r\n                        return new Typing(TypingType.Upload, AppResources.SendingPhoto.ToLower(CultureInfo.InvariantCulture));\r\n                    }\r\n                    if (action is TLSendMessageRecordAudioAction)\r\n                    {\r\n                        return new Typing(TypingType.Record, AppResources.RecordingVoiceMessage.ToLower(CultureInfo.InvariantCulture));\r\n                    }\r\n                    if (action is TLSendMessageUploadAudioAction)\r\n                    {\r\n                        return new Typing(TypingType.Record, AppResources.SendingAudio.ToLower(CultureInfo.InvariantCulture));\r\n                    }\r\n                    if (action is TLSendMessageUploadDocumentAction)\r\n                    {\r\n                        return new Typing(TypingType.Upload, AppResources.SendingFile.ToLower(CultureInfo.InvariantCulture));\r\n                    }\r\n                    if (action is TLSendMessageRecordVideoAction)\r\n                    {\r\n                        return new Typing(TypingType.Upload, AppResources.RecordingVideo.ToLower(CultureInfo.InvariantCulture));\r\n                    }\r\n                    if (action is TLSendMessageUploadVideoAction)\r\n                    {\r\n                        return new Typing(TypingType.Upload, AppResources.SendingVideo.ToLower(CultureInfo.InvariantCulture));\r\n                    }\r\n                    if (action is TLSendMessageGamePlayAction)\r\n                    {\r\n                        return new Typing(TypingType.Text, AppResources.PlayingGame.ToLower(CultureInfo.InvariantCulture));\r\n                    }\r\n                }\r\n\r\n                return new Typing(TypingType.Text, AppResources.Typing.ToLower(CultureInfo.InvariantCulture));\r\n            }\r\n\r\n            if (typingUsers.Count == 1)\r\n            {\r\n                var userId = new TLInt(typingUsers[0].Item1);\r\n                var user = getUser(userId);\r\n                if (user == null)\r\n                {\r\n                    getFullInfoAction.SafeInvoke(peer);\r\n\r\n                    return null;\r\n                }\r\n\r\n                var userName = TLString.IsNullOrEmpty(user.FirstName) ? user.LastName : user.FirstName;\r\n                var typingUser = typingUsers.FirstOrDefault();\r\n                if (typingUser != null)\r\n                {\r\n                    var action = typingUser.Item2;\r\n                    if (action is TLSendMessageUploadPhotoAction)\r\n                    {\r\n                        return new Typing(TypingType.Upload, string.Format(\"{0} {1}\", userName, AppResources.IsSendingPhoto.ToLower(CultureInfo.InvariantCulture)));\r\n                    }\r\n                    if (action is TLSendMessageUploadAudioAction)\r\n                    {\r\n                        return new Typing(TypingType.Record, string.Format(\"{0} {1}\", userName, AppResources.IsSendingAudio.ToLower(CultureInfo.InvariantCulture)));\r\n                    }\r\n                    if (action is TLSendMessageRecordAudioAction)\r\n                    {\r\n                        return new Typing(TypingType.Record, string.Format(\"{0} {1}\", userName, AppResources.IsRecordingAudio.ToLower(CultureInfo.InvariantCulture)));\r\n                    }\r\n                    if (action is TLSendMessageUploadDocumentAction)\r\n                    {\r\n                        return new Typing(TypingType.Upload, string.Format(\"{0} {1}\", userName, AppResources.IsSendingFile.ToLower(CultureInfo.InvariantCulture)));\r\n                    }\r\n                    if (action is TLSendMessageRecordVideoAction)\r\n                    {\r\n                        return new Typing(TypingType.Upload, string.Format(\"{0} {1}\", userName, AppResources.IsRecordingVideo.ToLower(CultureInfo.InvariantCulture)));\r\n                    }\r\n                    if (action is TLSendMessageUploadVideoAction)\r\n                    {\r\n                        return new Typing(TypingType.Upload, string.Format(\"{0} {1}\", userName, AppResources.IsSendingVideo.ToLower(CultureInfo.InvariantCulture)));\r\n                    }\r\n                    if (action is TLSendMessageGamePlayAction)\r\n                    {\r\n                        return new Typing(TypingType.Text, string.Format(\"{0} {1}\", userName, AppResources.IsPlayingGame.ToLower(CultureInfo.InvariantCulture)));\r\n                    }\r\n                }\r\n\r\n                return new Typing(TypingType.Text, string.Format(\"{0} {1}\", userName, AppResources.IsTyping.ToLower(CultureInfo.InvariantCulture)));\r\n            }\r\n\r\n            if (typingUsers.Count <= 3)\r\n            {\r\n                var firstNames = new List<string>(typingUsers.Count);\r\n                var missingUsers = new List<TLInt>();\r\n                foreach (var typingUser in typingUsers)\r\n                {\r\n                    var user = getUser(new TLInt(typingUser.Item1));\r\n                    if (user != null)\r\n                    {\r\n                        var userName = TLString.IsNullOrEmpty(user.FirstName) ? user.LastName : user.FirstName;\r\n                        firstNames.Add(userName.ToString());\r\n                    }\r\n                    else\r\n                    {\r\n                        missingUsers.Add(new TLInt(typingUser.Item1));\r\n                    }\r\n                }\r\n\r\n                if (missingUsers.Count > 0)\r\n                {\r\n                    getFullInfoAction.SafeInvoke(peer);\r\n\r\n                    return null;\r\n                }\r\n\r\n                return new Typing(TypingType.Text, string.Format(\"{0} {1}\", string.Join(\", \", firstNames),\r\n                    AppResources.AreTyping.ToLower(CultureInfo.InvariantCulture)));\r\n            }\r\n\r\n            return new Typing(TypingType.Text, string.Format(\"{0} {1}\", Language.Declension(\r\n                typingUsers.Count,\r\n                AppResources.CompanyNominativeSingular,\r\n                AppResources.CompanyNominativePlural,\r\n                AppResources.CompanyGenitiveSingular,\r\n                AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture),\r\n                AppResources.AreTyping.ToLower(CultureInfo.InvariantCulture)));\r\n        }\r\n\r\n        private void GetFullInfoAsync(TLPeerBase peer)\r\n        {\r\n            var peerChat = peer as TLPeerChat;\r\n            if (peerChat != null)\r\n            {\r\n                MTProtoService.GetFullChatAsync(peerChat.Id, result => { }, error => { });\r\n            }\r\n        }\r\n\r\n        public void Handle(ClearCacheEventArgs args)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                foreach (var item in Items)\r\n                {\r\n                    item.NotifyOfPropertyChange(() => item.With);\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(ClearLocalDatabaseEventArgs args)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                foreach (var item in Items)\r\n                {\r\n                    if (item.With != null)\r\n                    {\r\n                        item.With.ClearBitmap();\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(TLUpdateEditMessage update)\r\n        {\r\n            var message = update.Message as TLMessageCommon;\r\n            if (message == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                int index;\r\n                if (message.ToId is TLPeerUser)\r\n                {\r\n                    index = message.Out.Value ? message.ToId.Id.Value : message.FromId.Value;\r\n                }\r\n                else\r\n                {\r\n                    index = message.ToId.Id.Value;\r\n                }\r\n\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (Items[i].Index == index\r\n                        && Items[i].TopMessageId != null\r\n                        && Items[i].TopMessageId.Value == message.Index)\r\n                    {\r\n                        Items[i].NotifyOfPropertyChange(() => Items[i].Self);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(TLUpdateEditChannelMessage update)\r\n        {\r\n            var message = update.Message as TLMessageCommon;\r\n            if (message == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < Items.Count; i++)\r\n                {\r\n                    if (Items[i].Index == message.ToId.Id.Value\r\n                        && Items[i].TopMessageId != null\r\n                        && Items[i].TopMessageId.Value == message.Index)\r\n                    {\r\n                        Items[i].NotifyOfPropertyChange(() => Items[i].Self);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(TLUpdateChannel update)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var dialog = Items.FirstOrDefault(x => x.Peer is TLPeerChannel && x.Peer.Id.Value == update.ChannelId.Value);\r\n                if (dialog != null)\r\n                {\r\n                    dialog.NotifyOfPropertyChange(() => dialog.Self); // update draft on set current user as admin\r\n                }\r\n            });\r\n        }\r\n\r\n        public void Handle(ProxyDataChangedEventArgs args)\r\n        {\r\n            //Execute.BeginOnUIThread(() =>\r\n            //{\r\n            //    var dataPromo = args.ProxyData as TLProxyDataPromo;\r\n            //    if (dataPromo != null && dataPromo.Channel != null)\r\n            //    {\r\n            //        Handle(new DialogAddedEventArgs(dataPromo.Channel));\r\n            //    }\r\n            //    else\r\n            //    {\r\n            //        var promoChannel = Items.OfType<TLDialog71>().FirstOrDefault(x => x.IsPromo);\r\n            //        if (promoChannel != null)\r\n            //        {\r\n            //            Handle(new DialogRemovedEventArgs(promoChannel));\r\n            //        }\r\n            //    }\r\n            //});\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/ViewModels/Dialogs/SecretDialogDetailsViewModel.Audio.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing Windows.Storage;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Views.Controls;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsViewModel\r\n    {\r\n        private void SendAudioInternal(TLObject obj)\r\n        {\r\n            var message = GetDecryptedMessage(obj);\r\n            if (message == null) return;\r\n\r\n            var mediaDocument = message.Media as TLDecryptedMessageMediaDocument45;\r\n            if (mediaDocument != null)\r\n            {\r\n                var fileLocation = mediaDocument.File as TLEncryptedFile;\r\n                if (fileLocation == null) return;\r\n\r\n                var fileName = String.Format(\"audio{0}_{1}.mp3\",\r\n                    fileLocation.Id,\r\n                    fileLocation.AccessHash);\r\n\r\n                byte[] data;\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    using (var fileStream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                    {\r\n                        data = new byte[fileStream.Length];\r\n                        fileStream.Read(data, 0, data.Length);\r\n                    }\r\n                }\r\n\r\n                var encryptedBytes = Telegram.Api.Helpers.Utils.AesIge(data, mediaDocument.Key.Data, mediaDocument.IV.Data, true);\r\n                using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    using (var file = storage.OpenFile(\"encrypted.\" + fileName, FileMode.Create, FileAccess.Write))\r\n                    {\r\n                        file.Write(encryptedBytes, 0, encryptedBytes.Length);\r\n                    }\r\n                }\r\n\r\n                UploadFileManager.UploadFile(fileLocation.Id, obj, encryptedBytes);\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaAudio = message.Media as TLDecryptedMessageMediaAudio;\r\n            if (mediaAudio != null)\r\n            {\r\n                var fileLocation = mediaAudio.File as TLEncryptedFile;\r\n                if (fileLocation == null) return;\r\n\r\n                var fileName = String.Format(\"audio{0}_{1}.mp3\",\r\n                    fileLocation.Id,\r\n                    fileLocation.AccessHash);\r\n\r\n                byte[] data;\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    using (var fileStream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                    {\r\n                        data = new byte[fileStream.Length];\r\n                        fileStream.Read(data, 0, data.Length);\r\n                    }\r\n                }\r\n\r\n                var encryptedBytes = Telegram.Api.Helpers.Utils.AesIge(data, mediaAudio.Key.Data, mediaAudio.IV.Data, true);\r\n                using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    using (var file = storage.OpenFile(\"encrypted.\" + fileName, FileMode.Create, FileAccess.Write))\r\n                    {\r\n                        file.Write(encryptedBytes, 0, encryptedBytes.Length);\r\n                    }\r\n                }\r\n\r\n                UploadFileManager.UploadFile(fileLocation.Id, obj, encryptedBytes);\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void SendAudio(AudioEventArgs args)\r\n        {\r\n            var chat = Chat as TLEncryptedChat;\r\n            if (chat == null) return;\r\n\r\n            if (string.IsNullOrEmpty(args.OggFileName)) return;\r\n\r\n            var dcId = TLInt.Random();\r\n            var id = TLLong.Random();\r\n            var accessHash = TLLong.Random();\r\n\r\n            var oggFileName = String.Format(\"audio{0}_{1}.mp3\", id, accessHash);\r\n            var wavFileName = Path.GetFileNameWithoutExtension(oggFileName) + \".wav\";\r\n\r\n            long size = 0;\r\n            using (var storage = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                storage.MoveFile(args.OggFileName, oggFileName);\r\n                using (var file = storage.OpenFile(oggFileName, FileMode.Open, FileAccess.Read))\r\n                {\r\n                    size = file.Length;\r\n                }\r\n\r\n                var wavStream = Wav.GetWavAsMemoryStream(args.PcmStream, 16000, 1, 16);\r\n                using (var file = new IsolatedStorageFileStream(wavFileName, FileMode.OpenOrCreate, storage))\r\n                {\r\n                    wavStream.Seek(0, SeekOrigin.Begin);\r\n                    wavStream.CopyTo(file);\r\n                    file.Flush();\r\n                }\r\n            }\r\n\r\n            var fileLocation = new TLEncryptedFile\r\n            {\r\n                Id = id,\r\n                AccessHash = accessHash,\r\n                DCId = dcId,\r\n                Size = new TLInt((int)size),\r\n                KeyFingerprint = new TLInt(0),\r\n                FileName = new TLString(Path.GetFileName(oggFileName))\r\n            };\r\n\r\n            var keyIV = GenerateKeyIV();\r\n            TLDecryptedMessageMediaBase decryptedMediaAudio;\r\n            var encryptedChat17 = chat as TLEncryptedChat17;\r\n            if (encryptedChat17 != null)\r\n            {\r\n                if (encryptedChat17.Layer.Value >= Constants.MinSecretChatWithAudioAsDocumentsLayer)\r\n                {\r\n                    var opus = new TelegramClient_Opus.WindowsPhoneRuntimeComponent();\r\n                    var bytes = opus.GetWaveform(ApplicationData.Current.LocalFolder.Path + \"\\\\\" + oggFileName);\r\n                    var resultSamples = bytes.Length;\r\n                    var bites2 = new BitArray(5 * bytes.Length);\r\n                    var count = 0;\r\n                    for (var i = 0; i < bytes.Length; i++)\r\n                    {\r\n                        var result = bytes[i];\r\n                        var bit1 = result >> 0 & 0x1;\r\n                        var bit2 = result >> 1 & 0x1;\r\n                        var bit3 = result >> 2 & 0x1;\r\n                        var bit4 = result >> 3 & 0x1;\r\n                        var bit5 = result >> 4 & 0x1;\r\n                        bites2[count] = Convert.ToBoolean(bit1);\r\n                        bites2[count + 1] = Convert.ToBoolean(bit2);\r\n                        bites2[count + 2] = Convert.ToBoolean(bit3);\r\n                        bites2[count + 3] = Convert.ToBoolean(bit4);\r\n                        bites2[count + 4] = Convert.ToBoolean(bit5);\r\n                        count = count + 5;\r\n                    }\r\n\r\n                    var bytesCount = (resultSamples * 5) / 8 + (((resultSamples * 5) % 8) == 0 ? 0 : 1);\r\n                    var waveformBytes = new byte[bytesCount];\r\n                    bites2.CopyTo(waveformBytes, 0);\r\n                    var waveform = waveformBytes != null ? TLString.FromBigEndianData(waveformBytes) : TLString.Empty;\r\n\r\n                    var audioAttribute = new TLDocumentAttributeAudio46\r\n                    {\r\n                        Flags = new TLInt((int)DocumentAttributeAudioFlags.Voice),\r\n                        Duration = new TLInt((int)args.Duration)\r\n                    };\r\n\r\n                    if (waveformBytes != null)\r\n                    {\r\n                        audioAttribute.Waveform = waveform;\r\n                    }\r\n\r\n                    var attributes = new TLVector<TLDocumentAttributeBase>\r\n                    {\r\n                        audioAttribute\r\n                    };\r\n\r\n                    decryptedMediaAudio = new TLDecryptedMessageMediaDocument45\r\n                    {\r\n                        Thumb = TLString.Empty,\r\n                        ThumbW = new TLInt(0),\r\n                        ThumbH = new TLInt(0),\r\n                        MimeType = new TLString(\"audio/ogg\"),\r\n                        Size = new TLInt((int)size),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n                        Attributes = attributes,\r\n                        Caption = TLString.Empty,\r\n                        NotListened = true,\r\n\r\n                        File = fileLocation,\r\n\r\n                        UploadingProgress = 0.001\r\n                    };\r\n                }\r\n                else\r\n                {\r\n                    decryptedMediaAudio = new TLDecryptedMessageMediaAudio17\r\n                    {\r\n                        Duration = new TLInt((int)args.Duration),\r\n                        MimeType = new TLString(\"audio/ogg\"),\r\n                        Size = new TLInt((int)size),\r\n                        Key = keyIV.Item1,\r\n                        IV = keyIV.Item2,\r\n\r\n                        UserId = new TLInt(StateService.CurrentUserId),\r\n                        File = fileLocation,\r\n\r\n                        UploadingProgress = 0.001\r\n                    };\r\n                }\r\n            }\r\n            else\r\n            {\r\n                decryptedMediaAudio = new TLDecryptedMessageMediaAudio\r\n                {\r\n                    Duration = new TLInt((int)args.Duration),\r\n                    //MimeType = new TLString(\"audio/ogg\"),\r\n                    Size = new TLInt((int)size),\r\n                    Key = keyIV.Item1,\r\n                    IV = keyIV.Item2,\r\n\r\n                    UserId = new TLInt(StateService.CurrentUserId),\r\n                    File = fileLocation,\r\n\r\n                    UploadingProgress = 0.001\r\n                };\r\n            }\r\n\r\n            var decryptedTuple = GetDecryptedMessageAndObject(TLString.Empty, decryptedMediaAudio, chat, true);\r\n\r\n            //var message45 = decryptedTuple.Item1 as TLDecryptedMessage45;\r\n            //if (message45 != null && message45.IsVoice())\r\n            //{\r\n            //    message45.NotListened = true;\r\n            //}\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                InsertSendingMessage(decryptedTuple.Item1);\r\n                NotifyOfPropertyChange(() => DescriptionVisibility);\r\n            });\r\n\r\n            BeginOnThreadPool(() =>\r\n                CacheService.SyncDecryptedMessage(decryptedTuple.Item1, chat,\r\n                    cachedMessage => SendAudioInternal(decryptedTuple.Item2)));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/ViewModels/Media/MultiImageEditorViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing Windows.Storage;\r\nusing Windows.Storage.FileProperties;\r\nusing Windows.Storage.Pickers;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Logs;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Media;\r\nusing PhotoFile = TelegramClient.Services.PhotoFile;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class MultiImageEditorViewModel : ViewAware\r\n    {\r\n        private bool _isGrouped = true;\r\n\r\n        public bool IsGrouped\r\n        {\r\n            get { return _isGrouped; }\r\n            set\r\n            {\r\n                if (_isGrouped != value)\r\n                {\r\n                    _isGrouped = value;\r\n                    NotifyOfPropertyChange(() => IsGrouped);\r\n                }\r\n            }\r\n        }\r\n\r\n        public Visibility TimerButtonVisibility\r\n        {\r\n            get { return _with is TLUser? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public Visibility GroupButtonVisibility\r\n        {\r\n            get\r\n            {\r\n                var encryptedChatBase = _with as TLEncryptedChatBase;\r\n                if (encryptedChatBase != null)\r\n                {\r\n                    var encryptedChat = _with as TLEncryptedChat20;\r\n                    if (encryptedChat != null && encryptedChat.Layer.Value >= Constants.MinSecretChatWithGroupedMediaLayer)\r\n                    {\r\n                        return Visibility.Visible;\r\n                    }\r\n\r\n                    return Visibility.Collapsed;\r\n                }\r\n\r\n                return Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        private IMultiImageEditorView _view;\r\n\r\n        public IMultiImageEditorView View\r\n        {\r\n            get\r\n            {\r\n                _view = _view ?? GetView() as IMultiImageEditorView;\r\n\r\n                return _view;\r\n            }\r\n        }\r\n\r\n        public bool IsSecretChat { get; set; }\r\n\r\n        private bool _isCaptionEnabled = true;\r\n\r\n        public bool IsCaptionEnabled\r\n        {\r\n            get { return _isCaptionEnabled; }\r\n            set { _isCaptionEnabled = value; }\r\n        }\r\n\r\n        private PhotoFile _currentItem;\r\n\r\n        public PhotoFile CurrentItem\r\n        {\r\n            get { return _currentItem; }\r\n            set\r\n            {\r\n                if (_currentItem != value)\r\n                {\r\n                    SwitchSelection(value, _currentItem);\r\n                    _currentItem = value;\r\n                    NotifyOfPropertyChange(() => CurrentItem);\r\n                    NotifyOfPropertyChange(() => Caption);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SwitchSelection(PhotoFile currentItem, PhotoFile previousItem)\r\n        {\r\n            if (currentItem != null)\r\n            {\r\n                currentItem.IsSelected = true;\r\n            }\r\n\r\n            if (previousItem != null)\r\n            {\r\n                previousItem.IsSelected = false;\r\n            }\r\n        }\r\n\r\n        public ObservableCollection<PhotoFile> Items { get; set; }\r\n\r\n        private readonly Action<IReadOnlyList<StorageFile>> _sendPhotosAction;\r\n\r\n        private readonly Func<string, IList<TLUserBase>> _getUsernameHints;\r\n\r\n        private readonly TLObject _with;\r\n\r\n        public MultiImageEditorViewModel(Action<IReadOnlyList<StorageFile>> sendPhotosAction, Func<string, IList<TLUserBase>> getUsernameHints, TLObject with)\r\n        {\r\n            _with = with;\r\n            _sendPhotosAction = sendPhotosAction;\r\n            _getUsernameHints = getUsernameHints;\r\n\r\n            Items = new ObservableCollection<PhotoFile>();\r\n        }\r\n\r\n        #region Mentions\r\n\r\n        public void ContinueLoadMentionHints()\r\n        {\r\n            if (!string.IsNullOrEmpty(Caption))\r\n            {\r\n                var cachedResult = _getUsernameHints.Invoke(Caption);\r\n                if (cachedResult.Count > MaxResults)\r\n                {\r\n                    CreateUsernameHints();\r\n\r\n                    if (UsernameHints.Hints.Count == MaxResults)\r\n                    {\r\n                        var lastItem = UsernameHints.Hints.LastOrDefault();\r\n                        if (lastItem != null)\r\n                        {\r\n                            var lastIndex = cachedResult.IndexOf(lastItem);\r\n                            if (lastIndex >= 0)\r\n                            {\r\n                                for (var i = lastIndex + 1; i < cachedResult.Count; i++)\r\n                                {\r\n                                    UsernameHints.Hints.Add(cachedResult[i]);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void LoadMentionHints(string text)\r\n        {\r\n            if (_getUsernameHints != null)\r\n            {\r\n                var cachedResult = _getUsernameHints.Invoke(text);\r\n                \r\n                if (cachedResult.Count > 0)\r\n                {\r\n                    CreateUsernameHints();\r\n\r\n                    ClearUsernameHints();\r\n                    for (var i = 0; i < cachedResult.Count; i++)\r\n                    {\r\n                        if (UsernameHints.Hints.Count == MaxResults) break;\r\n\r\n                        UsernameHints.Hints.Add(cachedResult[i]);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    ClearUsernameHints();\r\n                }\r\n            }\r\n        }\r\n\r\n        public void AddMention(TLUserBase userBase)\r\n        {\r\n            if (CurrentItem == null) return;\r\n\r\n            CurrentItem.Mentions = CurrentItem.Mentions ?? new List<TLUserBase>();\r\n            CurrentItem.Mentions.Add(userBase);\r\n        }\r\n\r\n        private const int MaxResults = 10;\r\n\r\n        public UsernameHintsViewModel UsernameHints { get; protected set; }\r\n\r\n        private void CreateUsernameHints()\r\n        {\r\n            if (UsernameHints == null)\r\n            {\r\n                UsernameHints = new UsernameHintsViewModel();\r\n                NotifyOfPropertyChange(() => UsernameHints);\r\n            }\r\n        }\r\n\r\n        private void ClearUsernameHints()\r\n        {\r\n            if (UsernameHints != null)\r\n            {\r\n                UsernameHints.Hints.Clear();\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public IReadOnlyCollection<StorageFile> Files { get; set; }\r\n\r\n        public Action<IList<PhotoFile>> ContinueAction { get; set; }\r\n\r\n        public string Caption\r\n        {\r\n            get\r\n            {\r\n                if (_currentItem == null) return null;\r\n\r\n                var message = _currentItem.Object as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    var media = message.Media as TLMessageMediaPhoto28;\r\n                    if (media != null)\r\n                    {\r\n                        return message.Message.ToString();\r\n                    }\r\n                }\r\n\r\n                var decryptedMessage = _currentItem.Object as TLDecryptedMessage;\r\n                if (decryptedMessage != null)\r\n                {\r\n                    var media = decryptedMessage.Media as TLDecryptedMessageMediaPhoto45;\r\n                    if (media != null)\r\n                    {\r\n                        return media.Caption.ToString();\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n            set\r\n            {\r\n                var message = _currentItem.Object as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    var media = message.Media as TLMessageMediaPhoto28;\r\n                    if (media != null)\r\n                    {\r\n                        if (!string.Equals(message.Message.ToString(), value))\r\n                        {\r\n                            message.Message = new TLString(value);\r\n\r\n                            LoadMentionHints(value);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var decryptedMessage = _currentItem.Object as TLDecryptedMessage;\r\n                if (decryptedMessage != null)\r\n                {\r\n                    var media = decryptedMessage.Media as TLDecryptedMessageMediaPhoto45;\r\n                    if (media != null)\r\n                    {\r\n                        if (!string.Equals(media.Caption.ToString(), value))\r\n                        {\r\n                            media.Caption = new TLString(value);\r\n\r\n                            LoadMentionHints(value);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen { get { return _isOpen; } }\r\n\r\n        private bool _isDoneEnabled;\r\n\r\n        public bool IsDoneEnabled\r\n        {\r\n            get { return _isDoneEnabled; }\r\n            set\r\n            {\r\n                if (_isDoneEnabled != value)\r\n                {\r\n                    _isDoneEnabled = value;\r\n                    NotifyOfPropertyChange(() => IsDoneEnabled);\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsDeleteEnabled\r\n        {\r\n            get { return Items.Count > 1; }\r\n        }\r\n\r\n        public Func<StorageFile, TLMessage25> GetPhotoMessage { get; set; }\r\n\r\n        public Func<StorageFile, Telegram.Api.WindowsPhone.Tuple<TLDecryptedMessageBase, TLObject>> GetDecryptedPhotoMessage { get; set; } \r\n\r\n        public void Done()\r\n        {\r\n            _isOpen = false;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n\r\n            var logString = new StringBuilder();\r\n            logString.AppendLine(\"photos\");\r\n            var messages = new List<PhotoFile>();\r\n            var randomIndex = new Dictionary<long, long>();\r\n\r\n            var groupedId = IsGrouped && Items.Count(x => !x.IsButton) > 1 ? TLLong.Random() : null;\r\n            TLInt commonDate = null;\r\n            for (var i = 0; i < Items.Count; i++)\r\n            {\r\n                var item = Items[i];\r\n                if (item.IsButton) continue;\r\n\r\n                if (item.Message != null)\r\n                {\r\n                    if (item.Message.RandomIndex == 0)\r\n                    {\r\n                        logString.AppendLine(string.Format(\"random_id=0 msg={0} original_file_name={1}\", item.Message,\r\n                            item.File.Name));\r\n                        continue;\r\n                    }\r\n\r\n                    if (i % Constants.MaxGroupedMediaCount == 0)\r\n                    {\r\n                        groupedId = IsGrouped && Items.Count(x => !x.IsButton) > 1 ? TLLong.Random() : null;\r\n                    }\r\n\r\n                    if (randomIndex.ContainsKey(item.Message.RandomIndex))\r\n                    {\r\n                        logString.AppendLine(string.Format(\"random_id exists msg={0} original_file_name={1}\",\r\n                            item.Message, item.File.Name));\r\n                        continue;\r\n                    }\r\n\r\n                    var message73 = item.Message as TLMessage73;\r\n                    if (message73 != null)\r\n                    {\r\n                        if (commonDate == null)\r\n                        {\r\n                            commonDate = message73.Date;\r\n                        }\r\n                        message73.Date = commonDate;\r\n                        message73.GroupedId = groupedId;\r\n                    }\r\n\r\n                    randomIndex[item.Message.RandomIndex] = item.Message.RandomIndex;\r\n\r\n                    var mediaPhoto = item.Message.Media as TLMessageMediaPhoto28;\r\n                    var photo = mediaPhoto.Photo as TLPhoto28;\r\n                    var size = photo.Sizes.First() as TLPhotoSize;\r\n                    var fileLocation = size.Location;\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        fileLocation.VolumeId,\r\n                        fileLocation.LocalId,\r\n                        fileLocation.Secret);\r\n\r\n                    item.Message.Media.UploadingProgress = 0.001;\r\n\r\n                    if (item.TimerSpan != null && item.TimerSpan.Seconds > 0)\r\n                    {\r\n                        var message25 = item.Message as TLMessage25;\r\n                        if (message25 != null)\r\n                        {\r\n                            message25.NotListened = true;\r\n                        }\r\n                        var ttlMessageMedia = item.Message.Media as ITTLMessageMedia;\r\n                        if (ttlMessageMedia != null)\r\n                        {\r\n                            ttlMessageMedia.TTLSeconds = new TLInt(item.TimerSpan.Seconds);\r\n                        }\r\n                    }\r\n\r\n                    messages.Add(item);\r\n                    logString.AppendLine(string.Format(\"msg={0} file_name={1}\", item.Message, fileName));\r\n                }\r\n                else if (item.DecryptedTuple != null)\r\n                {\r\n                    if (item.DecryptedTuple.Item1.RandomIndex == 0)\r\n                    {\r\n                        logString.AppendLine(string.Format(\"random_id=0 msg={0} original_file_name={1}\", item.DecryptedTuple.Item1, item.File.Name));\r\n                        continue;\r\n                    }\r\n\r\n                    if (randomIndex.ContainsKey(item.DecryptedTuple.Item1.RandomIndex))\r\n                    {\r\n                        logString.AppendLine(string.Format(\"random_id exists msg={0} original_file_name={1}\", item.DecryptedTuple.Item1, item.File.Name));\r\n                        continue;\r\n                    }\r\n\r\n                    var decryptedMessage73 = item.DecryptedTuple.Item1 as TLDecryptedMessage73;\r\n                    if (decryptedMessage73 != null)\r\n                    {\r\n                        if (commonDate == null)\r\n                        {\r\n                            commonDate = decryptedMessage73.Date;\r\n                        }\r\n                        decryptedMessage73.Date = commonDate;\r\n                        decryptedMessage73.GroupedId = groupedId;\r\n                    }\r\n\r\n                    randomIndex[item.DecryptedTuple.Item1.RandomIndex] = item.DecryptedTuple.Item1.RandomIndex;\r\n\r\n                    var mediaPhoto = ((TLDecryptedMessage) item.DecryptedTuple.Item1).Media as TLDecryptedMessageMediaPhoto;\r\n                    var fileLocation = mediaPhoto.Photo as TLEncryptedFile;\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        fileLocation.Id,\r\n                        fileLocation.DCId,\r\n                        fileLocation.AccessHash);\r\n\r\n                    mediaPhoto.StorageFile = null;\r\n                    mediaPhoto.UploadingProgress = 0.001;\r\n\r\n                    messages.Add(item);\r\n                    logString.AppendLine(string.Format(\"msg={0} file_name={1}\", item.DecryptedTuple.Item1, fileName));\r\n                }\r\n                else\r\n                {\r\n                    logString.AppendLine(string.Format(\"empty msg original_file_name={0}\", item.File.Name));\r\n                }\r\n            }\r\n\r\n#if MULTIPLE_PHOTOS\r\n            Log.Write(logString.ToString());\r\n#endif\r\n\r\n            ContinueAction.SafeInvoke(messages);\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            CloseEditor();\r\n        }\r\n\r\n        public void OpenEditor()\r\n        {\r\n            Items.Clear();\r\n            //_items = new List<TLMessage> { CurrentItem };\r\n            //IsGrouped = true;\r\n            IsDoneEnabled = false;\r\n            _isOpen = CurrentItem != null;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n            NotifyOfPropertyChange(() => IsDeleteEnabled);\r\n        }\r\n\r\n        public void CloseEditor()\r\n        {\r\n            if (View != null && View.IsExtendedImageEditorOpened)\r\n            {\r\n                View.CloseExtendedImageEditor();\r\n                return;\r\n            }\r\n\r\n            _isOpen = false;\r\n            NotifyOfPropertyChange(() => IsOpen);\r\n\r\n            _currentItem = null;\r\n        }\r\n\r\n        public async void OpenAnimationComplete()\r\n        {\r\n            Items.Add(CurrentItem);\r\n            Items.Add(new PhotoFile { IsButton = true });\r\n            \r\n            Log.Write(\"send photos count=\" + Files.Count);\r\n\r\n            var files = new List<StorageFile>(Files);\r\n            files.RemoveAt(0);\r\n            await AddFiles(files);\r\n        }\r\n\r\n        public async Task AddFiles(IList<StorageFile> files)\r\n        {\r\n            IsDoneEnabled = false;\r\n\r\n            for (var i = 0; i < files.Count; i++)\r\n            {\r\n                var photoFile = new PhotoFile { File = files[i] };\r\n                Items.Insert(Items.Count - 1, photoFile);\r\n            }\r\n\r\n            if (CurrentItem == null)\r\n            {\r\n                CurrentItem = Items.FirstOrDefault();\r\n            }\r\n            NotifyOfPropertyChange(() => IsDeleteEnabled);\r\n\r\n            var maxCount = 9;\r\n            var counter = 0;\r\n            var firstSlice = new List<PhotoFile>();\r\n            var secondSlice = new List<PhotoFile>();\r\n            foreach (var item in Items)\r\n            {\r\n                if (item.IsButton)\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                if (counter > maxCount)\r\n                {\r\n                    secondSlice.Add(item);\r\n                }\r\n                else\r\n                {\r\n                    firstSlice.Add(item);\r\n                }\r\n                counter++;\r\n            }\r\n\r\n            //await UpdateThumbnails(firstSlice);\r\n\r\n            var count = Items.Count;\r\n            if (count > 2)\r\n            {\r\n                var tasks = new List<Task>();\r\n                for (var i = 0; i < count; i++)\r\n                {\r\n                    var localItem = Items[i];\r\n                    if (localItem.Object != null)\r\n                    {\r\n                        continue;\r\n                    }\r\n                    if (localItem.IsButton)\r\n                    {\r\n                        continue;\r\n                    }\r\n\r\n                    var task = Task.Run(() =>\r\n                    {\r\n                        try\r\n                        {\r\n                            var file = localItem.File;\r\n                            if (GetPhotoMessage != null)\r\n                            {\r\n                                var message = GetPhotoMessage(file);\r\n                                localItem.Message = message;\r\n                            }\r\n                            else\r\n                            {\r\n                                var message = GetDecryptedPhotoMessage(file);\r\n                                localItem.DecryptedTuple = message;\r\n                            }\r\n\r\n                            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                localItem.NotifyOfPropertyChange(() => localItem.Self);\r\n                            });\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            Log.Write(ex.ToString());\r\n                        }\r\n                    });\r\n                    tasks.Add(task);\r\n                }\r\n\r\n                await Task.WhenAll(tasks);\r\n\r\n                if (!IsOpen)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                NotifyOfPropertyChange(() => CurrentItem);\r\n\r\n                var date = CurrentItem.Date;\r\n                foreach (var item in Items)\r\n                {\r\n                    if (item != null && item.Message != null)\r\n                    {\r\n                        item.Date = date;\r\n                    }\r\n                }\r\n\r\n                IsDoneEnabled = true;\r\n\r\n                //await UpdateThumbnails(secondSlice);\r\n            }\r\n            else\r\n            {\r\n                IsDoneEnabled = CurrentItem != null && CurrentItem.Object != null;\r\n            }\r\n        }\r\n\r\n        private async Task UpdateThumbnails(IList<PhotoFile> items)\r\n        {\r\n            foreach (var item in items)\r\n            {\r\n                if (item.Thumbnail != null) continue;\r\n\r\n                var thumbnail = await DialogDetailsViewModel.GetPhotoThumbnailAsync(item.File, ThumbnailMode.ListView, 99, ThumbnailOptions.None);\r\n                item.Thumbnail = thumbnail;\r\n                item.NotifyOfPropertyChange(() => item.Self);\r\n            }\r\n        }\r\n\r\n        public async void PickPhoto()\r\n        {\r\n#if WP81\r\n            var photoPickerSettings = IoC.Get<IStateService>().GetPhotoPickerSettings();\r\n            if (photoPickerSettings != null && photoPickerSettings.External)\r\n            {\r\n                ((App)Application.Current).ChooseFileInfo = new ChooseFileInfo(DateTime.Now);\r\n                var fileOpenPicker = new FileOpenPicker();\r\n                fileOpenPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;\r\n                fileOpenPicker.ViewMode = PickerViewMode.Thumbnail;\r\n                fileOpenPicker.FileTypeFilter.Clear();\r\n                fileOpenPicker.FileTypeFilter.Add(\".bmp\");\r\n                fileOpenPicker.FileTypeFilter.Add(\".png\");\r\n                fileOpenPicker.FileTypeFilter.Add(\".jpeg\");\r\n                fileOpenPicker.FileTypeFilter.Add(\".jpg\");\r\n                fileOpenPicker.ContinuationData.Add(\"From\", IsSecretChat ? \"SecretDialogDetailsView\" : \"DialogDetailsView\");\r\n                fileOpenPicker.ContinuationData.Add(\"Type\", \"Image\");\r\n                if (Environment.OSVersion.Version.Major >= 10)\r\n                {\r\n                    var result = await fileOpenPicker.PickMultipleFilesAsync();\r\n                    if (result.Count > 0)\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            _sendPhotosAction.SafeInvoke(result);\r\n                        });\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    fileOpenPicker.PickMultipleFilesAndContinue();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                ChooseAttachmentViewModel.OpenPhotoPicker(false, (r1, r2) => _sendPhotosAction(r1));\r\n            }\r\n#endif\r\n        }\r\n\r\n        public void SelectMessage(PhotoFile file)\r\n        {\r\n            CurrentItem = file;\r\n        }\r\n\r\n        public void Delete(PhotoFile file)\r\n        {\r\n            var index = Items.IndexOf(file);\r\n            if (index == -1)\r\n            {\r\n                return;\r\n            }\r\n            Items.RemoveAt(index);\r\n            if (CurrentItem == file)\r\n            {\r\n                if (Items.Count > 1)\r\n                {\r\n                    if (Items.Count > index + 1)\r\n                    {\r\n                        CurrentItem = Items[index];\r\n                    }\r\n                    else\r\n                    {\r\n                        CurrentItem = Items[index - 1];\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    CurrentItem = null;\r\n                }\r\n            }\r\n\r\n            IsDoneEnabled = Items.FirstOrDefault(x => !x.IsButton) != null;\r\n            NotifyOfPropertyChange(() => IsDeleteEnabled);\r\n\r\n            if (Items.Count == 1)\r\n            {\r\n                _isOpen = false;\r\n                NotifyOfPropertyChange(() => IsOpen);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class TimerSpanToBrushConverter : DependencyObject, IValueConverter\r\n    {\r\n        public static readonly DependencyProperty AccentBrushProperty = DependencyProperty.Register(\r\n            \"AccentBrush\", typeof(Brush), typeof(TimerSpanToBrushConverter), new PropertyMetadata(default(Brush)));\r\n\r\n        public Brush AccentBrush\r\n        {\r\n            get { return (Brush) GetValue(AccentBrushProperty); }\r\n            set { SetValue(AccentBrushProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty NormalBrushProperty = DependencyProperty.Register(\r\n            \"NormalBrush\", typeof(Brush), typeof(TimerSpanToBrushConverter), new PropertyMetadata(default(Brush)));\r\n\r\n        public Brush NormalBrush\r\n        {\r\n            get { return (Brush) GetValue(NormalBrushProperty); }\r\n            set { SetValue(NormalBrushProperty, value); }\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var timerSpan = value as TimerSpan;\r\n            if (timerSpan != null && timerSpan.Seconds > 0)\r\n            {\r\n                return AccentBrush;\r\n            }\r\n\r\n            return NormalBrush;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Views/Additional/StartupView.xaml",
    "content": "﻿<phone:PhoneApplicationPage\r\n    x:Class=\"TelegramClient.Views.Additional.StartupView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:startView=\"clr-namespace:TelegramClient.Controls.StartView\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <toolkit:TransitionService.NavigationInTransition>\r\n        <toolkit:NavigationInTransition>\r\n            <!--<toolkit:NavigationInTransition.Backward>\r\n                <toolkit:TurnstileTransition Mode=\"BackwardIn\"/>\r\n            </toolkit:NavigationInTransition.Backward>-->\r\n            <!--<toolkit:NavigationInTransition.Forward>\r\n                <toolkit:TurnstileTransition Mode=\"ForwardIn\"/>\r\n            </toolkit:NavigationInTransition.Forward>-->\r\n        </toolkit:NavigationInTransition>\r\n    </toolkit:TransitionService.NavigationInTransition>\r\n    <toolkit:TransitionService.NavigationOutTransition>\r\n        <toolkit:NavigationOutTransition>\r\n            <!--<toolkit:NavigationOutTransition.Backward>\r\n                <toolkit:TurnstileTransition Mode=\"BackwardOut\"/>\r\n            </toolkit:NavigationOutTransition.Backward>-->\r\n            <toolkit:NavigationOutTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeOut\"/>\r\n            </toolkit:NavigationOutTransition.Forward>\r\n        </toolkit:NavigationOutTransition>\r\n    </toolkit:TransitionService.NavigationOutTransition>\r\n    \r\n    <Grid>\r\n        <Border VerticalAlignment=\"Bottom\" Margin=\"24,0,24,196\" Height=\"2\" Background=\"{StaticResource PhoneChromeBrush}\"/>\r\n\r\n        <startView:StartView x:Name=\"StartView\" Background=\"Transparent\" SelectionChanged=\"StartView_OnSelectionChanged\" ManipulationDelta=\"StartView_OnManipulationDelta\">\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.1-720p.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.AppName, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.Intro1Message, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Margin=\"12,0,12,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.2-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock Foreground=\"#FFF85B30\" TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.Fast, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.FastMessage, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Margin=\"88,0,12,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.3-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock Foreground=\"#FFF99116\" TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.Free, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.FreeMessage, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Margin=\"164,0,12,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.4-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock Foreground=\"#FFF8C700\" TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.Powerful, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.PowerfulMessage, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\" Margin=\"12,0,164,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.5-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock Foreground=\"#FF5DC226\" TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.Secure, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.SecureMessage, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\" Margin=\"12,0,88,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,42,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.6-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,310,0,0\">\r\n                        <TextBlock Foreground=\"#FF2E90E7\" TextAlignment=\"Center\" Margin=\"12,0,12,25\" Text=\"{Binding Resources.CloudBased, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.CloudBasedMessage, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                    <!--<Border HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\" Margin=\"12,0,12,196\" Height=\"2\" Width=\"76\" Background=\"{StaticResource PhoneForegroundBrush}\"/>-->\r\n\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n        </startView:StartView>\r\n\r\n        <!--<Border VerticalAlignment=\"Bottom\" Margin=\"0,0,0,196\" Width=\"24\" HorizontalAlignment=\"Left\" Height=\"2\" Background=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n        <Border VerticalAlignment=\"Bottom\" Margin=\"0,0,0,196\" Width=\"24\" HorizontalAlignment=\"Right\" Height=\"2\" Background=\"{StaticResource PhoneBackgroundBrush}\"/>-->\r\n        <Border VerticalAlignment=\"Bottom\" Margin=\"24,0,12,196\" Width=\"76\" HorizontalAlignment=\"Left\" Height=\"2\" Background=\"{StaticResource PhoneForegroundBrush}\">\r\n            <Border.RenderTransform>\r\n                <TranslateTransform x:Name=\"BorderPosition\"/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n\r\n        <Border VerticalAlignment=\"Bottom\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n            <Button x:Name=\"StartMessaging\" Margin=\"12,0\" Content=\"{Binding Resources.StartMessaging, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n        </Border>\r\n    </Grid>\r\n\r\n</phone:PhoneApplicationPage>"
  },
  {
    "path": "TelegramClient.WP8/Views/Additional/StartupView.xaml.cs",
    "content": "﻿using System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class StartupView\r\n    {\r\n        private const double ScreenWidth = 480.0;\r\n\r\n        private const double MarginWidth = 24.0;\r\n\r\n        private const double ScrollIndicatorWidth = 76.0;\r\n\r\n        private const int LastIndex = 5;\r\n\r\n        private const double ScrollIndicatorTranslationX = (ScreenWidth - MarginWidth - MarginWidth - ScrollIndicatorWidth) / LastIndex;\r\n\r\n\r\n        public StartupView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void StartView_OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            var index = StartView.SelectedIndex;\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var timeline = new DoubleAnimationUsingKeyFrames();\r\n            timeline.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = index * ScrollIndicatorTranslationX, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(timeline, BorderPosition);\r\n            Storyboard.SetTargetProperty(timeline, new PropertyPath(\"X\"));\r\n            storyboard.Children.Add(timeline);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void StartView_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            if (StartView.SelectedIndex == 0 && e.DeltaManipulation.Translation.X > 0.0 && BorderPosition.X == 0.0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (StartView.SelectedIndex == LastIndex && e.DeltaManipulation.Translation.X < 0.0 && BorderPosition.X == ScrollIndicatorTranslationX * LastIndex)\r\n            {\r\n                return;\r\n            }\r\n\r\n            BorderPosition.X -= e.DeltaManipulation.Translation.X / ScreenWidth * ScrollIndicatorTranslationX;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP8/Views/Contacts/ContactsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Contacts.ContactsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    x:Name=\"Main\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <phone:JumpListItemBackgroundConverter x:Key=\"BackgroundConverter\" Enabled=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <phone:JumpListItemForegroundConverter x:Key=\"ForegroundConverter\"/>\r\n            \r\n            <DataTemplate x:Key=\"GroupHeaderTemplate\">\r\n                <Border Visibility=\"{Binding Key, Converter={StaticResource GroupVisibilityConverter}, ConverterParameter='@'}\"\r\n                    Margin=\"6,0,12,12\" Background=\"Transparent\">\r\n                    <Border Background=\"Transparent\" BorderBrush=\"{StaticResource TelegramBadgeAccentBrush}\" BorderThickness=\"0\" Width=\"72\" CornerRadius=\"36\"\r\n                        Height=\"72\" Margin=\"0,0,18,0\" HorizontalAlignment=\"Left\">\r\n                        <TextBlock Text=\"{Binding Key}\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" FontSize=\"48\" Padding=\"0\" \r\n                            FontFamily=\"{StaticResource PhoneFontFamilySemiLight}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\"/>\r\n                    </Border>\r\n                </Border>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"UserItemTemplate\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"6,12,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" micro:Message.Attach=\"[Event Tap] = [Action SetOpenContactElement($source)]; [Event Tap] = [Action UserAction($DataContext)]\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"72\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                    \r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                        <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                            Text=\"{Binding StatusCommon, Converter={StaticResource UserStatusToStringConverter}}\" \r\n                            Foreground=\"{Binding StatusCommon, Converter={StaticResource UserStatusToBrushConverter}}\" \r\n                            Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid Margin=\"0,0,-16,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <longListSelector:LongListSelector\r\n                toolkit:TiltEffect.SuppressTilt=\"True\"\r\n                Grid.Row=\"1\" Margin=\"0,0,4,0\" \r\n                ItemsSource=\"{Binding Contacts}\"\r\n                GroupHeaderTemplate=\"{StaticResource GroupHeaderTemplate}\"\r\n                Background=\"Transparent\">\r\n                <longListSelector:LongListSelector.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                    </ItemsPanelTemplate>\r\n                </longListSelector:LongListSelector.ItemsPanel>\r\n                <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                    <DataTemplate>\r\n                        <Grid DataContext=\"{Binding DataContext, ElementName=Main}\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <ListBoxItem Grid.Row=\"0\" toolkit:TiltEffect.SuppressTilt=\"False\">\r\n                                <ContentControl \r\n                                    HorizontalContentAlignment=\"Stretch\"\r\n                                    Visibility=\"{Binding Self, Converter={StaticResource ExistsToVisibilityConverter}}\" \r\n                                    Content=\"{Binding Self}\" >\r\n                                    <ContentControl.ContentTemplate>\r\n                                        <DataTemplate>\r\n                                            <Grid x:Name=\"MainItemGrid\" Margin=\"6,24,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" micro:Message.Attach=\"[Event Tap] = [Action SetOpenContactElement($source)]; [Event Tap] = [Action UserAction($DataContext)]\">\r\n                                                <Grid.ColumnDefinitions>\r\n                                                    <ColumnDefinition Width=\"72\"/>\r\n                                                    <ColumnDefinition Width=\"*\"/>\r\n                                                </Grid.ColumnDefinitions>\r\n                                                <views:ConversationTileControl Size=\"72\" \r\n                                                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                                                        Object=\"{Binding}\"\r\n                                                        Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                                                        Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                                                        Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                                                <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                                                    <Grid.RowDefinitions>\r\n                                                        <RowDefinition Height=\"Auto\"/>\r\n                                                        <RowDefinition Height=\"Auto\"/>\r\n                                                    </Grid.RowDefinitions>\r\n                                                    <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding FullName}\" MaxHeight=\"36\" FontSize=\"27\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                                                    <TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                                                           Text=\"{Binding Resources.ChatWithYourself, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"\r\n                                                           Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                                                           Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                                                </Grid>\r\n                                            </Grid>\r\n                                        </DataTemplate>\r\n                                    </ContentControl.ContentTemplate>\r\n                                </ContentControl>\r\n                            </ListBoxItem>\r\n\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"6,10,0,14\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding Resources.MyContacts, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                            <TextBlock Grid.Row=\"2\" Margin=\"6,0,0,14\" Text=\"{Binding Status}\" Visibility=\"{Binding Status, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListHeaderTemplate>\r\n                <longListSelector:LongListSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <ListBoxItem toolkit:TiltEffect.SuppressTilt=\"False\">\r\n                            <ContentControl \r\n                                HorizontalContentAlignment=\"Stretch\"\r\n                                Content=\"{Binding}\" \r\n                                ContentTemplate=\"{StaticResource UserItemTemplate}\"/>\r\n                        </ListBoxItem>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ItemTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <Border />\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n                <longListSelector:LongListSelector.GroupItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <toolkit:WrapPanel Orientation=\"Horizontal\" Margin=\"0,32,0,0\"/>\r\n                    </ItemsPanelTemplate>\r\n                </longListSelector:LongListSelector.GroupItemsPanel>\r\n                <longListSelector:LongListSelector.GroupItemTemplate>\r\n                    <DataTemplate>\r\n                        <Border Background=\"{Binding Converter={StaticResource BackgroundConverter}}\" Width=\"99\" Height=\"99\" Margin=\"6\" >\r\n                            <Grid>\r\n                                <TextBlock Text=\"{Binding Key}\" \r\n                                    Visibility=\"{Binding Key, Converter={StaticResource GroupVisibilityConverter}, ConverterParameter='@'}\"\r\n                                    FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" FontSize=\"48\" Padding=\"6\" Foreground=\"{Binding Converter={StaticResource ForegroundConverter}}\" VerticalAlignment=\"Bottom\"/>\r\n                                <Image Visibility=\"{Binding Key, Converter={StaticResource TelegramGroupVisibilityConverter}, ConverterParameter='@'}\"\r\n                                    Margin=\"6,24\" Source=\"/Images/LockScreen/lockscreen.png\" Width=\"37\" Height=\"37\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.GroupItemTemplate>\r\n            </longListSelector:LongListSelector>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP8/Views/Contacts/ContactsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\n\r\nnamespace TelegramClient.Views.Contacts\r\n{\r\n    public partial class ContactsView\r\n    {\r\n        public ContactsView()\r\n        {\r\n            App.Log(\"start ContactsView.ctor\");\r\n\r\n            InitializeComponent();\r\n\r\n            App.Log(\"stop ContactsView.ctor\");\r\n        }\r\n\r\n        public FrameworkElement TapedItem;\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            TapedItem = (FrameworkElement)sender;\r\n\r\n            var userBase = TapedItem.DataContext as TLUserBase;\r\n            if (userBase == null) return;\r\n\r\n            if (!(TapedItem.RenderTransform is CompositeTransform))\r\n            {\r\n                TapedItem.RenderTransform = new CompositeTransform();\r\n            }\r\n\r\n            var listBoxItem = TapedItem.FindParentOfType<ListBoxItem>();\r\n\r\n            ShellView.StartContinuumForwardOutAnimation(TapedItem, listBoxItem);\r\n\r\n            Loaded += (o, args) =>\r\n            {\r\n\r\n            };\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP8/Views/Controls/AudioRecorderControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.AudioRecorderControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:helpers=\"clr-namespace:TelegramClient.Helpers\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"72\" d:DesignWidth=\"680\"\r\n    x:Name=\"Self\">\r\n    \r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <Storyboard x:Name=\"HintStoryboard\" Completed=\"HintStoryboard_OnCompleted\">\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"Hint\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:1\" Value=\"Collapsed\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"RecordButton\">\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:1\" Value=\"Visible\"/>\r\n                </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            \r\n            <Storyboard x:Name=\"CancelRecordingStoryboard\" Completed=\"CancelRecordingStoryboard_OnCompleted\">\r\n                <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"X\" Storyboard.TargetName=\"SliderTransform\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.15\" Value=\"-100\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"X\" Storyboard.TargetName=\"TimerTransform\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.15\" Value=\"-100\"/>\r\n                </DoubleAnimationUsingKeyFrames>-->\r\n            </Storyboard>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\"\r\n        ManipulationDelta=\"LayoutRoot_OnManipulationDelta\"\r\n        ManipulationCompleted=\"LayoutRoot_OnManipulationCompleted\">\r\n        <Grid.ColumnDefinitions>\r\n            <ColumnDefinition Width=\"Auto\"/>\r\n            <ColumnDefinition Width=\"*\"/>\r\n            <ColumnDefinition Width=\"Auto\"/>\r\n            <ColumnDefinition Width=\"Auto\"/>\r\n        </Grid.ColumnDefinitions>\r\n\r\n        <!--<Grid x:Name=\"ClipGrid\" Grid.Column=\"1\" Background=\"Transparent\" helpers:Clip.ToBounds=\"True\">      \r\n            <StackPanel x:Name=\"Slider\" Visibility=\"Collapsed\" VerticalAlignment=\"Center\" Orientation=\"Horizontal\" HorizontalAlignment=\"Center\" Margin=\"6,0,0,0\">\r\n                <StackPanel.RenderTransform>\r\n                    <TranslateTransform x:Name=\"SliderTransform\"/>\r\n                </StackPanel.RenderTransform>\r\n                <TextBlock VerticalAlignment=\"Center\" Text=\"{Binding Resources.Cancel, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" FontSize=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n                <Path Data=\"M 0,0 7,12 0,24\" VerticalAlignment=\"Center\" Margin=\"6,0\" Fill=\"Transparent\" StrokeThickness=\"3\" Stroke=\"{Binding Foreground, ElementName=Self}\">\r\n                    <Path.RenderTransform>\r\n                        <TranslateTransform X=\"6\" Y=\"2.5\"/>\r\n                    </Path.RenderTransform>\r\n                </Path>\r\n            </StackPanel>\r\n        </Grid>-->\r\n        \r\n        <Grid x:Name=\"RecordButton\"\r\n            Background=\"Transparent\"\r\n            MouseLeftButtonDown=\"RecordButton_OnMouseLeftButtonDown\"\r\n            MouseLeftButtonUp=\"RecordButton_OnMouseLeftButtonUp\">\r\n            <Image x:Name=\"RecordImage\" Margin=\"52,-1,0,0\" Width=\"62\" Height=\"62\" />\r\n        </Grid>\r\n        \r\n        <TextBlock x:Name=\"Hint\" Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Visibility=\"Collapsed\" VerticalAlignment=\"Center\" Margin=\"12,0\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.TapAndHoldToRecord, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" FontSize=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP8/Views/Controls/AudioRecorderControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Threading;\r\nusing Windows.Storage;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Devices;\r\nusing Microsoft.Xna.Framework;\r\nusing Microsoft.Xna.Framework.Audio;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient_Opus;\r\nusing Action = System.Action;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class AudioRecorderControl\r\n    {\r\n        public bool UploadFileDuringRecording { get; set; }\r\n\r\n        public string RecorderImageSource\r\n        {\r\n            get\r\n            {\r\n                var currentBackground = IoC.Get<IStateService>().CurrentBackground;\r\n                if (currentBackground != null && currentBackground.Name != \"Empty\")\r\n                {\r\n                    return \"/Images/Audio/microphone.light.png\";\r\n                }\r\n\r\n                var isLightTheme = (Visibility) Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    return \"/Images/Audio/microphone.dark.png\";\r\n                }\r\n\r\n                return \"/Images/Audio/microphone.light.png\";\r\n            }\r\n        }\r\n\r\n        private bool _isLogEnabled = false;\r\n\r\n        private void Log(string str)\r\n        {\r\n            if (!_isLogEnabled) return;\r\n\r\n            System.Diagnostics.Debug.WriteLine(DateTime.Now.ToString(\"  HH:mm:ss.fff \") + str);\r\n        }\r\n\r\n        private DateTime? _lastTypingTime;\r\n        private bool _isHintStoryboardPlaying;\r\n        private bool _isSliding;\r\n        private Microphone _microphone;\r\n        private byte[] _buffer;\r\n        private TimeSpan _duration;\r\n        private TimeSpan _recordedDuration;\r\n        private DateTime _startTime;\r\n        private volatile bool _stopRequested;\r\n        private volatile bool _cancelRequested;\r\n        private MemoryStream _stream;\r\n        private XnaAsyncDispatcher _asyncDispatcher;\r\n        private string _fileName = \"audio.mp3\";\r\n\r\n        private WindowsPhoneRuntimeComponent _component;\r\n\r\n        protected WindowsPhoneRuntimeComponent Component\r\n        {\r\n            get\r\n            {\r\n                if (DesignerProperties.IsInDesignTool) return null;\r\n\r\n                _component = _component ?? new WindowsPhoneRuntimeComponent();\r\n\r\n                return _component;\r\n            }\r\n        }\r\n\r\n        private DateTime? _lastUpdateTime;\r\n\r\n        private long _uploadingLength;\r\n        private volatile bool _isPartReady;\r\n        private int _skipBuffersCount;\r\n        private TLLong _fileId;\r\n        private readonly List<UploadablePart> _uploadableParts = new List<UploadablePart>();\r\n\r\n        private void OnTimerTick()\r\n        {\r\n            //if (_lastUpdateTime.HasValue && (DateTime.Now - _lastUpdateTime.Value).TotalMilliseconds < 50.0) return;\r\n\r\n            _lastUpdateTime = DateTime.Now;\r\n\r\n            if (Duration != null) Duration.Text = (DateTime.Now - _startTime).ToString(@\"mm\\:ss\\.ff\");\r\n        }\r\n\r\n        public AudioRecorderControl()\r\n        {\r\n            ShellViewModel.WriteTimer(\"AudioRecorderControl ctor\");\r\n\r\n            InitializeComponent();\r\n\r\n            ShellViewModel.WriteTimer(\"AudioRecorderControl ctor InitializeComponent\");\r\n\r\n            ShellViewModel.WriteTimer(\"AudioRecorderControl ctor asyncDispatcher\");\r\n\r\n            RecordImage.Source = new BitmapImage(new Uri(RecorderImageSource, UriKind.Relative));\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                if (_microphone != null)\r\n                {\r\n                    System.Diagnostics.Debug.WriteLine(\"+OnBufferReady\");\r\n                    _microphone.BufferReady += Microphone_OnBufferReady;\r\n                }\r\n            };\r\n            Unloaded += (o, e) =>\r\n            {\r\n                if (_microphone != null)\r\n                {\r\n                    System.Diagnostics.Debug.WriteLine(\"-OnBufferReady\");\r\n                    _microphone.BufferReady -= Microphone_OnBufferReady;\r\n                }\r\n            };\r\n\r\n            ShellViewModel.WriteTimer(\"AudioRecorderControl end ctor\");\r\n        }\r\n\r\n        private void Microphone_OnBufferReady(object sender, System.EventArgs e)\r\n        {\r\n            const int skipStartBuffersCount = 1;\r\n\r\n            if (Component == null) return;\r\n\r\n            var dataLength = _microphone.GetData(_buffer);\r\n            if (_skipBuffersCount < skipStartBuffersCount)\r\n            {\r\n                _skipBuffersCount++;\r\n                return;\r\n            }\r\n            \r\n            const int frameLength = 1920;\r\n            var partsCount = dataLength / frameLength;\r\n            _stream.Write(_buffer, 0, _buffer.Length);\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var count = frameLength * (i + 1) > _buffer.Length ? _buffer.Length - frameLength * i : frameLength;\r\n                var result = Component.WriteFrame(_buffer.SubArray(frameLength * i, count), count);\r\n            }\r\n\r\n            if (_stopRequested || _cancelRequested)\r\n            {\r\n                _microphone.Stop();\r\n                _asyncDispatcher.StopService();\r\n                Component.StopRecord();\r\n\r\n                if (UploadFileDuringRecording)\r\n                {\r\n                    UploadAudioFileAsync(true);\r\n                }\r\n\r\n                if (_stopRequested)\r\n                {\r\n                    if ((DateTime.Now - _startTime).TotalMilliseconds < 1000.0)\r\n                    {\r\n                        _stopRequested = false;\r\n                        _cancelRequested = false;\r\n                        //Log(\"HintStoryboard_OnCompleted._stopRequested=false\");\r\n\r\n                        _isHintStoryboardPlaying = true;\r\n                        HintStoryboard.Begin();\r\n                        return;\r\n                    }\r\n\r\n                    RaiseAudioRecorded(_stream, (DateTime.Now - _startTime - TimeSpan.FromTicks(_microphone.BufferDuration.Ticks * skipStartBuffersCount)).TotalSeconds, _fileName, _fileId, _uploadableParts);\r\n                    return;\r\n                }\r\n\r\n                if (_cancelRequested)\r\n                {\r\n                    RaiseRecordCanceled();\r\n                    return;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                var now = DateTime.Now;\r\n                if (!_lastTypingTime.HasValue\r\n                    || _lastTypingTime.Value.AddSeconds(1.0) < now)\r\n                {\r\n                    _lastTypingTime = DateTime.Now;\r\n                    RaiseRecordingAudio();\r\n                }\r\n\r\n                if (UploadFileDuringRecording)\r\n                {\r\n                    UploadAudioFileAsync(false);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UploadAudioFileAsync(bool isLastPart)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                if (!_isPartReady) return;\r\n\r\n                _isPartReady = false;\r\n\r\n                var uploadablePart = GetUploadablePart(_fileName, _uploadingLength, _uploadableParts.Count, isLastPart);\r\n                if (uploadablePart == null)\r\n                {\r\n                    _isPartReady = true;\r\n                    return;\r\n                }\r\n\r\n                _uploadableParts.Add(uploadablePart);\r\n                _uploadingLength += uploadablePart.Count;\r\n\r\n                //Execute.BeginOnUIThread(() => VibrateController.Default.Start(TimeSpan.FromSeconds(0.02)));\r\n\r\n                if (!isLastPart)\r\n                {\r\n                    var mtProtoService = IoC.Get<IMTProtoService>();\r\n                    mtProtoService.SaveFilePartAsync(_fileId, uploadablePart.FilePart,\r\n                        TLString.FromBigEndianData(uploadablePart.Bytes),\r\n                        result =>\r\n                        {\r\n                            if (result.Value)\r\n                            {\r\n                                uploadablePart.Status = PartStatus.Processed;\r\n                            }\r\n                        },\r\n                        error => Execute.ShowDebugMessage(\"upload.saveFilePart error \" + error));\r\n                }\r\n\r\n                _isPartReady = true;\r\n            });\r\n        }\r\n\r\n        private static UploadablePart GetUploadablePart(string fileName, long position, int partId, bool isLastPart = false)\r\n        {\r\n            var fullFilePath = ApplicationData.Current.LocalFolder.Path + \"\\\\\" + fileName;\r\n            var fi = new FileInfo(fullFilePath);\r\n            if (!fi.Exists)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            const int minPartLength = 1024;\r\n            const int maxPartLength = 16 * 1024;\r\n\r\n            var recordingLength = fi.Length - position;\r\n            if (!isLastPart && recordingLength < minPartLength)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var subpartsCount = (int)recordingLength / minPartLength;\r\n            var uploadingBufferSize = 0;\r\n            if (isLastPart)\r\n            {\r\n                if (recordingLength > 0)\r\n                {\r\n                    uploadingBufferSize = Math.Min(maxPartLength, (int)recordingLength);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                uploadingBufferSize = Math.Min(maxPartLength, subpartsCount * minPartLength);\r\n            }\r\n            if (uploadingBufferSize == 0)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var uploadingBuffer = new byte[uploadingBufferSize];\r\n\r\n            try\r\n            {\r\n                using (var fileStream = File.Open(fullFilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))\r\n                {\r\n                    fileStream.Position = position;\r\n                    fileStream.Read(uploadingBuffer, 0, uploadingBufferSize);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\"read file \" + fullFilePath + \" exception \" + ex);\r\n                return null;\r\n            }\r\n\r\n            return new UploadablePart(null, new TLInt(partId), uploadingBuffer, position, uploadingBufferSize);\r\n        }\r\n\r\n        private void RecordButton_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n            if (!IsHitTestVisible) return;\r\n            var microphoneState = _microphone != null ? _microphone.State : (MicrophoneState?)null;\r\n            if (microphoneState == MicrophoneState.Started) return;\r\n            if (_isHintStoryboardPlaying) return;\r\n\r\n            Log(string.Format(\"microphone_state={0} storyboard_state={1}\", microphoneState, _isHintStoryboardPlaying));\r\n\r\n            if (Component == null) return;\r\n            if (_asyncDispatcher == null)\r\n            {\r\n                _asyncDispatcher = new XnaAsyncDispatcher(TimeSpan.FromMilliseconds(33), OnTimerTick);\r\n            }\r\n\r\n            if (SliderPanel == null)\r\n            {\r\n                SliderPanel = CreateSliderPanel();\r\n                LayoutRoot.Children.Add(SliderPanel);\r\n            }\r\n            if (TimerPanel == null)\r\n            {\r\n                TimerPanel = CreateTimerPanel();\r\n                LayoutRoot.Children.Add(TimerPanel);\r\n            }\r\n\r\n            if (_microphone == null)\r\n            {\r\n                _microphone = Microphone.Default;\r\n\r\n                ShellViewModel.WriteTimer(\"AudioRecorderControl ctor microphone\");\r\n\r\n                if (_microphone == null)\r\n                {\r\n                    RecordButton.Visibility = Visibility.Collapsed;\r\n                    Visibility = Visibility.Collapsed;\r\n                    IsHitTestVisible = false;\r\n\r\n                    return;\r\n                }\r\n\r\n                try\r\n                {\r\n                    _microphone.BufferDuration = TimeSpan.FromMilliseconds(240);\r\n                    _duration = _microphone.BufferDuration;\r\n                    _buffer = new byte[_microphone.GetSampleSizeInBytes(_microphone.BufferDuration)];\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n\r\n                    RecordButton.Visibility = Visibility.Collapsed;\r\n                    Visibility = Visibility.Collapsed;\r\n                    IsHitTestVisible = false;\r\n\r\n                    return;\r\n                }\r\n\r\n                _microphone.BufferReady += Microphone_OnBufferReady;\r\n            }\r\n\r\n            _skipBuffersCount = 0;\r\n            _fileId = TLLong.Random();\r\n            _fileName = _fileId.Value + \".mp3\";\r\n            _isPartReady = true;\r\n            _uploadingLength = 0;\r\n            _uploadableParts.Clear();\r\n\r\n            _isSliding = true;\r\n            _stopRequested = false;\r\n            _cancelRequested = false;\r\n\r\n            RaiseRecordStarted();\r\n\r\n            if (Duration != null) Duration.Text = \"00:00.00\";\r\n            if (Slider != null) ((TranslateTransform)Slider.RenderTransform).X = 0.0;\r\n            Component.StartRecord(ApplicationData.Current.LocalFolder.Path + \"\\\\\" + _fileName);\r\n\r\n            _stream = new MemoryStream();\r\n            _startTime = DateTime.Now; \r\n            VibrateController.Default.Start(TimeSpan.FromMilliseconds(25));\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromMilliseconds(25.0), () =>\r\n            {\r\n                if (!_isSliding)\r\n                {\r\n                    if (_stopRequested)\r\n                    {\r\n                        _stopRequested = false;\r\n                        _cancelRequested = false;\r\n\r\n                        _isHintStoryboardPlaying = true;\r\n                        HintStoryboard.Begin();\r\n                        return;\r\n                    }\r\n                    Log(\"_isSliding=false return\");\r\n                    return;\r\n                }\r\n\r\n                if (Slider != null) Slider.Visibility = Visibility.Visible;\r\n                if (TimerPanel != null) TimerPanel.Visibility = Visibility.Visible;\r\n                \r\n                _asyncDispatcher.StartService(null);\r\n                _microphone.Start();\r\n                \r\n                StartRecordingStoryboard();\r\n            });\r\n        }\r\n\r\n        private void StartRecordingStoryboard()\r\n        {\r\n            var storyboard = new Storyboard();\r\n            \r\n            var timerAnimation = new DoubleAnimationUsingKeyFrames();\r\n            timerAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -100.0 });\r\n            timerAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0 });\r\n            Storyboard.SetTarget(timerAnimation, TimerPanel);\r\n            Storyboard.SetTargetProperty(timerAnimation, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.X)\"));\r\n            storyboard.Children.Add(timerAnimation);\r\n\r\n            var sliderAnimation = new DoubleAnimationUsingKeyFrames();\r\n            sliderAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -100.0 });\r\n            sliderAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0 });\r\n            Storyboard.SetTarget(sliderAnimation, Slider);\r\n            Storyboard.SetTargetProperty(sliderAnimation, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.X)\"));\r\n            storyboard.Children.Add(sliderAnimation);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private TextBlock Duration;\r\n\r\n        private Grid SliderPanel;\r\n\r\n        private StackPanel Slider;\r\n\r\n        private Grid TimerPanel;\r\n\r\n        private Grid CreateTimerPanel()\r\n        {\r\n            var timerPanel = new Grid{ Visibility = Visibility.Collapsed};\r\n            timerPanel.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });\r\n            timerPanel.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });\r\n\r\n            timerPanel.RenderTransform = new TranslateTransform();\r\n\r\n            Duration = new TextBlock\r\n            {\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                Margin = new Thickness(12.0, 4.0, -2.0, 0.0),\r\n                Text = \"00:00.00\",\r\n                FontSize = (double)Application.Current.Resources[\"PhoneFontSizeMediumLarge\"],\r\n                FontFamily = new FontFamily(\"Curier new\")\r\n            };\r\n            var border = new Border\r\n            {\r\n                Margin = new Thickness(6.0, 2.0, 12.0, 0.0),\r\n                Width = 6.0,\r\n                Height = 6.0,\r\n                Background = new SolidColorBrush(Colors.Red),\r\n                CornerRadius = new CornerRadius(3.0)\r\n            };\r\n            Grid.SetColumn(border, 1);\r\n\r\n            timerPanel.Children.Add(Duration);\r\n            timerPanel.Children.Add(border);\r\n\r\n            Grid.SetColumn(timerPanel, 2);\r\n\r\n            return timerPanel;\r\n        }\r\n\r\n        private Grid CreateSliderPanel()\r\n        {\r\n            var clipGrid = new Grid { Background = new SolidColorBrush(Colors.Transparent) };\r\n            Helpers.Clip.SetToBounds(clipGrid, true);\r\n            Grid.SetColumn(clipGrid, 1);\r\n\r\n            Slider = new StackPanel\r\n            {\r\n                Visibility = Visibility.Collapsed,\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                Orientation = Orientation.Horizontal,\r\n                HorizontalAlignment = HorizontalAlignment.Center,\r\n                Margin = new Thickness(6.0, 0.0, 0.0, 0.0),\r\n                RenderTransform = new TranslateTransform()\r\n            };\r\n\r\n            var textBlock = new TextBlock\r\n            {\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                Text = AppResources.Cancel.ToUpperInvariant(),\r\n                FontSize = (double) Application.Current.Resources[\"PhoneFontSizeMediumLarge\"]\r\n            };\r\n\r\n            var path = new System.Windows.Shapes.Path\r\n            {\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                Margin = new Thickness(6.0, 0.0, 6.0, 0.0),\r\n                Fill = new SolidColorBrush(Colors.Transparent),\r\n                StrokeThickness = 3.0,\r\n                Stroke = Foreground,\r\n                RenderTransform = new TranslateTransform { X = 6.0, Y = 2.5 }\r\n            };\r\n            var dataBinding = new System.Windows.Data.Binding { Source = \"M 0,0 7,12 0,24\" };\r\n            path.SetBinding(System.Windows.Shapes.Path.DataProperty, dataBinding);\r\n\r\n            Slider.Children.Add(textBlock);\r\n            Slider.Children.Add(path);\r\n\r\n            clipGrid.Children.Add(Slider);\r\n\r\n            return clipGrid;\r\n        }\r\n\r\n        private void RecordButton_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            Log(\"RecordButton_OnMouseLeftButtonUp\");\r\n            StopRecording();\r\n        }\r\n\r\n        public event EventHandler<AudioEventArgs> AudioRecorded;\r\n\r\n        protected virtual void RaiseAudioRecorded(MemoryStream stream, double duration, string fileName, TLLong fileId, IList<UploadablePart> parts)\r\n        {\r\n            var stringBuilder = new StringBuilder();\r\n            stringBuilder.AppendLine(\"parts\");\r\n            foreach (var part in parts)\r\n            {\r\n                stringBuilder.AppendLine(string.Format(\"file_part={0} position={1} count={2} status={3}\", part.FilePart, part.Position, part.Count, part.Status));\r\n            }\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"AudioRecorderControl.AudioRecorded duration={0} file_name={1}\\n{2}\", duration, fileName, stringBuilder));\r\n\r\n            var handler = AudioRecorded;\r\n            if (handler != null) handler(this, new AudioEventArgs(stream, duration, fileName, fileId, parts));\r\n        }\r\n\r\n        public event EventHandler<System.EventArgs> RecordCanceled;\r\n\r\n        protected virtual void RaiseRecordCanceled()\r\n        {\r\n            Telegram.Logs.Log.Write(\"AudioRecorderControl.AudioRecordCanceled\");\r\n\r\n            var handler = RecordCanceled;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler<System.EventArgs> RecordStarted;\r\n\r\n        protected virtual void RaiseRecordStarted()\r\n        {\r\n            Telegram.Logs.Log.Write(\"AudioRecorderControl.AudioRecordStarted\");\r\n\r\n            var handler = RecordStarted;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler<System.EventArgs> RecordingAudio;\r\n\r\n        protected virtual void RaiseRecordingAudio()\r\n        {\r\n            var handler = RecordingAudio;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void CancelRecording()\r\n        {\r\n            if (Slider != null) Slider.Visibility = Visibility.Collapsed;\r\n            if (TimerPanel != null) TimerPanel.Visibility = Visibility.Collapsed;\r\n\r\n            if (!_stopRequested)\r\n            {\r\n                _cancelRequested = true;\r\n            }\r\n            _isSliding = false;\r\n            _lastTypingTime = null;\r\n        }\r\n\r\n        private void StopRecording()\r\n        {\r\n            VibrateController.Default.Start(TimeSpan.FromMilliseconds(25));\r\n\r\n            if (Slider != null) Slider.Visibility = Visibility.Collapsed;\r\n            if (TimerPanel != null) TimerPanel.Visibility = Visibility.Collapsed;\r\n            _stopRequested = true;\r\n            _isSliding = false;\r\n            _lastTypingTime = null;\r\n        }\r\n\r\n        private void LayoutRoot_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            if (!_isSliding) return;\r\n            if (Slider == null) return;\r\n\r\n\r\n            var transform = (TranslateTransform)Slider.RenderTransform;\r\n            transform.X += e.DeltaManipulation.Translation.X;\r\n\r\n            if (transform.X < 0)\r\n            {\r\n                transform.X = 0;\r\n            }\r\n\r\n            if (transform.X > 200)\r\n            {\r\n                //SliderTransform.X = 0;\r\n                _isSliding = false;\r\n\r\n                CancelRecordingStoryboard.Begin();\r\n            }\r\n        }\r\n\r\n        private void LayoutRoot_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            if (!_cancelRequested && Hint.Visibility == Visibility.Collapsed)\r\n            {\r\n                StopRecording();\r\n            }\r\n        }\r\n\r\n        private void HintStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            _isHintStoryboardPlaying = false;\r\n\r\n            RaiseRecordCanceled();\r\n        }\r\n\r\n        private void CancelRecordingStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            CancelRecording();\r\n        }\r\n    }\r\n\r\n    public class XnaAsyncDispatcher : IApplicationService\r\n    {\r\n\r\n        private readonly DispatcherTimer _timer;\r\n        private readonly Action _tickAction;\r\n        public XnaAsyncDispatcher(TimeSpan dispatchInterval, Action tickAction = null)\r\n        {\r\n            FrameworkDispatcher.Update();\r\n            _timer = new DispatcherTimer();\r\n            _timer.Tick += TimerTick;\r\n            _timer.Interval = dispatchInterval;\r\n\r\n            _tickAction = tickAction;\r\n        }\r\n        public void StartService(ApplicationServiceContext context)\r\n        {\r\n            _timer.Start();\r\n        }\r\n\r\n        public void StopService()\r\n        {\r\n            _timer.Stop();\r\n        }\r\n\r\n        private void TimerTick(object sender, System.EventArgs eventArgs)\r\n        {\r\n            try\r\n            {\r\n                FrameworkDispatcher.Update();\r\n            }\r\n            catch (Exception e)\r\n            {\r\n#if DEBUG\r\n                MessageBox.Show(e.ToString());\r\n#endif\r\n            }\r\n            if (_tickAction != null) _tickAction();\r\n        }\r\n    }\r\n\r\n    public class AudioEventArgs : System.EventArgs\r\n    {\r\n        public MemoryStream PcmStream { get; set; }\r\n\r\n        public string OggFileName { get; set; }\r\n\r\n        public double Duration { get; set; }\r\n\r\n        public TLLong FileId { get; set; }\r\n\r\n        public IList<UploadablePart> Parts { get; set; }\r\n\r\n        public AudioEventArgs(MemoryStream stream, double duration, string fileName, TLLong fileId, IList<UploadablePart> parts)\r\n        {\r\n            PcmStream = stream;\r\n            Duration = duration;\r\n            OggFileName = fileName;\r\n            FileId = fileId;\r\n            Parts = parts;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/Views/Dialogs/DialogDetailsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Dialogs.DialogDetailsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:telegramClient=\"clr-namespace:TelegramClient\"\r\n    xmlns:telegramControls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"SelfView\"\r\n    CacheMode=\"BitmapCache\"\r\n    mc:Ignorable=\"d\"\r\n    UseLayoutRounding=\"True\"\r\n    Background=\"Transparent\"\r\n    BackKeyPress=\"DialogDetailsView_OnBackKeyPress\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition x:Name=\"OutTransition\">\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <SolidColorBrush x:Key=\"OutputBackgroundBrushLight\" Color=\"#FFE3F4FF\"/>\r\n        <SolidColorBrush x:Key=\"OutputBorderBrushLight\" Color=\"#6686A9C9\"/>\r\n        <SolidColorBrush x:Key=\"OutputSubtleBrushLight\" Color=\"#FF7C9FBA\"/>\r\n        <SolidColorBrush x:Key=\"InputBackgroundBrushLight\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#4D86A9C9\"/>\r\n        <SolidColorBrush x:Key=\"InputSubtleBrushLight\" Color=\"#FF93989D\"/>\r\n\r\n        <SolidColorBrush x:Key=\"OutputBackgroundBrushDark\" Color=\"#FF2B2B2B\"/>\r\n        <SolidColorBrush x:Key=\"OutputBorderBrushDark\" Color=\"#6686A9C9\"/>\r\n        <SolidColorBrush x:Key=\"InputBackgroundBrushDark\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#4D86A9C9\"/>\r\n\r\n        <DataTemplate x:Key=\"ServiceMessageTemplate\">\r\n            <Grid Margin=\"48,12\" x:Name=\"MainItemGrid2\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenServiceMessage($DataContext)]\">\r\n                <toolkit:ContextMenuService.ContextMenu>\r\n                    <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" Loaded=\"ServiceMessageContextMenu_OnLoaded\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=MessagesList}\" Opened=\"ContextMenu_OnOpened\">\r\n                        <toolkit:MenuItem Loaded=\"ReplyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\" />\r\n                        <toolkit:MenuItem Loaded=\"DeleteMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                    </toolkit:ContextMenu>\r\n                </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid HorizontalAlignment=\"Center\">\r\n                    <Border Margin=\"-6\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                    <StackPanel>\r\n                        <!--<TextBlock Margin=\"6,0\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" FontSize=\"20\" Text=\"{Binding Self, Converter={StaticResource ServiceMessageToTextConverter}}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>-->\r\n                        <emojiPanel:TelegramRichTextBox\r\n                            x:Name=\"Text\"\r\n                            Text=\"{Binding Self, Converter={StaticResource ServiceMessageToTextConverter}}\"\r\n                            TextAlignment=\"Center\"\r\n                            HorizontalAlignment=\"Stretch\"\r\n                            FontSize=\"20\"\r\n                            Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                            Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n\r\n                <Grid Grid.Row=\"1\" \r\n                      Background=\"Transparent\"\r\n                      Width=\"100\" Height=\"100\" Margin=\"0,12,0,0\"\r\n                      micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\"\r\n                      Visibility=\"{Binding Action.Photo, Converter={StaticResource ExistsToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                    <Border Background=\"{StaticResource PhoneChromeBrush}\"/>\r\n                    <Image Source=\"{Binding Action.Photo, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=100}\" Stretch=\"UniformToFill\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"UnreadMessagesTemplate\">\r\n            <Grid Margin=\"30,12\" x:Name=\"MainItemGrid2\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid HorizontalAlignment=\"Stretch\">\r\n                    <Border Margin=\"-6\" Background=\"{StaticResource PhoneChromeBrush}\" Height=\"48\"/>\r\n                    <StackPanel Orientation=\"Horizontal\" HorizontalAlignment=\"Center\">\r\n                        <TextBlock Margin=\"0,-2,6,0\" VerticalAlignment=\"Center\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" FontSize=\"22.667\" Text=\"{Binding Converter={StaticResource ServiceMessageToTextConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        <Image Source=\"/Images/Messages/unreadmessages.png\" Width=\"11\">\r\n                            <Image.RenderTransform>\r\n                                <TranslateTransform Y=\"2\"/>\r\n                            </Image.RenderTransform>\r\n                        </Image>\r\n                    </StackPanel>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"UserTemplate\">\r\n            <Grid>\r\n                <Border Margin=\"-12\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                <StackPanel Margin=\"0,40,0,0\">\r\n                    <Grid Width=\"81\">\r\n                        <Image Source=\"{Binding EmptyDialogImageSource}\" Stretch=\"UniformToFill\"/>\r\n                    </Grid>\r\n                    <TextBlock Text=\"{Binding Resources.NoMessagesYet, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Margin=\"48,40,48,0\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                </StackPanel>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"UserSelfTemplate\">\r\n            <Grid VerticalAlignment=\"Center\" Margin=\"45,-35,45,0\">\r\n                <Border Margin=\"-12\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                <StackPanel VerticalAlignment=\"Top\" HorizontalAlignment=\"Stretch\">\r\n                    <Grid Width=\"81\" Margin=\"0,16\">\r\n                        <Image Source=\"{Binding EmptyDialogImageSource}\" Stretch=\"UniformToFill\"/>\r\n                    </Grid>\r\n                    <TextBlock Text=\"{Binding Resources.CloudStorage, Source={StaticResource Strings}}\" TextAlignment=\"Center\" TextWrapping=\"Wrap\"/>\r\n                    <TextBlock Text=\"{Binding Resources.CloudStorageDescription, Source={StaticResource Strings}}\" Margin=\"0,16,0,0\" TextAlignment=\"Left\" TextWrapping=\"Wrap\"/>\r\n                </StackPanel>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"BotTemplate\">\r\n            <Grid VerticalAlignment=\"Center\" Margin=\"62,-35,62,0\">\r\n                <Border Margin=\"-18,-12,-18,-17\" Background=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n                <StackPanel VerticalAlignment=\"Top\" HorizontalAlignment=\"Stretch\">\r\n                    <TextBlock Text=\"{Binding Resources.WhatCanThisBotDo, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" FontWeight=\"SemiBold\" TextAlignment=\"Center\"/>\r\n\r\n                    <emojiPanel:TelegramRichTextBox\r\n                        MaxWidth=\"360\"\r\n                        Margin=\"0,0,0,0\"\r\n                        Text=\"{Binding With.BotInfo.Description}\"\r\n                        HorizontalAlignment=\"Stretch\"\r\n                        TextAlignment=\"Center\"\r\n                        FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                        Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n                </StackPanel>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <DataTemplate x:Key=\"SupportTemplate\">\r\n            <Grid>\r\n                <Border Margin=\"-12\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                <StackPanel Margin=\"0,40,0,0\">\r\n                    <Grid Width=\"81\">\r\n                        <Image Source=\"{Binding EmptyDialogImageSource}\" Stretch=\"UniformToFill\"/>\r\n                    </Grid>\r\n                    <TextBlock Text=\"{Binding Resources.GotAQuestionAboutTelegram, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Margin=\"48,40,48,0\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                </StackPanel>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <templateSelectors:EmptyDialogToDescriptionConverter\r\n            x:Key=\"EmptyDialogToDescriptionConverter\"\r\n            UserSelfTemplate=\"{StaticResource UserSelfTemplate}\"\r\n            UserTemplate=\"{StaticResource UserTemplate}\"\r\n            BotTemplate=\"{StaticResource BotTemplate}\"\r\n            SupportTemplate=\"{StaticResource SupportTemplate}\"/>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid>\r\n        <ContentControl \r\n            HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" \r\n            HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"  \r\n            Content=\"{Binding StateService}\" \r\n            ContentTemplate=\"{Binding StateService.CurrentBackground, Converter={StaticResource DialogDetailsBackgroundConverter}}\"/>\r\n\r\n        <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Grid.RenderTransform>\r\n            <Grid.Projection>\r\n                <PlaneProjection CenterOfRotationX=\"0\"/>\r\n            </Grid.Projection>\r\n\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <telegramClient:LongListSelectorEx Grid.Row=\"1\"\r\n                    x:Name=\"MessagesList\"\r\n                    Margin=\"0,-7,0,0\"\r\n                    Knob=\"15\"\r\n                    ItemsSource=\"{Binding Items}\"\r\n                    IsSelectionEnabled=\"{Binding IsSelectionEnabled}\"\r\n                    IsFirstSliceLoaded=\"{Binding IsFirstSliceLoaded}\"\r\n                    IsGroupingEnabled=\"False\"\r\n                    micro:Message.Attach=\"[Event CloseToEnd] = [Action LoadNextSlice]; [Event CloseToBegin] = [Action LoadPreviousSlice]\"\r\n                    ManipulationStarted=\"Items_OnManipulationStarted\"\r\n                    ManipulationStateChanged=\"Items_OnManipulationStateChanged\"\r\n                    ItemRealized=\"Items_OnItemRealized\"\r\n                    ItemUnrealized=\"Items_OnItemUnrealized\"\r\n                    Begin=\"Items_OnBegin\"\r\n                    ShowScrollButton=\"MessagesList_OnShowScrollButton\"\r\n                    Style=\"{StaticResource LazyLongListSelectorStyle}\">\r\n                    <phone:LongListSelector.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <Grid>\r\n\r\n                                <!--<Border Height=\"50\" Margin=\"12\" Width=\"300\" Background=\"Red\"/>-->\r\n                                <telegramControls:MessageControl \r\n                                    Margin=\"0,0,48,0\"\r\n                                    HorizontalAlignment=\"Stretch\"\r\n                                    Message=\"{Binding}\"\r\n                                    TapUserTile=\"ShowUserProfile_OnTap\"\r\n                                    TapViaBot=\"ViaBot_Tap\"\r\n                                    TapMorePanel=\"MorePanel_OnTap\"\r\n                                    CommandsControlButtonClick=\"CommandsControl_OnButtonClick\"\r\n                                    ShareButtonClick=\"ShareButton_OnClick\"\r\n                                    TapMedia=\"MessageControl_OnTapMedia\"\r\n                                    Hold=\"MessageControl_OnHold\"\r\n                                    ManipulationStarted=\"MessageControl_OnManipulationStarted\"\r\n                                    ManipulationDelta=\"MessageControl_OnManipulationDelta\"\r\n                                    ManipulationCompleted=\"MessageControl_OnManipulationCompleted\">\r\n                                    <UIElement.Projection>\r\n                                        <PlaneProjection RotationZ=\"180\"/>\r\n                                    </UIElement.Projection>\r\n                                    <UIElement.RenderTransform>\r\n                                        <TranslateTransform/>\r\n                                    </UIElement.RenderTransform>\r\n\r\n                                    <telegramControls:MessageControl.ShareButtonContextMenu>\r\n                                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" Loaded=\"CopyLink_OnLoaded\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=MessagesList}\" Opened=\"ContextMenu_OnOpened\">\r\n                                            <toolkit:MenuItem Click=\"CopyLink_OnClick\" Header=\"{Binding Resources.CopyLink, Source={StaticResource Strings}}\"/>\r\n                                        </toolkit:ContextMenu>\r\n                                    </telegramControls:MessageControl.ShareButtonContextMenu>\r\n\r\n                                    <toolkit:ContextMenuService.ContextMenu>\r\n                                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=MessagesList}\" Opened=\"ContextMenu_OnOpened\">\r\n                                            <toolkit:MenuItem Loaded=\"SelectMessages_OnLoaded\" Click=\"SelectMessages_OnClick\" Header=\"{Binding Resources.Select, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"ReportMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ReportMessage($DataContext)]\" Header=\"{Binding Resources.Report, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"ResendMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action Resend($DataContext)]\" Header=\"{Binding Resources.Retry, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"ReplyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"PinMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action PinMessage($DataContext)]\" Header=\"{Binding Resources.Pin, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"EditMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action EditMessage($DataContext)]\" Header=\"{Binding Resources.Edit, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"DeleteMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"ForwardMessage_OnLoaded\" Click=\"ForwardMessage_OnClick\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"AddToStickers_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action AddToStickers($DataContext)]\" Header=\"{Binding Resources.AddToStickers, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"AddToFavedStickers_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action AddToFavedStickers($DataContext)]\" Header=\"{Binding Resources.AddToFavorites, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"CopyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action CopyMessage($DataContext)]\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"SaveMedia_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action SaveMedia($DataContext)]\" Header=\"{Binding Resources.Save, Source={StaticResource Strings}}\"/>\r\n                                        </toolkit:ContextMenu>\r\n                                    </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                                </telegramControls:MessageControl>\r\n\r\n                                <Grid Visibility=\"{Binding SelectionVisibility, FallbackValue=Collapsed}\">\r\n                                    <Border x:Name=\"SelectionBorder\" \r\n                                        Background=\"Transparent\" \r\n                                        Hold=\"UIElement_OnHold\" \r\n                                        Tap=\"SelectionBorder_OnTap\" \r\n                                        Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=SelfView, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n                                    <CheckBox Margin=\"-12,-20,6,-20\" IsChecked=\"{Binding IsSelected, Mode=TwoWay}\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\">\r\n                                        <CheckBox.RenderTransform>\r\n                                            <TranslateTransform X=\"2\"/>\r\n                                        </CheckBox.RenderTransform>\r\n                                        <CheckBox.Projection>\r\n                                            <PlaneProjection RotationZ=\"180\"/>\r\n                                        </CheckBox.Projection>\r\n                                    </CheckBox>\r\n                                </Grid>\r\n\r\n                                <Border \r\n                                    Background=\"{StaticResource TelegramBadgeAccentBrush}\" \r\n                                    Width=\"6\" \r\n                                    HorizontalAlignment=\"Right\" \r\n                                    Margin=\"0,6,48,6\"\r\n                                    Visibility=\"Collapsed\"\r\n                                    dialogs:DialogDetailsView.AnimatedVisibility=\"{Binding IsHighlighted}\"/>\r\n                            </Grid>\r\n                        </DataTemplate>\r\n                    </phone:LongListSelector.ItemTemplate>\r\n                    <phone:LongListSelector.ListHeader>\r\n                        <Border Visibility=\"Collapsed\"/>\r\n                    </phone:LongListSelector.ListHeader>\r\n                    <phone:LongListSelector.Projection>\r\n                        <PlaneProjection RotationZ=\"180\"/>\r\n                    </phone:LongListSelector.Projection>\r\n                </telegramClient:LongListSelectorEx>\r\n\r\n                <Image x:Name=\"MessagesCache\" Grid.Row=\"1\" Source=\"{Binding With.Bitmap}\" Margin=\"0,-7,0,0\" VerticalAlignment=\"Bottom\">\r\n                    <Image.Projection>\r\n                        <PlaneProjection RotationZ=\"180\"/>\r\n                    </Image.Projection>\r\n                </Image>\r\n\r\n                <ContentControl Grid.Row=\"1\"\r\n                    x:Name=\"EmptyDialogPlaceholder\"\r\n                    Visibility=\"{Binding IsEmptyDialog, Converter={StaticResource BooleanToVisibilityConverter}}\"\r\n                    Content=\"{Binding}\" \r\n                    ContentTemplate=\"{Binding With, Converter={StaticResource EmptyDialogToDescriptionConverter}}\"/>\r\n\r\n                <Grid x:Name=\"MentionButton\" CacheMode=\"BitmapCache\" Grid.Row=\"1\" Margin=\"0,0,6,86\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\" Visibility=\"Collapsed\">\r\n                    <Grid.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </Grid.RenderTransform>\r\n                    <Button Style=\"{StaticResource ScrollButtonStyle}\" Padding=\"0,-6,0,0\" Content=\"@\" FontSize=\"36\" FontWeight=\"Light\" Foreground=\"#FF8D969F\" Hold=\"MentionButton_OnHold\" Tap=\"MentionButton_OnClick\" toolkit:TiltEffect.IsTiltEnabled=\"True\"/>\r\n                    <controls:UnreadCounter Counter=\"{Binding MentionsCounter}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\" Margin=\"8,8,-180,0\"/>\r\n                </Grid>\r\n\r\n                <Grid x:Name=\"ScrollButton\" CacheMode=\"BitmapCache\" Grid.Row=\"1\" Margin=\"0,0,6,6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\" Visibility=\"Collapsed\">\r\n                    <Grid.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </Grid.RenderTransform>\r\n                    <Button Style=\"{StaticResource ScrollButtonStyle}\" Tap=\"ScrollButton_OnClick\" toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                        <Path HorizontalAlignment=\"Center\"\r\n                            VerticalAlignment=\"Center\" \r\n                            Data=\"F1 M-14,0 L0,13 L14,0\" \r\n                            Width=\"28\" Height=\"13\" \r\n                            Stretch=\"Fill\" \r\n                            StrokeThickness=\"1\" \r\n                            Stroke=\"#FF8D969F\">\r\n                        </Path>\r\n                    </Button>\r\n                    <controls:UnreadCounter Counter=\"{Binding Counter}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\" Margin=\"8,8,-180,0\"/>\r\n                </Grid>\r\n\r\n                <Grid VerticalAlignment=\"Top\" Grid.Row=\"1\" HorizontalAlignment=\"Stretch\" Margin=\"0,-6,0,0\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <ContentControl x:Name=\"PinnedMessage\" Grid.Row=\"1\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n                    <ContentControl x:Name=\"UserAction\" Grid.Row=\"1\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n                    <ContentControl x:Name=\"SearchMessages\" Grid.Row=\"1\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n                    <ContentControl x:Name=\"Player\" Grid.Row=\"1\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n                    <ContentControl x:Name=\"LiveLocationBadge\" Grid.Row=\"0\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n                </Grid>\r\n                <Border x:Name=\"CaptionBorder\" Grid.Row=\"0\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n                <Grid x:Name=\"CaptionGrid\" Grid.Row=\"0\" Grid.Column=\"0\" VerticalAlignment=\"Top\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <views:ConversationTileControl x:Name=\"DialogPhoto\" Size=\"54\" Tap=\"OpenPeerDetails_OnTap\"\r\n                        Margin=\"18,36,6,0\" Grid.Row=\"0\" Grid.Column=\"0\" VerticalAlignment=\"Top\"\r\n                        Object=\"{Binding With}\"\r\n                        Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                    <Button Tap=\"OpenPeerDetails_OnTap\"\r\n                    x:Name=\"Caption\"\r\n                    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n                    Margin=\"-4,18,0,12\" Grid.Row=\"0\" Grid.Column=\"1\" VerticalAlignment=\"Bottom\" Style=\"{StaticResource DialogDetailsCaptionButtonStyle}\">\r\n                        <Button.RenderTransform>\r\n                            <TranslateTransform/>\r\n                        </Button.RenderTransform>\r\n                        <StackPanel>\r\n                            <StackPanel Orientation=\"Horizontal\" x:Name=\"Title\">\r\n                                <StackPanel.RenderTransform>\r\n                                    <CompositeTransform/>\r\n                                </StackPanel.RenderTransform>\r\n                                <TextBlock HorizontalAlignment=\"Left\" Text=\"{Binding With, Converter={StaticResource DialogCaptionConverter}, ConverterParameter=uppercase}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n                            </StackPanel>\r\n                            <StackPanel Margin=\"0,-4,0,0\" Orientation=\"Horizontal\">\r\n                                <telegramControls:TypingControl Margin=\"6,0,0,0\" Height=\"26\" Typing=\"{Binding Typing}\" Visibility=\"{Binding Typing, Converter={StaticResource ExistsToVisibilityConverter}}\">\r\n                                    <telegramControls:TypingControl.RenderTransform>\r\n                                        <TranslateTransform Y=\"1\"/>\r\n                                    </telegramControls:TypingControl.RenderTransform>\r\n                                </telegramControls:TypingControl>\r\n                                <TextBlock Text=\"{Binding Subtitle}\" Margin=\"6,0,0,0\" Foreground=\"White\" Opacity=\"0.5\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            </StackPanel>\r\n                            <TextBlock x:Name=\"Debug\" Margin=\"6,-4,0,0\" Foreground=\"GreenYellow\" Visibility=\"Collapsed\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n                    <Image x:Name=\"ContextMenuIcon\" Source=\"/Images/W10M/ic_more_2x.png\" Grid.Row=\"0\" Grid.Column=\"2\" Width=\"32\" Height=\"32\" Margin=\"18,51,18,21\" VerticalAlignment=\"Top\" Hold=\"ContextMenu_OnHold\" Tap=\"ContextMenu_OnTap\">\r\n                        <toolkit:ContextMenuService.ContextMenu>\r\n                            <toolkit:ContextMenu x:Name=\"ContextMenu\" HorizontalAlignment=\"Right\" Margin=\"18,10\" Style=\"{StaticResource W10MContextMenuStyle}\" Opened=\"ContextMenu_OnOpened\"/>\r\n                        </toolkit:ContextMenuService.ContextMenu>\r\n                    </Image>\r\n                </Grid>\r\n\r\n                <Grid Grid.Row=\"1\" Visibility=\"{Binding IsAppBarCommandVisible, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\">\r\n                    <!-- Stickers -->\r\n                    <ContentControl x:Name=\"StickerHints\" \r\n                                VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" \r\n                                HorizontalContentAlignment=\"Stretch\" \r\n                                Margin=\"0,-38,0,0\" MaxHeight=\"124\"\r\n                                Tap=\"StickerHints_OnTap\"\r\n                                ManipulationStarted=\"StickerHints_OnManipulationStarted\"/>\r\n\r\n                    <!-- Inline bots -->\r\n                    <ContentControl x:Name=\"InlineBotResults\" \r\n                                VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" \r\n                                HorizontalContentAlignment=\"Stretch\" \r\n                                Margin=\"0,-38,0,0\" MaxHeight=\"241\"\r\n                                Tap=\"InlineBotResults_OnTap\"\r\n                                ManipulationStarted=\"InlineBotResults_OnManipulationStarted\"/>\r\n\r\n                    <!-- Usernames -->\r\n                    <ContentControl x:Name=\"UsernameHints\" \r\n                                VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" \r\n                                HorizontalContentAlignment=\"Stretch\" \r\n                                Margin=\"0,-38,0,0\" MaxHeight=\"241\"\r\n                                Tap=\"UsernameHint_OnTap\"\r\n                                ManipulationStarted=\"UsernameHints_OnManipulationStarted\"/>\r\n\r\n                    <!-- Commands -->\r\n                    <ContentControl x:Name=\"CommandHints\" \r\n                                VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" \r\n                                HorizontalContentAlignment=\"Stretch\" \r\n                                Margin=\"0,-38,0,0\" MaxHeight=\"241\"\r\n                                Tap=\"CommandHint_OnTap\"\r\n                                ManipulationStarted=\"CommandHints_OnManipulationStarted\"/>\r\n\r\n                    <!-- Hashtags -->\r\n                    <ContentControl x:Name=\"HashtagHints\" \r\n                                VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" \r\n                                HorizontalContentAlignment=\"Stretch\" \r\n                                Margin=\"0,-38,0,0\" MaxHeight=\"241\"\r\n                                Tap=\"HashtagHint_OnTap\"\r\n                                Hold=\"HashtagHintsPanel_OnHold\"\r\n                                ManipulationStarted=\"HashtagHints_OnManipulationStarted\"/>\r\n\r\n                    <!-- Emoji -->\r\n                    <ContentControl x:Name=\"EmojiHints\" \r\n                                VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" \r\n                                HorizontalContentAlignment=\"Stretch\" \r\n                                Margin=\"0,-38,0,0\" MaxHeight=\"241\"\r\n                                Tap=\"EmojiHint_OnTap\"\r\n                                ManipulationStarted=\"EmojiHints_OnManipulationStarted\"/>\r\n\r\n                    <!-- Input message hint -->\r\n                    <ContentControl x:Name=\"InputMessageHintPlaceholder\" \r\n                                Margin=\"24,0,24,12\" \r\n                                HorizontalContentAlignment=\"Stretch\" \r\n                                VerticalAlignment=\"Bottom\" \r\n                                IsHitTestVisible=\"False\"/>\r\n                </Grid>\r\n\r\n                <telegramControls:InputBox Grid.Row=\"3\"\r\n                    x:Name=\"InputMessage\"\r\n                    Text=\"{Binding Text, Mode=TwoWay}\"\r\n                    InlineWatermark=\"{Binding BotInlinePlaceholder}\"\r\n                    TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"                        \r\n                    MuteButtonImageSource=\"{Binding MuteButtonImageSource}\"\r\n                            \r\n                    Command=\"{Binding AppBarCommandString}\"\r\n                    IsAppBarCommandVisible=\"{Binding IsAppBarCommandVisible, FallbackValue=false}\"\r\n                    AppBarCommandClick=\"InputMessage_OnAppBarCommandClick\"\r\n                            \r\n                    Reply=\"{Binding Reply}\"\r\n                    ReplyTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                    OpenReplyButtonClick=\"InputMessage_OnOpenReplyButtonClick\"\r\n                    DeleteReplyButtonClick=\"InputMessage_OnDeleteReplyButtonClick\"\r\n                            \r\n                    ReplyMarkup=\"{Binding ReplyMarkup}\"\r\n                            \r\n                    EmojiButtonClick=\"InputMessage_OnEmojiClick\"\r\n                    KeyboardButtonClick=\"InputMessage_OnKeyboardButtonClick\"\r\n                    MuteButtonClick=\"InputMessage_OnMuteButtonClick\"\r\n                    AttachButtonClick=\"InputMessage_OnAttachClick\"\r\n                    SendButtonClick=\"InputMessage_OnSendClick\"\r\n                            \r\n                    CancelSelectionButtonClick=\"InputMessage_OnCancelSelectionButtonClick\"\r\n                    ForwardButtonClick=\"InputMessage_OnForwardButtonClick\"\r\n                    DeleteButtonClick=\"InputMessage_OnDeleteButtonClick\"\r\n                            \r\n                    InputGotFocus=\"InputMessage_OnGotFocus\"\r\n                    InputLostFocus=\"InputMessage_OnLostFocus\"\r\n                    InputKeyDown=\"InputMessage_OnKeyDown\"\r\n                    InputTextChanged=\"InputMessage_OnTextChanged\"\r\n                                           \r\n                    ShowEmojiHints=\"InputMessage_OnShowEmojiHints\"\r\n                    HideEmojiHints=\"InputMessage_OnHideEmojiHints\">\r\n                    <telegramControls:InputBox.RenderTransform>\r\n                        <TranslateTransform Y=\"0\"/>\r\n                    </telegramControls:InputBox.RenderTransform>\r\n                </telegramControls:InputBox>\r\n\r\n                <Grid Grid.Row=\"4\" Visibility=\"{Binding IsAppBarCommandVisible, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\">\r\n                    <dialogs:CommandsControl x:Name=\"CommandsControl\" ReplyMarkup=\"{Binding ReplyMarkup}\" ButtonClick=\"CommandsControl_OnButtonClick\" VerticalAlignment=\"Bottom\" Visibility=\"Collapsed\"/>\r\n                </Grid>\r\n            </Grid>\r\n\r\n            <ContentControl Grid.RowSpan=\"2\" x:Name=\"ChooseAttachment\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" />\r\n        </Grid>\r\n\r\n        <ContentControl x:Name=\"ImageEditor\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n        <ContentControl x:Name=\"MultiImageEditor\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n        <ContentControl x:Name=\"VideoEditor\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n        <ContentControl x:Name=\"ImageViewer\" Opacity=\"1.0\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n        <ContentControl x:Name=\"AnimatedImageViewer\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"\r\n                        Visibility=\"{Binding AnimatedImageViewer.IsOpen, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n\r\n        <ContentControl x:Name=\"MultiPhotoPicker\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"\r\n                        Visibility=\"{Binding MultiPhotoPicker.IsOpen, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n\r\n        <ContentControl x:Name=\"LocationPicker\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n        <ContentControl x:Name=\"ContactPicker\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP8/Views/Dialogs/DialogDetailsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Reactive.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Controls.Extensions;\r\nusing Telegram.EmojiPanel;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services.Updates;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Additional;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Media;\r\nusing TelegramClient_Native;\r\nusing Action = System.Action;\r\nusing AudioEventArgs = TelegramClient.Views.Controls.AudioEventArgs;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\nusing StickerSelectedEventArgs = Telegram.EmojiPanel.Controls.Emoji.StickerSelectedEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class DialogDetailsView : IDialogDetailsView\r\n    {\r\n        public DialogDetailsViewModel ViewModel\r\n        {\r\n            get { return DataContext as DialogDetailsViewModel; }\r\n        }\r\n\r\n        public void MoveCurretToEnd()\r\n        {\r\n            if (FocusManager.GetFocusedElement() != InputMessage) return;\r\n\r\n            InputMessage.SelectionStart = InputMessage.Text.Length;\r\n            InputMessage.SelectionLength = 0;\r\n        }\r\n\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly MenuItem _manageButton = new MenuItem\r\n        {\r\n            Header = AppResources.Select\r\n        };\r\n\r\n        private readonly MenuItem _searchMenuItem = new MenuItem\r\n        {\r\n            Header = AppResources.Search,\r\n        };\r\n\r\n        private readonly MenuItem _pinToStartMenuItem = new MenuItem\r\n        {\r\n            Header = AppResources.PinToStart\r\n        };\r\n\r\n        private readonly MenuItem _shareMyContactInfoMenuItem = new MenuItem\r\n        {\r\n            Header = AppResources.ShareMyContactInfo\r\n        };\r\n\r\n        private readonly MenuItem _helpMenuItem = new MenuItem\r\n        {\r\n            Header = AppResources.Help\r\n        };\r\n\r\n        private readonly MenuItem _reportSpamMenuItem = new MenuItem\r\n        {\r\n            Header = AppResources.ReportSpam\r\n        };\r\n\r\n        private readonly MenuItem _callMenuItem = new MenuItem\r\n        {\r\n            Header = AppResources.Call\r\n        };\r\n\r\n        private readonly MenuItem _debugMenuItem = new MenuItem\r\n        {\r\n            Header = \"Debug\"\r\n        };\r\n\r\n        private EmojiControl _emojiKeyboard;\r\n\r\n        private TranslateTransform _frameTransform;\r\n\r\n        public static readonly DependencyProperty RootFrameTransformProperty = DependencyProperty.Register(\r\n            \"RootFrameTransformProperty\", typeof(double), typeof(DialogDetailsView), new PropertyMetadata(OnRootFrameTransformChanged));\r\n\r\n        private static void OnRootFrameTransformChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var view = d as DialogDetailsView;\r\n            if (view != null)\r\n            {\r\n                view._frameTransform.Y = 0;\r\n            }\r\n        }\r\n\r\n        public double RootFrameTransform\r\n        {\r\n            get { return (double)GetValue(RootFrameTransformProperty); }\r\n            set { SetValue(RootFrameTransformProperty, value); }\r\n        }\r\n\r\n        private void SetRootFrameBinding()\r\n        {\r\n            var frame = (Frame)Application.Current.RootVisual;\r\n            _frameTransform = ((TranslateTransform)((TransformGroup)frame.RenderTransform).Children[0]);\r\n            var binding = new Binding(\"Y\")\r\n            {\r\n                Source = _frameTransform\r\n            };\r\n            SetBinding(RootFrameTransformProperty, binding);\r\n        }\r\n\r\n        private void RemoveRootFrameBinding()\r\n        {\r\n            ClearValue(RootFrameTransformProperty);\r\n        }\r\n\r\n        private void CloseEmojiPlaceholder()\r\n        {\r\n            InputMessage.ClosePlaceholder();\r\n\r\n            if (_emojiKeyboard != null)\r\n            {\r\n                _emojiKeyboard.ClosePreview();\r\n                _emojiKeyboard.ReloadStickerSprites();\r\n            }\r\n        }\r\n\r\n        private void OpenCommandsPlaceholder()\r\n        {\r\n            CommandsControl.Visibility = Visibility.Visible;\r\n            InputMessage.KeyboardButtonImageString = GetReplyKeyboardImageString();\r\n        }\r\n\r\n        private void CloseCommandsPlaceholder()\r\n        {\r\n            CommandsControl.Visibility = Visibility.Collapsed;\r\n            InputMessage.KeyboardButtonImageString = GetReplyKeyboardImageString();\r\n        }\r\n\r\n        private string GetReplyKeyboardImageString()\r\n        {\r\n            if (ViewModel != null)\r\n            {\r\n                var replyMarkup = ViewModel.ReplyMarkup as TLReplyKeyboardMarkup;\r\n                if (replyMarkup != null)\r\n                {\r\n                    if (CommandsControl.Visibility == Visibility.Visible)\r\n                    {\r\n                        return \"/Images/W10M/ic_keyboard_2x.png\";\r\n                    }\r\n\r\n                    return \"/Images/W10M/ic_botkeyboard_2x.png\";\r\n                }\r\n\r\n                if (ViewModel.HasBots)\r\n                {\r\n                    return \"/Images/W10M/ic_commands_2x.png\";\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n\r\n        private void InputMessage_OnEmojiClick(object sender, System.EventArgs e)\r\n        {\r\n            OnSmileButtonClick();\r\n        }\r\n\r\n        private void InputMessage_OnSendClick(object sender, System.EventArgs e)\r\n        {\r\n            if (ViewModel.IsEditingEnabled)\r\n            {\r\n                ViewModel.SaveMessage();\r\n            }\r\n            else\r\n            {\r\n                ViewModel.Send();\r\n            }\r\n        }\r\n\r\n        private void InputMessage_OnAttachClick(object sender, System.EventArgs e)\r\n        {\r\n            OpenEmptyDialogPlaceholder();\r\n            CloseEmojiPlaceholder();\r\n            CloseCommandsPlaceholder();\r\n            SetCaptionVisibility(Visibility.Visible);\r\n            if (_focusedElement == InputMessage)\r\n            {\r\n                ChooseAttachment.Focus();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(.35), () => ViewModel.Attach());\r\n            }\r\n            else\r\n            {\r\n                ChooseAttachment.Focus();\r\n                ViewModel.Attach();\r\n            }\r\n        }\r\n\r\n        private object _previousFocusedElement;\r\n\r\n        private object _focusedElement;\r\n\r\n        public DialogDetailsView()\r\n        {\r\n            ShellViewModel.WriteTimer(\"View start ctor\");\r\n\r\n            InitializeComponent();\r\n\r\n            CaptionBorder.Background = ShellView.CaptionBrush;\r\n\r\n            ShellViewModel.WriteTimer(\"View start ctor InitializeComponent\");\r\n\r\n            //Full HD\r\n            OptimizeFullHD();\r\n\r\n            ShellViewModel.WriteTimer(\"View start ctor OptimizeFullHD\");\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.SaveMessage();\r\n            _cancelButton.Click += (sender, args) => ViewModel.CancelSaveMessage();\r\n\r\n            _manageButton.Click += (sender, args) => ViewModel.IsSelectionEnabled = true;\r\n\r\n            _pinToStartMenuItem.Click += (sender, args) => ViewModel.PinToStart();\r\n            _shareMyContactInfoMenuItem.Click += (sender, args) => ViewModel.InvokeUserAction();\r\n            _helpMenuItem.Click += (sender, args) => ViewModel.Help();\r\n            _searchMenuItem.Click += (sender, args) => ViewModel.Search();\r\n            _reportSpamMenuItem.Click += (sender, args) => ViewModel.ReportSpam();\r\n            _callMenuItem.Click += (sender, args) => ViewModel.Call();\r\n            _debugMenuItem.Click += (sender, args) =>\r\n            {\r\n                var aggregator = IoC.Get<ITelegramEventAggregator>();\r\n\r\n                aggregator.Publish(new UpdateCompletedEventArgs());\r\n            };\r\n\r\n            ShellViewModel.WriteTimer(\"View start ctor set appbar\");\r\n\r\n            GotFocus += (sender, args) =>\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(args.OriginalSource);\r\n                _previousFocusedElement = _focusedElement;\r\n                _focusedElement = args.OriginalSource;\r\n            };\r\n\r\n            var viewportChangedEvents = Observable.FromEventPattern<ViewportChangedEventArgs>(\r\n                keh => { MessagesList.ViewportChanged += keh; },\r\n                keh => { MessagesList.ViewportChanged -= keh; });\r\n\r\n            _viewportChangedSubscription = viewportChangedEvents\r\n                .Sample(TimeSpan.FromSeconds(1.0))\r\n                .ObserveOnDispatcher()\r\n                .Subscribe(e => MessagesList_OnViewportChanged());\r\n\r\n            Loaded += InitializeMTProtoService;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                if (_viewportChangedSubscription == null)\r\n                {\r\n                    _viewportChangedSubscription = viewportChangedEvents\r\n                        .Sample(TimeSpan.FromSeconds(1.0))\r\n                        .ObserveOnDispatcher()\r\n                        .Subscribe(e => MessagesList_OnViewportChanged());\r\n                }\r\n\r\n                ShellViewModel.WriteTimer(\"View start Loaded\");\r\n                ViewModel.OnLoaded();\r\n#if LOG_NAVIGATION\r\n                TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \"DV Loaded\", LogSeverity.Error);\r\n#endif\r\n                InputMessage.KeyboardButtonImageString = GetReplyKeyboardImageString();\r\n                InputMessage.KeyboardButtonVisibility = GetReplyKeyboardButtonVisibility();\r\n                InputMessage.MuteButtonVisibility = GetMuteButtonVisibility();\r\n\r\n                SetRootFrameBinding();\r\n\r\n                RunAnimation();\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(1.0), () =>\r\n                {\r\n                    if (ViewModel.StateService.FocusOnInputMessage)\r\n                    {\r\n                        ViewModel.StateService.FocusOnInputMessage = false;\r\n                        if (!ViewModel.IsAppBarCommandVisible)\r\n                        {\r\n                            InputMessage.Focus();\r\n                        }\r\n                    }\r\n                });\r\n\r\n                if (ViewModel.ChooseAttachment != null)\r\n                {\r\n                    ViewModel.ChooseAttachment.PropertyChanged += OnChooseAttachmentPropertyChanged;\r\n                }\r\n                if (ViewModel.ImageViewer != null)\r\n                {\r\n                    ViewModel.ImageViewer.PropertyChanged += OnImageViewerPropertyChanged;\r\n                }\r\n                if (ViewModel.MultiImageEditor != null)\r\n                {\r\n                    ViewModel.MultiImageEditor.PropertyChanged += OnMultiImageEditorPropertyChanged;\r\n                }\r\n                if (ViewModel.ImageEditor != null)\r\n                {\r\n                    ViewModel.ImageEditor.PropertyChanged += OnImageEditorPropertyChanged;\r\n                }\r\n                if (ViewModel.AnimatedImageViewer != null)\r\n                {\r\n                    ViewModel.AnimatedImageViewer.PropertyChanged += OnAnimatedImageViewerPropertyChanged;\r\n                }\r\n                if (ViewModel.VideoEditor != null)\r\n                {\r\n                    ViewModel.VideoEditor.PropertyChanged += OnVideoEditorPropertyChanged;\r\n                }\r\n                if (ViewModel.LocationPicker != null)\r\n                {\r\n                    ViewModel.LocationPicker.PropertyChanged += OnLocationPickerPropertyChanged;\r\n                }\r\n                if (ViewModel.ContactPicker != null)\r\n                {\r\n                    ViewModel.ContactPicker.PropertyChanged += OnContactPickerPropertyChanged;\r\n                }\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n                ViewModel.ScrollToBottom += OnViewModelScrollToBottom;\r\n                ViewModel.ScrollTo += OnViewModelScrollTo;\r\n\r\n                BuildLocalizedAppBar();\r\n\r\n                InputMessage.AudioRecorded += OnAudioRecorded;      //AudioRecorder.AudioRecorded += OnAudioRecorded;\r\n                InputMessage.RecordStarted += OnRecordStarted;      //AudioRecorder.RecordStarted += OnRecordStarted;\r\n                InputMessage.RecordingAudio += OnRecordingAudio;    //AudioRecorder.RecordingAudio += OnRecordingAudio;\r\n                InputMessage.RecordCanceled += OnRecordCanceled;    //AudioRecorder.RecordCanceled += OnRecordCanceled;\r\n\r\n                BrowserNavigationService.TelegramLinkAction += ViewModel.OnTelegramLinkAction;\r\n                BrowserNavigationService.MentionNavigated += ViewModel.OnMentionNavigated;\r\n                BrowserNavigationService.SearchHashtag += ViewModel.OnSearchHashtag;\r\n                BrowserNavigationService.InvokeCommand += ViewModel.OnInvokeCommand;\r\n                BrowserNavigationService.OpenGame += ViewModel.OnOpenGame;\r\n                BrowserNavigationService.OpenPhone += ViewModel.OnOpenPhone;\r\n\r\n                GifPlayerControl.MediaStateChanged += OnGifPlayerControlMediaStateChanged;\r\n\r\n                ShellViewModel.WriteTimer(\"View end Loaded\");\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                if (_viewportChangedSubscription != null)\r\n                {\r\n                    _viewportChangedSubscription.Dispose();\r\n                    _viewportChangedSubscription = null;\r\n                }\r\n\r\n#if LOG_NAVIGATION\r\n                TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + \"DV Unloaded\", LogSeverity.Error);\r\n#endif\r\n\r\n                RemoveRootFrameBinding();\r\n\r\n                if (ViewModel.ChooseAttachment != null)\r\n                {\r\n                    ViewModel.ChooseAttachment.PropertyChanged -= OnChooseAttachmentPropertyChanged;\r\n                }\r\n                if (ViewModel.ImageViewer != null)\r\n                {\r\n                    ViewModel.ImageViewer.PropertyChanged -= OnImageViewerPropertyChanged;\r\n                }\r\n                if (ViewModel.MultiImageEditor != null)\r\n                {\r\n                    ViewModel.MultiImageEditor.PropertyChanged -= OnMultiImageEditorPropertyChanged;\r\n                }\r\n                if (ViewModel.ImageEditor != null)\r\n                {\r\n                    ViewModel.ImageEditor.PropertyChanged -= OnImageEditorPropertyChanged;\r\n                }\r\n                if (ViewModel.AnimatedImageViewer != null)\r\n                {\r\n                    ViewModel.AnimatedImageViewer.PropertyChanged -= OnAnimatedImageViewerPropertyChanged;\r\n                }\r\n                if (ViewModel.VideoEditor != null)\r\n                {\r\n                    ViewModel.VideoEditor.PropertyChanged -= OnVideoEditorPropertyChanged;\r\n                }\r\n                if (ViewModel.LocationPicker != null)\r\n                {\r\n                    ViewModel.LocationPicker.PropertyChanged -= OnLocationPickerPropertyChanged;\r\n                }\r\n                if (ViewModel.ContactPicker != null)\r\n                {\r\n                    ViewModel.ContactPicker.PropertyChanged -= OnContactPickerPropertyChanged;\r\n                }\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n                ViewModel.ScrollToBottom -= OnViewModelScrollToBottom;\r\n                ViewModel.ScrollTo -= OnViewModelScrollTo;\r\n\r\n                InputMessage.AudioRecorded -= OnAudioRecorded;      //AudioRecorder.AudioRecorded -= OnAudioRecorded;\r\n                InputMessage.RecordStarted -= OnRecordStarted;      //AudioRecorder.RecordStarted -= OnRecordStarted;\r\n                InputMessage.RecordingAudio -= OnRecordingAudio;    //AudioRecorder.RecordingAudio -= OnRecordingAudio;\r\n                InputMessage.RecordCanceled -= OnRecordCanceled;    //AudioRecorder.RecordCanceled -= OnRecordCanceled;\r\n\r\n                BrowserNavigationService.TelegramLinkAction -= ViewModel.OnTelegramLinkAction;\r\n                BrowserNavigationService.MentionNavigated -= ViewModel.OnMentionNavigated;\r\n                BrowserNavigationService.SearchHashtag -= ViewModel.OnSearchHashtag;\r\n                BrowserNavigationService.InvokeCommand -= ViewModel.OnInvokeCommand;\r\n                BrowserNavigationService.OpenGame -= ViewModel.OnOpenGame;\r\n                BrowserNavigationService.OpenPhone -= ViewModel.OnOpenPhone;\r\n\r\n                GifPlayerControl.MediaStateChanged -= OnGifPlayerControlMediaStateChanged;\r\n            };\r\n\r\n            ShellViewModel.WriteTimer(\"View stop ctor\");\r\n        }\r\n\r\n        private void OnGifPlayerControlMediaStateChanged(object sender, MediaStateChangedEventArgs args)\r\n        {\r\n            switch (args.State)\r\n            {\r\n                case GifPlayerControlState.Opening:\r\n                    {\r\n                        var player = Player.Content as PlayerView;\r\n                        if (player == null)\r\n                        {\r\n                            player = new PlayerView();\r\n                            player.Closed += (o, eventArgs) =>\r\n                            {\r\n                                var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                                if (frame != null)\r\n                                {\r\n                                    frame.HidePlayer();\r\n                                }\r\n                                player.Close(() =>\r\n                                {\r\n                                    GifPlayerControl.StopVideo();\r\n\r\n                                    Player.Content = null;\r\n                                    ResumeChatPlayers();\r\n                                });\r\n                            };\r\n                            player.Paused += (o, eventArgs) =>\r\n                            {\r\n                                var gifPlayer = MessagePlayerControl.Player.Tag as GifPlayerControl;\r\n                                if (gifPlayer != null)\r\n                                {\r\n                                    if (gifPlayer.Media == player.Message.Media)\r\n                                    {\r\n                                        gifPlayer.ToggleVideoPlay();\r\n                                    }\r\n                                }\r\n                            };\r\n                            player.Resumed += (o, eventArgs) =>\r\n                            {\r\n                                var gifPlayer = MessagePlayerControl.Player.Tag as GifPlayerControl;\r\n                                if (gifPlayer != null)\r\n                                {\r\n                                    if (gifPlayer.Media == player.Message.Media)\r\n                                    {\r\n                                        gifPlayer.ToggleVideoPlay();\r\n                                    }\r\n                                }\r\n                            };\r\n\r\n                            Player.Content = player;\r\n                        }\r\n\r\n                        player.Message = ViewModel.Items.OfType<TLMessage>().FirstOrDefault(x => x.Media == args.Media);\r\n\r\n                        player.Resume();\r\n                        var frame1 = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                        if (frame1 != null)\r\n                        {\r\n                            frame1.HidePlayer();\r\n                        }\r\n\r\n                        break;\r\n                    }\r\n                case GifPlayerControlState.Opened:\r\n\r\n                    break;\r\n                case GifPlayerControlState.Failed:\r\n\r\n                    break;\r\n                case GifPlayerControlState.Paused:\r\n                    {\r\n                        var player = Player.Content as PlayerView;\r\n                        if (player != null)\r\n                        {\r\n                            player.Pause();\r\n                        }\r\n                        break;\r\n                    }\r\n                case GifPlayerControlState.Resumed:\r\n                    {\r\n                        var player = Player.Content as PlayerView;\r\n                        if (player != null)\r\n                        {\r\n                            player.Resume();\r\n                        }\r\n                        break;\r\n                    }\r\n                case GifPlayerControlState.Ended:\r\n                    {\r\n                        var player = Player.Content as PlayerView;\r\n                        if (player != null)\r\n                        {\r\n                            var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                            if (frame != null)\r\n                            {\r\n                                frame.HidePlayer();\r\n                            }\r\n\r\n                            player.Close(() =>\r\n                            {\r\n                                Player.Content = null;\r\n                                ResumeChatPlayers();\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            ResumeChatPlayers();\r\n                        }\r\n                        break;\r\n                    }\r\n            }\r\n        }\r\n\r\n        private void InitializeMTProtoService(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= InitializeMTProtoService;\r\n\r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n            mtProtoService.StartInitialize();\r\n        }\r\n\r\n        private TLAllStickers _allStickers;\r\n\r\n        private void OnSmileButtonClick()\r\n        {\r\n            if (_emojiKeyboard == null)\r\n            {\r\n                _emojiKeyboard = EmojiControl.GetInstance();\r\n\r\n                var channel68 = ViewModel.With as TLChannel68;\r\n                if (channel68 != null)\r\n                {\r\n                    _emojiKeyboard.SetGroupStickers(channel68, channel68.StickerSet);\r\n                }\r\n                else\r\n                {\r\n                    _emojiKeyboard.SetGroupStickers(null, null);\r\n                }\r\n\r\n                _allStickers = _allStickers ?? IoC.Get<IStateService>().GetAllStickers();\r\n                var isStickersPanelVisible = true;\r\n                //var allStickers = _allStickers as TLAllStickers43;\r\n                //if (allStickers != null && allStickers.ShowStickersTab != null)\r\n                //{\r\n                //    isStickersPanelVisible = allStickers.ShowStickersTab.Value;\r\n                //}\r\n                _emojiKeyboard.BindTextBox(InputMessage.InnerTextBox, isStickersPanelVisible);\r\n                _emojiKeyboard.StickerSelected += OnStickerSelected;\r\n                _emojiKeyboard.StickerSetAdded += OnStickerSetAdded;\r\n                _emojiKeyboard.SettingsButtonClick += OnSettingsButtonClick;\r\n                _emojiKeyboard.OpenFullScreen += OnOpenFullScreen;\r\n                _emojiKeyboard.CloseFullScreen += OnCloseFullScreen;\r\n                InputMessage.EmojiPlaceholder.Content = _emojiKeyboard;\r\n\r\n                _emojiKeyboard.IsOpen = true;\r\n\r\n                //_emojiKeyboard.SetHeight(InputBox.KeyboardHeight > 0.0 ? InputBox.KeyboardHeight : _emojiKeyboard.Height);\r\n            }\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                //System.Diagnostics.Debug.WriteLine(\"Keyboard\");\r\n\r\n                if (InputMessage.EmojiPlaceholder.Opacity == 0.0)\r\n                {\r\n                    _smileButtonPressed = true;\r\n\r\n                    InputMessage.OpenPlaceholder();\r\n\r\n                    if (_emojiKeyboard != null)\r\n                    {\r\n                        _emojiKeyboard.OpenStickerSprites();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    InputMessage.InnerTextBox.Focus();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                InputMessage.OpenPlaceholder();\r\n\r\n                if (_emojiKeyboard != null)\r\n                {\r\n                    _emojiKeyboard.OpenStickerSprites();\r\n                }\r\n\r\n                SetCaptionVisibility(Visibility.Collapsed);\r\n                CloseEmptyDialogPlaceholder();\r\n                CloseCommandsPlaceholder();\r\n            }\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n            //var appBar = new ApplicationBar();\r\n            //var appBarDefaultSize = appBar.DefaultSize;\r\n\r\n            //AppBarCommandPlaceholder.Height = appBarDefaultSize;\r\n        }\r\n\r\n        private void OnViewModelScrollToBottom(object sender, System.EventArgs e)\r\n        {\r\n            if (ViewModel.Items.Count > 0)\r\n            {\r\n                MessagesList.ScrollToItem(ViewModel.Items[0]);\r\n\r\n                HideScrollToBottomButton();\r\n            }\r\n        }\r\n\r\n        private void OnViewModelScrollTo(object sender, ScrollToEventArgs e)\r\n        {\r\n            if (ViewModel.Items.Count > 0)\r\n            {\r\n                MessagesList.ScrollToItem(e.Message);\r\n            }\r\n        }\r\n\r\n        private Binding _visibilityBinding;\r\n        private double _previousAudioRecorderMinHeight;\r\n\r\n        private static Binding SaveVisibilityBinding(FrameworkElement element)\r\n        {\r\n            var visibilityExpression = element.GetBindingExpression(VisibilityProperty);\r\n            if (visibilityExpression != null)\r\n            {\r\n                return visibilityExpression.ParentBinding;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static void RestoreVisibilityBinding(FrameworkElement element, Binding binding, Visibility defaultValue)\r\n        {\r\n            if (binding != null)\r\n            {\r\n                element.SetBinding(VisibilityProperty, binding);\r\n            }\r\n            else\r\n            {\r\n                element.Visibility = defaultValue;\r\n            }\r\n        }\r\n\r\n        private void OnRecordCanceled(object sender, System.EventArgs e)\r\n        {\r\n            //AudioRecorder.MinHeight = _previousAudioRecorderMinHeight;\r\n            //RestoreVisibilityBinding(InputMessage, _visibilityBinding, Visibility.Visible);\r\n            //InputMessage.AdditionalButtons.Visibility = Visibility.Visible;\r\n\r\n            ViewModel.AudioTypingManager.CancelTyping();\r\n        }\r\n\r\n        private void OnRecordStarted(object sender, System.EventArgs e)\r\n        {\r\n            //_visibilityBinding = SaveVisibilityBinding(InputMessage);\r\n            //_previousAudioRecorderMinHeight = AudioRecorder.MinHeight;\r\n\r\n            //AudioRecorder.MinHeight = InputMessage.ActualHeight;\r\n            //InputMessage.Visibility = Visibility.Collapsed;\r\n            //InputMessage.AdditionalButtons.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private void OnRecordingAudio(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.AudioTypingManager.SetTyping();\r\n        }\r\n\r\n        private void OnAudioRecorded(object sender, AudioEventArgs e)\r\n        {\r\n            //AudioRecorder.MinHeight = _previousAudioRecorderMinHeight;\r\n            //RestoreVisibilityBinding(InputMessage, _visibilityBinding, Visibility.Visible);\r\n            //InputMessage.AdditionalButtons.Visibility = Visibility.Visible;\r\n\r\n            // чтобы быстро обновить Visibility InputMessage переносим все остальное в фон\r\n            var viewModel = ViewModel;\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => viewModel.SendAudio(e));\r\n        }\r\n\r\n        public void OpenBitmapCache()\r\n        {\r\n            MessagesCache.Visibility = Visibility.Visible;\r\n            MessagesList.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        public void CloseBitmapCache()\r\n        {\r\n            MessagesCache.Visibility = Visibility.Collapsed;\r\n            MessagesList.Visibility = Visibility.Visible;\r\n        }\r\n\r\n        private Storyboard _forwardInStoryboard;\r\n\r\n        private void RunAnimation()\r\n        {\r\n            if (_isForwardInAnimation)\r\n            {\r\n                _isForwardInAnimation = false;\r\n\r\n                if (ViewModel.With.Bitmap != null)\r\n                {\r\n                    MessagesList.Visibility = Visibility.Collapsed;\r\n                }\r\n\r\n                var storyboard = new Storyboard();\r\n\r\n                if (ViewModel != null\r\n                    && ViewModel.StateService.AnimateTitle)\r\n                {\r\n                    ViewModel.StateService.AnimateTitle = false;\r\n\r\n                    var continuumElementX = new DoubleAnimationUsingKeyFrames();\r\n                    continuumElementX.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 130.0 });\r\n                    continuumElementX.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                    Storyboard.SetTarget(continuumElementX, Title);\r\n                    Storyboard.SetTargetProperty(continuumElementX, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n                    storyboard.Children.Add(continuumElementX);\r\n\r\n                    var continuumElementY = new DoubleAnimationUsingKeyFrames();\r\n                    continuumElementY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -40.0 });\r\n                    continuumElementY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n                    Storyboard.SetTarget(continuumElementY, Title);\r\n                    Storyboard.SetTargetProperty(continuumElementY, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                    storyboard.Children.Add(continuumElementY);\r\n                }\r\n\r\n                var continuumLayoutRootY = new DoubleAnimationUsingKeyFrames();\r\n                continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 150.0 });\r\n                continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(continuumLayoutRootY, LayoutRoot);\r\n                Storyboard.SetTargetProperty(continuumLayoutRootY, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(continuumLayoutRootY);\r\n\r\n                var continuumLayoutRootOpacity = new DoubleAnimation\r\n                {\r\n                    From = 0.0,\r\n                    To = 1.0,\r\n                    Duration = TimeSpan.FromSeconds(0.25),\r\n                    EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n                };\r\n                Storyboard.SetTarget(continuumLayoutRootOpacity, LayoutRoot);\r\n                Storyboard.SetTargetProperty(continuumLayoutRootOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(continuumLayoutRootOpacity);\r\n\r\n                _forwardInStoryboard = storyboard;\r\n\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    LayoutRoot.Opacity = 1.0;\r\n                    storyboard.Completed += (o, e) =>\r\n                    {\r\n                        if (_backKeyPressed) return;\r\n\r\n                        ViewModel.ForwardInAnimationComplete();\r\n\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(1.0), () =>\r\n                        {\r\n                            Items_OnManipulationStateChanged(this, System.EventArgs.Empty);\r\n                        });\r\n                    }\r\n                    ;\r\n                    storyboard.Begin();\r\n                });\r\n            }\r\n            else if (_isBackwardOutAnimation)\r\n            {\r\n                _isBackwardOutAnimation = false;\r\n\r\n                LayoutRoot.CacheMode = new BitmapCache();\r\n\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n                Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation);\r\n\r\n                storyboard.Begin();\r\n            }\r\n            else if (_isBackwardInAnimation)\r\n            {\r\n                _isBackwardInAnimation = false;\r\n\r\n                var storyboard = TelegramTurnstileAnimations.GetAnimation(LayoutRoot, TurnstileTransitionMode.BackwardIn);\r\n\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    LayoutRoot.Opacity = 1.0;\r\n                    MessagesCache.Visibility = Visibility.Visible;\r\n                    MessagesList.Visibility = Visibility.Collapsed;\r\n                    storyboard.Completed += (o, e) =>\r\n                    {\r\n                        MessagesCache.Visibility = Visibility.Collapsed;\r\n                        MessagesList.Visibility = Visibility.Visible;\r\n                        ViewModel.BackwardInAnimationComplete();\r\n\r\n                        Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                        {\r\n                            StartGifPlayers();\r\n                        });\r\n                    };\r\n                    storyboard.Begin();\r\n                });\r\n            }\r\n        }\r\n\r\n        private void StartGifPlayers()\r\n        {\r\n            Items_OnManipulationStateChanged(this, System.EventArgs.Empty);\r\n            var inlineBotResultsView = InlineBotResults.FindChildOfType<InlineBotResultsView>();\r\n            if (inlineBotResultsView != null)\r\n            {\r\n                inlineBotResultsView.StartActivePlayers();\r\n            }\r\n        }\r\n\r\n#if DEBUG\r\n        ~DialogDetailsView()\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"~DialogDetailsView\");\r\n        }\r\n#endif\r\n\r\n        private bool _inputMessageDisabled;\r\n        private bool _focusInputMessage;\r\n\r\n        private void OpenPeerDetails_OnTap(object sender, GestureEventArgs args)\r\n        {\r\n            if (ViewModel.With is TLChatForbidden)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (CommandsControl.Visibility == Visibility.Visible)\r\n            {\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseCommandsPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseEmojiPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            StopPlayersAndCreateBitmapCache(() => ViewModel.OpenPeerDetails());\r\n        }\r\n\r\n        public void StopPlayersAndCreateBitmapCache(Action callback = null)\r\n        {\r\n            GifPlayerControl.StopActivePlayers();\r\n            GifPlayerControl.StopInlineBotActivePlayers();\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                CreateBitmapCache();\r\n                MessagesCache.Visibility = Visibility.Visible;\r\n                MessagesList.Visibility = Visibility.Collapsed;\r\n\r\n                callback.SafeInvoke();\r\n            });\r\n        }\r\n\r\n        public void CreateBitmapCache(Action callback = null)\r\n        {\r\n            try\r\n            {\r\n                if (MessagesList.Visibility == Visibility.Visible)\r\n                {\r\n                    var stopwatch = Stopwatch.StartNew();\r\n                    var writeableBitmap = new WriteableBitmap(MessagesList, null);\r\n                    ViewModel.With.SetBitmap(writeableBitmap);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"WritableBitmap exception \" + ex);\r\n            }\r\n\r\n            callback.SafeInvoke();\r\n        }\r\n\r\n        private void MorePanel_OnTap(object sender, GestureEventArgs args)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            var message = frameworkElement.DataContext as TLMessage;\r\n            if (message == null) return;\r\n\r\n            if (CommandsControl.Visibility == Visibility.Visible)\r\n            {\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseCommandsPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseEmojiPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            // чтобы клавиатура успела опуститься\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                CreateBitmapCache();\r\n                MessagesCache.Visibility = Visibility.Visible;\r\n                MessagesList.Visibility = Visibility.Collapsed;\r\n\r\n                ViewModel.OpenCropedMessage(message);\r\n            });\r\n        }\r\n\r\n        private bool _isBackwardOutAnimation;\r\n        private bool _isBackwardInAnimation;\r\n        private bool _isForwardInAnimation;\r\n        private bool _isForwardOutAnimation;\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            ShellViewModel.WriteTimer(\"OnNavigatedTo start\");\r\n            ViewModel.OnNavigatedTo();\r\n#if LOG_NAVIGATION\r\n            TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + string.Format(\"DV OnNavigatedTo Mode={0} Uri={1}\", e.NavigationMode, e.Uri), LogSeverity.Error);\r\n#endif\r\n            //MediaControl.Content = MessagePlayerControl.Player;\r\n\r\n            if (e.NavigationMode == NavigationMode.New)\r\n            {\r\n                LayoutRoot.Opacity = 0.0;\r\n                _isForwardInAnimation = true;\r\n            }\r\n            else if (e.NavigationMode == NavigationMode.Back)\r\n            {\r\n                if (!_fromExternalUri)\r\n                {\r\n                    LayoutRoot.Opacity = 0.0;\r\n                    _isBackwardInAnimation = true;\r\n                }\r\n                else\r\n                {\r\n                    ViewModel.BackwardInAnimationComplete();\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        StartGifPlayers();\r\n\r\n                        if (LiveLocationProgress.Controls.Count > 0)\r\n                        {\r\n                            foreach (var control in LiveLocationProgress.Controls)\r\n                            {\r\n                                control.Update();\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n                _fromExternalUri = false;\r\n            }\r\n            else if (e.NavigationMode == NavigationMode.Forward && e.Uri != ExternalUri)\r\n            {\r\n                _isForwardOutAnimation = true;\r\n            }\r\n            else if (e.NavigationMode == NavigationMode.Reset)\r\n            {\r\n                if (_fromExternalUri)\r\n                {\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        StartGifPlayers();\r\n                    });\r\n                }\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n\r\n            ShellViewModel.WriteTimer(\"OnNavigatedTo stop\");\r\n        }\r\n\r\n        private static readonly Uri ExternalUri = new Uri(@\"app://external/\");\r\n\r\n        private bool _fromExternalUri;\r\n        private bool _suppressNavigation;\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n\r\n            if (CancelNavigatingFrom(e)) return;\r\n\r\n#if LOG_NAVIGATION\r\n            TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + string.Format(\"DV OnNavigatingFrom Mode={0} Uri={1}\", e.NavigationMode, e.Uri), LogSeverity.Error);\r\n#endif\r\n            GifPlayerControl.StopActivePlayers();\r\n            GifPlayerControl.StopInlineBotActivePlayers();\r\n            if (_emojiKeyboard != null)\r\n            {\r\n                // Destroy EmojiControl\r\n                _emojiKeyboard.IsOpen = false;\r\n                _emojiKeyboard.UnbindTextBox();\r\n                _emojiKeyboard.StickerSelected -= OnStickerSelected;\r\n                _emojiKeyboard.StickerSetAdded -= OnStickerSetAdded;\r\n                _emojiKeyboard.SettingsButtonClick -= OnSettingsButtonClick;\r\n                InputMessage.EmojiPlaceholder.Content = null; // Remove from view\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseEmojiPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n                _emojiKeyboard = null;\r\n            }\r\n\r\n            var multiImageEditorView = MultiImageEditor.Content as MultiImageEditorView;\r\n            if (multiImageEditorView != null)\r\n            {\r\n                multiImageEditorView.ClosePreview();\r\n            }\r\n\r\n            if (CommandsControl.Visibility == Visibility.Visible)\r\n            {\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseCommandsPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            if (e.Uri.OriginalString.EndsWith(\"VideoCaptureView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"MapView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"ShareContactView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"ContactView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"ChatView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"Chat2View.xaml\"))\r\n            {\r\n\r\n            }\r\n\r\n            var originalString = e.Uri.OriginalString;\r\n            var index = originalString.IndexOf('?');\r\n            if (index != -1)\r\n            {\r\n                originalString = originalString.Substring(0, index);\r\n            }\r\n\r\n            if (originalString.EndsWith(\"ChatView.xaml\")\r\n                || originalString.EndsWith(\"ProfilePhotoViewerView.xaml\")\r\n                || originalString.EndsWith(\"SearchShellView.xaml\")\r\n                || originalString.EndsWith(\"ChooseDialogView.xaml\")\r\n                || originalString.EndsWith(\"StickersView.xaml\")\r\n                || originalString.EndsWith(\"CancelConfirmResetView.xaml\"))\r\n            {\r\n                CreateBitmapCache();\r\n                MessagesList.Visibility = Visibility.Collapsed;\r\n                MessagesCache.Visibility = Visibility.Visible;\r\n            }\r\n            else if (e.Uri.OriginalString.EndsWith(\"ContactView.xaml\")\r\n                || originalString.EndsWith(\"EditVideoView.xaml\")\r\n                || originalString.EndsWith(\"MapView.xaml\")\r\n                || originalString.EndsWith(\"WebView.xaml\")\r\n                || originalString.EndsWith(\"ShippingInfoView.xaml\")\r\n                || originalString.EndsWith(\"ShippingMethodView.xaml\")\r\n                || originalString.EndsWith(\"WebCardInfoView.xaml\")\r\n                || originalString.EndsWith(\"CheckoutView.xaml\"))\r\n            {\r\n                if (ViewModel.With.Bitmap != null)\r\n                {\r\n                    MessagesList.Visibility = Visibility.Collapsed;\r\n                    MessagesCache.Visibility = Visibility.Visible;\r\n                }\r\n            }\r\n\r\n            if (originalString.EndsWith(\"DialogDetailsView.xaml\"))\r\n            {\r\n                //new TelegramNavigationOutTransition { Forward = new SlideTransition { Mode = SlideTransitionMode.SlideDownFadeOut } });\r\n            }\r\n\r\n            base.OnNavigatingFrom(e);\r\n        }\r\n\r\n        private void OnSettingsButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            if (CommandsControl.Visibility == Visibility.Visible)\r\n            {\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseCommandsPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseEmojiPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            // чтобы клавиатура успела опуститься\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                CreateBitmapCache();\r\n                MessagesCache.Visibility = Visibility.Visible;\r\n                MessagesList.Visibility = Visibility.Collapsed;\r\n\r\n                ViewModel.OpenStickerSettings();\r\n            });\r\n        }\r\n\r\n        private void SetCaptionVisibility(Visibility visibility)\r\n        {\r\n            return;\r\n\r\n            DialogPhoto.Visibility = visibility;\r\n            Title.Visibility = visibility;\r\n            ContextMenuIcon.Visibility = visibility;\r\n            CaptionBorder.Height = visibility == Visibility.Visible ? 105.0 : 71.0;\r\n        }\r\n\r\n        private bool CancelNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            if (e.Uri.OriginalString.StartsWith(\"/Views/Dialogs/DialogDetailsView.xaml\"))\r\n            {\r\n                if (ViewModel.With == ViewModel.StateService.With)\r\n                {\r\n                    var channel = ViewModel.With as TLChannel;\r\n                    if (channel != null)\r\n                    {\r\n                        var postString = ViewModel.StateService.Post;\r\n                        ViewModel.StateService.With = null;\r\n                        ViewModel.StateService.Post = null;\r\n                        ViewModel.StateService.RemoveBackEntries = false;\r\n\r\n                        int post;\r\n                        if (Int32.TryParse(postString, out post))\r\n                        {\r\n                            ViewModel.OpenMessage(null, new TLInt(post));\r\n                        }\r\n\r\n                        e.Cancel = true;\r\n                        return true;\r\n                    }\r\n\r\n                    var user = ViewModel.With as TLUser;\r\n                    if (user != null && user.IsBot)\r\n                    {\r\n                        var accessToken = ViewModel.StateService.AccessToken;\r\n                        ViewModel.StateService.With = null;\r\n                        ViewModel.StateService.AccessToken = null;\r\n                        ViewModel.StateService.RemoveBackEntries = false;\r\n                        ViewModel.StateService.Bot = null;\r\n\r\n                        user.AccessToken = accessToken;\r\n                        ViewModel.StartSwitchPMBotWithParam();\r\n\r\n                        e.Cancel = true;\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n            else if (e.Uri.OriginalString.StartsWith(\"/Views/ShellView.xaml\"))\r\n            {\r\n                if (e.Uri.OriginalString.Contains(\"from_id\"))\r\n                {\r\n                    var user = ViewModel.With as TLUserBase;\r\n                    if (user != null)\r\n                    {\r\n                        try\r\n                        {\r\n                            var uriParams = TelegramUriMapper.ParseQueryString(e.Uri.OriginalString);\r\n                            var fromId = Convert.ToInt32(uriParams[\"from_id\"]);\r\n                            if (user.Index == fromId)\r\n                            {\r\n                                e.Cancel = true;\r\n                                return true;\r\n                            }\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (e.Uri.OriginalString.Contains(\"chat_id\"))\r\n                {\r\n                    var chat = ViewModel.With as TLChatBase;\r\n                    if (chat != null)\r\n                    {\r\n                        try\r\n                        {\r\n                            var uriParams = TelegramUriMapper.ParseQueryString(e.Uri.OriginalString);\r\n                            var chatId = Convert.ToInt32(uriParams[\"chat_id\"]);\r\n                            if (chat.Index == chatId)\r\n                            {\r\n                                e.Cancel = true;\r\n                                return true;\r\n                            }\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (e.Uri.OriginalString.Contains(\"channel_id\"))\r\n                {\r\n                    var chat = ViewModel.With as TLChatBase;\r\n                    if (chat != null)\r\n                    {\r\n                        try\r\n                        {\r\n                            var uriParams = TelegramUriMapper.ParseQueryString(e.Uri.OriginalString);\r\n                            var chatId = Convert.ToInt32(uriParams[\"channel_id\"]);\r\n                            if (chat.Index == chatId)\r\n                            {\r\n                                e.Cancel = true;\r\n                                return true;\r\n                            }\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            return false;\r\n        }\r\n\r\n        private void OnStickerSetAdded(object sender, StickerSetAddedEventArgs e)\r\n        {\r\n            if (e.Set == null) return;\r\n        }\r\n\r\n        private void OnStickerSelected(object sender, StickerSelectedEventArgs e)\r\n        {\r\n            if (e.Sticker == null) return;\r\n\r\n            var document22 = e.Sticker.Document as TLDocument22;\r\n            if (document22 == null) return;\r\n\r\n            ViewModel.SendSticker(document22);\r\n\r\n            //Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (InputMessage.IsFullScreen)\r\n                {\r\n                    InputMessage.CloseFullScreen();\r\n                }\r\n            }\r\n            //);\r\n        }\r\n\r\n        private double _messageListHeight;\r\n\r\n        private void OnOpenFullScreen(object sender, System.EventArgs e)\r\n        {\r\n            InputMessage.OpenFullScreen(MessagesList.ActualHeight);\r\n            //MessagesList.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private void OnCloseFullScreen(object sender, System.EventArgs e)\r\n        {\r\n            InputMessage.CloseFullScreen();\r\n            //MessagesList.Visibility = Visibility.Visible;\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n            ViewModel.OnNavigatedFrom();\r\n#if LOG_NAVIGATION\r\n            TLUtils.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\", CultureInfo.InvariantCulture) + string.Format(\"DV OnNavigatedFrom Mode={0} Uri={1}\", e.NavigationMode, e.Uri), LogSeverity.Error);\r\n#endif\r\n            _fromExternalUri = e.Uri == ExternalUri;\r\n\r\n            //if (_fromExternalUri)\r\n            //{\r\n            //    foreach (var control in LiveLocationProgress.Controls)\r\n            //    {\r\n            //        control.StopTimer();\r\n            //    }\r\n            //}\r\n\r\n            MessagePlayerControl.Stop();\r\n            GifPlayerControl.StopVideo();\r\n\r\n            base.OnNavigatedFrom(e);\r\n        }\r\n\r\n        private void OnChooseAttachmentPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ChooseAttachment.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = IsItemsHitTestVisible();\r\n            }\r\n        }\r\n\r\n        private bool IsItemsHitTestVisible()\r\n        {\r\n            return (ViewModel.ChooseAttachment == null || !ViewModel.ChooseAttachment.IsOpen)\r\n                    && (ViewModel.ImageViewer == null || !ViewModel.ImageViewer.IsOpen)\r\n                    && (ViewModel.MultiImageEditor == null || !ViewModel.MultiImageEditor.IsOpen)\r\n                    && (ViewModel.AnimatedImageViewer == null || !ViewModel.AnimatedImageViewer.IsOpen)\r\n                    && (ViewModel.VideoEditor == null || !ViewModel.VideoEditor.IsOpen)\r\n                    && (ViewModel.LocationPicker == null || !ViewModel.LocationPicker.IsOpen)\r\n                    && (ViewModel.ContactPicker == null || !ViewModel.ContactPicker.IsOpen);\r\n        }\r\n\r\n        private IApplicationBar _prevApplicationBar;\r\n\r\n        private void OnImageViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = IsItemsHitTestVisible();\r\n                //MessagesList.Visibility = MessagesList.IsHitTestVisible ? Visibility.Visible : Visibility.Collapsed;\r\n\r\n                if (ViewModel.ImageViewer.IsOpen)\r\n                {\r\n                    var message70 = ViewModel.ImageViewer.CurrentItem as TLMessage70;\r\n                    IsScreenCaptureEnabled = message70 == null || !message70.HasTTL();\r\n\r\n                    _prevApplicationBar = ApplicationBar;\r\n                    ApplicationBar = ((ImageViewerView)ImageViewer.Content).ApplicationBar;\r\n                }\r\n                else\r\n                {\r\n                    IsScreenCaptureEnabled = true;\r\n\r\n                    if (_prevApplicationBar != null)\r\n                    {\r\n                        ApplicationBar = _prevApplicationBar;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnMultiImageEditorPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.MultiImageEditor.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = IsItemsHitTestVisible();\r\n\r\n                if (ViewModel.MultiImageEditor.IsOpen)\r\n                {\r\n                    _prevApplicationBar = ApplicationBar;\r\n                    ApplicationBar = ((MultiImageEditorView)MultiImageEditor.Content).ApplicationBar;\r\n                }\r\n                else\r\n                {\r\n                    if (_prevApplicationBar != null)\r\n                    {\r\n                        ApplicationBar = _prevApplicationBar;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnImageEditorPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageEditor.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = IsItemsHitTestVisible();\r\n\r\n                if (ViewModel.ImageEditor.IsOpen)\r\n                {\r\n                    _prevApplicationBar = ApplicationBar;\r\n                    ApplicationBar = ((ImageEditorView)ImageEditor.Content).ApplicationBar;\r\n                }\r\n                else\r\n                {\r\n                    if (_prevApplicationBar != null)\r\n                    {\r\n                        ApplicationBar = _prevApplicationBar;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnAnimatedImageViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.AnimatedImageViewer.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = IsItemsHitTestVisible();\r\n\r\n                if (ViewModel.AnimatedImageViewer.IsOpen)\r\n                {\r\n                    _prevApplicationBar = ApplicationBar;\r\n                    ApplicationBar = ((AnimatedImageViewerView)AnimatedImageViewer.Content).ApplicationBar;\r\n                }\r\n                else\r\n                {\r\n                    if (_prevApplicationBar != null)\r\n                    {\r\n                        ApplicationBar = _prevApplicationBar;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnVideoEditorPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.VideoEditor.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = IsItemsHitTestVisible();\r\n            }\r\n        }\r\n\r\n        private void OnLocationPickerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.LocationPicker.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = IsItemsHitTestVisible();\r\n            }\r\n        }\r\n\r\n        private void OnContactPickerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ContactPicker.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = IsItemsHitTestVisible();\r\n            }\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            //System.Diagnostics.Debug.WriteLine(\"VM changed \" + e.PropertyName);\r\n\r\n            //if (ViewModel._debugTimer != null) System.Diagnostics.Debug.WriteLine(\"start view property changed \" + ViewModel._debugTimer.Elapsed);\r\n\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.Text))\r\n            {\r\n\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsAppBarCommandVisible))\r\n            {\r\n                if (ApplicationBar != null)\r\n                {\r\n                    ApplicationBar.IsVisible = false;//!ViewModel.IsAppBarCommandVisible && !ViewModel.IsChooseAttachmentOpen && !ViewModel.IsMassDeleteReportSpamOpen;\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.HasBots))\r\n            {\r\n                InputMessage.KeyboardButtonVisibility = GetReplyKeyboardButtonVisibility();\r\n                InputMessage.KeyboardButtonImageString = GetReplyKeyboardImageString();\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ReplyMarkup))\r\n            {\r\n                InputMessage.KeyboardButtonVisibility = GetReplyKeyboardButtonVisibility();\r\n                InputMessage.KeyboardButtonImageString = GetReplyKeyboardImageString();\r\n\r\n                var replyMarkup = ViewModel.ReplyMarkup as TLReplyKeyboardMarkup;\r\n                if (replyMarkup != null)\r\n                {\r\n                    if (ViewModel.SuppressOpenCommandsKeyboard)\r\n                    {\r\n                        ViewModel.SuppressOpenCommandsKeyboard = false;\r\n                        OpenEmptyDialogPlaceholder();\r\n                        CloseCommandsPlaceholder();\r\n\r\n                        return;\r\n                    }\r\n\r\n                    if (!replyMarkup.HasResponse)\r\n                    {\r\n                        if (!ViewModel.IsAppBarCommandVisible)\r\n                        {\r\n                            CloseEmojiPlaceholder();\r\n                            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                SelfView.Focus();\r\n                                OpenCommandsPlaceholder();\r\n                                CloseEmptyDialogPlaceholder();\r\n                                SetCaptionVisibility(Visibility.Collapsed);\r\n                            });\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        OpenEmptyDialogPlaceholder();\r\n                        CloseCommandsPlaceholder();\r\n                    }\r\n                }\r\n\r\n                var keyboardHide = ViewModel.ReplyMarkup as TLReplyKeyboardHide;\r\n                if (keyboardHide != null)\r\n                {\r\n                    SetCaptionVisibility(Visibility.Visible);\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsGroupActionEnabled))\r\n            {\r\n                var count = DialogDetailsViewModel.UngroupEnumerator(ViewModel.Items).Count(x => x.IsSelected);\r\n                var noneTTLCount = DialogDetailsViewModel.UngroupEnumerator(ViewModel.Items).Count(x => x.IsSelected && !x.HasTTL());\r\n                if (_selectionCaption != null)\r\n                {\r\n                    _selectionCaption.Text = string.Format(count == 1 ? AppResources.ItemsSelectedSingular : AppResources.ItemsSelectedPlural, count).ToUpperInvariant();\r\n                }\r\n\r\n                InputMessage.IsGroupActionEnabled = new Tuple<bool, bool>(count > 0, count > 0 && noneTTLCount == count);\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.HoldScrollingPosition))\r\n            {\r\n                if (ViewModel.HoldScrollingPosition)\r\n                {\r\n                    MessagesList.HoldScrollingPosition();\r\n                }\r\n                else\r\n                {\r\n                    MessagesList.UnholdScrollingPosition();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsSelectionEnabled))\r\n            {\r\n                if (ViewModel.IsSelectionEnabled)\r\n                {\r\n                    SwitchToSelectionMode();\r\n                }\r\n                else\r\n                {\r\n                    SwitchToNonSelectionMode();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsEditingEnabled))\r\n            {\r\n                if (ViewModel.IsEditingEnabled)\r\n                {\r\n                    SwitchToEditingMode();\r\n                }\r\n                else\r\n                {\r\n                    SwitchToNormalMode();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ChooseAttachment)\r\n               && ViewModel.ChooseAttachment != null)\r\n            {\r\n                ViewModel.ChooseAttachment.PropertyChanged += OnChooseAttachmentPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer)\r\n                && ViewModel.ImageViewer != null)\r\n            {\r\n                ViewModel.ImageViewer.PropertyChanged += OnImageViewerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.MultiImageEditor)\r\n                && ViewModel.MultiImageEditor != null)\r\n            {\r\n                ViewModel.MultiImageEditor.PropertyChanged += OnMultiImageEditorPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageEditor)\r\n                && ViewModel.ImageEditor != null)\r\n            {\r\n                ViewModel.ImageEditor.PropertyChanged += OnImageEditorPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.AnimatedImageViewer)\r\n                && ViewModel.AnimatedImageViewer != null)\r\n            {\r\n                ViewModel.AnimatedImageViewer.PropertyChanged += OnAnimatedImageViewerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.VideoEditor)\r\n                && ViewModel.VideoEditor != null)\r\n            {\r\n                ViewModel.VideoEditor.PropertyChanged += OnVideoEditorPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.LocationPicker)\r\n                && ViewModel.LocationPicker != null)\r\n            {\r\n                ViewModel.LocationPicker.PropertyChanged += OnLocationPickerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ContactPicker)\r\n            && ViewModel.ContactPicker != null)\r\n            {\r\n                ViewModel.ContactPicker.PropertyChanged += OnContactPickerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.With))\r\n            {\r\n                ViewModel.ChangeUserAction();\r\n                if (ApplicationBar != null)\r\n                {\r\n                    ApplicationBar.IsVisible = false;//!ViewModel.IsAppBarCommandVisible && !ViewModel.IsChooseAttachmentOpen && !ViewModel.IsMassDeleteReportSpamOpen;\r\n                }\r\n                ChangeShareInfo();\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.StartGifPlayers))\r\n            {\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    Items_OnManipulationStateChanged(this, System.EventArgs.Empty);\r\n                });\r\n            }\r\n            //if (ViewModel._debugTimer != null) System.Diagnostics.Debug.WriteLine(\"end view property changed \" + ViewModel._debugTimer.Elapsed);\r\n        }\r\n\r\n        private void ChangeShareInfo()\r\n        {\r\n            if (ApplicationBar == null) return;\r\n\r\n            var userBase = ViewModel.With as TLUserBase;\r\n            if (userBase != null && userBase.IsForeign)\r\n            {\r\n                ContextMenu.Items.Remove(_shareMyContactInfoMenuItem);\r\n                ContextMenu.Items.Insert(0, _shareMyContactInfoMenuItem);\r\n            }\r\n            else\r\n            {\r\n                ContextMenu.Items.Remove(_shareMyContactInfoMenuItem);\r\n            }\r\n        }\r\n\r\n        private void SwitchToEditingMode()\r\n        {\r\n            //InputMessage.IsEditing = true;\r\n\r\n            //ApplicationBar.Buttons.Clear();\r\n\r\n            //InputMessage.Padding = new Thickness(11.0, 2.0, 36.0, 2.0);\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                InputMessage.FocusInput();\r\n                InputMessage.SelectionStart = InputMessage.Text.Length;\r\n                InputMessage.SelectionLength = 0;\r\n                //ApplicationBar.Buttons.Add(_doneButton);\r\n                //ApplicationBar.Buttons.Add(_cancelButton);\r\n            });\r\n        }\r\n\r\n        private TextBlock _selectionCaption;\r\n\r\n        private void SwitchToSelectionMode()\r\n        {\r\n            InputMessage.SwitchToSelectionMode();\r\n\r\n            MessagesList.Focus();\r\n            OpenEmptyDialogPlaceholder();\r\n            CloseEmojiPlaceholder();\r\n            CloseCommandsPlaceholder();\r\n            SetCaptionVisibility(Visibility.Visible);\r\n\r\n            if (_selectionCaption == null)\r\n            {\r\n                _selectionCaption = new TextBlock\r\n                {\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top,\r\n                    Margin = new Thickness(18.0, 52.0, 18.0, 21.0),\r\n                    Foreground = new SolidColorBrush(Colors.White),\r\n                    RenderTransform = new TranslateTransform(),\r\n                    Style = (Style)Application.Current.Resources[\"ApplicationTitleStyle\"]\r\n                };\r\n\r\n                ContentPanel.Children.Add(_selectionCaption);\r\n            }\r\n\r\n            CaptionGrid.RenderTransform = new TranslateTransform();\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var transformAnimaion2 = new DoubleAnimation { From = 0.0, To = -72.0, Duration = TimeSpan.FromSeconds(0.2), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } };\r\n            Storyboard.SetTarget(transformAnimaion2, CaptionGrid);\r\n            Storyboard.SetTargetProperty(transformAnimaion2, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(transformAnimaion2);\r\n\r\n            var opacityAnimaion2 = new DoubleAnimation { From = 1.0, To = 0.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion2, CaptionGrid);\r\n            Storyboard.SetTargetProperty(opacityAnimaion2, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion2);\r\n\r\n            var opacityAnimaion = new DoubleAnimation { From = 0.0, To = 1.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion, _selectionCaption);\r\n            Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (o, e) =>\r\n            {\r\n                //((TranslateTransform) CaptionGrid.RenderTransform).Y = 0.0;\r\n                //CaptionGrid.Opacity = 1.0;\r\n                //DialogPhoto.Visibility = Visibility.Collapsed;\r\n                //Caption.Visibility = Visibility.Collapsed;\r\n                //ContextMenuIcon.Visibility = Visibility.Collapsed;\r\n            };\r\n\r\n            //DialogPhoto.Visibility = Visibility.Collapsed;\r\n            //Caption.Visibility = Visibility.Collapsed;\r\n            //ContextMenuIcon.Visibility = Visibility.Collapsed;\r\n            var count = DialogDetailsViewModel.UngroupEnumerator(ViewModel.Items).Count(x => x.IsSelected);\r\n            var noneTTLCount = ViewModel.Items.Count(x => x.IsSelected && !x.HasTTL());\r\n\r\n            _selectionCaption.Text = string.Format(count == 1 ? AppResources.ItemsSelectedSingular : AppResources.ItemsSelectedPlural, count).ToUpperInvariant();\r\n            _selectionCaption.Visibility = Visibility.Visible;\r\n\r\n            ApplicationBar.Buttons.Clear();\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var channel = ViewModel.With as TLChannel;\r\n\r\n                InputMessage.IsDeleteActionVisible = channel == null || channel.Creator;\r\n                InputMessage.IsGroupActionEnabled = new Tuple<bool, bool>(count > 0, count > 0 && noneTTLCount == count);\r\n                ApplicationBar.IsVisible = false;\r\n            });\r\n        }\r\n\r\n        private void SwitchToNonSelectionMode()\r\n        {\r\n            InputMessage.SwitchToNormalMode();\r\n\r\n            InputMessage.MuteButtonVisibility = GetMuteButtonVisibility();\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var transformAnimaion2 = new DoubleAnimation { From = -72.0, To = 0.0, Duration = TimeSpan.FromSeconds(0.2), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } };\r\n            Storyboard.SetTarget(transformAnimaion2, CaptionGrid);\r\n            Storyboard.SetTargetProperty(transformAnimaion2, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(transformAnimaion2);\r\n\r\n            var opacityAnimaion2 = new DoubleAnimation { From = 0.0, To = 1.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion2, CaptionGrid);\r\n            Storyboard.SetTargetProperty(opacityAnimaion2, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion2);\r\n\r\n            var opacityAnimaion = new DoubleAnimation { From = 1.0, To = 0.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion, _selectionCaption);\r\n            Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (o, e) =>\r\n            {\r\n                _selectionCaption.Opacity = 1.0;\r\n                _selectionCaption.Visibility = Visibility.Collapsed;\r\n            };\r\n\r\n            DialogPhoto.Visibility = Visibility.Visible;\r\n            Caption.Visibility = Visibility.Visible;\r\n            ContextMenuIcon.Visibility = Visibility.Visible;\r\n\r\n            ApplicationBar.Buttons.Clear();\r\n            ApplicationBar.IsVisible = false;\r\n        }\r\n\r\n        private void SwitchToNormalMode()\r\n        {\r\n            InputMessage.SwitchToNormalMode();\r\n\r\n            InputMessage.MuteButtonVisibility = GetMuteButtonVisibility();\r\n\r\n            DialogPhoto.Visibility = Visibility.Visible;\r\n            Caption.Visibility = Visibility.Visible;\r\n            ContextMenuIcon.Visibility = Visibility.Visible;\r\n            if (_selectionCaption != null) _selectionCaption.Visibility = Visibility.Collapsed;\r\n\r\n            //InputMessage.IsEditing = false;\r\n            ApplicationBar.Buttons.Clear();\r\n            ApplicationBar.IsVisible = false;\r\n        }\r\n\r\n        private bool _firstRun = true;\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (!_firstRun) return;\r\n            _firstRun = false;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Opacity = 0.99;\r\n\r\n            var broadcast = ViewModel.With as TLBroadcastChat;\r\n            var channel = ViewModel.With as TLChannel;\r\n            var chat = ViewModel.With as TLChat41;\r\n            var user = ViewModel.With as TLUser;\r\n\r\n            if (user != null && !user.IsBot && !user.IsSelf)\r\n            {\r\n                ContextMenu.Items.Add(_callMenuItem);\r\n            }\r\n\r\n            //ContextMenu.Items.Add(_debugMenuItem);\r\n\r\n            ContextMenu.Items.Add(_manageButton);\r\n            if (broadcast == null || channel != null)\r\n            {\r\n                var addReportSpam = true;\r\n                if (chat != null && chat.Creator)\r\n                {\r\n                    addReportSpam = false;\r\n                }\r\n\r\n                if (user != null && user.IsSelf)\r\n                {\r\n                    addReportSpam = false;\r\n                }\r\n\r\n                if (channel != null && channel.Creator)\r\n                {\r\n                    addReportSpam = false;\r\n                }\r\n                if (addReportSpam)\r\n                {\r\n                    ContextMenu.Items.Add(_reportSpamMenuItem);\r\n                }\r\n            }\r\n            if (broadcast == null || channel != null)\r\n            {\r\n                ContextMenu.Items.Add(_searchMenuItem);\r\n            }\r\n\r\n            if (user != null && user.IsBot)\r\n            {\r\n                ContextMenu.Items.Add(_helpMenuItem);\r\n            }\r\n            ContextMenu.Items.Add(_pinToStartMenuItem);\r\n\r\n            var userBase = ViewModel.With as TLUserBase;\r\n            if (userBase != null && userBase.IsForeign)\r\n            {\r\n                ContextMenu.Items.Add(_shareMyContactInfoMenuItem);\r\n            }\r\n\r\n            ApplicationBar.IsVisible = false; //!ViewModel.IsAppBarCommandVisible && !ViewModel.IsChooseAttachmentOpen && !ViewModel.IsMassDeleteReportSpamOpen;\r\n        }\r\n\r\n        private ShareMessagePicker _shareMessagePicker;\r\n\r\n        private WeakEventListener<DialogDetailsView, object, NavigatingCancelEventArgs> _weakEventListener;\r\n\r\n        public void OpenShareMessagePicker(string link, Action<PickDialogEventArgs> callback = null)\r\n        {\r\n            var isVisible = false;\r\n            var frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            PhoneApplicationPage page = null;\r\n            if (frame != null)\r\n            {\r\n                page = frame.Content as PhoneApplicationPage;\r\n                if (page != null)\r\n                {\r\n                    page.IsHitTestVisible = false;\r\n                    var applicationBar = page.ApplicationBar;\r\n                    if (applicationBar != null)\r\n                    {\r\n                        isVisible = applicationBar.IsVisible;\r\n                        applicationBar.IsVisible = false;\r\n                    }\r\n                }\r\n\r\n                var weakEventListener = new WeakEventListener<DialogDetailsView, object, NavigatingCancelEventArgs>(this, frame);\r\n                frame.Navigating += weakEventListener.OnEvent;\r\n\r\n                weakEventListener.OnEventAction = (view, o, args) =>\r\n                {\r\n                    view.Frame_Navigating(o, args);\r\n                };\r\n                weakEventListener.OnDetachAction = (listener, source) =>\r\n                {\r\n                    var f = source as PhoneApplicationFrame;\r\n                    if (f != null)\r\n                    {\r\n                        f.Navigating -= listener.OnEvent;\r\n                    }\r\n                };\r\n\r\n                _weakEventListener = weakEventListener;\r\n            }\r\n\r\n            if (page == null) return;\r\n\r\n            var popup = new Popup();\r\n            var sharePicker = new ShareMessagePicker\r\n            {\r\n                Width = page.ActualWidth,\r\n                Height = page.ActualHeight,\r\n                Link = link\r\n            };\r\n            _shareMessagePicker = sharePicker;\r\n            page.SizeChanged += Page_SizeChanged;\r\n\r\n            sharePicker.Close += (sender, args) =>\r\n            {\r\n                _shareMessagePicker = null;\r\n                _weakEventListener.Detach();\r\n                _weakEventListener = null;\r\n\r\n                popup.IsOpen = false;\r\n                popup.Child = null;\r\n\r\n                frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n                if (frame != null)\r\n                {\r\n                    page = frame.Content as PhoneApplicationPage;\r\n                    if (page != null)\r\n                    {\r\n                        page.SizeChanged -= Page_SizeChanged;\r\n                        page.IsHitTestVisible = true;\r\n                        var applicationBar = page.ApplicationBar;\r\n                        if (applicationBar != null)\r\n                        {\r\n                            applicationBar.IsVisible = isVisible;\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            _shareMessagePicker.Pick += (sender, args) =>\r\n            {\r\n                callback.SafeInvoke(args);\r\n            };\r\n\r\n            popup.Child = sharePicker;\r\n            popup.IsOpen = true;\r\n        }\r\n\r\n        private void Frame_Navigating(object sender, NavigatingCancelEventArgs e)\r\n        {\r\n            if (_shareMessagePicker != null)\r\n            {\r\n                _shareMessagePicker.ForceClose();\r\n            }\r\n        }\r\n\r\n        private void Page_SizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        private void DialogDetailsView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                var multiplePhotoPicker = popup.Child as OpenPhotoPicker;\r\n                if (multiplePhotoPicker != null)\r\n                {\r\n                    multiplePhotoPicker.TryClose();\r\n                }\r\n\r\n                var shareMessagePicker = popup.Child as ShareMessagePicker;\r\n                if (shareMessagePicker != null)\r\n                {\r\n                    shareMessagePicker.TryClose();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            if (_lastMessagePrompt != null\r\n                && _lastMessagePrompt.IsOpen)\r\n            {\r\n                _lastMessagePrompt.Hide();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel == null) return;\r\n\r\n            if (ViewModel.SearchMessages != null\r\n                && ViewModel.SearchMessages.IsOpen)\r\n            {\r\n                ViewModel.SearchMessages.Close();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.MultiImageEditor != null\r\n                && ViewModel.MultiImageEditor.IsOpen)\r\n            {\r\n                ViewModel.MultiImageEditor.CloseEditor();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.LocationPicker != null\r\n                && ViewModel.LocationPicker.IsOpen)\r\n            {\r\n                ViewModel.LocationPicker.CloseEditor();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.ContactPicker != null\r\n                && ViewModel.ContactPicker.IsOpen)\r\n            {\r\n                ViewModel.ContactPicker.CloseEditor();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.VideoEditor != null\r\n                && ViewModel.VideoEditor.IsOpen)\r\n            {\r\n                ViewModel.VideoEditor.CloseEditor();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.ImageEditor != null\r\n                && ViewModel.ImageEditor.IsOpen)\r\n            {\r\n                ViewModel.ImageEditor.CloseEditor();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.ImageViewer != null\r\n                && ViewModel.ImageViewer.IsOpen)\r\n            {\r\n                ViewModel.ImageViewer.CloseViewer();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.AnimatedImageViewer != null\r\n                && ViewModel.AnimatedImageViewer.IsOpen)\r\n            {\r\n                ViewModel.AnimatedImageViewer.CloseViewer();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (_lastContextMenu != null && _lastContextMenu.IsOpen)\r\n            {\r\n                _lastContextMenu.IsOpen = false;\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (_emojiKeyboard != null && _emojiKeyboard.IsPreviewMenuOpened)\r\n            {\r\n                _emojiKeyboard.ClosePreviewMenu();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (InputMessage.IsFullScreen)\r\n            {\r\n                InputMessage.CloseFullScreen();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible\r\n                || CommandsControl.Visibility == Visibility.Visible)\r\n            {\r\n                SelfView.Focus();\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseEmojiPlaceholder();\r\n                CloseCommandsPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.ChooseAttachment != null\r\n                && ViewModel.ChooseAttachment.IsOpen)\r\n            {\r\n                ViewModel.ChooseAttachment.Close();\r\n                ResumeChatPlayers();\r\n\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.IsEditingEnabled)\r\n            {\r\n                ViewModel.StopEditMessage();\r\n                ApplicationBar.IsVisible = false;//!ViewModel.IsAppBarCommandVisible;\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.IsSelectionEnabled)\r\n            {\r\n                ViewModel.IsSelectionEnabled = false;\r\n                ApplicationBar.IsVisible = false;//!ViewModel.IsAppBarCommandVisible;\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (!NavigationService.BackStack.Any())\r\n            {\r\n                e.Cancel = true;\r\n                ViewModel.NavigateToShellViewModel();\r\n\r\n                return;\r\n            }\r\n\r\n            _isBackwardOutAnimation = true;\r\n\r\n            CreateBitmapCache();\r\n            MessagesCache.Visibility = Visibility.Visible;\r\n            MessagesList.Visibility = Visibility.Collapsed;\r\n            var result = ContentPanel.Children.Remove(MessagesList);\r\n\r\n            ShellViewModel.WriteTimer(\"DialogDetailsView OnBackKeyPress\");\r\n\r\n            _backKeyPressed = true;\r\n\r\n            if (_forwardInStoryboard != null && _forwardInStoryboard.GetCurrentState() != ClockState.Stopped)\r\n            {\r\n                _forwardInStoryboard.Stop();\r\n            }\r\n\r\n            RunAnimation();\r\n\r\n            LiveLocationProgress.Controls.Clear();\r\n            ViewModel.StopChannelScheduler();\r\n            ViewModel.CancelDownloading();\r\n        }\r\n\r\n        private void UIElement_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void MentionButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.ReadNextMention();\r\n            return;\r\n            GifPlayerControl.PauseActivePlayers();\r\n            GifPlayerControl.StopInlineBotActivePlayers();\r\n\r\n            HideScrollToBottomButton();\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (ViewModel.Items.Count > 0)\r\n                {\r\n                    ViewModel.ProcessScroll();\r\n                }\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Items_OnManipulationStateChanged(sender, System.EventArgs.Empty);\r\n                });\r\n            });\r\n        }\r\n\r\n        private void ScrollButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            GifPlayerControl.PauseActivePlayers();\r\n            GifPlayerControl.StopInlineBotActivePlayers();\r\n\r\n            HideScrollToBottomButton();\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (ViewModel.Items.Count > 0)\r\n                {\r\n                    ViewModel.ProcessScroll();\r\n                }\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Items_OnManipulationStateChanged(sender, System.EventArgs.Empty);\r\n                });\r\n            });\r\n        }\r\n\r\n        private void InputMessage_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                if (ViewModel.StateService.SendByEnter)\r\n                {\r\n                    ViewModel.Send();\r\n                    e.Handled = true;\r\n                }\r\n            }\r\n            else if (e.Key == Key.Space)\r\n            {\r\n                var text = InputMessage.Text.Trim();\r\n                if (text.Length <= Constants.UsernameMaxLength && BrowserNavigationService.IsValidUsername(text))\r\n                {\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() => ViewModel.ResolveUsername(text));\r\n                }\r\n            }\r\n            else if (e.Key == Key.T)\r\n            {\r\n                var text = (InputMessage.Text + \"t\").Trim();\r\n                if (text.Length <= Constants.UsernameMaxLength && text.EndsWith(\"bot\", StringComparison.OrdinalIgnoreCase) && BrowserNavigationService.IsValidUsername(text))\r\n                {\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() => ViewModel.ResolveUsername(text));\r\n                }\r\n            }\r\n            else if (e.Key == Key.Back)\r\n            {\r\n                if (InputMessage.Text.Length == 0) return;\r\n\r\n                var text = InputMessage.Text.Substring(0, InputMessage.Text.Length - 1).Trim();\r\n                if (text.Length <= Constants.UsernameMaxLength && text.EndsWith(\"bot\", StringComparison.OrdinalIgnoreCase) && BrowserNavigationService.IsValidUsername(text))\r\n                {\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() => ViewModel.ResolveUsername(text));\r\n                }\r\n            }\r\n        }\r\n\r\n        private ContextMenu _lastContextMenu;\r\n\r\n        private void ContextMenu_OnOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            var menu = (ContextMenu)sender;\r\n            var owner = (FrameworkElement)menu.Owner;\r\n\r\n            if (owner.DataContext != menu.DataContext)\r\n            {\r\n                menu.DataContext = owner.DataContext;\r\n            }\r\n\r\n            if (_innerMessage != null && _innerMessage != menu.DataContext)\r\n            {\r\n                menu.DataContext = _innerMessage;\r\n            }\r\n\r\n            var serviceMessage = menu.DataContext as TLMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                menu.IsOpen = false;\r\n                return;\r\n            }\r\n\r\n            _lastContextMenu = sender as ContextMenu;\r\n        }\r\n\r\n        private void InputMessage_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            SetCaptionVisibility(Visibility.Collapsed);\r\n            CloseCommandsPlaceholder();\r\n            CloseEmptyDialogPlaceholder();\r\n\r\n            PauseChatPlayers();\r\n        }\r\n\r\n        private bool _smileButtonPressed;\r\n\r\n        private void InputMessage_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_smileButtonPressed)\r\n            {\r\n                if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n                {\r\n                    CloseEmojiPlaceholder();\r\n                }\r\n            }\r\n            _smileButtonPressed = false;\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Collapsed)\r\n            {\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            OpenEmptyDialogPlaceholder();\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                ResumeChatPlayers();\r\n            });\r\n        }\r\n\r\n        private Binding _emptyPlaceholderVisibilityBinding;\r\n\r\n        private void OpenEmptyDialogPlaceholder()\r\n        {\r\n            var user = ViewModel.With as TLUser;\r\n            if (user != null && user.IsSelf)\r\n            {\r\n                RestoreVisibilityBinding(EmptyDialogPlaceholder, _emptyPlaceholderVisibilityBinding, Visibility.Collapsed);\r\n            }\r\n        }\r\n\r\n        private void CloseEmptyDialogPlaceholder()\r\n        {\r\n            var user = ViewModel.With as TLUser;\r\n            if (user != null && user.IsSelf)\r\n            {\r\n                _emptyPlaceholderVisibilityBinding = SaveVisibilityBinding(EmptyDialogPlaceholder);\r\n                EmptyDialogPlaceholder.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        private bool _once = true;\r\n\r\n        private void Items_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (ViewModel.SliceLoaded) return;\r\n            if (ViewModel.IsSelectionEnabled) return;\r\n\r\n            ViewModel.LoadNextSlice();\r\n            ViewModel.LoadPreviousSlice();\r\n        }\r\n\r\n        private void InputMessage_OnTap(object sender, MouseButtonEventArgs mouseButtonEventArgs)\r\n        {\r\n            if (_inputMessageDisabled)\r\n            {\r\n                _focusInputMessage = true;\r\n            }\r\n        }\r\n\r\n        private void InputMessage_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            InputMessage.KeyboardButtonVisibility = GetReplyKeyboardButtonVisibility();\r\n            InputMessage.MuteButtonVisibility = GetMuteButtonVisibility();\r\n\r\n            if (ViewModel.IsEditingEnabled) return;\r\n        }\r\n\r\n        private void StickerHints_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var frameworkElement = e.OriginalSource as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            var stickerItem = frameworkElement.DataContext as TLStickerItem;\r\n            if (stickerItem == null) return;\r\n\r\n            var document22 = stickerItem.Document as TLDocument22;\r\n            if (document22 == null) return;\r\n\r\n            if (_emojiKeyboard != null)\r\n            {\r\n                _emojiKeyboard.UpdateRecentStickers(new StickerSelectedEventArgs { Sticker = stickerItem });\r\n            }\r\n\r\n            ViewModel.SendSticker(document22);\r\n        }\r\n\r\n        private ObservableCollection<TLStickerItem> _stickers;\r\n\r\n        private Visibility GetMuteButtonVisibility()\r\n        {\r\n            if (InputMessage.Text.Length > 0)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n\r\n            if (ViewModel == null) return Visibility.Collapsed;\r\n\r\n            if (ViewModel.IsEditingEnabled) return Visibility.Collapsed;\r\n\r\n            var channel = ViewModel.With as TLChannel44;\r\n\r\n            return channel != null && channel.IsBroadcast && (channel.Creator || channel.IsEditor)\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n        }\r\n\r\n        private Visibility GetReplyKeyboardButtonVisibility()\r\n        {\r\n            if (InputMessage.Text.Length > 0)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n\r\n            if (ViewModel != null)\r\n            {\r\n                var replyMarkup = ViewModel.ReplyMarkup as TLReplyKeyboardMarkup;\r\n                if (replyMarkup == null)\r\n                {\r\n                    if (!ViewModel.HasBots)\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return Visibility.Visible;\r\n        }\r\n\r\n        private Visibility GetAudioRecorderVisibility()\r\n        {\r\n            if (FocusManager.GetFocusedElement() == InputMessage)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n\r\n            if (InputMessage.Text.Length > 0)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n\r\n            if (CommandsControl.Visibility == Visibility.Visible)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n\r\n            if (ViewModel != null)\r\n            {\r\n                if (ViewModel.IsEditingEnabled)\r\n                {\r\n                    return Visibility.Collapsed;\r\n                }\r\n\r\n                var chatForbidden = ViewModel.With as TLChatForbidden;\r\n                var chat = ViewModel.With as TLChat;\r\n\r\n                var isForbidden = chatForbidden != null || (chat != null && chat.Left.Value);\r\n                if (isForbidden)\r\n                {\r\n                    return Visibility.Collapsed;\r\n                }\r\n            }\r\n\r\n            return Visibility.Visible;\r\n        }\r\n\r\n        private void EmojiHint_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var view = EmojiHints.Content as EmojiHintsView;\r\n            if (view != null)\r\n            {\r\n                EmojiSuggestionParams parameters = null;\r\n                var viewModel = view.DataContext as EmojiHintsViewModel;\r\n                if (viewModel != null)\r\n                {\r\n                    parameters = viewModel.Parameters;\r\n                    viewModel.SetParameters(null);\r\n                }\r\n\r\n                if (parameters != null)\r\n                {\r\n                    var frameworkElement = e.OriginalSource as FrameworkElement;\r\n                    if (frameworkElement != null)\r\n                    {\r\n                        var suggestion = frameworkElement.DataContext as EmojiSuggestion;\r\n                        if (suggestion != null)\r\n                        {\r\n                            var text = InputMessage.Text;\r\n                            if (string.Equals(InputMessage.Text, parameters.Text, StringComparison.Ordinal)\r\n                                && InputMessage.SelectionStart == parameters.SelectionStart)\r\n                            {\r\n                                var firstPart = text.Substring(0, parameters.Index);\r\n                                var middlePart = suggestion.Emoji;\r\n                                var lastPart = text.Substring(parameters.Index + parameters.Length);\r\n                                InputMessage.Text = firstPart + middlePart + lastPart;\r\n                                InputMessage.SelectionStart = firstPart.Length + middlePart.Length;\r\n                                InputMessage.FocusInput();\r\n\r\n                                Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                                {\r\n                                    var emoji = new EmojiDataItem(suggestion.Emoji, 1);\r\n                                    emoji.Uri = EmojiDataItem.BuildUri(emoji.String);\r\n                                    EmojiData.AddToRecents(emoji);\r\n                                });\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void CommandHint_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            InputMessage.FocusInput();\r\n\r\n            var frameworkElement = e.OriginalSource as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var botCommand = frameworkElement.DataContext as TLBotCommand;\r\n                if (botCommand != null)\r\n                {\r\n                    var command = !ViewModel.IsSingleBot\r\n                        ? string.Format(\"{0}@{1}\", botCommand.Command, ((IUserName)botCommand.Bot).UserName)\r\n                        : botCommand.Command.ToString();\r\n\r\n                    InputMessage.Text = string.Empty;\r\n                    Execute.BeginOnUIThread(() => ViewModel.Send(new TLString(\"/\" + command)));\r\n                }\r\n            }\r\n        }\r\n\r\n        private void InlineBotResults_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var frameworkElement = e.OriginalSource as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var result = frameworkElement.DataContext as TLBotInlineResultBase;\r\n                if (result != null)\r\n                {\r\n                    if (_previousFocusedElement == InputMessage)\r\n                    {\r\n                        InputMessage.FocusInput();\r\n                    }\r\n\r\n                    GifPlayerControl.StopInlineBotActivePlayers();\r\n                    ViewModel.SendBotInlineResult(result);\r\n                }\r\n                else\r\n                {\r\n                    TelegramTransitionService.SetNavigationOutTransition(this, null);\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        var textBlock = frameworkElement as TextBlock;\r\n                        if (textBlock != null)\r\n                        {\r\n                            if (_previousFocusedElement == InputMessage)\r\n                            {\r\n                                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(.15), () =>\r\n                                {\r\n                                    ViewModel.Switch(ViewModel.InlineBotResults.SwitchPM);\r\n                                });\r\n                            }\r\n                            else\r\n                            {\r\n                                ViewModel.Switch(ViewModel.InlineBotResults.SwitchPM);\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UsernameHint_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            InputMessage.FocusInput();\r\n\r\n            var frameworkElement = e.OriginalSource as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var user = frameworkElement.DataContext as IUserName;\r\n                if (user != null)\r\n                {\r\n                    var user45 = user as TLUser45;\r\n                    var userBase = user as TLUserBase;\r\n                    if (user45 != null && user45.IsInlineBot)\r\n                    {\r\n                        ViewModel._currentInlineBot = user45;\r\n                    }\r\n\r\n                    var index = 0;\r\n                    for (var i = InputMessage.Text.Length - 1; i >= 0; i--)\r\n                    {\r\n                        if (InputMessage.Text[i] == '@')\r\n                        {\r\n                            index = i;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (TLString.IsNullOrEmpty(user.UserName))\r\n                    {\r\n                        if (userBase != null)\r\n                        {\r\n                            ViewModel.AddMention(userBase);\r\n\r\n                            InputMessage.Text = string.Format(\"{0}({1})\", InputMessage.Text.Substring(0, index + 1), userBase.FullName);\r\n                            InputMessage.SelectionStart = InputMessage.Text.Length - userBase.FullName.Length - 1;\r\n                            InputMessage.SelectionLength = userBase.FullName.Length;\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        InputMessage.Text = string.Format(\"{0}{1} \", InputMessage.Text.Substring(0, index + 1), user.UserName);\r\n                        InputMessage.SelectionStart = InputMessage.Text.Length;\r\n                        InputMessage.SelectionLength = 0;\r\n                    }\r\n\r\n                    if (user45 != null && user45.IsInlineBot)\r\n                    {\r\n                        ViewModel.SetBotInlinePlaceholder();\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void HashtagHint_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            InputMessage.FocusInput();\r\n\r\n            var frameworkElement = e.OriginalSource as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var hashtag = frameworkElement.DataContext as TLHashtagItem;\r\n                if (hashtag != null)\r\n                {\r\n                    var index = 0;\r\n                    for (var i = InputMessage.Text.Length - 1; i >= 0; i--)\r\n                    {\r\n                        if (InputMessage.Text[i] == '#')\r\n                        {\r\n                            index = i;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    InputMessage.Text = string.Format(\"{0}{1} \", InputMessage.Text.Substring(0, index + 1), hashtag.Hashtag);\r\n                    InputMessage.SelectionStart = InputMessage.Text.Length;\r\n                    InputMessage.SelectionLength = 0;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void StickerHints_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ViewModel.ContinueStickerHints();\r\n        }\r\n\r\n        private void UsernameHints_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ViewModel.ContinueUsernameHints();\r\n        }\r\n\r\n        private void InlineBotResults_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ViewModel.ContinueInlineBotResults();\r\n        }\r\n\r\n        private void CommandHints_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ViewModel.ContinueCommandHints();\r\n        }\r\n\r\n        private void HashtagHints_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ViewModel.ContinueHashtagHints();\r\n        }\r\n\r\n        private void EmojiHints_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            //ViewModel.ContinueEmojiHints();\r\n        }\r\n\r\n        private void Items_OnBegin(object sender, System.EventArgs e)\r\n        {\r\n            // repeat messages on first load with unread history\r\n            if (!ViewModel.IsFirstSliceLoaded && ViewModel._previousScrollPosition != null)\r\n            {\r\n                ViewModel.LoadPreviousSlice(\"Items_OnBegin\");\r\n            }\r\n            else\r\n            {\r\n                if (!ViewModel.SuppressHideScrollToBottom)\r\n                {\r\n                    ViewModel.MentionsCounter = 0;\r\n                }\r\n                HideScrollToBottomButton();\r\n            }\r\n        }\r\n\r\n        public bool IsScrollToBottomButtonVisible\r\n        {\r\n            get { return ScrollButton.Visibility == Visibility.Visible; }\r\n        }\r\n\r\n        public void HideMentionButton()\r\n        {\r\n            if (MentionButton.Visibility == Visibility.Collapsed) return;\r\n            if (ViewModel.SuppressHideScrollToBottom) return;\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            if (MentionButton.Visibility == Visibility.Visible)\r\n            {\r\n                var translateAnimation1 = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation1.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n                translateAnimation1.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(translateAnimation1, MentionButton);\r\n                Storyboard.SetTargetProperty(translateAnimation1, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation1);\r\n\r\n                var opacityAnimation1 = new DoubleAnimation\r\n                {\r\n                    From = 1.0,\r\n                    To = 0.0,\r\n                    Duration = TimeSpan.FromSeconds(0.25),\r\n                    EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n                };\r\n                Storyboard.SetTarget(opacityAnimation1, MentionButton);\r\n                Storyboard.SetTargetProperty(opacityAnimation1, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation1);\r\n            }\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                MentionButton.Visibility = Visibility.Collapsed;\r\n            };\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        public void HideScrollToBottomButton()\r\n        {\r\n            if (ScrollButton.Visibility == Visibility.Collapsed\r\n                && MentionButton.Visibility == Visibility.Collapsed) return;\r\n            if (ViewModel.SuppressHideScrollToBottom) return;\r\n\r\n            var storyboard = new Storyboard();\r\n            if (ScrollButton.Visibility == Visibility.Visible)\r\n            {\r\n                var translateAnimation2 = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n                translateAnimation2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(translateAnimation2, ScrollButton);\r\n                Storyboard.SetTargetProperty(translateAnimation2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation2);\r\n\r\n                var opacityAnimation2 = new DoubleAnimation\r\n                {\r\n                    From = 1.0,\r\n                    To = 0.0,\r\n                    Duration = TimeSpan.FromSeconds(0.25),\r\n                    EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n                };\r\n                Storyboard.SetTarget(opacityAnimation2, ScrollButton);\r\n                Storyboard.SetTargetProperty(opacityAnimation2, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation2);\r\n\r\n                var visibilityAnimation2 = new ObjectAnimationUsingKeyFrames();\r\n                visibilityAnimation2.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = Visibility.Collapsed });\r\n                Storyboard.SetTarget(visibilityAnimation2, ScrollButton);\r\n                Storyboard.SetTargetProperty(visibilityAnimation2, new PropertyPath(\"(UIElement.Visibility)\"));\r\n                storyboard.Children.Add(visibilityAnimation2);\r\n            }\r\n\r\n            if (ViewModel.MentionsCounter == 0 && MentionButton.Visibility == Visibility.Visible)\r\n            {\r\n                var translateAnimation1 = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation1.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n                translateAnimation1.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(translateAnimation1, MentionButton);\r\n                Storyboard.SetTargetProperty(translateAnimation1, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation1);\r\n\r\n                var opacityAnimation1 = new DoubleAnimation\r\n                {\r\n                    From = 1.0,\r\n                    To = 0.0,\r\n                    Duration = TimeSpan.FromSeconds(0.25),\r\n                    EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n                };\r\n                Storyboard.SetTarget(opacityAnimation1, MentionButton);\r\n                Storyboard.SetTargetProperty(opacityAnimation1, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation1);\r\n\r\n                var visibilityAnimation = new ObjectAnimationUsingKeyFrames();\r\n                visibilityAnimation.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = Visibility.Collapsed });\r\n                Storyboard.SetTarget(visibilityAnimation, MentionButton);\r\n                Storyboard.SetTargetProperty(visibilityAnimation, new PropertyPath(\"(UIElement.Visibility)\"));\r\n                storyboard.Children.Add(visibilityAnimation);\r\n            }\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                ViewModel.Counter = 0;\r\n            };\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        public void ShowMentionButton()\r\n        {\r\n            if (MentionButton.Visibility == Visibility.Visible) return;\r\n            if (ViewModel.SuppressHideScrollToBottom) return;\r\n            var dialog71 = ViewModel.CurrentDialog as TLDialog71;\r\n            if (dialog71 != null && (dialog71.UnreadMentions == null || dialog71.UnreadMentionsCount.Value == 0)) return;\r\n\r\n            MentionButton.Visibility = Visibility.Visible;\r\n            MentionButton.Opacity = 0.0;\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 150.0 });\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n            Storyboard.SetTarget(translateAnimation, MentionButton);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n\r\n            var opacityAnimation = new DoubleAnimation\r\n            {\r\n                From = 0.0,\r\n                To = 1.0,\r\n                Duration = TimeSpan.FromSeconds(0.25),\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n            };\r\n            Storyboard.SetTarget(opacityAnimation, MentionButton);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        public void ShowScrollToBottomButton()\r\n        {\r\n            var storyboard = new Storyboard();\r\n            if (ScrollButton.Visibility == Visibility.Collapsed)\r\n            {\r\n                ScrollButton.Visibility = Visibility.Visible;\r\n                ScrollButton.Opacity = 0.0;\r\n\r\n                var translateAnimation2 = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 150.0 });\r\n                translateAnimation2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(translateAnimation2, ScrollButton);\r\n                Storyboard.SetTargetProperty(translateAnimation2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation2);\r\n\r\n                var opacityAnimation2 = new DoubleAnimation\r\n                {\r\n                    From = 0.0,\r\n                    To = 1.0,\r\n                    Duration = TimeSpan.FromSeconds(0.25),\r\n                    EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n                };\r\n                Storyboard.SetTarget(opacityAnimation2, ScrollButton);\r\n                Storyboard.SetTargetProperty(opacityAnimation2, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation2);\r\n            }\r\n\r\n            if (MentionButton.Visibility == Visibility.Collapsed && ViewModel.MentionsCounter > 0)\r\n            {\r\n                MentionButton.Visibility = Visibility.Visible;\r\n                MentionButton.Opacity = 0.0;\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 150.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(translateAnimation, MentionButton);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                var opacityAnimation = new DoubleAnimation\r\n                {\r\n                    From = 0.0,\r\n                    To = 1.0,\r\n                    Duration = TimeSpan.FromSeconds(0.25),\r\n                    EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n                };\r\n                Storyboard.SetTarget(opacityAnimation, MentionButton);\r\n                Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation);\r\n            }\r\n\r\n            if (storyboard.Children.Count > 0)\r\n            {\r\n                storyboard.Begin();\r\n            }\r\n        }\r\n\r\n        private static Storyboard _storyboard;\r\n        private static UIElement _element;\r\n\r\n        public static readonly DependencyProperty AnimatedVisibilityProperty =\r\n            DependencyProperty.RegisterAttached(\"AnimatedVisibility\", typeof(bool), typeof(DialogDetailsView),\r\n                new PropertyMetadata(OnAnimagedVisibilityChanged));\r\n\r\n        private StickerSpriteItem _stickerSpriteItem;\r\n\r\n        private bool _backKeyPressed;\r\n\r\n        private IDisposable _viewportChangedSubscription;\r\n\r\n        private static void OnAnimagedVisibilityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var element = d as UIElement;\r\n            if (element != null)\r\n            {\r\n                if (_storyboard != null)\r\n                {\r\n\r\n                    _storyboard.Stop();\r\n                }\r\n                if (_element != null)\r\n                {\r\n                    _element.Opacity = 0.0;\r\n                    _element.Visibility = Visibility.Collapsed;\r\n                }\r\n\r\n                if ((bool)e.NewValue)\r\n                {\r\n\r\n                    element.Opacity = 1.0;\r\n                    element.Visibility = Visibility.Visible;\r\n                }\r\n                else\r\n                {\r\n                    var storyboard = new Storyboard();\r\n                    var continuumLayoutRootOpacity = new DoubleAnimation\r\n                    {\r\n                        From = 1.0,\r\n                        To = 0.0,\r\n                        Duration = TimeSpan.FromSeconds(1.0),\r\n                    };\r\n                    Storyboard.SetTarget(continuumLayoutRootOpacity, element);\r\n                    Storyboard.SetTargetProperty(continuumLayoutRootOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                    storyboard.Children.Add(continuumLayoutRootOpacity);\r\n\r\n                    storyboard.Begin();\r\n                    storyboard.Completed += (sender, args) =>\r\n                    {\r\n                        _storyboard = null;\r\n                        _element = null;\r\n                    };\r\n\r\n                    _storyboard = storyboard;\r\n                    _element = element;\r\n                }\r\n            }\r\n        }\r\n\r\n\r\n        public static bool GetAnimatedVisibility(UIElement element)\r\n        {\r\n            return (bool)element.GetValue(AnimatedVisibilityProperty);\r\n        }\r\n\r\n        public static void SetAnimatedVisibility(UIElement element, bool value)\r\n        {\r\n            element.SetValue(AnimatedVisibilityProperty, value);\r\n        }\r\n\r\n        private void HashtagHintsPanel_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.ClearHashtags();\r\n        }\r\n\r\n        private void CommandsControl_OnButtonClick(object sender, KeyboardButtonEventArgs e)\r\n        {\r\n            TLMessageBase message = null;\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                message = frameworkElement.DataContext as TLMessageBase;\r\n            }\r\n\r\n            ViewModel.Send(message, e.Button);\r\n\r\n            if (e.ReplyMarkup != null\r\n                && e.ReplyMarkup == ViewModel.ReplyMarkup\r\n                && e.ReplyMarkup.IsSingleUse)\r\n            {\r\n                InputMessage.FocusInput();\r\n            }\r\n        }\r\n\r\n        private void InputMessage_OnMuteButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            var channel = ViewModel.With as TLChannel44;\r\n            if (channel != null)\r\n            {\r\n                channel.Silent = !channel.Silent;\r\n                ViewModel.NotifyOfPropertyChange(() => ViewModel.MuteButtonImageSource);\r\n\r\n                if (InputMessageHintPlaceholder.Content == null)\r\n                {\r\n                    var control = new InputMessageHint();\r\n                    control.Closed += OnInputMessageHintClosed;\r\n\r\n                    InputMessageHintPlaceholder.Content = control;\r\n                }\r\n\r\n                var inputMessageHint = InputMessageHintPlaceholder.Content as InputMessageHint;\r\n                if (inputMessageHint != null)\r\n                {\r\n                    inputMessageHint.Hint = channel.Silent ? AppResources.MuteChannelPostHint : AppResources.UnmuteChannelPostHint;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnInputMessageHintClosed(object sender, System.EventArgs e)\r\n        {\r\n            var control = sender as InputMessageHint;\r\n            if (control != null)\r\n            {\r\n                control.Closed -= OnInputMessageHintClosed;\r\n            }\r\n\r\n            InputMessageHintPlaceholder.Content = null;\r\n        }\r\n\r\n        private void InputMessage_OnKeyboardButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            var replyKeyboard = ViewModel.ReplyMarkup as TLReplyKeyboardMarkup;\r\n\r\n            if (ViewModel.HasBots && replyKeyboard == null)\r\n            {\r\n                InputMessage.Text = \"/\";\r\n                InputMessage.SelectionStart = 1;\r\n                InputMessage.FocusInput();\r\n\r\n                return;\r\n            }\r\n\r\n            if (_emojiKeyboard != null\r\n                && InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n\r\n                if (replyKeyboard != null)\r\n                {\r\n                    //OpenEmptyDialogPlaceholder();\r\n                    CloseEmojiPlaceholder();\r\n\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() => OpenCommandsPlaceholder());\r\n\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (CommandsControl.Visibility == Visibility.Visible)\r\n            {\r\n                if (_emojiKeyboard != null\r\n                    && InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n                {\r\n                    OpenEmptyDialogPlaceholder();\r\n                    CloseCommandsPlaceholder();\r\n                    SetCaptionVisibility(Visibility.Visible);\r\n                }\r\n                else\r\n                {\r\n                    CloseCommandsPlaceholder();\r\n                    InputMessage.FocusInput();\r\n                    //Telegram.Api.Helpers.Execute.BeginOnUIThread(() => InputMessage.FocusInput());\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (replyKeyboard != null)\r\n                {\r\n                    CloseEmptyDialogPlaceholder();\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() => OpenCommandsPlaceholder());\r\n                    SetCaptionVisibility(Visibility.Collapsed);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void AddToFavedStickers_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem != null)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n                var message = menuItem.DataContext as TLMessage;\r\n                if (message != null && message.IsSticker())\r\n                {\r\n                    var mediaDocument = message.Media as TLMessageMediaDocument;\r\n                    if (mediaDocument == null) return;\r\n\r\n                    var document = mediaDocument.Document as TLDocument22;\r\n                    if (document != null)\r\n                    {\r\n                        var inputStickerSet = document.StickerSet;\r\n                        if (inputStickerSet != null && !(inputStickerSet is TLInputStickerSetEmpty))\r\n                        {\r\n                            var allStickers = ViewModel.Stickers as TLAllStickers43;\r\n                            if (allStickers != null && allStickers.FavedStickers != null)\r\n                            {\r\n                                if (allStickers.Sets.Count >= Constants.MinSetsToAddFavedSticker || allStickers.FavedStickers.Documents.Count > 0)\r\n                                {\r\n                                    var exists = allStickers.FavedStickers.Documents.FirstOrDefault(x => x.Id.Value == document.Id.Value);\r\n                                    if (exists != null)\r\n                                    {\r\n                                        menuItem.Visibility = Visibility.Visible;\r\n                                        menuItem.Header = AppResources.DeleteFromFavorites;\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        menuItem.Visibility = Visibility.Visible;\r\n                                        menuItem.Header = AppResources.AddToFavorites;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void AddToStickers_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem != null)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n                var message = menuItem.DataContext as TLMessage;\r\n                if (message != null && message.IsSticker())\r\n                {\r\n                    var mediaDocument = message.Media as TLMessageMediaDocument;\r\n                    if (mediaDocument == null) return;\r\n\r\n                    var document = mediaDocument.Document as TLDocument22;\r\n                    if (document != null)\r\n                    {\r\n                        var inputStickerSet = document.StickerSet;\r\n                        if (inputStickerSet != null && !(inputStickerSet is TLInputStickerSetEmpty))\r\n                        {\r\n                            var allStickers = ViewModel.Stickers as TLAllStickers29;\r\n                            if (allStickers != null)\r\n                            {\r\n                                var set =\r\n                                    allStickers.Sets.FirstOrDefault(\r\n                                        x => x.Id.Value.ToString() == inputStickerSet.Name.ToString());\r\n                                if (set != null)\r\n                                {\r\n                                    menuItem.Visibility = Visibility.Collapsed;\r\n                                    menuItem.Header = AppResources.ViewStickers;\r\n                                }\r\n                                else\r\n                                {\r\n                                    menuItem.Visibility = Visibility.Visible;\r\n                                    menuItem.Header = AppResources.AddToStickers;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void StickerContextMenu_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element != null)\r\n            {\r\n                element.Visibility = Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        private void ServiceMessageContextMenu_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as ContextMenu;\r\n            if (element != null)\r\n            {\r\n                if (ViewModel.IsAppBarCommandVisible)\r\n                {\r\n                    element.Visibility = Visibility.Collapsed;\r\n                    element.IsOpen = false;\r\n\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void DeleteMenuItem_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element != null)\r\n            {\r\n                var message = element.DataContext as TLMessage40;\r\n                if (message != null && message.Out.Value)\r\n                {\r\n                    element.Visibility = Visibility.Visible;\r\n                    return;\r\n                }\r\n\r\n                var channel = ViewModel.With as TLChannel;\r\n                if (channel != null\r\n                    && (channel.Creator || channel.IsEditor))\r\n                {\r\n                    element.Visibility = Visibility.Visible;\r\n                    return;\r\n                }\r\n\r\n                element.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        private void ReplyMenuItem_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            element.Visibility = ViewModel.IsAppBarCommandVisible ? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        private void ForwardMenuItem_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var broadcast = ViewModel.With as TLBroadcastChat;\r\n            var channel = ViewModel.With as TLChannel;\r\n            if (broadcast != null\r\n                && channel == null)\r\n            {\r\n                element.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            element.Visibility = Visibility.Visible;\r\n        }\r\n\r\n        private void MoreMenuItem_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            element.Visibility = ViewModel.IsAppBarCommandVisible ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        private void MoreMenuItem_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.IsSelectionEnabled = true;\r\n            ApplicationBar.IsVisible = false;// true;\r\n        }\r\n\r\n        private void ReportMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            element.Visibility = Visibility.Collapsed;\r\n            var message = element.DataContext as TLMessageCommon;\r\n            var user = ViewModel.With as TLUser;\r\n            var channel = ViewModel.With as TLChannel;\r\n\r\n            if (message != null\r\n                && !message.Out.Value\r\n                && (user != null && user.IsBot || channel != null))\r\n            {\r\n                element.Visibility = Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        private void ResendMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            element.Visibility = Visibility.Collapsed;\r\n            var message = element.DataContext as TLMessageCommon;\r\n            if (message != null)\r\n            {\r\n                element.Visibility = message.Status == MessageStatus.Failed ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        private void ReplyMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            element.Visibility = Visibility.Visible;\r\n\r\n            if (ViewModel.IsAppBarCommandVisible)\r\n            {\r\n                element.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var message = element.DataContext as TLMessage;\r\n            if (message != null && message.IsExpired())\r\n            {\r\n                element.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var channel = ViewModel.With as TLChannel;\r\n            if (channel != null && channel.MigratedFromChatId != null)\r\n            {\r\n                var messageCommon = element.DataContext as TLMessageCommon;\r\n                if (messageCommon != null)\r\n                {\r\n                    if (messageCommon.ToId is TLPeerChat)\r\n                    {\r\n                        element.Visibility = messageCommon.ToId.Id.Value == channel.MigratedFromChatId.Value ? Visibility.Collapsed : Visibility.Visible;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void PinMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as MenuItem;\r\n            if (element == null) return;\r\n\r\n            element.Visibility = Visibility.Collapsed;\r\n\r\n            var channel = ViewModel.With as TLChannel;\r\n            if (channel != null && channel.CanPinMessages)\r\n            {\r\n                var message = element.DataContext as TLMessageCommon;\r\n                if (message != null)\r\n                {\r\n                    if (message.ToId is TLPeerChannel)\r\n                    {\r\n                        element.Visibility = Visibility.Visible;\r\n                        element.Header = ViewModel.PinnedMessage != null && ViewModel.PinnedMessage.Message == message ? AppResources.UnpinMessage : AppResources.PinMessage;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        private void EditMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            element.Visibility = Visibility.Collapsed;\r\n\r\n            var channel = ViewModel.With as TLChannel76;\r\n            var user = ViewModel.With as TLUser66;\r\n            var message = element.DataContext as TLMessage48;\r\n\r\n            if (message != null\r\n                && message.FwdHeader == null\r\n                && message.ViaBotId == null\r\n                && (message.Out.Value || (channel != null && channel.Creator && channel.IsEditor))\r\n                && (message.Media is IMediaCaption || message.Media is TLMessageMediaWebPage || message.Media is TLMessageMediaEmpty))\r\n            {\r\n                if (message.IsExpired())\r\n                {\r\n                    return;\r\n                }\r\n\r\n                if (message.IsVoice())\r\n                {\r\n                    return;\r\n                }\r\n\r\n                if (message.IsSticker())\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var time = TLUtils.DateToUniversalTimeTLInt(ViewModel.MTProtoService.ClientTicksDelta, DateTime.Now);\r\n                var config = IoC.Get<ICacheService>().GetConfig() as TLConfig48;\r\n                if (config != null && config.EditTimeLimit != null && (message.DateIndex + config.EditTimeLimit.Value) < time.Value)\r\n                {\r\n                    // channel admins with 'pin message' right can edit as long as possible\r\n                    if (channel != null\r\n                        && channel.AdminRights != null\r\n                        && channel.AdminRights.PinMessages)\r\n                    {\r\n\r\n                    }\r\n                    else if (user != null && user.IsSelf)\r\n                    {\r\n\r\n                    }\r\n                    else\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                element.Visibility = Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        private void DeleteMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            element.Visibility = Visibility.Visible;\r\n\r\n            var channel = ViewModel.With as TLChannel;\r\n            if (channel != null)\r\n            {\r\n                var message = element.DataContext as TLMessageCommon;\r\n                if (message != null)\r\n                {\r\n                    if (message.Index == 1 && message.ToId is TLPeerChannel)\r\n                    {\r\n                        element.Visibility = Visibility.Collapsed;\r\n                    }\r\n\r\n                    if (!channel.Creator && !channel.IsEditor)\r\n                    {\r\n                        if (message.FromId.Value != IoC.Get<IStateService>().CurrentUserId)\r\n                        {\r\n                            element.Visibility = Visibility.Collapsed;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ForwardMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            element.Visibility = Visibility.Collapsed;\r\n\r\n            if (ViewModel == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var message = element.DataContext as TLMessage;\r\n            if (message != null && message.HasTTL())\r\n            {\r\n                return;\r\n            }\r\n\r\n            element.Visibility = ViewModel.IsBroadcast && !ViewModel.IsChannel ? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        private void CopyMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            element.Visibility = Visibility.Collapsed;\r\n\r\n            var message = element.DataContext as TLMessage;\r\n            if (message != null)\r\n            {\r\n                if (!TLString.IsNullOrEmpty(message.Message))\r\n                {\r\n                    element.Visibility = Visibility.Visible;\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void EmojiMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            element.Visibility =\r\n#if DEBUG\r\n Visibility.Visible;\r\n#else\r\n                Visibility.Collapsed;\r\n#endif\r\n        }\r\n\r\n        private void SaveMedia_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            frameworkElement.Visibility = Visibility.Collapsed;\r\n\r\n            var message = frameworkElement.DataContext as TLMessage;\r\n            if (message == null) return;\r\n            if (message.HasTTL() || message.IsSticker() || message.IsRoundVideo() || message.IsGif()) return;\r\n\r\n#if WP8\r\n            var mediaDocument = message.Media as TLMessageMediaDocument;\r\n            if (mediaDocument != null)\r\n            {\r\n                var file = mediaDocument.File;\r\n\r\n                if (file == null)\r\n                {\r\n                    var document = mediaDocument.Document as TLDocument;\r\n                    if (document != null)\r\n                    {\r\n                        var localFileName = document.GetFileName() ?? string.Empty;\r\n                        var globalFileName = mediaDocument.IsoFileName ?? string.Empty;\r\n                        var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                        if (store.FileExists(localFileName)\r\n                            || store.FileExists(globalFileName)\r\n#if WP81\r\n || File.Exists(globalFileName)\r\n#endif\r\n)\r\n                        {\r\n                            frameworkElement.Visibility = Visibility.Visible;\r\n                            return;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                frameworkElement.Visibility = file != null ? Visibility.Visible : Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var mediaVideo = message.Media as TLMessageMediaVideo;\r\n            if (mediaVideo != null)\r\n            {\r\n                var file = mediaVideo.File;\r\n\r\n                if (file == null)\r\n                {\r\n                    var video = mediaVideo.Video as TLVideo;\r\n                    if (video != null)\r\n                    {\r\n                        var localFileName = video.GetFileName() ?? string.Empty;\r\n                        var globalFileName = mediaVideo.IsoFileName ?? string.Empty;\r\n                        var store = IsolatedStorageFile.GetUserStoreForApplication();\r\n                        if (store.FileExists(localFileName)\r\n                            || store.FileExists(globalFileName)\r\n#if WP81\r\n || File.Exists(globalFileName)\r\n#endif\r\n)\r\n                        {\r\n                            frameworkElement.Visibility = Visibility.Visible;\r\n                            return;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                frameworkElement.Visibility = file != null ? Visibility.Visible : Visibility.Collapsed;\r\n                return;\r\n            }\r\n#endif\r\n        }\r\n\r\n        private void MessagesList_OnViewportChanged()\r\n        {\r\n            //return;\r\n            System.Diagnostics.Debug.WriteLine(\"ViewportChanged date={0}\", DateTime.Now.TimeOfDay);\r\n            if (Player.Content != null)\r\n            {\r\n                var gifPlayer = MessagePlayerControl.Player.Tag as GifPlayerControl;\r\n                if (gifPlayer != null && gifPlayer.Mode == GifPlayerMode.RoundVideo)\r\n                {\r\n                    var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                    if (frame != null)\r\n                    {\r\n                        var itemsInView = MessagesList.GetItemsInView();\r\n                        foreach (var item in itemsInView)\r\n                        {\r\n                            var message = item.DataContext as TLMessage;\r\n                            if (message != null && message.Media == gifPlayer.Media)\r\n                            {\r\n                                frame.HidePlayer();\r\n                                return;\r\n                            }\r\n                        }\r\n\r\n                        var videoBrush = new VideoBrush();\r\n                        videoBrush.SetSource(MessagePlayerControl.Player);\r\n\r\n                        frame.ShowPlayer(videoBrush);\r\n                    }\r\n                }\r\n            }\r\n            var dialog = ViewModel.CurrentDialog as TLDialog71;\r\n            if (dialog != null && dialog.UnreadMentions != null && dialog.UnreadMentions.Count > 0)\r\n            {\r\n                var itemsInView = MessagesList.GetItemsInView();\r\n                var maxId = 0;\r\n                foreach (var item in itemsInView)\r\n                {\r\n                    var message = item.DataContext as TLMessage;\r\n                    if (message != null)\r\n                    {\r\n                        maxId = Math.Max(maxId, message.Index);\r\n                    }\r\n                }\r\n\r\n                if (maxId > 0)\r\n                {\r\n                    ViewModel.ReadMentions(maxId);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Items_OnItemUnrealized(object sender, ItemRealizationEventArgs e)\r\n        {\r\n            var message = e.Container.Content as TLMessage;\r\n            if (message != null)\r\n            {\r\n\r\n                TLFileLocation profilePhotoFileLocation = null;\r\n\r\n                var photoMedia = message.Media as TLMessageMediaPhoto;\r\n                if (photoMedia != null)\r\n                {\r\n                    var photo = photoMedia.Photo as TLPhoto;\r\n                    if (photo != null)\r\n                    {\r\n                        var viewModel = ViewModel;\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            viewModel.DownloadFileManager.CancelDownloadFile(photo);\r\n                            if (profilePhotoFileLocation != null) viewModel.DownloadFileManager.CancelDownloadFile(profilePhotoFileLocation);\r\n                        });\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void StartChatPlayer(StartGifPlayerEventArgs e)\r\n        {\r\n            if (MessagesList.ManipulationState != ManipulationState.Idle) return;\r\n            if (ViewModel.ChooseAttachment != null && ViewModel.ChooseAttachment.IsOpen) return;\r\n            if (MessagePlayerControl.Player != null\r\n                && MessagePlayerControl.Player.CurrentState == MediaElementState.Playing\r\n                && MessagePlayerControl.Player.Tag is GifPlayerControl) return;\r\n\r\n            var settings = ViewModel.StateService.GetChatSettings();\r\n            var newItems = MessagesList.GetItemsInView();\r\n\r\n            foreach (var item in newItems)\r\n            {\r\n                var message = item.DataContext as TLMessage;\r\n                if (message != null && message == e.Message && (message.IsGif() || message.IsRoundVideo()))\r\n                {\r\n                    var media = message.Media;\r\n                    if ((media != null && media.AutoPlayGif == true) || (settings != null && settings.AutoPlayGif && media != null && media.AutoPlayGif != false))\r\n                    {\r\n                        var gifPlayer = item.FindChildOfType<GifPlayerControl>();\r\n                        if (gifPlayer != null)\r\n                        {\r\n                            gifPlayer.Start();\r\n                        }\r\n                    }\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ResumeChatPlayers()\r\n        {\r\n            if (MessagesList.ManipulationState != ManipulationState.Idle) return;\r\n            if (ViewModel.ChooseAttachment != null && ViewModel.ChooseAttachment.IsOpen) return;\r\n            if (MessagePlayerControl.Player != null\r\n                && MessagePlayerControl.Player.CurrentState == MediaElementState.Playing\r\n                && MessagePlayerControl.Player.Tag is GifPlayerControl) return;\r\n            if (FocusManager.GetFocusedElement() == InputMessage.Input) return;\r\n            if (ViewModel.InlineBotResults != null && ViewModel.InlineBotResults.Results.Count > 0) return;\r\n\r\n            var settings = ViewModel.StateService.GetChatSettings();\r\n            var newItems = MessagesList.GetItemsInView();\r\n\r\n            var activePlayers = new List<GifPlayerControl>();\r\n            foreach (var item in newItems)\r\n            {\r\n                var message = item.DataContext as TLMessage;\r\n                if (message != null && (message.IsGif() || message.IsRoundVideo()))\r\n                {\r\n                    var media = message.Media;\r\n                    if ((media != null && media.AutoPlayGif == true) || (settings != null && settings.AutoPlayGif && media != null && media.AutoPlayGif != false))\r\n                    {\r\n                        var gifPlayer = item.FindChildOfType<GifPlayerControl>();\r\n                        if (gifPlayer != null)\r\n                        {\r\n                            activePlayers.Add(gifPlayer);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            GifPlayerControl.ResumeActivePlayers(activePlayers);\r\n        }\r\n\r\n        public void PauseChatPlayers()\r\n        {\r\n            GifPlayerControl.PauseActivePlayers();\r\n        }\r\n\r\n        private void Items_OnManipulationStateChanged(object sender, System.EventArgs e)\r\n        {\r\n            GifPlayerControl.ManipulationState = MessagesList.ManipulationState;\r\n            if (MessagesList.ManipulationState == ManipulationState.Idle)\r\n            {\r\n                ResumeChatPlayers();\r\n            }\r\n            else\r\n            {\r\n                PauseChatPlayers();\r\n            }\r\n#if DEBUG\r\n            var count = GifPlayerControl.ActivePlayers.Count;\r\n            Debug.Text = string.Format(\"{0} {1}\", count, GifPlayerControl.ActivePlayers.Count);\r\n#endif\r\n        }\r\n\r\n        private void ViaBot_Tap(object sender, GestureEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            var message = frameworkElement.DataContext as TLMessage45;\r\n            if (message == null) return;\r\n\r\n            SetInlineBot(message.ViaBot);\r\n        }\r\n\r\n        public void SetInlineBot(TLUserBase bot)\r\n        {\r\n            var user = bot as TLUser;\r\n            if (user == null || !user.IsInlineBot) return;\r\n\r\n            InputMessage.Text = string.Format(\"@{0} \", user.UserName);\r\n            InputMessage.FocusInput();\r\n            InputMessage.SelectionStart = InputMessage.Text.Length;\r\n            InputMessage.SelectionLength = 0;\r\n\r\n            ViewModel.CurrentInlineBot = user;\r\n            ViewModel.GetInlineBotResults(string.Empty);\r\n        }\r\n\r\n        private void ForwardMessage_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var message = element.DataContext as TLMessageBase;\r\n            // find common grouped message to resend\r\n            var message73 = message as TLMessage73;\r\n            if (message73 != null\r\n                && message73.GroupedId != null)\r\n            {\r\n                var mediaGroup = message73.Media as TLMessageMediaGroup;\r\n                if (mediaGroup == null)\r\n                {\r\n                    var groupedMessage = ViewModel.FindGroupedMessage(message73) as TLMessage45;\r\n                    if (groupedMessage != null)\r\n                    {\r\n                        message = groupedMessage;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (message == null) return;\r\n            var selectedItems = new List<TLMessageBase> { message };\r\n            if (selectedItems.Count == 0) return;\r\n\r\n            ViewModel.FastForwardMessages(selectedItems);\r\n        }\r\n\r\n        private void ShareButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var message = element.DataContext as TLMessageBase;\r\n            if (message == null) return;\r\n\r\n            var message73 = message as TLMessage73;\r\n            if (message73 != null)\r\n            {\r\n                var fwdHeader = message73.FwdHeader as TLMessageFwdHeader73;\r\n                if (fwdHeader != null && fwdHeader.SavedFromPeer != null && fwdHeader.SavedFromMsgId != null)\r\n                {\r\n                    TLObject with = null;\r\n                    var peerUser = fwdHeader.SavedFromPeer as TLPeerUser;\r\n                    var peerChat = fwdHeader.SavedFromPeer as TLPeerChat;\r\n                    var peerChannel = fwdHeader.SavedFromPeer as TLPeerChannel;\r\n                    if (peerUser != null)\r\n                    {\r\n                        with = IoC.Get<ICacheService>().GetUser(peerUser.Id);\r\n                    }\r\n                    else if (peerChat != null)\r\n                    {\r\n                        with = IoC.Get<ICacheService>().GetChat(peerChat.Id);\r\n                    }\r\n                    else if (peerChannel != null)\r\n                    {\r\n                        with = IoC.Get<ICacheService>().GetChat(peerChannel.Id);\r\n                    }\r\n\r\n                    if (with == null)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IoC.Get<IStateService>().With = with;\r\n                        IoC.Get<IStateService>().MessageId = fwdHeader.SavedFromMsgId;\r\n                        IoC.Get<IStateService>().RemoveBackEntries = true;\r\n                        IoC.Get<INavigationService>().Navigate(new Uri(\"/Views/Dialogs/DialogDetailsView.xaml?rndParam=\" + TLInt.Random(), UriKind.Relative));\r\n                    });\r\n\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var selectedItems = new List<TLMessageBase> { message };\r\n            if (selectedItems.Count == 0) return;\r\n\r\n            ViewModel.FastForwardMessages(selectedItems);\r\n        }\r\n\r\n        private void EmojiMessage_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var message = element.DataContext as TLMessage48;\r\n            if (message == null) return;\r\n\r\n            var fwdHeader = message.FwdHeader;\r\n            MessageBox.Show(\r\n                string.Format(\"TLMessageFwdHeader flags={0} from_id={1} date={2} channel_id={3} channel_post={4}\",\r\n                    fwdHeader.Flags, fwdHeader.FromId, fwdHeader.Date, fwdHeader.ChannelId, fwdHeader.ChannelPost));\r\n            return;\r\n\r\n            var resultString = string.Empty;\r\n            var text = message.Message.ToString();\r\n            var textEnumerator = StringInfo.GetTextElementEnumerator(text);\r\n\r\n            var symbols = new List<string>();\r\n            while (textEnumerator.MoveNext())\r\n            {\r\n                var text2 = textEnumerator.GetTextElement();\r\n                var bytes2 = Encoding.BigEndianUnicode.GetBytes(text2);\r\n                var bytesStr2 = BrowserNavigationService.ConvertToHexString(bytes2);\r\n\r\n                symbols.Add(bytesStr2);\r\n            }\r\n\r\n            var dict = new Dictionary<string, string>();\r\n            var builder = new StringBuilder();\r\n            for (var i = 0; i < symbols.Count; )\r\n            {\r\n                builder.AppendLine(string.Format(\"_dict[\\\"{0}\\\"] = \\\"{0}\\\";\", symbols[i] + symbols[i + 1]));\r\n                dict[symbols[i]] = symbols[i];\r\n                i += 2;\r\n\r\n                if (i % 20 == 0)\r\n                {\r\n                    builder.AppendLine();\r\n                }\r\n            }\r\n            builder.AppendLine();\r\n            foreach (var item in dict)\r\n            {\r\n                builder.AppendLine(item.Value);\r\n            }\r\n\r\n            MessageBox.Show(builder.ToString());\r\n            Clipboard.SetText(builder.ToString());\r\n        }\r\n\r\n        private void ShowUserProfile_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var message = element.DataContext as TLMessage;\r\n            if (message == null) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                CreateBitmapCache();\r\n                MessagesList.Visibility = Visibility.Collapsed;\r\n                MessagesCache.Visibility = Visibility.Visible;\r\n                ViewModel.ShowUserProfile(message);\r\n            });\r\n        }\r\n\r\n        private void CopyLink_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var contextMenu = sender as ContextMenu;\r\n            if (contextMenu == null) return;\r\n\r\n            var message = contextMenu.DataContext as TLMessageBase;\r\n            if (message == null)\r\n            {\r\n                contextMenu.IsOpen = false;\r\n                return;\r\n            }\r\n            if (message.Index == 0)\r\n            {\r\n                contextMenu.IsOpen = false;\r\n                return;\r\n            }\r\n\r\n            var channel = ViewModel.With as TLChannel;\r\n            if (channel == null)\r\n            {\r\n                contextMenu.IsOpen = false;\r\n                return;\r\n            }\r\n\r\n            if (TLString.IsNullOrEmpty(channel.UserName))\r\n            {\r\n                contextMenu.IsOpen = false;\r\n                return;\r\n            }\r\n        }\r\n\r\n        private void CopyLink_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var message = element.DataContext as TLMessageBase;\r\n            if (message == null) return;\r\n            if (message.Index == 0) return;\r\n\r\n            var selectedItems = new List<TLMessageBase> { message };\r\n            if (selectedItems.Count == 0) return;\r\n\r\n            var channel = ViewModel.With as TLChannel;\r\n            if (channel == null) return;\r\n            if (TLString.IsNullOrEmpty(channel.UserName)) return;\r\n\r\n            Clipboard.SetText(String.Format(Constants.UsernameLinkPlaceholder + \"/{1}\", channel.UserName, message.Id));\r\n        }\r\n\r\n        private void FrameworkElement_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            Telegram.Api.Helpers.Execute.ShowDebugMessage(\"ActualHeight=\" + element.ActualWidth);\r\n        }\r\n\r\n        private void InputMessage_OnDeleteReplyButtonClick(object sender, System.EventArgs eventArgs)\r\n        {\r\n            var container = ViewModel.Reply as TLMessagesContainter;\r\n            if (container != null)\r\n            {\r\n                var editMessage = container.EditMessage;\r\n                if (editMessage != null)\r\n                {\r\n                    if (container.WebPageMedia != null)\r\n                    {\r\n                        ViewModel.DeleteReply();\r\n\r\n                        return;\r\n                    }\r\n\r\n                    ViewModel.CancelSaveMessage();\r\n\r\n                    return;\r\n                }\r\n            }\r\n\r\n            ViewModel.DeleteReply();\r\n        }\r\n\r\n        private void KeepFocusedInputMessage()\r\n        {\r\n            if (_focusedElement == InputMessage)\r\n            {\r\n                InputMessage.FocusInput();\r\n            }\r\n        }\r\n\r\n        private void InputMessage_OnOpenReplyButtonClick(object sender, System.EventArgs eventArgs)\r\n        {\r\n            ViewModel.OpenEditMessage();\r\n        }\r\n\r\n        private void MessagesList_OnShowScrollButton(object sender, System.EventArgs e)\r\n        {\r\n            ShowScrollToBottomButton();\r\n        }\r\n\r\n        private void MessagesList_OnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.ShowDebugMessage(\"MessagesList.OnSizeChanged\");\r\n        }\r\n\r\n        private void ContextMenu_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void ContextMenu_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ContextMenu.IsOpen = true;\r\n        }\r\n\r\n        private void InputMessage_OnAppBarCommandClick(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.AppBarCommand();\r\n        }\r\n\r\n        private void InputMessage_OnCancelSelectionButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.IsSelectionEnabled = false;\r\n        }\r\n\r\n        private void InputMessage_OnForwardButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            var selectedItems = DialogDetailsViewModel.UngroupEnumerator(ViewModel.Items).Where(x => x.Index > 0 && x.IsSelected).ToList();\r\n            if (selectedItems.Count == 0) return;\r\n\r\n            ViewModel.IsSelectionEnabled = false;\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.55), () =>  // waiting to complete animation\r\n            {\r\n                CreateBitmapCache();\r\n                MessagesList.Visibility = Visibility.Collapsed;\r\n                MessagesCache.Visibility = Visibility.Visible;\r\n                ViewModel.ForwardMessages(selectedItems);\r\n            });\r\n        }\r\n\r\n        private void SelectMessages_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var message = frameworkElement.DataContext as TLMessageBase;\r\n                if (message != null && message.SelectionVisibility == Visibility.Visible)\r\n                {\r\n                    ViewModel.ChangeSelection(message);\r\n                }\r\n            }\r\n\r\n            ViewModel.IsSelectionEnabled = true;\r\n        }\r\n\r\n        private void InputMessage_OnDeleteButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.DeleteMessages();\r\n        }\r\n\r\n        private void InputMessage_OnShowEmojiHints(object sender, EmojiHintsEventArgs e)\r\n        {\r\n            var emojiHintsView = EmojiHints.Content as EmojiHintsView;\r\n            if (emojiHintsView == null)\r\n            {\r\n                emojiHintsView = new EmojiHintsView { DataContext = new EmojiHintsViewModel() };\r\n                EmojiHints.Content = emojiHintsView;\r\n            }\r\n\r\n            var emojiHintsViewModel = emojiHintsView.DataContext as EmojiHintsViewModel;\r\n            if (emojiHintsViewModel != null)\r\n            {\r\n                emojiHintsViewModel.SetParameters(e.Parameters);\r\n            }\r\n        }\r\n\r\n        private void InputMessage_OnHideEmojiHints(object sender, System.EventArgs e)\r\n        {\r\n            var emojiHintsView = EmojiHints.Content as EmojiHintsView;\r\n            if (emojiHintsView != null)\r\n            {\r\n                var emojiHintsViewModel = emojiHintsView.DataContext as EmojiHintsViewModel;\r\n                if (emojiHintsViewModel != null)\r\n                {\r\n                    emojiHintsViewModel.SetParameters(null);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SelectMessages_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                frameworkElement.Visibility = Visibility.Visible;\r\n\r\n                var message = frameworkElement.DataContext as TLMessageBase;\r\n                if (message != null && message.IsExpired())\r\n                {\r\n                    frameworkElement.Visibility = Visibility.Collapsed;\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ScrollTo(TLObject obj)\r\n        {\r\n            MessagesList.ScrollToItem(obj);\r\n        }\r\n\r\n        private void MentionButton_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.ClearUnreadMentions();\r\n        }\r\n\r\n        private void SelectionBorder_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element != null)\r\n            {\r\n                var groupedMessage = element.DataContext as TLMessage73;\r\n                if (groupedMessage != null)\r\n                {\r\n                    var selectionChanged = false;\r\n\r\n                    var messageMediaGroup = groupedMessage.Media as TLMessageMediaGroup;\r\n                    if (messageMediaGroup != null)\r\n                    {\r\n                        var message = GetInnerMessage(element, e);\r\n                        if (message != null)\r\n                        {\r\n                            ViewModel.ChangeSelection(message);\r\n\r\n                            selectionChanged = true;\r\n                            if (messageMediaGroup.Group.All(x => x.IsSelected) && !groupedMessage.IsSelected\r\n                                || messageMediaGroup.Group.All(x => !x.IsSelected) && groupedMessage.IsSelected)\r\n                            {\r\n                                selectionChanged = false;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (!selectionChanged)\r\n                    {\r\n                        ViewModel.ChangeSelection(groupedMessage);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    ViewModel.ChangeSelection(element.DataContext as TLMessageBase);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void MessageControl_OnTapMedia(object sender, GestureEventArgs e)\r\n        {\r\n            var messageControl = sender as MessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                var message = GetInnerMessage(messageControl, e);\r\n                if (message != null)\r\n                {\r\n                    ViewModel.OpenMedia(message);\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLMessageBase _innerMessage;\r\n\r\n        private void MessageControl_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            var messageControl = sender as MessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                _innerMessage = GetInnerMessage(messageControl, e);\r\n            }\r\n        }\r\n\r\n        private TLMessageBase GetInnerMessage(FrameworkElement element, GestureEventArgs e)\r\n        {\r\n            var groupedMessage = element.DataContext as TLMessage73;\r\n            if (groupedMessage != null)\r\n            {\r\n                var messageMediaGroup = groupedMessage.Media as TLMessageMediaGroup;\r\n                if (messageMediaGroup != null)\r\n                {\r\n                    var point = e.GetPosition(Application.Current.RootVisual);\r\n                    var elements = VisualTreeHelper.FindElementsInHostCoordinates(point, MessagesList);\r\n                    var mediaPhotoControl = elements.OfType<IMediaControl>().FirstOrDefault();\r\n                    if (mediaPhotoControl != null)\r\n                    {\r\n                        var message = messageMediaGroup.Group.OfType<TLMessage>().FirstOrDefault(x => x.Media == mediaPhotoControl.Media);\r\n                        if (message != null)\r\n                        {\r\n                            return message;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return element.DataContext as TLMessageBase;\r\n        }\r\n\r\n        private void MessageControl_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (FocusManager.GetFocusedElement() == InputMessage.Input)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var messageControl = sender as MessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                var messageService = messageControl.DataContext as TLMessageService;\r\n                if (messageService != null)\r\n                {\r\n                    return;\r\n                }\r\n            }\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"  Manipulation started\");\r\n            _skipFirstManipulationDelta = true;\r\n            e.Handled = true;\r\n        }\r\n\r\n        private bool _skipFirstManipulationDelta;\r\n\r\n        private void MessageControl_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            if (_skipFirstManipulationDelta)\r\n            {\r\n                _skipFirstManipulationDelta = false;\r\n                return;\r\n            }\r\n\r\n            if (FocusManager.GetFocusedElement() == InputMessage.Input)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var messageControl = sender as MessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                var decryptedMessageService = messageControl.DataContext as TLMessageService;\r\n                if (decryptedMessageService != null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var transform = messageControl.RenderTransform as TranslateTransform;\r\n                if (transform == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var translationX = transform.X - e.DeltaManipulation.Translation.X;\r\n\r\n                if (translationX < -100.0)\r\n                {\r\n                    translationX = -100.0;\r\n                }\r\n                else if (translationX > 100.0)\r\n                {\r\n                    translationX = 100.0;\r\n                }\r\n\r\n                if (messageControl.CacheMode == null) messageControl.CacheMode = new BitmapCache();\r\n                messageControl.RenderTransform = new TranslateTransform\r\n                {\r\n                    X = translationX\r\n                };\r\n\r\n                e.Handled = true;\r\n            }\r\n        }\r\n\r\n        private void MessageControl_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            _skipFirstManipulationDelta = false;\r\n            System.Diagnostics.Debug.WriteLine(\"  Manipulation completed State={0}\", MessagesList.Viewport.ManipulationState);\r\n            if (FocusManager.GetFocusedElement() == InputMessage.Input)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var messageControl = sender as MessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                var decryptedMessageService = messageControl.DataContext as TLMessageService;\r\n                if (decryptedMessageService != null)\r\n                {\r\n                    return;\r\n                }\r\n                var transform = messageControl.RenderTransform as TranslateTransform;\r\n                if (transform != null)\r\n                {\r\n                    var translateX = transform.X;\r\n\r\n                    var storyboard = new Storyboard();\r\n                    var doubleAnimation = new DoubleAnimation();\r\n                    doubleAnimation.To = 0.0;\r\n                    doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(0.15));\r\n                    Storyboard.SetTarget(doubleAnimation, messageControl.RenderTransform);\r\n                    Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath(\"X\"));\r\n                    storyboard.Children.Add(doubleAnimation);\r\n\r\n                    storyboard.Begin();\r\n                    storyboard.Completed += (o, args) =>\r\n                    {\r\n                        messageControl.CacheMode = null;\r\n                        if (translateX >= 75.0)\r\n                        {\r\n                            var messageBase = messageControl.DataContext as TLMessageBase;\r\n                            var innerMessage = GetInnerMessage(e, messageBase);\r\n                            if (innerMessage != null)\r\n                            {\r\n                                messageBase = innerMessage;\r\n                            }\r\n\r\n                            if (messageBase == null) return;\r\n\r\n                            ViewModel.ReplyMessage(messageBase);\r\n                            InputMessage.FocusInput();\r\n                        }\r\n                        else if (translateX <= -75.0)\r\n                        {\r\n                            var messageBase = messageControl.DataContext as TLMessageBase;\r\n\r\n                            if (messageBase == null) return;\r\n\r\n                            ViewModel.FastForwardMessages(new List<TLMessageBase> { messageBase });\r\n                            SelfView.Focus();\r\n                        }\r\n                    };\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLMessageBase GetInnerMessage(ManipulationCompletedEventArgs e, TLMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLMessage73;\r\n            if (message != null)\r\n            {\r\n                var mediaGroup = message.Media as TLMessageMediaGroup;\r\n                if (mediaGroup != null)\r\n                {\r\n                    var source = e.OriginalSource as FrameworkElement;\r\n                    if (source != null)\r\n                    {\r\n                        var media = source.DataContext as TLMessageMediaBase;\r\n                        for (int i = 0; i < mediaGroup.Group.Count; i++)\r\n                        {\r\n                            var m = mediaGroup.Group[i] as TLMessage;\r\n                            if (m != null && m.Media == media)\r\n                            {\r\n                                return m;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private void Items_OnItemRealized(object sender, ItemRealizationEventArgs e)\r\n        {\r\n\r\n        }\r\n    }\r\n\r\n    public interface IDialogDetailsView\r\n    {\r\n        void ScrollTo(TLObject item);\r\n\r\n        void OpenBitmapCache();\r\n\r\n        void CloseBitmapCache();\r\n\r\n        void SetInlineBot(TLUserBase bot);\r\n\r\n        void MoveCurretToEnd();\r\n\r\n        bool IsScrollToBottomButtonVisible { get; }\r\n\r\n        void HideMentionButton();\r\n\r\n        void ShowMentionButton();\r\n\r\n        void HideScrollToBottomButton();\r\n\r\n        void ShowScrollToBottomButton();\r\n\r\n        void CreateBitmapCache(Action action);\r\n\r\n        void StopPlayersAndCreateBitmapCache(Action action);\r\n\r\n        void ResumeChatPlayers();\r\n\r\n        void PauseChatPlayers();\r\n\r\n        void StartChatPlayer(StartGifPlayerEventArgs args);\r\n    }\r\n\r\n    public class TLStickerItem : TLObject\r\n    {\r\n        public TLDocumentBase Document { get; set; }\r\n\r\n        public TLStickerItem Self\r\n        {\r\n            get { return this; }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"TLStickerItem document={0}\", Document);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP8/Views/Dialogs/DialogsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Dialogs.DialogsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:triggers=\"clr-namespace:Telegram.Controls.Triggers;assembly=Telegram.Controls\"\r\n    xmlns:telegramControls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <SolidColorBrush x:Key=\"PinnedBackgroundLight\" Color=\"#FFF3F4F5\"/>\r\n            <SolidColorBrush x:Key=\"PinnedBackgroundDark\" Color=\"#FF1F1F1F\"/>\r\n            <SolidColorBrush x:Key=\"PinnedBackground\" Color=\"Transparent\"/>\r\n\r\n            <DataTemplate x:Key=\"DialogFullHDTemplate\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"0,0,18,-12\" Height=\"92\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTapCommon\">\r\n                    <Grid.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </Grid.RenderTransform>\r\n\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Loaded=\"ContextMenu_OnLoaded\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [ClearHistory($DataContext)]\" Loaded=\"ClearHistory_OnLoaded\" Header=\"{Binding Resources.ClearHistory, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteDialog($DataContext)]\" Loaded=\"DeleteDialog_OnLoaded\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteAndStop($DataContext)]\" Loaded=\"DeleteAndStop_OnLoaded\" Header=\"{Binding Resources.DeleteAndStop, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteAndExit($DataContext)]\" Loaded=\"DeleteAndExit_OnLoaded\" Header=\"{Binding Resources.DeleteAndExit, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [PinToStart($DataContext)]\" Loaded=\"PinToStart_OnLoaded\"  Header=\"{Binding Resources.PinToStart, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <views:ConversationTileControl \r\n                        Margin=\"12,12,0,7\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                    <Grid Grid.Row=\"0\" Grid.Column=\"1\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Image Width=\"19\" Height=\"19\"\r\n                            Grid.Column=\"0\" \r\n                            Visibility=\"{Binding EncryptedChatVisibility}\"\r\n                            HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                            Margin=\"12,3,-6,5\"\r\n                            Source=\"/Images/W10M/ic_secretchat_2x.png\"/>\r\n\r\n                        <Grid Grid.Column=\"1\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <TextBlock\r\n                                navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                Margin=\"14,-2,0,-1\" FontSize=\"36.667\" MaxHeight=\"48.77\"\r\n                                Text=\"{Binding With, Converter={StaticResource DialogCaptionConverter}}\" \r\n                                Foreground=\"{Binding ForegroundBrush}\"\r\n                                Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n\r\n                            <Image \r\n                                Width=\"19\" Height=\"19\"\r\n                                Grid.Column=\"1\" \r\n                                Visibility=\"{Binding VerifiedVisibility}\"\r\n                                HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                                Margin=\"6,0,0,5\"\r\n                                Source=\"/Images/W10M/ic_verification_2x.png\" Stretch=\"UniformToFill\"/>\r\n                        </Grid>\r\n\r\n                        <telegramControls:MessageStatusControl Grid.Column=\"2\"\r\n                        Visibility=\"{Binding Self, Converter={StaticResource DialogToMessageStatusVisibilityConverter}, FallbackValue=Collapsed}\" \r\n                        VerticalAlignment=\"Bottom\" Height=\"18\" Margin=\"6,1,0,8\"/>\r\n\r\n                        <TextBlock Grid.Column=\"3\" Margin=\"6,0,0,4\" VerticalAlignment=\"Bottom\" FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\" LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\" Text=\"{Binding Self, Converter={StaticResource DraftDialogDateTimeConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"1\" Grid.Column=\"1\" VerticalAlignment=\"Top\" Margin=\"15,0,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <TextBlock Grid.Column=\"0\" Height=\"22\"\r\n                                Margin=\"0\"\r\n                                MaxWidth=\"150\"\r\n                                LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                                Text=\"{Binding Resources.Draft, Source={StaticResource Strings}, StringFormat='\\{0\\}: '}\"\r\n                                Foreground=\"{StaticResource TelegramBadgeAccentBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                Visibility=\"{Binding Self, Converter={StaticResource DraftToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"1\" Height=\"22\"\r\n                                Margin=\"0\"\r\n                                MaxWidth=\"150\" TextTrimming=\"WordEllipsis\"\r\n                                LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                                Text=\"{Binding Self, Converter={StaticResource DialogMessageFromConverter}}\"\r\n                                Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                Visibility=\"{Binding Self, Converter={StaticResource ShowFromVisibilityConverter}}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"2\" Height=\"22\"\r\n                                Margin=\"0\"\r\n                                LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                                Text=\"{Binding Self, Converter={StaticResource DialogToBriefInfo}}\"\r\n                                Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                TextWrapping=\"Wrap\"\r\n                                TextTrimming=\"WordEllipsis\"/>\r\n\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Margin=\"0,0,0,-6\" Background=\"{StaticResource PhoneBackgroundBrush}\" Visibility=\"{Binding Self.Typing, Converter={StaticResource ExistsToVisibilityConverter}}\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\">\r\n                            <StackPanel Orientation=\"Horizontal\">\r\n                                <telegramControls:TypingControl Height=\"22\" Typing=\"{Binding Self.Typing}\">\r\n                                    <telegramControls:TypingControl.RenderTransform>\r\n                                        <TranslateTransform Y=\"-2\"/>\r\n                                    </telegramControls:TypingControl.RenderTransform>\r\n                                </telegramControls:TypingControl>\r\n                                <TextBlock\r\n                                    VerticalAlignment=\"Top\"\r\n                                    Margin=\"6,0,0,0\"\r\n                                    LineStackingStrategy=\"BlockLineHeight\" LineHeight=\"22\"\r\n                                    Text=\"{Binding Self.Typing}\" TextWrapping=\"NoWrap\"\r\n                                    Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                                    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                    TextTrimming=\"WordEllipsis\"/>\r\n                            </StackPanel>\r\n                        </Border>\r\n\r\n                        <Border Grid.Column=\"3\" Margin=\"6,0,0,0\"\r\n                                Background=\"{Binding Self, Converter={StaticResource MessageForeground}, FallbackValue={StaticResource TelegramBadgeSubtleBrush}}\"\r\n                                Height=\"28\" MinWidth=\"28\" CornerRadius=\"14\"\r\n                                Visibility=\"{Binding UnreadCount, Converter={StaticResource UnreadCountToVisibilityConverter}}\" >\r\n                            <TextBlock Margin=\"7,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n                                Foreground=\"White\" \r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontWeight=\"SemiBold\"\r\n                                FontSize=\"18\"\r\n                                Text=\"{Binding UnreadCount}\">\r\n                            </TextBlock>\r\n                        </Border>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"DialogTemplate\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"18,24,20,0\" Height=\"72\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTapCommon\">\r\n                    <Grid.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </Grid.RenderTransform>\r\n                    <!--<Grid Grid.ColumnSpan=\"2\" Grid.RowSpan=\"2\" Margin=\"-18,-24,-18,-12\" Background=\"{StaticResource PinnedBackground}\" Visibility=\"{Binding IsPinned, Converter={StaticResource BooleanToVisibilityConverter}}\"/>-->\r\n\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Loaded=\"ContextMenu_OnLoaded\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [ChangeUnreadMark($DataContext)]\" Loaded=\"ChangeUnreadMark_OnLoaded\" Header=\"{Binding Resources.MarkUnread, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Group($DataContext)]\" Loaded=\"Group_OnLoaded\" Header=\"{Binding Resources.Group, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Pin($DataContext)]\" Loaded=\"Pin_OnLoaded\" Header=\"{Binding Resources.PinDialog, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [ClearHistory($DataContext)]\" Loaded=\"ClearHistory_OnLoaded\" Header=\"{Binding Resources.ClearHistory, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteDialog($DataContext)]\" Loaded=\"DeleteDialog_OnLoaded\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteAndStop($DataContext)]\" Loaded=\"DeleteAndStop_OnLoaded\" Header=\"{Binding Resources.DeleteAndStop, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteAndExit($DataContext)]\" Loaded=\"DeleteAndExit_OnLoaded\" Header=\"{Binding Resources.DeleteAndExit, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [PinToStart($DataContext)]\" Loaded=\"PinToStart_OnLoaded\" Header=\"{Binding Resources.PinToStart, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Object=\"{Binding With}\"\r\n                        Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                    <Grid Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"3,3,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Image Width=\"19\" Height=\"19\"\r\n                            Grid.Column=\"0\" \r\n                            Visibility=\"{Binding EncryptedChatVisibility}\"\r\n                            HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                            Margin=\"12,3,-6,5\"\r\n                            Source=\"/Images/W10M/ic_secretchat_2x.png\"/>\r\n\r\n                        <Grid Grid.Column=\"1\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <TextBlock\r\n                                navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                Margin=\"14,-2,0,-1\" FontSize=\"27\" MaxHeight=\"36\"\r\n                                Text=\"{Binding With, Converter={StaticResource DialogCaptionConverter}}\" \r\n                                Foreground=\"{Binding ForegroundBrush}\"\r\n                                Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n\r\n                            <Image \r\n                                Width=\"19\" Height=\"19\"\r\n                                Grid.Column=\"1\" \r\n                                Visibility=\"{Binding VerifiedVisibility}\"\r\n                                HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                                Margin=\"6,0,0,5\"\r\n                                Source=\"/Images/W10M/ic_verification_2x.png\" Stretch=\"UniformToFill\"/>\r\n                        </Grid>\r\n\r\n                        <telegramControls:MessageStatusControl Grid.Column=\"2\"\r\n                            Visibility=\"{Binding Self, Converter={StaticResource DialogToMessageStatusVisibilityConverter}, FallbackValue=Collapsed}\" \r\n                            VerticalAlignment=\"Bottom\" Height=\"18\" Margin=\"6,1,0,6\"/>\r\n\r\n                        <TextBlock Grid.Column=\"3\" Margin=\"6,0,0,1\" VerticalAlignment=\"Bottom\" FontSize=\"18\" Text=\"{Binding Self, Converter={StaticResource DraftDialogDateTimeConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"1\" Grid.Column=\"1\" VerticalAlignment=\"Top\" Margin=\"18,3,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <TextBlock Grid.Column=\"0\"\r\n                                Margin=\"0\"\r\n                                MaxWidth=\"150\"\r\n                                Text=\"{Binding Resources.Draft, Source={StaticResource Strings}, StringFormat='\\{0\\}: '}\"\r\n                                Foreground=\"{StaticResource TelegramBadgeAccentBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                Visibility=\"{Binding Self, Converter={StaticResource DraftToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"1\"\r\n                                Margin=\"0\"\r\n                                MaxWidth=\"150\" TextTrimming=\"WordEllipsis\"\r\n                                Text=\"{Binding Self, Converter={StaticResource DialogMessageFromConverter}}\"\r\n                                Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                Visibility=\"{Binding Self, Converter={StaticResource ShowFromVisibilityConverter}}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"2\"\r\n                                Margin=\"0\"\r\n                                Text=\"{Binding Self, Converter={StaticResource DialogToBriefInfo}}\"\r\n                                Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                TextWrapping=\"NoWrap\"\r\n                                TextTrimming=\"WordEllipsis\"/>\r\n\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Margin=\"0,0,0,-6\" Background=\"{StaticResource PhoneBackgroundBrush}\" Visibility=\"{Binding Self.Typing, Converter={StaticResource ExistsToVisibilityConverter}}\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\">\r\n                            <StackPanel Orientation=\"Horizontal\">\r\n                                <telegramControls:TypingControl Height=\"26\" Typing=\"{Binding Self.Typing}\">\r\n                                    <telegramControls:TypingControl.RenderTransform>\r\n                                        <TranslateTransform Y=\"-2\"/>\r\n                                    </telegramControls:TypingControl.RenderTransform>\r\n                                </telegramControls:TypingControl>\r\n                                <TextBlock\r\n                                    VerticalAlignment=\"Top\"\r\n                                    Margin=\"6,0,0,0\"\r\n                                    Text=\"{Binding Self.Typing}\" TextWrapping=\"NoWrap\"\r\n                                    Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                                    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                    TextTrimming=\"WordEllipsis\"/>\r\n                            </StackPanel>\r\n                        </Border>\r\n\r\n                        <dialogs:UnreadCounter\r\n                            Grid.Column=\"4\"\r\n                            Count=\"{Binding UnreadCount.Value}\"\r\n                            MentionsCount=\"{Binding UnreadMentionsCount.Value}\"\r\n                            Pinned=\"{Binding IsPinned}\"\r\n                            UnreadMark=\"{Binding UnreadMark}\"\r\n                            Brush=\"{Binding Self, Converter={StaticResource MessageForeground}, FallbackValue={StaticResource TelegramBadgeSubtleBrush}}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" Margin=\"-12,0,-14,0\">\r\n        <longListSelector:LongListSelector \r\n            x:Name=\"Items\"\r\n            IsFlatList=\"True\"\r\n            ItemsSource=\"{Binding FilteredItems}\"\r\n            ItemTemplate=\"{StaticResource DialogTemplate}\"\r\n            CloseToEndPercent=\"0.1\"\r\n            Margin=\"0,0,4,0\"\r\n            Background=\"Transparent\"\r\n            micro:Message.Attach=\"[Event CloseToEnd] = [Action LoadNextSlice]; [Event StretchingBottom] = [Action LoadNextSlice]\">\r\n            <longListSelector:LongListSelector.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                </ItemsPanelTemplate>\r\n            </longListSelector:LongListSelector.ItemsPanel>\r\n        </longListSelector:LongListSelector>\r\n\r\n        <TextBlock Margin=\"18,12,6,0\" Text=\"{Binding Status}\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP8/Views/Dialogs/DialogsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Interactivity;\r\nusing System.Windows.Media;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing Telegram.Controls.Triggers;\r\nusing Telegram.Controls.VirtualizedView;\r\nusing Telegram.EmojiPanel.Controls.Utilites;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class DialogsView\r\n    {\r\n        public DialogsViewModel ViewModel\r\n        {\r\n            get { return (DialogsViewModel)DataContext; }\r\n        }\r\n\r\n        public DialogsView()\r\n        {\r\n            App.Log(\"start DialogsView.ctor\");\r\n\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            ((SolidColorBrush)Resources[\"PinnedBackground\"]).Color = isLightTheme\r\n                ? ((SolidColorBrush)Resources[\"PinnedBackgroundLight\"]).Color\r\n                : ((SolidColorBrush)Resources[\"PinnedBackgroundDark\"]).Color;\r\n\r\n            //VirtPanel.InitializeWithScrollViewer(CSV);\r\n            //VirtPanel.CreateFunc = o =>\r\n            //{\r\n            //    return new DialogItem(o as TLDialogBase, 480.0, Resources[\"DialogTemplate\"] as DataTemplate);\r\n            //};\r\n\r\n            App.Log(\"stop DialogsView.ctor\");\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ((DialogsViewModel)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        public FrameworkElement TapedItem;\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            TapedItem = (FrameworkElement)sender;\r\n\r\n            var tapedItemContainer = TapedItem.FindParentOfType<ListBoxItem>();\r\n\r\n            var result = ViewModel.OpenDialogDetails(TapedItem.DataContext as TLDialogBase);\r\n            if (result)\r\n            {\r\n                ShellView.StartContinuumForwardOutAnimation(TapedItem, tapedItemContainer);\r\n            }\r\n        }\r\n\r\n        private void MainItemGrid_OnDoubleTap(object sender, GestureEventArgs gestureEventArgs)\r\n        {\r\n            TapedItem = (FrameworkElement)sender;\r\n\r\n            var tapedItemContainer = TapedItem.FindParentOfType<ListBoxItem>();\r\n\r\n            var result = ViewModel.OpenFastDialogDetails(TapedItem.DataContext as TLDialogBase);\r\n            //if (result)\r\n            //{\r\n            //    ShellView.StartContinuumForwardOutAnimation(TapedItem, tapedItemContainer);\r\n\r\n            //            }\r\n        }\r\n\r\n        private void DeleteAndStop_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            var dialog = menuItem.DataContext as TLDialogBase;\r\n            if (dialog == null) return;\r\n\r\n            var user = dialog.With as TLUser;\r\n\r\n            menuItem.Visibility = user != null && user.IsBot && (user.Blocked == null || !user.Blocked.Value)\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n        }\r\n\r\n        private void ClearHistory_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            var dialog = menuItem.DataContext as TLDialogBase;\r\n            if (dialog == null) return;\r\n\r\n            var channel = dialog.With as TLChannel;\r\n\r\n            menuItem.Visibility = channel != null && (!channel.IsMegaGroup || !TLString.IsNullOrEmpty(channel.UserName))\r\n                ? Visibility.Collapsed\r\n                : Visibility.Visible;\r\n        }\r\n\r\n        private void Pin_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            var dialog = menuItem.DataContext as TLDialog53;\r\n            if (dialog == null)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var dialog71 = menuItem.DataContext as TLDialog71;\r\n            if (dialog71 != null && dialog71.IsPromo)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var messageService = dialog.TopMessage as TLMessageService;\r\n            if (messageService != null && messageService.Action is TLMessageActionContactRegistered)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var isPinned = dialog.IsPinned;\r\n            if (!isPinned)\r\n            {\r\n                var config = IoC.Get<ICacheService>().GetConfig() as TLConfig61;\r\n                if (config != null)\r\n                {\r\n                    var pinnedCount = ViewModel.Items.Count(x => x.IsPinned);\r\n                    if (pinnedCount >= config.PinnedDialogsCountMax.Value)\r\n                    {\r\n                        menuItem.Visibility = Visibility.Collapsed;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (isPinned)\r\n            {\r\n                menuItem.Header = AppResources.UnpinDialog;\r\n            }\r\n            else\r\n            {\r\n                menuItem.Header = AppResources.PinDialog;\r\n            }\r\n        }\r\n\r\n        private void Group_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            menuItem.Visibility = Visibility.Collapsed;\r\n            return;\r\n\r\n            var dialog = menuItem.DataContext as TLDialog;\r\n            if (dialog == null)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var dialog71 = menuItem.DataContext as TLDialog71;\r\n            if (dialog71 == null && dialog71.IsPromo)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var channel = dialog.With as TLChannel76;\r\n            if (channel == null)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            menuItem.Header = channel.FeedId != null ? AppResources.Ungroup : AppResources.Group;\r\n        }\r\n\r\n        private void ChangeUnreadMark_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            var dialog = menuItem.DataContext as TLDialog71;\r\n            if (dialog == null)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            menuItem.Header =\r\n                dialog.UnreadMark\r\n                || dialog.UnreadCount != null && dialog.UnreadCount.Value > 0\r\n                || dialog.UnreadMentionsCount != null && dialog.UnreadMentionsCount.Value > 0 ?\r\n                AppResources.MarkRead :\r\n                AppResources.MarkUnread;\r\n        }\r\n\r\n        private void PinToStart_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            var dialog = menuItem.DataContext as TLDialogBase;\r\n            if (dialog == null) return;\r\n\r\n            var tileNavigationParam = DialogsViewModel.GetTileNavigationParam(dialog);\r\n            if (tileNavigationParam == null)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var tileExists = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains(tileNavigationParam)) != null;\r\n            if (tileExists)\r\n            {\r\n                menuItem.Header = AppResources.UnpinFromStart;\r\n            }\r\n            else\r\n            {\r\n                menuItem.Header = AppResources.PinToStart;\r\n            }\r\n        }\r\n\r\n        private void ContextMenu_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var contextMenu = sender as ContextMenu;\r\n            if (contextMenu == null) return;\r\n\r\n            var dialog = contextMenu.DataContext as TLDialogBase;\r\n            if (dialog == null) return;\r\n\r\n            //var channel = dialog.With as TLChannel;\r\n\r\n            //contextMenu.Visibility = channel != null && !channel.IsMegaGroup\r\n            //    ? Visibility.Collapsed\r\n            //    : Visibility.Visible;\r\n        }\r\n\r\n        private void DeleteDialog_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            menuItem.Visibility = Visibility.Collapsed;\r\n\r\n            var dialog = menuItem.DataContext as TLDialogBase;\r\n            if (dialog == null) return;\r\n\r\n            var dialog71 = menuItem.DataContext as TLDialog71;\r\n            if (dialog71 != null && dialog71.IsPromo) return;\r\n\r\n            var peerChannel = dialog.Peer as TLPeerChannel;\r\n            if (peerChannel != null)\r\n            {\r\n                var channel = dialog.With as TLChannel49;\r\n                if (channel != null)\r\n                {\r\n                    menuItem.Header = channel.IsMegaGroup ? AppResources.LeaveGroup : AppResources.LeaveChannel;\r\n                }\r\n\r\n                menuItem.Visibility = Visibility.Visible;\r\n                return;\r\n            }\r\n\r\n            var peerUser = dialog.Peer as TLPeerUser;\r\n            if (peerUser != null)\r\n            {\r\n                menuItem.Visibility = Visibility.Visible;\r\n                return;\r\n            }\r\n\r\n            var peerChat = dialog.Peer as TLPeerChat;\r\n            if (peerChat != null)\r\n            {\r\n                var isVisible = dialog.With is TLChatForbidden || dialog.With is TLChatEmpty;\r\n\r\n                menuItem.Visibility = isVisible ? Visibility.Visible : Visibility.Collapsed;\r\n                return;\r\n            }\r\n        }\r\n\r\n        private void DeleteAndExit_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            menuItem.Visibility = Visibility.Collapsed;\r\n\r\n            var dialog = menuItem.DataContext as TLDialogBase;\r\n            if (dialog == null) return;\r\n\r\n            var peerChat = dialog.Peer as TLPeerChat;\r\n            if (peerChat != null)\r\n            {\r\n                menuItem.Visibility = Visibility.Visible;\r\n                return;\r\n            }\r\n\r\n            //var peerChannel = dialog.Peer as TLPeerChannel;\r\n            //if (peerChannel != null)\r\n            //{\r\n            //    var channel = dialog.With as TLChannel;\r\n            //    menuItem.Visibility = channel != null && channel.IsMegaGroup ? Visibility.Visible : Visibility.Collapsed;\r\n            //    return;\r\n            //}\r\n\r\n            var peerEncryptedChat = dialog.Peer as TLPeerEncryptedChat;\r\n            if (peerEncryptedChat != null)\r\n            {\r\n                menuItem.Header = AppResources.DeleteChat;\r\n                menuItem.Visibility = Visibility.Visible;\r\n                return;\r\n            }\r\n\r\n            var peerBroadcast = dialog.Peer as TLPeerBroadcast;\r\n            if (peerBroadcast != null)\r\n            {\r\n                menuItem.Visibility = Visibility.Visible;\r\n                return;\r\n            }\r\n        }\r\n\r\n        private void MainItemGrid_OnTapCommon(object sender, GestureEventArgs e)\r\n        {\r\n            if (!ViewModel.TestMode)\r\n            {\r\n                MainItemGrid_OnTap(sender, e);\r\n            }\r\n            else\r\n            {\r\n                //Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                //{\r\n                MainItemGrid_OnDoubleTap(sender, e);\r\n                //});\r\n            }\r\n        }\r\n\r\n        private DateTime? _lastInvokeTime;\r\n\r\n        private void Items_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            //if (_lastInvokeTime != null && _lastInvokeTime.Value.AddSeconds(10.0) > DateTime.Now) return;\r\n\r\n            //_lastInvokeTime = DateTime.Now;\r\n            //ViewModel.LoadNextSlice();\r\n            this.Focus();\r\n        }\r\n\r\n        private void FrameworkElement_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = (FrameworkElement)sender;\r\n            MessageBox.Show(\"4 \" + element.ActualHeight.ToString());\r\n        }\r\n\r\n        private bool _once = true;\r\n\r\n        private void Items_OnManipulationStarted(object sender, ScrollingStateChangedEventArgs args)\r\n        {\r\n            if (!_once) return;\r\n            if (!args.NewValue) return;\r\n\r\n            _once = false;\r\n            ViewModel.LoadNextSlice();\r\n        }\r\n    }\r\n\r\n    public class DialogItem : VListItemBase\r\n    {\r\n        public DialogItem(TLDialogBase dialog, double panelWidth, DataTemplate template)\r\n        {\r\n            _fixedHeight = 96.0;\r\n\r\n            var contentControl = new ContentControl { Width = panelWidth, Content = dialog, HorizontalContentAlignment = HorizontalAlignment.Stretch, ContentTemplate = template };\r\n\r\n            //var binding = new Binding\r\n            //{\r\n            //    Mode = BindingMode.OneWay,\r\n            //    Path = new PropertyPath(\"LineOne\"),\r\n            //    //Converter = new DefaultPhotoConverter(),\r\n            //    //ConverterParameter = StickerHeight\r\n            //};\r\n            //var panelMargin = new Thickness(0.0, 0.0, 0.0, 17.0);\r\n            //var panelActualWidth = panelWidth - panelMargin.Left - panelMargin.Right;\r\n            //var stackPanel = new StackPanel{ Width = panelActualWidth, Margin = panelMargin, Background = new SolidColorBrush(Colors.Transparent) };\r\n            //var firstTextBlock = new TextBlock {TextWrapping = TextWrapping.Wrap, Text = item.LineOne, Style = Application.Current.Resources[\"PhoneTextExtraLargeStyle\"] as Style };\r\n            //firstTextBlock.SetBinding(TextBlock.TextProperty, binding);\r\n            //var secondTextBlock = new TextBlock\r\n            //{\r\n            //    TextWrapping = TextWrapping.Wrap,\r\n            //    Text = item.LineTwo,\r\n            //    Margin = new Thickness(12.0, -6.0, 12.0, 0.0),\r\n            //    Style = Application.Current.Resources[\"PhoneTextSubtleStyle\"] as Style\r\n            //};\r\n            //stackPanel.Children.Add(firstTextBlock);\r\n            //stackPanel.Children.Add(secondTextBlock);\r\n            var listBoxItem = new ListBoxItem { Content = contentControl, DataContext = dialog };\r\n            //listBoxItem.Tap += Item_OnTap;\r\n\r\n            Children.Add(listBoxItem);\r\n\r\n            View.Width = panelWidth;\r\n        }\r\n\r\n        private double _fixedHeight;\r\n\r\n        public override double FixedHeight\r\n        {\r\n            get { return _fixedHeight; }\r\n            set { _fixedHeight = value; }\r\n        }\r\n    }\r\n\r\n    public class CheckDialogTypeConverter : IValueConverter\r\n    {\r\n        public string Type { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value == null || value.GetType() != typeof(DialogsViewModel))\r\n            {\r\n                return value;\r\n            }\r\n\r\n            return DependencyProperty.UnsetValue;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP8/Views/Dialogs/SecretDialogDetailsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Dialogs.SecretDialogDetailsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:client=\"clr-namespace:TelegramClient\"\r\n    xmlns:selector=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:controls2=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"SelfView\"\r\n    CacheMode=\"BitmapCache\"\r\n    IsScreenCaptureEnabled=\"False\"\r\n    BackKeyPress=\"SecretDialogDetailsView_OnBackKeyPress\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls2:TelegramTransitionService.NavigationOutTransition>\r\n        <controls2:TelegramNavigationOutTransition>\r\n            <controls2:TelegramNavigationOutTransition.Forward>\r\n                <controls2:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls2:TelegramNavigationOutTransition.Forward>\r\n        </controls2:TelegramNavigationOutTransition>\r\n    </controls2:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <Storyboard x:Name=\"CloseCacheStoryboard\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"MessagesList\" Storyboard.TargetProperty=\"Opacity\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.0\" Value=\"0\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"1\">\r\n                    <!--<EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase Exponent=\"5\" EasingMode=\"EaseOut\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>-->\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"MessagesCache\" Storyboard.TargetProperty=\"Opacity\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.0\" Value=\"1\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.25\" Value=\"0\">\r\n                    <!--<EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase Exponent=\"5\" EasingMode=\"EaseOut\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>-->\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"MessagesCache\" Storyboard.TargetProperty=\"Visibility\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0:0:0.25\" Value=\"Collapsed\"/>\r\n            </ObjectAnimationUsingKeyFrames>\r\n            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Items\" Storyboard.TargetProperty=\"Visibility\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\" Value=\"Visible\"/>\r\n            </ObjectAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Items\" Storyboard.TargetProperty=\"IsHitTestVisible\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\" Value=\"True\"/>\r\n            </ObjectAnimationUsingKeyFrames>-->\r\n        </Storyboard>\r\n    </views:TelegramViewBase.Resources>\r\n    <Grid>\r\n        <ContentControl \r\n            HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" \r\n            HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"  \r\n            Content=\"{Binding StateService}\" \r\n            ContentTemplate=\"{Binding StateService.CurrentBackground, Converter={StaticResource DialogDetailsBackgroundConverter}}\"/>\r\n\r\n        <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Grid.RenderTransform>\r\n            <Grid.Projection>\r\n                <PlaneProjection CenterOfRotationX=\"0\"/>\r\n            </Grid.Projection>\r\n\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"*\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <Grid x:Name=\"Description\" VerticalAlignment=\"Center\" Margin=\"90,-35,90,0\"\r\n                    Visibility=\"{Binding DescriptionVisibility}\">\r\n                    <Border Margin=\"-12\" Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.3\"/>\r\n                    <StackPanel VerticalAlignment=\"Top\" HorizontalAlignment=\"Stretch\">\r\n                        <TextBlock Text=\"{Binding Status}\" TextAlignment=\"Center\" TextWrapping=\"Wrap\"/>\r\n                        <TextBlock Text=\"{Binding Resources.SecretChatsDescription, Source={StaticResource Strings}}\" Margin=\"0,16,0,0\" TextAlignment=\"Left\" TextWrapping=\"Wrap\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n\r\n                <client:LongListSelectorEx\r\n                    x:Name=\"MessagesList\"\r\n                    Margin=\"0,-7,0,0\"\r\n                    Knob=\"15\"\r\n                    ItemsSource=\"{Binding Items}\"\r\n                    IsSelectionEnabled=\"{Binding IsSelectionEnabled}\"\r\n                    IsGroupingEnabled=\"False\"\r\n                    micro:Message.Attach=\"[Event CloseToEnd] = [Action LoadNextSlice]\"\r\n                    ManipulationStarted=\"Items_OnManipulationStarted\"\r\n                    ManipulationStateChanged=\"Items_OnManipulationStateChanged\"\r\n                    Begin=\"Items_OnBegin\"\r\n                    Style=\"{StaticResource LazyLongListSelectorStyle}\">\r\n                    <phone:LongListSelector.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <Grid>\r\n                                <controls1:DecryptedMessageControl \r\n                                    Margin=\"0,0,48,0\"\r\n                                    HorizontalAlignment=\"Stretch\" \r\n                                    Message=\"{Binding}\"\r\n                                    TapViaBot=\"ViaBot_Tap\"\r\n                                    TapMorePanel=\"MorePanel_OnTap\"\r\n                                    TapMedia=\"MessageControl_OnTapMedia\"\r\n                                    StartTimer=\"SecretPhotoPlaceholder_OnStartTimer\" \r\n                                    Elapsed=\"SecretPhotoPlaceholder_OnElapsed\"\r\n                                    Hold=\"MessageControl_OnHold\"\r\n                                    ManipulationStarted=\"MessageControl_OnManipulationStarted\"\r\n                                    ManipulationDelta=\"MessageControl_OnManipulationDelta\"\r\n                                    ManipulationCompleted=\"MessageControl_OnManipulationCompleted\">\r\n                                    <UIElement.Projection>\r\n                                        <PlaneProjection RotationZ=\"180\"/>\r\n                                    </UIElement.Projection>\r\n\r\n                                    <toolkit:ContextMenuService.ContextMenu>\r\n                                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" Loaded=\"ContextMenu_OnLoaded\" Opened=\"ContextMenu_OnOpened\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=MessagesList}\">\r\n                                            <toolkit:MenuItem Click=\"SelectMessages_OnClick\" Header=\"{Binding Resources.Select, Source={StaticResource Strings}}\" />\r\n                                            <toolkit:MenuItem Loaded=\"ResendMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action Resend($DataContext)]\" Header=\"{Binding Resources.Retry, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"ReplyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action ReplyMessage($DataContext)]\" Header=\"{Binding Resources.Reply, Source={StaticResource Strings}}\" />\r\n                                            <toolkit:MenuItem Loaded=\"DeleteMessage_OnLoaded\" Click=\"DeleteMessage_OnClick\"  Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />\r\n                                            <toolkit:MenuItem Loaded=\"CopyMessage_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action CopyMessage($DataContext)]\" Header=\"{Binding Resources.Copy, Source={StaticResource Strings}}\"/>\r\n                                            <toolkit:MenuItem Loaded=\"AddToStickers_OnLoaded\" micro:Message.Attach=\"[Event Click] = [Action AddToStickers($DataContext)]\" Header=\"{Binding Resources.AddToStickers, Source={StaticResource Strings}}\"/>\r\n                                        </toolkit:ContextMenu>\r\n                                    </toolkit:ContextMenuService.ContextMenu>\r\n                                </controls1:DecryptedMessageControl>\r\n\r\n                                <Grid Visibility=\"{Binding SelectionVisibility, FallbackValue=Collapsed}\">\r\n                                    <Border x:Name=\"SelectionBorder\" \r\n                                        Background=\"Transparent\" \r\n                                        Hold=\"UIElement_OnHold\" \r\n                                        Tap=\"SelectionBorder_OnTap\" \r\n                                        Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=SelfView, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n                                    <CheckBox Margin=\"-12,-20,6,-20\" IsChecked=\"{Binding IsSelected, Mode=TwoWay}\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\">\r\n                                        <CheckBox.RenderTransform>\r\n                                            <TranslateTransform X=\"2\"/>\r\n                                        </CheckBox.RenderTransform>\r\n                                        <CheckBox.Projection>\r\n                                            <PlaneProjection RotationZ=\"180\"/>\r\n                                        </CheckBox.Projection>\r\n                                    </CheckBox>\r\n                                </Grid>\r\n\r\n                                <Border \r\n                                    Background=\"{StaticResource TelegramBadgeAccentBrush}\" \r\n                                    Width=\"6\" \r\n                                    HorizontalAlignment=\"Right\" \r\n                                    Margin=\"0,6,48,6\"\r\n                                    Visibility=\"Collapsed\"\r\n                                    dialogs:DialogDetailsView.AnimatedVisibility=\"{Binding IsHighlighted}\"/>\r\n                            </Grid>\r\n                        </DataTemplate>\r\n                    </phone:LongListSelector.ItemTemplate>\r\n                    <phone:LongListSelector.ListHeader>\r\n                        <Border Background=\"Transparent\" Height=\"2\"/>\r\n                    </phone:LongListSelector.ListHeader>\r\n                    <phone:LongListSelector.Projection>\r\n                        <PlaneProjection RotationZ=\"180\"/>\r\n                    </phone:LongListSelector.Projection>\r\n                </client:LongListSelectorEx>\r\n                <Image x:Name=\"MessagesCache\" Source=\"{Binding Chat.Bitmap}\" Margin=\"0,-7,0,0\" VerticalAlignment=\"Bottom\">\r\n                    <Image.Projection>\r\n                        <PlaneProjection RotationZ=\"180\"/>\r\n                    </Image.Projection>\r\n                </Image>\r\n\r\n                <Grid x:Name=\"ScrollButton\" Margin=\"0,0,6,6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\" Visibility=\"Collapsed\">\r\n                    <Grid.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </Grid.RenderTransform>\r\n                    <Button Style=\"{StaticResource ScrollButtonStyle}\" Click=\"ScrollButton_OnClick\" toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                        <Path HorizontalAlignment=\"Center\"\r\n                            VerticalAlignment=\"Center\" \r\n                            Data=\"F1 M-14,0 L0,13 L14,0\" \r\n                            Width=\"28\" Height=\"13\" \r\n                            Stretch=\"Fill\" \r\n                            StrokeThickness=\"1\" \r\n                            Stroke=\"#FF8D969F\">\r\n                        </Path>\r\n                    </Button>\r\n                </Grid>\r\n\r\n                <!--<ContentControl x:Name=\"Player\" Grid.Row=\"1\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" Margin=\"0,-6,0,0\"/>-->\r\n\r\n                <Grid Visibility=\"{Binding IsAppBarCommandVisible, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\">\r\n                    <!-- Stickers -->\r\n                    <ContentControl x:Name=\"StickerHints\" \r\n                                VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" \r\n                                HorizontalContentAlignment=\"Stretch\" \r\n                                Margin=\"0,-38,0,0\" MaxHeight=\"124\"\r\n                                Tap=\"StickerHints_OnTap\"\r\n                                ManipulationStarted=\"StickerHints_OnManipulationStarted\"/>\r\n\r\n                    <!-- Inline bots -->\r\n                    <ContentControl x:Name=\"InlineBotResults\" \r\n                                VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" \r\n                                HorizontalContentAlignment=\"Stretch\" \r\n                                Margin=\"0,-38,0,0\" MaxHeight=\"241\"\r\n                                Tap=\"InlineBotResults_OnTap\"\r\n                                ManipulationStarted=\"InlineBotResults_OnManipulationStarted\"/>\r\n                </Grid>\r\n\r\n                <controls1:InputBox Grid.Row=\"2\"\r\n                    x:Name=\"InputMessage\"\r\n                    Text=\"{Binding Text, Mode=TwoWay}\"\r\n                    InlineWatermark=\"{Binding BotInlinePlaceholder}\"\r\n                    TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"                        \r\n                    MuteButtonImageSource=\"\"\r\n                    ForwardButtonVisibility=\"Collapsed\"\r\n                            \r\n                    Command=\"{Binding AppBarCommandString}\"\r\n                    IsAppBarCommandVisible=\"{Binding IsAppBarCommandVisible, FallbackValue=false}\"\r\n                    AppBarCommandClick=\"InputMessage_OnAppBarCommandClick\"\r\n                            \r\n                    Reply=\"{Binding Reply}\"\r\n                    ReplyTemplate=\"{Binding ReplyInfo, Converter={StaticResource DecryptedReplyTemplateSelector}}\"\r\n                    OpenReplyButtonClick=\"InputMessage_OnOpenReplyButtonClick\"\r\n                    DeleteReplyButtonClick=\"InputMessage_OnDeleteReplyButtonClick\"\r\n                            \r\n                    EmojiButtonClick=\"InputMessage_OnEmojiClick\"\r\n                    KeyboardButtonClick=\"InputMessage_OnKeyboardButtonClick\"\r\n                    MuteButtonClick=\"InputMessage_OnMuteButtonClick\"\r\n                    AttachButtonClick=\"InputMessage_OnAttachClick\"\r\n                    SendButtonClick=\"InputMessage_OnSendClick\"\r\n                            \r\n                    CancelSelectionButtonClick=\"InputMessage_OnCancelSelectionButtonClick\"\r\n                    ForwardButtonClick=\"InputMessage_OnForwardButtonClick\"\r\n                    DeleteButtonClick=\"InputMessage_OnDeleteButtonClick\"\r\n                            \r\n                    InputGotFocus=\"InputMessage_OnGotFocus\"\r\n                    InputLostFocus=\"InputMessage_OnLostFocus\"\r\n                    InputKeyDown=\"InputMessage_OnKeyDown\"\r\n                    InputTextChanged=\"InputMessage_OnTextChanged\">\r\n                    <controls1:InputBox.RenderTransform>\r\n                        <TranslateTransform Y=\"0\"/>\r\n                    </controls1:InputBox.RenderTransform>\r\n                </controls1:InputBox>\r\n            </Grid>\r\n\r\n            <ContentControl x:Name=\"SecretChatDebug\" Grid.Row=\"1\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" Margin=\"0,-6,0,0\"\r\n                Visibility=\"{Binding Converter={StaticResource DebugVisibilityConverter}}\"/>\r\n\r\n            <Border x:Name=\"CaptionBorder\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n            <Grid x:Name=\"CaptionGrid\" Grid.Row=\"0\" Grid.Column=\"0\" VerticalAlignment=\"Top\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <views:ConversationTileControl x:Name=\"DialogPhoto\" Size=\"54\" Tap=\"OpenPeerDetails_OnTap\"\r\n                    Margin=\"18,36,6,0\" Grid.Row=\"0\" Grid.Column=\"0\" VerticalAlignment=\"Top\"\r\n                    Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                    Fill=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                    Text=\"{Binding With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                <Button Tap=\"OpenPeerDetails_OnTap\"\r\n                     x:Name=\"Caption\"\r\n                    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n                    Margin=\"-4,18,0,12\" Grid.Row=\"0\" Grid.Column=\"1\" VerticalAlignment=\"Bottom\" Style=\"{StaticResource DialogDetailsCaptionButtonStyle}\">\r\n                    <Button.RenderTransform>\r\n                        <TranslateTransform/>\r\n                    </Button.RenderTransform>\r\n                    <StackPanel>\r\n                        <Grid x:Name=\"Title\">\r\n                            <Grid.RenderTransform>\r\n                                <CompositeTransform/>\r\n                            </Grid.RenderTransform>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Border Grid.Column=\"0\"\r\n                                    Background=\"White\"\r\n                                    Height=\"16\" Width=\"16\"\r\n                                    HorizontalAlignment=\"Right\" \r\n                                    VerticalAlignment=\"Bottom\"\r\n                                    Margin=\"6,0,0,6\">\r\n                                <Border.OpacityMask>\r\n                                    <ImageBrush ImageSource=\"/Images/W10M/ic_secretchat_2x.png\" Stretch=\"Uniform\"/>\r\n                                </Border.OpacityMask>\r\n                            </Border>\r\n                            <TextBlock Grid.Column=\"1\" HorizontalAlignment=\"Left\" Text=\"{Binding With.FullName, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n                        </Grid>\r\n                        <StackPanel Margin=\"0,-4,0,0\" Orientation=\"Horizontal\">\r\n                            <controls1:TypingControl Margin=\"6,0,0,0\" Height=\"26\" Typing=\"{Binding Typing}\" Visibility=\"{Binding Typing, Converter={StaticResource ExistsToVisibilityConverter}}\">\r\n                                <controls1:TypingControl.RenderTransform>\r\n                                    <TranslateTransform Y=\"1\"/>\r\n                                </controls1:TypingControl.RenderTransform>\r\n                            </controls1:TypingControl>\r\n                            <TextBlock Text=\"{Binding Subtitle}\" Margin=\"6,0,0,0\" Foreground=\"White\" Opacity=\"0.5\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </StackPanel>\r\n                        <TextBlock x:Name=\"Debug\" Margin=\"6,-4,0,0\" Foreground=\"GreenYellow\" Visibility=\"Collapsed\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </StackPanel>\r\n                </Button>\r\n                <Image x:Name=\"ContextMenuIcon\" Source=\"/Images/W10M/ic_more_2x.png\" Grid.Row=\"0\" Grid.Column=\"2\" Width=\"32\" Height=\"32\" Margin=\"18,51,18,21\" VerticalAlignment=\"Top\" Hold=\"ContextMenu_OnHold\" Tap=\"ContextMenu_OnTap\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu x:Name=\"ContextMenu\" HorizontalAlignment=\"Right\" Margin=\"18,10\" Style=\"{StaticResource W10MContextMenuStyle}\" Opened=\"ContextMenu_OnOpened\"/>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n                </Image>\r\n            </Grid>\r\n\r\n            <ContentControl Grid.RowSpan=\"2\" x:Name=\"ChooseAttachment\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"/>\r\n        </Grid>\r\n\r\n        <ContentControl x:Name=\"MultiImageEditor\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n        <ContentControl x:Name=\"ImageViewer\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n\r\n        <ContentControl x:Name=\"LocationPicker\"\r\n                        VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n                        VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP8/Views/Dialogs/SecretDialogDetailsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Devices;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing Telegram.EmojiPanel;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Additional;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Media;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\nusing StickerSelectedEventArgs = Telegram.EmojiPanel.Controls.Emoji.StickerSelectedEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class SecretDialogDetailsView : IDialogDetailsView\r\n    {\r\n        public SecretDialogDetailsViewModel ViewModel\r\n        {\r\n            get { return DataContext as SecretDialogDetailsViewModel; }\r\n        }\r\n\r\n        public void MoveCurretToEnd()\r\n        {\r\n            if (FocusManager.GetFocusedElement() != InputMessage) return;\r\n\r\n            InputMessage.SelectionStart = InputMessage.Text.Length;\r\n            InputMessage.SelectionLength = 0;\r\n        }\r\n\r\n        private readonly Stopwatch _timer;\r\n\r\n        #region ApplicationBar\r\n\r\n        private bool _firstRun = true;\r\n\r\n        private readonly MenuItem _callButton = new MenuItem\r\n        {\r\n            Header = AppResources.Call\r\n        };\r\n\r\n        private readonly MenuItem _manageButton = new MenuItem\r\n        {\r\n            Header = AppResources.Select\r\n        };\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (!_firstRun) return;\r\n            _firstRun = false;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Opacity = 0.99;\r\n\r\n            ContextMenu.Items.Add(_callButton);\r\n            ContextMenu.Items.Add(_manageButton);\r\n\r\n            ApplicationBar.IsVisible = false; //ViewModel.IsApplicationBarVisible && !ViewModel.IsChooseAttachmentOpen;\r\n        }\r\n        #endregion\r\n\r\n        private EmojiControl _emojiKeyboard;\r\n\r\n        private TranslateTransform _frameTransform;\r\n\r\n        public static readonly DependencyProperty RootFrameTransformProperty = DependencyProperty.Register(\r\n            \"RootFrameTransformProperty\", typeof(double), typeof(SecretDialogDetailsView), new PropertyMetadata(OnRootFrameTransformChanged));\r\n\r\n        private static void OnRootFrameTransformChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var view = d as SecretDialogDetailsView;\r\n            if (view != null)\r\n            {\r\n                view._frameTransform.Y = 0;\r\n            }\r\n        }\r\n\r\n        public double RootFrameTransform\r\n        {\r\n            get { return (double)GetValue(RootFrameTransformProperty); }\r\n            set { SetValue(RootFrameTransformProperty, value); }\r\n        }\r\n\r\n        private void SetRootFrameBinding()\r\n        {\r\n            var frame = (Frame)Application.Current.RootVisual;\r\n            _frameTransform = ((TranslateTransform)((TransformGroup)frame.RenderTransform).Children[0]);\r\n            var binding = new Binding(\"Y\")\r\n            {\r\n                Source = _frameTransform\r\n            };\r\n            SetBinding(RootFrameTransformProperty, binding);\r\n        }\r\n\r\n        private void RemoveRootFrameBinding()\r\n        {\r\n            ClearValue(RootFrameTransformProperty);\r\n        }\r\n\r\n        private void CloseEmojiPlaceholder()\r\n        {\r\n            InputMessage.ClosePlaceholder();\r\n\r\n            if (_emojiKeyboard != null)\r\n            {\r\n                _emojiKeyboard.ClosePreview();\r\n                _emojiKeyboard.ReloadStickerSprites();\r\n            }\r\n        }\r\n\r\n        private void OpenCommandsPlaceholder()\r\n        {\r\n\r\n        }\r\n\r\n        private void CloseCommandsPlaceholder()\r\n        {\r\n\r\n        }\r\n\r\n        private TLAllStickers _allStickers;\r\n\r\n        private object _previousFocusedElement;\r\n\r\n        private object _focusedElement;\r\n\r\n        public SecretDialogDetailsView()\r\n        {\r\n            _timer = System.Diagnostics.Stopwatch.StartNew();\r\n\r\n            InitializeComponent();\r\n\r\n            CaptionBorder.Background = ShellView.CaptionBrush;\r\n\r\n            //Full HD\r\n            OptimizeFullHD();\r\n\r\n            _callButton.Click += (sender, args) => ViewModel.Call();\r\n            _manageButton.Click += (sender, args) => ViewModel.IsSelectionEnabled = true;\r\n            GotFocus += (sender, args) =>\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(args.OriginalSource);\r\n                _previousFocusedElement = _focusedElement;\r\n                _focusedElement = args.OriginalSource;\r\n            };\r\n\r\n            Loaded += InitializeMTProtoService;\r\n\r\n            Loaded += OnLoaded;\r\n            Unloaded += OnUnloaded;\r\n        }\r\n\r\n        private void InitializeMTProtoService(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= InitializeMTProtoService;\r\n\r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n            mtProtoService.StartInitialize(); \r\n        }\r\n\r\n        private void OnSmileButtonClick()\r\n        {\r\n            if (_emojiKeyboard == null)\r\n            {\r\n                _emojiKeyboard = EmojiControl.GetInstance();\r\n\r\n                _emojiKeyboard.SetGroupStickers(null, null);\r\n\r\n                _allStickers = _allStickers ?? IoC.Get<IStateService>().GetAllStickers();\r\n                var isStickersPanelVisible = true;\r\n                //var allStickers = _allStickers as TLAllStickers43;\r\n                //if (allStickers != null && allStickers.ShowStickersTab != null)\r\n                //{\r\n                //    isStickersPanelVisible = allStickers.ShowStickersTab.Value;\r\n                //}\r\n                _emojiKeyboard.BindTextBox(InputMessage.InnerTextBox, isStickersPanelVisible);\r\n                _emojiKeyboard.StickerSelected += OnStickerSelected;\r\n                _emojiKeyboard.StickerSetAdded += OnStickerSetAdded;\r\n                _emojiKeyboard.SettingsButtonClick += OnSettingsButtonClick;\r\n                InputMessage.EmojiPlaceholder.Content = _emojiKeyboard;\r\n\r\n                _emojiKeyboard.IsOpen = true;\r\n\r\n                //_emojiKeyboard.SetHeight(InputBox.KeyboardHeight > 0.0 ? InputBox.KeyboardHeight : _emojiKeyboard.Height);\r\n            }\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                if (InputMessage.EmojiPlaceholder.Opacity == 0.0)\r\n                {\r\n                    _smileButtonPressed = true;\r\n\r\n                    InputMessage.OpenPlaceholder();\r\n\r\n                    if (_emojiKeyboard != null)\r\n                    {\r\n                        _emojiKeyboard.OpenStickerSprites();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    InputMessage.InnerTextBox.Focus();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                var awaitKeyboardDown = false;\r\n                if (InputMessage == FocusManager.GetFocusedElement())\r\n                {\r\n                    awaitKeyboardDown = true;\r\n                    MessagesList.Focus();\r\n                }\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                {\r\n                    if (awaitKeyboardDown)\r\n                    {\r\n                        Thread.Sleep(400);\r\n                    }\r\n\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        InputMessage.OpenPlaceholder();\r\n\r\n                        if (_emojiKeyboard != null)\r\n                        {\r\n                            _emojiKeyboard.OpenStickerSprites();\r\n                        }\r\n\r\n                        SetCaptionVisibility(Visibility.Collapsed);\r\n                        CloseEmptyDialogPlaceholder();\r\n                        CloseCommandsPlaceholder();\r\n                    });\r\n                });\r\n            }\r\n        }\r\n\r\n        private void SetCaptionVisibility(Visibility visibility)\r\n        {\r\n            return;\r\n\r\n            DialogPhoto.Visibility = visibility;\r\n            Title.Visibility = visibility;\r\n            ContextMenuIcon.Visibility = visibility;\r\n            CaptionBorder.Height = visibility == Visibility.Visible ? 105.0 : 71.0;\r\n        }\r\n\r\n        private Binding _emptyPlaceholderVisibilityBinding;\r\n\r\n        private void OpenEmptyDialogPlaceholder()\r\n        {\r\n            RestoreVisibilityBinding(Description, _emptyPlaceholderVisibilityBinding, Visibility.Collapsed);\r\n        }\r\n\r\n        private void CloseEmptyDialogPlaceholder()\r\n        {\r\n            _emptyPlaceholderVisibilityBinding = SaveVisibilityBinding(Description);\r\n            Description.Visibility = Visibility.Collapsed;\r\n        }\r\n#if DEBUG\r\n        ~SecretDialogDetailsView()\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"~SecretDialogDetailsView\");\r\n        }\r\n#endif\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n            //var appBar = new ApplicationBar();\r\n            //var appBarDefaultSize = appBar.DefaultSize;\r\n\r\n            //WaitingBar.Height = appBarDefaultSize;\r\n        }\r\n\r\n        private void OnViewModelScrollToBottom(object sender, System.EventArgs e)\r\n        {\r\n            if (ViewModel.Items.Count > 0)\r\n            {\r\n                MessagesList.ScrollToItem(ViewModel.Items[0]);\r\n            }\r\n        }\r\n\r\n        private void OnViewModelScrollTo(object sender, ScrollToEventArgs e)\r\n        {\r\n            if (ViewModel.Items.Count > 0)\r\n            {\r\n                MessagesList.ScrollToItem(e.DecryptedMessage);\r\n            }\r\n        }\r\n        private TextBlock _selectionCaption;\r\n\r\n        private void SwitchToSelectionMode()\r\n        {\r\n            InputMessage.SwitchToSelectionMode();\r\n\r\n            MessagesList.Focus();\r\n            OpenEmptyDialogPlaceholder();\r\n            CloseEmojiPlaceholder();\r\n            CloseCommandsPlaceholder();\r\n            SetCaptionVisibility(Visibility.Visible);\r\n\r\n            if (_selectionCaption == null)\r\n            {\r\n                _selectionCaption = new TextBlock\r\n                {\r\n                    HorizontalAlignment = HorizontalAlignment.Left,\r\n                    VerticalAlignment = VerticalAlignment.Top,\r\n                    Margin = new Thickness(18.0, 52.0, 18.0, 21.0),\r\n                    Foreground = new SolidColorBrush(Colors.White),\r\n                    RenderTransform = new TranslateTransform(),\r\n                    Style = (Style)Application.Current.Resources[\"ApplicationTitleStyle\"]\r\n                };\r\n                LayoutRoot.Children.Add(_selectionCaption);\r\n            }\r\n\r\n            CaptionGrid.RenderTransform = new TranslateTransform();\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var transformAnimaion2 = new DoubleAnimation { From = 0.0, To = -72.0, Duration = TimeSpan.FromSeconds(0.2), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } };\r\n            Storyboard.SetTarget(transformAnimaion2, CaptionGrid);\r\n            Storyboard.SetTargetProperty(transformAnimaion2, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(transformAnimaion2);\r\n\r\n            var opacityAnimaion2 = new DoubleAnimation { From = 1.0, To = 0.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion2, CaptionGrid);\r\n            Storyboard.SetTargetProperty(opacityAnimaion2, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion2);\r\n\r\n            var opacityAnimaion = new DoubleAnimation { From = 0.0, To = 1.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion, _selectionCaption);\r\n            Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (o, e) =>\r\n            {\r\n                //((TranslateTransform)CaptionGrid.RenderTransform).Y = 0.0;\r\n                //CaptionGrid.Opacity = 1.0;\r\n                //DialogPhoto.Visibility = Visibility.Collapsed;\r\n                //Caption.Visibility = Visibility.Collapsed;\r\n                //ContextMenuIcon.Visibility = Visibility.Collapsed;\r\n            };\r\n\r\n            //DialogPhoto.Visibility = Visibility.Collapsed;\r\n            //Caption.Visibility = Visibility.Collapsed;\r\n            //ContextMenuIcon.Visibility = Visibility.Collapsed;\r\n            var count = SecretDialogDetailsViewModel.UngroupEnumerator(ViewModel.Items).Count(x => x.IsSelected);\r\n            var noneTTLCount = ViewModel.Items.Count(x => x.IsSelected);\r\n\r\n            _selectionCaption.Text = string.Format(count == 1 ? AppResources.ItemsSelectedSingular : AppResources.ItemsSelectedPlural, count).ToUpperInvariant();\r\n            _selectionCaption.Visibility = Visibility.Visible;\r\n\r\n            ApplicationBar.Buttons.Clear();\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                InputMessage.IsDeleteActionVisible = true;\r\n\r\n                InputMessage.IsGroupActionEnabled = new Tuple<bool, bool>(count > 0, count > 0 && noneTTLCount == count);\r\n                ApplicationBar.IsVisible = false;\r\n            });\r\n        }\r\n\r\n        private void SwitchToNonSelectionMode()\r\n        {\r\n            InputMessage.SwitchToNormalMode();\r\n\r\n            InputMessage.MuteButtonVisibility = GetMuteButtonVisibility();\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var transformAnimaion2 = new DoubleAnimation { From = -72.0, To = 0.0, Duration = TimeSpan.FromSeconds(0.2), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } };\r\n            Storyboard.SetTarget(transformAnimaion2, CaptionGrid);\r\n            Storyboard.SetTargetProperty(transformAnimaion2, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(transformAnimaion2);\r\n\r\n            var opacityAnimaion2 = new DoubleAnimation { From = 0.0, To = 1.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion2, CaptionGrid);\r\n            Storyboard.SetTargetProperty(opacityAnimaion2, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion2);\r\n\r\n            var opacityAnimaion = new DoubleAnimation { From = 1.0, To = 0.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion, _selectionCaption);\r\n            Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (o, e) =>\r\n            {\r\n                _selectionCaption.Opacity = 1.0;\r\n                _selectionCaption.Visibility = Visibility.Collapsed;\r\n            };\r\n\r\n            DialogPhoto.Visibility = Visibility.Visible;\r\n            Caption.Visibility = Visibility.Visible;\r\n            ContextMenuIcon.Visibility = Visibility.Visible;\r\n\r\n            ApplicationBar.Buttons.Clear();\r\n            ApplicationBar.IsVisible = false;\r\n        }\r\n\r\n        private Visibility GetMuteButtonVisibility()\r\n        {\r\n            return Visibility.Collapsed;\r\n        }\r\n\r\n        private void SwitchToNormalMode()\r\n        {\r\n            InputMessage.SwitchToNormalMode();\r\n        }\r\n\r\n        public static readonly DependencyProperty StopwatchProperty =\r\n            DependencyProperty.Register(\"Stopwatch\", typeof(string), typeof(SecretDialogDetailsView), new PropertyMetadata(default(string)));\r\n\r\n        public string Stopwatch\r\n        {\r\n            get { return (string)GetValue(StopwatchProperty); }\r\n            set { SetValue(StopwatchProperty, value); }\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            SetRootFrameBinding();\r\n\r\n            InputMessage.AudioRecorded += OnAudioRecorded;\r\n            InputMessage.RecordStarted += OnRecordStarted;\r\n            InputMessage.RecordCanceled += OnRecordCanceled;\r\n\r\n            ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            ViewModel.ScrollToBottom += OnViewModelScrollToBottom;\r\n            ViewModel.ScrollTo += OnViewModelScrollTo;\r\n\r\n            GifPlayerControl.MediaStateChanged += OnGifPlayerControlMediaStateChanged;\r\n\r\n            if (ViewModel.MultiImageEditor != null)\r\n            {\r\n                ViewModel.MultiImageEditor.PropertyChanged += OnMultiImageEditorPropertyChanged;\r\n            }\r\n            if (ViewModel.LocationPicker != null)\r\n            {\r\n                ViewModel.LocationPicker.PropertyChanged += OnLocationPickerPropertyChanged;\r\n            }\r\n\r\n            if (ViewModel.IsApplicationBarVisible)\r\n            {\r\n                BuildLocalizedAppBar();\r\n            }\r\n            else if (ApplicationBar != null)\r\n            {\r\n                ApplicationBar.IsVisible = false;//ViewModel.IsApplicationBarVisible && !ViewModel.IsChooseAttachmentOpen;\r\n            }\r\n\r\n            RunAnimation();\r\n            Stopwatch = _timer.Elapsed.ToString();\r\n        }\r\n\r\n        private void OnGifPlayerControlMediaStateChanged(object sender, MediaStateChangedEventArgs args)\r\n        {\r\n            switch (args.State)\r\n            {\r\n                case GifPlayerControlState.Opening:\r\n\r\n                    break;\r\n                case GifPlayerControlState.Opened:\r\n\r\n                    break;\r\n                case GifPlayerControlState.Failed:\r\n                    break;\r\n                case GifPlayerControlState.Paused:\r\n                    break;\r\n                case GifPlayerControlState.Resumed:\r\n                    break;\r\n                case GifPlayerControlState.Ended:\r\n                    ResumeChatPlayers();\r\n                    break;\r\n            }\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            RemoveRootFrameBinding();\r\n\r\n            InputMessage.AudioRecorded -= OnAudioRecorded;\r\n            InputMessage.RecordStarted -= OnRecordStarted;\r\n            InputMessage.RecordCanceled -= OnRecordCanceled;\r\n\r\n            ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            ViewModel.ScrollToBottom -= OnViewModelScrollToBottom;\r\n            ViewModel.ScrollTo -= OnViewModelScrollTo;\r\n\r\n            GifPlayerControl.MediaStateChanged -= OnGifPlayerControlMediaStateChanged;\r\n\r\n            if (ViewModel.MultiImageEditor != null)\r\n            {\r\n                ViewModel.MultiImageEditor.PropertyChanged -= OnMultiImageEditorPropertyChanged;\r\n            }\r\n            if (ViewModel.LocationPicker != null)\r\n            {\r\n                ViewModel.LocationPicker.PropertyChanged -= OnLocationPickerPropertyChanged;\r\n            }\r\n        }\r\n\r\n        private void OnMultiImageEditorPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.MultiImageEditor.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = IsItemsHitTestVisible();\r\n\r\n                if (ViewModel.MultiImageEditor.IsOpen)\r\n                {\r\n                    _prevApplicationBar = ApplicationBar;\r\n                    ApplicationBar = ((MultiImageEditorView)MultiImageEditor.Content).ApplicationBar;\r\n                }\r\n                else\r\n                {\r\n                    if (_prevApplicationBar != null)\r\n                    {\r\n                        ApplicationBar = _prevApplicationBar;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnLocationPickerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.LocationPicker.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = IsItemsHitTestVisible();\r\n            }\r\n        }\r\n\r\n        private bool IsItemsHitTestVisible()\r\n        {\r\n            return (ViewModel.ChooseAttachment == null || !ViewModel.ChooseAttachment.IsOpen)\r\n                    && (ViewModel.ImageViewer == null || !ViewModel.ImageViewer.IsOpen)\r\n                    && (ViewModel.MultiImageEditor == null || !ViewModel.MultiImageEditor.IsOpen)\r\n                    //&& (ViewModel.AnimatedImageViewer == null || !ViewModel.AnimatedImageViewer.IsOpen)\r\n                    //&& (ViewModel.VideoEditor == null || !ViewModel.VideoEditor.IsOpen)\r\n                    && (ViewModel.LocationPicker == null || !ViewModel.LocationPicker.IsOpen);\r\n        }\r\n\r\n        private Binding _visibilityBinding;\r\n\r\n        private double _previousAudioRecorderMinHeight;\r\n\r\n        private static Binding SaveVisibilityBinding(FrameworkElement element)\r\n        {\r\n            var visibilityExpression = element.GetBindingExpression(VisibilityProperty);\r\n            if (visibilityExpression != null)\r\n            {\r\n                return visibilityExpression.ParentBinding;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static void RestoreVisibilityBinding(FrameworkElement element, Binding binding, Visibility defaultValue)\r\n        {\r\n            if (binding != null)\r\n            {\r\n                element.SetBinding(VisibilityProperty, binding);\r\n            }\r\n            else\r\n            {\r\n                //element.Visibility = defaultValue;\r\n            }\r\n        }\r\n\r\n        private void OnRecordCanceled(object sender, System.EventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        private void OnRecordStarted(object sender, System.EventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        private void OnAudioRecorded(object sender, AudioEventArgs e)\r\n        {\r\n            var viewModel = ViewModel;\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => viewModel.SendAudio(e));\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsGroupActionEnabled))\r\n            {\r\n                var count = SecretDialogDetailsViewModel.UngroupEnumerator(ViewModel.Items).Count(x => x.IsSelected);\r\n                var noneTTLCount = ViewModel.Items.Count(x => x.IsSelected);\r\n                if (_selectionCaption != null)\r\n                {\r\n                    _selectionCaption.Text = string.Format(count == 1 ? AppResources.ItemsSelectedSingular : AppResources.ItemsSelectedPlural, count).ToUpperInvariant();\r\n                }\r\n\r\n                InputMessage.IsGroupActionEnabled = new Tuple<bool, bool>(count > 0, count > 0 && noneTTLCount == count);\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.Reply))\r\n            {\r\n                if (ViewModel.Reply != null)\r\n                {\r\n                    if (ViewModel.Reply is TLDecryptedMessagesContainter)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    InputMessage.Focus();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsApplicationBarVisible)\r\n                && ViewModel.IsApplicationBarVisible)\r\n            {\r\n                BuildLocalizedAppBar();\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsSelectionEnabled))\r\n            {\r\n                if (ViewModel.IsSelectionEnabled)\r\n                {\r\n                    SwitchToSelectionMode();\r\n                }\r\n                else\r\n                {\r\n                    SwitchToNonSelectionMode();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ChooseAttachment)\r\n               && ViewModel.ChooseAttachment != null)\r\n            {\r\n                ViewModel.ChooseAttachment.PropertyChanged += OnChooseAttachmentPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer)\r\n               && ViewModel.ImageViewer != null)\r\n            {\r\n                ViewModel.ImageViewer.PropertyChanged += OnImageViewerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.MultiImageEditor)\r\n                && ViewModel.MultiImageEditor != null)\r\n            {\r\n                ViewModel.MultiImageEditor.PropertyChanged += OnMultiImageEditorPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.LocationPicker)\r\n                && ViewModel.LocationPicker != null)\r\n            {\r\n                ViewModel.LocationPicker.PropertyChanged += OnLocationPickerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsApplicationBarVisible))\r\n            {\r\n                if (ApplicationBar != null)\r\n                {\r\n                    ApplicationBar.IsVisible = false;//ViewModel.IsApplicationBarVisible && !ViewModel.IsChooseAttachmentOpen;\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsAppBarCommandVisible))\r\n            {\r\n                if (ViewModel.IsAppBarCommandVisible)\r\n                {\r\n                    InputMessage_OnLostFocus(this, null);\r\n                    if (ViewModel.ChooseAttachment != null && ViewModel.ChooseAttachment.IsOpen)\r\n                    {\r\n                        ViewModel.ChooseAttachment.Close();\r\n                        ApplicationBar.IsVisible = false;\r\n                    }\r\n                    _prevApplicationBar = null;\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.StartGifPlayers))\r\n            {\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    Items_OnManipulationStateChanged(this, System.EventArgs.Empty);\r\n                });\r\n            }\r\n        }\r\n\r\n        private void Items_OnBegin(object sender, System.EventArgs e)\r\n        {\r\n            if (MessagesList.Viewport.Bounds.Y == 0.0) return;\r\n\r\n            HideScrollToBottomButton();\r\n        }\r\n\r\n        public bool IsScrollToBottomButtonVisible\r\n        {\r\n            get { return ScrollButton.Visibility == Visibility.Visible; }\r\n        }\r\n\r\n        public void HideMentionButton()\r\n        {\r\n            \r\n        }\r\n\r\n        public void HideScrollToBottomButton()\r\n        {\r\n            if (ScrollButton.Visibility == Visibility.Collapsed) return;\r\n\r\n            //ScrollToBottomButton.Visibility = Visibility.Collapsed;\r\n            //return;\r\n\r\n            var storyboard = new Storyboard();\r\n            var continuumScrollToBottomButton = new DoubleAnimationUsingKeyFrames();\r\n            continuumScrollToBottomButton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            continuumScrollToBottomButton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n            Storyboard.SetTarget(continuumScrollToBottomButton, ScrollButton);\r\n            Storyboard.SetTargetProperty(continuumScrollToBottomButton, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(continuumScrollToBottomButton);\r\n\r\n            var continuumLayoutRootOpacity = new DoubleAnimation\r\n            {\r\n                From = 1.0,\r\n                To = 0.0,\r\n                Duration = TimeSpan.FromSeconds(0.25),\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n            };\r\n            Storyboard.SetTarget(continuumLayoutRootOpacity, ScrollButton);\r\n            Storyboard.SetTargetProperty(continuumLayoutRootOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(continuumLayoutRootOpacity);\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                ScrollButton.Visibility = Visibility.Collapsed;\r\n            };\r\n\r\n            storyboard.Begin();\r\n            //Telegram.Api.Helpers.Execute.BeginOnUIThread(() => storyboard.Begin());\r\n        }\r\n\r\n        public void ShowMentionButton()\r\n        {\r\n\r\n        }\r\n\r\n        public void ShowScrollToBottomButton()\r\n        {\r\n            if (ScrollButton.Visibility == Visibility.Visible) return;\r\n\r\n            ScrollButton.Visibility = Visibility.Visible;\r\n            ScrollButton.Opacity = 0.0;\r\n\r\n            var storyboard = new Storyboard();\r\n            var continuumScrollToBottomButton = new DoubleAnimationUsingKeyFrames();\r\n            continuumScrollToBottomButton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 150.0 });\r\n            continuumScrollToBottomButton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n            Storyboard.SetTarget(continuumScrollToBottomButton, ScrollButton);\r\n            Storyboard.SetTargetProperty(continuumScrollToBottomButton, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(continuumScrollToBottomButton);\r\n\r\n            var continuumLayoutRootOpacity = new DoubleAnimation\r\n            {\r\n                From = 0.0,\r\n                To = 1.0,\r\n                Duration = TimeSpan.FromSeconds(0.25),\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n            };\r\n            Storyboard.SetTarget(continuumLayoutRootOpacity, ScrollButton);\r\n            Storyboard.SetTargetProperty(continuumLayoutRootOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(continuumLayoutRootOpacity);\r\n\r\n            storyboard.Begin();\r\n            //Telegram.Api.Helpers.Execute.BeginOnUIThread(() => storyboard.Begin());\r\n        }\r\n\r\n        private IApplicationBar _prevApplicationBar;\r\n\r\n        private void OnImageViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = !ViewModel.ChooseAttachment.IsOpen && (ViewModel.ImageViewer == null || !ViewModel.ImageViewer.IsOpen);\r\n\r\n                if (ViewModel.ImageViewer != null\r\n                    && ViewModel.ImageViewer.IsOpen)\r\n                {\r\n                    _prevApplicationBar = ApplicationBar;\r\n                    ApplicationBar = ((DecryptedImageViewerView)ImageViewer.Content).ApplicationBar;\r\n                }\r\n                else\r\n                {\r\n                    if (_prevApplicationBar != null)\r\n                    {\r\n                        ApplicationBar = _prevApplicationBar;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnChooseAttachmentPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ChooseAttachment.IsOpen))\r\n            {\r\n                MessagesList.IsHitTestVisible = !ViewModel.ChooseAttachment.IsOpen && (ViewModel.ImageViewer == null || !ViewModel.ImageViewer.IsOpen);\r\n            }\r\n        }\r\n\r\n        private bool _isForwardInAnimation;\r\n        private bool _isBackwardInAnimation;\r\n        private bool _fromExternalUri;\r\n        private readonly Uri _externalUri = new Uri(@\"app://external/\");\r\n\r\n        public void OpenBitmapCache()\r\n        {\r\n            MessagesCache.Visibility = Visibility.Visible;\r\n            MessagesList.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        public void CloseBitmapCache()\r\n        {\r\n            MessagesCache.Visibility = Visibility.Collapsed;\r\n            MessagesList.Visibility = Visibility.Visible;\r\n        }\r\n\r\n        private void RunAnimation()\r\n        {\r\n            if (_isForwardInAnimation)\r\n            {\r\n                _isForwardInAnimation = false;\r\n\r\n                if (ViewModel.Chat.Bitmap != null)\r\n                {\r\n                    MessagesList.Visibility = Visibility.Collapsed;\r\n                }\r\n\r\n                var storyboard = new Storyboard();\r\n                if (ViewModel != null\r\n                    && ViewModel.StateService.AnimateTitle)\r\n                {\r\n                    ViewModel.StateService.AnimateTitle = false;\r\n\r\n                    var continuumElementX = new DoubleAnimationUsingKeyFrames();\r\n                    continuumElementX.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 130.0 });\r\n                    continuumElementX.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                    Storyboard.SetTarget(continuumElementX, Title);\r\n                    Storyboard.SetTargetProperty(continuumElementX, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n                    storyboard.Children.Add(continuumElementX);\r\n\r\n                    var continuumElementY = new DoubleAnimationUsingKeyFrames();\r\n                    continuumElementY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -40.0 });\r\n                    continuumElementY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n                    Storyboard.SetTarget(continuumElementY, Title);\r\n                    Storyboard.SetTargetProperty(continuumElementY, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                    storyboard.Children.Add(continuumElementY);\r\n                }\r\n\r\n                var continuumLayoutRootY = new DoubleAnimationUsingKeyFrames();\r\n                continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 150.0 });\r\n                continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(continuumLayoutRootY, LayoutRoot);\r\n                Storyboard.SetTargetProperty(continuumLayoutRootY, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(continuumLayoutRootY);\r\n\r\n                var continuumLayoutRootOpacity = new DoubleAnimation { From = 0.0, To = 1.0, Duration = TimeSpan.FromSeconds(0.25), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } };\r\n                Storyboard.SetTarget(continuumLayoutRootOpacity, LayoutRoot);\r\n                Storyboard.SetTargetProperty(continuumLayoutRootOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(continuumLayoutRootOpacity);\r\n\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    LayoutRoot.Opacity = 1.0;\r\n                    storyboard.Completed += (o, e) =>\r\n                    {\r\n\r\n                        //Items.Opacity = 0.0;\r\n                        MessagesList.Visibility = Visibility.Visible;\r\n                        MessagesCache.Visibility = Visibility.Collapsed;\r\n                        ViewModel.OnForwardInAnimationComplete();\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(1.0), () =>\r\n                        {\r\n                            Items_OnManipulationStateChanged(this, System.EventArgs.Empty);\r\n                        });\r\n                        //Deployment.Current.Dispatcher.BeginInvoke(() => CloseCacheStoryboard.Begin());\r\n                    };\r\n                    storyboard.Begin();\r\n                });\r\n            }\r\n            else if (_isBackwardOutAnimation)\r\n            {\r\n                _isBackwardOutAnimation = false;\r\n\r\n                var storyboard = new Storyboard();\r\n\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n\r\n                var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n                opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n                Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n                storyboard.Children.Add(opacityAnimation);\r\n\r\n                storyboard.Begin();\r\n            }\r\n            else if (_isBackwardInAnimation)\r\n            {\r\n                _isBackwardInAnimation = false;\r\n\r\n                var storyboard = TelegramTurnstileAnimations.GetAnimation(LayoutRoot, TurnstileTransitionMode.BackwardIn);\r\n\r\n                Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                {\r\n                    LayoutRoot.Opacity = 1.0;\r\n                    MessagesCache.Visibility = Visibility.Visible;\r\n                    MessagesList.Visibility = Visibility.Collapsed;\r\n                    storyboard.Completed += (o, e) =>\r\n                    {\r\n                        MessagesCache.Visibility = Visibility.Collapsed;\r\n                        MessagesList.Visibility = Visibility.Visible;\r\n                        ViewModel.OnBackwardInAnimationComplete();\r\n\r\n                        Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                        {\r\n                            StartGifPlayers();\r\n                        });\r\n                    };\r\n                    storyboard.Begin();\r\n                });\r\n            }\r\n        }\r\n\r\n        private void StartGifPlayers()\r\n        {\r\n            Items_OnManipulationStateChanged(this, System.EventArgs.Empty);\r\n            var inlineBotResultsView = InlineBotResults.FindChildOfType<InlineBotResultsView>();\r\n            if (inlineBotResultsView != null)\r\n            {\r\n                inlineBotResultsView.StartActivePlayers();\r\n            }\r\n        }\r\n\r\n        private void OpenPeerDetails_OnTap(object sender, GestureEventArgs args)\r\n        {\r\n            //if (ViewModel.With is TLChatForbidden)\r\n            //{\r\n            //    return;\r\n            //}\r\n\r\n            //if (CommandsControl.Visibility == Visibility.Visible)\r\n            //{\r\n            //    OpenEmptyDialogPlaceholder();\r\n            //    CloseCommandsPlaceholder();\r\n            //    SetCaptionVisibility(Visibility.Visible);\r\n            //}\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseEmojiPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            StopPlayersAndCreateBitmapCache(() => ViewModel.OpenPeerDetails());\r\n        }\r\n\r\n        public void StopPlayersAndCreateBitmapCache(System.Action callback = null)\r\n        {\r\n            GifPlayerControl.StopActivePlayers();\r\n            GifPlayerControl.StopInlineBotActivePlayers();\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                CreateBitmapCache();\r\n                MessagesCache.Visibility = Visibility.Visible;\r\n                MessagesList.Visibility = Visibility.Collapsed;\r\n\r\n                callback.SafeInvoke();\r\n            });\r\n        }\r\n\r\n        public void CreateBitmapCache(System.Action callback = null)\r\n        {\r\n            try\r\n            {\r\n                if (MessagesList.Visibility == Visibility.Visible)\r\n                {\r\n                   // var stopwatch = Stopwatch.StartNew();\r\n                    var writeableBitmap = new WriteableBitmap(MessagesList, null);\r\n                    //var elapsed1 = stopwatch.Elapsed;\r\n                    ViewModel.Chat.SetBitmap(writeableBitmap);\r\n                    //var elapsed2 = stopwatch.Elapsed;\r\n                    //MessageBox.Show(\"create bitmap render=\" + elapsed1 + \" set=\" + elapsed2);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"WritableBitmap exception \" + ex);\r\n            }\r\n\r\n            callback.SafeInvoke();\r\n        }\r\n\r\n        private bool _suppressCancel = true;\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            ViewModel.OnNavigatedTo();\r\n            //MediaControl.Content = MessagePlayerControl.Player;\r\n\r\n            // этот код выполняется до того, как происходит отрисовка экрана\r\n            // нельзя ставить сюда долгие операции\r\n            if (e.NavigationMode == NavigationMode.New)\r\n            {\r\n                LayoutRoot.Opacity = 0.0;\r\n                _isForwardInAnimation = true;\r\n            }\r\n            else if (e.NavigationMode == NavigationMode.Back)\r\n            {\r\n                if (!_fromExternalUri)\r\n                {\r\n                    LayoutRoot.Opacity = 0.0;\r\n                    _isBackwardInAnimation = true;\r\n                }\r\n                else\r\n                {\r\n                    ViewModel.OnBackwardInAnimationComplete();\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        StartGifPlayers();\r\n                    });\r\n                }\r\n                _fromExternalUri = false;\r\n            }\r\n            else if (e.NavigationMode == NavigationMode.Reset)\r\n            {\r\n                if (_fromExternalUri)\r\n                {\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        StartGifPlayers();\r\n                    });\r\n                }\r\n            }\r\n\r\n            base.OnNavigatedTo(e);\r\n        }\r\n\r\n        private void OnStickerSetAdded(object sender, StickerSetAddedEventArgs e)\r\n        {\r\n            if (e.Set == null) return;\r\n        }\r\n\r\n        private void OnStickerSelected(object sender, StickerSelectedEventArgs e)\r\n        {\r\n            if (e.Sticker == null) return;\r\n\r\n            var document22 = e.Sticker.Document as TLDocument22;\r\n            if (document22 == null) return;\r\n\r\n            ViewModel.SendSticker(document22);\r\n        }\r\n\r\n        private void OnSettingsButtonClick(object sender, System.EventArgs eventArgs)\r\n        {\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseEmojiPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            // чтобы клавиатура успела опуститься\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                CreateBitmapCache();\r\n                MessagesCache.Visibility = Visibility.Visible;\r\n                MessagesList.Visibility = Visibility.Collapsed;\r\n\r\n                ViewModel.OpenStickerSettings();\r\n            });\r\n        }\r\n\r\n        private bool _isBackwardOutAnimation;\r\n        private bool _isForwardOutAnimation;\r\n\r\n        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)\r\n        {\r\n            GifPlayerControl.StopActivePlayers();\r\n            GifPlayerControl.StopInlineBotActivePlayers();\r\n            if (_emojiKeyboard != null)\r\n            {\r\n                // Destroy EmojiControl\r\n                _emojiKeyboard.IsOpen = false;\r\n                _emojiKeyboard.UnbindTextBox();\r\n                _emojiKeyboard.StickerSelected -= OnStickerSelected;\r\n                _emojiKeyboard.StickerSetAdded -= OnStickerSetAdded;\r\n                _emojiKeyboard.SettingsButtonClick -= OnSettingsButtonClick;\r\n                InputMessage.EmojiPlaceholder.Content = null; // Remove from view\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseEmojiPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n                _emojiKeyboard = null;\r\n            }\r\n\r\n            var multiImageEditorView = MultiImageEditor.Content as MultiImageEditorView;\r\n            if (multiImageEditorView != null)\r\n            {\r\n                multiImageEditorView.ClosePreview();\r\n            }\r\n\r\n            if (e.Uri.OriginalString.EndsWith(\"EditVideoView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"MapView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"ContactView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"ChatView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"ProfilePhotoViewerView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"SearchShellView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"ChooseDialogView.xaml\")\r\n                || e.Uri.OriginalString.EndsWith(\"StickersView.xaml\")\r\n                )\r\n            {\r\n                CreateBitmapCache();\r\n                MessagesList.Visibility = Visibility.Collapsed;\r\n                MessagesCache.Visibility = Visibility.Visible;\r\n                //e.Cancel = true;\r\n                //Deployment.Current.Dispatcher.BeginInvoke(() => NavigationService.Navigate(e.Uri));\r\n                //return;\r\n            }\r\n            else\r\n            {\r\n                //TransitionService.SetNavigationOutTransition(Self, OutTransition);\r\n            }\r\n\r\n            base.OnNavigatingFrom(e);\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n            ViewModel.OnNavigatedFrom();\r\n\r\n            MessagePlayerControl.Stop();\r\n            GifPlayerControl.StopVideo();\r\n\r\n            if (e.Uri == _externalUri)\r\n            {\r\n                _fromExternalUri = true;\r\n            }\r\n            else\r\n            {\r\n                _fromExternalUri = false;\r\n            }\r\n\r\n            base.OnNavigatedFrom(e);\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            if (!NavigationService.BackStack.Any())\r\n            {\r\n                e.Cancel = true;\r\n                ViewModel.NavigateToShellViewModel();\r\n\r\n                return;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        private void SecretDialogDetailsView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                var multiplePhotoPicker = popup.Child as OpenPhotoPicker;\r\n                if (multiplePhotoPicker != null)\r\n                {\r\n                    multiplePhotoPicker.TryClose();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.ImageViewer != null\r\n                && ViewModel.ImageViewer.IsOpen)\r\n            {\r\n                ViewModel.ImageViewer.CloseViewer();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.MultiImageEditor != null\r\n                && ViewModel.MultiImageEditor.IsOpen)\r\n            {\r\n                ViewModel.MultiImageEditor.CloseEditor();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.LocationPicker != null\r\n                && ViewModel.LocationPicker.IsOpen)\r\n            {\r\n                ViewModel.LocationPicker.CloseEditor();\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.IsSelectionEnabled)\r\n            {\r\n                ViewModel.IsSelectionEnabled = false;\r\n                ApplicationBar.IsVisible = false;//!ViewModel.IsAppBarCommandVisible;\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (_emojiKeyboard != null && _emojiKeyboard.IsPreviewMenuOpened)\r\n            {\r\n                _emojiKeyboard.ClosePreviewMenu();\r\n                e.Cancel = true;\r\n                \r\n                return;\r\n            }\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                SelfView.Focus();\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseEmojiPlaceholder();\r\n                CloseCommandsPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (ViewModel.ChooseAttachment != null\r\n                && ViewModel.ChooseAttachment.IsOpen)\r\n            {\r\n                e.Cancel = true;\r\n                ViewModel.ChooseAttachment.Close();\r\n                ResumeChatPlayers();\r\n\r\n                return;\r\n            }\r\n\r\n            if (_lastContextMenu != null && _lastContextMenu.IsOpen)\r\n            {\r\n                _lastContextMenu.IsOpen = false;\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            _isBackwardOutAnimation = true;\r\n\r\n            try\r\n            {\r\n                if (MessagesList.Visibility == Visibility.Visible)\r\n                {\r\n                    var writeableBitmap = new WriteableBitmap(MessagesList, null);\r\n                    ViewModel.Chat.SetBitmap(writeableBitmap);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"WritableBitmap exception \" + ex);\r\n            }\r\n            MessagesCache.Visibility = Visibility.Visible;\r\n            MessagesList.Visibility = Visibility.Collapsed;\r\n\r\n            RunAnimation();\r\n        }\r\n\r\n        private void InputMessage_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            SetCaptionVisibility(Visibility.Collapsed);\r\n            CloseCommandsPlaceholder();\r\n            CloseEmptyDialogPlaceholder();\r\n\r\n            PauseChatPlayers();\r\n        }\r\n\r\n        private bool _smileButtonPressed;\r\n\r\n        private ContextMenu _lastContextMenu;\r\n\r\n        private void ContextMenu_OnOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            var menu = (ContextMenu)sender;\r\n            var owner = (FrameworkElement)menu.Owner;\r\n\r\n            if (owner.DataContext != menu.DataContext)\r\n            {\r\n                menu.DataContext = owner.DataContext;\r\n            }\r\n\r\n            if (_innerMessage != null && _innerMessage != menu.DataContext)\r\n            {\r\n                menu.DataContext = _innerMessage;\r\n            }\r\n\r\n            var serviceMessage = menu.DataContext as TLDecryptedMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                menu.IsOpen = false;\r\n                return;\r\n            }\r\n\r\n            _lastContextMenu = sender as ContextMenu;\r\n        }\r\n\r\n        private void InputMessage_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_smileButtonPressed)\r\n            {\r\n                if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n                {\r\n                    CloseEmojiPlaceholder();\r\n                }\r\n            }\r\n            _smileButtonPressed = false;\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Collapsed)\r\n            {\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            OpenEmptyDialogPlaceholder();\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                ResumeChatPlayers();\r\n            });\r\n        }\r\n\r\n        private void UIElement_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        private void ScrollButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            HideScrollToBottomButton();\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (ViewModel.Items.Count > 0)\r\n                {\r\n                    ViewModel.ProcessScroll();\r\n                }\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Items_OnManipulationStateChanged(sender, System.EventArgs.Empty);\r\n                });\r\n            });\r\n        }\r\n\r\n        private void InputMessage_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                if (ViewModel.StateService.SendByEnter)\r\n                {\r\n                    ViewModel.Send();\r\n                    e.Handled = true;\r\n                }\r\n            }\r\n            else if (e.Key == Key.Space)\r\n            {\r\n                var text = InputMessage.Text.Trim();\r\n                if (BrowserNavigationService.IsValidUsername(text))\r\n                {\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() => ViewModel.ResolveUsername(text));\r\n                }\r\n            }\r\n        }\r\n\r\n        private void NavigationOutTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            //Items.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private void SecretPhotoPlaceholder_OnElapsed(object sender, System.EventArgs e)\r\n        {\r\n            return;\r\n\r\n            var element = sender as FrameworkElement;\r\n            if (element != null)\r\n            {\r\n                var decryptedMessage = element.DataContext as TLDecryptedMessage;\r\n                if (decryptedMessage != null)\r\n                {\r\n                    var decryptedMessageMediaPhoto = decryptedMessage.Media as TLDecryptedMessageMediaPhoto;\r\n                    if (decryptedMessageMediaPhoto != null)\r\n                    {\r\n                        ViewModel.DeleteMessage(false, decryptedMessageMediaPhoto);\r\n                        //SecretImageViewer.Visibility = Visibility.Collapsed;\r\n                        //ApplicationBar.IsVisible = false;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SecretPhotoPlaceholder_OnStartTimer(object sender, System.EventArgs e)\r\n        {\r\n            return;\r\n\r\n            var element = sender as FrameworkElement;\r\n            if (element != null)\r\n            {\r\n                var decryptedMessage = element.DataContext as TLDecryptedMessage;\r\n                if (decryptedMessage != null)\r\n                {\r\n                    var decryptedMessageMediaPhoto = decryptedMessage.Media as TLDecryptedMessageMediaPhoto;\r\n                    if (decryptedMessageMediaPhoto != null)\r\n                    {\r\n                        var result = ViewModel.OpenSecretPhoto(decryptedMessageMediaPhoto);\r\n                        if (result)\r\n                        {\r\n                            //SecretImageViewer.Visibility = Visibility.Visible;\r\n                            //ApplicationBar.IsVisible = false;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UIElement_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n//            var uielement = sender as FrameworkElement;\r\n//            if (uielement != null)\r\n//            {\r\n//                var decryptedMessage = uielement.DataContext as TLDecryptedMessage17;\r\n//                if (decryptedMessage != null)\r\n//                {\r\n//                    var result = ViewModel.OpenSecretPhoto(decryptedMessage);\r\n//                    if (result)\r\n//                    {\r\n//                        SecretImageViewer.Visibility = Visibility.Visible;\r\n//                        ApplicationBar.IsVisible = false;\r\n//                    }\r\n//                }\r\n//            }\r\n        }\r\n\r\n        private void Items_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (ViewModel.SliceLoaded) return;\r\n\r\n            ViewModel.LoadNextSlice();\r\n        }\r\n\r\n        private Visibility GetAudioRecorderVisibility()\r\n        {\r\n            if (FocusManager.GetFocusedElement() == InputMessage)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n\r\n            if (InputMessage.Text.Length > 0)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                return Visibility.Collapsed;\r\n            }\r\n\r\n            //if (ViewModel != null)\r\n            //{\r\n            //    var chatForbidden = ViewModel.With as TLChatForbidden;\r\n            //    var chat = ViewModel.With as TLChat;\r\n\r\n            //    var isForbidden = chatForbidden != null || (chat != null && chat.Left.Value);\r\n            //    if (isForbidden)\r\n            //    {\r\n            //        return Visibility.Collapsed;\r\n            //    }\r\n            //}\r\n\r\n            return Visibility.Visible;\r\n        }\r\n\r\n        private void InputMessage_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            InputMessage.KeyboardButtonVisibility = GetReplyKeyboardButtonVisibility();\r\n            InputMessage.MuteButtonVisibility = GetMuteButtonVisibility();\r\n        }\r\n\r\n        private Visibility GetReplyKeyboardButtonVisibility()\r\n        {\r\n            return Visibility.Collapsed;\r\n        }\r\n\r\n        private void MorePanel_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            var message = frameworkElement.DataContext as TLDecryptedMessage;\r\n            if (message == null) return;\r\n\r\n            if (InputMessage.EmojiPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                OpenEmptyDialogPlaceholder();\r\n                CloseEmojiPlaceholder();\r\n                SetCaptionVisibility(Visibility.Visible);\r\n            }\r\n\r\n            // чтобы клавиатура успела опуститься\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                CreateBitmapCache();\r\n                MessagesCache.Visibility = Visibility.Visible;\r\n                MessagesList.Visibility = Visibility.Collapsed;\r\n\r\n                ViewModel.OpenCropedMessage(message);\r\n            });\r\n        }\r\n\r\n        private void InlineBotResults_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            InputMessage.Focus();\r\n\r\n            var frameworkElement = e.OriginalSource as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var result = frameworkElement.DataContext as TLBotInlineResultBase;\r\n                if (result != null)\r\n                {\r\n                    GifPlayerControl.StopInlineBotActivePlayers();\r\n                    ViewModel.SendBotInlineResult(result);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void InlineBotResults_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ViewModel.ContinueInlineBotResults();\r\n        }\r\n\r\n        private void StickerHints_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var frameworkElement = e.OriginalSource as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            var stickerItem = frameworkElement.DataContext as TLStickerItem;\r\n            if (stickerItem == null) return;\r\n\r\n            var document22 = stickerItem.Document as TLDocument22;\r\n            if (document22 == null) return;\r\n\r\n            ViewModel.SendSticker(document22);\r\n        }\r\n\r\n        private void StickerHints_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ViewModel.ContinueStickerHints();\r\n        }\r\n\r\n        private void ContextMenu_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var contextMenu = (ContextMenu) sender;\r\n            if (contextMenu != null)\r\n            {\r\n                var decryptedMessage = contextMenu.DataContext as TLDecryptedMessage;\r\n                if (decryptedMessage != null)\r\n                {\r\n\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ReplyMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem != null)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n\r\n                var chat = ViewModel.Chat as TLEncryptedChat17;\r\n                if (chat != null && chat.Layer.Value >= Constants.MinSecretChatWithRepliesLayer)\r\n                {\r\n                    menuItem.Visibility = Visibility.Visible;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void AddToStickers_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem != null)\r\n            {\r\n                menuItem.Visibility = Visibility.Collapsed;\r\n                var decryptedMessage = menuItem.DataContext as TLDecryptedMessage;\r\n                if (decryptedMessage != null && decryptedMessage.IsSticker())\r\n                {\r\n                    var mediaExternalDocument = decryptedMessage.Media as TLDecryptedMessageMediaExternalDocument;\r\n                    if (mediaExternalDocument != null)\r\n                    {\r\n                        var stickerSet = mediaExternalDocument.StickerSet;\r\n                        if (stickerSet != null && !(stickerSet is TLInputStickerSetEmpty))\r\n                        {\r\n                            var allStickers = IoC.Get<IStateService>().GetAllStickers() as TLAllStickers29;\r\n                            if (allStickers != null)\r\n                            {\r\n                                var set = allStickers.Sets.FirstOrDefault(x => string.Equals(x.ShortName.ToString(), stickerSet.Name.ToString(), StringComparison.Ordinal));\r\n                                if (set != null)\r\n                                {\r\n                                    menuItem.Visibility = Visibility.Collapsed;\r\n                                    menuItem.Header = AppResources.ViewStickers;\r\n                                }\r\n                                else\r\n                                {\r\n                                    menuItem.Visibility = Visibility.Visible;\r\n                                    menuItem.Header = AppResources.AddToStickers;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void StartChatPlayer(StartGifPlayerEventArgs e)\r\n        {\r\n            if (MessagesList.ManipulationState != ManipulationState.Idle) return;\r\n            if (ViewModel.ChooseAttachment != null && ViewModel.ChooseAttachment.IsOpen) return;\r\n            if (MessagePlayerControl.Player != null\r\n                && MessagePlayerControl.Player.CurrentState == MediaElementState.Playing\r\n                && MessagePlayerControl.Player.Tag is GifPlayerControl) return;\r\n            \r\n            var settings = ViewModel.StateService.GetChatSettings();\r\n            var newItems = MessagesList.GetItemsInView();\r\n\r\n            foreach (var item in newItems)\r\n            {\r\n                var message = item.DataContext as TLDecryptedMessage;\r\n                if (message != null && message == e.DecryptedMessage && message.IsGif())\r\n                {\r\n                    var media = message.Media;\r\n                    if ((media != null && media.AutoPlayGif == true) || (settings != null && settings.AutoPlayGif && media != null && media.AutoPlayGif != false))\r\n                    {\r\n                        var gifPlayer = item.FindChildOfType<GifPlayerControl>();\r\n                        if (gifPlayer != null)\r\n                        {\r\n                            gifPlayer.Start();\r\n                        }\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ResumeChatPlayers()\r\n        {\r\n            if (MessagesList.ManipulationState != ManipulationState.Idle) return;\r\n            if (ViewModel.ChooseAttachment != null && ViewModel.ChooseAttachment.IsOpen) return;\r\n            if (MessagePlayerControl.Player != null\r\n                && MessagePlayerControl.Player.CurrentState == MediaElementState.Playing\r\n                && MessagePlayerControl.Player.Tag is GifPlayerControl) return;\r\n            if (FocusManager.GetFocusedElement() == InputMessage.Input) return;\r\n            if (ViewModel.InlineBotResults != null && ViewModel.InlineBotResults.Results.Count > 0) return;\r\n\r\n            var settings = ViewModel.StateService.GetChatSettings();\r\n            var newItems = MessagesList.GetItemsInView();\r\n\r\n            var activePlayers = new List<GifPlayerControl>();\r\n            foreach (var item in newItems)\r\n            {\r\n                var message = item.DataContext as TLDecryptedMessage;\r\n                if (message != null && message.IsGif())\r\n                {\r\n                    var media = message.Media;\r\n                    if ((media != null && media.AutoPlayGif == true) || (settings != null && settings.AutoPlayGif && media != null && media.AutoPlayGif != false))\r\n                    {\r\n                        var gifPlayer = item.FindChildOfType<GifPlayerControl>();\r\n                        if (gifPlayer != null)\r\n                        {\r\n                            activePlayers.Add(gifPlayer);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            GifPlayerControl.ResumeActivePlayers(activePlayers);\r\n        }\r\n\r\n        public void PauseChatPlayers()\r\n        {\r\n            GifPlayerControl.PauseActivePlayers();\r\n        }\r\n\r\n        private void Items_OnManipulationStateChanged(object sender, System.EventArgs e)\r\n        {\r\n            GifPlayerControl.ManipulationState = MessagesList.ManipulationState;\r\n            if (MessagesList.ManipulationState == ManipulationState.Idle)\r\n            {\r\n                ResumeChatPlayers();\r\n            }\r\n            else\r\n            {\r\n                PauseChatPlayers();\r\n            }\r\n#if DEBUG\r\n            var count = GifPlayerControl.ActivePlayers.Count;\r\n            Debug.Text = string.Format(\"{0} {1}\", count, GifPlayerControl.ActivePlayers.Count);\r\n#endif\r\n        }\r\n\r\n        private void ViaBot_Tap(object sender, GestureEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement == null) return;\r\n\r\n            var message = frameworkElement.DataContext as TLDecryptedMessage45;\r\n            if (message == null) return;\r\n\r\n            var viaBotName = message.ViaBotName;\r\n            if (viaBotName == null) return;\r\n\r\n            SetInlineBotCommon(viaBotName.ToString());\r\n        }\r\n\r\n        public void SetInlineBot(TLUserBase bot)\r\n        {\r\n            var user = bot as TLUser;\r\n            if (user == null || !user.IsInlineBot || user.UserName == null) return;\r\n\r\n            SetInlineBotCommon(user.UserName.ToString());\r\n        }\r\n\r\n        private void SetInlineBotCommon(string userName)\r\n        {\r\n            InputMessage.Text = string.Format(\"@{0} \", userName);\r\n            InputMessage.Focus();\r\n            InputMessage.SelectionStart = InputMessage.Text.Length;\r\n            InputMessage.SelectionLength = 0;\r\n\r\n            var text = InputMessage.Text.Trim();\r\n            if (BrowserNavigationService.IsValidUsername(text))\r\n            {\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() => ViewModel.ResolveUsername(text));\r\n            }\r\n        }\r\n\r\n        private void ContextMenu_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void ContextMenu_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ContextMenu.IsOpen = true;\r\n        }\r\n\r\n        private void InputMessage_OnAppBarCommandClick(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.DeleteChat();\r\n        }\r\n\r\n        private void InputMessage_OnOpenReplyButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void InputMessage_OnDeleteReplyButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.DeleteReply();\r\n        }\r\n\r\n        private void InputMessage_OnDeleteButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.DeleteMessages();\r\n        }\r\n\r\n        private void InputMessage_OnForwardButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void InputMessage_OnCancelSelectionButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.IsSelectionEnabled = false;\r\n        }\r\n\r\n        private void InputMessage_OnSendClick(object sender, System.EventArgs e)\r\n        {\r\n            ViewModel.Send();\r\n        }\r\n\r\n        private void InputMessage_OnAttachClick(object sender, System.EventArgs e)\r\n        {\r\n            OpenEmptyDialogPlaceholder();\r\n            CloseEmojiPlaceholder();\r\n            CloseCommandsPlaceholder();\r\n            SetCaptionVisibility(Visibility.Visible);\r\n            if (_focusedElement == InputMessage)\r\n            {\r\n                ChooseAttachment.Focus();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(.35), () => ViewModel.Attach());\r\n            }\r\n            else\r\n            {\r\n                ChooseAttachment.Focus();\r\n                ViewModel.Attach();\r\n            }\r\n        }\r\n\r\n        private void InputMessage_OnMuteButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void InputMessage_OnKeyboardButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void InputMessage_OnEmojiClick(object sender, System.EventArgs e)\r\n        {\r\n            OnSmileButtonClick();\r\n        }\r\n\r\n        private void CopyMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            element.Visibility = Visibility.Collapsed;\r\n\r\n            var message = element.DataContext as TLDecryptedMessage;\r\n            if (message != null)\r\n            {\r\n                if (!TLString.IsNullOrEmpty(message.Message))\r\n                {\r\n                    element.Visibility = Visibility.Visible;\r\n                    return;\r\n                }\r\n\r\n                var mediaCaption = message.Media as IMediaCaption;\r\n                if (mediaCaption != null && !TLString.IsNullOrEmpty(mediaCaption.Caption))\r\n                {\r\n                    element.Visibility = Visibility.Visible;\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void DeleteMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void SelectMessages_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var message = frameworkElement.DataContext as TLDecryptedMessageBase;\r\n                if (message != null && message.SelectionVisibility == Visibility.Visible)\r\n                {\r\n                    ViewModel.ChangeSelection(message);\r\n                }\r\n            }\r\n\r\n            ViewModel.IsSelectionEnabled = true;\r\n        }\r\n\r\n        public void ScrollTo(TLObject obj)\r\n        {\r\n            MessagesList.ScrollToItem(obj);\r\n        }\r\n\r\n        private void ResendMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            element.Visibility = Visibility.Collapsed;\r\n            var message = element.DataContext as TLDecryptedMessageBase;\r\n            if (message != null)\r\n            {\r\n                element.Visibility = message.Status == MessageStatus.Failed ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        private void MessageControl_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (FocusManager.GetFocusedElement() == InputMessage.Input)\r\n            {\r\n                return;\r\n            }\r\n            if (MessagesList.Viewport.ManipulationState != ManipulationState.Idle)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var messageControl = sender as DecryptedMessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                var decryptedMessageService = messageControl.DataContext as TLDecryptedMessageService;\r\n                if (decryptedMessageService != null)\r\n                {\r\n                    return;\r\n                }\r\n            }\r\n            _skipFirstManipulationDelta = true;\r\n            e.Handled = true;\r\n        }\r\n\r\n        private bool _skipFirstManipulationDelta;\r\n\r\n        private void MessageControl_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            if (_skipFirstManipulationDelta)\r\n            {\r\n                _skipFirstManipulationDelta = false;\r\n                return;\r\n            }\r\n            if (FocusManager.GetFocusedElement() == InputMessage.Input)\r\n            {\r\n                return;\r\n            } \r\n            if (MessagesList.Viewport.ManipulationState != ManipulationState.Idle)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var messageControl = sender as DecryptedMessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                var decryptedMessageService = messageControl.DataContext as TLDecryptedMessageService;\r\n                if (decryptedMessageService != null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var translationX = -e.CumulativeManipulation.Translation.X;\r\n\r\n                if (translationX < 0.0)\r\n                {\r\n                    translationX = 0.0;\r\n                }\r\n                else if (translationX > 100.0)\r\n                {\r\n                    translationX = 100.0;\r\n                }\r\n\r\n                if (messageControl.CacheMode == null) messageControl.CacheMode = new BitmapCache();\r\n                messageControl.RenderTransform = new TranslateTransform\r\n                {\r\n                    X = translationX\r\n                };\r\n\r\n                e.Handled = true;\r\n            }\r\n        }\r\n\r\n        private void MessageControl_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            _skipFirstManipulationDelta = false;\r\n            if (FocusManager.GetFocusedElement() == InputMessage.Input)\r\n            {\r\n                return;\r\n            }\r\n            if (MessagesList.Viewport.ManipulationState != ManipulationState.Idle)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var messageControl = sender as DecryptedMessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                var decryptedMessageService = messageControl.DataContext as TLDecryptedMessageService;\r\n                if (decryptedMessageService != null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var transform = messageControl.RenderTransform as TranslateTransform;\r\n                if (transform != null)\r\n                {\r\n                    var translateX = transform.X;\r\n\r\n                    var storyboard = new Storyboard();\r\n                    var doubleAnimation = new DoubleAnimation();\r\n                    doubleAnimation.To = 0.0;\r\n                    doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(0.15));\r\n                    Storyboard.SetTarget(doubleAnimation, messageControl.RenderTransform);\r\n                    Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath(\"X\"));\r\n                    storyboard.Children.Add(doubleAnimation);\r\n\r\n                    storyboard.Begin();\r\n                    storyboard.Completed += (o, args) =>\r\n                    {\r\n                        messageControl.CacheMode = null;\r\n                        if (translateX >= 75.0)\r\n                        {\r\n                            var messageBase = messageControl.DataContext as TLDecryptedMessageBase;\r\n                            var innerMessage = GetInnerMessage(e, messageBase);\r\n                            if (innerMessage != null)\r\n                            {\r\n                                messageBase = innerMessage;\r\n                            }\r\n\r\n                            if (messageBase == null) return;\r\n\r\n                            ViewModel.ReplyMessage(messageBase);\r\n                            InputMessage.FocusInput();\r\n                        }\r\n                    };\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLDecryptedMessageBase GetInnerMessage(ManipulationCompletedEventArgs e, TLDecryptedMessageBase messageBase)\r\n        {\r\n            var message = messageBase as TLDecryptedMessage73;\r\n            if (message != null)\r\n            {\r\n                var mediaGroup = message.Media as TLDecryptedMessageMediaGroup;\r\n                if (mediaGroup != null)\r\n                {\r\n                    var source = e.OriginalSource as FrameworkElement;\r\n                    if (source != null)\r\n                    {\r\n                        var media = source.DataContext as TLDecryptedMessageMediaBase;\r\n                        for (var i = 0; i < mediaGroup.Group.Count; i++)\r\n                        {\r\n                            var m = mediaGroup.Group[i] as TLDecryptedMessage;\r\n                            if (m != null && m.Media == media)\r\n                            {\r\n                                return m;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return messageBase;\r\n        }\r\n\r\n        private void MessageControl_OnTapMedia(object sender, GestureEventArgs e)\r\n        {\r\n            var messageControl = sender as DecryptedMessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                var message = GetInnerMessage(messageControl, e);\r\n                if (message != null)\r\n                {\r\n                    ViewModel.OpenMedia(message);\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLDecryptedMessageBase _innerMessage;\r\n\r\n        private void MessageControl_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            var messageControl = sender as DecryptedMessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                _innerMessage = GetInnerMessage(messageControl, e);\r\n            }\r\n        }\r\n\r\n        private TLDecryptedMessage GetInnerMessage(FrameworkElement element, GestureEventArgs e)\r\n        {\r\n            var groupedMessage = element.DataContext as TLDecryptedMessage73;\r\n            if (groupedMessage != null)\r\n            {\r\n                var messageMediaGroup = groupedMessage.Media as TLDecryptedMessageMediaGroup;\r\n                if (messageMediaGroup != null)\r\n                {\r\n                    var point = e.GetPosition(Application.Current.RootVisual);\r\n                    var elements = VisualTreeHelper.FindElementsInHostCoordinates(point, MessagesList);\r\n                    var mediaPhotoControl = elements.OfType<IMediaControl>().FirstOrDefault();\r\n                    if (mediaPhotoControl != null)\r\n                    {\r\n                        var message = messageMediaGroup.Group.OfType<TLDecryptedMessage>().FirstOrDefault(x => x.Media == mediaPhotoControl.Media);\r\n                        if (message != null)\r\n                        {\r\n                            return message;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return element.DataContext as TLDecryptedMessage;\r\n        }\r\n\r\n        private void SelectionBorder_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element != null)\r\n            {\r\n                var groupedMessage = element.DataContext as TLDecryptedMessage73;\r\n                if (groupedMessage != null)\r\n                {\r\n                    var selectionChanged = false;\r\n\r\n                    var messageMediaGroup = groupedMessage.Media as TLDecryptedMessageMediaGroup;\r\n                    if (messageMediaGroup != null)\r\n                    {\r\n                        var message = GetInnerMessage(element, e);\r\n                        if (message != null)\r\n                        {\r\n                            ViewModel.ChangeSelection(message);\r\n\r\n                            selectionChanged = true;\r\n                            if (messageMediaGroup.Group.All(x => x.IsSelected) && !groupedMessage.IsSelected\r\n                                || messageMediaGroup.Group.All(x => !x.IsSelected) && groupedMessage.IsSelected)\r\n                            {\r\n                                selectionChanged = false;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (!selectionChanged)\r\n                    {\r\n                        ViewModel.ChangeSelection(groupedMessage);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    ViewModel.ChangeSelection(element.DataContext as TLDecryptedMessageBase);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void DeleteMessage_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element != null)\r\n            {\r\n                var message = element.DataContext as TLDecryptedMessageBase;\r\n                if (message != null)\r\n                {\r\n                    ViewModel.DeleteMessage(true, message);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP8/Views/Media/FilesView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.FilesView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:telegramClient=\"clr-namespace:TelegramClient\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <converters:DeclensionConverter x:Key=\"CountConverter\"\r\n                NominativeSingular=\"{Binding Resources.FileNominativeSingular, Source={StaticResource Strings}}\"\r\n                NominativePlural=\"{Binding Resources.FileNominativePlural, Source={StaticResource Strings}}\"\r\n                GenitiveSingular=\"{Binding Resources.FileGenitiveSingular, Source={StaticResource Strings}}\"\r\n                GenitivePlural=\"{Binding Resources.FileGenitivePlural, Source={StaticResource Strings}}\"/>\r\n            \r\n            <phone:JumpListItemBackgroundConverter x:Key=\"BackgroundConverter\" Enabled=\"{StaticResource TelegramAccentBrush}\"/>\r\n            <phone:JumpListItemForegroundConverter x:Key=\"ForegroundConverter\"/>\r\n            \r\n            <Style x:Key=\"FilesJumpListStyle\" TargetType=\"phone:LongListSelector\">\r\n                <Setter Property=\"LayoutMode\" Value=\"List\" />\r\n                <Setter Property=\"Margin\" Value=\"12,12,0,0\"/>\r\n                <Setter Property=\"ItemTemplate\">\r\n                    <Setter.Value>\r\n                        <DataTemplate>\r\n                            <Border Background=\"{Binding Converter={StaticResource BackgroundConverter}}\" \r\n                                Width=\"470\" \r\n                                Height=\"70\" \r\n                                Margin=\"6,6,18,6\">\r\n                                <TextBlock Text=\"{Binding KeyString}\"\r\n                                       Foreground=\"{Binding Converter={StaticResource ForegroundConverter}}\"\r\n                                       FontSize=\"23\"  \r\n                                       Padding=\"2\"\r\n                                       Margin=\"12,0\"\r\n                                       VerticalAlignment=\"Bottom\"/>\r\n                            </Border>\r\n                        </DataTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style> \r\n            \r\n            <DataTemplate x:Key=\"GroupHeaderTemplate\">\r\n                <Grid Margin=\"66,0,18,0\">\r\n                    <TextBlock Text=\"{Binding KeyString}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontSize=\"23\" Margin=\"0,18,18,6\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\"/>\r\n                    <TextBlock Text=\"{Binding Count, Converter={StaticResource CountConverter}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"23\" Margin=\"0,18,0,6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Visible}\"/>\r\n                    <!--<TextBlock Text=\"{Binding Resources.Select, Source={StaticResource Strings}}\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" FontSize=\"23\" Margin=\"0,18,48,6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"/>-->\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"FileTemplate\">\r\n                <Grid Margin=\"0,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Loaded=\"DeleteMessage_OnLoaded\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action SaveMedia($DataContext)]\" Header=\"{Binding Resources.Save, Source={StaticResource Strings}}\" \r\n                            Visibility=\"{Binding Self, Converter={StaticResource MediaFileAvailableToVisibilityConverter}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n\r\n                    <dialogs:DocumentTileControl \r\n                        Grid.RowSpan=\"2\" \r\n                        Width=\"64\" Height=\"64\"\r\n                        TileBrush=\"{Binding Media.Document.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        DownloadIconVisibility=\"{Binding Media.Self, Converter={StaticResource DownloadMediaToVisibilityConverter}}\"\r\n                        Text=\"{Binding Media.Document.FileExt, Converter={StaticResource Lowercase}}\"\r\n                        Source=\"{Binding Media.Document, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Music=\"{Binding Media.Document.Music}\"\r\n                        DownloadingProgress=\"{Binding Media.DownloadingProgress}\"\r\n                        UploadingProgress=\"{Binding Media.UploadingProgress}\"/>\r\n\r\n                    <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,6,0\" TextTrimming=\"WordEllipsis\" Text=\"{Binding Media.Document.DocumentName, Converter={StaticResource NonBreakingStringConverter}}\" FontSize=\"27\"/>\r\n                    <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"18,0,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <TextBlock Grid.Column=\"0\" Margin=\"0\" Text=\"{Binding Media.Document.Size.Value, Converter={StaticResource FileSizeConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                        <TextBlock Grid.Column=\"1\" Margin=\"0\" Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' • \\{0\\}'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Background=\"Transparent\"\r\n\t\t\t\t        Visibility=\"{Binding Media.DownloadingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\">\r\n                        <i:Interaction.Triggers>\r\n                            <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                                <micro:ActionMessage MethodName=\"CancelDocumentDownloading\">\r\n                                    <micro:ActionMessage.Parameters>\r\n                                        <micro:Parameter Value=\"{Binding Media}\"/>\r\n                                    </micro:ActionMessage.Parameters>\r\n                                </micro:ActionMessage>\r\n                            </behaviors:HandledEventTrigger>\r\n                        </i:Interaction.Triggers>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Background=\"Transparent\"\r\n\t\t\t\t        Visibility=\"{Binding Media.UploadingProgress, Converter={StaticResource ProgressToVisibilityConverter}}\">\r\n                        <i:Interaction.Triggers>\r\n                            <behaviors:HandledEventTrigger EventName=\"Tap\">\r\n                                <micro:ActionMessage MethodName=\"CancelUploading\">\r\n                                    <micro:ActionMessage.Parameters>\r\n                                        <micro:Parameter Value=\"{Binding Media}\"/>\r\n                                    </micro:ActionMessage.Parameters>\r\n                                </micro:ActionMessage>\r\n                            </behaviors:HandledEventTrigger>\r\n                        </i:Interaction.Triggers>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"-6,-30,-12,0\">\r\n        <telegramClient:LongListSelectorEx \r\n            Margin=\"-48,0,0,0\" \r\n            ItemsSource=\"{Binding Files}\"\r\n            toolkit:TiltEffect.SuppressTilt=\"True\"\r\n            IsSelectionEnabled=\"{Binding IsSelectionEnabled}\"\r\n            IsGroupingEnabled=\"True\"\r\n            HideEmptyGroups=\"True\"\r\n            JumpListStyle=\"{StaticResource FilesJumpListStyle}\"\r\n            GroupHeaderTemplate=\"{StaticResource GroupHeaderTemplate}\"\r\n            ManipulationStarted=\"Files_OnManipulationStarted\"\r\n            Knob=\"15\" micro:Message.Attach=\"[Event CloseToEnd] = [Action LoadNextSlice]\"\r\n            Style=\"{StaticResource LazyLongListSelectorStyle2}\">\r\n            <telegramClient:LongListSelectorEx.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                                Background=\"{StaticResource PhoneSubtleBrush}\"\r\n                                Opacity=\"0.3\" \r\n                                IsHitTestVisible=\"False\"\r\n                                Visibility=\"{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}\" \r\n                                HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"/>\r\n                        <CheckBox Grid.Column=\"0\" IsChecked=\"{Binding IsSelected}\" Margin=\"6,0,-12,0\" VerticalAlignment=\"Center\"/>\r\n                        <ContentControl Grid.Column=\"1\" Margin=\"0,0,18,0\"\r\n                            HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" \r\n                            Content=\"{Binding}\" ContentTemplate=\"{StaticResource FileTemplate}\" />\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                                Background=\"Transparent\" \r\n                                Tap=\"SelectionBorder_OnTap\" \r\n                                Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=LayoutRoot, Converter={StaticResource BooleanToVisibilityConverter}}\" \r\n                                HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </telegramClient:LongListSelectorEx.ItemTemplate>\r\n        </telegramClient:LongListSelectorEx>\r\n        <Border Margin=\"-48,0,0,0\" Width=\"49\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Left\" Background=\"{StaticResource PhoneBackgroundBrush}\" Visibility=\"{Binding IsSelectionEnabled, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\"/>\r\n\r\n        <Grid \r\n            VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\" \r\n            Visibility=\"{Binding IsEmptyList, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n            <StackPanel Margin=\"0,100,0,0\">\r\n                <Image Width=\"160\" Height=\"160\" Source=\"{Binding EmptyListImageSource}\" Stretch=\"UniformToFill\"/>\r\n                <TextBlock Text=\"{Binding Resources.ShareFiles, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Width=\"300\" Margin=\"12,40,12,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n        <TextBlock Margin=\"18,12\" Text=\"{Binding Status}\" TextWrapping=\"Wrap\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP8/Views/Media/FilesView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.ViewModels.Media;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class FilesView\r\n    {\r\n        public FilesViewModel<IInputPeer> ViewModel { get { return DataContext as FilesViewModel<IInputPeer>; } }  \r\n\r\n        public FilesView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        private void Files_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        private void DeleteMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            var channel = ViewModel.CurrentItem as TLChannel;\r\n            menuItem.Visibility = (channel == null || channel.Creator)\r\n                ? Visibility.Visible \r\n                : Visibility.Collapsed;\r\n        }\r\n\r\n        private void SelectionBorder_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            var element = sender as FrameworkElement;\r\n            if (element != null)\r\n            {\r\n                var message = element.DataContext as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    message.IsSelected = !message.IsSelected;\r\n                    ViewModel.ChangeGroupActionStatus();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP8/Views/Media/LinksView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.LinksView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:telegramClient=\"clr-namespace:TelegramClient\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <converters:DeclensionConverter x:Key=\"CountConverter\"\r\n                NominativeSingular=\"{Binding Resources.LinkNominativeSingular, Source={StaticResource Strings}}\"\r\n                NominativePlural=\"{Binding Resources.LinkNominativePlural, Source={StaticResource Strings}}\"\r\n                GenitiveSingular=\"{Binding Resources.LinkGenitiveSingular, Source={StaticResource Strings}}\"\r\n                GenitivePlural=\"{Binding Resources.LinkGenitivePlural, Source={StaticResource Strings}}\"/>\r\n            \r\n            <phone:JumpListItemBackgroundConverter x:Key=\"BackgroundConverter\" Enabled=\"{StaticResource TelegramAccentBrush}\"/>\r\n            <phone:JumpListItemForegroundConverter x:Key=\"ForegroundConverter\"/>\r\n            \r\n            <Style x:Key=\"FilesJumpListStyle\" TargetType=\"phone:LongListSelector\">\r\n                <Setter Property=\"LayoutMode\" Value=\"List\" />\r\n                <Setter Property=\"Margin\" Value=\"12,12,0,0\"/>\r\n                <Setter Property=\"ItemTemplate\">\r\n                    <Setter.Value>\r\n                        <DataTemplate>\r\n                            <Border Background=\"{Binding Converter={StaticResource BackgroundConverter}}\" \r\n                                Width=\"470\" \r\n                                Height=\"70\" \r\n                                Margin=\"6,6,18,6\">\r\n                                <TextBlock Text=\"{Binding KeyString}\"\r\n                                       Foreground=\"{Binding Converter={StaticResource ForegroundConverter}}\"\r\n                                       FontSize=\"23\"  \r\n                                       Padding=\"2\"\r\n                                       Margin=\"12,0\"\r\n                                       VerticalAlignment=\"Bottom\"/>\r\n                            </Border>\r\n                        </DataTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            \r\n            <DataTemplate x:Key=\"GroupHeaderTemplate\">\r\n                <Grid Margin=\"66,0,18,0\">\r\n                    <TextBlock Text=\"{Binding KeyString}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontSize=\"23\" Margin=\"0,18,18,6\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\"/>\r\n                    <TextBlock Text=\"{Binding Count, Converter={StaticResource CountConverter}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"23\" Margin=\"0,18,0,6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Visible}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"LinkTemplate\">\r\n                <Grid Margin=\"0,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width =\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid Width=\"64\" Height=\"64\" Margin=\"0,0,18,0\" Grid.Column=\"0\" Grid.Row=\"0\" VerticalAlignment=\"Top\">\r\n                        <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"{StaticResource PhoneChromeBrush}\"/>\r\n                        <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"{StaticResource PhoneSubtleBrush}\" Text=\"{Binding Converter={StaticResource LinkDefaultTextConverter}}\"/>\r\n                        <Image Source=\"{Binding Media.Self, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=90}\" Stretch=\"UniformToFill\"/>\r\n                    </Grid>\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Margin=\"0\" Grid.Row=\"0\" MaxHeight=\"72\" TextWrapping=\"Wrap\" Text=\"{Binding Converter={StaticResource MessageToWebPageCaptionConverter}}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontSize=\"27\"/>\r\n                        <emojiPanel:TelegramRichTextBox Margin=\"-12,0,0,0\" Grid.Row=\"1\" MaxHeight=\"81\" emojiPanel:BrowserNavigationService.SuppressParsing=\"True\" Text=\"{Binding Media.WebPage.Description}\" Visibility=\"{Binding Media.WebPage.DescriptionVisibility}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"20\" />\r\n                        <ItemsControl Grid.Row=\"2\" ItemsSource=\"{Binding Links}\">\r\n                            <ItemsControl.ItemTemplate>\r\n                                <DataTemplate>\r\n                                    <ListBoxItem toolkit:TiltEffect.SuppressTilt=\"False\">\r\n                                        <TextBlock micro:Message.Attach=\"[Event Tap] = [Action OpenLink($DataContext)]\" TextWrapping=\"NoWrap\" Text=\"{Binding}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" FontSize=\"20\"/>\r\n                                    </ListBoxItem>\r\n                                </DataTemplate>\r\n                            </ItemsControl.ItemTemplate>\r\n                        </ItemsControl>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"EmptyLinkTemplate\">\r\n                <Grid Margin=\"0,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width =\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid Width=\"64\" Height=\"64\" Margin=\"0,0,18,0\" Grid.Column=\"0\" Grid.Row=\"0\" VerticalAlignment=\"Top\">\r\n                        <Border VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" Background=\"{StaticResource PhoneChromeBrush}\"/>\r\n                        <TextBlock FontSize=\"27\" Margin=\"0,-2,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Foreground=\"{StaticResource PhoneSubtleBrush}\" Text=\"{Binding Converter={StaticResource LinkDefaultTextConverter}}\"/>\r\n                    </Grid>\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Margin=\"0\" Grid.Row=\"0\" MaxHeight=\"72\" TextWrapping=\"Wrap\" Text=\"{Binding WebPageTitle}\" Visibility=\"{Binding WebPageTitle, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontSize=\"27\"/>\r\n                        <ItemsControl Grid.Row=\"2\" ItemsSource=\"{Binding Links}\">\r\n                            <ItemsControl.ItemTemplate>\r\n                                <DataTemplate>\r\n                                    <ListBoxItem toolkit:TiltEffect.SuppressTilt=\"False\">\r\n                                        <TextBlock micro:Message.Attach=\"[Event Tap] = [Action OpenLink($DataContext)]\" TextWrapping=\"NoWrap\" Text=\"{Binding}\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" FontSize=\"20\"/>\r\n                                    </ListBoxItem>\r\n                                </DataTemplate>\r\n                            </ItemsControl.ItemTemplate>\r\n                        </ItemsControl>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <templateSelectors:LinkTemplateSelector\r\n                x:Key=\"LinkTemplateSelector\"\r\n                LinkTemplate=\"{StaticResource LinkTemplate}\"\r\n                EmptyLinkTemplate=\"{StaticResource EmptyLinkTemplate}\"/>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"-6,-30,-12,0\">\r\n        <telegramClient:LongListSelectorEx \r\n            Margin=\"-48,0,0,0\" \r\n            ItemsSource=\"{Binding Files}\"\r\n            toolkit:TiltEffect.SuppressTilt=\"True\"\r\n            IsSelectionEnabled=\"{Binding IsSelectionEnabled}\"\r\n            IsGroupingEnabled=\"True\"\r\n            HideEmptyGroups=\"True\"\r\n            JumpListStyle=\"{StaticResource FilesJumpListStyle}\"\r\n            GroupHeaderTemplate=\"{StaticResource GroupHeaderTemplate}\"\r\n            ManipulationStarted=\"Files_OnManipulationStarted\"\r\n            Knob=\"15\" micro:Message.Attach=\"[Event CloseToEnd] = [Action LoadNextSlice]\"\r\n            Style=\"{StaticResource LazyLongListSelectorStyle2}\">\r\n            <telegramClient:LongListSelectorEx.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                                Background=\"{StaticResource PhoneSubtleBrush}\"\r\n                                Opacity=\"0.3\" \r\n                                IsHitTestVisible=\"False\"\r\n                                Visibility=\"{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}\" \r\n                                HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"/>\r\n                        <CheckBox Grid.Column=\"0\" IsChecked=\"{Binding IsSelected}\" Margin=\"6,0,-12,0\" VerticalAlignment=\"Center\"/>\r\n                        <ContentControl Grid.Column=\"1\" Margin=\"0,0,18,0\"\r\n                            HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" \r\n                            Content=\"{Binding}\" ContentTemplate=\"{Binding Self, Converter={StaticResource LinkTemplateSelector}}\">\r\n                            <toolkit:ContextMenuService.ContextMenu>\r\n                                <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action DeleteMessage($DataContext)]\" Loaded=\"DeleteMessage_OnLoaded\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />\r\n                                    <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Action ForwardMessage($DataContext)]\" Header=\"{Binding Resources.Forward, Source={StaticResource Strings}}\"/>\r\n                                </toolkit:ContextMenu>\r\n                            </toolkit:ContextMenuService.ContextMenu>\r\n                        </ContentControl>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"2\" \r\n                                Background=\"Transparent\" \r\n                                Tap=\"SelectionBorder_OnTap\" \r\n                                Visibility=\"{Binding DataContext.IsSelectionEnabled, ElementName=LayoutRoot, Converter={StaticResource BooleanToVisibilityConverter}}\" \r\n                                HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </telegramClient:LongListSelectorEx.ItemTemplate>\r\n        </telegramClient:LongListSelectorEx>\r\n        <Border Margin=\"-48,0,0,0\" Width=\"49\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Left\" Background=\"{StaticResource PhoneBackgroundBrush}\" Visibility=\"{Binding IsSelectionEnabled, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\"/>\r\n\r\n        <Grid \r\n            VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\" \r\n            Visibility=\"{Binding IsEmptyList, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n            <StackPanel Margin=\"0,100,0,0\">\r\n                <Image Width=\"160\" Height=\"160\" Source=\"{Binding EmptyListImageSource}\" Stretch=\"UniformToFill\"/>\r\n                <TextBlock Text=\"{Binding Resources.ShareFiles, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Width=\"300\" Margin=\"12,40,12,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n        <TextBlock Margin=\"18,12\" Text=\"{Binding Status}\" TextWrapping=\"Wrap\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP8/Views/Media/LinksView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.ViewModels.Media;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class LinksView\r\n    {\r\n        public LinksViewModel<IInputPeer> ViewModel { get { return DataContext as LinksViewModel<IInputPeer>; } }\r\n\r\n        public LinksView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        private void Files_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        private void DeleteMessage_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menuItem = sender as MenuItem;\r\n            if (menuItem == null) return;\r\n\r\n            var channel = ViewModel.CurrentItem as TLChannel;\r\n            menuItem.Visibility = (channel == null || channel.Creator)\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n        }\r\n\r\n        private void SelectionBorder_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            var element = sender as FrameworkElement;\r\n            if (element != null)\r\n            {\r\n                var message = element.DataContext as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    message.IsSelected = !message.IsSelected;\r\n                    ViewModel.ChangeGroupActionStatus();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP8/Views/Media/MediaView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.MediaView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    xmlns:telegramClient=\"clr-namespace:TelegramClient\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <converters:MediaPhotoConverter x:Key=\"MediaPhotoConverter\"/>\r\n            \r\n            <phone:JumpListItemBackgroundConverter x:Key=\"BackgroundConverter\" Enabled=\"{StaticResource TelegramAccentBrush}\"/>\r\n            <phone:JumpListItemForegroundConverter x:Key=\"ForegroundConverter\"/>\r\n            \r\n            <Style x:Key=\"FilesJumpListStyle\" TargetType=\"phone:LongListSelector\">\r\n                <Setter Property=\"LayoutMode\" Value=\"List\" />\r\n                <Setter Property=\"Margin\" Value=\"12,12,0,0\"/>\r\n                <Setter Property=\"ItemTemplate\">\r\n                    <Setter.Value>\r\n                        <DataTemplate>\r\n                            <Border Background=\"{Binding Converter={StaticResource BackgroundConverter}}\" \r\n                                Width=\"470\" \r\n                                Height=\"70\" \r\n                                Margin=\"6,6,18,6\">\r\n                                <TextBlock Text=\"{Binding KeyString}\"\r\n                                       Foreground=\"{Binding Converter={StaticResource ForegroundConverter}}\"\r\n                                       FontSize=\"23\"  \r\n                                       Padding=\"2\"\r\n                                       Margin=\"12,0\"\r\n                                       VerticalAlignment=\"Bottom\"/>\r\n                            </Border>\r\n                        </DataTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            \r\n            <DataTemplate x:Key=\"GroupHeaderTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid>\r\n                        <TextBlock Text=\"{Binding KeyString}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontSize=\"23\" Margin=\"0,18,56,18\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\"/>\r\n                        <!--<TextBlock Text=\"{Binding Count}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"23\" Margin=\"0,18,18,6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\"/>-->\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n            \r\n            <DataTemplate x:Key=\"MessageVideoTemplate\">\r\n                <Border Background=\"{StaticResource PhoneChromeBrush}\" Width=\"146\" Height=\"146\" Margin=\"0,0,3,3\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <Grid Background=\"Transparent\" >\r\n                        <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}}\" Stretch=\"UniformToFill\"/>\r\n\r\n                        <Grid VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\" Margin=\"6\" Background=\"#80000000\">\r\n                            <TextBlock\r\n\t\t\t\t\t            VerticalAlignment=\"Center\" Margin=\"6,1,6,3\"\r\n\t\t\t\t\t            Text=\"{Binding Media.Video.DurationString}\"\r\n\t\t\t\t\t            Foreground=\"White\"\r\n\t\t\t\t\t            FontSize=\"18\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </Border>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"MessagePhotoTemplate\">\r\n                <Border Background=\"{StaticResource PhoneChromeBrush}\" Width=\"146\" Height=\"146\" Margin=\"0,0,3,3\" micro:Message.Attach=\"[Event Tap] = [Action OpenMedia($DataContext)]\">\r\n                    <Grid>\r\n                        <Image Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}}\" Stretch=\"UniformToFill\"/>\r\n                        <Image Source=\"{Binding Media.Photo, Converter={StaticResource MediaPhotoConverter}}\" Stretch=\"UniformToFill\"/>\r\n                    </Grid>\r\n                </Border>\r\n            </DataTemplate>\r\n\r\n            <DataTemplate x:Key=\"MessageEmptyTemplate\">\r\n                <Grid/>\r\n            </DataTemplate>\r\n\r\n            <templateSelectors:MediaGridTemplateSelector \r\n                x:Key=\"MediaGridTemplateSelector\"\r\n                PhotoTemplate=\"{StaticResource MessagePhotoTemplate}\"\r\n                VideoTemplate=\"{StaticResource MessageVideoTemplate}\"\r\n                EmptyTemplate=\"{StaticResource MessageEmptyTemplate}\"/>\r\n\r\n            <DataTemplate x:Key=\"MediaItemTemplate\">\r\n                <StackPanel Orientation=\"Horizontal\">\r\n                    <ContentControl Content=\"{Binding Message1}\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" ContentTemplate=\"{Binding Message1, Converter={StaticResource MediaGridTemplateSelector}}\"/>\r\n                    <ContentControl Content=\"{Binding Message2}\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" ContentTemplate=\"{Binding Message2, Converter={StaticResource MediaGridTemplateSelector}}\"/>\r\n                    <ContentControl Content=\"{Binding Message3}\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" ContentTemplate=\"{Binding Message3, Converter={StaticResource MediaGridTemplateSelector}}\"/>\r\n                </StackPanel>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"-6,-30,-12,0\">\r\n        <telegramClient:LongListSelectorEx\r\n            toolkit:TiltEffect.SuppressTilt=\"True\"\r\n            Margin=\"18,0,0,0\" \r\n            ItemsSource=\"{Binding Media}\"\r\n            ItemTemplate=\"{StaticResource MediaItemTemplate}\"\r\n            IsGroupingEnabled=\"True\"\r\n            HideEmptyGroups=\"True\"\r\n            JumpListStyle=\"{StaticResource FilesJumpListStyle}\"\r\n            GroupHeaderTemplate=\"{StaticResource GroupHeaderTemplate}\"\r\n            ItemRealized=\"LongListSelector_OnItemRealized\"\r\n            ItemUnrealized=\"LongListSelector_OnItemUnrealized\"\r\n            ManipulationStarted=\"Files_OnManipulationStarted\"\r\n            Knob=\"15\" \r\n            micro:Message.Attach=\"[Event CloseToEnd] = [Action LoadNextSlice]\">\r\n            <phone:LongListSelector.ListFooterTemplate>\r\n                <DataTemplate>\r\n                    <Grid Height=\"15\"/>\r\n                </DataTemplate>\r\n            </phone:LongListSelector.ListFooterTemplate>\r\n        </telegramClient:LongListSelectorEx>\r\n\r\n        <Grid \r\n            VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\" \r\n            Visibility=\"{Binding IsEmptyList, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n            <StackPanel Margin=\"0,100,0,0\">\r\n                <Image Width=\"160\" Height=\"160\" Source=\"{Binding EmptyListImageSource}\" Stretch=\"UniformToFill\"/>\r\n                <TextBlock Text=\"{Binding Resources.SharePhotosAndVideos, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Width=\"300\" Margin=\"12,40,12,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n        <TextBlock Margin=\"18,12\" Text=\"{Binding Status}\" TextWrapping=\"Wrap\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP8/Views/Media/MediaView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.ViewModels.Media;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class MediaView\r\n    {\r\n        public MediaViewModel<IInputPeer> ViewModel\r\n        {\r\n            get { return DataContext as MediaViewModel<IInputPeer>; }\r\n        } \r\n\r\n        public MediaView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            // FullHD\r\n            OptimizeFullHD();\r\n        }\r\n\r\n        ~MediaView()\r\n        {\r\n            \r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n            if (!isFullHD) return;\r\n\r\n            //BottomAppBarPlaceholder.Height = new GridLength(Constants.FullHDAppBarHeight);\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private void Files_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            if (_once) return;\r\n\r\n            _once = true;\r\n            ((ISliceLoadable)DataContext).LoadNextSlice();\r\n        }\r\n\r\n        public static IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj) where T : DependencyObject\r\n        {\r\n            if (depObj != null)\r\n            {\r\n                for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)\r\n                {\r\n                    DependencyObject child = VisualTreeHelper.GetChild(depObj, i);\r\n                    if (child != null && child is T)\r\n                    {\r\n                        yield return (T)child;\r\n                    }\r\n\r\n                    foreach (T childOfChild in FindVisualChildren<T>(child))\r\n                    {\r\n                        yield return childOfChild;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private List<MessagesRow> _unrealizedRows = new List<MessagesRow>(); \r\n\r\n        private void LongListSelector_OnItemUnrealized(object sender, ItemRealizationEventArgs e)\r\n        {\r\n            return;\r\n            if (e.ItemKind == LongListSelectorItemKind.Item)\r\n            {\r\n                var element = e.Container as FrameworkElement;\r\n                if (element != null)\r\n                {\r\n                    var messagesRow = element.DataContext as MessagesRow;\r\n                    if (messagesRow != null)\r\n                    {\r\n                        _unrealizedRows.Add(messagesRow);\r\n                        //System.Diagnostics.Debug.WriteLine(\"Unrealized row \" + ViewModel.Items.IndexOf(messagesRow));\r\n                    }\r\n                    return;\r\n                    var images = FindVisualChildren<Image>(element);\r\n                    foreach (var image in images)\r\n                    {\r\n                        if (image.Source == null)\r\n                        {\r\n                            var message = image.DataContext as TLMessage;\r\n                            if (message != null)\r\n                            {\r\n                                var mediaPhoto = message.Media as TLMessageMediaPhoto;\r\n                                if (mediaPhoto != null)\r\n                                {\r\n                                    var photo = mediaPhoto.Photo as TLPhoto;\r\n                                    if (photo != null)\r\n                                    {\r\n                                        ViewModel.CancelDownloading(photo);\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void LongListSelector_OnItemRealized(object sender, ItemRealizationEventArgs e)\r\n        {\r\n            return;\r\n            if (e.ItemKind == LongListSelectorItemKind.Item)\r\n            {\r\n                var element = e.Container as FrameworkElement;\r\n                if (element != null)\r\n                {\r\n                    var messagesRow = element.DataContext as MessagesRow;\r\n                    if (messagesRow != null)\r\n                    {\r\n                        _unrealizedRows.Remove(messagesRow);\r\n\r\n                        if (_unrealizedRows.Count > 0)\r\n                        {\r\n                            System.Diagnostics.Debug.WriteLine(\"Invoke unrealized row \" + _unrealizedRows.Count);\r\n                        }\r\n                    }\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP8/Views/Media/MultiImageEditorView.xaml",
    "content": "﻿<phone:PhoneApplicationPage x:Class=\"TelegramClient.Views.Media.MultiImageEditorView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:media=\"clr-namespace:TelegramClient.ViewModels.Media\"\r\n    xmlns:telegramControls=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"MainEditor\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <phone:PhoneApplicationPage.Resources>\r\n        <ResourceDictionary>\r\n            <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n            <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n            \r\n            <FontFamily x:Key=\"Segoe-MDL2\">/Fonts/Segoe-MDL2-Assets-MetroUI.ttf#Segoe-MDL2-Assets-MetroUI</FontFamily>\r\n            <converters:PhotoThumbConverter x:Key=\"PhotoThumbConverter\"/>\r\n            <DataTemplate x:Key=\"PhotoTemplate\">\r\n                <Grid Width=\"99\" Height=\"99\" Margin=\"0,12,12,12\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action SelectMessage($DataContext)]\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\" Loaded=\"ContextMenu_OnLoaded\">\r\n                            <toolkit:MenuItem Click=\"MenuItem_OnClick\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n                    <Border Background=\"{StaticResource PhoneChromeBrush}\" />\r\n                    <Image Stretch=\"UniformToFill\" Opacity=\"1\" ImageOpened=\"Image_OnImageOpened\" Loaded=\"FrameworkElement_OnLoaded\" Source=\"{Binding Self.Object.Media, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=800}\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                    <Border BorderBrush=\"{StaticResource TelegramBadgeAccentBrush}\" Margin=\"0\" BorderThickness=\"3\" Visibility=\"{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"/>\r\n                </Grid>\r\n            </DataTemplate>\r\n            <DataTemplate x:Key=\"ButtonTemplate\">\r\n                <ListBoxItem>\r\n                    <Grid Width=\"99\" Height=\"99\" Margin=\"0,12,12,12\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" Tap=\"AddButton_OnTap\">\r\n                        <Grid Width=\"43\" Height=\"43\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Line X2=\"28\" Stroke=\"White\" StrokeThickness=\"5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Line.RenderTransform>\r\n                                    <CompositeTransform TranslateX=\"7.5\" TranslateY=\"21.5\"/>\r\n                                </Line.RenderTransform>\r\n                            </Line>\r\n                            <Line Y2=\"28\" Stroke=\"White\" StrokeThickness=\"5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Line.RenderTransform>\r\n                                    <CompositeTransform TranslateX=\"21.5\" TranslateY=\"7.5\"/>\r\n                                </Line.RenderTransform>\r\n                            </Line>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n            <converters:PhotoFileToTemplateConverter x:Key=\"PhotoFileToTemplateConverter\"\r\n                PhotoTemplate=\"{StaticResource PhotoTemplate}\"\r\n                ButtonTemplate=\"{StaticResource ButtonTemplate}\"/>\r\n            <Style x:Key=\"CaptionTextBox\" TargetType=\"TextBox\">\r\n                <Setter Property=\"CaretBrush\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{StaticResource PhoneSubtleColor}\"/>\r\n                    </Setter.Value>\r\n                </Setter>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n                <Setter Property=\"SelectionBackground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n                <Setter Property=\"Padding\" Value=\"10,2\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"TextBox\">\r\n                            <Grid Background=\"Transparent\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Collapsed</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Visible</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"ReadOnly\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Collapsed</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Visible</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledOrReadonlyContent\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                        <VisualState x:Name=\"Focused\">\r\n                                            <Storyboard>\r\n                                                <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Unfocused\"/>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"9,15,9,18\">\r\n                                    <ContentControl x:Name=\"ContentElement\" Content=\"|Test\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                                </Border>\r\n                                <Border x:Name=\"DisabledOrReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                                    <TextBox x:Name=\"DisabledOrReadonlyContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\" FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" IsReadOnly=\"True\" SelectionForeground=\"{TemplateBinding SelectionForeground}\" SelectionBackground=\"{TemplateBinding SelectionBackground}\" TextAlignment=\"{TemplateBinding TextAlignment}\" TextWrapping=\"{TemplateBinding TextWrapping}\" Text=\"{TemplateBinding Text}\" Template=\"{StaticResource PhoneDisabledTextBoxTemplate}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <media:TimerSpanToBrushConverter \r\n                x:Name=\"TimerSpanToBrushConverter\"\r\n                AccentBrush=\"{StaticResource TelegramBadgeAccentBrush}\"\r\n                NormalBrush=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Style x:Key=\"GroupIconStyle\" TargetType=\"CheckBox\">\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n                <Setter Property=\"Background\" Value=\"{StaticResource PhoneRadioCheckBoxBrush}\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneRadioCheckBoxBorderBrush}\"/>\r\n                <Setter Property=\"FontSize\" Value=\"24\"/>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource Segoe-MDL2}\"/>\r\n                <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n                <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"VerticalAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"Padding\" Value=\"0\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"CheckBox\">\r\n                            <Grid Background=\"Transparent\" HorizontalAlignment=\"Left\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Pressed\"/>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"CheckStates\">\r\n                                        <VisualState x:Name=\"Checked\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Unchecked\"/>\r\n                                        <VisualState x:Name=\"Indeterminate\"/>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Grid Margin=\"18\">\r\n                                    <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalAlignment=\"Top\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </phone:PhoneApplicationPage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        \r\n        <Grid x:Name=\"BackgroundBorder\" Grid.RowSpan=\"2\" Background=\"{StaticResource PhoneBackgroundBrush}\" Margin=\"0,0,0,-1\" CacheMode=\"BitmapCache\"/>\r\n        <Grid x:Name=\"ImagesGrid\" Background=\"Transparent\" CacheMode=\"BitmapCache\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Grid.RenderTransform>\r\n            <Image x:Name=\"Preview\" Stretch=\"Uniform\" Source=\"{Binding CurrentItem.Object.Media, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=800}\"/>\r\n            <ContentControl\r\n                x:Name=\"InputMessageHintPlaceholder\" \r\n                Grid.Row=\"0\" Margin=\"24,12\" \r\n                HorizontalContentAlignment=\"Stretch\" \r\n                VerticalAlignment=\"Bottom\" \r\n                IsHitTestVisible=\"False\"/>\r\n        </Grid>\r\n        \r\n        <!-- Mentions -->\r\n        <ContentControl x:Name=\"UsernameHints\" \r\n            VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" \r\n            HorizontalContentAlignment=\"Stretch\" \r\n            Margin=\"0,-38,0,0\" MaxHeight=\"241\"\r\n            Tap=\"UsernameHint_OnTap\"\r\n            ManipulationStarted=\"UsernameHints_OnManipulationStarted\"/>\r\n        \r\n        <StackPanel Grid.Row=\"1\" x:Name=\"Bar\" Background=\"{StaticResource PhoneChromeBrush}\" VerticalAlignment=\"Bottom\" CacheMode=\"BitmapCache\">\r\n            <StackPanel.RenderTransform>\r\n                <CompositeTransform/>\r\n            </StackPanel.RenderTransform>\r\n            <Grid Visibility=\"{Binding IsCaptionEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                <Rectangle x:Name=\"TopBorder\" VerticalAlignment=\"Top\" Height=\"2\" Fill=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <TextBlock x:Name=\"CaptionWatermark\" Margin=\"20,0\" Text=\"{Binding Resources.AddCaption, Source={StaticResource Strings}}\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" VerticalAlignment=\"Center\"/>\r\n                <TextBox x:Name=\"Caption\" MaxLength=\"140\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" Text=\"{Binding Caption, Mode=TwoWay}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" InputScope=\"Text\" KeyDown=\"Caption_OnKeyDown\" GotFocus=\"Caption_OnGotFocus\" LostFocus=\"Caption_OnLostFocus\" TextChanged=\"Caption_OnTextChanged\" Style=\"{StaticResource CaptionTextBox}\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </TextBox>\r\n            </Grid>\r\n            <Grid>\r\n                <telegramControls:LongListSelector\r\n                    x:Name=\"Items\"\r\n                    ItemsSource=\"{Binding Items}\"\r\n                    Margin=\"0\"\r\n                    Height=\"123\"\r\n                    VerticalAlignment=\"Bottom\"\r\n                    IsFlatList=\"True\"\r\n                    Background=\"Transparent\"\r\n                    HorizontalScrollBarVisibility=\"Auto\"\r\n                    VerticalScrollBarVisibility=\"Disabled\"\r\n                    toolkit:TiltEffect.SuppressTilt=\"True\">\r\n                    <telegramControls:LongListSelector.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <ContentControl Content=\"{Binding}\" ContentTemplate=\"{Binding Converter={StaticResource PhotoFileToTemplateConverter}}\"/>\r\n                        </DataTemplate>\r\n                    </telegramControls:LongListSelector.ItemTemplate>\r\n                    <telegramControls:LongListSelector.ListHeaderTemplate>\r\n                        <DataTemplate>\r\n                            <Grid Height=\"123\" MinWidth=\"12\" DataContext=\"{Binding DataContext, ElementName=MainEditor}\">\r\n                                <CheckBox Tap=\"GroupedIcon_OnTap\" Visibility=\"{Binding GroupButtonVisibility}\" IsChecked=\"{Binding IsGrouped, Mode=TwoWay}\" Content=\"&#xE923;\" Style=\"{StaticResource GroupIconStyle}\"/>\r\n                            </Grid>\r\n                        </DataTemplate>\r\n                    </telegramControls:LongListSelector.ListHeaderTemplate>\r\n                    <telegramControls:LongListSelector.ItemsPanel>\r\n                        <ItemsPanelTemplate>\r\n                            <VirtualizingStackPanel Orientation=\"Horizontal\"/>\r\n                        </ItemsPanelTemplate>\r\n                    </telegramControls:LongListSelector.ItemsPanel>\r\n                </telegramControls:LongListSelector>\r\n                <Border x:Name=\"KeyboardPlaceholder\"/>\r\n            </Grid>\r\n            <Grid>\r\n                <Border x:Name=\"MorePanel\" Grid.Row=\"0\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n                    <Border.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </Border.RenderTransform>\r\n                </Border>\r\n                <controls:TelegramApplicationBar \r\n                        x:Name=\"AppBar\" \r\n                        VerticalAlignment=\"Bottom\"\r\n                        MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                    <controls:TelegramApplicationBar.Buttons>\r\n                        <controls:TelegramAppBarButton\r\n                                x:Name=\"DeleteButton\"\r\n                                Grid.Column=\"1\" \r\n                                IsEnabled=\"{Binding IsDeleteEnabled}\"\r\n                                Tap=\"Delete_OnClick\"\r\n                                ImageSource=\"/Images/W10M/ic_delete_2x.png\"\r\n                                Text=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                        <controls:TelegramAppBarButton\r\n                                x:Name=\"EditButton\"\r\n                                Grid.Column=\"2\" \r\n                                Tap=\"Edit_OnClick\"\r\n                                ImageSource=\"/Images/W10M/ic_edit_2x.png\"\r\n                                Text=\"{Binding Resources.Edit, Source={StaticResource Strings}}\"/>\r\n                        <controls:TelegramAppBarButton\r\n                                x:Name=\"TimerButton\"\r\n                                Grid.Column=\"0\" \r\n                                Tap=\"Timer_OnClick\"\r\n                                ImageSource=\"/Images/W10M/ic_timer_2x.png\"\r\n                                Visibility=\"{Binding TimerButtonVisibility}\"\r\n                                Text=\"{Binding Resources.Timer, Source={StaticResource Strings}}\"\r\n                                LabelForeground=\"{Binding CurrentItem.TimerSpan, Converter={StaticResource TimerSpanToBrushConverter}}\"/>\r\n                        <controls:TelegramAppBarButton\r\n                                x:Name=\"SendButton\"\r\n                                Grid.Column=\"3\" \r\n                                Tap=\"Done_Click\" \r\n                                IsEnabled=\"{Binding IsDoneEnabled}\"\r\n                                ImageSource=\"/Images/W10M/ic_send_2x.png\"\r\n                                Text=\"{Binding Resources.Send, Source={StaticResource Strings}}\"\r\n                                LabelForeground=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                    </controls:TelegramApplicationBar.Buttons>\r\n                </controls:TelegramApplicationBar>\r\n            </Grid>\r\n        </StackPanel>\r\n        <ContentControl x:Name=\"ExtendedImageEditorPlaceholder\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Visibility=\"Collapsed\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"/>\r\n    </Grid>\r\n</phone:PhoneApplicationPage>"
  },
  {
    "path": "TelegramClient.WP8/Views/Media/MultiImageEditorView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing Windows.UI.ViewManagement;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views.Additional;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\nusing PhotoFile = TelegramClient.Services.PhotoFile;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class MultiImageEditorView : IMultiImageEditorView\r\n    {\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public MultiImageEditorViewModel ViewModel\r\n        {\r\n            get { return DataContext as MultiImageEditorViewModel; }\r\n        }\r\n\r\n        public MultiImageEditorView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Visibility = Visibility.Collapsed;\r\n\r\n            BuildLocalizedAppBar();\r\n            \r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                TopBorder.Fill = (Brush)Resources[\"InputBorderBrushLight\"];\r\n            }\r\n            else\r\n            {\r\n                TopBorder.Fill = (Brush)Resources[\"InputBorderBrushDark\"];\r\n            }\r\n\r\n            Loaded += OnLoadedOnce;\r\n            Loaded += OnLoaded;\r\n            Unloaded += OnUnloaded;\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            InputPane.GetForCurrentView().Showing += InputPane_Showing;\r\n            InputPane.GetForCurrentView().Hiding += InputPane_Hiding;\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            InputPane.GetForCurrentView().Showing -= InputPane_Showing;\r\n            InputPane.GetForCurrentView().Hiding -= InputPane_Hiding;\r\n        }\r\n\r\n        private void InputPane_Hiding(InputPane sender, InputPaneVisibilityEventArgs args)\r\n        {\r\n            CaptionWatermark.Visibility = string.IsNullOrEmpty(Caption.Text) ? Visibility.Visible : Visibility.Collapsed;\r\n            KeyboardPlaceholder.Height = 0.0;\r\n            KeyboardPlaceholder.Visibility = Visibility.Collapsed;\r\n            ImagesGrid.Margin = new Thickness(0.0);\r\n\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n            var storyboard = new Storyboard();\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.20), Value = 0.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        private void InputPane_Showing(InputPane sender, InputPaneVisibilityEventArgs args)\r\n        {\r\n            var keyboardHeight = 480.0 / args.OccludedRect.Width * args.OccludedRect.Height - AppBar.ActualHeight + 18.0;\r\n\r\n            var height = GetKeyboardHeightDifference(keyboardHeight);\r\n            CaptionWatermark.Visibility = Visibility.Collapsed;\r\n            KeyboardPlaceholder.Height = keyboardHeight;\r\n            KeyboardPlaceholder.Visibility = Visibility.Visible;\r\n            ImagesGrid.Margin = new Thickness(0.0, 0.0, 0.0, -height);\r\n\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n            var storyboard = new Storyboard();\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = -height / 2.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        private void OnLoadedOnce(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= OnLoadedOnce;\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() => ViewModel.OpenEditor());\r\n        }\r\n\r\n        private bool _isOpening;\r\n\r\n        private void OpenExtendedImageEditorInternal()\r\n        {\r\n            _isOpening = true;\r\n            ExtendedImageEditorPlaceholder.Visibility = Visibility.Visible;\r\n            _extendedImageEditor.UpdateRecentButtonsVisibility();\r\n            _extendedImageEditor.BeginOpenStoryboard(() =>\r\n            {\r\n                _isOpening = false;\r\n                BackgroundBorder.Visibility = Visibility.Collapsed;\r\n                ImagesGrid.Visibility = Visibility.Collapsed;\r\n                Bar.Visibility = Visibility.Collapsed;\r\n            });\r\n        }\r\n\r\n        private void CloseExtendedImageEditorIntarnal(bool confirm = true)\r\n        {\r\n            var result = MessageBoxResult.OK;\r\n            if (confirm && _extendedImageEditor.PreviewCanvas.Children.Count > 1)\r\n            {\r\n                result = MessageBox.Show(AppResources.DiscardChangesConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            }\r\n            if (result != MessageBoxResult.OK) return;\r\n\r\n            BackgroundBorder.Visibility = Visibility.Visible;\r\n            ImagesGrid.Visibility = Visibility.Visible;\r\n            Bar.Visibility = Visibility.Visible;\r\n            _extendedImageEditor.BeginCloseStoryboard(() =>\r\n            {\r\n                ExtendedImageEditorPlaceholder.Visibility = Visibility.Collapsed;\r\n            });\r\n            \r\n            Focus();\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (ViewModel.IsOpen)\r\n                {\r\n                    BeginOpenStoryboard();\r\n                }\r\n                else\r\n                {\r\n                    BeginCloseStoryboard();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsDoneEnabled))\r\n            {\r\n                _doneButton.IsEnabled = ViewModel.IsDoneEnabled;\r\n            }\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            return;\r\n\r\n            if (ApplicationBar != null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            ApplicationBar = new ApplicationBar { Opacity = 0.9999, IsVisible = false };\r\n            //ApplicationBar.BackgroundColor = Colors.Black;\r\n            //ApplicationBar.ForegroundColor = Colors.White;\r\n            ApplicationBar.StateChanged += (o, e) =>\r\n            {\r\n                ApplicationBar.Opacity = e.IsMenuVisible ? 0.9999 : 0.0;\r\n            };\r\n\r\n            _doneButton.Click += (sender, args) => AppBarAction(ViewModel.Done);\r\n            _doneButton.IsEnabled = false;\r\n            _cancelButton.Click += (sender, args) => AppBarAction(ViewModel.Cancel);\r\n\r\n            ApplicationBar.Buttons.Add(_doneButton);\r\n            ApplicationBar.Buttons.Add(_cancelButton);\r\n        }\r\n\r\n        private void AppBarAction(System.Action action)\r\n        {\r\n            if (FocusManager.GetFocusedElement() == Caption)\r\n            {\r\n                Items.Focus();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.20), action.SafeInvoke);\r\n            }\r\n            else\r\n            {\r\n                action.SafeInvoke();\r\n            }\r\n        }\r\n\r\n        private void BeginCloseStoryboard()\r\n        {\r\n            SystemTray.IsVisible = true;\r\n            //ApplicationBar.IsVisible = false;\r\n\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            var opacityImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            opacityImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0 });\r\n            Storyboard.SetTarget(opacityImageAniamtion, BackgroundBorder);\r\n            Storyboard.SetTargetProperty(opacityImageAniamtion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityImageAniamtion);\r\n\r\n            var translateBarAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0 });\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateBarAniamtion, Bar);\r\n            Storyboard.SetTargetProperty(translateBarAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateBarAniamtion);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (o, args) =>\r\n            {\r\n                Visibility = Visibility.Collapsed;\r\n            };\r\n        }\r\n\r\n        private void BeginOpenStoryboard()\r\n        {\r\n            SystemTray.IsVisible = false;\r\n            //ApplicationBar.IsVisible = true;\r\n\r\n            var transparentBlack = Colors.Black;\r\n            transparentBlack.A = 0;\r\n\r\n            CaptionWatermark.Visibility = Visibility.Visible;\r\n            Visibility = Visibility.Visible;\r\n            ImagesGrid.Opacity = 1.0;\r\n            ImagesGrid.RenderTransform = new CompositeTransform();\r\n            BackgroundBorder.Opacity = 1.0;\r\n\r\n\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            ((CompositeTransform)ImagesGrid.RenderTransform).TranslateY = translateYTo;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = 0.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, ImagesGrid);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            var translateBarAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = translateYTo });\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateBarAniamtion, Bar);\r\n            Storyboard.SetTargetProperty(translateBarAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateBarAniamtion);\r\n\r\n            storyboard.Completed += (sender, args) => ViewModel.OpenAnimationComplete();\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        private void Caption_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            return;\r\n            \r\n        }\r\n\r\n        private double GetKeyboardHeightDifference(double keyboardHeight)\r\n        {\r\n            var heightDifference = keyboardHeight - Items.ActualHeight;\r\n\r\n            return heightDifference;\r\n        }\r\n\r\n        private void Caption_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            return;\r\n        }\r\n\r\n        private void Caption_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            CaptionWatermark.Visibility = string.IsNullOrEmpty(Caption.Text) && FocusManager.GetFocusedElement() != Caption ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        private void Caption_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                if (ViewModel.Items.Count == 1)\r\n                {\r\n                    ViewModel.Done();\r\n                }\r\n                else\r\n                {\r\n                    Items.Focus();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Image_OnImageOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            var image = (Image) sender;\r\n            image.Opacity = 0.0;\r\n            var storyboard = new Storyboard();\r\n\r\n            var opacityImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            opacityImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.5), Value = 1.0 });\r\n            Storyboard.SetTarget(opacityImageAniamtion, image);\r\n            Storyboard.SetTargetProperty(opacityImageAniamtion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityImageAniamtion);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private static List<Telegram.Api.WindowsPhone.Tuple<PhotoFile, Image>> _imagesCache = new List<Telegram.Api.WindowsPhone.Tuple<PhotoFile, Image>>();\r\n\r\n        private void FrameworkElement_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var image = (Image) sender;\r\n            var photoFile = image.DataContext as PhotoFile;\r\n            _imagesCache.Add(new Telegram.Api.WindowsPhone.Tuple<PhotoFile, Image>(photoFile, image));\r\n        }\r\n\r\n        public static void ImageOpened(PhotoFile photoFile)\r\n        {\r\n            var tuple = _imagesCache.LastOrDefault(x => x.Item1 == photoFile);\r\n            _imagesCache.Remove(tuple);\r\n            if (tuple != null)\r\n            {\r\n                var image = tuple.Item2;\r\n                image.Opacity = 0.0;\r\n                var storyboard = new Storyboard();\r\n\r\n                var opacityImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n                opacityImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.5), Value = 1.0 });\r\n                Storyboard.SetTarget(opacityImageAniamtion, image);\r\n                Storyboard.SetTargetProperty(opacityImageAniamtion, new PropertyPath(\"Opacity\"));\r\n                storyboard.Children.Add(opacityImageAniamtion);\r\n\r\n                storyboard.Begin();\r\n            }\r\n        }\r\n\r\n        private void ContextMenu_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var menu = (ContextMenu) sender;\r\n            menu.Visibility = ViewModel.Items.FirstOrDefault(x => x.Message != null) != null ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        private void MenuItem_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            DeleteCurrentItem();\r\n        }\r\n\r\n        private void Delete_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            DeleteCurrentItem();\r\n        }\r\n\r\n        private ExtendedImageEditor _extendedImageEditor;\r\n\r\n        private void Edit_OnClick(object sender, RoutedEventArgs args)\r\n        {\r\n            var photoFile = ViewModel.CurrentItem;\r\n            if (photoFile != null)\r\n            {\r\n                if (photoFile.IsButton) return;\r\n                if (photoFile.File == null) return;\r\n\r\n                var previewBitmap = Preview.Source as BitmapSource;\r\n                if (previewBitmap == null) return;\r\n\r\n                if (_extendedImageEditor == null)\r\n                {\r\n                    _extendedImageEditor = new ExtendedImageEditor();\r\n                    _extendedImageEditor.Done += (o, e) =>\r\n                    {\r\n                        CloseExtendedImageEditorIntarnal(false);\r\n                    };\r\n                    _extendedImageEditor.Cancel += (o, e) =>\r\n                    {\r\n                        CloseExtendedImageEditorIntarnal();\r\n                    };\r\n                    ExtendedImageEditorPlaceholder.Content = _extendedImageEditor;\r\n                }\r\n                \r\n                OpenExtendedImageEditorInternal();\r\n                _extendedImageEditor.Detect(photoFile, previewBitmap);\r\n            }\r\n        }\r\n\r\n        private void DeleteCurrentItem()\r\n        {\r\n            var photoFile = ViewModel.CurrentItem;\r\n            if (photoFile != null)\r\n            {\r\n                if (photoFile.IsButton) return;\r\n                \r\n                var index = ViewModel.Items.IndexOf(photoFile);\r\n                if (index == -1) return;\r\n\r\n                var container = Items.ContainerFromItem(photoFile);\r\n                if (container != null)\r\n                {\r\n                    var storyboard = new Storyboard();\r\n\r\n                    var opacityImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n                    opacityImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame\r\n                    {\r\n                        KeyTime = TimeSpan.FromSeconds(0.25),\r\n                        Value = 0.0\r\n                    });\r\n                    Storyboard.SetTarget(opacityImageAniamtion, container);\r\n                    Storyboard.SetTargetProperty(opacityImageAniamtion, new PropertyPath(\"Opacity\"));\r\n                    storyboard.Children.Add(opacityImageAniamtion);\r\n\r\n                    storyboard.Begin();\r\n                    storyboard.Completed += (o, args) => ViewModel.Delete(photoFile);\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsExtendedImageEditorOpened\r\n        {\r\n            get { return _extendedImageEditor != null && ExtendedImageEditorPlaceholder.Visibility == Visibility.Visible; }\r\n        }\r\n\r\n        public void CloseExtendedImageEditor()\r\n        {\r\n            if (_extendedImageEditor.IsStickerPanelOpened)\r\n            {\r\n                _extendedImageEditor.CloseStickerPanel();\r\n            }\r\n            else if (_isOpening)\r\n            {\r\n                CloseExtendedImageEditorIntarnal();\r\n                return;\r\n            }\r\n            else if (ExtendedImageEditorPlaceholder.Visibility == Visibility.Visible)\r\n            {\r\n                CloseExtendedImageEditorIntarnal();\r\n                return;\r\n            }\r\n        }\r\n\r\n        private void Done_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n\r\n            if (_extendedImageEditor != null)\r\n            {\r\n                var stickersControl = _extendedImageEditor.StickersPanel.Content as StickersControl;\r\n                if (stickersControl != null)\r\n                {\r\n                    var viewModel = ViewModel;\r\n                    Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                    {\r\n                        var stickers = new List<TLDocument22>();\r\n                        var masks = new List<TLDocument22>();\r\n\r\n                        foreach (var item in viewModel.Items)\r\n                        {\r\n                            var message = item.Message as TLMessage48;\r\n                            if (message != null && message.Documents != null)\r\n                            {\r\n                                foreach (var document in message.Documents)\r\n                                {\r\n                                    var document54 = document as TLDocument54;\r\n                                    if (document54 != null)\r\n                                    {\r\n                                        var attributeSticker = document54.Attributes.FirstOrDefault(x => x is TLDocumentAttributeSticker56) as TLDocumentAttributeSticker56;\r\n                                        if (attributeSticker != null)\r\n                                        {\r\n                                            if (attributeSticker.Mask)\r\n                                            {\r\n                                                masks.Add(document54);\r\n                                            }\r\n                                            else\r\n                                            {\r\n                                                stickers.Add(document54);\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        stickersControl.UpdateRecentAsync(stickers, masks);\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ClosePreview()\r\n        {\r\n            if (_extendedImageEditor != null)\r\n            {\r\n                _extendedImageEditor.ClosePreview();\r\n            }\r\n        }\r\n\r\n        private void Timer_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            var stateService = IoC.Get<IStateService>();\r\n            stateService.SelectedTimerSpan = ViewModel.CurrentItem.TimerSpan;\r\n            var chooseTTLViewModel = IoC.Get<ChooseTTLViewModel>();\r\n            chooseTTLViewModel.Subtitle = AppResources.SelfDestructTimerPhotoSubtitle;\r\n\r\n            var chooseTTLView = new ChooseTTLView { Height = 330.0, DataContext = chooseTTLViewModel, Margin = new Thickness(0.0, -34.0, 0.0, -6.0) };\r\n            ShellViewModel.ShowCustomMessageBox(null, null, AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                result =>\r\n                {\r\n                    if (result == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        var selector = chooseTTLView.Selector;\r\n\r\n                        ViewModel.CurrentItem.TimerSpan = ((TimerSpan)selector.DataSource.SelectedItem);\r\n                    }\r\n                },\r\n                chooseTTLView);\r\n        }\r\n\r\n        private void AddButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.PickPhoto();\r\n        }\r\n\r\n        private void GroupedIcon_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ShowHint();\r\n        }\r\n\r\n        private void ShowHint()\r\n        {\r\n            if (InputMessageHintPlaceholder.Content == null)\r\n            {\r\n                var control = new InputMessageHint(true);\r\n                control.FontSize = new ScaledText().DefaultFontSize;\r\n                control.Closed += OnInputMessageHintClosed;\r\n\r\n                InputMessageHintPlaceholder.Content = control;\r\n            }\r\n\r\n            var inputMessageHint = InputMessageHintPlaceholder.Content as InputMessageHint;\r\n            if (inputMessageHint != null)\r\n            {\r\n                inputMessageHint.Hint = ViewModel.IsGrouped ? AppResources.GroupMediaDescription : AppResources.UngroupMediaDescription;\r\n            }\r\n        }\r\n\r\n        private void OnInputMessageHintClosed(object sender, System.EventArgs e)\r\n        {\r\n            var control = sender as InputMessageHint;\r\n            if (control != null)\r\n            {\r\n                control.Closed -= OnInputMessageHintClosed;\r\n            }\r\n\r\n            InputMessageHintPlaceholder.Content = null;\r\n        }\r\n\r\n        private void UsernameHint_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Caption.Focus();\r\n\r\n            var frameworkElement = e.OriginalSource as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var user = frameworkElement.DataContext as IUserName;\r\n                if (user != null)\r\n                {\r\n                    var userBase = user as TLUserBase;\r\n\r\n                    var index = 0;\r\n                    for (var i = Caption.Text.Length - 1; i >= 0; i--)\r\n                    {\r\n                        if (Caption.Text[i] == '@')\r\n                        {\r\n                            index = i;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (TLString.IsNullOrEmpty(user.UserName))\r\n                    {\r\n                        if (userBase != null)\r\n                        {\r\n                            ViewModel.AddMention(userBase);\r\n\r\n                            Caption.Text = string.Format(\"{0}({1})\", Caption.Text.Substring(0, index + 1), userBase.FullName);\r\n                            Caption.SelectionStart = Caption.Text.Length - userBase.FullName.Length - 1;\r\n                            Caption.SelectionLength = userBase.FullName.Length;\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Caption.Text = string.Format(\"{0}{1} \", Caption.Text.Substring(0, index + 1), user.UserName);\r\n                        Caption.SelectionStart = Caption.Text.Length;\r\n                        Caption.SelectionLength = 0;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UsernameHints_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ViewModel.ContinueLoadMentionHints();\r\n        }\r\n    }\r\n\r\n    public interface IMultiImageEditorView\r\n    {\r\n        bool IsExtendedImageEditorOpened { get; }\r\n\r\n        void CloseExtendedImageEditor();\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP8/app.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<configuration>\r\n  <runtime>\r\n    <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\r\n      <dependentAssembly>\r\n        <assemblyIdentity name=\"Microsoft.Phone.Controls\" publicKeyToken=\"24eec0d8c86cda1e\" culture=\"neutral\" />\r\n        <bindingRedirect oldVersion=\"0.0.0.0-8.0.0.0\" newVersion=\"8.0.0.0\" />\r\n      </dependentAssembly>\r\n    </assemblyBinding>\r\n  </runtime>\r\n</configuration>"
  },
  {
    "path": "TelegramClient.WP8/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Caliburn.Micro\" version=\"1.5.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Coding4Fun.Toolkit.Controls\" version=\"2.0.7\" targetFramework=\"wp71\" />\r\n  <package id=\"ID3\" version=\"0.3.0\" targetFramework=\"wp80\" />\r\n  <package id=\"ImageTools\" version=\"0.3.1\" targetFramework=\"wp80\" />\r\n  <package id=\"libphonenumber-csharp-portable\" version=\"1.0.0.2\" targetFramework=\"wp80\" />\r\n  <package id=\"Rx-Core\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-Interfaces\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-Linq\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-Main\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-PlatformServices\" version=\"2.2.3\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-XAML\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"WPtoolkit\" version=\"4.2013.08.16\" targetFramework=\"wp80\" />\r\n</packages>"
  },
  {
    "path": "TelegramClient.WP81/BackgroundProcess.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Runtime.InteropServices.WindowsRuntime;\r\nusing System.Threading;\r\nusing Microsoft.Phone.Networking.Voip;\r\nusing PhoneVoIPApp.BackEnd;\r\nusing PhoneVoIPApp.BackEnd.OutOfProcess;\r\n\r\nnamespace PhoneVoIPApp.UI\r\n{\r\n    /// <summary>\r\n    /// A class used by the VoIP UI to connect to and control the VoIP background agent host process.\r\n    /// </summary>\r\n    /// <remarks>This class is a singleton.</remarks>\r\n    public sealed class BackgroundProcessController\r\n    {\r\n        #region Properties\r\n\r\n        /// <summary>\r\n        /// Get the single instance of this class\r\n        /// </summary>\r\n        public static BackgroundProcessController Instance\r\n        {\r\n            get\r\n            {\r\n                if (BackgroundProcessController.singleton == null)\r\n                {\r\n                    BackgroundProcessController.singleton = new BackgroundProcessController();\r\n                }\r\n\r\n                return BackgroundProcessController.singleton;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get the object that can be used to create and control VoIP calls.\r\n        /// </summary>\r\n        /// <remarks>The returned object is a proxy object to the real call controller\r\n        /// object that exists in the  VoIP background agent host process.</remarks>\r\n        public CallController CallController\r\n        {\r\n            get\r\n            {\r\n                if (server != null)\r\n                {\r\n                    return server.CallController;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Methods\r\n\r\n        /// <summary>\r\n        /// A method that lets the VoIP background process know that the UI process is connected to it.\r\n        /// Call this method at the beginning of the Launching and Activated event handlers.\r\n        /// </summary>\r\n        public void ConnectUi()\r\n        {\r\n            if (this.isConnected)\r\n            {\r\n                // Nothing more to be done\r\n                return;\r\n            }\r\n\r\n            // Start the VoIP background agent host process, if it is not started already\r\n            int backgroundProcessId;\r\n            try\r\n            {\r\n                VoipBackgroundProcess.Launch(out backgroundProcessId);\r\n            }\r\n            catch (Exception err)\r\n            {\r\n                Debug.WriteLine(\"[App] Error launching VoIP background process. UI may no longer be in the foreground. Exception: \" + err.Message);\r\n                throw;\r\n            }\r\n\r\n            // Wait for the background process to become ready\r\n            string backgroundProcessReadyEventName = Globals.GetBackgroundProcessReadyEventName((uint)backgroundProcessId);\r\n            using (EventWaitHandle backgroundProcessReadyEvent = new EventWaitHandle(initialState: false, mode: EventResetMode.ManualReset, name: backgroundProcessReadyEventName))\r\n            {\r\n                TimeSpan timeout = Debugger.IsAttached ? BackgroundProcessController.indefiniteWait : BackgroundProcessController.fifteenSeconds;\r\n                if (!backgroundProcessReadyEvent.WaitOne(timeout))\r\n                {\r\n                    // We timed out - something is wrong\r\n                    throw new InvalidOperationException(string.Format(\"The background process did not become ready in {0} milliseconds\", timeout.Milliseconds));\r\n                }\r\n                else\r\n                {\r\n                    Debug.WriteLine(\"[App] Background process {0} is ready\", backgroundProcessId);\r\n                }\r\n            }\r\n\r\n            // The background process is now ready.\r\n            // It is possible that the background process now becomes \"not ready\" again, but the chances of this happening are slim,\r\n            // and in that case, the following statement would fail - so, at this point, we don't explicitly guard against this condition.\r\n            \r\n            // Create an instance of the server in the background process.\r\n            this.server = (Server)WindowsRuntimeMarshal.GetActivationFactory(typeof(Server)).ActivateInstance();\r\n\r\n            // Un-set an event that indicates that the UI process is disconnected from the background process.\r\n            // The VoIP background process waits for this event to get set before shutting down.\r\n            // This ensures that the VoIP background agent host process doesn't shut down while the UI process is connected to it.\r\n            string uiDisconnectedEventName = Globals.GetUiDisconnectedEventName((uint)backgroundProcessId);\r\n            this.uiDisconnectedEvent = new EventWaitHandle(initialState: false, mode: EventResetMode.ManualReset, name: uiDisconnectedEventName);\r\n            this.uiDisconnectedEvent.Reset();\r\n\r\n            // The UI process is now connected to the background process\r\n            this.isConnected = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// A method that lets the VoIP background process know that the UI is no longer connected to it.\r\n        /// Call this method at the end of the the Deactivated and Closing event handlers.\r\n        /// </summary>\r\n        public void DisconnectUi()\r\n        {\r\n            if (!this.isConnected)\r\n            {\r\n                // Nothing more to be done\r\n                return;\r\n            }\r\n\r\n            // This process is no longer connected to the background process\r\n            this.isConnected = false;\r\n\r\n            // From this point onwards, it is no longer safe to use any objects in the VoIP background process,\r\n            // or for the VoIP background process to call back into this process.\r\n            this.server = null;\r\n\r\n            // Lastly, set the event that indicates that the UI is no longer connected to the background process.\r\n            if (this.uiDisconnectedEvent != null)\r\n            {\r\n                this.uiDisconnectedEvent.Set();\r\n                this.uiDisconnectedEvent.Dispose();\r\n                this.uiDisconnectedEvent = null;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Private members\r\n\r\n        /// <summary>\r\n        /// Private constructor\r\n        /// </summary>\r\n        private BackgroundProcessController()\r\n        {\r\n            // Nothing to do here\r\n        }\r\n\r\n        // A timespan representing fifteen seconds\r\n        private static readonly TimeSpan fifteenSeconds = new TimeSpan(0, 0, 15);\r\n\r\n        // A timespan representing an indefinite wait\r\n        private static readonly TimeSpan indefiniteWait = new TimeSpan(0, 0, 0, 0, -1);\r\n\r\n        // The single instance of this class\r\n        private static BackgroundProcessController singleton;\r\n\r\n        // Indicates if the UI process is in the foreground or not\r\n        private bool isConnected;\r\n\r\n        // An event that indicates that the UI process is no longer connected to the background process\r\n        private EventWaitHandle uiDisconnectedEvent;\r\n\r\n        // A proxy to the server object in the VoIP background agent host process\r\n        private Server server;\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Behaviors/FocusNextElementOnEnterBehavior.cs",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Interactivity;\r\n\r\nnamespace TelegramClient.Behaviors\r\n{\r\n    public class FocusNextElementOnEnterBehavior : Behavior<UIElement>\r\n    {\r\n        public static readonly DependencyProperty NextControlProperty = DependencyProperty.Register(\r\n            \"NextControl\", typeof (Control), typeof (FocusNextElementOnEnterBehavior), new PropertyMetadata(default(Control)));\r\n\r\n        public Control NextControl\r\n        {\r\n            get { return (Control) GetValue(NextControlProperty); }\r\n            set { SetValue(NextControlProperty, value); }\r\n        }\r\n\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n\r\n            AssociatedObject.KeyDown += AssociatedObject_KeyDown;\r\n        }\r\n\r\n        private void AssociatedObject_KeyDown(object sender, KeyEventArgs args)\r\n        {\r\n            if (args.Key == Key.Enter)\r\n            {\r\n                if (NextControl != null)\r\n                {\r\n                    NextControl.Focus();\r\n                }\r\n            }\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            AssociatedObject.KeyDown -= AssociatedObject_KeyDown;\r\n\r\n            base.OnDetaching();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Behaviors/InfiniteScrollingBehavior.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows.Interactivity;\r\nusing Microsoft.Phone.Controls;\r\n\r\nnamespace TelegramClient.Behaviors\r\n{\r\n    public class IncrementalLoadingTrigger : TriggerBase<LongListSelector>\r\n    {\r\n        private int _knob = 1;\r\n\r\n        public int Knob\r\n        {\r\n            get { return _knob; }\r\n            set { _knob = value; }\r\n        }\r\n\r\n        protected override void OnAttached()\r\n        {\r\n            base.OnAttached();\r\n            AssociatedObject.ItemRealized += OnItemRealized;\r\n        }\r\n\r\n        private void OnItemRealized(object sender, ItemRealizationEventArgs e)\r\n        {\r\n            var longListSelector = sender as LongListSelector;\r\n            if (longListSelector == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var item = e.Container.Content;\r\n            var items = longListSelector.ItemsSource;\r\n            var index = items.IndexOf(item);\r\n\r\n            //if (items.Count >= Knob\r\n            //    && e.Container.Content.Equals(longListSelector.ItemsSource[longListSelector.ItemsSource.Count - Knob]))\r\n            //{\r\n            //    InvokeActions(null);\r\n            //}\r\n\r\n            if (items.Count - index <= Knob)\r\n            {\r\n                InvokeActions(null);\r\n            }\r\n        }\r\n\r\n        protected override void OnDetaching()\r\n        {\r\n            base.OnDetaching();\r\n            AssociatedObject.ItemRealized -= OnItemRealized;\r\n        }\r\n    }\r\n\r\n    public class InfiniteScrollingBehavior : Behavior<LongListSelector>\r\n    {\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/BugsenseWrapper.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing BugSense;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient\r\n{\r\n    class BugSenseWrapper\r\n    {\r\n        private static readonly List<Tuple<Exception, string, NotificationOptions>> _delayedErrors = new List<Tuple<Exception, string, NotificationOptions>>();\r\n\r\n        private static readonly object _bugSenseSyncRoot = new object();\r\n\r\n        private static bool _isInitialized;\r\n\r\n        private BugSenseWrapper()\r\n        {\r\n            \r\n        }\r\n\r\n        public static void LogError(Exception ex, string comment = null, NotificationOptions options = null)\r\n        {\r\n            lock (_bugSenseSyncRoot)\r\n            {\r\n                if (!_isInitialized)\r\n                {\r\n                    _delayedErrors.Add(new Tuple<Exception, string, NotificationOptions>(ex, comment, options));\r\n                    return;\r\n                }\r\n            }\r\n\r\n            try\r\n            {\r\n                BugSenseHandler.Instance.LogError(ex, comment, options);\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                Telegram.Logs.Log.Write(\"BugSenseWrapper\\n\" + e);\r\n            }\r\n        }\r\n\r\n        public static void Init()\r\n        {\r\n#if PRIVATE_BETA\r\n            const string apiKey = \"b6f57378\";\r\n#else\r\n            const string apiKey = \"e715f5e8\";\r\n#endif\r\n            BugSenseHandler.Instance.Init(Application.Current, apiKey, new NotificationOptions { Type = enNotificationType.None });\r\n            BugSenseHandler.Instance.UnhandledException += (sender, args) =>\r\n            {\r\n                TLUtils.WriteLine(args.ExceptionObject.ToString(), LogSeverity.Error);\r\n\r\n                args.Handled = true;\r\n            };\r\n\r\n            lock (_bugSenseSyncRoot)\r\n            {\r\n                _isInitialized = true;\r\n                foreach (var error in _delayedErrors)\r\n                {\r\n                    try\r\n                    {\r\n                        BugSenseHandler.Instance.LogError(error.Item1, error.Item2, error.Item3);\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"BugSenseWrapper delayed\\n\" + ex);\r\n                    }\r\n                }\r\n                _delayedErrors.Clear();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/GestureListener/GestureHelperEventArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Controls.GestureListener\r\n{\r\n    /// <summary>\r\n    /// The base class for all gesture events. Also used by Tap, DoubleTap and Hold.\r\n    /// </summary>\r\n    public class GestureEventArgs : System.EventArgs\r\n    {\r\n        /// <summary>\r\n        /// The point, in unrotated screen coordinates, where the gesture occurred.\r\n        /// </summary>\r\n        protected Point GestureOrigin { get; private set; }\r\n        \r\n        /// <summary>\r\n        /// The point, in unrotated screen coordinates, where the first touchpoint is now.\r\n        /// </summary>\r\n        protected Point TouchPosition { get; private set; }\r\n\r\n        internal GestureEventArgs(Point gestureOrigin, Point position)\r\n        {\r\n            GestureOrigin = gestureOrigin;\r\n            TouchPosition = position;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The first hit-testable item under the touch point. Determined by a combination of order in the tree and\r\n        /// Z-order.\r\n        /// </summary>\r\n        public object OriginalSource { get; internal set; }\r\n\r\n        /// <summary>\r\n        /// If an event handler sets this to true, it stops event bubbling.\r\n        /// </summary>\r\n        public bool Handled { get; set; }\r\n\r\n        /// <summary>\r\n        /// Returns the position of the gesture's starting point relative to a given UIElement.\r\n        /// </summary>\r\n        /// <param name=\"relativeTo\">The return value will be relative to this element.</param>\r\n        /// <returns>The gesture's starting point relative to the given UIElement.</returns>\r\n        public Point GetPosition(UIElement relativeTo)\r\n        {\r\n            return GetPosition(relativeTo, TouchPosition);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the position of a given point relative to a given UIElement.\r\n        /// </summary>\r\n        /// <param name=\"relativeTo\">The return value will be relative to this element.</param>\r\n        /// <param name=\"point\">The point to translate.</param>\r\n        /// <returns>The given point relative to the given UIElement.</returns>\r\n        protected static Point GetPosition(UIElement relativeTo, Point point)\r\n        {\r\n            if (relativeTo == null)\r\n            {\r\n                // Transform relative to RootVisual\r\n                relativeTo = Application.Current.RootVisual;\r\n            }\r\n            if (relativeTo != null)\r\n            {\r\n                // Determine position\r\n                GeneralTransform transform = relativeTo.TransformToVisual(null).Inverse;\r\n                return transform.Transform(point);\r\n            }\r\n            else\r\n            {\r\n                // Unable to transform; return point as-is\r\n                return point;\r\n            }\r\n        }\r\n    }\r\n\r\n    /// <summary>\r\n    /// The event args used in the DragStarted event.\r\n    /// </summary>\r\n    public class DragStartedGestureEventArgs : GestureEventArgs\r\n    {\r\n        internal DragStartedGestureEventArgs(Point gestureOrigin, Orientation direction) \r\n            : base(gestureOrigin, gestureOrigin)\r\n        {\r\n            Direction = direction;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The direction of the drag gesture, as determined by the initial drag change.\r\n        /// </summary>\r\n        public Orientation Direction { get; private set; }\r\n    }\r\n\r\n    /// <summary>\r\n    /// The event args used by the DragDelta event.\r\n    /// </summary>\r\n    public class DragDeltaGestureEventArgs : GestureEventArgs\r\n    {\r\n        internal DragDeltaGestureEventArgs(Point gestureOrigin, Point currentPosition, Point change, Orientation direction) \r\n            : base(gestureOrigin, currentPosition)\r\n        {\r\n            HorizontalChange = change.X;\r\n            VerticalChange = change.Y;\r\n            Direction = direction;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The horizontal (X) change for this drag event.\r\n        /// </summary>\r\n        public double HorizontalChange { get; private set; }\r\n\r\n        /// <summary>\r\n        /// The vertical (Y) change for this drag event.\r\n        /// </summary>\r\n        public double VerticalChange { get; private set; }\r\n\r\n        /// <summary>\r\n        /// The direction of the drag gesture, as determined by the initial drag change.\r\n        /// </summary>\r\n        public Orientation Direction { get; private set; }\r\n    }\r\n\r\n    /// <summary>\r\n    /// The event args used by the DragCompleted event.\r\n    /// </summary>\r\n    public class DragCompletedGestureEventArgs : GestureEventArgs\r\n    {\r\n        internal DragCompletedGestureEventArgs(Point gestureOrigin, Point currentPosition, Point change, Orientation direction, Point finalVelocity)\r\n            : base(gestureOrigin, currentPosition)\r\n        {\r\n            HorizontalChange = change.X;\r\n            VerticalChange = change.Y;\r\n            Direction = direction;\r\n            HorizontalVelocity = finalVelocity.X;\r\n            VerticalVelocity = finalVelocity.Y;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The total horizontal (X) change of the drag event.\r\n        /// </summary>\r\n        public double HorizontalChange { get; private set; }\r\n\r\n        /// <summary>\r\n        /// The total vertical (Y) change of the drag event.\r\n        /// </summary>\r\n        public double VerticalChange { get; private set; }\r\n\r\n        /// <summary>\r\n        /// The direction of the drag gesture, as determined by the initial drag change.\r\n        /// </summary>\r\n        public Orientation Direction { get; private set; }\r\n\r\n        /// <summary>\r\n        /// The final horizontal (X) velocity of the drag, if the drag was inertial.\r\n        /// </summary>\r\n        public double HorizontalVelocity { get; private set; }\r\n\r\n        /// <summary>\r\n        /// The final vertical (Y) velocity of the drag, if the drag was inertial.\r\n        /// </summary>\r\n        public double VerticalVelocity { get; private set; }\r\n    }\r\n\r\n    /// <summary>\r\n    /// The event args used by the Flick event.\r\n    /// </summary>\r\n    public class FlickGestureEventArgs : GestureEventArgs\r\n    {\r\n        private Point _velocity;\r\n\r\n        internal FlickGestureEventArgs(Point hostOrigin, Point velocity) \r\n            : base(hostOrigin, hostOrigin)\r\n        {\r\n            _velocity = velocity;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The horizontal (X) velocity of the flick.\r\n        /// </summary>\r\n        public double HorizontalVelocity { get { return _velocity.X; } }\r\n\r\n        /// <summary>\r\n        /// The vertical (Y) velocity of the flick.\r\n        /// </summary>\r\n        public double VerticalVelocity { get { return _velocity.Y; } }\r\n\r\n        /// <summary>\r\n        /// The angle of the flick.\r\n        /// </summary>\r\n        public double Angle\r\n        {\r\n            get { return MathHelpers.GetAngle(_velocity.X, _velocity.Y); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The direction of the flick gesture, as determined by the flick velocities.\r\n        /// </summary>\r\n        public Orientation Direction\r\n        {\r\n            get { return Math.Abs(_velocity.X) >= Math.Abs(_velocity.Y) ? Orientation.Horizontal : Orientation.Vertical; }\r\n        }\r\n    }\r\n\r\n    /// <summary>\r\n    /// The base class for multi-touch gesture event args. Currently used only for\r\n    /// two-finger (pinch) operations.\r\n    /// </summary>\r\n    [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Multi\")]\r\n    public class MultiTouchGestureEventArgs : GestureEventArgs\r\n    {\r\n        /// <summary>\r\n        /// The second touch point's initial position\r\n        /// </summary>\r\n        protected Point GestureOrigin2 { get; private set; }\r\n\r\n        /// <summary>\r\n        /// The second touch point. The first is stored in GestureEventArgs.\r\n        /// </summary>\r\n        protected Point TouchPosition2 { get; private set; }\r\n\r\n        internal MultiTouchGestureEventArgs(Point gestureOrigin, Point gestureOrigin2, Point position, Point position2)\r\n            : base(gestureOrigin, position)\r\n        {\r\n            GestureOrigin2 = gestureOrigin2;\r\n            TouchPosition2 = position2;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the position of either of the two touch points (0 or 1) relative to\r\n        /// the UIElement provided.\r\n        /// </summary>\r\n        /// <param name=\"relativeTo\">The return value will be relative to this element.</param>\r\n        /// <param name=\"index\">The touchpoint to use (0 or 1).</param>\r\n        /// <returns>The gesture's starting point relative to the given UIElement.</returns>\r\n        public Point GetPosition(UIElement relativeTo, int index)\r\n        {\r\n            if (index == 0)\r\n            {\r\n                return GetPosition(relativeTo);\r\n            }\r\n            else if (index == 1)\r\n            {\r\n                return GetPosition(relativeTo, TouchPosition2);\r\n            }\r\n            else\r\n                throw new ArgumentOutOfRangeException(\"index\");\r\n        }\r\n    }\r\n\r\n    /// <summary>\r\n    /// The event args used by the PinchStarted event.\r\n    /// </summary>\r\n    public class PinchStartedGestureEventArgs : MultiTouchGestureEventArgs\r\n    {\r\n        internal PinchStartedGestureEventArgs(Point gestureOrigin, Point gestureOrigin2, Point pinch, Point pinch2)\r\n            : base(gestureOrigin, gestureOrigin2, pinch, pinch2)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// The distance between the two touch points.\r\n        /// </summary>\r\n        public double Distance\r\n        {\r\n            get { return MathHelpers.GetDistance(TouchPosition, TouchPosition2); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The angle defined by the two touch points.\r\n        /// </summary>\r\n        public double Angle\r\n        {\r\n            get { return MathHelpers.GetAngle(TouchPosition2.X - TouchPosition.X, TouchPosition2.Y - TouchPosition.Y); }\r\n        }\r\n    }\r\n\r\n    /// <summary>\r\n    /// The event args used by the PinchDelta and PinchCompleted events.\r\n    /// </summary>\r\n    public class PinchGestureEventArgs : MultiTouchGestureEventArgs\r\n    {\r\n        internal PinchGestureEventArgs(Point gestureOrigin, Point gestureOrigin2, Point position, Point position2)\r\n            : base(gestureOrigin, gestureOrigin2, position, position2)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the ratio of the current distance between touchpoints / the original distance\r\n        /// between the touchpoints.\r\n        /// </summary>\r\n        public double DistanceRatio\r\n        {\r\n            get\r\n            {\r\n                double originalDistance = Math.Max(MathHelpers.GetDistance(GestureOrigin, GestureOrigin2), 1.0);\r\n                double newDistance = Math.Max(MathHelpers.GetDistance(TouchPosition, TouchPosition2), 1.0);\r\n\r\n                return newDistance / originalDistance;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the difference in angle between the current touch positions and the original\r\n        /// touch positions.\r\n        /// </summary>\r\n        public double TotalAngleDelta\r\n        {\r\n            get\r\n            {\r\n                double oldAngle = MathHelpers.GetAngle(GestureOrigin2.X - GestureOrigin.X, GestureOrigin2.Y - GestureOrigin.Y);\r\n                double newAngle = MathHelpers.GetAngle(TouchPosition2.X - TouchPosition.X, TouchPosition2.Y - TouchPosition.Y);\r\n\r\n                return newAngle - oldAngle;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/GestureListener/GestureListener.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace TelegramClient.Controls.GestureListener\r\n{\r\n    //public enum GestureType\r\n    //{\r\n    //    None = 0,\r\n    //    Tap = 1,\r\n    //    DoubleTap = 2,\r\n    //    Hold = 4,\r\n    //    HorizontalDrag = 8,\r\n    //    VerticalDrag = 16,\r\n    //    FreeDrag = 32,\r\n    //    PinchDelta = 64,\r\n    //    Flick = 128,\r\n    //    DragCompleted = 256,\r\n    //    PinchCompleted = 512,\r\n    //}\r\n\r\n    public partial class GestureListener\r\n    {\r\n        /// <summary>\r\n        /// The GestureBegin event.\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.GestureEventArgs> GestureBegin;\r\n\r\n        /// <summary>\r\n        /// The GestureCompleted event.\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.GestureEventArgs> GestureCompleted;\r\n\r\n        /// <summary>\r\n        /// The Tap event (touch, release, no movement).\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.GestureEventArgs> Tap;\r\n\r\n        /// <summary>\r\n        /// The DoubleTap event is raised instead of Tap if the time between two taps is short eonugh.\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.GestureEventArgs> DoubleTap;\r\n\r\n        /// <summary>\r\n        /// The Hold event (touch and hold for one second)\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.GestureEventArgs> Hold;\r\n\r\n        /// <summary>\r\n        /// The DragStarted event.\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.DragStartedGestureEventArgs> DragStarted;\r\n\r\n        /// <summary>\r\n        /// The DragDelta event.\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.DragDeltaGestureEventArgs> DragDelta;\r\n\r\n        /// <summary>\r\n        /// The DragCompleted event. Will be raised on touch release after a drag, or\r\n        /// when a second touch point is added.\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.DragCompletedGestureEventArgs> DragCompleted;\r\n\r\n        /// <summary>\r\n        /// The Flick event. Raised when a drag that was fast enough ends with a release.\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.FlickGestureEventArgs> Flick;\r\n\r\n        /// <summary>\r\n        /// The PinchStarted event.\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.PinchStartedGestureEventArgs> PinchStarted;\r\n\r\n        /// <summary>\r\n        /// Any two-touch point (two finger) operation.\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.PinchGestureEventArgs> PinchDelta;\r\n\r\n        /// <summary>\r\n        /// The end of a pinch operation.\r\n        /// </summary>\r\n        public event EventHandler<TelegramClient.Controls.GestureListener.PinchGestureEventArgs> PinchCompleted;\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/GestureListener/GestureListenerStatic.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Threading;\r\nusing Microsoft.Xna.Framework.Input.Touch;\r\n\r\nnamespace TelegramClient.Controls.GestureListener\r\n{\r\n    /// <summary>\r\n    /// The GestureListener class raises events similar to those provided by the XNA TouchPanel, but it is designed for\r\n    /// XAML's event-driven model, rather than XNA's loop/polling model, and it also takes care of the hit testing\r\n    /// and event routing.\r\n    /// </summary>\r\n    public partial class GestureListener\r\n    {\r\n        private static DispatcherTimer _timer;\r\n\r\n        private static bool _isInTouch; \r\n        \r\n        private static List<UIElement> _elements;\r\n\r\n        private static Point _gestureOrigin;\r\n        private static bool _gestureOriginChanged;\r\n        private static Nullable<Orientation> _gestureOrientation;\r\n\r\n        private static Point _cumulativeDelta;\r\n        private static Point _cumulativeDelta2;\r\n\r\n        private static Point _finalVelocity;\r\n\r\n        private static Point _pinchOrigin;\r\n        private static Point _pinchOrigin2;\r\n\r\n        private static Point _lastSamplePosition;\r\n        private static Point _lastSamplePosition2;\r\n\r\n        private static bool _isPinching;\r\n        private static bool _flicked;\r\n        private static bool _isDragging;\r\n\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification=\"Need static ctor for more than instantiation\")]\r\n        static GestureListener()\r\n        {\r\n            Touch.FrameReported += OnTouchFrameReported;\r\n\r\n            TouchPanel.EnabledGestures =\r\n                GestureType.Tap |\r\n                GestureType.DoubleTap |\r\n                GestureType.Hold |\r\n                GestureType.FreeDrag |\r\n                GestureType.DragComplete |\r\n                GestureType.Flick |\r\n                GestureType.Pinch |\r\n                GestureType.PinchComplete;\r\n\r\n            _timer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(100) };\r\n            _timer.Tick += OnTimerTick;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle touch events.\r\n        /// </summary>\r\n        /// <param name=\"sender\"></param>\r\n        /// <param name=\"e\"></param>\r\n        private static void OnTouchFrameReported(object sender, TouchFrameEventArgs e)\r\n        {\r\n            bool newIsInTouch = false;\r\n            Point gestureOrigin = new Point(0, 0);\r\n\r\n            foreach (TouchPoint point in e.GetTouchPoints(null))\r\n            {\r\n                if (point.Action != TouchAction.Up)\r\n                {\r\n                    gestureOrigin = point.Position;\r\n                    newIsInTouch = true;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (!_isInTouch && newIsInTouch)\r\n            {\r\n                // The user was not in the middle of a gesture, but one has started.\r\n                _gestureOrigin = gestureOrigin;\r\n                TouchStart();\r\n            }\r\n            else if (_isInTouch && !newIsInTouch)\r\n            {\r\n                // The user was in the middle of a gesture, but there are no active \r\n                // touch points anymore.\r\n                TouchComplete();\r\n            }\r\n            else if (_isInTouch)\r\n            {\r\n                // The state has not changed, and the user was in the middle of a gesture.\r\n                TouchDelta();\r\n            }\r\n            else\r\n            {\r\n                // Possible error condition? The user was not in the middle of a \r\n                // gesture, but a Touch.FrameReported event was received with no\r\n                // active touch points. We should poll the TouchPanel just to be \r\n                // safe, but do so in such a way that resets the state.\r\n                TouchStart();\r\n            }\r\n\r\n            _isInTouch = newIsInTouch;\r\n        }\r\n\r\n        /// <summary>\r\n        /// A touch has started.\r\n        /// </summary>\r\n        private static void TouchStart()\r\n        {\r\n            _cumulativeDelta.X = _cumulativeDelta.Y = _cumulativeDelta2.X = _cumulativeDelta2.Y = 0;\r\n            _finalVelocity.X = _finalVelocity.Y = 0;\r\n            _isDragging = _flicked = false;\r\n            _elements = new List<UIElement>(VisualTreeHelper.FindElementsInHostCoordinates(_gestureOrigin, Application.Current.RootVisual));\r\n            _gestureOriginChanged = false;\r\n            \r\n            RaiseGestureEvent((helper) => helper.GestureBegin, () => new TelegramClient.Controls.GestureListener.GestureEventArgs(_gestureOrigin, _gestureOrigin), false);\r\n            \r\n            ProcessTouchPanelEvents();\r\n            _timer.Start();\r\n            //System.Diagnostics.Debug.WriteLine(\"timer start\");\r\n        }\r\n\r\n        /// <summary>\r\n        /// A touch is continuing...\r\n        /// </summary>\r\n        private static void TouchDelta()\r\n        {\r\n            ProcessTouchPanelEvents();\r\n        }\r\n\r\n        /// <summary>\r\n        /// A touch has ended.\r\n        /// </summary>\r\n        private static void TouchComplete()\r\n        {\r\n            ProcessTouchPanelEvents();\r\n            \r\n            RaiseGestureEvent((helper) => helper.GestureCompleted, () => new TelegramClient.Controls.GestureListener.GestureEventArgs(_gestureOrigin, _lastSamplePosition), false);\r\n\r\n            _elements = null;\r\n            _gestureOrientation = null;\r\n            _timer.Stop();\r\n            //System.Diagnostics.Debug.WriteLine(\"timer stop\");\r\n        }\r\n\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\", Justification=\"Issue manifests as a varity of exceptions.\")]\r\n        static void OnTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            try\r\n            {\r\n                ProcessTouchPanelEvents();\r\n            }\r\n            catch\r\n            {\r\n                // In certain rare conditions TouchPanel.IsGestureAvailable will\r\n                // throw an exception due to an internal race condition in XNA.\r\n                // The exception can be ignored and the next call to the method\r\n                // will succeed.\r\n            }            \r\n        }\r\n\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Maintainability\", \"CA1505:AvoidUnmaintainableCode\"), System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\")]\r\n        private static void ProcessTouchPanelEvents()\r\n        {\r\n            Point delta = new Point(0, 0);\r\n\r\n            GeneralTransform deltaTransform = null;\r\n\r\n            while (TouchPanel.IsGestureAvailable)\r\n            {\r\n                GestureSample sample = TouchPanel.ReadGesture();\r\n\r\n                Point samplePosition = sample.Position.ToPoint();\r\n                Point samplePosition2 = sample.Position2.ToPoint();\r\n\r\n                Point sampleDelta = sample.Delta.ToPoint();\r\n                GetTranslatedDelta(ref deltaTransform, ref sampleDelta, ref _cumulativeDelta, sample.GestureType != GestureType.Flick);\r\n                Point sampleDelta2 = sample.Delta2.ToPoint();\r\n                GetTranslatedDelta(ref deltaTransform, ref sampleDelta2, ref _cumulativeDelta2, sample.GestureType != GestureType.Flick);\r\n\r\n                // Example: if a drag becomes a pinch, or vice-versa, we want to change the elements receiving the event\r\n                if (_elements == null || _gestureOriginChanged)\r\n                {\r\n                    _gestureOrigin = samplePosition;\r\n                    _elements = new List<UIElement>(VisualTreeHelper.FindElementsInHostCoordinates(_gestureOrigin, Application.Current.RootVisual));\r\n                    _gestureOriginChanged = false;\r\n                }\r\n\r\n                if (!_gestureOrientation.HasValue && (sampleDelta.X != 0 || sampleDelta.Y != 0))\r\n                {\r\n                    _gestureOrientation = Math.Abs(sampleDelta.X) >= Math.Abs(sampleDelta.Y) ? Orientation.Horizontal : Orientation.Vertical;\r\n                }\r\n\r\n                //System.Diagnostics.Debug.WriteLine(sample.GestureType);\r\n                switch (sample.GestureType)\r\n                {\r\n                    case GestureType.Tap:\r\n                        RaiseGestureEvent((helper) => helper.Tap, () => new TelegramClient.Controls.GestureListener.GestureEventArgs(_gestureOrigin, samplePosition), false);\r\n                        break;\r\n\r\n                    case GestureType.DoubleTap:\r\n                        RaiseGestureEvent((helper) => helper.DoubleTap, () => new TelegramClient.Controls.GestureListener.GestureEventArgs(_gestureOrigin, samplePosition), false);\r\n                        break;\r\n\r\n                    case GestureType.Hold:\r\n                        RaiseGestureEvent((helper) => helper.Hold, () => new TelegramClient.Controls.GestureListener.GestureEventArgs(_gestureOrigin, samplePosition), false);\r\n                        break;\r\n\r\n                    case GestureType.FreeDrag:\r\n                        if (sampleDelta.X != 0 || sampleDelta.Y != 0)\r\n                        {\r\n                            if (!_isDragging)\r\n                            {\r\n                                RaiseGestureEvent((helper) => helper.DragStarted, () => new TelegramClient.Controls.GestureListener.DragStartedGestureEventArgs(_gestureOrigin, _gestureOrientation.Value), true);\r\n                                _isDragging = true;\r\n                            }\r\n\r\n                            delta.X += sampleDelta.X;\r\n                            delta.Y += sampleDelta.Y;\r\n                            _lastSamplePosition = samplePosition;\r\n                        }\r\n                        break;\r\n\r\n                    case GestureType.DragComplete:\r\n                        if (!_flicked)\r\n                        {\r\n                            if (delta.X != 0 || delta.Y != 0)\r\n                            {\r\n                                // raise drag\r\n                                RaiseGestureEvent((helper) => helper.DragDelta, () => new TelegramClient.Controls.GestureListener.DragDeltaGestureEventArgs(_gestureOrigin, samplePosition, delta, _gestureOrientation.Value), false);\r\n                                delta.X = delta.Y = 0;\r\n                            }\r\n                        }\r\n\r\n                        if (_isDragging)\r\n                        {\r\n                            RaiseGestureEvent((helper) => helper.DragCompleted, () => new TelegramClient.Controls.GestureListener.DragCompletedGestureEventArgs(_gestureOrigin, _lastSamplePosition, _cumulativeDelta, _gestureOrientation.Value, _finalVelocity), false);\r\n                            delta.X = delta.Y = 0;\r\n                        }\r\n\r\n                        _cumulativeDelta.X = _cumulativeDelta.Y = 0;\r\n                        _flicked = _isDragging = false;\r\n                        _gestureOriginChanged = true;\r\n                        break;\r\n\r\n                    case GestureType.Flick:\r\n                        // Do not raise any additional drag events that may be queued.\r\n                        _flicked = true;\r\n                        _finalVelocity = sampleDelta;\r\n                        RaiseGestureEvent((helper) => helper.Flick, () => new TelegramClient.Controls.GestureListener.FlickGestureEventArgs(_gestureOrigin, sampleDelta), true);\r\n                        break;\r\n\r\n                    case GestureType.Pinch:\r\n                        {\r\n                            if (!_isPinching)\r\n                            {\r\n                                _isPinching = true;\r\n                                _pinchOrigin = samplePosition;\r\n                                _pinchOrigin2 = samplePosition2;\r\n                                RaiseGestureEvent((helper) => helper.PinchStarted, () => new TelegramClient.Controls.GestureListener.PinchStartedGestureEventArgs(_pinchOrigin, _pinchOrigin2, _pinchOrigin, _pinchOrigin2), true);\r\n                            }\r\n\r\n                            _lastSamplePosition = samplePosition;\r\n                            _lastSamplePosition2 = samplePosition2;\r\n                            RaiseGestureEvent((helper) => helper.PinchDelta, () => new TelegramClient.Controls.GestureListener.PinchGestureEventArgs(_pinchOrigin, _pinchOrigin2, samplePosition, samplePosition2), false);\r\n                        }\r\n                        break;\r\n\r\n                    case GestureType.PinchComplete:\r\n                        _isPinching = false;\r\n                        RaiseGestureEvent((helper) => helper.PinchCompleted, () => new TelegramClient.Controls.GestureListener.PinchGestureEventArgs(_pinchOrigin, _pinchOrigin2, _lastSamplePosition, _lastSamplePosition2), false);\r\n                        _cumulativeDelta.X = _cumulativeDelta.Y = _cumulativeDelta2.X = _cumulativeDelta2.Y = 0;\r\n                        _gestureOriginChanged = true;                        \r\n                        break;\r\n                }\r\n            }\r\n\r\n            if (!_flicked && (delta.X != 0 || delta.Y != 0))\r\n            {\r\n                RaiseGestureEvent((helper) => helper.DragDelta, () => new TelegramClient.Controls.GestureListener.DragDeltaGestureEventArgs(_gestureOrigin, _lastSamplePosition, delta, _gestureOrientation.Value), false);\r\n            }\r\n        }\r\n\r\n        private static void GetTranslatedDelta(\r\n            ref GeneralTransform deltaTransform, \r\n            ref Point sampleDelta, \r\n            ref Point cumulativeDelta, \r\n            bool addToCumulative)\r\n        {\r\n            if (sampleDelta.X != 0 || sampleDelta.Y != 0)\r\n            {\r\n                if (deltaTransform == null && Application.Current.RootVisual != null)\r\n                {\r\n                    deltaTransform = GetInverseRootTransformNoOffset();\r\n                }\r\n                if (deltaTransform != null)\r\n                {\r\n                    sampleDelta = deltaTransform.Transform(sampleDelta);\r\n                    if (addToCumulative)\r\n                    {\r\n                        cumulativeDelta.X += sampleDelta.X;\r\n                        cumulativeDelta.Y += sampleDelta.Y;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private static GeneralTransform GetInverseRootTransformNoOffset()\r\n        {\r\n            GeneralTransform transform = Application.Current.RootVisual.TransformToVisual(null).Inverse;\r\n\r\n            MatrixTransform matrixTransform = transform as MatrixTransform;\r\n            if (matrixTransform != null)\r\n            {\r\n                Matrix matrix = matrixTransform.Matrix; \r\n                matrix.OffsetX = matrix.OffsetY = 0;\r\n                matrixTransform.Matrix = matrix;\r\n            }\r\n\r\n            return transform;\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method does all the necessary work to raise a gesture event. It sets the orginal source, does the routing,\r\n        /// handles Handled, and only creates the event args if they are needed.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">This is the type of event args that will be raised.</typeparam>\r\n        /// <param name=\"eventGetter\">Gets the specific event to raise.</param>\r\n        /// <param name=\"argsGetter\">Lazy creator function for the event args.</param>\r\n        /// <param name=\"releaseMouseCapture\">Indicates whether the mouse capture should be released </param>\r\n        private static void RaiseGestureEvent<T>(Func<GestureListener, EventHandler<T>> eventGetter, Func<T> argsGetter, bool releaseMouseCapture) where T : TelegramClient.Controls.GestureListener.GestureEventArgs\r\n        {\r\n            T args = null;\r\n\r\n            FrameworkElement originalSource = null;\r\n            bool handled = false;\r\n\r\n            foreach (FrameworkElement element in _elements)\r\n            {\r\n                if (releaseMouseCapture)\r\n                {\r\n                    element.ReleaseMouseCapture();\r\n                }\r\n\r\n                if (!handled)\r\n                {\r\n                    if (originalSource == null)\r\n                    {\r\n                        originalSource = element;\r\n                    }\r\n\r\n                    GestureListener helper = GestureService.GetGestureListenerInternal(element, false);\r\n                    if (helper != null)\r\n                    {\r\n                        SafeRaise.Raise(eventGetter(helper), element, () =>\r\n                        {\r\n                            if (args == null)\r\n                            {\r\n                                args = argsGetter();\r\n                                args.OriginalSource = originalSource;\r\n                            }\r\n                            return args;\r\n                        });\r\n                    }\r\n\r\n                    if (args != null && args.Handled == true)\r\n                    {\r\n                        handled = true;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Controls/GestureListener/GestureService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Controls.GestureListener\r\n{\r\n    /// <summary>\r\n    /// The GestureService class is the helper for getting and setting GestureListeners\r\n    /// on elements.\r\n    /// </summary>\r\n    public static class GestureService\r\n    {\r\n        /// <summary>\r\n        /// Gets a GestureListener for the new element. Will create a new one if necessary.\r\n        /// </summary>\r\n        /// <param name=\"obj\">The object to get the GestureListener from.</param>\r\n        /// <returns>Either the previously existing GestureListener, or a new one.</returns>\r\n        public static TelegramClient.Controls.GestureListener.GestureListener GetGestureListener(DependencyObject obj)\r\n        {\r\n            if (obj == null)\r\n            {\r\n                throw new ArgumentNullException(\"obj\");\r\n            }\r\n\r\n            return GetGestureListenerInternal(obj, true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the GestureListener on an element. If one is not set, can create a new one\r\n        /// so that this will never return null, depending on the state of the createIfMissing\r\n        /// flag.\r\n        /// </summary>\r\n        /// <param name=\"obj\">The object to get the GestureListener from.</param>\r\n        /// <param name=\"createIfMissing\">When this is true, if the attached property was not set on the element, it will create one and set it on the element.</param>\r\n        /// <returns></returns>\r\n        internal static TelegramClient.Controls.GestureListener.GestureListener GetGestureListenerInternal(DependencyObject obj, bool createIfMissing)\r\n        {\r\n            TelegramClient.Controls.GestureListener.GestureListener listener = (TelegramClient.Controls.GestureListener.GestureListener)obj.GetValue(GestureListenerProperty);\r\n            if (listener == null && createIfMissing)\r\n            {\r\n                listener = new TelegramClient.Controls.GestureListener.GestureListener();\r\n                SetGestureListenerInternal(obj, listener);\r\n            }\r\n            return listener;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the GestureListener on an element. Needed for XAML, but should not be used in code. Use\r\n        /// GetGestureListener instead, which will create a new instance if one is not already set, to \r\n        /// add your handlers to an element.\r\n        /// </summary>\r\n        /// <param name=\"obj\">The object to set the GestureListener on.</param>\r\n        /// <param name=\"value\">The GestureListener.</param>\r\n        [Obsolete(\"Do not add handlers using this method. Instead, use GetGestureListener, which will create a new instance if one is not already set, to add your handlers to an element.\", true)]\r\n        public static void SetGestureListener(DependencyObject obj, TelegramClient.Controls.GestureListener.GestureListener value)\r\n        {\r\n            if (obj == null)\r\n            {\r\n                throw new ArgumentNullException(\"obj\");\r\n            }\r\n\r\n            SetGestureListenerInternal(obj, value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This is used to set the value of the attached DependencyProperty internally.\r\n        /// </summary>\r\n        /// <param name=\"obj\">The object to set the GestureListener on.</param>\r\n        /// <param name=\"value\">The GestureListener.</param>\r\n        private static void SetGestureListenerInternal(DependencyObject obj, TelegramClient.Controls.GestureListener.GestureListener value)\r\n        {\r\n            obj.SetValue(GestureListenerProperty, value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// The definition of the GestureListener attached DependencyProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty GestureListenerProperty =\r\n            DependencyProperty.RegisterAttached(\"GestureListener\", typeof(TelegramClient.Controls.GestureListener.GestureListener), typeof(GestureService), new PropertyMetadata(null));\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/GestureListener/MathHelpers.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define WP7\r\nusing System;\r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Controls.GestureListener\r\n{\r\n    internal static class MathHelpers\r\n    {\r\n        /// <summary>\r\n        /// Return the angle of the hypotenuse of a triangle with\r\n        /// sides defined by deltaX and deltaY.\r\n        /// </summary>\r\n        /// <param name=\"deltaX\">Change in X.</param>\r\n        /// <param name=\"deltaY\">Change in Y.</param>\r\n        /// <returns>The angle (in degrees).</returns>\r\n        public static double GetAngle(double deltaX, double deltaY)\r\n        {\r\n            double angle = Math.Atan2(deltaY, deltaX);\r\n            if (angle < 0)\r\n            {\r\n                angle = 2 * Math.PI + angle;\r\n            }\r\n\r\n            return (angle * 360) / (2 * Math.PI);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Return the distance between two points\r\n        /// </summary>\r\n        /// <param name=\"p0\">The first point.</param>\r\n        /// <param name=\"p1\">The second point.</param>\r\n        /// <returns>The distance between the two points.</returns>\r\n        public static double GetDistance(Point p0, Point p1)\r\n        {\r\n            double dx = p0.X - p1.X;\r\n            double dy = p0.Y - p1.Y;\r\n\r\n            return Math.Sqrt(dx * dx + dy * dy);\r\n        }\r\n#if WP7\r\n        /// <summary>\r\n        /// Helper extension method for turning XNA's Vector2 type into a Point\r\n        /// </summary>\r\n        /// <param name=\"v\">The Vector2.</param>\r\n        /// <returns>The point.</returns>\r\n        public static Point ToPoint(this Microsoft.Xna.Framework.Vector2 v)\r\n        {\r\n            return new Point(v.X, v.Y);\r\n        } \r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/GestureListener/SafeRaise.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace TelegramClient.Controls.GestureListener\r\n{\r\n    /// <summary>\r\n    /// A helper class for raising events safely.\r\n    /// </summary>\r\n    internal static class SafeRaise\r\n    {\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping existing implementation.\")]\r\n        public static void Raise(EventHandler eventToRaise, object sender)\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, System.EventArgs.Empty);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        public static void Raise(EventHandler<System.EventArgs> eventToRaise, object sender)\r\n        {\r\n            Raise(eventToRaise, sender, System.EventArgs.Empty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event args type.</typeparam>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"args\">The event args.</param>\r\n        public static void Raise<T>(EventHandler<T> eventToRaise, object sender, T args) where T : System.EventArgs\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, args);\r\n            }\r\n        }\r\n\r\n        // Lazy event args creation example:\r\n        //\r\n        // public class MyEventArgs : EventArgs\r\n        // {\r\n        //     public MyEventArgs(int x) { X = x; }\r\n        //     public int X { get; set; }\r\n        // }\r\n        //\r\n        // event EventHandler<MyEventArgs> Foo;\r\n        //\r\n        // public void Bar()\r\n        // {\r\n        //     int y = 2;\r\n        //     Raise(Foo, null, () => { return new MyEventArgs(y); });\r\n        // }\r\n\r\n        /// <summary>\r\n        /// This is a method that returns event args, used for lazy creation.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event type.</typeparam>\r\n        /// <returns></returns>\r\n        public delegate T GetEventArgs<T>() where T : System.EventArgs;\r\n\r\n        /// <summary>\r\n        /// Raise an event in a thread-safe manner, with the required null check. Lazily creates event args.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event args type.</typeparam>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"getEventArgs\">The delegate to return the event args if needed.</param>\r\n        public static void Raise<T>(EventHandler<T> eventToRaise, object sender, GetEventArgs<T> getEventArgs) where T : System.EventArgs\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, getEventArgs());\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/DragEventArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal class DragEventArgs : GestureEventArgs\r\n    {\r\n        public DragEventArgs()\r\n        {\r\n        }\r\n\r\n        public DragEventArgs(InputDeltaArgs args)\r\n        {\r\n            if (args != null)\r\n            {\r\n                CumulativeDistance = args.CumulativeTranslation;\r\n                DeltaDistance = args.DeltaTranslation;\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n        public bool IsTouchComplete { get; private set; }\r\n\r\n        public Point DeltaDistance { get; private set; }\r\n\r\n        public Point CumulativeDistance { get; internal set; }\r\n\r\n        public void MarkAsFinalTouchManipulation()\r\n        {\r\n            IsTouchComplete = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/FlickEventArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal class FlickEventArgs : GestureEventArgs\r\n    {\r\n        public double Angle { get; internal set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/GestureEventArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal class GestureEventArgs : System.EventArgs\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/GestureHelper.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing TelegramClient.Controls.StartView;\r\nusing DragEventArgs = TelegramClient.Controls.StartView.DragEventArgs;\r\n\r\ninternal abstract class GestureHelper\r\n{\r\n    private readonly Size DeadZoneInPixels = new Size(12, 12);\r\n\r\n    private DragLock _dragLock;\r\n    private bool _dragging;\r\n    private WeakReference _gestureSource;\r\n    private Point _gestureOrigin;\r\n\r\n    protected GestureHelper(UIElement target, bool shouldHandleAllDrags)\r\n    {\r\n        Target = target;\r\n        ShouldHandleAllDrags = shouldHandleAllDrags;\r\n    }\r\n\r\n    [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n    protected bool ShouldHandleAllDrags { get; private set; }\r\n\r\n    protected UIElement Target { get; private set; }\r\n\r\n    public event EventHandler<GestureEventArgs> GestureStart;\r\n\r\n    public event EventHandler<FlickEventArgs> Flick;\r\n\r\n    public event EventHandler<EventArgs> GestureEnd;\r\n\r\n    public event EventHandler<DragEventArgs> HorizontalDrag;\r\n\r\n    public event EventHandler<DragEventArgs> VerticalDrag;\r\n\r\n    [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n    public static GestureHelper Create(UIElement target)\r\n    {\r\n        return GestureHelper.Create(target, true);\r\n    }\r\n\r\n    public static GestureHelper Create(UIElement target, bool shouldHandleAllDrags)\r\n    {\r\n        GestureHelper gestureHelper = new ManipulationGestureHelper(target, shouldHandleAllDrags);\r\n        gestureHelper.Start();\r\n        return gestureHelper;\r\n    }\r\n\r\n    protected abstract void HookEvents();\r\n\r\n    public void Start()\r\n    {\r\n        HookEvents();\r\n    }\r\n\r\n    protected void NotifyDown(InputBaseArgs args)\r\n    {\r\n        GestureEventArgs e = new GestureEventArgs();\r\n        _gestureSource = new WeakReference(args.Source);\r\n        _gestureOrigin = args.Origin;\r\n        _dragLock = DragLock.Unset;\r\n        _dragging = false;\r\n        RaiseGestureStart(e);\r\n    }\r\n\r\n    protected void NotifyMove(InputDeltaArgs args)\r\n    {\r\n        if (Math.Abs(args.CumulativeTranslation.X) > DeadZoneInPixels.Width || Math.Abs(args.CumulativeTranslation.Y) > DeadZoneInPixels.Height)\r\n        {\r\n            if (!_dragging)\r\n            {\r\n                ReleaseMouseCaptureAtGestureOrigin();\r\n            }\r\n\r\n            _dragging = true;\r\n\r\n            if (_dragLock == DragLock.Unset)\r\n            {\r\n                double angle = GestureHelper.AngleFromVector(args.CumulativeTranslation.X, args.CumulativeTranslation.Y) % 180;\r\n                _dragLock = angle <= 45 || angle >= 135 ? DragLock.Horizontal : DragLock.Vertical;\r\n            }\r\n        }\r\n\r\n        if (_dragging)\r\n        {\r\n            RaiseDragEvents(args);\r\n        }\r\n    }\r\n\r\n    private void ReleaseMouseCaptureAtGestureOrigin()\r\n    {\r\n        if (_gestureSource != null)\r\n        {\r\n            FrameworkElement gestureSource = _gestureSource.Target as FrameworkElement;\r\n            if (gestureSource != null)\r\n            {\r\n                foreach (UIElement element in VisualTreeHelper.FindElementsInHostCoordinates(\r\n                        gestureSource.TransformToVisual(null).Transform(_gestureOrigin), Application.Current.RootVisual))\r\n                {\r\n                    element.ReleaseMouseCapture();\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    protected void NotifyUp(InputCompletedArgs args)\r\n    {\r\n        EventArgs e = EventArgs.Empty;\r\n        _dragLock = DragLock.Unset;\r\n        _dragging = false;\r\n\r\n        if (args.IsInertial)\r\n        {\r\n            double angle = GestureHelper.AngleFromVector(args.FinalLinearVelocity.X, args.FinalLinearVelocity.Y);\r\n            if (angle <= 45 || angle >= 315)\r\n            {\r\n                angle = 0;\r\n            }\r\n            else if (angle >= 135 && angle <= 225)\r\n            {\r\n                angle = 180;\r\n            }\r\n\r\n            FlickEventArgs flickEventArgs = new FlickEventArgs\r\n            {\r\n                Angle = angle\r\n            };\r\n            ReleaseMouseCaptureAtGestureOrigin();\r\n            RaiseFlick(flickEventArgs);\r\n        }\r\n        else if (args.TotalTranslation.X != 0 || args.TotalTranslation.Y != 0)\r\n        {\r\n            DragEventArgs dragEventArgs = new DragEventArgs\r\n            {\r\n                CumulativeDistance = args.TotalTranslation\r\n            };\r\n            dragEventArgs.MarkAsFinalTouchManipulation();\r\n            e = dragEventArgs;\r\n        }\r\n\r\n        RaiseGestureEnd(e);\r\n    }\r\n\r\n    private void RaiseGestureStart(GestureEventArgs args)\r\n    {\r\n        SafeRaise.Raise<GestureEventArgs>(GestureStart, this, args);\r\n    }\r\n\r\n    private void RaiseFlick(FlickEventArgs args)\r\n    {\r\n        SafeRaise.Raise<FlickEventArgs>(Flick, this, args);\r\n    }\r\n\r\n    private void RaiseGestureEnd(EventArgs args)\r\n    {\r\n        SafeRaise.Raise<EventArgs>(GestureEnd, this, args);\r\n    }\r\n\r\n    private void RaiseDragEvents(InputDeltaArgs args)\r\n    {\r\n        DragEventArgs e = new DragEventArgs(args);\r\n        if (args.DeltaTranslation.X != 0 && _dragLock == DragLock.Horizontal)\r\n        {\r\n            RaiseHorizontalDrag(e);\r\n        }\r\n        else if (args.DeltaTranslation.Y != 0 && _dragLock == DragLock.Vertical)\r\n        {\r\n            RaiseVerticalDrag(e);\r\n        }\r\n    }\r\n\r\n    private void RaiseHorizontalDrag(DragEventArgs args)\r\n    {\r\n        SafeRaise.Raise<DragEventArgs>(HorizontalDrag, this, args);\r\n    }\r\n\r\n    private void RaiseVerticalDrag(DragEventArgs args)\r\n    {\r\n        SafeRaise.Raise<DragEventArgs>(VerticalDrag, this, args);\r\n    }\r\n\r\n    private static double AngleFromVector(double x, double y)\r\n    {\r\n        double num = Math.Atan2(y, x);\r\n        if (num < 0)\r\n        {\r\n            num = 2 * Math.PI + num;\r\n        }\r\n        return num * 360 / (2 * Math.PI);\r\n    }\r\n\r\n    private enum DragLock\r\n    {\r\n        Unset,\r\n        Free,\r\n        Vertical,\r\n        Horizontal,\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/InputBaseArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal class InputBaseArgs\r\n    {\r\n        protected InputBaseArgs(UIElement source, Point origin)\r\n        {\r\n            Source = source;\r\n            Origin = origin;\r\n        }\r\n\r\n        public UIElement Source { get; private set; }\r\n\r\n        public Point Origin { get; private set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/InputCompletedArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal abstract class InputCompletedArgs : InputBaseArgs\r\n    {\r\n        protected InputCompletedArgs(UIElement source, Point origin)\r\n            : base(source, origin)\r\n        {\r\n        }\r\n\r\n        public abstract Point TotalTranslation { get; }\r\n\r\n        public abstract Point FinalLinearVelocity { get; }\r\n\r\n        public abstract bool IsInertial { get; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/InputDeltaArgs.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal abstract class InputDeltaArgs : InputBaseArgs\r\n    {\r\n        protected InputDeltaArgs(UIElement source, Point origin)\r\n            : base(source, origin)\r\n        {\r\n        }\r\n\r\n        public abstract Point DeltaTranslation { get; }\r\n\r\n        public abstract Point CumulativeTranslation { get; }\r\n\r\n        public abstract Point ExpansionVelocity { get; }\r\n\r\n        public abstract Point LinearVelocity { get; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/ManipulationGestureHelper.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Input;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    internal class ManipulationGestureHelper : GestureHelper\r\n    {\r\n        public ManipulationGestureHelper(UIElement target, bool shouldHandleAllDrags)\r\n            : base(target, shouldHandleAllDrags)\r\n        {\r\n        }\r\n\r\n        protected override void HookEvents()\r\n        {\r\n            Target.ManipulationStarted += Target_ManipulationStarted;\r\n            Target.ManipulationDelta += Target_ManipulationDelta;\r\n            Target.ManipulationCompleted += Target_ManipulationCompleted;\r\n        }\r\n\r\n        private void Target_ManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            NotifyDown(new ManipulationBaseArgs(e));\r\n        }\r\n\r\n        private void Target_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            NotifyMove(new ManipulationDeltaArgs(e));\r\n        }\r\n\r\n        private void Target_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            NotifyUp(new ManiulationCompletedArgs(e));\r\n        }\r\n\r\n        private class ManipulationBaseArgs : InputBaseArgs\r\n        {\r\n            public ManipulationBaseArgs(ManipulationStartedEventArgs args)\r\n                : base(args.ManipulationContainer, args.ManipulationOrigin)\r\n            {\r\n            }\r\n        }\r\n\r\n        private class ManipulationDeltaArgs : InputDeltaArgs\r\n        {\r\n            private ManipulationDeltaEventArgs _args;\r\n\r\n            public ManipulationDeltaArgs(ManipulationDeltaEventArgs args)\r\n                : base(args.ManipulationContainer, args.ManipulationOrigin)\r\n            {\r\n                _args = args;\r\n            }\r\n\r\n\r\n            public override Point DeltaTranslation\r\n            {\r\n                get\r\n                {\r\n                    return _args.DeltaManipulation.Translation;\r\n                }\r\n            }\r\n\r\n            public override Point CumulativeTranslation\r\n            {\r\n                get\r\n                {\r\n                    return _args.CumulativeManipulation.Translation;\r\n                }\r\n            }\r\n\r\n            public override Point ExpansionVelocity\r\n            {\r\n                get\r\n                {\r\n                    return _args.Velocities.ExpansionVelocity;\r\n                }\r\n            }\r\n\r\n            public override Point LinearVelocity\r\n            {\r\n                get\r\n                {\r\n                    return _args.Velocities.LinearVelocity;\r\n                }\r\n            }\r\n        }\r\n\r\n        private class ManiulationCompletedArgs : InputCompletedArgs\r\n        {\r\n            private ManipulationCompletedEventArgs _args;\r\n\r\n            public ManiulationCompletedArgs(ManipulationCompletedEventArgs args)\r\n                : base(args.ManipulationContainer, args.ManipulationOrigin)\r\n            {\r\n                _args = args;\r\n            }\r\n\r\n            public override Point TotalTranslation\r\n            {\r\n                get\r\n                {\r\n                    return _args.TotalManipulation.Translation;\r\n                }\r\n            }\r\n\r\n            public override Point FinalLinearVelocity\r\n            {\r\n                get\r\n                {\r\n                    if (_args.FinalVelocities != null)\r\n                        return _args.FinalVelocities.LinearVelocity;\r\n                    else\r\n                        return new Point(0, 0);\r\n                }\r\n            }\r\n\r\n            public override bool IsInertial\r\n            {\r\n                get\r\n                {\r\n                    return _args.IsInertial;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/SafeRaise.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    /// <summary>\r\n    /// A helper class for raising events safely.\r\n    /// </summary>\r\n    internal static class SafeRaise\r\n    {\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping existing implementation.\")]\r\n        public static void Raise(EventHandler eventToRaise, object sender)\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, System.EventArgs.Empty);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        public static void Raise(EventHandler<System.EventArgs> eventToRaise, object sender)\r\n        {\r\n            Raise(eventToRaise, sender, System.EventArgs.Empty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises an event in a thread-safe manner, also does the null check.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event args type.</typeparam>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"args\">The event args.</param>\r\n        public static void Raise<T>(EventHandler<T> eventToRaise, object sender, T args) where T : System.EventArgs\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, args);\r\n            }\r\n        }\r\n\r\n        // Lazy event args creation example:\r\n        //\r\n        // public class MyEventArgs : EventArgs\r\n        // {\r\n        //     public MyEventArgs(int x) { X = x; }\r\n        //     public int X { get; set; }\r\n        // }\r\n        //\r\n        // event EventHandler<MyEventArgs> Foo;\r\n        //\r\n        // public void Bar()\r\n        // {\r\n        //     int y = 2;\r\n        //     Raise(Foo, null, () => { return new MyEventArgs(y); });\r\n        // }\r\n\r\n        /// <summary>\r\n        /// This is a method that returns event args, used for lazy creation.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event type.</typeparam>\r\n        /// <returns></returns>\r\n        public delegate T GetEventArgs<T>() where T : System.EventArgs;\r\n\r\n        /// <summary>\r\n        /// Raise an event in a thread-safe manner, with the required null check. Lazily creates event args.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The event args type.</typeparam>\r\n        /// <param name=\"eventToRaise\">The event to raise.</param>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"getEventArgs\">The delegate to return the event args if needed.</param>\r\n        public static void Raise<T>(EventHandler<T> eventToRaise, object sender, GetEventArgs<T> getEventArgs) where T : System.EventArgs\r\n        {\r\n            if (eventToRaise != null)\r\n            {\r\n                eventToRaise(sender, getEventArgs());\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/StartView.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Specialized;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Controls.Primitives;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    /// <summary>\r\n    /// Creates a panoramic view of items that can be panned side-to-side, similar to the Start screen.\r\n    /// </summary>\r\n    [TemplatePart(Name = PanningTransformName, Type = typeof(TranslateTransform))]\r\n    [StyleTypedProperty(Property = \"ItemContainerStyle\", StyleTargetType = typeof(StartViewItem))]\r\n    public class StartView : TemplatedItemsControl<StartViewItem>, ISupportInitialize\r\n    {\r\n        internal static readonly Duration Immediately = TimeSpan.Zero;\r\n        private static readonly Duration DefaultDuration = TimeSpan.FromMilliseconds(300);\r\n        private static readonly Duration FlickDuration = DefaultDuration;\r\n        private static readonly Duration SnapDuration = DefaultDuration;\r\n        private static readonly Duration PanDuration = TimeSpan.FromMilliseconds(300);\r\n\r\n        private const string PanningTransformName = \"PanningTransform\";\r\n\r\n        private readonly IEasingFunction _easingFunction = new ExponentialEase { Exponent = 5 };\r\n\r\n        private int _cumulativeDragDelta;\r\n        private int _effectiveDragDelta;\r\n        private int _flickDirection;\r\n        private int _targetOffset;\r\n        private bool _dragged;\r\n        private bool _adjustSelectedRequested;\r\n        private bool _suppressSelectionChangedEvent;\r\n        private bool _loaded;\r\n        private TransformAnimator _animator;\r\n        private bool _suppressAnimation;\r\n        private bool _ignorePropertyChange;\r\n        private bool _isDesignTime;\r\n        private InitializingData _initializingData;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the StartView class.\r\n        /// </summary>\r\n        public StartView()\r\n        {\r\n            DefaultStyleKey = typeof(StartView);\r\n\r\n            GestureHelper gestureHelper = GestureHelper.Create(this, true);\r\n            gestureHelper.GestureStart += (sender, args) => GestureStart();\r\n            gestureHelper.HorizontalDrag += (sender, args) => HorizontalDrag(args);\r\n            gestureHelper.Flick += (sender, args) => Flick(args);\r\n            gestureHelper.GestureEnd += (sender, args) => GestureEnd();\r\n\r\n            SizeChanged += OnSizeChanged;\r\n\r\n            Loaded += OnLoaded;\r\n            Unloaded += OnUnloaded;\r\n\r\n            _isDesignTime = DesignerProperties.IsInDesignTool;\r\n        }\r\n\r\n        internal StartViewPanel Panel { get; set; }\r\n\r\n        internal int ItemsWidth { get; set; }\r\n\r\n        internal int ViewportWidth { get; private set; }\r\n\r\n        internal int ViewportHeight { get; private set; }\r\n\r\n        private TranslateTransform PanningTransform { get; set; }\r\n\r\n        private int ActualOffset\r\n        {\r\n            get { return PanningTransform == null ? 0 : (int)PanningTransform.X; }\r\n        }\r\n\r\n        private int SelectionOffset\r\n        {\r\n            get\r\n            {\r\n                StartViewItem container = GetContainer(SelectedItem);\r\n                if (container != null)\r\n                {\r\n                    return -container.StartPosition;\r\n                }\r\n                return 0;\r\n            }\r\n        }\r\n\r\n        private bool IsInit\r\n        {\r\n            get { return _initializingData != null; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedItem dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedItemProperty = DependencyProperty.Register(\r\n            \"SelectedItem\",\r\n            typeof(object),\r\n            typeof(StartView),\r\n            new PropertyMetadata(null, (d, e) => ((StartView)d).OnSelectedItemChanged(e)));\r\n\r\n        /// <summary>\r\n        /// Gets the selected item.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Returns <see cref=\"T:System.Object\"/>.\r\n        /// </returns>\r\n        public object SelectedItem\r\n        {\r\n            get { return GetValue(SelectedItemProperty); }\r\n            set { SetValue(SelectedItemProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedIndex dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedIndexProperty = DependencyProperty.Register(\r\n            \"SelectedIndex\",\r\n            typeof(int),\r\n            typeof(StartView),\r\n            new PropertyMetadata(-1, (d, e) => ((StartView)d).OnSelectedIndexChanged(e)));\r\n\r\n        /// <summary>\r\n        /// Gets the selected index.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Returns <see cref=\"T:System.Int32\"/>.\r\n        /// </returns>\r\n        public int SelectedIndex\r\n        {\r\n            get { return (int)GetValue(SelectedIndexProperty); }\r\n            set { SetValue(SelectedIndexProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Event that is invoked when selection changes.\r\n        /// </summary>\r\n        public event EventHandler<SelectionChangedEventArgs> SelectionChanged;\r\n\r\n        /// <summary>\r\n        /// Event that is invoked when selection changes.\r\n        /// </summary>\r\n        public event EventHandler SelectionCanceled;\r\n\r\n        protected virtual void RaiseSelectionCanceled()\r\n        {\r\n            EventHandler handler = SelectionCanceled;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the application of a new Template.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            PanningTransform = GetTemplateChild(PanningTransformName) as TranslateTransform;\r\n\r\n            _animator = PanningTransform != null ? new TransformAnimator(PanningTransform) : null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the measurement of the control.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Desired size.\r\n        /// </returns>\r\n        /// <param name=\"availableSize\">Available size.</param>\r\n        protected override Size MeasureOverride(Size availableSize)\r\n        {\r\n            if (Application.Current.Host.Content.ActualWidth > 0)\r\n            {\r\n                ViewportWidth = !double.IsInfinity(availableSize.Width) ? (int)availableSize.Width : (int)Application.Current.Host.Content.ActualWidth;\r\n                ViewportHeight = !double.IsInfinity(availableSize.Height) ? (int)availableSize.Height : (int)Application.Current.Host.Content.ActualHeight;\r\n            }\r\n            else\r\n            {\r\n                ViewportWidth = (int)Math.Min(availableSize.Width, 480);\r\n                ViewportHeight = (int)Math.Min(availableSize.Height, 800);\r\n            }\r\n\r\n            base.MeasureOverride(new Size(double.PositiveInfinity, ViewportHeight));\r\n\r\n            if (double.IsInfinity(availableSize.Width))\r\n            {\r\n                availableSize.Width = ViewportWidth;\r\n            }\r\n\r\n            if (double.IsInfinity(availableSize.Height))\r\n            {\r\n                availableSize.Height = ViewportHeight;\r\n            }\r\n\r\n            return availableSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the arrange pass for the control.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Render size.\r\n        /// </returns>\r\n        /// <param name=\"finalSize\">Final size.</param>\r\n        protected override Size ArrangeOverride(Size finalSize)\r\n        {\r\n            finalSize.Width = DesiredSize.Width;\r\n            base.ArrangeOverride(finalSize);\r\n            return finalSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// When the items have changed, we need to adjust the selection.\r\n        /// </summary>\r\n        /// <param name=\"e\">The changed item.</param>\r\n        protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)\r\n        {\r\n            base.OnItemsChanged(e);\r\n\r\n            if (!IsInit)\r\n            {\r\n                RequestAdjustSelection();\r\n            }\r\n        }\r\n\r\n        internal void RequestAdjustSelection()\r\n        {\r\n            if (_adjustSelectedRequested)\r\n            {\r\n                return;\r\n            }\r\n\r\n            LayoutUpdated += LayoutUpdatedAdjustSelection;\r\n            _adjustSelectedRequested = true;\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            _loaded = true;\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            _loaded = false;\r\n        }\r\n\r\n        private void LayoutUpdatedAdjustSelection(object sender, System.EventArgs e)\r\n        {\r\n            _adjustSelectedRequested = false;\r\n            LayoutUpdated -= LayoutUpdatedAdjustSelection;\r\n            AdjustSelection();\r\n        }\r\n\r\n        private void AdjustSelection()\r\n        {\r\n            if (_isDesignTime)\r\n            {\r\n                if (_loaded)\r\n                {\r\n                    _targetOffset = 0;\r\n                    GoTo(_targetOffset, Immediately);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                object oldSelectedItem = SelectedItem;\r\n                object newSelectedItem = null;\r\n\r\n                if (Panel != null && Panel.VisibleChildren.Count > 0)\r\n                {\r\n                    if (oldSelectedItem == null)\r\n                    {\r\n                        newSelectedItem = GetItem(Panel.VisibleChildren[0]);\r\n                    }\r\n                    else\r\n                    {\r\n                        StartViewItem oldContainer = GetContainer(oldSelectedItem);\r\n                        newSelectedItem = oldContainer == null || !Panel.VisibleChildren.Contains(oldContainer) ? GetItem(Panel.VisibleChildren[0]) : oldSelectedItem;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    _targetOffset = 0;\r\n                    GoTo(_targetOffset, Immediately);\r\n                }\r\n\r\n                SetSelectionInternal(newSelectedItem);\r\n\r\n                StartViewItem newContainer = GetContainer(newSelectedItem);\r\n                if (newContainer != null)\r\n                {\r\n                    _targetOffset = -newContainer.StartPosition;\r\n                    GoTo(_targetOffset, Immediately);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void GestureStart()\r\n        {\r\n            _targetOffset = ActualOffset;\r\n            _flickDirection = 0;\r\n            _cumulativeDragDelta = 0;\r\n            _effectiveDragDelta = 0;\r\n            _dragged = false;\r\n        }\r\n\r\n        private void HorizontalDrag(DragEventArgs args)\r\n        {\r\n            if (_flickDirection == 0)\r\n            {\r\n                _cumulativeDragDelta = (int)args.CumulativeDistance.X;\r\n                _effectiveDragDelta += (int)args.DeltaDistance.X;\r\n                _targetOffset += (int)args.DeltaDistance.X;\r\n                if (Math.Abs(_cumulativeDragDelta) <= ViewportWidth)\r\n                {\r\n                    if (_effectiveDragDelta > 0 && SelectedIndex == 0 || _effectiveDragDelta < 0 && SelectedIndex == Items.Count - 1)\r\n                    {\r\n                        _effectiveDragDelta = 0;\r\n                        _targetOffset = ActualOffset;\r\n                        return;\r\n                    }\r\n\r\n                    _dragged = true;\r\n                    GoTo(_targetOffset, PanDuration);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Flick(FlickEventArgs e)\r\n        {\r\n            if (e.Angle == 180)\r\n            {\r\n                _flickDirection = -1;\r\n            }\r\n            else if (e.Angle == 0)\r\n            {\r\n                _flickDirection = 1;\r\n            }\r\n        }\r\n\r\n        private void GestureEnd()\r\n        {\r\n            if (_flickDirection == 0)\r\n            {\r\n                if (_dragged)\r\n                {\r\n                    int snapTo;\r\n                    int newDirection;\r\n                    StartViewItem newSelection;\r\n\r\n                    Panel.GetSnapOffset(_targetOffset, ViewportWidth, Math.Sign(_cumulativeDragDelta), out snapTo, out newDirection, out newSelection);\r\n\r\n                    object newSelectedItem = GetItem(newSelection);\r\n                    if (SelectedItem == newSelectedItem)\r\n                    {\r\n                        RaiseSelectionCanceled();\r\n                    }\r\n\r\n                    if (newSelectedItem != null)\r\n                    {\r\n                        _suppressAnimation = true;\r\n                        SelectedItem = newSelectedItem;\r\n                        _suppressAnimation = false;\r\n                    }\r\n\r\n                    GoTo(snapTo, SnapDuration);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                ProcessFlick();\r\n            }\r\n        }\r\n\r\n        private void ProcessFlick()\r\n        {\r\n            if (_flickDirection != 0)\r\n            {\r\n                StartViewPanel.ItemStop previous;\r\n                StartViewPanel.ItemStop current;\r\n                StartViewPanel.ItemStop next;\r\n\r\n                Panel.GetStops(SelectionOffset, ItemsWidth, out previous, out current, out next);\r\n\r\n                if (previous == current && current == next && next == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                if (_flickDirection < 0 && next == null || _flickDirection > 0 && previous == null)\r\n                {\r\n                    if (current != null)\r\n                    {\r\n                        GoTo(-current.Position, Immediately);\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                _targetOffset = _flickDirection < 0 ? -next.Position : -previous.Position;\r\n\r\n                _suppressAnimation = true;\r\n                SelectedItem = GetItem(_flickDirection < 0 ? next.Item : previous.Item);\r\n                _suppressAnimation = false;\r\n\r\n                GoTo(_targetOffset, FlickDuration);\r\n            }\r\n        }\r\n\r\n        private void GoTo(int offset, Duration duration, Action completionAction)\r\n        {\r\n            if (_animator != null)\r\n            {\r\n                _animator.GoTo(offset, duration, _easingFunction, completionAction);\r\n            }\r\n        }\r\n\r\n        private void GoTo(int offset)\r\n        {\r\n            GoTo(offset, null);\r\n        }\r\n\r\n        private void GoTo(int offset, Action completionAction)\r\n        {\r\n            int delta = Math.Abs(ActualOffset - offset);\r\n            GoTo(offset, TimeSpan.FromMilliseconds(delta * 2), completionAction);\r\n        }\r\n\r\n        private void GoTo(int offset, Duration duration)\r\n        {\r\n            GoTo(offset, duration, null);\r\n        }\r\n\r\n        private void SetSelectionInternal(object selectedItem)\r\n        {\r\n            _suppressSelectionChangedEvent = true;\r\n            SelectedItem = selectedItem;\r\n            _suppressSelectionChangedEvent = false;\r\n        }\r\n\r\n        private void OnSelectedItemChanged(DependencyPropertyChangedEventArgs args)\r\n        {\r\n            if (IsInit)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_ignorePropertyChange)\r\n            {\r\n                _ignorePropertyChange = false;\r\n                return;\r\n            }\r\n\r\n            if (!_isDesignTime)\r\n            {\r\n                if (args.NewValue == null && Items.Count > 0)\r\n                {\r\n                    _ignorePropertyChange = true;\r\n                    SelectedItem = args.OldValue;\r\n                    throw new ArgumentException(\"SelectedItem\");\r\n                }\r\n                else if (args.NewValue != null && !Items.Contains(args.NewValue))\r\n                {\r\n                    _ignorePropertyChange = true;\r\n                    SelectedItem = args.OldValue;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            SelectedIndex = Items.IndexOf(args.NewValue);\r\n\r\n            if (_suppressSelectionChangedEvent)\r\n            {\r\n                return;\r\n            }\r\n\r\n            SafeRaise.Raise<SelectionChangedEventArgs>(SelectionChanged, this, (() =>\r\n            {\r\n                object[] unselected;\r\n                if (args.OldValue != null)\r\n                {\r\n                    unselected = new object[1] { args.OldValue };\r\n                }\r\n                else\r\n                {\r\n                    unselected = new object[0];\r\n                }\r\n\r\n                object[] selected;\r\n                if (args.NewValue != null)\r\n                {\r\n                    selected = new object[1] { args.NewValue };\r\n                }\r\n                else\r\n                {\r\n                    selected = new object[0];\r\n                }\r\n\r\n                return new SelectionChangedEventArgs(unselected, selected);\r\n            }));\r\n\r\n            if (!_suppressAnimation)\r\n            {\r\n                GoTo(SelectionOffset, _loaded ? DefaultDuration : Immediately);\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2208:InstantiateArgumentExceptionsCorrectly\")]\r\n        private void OnSelectedIndexChanged(DependencyPropertyChangedEventArgs args)\r\n        {\r\n            if (IsInit)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_ignorePropertyChange)\r\n            {\r\n                _ignorePropertyChange = false;\r\n                return;\r\n            }\r\n\r\n            int newSelectedIndex = (int)args.NewValue;\r\n            int itemsCount = Items.Count;\r\n\r\n            if (newSelectedIndex >= 0 && newSelectedIndex < itemsCount)\r\n            {\r\n                SelectedItem = Items[newSelectedIndex];\r\n            }\r\n            else if (newSelectedIndex == -1 && itemsCount == 0)\r\n            {\r\n                SelectedItem = null;\r\n            }\r\n            else if (!_isDesignTime)\r\n            {\r\n                _ignorePropertyChange = true;\r\n                SelectedIndex = (int)args.OldValue;\r\n                throw new ArgumentOutOfRangeException(\"SelectedIndex\");\r\n            }\r\n        }\r\n\r\n        private void OnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            ViewportWidth = (int)e.NewSize.Width;\r\n            ViewportHeight = (int)e.NewSize.Height;\r\n            ItemsWidth = (int)Panel.ActualWidth;\r\n        }\r\n\r\n        void ISupportInitialize.BeginInit()\r\n        {\r\n            _initializingData = new InitializingData\r\n            {\r\n                InitialItem = SelectedItem,\r\n                InitialIndex = SelectedIndex\r\n            };\r\n        }\r\n\r\n        void ISupportInitialize.EndInit()\r\n        {\r\n            if (_initializingData == null)\r\n            {\r\n                throw new InvalidOperationException();\r\n            }\r\n\r\n            int selectedIndex = SelectedIndex;\r\n            object selectedItem = SelectedItem;\r\n\r\n            if (_initializingData.InitialIndex != selectedIndex)\r\n            {\r\n                SelectedIndex = _initializingData.InitialIndex;\r\n                _initializingData = null;\r\n                SelectedIndex = selectedIndex;\r\n            }\r\n            else if (!ReferenceEquals(_initializingData.InitialItem, selectedItem))\r\n            {\r\n                SelectedItem = _initializingData.InitialItem;\r\n                _initializingData = null;\r\n                SelectedItem = selectedItem;\r\n            }\r\n\r\n            _initializingData = null;\r\n        }\r\n\r\n        private class InitializingData\r\n        {\r\n            public int InitialIndex;\r\n            public object InitialItem;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/StartViewItem.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows.Controls;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    /// <summary>\r\n    /// Represents an item in a StartView control.\r\n    /// </summary>\r\n    public class StartViewItem : ContentControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the StartViewItem class.\r\n        /// </summary>\r\n        public StartViewItem()\r\n        {\r\n            DefaultStyleKey = typeof(StartViewItem);\r\n        }\r\n\r\n        internal int StartPosition { get; set; }\r\n\r\n        internal int ItemWidth { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/StartViewPanel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    /// <summary>\r\n    /// Implements a custom Panel for the StartView control.\r\n    /// </summary>\r\n    public class StartViewPanel : Panel\r\n    {\r\n        private const int SnapThresholdDivisor = 2;\r\n\r\n        private readonly List<StartViewItem> _visibleChildren = new List<StartViewItem>();\r\n        private readonly List<ItemStop> _itemStops = new List<ItemStop>();\r\n        private StartView _owner;\r\n        private StartViewItem _selectedItem;\r\n\r\n        internal IList<StartViewItem> VisibleChildren\r\n        {\r\n            get { return _visibleChildren; }\r\n        }\r\n\r\n        private StartView Owner\r\n        {\r\n            get { return _owner; }\r\n            set\r\n            {\r\n                if (_owner != value)\r\n                {\r\n                    if (_owner != null)\r\n                    {\r\n                        _owner.Panel = null;\r\n                    }\r\n\r\n                    _owner = value;\r\n\r\n                    if (_owner != null)\r\n                    {\r\n                        _owner.Panel = this;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the StartViewPanel class.\r\n        /// </summary>\r\n        public StartViewPanel()\r\n        {\r\n            SizeChanged += OnSizeChanged;\r\n            Unloaded += OnUnloaded;\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            _owner = null;\r\n        }\r\n\r\n        private void OnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            Owner.ItemsWidth = (int)e.NewSize.Width;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the measure pass for the control.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Desired size.\r\n        /// </returns>\r\n        /// <param name=\"availableSize\">Available size.</param>\r\n        protected override Size MeasureOverride(Size availableSize)\r\n        {\r\n            if (_owner == null)\r\n            {\r\n                FindOwner();\r\n            }\r\n\r\n            Size desiredSize = new Size(0, availableSize.Height);\r\n\r\n            int childWidth = Owner.ViewportWidth;\r\n            int childHeight = (int)Math.Min(availableSize.Height, Owner.ViewportHeight);\r\n            Size childSize = new Size(childWidth, childHeight);\r\n\r\n            _visibleChildren.Clear();\r\n\r\n            foreach (StartViewItem child in Children)\r\n            {\r\n                if (child.Visibility == Visibility.Visible)\r\n                {\r\n                    _visibleChildren.Add(child);\r\n                    child.Measure(childSize);\r\n                    desiredSize.Width += childWidth;\r\n                }\r\n            }\r\n\r\n            return desiredSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the arrange pass for the control.\r\n        /// </summary>\r\n        /// \r\n        /// <returns>\r\n        /// Render size.\r\n        /// </returns>\r\n        /// <param name=\"finalSize\">Final size.</param>\r\n        protected override Size ArrangeOverride(Size finalSize)\r\n        {\r\n            _itemStops.Clear();\r\n            double x = 0;\r\n            Rect finalRect = new Rect(0, 0, 0, finalSize.Height);\r\n\r\n            for (int index = 0; index < _visibleChildren.Count; ++index)\r\n            {\r\n                StartViewItem child = _visibleChildren[index];\r\n                finalRect.X = child.StartPosition = (int)x;\r\n                _itemStops.Add(new ItemStop(child, child.StartPosition));\r\n                finalRect.Width = Owner.ViewportWidth;\r\n                child.ItemWidth = (int)finalRect.Width;\r\n                child.Arrange(finalRect);\r\n                x += finalRect.Width;\r\n            }\r\n\r\n            Owner.RequestAdjustSelection();\r\n\r\n            return finalSize;\r\n        }\r\n\r\n        private void GetItemsInView(int offset, int viewportWidth, out int leftIndex, out int leftInView, out int centerIndex, out int rightIndex, out int rightInView)\r\n        {\r\n            leftIndex = leftInView = centerIndex = rightIndex = rightInView = -1;\r\n\r\n            int count = VisibleChildren.Count;\r\n            if (count == 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            for (int index = 0; index < count; ++index)\r\n            {\r\n                StartViewItem child = _visibleChildren[index];\r\n\r\n                int leftOffset = child.StartPosition + offset;\r\n                int rightOffset = leftOffset + child.ItemWidth - 1;\r\n\r\n                if (leftOffset <= 0 && rightOffset >= 0)\r\n                {\r\n                    leftIndex = index;\r\n                    leftInView = Math.Min(viewportWidth, child.ItemWidth + leftOffset);\r\n                }\r\n\r\n                if (leftOffset < viewportWidth && rightOffset >= viewportWidth)\r\n                {\r\n                    rightIndex = index;\r\n                    rightInView = Math.Min(viewportWidth, viewportWidth - leftOffset);\r\n                }\r\n\r\n                if (leftOffset > 0 && rightOffset < viewportWidth)\r\n                {\r\n                    centerIndex = index;\r\n                }\r\n\r\n                if (index == 0 && leftInView == -1)\r\n                {\r\n                    leftInView = leftOffset;\r\n                }\r\n\r\n                if (index == count - 1 && rightInView == -1)\r\n                {\r\n                    rightInView = viewportWidth - rightOffset - 1;\r\n                }\r\n            }\r\n        }\r\n\r\n        internal void GetStops(int offset, int totalWidth, out ItemStop previous, out ItemStop current, out ItemStop next)\r\n        {\r\n            next = current = previous = null;\r\n\r\n            if (VisibleChildren.Count == 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            int nextIndex = -1;\r\n            int currentIndex = -1;\r\n            int previousIndex = -1;\r\n\r\n            int position = -offset % totalWidth;\r\n            int itemStopIndex = 0;\r\n\r\n            foreach (ItemStop itemStop in _itemStops)\r\n            {\r\n                if (itemStop.Position < position)\r\n                {\r\n                    previousIndex = itemStopIndex;\r\n                }\r\n                else if (itemStop.Position > position)\r\n                {\r\n                    nextIndex = itemStopIndex;\r\n                    break;\r\n                }\r\n                else if (itemStop.Position == position)\r\n                {\r\n                    currentIndex = itemStopIndex;\r\n                }\r\n\r\n                ++itemStopIndex;\r\n            }\r\n\r\n            if (previousIndex != -1)\r\n            {\r\n                previous = _itemStops[previousIndex];\r\n            }\r\n\r\n            if (currentIndex != -1)\r\n            {\r\n                current = _itemStops[currentIndex];\r\n            }\r\n\r\n            if (nextIndex != -1)\r\n            {\r\n                next = _itemStops[nextIndex];\r\n            }\r\n        }\r\n\r\n        internal void GetSnapOffset(int offset, int viewportWidth, int direction, out int snapTo, out int newDirection, out StartViewItem newSelection)\r\n        {\r\n            int snapThreshold = viewportWidth / SnapThresholdDivisor;\r\n\r\n            snapTo = offset;\r\n            newDirection = direction;\r\n            newSelection = _selectedItem;\r\n\r\n            if (VisibleChildren.Count == 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            foreach (ItemStop itemStop in _itemStops)\r\n            {\r\n                if (itemStop.Position == -offset)\r\n                {\r\n                    newSelection = itemStop.Item;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            int leftIndex;\r\n            int leftInView;\r\n            int centerIndex;\r\n            int rightIndex;\r\n            int rightInView;\r\n\r\n            GetItemsInView(offset, viewportWidth, out leftIndex, out leftInView, out centerIndex, out rightIndex, out rightInView);\r\n\r\n            if (leftIndex == rightIndex && leftIndex != -1)\r\n            {\r\n                newSelection = _selectedItem = _visibleChildren[leftIndex];\r\n            }\r\n            else\r\n            {\r\n                if (leftIndex == -1)\r\n                {\r\n                    leftIndex = _visibleChildren.Count - 1;\r\n                }\r\n\r\n                if (rightIndex == -1)\r\n                {\r\n                    rightIndex = 0;\r\n                }\r\n\r\n                int index;\r\n                if (direction < 0)\r\n                {\r\n                    if (rightInView > snapThreshold)\r\n                    {\r\n                        index = GetBestIndex(centerIndex, rightIndex, leftIndex);\r\n                        newDirection = -1;\r\n                    }\r\n                    else\r\n                    {\r\n                        index = GetBestIndex(leftIndex, centerIndex, rightIndex);\r\n                        newDirection = 1;\r\n                    }\r\n                }\r\n                else if (direction > 0)\r\n                {\r\n                    if (leftInView > snapThreshold)\r\n                    {\r\n                        index = StartViewPanel.GetBestIndex(leftIndex, centerIndex, rightIndex);\r\n                        newDirection = 1;\r\n                    }\r\n                    else\r\n                    {\r\n                        index = StartViewPanel.GetBestIndex(centerIndex, rightIndex, leftIndex);\r\n                        newDirection = -1;\r\n                    }\r\n                }\r\n                else if (centerIndex != -1)\r\n                {\r\n                    index = centerIndex;\r\n                    newDirection = -1;\r\n                }\r\n                else if (leftInView > rightInView)\r\n                {\r\n                    index = leftIndex;\r\n                    newDirection = -1;\r\n                }\r\n                else\r\n                {\r\n                    index = rightIndex;\r\n                    newDirection = 1;\r\n                }\r\n\r\n                _selectedItem = _visibleChildren[index];\r\n                snapTo = -_selectedItem.StartPosition;\r\n                newSelection = _selectedItem;\r\n            }\r\n        }\r\n\r\n        private static int GetBestIndex(int n0, int n1, int n2)\r\n        {\r\n            if (n0 >= 0)\r\n            {\r\n                return n0;\r\n            }\r\n\r\n            if (n1 >= 0)\r\n            {\r\n                return n1;\r\n            }\r\n\r\n            if (n2 >= 0)\r\n            {\r\n                return n2;\r\n            }\r\n\r\n            throw new InvalidOperationException(\"No best index.\");\r\n        }\r\n\r\n        private void FindOwner()\r\n        {\r\n            FrameworkElement frameworkElement = this;\r\n            StartView owner;\r\n            do\r\n            {\r\n                frameworkElement = (FrameworkElement)VisualTreeHelper.GetParent(frameworkElement);\r\n                owner = frameworkElement as StartView;\r\n            }\r\n            while (frameworkElement != null && owner == null);\r\n            Owner = owner;\r\n        }\r\n\r\n        internal class ItemStop\r\n        {\r\n            public ItemStop(StartViewItem item, int position)\r\n            {\r\n                Item = item;\r\n                Position = position;\r\n            }\r\n\r\n            public int Position { get; private set; }\r\n\r\n            public StartViewItem Item { get; private set; }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Controls/StartView/TransformAnimator.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace TelegramClient.Controls.StartView\r\n{\r\n    /// <summary>\r\n    /// A utility for animating a horizontal translation value.\r\n    /// </summary>\r\n    internal sealed class TransformAnimator\r\n    {\r\n        /// <summary>\r\n        /// Single static instance of a PropertyPath with string path \"X\".\r\n        /// </summary>\r\n        private static readonly PropertyPath TranslateXPropertyPath = new PropertyPath(\"X\");\r\n\r\n        /// <summary>\r\n        /// The Storyboard instance for the animation.\r\n        /// </summary>\r\n        private readonly Storyboard _sbRunning = new Storyboard();\r\n\r\n        /// <summary>\r\n        /// The DoubleAnimation instance for a running animation.\r\n        /// </summary>\r\n        private readonly DoubleAnimation _daRunning = new DoubleAnimation();\r\n\r\n        /// <summary>\r\n        /// The target translate transform instance.\r\n        /// </summary>\r\n        private TranslateTransform _transform;\r\n\r\n        /// <summary>\r\n        /// A one-time action for the current GoTo statement only. Cleared if\r\n        /// GoTo is called before the action runs.\r\n        /// </summary>\r\n        private Action _oneTimeAction;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the TransformAnimator class.\r\n        /// </summary>\r\n        /// <param name=\"translateTransform\">TranslateTransform instance.</param>\r\n        public TransformAnimator(TranslateTransform translateTransform)\r\n        {\r\n            Debug.Assert(translateTransform != null);\r\n            _transform = translateTransform;\r\n\r\n            _sbRunning.Completed += OnCompleted;\r\n            _sbRunning.Children.Add(_daRunning);\r\n            Storyboard.SetTarget(_daRunning, _transform);\r\n            Storyboard.SetTargetProperty(_daRunning, TranslateXPropertyPath);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the current offset value from the translate transform object.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public double CurrentOffset\r\n        {\r\n            get { return _transform.X; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Targets a new horizontal offset over a specified duration.\r\n        /// </summary>\r\n        /// <param name=\"targetOffset\">The target offset value.</param>\r\n        /// <param name=\"duration\">The duration for the animation.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public void GoTo(double targetOffset, Duration duration)\r\n        {\r\n            GoTo(targetOffset, duration, null, null);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public void GoTo(double targetOffset, Duration duration, Action completionAction)\r\n        {\r\n            GoTo(targetOffset, duration, null, completionAction);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public void GoTo(double targetOffset, Duration duration, IEasingFunction easingFunction)\r\n        {\r\n            GoTo(targetOffset, duration, easingFunction, null);\r\n        }\r\n\r\n        public void GoTo(double targetOffset, Duration duration, IEasingFunction easingFunction, Action completionAction)\r\n        {\r\n            _daRunning.To = targetOffset;\r\n            _daRunning.Duration = duration;\r\n            _daRunning.EasingFunction = easingFunction;\r\n            _sbRunning.Begin();\r\n            _sbRunning.SeekAlignedToLastTick(TimeSpan.Zero);\r\n            _oneTimeAction = completionAction;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the easing function of the double animation.\r\n        /// </summary>\r\n        /// <param name=\"ease\">The easing funciton, if any, to use.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping existing implementation.\")]\r\n        public void UpdateEasingFunction(IEasingFunction ease)\r\n        {\r\n            if (_daRunning != null && _daRunning.EasingFunction != ease)\r\n            {\r\n                _daRunning.EasingFunction = ease;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Immediately updates the duration of the running double animation.\r\n        /// </summary>\r\n        /// <param name=\"duration\">The new duration value to use.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public void UpdateDuration(Duration duration)\r\n        {\r\n            if (_daRunning != null)\r\n            {\r\n                _daRunning.Duration = duration;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles animation completed\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            // Make sure the action is called when the animation is Stopped\r\n            // The complete event is triggered when it changes to Filling\r\n            // This is also called before the state has been changed so the state\r\n            // is still Active when switching to Filling\r\n            Action action = _oneTimeAction;\r\n            if (action != null && _sbRunning.GetCurrentState() != ClockState.Active)\r\n            {\r\n                _oneTimeAction = null;\r\n                action();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Ensures and creates if needed the animator for an element. Will also\r\n        /// verify that a translate transform is present.\r\n        /// </summary>\r\n        /// <param name=\"targetElement\">The target element.</param>\r\n        /// <param name=\"animator\">The animator reference.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public static void EnsureAnimator(FrameworkElement targetElement, ref TransformAnimator animator)\r\n        {\r\n            if (animator == null)\r\n            {\r\n                TranslateTransform transform = TransformAnimator.GetTranslateTransform(targetElement);\r\n                if (transform != null)\r\n                {\r\n                    animator = new TransformAnimator(transform);\r\n                }\r\n            }\r\n            if (animator == null)\r\n            {\r\n                throw new InvalidOperationException(\"The animation system could not be prepared for the target element.\");\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Find a translate transform for the container or create one.\r\n        /// </summary>\r\n        /// <param name=\"container\">The container.</param>\r\n        /// <returns>Returns the TranslateTransform reference.</returns>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Keeping the public API available.\")]\r\n        public static TranslateTransform GetTranslateTransform(UIElement container)\r\n        {\r\n            if (container == null)\r\n            {\r\n                throw new ArgumentNullException(\"container\");\r\n            }\r\n\r\n            TranslateTransform transform = container.RenderTransform as TranslateTransform;\r\n            if (transform == null)\r\n            {\r\n                if (container.RenderTransform == null)\r\n                {\r\n                    transform = new TranslateTransform();\r\n                    container.RenderTransform = transform;\r\n                }\r\n                else if (container.RenderTransform is TransformGroup)\r\n                {\r\n                    TransformGroup g = container.RenderTransform as TransformGroup;\r\n                    transform = (from t in g.Children\r\n                                 where t is TranslateTransform\r\n                                 select (TranslateTransform)t).FirstOrDefault();\r\n                    if (transform == null)\r\n                    {\r\n                        transform = new TranslateTransform();\r\n                        g.Children.Add(transform);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    TransformGroup tg = new TransformGroup();\r\n                    var existing = container.RenderTransform;\r\n                    container.RenderTransform = null;\r\n                    tg.Children.Add(existing);\r\n                    transform = new TranslateTransform();\r\n                    tg.Children.Add(transform);\r\n                    container.RenderTransform = tg;\r\n                }\r\n            }\r\n            return transform;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Converters/ChannelParticipantsCountConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Utils;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class ChannelParticipantsCountConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var channel = value as TLChannel73;\r\n            if (channel != null && channel.ParticipantsCount != null)\r\n            {\r\n                return \", \" +  Language.Declension(\r\n                    channel.ParticipantsCount.Value,\r\n                    AppResources.SubscriberNominativeSingular,\r\n                    AppResources.SubscriberNominativePlural,\r\n                    AppResources.SubscriberGenitiveSingular,\r\n                    AppResources.SubscriberGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Converters/SecureFilePreviewConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Imaging;\r\nusing Windows.Storage;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Passport;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class SecureFilePreviewConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var secureFile = value as TLSecureFile;\r\n            if (secureFile != null)\r\n            {\r\n                var inputFileLocation = new TLInputDocumentFileLocation54\r\n                {\r\n                    Id = secureFile.Id,\r\n                    AccessHash = secureFile.AccessHash,\r\n                    Version = new TLInt(0)\r\n                };\r\n\r\n                var localFileName = string.Format(\"secureid_{0}.dat\", secureFile.Id);\r\n                var previewFileName = string.Format(\"secureid_preview_{0}.dat\", secureFile.Id);\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (store.FileExists(previewFileName))\r\n                    {\r\n                        BitmapImage imageSource;\r\n\r\n                        try\r\n                        {\r\n                            using (var stream = store.OpenFile(previewFileName, FileMode.Open, FileAccess.Read))\r\n                            {\r\n                                stream.Seek(0, SeekOrigin.Begin);\r\n                                var image = new BitmapImage();\r\n                                image.CreateOptions |= BitmapCreateOptions.BackgroundCreation;\r\n                                image.SetSource(stream);\r\n                                imageSource = image;\r\n                            }\r\n                        }\r\n                        catch (Exception)\r\n                        {\r\n                            return null;\r\n                        }\r\n\r\n                        return imageSource;\r\n                    }\r\n                    if (store.FileExists(inputFileLocation.GetFileName()))\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            DecryptFile(secureFile, inputFileLocation, localFileName, previewFileName);\r\n                        });\r\n\r\n                        return null;\r\n                    }\r\n                }\r\n\r\n                IoC.Get<IDocumentFileManager>().DownloadFileAsync(\r\n                    new TLString(localFileName), \r\n                    secureFile.DCId, \r\n                    inputFileLocation, \r\n                    secureFile, \r\n                    secureFile.Size,\r\n                    progress =>\r\n                    {\r\n                        \r\n                    },\r\n                    item =>\r\n                    {\r\n                        DecryptFile(secureFile, inputFileLocation, localFileName, previewFileName);\r\n                    });\r\n            }\r\n\r\n            var secureFileUploaded = value as TLSecureFileUploaded;\r\n            if (secureFileUploaded != null)\r\n            {\r\n                var previewFileName = string.Format(\"secureid_preview_{0}.dat\", secureFileUploaded.Id);\r\n\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (store.FileExists(previewFileName))\r\n                    {\r\n                        BitmapImage imageSource;\r\n\r\n                        try\r\n                        {\r\n                            using (var stream = store.OpenFile(previewFileName, FileMode.Open, FileAccess.Read))\r\n                            {\r\n                                stream.Seek(0, SeekOrigin.Begin);\r\n                                var image = new BitmapImage();\r\n                                image.CreateOptions |= BitmapCreateOptions.BackgroundCreation;\r\n                                image.SetSource(stream);\r\n                                imageSource = image;\r\n                            }\r\n                        }\r\n                        catch (Exception)\r\n                        {\r\n                            return null;\r\n                        }\r\n\r\n                        return imageSource;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static async void DecryptFile(TLSecureFile secureFile, TLInputFileLocationBase inputFileLocation, string localFileName, string previewFileName)\r\n        {\r\n            var fileSecret = Passport.DecryptValueSecret(\r\n                secureFile.Secret,\r\n                EnterPasswordViewModel.Secret,\r\n                secureFile.FileHash);\r\n\r\n            var encryptedFile = await ApplicationData.Current.LocalFolder.GetFileAsync(inputFileLocation.GetFileName(\"document\"));\r\n            \r\n            var decryptedTuple = await Passport.DecryptFile(localFileName, encryptedFile, fileSecret, secureFile.FileHash);\r\n\r\n            var stream = await decryptedTuple.Item1.OpenReadAsync();\r\n\r\n            await DialogDetailsViewModel.ResizeJpeg(stream, 180, localFileName, previewFileName);\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                secureFile.NotifyOfPropertyChange(() => secureFile.Self);\r\n            });\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Converters/ShippingOptionToStringConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class ShippingOptionToStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var shippingOption = value as TLShippingOption;\r\n            if (shippingOption != null)\r\n            {\r\n                if (shippingOption.Prices.Count > 0)\r\n                {\r\n                    var currency = shippingOption.Prices[0].Currency ?? TLString.Empty;\r\n                    return string.Format(\"{0} - {1}\", Telegram.Controls.Utils.Currency.GetString(shippingOption.Prices.Sum(x => x.Amount.Value), currency.ToString()), shippingOption.Title);\r\n                }\r\n\r\n                return shippingOption.Title.ToString();\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class LabeledPriceToStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var labeledPrice = value as TLLabeledPrice;\r\n            if (labeledPrice != null)\r\n            {\r\n                var currency = labeledPrice.Currency ?? TLString.Empty;\r\n                return Telegram.Controls.Utils.Currency.GetString(labeledPrice.Amount.Value, currency.ToString());\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Converters/TTLMediaToVisibilityConverter.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Converters\r\n{\r\n    public class TTLMediaToVisibilityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return TLMessageBase.HasTTL(value as TLMessageMediaBase) ? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class TTLMediaToTimerStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var ttlSeconds = value as TLInt;\r\n            if (ttlSeconds != null && ttlSeconds.Value >= 0)\r\n            {\r\n                if (ttlSeconds.Value >= 60 * 60)\r\n                {\r\n                    return string.Format(\"{0}h\", ttlSeconds.Value / (60 * 60));\r\n                }\r\n\r\n                if (ttlSeconds.Value >= 60)\r\n                {\r\n                    return string.Format(\"{0}m\", ttlSeconds.Value / 60);\r\n                }\r\n\r\n                return string.Format(\"{0}s\", ttlSeconds.Value);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/FFMpegBuild.txt",
    "content": "﻿mkdir -p Output/WindowsPhone8.1/ARM\r\n\r\ncd Output/WindowsPhone8.1/ARM\r\n\r\n../../../configure \\\r\n--toolchain=msvc \\\r\n--disable-programs \\\r\n--disable-d3d11va \\\r\n--disable-dxva2 \\\r\n--disable-doc \\\r\n--disable-avx \\\r\n--disable-everything \\\r\n--disable-network \\\r\n--disable-zlib \\\r\n--disable-avfilter \\\r\n--disable-avdevice \\\r\n--disable-postproc \\\r\n--disable-debug \\\r\n--disable-network \\\r\n--arch=arm \\\r\n--as=armasm \\\r\n--cpu=armv7 \\\r\n--enable-thumb \\\r\n--enable-version3 \\\r\n--enable-gpl \\\r\n--enable-protocol=file \\\r\n--enable-decoder=h264 \\\r\n--enable-decoder=gif \\\r\n--enable-demuxer=mov \\\r\n--enable-demuxer=gif \\\r\n--enable-hwaccels \\\r\n--enable-asm \\\r\n--enable-shared \\\r\n--enable-cross-compile \\\r\n--target-os=win32 \\\r\n--extra-cflags=\"-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -D_WIN32_WINNT=0x0603 -D__ARM_PCS_VFP\" \\\r\n--extra-ldflags=\"-APPCONTAINER -MACHINE:ARM -subsystem:console -opt:ref WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib -NODEFAULTLIB:kernel32.lib -NODEFAULTLIB:ole32.lib\" \\\r\n--prefix=../../../Build/WindowsPhone8.1/ARM\r\n\r\nmake\r\n\r\nmake install"
  },
  {
    "path": "TelegramClient.WP81/Helpers/TemplateSelectors/ImageViewerTemplateSelector.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Helpers.TemplateSelectors\r\n{\r\n    public class ImageViewerTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate PhotoTemplate { get; set; }\r\n\r\n        public DataTemplate VideoTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var message = value as TLMessage;\r\n            if (message != null)\r\n            {\r\n                if (message.Media is TLMessageMediaVideo || message.IsVideo())\r\n                {\r\n                    return VideoTemplate;\r\n                }\r\n\r\n                return PhotoTemplate;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class DecryptedImageViewerTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate PhotoTemplate { get; set; }\r\n\r\n        public DataTemplate VideoTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var message = value as TLDecryptedMessage;\r\n            if (message != null)\r\n            {\r\n                if (message.Media is TLDecryptedMessageMediaVideo || message.IsVideo())\r\n                {\r\n                    return VideoTemplate;\r\n                }\r\n\r\n                return PhotoTemplate;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Helpers/WeakEventListener.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace TelegramClient.Helpers\r\n{\r\n    internal class WeakEventListener<TInstance, TSource, TEventArgs> where TInstance : class where TSource : class\r\n    {\r\n        private readonly WeakReference _instance;\r\n\r\n        private readonly WeakReference _source;\r\n\r\n        private Action<TInstance, TSource, TEventArgs> _onEventAction;\r\n\r\n        public Action<TInstance, TSource, TEventArgs> OnEventAction\r\n        {\r\n            get { return _onEventAction; }\r\n            set\r\n            {\r\n                if (value != null && !value.Method.IsStatic)\r\n                {\r\n                    throw new ArgumentException(\"OnEventAction method must be static otherwise the event WeakEventListner class does not prevent memory leaks.\");\r\n                }\r\n\r\n                _onEventAction = value;\r\n            }\r\n        }\r\n\r\n        private Action<WeakEventListener<TInstance, TSource, TEventArgs>, TSource> _onDetachAction;\r\n\r\n        public Action<WeakEventListener<TInstance, TSource, TEventArgs>, TSource> OnDetachAction\r\n        {\r\n            get { return _onDetachAction; }\r\n            set\r\n            {\r\n                if (value != null && !value.Method.IsStatic)\r\n                {\r\n                    throw new ArgumentException(\"OnDetachAction method must be static otherwise the event WeakEventListner class does not prevent memory leaks.\");\r\n                }\r\n\r\n                _onDetachAction = value;\r\n            }\r\n        }\r\n\r\n        public WeakEventListener(TInstance instance, TSource source)\r\n        {\r\n            _instance = new WeakReference(instance);\r\n            _source = new WeakReference(source);\r\n        }\r\n\r\n        public void OnEvent(TSource source, TEventArgs args)\r\n        {\r\n            var instance = _instance.Target;\r\n            if (instance != null)\r\n            {\r\n                if (OnEventAction != null) OnEventAction((TInstance)instance, source, args);\r\n            }\r\n            else\r\n            {\r\n                Detach();\r\n            }\r\n        }\r\n\r\n        public void Detach()\r\n        {\r\n            var source = _source.Target as TSource;\r\n            if (source != null && OnDetachAction != null)\r\n            {\r\n                OnDetachAction(this, source);\r\n                OnDetachAction = null;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Package.appxmanifest",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">\r\n  <Identity Name=\"TelegramMessengerLLP.TelegramMessengerBeta\" Publisher=\"CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A\" Version=\"3.4.0.0\" />\r\n  <mp:PhoneIdentity PhoneProductId=\"cee0f789-8059-4881-8883-347265c01f93\" PhonePublisherId=\"a652821a-0986-4366-8fe7-f00379d89c9b\" />\r\n  <Properties>\r\n    <DisplayName>Telegram Messenger</DisplayName>\r\n    <PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>\r\n    <Logo>ApplicationIcon106.png</Logo>\r\n  </Properties>\r\n  <Prerequisites>\r\n    <OSMinVersion>6.3.1</OSMinVersion>\r\n    <OSMaxVersionTested>6.3.1</OSMaxVersionTested>\r\n  </Prerequisites>\r\n  <Resources>\r\n    <Resource Language=\"en\" />\r\n    <Resource Language=\"de\" />\r\n    <Resource Language=\"es\" />\r\n    <Resource Language=\"it\" />\r\n    <Resource Language=\"nl\" />\r\n    <Resource Language=\"pt\" />\r\n    <Resource Language=\"ru\" />\r\n  </Resources>\r\n  <Applications>\r\n    <Application Id=\"xcee0f789y8059y4881y8883y347265c01f93x\" Executable=\"AGHost.exe\" EntryPoint=\"Views/ShellView.xaml\">\r\n      <m3:VisualElements DisplayName=\"Telegram\" Square150x150Logo=\"SquareTile150x150.png\" Square44x44Logo=\"ApplicationIcon106.png\" Description=\"Fast and secure messaging app\" ForegroundText=\"light\" BackgroundColor=\"transparent\" ToastCapable=\"true\">\r\n        <!--<m3:LockScreen Notification=\"badgeAndTileText\" BadgeLogo=\"Images/LockScreen/Lockscreen.png\" />-->\r\n        <m3:DefaultTile Square71x71Logo=\"SquareTile71x71.png\" Wide310x150Logo=\"WideTile310x150.png\">\r\n          <m3:ShowNameOnTiles>\r\n            <m3:ShowOn Tile=\"square150x150Logo\" />\r\n            <m3:ShowOn Tile=\"wide310x150Logo\" />\r\n          </m3:ShowNameOnTiles>\r\n        </m3:DefaultTile>\r\n      </m3:VisualElements>\r\n      <Extensions>\r\n        <Extension Category=\"windows.backgroundTasks\" EntryPoint=\"AgHost.BackgroundVoipTask\">\r\n          <BackgroundTasks ServerName=\"BackEnd.ServerHost\">\r\n            <Task Type=\"controlChannel\" />\r\n          </BackgroundTasks>\r\n        </Extension>\r\n        <Extension Category=\"windows.backgroundTasks\" EntryPoint=\"TelegramClient.Tasks.PushNotificationsBackgroundTask\">\r\n          <BackgroundTasks>\r\n            <Task Type=\"pushNotification\" />\r\n          </BackgroundTasks>\r\n        </Extension>\r\n        <Extension Category=\"windows.backgroundTasks\" EntryPoint=\"TelegramClient.Tasks.BackgroundDifferenceLoader\">\r\n          <BackgroundTasks>\r\n            <Task Type=\"pushNotification\" />\r\n          </BackgroundTasks>\r\n        </Extension>\r\n        <Extension Category=\"windows.backgroundTasks\" EntryPoint=\"TelegramClient.Tasks.InteractiveNotificationsBackgroundTask\">\r\n          <BackgroundTasks>\r\n            <Task Type=\"pushNotification\" />\r\n          </BackgroundTasks>\r\n        </Extension>\r\n        <Extension Category=\"windows.backgroundTasks\" EntryPoint=\"TelegramClient.Tasks.MessageSchedulerBackgroundTask\">\r\n          <BackgroundTasks>\r\n            <Task Type=\"systemEvent\" />\r\n            <Task Type=\"timer\" />\r\n          </BackgroundTasks>\r\n        </Extension>\r\n        <Extension Category=\"windows.shareTarget\">\r\n          <ShareTarget>\r\n            <SupportedFileTypes>\r\n              <FileType>.jpeg</FileType>\r\n              <FileType>.png</FileType>\r\n              <FileType>.jpg</FileType>\r\n              <FileType>.bmp</FileType>\r\n              <FileType>.mp4</FileType>\r\n            </SupportedFileTypes>\r\n            <DataFormat>Weblink</DataFormat>\r\n            <DataFormat>StorageItems</DataFormat>\r\n          </ShareTarget>\r\n        </Extension>\r\n        <!--<Extension Category=\"windows.backgroundTasks\" EntryPoint=\"AgHost.BackgroundTask\">\r\n          <BackgroundTasks>\r\n            <Task Type=\"systemEvent\" />\r\n          </BackgroundTasks>\r\n        </Extension>-->\r\n        <!--<Extension Category=\"windows.backgroundTasks\" EntryPoint=\"PhoneVoIPApp.Agents.BackgroundTask\">\r\n          <BackgroundTasks ServerName=\"BackEnd.ServerHost\">\r\n            <Task Type=\"pushNotification\" />\r\n          </BackgroundTasks>\r\n        </Extension>-->\r\n        <!--<Extension Category=\"windows.backgroundTasks\" EntryPoint=\"PhoneVoIPApp.BackEnd.BackgroundTask\">\r\n          <BackgroundTasks ServerName=\"BackEnd.ServerHost\">\r\n            <Task Type=\"pushNotification\" />\r\n          </BackgroundTasks>\r\n        </Extension>-->\r\n      </Extensions>\r\n    </Application>\r\n  </Applications>\r\n  <Capabilities>\r\n    <Capability Name=\"picturesLibrary\" />\r\n    <Capability Name=\"musicLibrary\" />\r\n    <Capability Name=\"removableStorage\" />\r\n    <Capability Name=\"videosLibrary\" />\r\n    <Capability Name=\"privateNetworkClientServer\" />\r\n    <Capability Name=\"internetClientServer\" />\r\n    <m3:Capability Name=\"contacts\" />\r\n    <DeviceCapability Name=\"location\" />\r\n    <DeviceCapability Name=\"microphone\" />\r\n    <DeviceCapability Name=\"webcam\" />\r\n  </Capabilities>\r\n  <Extensions>\r\n    <!--<Extension Category=\"windows.activatableClass.inProcessServer\">\r\n      <InProcessServer>\r\n        <Path>AgHostSvcs.dll</Path>\r\n        <ActivatableClass ActivatableClassId=\"AgHost.BackgroundTask\" ThreadingModel=\"both\" />\r\n      </InProcessServer>\r\n    </Extension>-->\r\n    <Extension Category=\"windows.activatableClass.inProcessServer\">\r\n      <InProcessServer>\r\n        <Path>AgHostSvcs.dll</Path>\r\n        <ActivatableClass ActivatableClassId=\"AgHost.BackgroundVoipTask\" ThreadingModel=\"both\" />\r\n      </InProcessServer>\r\n    </Extension>\r\n    <Extension Category=\"windows.activatableClass.outOfProcessServer\">\r\n      <OutOfProcessServer ServerName=\"BackEnd.ServerHost\">\r\n        <Path>PhoneVoIP.BackEnd.HostServer.exe</Path>\r\n        <Instancing>singleInstance</Instancing>\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.OutOfProcess.Server\" />\r\n      </OutOfProcessServer>\r\n    </Extension>\r\n    <Extension Category=\"windows.activatableClass.proxyStub\">\r\n      <ProxyStub ClassId=\"F5A3C2AE-EF7B-3DE2-8B0E-8E8B3CD20D9D\">\r\n        <Path>PhoneVoIPApp.BackEndProxyStub.DLL</Path>\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndTransportPublicNonVirtuals\" InterfaceId=\"F5A3C2AE-EF7B-3DE2-8B0E-8E8B3CD20D9D\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndTransportProtectedNonVirtuals\" InterfaceId=\"044DEA28-0E8D-3A16-A2C1-BE95C0BED5E5\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IEndpointPublicNonVirtuals\" InterfaceId=\"0CC88A54-89AF-3CC6-9B95-F8F22428ABED\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.ICallControllerStatusListener\" InterfaceId=\"39126060-0292-36D6-B3F8-9AC4156C651D\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndCapturePublicNonVirtuals\" InterfaceId=\"8313DBEA-FD3B-3071-8035-7B611658DAD8\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndCaptureProtectedNonVirtuals\" InterfaceId=\"64B31D5B-1A27-37A8-BCBC-C0BBD5314C79\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.IConfig\" InterfaceId=\"A9F22E31-D4E1-3940-BA20-DCB20973B09F\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__ICallControllerPublicNonVirtuals\" InterfaceId=\"06B50718-3528-3B66-BE76-E183AA80D4A5\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.IVideoRenderer\" InterfaceId=\"6928CA7B-166D-3B37-9010-FBAB2C7E92B0\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.IMTProtoUpdater\" InterfaceId=\"4FA5F2C4-8612-35C9-BFAA-967C2C819FA7\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IGlobalsPublicNonVirtuals\" InterfaceId=\"C8AFE1A8-92FC-3783-9520-D6BBC507B24A\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IGlobalsStatics\" InterfaceId=\"2C1E9C37-6827-38F7-857C-021642CA428B\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.OutOfProcess.__IServerPublicNonVirtuals\" InterfaceId=\"7BF79491-56BE-375A-BC22-0058B158F01F\" />\r\n      </ProxyStub>\r\n    </Extension>\r\n  </Extensions>\r\n</Package>"
  },
  {
    "path": "TelegramClient.WP81/Properties/AppManifest.xml",
    "content": "﻿<Deployment xmlns=\"http://schemas.microsoft.com/client/2007/deployment\"\r\n        xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n>\r\n    <Deployment.Parts>\r\n    </Deployment.Parts>\r\n</Deployment>\r\n"
  },
  {
    "path": "TelegramClient.WP81/Properties/AssemblyInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Resources;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"TelegramClient.WP8\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"\")]\r\n[assembly: AssemblyProduct(\"TelegramClient.WP8\")]\r\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// The following GUID is for the ID of the typelib if this project is exposed to COM\r\n[assembly: Guid(\"71105f98-f9d4-469f-a185-640c6024c9a0\")]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Revision and Build Numbers \r\n// by using the '*' as shown below:\r\n[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n[assembly: NeutralResourcesLanguageAttribute(\"en\")]\r\n"
  },
  {
    "path": "TelegramClient.WP81/Properties/WMAppManifest.Private.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2014/deployment\" AppPlatformVersion=\"8.1\">\r\n  <DefaultLanguage xmlns=\"\" code=\"en\" />\r\n  <Languages xmlns=\"\">\r\n    <Language code=\"en\" />\r\n    <Language code=\"de\" />\r\n    <Language code=\"es\" />\r\n    <Language code=\"pt\" />\r\n    <Language code=\"nl\" />\r\n    <Language code=\"it\" />\r\n    <Language code=\"ru\" />\r\n  </Languages>\r\n  <App xmlns=\"\" ProductID=\"{cee0f789-8059-4881-8883-347265c01f93}\" Title=\"Telegram Messenger\" RuntimeType=\"Silverlight\" Version=\"3.4.0.0\" Genre=\"apps.normal\" Author=\"Telegram Messenger LLC\" Description=\"Fast and secure messaging app\" Publisher=\"Telegram\" PublisherID=\"{a652821a-0986-4366-8fe7-f00379d89c9b}\" BackUpOptOut=\"true\" SDOptOut=\"true\">\r\n    <IconPath IsRelative=\"true\" IsResource=\"false\">ApplicationIcon106.png</IconPath>\r\n    <Capabilities>\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO_FULL\" />\r\n      <Capability Name=\"ID_CAP_IDENTITY_DEVICE\" />\r\n      <Capability Name=\"ID_CAP_LOCATION\" />\r\n      <Capability Name=\"ID_CAP_MICROPHONE\" />\r\n      <Capability Name=\"ID_CAP_NETWORKING\" />\r\n      <Capability Name=\"ID_CAP_PHONEDIALER\" />\r\n      <Capability Name=\"ID_CAP_PUSH_NOTIFICATION\" />\r\n      <Capability Name=\"ID_CAP_SENSORS\" />\r\n      <Capability Name=\"ID_CAP_WEBBROWSERCOMPONENT\" />\r\n      <Capability Name=\"ID_CAP_ISV_CAMERA\" />\r\n      <Capability Name=\"ID_CAP_CONTACTS\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_AUDIO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PLAYBACK\" />\r\n      <Capability Name=\"ID_CAP_VOIP\" />\r\n    </Capabilities>\r\n    <Tasks>\r\n      <DefaultTask Name=\"_default\" NavigationPage=\"Views/ShellView.xaml\" ActivationPolicy=\"Resume\" />\r\n      <!--<ExtendedTask Name=\"BackgroundTask\">\r\n        --><!--<BackgroundServiceAgent Specifier=\"AudioPlayerAgent\" Name=\"TelegramClient.Player\" Source=\"TelegramClient.Player\" Type=\"TelegramClient.Player.AudioPlayer\" />--><!--\r\n        <BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"TelegramClient.ScheduledTaskAgent\" Source=\"TelegramClient.ScheduledTaskAgent\" Type=\"TelegramClient.ScheduledTaskAgent.ScheduledAgent\" />\r\n      </ExtendedTask>-->\r\n      <ExtendedTask Name=\"BackgroundTask\">\r\n        <BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"IncomingAndKeepAliveAgent\" Source=\"PhoneVoIPApp.Agents\" Type=\"PhoneVoIPApp.Agents.ScheduledAgentImpl\" />\r\n        <BackgroundServiceAgent Specifier=\"VoIPCallInProgressAgent\" Name=\"CallInProgressAgent\" Source=\"PhoneVoIPApp.Agents\" Type=\"PhoneVoIPApp.Agents.CallInProgressAgentImpl\" />\r\n        <BackgroundServiceAgent Specifier=\"VoIPForegroundLifetimeAgent\" Name=\"ForegroundLifetimeAgent\" Source=\"PhoneVoIPApp.Agents\" Type=\"PhoneVoIPApp.Agents.ForegroundLifetimeAgentImpl\" />\r\n      </ExtendedTask>\r\n    </Tasks>\r\n    <Tokens>\r\n      <PrimaryToken TokenID=\"TelegramClient.WP8Token\" TaskName=\"_default\">\r\n        <TemplateIconic>\r\n          <SmallImageURI IsRelative=\"true\" IsResource=\"false\">IconicSmall110.png</SmallImageURI>\r\n          <Count>0</Count>\r\n          <IconImageURI IsRelative=\"true\" IsResource=\"false\">IconicTileMedium202.png</IconImageURI>\r\n          <Title>Telegram</Title>\r\n          <HasLarge>true</HasLarge>\r\n          <DeviceLockImageURI IsRelative=\"true\" IsResource=\"false\">Images\\LockScreen\\lockscreen.png</DeviceLockImageURI>\r\n        </TemplateIconic>\r\n      </PrimaryToken>\r\n    </Tokens>\r\n    <Extensions>\r\n      <Extension ExtensionName=\"LockScreen_Notification_IconCount\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n      <Extension ExtensionName=\"LockScreen_Notification_TextField\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n      <!--<Extension ExtensionName=\"Photos_Extra_Share\" ConsumerID=\"{5B04B775-356B-4AA0-AAF8-6491FFEA5632}\" TaskID=\"_default\" />-->\r\n      <Extension ExtensionName=\"People_Connect\" ConsumerID=\"{bedab396-3404-490c-822e-13309c687e97}\" TaskID=\"_default\" />\r\n      <!--<Extension ExtensionName=\"People_Connect_Manual\" ConsumerID=\"{bedab396-3404-490c-822e-13309c687e97}\" TaskID=\"_default\" />-->\r\n      <Protocol Name=\"tg\" NavUriFragment=\"encodedLaunchUri=%s\" TaskID=\"_default\" />\r\n    </Extensions>\r\n    <ActivatableClasses>\r\n      <InProcessServer>\r\n        <Path>PhoneVoIPApp.BackEnd.DLL</Path>\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.MessageReceivedEventHandler\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.BackEndTransport\" ThreadingModel=\"MTA\" />\r\n        <!--<ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.BackEndAudio\" ThreadingModel=\"MTA\" />-->\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.Endpoint\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.CameraLocationChangedEventHandler\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.BackEndCapture\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.IncomingCallDialogDismissedCallback\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.CallController\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.Globals\" ThreadingModel=\"MTA\" />\r\n      </InProcessServer>\r\n      <OutOfProcessServer ServerName=\"PhoneVoIPApp.BackEnd\">\r\n        <Path>PhoneVoIPApp.BackEnd.DLL</Path>\r\n        <Instancing>multipleInstances</Instancing>\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.OutOfProcess.Server\" />\r\n      </OutOfProcessServer>\r\n      <ProxyStub ClassId=\"{F5A3C2AE-EF7B-3DE2-8B0E-8E8B3CD20D9D}\">\r\n        <Path>PhoneVoIPApp.BackEndProxyStub.DLL</Path>\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndTransportPublicNonVirtuals\" InterfaceId=\"{F5A3C2AE-EF7B-3DE2-8B0E-8E8B3CD20D9D}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndTransportProtectedNonVirtuals\" InterfaceId=\"{044DEA28-0E8D-3A16-A2C1-BE95C0BED5E5}\" />\r\n        <!--<Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndAudioPublicNonVirtuals\" InterfaceId=\"{DE465431-ED24-3298-A187-8F1AFBBBE135}\" />-->\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IEndpointPublicNonVirtuals\" InterfaceId=\"{0CC88A54-89AF-3CC6-9B95-F8F22428ABED}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.ICallControllerStatusListener\" InterfaceId=\"{39126060-0292-36D6-B3F8-9AC4156C651D}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndCapturePublicNonVirtuals\" InterfaceId=\"{8313DBEA-FD3B-3071-8035-7B611658DAD8}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndCaptureProtectedNonVirtuals\" InterfaceId=\"{64B31D5B-1A27-37A8-BCBC-C0BBD5314C79}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__ICallControllerPublicNonVirtuals\" InterfaceId=\"{06B50718-3528-3B66-BE76-E183AA80D4A5}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.IVideoRenderer\" InterfaceId=\"{6928CA7B-166D-3B37-9010-FBAB2C7E92B0}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.IMTProtoUpdater\" InterfaceId=\"{4FA5F2C4-8612-35C9-BFAA-967C2C819FA7}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IGlobalsPublicNonVirtuals\" InterfaceId=\"{C8AFE1A8-92FC-3783-9520-D6BBC507B24A}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IGlobalsStatics\" InterfaceId=\"{2C1E9C37-6827-38F7-857C-021642CA428B}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.OutOfProcess.__IServerPublicNonVirtuals\" InterfaceId=\"{7BF79491-56BE-375A-BC22-0058B158F01F}\" />\r\n      </ProxyStub>\r\n    </ActivatableClasses>\r\n    <ScreenResolutions>\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WVGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WXGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_HD720P\" />\r\n    </ScreenResolutions>\r\n  </App>\r\n</Deployment>"
  },
  {
    "path": "TelegramClient.WP81/Properties/WMAppManifest.Public.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2014/deployment\" AppPlatformVersion=\"8.1\">\r\n  <DefaultLanguage xmlns=\"\" code=\"en\" />\r\n  <Languages xmlns=\"\">\r\n    <Language code=\"en\" />\r\n    <Language code=\"de\" />\r\n    <Language code=\"es\" />\r\n    <Language code=\"pt\" />\r\n    <Language code=\"nl\" />\r\n    <Language code=\"it\" />\r\n    <Language code=\"ru\" />\r\n  </Languages>\r\n  <App xmlns=\"\" ProductID=\"{cee0f789-8059-4881-8883-347265c01f93}\" Title=\"Telegram Messenger\" RuntimeType=\"Silverlight\" Version=\"3.4.0.0\" Genre=\"apps.normal\" Author=\"Telegram Messenger LLC\" Description=\"Fast and secure messaging app\" Publisher=\"Telegram\" PublisherID=\"{a652821a-0986-4366-8fe7-f00379d89c9b}\" BackUpOptOut=\"true\" SDOptOut=\"true\">\r\n    <IconPath IsRelative=\"true\" IsResource=\"false\">ApplicationIcon106.png</IconPath>\r\n    <Capabilities>\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO_FULL\" />\r\n      <Capability Name=\"ID_CAP_IDENTITY_DEVICE\" />\r\n      <Capability Name=\"ID_CAP_LOCATION\" />\r\n      <Capability Name=\"ID_CAP_MICROPHONE\" />\r\n      <Capability Name=\"ID_CAP_NETWORKING\" />\r\n      <Capability Name=\"ID_CAP_PHONEDIALER\" />\r\n      <Capability Name=\"ID_CAP_PUSH_NOTIFICATION\" />\r\n      <Capability Name=\"ID_CAP_SENSORS\" />\r\n      <Capability Name=\"ID_CAP_WEBBROWSERCOMPONENT\" />\r\n      <Capability Name=\"ID_CAP_ISV_CAMERA\" />\r\n      <Capability Name=\"ID_CAP_CONTACTS\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_AUDIO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PLAYBACK\" />\r\n      <Capability Name=\"ID_CAP_VOIP\" />\r\n    </Capabilities>\r\n    <Tasks>\r\n      <DefaultTask Name=\"_default\" NavigationPage=\"Views/ShellView.xaml\" ActivationPolicy=\"Resume\" />\r\n      <ExtendedTask Name=\"BackgroundTask\">\r\n        <!--<BackgroundServiceAgent Specifier=\"AudioPlayerAgent\" Name=\"TelegramClient.Player\" Source=\"TelegramClient.Player\" Type=\"TelegramClient.Player.AudioPlayer\" />-->\r\n        <!--<BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"TelegramClient.ScheduledTaskAgent\" Source=\"TelegramClient.ScheduledTaskAgent\" Type=\"TelegramClient.ScheduledTaskAgent.ScheduledAgent\" />-->\r\n        <BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"IncomingAndKeepAliveAgent\" Source=\"PhoneVoIPApp.Agents\" Type=\"PhoneVoIPApp.Agents.ScheduledAgentImpl\" />\r\n        <BackgroundServiceAgent Specifier=\"VoIPCallInProgressAgent\" Name=\"CallInProgressAgent\" Source=\"PhoneVoIPApp.Agents\" Type=\"PhoneVoIPApp.Agents.CallInProgressAgentImpl\" />\r\n        <BackgroundServiceAgent Specifier=\"VoIPForegroundLifetimeAgent\" Name=\"ForegroundLifetimeAgent\" Source=\"PhoneVoIPApp.Agents\" Type=\"PhoneVoIPApp.Agents.ForegroundLifetimeAgentImpl\" />\r\n      </ExtendedTask>\r\n    </Tasks>\r\n    <Tokens>\r\n      <PrimaryToken TokenID=\"TelegramClient.WP8Token\" TaskName=\"_default\">\r\n        <TemplateIconic>\r\n          <SmallImageURI IsRelative=\"true\" IsResource=\"false\">IconicSmall110.png</SmallImageURI>\r\n          <Count>0</Count>\r\n          <IconImageURI IsRelative=\"true\" IsResource=\"false\">IconicTileMedium202.png</IconImageURI>\r\n          <Title>Telegram Messenger</Title>\r\n          <HasLarge>true</HasLarge>\r\n          <DeviceLockImageURI IsRelative=\"true\" IsResource=\"false\">Images\\LockScreen\\lockscreen.png</DeviceLockImageURI>\r\n        </TemplateIconic>\r\n      </PrimaryToken>\r\n    </Tokens>\r\n    <Extensions>\r\n      <Extension ExtensionName=\"LockScreen_Notification_IconCount\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n      <Extension ExtensionName=\"LockScreen_Notification_TextField\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n      <!--<Extension ExtensionName=\"Photos_Extra_Share\" ConsumerID=\"{5B04B775-356B-4AA0-AAF8-6491FFEA5632}\" TaskID=\"_default\" />-->\r\n      <!--<Extension ExtensionName=\"People_Connect_Manual\" ConsumerID=\"{bedab396-3404-490c-822e-13309c687e97}\" TaskID=\"_default\" />-->\r\n      <Extension ExtensionName=\"People_Connect\" ConsumerID=\"{bedab396-3404-490c-822e-13309c687e97}\" TaskID=\"_default\" />\r\n      <Protocol Name=\"tg\" NavUriFragment=\"encodedLaunchUri=%s\" TaskID=\"_default\" />\r\n    </Extensions>\r\n    <ActivatableClasses>\r\n      <InProcessServer>\r\n        <Path>PhoneVoIPApp.BackEnd.DLL</Path>\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.MessageReceivedEventHandler\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.BackEndTransport\" ThreadingModel=\"MTA\" />\r\n        <!--<ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.BackEndAudio\" ThreadingModel=\"MTA\" />-->\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.Endpoint\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.CameraLocationChangedEventHandler\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.BackEndCapture\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.IncomingCallDialogDismissedCallback\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.CallController\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.Globals\" ThreadingModel=\"MTA\" />\r\n      </InProcessServer>\r\n      <OutOfProcessServer ServerName=\"PhoneVoIPApp.BackEnd\">\r\n        <Path>PhoneVoIPApp.BackEnd.DLL</Path>\r\n        <Instancing>multipleInstances</Instancing>\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.OutOfProcess.Server\" />\r\n      </OutOfProcessServer>\r\n      <ProxyStub ClassId=\"{F5A3C2AE-EF7B-3DE2-8B0E-8E8B3CD20D9D}\">\r\n        <Path>PhoneVoIPApp.BackEndProxyStub.DLL</Path>\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndTransportPublicNonVirtuals\" InterfaceId=\"{F5A3C2AE-EF7B-3DE2-8B0E-8E8B3CD20D9D}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndTransportProtectedNonVirtuals\" InterfaceId=\"{044DEA28-0E8D-3A16-A2C1-BE95C0BED5E5}\" />\r\n        <!--<Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndAudioPublicNonVirtuals\" InterfaceId=\"{DE465431-ED24-3298-A187-8F1AFBBBE135}\" />-->\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IEndpointPublicNonVirtuals\" InterfaceId=\"{0CC88A54-89AF-3CC6-9B95-F8F22428ABED}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.ICallControllerStatusListener\" InterfaceId=\"{39126060-0292-36D6-B3F8-9AC4156C651D}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndCapturePublicNonVirtuals\" InterfaceId=\"{8313DBEA-FD3B-3071-8035-7B611658DAD8}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndCaptureProtectedNonVirtuals\" InterfaceId=\"{64B31D5B-1A27-37A8-BCBC-C0BBD5314C79}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.IConfig\" InterfaceId=\"{A9F22E31-D4E1-3940-BA20-DCB20973B09F}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__ICallControllerPublicNonVirtuals\" InterfaceId=\"{06B50718-3528-3B66-BE76-E183AA80D4A5}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.IVideoRenderer\" InterfaceId=\"{6928CA7B-166D-3B37-9010-FBAB2C7E92B0}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.IMTProtoUpdater\" InterfaceId=\"{4FA5F2C4-8612-35C9-BFAA-967C2C819FA7}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IGlobalsPublicNonVirtuals\" InterfaceId=\"{C8AFE1A8-92FC-3783-9520-D6BBC507B24A}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IGlobalsStatics\" InterfaceId=\"{2C1E9C37-6827-38F7-857C-021642CA428B}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.OutOfProcess.__IServerPublicNonVirtuals\" InterfaceId=\"{7BF79491-56BE-375A-BC22-0058B158F01F}\" />\r\n      </ProxyStub>\r\n    </ActivatableClasses>\r\n    <ScreenResolutions>\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WVGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WXGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_HD720P\" />\r\n    </ScreenResolutions>\r\n  </App>\r\n</Deployment>"
  },
  {
    "path": "TelegramClient.WP81/Properties/WMAppManifest.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2014/deployment\" AppPlatformVersion=\"8.1\">\r\n  <DefaultLanguage xmlns=\"\" code=\"en\" />\r\n  <Languages xmlns=\"\">\r\n    <Language code=\"en\" />\r\n    <Language code=\"de\" />\r\n    <Language code=\"es\" />\r\n    <Language code=\"pt\" />\r\n    <Language code=\"nl\" />\r\n    <Language code=\"it\" />\r\n    <Language code=\"ru\" />\r\n  </Languages>\r\n  <App xmlns=\"\" ProductID=\"{cee0f789-8059-4881-8883-347265c01f93}\" Title=\"Telegram Messenger\" RuntimeType=\"Silverlight\" Version=\"3.4.0.0\" Genre=\"apps.normal\" Author=\"Telegram Messenger LLC\" Description=\"Fast and secure messaging app\" Publisher=\"Telegram\" PublisherID=\"{a652821a-0986-4366-8fe7-f00379d89c9b}\" BackUpOptOut=\"true\" SDOptOut=\"true\">\r\n    <IconPath IsRelative=\"true\" IsResource=\"false\">ApplicationIcon106.png</IconPath>\r\n    <Capabilities>\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO_FULL\" />\r\n      <Capability Name=\"ID_CAP_IDENTITY_DEVICE\" />\r\n      <Capability Name=\"ID_CAP_LOCATION\" />\r\n      <Capability Name=\"ID_CAP_MICROPHONE\" />\r\n      <Capability Name=\"ID_CAP_NETWORKING\" />\r\n      <Capability Name=\"ID_CAP_PHONEDIALER\" />\r\n      <Capability Name=\"ID_CAP_PUSH_NOTIFICATION\" />\r\n      <Capability Name=\"ID_CAP_SENSORS\" />\r\n      <Capability Name=\"ID_CAP_WEBBROWSERCOMPONENT\" />\r\n      <Capability Name=\"ID_CAP_ISV_CAMERA\" />\r\n      <Capability Name=\"ID_CAP_CONTACTS\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_AUDIO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PHOTO\" />\r\n      <Capability Name=\"ID_CAP_MEDIALIB_PLAYBACK\" />\r\n      <Capability Name=\"ID_CAP_VOIP\" />\r\n    </Capabilities>\r\n    <Tasks>\r\n      <DefaultTask Name=\"_default\" NavigationPage=\"Views/ShellView.xaml\" ActivationPolicy=\"Resume\" />\r\n      <ExtendedTask Name=\"BackgroundTask\">\r\n        <!--<BackgroundServiceAgent Specifier=\"AudioPlayerAgent\" Name=\"TelegramClient.Player\" Source=\"TelegramClient.Player\" Type=\"TelegramClient.Player.AudioPlayer\" />-->\r\n        <!--<BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"TelegramClient.ScheduledTaskAgent\" Source=\"TelegramClient.ScheduledTaskAgent\" Type=\"TelegramClient.ScheduledTaskAgent.ScheduledAgent\" />-->\r\n        <BackgroundServiceAgent Specifier=\"ScheduledTaskAgent\" Name=\"IncomingAndKeepAliveAgent\" Source=\"PhoneVoIPApp.Agents\" Type=\"PhoneVoIPApp.Agents.ScheduledAgentImpl\" />\r\n        <BackgroundServiceAgent Specifier=\"VoIPCallInProgressAgent\" Name=\"CallInProgressAgent\" Source=\"PhoneVoIPApp.Agents\" Type=\"PhoneVoIPApp.Agents.CallInProgressAgentImpl\" />\r\n        <BackgroundServiceAgent Specifier=\"VoIPForegroundLifetimeAgent\" Name=\"ForegroundLifetimeAgent\" Source=\"PhoneVoIPApp.Agents\" Type=\"PhoneVoIPApp.Agents.ForegroundLifetimeAgentImpl\" />\r\n      </ExtendedTask>\r\n    </Tasks>\r\n    <Tokens>\r\n      <PrimaryToken TokenID=\"TelegramClient.WP8Token\" TaskName=\"_default\">\r\n        <TemplateIconic>\r\n          <SmallImageURI IsRelative=\"true\" IsResource=\"false\">IconicSmall110.png</SmallImageURI>\r\n          <Count>0</Count>\r\n          <IconImageURI IsRelative=\"true\" IsResource=\"false\">IconicTileMedium202.png</IconImageURI>\r\n          <Title>Telegram Messenger</Title>\r\n          <HasLarge>true</HasLarge>\r\n          <DeviceLockImageURI IsRelative=\"true\" IsResource=\"false\">Images\\LockScreen\\lockscreen.png</DeviceLockImageURI>\r\n        </TemplateIconic>\r\n      </PrimaryToken>\r\n    </Tokens>\r\n    <Extensions>\r\n      <Extension ExtensionName=\"LockScreen_Notification_IconCount\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n      <Extension ExtensionName=\"LockScreen_Notification_TextField\" ConsumerID=\"{111DFF24-AA15-4A96-8006-2BFF8122084F}\" TaskID=\"_default\" />\r\n      <!--<Extension ExtensionName=\"Photos_Extra_Share\" ConsumerID=\"{5B04B775-356B-4AA0-AAF8-6491FFEA5632}\" TaskID=\"_default\" />-->\r\n      <!--<Extension ExtensionName=\"People_Connect_Manual\" ConsumerID=\"{bedab396-3404-490c-822e-13309c687e97}\" TaskID=\"_default\" />-->\r\n      <Extension ExtensionName=\"People_Connect\" ConsumerID=\"{bedab396-3404-490c-822e-13309c687e97}\" TaskID=\"_default\" />\r\n      <Protocol Name=\"tg\" NavUriFragment=\"encodedLaunchUri=%s\" TaskID=\"_default\" />\r\n    </Extensions>\r\n    <ActivatableClasses>\r\n      <InProcessServer>\r\n        <Path>PhoneVoIPApp.BackEnd.DLL</Path>\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.MessageReceivedEventHandler\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.BackEndTransport\" ThreadingModel=\"MTA\" />\r\n        <!--<ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.BackEndAudio\" ThreadingModel=\"MTA\" />-->\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.Endpoint\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.CameraLocationChangedEventHandler\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.BackEndCapture\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.IncomingCallDialogDismissedCallback\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.CallController\" ThreadingModel=\"MTA\" />\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.Globals\" ThreadingModel=\"MTA\" />\r\n      </InProcessServer>\r\n      <OutOfProcessServer ServerName=\"PhoneVoIPApp.BackEnd\">\r\n        <Path>PhoneVoIPApp.BackEnd.DLL</Path>\r\n        <Instancing>multipleInstances</Instancing>\r\n        <ActivatableClass ActivatableClassId=\"PhoneVoIPApp.BackEnd.OutOfProcess.Server\" />\r\n      </OutOfProcessServer>\r\n      <ProxyStub ClassId=\"{F5A3C2AE-EF7B-3DE2-8B0E-8E8B3CD20D9D}\">\r\n        <Path>PhoneVoIPApp.BackEndProxyStub.DLL</Path>\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndTransportPublicNonVirtuals\" InterfaceId=\"{F5A3C2AE-EF7B-3DE2-8B0E-8E8B3CD20D9D}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndTransportProtectedNonVirtuals\" InterfaceId=\"{044DEA28-0E8D-3A16-A2C1-BE95C0BED5E5}\" />\r\n        <!--<Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndAudioPublicNonVirtuals\" InterfaceId=\"{DE465431-ED24-3298-A187-8F1AFBBBE135}\" />-->\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IEndpointPublicNonVirtuals\" InterfaceId=\"{0CC88A54-89AF-3CC6-9B95-F8F22428ABED}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.ICallControllerStatusListener\" InterfaceId=\"{39126060-0292-36D6-B3F8-9AC4156C651D}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndCapturePublicNonVirtuals\" InterfaceId=\"{8313DBEA-FD3B-3071-8035-7B611658DAD8}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IBackEndCaptureProtectedNonVirtuals\" InterfaceId=\"{64B31D5B-1A27-37A8-BCBC-C0BBD5314C79}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.IConfig\" InterfaceId=\"{A9F22E31-D4E1-3940-BA20-DCB20973B09F}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__ICallControllerPublicNonVirtuals\" InterfaceId=\"{06B50718-3528-3B66-BE76-E183AA80D4A5}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.IVideoRenderer\" InterfaceId=\"{6928CA7B-166D-3B37-9010-FBAB2C7E92B0}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.IMTProtoUpdater\" InterfaceId=\"{4FA5F2C4-8612-35C9-BFAA-967C2C819FA7}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IGlobalsPublicNonVirtuals\" InterfaceId=\"{C8AFE1A8-92FC-3783-9520-D6BBC507B24A}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.__IGlobalsStatics\" InterfaceId=\"{2C1E9C37-6827-38F7-857C-021642CA428B}\" />\r\n        <Interface Name=\"PhoneVoIPApp.BackEnd.OutOfProcess.__IServerPublicNonVirtuals\" InterfaceId=\"{7BF79491-56BE-375A-BC22-0058B158F01F}\" />\r\n      </ProxyStub>\r\n    </ActivatableClasses>\r\n    <ScreenResolutions>\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WVGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_WXGA\" />\r\n      <ScreenResolution Name=\"ID_RESOLUTION_HD720P\" />\r\n    </ScreenResolutions>\r\n  </App>\r\n</Deployment>"
  },
  {
    "path": "TelegramClient.WP81/PushNotificationsBackgroundTask.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Threading;\r\nusing Windows.ApplicationModel.Background;\r\n#if WNS_PUSH_SERVICE\r\nusing Windows.Networking.PushNotifications;\r\n#endif\r\nusing Telegram.Api.Extensions;\r\n\r\nnamespace TelegramClient.Tasks\r\n{\r\n    public sealed class PushNotificationsBackgroundTask : IBackgroundTask\r\n    {\r\n        private readonly Mutex _appOpenMutex = new Mutex(false, Telegram.Api.Constants.TelegramMessengerMutexName);\r\n\r\n        private static bool _logEnabled = true;\r\n\r\n        private static readonly int _id = new Random().Next(999);\r\n\r\n        private static void Log(string message, Action callback = null)\r\n        {\r\n            if (!_logEnabled) return;\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"::PushNotificationsBackgroundTask {0} {1}\", _id, message), callback.SafeInvoke);\r\n#if DEBUG\r\n            //PushUtils.AddToast(\"push\", message, string.Empty, string.Empty, null, null);\r\n#endif\r\n        }\r\n\r\n        public void Run(IBackgroundTaskInstance taskInstance)\r\n        {\r\n#if WNS_PUSH_SERVICE\r\n            Telegram.Logs.Log.WriteSync = true;\r\n\r\n            var stopwatch = Stopwatch.StartNew();\r\n\r\n            var rawNotification = taskInstance.TriggerDetails as RawNotification;\r\n            var payload = rawNotification != null ? rawNotification.Content : null;\r\n            var rootObject = payload != null ? PushUtils.GetRootObject(payload) : null;\r\n            var data = rootObject != null ? rootObject.data : null;\r\n            var locKey = data != null ? data.loc_key : null;\r\n\r\n            Log(string.Format(\"start locKey={0}\", locKey));\r\n            if (!_appOpenMutex.WaitOne(0))\r\n            {\r\n                Log(\"cancel\");\r\n\r\n                return;\r\n            }\r\n            _appOpenMutex.ReleaseMutex();\r\n\r\n            var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n            if (!isAuthorized)\r\n            {\r\n                Log(string.Format(\"cancel isAuthorized=false\\npayload={0}\", payload));\r\n            }\r\n\r\n            //var culture = Utils.CurrentUICulture();\r\n            //var resourceLoader = new ResourceLoader(\"TelegramClient.Tasks/Resources\");\r\n            //var str = resourceLoader.GetString(\"MESSAGE_TEXT\");\r\n            //PushUtils.AddToast(\"resource\", str + \" \" + culture, string.Empty);\r\n            try\r\n            {\r\n                PushUtils.UpdateToastAndTiles(taskInstance.TriggerDetails as RawNotification);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Log(string.Format(\"ex={0}\\npayload={1}\", ex, payload));\r\n            }\r\n\r\n            Log(string.Format(\"stop elapsed={0}\", stopwatch.Elapsed));\r\n#endif\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Services/Cache.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    internal class LinkedDictionary<TKey, TValue>\r\n    {\r\n        private readonly LinkedList<TKey> _queue = new LinkedList<TKey>();\r\n\r\n        private readonly Dictionary<TKey, KeyValuePair<LinkedListNode<TKey>, TValue>> _cache = new Dictionary<TKey, KeyValuePair<LinkedListNode<TKey>, TValue>>();\r\n\r\n        public LinkedDictionary()\r\n        {\r\n\r\n        }\r\n\r\n        public void AddFirst(TKey key, TValue value)\r\n        {\r\n            try\r\n            {\r\n                var node = _queue.AddFirst(key);\r\n                _cache[key] = new KeyValuePair<LinkedListNode<TKey>, TValue>(node, value);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                \r\n            }\r\n        }\r\n\r\n        public void RemoveLast()\r\n        {\r\n            var last = _queue.Last;\r\n\r\n            _queue.RemoveLast();\r\n            _cache.Remove(last.Value);\r\n        }\r\n\r\n        public KeyValuePair<TKey, TValue> First\r\n        {\r\n            get\r\n            {\r\n                var node = _queue.First;\r\n\r\n                KeyValuePair<LinkedListNode<TKey>, TValue> result;\r\n                if (node != null && _cache.TryGetValue(node.Value, out result))\r\n                {\r\n                    return new KeyValuePair<TKey, TValue>(node.Value, result.Value);\r\n                }\r\n\r\n                return new KeyValuePair<TKey, TValue>();\r\n            }\r\n        }\r\n\r\n        public KeyValuePair<TKey, TValue> Last\r\n        {\r\n            get\r\n            {\r\n                var node = _queue.Last;\r\n\r\n                KeyValuePair<LinkedListNode<TKey>, TValue> result;\r\n                if (node != null && _cache.TryGetValue(node.Value, out result))\r\n                {\r\n                    return new KeyValuePair<TKey, TValue>(node.Value, result.Value);\r\n                }\r\n\r\n                return new KeyValuePair<TKey, TValue>();\r\n            }\r\n        }\r\n\r\n        public int Count\r\n        {\r\n            get { return _queue.Count; }\r\n        }\r\n\r\n        public void Add(TKey key, TValue value)\r\n        {\r\n            KeyValuePair<LinkedListNode<TKey>, TValue> tuple;\r\n            if (!_cache.TryGetValue(key, out tuple))\r\n            {\r\n                var node = _queue.AddLast(key);                                             // O(1)\r\n                _cache[key] = new KeyValuePair<LinkedListNode<TKey>, TValue>(node, value);  // O(1)\r\n            }\r\n        }\r\n\r\n        public bool Remove(TKey key)\r\n        {\r\n            KeyValuePair<LinkedListNode<TKey>, TValue> tuple;\r\n            if (_cache.TryGetValue(key, out tuple))\r\n            {\r\n                _cache.Remove(key);                 // O(1)\r\n                _queue.Remove(tuple.Key);           // O(1)\r\n\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public bool TryGetValue(TKey key, out TValue value)\r\n        {\r\n            KeyValuePair<LinkedListNode<TKey>, TValue> tuple;\r\n            if (_cache.TryGetValue(key, out tuple))\r\n            {\r\n                value = tuple.Value;\r\n\r\n                return true;\r\n            }\r\n\r\n            value = default(TValue);\r\n\r\n            return false;\r\n        }\r\n\r\n        public TValue this[TKey key]\r\n        {\r\n            get\r\n            {\r\n                TValue value;\r\n                if (TryGetValue(key, out value))\r\n                {\r\n                    return value;\r\n                }\r\n\r\n                throw new KeyNotFoundException();\r\n            }\r\n            set\r\n            {\r\n                Add(key, value);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class LRUCache<TKey, TValue>\r\n    {\r\n        private readonly LinkedList<TKey> _queue = new LinkedList<TKey>();\r\n\r\n        private readonly Dictionary<TKey, KeyValuePair<LinkedListNode<TKey>, TValue>> _cache;\r\n\r\n        private readonly int _capacity;\r\n\r\n        private readonly object _syncRoot = new object();\r\n\r\n        public LRUCache(int capacity)\r\n        {\r\n            _capacity = capacity;\r\n            _cache = new Dictionary<TKey, KeyValuePair<LinkedListNode<TKey>, TValue>>(capacity);\r\n        }\r\n\r\n        public void Add(TKey key, TValue value)\r\n        {\r\n            lock (_syncRoot)\r\n            {\r\n                KeyValuePair<LinkedListNode<TKey>, TValue> tuple;\r\n                if (_cache.TryGetValue(key, out tuple))\r\n                {\r\n                    _queue.Remove(tuple.Key);           // O(1)\r\n                    var node = _queue.AddLast(key);     // O(1)\r\n                    _cache[key] = new KeyValuePair<LinkedListNode<TKey>, TValue>(node, value);\r\n                }\r\n                else\r\n                {\r\n                    if (_cache.Count == _capacity)\r\n                    {\r\n                        var first = _queue.First;\r\n\r\n                        _queue.RemoveFirst();           // O(1)\r\n                        _cache.Remove(first.Value);     // O(1)\r\n                    }\r\n\r\n                    var node = _queue.AddLast(key);\r\n                    _cache[key] = new KeyValuePair<LinkedListNode<TKey>, TValue>(node, value);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Remove(TKey key)\r\n        {\r\n            lock (_syncRoot)\r\n            {\r\n                KeyValuePair<LinkedListNode<TKey>, TValue> tuple;\r\n                if (_cache.TryGetValue(key, out tuple))\r\n                {\r\n                    _cache.Remove(key);                 // O(1)\r\n                    _queue.Remove(tuple.Key);           // O(1)\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool TryGetValue(TKey key, out TValue value)\r\n        {\r\n            lock (_syncRoot)\r\n            {\r\n                KeyValuePair<LinkedListNode<TKey>, TValue> tuple;\r\n                if (_cache.TryGetValue(key, out tuple))\r\n                {\r\n                    value = tuple.Value;\r\n\r\n                    _queue.Remove(tuple.Key);           // O(1)\r\n                    _queue.AddLast(tuple.Key);          // O(1)\r\n\r\n                    return true;\r\n                }\r\n\r\n                value = default(TValue);\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public TValue this[TKey key]\r\n        {\r\n            get\r\n            {\r\n                TValue value; \r\n                if (TryGetValue(key, out value))\r\n                {\r\n                    return value;\r\n                }\r\n\r\n                throw new KeyNotFoundException();\r\n            }\r\n            set\r\n            {\r\n                Add(key, value);\r\n            }\r\n        }\r\n    }\r\n\r\n    /// https://pdfs.semanticscholar.org/d62d/e5f995164fff50f5ce61c0113f6bc9f04225.pdf\r\n    /// A1 - _inQueue, _outQueue\r\n    /// Am - _cache\r\n    public class TwoQueueCache<TKey, TValue>\r\n    {\r\n        private readonly LRUCache<TKey, TValue> _cache;\r\n\r\n        private readonly LinkedDictionary<TKey, TValue> _inQueue = new LinkedDictionary<TKey, TValue>();\r\n\r\n        private readonly LinkedDictionary<TKey, TValue> _outQueue = new LinkedDictionary<TKey, TValue>();\r\n        \r\n        private readonly int _cacheCapacity;\r\n\r\n        private readonly int _inQueueCapacity;\r\n\r\n        private readonly int _outQueueCapacity;\r\n\r\n        private readonly object _syncRoot = new object();\r\n\r\n        public TwoQueueCache(int capacity)\r\n        {\r\n            _inQueueCapacity = (int)(0.25 * capacity);\r\n            _outQueueCapacity = (int)(0.5 * capacity);\r\n            _cacheCapacity = capacity - _inQueueCapacity - _outQueueCapacity;\r\n\r\n            _cache = new LRUCache<TKey, TValue>(_cacheCapacity);\r\n        }\r\n\r\n        public void Add(TKey key, TValue value)\r\n        {\r\n            lock (_syncRoot)\r\n            {\r\n                // make room\r\n                if (_inQueue.Count > _inQueueCapacity)\r\n                {\r\n                    if (_outQueue.Count > _outQueueCapacity)\r\n                    {\r\n                        _outQueue.RemoveLast();                         // O(1)\r\n                    }\r\n\r\n                    var last = _inQueue.Last;\r\n                    _inQueue.RemoveLast();                              // O(1)\r\n                    _outQueue.AddFirst(last.Key, last.Value);           // O(1)\r\n                }\r\n\r\n                // add\r\n                _inQueue.AddFirst(key, value);                          // O(1)\r\n            }\r\n        }\r\n\r\n        public bool Remove(TKey key)\r\n        {\r\n            lock (_syncRoot)\r\n            {\r\n                _inQueue.Remove(key);               // O(1)\r\n                _outQueue.Remove(key);              // O(1)\r\n                _cache.Remove(key);                 // O(1)\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        public bool TryGetValue(TKey key, out TValue value)\r\n        {\r\n            lock (_syncRoot)\r\n            {\r\n                if (_inQueue.TryGetValue(key, out value))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (_outQueue.TryGetValue(key, out value))\r\n                {\r\n                    _outQueue.Remove(key);              // O(1)\r\n                    _cache.Add(key, value);             // O(1)\r\n\r\n                    return true;\r\n                }\r\n\r\n                if (_cache.TryGetValue(key, out value))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                value = default(TValue);\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public TValue this[TKey key]\r\n        {\r\n            get\r\n            {\r\n                TValue value;\r\n                if (TryGetValue(key, out value))\r\n                {\r\n                    return value;\r\n                }\r\n\r\n                throw new KeyNotFoundException();\r\n            }\r\n            set\r\n            {\r\n                Add(key, value);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Services/IProxyChecker.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public interface IProxyChecker\r\n    {\r\n        //void CheckAsync(IList<TLProxyBase> list, double timeout);\r\n        void CheckAsync(TLProxyBase proxy, double timeout, Action<ProxyItem, TLInt> callback);\r\n        void CancelAsync(TLProxyBase proxy);\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Services/IVoIPService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public interface IVoIPService\r\n    {\r\n        long AcceptedCallId { get; set; }\r\n        TLPhoneCallBase Call { get; }\r\n        TLInt UserId { get; }\r\n        void StartOutgoingCall(TLUser user, Action<TLLong> callback);\r\n        void AcceptIncomingCall(TLPhoneCallRequested64 requestedCall);\r\n        string GetDebugString();\r\n        string GetDebugLog(long callId);\r\n        string GetVersion();\r\n        void HangUp();\r\n        string[] GetEmojis();\r\n        void SwitchSpeaker(bool external);\r\n        void Mute(bool muted);\r\n        int GetSignalBarsCount();\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Services/IWindowsPhoneStoreUpdateService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Services\r\n{\r\n    interface IWindowsPhoneStoreUpdateService\r\n    {\r\n        void CheckForUpdatedVersion(string updateDialogText, string updateDialogTitle);\r\n\r\n        void LaunchAppUpdateAsync();\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Services/ProxyChecker.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.Transport; \r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public class ProxyChecker : IProxyChecker\r\n    {\r\n        private object _syncRoot = new object();\r\n\r\n        private readonly ITransportService _transportService;\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        private List<ProxyItem> _list = new List<ProxyItem>();\r\n\r\n        //private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(4);\r\n\r\n        public ProxyChecker(ITransportService transportService, IMTProtoService mtProtoService)\r\n        {\r\n            _transportService = transportService;\r\n            _mtProtoService = mtProtoService;\r\n        }\r\n\r\n        private TLInt CheckProxyInternal(ProxyItem item)\r\n        {\r\n            TLInt ping = null;\r\n            var handler = new ManualResetEvent(false);\r\n            _mtProtoService.PingProxyAsync(item.Proxy,\r\n                result =>\r\n                {\r\n                    ping = result;\r\n                    handler.Set();\r\n                },\r\n                error =>\r\n                {\r\n                    handler.Set();\r\n                });\r\n\r\n#if DEBUG\r\n            var complete = handler.WaitOne(Timeout.Infinite);\r\n#else\r\n            var complete = handler.WaitOne(TimeSpan.FromSeconds(item.Timeout));\r\n#endif\r\n\r\n            return ping;\r\n        }\r\n\r\n        public void CheckAsync(TLProxyBase proxy, double timeout, Action<ProxyItem, TLInt> callback)\r\n        {\r\n            var proxyItem = new ProxyItem\r\n            {\r\n                Proxy = proxy,\r\n                Timeout = timeout\r\n            };\r\n\r\n            var cts = new CancellationTokenSource();\r\n            var task = new Task(() =>\r\n            {\r\n                var ping = CheckProxyInternal(proxyItem);\r\n                _list.Remove(proxyItem);\r\n                if (!cts.Token.IsCancellationRequested)\r\n                {\r\n                    callback.SafeInvoke(proxyItem, ping);\r\n                }\r\n            });\r\n\r\n            proxyItem.TokenSource = cts;\r\n            proxyItem.Task = task;\r\n\r\n            _list.Add(proxyItem);\r\n\r\n            task.Start();\r\n        }\r\n\r\n        public void CancelAsync(TLProxyBase proxy)\r\n        {\r\n            var item = _list.FirstOrDefault(x => x.Proxy == proxy);\r\n            if (item != null)\r\n            {\r\n                _list.Remove(item);\r\n                item.TokenSource.Cancel();\r\n            }\r\n        }\r\n    }\r\n\r\n    public class ProxyItem\r\n    {\r\n        public TLProxyBase Proxy { get; set; }\r\n\r\n        public double Timeout { get; set; }\r\n\r\n        public CancellationTokenSource TokenSource { get; set; }\r\n\r\n        public Task Task { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Services/VoIPService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Windows.Data.Json;\r\nusing Windows.Networking.Connectivity;\r\nusing Windows.Phone.Media.Devices;\r\nusing Windows.Phone.Networking.Voip;\r\nusing Windows.Storage;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Xna.Framework.Audio;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.ViewModels;\r\nusing PhoneVoIPApp.BackEnd;\r\nusing PhoneVoIPApp.UI;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.Transport;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.Views.Additional;\r\nusing TelegramClient.Views.Controls;\r\nusing Action = System.Action;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public class VoIPService : IVoIPService, Telegram.Api.Aggregator.IHandle<TLUpdatePhoneCall>, IDisposable, ICallControllerStatusListener\r\n    {\r\n        public long AcceptedCallId { get; set; }\r\n\r\n        private PhoneCallSound _spPlayId;\r\n\r\n        private TLInt _userId;\r\n\r\n        public TLInt UserId { get { return _userId; } }\r\n\r\n        public TLPhoneCallBase Call { get { return _call; } }\r\n\r\n        private readonly IMTProtoService _mtProtoService;\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        private readonly ITransportService _transportService;\r\n\r\n        private Action _timeoutRunnable;\r\n\r\n        private readonly DispatcherTimer _timer = new DispatcherTimer();\r\n\r\n        public VoIPService(IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator, ICacheService cacheService, IStateService stateService, ITransportService transportService)\r\n        {\r\n            _mtProtoService = mtProtoService;\r\n            _eventAggregator = eventAggregator;\r\n            _cacheService = cacheService;\r\n            _stateService = stateService;\r\n            _transportService = transportService;\r\n\r\n            NetworkInformation.NetworkStatusChanged += UpdateNetworkType;\r\n            _timer.Tick += OnTimerTick;\r\n\r\n            if (BackgroundProcessController.Instance != null\r\n                && BackgroundProcessController.Instance.CallController != null)\r\n            {\r\n                var callController = BackgroundProcessController.Instance.CallController;\r\n                Telegram.Logs.Log.Write(string.Format(\"VoIPService.ctor call={0} user_id={1} callController call_status={2} key={3} call_id={4}\", _call != null, _userId != null, callController.CallStatus, callController.Key != null, callController.CallId));\r\n                BackgroundProcessController.Instance.CallController.SetStatusCallback(this);\r\n\r\n                if (_call == null || _userId == null)\r\n                {\r\n                    if (BackgroundProcessController.Instance.CallController.CallStatus == CallStatus.InProgress\r\n                        || BackgroundProcessController.Instance.CallController.CallStatus == CallStatus.Held\r\n                        || BackgroundProcessController.Instance.CallController.CallStatus == CallStatus.None)\r\n                    {\r\n                        if (BackgroundProcessController.Instance.CallController.Key != null)\r\n                        {\r\n                            lock (__callSyncRoot)\r\n                            {\r\n                                SetCall(new TLPhoneCall\r\n                                {\r\n                                    Id = new TLLong(BackgroundProcessController.Instance.CallController.CallId),\r\n                                    AccessHash =\r\n                                        new TLLong(BackgroundProcessController.Instance.CallController.CallAccessHash)\r\n                                });\r\n                            }\r\n\r\n                            _userId = new TLInt((int) BackgroundProcessController.Instance.CallController.OtherPartyId);\r\n                            _authKey = BackgroundProcessController.Instance.CallController.Key;\r\n                            _outgoing = BackgroundProcessController.Instance.CallController.Outgoing;\r\n                            _emojis = BackgroundProcessController.Instance.CallController.Emojis;\r\n\r\n                            var frame = Application.Current.RootVisual as TelegramTransitionFrame;\r\n                            if (frame != null)\r\n                            {\r\n                                frame.ShowCallPlaceholder(ShellViewModel.OpenCurrentCall);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Telegram.Logs.Log.Write(\"VoIPService.ctor empty\");\r\n            }\r\n\r\n            _eventAggregator.Subscribe(this);\r\n        }\r\n\r\n        ~VoIPService()\r\n        {\r\n            BackgroundProcessController.Instance.CallController.SetStatusCallback(null);\r\n        }\r\n\r\n        private void SetCall(TLPhoneCallBase newCall)\r\n        {\r\n            lock (__callSyncRoot)\r\n            {\r\n                var callDiscarded = _call as TLPhoneCallDiscarded61;\r\n                if (callDiscarded != null \r\n                    && newCall != null\r\n                    && callDiscarded.Id.Value == newCall.Id.Value)\r\n                {\r\n                    Telegram.Logs.Log.Write(string.Format(\"SetCall skip\\ncurrent={0}\\nnew={1}\", _call, newCall));\r\n                    return;\r\n                }\r\n\r\n                _call = newCall;\r\n            }\r\n        }\r\n\r\n        private void RunTimer(TimeSpan interval)\r\n        {\r\n            _timer.Stop();\r\n            _timer.Interval = interval;\r\n            _timer.Start();\r\n        }\r\n\r\n        private void CancelTimer()\r\n        {\r\n            _timer.Stop();\r\n        }\r\n\r\n        private void OnTimerTick(object sender, System.EventArgs e)\r\n        {\r\n            _timer.Stop();\r\n            if (_timeoutRunnable != null)\r\n            {\r\n                _timeoutRunnable();\r\n            }\r\n        }\r\n\r\n        private void UpdateNetworkType(object sender)\r\n        {\r\n            //return;\r\n            //var networkType = GetNetworkType();\r\n\r\n            //if (_controller != null)\r\n            //{\r\n            //    _controller.SetNetworkType(networkType);\r\n            //}\r\n        }\r\n\r\n        private NetworkType GetNetworkType()\r\n        {\r\n            var profile = NetworkInformation.GetInternetConnectionProfile();\r\n            if (profile != null)\r\n            {\r\n                if (profile.NetworkAdapter.IanaInterfaceType == 6)\r\n                {\r\n                    return NetworkType.Ethernet;\r\n                }\r\n\r\n                if (profile.IsWlanConnectionProfile)\r\n                {\r\n                    //wi-fi\r\n                    return NetworkType.WiFi;\r\n                }\r\n\r\n                if (profile.IsWwanConnectionProfile)\r\n                {\r\n                    //mobile\r\n                    var connectionClass = profile.WwanConnectionProfileDetails.GetCurrentDataClass();\r\n                    switch (connectionClass)\r\n                    {\r\n                        //2G-equivalent\r\n                        case WwanDataClass.Edge:\r\n                            return NetworkType.EDGE;\r\n                        case WwanDataClass.Gprs:\r\n                            return NetworkType.GPRS;\r\n                        //3G-equivalent\r\n                        case WwanDataClass.Cdma1xEvdo:\r\n                        case WwanDataClass.Cdma1xEvdoRevA:\r\n                        case WwanDataClass.Cdma1xEvdoRevB:\r\n                        case WwanDataClass.Cdma1xEvdv:\r\n                        case WwanDataClass.Cdma1xRtt:\r\n                        case WwanDataClass.Cdma3xRtt:\r\n                        case WwanDataClass.CdmaUmb:\r\n                        case WwanDataClass.Umts:\r\n                            return NetworkType.UMTS;\r\n                        case WwanDataClass.Hsdpa:\r\n                        case WwanDataClass.Hsupa:\r\n                            return NetworkType.HSPA;\r\n                        //4G-equivalent\r\n                        case WwanDataClass.LteAdvanced:\r\n                            return NetworkType.LTE;\r\n\r\n                        //not connected\r\n                        case WwanDataClass.None:\r\n                            return NetworkType.Unknown;\r\n\r\n                        //unknown\r\n                        case WwanDataClass.Custom:\r\n                        default:\r\n                            return NetworkType.OtherMobile;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return NetworkType.Unknown;\r\n        }\r\n\r\n        private const int CALL_MIN_LAYER = 65;\r\n        private const int CALL_MAX_LAYER = 74;\r\n\r\n        private TLString _secretP;\r\n\r\n        private TLString _secretRandom;\r\n\r\n        private TLInt _secretG;\r\n\r\n        private TLInt _lastVersion;\r\n\r\n        private byte[] _ga;\r\n\r\n        private readonly object __callSyncRoot = new object();\r\n\r\n        private TLPhoneCallBase _call;\r\n        private byte[] _aOrB;\r\n        private byte[] _authKey;\r\n        private bool _outgoing = true;\r\n\r\n        //private VoIPControllerWrapper _controller;\r\n        //private CallController _controller;\r\n        //BackgroundProcessController.Instance.CallController\r\n        private Error _lastError;\r\n\r\n        private bool _controllerStarted;\r\n        private DateTime? _startCallTime;\r\n        private bool _needSendDebugLog;\r\n        private PhoneCallState _currentState;\r\n        private int _signal;\r\n        private bool _endCallAfterRequest;\r\n        private string[] _emojis;\r\n        private bool _needPlayEndSound;\r\n        private IList<TLUpdatePhoneCall> _pendingUpdates = new List<TLUpdatePhoneCall>();\r\n        private byte[] _gb;\r\n        private string _debugLog;\r\n        private long _debugCallId;\r\n\r\n        //private VoipPhoneCall _voipPhoneCall;\r\n\r\n        public void StartOutgoingCall(TLUser user, Action<TLLong> callback)\r\n        {\r\n            SetCall(null);\r\n            _authKey = null;\r\n\r\n            if (user == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var inputUser = user.ToInputUser();\r\n            if (inputUser == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _userId = user.Id;\r\n\r\n            ConfigureDeviceForCall();\r\n            ShowNotifications();\r\n            StartConnectingSound();\r\n            DispatchStateChanged(PhoneCallState.STATE_REQUESTING);\r\n            _outgoing = true;\r\n\r\n            var salt = new Byte[256];\r\n            var random = new SecureRandom();\r\n            random.NextBytes(salt);\r\n\r\n            var version = _lastVersion ?? new TLInt(0);\r\n            var randomLength = new TLInt(256);\r\n\r\n            _mtProtoService.GetDHConfigAsync(version, randomLength,\r\n                result =>\r\n                {\r\n                    var dhConfig =  result as TLDHConfig;\r\n                    if (dhConfig != null)\r\n                    {\r\n                        if (!TLUtils.CheckPrime(dhConfig.P.Data, dhConfig.G.Value))\r\n                        {\r\n                            CallFailed();\r\n                            return;\r\n                        }\r\n\r\n                        _secretP = dhConfig.P;\r\n                        _secretG = dhConfig.G;\r\n                        _secretRandom = dhConfig.Random;\r\n                    }\r\n\r\n                    for (var i = 0; i < 256; i++)\r\n                    {\r\n                        salt[i] = (byte) (salt[i] ^ _secretRandom.Data[i]);\r\n                    }\r\n\r\n                    var gaBytes = MTProtoService.GetGB(salt, _secretG, _secretP);\r\n\r\n                    var protocol = new TLPhoneCallProtocol\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        UdpP2P = true,\r\n                        UdpReflector = true,\r\n                        MinLayer = new TLInt(CALL_MIN_LAYER),\r\n                        MaxLayer = new TLInt(CALL_MAX_LAYER)\r\n                    };\r\n                    _ga = gaBytes;\r\n                    var gaHash = Telegram.Api.Helpers.Utils.ComputeSHA256(_ga);\r\n\r\n                    _mtProtoService.RequestCallAsync(user.ToInputUser(), TLInt.Random(), TLString.FromBigEndianData(gaHash), protocol,\r\n                        result2 =>\r\n                        {\r\n                            SetCall(result2.PhoneCall);\r\n                            _aOrB = salt;\r\n                            DispatchStateChanged(PhoneCallState.STATE_WAITING);\r\n\r\n                            if (_pendingUpdates.Count > 0 && _call != null)\r\n                            {\r\n                                foreach (var updatePhoneCall in _pendingUpdates)\r\n                                {\r\n                                    Handle(updatePhoneCall);\r\n                                }\r\n                                _pendingUpdates.Clear();\r\n                            }\r\n\r\n                            callback.SafeInvoke(result2.PhoneCall.Id);\r\n\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                _timeoutRunnable = () =>\r\n                                {\r\n                                    _timeoutRunnable = null;\r\n\r\n                                    var inputPhoneCall = _call as IInputPhoneCall;\r\n                                    if (inputPhoneCall != null)\r\n                                    {\r\n                                        var duration = _controllerStarted ? (GetCallDuration() / 1000) : 0;\r\n                                        var connectionId = _controllerStarted ? BackgroundProcessController.Instance.CallController.GetPreferredRelayID() : 0;\r\n\r\n                                        _mtProtoService.DiscardCallAsync(inputPhoneCall.ToInputPhoneCall(), new TLInt(duration), new TLPhoneCallDiscardReasonMissed(), new TLLong(connectionId),\r\n                                            result3 =>\r\n                                            {\r\n                                                Telegram.Logs.Log.Write(\"phone.discardCall result \" + result3);\r\n                                            },\r\n                                            error3 =>\r\n                                            {\r\n                                                Telegram.Logs.Log.Write(\"phone.discardCall error \" + error3);\r\n                                                CallFailed();\r\n                                            });\r\n                                    }\r\n                                };\r\n\r\n                                var config = _cacheService.GetConfig() as TLConfig63;\r\n                                var timeout = config != null ? config.CallReceiveTimeoutMs.Value : 30000;\r\n                                RunTimer(TimeSpan.FromMilliseconds(timeout));\r\n                            });\r\n                        },\r\n                        error2 =>\r\n                        {\r\n                            \r\n                        });\r\n                },\r\n                error =>\r\n                {\r\n                    Telegram.Logs.Log.Write(\"messages.getDHConfig error \" + error);\r\n                    CallFailed();\r\n                });\r\n        }\r\n\r\n        public void AcceptIncomingCall(TLPhoneCallRequested64 callRequested)\r\n        {\r\n            if (callRequested == null) return;\r\n\r\n            _authKey = null;\r\n\r\n            StopRinging();\r\n            ShowNotification();\r\n            ConfigureDeviceForCall();\r\n            StartConnectingSound();\r\n            DispatchStateChanged(PhoneCallState.STATE_EXCHANGING_KEYS);\r\n\r\n            var salt = new Byte[256];\r\n            var random = new SecureRandom();\r\n            random.NextBytes(salt);\r\n\r\n            var version = _lastVersion ?? new TLInt(0);\r\n            var randomLength = new TLInt(256);\r\n\r\n            _mtProtoService.GetDHConfigAsync(version, randomLength,\r\n                result =>\r\n                {\r\n                    var dhConfig = result as TLDHConfig;\r\n                    if (dhConfig != null)\r\n                    {\r\n                        if (!TLUtils.CheckPrime(dhConfig.P.Data, dhConfig.G.Value))\r\n                        {\r\n                            CallFailed();\r\n                            return;\r\n                        }\r\n\r\n                        _secretP = dhConfig.P;\r\n                        _secretG = dhConfig.G;\r\n                        _secretRandom = dhConfig.Random;\r\n                    }\r\n\r\n                    for (var i = 0; i < 256; i++)\r\n                    {\r\n                        salt[i] = (byte)(salt[i] ^ _secretRandom.Data[i]);\r\n                    }\r\n\r\n                    _aOrB = salt;\r\n                    var gbBytes = MTProtoService.GetGB(salt, _secretG, _secretP);\r\n                    \r\n                    var protocol = new TLPhoneCallProtocol\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        UdpP2P = true,\r\n                        UdpReflector = true,\r\n                        MinLayer = new TLInt(CALL_MIN_LAYER),\r\n                        MaxLayer = new TLInt(CALL_MAX_LAYER)\r\n                    };\r\n                    _gb = gbBytes;\r\n\r\n                    _mtProtoService.AcceptCallAsync(callRequested.ToInputPhoneCall(), TLString.FromBigEndianData(gbBytes), protocol,\r\n                        result2 =>\r\n                        {\r\n                            Telegram.Logs.Log.Write(string.Format(\"phone.acceptCall result={0} current={1}\", result2, _call));\r\n                            SetCall(result2.PhoneCall);\r\n\r\n                            if (result2.PhoneCall is TLPhoneCallDiscarded61)\r\n                            {\r\n                                Handle(new TLUpdatePhoneCall { PhoneCall = result2.PhoneCall });\r\n                            }\r\n                        },\r\n                        error2 =>\r\n                        {\r\n                            Telegram.Logs.Log.Write(\"phone.acceptCall error=\" + error2);\r\n                            CallFailed();\r\n                        });\r\n                },\r\n                error =>\r\n                {\r\n                    Telegram.Logs.Log.Write(\"messages.getDHConfig error \" + error);\r\n                    CallFailed();\r\n                });\r\n        }\r\n\r\n        private void ShowNotification()\r\n        {\r\n            \r\n        }\r\n\r\n        private void StopRinging()\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                _maxLoopedCount = 0;\r\n                _lastLoopedUri = null;\r\n                MessagePlayerControl.Player.Stop();\r\n            });\r\n        }\r\n\r\n\r\n        private void VoipPhoneCall_RejectRequested(VoipPhoneCall sender, CallRejectEventArgs args)\r\n        {\r\n            \r\n        }\r\n\r\n        private void VoipPhoneCall_AnswerRequested(VoipPhoneCall sender, CallAnswerEventArgs args)\r\n        {\r\n            \r\n        }\r\n\r\n        private void DispatchStateChanged(PhoneCallState callState)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"  DispatchSateChanged state=\" + callState);\r\n            _currentState = callState;\r\n            _eventAggregator.Publish(new PhoneCallStateChangedEventArgs{CallState = callState, Call = Call });\r\n        }\r\n\r\n        private void StartConnectingSound()\r\n        {\r\n            PlaySound(PhoneCallSound.Connecting, -1);\r\n        }\r\n\r\n        private void ShowNotifications()\r\n        {\r\n            \r\n\r\n        }\r\n\r\n        private void ConfigureDeviceForCall()\r\n        {\r\n            _needPlayEndSound = true;\r\n        }\r\n\r\n        private void CallFailed()\r\n        {\r\n            CallFailed(_controllerStarted ? BackgroundProcessController.Instance.CallController.GetLastError() : 0);\r\n        }\r\n\r\n        private void CallFailed(Error errorCode)\r\n        {\r\n            Telegram.Logs.Log.Write(\"Call \" + (_call != null ? _call.Id.Value : 0)+\" failed with error code \" + errorCode);\r\n\r\n\t\t    _lastError = errorCode;\r\n\t\t    if (_call != null) \r\n            {\r\n\t\t\t    Telegram.Logs.Log.Write(\"Discarding failed call\");\r\n\r\n                var phoneCall = _call as IInputPhoneCall;\r\n                if (phoneCall != null)\r\n                {\r\n                    var peer = phoneCall.ToInputPhoneCall();\r\n                    var duration = _controllerStarted ? (GetCallDuration() / 1000) : 0;\r\n                    var connectionId = _controllerStarted ? BackgroundProcessController.Instance.CallController.GetPreferredRelayID() : 0;\r\n                    var reason = new TLPhoneCallDiscardReasonDisconnect();\r\n\r\n                    _mtProtoService.DiscardCallAsync(peer, new TLInt(duration), reason, new TLLong(connectionId),\r\n                        result =>\r\n                        {\r\n                            Telegram.Logs.Log.Write(\"phone.discardCall result=\" + result);\r\n                        },\r\n                        error =>\r\n                        {\r\n                            Telegram.Logs.Log.Write(\"phone.discardCall error=\" + error);\r\n                        });\r\n                }\r\n\t\t    }\r\n\t\t    DispatchStateChanged(PhoneCallState.STATE_FAILED);\r\n            PlaySound(PhoneCallSound.Failed, 0);\r\n\r\n            BackgroundProcessController.Instance.CallController.EndCall();\r\n\r\n            StopSelf();\r\n\r\n            //if(errorCode!=VoIPController.ERROR_LOCALIZED && soundPool!=null){\r\n            //    playingSound=true;\r\n            //    soundPool.play(spFailedID, 1, 1, 0, 0, 1);\r\n            //    AndroidUtilities.runOnUIThread(new Runnable(){\r\n            //        @Override\r\n            //        public void run(){\r\n            //            soundPool.release();\r\n            //            if(isBtHeadsetConnected)\r\n            //                ((AudioManager) ApplicationLoader.applicationContext.getSystemService(AUDIO_SERVICE)).stopBluetoothSco();\r\n            //        }\r\n            //    }, 1000);\r\n            //}\r\n\t\t    //StopSelf();\r\n        }\r\n\r\n        private void CallEnded()\r\n        {\r\n            Telegram.Logs.Log.Write(\"Call \" + (_call != null ? _call.Id.Value : 0) + \" ended\");\r\n            DispatchStateChanged(PhoneCallState.STATE_ENDED);\r\n            if (_needPlayEndSound)\r\n            {\r\n                _needPlayEndSound = false;\r\n                PlaySound(PhoneCallSound.End, 0);\r\n\r\n                //playingSound = true;\r\n                //soundPool.play(spEndId, 1, 1, 0, 0, 1);\r\n                //AndroidUtilities.runOnUIThread(new Runnable() {\r\n                //    @Override\r\n                //    public void run() {\r\n                //        soundPool.release();\r\n                //        if(isBtHeadsetConnected)\r\n                //            ((AudioManager)ApplicationLoader.applicationContext.getSystemService(AUDIO_SERVICE)).stopBluetoothSco();\r\n                //    }\r\n                //}, 1000);\r\n            }\r\n            else\r\n            {\r\n                StopRinging();\r\n            }\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (_timeoutRunnable != null)\r\n                {\r\n                    CancelTimer();\r\n                    _timeoutRunnable = null;\r\n                }\r\n            });\r\n\r\n            BackgroundProcessController.Instance.CallController.EndCall();\r\n\r\n            StopSelf();\r\n        }\r\n\r\n        private int GetCallDuration()\r\n        {\r\n            if (_startCallTime.HasValue)\r\n            {\r\n                return (int) (DateTime.Now - _startCallTime.Value).TotalMilliseconds;\r\n            }\r\n\r\n            return 0;\r\n        }\r\n\r\n        public void Handle(TLUpdatePhoneCall updatePhoneCall)\r\n        {\r\n            Telegram.Logs.Log.Write(string.Format(\"VoIPService.Handle\\nupdated_call={0}\\ncurrent_call={1}\", updatePhoneCall.PhoneCall, _call));\r\n            //if (_call == null)\r\n            //{\r\n            //    _pendingUpdates.Add(updatePhoneCall);\r\n            //    return;\r\n            //}\r\n\r\n            if (updatePhoneCall == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (Call != null \r\n                && !(Call is TLPhoneCallDiscarded)\r\n                && Call.Id.Value != updatePhoneCall.PhoneCall.Id.Value)\r\n            {\r\n                if (updatePhoneCall.PhoneCall is TLPhoneCallRequestedBase)\r\n                {\r\n                    DeclineIncomingCallInternal(PhoneDiscardReason.DISCARD_REASON_LINE_BUSY, () => { }, updatePhoneCall.PhoneCall);\r\n                }\r\n\r\n                return;\r\n            }\r\n            //if (updatePhoneCall.PhoneCall.Id.Value != _call.PhoneCall.Id.Value)\r\n            //{\r\n            //    var error = \"onCallUpdated called with wrong call id (got \" + updatePhoneCall.PhoneCall.Id.Value + \", expected \" + _call.PhoneCall.Id.Value + \")\";\r\n            //    Telegram.Logs.Log.Write(error);\r\n            //    Execute.ShowDebugMessage(error);\r\n            //    return;\r\n            //}\r\n\r\n            var phoneCallBase = updatePhoneCall.PhoneCall;\r\n\r\n            var phoneCallAccepted = phoneCallBase as TLPhoneCallAccepted;\r\n            if (phoneCallAccepted != null)\r\n            {\r\n                if (_authKey == null)\r\n                {\r\n                    ProcessAcceptedCall(phoneCallAccepted);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var phoneCall = phoneCallBase as TLPhoneCall;\r\n            if (phoneCall != null)\r\n            {\r\n                if (_authKey == null)\r\n                {\r\n                    ProcessIncomingCall(phoneCall);\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var phoneCallDiscarded = phoneCallBase as TLPhoneCallDiscarded61;\r\n            if (phoneCallDiscarded != null)\r\n            {\r\n                var currentCall = _call;\r\n                if (currentCall != null)\r\n                {\r\n                    SetCall(phoneCallDiscarded);\r\n                    _needSendDebugLog = phoneCallDiscarded.NeedDebug;\r\n                    Telegram.Logs.Log.Write(\"call discarded, stopping service\");\r\n                    if (phoneCallDiscarded.Reason is TLPhoneCallDiscardReasonBusy)\r\n                    {\r\n                        DispatchStateChanged(PhoneCallState.STATE_BUSY);\r\n\r\n                        PlaySound(PhoneCallSound.Busy, 2);\r\n                        StopSelf();\r\n                        //playingSound = true;\r\n                        //soundPool.play(spBusyId, 1, 1, 0, -1, 1);\r\n                        //AndroidUtilities.runOnUIThread(new Runnable() {\r\n                        //    @Override\r\n                        //    public void run() {\r\n                        //        soundPool.release();\r\n                        //        if(isBtHeadsetConnected)\r\n                        //            ((AudioManager)ApplicationLoader.applicationContext.getSystemService(AUDIO_SERVICE)).stopBluetoothSco();\r\n                        //    }\r\n                        //}, 2500);\r\n                        //stopSelf();\r\n                    }\r\n                    else\r\n                    {\r\n                        CallEnded();\r\n                    }\r\n\r\n                    if (phoneCallDiscarded.NeedDebug)\r\n                    {\r\n                        _debugCallId = _call.Id.Value;\r\n                        _debugLog = BackgroundProcessController.Instance.CallController.GetDebugLog();\r\n                    }\r\n\r\n                    BackgroundProcessController.Instance.CallController.DeleteVoIPControllerWrapper();\r\n                    //if (_controller != null)\r\n                    //{\r\n                    //    _controller.Dispose();\r\n                    //    _controller = null;\r\n                    //}\r\n                    _eventAggregator.Publish(new PhoneCallDiscardedEventArgs { Call = currentCall, DiscardedCall = phoneCallDiscarded, Outgoing = _outgoing });\r\n\r\n                    if (phoneCallDiscarded.NeedRating)\r\n                    {\r\n                        StartRatingActivity();\r\n                    }\r\n                }\r\n            }\r\n\r\n            var phoneCallRequested = phoneCallBase as TLPhoneCallRequested64;\r\n            if (phoneCallRequested != null)\r\n            {\r\n                SetCall(phoneCallRequested);\r\n                _outgoing = false;\r\n                OnStartCommand();\r\n                _eventAggregator.Publish(new PhoneCallRequestedEventArgs{ RequestedCall = phoneCallRequested });\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (_timeoutRunnable != null)\r\n                    {\r\n                        _timeoutRunnable = null;\r\n                        CancelTimer();\r\n                    }\r\n\r\n                    _timeoutRunnable = () =>\r\n                    {\r\n                        _timeoutRunnable = null;\r\n                        DeclineIncomingCall(PhoneDiscardReason.DISCARD_REASON_MISSED, null);\r\n                    };\r\n                    var config = _cacheService.GetConfig() as TLConfig63;\r\n                    var timeout = config != null ? config.CallRingTimeoutMs.Value : 30000;\r\n                    RunTimer(TimeSpan.FromMilliseconds(timeout));\r\n                });\r\n            }\r\n\r\n            var phoneCallWaiting = phoneCallBase as TLPhoneCallWaiting;\r\n            if (phoneCallWaiting != null)\r\n            {\r\n                if (_currentState == PhoneCallState.STATE_WAITING && phoneCallWaiting.ReceiveDate != null)\r\n                {\r\n                    DispatchStateChanged(PhoneCallState.STATE_RINGING);\r\n                    PlaySound(PhoneCallSound.Ringback, -1);\r\n\r\n                    //Execute.BeginOnUIThread(() =>\r\n                    //{\r\n                    //    if (_timeoutRunnable != null)\r\n                    //    {\r\n                    //        _timeoutRunnable = null;\r\n                    //        CancelTimer();\r\n                    //    }\r\n\r\n                    //    _timeoutRunnable = () =>\r\n                    //    {\r\n                    //        _timeoutRunnable = null;\r\n                    //        DeclineIncomingCall(PhoneDiscardReason.DISCARD_REASON_MISSED, null);\r\n                    //    };\r\n                    //    RunTimer(TimeSpan.FromSeconds(Constants.CallRingTimeout));\r\n                    //});\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnStartCommand()\r\n        {\r\n            if (_outgoing)\r\n            {\r\n                //StartOutgoingCall();\r\n            }\r\n            else\r\n            {\r\n                AcknowledgeCallAndStartRinging();\r\n            }\r\n        }\r\n\r\n        private void AcknowledgeCallAndStartRinging()\r\n        {\r\n            var phoneCallDiscarded = _call as TLPhoneCallDiscarded;\r\n            if (phoneCallDiscarded != null)\r\n            {\r\n                Telegram.Logs.Log.Write(\"Call \" + phoneCallDiscarded.Id + \" was discarded before the service started, stopping\");\r\n                StopSelf();\r\n                return;\r\n            }\r\n\r\n            var inputPhoneCall = _call as IInputPhoneCall;\r\n            if (inputPhoneCall != null)\r\n            {\r\n                _mtProtoService.ReceivedCallAsync(inputPhoneCall.ToInputPhoneCall(),\r\n                    result =>\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"phone.receivedCall result=\" + result.Value);\r\n                        StartRinging();\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"phone.receivedCall error=\" + error);\r\n                        StopSelf();\r\n                    });\r\n            }\r\n        }\r\n\r\n        private void StartRinging()\r\n        {\r\n            Telegram.Logs.Log.Write(\"starting ringing for call \" + (_call != null ? _call.Id : null));\r\n            DispatchStateChanged(PhoneCallState.STATE_WAITING_INCOMING);\r\n            PlaySound(PhoneCallSound.Call, -1);\r\n        }\r\n\r\n        private static Uri _lastLoopedUri;\r\n\r\n        private static int _loopedCount;\r\n\r\n        private static int _maxLoopedCount;\r\n\r\n        /// <summary>\r\n        /// \r\n        /// </summary>\r\n        /// <param name=\"sound\"></param>\r\n        /// <param name=\"loopedCount\"> -1 -- forewer, 0 -- once, 1 -- twice </param>\r\n        public static void PlaySound(PhoneCallSound sound, int loopedCount)\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                MessagePlayerControl.Stop();\r\n                GifPlayerControl.StopVideo();\r\n\r\n                var source = GetSoundSource(sound);\r\n\r\n                MessagePlayerControl.Player.Volume = 0.75;\r\n                MessagePlayerControl.Player.Source = new Uri(source, UriKind.Relative);\r\n                MessagePlayerControl.Player.MediaOpened += MessagePlayerControl_OnMediaOpened;\r\n                MessagePlayerControl.Player.MediaFailed += MessagePlayerControl_OnMediaFailed;\r\n\r\n                MessagePlayerControl.Player.MediaEnded -= MessagePlayerControl_OnMediaEnded;\r\n                _maxLoopedCount = loopedCount;\r\n                _loopedCount = 0;\r\n                _lastLoopedUri = MessagePlayerControl.Player.Source;\r\n                MessagePlayerControl.Player.MediaEnded += MessagePlayerControl_OnMediaEnded;\r\n            });\r\n        }\r\n\r\n        private static void MessagePlayerControl_OnMediaEnded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_loopedCount > _maxLoopedCount - 1 && _maxLoopedCount != -1)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_lastLoopedUri == MessagePlayerControl.Player.Source)\r\n            {\r\n                MessagePlayerControl.Player.Position = TimeSpan.FromSeconds(0.0);\r\n                MessagePlayerControl.Player.Play();\r\n                _loopedCount++;\r\n            }\r\n        }\r\n\r\n        private static void MessagePlayerControl_OnMediaFailed(object sender, ExceptionRoutedEventArgs e)\r\n        {\r\n            MessagePlayerControl.Player.MediaOpened -= MessagePlayerControl_OnMediaOpened;\r\n            MessagePlayerControl.Player.MediaFailed -= MessagePlayerControl_OnMediaFailed;\r\n        }\r\n\r\n        private static void MessagePlayerControl_OnMediaOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            MessagePlayerControl.Player.MediaOpened -= MessagePlayerControl_OnMediaOpened;\r\n            MessagePlayerControl.Player.MediaFailed -= MessagePlayerControl_OnMediaFailed;\r\n            MessagePlayerControl.Player.Play();\r\n        }\r\n\r\n        private static string GetSoundSource(PhoneCallSound sound)\r\n        {\r\n            switch (sound)\r\n            {\r\n                case PhoneCallSound.Call:\r\n                    return \"/Sounds/voip_call2.mp3\";\r\n                case PhoneCallSound.Ringback:\r\n                    return \"/Sounds/voip_ringback.mp3\";\r\n                case PhoneCallSound.Failed:\r\n                    return \"/Sounds/voip_failed.mp3\";\r\n                case PhoneCallSound.End:\r\n                    return \"/Sounds/voip_end.mp3\";\r\n                case PhoneCallSound.Busy:\r\n                    return \"/Sounds/voip_busy.mp3\";\r\n                case PhoneCallSound.Connecting:\r\n                    return \"/Sounds/voip_connecting.mp3\";\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private void StopSelf()\r\n        {\r\n            \r\n        }\r\n\r\n        private void StartRatingActivity()\r\n        {\r\n            \r\n        }\r\n\r\n        private void ProcessIncomingCall(TLPhoneCall call)\r\n        {\r\n            if(call.GAorB == null){\r\n\t\t\t\tTelegram.Logs.Log.Write(\"stopping VoIP service, Ga == null\");\r\n\t\t\t\tCallFailed();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n            //if(!Arrays.equals(g_a_hash, Utils.ComputeSHA256(call.GAorB.Data))){\r\n            //    Telegram.Logs.Log.Write(\"stopping VoIP service, Ga hash doesn't match\");\r\n            //    CallFailed();\r\n            //    return;\r\n            //}\r\n\r\n\t\t\t_ga=call.GAorB.Data;\r\n\r\n            if (_secretP == null\r\n                || !TLUtils.CheckGaAndGb(call.GAorB.Data, _secretP.Data))\r\n            {\r\n                CallFailed();\r\n                return;\r\n            }\r\n\r\n            _authKey = MTProtoService.GetAuthKey(_aOrB, call.GAorB.ToBytes(), _secretP.ToBytes());\r\n            var buffer = TLUtils.Combine(_authKey, _ga);\r\n            var sha256 = Telegram.Api.Helpers.Utils.ComputeSHA256(buffer);\r\n\r\n            _emojis = EncryptionKeyEmojifier.EmojifyForCall(sha256);\r\n\r\n            var keyHash = Telegram.Api.Helpers.Utils.ComputeSHA1(_authKey); \r\n            var keyFingerprint = new TLLong(BitConverter.ToInt64(keyHash, 12));\r\n\r\n\r\n            if (keyFingerprint.Value != call.KeyFingerprint.Value)\r\n            {\r\n                Telegram.Logs.Log.Write(\"key fingerprints don't match\");\r\n                CallFailed();\r\n                return;\r\n            }\r\n\r\n            SetCall(call);\r\n            _outgoing = false;\r\n            InitiateActualEncryptedCall();\r\n        }\r\n\r\n        private void ProcessAcceptedCall(TLPhoneCallAccepted phoneCallAccepted)\r\n        {\r\n            DispatchStateChanged(PhoneCallState.STATE_EXCHANGING_KEYS);\r\n\r\n            if (!TLUtils.CheckGaAndGb(phoneCallAccepted.GB.Data, _secretP.Data))\r\n            {\r\n                CallFailed();\r\n                return;\r\n            }\r\n\r\n            _authKey = MTProtoService.GetAuthKey(_aOrB, phoneCallAccepted.GB.ToBytes(), _secretP.ToBytes());\r\n            var buffer = TLUtils.Combine(_authKey, _ga);\r\n            var sha256 = Telegram.Api.Helpers.Utils.ComputeSHA256(buffer);\r\n\r\n            _emojis = EncryptionKeyEmojifier.EmojifyForCall(sha256);\r\n\r\n            var keyHash = Telegram.Api.Helpers.Utils.ComputeSHA1(_authKey); \r\n            var keyFingerprint = new TLLong(BitConverter.ToInt64(keyHash, 12));\r\n\r\n            var peer = new TLInputPhoneCall\r\n            {\r\n                Id = phoneCallAccepted.Id, \r\n                AccessHash = phoneCallAccepted.AccessHash\r\n            };\r\n\r\n            var protocol = new TLPhoneCallProtocol\r\n            {\r\n                Flags = new TLInt(0),\r\n                UdpP2P = true,\r\n                UdpReflector = true,\r\n                MinLayer = new TLInt(CALL_MIN_LAYER),\r\n                MaxLayer = new TLInt(CALL_MAX_LAYER)\r\n            };\r\n\r\n            _mtProtoService.ConfirmCallAsync(peer, TLString.FromBigEndianData(_ga), keyFingerprint, protocol,\r\n                result =>\r\n                {\r\n                    Telegram.Logs.Log.Write(string.Format(\"phone.confirmCall result={0} current={1}\", result, _call));\r\n                    SetCall(result.PhoneCall);\r\n                    //_voipPhoneCall.NotifyCallActive();\r\n                    InitiateActualEncryptedCall();\r\n                },\r\n                error =>\r\n                {\r\n                    Telegram.Logs.Log.Write(string.Format(\"phone.confirmCall error={0} current={1}\", error, _call));\r\n                    CallFailed();\r\n                });\r\n\r\n        }\r\n\r\n        private EndpointStruct ToEndpoint(TLPhoneConnection connection)\r\n        {\r\n            var connection61 = connection as TLPhoneConnection61;\r\n            if (connection61 != null)\r\n            {\r\n                return new EndpointStruct\r\n                {\r\n                    id = connection61.Id.Value,\r\n                    ipv4 = connection61.Ip.ToString(),\r\n                    ipv6 = connection61.IpV6.ToString(),\r\n                    port = (ushort) connection61.Port.Value,\r\n                    peerTag = connection61.PeerTag.ToString()\r\n                };\r\n            }\r\n\r\n            return new EndpointStruct\r\n            {\r\n                id = 0,\r\n                ipv4 = connection.Ip.ToString(),\r\n                ipv6 = connection.IpV6.ToString(),\r\n                port = (ushort)connection.Port.Value,\r\n                peerTag = connection.PeerTag.ToString()\r\n            };\r\n        }\r\n\r\n        private void InitiateActualEncryptedCall()\r\n        {\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (_timeoutRunnable != null)\r\n                {\r\n                    _timeoutRunnable = null;\r\n                    CancelTimer();\r\n                }\r\n            });\r\n\r\n            _mtProtoService.GetCallConfigAsync(result =>\r\n            {\r\n                var jobject = JsonValue.Parse(result.Data.ToString()).GetObject();\r\n                foreach (var obj in jobject)\r\n                {\r\n                    System.Diagnostics.Debug.WriteLine(obj.Value.Stringify());\r\n                }\r\n\r\n\r\n                //VoIPControllerWrapper.UpdateServerConfig(result.Data.ToString());\r\n                BackgroundProcessController.Instance.CallController.UpdateServerConfig(result.Data.ToString());\r\n\r\n                var logFile = ApplicationData.Current.LocalFolder.Path + \"\\\\tgvoip.logFile.txt\";\r\n                var statsDumpFile = ApplicationData.Current.LocalFolder.Path + \"\\\\tgvoip.statsDump.txt\";\r\n\r\n                _cacheService.GetConfigAsync(config =>\r\n                {\r\n                    var config60 = config as TLConfig60;\r\n                    if (config60 != null)\r\n                    {\r\n                        var phoneCall = _call as TLPhoneCall;\r\n                        if (phoneCall != null)\r\n                        {\r\n                            var protocol = phoneCall.Protocol;\r\n\r\n                            var callConfig = new Config\r\n                            {\r\n                                InitTimeout = config60.CallPacketTimeoutMs.Value/1000.0,\r\n                                RecvTimeout = config60.CallConnectTimeoutMs.Value/1000.0,\r\n                                DataSavingMode = DataSavingMode.Never,\r\n                                EnableAEC = true,\r\n                                EnableNS = true,\r\n                                EnableAGC = true,\r\n                                LogFilePath = logFile,\r\n                                StatsDumpFilePath = statsDumpFile\r\n                            };\r\n\r\n                            var connection = phoneCall.Connection;\r\n                            var endpoints = new EndpointStruct[phoneCall.AlternativeConnections.Count + 1];\r\n                            endpoints[0] = ToEndpoint(connection);\r\n\r\n                            for (int i = 0; i < phoneCall.AlternativeConnections.Count; i++)\r\n                            {\r\n                                connection = phoneCall.AlternativeConnections[i];\r\n                                endpoints[i + 1] = ToEndpoint(connection);\r\n                            }\r\n\r\n                            //BackgroundProcessController.Instance.CallController.DeleteVoIPControllerWrapper();\r\n                            //BackgroundProcessController.Instance.CallController.CreateVoIPControllerWrapper();\r\n                            //BackgroundProcessController.Instance.CallController.SetConfig(callConfig);\r\n                            //BackgroundProcessController.Instance.CallController.SetStatusCallback(this);\r\n                            //BackgroundProcessController.Instance.CallController.SetEncryptionKey(_authKey, _outgoing);\r\n                            //BackgroundProcessController.Instance.CallController.SetPublicEndpoints(endpoints, phoneCall.Protocol.UdpP2P);\r\n                            //BackgroundProcessController.Instance.CallController.Start();\r\n                            //UpdateNetworkType(null);\r\n                            //BackgroundProcessController.Instance.CallController.Connect();\r\n                            \r\n                            var config82 = config as TLConfig82;\r\n                            var defaultP2PContacts = config82 == null || config82.DefaultP2PContacts;\r\n                            var callsSecurity = _stateService.GetCallsSecurity(defaultP2PContacts);\r\n\r\n                            var proxy = new ProxyStruct\r\n                            {\r\n                                protocol = ProxyProtocol.None,\r\n                                address = string.Empty,\r\n                                port = 1080,\r\n                                password = string.Empty,\r\n                                username = string.Empty\r\n                            };\r\n                            var proxyConfig = _transportService.GetProxyConfig() as TLProxyConfig76;\r\n                            if (proxyConfig != null \r\n                                && proxyConfig.IsEnabled.Value\r\n                                && !proxyConfig.IsEmpty\r\n                                && proxyConfig.UseForCalls.Value\r\n                                && proxyConfig.SelectedIndex != null\r\n                                && proxyConfig.SelectedIndex.Value >= 0\r\n                                && proxyConfig.SelectedIndex.Value < proxyConfig.Items.Count)\r\n                            {\r\n                                var socks5Proxy = proxyConfig.Items[proxyConfig.SelectedIndex.Value] as TLSocks5Proxy;\r\n                                if (socks5Proxy != null)\r\n                                {\r\n                                    proxy = new ProxyStruct\r\n                                    {\r\n                                        protocol = ProxyProtocol.SOCKS5,\r\n                                        address = socks5Proxy.Server.ToString(),\r\n                                        port = (ushort) socks5Proxy.Port.Value,\r\n                                        username = socks5Proxy.Username.ToString(),\r\n                                        password = socks5Proxy.Password.ToString()\r\n                                    };\r\n                                }\r\n                            }\r\n\r\n                            var userId = !_outgoing ? phoneCall.AdminId : phoneCall.ParticipantId;\r\n                            var user = _cacheService.GetUser(userId) as TLUser;\r\n                            if (user != null)\r\n                            {\r\n                                var allowP2P = false;\r\n                                if (callsSecurity != null)\r\n                                {\r\n                                    allowP2P = callsSecurity.PeerToPeerEverybody \r\n                                        || callsSecurity.PeerToPeerContacts && user.IsContact\r\n                                        || callsSecurity.PeerToPeerContacts && user.IsContactMutual;\r\n                                }\r\n\r\n                                _userId = user.Id;\r\n                                \r\n                                var initiated = BackgroundProcessController.Instance.CallController.InitiateOutgoingCall(\r\n                                    user.FullName2, user.Index,\r\n                                    phoneCall.Id.Value, phoneCall.AccessHash.Value,\r\n                                    callConfig,\r\n                                    _authKey, _outgoing,\r\n                                    _emojis,\r\n                                    endpoints, \r\n                                    phoneCall.Protocol.UdpP2P && allowP2P,\r\n                                    protocol.MaxLayer.Value,\r\n                                    proxy);\r\n\r\n                                if (initiated)\r\n                                {\r\n                                    _controllerStarted = true;\r\n                                    _startCallTime = DateTime.Now;\r\n\r\n                                    _eventAggregator.Publish(new PhoneCallStartedEventArgs { Call = phoneCall, Emojis = _emojis });\r\n                                }\r\n                            }\r\n                            //_controller.SetSpeakerphoneEndpoint();\r\n                        }\r\n                    }\r\n                });\r\n\r\n            },\r\n            error =>\r\n            {\r\n                    \r\n            });\r\n        }\r\n\r\n        public void OnSignalBarsChanged(int newSignal)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"  OnSignalBarsChanged newSignal=\" + newSignal);\r\n            _signal = newSignal;\r\n            _eventAggregator.Publish(new SignalBarsChangedEventArgs { Signal = newSignal });\r\n        }\r\n\r\n        public void OnCallStateChanged(CallState newState)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"==OnCallStateChanged new_state=\" + newState);\r\n            DispatchStateChanged((PhoneCallState)newState);\r\n\r\n            if (newState == CallState.Failed)\r\n            {\r\n                CallFailed();\r\n                return;\r\n            }\r\n\r\n            if (newState == CallState.Established)\r\n            {\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            //_eventAggregator.Unsubscribe(this);\r\n        }\r\n\r\n        public void HangUp()\r\n        {\r\n            DeclineIncomingCall(_currentState == PhoneCallState.STATE_RINGING || (_currentState == PhoneCallState.STATE_WAITING && _outgoing) ? PhoneDiscardReason.DISCARD_REASON_MISSED : PhoneDiscardReason.DISCARD_REASON_HANGUP, null);\r\n        }\r\n\r\n        public string[] GetEmojis()\r\n        {\r\n            return _emojis;\r\n        }\r\n\r\n        private void DeclineIncomingCall(PhoneDiscardReason discardReason, Action callback)\r\n        {\r\n            if (_currentState == PhoneCallState.STATE_REQUESTING)\r\n            {\r\n                _endCallAfterRequest = true;\r\n                return;\r\n            }\r\n\r\n            if (_currentState == PhoneCallState.STATE_HANGING_UP || _currentState == PhoneCallState.STATE_ENDED)\r\n            {\r\n                return;\r\n            }\r\n\r\n            DispatchStateChanged(PhoneCallState.STATE_HANGING_UP);\r\n            if (_call == null)\r\n            {\r\n                callback.SafeInvoke();\r\n                CallEnded();\r\n                return;\r\n            }\r\n\r\n            if (_call != null)\r\n            {\r\n                DeclineIncomingCallInternal(discardReason, callback, _call);\r\n            }\r\n        }\r\n\r\n        private void DeclineIncomingCallInternal(PhoneDiscardReason discardReason, Action callback, TLPhoneCallBase call)\r\n        {\r\n            var phoneCall = call as IInputPhoneCall;\r\n            if (phoneCall != null)\r\n            {\r\n                var peer = phoneCall.ToInputPhoneCall();\r\n                var duration = _controllerStarted ? (GetCallDuration()/1000) : 0;\r\n                var connectionId = _controllerStarted ? BackgroundProcessController.Instance.CallController.GetPreferredRelayID() : 0;\r\n                TLPhoneCallDiscardReasonBase reason;\r\n                switch (discardReason)\r\n                {\r\n                    case PhoneDiscardReason.DISCARD_REASON_DISCONNECT:\r\n                        reason = new TLPhoneCallDiscardReasonDisconnect();\r\n                        break;\r\n                    case PhoneDiscardReason.DISCARD_REASON_MISSED:\r\n                        reason = new TLPhoneCallDiscardReasonMissed();\r\n                        break;\r\n                    case PhoneDiscardReason.DISCARD_REASON_LINE_BUSY:\r\n                        reason = new TLPhoneCallDiscardReasonBusy();\r\n                        break;\r\n                    case PhoneDiscardReason.DISCARD_REASON_HANGUP:\r\n                    default:\r\n                        reason = new TLPhoneCallDiscardReasonHangup();\r\n                        break;\r\n                }\r\n\r\n                _mtProtoService.DiscardCallAsync(peer, new TLInt(duration), reason, new TLLong(connectionId),\r\n                    result =>\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"phone.discardCall result \" + result);\r\n\r\n                        callback.SafeInvoke();\r\n                    },\r\n                    error =>\r\n                    {\r\n                        Telegram.Logs.Log.Write(\"phone.discardCall error \" + error);\r\n\r\n                        callback.SafeInvoke();\r\n                    });\r\n            }\r\n        }\r\n\r\n        public void SwitchSpeaker(bool external)\r\n        {\r\n            BackgroundProcessController.Instance.CallController.SwitchSpeaker(external);\r\n        }\r\n\r\n        public void Mute(bool muted)\r\n        {\r\n            BackgroundProcessController.Instance.CallController.SetMicMute(muted);\r\n        }\r\n\r\n        public string GetDebugString()\r\n        {\r\n            return BackgroundProcessController.Instance.CallController.GetDebugString() ?? string.Empty;\r\n        }\r\n\r\n        public string GetDebugLog(long callId)\r\n        {\r\n            return callId == _debugCallId ? _debugLog ?? string.Empty : string.Empty; \r\n        }\r\n\r\n        public string GetVersion()\r\n        {\r\n            return BackgroundProcessController.Instance.CallController.GetVersion();\r\n        }\r\n\r\n        public int GetSignalBarsCount()\r\n        {\r\n            return BackgroundProcessController.Instance.CallController.GetSignalBarsCount();\r\n        }\r\n\r\n        public void OnCallStatusChanged(CallStatus newStatus)\r\n        {\r\n\r\n        }\r\n\r\n        public void OnCallAudioRouteChanged(CallAudioRoute newRoute)\r\n        {\r\n\r\n        }\r\n\r\n        public void OnMediaOperationsChanged(MediaOperations newOperations)\r\n        {\r\n\r\n        }\r\n\r\n        public void OnCameraLocationChanged(CameraLocation newCameraLocation)\r\n        {\r\n\r\n        }\r\n    }\r\n\r\n    public class PhoneCallStartedEventArgs\r\n    {\r\n        public TLPhoneCall Call { get; set; }\r\n\r\n        public string[] Emojis { get; set; }\r\n    }\r\n\r\n    public class PhoneCallDiscardedEventArgs\r\n    {\r\n        public TLPhoneCallBase Call { get; set; }\r\n\r\n        public TLPhoneCallDiscarded61 DiscardedCall { get; set; }\r\n\r\n        public bool Outgoing { get; set; }\r\n    }\r\n\r\n    public class PhoneCallRequestedEventArgs\r\n    {\r\n        public TLPhoneCallRequested64 RequestedCall { get; set; }\r\n    }\r\n\r\n    public class PhoneCallStateChangedEventArgs\r\n    {\r\n        public TLPhoneCallBase Call { get; set; }\r\n\r\n        public PhoneCallState CallState { get; set; }\r\n    }\r\n\r\n    public class SignalBarsChangedEventArgs\r\n    {\r\n        public int Signal { get; set; }\r\n    }\r\n\r\n    public enum PhoneCallSound\r\n    {\r\n        Call,\r\n        Ringback,\r\n        Failed,\r\n        End,\r\n        Busy,\r\n        Connecting\r\n    }\r\n\r\n    public enum PhoneCallState\r\n    {\r\n        STATE_WAIT_INIT = 1,\r\n\t    STATE_WAIT_INIT_ACK = 2,\r\n\t    STATE_ESTABLISHED = 3,\r\n\t    STATE_FAILED = 4,\r\n\t    STATE_HANGING_UP = 5,\r\n\t    STATE_ENDED = 6,\r\n\t    STATE_EXCHANGING_KEYS = 7,\r\n\t    STATE_WAITING = 8,\r\n\t    STATE_REQUESTING = 9,\r\n\t    STATE_WAITING_INCOMING = 10,\r\n\t    STATE_RINGING = 11,\r\n\t    STATE_BUSY = 12,\r\n    }\r\n\r\n    public enum PhoneDiscardReason\r\n    {\r\n        DISCARD_REASON_HANGUP = 1,\r\n\t    DISCARD_REASON_DISCONNECT = 2,\r\n\t    DISCARD_REASON_MISSED = 3,\r\n\t    DISCARD_REASON_LINE_BUSY = 4,\r\n    }\r\n\r\n    public class EncryptionKeyEmojifier\r\n    {\r\n        private static readonly string[] _emojis =\r\n        {\r\n            \"\\uD83D\\uDE09\",\"\\uD83D\\uDE0D\",\"\\uD83D\\uDE1B\",\"\\uD83D\\uDE2D\",\"\\uD83D\\uDE31\",\"\\uD83D\\uDE21\",\"\\uD83D\\uDE0E\",\"\\uD83D\\uDE34\",\r\n            \"\\uD83D\\uDE35\",\"\\uD83D\\uDE08\",\"\\uD83D\\uDE2C\",\"\\uD83D\\uDE07\",\"\\uD83D\\uDE0F\",\"\\uD83D\\uDC6E\",\"\\uD83D\\uDC77\",\"\\uD83D\\uDC82\",\"\\uD83D\\uDC76\",\"\\uD83D\\uDC68\",\r\n            \"\\uD83D\\uDC69\",\"\\uD83D\\uDC74\",\"\\uD83D\\uDC75\",\"\\uD83D\\uDE3B\",\"\\uD83D\\uDE3D\",\"\\uD83D\\uDE40\",\"\\uD83D\\uDC7A\",\"\\uD83D\\uDE48\",\"\\uD83D\\uDE49\",\"\\uD83D\\uDE4A\",\r\n            \"\\uD83D\\uDC80\",\"\\uD83D\\uDC7D\",\"\\uD83D\\uDCA9\",\"\\uD83D\\uDD25\",\"\\uD83D\\uDCA5\",\"\\uD83D\\uDCA4\",\"\\uD83D\\uDC42\",\"\\uD83D\\uDC40\",\"\\uD83D\\uDC43\",\"\\uD83D\\uDC45\",\r\n            \"\\uD83D\\uDC44\",\"\\uD83D\\uDC4D\",\"\\uD83D\\uDC4E\",\"\\uD83D\\uDC4C\",\"\\uD83D\\uDC4A\",\"✌\",\"✋\",\"\\uD83D\\uDC50\",\"\\uD83D\\uDC46\",\"\\uD83D\\uDC47\",\"\\uD83D\\uDC49\",\r\n            \"\\uD83D\\uDC48\",\"\\uD83D\\uDE4F\",\"\\uD83D\\uDC4F\",\"\\uD83D\\uDCAA\",\"\\uD83D\\uDEB6\",\"\\uD83C\\uDFC3\",\"\\uD83D\\uDC83\",\"\\uD83D\\uDC6B\",\"\\uD83D\\uDC6A\",\"\\uD83D\\uDC6C\",\r\n            \"\\uD83D\\uDC6D\",\"\\uD83D\\uDC85\",\"\\uD83C\\uDFA9\",\"\\uD83D\\uDC51\",\"\\uD83D\\uDC52\",\"\\uD83D\\uDC5F\",\"\\uD83D\\uDC5E\",\"\\uD83D\\uDC60\",\"\\uD83D\\uDC55\",\"\\uD83D\\uDC57\",\r\n            \"\\uD83D\\uDC56\",\"\\uD83D\\uDC59\",\"\\uD83D\\uDC5C\",\"\\uD83D\\uDC53\",\"\\uD83C\\uDF80\",\"\\uD83D\\uDC84\",\"\\uD83D\\uDC9B\",\"\\uD83D\\uDC99\",\"\\uD83D\\uDC9C\",\"\\uD83D\\uDC9A\",\r\n            \"\\uD83D\\uDC8D\",\"\\uD83D\\uDC8E\",\"\\uD83D\\uDC36\",\"\\uD83D\\uDC3A\",\"\\uD83D\\uDC31\",\"\\uD83D\\uDC2D\",\"\\uD83D\\uDC39\",\"\\uD83D\\uDC30\",\"\\uD83D\\uDC38\",\"\\uD83D\\uDC2F\",\r\n            \"\\uD83D\\uDC28\",\"\\uD83D\\uDC3B\",\"\\uD83D\\uDC37\",\"\\uD83D\\uDC2E\",\"\\uD83D\\uDC17\",\"\\uD83D\\uDC34\",\"\\uD83D\\uDC11\",\"\\uD83D\\uDC18\",\"\\uD83D\\uDC3C\",\"\\uD83D\\uDC27\",\r\n            \"\\uD83D\\uDC25\",\"\\uD83D\\uDC14\",\"\\uD83D\\uDC0D\",\"\\uD83D\\uDC22\",\"\\uD83D\\uDC1B\",\"\\uD83D\\uDC1D\",\"\\uD83D\\uDC1C\",\"\\uD83D\\uDC1E\",\"\\uD83D\\uDC0C\",\"\\uD83D\\uDC19\",\r\n            \"\\uD83D\\uDC1A\",\"\\uD83D\\uDC1F\",\"\\uD83D\\uDC2C\",\"\\uD83D\\uDC0B\",\"\\uD83D\\uDC10\",\"\\uD83D\\uDC0A\",\"\\uD83D\\uDC2B\",\"\\uD83C\\uDF40\",\"\\uD83C\\uDF39\",\"\\uD83C\\uDF3B\",\r\n            \"\\uD83C\\uDF41\",\"\\uD83C\\uDF3E\",\"\\uD83C\\uDF44\",\"\\uD83C\\uDF35\",\"\\uD83C\\uDF34\",\"\\uD83C\\uDF33\",\"\\uD83C\\uDF1E\",\"\\uD83C\\uDF1A\",\"\\uD83C\\uDF19\",\"\\uD83C\\uDF0E\",\r\n            \"\\uD83C\\uDF0B\",\"⚡\",\"☔\",\"❄\",\"⛄\",\"\\uD83C\\uDF00\",\"\\uD83C\\uDF08\",\"\\uD83C\\uDF0A\",\"\\uD83C\\uDF93\",\"\\uD83C\\uDF86\",\"\\uD83C\\uDF83\",\"\\uD83D\\uDC7B\",\"\\uD83C\\uDF85\",\r\n            \"\\uD83C\\uDF84\",\"\\uD83C\\uDF81\",\"\\uD83C\\uDF88\",\"\\uD83D\\uDD2E\",\"\\uD83C\\uDFA5\",\"\\uD83D\\uDCF7\",\"\\uD83D\\uDCBF\",\"\\uD83D\\uDCBB\",\"☎\",\"\\uD83D\\uDCE1\",\"\\uD83D\\uDCFA\",\r\n            \"\\uD83D\\uDCFB\",\"\\uD83D\\uDD09\",\"\\uD83D\\uDD14\",\"⏳\",\"⏰\",\"⌚\",\"\\uD83D\\uDD12\",\"\\uD83D\\uDD11\",\"\\uD83D\\uDD0E\",\"\\uD83D\\uDCA1\",\"\\uD83D\\uDD26\",\"\\uD83D\\uDD0C\",\r\n            \"\\uD83D\\uDD0B\",\"\\uD83D\\uDEBF\",\"\\uD83D\\uDEBD\",\"\\uD83D\\uDD27\",\"\\uD83D\\uDD28\",\"\\uD83D\\uDEAA\",\"\\uD83D\\uDEAC\",\"\\uD83D\\uDCA3\",\"\\uD83D\\uDD2B\",\"\\uD83D\\uDD2A\",\r\n            \"\\uD83D\\uDC8A\",\"\\uD83D\\uDC89\",\"\\uD83D\\uDCB0\",\"\\uD83D\\uDCB5\",\"\\uD83D\\uDCB3\",\"✉\",\"\\uD83D\\uDCEB\",\"\\uD83D\\uDCE6\",\"\\uD83D\\uDCC5\",\"\\uD83D\\uDCC1\",\"✂\",\"\\uD83D\\uDCCC\",\r\n            \"\\uD83D\\uDCCE\",\"✒\",\"✏\",\"\\uD83D\\uDCD0\",\"\\uD83D\\uDCDA\",\"\\uD83D\\uDD2C\",\"\\uD83D\\uDD2D\",\"\\uD83C\\uDFA8\",\"\\uD83C\\uDFAC\",\"\\uD83C\\uDFA4\",\"\\uD83C\\uDFA7\",\"\\uD83C\\uDFB5\",\r\n            \"\\uD83C\\uDFB9\",\"\\uD83C\\uDFBB\",\"\\uD83C\\uDFBA\",\"\\uD83C\\uDFB8\",\"\\uD83D\\uDC7E\",\"\\uD83C\\uDFAE\",\"\\uD83C\\uDCCF\",\"\\uD83C\\uDFB2\",\"\\uD83C\\uDFAF\",\"\\uD83C\\uDFC8\",\r\n            \"\\uD83C\\uDFC0\",\"⚽\",\"⚾\",\"\\uD83C\\uDFBE\",\"\\uD83C\\uDFB1\",\"\\uD83C\\uDFC9\",\"\\uD83C\\uDFB3\",\"\\uD83C\\uDFC1\",\"\\uD83C\\uDFC7\",\"\\uD83C\\uDFC6\",\"\\uD83C\\uDFCA\",\"\\uD83C\\uDFC4\",\r\n            \"☕\",\"\\uD83C\\uDF7C\",\"\\uD83C\\uDF7A\",\"\\uD83C\\uDF77\",\"\\uD83C\\uDF74\",\"\\uD83C\\uDF55\",\"\\uD83C\\uDF54\",\"\\uD83C\\uDF5F\",\"\\uD83C\\uDF57\",\"\\uD83C\\uDF71\",\"\\uD83C\\uDF5A\",\r\n            \"\\uD83C\\uDF5C\",\"\\uD83C\\uDF61\",\"\\uD83C\\uDF73\",\"\\uD83C\\uDF5E\",\"\\uD83C\\uDF69\",\"\\uD83C\\uDF66\",\"\\uD83C\\uDF82\",\"\\uD83C\\uDF70\",\"\\uD83C\\uDF6A\",\"\\uD83C\\uDF6B\",\r\n            \"\\uD83C\\uDF6D\",\"\\uD83C\\uDF6F\",\"\\uD83C\\uDF4E\",\"\\uD83C\\uDF4F\",\"\\uD83C\\uDF4A\",\"\\uD83C\\uDF4B\",\"\\uD83C\\uDF52\",\"\\uD83C\\uDF47\",\"\\uD83C\\uDF49\",\"\\uD83C\\uDF53\",\r\n            \"\\uD83C\\uDF51\",\"\\uD83C\\uDF4C\",\"\\uD83C\\uDF50\",\"\\uD83C\\uDF4D\",\"\\uD83C\\uDF46\",\"\\uD83C\\uDF45\",\"\\uD83C\\uDF3D\",\"\\uD83C\\uDFE1\",\"\\uD83C\\uDFE5\",\"\\uD83C\\uDFE6\",\r\n            \"⛪\",\"\\uD83C\\uDFF0\",\"⛺\",\"\\uD83C\\uDFED\",\"\\uD83D\\uDDFB\",\"\\uD83D\\uDDFD\",\"\\uD83C\\uDFA0\",\"\\uD83C\\uDFA1\",\"⛲\",\"\\uD83C\\uDFA2\",\"\\uD83D\\uDEA2\",\"\\uD83D\\uDEA4\",\r\n            \"⚓\",\"\\uD83D\\uDE80\",\"✈\",\"\\uD83D\\uDE81\",\"\\uD83D\\uDE82\",\"\\uD83D\\uDE8B\",\"\\uD83D\\uDE8E\",\"\\uD83D\\uDE8C\",\"\\uD83D\\uDE99\",\"\\uD83D\\uDE97\",\"\\uD83D\\uDE95\",\"\\uD83D\\uDE9B\",\r\n            \"\\uD83D\\uDEA8\",\"\\uD83D\\uDE94\",\"\\uD83D\\uDE92\",\"\\uD83D\\uDE91\",\"\\uD83D\\uDEB2\",\"\\uD83D\\uDEA0\",\"\\uD83D\\uDE9C\",\"\\uD83D\\uDEA6\",\"⚠\",\"\\uD83D\\uDEA7\",\"⛽\",\"\\uD83C\\uDFB0\",\r\n            \"\\uD83D\\uDDFF\",\"\\uD83C\\uDFAA\",\"\\uD83C\\uDFAD\",\"\\uD83C\\uDDEF\\uD83C\\uDDF5\",\"\\uD83C\\uDDF0\\uD83C\\uDDF7\",\"\\uD83C\\uDDE9\\uD83C\\uDDEA\",\"\\uD83C\\uDDE8\\uD83C\\uDDF3\",\r\n            \"\\uD83C\\uDDFA\\uD83C\\uDDF8\",\"\\uD83C\\uDDEB\\uD83C\\uDDF7\",\"\\uD83C\\uDDEA\\uD83C\\uDDF8\",\"\\uD83C\\uDDEE\\uD83C\\uDDF9\",\"\\uD83C\\uDDF7\\uD83C\\uDDFA\",\"\\uD83C\\uDDEC\\uD83C\\uDDE7\",\r\n            \"1⃣\",\"2⃣\",\"3⃣\",\"4⃣\",\"5⃣\",\"6⃣\",\"7⃣\",\"8⃣\",\"9⃣\",\"0⃣\",\"\\uD83D\\uDD1F\",\"❗\",\"❓\",\"♥\",\"♦\",\"\\uD83D\\uDCAF\",\"\\uD83D\\uDD17\",\"\\uD83D\\uDD31\",\"\\uD83D\\uDD34\",\r\n            \"\\uD83D\\uDD35\",\"\\uD83D\\uDD36\",\"\\uD83D\\uDD37\"\r\n        };\r\n\r\n        private static readonly int[] _offsets = { 0, 4, 8, 12, 16 };\r\n\r\n        private static int BytesToInt(byte[] arr, int offset)\r\n        {\r\n            return (((int)arr[offset] & 0x7F) << 24) | (((int)arr[offset + 1] & 0xFF) << 16) | (((int)arr[offset + 2] & 0xFF) << 8) | ((int)arr[offset + 3] & 0xFF);\r\n        }\r\n\r\n        private static long BytesToLong(byte[] arr, int offset)\r\n        {\r\n            return (((long)arr[offset] & 0x7F) << 56) | (((long)arr[offset + 1] & 0xFF) << 48) | (((long)arr[offset + 2] & 0xFF) << 40) | (((long)arr[offset + 3] & 0xFF) << 32) |\r\n            (((long)arr[offset + 4] & 0xFF) << 24) | (((long)arr[offset + 5] & 0xFF) << 16) | (((long)arr[offset + 6] & 0xFF) << 8) | (((long)arr[offset + 7] & 0xFF));\r\n\r\n        }\r\n\r\n        public static String[] Emojify(byte[] sha256)\r\n        {\r\n            if (sha256.Length != 32)\r\n            {\r\n                throw new ArgumentException(\"sha256 needs to be exactly 32 bytes\", \"sha256\");\r\n            }\r\n\r\n            var result = new string[5];\r\n            for (int i = 0; i < 5; i++)\r\n            {\r\n                result[i] = _emojis[BytesToInt(sha256, _offsets[i]) % _emojis.Length];\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public static String[] EmojifyForCall(byte[] sha256)\r\n        {\r\n            var result = new string[4];\r\n            for (int i = 0; i < 4; i++)\r\n            {\r\n                result[i] = _emojis[(int)(BytesToLong(sha256, 8 * i) % _emojis.Length)];\r\n            }\r\n\r\n            return result;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Services/WNSPushService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Services\r\n{\r\n    /*public class WNSPushService : PushServiceBase\r\n    {\r\n        protected override string GetPushChannelUri()\r\n        {\r\n            return _pushChannel != null ? _pushChannel.Uri : null;\r\n        }\r\n\r\n        private PushNotificationChannel _pushChannel;\r\n\r\n        public WNSPushService(IMTProtoService service) : base(service)\r\n        {\r\n            LoadOrCreateChannelAsync();\r\n        }\r\n\r\n        private void LoadOrCreateChannelAsync(Action callback = null)\r\n        {\r\n            Execute.BeginOnThreadPool(async () =>\r\n            {\r\n                _pushChannel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();\r\n                \r\n                //var hub = new NotificationHub(\"WNS\" + Constants.ToastNotificationChannelName, \r\n                //    \"Endpoint=sb://testdemopushhub-ns.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=z2Sj7sgwGpkvTyE/H5QyiffCpwCjV/PmJBY1h4WhXac=\");\r\n\r\n                //var result = await hub.RegisterNativeAsync(_pushChannel.Uri);\r\n\r\n                //if (result.RegistrationId != null)\r\n                //{\r\n                //    Execute.ShowDebugMessage(\"Registration successful: \" + result.RegistrationId);\r\n                //}\r\n\r\n                callback.SafeInvoke();\r\n            });\r\n        }\r\n\r\n\r\n        public override void RegisterDeviceAsync()\r\n        {\r\n            \r\n        }\r\n\r\n        public override void UnregisterDeviceAsync(Action callback)\r\n        {\r\n            \r\n        }\r\n    }*/\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Services/WindowsPhoneStoreUpdateService.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Net;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Xml;\r\nusing Windows.System;\r\nusing TelegramClient.Converters;\r\n\r\nnamespace TelegramClient.Services\r\n{\r\n    public class WindowsPhoneStoreUpdateService : IWindowsPhoneStoreUpdateService\r\n    {\r\n\r\n        private string GetManifestAttributeValue(string attributeName)\r\n        {\r\n            var xmlReaderSettings = new XmlReaderSettings\r\n            {\r\n                XmlResolver = new XmlXapResolver()\r\n            };\r\n\r\n            using (var xmlReader = XmlReader.Create(\"WMAppManifest.xml\", xmlReaderSettings))\r\n            {\r\n                xmlReader.ReadToDescendant(\"App\");\r\n\r\n                return xmlReader.GetAttribute(attributeName);\r\n            }\r\n        }\r\n\r\n        public void LaunchAppUpdateAsync()\r\n        {\r\n            Launcher.LaunchUriAsync(PrivateBetaIdentityToVisibilityConverter.IsPrivateBeta\r\n                ? new Uri(Constants.PreviewUpdateUri)\r\n                : new Uri(Constants.UpdateUri));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks the Windows Phone Store to see if a newer version of the app is available\r\n        /// If it is, a dialog is shown\r\n        /// </summary>\r\n        /// <param name=\"updateDialogText\">Dialog text</param>\r\n        /// <param name=\"updateDialogTitle\">Dialog title</param>\r\n        public void CheckForUpdatedVersion(string updateDialogText, string updateDialogTitle)\r\n        {\r\n            Windows.System.Launcher.LaunchUriAsync(new Uri(\"ms-windows-store://pdp/?productid=9WZDNCRDZHS0\"));\r\n            return;\r\n            Windows.System.Launcher.LaunchUriAsync(new Uri(\"ms-windows-store:navigate?appid=0872b696-d84b-4279-8627-7ed8b15bf4f0\"));\r\n            return;\r\n            var cultureInfoName = CultureInfo.CurrentUICulture.Name;\r\n\r\n            var url =\r\n                string.Format(\r\n                    \"http://marketplaceedgeservice.windowsphone.com/v8/catalog/apps/{0}?os={1}&cc={2}&oc=&lang={3}​\",\r\n                    \"0872b696-d84b-4279-8627-7ed8b15bf4f0\",//GetManifestAttributeValue(\"ProductID\"),\r\n                    Environment.OSVersion.Version,\r\n                    cultureInfoName.Substring(cultureInfoName.Length - 2).ToUpperInvariant(),\r\n                    cultureInfoName);\r\n\r\n            var wc = new WebClient();\r\n            wc.DownloadStringCompleted += (s, e) =>\r\n            {\r\n                if (e.Error != null) return;\r\n                var content = e.Result;\r\n\r\n                try\r\n                {\r\n                    using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(content)))\r\n                    {\r\n                        using (var reader = XmlReader.Create(ms))\r\n                        {\r\n                            reader.MoveToContent();\r\n\r\n                            var aNamespace = reader.LookupNamespace(\"a\");\r\n                            reader.ReadToFollowing(\"entry\", aNamespace);\r\n                            reader.ReadToDescendant(\"version\");\r\n\r\n                            var updatedVersion = new Version(reader.ReadElementContentAsString());\r\n                            var currentVersion = new Version(GetManifestAttributeValue(\"Version\"));\r\n                            if (updatedVersion > currentVersion\r\n                    &&\r\n                    MessageBox.Show(updateDialogText, updateDialogTitle, MessageBoxButton.OKCancel) ==\r\n                    MessageBoxResult.OK)\r\n                            {\r\n                                Windows.System.Launcher.LaunchUriAsync(new Uri(\"ms-windows-store:navigate?appid=0872b696-d84b-4279-8627-7ed8b15bf4f0\"));\r\n                                //WebBrowserTask task = new WebBrowserTask();\r\n                                //task.URL = \"http://windowsphone.com/s?appid=0872b696-d84b-4279-8627-7ed8b15bf4f0\";\r\n                                //task.Show();\r\n                                //new MarketplaceDetailTask().Show();\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch\r\n                {\r\n\r\n                }\r\n            };\r\n            wc.DownloadStringAsync(new Uri(url));\r\n\r\n\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/TelegramClient.WP81.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>10.0.20506</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}</ProjectGuid>\r\n    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>\r\n    <OutputType>Library</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>TelegramClient</RootNamespace>\r\n    <AssemblyName>TelegramClient.WP8</AssemblyName>\r\n    <TargetFrameworkVersion>v8.1</TargetFrameworkVersion>\r\n    <SilverlightVersion>\r\n    </SilverlightVersion>\r\n    <TargetFrameworkProfile>\r\n    </TargetFrameworkProfile>\r\n    <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>\r\n    <SilverlightApplication>true</SilverlightApplication>\r\n    <SupportedCultures>ru%3bde%3bes%3bpt%3bnl%3bit</SupportedCultures>\r\n    <XapOutputs>true</XapOutputs>\r\n    <GenerateSilverlightManifest>true</GenerateSilverlightManifest>\r\n    <XapFilename>Telegram_3.2.0.0_wp8.1.xap</XapFilename>\r\n    <SilverlightManifestTemplate>Properties\\AppManifest.xml</SilverlightManifestTemplate>\r\n    <SilverlightAppEntry>TelegramClient.App</SilverlightAppEntry>\r\n    <ValidateXaml>true</ValidateXaml>\r\n    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\r\n    <RestorePackages>true</RestorePackages>\r\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\r\n    <DefaultLanguage>en</DefaultLanguage>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>Bin\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <Prefer32Bit>false</Prefer32Bit>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>Bin\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <NoConfig>true</NoConfig>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <Prefer32Bit>false</Prefer32Bit>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x86'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>Bin\\x86\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>\r\n    </PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n    <Optimize>false</Optimize>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x86'\">\r\n    <OutputPath>Bin\\x86\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>\r\n    </PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|ARM'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>Bin\\ARM\\Debug</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>\r\n    </PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n    <Optimize>false</Optimize>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|ARM'\">\r\n    <OutputPath>Bin\\ARM\\Release</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>\r\n    </PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug Private Beta|AnyCPU'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\Debug Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;PRIVATE_BETA;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug Private Beta|x86'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\x86\\Debug Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;PRIVATE_BETA;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug Private Beta|ARM'\">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <OutputPath>bin\\ARM\\Debug Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;PRIVATE_BETA;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>full</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release Private Beta|AnyCPU'\">\r\n    <OutputPath>bin\\Release Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;PRIVATE_BETA;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release Private Beta|x86'\">\r\n    <OutputPath>bin\\x86\\Release Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;PRIVATE_BETA;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release Private Beta|ARM'\">\r\n    <OutputPath>bin\\ARM\\Release Private Beta\\</OutputPath>\r\n    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8;WP81;PRIVATE_BETA;LOG_REGISTRATION;MULTIPLE_PHOTOS</DefineConstants>\r\n    <Optimize>true</Optimize>\r\n    <NoStdLib>true</NoStdLib>\r\n    <DebugType>pdbonly</DebugType>\r\n    <PlatformTarget>AnyCPU</PlatformTarget>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"BugSense\">\r\n      <HintPath>..\\Libraries\\BugSense.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Caliburn.Micro, Version=3.0.3.0, Culture=neutral, PublicKeyToken=8e5891231f2ed21f, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\Caliburn.Micro.Core.3.0.3\\lib\\portable-net45+win8+wp8+wpa81+MonoAndroid10+Xamarin.iOS10+MonoTouch10+uap10.0\\Caliburn.Micro.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Caliburn.Micro.Platform\">\r\n      <HintPath>..\\packages\\Caliburn.Micro.3.0.3\\lib\\wp8\\Caliburn.Micro.Platform.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Caliburn.Micro.Platform.Core\">\r\n      <HintPath>..\\packages\\Caliburn.Micro.3.0.3\\lib\\wp8\\Caliburn.Micro.Platform.Core.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Coding4Fun.Toolkit.Controls\">\r\n      <HintPath>..\\packages\\Coding4Fun.Toolkit.Controls.2.0.7\\lib\\wp71\\Coding4Fun.Toolkit.Controls.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"crypto, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\Portable.BouncyCastle.1.7.0.2\\lib\\portable-net4+sl5+wp8+win8+wpa81+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10\\crypto.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Id3\">\r\n      <HintPath>..\\packages\\ID3.0.3.0\\lib\\sl4-wp71\\Id3.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.Controls\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.Controls.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"ImageTools.IO.Gif\">\r\n      <HintPath>..\\packages\\ImageTools.0.3.1\\lib\\sl3-wp\\ImageTools.IO.Gif.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"Microsoft.Expression.Interactions, Version=3.9.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls.Maps, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL\" />\r\n    <Reference Include=\"Microsoft.Phone.Controls.Toolkit, Version=8.0.1.0, Culture=neutral, PublicKeyToken=b772ad94eb9ca604, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\packages\\WPtoolkit.4.2013.08.16\\lib\\wp8\\Microsoft.Phone.Controls.Toolkit.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\r\n      <HintPath>..\\packages\\Microsoft.Net.Http.2.2.29\\lib\\sl4-windowsphone71\\System.Net.Http.dll</HintPath>\r\n      <Private>True</Private>\r\n    </Reference>\r\n    <Reference Include=\"System.Net.Http.Extensions, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\r\n      <HintPath>..\\packages\\Microsoft.Net.Http.2.2.29\\lib\\sl4-windowsphone71\\System.Net.Http.Extensions.dll</HintPath>\r\n      <Private>True</Private>\r\n    </Reference>\r\n    <Reference Include=\"System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\r\n      <HintPath>..\\packages\\Microsoft.Net.Http.2.2.29\\lib\\sl4-windowsphone71\\System.Net.Http.Primitives.dll</HintPath>\r\n      <Private>True</Private>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Core\">\r\n      <HintPath>..\\packages\\Rx-Core.2.2.2\\lib\\windowsphone71\\System.Reactive.Core.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Interfaces\">\r\n      <HintPath>..\\packages\\Rx-Interfaces.2.2.2\\lib\\windowsphone71\\System.Reactive.Interfaces.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Linq\">\r\n      <HintPath>..\\packages\\Rx-Linq.2.2.2\\lib\\windowsphone71\\System.Reactive.Linq.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Reactive.Windows.Threading\">\r\n      <HintPath>..\\packages\\Rx-XAML.2.2.2\\lib\\windowsphone71\\System.Reactive.Windows.Threading.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System.Windows.Interactivity, Version=3.9.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\LongListSelectorEx.cs\">\r\n      <Link>LongListSelectorEx.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\ViewModels\\Dialogs\\DialogDetailsViewModel.Audio.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Audio.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\ViewModels\\Dialogs\\DialogsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Audio.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Audio.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\ViewModels\\Media\\MultiImageEditorViewModel.cs\">\r\n      <Link>ViewModels\\Media\\MultiImageEditorViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\Views\\Contacts\\ContactsView.xaml.cs\">\r\n      <Link>Views\\Contacts\\ContactsView.xaml.cs</Link>\r\n      <DependentUpon>ContactsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\Views\\Controls\\AudioRecorderControl.xaml.cs\">\r\n      <Link>Views\\Controls\\AudioRecorderControl.xaml.cs</Link>\r\n      <DependentUpon>AudioRecorderControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\Views\\Dialogs\\DialogDetailsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\DialogDetailsView.xaml.cs</Link>\r\n      <DependentUpon>DialogDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\Views\\Dialogs\\DialogsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\DialogsView.xaml.cs</Link>\r\n      <DependentUpon>DialogsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\Views\\Dialogs\\SecretDialogDetailsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\SecretDialogDetailsView.xaml.cs</Link>\r\n      <DependentUpon>SecretDialogDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\Views\\Media\\FilesView.xaml.cs\">\r\n      <Link>Views\\Media\\FilesView.xaml.cs</Link>\r\n      <DependentUpon>FilesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\Views\\Media\\LinksView.xaml.cs\">\r\n      <Link>Views\\Media\\LinksView.xaml.cs</Link>\r\n      <DependentUpon>LinksView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\Views\\Media\\MediaView.xaml.cs\">\r\n      <Link>Views\\Media\\MediaView.xaml.cs</Link>\r\n      <DependentUpon>MediaView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient.WP8\\Views\\Media\\MultiImageEditorView.xaml.cs\">\r\n      <Link>Views\\Media\\MultiImageEditorView.xaml.cs</Link>\r\n      <DependentUpon>MultiImageEditorView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Analytics\\AnalyticsProperties.cs\">\r\n      <Link>Analytics\\AnalyticsProperties.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Analytics\\AnalyticsService.cs\">\r\n      <Link>Analytics\\AnalyticsService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Analytics\\AnalyticsTracker.cs\">\r\n      <Link>Analytics\\AnalyticsTracker.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Analytics\\ReviewRequester.cs\">\r\n      <Link>Analytics\\ReviewRequester.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\LinqToVisualTree.cs\">\r\n      <Link>Animation\\LinqToVisualTree.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\MetroInMotion.cs\">\r\n      <Link>Animation\\MetroInMotion.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\AnimatedBasePage.cs\">\r\n      <Link>Animation\\Navigation\\AnimatedBasePage.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\AnimatorHelperBase.cs\">\r\n      <Link>Animation\\Navigation\\AnimatorHelperBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\ContinuumAnimator.cs\">\r\n      <Link>Animation\\Navigation\\ContinuumAnimator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\SlideAnimator.cs\">\r\n      <Link>Animation\\Navigation\\SlideAnimator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\Storyboards.cs\">\r\n      <Link>Animation\\Navigation\\Storyboards.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\SwivelAnimator.cs\">\r\n      <Link>Animation\\Navigation\\SwivelAnimator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\TurnstileAnimator.cs\">\r\n      <Link>Animation\\Navigation\\TurnstileAnimator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Animation\\Navigation\\TurnstileFeatherAnimator.cs\">\r\n      <Link>Animation\\Navigation\\TurnstileFeatherAnimator.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\App.xaml.cs\">\r\n      <Link>App.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\MarkTapAsHandledBehavior.cs\">\r\n      <Link>Behaviors\\MarkTapAsHandledBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\PanAndZoomBehavior.cs\">\r\n      <Link>Behaviors\\PanAndZoomBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\ProgressBarSmoother.cs\">\r\n      <Link>Behaviors\\ProgressBarSmoother.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\SelectionBehavior.cs\">\r\n      <Link>Behaviors\\SelectionBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\ThemeToStateBehavior.cs\">\r\n      <Link>Behaviors\\ThemeToStateBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\ToggleSwitchLocalizedContentBehavior.cs\">\r\n      <Link>Behaviors\\ToggleSwitchLocalizedContentBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Behaviors\\UpdateTextBindingBehavior.cs\">\r\n      <Link>Behaviors\\UpdateTextBindingBehavior.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Bootstrapper.cs\">\r\n      <Link>Bootstrapper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\CapabilityPlaceholder.cs\">\r\n      <Link>CapabilityPlaceholder.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Commands.cs\">\r\n      <Link>Commands.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Constants.cs\">\r\n      <Link>Constants.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\BrowserNavigationService.cs\">\r\n      <Link>Controls\\BrowserNavigationService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramNavigationInTransition.cs\">\r\n      <Link>Controls\\TelegramNavigationInTransition.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramNavigationOutTransition.cs\">\r\n      <Link>Controls\\TelegramNavigationOutTransition.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramNavigationTransition.cs\">\r\n      <Link>Controls\\TelegramNavigationTransition.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramRichTextBox.cs\">\r\n      <Link>Controls\\TelegramRichTextBox.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramTransitionFrame.cs\">\r\n      <Link>Controls\\TelegramTransitionFrame.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramTransitionService.cs\">\r\n      <Link>Controls\\TelegramTransitionService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TelegramTurnstileTransition.cs\">\r\n      <Link>Controls\\TelegramTurnstileTransition.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TestScrollableTextBlock.cs\">\r\n      <Link>Controls\\TestScrollableTextBlock.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Controls\\TransitionFrame.cs\">\r\n      <Link>Controls\\TransitionFrame.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\BackgroundImageConverter.cs\">\r\n      <Link>Converters\\BackgroundImageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\BooleanToValueConverter.cs\">\r\n      <Link>Converters\\BooleanToValueConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\BooleanToVisibilityConverter.cs\">\r\n      <Link>Converters\\BooleanToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ChatForbiddenToVisibilityConverter.cs\">\r\n      <Link>Converters\\ChatForbiddenToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ChatToMaxHeight.cs\">\r\n      <Link>Converters\\ChatToMaxHeight.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ChatToVisibilityConverter.cs\">\r\n      <Link>Converters\\ChatToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\CountToVisibilityConverter.cs\">\r\n      <Link>Converters\\CountToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DebugVisibilityConverter.cs\">\r\n      <Link>Converters\\DebugVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DefaultPhotoConverter.cs\">\r\n      <Link>Converters\\DefaultPhotoConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DialogCaptionConverter.cs\">\r\n      <Link>Converters\\DialogCaptionConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DialogDetailsBackgroundConverter.cs\">\r\n      <Link>Converters\\DialogDetailsBackgroundConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DialogMessageFromConverter.cs\">\r\n      <Link>Converters\\DialogMessageFromConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\DistanceAwayConverter.cs\">\r\n      <Link>Converters\\DistanceAwayConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\EmptyDialogMessageConverter.cs\">\r\n      <Link>Converters\\EmptyDialogMessageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\EmptyPhotoToVisibilityConverter.cs\">\r\n      <Link>Converters\\EmptyPhotoToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\EmptyStringToVisibilityConverter.cs\">\r\n      <Link>Converters\\EmptyStringToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ExistsToVisibilityConverter.cs\">\r\n      <Link>Converters\\ExistsToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ExtendedImageConverter.cs\">\r\n      <Link>Converters\\ExtendedImageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\FileExtToColorConverter.cs\">\r\n      <Link>Converters\\FileExtToColorConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\FileNameConverter.cs\">\r\n      <Link>Converters\\FileNameConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\FileSizeConverter.cs\">\r\n      <Link>Converters\\FileSizeConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ForwardedMessageConverter.cs\">\r\n      <Link>Converters\\ForwardedMessageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\GeoLocationToVisibilityConverter.cs\">\r\n      <Link>Converters\\GeoLocationToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\GeoPointToStaticGoogleMapsConverter.cs\">\r\n      <Link>Converters\\GeoPointToStaticGoogleMapsConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\GroupToBackgroundBrushValueConverter.cs\">\r\n      <Link>Converters\\GroupToBackgroundBrushValueConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\GroupToForegroundBrushValueConverter.cs\">\r\n      <Link>Converters\\GroupToForegroundBrushValueConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\IdToPlaceholderBackgroundConverter.cs\">\r\n      <Link>Converters\\IdToPlaceholderBackgroundConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\IntToVisibilityConverter.cs\">\r\n      <Link>Converters\\IntToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\InvertBooleanConverter.cs\">\r\n      <Link>Converters\\InvertBooleanConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\IsSelectedToBackgroundConverter.cs\">\r\n      <Link>Converters\\IsSelectedToBackgroundConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\LowercaseConverter.cs\">\r\n      <Link>Converters\\LowercaseConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MaskConverter.cs\">\r\n      <Link>Converters\\MaskConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MediaContactToPhotoConverter.cs\">\r\n      <Link>Converters\\MediaContactToPhotoConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MediaEmptyToVisibilityConverter.cs\">\r\n      <Link>Converters\\MediaEmptyToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MediaSizeConverter.cs\">\r\n      <Link>Converters\\MediaSizeConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MergeBrushesConverter.cs\">\r\n      <Link>Converters\\MergeBrushesConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MessageStateToForegroundConverter.cs\">\r\n      <Link>Converters\\MessageStateToForegroundConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MessageStatusConverter.cs\">\r\n      <Link>Converters\\MessageStatusConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MessageToBriefInfoConverter.cs\">\r\n      <Link>Converters\\MessageToBriefInfoConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MessageToFontFamilyConverter.cs\">\r\n      <Link>Converters\\MessageToFontFamilyConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\MuteUntilToStringConverter.cs\">\r\n      <Link>Converters\\MuteUntilToStringConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\NotifySettingsToVisibilityConverter.cs\">\r\n      <Link>Converters\\NotifySettingsToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\NotServiceMessageToVisibilityConverter.cs\">\r\n      <Link>Converters\\NotServiceMessageToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\OverlayAccentBrushConverter.cs\">\r\n      <Link>Converters\\OverlayAccentBrushConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PhoneNumberConverter.cs\">\r\n      <Link>Converters\\PhoneNumberConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PhotoBytesToImageConverter.cs\">\r\n      <Link>Converters\\PhotoBytesToImageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PhotoToDimensionConverter.cs\">\r\n      <Link>Converters\\PhotoToDimensionConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PhotoToThumbConverter.cs\">\r\n      <Link>Converters\\PhotoToThumbConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PlaceholderDefaultImageConverter.cs\">\r\n      <Link>Converters\\PlaceholderDefaultImageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\PrivateBetaToVisibilityConverter.cs\">\r\n      <Link>Converters\\PrivateBetaToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ProgressToVisibilityConverter.cs\">\r\n      <Link>Converters\\ProgressToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ReplyMarkupButtonVisibilityConverter.cs\">\r\n      <Link>Converters\\ReplyMarkupButtonVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\SecretChatsAvailabilityConverter.cs\">\r\n      <Link>Converters\\SecretChatsAvailabilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\SecretChatsForegroundConverter.cs\">\r\n      <Link>Converters\\SecretChatsForegroundConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\ServiceMessageToTextConverter.cs\">\r\n      <Link>Converters\\ServiceMessageToTextConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\StatusToImageConverter.cs\">\r\n      <Link>Converters\\StatusToImageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\StickerSetToCountStringConverter.cs\">\r\n      <Link>Converters\\StickerSetToCountStringConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\StringEqualsToVisibilityConverter.cs\">\r\n      <Link>Converters\\StringEqualsToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\StringFormatConverter.cs\">\r\n      <Link>Converters\\StringFormatConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\TestBindingConverter.cs\">\r\n      <Link>Converters\\TestBindingConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\TextMessageToVisibilityConverter.cs\">\r\n      <Link>Converters\\TextMessageToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\TextSizeToVisibilityConverter.cs\">\r\n      <Link>Converters\\TextSizeToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\TLIntToDateTimeConverter.cs\">\r\n      <Link>Converters\\TLIntToDateTimeConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UnreadCountToVisibilityConverter.cs\">\r\n      <Link>Converters\\UnreadCountToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UnreadMessageConverter.cs\">\r\n      <Link>Converters\\UnreadMessageConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UnregisteredUserIdToVisibilityConverter.cs\">\r\n      <Link>Converters\\UnregisteredUserIdToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UppercaseConverter.cs\">\r\n      <Link>Converters\\UppercaseConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UserStatusToBrushConverter.cs\">\r\n      <Link>Converters\\UserStatusToBrushConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UserStatusToStringConverter.cs\">\r\n      <Link>Converters\\UserStatusToStringConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UserStatusToVisibilityConverter.cs\">\r\n      <Link>Converters\\UserStatusToVisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\UserToActionStringConverter.cs\">\r\n      <Link>Converters\\UserToActionStringConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Converters\\WP8VisibilityConverter.cs\">\r\n      <Link>Converters\\WP8VisibilityConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml.cs\">\r\n      <Link>EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Emoji\\EmojiData.cs\">\r\n      <Link>EmojiPanel\\Controls\\Emoji\\EmojiData.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Emoji\\EmojiSpriteItem.cs\">\r\n      <Link>EmojiPanel\\Controls\\Emoji\\EmojiSpriteItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Emoji\\StickerSpriteItem.cs\">\r\n      <Link>EmojiPanel\\Controls\\Emoji\\StickerSpriteItem.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\DelayedExecutor.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\DelayedExecutor.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\Helpers.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\Helpers.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\MyListItemBase.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\MyListItemBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\MyVirtualizingPanel.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\MyVirtualizingPanel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\VirtSegment.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\VirtSegment.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Utilities\\VListItemBase.cs\">\r\n      <Link>EmojiPanel\\Controls\\Utilities\\VListItemBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\EventArgs\\UpdateChatTitleEventArgs.cs\">\r\n      <Link>EventArgs\\UpdateChatTitleEventArgs.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Extensions\\ApplicationExtensions.cs\">\r\n      <Link>Extensions\\ApplicationExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Extensions\\CollectionExtensions.cs\">\r\n      <Link>Extensions\\CollectionExtensions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\Clip.cs\">\r\n      <Link>Helpers\\Clip.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\CollectionHelper.cs\">\r\n      <Link>Helpers\\CollectionHelper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\ImageUtils.cs\">\r\n      <Link>Helpers\\ImageUtils.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\ItemsControlHelper.cs\">\r\n      <Link>Helpers\\ItemsControlHelper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\Property.cs\">\r\n      <Link>Helpers\\Property.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\DocumentTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\DocumentTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\EmptyDialogToDescriptionConverter.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\EmptyDialogToDescriptionConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\ItemsPanelTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\ItemsPanelTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\LocationTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\LocationTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\MediaTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\MediaTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\MessageTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\MessageTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Helpers\\TemplateSelectors\\SearchContactsTemplateSelector.cs\">\r\n      <Link>Helpers\\TemplateSelectors\\SearchContactsTemplateSelector.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\AlphaKeyGroup.cs\">\r\n      <Link>ViewModels\\Contacts\\AlphaKeyGroup.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\ContactsByLastName.cs\">\r\n      <Link>Models\\ContactsByLastName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\Country.cs\">\r\n      <Link>Models\\Country.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\InAppNotifications.cs\">\r\n      <Link>Models\\InAppNotifications.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\Settings.cs\">\r\n      <Link>Models\\Settings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\UsersByFirstName.cs\">\r\n      <Link>Models\\UsersByFirstName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Models\\UsersByLastName.cs\">\r\n      <Link>Models\\UsersByLastName.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.de.Designer.cs\">\r\n      <Link>Resources\\AppResources.de.Designer.cs</Link>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n      <DependentUpon>AppResources.de.resx</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.Designer.cs\">\r\n      <Link>Resources\\AppResources.Designer.cs</Link>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n      <DependentUpon>AppResources.resx</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.es.Designer.cs\">\r\n      <Link>Resources\\AppResources.es.Designer.cs</Link>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n      <DependentUpon>AppResources.es.resx</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.it.Designer.cs\">\r\n      <Link>Resources\\AppResources.it.Designer.cs</Link>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n      <DependentUpon>AppResources.it.resx</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.nl.Designer.cs\">\r\n      <Link>Resources\\AppResources.nl.Designer.cs</Link>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n      <DependentUpon>AppResources.nl.resx</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.pt.Designer.cs\">\r\n      <Link>Resources\\AppResources.pt.Designer.cs</Link>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n      <DependentUpon>AppResources.pt.resx</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\AppResources.ru.Designer.cs\">\r\n      <Link>Resources\\AppResources.ru.Designer.cs</Link>\r\n      <AutoGen>True</AutoGen>\r\n      <DesignTime>True</DesignTime>\r\n      <DependentUpon>AppResources.ru.resx</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\LocalizationConverter.cs\">\r\n      <Link>Resources\\LocalizationConverter.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Resources\\LocalizedStrings.cs\">\r\n      <Link>Resources\\LocalizedStrings.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\CommonErrorHandler.cs\">\r\n      <Link>Services\\CommonErrorHandler.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\HttpDocumentFileManager.cs\">\r\n      <Link>Services\\HttpDocumentFileManager.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\ICommonErrorHandler.cs\">\r\n      <Link>Services\\ICommonErrorHandler.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\IPushService.cs\">\r\n      <Link>Services\\IPushService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\IStateService.cs\">\r\n      <Link>Services\\IStateService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\IUploadService.cs\">\r\n      <Link>Services\\IUploadService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\PhoneInfoService.cs\">\r\n      <Link>Services\\PhoneInfoService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\PushService.cs\">\r\n      <Link>Services\\PushService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\PushServiceBase.cs\">\r\n      <Link>Services\\PushServiceBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\StateService.cs\">\r\n      <Link>Services\\StateService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Services\\UploadService.cs\">\r\n      <Link>Services\\UploadService.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Themes\\Default\\Templates\\Media.xaml.cs\">\r\n      <Link>Themes\\Default\\Templates\\Media.xaml.cs</Link>\r\n      <DependentUpon>Media.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Utils\\Color.cs\">\r\n      <Link>Utils\\Color.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Utils\\Language.cs\">\r\n      <Link>Utils\\Language.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Utils\\TelegramUriMapper.cs\">\r\n      <Link>Utils\\TelegramUriMapper.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\AboutViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\AboutViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\AccountSelfDestructsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\AccountSelfDestructsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\AddChatParticipantConfirmationViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\AddChatParticipantConfirmationViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\AllowUsersViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\AllowUsersViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ArchivedStickersViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ArchivedStickersViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\AskQuestionConfirmationViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\AskQuestionConfirmationViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\BlockedContactsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\BlockedContactsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\CacheViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\CacheViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChangePasscodeViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChangePasscodeViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChangePasswordEmailViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChangePasswordEmailViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChangePasswordHintViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChangePasswordHintViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChangePasswordViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChangePasswordViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChangePhoneNumberViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChangePhoneNumberViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChannelBlockedContactsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChannelBlockedContactsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChatInviteViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChatInviteViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChatSettingsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChatSettingsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChooseAttachmentViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChooseAttachmentViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChooseBackgroundViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChooseBackgroundViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChooseCountryViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChooseCountryViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChooseNotificationSpanViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChooseNotificationSpanViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ChooseTTLViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ChooseTTLViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ClearCacheSettingsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ClearCacheSettingsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EditCurrentUserViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EditCurrentUserViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EditPhoneNumberViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EditPhoneNumberViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EditUsernameViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EditUsernameViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EncryptionKeyViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EncryptionKeyViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EnterPasscodeViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EnterPasscodeViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\EnterPasswordViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\EnterPasswordViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\FeaturedStickersViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\FeaturedStickersViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\GroupsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\GroupsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\LastSeenViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\LastSeenViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\LockscreenViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\LockscreenViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\MasksViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\MasksViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\MassDeleteReportSpamViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\MassDeleteReportSpamViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\NotificationsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\NotificationsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\PasscodeViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\PasscodeViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\PasswordRecoveryViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\PasswordRecoveryViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\PasswordViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\PasswordViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\PrivacySecureViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\PrivacySecureViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\PrivacyStatementViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\PrivacyStatementViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\SecretChatsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\SecretChatsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\SelectMultipleUsersViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\SelectMultipleUsersViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\SessionsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\SessionsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\SettingsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\SettingsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\ShareViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\ShareViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\SnapshotsViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\SnapshotsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\SpecialThanksViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\SpecialThanksViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\StartupViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\StartupViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\StickersViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\StickersViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Additional\\WebViewModel.cs\">\r\n      <Link>ViewModels\\Additional\\WebViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Auth\\CancelConfirmResetViewModel.cs\">\r\n      <Link>ViewModels\\Auth\\CancelConfirmResetViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Auth\\ConfirmPasswordViewModel.cs\">\r\n      <Link>ViewModels\\Auth\\ConfirmPasswordViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Auth\\ConfirmViewModel.cs\">\r\n      <Link>ViewModels\\Auth\\ConfirmViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Auth\\ResetAccountViewModel.cs\">\r\n      <Link>ViewModels\\Auth\\ResetAccountViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Auth\\SignInViewModel.cs\">\r\n      <Link>ViewModels\\Auth\\SignInViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Auth\\SignUpViewModel.cs\">\r\n      <Link>ViewModels\\Auth\\SignUpViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\AddAdminsViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\AddAdminsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\AddChannelManagerViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\AddChannelManagerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\AddChatParticipantViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\AddChatParticipantViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\AddSecretChatParticipantViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\AddSecretChatParticipantViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\ChannelAdministratorsViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\ChannelAdministratorsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\ChannelIntroViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\ChannelIntroViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\ChannelMembersViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\ChannelMembersViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\Chat2ViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\Chat2ViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\ChatViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\ChatViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\ConvertToSupergroupViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\ConvertToSupergroupViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\EditChatViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\EditChatViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\EditGroupTypeViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\EditGroupTypeViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\GroupsInCommonViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\GroupsInCommonViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Chats\\InviteLinkViewModel.cs\">\r\n      <Link>ViewModels\\Chats\\InviteLinkViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\ContactInfoViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\ContactInfoViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\ContactsViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\ContactsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\ContactViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\ContactViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\EditContactViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\EditContactViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\SecretContactDetailsViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\SecretContactDetailsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\SecretContactViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\SecretContactViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Contacts\\ShareContactViewModel.cs\">\r\n      <Link>ViewModels\\Contacts\\ShareContactViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Debug\\DebugViewModel.cs\">\r\n      <Link>ViewModels\\Debug\\DebugViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Debug\\LogViewModel.cs\">\r\n      <Link>ViewModels\\Debug\\LogViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Debug\\LongPollViewModel.cs\">\r\n      <Link>ViewModels\\Debug\\LongPollViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Debug\\PerformanceViewModel.cs\">\r\n      <Link>ViewModels\\Debug\\PerformanceViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\ChooseDialogViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\ChooseDialogViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\ChooseParticipantsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\ChooseParticipantsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\CommandHintsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\CommandHintsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\CreateBroadcastViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\CreateBroadcastViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\CreateChannelStep1ViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\CreateChannelStep1ViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\CreateChannelStep2ViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\CreateChannelStep2ViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\CreateChannelStep3ViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\CreateChannelStep3ViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\CreateDialogViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\CreateDialogViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsMode.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsMode.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Actions.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Actions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Channel.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Channel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Contact.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Contact.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Document.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Document.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Edit.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Edit.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.GeoPoint.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.GeoPoint.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Handle.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Handle.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.InlineBots.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.InlineBots.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Mass.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Mass.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Media.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Media.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Photo.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Photo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Reply.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Reply.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Search.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Search.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogDetailsViewModel.Video.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogDetailsViewModel.Video.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogSearchMessagesViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogSearchMessagesViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\DialogsViewModel.Common.cs\">\r\n      <Link>ViewModels\\Dialogs\\DialogsViewModel.Common.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\FastDialogDetailsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\FastDialogDetailsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\HashtagHintsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\HashtagHintsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\InlineBotResultsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\InlineBotResultsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\MessageViewerViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\MessageViewerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\PinnedMessageViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\PinnedMessageViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretChatDebugViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretChatDebugViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Actions.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Actions.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Document.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Document.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.GeoPoint.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.GeoPoint.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Handle.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Handle.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.InlineBots.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.InlineBots.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Media.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Media.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Photo.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Photo.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Reply.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Reply.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Text.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Text.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Video.cs\">\r\n      <Link>ViewModels\\Dialogs\\SecretDialogDetailsViewModel.Video.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\StickerHintsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\StickerHintsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\UserActionViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\UserActionViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Dialogs\\UsernameHintsViewModel.cs\">\r\n      <Link>ViewModels\\Dialogs\\UsernameHintsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\ItemDetailsViewModelBase.cs\">\r\n      <Link>ViewModels\\ItemDetailsViewModelBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\ItemsViewModelBase.cs\">\r\n      <Link>ViewModels\\ItemsViewModelBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\AnimatedImageViewerViewModel.cs\">\r\n      <Link>ViewModels\\Media\\AnimatedImageViewerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\DecryptedImageViewerViewModel.cs\">\r\n      <Link>ViewModels\\Media\\DecryptedImageViewerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\FilesViewModel.cs\">\r\n      <Link>ViewModels\\Media\\FilesViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\FullMediaViewModel.cs\">\r\n      <Link>ViewModels\\Media\\FullMediaViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\ImageEditorViewModel.cs\">\r\n      <Link>ViewModels\\Media\\ImageEditorViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\ImageViewerViewModel.cs\">\r\n      <Link>ViewModels\\Media\\ImageViewerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\LinksViewModel.cs\">\r\n      <Link>ViewModels\\Media\\LinksViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\MapViewModel.cs\">\r\n      <Link>ViewModels\\Media\\MapViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\MediaViewModel.cs\">\r\n      <Link>ViewModels\\Media\\MediaViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\MusicViewModel.cs\">\r\n      <Link>ViewModels\\Media\\MusicViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\ProfilePhotoViewerViewModel.cs\">\r\n      <Link>ViewModels\\Media\\ProfilePhotoViewerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\SecretMediaViewModel.cs\">\r\n      <Link>ViewModels\\Media\\SecretMediaViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\VideoCaptureViewModel.cs\">\r\n      <Link>ViewModels\\Media\\VideoCaptureViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Media\\VideoPlayerViewModel.cs\">\r\n      <Link>ViewModels\\Media\\VideoPlayerViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\ISearch.cs\">\r\n      <Link>ViewModels\\Search\\ISearch.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchContactsViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchContactsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchDialogsViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchDialogsViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchFilesViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchFilesViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchItemsViewModelBase.cs\">\r\n      <Link>ViewModels\\Search\\SearchItemsViewModelBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchLinksViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchLinksViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchMessagesViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchMessagesViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchMusicViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchMusicViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchShellViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchShellViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchVenuesViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchVenuesViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\Search\\SearchViewModel.cs\">\r\n      <Link>ViewModels\\Search\\SearchViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\ShellViewModel.cs\">\r\n      <Link>ViewModels\\ShellViewModel.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\ViewModels\\ViewModelBase.cs\">\r\n      <Link>ViewModels\\ViewModelBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\AboutView.xaml.cs\">\r\n      <Link>Views\\Additional\\AboutView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\AccountSelfDestructsView.xaml.cs\">\r\n      <Link>Views\\Additional\\AccountSelfDestructsView.xaml.cs</Link>\r\n      <DependentUpon>AccountSelfDestructsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\AddChatParticipantConfirmationView.xaml.cs\">\r\n      <Link>Views\\Additional\\AddChatParticipantConfirmationView.xaml.cs</Link>\r\n      <DependentUpon>AddChatParticipantConfirmationView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\AllowUsersView.xaml.cs\">\r\n      <Link>Views\\Additional\\AllowUsersView.xaml.cs</Link>\r\n      <DependentUpon>AllowUsersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ArchivedStickersView.xaml.cs\">\r\n      <Link>Views\\Additional\\ArchivedStickersView.xaml.cs</Link>\r\n      <DependentUpon>ArchivedStickersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\AskQuestionConfirmationView.xaml.cs\">\r\n      <Link>Views\\Additional\\AskQuestionConfirmationView.xaml.cs</Link>\r\n      <DependentUpon>AskQuestionConfirmationView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\BlockedContactsView.xaml.cs\">\r\n      <Link>Views\\Additional\\BlockedContactsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\BubbleBackgroundControl.xaml.cs\">\r\n      <Link>Views\\Additional\\BubbleBackgroundControl.xaml.cs</Link>\r\n      <DependentUpon>BubbleBackgroundControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\CacheView.xaml.cs\">\r\n      <Link>Views\\Additional\\CacheView.xaml.cs</Link>\r\n      <DependentUpon>CacheView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasscodeView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChangePasscodeView.xaml.cs</Link>\r\n      <DependentUpon>ChangePasscodeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordEmailView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChangePasswordEmailView.xaml.cs</Link>\r\n      <DependentUpon>ChangePasswordEmailView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordHintView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChangePasswordHintView.xaml.cs</Link>\r\n      <DependentUpon>ChangePasswordHintView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChangePasswordView.xaml.cs</Link>\r\n      <DependentUpon>ChangePasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChangePhoneNumberView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChangePhoneNumberView.xaml.cs</Link>\r\n      <DependentUpon>ChangePhoneNumberView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChannelBlockedContactsView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChannelBlockedContactsView.xaml.cs</Link>\r\n      <DependentUpon>ChannelBlockedContactsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChatSettingsView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChatSettingsView.xaml.cs</Link>\r\n      <DependentUpon>ChatSettingsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChooseAttachmentView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChooseAttachmentView.xaml.cs</Link>\r\n      <DependentUpon>ChooseAttachmentView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChooseBackgroundView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChooseBackgroundView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChooseCountryView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChooseCountryView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChooseNotificationSpanView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChooseNotificationSpanView.xaml.cs</Link>\r\n      <DependentUpon>ChooseNotificationSpanView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ChooseTTLView.xaml.cs\">\r\n      <Link>Views\\Additional\\ChooseTTLView.xaml.cs</Link>\r\n      <DependentUpon>ChooseTTLView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ClearCacheSettingsView.xaml.cs\">\r\n      <Link>Views\\Additional\\ClearCacheSettingsView.xaml.cs</Link>\r\n      <DependentUpon>ClearCacheSettingsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EditCurrentUserView.xaml.cs\">\r\n      <Link>Views\\Additional\\EditCurrentUserView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EditPhoneNumberView.xaml.cs\">\r\n      <Link>Views\\Additional\\EditPhoneNumberView.xaml.cs</Link>\r\n      <DependentUpon>EditPhoneNumberView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EditUsernameView.xaml.cs\">\r\n      <Link>Views\\Additional\\EditUsernameView.xaml.cs</Link>\r\n      <DependentUpon>EditUsernameView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EncryptionKeyView.xaml.cs\">\r\n      <Link>Views\\Additional\\EncryptionKeyView.xaml.cs</Link>\r\n      <DependentUpon>EncryptionKeyView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EnterPasscodeView.xaml.cs\">\r\n      <Link>Views\\Additional\\EnterPasscodeView.xaml.cs</Link>\r\n      <DependentUpon>EnterPasscodeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\EnterPasswordView.xaml.cs\">\r\n      <Link>Views\\Additional\\EnterPasswordView.xaml.cs</Link>\r\n      <DependentUpon>EnterPasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\FallingSnowControl.xaml.cs\">\r\n      <Link>Views\\Additional\\FallingSnowControl.xaml.cs</Link>\r\n      <DependentUpon>FallingSnowControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\FeaturedStickersView.xaml.cs\">\r\n      <Link>Views\\Additional\\FeaturedStickersView.xaml.cs</Link>\r\n      <DependentUpon>FeaturedStickersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\GroupsView.xaml.cs\">\r\n      <Link>Views\\Additional\\GroupsView.xaml.cs</Link>\r\n      <DependentUpon>GroupsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\InputMessageHint.xaml.cs\">\r\n      <Link>Views\\Additional\\InputMessageHint.xaml.cs</Link>\r\n      <DependentUpon>InputMessageHint.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\LastSeenView.xaml.cs\">\r\n      <Link>Views\\Additional\\LastSeenView.xaml.cs</Link>\r\n      <DependentUpon>LastSeenView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\LockscreenView.xaml.cs\">\r\n      <Link>Views\\Additional\\LockscreenView.xaml.cs</Link>\r\n      <DependentUpon>LockscreenView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\MasksView.xaml.cs\">\r\n      <Link>Views\\Additional\\MasksView.xaml.cs</Link>\r\n      <DependentUpon>MasksView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\MassDeleteReportSpamView.xaml.cs\">\r\n      <Link>Views\\Additional\\MassDeleteReportSpamView.xaml.cs</Link>\r\n      <DependentUpon>MassDeleteReportSpamView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\NotificationsView.xaml.cs\">\r\n      <Link>Views\\Additional\\NotificationsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\NumericKeyboard.xaml.cs\">\r\n      <Link>Views\\Additional\\NumericKeyboard.xaml.cs</Link>\r\n      <DependentUpon>NumericKeyboard.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\PasscodeView.xaml.cs\">\r\n      <Link>Views\\Additional\\PasscodeView.xaml.cs</Link>\r\n      <DependentUpon>PasscodeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\PasswordRecoveryView.xaml.cs\">\r\n      <Link>Views\\Additional\\PasswordRecoveryView.xaml.cs</Link>\r\n      <DependentUpon>PasswordRecoveryView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\PasswordView.xaml.cs\">\r\n      <Link>Views\\Additional\\PasswordView.xaml.cs</Link>\r\n      <DependentUpon>PasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\PrivacySecurityView.xaml.cs\">\r\n      <Link>Views\\Additional\\PrivacySecurityView.xaml.cs</Link>\r\n      <DependentUpon>PrivacySecurityView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\PrivacyStatementView.xaml.cs\">\r\n      <Link>Views\\Additional\\PrivacyStatementView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\SecretChatsView.xaml.cs\">\r\n      <Link>Views\\Additional\\SecretChatsView.xaml.cs</Link>\r\n      <DependentUpon>SecretChatsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\SelectMultipleUsersView.xaml.cs\">\r\n      <Link>Views\\Additional\\SelectMultipleUsersView.xaml.cs</Link>\r\n      <DependentUpon>SelectMultipleUsersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\SessionsView.xaml.cs\">\r\n      <Link>Views\\Additional\\SessionsView.xaml.cs</Link>\r\n      <DependentUpon>SessionsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\SettingsView.xaml.cs\">\r\n      <Link>Views\\Additional\\SettingsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\ShareView.xaml.cs\">\r\n      <Link>Views\\Additional\\ShareView.xaml.cs</Link>\r\n      <DependentUpon>ShareView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\SnapshotsView.xaml.cs\">\r\n      <Link>Views\\Additional\\SnapshotsView.xaml.cs</Link>\r\n      <DependentUpon>SnapshotsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\SpecialThanksView.xaml.cs\">\r\n      <Link>Views\\Additional\\SpecialThanksView.xaml.cs</Link>\r\n      <DependentUpon>SpecialThanksView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\StickersView.xaml.cs\">\r\n      <Link>Views\\Additional\\StickersView.xaml.cs</Link>\r\n      <DependentUpon>StickersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\TelegramPasswordBox.xaml.cs\">\r\n      <Link>Views\\Additional\\TelegramPasswordBox.xaml.cs</Link>\r\n      <DependentUpon>TelegramPasswordBox.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Additional\\WebView.xaml.cs\">\r\n      <Link>Views\\Additional\\WebView.xaml.cs</Link>\r\n      <DependentUpon>WebView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Auth\\CancelConfirmResetView.xaml.cs\">\r\n      <Link>Views\\Auth\\CancelConfirmResetView.xaml.cs</Link>\r\n      <DependentUpon>CancelConfirmResetView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Auth\\ConfirmPasswordView.xaml.cs\">\r\n      <Link>Views\\Auth\\ConfirmPasswordView.xaml.cs</Link>\r\n      <DependentUpon>ConfirmPasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Auth\\ConfirmView.xaml.cs\">\r\n      <Link>Views\\Auth\\ConfirmView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Auth\\ResetAccountView.xaml.cs\">\r\n      <Link>Views\\Auth\\ResetAccountView.xaml.cs</Link>\r\n      <DependentUpon>ResetAccountView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Auth\\SignInView.xaml.cs\">\r\n      <Link>Views\\Auth\\SignInView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Auth\\SignUpView.xaml.cs\">\r\n      <Link>Views\\Auth\\SignUpView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\AddAdminsView.xaml.cs\">\r\n      <Link>Views\\Chats\\AddAdminsView.xaml.cs</Link>\r\n      <DependentUpon>AddAdminsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\AddChannelManagerView.xaml.cs\">\r\n      <Link>Views\\Chats\\AddChannelManagerView.xaml.cs</Link>\r\n      <DependentUpon>AddChannelManagerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\AddChatParticipantView.xaml.cs\">\r\n      <Link>Views\\Chats\\AddChatParticipantView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\AddSecretChatParticipantView.xaml.cs\">\r\n      <Link>Views\\Chats\\AddSecretChatParticipantView.xaml.cs</Link>\r\n      <DependentUpon>AddSecretChatParticipantView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\ChannelAdministratorsView.xaml.cs\">\r\n      <Link>Views\\Chats\\ChannelAdministratorsView.xaml.cs</Link>\r\n      <DependentUpon>ChannelAdministratorsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\ChannelIntroView.xaml.cs\">\r\n      <Link>Views\\Chats\\ChannelIntroView.xaml.cs</Link>\r\n      <DependentUpon>ChannelIntroView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\ChannelMembersView.xaml.cs\">\r\n      <Link>Views\\Chats\\ChannelMembersView.xaml.cs</Link>\r\n      <DependentUpon>ChannelMembersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\Chat2View.xaml.cs\">\r\n      <Link>Views\\Chats\\Chat2View.xaml.cs</Link>\r\n      <DependentUpon>Chat2View.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\ChatView.xaml.cs\">\r\n      <Link>Views\\Chats\\ChatView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\ConvertToSupergroupView.xaml.cs\">\r\n      <Link>Views\\Chats\\ConvertToSupergroupView.xaml.cs</Link>\r\n      <DependentUpon>ConvertToSupergroupView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\EditChatView.xaml.cs\">\r\n      <Link>Views\\Chats\\EditChatView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\EditGroupTypeView.xaml.cs\">\r\n      <Link>Views\\Chats\\EditGroupTypeView.xaml.cs</Link>\r\n      <DependentUpon>EditGroupTypeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\GroupsInCommonView.xaml.cs\">\r\n      <Link>Views\\Chats\\GroupsInCommonView.xaml.cs</Link>\r\n      <DependentUpon>GroupsInCommonView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Chats\\InviteLinkView.xaml.cs\">\r\n      <Link>Views\\Chats\\InviteLinkView.xaml.cs</Link>\r\n      <DependentUpon>InviteLinkView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\ContactInfoView.xaml.cs\">\r\n      <Link>Views\\Contacts\\ContactInfoView.xaml.cs</Link>\r\n      <DependentUpon>ContactInfoView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\ContactView.xaml.cs\">\r\n      <Link>Views\\Contacts\\ContactView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\EditContactView.xaml.cs\">\r\n      <Link>Views\\Contacts\\EditContactView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\SecretContactDetailsView.xaml.cs\">\r\n      <Link>Views\\Contacts\\SecretContactDetailsView.xaml.cs</Link>\r\n      <DependentUpon>SecretContactDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\SecretContactView.xaml.cs\">\r\n      <Link>Views\\Contacts\\SecretContactView.xaml.cs</Link>\r\n      <DependentUpon>SecretContactView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Contacts\\ShareContactView.xaml.cs\">\r\n      <Link>Views\\Contacts\\ShareContactView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\ChatInviteControl.xaml.cs\">\r\n      <Link>Views\\Controls\\ChatInviteControl.xaml.cs</Link>\r\n      <DependentUpon>ChatInviteControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\ConversationTileControl.xaml.cs\">\r\n      <Link>Views\\Controls\\ConversationTileControl.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\FeaturedStickerSetControl.xaml.cs\">\r\n      <Link>Views\\Controls\\FeaturedStickerSetControl.xaml.cs</Link>\r\n      <DependentUpon>FeaturedStickerSetControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\MessagePlayerControl.xaml.cs\">\r\n      <Link>Views\\Controls\\MessagePlayerControl.xaml.cs</Link>\r\n      <DependentUpon>MessagePlayerControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\MessageStatusControl.xaml.cs\">\r\n      <Link>Views\\Controls\\MessageStatusControl.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\PieSlice.cs\">\r\n      <Link>Views\\Controls\\PieSlice.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\SecretPhotoPlaceholder.xaml.cs\">\r\n      <Link>Views\\Controls\\SecretPhotoPlaceholder.xaml.cs</Link>\r\n      <DependentUpon>SecretPhotoPlaceholder.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\StickerSetControl.xaml.cs\">\r\n      <Link>Views\\Controls\\StickerSetControl.xaml.cs</Link>\r\n      <DependentUpon>StickerSetControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Controls\\UserTileControl.xaml.cs\">\r\n      <Link>Views\\Controls\\UserTileControl.xaml.cs</Link>\r\n      <DependentUpon>UserTileControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Debug\\DebugView.xaml.cs\">\r\n      <Link>Views\\Debug\\DebugView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Debug\\LongPollView.xaml.cs\">\r\n      <Link>Views\\Debug\\LongPollView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Debug\\PerformanceView.xaml.cs\">\r\n      <Link>Views\\Debug\\PerformanceView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\ChooseDialogView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\ChooseDialogView.xaml.cs</Link>\r\n      <DependentUpon>ChooseDialogView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\ChooseParticipantsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\ChooseParticipantsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CommandHintsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CommandHintsView.xaml.cs</Link>\r\n      <DependentUpon>CommandHintsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CommandsControl.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CommandsControl.xaml.cs</Link>\r\n      <DependentUpon>CommandsControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateBroadcastView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CreateBroadcastView.xaml.cs</Link>\r\n      <DependentUpon>CreateBroadcastView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateChannelStep1View.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CreateChannelStep1View.xaml.cs</Link>\r\n      <DependentUpon>CreateChannelStep1View.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateChannelStep2View.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CreateChannelStep2View.xaml.cs</Link>\r\n      <DependentUpon>CreateChannelStep2View.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateChannelStep3View.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CreateChannelStep3View.xaml.cs</Link>\r\n      <DependentUpon>CreateChannelStep3View.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateDialogView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\CreateDialogView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\DialogSearchMessagesView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\DialogSearchMessagesView.xaml.cs</Link>\r\n      <DependentUpon>DialogSearchMessagesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\EmojiKeyboardControl.xaml.cs\">\r\n      <Link>Views\\Dialogs\\EmojiKeyboardControl.xaml.cs</Link>\r\n      <DependentUpon>EmojiKeyboardControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\FastDialogDetailsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\FastDialogDetailsView.xaml.cs</Link>\r\n      <DependentUpon>FastDialogDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\HashtagHintsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\HashtagHintsView.xaml.cs</Link>\r\n      <DependentUpon>HashtagHintsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\InlineBotResultsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\InlineBotResultsView.xaml.cs</Link>\r\n      <DependentUpon>InlineBotResultsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\MessageViewerView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\MessageViewerView.xaml.cs</Link>\r\n      <DependentUpon>MessageViewerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\PinnedMessageView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\PinnedMessageView.xaml.cs</Link>\r\n      <DependentUpon>PinnedMessageView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\SecretChatDebugView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\SecretChatDebugView.xaml.cs</Link>\r\n      <DependentUpon>SecretChatDebugView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\StickerHintsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\StickerHintsView.xaml.cs</Link>\r\n      <DependentUpon>StickerHintsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\StickerPreviewMenu.xaml.cs\">\r\n      <Link>Views\\Dialogs\\StickerPreviewMenu.xaml.cs</Link>\r\n      <DependentUpon>StickerPreviewMenu.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\UserActionView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\UserActionView.xaml.cs</Link>\r\n      <DependentUpon>UserActionView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Dialogs\\UsernameHintsView.xaml.cs\">\r\n      <Link>Views\\Dialogs\\UsernameHintsView.xaml.cs</Link>\r\n      <DependentUpon>UsernameHintsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\AnimatedImageViewerView.xaml.cs\">\r\n      <Link>Views\\Media\\AnimatedImageViewerView.xaml.cs</Link>\r\n      <DependentUpon>AnimatedImageViewerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\DecryptedImageViewerView.xaml.cs\">\r\n      <Link>Views\\Media\\DecryptedImageViewerView.xaml.cs</Link>\r\n      <DependentUpon>DecryptedImageViewerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\FullMediaView.xaml.cs\">\r\n      <Link>Views\\Media\\FullMediaView.xaml.cs</Link>\r\n      <DependentUpon>FullMediaView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\ImageEditorView.xaml.cs\">\r\n      <Link>Views\\Media\\ImageEditorView.xaml.cs</Link>\r\n      <DependentUpon>ImageEditorView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\ImageViewerView.xaml.cs\">\r\n      <Link>Views\\Media\\ImageViewerView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\MapTileSources\\GoogleMapsTileSource.cs\">\r\n      <Link>Views\\Media\\MapTileSources\\GoogleMapsTileSource.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\MapTileSources\\OpenAeralMapTileSource.cs\">\r\n      <Link>Views\\Media\\MapTileSources\\OpenAeralMapTileSource.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\MapTileSources\\OpenStreetMapTileSource.cs\">\r\n      <Link>Views\\Media\\MapTileSources\\OpenStreetMapTileSource.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\MapView.xaml.cs\">\r\n      <Link>Views\\Media\\MapView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\MusicView.xaml.cs\">\r\n      <Link>Views\\Media\\MusicView.xaml.cs</Link>\r\n      <DependentUpon>MusicView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\ProfilePhotoViewerView.xaml.cs\">\r\n      <Link>Views\\Media\\ProfilePhotoViewerView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\SecretMediaView.xaml.cs\">\r\n      <Link>Views\\Media\\SecretMediaView.xaml.cs</Link>\r\n      <DependentUpon>SecretMediaView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\VideoCaptureView.xaml.cs\">\r\n      <Link>Views\\Media\\VideoCaptureView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Media\\VideoPlayerView.xaml.cs\">\r\n      <Link>Views\\Media\\VideoPlayerView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchContactsView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchContactsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchDialogsView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchDialogsView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchFilesView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchFilesView.xaml.cs</Link>\r\n      <DependentUpon>SearchFilesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchLinksView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchLinksView.xaml.cs</Link>\r\n      <DependentUpon>SearchLinksView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchMessagesView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchMessagesView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchMusicView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchMusicView.xaml.cs</Link>\r\n      <DependentUpon>SearchMusicView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchShellView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchShellView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchVenuesView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchVenuesView.xaml.cs</Link>\r\n      <DependentUpon>SearchVenuesView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\Search\\SearchView.xaml.cs\">\r\n      <Link>Views\\Search\\SearchView.xaml.cs</Link>\r\n      <DependentUpon>SearchView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\ShellView.xaml.cs\">\r\n      <Link>Views\\ShellView.xaml.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"..\\TelegramClient\\Views\\TelegramViewBase.cs\">\r\n      <Link>Views\\TelegramViewBase.cs</Link>\r\n    </Compile>\r\n    <Compile Include=\"BackgroundProcess.cs\" />\r\n    <Compile Include=\"Behaviors\\InfiniteScrollingBehavior.cs\" />\r\n    <Compile Include=\"BugSenseWrapper.cs\" />\r\n    <Compile Include=\"Controls\\GestureListener\\GestureHelperEventArgs.cs\" />\r\n    <Compile Include=\"Controls\\GestureListener\\GestureListener.cs\" />\r\n    <Compile Include=\"Controls\\GestureListener\\GestureListenerStatic.cs\" />\r\n    <Compile Include=\"Controls\\GestureListener\\GestureService.cs\" />\r\n    <Compile Include=\"Controls\\GestureListener\\MathHelpers.cs\" />\r\n    <Compile Include=\"Controls\\GestureListener\\SafeRaise.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\DragEventArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\FlickEventArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\GestureEventArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\GestureHelper.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\InputBaseArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\InputCompletedArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\InputDeltaArgs.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\ManipulationGestureHelper.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\SafeRaise.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\StartView.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\StartViewItem.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\StartViewPanel.cs\" />\r\n    <Compile Include=\"Controls\\StartView\\TransformAnimator.cs\" />\r\n    <Compile Include=\"Converters\\ChannelParticipantsCountConverter.cs\" />\r\n    <Compile Include=\"Converters\\SecureFilePreviewConverter.cs\" />\r\n    <Compile Include=\"Converters\\ShippingOptionToStringConverter.cs\" />\r\n    <Compile Include=\"Behaviors\\FocusNextElementOnEnterBehavior.cs\" />\r\n    <Compile Include=\"Converters\\TTLMediaToVisibilityConverter.cs\" />\r\n    <Compile Include=\"Helpers\\TemplateSelectors\\ImageViewerTemplateSelector.cs\" />\r\n    <Compile Include=\"Helpers\\WeakEventListener.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n    <Compile Include=\"PushNotificationsBackgroundTask.cs\" />\r\n    <Compile Include=\"Services\\IProxyChecker.cs\" />\r\n    <Compile Include=\"Services\\IVoIPService.cs\" />\r\n    <Compile Include=\"Services\\IWindowsPhoneStoreUpdateService.cs\" />\r\n    <Compile Include=\"Services\\Cache.cs\" />\r\n    <Compile Include=\"Services\\ProxyChecker.cs\" />\r\n    <Compile Include=\"Services\\VoIPService.cs\" />\r\n    <Compile Include=\"Services\\WindowsPhoneStoreUpdateService.cs\" />\r\n    <Compile Include=\"Services\\WNSPushService.cs\" />\r\n    <Compile Include=\"Themes\\SharedResourceDictionary.cs\" />\r\n    <Compile Include=\"Utils\\Password.cs\" />\r\n    <Compile Include=\"Utils\\Passport.cs\" />\r\n    <Compile Include=\"Utils\\SRP.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\BioViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\CallsPrivacyViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\CallsSecurityViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChooseGeoLivePeriodViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ChooseVideoQualityViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ContactsSecurityViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\LoggedInViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\PassportSettingsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\PhotoPickerViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\CameraViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ProxyListViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Additional\\ProxyViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Calls\\CallsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Calls\\CallViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Chats\\GroupStickersViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Contacts\\ShareContactDetailsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\DialogDetailsViewModel.Mentions.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\EmojiHintsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\LiveLocationBadgeViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Dialogs\\PlayerViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Feed\\FeedViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Passport\\EmailCodeViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Passport\\PasswordIntroViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\PasswordEmailViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\SavedCardInfoViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\Stripe\\Card.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\Stripe\\CardUtils.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\Stripe\\DateUtils.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\Stripe\\JSON\\Response.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\Stripe\\StripeClient.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\Stripe\\StripeNetworkUtils.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\Stripe\\StripeTextUtils.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\Stripe\\StripeToken.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\WebVerificationViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\CardInfoViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\CheckoutViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\PaymentInfo.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\PaymentViewModelBase.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\ReceiptViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\ShippingInfoViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\ShippingMethodViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Payments\\WebCardInfoViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Media\\EditVideoViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Search\\SearchSharedContactsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Passport\\PhoneNumberCodeViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Passport\\EmailViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Passport\\PersonalDetailsViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Passport\\PassportViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Passport\\EnterPasswordViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Passport\\PhoneNumberViewModel.cs\" />\r\n    <Compile Include=\"ViewModels\\Passport\\ResidentialAddressViewModel.cs\" />\r\n    <Compile Include=\"Views\\Additional\\BioView.xaml.cs\">\r\n      <DependentUpon>BioView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\CallsPrivacyView.xaml.cs\">\r\n      <DependentUpon>CallsPrivacyView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\CallsSecurityView.xaml.cs\">\r\n      <DependentUpon>CallsSecurityView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChooseGeoLivePeriodView.xaml.cs\">\r\n      <DependentUpon>ChooseGeoLivePeriodView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ChooseVideoQualityView.xaml.cs\">\r\n      <DependentUpon>ChooseVideoQualityView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\PassportSettingsView.xaml.cs\">\r\n      <DependentUpon>PassportSettingsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ContactsSecurityView.xaml.cs\">\r\n      <DependentUpon>ContactsSecurityView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\LoggedInView.xaml.cs\">\r\n      <DependentUpon>LoggedInView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\PhotoPickerView.xaml.cs\">\r\n      <DependentUpon>PhotoPickerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\CameraView.xaml.cs\">\r\n      <DependentUpon>CameraView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\GifPlayerControl.xaml.cs\">\r\n      <DependentUpon>GifPlayerControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ProxyListView.xaml.cs\">\r\n      <DependentUpon>ProxyListView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\ProxyView.xaml.cs\">\r\n      <DependentUpon>ProxyView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Additional\\StartupView.xaml.cs\">\r\n      <DependentUpon>StartupView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Calls\\CallDebugControl.xaml.cs\">\r\n      <DependentUpon>CallDebugControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Calls\\CallRatingControl.xaml.cs\">\r\n      <DependentUpon>CallRatingControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Calls\\CallsView.xaml.cs\">\r\n      <DependentUpon>CallsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Calls\\CallView.xaml.cs\">\r\n      <DependentUpon>CallView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Calls\\ReturnToCallControl.xaml.cs\">\r\n      <DependentUpon>ReturnToCallControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Calls\\SignalBarsControl.xaml.cs\">\r\n      <DependentUpon>SignalBarsControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Chats\\GroupStickersView.xaml.cs\">\r\n      <DependentUpon>GroupStickersView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Contacts\\ShareContactDetailsView.xaml.cs\">\r\n      <DependentUpon>ShareContactDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\CardTextBox.cs\" />\r\n    <Compile Include=\"Views\\Controls\\CropControl.xaml.cs\">\r\n      <DependentUpon>CropControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\CameraControl.xaml.cs\">\r\n      <DependentUpon>CameraControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\DateTextBox.cs\" />\r\n    <Compile Include=\"Views\\Controls\\DialogControl.xaml.cs\">\r\n      <DependentUpon>DialogControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\GroupedMessageControl.xaml.cs\">\r\n      <DependentUpon>GroupedMessageControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\GroupedMessages.cs\" />\r\n    <Compile Include=\"Views\\Controls\\LabeledTextBox.xaml.cs\">\r\n      <DependentUpon>LabeledTextBox.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\LiveLocationIcon.xaml.cs\">\r\n      <DependentUpon>LiveLocationIcon.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\LiveLocationProgress.xaml.cs\">\r\n      <DependentUpon>LiveLocationProgress.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\LiveLocationsControl.xaml.cs\">\r\n      <DependentUpon>LiveLocationsControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\MediaPhotoControl.xaml.cs\">\r\n      <DependentUpon>MediaPhotoControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\MediaVideoControl.xaml.cs\">\r\n      <DependentUpon>MediaVideoControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\OpenPhotoPicker.xaml.cs\">\r\n      <DependentUpon>OpenPhotoPicker.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\PhotoControl.xaml.cs\">\r\n      <DependentUpon>PhotoControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\ProxyStatusControl.xaml.cs\">\r\n      <DependentUpon>ProxyStatusControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\RecordingControl.xaml.cs\">\r\n      <DependentUpon>RecordingControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\RibbonControl.xaml.cs\">\r\n      <DependentUpon>RibbonControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\RibbonImageControl.xaml.cs\">\r\n      <DependentUpon>RibbonImageControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\SelectionControl.xaml.cs\">\r\n      <DependentUpon>SelectionControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\ShareMessagePicker.xaml.cs\">\r\n      <DependentUpon>ShareMessagePicker.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\TelegramDatePickerPage.xaml.cs\">\r\n      <DependentUpon>TelegramDatePickerPage.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\TelegramPopup.cs\" />\r\n    <Compile Include=\"Views\\Controls\\TextingControl.xaml.cs\">\r\n      <DependentUpon>TextingControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\TypingControl.xaml.cs\">\r\n      <DependentUpon>TypingControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\UpdateAppControl.xaml.cs\">\r\n      <DependentUpon>UpdateAppControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\UploadingControl.xaml.cs\">\r\n      <DependentUpon>UploadingControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\LiveLocationBadgeView.xaml.cs\">\r\n      <DependentUpon>LiveLocationBadgeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\UnreadCounter.xaml.cs\">\r\n      <DependentUpon>UnreadCounter.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\EmojiHintsView.xaml.cs\">\r\n      <DependentUpon>EmojiHintsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\PlayerView.xaml.cs\">\r\n      <DependentUpon>PlayerView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\SearchUserControl.xaml.cs\">\r\n      <DependentUpon>SearchUserControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Feed\\FeedView.xaml.cs\">\r\n      <DependentUpon>FeedView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\MainPage.xaml.cs\">\r\n      <DependentUpon>MainPage.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\MapUserTileControl.xaml.cs\">\r\n      <DependentUpon>MapUserTileControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\StaticMapControl.xaml.cs\">\r\n      <DependentUpon>StaticMapControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Passport\\EmailCodeView.xaml.cs\">\r\n      <DependentUpon>EmailCodeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Passport\\PasswordIntroView.xaml.cs\">\r\n      <DependentUpon>PasswordIntroView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Passport\\EmailView.xaml.cs\">\r\n      <DependentUpon>EmailView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Passport\\PersonalDetailsView.xaml.cs\">\r\n      <DependentUpon>PersonalDetailsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Payments\\CardInfoView.xaml.cs\">\r\n      <DependentUpon>CardInfoView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Payments\\CheckoutView.xaml.cs\">\r\n      <DependentUpon>CheckoutView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Payments\\PasswordEmailView.xaml.cs\">\r\n      <DependentUpon>PasswordEmailView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Payments\\SavedCardInfoView.xaml.cs\">\r\n      <DependentUpon>SavedCardInfoView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Payments\\ShippingMethodView.xaml.cs\">\r\n      <DependentUpon>ShippingMethodView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Payments\\ShippingInfoView.xaml.cs\">\r\n      <DependentUpon>ShippingInfoView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Payments\\WebVerificationView.xaml.cs\">\r\n      <DependentUpon>WebVerificationView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Payments\\WebCardInfoView.xaml.cs\">\r\n      <DependentUpon>WebCardInfoView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\InputBox.xaml.cs\">\r\n      <DependentUpon>InputBox.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\LabeledPasswordBox.xaml.cs\">\r\n      <DependentUpon>LabeledPasswordBox.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\MessageControl.xaml.cs\">\r\n      <DependentUpon>MessageControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\DecryptedMessageControl.xaml.cs\">\r\n      <DependentUpon>DecryptedMessageControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\OpacityMaskBorder.xaml.cs\">\r\n      <DependentUpon>OpacityMaskBorder.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\Progress.xaml.cs\">\r\n      <DependentUpon>Progress.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\StatusControl.xaml.cs\">\r\n      <DependentUpon>StatusControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\TelegramApplicationBar.xaml.cs\">\r\n      <DependentUpon>TelegramApplicationBar.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\TelegramAppBarButton.xaml.cs\">\r\n      <DependentUpon>TelegramAppBarButton.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\VideoTimelineControl.xaml.cs\">\r\n      <DependentUpon>VideoTimelineControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Controls\\WaveformSlider.cs\" />\r\n    <Compile Include=\"Views\\Dialogs\\DocumentTileControl.xaml.cs\">\r\n      <DependentUpon>DocumentTileControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Dialogs\\PhotoTileControl.xaml.cs\">\r\n      <DependentUpon>PhotoTileControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\ColorPicker.xaml.cs\">\r\n      <DependentUpon>ColorPicker.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\EditVideoView.xaml.cs\">\r\n      <DependentUpon>EditVideoView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\ExtendedImageEditor.xaml.cs\">\r\n      <DependentUpon>ExtendedImageEditor.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\PhotoFace.cs\" />\r\n    <Compile Include=\"Views\\Media\\Sticker.xaml.cs\">\r\n      <DependentUpon>Sticker.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\StickerPosition.cs\" />\r\n    <Compile Include=\"Views\\Media\\StickersControl.xaml.cs\">\r\n      <DependentUpon>StickersControl.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Media\\TextLabel.xaml.cs\">\r\n      <DependentUpon>TextLabel.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Search\\SearchSharedContactsView.xaml.cs\">\r\n      <DependentUpon>SearchSharedContactsView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Passport\\PhoneNumberCodeView.xaml.cs\">\r\n      <DependentUpon>PhoneNumberCodeView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Passport\\PhoneNumberView.xaml.cs\">\r\n      <DependentUpon>PhoneNumberView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Passport\\ResidentialAddressView.xaml.cs\">\r\n      <DependentUpon>ResidentialAddressView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Passport\\EnterPasswordView.xaml.cs\">\r\n      <DependentUpon>EnterPasswordView.xaml</DependentUpon>\r\n    </Compile>\r\n    <Compile Include=\"Views\\Passport\\PassportView.xaml.cs\">\r\n      <DependentUpon>PassportView.xaml</DependentUpon>\r\n    </Compile>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"app.config\" />\r\n    <AppxManifest Include=\"Package.appxmanifest\">\r\n      <SubType>Designer</SubType>\r\n    </AppxManifest>\r\n    <None Include=\"Fonts\\Segoe-MDL2-Assets-MetroUI.ttf\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </None>\r\n    <None Include=\"packages.config\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n    <None Include=\"Properties\\AppManifest.xml\" />\r\n    <None Include=\"Properties\\WMAppManifest.xml\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Page Include=\"..\\TelegramClient.WP8\\Themes\\Default\\LongListSelector.xaml\">\r\n      <Link>Themes\\Default\\LongListSelector.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient.WP8\\Themes\\Generic.xaml\">\r\n      <Link>Themes\\Generic.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient.WP8\\Views\\Contacts\\ContactsView.xaml\">\r\n      <Link>Views\\Contacts\\ContactsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient.WP8\\Views\\Controls\\AudioRecorderControl.xaml\">\r\n      <Link>Views\\Controls\\AudioRecorderControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient.WP8\\Views\\Dialogs\\DialogDetailsView.xaml\">\r\n      <Link>Views\\Dialogs\\DialogDetailsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient.WP8\\Views\\Dialogs\\DialogsView.xaml\">\r\n      <Link>Views\\Dialogs\\DialogsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient.WP8\\Views\\Dialogs\\SecretDialogDetailsView.xaml\">\r\n      <Link>Views\\Dialogs\\SecretDialogDetailsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient.WP8\\Views\\Media\\FilesView.xaml\">\r\n      <Link>Views\\Media\\FilesView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient.WP8\\Views\\Media\\LinksView.xaml\">\r\n      <Link>Views\\Media\\LinksView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient.WP8\\Views\\Media\\MediaView.xaml\">\r\n      <Link>Views\\Media\\MediaView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient.WP8\\Views\\Media\\MultiImageEditorView.xaml\">\r\n      <Link>Views\\Media\\MultiImageEditorView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\App.xaml\">\r\n      <Link>App.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml\">\r\n      <Link>EmojiPanel\\Controls\\Emoji\\EmojiControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Button.xaml\">\r\n      <Link>Themes\\Default\\Button.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\CheckBox.xaml\">\r\n      <Link>Themes\\Default\\CheckBox.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\ListBox.xaml\">\r\n      <Link>Themes\\Default\\ListBox.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\ScrollViewer.xaml\">\r\n      <Link>Themes\\Default\\ScrollViewer.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Slider.xaml\">\r\n      <Link>Themes\\Default\\Slider.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Templates\\DataTemplates.xaml\">\r\n      <Link>Themes\\Default\\Templates\\DataTemplates.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Templates\\ItemsPanel.xaml\">\r\n      <Link>Themes\\Default\\Templates\\ItemsPanel.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Templates\\Media.xaml\">\r\n      <Link>Themes\\Default\\Templates\\Media.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\TextBlock.xaml\">\r\n      <Link>Themes\\Default\\TextBlock.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\TextBox.xaml\">\r\n      <Link>Themes\\Default\\TextBox.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Theme.xaml\">\r\n      <Link>Themes\\Default\\Theme.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\ToggleButton.xaml\">\r\n      <Link>Themes\\Default\\ToggleButton.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Themes\\Default\\Transitions.xaml\">\r\n      <Link>Themes\\Default\\Transitions.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\AboutView.xaml\">\r\n      <Link>Views\\Additional\\AboutView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\AccountSelfDestructsView.xaml\">\r\n      <Link>Views\\Additional\\AccountSelfDestructsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\AddChatParticipantConfirmationView.xaml\">\r\n      <Link>Views\\Additional\\AddChatParticipantConfirmationView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\AllowUsersView.xaml\">\r\n      <Link>Views\\Additional\\AllowUsersView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ArchivedStickersView.xaml\">\r\n      <Link>Views\\Additional\\ArchivedStickersView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\AskQuestionConfirmationView.xaml\">\r\n      <Link>Views\\Additional\\AskQuestionConfirmationView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\BlockedContactsView.xaml\">\r\n      <Link>Views\\Additional\\BlockedContactsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\BubbleBackgroundControl.xaml\">\r\n      <Link>Views\\Additional\\BubbleBackgroundControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\CacheView.xaml\">\r\n      <Link>Views\\Additional\\CacheView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasscodeView.xaml\">\r\n      <Link>Views\\Additional\\ChangePasscodeView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordEmailView.xaml\">\r\n      <Link>Views\\Additional\\ChangePasswordEmailView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordHintView.xaml\">\r\n      <Link>Views\\Additional\\ChangePasswordHintView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChangePasswordView.xaml\">\r\n      <Link>Views\\Additional\\ChangePasswordView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChangePhoneNumberView.xaml\">\r\n      <Link>Views\\Additional\\ChangePhoneNumberView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChannelBlockedContactsView.xaml\">\r\n      <Link>Views\\Additional\\ChannelBlockedContactsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChatSettingsView.xaml\">\r\n      <Link>Views\\Additional\\ChatSettingsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChooseAttachmentView.xaml\">\r\n      <Link>Views\\Additional\\ChooseAttachmentView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChooseBackgroundView.xaml\">\r\n      <Link>Views\\Additional\\ChooseBackgroundView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChooseCountryView.xaml\">\r\n      <Link>Views\\Additional\\ChooseCountryView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChooseNotificationSpanView.xaml\">\r\n      <Link>Views\\Additional\\ChooseNotificationSpanView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ChooseTTLView.xaml\">\r\n      <Link>Views\\Additional\\ChooseTTLView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ClearCacheSettingsView.xaml\">\r\n      <Link>Views\\Additional\\ClearCacheSettingsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EditCurrentUserView.xaml\">\r\n      <Link>Views\\Additional\\EditCurrentUserView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EditPhoneNumberView.xaml\">\r\n      <Link>Views\\Additional\\EditPhoneNumberView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EditUsernameView.xaml\">\r\n      <Link>Views\\Additional\\EditUsernameView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EncryptionKeyView.xaml\">\r\n      <Link>Views\\Additional\\EncryptionKeyView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EnterPasscodeView.xaml\">\r\n      <Link>Views\\Additional\\EnterPasscodeView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\EnterPasswordView.xaml\">\r\n      <Link>Views\\Additional\\EnterPasswordView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\FallingSnowControl.xaml\">\r\n      <Link>Views\\Additional\\FallingSnowControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\FeaturedStickersView.xaml\">\r\n      <Link>Views\\Additional\\FeaturedStickersView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\GroupsView.xaml\">\r\n      <Link>Views\\Additional\\GroupsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\InputMessageHint.xaml\">\r\n      <Link>Views\\Additional\\InputMessageHint.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\LastSeenView.xaml\">\r\n      <Link>Views\\Additional\\LastSeenView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\LockscreenView.xaml\">\r\n      <Link>Views\\Additional\\LockscreenView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\MasksView.xaml\">\r\n      <Link>Views\\Additional\\MasksView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\MassDeleteReportSpamView.xaml\">\r\n      <Link>Views\\Additional\\MassDeleteReportSpamView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\NotificationsView.xaml\">\r\n      <Link>Views\\Additional\\NotificationsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\NumericKeyboard.xaml\">\r\n      <Link>Views\\Additional\\NumericKeyboard.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\PasscodeView.xaml\">\r\n      <Link>Views\\Additional\\PasscodeView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\PasswordRecoveryView.xaml\">\r\n      <Link>Views\\Additional\\PasswordRecoveryView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\PasswordView.xaml\">\r\n      <Link>Views\\Additional\\PasswordView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\PrivacySecurityView.xaml\">\r\n      <Link>Views\\Additional\\PrivacySecurityView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\PrivacyStatementView.xaml\">\r\n      <Link>Views\\Additional\\PrivacyStatementView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\SecretChatsView.xaml\">\r\n      <Link>Views\\Additional\\SecretChatsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\SelectMultipleUsersView.xaml\">\r\n      <Link>Views\\Additional\\SelectMultipleUsersView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\SessionsView.xaml\">\r\n      <Link>Views\\Additional\\SessionsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\SettingsView.xaml\">\r\n      <Link>Views\\Additional\\SettingsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\ShareView.xaml\">\r\n      <Link>Views\\Additional\\ShareView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\SnapshotsView.xaml\">\r\n      <Link>Views\\Additional\\SnapshotsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\SpecialThanksView.xaml\">\r\n      <Link>Views\\Additional\\SpecialThanksView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\StickersView.xaml\">\r\n      <Link>Views\\Additional\\StickersView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\TelegramPasswordBox.xaml\">\r\n      <Link>Views\\Additional\\TelegramPasswordBox.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Additional\\WebView.xaml\">\r\n      <Link>Views\\Additional\\WebView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Auth\\CancelConfirmResetView.xaml\">\r\n      <Link>Views\\Auth\\CancelConfirmResetView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Auth\\ConfirmPasswordView.xaml\">\r\n      <Link>Views\\Auth\\ConfirmPasswordView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Auth\\ConfirmView.xaml\">\r\n      <Link>Views\\Auth\\ConfirmView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Auth\\ResetAccountView.xaml\">\r\n      <Link>Views\\Auth\\ResetAccountView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Auth\\SignInView.xaml\">\r\n      <Link>Views\\Auth\\SignInView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Auth\\SignUpView.xaml\">\r\n      <Link>Views\\Auth\\SignUpView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\AddAdminsView.xaml\">\r\n      <Link>Views\\Chats\\AddAdminsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\AddChannelManagerView.xaml\">\r\n      <Link>Views\\Chats\\AddChannelManagerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\AddChatParticipantView.xaml\">\r\n      <Link>Views\\Chats\\AddChatParticipantView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\AddSecretChatParticipantView.xaml\">\r\n      <Link>Views\\Chats\\AddSecretChatParticipantView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\ChannelAdministratorsView.xaml\">\r\n      <Link>Views\\Chats\\ChannelAdministratorsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\ChannelIntroView.xaml\">\r\n      <Link>Views\\Chats\\ChannelIntroView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\ChannelMembersView.xaml\">\r\n      <Link>Views\\Chats\\ChannelMembersView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\Chat2View.xaml\">\r\n      <Link>Views\\Chats\\Chat2View.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\ChatView.xaml\">\r\n      <Link>Views\\Chats\\ChatView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\ConvertToSupergroupView.xaml\">\r\n      <Link>Views\\Chats\\ConvertToSupergroupView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\EditChatView.xaml\">\r\n      <Link>Views\\Chats\\EditChatView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\EditGroupTypeView.xaml\">\r\n      <Link>Views\\Chats\\EditGroupTypeView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\GroupsInCommonView.xaml\">\r\n      <Link>Views\\Chats\\GroupsInCommonView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Chats\\InviteLinkView.xaml\">\r\n      <Link>Views\\Chats\\InviteLinkView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\ContactInfoView.xaml\">\r\n      <Link>Views\\Contacts\\ContactInfoView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\ContactView.xaml\">\r\n      <Link>Views\\Contacts\\ContactView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\EditContactView.xaml\">\r\n      <Link>Views\\Contacts\\EditContactView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\SecretContactDetailsView.xaml\">\r\n      <Link>Views\\Contacts\\SecretContactDetailsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\SecretContactView.xaml\">\r\n      <Link>Views\\Contacts\\SecretContactView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Contacts\\ShareContactView.xaml\">\r\n      <Link>Views\\Contacts\\ShareContactView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\ChatInviteControl.xaml\">\r\n      <Link>Views\\Controls\\ChatInviteControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\ConversationTileControl.xaml\">\r\n      <Link>Views\\Controls\\ConversationTileControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\FeaturedStickerSetControl.xaml\">\r\n      <Link>Views\\Controls\\FeaturedStickerSetControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\MessagePlayerControl.xaml\">\r\n      <Link>Views\\Controls\\MessagePlayerControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\MessageStatusControl.xaml\">\r\n      <Link>Views\\Controls\\MessageStatusControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\SecretPhotoPlaceholder.xaml\">\r\n      <Link>Views\\Controls\\SecretPhotoPlaceholder.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\StickerSetControl.xaml\">\r\n      <Link>Views\\Controls\\StickerSetControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Controls\\UserTileControl.xaml\">\r\n      <Link>Views\\Controls\\UserTileControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Debug\\DebugView.xaml\">\r\n      <Link>Views\\Debug\\DebugView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Debug\\LongPollView.xaml\">\r\n      <Link>Views\\Debug\\LongPollView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Debug\\PerformanceView.xaml\">\r\n      <Link>Views\\Debug\\PerformanceView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\ChooseDialogView.xaml\">\r\n      <Link>Views\\Dialogs\\ChooseDialogView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\ChooseParticipantsView.xaml\">\r\n      <Link>Views\\Dialogs\\ChooseParticipantsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CommandHintsView.xaml\">\r\n      <Link>Views\\Dialogs\\CommandHintsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CommandsControl.xaml\">\r\n      <Link>Views\\Dialogs\\CommandsControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateBroadcastView.xaml\">\r\n      <Link>Views\\Dialogs\\CreateBroadcastView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateChannelStep1View.xaml\">\r\n      <Link>Views\\Dialogs\\CreateChannelStep1View.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateChannelStep2View.xaml\">\r\n      <Link>Views\\Dialogs\\CreateChannelStep2View.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateChannelStep3View.xaml\">\r\n      <Link>Views\\Dialogs\\CreateChannelStep3View.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\CreateDialogView.xaml\">\r\n      <Link>Views\\Dialogs\\CreateDialogView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\DialogSearchMessagesView.xaml\">\r\n      <Link>Views\\Dialogs\\DialogSearchMessagesView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\EmojiKeyboardControl.xaml\">\r\n      <Link>Views\\Dialogs\\EmojiKeyboardControl.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\FastDialogDetailsView.xaml\">\r\n      <Link>Views\\Dialogs\\FastDialogDetailsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\HashtagHintsView.xaml\">\r\n      <Link>Views\\Dialogs\\HashtagHintsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\InlineBotResultsView.xaml\">\r\n      <Link>Views\\Dialogs\\InlineBotResultsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\MessageViewerView.xaml\">\r\n      <Link>Views\\Dialogs\\MessageViewerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\PinnedMessageView.xaml\">\r\n      <Link>Views\\Dialogs\\PinnedMessageView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\SecretChatDebugView.xaml\">\r\n      <Link>Views\\Dialogs\\SecretChatDebugView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\StickerHintsView.xaml\">\r\n      <Link>Views\\Dialogs\\StickerHintsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\StickerPreviewMenu.xaml\">\r\n      <Link>Views\\Dialogs\\StickerPreviewMenu.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\UserActionView.xaml\">\r\n      <Link>Views\\Dialogs\\UserActionView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Dialogs\\UsernameHintsView.xaml\">\r\n      <Link>Views\\Dialogs\\UsernameHintsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\AnimatedImageViewerView.xaml\">\r\n      <Link>Views\\Media\\AnimatedImageViewerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\DecryptedImageViewerView.xaml\">\r\n      <Link>Views\\Media\\DecryptedImageViewerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\FullMediaView.xaml\">\r\n      <Link>Views\\Media\\FullMediaView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\ImageEditorView.xaml\">\r\n      <Link>Views\\Media\\ImageEditorView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\ImageViewerView.xaml\">\r\n      <Link>Views\\Media\\ImageViewerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\MapView.xaml\">\r\n      <Link>Views\\Media\\MapView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\MusicView.xaml\">\r\n      <Link>Views\\Media\\MusicView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\ProfilePhotoViewerView.xaml\">\r\n      <Link>Views\\Media\\ProfilePhotoViewerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\SecretMediaView.xaml\">\r\n      <Link>Views\\Media\\SecretMediaView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\VideoCaptureView.xaml\">\r\n      <Link>Views\\Media\\VideoCaptureView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Media\\VideoPlayerView.xaml\">\r\n      <Link>Views\\Media\\VideoPlayerView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchContactsView.xaml\">\r\n      <Link>Views\\Search\\SearchContactsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchDialogsView.xaml\">\r\n      <Link>Views\\Search\\SearchDialogsView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchFilesView.xaml\">\r\n      <Link>Views\\Search\\SearchFilesView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchLinksView.xaml\">\r\n      <Link>Views\\Search\\SearchLinksView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchMessagesView.xaml\">\r\n      <Link>Views\\Search\\SearchMessagesView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchMusicView.xaml\">\r\n      <Link>Views\\Search\\SearchMusicView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchShellView.xaml\">\r\n      <Link>Views\\Search\\SearchShellView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchVenuesView.xaml\">\r\n      <Link>Views\\Search\\SearchVenuesView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\Search\\SearchView.xaml\">\r\n      <Link>Views\\Search\\SearchView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"..\\TelegramClient\\Views\\ShellView.xaml\">\r\n      <Link>Views\\ShellView.xaml</Link>\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\ToggleSwitch.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\W10MCommon.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Themes\\Default\\W10M.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\BioView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\CallsPrivacyView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\CallsSecurityView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ChooseGeoLivePeriodView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ChooseVideoQualityView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\PassportSettingsView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ContactsSecurityView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\LoggedInView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\PhotoPickerView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\CameraView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\GifPlayerControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ProxyListView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\ProxyView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Additional\\StartupView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Calls\\CallDebugControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Calls\\CallRatingControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Calls\\CallsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Calls\\CallView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Calls\\ReturnToCallControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Calls\\SignalBarsControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Chats\\GroupStickersView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Contacts\\ShareContactDetailsView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\CropControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\CameraControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\DialogControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\GroupedMessageControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\LabeledTextBox.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\LiveLocationIcon.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\LiveLocationProgress.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\LiveLocationsControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\MediaPhotoControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\MediaVideoControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\OpenPhotoPicker.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\PhotoControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\ProxyStatusControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\RecordingControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\RibbonControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\RibbonImageControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\SelectionControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\ShareMessagePicker.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\TelegramDatePickerPage.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\TextingControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\TypingControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\UpdateAppControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\UploadingControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\LiveLocationBadgeView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\UnreadCounter.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\EmojiHintsView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\PlayerView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\SearchUserControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Feed\\FeedView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\MainPage.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\MapUserTileControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\StaticMapControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Passport\\EmailCodeView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Passport\\PasswordIntroView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Passport\\EmailView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Passport\\PersonalDetailsView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Payments\\CardInfoView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Payments\\CheckoutView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Payments\\PasswordEmailView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Payments\\SavedCardInfoView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Payments\\ShippingMethodView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Payments\\ShippingInfoView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Payments\\WebVerificationView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Payments\\WebCardInfoView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\InputBox.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\LabeledPasswordBox.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\MessageControl.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\DecryptedMessageControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\OpacityMaskBorder.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\Progress.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\StatusControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\TelegramApplicationBar.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\TelegramAppBarButton.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Controls\\VideoTimelineControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\DocumentTileControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Dialogs\\PhotoTileControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\ColorPicker.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\EditVideoView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\ExtendedImageEditor.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\Sticker.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\StickersControl.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Media\\TextLabel.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n    <Page Include=\"Views\\Search\\SearchSharedContactsView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Passport\\PhoneNumberCodeView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Passport\\PhoneNumberView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Passport\\ResidentialAddressView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Passport\\EnterPasswordView.xaml\">\r\n      <Generator>MSBuild:Compile</Generator>\r\n      <SubType>Designer</SubType>\r\n    </Page>\r\n    <Page Include=\"Views\\Passport\\PassportView.xaml\">\r\n      <SubType>Designer</SubType>\r\n      <Generator>MSBuild:Compile</Generator>\r\n    </Page>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Content Include=\"..\\ffmpeg\\Build\\WindowsPhone8.1\\bin\\avcodec-57.dll\">\r\n      <Link>avcodec-57.dll</Link>\r\n    </Content>\r\n    <Content Include=\"..\\ffmpeg\\Build\\WindowsPhone8.1\\bin\\avformat-57.dll\">\r\n      <Link>avformat-57.dll</Link>\r\n    </Content>\r\n    <Content Include=\"..\\ffmpeg\\Build\\WindowsPhone8.1\\bin\\avutil-55.dll\">\r\n      <Link>avutil-55.dll</Link>\r\n    </Content>\r\n    <Content Include=\"..\\ffmpeg\\Build\\WindowsPhone8.1\\bin\\swresample-2.dll\">\r\n      <Link>swresample-2.dll</Link>\r\n    </Content>\r\n    <Content Include=\"..\\ffmpeg\\Build\\WindowsPhone8.1\\bin\\swscale-4.dll\">\r\n      <Link>swscale-4.dll</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient.WP8\\ARM\\libwebp.dll\">\r\n      <Link>ARM\\libwebp.dll</Link>\r\n      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.abc-WXGA.png\">\r\n      <Link>Assets\\emoji.abc-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.backspace-WXGA.png\">\r\n      <Link>Assets\\emoji.backspace-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.category.1-WXGA.png\">\r\n      <Link>Assets\\emoji.category.1-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.category.2-WXGA.png\">\r\n      <Link>Assets\\emoji.category.2-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.category.3-WXGA.png\">\r\n      <Link>Assets\\emoji.category.3-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.category.4-WXGA.png\">\r\n      <Link>Assets\\emoji.category.4-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.category.5-WXGA.png\">\r\n      <Link>Assets\\emoji.category.5-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.featured-WXGA.png\">\r\n      <Link>Assets\\emoji.featured-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.recent-WXGA.png\">\r\n      <Link>Assets\\emoji.recent-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.settings-WXGA.png\">\r\n      <Link>Assets\\emoji.settings-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\emoji.sticker-WXGA.png\">\r\n      <Link>Assets\\emoji.sticker-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\002320E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\002320E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\002A20E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\002A20E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003020E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003020E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003120E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003120E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003220E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003220E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003320E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003320E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003420E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003420E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003520E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003520E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003620E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003620E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003720E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003720E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003820E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003820E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\003920E3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\003920E3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\00a9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\00a9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\00ae.png\">\r\n      <Link>Assets\\Emoji\\Separated\\00ae.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\203C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\203C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2049.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2049.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2122.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2122.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2139.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2139.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2194.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2194.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2195.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2195.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2196.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2196.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2197.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2197.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2198.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2198.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2199.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2199.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\21A9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\21A9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\21AA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\21AA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\231A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\231A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\231B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\231B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2328.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2328.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23e9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23e9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23ea.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23ea.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23eb.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23eb.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23ec.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23ec.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23ED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23ED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23EE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23EE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23EF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23EF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23f0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23f0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23F1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23F1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23F2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23F2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23f3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23f3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23F8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23F8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23F9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23F9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\23FA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\23FA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\24C2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\24C2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25AA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25AA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25AB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25AB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25B6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25B6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25C0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25C0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25FB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25FC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25FD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\25FE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\25FE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2600.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2600.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2601.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2601.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2602.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2602.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2603.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2603.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2604.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2604.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\260E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\260E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2611.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2611.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2614.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2614.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2615.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2615.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2618.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2618.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261DD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261DD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261DD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261DD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261DD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261DD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261DD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261DD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\261DD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\261DD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2620.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2620.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2622.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2622.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2623.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2623.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2626.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2626.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\262A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\262A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\262E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\262E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\262F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\262F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2638.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2638.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2639.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2639.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2639FE0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2639FE0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\263A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\263A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2648.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2648.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2649.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2649.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\264F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\264F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2650.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2650.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2651.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2651.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2652.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2652.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2653.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2653.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2660.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2660.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2663.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2663.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2665.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2665.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2666.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2666.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2668.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2668.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\267B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\267B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\267F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\267F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2692.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2692.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2693.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2693.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2694.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2694.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2697.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2697.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2699.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2699.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\269B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\269B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\269C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\269C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26A0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26A0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26A1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26A1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26AA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26AA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26AB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26AB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26B0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26B0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26B1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26B1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26BD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26BD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26BE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26BE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26C4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26C4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26C5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26C5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26C8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26C8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26ce.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26ce.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26CF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26CF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26D1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26D1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26D3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26D3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26D4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26D4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26E9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26E9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26EA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26EA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26F9D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26F9D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26FA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26FA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\26FD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\26FD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2702.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2702.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2705.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2705.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2709.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2709.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270a.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270a.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270AD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270AD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270AD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270AD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270AD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270AD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270AD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270AD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270AD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270AD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270b.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270b.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270BD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270BD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270BD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270BD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270BD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270BD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270BD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270BD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270BD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270BD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270CD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270CD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270CD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270CD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270CD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270CD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270CD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270CD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270CD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270CD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270DD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270DD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270DD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270DD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270DD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270DD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270DD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270DD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270DD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270DD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\270F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\270F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2712.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2712.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2714.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2714.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2716.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2716.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\271D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\271D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2721.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2721.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2728.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2728.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2733.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2733.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2734.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2734.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2744.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2744.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2747.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2747.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\274c.png\">\r\n      <Link>Assets\\Emoji\\Separated\\274c.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\274e.png\">\r\n      <Link>Assets\\Emoji\\Separated\\274e.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2753.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2753.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2754.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2754.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2755.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2755.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2757.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2757.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2763.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2763.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2764.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2764.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2795.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2795.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2796.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2796.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2797.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2797.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\27A1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\27A1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\27b0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\27b0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\27bf.png\">\r\n      <Link>Assets\\Emoji\\Separated\\27bf.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2934.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2934.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2935.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2935.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\2B55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\2B55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\3030.png\">\r\n      <Link>Assets\\Emoji\\Separated\\3030.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\303D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\303D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\3297.png\">\r\n      <Link>Assets\\Emoji\\Separated\\3297.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\3299.png\">\r\n      <Link>Assets\\Emoji\\Separated\\3299.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDC04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDC04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDCCF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDCCF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD70.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD70.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD71.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD71.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD7E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD7E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD7F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD7F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD94.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD94.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD95.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD95.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD97.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD97.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD98.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD98.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD99.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD99.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDD9A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDD9A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDF6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDF6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE6D83CDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE6D83CDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDEF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDEF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDF6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDF6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE7D83CDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE7D83CDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE8D83CDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE8D83CDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE9D83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE9D83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE9D83CDDEF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE9D83CDDEF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE9D83CDDF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE9D83CDDF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE9D83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE9D83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE9D83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE9D83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDE9D83CDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDE9D83CDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEAD83CDDE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEAD83CDDE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEAD83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEAD83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEAD83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEAD83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEAD83CDDED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEAD83CDDED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEAD83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEAD83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEAD83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEAD83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEAD83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEAD83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEAD83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEAD83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEBD83CDDEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEBD83CDDEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEBD83CDDEF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEBD83CDDEF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEBD83CDDF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEBD83CDDF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEBD83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEBD83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEBD83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEBD83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEBD83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEBD83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDF6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDF6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDECD83CDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDECD83CDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEDD83CDDF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEDD83CDDF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEDD83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEDD83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEDD83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEDD83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEDD83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEDD83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEDD83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEDD83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDF6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDF6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEED83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEED83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEFD83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEFD83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEFD83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEFD83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEFD83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEFD83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDEFD83CDDF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDEFD83CDDF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF0D83CDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF0D83CDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF1D83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF1D83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF1D83CDDE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF1D83CDDE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF1D83CDDE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF1D83CDDE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF1D83CDDEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF1D83CDDEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF1D83CDDF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF1D83CDDF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF1D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF1D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF1D83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF1D83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF1D83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF1D83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF1D83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF1D83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF1D83CDDFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF1D83CDDFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF1D83CDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF1D83CDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDF6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDF6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF2D83CDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF2D83CDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF3D83CDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF3D83CDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF4D83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF4D83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF5D83CDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF5D83CDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF6D83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF6D83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF7D83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF7D83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF7D83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF7D83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF7D83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF7D83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF7D83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF7D83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF7D83CDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF7D83CDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF8D83CDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF8D83CDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDEF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDEF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDF9D83CDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDF9D83CDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFAD83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFAD83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFAD83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFAD83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFAD83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFAD83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFAD83CDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFAD83CDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFAD83CDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFAD83CDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFBD83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFBD83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFBD83CDDE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFBD83CDDE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFBD83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFBD83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFBD83CDDEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFBD83CDDEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFBD83CDDEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFBD83CDDEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFBD83CDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFBD83CDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFBD83CDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFBD83CDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFCD83CDDEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFCD83CDDEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFCD83CDDF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFCD83CDDF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFDD83CDDF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFDD83CDDF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFED83CDDEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFED83CDDEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFED83CDDF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFED83CDDF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFFD83CDDE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFFD83CDDE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFFD83CDDF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFFD83CDDF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDDFFD83CDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDDFFD83CDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDE51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDE51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF26.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF26.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF28.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF28.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF29.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF29.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF3F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF3F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF40.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF40.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF41.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF41.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF42.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF42.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF43.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF43.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF44.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF44.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF45.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF45.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF46.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF46.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF47.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF47.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF48.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF48.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF49.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF49.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF4F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF4F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF52.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF52.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF53.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF53.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF54.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF54.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF56.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF56.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF57.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF57.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF58.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF58.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF59.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF59.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF5F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF5F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF60.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF60.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF61.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF61.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF62.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF62.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF63.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF63.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF64.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF64.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF65.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF65.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF68.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF68.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF69.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF69.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF6F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF6F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF70.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF70.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF71.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF71.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF72.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF72.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF74.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF74.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF75.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF75.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF76.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF76.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF77.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF77.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF78.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF78.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF79.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF79.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF7F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF7F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF84.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF84.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF85D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF85D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF86.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF86.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF88.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF88.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF89.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF89.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF8F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF8F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF97.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF97.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF99.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF99.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF9A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF9A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF9B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF9B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF9E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF9E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDF9F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDF9F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFA9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFA9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFAF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFAF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFB9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFB9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFBF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFBF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC3D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC3D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC4D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC4D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC7D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC7D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFC9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFC9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCA200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCA200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCAD83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCAD83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCBD83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCBD83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCCD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCCD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCCD83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCCD83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCCD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCCD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCCD83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCCD83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCCD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCCD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCCD83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCCD83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCCD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCCD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCCD83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCCD83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCCD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCCD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCCD83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCCD83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFCF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFCF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFD9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFD9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFDF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFDF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFEF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFEF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF3200DD83CDF08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF3200DD83CDF08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83CDFFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83CDFFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC22.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC22.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC23.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC23.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC26.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC26.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC28.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC28.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC29.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC29.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC3F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC3F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC40.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC40.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC41.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC41.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC41200DD83DDDE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC41200DD83DDDE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC42D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC42D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC43D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC43D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC44.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC44.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC45.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC45.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC46D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC46D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC47D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC47D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC48D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC48D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC49D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC49D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4AD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4AD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4AD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4AD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4AD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4AD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4AD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4AD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4AD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4AD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4BD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4BD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4BD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4BD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4BD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4BD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4BD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4BD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4BD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4BD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4CD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4CD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4CD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4CD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4CD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4CD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4CD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4CD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4CD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4CD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4DD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4DD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4DD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4DD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4DD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4DD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4DD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4DD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4DD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4DD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4ED83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4ED83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4ED83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4ED83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4ED83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4ED83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4ED83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4ED83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4ED83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4ED83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4FD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4FD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4FD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4FD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4FD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4FD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4FD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4FD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC4FD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC4FD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC50D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC50D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC52.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC52.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC53.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC53.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC54.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC54.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC56.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC56.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC57.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC57.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC58.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC58.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC59.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC59.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC5F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC5F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC60.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC60.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC61.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC61.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC62.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC62.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC63.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC63.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC64.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC64.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC65.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC65.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC66D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC66D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC67D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC67D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200D2764200DD83DDC68.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200D2764200DD83DDC68.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200D2764200DD83DDC8B200DD83DDC68.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200D2764200DD83DDC8B200DD83DDC68.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200D2764FE0F200DD83DDC68.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200D2764FE0F200DD83DDC68.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200D2764FE0F200DD83DDC8B200DD83DDC68.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200D2764FE0F200DD83DDC8B200DD83DDC68.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC66200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC66200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC67200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC67200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC67200DD83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC67200DD83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC68200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC68200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC68200DD83DDC66200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC68200DD83DDC66200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC68200DD83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC68200DD83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC68200DD83DDC67200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC68200DD83DDC67200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC68200DD83DDC67200DD83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC68200DD83DDC67200DD83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC69200DD83DDC66200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC69200DD83DDC66200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC69200DD83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC69200DD83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC69200DD83DDC67200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC69200DD83DDC67200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDC69200DD83DDC67200DD83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDC69200DD83DDC67200DD83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFB200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFC200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFD200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFE200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC68D83CDFFF200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200D2764200DD83DDC69.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200D2764200DD83DDC69.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200D2764200DD83DDC8B200DD83DDC69.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200D2764200DD83DDC8B200DD83DDC69.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200D2764FE0F200DD83DDC69.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200D2764FE0F200DD83DDC69.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200D2764FE0F200DD83DDC8B200DD83DDC69.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200D2764FE0F200DD83DDC8B200DD83DDC69.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDC66200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDC66200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDC67200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDC67200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDC67200DD83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDC67200DD83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDC69200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDC69200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDC69200DD83DDC66200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDC69200DD83DDC66200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDC69200DD83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDC69200DD83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDC69200DD83DDC67200DD83DDC66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDC69200DD83DDC67200DD83DDC66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDC69200DD83DDC67200DD83DDC67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDC69200DD83DDC67200DD83DDC67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFB200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFC200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFD200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFE200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200D2695.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200D2695.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200D2696.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200D2696.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200D2708.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200D2708.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDF3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDF3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDF73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDF73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDF93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDF93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDFA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDFA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDFA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDFA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDFEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDFEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDFED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83CDFED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC69D83CDFFF200DD83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6E200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6E200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6ED83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6ED83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC6F200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC6F200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC70D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC70D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC71D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC71D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC72D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC72D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC73D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC73D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC74D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC74D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC75D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC75D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC76D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC76D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC77D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC77D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC78D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC78D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC79.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC79.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7CD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7CD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7CD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7CD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7CD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7CD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7CD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7CD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7CD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7CD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC7F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC7F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC81D83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC81D83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC82D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC82D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC83D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC83D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC84.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC84.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC85D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC85D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC86D83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC86D83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC87D83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC87D83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC88.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC88.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC89.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC89.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC8F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC8F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC94.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC94.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC95.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC95.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC97.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC97.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC98.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC98.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC99.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC99.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDC9F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDC9F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCA9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCA9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAAD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAAD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAAD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAAD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAAD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAAD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAAD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAAD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAAD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAAD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCAF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCAF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCB9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCB9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCBF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCBF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCC9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCC9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCCF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCCF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCD9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCD9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCDF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCDF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCEA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCED.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCED.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCEE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCEF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCEF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCF9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCF9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDCFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDCFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD22.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD22.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD23.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD23.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD26.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD26.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD28.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD28.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD29.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD29.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD49.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD49.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD4C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD4C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD4D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD4D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD4E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD4E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD52.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD52.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD53.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD53.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD54.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD54.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD56.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD56.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD57.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD57.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD58.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD58.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD59.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD59.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD5F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD5F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD60.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD60.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD61.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD61.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD62.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD62.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD63.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD63.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD64.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD64.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD65.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD65.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD66.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD66.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD67.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD67.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD6F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD6F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD70.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD70.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD73.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD73.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD74.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD74.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD74D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD74D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD74D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD74D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD74D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD74D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD74D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD74D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD74D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD74D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD75D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD75D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD76.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD76.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD77.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD77.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD78.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD78.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD79.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD79.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD7A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD7A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD7AD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD7AD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD7AD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD7AD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD7AD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD7AD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD7AD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD7AD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD7AD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD7AD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD90D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD90D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD95D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD95D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDD96D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDD96D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDA5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDA5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDB1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDB1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDB2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDB2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDC2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDC2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDC3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDC3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDC4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDC4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDD1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDD1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDD2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDD2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDD3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDD3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDDC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDDC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDDD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDDD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDDE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDDE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDE1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDE1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDE3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDE3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDE8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDE8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDEF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDEF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDDFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDDFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE00.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE00.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE01.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE01.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE02.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE02.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE03.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE03.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE04.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE04.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE05.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE05.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE06.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE06.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE07.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE07.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE08.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE08.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE09.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE09.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE0F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE0F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE1F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE1F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE22.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE22.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE23.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE23.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE26.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE26.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE28.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE28.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE29.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE29.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE2F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE2F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE31.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE31.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE32.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE32.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE37.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE37.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE38.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE38.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE39.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE39.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE3F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE3F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE40.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE40.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE41.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE41.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE42.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE42.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE43.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE43.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE44.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE44.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE45D83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE45D83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE46D83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE46D83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE47D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE47D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE48.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE48.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE49.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE49.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4B200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4B200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4BD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4BD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4BD83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4BD83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4BD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4BD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4BD83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4BD83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4BD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4BD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4BD83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4BD83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4BD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4BD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4BD83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4BD83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4BD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4BD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4BD83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4BD83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4CD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4CD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4CD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4CD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4CD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4CD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4CD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4CD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4CD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4CD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4D200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4D200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4DD83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4DD83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4E200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4E200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4ED83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4ED83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4FD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4FD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4FD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4FD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4FD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4FD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4FD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4FD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE4FD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE4FD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE84.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE84.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE85.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE85.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE86.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE86.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE88.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE88.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE89.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE89.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE8F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE8F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE92.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE92.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE93.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE93.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE94.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE94.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE95.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE95.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE96.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE96.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE97.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE97.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE98.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE98.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE99.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE99.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDE9F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDE9F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA3D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA3D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEA9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEA9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEAF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEAF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB4D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB4D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB5D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB5D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB6D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB6D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB7.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB7.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB8.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB8.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEB9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEB9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBA.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEBF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEBF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC0D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC0D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEC5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEC5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDECB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDECB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDECC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDECC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDECD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDECD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDECE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDECE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDECF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDECF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDED0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDED0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDED1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDED1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDED2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDED2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE1.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE2.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEE9.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEE9.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEEB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEEB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEEC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEEC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEF0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEF0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEF3.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEF3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEF4.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEF4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEF5.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEF5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83DDEF6.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83DDEF6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD10.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD10.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD11.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD11.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD12.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD12.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD13.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD13.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD14.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD14.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD15.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD15.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD16.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD16.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD17.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD17.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD18.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD18.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD18D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD18D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD18D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD18D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD18D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD18D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD18D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD18D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD18D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD18D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD19.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD19.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD19D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD19D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD19D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD19D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD19D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD19D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD19D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD19D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD19D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD19D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1AD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1AD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1AD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1AD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1AD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1AD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1AD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1AD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1AD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1AD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1BD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1BD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1BD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1BD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1BD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1BD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1BD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1BD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1BD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1BD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1CD83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1CD83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1CD83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1CD83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1CD83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1CD83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1CD83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1CD83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1CD83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1CD83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1ED83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1ED83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1ED83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1ED83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1ED83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1ED83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1ED83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1ED83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD1ED83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD1ED83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD20.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD20.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD21.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD21.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD22.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD22.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD23.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD23.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD24.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD24.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD25.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD25.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26D83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26D83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26D83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26D83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26D83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26D83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26D83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26D83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD26D83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD26D83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD27.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD27.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD30.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD30.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD30D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD30D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD30D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD30D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD30D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD30D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD30D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD30D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD30D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD30D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD33.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD33.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD34.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD34.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD34D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD34D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD34D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD34D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD34D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD34D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD34D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD34D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD34D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD34D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD35.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD35.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD35D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD35D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD35D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD35D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD35D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD35D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD35D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD35D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD35D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD35D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD36.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD36.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD36D83CDFFB.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD36D83CDFFB.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD36D83CDFFC.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD36D83CDFFC.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD36D83CDFFD.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD36D83CDFFD.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD36D83CDFFE.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD36D83CDFFE.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD36D83CDFFF.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD36D83CDFFF.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37D83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37D83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37D83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37D83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37D83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37D83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37D83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37D83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD37D83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD37D83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38D83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38D83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38D83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38D83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38D83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38D83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38D83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38D83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD38D83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD38D83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39D83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39D83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39D83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39D83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39D83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39D83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39D83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39D83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39D83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39D83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39D83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39D83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39D83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39D83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39D83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39D83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39D83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39D83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD39D83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD39D83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3C200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3C200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3C200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3C200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3D200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3D200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3D200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3D200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3DD83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3DD83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3DD83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3DD83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3DD83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3DD83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3DD83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3DD83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3DD83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3DD83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3DD83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3DD83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3DD83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3DD83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3DD83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3DD83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3DD83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3DD83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3DD83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3DD83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3E200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3E200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3E200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3E200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3ED83CDFFB200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3ED83CDFFB200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3ED83CDFFB200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3ED83CDFFB200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3ED83CDFFC200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3ED83CDFFC200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3ED83CDFFC200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3ED83CDFFC200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3ED83CDFFD200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3ED83CDFFD200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3ED83CDFFD200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3ED83CDFFD200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3ED83CDFFE200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3ED83CDFFE200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3ED83CDFFE200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3ED83CDFFE200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3ED83CDFFF200D2640.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3ED83CDFFF200D2640.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD3ED83CDFFF200D2642.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD3ED83CDFFF200D2642.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD40.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD40.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD41.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD41.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD42.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD42.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD43.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD43.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD44.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD44.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD45.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD45.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD47.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD47.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD48.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD48.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD49.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD49.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD4A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD4A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD4B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD4B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD50.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD50.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD51.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD51.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD52.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD52.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD53.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD53.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD54.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD54.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD55.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD55.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD56.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD56.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD57.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD57.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD58.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD58.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD59.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD59.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD5A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD5A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD5B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD5B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD5C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD5C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD5D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD5D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD5E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD5E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD80.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD80.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD81.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD81.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD82.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD82.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD83.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD83.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD84.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD84.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD85.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD85.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD86.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD86.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD87.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD87.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD88.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD88.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD89.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD89.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD8A.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD8A.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD8B.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD8B.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD8C.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD8C.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD8D.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD8D.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD8E.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD8E.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD8F.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD8F.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD90.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD90.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDD91.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDD91.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\Separated\\D83EDDC0.png\">\r\n      <Link>Assets\\Emoji\\Separated\\D83EDDC0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part5.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat0_part5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat1_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part5.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part6.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat2_part6.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat3_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part0.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part0.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part1.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part1.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part2.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part2.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part3.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part3.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part4.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part4.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part5.png\">\r\n      <Link>Assets\\Emoji\\SpacedSprites\\sprite64_cat4_part5.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.abc-WXGA.png\">\r\n      <Link>Assets\\light.emoji.abc-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.backspace-WXGA.png\">\r\n      <Link>Assets\\light.emoji.backspace-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.category.1-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.1-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.category.2-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.2-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.category.3-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.3-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.category.4-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.4-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.category.5-WXGA.png\">\r\n      <Link>Assets\\light.emoji.category.5-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.featured-WXGA.png\">\r\n      <Link>Assets\\light.emoji.featured-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.recent-WXGA.png\">\r\n      <Link>Assets\\light.emoji.recent-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.settings-WXGA.png\">\r\n      <Link>Assets\\light.emoji.settings-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Assets\\light.emoji.sticker-WXGA.png\">\r\n      <Link>Assets\\light.emoji.sticker-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.add.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.add.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.attach.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.attach.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.back.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.back.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.basecircle.light.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.basecircle.light.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.basecircle.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.basecircle.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.cancel.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.cancel.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.check.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.check.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.delete.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.delete.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.edit.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.edit.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.feature.search.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.feature.search.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.feature.video.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.feature.video.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.forwardmessage.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.forwardmessage.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.manage.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.manage.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.map.centerme.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.map.centerme.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.map.checkin.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.map.checkin.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.map.direction.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.map.direction.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.next.light.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.next.light.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.next.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.next.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.refresh.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.refresh.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.save.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.save.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.send.text.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.send.text.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.share.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.share.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.smile.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.smile.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.stop.rest.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.stop.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.transport.play.light.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.transport.play.light.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.transport.play.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.transport.play.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.user.dark.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.user.dark.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\appbar.user.light.png\">\r\n      <Link>Images\\ApplicationBar\\appbar.user.light.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\feature.calendar.light.png\">\r\n      <Link>Images\\ApplicationBar\\feature.calendar.light.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\ApplicationBar\\feature.calendar.png\">\r\n      <Link>Images\\ApplicationBar\\feature.calendar.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Audio\\appbar.basecircle.rest.png\">\r\n      <Link>Images\\Audio\\appbar.basecircle.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Audio\\appbar.download.rest.png\">\r\n      <Link>Images\\Audio\\appbar.download.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Audio\\appbar.transport.pause.rest.png\">\r\n      <Link>Images\\Audio\\appbar.transport.pause.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Audio\\appbar.transport.play.rest.png\">\r\n      <Link>Images\\Audio\\appbar.transport.play.rest.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Backgrounds\\gallery_WXGA.png\">\r\n      <Link>Images\\Backgrounds\\gallery_WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Backgrounds\\wallpapercheck_WXGA.png\">\r\n      <Link>Images\\Backgrounds\\wallpapercheck_WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\broadcast-WXGA.png\">\r\n      <Link>Images\\Dialogs\\broadcast-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\channel.check-WXGA.png\">\r\n      <Link>Images\\Dialogs\\channel.check-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\channel.muted.png\">\r\n      <Link>Images\\Dialogs\\channel.muted.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\channel.unmuted.png\">\r\n      <Link>Images\\Dialogs\\channel.unmuted.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.check-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.check-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.commands-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.commands-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.customkeyboard-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.customkeyboard-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.draft-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.draft-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.gas-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.gas-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.keyboard-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.keyboard-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.masks.png\">\r\n      <Link>Images\\Dialogs\\chat.masks.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.mute-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.mute-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.smile-black.png\">\r\n      <Link>Images\\Dialogs\\chat.smile-black.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.smile-white.png\">\r\n      <Link>Images\\Dialogs\\chat.smile-white.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.smile.png\">\r\n      <Link>Images\\Dialogs\\chat.smile.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.state.read-black-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.state.read-black-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\chat.state.sent-black-WXGA.png\">\r\n      <Link>Images\\Dialogs\\chat.state.sent-black-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\group-WXGA.png\">\r\n      <Link>Images\\Dialogs\\group-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\passcode.close-WXGA.png\">\r\n      <Link>Images\\Dialogs\\passcode.close-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\passcode.open-WXGA.png\">\r\n      <Link>Images\\Dialogs\\passcode.open-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\secretchat-black-WXGA.png\">\r\n      <Link>Images\\Dialogs\\secretchat-black-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\secretchat-white-WXGA.png\">\r\n      <Link>Images\\Dialogs\\secretchat-white-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Dialogs\\secretchat-WXGA.png\">\r\n      <Link>Images\\Dialogs\\secretchat-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\LockScreen\\lockscreen.logo.png\">\r\n      <Link>Images\\LockScreen\\lockscreen.logo.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\LockScreen\\lockscreen.logo.white.png\">\r\n      <Link>Images\\LockScreen\\lockscreen.logo.white.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\LockScreen\\lockscreen.png\">\r\n      <Link>Images\\LockScreen\\lockscreen.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Maps\\4SQ.png\">\r\n      <Link>Images\\Maps\\4SQ.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Maps\\attach-location-black.png\">\r\n      <Link>Images\\Maps\\attach-location-black.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Maps\\Map_Pin.png\">\r\n      <Link>Images\\Maps\\Map_Pin.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\channel.broadcast-WXGA.png\">\r\n      <Link>Images\\Messages\\channel.broadcast-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\channel.share.black.png\">\r\n      <Link>Images\\Messages\\channel.share.black.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\channel.share.white.png\">\r\n      <Link>Images\\Messages\\channel.share.white.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\chat.cloudstorage-white-WXGA.png\">\r\n      <Link>Images\\Messages\\chat.cloudstorage-white-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\chat.cloudstorage-WXGA.png.png\">\r\n      <Link>Images\\Messages\\chat.cloudstorage-WXGA.png.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\chat.nomessages-white-WXGA.png\">\r\n      <Link>Images\\Messages\\chat.nomessages-white-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\chat.nomessages-WXGA.png\">\r\n      <Link>Images\\Messages\\chat.nomessages-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\chat_doc-WXGA.png\">\r\n      <Link>Images\\Messages\\chat_doc-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\doc.cancel.png\">\r\n      <Link>Images\\Messages\\doc.cancel.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\doc.download.png\">\r\n      <Link>Images\\Messages\\doc.download.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\doc.pause.png\">\r\n      <Link>Images\\Messages\\doc.pause.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\file.black-WXGA.png\">\r\n      <Link>Images\\Messages\\file.black-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\file.white-WXGA.png\">\r\n      <Link>Images\\Messages\\file.white-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\inline.openweb.light.png\">\r\n      <Link>Images\\Messages\\inline.openweb.light.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\inline.openweb.png\">\r\n      <Link>Images\\Messages\\inline.openweb.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\inline.share.light.png\">\r\n      <Link>Images\\Messages\\inline.share.light.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\inline.share.png\">\r\n      <Link>Images\\Messages\\inline.share.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\link.png\">\r\n      <Link>Images\\Messages\\link.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\media.black-WXGA.png\">\r\n      <Link>Images\\Messages\\media.black-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\media.canceldownload.png\">\r\n      <Link>Images\\Messages\\media.canceldownload.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\media.download-WXGA.png\">\r\n      <Link>Images\\Messages\\media.download-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\media.download.png\">\r\n      <Link>Images\\Messages\\media.download.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\media.download.white-WXGA.png\">\r\n      <Link>Images\\Messages\\media.download.white-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\media.white-WXGA.png\">\r\n      <Link>Images\\Messages\\media.white-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.deletereply.png\">\r\n      <Link>Images\\Messages\\message.deletereply.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.state.broadcast.png\">\r\n      <Link>Images\\Messages\\message.state.broadcast.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.state.read-WXGA.png\">\r\n      <Link>Images\\Messages\\message.state.read-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.state.sending-WXGA.png\">\r\n      <Link>Images\\Messages\\message.state.sending-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.state.sent-WXGA.png\">\r\n      <Link>Images\\Messages\\message.state.sent-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\message.state.views-WXGA.png\">\r\n      <Link>Images\\Messages\\message.state.views-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\movestickerpack.png\">\r\n      <Link>Images\\Messages\\movestickerpack.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\nomusic.png\">\r\n      <Link>Images\\Messages\\nomusic.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Messages\\unreadmessages.png\">\r\n      <Link>Images\\Messages\\unreadmessages.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\NumericKeyboard\\back.png\">\r\n      <Link>Images\\NumericKeyboard\\back.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\NumericKeyboard\\back.white.png\">\r\n      <Link>Images\\NumericKeyboard\\back.white.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\PhoneNumber\\changenumber_2x.png\">\r\n      <Link>Images\\PhoneNumber\\changenumber_2x.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Placeholder\\placeholder.broadcast.png\">\r\n      <Link>Images\\Placeholder\\placeholder.broadcast.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Placeholder\\placeholder.group.transparent-WXGA.png\">\r\n      <Link>Images\\Placeholder\\placeholder.group.transparent-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Placeholder\\placeholder.user.transparent-WXGA.png\">\r\n      <Link>Images\\Placeholder\\placeholder.user.transparent-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.1-720p.png\">\r\n      <Link>Images\\Startup\\intro.1-720p.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.2-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.2-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.3-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.3-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.4-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.4-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.5-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.5-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.6-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.6-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.channel.black-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.channel.black-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Images\\Startup\\intro.channel.white-WXGA.png\">\r\n      <Link>Images\\Startup\\intro.channel.white-WXGA.png</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Default.wav\">\r\n      <Link>Sounds\\Default.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound1.wav\">\r\n      <Link>Sounds\\Sound1.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound2.wav\">\r\n      <Link>Sounds\\Sound2.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound3.wav\">\r\n      <Link>Sounds\\Sound3.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound4.wav\">\r\n      <Link>Sounds\\Sound4.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound5.wav\">\r\n      <Link>Sounds\\Sound5.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\Sounds\\Sound6.wav\">\r\n      <Link>Sounds\\Sound6.wav</Link>\r\n    </Content>\r\n    <Content Include=\"..\\TelegramClient\\ToastPromptIcon.png\">\r\n      <Link>ToastPromptIcon.png</Link>\r\n    </Content>\r\n    <None Include=\"FFMpegBuild.txt\" />\r\n    <Content Include=\"Assets\\emoji.faved-WXGA.png\" />\r\n    <Content Include=\"Assets\\light.emoji.faved-WXGA.png\" />\r\n    <Content Include=\"Assets\\photo_flip.png\" />\r\n    <Content Include=\"Assets\\photo_paint.png\" />\r\n    <Content Include=\"Assets\\photo_paint_brush.png\" />\r\n    <Content Include=\"Assets\\photo_paint_text.png\" />\r\n    <Content Include=\"Assets\\photo_sticker.png\" />\r\n    <Content Include=\"Assets\\photo_undo.png\" />\r\n    <Content Include=\"Assets\\emoji.stickers_none.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\ic_more_2x.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\ic_plus_2x.png\" />\r\n    <Content Include=\"Images\\ApplicationBar\\ic_search_2x.png\" />\r\n    <Content Include=\"Images\\Messages\\roundvideo.muted.png\" />\r\n    <Content Include=\"Images\\Placeholder\\ic_bookmark.png\" />\r\n    <Content Include=\"Images\\Settings\\noapps.black-WXGA.png\" />\r\n    <Content Include=\"Images\\Settings\\noapps.white-WXGA.png\" />\r\n    <Content Include=\"Images\\W10M\\authorize_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\default.png\">\r\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r\n    </Content>\r\n    <Content Include=\"Images\\W10M\\group_placeholder.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_1check_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_2checks_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_attach_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_bio_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_botkeyboard_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_call_answer_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_call_answer_blue_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_call_cancel_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_call_chat_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_call_ignore_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_call_mute_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_call_speaker_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_camera_photo_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_camera_stop_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_camera_switch_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_camera_video_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_cancel_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_chats_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_commands_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_delete_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_done_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_edit_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_emoji_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_flash_auto_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_flash_disabled_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_flash_enabled_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_gif_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_keyboard_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_livelocation_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_location_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_masks_msk1.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_microphone_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_more_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_mutechannel_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_muted_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_notifications_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_phone_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_photo_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_pic_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_pinnedchat_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_proxy_off_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_proxy_on_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_quality1080_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_quality2160_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_quality240_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_quality360_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_quality480_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_quality720_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_quality_auto_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_sadsticker_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_searchinput_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_search_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_secretchat_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_select_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_send_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_sesurity_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_share_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_stickers_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_timer_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_time_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_unmutechannel_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_updateapp_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_username_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\ic_verification_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\no_passport_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\no_password_2x.png\" />\r\n    <Content Include=\"Images\\W10M\\user_placeholder.png\" />\r\n    <Content Include=\"Sounds\\voip_call2.mp3\" />\r\n    <Content Include=\"Sounds\\voip_busy.mp3\" />\r\n    <Content Include=\"Sounds\\voip_call.mp3\" />\r\n    <Content Include=\"Sounds\\voip_connecting.mp3\" />\r\n    <Content Include=\"Sounds\\voip_end.mp3\" />\r\n    <Content Include=\"Sounds\\voip_failed.mp3\" />\r\n    <Content Include=\"Sounds\\voip_ringback.mp3\" />\r\n    <Content Include=\"WideTile310x150.png\" />\r\n    <Content Include=\"SquareTile150x150.png\" />\r\n    <Content Include=\"SquareTile71x71.png\" />\r\n    <Content Include=\"ApplicationIcon106.png\" />\r\n    <Content Include=\"IconicSmall110.png\" />\r\n    <Content Include=\"IconicTileMedium202.png\" />\r\n    <Content Include=\"PhoneVoIP.BackEnd.HostServer.exe\" />\r\n    <Content Include=\"$(SolutionDir)$(PlatformName)\\$(ConfigurationName)\\BackEndProxyStub\\PhoneVoIPApp.BackEndProxyStub.dll\" />\r\n    <None Include=\"Properties\\WMAppManifest.Public.xml\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n    <None Include=\"Properties\\WMAppManifest.Private.xml\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n    <Content Include=\"Images\\Audio\\microphone.dark.png\" />\r\n    <Content Include=\"Images\\Audio\\microphone.light.png\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\OpenCVComponent\\OpenCVComponent.vcxproj\">\r\n      <Project>{eadff7b8-e6c3-4f34-9b33-014b3035c595}</Project>\r\n      <Name>OpenCVComponent</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\FFmpegInterop\\Win8.1\\FFmpegInterop.WindowsPhone\\FFmpegInterop.WindowsPhone.vcxproj\">\r\n      <Project>{ebc5ca98-87f1-4a01-a48d-69659c103e72}</Project>\r\n      <Name>FFmpegInterop.WindowsPhone</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\libtgvoip-public\\libtgvoip.WP81.vcxproj\">\r\n      <Project>{21f10158-c078-4bd7-a82a-9c4aeb8e2f8e}</Project>\r\n      <Name>libtgvoip</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\Agents\\Agents.csproj\">\r\n      <Project>{820034c1-645d-4340-8813-d980c1ef77de}</Project>\r\n      <Name>Agents</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\BackEnd\\BackEnd.vcxproj\">\r\n      <Project>{c8d75245-ffcf-4932-a228-c9cc8bb60b03}</Project>\r\n      <Name>BackEnd</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\libtgnet\\libtgnet.vcxproj\">\r\n      <Project>{cc7a35bf-aabc-411d-b911-ac037a781266}</Project>\r\n      <Name>libtgnet</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\Telegram.Api.WP8\\Telegram.Api.WP8.csproj\">\r\n      <Project>{e79d5093-8038-4a5f-8a98-ca38c0d0886f}</Project>\r\n      <Name>Telegram.Api.WP8</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\Telegram.Controls.WP8\\Telegram.Controls.WP8.csproj\">\r\n      <Project>{f04be5a2-70df-4e82-bfb5-cd03985c9746}</Project>\r\n      <Name>Telegram.Controls.WP8</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\TelegramClient.Native\\TelegramClient.Native.vcxproj\">\r\n      <Project>{b51dd8c5-335d-4a2d-b429-6d0f41ed0281}</Project>\r\n      <Name>TelegramClient.Native</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\TelegramClient.Opus\\TelegramClient.Opus.vcxproj\">\r\n      <Project>{5E327850-E16E-4642-957A-FD52BF8D3D02}</Project>\r\n      <Name>TelegramClient.Opus</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\TelegramClient.Tasks\\TelegramClient.Tasks.csproj\">\r\n      <Project>{997bd0c4-68e8-4495-904a-eb798b166832}</Project>\r\n      <Name>TelegramClient.Tasks</Name>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\TelegramClient.WebP\\TelegramClient.WebP.vcxproj\">\r\n      <Project>{fae12fd9-edca-433e-ad11-f1663a998f35}</Project>\r\n      <Name>TelegramClient.WebP</Name>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.de.resx\">\r\n      <Link>Resources\\AppResources.de.resx</Link>\r\n      <SubType>Designer</SubType>\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.de.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.es.resx\">\r\n      <Link>Resources\\AppResources.es.resx</Link>\r\n      <SubType>Designer</SubType>\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.es.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.it.resx\">\r\n      <Link>Resources\\AppResources.it.resx</Link>\r\n      <SubType>Designer</SubType>\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.it.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.nl.resx\">\r\n      <Link>Resources\\AppResources.nl.resx</Link>\r\n      <SubType>Designer</SubType>\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.nl.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.pt.resx\">\r\n      <Link>Resources\\AppResources.pt.resx</Link>\r\n      <SubType>Designer</SubType>\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.pt.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.resx\">\r\n      <Link>Resources\\AppResources.resx</Link>\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.Designer.cs</LastGenOutput>\r\n      <SubType>Designer</SubType>\r\n    </EmbeddedResource>\r\n    <EmbeddedResource Include=\"..\\TelegramClient\\Resources\\AppResources.ru.resx\">\r\n      <Link>Resources\\AppResources.ru.resx</Link>\r\n      <SubType>Designer</SubType>\r\n      <Generator>PublicResXFileCodeGenerator</Generator>\r\n      <LastGenOutput>AppResources.ru.Designer.cs</LastGenOutput>\r\n    </EmbeddedResource>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Folder Include=\"Assets\\Emoji\\SpacedSpritesLandscape\\\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\$(TargetFrameworkVersion)\\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n  <Target Name=\"BeforeBuild\">\r\n    <Delete Files=\"Properties\\WMAppManifest.xml\" />\r\n    <Copy SourceFiles=\"Properties\\WMAppManifest.Private.xml\" DestinationFiles=\"Properties\\WMAppManifest.xml\" OverwriteReadOnlyFiles=\"True\" Condition=\" '$(Configuration)' == 'Release Private Beta' Or '$(Configuration)' == 'Debug Private Beta'\" />\r\n    <Copy SourceFiles=\"Properties\\WMAppManifest.Public.xml\" DestinationFiles=\"Properties\\WMAppManifest.xml\" OverwriteReadOnlyFiles=\"True\" Condition=\" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Debug'\" />\r\n  </Target>\r\n  <ProjectExtensions />\r\n  <Import Project=\"$(SolutionDir)\\.nuget\\NuGet.targets\" Condition=\"Exists('$(SolutionDir)\\.nuget\\NuGet.targets')\" />\r\n  <Import Project=\"..\\packages\\Microsoft.Bcl.Build.1.0.14\\tools\\Microsoft.Bcl.Build.targets\" Condition=\"Exists('..\\packages\\Microsoft.Bcl.Build.1.0.14\\tools\\Microsoft.Bcl.Build.targets')\" />\r\n  <Target Name=\"EnsureBclBuildImported\" BeforeTargets=\"BeforeBuild\" Condition=\"'$(BclBuildImported)' == ''\">\r\n    <Error Condition=\"!Exists('..\\packages\\Microsoft.Bcl.Build.1.0.14\\tools\\Microsoft.Bcl.Build.targets')\" Text=\"This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=317567.\" HelpKeyword=\"BCLBUILD2001\" />\r\n    <Error Condition=\"Exists('..\\packages\\Microsoft.Bcl.Build.1.0.14\\tools\\Microsoft.Bcl.Build.targets')\" Text=\"The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568.\" HelpKeyword=\"BCLBUILD2002\" />\r\n  </Target>\r\n  <PropertyGroup>\r\n    <FilesToXapDependsOn>$(FilesToXapDependsOn);BeforeFilesToXap</FilesToXapDependsOn>\r\n  </PropertyGroup>\r\n  <Target Name=\"BeforeFilesToXap\">\r\n    <ItemGroup>\r\n      <FilteredPackagingOutputs Remove=\"@(FilteredPackagingOutputs)\" Condition=\"'%(FilteredPackagingOutputs.OutputGroup)' == 'CopyLocalFilesOutputGroup' AND '%(FilteredPackagingOutputs.Extension)' == '.xml'\" />\r\n    </ItemGroup>\r\n  </Target>\r\n</Project>"
  },
  {
    "path": "TelegramClient.WP81/Themes/Default/ToggleSwitch.xaml",
    "content": "﻿<ResourceDictionary\r\n\txmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n\txmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n\txmlns:toolkitPrimitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n\txmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\">\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "TelegramClient.WP81/Themes/Default/W10M.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:toolkitPrimitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:primitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:themes=\"clr-namespace:TelegramClient.Themes\"\r\n    xmlns:notifications=\"clr-namespace:Telegram.Controls.Notifications;assembly=Telegram.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\">\r\n\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <themes:SharedResourceDictionary Source=\"/TelegramClient.WP8;component/Themes/Default/W10MCommon.xaml\"/>\r\n    </ResourceDictionary.MergedDictionaries>\r\n\r\n    <Style TargetType=\"notifications:ToastPrompt\">\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\" />\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeSmall}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Overlay\" Value=\"Transparent\" />\r\n        <Setter Property=\"TextWrapping\" Value=\"NoWrap\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"notifications:ToastPrompt\">\r\n                    <Grid Background=\"{TemplateBinding Background}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\">\r\n                        <Grid Margin=\"18,30,18,12\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <views:ConversationTileControl \r\n                                Size=\"48\"\r\n                                Margin=\"0,0,12,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                                Source=\"{Binding From.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                                Fill=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                                Text=\"{Binding From, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n                            <TextBlock Grid.Row=\"0\" Grid.Column=\"1\" Text=\"{TemplateBinding Title}\" Margin=\"0\" TextWrapping=\"NoWrap\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Height=\"24.83\" Style=\"{StaticResource PhoneTextSmallStyle}\" />\r\n                            <TextBlock Grid.Row=\"1\" Grid.Column=\"1\" Text=\"{TemplateBinding Message}\" Margin=\"0,-4,0,0\" TextWrapping=\"NoWrap\" TextTrimming=\"WordEllipsis\" Opacity=\"0.6\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Height=\"26.6\" FontSize=\"{StaticResource PhoneFontSizeNormal}\" Style=\"{StaticResource PhoneTextSmallStyle}\"/>\r\n                            <!--<dialogs:CommandsControl Grid.Row=\"2\" Grid.ColumnSpan=\"2\" Margin=\"0,6,0,0\" Inline=\"True\" ReplyMarkup=\"{Binding ReplyMarkup}\" Visibility=\"{Binding ReplyMarkup, Converter={StaticResource ExistsToVisibilityConverter}}\"/>-->\r\n\r\n                        </Grid>\r\n                        <Rectangle x:Name=\"TopBorder\" VerticalAlignment=\"Bottom\" Margin=\"0,0,0,0\" Height=\"2\" Fill=\"{TemplateBinding Overlay}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"SignInTextBoxStyle\" TargetType=\"TextBox\">\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"23\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n        <Setter Property=\"SelectionBackground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n        <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"Padding\" Value=\"14,2,1,2\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"MainBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"12,12,12,100\"/>\r\n                        <Border x:Name=\"ReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"12,12,12,100\" Visibility=\"Collapsed\"/>\r\n                        <Border BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"12,12,12,100\">\r\n                            <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"PCodeTextBoxStyle\" TargetType=\"TextBox\" BasedOn=\"{StaticResource SignInTextBoxStyle}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"Placeholder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"Placeholder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"Placeholder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"MainBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"12,12,12,100\"/>\r\n                        <Border x:Name=\"ReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"12,12,12,100\" Visibility=\"Collapsed\"/>\r\n                        <Border BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"12,12,12,100\">\r\n                            <Grid Margin=\"{StaticResource PhoneTextBoxInnerMargin}\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <ContentControl x:Name=\"Placeholder\" Content=\"+\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Padding=\"14,2,0,2\" VerticalContentAlignment=\"Stretch\"/>\r\n                                <ContentControl x:Name=\"ContentElement\" Grid.Column=\"1\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Padding=\"0,2,1,2\" VerticalContentAlignment=\"Stretch\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"TextButton\" TargetType=\"Button\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiLight}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeNormal}\"/>\r\n        <Setter Property=\"Padding\" Value=\"10,3,10,5\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ButtonBase\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"EmptyButtonStyle\" TargetType=\"Button\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid x:Name=\"ContentGrid\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ContentBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ContentBorder\" Width=\"38\" Height=\"38\" CornerRadius=\"19\" Background=\"{TemplateBinding Background}\">\r\n                            <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" />\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    \r\n    <Style TargetType=\"Button\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"23\"/>\r\n        <Setter Property=\"Padding\" Value=\"16,5,16,8\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ButtonBase\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"White\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"W10MWatermarkedTextBoxStyle\" TargetType=\"controls:WatermarkedTextBox\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"23\"/>\r\n        <Setter Property=\"Background\" Value=\"White\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"White\"/>\r\n        <Setter Property=\"SelectionBackground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n        <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"Padding\" Value=\"15,3,42,4\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"controls:WatermarkedTextBox\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledOrReadonlyContent\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"White\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"White\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <Grid>\r\n                                <Image Source=\"/Images/W10M/ic_searchinput_2x.png\" IsHitTestVisible=\"False\" Width=\"19\" Height=\"19\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" Margin=\"0,-12,12,-12\"/>\r\n                                <ContentControl x:Name=\"WatermarkInlineContent\" Background=\"Transparent\" Content=\"{TemplateBinding InlineWatermark}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" Opacity=\"0.5\" Style=\"{TemplateBinding WatermarkStyle}\"/>\r\n                                <ContentControl x:Name=\"WatermarkContent\" Background=\"Transparent\" Content=\"{TemplateBinding Watermark}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" Opacity=\"0.5\" Style=\"{TemplateBinding WatermarkStyle}\"/>\r\n                                <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>                                \r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledOrReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                            <TextBox x:Name=\"DisabledOrReadonlyContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\" FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" IsReadOnly=\"True\" SelectionForeground=\"{TemplateBinding SelectionForeground}\" SelectionBackground=\"{TemplateBinding SelectionBackground}\" TextAlignment=\"{TemplateBinding TextAlignment}\" TextWrapping=\"{TemplateBinding TextWrapping}\" Text=\"{TemplateBinding Text}\" Template=\"{StaticResource PhoneDisabledTextBoxTemplate}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"W10MPivotHeaderItemStyle\" TargetType=\"ListBoxItem\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBoxItem\">\r\n                    <Border x:Name=\"LayoutRoot\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"LayoutRoot\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TransparentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation Duration=\"0\" To=\".5\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ContentContainer\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ContentContainer\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ContentControl x:Name=\"ContentContainer\" Opacity=\"{StaticResource PhonePivotUnselectedItemOpacity}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    \r\n    <Style x:Key=\"W10MPivotStyle\" TargetType=\"phone:Pivot\">\r\n        <Setter Property=\"Margin\" Value=\"0,32,0,0\"/>\r\n        <Setter Property=\"Padding\" Value=\"0,-37,0,0\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"ItemsPanel\">\r\n            <Setter.Value>\r\n                <ItemsPanelTemplate>\r\n                    <Grid/>\r\n                </ItemsPanelTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"phone:Pivot\">\r\n                    <Grid HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid Background=\"{TemplateBinding Background}\" Grid.RowSpan=\"3\"/>\r\n                        <ContentControl x:Name=\"TitleElement\" ContentTemplate=\"{TemplateBinding TitleTemplate}\" Content=\"{TemplateBinding Title}\" HorizontalAlignment=\"Left\" Margin=\"24,17,0,-7\" Style=\"{StaticResource PivotTitleStyle}\"/>\r\n                        <primitives:PivotHeadersControl x:Name=\"HeadersListElement\" Grid.Row=\"1\" Foreground=\"White\"/>\r\n                        <ItemsPresenter x:Name=\"PivotItemPresenter\" Margin=\"{TemplateBinding Padding}\" Grid.Row=\"2\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"toolkitPrimitives:ToggleSwitchButton\">\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"2\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"IsChecked\" Value=\"False\"/>\r\n        <Setter Property=\"SwitchForeground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkitPrimitives:ToggleSwitchButton\">\r\n                    <Border x:Name=\"Root\" CacheMode=\"BitmapCache\" Opacity=\"{TemplateBinding Opacity}\" Padding=\"{TemplateBinding Padding}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\" To=\"{StaticResource PhoneForegroundColor}\" Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\" Storyboard.TargetName=\"ThumbCenter\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.3\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Root\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.05\" To=\"Unchecked\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.05\" To=\"Checked\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"36\" Storyboard.TargetProperty=\"(TranslateTransform.X)\" Storyboard.TargetName=\"ThumbTranslation\">\r\n                                            <DoubleAnimation.EasingFunction>\r\n                                                <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"15\"/>\r\n                                            </DoubleAnimation.EasingFunction>\r\n                                        </DoubleAnimation>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"SwitchBackgroundBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Dragging\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"SwitchBackgroundBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\" To=\"{StaticResource PhoneForegroundColor}\" Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\" Storyboard.TargetName=\"ThumbCenter\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"(TranslateTransform.X)\" Storyboard.TargetName=\"ThumbTranslation\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"SwitchRoot\" Background=\"Transparent\" Height=\"91\" Width=\"113\">\r\n                            <Grid x:Name=\"SwitchTrack\" Width=\"66\">\r\n                                <Grid Height=\"30\">\r\n                                    <Border x:Name=\"SwitchBackgroundBorder\" Background=\"{TemplateBinding SwitchForeground}\" CornerRadius=\"15\"/>\r\n                                    <Rectangle x:Name=\"SwitchBackground\" Fill=\"Transparent\"/>\r\n                                    <Border x:Name=\"Border1\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"15\" Background=\"{TemplateBinding Background}\"/>\r\n                                </Grid>\r\n                                <Border x:Name=\"SwitchThumb\" BorderBrush=\"Transparent\" Background=\"Transparent\" BorderThickness=\"4,0\" HorizontalAlignment=\"Left\" Height=\"38\" Margin=\"3,0\">\r\n                                    <Border.RenderTransform>\r\n                                        <TranslateTransform x:Name=\"ThumbTranslation\"/>\r\n                                    </Border.RenderTransform>\r\n                                    <Border x:Name=\"ThumbCenter\" Width=\"16\" Height=\"16\" CornerRadius=\"8\" Background=\"White\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    \r\n    <Style TargetType=\"toolkit:ToggleSwitch\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"23\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"SwitchForeground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkit:ToggleSwitch\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CacheMode=\"BitmapCache\" Padding=\"{TemplateBinding Padding}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.3\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Header\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.3\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Content\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Margin=\"12,0,12,24\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <ContentControl x:Name=\"Header\" Grid.ColumnSpan=\"2\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" Content=\"{TemplateBinding Header}\" HorizontalAlignment=\"Left\" IsTabStop=\"False\" Margin=\"0,0,0,18\" Opacity=\"{TemplateBinding Opacity}\" VerticalAlignment=\"Bottom\"/>\r\n                            <ContentControl x:Name=\"Content\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsTabStop=\"False\" Margin=\"19,-2,0,0\" Opacity=\"{TemplateBinding Opacity}\" Grid.Row=\"1\" Grid.Column=\"1\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            <toolkitPrimitives:ToggleSwitchButton x:Name=\"Switch\" Background=\"{TemplateBinding Background}\" Grid.Column=\"0\" Grid.Row=\"1\" Margin=\"-24,-31,-24,-28\" Opacity=\"{TemplateBinding Opacity}\" SwitchForeground=\"{TemplateBinding SwitchForeground}\" VerticalAlignment=\"Bottom\"/>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n\r\n\r\n    <Style x:Key=\"ProfileLightToggleSwitchButton\" TargetType=\"toolkitPrimitives:ToggleSwitchButton\">\r\n        <Setter Property=\"BorderBrush\" Value=\"White\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"2\"/>\r\n        <Setter Property=\"Background\" Value=\"#FF3F83B1\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"IsChecked\" Value=\"False\"/>\r\n        <Setter Property=\"SwitchForeground\" Value=\"White\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkitPrimitives:ToggleSwitchButton\">\r\n                    <Border x:Name=\"Root\" CacheMode=\"BitmapCache\" Opacity=\"{TemplateBinding Opacity}\" Padding=\"{TemplateBinding Padding}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\" To=\"{StaticResource PhoneForegroundColor}\" Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\" Storyboard.TargetName=\"ThumbCenter\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.3\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Root\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.05\" To=\"Unchecked\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.05\" To=\"Checked\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"36\" Storyboard.TargetProperty=\"(TranslateTransform.X)\" Storyboard.TargetName=\"ThumbTranslation\">\r\n                                            <DoubleAnimation.EasingFunction>\r\n                                                <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"15\"/>\r\n                                            </DoubleAnimation.EasingFunction>\r\n                                        </DoubleAnimation>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Dragging\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"SwitchBackgroundBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ThumbCenter\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"White\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"(TranslateTransform.X)\" Storyboard.TargetName=\"ThumbTranslation\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"SwitchRoot\" Background=\"Transparent\" Height=\"91\" Width=\"113\">\r\n                            <Grid x:Name=\"SwitchTrack\" Width=\"66\">\r\n                                <Grid Height=\"30\">\r\n                                    <Border x:Name=\"SwitchBackgroundBorder\" Background=\"{TemplateBinding SwitchForeground}\" CornerRadius=\"15\"/>\r\n                                    <Rectangle x:Name=\"SwitchBackground\" Fill=\"Transparent\"/>\r\n                                    <Border x:Name=\"Border1\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"15\" Background=\"{TemplateBinding Background}\"/>\r\n                                </Grid>\r\n                                <Border x:Name=\"SwitchThumb\" BorderBrush=\"Transparent\" Background=\"Transparent\" BorderThickness=\"4,0\" HorizontalAlignment=\"Left\" Height=\"38\" Margin=\"3,0\">\r\n                                    <Border.RenderTransform>\r\n                                        <TranslateTransform x:Name=\"ThumbTranslation\"/>\r\n                                    </Border.RenderTransform>\r\n                                    <Border x:Name=\"ThumbCenter\" Width=\"16\" Height=\"16\" CornerRadius=\"8\" Background=\"#FF3F83B1\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ProfileLightToggleSwitch\" TargetType=\"toolkit:ToggleSwitch\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"23\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"SwitchForeground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkit:ToggleSwitch\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CacheMode=\"BitmapCache\" Padding=\"{TemplateBinding Padding}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.3\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Header\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.3\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Content\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Margin=\"12,5,12,42\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <ContentControl x:Name=\"Header\" Grid.ColumnSpan=\"2\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" Content=\"{TemplateBinding Header}\" HorizontalAlignment=\"Left\" IsTabStop=\"False\" Margin=\"0,0,0,18\" Opacity=\"{TemplateBinding Opacity}\" VerticalAlignment=\"Bottom\"/>\r\n                            <ContentControl x:Name=\"Content\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsTabStop=\"False\" Margin=\"19,-2,0,0\" Opacity=\"{TemplateBinding Opacity}\" Grid.Row=\"1\" Grid.Column=\"1\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            <toolkitPrimitives:ToggleSwitchButton x:Name=\"Switch\" Grid.Column=\"0\" Grid.Row=\"1\" Margin=\"-24,-31,-24,-28\" Opacity=\"{TemplateBinding Opacity}\" VerticalAlignment=\"Bottom\" Style=\"{StaticResource ProfileLightToggleSwitchButton}\"/>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"PhoneButtonBase\" TargetType=\"ButtonBase\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n        <Setter Property=\"Padding\" Value=\"10,5,10,6\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ButtonBase\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    \r\n    <Style x:Key=\"PhoneRadioButtonCheckBoxBase\" BasedOn=\"{StaticResource PhoneButtonBase}\" TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneRadioCheckBoxBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"23\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n    </Style>\r\n    \r\n    <Style BasedOn=\"{StaticResource PhoneRadioButtonCheckBoxBase}\" TargetType=\"CheckBox\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CheckBox\">\r\n                    <Grid Background=\"Transparent\" HorizontalAlignment=\"Left\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"CheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"PressBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Stroke\" Storyboard.TargetName=\"CheckMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Stroke\" Storyboard.TargetName=\"IndeterminateMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"CheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledCheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Stroke\" Storyboard.TargetName=\"CheckMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"IndeterminateMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"CheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"CheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledCheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"CheckMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"CheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"CheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"IndeterminateMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Margin=\"12,18\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"30\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid Grid.Column=\"0\" VerticalAlignment=\"Top\">\r\n                                <Border x:Name=\"CheckBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2\" Background=\"{TemplateBinding Background}\" HorizontalAlignment=\"Left\" Height=\"30\" IsHitTestVisible=\"False\" VerticalAlignment=\"Center\" Width=\"30\"/>\r\n                                <Border x:Name=\"PressBackground\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\" BorderThickness=\"2\" Background=\"{StaticResource PhoneSubtleBrush}\" HorizontalAlignment=\"Left\" Height=\"30\" IsHitTestVisible=\"False\" VerticalAlignment=\"Center\" Width=\"30\"/>\r\n                                <Border x:Name=\"DisabledCheckBackground\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"2\" Background=\"Transparent\" HorizontalAlignment=\"Left\" Height=\"30\" IsHitTestVisible=\"False\" VerticalAlignment=\"Center\" Width=\"30\"/>\r\n\r\n                                <Rectangle x:Name=\"IndeterminateMark\" Fill=\"White\" HorizontalAlignment=\"Center\" Height=\"18\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" VerticalAlignment=\"Center\" Width=\"18\"/>\r\n                                <Polyline x:Name=\"CheckMark\" Points=\"26 7 11 22 5 16\" FillRule=\"NonZero\" StrokeThickness=\"2\" Stroke=\"White\" Fill=\"Transparent\" IsHitTestVisible=\"False\" FlowDirection=\"LeftToRight\" Visibility=\"Collapsed\"/>\r\n                            </Grid>\r\n                            <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" FontSize=\"{TemplateBinding FontSize}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"18,-2,0,0\" Padding=\"{TemplateBinding Padding}\" VerticalAlignment=\"Top\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style BasedOn=\"{StaticResource PhoneRadioButtonCheckBoxBase}\" TargetType=\"RadioButton\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"RadioButton\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"CheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"PressBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"CheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"CheckMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"CheckMark\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"CheckMark\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Stroke\" Storyboard.TargetName=\"CheckBackground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Margin=\"12,18\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"30\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Ellipse x:Name=\"CheckBackground\" Fill=\"{TemplateBinding Background}\" HorizontalAlignment=\"Left\" Height=\"30\" IsHitTestVisible=\"False\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\" Width=\"30\"/>\r\n                            <Ellipse x:Name=\"PressBackground\" Visibility=\"Collapsed\" Fill=\"{StaticResource PhoneSubtleBrush}\" HorizontalAlignment=\"Left\" Height=\"30\" IsHitTestVisible=\"False\" StrokeThickness=\"0\" VerticalAlignment=\"Center\" Width=\"30\"/>\r\n                            <Ellipse x:Name=\"DisabledBackground\" Visibility=\"Collapsed\" HorizontalAlignment=\"Left\" Height=\"30\" IsHitTestVisible=\"False\" Stroke=\"{StaticResource PhoneDisabledBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\" Width=\"30\"/>\r\n\r\n                            <Ellipse x:Name=\"CheckMark\" Fill=\"{StaticResource PhoneRadioCheckBoxCheckBrush}\" HorizontalAlignment=\"Center\" Height=\"18\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" VerticalAlignment=\"Center\" Width=\"18\"/>\r\n                            <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" Foreground=\"{TemplateBinding Foreground}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"18,-2,0,0\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"toolkit:ListPicker\">\r\n        <Setter Property=\"toolkit:TiltEffect.IsTiltEnabled\" Value=\"False\"/>\r\n        <Setter Property=\"toolkit:TiltEffect.SuppressTilt\" Value=\"True\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"23\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"Margin\" Value=\"{StaticResource PhoneTouchTargetOverhang}\"/>\r\n        <Setter Property=\"PickerPageUri\" Value=\"/Microsoft.Phone.Controls.Toolkit;component/ListPicker/ListPickerPage.xaml\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkit:ListPicker\">\r\n                    <StackPanel>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"PickerStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Highlighted\">\r\n                                    <Storyboard>\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"UserControl\" Storyboard.TargetProperty=\"Foreground\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame Value=\"{StaticResource PhoneTextBoxForegroundBrush}\" KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"Background\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame Value=\"{StaticResource PhoneTextBoxEditBackgroundColor}\" KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"BorderBrush\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame Value=\"{StaticResource TelegramBadgeAccentBrush}\" KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"DropDownMark\" Storyboard.TargetProperty=\"Stroke\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame Value=\"{StaticResource TelegramBadgeAccentBrush}\" KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"Background\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame Value=\"{StaticResource TransparentBrush}\" KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"BorderBrush\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame Value=\"{StaticResource PhoneDisabledBrush}\" KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"DropDownMark\" Storyboard.TargetProperty=\"Stroke\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame Value=\"{StaticResource PhoneDisabledBrush}\" KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"UserControl\" Storyboard.TargetProperty=\"Foreground\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame Value=\"{StaticResource PhoneDisabledBrush}\" KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Header\" Storyboard.TargetProperty=\"Foreground\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame Value=\"{StaticResource PhoneDisabledBrush}\" KeyTime=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <TextBlock\r\n                                x:Name=\"Header\"\r\n                                Text=\"{TemplateBinding Header}\"\r\n                                TextWrapping=\"Wrap\"\r\n                                Foreground=\"{TemplateBinding Foreground}\"\r\n                                FontSize=\"23\"\r\n                                Margin=\"0 0 0 12\"/>\r\n                        <Grid>\r\n                            <Border x:Name=\"Border\"\r\n                                    Background=\"{TemplateBinding Background}\"\r\n                                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                    BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                                <UserControl x:Name=\"UserControl\" Foreground=\"{TemplateBinding Foreground}\">\r\n                                    <StackPanel>\r\n                                        <TextBlock x:Name=\"MultipleSelectionModeSummary\" Margin=\"14 5 0 8\"/>\r\n                                        <Canvas x:Name=\"ItemsPresenterHost\" MinHeight=\"44\">\r\n                                            <ItemsPresenter x:Name=\"ItemsPresenter\" Margin=\"14 0 0 0\">\r\n                                                <ItemsPresenter.RenderTransform>\r\n                                                    <TranslateTransform x:Name=\"ItemsPresenterTranslateTransform\"/>\r\n                                                </ItemsPresenter.RenderTransform>\r\n                                            </ItemsPresenter>\r\n                                        </Canvas>\r\n                                    </StackPanel>\r\n                                </UserControl>\r\n                            </Border>\r\n                            <Polyline x:Name=\"DropDownMark\" Points=\"0 0 9 9 18 0\" FillRule=\"NonZero\" Margin=\"0 0 20 0\" StrokeThickness=\"2\" Stroke=\"{TemplateBinding BorderBrush}\" Fill=\"Transparent\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" IsHitTestVisible=\"False\" FlowDirection=\"LeftToRight\"/>\r\n                        </Grid>\r\n                    </StackPanel>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    \r\n    <Style TargetType=\"TextBox\">\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"23\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n        <Setter Property=\"SelectionBackground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n        <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"Padding\" Value=\"16,3,0,5\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBorderBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"MainBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\"/>\r\n                        <Border x:Name=\"ReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\"/>\r\n                        <Border BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"W10MContextMenuStyle\" TargetType=\"toolkit:ContextMenu\">\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"IsZoomEnabled\" Value=\"False\"/>\r\n        <Setter Property=\"Padding\" Value=\"0 12 0 14\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PhoneChromeBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkit:ContextMenu\">\r\n                    <StackPanel x:Name=\"OuterPanel\" Width=\"360\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Margin}\">\r\n                        <StackPanel.RenderTransform>\r\n                            <TransformGroup>\r\n                                <ScaleTransform x:Name=\"ScaleX\" ScaleX=\"0\"/>\r\n                            </TransformGroup>\r\n                        </StackPanel.RenderTransform>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"VisibilityStates\">\r\n                                <VisualState x:Name=\"Open\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"ScaleX\" Storyboard.TargetName=\"ScaleX\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"1\"/>\r\n\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"ScaleY\" Storyboard.TargetName=\"ScaleY\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:.3\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:.42\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border1\"/>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border2Reversed\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.4099\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.41\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"OpenReversed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"ScaleX\" Storyboard.TargetName=\"ScaleX\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"ScaleY\" Storyboard.TargetName=\"ScaleY\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.42\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border2Reversed\"/>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border1\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.4099\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.41\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"OpenLandscape\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"ScaleY\" Storyboard.TargetName=\"ScaleX\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"ScaleX\" Storyboard.TargetName=\"ScaleY\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.42\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border1\"/>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border2Reversed\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.4099\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.41\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"OpenLandscapeReversed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"ScaleY\" Storyboard.TargetName=\"ScaleX\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"1\"/>\r\n\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"ScaleX\" Storyboard.TargetName=\"ScaleY\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.3\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.42\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border2Reversed\"/>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"0:0:0.42\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border1\">\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.4099\" Value=\"0\"/>\r\n                                            <LinearDoubleKeyFrame KeyTime=\"0:0:0.41\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Closed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"ScaleX\" Storyboard.TargetName=\"ScaleX\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"ScaleY\" Storyboard.TargetName=\"ScaleX\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"ScaleY\" Storyboard.TargetName=\"ScaleY\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"ScaleX\" Storyboard.TargetName=\"ScaleY\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border1\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Border2Reversed\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <Grid x:Name=\"Border1\">\r\n                            <Rectangle Fill=\"{TemplateBinding Background}\" MinWidth=\"2\" MinHeight=\"2\"/>\r\n                            <Rectangle Fill=\"{TemplateBinding BorderBrush}\" MinWidth=\"2\" MinHeight=\"2\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"InnerGrid\" Background=\"{TemplateBinding Background}\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.RenderTransform>\r\n                                <ScaleTransform x:Name=\"ScaleY\" ScaleY=\"0\"/>\r\n                            </Grid.RenderTransform>\r\n                            <Border Grid.Row=\"1\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2,0\" Width=\"360\" HorizontalAlignment=\"Left\" IsHitTestVisible=\"False\"/>\r\n                            <ItemsPresenter Grid.Row=\"1\" Margin=\"{TemplateBinding Padding}\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"Border2Reversed\">\r\n                            <Rectangle Fill=\"{TemplateBinding Background}\" MinWidth=\"2\" MinHeight=\"2\"/>\r\n                            <Rectangle Fill=\"{TemplateBinding BorderBrush}\" MinWidth=\"2\" MinHeight=\"2\"/>\r\n                        </Grid>\r\n                    </StackPanel>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    \r\n    <Style TargetType=\"toolkit:MenuItem\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"23\"/>\r\n        <Setter Property=\"Padding\" Value=\"20 18 0 18\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"toolkit:MenuItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"Presenter\" Storyboard.TargetProperty=\"Opacity\" To=\"0.5\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ContentPresenter\r\n                            x:Name=\"Presenter\"\r\n                            Content=\"{TemplateBinding Header}\"\r\n                            ContentTemplate=\"{TemplateBinding HeaderTemplate}\"\r\n                            Margin=\"{TemplateBinding Padding}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <ControlTemplate x:Key=\"PhoneDisabledPasswordBoxTemplate\" TargetType=\"PasswordBox\">\r\n        <Border x:Name=\"ContentElement\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\"/>\r\n    </ControlTemplate>\r\n    \r\n    <Style TargetType=\"PasswordBox\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Setter Property=\"SelectionBackground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n        <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"23\"/>\r\n        <Setter Property=\"Padding\" Value=\"16,5,16,8\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"PasswordBox\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                            <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                            <PasswordBox x:Name=\"DisabledContent\" Background=\"Transparent\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" Foreground=\"{StaticResource PhoneDisabledBrush}\" Password=\"{TemplateBinding Password}\" PasswordChar=\"{TemplateBinding PasswordChar}\" Padding=\"{TemplateBinding Padding}\" Template=\"{StaticResource PhoneDisabledPasswordBoxTemplate}\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "TelegramClient.WP81/Themes/Default/W10MCommon.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n\r\n    <SolidColorBrush Color=\"#3F83B1\" x:Key=\"TelegramBrush\"/>\r\n    <SolidColorBrush Color=\"#1989CD\" x:Key=\"TelegramAccentBrush\"/>\r\n    <SolidColorBrush Color=\"#BEC2C7\" x:Key=\"TelegramBadgeSubtleBrush\"/>\r\n    <SolidColorBrush Color=\"#29B6F6\" x:Key=\"TelegramBadgeAccentBrush\"/>\r\n    <SolidColorBrush Color=\"#1E93DA\" x:Key=\"TelegramTextAccentBrush\"/>\r\n    <SolidColorBrush Color=\"#E94652\" x:Key=\"TelegramTextRedBrush\"/>\r\n    \r\n\r\n    <!--<system:Int32 x:Key=\"TelegramFontSizeNormal\">23</system:Int32>\r\n    <system:Int32 x:Key=\"TelegramFontSizeSmall\">20</system:Int32>-->\r\n</ResourceDictionary>"
  },
  {
    "path": "TelegramClient.WP81/Themes/SharedResourceDictionary.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Themes\r\n{\r\n    public class SharedResourceDictionary : ResourceDictionary\r\n    {\r\n        public static Dictionary<Uri, ResourceDictionary> _sharedDictionaries = new Dictionary<Uri, ResourceDictionary>();\r\n\r\n        private Uri _sourceUri;\r\n\r\n        public new Uri Source\r\n        {\r\n            get { return _sourceUri; }\r\n            set\r\n            {\r\n                _sourceUri = value;\r\n                if (!_sharedDictionaries.ContainsKey(value))\r\n                {\r\n                    Application.LoadComponent(this, value);\r\n                    _sharedDictionaries.Add(value, this);\r\n                }\r\n                else\r\n                {\r\n                    CopyInto(this, _sharedDictionaries[value]);\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void CopyInto(ResourceDictionary copy, ResourceDictionary original)\r\n        {\r\n            foreach (var dictionary in original.MergedDictionaries)\r\n            {\r\n                var mergedCopy = new ResourceDictionary();\r\n                CopyInto(mergedCopy, dictionary);\r\n                copy.MergedDictionaries.Add(mergedCopy);\r\n            }\r\n            foreach (DictionaryEntry pair in original)\r\n            {\r\n                copy.Add(pair.Key, pair.Value);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Utils/Passport.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Runtime.InteropServices.WindowsRuntime;\r\nusing System.Runtime.Serialization;\r\nusing System.Runtime.Serialization.Json;\r\nusing System.Threading.Tasks;\r\nusing Windows.Security.Cryptography.Core;\r\nusing Windows.Storage;\r\nusing Windows.Storage.Streams;\r\nusing Org.BouncyCastle.Crypto;\r\nusing Org.BouncyCastle.Crypto.Digests;\r\nusing Org.BouncyCastle.Crypto.Encodings;\r\nusing Org.BouncyCastle.Crypto.Engines;\r\nusing Org.BouncyCastle.Crypto.Parameters;\r\nusing Org.BouncyCastle.OpenSsl;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Utils.SecureCredentials;\r\nusing TelegramClient.ViewModels.Passport;\r\nusing Buffer = Windows.Storage.Streams.Buffer;\r\nusing File = TelegramClient.Utils.SecureCredentials.File;\r\n\r\nnamespace TelegramClient.Utils\r\n{\r\n    static class Passport\r\n    {\r\n        public static bool IsValidPostCode(string postcode)\r\n        {\r\n            foreach (var symbol in postcode)\r\n            {\r\n                if (!IsValidPostCodeSymbol(symbol)) return false;\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private static bool IsValidPostCodeSymbol(char symbol)\r\n        {\r\n            if (symbol >= 'a' && symbol <= 'z'\r\n                || symbol >= 'A' && symbol <= 'Z'\r\n                || symbol >= '0' && symbol <= '9'\r\n                || symbol == '-')\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public static bool IsValidName(string postcode)\r\n        {\r\n            foreach (var symbol in postcode)\r\n            {\r\n                if (!IsValidNameSymbol(symbol)) return false;\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private static bool IsValidNameSymbol(char symbol)\r\n        {\r\n            if (symbol >= 'a' && symbol <= 'z'\r\n                || symbol >= 'A' && symbol <= 'Z'\r\n                || symbol >= '0' && symbol <= '9'\r\n                || symbol == '-'\r\n                || symbol == '.'\r\n                || symbol == ','\r\n                || symbol == '/'\r\n                || symbol == '&'\r\n                || symbol == '\\''\r\n                || symbol == ' ')\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static TLString DoFinal(bool forEncryption, TLString data, byte[] hash)\r\n        {\r\n            var secretKey = hash.SubArray(0, 32);\r\n            var iv = hash.SubArray(32, 16);\r\n\r\n            var cipher = CipherUtilities.GetCipher(\"AES/CBC/NOPADDING\");\r\n            var param = new KeyParameter(secretKey);\r\n            cipher.Init(forEncryption, new ParametersWithIV(param, iv));\r\n            var result = cipher.DoFinal(data.Data);\r\n\r\n            return TLString.FromBigEndianData(result);\r\n        }\r\n\r\n        private static TLString EncryptSecureData(TLString data, TLString valueSecret, TLString hash)\r\n        {\r\n            var sha512 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha512);\r\n            var secretHash = sha512.HashData(TLUtils.Combine(valueSecret.Data, hash.Data).AsBuffer()).ToArray();\r\n\r\n            var result = DoFinal(true, data, secretHash);\r\n\r\n            return result;\r\n        }\r\n\r\n        private static TLString DecryptSecureData(TLString data, TLString valueSecret, TLString hash)\r\n        {\r\n            var sha512 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha512);\r\n            var secretHash = sha512.HashData(TLUtils.Combine(valueSecret.Data, hash.Data).AsBuffer()).ToArray();\r\n\r\n            var result = DoFinal(false, data, secretHash);\r\n\r\n            return result;\r\n        }\r\n\r\n        public static TLString EncryptValueSecret(TLString valueSecret, TLString secret, TLString hash)\r\n        {\r\n            var sha512 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha512);\r\n            var secretHash = sha512.HashData(TLUtils.Combine(secret.Data, hash.Data).AsBuffer()).ToArray();\r\n\r\n            return DoFinal(true, valueSecret, secretHash);\r\n        }\r\n\r\n        public static TLString DecryptValueSecret(TLString secureValueSecret, TLString secret, TLString hash)\r\n        {\r\n            var sha512 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha512);\r\n            var secretHash = sha512.HashData(TLUtils.Combine(secret.Data, hash.Data).AsBuffer()).ToArray();\r\n\r\n            return DoFinal(false, secureValueSecret, secretHash);\r\n        }\r\n\r\n        public static TLSecureValue EncryptSecureValue(TLSecureValue secureValue, TLString innerData, TLString valueSecret, TLString secret)\r\n        {\r\n            var length = innerData.Data.Length % 16;\r\n            var paddingLength = 16 - length + 32;\r\n            var padding = new byte[paddingLength];\r\n\r\n            var randomGenerator = new SecureRandom(TLString.Empty.Data);\r\n            randomGenerator.NextBytes(padding);\r\n\r\n            padding[0] = (byte)paddingLength;\r\n            var decryptedData = TLString.FromBigEndianData(TLUtils.Combine(padding, innerData.Data));\r\n\r\n            secureValue.Data = new TLSecureData();\r\n\r\n            var dataHash = Telegram.Api.Helpers.Utils.ComputeSHA256(decryptedData.Data);\r\n            secureValue.Data.DataHash = TLString.FromBigEndianData(dataHash);\r\n\r\n            var data = EncryptSecureData(\r\n                decryptedData,\r\n                valueSecret,\r\n                secureValue.Data.DataHash);\r\n            secureValue.Data.Data = data;\r\n\r\n            var secureValueSecret = EncryptValueSecret(\r\n                valueSecret,\r\n                secret,\r\n                secureValue.Data.DataHash);\r\n            secureValue.Data.Secret = secureValueSecret;\r\n\r\n            return secureValue;\r\n        }\r\n\r\n        public static TLSecureCredentialsEncrypted EncryptSecureCredentials(TLString innerData, TLString credentialsSecret)\r\n        {\r\n            var credentials = new TLSecureCredentialsEncrypted();\r\n\r\n            var length = innerData.Data.Length % 16;\r\n            var paddingLength = 16 - length + 32;\r\n            var padding = new byte[paddingLength];\r\n\r\n            var randomGenerator = new SecureRandom(TLString.Empty.Data);\r\n            randomGenerator.NextBytes(padding);\r\n\r\n            padding[0] = (byte)paddingLength;\r\n            var decryptedData = TLString.FromBigEndianData(TLUtils.Combine(padding, innerData.Data));\r\n\r\n            var dataHash = Telegram.Api.Helpers.Utils.ComputeSHA256(decryptedData.Data);\r\n            credentials.Hash = TLString.FromBigEndianData(dataHash);\r\n\r\n            var data = EncryptSecureData(\r\n                decryptedData,\r\n                credentialsSecret,\r\n                credentials.Hash);\r\n            credentials.Data = data;\r\n\r\n            return credentials;\r\n        }\r\n\r\n        public static TLString DecryptSecureValue(TLSecureValue secureValue, TLString secret)\r\n        {\r\n            var value = DecryptValueSecret(\r\n                secureValue.Data.Secret,\r\n                secret,\r\n                secureValue.Data.DataHash);\r\n\r\n            if (!IsGoodSecret(value)) return null;\r\n\r\n            var data = DecryptSecureData(\r\n                secureValue.Data.Data,\r\n                value,\r\n                secureValue.Data.DataHash);\r\n\r\n            if (data.Data.Length == 0) return null;\r\n\r\n            var dataHash = Telegram.Api.Helpers.Utils.ComputeSHA256(data.Data);\r\n            if (!TLUtils.ByteArraysEqual(secureValue.Data.DataHash.Data, dataHash)) return null;\r\n\r\n            var length = data.Data[0];\r\n            if (length < 32 || length > 255) return null;\r\n\r\n            var innerData = data.Data.SubArray(length, data.Data.Length - length);\r\n\r\n            return TLString.FromBigEndianData(innerData);\r\n        }\r\n\r\n        public static TLString GenerateSecret(TLString secretRandom)\r\n        {\r\n            var randomGenerator = new SecureRandom(secretRandom.Data);\r\n            var secret = new byte[32];\r\n            randomGenerator.NextBytes(secret);\r\n\r\n            var sum = secret.Sum(x => x) % 255;\r\n            var diff = secret[secret.Length - 1] + 239 - sum;\r\n            secret[secret.Length - 1] = (byte)(diff % 255);\r\n\r\n            return TLString.FromBigEndianData(secret);\r\n        }\r\n\r\n        public static bool IsGoodSecret(TLString secret)\r\n        {\r\n            if (secret == null) return false;\r\n            if (secret.Data.Length != 32) return false;\r\n\r\n            var sum = secret.Data.Sum(x => x) % 255;\r\n            if (sum != 239) return false;\r\n\r\n            return true;\r\n        }\r\n\r\n        public static void EncryptSecret(out TLString secureSecret, out TLString secureSalt, out TLLong secureHash, TLString secret, TLString secretRandom, TLSecurePasswordKdfAlgoBase algoBase, TLString password)\r\n        {\r\n            // only this algo is possible to encrypt secret\r\n            var algo2 = algoBase as TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000;\r\n            if (algo2 != null)\r\n            {\r\n                // generate secure hash\r\n                var secureSecretHash = Telegram.Api.Helpers.Utils.ComputeSHA256(secret.Data);\r\n                var secureSecretHash2 = secureSecretHash.SubArray(0, 8);\r\n                secureHash = new TLLong(BitConverter.ToInt64(secureSecretHash2, 0));\r\n\r\n                // generate secure salt\r\n                var randomGenerator = new SecureRandom(secretRandom.Data);\r\n                var random = new byte[8];\r\n                randomGenerator.NextBytes(random);\r\n                var newSecureSaltData = TLUtils.Combine(algo2.Salt.Data, random);\r\n                secureSalt = TLString.FromBigEndianData(newSecureSaltData);\r\n\r\n                // generate secure secret\r\n                var passwordHash = PBKDF2.GetHash(password.Data.AsBuffer(), newSecureSaltData.AsBuffer()).ToArray();\r\n                secureSecret = DoFinal(true, secret, passwordHash);\r\n\r\n                return;\r\n            }\r\n\r\n            var algo1 = algoBase as TLSecurePasswordKdfAlgoSHA512;\r\n            if (algo1 != null)\r\n            {\r\n                secureSecret = null;\r\n                secureSalt = null;\r\n                secureHash = null;\r\n\r\n                return;\r\n\r\n                // generate secure hash\r\n                var secureSecretHash = Telegram.Api.Helpers.Utils.ComputeSHA256(secret.Data);\r\n                var secureSecretHash2 = secureSecretHash.SubArray(0, 8);\r\n                secureHash = new TLLong(BitConverter.ToInt64(secureSecretHash2, 0));\r\n\r\n                // generate secure salt\r\n                var randomGenerator = new SecureRandom(secretRandom.Data);\r\n                var random = new byte[8];\r\n                randomGenerator.NextBytes(random);\r\n                var newSecureSaltData = TLUtils.Combine(algo1.Salt.Data, random);\r\n                secureSalt = TLString.FromBigEndianData(newSecureSaltData);\r\n\r\n                // generate secure secret\r\n                var sha512 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha512);\r\n                var passwordHash = sha512.HashData(TLUtils.Combine(newSecureSaltData, password.Data, newSecureSaltData).AsBuffer()).ToArray();\r\n                secureSecret = DoFinal(true, secret, passwordHash);\r\n\r\n                return;\r\n            }\r\n\r\n            secureSecret = null;\r\n            secureSalt = null;\r\n            secureHash = null;\r\n        }\r\n\r\n        public static TLString DecryptSecureSecret(TLString secureSecret, TLString password, TLSecurePasswordKdfAlgoBase algoBase)\r\n        {\r\n            var algo1 = algoBase as TLSecurePasswordKdfAlgoSHA512;\r\n            if (algo1 != null)\r\n            {\r\n                var sha512 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha512);\r\n                var passwordHash = sha512.HashData(TLUtils.Combine(algo1.Salt.Data, password.Data, algo1.Salt.Data).AsBuffer()).ToArray();\r\n\r\n                var secret = DoFinal(false, secureSecret, passwordHash);\r\n\r\n                if (!IsGoodSecret(secret)) return null;\r\n\r\n                return secret;\r\n            }\r\n\r\n            var algo2 = algoBase as TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000;\r\n            if (algo2 != null)\r\n            {\r\n                var passwordHash = PBKDF2.GetHash(password.Data.AsBuffer(), algo2.Salt.Data.AsBuffer()).ToArray();\r\n\r\n                var secret = DoFinal(false, secureSecret, passwordHash);\r\n\r\n                if (!IsGoodSecret(secret)) return null;\r\n\r\n                return secret;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private static async Task<Tuple<StorageFile, byte[]>> DoFinal(bool forEncryption, string fileName, StorageFile file, byte[] hash, byte[] padding)\r\n        {\r\n            var localFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting);\r\n            var inputStream = await file.OpenStreamForReadAsync();\r\n            var outputStream = await localFile.OpenStreamForWriteAsync();\r\n\r\n            var secretKey = hash.SubArray(0, 32);\r\n            var iv = hash.SubArray(32, 16);\r\n\r\n            var cipher = CipherUtilities.GetCipher(\"AES/CBC/NOPADDING\");\r\n            var param = new KeyParameter(secretKey);\r\n            cipher.Init(forEncryption, new ParametersWithIV(param, iv));\r\n\r\n            var processPadding = true;\r\n            var bytesRead = 0;\r\n            var bytesProcessed = 0;\r\n            var input = new byte[1 * 1024 * 1024];\r\n            var output = new byte[1 * 1024 * 1024];\r\n\r\n            if (processPadding && forEncryption)\r\n            {\r\n                processPadding = false;\r\n\r\n                // add random padding [32..255]\r\n                Array.Copy(padding, input, padding.Length);\r\n                bytesRead = inputStream.Read(input, padding.Length, input.Length - padding.Length) + padding.Length;\r\n                bytesProcessed = cipher.ProcessBytes(input, 0, bytesRead, output, 0);\r\n                outputStream.Write(output, 0, bytesProcessed);\r\n            }\r\n\r\n            while ((bytesRead = inputStream.Read(input, 0, input.Length)) > 0)\r\n            {\r\n                // process padding\r\n                if (processPadding && !forEncryption)\r\n                {\r\n                    processPadding = false;\r\n\r\n                    // remove random padding [32..255]\r\n                    bytesProcessed = cipher.ProcessBytes(input, 0, bytesRead, output, 0);\r\n                    var paddingLength = output[0];\r\n                    padding = new byte[paddingLength];\r\n                    Array.Copy(output, padding, paddingLength);\r\n                    outputStream.Write(output, paddingLength, bytesProcessed - paddingLength);\r\n                }\r\n                else\r\n                {\r\n                    bytesProcessed = cipher.ProcessBytes(input, 0, bytesRead, output, 0);\r\n                    outputStream.Write(output, 0, bytesProcessed);\r\n                }\r\n            }\r\n\r\n            bytesProcessed = cipher.DoFinal(output, 0);\r\n            outputStream.Write(output, 0, bytesProcessed);\r\n\r\n            outputStream.Flush();\r\n            outputStream.Dispose();\r\n            inputStream.Dispose();\r\n\r\n            return new Tuple<StorageFile, byte[]>(localFile, padding);\r\n        }\r\n\r\n        public static async Task<StorageFile> EncryptFile(string fileName, StorageFile file, TLString fileSecret, TLString fileHash, byte[] padding)\r\n        {\r\n            var sha512 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha512);\r\n            var secretHash = sha512.HashData(TLUtils.Combine(fileSecret.Data, fileHash.Data).AsBuffer()).ToArray();\r\n\r\n            var result = await DoFinal(true, fileName, file, secretHash, padding);\r\n\r\n            return result.Item1;\r\n        }\r\n\r\n        public static async Task<Tuple<StorageFile, byte[]>> DecryptFile(string fileName, StorageFile file, TLString fileSecret, TLString fileHash)\r\n        {\r\n            var sha512 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha512);\r\n            var secretHash = sha512.HashData(TLUtils.Combine(fileSecret.Data, fileHash.Data).AsBuffer()).ToArray();\r\n\r\n            var result = await DoFinal(false, fileName, file, secretHash, null);\r\n\r\n            return result;\r\n        }\r\n\r\n        public static async Task<byte[]> GetSha256(byte[] padding, StorageFile file)\r\n        {\r\n            var provider = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);\r\n            var inputStream = await file.OpenSequentialReadAsync();\r\n            uint capacity = 10 * 1024 * 1024;\r\n            var buffer = new Buffer(capacity);\r\n            var hash = provider.CreateHash();\r\n\r\n            if (padding != null)\r\n            {\r\n                hash.Append(padding.AsBuffer());\r\n            }\r\n\r\n            while (true)\r\n            {\r\n                await inputStream.ReadAsync(buffer, capacity, InputStreamOptions.None);\r\n                if (buffer.Length > 0)\r\n                    hash.Append(buffer);\r\n                else\r\n                    break;\r\n            }\r\n\r\n            var hashValue = hash.GetValueAndReset();\r\n\r\n            inputStream.Dispose();\r\n\r\n            return hashValue.ToArray();\r\n        }\r\n\r\n        public static TLSecureCredentialsEncrypted GenerateSecureCredentialsEncrypted(IList<SecureRequiredType> requiredTypes, TLAuthorizationForm authorizationForm, TLString credentialsSecret, TLString secret)\r\n        {\r\n            var @switch = new Dictionary<Type, Action<SecureData, TLSecureRequiredType, TLSecureValue85>>\r\n            {\r\n                {\r\n                    typeof(TLSecureValueTypePersonalDetails), \r\n                    (obj, requiredType, value) =>\r\n                    {\r\n                        obj.personal_details = new PersonalDetails\r\n                        {\r\n                            data =\r\n                                new Data\r\n                                {\r\n                                    data_hash = Convert.ToBase64String(value.Data.DataHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(value.Data.Secret, secret, value.Data.DataHash).Data)\r\n                                }\r\n                        };\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueTypePassport), \r\n                    (obj, requiredType, value) =>\r\n                    {\r\n                        File frontSide = null;\r\n                        var secureFile = value.FrontSide as TLSecureFile;\r\n                        if (secureFile != null)\r\n                        {\r\n                            frontSide = new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(secureFile.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(secureFile.Secret, secret, secureFile.FileHash).Data)\r\n                            };\r\n                        }\r\n\r\n                        File selfie = null;\r\n                        secureFile = value.Selfie as TLSecureFile;\r\n                        if (requiredType.SelfieRequired && secureFile != null)\r\n                        {\r\n                            selfie = new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(secureFile.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(secureFile.Secret, secret, secureFile.FileHash).Data)\r\n                            };\r\n                        }\r\n\r\n                        List<File> translation = null;\r\n                        if (requiredType.TranslationRequired)\r\n                        {\r\n                            translation = new List<File>();\r\n                            foreach (var file in value.Translation.OfType<TLSecureFile>())\r\n                            {\r\n                                translation.Add(new File\r\n                                {\r\n                                    file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                                });\r\n                            }\r\n                        }\r\n\r\n                        obj.passport = new SecureCredentials.Passport\r\n                        {\r\n                            data =\r\n                                new Data\r\n                                {\r\n                                    data_hash = Convert.ToBase64String(value.Data.DataHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(value.Data.Secret, secret, value.Data.DataHash).Data)\r\n                                },\r\n                            front_side = frontSide,\r\n                            selfie = selfie,\r\n                            translation = translation\r\n                        };\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueTypeInternalPassport), \r\n                    (obj, requiredType, value) =>\r\n                    {\r\n                        File frontSide = null;\r\n                        var secureFile = value.FrontSide as TLSecureFile;\r\n                        if (secureFile != null)\r\n                        {\r\n                            frontSide = new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(secureFile.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(secureFile.Secret, secret, secureFile.FileHash).Data)\r\n                            };\r\n                        }\r\n\r\n                        File selfie = null;\r\n                        secureFile = value.Selfie as TLSecureFile;\r\n                        if (requiredType.SelfieRequired && secureFile != null)\r\n                        {\r\n                            selfie = new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(secureFile.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(secureFile.Secret, secret, secureFile.FileHash).Data)\r\n                            };\r\n                        }\r\n\r\n                        List<File> translation = null;\r\n                        if (requiredType.TranslationRequired)\r\n                        {\r\n                            translation = new List<File>();\r\n                            foreach (var file in value.Translation.OfType<TLSecureFile>())\r\n                            {\r\n                                translation.Add(new File\r\n                                {\r\n                                    file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                                });\r\n                            }\r\n                        }\r\n\r\n                        obj.internal_passport = new InternalPassport\r\n                        {\r\n                            data =\r\n                                new Data\r\n                                {\r\n                                    data_hash = Convert.ToBase64String(value.Data.DataHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(value.Data.Secret, secret, value.Data.DataHash).Data)\r\n                                },\r\n                            front_side = frontSide,\r\n                            selfie = selfie,\r\n                            translation = translation\r\n                        };\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueTypeDriverLicense), \r\n                    (obj, requiredType, value) =>\r\n                    {\r\n                        File frontSide = null;\r\n                        var secureFile = value.FrontSide as TLSecureFile;\r\n                        if (secureFile != null)\r\n                        {\r\n                            frontSide = new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(secureFile.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(secureFile.Secret, secret, secureFile.FileHash).Data)\r\n                            };\r\n                        }\r\n\r\n                        File reverseSide = null;\r\n                        secureFile = value.ReverseSide as TLSecureFile;\r\n                        if (secureFile != null)\r\n                        {\r\n                            reverseSide = new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(secureFile.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(secureFile.Secret, secret, secureFile.FileHash).Data)\r\n                            };\r\n                        }\r\n\r\n                        File selfie = null;\r\n                        secureFile = value.Selfie as TLSecureFile;\r\n                        if (requiredType.SelfieRequired && secureFile != null)\r\n                        {\r\n                            selfie = new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(secureFile.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(secureFile.Secret, secret, secureFile.FileHash).Data)\r\n                            };\r\n                        }\r\n\r\n                        List<File> translation = null;\r\n                        if (requiredType.TranslationRequired)\r\n                        {\r\n                            translation = new List<File>();\r\n                            foreach (var file in value.Translation.OfType<TLSecureFile>())\r\n                            {\r\n                                translation.Add(new File\r\n                                {\r\n                                    file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                                });\r\n                            }\r\n                        }\r\n\r\n                        obj.driver_license = new DriverLicense\r\n                        {\r\n                            data =\r\n                                new Data\r\n                                {\r\n                                    data_hash = Convert.ToBase64String(value.Data.DataHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(value.Data.Secret, secret, value.Data.DataHash).Data)\r\n                                },\r\n                            front_side = frontSide,\r\n                            reverse_side = reverseSide,\r\n                            selfie = selfie,\r\n                            translation = translation\r\n                        };\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueTypeIdentityCard), \r\n                    (obj, requiredType, value) =>\r\n                    {\r\n                        File frontSide = null;\r\n                        var secureFile = value.FrontSide as TLSecureFile;\r\n                        if (secureFile != null)\r\n                        {\r\n                            frontSide = new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(secureFile.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(secureFile.Secret, secret, secureFile.FileHash).Data)\r\n                            };\r\n                        }\r\n\r\n                        File reverseSide = null;\r\n                        secureFile = value.ReverseSide as TLSecureFile;\r\n                        if (secureFile != null)\r\n                        {\r\n                            reverseSide = new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(secureFile.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(secureFile.Secret, secret, secureFile.FileHash).Data)\r\n                            };\r\n                        }\r\n\r\n                        File selfie = null;\r\n                        secureFile = value.Selfie as TLSecureFile;\r\n                        if (requiredType.SelfieRequired && secureFile != null)\r\n                        {\r\n                            selfie = new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(secureFile.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(secureFile.Secret, secret, secureFile.FileHash).Data)\r\n                            };\r\n                        }\r\n\r\n                        List<File> translation = null;\r\n                        if (requiredType.TranslationRequired)\r\n                        {\r\n                            translation = new List<File>();\r\n                            foreach (var file in value.Translation.OfType<TLSecureFile>())\r\n                            {\r\n                                translation.Add(new File\r\n                                {\r\n                                    file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                                });\r\n                            }\r\n                        }\r\n\r\n                        obj.identity_card = new IdentityCard\r\n                        {\r\n                            data =\r\n                                new Data\r\n                                {\r\n                                    data_hash = Convert.ToBase64String(value.Data.DataHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(value.Data.Secret, secret, value.Data.DataHash).Data)\r\n                                },\r\n                            front_side = frontSide,\r\n                            reverse_side = reverseSide,\r\n                            selfie = selfie,\r\n                            translation = translation\r\n                        };\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueTypeAddress), \r\n                    (obj, requiredType, value) =>\r\n                    {\r\n                        obj.address = new Address\r\n                        {\r\n                            data =\r\n                                new Data\r\n                                {\r\n                                    data_hash = Convert.ToBase64String(value.Data.DataHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(value.Data.Secret, secret, value.Data.DataHash).Data)\r\n                                }\r\n                        };\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueTypeUtilityBill), \r\n                    (obj, requiredType, value) =>\r\n                    {\r\n                        var files = new List<File>();\r\n                        foreach (var file in value.Files.OfType<TLSecureFile>())\r\n                        {\r\n                            files.Add(new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                            });\r\n                        }\r\n\r\n                        List<File> translation = null;\r\n                        if (requiredType.TranslationRequired)\r\n                        {\r\n                            translation = new List<File>();\r\n                            foreach (var file in value.Translation.OfType<TLSecureFile>())\r\n                            {\r\n                                translation.Add(new File\r\n                                {\r\n                                    file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                                });\r\n                            }\r\n                        }\r\n\r\n                        obj.utility_bill = new UtilityBill\r\n                        {\r\n                            files = files,\r\n                            translation = translation\r\n                        };\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueTypeBankStatement), \r\n                    (obj, requiredType, value) =>\r\n                    {\r\n                        var files = new List<File>();\r\n                        foreach (var file in value.Files.OfType<TLSecureFile>())\r\n                        {\r\n                            files.Add(new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                            });\r\n                        }\r\n\r\n                        List<File> translation = null;\r\n                        if (requiredType.TranslationRequired)\r\n                        {\r\n                            translation = new List<File>();\r\n                            foreach (var file in value.Translation.OfType<TLSecureFile>())\r\n                            {\r\n                                translation.Add(new File\r\n                                {\r\n                                    file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                                });\r\n                            }\r\n                        }\r\n\r\n                        obj.bank_statement = new BankStatement\r\n                        {\r\n                            files = files,\r\n                            translation = translation\r\n                        };\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueTypeRentalAgreement), \r\n                    (obj, requiredType, value) =>\r\n                    {\r\n                        var files = new List<File>();\r\n                        foreach (var file in value.Files.OfType<TLSecureFile>())\r\n                        {\r\n                            files.Add(new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                            });\r\n                        }\r\n\r\n                        List<File> translation = null;\r\n                        if (requiredType.TranslationRequired)\r\n                        {\r\n                            translation = new List<File>();\r\n                            foreach (var file in value.Translation.OfType<TLSecureFile>())\r\n                            {\r\n                                translation.Add(new File\r\n                                {\r\n                                    file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                                });\r\n                            }\r\n                        }\r\n\r\n                        obj.rental_agreement = new RentalAgreement\r\n                        {\r\n                            files = files,\r\n                            translation = translation\r\n                        };\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueTypePassportRegistration), \r\n                    (obj, requiredType, value) =>\r\n                    {\r\n                        var files = new List<File>();\r\n                        foreach (var file in value.Files.OfType<TLSecureFile>())\r\n                        {\r\n                            files.Add(new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                            });\r\n                        }\r\n\r\n                        List<File> translation = null;\r\n                        if (requiredType.TranslationRequired)\r\n                        {\r\n                            translation = new List<File>();\r\n                            foreach (var file in value.Translation.OfType<TLSecureFile>())\r\n                            {\r\n                                translation.Add(new File\r\n                                {\r\n                                    file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                                });\r\n                            }\r\n                        }\r\n\r\n                        obj.passport_registration = new PassportRegistration\r\n                        {\r\n                            files = files,\r\n                            translation = translation\r\n                        };\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueTypeTemporaryRegistration), \r\n                    (obj, requiredType, value) =>\r\n                    {\r\n                        var files = new List<File>();\r\n                        foreach (var file in value.Files.OfType<TLSecureFile>())\r\n                        {\r\n                            files.Add(new File\r\n                            {\r\n                                file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                            });\r\n                        }\r\n\r\n                        List<File> translation = null;\r\n                        if (requiredType.TranslationRequired)\r\n                        {\r\n                            translation = new List<File>();\r\n                            foreach (var file in value.Translation.OfType<TLSecureFile>())\r\n                            {\r\n                                translation.Add(new File\r\n                                {\r\n                                    file_hash = Convert.ToBase64String(file.FileHash.Data),\r\n                                    secret = Convert.ToBase64String(DecryptValueSecret(file.Secret, secret, file.FileHash).Data)\r\n                                });\r\n                            }\r\n                        }\r\n\r\n                        obj.temporary_registration = new TemporaryRegistration\r\n                        {\r\n                            files = files,\r\n                            translation = translation\r\n                        };\r\n                    }\r\n                }\r\n            };\r\n\r\n            var secureData = new SecureData();\r\n\r\n            foreach (var requiredType in requiredTypes)\r\n            {\r\n                if (requiredType.DataValue != null)\r\n                {\r\n                    var type = requiredType.DataValue.Type.GetType();\r\n\r\n                    if (@switch.ContainsKey(type))\r\n                    {\r\n                        @switch[type](secureData, requiredType.DataRequiredType, requiredType.DataValue);\r\n                    }\r\n                }\r\n                if (requiredType.DataProofValue != null)\r\n                {\r\n                    var type = requiredType.DataProofValue.Type.GetType();\r\n\r\n                    if (@switch.ContainsKey(type))\r\n                    {\r\n                        @switch[type](secureData, requiredType.SelectedDataProofRequiredType, requiredType.DataProofValue);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var scopeRootObject = JsonUtils.FromJSON<ScopeRootObject>(authorizationForm.Scope.Data);\r\n\r\n            var rootObject = new RootObject\r\n            {\r\n                payload = scopeRootObject == null ? authorizationForm.Payload.ToString() : null,\r\n                nonce = scopeRootObject != null && scopeRootObject.v == 1 && authorizationForm.Payload != null ? authorizationForm.Payload.ToString() : null,\r\n                secure_data = secureData\r\n            };\r\n\r\n            var data = JsonUtils.ToJSON(rootObject);\r\n\r\n            var secureCredentials = EncryptSecureCredentials(\r\n                new TLString(data),\r\n                credentialsSecret);\r\n\r\n            var secureCredentialsSecret = RSAEncryption.EncryptWithPublic(credentialsSecret.Data, authorizationForm.PublicKey.ToString());\r\n            secureCredentials.Secret = TLString.FromBigEndianData(secureCredentialsSecret);\r\n\r\n            return secureCredentials;\r\n        }\r\n\r\n        public static TLVector<TLSecureValueHash> GenerateValueHashes(IList<SecureRequiredType> requiredTypes)\r\n        {\r\n            var result = new TLVector<TLSecureValueHash>();\r\n\r\n            foreach (var requiredType in requiredTypes)\r\n            {\r\n                if (requiredType.DataValue != null)\r\n                {\r\n                    result.Add(new TLSecureValueHash { Type = requiredType.DataValue.Type, Hash = requiredType.DataValue.Hash });\r\n                }\r\n                if (requiredType.DataProofValue != null)\r\n                {\r\n                    result.Add(new TLSecureValueHash { Type = requiredType.DataProofValue.Type, Hash = requiredType.DataProofValue.Hash });\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public static async Task<byte[]> GenerateRandomPadding(StorageFile decryptedFile)\r\n        {\r\n            byte[] padding;\r\n            var basicProperties = await decryptedFile.GetBasicPropertiesAsync();\r\n            var inputLength = basicProperties.Size % 16;\r\n            var paddingLength = 16 - inputLength + 32;\r\n            padding = new byte[paddingLength];\r\n\r\n            var randomGenerator = new SecureRandom(TLString.Empty.Data);\r\n            randomGenerator.NextBytes(padding, 0, padding.Length);\r\n            padding[0] = (byte)padding.Length;\r\n\r\n            return padding;\r\n        }\r\n    }\r\n\r\n    namespace SecureCredentials\r\n    {\r\n        [DataContract]\r\n        public class Data\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public string data_hash { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public string secret { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class File\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public string file_hash { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public string secret { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class PersonalDetails\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public Data data { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class Passport\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public Data data { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public File front_side { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 3)]\r\n            public File selfie { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 4)]\r\n            public List<File> translation { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class InternalPassport\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public Data data { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public File front_side { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 3)]\r\n            public File selfie { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 4)]\r\n            public List<File> translation { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class DriverLicense\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public Data data { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public File front_side { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 3)]\r\n            public File reverse_side { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 4)]\r\n            public File selfie { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 5)]\r\n            public List<File> translation { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class IdentityCard\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public Data data { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public File front_side { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 3)]\r\n            public File reverse_side { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 4)]\r\n            public File selfie { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 5)]\r\n            public List<File> translation { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class Address\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public Data data { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class UtilityBill\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public List<File> files { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public List<File> translation { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class BankStatement\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public List<File> files { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public List<File> translation { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class RentalAgreement\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public List<File> files { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public List<File> translation { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class PassportRegistration\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public List<File> files { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public List<File> translation { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class TemporaryRegistration\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public List<File> files { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public List<File> translation { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class SecureData\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public PersonalDetails personal_details { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public Passport passport { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 3)]\r\n            public InternalPassport internal_passport { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 4)]\r\n            public DriverLicense driver_license { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 5)]\r\n            public IdentityCard identity_card { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 6)]\r\n            public Address address { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 7)]\r\n            public UtilityBill utility_bill { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 8)]\r\n            public BankStatement bank_statement { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 9)]\r\n            public RentalAgreement rental_agreement { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 10)]\r\n            public PassportRegistration passport_registration { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 11)]\r\n            public TemporaryRegistration temporary_registration { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class RootObject\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public SecureData secure_data { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public string payload { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 3)]\r\n            public string nonce { get; set; }\r\n        }\r\n\r\n        [DataContract]\r\n        public class ScopeRootObject\r\n        {\r\n            [DataMember(EmitDefaultValue = false, Order = 1)]\r\n            public List<object> data { get; set; }\r\n\r\n            [DataMember(EmitDefaultValue = false, Order = 2)]\r\n            public int v { get; set; }\r\n        }\r\n    }\r\n\r\n    public static class RSAEncryption\r\n    {\r\n        public static byte[] EncryptWithPublic(byte[] bytesToEncrypt, string publicKey)\r\n        {\r\n            var encryptEngine = new OaepEncoding(new RsaEngine(), new Sha1Digest());\r\n\r\n            using (var txtreader = new StringReader(publicKey))\r\n            {\r\n                var keyParameter = (AsymmetricKeyParameter)new PemReader(txtreader).ReadObject();\r\n\r\n                encryptEngine.Init(true, keyParameter);\r\n            }\r\n\r\n            var encrypted = encryptEngine.ProcessBlock(bytesToEncrypt, 0, bytesToEncrypt.Length);\r\n            return encrypted;\r\n\r\n        }\r\n\r\n        public static byte[] EncryptWithPrivate(byte[] bytesToEncrypt, string privateKey)\r\n        {\r\n            var encryptEngine = new OaepEncoding(new RsaEngine(), new Sha1Digest());\r\n\r\n            using (var txtreader = new StringReader(privateKey))\r\n            {\r\n                var keyPair = (AsymmetricCipherKeyPair)new PemReader(txtreader).ReadObject();\r\n\r\n                encryptEngine.Init(true, keyPair.Private);\r\n            }\r\n\r\n            var encrypted = encryptEngine.ProcessBlock(bytesToEncrypt, 0, bytesToEncrypt.Length);\r\n            return encrypted;\r\n        }\r\n    }\r\n\r\n    public static class JsonUtils\r\n    {\r\n        public static string ToJSON(object rootObject)\r\n        {\r\n            try\r\n            {\r\n                var stream = new MemoryStream();\r\n\r\n                var ser = new DataContractJsonSerializer(rootObject.GetType());\r\n                ser.WriteObject(stream, rootObject);\r\n                stream.Position = 0;\r\n                var sr = new StreamReader(stream);\r\n\r\n                return sr.ReadToEnd();\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public static T FromJSON<T>(byte[] data) where T : class\r\n        {\r\n            try\r\n            {\r\n                var serializer = new DataContractJsonSerializer(typeof(T));\r\n                using (var stream = new MemoryStream(data))\r\n                {\r\n                    return serializer.ReadObject(stream) as T;\r\n                }\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return null;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Utils/Password.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.Runtime.InteropServices.WindowsRuntime;\r\nusing Windows.Security.Cryptography.Core;\r\nusing Windows.Storage.Streams;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Utils\r\n{\r\n    static class Password\r\n    {\r\n        public static TLString GetHash(TLString currentSalt, TLString password)\r\n        {\r\n            var passwordHash = Telegram.Api.Helpers.Utils.ComputeSHA256(TLUtils.Combine(currentSalt.Data, password.Data, currentSalt.Data));\r\n            \r\n            return TLString.FromBigEndianData(passwordHash);\r\n        }\r\n\r\n        public static TLString GetHash(TLPasswordBase passwordBase, TLString pwd)\r\n        {\r\n            var password83 = passwordBase as TLPassword83;\r\n            if (password83 != null)\r\n            {\r\n                return GetNewHash(password83.CurrentAlgo, pwd);\r\n            }\r\n\r\n            var password = passwordBase as TLPassword;\r\n            if (password != null)\r\n            {\r\n                return GetHash(password.CurrentSalt, pwd);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static TLString GetOldHash(TLPasswordKdfAlgoBase kdfAlgoBase, TLString password)\r\n        {\r\n            var algo = kdfAlgoBase as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n            if (algo != null)\r\n            {\r\n                var salt1 = algo.Salt1;\r\n\r\n                var hash1 = GetHash(salt1, password);\r\n\r\n                return hash1;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static TLString GetNewHash(TLPasswordKdfAlgoBase kdfAlgoBase, TLString password)\r\n        {\r\n            var algo = kdfAlgoBase as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n            if (algo != null)\r\n            {\r\n                var salt1 = algo.Salt1;\r\n                var salt2 = algo.Salt2;\r\n\r\n                var hash1 = GetHash(salt1, password);\r\n                var hash2 = GetHash(salt2, hash1);\r\n                var hash3 = PBKDF2.GetHash(hash2.Data.AsBuffer(), salt1.Data.AsBuffer());\r\n                var hash4 = GetHash(salt2, TLString.FromBigEndianData(hash3.ToArray()));\r\n\r\n                return hash4;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static void AddClientSalt(TLPasswordKdfAlgoBase algoBase)\r\n        {\r\n            var algo = algoBase as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n            if (algo == null) return;\r\n\r\n            var secureRandom = new SecureRandom();\r\n            var clientSalt1 = new byte[32];\r\n            secureRandom.NextBytes(clientSalt1);\r\n\r\n            var newSalt1Data = TLUtils.Combine(algo.Salt1.Data, clientSalt1);\r\n            var newSalt1 = TLString.FromBigEndianData(newSalt1Data);\r\n\r\n            algo.Salt1 = newSalt1;\r\n        }\r\n\r\n        public static void AddRandomSecureSecret(TLPasswordInputSettings83 inputSettings, IPasswordSecret passwordSecret, TLString password)\r\n        {\r\n            var secret = Passport.GenerateSecret(passwordSecret.SecretRandom);\r\n\r\n            var newSecureAlgo = passwordSecret.NewSecureAlgo as TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000;\r\n            if (newSecureAlgo == null) return;\r\n\r\n            TLString newSecureSalt;\r\n            TLString newSecureSecret;\r\n            TLLong newSecureSecretId;\r\n            Passport.EncryptSecret(out newSecureSecret, out newSecureSalt, out newSecureSecretId, secret, passwordSecret.SecretRandom, newSecureAlgo, password);\r\n\r\n            inputSettings.NewSecureSettings = new TLSecureSecretSettings\r\n            {\r\n                SecureAlgo = new TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 { Salt  = newSecureSalt },\r\n                SecureSecret = newSecureSecret,\r\n                SecureSecretId = newSecureSecretId\r\n            };\r\n\r\n            //inputSettings.NewSecureSalt = newSecureSalt;\r\n            //inputSettings.NewSecureSecret = newSecureSecret;\r\n            //inputSettings.NewSecureSecretId = newSecureSecretId;\r\n        }\r\n\r\n        public static void AddSecureSecret(TLString secret, TLPasswordInputSettings83 inputSettings, IPasswordSecret passwordSecret, TLString password)\r\n        {\r\n            var newSecureAlgo = passwordSecret.NewSecureAlgo as TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000;\r\n            if (newSecureAlgo == null) return;\r\n\r\n            TLString newSecureSalt;\r\n            TLString newSecureSecret;\r\n            TLLong newSecureSecretId;\r\n            Passport.EncryptSecret(out newSecureSecret, out newSecureSalt, out newSecureSecretId, secret, passwordSecret.SecretRandom, newSecureAlgo, password);\r\n\r\n            inputSettings.NewSecureSettings = new TLSecureSecretSettings\r\n            {\r\n                SecureAlgo = new TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 { Salt = newSecureSalt },\r\n                SecureSecret = newSecureSecret,\r\n                SecureSecretId = newSecureSecretId\r\n            };\r\n\r\n            //inputSettings.NewSecureSalt = newSecureSalt;\r\n            //inputSettings.NewSecureSecret = newSecureSecret;\r\n            //inputSettings.NewSecureSecretId = newSecureSecretId;\r\n        }\r\n    }\r\n\r\n    public class PBKDF2\r\n    {\r\n        /**\r\n         * The algorithm to use\r\n         * @var string algorithm\r\n         */\r\n        private static string _algorithm = KeyDerivationAlgorithmNames.Pbkdf2Sha512;\r\n\r\n        /**\r\n         * Generate a PBDFK hash\r\n         * @param string password\r\n         * @param string salt\r\n         * @param string algorithm\r\n         * @param uint iterationCountIn\r\n         * @param uint target size\r\n         */\r\n        public static IBuffer GetHash(IBuffer buffSecret, IBuffer buffSalt, uint targetSize = 64, uint iterationCountIn = 100000, string algorithm = null)\r\n        {\r\n            // Use the provide KeyDerivationAlgorithm if provided, otherwise default to PBKDF2-SHA256\r\n            if (algorithm == null)\r\n                algorithm = _algorithm;\r\n\r\n            KeyDerivationAlgorithmProvider provider = KeyDerivationAlgorithmProvider.OpenAlgorithm(algorithm);\r\n\r\n            // This is our secret password\r\n            //IBuffer buffSecret = CryptographicBuffer.ConvertStringToBinary(password, BinaryStringEncoding.Utf8);\r\n\r\n            // Use the provided salt\r\n            //IBuffer buffSalt = CryptographicBuffer.ConvertStringToBinary(salt, BinaryStringEncoding.Utf8);\r\n\r\n            // Create the derivation parameters.\r\n            KeyDerivationParameters pbkdf2Params = KeyDerivationParameters.BuildForPbkdf2(buffSalt, iterationCountIn);\r\n\r\n            // Create a key from the secret value.\r\n            CryptographicKey keyOriginal = provider.CreateKey(buffSecret);\r\n\r\n            // Derive a key based on the original key and the derivation parameters.\r\n            IBuffer keyDerived = CryptographicEngine.DeriveKeyMaterial(\r\n                keyOriginal,\r\n                pbkdf2Params,\r\n                targetSize\r\n            );\r\n\r\n            return keyDerived;\r\n\r\n            // Encode the key to a hexadecimal value (for display)\r\n            // return CryptographicBuffer.EncodeToHexString(keyDerived);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Utils/SRP.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.Linq;\r\nusing System.Runtime.InteropServices.WindowsRuntime;\r\nusing Org.BouncyCastle.Math;\r\nusing Org.BouncyCastle.Security;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Utils\r\n{\r\n    static class SRP\r\n    {\r\n        /// to big-endian data\r\n        public static byte[] GetBigIntegerBytes(BigInteger value)\r\n        {\r\n            byte[] bytes = value.ToByteArray();\r\n            if (bytes.Length > 256)\r\n            {\r\n                byte[] correctedAuth = new byte[256];\r\n                System.Array.Copy(bytes, 1, correctedAuth, 0, 256);\r\n                return correctedAuth;\r\n            }\r\n            if (bytes.Length < 256)\r\n            {\r\n                byte[] correctedAuth = new byte[256];\r\n                System.Array.Copy(bytes, 0, correctedAuth, 256 - bytes.Length, bytes.Length);\r\n                for (int a = 0; a < 256 - bytes.Length; a++)\r\n                {\r\n                    correctedAuth[a] = 0;\r\n                }\r\n                return correctedAuth;\r\n            }\r\n            return bytes;\r\n        }\r\n\r\n        public static TLString GetX(TLString password, TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow algo)\r\n        {\r\n            var x_bytes = Telegram.Api.Helpers.Utils.ComputeSHA256(TLUtils.Combine(algo.Salt1.Data, password.Data, algo.Salt1.Data));\r\n            x_bytes = Telegram.Api.Helpers.Utils.ComputeSHA256(TLUtils.Combine(algo.Salt2.Data, x_bytes, algo.Salt2.Data));\r\n            x_bytes = PBKDF2.GetHash(x_bytes.AsBuffer(), algo.Salt1.Data.AsBuffer()).ToArray();\r\n            x_bytes = Telegram.Api.Helpers.Utils.ComputeSHA256(TLUtils.Combine(algo.Salt2.Data, x_bytes, algo.Salt2.Data));\r\n\r\n            return TLString.FromBigEndianData(x_bytes);\r\n        }\r\n\r\n        private static BigInteger GetV(TLString passwordBytes, TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow algo)\r\n        {\r\n            var g = BigInteger.ValueOf(algo.G.Value);\r\n            var p = new BigInteger(1, algo.P.Data);\r\n\r\n            var x_bytes = GetX(passwordBytes, algo);\r\n            var x = new BigInteger(1, x_bytes.Data);\r\n\r\n            return g.ModPow(x, p);\r\n        }\r\n\r\n        public static TLString GetVBytes(TLString passwordBytes, TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow algo)\r\n        {\r\n            if (!TLUtils.CheckPrime(algo.P.Data, algo.G.Value))\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return TLString.FromBigEndianData(GetBigIntegerBytes(GetV(passwordBytes, algo)));\r\n        }\r\n\r\n        public static TLInputCheckPasswordBase GetCheck(TLString xStr, TLLong srpId, TLString srpB, TLPasswordKdfAlgoBase algoBase)\r\n        {\r\n            var algo = algoBase as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n            if (algo != null)\r\n            {\r\n                if (xStr == null || srpB == null || srpB.Data.Length == 0 || !TLUtils.CheckPrime(algo.P.Data, algo.G.Value))\r\n                {\r\n                    return new TLInputCheckPasswordEmpty();\r\n                }\r\n\r\n                var g = new BigInteger(1, algo.G.ToBytes().Reverse().ToArray()); // from big-endian to BI (ToBytes - little endian output)\r\n                var g_bytes = GetBigIntegerBytes(g);\r\n                \r\n                var p = new BigInteger(1, algo.P.Data);\r\n                var p_bytes = GetBigIntegerBytes(p);\r\n\r\n                var k_bytes = Telegram.Api.Helpers.Utils.ComputeSHA256(TLUtils.Combine(p_bytes, g_bytes));\r\n                var k = new BigInteger(1, k_bytes);\r\n\r\n                var x = new BigInteger(1, xStr.Data);\r\n\r\n                var a_bytes = new byte[256];\r\n                var secureRandom = new SecureRandom();\r\n                secureRandom.NextBytes(a_bytes);\r\n                var a = new BigInteger(1, a_bytes);\r\n\r\n                var A = g.ModPow(a, p);\r\n                var A_bytes = GetBigIntegerBytes(A);\r\n\r\n                var B = new BigInteger(1, srpB.Data);\r\n                if (B.CompareTo(BigInteger.Zero) <= 0 || B.CompareTo(p) >= 0)\r\n                {\r\n                    return null;\r\n                }\r\n                var B_bytes = GetBigIntegerBytes(B);\r\n\r\n                var u_bytes = Telegram.Api.Helpers.Utils.ComputeSHA256(TLUtils.Combine(A_bytes, B_bytes));\r\n                var u = new BigInteger(1, u_bytes);\r\n                if (u.CompareTo(BigInteger.Zero) == 0)\r\n                {\r\n                    return null;\r\n                }\r\n\r\n                var B_kgx = B.Subtract(k.Multiply(g.ModPow(x, p)).Mod(p));\r\n                if (B_kgx.CompareTo(BigInteger.Zero) < 0)\r\n                {\r\n                    B_kgx = B_kgx.Add(p);\r\n                }\r\n                if (!TLUtils.CheckGaAndGb(B_kgx, p))\r\n                {\r\n                    return null;\r\n                }\r\n                var S = B_kgx.ModPow(a.Add(u.Multiply(x)), p);\r\n                var S_bytes = GetBigIntegerBytes(S);\r\n\r\n                var K_bytes = Telegram.Api.Helpers.Utils.ComputeSHA256(S_bytes);\r\n\r\n                var p_hash = Telegram.Api.Helpers.Utils.ComputeSHA256(algo.P.Data);\r\n                var g_hash = Telegram.Api.Helpers.Utils.ComputeSHA256(g_bytes);\r\n                for (var i = 0; i < p_hash.Length; i++)\r\n                {\r\n                    p_hash[i] = (byte)(g_hash[i] ^ p_hash[i]);\r\n                }\r\n\r\n                var M1 = Telegram.Api.Helpers.Utils.ComputeSHA256(TLUtils.Combine(\r\n                    p_hash, \r\n                    Telegram.Api.Helpers.Utils.ComputeSHA256(algo.Salt1.Data), \r\n                    Telegram.Api.Helpers.Utils.ComputeSHA256(algo.Salt2.Data), \r\n                    A_bytes, \r\n                    B_bytes, \r\n                    K_bytes));\r\n\r\n                return new TLInputCheckPasswordSRP\r\n                {\r\n                    SRPId = srpId,\r\n                    A = TLString.FromBigEndianData(A_bytes),\r\n                    M1 = TLString.FromBigEndianData(M1)\r\n                };\r\n            }\r\n\r\n            return new TLInputCheckPasswordEmpty();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/BioViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class BioViewModel : ViewModelBase\r\n    {\r\n        public string About { get; set; }\r\n\r\n        private TLUser45 _currentUser;\r\n\r\n        public BioViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _currentUser = stateService.CurrentContact as TLUser45;\r\n            stateService.CurrentContact = null;\r\n\r\n            About = _currentUser != null && _currentUser.About != null ? _currentUser.About.ToString() : string.Empty;\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (IsWorking) return;\r\n\r\n            //_currentUser.About = new TLString(About);\r\n            //_currentUser.NotifyOfPropertyChange(() => _currentUser.About);\r\n            //NavigationService.GoBack();\r\n            //return;\r\n            IsWorking = true;\r\n            MTProtoService.UpdateProfileAsync(null, null, new TLString(About), \r\n                user => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    _currentUser.About = new TLString(About);\r\n                    _currentUser.NotifyOfPropertyChange(() => _currentUser.About);\r\n                    NavigationService.GoBack();\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                }));\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/CallsPrivacyViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing Language = TelegramClient.Utils.Language;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class CallsPrivacyViewModel : ViewModelBase, Telegram.Api.Aggregator.IHandle<TLUpdatePrivacy>\r\n    {\r\n        private string _allowUsersSubtitle = AppResources.NoUsers;\r\n\r\n        public string AllowUsersSubtitle\r\n        {\r\n            get { return _allowUsersSubtitle; }\r\n            set { SetField(ref _allowUsersSubtitle, value, () => AllowUsersSubtitle); }\r\n        }\r\n\r\n        private Visibility _allowUsersVisibility;\r\n\r\n        public Visibility AllowUsersVisibility\r\n        {\r\n            get { return _allowUsersVisibility; }\r\n            set { SetField(ref _allowUsersVisibility, value, () => AllowUsersVisibility); }\r\n        }\r\n\r\n        private string _disallowUsersSubtitle = AppResources.NoUsers;\r\n\r\n        public string DisallowUsersSubtitle\r\n        {\r\n            get { return _disallowUsersSubtitle; }\r\n            set { SetField(ref _disallowUsersSubtitle, value, () => DisallowUsersSubtitle); }\r\n        }\r\n\r\n        private Visibility _disallowUsersVisibility;\r\n\r\n        public Visibility DisallowUsersVisibility\r\n        {\r\n            get { return _disallowUsersVisibility; }\r\n            set { SetField(ref _disallowUsersVisibility, value, () => DisallowUsersVisibility); }\r\n        }\r\n\r\n        private TLPrivacyRuleBase _selectedMainRule;\r\n\r\n        public TLPrivacyRuleBase SelectedMainRule\r\n        {\r\n            get { return _selectedMainRule; }\r\n            set { SetField(ref _selectedMainRule, value, () => SelectedMainRule); }\r\n        }\r\n\r\n        public List<TLPrivacyRuleBase> MainRules { get; set; }\r\n\r\n        private TLPrivacyRules _rules;\r\n        private TLPrivacyValueAllowUsers _selectedAllowUsers;\r\n        private TLPrivacyValueDisallowUsers _selectedDisallowUsers;\r\n\r\n        public CallsPrivacyViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            _rules = StateService.PrivacyRules;\r\n            StateService.PrivacyRules = null;\r\n\r\n            MainRules = new List<TLPrivacyRuleBase>\r\n            {\r\n                new TLPrivacyValueAllowAll{ Label = AppResources.Everybody },\r\n                new TLPrivacyValueAllowContacts{ Label = AppResources.MyContacts },\r\n                new TLPrivacyValueDisallowAll{ Label = AppResources.Nobody }\r\n            };\r\n\r\n            _selectedMainRule = GetSelectedMainRule(MainRules, _rules, MainRules[0], MainRules[2]);\r\n            _selectedMainRule.IsChecked = true;\r\n            _selectedAllowUsers = GetSelectedRule<TLPrivacyValueAllowUsers>(_rules) ?? new TLPrivacyValueAllowUsers { Users = new TLVector<TLInt>() };\r\n            _selectedDisallowUsers = GetSelectedRule<TLPrivacyValueDisallowUsers>(_rules) ?? new TLPrivacyValueDisallowUsers { Users = new TLVector<TLInt>() };\r\n            SwitchUsersVisibility(true);\r\n            PropertyChanged += OnPropertyChanged;\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                if (StateService.UsersRule != null)\r\n                {\r\n                    var allowUsersRule = StateService.UsersRule as TLPrivacyValueAllowUsers;\r\n                    if (allowUsersRule != null)\r\n                    {\r\n                        _selectedAllowUsers = allowUsersRule;\r\n\r\n                        CleanupUsers(_selectedAllowUsers, _selectedDisallowUsers);\r\n                    }\r\n                    var disallowUsersRule = StateService.UsersRule as TLPrivacyValueDisallowUsers;\r\n                    if (disallowUsersRule != null)\r\n                    {\r\n                        _selectedDisallowUsers = disallowUsersRule;\r\n\r\n                        CleanupUsers(_selectedDisallowUsers, _selectedAllowUsers);\r\n                    }\r\n                    StateService.UsersRule = null;\r\n                }\r\n\r\n                UpdateSubtitles();\r\n            });\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        private void CleanupUsers(IPrivacyValueUsersRule sourceList, IPrivacyValueUsersRule cleaningList)\r\n        {\r\n            var sourceDict = new Dictionary<int, int>();\r\n            foreach (var userId in sourceList.Users)\r\n            {\r\n                sourceDict[userId.Value] = userId.Value;\r\n            }\r\n\r\n            for (var i = 0; i < cleaningList.Users.Count; i++)\r\n            {\r\n                if (sourceDict.ContainsKey(cleaningList.Users[i].Value))\r\n                {\r\n                    cleaningList.Users.RemoveAt(i--);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UpdateSubtitles()\r\n        {\r\n            var allowCount = _selectedAllowUsers.Users.Count;\r\n\r\n            AllowUsersSubtitle = allowCount == 0\r\n                ? AppResources.NoUsers\r\n                : Language.Declension(\r\n                    allowCount,\r\n                    AppResources.UserNominativeSingular,\r\n                    AppResources.UserNominativePlural,\r\n                    AppResources.UserGenitiveSingular,\r\n                    AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n\r\n            var disallowCount = _selectedDisallowUsers.Users.Count;\r\n\r\n            DisallowUsersSubtitle = disallowCount == 0\r\n                ? AppResources.NoUsers\r\n                : Language.Declension(\r\n                    disallowCount,\r\n                    AppResources.UserNominativeSingular,\r\n                    AppResources.UserNominativePlural,\r\n                    AppResources.UserGenitiveSingular,\r\n                    AppResources.UserGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n        }\r\n\r\n        private T GetSelectedRule<T>(TLPrivacyRules rules) where T : TLPrivacyRuleBase\r\n        {\r\n            T allowUsers = null;\r\n            if (_rules != null)\r\n            {\r\n                allowUsers = (T)rules.Rules.FirstOrDefault(x => x is T);\r\n            }\r\n\r\n            return allowUsers;\r\n        }\r\n\r\n        private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => SelectedMainRule))\r\n            {\r\n                SwitchUsersVisibility(false);\r\n            }\r\n        }\r\n\r\n        private void SwitchUsersVisibility(bool silent)\r\n        {\r\n            if (SelectedMainRule is TLPrivacyValueAllowAll)\r\n            {\r\n                _allowUsersVisibility = Visibility.Collapsed;\r\n                _disallowUsersVisibility = Visibility.Visible;\r\n            }\r\n\r\n            if (SelectedMainRule is TLPrivacyValueAllowContacts)\r\n            {\r\n                _allowUsersVisibility = Visibility.Visible;\r\n                _disallowUsersVisibility = Visibility.Visible;\r\n            }\r\n\r\n            if (SelectedMainRule is TLPrivacyValueDisallowAll)\r\n            {\r\n                _allowUsersVisibility = Visibility.Visible;\r\n                _disallowUsersVisibility = Visibility.Collapsed;\r\n            }\r\n\r\n            if (!silent)\r\n            {\r\n                NotifyOfPropertyChange(() => AllowUsersVisibility);\r\n                NotifyOfPropertyChange(() => DisallowUsersVisibility);\r\n            }\r\n        }\r\n\r\n        public void OpenAllowUsers()\r\n        {\r\n            var allowUsersRule = _rules != null ? _rules.Rules.FirstOrDefault(x => x is TLPrivacyValueAllowUsers) : null;\r\n\r\n            //if (allowUsersRule == null)\r\n            //{\r\n            //    NavigationService.UriFor<SelectMultipleUsersViewModel>().Navigate();\r\n            //}\r\n            //else\r\n            {\r\n                StateService.UsersRule = _selectedAllowUsers;\r\n                NavigationService.UriFor<AllowUsersViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void OpenDisallowUsers()\r\n        {\r\n            var disallowUsersRule = _rules != null ? _rules.Rules.FirstOrDefault(x => x is TLPrivacyValueDisallowUsers) : null;\r\n\r\n            //if (allowUsersRule == null)\r\n            //{\r\n            //    NavigationService.UriFor<SelectMultipleUsersViewModel>().Navigate();\r\n            //}\r\n            //else\r\n            {\r\n                StateService.UsersRule = _selectedDisallowUsers;\r\n                NavigationService.UriFor<AllowUsersViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        private TLPrivacyRuleBase GetSelectedMainRule(List<TLPrivacyRuleBase> mainRules, TLPrivacyRules rules, TLPrivacyRuleBase defaultRule, TLPrivacyRuleBase noRules)\r\n        {\r\n            if (rules == null)\r\n            {\r\n\r\n            }\r\n            else\r\n            {\r\n                foreach (var rule in rules.Rules)\r\n                {\r\n                    var mainRule = mainRules.FirstOrDefault(x => x.GetType() == rule.GetType());\r\n                    if (mainRule != null)\r\n                    {\r\n                        return mainRule;\r\n                    }\r\n                }\r\n\r\n                return noRules;\r\n            }\r\n\r\n            return defaultRule;\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (SelectedMainRule == null) return;\r\n\r\n            var rules = new TLVector<TLInputPrivacyRuleBase>();\r\n\r\n            if (_selectedDisallowUsers != null\r\n                && _selectedDisallowUsers.Users != null\r\n                && _selectedDisallowUsers.Users.Count > 0)\r\n            {\r\n                var inputDisallowUsers = (TLInputPrivacyValueDisallowUsers)_selectedDisallowUsers.ToInputRule();\r\n\r\n                foreach (var userId in _selectedDisallowUsers.Users)\r\n                {\r\n                    var user = CacheService.GetUser(userId);\r\n\r\n                    if (user != null)\r\n                    {\r\n                        inputDisallowUsers.Users.Add(user.ToInputUser());\r\n                    }\r\n                }\r\n\r\n                rules.Add(inputDisallowUsers);\r\n            }\r\n\r\n            if (_selectedAllowUsers != null\r\n                && _selectedAllowUsers.Users != null\r\n                && _selectedAllowUsers.Users.Count > 0)\r\n            {\r\n                var inputAllowUsers = (TLInputPrivacyValueAllowUsers)_selectedAllowUsers.ToInputRule();\r\n\r\n                foreach (var userId in _selectedAllowUsers.Users)\r\n                {\r\n                    var user = CacheService.GetUser(userId);\r\n\r\n                    if (user != null)\r\n                    {\r\n                        inputAllowUsers.Users.Add(user.ToInputUser());\r\n                    }\r\n                }\r\n\r\n                rules.Add(inputAllowUsers);\r\n            }\r\n\r\n            var inputMainRule = SelectedMainRule.ToInputRule();\r\n            rules.Add(inputMainRule);\r\n\r\n            IsWorking = true;\r\n            MTProtoService.SetPrivacyAsync(new TLInputPrivacyKeyPhoneCall(),\r\n                rules,\r\n                result =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    //EventAggregator.Publish(new TLUpdatePrivacy{Key = new TLPrivacyKeyStatusTimestamp(), Rules = result.Rules});\r\n                    BeginOnUIThread(() => NavigationService.GoBack());\r\n                },\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        MessageBox.Show(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, MessageBoxButton.OK);\r\n                    }\r\n\r\n                    Execute.ShowDebugMessage(\"account.setPrivacy error \" + error);\r\n                });\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        public void Handle(TLUpdatePrivacy privacy)\r\n        {\r\n            if (privacy.Key is TLPrivacyKeyPhoneCall)\r\n            {\r\n                _rules = new TLPrivacyRules { Rules = privacy.Rules };\r\n\r\n                SelectedMainRule = GetSelectedMainRule(MainRules, _rules, MainRules[0], MainRules[2]);\r\n                _selectedAllowUsers = GetSelectedRule<TLPrivacyValueAllowUsers>(_rules) ?? new TLPrivacyValueAllowUsers { Users = new TLVector<TLInt>() };\r\n                _selectedDisallowUsers = GetSelectedRule<TLPrivacyValueDisallowUsers>(_rules) ?? new TLPrivacyValueDisallowUsers { Users = new TLVector<TLInt>() };\r\n                SwitchUsersVisibility(false);\r\n\r\n                UpdateSubtitles();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/CallsSecurityViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class CallsSecurityViewModel : ViewModelBase\r\n    {\r\n        private TLCallsSecurity _callsSecurity;\r\n\r\n        public TLCallsSecurity CallsSecurity\r\n        {\r\n            get { return _callsSecurity; }\r\n            set { SetField(ref _callsSecurity, value, () => CallsSecurity); }\r\n        }\r\n\r\n        public CallsSecurityViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _callsSecurity = StateService.GetCallsSecurity(true);\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            base.OnDeactivate(close);\r\n\r\n            StateService.SaveCallsSecurity(_callsSecurity);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/CameraViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class CameraViewModel : ViewModelBase\r\n    {\r\n        private TLPrivacyRuleBase _selectedMainRule;\r\n\r\n        public TLPrivacyRuleBase SelectedMainRule\r\n        {\r\n            get { return _selectedMainRule; }\r\n            set { SetField(ref _selectedMainRule, value, () => SelectedMainRule); }\r\n        }\r\n\r\n        public List<TLPrivacyRuleBase> MainRules { get; set; }\r\n\r\n        private TLCameraSettings _settings;\r\n\r\n        public CameraViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _settings = StateService.GetCameraSettings();\r\n\r\n            MainRules = new List<TLPrivacyRuleBase>\r\n            {\r\n                new TLPrivacyValueAllowAll{ Label = AppResources.InAppCamera },\r\n                new TLPrivacyValueAllowContacts{ Label = AppResources.ExternalCamera }\r\n            };\r\n\r\n            _selectedMainRule = _settings.External ? MainRules[1] : MainRules[0];\r\n            _selectedMainRule.IsChecked = true;\r\n\r\n            PropertyChanged += OnPropertyChanged;\r\n        }\r\n\r\n        private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            _settings.External = SelectedMainRule == MainRules[1];\r\n            StateService.SaveCameraSettings(_settings);\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/ChooseGeoLivePeriodViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChooseGeoLivePeriodViewModel : Screen\r\n    {\r\n        public LoopingObservableCollection<TimerSpan> Items { get; private set; }\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        public string Subtitle { get; set; }\r\n\r\n        public ChooseGeoLivePeriodViewModel(IStateService stateService)\r\n        {\r\n            _stateService = stateService;\r\n\r\n            var selectedTimerSpan = _stateService.SelectedTimerSpan;\r\n            _stateService.SelectedTimerSpan = null;\r\n\r\n            var timerSpans = _stateService.TimerSpans;\r\n            _stateService.TimerSpans = null;\r\n\r\n            TimerSpan defaultSpan = null;\r\n            Items = new LoopingObservableCollection<TimerSpan>();\r\n            if (timerSpans != null)\r\n            {\r\n                foreach (var timerSpan in timerSpans)\r\n                {\r\n                    Items.Add(timerSpan);\r\n                }\r\n            }\r\n            defaultSpan = Items[0];\r\n\r\n            if (selectedTimerSpan != null)\r\n            {\r\n                Items.SelectedItem = Items.FirstOrDefault(x => x.Seconds == selectedTimerSpan.Seconds);\r\n            }\r\n            if (Items.SelectedItem == null)\r\n            {\r\n                Items.SelectedItem = defaultSpan;\r\n            }\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            _stateService.SelectedTimerSpan = (TimerSpan)Items.SelectedItem;\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/ChooseVideoQualityViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ChooseVideoQualityViewModel : Screen\r\n    {\r\n        public LoopingObservableCollection<TimerSpan> Items { get; private set; }\r\n\r\n        private readonly IStateService _stateService;\r\n\r\n        public string Subtitle { get; set; }\r\n\r\n        public ChooseVideoQualityViewModel(IStateService stateService)\r\n        {\r\n            _stateService = stateService;\r\n\r\n            var selectedTimerSpan = _stateService.SelectedTimerSpan;\r\n            _stateService.SelectedTimerSpan = null;\r\n\r\n            var timerSpans = _stateService.TimerSpans;\r\n            _stateService.TimerSpans = null;\r\n\r\n            TimerSpan defaultSpan = null;\r\n            Items = new LoopingObservableCollection<TimerSpan>();\r\n            if (timerSpans != null)\r\n            {\r\n                foreach (var timerSpan in timerSpans)\r\n                {\r\n                    Items.Add(timerSpan);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Items.Add(new TimerSpan(string.Empty, AppResources.Auto, 0));\r\n                Items.Add(new TimerSpan(string.Empty, \"240\", 240));\r\n                Items.Add(new TimerSpan(string.Empty, \"360\", 360));\r\n                Items.Add(new TimerSpan(string.Empty, \"480\", 480));\r\n                Items.Add(new TimerSpan(string.Empty, \"720\", 720));\r\n                Items.Add(new TimerSpan(string.Empty, \"1080\", 1080));\r\n            }\r\n            defaultSpan = Items[0];\r\n\r\n            if (selectedTimerSpan != null)\r\n            {\r\n                Items.SelectedItem = Items.FirstOrDefault(x => x.Seconds == selectedTimerSpan.Seconds);\r\n            }\r\n            if (Items.SelectedItem == null)\r\n            {\r\n                Items.SelectedItem = defaultSpan;\r\n            }\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            _stateService.SelectedTimerSpan = (TimerSpan)Items.SelectedItem;\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/ContactsSecurityViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Windows.ApplicationModel.Contacts;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ContactsSecurityViewModel : ViewModelBase\r\n    {\r\n        protected string _syncContactsSubtitle;\r\n\r\n        public string SyncContactsSubtitle\r\n        {\r\n            get { return _syncContactsSubtitle; }\r\n            set { SetField(ref _syncContactsSubtitle, value, () => SyncContactsSubtitle); }\r\n        }\r\n\r\n        protected string _syncContactsHint;\r\n\r\n        public string SyncContactsHint\r\n        {\r\n            get { return _syncContactsHint; }\r\n            set { SetField(ref _syncContactsHint, value, () => SyncContactsHint); }\r\n        }\r\n\r\n        protected bool _suggestFrequentContacts;\r\n\r\n        public bool SuggestFrequentContacts\r\n        {\r\n            get { return _suggestFrequentContacts; }\r\n            set { SetField(ref _suggestFrequentContacts, value, () => SuggestFrequentContacts); }\r\n        }\r\n\r\n        public ContactsSecurityViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _suggestFrequentContacts = StateService.GetTopPeers() is TLTopPeers;\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => SuggestFrequentContacts))\r\n                {\r\n                    if (!SuggestFrequentContacts)\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(\r\n                            AppResources.SuggestFrequentContactsNotification,\r\n                            AppResources.AppName,\r\n                            AppResources.Ok, null,\r\n                            dismissed =>\r\n                            {\r\n\r\n                            });\r\n                    }\r\n\r\n                    MTProtoService.ToggleTopPeersAsync(\r\n                        new TLBool(SuggestFrequentContacts),\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (!SuggestFrequentContacts)\r\n                            {\r\n                                StateService.SaveTopPeers(new TLTopPeersDisabled());\r\n                                EventAggregator.Publish(new ClearTopPeersEventArgs());\r\n                            }\r\n                        }));\r\n                }\r\n            };\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(async () =>\r\n            {\r\n                var contactStore = await ContactManager.RequestStoreAsync();\r\n                SyncContactsSubtitle = contactStore != null ? AppResources.Enabled : AppResources.Disabled;\r\n                SyncContactsHint = contactStore != null\r\n                    ? AppResources.SyncContactsInfoOn\r\n                    : AppResources.SyncContactsInfoOff;\r\n            });\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            EventAggregator.Unsubscribe(this);\r\n        }\r\n\r\n        public void DeleteSyncedContacts()\r\n        {\r\n            ShellViewModel.ShowCustomMessageBox(\r\n                AppResources.DeleteSyncedContactsConfirmation, AppResources.AppName,\r\n                AppResources.Ok.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        EventAggregator.Publish(new InvokeDeleteContacts());\r\n                    }\r\n                });\r\n        }\r\n\r\n        public async void SyncContacts()\r\n        {\r\n            await Windows.System.Launcher.LaunchUriAsync(new Uri(\"ms-settings:privacy-contacts\"));\r\n        }\r\n    }\r\n\r\n    public class ClearTopPeersEventArgs\r\n    {\r\n        \r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/LoggedInViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class LoggedInViewModel : ItemsViewModelBase<TLWebAuthorization>\r\n    {\r\n        public bool IsEmptyList { get; protected set; }\r\n\r\n        public string EmptyListImageSource\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                if (isLightTheme)\r\n                {\r\n                    return \"/Images/Settings/noapps.white-WXGA.png\";\r\n                }\r\n\r\n                return \"/Images/Settings/noapps.black-WXGA.png\";\r\n            }\r\n        }\r\n\r\n        private readonly DispatcherTimer _getAuthorizationsTimer = new DispatcherTimer();\r\n\r\n        private void StartTimer()\r\n        {\r\n            _getAuthorizationsTimer.Start();\r\n        }\r\n\r\n        private void StopTimer()\r\n        {\r\n            _getAuthorizationsTimer.Stop();\r\n        }\r\n\r\n        public LoggedInViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _getAuthorizationsTimer.Tick += OnGetAuthorizations;\r\n            _getAuthorizationsTimer.Interval = TimeSpan.FromSeconds(10.0);\r\n\r\n            EventAggregator.Subscribe(this);\r\n\r\n            Status = AppResources.Loading;\r\n\r\n            UpdateSessionsAsync();\r\n        }\r\n\r\n        private void OnGetAuthorizations(object sender, System.EventArgs e)\r\n        {\r\n            UpdateSessionsAsync();\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            StartTimer();\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            StopTimer();\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        private Dictionary<long, TLWebAuthorization> _authorizationsCache = new Dictionary<long, TLWebAuthorization>();\r\n\r\n        private bool _firstRun = true;\r\n\r\n        private void UpdateSessionsAsync()\r\n        {\r\n            BeginOnThreadPool(() =>\r\n            {\r\n                IsWorking = true;\r\n                MTProtoService.GetWebAuthorizationsAsync(\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        Status = string.Empty;\r\n                        IsEmptyList = result.Authorizations.Count == 0;\r\n                        NotifyOfPropertyChange(() => IsEmptyList);\r\n                        IsWorking = false;\r\n\r\n                        if (_firstRun)\r\n                        {\r\n                            _firstRun = false;\r\n                            Items.Clear();\r\n                            var firstChunkSize = 4;\r\n                            var count = 0;\r\n                            var delayedItems = new List<TLWebAuthorization>();\r\n                            for (var i = 0; i < result.Authorizations.Count; i++)\r\n                            {\r\n                                var authorization = result.Authorizations[i];\r\n                                _authorizationsCache[authorization.Hash.Value] = authorization;\r\n                                if (count < firstChunkSize)\r\n                                {\r\n                                    Items.Add(authorization);\r\n                                    count++;\r\n                                }\r\n                                else\r\n                                {\r\n                                    delayedItems.Add(authorization);\r\n                                }\r\n                            }\r\n\r\n                            BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n                            {\r\n                                foreach (var authorization in delayedItems)\r\n                                {\r\n                                    Items.Add(authorization);\r\n                                }\r\n                            });\r\n                        }\r\n                        else\r\n                        {\r\n                            var newAuthorizationsCache = new Dictionary<long, TLWebAuthorization>();\r\n                            var itemsToAdd = new List<TLWebAuthorization>();\r\n                            for (var i = 0; i < result.Authorizations.Count; i++)\r\n                            {\r\n                                var authorization = result.Authorizations[i];\r\n                                TLWebAuthorization cachedAuthorization;\r\n                                if (!_authorizationsCache.TryGetValue(authorization.Hash.Value, out cachedAuthorization))\r\n                                {\r\n                                    itemsToAdd.Add(authorization);\r\n                                    newAuthorizationsCache[authorization.Hash.Value] = authorization;\r\n                                }\r\n                                else\r\n                                {\r\n                                    cachedAuthorization.Update(authorization);\r\n                                    cachedAuthorization.NotifyOfPropertyChange(() => cachedAuthorization.Domain);\r\n                                    cachedAuthorization.NotifyOfPropertyChange(() => cachedAuthorization.Browser);\r\n                                    cachedAuthorization.NotifyOfPropertyChange(() => cachedAuthorization.DateActive);\r\n                                    cachedAuthorization.NotifyOfPropertyChange(() => cachedAuthorization.Ip);\r\n                                    cachedAuthorization.NotifyOfPropertyChange(() => cachedAuthorization.Region);\r\n\r\n                                    newAuthorizationsCache[authorization.Hash.Value] = cachedAuthorization;\r\n                                }\r\n                            }\r\n\r\n                            for (var i = 0; i < Items.Count; i++)\r\n                            {\r\n                                if (!newAuthorizationsCache.ContainsKey(Items[i].Hash.Value))\r\n                                {\r\n                                    Items.RemoveAt(i--);\r\n                                }\r\n                            }\r\n\r\n                            for (var i = 0; i < itemsToAdd.Count; i++)\r\n                            {\r\n                                Items.Insert(0, itemsToAdd[i]);\r\n                            }\r\n\r\n                            _authorizationsCache = newAuthorizationsCache;\r\n                        }\r\n\r\n                    }),\r\n                    error =>\r\n                    {\r\n                        Status = string.Empty;\r\n                        IsEmptyList = Items.Count == 0;\r\n                        NotifyOfPropertyChange(() => IsEmptyList);\r\n                        IsWorking = false;\r\n                        Execute.ShowDebugMessage(\"account.getWebAuthorizations error \" + error);\r\n                    });\r\n            });\r\n        }\r\n\r\n        public void Terminate(TLWebAuthorization authorization)\r\n        {\r\n            if (authorization == null) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.ResetWebAuthorizationAsync(\r\n                authorization.Hash,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Items.Remove(authorization);\r\n                    IsEmptyList = Items.Count == 0;\r\n                    _authorizationsCache.Remove(authorization.Hash.Value);\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n                }),\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"account.resetWebAuthotization error \" + error);\r\n                });\r\n        }\r\n\r\n        public void TerminateWebAuthorizations()\r\n        {\r\n            var confirmation = MessageBox.Show(AppResources.LogOutAllApplicationsConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK)\r\n            {\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.ResetWebAuthorizationsAsync(\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Items.Clear();\r\n                    IsEmptyList = Items.Count == 0;\r\n                    _authorizationsCache.Clear();\r\n                    NotifyOfPropertyChange(() => IsEmptyList);\r\n                }),\r\n                error =>\r\n                {\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"account.resetWebAuthotizations error \" + error);\r\n                });\r\n        }\r\n\r\n        public void Handle(TLUpdateNewAuthorization update)\r\n        {\r\n            UpdateSessionsAsync();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/PassportSettingsViewModel.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Extensions;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Passport;\r\nusing TelegramClient.Views.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class PassportSettingsViewModel : ItemsViewModelBase<TLSecureValue>,\r\n        Telegram.Api.Aggregator.IHandle<AddSecureValueEventArgs>,\r\n        Telegram.Api.Aggregator.IHandle<DeleteSecureValueEventArgs>\r\n    {\r\n        private readonly TLPasswordBase _passwordBase;\r\n\r\n        public PassportSettingsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _passwordBase = stateService.Password;\r\n            stateService.Password = null;\r\n\r\n            Items.Clear();\r\n            if (stateService.SecureValues != null)\r\n            {\r\n                Items.AddRange(stateService.SecureValues);\r\n                stateService.SecureValues = null;\r\n            }\r\n\r\n            EventAggregator.Subscribe(this);\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n        }\r\n\r\n        public void Edit(TLSecureValue value)\r\n        {\r\n            if (value == null) return;\r\n\r\n            if (PhoneNumberViewModel.IsValidType(value.Type))\r\n            {\r\n                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeletePhoneNumberAlert, AppResources.AppName,\r\n                    AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                    dismissed =>\r\n                    {\r\n                        if (dismissed == CustomMessageBoxResult.RightButton)\r\n                        {\r\n                            IsWorking = true;\r\n                            MTProtoService.DeleteSecureValueAsync(new TLVector<TLSecureValueTypeBase> { new TLSecureValueTypePhone() },\r\n                                result => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n\r\n                                    for (var i = 0; i < Items.Count; i++)\r\n                                    {\r\n                                        if (PhoneNumberViewModel.IsValidType(Items[i].Type))\r\n                                        {\r\n                                            Items.RemoveAt(i--);\r\n                                        }\r\n                                    }\r\n                                }),\r\n                                error => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                }));\r\n                        }\r\n                    });\r\n            }\r\n            else if (EmailViewModel.IsValidType(value.Type))\r\n            {\r\n                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeleteEmailAlert, AppResources.AppName,\r\n                    AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                    dismissed =>\r\n                    {\r\n                        if (dismissed == CustomMessageBoxResult.RightButton)\r\n                        {\r\n                            IsWorking = true;\r\n                            MTProtoService.DeleteSecureValueAsync(new TLVector<TLSecureValueTypeBase> { new TLSecureValueTypeEmail() },\r\n                                result => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n\r\n                                    for (var i = 0; i < Items.Count; i++)\r\n                                    {\r\n                                        if (EmailViewModel.IsValidType(Items[i].Type))\r\n                                        {\r\n                                            Items.RemoveAt(i--);\r\n                                        }\r\n                                    }\r\n                                }),\r\n                                error => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                }));\r\n                        }\r\n                    });\r\n            }\r\n            else if (ResidentialAddressViewModel.IsValidType(value.Type))\r\n            {\r\n                StateService.SecureValue = value;\r\n                StateService.Password = _passwordBase;\r\n                NavigationService.UriFor<ResidentialAddressViewModel>().Navigate();\r\n            }\r\n            else if (PersonalDetailsViewModel.IsValidType(value.Type))\r\n            {\r\n                StateService.SecureValue = value;\r\n                StateService.Password = _passwordBase;\r\n                NavigationService.UriFor<PersonalDetailsViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void AddDocument()\r\n        {\r\n            var items = new List<TLSecureValueTypeBase>\r\n            {\r\n                new TLSecureValueTypePhone(),\r\n                new TLSecureValueTypeEmail(),\r\n                new TLSecureValueTypePersonalDetails(),\r\n                new TLSecureValueTypePassport(),\r\n                new TLSecureValueTypeDriverLicense(),\r\n                new TLSecureValueTypeIdentityCard(),\r\n                new TLSecureValueTypeInternalPassport(),\r\n                new TLSecureValueTypeAddress(),\r\n                new TLSecureValueTypePassportRegistration(),\r\n                new TLSecureValueTypeUtilityBill(),\r\n                new TLSecureValueTypeBankStatement(),\r\n                new TLSecureValueTypeRentalAgreement(),\r\n                new TLSecureValueTypeTemporaryRegistration(),\r\n            };\r\n\r\n            var dict = new Dictionary<Type, Type>();\r\n            foreach (var item in Items)\r\n            {\r\n                dict[item.Type.GetType()] = item.Type.GetType();\r\n            }\r\n\r\n            var panel = new StackPanel{ Margin = new Thickness(0.0, 12.0, 0.0, 0.0) };\r\n            var messageBox = ShellViewModel.ShowCustomMessageBox(\r\n                null, AppResources.PassportNoDocumentsAdd,\r\n                null, null,\r\n                dismissed =>\r\n                {\r\n\r\n                },\r\n                items.Count > 10 ? \r\n                (object) new ScrollViewer { MaxHeight = 650.0, Content = panel, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled } : \r\n                panel);\r\n\r\n            for (var i = 0; i < items.Count; i++)\r\n            {\r\n                if (!dict.ContainsKey(items[i].GetType()))\r\n                {\r\n                    var listBoxItem = new ListBoxItem\r\n                    {\r\n                        Content =\r\n                            new TextBlock\r\n                            {\r\n                                Text = SecureRequiredTypeToCaptionConverter.Convert(items[i]),\r\n                                FontSize = 27,\r\n                                Margin = new Thickness(12.0)\r\n                            },\r\n                        DataContext = items[i]\r\n                    };\r\n                    TiltEffect.SetIsTiltEnabled(listBoxItem, true);\r\n                    listBoxItem.Tap += (sender, args) =>\r\n                    {\r\n                        messageBox.Dismiss();\r\n                        var item = sender as ListBoxItem;\r\n                        if (item != null)\r\n                        {\r\n                            var secureValueType = item.DataContext as TLSecureValueTypeBase;\r\n                            if (secureValueType != null)\r\n                            {\r\n                                if (PhoneNumberViewModel.IsValidType(secureValueType))\r\n                                {\r\n                                    StateService.SecureType = secureValueType;\r\n                                    StateService.Password = _passwordBase;\r\n                                    NavigationService.UriFor<PhoneNumberViewModel>().Navigate();\r\n                                }\r\n                                else if (EmailViewModel.IsValidType(secureValueType))\r\n                                {\r\n                                    StateService.SecureType = secureValueType;\r\n                                    StateService.Password = _passwordBase;\r\n                                    NavigationService.UriFor<EmailViewModel>().Navigate();\r\n                                }\r\n                                else if (ResidentialAddressViewModel.IsValidType(secureValueType))\r\n                                {\r\n                                    StateService.SecureType = secureValueType;\r\n                                    StateService.Password = _passwordBase;\r\n                                    NavigationService.UriFor<ResidentialAddressViewModel>().Navigate();\r\n                                }\r\n                                else if (PersonalDetailsViewModel.IsValidType(secureValueType))\r\n                                {\r\n                                    StateService.SecureType = secureValueType;\r\n                                    StateService.Password = _passwordBase;\r\n                                    NavigationService.UriFor<PersonalDetailsViewModel>().Navigate();\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                    };\r\n\r\n                    panel.Children.Add(listBoxItem);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void DeletePassport()\r\n        {\r\n            if (Items.Count == 0) return;\r\n\r\n            ShellViewModel.ShowCustomMessageBox(\r\n                AppResources.PassportDeleteConfirmation, AppResources.AppName,\r\n                AppResources.Delete, AppResources.Cancel,\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        var items = new TLVector<TLSecureValueTypeBase>();\r\n                        foreach (var item in Items)\r\n                        {\r\n                            items.Add(item.Type);\r\n                        }\r\n                        if (items.Count > 0)\r\n                        {\r\n                            MTProtoService.DeleteSecureValueAsync(\r\n                                items,\r\n                                result => BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n\r\n                                    Items.Clear();\r\n                                }),\r\n                                error => BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                }));\r\n                        }\r\n                    }\r\n                });\r\n        }\r\n\r\n        public void Handle(DeleteSecureValueEventArgs args)\r\n        {\r\n            foreach (var value in args.Values)\r\n            {\r\n                Items.Remove(value);\r\n            }\r\n        }\r\n\r\n        public void Handle(AddSecureValueEventArgs args)\r\n        {\r\n            foreach (var value in args.Values)\r\n            {\r\n                Items.Add(value);\r\n            }\r\n        }\r\n    }\r\n\r\n    public class DeleteSecureValueEventArgs\r\n    {\r\n        public IList<TLSecureValue> Values { get; set; }\r\n    }\r\n\r\n    public class AddSecureValueEventArgs\r\n    {\r\n        public IList<TLSecureValue> Values { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/PhotoPickerViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class PhotoPickerViewModel : ViewModelBase\r\n    {\r\n        private TLPrivacyRuleBase _selectedMainRule;\r\n\r\n        public TLPrivacyRuleBase SelectedMainRule\r\n        {\r\n            get { return _selectedMainRule; }\r\n            set { SetField(ref _selectedMainRule, value, () => SelectedMainRule); }\r\n        }\r\n\r\n        public List<TLPrivacyRuleBase> MainRules { get; set; }\r\n\r\n        private TLPhotoPickerSettings _settings;\r\n\r\n        public PhotoPickerViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _settings = StateService.GetPhotoPickerSettings();\r\n\r\n            MainRules = new List<TLPrivacyRuleBase>\r\n            {\r\n                new TLPrivacyValueAllowAll{ Label = AppResources.InAppPhotoPicker },\r\n                new TLPrivacyValueAllowContacts{ Label = AppResources.ExternalPhotoPicker }\r\n            };\r\n\r\n            _selectedMainRule = _settings.External ? MainRules[1] : MainRules[0];\r\n            _selectedMainRule.IsChecked = true;\r\n\r\n            PropertyChanged += OnPropertyChanged;\r\n        }\r\n\r\n        private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            _settings.External = SelectedMainRule == MainRules[1];\r\n            StateService.SavePhotoPickerSettings(_settings);\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/ProxyListViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Cache.EventArgs;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.Transport;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Additional;\r\nusing Execute = Caliburn.Micro.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ProxyListViewModel : ItemsViewModelBase<TLProxyBase>\r\n    {\r\n        private bool _isEnabled;\r\n\r\n        public bool IsEnabled\r\n        {\r\n            get { return _isEnabled; }\r\n            set { SetField(ref _isEnabled, value, () => IsEnabled); }\r\n        }\r\n\r\n        private bool _useForCalls;\r\n\r\n        public bool UseForCalls\r\n        {\r\n            get { return _useForCalls; }\r\n            set { SetField(ref _useForCalls, value, () => UseForCalls); }\r\n        }\r\n\r\n        private readonly ITransportService _transportService;\r\n\r\n        public bool SuppressSharing { get; protected set; }\r\n\r\n        private TLProxyConfig76 _proxyConfig;\r\n\r\n        private readonly IProxyChecker _proxyChecker;\r\n\r\n        public ProxyListViewModel(IProxyChecker proxyChecker, ITransportService transportService, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            SuppressSharing = StateService.SuppressProxySharing;\r\n            StateService.SuppressProxySharing = false;\r\n\r\n            _proxyChecker = proxyChecker;\r\n            _transportService = transportService;\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => IsEnabled))\r\n                {\r\n                    var proxy = _proxyConfig.GetProxy();\r\n                    _proxyConfig.IsEnabled = new TLBool(IsEnabled);\r\n                    if (proxy != null)\r\n                    {\r\n                        proxy.NotifyOfPropertyChange(() => proxy.Self);\r\n                    }\r\n                    SetReconnect(!_proxyConfig.IsEmpty, _proxyConfig, null);\r\n                }\r\n                else if (Property.NameEquals(args.PropertyName, () => UseForCalls))\r\n                {\r\n                    var proxy = _proxyConfig.GetProxy();\r\n                    _proxyConfig.UseForCalls = new TLBool(UseForCalls);\r\n                    if (proxy != null)\r\n                    {\r\n                        proxy.NotifyOfPropertyChange(() => proxy.Self);\r\n                    }\r\n                    SetReconnect(false, _proxyConfig, null);\r\n                }\r\n            };\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            _proxyConfig = _transportService.GetProxyConfig() as TLProxyConfig76;\r\n            if (_proxyConfig != null)\r\n            {\r\n                _isEnabled = _proxyConfig.IsEnabled.Value;\r\n                _useForCalls = _proxyConfig.UseForCalls.Value;\r\n\r\n                var now = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n                Items.Clear();\r\n                for (var i = 0; i < _proxyConfig.Items.Count; i++)\r\n                {\r\n                    var item = _proxyConfig.Items[i];\r\n                    item.IsSelected = i == _proxyConfig.SelectedIndex.Value;\r\n                    Items.Add(item);\r\n\r\n                    if (CheckProxy(item))\r\n                    {\r\n                        item.Status = ProxyStatus.Connecting;\r\n                        item.Ping = null;\r\n                        _proxyChecker.CheckAsync(item, 10.0,\r\n                            (proxyItem, ping) => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                proxyItem.Proxy.CheckTime = now;\r\n                                proxyItem.Proxy.Ping = ping;\r\n                                proxyItem.Proxy.Status = item.Ping != null ? ProxyStatus.Available : ProxyStatus.Unavailable;\r\n\r\n                                Set(_proxyConfig);\r\n                            }));\r\n                    }\r\n                }\r\n            }\r\n\r\n            _transportService.TransportConnected += OnTransportConnected;\r\n            _transportService.TransportConnecting += OnTransportConnecting;\r\n        }\r\n\r\n        private bool CheckProxy(TLProxyBase item)\r\n        {\r\n            var lastCheckTime = item.CheckTime;\r\n            if (lastCheckTime == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var now = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n            if (lastCheckTime.Value + 60 * 2 < now.Value)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void OnTransportConnecting(object sender, TransportEventArgs e)\r\n        {\r\n            if (e.Transport.MTProtoType == MTProtoTransportType.Main\r\n                && e.Transport.ProxyConfig != null\r\n                && !e.Transport.ProxyConfig.IsEmpty\r\n                && e.Transport.ProxyConfig.IsEnabled.Value)\r\n            {\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (_proxyConfig != null)\r\n                    {\r\n                        foreach (var item in _proxyConfig.Items)\r\n                        {\r\n                            if (item == e.Transport.ProxyConfig.GetProxy())\r\n                            {\r\n                                item.Status = ProxyStatus.Connecting;\r\n                                item.Ping = null;\r\n                            }\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        private void OnTransportConnected(object sender, TransportEventArgs e)\r\n        {\r\n            if (e.Transport.MTProtoType == MTProtoTransportType.Main\r\n                && e.Transport.ProxyConfig != null\r\n                && !e.Transport.ProxyConfig.IsEmpty\r\n                && e.Transport.ProxyConfig.IsEnabled.Value)\r\n            {\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (_proxyConfig != null)\r\n                    {\r\n                        for (var i = 0; i < _proxyConfig.Items.Count; i++)\r\n                        {\r\n                            var item = _proxyConfig.Items[i];\r\n                            if (item == e.Transport.ProxyConfig.GetProxy())\r\n                            {\r\n                                var now = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n                                item.CheckTime = now;\r\n                                item.Status = ProxyStatus.Available;\r\n                                item.Ping = e.Transport.Ping > 0 ? new TLInt((int) e.Transport.Ping) : null;\r\n                                if (item.Ping == null)\r\n                                {\r\n                                    PingMainTransportAsync(item, e.Transport);\r\n                                }\r\n\r\n                                Set(_proxyConfig);\r\n                            }\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        private void PingMainTransportAsync(TLProxyBase item, ITransport transport)\r\n        {\r\n            MTProtoService.PingAsync(TLLong.Random(),\r\n                pong => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    item.Ping = transport.Ping > 0\r\n                        ? new TLInt((int)transport.Ping)\r\n                        : null;\r\n\r\n                    Set(_proxyConfig);\r\n                }));\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            _transportService.TransportConnected -= OnTransportConnected;\r\n            _transportService.TransportConnecting -= OnTransportConnecting;\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        public void Select(TLProxyBase proxy)\r\n        {\r\n            var proxyConfig = _proxyConfig;\r\n            if (proxyConfig == null) return;\r\n            if (proxyConfig.IsEnabled.Value && proxyConfig.GetProxy() == proxy) return;\r\n\r\n            var currentProxy = proxyConfig.GetProxy();\r\n            proxyConfig.IsEnabled = TLBool.True;\r\n            if (currentProxy != null)\r\n            {\r\n                currentProxy.NotifyOfPropertyChange(() => currentProxy.Self);\r\n            }\r\n            IsEnabled = true;\r\n            proxyConfig.SelectedIndex = new TLInt(proxyConfig.Items.IndexOf(proxy));\r\n            foreach (var item in proxyConfig.Items)\r\n            {\r\n                item.IsSelected = item == proxy;\r\n                item.Ping = item.IsSelected ? null : item.Ping;\r\n                item.Status = item.IsSelected ? ProxyStatus.Connecting : (item.Status == ProxyStatus.Connecting ? ProxyStatus.Unavailable : item.Status);\r\n            }\r\n\r\n            SetReconnect(true, proxyConfig, proxy);\r\n        }\r\n\r\n        private static void Set(TLProxyConfigBase proxyConfig)\r\n        {\r\n            var transportService = IoC.Get<ITransportService>();\r\n            transportService.SetProxyConfig(proxyConfig);\r\n        }\r\n\r\n        private static void SetReconnect(bool reconnect, TLProxyConfigBase proxyConfig, TLProxyBase proxy)\r\n        {\r\n            Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"SetRecconect recconect={0} proxyConfig={1}\", reconnect, proxyConfig));\r\n            if (proxyConfig == null) return;\r\n\r\n            Set(proxyConfig);\r\n\r\n            var transportService = IoC.Get<ITransportService>();\r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n            var cacheService = IoC.Get<ICacheService>();\r\n            var eventAggregator = IoC.Get<ITelegramEventAggregator>();\r\n\r\n            if (reconnect)\r\n            {\r\n                var promoDialogs = cacheService.GetDialogs().OfType<TLDialog71>().Where(x => x.IsPromo).ToList();\r\n                foreach (var dialog in promoDialogs)\r\n                {\r\n                    cacheService.UpdateDialogPromo(dialog, false);\r\n                }\r\n\r\n                cacheService.SyncProxyData(null, result => { });\r\n\r\n                transportService.Close();\r\n                mtProtoService.PingAsync(TLLong.Random(), \r\n                    result => Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (proxy != null)\r\n                        {\r\n                            var now = TLUtils.DateToUniversalTimeTLInt(mtProtoService.ClientTicksDelta, DateTime.Now);\r\n                            proxy.CheckTime = now;\r\n                            proxy.Status = ProxyStatus.Available;\r\n                            proxy.Ping = mtProtoService.GetActiveTransport().Ping > 0\r\n                                ? new TLInt((int)mtProtoService.GetActiveTransport().Ping)\r\n                                : null;\r\n\r\n                            Set(proxyConfig);\r\n                        }\r\n\r\n                        var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                        if (isAuthorized)\r\n                        {\r\n                            mtProtoService.GetProxyDataAsync(\r\n                                result2 =>\r\n                                {\r\n                                    var proxyDataPromo = result2 as TLProxyDataPromo;\r\n                                    if (proxyDataPromo != null)\r\n                                    {\r\n                                        mtProtoService.GetPromoDialogAsync(mtProtoService.PeerToInputPeer(proxyDataPromo.Peer),\r\n                                            result3 =>\r\n                                            {\r\n                                                if (result3.Dialogs.Count > 0)\r\n                                                {\r\n                                                    eventAggregator.Publish(new ProxyDataChangedEventArgs(proxyDataPromo));\r\n                                                }\r\n                                            });\r\n                                    }\r\n                                    else\r\n                                    {\r\n\r\n                                    }\r\n\r\n                                    Telegram.Api.Helpers.Execute.ShowDebugMessage(result2.ToString());\r\n                                });\r\n                        }\r\n                    }));\r\n            }\r\n\r\n            eventAggregator.Publish(new ProxyChangedEventArgs(proxyConfig));\r\n        }\r\n\r\n        public static void ApplySettings(TLProxyConfigBase proxyConfigBase, bool isEnabled, TLProxyBase proxy)\r\n        {\r\n            var proxyConfig = proxyConfigBase ?? TLProxyConfigBase.Empty;\r\n\r\n            var proxyConfig76 = proxyConfig as TLProxyConfig76;\r\n            if (proxyConfig76 == null) return;\r\n\r\n            proxyConfig.IsEnabled = new TLBool(isEnabled);\r\n\r\n            var added = false;\r\n            for (var i = 0; i < proxyConfig76.Items.Count; i++)\r\n            {\r\n                var proxyItem = proxyConfig76.Items[i];\r\n                if (TLProxyBase.ProxyEquals(proxyItem, proxy))\r\n                {\r\n                    proxyConfig76.SelectedIndex = new TLInt(i);\r\n                    added = true;\r\n                    break;\r\n                }\r\n            }\r\n            if (!added)\r\n            {\r\n                proxyConfig76.Items.Insert(0, proxy);\r\n                proxyConfig76.SelectedIndex = new TLInt(0);\r\n            }\r\n\r\n            SetReconnect(true, proxyConfig76, proxy);\r\n        }\r\n\r\n        public void Add()\r\n        {\r\n            StateService.SuppressProxySharing = SuppressSharing;\r\n            NavigationService.UriFor<ProxyViewModel>().Navigate();\r\n        }\r\n\r\n        public void Delete(TLProxyBase proxy)\r\n        {\r\n            var proxyConfig = _proxyConfig;\r\n            if (proxyConfig == null) return;\r\n\r\n            var selectedProxy = proxyConfig.Items[proxyConfig.SelectedIndex.Value];\r\n            var reconnect = selectedProxy == proxy;\r\n            \r\n            Items.Remove(proxy);\r\n            proxyConfig.Items.Remove(proxy);\r\n            proxyConfig.SelectedIndex = new TLInt(proxyConfig.Items.IndexOf(selectedProxy));\r\n            if (proxyConfig.SelectedIndex.Value < 0)\r\n            {\r\n                if (proxyConfig.Items.Count > 0)\r\n                {\r\n                    proxyConfig.SelectedIndex = new TLInt(0);\r\n                    selectedProxy = proxyConfig.Items[proxyConfig.SelectedIndex.Value];\r\n                }\r\n                else if (proxyConfig.IsEnabled.Value)\r\n                {\r\n                    proxyConfig.IsEnabled = TLBool.False; \r\n                    IsEnabled = false;  // SetReconnect will be invoked here\r\n\r\n                    return;\r\n                }\r\n            }\r\n\r\n            foreach (var item in proxyConfig.Items)\r\n            {\r\n                item.IsSelected = item == selectedProxy;\r\n            }\r\n\r\n            SetReconnect(reconnect, proxyConfig, selectedProxy);\r\n        }\r\n\r\n        public void Open(TLProxyBase proxy)\r\n        {\r\n            StateService.Proxy = proxy;\r\n            StateService.SuppressProxySharing = SuppressSharing;\r\n            NavigationService.UriFor<ProxyViewModel>().Navigate();\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            var proxyConfig = _proxyConfig ?? TLProxyConfigBase.Empty as TLProxyConfig76;\r\n            if (proxyConfig == null) return;\r\n\r\n            proxyConfig.IsEnabled = new TLBool(IsEnabled);\r\n            proxyConfig.UseForCalls = new TLBool(UseForCalls);\r\n\r\n            SetReconnect(true, proxyConfig, proxyConfig.GetProxy());\r\n\r\n            NavigationService.GoBack();\r\n        }\r\n\r\n        public void Share()\r\n        {\r\n            if (SuppressSharing) return;\r\n            if (_proxyConfig == null || _proxyConfig.IsEmpty) return;\r\n\r\n            var view = GetView() as ProxyListView;\r\n            if (view != null)\r\n            {\r\n                view.OpenShareMessagePicker(string.Empty,\r\n                    args =>\r\n                    {\r\n                        if (args.Dialogs.Count == 0) return;\r\n\r\n                        var prefix = Constants.DefaultMeUrlPrefix;\r\n                        var config63 = CacheService.GetConfig() as TLConfig63;\r\n                        if (config63 != null && !TLString.IsNullOrEmpty(config63.MeUrlPrefix))\r\n                        {\r\n                            prefix = config63.MeUrlPrefix.ToString();\r\n                        }\r\n\r\n                        var text = string.IsNullOrEmpty(args.Comment)\r\n                            ? GetProxyListString(prefix)\r\n                            : args.Comment + \"\\n\\n\" + GetProxyListString(prefix);\r\n\r\n                        var messages = new List<TLMessage25>();\r\n                        foreach (var dialog in args.Dialogs)\r\n                        {\r\n                            var with = dialog.With;\r\n                            if (with != null)\r\n                            {\r\n                                with.ClearBitmap();\r\n                            }\r\n\r\n                            var date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n\r\n                            var message = TLUtils.GetMessage(\r\n                                new TLInt(StateService.CurrentUserId),\r\n                                dialog.Peer,\r\n                                MessageStatus.Sending,\r\n                                TLBool.True,\r\n                                TLBool.True,\r\n                                date,\r\n                                new TLString(text),\r\n                                new TLMessageMediaEmpty(),\r\n                                TLLong.Random(),\r\n                                new TLInt(0)\r\n                            );\r\n\r\n                            messages.Add(message);\r\n                        }\r\n\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            foreach (var message in messages)\r\n                            {\r\n                                CacheService.SyncSendingMessage(\r\n                                    message, null,\r\n                                    result => DialogDetailsViewModel.SendInternal(message, MTProtoService));\r\n                            }\r\n                        });\r\n                    });\r\n            }\r\n\r\n            return;\r\n            //StateService.Url = GetProxyListString(prefix);\r\n            //NavigationService.UriFor<ChooseDialogViewModel>().Navigate();\r\n        }\r\n\r\n        private string GetProxyListString(string prefix)\r\n        {\r\n            var url = string.Empty;\r\n            \r\n            foreach (var item in _proxyConfig.Items)\r\n            {\r\n                if (!item.IsEmpty)\r\n                {\r\n                    url += string.Format(\"{0}\\n\\n\", item.GetUrl(prefix));\r\n                }\r\n            }\r\n\r\n            return url.Trim('\\n');\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Additional/ProxyViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.Transport;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Additional\r\n{\r\n    public class ProxyViewModel : ViewModelBase\r\n    {\r\n        private bool _isSocks5Proxy = true;\r\n\r\n        public bool IsSocks5Proxy\r\n        {\r\n            get { return _isSocks5Proxy; }\r\n            set { SetField(ref _isSocks5Proxy, value, () => IsSocks5Proxy); }\r\n        }\r\n\r\n        public string Server { get; set; }\r\n\r\n        public string Port { get; set; }\r\n\r\n        public string Username { get; set; }\r\n\r\n        public string Password { get; set; }\r\n\r\n        public string Secret { get; set; }\r\n\r\n        private readonly ITransportService _transportService;\r\n\r\n        public bool SuppressSharing { get; protected set; }\r\n\r\n        private TLProxyBase _proxy;\r\n\r\n        public ProxyViewModel(ITransportService transportService, ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            SuppressSharing = StateService.SuppressProxySharing;\r\n            StateService.SuppressProxySharing = false;\r\n\r\n            _transportService = transportService;\r\n\r\n            _proxy = StateService.Proxy;\r\n            StateService.Proxy = null;\r\n\r\n            if (_proxy != null)\r\n            {\r\n                Server = _proxy.Server.ToString();\r\n                Port = _proxy.Port.Value >= 0 ? _proxy.Port.Value.ToString(CultureInfo.InvariantCulture) : string.Empty;\r\n\r\n                var socks5Proxy = _proxy as TLSocks5Proxy;\r\n                if (socks5Proxy != null)\r\n                {\r\n                    Username = socks5Proxy.Username.ToString();\r\n                    Password = socks5Proxy.Password.ToString();\r\n                    _isSocks5Proxy = true;\r\n                }\r\n\r\n                var mtProtoProxy = _proxy as TLMTProtoProxy;\r\n                if (mtProtoProxy != null)\r\n                {\r\n                    Secret = mtProtoProxy.Secret.ToString();\r\n                    _isSocks5Proxy = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsDoneEnabled\r\n        {\r\n            get\r\n            {\r\n                if (string.IsNullOrEmpty(Server) || string.IsNullOrEmpty(Port)) return false;\r\n                if (!IsSocks5Proxy && string.IsNullOrEmpty(Secret)) return false;\r\n\r\n                return true;\r\n            }\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            var proxyConfig = _transportService.GetProxyConfig() as TLProxyConfig76 ?? TLProxyConfigBase.Empty as TLProxyConfig76;\r\n            if (proxyConfig == null) return;\r\n            if (!IsDoneEnabled) return;\r\n\r\n            if (IsSocks5Proxy)\r\n            {\r\n                TLSocks5Proxy proxy = null;\r\n                // new proxy\r\n                if (_proxy == null)\r\n                {\r\n                    proxy = new TLSocks5Proxy { CustomFlags = new TLLong(0) };\r\n                    proxy.Server = new TLString(Server);\r\n                    var port = 0;\r\n                    proxy.Port = int.TryParse(Port, out port) ? new TLInt(port) : new TLInt(0);\r\n                    proxy.Username = new TLString(Username);\r\n                    proxy.Password = new TLString(Password);\r\n\r\n                    _proxy = proxy;\r\n                    proxyConfig.Items.Add(_proxy);\r\n                    proxyConfig.SelectedIndex = new TLInt(proxyConfig.Items.IndexOf(_proxy));\r\n                    proxyConfig.IsEnabled = TLBool.True;\r\n\r\n                    _transportService.SetProxyConfig(proxyConfig);\r\n                    _transportService.Close();\r\n                    MTProtoService.PingAsync(TLLong.Random(), result => { });\r\n\r\n                    EventAggregator.Publish(new ProxyChangedEventArgs(proxyConfig));\r\n                    NavigationService.GoBack();\r\n\r\n                    return;\r\n                }\r\n\r\n                proxy = _proxy as TLSocks5Proxy;\r\n                // change type\r\n                if (proxy == null)\r\n                {\r\n                    proxy = new TLSocks5Proxy { CustomFlags = new TLLong(0) };\r\n                    proxy.Server = new TLString(Server);\r\n                    var port = 0;\r\n                    proxy.Port = int.TryParse(Port, out port) ? new TLInt(port) : new TLInt(0);\r\n                    proxy.Username = new TLString(Username);\r\n                    proxy.Password = new TLString(Password);\r\n\r\n                    _proxy = proxy;\r\n                    proxyConfig.Items.Add(_proxy);\r\n                    proxyConfig.SelectedIndex = new TLInt(proxyConfig.Items.IndexOf(_proxy));\r\n\r\n                    _transportService.SetProxyConfig(proxyConfig);\r\n                    _transportService.Close();\r\n                    MTProtoService.PingAsync(TLLong.Random(), result => { });\r\n\r\n                    EventAggregator.Publish(new ProxyChangedEventArgs(proxyConfig));\r\n                    NavigationService.GoBack();\r\n\r\n                    return;\r\n                }\r\n                // same type\r\n                else\r\n                {\r\n                    proxy.Server = new TLString(Server);\r\n                    var port = 0;\r\n                    proxy.Port = int.TryParse(Port, out port) ? new TLInt(port) : new TLInt(0);\r\n                    proxy.Username = new TLString(Username);\r\n                    proxy.Password = new TLString(Password);\r\n\r\n                    _proxy = proxy;\r\n                    if (proxyConfig.SelectedIndex.Value == proxyConfig.Items.IndexOf(_proxy))\r\n                    {\r\n                        _transportService.SetProxyConfig(proxyConfig);\r\n                        _transportService.Close();\r\n                        MTProtoService.PingAsync(TLLong.Random(), result => { });\r\n                    }\r\n\r\n                    EventAggregator.Publish(new ProxyChangedEventArgs(proxyConfig));\r\n                    NavigationService.GoBack();\r\n\r\n                    return;\r\n                }\r\n\r\n            }\r\n            else\r\n            {\r\n                TLMTProtoProxy proxy = null;\r\n                // new proxy\r\n                if (_proxy == null)\r\n                {\r\n                    proxy = new TLMTProtoProxy { CustomFlags = new TLLong(0) };\r\n                    proxy.Server = new TLString(Server);\r\n                    var port = 0;\r\n                    proxy.Port = int.TryParse(Port, out port) ? new TLInt(port) : new TLInt(0);\r\n                    proxy.Secret = new TLString(Secret);\r\n\r\n                    _proxy = proxy;\r\n                    proxyConfig.Items.Add(_proxy);\r\n                    proxyConfig.SelectedIndex = new TLInt(proxyConfig.Items.IndexOf(_proxy));\r\n                    proxyConfig.IsEnabled = TLBool.True;\r\n\r\n                    _transportService.SetProxyConfig(proxyConfig);\r\n                    _transportService.Close();\r\n                    MTProtoService.PingAsync(TLLong.Random(), result => { });\r\n\r\n                    EventAggregator.Publish(new ProxyChangedEventArgs(proxyConfig));\r\n                    NavigationService.GoBack();\r\n\r\n                    return;\r\n                }\r\n\r\n                proxy = _proxy as TLMTProtoProxy;\r\n                // change type\r\n                if (proxy == null)\r\n                {\r\n                    proxy = new TLMTProtoProxy { CustomFlags = new TLLong(0) };\r\n                    proxy.Server = new TLString(Server);\r\n                    var port = 0;\r\n                    proxy.Port = int.TryParse(Port, out port) ? new TLInt(port) : new TLInt(0);\r\n                    proxy.Secret = new TLString(Secret);\r\n\r\n                    _proxy = proxy;\r\n                    proxyConfig.Items.Add(_proxy);\r\n                    proxyConfig.SelectedIndex = new TLInt(proxyConfig.Items.IndexOf(_proxy));\r\n\r\n                    _transportService.SetProxyConfig(proxyConfig);\r\n                    _transportService.Close();\r\n                    MTProtoService.PingAsync(TLLong.Random(), result => { });\r\n\r\n                    EventAggregator.Publish(new ProxyChangedEventArgs(proxyConfig));\r\n                    NavigationService.GoBack();\r\n\r\n                    return;\r\n                }\r\n                // same type\r\n                else\r\n                {\r\n                    proxy.Server = new TLString(Server);\r\n                    var port = 0;\r\n                    proxy.Port = int.TryParse(Port, out port) ? new TLInt(port) : new TLInt(0);\r\n                    proxy.Secret = new TLString(Secret);\r\n\r\n                    _proxy = proxy;\r\n                    if (proxyConfig.SelectedIndex.Value == proxyConfig.Items.IndexOf(_proxy))\r\n                    {\r\n                        _transportService.SetProxyConfig(proxyConfig);\r\n                        _transportService.Close();\r\n                        MTProtoService.PingAsync(TLLong.Random(), result => { });\r\n                    }\r\n\r\n                    EventAggregator.Publish(new ProxyChangedEventArgs(proxyConfig));\r\n                    NavigationService.GoBack();\r\n\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Share()\r\n        {\r\n            if (SuppressSharing) return;\r\n            if (string.IsNullOrEmpty(Server) || string.IsNullOrEmpty(Port)) return;\r\n            if (!IsSocks5Proxy && string.IsNullOrEmpty(Secret)) return;\r\n\r\n            var view = GetView() as ProxyView;\r\n            if (view != null)\r\n            {\r\n                view.OpenShareMessagePicker(string.Empty,\r\n                    args =>\r\n                    {\r\n                        if (args.Dialogs.Count == 0) return;\r\n\r\n                        var prefix = Constants.DefaultMeUrlPrefix;\r\n                        var config63 = CacheService.GetConfig() as TLConfig63;\r\n                        if (config63 != null && !TLString.IsNullOrEmpty(config63.MeUrlPrefix))\r\n                        {\r\n                            prefix = config63.MeUrlPrefix.ToString();\r\n                        }\r\n\r\n                        var text = string.IsNullOrEmpty(args.Comment)\r\n                            ? prefix + GetProxyString()\r\n                            : args.Comment + \"\\n\\n\" + prefix + GetProxyString();\r\n\r\n                        var messages = new List<TLMessage25>();\r\n                        foreach (var dialog in args.Dialogs)\r\n                        {\r\n                            var with = dialog.With;\r\n                            if (with != null)\r\n                            {\r\n                                with.ClearBitmap();\r\n                            }\r\n\r\n                            var date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now);\r\n\r\n                            var message = TLUtils.GetMessage(\r\n                                new TLInt(StateService.CurrentUserId),\r\n                                dialog.Peer,\r\n                                MessageStatus.Sending,\r\n                                TLBool.True,\r\n                                TLBool.True,\r\n                                date,\r\n                                new TLString(text),\r\n                                new TLMessageMediaEmpty(),\r\n                                TLLong.Random(),\r\n                                new TLInt(0)\r\n                            );\r\n\r\n                            messages.Add(message);\r\n                        }\r\n\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            foreach (var message in messages)\r\n                            {\r\n                                CacheService.SyncSendingMessage(\r\n                                    message, null,\r\n                                    result => DialogDetailsViewModel.SendInternal(message, MTProtoService));\r\n                            }\r\n                        });\r\n                    });\r\n            }\r\n\r\n            return;\r\n            //StateService.Url = prefix + GetProxyString();\r\n            //NavigationService.UriFor<ChooseDialogViewModel>().Navigate();\r\n        }\r\n\r\n        private string GetProxyString()\r\n        {\r\n            var proxyString = string.Empty;\r\n            if (IsSocks5Proxy)\r\n            {\r\n                proxyString = string.Format(\"socks?server={0}&port={1}\", Server, Port);\r\n                if (!string.IsNullOrEmpty(Username) && !string.IsNullOrEmpty(Password))\r\n                {\r\n                    proxyString += string.Format(\"&user={0}&pass={1}\", Username, Password);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                proxyString = string.Format(\"proxy?server={0}&port={1}&secret={2}\", Server, Port, Secret);\r\n            }\r\n\r\n            return proxyString;\r\n        }\r\n    }\r\n\r\n    public class ProxyChangedEventArgs\r\n    {\r\n        public TLProxyConfigBase ProxyConfig { get; set; }\r\n\r\n        public ProxyChangedEventArgs(TLProxyConfigBase proxyConfig)\r\n        {\r\n            ProxyConfig = proxyConfig;\r\n        }\r\n    }\r\n\r\n    public class ProxyDataChangedEventArgs\r\n    {\r\n        public TLProxyDataBase ProxyData { get; set; }\r\n\r\n        public ProxyDataChangedEventArgs(TLProxyDataBase proxyData)\r\n        {\r\n            ProxyData = proxyData;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Calls/CallViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Calls;\r\nusing TelegramClient.Views.Contacts;\r\nusing TelegramClient.Views.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Calls\r\n{\r\n    public class CallViewModel : PropertyChangedBase\r\n    {\r\n        public TLUserBase User { get; set; }\r\n\r\n        public string Status { get; set; }\r\n\r\n        public string Emojis { get; set; }\r\n\r\n        public string EmojiKeyDescription\r\n        {\r\n            get { return string.Format(AppResources.EmojiKeyDescription, User != null ? User.ShortName : string.Empty); }\r\n        }\r\n\r\n        private readonly DispatcherTimer _callTimer;\r\n\r\n        private DateTime _callStartTime;\r\n\r\n        private CallViewState _viewState;\r\n\r\n        public CallViewState ViewState\r\n        {\r\n            get { return _viewState; }\r\n            set\r\n            {\r\n                if (_viewState != value)\r\n                {\r\n                    _viewState = value;\r\n                    NotifyOfPropertyChange(() => ViewState);\r\n                }\r\n            }\r\n        }\r\n\r\n        private int _signal;\r\n\r\n        public int Signal\r\n        {\r\n            get { return _signal; }\r\n            set\r\n            {\r\n                if (_signal != value)\r\n                {\r\n                    _signal = value;\r\n                    NotifyOfPropertyChange(() => Signal);\r\n                }\r\n            }\r\n        }\r\n\r\n        private readonly IVoIPService _voipService;\r\n\r\n        public TLLong CallId { get; set; }\r\n\r\n        public CallViewModel(TLUserBase user, IVoIPService voipService)\r\n        {\r\n            _callTimer = new DispatcherTimer();\r\n            _callTimer.Interval = TimeSpan.FromSeconds(0.33);\r\n            _callTimer.Tick += CallTimer_Tick;\r\n            _voipService = voipService;\r\n\r\n            User = user;\r\n        }\r\n\r\n        public void ChangeCallState(PhoneCallState state)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(state);\r\n            if (state == PhoneCallState.STATE_WAITING_INCOMING)\r\n            {\r\n                Status = AppResources.VoipIncoming;\r\n            }\r\n            else if (state == PhoneCallState.STATE_WAIT_INIT || state == PhoneCallState.STATE_WAIT_INIT_ACK)\r\n            {\r\n                Status = AppResources.VoipConnecting;\r\n                ViewState = CallViewState.CallConnecting;\r\n            }\r\n            else if (state == PhoneCallState.STATE_EXCHANGING_KEYS)\r\n            {\r\n                Status = AppResources.VoipExchangingKeys;\r\n                ViewState = CallViewState.CallConnecting;\r\n            }\r\n            else if (state == PhoneCallState.STATE_WAITING)\r\n            {\r\n                Status = AppResources.VoipWaiting;\r\n            }\r\n            else if (state == PhoneCallState.STATE_RINGING)\r\n            {\r\n                Status = AppResources.VoipRinging;\r\n            }\r\n            else if (state == PhoneCallState.STATE_REQUESTING)\r\n            {\r\n                Status = AppResources.VoipRequesting;\r\n            }\r\n            else if (state == PhoneCallState.STATE_HANGING_UP)\r\n            {\r\n                Status = AppResources.VoipHangingUp;\r\n            }\r\n            else if (state == PhoneCallState.STATE_ENDED)\r\n            {\r\n                Status = AppResources.VoipEnded;\r\n            }\r\n            else if (state == PhoneCallState.STATE_BUSY)\r\n            {\r\n                Status = AppResources.VoipBusy;\r\n            }\r\n            else if (state == PhoneCallState.STATE_ESTABLISHED)\r\n            {\r\n                StartTimer();\r\n                ViewState = CallViewState.Call;\r\n            }\r\n            else if (state == PhoneCallState.STATE_FAILED)\r\n            {\r\n                Status = AppResources.VoipFailed;\r\n            }\r\n\r\n            NotifyOfPropertyChange(() => Status);\r\n        }\r\n\r\n        public void StartTimer()\r\n        {\r\n            _callStartTime = DateTime.Now;\r\n            _callTimer.Start();\r\n        }\r\n\r\n        public void StartTimer(DateTime callStartTime)\r\n        {\r\n            _callStartTime = callStartTime;\r\n            _callTimer.Start();\r\n        }\r\n\r\n        public void StopTimer()\r\n        {\r\n            _callTimer.Stop();\r\n        }\r\n\r\n        private void CallTimer_Tick(object sender, System.EventArgs eventArgs)\r\n        {\r\n            var callTime = DateTime.Now - _callStartTime;\r\n            if (callTime.TotalHours >= 10.0)\r\n            {\r\n                Status = callTime.ToString(@\"hh\\:mm\\:ss\");\r\n            }\r\n            else if (callTime.TotalHours >= 1.0)\r\n            {\r\n                Status = callTime.ToString(@\"h\\:mm\\:ss\");\r\n            }\r\n            else if (callTime.TotalMinutes >= 10.0)\r\n            {\r\n                Status = callTime.ToString(@\"mm\\:ss\");\r\n            }\r\n            else\r\n            {\r\n                Status = callTime.ToString(@\"m\\:ss\");\r\n            }\r\n\r\n            NotifyOfPropertyChange(() => Status);\r\n        }\r\n\r\n        public void SwitchSpeaker(bool external)\r\n        {\r\n            _voipService.SwitchSpeaker(external);\r\n        }\r\n\r\n        public void Mute(bool muted)\r\n        {\r\n            _voipService.Mute(muted);\r\n        }\r\n\r\n        public void OpenChat()\r\n        {\r\n            if (User == null) return;\r\n\r\n            var contactView = ((PhoneApplicationFrame)Application.Current.RootVisual).Content as ContactView;\r\n            if (contactView != null)\r\n            {\r\n                var withUser = contactView.ViewModel.CurrentContact as TLUser;\r\n                if (withUser != null && withUser.Index == User.Index)\r\n                {\r\n                    var navigationService = IoC.Get<INavigationService>();\r\n                    if (navigationService != null)\r\n                    {\r\n                        var backEntry = navigationService.BackStack.FirstOrDefault();\r\n                        if (backEntry != null && backEntry.Source.ToString().Contains(\"DialogDetailsView.xaml\"))\r\n                        {\r\n                            navigationService.GoBack();\r\n\r\n                            return;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var dialogDetailsView = ((PhoneApplicationFrame)Application.Current.RootVisual).Content as DialogDetailsView;\r\n            if (dialogDetailsView != null)\r\n            {\r\n                if (dialogDetailsView.ViewModel != null)\r\n                {\r\n                    var withUser = dialogDetailsView.ViewModel.With as TLUser;\r\n                    if (withUser != null && withUser.Index == User.Index)\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                TelegramTransitionService.SetNavigationOutTransition(dialogDetailsView, null);\r\n            }\r\n\r\n            var secretDialogDetailsView = ((PhoneApplicationFrame)Application.Current.RootVisual).Content as SecretDialogDetailsView;\r\n            if (secretDialogDetailsView != null)\r\n            {\r\n                if (secretDialogDetailsView.ViewModel != null)\r\n                {\r\n                    var withUser = secretDialogDetailsView.ViewModel.With as TLUser;\r\n                    if (withUser != null && withUser.Index == User.Index)\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                TelegramTransitionService.SetNavigationOutTransition(secretDialogDetailsView, null);\r\n            }\r\n\r\n            IoC.Get<IStateService>().With = User;\r\n            IoC.Get<IStateService>().RemoveBackEntries = true;\r\n            IoC.Get<INavigationService>().UriFor<DialogDetailsViewModel>().WithParam(x => x.RandomParam, Guid.NewGuid().ToString()).Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Calls/CallsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.ViewModels.Search;\r\nusing Execute = Caliburn.Micro.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Calls\r\n{\r\n    public class CallsViewModel : ItemsViewModelBase<TLDialogBase>\r\n    {\r\n        public bool FirstRun { get; set; }\r\n\r\n        public CallsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            DisplayName = LowercaseConverter.Convert(AppResources.Calls);\r\n            Status = AppResources.Loading;\r\n            FirstRun = true;\r\n        }\r\n\r\n        public bool OpenDialogDetails(TLDialogBase dialog)\r\n        {\r\n            ShellViewModel.StartNewTimer();\r\n            //Execute.ShowDebugMessage(\"OpenDialogDetails\");\r\n\r\n            if (dialog == null)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"OpenDialogDetails dialog=null\");\r\n                return false;\r\n            }\r\n            if (dialog.With == null)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"OpenDialogDetails dialog.With=null\");\r\n                return false;\r\n            }\r\n\r\n            if (dialog.IsEncryptedChat)\r\n            {\r\n                var encryptedChat = CacheService.GetEncryptedChat(dialog.Peer.Id);\r\n\r\n                var user = dialog.With as TLUserBase;\r\n                if (user == null)\r\n                {\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"OpenDialogDetails encrypted dialog.With=null\");\r\n                    return false;\r\n                }\r\n\r\n                var cachedUser = CacheService.GetUser(user.Id);\r\n                StateService.Participant = cachedUser ?? user;\r\n                StateService.With = encryptedChat;\r\n                StateService.Dialog = dialog;\r\n                StateService.AnimateTitle = true;\r\n                NavigationService.UriFor<SecretDialogDetailsViewModel>().Navigate();\r\n            }\r\n            else\r\n            {\r\n                var settings = dialog.With as INotifySettings;\r\n                if (settings != null)\r\n                {\r\n                    settings.NotifySettings = settings.NotifySettings ?? dialog.NotifySettings;\r\n                }\r\n\r\n                StateService.With = dialog.With;\r\n                StateService.AnimateTitle = true;\r\n                NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            //if (FirstRun)\r\n            {\r\n                LoadCalls();\r\n            }\r\n        }\r\n\r\n        private volatile bool _isUpdated;\r\n\r\n        private int _offset = 0;\r\n\r\n        private void LoadCalls()\r\n        {\r\n            var timespan = Items.Count > 0 ? 1.0 : 0.0;\r\n\r\n            BeginOnThreadPool(TimeSpan.FromSeconds(timespan), () =>\r\n            {\r\n                var isAuthorized = SettingsHelper.GetValue<bool>(Constants.IsAuthorizedKey);\r\n                //if (!FirstRun)\r\n                //{\r\n                //    return;\r\n                //}\r\n                if (!isAuthorized)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                FirstRun = false;\r\n\r\n                Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.Loading : string.Empty;\r\n                var limit = 50;//Constants.DialogsSlice;\r\n                MTProtoService.SearchAsync(\r\n                    new TLInputPeerEmpty(), \r\n                    TLString.Empty, \r\n                    null, \r\n                    new TLInputMessagesFilterPhoneCalls{ Flags = new TLInt(0) },\r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(limit),\r\n                    new TLInt(0),\r\n                    result => \r\n                    {\r\n                        CacheService.AddChats(result.Chats, results => { });\r\n                        CacheService.AddUsers(result.Users, results => { });\r\n\r\n                        var items = new List<TLDialogBase>();\r\n                        var newMessages = result as TLMessages;\r\n                        if (newMessages != null)\r\n                        {\r\n                            var usersCache = new Dictionary<int, TLUserBase>();\r\n                            foreach (var user in newMessages.Users)\r\n                            {\r\n                                usersCache[user.Index] = user;\r\n                            }\r\n\r\n                            var chatsCache = new Dictionary<int, TLChatBase>();\r\n                            foreach (var chat in newMessages.Chats)\r\n                            {\r\n                                chatsCache[chat.Index] = chat;\r\n                            }\r\n\r\n                            foreach (var message in newMessages.Messages.OfType<TLMessageCommon>())\r\n                            {\r\n                                var dialog = new TLDialog { TopMessage = message };\r\n                                var peer = TLUtils.GetPeerFromMessage(message);\r\n                                if (peer is TLPeerUser)\r\n                                {\r\n                                    TLUserBase user;\r\n                                    if (!usersCache.TryGetValue(peer.Id.Value, out user))\r\n                                    {\r\n                                        continue;\r\n                                    }\r\n                                    dialog.With = user;\r\n                                    items.Add(dialog);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsLastSliceLoaded = result.Messages.Count < limit;\r\n                            _offset = Constants.DialogsSlice;\r\n\r\n                            _isUpdated = true;\r\n\r\n                            const int maxMessagesSlice = 8;\r\n                            Items.Clear();\r\n                            for (var i = 0; i < items.Count; i++)\r\n                            {\r\n                                if (i < maxMessagesSlice)\r\n                                {\r\n                                    Items.Add(items[i]);\r\n                                }\r\n                                else\r\n                                {\r\n                                    LazyItems.Add(items[i]);\r\n                                }\r\n                            }\r\n\r\n                            Status = Items.Count == 0 && LazyItems.Count == 0 ? AppResources.NoCallsHere : string.Empty;\r\n\r\n                            if (LazyItems.Count > 0)\r\n                            {\r\n                                BeginOnUIThread(() =>\r\n                                {\r\n                                    for (var i = 0; i < LazyItems.Count; i++)\r\n                                    {\r\n                                        Items.Add(LazyItems[i]);\r\n                                    }\r\n                                    LazyItems.Clear();\r\n                                });\r\n                            }\r\n                        });\r\n                    },\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"messages.getDialogs error \" + error);\r\n                        //_isUpdated = true;\r\n                        Status = string.Empty;\r\n                    }));\r\n            });\r\n\r\n            base.OnInitialize();\r\n        }\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            \r\n        }\r\n\r\n        public void DeleteDialog(TLDialogBase dialogBase)\r\n        {\r\n            var dialog = dialogBase as TLDialog;\r\n            if (dialog == null) return;\r\n\r\n            var message = dialog.TopMessage as TLMessageCommon;\r\n            if (message == null) return;\r\n\r\n            var messages = new List<TLMessageBase> { message };\r\n\r\n            var owner = message.Out.Value ? CacheService.GetUser(message.ToId.Id) : message.From;\r\n\r\n            if ((message.Id == null || message.Id.Value == 0) && message.RandomIndex != 0)\r\n            {\r\n                DeleteMessagesInternal(owner, null, messages);\r\n                return;\r\n            }\r\n\r\n            DialogDetailsViewModel.DeleteMessages(MTProtoService, false, null, null, messages, null, (result1, result2) => DeleteMessagesInternal(owner, result1, result2));\r\n        }\r\n\r\n        private void DeleteMessagesInternal(TLObject owner, TLMessageBase lastMessage, IList<TLMessageBase> messages)\r\n        {\r\n            var ids = new TLVector<TLInt>();\r\n            for (int i = 0; i < messages.Count; i++)\r\n            {\r\n                ids.Add(messages[i].Id);\r\n            }\r\n\r\n            // duplicate: deleting performed through updates\r\n            CacheService.DeleteMessages(ids);\r\n\r\n            BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < messages.Count; i++)\r\n                {\r\n                    for (var j = 0; j < Items.Count; j++)\r\n                    {\r\n                        var dialog = Items[j] as TLDialog;\r\n                        if (dialog != null\r\n                            && dialog.TopMessage != null\r\n                            && dialog.TopMessage.Id.Value == messages[i].Index)\r\n                        {\r\n                            Items.RemoveAt(j);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n\r\n            EventAggregator.Publish(new DeleteMessagesEventArgs { Owner = owner, Messages = messages });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Chats/GroupStickersViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing Caliburn.Micro;\r\nusing Coding4Fun.Toolkit.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.Views;\r\nusing TelegramClient.Views.Chats;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Chats\r\n{\r\n    public class TLStickerSetNotFound : TLStickerSetBase\r\n    {\r\n        \r\n    }\r\n\r\n    public class GroupStickersViewModel : ItemsViewModelBase<TLStickerSetBase>\r\n    {\r\n        private string _text;\r\n\r\n        public string Text\r\n        {\r\n            get { return _text; }\r\n            set { SetField(ref _text, value, () => Text); }\r\n        }\r\n\r\n        private TLStickerSetBase _stickerSet;\r\n\r\n        public TLStickerSetBase StickerSet\r\n        {\r\n            get { return _stickerSet; }\r\n            set { SetField(ref _stickerSet, value, () => StickerSet); }\r\n        }\r\n\r\n        private TLChatBase _channel;\r\n\r\n        private readonly Dictionary<string, TLVector<TLStickerItem>> _stickerSets = new Dictionary<string, TLVector<TLStickerItem>>();\r\n\r\n        private readonly Dictionary<long, string> _emoticons = new Dictionary<long, string>();\r\n\r\n        private TLAllStickers _allStickers;\r\n\r\n        public GroupStickersViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _channel = StateService.CurrentChat;\r\n            var channel68 = _channel as TLChannel68;\r\n            if (channel68 != null)\r\n            {\r\n                _stickerSet = channel68.StickerSet;\r\n                _text = _stickerSet != null && !TLString.IsNullOrEmpty(_stickerSet.ShortName)\r\n                    ? _stickerSet.ShortName.ToString()\r\n                    : null;\r\n\r\n                var stickerSet32 = StickerSet as TLStickerSet32;\r\n                if (stickerSet32 != null && stickerSet32.Stickers == null)\r\n                {\r\n                    MTProtoService.GetStickerSetAsync(new TLInputStickerSetShortName{ ShortName = stickerSet32.ShortName},\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            var objects = new TLVector<TLObject>();\r\n                            foreach (var sticker in result.Documents)\r\n                            {\r\n                                objects.Add(new TLStickerItem { Document = sticker });\r\n                            }\r\n\r\n                            stickerSet32.Stickers = objects;\r\n                            stickerSet32.NotifyOfPropertyChange(() => stickerSet32.Stickers);\r\n                        }),\r\n                        error =>\r\n                        {\r\n                            \r\n                        });\r\n                }\r\n            }\r\n            StateService.CurrentChat = null;\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Text))\r\n                {\r\n                    if (string.IsNullOrEmpty(Text))\r\n                    {\r\n                        Remove(false);\r\n                    }\r\n                    else if (StickerSet is TLStickerSet32 && string.Equals(StickerSet.ShortName.ToString(), Text))\r\n                    {\r\n                        \r\n                    }\r\n                    else if (Text.Contains(\"/addstickers\"))\r\n                    {\r\n                        var shortNameStartIndex = Text.TrimEnd('/').LastIndexOf(\"/\", StringComparison.OrdinalIgnoreCase);\r\n                        if (shortNameStartIndex != -1)\r\n                        {\r\n                            var shortName = Text.Substring(shortNameStartIndex).Replace(\"/\", string.Empty);\r\n\r\n                            if (!string.IsNullOrEmpty(shortName))\r\n                            {\r\n                                Text = shortName;\r\n                                var view = GetView() as GroupStickersView;\r\n                                if (view != null)\r\n                                {\r\n                                    view.MoveCursorToEnd();\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        var text = Text;\r\n                        Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>\r\n                        {\r\n                            if (string.Equals(text, Text))\r\n                            {\r\n                                SearchStickerSet(text);\r\n                            }\r\n                        });\r\n                    }\r\n                }\r\n            };\r\n        }\r\n\r\n        public void Open()\r\n        {\r\n            var stickerSet = StickerSet as TLStickerSet32;\r\n            if (stickerSet == null) return;\r\n\r\n            TelegramViewBase.NavigateToStickers(MTProtoService, StateService, new TLInputStickerSetShortName{ ShortName = stickerSet.ShortName },\r\n                () =>\r\n                {\r\n                    Items.Insert(0, stickerSet);\r\n                },\r\n                () =>\r\n                {\r\n                    for (var index = 0; index < Items.Count; index++)\r\n                    {\r\n                        var item = Items[index];\r\n                        if (TLString.Equals(stickerSet.ShortName, item.ShortName, StringComparison.Ordinal))\r\n                        {\r\n                            Items.RemoveAt(index);\r\n                            break;\r\n                        }\r\n                    }\r\n                });\r\n        }\r\n\r\n        private void SearchStickerSet(string text)\r\n        {\r\n            IsWorking = true;\r\n            MTProtoService.GetStickerSetAsync(new TLInputStickerSetShortName{ ShortName = new TLString(text)},\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in result.Documents)\r\n                    {\r\n                        objects.Add(new TLStickerItem { Document = sticker });\r\n                    }\r\n\r\n                    result.Set.Stickers = objects;\r\n\r\n                    Set(result.Set, false);\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Set(new TLStickerSetNotFound(), false);\r\n                }));\r\n        }\r\n\r\n        public void Set(TLStickerSetBase set)\r\n        {\r\n            Set(set, true);\r\n        }\r\n\r\n        private void Set(TLStickerSetBase set, bool updateText)\r\n        {\r\n            StickerSet = set;\r\n            set.IsSelected = true;\r\n            set.NotifyOfPropertyChange(() => set.IsSelected);\r\n            foreach (var item in Items)\r\n            {\r\n                if (TLString.Equals(StickerSet.ShortName, item.ShortName, StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    item.IsSelected = true;\r\n                    item.NotifyOfPropertyChange(() => item.IsSelected);\r\n                }\r\n                else\r\n                {\r\n                    item.IsSelected = false;\r\n                    item.NotifyOfPropertyChange(() => item.IsSelected);\r\n                }\r\n            }\r\n            if (updateText) Text = set.ShortName.ToString();\r\n        }\r\n\r\n        public void Remove()\r\n        {\r\n            Remove(true);\r\n        }\r\n\r\n        private void Remove(bool clearText)\r\n        {\r\n            StickerSet = null;\r\n            foreach (var item in Items)\r\n            {\r\n                if (StickerSet != item)\r\n                {\r\n                    item.IsSelected = false;\r\n                    item.NotifyOfPropertyChange(() => item.IsSelected);\r\n                }\r\n            }\r\n            if (clearText) Text = string.Empty;\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            var channel68 = _channel as TLChannel68;\r\n            if (channel68 != null)\r\n            {\r\n                if (channel68.StickerSet != StickerSet)\r\n                {\r\n                    TLInputStickerSetBase inputStickerSet;\r\n                    if (!(StickerSet is TLStickerSet32))\r\n                    {\r\n                        inputStickerSet = new TLInputStickerSetEmpty();\r\n                    }\r\n                    else\r\n                    {\r\n                        inputStickerSet = new TLInputStickerSetShortName{ ShortName = StickerSet.ShortName };\r\n                    }\r\n                    IsWorking = true;\r\n                    MTProtoService.SetStickersAsync(channel68.ToInputChannel(), inputStickerSet,\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            channel68.StickerSet = StickerSet;\r\n                            channel68.NotifyOfPropertyChange(() => channel68.StickerSet);\r\n                            NavigationService.GoBack();\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                        }));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            StateService.GetAllStickersAsync(cachedAllStickers => BeginOnUIThread(() =>\r\n            {\r\n                _allStickers = cachedAllStickers;\r\n\r\n                var allStickers = _allStickers as TLAllStickers43;\r\n                if (allStickers != null)\r\n                {\r\n                    UpdateSets(allStickers, () => UpdateAllStickersAsync(allStickers));\r\n                    Status = string.Empty;\r\n                }\r\n                else\r\n                {\r\n                    UpdateAllStickersAsync(null);\r\n                }\r\n            }));\r\n        }\r\n\r\n        private void UpdateAllStickersAsync(TLAllStickers cachedStickers)\r\n        {\r\n            var hash = cachedStickers != null ? cachedStickers.Hash : TLString.Empty;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetAllStickersAsync(hash,\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(result.ToString());\r\n\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n\r\n                    var allStickers = result as TLAllStickers43;\r\n                    if (allStickers != null)\r\n                    {\r\n                        Items.Clear();\r\n\r\n                        var cachedStickers29 = cachedStickers as TLAllStickers29;\r\n                        if (cachedStickers29 != null)\r\n                        {\r\n                            allStickers.ShowStickersTab = cachedStickers29.ShowStickersTab;\r\n                            allStickers.RecentlyUsed = cachedStickers29.RecentlyUsed;\r\n                            allStickers.Date = TLUtils.DateToUniversalTimeTLInt(0, DateTime.Now);\r\n                        }\r\n                        var cachedStickers43 = cachedStickers as TLAllStickers43;\r\n                        if (cachedStickers43 != null)\r\n                        {\r\n                            allStickers.RecentStickers = cachedStickers43.RecentStickers;\r\n                            allStickers.FavedStickers = cachedStickers43.FavedStickers;\r\n                        }\r\n\r\n                        cachedStickers = allStickers;\r\n                        StateService.SaveAllStickersAsync(cachedStickers);\r\n\r\n                        UpdateSets(allStickers, () => { });\r\n                    }\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    Status = string.Empty;\r\n                    IsWorking = false;\r\n                    Execute.ShowDebugMessage(\"messages.getAllStickers error \" + error);\r\n                }));\r\n        }\r\n        private void UpdateSets(TLAllStickers29 allStickers, System.Action callback)\r\n        {\r\n            _allStickers = allStickers;\r\n\r\n            _emoticons.Clear();\r\n            _stickerSets.Clear();\r\n\r\n            for (var i = 0; i < allStickers.Documents.Count; i++)\r\n            {\r\n                var document22 = allStickers.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        TLVector<TLStickerItem> stickers;\r\n                        if (_stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(new TLStickerItem { Document = document22 });\r\n                        }\r\n                        else\r\n                        {\r\n                            _stickerSets[setId] = new TLVector<TLStickerItem> { new TLStickerItem { Document = document22 } };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            Items.Clear();\r\n\r\n            var firstChunkSize = 10;\r\n            var count = 0;\r\n            var delayedItems = new List<TLStickerSetBase>();\r\n            for (var i = 0; i < allStickers.Sets.Count; i++)\r\n            {\r\n                var set = allStickers.Sets[i];\r\n                var setName = set.Id.ToString();\r\n                TLVector<TLStickerItem> stickers;\r\n                if (_stickerSets.TryGetValue(setName, out stickers))\r\n                {\r\n\r\n                    var objects = new TLVector<TLObject>();\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        objects.Add(sticker);\r\n                    }\r\n\r\n                    set.IsSelected = StickerSet != null && TLString.Equals(StickerSet.ShortName, set.ShortName, StringComparison.OrdinalIgnoreCase);\r\n                    set.Stickers = objects;\r\n                    if (set.Stickers.Count > 0)\r\n                    {\r\n                        if (count < firstChunkSize)\r\n                        {\r\n                            Items.Add(set);\r\n                            count++;\r\n                        }\r\n                        else\r\n                        {\r\n                            delayedItems.Add(set);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            AddItemsChunk(25, delayedItems, callback);\r\n        }\r\n\r\n        private void AddItemsChunk(int chunkSize, List<TLStickerSetBase> delayedItems, System.Action callback)\r\n        {\r\n            BeginOnUIThread(() =>\r\n            {\r\n                for (var i = 0; i < delayedItems.Count && i < chunkSize; i++)\r\n                {\r\n                    var stickerSet = delayedItems[i] as TLStickerSet;\r\n                    if (stickerSet != null)\r\n                    {\r\n                        stickerSet.IsSelected = StickerSet != null && TLString.Equals(StickerSet.ShortName, stickerSet.ShortName, StringComparison.OrdinalIgnoreCase);\r\n                    }\r\n\r\n                    Items.Add(delayedItems[0]);\r\n                    delayedItems.RemoveAt(0);\r\n                }\r\n\r\n                if (delayedItems.Count > 0)\r\n                {\r\n                    AddItemsChunk(25, delayedItems, callback);\r\n                }\r\n                else\r\n                {\r\n                    callback.SafeInvoke();\r\n                }\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Contacts/ShareContactDetailsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.ViewModels.Contacts\r\n{\r\n    public class ShareContactDetailsViewModel : PropertyChangedBase\r\n    {\r\n        public Visibility ShareVisibility\r\n        {\r\n            get { return Mode == ShareContactDetailsMode.Share ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public string ActionString\r\n        {\r\n            get { return Mode == ShareContactDetailsMode.Share ? AppResources.ShareContact : AppResources.AddContact; }\r\n        }\r\n\r\n        public TLUserBase CurrentItem { get; set; }\r\n\r\n        public ObservableCollection<TLObject> Items { get; set; }\r\n\r\n        public ShareContactDetailsViewModel(TLUserBase contact)\r\n        {\r\n            Items = new ObservableCollection<TLObject>();\r\n            SetContact(contact);\r\n        }\r\n\r\n        public void ForwardInAnimationBegin()\r\n        {\r\n\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            \r\n        }\r\n\r\n        public Action<TLMessageMediaContact> Callback { get; set; }\r\n\r\n        public ShareContactDetailsMode Mode { get; set; }\r\n\r\n        public bool IsSharingEnabled { get { return Items.OfType<TLUserPhone>().Any(x => x.IsSelected); } }\r\n\r\n        public void Send()\r\n        {\r\n            if (CurrentItem == null) return;\r\n\r\n            var userPhone = Items.OfType<TLUserPhone>().FirstOrDefault(x => x.IsSelected);\r\n            if (userPhone == null) return;\r\n\r\n            var media = new TLMessageMediaContact82\r\n            {\r\n                UserId = CurrentItem.Id,\r\n                FirstName = CurrentItem.FirstName,\r\n                LastName = CurrentItem.LastName,\r\n                PhoneNumber = userPhone.Number,\r\n                VCard = ToVCard(CurrentItem)\r\n            };\r\n\r\n            Callback.SafeInvoke(media);\r\n        }\r\n\r\n        private TLString ToVCard(TLUserBase currentItem)\r\n        {\r\n            return TLString.Empty;\r\n        }\r\n\r\n        public void Call(TLUserPhone userPhone)\r\n        {\r\n            if (Mode != ShareContactDetailsMode.View) return;\r\n            if (userPhone == null) return;\r\n\r\n            var phoneNumber = userPhone.Number.ToString();\r\n            if (!string.IsNullOrEmpty(phoneNumber))\r\n            {\r\n                if (!phoneNumber.StartsWith(\"+\"))\r\n                {\r\n                    phoneNumber = \"+\" + phoneNumber;\r\n                }\r\n\r\n                var task = new PhoneCallTask();\r\n                task.DisplayName = CurrentItem.FullName2;\r\n                task.PhoneNumber = phoneNumber;\r\n                task.Show();\r\n            }\r\n        }\r\n\r\n        public void SetContact(TLUserBase userBase)\r\n        {\r\n            CurrentItem = userBase;\r\n            NotifyOfPropertyChange(() => CurrentItem);\r\n\r\n            Items.Clear();\r\n            var userNotRegistered = userBase as TLUserNotRegistered;\r\n            if (userNotRegistered != null)\r\n            {\r\n                if (userNotRegistered.Phones != null)\r\n                {\r\n                    foreach (var phone in userNotRegistered.Phones)\r\n                    {\r\n                        Items.Add(phone);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (Items.Count == 0)\r\n            {\r\n                Items.Add(new TLUserPhone\r\n                {\r\n                    Kind = new TLInt(1),\r\n                    Number = userBase.Phone,\r\n                    Description = TLString.Empty\r\n                }); \r\n            }\r\n\r\n\r\n            for (var index = 0; index < Items.Count; index++)\r\n            {\r\n                var userPhone = Items[index] as TLUserPhone;\r\n                if (userPhone != null)\r\n                {\r\n                    userPhone.IsSelected = index == 0;\r\n                    userPhone.IsIconVisible = index == 0;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Dialogs/DialogDetailsViewModel.Mentions.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.TL.Interfaces;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public partial class DialogDetailsViewModel\r\n    {\r\n        private int _mentionsCounter;\r\n\r\n        public int MentionsCounter\r\n        {\r\n            get { return _mentionsCounter; }\r\n            set { SetField(ref _mentionsCounter, value, () => MentionsCounter); }\r\n        }\r\n\r\n        private TLMessageBase _currentMention;\r\n\r\n        private void GetUnreadMentionsAsync()\r\n        {\r\n            var dialog = CurrentDialog as TLDialog71;\r\n            if (dialog == null) return;\r\n            if (dialog.UnreadMentionsCount.Value <= 0) return;\r\n\r\n            var peer = With as IInputPeer;\r\n            if (peer != null)\r\n            {\r\n                MTProtoService.GetUnreadMentionsAsync(\r\n                    peer.ToInputPeer(), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(0), \r\n                    new TLInt(0),\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        dialog.UnreadMentionsCount = new TLInt(result.Messages.Count);\r\n                        dialog.UnreadMentions = result.Messages;\r\n                        MentionsCounter = dialog.UnreadMentionsCount.Value;\r\n\r\n                        if (MentionsCounter == 0)\r\n                        {\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                View.HideMentionButton();\r\n                            });\r\n                        }\r\n                    }),\r\n                    error =>\r\n                    {\r\n                        Execute.ShowDebugMessage(\"messages.getUnreadMentions error \" + error);\r\n                    });\r\n            }\r\n        }\r\n\r\n        public void ClearUnreadMentions()\r\n        {\r\n            var dialog = CurrentDialog as TLDialog71;\r\n            if (dialog == null) return;\r\n            if (dialog.UnreadMentions == null || dialog.UnreadMentions.Count == 0)\r\n            {\r\n                dialog.UnreadMentionsCount = new TLInt(0);\r\n                dialog.NotifyOfPropertyChange(() => dialog.UnreadMentionsCount);\r\n\r\n                return;\r\n            }\r\n\r\n            var confirmation = MessageBox.Show(AppResources.ClearUnreadMentionsConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            MentionsCounter = 0;\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                View.HideMentionButton();\r\n            });\r\n\r\n            var channel = dialog.With as TLChannel68;\r\n            if (channel != null)\r\n            {\r\n                MTProtoService.ReadMessageContentsAsync(channel.ToInputChannel(), new TLVector<TLInt>(dialog.UnreadMentions.Select(x => x.Id).ToList()),\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        dialog.UnreadMentionsCount = new TLInt(0);\r\n                        dialog.NotifyOfPropertyChange(() => dialog.UnreadMentionsCount);\r\n\r\n                        var mentionsCache = dialog.UnreadMentions.ToDictionary(x => x.Index);\r\n                        dialog.UnreadMentions.Clear();\r\n\r\n                        foreach (var item in Items)\r\n                        {\r\n                            if (mentionsCache.ContainsKey(item.Index))\r\n                            {\r\n                                var message = item as TLMessage25;\r\n                                if (message != null && message.IsVoice())\r\n                                {\r\n                                    message.SetListened();\r\n                                    message.Media.NotListened = false;\r\n                                    message.Media.NotifyOfPropertyChange(() => message.Media.NotListened);\r\n                                }\r\n                            }\r\n                        }\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                MTProtoService.ReadMessageContentsAsync(new TLVector<TLInt>(dialog.UnreadMentions.Select(x => x.Id).ToList()),\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        dialog.UnreadMentionsCount = new TLInt(0);\r\n                        dialog.NotifyOfPropertyChange(() => dialog.UnreadMentionsCount);\r\n                        var mentionsCache = dialog.UnreadMentions.ToDictionary(x => x.Index);\r\n                        dialog.UnreadMentions.Clear();\r\n\r\n                        foreach (var item in Items)\r\n                        {\r\n                            if (mentionsCache.ContainsKey(item.Index))\r\n                            {\r\n                                var message = item as TLMessage25;\r\n                                if (message != null && message.IsVoice())\r\n                                {\r\n                                    message.SetListened();\r\n                                    message.Media.NotListened = false;\r\n                                    message.Media.NotifyOfPropertyChange(() => message.Media.NotListened);\r\n                                }\r\n                            }\r\n                        }\r\n                    }));\r\n            }\r\n        }\r\n\r\n        public void ReadMentions(int maxId)\r\n        {\r\n            if (maxId <= 0) return;\r\n\r\n            var dialog = CurrentDialog as TLDialog71;\r\n            if (dialog == null) return;\r\n            if (dialog.UnreadMentions == null) return;\r\n            if (dialog.UnreadMentions.Count == 0) return;\r\n\r\n            var mentions = new List<TLMessageBase>();\r\n            for (int i = dialog.UnreadMentions.Count - 1; i >= 0; i--)\r\n            {\r\n                var message = dialog.UnreadMentions[i] as TLMessage;\r\n                if (message != null && message.IsVoice()) continue;\r\n\r\n\r\n                if (dialog.UnreadMentions[i].Index <= maxId)\r\n                {\r\n                    mentions.Add(dialog.UnreadMentions[i]);\r\n                }\r\n                else\r\n                {\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (mentions.Count > 0)\r\n            {\r\n                MentionsCounter = Math.Max(0, MentionsCounter - mentions.Count);\r\n\r\n                if (MentionsCounter == 0)\r\n                {\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        View.HideMentionButton();\r\n                    });\r\n                }\r\n\r\n                var channel = dialog.With as TLChannel68;\r\n                if (channel != null)\r\n                {\r\n                    MTProtoService.ReadMessageContentsAsync(channel.ToInputChannel(), new TLVector<TLInt>(mentions.Select(x => x.Id).ToList()),\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            dialog.UnreadMentionsCount = new TLInt(Math.Max(0, dialog.UnreadMentions.Count - mentions.Count));\r\n                            dialog.NotifyOfPropertyChange(() => dialog.UnreadMentionsCount);\r\n                            foreach (var mention in mentions)\r\n                            {\r\n                                dialog.UnreadMentions.Remove(mention);\r\n                            }\r\n                        }));\r\n                }\r\n                else\r\n                {\r\n                    MTProtoService.ReadMessageContentsAsync(new TLVector<TLInt>(mentions.Select(x => x.Id).ToList()),\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            dialog.UnreadMentionsCount = new TLInt(Math.Max(0, dialog.UnreadMentions.Count - mentions.Count));\r\n                            dialog.NotifyOfPropertyChange(() => dialog.UnreadMentionsCount);\r\n                            foreach (var mention in mentions)\r\n                            {\r\n                                dialog.UnreadMentions.Remove(mention);\r\n                            }\r\n                        }));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ReadNextMention()\r\n        {\r\n            var dialog = CurrentDialog as TLDialog71;\r\n            if (dialog == null) return;\r\n            if (dialog.UnreadMentions == null) return;\r\n            if (dialog.UnreadMentions.Count == 0) return;\r\n\r\n            _currentMention = GetNextMention(_currentMention, dialog.UnreadMentions);\r\n            if (_currentMention == null) return;\r\n\r\n            var message = _currentMention as TLMessage;\r\n            if (message != null && message.IsVoice())\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    OpenMessage(null, _currentMention.Id);\r\n                });\r\n                return;\r\n            }\r\n\r\n            MentionsCounter = Math.Max(0, MentionsCounter - 1);\r\n\r\n            if (MentionsCounter == 0)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (_currentMention != null && _currentMention.Index == dialog.TopMessageId.Value)\r\n                    {\r\n                        View.HideScrollToBottomButton();\r\n                    }\r\n                    else\r\n                    {\r\n                        View.HideMentionButton();\r\n                    }\r\n                });\r\n            }\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                OpenMessage(null, _currentMention.Id);\r\n            });\r\n\r\n            var channel = dialog.With as TLChannel68;\r\n            if (channel != null)\r\n            {\r\n                MTProtoService.ReadMessageContentsAsync(channel.ToInputChannel(), new TLVector<TLInt>{ _currentMention.Id },\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        dialog.UnreadMentionsCount = new TLInt(Math.Max(0, dialog.UnreadMentions.Count - 1));\r\n                        dialog.NotifyOfPropertyChange(() => dialog.UnreadMentionsCount);\r\n                        dialog.UnreadMentions.Remove(_currentMention);\r\n                    }));\r\n            }\r\n            else\r\n            {\r\n                MTProtoService.ReadMessageContentsAsync(new TLVector<TLInt> { _currentMention.Id },\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        dialog.UnreadMentionsCount = new TLInt(Math.Max(0, dialog.UnreadMentions.Count - 1));\r\n                        dialog.NotifyOfPropertyChange(() => dialog.UnreadMentionsCount);\r\n                        dialog.UnreadMentions.Remove(_currentMention);\r\n                    }));\r\n            }\r\n        }\r\n\r\n        private TLMessageBase GetNextMention(TLMessageBase currentMention, TLVector<TLMessageBase> mentions)\r\n        {\r\n            if (mentions == null) return null;\r\n            if (currentMention == null) return mentions.LastOrDefault();\r\n\r\n            for (var i = mentions.Count - 1; i >= 0; i--)\r\n            {\r\n                if (mentions[i].Index == currentMention.Index)\r\n                {\r\n                    if (i >= 1)\r\n                    {\r\n                        return mentions[i - 1];\r\n                    }\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (mentions.Count > 0)\r\n            {\r\n                return mentions.LastOrDefault();\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private void ListenMention(int id)\r\n        {\r\n            var dialog71 = CurrentDialog as TLDialog71;\r\n            if (dialog71 != null && dialog71.UnreadMentions != null)\r\n            {\r\n                for (var i = 0; i < dialog71.UnreadMentions.Count; i++)\r\n                {\r\n                    if (id == dialog71.UnreadMentions[i].Index)\r\n                    {\r\n                        dialog71.UnreadMentions.RemoveAt(i);\r\n                        dialog71.UnreadMentionsCount = new TLInt(Math.Max(0, dialog71.UnreadMentions.Count - 1));\r\n                        dialog71.NotifyOfPropertyChange(() => dialog71.UnreadMentionsCount);\r\n                        MentionsCounter = dialog71.UnreadMentionsCount.Value;\r\n                        \r\n                        if (MentionsCounter == 0)\r\n                        {\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                View.HideMentionButton();\r\n                            });\r\n                        }\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Dialogs/EmojiHintsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.ObjectModel;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient_Native;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class EmojiHintsViewModel\r\n    {\r\n        public ObservableCollection<EmojiSuggestion> Hints { get; protected set; }\r\n\r\n        public EmojiSuggestionParams Parameters { get; protected set; }\r\n\r\n        public EmojiHintsViewModel()\r\n        {\r\n            Hints = new ObservableCollection<EmojiSuggestion>();\r\n        }\r\n\r\n        public void SetParameters(EmojiSuggestionParams parameters)\r\n        {\r\n            Parameters = parameters;\r\n\r\n            Hints.Clear();\r\n            if (Parameters != null\r\n                && Parameters.Results != null)\r\n            {\r\n                int maxCount = 5;\r\n                for (int index = 0; index < parameters.Results.Length && index < maxCount; index++)\r\n                {\r\n                    var result = parameters.Results[index];\r\n                    Hints.Add(result);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Dialogs/LiveLocationBadgeViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Globalization;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.Location;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Utils;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class LiveLocationBadgeViewModel : PropertyChangedBase\r\n    {\r\n        public TLMessage Message { get; set; }\r\n\r\n        public IList<TLMessageBase> Messages { get; set; }\r\n\r\n        public string Subtitle\r\n        {\r\n            get\r\n            {\r\n                if (IsChatListBadge)\r\n                {\r\n                    var messages = _liveLocationsService.Get();\r\n                    if (messages.Count == 1)\r\n                    {\r\n                        var peerUser = messages[0].ToId as TLPeerUser;\r\n                        if (peerUser != null)\r\n                        {\r\n                            var user = _cacheService.GetUser(peerUser.Id);\r\n                            if (user != null)\r\n                            {\r\n                                return string.Format(\" \" + AppResources.AttachLiveLocationIsSharing, user.ShortName);\r\n                            }\r\n                        }\r\n\r\n                        var peerChat = messages[0].ToId as TLPeerChat;\r\n                        if (peerChat != null)\r\n                        {\r\n                            var chat = _cacheService.GetChat(peerChat.Id);\r\n                            if (chat != null)\r\n                            {\r\n                                return string.Format(\" \" + AppResources.AttachLiveLocationIsSharing, chat.FullName);\r\n                            }\r\n                        }\r\n\r\n                        var peerChannel = messages[0].ToId as TLPeerChannel;\r\n                        if (peerChannel != null)\r\n                        {\r\n                            var chat = _cacheService.GetChat(peerChannel.Id);\r\n                            if (chat != null)\r\n                            {\r\n                                return string.Format(\" \" + AppResources.AttachLiveLocationIsSharing, chat.FullName);\r\n                            }\r\n                        }\r\n\r\n                        return string.Format(\" \" + AppResources.AttachLiveLocationIsSharing, Language.Declension(\r\n                                1,\r\n                                AppResources.ChatNominativeSingular,\r\n                                AppResources.ChatNominativePlural,\r\n                                AppResources.ChatGenitiveSingular,\r\n                                AppResources.ChatGenitivePlural).ToLower(CultureInfo.CurrentUICulture));\r\n                    }\r\n                    if (messages.Count > 1)\r\n                    {\r\n                        return string.Format(\" \" + AppResources.AttachLiveLocationIsSharing, Language.Declension(\r\n                                messages.Count,\r\n                                AppResources.ChatNominativeSingular,\r\n                                AppResources.ChatNominativePlural,\r\n                                AppResources.ChatGenitiveSingular,\r\n                                AppResources.ChatGenitivePlural).ToLower(CultureInfo.CurrentUICulture));\r\n                    }\r\n\r\n                    return string.Empty;\r\n                }\r\n                else\r\n                {\r\n                    if (Messages == null || Messages.Count == 0)\r\n                    {\r\n                        return string.Format(\" - {0}\", AppResources.You);\r\n                    }\r\n\r\n                    var usersIndex = new Dictionary<int, int>();\r\n                    var shortNames = new List<string>();\r\n                    foreach (var messageBase in Messages)\r\n                    {\r\n                        var message = messageBase as TLMessage70;\r\n                        if (message != null && !message.Out.Value)\r\n                        {\r\n                            var mediaGeoLive = message.Media as TLMessageMediaGeoLive;\r\n                            if (mediaGeoLive != null)\r\n                            {\r\n                                mediaGeoLive.Date = message.Date;\r\n                                mediaGeoLive.EditDate = message.EditDate;\r\n                                if (mediaGeoLive.Active)\r\n                                {\r\n                                    var user = message.From as TLUser;\r\n                                    if (user != null && !usersIndex.ContainsKey(user.Index))\r\n                                    {\r\n                                        usersIndex[user.Index] = user.Index;\r\n                                        shortNames.Add(user.ShortName);\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (shortNames.Count == 1)\r\n                    {\r\n                        return string.Format(\" - \" + AppResources.SharingYouAndOtherName, shortNames[0]);\r\n                    }\r\n\r\n                    if (shortNames.Count > 1)\r\n                    {\r\n                        return string.Format(\" - \" + AppResources.SharingYouAndOtherName, Language.Declension(\r\n                                shortNames.Count,\r\n                                AppResources.CompanyNominativeSingular,\r\n                                AppResources.CompanyNominativePlural,\r\n                                AppResources.CompanyGenitiveSingular,\r\n                                AppResources.CompanyGenitivePlural).ToLower(CultureInfo.CurrentUICulture));\r\n                    }\r\n\r\n                    return string.Format(\" - {0}\", AppResources.You);\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsChatListBadge { get; protected set; }\r\n\r\n        private readonly ILiveLocationService _liveLocationsService;\r\n\r\n        private readonly ICacheService _cacheService;\r\n\r\n        public LiveLocationBadgeViewModel(ILiveLocationService liveLocationsService, ICacheService cacheService, bool chatListBadge)\r\n        {\r\n            _liveLocationsService = liveLocationsService;\r\n            _cacheService = cacheService;\r\n\r\n            IsChatListBadge = chatListBadge;\r\n\r\n            Messages = new ObservableCollection<TLMessageBase>();\r\n        }\r\n\r\n        public event EventHandler Closed;\r\n\r\n        public virtual void RaiseClosed()\r\n        {\r\n            var handler = Closed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler OpenMessage;\r\n\r\n        public virtual void RaiseOpenMessage()\r\n        {\r\n            var handler = OpenMessage;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public void UpdateLiveLocations(IList<TLMessageBase> messages)\r\n        {\r\n            Messages.Clear();\r\n            foreach (var m in messages)\r\n            {\r\n                Messages.Add(m);\r\n            }\r\n            NotifyOfPropertyChange(() => Subtitle);\r\n        }\r\n\r\n        public void UpdateLiveLocation(TLMessage message)\r\n        {\r\n            var updated = false;\r\n            for (var i = 0; i < Messages.Count; i++)\r\n            {\r\n                var m = Messages[i] as TLMessage70;\r\n                if (m != null && m.Index == message.Index)\r\n                {\r\n                    Messages[i] = message;\r\n                    updated = true;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (!updated)\r\n            {\r\n                Messages.Add(message);\r\n            }\r\n\r\n            NotifyOfPropertyChange(() => Subtitle);\r\n        }\r\n\r\n        public void RemoveLiveLocations(IList<TLMessage> messages)\r\n        {\r\n            foreach (var m in messages)\r\n            {\r\n                Messages.Remove(m);\r\n            }\r\n\r\n            NotifyOfPropertyChange(() => Subtitle);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Dialogs/PlayerViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.ViewModels.Dialogs\r\n{\r\n    public class PlayerViewModel\r\n    {\r\n        public TLMessageBase Message { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Feed/FeedViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Feed\r\n{\r\n    public class FeedViewModel : ItemsViewModelBase<TLChatBase> \r\n    {\r\n        public TLVector<TLChatBase> CurrentItem { get; set; }\r\n\r\n        private string _subtitle;\r\n\r\n        public string Subtitle\r\n        {\r\n            get { return _subtitle; }\r\n            set { SetField(ref _subtitle, value, () => Subtitle); }\r\n        }\r\n\r\n        public FeedViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            CurrentItem = stateService.CurrentFeed;\r\n            stateService.CurrentFeed = null;\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            UpdateSubtitles();\r\n        }\r\n\r\n        public void ForwardInAnimationComplete()\r\n        {\r\n            var channels = CurrentItem;\r\n            if (channels != null)\r\n            {\r\n                UpdateChannels(channels, UpdateItems);\r\n            }\r\n        }\r\n\r\n        private void UpdateItems()\r\n        {\r\n            \r\n        }\r\n\r\n        private void UpdateChannels(TLVector<TLChatBase> channels, System.Action callback)\r\n        {\r\n            const int firstSliceCount = 3;\r\n            var secondSlice = new List<TLChatBase>();\r\n            for (var i = 0; i < channels.Count; i++)\r\n            {\r\n                if (i < firstSliceCount)\r\n                {\r\n                    //users[i].IsAdmin = false;\r\n                    Items.Add(channels[i]);\r\n                }\r\n                else\r\n                {\r\n                    secondSlice.Add(channels[i]);\r\n                }\r\n            }\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                foreach (var user in secondSlice)\r\n                {\r\n                    //user.IsAdmin = false;\r\n                    Items.Add(user);\r\n                }\r\n                callback.SafeInvoke();\r\n            });\r\n        }\r\n\r\n        public void ViewChannel(TLChatBase channel)\r\n        {\r\n            if (channel == null) return;\r\n\r\n            StateService.With = channel;\r\n            StateService.RemoveBackEntries = true;\r\n            NavigationService.UriFor<DialogDetailsViewModel>().Navigate();\r\n        }\r\n\r\n        public void UpdateSubtitles()\r\n        {\r\n            Subtitle = GetChatSubtitle();\r\n        }\r\n\r\n        private string GetChatSubtitle()\r\n        {\r\n            var channels = CurrentItem;\r\n            if (channels != null)\r\n            {\r\n                var channelsCount = channels.Count;\r\n\r\n                return Language.Declension(\r\n                    channelsCount,\r\n                    AppResources.ChannelNominativeSingular,\r\n                    AppResources.ChannelNominativePlural,\r\n                    AppResources.ChannelGenitiveSingular,\r\n                    AppResources.ChannelGenitivePlural).ToLower(CultureInfo.CurrentUICulture);\r\n            }\r\n\r\n            return null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Media/EditVideoViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Linq.Expressions;\r\nusing System.Runtime.InteropServices.WindowsRuntime;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing Windows.Media.MediaProperties;\r\nusing Windows.Storage;\r\nusing Windows.Storage.FileProperties;\r\nusing Windows.Storage.Streams;\r\nusing Windows.System;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Media\r\n{\r\n    public class EditVideoViewModel : ViewAware\r\n    {\r\n        protected bool SetField<T>(ref T field, T value, string propertyName)\r\n        {\r\n            if (EqualityComparer<T>.Default.Equals(field, value)) return false;\r\n            field = value;\r\n            NotifyOfPropertyChange(propertyName);\r\n            return true;\r\n        }\r\n\r\n        protected bool SetField<T>(ref T field, T value, Expression<Func<T>> selectorExpression)\r\n        {\r\n            if (EqualityComparer<T>.Default.Equals(field, value)) return false;\r\n            field = value;\r\n            NotifyOfPropertyChange(selectorExpression);\r\n            return true;\r\n        }\r\n\r\n        public TimerSpan SelectedQuality { get; set; }\r\n\r\n        public Uri QualityButtonImageSource\r\n        {\r\n            get\r\n            {\r\n                if (SelectedQuality != null)\r\n                {\r\n                    if (SelectedQuality.Seconds == 0)\r\n                    {\r\n                        return new Uri(\"/Images/W10M/ic_quality_auto_2x.png\", UriKind.Relative);\r\n                    }\r\n                    if (SelectedQuality.Seconds <= 240)\r\n                    {\r\n                        return new Uri(\"/Images/W10M/ic_quality240_2x.png\", UriKind.Relative);\r\n                    }\r\n                    if (SelectedQuality.Seconds <= 360)\r\n                    {\r\n                        return new Uri(\"/Images/W10M/ic_quality360_2x.png\", UriKind.Relative);\r\n                    }\r\n                    if (SelectedQuality.Seconds <= 480)\r\n                    {\r\n                        return new Uri(\"/Images/W10M/ic_quality480_2x.png\", UriKind.Relative);\r\n                    }\r\n                    if (SelectedQuality.Seconds <= 720)\r\n                    {\r\n                        return new Uri(\"/Images/W10M/ic_quality720_2x.png\", UriKind.Relative);\r\n                    }\r\n                    if (SelectedQuality.Seconds <= 1080)\r\n                    {\r\n                        return new Uri(\"/Images/W10M/ic_quality1080_2x.png\", UriKind.Relative);\r\n                    }\r\n                }\r\n\r\n                return new Uri(\"/Images/W10M/ic_quality_auto_2x.png\", UriKind.Relative);\r\n            }\r\n        }\r\n\r\n        public List<TimerSpan> QualityList { get; set; }\r\n\r\n        private string _caption;\r\n\r\n        public string Caption\r\n        {\r\n            get { return _caption; }\r\n            set { SetField(ref _caption, value, () => Caption); }\r\n        }\r\n\r\n        public Visibility TimerButtonVisibility\r\n        {\r\n            get { return _with is TLUser ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public TimerSpan TimerSpan { get; set; }\r\n\r\n        private TimeSpan? _trimLeft;\r\n\r\n        public TimeSpan? TrimLeft\r\n        {\r\n            get { return _trimLeft; }\r\n            set { SetField(ref _trimLeft, value, () => TrimLeft); }\r\n        }\r\n\r\n        private TimeSpan? _trimRight;\r\n\r\n        public TimeSpan? TrimRight\r\n        {\r\n            get { return _trimRight; }\r\n            set { SetField(ref _trimRight, value, () => TrimRight); }\r\n        }\r\n\r\n        private bool _compression = false;\r\n\r\n        public bool Compression\r\n        {\r\n            get { return _compression; }\r\n            set { SetField(ref _compression, value, () => Compression); }\r\n        }\r\n\r\n        private bool _mute = true;\r\n\r\n        public bool Mute\r\n        {\r\n            get { return _mute; }\r\n            set { SetField(ref _mute, value, () => Mute); }\r\n        }\r\n\r\n        public Visibility TimerVisibility { get; set; }\r\n\r\n        public ulong Size { get; set; }\r\n\r\n        public ulong EditedSize { get; set; }\r\n\r\n        public double Width { get; set; }\r\n\r\n        public double Height { get; set; }\r\n\r\n        public VideoOrientation Orientation { get; set; }\r\n\r\n        public TimeSpan Duration { get; set; }\r\n\r\n        public string DurationString { get; set; }\r\n\r\n        public StorageFile VideoFile { get; set; }\r\n\r\n        public TLPhotoSizeBase ThumbPhoto { get; set; }\r\n\r\n        private TLPhotoSizeBase _previewPhoto;\r\n\r\n        public TLPhotoSizeBase PreviewPhoto\r\n        {\r\n            get { return _previewPhoto; }\r\n            set { _previewPhoto = value; }\r\n        }\r\n\r\n        public string OriginalVideoParameters { get; protected set; }\r\n\r\n        public string EditedVideoParameters { get; protected set; }\r\n\r\n        private bool _isMuteEnabled;\r\n\r\n        public bool IsMuteEnabled\r\n        {\r\n            get { return _isMuteEnabled; }\r\n            set { SetField(ref _isMuteEnabled, value, () => IsMuteEnabled); }\r\n        }\r\n\r\n        private bool _isOpen;\r\n\r\n        public bool IsOpen\r\n        {\r\n            get { return _isOpen; }\r\n            set { SetField(ref _isOpen, value, () => IsOpen); }\r\n        }\r\n\r\n        private Tuple<BasicProperties, VideoProperties, MusicProperties> _properties;\r\n\r\n        public readonly Action<CompressingVideoFile> _sendVideoAction;\r\n\r\n        private readonly Func<string, IList<TLUserBase>> _getUsernameHints;\r\n\r\n        public readonly TLObject _with;\r\n\r\n        public EditVideoViewModel(Action<CompressingVideoFile> sendVideoAction, Func<string, IList<TLUserBase>> getUsernameHints, TLObject with)\r\n        {\r\n            _with = with;\r\n            _getUsernameHints = getUsernameHints;\r\n            _sendVideoAction = sendVideoAction;\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => SelectedQuality))\r\n                {\r\n                    UpdateEditedVideoParameters();\r\n\r\n                    NotifyOfPropertyChange(() => EditedVideoParameters);\r\n                }\r\n                else if (Property.NameEquals(args.PropertyName, () => IsMuteEnabled))\r\n                {\r\n                    UpdateEditedVideoParameters();\r\n\r\n                    NotifyOfPropertyChange(() => EditedVideoParameters);\r\n                }\r\n                else if (Property.NameEquals(args.PropertyName, () => Caption))\r\n                {\r\n                    LoadMentionHints(Caption);\r\n                }\r\n            };\r\n        }\r\n\r\n        #region Mentions\r\n\r\n        private IList<TLUserBase> _mentions;\r\n\r\n        public void ContinueLoadMentionHints()\r\n        {\r\n            if (!string.IsNullOrEmpty(Caption))\r\n            {\r\n                var cachedResult = _getUsernameHints.Invoke(Caption);\r\n                if (cachedResult.Count > MaxResults)\r\n                {\r\n                    CreateUsernameHints();\r\n\r\n                    if (UsernameHints.Hints.Count == MaxResults)\r\n                    {\r\n                        var lastItem = UsernameHints.Hints.LastOrDefault();\r\n                        if (lastItem != null)\r\n                        {\r\n                            var lastIndex = cachedResult.IndexOf(lastItem);\r\n                            if (lastIndex >= 0)\r\n                            {\r\n                                for (var i = lastIndex + 1; i < cachedResult.Count; i++)\r\n                                {\r\n                                    UsernameHints.Hints.Add(cachedResult[i]);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void LoadMentionHints(string text)\r\n        {\r\n            if (_getUsernameHints != null)\r\n            {\r\n                var cachedResult = _getUsernameHints.Invoke(text);\r\n                if (cachedResult.Count > 0)\r\n                {\r\n                    CreateUsernameHints();\r\n\r\n                    ClearUsernameHints();\r\n                    for (var i = 0; i < cachedResult.Count; i++)\r\n                    {\r\n                        if (UsernameHints.Hints.Count == MaxResults) break;\r\n\r\n                        UsernameHints.Hints.Add(cachedResult[i]);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    ClearUsernameHints();\r\n                }\r\n            }\r\n        }\r\n\r\n        public void AddMention(TLUserBase userBase)\r\n        {\r\n            _mentions = _mentions ?? new List<TLUserBase>();\r\n            _mentions.Add(userBase);\r\n        }\r\n\r\n        private const int MaxResults = 10;\r\n\r\n        public UsernameHintsViewModel UsernameHints { get; protected set; }\r\n\r\n        private void CreateUsernameHints()\r\n        {\r\n            if (UsernameHints == null)\r\n            {\r\n                UsernameHints = new UsernameHintsViewModel();\r\n                NotifyOfPropertyChange(() => UsernameHints);\r\n            }\r\n        }\r\n\r\n        private void ClearUsernameHints()\r\n        {\r\n            if (UsernameHints != null)\r\n            {\r\n                UsernameHints.Hints.Clear();\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        public void SetVideoFile(StorageFile file)\r\n        {\r\n            _mentions = null;\r\n            _encodingProfile = null;\r\n            VideoFile = file;\r\n            NotifyOfPropertyChange(() => VideoFile);\r\n            PreviewPhoto = null;\r\n            NotifyOfPropertyChange(() => PreviewPhoto);\r\n            Caption = string.Empty;\r\n            Compression = false;\r\n            Mute = true;\r\n            IsMuteEnabled = false;\r\n            SelectedQuality = null;\r\n            QualityList = null;\r\n            TimerSpan = null;\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _properties = GetProperties(VideoFile).Result;\r\n\r\n                var properties = _properties.Item1;\r\n                var videoProperties = _properties.Item2;\r\n\r\n                Size = properties.Size;\r\n                Duration = videoProperties.Duration;\r\n                Orientation = videoProperties.Orientation;\r\n                Width = Orientation == VideoOrientation.Normal || Orientation == VideoOrientation.Rotate180 ? videoProperties.Width : videoProperties.Height;\r\n                Height = Orientation == VideoOrientation.Normal || Orientation == VideoOrientation.Rotate180 ? videoProperties.Height : videoProperties.Width;\r\n\r\n                DurationString = GetDurationString(Duration);\r\n                var originalSizeString = FileSizeConverter.Convert((long)properties.Size);\r\n\r\n                OriginalVideoParameters = string.Format(\"{0}x{1}, {2}, {3}\", Width, Height, DurationString, originalSizeString);\r\n\r\n                var minLength = Math.Min(Width, Height);\r\n                SelectedQuality = GetSelectedQuality(minLength);\r\n                QualityList = GetQualityList(minLength);\r\n\r\n                UpdateEditedVideoParameters();\r\n\r\n                var tuple = GetFilePreviewAndThumbAsync(VideoFile).Result;\r\n                PreviewPhoto = tuple.Item1;\r\n                ThumbPhoto = tuple.Item2;\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    NotifyOfPropertyChange(() => SelectedQuality);\r\n                    NotifyOfPropertyChange(() => QualityButtonImageSource);\r\n                    NotifyOfPropertyChange(() => DurationString);\r\n                    NotifyOfPropertyChange(() => OriginalVideoParameters);\r\n                    if (QualityList.Count > 1)\r\n                    {\r\n                        Compression = true;\r\n                    }\r\n\r\n                    NotifyOfPropertyChange(() => EditedVideoParameters);\r\n                    NotifyOfPropertyChange(() => PreviewPhoto);\r\n\r\n                    var musicProperties = _properties.Item3;\r\n                    if (musicProperties == null || musicProperties.Bitrate == 0)\r\n                    {\r\n                        IsMuteEnabled = true;\r\n                        Mute = false;\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n        private TimerSpan GetSelectedQuality(double minLength)\r\n        {\r\n            if (minLength > 360)\r\n            {\r\n                return new TimerSpan(string.Empty, \"360\", 360);\r\n            }\r\n\r\n            return new TimerSpan(string.Empty, AppResources.Auto, 0);\r\n        }\r\n\r\n        private List<TimerSpan> GetQualityList(double minLength)\r\n        {\r\n            var list = new List<TimerSpan> { new TimerSpan(string.Empty, AppResources.Auto, 0) };\r\n            if (minLength > 240)\r\n            {\r\n                list.Add(new TimerSpan(string.Empty, \"240\", 240));\r\n            }\r\n            if (minLength > 360)\r\n            {\r\n                list.Add(new TimerSpan(string.Empty, \"360\", 360));\r\n            }\r\n            //if (minLength > 480)\r\n            //{\r\n            //    list.Add(new TimerSpan(string.Empty, \"480\", 480));\r\n            //}\r\n            if (minLength > 720)\r\n            {\r\n                list.Add(new TimerSpan(string.Empty, \"720\", 720));\r\n            }\r\n            if (minLength > 1080)\r\n            {\r\n                list.Add(new TimerSpan(string.Empty, \"1080\", 1080));\r\n            }\r\n\r\n            return list;\r\n        }\r\n\r\n        private async Task<Tuple<BasicProperties, VideoProperties, MusicProperties>> GetProperties(StorageFile videoFile)\r\n        {\r\n            var properties = await videoFile.GetBasicPropertiesAsync();\r\n            var videoProperties = await videoFile.Properties.GetVideoPropertiesAsync();\r\n            var musicProperties = await videoFile.Properties.GetMusicPropertiesAsync();\r\n\r\n            return new Tuple<BasicProperties, VideoProperties, MusicProperties>(properties, videoProperties, musicProperties);\r\n        }\r\n\r\n        public void UpdateEditedVideoDuration()\r\n        {\r\n            var duration = GetEditedDuration(TrimLeft, TrimRight, Duration);\r\n            if (IsMuteEnabled)    // gif\r\n            {\r\n                EditedSize = (ulong)(_editedBitrate * duration.TotalSeconds) / 8;\r\n            }\r\n            else if (SelectedQuality != null && SelectedQuality.Seconds > 0)    // compressed quality\r\n            {\r\n                EditedSize = (ulong)(_editedBitrate * duration.TotalSeconds) / 8;\r\n            }\r\n            else    // default quality\r\n            {\r\n                EditedSize = (ulong)(Size / Duration.TotalSeconds * duration.TotalSeconds);\r\n            }\r\n\r\n            var editedSizeString = FileSizeConverter.Convert((long)EditedSize);\r\n\r\n            EditedVideoParameters = string.Format(\"{0}x{1}, {2}, ~{3}\", _editedWidth, _editedHeight, GetDurationString(duration), editedSizeString);\r\n            NotifyOfPropertyChange(() => EditedVideoParameters);\r\n        }\r\n\r\n        private void UpdateEditedVideoParameters()\r\n        {\r\n            var minLength = Math.Min(Width, Height);\r\n            var scaleFactor = SelectedQuality != null && SelectedQuality.Seconds != 0 ? SelectedQuality.Seconds / minLength : 1.0;\r\n            var duration = GetEditedDuration(TrimLeft, TrimRight, Duration);\r\n            _editedBitrate = SetEditedBitrate();\r\n\r\n            if (IsMuteEnabled)    // gif\r\n            {\r\n                EditedSize = (ulong)(_editedBitrate * duration.TotalSeconds) / 8;\r\n            }\r\n            else if (SelectedQuality != null && SelectedQuality.Seconds > 0)    // compressed quality\r\n            {\r\n                EditedSize = (ulong)(_editedBitrate * duration.TotalSeconds) / 8;\r\n            }\r\n            else    // default quality\r\n            {\r\n                EditedSize = (ulong)(Size / Duration.TotalSeconds * duration.TotalSeconds);\r\n            }\r\n\r\n            var editedSizeString = FileSizeConverter.Convert((long)EditedSize);\r\n            _editedHeight = (uint)(Height * scaleFactor);\r\n            _editedWidth = (uint)(Width * scaleFactor);\r\n            if (_encodingProfile != null)\r\n            {\r\n                _encodingProfile.Video.Height = _properties.Item2.Orientation == VideoOrientation.Normal || _properties.Item2.Orientation == VideoOrientation.Rotate180? _editedHeight : _editedWidth;\r\n                _encodingProfile.Video.Width = _properties.Item2.Orientation == VideoOrientation.Normal || _properties.Item2.Orientation == VideoOrientation.Rotate180 ? _editedWidth : _editedHeight;\r\n            }\r\n\r\n            EditedVideoParameters = string.Format(\"{0}x{1}, {2}, ~{3}\", _editedWidth, _editedHeight, GetDurationString(duration), editedSizeString);\r\n        }\r\n\r\n        private MediaEncodingProfile _encodingProfile;\r\n        private ulong _editedBitrate;\r\n        private uint _editedHeight;\r\n        private uint _editedWidth;\r\n\r\n        private ulong SetEditedBitrate()\r\n        {\r\n            ulong bitrate = 0;\r\n            if (IsMuteEnabled)\r\n            {\r\n                int targetVideoBitrate = 900000;\r\n                _encodingProfile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Vga);\r\n                var minLength = Math.Min(Width, Height);\r\n                var scaleFactor = SelectedQuality != null && SelectedQuality.Seconds != 0 ? SelectedQuality.Seconds / minLength : 1.0;\r\n                var originalVideoBitrate = _properties != null && _properties.Item2 != null\r\n                    ? _properties.Item2.Bitrate\r\n                    : uint.MaxValue;\r\n                _encodingProfile.Video.Bitrate = (uint)Math.Min(targetVideoBitrate, (int)(originalVideoBitrate * scaleFactor));\r\n                _encodingProfile.Audio = null;\r\n                bitrate += _encodingProfile.Video.Bitrate;\r\n            }\r\n            else if (SelectedQuality != null && SelectedQuality.Seconds > 0)\r\n            {\r\n                int targetVideoBitrate = 0;\r\n                int targetAudioBitrate = 90000;\r\n                switch (SelectedQuality.Seconds)\r\n                {\r\n                    case 240:\r\n                        _encodingProfile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Qvga);\r\n                        targetVideoBitrate = 400000;\r\n                        break;\r\n                    case 360:\r\n                        _encodingProfile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Vga);\r\n                        targetVideoBitrate = 900000;\r\n                        break;\r\n                    case 480:\r\n                        _encodingProfile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Vga);\r\n                        targetVideoBitrate = 900000;\r\n                        break;\r\n                    case 720:\r\n                        _encodingProfile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.HD720p);\r\n                        targetVideoBitrate = 1100000;\r\n                        break;\r\n                    default:\r\n                        _encodingProfile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.HD1080p);\r\n                        targetVideoBitrate = 1600000;\r\n                        break;\r\n                }\r\n\r\n                var minLength = Math.Min(Width, Height);\r\n                var scaleFactor = SelectedQuality != null && SelectedQuality.Seconds != 0 ? SelectedQuality.Seconds / minLength : 1.0;\r\n                var originalVideoBitrate = _properties != null && _properties.Item2 != null\r\n                    ? _properties.Item2.Bitrate\r\n                    : uint.MaxValue;\r\n                _encodingProfile.Video.Bitrate = (uint)Math.Min(targetVideoBitrate, (int)(originalVideoBitrate * scaleFactor));\r\n                bitrate += _encodingProfile.Video.Bitrate;\r\n                if (!IsMuteEnabled)\r\n                {\r\n                    var originalAudioBitrate = _properties != null && _properties.Item3 != null\r\n                    ? _properties.Item3.Bitrate\r\n                    : uint.MaxValue;\r\n                    _encodingProfile.Audio.ChannelCount = 1;\r\n                    _encodingProfile.Audio.Bitrate = (uint)Math.Min(targetAudioBitrate, originalAudioBitrate);\r\n                    bitrate += _encodingProfile.Audio.Bitrate;\r\n                }\r\n                else\r\n                {\r\n                    _encodingProfile.Audio = null;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                _encodingProfile = null;\r\n                if (_properties != null && _properties.Item2 != null)\r\n                {\r\n                    bitrate += _properties.Item2.Bitrate;\r\n                }\r\n                if (_properties != null && _properties.Item3 != null && !IsMuteEnabled)\r\n                {\r\n                    bitrate += _properties.Item3.Bitrate;\r\n                }\r\n            }\r\n\r\n            return bitrate;\r\n        }\r\n\r\n\r\n\r\n        public void OpenVideo()\r\n        {\r\n            Launcher.LaunchFileAsync(VideoFile);\r\n        }\r\n\r\n        private static async Task<Tuple<TLPhotoSizeBase, TLPhotoSizeBase>> GetFilePreviewAndThumbAsync(StorageFile file)\r\n        {\r\n            try\r\n            {\r\n                var preview = await file.GetThumbnailAsync(ThumbnailMode.SingleItem, 480, ThumbnailOptions.ResizeThumbnail);\r\n\r\n                var thumbLocation = new TLFileLocation\r\n                {\r\n                    DCId = new TLInt(0),\r\n                    VolumeId = TLLong.Random(),\r\n                    LocalId = TLInt.Random(),\r\n                    Secret = TLLong.Random(),\r\n                };\r\n\r\n                var thumbFileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                    thumbLocation.VolumeId,\r\n                    thumbLocation.LocalId,\r\n                    thumbLocation.Secret);\r\n\r\n                var previewLocation = new TLFileLocation\r\n                {\r\n                    DCId = new TLInt(0),\r\n                    VolumeId = TLLong.Random(),\r\n                    LocalId = TLInt.Random(),\r\n                    Secret = TLLong.Random(),\r\n                };\r\n\r\n                var previewFileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                    previewLocation.VolumeId,\r\n                    previewLocation.LocalId,\r\n                    previewLocation.Secret);\r\n\r\n                var previewFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(previewFileName, CreationCollisionOption.ReplaceExisting);\r\n                var previewBuffer = new Windows.Storage.Streams.Buffer(Convert.ToUInt32(preview.Size));\r\n                var iBuf = await preview.ReadAsync(previewBuffer, previewBuffer.Capacity, InputStreamOptions.None);\r\n\r\n                var filePreview = new TLPhotoSize\r\n                {\r\n                    W = new TLInt((int) preview.OriginalWidth),\r\n                    H = new TLInt((int) preview.OriginalHeight),\r\n                    Size = new TLInt((int) preview.Size),\r\n                    Type = TLString.Empty,\r\n                    Location = previewLocation,\r\n                };\r\n\r\n                Photo thumb;\r\n                using (var previewStream = await previewFile.OpenAsync(FileAccessMode.ReadWrite))\r\n                {\r\n                    await previewStream.WriteAsync(iBuf);\r\n\r\n                    thumb = await ChooseAttachmentViewModel.ResizeJpeg(previewStream, 90, thumbFileName);\r\n                }\r\n\r\n                var thumbFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(thumbFileName, CreationCollisionOption.ReplaceExisting);\r\n                var iBuf2 = thumb.Bytes.AsBuffer();\r\n                using (var thumbStream = await thumbFile.OpenAsync(FileAccessMode.ReadWrite))\r\n                {\r\n                    await thumbStream.WriteAsync(iBuf2);\r\n                }\r\n\r\n                var fileThumb = new TLPhotoSize\r\n                {\r\n                    W = new TLInt(thumb.Width),\r\n                    H = new TLInt(thumb.Height),\r\n                    Size = new TLInt(thumb.Bytes.Length),\r\n                    Type = new TLString(\"s\"),\r\n                    Location = thumbLocation,\r\n                };\r\n\r\n                return new Tuple<TLPhotoSizeBase, TLPhotoSizeBase>(filePreview, fileThumb);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"GetFilePreviewAndThumbAsync exception \" + ex);\r\n            }\r\n\r\n            return new Tuple<TLPhotoSizeBase, TLPhotoSizeBase>(null, null);\r\n        }\r\n\r\n        private static TimeSpan GetEditedDuration(TimeSpan? leftTrim, TimeSpan? rightTrim, TimeSpan duration)\r\n        {\r\n            var start = leftTrim ?? TimeSpan.Zero;\r\n            var end = rightTrim ?? duration;\r\n\r\n            return end - start;\r\n        }\r\n\r\n        private static string GetDurationString(TimeSpan duration)\r\n        {\r\n            if (duration.Hours > 0)\r\n            {\r\n                return duration.ToString(@\"h\\:mm\\:ss\");\r\n            }\r\n\r\n            if (duration.TotalSeconds < 1.0)\r\n            {\r\n                return duration.ToString(@\"m\\:ss\\.fff\");\r\n            }\r\n\r\n            return duration.ToString(@\"m\\:ss\");\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            CloseEditor();\r\n\r\n            var videoFile = new CompressingVideoFile\r\n            {\r\n                EncodingProfile = _encodingProfile,\r\n                TimerSpan = TimerSpan,\r\n                Size = EditedSize,\r\n                Duration = GetEditedDuration(TrimLeft, TrimRight, Duration).TotalSeconds,\r\n                Width = Width,\r\n                Height = Height,\r\n                Orientation = Orientation,\r\n                Source = VideoFile,\r\n                ThumbPhoto = ThumbPhoto,\r\n                TrimStartTime = TrimLeft ?? TimeSpan.Zero,\r\n                TrimStopTime = TrimRight ?? TimeSpan.Zero,\r\n                Caption = Caption,\r\n                Mentions = _mentions\r\n            };\r\n\r\n            DeletePreviewAsync();\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () => _sendVideoAction.SafeInvoke(videoFile));\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            DeletePreviewAsync();\r\n        }\r\n\r\n        private void DeletePreviewAsync()\r\n        {\r\n            var preview = PreviewPhoto as TLPhotoSize;\r\n            if (preview != null)\r\n            {\r\n                var fileLocation = preview.Location as TLFileLocation;\r\n                if (fileLocation != null)\r\n                {\r\n                    var fileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                        fileLocation.VolumeId,\r\n                        fileLocation.LocalId,\r\n                        fileLocation.Secret);\r\n\r\n                    Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => FileUtils.Delete(new object(), fileName));\r\n                }\r\n            }\r\n        }\r\n\r\n        public void OpenEditor()\r\n        {\r\n            IsOpen = true;\r\n        }\r\n\r\n        public void CloseEditor()\r\n        {\r\n            IsOpen = false;\r\n        }\r\n    }\r\n\r\n    public class CompressingVideoFile\r\n    {\r\n        public MediaEncodingProfile EncodingProfile { get; set; }\r\n\r\n        public TimeSpan TrimStartTime { get; set; }\r\n\r\n        public TimeSpan TrimStopTime { get; set; }\r\n\r\n        public TimerSpan TimerSpan { get; set; }\r\n\r\n        public ulong Size { get; set; }\r\n\r\n        public double Duration { get; set; }\r\n\r\n        public double Width { get; set; }\r\n\r\n        public double Height { get; set; }\r\n\r\n        public VideoOrientation Orientation { get; set; }\r\n\r\n        public StorageFile Source { get; set; }\r\n\r\n        public TLPhotoSizeBase ThumbPhoto { get; set; }\r\n\r\n        public string Caption { get; set; }\r\n\r\n        public IList<TLUserBase> Mentions { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Passport/EmailCodeViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Passport\r\n{\r\n    public class EmailCodeViewModel : ViewModelBase\r\n    {\r\n        private string _code;\r\n\r\n        public string Code\r\n        {\r\n            get { return _code; }\r\n            set { SetField(ref _code, value, () => Code); }\r\n        }\r\n\r\n        public string Subtitle { get; set; }\r\n\r\n        public int CodeLength { get; set; }\r\n\r\n        public TLString CurrentEmail { get; set; }\r\n\r\n        private TLSentEmailCode _sentCode;\r\n        \r\n        private readonly TLSecureValue _emailValue;\r\n\r\n        private readonly TLPasswordBase _passwordBase;\r\n\r\n        private readonly TLAuthorizationForm _authorizationForm;\r\n\r\n        private readonly IList<TLSecureValue> _secureValues;\r\n\r\n        private readonly TLSecureValueTypeBase _secureType;\r\n\r\n        private readonly SecureRequiredType _secureRequiredType;\r\n\r\n        public EmailCodeViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _passwordBase = stateService.Password;\r\n            stateService.Password = null;\r\n\r\n            _authorizationForm = stateService.AuthorizationForm;\r\n            stateService.AuthorizationForm = null;\r\n\r\n            _secureValues = stateService.SecureValues;\r\n            stateService.SecureValues = null;\r\n\r\n            _secureType = stateService.SecureType;\r\n            stateService.SecureType = null;\r\n\r\n            _secureRequiredType = stateService.SecureRequiredType;\r\n            stateService.SecureRequiredType = null;\r\n\r\n            CurrentEmail = stateService.CurrentEmail;\r\n            stateService.CurrentEmail = null;\r\n\r\n            _emailValue = _secureRequiredType != null ? _secureRequiredType.DataValue : null;\r\n\r\n            _sentCode = stateService.SentEmailCode;\r\n            stateService.SentEmailCode = null;\r\n\r\n            Subtitle = GetSubtitle();\r\n\r\n            var length = _sentCode as ILength;\r\n            CodeLength = length != null ? length.Length.Value : Constants.DefaultCodeLength;\r\n        }\r\n\r\n        private string GetSubtitle()\r\n        {\r\n            return string.Format(AppResources.PassportEmailVerifyInfo, CurrentEmail);\r\n        }\r\n\r\n        public void Confirm()\r\n        {\r\n            IsWorking = true;\r\n            MTProtoService.VerifyEmailAsync(\r\n                CurrentEmail,\r\n                new TLString(Code),\r\n                auth => BeginOnUIThread(() =>\r\n                {\r\n                    var emailValue = _emailValue;\r\n                    if (emailValue == null)\r\n                    {\r\n                        var secureType = _authorizationForm != null\r\n                            ? _authorizationForm.RequiredTypes.FirstOrDefault(EmailViewModel.IsValidType)\r\n                            : null;\r\n\r\n                        // add new email from passport settings\r\n                        if (_secureType != null && EmailViewModel.IsValidType(_secureType))\r\n                        {\r\n                            emailValue = new TLSecureValue85\r\n                            {\r\n                                Flags = new TLInt(0),\r\n                                Type = _secureType\r\n                            };\r\n                        }\r\n                        // add new email from authorization form\r\n                        else if (secureType != null)\r\n                        {\r\n                            emailValue = new TLSecureValue85\r\n                            {\r\n                                Flags = new TLInt(0),\r\n                                Type = secureType\r\n                            };\r\n                        }\r\n                        else\r\n                        {\r\n                            return;\r\n                        }\r\n                    }\r\n\r\n                    IsWorking =\r\n                    EmailViewModel.SaveEmailAsync(\r\n                        CurrentEmail, _passwordBase as TLPassword, MTProtoService,\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            if (_authorizationForm != null)\r\n                            {\r\n                                _authorizationForm.Values.Remove(emailValue);\r\n                                _authorizationForm.Values.Add(result);\r\n                            }\r\n\r\n                            emailValue.Update(result);\r\n                            emailValue.NotifyOfPropertyChange(() => emailValue.Self);\r\n\r\n                            if (_secureType != null)\r\n                            {\r\n                                EventAggregator.Publish(new AddSecureValueEventArgs { Values = new List<TLSecureValue> { emailValue } });\r\n                            }\r\n\r\n                            if (_secureRequiredType != null)\r\n                            {\r\n                                _secureRequiredType.UpdateValue();\r\n                            }\r\n\r\n                            NavigationService.RemoveBackEntry();\r\n                            NavigationService.GoBack();\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n\r\n                            if (error.CodeEquals(ErrorCode.BAD_REQUEST)\r\n                                && error.TypeEquals(ErrorType.EMAIL_VERIFICATION_NEEDED))\r\n                            {\r\n                                MTProtoService.SendVerifyEmailCodeAsync(CurrentEmail, \r\n                                    sentCode => BeginOnUIThread(() =>\r\n                                    {\r\n                                        _sentCode = sentCode;\r\n\r\n                                        Subtitle = GetSubtitle();\r\n                                        NotifyOfPropertyChange(() => Subtitle);\r\n\r\n                                        var length = _sentCode as ILength;\r\n                                        CodeLength = length != null ? length.Length.Value : Constants.DefaultCodeLength;\r\n                                        NotifyOfPropertyChange(() => CodeLength);\r\n                                    }),\r\n                                    error2 => BeginOnUIThread(() =>\r\n                                    {\r\n                                        if (error.TypeEquals(ErrorType.EMAIL_INVALID))\r\n                                        {\r\n                                            ShellViewModel.ShowCustomMessageBox(AppResources.EmailInvalidString, AppResources.Error, AppResources.Ok);\r\n                                        }\r\n                                        else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                                        {\r\n                                            ShellViewModel.ShowCustomMessageBox(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, AppResources.Ok);\r\n                                        }\r\n                                        else\r\n                                        {\r\n                                            Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.sendVerifyEmailCode error \" + error);\r\n                                        }\r\n                                    }));\r\n                            }\r\n                            else if (error.TypeEquals(ErrorType.EMAIL_INVALID))\r\n                            {\r\n                                ShellViewModel.ShowCustomMessageBox(AppResources.EmailInvalidString, AppResources.Error, AppResources.Ok);\r\n                            }\r\n                        }));\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (error.TypeEquals(ErrorType.CODE_INVALID))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.EmailCodeInvalidString, AppResources.Error, AppResources.Ok);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.CODE_EMPTY))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.EmailCodeEmpty, AppResources.Error, AppResources.Ok);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.EMAIL_VERIFY_EXPIRED))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.EmailCodeExpiredString, AppResources.Error, AppResources.Ok);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.EMAIL_INVALID))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.EmailInvalidString, AppResources.Error, AppResources.Ok);\r\n                    }\r\n                    else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, AppResources.Ok);\r\n                    }\r\n                    else\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.verifyEmail error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Passport/EmailViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Passport\r\n{\r\n    public class EmailViewModel : ViewModelBase\r\n    {\r\n        public string UseCurrentEmailCommand\r\n        {\r\n            get { return string.Format(AppResources.PassportPhoneUseSame, CurrentEmail); }\r\n        }\r\n\r\n        public string Email { get; set; }\r\n\r\n        public string CurrentEmail { get; set; }\r\n\r\n        public static bool IsValidType(TLSecureValueTypeBase type)\r\n        {\r\n            return type is TLSecureValueTypeEmail;\r\n        }\r\n\r\n        private readonly TLSecureValue _emailValue;\r\n\r\n        private readonly TLPasswordBase _passwordBase;\r\n\r\n        private readonly TLAuthorizationForm _authorizationForm;\r\n\r\n        private readonly IList<TLSecureValue> _secureValues;\r\n\r\n        private readonly TLSecureValueTypeBase _secureType;\r\n\r\n        private readonly SecureRequiredType _secureRequiredType;\r\n\r\n        public EmailViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _passwordBase = stateService.Password;\r\n            stateService.Password = null;\r\n\r\n            _authorizationForm = stateService.AuthorizationForm;\r\n            stateService.AuthorizationForm = null;\r\n\r\n            _secureValues = stateService.SecureValues;\r\n            stateService.SecureValues = null;\r\n\r\n            _secureType = stateService.SecureType;\r\n            stateService.SecureType = null;\r\n\r\n            _secureRequiredType = stateService.SecureRequiredType;\r\n            stateService.SecureRequiredType = null;\r\n\r\n            var password = _passwordBase as TLPassword81;\r\n            if (password != null)\r\n            {\r\n                var passwordSettings = password.Settings as TLPasswordSettings83;\r\n                if (passwordSettings != null)\r\n                {\r\n                    CurrentEmail = TLString.IsNullOrEmpty(passwordSettings.Email)? string.Empty : passwordSettings.Email.ToString();\r\n                }\r\n            }\r\n\r\n            _emailValue = _secureRequiredType != null ? _secureRequiredType.DataValue : null;\r\n        }\r\n\r\n        public void UseCurrentEmail()\r\n        {\r\n            if (!IsEmailValid(CurrentEmail)) return;\r\n\r\n            SaveEmailAsync(new TLString(CurrentEmail));\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (!IsEmailValid(Email)) return;\r\n            if (IsWorking) return;\r\n\r\n            SaveEmailAsync(new TLString(Email));\r\n        }\r\n\r\n        public bool IsEmailValid(string email)\r\n        {\r\n            return !IsWorking && !string.IsNullOrEmpty(email);\r\n        }\r\n\r\n        public static bool SaveEmailAsync(TLString email, TLPassword password, IMTProtoService mtProtoService, Action<TLSecureValue> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            if (password == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            var passwordSettings = password.Settings as TLPasswordSettings83;\r\n            if (passwordSettings == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            var inputSecureValue = new TLInputSecureValue85\r\n            {\r\n                Flags = new TLInt(0),\r\n                Type = new TLSecureValueTypeEmail(),\r\n                PlainData = new TLSecurePlainEmail { Email = email }\r\n            };\r\n\r\n            var secureSecretId = passwordSettings.SecureSettings.SecureSecretId;\r\n\r\n            mtProtoService.SaveSecureValueAsync(\r\n                inputSecureValue, secureSecretId,\r\n                callback.SafeInvoke,\r\n                faultCallback.SafeInvoke);\r\n\r\n            return true;\r\n        }\r\n\r\n        private void SaveEmailAsync(TLString email)\r\n        {\r\n            var emailValue = _emailValue;\r\n            if (emailValue == null)\r\n            {\r\n                var secureRequiredType = _secureRequiredType != null ? _secureRequiredType.DataRequiredType as TLSecureRequiredType : null;\r\n                var secureType = secureRequiredType != null && IsValidType(secureRequiredType.Type)\r\n                    ? secureRequiredType.Type\r\n                    : null;\r\n\r\n                // add new email from passport settings\r\n                if (_secureType != null && IsValidType(_secureType))\r\n                {\r\n                    emailValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = _secureType\r\n                    };\r\n                }\r\n                // add new email from authorization form\r\n                else if (secureType != null)\r\n                {\r\n                    emailValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = secureType\r\n                    };\r\n                }\r\n                else\r\n                {\r\n                    return;\r\n                }\r\n            }\r\n\r\n            IsWorking =\r\n                SaveEmailAsync(\r\n                    email, _passwordBase as TLPassword, MTProtoService,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        if (_authorizationForm != null)\r\n                        {\r\n                            _authorizationForm.Values.Remove(emailValue);\r\n                            _authorizationForm.Values.Add(result);\r\n                        }\r\n\r\n                        emailValue.Update(result);\r\n                        emailValue.NotifyOfPropertyChange(() => emailValue.Self);\r\n\r\n                        if (_secureType != null)\r\n                        {\r\n                            EventAggregator.Publish(new AddSecureValueEventArgs { Values = new List<TLSecureValue> { emailValue } });\r\n                        }\r\n\r\n                        if (_secureRequiredType != null)\r\n                        {\r\n                            _secureRequiredType.UpdateValue();\r\n                        }\r\n\r\n                        NavigationService.GoBack();\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        if (error.CodeEquals(ErrorCode.BAD_REQUEST)\r\n                            && error.TypeEquals(ErrorType.EMAIL_VERIFICATION_NEEDED))\r\n                        {\r\n                            MTProtoService.SendVerifyEmailCodeAsync(email,\r\n                                result2 => BeginOnUIThread(() =>\r\n                                {\r\n                                    StateService.SentEmailCode = result2;\r\n                                    StateService.CurrentEmail = email;\r\n\r\n                                    StateService.Password = _passwordBase;\r\n                                    StateService.AuthorizationForm = _authorizationForm;\r\n                                    StateService.SecureValues = _secureValues;\r\n                                    StateService.SecureType = _secureType;\r\n                                    StateService.SecureRequiredType = _secureRequiredType;\r\n                                    NavigationService.UriFor<EmailCodeViewModel>().Navigate();\r\n                                }),\r\n                                error2 => BeginOnUIThread(() =>\r\n                                {\r\n                                    if (error.TypeEquals(ErrorType.EMAIL_INVALID))\r\n                                    {\r\n                                        ShellViewModel.ShowCustomMessageBox(AppResources.EmailInvalidString, AppResources.Error, AppResources.Ok);\r\n                                    }\r\n                                    else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                                    {\r\n                                        ShellViewModel.ShowCustomMessageBox(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, AppResources.Ok);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.sendVerifyEmailCode error \" + error);\r\n                                    }\r\n                                }));\r\n                        }\r\n                        else if (error.TypeEquals(ErrorType.EMAIL_INVALID))\r\n                        {\r\n                            ShellViewModel.ShowCustomMessageBox(AppResources.EmailInvalidString, AppResources.Error, AppResources.Ok);\r\n                        }\r\n                        else if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                        {\r\n                            ShellViewModel.ShowCustomMessageBox(\r\n                                \"account.saveSecureValue\" + Environment.NewLine + error.Message,\r\n                                AppResources.AppName,\r\n                                AppResources.Ok);\r\n                        }\r\n                    }));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Passport/EnterPasswordViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Passport\r\n{\r\n    public class EnterPasswordViewModel : PasswordViewModelBase\r\n    {\r\n        public TLUserBase Bot { get; set; }\r\n\r\n        public string Hint\r\n        {\r\n            get\r\n            {\r\n                if (_authorizationForm == null)\r\n                {\r\n                    return AppResources.PassportSelfRequest;\r\n                }\r\n                \r\n                return Bot == null\r\n                    ? string.Empty\r\n                    : string.Format(AppResources.PassportHint, Bot.FullName);\r\n            }\r\n        }\r\n\r\n        public string BottomHint\r\n        {\r\n            get\r\n            {\r\n                if (_authorizationForm == null)\r\n                {\r\n                    return AppResources.PassportRequestPasswordInfo;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public string RandomParam { get; set; }\r\n\r\n        private readonly TLAuthorizationForm _authorizationForm;\r\n\r\n        private readonly IList<TLSecureValue> _secureValues;\r\n\r\n        public static TLString Secret { get; protected set; }\r\n\r\n        public EnterPasswordViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _authorizationForm = stateService.AuthorizationForm;\r\n            stateService.AuthorizationForm = null;\r\n\r\n            _secureValues = stateService.SecureValues;\r\n            stateService.SecureValues = null;\r\n\r\n            if (_authorizationForm != null)\r\n            {\r\n                Bot = _authorizationForm.Users.LastOrDefault();\r\n            }\r\n            else\r\n            {\r\n                Bot = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n            }\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            var backEntry = NavigationService.BackStack.FirstOrDefault();\r\n            while (backEntry != null\r\n                && !backEntry.Source.ToString().EndsWith(\"ShellView.xaml\")\r\n                && !DialogDetailsViewModel.IsFirstEntryFromPeopleHub(backEntry, NavigationService.BackStack)\r\n                && !DialogDetailsViewModel.IsFirstEntryFromTelegramUrl(backEntry, NavigationService.BackStack))\r\n            {\r\n                NavigationService.RemoveBackEntry();\r\n                backEntry = NavigationService.BackStack.FirstOrDefault();\r\n            }\r\n        }\r\n\r\n        protected override void OnSucceded(TLPasswordSettings passwordSettings)\r\n        {\r\n            NavigateToPassportCommon(\r\n                passwordSettings, PasswordBase, new TLString(Password),\r\n                _authorizationForm, _secureValues,\r\n                MTProtoService, StateService, NavigationService);\r\n        }\r\n\r\n        public static void NavigateToPassportCommon(\r\n            TLPasswordSettings passwordSettings, TLPassword passwordBase, TLString password, \r\n            TLAuthorizationForm authorizationForm, IList<TLSecureValue> secureValues, \r\n            IMTProtoService mtProtoService, IStateService stateService, INavigationService navigationService)\r\n        {\r\n            var passwordSettings83 = passwordSettings as TLPasswordSettings83;\r\n            if (passwordSettings83 == null) return;\r\n\r\n            var secureSettings = passwordSettings83.SecureSettings;\r\n\r\n            passwordBase.Settings = passwordSettings83;\r\n\r\n            var password84 = passwordBase as TLPassword84;\r\n            if (password84 == null) return;\r\n\r\n            var algo = password84.CurrentAlgo as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n            if (algo == null) return;\r\n\r\n            //passwordBase.CurrentPasswordHash = Utils.Password.GetHash(passwordBase.CurrentSalt, password);\r\n            var passwordHash = SRP.GetX(password, algo);\r\n\r\n            passwordBase.CurrentPasswordHash = passwordHash;\r\n            \r\n            // create secure_secret\r\n            if (secureSettings == null || TLString.IsNullOrEmpty(secureSettings.SecureSecret))\r\n            {\r\n                AddSecureSecret(passwordSettings, passwordBase, password, authorizationForm, secureValues, mtProtoService, stateService, navigationService);\r\n                return;\r\n            }\r\n\r\n            var values = authorizationForm != null ? authorizationForm.Values : secureValues;\r\n            if (values == null) return;\r\n\r\n            var decrypted = SetSecretAndDecryptSecureValues(passwordSettings83, password, values);\r\n            if (!decrypted)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    ShellViewModel.ShowCustomMessageBox(\r\n                        AppResources.PassportDataCorrupted, AppResources.AppName,\r\n                        AppResources.Reset, AppResources.Cancel, \r\n                        dismissed =>\r\n                        {\r\n                            if (dismissed == CustomMessageBoxResult.RightButton)\r\n                            {\r\n                                ResetSecureSecret(passwordSettings, passwordBase, password, authorizationForm, secureValues, mtProtoService, stateService, navigationService);\r\n                                values.Clear(); \r\n                            }\r\n                        });\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            stateService.RemoveBackEntry = true;\r\n            stateService.AuthorizationForm = authorizationForm;\r\n            stateService.SecureValues = secureValues;\r\n            stateService.Password = passwordBase;\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (authorizationForm != null)\r\n                {\r\n                    navigationService.UriFor<PassportViewModel>().Navigate();\r\n                }\r\n                else if (secureValues != null)\r\n                {\r\n                    navigationService.UriFor<PassportSettingsViewModel>().Navigate();\r\n                }\r\n            });\r\n        }\r\n\r\n        private static void ResetSecureSecret(\r\n            TLPasswordSettings passwordSettings, TLPassword passwordBase, TLString password,\r\n            TLAuthorizationForm authorizationForm, IList<TLSecureValue> secureValues,\r\n            IMTProtoService mtProtoService, IStateService stateService, INavigationService navigationService)\r\n        {\r\n            var passwordSettings83 = passwordSettings as TLPasswordSettings83;\r\n            if (passwordSettings83 == null) return;\r\n\r\n            var password84 = passwordBase as TLPassword84;\r\n            if (password84 == null) return;\r\n\r\n            var newSecureSettings = new TLSecureSecretSettings\r\n            {\r\n                SecureAlgo = new TLSecurePasswordKdfAlgoUnknown(),\r\n                SecureSecret = TLString.Empty,\r\n                SecureSecretId = new TLLong(0)\r\n            };\r\n\r\n            var newSettings = new TLPasswordInputSettings83\r\n            {\r\n                Flags = new TLInt(0),\r\n                NewSecureSettings = newSecureSettings,\r\n            };\r\n\r\n            mtProtoService.GetPasswordAsync(\r\n                resul1 =>\r\n                {\r\n                    var srpParams = resul1 as IPasswordSRPParams;\r\n                    if (srpParams == null) return;\r\n\r\n                    var currentPasswordHash = passwordBase.CurrentPasswordHash ?? TLString.Empty;\r\n                    mtProtoService.UpdatePasswordSettingsAsync(SRP.GetCheck(currentPasswordHash, srpParams.SRPId, srpParams.SRPB, srpParams.CurrentAlgo), newSettings,\r\n                        result2 =>\r\n                        {\r\n                            passwordSettings83.SecureSettings = newSettings.NewSecureSettings;\r\n\r\n                            NavigateToPassportCommon(\r\n                                passwordSettings83, passwordBase, password,\r\n                                authorizationForm, secureValues,\r\n                                mtProtoService, stateService, navigationService);\r\n                        },\r\n                        error2 => { });\r\n                },\r\n                error1 => { });\r\n        }\r\n\r\n        private static void AddSecureSecret(\r\n            TLPasswordSettings passwordSettings, TLPassword passwordBase, TLString password,\r\n            TLAuthorizationForm authorizationForm, IList<TLSecureValue> secureValues,\r\n            IMTProtoService mtProtoService, IStateService stateService, INavigationService navigationService)\r\n        {\r\n            var passwordSettings83 = passwordSettings as TLPasswordSettings83;\r\n            if (passwordSettings83 == null) return;\r\n\r\n            var password84 = passwordBase as TLPassword84;\r\n            if (password84 == null) return;\r\n\r\n            var newSettings = new TLPasswordInputSettings83 { Flags = new TLInt(0) };\r\n\r\n            Utils.Password.AddRandomSecureSecret(newSettings, password84, password);\r\n\r\n            mtProtoService.GetPasswordAsync(\r\n                resul1 =>\r\n                {\r\n                    var srpParams = resul1 as IPasswordSRPParams;\r\n                    if (srpParams == null) return;\r\n\r\n                    var currentPasswordHash = passwordBase.CurrentPasswordHash ?? TLString.Empty;\r\n                    mtProtoService.UpdatePasswordSettingsAsync(SRP.GetCheck(currentPasswordHash, srpParams.SRPId, srpParams.SRPB, srpParams.CurrentAlgo), newSettings,\r\n                        result2 =>\r\n                        {\r\n                            passwordSettings83.SecureSettings = newSettings.NewSecureSettings;\r\n\r\n                            NavigateToPassportCommon(\r\n                                passwordSettings83, passwordBase, password,\r\n                                authorizationForm, secureValues,\r\n                                mtProtoService, stateService, navigationService);\r\n                        },\r\n                        error2 => { });\r\n                },\r\n                error1 => { });\r\n        }\r\n\r\n        protected static bool SetSecretAndDecryptSecureValues(TLPasswordSettings83 passwordSettings, TLString password, IList<TLSecureValue> values)\r\n        {\r\n            if (passwordSettings == null) return false;\r\n\r\n            var secureSettings = passwordSettings.SecureSettings;\r\n            if (secureSettings == null) return false;\r\n\r\n            var secureAlgo = secureSettings.SecureAlgo;\r\n            if (secureAlgo == null) return false;\r\n\r\n            Secret = Utils.Passport.DecryptSecureSecret(\r\n                secureSettings.SecureSecret,\r\n                password,\r\n                secureAlgo);\r\n\r\n            // cannot decrypt secureSecret, corrupt data\r\n            if (Secret == null) return false;\r\n\r\n            if (values == null) return true;\r\n\r\n            foreach (var value in values)\r\n            {\r\n                try\r\n                {\r\n                    if (value.Data != null)\r\n                    {\r\n                        var decryptedData = Utils.Passport.DecryptSecureValue(value, Secret);\r\n\r\n                        if (!TLString.IsNullOrEmpty(decryptedData))\r\n                        {\r\n                            if (ResidentialAddressViewModel.IsValidDataType(value.Type))\r\n                            {\r\n                                value.Data.DecryptedData = JsonUtils.FromJSON<ResidentialAddressRootObject>(decryptedData.Data);\r\n                            }\r\n                            else if (PersonalDetailsViewModel.IsValidProofType(value.Type))\r\n                            {\r\n                                value.Data.DecryptedData = JsonUtils.FromJSON<PersonalDetailsDocumentRootObject>(decryptedData.Data);\r\n                            }\r\n                            else if (PersonalDetailsViewModel.IsValidDataType(value.Type))\r\n                            {\r\n                                value.Data.DecryptedData = JsonUtils.FromJSON<PersonalDetailsRootObject>(decryptedData.Data);\r\n                            }\r\n                            else\r\n                            {\r\n                                value.Data.DecryptedData = decryptedData;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(ex.ToString());\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Passport/PassportViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Windows.Data.Json;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.Views.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Passport\r\n{\r\n    public class PassportViewModel : ViewModelBase\r\n    {\r\n        public TLUserBase Bot { get; set; }\r\n\r\n        public string Hint\r\n        {\r\n            get\r\n            {\r\n                return Bot == null\r\n                    ? string.Empty\r\n                    : string.Format(AppResources.PassportHint, Bot.FullName);\r\n            }\r\n        }\r\n\r\n        public string AuthorizationFormHint\r\n        {\r\n            get\r\n            {\r\n                var username = Bot as IUserName;\r\n\r\n                return username == null\r\n                    ? string.Empty\r\n                    : string.Format(AppResources.PassportNoPolicy, Bot.FullName, username.UserName);\r\n            }\r\n        }\r\n\r\n        public Visibility ResidentialAddressVisibility\r\n        {\r\n            get\r\n            {\r\n                return _authorizationForm.RequiredTypes.FirstOrDefault(ResidentialAddressViewModel.IsValidType) != null\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public Visibility ResidentialAddressCheckVisibility\r\n        {\r\n            get\r\n            {\r\n                var dataType = _authorizationForm.RequiredTypes.FirstOrDefault(ResidentialAddressViewModel.IsValidDataType);\r\n                if (dataType != null)\r\n                {\r\n                    var data = _authorizationForm.Values.FirstOrDefault(x => x.Type.GetType() == dataType.GetType());\r\n                    if (data == null)\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n                }\r\n                \r\n                var dataProofType = _authorizationForm.RequiredTypes.FirstOrDefault(ResidentialAddressViewModel.IsValidProofType);\r\n                if (dataProofType != null)\r\n                {\r\n                    var dataProof = _authorizationForm.Values.FirstOrDefault(x => x.Type.GetType() == dataProofType.GetType());\r\n                    if (dataProof == null)\r\n                    {\r\n                        return Visibility.Collapsed;\r\n                    }\r\n                }\r\n\r\n                var type = _authorizationForm.RequiredTypes.FirstOrDefault(ResidentialAddressViewModel.IsValidType);\r\n                if (type == null)\r\n                {\r\n                    return Visibility.Collapsed;\r\n                }\r\n\r\n                var error = _authorizationForm.Errors.FirstOrDefault(x => ResidentialAddressViewModel.IsValidType(x.Type));\r\n                if (error != null)\r\n                {\r\n                    return Visibility.Collapsed;\r\n                }\r\n\r\n                return Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        public string ResidentialAddressHint\r\n        {\r\n            get\r\n            {\r\n                var value = _authorizationForm.Values.FirstOrDefault(x => ResidentialAddressViewModel.IsValidDataType(x.Type));\r\n                if (value != null)\r\n                {\r\n                    return SecureValueToHintConverter.Convert(value);\r\n                }\r\n\r\n                return AppResources.PassportAddressInfo;\r\n            }\r\n        }\r\n\r\n        public string ResidentialAddressError\r\n        {\r\n            get\r\n            {\r\n                var value = _authorizationForm.Errors.FirstOrDefault(x => ResidentialAddressViewModel.IsValidType(x.Type));\r\n                if (value != null)\r\n                {\r\n                    return AppResources.PassportCorrectErrors;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n        \r\n        public ObservableCollection<SecureRequiredType> RequiredTypes { get; set; }\r\n\r\n        private readonly TLAuthorizationForm _authorizationForm;\r\n\r\n        private readonly TLPasswordBase _passwordBase;\r\n\r\n        public PassportViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            RequiredTypes = new ObservableCollection<SecureRequiredType>();\r\n\r\n            _authorizationForm = stateService.AuthorizationForm;\r\n            stateService.AuthorizationForm = null;\r\n\r\n            _passwordBase = stateService.Password;\r\n            stateService.Password = null;\r\n\r\n            if (_authorizationForm != null)\r\n            {\r\n                Bot = _authorizationForm.Users.LastOrDefault();\r\n            }\r\n\r\n            GetRequiredTypes();\r\n        }\r\n\r\n        private void GetRequiredTypes()\r\n        {\r\n            var authorizationForm85 = _authorizationForm as TLAuthorizationForm85;\r\n            if (authorizationForm85 != null)\r\n            {\r\n                var hasPersonalDetails = false;\r\n                var hasResidentialAddress = false;\r\n                var personalDetailsProofCount = 0;\r\n                var residentialAddressProofCount = 0;\r\n                foreach (var requiredTypeBase in authorizationForm85.NewRequiredTypes)\r\n                {\r\n                    var requiredType = requiredTypeBase as TLSecureRequiredType;\r\n                    if (requiredType != null)\r\n                    {\r\n                        if (PersonalDetailsViewModel.IsValidDataType(requiredType.Type))\r\n                        {\r\n                            hasPersonalDetails = true;\r\n                        }\r\n                        else if (ResidentialAddressViewModel.IsValidDataType(requiredType.Type))\r\n                        {\r\n                            hasResidentialAddress = true;\r\n                        }\r\n                        else if (PersonalDetailsViewModel.IsValidProofType(requiredType.Type))\r\n                        {\r\n                            personalDetailsProofCount++;\r\n                        }\r\n                        else if (ResidentialAddressViewModel.IsValidProofType(requiredType.Type))\r\n                        {\r\n                            residentialAddressProofCount++;\r\n                        }\r\n                    }\r\n\r\n                    var requiredTypeOneOf = requiredTypeBase as TLSecureRequiredTypeOneOf;\r\n                    if (requiredTypeOneOf != null && requiredTypeOneOf.Types.Count > 0)\r\n                    {\r\n                        requiredType = requiredTypeOneOf.Types[0] as TLSecureRequiredType;\r\n                        if (requiredType != null)\r\n                        {\r\n                            if (PersonalDetailsViewModel.IsValidProofType(requiredType.Type))\r\n                            {\r\n                                personalDetailsProofCount++;\r\n                            }\r\n                            else if (ResidentialAddressViewModel.IsValidProofType(requiredType.Type))\r\n                            {\r\n                                residentialAddressProofCount++;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                var joinPersonalDetails = hasPersonalDetails && personalDetailsProofCount == 1;\r\n                var joinResidentialAddress = hasResidentialAddress && residentialAddressProofCount == 1;\r\n\r\n                SecureRequiredType personalDetails = null;\r\n                SecureRequiredType residentialAddress = null;\r\n                var requiredTypes = new ObservableCollection<SecureRequiredType>();\r\n                foreach (var requiredTypeBase in authorizationForm85.NewRequiredTypes)\r\n                {\r\n                    var requiredTypeOneOf = requiredTypeBase as TLSecureRequiredTypeOneOf;\r\n                    if (requiredTypeOneOf != null && requiredTypeOneOf.Types.Count > 0)\r\n                    {\r\n                        var firstRequiredType = requiredTypeOneOf.Types[0] as TLSecureRequiredType;\r\n                        if (firstRequiredType != null)\r\n                        {\r\n                            if (PersonalDetailsViewModel.IsValidType(firstRequiredType.Type))\r\n                            {\r\n                                personalDetails = AddPersonalDetailsType(joinPersonalDetails, requiredTypes, requiredTypeOneOf, authorizationForm85, personalDetails, PersonalDetailsViewModel.IsValidDataType(firstRequiredType.Type));\r\n                            }\r\n                            else if (ResidentialAddressViewModel.IsValidType(firstRequiredType.Type))\r\n                            {\r\n                                residentialAddress = AddResidentialAddressType(joinResidentialAddress, requiredTypes, requiredTypeOneOf, authorizationForm85, residentialAddress, ResidentialAddressViewModel.IsValidDataType(firstRequiredType.Type));\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var requiredType = requiredTypeBase as TLSecureRequiredType;\r\n                    if (requiredType != null)\r\n                    {\r\n                        if (PhoneNumberViewModel.IsValidType(requiredType.Type))\r\n                        {\r\n                            requiredTypes.Add(new SecureRequiredType(requiredType, null, authorizationForm85));\r\n                        }\r\n                        else if (EmailViewModel.IsValidType(requiredType.Type))\r\n                        {\r\n                            requiredTypes.Add(new SecureRequiredType(requiredType, null, authorizationForm85));\r\n                        }\r\n                        else if (PersonalDetailsViewModel.IsValidType(requiredType.Type))\r\n                        {\r\n                            personalDetails = AddPersonalDetailsType(joinPersonalDetails, requiredTypes, requiredType, authorizationForm85, personalDetails, PersonalDetailsViewModel.IsValidDataType(requiredType.Type));\r\n                        }\r\n                        else if (ResidentialAddressViewModel.IsValidType(requiredType.Type))\r\n                        {\r\n                            residentialAddress = AddResidentialAddressType(joinResidentialAddress, requiredTypes, requiredType, authorizationForm85, residentialAddress, ResidentialAddressViewModel.IsValidDataType(requiredType.Type));\r\n                        }\r\n                    }\r\n                }\r\n\r\n                RequiredTypes = requiredTypes;\r\n            }\r\n        }\r\n\r\n        private static SecureRequiredType AddResidentialAddressType(\r\n            bool joinResidentialAddress, ObservableCollection<SecureRequiredType> requiredTypes, \r\n            TLSecureRequiredTypeBase requiredType, TLAuthorizationForm85 authorizationForm85, SecureRequiredType residentialAddress,\r\n            bool isValidDataType)\r\n        {\r\n            if (!joinResidentialAddress)\r\n            {\r\n                requiredTypes.Add(isValidDataType\r\n                    ? new SecureRequiredType(requiredType as TLSecureRequiredType, null, authorizationForm85)\r\n                    : new SecureRequiredType(null, requiredType, authorizationForm85));\r\n            }\r\n            else\r\n            {\r\n                if (residentialAddress == null)\r\n                {\r\n                    residentialAddress = isValidDataType\r\n                        ? new SecureRequiredType(requiredType as TLSecureRequiredType, null, authorizationForm85)\r\n                        : new SecureRequiredType(null, requiredType, authorizationForm85);\r\n\r\n                    requiredTypes.Add(residentialAddress);\r\n                }\r\n                else\r\n                {\r\n                    if (isValidDataType)\r\n                    {\r\n                        residentialAddress.SetData(requiredType as TLSecureRequiredType);\r\n                    }\r\n                    else\r\n                    {\r\n                        residentialAddress.SetDataProof(requiredType);\r\n                    }\r\n                }\r\n            }\r\n            return residentialAddress;\r\n        }\r\n\r\n        private static SecureRequiredType AddPersonalDetailsType(\r\n            bool joinPersonalDetails, ObservableCollection<SecureRequiredType> requiredTypes,\r\n            TLSecureRequiredTypeBase requiredType, TLAuthorizationForm85 authorizationForm85, SecureRequiredType personalDetails,\r\n            bool isValidDataType)\r\n        {\r\n            if (!joinPersonalDetails)\r\n            {\r\n                requiredTypes.Add(isValidDataType\r\n                    ? new SecureRequiredType(requiredType as TLSecureRequiredType, null, authorizationForm85)\r\n                    : new SecureRequiredType(null, requiredType, authorizationForm85));\r\n            }\r\n            else\r\n            {\r\n                if (personalDetails == null)\r\n                {\r\n                    personalDetails = isValidDataType\r\n                        ? new SecureRequiredType(requiredType as TLSecureRequiredType, null, authorizationForm85)\r\n                        : new SecureRequiredType(null, requiredType, authorizationForm85);\r\n\r\n                    requiredTypes.Add(personalDetails);\r\n                }\r\n                else\r\n                {\r\n                    if (isValidDataType)\r\n                    {\r\n                        personalDetails.SetData(requiredType as TLSecureRequiredType);\r\n                    }\r\n                    else\r\n                    {\r\n                        personalDetails.SetDataProof(requiredType);\r\n                    }\r\n                }\r\n            }\r\n            return personalDetails;\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            base.OnActivate();\r\n\r\n            NotifyOfPropertyChange(() => ResidentialAddressHint);\r\n            NotifyOfPropertyChange(() => ResidentialAddressCheckVisibility);\r\n            NotifyOfPropertyChange(() => ResidentialAddressError);\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n        }\r\n        \r\n        public void EditPersonalDetails(SecureRequiredType secureRequiredType)\r\n        {\r\n            var requiredProofTypes = secureRequiredType.DataProofRequiredType as TLSecureRequiredTypeOneOf;\r\n            if (requiredProofTypes != null && requiredProofTypes.Types.Count > 1)\r\n            {\r\n                var addressProof = secureRequiredType.DataProofValue;\r\n                if (addressProof == null)\r\n                {\r\n                    var panel = new StackPanel { Margin = new Thickness(0.0, 12.0, 0.0, 0.0) };\r\n                    var messageBox = ShellViewModel.ShowCustomMessageBox(\r\n                        null, AppResources.PassportAddress,\r\n                        null, null,\r\n                        dismissed =>\r\n                        {\r\n\r\n                        },\r\n                        requiredProofTypes.Types.Count > 10 ?\r\n                        (object)new ScrollViewer { MaxHeight = 650.0, Content = panel, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled } :\r\n                        panel);\r\n\r\n                    for (var i = 0; i < requiredProofTypes.Types.Count; i++)\r\n                    {\r\n                        var requiredProofType = requiredProofTypes.Types[i] as TLSecureRequiredType;\r\n                        if (requiredProofType != null)\r\n                        {\r\n                            var listBoxItem = new ListBoxItem\r\n                            {\r\n                                Content =\r\n                                    new TextBlock\r\n                                    {\r\n                                        Text = SecureRequiredTypeToCaptionConverter.Convert(requiredProofType.Type),\r\n                                        FontSize = 27,\r\n                                        Margin = new Thickness(12.0)\r\n                                    },\r\n                                DataContext = requiredProofType\r\n                            };\r\n                            TiltEffect.SetIsTiltEnabled(listBoxItem, true);\r\n                            listBoxItem.Tap += (sender, args) =>\r\n                            {\r\n                                messageBox.Dismiss();\r\n                                var item = sender as ListBoxItem;\r\n                                if (item != null)\r\n                                {\r\n                                    requiredProofType = item.DataContext as TLSecureRequiredType;\r\n                                    if (requiredProofType != null)\r\n                                    {\r\n                                        secureRequiredType.SetSelectedDataProof(requiredProofType);\r\n                                        EditPersonalDetailsInternal(secureRequiredType);\r\n                                    }\r\n                                }\r\n\r\n                            };\r\n\r\n                            panel.Children.Add(listBoxItem);\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    EditPersonalDetailsInternal(secureRequiredType);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                EditPersonalDetailsInternal(secureRequiredType);\r\n            }\r\n        }\r\n\r\n        private void EditPersonalDetailsInternal(SecureRequiredType secureRequiredType)\r\n        {\r\n            var authorizationForm85 = _authorizationForm as TLAuthorizationForm85;\r\n            if (authorizationForm85 != null && authorizationForm85.Config != null && authorizationForm85.Config.CountriesLangsObject == null)\r\n            {\r\n                JsonObject result;\r\n                if (JsonObject.TryParse(authorizationForm85.Config.CountriesLangs.Data.ToString(), out result))\r\n                {\r\n                    authorizationForm85.Config.CountriesLangsObject = result;\r\n                }\r\n            }\r\n\r\n            StateService.SecureRequiredType = secureRequiredType;\r\n            StateService.AuthorizationForm = _authorizationForm;\r\n            StateService.Password = _passwordBase;\r\n            NavigationService.UriFor<PersonalDetailsViewModel>().Navigate();\r\n        }\r\n\r\n        public void EditResidentialAddress(SecureRequiredType secureRequiredType)\r\n        {\r\n            var requiredProofTypes = secureRequiredType.DataProofRequiredType as TLSecureRequiredTypeOneOf;\r\n            if (requiredProofTypes != null && requiredProofTypes.Types.Count > 1)\r\n            {\r\n                var addressProof = secureRequiredType.DataProofValue;\r\n                if (addressProof == null)\r\n                {\r\n                    var panel = new StackPanel { Margin = new Thickness(0.0, 12.0, 0.0, 0.0) };\r\n                    var messageBox = ShellViewModel.ShowCustomMessageBox(\r\n                        null, AppResources.PassportAddress,\r\n                        null, null,\r\n                        dismissed =>\r\n                        {\r\n\r\n                        },\r\n                        requiredProofTypes.Types.Count > 10 ?\r\n                        (object)new ScrollViewer { MaxHeight = 650.0, Content = panel, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled } :\r\n                        panel);\r\n\r\n                    for (var i = 0; i < requiredProofTypes.Types.Count; i++)\r\n                    {\r\n                        var requiredProofType = requiredProofTypes.Types[i] as TLSecureRequiredType;\r\n                        if (requiredProofType != null)\r\n                        {\r\n                            var listBoxItem = new ListBoxItem\r\n                            {\r\n                                Content =\r\n                                    new TextBlock\r\n                                    {\r\n                                        Text = SecureRequiredTypeToCaptionConverter.Convert(requiredProofType.Type),\r\n                                        FontSize = 27,\r\n                                        Margin = new Thickness(12.0)\r\n                                    },\r\n                                DataContext = requiredProofType\r\n                            };\r\n                            TiltEffect.SetIsTiltEnabled(listBoxItem, true);\r\n                            listBoxItem.Tap += (sender, args) =>\r\n                            {\r\n                                messageBox.Dismiss();\r\n                                var item = sender as ListBoxItem;\r\n                                if (item != null)\r\n                                {\r\n                                    requiredProofType = item.DataContext as TLSecureRequiredType;\r\n                                    if (requiredProofType != null)\r\n                                    {\r\n                                        secureRequiredType.SetSelectedDataProof(requiredProofType);\r\n                                        EditResidentialAddressInternal(secureRequiredType);\r\n                                    }\r\n                                }\r\n\r\n                            };\r\n\r\n                            panel.Children.Add(listBoxItem);\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    EditResidentialAddressInternal(secureRequiredType);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                EditResidentialAddressInternal(secureRequiredType);\r\n            }\r\n        }\r\n\r\n        private void EditResidentialAddressInternal(SecureRequiredType secureRequiredType)\r\n        {\r\n            StateService.SecureRequiredType = secureRequiredType;\r\n            StateService.AuthorizationForm = _authorizationForm;\r\n            StateService.Password = _passwordBase;\r\n            NavigationService.UriFor<ResidentialAddressViewModel>().Navigate();\r\n        }\r\n\r\n        public void EditPhoneNumber(SecureRequiredType secureRequiredType)\r\n        {\r\n            if (secureRequiredType == null) return;\r\n\r\n            if (secureRequiredType.IsCompleted)\r\n            {\r\n                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeletePhoneNumberAlert, AppResources.AppName,\r\n                    AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                    dismissed =>\r\n                    {\r\n                        if (dismissed == CustomMessageBoxResult.RightButton)\r\n                        {\r\n                            IsWorking = true;\r\n                            MTProtoService.DeleteSecureValueAsync(new TLVector<TLSecureValueTypeBase>{ new TLSecureValueTypePhone() },\r\n                                result => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n\r\n                                    for (var i = 0; i < _authorizationForm.Values.Count; i++)\r\n                                    {\r\n                                        if (PhoneNumberViewModel.IsValidType(_authorizationForm.Values[i].Type))\r\n                                        {\r\n                                            _authorizationForm.Values.RemoveAt(i--);\r\n                                        }\r\n                                    }\r\n\r\n                                    secureRequiredType.UpdateValue();\r\n                                }),\r\n                                error => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                }));\r\n                        }\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                StateService.SecureRequiredType = secureRequiredType;\r\n                StateService.AuthorizationForm = _authorizationForm;\r\n                StateService.Password = _passwordBase;\r\n                NavigationService.UriFor<PhoneNumberViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void EditEmail(SecureRequiredType secureRequiredType)\r\n        {\r\n            if (secureRequiredType == null) return;\r\n\r\n            if (secureRequiredType.IsCompleted)\r\n            {\r\n                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeleteEmailAlert, AppResources.AppName,\r\n                    AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                    dismissed =>\r\n                    {\r\n                        if (dismissed == CustomMessageBoxResult.RightButton)\r\n                        {\r\n                            IsWorking = true;\r\n                            MTProtoService.DeleteSecureValueAsync(new TLVector<TLSecureValueTypeBase> { new TLSecureValueTypeEmail() },\r\n                                result => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n\r\n                                    for (var i = 0; i < _authorizationForm.Values.Count; i++)\r\n                                    {\r\n                                        if (EmailViewModel.IsValidType(_authorizationForm.Values[i].Type))\r\n                                        {\r\n                                            _authorizationForm.Values.RemoveAt(i--);\r\n                                        }\r\n                                    }\r\n\r\n                                    secureRequiredType.UpdateValue();\r\n                                }),\r\n                                error => Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                }));\r\n                        }\r\n                    });\r\n            }\r\n            else\r\n            {\r\n                StateService.SecureRequiredType = secureRequiredType;\r\n                StateService.AuthorizationForm = _authorizationForm;\r\n                StateService.Password = _passwordBase;\r\n                NavigationService.UriFor<EmailViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void Edit(SecureRequiredType secureRequiredType)\r\n        {\r\n            TLSecureRequiredType requiredType = null;\r\n            var requiredTypeOneOf = secureRequiredType.DataProofRequiredType as TLSecureRequiredTypeOneOf;\r\n            if (requiredTypeOneOf != null)\r\n            {\r\n                var firstRequiredType = requiredTypeOneOf.Types.FirstOrDefault() as TLSecureRequiredType;\r\n                if (firstRequiredType != null)\r\n                {\r\n                    requiredType = firstRequiredType;\r\n                }\r\n            }\r\n\r\n            requiredType = requiredType ?? secureRequiredType.DataProofRequiredType as TLSecureRequiredType;\r\n            requiredType = requiredType ?? secureRequiredType.DataRequiredType ?? secureRequiredType.SelectedDataProofRequiredType;\r\n\r\n            if (requiredType != null)\r\n            {\r\n                if (PersonalDetailsViewModel.IsValidType(requiredType.Type))\r\n                {\r\n                    EditPersonalDetails(secureRequiredType);\r\n                    return;\r\n                }\r\n\r\n                if (ResidentialAddressViewModel.IsValidType(requiredType.Type))\r\n                {\r\n                    EditResidentialAddress(secureRequiredType);\r\n                    return;\r\n                }\r\n\r\n                if (PhoneNumberViewModel.IsValidType(requiredType.Type))\r\n                {\r\n                    EditPhoneNumber(secureRequiredType);\r\n                    return;\r\n                }\r\n\r\n                if (EmailViewModel.IsValidType(requiredType.Type))\r\n                {\r\n                    EditEmail(secureRequiredType);\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        public string Error { get; set; }\r\n\r\n        private bool HasErrors()\r\n        {\r\n            foreach (var requiredType in RequiredTypes)\r\n            {\r\n                if (!requiredType.IsCompleted)\r\n                {\r\n                    Error = \"REQUIRED_TYPE\";\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            Error = null;\r\n            NotifyOfPropertyChange(() => Error);\r\n            return false;\r\n        }\r\n\r\n        public void Authorize()\r\n        {\r\n            if (HasErrors())\r\n            {\r\n                return;\r\n            }\r\n\r\n            var password = _passwordBase as TLPassword;\r\n            if (password == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var passwordSettings = password.Settings as TLPasswordSettings81;\r\n            if (passwordSettings == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var credentialSecret = Utils.Passport.GenerateSecret(TLString.Empty);\r\n            \r\n            var credentials = Utils.Passport.GenerateSecureCredentialsEncrypted(RequiredTypes, _authorizationForm, credentialSecret, EnterPasswordViewModel.Secret);\r\n            if (credentials == null) return;\r\n\r\n            var valueHashes = Utils.Passport.GenerateValueHashes(RequiredTypes);\r\n\r\n            IsWorking = true;\r\n            MTProtoService.AcceptAuthorizationAsync(\r\n                _authorizationForm.BotId,\r\n                _authorizationForm.Scope,\r\n                _authorizationForm.PublicKey,\r\n                valueHashes,\r\n                credentials,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (!TLString.IsNullOrEmpty(_authorizationForm.CallbackUrl))\r\n                    {\r\n                        var uriBuilder = new UriBuilder(new Uri(_authorizationForm.CallbackUrl.ToString()));\r\n                        var query = TelegramUriMapper.ParseQueryString(uriBuilder.Query);\r\n                        query[\"tg_passport\"] = \"success\";\r\n                        var queryBuilder = new List<string>();\r\n                        foreach (var item in query)\r\n                        {\r\n                            queryBuilder.Add(string.Format(\"{0}={1}\", item.Key, item.Value));\r\n                        }\r\n                        uriBuilder.Query = string.Join(\"&\", queryBuilder);\r\n                        var url = uriBuilder.ToString();\r\n\r\n                        var task = new WebBrowserTask();\r\n                        task.URL = HttpUtility.UrlEncode(url);\r\n                        task.Show();\r\n                    }\r\n                    NavigationService.GoBack();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(\r\n                           \"account.acceptAuthorization\" + Environment.NewLine + error.Message,\r\n                           AppResources.AppName,\r\n                           AppResources.Ok);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        public bool IsCancelConfirmed { get; protected set; }\r\n\r\n        public void Cancel()\r\n        {\r\n            IsCancelConfirmed = true;\r\n\r\n            if (!TLString.IsNullOrEmpty(_authorizationForm.CallbackUrl))\r\n            {\r\n                var uriBuilder = new UriBuilder(new Uri(_authorizationForm.CallbackUrl.ToString()));\r\n                var query = TelegramUriMapper.ParseQueryString(uriBuilder.Query);\r\n                query[\"tg_passport\"] = \"cancel\";\r\n                var queryBuilder = new List<string>();\r\n                foreach (var item in query)\r\n                {\r\n                    queryBuilder.Add(string.Format(\"{0}={1}\", item.Key, item.Value));\r\n                }\r\n                uriBuilder.Query = string.Join(\"&\", queryBuilder);\r\n                var url = HttpUtility.UrlEncode(uriBuilder.ToString());\r\n\r\n                var handled = false;\r\n                ShellViewModel.ShowCustomMessageBox(\r\n                    string.Format(AppResources.OpenUrlConfirmation, HttpUtility.UrlDecode(url)),\r\n                    AppResources.AppName,\r\n                    AppResources.Ok,\r\n                    AppResources.Cancel,\r\n                    dismissed =>\r\n                    {\r\n                        if (handled)\r\n                        {\r\n                            return;\r\n                        }\r\n\r\n                        handled = true;\r\n                        if (dismissed == CustomMessageBoxResult.RightButton)\r\n                        {\r\n                            var task = new WebBrowserTask();\r\n                            task.URL = url;\r\n                            task.Show();\r\n                            NavigationService.GoBack();\r\n                        }\r\n                        else\r\n                        {\r\n                            BeginOnUIThread(TimeSpan.FromSeconds(0.15), () =>\r\n                            {\r\n                                NavigationService.GoBack();\r\n                            });\r\n                        }\r\n                    });\r\n            }\r\n        }\r\n    }\r\n\r\n    public class SecureRequiredType : PropertyChangedBase\r\n    {\r\n        public string Caption\r\n        {\r\n            get\r\n            {\r\n                TLSecureRequiredType requiredType = null;\r\n\r\n                var requiredTypeOneOf = DataProofRequiredType as TLSecureRequiredTypeOneOf;\r\n                if (requiredTypeOneOf != null && requiredTypeOneOf.Types.Count > 0)\r\n                {\r\n                    if (requiredTypeOneOf.Types.Count == 1)\r\n                    {\r\n                        requiredType = requiredTypeOneOf.Types[0] as TLSecureRequiredType;\r\n                        if (requiredType != null)\r\n                        {\r\n                            return SecureRequiredTypeToCaptionConverter.Convert(requiredType.Type);\r\n                        }\r\n                    }\r\n                    else if (requiredTypeOneOf.Types.Count == 2)\r\n                    {\r\n                        requiredType = requiredTypeOneOf.Types[0] as TLSecureRequiredType;\r\n                        var requiredType2 = requiredTypeOneOf.Types[1] as TLSecureRequiredType;\r\n                        if (requiredType != null && requiredType2 != null)\r\n                        {\r\n                            return string.Format(AppResources.PassportOr, SecureRequiredTypeToCaptionConverter.Convert(requiredType.Type), SecureRequiredTypeToCaptionConverter.Convert(requiredType2.Type));\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        requiredType = requiredTypeOneOf.Types[0] as TLSecureRequiredType;\r\n                        if (requiredType != null)\r\n                        {\r\n                            if (PersonalDetailsViewModel.IsValidType(requiredType.Type))\r\n                            {\r\n                                return AppResources.PassportIdentityDocument;\r\n                            }\r\n                            if (ResidentialAddressViewModel.IsValidType(requiredType.Type))\r\n                            {\r\n                                return AppResources.PassportResidentialAddress;\r\n                            }\r\n                            if (PhoneNumberViewModel.IsValidType(requiredType.Type))\r\n                            {\r\n                                return AppResources.PassportPhoneNumber;\r\n                            }\r\n                            if (EmailViewModel.IsValidType(requiredType.Type))\r\n                            {\r\n                                return AppResources.PassportEmail;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                requiredType = DataProofRequiredType as TLSecureRequiredType;\r\n                if (requiredType != null)\r\n                {\r\n                    return SecureRequiredTypeToCaptionConverter.Convert(requiredType.Type);\r\n                }\r\n\r\n                requiredType = DataRequiredType as TLSecureRequiredType;\r\n                if (requiredType != null)\r\n                {\r\n                    return SecureRequiredTypeToCaptionConverter.Convert(requiredType.Type);\r\n                }\r\n\r\n#if DEBUG\r\n                return DataRequiredType != null ? DataRequiredType.ToString() : null;\r\n#endif\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public string Hint\r\n        {\r\n            get\r\n            {\r\n                if (DataValue != null)\r\n                {\r\n                    return SecureValueToHintConverter.Convert(DataValue);\r\n                }\r\n\r\n                if (DataProofValue != null)\r\n                {\r\n                    return SecureValueToHintConverter.Convert(DataProofValue);\r\n                }\r\n\r\n                TLSecureRequiredType requiredType = null;\r\n\r\n                var requiredTypeOneOf = DataProofRequiredType as TLSecureRequiredTypeOneOf;\r\n                if (requiredTypeOneOf != null && requiredTypeOneOf.Types.Count > 0)\r\n                {\r\n                    if (requiredTypeOneOf.Types.Count == 1)\r\n                    {\r\n                        requiredType = requiredTypeOneOf.Types[0] as TLSecureRequiredType;\r\n                        if (requiredType != null)\r\n                        {\r\n                            return SecureRequiredTypeToHintConverter.Convert(requiredType.Type);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        requiredType = requiredTypeOneOf.Types[0] as TLSecureRequiredType;\r\n                        if (requiredType != null)\r\n                        {\r\n                            if (PersonalDetailsViewModel.IsValidType(requiredType.Type))\r\n                            {\r\n                                return AppResources.PassportIdentityDocumentInfo;\r\n                            }\r\n                            if (ResidentialAddressViewModel.IsValidType(requiredType.Type))\r\n                            {\r\n                                return AppResources.PassportAddressInfo;\r\n                            }\r\n                            if (PhoneNumberViewModel.IsValidType(requiredType.Type))\r\n                            {\r\n                                return AppResources.PassportPhoneInfo;\r\n                            }\r\n                            if (EmailViewModel.IsValidType(requiredType.Type))\r\n                            {\r\n                                return AppResources.PassportEmailInfo;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                requiredType = DataProofRequiredType as TLSecureRequiredType;\r\n                if (requiredType != null)\r\n                {\r\n                    return SecureRequiredTypeToHintConverter.Convert(requiredType.Type);\r\n                }\r\n\r\n                requiredType = DataRequiredType as TLSecureRequiredType;\r\n                if (requiredType != null)\r\n                {\r\n                    return SecureRequiredTypeToHintConverter.Convert(requiredType.Type);\r\n                }\r\n\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        public string Error\r\n        {\r\n            get\r\n            {\r\n                if (DataRequiredType != null && PersonalDetailsViewModel.IsValidType(DataRequiredType.Type))\r\n                {\r\n                    var error = GetFirstOrDefaultError(AuthorizationForm.Errors.Where(x => PersonalDetailsViewModel.IsValidDataType(x.Type)));\r\n                    \r\n                    return error != null ? error.Text.ToString() : null;\r\n                }\r\n                if (SelectedDataProofRequiredType != null && PersonalDetailsViewModel.IsValidType(SelectedDataProofRequiredType.Type))\r\n                {\r\n                    var error = GetFirstOrDefaultError(AuthorizationForm.Errors.Where(x => PersonalDetailsViewModel.IsValidProofType(x.Type)));\r\n\r\n                    return error != null ? error.Text.ToString() : null;\r\n                }\r\n                if (DataRequiredType != null && ResidentialAddressViewModel.IsValidType(DataRequiredType.Type))\r\n                {\r\n                    var error = GetFirstOrDefaultError(AuthorizationForm.Errors.Where(x => ResidentialAddressViewModel.IsValidDataType(x.Type)));\r\n\r\n                    return error != null ? error.Text.ToString() : null;\r\n                }\r\n                if (SelectedDataProofRequiredType != null && ResidentialAddressViewModel.IsValidType(SelectedDataProofRequiredType.Type))\r\n                {\r\n                    var error = GetFirstOrDefaultError(AuthorizationForm.Errors.Where(x => ResidentialAddressViewModel.IsValidProofType(x.Type)));\r\n\r\n                    return error != null ? error.Text.ToString() : null;\r\n                }\r\n                if (DataRequiredType != null && PhoneNumberViewModel.IsValidType(DataRequiredType.Type))\r\n                {\r\n                    var error = GetFirstOrDefaultError(AuthorizationForm.Errors.Where(x => PhoneNumberViewModel.IsValidType(x.Type)));\r\n\r\n                    return error != null ? error.Text.ToString() : null;\r\n                }\r\n                if (DataRequiredType != null && EmailViewModel.IsValidType(DataRequiredType.Type))\r\n                {\r\n                    var error = GetFirstOrDefaultError(AuthorizationForm.Errors.Where(x => EmailViewModel.IsValidType(x.Type)));\r\n\r\n                    return error != null ? error.Text.ToString() : null;\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public bool IsCompleted\r\n        {\r\n            get\r\n            {\r\n                var dataRequiredType = DataRequiredType;\r\n                var dataProofRequiredType = DataProofRequiredType;\r\n                var selectedDataProofRequiredType = SelectedDataProofRequiredType;\r\n\r\n                if (dataRequiredType != null)\r\n                {\r\n                    if (PersonalDetailsViewModel.IsValidDataType(dataRequiredType.Type))\r\n                    {\r\n                        if (DataValue == null)\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        if (dataRequiredType.NativeNames)\r\n                        {\r\n                            var personalDetails = DataValue.Data.DecryptedData as PersonalDetailsRootObject;\r\n                            if (personalDetails != null)\r\n                            {\r\n                                if (string.IsNullOrEmpty(personalDetails.first_name_native)) return false;\r\n                                if (string.IsNullOrEmpty(personalDetails.last_name_native)) return false;\r\n                            }\r\n                        }\r\n\r\n                        var error = AuthorizationForm.Errors.FirstOrDefault(x => PersonalDetailsViewModel.IsValidDataType(x.Type));\r\n                        if (error != null)\r\n                        {\r\n                            return false;\r\n                        }\r\n                    }\r\n                    else if (ResidentialAddressViewModel.IsValidDataType(dataRequiredType.Type))\r\n                    {\r\n                        if (DataValue == null)\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        var error = AuthorizationForm.Errors.FirstOrDefault(x => ResidentialAddressViewModel.IsValidDataType(x.Type));\r\n                        if (error != null)\r\n                        {\r\n                            return false;\r\n                        }\r\n                    }\r\n                    else if (PhoneNumberViewModel.IsValidType(dataRequiredType.Type))\r\n                    {\r\n                        if (DataValue != null)\r\n                        {\r\n                            var plainData = DataValue.PlainData as TLSecurePlainPhone;\r\n                            if (plainData != null && !TLString.IsNullOrEmpty(plainData.Phone))\r\n                            {\r\n                                return true;\r\n                            }\r\n                        }\r\n\r\n                        return false;\r\n                    }\r\n                    else if (EmailViewModel.IsValidType(dataRequiredType.Type))\r\n                    {\r\n                        if (DataValue != null)\r\n                        {\r\n                            var plainData = DataValue.PlainData as TLSecurePlainEmail;\r\n                            if (plainData != null && !TLString.IsNullOrEmpty(plainData.Email))\r\n                            {\r\n                                return true;\r\n                            }\r\n                        }\r\n\r\n                        return false;\r\n                    }\r\n                }\r\n\r\n                if (dataProofRequiredType != null && selectedDataProofRequiredType == null)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                if (selectedDataProofRequiredType != null)\r\n                {\r\n                    if (PersonalDetailsViewModel.IsValidProofType(selectedDataProofRequiredType.Type))\r\n                    {\r\n                        if (DataProofValue == null)\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        if (selectedDataProofRequiredType.SelfieRequired && DataProofValue.Selfie == null)\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        if (selectedDataProofRequiredType.TranslationRequired && (DataProofValue.Translation == null || DataProofValue.Translation.Count == 0))\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        var error = AuthorizationForm.Errors.FirstOrDefault(x => PersonalDetailsViewModel.IsValidProofType(x.Type));\r\n                        if (error != null)\r\n                        {\r\n                            return false;\r\n                        }\r\n                    }\r\n                    else if (ResidentialAddressViewModel.IsValidProofType(selectedDataProofRequiredType.Type))\r\n                    {\r\n                        if (DataProofValue == null)\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        if (selectedDataProofRequiredType.SelfieRequired && DataProofValue.Selfie == null)\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        if (selectedDataProofRequiredType.TranslationRequired && (DataProofValue.Translation == null || DataProofValue.Translation.Count == 0))\r\n                        {\r\n                            return false;\r\n                        }\r\n\r\n                        var error = AuthorizationForm.Errors.FirstOrDefault(x => ResidentialAddressViewModel.IsValidProofType(x.Type));\r\n                        if (error != null)\r\n                        {\r\n                            return false;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return true;\r\n            }\r\n        }\r\n\r\n        public TLSecureRequiredType DataRequiredType { get; protected set; }\r\n\r\n        public TLSecureValue85 DataValue { get; protected set; }\r\n\r\n        public TLSecureRequiredTypeBase DataProofRequiredType { get; protected set; }\r\n\r\n        public TLSecureRequiredType SelectedDataProofRequiredType { get; protected set; }\r\n\r\n        public TLSecureValue85 DataProofValue { get; protected set; }\r\n\r\n        public TLAuthorizationForm85 AuthorizationForm { get; protected set; }\r\n\r\n        public SecureRequiredType(TLSecureRequiredType dataRequiredType, TLSecureRequiredTypeBase dataProofRequiredType, TLAuthorizationForm85 authorizationForm)\r\n        {\r\n            AuthorizationForm = authorizationForm;\r\n\r\n            SetData(dataRequiredType);\r\n            SetDataProof(dataProofRequiredType);\r\n        }\r\n\r\n        private static TLSecureValueErrorBase GetFirstOrDefaultError(IEnumerable<TLSecureValueErrorBase> errors)\r\n        {\r\n            if (errors == null) return null;\r\n\r\n            return errors.OrderBy(x => x.Priority).FirstOrDefault();\r\n        }\r\n\r\n        public void SetData(TLSecureRequiredType dataRequiredType)\r\n        {\r\n            DataRequiredType = dataRequiredType;\r\n            DataValue = GetValue(dataRequiredType, AuthorizationForm);\r\n        }\r\n\r\n        public void SetDataProof(TLSecureRequiredTypeBase dataProofRequiredTypeBase)\r\n        {\r\n            DataProofRequiredType = dataProofRequiredTypeBase;\r\n            DataProofValue = GetValue(dataProofRequiredTypeBase, AuthorizationForm);\r\n\r\n            if (DataProofValue != null)\r\n            {\r\n                var dataProofRequiredType = dataProofRequiredTypeBase as TLSecureRequiredType;\r\n                var dataProofRequiredTypeOneOf = dataProofRequiredTypeBase as TLSecureRequiredTypeOneOf;\r\n                if (dataProofRequiredType != null)\r\n                {\r\n                    SetSelectedDataProof(dataProofRequiredType);\r\n                }\r\n                else if (dataProofRequiredTypeOneOf != null)\r\n                {\r\n                    foreach (var type in dataProofRequiredTypeOneOf.Types.OfType<TLSecureRequiredType>())\r\n                    {\r\n                        if (DataProofValue.Type.GetType() == type.Type.GetType())\r\n                        {\r\n                            SetSelectedDataProof(type);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            else if (DataProofRequiredType is TLSecureRequiredType)\r\n            {\r\n                SelectedDataProofRequiredType = (TLSecureRequiredType)DataProofRequiredType;\r\n            }\r\n        }\r\n\r\n        public void SetSelectedDataProof(TLSecureRequiredType selectedDataProofRequiredType)\r\n        {\r\n            SelectedDataProofRequiredType = selectedDataProofRequiredType;\r\n        }\r\n\r\n        private static TLSecureValue85 GetValue(TLSecureRequiredTypeBase requiredTypeBase, TLAuthorizationForm85 authorizationForm)\r\n        {\r\n            if (requiredTypeBase == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            if (authorizationForm.Values.Count > 0)\r\n            {\r\n                var requiredType = requiredTypeBase as TLSecureRequiredType;\r\n                if (requiredType != null)\r\n                {\r\n                    return authorizationForm.Values.FirstOrDefault(x => requiredType.Type.GetType() == x.Type.GetType()) as TLSecureValue85;\r\n                }\r\n\r\n                var requiredTypeOneOf = requiredTypeBase as TLSecureRequiredTypeOneOf;\r\n                if (requiredTypeOneOf != null)\r\n                {\r\n                    var dict = new Dictionary<Type, Type>();\r\n                    foreach (var type in requiredTypeOneOf.Types.OfType<TLSecureRequiredType>())\r\n                    {\r\n                        dict[type.Type.GetType()] = type.Type.GetType();\r\n                    }\r\n\r\n                    return authorizationForm.Values.FirstOrDefault(x => dict.ContainsKey(x.Type.GetType())) as TLSecureValue85;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public void UpdateValue()\r\n        {\r\n            DataValue = GetValue(DataRequiredType, AuthorizationForm);\r\n            DataProofValue = GetValue(DataProofRequiredType, AuthorizationForm);\r\n\r\n            NotifyOfPropertyChange(() => Hint);\r\n            NotifyOfPropertyChange(() => Error);\r\n            NotifyOfPropertyChange(() => IsCompleted);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Passport/PasswordIntroViewModel.cs",
    "content": "﻿using System.Collections.Generic;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Passport\r\n{\r\n    public class PasswordIntroViewModel : ViewModelBase\r\n    {\r\n        private readonly TLPasswordBase _passwordBase;\r\n\r\n        private readonly TLAuthorizationForm _authorizationForm;\r\n\r\n        private readonly IList<TLSecureValue> _secureValues;\r\n\r\n        public PasswordIntroViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _passwordBase = StateService.Password;\r\n            StateService.Password = null;\r\n\r\n            _authorizationForm = StateService.AuthorizationForm;\r\n            StateService.AuthorizationForm = null;\r\n\r\n            _secureValues = StateService.SecureValues;\r\n            StateService.SecureValues = null;\r\n        }\r\n\r\n        public void CreatePassword()\r\n        {\r\n            StateService.RemoveBackEntry = true;\r\n            StateService.Password = _passwordBase;\r\n            StateService.AuthorizationForm = _authorizationForm;\r\n            StateService.SecureValues = _secureValues;\r\n            NavigationService.UriFor<ChangePasswordViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Passport/PersonalDetailsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Runtime.Serialization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing Windows.Data.Json;\r\nusing Windows.Storage;\r\nusing Windows.Storage.Pickers;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Controls.Primitives;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views.Additional;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Passport;\r\n\r\nnamespace TelegramClient.ViewModels.Passport\r\n{\r\n    public class PersonalDetailsViewModel : ViewModelBase, Telegram.Api.Aggregator.IHandle<UploadableItem>, Telegram.Api.Aggregator.IHandle<UploadProgressChangedEventArgs>\r\n    {\r\n        public ObservableCollection<string> Errors { get; protected set; }\r\n\r\n        public string DataProofCaption\r\n        {\r\n            get\r\n            {\r\n                return _authorizationForm != null\r\n                    ? AppResources.PassportRequiredDocuments\r\n                    : AppResources.PassportDocuments;\r\n            }\r\n        }\r\n\r\n        private string _firstNameNative;\r\n\r\n        public string FirstNameNative\r\n        {\r\n            get { return _firstNameNative; }\r\n            set\r\n            {\r\n                if (_firstNameNative != value)\r\n                {\r\n                    _firstNameNative = value;\r\n\r\n                    if (!string.IsNullOrEmpty(FirstNameNativeError))\r\n                    {\r\n                        FirstNameNativeError = null;\r\n                        NotifyOfPropertyChange(() => FirstNameNativeError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string FirstNameNativeHint\r\n        {\r\n            get { return _selectedResidenceCountry != null ? string.Format(AppResources.PassportNameCountry, _selectedResidenceCountry.Name) : null; }\r\n        }\r\n\r\n        public string FirstNameNativeError { get; set; }\r\n\r\n        private string _middleNameNative;\r\n\r\n        public string MiddleNameNative\r\n        {\r\n            get { return _middleNameNative; }\r\n            set\r\n            {\r\n                if (_middleNameNative != value)\r\n                {\r\n                    _middleNameNative = value;\r\n\r\n                    if (!string.IsNullOrEmpty(MiddleNameNativeError))\r\n                    {\r\n                        MiddleNameNativeError = null;\r\n                        NotifyOfPropertyChange(() => MiddleNameNativeError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string MiddleNameNativeHint\r\n        {\r\n            get { return _selectedResidenceCountry != null ? string.Format(AppResources.PassportMidnameCountry, _selectedResidenceCountry.Name) : null; }\r\n        }\r\n\r\n        public string MiddleNameNativeError { get; set; }\r\n\r\n        private string _lastNameNative;\r\n\r\n        public string LastNameNative\r\n        {\r\n            get { return _lastNameNative; }\r\n            set\r\n            {\r\n                if (_lastNameNative != value)\r\n                {\r\n                    _lastNameNative = value;\r\n\r\n                    if (!string.IsNullOrEmpty(LastNameNativeError))\r\n                    {\r\n                        LastNameNativeError = null;\r\n                        NotifyOfPropertyChange(() => LastNameNativeError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string LastNameNativeHint\r\n        {\r\n            get\r\n            {\r\n                return _selectedResidenceCountry != null ? string.Format(AppResources.PassportSurnameCountry, _selectedResidenceCountry.Name) : null;\r\n            }\r\n        }\r\n\r\n        public string LastNameNativeError { get; set; }\r\n\r\n        public string PassportNativeFooter\r\n        {\r\n            get { return _selectedResidenceCountry != null ? string.Format(AppResources.PassportNativeInfo, _selectedResidenceCountry.Name) : null; }\r\n        }\r\n\r\n        private string _firstName;\r\n\r\n        public string FirstName\r\n        {\r\n            get { return _firstName; }\r\n            set\r\n            {\r\n                if (_firstName != value)\r\n                {\r\n                    _firstName = value;\r\n\r\n                    if (!Utils.Passport.IsValidName(_firstName))\r\n                    {\r\n                        FirstNameError = AppResources.PassportUseLatinOnly;\r\n                        NotifyOfPropertyChange(() => FirstNameError);\r\n                    }\r\n                    else if (!string.IsNullOrEmpty(FirstNameError))\r\n                    {\r\n                        FirstNameError = null;\r\n                        NotifyOfPropertyChange(() => FirstNameError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string FirstNameHint\r\n        {\r\n            get { return IsDataNativeNamesEnabled ? AppResources.PassportNameLatin : AppResources.PassportName; }\r\n        }\r\n\r\n        public string FirstNameError { get; set; }\r\n\r\n        private string _middleName;\r\n\r\n        public string MiddleName\r\n        {\r\n            get { return _middleName; }\r\n            set\r\n            {\r\n                if (_middleName != value)\r\n                {\r\n                    _middleName = value;\r\n                    if (!Utils.Passport.IsValidName(_middleName))\r\n                    {\r\n                        MiddleNameError = AppResources.PassportUseLatinOnly;\r\n                        NotifyOfPropertyChange(() => MiddleNameError);\r\n                    }\r\n                    else if (!string.IsNullOrEmpty(MiddleNameError))\r\n                    {\r\n                        MiddleNameError = null;\r\n                        NotifyOfPropertyChange(() => MiddleNameError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string MiddleNameHint\r\n        {\r\n            get { return IsDataNativeNamesEnabled ? AppResources.PassportMidnameLatin : AppResources.PassportMidname; }\r\n        }\r\n\r\n        public string MiddleNameError { get; set; }\r\n\r\n        private string _lastName;\r\n\r\n        public string LastName\r\n        {\r\n            get { return _lastName; }\r\n            set\r\n            {\r\n                if (_lastName != value)\r\n                {\r\n                    _lastName = value;\r\n                    if (!Utils.Passport.IsValidName(_lastName))\r\n                    {\r\n                        LastNameError = AppResources.PassportUseLatinOnly;\r\n                        NotifyOfPropertyChange(() => LastNameError);\r\n                    }\r\n                    else if (!string.IsNullOrEmpty(LastNameError))\r\n                    {\r\n                        LastNameError = null;\r\n                        NotifyOfPropertyChange(() => LastNameError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string LastNameHint\r\n        {\r\n            get { return IsDataNativeNamesEnabled ? AppResources.PassportSurnameLatin : AppResources.PassportSurname; }\r\n        }\r\n\r\n        public string LastNameError { get; set; }\r\n\r\n        private string _birthDate;\r\n\r\n        public string BirthDate\r\n        {\r\n            get { return _birthDate; }\r\n            set\r\n            {\r\n                if (_birthDate != value)\r\n                {\r\n                    _birthDate = value;\r\n                    if (!string.IsNullOrEmpty(BirthDateError))\r\n                    {\r\n                        BirthDateError = null;\r\n                        NotifyOfPropertyChange(() => BirthDateError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string BirthDateError { get; set; }\r\n\r\n        private string _gender;\r\n\r\n        public string Gender\r\n        {\r\n            get { return _gender; }\r\n            set\r\n            {\r\n                if (_gender != value)\r\n                {\r\n                    _gender = value;\r\n                    if (!string.IsNullOrEmpty(GenderError))\r\n                    {\r\n                        GenderError = null;\r\n                        NotifyOfPropertyChange(() => GenderError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string GenderError { get; set; }\r\n\r\n        private Country _selectedCountry;\r\n\r\n        public Country SelectedCountry\r\n        {\r\n            get { return _selectedCountry; }\r\n            set\r\n            {\r\n                if (_selectedCountry != value)\r\n                {\r\n                    SetField(ref _selectedCountry, value, () => SelectedCountry);\r\n                    if (!string.IsNullOrEmpty(SelectedCountryError))\r\n                    {\r\n                        SelectedCountryError = null;\r\n                        NotifyOfPropertyChange(() => SelectedCountryError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string SelectedCountryError { get; set; }\r\n\r\n        private Country _selectedResidenceCountry;\r\n\r\n        public Country SelectedResidenceCountry\r\n        {\r\n            get { return _selectedResidenceCountry; }\r\n            set\r\n            {\r\n                if (_selectedResidenceCountry != value)\r\n                {\r\n                    SetField(ref _selectedResidenceCountry, value, () => SelectedResidenceCountry);\r\n\r\n                    NotifyOfPropertyChange(() => IsDataNativeNamesVisible);\r\n                    NotifyOfPropertyChange(() => FirstNameNativeHint);\r\n                    NotifyOfPropertyChange(() => MiddleNameNativeHint);\r\n                    NotifyOfPropertyChange(() => LastNameNativeHint);\r\n                    NotifyOfPropertyChange(() => PassportNativeFooter);\r\n\r\n                    if (!string.IsNullOrEmpty(SelectedResidenceCountryError))\r\n                    {\r\n                        SelectedResidenceCountryError = null;\r\n                        NotifyOfPropertyChange(() => SelectedResidenceCountryError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string SelectedResidenceCountryError { get; set; }\r\n\r\n        private string _documentNumber;\r\n\r\n        public string DocumentNumber\r\n        {\r\n            get { return _documentNumber; }\r\n            set\r\n            {\r\n                if (_documentNumber != value)\r\n                {\r\n                    _documentNumber = value;\r\n                    if (!string.IsNullOrEmpty(DocumentNumberError))\r\n                    {\r\n                        DocumentNumberError = null;\r\n                        NotifyOfPropertyChange(() => DocumentNumberError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string DocumentNumberError { get; set; }\r\n\r\n        private string _expiryDate;\r\n\r\n        public string ExpiryDate\r\n        {\r\n            get { return _expiryDate; }\r\n            set\r\n            {\r\n                if (_expiryDate != value)\r\n                {\r\n                    _expiryDate = value;\r\n                    if (!string.IsNullOrEmpty(ExpiryDateError))\r\n                    {\r\n                        ExpiryDateError = null;\r\n                        NotifyOfPropertyChange(() => ExpiryDateError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string ExpiryDateError { get; set; }\r\n\r\n        public string TranslationsError { get; set; }\r\n\r\n        public TLRPCError Error { get; set; }\r\n\r\n        public string Caption\r\n        {\r\n            get\r\n            {\r\n                if (_secureType != null)\r\n                {\r\n                    return SecureRequiredTypeToCaptionConverter.Convert(_secureType);\r\n                }\r\n                if (_dataProofValue != null)\r\n                {\r\n                    return SecureRequiredTypeToCaptionConverter.Convert(_dataProofValue.Type);\r\n                }\r\n                if (_dataValue != null)\r\n                {\r\n                    return SecureRequiredTypeToCaptionConverter.Convert(_dataValue.Type);\r\n                }\r\n                if (_secureRequiredType != null)\r\n                {\r\n                    var type = _secureRequiredType.SelectedDataProofRequiredType;\r\n                    if (type != null)\r\n                    {\r\n                        return SecureRequiredTypeToCaptionConverter.Convert(type.Type);\r\n                    }\r\n                }\r\n                //if (_authorizationForm != null)\r\n                //{\r\n                //    var type = _authorizationForm.RequiredTypes.FirstOrDefault(IsValidProofType);\r\n                //    if (type != null)\r\n                //    {\r\n                //        return SecureRequiredTypeToCaptionConverter.Convert(type);\r\n                //    }\r\n                //}\r\n\r\n                return AppResources.PassportResidentialAddress;\r\n            }\r\n        }\r\n\r\n        public string DeleteCommand\r\n        {\r\n            get\r\n            {\r\n                if (_dataValue != null && _dataProofValue == null)\r\n                {\r\n                    return AppResources.PassportDelete;\r\n                }\r\n\r\n                return AppResources.PassportDeleteDocument;\r\n            }\r\n        }\r\n\r\n        public TLSecureFileBase FrontSide { get; set; }\r\n\r\n        public string FrontSideError { get; set; }\r\n\r\n        public string FrontSideTitle\r\n        {\r\n            get\r\n            {\r\n                TLSecureValueTypeBase type = null;\r\n                if (_secureType != null)\r\n                {\r\n                    type = _secureType;\r\n                }\r\n                if (_dataProofValue != null)\r\n                {\r\n                    type = _dataProofValue.Type;\r\n                }\r\n\r\n                if (type is TLSecureValueTypePassport\r\n                    || type is TLSecureValueTypeInternalPassport)\r\n                {\r\n                    return AppResources.PassportMainPage;\r\n                }\r\n\r\n                return AppResources.PassportFrontSide;\r\n            }\r\n        }\r\n\r\n        public string FrontSideSubtitle\r\n        {\r\n            get\r\n            {\r\n                TLSecureValueTypeBase type = null;\r\n                if (_secureType != null)\r\n                {\r\n                    type = _secureType;\r\n                }\r\n                if (_dataProofValue != null)\r\n                {\r\n                    type = _dataProofValue.Type;\r\n                }\r\n\r\n                if (type is TLSecureValueTypePassport\r\n                    || type is TLSecureValueTypeInternalPassport)\r\n                {\r\n                    return AppResources.PassportMainPageInfo;\r\n                }\r\n\r\n                return AppResources.PassportFrontSideInfo;\r\n            }\r\n        }\r\n\r\n        public TLSecureFileBase ReverseSide { get; set; }\r\n\r\n        public string ReverseSideError { get; set; }\r\n\r\n        public TLSecureFileBase Selfie { get; set; }\r\n\r\n        public string SelfieError { get; set; }\r\n\r\n        public IEnumerable<TLSecureFileBase> GetFiles()\r\n        {\r\n            if (FrontSide != null) yield return FrontSide;\r\n            if (ReverseSide != null) yield return ReverseSide;\r\n            if (Selfie != null) yield return Selfie;\r\n\r\n            foreach (var file in Translations)\r\n            {\r\n                yield return file;\r\n            }\r\n        }\r\n\r\n        public string AttachTranslationHint\r\n        {\r\n            get\r\n            {\r\n                TLSecureValueTypeBase type = null;\r\n                if (_secureType != null)\r\n                {\r\n                    type = _secureType;\r\n                }\r\n                else if (_dataProofValue != null)\r\n                {\r\n                    type = _dataProofValue.Type;\r\n                }\r\n                else if (_secureRequiredType != null && _secureRequiredType.SelectedDataProofRequiredType != null)\r\n                {\r\n                    type = _secureRequiredType.SelectedDataProofRequiredType.Type;\r\n                }\r\n                //else if (_authorizationForm != null)\r\n                //{\r\n                //    type = _authorizationForm.RequiredTypes.FirstOrDefault(IsValidProofType);\r\n                //}\r\n\r\n                if (type != null)\r\n                {\r\n                    if (type is TLSecureValueTypeDriverLicense)\r\n                    {\r\n                        return AppResources.PassportAddTranslationDriverLicenceInfo;\r\n                    }\r\n                    if (type is TLSecureValueTypeIdentityCard)\r\n                    {\r\n                        return AppResources.PassportAddTranslationIdentityCardInfo;\r\n                    }\r\n                    if (type is TLSecureValueTypeInternalPassport)\r\n                    {\r\n                        return AppResources.PassportAddTranslationInternalPassportInfo;\r\n                    }\r\n                    if (type is TLSecureValueTypePassport)\r\n                    {\r\n                        return AppResources.PassportAddTranslationPassportInfo;\r\n                    }\r\n                }\r\n\r\n                return AppResources.PassportAddTranslationUploadInfo;\r\n            }\r\n        }\r\n\r\n        public string AttachDocumentCommand\r\n        {\r\n            get\r\n            {\r\n                if (Translations.Count > 0)\r\n                {\r\n                    return AppResources.PassportUploadAdditinalDocument;\r\n                }\r\n\r\n                return AppResources.PassportUploadDocument;\r\n            }\r\n        }\r\n\r\n        public ObservableCollection<TLSecureFileBase> Translations { get; set; }\r\n\r\n        public bool IsFileUploading\r\n        {\r\n            get\r\n            {\r\n                foreach (var file in GetFiles())\r\n                {\r\n                    if (file.UploadingProgress > 0.0 && file.UploadingProgress < 1.0)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsDataProofEnabled\r\n        {\r\n            get\r\n            {\r\n                if (_secureRequiredType != null && _secureRequiredType.SelectedDataProofRequiredType != null)\r\n                {\r\n                    return IsValidProofType(_secureRequiredType.SelectedDataProofRequiredType.Type);\r\n                }\r\n                //if (_authorizationForm != null)\r\n                //{\r\n                //    return _authorizationForm.RequiredTypes.Any(IsValidProofType);\r\n                //}\r\n                if (_secureType != null)\r\n                {\r\n                    return IsValidProofType(_secureType);\r\n                }\r\n\r\n                return _dataProofValue != null;\r\n            }\r\n        }\r\n\r\n        public bool IsDataProofReverseEnabled\r\n        {\r\n            get\r\n            {\r\n                if (_secureRequiredType != null && _secureRequiredType.SelectedDataProofRequiredType != null)\r\n                {\r\n                    return IsValidReversedProofType(_secureRequiredType.SelectedDataProofRequiredType.Type);\r\n                }\r\n                if (_dataProofValue != null)\r\n                {\r\n                    return IsValidReversedProofType(_dataProofValue.Type);\r\n                }\r\n                if (_secureType != null)\r\n                {\r\n                    return IsValidReversedProofType(_secureType);\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsDataProofSelfieEnabled\r\n        {\r\n            get\r\n            {\r\n                if (_secureRequiredType != null && _secureRequiredType.SelectedDataProofRequiredType != null)\r\n                {\r\n                    return _secureRequiredType.SelectedDataProofRequiredType.SelfieRequired;\r\n                }\r\n                if (_secureType != null)\r\n                {\r\n                    return true;\r\n                }\r\n                if (_dataProofValue != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsDataProofTranslationEnabled\r\n        {\r\n            get\r\n            {\r\n                if (_secureRequiredType != null && _secureRequiredType.SelectedDataProofRequiredType != null)\r\n                {\r\n                    return _secureRequiredType.SelectedDataProofRequiredType.TranslationRequired;\r\n                }\r\n                if (_secureType != null)\r\n                {\r\n                    return true;\r\n                }\r\n                if (_dataProofValue != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsDataEnabled\r\n        {\r\n            get\r\n            {\r\n                if (_secureRequiredType != null)\r\n                {\r\n                    return _secureRequiredType.DataRequiredType != null;\r\n                }\r\n                //if (_authorizationForm != null)\r\n                //{\r\n                //    return _authorizationForm.RequiredTypes.Any(IsValidDataType);\r\n                //}\r\n                if (_secureType != null)\r\n                {\r\n                    return IsValidDataType(_secureType);\r\n                }\r\n\r\n                return _dataValue != null;\r\n            }\r\n        }\r\n\r\n        public bool IsDataNativeNamesEnabled\r\n        {\r\n            get\r\n            {\r\n                if (_secureRequiredType != null && _secureRequiredType.DataRequiredType != null)\r\n                {\r\n                    return _secureRequiredType.DataRequiredType.NativeNames;\r\n                }\r\n                \r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsDataNativeNamesVisible\r\n        {\r\n            get\r\n            {\r\n                if (IsDataNativeNamesEnabled)\r\n                {\r\n                    if (!string.IsNullOrEmpty(FirstNameNativeError)) return true;\r\n                    if (!string.IsNullOrEmpty(MiddleNameNativeError)) return true;\r\n                    if (!string.IsNullOrEmpty(LastNameNativeError)) return true;\r\n\r\n                    IJsonValue langCode;\r\n                    if (_secureRequiredType != null\r\n                        && _secureRequiredType.AuthorizationForm != null\r\n                        && _secureRequiredType.AuthorizationForm.Config != null\r\n                        && _secureRequiredType.AuthorizationForm.Config.CountriesLangsObject != null\r\n                        && _selectedResidenceCountry != null\r\n                        && _secureRequiredType.AuthorizationForm.Config.CountriesLangsObject.TryGetValue(_selectedResidenceCountry.Code.ToUpperInvariant(), out langCode)\r\n                        && string.Equals(langCode.GetString(), \"en\", StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        return false;\r\n                    }\r\n\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsDeleteEnabled\r\n        {\r\n            get { return _dataValue != null || _dataProofValue != null; }\r\n        }\r\n\r\n        public static bool IsValidType(TLSecureValueTypeBase type)\r\n        {\r\n            return IsValidDataType(type)\r\n                || IsValidProofType(type);\r\n        }\r\n\r\n        public static bool IsValidDataType(TLSecureValueTypeBase type)\r\n        {\r\n            return type is TLSecureValueTypePersonalDetails;\r\n        }\r\n\r\n        public static bool IsValidProofType(TLSecureValueTypeBase type)\r\n        {\r\n            return type is TLSecureValueTypePassport\r\n                || type is TLSecureValueTypeInternalPassport\r\n                || type is TLSecureValueTypeDriverLicense\r\n                || type is TLSecureValueTypeIdentityCard;\r\n        }\r\n\r\n        public static bool IsValidReversedProofType(TLSecureValueTypeBase type)\r\n        {\r\n            return type is TLSecureValueTypeDriverLicense\r\n                || type is TLSecureValueTypeIdentityCard;\r\n        }\r\n\r\n        private readonly TLAuthorizationForm _authorizationForm;\r\n\r\n        private readonly TLPasswordBase _passwordBase;\r\n\r\n        private readonly TLSecureValue _dataValue;\r\n\r\n        private readonly TLSecureValue _dataProofValue;\r\n\r\n        private readonly TLSecureValueTypeBase _secureType;\r\n\r\n        private readonly SecureRequiredType _secureRequiredType;\r\n\r\n        public PersonalDetailsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler,\r\n            IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService,\r\n            ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Errors = new ObservableCollection<string>();\r\n\r\n            Translations = new ObservableCollection<TLSecureFileBase>();\r\n            Translations.CollectionChanged += (sender, args) =>\r\n            {\r\n                NotifyOfPropertyChange(() => AttachDocumentCommand);\r\n            };\r\n\r\n            _authorizationForm = StateService.AuthorizationForm;\r\n            StateService.AuthorizationForm = null;\r\n\r\n            _passwordBase = stateService.Password;\r\n            stateService.Password = null;\r\n\r\n            var secureValue = StateService.SecureValue;\r\n            StateService.SecureValue = null;\r\n\r\n            _secureType = StateService.SecureType;\r\n            StateService.SecureType = null;\r\n\r\n            _secureRequiredType = StateService.SecureRequiredType;\r\n            StateService.SecureRequiredType = null;\r\n\r\n            _dataValue = GetData(_secureRequiredType, secureValue);\r\n            if (_dataValue != null && _dataValue.Data != null)\r\n            {\r\n                var rootObject = _dataValue.Data.DecryptedData as PersonalDetailsRootObject;\r\n                if (rootObject != null)\r\n                {\r\n                    _firstName = rootObject.first_name;\r\n                    _middleName = rootObject.middle_name;\r\n                    _lastName = rootObject.last_name;\r\n                    _birthDate = rootObject.birth_date;\r\n                    _gender = rootObject.gender;\r\n                    if (!string.IsNullOrEmpty(rootObject.country_code))\r\n                    {\r\n                        var country =\r\n                            CountryUtils.CountriesSource.FirstOrDefault(\r\n                                x => string.Equals(rootObject.country_code, x.Code, StringComparison.OrdinalIgnoreCase));\r\n                        _selectedCountry = country;\r\n                    }\r\n                    if (!string.IsNullOrEmpty(rootObject.residence_country_code))\r\n                    {\r\n                        var country =\r\n                            CountryUtils.CountriesSource.FirstOrDefault(\r\n                                x =>\r\n                                    string.Equals(rootObject.residence_country_code, x.Code,\r\n                                        StringComparison.OrdinalIgnoreCase));\r\n                        _selectedResidenceCountry = country;\r\n                    }\r\n\r\n                    _firstNameNative = rootObject.first_name_native;\r\n                    _middleNameNative = rootObject.middle_name_native;\r\n                    _lastNameNative = rootObject.last_name_native;\r\n                }\r\n            }\r\n\r\n            _dataProofValue = GetDataProof(_secureRequiredType, secureValue);\r\n            if (_dataProofValue != null)\r\n            {\r\n                FrontSide = _dataProofValue.FrontSide;\r\n                ReverseSide = _dataProofValue.ReverseSide;\r\n                Selfie = _dataProofValue.Selfie;\r\n\r\n                var dataProofValue85 = _dataProofValue as TLSecureValue85;\r\n                if (dataProofValue85 != null && dataProofValue85.Translation != null)\r\n                {\r\n                    Translations.Clear();\r\n                    foreach (var translation in dataProofValue85.Translation)\r\n                    {\r\n                        Translations.Add(translation);\r\n                    }\r\n                }\r\n\r\n                var rootObject = _dataProofValue.Data.DecryptedData as PersonalDetailsDocumentRootObject;\r\n                if (rootObject != null)\r\n                {\r\n                    _documentNumber = rootObject.document_no;\r\n                    _expiryDate = rootObject.expiry_date;\r\n                }\r\n            }\r\n\r\n            GetErrors(_authorizationForm);\r\n        }\r\n\r\n        private bool HasErrors()\r\n        {\r\n            if (IsDataProofEnabled)\r\n            {\r\n                var frontSideError = FrontSide as ISecureFileError;\r\n                if (frontSideError != null && !string.IsNullOrEmpty(frontSideError.Error))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.FRONT_SIDE_REQUIRED.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (FrontSide == null)\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.FRONT_SIDE_REQUIRED.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (IsDataProofReverseEnabled)\r\n                {\r\n                    var reverseSideError = ReverseSide as ISecureFileError;\r\n                    if (reverseSideError != null && !string.IsNullOrEmpty(reverseSideError.Error))\r\n                    {\r\n                        Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.REVERSE_SIDE_REQUIRED.ToString()) };\r\n                        NotifyOfPropertyChange(() => Error);\r\n                        return true;\r\n                    }\r\n\r\n                    if (ReverseSide == null)\r\n                    {\r\n                        Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.REVERSE_SIDE_REQUIRED.ToString()) };\r\n                        NotifyOfPropertyChange(() => Error);\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                if (IsDataProofSelfieEnabled)\r\n                {\r\n                    var selfieSideError = Selfie as ISecureFileError;\r\n                    if (selfieSideError != null && !string.IsNullOrEmpty(selfieSideError.Error))\r\n                    {\r\n                        Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.SELFIE_REQUIRED.ToString()) };\r\n                        NotifyOfPropertyChange(() => Error);\r\n                        return true;\r\n                    }\r\n\r\n                    if (Selfie == null)\r\n                    {\r\n                        Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.SELFIE_REQUIRED.ToString()) };\r\n                        NotifyOfPropertyChange(() => Error);\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                if (IsDataProofTranslationEnabled)\r\n                {\r\n                    if (Translations != null && Translations.Count > 0)\r\n                    {\r\n                        foreach (var file in Translations.OfType<ISecureFileError>())\r\n                        {\r\n                            if (!string.IsNullOrEmpty(file.Error))\r\n                            {\r\n                                Error = new TLRPCError((int)ErrorCode.BAD_REQUEST)\r\n                                {\r\n                                    Message = new TLString(ErrorType.TRANSLATION_ERROR.ToString())\r\n                                };\r\n                                NotifyOfPropertyChange(() => Error);\r\n                                return true;\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.TRANSLATION_EMPTY.ToString()) };\r\n                        NotifyOfPropertyChange(() => Error);\r\n                        return true;\r\n                    }\r\n\r\n                    if (!string.IsNullOrEmpty(TranslationsError))\r\n                    {\r\n                        Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.TRANSLATION_EMPTY.ToString()) };\r\n                        NotifyOfPropertyChange(() => Error);\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (IsDataEnabled)\r\n            {\r\n                if (!string.IsNullOrEmpty(FirstNameError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.FIRSTNAME_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(FirstName))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.FIRSTNAME_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n\r\n                if (!string.IsNullOrEmpty(MiddleNameError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.MIDDLENAME_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(LastNameError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.LASTNAME_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(LastName))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.LASTNAME_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(BirthDateError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.BIRTHDATE_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(BirthDate))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.BIRTHDATE_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(GenderError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.GENDER_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(Gender))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.GENDER_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(SelectedCountryError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.ADDRESS_COUNTRY_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (_selectedCountry == null)\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.ADDRESS_COUNTRY_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(SelectedResidenceCountryError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.ADDRESS_RESIDENCE_COUNTRY_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (_selectedResidenceCountry == null)\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.ADDRESS_RESIDENCE_COUNTRY_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            if (IsDataProofEnabled)\r\n            {\r\n                if (!string.IsNullOrEmpty(DocumentNumberError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.DOCUMENT_NUMBER_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(DocumentNumber))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.DOCUMENT_NUMBER_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(ExpiryDateError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.EXPIRYDATE_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            if (IsDataNativeNamesVisible)\r\n            {\r\n                if (!string.IsNullOrEmpty(FirstNameNativeError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.FIRSTNAMENATIVE_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(FirstNameNative))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.FIRSTNAMENATIVE_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(MiddleNameNativeError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.MIDDLENAMENATIVE_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(LastNameNativeError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.LASTNAMENATIVE_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(LastNameNative))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.LASTNAMENATIVE_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            Error = null;\r\n            NotifyOfPropertyChange(() => Error);\r\n            return false;\r\n        }\r\n\r\n        private void GetErrors(TLAuthorizationForm form)\r\n        {\r\n            if (form == null) return;\r\n            if (form.Errors == null || form.Errors.Count == 0) return;\r\n\r\n            var dataFieldAction = new Dictionary<string, Action<TLSecureValueErrorBase>>\r\n            {\r\n                {\"first_name\", error => { FirstNameError = error.Text.ToString(); }},\r\n                {\"middle_name\", error => { MiddleNameError = error.Text.ToString(); }},\r\n                {\"last_name\", error => { LastNameError = error.Text.ToString(); }},\r\n                {\"birth_date\", error => { BirthDateError = error.Text.ToString(); }},\r\n                {\"gender\", error => { GenderError = error.Text.ToString(); }},\r\n                {\"country_code\", error => { SelectedCountryError = error.Text.ToString(); }},\r\n                {\"residence_country_code\", error => { SelectedResidenceCountryError = error.Text.ToString(); }},\r\n                {\"document_no\", error => { DocumentNumberError = error.Text.ToString(); }},\r\n                {\"expiry_date\", error => { ExpiryDateError = error.Text.ToString(); }},\r\n                {\"first_name_native\", error => { FirstNameNativeError = error.Text.ToString(); }},\r\n                {\"middle_name_native\", error => { MiddleNameNativeError = error.Text.ToString(); }},\r\n                {\"last_name_native\", error => { LastNameNativeError = error.Text.ToString(); }},\r\n            };\r\n\r\n            var errorTypeAction = new Dictionary<Type, Action<TLSecureValueErrorBase>>\r\n            {\r\n                {\r\n                    typeof(TLSecureValueError), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueError;\r\n                        if (error != null)\r\n                        {\r\n                            if (_secureRequiredType != null)\r\n                            {\r\n                                if (_secureRequiredType.DataRequiredType != null\r\n                                    && _secureRequiredType.DataRequiredType.Type.GetType() == error.Type.GetType())\r\n                                {\r\n                                    Errors.Add(error.Text.ToString());\r\n                                }\r\n                                else if (_secureRequiredType.SelectedDataProofRequiredType != null\r\n                                    && _secureRequiredType.SelectedDataProofRequiredType.Type.GetType() == error.Type.GetType())\r\n                                {\r\n                                    Errors.Add(error.Text.ToString());\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorData), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorData;\r\n                        if (error != null)\r\n                        {\r\n                            Action<TLSecureValueErrorBase> fieldAction;\r\n                            if (dataFieldAction.TryGetValue(error.Field.ToString(), out fieldAction))\r\n                            {\r\n                                fieldAction.SafeInvoke(error);\r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorFile), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorFile;\r\n                        if (error != null)\r\n                        {\r\n                            var frontSideError = FrontSide as ISecureFileError;\r\n                            if (frontSideError != null && TLString.Equals(frontSideError.FileHash, error.FileHash, StringComparison.OrdinalIgnoreCase))\r\n                            {\r\n                                frontSideError.Error = error.Text.ToString(); \r\n                            }\r\n                            var reverseSideError = ReverseSide as ISecureFileError;\r\n                            if (reverseSideError != null && TLString.Equals(reverseSideError.FileHash, error.FileHash, StringComparison.OrdinalIgnoreCase))\r\n                            {\r\n                                reverseSideError.Error = error.Text.ToString();\r\n                            }\r\n                            var selfieError = Selfie as ISecureFileError;\r\n                            if (selfieError != null && TLString.Equals(selfieError.FileHash, error.FileHash, StringComparison.OrdinalIgnoreCase))\r\n                            {\r\n                                selfieError.Error = error.Text.ToString();\r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorFrontSide), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorFrontSide;\r\n                        if (error != null)\r\n                        {\r\n                            var frontSideError = FrontSide as ISecureFileError;\r\n                            if (frontSideError != null && TLString.Equals(frontSideError.FileHash, error.FileHash, StringComparison.OrdinalIgnoreCase))\r\n                            {\r\n                                frontSideError.Error = error.Text.ToString(); \r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorReverseSide), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorReverseSide;\r\n                        if (error != null)\r\n                        {\r\n                            var reverseSideError = ReverseSide as ISecureFileError;\r\n                            if (reverseSideError != null && TLString.Equals(reverseSideError.FileHash, error.FileHash, StringComparison.OrdinalIgnoreCase))\r\n                            {\r\n                                reverseSideError.Error = error.Text.ToString(); \r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorSelfie), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorSelfie;\r\n                        if (error != null)\r\n                        {\r\n                            var selfieError = Selfie as ISecureFileError;\r\n                            if (selfieError != null && TLString.Equals(selfieError.FileHash, error.FileHash, StringComparison.OrdinalIgnoreCase))\r\n                            {\r\n                                selfieError.Error = error.Text.ToString(); \r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorTranslationFile), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorTranslationFile;\r\n                        if (error != null)\r\n                        {\r\n                            foreach (var file in Translations.OfType<ISecureFileError>())\r\n                            {\r\n                                if (TLString.Equals(file.FileHash, error.FileHash, StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    file.Error = error.Text.ToString();\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorTranslationFiles), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorTranslationFiles;\r\n                        if (error != null)\r\n                        {\r\n                            TranslationsError = error.Text.ToString();\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n\r\n            Errors.Clear();\r\n            foreach (var error in _authorizationForm.Errors)\r\n            {\r\n                Action<TLSecureValueErrorBase> action;\r\n                if ((_dataValue != null && _dataValue.Type.GetType() == error.Type.GetType()\r\n                    || _dataProofValue != null && _dataProofValue.Type.GetType() == error.Type.GetType())\r\n                    && errorTypeAction.TryGetValue(error.GetType(), out action))\r\n                {\r\n                    action.SafeInvoke(error);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void RemoveDataErrors()\r\n        {\r\n            if (_authorizationForm != null && _authorizationForm.Errors != null)\r\n            {\r\n                for (var i = 0; i < _authorizationForm.Errors.Count; i++)\r\n                {\r\n                    var error = _authorizationForm.Errors[i];\r\n                    if (error != null && IsValidDataType(error.Type))\r\n                    {\r\n                        _authorizationForm.Errors.RemoveAt(i--);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void RemoveProofErrors()\r\n        {\r\n            if (_authorizationForm != null && _authorizationForm.Errors != null)\r\n            {\r\n                for (var i = 0; i < _authorizationForm.Errors.Count; i++)\r\n                {\r\n                    var error = _authorizationForm.Errors[i];\r\n                    if (error != null && IsValidProofType(error.Type))\r\n                    {\r\n                        _authorizationForm.Errors.RemoveAt(i--);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLSecureValue GetData(SecureRequiredType requiredType, TLSecureValue secureValue)\r\n        {\r\n            if (requiredType != null)\r\n            {\r\n                return requiredType.DataValue;\r\n            }\r\n\r\n            return secureValue != null && IsValidDataType(secureValue.Type) ? secureValue : null;\r\n        }\r\n\r\n        private TLSecureValue GetDataProof(SecureRequiredType requiredType, TLSecureValue secureValue)\r\n        {\r\n            if (requiredType != null)\r\n            {\r\n                return requiredType.DataProofValue;\r\n            }\r\n\r\n            return secureValue != null && IsValidProofType(secureValue.Type) ? secureValue : null;\r\n        }\r\n\r\n        public void AttachFrontSide()\r\n        {\r\n            AttachDocument(\"FrontSide\");\r\n        }\r\n\r\n        public void AttachReverseSide()\r\n        {\r\n            AttachDocument(\"ReverseSide\");\r\n        }\r\n\r\n        public void AttachSelfie()\r\n        {\r\n            AttachDocument(\"Selfie\");\r\n        }\r\n\r\n        public void AttachTranslation()\r\n        {\r\n            if (Translations.Count >= Constants.MaxPassportFilesCount)\r\n            {\r\n                ShellViewModel.ShowCustomMessageBox(string.Format(AppResources.PassportUploadMaxReached, Constants.MaxPassportFilesCount), AppResources.AppName,\r\n                    AppResources.Ok.ToLowerInvariant(), null,\r\n                    dismissed =>\r\n                    {\r\n\r\n                    });\r\n\r\n                return;\r\n            }\r\n\r\n            AttachDocument(\"Translation\");\r\n        }\r\n\r\n        public async void AttachDocument(string type)\r\n        {\r\n            ((App)Application.Current).ChooseFileInfo = new ChooseFileInfo(DateTime.Now);\r\n            var picker = new FileOpenPicker();\r\n            picker.FileTypeFilter.Add(\".bmp\");\r\n            picker.FileTypeFilter.Add(\".jpg\");\r\n            picker.FileTypeFilter.Add(\".jpeg\");\r\n            picker.FileTypeFilter.Add(\".png\");\r\n            picker.ContinuationData.Add(\"From\", \"PersonalDetailsView\");\r\n            picker.ContinuationData.Add(\"Type\", type);\r\n\r\n            if (Environment.OSVersion.Version.Major >= 10)\r\n            {\r\n                var result = await picker.PickSingleFileAsync();\r\n                if (result != null)\r\n                {\r\n                    Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                    {\r\n                        SendDocument(type, result);\r\n                    });\r\n                }\r\n            }\r\n            else\r\n            {\r\n                picker.PickSingleFileAndContinue();\r\n            }\r\n        }\r\n\r\n        public async void SendDocument(string type, StorageFile file)\r\n        {\r\n            if (string.IsNullOrEmpty(type)) return;\r\n            if (file == null) return;\r\n\r\n            var password = _passwordBase as TLPassword;\r\n            if (password == null) return;\r\n\r\n            var passwordSettings = password.Settings as TLPasswordSettings83;\r\n            if (passwordSettings == null) return;\r\n\r\n            var fileId = TLLong.Random();\r\n            var compressedFileName = string.Format(\"secureid_compressed_{0}.dat\", fileId);\r\n            var fileName = string.Format(\"secureid_{0}.dat\", fileId);\r\n            var previewFileName = string.Format(\"secureid_preview_{0}.dat\", fileId);\r\n            var localFileName = string.Format(\"document{0}_{1}.dat\", fileId, 0);\r\n\r\n            var inputStream = await file.OpenReadAsync();\r\n\r\n            await DialogDetailsViewModel.ResizeJpeg(inputStream, Constants.DefaultPassportImageSize, file.DisplayName, compressedFileName, 0.89);\r\n\r\n            file = await ApplicationData.Current.LocalFolder.GetFileAsync(compressedFileName);\r\n\r\n            var padding = await Utils.Passport.GenerateRandomPadding(file);\r\n            var fileSecret = Utils.Passport.GenerateSecret(TLString.Empty);\r\n            var fileHash = TLString.FromBigEndianData(await Utils.Passport.GetSha256(padding, file));\r\n\r\n            var fileSecureSecret = Utils.Passport.EncryptValueSecret(\r\n                fileSecret,\r\n                EnterPasswordViewModel.Secret,\r\n                fileHash);\r\n\r\n            var encryptedFile = await Utils.Passport.EncryptFile(fileName, file, fileSecret, fileHash, padding);\r\n            var stream = await file.OpenReadAsync();\r\n\r\n            await DialogDetailsViewModel.ResizeJpeg(stream, 180, localFileName, previewFileName);\r\n\r\n            int length;\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var fileStream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read, FileShare.Read))\r\n                {\r\n                    length = (int)fileStream.Length;\r\n                }\r\n            }\r\n\r\n            var secureFileUploaded = new TLSecureFileUploaded\r\n            {\r\n                Id = fileId,\r\n                Parts = null,\r\n                MD5Checksum = TLString.Empty,\r\n                Size = new TLInt(length),\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                FileHash = fileHash,\r\n                Secret = fileSecureSecret\r\n            };\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                switch (type)\r\n                {\r\n                    case \"FrontSide\":\r\n                        FrontSide = secureFileUploaded;\r\n                        NotifyOfPropertyChange(() => FrontSide);\r\n                        break;\r\n                    case \"ReverseSide\":\r\n                        ReverseSide = secureFileUploaded;\r\n                        NotifyOfPropertyChange(() => ReverseSide);\r\n                        break;\r\n                    case \"Selfie\":\r\n                        Selfie = secureFileUploaded;\r\n                        NotifyOfPropertyChange(() => Selfie);\r\n                        break;\r\n                    case \"Translation\":\r\n                        Translations.Add(secureFileUploaded);\r\n                        TranslationsError = null;\r\n                        NotifyOfPropertyChange(() => TranslationsError);\r\n                        break;\r\n                }\r\n\r\n                NotifyOfPropertyChange(() => IsFileUploading);\r\n                secureFileUploaded.UploadingProgress = 0.01;\r\n                secureFileUploaded.UploadingSize = (int)(secureFileUploaded.Size.Value * secureFileUploaded.UploadingProgress);\r\n                var documentFileManager = IoC.Get<IUploadFileManager>();\r\n                documentFileManager.UploadFile(fileId, secureFileUploaded, encryptedFile);\r\n            });\r\n        }\r\n\r\n        public void DeleteFrontSide()\r\n        {\r\n            DeleteFile(FrontSide);\r\n        }\r\n\r\n        public void DeleteReverseSide()\r\n        {\r\n            DeleteFile(ReverseSide);\r\n        }\r\n\r\n        public void DeleteSelfie()\r\n        {\r\n            DeleteFile(Selfie);\r\n        }\r\n\r\n        public void DeleteFile(TLSecureFileBase file)\r\n        {\r\n            if (file == null) return;\r\n\r\n            ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeleteScanAlert, AppResources.AppName,\r\n                AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        if (FrontSide == file)\r\n                        {\r\n                            FrontSide = null;\r\n                            NotifyOfPropertyChange(() => FrontSide);\r\n                        }\r\n                        else if (ReverseSide == file)\r\n                        {\r\n                            ReverseSide = null;\r\n                            NotifyOfPropertyChange(() => ReverseSide);\r\n                        }\r\n                        else if (Selfie == file)\r\n                        {\r\n                            Selfie = null;\r\n                            NotifyOfPropertyChange(() => Selfie);\r\n                        }\r\n                        else\r\n                        {\r\n                            Translations.Remove(file);\r\n                        }\r\n                    }\r\n                });\r\n        }\r\n\r\n        public void Delete()\r\n        {\r\n            if (_dataValue == null && _dataProofValue == null)\r\n            {\r\n                NavigationService.GoBack();\r\n                return;\r\n            }\r\n\r\n            if (_dataValue != null && _dataProofValue != null)\r\n            {\r\n                object content = null;\r\n                var textBlock = new TextBlock { IsHitTestVisible = false };\r\n                var checkBox = new CheckBox { IsChecked = true, IsHitTestVisible = false };\r\n                if (_dataValue != null)\r\n                {\r\n                    textBlock.SetValue(TextBlock.FontSizeProperty, DependencyProperty.UnsetValue);\r\n\r\n                    var text = AppResources.PassportDeleteDocumentPersonal;\r\n                    textBlock.Margin = new Thickness(-18.0, 0.0, 12.0, 0.0);\r\n                    textBlock.Text = text;\r\n                    textBlock.VerticalAlignment = VerticalAlignment.Center;\r\n\r\n                    var panel = new StackPanel { Orientation = Orientation.Horizontal, Margin = new Thickness(0.0, -2.0, 0.0, -20.0), Background = new SolidColorBrush(Colors.Transparent) };\r\n                    panel.Tap += (sender, args) =>\r\n                    {\r\n                        checkBox.IsChecked = !checkBox.IsChecked;\r\n                    };\r\n                    panel.Children.Add(checkBox);\r\n                    panel.Children.Add(textBlock);\r\n                    content = panel;\r\n                }\r\n                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeleteDocumentAlert, AppResources.AppName,\r\n                    AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                    dismissed =>\r\n                    {\r\n                        if (dismissed == CustomMessageBoxResult.RightButton)\r\n                        {\r\n                            var deleteData = _dataValue != null && checkBox.IsChecked == true;\r\n                            var values = new TLVector<TLSecureValue> { _dataProofValue };\r\n                            var types = new TLVector<TLSecureValueTypeBase> { _dataProofValue.Type };\r\n                            if (deleteData)\r\n                            {\r\n                                values.Add(_dataValue);\r\n                                types.Add(_dataValue.Type);\r\n                            }\r\n                            IsWorking = true;\r\n                            MTProtoService.DeleteSecureValueAsync(\r\n                                types,\r\n                                result => BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                    if (_authorizationForm != null)\r\n                                    {\r\n                                        foreach (var value in values)\r\n                                        {\r\n                                            _authorizationForm.Values.Remove(value);\r\n                                        }\r\n                                    }\r\n                                    RemoveDataErrors();\r\n                                    RemoveProofErrors();\r\n                                    if (_secureRequiredType != null)\r\n                                    {\r\n                                        _secureRequiredType.UpdateValue();\r\n                                    }\r\n                                    EventAggregator.Publish(new DeleteSecureValueEventArgs { Values = values });\r\n                                    NavigationService.GoBack();\r\n                                }),\r\n                                error => BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                }));\r\n                        }\r\n                    },\r\n                    content);\r\n\r\n                return;\r\n            }\r\n\r\n            // delete data\r\n            if (_dataValue != null)\r\n            {\r\n                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeleteAddressAlert, AppResources.AppName,\r\n                AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.DeleteSecureValueAsync(\r\n                            new TLVector<TLSecureValueTypeBase> { _dataValue.Type },\r\n                            result => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                if (_authorizationForm != null)\r\n                                {\r\n                                    _authorizationForm.Values.Remove(_dataValue);\r\n                                }\r\n                                if (_secureRequiredType != null)\r\n                                {\r\n                                    _secureRequiredType.UpdateValue();\r\n                                }\r\n                                RemoveDataErrors();\r\n                                EventAggregator.Publish(new DeleteSecureValueEventArgs { Values = new List<TLSecureValue> { _dataValue } });\r\n                                NavigationService.GoBack();\r\n                            }),\r\n                            error => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                            }));\r\n                    }\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            // delete proof\r\n            if (_dataProofValue != null)\r\n            {\r\n                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeleteDocumentAlert, AppResources.AppName,\r\n                AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.DeleteSecureValueAsync(\r\n                            new TLVector<TLSecureValueTypeBase> { _dataProofValue.Type },\r\n                            result => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                RemoveProofErrors();\r\n                                if (_authorizationForm != null)\r\n                                {\r\n                                    _authorizationForm.Values.Remove(_dataProofValue);\r\n                                }\r\n                                if (_secureRequiredType != null)\r\n                                {\r\n                                    _secureRequiredType.UpdateValue();\r\n                                }\r\n                                EventAggregator.Publish(new DeleteSecureValueEventArgs { Values = new List<TLSecureValue> { _dataProofValue } });\r\n                                NavigationService.GoBack();\r\n                            }),\r\n                            error => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                            }));\r\n                    }\r\n                });\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (IsFileUploading) return;\r\n            if (IsWorking) return;\r\n\r\n            SaveDataAsync(\r\n                () => SaveProofAsync(\r\n                    () => NavigationService.GoBack()));\r\n        }\r\n\r\n        private bool UseSameNativeNames()\r\n        {\r\n            IJsonValue langCode;\r\n            if (_secureRequiredType != null\r\n                && _secureRequiredType.AuthorizationForm != null\r\n                && _secureRequiredType.AuthorizationForm.Config != null\r\n                && _secureRequiredType.AuthorizationForm.Config.CountriesLangsObject != null\r\n                && _selectedResidenceCountry != null\r\n                && _secureRequiredType.AuthorizationForm.Config.CountriesLangsObject.TryGetValue(_selectedResidenceCountry.Code.ToUpperInvariant(), out langCode)\r\n                && string.Equals(langCode.GetString(), \"en\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void SaveDataAsync(System.Action callback, System.Action faultCallback = null)\r\n        {\r\n            var password = _passwordBase as TLPassword;\r\n            if (password == null)\r\n            {\r\n                faultCallback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            var passwordSettings = password.Settings as TLPasswordSettings83;\r\n            if (passwordSettings == null)\r\n            {\r\n                faultCallback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            var dataValue = _dataValue;\r\n            if (dataValue == null)\r\n            {\r\n                var secureType =\r\n                    _secureRequiredType != null && _secureRequiredType.DataRequiredType != null\r\n                        ? _secureRequiredType.DataRequiredType.Type\r\n                        : null;\r\n                    \r\n                    //_authorizationForm != null\r\n                    //? _authorizationForm.RequiredTypes.FirstOrDefault(IsValidDataType)\r\n                    //: null;\r\n\r\n                // add new address from passport settings\r\n                if (_secureType != null && IsValidDataType(_secureType))\r\n                {\r\n                    dataValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = _secureType\r\n                    };\r\n                }\r\n                // add new address from authorization form\r\n                else if (secureType != null)\r\n                {\r\n                    dataValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = secureType\r\n                    };\r\n                }\r\n                else\r\n                {\r\n                    callback.SafeInvoke();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (HasErrors())\r\n            {\r\n                faultCallback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            var rootObject = new PersonalDetailsRootObject\r\n            {\r\n                first_name = FirstName,\r\n                middle_name = MiddleName,\r\n                last_name = LastName,\r\n                birth_date = BirthDate,\r\n                gender = Gender,\r\n                country_code = _selectedCountry.Code.ToUpperInvariant(),\r\n                residence_country_code = _selectedResidenceCountry.Code.ToUpperInvariant()\r\n            };\r\n\r\n            if (IsDataNativeNamesEnabled)\r\n            {\r\n                if (UseSameNativeNames())\r\n                {\r\n                    rootObject.first_name_native = FirstName;\r\n                    rootObject.middle_name_native = MiddleName;\r\n                    rootObject.last_name_native = LastName;\r\n                }\r\n                else\r\n                {\r\n                    rootObject.first_name_native = FirstNameNative;\r\n                    rootObject.middle_name_native = MiddleNameNative;\r\n                    rootObject.last_name_native = LastNameNative;\r\n                }\r\n            }\r\n\r\n            var data = JsonUtils.ToJSON(rootObject);\r\n            if (data == null) return;\r\n\r\n            var valueSecret = Utils.Passport.GenerateSecret(TLString.Empty);\r\n            var newSecureValue = Utils.Passport.EncryptSecureValue(\r\n                dataValue,\r\n                new TLString(data),\r\n                valueSecret,\r\n                EnterPasswordViewModel.Secret);\r\n            var secureSecretHash = passwordSettings.SecureSettings.SecureSecretId;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.SaveSecureValueAsync(\r\n                newSecureValue.ToInputSecureValue(), secureSecretHash,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    result.Data.DecryptedData = rootObject;\r\n                    if (_authorizationForm != null)\r\n                    {\r\n                        _authorizationForm.Values.Remove(dataValue);\r\n                        _authorizationForm.Values.Add(result);\r\n                    }\r\n                    RemoveDataErrors();\r\n\r\n                    dataValue.Update(result);\r\n                    dataValue.NotifyOfPropertyChange(() => dataValue.Self);\r\n\r\n                    if (_secureType != null)\r\n                    {\r\n                        EventAggregator.Publish(new AddSecureValueEventArgs { Values = new List<TLSecureValue> { dataValue } });\r\n                    }\r\n                    if (_secureRequiredType != null)\r\n                    {\r\n                        _secureRequiredType.UpdateValue();\r\n                    }\r\n\r\n                    callback.SafeInvoke();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n\r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(\r\n                           \"account.saveSecureValue\" + Environment.NewLine + error.Message,\r\n                           AppResources.AppName,\r\n                           AppResources.Ok);\r\n                    }\r\n\r\n                    faultCallback.SafeInvoke();\r\n                }));\r\n        }\r\n\r\n        private void SaveProofAsync(System.Action callback, System.Action faultCallback = null)\r\n        {\r\n            var password = _passwordBase as TLPassword;\r\n            if (password == null)\r\n            {\r\n                callback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            var passwordSettings = password.Settings as TLPasswordSettings83;\r\n            if (passwordSettings == null)\r\n            {\r\n                callback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            var dataProofValue = _dataProofValue;\r\n            if (dataProofValue == null)\r\n            {\r\n                var secureType =\r\n                    _secureRequiredType != null && _secureRequiredType.SelectedDataProofRequiredType != null\r\n                        ? _secureRequiredType.SelectedDataProofRequiredType.Type\r\n                        : null;\r\n\r\n                    //_authorizationForm != null ? \r\n                    //_authorizationForm.RequiredTypes.FirstOrDefault(IsValidProofType) \r\n                    //: null;\r\n\r\n                if (_secureType != null && IsValidProofType(_secureType))\r\n                {\r\n                    dataProofValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = _secureType\r\n                    };\r\n                }\r\n                else if (secureType != null)\r\n                {\r\n                    dataProofValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = secureType\r\n                    };\r\n                }\r\n                else\r\n                {\r\n                    callback.SafeInvoke();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (HasErrors())\r\n            {\r\n                faultCallback.SafeInvoke();\r\n                return;\r\n            }\r\n            \r\n            var rootObject = new PersonalDetailsDocumentRootObject\r\n            {\r\n                document_no = DocumentNumber,\r\n                expiry_date = ExpiryDate\r\n            };\r\n\r\n            var data = JsonUtils.ToJSON(rootObject);\r\n            if (data == null) return;\r\n\r\n            var valueSecret = Utils.Passport.GenerateSecret(TLString.Empty);\r\n            var newSecureValue = Utils.Passport.EncryptSecureValue(\r\n                dataProofValue,\r\n                new TLString(data),\r\n                valueSecret,\r\n                EnterPasswordViewModel.Secret);\r\n\r\n            var inputSecureValue = newSecureValue.ToInputSecureValue();\r\n            inputSecureValue.FrontSide = FrontSide != null ? FrontSide.ToInputSecureFile() : null;\r\n            inputSecureValue.ReverseSide = ReverseSide != null ? ReverseSide.ToInputSecureFile() : null;\r\n            inputSecureValue.Selfie = Selfie != null ? Selfie.ToInputSecureFile() : null;\r\n\r\n            var inputSecureValue85 = inputSecureValue as TLInputSecureValue85;\r\n            if (inputSecureValue85 != null)\r\n            {\r\n                if (Translations.Count > 0)\r\n                {\r\n                    var translation = new TLVector<TLInputSecureFileBase>();\r\n                    foreach (var file in Translations)\r\n                    {\r\n                        translation.Add(file.ToInputSecureFile());\r\n                    }\r\n                    inputSecureValue85.Translation = translation;\r\n                }\r\n            }\r\n\r\n            var secureSecretId = passwordSettings.SecureSettings.SecureSecretId;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.SaveSecureValueAsync(\r\n                inputSecureValue, secureSecretId,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    result.Data.DecryptedData = rootObject;\r\n                    if (_authorizationForm != null)\r\n                    {\r\n                        _authorizationForm.Values.Remove(dataProofValue);\r\n                        _authorizationForm.Values.Add(result);\r\n                    }\r\n                    RemoveProofErrors();\r\n\r\n                    dataProofValue.Update(result);\r\n                    dataProofValue.NotifyOfPropertyChange(() => dataProofValue.Self);\r\n\r\n                    if (_secureType != null)\r\n                    {\r\n                        EventAggregator.Publish(new AddSecureValueEventArgs { Values = new List<TLSecureValue> { dataProofValue } });\r\n                    }\r\n                    if (_secureRequiredType != null)\r\n                    {\r\n                        _secureRequiredType.UpdateValue();\r\n                    }\r\n\r\n                    callback.SafeInvoke();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (error.TypeEquals(ErrorType.FILES_EMPTY))\r\n                    {\r\n                        Error = error;\r\n                        NotifyOfPropertyChange(() => Error);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.FRONT_SIDE_REQUIRED))\r\n                    {\r\n                        Error = error;\r\n                        NotifyOfPropertyChange(() => Error);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.REVERSE_SIDE_REQUIRED))\r\n                    {\r\n                        Error = error;\r\n                        NotifyOfPropertyChange(() => Error);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.SELFIE_REQUIRED))\r\n                    {\r\n                        Error = error;\r\n                        NotifyOfPropertyChange(() => Error);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.FILES_TOO_MUCH))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(\r\n                            string.Format(AppResources.PassportUploadMaxReached, Constants.MaxPassportFilesCount), \r\n                            AppResources.AppName,\r\n                            AppResources.Ok.ToLowerInvariant());\r\n                    }\r\n                    else if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(\r\n                           \"account.saveSecureValue\" + Environment.NewLine + error.Message,\r\n                           AppResources.AppName,\r\n                           AppResources.Ok);\r\n                    }\r\n\r\n                    faultCallback.SafeInvoke();\r\n                }));\r\n        }\r\n        \r\n        public void OpenScan(TLSecureFileBase file)\r\n        {\r\n            return;\r\n            StateService.CurrentPhotoMessage = new TLMessage { Status = MessageStatus.Confirmed };\r\n            OpenImageViewer();\r\n        }\r\n\r\n        public void SelectBirthDate()\r\n        {\r\n            DateTime currentDate;\r\n            if (!DateTime.TryParse(BirthDate, out currentDate))\r\n            {\r\n                currentDate = DateTime.Now.Date;\r\n            }\r\n\r\n            var datePickerPage = new TelegramDatePickerPage(new YearDataSource{ MaxYear = DateTime.Now.Year, MinYear = 1900 }) { Height = 160.0, Value = currentDate, Margin = new Thickness(0.0, 18.0, 0.0, 6.0) };\r\n            ShellViewModel.ShowCustomMessageBox(null, AppResources.PassportSelectDate.ToUpperInvariant(), AppResources.Ok.ToLowerInvariant(), null,\r\n                result =>\r\n                {\r\n                    if (result == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        var selector = GetChildOfType<LoopingSelector>(datePickerPage);\r\n                        if (selector != null)\r\n                        {\r\n                            var value = ((DateTimeWrapper)selector.DataSource.SelectedItem).DateTime;\r\n                            value = value > DateTime.Now.Date ? DateTime.Now.Date : value;\r\n                            BirthDate = value.ToString(\"dd.MM.yyyy\");\r\n                            NotifyOfPropertyChange(() => BirthDate);\r\n                        }\r\n                    }\r\n                },\r\n                datePickerPage);\r\n        }\r\n\r\n        public static T GetChildOfType<T>(DependencyObject depObj) where T : DependencyObject\r\n        {\r\n            if (depObj == null) return null;\r\n\r\n            for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)\r\n            {\r\n                var child = VisualTreeHelper.GetChild(depObj, i);\r\n\r\n                var result = (child as T) ?? GetChildOfType<T>(child);\r\n                if (result != null) return result;\r\n            }\r\n            return null;\r\n        }\r\n\r\n        public void SelectGender()\r\n        {\r\n            var types = new [] { \"male\", \"female\" };\r\n\r\n            var panel = new StackPanel { Margin = new Thickness(0.0, 12.0, 0.0, 0.0) };\r\n            var messageBox = ShellViewModel.ShowCustomMessageBox(\r\n                null, AppResources.PassportSelectGender.ToUpperInvariant(),\r\n                null, null,\r\n                dismissed =>\r\n                {\r\n\r\n                },\r\n                panel);\r\n\r\n            for (var i = 0; i < types.Length; i++)\r\n            {\r\n                var listBoxItem = new ListBoxItem\r\n                {\r\n                    Content =\r\n                        new TextBlock\r\n                        {\r\n                            Text = GenderToStringConverter.Convert(types[i]),\r\n                            FontSize = 27,\r\n                            Margin = new Thickness(12.0)\r\n                        },\r\n                    DataContext = types[i]\r\n                };\r\n                TiltEffect.SetIsTiltEnabled(listBoxItem, true);\r\n                listBoxItem.Tap += (sender, args) =>\r\n                {\r\n                    messageBox.Dismiss();\r\n                    var item = sender as ListBoxItem;\r\n                    if (item != null)\r\n                    {\r\n                        var gender = item.DataContext as string;\r\n                        if (gender != null)\r\n                        {\r\n                            Gender = gender;\r\n                            NotifyOfPropertyChange(() => Gender);\r\n                        }\r\n                    }\r\n\r\n                };\r\n\r\n                panel.Children.Add(listBoxItem);\r\n            }\r\n        }\r\n\r\n        public void SelectCountry()\r\n        {\r\n            StateService.HideCountryCode = true;\r\n            NavigationService.UriFor<ChooseCountryViewModel>().Navigate();\r\n        }\r\n\r\n        private void OnCountrySelected(Country country)\r\n        {\r\n            SelectedCountry = country;\r\n        }\r\n\r\n        public void SelectResidenceCountry()\r\n        {\r\n            StateService.HideCountryCode = true;\r\n            StateService.ResidenceCountry = true;\r\n            NavigationService.UriFor<ChooseCountryViewModel>().Navigate();\r\n        }\r\n\r\n        private void OnResidenceCountrySelected(Country country)\r\n        {\r\n            SelectedResidenceCountry = country;\r\n        }\r\n\r\n        public void SelectExpiryDate()\r\n        {\r\n            DateTime currentDate;\r\n            if (!DateTime.TryParse(ExpiryDate, out currentDate))\r\n            {\r\n                currentDate = DateTime.Now.Date;\r\n            }\r\n\r\n            var datePickerPage = new TelegramDatePickerPage(new YearDataSource { MaxYear = DateTime.Now.Year + 20, MinYear = 1900 }) { Height = 160.0, Value = currentDate, Margin = new Thickness(0.0, 18.0, 0.0, 6.0) };\r\n            ShellViewModel.ShowCustomMessageBox(null, AppResources.PassportSelectDate.ToUpperInvariant(), AppResources.Ok.ToLowerInvariant(), AppResources.PassportSelectNotExpire,\r\n                result =>\r\n                {\r\n                    if (result == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        var selector = GetChildOfType<LoopingSelector>(datePickerPage);\r\n                        if (selector != null)\r\n                        {\r\n                            var value = ((DateTimeWrapper)selector.DataSource.SelectedItem).DateTime;\r\n                            ExpiryDate = value.ToString(\"dd.MM.yyyy\");\r\n                            NotifyOfPropertyChange(() => ExpiryDate);\r\n                        }\r\n                    }\r\n                    else if (result == CustomMessageBoxResult.LeftButton)\r\n                    {\r\n                        ExpiryDate = string.Empty;\r\n                        NotifyOfPropertyChange(() => ExpiryDate);\r\n                    }\r\n                },\r\n                datePickerPage);\r\n        }\r\n\r\n        public ImageViewerViewModel ImageViewer { get; set; }\r\n\r\n        public void OpenImageViewer()\r\n        {\r\n            if (ImageViewer == null)\r\n            {\r\n                ImageViewer = new ImageViewerViewModel(StateService, null, false, true)\r\n                {\r\n                    //DialogDetails = this\r\n                };\r\n                NotifyOfPropertyChange(() => ImageViewer);\r\n            }\r\n            BeginOnUIThread(() => ImageViewer.OpenViewer());\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.SelectedCountry != null)\r\n            {\r\n                var country = StateService.SelectedCountry;\r\n                StateService.SelectedCountry = null;\r\n                OnCountrySelected(country);\r\n            }\r\n\r\n            if (StateService.SelectedResidenceCountry != null)\r\n            {\r\n                var country = StateService.SelectedResidenceCountry;\r\n                StateService.SelectedResidenceCountry = null;\r\n                OnResidenceCountrySelected(country);\r\n            }\r\n\r\n            EventAggregator.Subscribe(this);\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            EventAggregator.Unsubscribe(this);\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n            var secureFileUploaded = item.Owner as TLSecureFileUploaded;\r\n            if (secureFileUploaded != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    secureFileUploaded.UploadingProgress = 1.0;\r\n                    secureFileUploaded.UploadingSize = (int)(secureFileUploaded.Size.Value * secureFileUploaded.UploadingProgress);\r\n                    secureFileUploaded.Parts = new TLInt(item.Parts.Count);\r\n                    NotifyOfPropertyChange(() => IsFileUploading);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(UploadProgressChangedEventArgs args)\r\n        {\r\n            var secureFileUploaded = args.Item.Owner as TLSecureFileUploaded;\r\n            if (secureFileUploaded != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    secureFileUploaded.UploadingProgress = args.Progress;\r\n                    secureFileUploaded.UploadingSize = (int)(secureFileUploaded.Size.Value * secureFileUploaded.UploadingProgress);\r\n                    NotifyOfPropertyChange(() => IsFileUploading);\r\n                });\r\n            }\r\n        }\r\n    }\r\n\r\n    public class PersonalDetailsDocumentRootObject\r\n    {\r\n        public string document_no { get; set; }\r\n        public string expiry_date { get; set; }\r\n\r\n        public IEnumerable<string> Fields()\r\n        {\r\n            if (!string.IsNullOrEmpty(document_no)) yield return document_no;\r\n            if (!string.IsNullOrEmpty(expiry_date)) yield return expiry_date;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Join(\", \", Fields());\r\n        }\r\n    }\r\n\r\n    [DataContract]\r\n    public class PersonalDetailsRootObject\r\n    {\r\n        [DataMember(EmitDefaultValue = false, Order = 1)]\r\n        public string first_name { get; set; }\r\n\r\n        [DataMember(EmitDefaultValue = false, Order = 2)]\r\n        public string middle_name { get; set; }\r\n\r\n        [DataMember(EmitDefaultValue = false, Order = 3)]\r\n        public string last_name { get; set; }\r\n\r\n        [DataMember(EmitDefaultValue = false, Order = 4)]\r\n        public string birth_date { get; set; }\r\n\r\n        [DataMember(EmitDefaultValue = false, Order = 5)]\r\n        public string gender { get; set; }\r\n\r\n        [DataMember(EmitDefaultValue = false, Order = 6)]\r\n        public string country_code { get; set; }\r\n\r\n        [DataMember(EmitDefaultValue = false, Order = 7)]\r\n        public string residence_country_code { get; set; }\r\n\r\n        [DataMember(EmitDefaultValue = false, Order = 8)]\r\n        public string first_name_native { get; set; }\r\n\r\n        [DataMember(EmitDefaultValue = false, Order = 9)]\r\n        public string middle_name_native { get; set; }\r\n\r\n        [DataMember(EmitDefaultValue = false, Order = 10)]\r\n        public string last_name_native { get; set; }\r\n\r\n        public IEnumerable<string> Fields()\r\n        {\r\n            if (!string.IsNullOrEmpty(first_name)) yield return first_name;\r\n            if (!string.IsNullOrEmpty(middle_name)) yield return middle_name;\r\n            if (!string.IsNullOrEmpty(last_name)) yield return last_name;\r\n            if (!string.IsNullOrEmpty(birth_date)) yield return birth_date;\r\n            if (!string.IsNullOrEmpty(gender)) yield return gender;\r\n            if (!string.IsNullOrEmpty(country_code)) yield return country_code;\r\n            if (!string.IsNullOrEmpty(residence_country_code)) yield return residence_country_code;\r\n            if (!string.IsNullOrEmpty(first_name_native)) yield return first_name_native;\r\n            if (!string.IsNullOrEmpty(middle_name_native)) yield return middle_name_native;\r\n            if (!string.IsNullOrEmpty(last_name_native)) yield return last_name_native;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Join(\", \", Fields());\r\n        }\r\n\r\n        public IEnumerable<string> Fields(Func<string, string> getGenderByCode, Func<string, string> getCountryByCode)\r\n        {\r\n            if (!string.IsNullOrEmpty(first_name)) yield return first_name;\r\n            if (!string.IsNullOrEmpty(middle_name)) yield return middle_name;\r\n            if (!string.IsNullOrEmpty(last_name)) yield return last_name;\r\n            if (!string.IsNullOrEmpty(birth_date)) yield return birth_date;\r\n            if (!string.IsNullOrEmpty(gender)) yield return getGenderByCode(gender) ?? gender;\r\n            if (!string.IsNullOrEmpty(country_code)) yield return getCountryByCode(country_code) ?? country_code;\r\n            if (!string.IsNullOrEmpty(residence_country_code)) yield return getCountryByCode(residence_country_code) ?? residence_country_code;\r\n            if (!string.IsNullOrEmpty(first_name_native)) yield return first_name_native;\r\n            if (!string.IsNullOrEmpty(middle_name_native)) yield return middle_name_native;\r\n            if (!string.IsNullOrEmpty(last_name_native)) yield return last_name_native;\r\n        }\r\n\r\n        public string ToString(Func<string, string> getGenderByCode, Func<string, string> getCountryByCode)\r\n        {\r\n            return string.Join(\", \", Fields(getGenderByCode, getCountryByCode));\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Passport/PhoneNumberCodeViewModel.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Passport\r\n{\r\n    public class PhoneNumberCodeViewModel : ViewModelBase\r\n    {\r\n        private DateTime _startTime;\r\n\r\n        private readonly DispatcherTimer _callTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(0.5) };\r\n\r\n        private int _timeCounter = Constants.SendCallDefaultTimeout;\r\n\r\n        public int TimeCounter\r\n        {\r\n            get { return _timeCounter; }\r\n            set { SetField(ref _timeCounter, value, () => TimeCounter); }\r\n        }\r\n\r\n        private string _timeCounterString = \" \";\r\n\r\n        public string TimeCounterString\r\n        {\r\n            get { return _timeCounterString; }\r\n            set { SetField(ref _timeCounterString, value, () => TimeCounterString); }\r\n        }\r\n\r\n        private string _code;\r\n\r\n        public string Code\r\n        {\r\n            get { return _code; }\r\n            set { SetField(ref _code, value, () => Code); }\r\n        }\r\n\r\n        private Visibility _helpVisibility = Visibility.Collapsed;\r\n\r\n        public Visibility HelpVisibility\r\n        {\r\n            get { return _helpVisibility; }\r\n            set { SetField(ref _helpVisibility, value, () => HelpVisibility); }\r\n        }\r\n\r\n        private Visibility _resendCodeVisibility = Visibility.Collapsed;\r\n\r\n        public Visibility ResendCodeVisibility\r\n        {\r\n            get { return _resendCodeVisibility; }\r\n            set { SetField(ref _resendCodeVisibility, value, () => ResendCodeVisibility); }\r\n        }\r\n\r\n        public string Subtitle { get; set; }\r\n\r\n        public TLInt Timeout { get; set; }\r\n\r\n        public int CodeLength { get; set; }\r\n\r\n        private TLSentCodeTypeBase _type;\r\n\r\n        private TLCodeTypeBase _nextType;\r\n\r\n        public string Caption\r\n        {\r\n            get { return TLString.IsNullOrEmpty(StateService.PhoneNumber) ? null : \"+\" + StateService.PhoneNumber; }\r\n        }\r\n\r\n        private readonly TLSecureValue _phoneNumberValue;\r\n\r\n        private readonly TLPasswordBase _passwordBase;\r\n\r\n        private readonly TLAuthorizationForm _authorizationForm;\r\n\r\n        private readonly IList<TLSecureValue> _secureValues;\r\n\r\n        private readonly TLSecureValueTypeBase _secureType;\r\n\r\n        private readonly SecureRequiredType _secureRequiredType;\r\n\r\n        public PhoneNumberCodeViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _passwordBase = stateService.Password;\r\n            stateService.Password = null;\r\n\r\n            _authorizationForm = stateService.AuthorizationForm;\r\n            stateService.AuthorizationForm = null;\r\n\r\n            _secureValues = stateService.SecureValues;\r\n            stateService.SecureValues = null;\r\n\r\n            _secureType = stateService.SecureType;\r\n            stateService.SecureType = null;\r\n\r\n            _secureRequiredType = stateService.SecureRequiredType;\r\n            stateService.SecureRequiredType = null;\r\n\r\n            _phoneNumberValue = _secureRequiredType != null ? _secureRequiredType.DataValue : null;\r\n\r\n            _type = stateService.Type;\r\n            stateService.Type = null;\r\n\r\n            _nextType = stateService.NextType;\r\n            stateService.NextType = null;\r\n\r\n            Subtitle = GetSubtitle();\r\n\r\n            var length = _type as ILength;\r\n            CodeLength = length != null ? length.Length.Value : Constants.DefaultCodeLength;\r\n\r\n            Timeout = stateService.SendCallTimeout;\r\n            ResendCodeVisibility = stateService.SendCallTimeout != null && stateService.SendCallTimeout.Value > 0\r\n                ? Visibility.Collapsed\r\n                : Visibility.Visible;\r\n\r\n            SuppressUpdateStatus = true;\r\n\r\n            EventAggregator.Subscribe(this);\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Code))\r\n                {\r\n                    NotifyOfPropertyChange(() => CanConfirm);\r\n\r\n                    if (!string.IsNullOrEmpty(Code) && Code.Length == CodeLength)\r\n                    {\r\n                        Confirm();\r\n                    }\r\n                }\r\n            };\r\n\r\n            _callTimer.Tick += (sender, args) =>\r\n            {\r\n                _timeCounter = Timeout == null? 0 : (int)(Timeout.Value - (DateTime.Now - _startTime).TotalSeconds);\r\n\r\n                if (_timeCounter > 0)\r\n                {\r\n#if DEBUG\r\n                    TimeCounterString = _timeCounter.ToString(CultureInfo.InvariantCulture);\r\n#endif\r\n\r\n                    if (_nextType is TLCodeTypeCall)\r\n                    {\r\n                        TimeCounterString = string.Format(AppResources.WeWillCallYou, TimeSpan.FromSeconds(TimeCounter).ToString(@\"m\\:ss\"));\r\n                    }\r\n                }\r\n                else   \r\n                {\r\n                    _timeCounter = 0;\r\n                    if (_nextType is TLCodeTypeCall)\r\n                    {\r\n                        TimeCounterString = AppResources.TelegramDialedYourNumber;\r\n                    }\r\n\r\n                    HelpVisibility = Visibility.Visible;\r\n                    ResendCodeVisibility = Visibility.Visible;\r\n                    _callTimer.Stop();\r\n                }\r\n\r\n                NotifyOfPropertyChange(() => TimeCounter);\r\n            };\r\n        }\r\n\r\n        private bool _isResending;\r\n\r\n        public void Resend()\r\n        {\r\n            if (_isResending)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_nextType == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _isResending = true;\r\n            IsWorking = true;\r\n            MTProtoService.ResendCodeAsync(StateService.PhoneNumber, StateService.PhoneCodeHash,\r\n                sentCode => BeginOnUIThread(() =>\r\n                {\r\n                    _isResending = false;\r\n                    IsWorking = false;\r\n\r\n                    StateService.PhoneCodeHash = sentCode.PhoneCodeHash;\r\n                    StateService.PhoneRegistered = sentCode.PhoneRegistered;\r\n\r\n                    Timeout = sentCode.SendCallTimeout;\r\n                    ResendCodeVisibility = Timeout != null && Timeout.Value > 0\r\n                        ? Visibility.Collapsed\r\n                        : Visibility.Visible;\r\n\r\n                    var sentCode50 = sentCode as TLSentCode50;\r\n                    if (sentCode50 != null)\r\n                    {\r\n                        _type = sentCode50.Type;\r\n                        _nextType = sentCode50.NextType;\r\n\r\n                        Subtitle = GetSubtitle();\r\n                        NotifyOfPropertyChange(() => Subtitle);\r\n\r\n                        var length = _type as ILength;\r\n                        CodeLength = length != null ? length.Length.Value : Constants.DefaultCodeLength;\r\n                        NotifyOfPropertyChange(() => CodeLength);\r\n                    }\r\n\r\n                    _startTime = DateTime.Now;\r\n                    _callTimer.Start();\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    _isResending = false;\r\n                    IsWorking = false;\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"auth.resendCode error \" + error);\r\n                }));\r\n        }\r\n\r\n        private string GetSubtitle()\r\n        {\r\n            if (_type is TLSentCodeTypeApp)\r\n            {\r\n                return AppResources.CodeSentToTelegramApp;\r\n            }\r\n\r\n            if (_type is TLSentCodeTypeSms)\r\n            {\r\n                return string.Format(AppResources.ConfirmMessage, PhoneNumberConverter.Convert(StateService.PhoneNumber));\r\n            }\r\n\r\n            if (_type is TLSentCodeTypeCall)\r\n            {\r\n                return string.Format(AppResources.CodeSentViaCallingPhone, PhoneNumberConverter.Convert(StateService.PhoneNumber));\r\n            }\r\n\r\n            return string.Empty;\r\n        }\r\n\r\n        public bool CanConfirm\r\n        {\r\n            get { return !string.IsNullOrEmpty(Code); }\r\n        }\r\n\r\n        public void Confirm()\r\n        {\r\n            IsWorking = true;\r\n            StateService.PhoneCode = new TLString(Code);\r\n            MTProtoService.VerifyPhoneAsync(\r\n                StateService.PhoneNumber, \r\n                StateService.PhoneCodeHash, \r\n                StateService.PhoneCode,\r\n                auth => BeginOnUIThread(() =>\r\n                {\r\n                    TimeCounterString = string.Empty;\r\n                    HelpVisibility = Visibility.Collapsed;\r\n                    _callTimer.Stop();\r\n\r\n                    _isProcessing = false;\r\n\r\n                    var phoneNumberValue = _phoneNumberValue;\r\n                    if (phoneNumberValue == null)\r\n                    {\r\n                        var secureRequiredType = _secureRequiredType != null ? _secureRequiredType.DataRequiredType as TLSecureRequiredType : null;\r\n                        var secureType = secureRequiredType != null && PhoneNumberViewModel.IsValidType(secureRequiredType.Type)\r\n                            ? secureRequiredType.Type\r\n                            : null;\r\n\r\n                        // add new phone number from passport settings\r\n                        if (_secureType != null && PhoneNumberViewModel.IsValidType(_secureType))\r\n                        {\r\n                            phoneNumberValue = new TLSecureValue85\r\n                            {\r\n                                Flags = new TLInt(0),\r\n                                Type = _secureType\r\n                            };\r\n                        }\r\n                        // add new phone number from authorization form\r\n                        else if (secureType != null)\r\n                        {\r\n                            phoneNumberValue = new TLSecureValue85\r\n                            {\r\n                                Flags = new TLInt(0),\r\n                                Type = secureType\r\n                            };\r\n                        }\r\n                        else\r\n                        {\r\n                            return;\r\n                        }\r\n                    }\r\n\r\n                    IsWorking =\r\n                    PhoneNumberViewModel.SavePhoneAsync(\r\n                        StateService.PhoneNumber, _passwordBase as TLPassword, MTProtoService,\r\n                        result => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            if (_authorizationForm != null)\r\n                            {\r\n                                _authorizationForm.Values.Remove(_phoneNumberValue);\r\n                                _authorizationForm.Values.Add(result);\r\n                            }\r\n\r\n                            phoneNumberValue.Update(result);\r\n                            phoneNumberValue.NotifyOfPropertyChange(() => phoneNumberValue.Self);\r\n\r\n                            if (_secureType != null)\r\n                            {\r\n                                EventAggregator.Publish(new AddSecureValueEventArgs { Values = new List<TLSecureValue> { phoneNumberValue } });\r\n                            }\r\n                            \r\n                            if (_secureRequiredType != null)\r\n                            {\r\n                                _secureRequiredType.UpdateValue();\r\n                            }\r\n\r\n                            NavigationService.RemoveBackEntry();\r\n                            NavigationService.GoBack();\r\n                        }),\r\n                        error => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n\r\n                            if (error.CodeEquals(ErrorCode.BAD_REQUEST)\r\n                                && error.TypeEquals(ErrorType.PHONE_VERIFICATION_NEEDED))\r\n                            {\r\n                                MTProtoService.SendVerifyPhoneCodeAsync(StateService.PhoneNumber, null,\r\n                                    sentCode => BeginOnUIThread(() =>\r\n                                    {\r\n                                        StateService.PhoneCodeHash = sentCode.PhoneCodeHash;\r\n                                        StateService.PhoneRegistered = sentCode.PhoneRegistered;\r\n\r\n                                        Timeout = sentCode.SendCallTimeout;\r\n                                        ResendCodeVisibility = Timeout != null && Timeout.Value > 0\r\n                                            ? Visibility.Collapsed\r\n                                            : Visibility.Visible;\r\n\r\n                                        var sentCode50 = sentCode as TLSentCode50;\r\n                                        if (sentCode50 != null)\r\n                                        {\r\n                                            _type = sentCode50.Type;\r\n                                            _nextType = sentCode50.NextType;\r\n\r\n                                            Subtitle = GetSubtitle();\r\n                                            NotifyOfPropertyChange(() => Subtitle);\r\n\r\n                                            var length = _type as ILength;\r\n                                            CodeLength = length != null ? length.Length.Value : Constants.DefaultCodeLength;\r\n                                            NotifyOfPropertyChange(() => CodeLength);\r\n                                        }\r\n                                    }),\r\n                                    error2 => BeginOnUIThread(() =>\r\n                                    {\r\n                                        if (error.TypeEquals(ErrorType.PHONE_NUMBER_INVALID))\r\n                                        {\r\n                                            ShellViewModel.ShowCustomMessageBox(AppResources.PhoneNumberInvalidString, AppResources.Error, AppResources.Ok);\r\n                                        }\r\n                                        else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                                        {\r\n                                            ShellViewModel.ShowCustomMessageBox(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, AppResources.Ok);\r\n                                        }\r\n                                        else\r\n                                        {\r\n                                            Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.sendVerifyPhoneCode error \" + error);\r\n                                        }\r\n                                    }));\r\n                            }\r\n                        }));\r\n                }),\r\n                error => BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (error.TypeEquals(ErrorType.PHONE_CODE_INVALID))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.PhoneCodeInvalidString, AppResources.Error, AppResources.Ok);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_CODE_EMPTY))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.PhoneCodeEmpty, AppResources.Error, AppResources.Ok);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.PHONE_NUMBER_INVALID))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.PhoneNumberInvalidString, AppResources.Error, AppResources.Ok);\r\n                    }\r\n                    else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, AppResources.Ok);\r\n                    }\r\n                    else\r\n                    {\r\n                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.verifyPhone error \" + error);\r\n                    }\r\n                }));\r\n        }\r\n\r\n        private bool _isProcessing;\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (_isProcessing) return;\r\n\r\n            _isProcessing = true;\r\n\r\n            Subtitle = GetSubtitle();\r\n\r\n            if (Timeout != null)\r\n            {\r\n                TimeCounter = Timeout.Value;\r\n            }\r\n            _startTime = DateTime.Now;\r\n            _callTimer.Start();\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void OnBackKeyPress()\r\n        {\r\n            _isProcessing = false;\r\n            Code = string.Empty;\r\n            _callTimer.Stop();\r\n            TimeCounterString = \" \";\r\n#if DEBUG\r\n            HelpVisibility = Visibility.Visible;\r\n#else\r\n            HelpVisibility = Visibility.Collapsed;\r\n#endif\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Passport/PhoneNumberViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Passport\r\n{\r\n    public class PhoneNumberViewModel : ViewModelBase\r\n    {\r\n        private Country _selectedCountry;\r\n\r\n        public Country SelectedCountry\r\n        {\r\n            get { return _selectedCountry; }\r\n            set { SetField(ref _selectedCountry, value, () => SelectedCountry); }\r\n        }\r\n\r\n        public bool IsPhoneCodeInvalid\r\n        {\r\n            get { return string.IsNullOrEmpty(PhoneCode) || CountryUtils.CountriesSource.FirstOrDefault(x => x.PhoneCode == PhoneCode) == null; }\r\n        }\r\n\r\n        private string _phoneCode;\r\n\r\n        public string PhoneCode\r\n        {\r\n            get { return _phoneCode; }\r\n            set\r\n            {\r\n                SetField(ref _phoneCode, value, () => PhoneCode);\r\n                Country country = null;\r\n                foreach (var c in CountryUtils.CountriesSource)\r\n                {\r\n                    if (c.PhoneCode == PhoneCode)\r\n                    {\r\n                        if (c.PhoneCode == \"1\" && c.Code != \"us\")\r\n                        {\r\n                            continue;\r\n                        }\r\n\r\n                        if (c.PhoneCode == \"7\" && c.Code != \"ru\")\r\n                        {\r\n                            continue;\r\n                        }\r\n\r\n                        country = c;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (country != null)\r\n                {\r\n                    SelectedCountry = country;\r\n                }\r\n\r\n                NotifyOfPropertyChange(() => IsPhoneCodeInvalid);\r\n            }\r\n        }\r\n\r\n        private string _phoneNumber;\r\n\r\n        public string PhoneNumber\r\n        {\r\n            get { return _phoneNumber; }\r\n            set { SetField(ref _phoneNumber, value, () => PhoneNumber); }\r\n        }\r\n\r\n        public string UseCurrentPhoneCommand\r\n        {\r\n            get { return string.Format(AppResources.PassportPhoneUseSame, \"+\" + CurrentPhone); }\r\n        }\r\n\r\n        public string CurrentPhone { get; set; }\r\n\r\n        public TLRPCError Error { get; set; }\r\n        \r\n        public static bool IsValidType(TLSecureValueTypeBase type)\r\n        {\r\n            return type is TLSecureValueTypePhone;\r\n        }\r\n\r\n        private readonly TLSecureValue _phoneNumberValue;\r\n\r\n        private readonly TLPasswordBase _passwordBase;\r\n\r\n        private readonly TLAuthorizationForm _authorizationForm;\r\n\r\n        private readonly IList<TLSecureValue> _secureValues;\r\n\r\n        private readonly TLSecureValueTypeBase _secureType;\r\n\r\n        private readonly SecureRequiredType _secureRequiredType;\r\n\r\n        public PhoneNumberViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _passwordBase = stateService.Password;\r\n            stateService.Password = null;\r\n\r\n            _authorizationForm = stateService.AuthorizationForm;\r\n            stateService.AuthorizationForm = null;\r\n\r\n            _secureValues = stateService.SecureValues;\r\n            stateService.SecureValues = null;\r\n\r\n            _secureType = stateService.SecureType;\r\n            stateService.SecureType = null;\r\n\r\n            _secureRequiredType = stateService.SecureRequiredType;\r\n            stateService.SecureRequiredType = null;\r\n\r\n            var user = CacheService.GetUser(new TLInt(StateService.CurrentUserId));\r\n            if (user != null && user.HasPhone)\r\n            {\r\n                CurrentPhone = user.Phone.ToString();\r\n            }\r\n\r\n            _phoneNumberValue = _secureRequiredType != null ? _secureRequiredType.DataValue : null;\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.SelectedCountry != null)\r\n            {\r\n                var country = StateService.SelectedCountry;\r\n                StateService.SelectedCountry = null;\r\n                OnCountrySelected(country);\r\n            }\r\n            base.OnActivate();\r\n        }\r\n\r\n        public void SelectCountry()\r\n        {\r\n            StateService.HideCountryCode = true;\r\n            NavigationService.UriFor<ChooseCountryViewModel>().Navigate();\r\n        }\r\n\r\n        private void OnCountrySelected(Country country)\r\n        {\r\n            SelectedCountry = country;\r\n            _phoneCode = SelectedCountry.PhoneCode;\r\n            NotifyOfPropertyChange(() => PhoneCode);\r\n        }\r\n\r\n        public void UseCurrentPhone()\r\n        {\r\n            if (!IsPhoneNumberValid(CurrentPhone)) return;\r\n\r\n            SavePhoneAsync(new TLString(CurrentPhone));\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (!IsPhoneNumberValid(PhoneCode + PhoneNumber)) return;\r\n            if (IsWorking) return;\r\n\r\n            SavePhoneAsync(new TLString(PhoneCode + PhoneNumber));\r\n        }\r\n\r\n        public bool IsPhoneNumberValid(string phoneNumber)\r\n        {\r\n            var phoneNumberLength = string.IsNullOrEmpty(phoneNumber) ? 0 : phoneNumber.Length;\r\n            return !IsWorking && phoneNumberLength >= 3;\r\n        }\r\n\r\n        public static bool SavePhoneAsync(TLString phone, TLPassword password, IMTProtoService mtProtoService, Action<TLSecureValue> callback, Action<TLRPCError> faultCallback = null)\r\n        {\r\n            if (password == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            var passwordSettings = password.Settings as TLPasswordSettings83;\r\n            if (passwordSettings == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            var inputSecureValue = new TLInputSecureValue85\r\n            {\r\n                Flags = new TLInt(0),\r\n                Type = new TLSecureValueTypePhone(),\r\n                PlainData = new TLSecurePlainPhone { Phone = phone }\r\n            };\r\n\r\n            var secureSecretId = passwordSettings.SecureSettings.SecureSecretId;\r\n\r\n            mtProtoService.SaveSecureValueAsync(\r\n                inputSecureValue, secureSecretId,\r\n                callback.SafeInvoke,\r\n                faultCallback.SafeInvoke);\r\n\r\n            return true;\r\n        }\r\n\r\n        private void SavePhoneAsync(TLString phone)\r\n        {\r\n            var phoneNumberValue = _phoneNumberValue;\r\n            if (phoneNumberValue == null)\r\n            {\r\n                var secureRequiredType = _secureRequiredType != null ? _secureRequiredType.DataRequiredType as TLSecureRequiredType : null;\r\n                var secureType = secureRequiredType != null && IsValidType(secureRequiredType.Type)\r\n                    ? secureRequiredType.Type\r\n                    : null;\r\n\r\n                // add new phone number from passport settings\r\n                if (_secureType != null && IsValidType(_secureType))\r\n                {\r\n                    phoneNumberValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = _secureType\r\n                    };\r\n                }\r\n                // add new phone number from authorization form\r\n                else if (secureType != null)\r\n                {\r\n                    phoneNumberValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = secureType\r\n                    };\r\n                }\r\n                else\r\n                {\r\n                    return;\r\n                }\r\n            }\r\n\r\n            IsWorking =\r\n                SavePhoneAsync(\r\n                    phone, _passwordBase as TLPassword, MTProtoService,\r\n                    result => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n                        if (_authorizationForm != null)\r\n                        {\r\n                            _authorizationForm.Values.Remove(phoneNumberValue);\r\n                            _authorizationForm.Values.Add(result);\r\n                        }\r\n\r\n                        phoneNumberValue.Update(result);\r\n                        phoneNumberValue.NotifyOfPropertyChange(() => phoneNumberValue.Self);\r\n\r\n                        if (_secureType != null)\r\n                        {\r\n                            EventAggregator.Publish(new AddSecureValueEventArgs { Values = new List<TLSecureValue> { phoneNumberValue } });\r\n                        }\r\n\r\n                        if (_secureRequiredType != null)\r\n                        {\r\n                            _secureRequiredType.UpdateValue();\r\n                        }\r\n\r\n                        NavigationService.GoBack();\r\n                    }),\r\n                    error => Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        IsWorking = false;\r\n\r\n                        if (error.CodeEquals(ErrorCode.BAD_REQUEST)\r\n                            && error.TypeEquals(ErrorType.PHONE_VERIFICATION_NEEDED))\r\n                        {\r\n                            MTProtoService.SendVerifyPhoneCodeAsync(phone, null,\r\n                                result2 => BeginOnUIThread(() =>\r\n                                {\r\n                                    StateService.PhoneNumber = phone;\r\n                                    StateService.PhoneNumberString = string.Format(AppResources.ConfirmMessage, PhoneNumberConverter.Convert(StateService.PhoneNumber));\r\n                                    StateService.PhoneCodeHash = result2.PhoneCodeHash;\r\n                                    StateService.PhoneRegistered = result2.PhoneRegistered;\r\n                                    StateService.SendCallTimeout = result2.SendCallTimeout;\r\n                                    var sentCode50 = result2 as TLSentCode50;\r\n                                    if (sentCode50 != null)\r\n                                    {\r\n                                        StateService.Type = sentCode50.Type;\r\n                                        StateService.NextType = sentCode50.NextType;\r\n                                    }\r\n                                    StateService.Password = _passwordBase;\r\n                                    StateService.AuthorizationForm = _authorizationForm;\r\n                                    StateService.SecureValues = _secureValues;\r\n                                    StateService.SecureType = _secureType;\r\n                                    StateService.SecureRequiredType = _secureRequiredType;\r\n                                    NavigationService.UriFor<PhoneNumberCodeViewModel>().Navigate();\r\n                                }),\r\n                                error2 => BeginOnUIThread(() =>\r\n                                {\r\n                                    if (error.TypeEquals(ErrorType.PHONE_NUMBER_INVALID))\r\n                                    {\r\n                                        ShellViewModel.ShowCustomMessageBox(AppResources.PhoneNumberInvalidString, AppResources.Error, AppResources.Ok);\r\n                                    }\r\n                                    else if (error.CodeEquals(ErrorCode.FLOOD))\r\n                                    {\r\n                                        ShellViewModel.ShowCustomMessageBox(AppResources.FloodWaitString + Environment.NewLine + \"(\" + error.Message + \")\", AppResources.Error, AppResources.Ok);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        Telegram.Api.Helpers.Execute.ShowDebugMessage(\"account.sendVerifyPhoneCode error \" + error);\r\n                                    }\r\n                                }));\r\n                        }\r\n                        else if (error.TypeEquals(ErrorType.PHONE_NUMBER_INVALID))\r\n                        {\r\n                            ShellViewModel.ShowCustomMessageBox(AppResources.PhoneNumberInvalidString, AppResources.Error, AppResources.Ok);\r\n                        }\r\n                        else if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                        {\r\n                            ShellViewModel.ShowCustomMessageBox(\r\n                               \"account.saveSecureValue\" + Environment.NewLine + error.Message,\r\n                               AppResources.AppName,\r\n                               AppResources.Ok);\r\n                        }\r\n                    }));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Passport/ResidentialAddressViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing Windows.Storage;\r\nusing Windows.Storage.Pickers;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views.Additional;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Passport\r\n{\r\n    public class ResidentialAddressViewModel : ViewModelBase, Telegram.Api.Aggregator.IHandle<UploadableItem>, Telegram.Api.Aggregator.IHandle<UploadProgressChangedEventArgs>\r\n    {\r\n        public ObservableCollection<string> Errors { get; protected set; }\r\n\r\n        private string _streetLine1;\r\n\r\n        public string StreetLine1\r\n        {\r\n            get { return _streetLine1; }\r\n            set\r\n            {\r\n                if (_streetLine1 != value)\r\n                {\r\n                    _streetLine1 = value;\r\n                    if (!string.IsNullOrEmpty(StreetLine1Error))\r\n                    {\r\n                        StreetLine1Error = null;\r\n                        NotifyOfPropertyChange(() => StreetLine1Error);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string StreetLine1Error { get; set; }\r\n\r\n        private string _streetLine2;\r\n\r\n        public string StreetLine2\r\n        {\r\n            get { return _streetLine2; }\r\n            set\r\n            {\r\n                if (_streetLine2 != value)\r\n                {\r\n                    _streetLine2 = value;\r\n                    if (!string.IsNullOrEmpty(StreetLine2Error))\r\n                    {\r\n                        StreetLine2Error = null;\r\n                        NotifyOfPropertyChange(() => StreetLine2Error);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string StreetLine2Error { get; set; }\r\n\r\n        private string _postCode;\r\n\r\n        public string PostCode\r\n        {\r\n            get { return _postCode; }\r\n            set\r\n            {\r\n                if (_postCode != value)\r\n                {\r\n                    _postCode = value;\r\n                    if (!Utils.Passport.IsValidPostCode(_postCode))\r\n                    {\r\n                        PostCodeError = AppResources.PassportUseLatinOnly;\r\n                        NotifyOfPropertyChange(() => PostCodeError);\r\n                    }\r\n                    else if (!string.IsNullOrEmpty(PostCodeError))\r\n                    {\r\n                        PostCodeError = null;\r\n                        NotifyOfPropertyChange(() => PostCodeError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string PostCodeError { get; set; }\r\n\r\n        private string _city;\r\n\r\n        public string City\r\n        {\r\n            get { return _city; }\r\n            set\r\n            {\r\n                if (_city != value)\r\n                {\r\n                    _city = value;\r\n                    if (!string.IsNullOrEmpty(CityError))\r\n                    {\r\n                        CityError = null;\r\n                        NotifyOfPropertyChange(() => CityError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string CityError { get; set; }\r\n\r\n        private string _state;\r\n\r\n        public string State\r\n        {\r\n            get { return _state; }\r\n            set\r\n            {\r\n                if (_state != value)\r\n                {\r\n                    _state = value;\r\n                    if (!string.IsNullOrEmpty(StateError))\r\n                    {\r\n                        StateError = null;\r\n                        NotifyOfPropertyChange(() => StateError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string StateError { get; set; }\r\n\r\n        private Country _selectedCountry;\r\n\r\n        public Country SelectedCountry\r\n        {\r\n            get { return _selectedCountry; }\r\n            set\r\n            {\r\n                if (_selectedCountry != value)\r\n                {\r\n                    SetField(ref _selectedCountry, value, () => SelectedCountry);\r\n                    if (!string.IsNullOrEmpty(SelectedCountryError))\r\n                    {\r\n                        SelectedCountryError = null;\r\n                        NotifyOfPropertyChange(() => SelectedCountryError);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public string SelectedCountryError { get; set; }\r\n\r\n        public string FilesError { get; set; }\r\n\r\n        public string TranslationsError { get; set; }\r\n\r\n        public TLRPCError Error { get; set; }\r\n\r\n        public string Caption\r\n        {\r\n            get\r\n            {\r\n                if (_secureType != null)\r\n                {\r\n                    return SecureRequiredTypeToCaptionConverter.Convert(_secureType);\r\n                }\r\n                if (_dataProofValue != null)\r\n                {\r\n                    return SecureRequiredTypeToCaptionConverter.Convert(_dataProofValue.Type);\r\n                }\r\n                if (_dataValue != null)\r\n                {\r\n                    return SecureRequiredTypeToCaptionConverter.Convert(_dataValue.Type);\r\n                }\r\n                if (_secureRequiredType != null)\r\n                {\r\n                    var type = _secureRequiredType.SelectedDataProofRequiredType;\r\n                    if (type != null)\r\n                    {\r\n                        return SecureRequiredTypeToCaptionConverter.Convert(type.Type);\r\n                    }\r\n                }\r\n                //if (_authorizationForm != null)\r\n                //{\r\n                //    var type = _authorizationForm.RequiredTypes.FirstOrDefault(IsValidProofType);\r\n                //    if (type != null)\r\n                //    {\r\n                //        return SecureRequiredTypeToCaptionConverter.Convert(type);\r\n                //    }\r\n                //}\r\n\r\n                return AppResources.PassportResidentialAddress;\r\n            }\r\n        }\r\n\r\n        public string AttachDocumentHint\r\n        {\r\n            get\r\n            {\r\n                TLSecureValueTypeBase type = null;\r\n                if (_secureType != null)\r\n                {\r\n                    type = _secureType;\r\n                }\r\n                else if (_dataProofValue != null)\r\n                {\r\n                    type = _dataProofValue.Type;\r\n                }\r\n                else if (_secureRequiredType != null && _secureRequiredType.SelectedDataProofRequiredType != null)\r\n                {\r\n                    type = _secureRequiredType.SelectedDataProofRequiredType.Type;\r\n                }\r\n                //else if (_authorizationForm != null)\r\n                //{\r\n                //    type = _authorizationForm.RequiredTypes.FirstOrDefault(IsValidProofType);\r\n                //}\r\n\r\n                if (type != null)\r\n                {\r\n                    if (type is TLSecureValueTypeUtilityBill)\r\n                    {\r\n                        return AppResources.PassportAddBillInfo;\r\n                    }\r\n                    if (type is TLSecureValueTypeBankStatement)\r\n                    {\r\n                        return AppResources.PassportAddBankInfo;\r\n                    }\r\n                    if (type is TLSecureValueTypeRentalAgreement)\r\n                    {\r\n                        return AppResources.PassportAddAgreementInfo;\r\n                    }\r\n                    if (type is TLSecureValueTypePassportRegistration)\r\n                    {\r\n                        return AppResources.PassportAddPassportRegistrationInfo;\r\n                    }\r\n                    if (type is TLSecureValueTypeTemporaryRegistration)\r\n                    {\r\n                        return AppResources.PassportAddTemporaryRegistrationInfo;\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public string AttachDocumentCommand\r\n        {\r\n            get\r\n            {\r\n                if (Files.Count > 0)\r\n                {\r\n                    return AppResources.PassportUploadAdditinalDocument;\r\n                }\r\n\r\n                return AppResources.PassportUploadDocument;\r\n            }\r\n        }\r\n\r\n        public string DeleteCommand\r\n        {\r\n            get\r\n            {\r\n                if (_dataValue != null && _dataProofValue == null)\r\n                {\r\n                    return AppResources.PassportDelete;\r\n                }\r\n\r\n                return AppResources.PassportDeleteDocument;\r\n            }\r\n        }\r\n\r\n        public ObservableCollection<TLSecureFileBase> Files { get; set; }\r\n\r\n        public string AttachTranslationHint\r\n        {\r\n            get\r\n            {\r\n                TLSecureValueTypeBase type = null;\r\n                if (_secureType != null)\r\n                {\r\n                    type = _secureType;\r\n                }\r\n                else if (_dataProofValue != null)\r\n                {\r\n                    type = _dataProofValue.Type;\r\n                }\r\n                else if (_secureRequiredType != null && _secureRequiredType.SelectedDataProofRequiredType != null)\r\n                {\r\n                    type = _secureRequiredType.SelectedDataProofRequiredType.Type;\r\n                }\r\n                //else if (_authorizationForm != null)\r\n                //{\r\n                //    type = _authorizationForm.RequiredTypes.FirstOrDefault(IsValidProofType);\r\n                //}\r\n\r\n                if (type != null)\r\n                {\r\n                    if (type is TLSecureValueTypeUtilityBill)\r\n                    {\r\n                        return AppResources.PassportAddTranslationBillInfo;\r\n                    }\r\n                    if (type is TLSecureValueTypeBankStatement)\r\n                    {\r\n                        return AppResources.PassportAddTranslationBankInfo;\r\n                    }\r\n                    if (type is TLSecureValueTypeRentalAgreement)\r\n                    {\r\n                        return AppResources.PassportAddTranslationAgreementInfo;\r\n                    }\r\n                    if (type is TLSecureValueTypePassportRegistration)\r\n                    {\r\n                        return AppResources.PassportAddTranslationPassportRegistrationInfo;\r\n                    }\r\n                    if (type is TLSecureValueTypeTemporaryRegistration)\r\n                    {\r\n                        return AppResources.PassportAddTranslationTemporaryRegistrationInfo;\r\n                    }\r\n                }\r\n\r\n                return AppResources.PassportAddTranslationUploadInfo;\r\n            }\r\n        }\r\n\r\n        public string AttachTranslationCommand\r\n        {\r\n            get\r\n            {\r\n                if (Translations.Count > 0)\r\n                {\r\n                    return AppResources.PassportUploadAdditinalDocument;\r\n                }\r\n\r\n                return AppResources.PassportUploadDocument;\r\n            }\r\n        }\r\n\r\n        public ObservableCollection<TLSecureFileBase> Translations { get; set; }\r\n\r\n        public bool IsFileUploading\r\n        {\r\n            get\r\n            {\r\n                foreach (var file in Files)\r\n                {\r\n                    if (file.UploadingProgress > 0.0 && file.UploadingProgress < 1.0)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                foreach (var file in Translations)\r\n                {\r\n                    if (file.UploadingProgress > 0.0 && file.UploadingProgress < 1.0)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsDataProofEnabled\r\n        {\r\n            get\r\n            {\r\n                if (_secureRequiredType != null && _secureRequiredType.SelectedDataProofRequiredType != null)\r\n                {\r\n                    return IsValidProofType(_secureRequiredType.SelectedDataProofRequiredType.Type);\r\n                }\r\n                //if (_authorizationForm != null)\r\n                //{\r\n                //    return _authorizationForm.RequiredTypes.Any(IsValidProofType);\r\n                //}\r\n                if (_secureType != null)\r\n                {\r\n                    return IsValidProofType(_secureType);\r\n                }\r\n\r\n                return _dataProofValue != null;\r\n            }\r\n        }\r\n\r\n        public bool IsDataProofTranslationEnabled\r\n        {\r\n            get\r\n            {\r\n                if (_secureRequiredType != null && _secureRequiredType.SelectedDataProofRequiredType != null)\r\n                {\r\n                    return _secureRequiredType.SelectedDataProofRequiredType.TranslationRequired;\r\n                }\r\n                if (_secureType != null)\r\n                {\r\n                    return false;   // Important: default value from Passport Settings page\r\n                }\r\n                if (_dataProofValue != null && _secureRequiredType == null)\r\n                {\r\n                    return false;   // Important: default value from Passport Settings page\r\n                }\r\n                if (_dataProofValue != null)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public bool IsDataEnabled\r\n        {\r\n            get\r\n            {\r\n                if (_secureRequiredType != null)\r\n                {\r\n                    return _secureRequiredType.DataRequiredType != null;\r\n                }\r\n                //if (_authorizationForm != null)\r\n                //{\r\n                //    return _authorizationForm.RequiredTypes.Any(IsValidDataType);\r\n                //}\r\n                if (_secureType != null)\r\n                {\r\n                    return IsValidDataType(_secureType);\r\n                }\r\n\r\n                return _dataValue != null;\r\n            }\r\n        }\r\n\r\n        public bool IsDeleteEnabled\r\n        {\r\n            get { return _dataValue != null || _dataProofValue != null; }\r\n        }\r\n\r\n        public static bool IsValidType(TLSecureValueTypeBase type)\r\n        {\r\n            return IsValidDataType(type)\r\n                || IsValidProofType(type);\r\n        }\r\n\r\n        public static bool IsValidDataType(TLSecureValueTypeBase type)\r\n        {\r\n            return type is TLSecureValueTypeAddress;\r\n        }\r\n\r\n        public static bool IsValidProofType(TLSecureValueTypeBase type)\r\n        {\r\n            return type is TLSecureValueTypeUtilityBill\r\n                || type is TLSecureValueTypeBankStatement\r\n                || type is TLSecureValueTypeRentalAgreement\r\n                || type is TLSecureValueTypePassportRegistration\r\n                || type is TLSecureValueTypeTemporaryRegistration;\r\n        }\r\n\r\n        private readonly TLAuthorizationForm _authorizationForm;\r\n\r\n        private readonly TLPasswordBase _passwordBase;\r\n\r\n        private readonly TLSecureValue _dataValue;\r\n\r\n        private readonly TLSecureValue _dataProofValue;\r\n\r\n        private readonly TLSecureValueTypeBase _secureType;\r\n\r\n        private readonly SecureRequiredType _secureRequiredType;\r\n\r\n        public ResidentialAddressViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Errors = new ObservableCollection<string>();\r\n\r\n            Translations = new ObservableCollection<TLSecureFileBase>();\r\n            Translations.CollectionChanged += (sender, args) =>\r\n            {\r\n                NotifyOfPropertyChange(() => AttachTranslationCommand);\r\n            };\r\n\r\n            Files = new ObservableCollection<TLSecureFileBase>();\r\n            Files.CollectionChanged += (sender, args) =>\r\n            {\r\n                NotifyOfPropertyChange(() => AttachDocumentCommand);\r\n            };\r\n\r\n            _authorizationForm = stateService.AuthorizationForm;\r\n            stateService.AuthorizationForm = null;\r\n\r\n            _passwordBase = stateService.Password;\r\n            stateService.Password = null;\r\n\r\n            var secureValue = StateService.SecureValue;\r\n            StateService.SecureValue = null;\r\n\r\n            _secureType = StateService.SecureType;\r\n            StateService.SecureType = null;\r\n\r\n            _secureRequiredType = StateService.SecureRequiredType;\r\n            StateService.SecureRequiredType = null;\r\n\r\n            _dataValue = GetData(_secureRequiredType, secureValue);\r\n            if (_dataValue != null && _dataValue.Data != null)\r\n            {\r\n                var rootObject = _dataValue.Data.DecryptedData as ResidentialAddressRootObject;\r\n                if (rootObject != null)\r\n                {\r\n                    _streetLine1 = rootObject.street_line1;\r\n                    _streetLine2 = rootObject.street_line2;\r\n                    _postCode = rootObject.post_code;\r\n                    _city = rootObject.city;\r\n                    _state = rootObject.state;\r\n                    if (!string.IsNullOrEmpty(rootObject.country_code))\r\n                    {\r\n                        var country = CountryUtils.CountriesSource.FirstOrDefault(x => string.Equals(rootObject.country_code, x.Code, StringComparison.OrdinalIgnoreCase));\r\n                        _selectedCountry = country;\r\n                    }\r\n                }\r\n            }\r\n\r\n            _dataProofValue = GetDataProof(_secureRequiredType, secureValue);\r\n            if (_dataProofValue != null)\r\n            {\r\n                foreach (var file in _dataProofValue.Files)\r\n                {\r\n                    Files.Add(file);\r\n                }\r\n            } \r\n            var dataProofValue85 = _dataProofValue as TLSecureValue85;\r\n            if (dataProofValue85 != null && dataProofValue85.Translation != null)\r\n            {\r\n                Translations.Clear();\r\n                foreach (var translation in dataProofValue85.Translation)\r\n                {\r\n                    Translations.Add(translation);\r\n                }\r\n            }\r\n\r\n\r\n            GetErrors(_authorizationForm);\r\n        }\r\n\r\n        private bool HasErrors()\r\n        {\r\n            if (IsDataProofEnabled)\r\n            {\r\n                if (Files != null && Files.Count > 0)\r\n                {\r\n                    foreach (var file in Files.OfType<ISecureFileError>())\r\n                    {\r\n                        if (!string.IsNullOrEmpty(file.Error))\r\n                        {\r\n                            Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.FILE_ERROR.ToString()) };\r\n                            NotifyOfPropertyChange(() => Error);\r\n                            return true;\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.FILES_EMPTY.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(FilesError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.FILES_EMPTY.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (IsDataProofTranslationEnabled)\r\n                {\r\n                    if (Translations != null && Translations.Count > 0)\r\n                    {\r\n                        foreach (var file in Translations.OfType<ISecureFileError>())\r\n                        {\r\n                            if (!string.IsNullOrEmpty(file.Error))\r\n                            {\r\n                                Error = new TLRPCError((int)ErrorCode.BAD_REQUEST)\r\n                                {\r\n                                    Message = new TLString(ErrorType.TRANSLATION_ERROR.ToString())\r\n                                };\r\n                                NotifyOfPropertyChange(() => Error);\r\n                                return true;\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.TRANSLATION_EMPTY.ToString()) };\r\n                        NotifyOfPropertyChange(() => Error);\r\n                        return true;\r\n                    }\r\n\r\n                    if (!string.IsNullOrEmpty(TranslationsError))\r\n                    {\r\n                        Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.TRANSLATION_EMPTY.ToString()) };\r\n                        NotifyOfPropertyChange(() => Error);\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (IsDataEnabled)\r\n            {\r\n                if (string.IsNullOrEmpty(StreetLine1) || !string.IsNullOrEmpty(StreetLine1Error))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.ADDRESS_STREET_LINE1_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(StreetLine2Error))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.ADDRESS_STREET_LINE2_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(PostCode) || !string.IsNullOrEmpty(PostCodeError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.ADDRESS_POSTCODE_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (string.IsNullOrEmpty(City) || !string.IsNullOrEmpty(CityError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.ADDRESS_CITY_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (!string.IsNullOrEmpty(StateError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.ADDRESS_STATE_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n\r\n                if (_selectedCountry == null || !string.IsNullOrEmpty(SelectedCountryError))\r\n                {\r\n                    Error = new TLRPCError((int)ErrorCode.BAD_REQUEST) { Message = new TLString(ErrorType.ADDRESS_COUNTRY_INVALID.ToString()) };\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            Error = null;\r\n            NotifyOfPropertyChange(() => Error);\r\n            return false;\r\n        }\r\n\r\n        private void GetErrors(TLAuthorizationForm form)\r\n        {\r\n            if (form == null) return;\r\n            if (form.Errors == null || form.Errors.Count == 0) return;\r\n\r\n            var dataFieldAction = new Dictionary<string, Action<TLSecureValueErrorBase>>\r\n            {\r\n                {\"street_line1\", error => { StreetLine1Error = error.Text.ToString(); }},\r\n                {\"street_line2\", error => { StreetLine2Error = error.Text.ToString(); }},\r\n                {\"post_code\", error => { PostCodeError = error.Text.ToString(); }},\r\n                {\"state\", error => { StateError = error.Text.ToString(); }},\r\n                {\"city\", error => { CityError = error.Text.ToString(); }},\r\n                {\"country_code\", error => { SelectedCountryError = error.Text.ToString(); }}\r\n            };\r\n\r\n            var errorTypeAction = new Dictionary<Type, Action<TLSecureValueErrorBase>>\r\n            {\r\n                {\r\n                    typeof(TLSecureValueError), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueError;\r\n                        if (error != null)\r\n                        {\r\n                            if (_secureRequiredType != null)\r\n                            {\r\n                                if (_secureRequiredType.DataRequiredType != null\r\n                                    && _secureRequiredType.DataRequiredType.Type.GetType() == error.Type.GetType())\r\n                                {\r\n                                    Errors.Add(error.Text.ToString());\r\n                                }\r\n                                else if (_secureRequiredType.SelectedDataProofRequiredType != null\r\n                                    && _secureRequiredType.SelectedDataProofRequiredType.Type.GetType() == error.Type.GetType())\r\n                                {\r\n                                    Errors.Add(error.Text.ToString());\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorData), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorData;\r\n                        if (error != null)\r\n                        {\r\n                            Action<TLSecureValueErrorBase> fieldAction;\r\n                            if (dataFieldAction.TryGetValue(error.Field.ToString(), out fieldAction))\r\n                            {\r\n                                fieldAction.SafeInvoke(error);\r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorFile), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorFile;\r\n                        if (error != null)\r\n                        {\r\n                            foreach (var file in Files.OfType<ISecureFileError>())\r\n                            {\r\n                                if (TLString.Equals(file.FileHash, error.FileHash, StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    file.Error = error.Text.ToString();\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorFiles), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorFiles;\r\n                        if (error != null)\r\n                        {\r\n                            FilesError = error.Text.ToString();\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorTranslationFile), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorTranslationFile;\r\n                        if (error != null)\r\n                        {\r\n                            foreach (var file in Translations.OfType<ISecureFileError>())\r\n                            {\r\n                                if (TLString.Equals(file.FileHash, error.FileHash, StringComparison.OrdinalIgnoreCase))\r\n                                {\r\n                                    file.Error = error.Text.ToString();\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                {\r\n                    typeof(TLSecureValueErrorTranslationFiles), errorBase =>\r\n                    {\r\n                        var error = errorBase as TLSecureValueErrorTranslationFiles;\r\n                        if (error != null)\r\n                        {\r\n                            TranslationsError = error.Text.ToString();\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n\r\n            Errors.Clear();\r\n            foreach (var error in _authorizationForm.Errors)\r\n            {\r\n                Action<TLSecureValueErrorBase> action;\r\n                if ((_dataValue != null && _dataValue.Type.GetType() == error.Type.GetType()\r\n                    || _dataProofValue != null && _dataProofValue.Type.GetType() == error.Type.GetType())\r\n                    && errorTypeAction.TryGetValue(error.GetType(), out action))\r\n                {\r\n                    action.SafeInvoke(error);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void RemoveDataErrors()\r\n        {\r\n            if (_authorizationForm != null && _authorizationForm.Errors != null)\r\n            {\r\n                for (var i = 0; i < _authorizationForm.Errors.Count; i++)\r\n                {\r\n                    var error = _authorizationForm.Errors[i];\r\n                    if (error != null && IsValidDataType(error.Type))\r\n                    {\r\n                        _authorizationForm.Errors.RemoveAt(i--);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void RemoveProofErrors()\r\n        {\r\n            if (_authorizationForm != null && _authorizationForm.Errors != null)\r\n            {\r\n                for (var i = 0; i < _authorizationForm.Errors.Count; i++)\r\n                {\r\n                    var error = _authorizationForm.Errors[i];\r\n                    if (error != null && IsValidProofType(error.Type))\r\n                    {\r\n                        _authorizationForm.Errors.RemoveAt(i--);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private TLSecureValue GetData(SecureRequiredType requiredType, TLSecureValue secureValue)\r\n        {\r\n            if (requiredType != null)\r\n            {\r\n                return requiredType.DataValue;\r\n            }\r\n\r\n            return secureValue != null && IsValidDataType(secureValue.Type) ? secureValue : null;\r\n        }\r\n\r\n        private TLSecureValue GetDataProof(SecureRequiredType requiredType, TLSecureValue secureValue)\r\n        {\r\n            if (requiredType != null)\r\n            {\r\n                return requiredType.DataProofValue;\r\n            }\r\n\r\n            return secureValue != null && IsValidProofType(secureValue.Type) ? secureValue : null;\r\n        }\r\n\r\n        public void AttachTranslation()\r\n        {\r\n            if (Translations.Count >= Constants.MaxPassportFilesCount)\r\n            {\r\n                ShellViewModel.ShowCustomMessageBox(string.Format(AppResources.PassportUploadMaxReached, Constants.MaxPassportFilesCount), AppResources.AppName,\r\n                    AppResources.Ok.ToLowerInvariant(), null,\r\n                    dismissed =>\r\n                    {\r\n\r\n                    });\r\n\r\n                return;\r\n            }\r\n\r\n            AttachDocument(\"Translation\");\r\n        }\r\n\r\n        public void AttachDocument()\r\n        {\r\n            if (Files.Count >= Constants.MaxPassportFilesCount)\r\n            {\r\n                ShellViewModel.ShowCustomMessageBox(string.Format(AppResources.PassportUploadMaxReached, Constants.MaxPassportFilesCount), AppResources.AppName,\r\n                    AppResources.Ok.ToLowerInvariant(), null,\r\n                    dismissed =>\r\n                    {\r\n\r\n                    });\r\n\r\n                return;\r\n            }\r\n\r\n            AttachDocument(\"Document\");\r\n        }\r\n\r\n        public async void AttachDocument(string type)\r\n        {\r\n\r\n            ((App)Application.Current).ChooseFileInfo = new ChooseFileInfo(DateTime.Now);\r\n            var picker = new FileOpenPicker();\r\n            picker.FileTypeFilter.Add(\".bmp\");\r\n            picker.FileTypeFilter.Add(\".jpg\");\r\n            picker.FileTypeFilter.Add(\".jpeg\");\r\n            picker.FileTypeFilter.Add(\".png\");\r\n            picker.ContinuationData.Add(\"From\", \"ResidentialAddressView\");\r\n            picker.ContinuationData.Add(\"Type\", type);\r\n\r\n            if (Environment.OSVersion.Version.Major >= 10)\r\n            {\r\n                var result = await picker.PickSingleFileAsync();\r\n                if (result != null)\r\n                {\r\n                    Execute.BeginOnThreadPool(() =>\r\n                    {\r\n                        SendDocument(type, result);\r\n                    });\r\n                }\r\n            }\r\n            else\r\n            {\r\n                picker.PickSingleFileAndContinue();\r\n            }\r\n        }\r\n\r\n        public async void SendDocument(string type, StorageFile file)\r\n        {\r\n            if (file == null) return;\r\n\r\n            var password = _passwordBase as TLPassword;\r\n            if (password == null) return;\r\n\r\n            var passwordSettings = password.Settings as TLPasswordSettings81;\r\n            if (passwordSettings == null) return;\r\n\r\n            var fileId = TLLong.Random();\r\n            var compressedFileName = string.Format(\"secureid_compressed_{0}.dat\", fileId);\r\n            var fileName = string.Format(\"secureid_{0}.dat\", fileId);\r\n            var previewFileName = string.Format(\"secureid_preview_{0}.dat\", fileId);\r\n            var localFileName = string.Format(\"document{0}_{1}.dat\", fileId, 0);\r\n\r\n            var inputStream = await file.OpenReadAsync();\r\n\r\n            await DialogDetailsViewModel.ResizeJpeg(inputStream, Constants.DefaultPassportImageSize, file.DisplayName, compressedFileName, 0.89);\r\n\r\n            file = await ApplicationData.Current.LocalFolder.GetFileAsync(compressedFileName);\r\n\r\n            var padding = await Utils.Passport.GenerateRandomPadding(file);\r\n            var fileSecret = Utils.Passport.GenerateSecret(TLString.Empty);\r\n            var fileHash = TLString.FromBigEndianData(await Utils.Passport.GetSha256(padding, file));\r\n\r\n            var fileSecureSecret = Utils.Passport.EncryptValueSecret(\r\n                fileSecret,\r\n                EnterPasswordViewModel.Secret,\r\n                fileHash);\r\n\r\n            var encryptedFile = await Utils.Passport.EncryptFile(fileName, file, fileSecret, fileHash, padding);\r\n            var stream = await file.OpenReadAsync();\r\n\r\n            await DialogDetailsViewModel.ResizeJpeg(stream, 180, localFileName, previewFileName);\r\n\r\n            int length;\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                using (var fileStream = store.OpenFile(fileName, FileMode.Open, FileAccess.Read, FileShare.Read))\r\n                {\r\n                    length = (int)fileStream.Length;\r\n                }\r\n            }\r\n\r\n            var secureFileUploaded = new TLSecureFileUploaded\r\n            {\r\n                Id = fileId,\r\n                Parts = null,\r\n                MD5Checksum = TLString.Empty,\r\n                Size = new TLInt(length),\r\n                Date = TLUtils.DateToUniversalTimeTLInt(MTProtoService.ClientTicksDelta, DateTime.Now),\r\n                FileHash = fileHash,\r\n                Secret = fileSecureSecret\r\n            };\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                switch (type)\r\n                {\r\n                    case \"Document\":\r\n                        Files.Add(secureFileUploaded);\r\n                        FilesError = null;\r\n                        NotifyOfPropertyChange(() => FilesError);\r\n                        break;\r\n                    case \"Translation\":\r\n                        Translations.Add(secureFileUploaded);\r\n                        TranslationsError = null;\r\n                        NotifyOfPropertyChange(() => TranslationsError);\r\n                        break;\r\n                }\r\n\r\n                NotifyOfPropertyChange(() => IsFileUploading);\r\n                secureFileUploaded.UploadingProgress = 0.01;\r\n                secureFileUploaded.UploadingSize = (int)(secureFileUploaded.Size.Value * secureFileUploaded.UploadingProgress);\r\n                var documentFileManager = IoC.Get<IUploadFileManager>();\r\n                documentFileManager.UploadFile(fileId, secureFileUploaded, encryptedFile);\r\n            });\r\n        }\r\n\r\n        public void DeleteFile(TLSecureFileBase file)\r\n        {\r\n            if (file == null) return;\r\n\r\n            ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeleteScanAlert, AppResources.AppName,\r\n                AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        Files.Remove(file);\r\n                        Translations.Remove(file);\r\n                    }\r\n                });\r\n        }\r\n\r\n        public void Delete()\r\n        {\r\n            if (_dataValue == null && _dataProofValue == null)\r\n            {\r\n                NavigationService.GoBack();\r\n                return;\r\n            }\r\n\r\n            if (_dataValue != null && _dataProofValue != null)\r\n            {\r\n                object content = null;\r\n                var textBlock = new TextBlock { IsHitTestVisible = false };\r\n                var checkBox = new CheckBox { IsChecked = true, IsHitTestVisible = false };\r\n                if (_dataValue != null)\r\n                {\r\n                    textBlock.SetValue(TextBlock.FontSizeProperty, DependencyProperty.UnsetValue);\r\n\r\n                    var text = AppResources.PassportDeleteAddressDetails;\r\n                    textBlock.Margin = new Thickness(-18.0, 0.0, 12.0, 0.0);\r\n                    textBlock.Text = text;\r\n                    textBlock.VerticalAlignment = VerticalAlignment.Center;\r\n\r\n                    var panel = new StackPanel { Orientation = Orientation.Horizontal, Margin = new Thickness(0.0, -2.0, 0.0, -20.0), Background = new SolidColorBrush(Colors.Transparent) };\r\n                    panel.Tap += (sender, args) =>\r\n                    {\r\n                        checkBox.IsChecked = !checkBox.IsChecked;\r\n                    };\r\n                    panel.Children.Add(checkBox);\r\n                    panel.Children.Add(textBlock);\r\n                    content = panel;\r\n                }\r\n                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeleteDocumentAlert, AppResources.AppName,\r\n                    AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                    dismissed =>\r\n                    {\r\n                        if (dismissed == CustomMessageBoxResult.RightButton)\r\n                        {\r\n                            var deleteData = _dataValue != null && checkBox.IsChecked == true;\r\n                            var values = new TLVector<TLSecureValue> { _dataProofValue };\r\n                            var types = new TLVector<TLSecureValueTypeBase> { _dataProofValue.Type };\r\n                            if (deleteData)\r\n                            {\r\n                                values.Add(_dataValue);\r\n                                types.Add(_dataValue.Type);\r\n                            }\r\n                            IsWorking = true;\r\n                            MTProtoService.DeleteSecureValueAsync(\r\n                                types,\r\n                                result => BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                    if (_authorizationForm != null)\r\n                                    {\r\n                                        foreach (var value in values)\r\n                                        {\r\n                                            _authorizationForm.Values.Remove(value);\r\n                                        }\r\n                                    }\r\n                                    RemoveDataErrors();\r\n                                    RemoveProofErrors();\r\n                                    if (_secureRequiredType != null)\r\n                                    {\r\n                                        _secureRequiredType.UpdateValue();\r\n                                    }\r\n                                    EventAggregator.Publish(new DeleteSecureValueEventArgs { Values = values });\r\n                                    NavigationService.GoBack();\r\n                                }),\r\n                                error => BeginOnUIThread(() =>\r\n                                {\r\n                                    IsWorking = false;\r\n                                }));\r\n                        }\r\n                    },\r\n                    content);\r\n\r\n                return;\r\n            }\r\n\r\n            // delete data\r\n            if (_dataValue != null)\r\n            {\r\n                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeleteAddressAlert, AppResources.AppName,\r\n                AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.DeleteSecureValueAsync(\r\n                            new TLVector<TLSecureValueTypeBase> { _dataValue.Type },\r\n                            result => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                if (_authorizationForm != null)\r\n                                {\r\n                                    _authorizationForm.Values.Remove(_dataValue);\r\n                                }\r\n                                RemoveDataErrors();\r\n                                if (_secureRequiredType != null)\r\n                                {\r\n                                    _secureRequiredType.UpdateValue();\r\n                                }\r\n                                EventAggregator.Publish(new DeleteSecureValueEventArgs { Values = new List<TLSecureValue> { _dataValue } });\r\n                                NavigationService.GoBack();\r\n                            }),\r\n                            error => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                            }));\r\n                    }\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            // delete proof\r\n            if (_dataProofValue != null)\r\n            {\r\n                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeleteDocumentAlert, AppResources.AppName,\r\n                AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                dismissed =>\r\n                {\r\n                    if (dismissed == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.DeleteSecureValueAsync(\r\n                            new TLVector<TLSecureValueTypeBase> { _dataProofValue.Type },\r\n                            result => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                if (_authorizationForm != null)\r\n                                {\r\n                                    _authorizationForm.Values.Remove(_dataProofValue);\r\n                                }\r\n                                RemoveProofErrors();\r\n                                if (_secureRequiredType != null)\r\n                                {\r\n                                    _secureRequiredType.UpdateValue();\r\n                                }\r\n                                EventAggregator.Publish(new DeleteSecureValueEventArgs { Values = new List<TLSecureValue> { _dataProofValue } });\r\n                                NavigationService.GoBack();\r\n                            }),\r\n                            error => BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                            }));\r\n                    }\r\n                });\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        public void Done()\r\n        {\r\n            if (IsFileUploading) return;\r\n            if (IsWorking) return;\r\n\r\n            SaveDataAsync(\r\n                () => SaveProofAsync(\r\n                    () => NavigationService.GoBack()));\r\n        }\r\n\r\n        private void SaveDataAsync(System.Action callback, System.Action faultCallback = null)\r\n        {\r\n            var password = _passwordBase as TLPassword;\r\n            if (password == null)\r\n            {\r\n                faultCallback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            var passwordSettings = password.Settings as TLPasswordSettings83;\r\n            if (passwordSettings == null)\r\n            {\r\n                faultCallback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            var dataValue = _dataValue;\r\n            if (dataValue == null)\r\n            {\r\n                var secureType =\r\n                    _secureRequiredType != null && _secureRequiredType.DataRequiredType != null\r\n                        ? _secureRequiredType.DataRequiredType.Type\r\n                        : null;\r\n\r\n                    //_authorizationForm != null\r\n                    //? _authorizationForm.RequiredTypes.FirstOrDefault(IsValidDataType)\r\n                    //: null;\r\n\r\n                // add new address from passport settings\r\n                if (_secureType != null && IsValidDataType(_secureType))\r\n                {\r\n                    dataValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = _secureType\r\n                    };\r\n                }\r\n                // add new address from authorization form\r\n                else if (secureType != null)\r\n                {\r\n                    dataValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = secureType\r\n                    };\r\n                }\r\n                else\r\n                {\r\n                    callback.SafeInvoke();\r\n                    return; \r\n                }\r\n            }\r\n\r\n            if (HasErrors())\r\n            {\r\n                faultCallback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            var rootObject = new ResidentialAddressRootObject\r\n            {\r\n                street_line1 = StreetLine1,\r\n                street_line2 = StreetLine2,\r\n                post_code = PostCode,\r\n                city = City,\r\n                state = State,\r\n                country_code = _selectedCountry.Code.ToUpperInvariant()\r\n            };\r\n\r\n            var data = JsonUtils.ToJSON(rootObject);\r\n            if (data == null) return;\r\n\r\n            var valueSecret = Utils.Passport.GenerateSecret(TLString.Empty);\r\n            var newSecureValue = Utils.Passport.EncryptSecureValue(\r\n                dataValue,\r\n                new TLString(data),\r\n                valueSecret,\r\n                EnterPasswordViewModel.Secret);\r\n            var secureSecretHash = passwordSettings.SecureSettings.SecureSecretId;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.SaveSecureValueAsync(\r\n                newSecureValue.ToInputSecureValue(), secureSecretHash,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    result.Data.DecryptedData = rootObject;\r\n                    if (_authorizationForm != null)\r\n                    {\r\n                        _authorizationForm.Values.Remove(dataValue);\r\n                        _authorizationForm.Values.Add(result);\r\n                    }\r\n\r\n                    RemoveDataErrors();\r\n\r\n                    dataValue.Update(result);\r\n                    dataValue.NotifyOfPropertyChange(() => dataValue.Self);\r\n\r\n                    if (_secureType != null)\r\n                    {\r\n                        EventAggregator.Publish(new AddSecureValueEventArgs{ Values = new List<TLSecureValue> { dataValue }});\r\n                    }\r\n                    if (_secureRequiredType != null)\r\n                    {\r\n                        _secureRequiredType.UpdateValue();\r\n                    }\r\n\r\n                    callback.SafeInvoke();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    \r\n                    if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(\r\n                           \"account.saveSecureValue\" + Environment.NewLine + error.Message,\r\n                           AppResources.AppName,\r\n                           AppResources.Ok);\r\n                    }\r\n\r\n                    faultCallback.SafeInvoke();\r\n                }));\r\n        }\r\n\r\n        private void SaveProofAsync(System.Action callback, System.Action faultCallback = null)\r\n        {\r\n            var password = _passwordBase as TLPassword;\r\n            if (password == null)\r\n            {\r\n                callback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            var passwordSettings = password.Settings as TLPasswordSettings83;\r\n            if (passwordSettings == null)\r\n            {\r\n                callback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            var dataProofValue = _dataProofValue;\r\n            if (dataProofValue == null)\r\n            {\r\n                var secureType =\r\n                    _secureRequiredType != null && _secureRequiredType.SelectedDataProofRequiredType != null\r\n                        ? _secureRequiredType.SelectedDataProofRequiredType.Type\r\n                        : null;\r\n\r\n                    //_authorizationForm != null ? \r\n                    //_authorizationForm.RequiredTypes.FirstOrDefault(IsValidProofType) \r\n                    //: null;\r\n\r\n                if (_secureType != null && IsValidProofType(_secureType))\r\n                {\r\n                    dataProofValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = _secureType\r\n                    };\r\n                }\r\n                else if (secureType != null)\r\n                {\r\n                    dataProofValue = new TLSecureValue85\r\n                    {\r\n                        Flags = new TLInt(0),\r\n                        Type = secureType\r\n                    };\r\n                }\r\n                else\r\n                {\r\n                    callback.SafeInvoke();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (HasErrors())\r\n            {\r\n                faultCallback.SafeInvoke();\r\n                return;\r\n            }\r\n\r\n            var files = new TLVector<TLInputSecureFileBase>();\r\n            foreach (var file in Files)\r\n            {\r\n                files.Add(file.ToInputSecureFile());\r\n            }\r\n\r\n            var secureSecretId = passwordSettings.SecureSettings.SecureSecretId;\r\n            var inputSecureValue = dataProofValue.ToInputSecureValue();\r\n            inputSecureValue.Files = files;\r\n\r\n            var inputSecureValue85 = inputSecureValue as TLInputSecureValue85;\r\n            if (inputSecureValue85 != null)\r\n            {\r\n                if (Translations.Count > 0)\r\n                {\r\n                    var translation = new TLVector<TLInputSecureFileBase>();\r\n                    foreach (var file in Translations)\r\n                    {\r\n                        translation.Add(file.ToInputSecureFile());\r\n                    }\r\n                    inputSecureValue85.Translation = translation;\r\n                }\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.SaveSecureValueAsync(\r\n                inputSecureValue, secureSecretId,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (_authorizationForm != null)\r\n                    {\r\n                        _authorizationForm.Values.Remove(dataProofValue);\r\n                        _authorizationForm.Values.Add(result);\r\n                    }\r\n                    RemoveProofErrors();\r\n\r\n                    dataProofValue.Update(result);\r\n                    dataProofValue.NotifyOfPropertyChange(() => dataProofValue.Self);\r\n\r\n                    if (_secureType != null)\r\n                    {\r\n                        EventAggregator.Publish(new AddSecureValueEventArgs { Values = new List<TLSecureValue> { dataProofValue } });\r\n                    }\r\n                    if (_secureRequiredType != null)\r\n                    {\r\n                        _secureRequiredType.UpdateValue();\r\n                    }\r\n\r\n                    callback.SafeInvoke();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    if (error.TypeEquals(ErrorType.FILES_EMPTY))\r\n                    {\r\n                        Error = error;\r\n                        NotifyOfPropertyChange(() => Error);\r\n                    }\r\n                    else if (error.TypeEquals(ErrorType.FILES_TOO_MUCH))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(\r\n                            string.Format(AppResources.PassportUploadMaxReached, Constants.MaxPassportFilesCount), \r\n                            AppResources.AppName,\r\n                            AppResources.Ok.ToLowerInvariant());\r\n                    }\r\n                    else if (error.CodeEquals(ErrorCode.BAD_REQUEST))\r\n                    {\r\n                        ShellViewModel.ShowCustomMessageBox(\r\n                           \"account.saveSecureValue\" + Environment.NewLine + error.Message,\r\n                           AppResources.AppName,\r\n                           AppResources.Ok);\r\n                    }\r\n\r\n                    faultCallback.SafeInvoke();\r\n                }));\r\n        }\r\n\r\n        public void OpenScan(TLSecureFileBase file)\r\n        {\r\n            return;\r\n            StateService.CurrentPhotoMessage = new TLMessage{Status = MessageStatus.Confirmed};\r\n            OpenImageViewer();\r\n        }\r\n\r\n        public void SelectCountry()\r\n        {\r\n            StateService.HideCountryCode = true;\r\n            NavigationService.UriFor<ChooseCountryViewModel>().Navigate();\r\n        }\r\n\r\n        private void OnCountrySelected(Country country)\r\n        {\r\n            SelectedCountry = country;\r\n        }\r\n\r\n        public ImageViewerViewModel ImageViewer { get; set; }\r\n\r\n        public void OpenImageViewer()\r\n        {\r\n            if (ImageViewer == null)\r\n            {\r\n                ImageViewer = new ImageViewerViewModel(StateService, null, false, true)\r\n                {\r\n                    //DialogDetails = this\r\n                };\r\n                NotifyOfPropertyChange(() => ImageViewer);\r\n            }\r\n            BeginOnUIThread(() => ImageViewer.OpenViewer());\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.SelectedCountry != null)\r\n            {\r\n                var country = StateService.SelectedCountry;\r\n                StateService.SelectedCountry = null;\r\n                OnCountrySelected(country);\r\n            }\r\n\r\n            EventAggregator.Subscribe(this);\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            EventAggregator.Unsubscribe(this);\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        public void Handle(UploadableItem item)\r\n        {\r\n            var secureFileUploaded = item.Owner as TLSecureFileUploaded;\r\n            if (secureFileUploaded != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    secureFileUploaded.UploadingProgress = 1.0;\r\n                    secureFileUploaded.UploadingSize = (int)(secureFileUploaded.Size.Value * secureFileUploaded.UploadingProgress);\r\n                    secureFileUploaded.Parts = new TLInt(item.Parts.Count);\r\n                    NotifyOfPropertyChange(() => IsFileUploading);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void Handle(UploadProgressChangedEventArgs args)\r\n        {\r\n            var secureFileUploaded = args.Item.Owner as TLSecureFileUploaded;\r\n            if (secureFileUploaded != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    secureFileUploaded.UploadingProgress = args.Progress;\r\n                    secureFileUploaded.UploadingSize = (int)(secureFileUploaded.Size.Value * secureFileUploaded.UploadingProgress);\r\n                    NotifyOfPropertyChange(() => IsFileUploading);\r\n                });\r\n            }\r\n        }\r\n    }\r\n\r\n    public class ResidentialAddressRootObject\r\n    {\r\n        public string street_line1 { get; set; }\r\n        public string street_line2 { get; set; }\r\n        public string city { get; set; }\r\n        public string state { get; set; }\r\n        public string country_code { get; set; }\r\n        public string post_code { get; set; }\r\n\r\n        public IEnumerable<string> Fields()\r\n        {\r\n            if (!string.IsNullOrEmpty(street_line1)) yield return street_line1;\r\n            if (!string.IsNullOrEmpty(street_line2)) yield return street_line2;\r\n            if (!string.IsNullOrEmpty(post_code)) yield return post_code;\r\n            if (!string.IsNullOrEmpty(city)) yield return city;\r\n            if (!string.IsNullOrEmpty(state)) yield return state;\r\n            if (!string.IsNullOrEmpty(country_code)) yield return country_code;\r\n        }\r\n\r\n        public IEnumerable<string> Fields(Func<string, string> getCountryByCode)\r\n        {\r\n            if (!string.IsNullOrEmpty(street_line1)) yield return street_line1;\r\n            if (!string.IsNullOrEmpty(street_line2)) yield return street_line2;\r\n            if (!string.IsNullOrEmpty(post_code)) yield return post_code;\r\n            if (!string.IsNullOrEmpty(city)) yield return city;\r\n            if (!string.IsNullOrEmpty(state)) yield return state;\r\n            if (!string.IsNullOrEmpty(country_code)) yield return getCountryByCode(country_code) ?? country_code;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Join(\", \", Fields());\r\n        }\r\n\r\n        public string ToString(Func<string, string> getCountryByCode)\r\n        {\r\n            return string.Join(\", \", Fields(getCountryByCode));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/CardInfoViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Threading;\r\nusing Windows.Data.Json;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Payments.Stripe;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Payments\r\n{\r\n    public class CardInfoViewModel : PaymentViewModelBase, Telegram.Api.Aggregator.IHandle<TLPasswordBase>\r\n    {\r\n        public bool NeedCountry { get; set; }\r\n\r\n        public bool NeedZip { get; set; }\r\n\r\n        public bool NeedCardholderName { get; set; }\r\n\r\n        private readonly string _publishableKey ;\r\n\r\n        public string CardNumber { get; set; }\r\n\r\n        public string ExpirationDate { get; set; }\r\n\r\n        public string CardholderName { get; set; }\r\n\r\n        public string SecurityCode { get; set; }\r\n\r\n        private Country _selectedCountry;\r\n\r\n        public Country SelectedCountry\r\n        {\r\n            get { return _selectedCountry; }\r\n            set { SetField(ref _selectedCountry, value, () => SelectedCountry); }\r\n        }\r\n\r\n        public string PostCode { get; set; }\r\n\r\n        public Visibility SavePaymentInformationVisibility { get; set; }\r\n\r\n        public bool SavePaymentInformation { get; set; }\r\n         \r\n        public string Error { get; set; }\r\n\r\n        private bool _removeCheckoutView;\r\n\r\n        private TLPasswordBase _password;\r\n\r\n        private readonly DispatcherTimer _checkPasswordSettingsTimer = new DispatcherTimer();\r\n\r\n        private void StartTimer()\r\n        {\r\n            if (_password != null && !TLString.IsNullOrEmpty(_password.EmailUnconfirmedPattern))\r\n            {\r\n                _checkPasswordSettingsTimer.Start();\r\n            }\r\n        }\r\n\r\n        private void StopTimer()\r\n        {\r\n            _checkPasswordSettingsTimer.Stop();\r\n        }\r\n\r\n        public CardInfoViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            _checkPasswordSettingsTimer.Tick += OnCheckPasswordSettings;\r\n            _checkPasswordSettingsTimer.Interval = TimeSpan.FromSeconds(5.0);\r\n\r\n            EventAggregator.Subscribe(this);\r\n\r\n            if (PaymentInfo != null && PaymentInfo.Form != null && PaymentInfo.Form.IsNativeProvider)\r\n            {\r\n                try\r\n                {\r\n                    var jsonObject = JsonObject.Parse(PaymentInfo.Form.NativeParams.Data.ToString());\r\n\r\n                    NeedCountry = jsonObject.GetNamedBoolean(\"need_country\", false);\r\n                    NeedZip = jsonObject.GetNamedBoolean(\"need_zip\", false);\r\n                    NeedCardholderName = jsonObject.GetNamedBoolean(\"need_cardholder_name\", false);\r\n\r\n                    _publishableKey = jsonObject.GetNamedString(\"publishable_key\", string.Empty);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Telegram.Logs.Log.Write(string.Format(\"Can't read Form.NativeParams ex={0}\\nparams={1}\", ex, PaymentInfo.Form.NativeParams.Data));\r\n                }\r\n\r\n                SavePaymentInformation = PaymentInfo.Form.CanSaveCredentials;\r\n                SavePaymentInformationVisibility = PaymentInfo.Form.PasswordMissing ||\r\n                    PaymentInfo.Form.CanSaveCredentials ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n\r\n            _removeCheckoutView = StateService.RemoveCheckoutAndCardView;\r\n            StateService.RemoveCheckoutAndCardView = false;\r\n        }\r\n\r\n        private void OnCheckPasswordSettings(object sender, System.EventArgs e)\r\n        {\r\n            Execute.ShowDebugMessage(\"account.getPasswordSettings\");\r\n\r\n            MTProtoService.GetPasswordAsync(\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    var password = result as TLPassword;\r\n                    if (password != null && password.HasRecovery.Value)\r\n                    {\r\n                        var currentPassword = _password as TLPassword;\r\n                        if (currentPassword != null)\r\n                        {\r\n                            password.CurrentPasswordHash = currentPassword.CurrentPasswordHash;\r\n                        }\r\n\r\n                        _password = password;\r\n\r\n                        Handle(password);\r\n\r\n                        StopTimer();\r\n                    }\r\n                }),\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"account.getPasswordSettings error \" + error);\r\n                });\r\n        }\r\n\r\n        public void SelectCountry()\r\n        {\r\n            StateService.HideCountryCode = true;\r\n            NavigationService.UriFor<ChooseCountryViewModel>().Navigate();\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            StartTimer();\r\n\r\n            if (StateService.SelectedCountry != null)\r\n            {\r\n                var country = StateService.SelectedCountry;\r\n                StateService.SelectedCountry = null;\r\n                OnCountrySelected(country);\r\n            }\r\n            if (StateService.Password != null)\r\n            {\r\n                _password = StateService.Password;\r\n                StateService.Password = null;\r\n\r\n                Handle(_password);\r\n\r\n                StartTimer();\r\n            }\r\n\r\n            base.OnActivate();\r\n        }\r\n\r\n        protected override void OnDeactivate(bool close)\r\n        {\r\n            StopTimer();\r\n\r\n            base.OnDeactivate(close);\r\n        }\r\n\r\n        private void OnCountrySelected(Country country)\r\n        {\r\n            SelectedCountry = country;\r\n        }\r\n\r\n        public async void Validate()\r\n        {\r\n            if (PaymentInfo.Form.SavedCredentials != null && !SavePaymentInformation && PaymentInfo.Form.CanSaveCredentials)\r\n            {\r\n                PaymentInfo.Form.SavedCredentials = null;\r\n\r\n                StateService.SaveTmpPassword(null);\r\n                MTProtoService.ClearSavedInfoAsync(false, true,\r\n                    result =>\r\n                    {\r\n                        \r\n                    },\r\n                    error =>\r\n                    {\r\n                        \r\n                    });\r\n            }\r\n\r\n            var month = 0;\r\n            var year = 0;\r\n\r\n            try\r\n            {\r\n                if (ExpirationDate != null)\r\n                {\r\n                    var args = ExpirationDate.Split('/');\r\n                    if (args.Length == 2)\r\n                    {\r\n                        month = int.Parse(args[0]);\r\n                        year = int.Parse(args[1]);\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Error = \"CARD_EXPIRE_DATE_INVALID\";\r\n                NotifyOfPropertyChange(() => Error);\r\n                return;\r\n            }\r\n\r\n            var card = new Card(\r\n                CardNumber,\r\n                month,\r\n                year,\r\n                SecurityCode,\r\n                CardholderName,\r\n                null, null, null, null,\r\n                PostCode,\r\n                SelectedCountry != null ? _selectedCountry.Code.ToUpperInvariant() : null,\r\n                null);\r\n\r\n            if (!card.ValidateNumber())\r\n            {\r\n                Error = \"CARD_NUMBER_INVALID\";\r\n                NotifyOfPropertyChange(() => Error);\r\n                return;\r\n            }\r\n\r\n            if (!card.ValidateExpireDate())\r\n            {\r\n                Error = \"CARD_EXPIRE_DATE_INVALID\";\r\n                NotifyOfPropertyChange(() => Error);\r\n                return;\r\n            }\r\n\r\n            if (NeedCardholderName && string.IsNullOrWhiteSpace(CardholderName))\r\n            {\r\n                Error = \"CARD_HOLDER_NAME_INVALID\";\r\n                NotifyOfPropertyChange(() => Error);\r\n                return;\r\n            }\r\n            if (!card.ValidateCVC())\r\n            {\r\n                Error = \"CARD_CVC_INVALID\";\r\n                NotifyOfPropertyChange(() => Error);\r\n                return;\r\n            }\r\n            if (NeedCountry && _selectedCountry == null)\r\n            {\r\n                Error = \"CARD_COUNTRY_INVALID\";\r\n                NotifyOfPropertyChange(() => Error);\r\n                return;\r\n            }\r\n            if (NeedZip && string.IsNullOrWhiteSpace(PostCode))\r\n            {\r\n                Error = \"CARD_ZIP_INVALID\";\r\n                NotifyOfPropertyChange(() => Error);\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n\r\n            using (var stripe = new StripeClient(_publishableKey))\r\n            {\r\n                var token = await stripe.CreateTokenAsync(card);\r\n\r\n                IsWorking = false;\r\n\r\n                if (token != null)\r\n                {\r\n                    if (token.Error != null)\r\n                    {\r\n                        Error = token.Error.code;\r\n                        NotifyOfPropertyChange(() => Error);\r\n                        return;\r\n                    }\r\n\r\n                    if (!string.IsNullOrEmpty(token.Id)\r\n                        && !string.IsNullOrEmpty(token.Type))\r\n                    {\r\n                        var title = card.GetBrand() + \" *\" + card.GetLast4();\r\n                        var credentials = string.Format(\"{{\\\"type\\\":\\\"{0}\\\", \\\"id\\\":\\\"{1}\\\"}}\", token.Type, token.Id);\r\n\r\n                        PaymentInfo.CredentialsTitle = title;\r\n                        var paymentCredentials = new TLInputPaymentCredentials\r\n                        {\r\n                            Flags = new TLInt(0),\r\n                            Data = new TLDataJSON\r\n                            {\r\n                                Data = new TLString(credentials)\r\n                            },\r\n                            Save = SavePaymentInformation\r\n                        };\r\n                        PaymentInfo.Credentials = paymentCredentials;\r\n                        NavigateToNextStep();\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                Error = \"invalid_button\";\r\n                NotifyOfPropertyChange(() => Error);\r\n            }\r\n        }\r\n\r\n        public void OpenTwoStepVerification()\r\n        {\r\n            MTProtoService.GetPasswordAsync(\r\n                result => BeginOnUIThread(() =>\r\n                {\r\n                    if (result != null && result.HasPassword)\r\n                    {\r\n                        StateService.Password = result;\r\n                        NavigationService.UriFor<EnterPasswordViewModel>().Navigate();\r\n                        return;\r\n                    }\r\n\r\n                    StateService.Password = result;\r\n                    NavigationService.UriFor<PasswordEmailViewModel>().Navigate();\r\n                }),\r\n                error =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"account.getPassword error \" + error);\r\n                });\r\n        }\r\n\r\n        public override void NavigateToNextStep()\r\n        {\r\n            if (_removeCheckoutView)\r\n            {\r\n                var backEntry = NavigationService.BackStack.FirstOrDefault();\r\n                if (backEntry != null && backEntry.Source.ToString().Contains(\"CheckoutView.xaml\"))\r\n                {\r\n                    NavigationService.RemoveBackEntry();\r\n                }\r\n\r\n                backEntry = NavigationService.BackStack.FirstOrDefault();\r\n                if (backEntry != null && (backEntry.Source.ToString().Contains(\"SavedCardInfoView.xaml\") || backEntry.Source.ToString().Contains(\"CardInfoView.xaml\") || backEntry.Source.ToString().Contains(\"WebCardInfoView.xaml\")))\r\n                {\r\n                    NavigationService.RemoveBackEntry();\r\n                }\r\n            }\r\n\r\n            StateService.PaymentInfo = PaymentInfo;\r\n            NavigationService.UriFor<CheckoutViewModel>().Navigate();\r\n        }\r\n\r\n        public void Handle(TLPasswordBase passwordBase)\r\n        {\r\n            if (PaymentInfo != null && PaymentInfo.Form != null)\r\n            {\r\n                PaymentInfo.Form.PasswordMissing = passwordBase == null || !passwordBase.HasPassword;\r\n                PaymentInfo.Form.NotifyOfPropertyChange(() => PaymentInfo.Form.PasswordMissing);\r\n                SavePaymentInformation = PaymentInfo.Form.CanSaveCredentials;\r\n                NotifyOfPropertyChange(() => SavePaymentInformation);\r\n                SavePaymentInformationVisibility = PaymentInfo.Form.PasswordMissing ||\r\n                    PaymentInfo.Form.CanSaveCredentials ? Visibility.Visible : Visibility.Collapsed;\r\n                NotifyOfPropertyChange(() => SavePaymentInformationVisibility);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/CheckoutViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Tasks;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Utils;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Payments\r\n{\r\n    public class CheckoutViewModel : PaymentViewModelBase\r\n    {\r\n        public TLInvoice Invoice { get; set; }\r\n\r\n        public TLPaymentRequestedInfo SavedInfo { get; set; }\r\n\r\n        public string Title\r\n        {\r\n            get\r\n            {\r\n                if (PaymentInfo != null)\r\n                {\r\n                    if (PaymentInfo.Receipt != null)\r\n                    {\r\n                        if (PaymentInfo.Receipt.Invoice.Test)\r\n                        {\r\n                            return AppResources.TestReceipt;\r\n                        }\r\n\r\n                        return AppResources.Receipt;\r\n                    }\r\n\r\n                    if (PaymentInfo.Form != null)\r\n                    {\r\n                        if (PaymentInfo.Form.Invoice.Test)\r\n                        {\r\n                            return AppResources.TestCheckout;\r\n                        }\r\n\r\n                        return AppResources.Checkout;\r\n                    }\r\n                }\r\n\r\n                return AppResources.Checkout;\r\n            }\r\n        }\r\n\r\n        public string PaymentProvider\r\n        {\r\n            get\r\n            {\r\n                if (PaymentInfo != null)\r\n                {\r\n                    if (PaymentInfo.Receipt != null)\r\n                    {\r\n                        var providerId = PaymentInfo.Receipt.ProviderId;\r\n                        var paymentProvider = PaymentInfo.Receipt.Users.FirstOrDefault(x => x.Id.Value == providerId.Value) as TLUser;\r\n                        if (paymentProvider != null)\r\n                        {\r\n                            return paymentProvider.FullName2;\r\n                        }\r\n\r\n                        return string.Empty;\r\n                    }\r\n\r\n                    if (PaymentInfo.Form != null)\r\n                    {\r\n                        var providerId = PaymentInfo.Form.ProviderId;\r\n                        var paymentProvider = PaymentInfo.Form.Users.FirstOrDefault(x => x.Id.Value == providerId.Value) as TLUser;\r\n                        if (paymentProvider != null)\r\n                        {\r\n                            return paymentProvider.FullName2;\r\n                        }\r\n\r\n                        return string.Empty;\r\n                    }\r\n                }\r\n\r\n                return AppResources.Checkout;\r\n            }\r\n        }\r\n\r\n        public List<TLLabeledPrice> Prices { get; set; }\r\n\r\n        public long TotalAmount\r\n        {\r\n            get\r\n            {\r\n                if (Prices != null)\r\n                {\r\n                    return Prices.Sum(x => x.Amount.Value);\r\n                }\r\n\r\n                return 0;\r\n            }\r\n        }\r\n\r\n        public TLLabeledPrice Total\r\n        {\r\n            get\r\n            {\r\n                var price = new TLLabeledPrice\r\n                {\r\n                    Amount = new TLLong(TotalAmount),\r\n                    Label = new TLString(AppResources.Total),\r\n                    Currency = PaymentInfo != null && PaymentInfo.Form != null ? PaymentInfo.Form.Invoice.Currency : null\r\n                };\r\n\r\n                if (PaymentInfo != null)\r\n                {\r\n                    if (PaymentInfo.Form != null)\r\n                    {\r\n                        price.Currency = PaymentInfo.Form.Invoice.Currency;\r\n                    }\r\n                    else if (PaymentInfo.Receipt != null)\r\n                    {\r\n                        price.Currency = PaymentInfo.Receipt.Invoice.Currency;\r\n                    }\r\n                }\r\n\r\n                return price;\r\n            }\r\n        }\r\n\r\n        public string PayString\r\n        {\r\n            get\r\n            {\r\n                return string.Format(\"{0} {1}\", AppResources.Pay, new LabeledPriceToStringConverter().Convert(Total, null, null, null));\r\n            }\r\n        }\r\n\r\n        private TLUserBase _bot;\r\n\r\n        public TLUserBase Bot\r\n        {\r\n            get\r\n            {\r\n                if (_bot == null && PaymentInfo != null)\r\n                {\r\n                    if (PaymentInfo.Form != null)\r\n                    {\r\n                        _bot = CacheService.GetUser(PaymentInfo.Form.BotId);\r\n                    }\r\n                    else if (PaymentInfo.Receipt != null)\r\n                    {\r\n                        _bot = CacheService.GetUser(PaymentInfo.Receipt.BotId);\r\n                    }\r\n                }\r\n\r\n                return _bot;\r\n            }\r\n        }\r\n\r\n        public TLShippingOption ShippingOption { get; set; }\r\n\r\n        public CheckoutViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Prices = new List<TLLabeledPrice>();\r\n\r\n            if (PaymentInfo != null)\r\n            {\r\n                if (PaymentInfo.Form != null)\r\n                {\r\n                    Invoice = PaymentInfo.Form.Invoice;\r\n                    SavedInfo = PaymentInfo.Form.SavedInfo;\r\n                    foreach (var price in PaymentInfo.Form.Invoice.Prices)\r\n                    {\r\n                        price.Currency = PaymentInfo.Form.Invoice.Currency;\r\n                        Prices.Add(price);\r\n                    }\r\n\r\n                    if (PaymentInfo.ValidatedInfo != null\r\n                        && PaymentInfo.ValidatedInfo.ShippingOptions != null)\r\n                    {\r\n                        foreach (var shippingOption in PaymentInfo.ValidatedInfo.ShippingOptions)\r\n                        {\r\n                            if (shippingOption.IsSelected)\r\n                            {\r\n                                ShippingOption = shippingOption;\r\n                                foreach (var price in shippingOption.Prices)\r\n                                {\r\n                                    price.Currency = PaymentInfo.Form.Invoice.Currency;\r\n                                    Prices.Add(price);\r\n                                }\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else if (PaymentInfo.Receipt != null)\r\n                {\r\n                    Invoice = PaymentInfo.Receipt.Invoice;\r\n                    SavedInfo = PaymentInfo.Receipt.SavedInfo;\r\n                    PaymentInfo.CredentialsTitle = PaymentInfo.Receipt.CredentialsTitle.ToString();\r\n\r\n                    foreach (var price in PaymentInfo.Receipt.Invoice.Prices)\r\n                    {\r\n                        price.Currency = PaymentInfo.Receipt.Invoice.Currency;\r\n                        Prices.Add(price);\r\n                    }\r\n\r\n                    var shippingOption = PaymentInfo.Receipt.Shipping;\r\n                    if (shippingOption != null)\r\n                    {\r\n                        ShippingOption = shippingOption;\r\n                        foreach (var price in shippingOption.Prices)\r\n                        {\r\n                            price.Currency = PaymentInfo.Receipt.Invoice.Currency;\r\n                            Prices.Add(price);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Validate()\r\n        {\r\n            if (PaymentInfo == null) return;\r\n            if (PaymentInfo.Form == null) return;\r\n            if (PaymentInfo.Message == null) return;\r\n            if (PaymentInfo.Credentials == null) return;\r\n\r\n            var paymentCredentials = PaymentInfo.Credentials;\r\n            TLString validatedInfoId = null;\r\n            TLString shippingOptionId = null;\r\n            if (PaymentInfo.ValidatedInfo != null)\r\n            {\r\n                validatedInfoId = PaymentInfo.ValidatedInfo.Id;\r\n\r\n                if (PaymentInfo.ValidatedInfo.ShippingOptions != null)\r\n                {\r\n                    foreach (var shippingOption in PaymentInfo.ValidatedInfo.ShippingOptions)\r\n                    {\r\n                        if (shippingOption.IsSelected)\r\n                        {\r\n                            shippingOptionId = shippingOption.Id;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var mediaInvoice = PaymentInfo.Message.Media as TLMessageMediaInvoice;\r\n            if (mediaInvoice == null) return;\r\n\r\n            var bot = CacheService.GetUser(PaymentInfo.Form.BotId) as TLUser45;\r\n            if (bot == null) return;\r\n\r\n            if (!bot.IsVerified && !bot.BotPaymentsPermission)\r\n            {\r\n                MessageBox.Show(string.Format(AppResources.PaymentsWarning, bot.FullName), string.Empty, MessageBoxButton.OK);\r\n                bot.BotPaymentsPermission = true;\r\n            }\r\n\r\n            var confirmation = MessageBox.Show(string.Format(AppResources.TransactionConfirmation, Currency.GetString(TotalAmount, PaymentInfo.Form.Invoice.Currency.ToString()), bot.FullName, mediaInvoice.Title), AppResources.TransactionReview, MessageBoxButton.OKCancel);\r\n            if (confirmation != MessageBoxResult.OK) return;\r\n\r\n            IsWorking = true;\r\n            MTProtoService.SendPaymentFormAsync(PaymentInfo.Message.Id, validatedInfoId, shippingOptionId, paymentCredentials,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    PaymentInfo.Result = result;\r\n                    NavigateToNextStep();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                }));\r\n        }\r\n\r\n        public void ChangeCredentials()\r\n        {\r\n            if (PaymentInfo.Receipt != null) return;\r\n            if (PaymentInfo.Form == null) return;\r\n\r\n            StateService.PaymentInfo = PaymentInfo;\r\n\r\n            if (PaymentInfo.Form.IsNativeProvider)\r\n            {\r\n                StateService.RemoveCheckoutAndCardView = true;\r\n                NavigationService.UriFor<CardInfoViewModel>().Navigate();\r\n            }\r\n            else\r\n            {\r\n                StateService.RemoveCheckoutAndCardView = true;\r\n                NavigationService.UriFor<WebCardInfoViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public override void NavigateToNextStep()\r\n        {\r\n            var paymentResult = PaymentInfo.Result as TLPaymentResult;\r\n            if (paymentResult != null)\r\n            {\r\n                var backEnrty = NavigationService.BackStack.FirstOrDefault();\r\n                while (backEnrty != null\r\n                    && !backEnrty.Source.ToString().Contains(\"DialogDetailsView.xaml\")\r\n                    && !backEnrty.Source.ToString().Contains(\"ShellView.xaml\"))\r\n                {\r\n                    NavigationService.RemoveBackEntry();\r\n                    backEnrty = NavigationService.BackStack.FirstOrDefault();\r\n                }\r\n                if (backEnrty != null && backEnrty.Source.ToString().Contains(\"DialogDetailsView.xaml\"))\r\n                {\r\n                    StateService.ShowScrollDownButton = true;\r\n                }\r\n                NavigationService.GoBack();\r\n\r\n                return;\r\n            }\r\n\r\n            var paymentVerificationNeeded = PaymentInfo.Result as TLPaymentVerificationNeeded;\r\n            if (paymentVerificationNeeded != null)\r\n            {\r\n                if (!TLString.IsNullOrEmpty(paymentVerificationNeeded.Url))\r\n                {\r\n                    var backEnrty = NavigationService.BackStack.FirstOrDefault();\r\n                    while (backEnrty != null\r\n                        && !backEnrty.Source.ToString().Contains(\"DialogDetailsView.xaml\")\r\n                        && !backEnrty.Source.ToString().Contains(\"ShellView.xaml\"))\r\n                    {\r\n                        NavigationService.RemoveBackEntry();\r\n                        backEnrty = NavigationService.BackStack.FirstOrDefault();\r\n                    }\r\n                    if (backEnrty != null && backEnrty.Source.ToString().Contains(\"DialogDetailsView.xaml\"))\r\n                    {\r\n                        StateService.ShowScrollDownButton = true;\r\n                    }\r\n\r\n                    StateService.RemoveBackEntry = true;\r\n                    StateService.Url = paymentVerificationNeeded.Url.ToString();\r\n                    StateService.PaymentInfo = PaymentInfo;\r\n                    NavigationService.UriFor<WebVerificationViewModel>().Navigate();\r\n                }\r\n                return;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/PasswordEmailViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Payments\r\n{\r\n    public class PasswordEmailViewModel : ChangePasswordViewModelBase\r\n    {\r\n        private string _password;\r\n\r\n        public string Password\r\n        {\r\n            get { return _password; }\r\n            set { SetField(ref _password, value, () => Password); }\r\n        }\r\n\r\n        private string _confirmPassword;\r\n\r\n        public string ConfirmPassword\r\n        {\r\n            get { return _confirmPassword; }\r\n            set { SetField(ref _confirmPassword, value, () => ConfirmPassword); }\r\n        }\r\n\r\n        private string _recoveryEmail;\r\n\r\n        public string RecoveryEmail\r\n        {\r\n            get { return _recoveryEmail; }\r\n            set { SetField(ref _recoveryEmail, value, () => RecoveryEmail); }\r\n        }\r\n\r\n        public PasswordEmailViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler,\r\n            IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService,\r\n            ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n\r\n        }\r\n\r\n        public void Create()\r\n        {\r\n            if (_passwordBase == null) return;\r\n\r\n            HasError = false;\r\n            Error = \" \";\r\n\r\n            if (string.IsNullOrEmpty(_password))\r\n            {\r\n                HasError = true;\r\n                Error = \"invalid_password\";\r\n                return;\r\n            }\r\n\r\n            if (!string.Equals(_password, _confirmPassword))\r\n            {\r\n                HasError = true;\r\n                Error = \"invalid_confirmpassword\";\r\n                return;\r\n            }\r\n\r\n            if (!ChangePasswordEmailViewModel.IsValidEmail(_recoveryEmail))\r\n            {\r\n                HasError = true;\r\n                Error = \"invalid_email\";\r\n                return;\r\n            }\r\n\r\n            var password84 = _passwordBase as TLPassword84;\r\n            if (password84 == null) return;\r\n\r\n            var newAlgo = password84.NewAlgo as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n            if (newAlgo == null) return;\r\n\r\n            Utils.Password.AddClientSalt(newAlgo);\r\n\r\n            var newSettings = new TLPasswordInputSettings83\r\n            {\r\n                Flags = new TLInt(0),\r\n                NewAlgo = newAlgo,\r\n                NewPasswordHash = null,\r\n                Hint = TLString.Empty,\r\n                Email = new TLString(RecoveryEmail),\r\n                NewPassword = _password\r\n            };\r\n\r\n            UpdatePasswordSettings(password84, newSettings);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/PaymentInfo.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.ViewModels.Payments\r\n{\r\n    public class PaymentInfo\r\n    {\r\n        public TLMessage Message { get; set; }\r\n\r\n        public TLPaymentForm Form { get; set; }\r\n\r\n        public TLValidatedRequestedInfo ValidatedInfo { get; set; }\r\n\r\n        public string CredentialsTitle { get; set; }\r\n\r\n        public TLInputPaymentCredentialsBase Credentials { get; set; }\r\n\r\n        public TLPaymentResultBase Result { get; set; }\r\n\r\n        public TLPaymentReceipt Receipt { get; set; }\r\n\r\n        public TLObject With { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/PaymentViewModelBase.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views.Dialogs;\r\n\r\nnamespace TelegramClient.ViewModels.Payments\r\n{\r\n    public abstract class PaymentViewModelBase : ViewModelBase\r\n    {\r\n        public PaymentInfo PaymentInfo { get; set; }\r\n\r\n        protected PaymentViewModelBase(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            PaymentInfo = stateService.PaymentInfo;\r\n            stateService.PaymentInfo = null;\r\n        }\r\n\r\n        public abstract void NavigateToNextStep();\r\n\r\n        public static void NavigateToCardInfo(IDialogDetailsView view, PaymentInfo paymentInfo, Func<TLTmpPassword> getTmpPassword,\r\n            INavigationService navigationService)\r\n        {\r\n            if (paymentInfo == null) return;\r\n\r\n            var form = paymentInfo.Form;\r\n            if (form == null) return;\r\n\r\n            var useSavedCredentials = false;\r\n            var savedCredentialsCard = form.SavedCredentials as TLPaymentSavedCredentialsCard;\r\n            TLTmpPassword tmpPassword = null;\r\n            if (savedCredentialsCard != null && !form.PasswordMissing)\r\n            {\r\n                tmpPassword = getTmpPassword.Invoke();\r\n                if (tmpPassword != null)\r\n                {\r\n                    var now = TLUtils.DateToUniversalTimeTLInt(IoC.Get<IMTProtoService>().ClientTicksDelta, DateTime.Now);\r\n                    if (tmpPassword.ValidUntil.Value - 60 > now.Value)\r\n                    {\r\n                        useSavedCredentials = true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (useSavedCredentials)\r\n            {\r\n                paymentInfo.Credentials = new TLInputPaymentCredentialsSaved\r\n                {\r\n                    Id = savedCredentialsCard.Id,\r\n                    TmpPassword = tmpPassword.TmpPassword\r\n                };\r\n                paymentInfo.CredentialsTitle = savedCredentialsCard.Title.ToString();\r\n\r\n                Navigate<CheckoutViewModel>(view, navigationService);\r\n            }\r\n            else if (savedCredentialsCard != null && !form.PasswordMissing)\r\n            {\r\n                Navigate<SavedCardInfoViewModel>(view, navigationService);\r\n            }\r\n            else\r\n            {\r\n                if (form.IsNativeProvider)\r\n                {\r\n                    Navigate<CardInfoViewModel>(view, navigationService);\r\n                }\r\n                else\r\n                {\r\n                    Navigate<WebCardInfoViewModel>(view, navigationService);\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void Navigate<T>(IDialogDetailsView view, INavigationService navigationService)\r\n        {\r\n            if (view != null)\r\n            {\r\n                view.StopPlayersAndCreateBitmapCache(() =>\r\n                {\r\n                    navigationService.UriFor<T>().Navigate();\r\n                });\r\n            }\r\n            else\r\n            {\r\n                navigationService.UriFor<T>().Navigate();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/ReceiptViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Payments\r\n{\r\n    public class ReceiptViewModel : PaymentViewModelBase\r\n    {\r\n        public ReceiptViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n        }\r\n\r\n        public override void NavigateToNextStep()\r\n        {\r\n            \r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/SavedCardInfoViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Security.Cryptography;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Utils;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Payments\r\n{\r\n    public class SavedCardInfoViewModel : PaymentViewModelBase\r\n    {\r\n        private readonly TLPaymentSavedCredentialsCard _savedCredentialsCard;\r\n\r\n        public string Title { get; set; }\r\n\r\n        public string Password { get; set; }\r\n\r\n        public string Error { get; set; }\r\n\r\n        public string SavedCardHint\r\n        {\r\n            get { return string.Format(AppResources.SavedCardHint, Title); }\r\n        }\r\n\r\n        public SavedCardInfoViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            if (PaymentInfo != null && PaymentInfo.Form != null && PaymentInfo.Form.SavedCredentials != null)\r\n            {\r\n                _savedCredentialsCard = PaymentInfo.Form.SavedCredentials as TLPaymentSavedCredentialsCard;\r\n                if (_savedCredentialsCard != null)\r\n                {\r\n                    Title = _savedCredentialsCard.Title.ToString();\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ChangeCredentials()\r\n        {\r\n            if (PaymentInfo.Receipt != null) return;\r\n            if (PaymentInfo.Form == null) return;\r\n\r\n            StateService.PaymentInfo = PaymentInfo;\r\n\r\n            if (PaymentInfo.Form.IsNativeProvider)\r\n            {\r\n                StateService.RemoveCheckoutAndCardView = true;\r\n                NavigationService.UriFor<CardInfoViewModel>().Navigate();\r\n            }\r\n            else\r\n            {\r\n                StateService.RemoveCheckoutAndCardView = true;\r\n                NavigationService.UriFor<WebCardInfoViewModel>().Navigate();\r\n            }\r\n        }\r\n\r\n        public void Validate()\r\n        {\r\n            if (_savedCredentialsCard == null) return;\r\n\r\n            if (string.IsNullOrEmpty(Password))\r\n            {\r\n                Error = \"PASSWORD\";\r\n                NotifyOfPropertyChange(() => Error);\r\n                return;\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.GetPasswordAsync(\r\n                result =>\r\n                {\r\n                    var password84 = result as TLPassword84;\r\n                    if (password84 == null)\r\n                    {\r\n                        return;\r\n                    }\r\n\r\n                    var algo = password84.CurrentAlgo as TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow;\r\n                    if (algo == null)\r\n                    {\r\n                        return;\r\n                    }\r\n                    //var passwordHash = Utils.Password.GetHash(password.CurrentSalt, new TLString(Password));\r\n                    var passwordHash = SRP.GetX(new TLString(Password), algo);\r\n                    var password = SRP.GetCheck(passwordHash, password84.SRPId, password84.SRPB, algo);\r\n\r\n                    MTProtoService.GetTmpPasswordAsync(\r\n                        password, new TLInt(Constants.DefaultTmpPasswordLifetime),\r\n                        result2 => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            PaymentInfo.Credentials = new TLInputPaymentCredentialsSaved\r\n                            {\r\n                                Id = _savedCredentialsCard.Id,\r\n                                TmpPassword = result2.TmpPassword\r\n                            };\r\n                            PaymentInfo.CredentialsTitle = Title;\r\n                            StateService.SaveTmpPassword(result2);\r\n                            NavigateToNextStep();\r\n                        }),\r\n                        error2 => Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            IsWorking = false;\r\n                            var messageBuilder = new StringBuilder();\r\n                            messageBuilder.AppendLine(\"Method: account.getTmpPassword\");\r\n                            messageBuilder.AppendLine(\"Result: \" + error2);\r\n\r\n                            if (TLRPCError.CodeEquals(error2, ErrorCode.FLOOD))\r\n                            {\r\n                                Execute.BeginOnUIThread(() => MessageBox.Show(AppResources.FloodWaitString, AppResources.Error, MessageBoxButton.OK));\r\n                            }\r\n                            else if (TLRPCError.CodeEquals(error2, ErrorCode.INTERNAL))\r\n                            {\r\n                                Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.ServerError, MessageBoxButton.OK));\r\n                            }\r\n                            else if (TLRPCError.CodeEquals(error2, ErrorCode.BAD_REQUEST))\r\n                            {\r\n                                if (TLRPCError.TypeEquals(error2, ErrorType.PASSWORD_HASH_INVALID))\r\n                                {\r\n                                    Error = string.Format(\"PASSWORD\");\r\n                                    NotifyOfPropertyChange(() => Error);\r\n                                }\r\n                                else\r\n                                {\r\n                                    Execute.BeginOnUIThread(() => MessageBox.Show(messageBuilder.ToString(), AppResources.Error, MessageBoxButton.OK));\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                Execute.ShowDebugMessage(\"account.getTmpPassword error \" + error2);\r\n                            }\r\n                        }));\r\n                },\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                }));\r\n        }\r\n\r\n        public override void NavigateToNextStep()\r\n        {\r\n            StateService.PaymentInfo = PaymentInfo;\r\n            NavigationService.UriFor<CheckoutViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/ShippingInfoViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Models;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.ViewModels.Payments\r\n{\r\n    public class ShippingInfoViewModel : PaymentViewModelBase\r\n    {\r\n        public bool IsPhoneCodeInvalid\r\n        {\r\n            get { return string.IsNullOrEmpty(PhoneCode) || CountryUtils.CountriesSource.FirstOrDefault(x => x.PhoneCode == PhoneCode) == null; }\r\n        }\r\n\r\n        public string Name { get; set; }\r\n\r\n        public string PhoneCode { get; set; }\r\n\r\n        public string PhoneNumber { get; set; }\r\n\r\n        public string Email { get; set; }\r\n\r\n        #region Shipping Address\r\n\r\n        public string StreetLine1 { get; set; }\r\n\r\n        public string StreetLine2 { get; set; }\r\n\r\n        public string City { get; set; }\r\n\r\n        public string State { get; set; }\r\n\r\n        private Country _selectedCountry;\r\n\r\n        public Country SelectedCountry\r\n        {\r\n            get { return _selectedCountry; }\r\n            set { SetField(ref _selectedCountry, value, () => SelectedCountry); }\r\n        }\r\n\r\n        public string PostCode { get; set; }\r\n        #endregion\r\n\r\n        public bool SaveShippingInformation { get; set; }\r\n\r\n        public TLRPCError Error { get; set; }\r\n\r\n        public ShippingInfoViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            if (PaymentInfo != null && PaymentInfo.Form != null)\r\n            {\r\n                var savedInfo = PaymentInfo.Form.SavedInfo;\r\n                if (savedInfo != null)\r\n                {\r\n                    Name = savedInfo.Name != null? savedInfo.Name.ToString() : null;\r\n                    var phone = TLString.IsNullOrEmpty(savedInfo.Phone) ? string.Empty : savedInfo.Phone.ToString();\r\n                    if (!string.IsNullOrEmpty(phone))\r\n                    {\r\n                        var codeCounty = CountryUtils.CountriesSource.FirstOrDefault(x => phone.StartsWith(x.PhoneCode, StringComparison.OrdinalIgnoreCase));\r\n                        if (codeCounty != null)\r\n                        {\r\n                            PhoneCode = codeCounty.PhoneCode;\r\n                            var index = phone.IndexOf(PhoneCode, StringComparison.OrdinalIgnoreCase);\r\n                            var phoneNumber = (index < 0)\r\n                                ? phone\r\n                                : phone.Remove(index, PhoneCode.Length);\r\n                            PhoneNumber = phoneNumber;\r\n                        }\r\n                        else\r\n                        {\r\n                            PhoneNumber = phone;\r\n                        }\r\n                    }\r\n                    Email = savedInfo.Email != null ? savedInfo.Email.ToString() : null;\r\n\r\n                    if (savedInfo.ShippingAddress != null)\r\n                    {\r\n                        var country = CountryUtils.CountriesSource.FirstOrDefault(x => string.Equals(savedInfo.ShippingAddress.CountryIso2.ToString(), x.Code, StringComparison.OrdinalIgnoreCase));\r\n\r\n                        StreetLine1 = savedInfo.ShippingAddress.StreetLine1.ToString();\r\n                        StreetLine2 = savedInfo.ShippingAddress.StreetLine2.ToString();\r\n                        City = savedInfo.ShippingAddress.City.ToString();\r\n                        State = savedInfo.ShippingAddress.State.ToString();\r\n                        _selectedCountry = country;\r\n                        PostCode = savedInfo.ShippingAddress.PostCode.ToString();\r\n                    }\r\n                }\r\n            }\r\n\r\n            SaveShippingInformation = true;\r\n        }\r\n\r\n        public void SelectCountry()\r\n        {\r\n            StateService.HideCountryCode = true;\r\n            NavigationService.UriFor<ChooseCountryViewModel>().Navigate();\r\n        }\r\n\r\n        protected override void OnActivate()\r\n        {\r\n            if (StateService.SelectedCountry != null)\r\n            {\r\n                var country = StateService.SelectedCountry;\r\n                StateService.SelectedCountry = null;\r\n                OnCountrySelected(country);\r\n            }\r\n            base.OnActivate();\r\n        }\r\n\r\n        private void OnCountrySelected(Country country)\r\n        {\r\n            SelectedCountry = country;\r\n        }\r\n\r\n        public void Validate()\r\n        {\r\n            if (PaymentInfo == null) return;\r\n            if (PaymentInfo.Message == null) return;\r\n            if (PaymentInfo.Form == null) return;\r\n\r\n            var info = new TLPaymentRequestedInfo\r\n            {\r\n                Flags = new TLInt(0)\r\n            };\r\n            if (PaymentInfo.Form.Invoice.NameRequested)\r\n            {\r\n                info.Name = new TLString(Name);\r\n            }\r\n            if (PaymentInfo.Form.Invoice.PhoneRequested)\r\n            {\r\n                info.Phone = new TLString(PhoneCode + PhoneNumber);\r\n            }\r\n            if (PaymentInfo.Form.Invoice.EmailRequested)\r\n            {\r\n                info.Email = new TLString(Email);\r\n            }\r\n            if (PaymentInfo.Form.Invoice.ShippingAddressRequested)\r\n            {\r\n                info.ShippingAddress = new TLPostAddress\r\n                {\r\n                    StreetLine1 = new TLString(StreetLine1),\r\n                    StreetLine2 = new TLString(StreetLine2),\r\n                    City = new TLString(City),\r\n                    State = new TLString(State),\r\n                    CountryIso2 = new TLString(SelectedCountry != null ? SelectedCountry.Code : string.Empty),\r\n                    PostCode = new TLString(PostCode)\r\n                };\r\n            }\r\n\r\n            IsWorking = true;\r\n            MTProtoService.ValidateRequestedInfoAsync(\r\n                SaveShippingInformation,\r\n                PaymentInfo.Message.Id,\r\n                info,\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    PaymentInfo.ValidatedInfo = result;\r\n                    PaymentInfo.Form.SavedInfo = info;\r\n\r\n                    if (!SaveShippingInformation\r\n                        && PaymentInfo != null\r\n                        && PaymentInfo.Form != null\r\n                        && PaymentInfo.Form.SavedInfo != null)\r\n                    {\r\n                        IsWorking = true;\r\n                        MTProtoService.ClearSavedInfoAsync(false, true,\r\n                            result2 =>Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                NavigateToNextStep();\r\n                            }),\r\n                            error2 => Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                IsWorking = false;\r\n                                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"payments.clearInfo error \" + error2);\r\n                            }));\r\n                    }\r\n                    else\r\n                    {\r\n                        NavigateToNextStep();\r\n                    }\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    IsWorking = false;\r\n                    Error = error;\r\n                    NotifyOfPropertyChange(() => Error);\r\n                    Telegram.Api.Helpers.Execute.ShowDebugMessage(\"payments.validateRequestedInfo error \" + error);\r\n                }));\r\n        }\r\n\r\n        public override void NavigateToNextStep()\r\n        {\r\n            StateService.PaymentInfo = PaymentInfo;\r\n\r\n            if (PaymentInfo.Form.Invoice.Flexible\r\n                && PaymentInfo.ValidatedInfo.ShippingOptions != null\r\n                && PaymentInfo.ValidatedInfo.ShippingOptions.Count > 0)\r\n            {\r\n                NavigationService.UriFor<ShippingMethodViewModel>().Navigate();\r\n            }\r\n            else\r\n            {\r\n                NavigateToCardInfo(null, StateService.PaymentInfo, () => StateService.GetTmpPassword(), NavigationService);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/ShippingMethodViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Payments\r\n{\r\n    public class ShippingMethodViewModel : PaymentViewModelBase\r\n    {\r\n        public ShippingMethodViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            if (PaymentInfo != null\r\n                && PaymentInfo.Form != null\r\n                && PaymentInfo.ValidatedInfo != null\r\n                && PaymentInfo.ValidatedInfo.ShippingOptions != null)\r\n            {\r\n                for (var i = 0; i < PaymentInfo.ValidatedInfo.ShippingOptions.Count; i++)\r\n                {\r\n                    PaymentInfo.ValidatedInfo.ShippingOptions[i].IsSelected = i == 0;\r\n                    foreach (var price in PaymentInfo.ValidatedInfo.ShippingOptions[i].Prices)\r\n                    {\r\n                        price.Currency = PaymentInfo.Form.Invoice.Currency;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Validate()\r\n        {\r\n            NavigateToNextStep();\r\n        }\r\n\r\n        public override void NavigateToNextStep()\r\n        {\r\n            StateService.PaymentInfo = PaymentInfo;\r\n            NavigateToCardInfo(null, StateService.PaymentInfo, () => StateService.GetTmpPassword(), NavigationService);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/Stripe/Card.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Text.RegularExpressions;\r\n\r\nnamespace TelegramClient.ViewModels.Payments.Stripe\r\n{\r\n    public class Card\r\n    {\r\n        public enum StringDef\r\n        {\r\n            AMERICAN_EXPRESS,\r\n            DISCOVER,\r\n            JCB,\r\n            DINERS_CLUB,\r\n            VISA,\r\n            MASTERCARD,\r\n            UNKNOWN\r\n        };\r\n        public const String AMERICAN_EXPRESS = \"American Express\";\r\n        public const String DISCOVER = \"Discover\";\r\n        public const String JCB = \"JCB\";\r\n        public const String DINERS_CLUB = \"Diners Club\";\r\n        public const String VISA = \"Visa\";\r\n        public const String MASTERCARD = \"MasterCard\";\r\n        public const String UNKNOWN = \"Unknown\";\r\n\r\n        public enum FUNDING\r\n        {\r\n            FUNDING_CREDIT,\r\n            FUNDING_DEBIT,\r\n            FUNDING_PREPAID,\r\n            FUNDING_UNKNOWN\r\n        };\r\n        public const String FUNDING_CREDIT = \"credit\";\r\n        public const String FUNDING_DEBIT = \"debit\";\r\n        public const String FUNDING_PREPAID = \"prepaid\";\r\n        public const String FUNDING_UNKNOWN = \"unknown\";\r\n\r\n        // Based on http://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number_.28IIN.29\r\n        public static String[] PREFIXES_AMERICAN_EXPRESS = { \"34\", \"37\" };\r\n        public static String[] PREFIXES_DISCOVER = { \"60\", \"62\", \"64\", \"65\" };\r\n        public static String[] PREFIXES_JCB = { \"35\" };\r\n        public static String[] PREFIXES_DINERS_CLUB = { \"300\", \"301\", \"302\", \"303\", \"304\", \"305\", \"309\", \"36\", \"38\", \"39\" };\r\n        public static String[] PREFIXES_VISA = { \"4\" };\r\n        public static String[] PREFIXES_MASTERCARD = {\r\n            \"2221\", \"2222\", \"2223\", \"2224\", \"2225\", \"2226\", \"2227\", \"2228\", \"2229\",\r\n            \"223\", \"224\", \"225\", \"226\", \"227\", \"228\", \"229\",\r\n            \"23\", \"24\", \"25\", \"26\",\r\n            \"270\", \"271\", \"2720\",\r\n            \"50\", \"51\", \"52\", \"53\", \"54\", \"55\"\r\n        };\r\n\r\n        public static int MAX_LENGTH_STANDARD = 16;\r\n        public static int MAX_LENGTH_AMERICAN_EXPRESS = 15;\r\n        public static int MAX_LENGTH_DINERS_CLUB = 14;\r\n\r\n        public String Number { get; private set; }\r\n        public String CVC { get; private set; }\r\n        public int ExpiryMonth { get; private set; }\r\n        public int ExpiryYear { get; private set; }\r\n        public String Name { get; set; }\r\n        public String AddressLine1 { get; set; }\r\n        public String AddressLine2 { get; set; }\r\n        public String AddressCity { get; set; }\r\n        public String AddressState { get; set; }\r\n        public String AddressZip { get; set; }\r\n        public String AddressCountry { get; set; }\r\n        public String Last4 { get; private set; }\r\n        public String Brand { get; private set; } // @CardBrand\r\n        public String Funding { get; private set; } // @FundingType\r\n        public String Fingerprint { get; private set; }\r\n        public String Country { get; private set; }\r\n        public String Currency { get; set; }\r\n        public String Id { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Card constructor with all available fields.\r\n        /// </summary>\r\n        /// <param name=\"number\">the card number</param>\r\n        /// <param name=\"expMonth\">the expiry month</param>\r\n        /// <param name=\"expYear\">the expiry year</param>\r\n        /// <param name=\"cvc\">the CVC code</param>\r\n        /// <param name=\"name\">the cardholder name</param>\r\n        /// <param name=\"addressLine1\">the first line of the billing address</param>\r\n        /// <param name=\"addressLine2\">the second line of the billing address</param>\r\n        /// <param name=\"addressCity\">the city of the billing address</param>\r\n        /// <param name=\"addressState\">the state of the billing address</param>\r\n        /// <param name=\"addressZip\">the zip code of the billing address</param>\r\n        /// <param name=\"addressCountry\">the country of the billing address</param>\r\n        /// <param name=\"brand\">brand of this card</param>\r\n        /// <param name=\"last4\">last 4 digits of the card</param>\r\n        /// <param name=\"fingerprint\">the card fingerprint</param>\r\n        /// <param name=\"funding\">the funding type of the card</param>\r\n        /// <param name=\"country\">ISO country code of the card itself</param>\r\n        /// <param name=\"currency\">the currency of the card</param>\r\n        /// <param name=\"id\">the cardId</param>\r\n        public Card(\r\n            String number,\r\n            int expMonth,\r\n            int expYear,\r\n            string cvc,\r\n            string name,\r\n            string addressLine1,\r\n            string addressLine2,\r\n            string addressCity,\r\n            string addressState,\r\n            string addressZip,\r\n            string addressCountry,\r\n            string brand,\r\n            string last4,\r\n            string fingerprint,\r\n            string funding,\r\n            string country,\r\n            string currency,\r\n            string id)\r\n        {\r\n            Number = StripeTextUtils.NullIfBlank(NormalizeCardNumber(number));\r\n            ExpiryMonth = expMonth;\r\n            ExpiryYear = expYear;\r\n            CVC = StripeTextUtils.NullIfBlank(cvc);\r\n            Name = StripeTextUtils.NullIfBlank(name);\r\n            AddressLine1 = StripeTextUtils.NullIfBlank(addressLine1);\r\n            AddressLine2 = StripeTextUtils.NullIfBlank(addressLine2);\r\n            AddressCity = StripeTextUtils.NullIfBlank(addressCity);\r\n            AddressState = StripeTextUtils.NullIfBlank(addressState);\r\n            AddressZip = StripeTextUtils.NullIfBlank(addressZip);\r\n            AddressCountry = StripeTextUtils.NullIfBlank(addressCountry);\r\n            Brand = StripeTextUtils.AsCardBrand(brand) == null ? GetBrand() : brand;\r\n            Last4 = StripeTextUtils.NullIfBlank(last4) == null ? GetLast4() : last4;\r\n            Fingerprint = StripeTextUtils.NullIfBlank(fingerprint);\r\n            Funding = StripeTextUtils.AsFundingType(funding);\r\n            Country = StripeTextUtils.NullIfBlank(country);\r\n            Currency = StripeTextUtils.NullIfBlank(currency);\r\n            Id = StripeTextUtils.NullIfBlank(id);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Convenience constructor with address and currency.\r\n        /// </summary>\r\n        /// <param name=\"number\">the card number</param>\r\n        /// <param name=\"expMonth\">the expiry month</param>\r\n        /// <param name=\"expYear\">the expiry year</param>\r\n        /// <param name=\"cvc\">the CVC code</param>\r\n        /// <param name=\"name\">the cardholder name</param>\r\n        /// <param name=\"addressLine1\">the first line of the billing address</param>\r\n        /// <param name=\"addressLine2\">the second line of the billing address</param>\r\n        /// <param name=\"addressCity\">the city of the billing address</param>\r\n        /// <param name=\"addressState\">the state of the billing address</param>\r\n        /// <param name=\"addressZip\">the zip code of the billing address</param>\r\n        /// <param name=\"addressCountry\">the country of the billing address</param>\r\n        /// <param name=\"currency\">the currency of the card</param>\r\n        public Card(\r\n            string number,\r\n            int expMonth,\r\n            int expYear,\r\n            string cvc,\r\n            string name,\r\n            string addressLine1,\r\n            string addressLine2,\r\n            string addressCity,\r\n            string addressState,\r\n            string addressZip,\r\n            string addressCountry,\r\n            string currency)\r\n            : this(number,\r\n                   expMonth,\r\n                   expYear,\r\n                   cvc,\r\n                   name,\r\n                   addressLine1,\r\n                   addressLine2,\r\n                   addressCity,\r\n                   addressState,\r\n                   addressZip,\r\n                   addressCountry,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   currency,\r\n                   null)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Convenience constructor for a Card object with a minimum number of inputs.\r\n        /// </summary>\r\n        /// <param name=\"number\">the card number</param>\r\n        /// <param name=\"expMonth\">the expiry month</param>\r\n        /// <param name=\"expYear\">the expiry year</param>\r\n        /// <param name=\"cvc\">the CVC code</param>\r\n        public Card(String number, int expMonth, int expYear, String cvc)\r\n            : this(number,\r\n                   expMonth,\r\n                   expYear,\r\n                   cvc,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null,\r\n                   null)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks whether <see langword=\"this\"/> represents a valid card.\r\n        /// </summary>\r\n        /// <returns><see langword=\"true\"> if valid, <see langword=\"false\"> otherwise.</returns>\r\n        public bool ValidateCard()\r\n        {\r\n            if (CVC == null)\r\n            {\r\n                return ValidateNumber() && ValidateExpireDate();\r\n            }\r\n            else\r\n            {\r\n                return ValidateNumber() && ValidateExpireDate() && ValidateCVC();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks whether or not the <see cref=\"Number\"/> property is valid.\r\n        /// </summary>\r\n        /// <returns><see langword=\"true\"> if valid, <see langword=\"false\"> otherwise.</returns>\r\n        public bool ValidateNumber()\r\n        {\r\n            return CardUtils.IsValidCardNumber(Number);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks whether or not the <see cref=\"ExpiryMonth\"/> and <see cref=\"ExpiryYear\"/> properties represent a valid\r\n        /// </summary>\r\n        /// <returns><see langword=\"true\"> if valid, <see langword=\"false\"> otherwise</returns>\r\n        public bool ValidateExpireDate()\r\n        {\r\n            if (!ValidateExpiryMonth())\r\n            {\r\n                return false;\r\n            }\r\n            if (!ValidateExpiryYear())\r\n            {\r\n                return false;\r\n            }\r\n            return !DateUtils.HasMonthPassed(ExpiryYear, ExpiryMonth);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks whether or not the <see cref=\"CVC\"/> property is valid.\r\n        /// </summary>\r\n        /// <returns><see langword=\"true\"> if valid, <see langword=\"false\"> otherwise</returns>\r\n        public bool ValidateCVC()\r\n        {\r\n            if (string.IsNullOrWhiteSpace(CVC))\r\n            {\r\n                return false;\r\n            }\r\n            String cvcValue = CVC.Trim();\r\n            String updatedType = GetBrand();\r\n            bool validLength =\r\n                    (updatedType == null && cvcValue.Length >= 3 && cvcValue.Length <= 4)\r\n                    || (AMERICAN_EXPRESS.Equals(updatedType) && cvcValue.Length == 4)\r\n                    || cvcValue.Length == 3;\r\n\r\n            return StripeTextUtils.IsWholePositiveNumber(cvcValue) && validLength;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks whether or not the <see cref=\"ExpiryMonth\"/> property is valid.\r\n        /// </summary>\r\n        /// <returns><see langword=\"true\"> if valid, <see langword=\"false\"> otherwise.</returns>\r\n        public bool ValidateExpiryMonth()\r\n        {\r\n            return ExpiryMonth >= 1 && ExpiryMonth <= 12;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks whether or not the <see cref=\"ExpiryYear\"/> property is valid.\r\n        /// </summary>\r\n        /// <returns><see langword=\"true\"> if valid, <see langword=\"false\"> otherwise.</returns>\r\n        public bool ValidateExpiryYear()\r\n        {\r\n            return !DateUtils.HasYearPassed(ExpiryYear);\r\n        }\r\n\r\n        /// <summary>\r\n        /// \r\n        /// </summary>\r\n        /// <returns>the <see cref=\"Last4\"/> digits of this card. Sets the value based on the <see cref=\"Number\"/>\r\n        /// if it has not already been set.</returns>\r\n        public string GetLast4()\r\n        {\r\n            if (!string.IsNullOrWhiteSpace(Last4))\r\n            {\r\n                return Last4;\r\n            }\r\n\r\n            if (Number != null && Number.Length > 4)\r\n            {\r\n                Last4 = Number.Substring(Number.Length - 4);\r\n                return Last4;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the <see cref=\"Brand\"/> of this card. Updates the value if none has yet been set, or\r\n        /// if the <see cref=\"Number\"/> has been changed.\r\n        /// </summary>\r\n        /// <returns>the <see cref=\"Brand\"/> of this card</returns>\r\n        public string GetBrand()\r\n        {\r\n            if (string.IsNullOrWhiteSpace(Brand) && !string.IsNullOrWhiteSpace(Number))\r\n            {\r\n                /*@CardBrand*/\r\n                String evaluatedType;\r\n                if (StripeTextUtils.HasAnyPrefix(Number, PREFIXES_AMERICAN_EXPRESS))\r\n                {\r\n                    evaluatedType = AMERICAN_EXPRESS;\r\n                }\r\n                else if (StripeTextUtils.HasAnyPrefix(Number, PREFIXES_DISCOVER))\r\n                {\r\n                    evaluatedType = DISCOVER;\r\n                }\r\n                else if (StripeTextUtils.HasAnyPrefix(Number, PREFIXES_JCB))\r\n                {\r\n                    evaluatedType = JCB;\r\n                }\r\n                else if (StripeTextUtils.HasAnyPrefix(Number, PREFIXES_DINERS_CLUB))\r\n                {\r\n                    evaluatedType = DINERS_CLUB;\r\n                }\r\n                else if (StripeTextUtils.HasAnyPrefix(Number, PREFIXES_VISA))\r\n                {\r\n                    evaluatedType = VISA;\r\n                }\r\n                else if (StripeTextUtils.HasAnyPrefix(Number, PREFIXES_MASTERCARD))\r\n                {\r\n                    evaluatedType = MASTERCARD;\r\n                }\r\n                else\r\n                {\r\n                    evaluatedType = UNKNOWN;\r\n                }\r\n\r\n                Brand = evaluatedType;\r\n            }\r\n\r\n            return Brand;\r\n        }\r\n\r\n        private String NormalizeCardNumber(String number)\r\n        {\r\n            if (number == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return Regex.Replace(number.Trim(), \"\\\\s+|-\", \"\");\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/Stripe/CardUtils.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace TelegramClient.ViewModels.Payments.Stripe\r\n{\r\n    public class CardUtils\r\n    {\r\n        public static int LENGTH_COMMON_CARD = 16;\r\n        public static int LENGTH_AMERICAN_EXPRESS = 15;\r\n        public static int LENGTH_DINERS_CLUB = 14;\r\n\r\n        public static int CVC_LENGTH_COMMON = 3;\r\n        public static int CVC_LENGTH_AMEX = 4;\r\n\r\n        public static bool IsValidCardNumber(string cardNumber)\r\n        {\r\n            var normalizedNumber = StripeTextUtils.RemoveSpacesAndHyphens(cardNumber);\r\n            return IsValidLuhnNumber(normalizedNumber) && IsValidCardLength(normalizedNumber);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks the input string to see whether or not it is a valid Luhn number.\r\n        /// </summary>\r\n        /// <param name=\"cardNumber\">a String that may or may not represent a valid Luhn number</param>\r\n        /// <returns><see langword=\"true\"> if and only if the input value is a valid Luhn number</returns>\r\n        public static bool IsValidLuhnNumber(string cardNumber)\r\n        {\r\n            if (cardNumber == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            bool isOdd = true;\r\n            int sum = 0;\r\n\r\n            for (int index = cardNumber.Length - 1; index >= 0; index--)\r\n            {\r\n                char c = cardNumber[index];\r\n                if (!char.IsDigit(c))\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                int digitInteger = c - '0';\r\n                isOdd = !isOdd;\r\n\r\n                if (isOdd)\r\n                {\r\n                    digitInteger *= 2;\r\n                }\r\n\r\n                if (digitInteger > 9)\r\n                {\r\n                    digitInteger -= 9;\r\n                }\r\n\r\n                sum += digitInteger;\r\n            }\r\n\r\n            return sum % 10 == 0;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks to see whether the input number is of the correct length, after determining its brand.\r\n        /// This function does not perform a Luhn check.\r\n        /// </summary>\r\n        /// <param name=\"cardNumber\">the card number with no spaces or dashes</param>\r\n        /// <returns><see langword=\"true\"> if the card number is of known type and the correct length</returns>\r\n        public static bool IsValidCardLength(string cardNumber)\r\n        {\r\n            if (cardNumber == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            return IsValidCardLength(cardNumber, GetPossibleCardType(cardNumber, false));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks to see whether the input number is of the correct length, given the assumed brand of\r\n        /// the card. This function does not perform a Luhn check.\r\n        /// </summary>\r\n        /// <param name=\"cardNumber\">the card number with no spaces or dashes</param>\r\n        /// <param name=\"cardBrand\">a {@link CardBrand} used to get the correct size</param>\r\n        /// <returns><see langword=\"true\"> if the card number is the correct length for the assumed brand</returns>\r\n        public static bool IsValidCardLength(string cardNumber, string cardBrand)\r\n        {\r\n            if (cardNumber == null || Card.UNKNOWN.Equals(cardBrand))\r\n            {\r\n                return false;\r\n            }\r\n\r\n            int length = cardNumber.Length;\r\n            switch (cardBrand)\r\n            {\r\n                case Card.AMERICAN_EXPRESS:\r\n                    return length == LENGTH_AMERICAN_EXPRESS;\r\n                case Card.DINERS_CLUB:\r\n                    return length == LENGTH_DINERS_CLUB;\r\n                default:\r\n                    return length == LENGTH_COMMON_CARD;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a {@link CardBrand} corresponding to a partial card number,\r\n        /// or {@link Card#UNKNOWN} if the card brand can't be determined from the input value.\r\n        /// </summary>\r\n        /// <param name=\"cardNumber\">a credit card number or partial card number</param>\r\n        /// <returns>the {@link CardBrand} corresponding to that number,\r\n        /// or {@link Card#UNKNOWN} if it can't be determined</returns>\r\n        public static string GetPossibleCardType(string cardNumber)\r\n        {\r\n            return GetPossibleCardType(cardNumber, true);\r\n        }\r\n\r\n        //@NonNull\r\n        //@CardBrand\r\n        private static string GetPossibleCardType(string cardNumber, bool shouldNormalize)\r\n        {\r\n            if (string.IsNullOrWhiteSpace(cardNumber))\r\n            {\r\n                return Card.UNKNOWN;\r\n            }\r\n\r\n            var spacelessCardNumber = cardNumber;\r\n            if (shouldNormalize)\r\n            {\r\n                spacelessCardNumber = StripeTextUtils.RemoveSpacesAndHyphens(cardNumber);\r\n            }\r\n\r\n            if (StripeTextUtils.HasAnyPrefix(spacelessCardNumber, Card.PREFIXES_AMERICAN_EXPRESS))\r\n            {\r\n                return Card.AMERICAN_EXPRESS;\r\n            }\r\n            else if (StripeTextUtils.HasAnyPrefix(spacelessCardNumber, Card.PREFIXES_DISCOVER))\r\n            {\r\n                return Card.DISCOVER;\r\n            }\r\n            else if (StripeTextUtils.HasAnyPrefix(spacelessCardNumber, Card.PREFIXES_JCB))\r\n            {\r\n                return Card.JCB;\r\n            }\r\n            else if (StripeTextUtils.HasAnyPrefix(spacelessCardNumber, Card.PREFIXES_DINERS_CLUB))\r\n            {\r\n                return Card.DINERS_CLUB;\r\n            }\r\n            else if (StripeTextUtils.HasAnyPrefix(spacelessCardNumber, Card.PREFIXES_VISA))\r\n            {\r\n                return Card.VISA;\r\n            }\r\n            else if (StripeTextUtils.HasAnyPrefix(spacelessCardNumber, Card.PREFIXES_MASTERCARD))\r\n            {\r\n                return Card.MASTERCARD;\r\n            }\r\n            else\r\n            {\r\n                return Card.UNKNOWN;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Separates a card number according to the brand requirements, including prefixes of card\r\n        /// numbers, so that the groups can be easily displayed if the user is typing them in.\r\n        /// Note that this does not verify that the card number is valid, or even that it is a number.\r\n        /// </summary>\r\n        /// <param name=\"spacelessCardNumber\">the raw card number, without spaces</param>\r\n        /// <param name=\"brand\">the {@link CardBrand} to use as a separating scheme</param>\r\n        /// <returns>an array of strings with the number groups, in order. If the number is not complete,\r\n        /// some of the array entries may be <see langword=\"null\">.</returns>\r\n        public static String[] SeparateCardNumberGroups(string spacelessCardNumber, string brand)\r\n        {\r\n            String[] numberGroups;\r\n            if (brand.Equals(Card.AMERICAN_EXPRESS))\r\n            {\r\n                numberGroups = new String[3];\r\n\r\n                int length = spacelessCardNumber.Length;\r\n                int lastUsedIndex = 0;\r\n                if (length > 4)\r\n                {\r\n                    numberGroups[0] = spacelessCardNumber.Substring(0, 4);\r\n                    lastUsedIndex = 4;\r\n                }\r\n\r\n                if (length > 10)\r\n                {\r\n                    numberGroups[1] = spacelessCardNumber.Substring(4, 6);\r\n                    lastUsedIndex = 10;\r\n                }\r\n\r\n                for (int i = 0; i < 3; i++)\r\n                {\r\n                    if (numberGroups[i] != null)\r\n                    {\r\n                        continue;\r\n                    }\r\n                    numberGroups[i] = spacelessCardNumber.Substring(lastUsedIndex);\r\n                    break;\r\n                }\r\n\r\n            }\r\n            else\r\n            {\r\n                numberGroups = new String[4];\r\n                int i = 0;\r\n                int previousStart = 0;\r\n                while ((i + 1) * 4 < spacelessCardNumber.Length)\r\n                {\r\n                    String group = spacelessCardNumber.Substring(previousStart, ((i + 1) * 4) - previousStart);\r\n                    numberGroups[i] = group;\r\n                    previousStart = (i + 1) * 4;\r\n                    i++;\r\n                }\r\n                // Always stuff whatever is left into the next available array entry. This handles\r\n                // incomplete numbers, full 16-digit numbers, and full 14-digit numbers\r\n                numberGroups[i] = spacelessCardNumber.Substring(previousStart);\r\n            }\r\n            return numberGroups;\r\n        }\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/Stripe/DateUtils.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\n\r\nnamespace TelegramClient.ViewModels.Payments.Stripe\r\n{\r\n    public class DateUtils\r\n    {\r\n        /// <summary>\r\n        /// Determines whether or not the input year has already passed.\r\n        /// </summary>\r\n        /// <param name=\"year\">the input year, as a two or four-digit integer</param>\r\n        /// <returns><see langword=\"true\"> if the year has passed, <see langword=\"false\"> otherwise.</returns>\r\n        public static bool HasYearPassed(int year)\r\n        {\r\n            var normalized = NormalizeYear(year);\r\n            return normalized < DateTime.Now.Year;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether the input year-month pair has passed.\r\n        /// </summary>\r\n        /// <param name=\"year\">the input year, as a two or four-digit integer</param>\r\n        /// <param name=\"month\">the input month</param>\r\n        /// <returns><see langword=\"true\"> if the input time has passed, <see langword=\"false\"> otherwise.</returns>\r\n        public static bool HasMonthPassed(int year, int month)\r\n        {\r\n            if (HasYearPassed(year))\r\n            {\r\n                return true;\r\n            }\r\n\r\n            // Expires at end of specified month, Calendar month starts at 0\r\n            return NormalizeYear(year) == DateTime.Now.Year\r\n                    && month < (DateTime.Now.Month + 1);\r\n        }\r\n\r\n        // Convert two-digit year to full year if necessary\r\n        private static int NormalizeYear(int year)\r\n        {\r\n            if (year < 100 && year >= 0)\r\n            {\r\n                var currentYear = DateTime.Now.Year.ToString();\r\n                var prefix = currentYear.Substring(0, currentYear.Length - 2);\r\n                year = int.Parse(String.Format(\"{0}{1}\", prefix, year));\r\n            }\r\n\r\n            return year;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/Stripe/JSON/Response.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.ViewModels.Payments.Stripe.JSON\r\n{\r\n    public class Error\r\n    {\r\n        public string message { get; set; }\r\n        public string type { get; set; }\r\n        public string param { get; set; }\r\n        public string code { get; set; }\r\n    }\r\n\r\n    public class RootObject\r\n    {\r\n        public Error error { get; set; }\r\n        public string id { get; set; }\r\n        public string @object { get; set; }\r\n        public Card card { get; set; }\r\n        public string client_ip { get; set; }\r\n        public int created { get; set; }\r\n        public bool livemode { get; set; }\r\n        public string type { get; set; }\r\n        public bool used { get; set; }\r\n    }\r\n\r\n    public class Metadata\r\n    {\r\n    }\r\n\r\n    public class Card\r\n    {\r\n        public string id { get; set; }\r\n        public string @object { get; set; }\r\n        public object address_city { get; set; }\r\n        public string address_country { get; set; }\r\n        public object address_line1 { get; set; }\r\n        public object address_line1_check { get; set; }\r\n        public object address_line2 { get; set; }\r\n        public object address_state { get; set; }\r\n        public string address_zip { get; set; }\r\n        public string address_zip_check { get; set; }\r\n        public string brand { get; set; }\r\n        public string country { get; set; }\r\n        public string cvc_check { get; set; }\r\n        public object dynamic_last4 { get; set; }\r\n        public int exp_month { get; set; }\r\n        public int exp_year { get; set; }\r\n        public string funding { get; set; }\r\n        public string last4 { get; set; }\r\n        public Metadata metadata { get; set; }\r\n        public string name { get; set; }\r\n        public object tokenization_method { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/Stripe/StripeClient.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Runtime.Serialization.Json;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Windows.Data.Json;\r\nusing TelegramClient.ViewModels.Payments.Stripe.JSON;\r\n\r\nnamespace TelegramClient.ViewModels.Payments.Stripe\r\n{\r\n    public class StripeClient : IDisposable\r\n    {\r\n        private readonly string _publishableKey;\r\n\r\n        private HttpClient _client;\r\n\r\n        public StripeClient(string publishableKey)\r\n        {\r\n            _publishableKey = publishableKey;\r\n            _client = new HttpClient();\r\n        }\r\n\r\n        public async Task<StripeToken> CreateTokenAsync(Card card)\r\n        {\r\n            if (card == null)\r\n            {\r\n                throw new ArgumentNullException(\"card\");\r\n            }\r\n\r\n            if (_client != null)\r\n            {\r\n                try\r\n                {\r\n                    var parameters = StripeNetworkUtils.HashMapFromCard(card);\r\n\r\n                    var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.stripe.com/v1/tokens\");\r\n                    var requestContent = new FormUrlEncodedContent(parameters);\r\n\r\n                    request.Headers.Authorization = new AuthenticationHeaderValue(\"Basic\", GetAuthorizationHeaderValue(_publishableKey));\r\n                    request.Content = requestContent;\r\n\r\n                    var response = await _client.SendAsync(request);\r\n                    var content = await response.Content.ReadAsStringAsync();\r\n                    var json = GetRootObject(content);\r\n                    var token = new StripeToken {Id = json.id, Type = json.type, Error = json.error, Content = content};\r\n\r\n                    return token;\r\n                }\r\n                catch\r\n                {\r\n\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static RootObject GetRootObject(string payload)\r\n        {\r\n            var serializer = new DataContractJsonSerializer(typeof(RootObject));\r\n            RootObject rootObject;\r\n            using (var stream = new MemoryStream(Encoding.Unicode.GetBytes(payload)))\r\n            {\r\n                rootObject = serializer.ReadObject(stream) as RootObject;\r\n            }\r\n\r\n            return rootObject;\r\n        }\r\n\r\n        private string GetAuthorizationHeaderValue(string apiKey)\r\n        {\r\n            return Convert.ToBase64String(Encoding.UTF8.GetBytes(string.Format(\"{0}:\", apiKey)));\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            if (_client != null)\r\n            {\r\n                _client.Dispose();\r\n                _client = null;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/Stripe/StripeNetworkUtils.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace TelegramClient.ViewModels.Payments.Stripe\r\n{\r\n    /// <summary>\r\n    /// Utility class for static functions useful for networking and data transfer. You probably will\r\n    /// not need to call functions from this class in your code.\r\n    /// </summary>\r\n    public class StripeNetworkUtils\r\n    {\r\n        /// <summary>\r\n        /// A utility function to map the fields of a <see cref=\"Card\"/> object into a <see langword=\"Dictionary\"/> we\r\n        /// can use in network communications.\r\n        /// </summary>\r\n        /// <param name=\"card\">the <see cref=\"Card\"/> to be read</param>\r\n        /// <returns>a <see langword=\"Dictionary\"/> containing the appropriate values read from the card</returns>\r\n        public static Dictionary<string, string> HashMapFromCard(Card card)\r\n        {\r\n            var cardParams = new Dictionary<string, string>();\r\n            cardParams[\"card[number]\"] = StripeTextUtils.NullIfBlank(card.Number);\r\n            cardParams[\"card[cvc]\"] = StripeTextUtils.NullIfBlank(card.CVC);\r\n            cardParams[\"card[exp_month]\"] = card.ExpiryMonth.ToString();\r\n            cardParams[\"card[exp_year]\"] = card.ExpiryYear.ToString();\r\n            cardParams[\"card[name]\"] = StripeTextUtils.NullIfBlank(card.Name);\r\n            cardParams[\"card[currency]\"] = StripeTextUtils.NullIfBlank(card.Currency);\r\n            cardParams[\"card[address_line1]\"] = StripeTextUtils.NullIfBlank(card.AddressLine1);\r\n            cardParams[\"card[address_line2]\"] = StripeTextUtils.NullIfBlank(card.AddressLine2);\r\n            cardParams[\"card[address_city]\"] = StripeTextUtils.NullIfBlank(card.AddressCity);\r\n            cardParams[\"card[address_zip]\"] = StripeTextUtils.NullIfBlank(card.AddressZip);\r\n            cardParams[\"card[address_state]\"] = StripeTextUtils.NullIfBlank(card.AddressState);\r\n            cardParams[\"card[address_country]\"] = StripeTextUtils.NullIfBlank(card.AddressCountry);\r\n\r\n            // Remove all null values; they cause validation errors\r\n            RemoveNullParams(cardParams);\r\n\r\n            return cardParams;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Remove null values from a map. This helps with JSON conversion and validation.\r\n        /// </summary>\r\n        /// <param name=\"mapToEdit\">a <see langword=\"Dictionary\"/> from which to remove the keys that have <see langword=\"null\"> values</param>\r\n        private static void RemoveNullParams(Dictionary<string, string> mapToEdit)\r\n        {\r\n            // Remove all null values; they cause validation errors\r\n            foreach (String key in mapToEdit.Keys.ToList())\r\n            {\r\n                if (mapToEdit[key] == null)\r\n                {\r\n                    mapToEdit.Remove(key);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/Stripe/StripeTextUtils.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Text.RegularExpressions;\r\n\r\nnamespace TelegramClient.ViewModels.Payments.Stripe\r\n{\r\n    public class StripeTextUtils\r\n    {\r\n        /// <summary>\r\n        /// Check to see if the input number has any of the given prefixes.\r\n        /// </summary>\r\n        /// <param name=\"number\">the number to test</param>\r\n        /// <param name=\"prefixes\">the prefixes to test against</param>\r\n        /// <returns><see langword=\"true\"> if number begins with any of the input prefixes</returns>\r\n        public static bool HasAnyPrefix(String number, params String[] prefixes)\r\n        {\r\n            if (number == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            foreach (String prefix in prefixes)\r\n            {\r\n                if (number.StartsWith(prefix))\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check to see whether the input string is a whole, positive number.\r\n        /// </summary>\r\n        /// <param name=\"value\">the input string to test</param>\r\n        /// <returns><see langword=\"true\"> if the input value consists entirely of integers</returns>\r\n        public static bool IsWholePositiveNumber(String value)\r\n        {\r\n            if (value == null)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            // Refraining from using android's TextUtils in order to avoid\r\n            // depending on another package.\r\n            for (int i = 0; i < value.Length; i++)\r\n            {\r\n                if (!char.IsDigit(value[i]))\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n            return true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Swap <see langword=\"null\"> for blank text values.\r\n        /// </summary>\r\n        /// <param name=\"value\">an input string that may or may not be entirely whitespace</param>\r\n        /// <returns><see langword=\"null\"> if the string is entirely whitespace, or the original value if not</returns>\r\n        public static string NullIfBlank(String value)\r\n        {\r\n            if (string.IsNullOrWhiteSpace(value))\r\n            {\r\n                return null;\r\n            }\r\n            return value;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts a card number that may have spaces between the numbers into one without any spaces.\r\n        /// Note: method does not check that all characters are digits or spaces.\r\n        /// </summary>\r\n        /// <param name=\"cardNumberWithSpaces\">a card number, for instance \"4242 4242 4242 4242\"</param>\r\n        /// <returns>the input number minus any spaces, for instance \"4242424242424242\".\r\n        /// Returns <see langword=\"null\"> if the input was <see langword=\"null\"> or all spaces.</returns>\r\n        public static String RemoveSpacesAndHyphens(string cardNumberWithSpaces)\r\n        {\r\n            if (string.IsNullOrWhiteSpace(cardNumberWithSpaces))\r\n            {\r\n                return null;\r\n            }\r\n            return Regex.Replace(cardNumberWithSpaces, \"\\\\s|-\", \"\");\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts an unchecked String value to a {@link CardBrand} or <see langword=\"null\">.\r\n        /// </summary>\r\n        /// <param name=\"possibleCardType\">a String that might match a {@link CardBrand} or be empty.</param>\r\n        /// <returns><see langword=\"null\"> if the input is blank, else the appropriate {@link CardBrand}.</returns>\r\n        public static string AsCardBrand(string possibleCardType)\r\n        {\r\n            if (string.IsNullOrWhiteSpace(possibleCardType))\r\n            {\r\n                return null;\r\n            }\r\n\r\n            if (Card.AMERICAN_EXPRESS.Equals(possibleCardType, StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return Card.AMERICAN_EXPRESS;\r\n            }\r\n            else if (Card.MASTERCARD.Equals(possibleCardType, StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return Card.MASTERCARD;\r\n            }\r\n            else if (Card.DINERS_CLUB.Equals(possibleCardType, StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return Card.DINERS_CLUB;\r\n            }\r\n            else if (Card.DISCOVER.Equals(possibleCardType, StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return Card.DISCOVER;\r\n            }\r\n            else if (Card.JCB.Equals(possibleCardType, StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return Card.JCB;\r\n            }\r\n            else if (Card.VISA.Equals(possibleCardType, StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return Card.VISA;\r\n            }\r\n            else\r\n            {\r\n                return Card.UNKNOWN;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts an unchecked String value to a {@link FundingType} or <see langword=\"null\">.\r\n        /// </summary>\r\n        /// <param name=\"possibleFundingType\">a String that might match a {@link FundingType} or be empty</param>\r\n        /// <returns><see langword=\"null\"> if the input is blank, else the appropriate {@link FundingType}</returns>\r\n        public static string AsFundingType(string possibleFundingType)\r\n        {\r\n            if (string.IsNullOrWhiteSpace(possibleFundingType))\r\n            {\r\n                return null;\r\n            }\r\n\r\n            if (Card.FUNDING_CREDIT.Equals(possibleFundingType, StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return Card.FUNDING_CREDIT;\r\n            }\r\n            else if (Card.FUNDING_DEBIT.Equals(possibleFundingType, StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return Card.FUNDING_DEBIT;\r\n            }\r\n            else if (Card.FUNDING_PREPAID.Equals(possibleFundingType, StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return Card.FUNDING_PREPAID;\r\n            }\r\n            else\r\n            {\r\n                return Card.FUNDING_UNKNOWN;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/Stripe/StripeToken.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing TelegramClient.ViewModels.Payments.Stripe.JSON;\r\n\r\nnamespace TelegramClient.ViewModels.Payments.Stripe\r\n{\r\n    public class StripeToken\r\n    {\r\n        public string Id { get; set; }\r\n        public string Type { get; set; }\r\n        public Error Error { get; set; }\r\n\r\n        public string Content { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/WebCardInfoViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing Windows.Data.Json;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Payments\r\n{\r\n    public class WebCardInfoViewModel : PaymentViewModelBase\r\n    {\r\n        public Uri Url { get; set; }\r\n\r\n        private bool _removeCheckoutView;\r\n\r\n        public WebCardInfoViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            if (PaymentInfo != null && PaymentInfo.Form != null && !TLString.IsNullOrEmpty(PaymentInfo.Form.Url))\r\n            {\r\n                Url = new Uri(PaymentInfo.Form.Url.ToString(), UriKind.Absolute);\r\n            }\r\n\r\n            _removeCheckoutView = StateService.RemoveCheckoutAndCardView;\r\n            StateService.RemoveCheckoutAndCardView = false;\r\n        }\r\n\r\n        public void ScriptNotify(string value)\r\n        {\r\n            try\r\n            {\r\n                var obj = JsonObject.Parse(value);\r\n                IJsonValue eventType;\r\n                if (obj.TryGetValue(\"eventType\", out eventType))\r\n                {\r\n                    if (string.Equals(eventType.GetString(), \"payment_form_submit\", StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        IJsonValue eventData;\r\n                        if (obj.TryGetValue(\"eventData\", out eventData))\r\n                        {\r\n                            if (PaymentInfo != null)\r\n                            {\r\n                                var eventDataObject = eventData.GetObject();\r\n                                if (eventDataObject != null)\r\n                                {\r\n                                    IJsonValue title;\r\n                                    if (eventDataObject.TryGetValue(\"title\", out title))\r\n                                    {\r\n                                        PaymentInfo.CredentialsTitle = title.Stringify().Trim('\\\"');\r\n                                    }\r\n\r\n                                    IJsonValue credentials;\r\n                                    if (eventDataObject.TryGetValue(\"credentials\", out credentials))\r\n                                    {\r\n                                        var paymentCredentials = new TLInputPaymentCredentials\r\n                                        {\r\n                                            Flags = new TLInt(0),\r\n                                            Data = new TLDataJSON\r\n                                            {\r\n                                                Data = new TLString(credentials.Stringify())\r\n                                            }\r\n                                        };\r\n                                        PaymentInfo.Credentials = paymentCredentials;\r\n                                        NavigateToNextStep();\r\n                                        return;\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            return;\r\n                        }\r\n\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                MessageBox.Show(value);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(string.Format(\"WebViewModel.ScriptNotify {0} exception {1}\", value, ex));\r\n            }\r\n        }\r\n\r\n        public override void NavigateToNextStep()\r\n        {\r\n            if (_removeCheckoutView)\r\n            {\r\n                var backEntry = NavigationService.BackStack.FirstOrDefault();\r\n                if (backEntry != null && backEntry.Source.ToString().Contains(\"CheckoutView.xaml\"))\r\n                {\r\n                    NavigationService.RemoveBackEntry();\r\n                }\r\n\r\n                backEntry = NavigationService.BackStack.FirstOrDefault();\r\n                if (backEntry != null && (backEntry.Source.ToString().Contains(\"SavedCardInfoView.xaml\") || backEntry.Source.ToString().Contains(\"CardInfoView.xaml\") || backEntry.Source.ToString().Contains(\"WebCardInfoView.xaml\")))\r\n                {\r\n                    NavigationService.RemoveBackEntry();\r\n                }\r\n            }\r\n\r\n            StateService.PaymentInfo = PaymentInfo;\r\n            NavigationService.UriFor<CheckoutViewModel>().Navigate();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Payments/WebVerificationViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.ViewModels.Payments\r\n{\r\n    public class WebVerificationViewModel : PaymentViewModelBase\r\n    {\r\n\r\n        public string Title\r\n        {\r\n            get\r\n            {\r\n                if (PaymentInfo != null)\r\n                {\r\n                    if (PaymentInfo.Receipt != null)\r\n                    {\r\n                        if (PaymentInfo.Receipt.Invoice.Test)\r\n                        {\r\n                            return AppResources.TestReceipt;\r\n                        }\r\n\r\n                        return AppResources.Receipt;\r\n                    }\r\n\r\n                    if (PaymentInfo.Form != null)\r\n                    {\r\n                        if (PaymentInfo.Form.Invoice.Test)\r\n                        {\r\n                            return AppResources.TestCheckout;\r\n                        }\r\n\r\n                        return AppResources.Checkout;\r\n                    }\r\n                }\r\n\r\n                return AppResources.Checkout;\r\n            }\r\n        }\r\n\r\n        public Uri Url { get; set; }\r\n\r\n        public WebVerificationViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) \r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            if (StateService.Url != null)\r\n            {\r\n                Url = new Uri(StateService.Url, UriKind.Absolute);\r\n                StateService.Url = null;\r\n            }\r\n\r\n            if (StateService.RemoveBackEntry)\r\n            {\r\n                StateService.RemoveBackEntry = false;\r\n                NavigationService.RemoveBackEntry();\r\n            }\r\n        }\r\n\r\n        public override void NavigateToNextStep()\r\n        {\r\n            \r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/ViewModels/Search/SearchSharedContactsViewModel.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.ViewModels.Search\r\n{\r\n    public class SearchSharedContactsViewModel : ItemsViewModelBase<TLUserBase>\r\n    {\r\n        private string _text;\r\n\r\n        public string Text\r\n        {\r\n            get { return _text; }\r\n            set { SetField(ref _text, value, () => Text); }\r\n        }\r\n\r\n        public Action<TLUserBase> AttachAction;\r\n\r\n        public SearchSharedContactsViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)\r\n            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)\r\n        {\r\n            Items = new ObservableCollection<TLUserBase>();\r\n            Status = AppResources.NoResults;\r\n\r\n            PropertyChanged += (sender, args) =>\r\n            {\r\n                if (Property.NameEquals(args.PropertyName, () => Text))\r\n                {\r\n                    if (string.IsNullOrEmpty(Text))\r\n                    {\r\n                        Search();\r\n                    }\r\n                    else\r\n                    {\r\n                        var text = Text;\r\n                        BeginOnUIThread(TimeSpan.FromSeconds(0.2), () =>\r\n                        {\r\n                            if (!string.Equals(Text, text)) return;\r\n\r\n                            Search();\r\n                        });\r\n                    }\r\n                }\r\n            };\r\n        }\r\n\r\n        public void UserAction(TLUserBase user)\r\n        {\r\n            if (user == null) return;\r\n\r\n            AttachAction.SafeInvoke(user);\r\n        }\r\n\r\n        private SearchUsersRequest _lastUsersRequest;\r\n\r\n        public IList<TLUserBase> Source { get; set; }\r\n\r\n        private readonly LRUCache<string, SearchUsersRequest> _searchResultsCache = new LRUCache<string, SearchUsersRequest>(Constants.MaxCacheCapacity);\r\n\r\n        public void Search()\r\n        {\r\n            if (_lastUsersRequest != null)\r\n            {\r\n                _lastUsersRequest.Cancel();\r\n            }\r\n\r\n            var text = Text.Trim();\r\n\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                System.Diagnostics.Debug.WriteLine(\"EmptyText text={0} canceled={1} items_count={2} current_text={3}\", text, _lastUsersRequest != null ? _lastUsersRequest.IsCanceled.ToString() : \"null\", LazyItems.Count, Text);\r\n\r\n                LazyItems.Clear();\r\n                Items.Clear();\r\n                Status = string.Empty;\r\n                return;\r\n            }\r\n\r\n            SearchUsersRequest nextUsersRequest;\r\n            if (!_searchResultsCache.TryGetValue(text, out nextUsersRequest))\r\n            {\r\n                IList<TLUserBase> source;\r\n\r\n                if (_lastUsersRequest != null\r\n                    && text.IndexOf(_lastUsersRequest.Text, StringComparison.OrdinalIgnoreCase) != -1)\r\n                {\r\n                    source = _lastUsersRequest.Source;\r\n                }\r\n                else\r\n                {\r\n                    source = Source;\r\n                }\r\n\r\n                nextUsersRequest = new SearchUsersRequest(text, source);\r\n            }\r\n\r\n            IsWorking = true;\r\n            nextUsersRequest.ProcessAsync(results =>\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (nextUsersRequest.IsCanceled) return;\r\n\r\n                    Items.Clear();\r\n                    LazyItems.Clear();\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        if (i < 6)\r\n                        {\r\n                            Items.Add(results[i]);\r\n                        }\r\n                        else\r\n                        {\r\n                            LazyItems.Add(results[i]);\r\n                        }\r\n                    }\r\n                    Status = Items.Count > 0 ? string.Empty : AppResources.NoResults;\r\n\r\n                    IsWorking = false;\r\n                    if (LazyItems.Count > 0)\r\n                    {\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (nextUsersRequest.IsCanceled) return;\r\n\r\n                            System.Diagnostics.Debug.WriteLine(\"ContinueResults text={0} canceled={1} items_count={2} current_text={3}\", nextUsersRequest.Text, nextUsersRequest.IsCanceled, LazyItems.Count, Text);\r\n\r\n                            foreach (var item in LazyItems)\r\n                            {\r\n                                Items.Add(item);\r\n                            }\r\n                            LazyItems.Clear();\r\n                            Status = Items.Count > 0 ? string.Empty : AppResources.NoResults;\r\n                        });\r\n                    }\r\n                }));\r\n            _searchResultsCache[nextUsersRequest.Text] = nextUsersRequest;\r\n            _lastUsersRequest = nextUsersRequest;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/BioView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.BioView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n    <views:TelegramViewBase.Resources>\r\n        <Style x:Key=\"TextBoxStyle1\" TargetType=\"TextBox\">\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n            <Setter Property=\"SelectionBackground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n            <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n            <Setter Property=\"Padding\" Value=\"2,2,36,2\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"TextBox\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"ReadOnly\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBorderBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unfocused\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"MainBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\"/>\r\n                            <Border x:Name=\"ReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\"/>\r\n                            <Border BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.Bio, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <Grid>\r\n                <TextBox x:Name=\"Input\" TextWrapping=\"Wrap\" Text=\"{Binding About, Mode=TwoWay}\" MaxLength=\"70\" TextChanged=\"TextBox_OnTextChanged\" Style=\"{StaticResource TextBoxStyle1}\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </TextBox>\r\n                <TextBlock x:Name=\"Counter\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\" Margin=\"22\" Text=\"70\" Opacity=\"0.7\" Foreground=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n\r\n            </Grid>\r\n            \r\n            <TextBlock Grid.Row=\"1\" Margin=\"12,11,12,0\" Text=\"{Binding Resources.BioDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </Grid>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n        <Grid x:Name=\"Bar\" Grid.Row=\"1\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform/>\r\n            </Grid.RenderTransform>\r\n            <controls1:TelegramApplicationBar\r\n                x:Name=\"AppBar\"\r\n                VerticalAlignment=\"Bottom\"\r\n                MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                <controls1:TelegramApplicationBar.Buttons>\r\n                    <controls1:TelegramAppBarButton\r\n                        IsEnabled=\"True\"\r\n                        Grid.Column=\"3\" \r\n                        Tap=\"DoneButton_OnClick\"\r\n                        ImageSource=\"/Images/W10M/ic_done_2x.png\"\r\n                        Text=\"{Binding Resources.Done, Source={StaticResource Strings}}\"/>\r\n                </controls1:TelegramApplicationBar.Buttons>\r\n            </controls1:TelegramApplicationBar>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/BioView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class BioView\r\n    {\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public BioViewModel ViewModel\r\n        {\r\n            get { return DataContext as BioViewModel; }\r\n        }\r\n\r\n        public BioView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Counter.Text = (Input.MaxLength - Input.Text.Length).ToString(CultureInfo.InvariantCulture);\r\n\r\n                BuildLocalizedAppBar();\r\n            };\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            return;\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_doneButton);\r\n            ApplicationBar.Buttons.Add(_cancelButton);\r\n        }\r\n\r\n        private void TextBox_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            Counter.Text = (Input.MaxLength - Input.Text.Length).ToString(CultureInfo.InvariantCulture);\r\n        }\r\n\r\n        private void DoneButton_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/CallsPrivacyView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.CallsPrivacyView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.Calls, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0,6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <TextBlock Text=\"{Binding Resources.CallsPrivacyDescription, Source={StaticResource Strings}}\" FontSize=\"23\" Margin=\"12,18,12,0\"/>\r\n            <ItemsControl Grid.Row=\"1\" ItemsSource=\"{Binding MainRules}\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <RadioButton GroupName=\"LastSeenGroup\" IsChecked=\"{Binding IsChecked, Mode=OneTime}\" Checked=\"ToggleButton_OnChecked\" Content=\"{Binding}\"/>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n            </ItemsControl>\r\n\r\n            <!--<toolkit:ListPicker\r\n                            Margin=\"12,10,12,0\"\r\n                            Header=\"{Binding Resources.LastSeenDescription, Source={StaticResource Strings}}\"\r\n                            Grid.Row=\"2\"\r\n                            ItemsSource=\"{Binding MainRules}\"\r\n                            SelectedItem=\"{Binding SelectedMainRule, Mode=TwoWay}\"\r\n                            ExpansionMode=\"FullScreenOnly\"\r\n                            FullModeHeader=\"{Binding Resources.ChooseAnItem, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\">\r\n                <toolkit:ListPicker.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Text=\"{Binding}\"/>\r\n                    </DataTemplate>\r\n                </toolkit:ListPicker.ItemTemplate>\r\n                <toolkit:ListPicker.FullModeItemTemplate>\r\n                    <DataTemplate>\r\n                        <TextBlock Margin=\"0,12\" Text=\"{Binding}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\" />\r\n                    </DataTemplate>\r\n                </toolkit:ListPicker.FullModeItemTemplate>\r\n            </toolkit:ListPicker>-->\r\n            <TextBlock Grid.Row=\"3\" Margin=\"12,23,12,38\" Text=\"{Binding Resources.CallsPrivacyImportantNote, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n            <Button Margin=\"-12,0,-12,0\" Grid.Row=\"6\" x:Name=\"OpenAllowUsers\" Visibility=\"{Binding AllowUsersVisibility}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                <StackPanel>\r\n                    <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.AlwaysShareWith, Source={StaticResource Strings}}\"/>\r\n                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding AllowUsersSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                </StackPanel>\r\n            </Button>\r\n\r\n            <Button Margin=\"-12,0,-12,0\" Grid.Row=\"5\" x:Name=\"OpenDisallowUsers\" Visibility=\"{Binding DisallowUsersVisibility}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                <StackPanel>\r\n                    <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.NeverShareWith, Source={StaticResource Strings}}\"/>\r\n                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding DisallowUsersSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                </StackPanel>\r\n            </Button>\r\n            <TextBlock Grid.Row=\"7\" Margin=\"12,23,12,0\" Text=\"{Binding Resources.CallsPrivacyOverrideNote, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/CallsPrivacyView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class CallsPrivacyView\r\n    {\r\n        private readonly AppBarButton _doneButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Done,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.check.png\", UriKind.Relative)\r\n        };\r\n\r\n        private readonly AppBarButton _cancelButton = new AppBarButton\r\n        {\r\n            Text = AppResources.Cancel,\r\n            IconUri = new Uri(\"/Images/ApplicationBar/appbar.cancel.rest.png\", UriKind.Relative)\r\n        };\r\n\r\n        public CallsPrivacyViewModel ViewModel\r\n        {\r\n            get { return DataContext as CallsPrivacyViewModel; }\r\n        }\r\n\r\n        public CallsPrivacyView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            _doneButton.Click += (sender, args) => ViewModel.Done();\r\n            _cancelButton.Click += (sender, args) => ViewModel.Cancel();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                BuildLocalizedAppBar();\r\n            };\r\n        }\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (ApplicationBar != null) return;\r\n\r\n            ApplicationBar = new ApplicationBar();\r\n            ApplicationBar.Buttons.Add(_doneButton);\r\n            ApplicationBar.Buttons.Add(_cancelButton);\r\n        }\r\n\r\n        private void ToggleButton_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            var radioButton = sender as RadioButton;\r\n            if (radioButton != null)\r\n            {\r\n                var privacyRule = radioButton.DataContext as TLPrivacyRuleBase;\r\n                if (privacyRule != null)\r\n                {\r\n                    ViewModel.SelectedMainRule = privacyRule;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/CallsSecurityView.xaml",
    "content": "﻿<phone:PhoneApplicationPage\r\n    x:Class=\"TelegramClient.Views.Additional.CallsSecurityView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Calls, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <StackPanel x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n\r\n            <TextBlock Text=\"{Binding Resources.PeerToPeer, Source={StaticResource Strings}}\" FontSize=\"23\" Margin=\"12,18,12,0\"/>\r\n\r\n            <RadioButton GroupName=\"PeerToPeerGroup\" IsChecked=\"{Binding CallsSecurity.PeerToPeerEverybody, Mode=TwoWay}\" Content=\"{Binding Resources.Everybody, Source={StaticResource Strings}}\"/>\r\n            <RadioButton GroupName=\"PeerToPeerGroup\" IsChecked=\"{Binding CallsSecurity.PeerToPeerContacts, Mode=TwoWay}\" Content=\"{Binding Resources.MyContacts, Source={StaticResource Strings}}\"/>\r\n            <RadioButton GroupName=\"PeerToPeerGroup\" IsChecked=\"{Binding CallsSecurity.PeerToPeerNobody, Mode=TwoWay}\" Content=\"{Binding Resources.Nobody, Source={StaticResource Strings}}\"/>\r\n\r\n<!--            <toolkit:ToggleSwitch Margin=\"0,18,-29,0\" Grid.Row=\"0\" IsChecked=\"{Binding CallsSecurity.PeerToPeer, Mode=TwoWay}\" Header=\"{Binding Resources.PeerToPeer, Source={StaticResource Strings}}\">-->\r\n<!--                <i:Interaction.Behaviors>-->\r\n<!--                    <behaviors:ToggleSwitchLocalizedContentBehavior-->\r\n<!--                        OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"-->\r\n<!--                        OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>-->\r\n<!--                </i:Interaction.Behaviors>-->\r\n<!--            </toolkit:ToggleSwitch>-->\r\n            <TextBlock Margin=\"12,18,12,0\" Text=\"{Binding Resources.PeerToPeerDescription, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </StackPanel>\r\n    </Grid>\r\n\r\n</phone:PhoneApplicationPage>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/CallsSecurityView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class CallsSecurityView\r\n    {\r\n        public CallsSecurityView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/CameraView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.CameraView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Camera, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0,6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <TextBlock Text=\"{Binding Resources.ChooseYourCameraApp, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" FontSize=\"23\" Margin=\"12,18,12,0\"/>\r\n            <ItemsControl Grid.Row=\"1\" ItemsSource=\"{Binding MainRules}\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <RadioButton GroupName=\"CameraGroup\" IsChecked=\"{Binding IsChecked, Mode=OneTime}\" Checked=\"ToggleButton_OnChecked\" Content=\"{Binding}\"/>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n            </ItemsControl>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/CameraView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class CameraView\r\n    {\r\n        public CameraViewModel ViewModel\r\n        {\r\n            get { return DataContext as CameraViewModel; }\r\n        }\r\n\r\n        public CameraView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void ToggleButton_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            var radioButton = sender as RadioButton;\r\n            if (radioButton != null)\r\n            {\r\n                var privacyRule = radioButton.DataContext as TLPrivacyRuleBase;\r\n                if (privacyRule != null)\r\n                {\r\n                    ViewModel.SelectedMainRule = privacyRule;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/ChooseGeoLivePeriodView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Additional.ChooseGeoLivePeriodView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border Height=\"114\" Margin=\"-12,0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n        <controls:LiveLocationIcon Height=\"114\" Margin=\"-12,0\"/>\r\n        \r\n        <!--<StackPanel Grid.Row=\"0\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" Margin=\"-12,0\">\r\n            <Image Height=\"38\" Margin=\"0,38,0,38\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Source=\"/Images/W10M/ic_livelocation_2x.png\"/>\r\n        </StackPanel>-->\r\n\r\n        <TextBlock x:Name=\"Subtitle\" Grid.Row=\"1\" Margin=\"12,24,12,6\" TextWrapping=\"Wrap\" />\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"2\" VerticalAlignment=\"Stretch\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <RadioButton x:Name=\"Period15Minutes\" GroupName=\"PeriodGroup\" IsChecked=\"True\" Content=\"{Binding Resources.For15Minutes, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n            <RadioButton x:Name=\"Period1Hour\" GroupName=\"PeriodGroup\" Grid.Row=\"1\"  Content=\"{Binding Resources.For1Hour, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n            <RadioButton x:Name=\"Period8Hours\" GroupName=\"PeriodGroup\" Grid.Row=\"2\" Content=\"{Binding Resources.For8Hours, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/ChooseGeoLivePeriodView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChooseGeoLivePeriodView\r\n    {\r\n        public ChooseGeoLivePeriodView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n            if (isFullHD || Environment.OSVersion.Version.Major >= 10)\r\n            {\r\n                Period15Minutes.FontSize = 20.0;\r\n                Period1Hour.FontSize = 20.0;\r\n                Period8Hours.FontSize = 20.0;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/ChooseVideoQualityView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Additional.ChooseVideoQualityView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkitPrimitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,28\">\r\n            <TextBlock Text=\"{Binding Resources.VideoQuality, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <!--<TextBlock Grid.Row=\"1\" Margin=\"18,0,18,28\" Text=\"{Binding Subtitle}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"2\" Height=\"148\" VerticalAlignment=\"Top\">\r\n            <toolkitPrimitives:LoopingSelector x:Name=\"Selector\" ItemSize=\"148,148\" ItemMargin=\"6,3\" IsExpanded=\"True\" DataSource=\"{Binding Items}\">\r\n                <toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <StackPanel\r\n                            HorizontalAlignment=\"Left\"\r\n                            VerticalAlignment=\"Bottom\"\r\n                            Margin=\"6\">\r\n                            <TextBlock\r\n                                Text=\"{Binding SpanNumber}\"\r\n                                FontSize=\"54\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\"\r\n                                Margin=\"0,-8\"/>\r\n                            <TextBlock\r\n                                Text=\"{Binding SpanName}\"\r\n                                FontSize=\"20\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                Opacity=\"0.7\"\r\n                                Margin=\"0,-2\"/>\r\n                        </StackPanel>\r\n                    </DataTemplate>\r\n                </toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n            </toolkitPrimitives:LoopingSelector>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/ChooseVideoQualityView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ChooseVideoQualityView : UserControl\r\n    {\r\n        public ChooseVideoQualityView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/ContactsSecurityView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ContactsSecurityView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Contacts, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <StackPanel x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n\r\n            <Button Margin=\"-12,18,-12,0\" x:Name=\"DeleteSyncedContacts\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                <StackPanel>\r\n                    <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.DeleteSyncedContacts, Source={StaticResource Strings}}\"/>\r\n                    <!--<TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>-->\r\n                </StackPanel>\r\n            </Button>\r\n\r\n            <Button Margin=\"-12,0,-12,0\" x:Name=\"SyncContacts\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                <StackPanel>\r\n                    <TextBlock Margin=\"10,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.SyncContacts, Source={StaticResource Strings}}\"/>\r\n                    <TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding SyncContactsSubtitle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                </StackPanel>\r\n            </Button>\r\n            \r\n            <TextBlock Margin=\"12,11,12,0\" Visibility=\"Collapsed\" Text=\"{Binding SyncContactsHint}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n            <toolkit:ToggleSwitch Margin=\"0,18,-29,-21\" IsChecked=\"{Binding SuggestFrequentContacts, Mode=TwoWay}\" Header=\"{Binding Resources.SuggestFrequentContacts, Source={StaticResource Strings}}\">\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                        OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                        OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                </i:Interaction.Behaviors>\r\n            </toolkit:ToggleSwitch>\r\n            <TextBlock Margin=\"12,11,12,0\" Text=\"{Binding Resources.SuggestFrequentContactsAbout, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n        </StackPanel>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/ContactsSecurityView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ContactsSecurityView\r\n    {\r\n        public ContactsSecurityView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/GifPlayerControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Additional.GifPlayerControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" Tap=\"LayoutRoot_OnTap\" ManipulationStarted=\"LayoutRoot_OnManipulationStarted\">\r\n        <Grid x:Name=\"FrameGrid\">\r\n            <Border Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"0.4\"/>\r\n            <Image x:Name=\"Thumb\"/>\r\n            <Image x:Name=\"Frame\" CacheMode=\"BitmapCache\"/>\r\n        </Grid>\r\n\r\n        <Border x:Name=\"MuteIcon\" Width=\"34\" Height=\"34\" CornerRadius=\"17\" Background=\"#49496A95\" Margin=\"4\" VerticalAlignment=\"Top\" Visibility=\"Collapsed\">\r\n            <Image Source=\"/Images/Messages/roundvideo.muted.png\" Width=\"32\" Height=\"32\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n        </Border>\r\n\r\n        <Grid x:Name=\"Button\" Width=\"64\" Height=\"64\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\">\r\n            <Grid x:Name=\"PlayButton\" Visibility=\"Visible\">\r\n                <Ellipse x:Name=\"PlayCircle\" Width=\"64\" Height=\"64\" Fill=\"#7F000000\"/>\r\n                <TextBlock x:Name=\"Play\" Margin=\"0,-2,0,0\" Text=\"{Binding Resources.Gif, Source={StaticResource Strings}}\" VerticalAlignment=\"Center\" Foreground=\"#FFFFFFFF\" HorizontalAlignment=\"Center\" FontSize=\"20\"/>\r\n            </Grid>\r\n            <controls:Progress x:Name=\"CancelDownloadButton\" Visibility=\"Collapsed\" Cancel=\"CancelDownloadButton_OnTap\" Completed=\"CancelDownloadButton_OnCompleted\"/>\r\n            <Grid x:Name=\"DownloadButton\" Visibility=\"Collapsed\">\r\n                <Ellipse Width=\"64\" Height=\"64\" Fill=\"#7F000000\"/>\r\n                <Rectangle Width=\"4\" Height=\"24\" Fill=\"White\"/>\r\n                <Polyline StrokeThickness=\"3.5\" Stroke=\"White\" Margin=\"1,0,0,0\" Points=\"0 15 10 25 20 15\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n            </Grid>\r\n        </Grid>\r\n        <Border x:Name=\"MediaPlaceholder\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" CornerRadius=\"120\"/>\r\n        <StackPanel>\r\n            <TextBlock x:Name=\"Debug\" CacheMode=\"BitmapCache\" Foreground=\"GreenYellow\" TextWrapping=\"Wrap\" IsHitTestVisible=\"False\"/>\r\n        </StackPanel>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/GifPlayerControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Net;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Threading;\r\nusing Windows.Foundation.Metadata;\r\nusing Windows.Graphics.Imaging;\r\nusing Windows.Storage;\r\nusing Caliburn.Micro;\r\nusing FFmpegInterop;\r\nusing Microsoft.Devices;\r\nusing Microsoft.Phone;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Controls;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Buffer = System.Buffer;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class GifPlayerControl\r\n    {\r\n        #region Dispatcher Timer\r\n\r\n        private static readonly DispatcherTimer _dispatcherTimer;\r\n\r\n        static GifPlayerControl()\r\n        {\r\n            _dispatcherTimer = new DispatcherTimer{ Interval = TimeSpan.FromMilliseconds(50.0) };\r\n            _dispatcherTimer.Tick += (sender, args) =>\r\n            {\r\n                //VibrateController.Default.Start(TimeSpan.FromMilliseconds(15.0));\r\n               foreach (var player in ActivePlayers)\r\n                {\r\n                    player.UpdateFrame();\r\n                }\r\n\r\n                foreach (var inlinePlayer in InlineBotActivePlayers)\r\n                {\r\n                    inlinePlayer.UpdateFrame();\r\n                }\r\n            };\r\n        }\r\n\r\n        private void UpdateFrame()\r\n        {\r\n            var pixels = _frame;\r\n            if (pixels != null)\r\n            {\r\n                _frame = null;\r\n\r\n                try\r\n                {\r\n                    if (PlayButton.Visibility == Visibility.Visible) return;\r\n\r\n                    var bitmap = Frame.Source as WriteableBitmap;\r\n                    if (bitmap == null || bitmap.PixelWidth != _w || bitmap.PixelHeight != _h)\r\n                    {\r\n                        bitmap = new WriteableBitmap(_w, _h);\r\n\r\n                        Frame.Source = bitmap;\r\n                    }\r\n                    for (var j = 0; j < bitmap.Pixels.Length; j++)\r\n                    {\r\n                        bitmap.Pixels[j] =\r\n                            (pixels[j * 4 + 3] << 24) |     //b\r\n                            (pixels[j * 4 + 2] << 0) |      //g\r\n                            (pixels[j * 4 + 1] << 8) |      //r\r\n                            (pixels[j * 4] << 16);          //a \r\n\r\n                        //bitmap.Pixels[j] = pixels[j];\r\n                    }\r\n\r\n                    bitmap.Invalidate();\r\n\r\n                    if (Mode == GifPlayerMode.Normal)\r\n                    {\r\n                        //Debug.Text = string.Format(\"pts={0}\\nptsDelta={1}\\ntimeDelta={2}\\nelapsed={3}\", _pts, _ptsDelta, _timeDelta, _elapsed.TotalMilliseconds);\r\n                    }\r\n                }\r\n                catch(Exception ex)\r\n                {\r\n                    Execute.ShowDebugMessage(\"UpdateFrame exception \" + ex);\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void StartUpdateFrames()\r\n        {\r\n            if (!_dispatcherTimer.IsEnabled)\r\n            {\r\n                _dispatcherTimer.Start();\r\n            }\r\n        }\r\n\r\n        private static void StopUpdateFrames()\r\n        {\r\n            if (_dispatcherTimer.IsEnabled)\r\n            {\r\n                _dispatcherTimer.Stop();\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        private static readonly IList<GifPlayerControl> _inlineBotActivePlayers = new List<GifPlayerControl>();\r\n\r\n        public static IList<GifPlayerControl> InlineBotActivePlayers\r\n        {\r\n            get { return _inlineBotActivePlayers; }\r\n        }\r\n\r\n        public static void StopInlineBotActivePlayers()\r\n        {\r\n            var players = new List<GifPlayerControl>(_inlineBotActivePlayers);\r\n            foreach (var player in players)\r\n            {\r\n                player.Stop();\r\n            }\r\n        }\r\n\r\n        private static readonly IList<GifPlayerControl> _activePlayers = new List<GifPlayerControl>();\r\n\r\n        public static IList<GifPlayerControl> ActivePlayers\r\n        {\r\n            get { return _activePlayers; }\r\n        }\r\n\r\n        public static void ResumeActivePlayers(IList<GifPlayerControl> activePlayers)\r\n        {\r\n            var players = new List<GifPlayerControl>(_activePlayers);\r\n            _activePlayers.Clear();\r\n\r\n            var stoppedPlayers = new List<GifPlayerControl>();\r\n\r\n            foreach (var player in players)\r\n            {\r\n                if (!activePlayers.Contains(player))\r\n                {\r\n                    stoppedPlayers.Add(player);\r\n                }\r\n            }\r\n\r\n            foreach (var player in activePlayers)\r\n            {\r\n                player.Resume();\r\n                _activePlayers.Add(player);\r\n            }\r\n\r\n            var autoPlayGif = false;\r\n            var stateService = IoC.Get<IStateService>();\r\n            if (stateService != null)\r\n            {\r\n                var chatSettings = stateService.GetChatSettings();\r\n                if (chatSettings != null)\r\n                {\r\n                    autoPlayGif = chatSettings.AutoPlayGif;\r\n                }\r\n\r\n                foreach (var player in stoppedPlayers)\r\n                {\r\n                    if (!autoPlayGif)\r\n                    {\r\n                        if ((player.Media != null && player.Media.AutoPlayGif == true))\r\n                        {\r\n                            autoPlayGif = true;\r\n                        }\r\n                    }\r\n\r\n                    player.Stop(autoPlayGif);\r\n                }\r\n            }\r\n\r\n            if (_activePlayers.Count > 0)\r\n            {\r\n                StartUpdateFrames();\r\n            }\r\n        }\r\n\r\n        public static void PauseActivePlayers()\r\n        {\r\n            var players = new List<GifPlayerControl>(_activePlayers);\r\n            if (players.Count > 0)\r\n            {\r\n                foreach (var player in players)\r\n                {\r\n                    player.Pause();\r\n                }\r\n            }\r\n\r\n            StopUpdateFrames();\r\n        }\r\n\r\n        public static void StopActivePlayers(bool scroll = false)\r\n        {\r\n            var players = new List<GifPlayerControl>(_activePlayers);\r\n            if (players.Count > 0)\r\n            {\r\n                var autoPlayGif = false;\r\n                var stateService = IoC.Get<IStateService>();\r\n                if (stateService != null)\r\n                {\r\n                    var chatSettings = stateService.GetChatSettings();\r\n                    if (chatSettings != null)\r\n                    {\r\n                        autoPlayGif = chatSettings.AutoPlayGif;\r\n                    }\r\n\r\n                    foreach (var player in players)\r\n                    {\r\n                        if (!autoPlayGif)\r\n                        {\r\n                            if (player.Media != null && player.Media.AutoPlayGif == true)\r\n                            {\r\n                                autoPlayGif = true;\r\n                            }\r\n                        }\r\n\r\n                        player.Stop(autoPlayGif);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty ModeProperty = DependencyProperty.Register(\r\n            \"Mode\", typeof (GifPlayerMode), typeof (GifPlayerControl), new PropertyMetadata(default(GifPlayerMode), OnModeChanged));\r\n\r\n        private static void OnModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var player = d as GifPlayerControl;\r\n            if (player != null)\r\n            {\r\n                var mode = (GifPlayerMode) e.NewValue;\r\n                if (mode == GifPlayerMode.InlineResult)\r\n                {\r\n                    player.Button.RenderTransform = new ScaleTransform { ScaleX = 0.5, ScaleY = 0.5, CenterX = 23.5, CenterY = 23.5 };\r\n                    player.Play.Opacity = 0.0;\r\n                    player.PlayCircle.Opacity = 0.0;\r\n                    player.DownloadButton.Opacity = 0.0;\r\n                    player.CancelDownloadButton.CancelVisibility = Visibility.Collapsed;\r\n                }\r\n                else if (mode == GifPlayerMode.RoundVideo)\r\n                {\r\n                    \r\n                }\r\n                else \r\n                {\r\n                    player.Button.RenderTransform = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        public GifPlayerMode Mode\r\n        {\r\n            get { return (GifPlayerMode) GetValue(ModeProperty); }\r\n            set { SetValue(ModeProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty UploadingProgressProperty = DependencyProperty.Register(\r\n            \"UploadingProgress\", typeof(double), typeof(GifPlayerControl), new PropertyMetadata(default(double), OnUploadingProgressChanged));\r\n\r\n        public double UploadingProgress\r\n        {\r\n            get { return (double) GetValue(UploadingProgressProperty); }\r\n            set { SetValue(UploadingProgressProperty, value); }\r\n        }\r\n\r\n        private static void OnUploadingProgressChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var player = d as GifPlayerControl;\r\n            if (player == null) return;\r\n\r\n            if (e.NewValue is double)\r\n            {\r\n                var progress = (double)e.NewValue;\r\n\r\n                player.CancelDownloadButton.Value = progress;\r\n\r\n                var isComplete = e.NewValue != null\r\n                        && e.OldValue != null\r\n                        && (double)e.OldValue > 0.0\r\n                        && (double)e.OldValue < 1.0\r\n                        && (double)e.NewValue == 0.0;\r\n                if (isComplete)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                var isVisible = progress > 0.0 && progress < 1.0;\r\n                OnProgressChangedInternal(isVisible, player, progress);\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty ProgressProperty = DependencyProperty.Register(\r\n            \"Progress\", typeof (double), typeof (GifPlayerControl), new PropertyMetadata(default(double), OnProgressChanged));\r\n\r\n        public double Progress\r\n        {\r\n            get { return (double) GetValue(ProgressProperty); }\r\n            set { SetValue(ProgressProperty, value); }\r\n        }\r\n\r\n        private void CancelDownloadButton_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            OnProgressChangedInternal(false, this, 0.0);\r\n        }\r\n\r\n        private static void OnProgressChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var player = d as GifPlayerControl;\r\n            if (player == null) return;\r\n            \r\n            if (e.NewValue is double)\r\n            {\r\n                var progress = (double)e.NewValue;\r\n\r\n                player.CancelDownloadButton.Value = progress;\r\n\r\n                var isVisible = progress > 0.0 && progress < 1.0;\r\n                OnProgressChangedInternal(isVisible, player, progress);\r\n            }\r\n        }\r\n\r\n        private static void OnProgressChangedInternal(bool isVisible, GifPlayerControl player, double progress)\r\n        {\r\n            if (!isVisible)\r\n            {\r\n                var localFileName = GetLocalFileName(player.Media);\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (!store.FileExists(localFileName))\r\n                    {\r\n                        player.ChangeButtonState(GifButtonState.Download);\r\n                    }\r\n                    else\r\n                    {\r\n                        player.ChangeButtonState(GifButtonState.Play, \"OnProgressChangedInternal1\");\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                player.ChangeButtonState(GifButtonState.Cancel);\r\n            }\r\n\r\n            if (!player._initialized && (progress == 0.0))\r\n            {\r\n                if (player.Mode == GifPlayerMode.Normal && !ActivePlayers.Contains(player))\r\n                {\r\n                    if (player.ActualHeight > 0.0 && player.ActualWidth > 0.0)\r\n                    {\r\n                        // new messages\r\n                        var startNewGifPlayer = false;\r\n\r\n                        var position = player.TransformToVisual(Application.Current.RootVisual).Transform(new Point(0.0, 0.0));\r\n                        if (player.ActualHeight + position.Y >= 2.0/3.0*player.ActualHeight\r\n                            &&\r\n                            position.Y <=\r\n                            ((FrameworkElement) Application.Current.RootVisual).ActualHeight - 2.0/3.0*player.ActualHeight)\r\n                        {\r\n                            startNewGifPlayer = true;\r\n                            ActivePlayers.Add(player);\r\n                        }\r\n\r\n                        if (!startNewGifPlayer)\r\n                        {\r\n                            return;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (player.Mode == GifPlayerMode.InlineResult)\r\n                {\r\n                    if (!IsScrolling)\r\n                    {\r\n                        player.Start();\r\n                    }\r\n                    else\r\n                    {\r\n                        player.ChangeButtonState(GifButtonState.Play, \"OnProgressChangedInternal2\");\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    var stateService = IoC.Get<IStateService>();\r\n                    if (stateService != null)\r\n                    {\r\n                        var chatSettings = stateService.GetChatSettings();\r\n                        if (ManipulationState == ManipulationState.Idle\r\n                            && (chatSettings != null && chatSettings.AutoPlayGif && player.Media != null && player.Media.AutoPlayGif != false)\r\n                             || (player.Media != null && player.Media.AutoPlayGif == true))\r\n                        {\r\n                            player.Start();\r\n                        }\r\n                        else\r\n                        {\r\n                            var localFileName = GetLocalFileName(player.Media);\r\n                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                if (!store.FileExists(localFileName))\r\n                                {\r\n                                    player.ChangeButtonState(GifButtonState.Download);\r\n                                }\r\n                                else\r\n                                {\r\n                                    player.ChangeButtonState(GifButtonState.Play, \"OnProgressChangedInternal3\");\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        //public static async Task ExtractFirstFrame(IMediaGifBase mediaGifBase)\r\n        //{\r\n        //    if (mediaGifBase == null) return;\r\n\r\n        //    var fileName = GetLocalFileName(mediaGifBase);\r\n\r\n        //    var decoderParams = new int[3];\r\n        //    var handler = FFmpegGifDecoder.CreateDecoder(Path.Combine(ApplicationData.Current.LocalFolder.Path, fileName), decoderParams);\r\n        //    if (handler != 0)\r\n        //    {\r\n        //        var w = decoderParams[0];\r\n        //        var h = decoderParams[1];\r\n\r\n        //        if (w > 0 && h > 0)\r\n        //        {\r\n        //            var frame = FFmpegGifDecoder.GetVideoFrame(handler, decoderParams);\r\n        //            if (frame != null)\r\n        //            {\r\n        //                var pixels = new byte[frame.Length * sizeof(int)];\r\n        //                Buffer.BlockCopy(frame, 0, pixels, 0, pixels.Length);\r\n\r\n        //                var previewFileName = GetFrameFileName(mediaGifBase);\r\n        //                var file = await ApplicationData.Current.LocalFolder.CreateFileAsync(previewFileName, CreationCollisionOption.ReplaceExisting);\r\n        //                using (var stream = await file.OpenAsync(FileAccessMode.ReadWrite))\r\n        //                {\r\n        //                    var encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.JpegEncoderId, stream);\r\n        //                    encoder.SetPixelData(BitmapPixelFormat.Bgra8, BitmapAlphaMode.Ignore, (uint)w, (uint)h, 96.0, 96.0, pixels);\r\n        //                    await encoder.FlushAsync();\r\n        //                }\r\n\r\n        //            }\r\n        //        }\r\n\r\n        //        FFmpegGifDecoder.DestroyDecoder(handler);\r\n        //    }\r\n        //}\r\n\r\n        public static readonly DependencyProperty MediaProperty = DependencyProperty.Register(\r\n            \"Media\", typeof(IMediaGifBase), typeof(GifPlayerControl), new PropertyMetadata(default(IMediaGifBase), OnMediaChanged));\r\n\r\n        public IMediaGifBase Media\r\n        {\r\n            get { return (IMediaGifBase)GetValue(MediaProperty); }\r\n            set { SetValue(MediaProperty, value); }\r\n        }\r\n\r\n        public static ManipulationState ManipulationState { get; set; }\r\n\r\n        public static bool IsScrolling { get; set; }\r\n\r\n        private static void OnMediaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var player = d as GifPlayerControl;\r\n            if (player != null)\r\n            {\r\n                player.Stop();\r\n                player.Release();\r\n\r\n                var mediaBase = e.NewValue as IMediaGifBase;\r\n                if (mediaBase != null)\r\n                {\r\n                    // preview\r\n                    SetMediaPreview(player, mediaBase);\r\n\r\n                    // round video playing\r\n                    if (player.Mode == GifPlayerMode.RoundVideo)\r\n                    {\r\n                        if (MessagePlayerControl.Player.CurrentState == MediaElementState.Playing)\r\n                        {\r\n                            var gifPlayerControl = MessagePlayerControl.Player.Tag as GifPlayerControl;\r\n                            if (gifPlayerControl != null\r\n                                && gifPlayerControl.Media == mediaBase)\r\n                            {\r\n                                var videoBrush = new VideoBrush();\r\n                                videoBrush.SetSource(MessagePlayerControl.Player);\r\n                                player.MediaPlaceholder.Background = videoBrush;\r\n                                player.MuteIcon.Visibility = Visibility.Collapsed;\r\n\r\n                                MessagePlayerControl.Player.Tag = player;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    // button state/downloading\r\n                    var localFileName = GetLocalFileName(mediaBase);\r\n\r\n                    if (!string.IsNullOrEmpty(localFileName))\r\n                    {\r\n                        using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                        {\r\n                            if (store.FileExists(localFileName))\r\n                            {\r\n                                var stateService = IoC.Get<IStateService>();\r\n                                var chatSettings = stateService.GetChatSettings();\r\n                                if (ManipulationState == ManipulationState.Idle\r\n                                    && (chatSettings != null && chatSettings.AutoPlayGif && player.Media != null && player.Media.AutoPlayGif != false)\r\n                                     || (player.Media != null && player.Media.AutoPlayGif == true))\r\n                                {\r\n                                    player.ChangeButtonState(GifButtonState.None, \"OnMediaChanged\");\r\n                                }\r\n                                else\r\n                                {\r\n                                    player.ChangeButtonState(GifButtonState.Play, \"OnMediaChanged\");\r\n                                }\r\n\r\n                                if (player.Mode == GifPlayerMode.Normal && !ActivePlayers.Contains(player))\r\n                                {\r\n                                    if (player.ActualHeight > 0.0 && player.ActualWidth > 0.0)\r\n                                    {\r\n                                        // new messages\r\n                                        var startNewGifPlayer = false;\r\n\r\n                                        var position = player.TransformToVisual(Application.Current.RootVisual).Transform(new Point(0.0, 0.0));\r\n                                        if (player.ActualHeight + position.Y >= 2.0 / 3.0 * player.ActualHeight\r\n                                            && position.Y <= ((FrameworkElement)Application.Current.RootVisual).ActualHeight - 2.0 / 3.0 * player.ActualHeight)\r\n                                        {\r\n                                            startNewGifPlayer = true;\r\n                                            ActivePlayers.Add(player);\r\n                                        }\r\n\r\n                                        if (!startNewGifPlayer)\r\n                                        {\r\n                                            return;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                player.ChangeButtonState(GifButtonState.Download);\r\n\r\n                                TLObject with = null;\r\n                                var navigationService = IoC.Get<INavigationService>();\r\n                                var dialogDetailsView = navigationService.CurrentContent as DialogDetailsView;\r\n                                if (dialogDetailsView != null)\r\n                                {\r\n                                    var dialogDetailsViewModel = dialogDetailsView.DataContext as DialogDetailsViewModel;\r\n                                    if (dialogDetailsViewModel != null)\r\n                                    {\r\n                                        with = dialogDetailsViewModel.With;\r\n                                    }\r\n                                }\r\n\r\n                                var stateService = IoC.Get<IStateService>();\r\n                                var chatSettings = stateService.GetChatSettings();\r\n                                var downloadGif = true;\r\n                                if (chatSettings != null)\r\n                                {\r\n                                    if (with is TLUserBase && !chatSettings.AutoDownloadGifPrivateChats)\r\n                                    {\r\n                                        downloadGif = false;\r\n                                    }\r\n\r\n                                    if (with is TLChatBase && !chatSettings.AutoDownloadGifGroups)\r\n                                    {\r\n                                        downloadGif = false;\r\n                                    }\r\n                                }\r\n\r\n                                if (downloadGif && CheckDocumentParams(mediaBase))\r\n                                {\r\n                                    if (player.Mode == GifPlayerMode.InlineResult)\r\n                                    {\r\n                                        return; // suppress autodownload on media changed for inline bots\r\n                                    }\r\n\r\n                                    DownloadGifAsync(mediaBase);\r\n                                }\r\n                            }\r\n\r\n                            return;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private static string GetFrameFileName(IMediaGifBase mediaGifBase)\r\n        {\r\n            var frameFileName = string.Empty;\r\n\r\n            var mediaGif = mediaGifBase as IMediaGif;\r\n            if (mediaGif != null)\r\n            {\r\n                var document = mediaGif.Document as TLDocument;\r\n                if (document != null)\r\n                {\r\n                    frameFileName = string.Format(\"frame{0}.jpg\", document.Id);\r\n                }\r\n\r\n                var documentExternal = mediaGif.Document as TLDocumentExternal;\r\n                if (documentExternal != null)\r\n                {\r\n                    frameFileName = string.Format(\"frame{0}.jpg\", documentExternal.Id);\r\n                }\r\n            }\r\n\r\n            var decryptedMediaGif = mediaGifBase as IDecryptedMediaGif;\r\n            if (decryptedMediaGif != null)\r\n            {\r\n                var document = decryptedMediaGif.Document;\r\n                if (document != null)\r\n                {\r\n                    var fileLocatioin = document.File as TLEncryptedFile;\r\n                    if (fileLocatioin != null)\r\n                    {\r\n                        frameFileName = string.Format(\"frame{0}.jpg\", fileLocatioin.Id);\r\n                    }\r\n                }\r\n            }\r\n\r\n            return frameFileName;\r\n        }\r\n\r\n        private static string GetLocalFileName(IMediaGifBase mediaGifBase)\r\n        {\r\n            var localFileName = string.Empty;\r\n\r\n            var mediaGif = mediaGifBase as IMediaGif;\r\n            if (mediaGif != null)\r\n            {\r\n                var document = mediaGif.Document as TLDocument;\r\n                if (document != null)\r\n                {\r\n                    localFileName = document.GetFileName();\r\n                }\r\n\r\n                var documentExternal = mediaGif.Document as TLDocumentExternal;\r\n                if (documentExternal != null)\r\n                {\r\n                    localFileName = documentExternal.GetFileName();\r\n                }\r\n            }\r\n\r\n            var decryptedMediaGif = mediaGifBase as IDecryptedMediaGif;\r\n            if (decryptedMediaGif != null)\r\n            {\r\n                var document = decryptedMediaGif.Document;\r\n                if (document != null)\r\n                {\r\n                    localFileName = document.GetFileName();\r\n                }\r\n            }\r\n\r\n            return localFileName;\r\n        }\r\n\r\n        private static bool CheckDocumentParams(IMediaGifBase mediaGifBase)\r\n        {\r\n            var mediaGif = mediaGifBase as IMediaGif;\r\n            if (mediaGif != null)\r\n            {\r\n                var document = mediaGif.Document as TLDocument;\r\n                if (document != null)\r\n                {\r\n                    return document.Size.Value <= Telegram.Api.Constants.AutoDownloadGifMaxSize;\r\n                }\r\n            }\r\n\r\n            var decryptedMediaGif = mediaGifBase as IDecryptedMediaGif;\r\n            if (decryptedMediaGif != null)\r\n            {\r\n                var document = decryptedMediaGif.Document;\r\n                if (document != null)\r\n                {\r\n                    return document.Size.Value <= Telegram.Api.Constants.AutoDownloadGifMaxSize;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private static void DownloadGifAsync(IMediaGifBase owner)\r\n        {\r\n            if (owner.Forbidden) return;\r\n\r\n            var decryptedMediaGif = owner as IDecryptedMediaGif;\r\n            if (decryptedMediaGif != null)\r\n            {\r\n                var encryptedFile = decryptedMediaGif.Document.File as TLEncryptedFile;\r\n                if (encryptedFile != null)\r\n                {\r\n                    owner.DownloadingProgress = 0.01;\r\n\r\n                    Execute.BeginOnThreadPool(() =>\r\n                    {\r\n                        var fileManager = IoC.Get<IEncryptedFileManager>();\r\n                        fileManager.DownloadFile(\r\n                            encryptedFile,\r\n                            owner as TLObject,\r\n                            async item =>\r\n                            {\r\n                                var fileName = item.IsoFileName;\r\n\r\n                                var newFileName = String.Format(\"{0}_{1}_{2}.{3}\",\r\n                                    encryptedFile.Id,\r\n                                    encryptedFile.DCId,\r\n                                    encryptedFile.AccessHash,\r\n                                    encryptedFile.FileExt ?? decryptedMediaGif.Document.FileExt);\r\n                                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    byte[] buffer;\r\n                                    using (var file = store.OpenFile(fileName, FileMode.Open, FileAccess.Read))\r\n                                    {\r\n                                        buffer = new byte[file.Length];\r\n                                        file.Read(buffer, 0, buffer.Length);\r\n                                    }\r\n\r\n                                    var decryptedBuffer = Telegram.Api.Helpers.Utils.AesIge(buffer, decryptedMediaGif.Document.Key.Data, decryptedMediaGif.Document.IV.Data, false);\r\n\r\n                                    using (var file = store.OpenFile(newFileName, FileMode.OpenOrCreate, FileAccess.Write))\r\n                                    {\r\n                                        file.Write(decryptedBuffer, 0, decryptedBuffer.Length);\r\n                                    }\r\n\r\n                                    store.DeleteFile(fileName);\r\n                                }\r\n\r\n                                //await ExtractFirstFrame(owner);\r\n\r\n                                Execute.BeginOnUIThread(() =>\r\n                                {\r\n                                    owner.IsCanceled = false;\r\n                                    owner.LastProgress = 0.0;\r\n                                    owner.DownloadingProgress = 0.0;\r\n                                    owner.IsoFileName = newFileName;\r\n                                });\r\n                            });\r\n                    });\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            var mediaGif = owner as IMediaGif;\r\n            if (mediaGif != null)\r\n            {\r\n                var documentBase = mediaGif.Document;\r\n\r\n                var documentExternal = documentBase as TLDocumentExternal;\r\n                if (documentExternal != null)\r\n                {\r\n                    owner.DownloadingProgress = 0.01;\r\n\r\n                    var fileName = documentExternal.GetFileName();\r\n\r\n                    var webClient = new WebClient();\r\n                    webClient.OpenReadAsync(new Uri(documentExternal.ContentUrl.ToString(), UriKind.Absolute));\r\n                    webClient.OpenReadCompleted += (sender2, args2) => Execute.BeginOnThreadPool(async () =>\r\n                    {\r\n                        if (args2.Cancelled)\r\n                        {\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                owner.IsCanceled = false;\r\n                                owner.LastProgress = 0.0;\r\n                                owner.DownloadingProgress = 0.0;\r\n                            });\r\n\r\n                            Execute.ShowDebugMessage(args2.Cancelled.ToString());\r\n                            return;\r\n                        }\r\n                        if (args2.Error != null)\r\n                        {\r\n                            var webException = args2.Error as WebException;\r\n                            if (webException != null)\r\n                            {\r\n                                var response = webException.Response as HttpWebResponse;\r\n                                if (response != null)\r\n                                {\r\n                                    if (response.StatusCode == HttpStatusCode.Forbidden)\r\n                                    {\r\n                                        Execute.BeginOnUIThread(() =>\r\n                                        {\r\n                                            owner.Forbidden = true;\r\n                                            owner.IsCanceled = false;\r\n                                            owner.LastProgress = 0.0;\r\n                                            owner.DownloadingProgress = 0.0;\r\n                                        });\r\n                                    }\r\n                                    else if (response.StatusCode == HttpStatusCode.NotFound)\r\n                                    {\r\n                                        Execute.BeginOnUIThread(TimeSpan.FromSeconds(5.0), () =>\r\n                                        {\r\n                                            owner.IsCanceled = false;\r\n                                            owner.LastProgress = 0.0;\r\n                                            owner.DownloadingProgress = 0.0;\r\n                                        });\r\n                                    }\r\n\r\n                                    return;\r\n                                }\r\n                            }\r\n\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                owner.IsCanceled = false;\r\n                                owner.LastProgress = 0.0;\r\n                                owner.DownloadingProgress = 0.0;\r\n                            });\r\n\r\n                            Execute.ShowDebugMessage(args2.Error.ToString());\r\n                            return;\r\n                        }\r\n\r\n                        try\r\n                        {\r\n                            using (var stream = args2.Result)\r\n                            {\r\n                                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                                {\r\n                                    if (store.FileExists(fileName))\r\n                                    {\r\n                                        store.DeleteFile(fileName);\r\n                                    }\r\n\r\n                                    using (var file = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read))\r\n                                    {\r\n                                        const int BUFFER_SIZE = 128 * 1024;\r\n                                        var buf = new byte[BUFFER_SIZE];\r\n\r\n                                        var bytesRead = 0;\r\n                                        while ((bytesRead = stream.Read(buf, 0, BUFFER_SIZE)) > 0)\r\n                                        {\r\n                                            file.Write(buf, 0, bytesRead);\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            //await ExtractFirstFrame(owner);\r\n\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                owner.IsCanceled = false;\r\n                                owner.LastProgress = 0.0;\r\n                                owner.DownloadingProgress = 0.0;\r\n                            });\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                owner.IsCanceled = false;\r\n                                owner.LastProgress = 0.0;\r\n                                owner.DownloadingProgress = 0.0;\r\n                            });\r\n\r\n                            Execute.ShowDebugMessage(ex.ToString());\r\n                        }\r\n                    });\r\n\r\n\r\n                    return;\r\n                }\r\n\r\n                var document = documentBase as TLDocument;\r\n                if (document != null)\r\n                {\r\n                    owner.DownloadingProgress = 0.01;\r\n\r\n                    var fileManager = IoC.Get<IDocumentFileManager>();\r\n                    fileManager.DownloadFileAsync(\r\n                        document.FileName,\r\n                        document.DCId,\r\n                        document.ToInputFileLocation(),\r\n                        owner as TLObject,\r\n                        document.Size,\r\n                        null,\r\n                        async item =>\r\n                        {\r\n                            //await ExtractFirstFrame(owner);\r\n                            \r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                owner.IsCanceled = false;\r\n                                owner.LastProgress = 0.0;\r\n                                owner.DownloadingProgress = 0.0;\r\n                                owner.IsoFileName = item.IsoFileName;\r\n                            });\r\n                        });\r\n\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n\r\n        private static void SetMediaPreview(GifPlayerControl player, IMediaGifBase mediaGifBase)\r\n        {\r\n            var frameFileName = GetFrameFileName(mediaGifBase);\r\n            player._firstFrameFileName = frameFileName;\r\n            player._extractFirstFrame = true;\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (store.FileExists(frameFileName))\r\n                {\r\n                    player._extractFirstFrame = false;\r\n                    try\r\n                    {\r\n                        using (var stream = store.OpenFile(frameFileName, FileMode.Open, FileAccess.Read))\r\n                        {\r\n                            if (stream.Length > 0)\r\n                            {\r\n                                var bitmapImage = new BitmapImage();\r\n                                //bitmapImage.CreateOptions = BitmapCreateOptions.BackgroundCreation;\r\n                                bitmapImage.SetSource(stream);\r\n\r\n                                player.Thumb.Source = bitmapImage;\r\n                                return;\r\n                            }\r\n                        }\r\n                    }\r\n                    catch (Exception)\r\n                    {\r\n\r\n                    }\r\n                }\r\n            }\r\n\r\n            var decryptedMediaGif = mediaGifBase as IDecryptedMediaGif;\r\n            if (decryptedMediaGif != null)\r\n            {\r\n                var document = decryptedMediaGif.Document;\r\n                if (document != null)\r\n                {\r\n                    var thumbCachedSize = document.Thumb;\r\n                    if (thumbCachedSize != null \r\n                        && thumbCachedSize.Data != null \r\n                        && thumbCachedSize.Data.Length > 0\r\n                        && document.ThumbW.Value > 0\r\n                        && document.ThumbH.Value > 0)\r\n                    {\r\n                        BitmapImage preview;\r\n                        try\r\n                        {\r\n                            var buffer = thumbCachedSize.Data;\r\n                            var bitmap = PictureDecoder.DecodeJpeg(new MemoryStream(buffer));\r\n\r\n                            new PhotoToThumbConverter().BlurBitmap(bitmap, false);\r\n\r\n                            var blurredStream = new MemoryStream();\r\n                            bitmap.SaveJpeg(blurredStream, document.ThumbW.Value, document.ThumbH.Value, 0, 100);\r\n\r\n                            player.Thumb.Source = ImageUtils.CreateImage(blurredStream);\r\n                        }\r\n                        catch (Exception ex)\r\n                        {\r\n\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        player.Thumb.Source = null;\r\n                    }\r\n                }\r\n            }\r\n\r\n            var mediaGif = mediaGifBase as IMediaGif;\r\n            if (mediaGif != null)\r\n            {\r\n                var documentBase = mediaGif.Document;\r\n\r\n                var documentExternal = documentBase as TLDocumentExternal;\r\n                if (documentExternal != null)\r\n                {\r\n                    if (!TLString.IsNullOrEmpty(documentExternal.ThumbUrl))\r\n                    {\r\n                        player.Thumb.Source = new BitmapImage(new Uri(documentExternal.ThumbUrl.ToString(), UriKind.Absolute));\r\n                    }\r\n                    else\r\n                    {\r\n                        player.Thumb.Source = null;\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                var document = documentBase as TLDocument;\r\n                if (document != null)\r\n                {\r\n                    var options = BitmapCreateOptions.DelayCreation | BitmapCreateOptions.BackgroundCreation;\r\n                    var thumbCachedSize = document.Thumb as TLPhotoCachedSize;\r\n                    if (thumbCachedSize != null)\r\n                    {\r\n                        BitmapImage preview;\r\n                        if (PhotoToThumbConverter.TryGetPhotoPreview(document.Id, out preview, options))\r\n                        {\r\n                            player.Thumb.Source = preview;\r\n                        }\r\n                        else\r\n                        {\r\n                            if (thumbCachedSize.Bytes != null\r\n                                && thumbCachedSize.Bytes.Data != null\r\n                                && thumbCachedSize.Bytes.Data.Length > 0\r\n                                && thumbCachedSize.W.Value > 0\r\n                                && thumbCachedSize.H.Value > 0)\r\n                            {\r\n                                try\r\n                                {\r\n                                    var buffer = thumbCachedSize.Bytes.Data;\r\n                                    var bitmap = PictureDecoder.DecodeJpeg(new MemoryStream(buffer));\r\n\r\n                                    new PhotoToThumbConverter().BlurBitmap(bitmap, false);\r\n\r\n                                    var blurredStream = new MemoryStream();\r\n                                    bitmap.SaveJpeg(blurredStream, thumbCachedSize.W.Value, thumbCachedSize.H.Value, 0, 100);\r\n\r\n                                    var previewFileName = string.Format(\"preview{0}.jpg\", document.Id);\r\n\r\n                                    Execute.BeginOnThreadPool(() => PhotoToThumbConverter.SaveFile(previewFileName, blurredStream));\r\n\r\n                                    player.Thumb.Source = ImageUtils.CreateImage(blurredStream);\r\n                                }\r\n                                catch (Exception ex)\r\n                                {\r\n\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                player.Thumb.Source = null;\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        var photoSize = document.Thumb as TLPhotoSize;\r\n                        if (photoSize != null)\r\n                        {\r\n                            BitmapImage preview;\r\n                            if (PhotoToThumbConverter.TryGetPhotoPreview(document.Id, out preview, options))\r\n                            {\r\n                                player.Thumb.Source = preview;\r\n                            }\r\n                            else\r\n                            {\r\n                                var fileLocation = photoSize.Location as TLFileLocation;\r\n                                if (fileLocation != null)\r\n                                {\r\n                                    var previewFileName = string.Format(\"preview{0}.jpg\", document.Id);\r\n                                    var previewSourceFileName = String.Format(\"{0}_{1}_{2}.jpg\",\r\n                                        fileLocation.VolumeId,\r\n                                        fileLocation.LocalId,\r\n                                        fileLocation.Secret);\r\n\r\n                                    if (!CreatePreview(player, mediaGif as TLObject, previewSourceFileName, previewFileName, photoSize))\r\n                                    {\r\n                                        var fileManager = IoC.Get<IFileManager>();\r\n                                        fileManager.DownloadFile(fileLocation, mediaGif as TLObject, photoSize.Size,\r\n                                            item => Execute.BeginOnUIThread(() =>\r\n                                            {\r\n                                                CreatePreview(player, item.Owner, previewSourceFileName, previewFileName, photoSize);\r\n                                            }));\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n            }\r\n\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        private static bool CreatePreview(GifPlayerControl player, TLObject previewOwner, string previewSourceFileName, string previewFileName, TLPhotoSize photoSize)\r\n        {\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(previewSourceFileName)) return false;\r\n\r\n                try\r\n                {\r\n                    using (var stream = store.OpenFile(previewSourceFileName, FileMode.Open, FileAccess.Read))\r\n                    {\r\n                        if (stream.Length == 0) return false;\r\n\r\n                        stream.Seek(0, SeekOrigin.Begin);\r\n\r\n                        var bitmap = PictureDecoder.DecodeJpeg(stream);\r\n\r\n                        new PhotoToThumbConverter().BlurBitmap(bitmap, false);\r\n\r\n                        var blurredStream = new MemoryStream();\r\n                        bitmap.SaveJpeg(blurredStream, photoSize.W.Value, photoSize.H.Value, 0, 100);\r\n\r\n                        if (player.Media == previewOwner)\r\n                        {\r\n                            player.Thumb.Source = ImageUtils.CreateImage(blurredStream);\r\n                        }\r\n\r\n                        Execute.BeginOnThreadPool(() => PhotoToThumbConverter.SaveFile(previewFileName, blurredStream));\r\n                    }\r\n                }\r\n                catch (Exception)\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private static void InitializePlayer(IMediaGifBase mediaBase, GifPlayerControl player)\r\n        {\r\n            var mediaDocument = mediaBase;\r\n            if (mediaDocument != null)\r\n            {\r\n                var fileName = GetLocalFileName(mediaDocument);\r\n                using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                {\r\n                    if (!string.IsNullOrEmpty(fileName))\r\n                    {\r\n                        if (store.FileExists(fileName))\r\n                        {\r\n                            player.ChangeButtonState(GifButtonState.Play, \"InitializePlayer\");\r\n                            player._decoderParams = new int[3];\r\n                            try\r\n                            {\r\n                                lock (player._ffmpegLock)\r\n                                {\r\n                                    player._handler = FFmpegGifDecoder.CreateDecoder(Path.Combine(ApplicationData.Current.LocalFolder.Path, fileName), player._decoderParams);\r\n                                    if (player._handler != 0)\r\n                                    {\r\n                                        player._w = player._decoderParams[0];\r\n                                        player._h = player._decoderParams[1];\r\n\r\n                                        if (player._w > 0 && player._h > 0)\r\n                                        {\r\n                                            player._initialized = true;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                            catch (FileNotFoundException ex)\r\n                            {\r\n                                player.Width = 323.0;\r\n                                player.Height = 150.0;\r\n                                player.PlayButton.Opacity = 0.5;\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                player.Width = 323.0;\r\n                                player.Height = 150.0;\r\n                                player.PlayButton.Opacity = 0.5;\r\n#if DEBUG\r\n                                MessageBox.Show(\"OnFileNameChanged \" + ex);\r\n#endif\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            if (player.Progress > 0.0 && player.Progress < 1.0)\r\n                            {\r\n                                player.ChangeButtonState(GifButtonState.Cancel);\r\n                            }\r\n                            else\r\n                            {\r\n                                if (player.Mode == GifPlayerMode.InlineResult)\r\n                                {\r\n                                    if (mediaBase.Forbidden)\r\n                                    {\r\n                                        player.ChangeButtonState(GifButtonState.None);\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        DownloadGifAsync(mediaBase);\r\n\r\n                                        player.ChangeButtonState(GifButtonState.Cancel);\r\n                                    }\r\n\r\n                                    return;\r\n                                }\r\n\r\n                                player.ChangeButtonState(GifButtonState.Download);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            \r\n        }\r\n\r\n        private int _handler;\r\n\r\n        private readonly Timer _frameTimer;\r\n\r\n        private int[] _decoderParams;\r\n\r\n        private int _w;\r\n\r\n        private int _h;\r\n\r\n        public double _ptsDelta;\r\n\r\n        public double _timeDelta;\r\n\r\n        public double _pts;\r\n\r\n        public TimeSpan _elapsed;\r\n\r\n        private bool _isPlaying;\r\n\r\n        private bool _initialized;\r\n\r\n        private string _firstFrameFileName;\r\n\r\n        private bool _extractFirstFrame;\r\n\r\n        private byte[] _frame;\r\n\r\n        private bool _destroyDecoder;\r\n\r\n        private bool _pauseDecoder;\r\n\r\n        private DateTime _startTime;\r\n\r\n        private object _ffmpegLock = new object();\r\n\r\n        public GifPlayerControl()\r\n        {\r\n            InitializeComponent();\r\n            \r\n            _frameTimer = new Timer(FrameTimer_OnTick, this, Timeout.Infinite, Timeout.Infinite);\r\n        }\r\n\r\n        public bool Start()\r\n        {\r\n            if (Mode == GifPlayerMode.InlineResult)\r\n            {\r\n                if (!_inlineBotActivePlayers.Contains(this))\r\n                {\r\n                    _inlineBotActivePlayers.Add(this);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (!_activePlayers.Contains(this))\r\n                {\r\n                    _activePlayers.Add(this);\r\n                }\r\n            }\r\n\r\n            if (_activePlayers.Count > 0 || _inlineBotActivePlayers.Count > 0)\r\n            {\r\n                StartUpdateFrames();\r\n            }\r\n\r\n            if (!_initialized)\r\n            {\r\n                InitializePlayer(Media, this);\r\n                if (!_initialized)\r\n                {\r\n                    if (Progress > 0.0 && Progress < 1.0)\r\n                    {\r\n                        return true;\r\n                    }\r\n\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            var pts = _ptsDelta == 0 ? 50 : _ptsDelta;\r\n            _startTime = DateTime.Now;\r\n            _frameTimer.Change(TimeSpan.FromMilliseconds(pts), Timeout.InfiniteTimeSpan);\r\n            _isPlaying = true;\r\n\r\n            _frame = null;\r\n            ChangeButtonState(GifButtonState.None);\r\n\r\n            return true;\r\n        }\r\n\r\n        private void Pause()\r\n        {\r\n            if (!_initialized) return;\r\n\r\n            lock (_ffmpegLock)\r\n            {\r\n                _pauseDecoder = true;\r\n            }\r\n        }\r\n\r\n        private void Resume()\r\n        {\r\n            if (!_initialized)\r\n            {\r\n                Start();\r\n                return;\r\n            }\r\n\r\n            lock (_ffmpegLock)\r\n            {\r\n                _pauseDecoder = false;\r\n            }\r\n            _frameTimer.Change(TimeSpan.FromMilliseconds(1.0), Timeout.InfiniteTimeSpan);\r\n            ChangeButtonState(GifButtonState.None);\r\n        }\r\n\r\n        public bool Stop(bool autoPlayGif = false)\r\n        {\r\n            if (Mode == GifPlayerMode.InlineResult)\r\n            {\r\n                _inlineBotActivePlayers.Remove(this);\r\n            }\r\n            else\r\n            {\r\n                _activePlayers.Remove(this);\r\n            }\r\n\r\n            if (_activePlayers.Count == 0 && _inlineBotActivePlayers.Count == 0)\r\n            {\r\n                StopUpdateFrames();\r\n            }\r\n\r\n            if (!_initialized) return false;\r\n\r\n            lock (_ffmpegLock)\r\n            {\r\n                _destroyDecoder = true;\r\n                _frameTimer.Change(TimeSpan.FromMilliseconds(1.0), Timeout.InfiniteTimeSpan);\r\n            }\r\n            ChangeButtonState(GifButtonState.Play, \"Stop autoplay=\" + autoPlayGif, autoPlayGif);\r\n\r\n            Frame.Source = null;\r\n            return true;\r\n        }\r\n\r\n        public void Release()\r\n        {\r\n            Frame.Source = null;\r\n            PlayButton.Opacity = 1.0;\r\n            Debug.Text = null;\r\n            _isPlaying = false;\r\n            _initialized = false;\r\n            _w = 0;\r\n            _h = 0;\r\n            _pts = 0;\r\n        }\r\n\r\n        private void FrameTimer_OnTick(object state)\r\n        {\r\n            lock (_ffmpegLock)\r\n            {\r\n                if (_destroyDecoder)\r\n                {\r\n                    _destroyDecoder = false;\r\n                    _pauseDecoder = false;\r\n                    _isPlaying = false;\r\n\r\n                    try\r\n                    {\r\n                        if (_handler != 0)\r\n                        {\r\n                            FFmpegGifDecoder.DestroyDecoder(_handler);\r\n                            _handler = 0;\r\n                        }\r\n                        _initialized = false;\r\n                    }\r\n                    catch (Exception ex)\r\n                    {\r\n                        Execute.ShowDebugMessage(\"FrameTime_OnTick.DestroyDecoder exception\\n\" + ex);\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                if (_pauseDecoder)\r\n                {\r\n                    _pauseDecoder = false;\r\n                    _frameTimer.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var stopwatch = Stopwatch.StartNew();\r\n\r\n            var frameParams = new int[3];\r\n            lock (_ffmpegLock)\r\n            {\r\n                _frame = FFmpegGifDecoder.GetVideoFrame(_handler, frameParams);\r\n            }\r\n\r\n            if (_frame == null)\r\n            {\r\n                var pts = _pts;\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"GifPlayer.GetVideoFrame=null pts=\" + pts + \" frame_params=\" + string.Join(\",\", frameParams));\r\n\r\n                    Stop();\r\n                });\r\n                return;\r\n            }\r\n\r\n            _ptsDelta = 0.0;\r\n            if (frameParams[2] <= 0)\r\n            {\r\n                _startTime = DateTime.Now;\r\n                _ptsDelta = 1.0;\r\n                _pts = 0.0;\r\n\r\n                ExtractFirstFrame(_frame);\r\n            }\r\n            else\r\n            {\r\n                _pts = frameParams[2];\r\n                _timeDelta = (DateTime.Now - _startTime).TotalMilliseconds;\r\n                var delta = (frameParams[2] - _timeDelta);\r\n                _ptsDelta = delta < 0.0 ? 1.0 : delta;\r\n            }\r\n\r\n            _elapsed = stopwatch.Elapsed;\r\n\r\n            lock (_ffmpegLock)\r\n            {\r\n                _frameTimer.Change(TimeSpan.FromMilliseconds(_ptsDelta), Timeout.InfiniteTimeSpan);\r\n            }\r\n        }\r\n\r\n        private void ExtractFirstFrame(byte[] frame)\r\n        {\r\n            if (!_extractFirstFrame) return;\r\n\r\n            _extractFirstFrame = false;\r\n\r\n            Execute.BeginOnThreadPool(() => SaveFirstFrame(frame));\r\n        }\r\n\r\n        private async void SaveFirstFrame(byte[] frame)\r\n        {\r\n            var fileName = _firstFrameFileName;\r\n\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(fileName) && frame.Length > 0)\r\n                {\r\n                    var pixels = new int[frame.Length / sizeof(int)];\r\n                    for (var j = 0; j < pixels.Length; j++)\r\n                    {\r\n                        pixels[j] =\r\n                            (frame[j * 4 + 3] << 24) +     //b\r\n                            (frame[j * 4 + 2] << 0) +      //g\r\n                            (frame[j * 4 + 1] << 8) +      //r\r\n                            (frame[j * 4] << 16);          //a \r\n\r\n                        //bitmap.Pixels[j] = pixels[j];\r\n                    }\r\n\r\n                    Buffer.BlockCopy(pixels, 0, frame, 0, frame.Length);\r\n\r\n                    var file = await ApplicationData.Current.LocalFolder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting);\r\n                    using (var stream = await file.OpenAsync(FileAccessMode.ReadWrite))\r\n                    {\r\n                        var encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.JpegEncoderId, stream);\r\n                        encoder.SetPixelData(BitmapPixelFormat.Bgra8, BitmapAlphaMode.Ignore, (uint)_w, (uint)_h, 96.0, 96.0, frame);\r\n                        await encoder.FlushAsync();\r\n                    }\r\n\r\n                    Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        SetMediaPreview(this, Media);\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public void ToggleVideoPlay()\r\n        {\r\n            if (MediaPlaceholder.Background != null)\r\n            {\r\n                if (MessagePlayerControl.Player.CurrentState == MediaElementState.Playing)\r\n                {\r\n                    MessagePlayerControl.Player.Pause();\r\n                    RaiseMediaStateChanged(Media, GifPlayerControlState.Paused);\r\n                }\r\n                else if (MessagePlayerControl.Player.CurrentState == MediaElementState.Paused)\r\n                {\r\n                    MessagePlayerControl.Player.Play();\r\n                    RaiseMediaStateChanged(Media, GifPlayerControlState.Resumed);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void LayoutRoot_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (Mode == GifPlayerMode.InlineResult) return;\r\n\r\n            if (Mode == GifPlayerMode.RoundVideo)\r\n            {\r\n                // open external player for w10m\r\n                if (System.Environment.OSVersion.Version.Major >= 10)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                // open in-app player for wp8.1\r\n                var mediaBase = Media;\r\n                if (mediaBase != null)\r\n                {\r\n                    var player = MessagePlayerControl.Player.Tag as GifPlayerControl;\r\n                    if (player != null\r\n                        && player == this\r\n                        && MediaPlaceholder.Background != null)\r\n                    {\r\n                        ToggleVideoPlay();\r\n\r\n                        e.Handled = true;\r\n                    }\r\n                    else\r\n                    {\r\n                        var localFileName = GetLocalFileName(mediaBase);\r\n\r\n                        if (!string.IsNullOrEmpty(localFileName))\r\n                        {\r\n                            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                            {\r\n                                if (store.FileExists(localFileName))\r\n                                {\r\n                                    PauseActivePlayers();\r\n\r\n                                    if (player != null)\r\n                                    {\r\n                                        player.MuteIcon.Visibility = Visibility.Visible;\r\n                                        player.MediaPlaceholder.Background = null;\r\n                                    }\r\n\r\n                                    MessagePlayerControl.Player.Tag = this;\r\n                                    MessagePlayerControl.Player.Position = TimeSpan.FromSeconds(0.0);\r\n                                    var videoBrush = new VideoBrush();\r\n                                    videoBrush.SetSource(MessagePlayerControl.Player);\r\n                                    MediaPlaceholder.Background = videoBrush;\r\n                                    MuteIcon.Visibility = Visibility.Collapsed;\r\n\r\n                                    var file = store.OpenFile(localFileName, FileMode.Open, FileAccess.Read);\r\n\r\n                                    RaiseMediaStateChanged(Media, GifPlayerControlState.Opening);\r\n\r\n                                    Execute.BeginOnUIThread(() =>\r\n                                    {\r\n                                        MessagePlayerControl.Player.SetSource(file);\r\n                                        file.Dispose();\r\n                                        //MessagePlayerControl.Player.MediaOpened += PlayerOnMediaOpened;\r\n                                        //MessagePlayerControl.Player.MediaFailed += PlayerOnMediaFailed;\r\n                                        //MessagePlayerControl.Player.MediaEnded += PlayerOnMediaEnded;\r\n                                    });\r\n\r\n                                    e.Handled = true;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            if (Mode == GifPlayerMode.Normal)\r\n            {\r\n                if (_isPlaying)\r\n                {\r\n                    if (Media != null) Media.AutoPlayGif = false;\r\n                    e.Handled = Stop();\r\n                }\r\n                else\r\n                {\r\n                    if (Media != null) Media.AutoPlayGif = true;\r\n                    e.Handled = Start();\r\n                }\r\n\r\n                return;\r\n            }\r\n        }\r\n\r\n        private void CancelDownloadButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (Mode == GifPlayerMode.InlineResult) return;\r\n\r\n            e.Handled = true;\r\n            var localFileName = GetLocalFileName(Media);\r\n            using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n            {\r\n                if (!store.FileExists(localFileName))\r\n                {\r\n                    ChangeButtonState(GifButtonState.Download);\r\n                }\r\n                else\r\n                {\r\n                    ChangeButtonState(GifButtonState.Play);\r\n                }\r\n            }\r\n            RaiseCancelDownload();\r\n        }\r\n\r\n        private enum GifButtonState\r\n        {\r\n            Play,\r\n            Download,\r\n            Cancel,\r\n            None\r\n        }\r\n\r\n        private GifButtonState? _lastState;\r\n\r\n        private void ChangeButtonState(GifButtonState state, string place = null, bool autoPlayGif = false)\r\n        {\r\n            if (_lastState == state) return;\r\n\r\n//#if DEBUG\r\n            //Debug2.Text = state + \" place=\" + place;\r\n//#endif\r\n            _lastState = state;\r\n            if (Mode == GifPlayerMode.RoundVideo)\r\n            {\r\n                MuteIcon.Visibility = MediaPlaceholder.Background == null ? Visibility.Visible : Visibility.Collapsed;\r\n                PlayButton.Visibility = Visibility.Collapsed;\r\n                Play.Visibility = Visibility.Collapsed;\r\n                PlayCircle.Visibility = Visibility.Collapsed;\r\n                DownloadButton.Visibility = state == GifButtonState.Download ? Visibility.Visible : Visibility.Collapsed;\r\n                CancelDownloadButton.Visibility = state == GifButtonState.Cancel ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n            else\r\n            {\r\n                MuteIcon.Visibility = Visibility.Collapsed;\r\n                PlayButton.Visibility = state == GifButtonState.Play ? Visibility.Visible : Visibility.Collapsed;\r\n                Play.Visibility = autoPlayGif ? Visibility.Collapsed : Visibility.Visible;\r\n                PlayCircle.Visibility = autoPlayGif ? Visibility.Collapsed : Visibility.Visible;\r\n                DownloadButton.Visibility = state == GifButtonState.Download ? Visibility.Visible : Visibility.Collapsed;\r\n                CancelDownloadButton.Visibility = state == GifButtonState.Cancel ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public event EventHandler CancelDownload;\r\n\r\n        protected virtual void RaiseCancelDownload()\r\n        {\r\n            var handler = CancelDownload;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private bool _suppressManipulationStarted = true; // in order to suppress manipulationstarted event on longlistselector\r\n\r\n        public bool SuppressManipulationStarted\r\n        {\r\n            get { return _suppressManipulationStarted; }\r\n            set { _suppressManipulationStarted = value; }\r\n        }\r\n\r\n        public Geometry FrameClip\r\n        {\r\n            get { return FrameGrid.Clip; }\r\n            set\r\n            {\r\n                FrameGrid.Clip = value;\r\n            }\r\n        }\r\n\r\n        private void LayoutRoot_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            e.Handled = SuppressManipulationStarted;\r\n        }\r\n\r\n        public void OnMediaEnded()\r\n        {\r\n            MediaPlaceholder.Background = null;\r\n            MuteIcon.Visibility = Visibility.Visible;\r\n\r\n            RaiseMediaStateChanged(Media, GifPlayerControlState.Ended);\r\n        }\r\n\r\n        public void OnMediaFailed(ExceptionRoutedEventArgs e)\r\n        {\r\n            MuteIcon.Visibility = Visibility.Visible;\r\n\r\n            RaiseMediaStateChanged(Media, GifPlayerControlState.Failed);\r\n        }\r\n\r\n        public void OnMediaOpened()\r\n        {\r\n            MessagePlayerControl.Player.Play();\r\n\r\n            RaiseMediaStateChanged(Media, GifPlayerControlState.Opened);\r\n        }\r\n\r\n        public static event EventHandler<MediaStateChangedEventArgs> MediaStateChanged;\r\n\r\n        public static void RaiseMediaStateChanged(IMediaGifBase media, GifPlayerControlState state)\r\n        {\r\n            var handler = MediaStateChanged;\r\n            if (handler != null) handler(null, new MediaStateChangedEventArgs(media, state));\r\n        }\r\n\r\n        public static void StopVideo()\r\n        {\r\n            var player = MessagePlayerControl.Player.Tag as GifPlayerControl;\r\n            if (player != null)\r\n            {\r\n                if (MessagePlayerControl.Player.CurrentState == MediaElementState.Playing)\r\n                {\r\n                    MessagePlayerControl.Player.Stop();\r\n                }\r\n\r\n                player.MediaPlaceholder.Background = null;\r\n                player.MuteIcon.Visibility = Visibility.Visible;\r\n\r\n                RaiseMediaStateChanged(player.Media, GifPlayerControlState.Ended);\r\n            }\r\n        }\r\n    }\r\n\r\n    public enum GifPlayerMode\r\n    {\r\n        Normal,\r\n        InlineResult,\r\n        RoundVideo\r\n    }\r\n\r\n    public enum GifPlayerControlState\r\n    {\r\n        Opening,\r\n        Opened,\r\n        Failed,\r\n        Ended,\r\n        Paused,\r\n        Resumed\r\n    }\r\n\r\n    public class MediaStateChangedEventArgs : System.EventArgs\r\n    {\r\n        public GifPlayerControlState State { get; protected set; }\r\n\r\n        public IMediaGifBase Media { get; protected set; }\r\n\r\n        public MediaStateChangedEventArgs(IMediaGifBase media, GifPlayerControlState state)\r\n        {\r\n            Media = media;\r\n            State = state;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/LoggedInView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.LoggedInView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"SessionItemTemplate\">\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"0,12,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\">\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Terminate($DataContext)]\" Header=\"{Binding Resources.LogOut, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                    <Grid.Triggers>\r\n                        <EventTrigger RoutedEvent=\"Grid.Loaded\">\r\n                            <BeginStoryboard>\r\n                                <Storyboard>\r\n                                    <DoubleAnimation Duration=\"00:00:0.15\" From=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"MainItemGrid\"/>\r\n                                </Storyboard>\r\n                            </BeginStoryboard>\r\n                        </EventTrigger>\r\n                    </Grid.Triggers>\r\n\r\n\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid Grid.Row=\"0\" Grid.Column=\"0\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <StackPanel Orientation=\"Horizontal\">\r\n                                <views:ConversationTileControl Size=\"26\" LabelFontSize=\"11\" Margin=\"12,-12,12,-12\" VerticalAlignment=\"Center\"\r\n                                    Fill=\"{Binding Bot.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                                    Text=\"{Binding Bot, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                                    Source=\"{Binding Bot.Photo, Converter={StaticResource DefaultPhotoConverter}}\">\r\n                                    <views:ConversationTileControl.RenderTransform>\r\n                                        <TranslateTransform Y=\"3\"/>\r\n                                    </views:ConversationTileControl.RenderTransform>\r\n                                </views:ConversationTileControl>\r\n                                <TextBlock Margin=\"0,0,0,0\" Text=\"{Binding Domain}\" FontSize=\"27\"/>\r\n                            </StackPanel>\r\n\r\n                            <TextBlock Margin=\"6,0,0,2\" Grid.Column=\"1\" VerticalAlignment=\"Bottom\" FontSize=\"18\" Text=\"{Binding DateActive, Converter={StaticResource MessageDateTimeConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </Grid>\r\n                        <StackPanel Grid.Row=\"1\" Orientation=\"Horizontal\">\r\n                            <TextBlock Margin=\"12,0,0,0\" Text=\"{Binding ParamsString}\" FontSize=\"20\"/>\r\n                        </StackPanel>\r\n                        <TextBlock Grid.Row=\"2\" Margin=\"12,0,0,0\" Text=\"{Binding Location}\" FontSize=\"20\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.LoggedInWithTelegram, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <longListSelector:LongListSelector\r\n            Grid.Row=\"1\"\r\n            x:Name=\"Items\"\r\n            Margin=\"6,0,0,0\"\r\n            ItemsSource=\"{Binding Items}\" \r\n            IsFlatList=\"True\" \r\n            ItemTemplate=\"{StaticResource SessionItemTemplate}\">\r\n            <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                <DataTemplate>\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Button Grid.Row=\"0\" micro:Message.Attach=\"TerminateWebAuthorizations\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,12,-12,12\" Style=\"{StaticResource ProfileButtonStyle}\" Visibility=\"{Binding DataContext.Items.Count, ElementName=Items, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter='0', FallbackValue='Collapsed'}\">\r\n                            <StackPanel>\r\n                                <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.LogOutAllApplications, Source={StaticResource Strings}}\" Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                            </StackPanel>\r\n                        </Button>\r\n\r\n                        <StackPanel Grid.Row=\"1\" Visibility=\"{Binding DataContext.Items.Count, ElementName=Items, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter='0', FallbackValue='Collapsed'}\">\r\n                            <TextBlock Margin=\"12,0,12,0\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.ConnectedWebsitesHint, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                            <TextBlock Margin=\"12,18,12,0\" FontSize=\"35\" Text=\"{Binding Resources.ConnectedWebsites, Source={StaticResource Strings}}\"/>\r\n                        </StackPanel>\r\n                        <TextBlock Grid.RowSpan=\"2\" Margin=\"12,6,12,0\" Text=\"{Binding DataContext.Status, ElementName=Items}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </longListSelector:LongListSelector.ListHeaderTemplate>\r\n            <longListSelector:LongListSelector.ListFooterTemplate>\r\n                <DataTemplate>\r\n                    <Grid>\r\n                        <Grid Margin=\"0,12\" Visibility=\"{Binding DataContext.Items.Count, ElementName=Items, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter='0', FallbackValue='Collapsed'}\">\r\n                            <TextBlock Margin=\"12,0,12,0\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Resources.TapToDisconnectTelegramAccount, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </longListSelector:LongListSelector.ListFooterTemplate>\r\n        </longListSelector:LongListSelector>\r\n\r\n        <Grid Grid.Row=\"1\"\r\n            VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\" \r\n            Visibility=\"{Binding IsEmptyList, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n            <StackPanel Margin=\"0,100,0,0\">\r\n                <Image Width=\"160\" Height=\"160\" Source=\"{Binding EmptyListImageSource}\" Stretch=\"UniformToFill\"/>\r\n                <TextBlock Text=\"{Binding Resources.NoActiveLogins, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Width=\"300\" Margin=\"12,40,12,0\" TextAlignment=\"Center\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/LoggedInView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing Microsoft.Phone.Controls;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class LoggedInView\r\n    {\r\n        public LoggedInView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ContextMenuService.GetContextMenu((DependencyObject)sender).IsOpen = true;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/PassportSettingsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.PassportSettingsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\"\r\n    x:Name=\"Main\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <additional:SecureRequiredTypeToCaptionConverter x:Key=\"SecureValueTypeToStringConverter\"/>\r\n            <additional:SecureValueToHintConverter x:Key=\"SecureValueToHintConverter\"/>\r\n            <Style x:Key=\"ButtonStyle1\" TargetType=\"Button\">\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                <Setter Property=\"FontSize\" Value=\"23\"/>\r\n                <Setter Property=\"FontWeight\" Value=\"Normal\"/>\r\n                <Setter Property=\"Margin\" Value=\"12,-12\"/>\r\n                <Setter Property=\"VerticalAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"Padding\" Value=\"15,3,15,5\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"Button\">\r\n                            <Grid Background=\"Transparent\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Pressed\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0.7\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                    <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.TelegramPassport, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Border Width=\"32\" Height=\"32\" Margin=\"18,36,18,18\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\" Background=\"{StaticResource PhoneForegroundBrush}\" Tap=\"AboutIcon_OnTap\">\r\n            <Border.OpacityMask>\r\n                <ImageBrush ImageSource=\"/Images/W10M/ic_bio_2x.png\"/>\r\n            </Border.OpacityMask>\r\n        </Border>\r\n\r\n        <Grid \r\n            Grid.Row=\"1\"\r\n            Visibility=\"{Binding Items.Count, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\">\r\n            <longListSelector:LongListSelector\r\n                Margin=\"6,0,0,0\" \r\n                x:Name=\"Items\"\r\n                IsFlatList=\"True\"\r\n                ItemsSource=\"{Binding Items}\"\r\n                Background=\"Transparent\"\r\n                toolkit:TiltEffect.SuppressTilt=\"True\">\r\n                <longListSelector:LongListSelector.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                    </ItemsPanelTemplate>\r\n                </longListSelector:LongListSelector.ItemsPanel>\r\n                <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                    <DataTemplate>\r\n                        <Grid>\r\n                            <TextBlock \r\n                                Text=\"{Binding Resources.PassportProvidedInformation, Source={StaticResource Strings}}\" \r\n                                FontSize=\"23\" \r\n                                Foreground=\"{StaticResource TelegramTextAccentBrush}\" \r\n                                Margin=\"12,18,12,0\"/>\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListHeaderTemplate>\r\n                <longListSelector:LongListSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <Button cal:Message.Attach=\"[Event Tap] = [Action Edit($DataContext)]\"  toolkit:TiltEffect.SuppressTilt=\"False\" Margin=\"-12,0,-12,0\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <StackPanel>\r\n                                <TextBlock Margin=\"12,0,12,0\" Text=\"{Binding Type, Converter={StaticResource SecureValueTypeToStringConverter}}\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                                <TextBlock Margin=\"12,2,12,0\" Text=\"{Binding Self, Converter={StaticResource SecureValueToHintConverter}}\" TextTrimming=\"WordEllipsis\" Style=\"{StaticResource PhoneTextNormalStyle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                            </StackPanel>\r\n                        </Button>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ItemTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <StackPanel x:Name=\"ContentPanel\" DataContext=\"{Binding DataContext, ElementName=Main}\">\r\n                            <Button toolkit:TiltEffect.SuppressTilt=\"False\" Margin=\"-12,0,-12,0\" cal:Message.Attach=\"[Event Tap] = [Action AddDocument]\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"12,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.PassportNoDocumentsAdd, Source={StaticResource Strings}}\"/>\r\n                                    <!--<TextBlock Margin=\"12,2,-12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>-->\r\n                                </StackPanel>\r\n                            </Button>\r\n\r\n                            <Button Visibility=\"{Binding Items.Count, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\" toolkit:TiltEffect.SuppressTilt=\"False\" Margin=\"-12,0,-12,0\" cal:Message.Attach=\"[Event Tap] = [Action DeletePassport]\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                                <StackPanel>\r\n                                    <TextBlock Margin=\"12,0,12,0\" FontSize=\"27\" Foreground=\"{StaticResource TelegramTextRedBrush}\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.PassportDeleteAll, Source={StaticResource Strings}}\"/>\r\n                                    <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\" \" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                                </StackPanel>\r\n                            </Button>\r\n                        </StackPanel>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n            </longListSelector:LongListSelector>\r\n        </Grid>\r\n        \r\n        <Grid \r\n            Grid.Row=\"1\" \r\n            Visibility=\"{Binding Items.Count, Converter={StaticResource CountEqualsToVisibilityConverter}, ConverterParameter=0}\">\r\n            <StackPanel VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Width=\"480\">\r\n                <Border x:Name=\"ImagePlaceholder\" Background=\"{StaticResource PhoneSubtleBrush}\" Width=\"71\" Height=\"95\" Opacity=\"0\">\r\n                    <Border.OpacityMask>\r\n                        <ImageBrush ImageSource=\"/Images/W10M/no_passport_2x.png\" Stretch=\"UniformToFill\" ImageOpened=\"ImageBrush_OnImageOpened\"/>\r\n                    </Border.OpacityMask>\r\n                </Border>\r\n                <TextBlock Text=\"{Binding Resources.PassportNoDocuments, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Margin=\"18,18,18,0\" TextAlignment=\"Center\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                <TextBlock Text=\"{Binding Resources.PassportNoDocumentsInfo, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Margin=\"18,18,18,0\" TextAlignment=\"Center\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                <Button cal:Message.Attach=\"[Event Tap] = [Action AddDocument]\" FontWeight=\"SemiBold\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" Margin=\"18,18,18,0\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" Content=\"{Binding Resources.PassportNoDocumentsAdd, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ButtonStyle1}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/PassportSettingsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Passport;\r\nusing TelegramClient.Views.Passport;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class PassportSettingsView\r\n    {\r\n        public PassportSettingsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void AboutIcon_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ShellViewModel.ShowCustomMessageBox(\r\n                AppResources.PassportInfo, AppResources.PassportInfoTitle,\r\n                AppResources.Ok);\r\n        }\r\n\r\n        private void ImageBrush_OnImageOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            ImagePlaceholder.Opacity = 1.0;\r\n        }\r\n    }\r\n\r\n    public class SecureRequiredTypeToCaptionConverter : IValueConverter\r\n    {\r\n        private static readonly Dictionary<Type, string> _dict = new Dictionary<Type, string>\r\n        {\r\n            { typeof(TLSecureValueTypePersonalDetails), AppResources.PassportPersonalDetails },\r\n            { typeof(TLSecureValueTypePassport), AppResources.Passport },\r\n            { typeof(TLSecureValueTypeDriverLicense), AppResources.PassportDriverLicence },\r\n            { typeof(TLSecureValueTypeIdentityCard), AppResources.PassportIdentityCard },\r\n            { typeof(TLSecureValueTypeInternalPassport), AppResources.PassportInternal },\r\n            { typeof(TLSecureValueTypeAddress), AppResources.PassportAddress },\r\n            { typeof(TLSecureValueTypeUtilityBill), AppResources.PassportUtilityBill },\r\n            { typeof(TLSecureValueTypeBankStatement), AppResources.PassportBankStatement },\r\n            { typeof(TLSecureValueTypeRentalAgreement), AppResources.PassportTenancyAgreement },\r\n            { typeof(TLSecureValueTypePassportRegistration), AppResources.PassportRegistration },\r\n            { typeof(TLSecureValueTypeTemporaryRegistration), AppResources.PassportTemporaryRegistration },\r\n            { typeof(TLSecureValueTypePhone), AppResources.PassportPhone },\r\n            { typeof(TLSecureValueTypeEmail), AppResources.PassportEmail },\r\n        };\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var secureValueType = value as TLSecureValueTypeBase;\r\n            if (secureValueType != null)\r\n            {\r\n                return Convert(secureValueType);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static string Convert(TLSecureValueTypeBase value)\r\n        {\r\n            string caption;\r\n            if (value != null && _dict.TryGetValue(value.GetType(), out caption))\r\n            {\r\n                return caption;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class SecureRequiredTypeToHintConverter : IValueConverter\r\n    {\r\n        private static readonly Dictionary<Type, string> _dict = new Dictionary<Type, string>\r\n        {\r\n            { typeof(TLSecureValueTypePersonalDetails), AppResources.PassportPersonalDetailsInfo },\r\n            { typeof(TLSecureValueTypePassport), AppResources.PassportIdentityPassport },\r\n            { typeof(TLSecureValueTypeDriverLicense), AppResources.PassportIdentityDriverLicence },\r\n            { typeof(TLSecureValueTypeIdentityCard), AppResources.PassportIdentityID },\r\n            { typeof(TLSecureValueTypeInternalPassport), AppResources.PassportIdentityInternalPassport },\r\n            { typeof(TLSecureValueTypeAddress), AppResources.PassportAddressNoUploadInfo },\r\n            { typeof(TLSecureValueTypeUtilityBill), AppResources.PassportAddBillInfo },\r\n            { typeof(TLSecureValueTypeBankStatement), AppResources.PassportAddBankInfo },\r\n            { typeof(TLSecureValueTypeRentalAgreement), AppResources.PassportAddAgreementInfo },\r\n            { typeof(TLSecureValueTypePassportRegistration), AppResources.PassportAddPassportRegistrationInfo },\r\n            { typeof(TLSecureValueTypeTemporaryRegistration), AppResources.PassportAddTemporaryRegistrationInfo },\r\n            { typeof(TLSecureValueTypePhone), AppResources.PassportPhoneInfo },\r\n            { typeof(TLSecureValueTypeEmail), AppResources.PassportEmailInfo },\r\n        };\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var secureValueType = value as TLSecureValueTypeBase;\r\n            if (secureValueType != null)\r\n            {\r\n                return Convert(secureValueType);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static string Convert(TLSecureValueTypeBase value)\r\n        {\r\n            string caption;\r\n            if (value != null && _dict.TryGetValue(value.GetType(), out caption))\r\n            {\r\n                return caption;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class SecureValueToHintConverter : IValueConverter\r\n    {\r\n        private static readonly Dictionary<Type, Func<TLSecureValue, string>> _dict = new Dictionary<Type, Func<TLSecureValue, string>>\r\n        {\r\n            { typeof(TLSecureValueTypePersonalDetails), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypePassport), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypeDriverLicense), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypeIdentityCard), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypeInternalPassport), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypeAddress), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypeUtilityBill), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypeBankStatement), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypeRentalAgreement), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypePassportRegistration), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypeTemporaryRegistration), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypePhone), x => { return AppResources.PassportPersonalDetails; } },\r\n            { typeof(TLSecureValueTypeEmail), x => { return AppResources.PassportPersonalDetails; } },\r\n        };\r\n\r\n        public static string Convert(TLSecureValue secureValue)\r\n        {\r\n            var personalDetails = secureValue.Type as TLSecureValueTypePersonalDetails;\r\n            if (personalDetails != null)\r\n            {\r\n                var rootObject = secureValue.Data.DecryptedData as PersonalDetailsRootObject;\r\n                if (rootObject != null)\r\n                {\r\n                    return rootObject.ToString(\r\n                        GenderToStringConverter.Convert,\r\n                        x =>\r\n                        {\r\n                            var country = CountryUtils.GetCountryByCode(x);\r\n                            return country != null ? country.Name : null;\r\n                        });\r\n                }\r\n            }\r\n\r\n            var passport = secureValue.Type as TLSecureValueTypePassport;\r\n            if (passport != null)\r\n            {\r\n                if (secureValue.Data.DecryptedData != null)\r\n                {\r\n                    return secureValue.Data.DecryptedData.ToString();\r\n                }\r\n            }\r\n\r\n            var driverLicence = secureValue.Type as TLSecureValueTypeDriverLicense;\r\n            if (driverLicence != null)\r\n            {\r\n                if (secureValue.Data.DecryptedData != null)\r\n                {\r\n                    return secureValue.Data.DecryptedData.ToString();\r\n                }\r\n            }\r\n\r\n            var identityCard = secureValue.Type as TLSecureValueTypeIdentityCard;\r\n            if (identityCard != null)\r\n            {\r\n                if (secureValue.Data.DecryptedData != null)\r\n                {\r\n                    return secureValue.Data.DecryptedData.ToString();\r\n                }\r\n            }\r\n\r\n            var internalPassport = secureValue.Type as TLSecureValueTypeInternalPassport;\r\n            if (internalPassport != null)\r\n            {\r\n                if (secureValue.Data.DecryptedData != null)\r\n                {\r\n                    return secureValue.Data.DecryptedData.ToString();\r\n                }\r\n            }\r\n\r\n            var address = secureValue.Type as TLSecureValueTypeAddress;\r\n            if (address != null)\r\n            {\r\n                var rootObject = secureValue.Data.DecryptedData as ResidentialAddressRootObject;\r\n                if (rootObject != null)\r\n                {\r\n                    return rootObject.ToString(x =>\r\n                    {\r\n                        var country = CountryUtils.GetCountryByCode(x);\r\n                        return country != null ? country.Name : null;\r\n                    });\r\n                }\r\n            }\r\n\r\n            var utilityBill = secureValue.Type as TLSecureValueTypeUtilityBill;\r\n            if (utilityBill != null)\r\n            {\r\n                return AppResources.PassportDocuments;\r\n            }\r\n\r\n            var bankStatement = secureValue.Type as TLSecureValueTypeBankStatement;\r\n            if (bankStatement != null)\r\n            {\r\n                return AppResources.PassportDocuments;\r\n            }\r\n\r\n            var rentalAgreement = secureValue.Type as TLSecureValueTypeRentalAgreement;\r\n            if (rentalAgreement != null)\r\n            {\r\n                return AppResources.PassportDocuments;\r\n            }\r\n\r\n            var passportRegistration = secureValue.Type as TLSecureValueTypePassportRegistration;\r\n            if (passportRegistration != null)\r\n            {\r\n                return AppResources.PassportDocuments;\r\n            }\r\n\r\n            var temporaryRegistration = secureValue.Type as TLSecureValueTypeTemporaryRegistration;\r\n            if (temporaryRegistration != null)\r\n            {\r\n                return AppResources.PassportDocuments;\r\n            }\r\n\r\n            var phone = secureValue.Type as TLSecureValueTypePhone;\r\n            if (phone != null)\r\n            {\r\n                var plainData = secureValue.PlainData as TLSecurePlainPhone;\r\n                if (plainData != null && !TLString.IsNullOrEmpty(plainData.Phone))\r\n                {\r\n                    return plainData.Phone.ToString().StartsWith(\"+\") ? plainData.Phone.ToString() : \"+\" + plainData.Phone;\r\n                }\r\n            }\r\n\r\n            var email = secureValue.Type as TLSecureValueTypeEmail;\r\n            if (email != null)\r\n            {\r\n                var plainData = secureValue.PlainData as TLSecurePlainEmail;\r\n                if (plainData != null && !TLString.IsNullOrEmpty(plainData.Email))\r\n                {\r\n                    return plainData.Email.ToString();\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var secureValue = value as TLSecureValue;\r\n            if (secureValue == null) return null;\r\n\r\n            return Convert(secureValue);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/PhotoPickerView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.PhotoPickerView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.PhotoPicker, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0,6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <TextBlock Text=\"{Binding Resources.ChooseYourPhotoPickerApp, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" FontSize=\"23\" Margin=\"12,18,12,0\"/>\r\n            <ItemsControl Grid.Row=\"1\" ItemsSource=\"{Binding MainRules}\">\r\n                <ItemsControl.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <RadioButton GroupName=\"CameraGroup\" IsChecked=\"{Binding IsChecked, Mode=OneTime}\" Checked=\"ToggleButton_OnChecked\" Content=\"{Binding}\"/>\r\n                    </DataTemplate>\r\n                </ItemsControl.ItemTemplate>\r\n            </ItemsControl>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/PhotoPickerView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Additional;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class PhotoPickerView\r\n    {\r\n        public PhotoPickerViewModel ViewModel\r\n        {\r\n            get { return DataContext as PhotoPickerViewModel; }\r\n        }\r\n\r\n        public PhotoPickerView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void ToggleButton_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            var radioButton = sender as RadioButton;\r\n            if (radioButton != null)\r\n            {\r\n                var privacyRule = radioButton.DataContext as TLPrivacyRuleBase;\r\n                if (privacyRule != null)\r\n                {\r\n                    ViewModel.SelectedMainRule = privacyRule;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/ProxyListView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ProxyListView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Main\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <additional:ProxyToForegroundConverter \r\n            x:Key=\"ProxyToForegroundConverter\"\r\n            AccentBrush=\"{StaticResource TelegramBadgeAccentBrush}\"\r\n            AvailableBrush=\"ForestGreen\"\r\n            UnavailableBrush=\"#FFB2362E\"\r\n            RegularBrush=\"{StaticResource PhoneSubtleBrush}\"/>\r\n        <additional:ProxyToStatusConverter\r\n            x:Key=\"ProxyToStatusConverter\"/>\r\n        <additional:ProxyTypeToStringConverter x:Key=\"ProxyTypeToStringConverter\"/>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Proxy, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Image HorizontalAlignment=\"Right\" x:Name=\"ShareMenuIcon\" Source=\"/Images/W10M/ic_share_2x.png\" Grid.Row=\"0\" Width=\"32\" Height=\"32\" Margin=\"18,51,18,21\" VerticalAlignment=\"Top\" Tap=\"ShareIcon_OnTap\"/>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\">\r\n            <longListSelector:LongListSelector\r\n                toolkit:TiltEffect.SuppressTilt=\"True\"\r\n                Margin=\"6,0,0,0\" \r\n                ItemsSource=\"{Binding Items}\"\r\n                Background=\"Transparent\"\r\n                IsFlatList=\"True\">\r\n                <longListSelector:LongListSelector.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                    </ItemsPanelTemplate>\r\n                </longListSelector:LongListSelector.ItemsPanel>\r\n                <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                    <DataTemplate>\r\n                        <Grid DataContext=\"{Binding DataContext, ElementName=Main}\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <toolkit:ToggleSwitch Margin=\"0,12,-24,0\" IsChecked=\"{Binding IsEnabled, Mode=TwoWay}\" Header=\"\">\r\n                                <i:Interaction.Behaviors>\r\n                                    <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                        OnContent=\"{Binding Resources.UseProxy, Source={StaticResource Strings}}\"\r\n                                        OffContent=\"{Binding Resources.UseProxy, Source={StaticResource Strings}}\"/>\r\n                                </i:Interaction.Behaviors>\r\n                            </toolkit:ToggleSwitch>\r\n\r\n                            <TextBlock Grid.Row=\"1\" Margin=\"12,0,-12,14\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Connections, Source={StaticResource Strings}}\"/>\r\n                            <!--<TextBlock Grid.Row=\"2\" Margin=\"6,0,0,14\" Text=\"{Binding Status}\" Visibility=\"{Binding Status, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>-->\r\n                        </Grid>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListHeaderTemplate>\r\n                <longListSelector:LongListSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <ListBoxItem toolkit:TiltEffect.SuppressTilt=\"False\">\r\n                            <Grid Margin=\"0,12\">\r\n                                <toolkit:ContextMenuService.ContextMenu>\r\n                                    <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" cal:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Main}\">\r\n                                        <toolkit:MenuItem cal:Message.Attach=\"[Event Click] = [Action Delete($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\" />                                   \r\n                                    </toolkit:ContextMenu>\r\n                                </toolkit:ContextMenuService.ContextMenu>\r\n                                \r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <Grid  \r\n                                    Margin=\"12,0,0,0\"\r\n                                    Background=\"Transparent\" \r\n                                    cal:Message.Attach=\"[Event Tap] = [Action Select($DataContext)]\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"Auto\"/>\r\n                                        <RowDefinition Height=\"Auto\"/>\r\n                                    </Grid.RowDefinitions>\r\n                                    <TextBlock Margin=\"0\" TextTrimming=\"WordEllipsis\" Text=\"{Binding About, Converter={StaticResource NonBreakingStringConverter}}\" FontSize=\"27\"/>\r\n                                    <Grid Grid.Row=\"1\">\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"*\"/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <TextBlock Grid.Column=\"0\" Margin=\"0\" Text=\"{Binding Self, Converter={StaticResource ProxyToStatusConverter}}\" Foreground=\"{Binding Self, Converter={StaticResource ProxyToForegroundConverter}}\" FontSize=\"20\"/>\r\n                                        <TextBlock Grid.Column=\"1\" Margin=\"0\" Text=\"{Binding Converter={StaticResource ProxyTypeToStringConverter}, StringFormat=' (\\{0\\}'}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"20\"/>\r\n                                        <TextBlock Grid.Column=\"2\" Margin=\"0\" Text=\"{Binding Ping, StringFormat=', ping: \\{0\\} ms'}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"20\"/>\r\n                                        <TextBlock Grid.Column=\"3\" Margin=\"0\" Text=\")\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"20\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n\r\n                                <Grid Grid.Column=\"1\"\r\n                                    Background=\"Transparent\"\r\n                                    cal:Message.Attach=\"[Event Tap] = [Action Open($DataContext)]\">\r\n                                    <Border\r\n                                        Width=\"32\" \r\n                                        Height=\"32\" Margin=\"18,16,18,16\" \r\n                                        Background=\"{StaticResource PhoneForegroundBrush}\">\r\n                                        <Border.OpacityMask>\r\n                                            <ImageBrush ImageSource=\"/Images/W10M/ic_bio_2x.png\"/>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </ListBoxItem>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ItemTemplate>\r\n                <longListSelector:LongListSelector.ListFooterTemplate>\r\n                    <DataTemplate>\r\n                        <StackPanel DataContext=\"{Binding DataContext, ElementName=Main}\" Margin=\"0,0,0,72\">\r\n                            <Button toolkit:TiltEffect.SuppressTilt=\"False\" Margin=\"-6,-6,-12,0\" Tap=\"Add_OnTap\" Style=\"{StaticResource ProfileButtonStyle}\" Visibility=\"{Binding Converter={StaticResource WP8VisibilityConverter}}\">\r\n                                <TextBlock Margin=\"12,0,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.AddProxy, Source={StaticResource Strings}}\"/>\r\n                            </Button>\r\n                            <toolkit:ToggleSwitch Margin=\"0,0,-24,0\" IsChecked=\"{Binding UseForCalls, Mode=TwoWay}\" Header=\"\">\r\n                                <i:Interaction.Behaviors>\r\n                                    <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                        OnContent=\"{Binding Resources.UseProxyForCalls, Source={StaticResource Strings}}\"\r\n                                        OffContent=\"{Binding Resources.UseProxyForCalls, Source={StaticResource Strings}}\"/>\r\n                                </i:Interaction.Behaviors>\r\n                            </toolkit:ToggleSwitch>\r\n                            <TextBlock Margin=\"12,0,12,0\" Text=\"{Binding Resources.UseProxyForCallsHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                        </StackPanel>\r\n                    </DataTemplate>\r\n                </longListSelector:LongListSelector.ListFooterTemplate>\r\n            </longListSelector:LongListSelector>\r\n        </Grid>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n        <Grid x:Name=\"Bar\" Grid.Row=\"1\" Visibility=\"Collapsed\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform/>\r\n            </Grid.RenderTransform>\r\n            <controls1:TelegramApplicationBar\r\n                x:Name=\"AppBar\"\r\n                VerticalAlignment=\"Bottom\"\r\n                MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                <controls1:TelegramApplicationBar.Buttons>\r\n                    <controls1:TelegramAppBarButton\r\n                        IsEnabled=\"True\"\r\n                        Grid.Column=\"3\" \r\n                        Tap=\"DoneButton_OnClick\"\r\n                        ImageSource=\"/Images/W10M/ic_done_2x.png\"\r\n                        Text=\"{Binding Resources.Done, Source={StaticResource Strings}}\"/>\r\n                </controls1:TelegramApplicationBar.Buttons>\r\n            </controls1:TelegramApplicationBar>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/ProxyListView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing System.Windows.Navigation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Api.Transport;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Dialogs;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ProxyListView\r\n    {\r\n        public ProxyListViewModel ViewModel\r\n        {\r\n            get { return DataContext as ProxyListViewModel; }\r\n        }\r\n\r\n        private TranslateTransform _frameTransform;\r\n\r\n        public static readonly DependencyProperty RootFrameTransformProperty = DependencyProperty.Register(\r\n            \"RootFrameTransformProperty\", typeof(double), typeof(ProxyListView), new PropertyMetadata(OnRootFrameTransformChanged));\r\n\r\n        private static void OnRootFrameTransformChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var view = d as ProxyListView;\r\n            if (view != null)\r\n            {\r\n                view._frameTransform.Y = 0;\r\n            }\r\n        }\r\n\r\n        public double RootFrameTransform\r\n        {\r\n            get { return (double)GetValue(RootFrameTransformProperty); }\r\n            set { SetValue(RootFrameTransformProperty, value); }\r\n        }\r\n\r\n        private void SetRootFrameBinding()\r\n        {\r\n            var frame = (Frame)Application.Current.RootVisual;\r\n            _frameTransform = ((TranslateTransform)((TransformGroup)frame.RenderTransform).Children[0]);\r\n            var binding = new Binding(\"Y\")\r\n            {\r\n                Source = _frameTransform\r\n            };\r\n            SetBinding(RootFrameTransformProperty, binding);\r\n        }\r\n\r\n        private void RemoveRootFrameBinding()\r\n        {\r\n            ClearValue(RootFrameTransformProperty);\r\n        }\r\n\r\n        public ProxyListView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                UpdateShareButton();\r\n                SetRootFrameBinding();\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                RemoveRootFrameBinding();\r\n            };\r\n        }\r\n\r\n        private void UpdateShareButton()\r\n        {\r\n            ShareMenuIcon.Opacity = ViewModel != null && !ViewModel.SuppressSharing\r\n                ? 1.0\r\n                : 0.5;\r\n        }\r\n\r\n        private void DoneButton_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n\r\n        private void Add_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Add();\r\n        }\r\n\r\n        private void ShareIcon_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Share();\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                var shareMessagePicker = popup.Child as ShareMessagePicker;\r\n                if (shareMessagePicker != null)\r\n                {\r\n                    shareMessagePicker.TryClose();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        private ShareMessagePicker _shareMessagePicker;\r\n\r\n        private WeakEventListener<ProxyListView, object, NavigatingCancelEventArgs> _weakEventListener;\r\n\r\n        public void OpenShareMessagePicker(string link, Action<PickDialogEventArgs> callback = null)\r\n        {\r\n            var isVisible = false;\r\n            var frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            PhoneApplicationPage page = null;\r\n            if (frame != null)\r\n            {\r\n                page = frame.Content as PhoneApplicationPage;\r\n                if (page != null)\r\n                {\r\n                    page.IsHitTestVisible = false;\r\n                    var applicationBar = page.ApplicationBar;\r\n                    if (applicationBar != null)\r\n                    {\r\n                        isVisible = applicationBar.IsVisible;\r\n                        applicationBar.IsVisible = false;\r\n                    }\r\n                }\r\n\r\n                var weakEventListener = new WeakEventListener<ProxyListView, object, NavigatingCancelEventArgs>(this, frame);\r\n                frame.Navigating += weakEventListener.OnEvent;\r\n\r\n                weakEventListener.OnEventAction = (view, o, args) =>\r\n                {\r\n                    view.Frame_Navigating(o, args);\r\n                };\r\n                weakEventListener.OnDetachAction = (listener, source) =>\r\n                {\r\n                    var f = source as PhoneApplicationFrame;\r\n                    if (f != null)\r\n                    {\r\n                        f.Navigating -= listener.OnEvent;\r\n                    }\r\n                };\r\n\r\n                _weakEventListener = weakEventListener;\r\n            }\r\n\r\n            if (page == null) return;\r\n\r\n            var popup = new Popup();\r\n            var sharePicker = new ShareMessagePicker\r\n            {\r\n                Width = page.ActualWidth,\r\n                Height = page.ActualHeight,\r\n                Link = link\r\n            };\r\n            _shareMessagePicker = sharePicker;\r\n            page.SizeChanged += Page_SizeChanged;\r\n\r\n            sharePicker.Close += (sender, args) =>\r\n            {\r\n                _shareMessagePicker = null;\r\n                _weakEventListener.Detach();\r\n                _weakEventListener = null;\r\n\r\n                popup.IsOpen = false;\r\n                popup.Child = null;\r\n\r\n                frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n                if (frame != null)\r\n                {\r\n                    page = frame.Content as PhoneApplicationPage;\r\n                    if (page != null)\r\n                    {\r\n                        page.SizeChanged -= Page_SizeChanged;\r\n                        page.IsHitTestVisible = true;\r\n                        var applicationBar = page.ApplicationBar;\r\n                        if (applicationBar != null)\r\n                        {\r\n                            applicationBar.IsVisible = isVisible;\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            _shareMessagePicker.Pick += (sender, args) =>\r\n            {\r\n                callback.SafeInvoke(args);\r\n            };\r\n\r\n            popup.Child = sharePicker;\r\n            popup.IsOpen = true;\r\n        }\r\n\r\n        private void Frame_Navigating(object sender, NavigatingCancelEventArgs e)\r\n        {\r\n            if (_shareMessagePicker != null)\r\n            {\r\n                _shareMessagePicker.ForceClose();\r\n            }\r\n        }\r\n\r\n        private void Page_SizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n\r\n        }\r\n    }\r\n\r\n    public class ProxyTypeToStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var mtProtoProxy = value as TLMTProtoProxy;\r\n            if (mtProtoProxy != null)\r\n            {\r\n                return AppResources.MTProto;\r\n            }\r\n\r\n            return AppResources.Socks5;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n    public class ProxyToStatusConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var transportService = IoC.Get<ITransportService>();\r\n            if (transportService == null) return null;\r\n\r\n            var proxyConfig = transportService.GetProxyConfig();\r\n            if (proxyConfig == null) return null;\r\n\r\n            var proxyBase = value as TLProxyBase;\r\n            if (proxyBase != null)\r\n            {\r\n                switch (proxyBase.Status)\r\n                {\r\n                    case ProxyStatus.Available:\r\n                        return proxyConfig.IsEnabled.Value && proxyBase.IsSelected ? AppResources.Connected : AppResources.Available;\r\n                    case ProxyStatus.Unavailable:\r\n                        return AppResources.Unavailable;\r\n                    case ProxyStatus.Connecting:\r\n                        return proxyConfig.IsEnabled.Value && proxyBase.IsSelected ? AppResources.Connecting + \"...\" : AppResources.Checking + \"...\";\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    public class ProxyToForegroundConverter : IValueConverter\r\n    {\r\n        public Brush AccentBrush { get; set; }\r\n\r\n        public Brush AvailableBrush { get; set; }\r\n\r\n        public Brush UnavailableBrush { get; set; }\r\n\r\n        public Brush RegularBrush { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var proxyBase = value as TLProxyBase;\r\n            if (proxyBase != null)\r\n            {\r\n                if (proxyBase.IsSelected)\r\n                {\r\n                    return AccentBrush;\r\n                }\r\n                if (proxyBase.Status == ProxyStatus.Available)\r\n                {\r\n                    return AvailableBrush;\r\n                }\r\n                if (proxyBase.Status == ProxyStatus.Unavailable)\r\n                {\r\n                    return UnavailableBrush;\r\n                }\r\n            }\r\n\r\n            return RegularBrush;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/ProxyView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.ProxyView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Proxy, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Image HorizontalAlignment=\"Right\" x:Name=\"ShareMenuIcon\" Source=\"/Images/W10M/ic_share_2x.png\" Grid.Row=\"0\" Width=\"32\" Height=\"32\" Margin=\"18,51,18,21\" VerticalAlignment=\"Top\" Tap=\"ShareIcon_OnTap\"/>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <StackPanel Grid.Row=\"1\">\r\n                <RadioButton GroupName=\"ProxyTypeGroup\" IsChecked=\"{Binding IsSocks5Proxy, Mode=TwoWay}\" Content=\"{Binding Resources.Socks5, Source={StaticResource Strings}}\"/>\r\n                <RadioButton GroupName=\"ProxyTypeGroup\" IsChecked=\"{Binding IsSocks5Proxy, Converter={StaticResource InvertBooleanConverter}}\" Content=\"{Binding Resources.MTProto, Source={StaticResource Strings}}\"/>\r\n                <TextBlock Margin=\"12,18,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.Connection, Source={StaticResource Strings}}\"/>\r\n                <controls1:LabeledTextBox InputScope=\"Url\" x:Name=\"ServerLabel\" KeyDown=\"ServerLabel_OnKeyDown\" MaxLength=\"255\" Label=\"{Binding Resources.Server, Source={StaticResource Strings}}\" Text=\"{Binding Server, Mode=TwoWay}\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </controls1:LabeledTextBox>\r\n                <controls1:LabeledTextBox InputScope=\"Number\" x:Name=\"PortLabel\" KeyDown=\"PortLabel_OnKeyDown\" MaxLength=\"5\" Label=\"{Binding Resources.Port, Source={StaticResource Strings}}\" Text=\"{Binding Port, Mode=TwoWay}\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </controls1:LabeledTextBox>\r\n                <StackPanel Visibility=\"{Binding IsSocks5Proxy, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\">\r\n                    <controls1:LabeledTextBox InputScope=\"Url\" x:Name=\"SecretLabel\" KeyDown=\"Done_OnKeyDown\" MaxLength=\"255\" Label=\"{Binding Resources.Secret, Source={StaticResource Strings}}\" Text=\"{Binding Secret, Mode=TwoWay}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <TextBlock Margin=\"12,18,12,0\" Text=\"{Binding Resources.UseTelegramProxyHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </StackPanel>\r\n\r\n                <StackPanel Visibility=\"{Binding IsSocks5Proxy, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                    <TextBlock Margin=\"12,24,-12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Resources.CredentionalsOptional, Source={StaticResource Strings}}\"/>\r\n                    <controls1:LabeledTextBox InputScope=\"Default\" x:Name=\"UsernameLabel\" KeyDown=\"Username_OnKeyDown\" MaxLength=\"255\" Label=\"{Binding Resources.Username, Source={StaticResource Strings}}\" Text=\"{Binding Username, Mode=TwoWay}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox InputScope=\"Password\" x:Name=\"PasswordLabel\" KeyDown=\"Done_OnKeyDown\" MaxLength=\"255\" Label=\"{Binding Resources.Password, Source={StaticResource Strings}}\" Text=\"{Binding Password, Mode=TwoWay}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <TextBlock Margin=\"12,18,12,0\" Text=\"{Binding Resources.UseProxyHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </StackPanel>\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n        <Grid x:Name=\"Bar\" Grid.Row=\"1\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform/>\r\n            </Grid.RenderTransform>\r\n            <controls1:TelegramApplicationBar\r\n                x:Name=\"AppBar\"\r\n                VerticalAlignment=\"Bottom\"\r\n                MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                <controls1:TelegramApplicationBar.Buttons>\r\n                    <controls1:TelegramAppBarButton\r\n                        IsEnabled=\"True\"\r\n                        Grid.Column=\"3\" \r\n                        Tap=\"DoneButton_OnClick\"\r\n                        ImageSource=\"/Images/W10M/ic_done_2x.png\"\r\n                        Text=\"{Binding Resources.Done, Source={StaticResource Strings}}\"/>\r\n                </controls1:TelegramApplicationBar.Buttons>\r\n            </controls1:TelegramApplicationBar>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/ProxyView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Extensions;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.Views.Controls;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class ProxyView\r\n    {\r\n        public ProxyViewModel ViewModel\r\n        {\r\n            get { return DataContext as ProxyViewModel; }\r\n        }\r\n\r\n        private TranslateTransform _frameTransform;\r\n\r\n        public static readonly DependencyProperty RootFrameTransformProperty = DependencyProperty.Register(\r\n            \"RootFrameTransformProperty\", typeof(double), typeof(ProxyView), new PropertyMetadata(OnRootFrameTransformChanged));\r\n\r\n        private static void OnRootFrameTransformChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var view = d as ProxyView;\r\n            if (view != null)\r\n            {\r\n                view._frameTransform.Y = 0;\r\n            }\r\n        }\r\n\r\n        public double RootFrameTransform\r\n        {\r\n            get { return (double)GetValue(RootFrameTransformProperty); }\r\n            set { SetValue(RootFrameTransformProperty, value); }\r\n        }\r\n\r\n        private void SetRootFrameBinding()\r\n        {\r\n            var frame = (Frame)Application.Current.RootVisual;\r\n            _frameTransform = ((TranslateTransform)((TransformGroup)frame.RenderTransform).Children[0]);\r\n            var binding = new Binding(\"Y\")\r\n            {\r\n                Source = _frameTransform\r\n            };\r\n            SetBinding(RootFrameTransformProperty, binding);\r\n        }\r\n\r\n        private void RemoveRootFrameBinding()\r\n        {\r\n            ClearValue(RootFrameTransformProperty);\r\n        }\r\n\r\n        public ProxyView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            ServerLabel.TextBox.TextChanged += (sender, args) =>\r\n            {\r\n                UpdateShareButton();\r\n            };\r\n            PortLabel.TextBox.TextChanged += (sender, args) =>\r\n            {\r\n                UpdateShareButton();\r\n            };\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                UpdateShareButton();\r\n                SetRootFrameBinding();\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                RemoveRootFrameBinding();\r\n            };\r\n        }\r\n\r\n        private void UpdateShareButton()\r\n        {\r\n            ShareMenuIcon.Opacity = ViewModel != null && !ViewModel.SuppressSharing && ViewModel.IsDoneEnabled\r\n                ? 1.0\r\n                : 0.5;\r\n        }\r\n\r\n        private void DoneButton_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n\r\n        private void ServerLabel_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                PortLabel.Focus();\r\n            }\r\n        }\r\n\r\n        private void PortLabel_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if ((e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9)\r\n                || (e.Key >= Key.D0 && e.Key <= Key.D9))\r\n            {\r\n\r\n            }\r\n            else if (e.Key == Key.Enter)\r\n            {\r\n                if (ViewModel.IsSocks5Proxy)\r\n                {\r\n                    UsernameLabel.Focus();\r\n                }\r\n                else\r\n                {\r\n                    SecretLabel.Focus();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                e.Handled = true;\r\n            }\r\n        }\r\n\r\n        private void Username_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                PasswordLabel.Focus();\r\n            }\r\n        }\r\n\r\n        private void Done_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.Done();\r\n            }\r\n        }\r\n\r\n        private void ShareIcon_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (ShareMenuIcon.Opacity < 1.0) return;\r\n\r\n            ViewModel.Share();\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                var shareMessagePicker = popup.Child as ShareMessagePicker;\r\n                if (shareMessagePicker != null)\r\n                {\r\n                    shareMessagePicker.TryClose();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            base.OnBackKeyPress(e);\r\n        }\r\n\r\n        private ShareMessagePicker _shareMessagePicker;\r\n\r\n        private WeakEventListener<ProxyView, object, NavigatingCancelEventArgs> _weakEventListener;\r\n\r\n        public void OpenShareMessagePicker(string link, Action<PickDialogEventArgs> callback = null)\r\n        {\r\n            var isVisible = false;\r\n            var frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            PhoneApplicationPage page = null;\r\n            if (frame != null)\r\n            {\r\n                page = frame.Content as PhoneApplicationPage;\r\n                if (page != null)\r\n                {\r\n                    page.IsHitTestVisible = false;\r\n                    var applicationBar = page.ApplicationBar;\r\n                    if (applicationBar != null)\r\n                    {\r\n                        isVisible = applicationBar.IsVisible;\r\n                        applicationBar.IsVisible = false;\r\n                    }\r\n                }\r\n\r\n                var weakEventListener = new WeakEventListener<ProxyView, object, NavigatingCancelEventArgs>(this, frame);\r\n                frame.Navigating += weakEventListener.OnEvent;\r\n\r\n                weakEventListener.OnEventAction = (view, o, args) =>\r\n                {\r\n                    view.Frame_Navigating(o, args);\r\n                };\r\n                weakEventListener.OnDetachAction = (listener, source) =>\r\n                {\r\n                    var f = source as PhoneApplicationFrame;\r\n                    if (f != null)\r\n                    {\r\n                        f.Navigating -= listener.OnEvent;\r\n                    }\r\n                };\r\n\r\n                _weakEventListener = weakEventListener;\r\n            }\r\n\r\n            if (page == null) return;\r\n\r\n            var popup = new Popup();\r\n            var sharePicker = new ShareMessagePicker\r\n            {\r\n                Width = page.ActualWidth,\r\n                Height = page.ActualHeight,\r\n                Link = link\r\n            };\r\n            _shareMessagePicker = sharePicker;\r\n            page.SizeChanged += Page_SizeChanged;\r\n\r\n            sharePicker.Close += (sender, args) =>\r\n            {\r\n                _shareMessagePicker = null;\r\n                _weakEventListener.Detach();\r\n                _weakEventListener = null;\r\n\r\n                popup.IsOpen = false;\r\n                popup.Child = null;\r\n\r\n                frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n                if (frame != null)\r\n                {\r\n                    page = frame.Content as PhoneApplicationPage;\r\n                    if (page != null)\r\n                    {\r\n                        page.SizeChanged -= Page_SizeChanged;\r\n                        page.IsHitTestVisible = true;\r\n                        var applicationBar = page.ApplicationBar;\r\n                        if (applicationBar != null)\r\n                        {\r\n                            applicationBar.IsVisible = isVisible;\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            _shareMessagePicker.Pick += (sender, args) =>\r\n            {\r\n                callback.SafeInvoke(args);\r\n            };\r\n\r\n            popup.Child = sharePicker;\r\n            popup.IsOpen = true;\r\n        }\r\n\r\n        private void Frame_Navigating(object sender, NavigatingCancelEventArgs e)\r\n        {\r\n            if (_shareMessagePicker != null)\r\n            {\r\n                _shareMessagePicker.ForceClose();\r\n            }\r\n        }\r\n\r\n        private void Page_SizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/StartupView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Additional.StartupView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:startView=\"clr-namespace:TelegramClient.Controls.StartView\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    mc:Ignorable=\"d\">\r\n    \r\n    <views:TelegramViewBase.Resources>\r\n        <SolidColorBrush x:Key=\"IndicatorBrushLight\" Color=\"#FFD1D5DC\"/>\r\n        <SolidColorBrush x:Key=\"IndicatorBrushDark\" Color=\"#FF4D4D4D\"/>\r\n        <SolidColorBrush x:Key=\"PositionBrushLight\" Color=\"#FF68768B\"/>\r\n        <SolidColorBrush x:Key=\"PositionBrushDark\" Color=\"#FFFFFFFF\"/>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <toolkit:SlideTransition Mode=\"SlideLeftFadeOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <Grid>\r\n        <startView:StartView x:Name=\"StartView\" Background=\"Transparent\" Tap=\"IndicatorBorder_OnTap\" SelectionChanged=\"StartView_OnSelectionChanged\" SelectionCanceled=\"StartView_OnSelectionCanceled\" ManipulationDelta=\"StartView_OnManipulationDelta\">\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,144,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.1-720p.png\"/>\r\n                    <StackPanel Margin=\"0,396,0,0\">\r\n                        <TextBlock TextAlignment=\"Center\" Margin=\"12,0,12,12\" Text=\"{Binding Resources.AppName, Source={StaticResource Strings}}\" FontSize=\"42\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" additional:StartupView.FormattedText=\"{Binding Resources.Intro1Message, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,144,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.2-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,396,0,0\">\r\n                        <TextBlock Foreground=\"#FFF85B30\" TextAlignment=\"Center\" Margin=\"12,0,12,12\" Text=\"{Binding Resources.Fast, Source={StaticResource Strings}}\" FontSize=\"42\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" additional:StartupView.FormattedText=\"{Binding Resources.FastMessage, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,144,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.3-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,396,0,0\">\r\n                        <TextBlock Foreground=\"#FFF99116\" TextAlignment=\"Center\" Margin=\"12,0,12,12\" Text=\"{Binding Resources.Free, Source={StaticResource Strings}}\" FontSize=\"42\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" additional:StartupView.FormattedText=\"{Binding Resources.FreeMessage, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,144,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.4-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,396,0,0\">\r\n                        <TextBlock Foreground=\"#FFF8C700\" TextAlignment=\"Center\" Margin=\"12,0,12,12\" Text=\"{Binding Resources.Powerful, Source={StaticResource Strings}}\" FontSize=\"42\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" additional:StartupView.FormattedText=\"{Binding Resources.PowerfulMessage, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,144,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.5-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,396,0,0\">\r\n                        <TextBlock Foreground=\"#FF5DC226\" TextAlignment=\"Center\" Margin=\"12,0,12,12\" Text=\"{Binding Resources.Secure, Source={StaticResource Strings}}\" FontSize=\"42\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\"  additional:StartupView.FormattedText=\"{Binding Resources.SecureMessage, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n            <startView:StartViewItem>\r\n                <Grid>\r\n                    <Image Margin=\"0,144,0,0\" VerticalAlignment=\"Top\" Width=\"182\" Height=\"182\" Source=\"/Images/Startup/intro.6-WXGA.png\"/>\r\n                    <StackPanel Margin=\"0,396,0,0\">\r\n                        <TextBlock Foreground=\"#FF2E90E7\" TextAlignment=\"Center\" Margin=\"12,0,12,12\" Text=\"{Binding Resources.CloudBased, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n                        <TextBlock TextAlignment=\"Center\" TextWrapping=\"Wrap\" additional:StartupView.FormattedText=\"{Binding Resources.CloudBasedMessage, Source={StaticResource Strings}}\" FontSize=\"{StaticResource PhoneFontSizeMedium}\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n                    </StackPanel>\r\n                </Grid>\r\n            </startView:StartViewItem>\r\n        </startView:StartView>\r\n\r\n        <Border x:Name=\"IndicatorBorder\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Center\" Width=\"132\" Margin=\"0,0,0,132\" Background=\"#FF4D4D4D\">\r\n            <UIElement.Clip>\r\n                <GeometryGroup>\r\n                    <EllipseGeometry Center=\"6,6\" RadiusX=\"6\" RadiusY=\"6\"/>\r\n                    <EllipseGeometry Center=\"30,6\" RadiusX=\"6\" RadiusY=\"6\"/>\r\n                    <EllipseGeometry Center=\"54,6\" RadiusX=\"6\" RadiusY=\"6\"/>\r\n                    <EllipseGeometry Center=\"78,6\" RadiusX=\"6\" RadiusY=\"6\"/>\r\n                    <EllipseGeometry Center=\"102,6\" RadiusX=\"6\" RadiusY=\"6\"/>\r\n                    <EllipseGeometry Center=\"126,6\" RadiusX=\"6\" RadiusY=\"6\"/>\r\n                </GeometryGroup>\r\n            </UIElement.Clip>\r\n            <Border x:Name=\"PositionBorder\" CornerRadius=\"6\" HorizontalAlignment=\"Left\" Width=\"12\" Height=\"12\" Background=\"{StaticResource PhoneForegroundBrush}\">\r\n                <Border.RenderTransform>\r\n                    <TranslateTransform x:Name=\"BorderPosition\"/>\r\n                </Border.RenderTransform>\r\n            </Border>\r\n        </Border>\r\n\r\n        <Border x:Name=\"StartMessagingPanel\" micro:Message.Attach=\"[Event Tap] = [Action StartMessaging]\"  Height=\"72\" VerticalAlignment=\"Bottom\" Background=\"{StaticResource TelegramBadgeAccentBrush}\">\r\n            <TextBlock VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Text=\"{Binding Resources.StartMessaging, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" FontSize=\"24\"/>\r\n        </Border>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Additional/StartupView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Additional\r\n{\r\n    public partial class StartupView\r\n    {\r\n        private const double ScreenWidth = 480.0;\r\n\r\n        private const double MarginWidth = 174.0;\r\n\r\n        private const double ScrollIndicatorWidth = 12.0;\r\n\r\n        private const int LastIndex = 5;\r\n\r\n        private const double ScrollIndicatorTranslationX = (ScreenWidth - MarginWidth - MarginWidth - ScrollIndicatorWidth) / LastIndex;\r\n\r\n\r\n        public static readonly DependencyProperty FormattedTextProperty = DependencyProperty.RegisterAttached(\r\n            \"FormattedText\", typeof(string), typeof(StartupView), new PropertyMetadata(default(string), OnFormattedTextChanged));\r\n\r\n        public static void SetFormattedText(DependencyObject element, string value)\r\n        {\r\n            element.SetValue(FormattedTextProperty, value);\r\n        }\r\n\r\n        public static string GetFormattedText(DependencyObject element)\r\n        {\r\n            return (string)element.GetValue(FormattedTextProperty);\r\n        }\r\n\r\n        private static void OnFormattedTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var r = d as TextBlock;\r\n            if (r != null)\r\n            {\r\n                var text = e.NewValue as string;\r\n                if (text != null)\r\n                {\r\n                    r.Inlines.Clear();\r\n                    var splittedText = text.Split(new[] { \"**\" }, StringSplitOptions.None);\r\n                    for (var i = 0; i < splittedText.Length; i++)\r\n                    {\r\n                        if (i % 2 == 1)\r\n                        {\r\n                            var bold = new Run();\r\n                            bold.FontWeight = FontWeights.SemiBold;\r\n                            bold.Text = splittedText[i];\r\n                            r.Inlines.Add(bold);\r\n                        }\r\n                        else\r\n                        {\r\n                            r.Inlines.Add(splittedText[i]);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public StartupView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            IndicatorBorder.Background = isLightTheme\r\n                ? (Brush) Resources[\"IndicatorBrushLight\"]\r\n                : (Brush) Resources[\"IndicatorBrushDark\"];\r\n            PositionBorder.Background = isLightTheme\r\n                ? (Brush) Resources[\"PositionBrushLight\"]\r\n                : (Brush) Resources[\"PositionBrushDark\"];\r\n\r\n            OptimizeFullHD();\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n            return;\r\n            var appBar = new ApplicationBar();\r\n            var appBarDefaultSize = appBar.DefaultSize;\r\n\r\n            StartMessagingPanel.Height = appBarDefaultSize;\r\n        }\r\n\r\n        private void StartView_OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            var index = StartView.SelectedIndex;\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var timeline = new DoubleAnimationUsingKeyFrames();\r\n            timeline.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = index * ScrollIndicatorTranslationX, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(timeline, BorderPosition);\r\n            Storyboard.SetTargetProperty(timeline, new PropertyPath(\"X\"));\r\n            storyboard.Children.Add(timeline);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void StartView_OnSelectionCanceled(object sender, System.EventArgs e)\r\n        {\r\n            var index = StartView.SelectedIndex;\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var timeline = new DoubleAnimationUsingKeyFrames();\r\n            timeline.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = index * ScrollIndicatorTranslationX, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(timeline, BorderPosition);\r\n            Storyboard.SetTargetProperty(timeline, new PropertyPath(\"X\"));\r\n            storyboard.Children.Add(timeline);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void StartView_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            if (StartView.SelectedIndex == 0 && e.DeltaManipulation.Translation.X > 0.0 && BorderPosition.X == 0.0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (StartView.SelectedIndex == LastIndex && e.DeltaManipulation.Translation.X < 0.0 && BorderPosition.X == ScrollIndicatorTranslationX * LastIndex)\r\n            {\r\n                return;\r\n            }\r\n\r\n            BorderPosition.X -= e.DeltaManipulation.Translation.X / ScreenWidth * ScrollIndicatorTranslationX;\r\n            if (BorderPosition.X < 0.0) BorderPosition.X = 0.0;\r\n            if (BorderPosition.X > ScrollIndicatorTranslationX * LastIndex) BorderPosition.X = ScrollIndicatorTranslationX * LastIndex;\r\n        }\r\n\r\n        private void IndicatorBorder_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var selectedIndex = StartView.SelectedIndex;\r\n            if (selectedIndex >= StartView.Items.Count - 1)\r\n            {\r\n                StartView.SelectedIndex = 0;\r\n            }\r\n            else if (StartView.SelectedIndex < StartView.Items.Count - 1)\r\n            {\r\n                StartView.SelectedIndex++;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/CallDebugControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Calls.CallDebugControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Margin=\"6,18,6,0\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <ScrollViewer>\r\n            <TextBlock x:Name=\"Debug\" TextWrapping=\"Wrap\"/>\r\n        </ScrollViewer>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/CallDebugControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing System.Windows.Threading;\r\nusing Windows.Phone.Networking.Voip;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing TelegramClient.Services;\r\n\r\nnamespace TelegramClient.Views.Calls\r\n{\r\n    public partial class CallDebugControl : UserControl\r\n    {\r\n        private DispatcherTimer _debugTimer = new DispatcherTimer{ Interval = TimeSpan.FromSeconds(0.5) };\r\n\r\n        public CallDebugControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _debugTimer.Tick += DebugTimer_Tick;\r\n        }\r\n\r\n        private void DebugTimer_Tick(object sender, System.EventArgs eventArgs)\r\n        {\r\n            Debug.Text = IoC.Get<IVoIPService>().GetDebugString();\r\n        }\r\n\r\n        public void Start()\r\n        {\r\n            _debugTimer.Start();\r\n        }\r\n\r\n        public void Stop()\r\n        {\r\n            _debugTimer.Stop();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/CallRatingControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Calls.CallRatingControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    <UserControl.Resources>\r\n        <ControlTemplate x:Key=\"RatingControlTemplate1\" TargetType=\"toolkit:Rating\">\r\n            <Border BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n\t\t\t\tBorderThickness=\"{TemplateBinding BorderThickness}\"\r\n\t\t\t\tBackground=\"{TemplateBinding Background}\" >\r\n                <VisualStateManager.VisualStateGroups>\r\n                    <VisualStateGroup x:Name=\"DragHelperStates\">\r\n                        <VisualStateGroup.Transitions>\r\n                            <VisualTransition To=\"Visible\"\r\n\t\t\t\t\t\t\t\tGeneratedDuration=\"0:0:0.1\" />\r\n                            <VisualTransition To=\"Collapsed\"\r\n\t\t\t\t\t\t\t\tGeneratedDuration=\"0:0:0.3\" />\r\n                        </VisualStateGroup.Transitions>\r\n\r\n                        <VisualState x:Name=\"Collapsed\" />\r\n\r\n                        <VisualState x:Name=\"Visible\">\r\n                            <Storyboard>\r\n                                <DoubleAnimation Storyboard.TargetName=\"DragBorderElement\"\r\n\t\t\t\t\t\t\t\t\tStoryboard.TargetProperty=\"Opacity\" To=\"1.0\" />\r\n                            </Storyboard>\r\n                        </VisualState>\r\n                    </VisualStateGroup>\r\n                </VisualStateManager.VisualStateGroups>\r\n                <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                    <Border x:Name=\"DragBorderElement\" \r\n\t\t\t\t\t\tBackground=\"{TemplateBinding Background}\" \r\n\t\t\t\t\t\tWidth=\"35\" Height=\"30\" \r\n\t\t\t\t\t\tHorizontalAlignment=\"Left\" \r\n\t\t\t\t\t\tVerticalAlignment=\"Top\"\r\n\t\t\t\t\t\tOpacity=\"0\">\r\n                        <TextBlock x:Name=\"DragTextBlockElement\" TextAlignment=\"Center\" Text=\"3.5\" />\r\n                    </Border>\r\n                    <Grid x:Name=\"UnfilledGridElement\" />\r\n\r\n                    <!-- layered on top of InactiveItems by being placed in \r\n                                 the same row, clipping mask determines how many \r\n                                 stars are displayed. The border is used to apply\r\n                                 a clipping mask to the filled RatingItems -->\r\n                    <Border x:Name=\"FilledClipElement\">\r\n                        <Grid x:Name=\"FilledGridElement\" />\r\n                    </Border>\r\n\r\n\r\n                </Grid>\r\n            </Border>\r\n        </ControlTemplate>\r\n        <Style x:Key=\"RatingItemStyle1\" TargetType=\"toolkit:RatingItem\">\r\n            <Setter Property=\"Margin\" Value=\"2\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"toolkit:RatingItem\">\r\n                        <Path Data=\"F1 M 5.0,0.0 L 6.1,3.5 L 9.8,3.5 L 6.8,5.6 L 7.9,9.0 L 5.0,6.9 L 2.1,9.1 L 3.2,5.6 L 0.2,3.5 L 3.9,3.5 L 5.0,0.0 Z\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding StrokeThickness}\"/>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <StackPanel>\r\n            <TextBlock Margin=\"12,18,12,0\" TextAlignment=\"Center\" TextWrapping=\"Wrap\" FontSize=\"20\" Text=\"{Binding Resources.RateCallQuality, Source={StaticResource Strings}}\"/>\r\n            <toolkit:Rating x:Name=\"Rating\" RenderTransformOrigin=\"0.5,0.5\" Margin=\"24\" Background=\"Transparent\" Template=\"{StaticResource RatingControlTemplate1}\" ValueChanged=\"Rating_OnValueChanged\">\r\n                <toolkit:Rating.RenderTransform>\r\n                    <ScaleTransform ScaleX=\"1.5\" ScaleY=\"1.5\"></ScaleTransform>\r\n                </toolkit:Rating.RenderTransform>\r\n                <toolkit:Rating.FilledItemStyle>\r\n                    <Style TargetType=\"toolkit:RatingItem\">\r\n                        <Setter Property=\"Background\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                        <Setter Property=\"Margin\" Value=\"12\"/>\r\n                        <Setter Property=\"Template\">\r\n                            <Setter.Value>\r\n                                <ControlTemplate TargetType=\"toolkit:RatingItem\">\r\n                                    <Path Data=\"F1 M 5.0,0.0 L 6.1,3.5 L 9.8,3.5 L 6.8,5.6 L 7.9,9.0 L 5.0,6.9 L 2.1,9.1 L 3.2,5.6 L 0.2,3.5 L 3.9,3.5 L 5.0,0.0 Z\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding StrokeThickness}\"/>\r\n                                </ControlTemplate>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                    </Style>\r\n                </toolkit:Rating.FilledItemStyle>\r\n                <toolkit:Rating.UnfilledItemStyle>\r\n                    <Style TargetType=\"toolkit:RatingItem\">\r\n                        <Setter Property=\"Background\" Value=\"#99FFFFFF\"/>\r\n                        <Setter Property=\"Margin\" Value=\"12\"/>\r\n                        <Setter Property=\"Template\">\r\n                            <Setter.Value>\r\n                                <ControlTemplate TargetType=\"toolkit:RatingItem\">\r\n                                    <Path Data=\"F1 M 5.0,0.0 L 6.1,3.5 L 9.8,3.5 L 6.8,5.6 L 7.9,9.0 L 5.0,6.9 L 2.1,9.1 L 3.2,5.6 L 0.2,3.5 L 3.9,3.5 L 5.0,0.0 Z\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding StrokeThickness}\"/>\r\n                                </ControlTemplate>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                    </Style>\r\n                </toolkit:Rating.UnfilledItemStyle>\r\n            </toolkit:Rating>\r\n            <controls:LabeledTextBox x:Name=\"Comment\" FontSize=\"20\" Margin=\"-6,-12\" MaxHeight=\"140\" Visibility=\"Collapsed\" Label=\"{Binding Resources.AddOptionalComment, Source={StaticResource Strings}}\"/>\r\n        </StackPanel>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/CallRatingControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Views.Calls\r\n{\r\n    public partial class CallRatingControl\r\n    {\r\n        public CallRatingControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Comment.FontSize = 20;\r\n            Comment.TextBox.FontSize = 20;\r\n            Comment.Input.TextWrapping = TextWrapping.Wrap;\r\n            Comment.Input.AcceptsReturn = true;\r\n        }\r\n\r\n        private void Rating_OnValueChanged(object sender, System.EventArgs e)\r\n        {\r\n            if (Comment == null) return;\r\n            if (Rating == null) return;\r\n\r\n            Comment.Visibility = Rating.Value < 5.0 ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/CallView.xaml",
    "content": "﻿<phone:PhoneApplicationPage\r\n    x:Class=\"TelegramClient.Views.Calls.CallView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:calls=\"clr-namespace:TelegramClient.Views.Calls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"White\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n    <phone:PhoneApplicationPage.Resources>\r\n        <SolidColorBrush x:Key=\"AppBarPanelDark\" Color=\"#1F1F1F\"/>\r\n        <SolidColorBrush x:Key=\"CallForegroundBrush\" Color=\"White\"/>\r\n        \r\n        <Style x:Key=\"ToggleButtonStyle1\" TargetType=\"ToggleButton\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource CallForegroundBrush}\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"MinWidth\" Value=\"100\"/>\r\n            <Setter Property=\"MinHeight\" Value=\"80\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"Padding\" Value=\"18,11\"/>\r\n            <Setter Property=\"Margin\" Value=\"9,18\"/>\r\n            <Setter Property=\"FontSize\" Value=\"18\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"ToggleButton\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"CheckStates\">\r\n                                    <VisualState x:Name=\"Unchecked\"/>\r\n                                    <VisualState x:Name=\"Checked\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"EnabledContent\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledContent\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"EnabledBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"0\">\r\n                                <ContentControl x:Name=\"EnabledContent\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledBackground\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" IsHitTestVisible=\"False\" Margin=\"0\" Visibility=\"Collapsed\">\r\n                                <ContentControl x:Name=\"DisabledContent\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{StaticResource PhoneDisabledBrush}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"ButtonStyle1\" TargetType=\"Button\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"MinWidth\" Value=\"100\"/>\r\n            <Setter Property=\"MinHeight\" Value=\"80\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource CallForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"18\"/>\r\n            <Setter Property=\"Padding\" Value=\"18,11\"/>\r\n            <Setter Property=\"Margin\" Value=\"9,18\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Red\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderThickness\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"0\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"ButtonStyle2\" TargetType=\"Button\">\r\n            <Setter Property=\"Background\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource CallForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"10,5,10,6\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource AppBarPanelDark}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Red\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderThickness\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"0\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </phone:PhoneApplicationPage.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Call\">\r\n                    <Storyboard>\r\n                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ConnectionStatus\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Visible</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>-->\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ChatButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Visible</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"SpeakerButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Visible</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MuteButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Visible</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"IgnoreButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EmojisPanel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Visible</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Source\" Storyboard.TargetName=\"BottomCommandImage\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"/Images/W10M/ic_call_cancel_2x.png\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"CallConnecting\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ChatButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"SpeakerButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MuteButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"IgnoreButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EmojisPanel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Source\" Storyboard.TargetName=\"BottomCommandImage\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"/Images/W10M/ic_call_cancel_2x.png\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"OutgoingCall\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ChatButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"SpeakerButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MuteButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"IgnoreButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EmojisPanel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Source\" Storyboard.TargetName=\"BottomCommandImage\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"/Images/W10M/ic_call_cancel_2x.png\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"OutgoingCallBusy\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ChatButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"SpeakerButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MuteButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"IgnoreButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Visible</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EmojisPanel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Source\" Storyboard.TargetName=\"BottomCommandImage\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"/Images/W10M/ic_call_answer_2x.png\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"IncomingCall\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ChatButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"SpeakerButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MuteButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"IgnoreButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Visible</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EmojisPanel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Source\" Storyboard.TargetName=\"BottomCommandImage\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"/Images/W10M/ic_call_answer_2x.png\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"IncomingCallBusy\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ChatButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"SpeakerButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MuteButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"IgnoreButton\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EmojisPanel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                <DiscreteObjectKeyFrame.Value>\r\n                                    <Visibility>Collapsed</Visibility>\r\n                                </DiscreteObjectKeyFrame.Value>\r\n                            </DiscreteObjectKeyFrame>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Source\" Storyboard.TargetName=\"BottomCommandImage\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"/Images/W10M/ic_call_answer_2x.png\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Image Stretch=\"UniformToFill\" HorizontalAlignment=\"Center\" Grid.RowSpan=\"3\" Source=\"{Binding User.Photo, Converter={StaticResource ProfileSmallPhotoConverter}, ConverterParameter='blur'}\"/>\r\n        <Image x:Name=\"BigPhoto\" Stretch=\"UniformToFill\" HorizontalAlignment=\"Center\" Grid.RowSpan=\"3\" Source=\"{Binding User.Photo, Converter={StaticResource ProfileBigPhotoConverter}}\"/>\r\n        <Border x:Name=\"PhotoBorder\" Grid.RowSpan=\"3\" Background=\"#99000000\" IsHitTestVisible=\"False\" CacheMode=\"BitmapCache\" Opacity=\"0\"/>\r\n\r\n        <StackPanel x:Name=\"CaptionPanel\" Margin=\"18,50\" VerticalAlignment=\"Top\" Background=\"Transparent\">\r\n            <StackPanel Orientation=\"Horizontal\">\r\n                <TextBlock x:Name=\"Title\" Text=\"{Binding Resources.AppName, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" FontSize=\"20\"/>\r\n                \r\n                <calls:SignalBarsControl Signal=\"{Binding Signal}\">\r\n                    <calls:SignalBarsControl.RenderTransform>\r\n                        <CompositeTransform ScaleY=\"0.7\" ScaleX=\"0.7\" TranslateX=\"0\" TranslateY=\"2\"/>\r\n                    </calls:SignalBarsControl.RenderTransform>\r\n                </calls:SignalBarsControl>\r\n            </StackPanel>\r\n            <TextBlock x:Name=\"Name\" Text=\"{Binding User.FullName2}\" FontSize=\"36\"/>\r\n            <TextBlock x:Name=\"Status\" Text=\"{Binding Status}\" Margin=\"0,3\"/>\r\n        </StackPanel>\r\n\r\n        <StackPanel x:Name=\"EmojisPanel\" Tap=\"EmojisPanel_OnTap\" Margin=\"18,50,18,50\" Background=\"Transparent\" RenderTransformOrigin=\"0.5,0.5\" Orientation=\"Horizontal\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Top\" CacheMode=\"BitmapCache\">\r\n            <StackPanel.RenderTransform>\r\n                <CompositeTransform x:Name=\"EmojisTransform\"/>\r\n            </StackPanel.RenderTransform>\r\n            <emojiPanel:TelegramRichTextBox Margin=\"-12,0\" emojiPanel:BrowserNavigationService.SuppressParsing=\"True\" Text=\"{Binding Emojis}\"/>\r\n        </StackPanel>\r\n\r\n        <StackPanel Grid.Row=\"1\" Orientation=\"Horizontal\" HorizontalAlignment=\"Center\">\r\n            <Button x:Name=\"ChatButton\" Style=\"{StaticResource ButtonStyle1}\">\r\n                <StackPanel VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                    <Image Source=\"/Images/W10M/ic_call_chat_2x.png\" Width=\"26\" Height=\"28\"/>\r\n                    <TextBlock Text=\"{Binding Resources.Chat, Source={StaticResource Strings}}\" Margin=\"0,6,0,0\"/>\r\n                </StackPanel>\r\n            </Button>\r\n            <ToggleButton x:Name=\"SpeakerButton\" Checked=\"Speaker_OnChecked\" Unchecked=\"Speaker_OnUnchecked\" Style=\"{StaticResource ToggleButtonStyle1}\">\r\n                <StackPanel VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                    <Image Source=\"/Images/W10M/ic_call_speaker_2x.png\" Width=\"26\" Height=\"28\"/>\r\n                    <TextBlock Text=\"{Binding Resources.Speaker, Source={StaticResource Strings}}\" Margin=\"0,6,0,0\"/>\r\n                </StackPanel>\r\n            </ToggleButton>\r\n            <ToggleButton x:Name=\"MuteButton\" Checked=\"Mute_OnChecked\" Unchecked=\"Mute_OnUnchecked\" Style=\"{StaticResource ToggleButtonStyle1}\">\r\n                <StackPanel VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                    <Image Source=\"/Images/W10M/ic_call_mute_2x.png\" Width=\"26\" Height=\"28\"/>\r\n                    <TextBlock Text=\"{Binding Resources.Mute, Source={StaticResource Strings}}\" Margin=\"0,6,0,0\"/>\r\n                </StackPanel>\r\n            </ToggleButton>\r\n            <Button x:Name=\"IgnoreButton\" Visibility=\"Visible\" Style=\"{StaticResource ButtonStyle1}\">\r\n                <StackPanel VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                    <Image Source=\"/Images/W10M/ic_call_ignore_2x.png\" Width=\"26\" Height=\"28\"/>\r\n                    <TextBlock x:Name=\"IgnoreButtonLabel\" Text=\"{Binding Resources.Ignore, Source={StaticResource Strings}}\" Margin=\"0,6,0,0\"/>\r\n                </StackPanel>\r\n            </Button>\r\n        </StackPanel>\r\n\r\n        <TextBlock \r\n            x:Name=\"EmojiKeyLabel\"\r\n            Opacity=\"0.0\"\r\n            Grid.RowSpan=\"3\"\r\n            Text=\"{Binding EmojiKeyDescription}\"\r\n            VerticalAlignment=\"Center\" \r\n            Margin=\"12,70,12,0\" \r\n            TextWrapping=\"Wrap\" \r\n            TextAlignment=\"Center\"/>\r\n\r\n        <Button x:Name=\"BottomCommand\" Grid.Row=\"2\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" Height=\"108\" VerticalAlignment=\"Bottom\" Style=\"{StaticResource ButtonStyle2}\">\r\n            <StackPanel VerticalAlignment=\"Center\">\r\n                <Image x:Name=\"BottomCommandImage\" Source=\"/Images/W10M/ic_call_cancel_2x.png\" Width=\"26\" Height=\"28\"/>\r\n                <TextBlock x:Name=\"BottomCommandLabel\" Text=\"{Binding Resources.Cancel, Source={StaticResource Strings}}\" FontSize=\"18\" HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\"/>\r\n            </StackPanel>\r\n        </Button>\r\n    </Grid>\r\n\r\n</phone:PhoneApplicationPage>"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/CallView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media.Animation;\r\nusing Caliburn.Micro;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Calls;\r\n\r\nnamespace TelegramClient.Views.Calls\r\n{\r\n    public partial class CallView\r\n    {\r\n        public CallViewModel ViewModel\r\n        {\r\n            get { return DataContext as CallViewModel; }\r\n        }\r\n\r\n        private bool _initState;\r\n\r\n        public CallView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            LayoutRoot.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                if (!_initState)\r\n                {\r\n                    _initState = true;\r\n                    GoToState(ViewModel.ViewState);\r\n                }\r\n                ViewModel.PropertyChanged += ViewModel_PropertyChanged;\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    ViewModel.Signal = IoC.Get<IVoIPService>().GetSignalBarsCount();\r\n                });\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= ViewModel_PropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void ViewModel_PropertyChanged(object sender, PropertyChangedEventArgs args)\r\n        {\r\n            if (Property.NameEquals(args.PropertyName, () => ViewModel.ViewState))\r\n            {\r\n                GoToState(ViewModel.ViewState);\r\n            }\r\n        }\r\n\r\n        public void GoToState(CallViewState state)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"GoToState state=\" + state);\r\n            BottomCommand.IsEnabled = true;\r\n            IgnoreButton.IsEnabled = true;\r\n            VisualStateManager.GoToState(this, state.ToString(), false);\r\n            switch (state)\r\n            {\r\n                    case CallViewState.Call:\r\n                    BottomCommandLabel.Text = AppResources.EndCall;\r\n                    IgnoreButtonLabel.Text = AppResources.Ignore;\r\n                    break;\r\n                    case CallViewState.CallConnecting:\r\n                    BottomCommandLabel.Text = AppResources.EndCall;\r\n                    IgnoreButtonLabel.Text = AppResources.Ignore;\r\n                    break;\r\n                    case CallViewState.IncomingCall:\r\n                    BottomCommandLabel.Text = AppResources.Answer;\r\n                    IgnoreButtonLabel.Text = AppResources.Ignore;\r\n                    break;\r\n                    case CallViewState.IncomingCallBusy:\r\n                    BottomCommandLabel.Text = AppResources.Answer;\r\n                    IgnoreButtonLabel.Text = AppResources.Ignore;\r\n                    break;\r\n                    case CallViewState.OutgoingCall:\r\n                    BottomCommandLabel.Text = AppResources.Cancel;\r\n                    IgnoreButtonLabel.Text = AppResources.Ignore;\r\n                    break;\r\n                    case CallViewState.OutgoingCallBusy:\r\n                    BottomCommandLabel.Text = AppResources.Call;\r\n                    IgnoreButtonLabel.Text = AppResources.Cancel;\r\n                    break;\r\n            }\r\n        }\r\n\r\n        private void EmojisPanel_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var expanded = EmojisTransform.TranslateX == 0.0;\r\n            var scaleX = expanded ? 2.5 : 1.0;\r\n            var scaleY = expanded ? 2.5 : 1.0;\r\n            var labelOpacity = expanded ? 1.0 : 0.0;\r\n\r\n            var pointFrom = EmojisPanel.TransformToVisual(this).Transform(new Point(EmojisPanel.ActualWidth / 2.0, EmojisPanel.ActualHeight / 2.0));\r\n            var pointTo = EmojiKeyLabel.TransformToVisual(this).Transform(new Point(EmojiKeyLabel.ActualWidth / 2.0, 0.0 - EmojisPanel.ActualHeight * scaleY));//new Point(480.0/2.0, 800.0/2.0);\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateX = expanded ? pointTo.X - pointFrom.X : 0.0;\r\n            var translateXAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = translateX });\r\n            Storyboard.SetTargetProperty(translateXAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(translateXAnimation);\r\n\r\n            var translateY = expanded ? pointTo.Y - pointFrom.Y : 0.0;\r\n            var translateYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = translateY });\r\n            Storyboard.SetTargetProperty(translateYAnimation, new PropertyPath(\"TranslateY\"));\r\n            storyboard.Children.Add(translateYAnimation);\r\n\r\n            var scaleXAnimation = new DoubleAnimationUsingKeyFrames();\r\n            scaleXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = scaleX });\r\n            Storyboard.SetTargetProperty(scaleXAnimation, new PropertyPath(\"ScaleX\"));\r\n            storyboard.Children.Add(scaleXAnimation);\r\n\r\n            var scaleYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            scaleYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = scaleY });\r\n            Storyboard.SetTargetProperty(scaleYAnimation, new PropertyPath(\"ScaleY\"));\r\n            storyboard.Children.Add(scaleYAnimation);\r\n\r\n            var labelOpacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            labelOpacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = labelOpacity });\r\n            Storyboard.SetTargetProperty(labelOpacityAnimation, new PropertyPath(\"Opacity\"));\r\n            Storyboard.SetTarget(labelOpacityAnimation, EmojiKeyLabel);\r\n            storyboard.Children.Add(labelOpacityAnimation);\r\n\r\n            var backgroundOpacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            backgroundOpacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = labelOpacity });\r\n            Storyboard.SetTargetProperty(backgroundOpacityAnimation, new PropertyPath(\"Opacity\"));\r\n            Storyboard.SetTarget(backgroundOpacityAnimation, PhotoBorder);\r\n            storyboard.Children.Add(backgroundOpacityAnimation);\r\n\r\n            Storyboard.SetTarget(storyboard, EmojisTransform);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void Speaker_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SwitchSpeaker(true);\r\n        }\r\n\r\n        private void Speaker_OnUnchecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.SwitchSpeaker(false);\r\n        }\r\n\r\n        private void Mute_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.Mute(true);\r\n        }\r\n\r\n        private void Mute_OnUnchecked(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.Mute(false);\r\n        }\r\n    }\r\n\r\n    public enum CallViewState\r\n    {\r\n        Call,\r\n        CallConnecting,\r\n        OutgoingCall,\r\n        OutgoingCallBusy,\r\n        IncomingCall,\r\n        IncomingCallBusy\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/CallsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Calls.CallsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:controls1=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:triggers=\"clr-namespace:Telegram.Controls.Triggers;assembly=Telegram.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    Visibility=\"{Binding Visibility}\"\r\n    x:Name=\"Main\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <DataTemplate x:Key=\"DialogTemplate\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"18,24,20,0\" Height=\"72\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\">\r\n                    <Grid.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </Grid.RenderTransform>\r\n                    \r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Items}\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [DeleteDialog($DataContext)]\" Header=\"{Binding Resources.Delete, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                    <Grid Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"3,3,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <Grid Grid.Column=\"1\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <TextBlock\r\n                                navigation:AnimatedBasePage.IsAnimationTarget=\"True\"\r\n                                Margin=\"14,-2,0,-1\" FontSize=\"27\" MaxHeight=\"36\"\r\n                                Text=\"{Binding With, Converter={StaticResource DialogCaptionConverter}}\" \r\n                                Foreground=\"{Binding ForegroundBrush}\"\r\n                                Style=\"{StaticResource PhoneTextExtraLargeStyle}\"/>\r\n\r\n                            <Image \r\n                                Width=\"19\" Height=\"19\"\r\n                                Grid.Column=\"1\" \r\n                                Visibility=\"{Binding VerifiedVisibility}\"\r\n                                HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\"\r\n                                Margin=\"6,0,0,5\"\r\n                                Source=\"/Images/W10M/ic_verification_2x.png\" Stretch=\"UniformToFill\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n\r\n                    <Grid Grid.Row=\"1\" Grid.Column=\"1\" VerticalAlignment=\"Top\" Margin=\"18,3,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <TextBlock Grid.Column=\"2\"\r\n                                Margin=\"0\"\r\n                                Text=\"{Binding Self, Converter={StaticResource DialogToBriefInfo}}\"\r\n                                Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n                                TextWrapping=\"NoWrap\"\r\n                                TextTrimming=\"WordEllipsis\"/>\r\n                    </Grid>\r\n                </Grid>\r\n            </DataTemplate>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" Margin=\"-12,0,-14,0\">\r\n        <controls1:LazyListBox \r\n            x:Name=\"Items\"\r\n            ItemsSource=\"{Binding Items}\"\r\n            ItemTemplate=\"{StaticResource DialogTemplate}\"\r\n            IsScrolling=\"{Binding IsScrolling, Mode=TwoWay}\"\r\n            CloseToEndPercent=\"0.1\"\r\n            CloseToEnd=\"Items_OnCloseToEnd\"\r\n            ScrollingStateChanged=\"Items_OnManipulationStarted\"\r\n            ManipulationCompleted=\"Items_OnManipulationCompleted\"\r\n            Style=\"{StaticResource LazyListBoxStyle}\">\r\n            <controls1:LazyListBox.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                </ItemsPanelTemplate>\r\n            </controls1:LazyListBox.ItemsPanel>\r\n            <i:Interaction.Triggers>\r\n                <triggers:CompressionTrigger CompressionType=\"Bottom\">\r\n                    <micro:ActionMessage MethodName=\"LoadNextSlice\"/>\r\n                </triggers:CompressionTrigger>\r\n            </i:Interaction.Triggers>\r\n        </controls1:LazyListBox>\r\n\r\n        <TextBlock Margin=\"18,12,6,0\" Text=\"{Binding Status}\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/CallsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.ViewModels.Calls;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Calls\r\n{\r\n    public partial class CallsView\r\n    {\r\n        public CallsViewModel ViewModel\r\n        {\r\n            get { return DataContext as CallsViewModel; }\r\n        }\r\n\r\n        public CallsView()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        public FrameworkElement TapedItem;\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            TapedItem = (FrameworkElement) sender;\r\n\r\n            var tapedItemContainer = TapedItem.FindParentOfType<ListBoxItem>();\r\n\r\n            var result = ViewModel.OpenDialogDetails(TapedItem.DataContext as TLDialogBase);\r\n            if (result)\r\n            {\r\n                ShellView.StartContinuumForwardOutAnimation(TapedItem, tapedItemContainer);\r\n            }\r\n        }\r\n\r\n        private void Items_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void Items_OnManipulationStarted(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void Items_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            \r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/ReturnToCallControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Calls.ReturnToCallControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    Height=\"68\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource TelegramBadgeAccentBrush}\">\r\n        <TextBlock Text=\"{Binding Resources.TouchToReturnToCall, Source={StaticResource Strings}}\" Foreground=\"White\" Margin=\"12\" HorizontalAlignment=\"Center\" TextWrapping=\"Wrap\" VerticalAlignment=\"Bottom\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/ReturnToCallControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Calls\r\n{\r\n    public partial class ReturnToCallControl : UserControl\r\n    {\r\n        public ReturnToCallControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/SignalBarsControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Calls.SignalBarsControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"30\" d:DesignWidth=\"30\">\r\n\r\n    <Grid>\r\n        <Border x:Name=\"Bar1\" Opacity=\"0.5\" Margin=\"6,0,0,0\"  HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Width=\"5\" Height=\"5\"  Background=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Border x:Name=\"Bar2\" Opacity=\"0.5\" Margin=\"12,0,0,0\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Width=\"5\" Height=\"10\" Background=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Border x:Name=\"Bar3\" Opacity=\"0.5\" Margin=\"18,0,0,0\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Width=\"5\" Height=\"15\" Background=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <Border x:Name=\"Bar4\" Opacity=\"0.5\" Margin=\"24,0,0,0\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Width=\"5\" Height=\"20\" Background=\"{StaticResource PhoneForegroundBrush}\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Calls/SignalBarsControl.xaml.cs",
    "content": "﻿using System.Windows;\r\n\r\nnamespace TelegramClient.Views.Calls\r\n{\r\n    public partial class SignalBarsControl\r\n    {\r\n        public static readonly DependencyProperty SignalProperty = DependencyProperty.Register(\r\n            \"Signal\", typeof(int), typeof(SignalBarsControl), new PropertyMetadata(OnSignalChanged));\r\n\r\n        private static void OnSignalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as SignalBarsControl;\r\n            if (control != null)\r\n            {\r\n                var signal = (int) e.NewValue;\r\n\r\n                control.Bar1.Opacity = signal >= 1 ? 1.0 : 0.5;\r\n                control.Bar2.Opacity = signal >= 2 ? 1.0 : 0.5;\r\n                control.Bar3.Opacity = signal >= 3 ? 1.0 : 0.5;\r\n                control.Bar4.Opacity = signal >= 4 ? 1.0 : 0.5;\r\n            }\r\n        }\r\n\r\n        public int Signal\r\n        {\r\n            get { return (int) GetValue(SignalProperty); }\r\n            set { SetValue(SignalProperty, value); }\r\n        }\r\n\r\n        public SignalBarsControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Chats/GroupStickersView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Chats.GroupStickersView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:navigation=\"clr-namespace:TelegramClient.Animation.Navigation\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    x:Name=\"Main\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition EndTransition=\"ForwardTransition_OnEndTransition\">\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"NotFoundItemTemplate\">\r\n            <Grid x:Name=\"MainItemGrid\" Margin=\"24,6,24,6\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"64\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Border Width=\"40\" Height=\"40\" Margin=\"12\" Background=\"{StaticResource PhoneSubtleBrush}\">\r\n                    <Border.OpacityMask>\r\n                        <ImageBrush ImageSource=\"/Images/W10M/ic_sadsticker_2x.png\"/>\r\n                    </Border.OpacityMask>\r\n                </Border>\r\n                <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"14,-2,0,0\" Background=\"Transparent\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"0,-6,0,0\" Text=\"{Binding Resources.NoStickerSetFound, Source={StaticResource Strings}}\" MaxHeight=\"42.56\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"1,-4,0,0\" Text=\"{Binding Resources.NoStickerSetFoundSubtitle, Source={StaticResource Strings}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n        <DataTemplate x:Key=\"SetItemTemplate\">\r\n            <Grid x:Name=\"MainItemGrid\" Margin=\"24,6,24,6\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"64\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Border Width=\"64\" Height=\"64\">\r\n                    <Grid>\r\n                        <Image CacheMode=\"BitmapCache\" Source=\"{Binding Stickers[0].Self, Converter={StaticResource DefaultPhotoConverter}, ConverterParameter=64}\"/>\r\n                    </Grid>\r\n                </Border>\r\n                <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"14,-2,0,0\" Background=\"Transparent\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"0,-6,0,0\" navigation:AnimatedBasePage.IsAnimationTarget=\"True\" Text=\"{Binding Title}\" MaxHeight=\"42.56\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Margin=\"1,-4,0,0\" Text=\"{Binding Converter={StaticResource StickerSetToCountStringConverter}}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </Grid>\r\n            </Grid>\r\n        </DataTemplate>\r\n        <Style x:Key=\"TextBoxStyle1\" TargetType=\"TextBox\">\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"27\"/>\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"SelectionBackground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n            <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"Padding\" Value=\"2\"/>\r\n            <Setter Property=\"CaretBrush\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"TextBox\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"ReadOnly\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\"/>\r\n                                    <VisualState x:Name=\"Unfocused\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"MainBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\"/>\r\n                            <Border x:Name=\"ReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\"/>\r\n                            <Border BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <Grid>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <TextBlock Text=\"t.me/addstickers/\"/>\r\n                                    <ContentControl Grid.Column=\"1\" x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\"/>\r\n                                </Grid>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        \r\n        <chats:StickerSetTemplateSelector\r\n            x:Key=\"StickerSetTemplateSelector\"\r\n            StickerSetTemplate=\"{StaticResource SetItemTemplate}\"\r\n            NotFoundStickerSetTemplate=\"{StaticResource NotFoundItemTemplate}\"/>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.GroupStickers, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <longListSelector:LongListSelector\r\n            toolkit:TiltEffect.SuppressTilt=\"True\"\r\n            Grid.Row=\"1\"\r\n            Grid.RowSpan=\"2\"\r\n            Margin=\"0\" \r\n            ItemsSource=\"{Binding Items}\"\r\n            IsFlatList=\"True\"\r\n            Background=\"Transparent\"\r\n            ScrollingStarted=\"LongListSelector_OnScrollingStarted\">\r\n            <longListSelector:LongListSelector.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <VirtualizingStackPanel VirtualizationMode=\"Recycling\"/>\r\n                </ItemsPanelTemplate>\r\n            </longListSelector:LongListSelector.ItemsPanel>\r\n            <longListSelector:LongListSelector.ListHeaderTemplate>\r\n                <DataTemplate>\r\n                    <StackPanel Margin=\"6,0\" DataContext=\"{Binding DataContext, ElementName=Main}\">\r\n                        <Grid>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <TextBox Text=\"{Binding Text, Mode=TwoWay}\" Loaded=\"SearchBox_OnLoaded\" TextChanged=\"TextBox_OnTextChanged\" Style=\"{StaticResource TextBoxStyle1}\">\r\n                                <i:Interaction.Behaviors>\r\n                                    <behaviors:UpdateTextBindingBehavior/>\r\n                                </i:Interaction.Behaviors>\r\n                            </TextBox>\r\n                            <Border Grid.Column=\"1\" Loaded=\"RemoveButton_OnLoaded\"  micro:Message.Attach=\"[Event Tap] = [Action Remove]\" Margin=\"6,6,12,0\" VerticalAlignment=\"Center\" Background=\"{StaticResource PhoneForegroundBrush}\" Width=\"32\" Height=\"32\">\r\n                                <Border.OpacityMask>\r\n                                    <ImageBrush ImageSource=\"/Images/W10M/ic_cancel_2x.png\"/>\r\n                                </Border.OpacityMask>\r\n                            </Border>\r\n                        </Grid>\r\n                        <Grid Background=\"Transparent\" Margin=\"-12,0,-12,0\" micro:Message.Attach=\"[Event Tap] = [Action Open]\" Visibility=\"{Binding StickerSet, Converter={StaticResource ExistsToVisibilityConverter}}\">\r\n                            <ContentControl HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" Content=\"{Binding StickerSet}\" ContentTemplate=\"{Binding StickerSet, Converter={StaticResource StickerSetTemplateSelector}}\"/>\r\n                        </Grid>\r\n                        <TextBlock Text=\"{Binding Resources.CreateStickerSetHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,20,12,-5\"/>\r\n                        <TextBlock Text=\"{Binding Resources.ChooseFromYourStickers, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\" Margin=\"12,20,12,10\"/>\r\n                    </StackPanel>\r\n                </DataTemplate>\r\n            </longListSelector:LongListSelector.ListHeaderTemplate>\r\n            <longListSelector:LongListSelector.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Grid Margin=\"-6,0\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action Set($DataContext)]\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <ContentControl HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" Content=\"{Binding}\" ContentTemplate=\"{StaticResource SetItemTemplate}\"/>\r\n                        <Border Grid.Column=\"1\" Margin=\"20\" Visibility=\"{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}\" VerticalAlignment=\"Top\" Background=\"{StaticResource TelegramBadgeAccentBrush}\" Width=\"32\" Height=\"32\">\r\n                            <Border.OpacityMask>\r\n                                <ImageBrush x:Name=\"ImageBrush\" ImageSource=\"/Images/W10M/ic_done_2x.png\"/>\r\n                            </Border.OpacityMask>\r\n                        </Border>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </longListSelector:LongListSelector.ItemTemplate>\r\n        </longListSelector:LongListSelector>\r\n        \r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"2\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n        <Grid x:Name=\"Bar\" Grid.Row=\"3\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform/>\r\n            </Grid.RenderTransform>\r\n            <controls1:TelegramApplicationBar\r\n                x:Name=\"AppBar\"\r\n                VerticalAlignment=\"Bottom\"\r\n                MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                <controls1:TelegramApplicationBar.Buttons>\r\n                    <controls1:TelegramAppBarButton\r\n                        IsEnabled=\"True\"\r\n                        Grid.Column=\"3\" \r\n                        Tap=\"DoneButton_OnClick\"\r\n                        ImageSource=\"/Images/W10M/ic_done_2x.png\"\r\n                        Text=\"{Binding Resources.Done, Source={StaticResource Strings}}\"/>\r\n                </controls1:TelegramApplicationBar.Buttons>\r\n            </controls1:TelegramApplicationBar>\r\n        </Grid>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Chats/GroupStickersView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.ViewModels.Chats;\r\n\r\nnamespace TelegramClient.Views.Chats\r\n{\r\n    public partial class GroupStickersView\r\n    {\r\n        public GroupStickersViewModel ViewModel\r\n        {\r\n            get { return DataContext as GroupStickersViewModel; }\r\n        }\r\n\r\n        public GroupStickersView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private TextBox _searchBox;\r\n\r\n        private Border _removeButton;\r\n\r\n        private void ForwardTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_once)\r\n            {\r\n                _once = true;\r\n                ViewModel.ForwardInAnimationComplete();\r\n            }\r\n        }\r\n\r\n        private void DoneButton_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n\r\n        private void Remove_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.Remove();\r\n        }\r\n\r\n        private void TextBox_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            if (_removeButton == null) return;\r\n            if (_searchBox == null) return;\r\n\r\n            _removeButton.Visibility = string.IsNullOrEmpty(_searchBox.Text) ? Visibility.Collapsed : Visibility.Visible;\r\n        }\r\n\r\n        private void LongListSelector_OnScrollingStarted(object sender, System.EventArgs e)\r\n        {\r\n            if (_searchBox == null) return;\r\n\r\n            var focusedElement = FocusManager.GetFocusedElement();\r\n            if (focusedElement == _searchBox)\r\n            {\r\n                Main.Focus();\r\n            }\r\n        }\r\n\r\n        private void SearchBox_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            _searchBox = sender as TextBox;\r\n        }\r\n\r\n        private void RemoveButton_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            _removeButton = sender as Border;\r\n        }\r\n\r\n        public void MoveCursorToEnd()\r\n        {\r\n            if (_searchBox == null) return;\r\n\r\n            _searchBox.Select(_searchBox.Text.Length, 0);\r\n        }\r\n    }\r\n\r\n    public class StickerSetTemplateSelector : IValueConverter\r\n    {\r\n        public DataTemplate StickerSetTemplate { get; set; }\r\n\r\n        public DataTemplate NotFoundStickerSetTemplate { get; set; }\r\n\r\n        public DataTemplate EmptyStickerSetTemplate { get; set; }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value is TLStickerSet32)\r\n            {\r\n                return StickerSetTemplate;\r\n            }\r\n            if (value is TLStickerSetNotFound)\r\n            {\r\n                return NotFoundStickerSetTemplate;\r\n            }\r\n\r\n            return EmptyStickerSetTemplate;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Contacts/ShareContactDetailsView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Contacts.ShareContactDetailsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:contacts=\"clr-namespace:TelegramClient.Views.Contacts\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    toolkit:TiltEffect.SuppressTilt=\"True\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\"\r\n    x:Name=\"Main\">\r\n\r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <contacts:UserPhoneKindToStringConverter x:Key=\"UserPhoneKindToStringConverter\"/>\r\n            \r\n            <Style x:Key=\"ButtonStyle1\" TargetType=\"Button\">\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                <Setter Property=\"FontSize\" Value=\"23\"/>\r\n                <Setter Property=\"FontWeight\" Value=\"Normal\"/>\r\n                <Setter Property=\"Margin\" Value=\"12,-12\"/>\r\n                <Setter Property=\"VerticalAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"Padding\" Value=\"15,3,15,5\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"Button\">\r\n                            <Grid Background=\"Transparent\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Pressed\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0.7\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                    <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"32\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Grid Grid.Row=\"1\" Margin=\"6,18,6,0\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n\r\n            <views:ConversationTileControl\r\n\t\t\t\tMargin=\"12,0,0,0\" \r\n                Size=\"100\"\r\n                Fill=\"{Binding CurrentItem.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                Text=\"{Binding CurrentItem, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                Source=\"{Binding CurrentItem.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n\r\n            <StackPanel Grid.Column=\"1\" VerticalAlignment=\"Center\">\r\n                <TextBlock Margin=\"24,0,0,0\" Text=\"{Binding CurrentItem.FullName2}\" FontSize=\"30\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n        <ListBox Grid.Row=\"2\" Margin=\"6,24,6,0\" ItemsSource=\"{Binding Items}\">\r\n            <ListBox.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Button toolkit:TiltEffect.SuppressTilt=\"True\" Tap=\"PhoneButton_OnTap\" Margin=\"-12,0\" HorizontalAlignment=\"Stretch\" Style=\"{StaticResource WhiteProfileButtonStyle}\">\r\n                        <Grid HorizontalAlignment=\"Stretch\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid Width=\"32\" Height=\"32\" Margin=\"12,3\" VerticalAlignment=\"Top\">\r\n                                <Border Width=\"32\" Height=\"32\" Background=\"{StaticResource PhoneForegroundBrush}\" Visibility=\"{Binding IsIconVisible, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                                    <Border.OpacityMask>\r\n                                        <ImageBrush ImageSource=\"/Images/W10M/ic_phone_2x.png\"/>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                            </Grid>\r\n                            <StackPanel Grid.Column=\"1\">\r\n                                <TextBlock Margin=\"10,0,12,0\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Text=\"{Binding Number, Converter={StaticResource SimplePhoneNumberConverter}}\"/>\r\n                                <TextBlock Margin=\"12,2,12,0\" Style=\"{StaticResource PhoneTextNormalStyle}\" Text=\"{Binding Kind, Converter={StaticResource UserPhoneKindToStringConverter}}\" Foreground=\"White\" Opacity=\"0.6\"/>\r\n                            </StackPanel>\r\n                            <CheckBox Grid.Column=\"2\" Visibility=\"{Binding DataContext.ShareVisibility, ElementName=Main}\" IsHitTestVisible=\"False\" IsChecked=\"{Binding IsSelected}\" Margin=\"0,0,-12,0\"/>\r\n                        </Grid>\r\n                    </Button>\r\n                </DataTemplate>\r\n            </ListBox.ItemTemplate>\r\n        </ListBox>\r\n\r\n        <Border x:Name=\"ValidatePanel\" Grid.Row=\"3\" Height=\"72\" Background=\"{StaticResource TelegramBadgeAccentBrush}\">\r\n            <Button x:Name=\"Send\" FontWeight=\"SemiBold\" Foreground=\"White\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" Content=\"{Binding ActionString, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ButtonStyle1}\"/>\r\n        </Border>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Contacts/ShareContactDetailsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media.Animation;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Contacts;\r\n\r\nnamespace TelegramClient.Views.Contacts\r\n{\r\n    public partial class ShareContactDetailsView\r\n    {\r\n        public ShareContactDetailsViewModel ViewModel\r\n        {\r\n            get { return DataContext as ShareContactDetailsViewModel; }\r\n        }\r\n\r\n        public ShareContactDetailsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            LayoutRoot.Opacity = 0.0;\r\n\r\n            Loaded += SearchShellView_Loaded;\r\n        }\r\n\r\n        public Action<Visibility> ClosePivotAction;\r\n\r\n        public void SearchShellView_Loaded(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= SearchShellView_Loaded;\r\n\r\n            BeginOpenStoryboard(true);\r\n        }\r\n\r\n        private Storyboard _openStoryboard;\r\n\r\n        public void BeginOpenStoryboard(bool initialize = false)\r\n        {\r\n            LayoutRoot.Opacity = 0.0;\r\n\r\n            var translateYTo = 150.0;\r\n            var duration = TimeSpan.FromSeconds(0.4);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = duration,\r\n                Value = 0.0,\r\n                EasingFunction = easingFunction\r\n            });\r\n            Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = duration,\r\n                Value = 1.0,\r\n                EasingFunction = easingFunction\r\n            });\r\n            Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            storyboard.Completed += (o, args) =>\r\n            {\r\n                ViewModel.ForwardInAnimationComplete();\r\n                ClosePivotAction.SafeInvoke(Visibility.Collapsed);\r\n            };\r\n            _openStoryboard = storyboard;\r\n\r\n            ViewModel.ForwardInAnimationBegin();\r\n            Execute.BeginOnUIThread(storyboard.Begin);\r\n        }\r\n\r\n        public void BeginCloseStoryboard(Action callback = null)\r\n        {\r\n            if (_openStoryboard.GetCurrentState() == ClockState.Active)\r\n            {\r\n                _openStoryboard.Pause();\r\n            }\r\n\r\n            ClosePivotAction.SafeInvoke(Visibility.Visible);\r\n            //LayoutRoot.Background = (Brush)Application.Current.Resources[\"PhoneBackgroundBrush\"];\r\n\r\n            var translateYTo = 150.0;\r\n            var duration = TimeSpan.FromSeconds(0.3);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = duration,\r\n                Value = translateYTo,\r\n                EasingFunction = easingFunction\r\n            });\r\n            Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame\r\n            {\r\n                KeyTime = duration,\r\n                Value = 0.0,\r\n                EasingFunction = easingFunction\r\n            });\r\n            Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            if (callback != null)\r\n            {\r\n                storyboard.Completed += (o, e) => callback();\r\n            }\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                storyboard.Begin();\r\n            });\r\n        }\r\n\r\n        private void PhoneButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (ViewModel.Mode == ShareContactDetailsMode.Share)\r\n            {\r\n                var element = sender as FrameworkElement;\r\n                if (element != null)\r\n                {\r\n                    var userPhone = element.DataContext as TLUserPhone;\r\n                    if (userPhone != null)\r\n                    {\r\n                        userPhone.IsSelected = !userPhone.IsSelected;\r\n\r\n                        foreach (var item in ViewModel.Items)\r\n                        {\r\n                            var currentUserPhone = item as TLUserPhone;\r\n                            if (currentUserPhone != null && currentUserPhone != userPhone)\r\n                            {\r\n                                currentUserPhone.IsSelected = false;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                Send.IsEnabled = ViewModel.IsSharingEnabled;\r\n            }\r\n            else\r\n            {\r\n                var element = sender as FrameworkElement;\r\n                if (element != null)\r\n                {\r\n                    var userPhone = element.DataContext as TLUserPhone;\r\n                    if (userPhone != null)\r\n                    {\r\n                        ViewModel.Call(userPhone);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    public class UserPhoneKindToStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var kind = value as TLInt;\r\n            if (kind != null)\r\n            {\r\n                switch (kind.Value)\r\n                {\r\n                    case 0:\r\n                        return AppResources.PhoneKindHome;\r\n                    case 1:\r\n                        return AppResources.PhoneKindMobile;\r\n                    case 2:\r\n                        return AppResources.PhoneKindWork;\r\n                    case 3:\r\n                        return AppResources.PhoneKindOther;\r\n                }\r\n            }\r\n\r\n            return AppResources.PhoneKindMobile;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/CameraControl.xaml",
    "content": "﻿<UserControl\r\n    x:Class=\"TelegramClient.Views.Controls.CameraPage\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    shell:SystemTray.IsVisible=\"False\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"CancelForeground\" Color=\"#FFCD7C83\"/>\r\n\r\n        <Style x:Key=\"ButtonStyle3\" TargetType=\"Button\">\r\n            <Setter Property=\"Width\" Value=\"72\"/>\r\n            <Setter Property=\"Height\" Value=\"72\"/>\r\n            <Setter Property=\"Margin\" Value=\"14\"/>\r\n            <Setter Property=\"Background\" Value=\"#66000000\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"10,5,10,6\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Gray\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"36\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"ButtonStyle2\" TargetType=\"Button\">\r\n            <Setter Property=\"Width\" Value=\"72\"/>\r\n            <Setter Property=\"Height\" Value=\"72\"/>\r\n            <Setter Property=\"Margin\" Value=\"14\"/>\r\n            <Setter Property=\"Background\" Value=\"White\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"10,5,10,6\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Gray\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"36\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"ButtonStyle1\" TargetType=\"Button\">\r\n            <Setter Property=\"Width\" Value=\"120\"/>\r\n            <Setter Property=\"Height\" Value=\"120\"/>\r\n            <Setter Property=\"Margin\" Value=\"0\"/>\r\n            <Setter Property=\"Background\" Value=\"White\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"10,5,10,6\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneButtonBasePressedForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Gray\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"48\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Black\">\r\n\r\n        <Grid x:Name=\"ContentPanel\">\r\n            <Border x:Name=\"Preview\" Tap=\"Preview_OnTap\" ManipulationDelta=\"Preview_OnManipulationDelta\" Grid.RowSpan=\"2\" BorderBrush=\"GreenYellow\" BorderThickness=\"0\" Width=\"800\" Height=\"480\" Margin=\"-160\" RenderTransformOrigin=\"0.5, 0.5\">\r\n                <Border.RenderTransform>\r\n                    <CompositeTransform x:Name=\"Transform\" Rotation=\"90\" ScaleX=\"1.0\" ScaleY=\"1.0\"/>\r\n                </Border.RenderTransform>\r\n            </Border>\r\n\r\n            <Border x:Name=\"Focus\" HorizontalAlignment=\"Left\" RenderTransformOrigin=\"0.5, 0.5\" VerticalAlignment=\"Top\" BorderThickness=\"1\" Width=\"100\" Height=\"100\" BorderBrush=\"White\" CornerRadius=\"50\" Background=\"Transparent\" Tap=\"Focus_OnTap\" Visibility=\"Visible\">\r\n                <Border.RenderTransform>\r\n                    <CompositeTransform x:Name=\"FocusTransform\"/>\r\n                </Border.RenderTransform>\r\n            </Border>\r\n\r\n            <TextBlock x:Name=\"TimerLabel\" Margin=\"0\" FontSize=\"10\" Foreground=\"GreenYellow\" TextWrapping=\"Wrap\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" Text=\"Recording...\"/>\r\n\r\n            <Button x:Name=\"FlashButton\" Tag=\"Flash\" RenderTransformOrigin=\"0.5, 0.5\" HorizontalAlignment=\"Right\" Click=\"Flash_OnClick\" Style=\"{StaticResource ButtonStyle3}\">\r\n                <Button.RenderTransform>\r\n                    <CompositeTransform x:Name=\"FlashTransform\"/>\r\n                </Button.RenderTransform>\r\n                <Image x:Name=\"FlashButtonImage\" Source=\"/Images/W10M/ic_flash_auto_2x.png\" Height=\"22\"/>\r\n            </Button>\r\n\r\n            <Grid x:Name=\"ButtonsPanel\" RenderTransformOrigin=\"0.5, 0.5\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Center\" CacheMode=\"BitmapCache\">\r\n                <Grid.RenderTransform>\r\n                    <CompositeTransform x:Name=\"ButtonsPanelTransform\" TranslateY=\"0\"/>\r\n                </Grid.RenderTransform>\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition/>\r\n                    <RowDefinition/>\r\n                </Grid.RowDefinitions>\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition/>\r\n                </Grid.ColumnDefinitions>\r\n                <TextBlock x:Name=\"ProgressText\" RenderTransformOrigin=\"0.5 0.5\" CacheMode=\"BitmapCache\" Text=\"00:00\" FontSize=\"45\" Foreground=\"White\" Grid.ColumnSpan=\"3\" Margin=\"-8\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\">\r\n                    <TextBlock.RenderTransform>\r\n                        <CompositeTransform x:Name=\"ProgressTextTransform\" />\r\n                    </TextBlock.RenderTransform>\r\n                </TextBlock>\r\n\r\n                <Button x:Name=\"SwitchModeButton\" Tag=\"SwitchMode\" RenderTransformOrigin=\"0.5, 0.5\" Grid.Column=\"0\" Grid.Row=\"1\" Click=\"SwitchMode_OnClick\" Style=\"{StaticResource ButtonStyle2}\">\r\n                    <Button.RenderTransform>\r\n                        <RotateTransform x:Name=\"SwitchModeTransform\"/>\r\n                    </Button.RenderTransform>\r\n                    <Image x:Name=\"SwitchModeImage\" Source=\"/Images/W10M/ic_camera_video_2x.png\" Width=\"26\"/>\r\n                </Button>\r\n                <Border x:Name=\"ProgressCircle\" Grid.Column=\"1\" Grid.Row=\"1\" RenderTransformOrigin=\"0.5, 0.5\" IsHitTestVisible=\"False\" Width=\"140\" Height=\"140\" Background=\"#4DFFFFFF\" CornerRadius=\"70\" Margin=\"14\">\r\n                    <Border.RenderTransform>\r\n                        <RotateTransform x:Name=\"ProgressCircleTransform\"/>\r\n                    </Border.RenderTransform>\r\n                    <controls:ProgressPieSlice x:Name=\"ProgressRing\" Radius=\"64\" StartAngle=\"0\" Angle=\"0\" Stroke=\"#FF96DEFF\" StrokeThickness=\"4\" CacheMode=\"BitmapCache\"/>\r\n                </Border>\r\n                <Button Grid.Column=\"1\" Grid.Row=\"1\" x:Name=\"RecordButton\" Tag=\"Record\" \r\n                        Click=\"RecordButton_OnClick\" \r\n                        ManipulationDelta=\"RecordButton_OnManipulationDelta\"\r\n                        MouseLeave=\"RecordButton_OnMouseLeave\" \r\n                        Hold=\"RecordButton_OnHold\" \r\n                        RenderTransformOrigin=\"0.5, 0.5\"\r\n                        Style=\"{StaticResource ButtonStyle1}\">\r\n                    <Button.RenderTransform>\r\n                        <RotateTransform x:Name=\"RecordTransform\"/>\r\n                    </Button.RenderTransform>\r\n\r\n                    <Border x:Name=\"Overlay\" Background=\"Transparent\" CornerRadius=\"48\" Width=\"96\" Height=\"96\" Margin=\"-12\">\r\n                        <Image x:Name=\"RecordImage\" Source=\"/Images/W10M/ic_camera_photo_2x.png\" Width=\"32\"/>\r\n                    </Border>\r\n                </Button>\r\n                <Button x:Name=\"SwitchCameraButton\"\r\n                        ManipulationCompleted=\"SwitchCameraButton_OnManipulationCompleted\"\r\n                        MouseLeave=\"SwitchCameraButton_OnMouseLeave\"\r\n                        RenderTransformOrigin=\"0.5, 0.5\" Tag=\"SwitchCamera\" Grid.Column=\"2\" Grid.Row=\"1\" Click=\"Switch_OnClick\" Style=\"{StaticResource ButtonStyle2}\">\r\n                    <Button.RenderTransform>\r\n                        <RotateTransform x:Name=\"SwitchCameraTransform\"/>\r\n                    </Button.RenderTransform>\r\n                    <Image Source=\"/Images/W10M/ic_camera_switch_2x.png\" Width=\"26\" Height=\"20\"/>\r\n                </Button>\r\n            </Grid>\r\n        </Grid>\r\n        <Border x:Name=\"BottomBorder\" MinHeight=\"73\" MinWidth=\"73\" Background=\"Black\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <TranslateTransform x:Name=\"BottomBorderTranslate\" Y=\"72\"/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/CameraControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing System.Windows.Threading;\r\nusing Windows.Devices.Enumeration;\r\nusing Windows.Foundation;\r\nusing Windows.Graphics.Display;\r\nusing Windows.Graphics.Imaging;\r\nusing Windows.Media.Capture;\r\nusing Windows.Media.Devices;\r\nusing Windows.Media.MediaProperties;\r\nusing Windows.Phone.Media.Capture;\r\nusing Windows.Storage;\r\nusing Windows.Storage.AccessCache;\r\nusing Windows.Storage.Streams;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Devices;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Microsoft.Xna.Framework;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\nusing MediaStreamType = Windows.Media.Capture.MediaStreamType;\r\nusing Point = Windows.Foundation.Point;\r\nusing Rect = Windows.Foundation.Rect;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class CameraPage\r\n    {\r\n        public event EventHandler<FileEventArgs> VideoCaptured;\r\n\r\n        protected virtual void RaiseVideoCaptured(FileEventArgs e)\r\n        {\r\n            var handler = VideoCaptured;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public event EventHandler<FileEventArgs> PhotoCaptured;\r\n\r\n        protected virtual void RaisePhotoCaptured(FileEventArgs e)\r\n        {\r\n            var handler = PhotoCaptured;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private bool _mediaCaptureManagerInitialized;\r\n\r\n        private LowLagPhotoCapture _lowLagPhotoCapture;\r\n\r\n        private LowLagMediaRecording _lowLagMediaRecording;\r\n\r\n        private MediaCapture _mediaCaptureManager;\r\n\r\n        private MediaCapturePreviewSink _previewSink;\r\n\r\n        private MediaEncodingProfile _currentProfile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.HD720p);\r\n\r\n        private PageOrientation _previousOrientation;\r\n\r\n        public CameraPage()\r\n        {\r\n            InitializeComponent();\r\n\r\n            // Sample code to localize the ApplicationBar\r\n            //BuildLocalizedApplicationBar();\r\n\r\n            _timer.Tick += TimerOnTick;\r\n\r\n            LayoutUpdated += OnLayoutUpdated;\r\n\r\n            _previousOrientation = PageOrientation.PortraitUp;\r\n            Loaded += (sender, args) =>\r\n            {\r\n                CameraButtons.ShutterKeyPressed += CameraButtonsOnShutterKeyPressed;\r\n                CameraButtons.ShutterKeyHalfPressed += CameraButtonsOnShutterKeyHalfPressed;\r\n                //Windows.Graphics.Display.DisplayOrientations.\r\n                DisplayProperties.OrientationChanged += DisplayProperties_OrientationChanged;\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                CameraButtons.ShutterKeyPressed -= CameraButtonsOnShutterKeyPressed;\r\n                CameraButtons.ShutterKeyHalfPressed -= CameraButtonsOnShutterKeyHalfPressed;\r\n                DisplayProperties.OrientationChanged -= DisplayProperties_OrientationChanged;\r\n            };\r\n        }\r\n\r\n        private void DisplayProperties_OrientationChanged(object sender)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"current={0} native={1}\", DisplayProperties.CurrentOrientation, DisplayProperties.NativeOrientation);\r\n        }\r\n\r\n        ~CameraPage()\r\n        {\r\n            \r\n        }\r\n\r\n        public static readonly DependencyProperty ParentPageOrientationProperty = DependencyProperty.Register(\r\n            \"ParentPageOrientation\", typeof (PageOrientation), typeof (CameraPage), new PropertyMetadata(default(PageOrientation), OnParentPageOrientationChanged));\r\n\r\n        private static void OnParentPageOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var cameraPage = d as CameraPage;\r\n            if (cameraPage != null)\r\n            {\r\n                cameraPage.MainPage_OnOrientationChanged(cameraPage, new OrientationChangedEventArgs((PageOrientation)e.NewValue));\r\n            }\r\n        }\r\n\r\n        public PageOrientation ParentPageOrientation\r\n        {\r\n            get { return (PageOrientation) GetValue(ParentPageOrientationProperty); }\r\n            set { SetValue(ParentPageOrientationProperty, value); }\r\n        }\r\n\r\n        private void OnLayoutUpdated(object sender, System.EventArgs e)\r\n        {\r\n            LayoutUpdated -= OnLayoutUpdated;\r\n\r\n            InitializeCameraAsync();\r\n        }\r\n\r\n        private void CameraButtonsOnShutterKeyHalfPressed(object sender, System.EventArgs eventArgs)\r\n        {\r\n            Focus_OnClick(null, null);\r\n        }\r\n\r\n        private void CameraButtonsOnShutterKeyPressed(object sender, System.EventArgs eventArgs)\r\n        {\r\n            RecordButton_OnClick(null, null);\r\n        }\r\n\r\n        private void DisposeInternal()\r\n        {\r\n            _initialized = false;\r\n            if (_mediaCaptureManager != null)\r\n            {\r\n                _mediaCaptureManager.RecordLimitationExceeded -= RecordLimitationExceeded;\r\n                _mediaCaptureManager.Failed -= Failed;\r\n                _mediaCaptureManager.Dispose();\r\n            }\r\n            if (_previewSink != null) _previewSink.Dispose();\r\n\r\n            //Preview.Background = null;\r\n        }\r\n\r\n        private DeviceInformation _frontCamera;\r\n\r\n        private DeviceInformation _rearCamera;\r\n\r\n        private bool _isRearCamera = true;\r\n\r\n        private async Task InitializeCameraAsync()\r\n        {\r\n            RecordButton.IsEnabled = true;\r\n            SwitchModeButton.IsEnabled = true;\r\n            FlashButton.IsEnabled = true;\r\n\r\n            SwitchMode(CameraMode.Photo);\r\n\r\n            Focus.IsHitTestVisible = false;\r\n            Focus.Opacity = 0.0;\r\n            _mediaCaptureManager = new MediaCapture();\r\n\r\n            if (_rearCamera == null && _frontCamera == null)\r\n            {\r\n                var devices = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture);\r\n\r\n                foreach (var device in devices)\r\n                {\r\n                    switch (device.EnclosureLocation.Panel)\r\n                    {\r\n                        case Windows.Devices.Enumeration.Panel.Front:\r\n                            _frontCamera = device;\r\n\r\n                            break;\r\n                        case Windows.Devices.Enumeration.Panel.Back:\r\n                            _rearCamera = device;\r\n\r\n                            break;\r\n                        default:\r\n                            //you can also check for Top, Left, right and Bottom\r\n                            break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (_frontCamera == null || _rearCamera == null)\r\n            {\r\n                SwitchCameraButton.IsEnabled = false;\r\n            }\r\n            if (_isRearCamera && _rearCamera == null)\r\n            {\r\n                _isRearCamera = false;\r\n            }\r\n            if (!_isRearCamera && _frontCamera == null)\r\n            {\r\n                _isRearCamera = true;\r\n            }\r\n\r\n            var currentCamera = _isRearCamera ? _rearCamera : _frontCamera;\r\n\r\n            _mediaCaptureManagerInitialized = false;\r\n\r\n            var photoCaptureSource = PhotoCaptureSource.Auto;\r\n            try\r\n            {\r\n                //if (_isRearCamera)\r\n                //{\r\n                //    throw new Exception(\"Initialization exception\");\r\n                //}\r\n\r\n                var settings = new MediaCaptureInitializationSettings\r\n                {\r\n                    VideoDeviceId = currentCamera.Id,\r\n                    PhotoCaptureSource = photoCaptureSource,\r\n                    //StreamingCaptureMode = StreamingCaptureMode.Video,\r\n                    //AudioDeviceId = \"\"\r\n                    //VideoSource = screenCapture.VideoSource\r\n                };\r\n\r\n                await _mediaCaptureManager.InitializeAsync(settings);\r\n\r\n                _mediaCaptureManagerInitialized = true;\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                HandleCameraException(ex);\r\n            }\r\n\r\n            if (!_mediaCaptureManagerInitialized)\r\n            {\r\n                Preview.Background = null;\r\n                RecordButton.IsEnabled = false;\r\n                SwitchModeButton.IsEnabled = false;\r\n                FlashButton.IsEnabled = false;\r\n                MessageBox.Show(AppResources.AccessCameraException, AppResources.Error, MessageBoxButton.OK);\r\n                return;\r\n            }\r\n\r\n            if (!string.IsNullOrEmpty(_mediaCaptureManager.MediaCaptureSettings.VideoDeviceId)\r\n                && !string.IsNullOrEmpty(_mediaCaptureManager.MediaCaptureSettings.AudioDeviceId))\r\n            {\r\n                //hook into MediaCapture events\r\n                _mediaCaptureManager.RecordLimitationExceeded += RecordLimitationExceeded;\r\n                _mediaCaptureManager.Failed += Failed;\r\n\r\n                //device initialized successfully\r\n            }\r\n            else\r\n            {\r\n                Preview.Background = null;\r\n                RecordButton.IsEnabled = false;\r\n                SwitchModeButton.IsEnabled = false;\r\n                FlashButton.IsEnabled = false;\r\n                MessageBox.Show(AppResources.AccessCameraException, AppResources.Error, MessageBoxButton.OK);\r\n                _mediaCaptureManagerInitialized = false;\r\n                return;\r\n                //no cam found\r\n            }\r\n\r\n            //return;\r\n            // List of supported video preview formats to be used by the default preview format selector.\r\n\r\n            //var previewFormat = _currentProfile.Video;\r\n            var mediaStreamType = MediaStreamType.VideoPreview;\r\n            var previewFormat = GetStreamFormat(_currentProfile.Video, mediaStreamType, true);\r\n\r\n            var scale = previewFormat.Width / Application.Current.Host.Content.ActualHeight;\r\n            var width = Application.Current.Host.Content.ActualHeight;\r\n            var height = previewFormat.Height / scale;\r\n\r\n            Preview.Width = width * 0.75;\r\n            Preview.Height = height * 0.75;\r\n\r\n\r\n            await _mediaCaptureManager.VideoDeviceController.SetMediaStreamPropertiesAsync(mediaStreamType, previewFormat);\r\n\r\n            if (_mediaCaptureManager.MediaCaptureSettings.VideoDeviceCharacteristic != VideoDeviceCharacteristic.AllStreamsIdentical\r\n                && _mediaCaptureManager.MediaCaptureSettings.VideoDeviceCharacteristic != VideoDeviceCharacteristic.PreviewRecordStreamsIdentical\r\n                && _mediaCaptureManager.MediaCaptureSettings.VideoDeviceCharacteristic != VideoDeviceCharacteristic.RecordPhotoStreamsIdentical)\r\n            {\r\n                mediaStreamType = MediaStreamType.VideoRecord;\r\n                var recordFormat = GetStreamFormat(previewFormat, mediaStreamType, true);\r\n                await _mediaCaptureManager.VideoDeviceController.SetMediaStreamPropertiesAsync(mediaStreamType, recordFormat);\r\n\r\n                if (photoCaptureSource != PhotoCaptureSource.VideoPreview)\r\n                {\r\n                    mediaStreamType = MediaStreamType.Photo;\r\n                    recordFormat = GetStreamFormat(previewFormat, mediaStreamType);\r\n                    await _mediaCaptureManager.VideoDeviceController.SetMediaStreamPropertiesAsync(mediaStreamType, recordFormat);\r\n                }\r\n            }\r\n\r\n            //return;\r\n            var previewSink = new MediaCapturePreviewSink();\r\n            _previewSink = previewSink;\r\n            await _mediaCaptureManager.StartPreviewToCustomSinkAsync(new MediaEncodingProfile { Video = previewFormat }, previewSink);\r\n\r\n\r\n            // Set the source of the VideoBrush used for your preview\r\n            var videoBrush = new VideoBrush();\r\n            //videoBrush.Stretch = Stretch.UniformToFill;\r\n            Preview.Background = videoBrush;\r\n\r\n            videoBrush.SetSource(previewSink);\r\n\r\n\r\n            var scaleX = Application.Current.Host.Content.ActualHeight / Preview.Width;\r\n            var scaleY = Application.Current.Host.Content.ActualWidth / Preview.Height;\r\n            var scaleMax = Math.Max(scaleX, scaleY);\r\n            Transform.ScaleX = scaleMax;\r\n            Transform.ScaleY = scaleMax;\r\n\r\n            if (_isRearCamera)\r\n            {\r\n                Transform.ScaleX = Math.Abs(Transform.ScaleX);\r\n            }\r\n            else\r\n            {\r\n                Transform.ScaleX = -Math.Abs(Transform.ScaleX);\r\n            }\r\n\r\n            try\r\n            {\r\n                _flashControlMode = _isRearCamera ? FlashControlMode.Auto : FlashControlMode.Disabled; //GetFlashControlMode(_mediaCaptureManager.VideoDeviceController.FlashControl);\r\n                SwitchFlashControlMode(_flashControlMode, _mediaCaptureManager.VideoDeviceController.FlashControl);\r\n                FlashButton.IsEnabled = _mediaCaptureManager.VideoDeviceController.FlashControl.Supported;\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                HandleCameraException(ex);\r\n            }\r\n\r\n            try\r\n            {\r\n                if (_mediaCaptureManager.VideoDeviceController.FocusControl.Supported)\r\n                {\r\n                    var modes = _mediaCaptureManager.VideoDeviceController.FocusControl.SupportedFocusModes;\r\n                    if (modes.Contains(FocusMode.Continuous))\r\n                    {\r\n                        _mediaCaptureManager.VideoDeviceController.FocusControl.Configure(new FocusSettings\r\n                        {\r\n                            Mode = FocusMode.Continuous,\r\n                            DisableDriverFallback = true\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        _mediaCaptureManager.VideoDeviceController.FocusControl.Configure(new FocusSettings\r\n                        {\r\n                            Mode = FocusMode.Auto\r\n                        });\r\n                    }\r\n\r\n                    await _mediaCaptureManager.VideoDeviceController.FocusControl.FocusAsync();\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                HandleCameraException(ex);\r\n            }\r\n\r\n            try\r\n            {\r\n                _mediaCaptureManager.VideoDeviceController.LowLagPhoto.ThumbnailEnabled = false;\r\n                _lowLagPhotoCapture = await _mediaCaptureManager.PrepareLowLagPhotoCaptureAsync(ImageEncodingProperties.CreateJpeg());\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                HandleCameraException(ex);\r\n            }\r\n        }\r\n\r\n        private static void HandleCameraException(Exception ex)\r\n        {\r\n            TLUtils.WriteException(\"In-App Camera\", ex);\r\n        }\r\n\r\n        private VideoEncodingProperties GetStreamFormat(VideoEncodingProperties encodingProperties, MediaStreamType mediaStreamType, bool debug = false)\r\n        {\r\n            var supportedVideoFormats = new List<string> { \"nv12\", \"rgb32\" };\r\n\r\n            // Find the supported preview format\r\n            var properties = _mediaCaptureManager.VideoDeviceController.GetAvailableMediaStreamProperties(mediaStreamType)\r\n                .OfType<VideoEncodingProperties>()\r\n                .Where(p => p != null && !String.IsNullOrEmpty(p.Subtype) && supportedVideoFormats.Contains(p.Subtype.ToLower()))\r\n                .ToList();\r\n\r\n            if (properties == null || properties.Count == 0) return null;\r\n\r\n            var aspectRatio = (double)encodingProperties.Height / encodingProperties.Width;\r\n            var currentFormat = properties.First();\r\n            var widthDelta = encodingProperties.Width >= currentFormat.Width ? encodingProperties.Width - currentFormat.Width : currentFormat.Width - encodingProperties.Width;\r\n            foreach (var p in properties)\r\n            {\r\n                var propertyRatio = (double)p.Height / p.Width;\r\n                var propertyWidthDelta = encodingProperties.Width >= p.Width ? encodingProperties.Width - p.Width : p.Width - encodingProperties.Width;\r\n                if (Math.Abs(aspectRatio - propertyRatio) <= 0.05\r\n                    && propertyWidthDelta < widthDelta)\r\n                {\r\n                    widthDelta = propertyWidthDelta;\r\n                    currentFormat = p;\r\n                }\r\n            }\r\n\r\n            var builder = new StringBuilder();\r\n            builder.AppendLine(string.Format(\"mediaStreamType={0}\", mediaStreamType));\r\n            builder.AppendLine(string.Format(\"CAPTUREPROFILE={0}x{1} {2} {3}\", encodingProperties.Width, encodingProperties.Height, (double)encodingProperties.Height / encodingProperties.Width, encodingProperties.FrameRate.Numerator / encodingProperties.FrameRate.Denominator));\r\n            foreach (var p in properties)\r\n            {\r\n                builder.AppendLine(string.Format(\"availableFormat={0}x{1} {2} {3}\", p.Width, p.Height, (double)p.Height / p.Width, p.FrameRate.Numerator / p.FrameRate.Denominator));\r\n            }\r\n            builder.AppendLine(string.Format(\"SELECTEDFORMAT={0}x{1} {2} {3}\", currentFormat.Width, currentFormat.Height, (double)currentFormat.Height / currentFormat.Width, currentFormat.FrameRate.Numerator / currentFormat.FrameRate.Denominator));\r\n\r\n            if (debug)\r\n            {\r\n                SetDebugText(builder.ToString(), 45000);\r\n            }\r\n\r\n            DebugWriteLine(\"mediaStreamType={0}\", mediaStreamType);\r\n            DebugWriteLine(\"captureProfile={0}x{1} {2} {3}\", encodingProperties.Width, encodingProperties.Height, (double)encodingProperties.Height / encodingProperties.Width, encodingProperties.FrameRate.Numerator / encodingProperties.FrameRate.Denominator);\r\n            foreach (var p in properties)\r\n            {\r\n                DebugWriteLine(\"availableFormat={0}x{1} {2} {3}\", p.Width, p.Height, (double)p.Height / p.Width, p.FrameRate.Numerator / p.FrameRate.Denominator);\r\n            }\r\n            DebugWriteLine(\"selectedFormat={0}x{1} {2} {3}\", currentFormat.Width, currentFormat.Height, (double)currentFormat.Height / currentFormat.Width, currentFormat.FrameRate.Numerator / currentFormat.FrameRate.Denominator);\r\n\r\n            return currentFormat;\r\n        }\r\n\r\n        private static void DebugWriteLine(string str, params object[] args)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(str, args);\r\n        }\r\n\r\n        private async void Focus_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_mediaCaptureManagerInitialized)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (!_mediaCaptureManager.VideoDeviceController.FocusControl.Supported)\r\n            {\r\n                return;\r\n            }\r\n\r\n            try\r\n            {\r\n                await _mediaCaptureManager.VideoDeviceController.FocusControl.FocusAsync();\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                HandleCameraException(ex);\r\n            }\r\n        }\r\n\r\n        #region Flash Control\r\n        private FlashControlMode _flashControlMode;\r\n\r\n        private void Flash_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_mediaCaptureManagerInitialized)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var flashControl = _mediaCaptureManager.VideoDeviceController.FlashControl;\r\n            if (!flashControl.Supported) return;\r\n\r\n            _flashControlMode = GetNextFlashControlMode(_flashControlMode);\r\n            SwitchFlashControlMode(_flashControlMode, flashControl);\r\n        }\r\n\r\n        private FlashControlMode GetFlashControlMode(FlashControl flashControl)\r\n        {\r\n            if (!flashControl.Supported)\r\n            {\r\n                return FlashControlMode.Disabled;\r\n            }\r\n\r\n            if (!flashControl.Enabled)\r\n            {\r\n                return FlashControlMode.Disabled;\r\n            }\r\n\r\n            if (flashControl.Auto)\r\n            {\r\n                return FlashControlMode.Auto;\r\n            }\r\n\r\n            return FlashControlMode.Enabled;\r\n        }\r\n\r\n        private FlashControlMode GetNextFlashControlMode(FlashControlMode flashControlMode)\r\n        {\r\n            if (flashControlMode == FlashControlMode.Auto)\r\n            {\r\n                return FlashControlMode.Disabled;\r\n            }\r\n\r\n            if (flashControlMode == FlashControlMode.Disabled)\r\n            {\r\n                return FlashControlMode.Enabled;\r\n            }\r\n\r\n            return FlashControlMode.Auto;\r\n        }\r\n\r\n        private void SwitchFlashControlMode(FlashControlMode mode, FlashControl flashControl)\r\n        {\r\n            if (mode == FlashControlMode.Auto)\r\n            {\r\n                if (flashControl.Supported)\r\n                {\r\n                    flashControl.Enabled = true;\r\n                    flashControl.Auto = true;\r\n                    if (flashControl.AssistantLightSupported)\r\n                    {\r\n                        flashControl.AssistantLightEnabled = false;\r\n                    }\r\n                    FlashButtonImage.Source = new BitmapImage(new Uri(\"/Images/W10M/ic_flash_auto_2x.png\", UriKind.Relative));\r\n                }\r\n            }\r\n            else if (mode == FlashControlMode.Disabled)\r\n            {\r\n                if (flashControl.Supported)\r\n                {\r\n                    flashControl.Enabled = false;\r\n                    flashControl.Auto = false;\r\n                    if (flashControl.AssistantLightSupported)\r\n                    {\r\n                        flashControl.AssistantLightEnabled = false;\r\n                    }\r\n                }\r\n                FlashButtonImage.Source = new BitmapImage(new Uri(\"/Images/W10M/ic_flash_disabled_2x.png\", UriKind.Relative));\r\n            }\r\n            else\r\n            {\r\n                if (flashControl.Supported)\r\n                {\r\n                    flashControl.Enabled = true;\r\n                    flashControl.Auto = false;\r\n                    if (flashControl.AssistantLightSupported)\r\n                    {\r\n                        flashControl.AssistantLightEnabled = true;\r\n                    }\r\n                    FlashButtonImage.Source = new BitmapImage(new Uri(\"/Images/W10M/ic_flash_enabled_2x.png\", UriKind.Relative));\r\n                }\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        private void Failed(MediaCapture sender, MediaCaptureFailedEventArgs erroreventargs)\r\n        {\r\n            if (_isRecording)\r\n            {\r\n                StopRecording();\r\n            }\r\n        }\r\n\r\n        private void RecordLimitationExceeded(MediaCapture sender)\r\n        {\r\n            if (_isRecording)\r\n            {\r\n                StopRecording();\r\n            }\r\n        }\r\n\r\n        public void MainPage_OnOrientationChanged(object sender, OrientationChangedEventArgs e)\r\n        {\r\n            if (e.Orientation == PageOrientation.LandscapeLeft)\r\n            {\r\n            //    Width = Application.Current.Host.Content.ActualHeight;\r\n            //    Height = Application.Current.Host.Content.ActualWidth;\r\n\r\n            //    FlashButton.VerticalAlignment = VerticalAlignment.Top;\r\n            //    FlashButton.HorizontalAlignment = HorizontalAlignment.Center;\r\n\r\n            //    BottomBorder.HorizontalAlignment = HorizontalAlignment.Right;\r\n            //    BottomBorder.VerticalAlignment = VerticalAlignment.Stretch;\r\n            //    BottomBorderTranslate.X = 72.0;\r\n            //    BottomBorderTranslate.Y = 0.0;\r\n\r\n                ContentPanel.Children.Remove(ProgressText);\r\n                ButtonsPanel.Children.Remove(ProgressText);\r\n                ContentPanel.Children.Add(ProgressText);\r\n                ProgressText.Margin = new Thickness(0.0);\r\n                ProgressTextTransform.Rotation = 90.0;\r\n                ProgressTextTransform.TranslateX = -200.0;\r\n\r\n                //    ButtonsPanel.ColumnDefinitions.Clear();\r\n                //    ButtonsPanel.RowDefinitions.Clear();\r\n                //    ButtonsPanel.RowDefinitions.Add(new RowDefinition());\r\n                //    ButtonsPanel.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });\r\n                //    ButtonsPanel.RowDefinitions.Add(new RowDefinition());\r\n\r\n                //    Grid.SetRow(SwitchModeButton, 2);\r\n                //    Grid.SetRow(ProgressCircle, 1);\r\n                //    Grid.SetRow(RecordButton, 1);\r\n                //    Grid.SetRow(SwitchCameraButton, 0);\r\n\r\n                //    Transform.Rotation = 0;\r\n\r\n                //    ButtonsPanel.HorizontalAlignment = HorizontalAlignment.Right;\r\n                //    ButtonsPanel.VerticalAlignment = VerticalAlignment.Center;\r\n            }\r\n            else if (e.Orientation == PageOrientation.LandscapeRight)\r\n            {\r\n            //    Width = Application.Current.Host.Content.ActualHeight;\r\n            //    Height = Application.Current.Host.Content.ActualWidth;\r\n\r\n            //    FlashButton.VerticalAlignment = VerticalAlignment.Bottom;\r\n            //    FlashButton.HorizontalAlignment = HorizontalAlignment.Center;\r\n\r\n            //    BottomBorder.HorizontalAlignment = HorizontalAlignment.Left;\r\n            //    BottomBorder.VerticalAlignment = VerticalAlignment.Stretch;\r\n            //    BottomBorderTranslate.X = -72.0;\r\n            //    BottomBorderTranslate.Y = 0.0;\r\n\r\n                ContentPanel.Children.Remove(ProgressText);\r\n                ButtonsPanel.Children.Remove(ProgressText);\r\n                ContentPanel.Children.Add(ProgressText);\r\n                ProgressText.Margin = new Thickness(0.0);\r\n                ProgressTextTransform.Rotation = -90.0;\r\n                ProgressTextTransform.TranslateX = 200.0;\r\n\r\n            //    ButtonsPanel.ColumnDefinitions.Clear();\r\n            //    ButtonsPanel.RowDefinitions.Clear();\r\n            //    ButtonsPanel.RowDefinitions.Add(new RowDefinition());\r\n            //    ButtonsPanel.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });\r\n            //    ButtonsPanel.RowDefinitions.Add(new RowDefinition());\r\n\r\n            //    Grid.SetRow(SwitchModeButton, 0);\r\n            //    Grid.SetRow(ProgressCircle, 1);\r\n            //    Grid.SetRow(RecordButton, 1);\r\n            //    Grid.SetRow(SwitchCameraButton, 2);\r\n\r\n            //    Transform.Rotation = 180;\r\n\r\n            //    ButtonsPanel.HorizontalAlignment = HorizontalAlignment.Left;\r\n            //    ButtonsPanel.VerticalAlignment = VerticalAlignment.Center;\r\n            }\r\n            else\r\n            {\r\n            //    Width = Application.Current.Host.Content.ActualWidth;\r\n            //    Height = Application.Current.Host.Content.ActualHeight;\r\n\r\n            //    FlashButton.VerticalAlignment = VerticalAlignment.Center;\r\n            //    FlashButton.HorizontalAlignment = HorizontalAlignment.Right;\r\n\r\n            //    BottomBorder.HorizontalAlignment = HorizontalAlignment.Stretch;\r\n            //    BottomBorder.VerticalAlignment = VerticalAlignment.Bottom;\r\n            //    BottomBorderTranslate.X = 0.0;\r\n            //    BottomBorderTranslate.Y = 72.0;\r\n\r\n                ContentPanel.Children.Remove(ProgressText);\r\n                ButtonsPanel.Children.Remove(ProgressText);\r\n                ButtonsPanel.Children.Add(ProgressText);\r\n                ProgressText.Margin = new Thickness(-8.0);\r\n                ProgressTextTransform.Rotation = 0.0;\r\n                ProgressTextTransform.TranslateX = 0.0;\r\n\r\n            //    ButtonsPanel.ColumnDefinitions.Clear();\r\n            //    ButtonsPanel.RowDefinitions.Clear();\r\n            //    ButtonsPanel.RowDefinitions.Add(new RowDefinition());\r\n            //    ButtonsPanel.RowDefinitions.Add(new RowDefinition());\r\n            //    ButtonsPanel.ColumnDefinitions.Add(new ColumnDefinition());\r\n            //    ButtonsPanel.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });\r\n            //    ButtonsPanel.ColumnDefinitions.Add(new ColumnDefinition());\r\n\r\n            //    Grid.SetRow(SwitchModeButton, 1);\r\n            //    Grid.SetRow(ProgressCircle, 1);\r\n            //    Grid.SetRow(RecordButton, 1);\r\n            //    Grid.SetRow(SwitchCameraButton, 1);\r\n\r\n            //    Transform.Rotation = 90;\r\n\r\n            //    RotateTransform.Angle = 0;\r\n            //    ButtonsPanel.VerticalAlignment = VerticalAlignment.Bottom;\r\n            //    ButtonsPanel.HorizontalAlignment = HorizontalAlignment.Center;\r\n            }\r\n\r\n            StartRotateAnimation(e.Orientation);\r\n\r\n            //SetFocusTranslation(_previousOrientation, e.Orientation);\r\n\r\n            _previousOrientation = e.Orientation;\r\n        }\r\n\r\n        private void SetFocusTranslation(PageOrientation previousOrientation, PageOrientation orientation)\r\n        {\r\n            double translateX = 0.0;\r\n            double translateY = 0.0;\r\n\r\n            var contentWidth = (_previousOrientation & PageOrientation.Portrait) == PageOrientation.Portrait\r\n                    ? Application.Current.Host.Content.ActualWidth\r\n                    : Application.Current.Host.Content.ActualHeight;\r\n            var contentHeight = (_previousOrientation & PageOrientation.Portrait) == PageOrientation.Portrait\r\n                ? Application.Current.Host.Content.ActualHeight\r\n                : Application.Current.Host.Content.ActualWidth;\r\n\r\n            if (previousOrientation == PageOrientation.PortraitUp)\r\n            {\r\n                if (orientation == PageOrientation.LandscapeLeft)\r\n                {\r\n                    translateX = FocusTransform.TranslateY;\r\n                    translateY = contentHeight - FocusTransform.TranslateX - Focus.ActualHeight;\r\n                }\r\n                else if (orientation == PageOrientation.LandscapeRight)\r\n                {\r\n                    translateX = contentWidth - FocusTransform.TranslateY - Focus.ActualWidth;\r\n                    translateY = FocusTransform.TranslateX;\r\n                }\r\n            }\r\n            else if (previousOrientation == PageOrientation.LandscapeLeft)\r\n            {\r\n                if (orientation == PageOrientation.PortraitUp)\r\n                {\r\n                    translateX = contentWidth - FocusTransform.TranslateY - Focus.ActualWidth;\r\n                    translateY = FocusTransform.TranslateX;\r\n                }\r\n                else if (orientation == PageOrientation.LandscapeRight)\r\n                {\r\n                    translateX = contentWidth - FocusTransform.TranslateX - Focus.ActualHeight;\r\n                    translateY = contentHeight - FocusTransform.TranslateY - Focus.ActualWidth;\r\n                }\r\n            }\r\n            else if (previousOrientation == PageOrientation.LandscapeRight)\r\n            {\r\n                if (orientation == PageOrientation.PortraitUp)\r\n                {\r\n                    translateX = FocusTransform.TranslateY;\r\n                    translateY = contentHeight - FocusTransform.TranslateX - Focus.ActualHeight;\r\n                }\r\n                else if (orientation == PageOrientation.LandscapeLeft)\r\n                {\r\n                    translateX = contentWidth - FocusTransform.TranslateX - Focus.ActualHeight;\r\n                    translateY = contentHeight - FocusTransform.TranslateY - Focus.ActualWidth;\r\n                }\r\n            }\r\n\r\n            FocusTransform.TranslateX = translateX;\r\n            FocusTransform.TranslateY = translateY;\r\n        }\r\n\r\n        private Storyboard _rotateStoryboard;\r\n\r\n        private void StartRotateAnimation(PageOrientation orientation)\r\n        {\r\n            if (_rotateStoryboard != null)\r\n            {\r\n                _rotateStoryboard.Stop();\r\n            }\r\n\r\n            double from = 0.0;\r\n            if (orientation == PageOrientation.PortraitUp)\r\n            {\r\n                from = 0.0;\r\n            }\r\n            else if (orientation == PageOrientation.LandscapeLeft)\r\n            {\r\n                from = 90.0;\r\n            }\r\n            else if (orientation == PageOrientation.LandscapeRight)\r\n            {\r\n                from = -90.0;\r\n            }\r\n\r\n            _rotateStoryboard = new Storyboard();\r\n\r\n            var progressCircleAnimation = new DoubleAnimation { To = from, Duration = TimeSpan.FromSeconds(0.3) };\r\n            Storyboard.SetTarget(progressCircleAnimation, ProgressCircleTransform);\r\n            Storyboard.SetTargetProperty(progressCircleAnimation, new PropertyPath(\"Angle\"));\r\n            _rotateStoryboard.Children.Add(progressCircleAnimation);\r\n\r\n            var recordAnimation = new DoubleAnimation { To = from, Duration = TimeSpan.FromSeconds(0.3) };\r\n            Storyboard.SetTarget(recordAnimation, RecordTransform);\r\n            Storyboard.SetTargetProperty(recordAnimation, new PropertyPath(\"Angle\"));\r\n            _rotateStoryboard.Children.Add(recordAnimation);\r\n\r\n            var switchCameraAnimation = new DoubleAnimation { To = from, Duration = TimeSpan.FromSeconds(0.3) };\r\n            Storyboard.SetTarget(switchCameraAnimation, SwitchCameraTransform);\r\n            Storyboard.SetTargetProperty(switchCameraAnimation, new PropertyPath(\"Angle\"));\r\n            _rotateStoryboard.Children.Add(switchCameraAnimation);\r\n\r\n            var switchModeAnimation = new DoubleAnimation { To = from, Duration = TimeSpan.FromSeconds(0.3) };\r\n            Storyboard.SetTarget(switchModeAnimation, SwitchModeTransform);\r\n            Storyboard.SetTargetProperty(switchModeAnimation, new PropertyPath(\"Angle\"));\r\n            _rotateStoryboard.Children.Add(switchModeAnimation);\r\n\r\n            var focusAnimation = new DoubleAnimation { To = from, Duration = TimeSpan.FromSeconds(0.3) };\r\n            Storyboard.SetTarget(focusAnimation, FlashTransform);\r\n            Storyboard.SetTargetProperty(focusAnimation, new PropertyPath(\"Rotation\"));\r\n            _rotateStoryboard.Children.Add(focusAnimation);\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(() => _rotateStoryboard.Begin());\r\n        }\r\n\r\n        // Rotation metadata to apply to the preview stream and recorded videos (MF_MT_VIDEO_ROTATION)\r\n        // Reference: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868174.aspx\r\n        private static readonly Guid RotationKey = new Guid(\"C380465D-2271-428C-9B83-ECEA3B4A85C1\");\r\n\r\n        private bool _isSwitchingMode;\r\n\r\n        private async void Switch_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_isSwitchingMode)\r\n            {\r\n                return;\r\n            }\r\n\r\n            try\r\n            {\r\n                _isSwitchingMode = true;\r\n                if (_previewSink != null) _previewSink.Dispose();\r\n                if (_mediaCaptureManager != null) _mediaCaptureManager.Dispose();\r\n\r\n                _isRearCamera = !_isRearCamera;\r\n\r\n                await InitializeCameraAsync();\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                HandleCameraException(ex);\r\n            }\r\n            finally\r\n            {\r\n                _isSwitchingMode = false;\r\n            }\r\n        }\r\n\r\n        private bool _isCapturingPhoto;\r\n\r\n        private async void RecordButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            DebugWriteLine(\"RecordButton_OnClick \" + _mode);\r\n\r\n            if (!_mediaCaptureManagerInitialized)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_isHolded)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_mode == CameraMode.Recording)\r\n            {\r\n                StopRecording();\r\n            }\r\n            else if (_mode == CameraMode.Video)\r\n            {\r\n                await StartRecording();\r\n            }\r\n            else\r\n            {\r\n                if (_isCapturingPhoto) return;\r\n\r\n                _isCapturingPhoto = true;\r\n                try\r\n                {\r\n                    LayoutRoot.IsHitTestVisible = false;\r\n                    var stopwatch = Stopwatch.StartNew();\r\n                    //declare string for filename\r\n                    string captureFileName = string.Empty;\r\n                    //declare image format\r\n                    //ImageEncodingProperties format = ImageEncodingProperties.CreateJpeg();\r\n                    //format.Width = 3840;\r\n                    //format.Height = 2160;\r\n\r\n                    DebugWriteLine(\"Before CapturePhotoToStreamAsync \" + stopwatch.Elapsed);\r\n                    //generate stream from MediaCapture\r\n\r\n                    var storyboard = new Storyboard();\r\n                    var translateXAnimation = new DoubleAnimation { From = 0.0, To = FlashButton.ActualWidth + FlashButton.Margin.Right + FlashButton.Margin.Left, Duration = TimeSpan.FromSeconds(1.5), EasingFunction = new ExponentialEase{ Exponent = 5.0, EasingMode = EasingMode.EaseOut }};\r\n                    Storyboard.SetTarget(translateXAnimation, FlashTransform);\r\n                    Storyboard.SetTargetProperty(translateXAnimation, new PropertyPath(\"TranslateX\"));\r\n                    storyboard.Children.Add(translateXAnimation);\r\n\r\n                    var translateYAnimation = new DoubleAnimation { From = 0.0, To = ButtonsPanel.ActualHeight, Duration = TimeSpan.FromSeconds(1.5), EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut } };\r\n                    Storyboard.SetTarget(translateYAnimation, ButtonsPanelTransform);\r\n                    Storyboard.SetTargetProperty(translateYAnimation, new PropertyPath(\"TranslateY\"));\r\n                    storyboard.Children.Add(translateYAnimation);\r\n\r\n                    storyboard.Begin();\r\n                    storyboard.Completed += (o, args) =>\r\n                    {\r\n                        RaisePhotoCaptured(new FileEventArgs { File = null });\r\n                    };\r\n\r\n                    var rotation = GetRotation();\r\n                    //await _mediaCaptureManager.StopPreviewAsync();\r\n                    Telegram.Api.Helpers.Execute.BeginOnThreadPool(async () =>\r\n                    {\r\n                        var capturedPhoto = await _lowLagPhotoCapture.CaptureAsync();\r\n\r\n                        var elapsed2 = stopwatch.Elapsed;\r\n                        await _mediaCaptureManager.StopPreviewAsync();\r\n                        var elapsed = stopwatch.Elapsed;\r\n                        DebugWriteLine(\"CapturePhotoToStreamAsync \" + elapsed);\r\n\r\n                        var text = string.Format(\"StopPreview {3}\\nCaptured {0}x{1} {2}\", 0, 0, elapsed, elapsed2);\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(() => SetDebugText(text));\r\n                        //SetDebugText(text);\r\n                        //return;\r\n                        using (var imageStream = new InMemoryRandomAccessStream())\r\n                        {\r\n\r\n                            await RandomAccessStream.CopyAsync(capturedPhoto.Frame, imageStream);\r\n\r\n                            //create decoder and encoder\r\n                            var dec = await BitmapDecoder.CreateAsync(imageStream);\r\n                            var enc = await BitmapEncoder.CreateForTranscodingAsync(imageStream, dec);\r\n\r\n                            // fix for front camera mirroring\r\n                            if (!_isRearCamera)\r\n                            {\r\n                                if (rotation == BitmapRotation.None)\r\n                                {\r\n                                    rotation = BitmapRotation.Clockwise180Degrees;\r\n                                }\r\n                                else if (rotation == BitmapRotation.Clockwise180Degrees)\r\n                                {\r\n                                    rotation = BitmapRotation.None;\r\n                                }\r\n                                enc.BitmapTransform.Flip = BitmapFlip.Vertical;\r\n                            }\r\n\r\n                            //roate the image\r\n                            enc.BitmapTransform.Rotation = rotation;\r\n\r\n                            //write changes to the image stream\r\n                            await enc.FlushAsync();\r\n\r\n                            var elapsed3 = stopwatch.Elapsed;\r\n                            DebugWriteLine(\"FlushAsync \" + stopwatch.Elapsed);\r\n\r\n                            //save the image\r\n\r\n                            var folder = KnownFolders.CameraRoll;\r\n                            var capturefile = await folder.CreateFileAsync(\"photo_\" + DateTime.Now.Ticks + \".jpg\", CreationCollisionOption.ReplaceExisting);\r\n\r\n                            //store stream in file\r\n                            using (var fileStream = await capturefile.OpenStreamForWriteAsync())\r\n                            {\r\n                                try\r\n                                {\r\n                                    //because of using statement stream will be closed automatically after copying finished\r\n                                    await RandomAccessStream.CopyAsync(imageStream, fileStream.AsOutputStream());\r\n                                    DebugWriteLine(\"CopyAsync \" + stopwatch.Elapsed);\r\n                                }\r\n                                catch (Exception ex)\r\n                                {\r\n                                    HandleCameraException(ex);\r\n                                }\r\n                            }\r\n\r\n                            text = string.Format(\"StopPreview {3}\\nCaptured {0}x{1} {2}\\nRotate {4}\\nSave {5}\", capturedPhoto.Frame.Width, capturedPhoto.Frame.Height, elapsed, elapsed2, elapsed3, stopwatch.Elapsed);\r\n\r\n                            Execute.BeginOnUIThread(() =>\r\n                            {\r\n                                SetDebugText(text);\r\n                                RaisePhotoCaptured(new FileEventArgs { File = capturefile });\r\n                            });\r\n\r\n                            Dispose();\r\n                        }\r\n                    });\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    HandleCameraException(ex);\r\n                }\r\n                finally\r\n                {\r\n                    _isCapturingPhoto = false;\r\n                    LayoutRoot.IsHitTestVisible = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SetDebugText(string text, int millisecondsTimeout = 5000)\r\n        {\r\n#if DEBUG\r\n            TimerLabel.Visibility = Visibility.Visible;\r\n            TimerLabel.Text = text;\r\n            ThreadPool.QueueUserWorkItem(state =>\r\n            {\r\n                Thread.Sleep(5000);\r\n                Deployment.Current.Dispatcher.BeginInvoke(() => { TimerLabel.Visibility = Visibility.Collapsed; });\r\n            });\r\n#endif\r\n        }\r\n\r\n        private BitmapRotation GetRotation()\r\n        {\r\n            if (_previousOrientation == PageOrientation.LandscapeLeft)\r\n            {\r\n                return BitmapRotation.None;\r\n            }\r\n            else if (_previousOrientation == PageOrientation.LandscapeRight)\r\n            {\r\n                return BitmapRotation.Clockwise180Degrees;\r\n            }\r\n            else\r\n            {\r\n                if (_isRearCamera)\r\n                {\r\n                    return BitmapRotation.Clockwise90Degrees;\r\n                }\r\n                else\r\n                {\r\n                    return BitmapRotation.Clockwise270Degrees;\r\n                }\r\n            }\r\n        }\r\n\r\n        private int GetVideoRotation()\r\n        {\r\n            if (_previousOrientation == PageOrientation.LandscapeLeft)\r\n            {\r\n                return 0;\r\n            }\r\n            else if (_previousOrientation == PageOrientation.LandscapeRight)\r\n            {\r\n                return 180;\r\n            }\r\n            else\r\n            {\r\n                if (_isRearCamera)\r\n                {\r\n                    return 90;\r\n                }\r\n                else\r\n                {\r\n                    return 270;\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _isFocusing;\r\n\r\n        private async void Preview_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (!_mediaCaptureManager.VideoDeviceController.FocusControl.Supported)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_isFocusing)\r\n            {\r\n                return;\r\n            }\r\n\r\n            try\r\n            {\r\n                _isFocusing = true;\r\n                if (_mediaCaptureManager.VideoDeviceController.RegionsOfInterestControl.AutoFocusSupported\r\n                    && _mediaCaptureManager.VideoDeviceController.RegionsOfInterestControl.MaxRegions > 0)\r\n                {\r\n                    var properties = _mediaCaptureManager.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview) as VideoEncodingProperties;\r\n                    var previewWidth = properties.Width;\r\n                    var previewHeight = properties.Height;\r\n\r\n                    var scaleFactor = Math.Max(previewWidth, previewHeight) / Math.Max(Preview.ActualWidth, Preview.ActualHeight);\r\n\r\n                    var previewPosition = e.GetPosition(Preview);\r\n                    var absolutePosition = e.GetPosition(ContentPanel);\r\n                    System.Diagnostics.Debug.WriteLine(\"absolutePosition x={0} y={1}\", absolutePosition.X, absolutePosition.Y);\r\n                    var focusTransformX = absolutePosition.X - Focus.ActualWidth / 2.0;\r\n                    var focusTransformY = absolutePosition.Y - Focus.ActualHeight / 2.0;\r\n\r\n                    var contentWidth = (_previousOrientation & PageOrientation.Portrait) == PageOrientation.Portrait\r\n                        ? Application.Current.Host.Content.ActualWidth\r\n                        : Application.Current.Host.Content.ActualHeight;\r\n                    var contentHeight = (_previousOrientation & PageOrientation.Portrait) == PageOrientation.Portrait\r\n                        ? Application.Current.Host.Content.ActualHeight\r\n                        : Application.Current.Host.Content.ActualWidth;\r\n\r\n                    if (focusTransformX < 0)\r\n                    {\r\n                        focusTransformX = 0;\r\n                    }\r\n                    else if (focusTransformX > (contentWidth - Focus.ActualWidth))\r\n                    {\r\n                        focusTransformX = (contentWidth - Focus.ActualWidth);\r\n                    }\r\n                    if (focusTransformY < 0)\r\n                    {\r\n                        focusTransformY = 0;\r\n                    }\r\n                    else if (focusTransformY > (contentHeight - Focus.ActualHeight))\r\n                    {\r\n                        focusTransformY = (contentHeight - Focus.ActualHeight);\r\n                    }\r\n                    FocusTransform.TranslateX = focusTransformX;\r\n                    FocusTransform.TranslateY = focusTransformY;\r\n                    System.Diagnostics.Debug.WriteLine(\"focusTransform x={0} y={1}\", focusTransformX, focusTransformY);\r\n\r\n                    Focus.IsHitTestVisible = true;\r\n                    Focus.Opacity = 1.0;\r\n\r\n                    //System.Diagnostics.Debug.WriteLine(\"preview w={0} h={1}\", previewWidth, previewHeight);\r\n                    //System.Diagnostics.Debug.WriteLine(\"pos={0} w={1} h={2}\", pos, Preview.ActualWidth, Preview.ActualHeight);\r\n\r\n                    var point1 = new Point((previewPosition.X - 25) * scaleFactor, (previewPosition.Y - 25) * scaleFactor);\r\n                    if (point1.X < 0)\r\n                        point1.X = 0;\r\n                    if (point1.Y < 0)\r\n                        point1.Y = 0;\r\n\r\n                    var point2 = new Point((previewPosition.X + 25) * scaleFactor, (previewPosition.Y + 25) * scaleFactor);\r\n                    if (point2.X > previewWidth)\r\n                        point2.X = previewWidth;\r\n                    if (point2.Y > previewHeight)\r\n                        point2.Y = previewHeight;\r\n\r\n                    var region = new RegionOfInterest();\r\n                    region.Bounds = new Rect(point1, point2);\r\n                    System.Diagnostics.Debug.WriteLine(\"bounds x={0} y={1} of with={2} height={3}\", region.Bounds.X, region.Bounds.Y, previewWidth, previewHeight);\r\n                    region.BoundsNormalized = false;\r\n                    region.AutoFocusEnabled = true;\r\n                    region.AutoExposureEnabled = false; //this will make exposure for roi\r\n                    region.AutoWhiteBalanceEnabled = false; //this will make wb for roi\r\n\r\n                    _mediaCaptureManager.VideoDeviceController.FocusControl.Configure(new FocusSettings\r\n                    {\r\n                        Mode = FocusMode.Single\r\n                    });\r\n\r\n                    await _mediaCaptureManager.VideoDeviceController.RegionsOfInterestControl.ClearRegionsAsync();\r\n                    await _mediaCaptureManager.VideoDeviceController.RegionsOfInterestControl.SetRegionsAsync(new List<RegionOfInterest> { region }, true);\r\n\r\n                    //note: before focusing, make sure or set single focus mode. That part of code not here.\r\n                    await _mediaCaptureManager.VideoDeviceController.FocusControl.FocusAsync();\r\n                }\r\n                else\r\n                {\r\n                    var modes = _mediaCaptureManager.VideoDeviceController.FocusControl.SupportedFocusModes;\r\n                    if (modes.Contains(FocusMode.Continuous))\r\n                    {\r\n                        _mediaCaptureManager.VideoDeviceController.FocusControl.Configure(new FocusSettings\r\n                        {\r\n                            Mode = FocusMode.Continuous,\r\n                            DisableDriverFallback = true\r\n                        });\r\n                    }\r\n                    else\r\n                    {\r\n                        _mediaCaptureManager.VideoDeviceController.FocusControl.Configure(new FocusSettings\r\n                        {\r\n                            Mode = FocusMode.Auto\r\n                        });\r\n                    }\r\n\r\n                    await _mediaCaptureManager.VideoDeviceController.FocusControl.FocusAsync();\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                HandleCameraException(ex);\r\n            }\r\n            finally\r\n            {\r\n                _isFocusing = false;\r\n            }\r\n        }\r\n\r\n        private void Preview_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            if (e.PinchManipulation == null) return;\r\n\r\n            var zoomControl = _mediaCaptureManager.VideoDeviceController.ZoomControl;\r\n            if (!zoomControl.Supported) return;\r\n\r\n            var zoomFactor = zoomControl.Value * e.PinchManipulation.DeltaScale;\r\n\r\n            if (zoomFactor < zoomControl.Min) zoomFactor = zoomControl.Min;\r\n            if (zoomFactor > zoomControl.Max) zoomFactor = zoomControl.Max;\r\n            zoomFactor = zoomFactor - (zoomFactor % zoomControl.Step);\r\n\r\n            _mediaCaptureManager.VideoDeviceController.ZoomControl.Value = (float)zoomFactor;\r\n        }\r\n\r\n        private bool _isHolded = false;\r\n\r\n        private bool _isRecording = false;\r\n        private bool _initialized;\r\n        private DateTime _startRecordTime;\r\n\r\n        private DispatcherTimer _timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(0.3) };\r\n\r\n\r\n        private void TimerOnTick(object sender, System.EventArgs eventArgs)\r\n        {\r\n            if (!_isRecording) return;\r\n\r\n            var time = (DateTime.Now - _startRecordTime);\r\n\r\n            ProgressText.Text = time.ToString(@\"mm\\:ss\");\r\n        }\r\n\r\n        private async void RecordButton_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"RecordButton_OnHold \" + _mode);\r\n            if (!_mediaCaptureManagerInitialized)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _isHolded = true;\r\n\r\n            await StartRecording();\r\n        }\r\n\r\n        private Storyboard _progressStoryboard;\r\n\r\n        private async Task StartRecording()\r\n        {\r\n            SwitchIdleDetectionMode(false);\r\n\r\n            if (_isHolded)\r\n            {\r\n                Overlay.Background = new SolidColorBrush(Colors.White);\r\n            }\r\n\r\n            _isRecordCanceled = false;\r\n            _isRecording = true;\r\n            var videoFolder = KnownFolders.CameraRoll;\r\n            _captureVideofile = await videoFolder.CreateFileAsync(\"video_\" + DateTime.Now.Ticks + \".mp4\", CreationCollisionOption.ReplaceExisting);\r\n\r\n            var profile = _currentProfile;\r\n            profile.Video.Properties.Remove(RotationKey);\r\n            profile.Video.Properties.Add(RotationKey, PropertyValue.CreateInt32(GetVideoRotation()));\r\n\r\n            System.Diagnostics.Debug.WriteLine(\"profile={0}x{1}\", profile.Video.Width, profile.Video.Height);\r\n\r\n            //await _mediaCaptureManager.StartRecordToStorageFileAsync(profile, _captureVideofile);\r\n            await _lowLagPhotoCapture.FinishAsync();\r\n\r\n            _lowLagMediaRecording = await _mediaCaptureManager.PrepareLowLagRecordToStorageFileAsync(profile, _captureVideofile);\r\n            await _lowLagMediaRecording.StartAsync();\r\n\r\n\r\n            SetDebugText(\"Recording...\", 30000);\r\n            _timer.Start();\r\n            _startRecordTime = DateTime.Now;\r\n\r\n            _progressStoryboard = new Storyboard();\r\n            var progressAnimation = new DoubleAnimation { From = 0.0, To = 359.9, Duration = TimeSpan.FromSeconds(30.0) };\r\n            Storyboard.SetTarget(progressAnimation, ProgressRing);\r\n            Storyboard.SetTargetProperty(progressAnimation, new PropertyPath(\"Angle\"));\r\n            _progressStoryboard.Children.Add(progressAnimation);\r\n\r\n            _progressStoryboard.Begin();\r\n            _progressStoryboard.Completed += OnProgressStoryboardCompleted;\r\n\r\n            SwitchMode(CameraMode.Recording);\r\n        }\r\n\r\n        private void OnProgressStoryboardCompleted(object sender, System.EventArgs e)\r\n        {\r\n            if (_isRecording)\r\n            {\r\n                StopRecording();\r\n            }\r\n        }\r\n\r\n        private void RecordButton_OnMouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            DebugWriteLine(\"RecordButton_OnMouseLeave \" + _mode);\r\n            if (_isRecording && _isHolded)\r\n            {\r\n                StopRecording();\r\n            }\r\n\r\n            _isHolded = false;\r\n        }\r\n\r\n        private async Task StopRecording()\r\n        {\r\n            SwitchIdleDetectionMode(true);\r\n\r\n            Overlay.Background = new SolidColorBrush(Colors.Transparent);\r\n\r\n            _isRecording = false;\r\n\r\n            TimerLabel.Visibility = Visibility.Collapsed;\r\n            _timer.Stop();\r\n            ProgressText.Text = \"00:00\";\r\n\r\n            SwitchMode(CameraMode.Video);\r\n\r\n            _progressStoryboard.Stop();\r\n\r\n            //await _mediaCaptureManager.StopRecordAsync();\r\n            await _lowLagMediaRecording.StopAsync();\r\n            await _lowLagMediaRecording.FinishAsync();\r\n            _lowLagPhotoCapture = await _mediaCaptureManager.PrepareLowLagPhotoCaptureAsync(ImageEncodingProperties.CreateJpeg());\r\n\r\n            if (_isRecordCanceled)\r\n            {\r\n                _isRecordCanceled = false;\r\n                await _captureVideofile.DeleteAsync(StorageDeleteOption.PermanentDelete);\r\n            }\r\n            else\r\n            {\r\n                RaiseVideoCaptured(new FileEventArgs{ File = _captureVideofile });\r\n            }\r\n        }\r\n\r\n        private CameraMode _mode = CameraMode.Photo;\r\n\r\n        private void SwitchMode(CameraMode mode)\r\n        {\r\n            _mode = mode;\r\n\r\n            switch (mode)\r\n            {\r\n                case CameraMode.Photo:\r\n                    ProgressText.Foreground = new SolidColorBrush(Colors.White);\r\n                    ProgressText.Visibility = Visibility.Collapsed;\r\n                    SwitchCameraButton.Visibility = Visibility.Visible;\r\n                    SwitchModeButton.Visibility = Visibility.Visible;\r\n                    FlashButton.Visibility = Visibility.Visible;\r\n                    SwitchModeImage.Source = new BitmapImage(new Uri(\"/Images/W10M/ic_camera_video_2x.png\", UriKind.Relative));\r\n                    RecordImage.Source = new BitmapImage(new Uri(\"/Images/W10M/ic_camera_photo_2x.png\", UriKind.Relative));\r\n                    ProgressCircle.Opacity = 0.0;\r\n                    return;\r\n                case CameraMode.Video:\r\n                    ProgressText.Foreground = new SolidColorBrush(Colors.White);\r\n                    ProgressText.Visibility = Visibility.Visible;\r\n                    SwitchCameraButton.Visibility = Visibility.Visible;\r\n                    SwitchModeButton.Visibility = Visibility.Visible;\r\n                    FlashButton.Visibility = Visibility.Collapsed;\r\n                    SwitchModeImage.Source = new BitmapImage(new Uri(\"/Images/W10M/ic_camera_photo_2x.png\", UriKind.Relative));\r\n                    RecordImage.Source = new BitmapImage(new Uri(\"/Images/W10M/ic_camera_video_2x.png\", UriKind.Relative));\r\n                    ProgressCircle.Opacity = 0.0;\r\n                    return;\r\n                case CameraMode.Recording:\r\n                    ProgressText.Foreground = new SolidColorBrush(Colors.White);\r\n                    ProgressText.Visibility = Visibility.Visible;\r\n                    SwitchCameraButton.Visibility = Visibility.Collapsed;\r\n                    SwitchModeButton.Visibility = Visibility.Collapsed;\r\n                    FlashButton.Visibility = Visibility.Collapsed;\r\n                    RecordImage.Source = new BitmapImage(new Uri(\"/Images/W10M/ic_camera_stop_2x.png\", UriKind.Relative));\r\n                    ProgressCircle.Opacity = 1.0;\r\n                    return;\r\n            }\r\n        }\r\n\r\n        private void SwitchMode_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_mode == CameraMode.Photo)\r\n            {\r\n                SwitchMode(CameraMode.Video);\r\n            }\r\n            else if (_mode == CameraMode.Video)\r\n            {\r\n                SwitchMode(CameraMode.Photo);\r\n            }\r\n        }\r\n\r\n        private bool _isRecordCanceled;\r\n        private StorageFile _captureVideofile;\r\n\r\n        private void RecordButton_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            if (!_isHolded)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (e.CumulativeManipulation == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var distance =\r\n                Math.Sqrt(e.CumulativeManipulation.Translation.X * e.CumulativeManipulation.Translation.X +\r\n                          e.CumulativeManipulation.Translation.Y * e.CumulativeManipulation.Translation.Y);\r\n\r\n            System.Diagnostics.Debug.WriteLine(e.CumulativeManipulation.Translation);\r\n\r\n            if (distance >= 70.0)\r\n            {\r\n                _isRecordCanceled = true;\r\n                ProgressText.Foreground = (Brush)Resources[\"CancelForeground\"];\r\n            }\r\n            else\r\n            {\r\n                _isRecordCanceled = false;\r\n                ProgressText.Foreground = new SolidColorBrush(Colors.White);\r\n            }\r\n        }\r\n\r\n        private async void Focus_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (!_mediaCaptureManager.VideoDeviceController.FocusControl.Supported)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (_isFocusing)\r\n            {\r\n                return;\r\n            }\r\n\r\n            Focus.Opacity = 0.0;\r\n            Focus.IsHitTestVisible = false;\r\n\r\n            try\r\n            {\r\n                _isFocusing = true;\r\n\r\n                await _mediaCaptureManager.VideoDeviceController.RegionsOfInterestControl.ClearRegionsAsync();\r\n\r\n                var modes = _mediaCaptureManager.VideoDeviceController.FocusControl.SupportedFocusModes;\r\n                if (modes.Contains(FocusMode.Continuous))\r\n                {\r\n                    _mediaCaptureManager.VideoDeviceController.FocusControl.Configure(new FocusSettings\r\n                    {\r\n                        Mode = FocusMode.Continuous,\r\n                        DisableDriverFallback = true\r\n                    });\r\n                }\r\n                else\r\n                {\r\n                    _mediaCaptureManager.VideoDeviceController.FocusControl.Configure(new FocusSettings\r\n                    {\r\n                        Mode = FocusMode.Auto\r\n                    });\r\n                }\r\n                await _mediaCaptureManager.VideoDeviceController.FocusControl.FocusAsync();\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                HandleCameraException(ex);\r\n            }\r\n            finally\r\n            {\r\n                _isFocusing = false;\r\n            }\r\n        }\r\n\r\n        public static void SwitchIdleDetectionMode(bool enabled)\r\n        {\r\n#if WINDOWS_PHONE\r\n            var mode = enabled ? IdleDetectionMode.Enabled : IdleDetectionMode.Disabled;\r\n            try\r\n            {\r\n                PhoneApplicationService.Current.UserIdleDetectionMode = mode;\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                HandleCameraException(ex);\r\n            }\r\n#endif\r\n        }\r\n\r\n        private void SwitchCameraButton_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            DebugWriteLine(\"SwitchCameraButton_OnManipulationCompleted\");\r\n        }\r\n\r\n        private void SwitchCameraButton_OnMouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            DebugWriteLine(\"SwitchCameraButton_OnMouseLeave\");\r\n        }\r\n\r\n        private void CameraPage_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            Preview.Background = null;\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            DisposeInternal();\r\n        }\r\n\r\n        public void DisposeAsync()\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                DisposeInternal();\r\n            });\r\n        }\r\n    }\r\n\r\n    public enum CameraMode\r\n    {\r\n        Photo,\r\n        Video,\r\n        Recording,\r\n    }\r\n\r\n    public enum FlashControlMode\r\n    {\r\n        Auto,\r\n        Disabled,\r\n        Enabled,\r\n    }\r\n\r\n    public class FileEventArgs : System.EventArgs\r\n    {\r\n        public StorageFile File { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/CardTextBox.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Text;\r\nusing System.Windows.Controls;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public class CardTextBox : TextBox\r\n    {\r\n        public String[] PREFIXES_15 = new[] { \"34\", \"37\" };\r\n        public String[] PREFIXES_14 = new[] { \"300\", \"301\", \"302\", \"303\", \"304\", \"305\", \"309\", \"36\", \"38\", \"39\" };\r\n        public String[] PREFIXES_16 = new[]\r\n        {\r\n            \"2221\", \"2222\", \"2223\", \"2224\", \"2225\", \"2226\", \"2227\", \"2228\", \"2229\",\r\n            \"223\", \"224\", \"225\", \"226\", \"227\", \"228\", \"229\",\r\n            \"23\", \"24\", \"25\", \"26\",\r\n            \"270\", \"271\", \"2720\",\r\n            \"50\", \"51\", \"52\", \"53\", \"54\", \"55\",\r\n\r\n            \"4\",\r\n\r\n            \"60\", \"62\", \"64\", \"65\",\r\n\r\n            \"35\"\r\n        };\r\n\r\n        public static int MAX_LENGTH_STANDARD = 16;\r\n        public static int MAX_LENGTH_AMERICAN_EXPRESS = 15;\r\n        public static int MAX_LENGTH_DINERS_CLUB = 14;\r\n\r\n        private string previousText = string.Empty;\r\n        private int selectionStart;\r\n\r\n        private int characterAction = -1;\r\n        private int actionPosition;\r\n\r\n        private bool ignoreOnCardChange;\r\n\r\n        public CardTextBox()\r\n        {\r\n            TextChanged += OnTextChanged;\r\n        }\r\n\r\n        private void Started()\r\n        {\r\n            var start = SelectionStart;\r\n            var after = Math.Max(0, Text.Length - previousText.Length);\r\n            var count = Math.Max(0, previousText.Length - Text.Length);\r\n\r\n            if (count == 0 && after == 1)\r\n            {\r\n                characterAction = 1;\r\n            }\r\n            else if (count == 1 && after == 0)\r\n            {\r\n                if (previousText[start] == ' ' && start > 0)\r\n                {\r\n                    characterAction = 3;\r\n                    actionPosition = start - 1;\r\n                }\r\n                else\r\n                {\r\n                    characterAction = 2;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                characterAction = -1;\r\n            }\r\n        }\r\n\r\n        private void OnTextChanging()\r\n        {\r\n            Started();\r\n\r\n            if (ignoreOnCardChange)\r\n            {\r\n                return;\r\n            }\r\n\r\n            int start = SelectionStart;\r\n            String str = Text;\r\n            if (characterAction == 3)\r\n            {\r\n                str = str.Substring(0, actionPosition) + str.Substring(actionPosition + 1);\r\n                start--;\r\n            }\r\n            StringBuilder builder = new StringBuilder(str.Length);\r\n            for (int a = 0; a < str.Length; a++)\r\n            {\r\n                char ch = str[a];\r\n                if (char.IsDigit(ch))\r\n                {\r\n                    builder.Append(ch);\r\n                }\r\n            }\r\n            ignoreOnCardChange = true;\r\n            String hint = null;\r\n            int maxLength = 100;\r\n            if (builder.Length > 0)\r\n            {\r\n                String currentString = builder.ToString();\r\n                for (int a = 0; a < 3; a++)\r\n                {\r\n                    String[] checkArr;\r\n                    String resultHint;\r\n                    int resultMaxLength;\r\n                    switch (a)\r\n                    {\r\n                        case 0:\r\n                            checkArr = PREFIXES_16;\r\n                            resultMaxLength = 16;\r\n                            resultHint = \"xxxx xxxx xxxx xxxx\";\r\n                            break;\r\n                        case 1:\r\n                            checkArr = PREFIXES_15;\r\n                            resultMaxLength = 15;\r\n                            resultHint = \"xxxx xxxx xxxx xxx\";\r\n                            break;\r\n                        case 2:\r\n                        default:\r\n                            checkArr = PREFIXES_14;\r\n                            resultMaxLength = 14;\r\n                            resultHint = \"xxxx xxxx xxxx xx\";\r\n                            break;\r\n                    }\r\n                    for (int b = 0; b < checkArr.Length; b++)\r\n                    {\r\n                        String prefix = checkArr[b];\r\n                        if (currentString.Length <= prefix.Length)\r\n                        {\r\n                            if (prefix.StartsWith(currentString))\r\n                            {\r\n                                hint = resultHint;\r\n                                maxLength = resultMaxLength;\r\n                                break;\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            if (currentString.StartsWith(prefix))\r\n                            {\r\n                                hint = resultHint;\r\n                                maxLength = resultMaxLength;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                    if (hint != null)\r\n                    {\r\n                        break;\r\n                    }\r\n                }\r\n                if (maxLength != 0)\r\n                {\r\n                    if (builder.Length > maxLength)\r\n                    {\r\n                        builder.Length = maxLength;\r\n                    }\r\n                }\r\n            }\r\n            if (hint != null)\r\n            {\r\n                if (maxLength != 0)\r\n                {\r\n                    if (builder.Length == maxLength)\r\n                    {\r\n                        //inputFields[FIELD_EXPIRE_DATE].requestFocus();\r\n                    }\r\n                }\r\n                //phoneField.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));\r\n                for (int a = 0; a < builder.Length; a++)\r\n                {\r\n                    if (a < hint.Length)\r\n                    {\r\n                        if (hint[a] == ' ')\r\n                        {\r\n                            builder.Insert(a, ' ');\r\n                            a++;\r\n                            if (start == a && characterAction != 2 && characterAction != 3)\r\n                            {\r\n                                start++;\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        builder.Insert(a, ' ');\r\n                        if (start == a + 1 && characterAction != 2 && characterAction != 3)\r\n                        {\r\n                            start++;\r\n                        }\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                //phoneField.setTextColor(builder.length() > 0 ? Theme.getColor(Theme.key_windowBackgroundWhiteRedText4) : Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));\r\n            }\r\n            Text = builder.ToString();\r\n            if (start >= 0)\r\n            {\r\n                //phoneField.setSelection(start <= phoneField.length() ? start : phoneField.length());\r\n                selectionStart = start <= Text.Length ? start : Text.Length;\r\n                SelectionStart = selectionStart;\r\n            }\r\n            ignoreOnCardChange = false;\r\n            previousText = Text;\r\n        }\r\n\r\n        private void OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            OnTextChanging();\r\n\r\n            SelectionStart = selectionStart;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/CropControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.CropControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"800\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneBackgroundBrush}\" CacheMode=\"BitmapCache\">\r\n        <Grid.RenderTransform>\r\n            <TranslateTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid Width=\"480\" Height=\"800\" VerticalAlignment=\"Top\">\r\n            <Border Width=\"400\" Height=\"400\">\r\n                <Border x:Name=\"ImageBorder\" ManipulationStarted=\"ImageBorder_OnManipulationStarted\" Width=\"400\" Height=\"800\" Margin=\"0,-200\" CacheMode=\"BitmapCache\" Background=\"Transparent\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:PanAndZoom2Behavior x:Name=\"PanAndZoom\" CanZoom=\"True\" MaxZoom=\"4\"/>\r\n                    </i:Interaction.Behaviors>\r\n                    <Grid>\r\n                        <StackPanel x:Name=\"LoadingLabel\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Stretch\">\r\n                            <TextBlock HorizontalAlignment=\"Center\" Text=\"{Binding Resources.Loading, Source={StaticResource Strings}}\" />\r\n                            <!--<ProgressBar IsIndeterminate=\"True\"/>-->\r\n                        </StackPanel>\r\n                        <Image x:Name=\"Image\" Stretch=\"UniformToFill\" ImageOpened=\"Image_OnImageOpened\"/>\r\n                    </Grid>\r\n                </Border>\r\n            </Border>\r\n            <Border x:Name=\"CropCircle\" IsHitTestVisible=\"False\" Width=\"400\" Height=\"400\" BorderBrush=\"White\" BorderThickness=\"1\" CornerRadius=\"200\"/>\r\n            <Path Fill=\"#66000000\" IsHitTestVisible=\"False\">\r\n                <Path.Data>\r\n                    <GeometryGroup>\r\n                        <RectangleGeometry x:Name=\"Rect\" Rect=\"0,0 480,853\"/>\r\n                        <EllipseGeometry x:Name=\"Ellipse\" Center=\"240,400\" RadiusX=\"200\" RadiusY=\"200\"/>\r\n                    </GeometryGroup>\r\n                </Path.Data>\r\n            </Path>\r\n        </Grid>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"0\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n        <Grid x:Name=\"Bar\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform/>\r\n            </Grid.RenderTransform>\r\n            <controls:TelegramApplicationBar\r\n                x:Name=\"AppBar\"\r\n                VerticalAlignment=\"Bottom\"\r\n                MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                <controls:TelegramApplicationBar.Buttons>\r\n                    <controls:TelegramAppBarButton\r\n                        IsEnabled=\"True\"\r\n                        Grid.Column=\"3\" \r\n                        Tap=\"DoneButton_OnClick\"\r\n                        ImageSource=\"/Images/W10M/ic_done_2x.png\"\r\n                        Text=\"{Binding Resources.Done, Source={StaticResource Strings}}\"/>\r\n                </controls:TelegramApplicationBar.Buttons>\r\n            </controls:TelegramApplicationBar>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/CropControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing Windows.Graphics.Imaging;\r\nusing Windows.Storage;\r\nusing Windows.Storage.FileProperties;\r\nusing Windows.Storage.Streams;\r\nusing Microsoft.Phone.Controls;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class CropControl\r\n    {\r\n        public event EventHandler Close;\r\n\r\n        protected virtual void RaiseClose()\r\n        {\r\n            var handler = Close;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler<CropEventArgs> Crop;\r\n\r\n        protected virtual void RaiseCrop(CropEventArgs e)\r\n        {\r\n            var handler = Crop;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public CropControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += OnLoaded;\r\n        }\r\n\r\n        ~CropControl()\r\n        {\r\n            \r\n        }\r\n\r\n        public bool TryClose()\r\n        {\r\n            BeginCloseStoryboard(RaiseClose);\r\n\r\n            return true;\r\n        }\r\n\r\n        private void BeginCloseStoryboard(Action callback)\r\n        {\r\n            var frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            if (frame != null)\r\n            {\r\n                var page = frame.Content as PhoneApplicationPage;\r\n                if (page != null)\r\n                {\r\n                    page.IsHitTestVisible = true;\r\n                }\r\n            }\r\n\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            var opacityImageAniamtion = new ObjectAnimationUsingKeyFrames();\r\n            opacityImageAniamtion.KeyFrames.Add(new DiscreteObjectKeyFrame{ KeyTime = TimeSpan.FromSeconds(0.25), Value = 0 });\r\n            Storyboard.SetTarget(opacityImageAniamtion, ImageBorder);\r\n            Storyboard.SetTargetProperty(opacityImageAniamtion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityImageAniamtion);\r\n\r\n            var translateBarAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0 });\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateBarAniamtion, Bar);\r\n            Storyboard.SetTargetProperty(translateBarAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateBarAniamtion);\r\n\r\n            if (callback != null)\r\n            {\r\n                storyboard.Completed += (o, e) => callback();\r\n            }\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        private StorageFile _result;\r\n        private uint _width;\r\n        private uint _height;\r\n        private Stopwatch _stopwatch;\r\n\r\n\r\n        public async void SetFile(StorageFile result, PhotoFile file)\r\n        {\r\n            if (result == null) return;\r\n\r\n            _result = result;\r\n            var properties = await result.Properties.GetImagePropertiesAsync();\r\n            if (properties != null\r\n                && properties.Width > 0\r\n                && properties.Height > 0)\r\n            {\r\n                _width = properties.Width;\r\n                _height = properties.Height;\r\n                if (_width == 0 || _height == 0) return;\r\n\r\n                var minDimension = Math.Min(_width, _height);\r\n                ImageBorder.Width = _width*400.0/minDimension;\r\n                ImageBorder.Height = _height*400.0/minDimension;\r\n                ImageBorder.Margin = new Thickness((400.0 - ImageBorder.Width)/2.0, (400.0 - ImageBorder.Height)/2.0,\r\n                    (400.0 - ImageBorder.Width)/2.0, (400.0 - ImageBorder.Height)/2.0);\r\n\r\n                _stopwatch = Stopwatch.StartNew();\r\n                var stream = await result.GetThumbnailAsync(ThumbnailMode.SingleItem, 800);\r\n\r\n                System.Diagnostics.Debug.WriteLine(\"Picture.OpenReadAsync=\" + _stopwatch.Elapsed);\r\n\r\n                var thumbnailSource = new BitmapImage();\r\n                //thumbnailSource.DecodePixelHeight = (int) ImageBorder.Height * 3;\r\n                //thumbnailSource.DecodePixelWidth = (int) ImageBorder.Width * 3;\r\n                thumbnailSource.CreateOptions = BitmapCreateOptions.BackgroundCreation;\r\n                thumbnailSource.SetSource(stream.AsStream());\r\n                Image.Source = thumbnailSource;\r\n            }\r\n            else\r\n            {\r\n                var sourceStream = await result.OpenReadAsync();\r\n                var decoder = await BitmapDecoder.CreateAsync(sourceStream);\r\n\r\n                _width = decoder.OrientedPixelWidth;\r\n                _height = decoder.OrientedPixelHeight;\r\n                if (_width == 0 || _height == 0) return;\r\n\r\n                var minDimension = Math.Min(_width, _height);\r\n                ImageBorder.Width = _width * 400.0 / minDimension;\r\n                ImageBorder.Height = _height * 400.0 / minDimension;\r\n                ImageBorder.Margin = new Thickness((400.0 - ImageBorder.Width) / 2.0, (400.0 - ImageBorder.Height) / 2.0,\r\n                    (400.0 - ImageBorder.Width) / 2.0, (400.0 - ImageBorder.Height) / 2.0);\r\n\r\n                _stopwatch = Stopwatch.StartNew();\r\n                var resizedJpeg = await DialogDetailsViewModel.ResizeJpeg(sourceStream, 800, string.Empty, string.Empty);\r\n                var stream = new MemoryStream(resizedJpeg.Bytes);\r\n\r\n                System.Diagnostics.Debug.WriteLine(\"Picture.OpenReadAsync=\" + _stopwatch.Elapsed);\r\n\r\n                var thumbnailSource = new BitmapImage();\r\n                //thumbnailSource.DecodePixelHeight = (int) ImageBorder.Height * 3;\r\n                //thumbnailSource.DecodePixelWidth = (int) ImageBorder.Width * 3;\r\n                thumbnailSource.CreateOptions = BitmapCreateOptions.BackgroundCreation;\r\n                thumbnailSource.SetSource(stream);\r\n                Image.Source = thumbnailSource;\r\n            }\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= OnLoaded;\r\n\r\n            Rect.Rect = new Rect(0.0, 0.0, 480, 800);\r\n            Ellipse.Center = new Point(480 / 2.0, 800 / 2.0);\r\n\r\n            BeginOpenStoryboard();\r\n        }\r\n\r\n        private void BeginOpenStoryboard()\r\n        {\r\n            var frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            if (frame != null)\r\n            {\r\n                var page = frame.Content as PhoneApplicationPage;\r\n                if (page != null)\r\n                {\r\n                    page.IsHitTestVisible = false;\r\n                }\r\n            }\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYFrom = rootFrameHeight;\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYFrom });\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut } });\r\n            Storyboard.SetTarget(translateImageAniamtion, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n\r\n            var translateAnimaiton = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYFrom });\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0.0, EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut } });\r\n            Storyboard.SetTarget(translateAnimaiton, Bar);\r\n            Storyboard.SetTargetProperty(translateAnimaiton, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateAnimaiton);\r\n\r\n            LayoutRoot.Visibility = Visibility.Collapsed;\r\n            Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                LayoutRoot.Visibility = Visibility.Visible;\r\n                storyboard.Begin();\r\n            });\r\n        }\r\n\r\n        private async void DoneButton_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            var transform = CropCircle.TransformToVisual(ImageBorder);\r\n\r\n            var point = transform.Transform(new Point(0, 0));\r\n\r\n            var scaleFactor = _width / (ImageBorder.Width * PanAndZoom.CurrentScaleX);\r\n            var originalCropPointX = Math.Floor(point.X * PanAndZoom.CurrentScaleX * scaleFactor);\r\n            var originalCropPointY = Math.Floor(point.Y * PanAndZoom.CurrentScaleY * scaleFactor);\r\n            var originalCropSize = Math.Floor(400.0 * scaleFactor);\r\n\r\n            var finalMaxSize = 800.0;\r\n            var scale = Math.Min(finalMaxSize / originalCropSize, 1.0);\r\n\r\n            var cropedImage = await GetCroppedImageAsync(_result, new Point(originalCropPointX, originalCropPointY), new Size(originalCropSize, originalCropSize), scale);\r\n\r\n\r\n            RaiseCrop(new CropEventArgs{ File = cropedImage });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get cropped image\r\n        /// </summary>\r\n        /// <param name=\"originalImgFile\"> Original image </param>\r\n        /// <param name=\"startPoint\"> Crop start point at original image coords </param>\r\n        /// <param name=\"cropSize\"> Crop size at original image coords </param>\r\n        /// <param name=\"scale\"> Scaling for final crop image respect to original size </param>\r\n        /// <returns></returns>\r\n        public static async Task<byte[]> GetCroppedImageAsync(StorageFile originalImgFile, Point startPoint, Size cropSize, double scale)\r\n        {\r\n            if (double.IsNaN(scale) || double.IsInfinity(scale))\r\n            {\r\n                scale = 1.0;\r\n            }\r\n\r\n            // Convert start point and size to integer. \r\n            uint startPointX = (uint)Math.Floor(startPoint.X * scale);\r\n            uint startPointY = (uint)Math.Floor(startPoint.Y * scale);\r\n            uint height = (uint)Math.Floor(cropSize.Height * scale);\r\n            uint width = (uint)Math.Floor(cropSize.Width * scale);\r\n\r\n\r\n            using (IRandomAccessStream stream = await originalImgFile.OpenReadAsync())\r\n            {\r\n                // Create a decoder from the stream. With the decoder, we can get  \r\n                // the properties of the image. \r\n                BitmapDecoder decoder = await BitmapDecoder.CreateAsync(stream);\r\n\r\n                // The scaledSize of original image. \r\n                uint orientedScaledWidth = (uint)Math.Floor(decoder.OrientedPixelWidth * scale);\r\n                uint orientedScaledHeight = (uint)Math.Floor(decoder.OrientedPixelHeight * scale);\r\n\r\n                uint scaledWidth = (uint)Math.Floor(decoder.PixelWidth * scale);\r\n                uint scaledHeight = (uint)Math.Floor(decoder.PixelHeight * scale);\r\n\r\n                // Refine the start point and the size.  \r\n                if (startPointX + width > orientedScaledWidth)\r\n                {\r\n                    startPointX = orientedScaledWidth - width;\r\n                }\r\n\r\n                if (startPointY + height > orientedScaledHeight)\r\n                {\r\n                    startPointY = orientedScaledHeight - height;\r\n                }\r\n\r\n                // Create cropping BitmapTransform and define the bounds. \r\n                BitmapTransform transform = new BitmapTransform();\r\n                BitmapBounds bounds = new BitmapBounds();\r\n                bounds.X = startPointX;\r\n                bounds.Y = startPointY;\r\n                bounds.Height = height;\r\n                bounds.Width = width;\r\n                transform.Bounds = bounds;\r\n                transform.InterpolationMode = BitmapInterpolationMode.Fant;\r\n\r\n                transform.ScaledWidth = scaledWidth;\r\n                transform.ScaledHeight = scaledHeight;\r\n\r\n                // Get the cropped pixels within the bounds of transform. \r\n                PixelDataProvider pix = await decoder.GetPixelDataAsync(\r\n                    BitmapPixelFormat.Bgra8,\r\n                    BitmapAlphaMode.Straight,\r\n                    transform,\r\n                    ExifOrientationMode.RespectExifOrientation,\r\n                    ColorManagementMode.ColorManageToSRgb);\r\n\r\n                using (var destinationStream = new InMemoryRandomAccessStream())\r\n                {\r\n                    var encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.JpegEncoderId, destinationStream);\r\n                    encoder.SetPixelData(decoder.BitmapPixelFormat, decoder.BitmapAlphaMode, width, height, decoder.DpiX, decoder.DpiY, pix.DetachPixelData());\r\n                    await encoder.FlushAsync();\r\n\r\n                    var reader = new DataReader(destinationStream.GetInputStreamAt(0));\r\n                    var bytes = new byte[destinationStream.Size];\r\n                    await reader.LoadAsync((uint)destinationStream.Size);\r\n                    reader.ReadBytes(bytes);\r\n\r\n                    return bytes;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ImageBorder_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        private void Image_OnImageOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            LoadingLabel.Visibility = Visibility.Collapsed;\r\n        }\r\n    }\r\n\r\n    public class CropEventArgs\r\n    {\r\n        public byte[] File { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/DateTextBox.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Text;\r\nusing System.Windows.Controls;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public class DateTextBox : TextBox\r\n    {\r\n        private string previousText = string.Empty;\r\n        private int selectionStart;\r\n\r\n        private int characterAction = -1;\r\n        private bool isYear;\r\n        private int actionPosition;\r\n\r\n        private bool ignoreOnCardChange;\r\n\r\n        public DateTextBox()\r\n        {\r\n            //TextChanging += OnTextChanging;\r\n            TextChanged += OnTextChanged;\r\n        }\r\n\r\n        private void Started()\r\n        {\r\n            var start = SelectionStart;\r\n            var after = Math.Max(0, Text.Length - previousText.Length);\r\n            var count = Math.Max(0, previousText.Length - Text.Length);\r\n\r\n            if (count == 0 && after == 1)\r\n            {\r\n                isYear = Text.IndexOf('/') != -1;\r\n                characterAction = 1;\r\n            }\r\n            else if (count == 1 && after == 0)\r\n            {\r\n                if (previousText[start] == '/' && start > 0)\r\n                {\r\n                    isYear = false;\r\n                    characterAction = 3;\r\n                    actionPosition = start - 1;\r\n                }\r\n                else\r\n                {\r\n                    characterAction = 2;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                characterAction = -1;\r\n            }\r\n        }\r\n\r\n        private void OnTextChanging()\r\n        {\r\n            Started();\r\n\r\n            if (ignoreOnCardChange)\r\n            {\r\n                return;\r\n            }\r\n\r\n            int start = SelectionStart;\r\n            String str = Text;\r\n            if (characterAction == 3)\r\n            {\r\n                str = str.Substring(0, actionPosition) + str.Substring(actionPosition + 1);\r\n                start--;\r\n            }\r\n            StringBuilder builder = new StringBuilder(str.Length);\r\n            for (int a = 0; a < str.Length; a++)\r\n            {\r\n                char ch = str[a];\r\n                if (char.IsDigit(ch))\r\n                {\r\n                    builder.Append(ch);\r\n                }\r\n            }\r\n            ignoreOnCardChange = true;\r\n            //inputFields[FIELD_EXPIRE_DATE].setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));\r\n            if (builder.Length > 4)\r\n            {\r\n                builder.Length = 4;\r\n            }\r\n            if (builder.Length < 2)\r\n            {\r\n                isYear = false;\r\n            }\r\n            bool isError = false;\r\n            if (isYear)\r\n            {\r\n                String[] args = new String[builder.Length > 2 ? 2 : 1];\r\n                args[0] = builder.ToString().Substring(0, 2);\r\n                if (args.Length == 2)\r\n                {\r\n                    args[1] = builder.ToString().Substring(2);\r\n                }\r\n                if (builder.Length == 4 && args.Length == 2)\r\n                {\r\n                    int month = int.Parse(args[0]);\r\n                    int year = int.Parse(args[1]) + 2000;\r\n                    DateTime rightNow = DateTime.Now;\r\n                    int currentYear = rightNow.Year;\r\n                    int currentMonth = rightNow.Month + 1;\r\n                    if (year < currentYear || year == currentYear && month < currentMonth)\r\n                    {\r\n                        //inputFields[FIELD_EXPIRE_DATE].setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteRedText4));\r\n                        isError = true;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    int value = int.Parse(args[0]);\r\n                    if (value > 12 || value == 0)\r\n                    {\r\n                        //inputFields[FIELD_EXPIRE_DATE].setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteRedText4));\r\n                        isError = true;\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (builder.Length == 1)\r\n                {\r\n                    int value = int.Parse(builder.ToString());\r\n                    if (value != 1 && value != 0)\r\n                    {\r\n                        builder.Insert(0, \"0\");\r\n                        start++;\r\n                    }\r\n                }\r\n                else if (builder.Length == 2)\r\n                {\r\n                    int value = int.Parse(builder.ToString());\r\n                    if (value > 12 || value == 0)\r\n                    {\r\n                        //inputFields[FIELD_EXPIRE_DATE].setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteRedText4));\r\n                        isError = true;\r\n                    }\r\n                    start++;\r\n                }\r\n            }\r\n            if (!isError && builder.Length == 4)\r\n            {\r\n                //inputFields[need_card_name ? FIELD_CARDNAME : FIELD_CVV].requestFocus();\r\n            }\r\n            if (builder.Length == 2)\r\n            {\r\n                builder.Append('/');\r\n                start++;\r\n            }\r\n            else if (builder.Length > 2 && builder[2] != '/')\r\n            {\r\n                builder.Insert(2, '/');\r\n                start++;\r\n            }\r\n\r\n            Text = builder.ToString();\r\n            if (start >= 0)\r\n            {\r\n                selectionStart = start <= Text.Length ? start : Text.Length;\r\n                SelectionStart = selectionStart;\r\n            }\r\n            ignoreOnCardChange = false;\r\n\r\n            previousText = Text;\r\n        }\r\n\r\n        private void OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            OnTextChanging();\r\n\r\n            SelectionStart = selectionStart;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/DecryptedMessageControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.DecryptedMessageControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"FailedMessageBackgroundBrush\" Color=\"#FFFCE4E6\"/>\r\n        <SolidColorBrush x:Key=\"FailedMessageBorderBrush\" Color=\"#33ED4C59\"/>\r\n        <SolidColorBrush x:Key=\"FailedMessageForegroundBrush\" Color=\"#FFCD7C83\"/>\r\n        \r\n        <SolidColorBrush x:Key=\"ServiceMessageBackgroundBrush\" Color=\"#59597289\"/>\r\n        <SolidColorBrush x:Key=\"ServiceMessageBorderBrush\" Color=\"#59597289\"/>\r\n        <SolidColorBrush x:Key=\"ServiceMessageForegroundBrush\" Color=\"#FFFFFFFF\"/>\r\n        \r\n        <SolidColorBrush x:Key=\"OutputBackgroundBrushLight\" Color=\"#FFE3F4FF\"/>\r\n        <SolidColorBrush x:Key=\"OutputBorderBrushLight\" Color=\"#6686A9C9\"/>\r\n        <SolidColorBrush x:Key=\"OutputSubtleBrushLight\" Color=\"#FF7C9FBA\"/>\r\n        <SolidColorBrush x:Key=\"OutputForegroundBrushLight\" Color=\"#FF000000\"/>\r\n        <SolidColorBrush x:Key=\"InputBackgroundBrushLight\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#4D86A9C9\"/>\r\n        <SolidColorBrush x:Key=\"InputSubtleBrushLight\" Color=\"#FF93989D\"/>\r\n        <SolidColorBrush x:Key=\"InputForegroundBrushLight\" Color=\"#FF000000\"/>\r\n        <SolidColorBrush x:Key=\"StickerFooterBackgroundBrushLight\" Color=\"#49496A95\"/>\r\n        <SolidColorBrush x:Key=\"StickerFooterSubtleBrushLight\" Color=\"#FFFFFFFF\"/>\r\n\r\n        <SolidColorBrush x:Key=\"OutputBackgroundBrushDark\" Color=\"#FF2B2B2B\"/>\r\n        <SolidColorBrush x:Key=\"OutputBorderBrushDark\" Color=\"#0086A9C9\"/>\r\n        <SolidColorBrush x:Key=\"OutputSubtleBrushDark\" Color=\"#FFA0A0A0\"/>\r\n        <SolidColorBrush x:Key=\"OutputForegroundBrushDark\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"InputBackgroundBrushDark\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#0086A9C9\"/>\r\n        <SolidColorBrush x:Key=\"InputSubtleBrushDark\" Color=\"#FF93989D\"/>\r\n        <SolidColorBrush x:Key=\"InputForegroundBrushDark\" Color=\"#FF000000\"/>\r\n        <SolidColorBrush x:Key=\"StickerFooterBackgroundDark\" Color=\"#49496A95\"/>\r\n        <SolidColorBrush x:Key=\"StickerFooterBackgroundBrushDark\" Color=\"#49496A95\"/>\r\n        <SolidColorBrush x:Key=\"StickerFooterSubtleBrushDark\" Color=\"#FFFFFFFF\"/>\r\n        \r\n        <DataTemplate x:Key=\"SecretPhotoTemplate\">\r\n            <Grid Margin=\"-10,-4,-10,2\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <Grid Width=\"256\" Height=\"256\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"*\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <Grid Grid.Row=\"1\" Width=\"256\" Height=\"256\" Background=\"#66000000\">\r\n                        <Image Source=\"{Binding Self, Converter={StaticResource ForcePhotoConverter}}\" Opacity=\"0\" Stretch=\"UniformToFill\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Margin=\"1\"/>\r\n                        <Image Source=\"{Binding Converter={StaticResource SecretPhotoToThumbConverter}}\" Stretch=\"UniformToFill\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n                        <controls:SecretPhotoPlaceholder \r\n                            Width=\"256\" Height=\"256\"\r\n                            ShowHint=\"False\"\r\n                            TTLParams=\"{Binding TTLParams}\" \r\n                            DownloadingProgress=\"{Binding DownloadingProgress}\"\r\n                            UploadingProgress=\"{Binding UploadingProgress}\"\r\n                            StartTimer=\"SecretPhotoPlaceholder_OnStartTimer\" \r\n                            Elapsed=\"SecretPhotoPlaceholder_OnElapsed\"\r\n                            micro:Message.Attach=\"[Event CancelUploading] = [Action CancelUploading($DataContext)]; [Event CancelDownloading] = [Action CancelPhotoDownloading($DataContext)]\"/>\r\n\r\n                        <!--<Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Margin=\"4\" Background=\"#7F000000\">\r\n                            <TextBlock Margin=\"6,1,6,2\"\r\n\t\t\t\t\t        Text=\"{Binding TTL, Converter={StaticResource TTLMediaToTimerStringConverter}}\"\r\n\t\t\t\t\t        Foreground=\"White\"\r\n\t\t\t\t\t        FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"/>\r\n                        </Grid>-->\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <emojiPanel:TelegramRichTextBox\r\n                    Grid.Row=\"1\"\r\n                    Width=\"335\"\r\n                    Margin=\"-6,0\"\r\n                    MaxHeight=\"400\"\r\n                    Visibility=\"{Binding Caption, Converter={StaticResource EmptyTLStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\"\r\n                    Text=\"{Binding Caption}\"\r\n                    HorizontalAlignment=\"Stretch\"\r\n                    Background=\"{Binding Converter={StaticResource OverlayAccentBrush}}\"\r\n                    TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                    FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                    Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <templateSelectors:DecryptedWebPageMediaTemplateSelector\r\n            x:Key=\"DecryptedWebPageMediaTemplateSelector\"\r\n            EmptyTemplate=\"{StaticResource MediaEmptyTemplate}\"\r\n            WebPageTemplate=\"{StaticResource WebPageMediaTemplate}\"\r\n            WebPageSmallPhotoTemplate=\"{StaticResource WebPageSmallPhotoMediaTemplate}\"\r\n            WebPagePhotoTemplate=\"{StaticResource WebPagePhotoMediaTemplate}\"\r\n            WebPagePendingTemplate=\"{StaticResource WebPagePendingMediaTemplate}\"\r\n            WebPageGifTemplate=\"{StaticResource WebPageGifMediaTemplate}\"\r\n            UnsupportedTemplate=\"{StaticResource UnsupportedTemplate}\"/>\r\n\r\n        <DataTemplate x:Key=\"WebPageTemplate\">\r\n            <Grid>\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <ContentControl Grid.Row=\"1\" Content=\"{Binding}\" MaxHeight=\"1500\" ContentTemplate=\"{Binding Converter={StaticResource DecryptedWebPageMediaTemplateSelector}}\"/>\r\n            </Grid>\r\n        </DataTemplate>\r\n\r\n        <templateSelectors:DecryptedMediaTemplateSelector\r\n                x:Key=\"DecryptedMediaTemplateSelector\"\r\n                EmptyTemplate=\"{StaticResource MediaEmptyTemplate}\"\r\n                GroupTemplate=\"{StaticResource GroupTemplate}\"\r\n                StickerTemplate=\"{StaticResource StickerTemplate}\"\r\n                ContactTemplate=\"{StaticResource ContactTemplate}\"\r\n                PhotoTemplate=\"{StaticResource PhotoTemplate}\"\r\n                SecretPhotoTemplate=\"{StaticResource SecretPhotoTemplate}\"\r\n                VideoTemplate=\"{StaticResource VideoTemplate}\"\r\n                GeoPointTemplate=\"{StaticResource GeoPointTemplate}\"\r\n                VenueTemplate=\"{StaticResource VenueTemplate}\"\r\n                DocumentTemplate=\"{StaticResource DocumentTemplate}\"\r\n                GifTemplate=\"{StaticResource GifTemplate}\"\r\n                AudioTemplate=\"{StaticResource AudioTemplate}\"\r\n                WebPageTemplate=\"{StaticResource WebPageTemplate}\"\r\n                UnsupportedTemplate=\"{StaticResource UnsupportedTemplate}\"/>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"MainItemGrid2\">\r\n\r\n        <Grid x:Name=\"MainItemGrid\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\" />\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"18\"/>\r\n                <ColumnDefinition x:Name=\"BeforeLastColumn\" Width=\"Auto\"/>\r\n                <ColumnDefinition x:Name=\"LastColumn\" Width=\"*\"/>\r\n                <ColumnDefinition Width=\"18\"/>\r\n                <ColumnDefinition Width=\"Auto\" />\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"6\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <views:ConversationTileControl \r\n                x:Name=\"Tile\"\r\n                Tap=\"Tile_OnTap\"\r\n                Grid.Column=\"1\" Grid.Row=\"1\"\r\n                Margin=\"18,0,4,0\" VerticalAlignment=\"Top\"\r\n                Size=\"45\" LabelFontSize=\"19\"\r\n                Source=\"{Binding From.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                Fill=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                Text=\"{Binding From, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n            <Border x:Name=\"CornerBorder\" Grid.Column=\"2\" Grid.Row=\"1\" Margin=\"0,0,0,6\" BorderBrush=\"{StaticResource InputBorderBrushLight}\" BorderThickness=\"0,0,1,0\"/>\r\n            <Path x:Name=\"Corner\" \r\n                  Grid.Column=\"2\" Grid.Row=\"1\" \r\n                  HorizontalAlignment=\"Right\" \r\n                  Margin=\"0,12,-1,0\" \r\n                  VerticalAlignment=\"Top\" \r\n                  Data=\"F1 M12,12 L0,0 L12,0\" \r\n                  Width=\"12\" Height=\"12\" \r\n                  Stretch=\"Fill\" \r\n                  Fill=\"{StaticResource InputBackgroundBrushLight}\" \r\n                  StrokeThickness=\"1\" \r\n                  Stroke=\"{StaticResource InputBorderBrushLight}\"\r\n                  RenderTransformOrigin=\"0.5, 0.5\">\r\n                <Path.RenderTransform>\r\n                    <ScaleTransform x:Name=\"PathScaleTransform\" ScaleX=\"1\"/>\r\n                </Path.RenderTransform>\r\n            </Path>\r\n\r\n            <Border x:Name=\"MainBorder\" Grid.Column=\"3\" Grid.Row=\"1\" Margin=\"0,0,0,6\" Background=\"{StaticResource InputBackgroundBrushLight}\" BorderBrush=\"{StaticResource InputBorderBrushLight}\" BorderThickness=\"0,1,1,1\">\r\n                <StackPanel x:Name=\"Panel\">\r\n                    <Border x:Name=\"Header\" MaxWidth=\"335\" Margin=\"0,0,0,-6\" Background=\"{StaticResource InputBackgroundBrushLight}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Visibility=\"Collapsed\">\r\n                        <StackPanel x:Name=\"CaptionPanel\" Margin=\"12,6\">\r\n                            <toolkit:WrapPanel x:Name=\"FromLabelPanel\">\r\n                                <TextBlock x:Name=\"FromLabel\"\r\n                                    Text=\"{Binding From.FullName, Converter={StaticResource NonBreakingStringConverter}}\"\r\n                                    Foreground=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                                    MaxWidth=\"293\"\r\n                                    TextTrimming=\"WordEllipsis\"\r\n                                    Margin=\"0,2,0,0\"\r\n                                    Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n                            </toolkit:WrapPanel>\r\n                            <!--<TextBlock x:Name=\"FwdFromGrid\" Margin=\"0\" FontSize=\"20\" TextWrapping=\"Wrap\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" \r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenFwdContactDetails($DataContext)]\">\r\n                                <Run Text=\"{Binding Resources.ForwardedMessage, Source={StaticResource Strings}}\"/>\r\n                                <Run x:Name=\"FwdFromLabel\" Text=\"{Binding FwdFrom.FullName}\" FontWeight=\"SemiBold\"/>\r\n                            </TextBlock>-->\r\n                            <TextBlock \r\n                                x:Name=\"ViaBotGrid\"\r\n                                Tap=\"ViaBot_Tap\" \r\n                                Text=\"{Binding ViaBotName, Converter={StaticResource DecryptedViaBotToStringConverter}}\" \r\n                                Margin=\"0,-6,0,0\" \r\n                                Foreground=\"{StaticResource TelegramTextAccentBrush}\" \r\n                                FontSize=\"20\"/>\r\n\r\n                            <ContentControl \r\n                                x:Name=\"ReplyContent\"\r\n                                Canvas.ZIndex=\"2\"\r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\"\r\n                                Content=\"{Binding ReplyInfo.Reply}\" \r\n                                Margin=\"0\"\r\n                                ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource DecryptedReplyTemplateSelector}}\"\r\n                                HorizontalContentAlignment=\"Stretch\"/>\r\n                        </StackPanel>\r\n                    </Border>\r\n                    <Grid x:Name=\"MessageGrid\" Canvas.ZIndex=\"2\" Margin=\"0,6,0,0\">\r\n                        <Grid>\r\n                            <emojiPanel:TelegramRichTextBox\r\n                                x:Name=\"InputMessage\"\r\n                                MaxHeight=\"1500\"\r\n                                MinWidth=\"100\"\r\n                                MaxWidth=\"335\"\r\n                                Visibility=\"{Binding Media, Converter={StaticResource GeoLocationToVisibilityConverter}}\"\r\n                                Entities=\"{Binding Entities}\"\r\n                                Text=\"{Binding Message}\"\r\n                                FooterFontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                emojiPanel:BrowserNavigationService.DecryptedMessage=\"{Binding}\"\r\n                                TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                                MoreElement=\"{Binding ElementName=MorePanel}\"\r\n                                FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                                Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n                            <Border x:Name=\"MorePanel\" Background=\"{StaticResource InputBackgroundBrushLight}\" VerticalAlignment=\"Bottom\" Canvas.ZIndex=\"3\" Visibility=\"Collapsed\" Tap=\"MorePanel_OnTap\">\r\n                                <TextBlock Canvas.ZIndex=\"4\"\r\n                                    Text=\"{Binding Resources.More, Source={StaticResource Strings}, StringFormat='\\{0\\}...'}\" \r\n                                    TextDecorations=\"Underline\" \r\n                                    Margin=\"12,-6,12,0\"\r\n                                    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" \r\n                                    FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                    VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Left\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Grid x:Name=\"MediaGrid\">\r\n                        <ContentControl\r\n                            x:Name=\"MediaContentControl\"\r\n                            MaxHeight=\"1500\"\r\n                            Background=\"Transparent\"\r\n                            Tap=\"MediaContentControl_OnTap\"\r\n                            Margin=\"12,0,12,0\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            HorizontalAlignment=\"Stretch\"\r\n                            Content=\"{Binding Media}\"\r\n                            ContentTemplate=\"{Binding MediaSelf, Converter={StaticResource DecryptedMediaTemplateSelector}}\"/>\r\n                    </Grid>\r\n                    <Border x:Name=\"Footer\"\r\n                        MaxWidth=\"335\"\r\n                        Margin=\"0,-1,0,0\" \r\n                        Canvas.ZIndex=\"1\" \r\n                        VerticalAlignment=\"Bottom\"\r\n                        Background=\"{StaticResource InputBackgroundBrushLight}\"\r\n                        IsHitTestVisible=\"False\">\r\n                        <ContentControl x:Name=\"FooterContent\" HorizontalContentAlignment=\"Stretch\">\r\n                            <Grid x:Name=\"FooterContentGrid\" Margin=\"6,2,6,6\" HorizontalAlignment=\"Right\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <!--<TextBlock Grid.Column=\"0\" Margin=\"0,-1,0,2\" \r\n                                    Text=\"{Binding Status, Converter={StaticResource MessageStatusConverter}}\"\r\n                                    FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"/>-->\r\n                                <!--<TextBlock Grid.Column=\"1\" Margin=\"0,-1,0,2\" micro:Message.Attach=\"[Event Tap] = [Action Resend($DataContext)]\"\r\n                                    Text=\"{Binding Resources.Retry, Source={StaticResource Strings}, StringFormat='\\{0\\}'}\" \r\n                                    TextDecorations=\"Underline\"\r\n                                    FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                    Visibility=\"{Binding Status, Converter={StaticResource StringEqualsToVisibilityConverter}, ConverterParameter=Failed}\"/>-->\r\n                                \r\n                                <!--<TextBlock x:Name=\"EditLabel\" Grid.Column=\"4\" Margin=\"0,2\" Visibility=\"{Binding EditDateVisibility}\"\r\n                                    Text=\" \"\r\n                                    FontSize=\"{Binding DefaultSystemSegoeUISymbolFontSize, Source={StaticResource ScaledText}}\"\r\n                                    FontFamily=\"Segoe UI Symbol\"/>-->\r\n                                <TextBlock Grid.Column=\"5\" Margin=\"0,-1,0,2\" \r\n                                    Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' \\{0\\} '}\"\r\n                                    FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"/>\r\n                                <Viewbox Grid.Column=\"6\" Margin=\"0,6,6,6\" Height=\"{Binding DefaultSystemIconSize, Source={StaticResource ScaledText}}\">\r\n                                    <controls:StatusControl\r\n                                        x:Name=\"Status\"\r\n                                        Status=\"{Binding Status}\"\r\n                                        Fill=\"{StaticResource OutputSubtleBrushLight}\"/>\r\n                                </Viewbox>\r\n                            </Grid>\r\n                        </ContentControl>\r\n                    </Border>\r\n                </StackPanel>\r\n            </Border>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/DecryptedMessageControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Views.Dialogs;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class DecryptedMessageControl\r\n    {\r\n\r\n        public static readonly DependencyProperty MessageProperty = DependencyProperty.Register(\r\n            \"Message\", typeof (TLDecryptedMessageBase), typeof (DecryptedMessageControl), new PropertyMetadata(default(TLDecryptedMessageBase), OnMessageChanged));\r\n\r\n        private static void OnMessageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var messageControl = d as DecryptedMessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                messageControl._isChannelMessage = false;\r\n\r\n                messageControl.UpdateBinding(e.NewValue as TLDecryptedMessageBase);\r\n                //messageControl.ClearBinding(e.NewValue as TLDecryptedMessageBase);\r\n                //messageControl.SetBinding(e.NewValue as TLDecryptedMessageBase);\r\n\r\n                var messageBase = e.NewValue as TLDecryptedMessageBase;\r\n                if (messageBase != null)\r\n                {\r\n                    var message = messageBase as TLDecryptedMessage;\r\n                    var messageService = messageBase as TLDecryptedMessageService;\r\n                    if (message != null)\r\n                    {\r\n                        messageControl.ToMessageTemplate(message);\r\n                    }\r\n                    else if (messageService != null)\r\n                    {\r\n                        messageControl.ToServiceTemplate(messageService);\r\n                    }\r\n                    else\r\n                    {\r\n                        messageControl.ToEmptyTemplate();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    messageControl.ToEmptyTemplate();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ToMessageTemplate(TLDecryptedMessage message)\r\n        {\r\n            DrawBubble(message);\r\n        }\r\n\r\n        private static bool GetIsChannelMessage(TLDecryptedMessageBase messageCommon)\r\n        {\r\n            return false;\r\n        }\r\n\r\n        private static bool IsDocument(TLDecryptedMessage message)\r\n        {\r\n            if (message == null) return false;\r\n\r\n            var mediaDocument = message.Media as TLDecryptedMessageMediaDocument45;\r\n            if (mediaDocument == null) return false;\r\n\r\n            var document = mediaDocument.Document as IAttributes;\r\n            if (document == null) return false;\r\n\r\n            foreach (var attribute in document.Attributes)\r\n            {\r\n                if (attribute is TLDocumentAttributeAnimated\r\n                    || attribute is TLDocumentAttributeSticker\r\n                    || attribute is TLDocumentAttributeVideo\r\n                    )\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var documentAttributeAudio = attribute as TLDocumentAttributeAudio46;\r\n                if (documentAttributeAudio != null && documentAttributeAudio.Voice)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private bool GetOutput(TLDecryptedMessageBase message)\r\n        {\r\n            return message != null && message.Out.Value && !_isChannelMessage;\r\n        }\r\n\r\n        private void DrawBubble(TLDecryptedMessageBase messageCommon)\r\n        {\r\n            var isLightTheme = (Visibility) Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            var message = messageCommon as TLDecryptedMessage;\r\n            var messageService = messageCommon as TLDecryptedMessageService;\r\n            var unreadSeparator = false;//messageService != null && messageService.Action is TLDecryptedMessageActionUnreadMessages;\r\n            var sticker = message != null && message.IsSticker();\r\n            _isChannelMessage = GetIsChannelMessage(messageCommon);\r\n            var output = GetOutput(messageCommon);\r\n            var grouped = message != null && message.Media is TLDecryptedMessageMediaGroup;\r\n\r\n            FromLabel.Visibility = Visibility.Collapsed;\r\n            Tile.Visibility = Visibility.Collapsed;\r\n\r\n            SetBackgroundAndBorder(messageCommon);\r\n\r\n            Brush foreground;\r\n            if (messageService != null)\r\n            {\r\n                foreground = (Brush)Resources[\"ServiceMessageForegroundBrush\"];\r\n            }\r\n            else\r\n            {\r\n                foreground = isLightTheme\r\n                    ? (output\r\n                        ? (Brush)Resources[\"OutputForegroundBrushLight\"]\r\n                        : (Brush)Resources[\"InputForegroundBrushLight\"])\r\n                    : (output\r\n                        ? (Brush)Resources[\"OutputForegroundBrushDark\"]\r\n                        : (Brush)Resources[\"InputForegroundBrushDark\"]);            \r\n            }   \r\n\r\n            Brush footerForeground;\r\n            if (!sticker)\r\n            {\r\n                footerForeground = isLightTheme\r\n                ? (output\r\n                    ? (Brush)Resources[\"OutputSubtleBrushLight\"]\r\n                    : (Brush)Resources[\"InputSubtleBrushLight\"])\r\n                : (output\r\n                    ? (Brush)Resources[\"OutputSubtleBrushDark\"]\r\n                    : (Brush)Resources[\"InputSubtleBrushDark\"]);\r\n            }\r\n            else\r\n            {\r\n                footerForeground = isLightTheme\r\n                    ? (Brush)Resources[\"StickerFooterSubtleBrushLight\"]\r\n                    : (Brush)Resources[\"StickerFooterSubtleBrushDark\"];\r\n            }\r\n\r\n            Brush footerBackground;\r\n            if (!sticker)\r\n            {\r\n                footerBackground = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n            else\r\n            {\r\n                footerBackground = isLightTheme\r\n                    ? (Brush)Resources[\"StickerFooterBackgroundBrushLight\"]\r\n                    : (Brush)Resources[\"StickerFooterBackgroundBrushDark\"];\r\n            }\r\n\r\n            Foreground = foreground;\r\n            InputMessage.SetForeground(foreground);\r\n\r\n            var beforeLastGridLength = output && messageService == null \r\n                ? new GridLength(1.0, GridUnitType.Star)\r\n                : GridLength.Auto;\r\n\r\n            var lastGridLength = output && messageService == null \r\n                ? GridLength.Auto\r\n                : new GridLength(1.0, GridUnitType.Star);\r\n\r\n            var bubbleGridColumn = output && messageService == null \r\n                ? 4\r\n                : 3;\r\n\r\n            var cornerGridColumn = output && messageService == null \r\n                ? 5\r\n                : 2;\r\n\r\n            Corner.Margin = output\r\n                ? new Thickness(-1.0, 12.0, 0.0, 0.0)\r\n                : new Thickness(0.0, 12.0, -1.0, 0.0);\r\n            Corner.HorizontalAlignment = output\r\n                ? HorizontalAlignment.Left\r\n                : HorizontalAlignment.Right;\r\n            PathScaleTransform.ScaleX = output ? -1.0 : 1.0;\r\n            Corner.Visibility = messageService != null ? Visibility.Collapsed : Visibility.Visible;\r\n            CornerBorder.Visibility = messageService != null ? Visibility.Collapsed : Visibility.Visible;\r\n            if (unreadSeparator)\r\n            {\r\n                MainBorder.Margin = new Thickness(-18.0, 0.0, -18.0, 6.0);\r\n                MainBorder.HorizontalAlignment = HorizontalAlignment.Stretch;\r\n                Panel.HorizontalAlignment = HorizontalAlignment.Center;\r\n            }\r\n            else if (messageService != null)\r\n            {\r\n                MainBorder.Margin = new Thickness(0.0, 0.0, 0.0, 6.0);\r\n                MainBorder.HorizontalAlignment = HorizontalAlignment.Center;\r\n                Panel.HorizontalAlignment = HorizontalAlignment.Center;\r\n            }\r\n            else\r\n            {\r\n                MainBorder.Margin = new Thickness(0.0, 0.0, 0.0, 6.0);\r\n                MainBorder.HorizontalAlignment = HorizontalAlignment.Left;\r\n                Panel.HorizontalAlignment = HorizontalAlignment.Left;\r\n            }\r\n            Grid.SetColumnSpan(MainBorder, messageService != null ? 2 : 1);\r\n            InputMessage.TextAlignment = messageService != null ? TextAlignment.Center : TextAlignment.Left;\r\n\r\n            MainBorder.BorderThickness = output\r\n                ? new Thickness(1.0, 1.0, 0.0, 1.0)\r\n                : new Thickness(0.0, 1.0, 1.0, 1.0);\r\n            CornerBorder.BorderThickness = output\r\n                ? new Thickness(1.0, 0.0, 0.0, 0.0)\r\n                : new Thickness(0.0, 0.0, 1.0, 0.0);\r\n\r\n            BeforeLastColumn.Width = beforeLastGridLength;\r\n            LastColumn.Width = lastGridLength;\r\n            Grid.SetColumn(MainBorder, bubbleGridColumn);\r\n            Grid.SetColumn(Corner, cornerGridColumn);\r\n            Grid.SetColumn(CornerBorder, cornerGridColumn);\r\n\r\n            Header.MaxWidth = messageCommon != null ? messageCommon.MediaWidth : 12.0 + 311.0 + 12.0;\r\n            //FwdFromGrid.Visibility = Visibility.Collapsed;\r\n\r\n            var message45 = message as TLDecryptedMessage45;\r\n            ViaBotGrid.Visibility = message45 != null && !TLString.IsNullOrEmpty(message45.ViaBotName) ? Visibility.Visible : Visibility.Collapsed;\r\n            ReplyContent.Visibility = message != null ? message.ReplyVisibility : Visibility.Collapsed;\r\n            if (FromLabel.Visibility == Visibility.Visible\r\n                //|| FwdFromGrid.Visibility == Visibility.Visible\r\n                || ViaBotGrid.Visibility == Visibility.Visible\r\n                || ReplyContent.Visibility == Visibility.Visible)\r\n            {\r\n                Header.Visibility = Visibility.Visible;\r\n            }\r\n            else\r\n            {\r\n                Header.Visibility = Visibility.Collapsed;\r\n            }\r\n            if (FromLabel.Visibility == Visibility.Visible\r\n                //&& FwdFromGrid.Visibility == Visibility.Collapsed\r\n                && ViaBotGrid.Visibility == Visibility.Collapsed\r\n                && ReplyContent.Visibility == Visibility.Collapsed\r\n                && message != null\r\n                && !TLString.IsNullOrEmpty(message.Message))\r\n            {\r\n                FromLabel.Margin = new Thickness(0.0, 2.0, 0.0, -4.0);\r\n            }\r\n            else if (FromLabel.Visibility == Visibility.Visible\r\n                //&& FwdFromGrid.Visibility == Visibility.Collapsed\r\n                && ViaBotGrid.Visibility == Visibility.Collapsed\r\n                && message != null && message.ReplyInfo != null)\r\n            {\r\n                FromLabel.Margin = new Thickness(0.0, 2.0, 0.0, 6.0);\r\n            }\r\n            else\r\n            {\r\n                FromLabel.Margin = new Thickness(0.0, 2.0, 0.0, 0.0);\r\n            }\r\n            CaptionPanel.Children.Remove(ViaBotGrid);\r\n            FromLabelPanel.Children.Remove(ViaBotGrid);\r\n            if (FromLabel.Visibility == Visibility.Visible\r\n                && ViaBotGrid.Visibility == Visibility.Visible)\r\n            {\r\n                ViaBotGrid.Margin = FromLabel.Margin;\r\n                FromLabel.Margin = new Thickness(FromLabel.Margin.Left, FromLabel.Margin.Top, FromLabel.Margin.Right + 6.0, FromLabel.Margin.Bottom);\r\n                FromLabelPanel.Children.Add(ViaBotGrid);\r\n            }\r\n            else\r\n            {\r\n                ViaBotGrid.Margin = new Thickness(0.0, -6.0, 0.0, 0.0);\r\n                CaptionPanel.Children.Insert(2, ViaBotGrid);\r\n            }\r\n\r\n            Status.Visibility = output? Visibility.Visible : Visibility.Collapsed;\r\n            \r\n            MessageGrid.MaxWidth = messageCommon != null ? messageCommon.MediaWidth : 12.0 + 311.0 + 12.0;\r\n\r\n            Panel.Children.Remove(Header);\r\n            MainItemGrid.Children.Remove(Header);\r\n            if (messageService != null)\r\n            {\r\n                MessageGrid.Margin = new Thickness(0.0, 2.0, 0.0, 7.0);\r\n            }\r\n            else if (sticker)\r\n            {\r\n                ReplyContent.Foreground = footerForeground;\r\n                ViaBotGrid.Foreground = new SolidColorBrush(Colors.White);\r\n                Header.Background = footerBackground;\r\n                Grid.SetRow(Header, 1);\r\n                Grid.SetColumn(Header, output ? bubbleGridColumn - 1 : bubbleGridColumn + 1);\r\n                Header.HorizontalAlignment = output ? HorizontalAlignment.Right : HorizontalAlignment.Left;\r\n                Header.Margin = new Thickness(6.0);\r\n                MainItemGrid.Children.Add(Header);\r\n            }\r\n            else\r\n            {\r\n                ReplyContent.Foreground = foreground;\r\n                ViaBotGrid.Foreground = (Brush) Application.Current.Resources[\"TelegramBadgeAccentBrush\"];\r\n                Header.SetValue(Grid.RowProperty, DependencyProperty.UnsetValue);\r\n                Header.SetValue(Grid.ColumnProperty, DependencyProperty.UnsetValue);\r\n                Header.HorizontalAlignment = HorizontalAlignment.Left;\r\n                Header.Margin = new Thickness(0.0, 0.0, 0.0, -6.0);\r\n                Panel.Children.Insert(0, Header);\r\n            }\r\n\r\n            SetFooter(messageCommon);\r\n        }\r\n\r\n        private void SetBackgroundAndBorder(TLDecryptedMessageBase messageCommon)\r\n        {\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            var messageService = messageCommon as TLDecryptedMessageService;\r\n            var sticker = messageCommon != null && messageCommon.IsSticker();\r\n            var output = GetOutput(messageCommon);\r\n\r\n            Brush border;\r\n            if (messageService != null)\r\n            {\r\n                border = (Brush)Resources[\"ServiceMessageBorderBrush\"];\r\n            }\r\n            else if (sticker)\r\n            {\r\n                border = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n            else\r\n            {\r\n                border = isLightTheme\r\n                    ? (output\r\n                        ? (Brush)Resources[\"OutputBorderBrushLight\"]\r\n                        : (Brush)Resources[\"InputBorderBrushLight\"])\r\n                    : (output\r\n                        ? (Brush)Resources[\"OutputBorderBrushDark\"]\r\n                        : (Brush)Resources[\"InputBorderBrushDark\"]);\r\n            }\r\n\r\n            Brush background;\r\n            if (messageService != null)\r\n            {\r\n                background = (Brush)Resources[\"ServiceMessageBackgroundBrush\"];\r\n            }\r\n            else if (sticker)\r\n            {\r\n                background = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n            else\r\n            {\r\n                background = isLightTheme\r\n                    ? (output\r\n                        ? (Brush)Resources[\"OutputBackgroundBrushLight\"]\r\n                        : (Brush)Resources[\"InputBackgroundBrushLight\"])\r\n                    : (output\r\n                        ? (Brush)Resources[\"OutputBackgroundBrushDark\"]\r\n                        : (Brush)Resources[\"InputBackgroundBrushDark\"]);\r\n            }\r\n\r\n            Corner.Fill = background;\r\n            Corner.Stroke = border;\r\n            CornerBorder.BorderBrush = border;\r\n\r\n            MainBorder.Background = background;\r\n            MainBorder.BorderBrush = border;\r\n            MorePanel.Background = background;\r\n            Header.Background = background;\r\n        }\r\n\r\n        private bool _isChannelMessage;\r\n\r\n        private void ToServiceTemplate(TLDecryptedMessageService messageService)\r\n        {\r\n            _isChannelMessage = false;\r\n            FromLabel.Visibility = Visibility.Collapsed;\r\n            Tile.Visibility = Visibility.Collapsed;\r\n\r\n            var serviceMessageToTextConverter = new DecryptedServiceMessageToTextConverter();\r\n            InputMessage.Text = (string)serviceMessageToTextConverter.Convert(messageService.Self, null, null, null);\r\n\r\n            DrawBubble(messageService);\r\n\r\n            //var unreadMessagesAction = messageService.Action as TLDecryptedMessageActionUnreadMessages;\r\n            //if (unreadMessagesAction != null)\r\n            //{\r\n            //    ToUnreadMessagesTemplate();\r\n            //}\r\n        }\r\n\r\n        private Binding _authorBinding;\r\n        private Binding _viaBotNameBinding;\r\n        private Binding _inputMessageTextBinding;\r\n        private Binding _inputMessageEntitiesBinding;\r\n        private Binding _inputMessageVisibilityBinding;\r\n        private Binding _mediaContentControlContentBinding;\r\n        private Binding _mediaContentControlContentTemplateBinding;\r\n        private Binding _commandsReplyMarkupBinding;\r\n        private Binding _editLabelVisibilityBinding;\r\n\r\n        private void SaveBinding(ref Binding binding, FrameworkElement element, DependencyProperty dp)\r\n        {\r\n            if (binding == null)\r\n            {\r\n                var bindingExpression = element.GetBindingExpression(dp);\r\n                if (bindingExpression != null)\r\n                {\r\n                    binding = bindingExpression.ParentBinding;\r\n                }\r\n                element.ClearValue(dp);\r\n            }\r\n        }\r\n\r\n        private void RestoreBinding(ref Binding binding, FrameworkElement element, DependencyProperty dp)\r\n        {\r\n            if (binding != null)\r\n            {\r\n                element.SetBinding(dp, binding);\r\n                binding = null;\r\n            }\r\n        }\r\n\r\n        private void UpdateBinding(TLDecryptedMessageBase messageBase)\r\n        {\r\n            var serviceMessage = messageBase as TLDecryptedMessageService;\r\n            if (serviceMessage != null)\r\n            {\r\n                //SaveBinding(ref _fwdFromLabelTextBinding, FwdFromLabel, Run.TextProperty);\r\n                SaveBinding(ref _inputMessageVisibilityBinding, InputMessage, TelegramRichTextBox.VisibilityProperty);\r\n                SaveBinding(ref _inputMessageEntitiesBinding, InputMessage, TelegramRichTextBox.EntitiesProperty);\r\n                SaveBinding(ref _inputMessageTextBinding, InputMessage, TelegramRichTextBox.TextProperty);\r\n                SaveBinding(ref _mediaContentControlContentBinding, MediaContentControl, ContentControl.ContentProperty);\r\n                SaveBinding(ref _mediaContentControlContentTemplateBinding, MediaContentControl, ContentControl.ContentTemplateProperty);\r\n                SaveBinding(ref _viaBotNameBinding, ViaBotGrid, TextBlock.TextProperty);\r\n                //SaveBinding(ref _authorBinding, AuthorLabel, TextBlock.TextProperty);\r\n                //SaveBinding(ref _editLabelVisibilityBinding, EditLabel, TextBlock.VisibilityProperty);\r\n                //SaveBinding(ref _commandsReplyMarkupBinding, Commands, CommandsControl.ReplyMarkupProperty);\r\n\r\n\r\n                //System.Diagnostics.Debug.WriteLine(\"ClearMediaBinding id=\" + messageBase.Id);\r\n                _suppressFooterReplacement = true;\r\n                ClearValue(MediaProperty);\r\n                ClearValue(MediaCaptionProperty);\r\n                _suppressFooterReplacement = false;\r\n                //SaveBinding(ref _mediaBinding, this, MediaProperty);\r\n            }\r\n\r\n            var message = messageBase as TLDecryptedMessage;\r\n            if (message != null)\r\n            {\r\n                var stopwatch = Stopwatch.StartNew();\r\n                RestoreBinding(ref _inputMessageVisibilityBinding, InputMessage, TelegramRichTextBox.VisibilityProperty);\r\n                RestoreBinding(ref _inputMessageEntitiesBinding, InputMessage, TelegramRichTextBox.EntitiesProperty);\r\n                RestoreBinding(ref _inputMessageTextBinding, InputMessage, TelegramRichTextBox.TextProperty);\r\n                RestoreBinding(ref _mediaContentControlContentBinding, MediaContentControl, ContentControl.ContentProperty);\r\n                RestoreBinding(ref _mediaContentControlContentTemplateBinding, MediaContentControl, ContentControl.ContentTemplateProperty);\r\n                RestoreBinding(ref _viaBotNameBinding, ViaBotGrid, TextBlock.TextProperty);\r\n                //RestoreBinding(ref _authorBinding, AuthorLabel, TextBlock.TextProperty);\r\n                //RestoreBinding(ref _editLabelVisibilityBinding, EditLabel, TextBlock.VisibilityProperty);\r\n                //RestoreBinding(ref _commandsReplyMarkupBinding, Commands, CommandsControl.ReplyMarkupProperty);\r\n\r\n                //System.Diagnostics.Debug.WriteLine(\"RestoreBinding elapsed=\" + stopwatch.Elapsed);\r\n\r\n                _suppressFooterReplacement = true;\r\n                var mediaBinding = new Binding(\"Media\") { Source = message, Mode = BindingMode.OneWay };\r\n                SetBinding(MediaProperty, mediaBinding);\r\n                var mediaCaption = message.Media as IMediaCaption;\r\n                if (mediaCaption != null)\r\n                {\r\n                    var mediaCaptionBinding = new Binding(\"Media.Caption\") { Source = message, Mode = BindingMode.OneWay };\r\n                    SetBinding(MediaCaptionProperty, mediaCaptionBinding);\r\n                }\r\n                _suppressFooterReplacement = false;\r\n            }\r\n        }\r\n\r\n        private bool _suppressFooterReplacement;\r\n\r\n        public static readonly DependencyProperty MediaCaptionProperty = DependencyProperty.Register(\r\n            \"MediaCaption\", typeof (string), typeof (DecryptedMessageControl), new PropertyMetadata(default(string), OnMediaCaptionChanged));\r\n\r\n        private static void OnMediaCaptionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var messageControl = d as DecryptedMessageControl;\r\n            if (messageControl != null && !messageControl._suppressFooterReplacement)\r\n            {\r\n                var oldCaption = e.OldValue as string;\r\n                var newCaption = e.NewValue as string;\r\n                if (!string.Equals(oldCaption, newCaption, StringComparison.Ordinal))\r\n                {\r\n                    messageControl.SetFooter(messageControl.Message);\r\n                }\r\n            }\r\n        }\r\n\r\n        public string MediaCaption\r\n        {\r\n            get { return (string) GetValue(MediaCaptionProperty); }\r\n            set { SetValue(MediaCaptionProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty MediaProperty = DependencyProperty.Register(\r\n            \"Media\", typeof (TLDecryptedMessageMediaBase), typeof (DecryptedMessageControl), new PropertyMetadata(default(TLDecryptedMessageMediaBase), OnMediaChanged));\r\n\r\n        private static void OnMediaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var messageControl = d as DecryptedMessageControl;\r\n            if (messageControl != null && !messageControl._suppressFooterReplacement)\r\n            {\r\n                var oldWebPage = e.OldValue as TLDecryptedMessageMediaWebPage;\r\n                var newWebPage = e.NewValue as TLDecryptedMessageMediaWebPage;\r\n                if (oldWebPage != null\r\n                    || newWebPage != null)\r\n                {\r\n                    messageControl.SetFooter(messageControl.Message);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SetFooter(TLDecryptedMessageBase messageBase)\r\n        {\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            \r\n            var message = messageBase as TLDecryptedMessage;\r\n            var service = messageBase as TLDecryptedMessageService;\r\n            var output = GetOutput(messageBase);\r\n\r\n            var isGroupedMedia = message != null && message.Media is TLDecryptedMessageMediaGroup;\r\n            var isPhoto = message != null && message.Media is TLDecryptedMessageMediaPhoto;\r\n            var isVideo = message != null && message.IsVideo();\r\n            var isGeoPoint = message != null && message.Media is TLDecryptedMessageMediaGeoPoint;\r\n            var isVenue = message != null && message.Media is TLDecryptedMessageMediaVenue;\r\n            var isDocument = message != null && IsDocument(message);\r\n            var isVoice = message != null && message.IsVoice();\r\n            var isSticker = message != null && message.IsSticker();\r\n            var isWebPage = message != null && message.Media is TLDecryptedMessageMediaWebPage;\r\n            var isEmptyMedia = message != null && (message.Media == null || message.Media is TLDecryptedMessageMediaEmpty);\r\n\r\n            //var isGif = message != null && message.IsGif();\r\n            var isShortFooter = IsShortFooter(message, isGroupedMedia, isPhoto, isVideo, isGeoPoint, isDocument, isVoice, isSticker, isWebPage, isEmptyMedia);\r\n\r\n            Brush background = new SolidColorBrush(Colors.Transparent);\r\n            if (service != null)\r\n            {\r\n                background = (Brush)Resources[\"ServiceMessageBackgroundBrush\"];\r\n            }\r\n            else if (!isSticker)\r\n            {\r\n                background = isLightTheme\r\n                    ? (output\r\n                        ? (Brush)Resources[\"OutputBackgroundBrushLight\"]\r\n                        : (Brush)Resources[\"InputBackgroundBrushLight\"])\r\n                    : (output\r\n                        ? (Brush)Resources[\"OutputBackgroundBrushDark\"]\r\n                        : (Brush)Resources[\"InputBackgroundBrushDark\"]);\r\n            }\r\n\r\n            Brush footerForeground;\r\n            if (isSticker)\r\n            {\r\n                footerForeground = isLightTheme\r\n                    ? (Brush)Resources[\"StickerFooterSubtleBrushLight\"]\r\n                    : (Brush)Resources[\"StickerFooterSubtleBrushDark\"];\r\n            }\r\n            else if (isShortFooter && (isGroupedMedia || isPhoto || (isGeoPoint && !isVenue) || isVideo))\r\n            {\r\n                footerForeground = new SolidColorBrush(Colors.White);\r\n            }\r\n            else\r\n            {\r\n                footerForeground = isLightTheme\r\n                ? (output\r\n                    ? (Brush)Resources[\"OutputSubtleBrushLight\"]\r\n                    : (Brush)Resources[\"InputSubtleBrushLight\"])\r\n                : (output\r\n                    ? (Brush)Resources[\"OutputSubtleBrushDark\"]\r\n                    : (Brush)Resources[\"InputSubtleBrushDark\"]);\r\n            }\r\n\r\n            Brush footerBackground;\r\n            if (isSticker)\r\n            {\r\n                footerBackground = isLightTheme\r\n                    ? (Brush)Resources[\"StickerFooterBackgroundBrushLight\"]\r\n                    : (Brush)Resources[\"StickerFooterBackgroundBrushDark\"];\r\n            }\r\n            else if (isShortFooter && (isGroupedMedia || isPhoto || (isGeoPoint && !isVenue) || isVideo))\r\n            {\r\n                footerBackground = new SolidColorBrush(Color.FromArgb(128, 0, 0, 0));\r\n            }\r\n            else\r\n            {\r\n                footerBackground = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n\r\n            FooterContent.Foreground = footerForeground;\r\n            FooterContentGrid.Background = footerBackground;\r\n            Footer.MaxWidth = message != null ? message.MediaWidth : 12.0 + 311.0 + 12.0;\r\n            Status.Fill = footerForeground;\r\n            //ViewsIcon.Stroke = footerForeground;\r\n\r\n            if (messageBase != null && messageBase.Reply != null && (isGroupedMedia || isPhoto || isVideo))\r\n            {\r\n                MediaContentControl.Margin = new Thickness(12.0, 3.0, 12.0, 0.0);\r\n            }\r\n            else\r\n            {\r\n                MediaContentControl.Margin = new Thickness(12.0, 0.0, 12.0, 0.0);\r\n            }\r\n            \r\n            // setup message and media position\r\n            //MessageGrid.Visibility = message != null && !TLString.IsNullOrEmpty(message.Message) || showAsServiceMessage\r\n            //    ? Visibility.Visible\r\n            //    : Visibility.Collapsed;\r\n            //Panel.Children.Remove(MessageGrid);\r\n            //Panel.Children.Remove(MediaGrid);\r\n            //if (message != null && (message.Media is TLMessageMediaWebPage || message.Media is TLMessageMediaEmpty) || showAsServiceMessage)\r\n            //{\r\n            //    MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n            //    MediaGrid.Margin = new Thickness(0.0, 0.0, 0.0, 0.0);\r\n\r\n            //    Panel.Children.Add(MessageGrid);\r\n            //    Panel.Children.Add(MediaGrid);\r\n            //}\r\n            //else\r\n            //{\r\n            //    MessageGrid.Margin = new Thickness(0.0, 0.0, 0.0, 0.0);\r\n            //    MediaGrid.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n\r\n            //    Panel.Children.Add(MediaGrid);\r\n            //    Panel.Children.Add(MessageGrid);\r\n            //}\r\n\r\n            // setup footer position\r\n            Panel.Children.Remove(Footer);\r\n            MediaGrid.Children.Remove(Footer);\r\n            MessageGrid.Children.Remove(Footer);\r\n            if (service != null)\r\n            {\r\n                // remove footer\r\n            }\r\n            else if (!isShortFooter)\r\n            {\r\n                Footer.Margin = new Thickness(0.0, -1.0, 0.0, 0.0);\r\n                Footer.Background = background;\r\n                Footer.HorizontalAlignment = HorizontalAlignment.Stretch;\r\n                Footer.VerticalAlignment = VerticalAlignment.Stretch;\r\n                Panel.Children.Add(Footer);\r\n                MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n            }\r\n            else\r\n            {\r\n                if (isSticker)\r\n                {\r\n                    Footer.Margin = new Thickness(0.0, -1.0, 0.0, 0.0);\r\n                    Footer.Background = new SolidColorBrush(Colors.Transparent);\r\n                    Footer.HorizontalAlignment = HorizontalAlignment.Right;\r\n                    Footer.VerticalAlignment = VerticalAlignment.Bottom;\r\n                    MediaGrid.Children.Add(Footer);\r\n                    MessageGrid.Margin = new Thickness(0.0, 0.0, 0.0, 0.0);\r\n                }\r\n                else if (isEmptyMedia)\r\n                {\r\n                    Footer.Margin = new Thickness(0.0, -1.0, 0.0, -11.0);\r\n                    Footer.Background = new SolidColorBrush(Colors.Transparent);\r\n                    Footer.HorizontalAlignment = HorizontalAlignment.Stretch;\r\n                    Footer.VerticalAlignment = VerticalAlignment.Bottom;\r\n                    MessageGrid.Children.Add(Footer);\r\n                    MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 11.0);\r\n                }\r\n                else if (isGroupedMedia || isPhoto || isGeoPoint || isVideo || isVoice || isDocument)\r\n                {\r\n                    Footer.Margin = new Thickness(0.0, -1.0, 0.0, 0.0);\r\n                    Footer.Background = new SolidColorBrush(Colors.Transparent);\r\n                    Footer.HorizontalAlignment = HorizontalAlignment.Right;\r\n                    Footer.VerticalAlignment = VerticalAlignment.Bottom;\r\n                    MediaGrid.Children.Add(Footer);\r\n                    MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n                }\r\n                else\r\n                {\r\n                    Footer.Margin = new Thickness(0.0, -1.0, 0.0, 0.0);\r\n                    Footer.Background = background;\r\n                    Footer.HorizontalAlignment = HorizontalAlignment.Stretch;\r\n                    Footer.VerticalAlignment = VerticalAlignment.Stretch;\r\n                    Panel.Children.Add(Footer);\r\n                    MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n                }\r\n            }\r\n\r\n            if (message != null\r\n                && (message.Media == null || message.Media is TLDecryptedMessageMediaEmpty))\r\n            {\r\n                var messageDateTimeConverter = (IValueConverter) Application.Current.Resources[\"MessageDateTimeConverter\"];\r\n                var dateText = messageDateTimeConverter.Convert(message.Date, null, null, null);\r\n\r\n                var footerBuilder = new StringBuilder();\r\n                if (FlowDirection == FlowDirection.RightToLeft)\r\n                {\r\n                    footerBuilder.Append(\"د\");\r\n                }\r\n                else\r\n                {\r\n                    footerBuilder.Append(\"a\");\r\n                }\r\n                footerBuilder.Append(\"/ \" + dateText);\r\n                if (message.Out.Value)\r\n                {\r\n                    footerBuilder.Append(\" W\");\r\n                }\r\n\r\n                InputMessage.Footer = footerBuilder.ToString();\r\n            }\r\n            else\r\n            {\r\n                InputMessage.Footer = string.Empty;\r\n            }\r\n\r\n            if (isVoice)\r\n            {\r\n                MediaContentControl.Foreground = footerForeground;\r\n            }\r\n            else\r\n            {\r\n                MediaContentControl.SetValue(Control.ForegroundProperty, DependencyProperty.UnsetValue);\r\n            }\r\n        }\r\n\r\n        private static bool IsShortFooter(TLDecryptedMessage message, bool isGrouped, bool isPhoto, bool isVideo, bool isGeoPoint, bool isDocument, bool isVoice, bool isSticker, bool isWebPage, bool isEmptyMedia)\r\n        {\r\n            if (message != null)\r\n            {\r\n                var mediaCaption = message.Media as IMediaCaption;\r\n                if (mediaCaption != null && !TLString.IsNullOrEmpty(mediaCaption.Caption))\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                if (isWebPage)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                if (isGrouped || isPhoto || isVideo || isGeoPoint)\r\n                {\r\n                    return true;\r\n                }\r\n                \r\n                if (isSticker)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (isEmptyMedia)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (isDocument || isVoice)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        protected TLDecryptedMessageMediaBase Media\r\n        {\r\n            get { return (TLDecryptedMessageMediaBase) GetValue(MediaProperty); }\r\n            set { SetValue(MediaProperty, value); }\r\n        }\r\n\r\n        private void ToUnreadMessagesTemplate()\r\n        {\r\n\r\n        }\r\n\r\n        private void ToEmptyTemplate()\r\n        {\r\n            \r\n        }\r\n\r\n        public TLDecryptedMessageBase Message\r\n        {\r\n            get { return (TLDecryptedMessageBase) GetValue(MessageProperty); }\r\n            set { SetValue(MessageProperty, value); }\r\n        }\r\n\r\n        private static int _count;\r\n\r\n        public DecryptedMessageControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            //System.Diagnostics.Debug.WriteLine(\"ctor \" + _count++);\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> TapViaBot;\r\n\r\n        protected virtual void RaiseTapViaBot(object sender, GestureEventArgs args)\r\n        {\r\n            var handler = TapViaBot;\r\n            if (handler != null) handler(sender, args);\r\n        }\r\n\r\n        private void ViaBot_Tap(object sender, GestureEventArgs args)\r\n        {\r\n            RaiseTapViaBot(sender, args);\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> TapMorePanel;\r\n\r\n        protected virtual void RaiseTapMorePanel(object sender, GestureEventArgs args)\r\n        {\r\n            var handler = TapMorePanel;\r\n            if (handler != null) handler(sender, args);\r\n        }\r\n\r\n        private void MorePanel_OnTap(object sender, GestureEventArgs args)\r\n        {\r\n            RaiseTapMorePanel(sender, args);\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> TapUserTile;\r\n\r\n        protected virtual void RaiseTapUserTile(object sender, GestureEventArgs args)\r\n        {\r\n            var handler = TapUserTile;\r\n            if (handler != null) handler(sender, args);\r\n        }\r\n\r\n        private void Tile_OnTap(object sender, GestureEventArgs args)\r\n        {\r\n            RaiseTapUserTile(sender, args);\r\n        }\r\n\r\n        public event EventHandler<KeyboardButtonEventArgs> CommandsControlButtonClick;\r\n\r\n        protected virtual void RaiseCommandsControlButtonClick(object sender, KeyboardButtonEventArgs e)\r\n        {\r\n            var handler = CommandsControlButtonClick;\r\n            if (handler != null) handler(sender, e);\r\n        }\r\n\r\n        private void CommandsControl_OnButtonClick(object sender, KeyboardButtonEventArgs e)\r\n        {\r\n            RaiseCommandsControlButtonClick(sender, e);\r\n        }\r\n\r\n        public event EventHandler<RoutedEventArgs> ShareButtonClick;\r\n\r\n        protected virtual void RaiseShareButtonClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var handler = ShareButtonClick;\r\n            if (handler != null) handler(sender, e);\r\n        }\r\n\r\n        private void ShareButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            RaiseShareButtonClick(sender, e);\r\n        }\r\n\r\n        #region Encrypted Timer\r\n\r\n        public event EventHandler StartTimer;\r\n\r\n        protected virtual void RaiseStartTimer()\r\n        {\r\n            var handler = StartTimer;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void SecretPhotoPlaceholder_OnStartTimer(object sender, System.EventArgs e)\r\n        {\r\n            RaiseStartTimer();\r\n        }\r\n\r\n        public event EventHandler Elapsed;\r\n\r\n        protected virtual void RaiseElapsed()\r\n        {\r\n            var handler = Elapsed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void SecretPhotoPlaceholder_OnElapsed(object sender, System.EventArgs e)\r\n        {\r\n            RaiseElapsed();\r\n        }\r\n        #endregion\r\n\r\n        public event EventHandler<GestureEventArgs> TapMedia;\r\n\r\n        private void MediaContentControl_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n            RaiseTapMedia(e);\r\n        }\r\n\r\n        protected virtual void RaiseTapMedia(GestureEventArgs e)\r\n        {\r\n            var handler = TapMedia;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/DialogControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.DialogControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"146\" d:DesignWidth=\"72\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" IsHitTestVisible=\"True\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <views:ConversationTileControl\r\n            x:Name=\"Tile\"\r\n            Size=\"72\" Margin=\"0,18,0,12\" Grid.Row=\"0\"\r\n            IsHitTestVisible=\"False\"/>\r\n        \r\n        <TextBlock \r\n            IsHitTestVisible=\"True\" \r\n            Grid.Row=\"1\" \r\n            x:Name=\"Title\" \r\n            Margin=\"-9,-10,-9,2\"\r\n            MaxHeight=\"48\"\r\n            Text=\"\"\r\n            TextAlignment=\"Center\" \r\n            TextWrapping=\"Wrap\" \r\n            TextTrimming=\"WordEllipsis\" \r\n            Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n            FontSize=\"18\"/>\r\n\r\n        <Grid Width=\"72\">\r\n            <controls:SelectionControl \r\n                RenderTransformOrigin=\"0.5,0.5\" \r\n                x:Name=\"SelectionControl\" \r\n                SuppressAnimation=\"True\" \r\n                Margin=\"-6,6\" \r\n                HorizontalAlignment=\"Right\" \r\n                VerticalAlignment=\"Top\" \r\n                IsHitTestVisible=\"False\">\r\n                <controls:SelectionControl.RenderTransform>\r\n                    <ScaleTransform ScaleX=\"0.875\" ScaleY=\"0.875\"/>\r\n                </controls:SelectionControl.RenderTransform>\r\n            </controls:SelectionControl>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/DialogControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class DialogControl\r\n    {\r\n        public static readonly DependencyProperty ObjectProperty = DependencyProperty.Register(\r\n            \"Object\", typeof(TLObject), typeof(DialogControl), new PropertyMetadata(default(TLObject), OnObjectChanged));\r\n\r\n        private static void OnObjectChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as DialogControl;\r\n            if (control != null)\r\n            {\r\n                control.Tile.Object = e.NewValue as TLObject;\r\n            }\r\n        }\r\n\r\n        public TLObject Object\r\n        {\r\n            get { return (TLObject) GetValue(ObjectProperty); }\r\n            set { SetValue(ObjectProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty FillProperty = DependencyProperty.Register(\r\n            \"Fill\", typeof(Brush), typeof(DialogControl), new PropertyMetadata(default(Brush), OnFillChanged));\r\n\r\n        private static void OnFillChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as DialogControl;\r\n            if (control != null)\r\n            {\r\n                control.Tile.Fill = e.NewValue as Brush;\r\n            }\r\n        }\r\n\r\n        public Brush Fill\r\n        {\r\n            get { return (Brush) GetValue(FillProperty); }\r\n            set { SetValue(FillProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(\r\n            \"Text\", typeof(string), typeof(DialogControl), new PropertyMetadata(default(string), OnTextChanged));\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as DialogControl;\r\n            if (control != null)\r\n            {\r\n                control.Tile.Text = e.NewValue as string;\r\n            }\r\n        }\r\n\r\n        public string Text\r\n        {\r\n            get { return (string) GetValue(TextProperty); }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(\r\n            \"Source\", typeof(ImageSource), typeof(DialogControl), new PropertyMetadata(default(ImageSource), OnSourceChanged));\r\n\r\n        private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as DialogControl;\r\n            if (control != null)\r\n            {\r\n                control.Tile.Source = e.NewValue as ImageSource;\r\n            }\r\n        }\r\n\r\n        public ImageSource Source\r\n        {\r\n            get { return (ImageSource) GetValue(SourceProperty); }\r\n            set { SetValue(SourceProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ShortNameProperty = DependencyProperty.Register(\r\n            \"ShortName\", typeof(string), typeof(DialogControl), new PropertyMetadata(default(string), OnShortNameChanged));\r\n\r\n        private static void OnShortNameChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as DialogControl;\r\n            if (control != null)\r\n            {\r\n                control.Title.Text = e.NewValue as string;\r\n            }\r\n        }\r\n\r\n        public string ShortName\r\n        {\r\n            get { return (string) GetValue(ShortNameProperty); }\r\n            set { SetValue(ShortNameProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(\r\n            \"IsSelected\", typeof(bool), typeof(DialogControl), new PropertyMetadata(default(bool), OnIsSelectedChanged));\r\n\r\n        private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as DialogControl;\r\n            if (control != null)\r\n            {\r\n                var isSelected = (bool)e.NewValue;\r\n                control.SelectionControl.SuppressAnimation = control.DataContext is DialogItem && ((DialogItem)control.DataContext).SuppressAnimation;\r\n                control.SelectionControl.IsSelected = isSelected;\r\n            }\r\n        }\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return (bool)GetValue(IsSelectedProperty); }\r\n            set { SetValue(IsSelectedProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty SelectedBorderBrushProperty = DependencyProperty.Register(\r\n            \"SelectedBorderBrush\", typeof(Brush), typeof(DialogControl), new PropertyMetadata(default(Brush), OnSelectedBorderBrushChanged));\r\n\r\n        public Brush SelectedBorderBrush\r\n        {\r\n            get { return (Brush) GetValue(SelectedBorderBrushProperty); }\r\n            set { SetValue(SelectedBorderBrushProperty, value); }\r\n        }\r\n\r\n        private static void OnSelectedBorderBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as DialogControl;\r\n            if (control != null)\r\n            {\r\n                control.SelectionControl.SelectedBorderBrush = e.NewValue as Brush;\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty UnselectedBorderBrushProperty = DependencyProperty.Register(\r\n            \"UnselectedBorderBrush\", typeof(Brush), typeof(DialogControl), new PropertyMetadata(default(Brush), OnUnselectedBorderBrushChanged));\r\n\r\n        public Brush UnselectedBorderBrush\r\n        {\r\n            get { return (Brush) GetValue(UnselectedBorderBrushProperty); }\r\n            set { SetValue(UnselectedBorderBrushProperty, value); }\r\n        }\r\n\r\n        private static void OnUnselectedBorderBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as DialogControl;\r\n            if (control != null)\r\n            {\r\n                control.SelectionControl.UnselectedBorderBrush = e.NewValue as Brush;\r\n            }\r\n        }\r\n\r\n        public DialogControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/GroupedMessageControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.GroupedMessageControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" />\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/GroupedMessageControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class GroupedMessageControl\r\n    {\r\n        //~GroupedMessageControl()\r\n        //{\r\n            \r\n        //}\r\n\r\n        public static readonly DependencyProperty MediaProperty = DependencyProperty.Register(\r\n            \"Media\", typeof(IMessageMediaGroup), typeof(GroupedMessageControl), new PropertyMetadata(default(IMessageMediaGroup), OnMediaChanged));\r\n\r\n        public IMessageMediaGroup Media\r\n        {\r\n            get { return (IMessageMediaGroup)GetValue(MediaProperty); }\r\n            set { SetValue(MediaProperty, value); }\r\n        }\r\n\r\n        private static void OnMediaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as GroupedMessageControl;\r\n            if (control != null)\r\n            {\r\n                var oldMedia = e.OldValue as IMessageMediaGroup;\r\n                if (oldMedia != null)\r\n                {\r\n                    oldMedia.Calculate -= control.OnMediaCalculate;\r\n                }\r\n\r\n                control.UpdatePhotoLayout(e.NewValue as IMessageMediaGroup);\r\n\r\n                var newMedia = e.NewValue as IMessageMediaGroup;\r\n                if (newMedia != null)\r\n                {\r\n                    newMedia.Calculate += control.OnMediaCalculate;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnMediaCalculate(object sender, System.EventArgs e)\r\n        {\r\n            UpdatePhotoLayout(Media as IMessageMediaGroup);\r\n        }\r\n\r\n        private StackPanel _previousPanel;\r\n\r\n        private void UpdatePhotoLayout(IMessageMediaGroup media)\r\n        {\r\n            if (LayoutRoot.Children.Count > 0)\r\n            {\r\n                _previousPanel = LayoutRoot.Children.FirstOrDefault() as StackPanel;\r\n            }\r\n            LayoutRoot.Children.Clear();\r\n\r\n            if (media != null && media.GroupCommon != null && media.GroupCommon.Count > 0)\r\n            {\r\n                var groupedMessages = new GroupedMessages();\r\n                foreach (var messageBase in media.GroupCommon)\r\n                {\r\n                    var message = messageBase as TLMessage;\r\n                    if (message != null)\r\n                    {\r\n                        if (message.IsExpired())\r\n                        {\r\n                            continue;\r\n                        }\r\n\r\n                        groupedMessages.Messages.Add(message);\r\n                    }\r\n                    var decryptedMessage = messageBase as TLDecryptedMessage;\r\n                    if (decryptedMessage != null)\r\n                    {\r\n                        //if (decryptedMessage.IsExpired())\r\n                        //{\r\n                        //    continue;\r\n                        //}\r\n\r\n                        groupedMessages.Messages.Add(decryptedMessage);\r\n                    }\r\n                }\r\n\r\n                if (groupedMessages.Messages.Count == 0)\r\n                {\r\n                    \r\n                }\r\n                else if (groupedMessages.Messages.Count == 1)\r\n                {\r\n                    var decryptedMessage = groupedMessages.Messages[0] as TLDecryptedMessage;\r\n                    if (decryptedMessage != null)\r\n                    {\r\n                        var mediaPhoto = decryptedMessage.Media as TLDecryptedMessageMediaPhoto;\r\n                        if (mediaPhoto != null)\r\n                        {\r\n                            var stackPanel = new StackPanel { Background = new SolidColorBrush(Colors.Transparent) };\r\n\r\n                            var converter = new PhotoToDimensionConverter();\r\n                            var width = (double)converter.Convert(mediaPhoto, null, \"Width\", null);\r\n                            var height = (double)converter.Convert(mediaPhoto, null, \"Height\", null);\r\n\r\n                            var groupedMessagePosition = new GroupedMessagePosition();\r\n                            groupedMessagePosition.Set(0, 0, 0, 0, (int)width, 1.0f, 0);\r\n                            var position = new KeyValuePair<TLObject, GroupedMessagePosition>(groupedMessages.Messages[0], groupedMessagePosition);\r\n\r\n                            var border = GetControl(_previousPanel, position, 1.0, height, 0.0, 0.0);\r\n\r\n                            stackPanel.Children.Add(border);\r\n\r\n                            if (stackPanel.Children.Count > 0)\r\n                            {\r\n                                LayoutRoot.Children.Add(stackPanel);\r\n                            }\r\n                        }\r\n\r\n                        if (decryptedMessage.IsVideo())\r\n                        {\r\n                            var stackPanel = new StackPanel { Background = new SolidColorBrush(Colors.Transparent) };\r\n\r\n                            var width = 230.0;\r\n                            var height = 145.0;\r\n\r\n                            var groupedMessagePosition = new GroupedMessagePosition();\r\n                            groupedMessagePosition.Set(0, 0, 0, 0, (int)width, 1.0f, 0);\r\n                            var position = new KeyValuePair<TLObject, GroupedMessagePosition>(groupedMessages.Messages[0], groupedMessagePosition);\r\n\r\n                            var border = GetControl(_previousPanel, position, 1.0, height, 0.0, 0.0);\r\n\r\n                            stackPanel.Children.Add(border);\r\n\r\n                            if (stackPanel.Children.Count > 0)\r\n                            {\r\n                                LayoutRoot.Children.Add(stackPanel);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    var message = groupedMessages.Messages[0] as TLMessage;\r\n                    if (message != null)\r\n                    {\r\n                        var mediaPhoto = message.Media as TLMessageMediaPhoto;\r\n                        if (mediaPhoto != null)\r\n                        {\r\n                            var stackPanel = new StackPanel { Background = new SolidColorBrush(Colors.Transparent) };\r\n\r\n                            var converter = new PhotoToDimensionConverter();\r\n                            var width = (double)converter.Convert(mediaPhoto, null, \"Width\", null);\r\n                            var height = (double)converter.Convert(mediaPhoto, null, \"Height\", null);\r\n\r\n                            var groupedMessagePosition = new GroupedMessagePosition();\r\n                            groupedMessagePosition.Set(0, 0, 0, 0, (int)width, 1.0f, 0);\r\n                            var position = new KeyValuePair<TLObject, GroupedMessagePosition>(groupedMessages.Messages[0], groupedMessagePosition);\r\n\r\n                            var border = GetControl(_previousPanel, position, 1.0, height, 0.0, 0.0);\r\n\r\n                            stackPanel.Children.Add(border);\r\n\r\n                            if (stackPanel.Children.Count > 0)\r\n                            {\r\n                                LayoutRoot.Children.Add(stackPanel);\r\n                            }\r\n                        }\r\n\r\n                        var mediaDocument = message.Media as TLMessageMediaDocument;\r\n                        if (mediaDocument != null)\r\n                        {\r\n                            var stackPanel = new StackPanel { Background = new SolidColorBrush(Colors.Transparent) };\r\n\r\n                            var width = 230.0;\r\n                            var height = 145.0;\r\n\r\n                            var groupedMessagePosition = new GroupedMessagePosition();\r\n                            groupedMessagePosition.Set(0, 0, 0, 0, (int)width, 1.0f, 0);\r\n                            var position = new KeyValuePair<TLObject, GroupedMessagePosition>(groupedMessages.Messages[0], groupedMessagePosition);\r\n\r\n                            var border = GetControl(_previousPanel, position, 1.0, height, 0.0, 0.0);\r\n\r\n                            stackPanel.Children.Add(border);\r\n\r\n                            if (stackPanel.Children.Count > 0)\r\n                            {\r\n                                LayoutRoot.Children.Add(stackPanel);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else if (groupedMessages.Messages.Count > 0)\r\n                {\r\n                    var height = 320;\r\n                    groupedMessages.Calculate(height);\r\n\r\n                    var stackPanel = new StackPanel { Background = new SolidColorBrush(Colors.Transparent) };\r\n\r\n                    var positions = groupedMessages.Positions.ToList();\r\n\r\n                    for (var i = 0; i < positions.Count; i++)\r\n                    {\r\n                        var position = positions[i];\r\n\r\n                        var top = 0.0;\r\n                        var left = 0.0;\r\n\r\n                        if (i > 0)\r\n                        {\r\n                            var pos = positions[i - 1];\r\n                            // in one row\r\n                            if (pos.Value.MinY == position.Value.MinY)\r\n                            {\r\n                                top = -(height * pos.Value.Height);\r\n\r\n                                for (var j = i - 1; j >= 0; j--)\r\n                                {\r\n                                    pos = positions[j];\r\n                                    if (pos.Value.MinY == position.Value.MinY)\r\n                                    {\r\n                                        left += pos.Value.Width;\r\n                                    }\r\n                                }\r\n                            }\r\n                            // in one column\r\n                            else if (position.Value.SpanSize == groupedMessages.MaxSizeWidth)\r\n                            {\r\n                                left = position.Value.LeftSpanOffset;\r\n                                // find common big message\r\n                                KeyValuePair<TLObject, GroupedMessagePosition>? leftColumn = null;\r\n                                for (var j = i - 1; j >= 0; j--)\r\n                                {\r\n                                    pos = positions[j];\r\n                                    if (pos.Value.SiblingHeights != null)\r\n                                    {\r\n                                        leftColumn = pos;\r\n                                        break;\r\n                                    }\r\n                                    else\r\n                                    {\r\n                                        top += (height * pos.Value.Height);\r\n                                    }\r\n                                }\r\n                                // set top\r\n                                if (leftColumn != null)\r\n                                {\r\n                                    top -= (leftColumn.Value.Value.Height * height);\r\n                                }\r\n                                else\r\n                                {\r\n                                    top = 0;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var border = GetControl(_previousPanel, position, 0.65, height, left, top);\r\n\r\n                        stackPanel.Children.Add(border);\r\n                    }\r\n\r\n                    if (stackPanel.Children.Count > 0)\r\n                    {\r\n                        LayoutRoot.Children.Add(stackPanel);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private static bool IsVideo(TLObject obj)\r\n        {\r\n            var message = obj as TLMessage;\r\n            if (message != null && message.IsVideo())\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var decryptedMessage = obj as TLDecryptedMessage;\r\n            if (decryptedMessage != null && decryptedMessage.IsVideo())\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static UIElement GetControl(StackPanel previousPanel, KeyValuePair<TLObject, GroupedMessagePosition> position, double scale, double height, double left, double top)\r\n        {\r\n            if (IsVideo(position.Key))\r\n            {\r\n                return GetVideoControl(previousPanel, position, scale, height, left, top);\r\n            }\r\n\r\n            return GetPhotoControl(previousPanel, position, scale, height, left, top);\r\n        }\r\n\r\n        private static UIElement GetVideoControl(StackPanel previousPanel, KeyValuePair<TLObject, GroupedMessagePosition> position, double scale, double height, double left, double top)\r\n        {\r\n            TLObject media = null;\r\n            var message = position.Key as TLMessage;\r\n            if (message != null)\r\n            {\r\n                media = message.Media;\r\n            }\r\n            var decryptedMessage = position.Key as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                media = decryptedMessage.Media;\r\n            }\r\n\r\n            var element = GetCachedControl<MediaVideoControl>(previousPanel, media);\r\n            var created = false;\r\n            if (element == null)\r\n            {\r\n                created = true;\r\n                element = new MediaVideoControl();\r\n                element.DataContext = media;\r\n            }\r\n\r\n            var margin = 1.0;\r\n\r\n            element.Stretch = Stretch.UniformToFill;\r\n            element.ProgressScale = scale;\r\n            element.HorizontalAlignment = HorizontalAlignment.Left;\r\n            element.VerticalAlignment = VerticalAlignment.Top;\r\n            element.Width = position.Value.Width - 2.0 * margin;\r\n            element.Height = height * position.Value.Height - 2 * margin;\r\n            element.Margin = new Thickness(left + margin, top + margin, 0.0 + margin, 0.0 + margin);\r\n\r\n            if (!created) return element;\r\n\r\n            Caliburn.Micro.Message.SetAttach(element, \"[Event CancelUploading] = [Action CancelUploading($DataContext)]; [Event CancelDownloading] = [Action CancelVideoDownloading($DataContext)]\");\r\n\r\n            var mediaBinding = new Binding(\"\");\r\n            element.SetBinding(MediaVideoControl.MediaProperty, mediaBinding);\r\n\r\n            if (message != null && message.HasTTL()\r\n                || decryptedMessage != null && decryptedMessage.TTL.Value > 0)\r\n            {\r\n                var previewSourceBinding = new Binding(\"ThumbSelf\");\r\n                previewSourceBinding.Converter = new PhotoToThumbConverter { Secret = true };\r\n                element.SetBinding(MediaVideoControl.SourceProperty, previewSourceBinding);\r\n            }\r\n            else\r\n            {\r\n                var sourceBinding = new Binding(\"ThumbSelf\");\r\n                sourceBinding.Converter = new PhotoToThumbConverter();\r\n                element.SetBinding(MediaVideoControl.SourceProperty, sourceBinding);\r\n            }\r\n\r\n            var downloadIconVisibilityBinding = new Binding(\"Self\");\r\n            downloadIconVisibilityBinding.Converter = new DownloadMediaToVisibilityConverter();\r\n            element.SetBinding(MediaVideoControl.DownloadIconVisibilityProperty, downloadIconVisibilityBinding);\r\n\r\n            var downloadingProgressBinding = new Binding(\"DownloadingProgress\");\r\n            element.SetBinding(MediaVideoControl.DownloadingProgressProperty, downloadingProgressBinding);\r\n\r\n            var uploadingProgressBinding = new Binding(\"UploadingProgress\");\r\n            element.SetBinding(MediaVideoControl.UploadingProgressProperty, uploadingProgressBinding);\r\n\r\n            var isSelectedBinding = new Binding(\"IsSelected\") { Source = position.Key };\r\n            element.SetBinding(MediaVideoControl.IsSelectedProperty, isSelectedBinding);\r\n\r\n            var ttlParamsBinding = new Binding(\"TTLParams\");\r\n            element.SetBinding(MediaVideoControl.TTLParamsProperty, ttlParamsBinding);\r\n\r\n            return element;\r\n        }\r\n\r\n        private static UIElement GetPhotoControl(StackPanel previousPanel, KeyValuePair<TLObject, GroupedMessagePosition> position, double scale, double height, double left, double top)\r\n        {\r\n            TLObject media = null;\r\n            var message = position.Key as TLMessage;\r\n            if (message != null)\r\n            {\r\n                media = message.Media;\r\n            }\r\n            var decryptedMessage = position.Key as TLDecryptedMessage;\r\n            if (decryptedMessage != null)\r\n            {\r\n                media = decryptedMessage.Media;\r\n            }\r\n\r\n            var element = GetCachedControl<MediaPhotoControl>(previousPanel, media);\r\n            var created = false;  \r\n            if (element == null)\r\n            {\r\n                created = true;\r\n                element = new MediaPhotoControl();\r\n                element.DataContext = media;\r\n            }\r\n\r\n            var margin = 1.0;\r\n\r\n            element.ProgressScale = scale;\r\n            element.HorizontalAlignment = HorizontalAlignment.Left;\r\n            element.VerticalAlignment = VerticalAlignment.Top;\r\n            element.Width = position.Value.Width - 2.0 * margin;\r\n            element.Height = height * position.Value.Height - 2 * margin;\r\n            element.Margin = new Thickness(left + margin, top + margin, 0.0 + margin, 0.0 + margin);\r\n\r\n            if (!created) return element;\r\n\r\n            Caliburn.Micro.Message.SetAttach(element, \"[Event CancelUploading] = [Action CancelUploading($DataContext)]; [Event CancelDownloading] = [Action CancelPhotoDownloading($DataContext)]\");\r\n\r\n            var mediaBinding = new Binding(\"\");\r\n            element.SetBinding(MediaPhotoControl.MediaProperty, mediaBinding);\r\n\r\n            if (message != null && message.HasTTL()\r\n                || decryptedMessage != null && decryptedMessage.TTL.Value > 0)\r\n            {\r\n                element.ClearValue(MediaPhotoControl.SourceProperty);\r\n                //var sourceBinding = new Binding(\"Self\");\r\n                //sourceBinding.Converter = new DefaultPhotoConverter();\r\n                //element.SetBinding(MediaPhotoControl.SourceProperty, sourceBinding);\r\n\r\n                var previewSourceBinding = new Binding(\"ThumbSelf\");\r\n                previewSourceBinding.Converter = new PhotoToThumbConverter{ Secret = true };\r\n                element.SetBinding(MediaPhotoControl.PreviewSourceProperty, previewSourceBinding);\r\n            }\r\n            else\r\n            {\r\n                var sourceBinding = new Binding(\"Self\");\r\n                sourceBinding.Converter = new DefaultPhotoConverter();\r\n                sourceBinding.ConverterParameter = \"311_Background\";\r\n                element.SetBinding(MediaPhotoControl.SourceProperty, sourceBinding);\r\n\r\n                var previewSourceBinding = new Binding(\"ThumbSelf\");\r\n                previewSourceBinding.Converter = new PhotoToThumbConverter();\r\n                element.SetBinding(MediaPhotoControl.PreviewSourceProperty, previewSourceBinding);\r\n            }\r\n\r\n            var downloadingProgressBinding = new Binding(\"DownloadingProgress\");\r\n            element.SetBinding(MediaPhotoControl.DownloadingProgressProperty, downloadingProgressBinding);\r\n\r\n            var uploadingProgressBinding = new Binding(\"UploadingProgress\");\r\n            element.SetBinding(MediaPhotoControl.UploadingProgressProperty, uploadingProgressBinding);\r\n\r\n            var isSelectedBinding = new Binding(\"IsSelected\") { Source = position.Key };\r\n            element.SetBinding(MediaPhotoControl.IsSelectedProperty, isSelectedBinding);\r\n\r\n            var ttlParamsBinding = new Binding(\"TTLParams\");\r\n            element.SetBinding(MediaPhotoControl.TTLParamsProperty, ttlParamsBinding);\r\n\r\n            return element;\r\n        }\r\n\r\n        private static T GetCachedControl<T>(StackPanel panel, TLObject dataContext) where T : FrameworkElement\r\n        {\r\n            if (panel != null)\r\n            {\r\n                for (var i = 0; i < panel.Children.Count; i++)\r\n                {\r\n                    var control = panel.Children[i] as T;\r\n                    if (control != null && control.DataContext == dataContext)\r\n                    {\r\n                        panel.Children.RemoveAt(i);\r\n                        return control;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public GroupedMessageControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/GroupedMessages.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public class GroupedMessagePosition\r\n    {\r\n        public float AspectRatio { get; set; }\r\n        public bool IsEdge { get; set; }\r\n        public int Flags { get; private set; }\r\n        public bool IsLast { get; set; }\r\n        public int LeftSpanOffset { get; set; }\r\n        public byte MaxX { get; private set; }\r\n        public byte MaxY { get; private set; }\r\n        public byte MinX { get; private set; }\r\n        public byte MinY { get; private set; }\r\n        public float Height { get; private set; }\r\n        public int Width { get; set; }\r\n        public float[] SiblingHeights { get; set; }\r\n        public int SpanSize { get; set; }\r\n\r\n        public void Set(int minX, int maxX, int minY, int maxY, int w, float h, int flags)\r\n        {\r\n            MinX = (byte)minX;\r\n            MaxX = (byte)maxX;\r\n            MinY = (byte)minY;\r\n            MaxY = (byte)maxY;\r\n            SpanSize = w;\r\n            Width = w;\r\n            Height = h;\r\n            Flags = (byte)flags;\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return\r\n                string.Format(\r\n                    \"AspectRatio={0} IsEdge={1} Flags={2} IsLast={3} LeftSpanOffset={4} MaxX={5} MaxY={6} MinX={7} MinY={8} Height={9} Width={10} SiblingHeights=[{11}] SpanSize={12}\",\r\n                    AspectRatio, IsEdge, GetFlagsString(Flags), IsLast, LeftSpanOffset, MaxX, MaxY, MinX, MinY, Height, Width, string.Join(\",\", SiblingHeights ?? new float[] { }), SpanSize);\r\n        }\r\n\r\n        private string GetFlagsString(int flags)\r\n        {\r\n            var sb = new StringBuilder();\r\n            if ((flags & GroupedMessages.POSITION_FLAG_LEFT) == GroupedMessages.POSITION_FLAG_LEFT) sb.Append(\"l \");\r\n            if ((flags & GroupedMessages.POSITION_FLAG_RIGHT) == GroupedMessages.POSITION_FLAG_RIGHT) sb.Append(\"r \");\r\n            if ((flags & GroupedMessages.POSITION_FLAG_TOP) == GroupedMessages.POSITION_FLAG_TOP) sb.Append(\"t \");\r\n            if ((flags & GroupedMessages.POSITION_FLAG_BOTTOM) == GroupedMessages.POSITION_FLAG_BOTTOM) sb.Append(\"b \");\r\n\r\n            return sb.ToString();\r\n        }\r\n    }\r\n\r\n    public class GroupedMessages\r\n    {\r\n        public const int POSITION_FLAG_LEFT = 1;\r\n        public const int POSITION_FLAG_RIGHT = 2;\r\n        public const int POSITION_FLAG_TOP = 4;\r\n        public const int POSITION_FLAG_BOTTOM = 8;\r\n\r\n        private int _maxSizeWidth = 800;\r\n        public int MaxSizeWidth\r\n        {\r\n            get { return _maxSizeWidth; }\r\n        }\r\n\r\n        private List<GroupedMessagePosition> _posArray = new List<GroupedMessagePosition>();\r\n\r\n        public long GroupedId { get; set; }\r\n        public bool HasSibling { get; private set; }\r\n\r\n        public float Height { get; private set; }\r\n        public int Width { get; private set; }\r\n\r\n        public List<TLObject> Messages = new List<TLObject>();\r\n        public Dictionary<TLObject, GroupedMessagePosition> Positions = new Dictionary<TLObject, GroupedMessagePosition>();\r\n        private float _scale;\r\n\r\n        private class MessageGroupedLayoutAttempt\r\n        {\r\n            public float[] Heights { get; private set; }\r\n            public int[] LineCounts { get; private set; }\r\n\r\n            public MessageGroupedLayoutAttempt(int i1, int i2, float f1, float f2)\r\n            {\r\n                LineCounts = new int[] { i1, i2 };\r\n                Heights = new float[] { f1, f2 };\r\n            }\r\n\r\n            public MessageGroupedLayoutAttempt(int i1, int i2, int i3, float f1, float f2, float f3)\r\n            {\r\n                LineCounts = new int[] { i1, i2, i3 };\r\n                Heights = new float[] { f1, f2, f3 };\r\n            }\r\n\r\n            public MessageGroupedLayoutAttempt(int i1, int i2, int i3, int i4, float f1, float f2, float f3, float f4)\r\n            {\r\n                LineCounts = new int[] { i1, i2, i3, i4 };\r\n                Heights = new float[] { f1, f2, f3, f4 };\r\n            }\r\n        }\r\n\r\n        private float MultiHeight(float[] array, int start, int end)\r\n        {\r\n            float sum = 0.0f;\r\n            for (int a = start; a < end; a++)\r\n            {\r\n                sum += array[a];\r\n            }\r\n\r\n            return 800.0f * _scale / sum;\r\n        }\r\n\r\n        public void Calculate(int desiredWidth)\r\n        {\r\n            _posArray.Clear();\r\n            Positions.Clear();\r\n            int count = Messages.Count;\r\n            if (count <= 1)\r\n            {\r\n                return;\r\n            }\r\n\r\n            int totalWidth = 0;\r\n            float totalHeight = 0.0f;\r\n\r\n            _scale = (float)desiredWidth / _maxSizeWidth;\r\n            _maxSizeWidth = desiredWidth;\r\n            int firstSpanAdditionalSize = (int)(200 * _scale);\r\n            int minHeight = (int)(120 * _scale);\r\n            int minWidth = (int)(96 * _scale);\r\n            int paddingsWidth = (int)(32 * _scale);\r\n            float maxSizeHeight = 814.0f * _scale;\r\n            StringBuilder proportions = new StringBuilder();\r\n            float averageAspectRatio = 1.0f;\r\n            bool isOut = false;\r\n            int maxX = 0;\r\n            bool forceCalc = false;\r\n\r\n            for (int a = 0; a < count; a++)\r\n            {\r\n                int w = 0;\r\n                int h = 0;\r\n                var decryptedMessageObject = Messages[a] as TLDecryptedMessage;\r\n                if (decryptedMessageObject != null)\r\n                {\r\n                    TLVector<TLPhotoSizeBase> photoThumbs = null;\r\n                    var photoMedia = decryptedMessageObject.Media as TLDecryptedMessageMediaPhoto;\r\n                    var documentMedia = decryptedMessageObject.Media as TLDecryptedMessageMediaDocument;\r\n                    var videoMedia = decryptedMessageObject.Media as TLDecryptedMessageMediaVideo;\r\n                    if (photoMedia != null)\r\n                    {\r\n                        photoThumbs = new TLVector<TLPhotoSizeBase> { new TLPhotoSize { W = photoMedia.W, H = photoMedia.H } };\r\n                    }\r\n                    else if (documentMedia != null)\r\n                    {\r\n                        photoThumbs = new TLVector<TLPhotoSizeBase> { new TLPhotoSize { W = documentMedia.ThumbW.Value > 0 ? documentMedia.ThumbW : new TLInt(90), H = documentMedia.ThumbH.Value > 0 ? documentMedia.ThumbH : new TLInt(90) } };\r\n                    }\r\n                    else if (videoMedia != null)\r\n                    {\r\n                        photoThumbs = new TLVector<TLPhotoSizeBase> { new TLPhotoSize { W = videoMedia.W.Value > 0 ? videoMedia.W : new TLInt(90), H = videoMedia.H.Value > 0 ? videoMedia.H : new TLInt(90) } };\r\n                    }\r\n                    TLPhotoSizeBase photoSize = GetClosestPhotoSizeWithSize(photoThumbs, 1280);\r\n                    var size = photoSize as TLPhotoSize;\r\n                    var cachedSize = photoSize as TLPhotoCachedSize;\r\n                    if (size != null)\r\n                    {\r\n                        w = size.W.Value;\r\n                        h = size.H.Value;\r\n                    }\r\n                    else if (cachedSize != null)\r\n                    {\r\n                        w = cachedSize.W.Value;\r\n                        h = cachedSize.H.Value;\r\n                    }\r\n                    GroupedMessagePosition position = new GroupedMessagePosition();\r\n                    position.IsLast = a == count - 1;\r\n                    position.AspectRatio = w / (float)h;\r\n\r\n                    if (position.AspectRatio > 1.2f)\r\n                    {\r\n                        proportions.Append(\"w\");\r\n                    }\r\n                    else if (position.AspectRatio < 0.8f)\r\n                    {\r\n                        proportions.Append(\"n\");\r\n                    }\r\n                    else\r\n                    {\r\n                        proportions.Append(\"q\");\r\n                    }\r\n\r\n                    averageAspectRatio += position.AspectRatio;\r\n\r\n                    if (position.AspectRatio > 2.0f)\r\n                    {\r\n                        forceCalc = true;\r\n                    }\r\n\r\n                    Positions[decryptedMessageObject] = position;\r\n                    _posArray.Add(position);\r\n                }\r\n\r\n                var messageObject = Messages[a] as TLMessage;\r\n                if (messageObject != null)\r\n                {\r\n                    TLVector<TLPhotoSizeBase> photoThumbs = null;\r\n                    var photoMedia = messageObject.Media as TLMessageMediaPhoto;\r\n                    var documentMedia = messageObject.Media as TLMessageMediaDocument;\r\n                    if (photoMedia != null)\r\n                    {\r\n                        var photo = photoMedia.Photo as TLPhoto;\r\n                        if (photo != null)\r\n                        {\r\n                            photoThumbs = photo.Sizes;\r\n                        }\r\n                    }\r\n                    else if (documentMedia != null)\r\n                    {\r\n                        var document = documentMedia.Document as TLDocument;\r\n                        if (document != null)\r\n                        {\r\n                            photoThumbs = new TLVector<TLPhotoSizeBase> { document.Thumb };\r\n                        }\r\n                    }\r\n                    TLPhotoSizeBase photoSize = GetClosestPhotoSizeWithSize(photoThumbs, 1280);\r\n                    var size = photoSize as TLPhotoSize;\r\n                    var cachedSize = photoSize as TLPhotoCachedSize;\r\n                    if (size != null)\r\n                    {\r\n                        w = size.W.Value;\r\n                        h = size.H.Value;\r\n                    }\r\n                    else if (cachedSize != null)\r\n                    {\r\n                        w = cachedSize.W.Value;\r\n                        h = cachedSize.H.Value;\r\n                    }\r\n                    GroupedMessagePosition position = new GroupedMessagePosition();\r\n                    position.IsLast = a == count - 1;\r\n                    position.AspectRatio = w / (float)h;\r\n\r\n                    if (position.AspectRatio > 1.2f)\r\n                    {\r\n                        proportions.Append(\"w\");\r\n                    }\r\n                    else if (position.AspectRatio < 0.8f)\r\n                    {\r\n                        proportions.Append(\"n\");\r\n                    }\r\n                    else\r\n                    {\r\n                        proportions.Append(\"q\");\r\n                    }\r\n\r\n                    averageAspectRatio += position.AspectRatio;\r\n\r\n                    if (position.AspectRatio > 2.0f)\r\n                    {\r\n                        forceCalc = true;\r\n                    }\r\n\r\n                    Positions[messageObject] = position;\r\n                    _posArray.Add(position);\r\n                }\r\n            }\r\n\r\n            //int minHeight = AndroidUtilities.dp(120);\r\n            //int minWidth = (int)(AndroidUtilities.dp(120) / (Math.Min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) / (float)_maxSizeWidth));\r\n            //int paddingsWidth = (int)(AndroidUtilities.dp(40) / (Math.Min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) / (float)_maxSizeWidth));\r\n\r\n\r\n            float maxAspectRatio = _maxSizeWidth / maxSizeHeight;\r\n            averageAspectRatio = averageAspectRatio / count;\r\n\r\n            if (!forceCalc && (count == 2 || count == 3 || count == 4))\r\n            {\r\n                if (count == 2)\r\n                {\r\n                    GroupedMessagePosition position1 = _posArray[0];\r\n                    GroupedMessagePosition position2 = _posArray[1];\r\n                    String pString = proportions.ToString();\r\n                    if (pString.Equals(\"ww\") && averageAspectRatio > 1.4 * maxAspectRatio && position1.AspectRatio - position2.AspectRatio < 0.2)\r\n                    {\r\n                        float height = (float)Math.Round(Math.Min(_maxSizeWidth / position1.AspectRatio, Math.Min(_maxSizeWidth / position2.AspectRatio, maxSizeHeight / 2.0f))) / maxSizeHeight;\r\n                        position1.Set(0, 0, 0, 0, _maxSizeWidth, height, POSITION_FLAG_LEFT | POSITION_FLAG_RIGHT | POSITION_FLAG_TOP);\r\n                        position2.Set(0, 0, 1, 1, _maxSizeWidth, height, POSITION_FLAG_LEFT | POSITION_FLAG_RIGHT | POSITION_FLAG_BOTTOM);\r\n\r\n                        totalWidth = _maxSizeWidth;\r\n                        totalHeight = height * 2;\r\n                    }\r\n                    else if (pString.Equals(\"ww\") || pString.Equals(\"qq\"))\r\n                    {\r\n                        int width = _maxSizeWidth / 2;\r\n                        float height = (float)Math.Round(Math.Min(width / position1.AspectRatio, Math.Min(width / position2.AspectRatio, maxSizeHeight))) / maxSizeHeight;\r\n                        position1.Set(0, 0, 0, 0, width, height, POSITION_FLAG_LEFT | POSITION_FLAG_BOTTOM | POSITION_FLAG_TOP);\r\n                        position2.Set(1, 1, 0, 0, width, height, POSITION_FLAG_RIGHT | POSITION_FLAG_BOTTOM | POSITION_FLAG_TOP);\r\n                        maxX = 1;\r\n\r\n                        totalWidth = width + width;\r\n                        totalHeight = height;\r\n                    }\r\n                    else\r\n                    {\r\n                        int secondWidth = (int)Math.Max(0.4f * _maxSizeWidth, Math.Round((_maxSizeWidth / position1.AspectRatio / (1.0f / position1.AspectRatio + 1.0f / position2.AspectRatio))));\r\n                        int firstWidth = _maxSizeWidth - secondWidth;\r\n                        if (firstWidth < minWidth)\r\n                        {\r\n                            int diff = minWidth - firstWidth;\r\n                            firstWidth = minWidth;\r\n                            secondWidth -= diff;\r\n                        }\r\n\r\n                        float height = (float)Math.Min(maxSizeHeight, Math.Round(Math.Min(firstWidth / position1.AspectRatio, secondWidth / position2.AspectRatio))) / maxSizeHeight;\r\n                        position1.Set(0, 0, 0, 0, firstWidth, height, POSITION_FLAG_LEFT | POSITION_FLAG_BOTTOM | POSITION_FLAG_TOP);\r\n                        position2.Set(1, 1, 0, 0, secondWidth, height, POSITION_FLAG_RIGHT | POSITION_FLAG_BOTTOM | POSITION_FLAG_TOP);\r\n                        maxX = 1;\r\n\r\n                        totalWidth = firstWidth + secondWidth;\r\n                        totalHeight = height;\r\n                    }\r\n                }\r\n                else if (count == 3)\r\n                {\r\n                    GroupedMessagePosition position1 = _posArray[0];\r\n                    GroupedMessagePosition position2 = _posArray[1];\r\n                    GroupedMessagePosition position3 = _posArray[2];\r\n                    if (proportions[0] == 'n')\r\n                    {\r\n                        float thirdHeight = (float)Math.Min(maxSizeHeight * 0.5f, Math.Round(position2.AspectRatio * _maxSizeWidth / (position3.AspectRatio + position2.AspectRatio)));\r\n                        float secondHeight = maxSizeHeight - thirdHeight;\r\n                        int rightWidth = (int)Math.Max(minWidth, Math.Min(_maxSizeWidth * 0.5f, Math.Round(Math.Min(thirdHeight * position3.AspectRatio, secondHeight * position2.AspectRatio))));\r\n\r\n                        int leftWidth = (int)Math.Round(Math.Min(maxSizeHeight * position1.AspectRatio + paddingsWidth, _maxSizeWidth - rightWidth));\r\n                        position1.Set(0, 0, 0, 1, leftWidth, 1.0f, POSITION_FLAG_LEFT | POSITION_FLAG_BOTTOM | POSITION_FLAG_TOP);\r\n\r\n                        position2.Set(1, 1, 0, 0, rightWidth, secondHeight / maxSizeHeight, POSITION_FLAG_RIGHT | POSITION_FLAG_TOP);\r\n\r\n                        position3.Set(0, 1, 1, 1, rightWidth, thirdHeight / maxSizeHeight, POSITION_FLAG_RIGHT | POSITION_FLAG_BOTTOM);\r\n                        position3.SpanSize = _maxSizeWidth;\r\n\r\n                        position1.SiblingHeights = new float[] { thirdHeight / maxSizeHeight, secondHeight / maxSizeHeight };\r\n\r\n                        if (isOut)\r\n                        {\r\n                            position1.SpanSize = _maxSizeWidth - rightWidth;\r\n                        }\r\n                        else\r\n                        {\r\n                            position2.SpanSize = _maxSizeWidth - leftWidth;\r\n                            position3.LeftSpanOffset = leftWidth;\r\n                        }\r\n                        HasSibling = true;\r\n                        maxX = 1;\r\n\r\n                        totalWidth = leftWidth + rightWidth;\r\n                        totalHeight = 1.0f;\r\n                    }\r\n                    else\r\n                    {\r\n                        float firstHeight = (float)Math.Round(Math.Min(_maxSizeWidth / position1.AspectRatio, (maxSizeHeight) * 0.66f)) / maxSizeHeight;\r\n                        position1.Set(0, 1, 0, 0, _maxSizeWidth, firstHeight, POSITION_FLAG_LEFT | POSITION_FLAG_RIGHT | POSITION_FLAG_TOP);\r\n\r\n                        int width = _maxSizeWidth / 2;\r\n                        float secondHeight = (float)Math.Min(maxSizeHeight - firstHeight, Math.Round(Math.Min(width / position2.AspectRatio, width / position3.AspectRatio))) / maxSizeHeight;\r\n                        position2.Set(0, 0, 1, 1, width, secondHeight, POSITION_FLAG_LEFT | POSITION_FLAG_BOTTOM);\r\n                        position3.Set(1, 1, 1, 1, width, secondHeight, POSITION_FLAG_RIGHT | POSITION_FLAG_BOTTOM);\r\n                        maxX = 1;\r\n\r\n                        totalWidth = _maxSizeWidth;\r\n                        totalHeight = firstHeight + secondHeight;\r\n                    }\r\n                }\r\n                else if (count == 4)\r\n                {\r\n                    GroupedMessagePosition position1 = _posArray[0];\r\n                    GroupedMessagePosition position2 = _posArray[1];\r\n                    GroupedMessagePosition position3 = _posArray[2];\r\n                    GroupedMessagePosition position4 = _posArray[3];\r\n                    if (proportions[0] == 'w')\r\n                    {\r\n                        float h0 = (float)Math.Round(Math.Min(_maxSizeWidth / position1.AspectRatio, maxSizeHeight * 0.66f)) / maxSizeHeight;\r\n                        position1.Set(0, 2, 0, 0, _maxSizeWidth, h0, POSITION_FLAG_LEFT | POSITION_FLAG_RIGHT | POSITION_FLAG_TOP);\r\n\r\n                        float h = (float)Math.Round(_maxSizeWidth / (position2.AspectRatio + position3.AspectRatio + position4.AspectRatio));\r\n                        int w0 = (int)Math.Max(minWidth, Math.Min(_maxSizeWidth * 0.4f, h * position2.AspectRatio));\r\n                        int w2 = (int)Math.Max(Math.Max(minWidth, _maxSizeWidth * 0.33f), h * position4.AspectRatio);\r\n                        int w1 = _maxSizeWidth - w0 - w2;\r\n                        h = Math.Min(maxSizeHeight - h0, h);\r\n                        h /= maxSizeHeight;\r\n                        position2.Set(0, 0, 1, 1, w0, h, POSITION_FLAG_LEFT | POSITION_FLAG_BOTTOM);\r\n                        position3.Set(1, 1, 1, 1, w1, h, POSITION_FLAG_BOTTOM);\r\n                        position4.Set(2, 2, 1, 1, w2, h, POSITION_FLAG_RIGHT | POSITION_FLAG_BOTTOM);\r\n                        maxX = 2;\r\n\r\n                        totalWidth = _maxSizeWidth;\r\n                        totalHeight = h0 + h;\r\n                    }\r\n                    else\r\n                    {\r\n                        int w = (int)Math.Max(minWidth, Math.Round(maxSizeHeight / (1.0f / position2.AspectRatio + 1.0f / position3.AspectRatio + 1.0f / _posArray[3].AspectRatio)));\r\n                        float h0 = Math.Min(0.33f, Math.Max(minHeight, w / position2.AspectRatio) / maxSizeHeight);\r\n                        float h1 = Math.Min(0.33f, Math.Max(minHeight, w / position3.AspectRatio) / maxSizeHeight);\r\n                        float h2 = 1.0f - h0 - h1;\r\n                        int w0 = (int)Math.Round(Math.Min(maxSizeHeight * position1.AspectRatio + paddingsWidth, _maxSizeWidth - w));\r\n\r\n                        position1.Set(0, 0, 0, 2, w0, h0 + h1 + h2, POSITION_FLAG_LEFT | POSITION_FLAG_TOP | POSITION_FLAG_BOTTOM);\r\n\r\n                        position2.Set(1, 1, 0, 0, w, h0, POSITION_FLAG_RIGHT | POSITION_FLAG_TOP);\r\n\r\n                        position3.Set(0, 1, 1, 1, w, h1, POSITION_FLAG_RIGHT);\r\n                        position3.SpanSize = _maxSizeWidth;\r\n\r\n                        position4.Set(0, 1, 2, 2, w, h2, POSITION_FLAG_RIGHT | POSITION_FLAG_BOTTOM);\r\n                        position4.SpanSize = _maxSizeWidth;\r\n\r\n                        if (isOut)\r\n                        {\r\n                            position1.SpanSize = _maxSizeWidth - w;\r\n                        }\r\n                        else\r\n                        {\r\n                            position2.SpanSize = _maxSizeWidth - w0;\r\n                            position3.LeftSpanOffset = w0;\r\n                            position4.LeftSpanOffset = w0;\r\n                        }\r\n                        position1.SiblingHeights = new float[] { h0, h1, h2 };\r\n                        HasSibling = true;\r\n                        maxX = 1;\r\n\r\n                        totalWidth = w + w0;\r\n                        totalHeight = h0 + h1 + h2;\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                float[] croppedRatios = new float[_posArray.Count];\r\n                for (int a = 0; a < count; a++)\r\n                {\r\n                    if (averageAspectRatio > 1.1f)\r\n                    {\r\n                        croppedRatios[a] = Math.Max(1.0f, _posArray[a].AspectRatio);\r\n                    }\r\n                    else\r\n                    {\r\n                        croppedRatios[a] = Math.Min(1.0f, _posArray[a].AspectRatio);\r\n                    }\r\n                    croppedRatios[a] = Math.Max(0.66667f, Math.Min(1.7f, croppedRatios[a]));\r\n                }\r\n\r\n                int firstLine;\r\n                int secondLine;\r\n                int thirdLine;\r\n                int fourthLine;\r\n                List<MessageGroupedLayoutAttempt> attempts = new List<MessageGroupedLayoutAttempt>();\r\n                for (firstLine = 1; firstLine < croppedRatios.Length; firstLine++)\r\n                {\r\n                    secondLine = croppedRatios.Length - firstLine;\r\n                    if (firstLine > 3 || secondLine > 3)\r\n                    {\r\n                        continue;\r\n                    }\r\n                    attempts.Add(new MessageGroupedLayoutAttempt(firstLine, secondLine, MultiHeight(croppedRatios, 0, firstLine), MultiHeight(croppedRatios, firstLine, croppedRatios.Length)));\r\n                }\r\n\r\n                for (firstLine = 1; firstLine < croppedRatios.Length - 1; firstLine++)\r\n                {\r\n                    for (secondLine = 1; secondLine < croppedRatios.Length - firstLine; secondLine++)\r\n                    {\r\n                        thirdLine = croppedRatios.Length - firstLine - secondLine;\r\n                        if (firstLine > 3 || secondLine > (averageAspectRatio < 0.85f ? 4 : 3) || thirdLine > 3)\r\n                        {\r\n                            continue;\r\n                        }\r\n                        attempts.Add(new MessageGroupedLayoutAttempt(firstLine, secondLine, thirdLine, MultiHeight(croppedRatios, 0, firstLine), MultiHeight(croppedRatios, firstLine, firstLine + secondLine), MultiHeight(croppedRatios, firstLine + secondLine, croppedRatios.Length)));\r\n                    }\r\n                }\r\n\r\n                for (firstLine = 1; firstLine < croppedRatios.Length - 2; firstLine++)\r\n                {\r\n                    for (secondLine = 1; secondLine < croppedRatios.Length - firstLine; secondLine++)\r\n                    {\r\n                        for (thirdLine = 1; thirdLine < croppedRatios.Length - firstLine - secondLine; thirdLine++)\r\n                        {\r\n                            fourthLine = croppedRatios.Length - firstLine - secondLine - thirdLine;\r\n                            if (firstLine > 3 || secondLine > 3 || thirdLine > 3 || fourthLine > 3)\r\n                            {\r\n                                continue;\r\n                            }\r\n                            attempts.Add(new MessageGroupedLayoutAttempt(firstLine, secondLine, thirdLine, fourthLine, MultiHeight(croppedRatios, 0, firstLine), MultiHeight(croppedRatios, firstLine, firstLine + secondLine), MultiHeight(croppedRatios, firstLine + secondLine, firstLine + secondLine + thirdLine), MultiHeight(croppedRatios, firstLine + secondLine + thirdLine, croppedRatios.Length)));\r\n                        }\r\n                    }\r\n                }\r\n\r\n                MessageGroupedLayoutAttempt optimal = null;\r\n                float optimalDiff = 0.0f;\r\n                float maxHeight = _maxSizeWidth / 3 * 4;\r\n                for (int a = 0; a < attempts.Count; a++)\r\n                {\r\n                    MessageGroupedLayoutAttempt attempt = attempts[a];\r\n                    float height = 0;\r\n                    float minLineHeight = float.MaxValue;\r\n                    for (int b = 0; b < attempt.Heights.Length; b++)\r\n                    {\r\n                        height += attempt.Heights[b];\r\n                        if (attempt.Heights[b] < minLineHeight)\r\n                        {\r\n                            minLineHeight = attempt.Heights[b];\r\n                        }\r\n                    }\r\n\r\n                    float diff = Math.Abs(height - maxHeight);\r\n                    if (attempt.LineCounts.Length > 1)\r\n                    {\r\n                        if (attempt.LineCounts[0] > attempt.LineCounts[1] || (attempt.LineCounts.Length > 2 && attempt.LineCounts[1] > attempt.LineCounts[2]) || (attempt.LineCounts.Length > 3 && attempt.LineCounts[2] > attempt.LineCounts[3]))\r\n                        {\r\n                            diff *= 1.5f;\r\n                        }\r\n                    }\r\n\r\n                    if (minLineHeight < minWidth)\r\n                    {\r\n                        diff *= 1.5f;\r\n                    }\r\n\r\n                    if (optimal == null || diff < optimalDiff)\r\n                    {\r\n                        optimal = attempt;\r\n                        optimalDiff = diff;\r\n                    }\r\n                }\r\n                if (optimal == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                int index = 0;\r\n                float y = 0.0f;\r\n\r\n                for (int i = 0; i < optimal.LineCounts.Length; i++)\r\n                {\r\n                    int c = optimal.LineCounts[i];\r\n                    float lineHeight = optimal.Heights[i];\r\n                    int spanLeft = _maxSizeWidth;\r\n                    GroupedMessagePosition posToFix = null;\r\n                    maxX = Math.Max(maxX, c - 1);\r\n                    for (int k = 0; k < c; k++)\r\n                    {\r\n                        float ratio = croppedRatios[index];\r\n                        int width = (int)(ratio * lineHeight);\r\n                        spanLeft -= width;\r\n                        GroupedMessagePosition pos = _posArray[index];\r\n                        int flags = 0;\r\n                        if (i == 0)\r\n                        {\r\n                            flags |= POSITION_FLAG_TOP;\r\n                        }\r\n                        if (i == optimal.LineCounts.Length - 1)\r\n                        {\r\n                            flags |= POSITION_FLAG_BOTTOM;\r\n                        }\r\n                        if (k == 0)\r\n                        {\r\n                            flags |= POSITION_FLAG_LEFT;\r\n                            if (isOut)\r\n                            {\r\n                                posToFix = pos;\r\n                            }\r\n                        }\r\n                        if (k == c - 1)\r\n                        {\r\n                            flags |= POSITION_FLAG_RIGHT;\r\n                            if (!isOut)\r\n                            {\r\n                                posToFix = pos;\r\n                            }\r\n                        }\r\n                        pos.Set(k, k, i, i, width, lineHeight / maxSizeHeight, flags);\r\n                        index++;\r\n                    }\r\n                    posToFix.Width += spanLeft;\r\n                    posToFix.SpanSize += spanLeft;\r\n                    y += lineHeight;\r\n                }\r\n\r\n                totalWidth = _maxSizeWidth;\r\n                totalHeight = y / maxSizeHeight;\r\n            }\r\n            int avatarOffset = 108;\r\n            for (int a = 0; a < count; a++)\r\n            {\r\n                //GroupedMessagePosition pos = _posArray[a];\r\n                //if (isOut)\r\n                //{\r\n                //    if (pos.MinX == 0)\r\n                //    {\r\n                //        pos.SpanSize += firstSpanAdditionalSize;\r\n                //    }\r\n                //    if ((pos.Flags & POSITION_FLAG_RIGHT) != 0)\r\n                //    {\r\n                //        pos.IsEdge = true;\r\n                //    }\r\n                //}\r\n                //else\r\n                //{\r\n                //    if (pos.MaxX == maxX || (pos.Flags & POSITION_FLAG_RIGHT) != 0)\r\n                //    {\r\n                //        pos.SpanSize += firstSpanAdditionalSize;\r\n                //    }\r\n                //    if ((pos.Flags & POSITION_FLAG_LEFT) != 0)\r\n                //    {\r\n                //        pos.IsEdge = true;\r\n                //    }\r\n                //}\r\n                //TLMessage messageObject = Messages[a];\r\n                //if (!isOut && messageObject.needDrawAvatar())\r\n                //{\r\n                //    if (pos.IsEdge)\r\n                //    {\r\n                //        if (pos.SpanSize != 1000)\r\n                //        {\r\n                //            pos.SpanSize += avatarOffset;\r\n                //        }\r\n                //        pos.Width += avatarOffset;\r\n                //    }\r\n                //    else if ((pos.Flags & POSITION_FLAG_RIGHT) != 0)\r\n                //    {\r\n                //        if (pos.SpanSize != 1000)\r\n                //        {\r\n                //            pos.SpanSize -= avatarOffset;\r\n                //        }\r\n                //        else if (pos.LeftSpanOffset != 0)\r\n                //        {\r\n                //            pos.LeftSpanOffset += avatarOffset;\r\n                //        }\r\n                //    }\r\n                //}\r\n            }\r\n\r\n            Width = totalWidth;\r\n            Height = totalHeight;\r\n        }\r\n\r\n        public static TLPhotoSizeBase GetClosestPhotoSizeWithSize(TLVector<TLPhotoSizeBase> sizes, int side)\r\n        {\r\n            return GetClosestPhotoSizeWithSize(sizes, side, false);\r\n        }\r\n\r\n        public static TLPhotoSizeBase GetClosestPhotoSizeWithSize(TLVector<TLPhotoSizeBase> sizes, int side, bool byMinSide)\r\n        {\r\n            if (sizes == null || sizes.Count == 0)\r\n            {\r\n                return null;\r\n            }\r\n            int lastSide = 0;\r\n            TLPhotoSizeBase closestObject = null;\r\n            for (int a = 0; a < sizes.Count; a++)\r\n            {\r\n                TLPhotoSizeBase obj = sizes[a];\r\n                if (obj == null)\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                int w = 0;\r\n                int h = 0;\r\n                var size = obj as TLPhotoSize;\r\n                var cachedSize = obj as TLPhotoCachedSize;\r\n                if (size != null)\r\n                {\r\n                    w = size.W.Value;\r\n                    h = size.H.Value;\r\n                }\r\n                else if (cachedSize != null)\r\n                {\r\n                    w = cachedSize.W.Value;\r\n                    h = cachedSize.H.Value;\r\n                }\r\n\r\n                if (byMinSide)\r\n                {\r\n                    int currentSide = h >= w ? w : h;\r\n                    var closestSize = closestObject as TLPhotoSize;\r\n                    if (closestObject == null || side > 100 && closestSize != null && closestSize.Location is TLFileLocation && ((TLFileLocation)closestSize.Location).DCId.Value == int.MinValue || obj is TLPhotoCachedSize || side > lastSide && lastSide < currentSide)\r\n                    {\r\n                        closestObject = obj;\r\n                        lastSide = currentSide;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    int currentSide = w >= h ? w : h;\r\n                    var closestSize = closestObject as TLPhotoSize;\r\n                    if (closestObject == null || side > 100 && closestSize != null && closestSize.Location is TLFileLocation && ((TLFileLocation)closestSize.Location).DCId.Value == int.MinValue || obj is TLPhotoCachedSize || currentSide <= side && lastSide < currentSide)\r\n                    {\r\n                        closestObject = obj;\r\n                        lastSide = currentSide;\r\n                    }\r\n                }\r\n            }\r\n            return closestObject;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/InputBox.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.InputBox\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"InputForegroundBrushLight\" Color=\"#FF8D969F\"/>\r\n        <SolidColorBrush x:Key=\"InputForegroundBrushDark\" Color=\"#FF999999\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n\r\n        <Storyboard x:Name=\"HintStoryboard\" Completed=\"HintStoryboard_OnCompleted\">\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"Hint\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                <DiscreteObjectKeyFrame KeyTime=\"0:0:1\" Value=\"Collapsed\"/>\r\n            </ObjectAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"RecordButton\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                <DiscreteObjectKeyFrame KeyTime=\"0:0:1\" Value=\"Visible\"/>\r\n            </ObjectAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"CoverEllipse\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n            </ObjectAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"VolumeEllipse\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n            </ObjectAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"RecordButtonIcon\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource InputForegroundBrushLight}\"/>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n\r\n        <Storyboard x:Name=\"CancelRecordingStoryboard\" Completed=\"CancelRecordingStoryboard_OnCompleted\">\r\n            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"X\" Storyboard.TargetName=\"SliderTransform\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.15\" Value=\"-100\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"X\" Storyboard.TargetName=\"TimerTransform\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.15\" Value=\"-100\"/>\r\n                </DoubleAnimationUsingKeyFrames>-->\r\n        </Storyboard>\r\n        <SolidColorBrush x:Key=\"AppBarPanelLight\" Color=\"#E7E9EB\"/>\r\n        <SolidColorBrush x:Key=\"AppBarPanelDark\" Color=\"#1F1F1F\"/>\r\n        <Style x:Key=\"WatermarkedTextBoxStyle1\" TargetType=\"controls:WatermarkedTextBox\">\r\n            <Setter Property=\"InputScope\" Value=\"Text\"/>\r\n            <Setter Property=\"AcceptsReturn\" Value=\"True\"/>\r\n            <Setter Property=\"TextWrapping\" Value=\"Wrap\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"23\"/>\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"SelectionBackground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"Padding\" Value=\"0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"controls:WatermarkedTextBox\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"ReadOnly\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\"/>\r\n                                    <VisualState x:Name=\"Unfocused\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"MainBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"0\"/>\r\n                            <Border x:Name=\"ReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"0\" Visibility=\"Collapsed\"/>\r\n                            <Border BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"0\">\r\n                                <Grid Margin=\"0,0,0,2\">\r\n                                    <Border Background=\"Transparent\" x:Name=\"WatermarkInlineContentBorder\">\r\n                                        <!--<ContentControl \r\n                                        x:Name=\"WatermarkInlineContent\"\r\n                                        Margin=\"0,4\" VerticalAlignment=\"Top\"\r\n                                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                        Foreground=\"{TemplateBinding WatermarkForeground}\" \r\n                                        Style=\"{TemplateBinding WatermarkStyle}\" \r\n                                        Content=\"{TemplateBinding InlineWatermark}\" \r\n                                        Background=\"Transparent\" Opacity=\"0.5\"/>-->\r\n                                        <ContentControl x:Name=\"WatermarkInlineContent\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Left\" Style=\"{TemplateBinding WatermarkStyle}\" Content=\"{TemplateBinding InlineWatermark}\" Opacity=\"0.6\"/>\r\n                                    </Border>\r\n                                    <ContentControl x:Name=\"WatermarkContent\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Left\" Style=\"{TemplateBinding WatermarkStyle}\" Content=\"{TemplateBinding Watermark}\" Opacity=\"0.6\"/>\r\n                                    <ContentControl x:Name=\"ContentElement\" HorizontalContentAlignment=\"Stretch\" Padding=\"{TemplateBinding Padding}\" />\r\n                                </Grid>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"ScrollViewerStyle1\" TargetType=\"ScrollViewer\">\r\n            <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Disabled\"/>\r\n            <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Padding\" Value=\"0\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"ScrollViewer\">\r\n                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                    </VisualStateGroup.Transitions>\r\n                                    <VisualState x:Name=\"Scrolling\"/>\r\n                                    <VisualState x:Name=\"NotScrolling\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Grid Margin=\"{TemplateBinding Padding}\">\r\n                                <ScrollContentPresenter x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\"/>\r\n                                <ScrollBar x:Name=\"VerticalScrollBar\" HorizontalAlignment=\"Right\" Height=\"Auto\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Vertical\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{TemplateBinding VerticalOffset}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" VerticalAlignment=\"Stretch\" Width=\"5\"/>\r\n                                <ScrollBar x:Name=\"HorizontalScrollBar\" HorizontalAlignment=\"Stretch\" Height=\"5\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Horizontal\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{TemplateBinding HorizontalOffset}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" VerticalAlignment=\"Bottom\" Width=\"Auto\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"ButtonStyle1\" TargetType=\"Button\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"23\"/>\r\n            <Setter Property=\"FontWeight\" Value=\"Normal\"/>\r\n            <Setter Property=\"Margin\" Value=\"12,-12\"/>\r\n            <Setter Property=\"VerticalAlignment\" Value=\"Center\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n            <!--<Setter Property=\"Padding\" Value=\"10,3,10,5\"/>-->\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"CommonGrid\">\r\n        <Border x:Name=\"BackgroundBorder\" MinHeight=\"56\" VerticalAlignment=\"Bottom\" Background=\"{StaticResource PhoneBackgroundBrush}\" CacheMode=\"BitmapCache\">\r\n            <Border.RenderTransform>\r\n                <TranslateTransform x:Name=\"InputBoxTranslate\"/>\r\n            </Border.RenderTransform>\r\n            <Grid x:Name=\"LayoutRoot\"\r\n                  ManipulationDelta=\"LayoutRoot_OnManipulationDelta\"\r\n                  ManipulationCompleted=\"LayoutRoot_OnManipulationCompleted\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"*\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n\r\n                <Rectangle x:Name=\"TopBorder\" VerticalAlignment=\"Top\" Grid.RowSpan=\"3\" Height=\"2\" Fill=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                \r\n                <Grid x:Name=\"ReplyGrid\" Grid.Row=\"0\" Height=\"64\" Visibility=\"Collapsed\" Tap=\"OpenReply_OnTap\" Background=\"Transparent\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Border Background=\"Transparent\" Tap=\"DeleteReply_OnTap\" VerticalAlignment=\"Top\">\r\n                        <Image Source=\"/Images/W10M/ic_cancel_2x.png\" Width=\"32\" Height=\"32\" Margin=\"20,20,20,12\"/>\r\n                    </Border>\r\n                    <ContentControl Grid.Column=\"1\"\r\n                        x:Name=\"ReplyContentControl\"\r\n                        Margin=\"0,8,12,2\" Height=\"54\"\r\n                        HorizontalContentAlignment=\"Stretch\"\r\n                        HorizontalAlignment=\"Stretch\"\r\n                        VerticalAlignment=\"Top\"\r\n                        Foreground=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                </Grid>\r\n                <!--<TextBlock x:Name=\"Debug\" IsHitTestVisible=\"False\" Foreground=\"Green\" Visibility=\"Collapsed\"/>-->\r\n\r\n                <Grid Grid.Row=\"1\" x:Name=\"InputGrid\" MinHeight=\"56\">\r\n                    <Grid.RenderTransform>\r\n                        <TranslateTransform x:Name=\"InputGridTransform\"/>\r\n                    </Grid.RenderTransform>\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Border x:Name=\"EmojiButton\" Background=\"Transparent\" MouseLeftButtonDown=\"EmojiButton_OnTap\" ManipulationCompleted=\"EmojiButton_OnManipulationCompleted\">\r\n                        <Image x:Name=\"EmojiButtonImage\" Source=\"/Images/W10M/ic_emoji_2x.png\" Width=\"32\" Height=\"32\" Margin=\"20\" VerticalAlignment=\"Bottom\"/>\r\n                    </Border>\r\n                    <ScrollViewer MinHeight=\"56\" MaxHeight=\"161\" Grid.Row=\"0\" Grid.Column=\"1\" x:Name=\"Scroll\" Margin=\"-12,0\" Style=\"{StaticResource ScrollViewerStyle1}\">\r\n                        \r\n                        <controls:WatermarkedTextBox\r\n                            x:Name=\"Input\"\r\n                            Margin=\"12,12\" \r\n                            Watermark=\"{Binding Resources.Message, Source={StaticResource Strings}}\"\r\n                            FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                            KeyDown=\"Input_OnKeyDown\"\r\n                            GotFocus=\"Input_OnGotFocus\"\r\n                            LostFocus=\"Input_OnLostFocus\"\r\n                            TextChanged=\"Input_OnTextChanged\"\r\n                            SelectionChanged=\"Input_OnSelectionChanged\"\r\n                            SizeChanged=\"Input_OnSizeChanged\" \r\n                            Style=\"{StaticResource WatermarkedTextBoxStyle1}\"/>\r\n                    </ScrollViewer>\r\n                    <StackPanel x:Name=\"AdditionalButtons\" Orientation=\"Horizontal\" Grid.Row=\"0\" Grid.Column=\"2\">\r\n                        <Border x:Name=\"KeyboardButtonBorder\" Background=\"Transparent\" Tap=\"KeyboardButton_OnTap\" Visibility=\"Collapsed\">\r\n                            <Image x:Name=\"KeyboardButton\" Source=\"/Images/W10M/ic_botkeyboard_2x.png\" Width=\"32\" Height=\"32\" Margin=\"20\" VerticalAlignment=\"Bottom\"/>\r\n                        </Border>\r\n                        <Border x:Name=\"MuteButtonBorder\" Background=\"Transparent\" Tap=\"MuteButton_OnTap\" Visibility=\"Collapsed\">\r\n                            <Image x:Name=\"MuteButton\" Width=\"32\" Height=\"32\" Margin=\"20\" VerticalAlignment=\"Bottom\"/>\r\n                        </Border>\r\n                        <Border x:Name=\"AttachButtonBorder\" Background=\"Transparent\" Tap=\"AttachButton_OnTap\">\r\n                            <Image x:Name=\"AttachButton\" Source=\"/Images/W10M/ic_attach_2x.png\" Width=\"32\" Height=\"32\" Margin=\"20\" VerticalAlignment=\"Bottom\"/>\r\n                        </Border>\r\n                    </StackPanel>\r\n                    <Border x:Name=\"RecordButton\" Grid.Row=\"0\" Grid.Column=\"5\" Background=\"Transparent\" \r\n                        MouseLeftButtonDown=\"RecordButton_OnMouseLeftButtonDown\"\r\n                        MouseLeftButtonUp=\"RecordButton_OnMouseLeftButtonUp\">\r\n                        <Grid VerticalAlignment=\"Bottom\">\r\n                            <Ellipse x:Name=\"VolumeEllipse\" Visibility=\"Collapsed\" Width=\"32\" Height=\"32\" Fill=\"{StaticResource TelegramBadgeAccentBrush}\" RenderTransformOrigin=\"0.5,0.5\" Opacity=\"0.2\" IsHitTestVisible=\"False\">\r\n                                <Ellipse.CacheMode>\r\n                                    <BitmapCache RenderAtScale=\"5.0\"/>\r\n                                </Ellipse.CacheMode>\r\n                                <Ellipse.RenderTransform>\r\n                                    <ScaleTransform ScaleX=\"5\" ScaleY=\"5\"/>\r\n                                </Ellipse.RenderTransform>\r\n                            </Ellipse>\r\n                            <Ellipse x:Name=\"CoverEllipse\" Visibility=\"Collapsed\" Width=\"32\" Height=\"32\" Fill=\"{StaticResource TelegramBadgeAccentBrush}\" RenderTransformOrigin=\"0.5,0.5\" IsHitTestVisible=\"False\">\r\n                                <Ellipse.CacheMode>\r\n                                    <BitmapCache RenderAtScale=\"5.0\"/>\r\n                                </Ellipse.CacheMode>\r\n                                <Ellipse.RenderTransform>\r\n                                    <ScaleTransform ScaleX=\"5\" ScaleY=\"5\"/>\r\n                                </Ellipse.RenderTransform>\r\n                            </Ellipse>\r\n                            <!--<Grid Width=\"32\" Height=\"32\" Margin=\"20\">\r\n                                <Path Stroke=\"White\" StrokeThickness=\"2\">\r\n                                    <Path.Data>\r\n                                        <RectangleGeometry Rect=\"5,5,12,19\" RadiusX=\"6\" RadiusY=\"6\"/>\r\n                                    </Path.Data>\r\n                                </Path>\r\n                                <Path Stroke=\"White\" StrokeThickness=\"2\">\r\n                                    <Path.Data>\r\n                                        <GeometryGroup>\r\n                                            <RectangleGeometry Rect=\"1,1,20,27\" RadiusX=\"10\" RadiusY=\"10\"/>\r\n                                            <LineGeometry StartPoint=\"11,28\" EndPoint=\"11,32\"/>\r\n                                        </GeometryGroup>\r\n                                    </Path.Data>\r\n                                    <Path.Clip>\r\n                                        <RectangleGeometry Rect=\"0,16,22,16\"/>\r\n                                    </Path.Clip>\r\n                                </Path>\r\n                            </Grid>-->\r\n                            <Border x:Name=\"RecordButtonIcon\" Width=\"32\" Height=\"32\" Margin=\"20\" Background=\"#FF8D969F\">\r\n                                <Border.OpacityMask>\r\n                                    <ImageBrush ImageSource=\"/Images/W10M/ic_microphone_2x.png\"/>\r\n                                </Border.OpacityMask>\r\n                            </Border>\r\n                            <!--<Image Source=\"/Images/W10M/ic_microphone_2x.png\" Width=\"32\" Height=\"32\" Margin=\"20\"/>-->\r\n                        </Grid>\r\n                    </Border>\r\n                    <Border x:Name=\"SendButton\" Grid.Row=\"0\" Grid.Column=\"5\" Background=\"Transparent\"\r\n                        Tap=\"SendButton_OnTap\" Visibility=\"Collapsed\">\r\n                        <Image x:Name=\"SendButtonImage\" Source=\"/Images/W10M/ic_send_2x.png\" Width=\"32\" Height=\"32\" Margin=\"20\" VerticalAlignment=\"Bottom\"/>\r\n                    </Border>\r\n\r\n                    <Grid x:Name=\"HintGrid\" Height=\"56\" Grid.Column=\"0\" Grid.ColumnSpan=\"4\">\r\n                        <TextBlock x:Name=\"Hint\" Visibility=\"Collapsed\" Margin=\"12,0,12,3\" TextAlignment=\"Center\" VerticalAlignment=\"Center\" Text=\"{Binding Resources.TapAndHoldToRecord, Source={StaticResource Strings}}\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n                \r\n                <Border Grid.Row=\"0\" Grid.RowSpan=\"2\" x:Name=\"AppBarCommandPlaceholder\" Height=\"56\" Visibility=\"Collapsed\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n                    <Border.RenderTransform>\r\n                        <TranslateTransform x:Name=\"AppBarCommandTransform\"/>\r\n                    </Border.RenderTransform>\r\n                    <!--<Button Content=\"MUTE\" VerticalAlignment=\"Center\" Margin=\"12,-12\" Style=\"{StaticResource ButtonStyle1}\"/>-->\r\n                </Border>\r\n                <ContentControl Grid.Row=\"2\" x:Name=\"KeyboardPlaceholder\" HorizontalContentAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\" Opacity=\"0\" Visibility=\"Collapsed\"/>\r\n            </Grid>\r\n        </Border>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/InputBox.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Reactive.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Shapes;\r\nusing Windows.Storage;\r\nusing Windows.System;\r\nusing Windows.UI.ViewManagement;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Devices;\r\nusing Microsoft.Phone.Controls.Maps.Overlays;\r\nusing Microsoft.Phone.Shell;\r\nusing Microsoft.Xna.Framework.Audio;\r\nusing Microsoft.Xna.Framework.GamerServices;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient_Native;\r\nusing TelegramClient_Opus;\r\nusing Action = System.Action;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class InputBox\r\n    {\r\n        public Visibility ForwardButtonVisibility { get; set; }\r\n\r\n        #region ReplyMarkup\r\n\r\n        public static readonly DependencyProperty ReplyMarkupProperty = DependencyProperty.Register(\r\n            \"ReplyMarkup\", typeof (TLReplyKeyboardBase), typeof (InputBox), new PropertyMetadata(default(TLReplyKeyboardBase), OnReplyMarkupChanged));\r\n\r\n        private static void OnReplyMarkupChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var inputBox = d as InputBox;\r\n            if (inputBox != null)\r\n            {\r\n                //var replyKeyboardBase = e.NewValue as TLReplyKeyboardBase;\r\n                //if (replyKeyboardBase != null)\r\n                //{\r\n                //    inputBox.Debug.Text = replyKeyboardBase + \" \" + DateTime.Now;\r\n                //}\r\n                //else\r\n                //{\r\n                //    inputBox.Debug.Text = \"null\";\r\n                //}\r\n            }\r\n        }\r\n\r\n        public TLReplyKeyboardBase ReplyMarkup\r\n        {\r\n            get { return (TLReplyKeyboardBase) GetValue(ReplyMarkupProperty); }\r\n            set { SetValue(ReplyMarkupProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Reply/Forward/Edit\r\n\r\n        private bool _isEditing;\r\n\r\n        private bool _isForwarding;\r\n\r\n        public event EventHandler OpenReplyButtonClick;\r\n\r\n        protected virtual void RaiseOpenReply()\r\n        {\r\n            EventHandler handler = OpenReplyButtonClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void OpenReply_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            SaveInputFocus();\r\n            RaiseOpenReply();\r\n        }\r\n\r\n        public event EventHandler DeleteReplyButtonClick;\r\n\r\n        protected virtual void RaiseDeleteReply()\r\n        {\r\n            EventHandler handler = DeleteReplyButtonClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void DeleteReply_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            SaveInputFocus();\r\n            RaiseDeleteReply();\r\n        }\r\n\r\n        public static readonly DependencyProperty ReplyTemplateProperty = DependencyProperty.Register(\r\n            \"ReplyTemplate\", typeof (DataTemplate), typeof (InputBox), new PropertyMetadata(default(DataTemplate), OnReplyTemplateChanged));\r\n\r\n        private static void OnReplyTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var inputBox = d as InputBox;\r\n            if (inputBox != null)\r\n            {\r\n                inputBox.ReplyContentControl.ContentTemplate = e.NewValue as DataTemplate;\r\n            }\r\n        }\r\n\r\n        public DataTemplate ReplyTemplate\r\n        {\r\n            get { return (DataTemplate) GetValue(ReplyTemplateProperty); }\r\n            set { SetValue(ReplyTemplateProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ReplyProperty = DependencyProperty.Register(\r\n            \"Reply\", typeof (object), typeof (InputBox), new PropertyMetadata(default(object), OnReplyChanged));\r\n\r\n        private static void OnReplyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var inputBox = d as InputBox;\r\n            if (inputBox != null)\r\n            {\r\n                inputBox.ReplyGrid.Visibility = e.NewValue != null && !inputBox.IsAppBarCommandVisible\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n                inputBox.ReplyContentControl.Content = e.NewValue;\r\n\r\n                inputBox._isEditing = false;\r\n                inputBox._isForwarding = false;\r\n                var messagesContainer = e.NewValue as TLMessagesContainter;\r\n                if (messagesContainer != null)\r\n                {\r\n                    // forward\r\n                    if (messagesContainer.FwdMessages != null)\r\n                    {\r\n                        inputBox._isForwarding = true;\r\n                        inputBox.SendButtonImage.Source = inputBox.SendSource;\r\n                        inputBox.SendButton.Visibility = System.Windows.Visibility.Visible;\r\n                        inputBox.RecordButton.Visibility = System.Windows.Visibility.Collapsed;\r\n                    }\r\n                    // edit\r\n                    else if (messagesContainer.EditMessage != null)\r\n                    {\r\n                        inputBox._isEditing = true;\r\n                        inputBox.AdditionalButtons.Visibility = Visibility.Collapsed;\r\n                        inputBox.SendButtonImage.Source = inputBox.DoneSource;\r\n                        inputBox.SendButton.Visibility = System.Windows.Visibility.Visible;\r\n                        inputBox.RecordButton.Visibility = System.Windows.Visibility.Collapsed;\r\n                    }\r\n                }\r\n                    // reply\r\n                else if (e.NewValue is TLMessageBase)\r\n                {\r\n                    //inputBox.AdditionalButtons.Visibility = Visibility.Collapsed;\r\n                    //inputBox.SendButton.Source = inputBox.SendSource;\r\n                }\r\n                else\r\n                {\r\n                    inputBox.AdditionalButtons.Visibility = Visibility.Visible;\r\n                    var textExists = !string.IsNullOrEmpty(inputBox.Input.Text);\r\n                    inputBox.SetSendButtonSource(textExists);\r\n                }\r\n            }\r\n        }\r\n\r\n        public object Reply\r\n        {\r\n            get { return GetValue(ReplyProperty); }\r\n            set { SetValue(ReplyProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n\r\n        #region ApplicationBar\r\n\r\n        public event EventHandler AppBarCommandClick;\r\n\r\n        protected virtual void RaiseAppBarCommandClick()\r\n        {\r\n            EventHandler handler = AppBarCommandClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private Button _appBarButton;\r\n\r\n        public static readonly DependencyProperty CommandProperty = DependencyProperty.Register(\r\n            \"Command\", typeof (string), typeof (InputBox), new PropertyMetadata(default(string), OnCommandChanged));\r\n\r\n        private static void OnCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var inputBox = d as InputBox;\r\n            if (inputBox != null)\r\n            {\r\n                if (inputBox._appBarButton == null)\r\n                {\r\n                    inputBox._appBarButton = new Button { Style = (Style) inputBox.Resources[\"ButtonStyle1\"] };\r\n                    inputBox._appBarButton.Click += (sender, args) => inputBox.RaiseAppBarCommandClick();\r\n                    inputBox.AppBarCommandPlaceholder.Child = inputBox._appBarButton;\r\n\r\n                    var scaledText = (ScaledText)Application.Current.Resources[\"ScaledText\"];\r\n                    var fontSize = scaledText.DefaultFontSize;\r\n\r\n                    inputBox._appBarButton.FontSize = fontSize;\r\n                }\r\n\r\n\r\n                inputBox._appBarButton.Content = e.NewValue;\r\n            }\r\n        }\r\n\r\n        public string Command\r\n        {\r\n            get { return (string) GetValue(CommandProperty); }\r\n            set { SetValue(CommandProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty IsAppBarCommandVisibleProperty = DependencyProperty.Register(\r\n            \"IsAppBarCommandVisible\", typeof (bool), typeof (InputBox), new PropertyMetadata(default(bool), OnIsAppBarCommandVisibleChanged));\r\n\r\n        private static void OnIsAppBarCommandVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var inputBox = d as InputBox;\r\n            if (inputBox != null)\r\n            {\r\n                var isAppBarCommandVisible = (bool) e.NewValue;\r\n\r\n                //if (isAppBarCommandVisible)\r\n                //{\r\n                //    //var storyboard = inputBox.GetOpenStoryboard(inputBox.AppBarCommandTransform);\r\n                //    //var storyboard2 = inputBox.GetCloseStoryboard(inputBox.InputBoxTranslate);\r\n                //    //storyboard.Begin();\r\n                //    //storyboard2.Begin();\r\n                //}\r\n                //else\r\n                //{\r\n                //    //var storyboard = inputBox.GetCloseStoryboard(inputBox.AppBarCommandTransform);\r\n                //    //var storyboard2 = inputBox.GetOpenStoryboard(inputBox.InputBoxTranslate);\r\n                //    //storyboard.Begin();\r\n                //    //storyboard2.Begin();\r\n                //}\r\n\r\n                inputBox.ReplyGrid.Visibility = !isAppBarCommandVisible && inputBox.Reply != null ? Visibility.Visible : Visibility.Collapsed;\r\n                inputBox.InputGrid.Visibility = isAppBarCommandVisible ? Visibility.Collapsed : Visibility.Visible;\r\n                inputBox.AppBarCommandPlaceholder.Visibility = isAppBarCommandVisible ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public bool IsAppBarCommandVisible\r\n        {\r\n            get { return (bool) GetValue(IsAppBarCommandVisibleProperty); }\r\n            set { SetValue(IsAppBarCommandVisibleProperty, value); }\r\n        }\r\n        #endregion\r\n\r\n        private BitmapSource _doneSource;\r\n\r\n        private BitmapSource DoneSource\r\n        {\r\n            get\r\n            {\r\n                _doneSource = _doneSource ?? new BitmapImage(new Uri(\"/Images/W10M/ic_done_2x.png\", UriKind.Relative));\r\n\r\n                return _doneSource;\r\n            }\r\n        }\r\n\r\n        private BitmapSource _emojiSource;\r\n\r\n        private BitmapSource EmojiSource\r\n        {\r\n            get\r\n            {\r\n                _emojiSource = _emojiSource ?? new BitmapImage(new Uri(\"/Images/W10M/ic_emoji_2x.png\", UriKind.Relative));\r\n\r\n                return _emojiSource;\r\n            }\r\n        }\r\n\r\n        private BitmapSource _keyboardSource;\r\n\r\n        private BitmapSource KeyboardSource\r\n        {\r\n            get\r\n            {\r\n                _keyboardSource = _keyboardSource ?? new BitmapImage(new Uri(\"/Images/W10M/ic_keyboard_2x.png\", UriKind.Relative));\r\n\r\n                return _keyboardSource;\r\n            }\r\n        }\r\n\r\n        private BitmapSource _sendSource;\r\n\r\n        private BitmapSource SendSource\r\n        {\r\n            get\r\n            {\r\n                _sendSource = _sendSource ?? new BitmapImage(new Uri(\"/Images/W10M/ic_send_2x.png\", UriKind.Relative));\r\n\r\n                return _sendSource;\r\n            }\r\n        }\r\n\r\n        private BitmapSource _microphoneSource;\r\n\r\n        private BitmapSource MicrophoneSource\r\n        {\r\n            get\r\n            {\r\n                _microphoneSource = _microphoneSource ?? new BitmapImage(new Uri(\"/Images/W10M/ic_microphone_2x.png\", UriKind.Relative));\r\n\r\n                return _microphoneSource;\r\n            }\r\n        }\r\n\r\n        public event RoutedEventHandler InputLostFocus;\r\n\r\n        protected virtual void RaiseInputLostFocus(RoutedEventArgs e)\r\n        {\r\n            RoutedEventHandler handler = InputLostFocus;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public event RoutedEventHandler InputGotFocus;\r\n\r\n        protected virtual void RaiseInputGotFocus(RoutedEventArgs args)\r\n        {\r\n            RoutedEventHandler handler = InputGotFocus;\r\n            if (handler != null) handler(this, args);\r\n        }\r\n\r\n        public event KeyEventHandler InputKeyDown;\r\n\r\n        protected virtual void RaiseInputKeyDown(KeyEventArgs e)\r\n        {\r\n            KeyEventHandler handler = InputKeyDown;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public event TextChangedEventHandler InputTextChanged;\r\n\r\n        protected virtual void RaiseInputTextChanged(TextChangedEventArgs e)\r\n        {\r\n            TextChangedEventHandler handler = InputTextChanged;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public ContentControl EmojiPlaceholder { get { return KeyboardPlaceholder; } }\r\n\r\n        public TextBox InnerTextBox { get { return Input; } }\r\n\r\n        public int SelectionStart\r\n        {\r\n            get { return Input.SelectionStart; }\r\n            set { Input.SelectionStart = value; }\r\n        }\r\n\r\n        public int SelectionLength\r\n        {\r\n            get { return Input.SelectionLength; }\r\n            set { Input.SelectionLength = value; }\r\n        }\r\n\r\n        public Visibility MuteButtonVisibility\r\n        {\r\n            get { return MuteButtonBorder.Visibility; }\r\n            set { MuteButtonBorder.Visibility = value; }\r\n        }\r\n\r\n        public Visibility KeyboardButtonVisibility\r\n        {\r\n            get { return KeyboardButtonBorder.Visibility; }\r\n            set { KeyboardButtonBorder.Visibility = value; }\r\n        }\r\n\r\n        public static readonly DependencyProperty KeyboardButtonImageStringProperty = DependencyProperty.Register(\r\n            \"KeyboardButtonImageString\", typeof (string), typeof (InputBox), new PropertyMetadata(default(string), OnKeyboardButtonImageStringChanged));\r\n\r\n        private static void OnKeyboardButtonImageStringChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var inputBox = d as InputBox;\r\n            if (inputBox != null)\r\n            {\r\n                var str = e.NewValue as string;\r\n                inputBox.KeyboardButton.Source = str != null ? new BitmapImage(new Uri(str, UriKind.Relative)) : null;\r\n            }\r\n        }\r\n\r\n        public string KeyboardButtonImageString\r\n        {\r\n            get { return (string) GetValue(KeyboardButtonImageStringProperty); }\r\n            set { SetValue(KeyboardButtonImageStringProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty MuteButtonImageSourceProperty = DependencyProperty.Register(\r\n            \"MuteButtonImageSource\", typeof (ImageSource), typeof (InputBox), new PropertyMetadata(default(ImageSource), OnMuteButtonImageSourceChanged));\r\n\r\n        private static void OnMuteButtonImageSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var inputBox = d as InputBox;\r\n            if (inputBox != null)\r\n            {\r\n                inputBox.MuteButton.Source = (ImageSource) e.NewValue;\r\n            }\r\n        }\r\n\r\n        public ImageSource MuteButtonImageSource\r\n        {\r\n            get { return (ImageSource) GetValue(MuteButtonImageSourceProperty); }\r\n            set { SetValue(MuteButtonImageSourceProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextScaleFactorProperty = DependencyProperty.Register(\r\n            \"TextScaleFactor\", typeof(double), typeof(InputBox), new PropertyMetadata(default(double), OnTextScaleFactorChanged));\r\n\r\n        private static void OnTextScaleFactorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var inputBox = d as InputBox;\r\n            if (inputBox != null)\r\n            {\r\n                inputBox.Input.TextScaleFactor = (double)e.NewValue;\r\n            }\r\n        }\r\n\r\n        public double TextScaleFactor\r\n        {\r\n            get { return (double)GetValue(TextScaleFactorProperty); }\r\n            set { SetValue(TextScaleFactorProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty InlineWatermarkProperty = DependencyProperty.Register(\r\n            \"InlineWatermark\", typeof(string), typeof(InputBox), new PropertyMetadata(default(string), OnInlineWatermarkChanged));\r\n\r\n        private static void OnInlineWatermarkChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var inputBox = d as InputBox;\r\n            if (inputBox != null)\r\n            {\r\n                inputBox.Input.InlineWatermark = e.NewValue as string;\r\n            }\r\n        }\r\n\r\n        public string InlineWatermark\r\n        {\r\n            get { return (string)GetValue(InlineWatermarkProperty); }\r\n            set { SetValue(InlineWatermarkProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(\r\n            \"Text\", typeof(string), typeof(InputBox), new PropertyMetadata(\"\", OnTextPropertyChanged));\r\n\r\n        private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var inputBox = d as InputBox;\r\n            if (inputBox != null && e.NewValue != null)\r\n            {\r\n                inputBox.Input.Text = e.NewValue as string;\r\n            }\r\n        }\r\n\r\n        public string Text\r\n        {\r\n            get\r\n            {\r\n                return (string)GetValue(TextProperty) ?? \"\";\r\n            }\r\n            set\r\n            {\r\n                var text = value ?? \"\";\r\n                SetValue(TextProperty, text);\r\n            }\r\n        }\r\n\r\n        public event EventHandler SendButtonClick;\r\n\r\n        protected virtual void RaiseSendButtonClick()\r\n        {\r\n            var handler = SendButtonClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler AttachButtonClick;\r\n\r\n        protected virtual void RaiseAttachButtonClick()\r\n        {\r\n            var handler = AttachButtonClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler MuteButtonClick;\r\n\r\n        protected virtual void RaiseMuteButtonClick()\r\n        {\r\n            var handler = MuteButtonClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler KeyboardButtonClick;\r\n\r\n        protected virtual void RaiseKeyboardButtonClick()\r\n        {\r\n            var handler = KeyboardButtonClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler EmojiButtonClick;\r\n\r\n        protected virtual void RaiseEmojiButtonClick()\r\n        {\r\n            var handler = EmojiButtonClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private Control _gotFocusControl;\r\n\r\n        private bool _isFocused;\r\n\r\n        private double _applicationBarDefaultSize = 72.0;\r\n\r\n        private double _iconMargin = 20.0;\r\n\r\n        private double _iconSize = 32.0;\r\n\r\n        private double _iconLabelFontSize = 18.0;\r\n\r\n        public InputBox()\r\n        {\r\n            InitializeComponent();\r\n\r\n            if (DesignerProperties.IsInDesignTool) return;\r\n\r\n            var applicationBar = new ApplicationBar();\r\n            _applicationBarDefaultSize = applicationBar.DefaultSize;\r\n\r\n            KeyboardHeight = EmojiControl.PortraitOrientationHeight;\r\n\r\n            KeyboardPlaceholder.Visibility = Visibility.Collapsed;\r\n            KeyboardPlaceholder.Height = KeyboardHeight;\r\n            //var control = KeyboardPlaceholder.Content as FrameworkElement;\r\n            //if (control != null)\r\n            //{\r\n            //    control.Height = KeyboardHeight;\r\n            //}\r\n\r\n            if (_applicationBarDefaultSize < 72.0)\r\n            {\r\n                var scaleFactor = _applicationBarDefaultSize / 72.0;\r\n                _iconMargin = 20.0 * scaleFactor;\r\n                _iconSize = _applicationBarDefaultSize - 2.0 * _iconMargin;\r\n                _iconLabelFontSize = 18.0 * scaleFactor;\r\n                RecordButtonIcon.Margin = new Thickness(20.0, _iconMargin, 20.0, _iconMargin);\r\n                RecordButtonIcon.Width = _iconSize;\r\n                RecordButtonIcon.Height = _iconSize;\r\n                SendButtonImage.Margin = new Thickness(20.0, _iconMargin, 20.0, _iconMargin);\r\n                SendButtonImage.Width = _iconSize;\r\n                SendButtonImage.Height = _iconSize;\r\n                KeyboardButton.Margin = new Thickness(20.0, _iconMargin, 20.0, _iconMargin);\r\n                KeyboardButton.Width = _iconSize;\r\n                KeyboardButton.Height = _iconSize;\r\n                MuteButton.Margin = new Thickness(20.0, _iconMargin, 20.0, _iconMargin);\r\n                MuteButton.Width = _iconSize;\r\n                MuteButton.Height = _iconSize;\r\n                AttachButton.Margin = new Thickness(20.0, _iconMargin, 20.0, _iconMargin);\r\n                AttachButton.Width = _iconSize;\r\n                AttachButton.Height = _iconSize;\r\n                EmojiButtonImage.Margin = new Thickness(20.0, _iconMargin, 20.0, _iconMargin);\r\n                EmojiButtonImage.Width = _iconSize;\r\n                EmojiButtonImage.Height = _iconSize;\r\n            }\r\n            HintGrid.Height = _applicationBarDefaultSize;\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                TopBorder.Fill = (Brush)Resources[\"InputBorderBrushLight\"];\r\n            }\r\n            else\r\n            {\r\n                TopBorder.Fill = (Brush)Resources[\"InputBorderBrushDark\"];\r\n                Input.CaretBrush = new SolidColorBrush(Colors.White);\r\n            }\r\n\r\n            var keyPressEvents = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(\r\n                keh => { Input.TextChanged += keh; },\r\n                keh => { Input.TextChanged -= keh; });\r\n\r\n            _keyPressSubscription = keyPressEvents\r\n                .Throttle(TimeSpan.FromSeconds(0.15))\r\n                .ObserveOnDispatcher()\r\n                .Subscribe(e => UpdateEmojiHints());\r\n\r\n            Loaded += OnLoaded;\r\n            Loaded += OnLoadedOnce;\r\n            Unloaded += OnUnloaded;\r\n\r\n            GotFocus += (sender, args) =>\r\n            {\r\n                _isFocused = true;\r\n                _gotFocusControl = args.OriginalSource as Control;\r\n            };\r\n            LostFocus += (sender, args) =>\r\n            {\r\n                _isFocused = false;\r\n            };\r\n        }\r\n#if DEBUG\r\n        ~InputBox()\r\n        {\r\n            \r\n        }\r\n#endif\r\n\r\n        private void OnLoadedOnce(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= OnLoadedOnce;\r\n\r\n            Text = Input.Text;\r\n            var textExists = !string.IsNullOrEmpty(Input.Text);\r\n\r\n            Scroll.VerticalScrollBarVisibility = textExists ? ScrollBarVisibility.Auto : ScrollBarVisibility.Disabled;\r\n            AttachButtonBorder.Visibility = textExists ? Visibility.Collapsed : Visibility.Visible;\r\n            SetSendButtonSource(textExists);\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_microphone != null) _microphone.BufferReady += Microphone_OnBufferReady;\r\n\r\n            InputPane.GetForCurrentView().Showing += OnInputPaneShowing;\r\n            InputPane.GetForCurrentView().Hiding += OnInputPaneHiding;\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_microphone != null) _microphone.BufferReady -= Microphone_OnBufferReady;\r\n\r\n            InputPane.GetForCurrentView().Showing -= OnInputPaneShowing;\r\n            InputPane.GetForCurrentView().Hiding -= OnInputPaneHiding;\r\n        }\r\n\r\n        private void Input_OnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            if (e.NewSize.Height > e.PreviousSize.Height)\r\n            {\r\n                Scroll.ScrollToVerticalOffset(Scroll.VerticalOffset + e.NewSize.Height - e.PreviousSize.Height);\r\n            }\r\n        }\r\n\r\n        private void Input_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            if (_suppressNotifyTextChanged)\r\n            {\r\n                _suppressNotifyTextChanged = false;\r\n                return;\r\n            }\r\n\r\n            //RaiseHideEmojiHints();\r\n            //UpdateEmojiHints();\r\n\r\n            Text = Input.Text;\r\n            var textExists = !string.IsNullOrEmpty(Input.Text);\r\n\r\n            Scroll.VerticalScrollBarVisibility = textExists ? ScrollBarVisibility.Auto : ScrollBarVisibility.Disabled;\r\n            AttachButtonBorder.Visibility = textExists ? Visibility.Collapsed : Visibility.Visible;\r\n            SetSendButtonSource(textExists);\r\n\r\n            RaiseInputTextChanged(e);\r\n        }\r\n\r\n        private EmojiSuggestionParams _parameters;\r\n\r\n        public event EventHandler<EmojiHintsEventArgs> ShowEmojiHints;\r\n\r\n        protected virtual void RaiseShowEmojiHints(EmojiHintsEventArgs e)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"ShowEmojiHints selectionStart={0} text={1} parameters=[{2}]\", Input.SelectionStart, Input.Text, e.Parameters);\r\n\r\n            _parameters = e.Parameters;\r\n\r\n            var handler = ShowEmojiHints;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public event EventHandler HideEmojiHints;\r\n\r\n        protected virtual void RaiseHideEmojiHints()\r\n        {\r\n            //System.Diagnostics.Debug.WriteLine(\"HideEmojiHints selectionStart={0} text={1} parameters=[{2}]\", Input.SelectionStart, Input.Text, _parameters);\r\n            _parameters = null;\r\n\r\n            var handler = HideEmojiHints;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void UpdateEmojiHints()\r\n        {\r\n            //RaiseHideEmojiHints();\r\n\r\n            var index = SuggestionIndex(Input.Text, Input.SelectionStart, EmojiSuggestion.GetSuggestionMaxLength());\r\n            if (index != -1)\r\n            {\r\n                var p = new EmojiSuggestionParams\r\n                {\r\n                    Text = Input.Text,\r\n                    SelectionStart = Input.SelectionStart,\r\n                    Index = index,\r\n                    Length = Input.SelectionStart - index\r\n                };\r\n\r\n                var query = p.Text.Substring(p.Index + 1, p.Length - 1);\r\n                if (!string.IsNullOrEmpty(query))\r\n                {\r\n                    Execute.BeginOnThreadPool(() =>\r\n                    {\r\n                        var stopwatch = Stopwatch.StartNew();\r\n                        p.Results = EmojiSuggestion.GetSuggestions(query);\r\n                        var elapsed = stopwatch.Elapsed;\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (p.Results != null\r\n                                && string.Equals(Input.Text, p.Text, StringComparison.Ordinal)\r\n                                && p.SelectionStart == Input.SelectionStart)\r\n                            {\r\n                                RaiseShowEmojiHints(new EmojiHintsEventArgs(p));\r\n                            }\r\n                            else\r\n                            {\r\n                                RaiseHideEmojiHints();\r\n                            }\r\n                        });\r\n                    });\r\n                }\r\n                else\r\n                {\r\n                    RaiseHideEmojiHints();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                RaiseHideEmojiHints();\r\n            }\r\n        }\r\n\r\n        private static bool IsSuggestionChar(char ch)\r\n        {\r\n            return (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') || (ch == '_') || (ch == '-') || (ch == '+');\r\n        }\r\n\r\n        private int SuggestionIndex(string str, int start, int maxLength)\r\n        {\r\n            var index = start - 1;\r\n            while (index >= 0 && ((start - maxLength) <= index))\r\n            {\r\n                if (str[index] == ':')\r\n                {\r\n                    if (index != start - 1\r\n                        && (index == 0 || !IsSuggestionChar(str[index - 1])))\r\n                    {\r\n                        return index;\r\n                    }\r\n                }\r\n                else if (!IsSuggestionChar(str[index]))\r\n                {\r\n                    return -1;\r\n                }\r\n                index--;\r\n            }\r\n\r\n            return -1;\r\n        }\r\n\r\n        private void Input_OnSelectionChanged(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_parameters != null\r\n                && string.Equals(_parameters.Text, Input.Text, StringComparison.Ordinal)\r\n                && _parameters.SelectionStart != Input.SelectionStart)\r\n            {\r\n                RaiseHideEmojiHints();\r\n            }\r\n        }\r\n\r\n        private void SetSendButtonSource(bool textExists)\r\n        {\r\n            if (_isEditing)\r\n            {\r\n                SendButtonImage.Source = DoneSource;\r\n            }\r\n            else if (_isForwarding)\r\n            {\r\n                SendButtonImage.Source = SendSource;\r\n            }\r\n            else\r\n            {\r\n                SendButtonImage.Source = SendSource;\r\n                if (textExists)\r\n                {\r\n                    SendButton.Visibility = Visibility.Visible;\r\n                    RecordButton.Visibility = Visibility.Collapsed;\r\n                }\r\n                else\r\n                {\r\n                    SendButton.Visibility = Visibility.Collapsed;\r\n                    RecordButton.Visibility = Visibility.Visible;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SaveInputFocus()\r\n        {\r\n            if (_isFocused\r\n                && _gotFocusControl == Input)\r\n            {\r\n                Input.Focus();\r\n            }\r\n        }\r\n\r\n        private void SendButton_OnTap(object sender, GestureEventArgs gestureEventArgs)\r\n        {\r\n            SaveInputFocus();\r\n\r\n            _suppressNotifyTextChanged = true;\r\n            Input.Text = string.Empty;\r\n            ReplyGrid.Visibility = Visibility.Collapsed;\r\n            Scroll.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;\r\n            AttachButtonBorder.Visibility = Visibility.Visible;\r\n            AdditionalButtons.Visibility = Visibility.Visible;\r\n            _isEditing = false;\r\n            _isForwarding = false;\r\n            SetSendButtonSource(false);\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                RaiseSendButtonClick();\r\n            });\r\n        }\r\n\r\n        private void AttachButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            RaiseAttachButtonClick();\r\n        }\r\n\r\n        private void KeyboardButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            RaiseKeyboardButtonClick();\r\n        }\r\n\r\n        private void MuteButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            SaveInputFocus();\r\n            RaiseMuteButtonClick();\r\n        }\r\n\r\n        private bool _suppressHiding;\r\n        private bool _suppressNotifyTextChanged;\r\n\r\n        private void EmojiButton_OnTap(object sender, MouseButtonEventArgs mouseButtonEventArgs)\r\n        {\r\n            RaiseEmojiButtonClick();\r\n        }\r\n\r\n        private void OnInputPaneHiding(InputPane sender, InputPaneVisibilityEventArgs args)\r\n        {\r\n            if (KeyboardPlaceholder.Opacity == 1.0) return;\r\n\r\n            KeyboardPlaceholder.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        public static double KeyboardHeight { get; protected set; }\r\n\r\n        private void OnInputPaneShowing(InputPane sender, InputPaneVisibilityEventArgs args)\r\n        {\r\n            if (!_isFocused || _gotFocusControl != Input) return;\r\n\r\n            KeyboardHeight = 480.0 / args.OccludedRect.Width * args.OccludedRect.Height;\r\n\r\n            KeyboardPlaceholder.Visibility = Visibility.Visible;\r\n            KeyboardPlaceholder.Height = KeyboardHeight;\r\n            //var control = KeyboardPlaceholder.Content as FrameworkElement;\r\n            //if (control != null)\r\n            //{\r\n            //    control.Height = KeyboardHeight;\r\n            //}\r\n        }\r\n\r\n        private void Input_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter\r\n                && System.Windows.Input.Keyboard.Modifiers == ModifierKeys.Control)\r\n            {\r\n                RaiseSendButtonClick();\r\n            }\r\n\r\n            RaiseInputKeyDown(e);\r\n        }\r\n\r\n        private void Input_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            KeyboardPlaceholder.Visibility = Visibility.Visible;\r\n            KeyboardPlaceholder.Opacity = 0.0;\r\n            EmojiButtonImage.Source = EmojiSource;\r\n\r\n            RaiseInputGotFocus(e);\r\n        }\r\n\r\n        private void Input_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            RaiseInputLostFocus(e);\r\n        }\r\n\r\n        public void OpenPlaceholder()\r\n        {\r\n            KeyboardPlaceholder.Visibility = Visibility.Visible;\r\n            KeyboardPlaceholder.Opacity = 1.0;\r\n            EmojiButtonImage.Source = KeyboardSource;\r\n        }\r\n\r\n        public void ClosePlaceholder()\r\n        {\r\n            KeyboardPlaceholder.Visibility = Visibility.Collapsed;\r\n            EmojiButtonImage.Source = EmojiSource;\r\n\r\n            if (IsFullScreen)\r\n            {\r\n                CloseFullScreen();\r\n            }\r\n        }\r\n\r\n        public void FocusInput()\r\n        {\r\n            Input.Focus();\r\n        }\r\n\r\n        public void SwitchToSelectionMode()\r\n        {\r\n            if (InputBoxTranslate.Y == 72.0) return;\r\n\r\n            if (_applicationBarBorder == null)\r\n            {\r\n                _applicationBarBorder = CreateApplicationBar();\r\n\r\n                CommonGrid.Children.Insert(0, _applicationBarBorder);\r\n            }\r\n\r\n            _deleteButton.IsHitTestVisible = false;\r\n            _deleteButton.Opacity = 0.5;\r\n\r\n            _forwardButton.IsHitTestVisible = false;\r\n            _forwardButton.Opacity = 0.5;\r\n            _forwardButton.Visibility = ForwardButtonVisibility;\r\n\r\n            _appBarOpened = false;\r\n            _cancelLabel.Visibility = Visibility.Collapsed;\r\n            _deleteLabel.Visibility = Visibility.Collapsed;\r\n            _forwardLabel.Visibility = Visibility.Collapsed;\r\n\r\n            var storyboard = GetCloseStoryboard(InputBoxTranslate, BackgroundBorder, _applicationBarBorder);\r\n            storyboard.Begin();\r\n            //LayoutRoot.Visibility = Visibility.Collapsed;\r\n            //BackgroundBorder.Background = new SolidColorBrush(Colors.Transparent);\r\n        }\r\n\r\n        public event EventHandler CancelSelectionButtonClick;\r\n\r\n        protected virtual void RaiseCancelSelectionButtonClick()\r\n        {\r\n            EventHandler handler = CancelSelectionButtonClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler ForwardButtonClick;\r\n\r\n        protected virtual void RaiseForwardButtonClick()\r\n        {\r\n            EventHandler handler = ForwardButtonClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler DeleteButtonClick;\r\n\r\n        protected virtual void RaiseDeleteButtonClick()\r\n        {\r\n            EventHandler handler = DeleteButtonClick;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private Border CreateApplicationBar()\r\n        {\r\n            var border = new Border();\r\n            border.Height = 18.0 + _applicationBarDefaultSize;\r\n            border.Margin = new Thickness(0.0, 0.0, 0.0, -18.0);\r\n            border.VerticalAlignment = VerticalAlignment.Bottom;\r\n            border.RenderTransform = new TranslateTransform{ Y = 0.0 };\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            border.Background = isLightTheme ? (SolidColorBrush)Resources[\"AppBarPanelLight\"] : (SolidColorBrush)Resources[\"AppBarPanelDark\"];\r\n\r\n            var grid = new Grid();\r\n            grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(72.0) });\r\n            grid.ColumnDefinitions.Add(new ColumnDefinition());\r\n            grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(72.0) });\r\n            grid.ColumnDefinitions.Add(new ColumnDefinition());\r\n            grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(72.0) });\r\n\r\n            border.Child = grid;\r\n\r\n            var moreButton = CreateButton(\"/Images/W10M/ic_more_2x.png\", null, null).Item1;\r\n            moreButton.Tap += (sender, args) =>\r\n            {\r\n                if (_appBarOpened)\r\n                {\r\n                    CloseMorePanel();\r\n                }\r\n                else\r\n                {\r\n                    OpenMorePanel();\r\n                }\r\n\r\n                _appBarOpened = !_appBarOpened;\r\n            };\r\n            Grid.SetColumn(moreButton, 4);\r\n            grid.Children.Add(moreButton);\r\n\r\n            var cancelButtonTuple = CreateButton(\"/Images/W10M/ic_cancel_2x.png\", AppResources.Cancel, RaiseCancelSelectionButtonClick);\r\n            _cancelLabel = cancelButtonTuple.Item2;\r\n            Grid.SetColumn(cancelButtonTuple.Item1, 3);\r\n            grid.Children.Add(cancelButtonTuple.Item1);\r\n\r\n            var deleteButtonTuple = CreateButton(\"/Images/W10M/ic_delete_2x.png\", AppResources.Delete, RaiseDeleteButtonClick);\r\n            _deleteButton = deleteButtonTuple.Item1;\r\n            _deleteLabel = deleteButtonTuple.Item2;\r\n            Grid.SetColumn(_deleteButton, 2);\r\n            grid.Children.Add(_deleteButton);\r\n\r\n            var forwardButtonTuple = CreateButton(\"/Images/W10M/ic_share_2x.png\", AppResources.Forward, RaiseForwardButtonClick);\r\n            _forwardButton = forwardButtonTuple.Item1;\r\n            _forwardLabel = forwardButtonTuple.Item2;\r\n            Grid.SetColumn(_forwardButton, 1);\r\n            grid.Children.Add(_forwardButton);\r\n\r\n            return border;\r\n        }\r\n\r\n        private Tuple<FrameworkElement, TextBlock> CreateButton(string iconPath, string title, Action callback)\r\n        {\r\n            var grid = new Grid();\r\n            grid.Background = new SolidColorBrush(Colors.Transparent);\r\n\r\n            var border = new Border();\r\n            border.VerticalAlignment = VerticalAlignment.Top;\r\n            border.Background = (Brush) Application.Current.Resources[\"PhoneForegroundBrush\"];\r\n            border.Margin = new Thickness(20.0, _iconMargin, 20.0, _iconMargin);\r\n            border.Width = _iconSize;\r\n            border.Height = _iconSize;\r\n            var brush = new ImageBrush { ImageSource = new BitmapImage(new Uri(iconPath, UriKind.Relative)) };\r\n            border.OpacityMask = brush;\r\n            grid.Children.Add(border);\r\n\r\n            TextBlock label = null;\r\n            if (!string.IsNullOrEmpty(title))\r\n            {\r\n                label = new TextBlock();\r\n                label.Text = title;\r\n                label.VerticalAlignment = VerticalAlignment.Bottom;\r\n                label.Visibility = Visibility.Collapsed;\r\n                label.Margin = new Thickness(-12.0, 0.0, -12.0, 9.0);\r\n                label.MaxWidth = 96.0;\r\n                label.TextWrapping = TextWrapping.NoWrap;\r\n                label.TextTrimming = TextTrimming.WordEllipsis;\r\n                label.TextAlignment = TextAlignment.Center;\r\n                label.FontSize = _iconLabelFontSize;\r\n                label.IsHitTestVisible = false;\r\n\r\n                grid.Children.Add(label);\r\n            }\r\n\r\n            border.Tap += (sender, args) => callback.SafeInvoke();\r\n\r\n            return new Tuple<FrameworkElement, TextBlock>(grid, label);\r\n        }\r\n\r\n        public void SwitchToNormalMode()\r\n        {\r\n            if (InputBoxTranslate.Y == 0.0) return;\r\n\r\n            var storyboard = GetOpenStoryboard(InputBoxTranslate, BackgroundBorder, _applicationBarBorder);\r\n            storyboard.Begin();\r\n            //LayoutRoot.Visibility = Visibility.Visible;\r\n            //BackgroundBorder.Background = (Brush) Application.Current.Resources[\"PhoneBackgroundBrush\"];\r\n        }\r\n\r\n        private static Storyboard GetOpenStoryboard(TranslateTransform transform, UIElement element, UIElement element2)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var transformAnimaion = new DoubleAnimation { To = 0.0, Duration = TimeSpan.FromSeconds(0.2), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } };\r\n            Storyboard.SetTarget(transformAnimaion, transform);\r\n            Storyboard.SetTargetProperty(transformAnimaion, new PropertyPath(\"Y\"));\r\n            storyboard.Children.Add(transformAnimaion);\r\n\r\n            var opacityAnimaion = new DoubleAnimation { To = 1.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion, element);\r\n            Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion);\r\n\r\n            var visibilityAnimation2 = new ObjectAnimationUsingKeyFrames();\r\n            visibilityAnimation2.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = Visibility.Collapsed });\r\n            Storyboard.SetTarget(visibilityAnimation2, element2);\r\n            Storyboard.SetTargetProperty(visibilityAnimation2, new PropertyPath(\"Visibility\"));\r\n            storyboard.Children.Add(visibilityAnimation2);\r\n\r\n            var transformAnimaion2 = new DoubleAnimationUsingKeyFrames();\r\n            transformAnimaion2.KeyFrames.Add(new DiscreteDoubleKeyFrame{KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0});\r\n            Storyboard.SetTarget(transformAnimaion2, element2.RenderTransform);\r\n            Storyboard.SetTargetProperty(transformAnimaion2, new PropertyPath(\"Y\"));\r\n            storyboard.Children.Add(transformAnimaion2);\r\n\r\n            var visibilityAnimation = new ObjectAnimationUsingKeyFrames();\r\n            visibilityAnimation.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = Visibility.Visible });\r\n            Storyboard.SetTarget(visibilityAnimation, element);\r\n            Storyboard.SetTargetProperty(visibilityAnimation, new PropertyPath(\"Visibility\"));\r\n            storyboard.Children.Add(visibilityAnimation);\r\n\r\n            return storyboard;\r\n        }\r\n\r\n        private static Storyboard GetCloseStoryboard(TranslateTransform transform, UIElement element, UIElement element2)\r\n        {\r\n            var storyboard = new Storyboard();\r\n            \r\n            var transformAnimaion = new DoubleAnimation { To = 72.0, Duration = TimeSpan.FromSeconds(0.2), EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } };\r\n            Storyboard.SetTarget(transformAnimaion, transform);\r\n            Storyboard.SetTargetProperty(transformAnimaion, new PropertyPath(\"Y\"));\r\n            storyboard.Children.Add(transformAnimaion);\r\n\r\n            var opacityAnimaion = new DoubleAnimation { To = 0.0, Duration = TimeSpan.FromSeconds(0.2) };\r\n            Storyboard.SetTarget(opacityAnimaion, element);\r\n            Storyboard.SetTargetProperty(opacityAnimaion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimaion);\r\n\r\n            var visibilityAnimation2 = new ObjectAnimationUsingKeyFrames();\r\n            visibilityAnimation2.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = Visibility.Visible });\r\n            Storyboard.SetTarget(visibilityAnimation2, element2);\r\n            Storyboard.SetTargetProperty(visibilityAnimation2, new PropertyPath(\"Visibility\"));\r\n            storyboard.Children.Add(visibilityAnimation2);\r\n\r\n            var visibilityAnimation = new ObjectAnimationUsingKeyFrames();\r\n            visibilityAnimation.KeyFrames.Add(new DiscreteObjectKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = Visibility.Collapsed });\r\n            Storyboard.SetTarget(visibilityAnimation, element);\r\n            Storyboard.SetTargetProperty(visibilityAnimation, new PropertyPath(\"Visibility\"));\r\n            storyboard.Children.Add(visibilityAnimation);\r\n\r\n            return storyboard;\r\n        }\r\n\r\n        #region ApplicationBar\r\n\r\n        private Border _applicationBarBorder;\r\n\r\n        private FrameworkElement _deleteButton;\r\n\r\n        private FrameworkElement _forwardButton;\r\n\r\n        private TextBlock _deleteLabel;\r\n\r\n        private TextBlock _forwardLabel;\r\n\r\n        private TextBlock _cancelLabel;\r\n\r\n        public Tuple<bool, bool> IsGroupActionEnabled\r\n        {\r\n            set\r\n            {\r\n                if (_deleteButton != null)\r\n                {\r\n                    _deleteButton.Opacity = value.Item1 ? 1.0 : 0.5;\r\n                    _deleteButton.IsHitTestVisible = value.Item1;\r\n                }\r\n\r\n                if (_forwardButton != null)\r\n                {\r\n                    _forwardButton.Opacity = value.Item2 ? 1.0 : 0.5;\r\n                    _forwardButton.IsHitTestVisible = value.Item2;\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool IsDeleteActionVisible\r\n        {\r\n            set\r\n            {\r\n                if (_deleteButton != null)\r\n                {\r\n                    _deleteButton.Visibility = value ? Visibility.Visible : Visibility.Collapsed;\r\n                }\r\n\r\n                if (_forwardButton != null)\r\n                {\r\n                    Grid.SetColumn(_forwardButton, value ? 1 : 2);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _appBarOpened;\r\n\r\n        private void OpenMorePanel()\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateAppBarPanelAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateAppBarPanelAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = -16.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n            Storyboard.SetTarget(translateAppBarPanelAnimation, _applicationBarBorder);\r\n            Storyboard.SetTargetProperty(translateAppBarPanelAnimation, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateAppBarPanelAnimation);\r\n\r\n            _cancelLabel.Visibility = Visibility.Visible;\r\n            _deleteLabel.Visibility = Visibility.Visible;\r\n            _forwardLabel.Visibility = Visibility.Visible;\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void CloseMorePanel()\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateAppBarPanelAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateAppBarPanelAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(translateAppBarPanelAnimation, _applicationBarBorder);\r\n            Storyboard.SetTargetProperty(translateAppBarPanelAnimation, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateAppBarPanelAnimation);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                _cancelLabel.Visibility = Visibility.Collapsed;\r\n                _deleteLabel.Visibility = Visibility.Collapsed;\r\n                _forwardLabel.Visibility = Visibility.Collapsed;\r\n            };\r\n        }\r\n        #endregion\r\n\r\n        #region Recording\r\n\r\n        public bool UploadFileDuringRecording { get; set; }\r\n\r\n        private bool _isLogEnabled = false;\r\n\r\n        private void Log(string str)\r\n        {\r\n            if (!_isLogEnabled) return;\r\n\r\n            System.Diagnostics.Debug.WriteLine(DateTime.Now.ToString(\"  HH:mm:ss.fff \") + str);\r\n        }\r\n\r\n        private DateTime? _lastUpdateTime;\r\n        private DateTime? _lastTypingTime;\r\n        private bool _isHintStoryboardPlaying;\r\n        private bool _isSliding;\r\n        private Microphone _microphone;\r\n        private byte[] _buffer;\r\n        private TimeSpan _duration;\r\n        private TimeSpan _recordedDuration;\r\n        private DateTime _startTime;\r\n        private volatile bool _stopRequested;\r\n        private volatile bool _cancelRequested;\r\n\r\n        private MemoryStream _stream;\r\n        private XnaAsyncDispatcher _asyncDispatcher;\r\n        private string _fileName = \"audio.mp3\";\r\n\r\n        private WindowsPhoneRuntimeComponent _component;\r\n\r\n        protected WindowsPhoneRuntimeComponent Component\r\n        {\r\n            get\r\n            {\r\n                if (DesignerProperties.IsInDesignTool) return null;\r\n\r\n                _component = _component ?? new WindowsPhoneRuntimeComponent();\r\n\r\n                return _component;\r\n            }\r\n        }\r\n\r\n        private long _uploadingLength;\r\n        private volatile bool _isPartReady;\r\n        private int _skipBuffersCount;\r\n        private TLLong _fileId;\r\n        private readonly List<UploadablePart> _uploadableParts = new List<UploadablePart>();\r\n\r\n        private TextBlock Duration;\r\n\r\n        private Grid SliderPanel;\r\n\r\n        private StackPanel Slider;\r\n\r\n        private Grid TimerPanel;\r\n\r\n        private Grid CreateTimerPanel()\r\n        {\r\n            var timerPanel = new Grid { Margin = new Thickness(0.0, 2.0, 0.0, 0.0), Visibility = Visibility.Collapsed, Background = (Brush)Application.Current.Resources[\"PhoneBackgroundBrush\"], MinWidth = 120.0, IsHitTestVisible = false };\r\n            timerPanel.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });\r\n            timerPanel.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });\r\n\r\n            timerPanel.RenderTransform = new TranslateTransform();\r\n\r\n            var scaledText = (ScaledText) Application.Current.Resources[\"ScaledText\"];\r\n            var fontSize = scaledText.DefaultFontSize;\r\n\r\n            Duration = new TextBlock\r\n            {\r\n                CacheMode = new BitmapCache(),\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                Margin = new Thickness(12.0, 0.0, 12.0, 3.0),\r\n                Text = \"0:00,0\",\r\n                FontSize = fontSize\r\n            };\r\n            Grid.SetColumn(Duration, 1);\r\n            var border = new Ellipse\r\n            {\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                Margin = new Thickness(20.0, 0.0, 0.0, 2.0),\r\n                Width = 10.0,\r\n                Height = 10.0,\r\n                Fill = new SolidColorBrush(Color.FromArgb(255, 255, 83, 83))\r\n            };\r\n            Grid.SetColumn(border, 0);\r\n\r\n            _recordingStoryboard = GetRecordingStoryboard(border);\r\n\r\n            timerPanel.Children.Add(Duration);\r\n            timerPanel.Children.Add(border);\r\n\r\n            Grid.SetColumn(timerPanel, 0);\r\n\r\n            return timerPanel;\r\n        }\r\n\r\n        private TranslateTransform _sliderTextTransform;\r\n\r\n        private CompositeTransform _sliderPathTransform;\r\n\r\n        private Grid CreateSliderPanel()\r\n        {\r\n            Brush fill;\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                fill = (Brush)Resources[\"InputForegroundBrushLight\"];\r\n            }\r\n            else\r\n            {\r\n                fill = (Brush)Resources[\"InputForegroundBrushDark\"];\r\n            }\r\n\r\n            var clipGrid = new Grid { Visibility = Visibility.Collapsed, IsHitTestVisible = false };\r\n            Grid.SetColumn(clipGrid, 0);\r\n            Grid.SetColumnSpan(clipGrid, 5);\r\n\r\n            Slider = new StackPanel\r\n            {\r\n                CacheMode = new BitmapCache(),\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                Orientation = Orientation.Horizontal,\r\n                HorizontalAlignment = HorizontalAlignment.Center,\r\n                Margin = new Thickness(6.0, 0.0, 0.0, 0.0),\r\n                RenderTransform = new TranslateTransform()\r\n            };\r\n\r\n            var scaledText = (ScaledText)Application.Current.Resources[\"ScaledText\"];\r\n            var fontSize = scaledText.DefaultFontSize;\r\n\r\n            _sliderTextTransform = new TranslateTransform();\r\n            var textBlock = new TextBlock\r\n            {\r\n                Foreground = fill,\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                Text = AppResources.SlideToCancel,\r\n                FontSize = fontSize,\r\n                Margin = new Thickness(4.0, 0.0, 0.0, 3.0),\r\n                RenderTransform = _sliderTextTransform,\r\n            };\r\n\r\n            _sliderPathTransform = new CompositeTransform{ Rotation = 45.0 };\r\n            var path = new System.Windows.Shapes.Path\r\n            {\r\n                Stroke = fill,\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                Margin = new Thickness(72.0, 0.0, 0.0, 0.0),\r\n                StrokeThickness = 2.0,\r\n                RenderTransformOrigin = new Point(0.5, 0.5),\r\n                RenderTransform = _sliderPathTransform\r\n            };\r\n            var dataBinding = new System.Windows.Data.Binding { Source = \"M 0,0 0,16 16,16\" };\r\n            path.SetBinding(System.Windows.Shapes.Path.DataProperty, dataBinding);\r\n\r\n            Slider.Children.Add(path);\r\n            Slider.Children.Add(textBlock);\r\n\r\n            clipGrid.Children.Add(Slider);\r\n\r\n            return clipGrid;\r\n        }\r\n\r\n        private void RecordButton_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n            SaveInputFocus();\r\n\r\n            var microphoneState = _microphone != null ? _microphone.State : (MicrophoneState?)null;\r\n            if (microphoneState == MicrophoneState.Started) return;\r\n            if (_isHintStoryboardPlaying) return;\r\n\r\n            Log(string.Format(\"microphone_state={0} storyboard_state={1}\", microphoneState, _isHintStoryboardPlaying));\r\n\r\n            if (Component == null) return;\r\n            if (_asyncDispatcher == null)\r\n            {\r\n                _asyncDispatcher = new XnaAsyncDispatcher(TimeSpan.FromMilliseconds(50), OnTimerTick);\r\n            }\r\n\r\n            if (_microphone == null)\r\n            {\r\n                try\r\n                {\r\n                    _microphone = Microphone.Default;\r\n                    _microphone.BufferReady += Microphone_OnBufferReady;\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    TLUtils.WriteException(ex);\r\n\r\n                    RecordButton.Opacity = 0.5;\r\n                    RecordButton.IsHitTestVisible = false;\r\n\r\n                    ShowMicrophonePrivacy();\r\n\r\n                    return;\r\n                }\r\n            }\r\n\r\n            try\r\n            {\r\n                _microphone.BufferDuration = TimeSpan.FromMilliseconds(120);\r\n                _duration = _microphone.BufferDuration;\r\n                _buffer = new byte[_microphone.GetSampleSizeInBytes(_microphone.BufferDuration)];\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                TLUtils.WriteException(ex);\r\n\r\n                RecordButton.Opacity = 0.5;\r\n                RecordButton.IsHitTestVisible = false;\r\n\r\n                ShowMicrophonePrivacy();\r\n\r\n                return;\r\n            }\r\n\r\n            if (_scalingStoryboard == null)\r\n            {\r\n                _scalingStoryboard = GetScalingStoryboard(VolumeEllipse);\r\n            }\r\n\r\n            if (TimerPanel == null)\r\n            {\r\n                TimerPanel = CreateTimerPanel();\r\n                InputGrid.Children.Insert(3, TimerPanel);\r\n            }\r\n\r\n            if (SliderPanel == null)\r\n            {\r\n                SliderPanel = CreateSliderPanel();\r\n                InputGrid.Children.Insert(3, SliderPanel);\r\n            }\r\n\r\n            _skipBuffersCount = 0;\r\n            _fileId = TLLong.Random();\r\n            _fileName = _fileId.Value + \".mp3\";\r\n            _isPartReady = true;\r\n            _uploadingLength = 0;\r\n            _uploadableParts.Clear();\r\n\r\n            _isSliding = true;\r\n            _stopRequested = false;\r\n            _cancelRequested = false;\r\n\r\n            RaiseRecordStarted();\r\n\r\n            if (Duration != null) Duration.Text = \"0:00,0\";\r\n            if (Slider != null) ((TranslateTransform)Slider.RenderTransform).X = 0.0;\r\n            Component.StartRecord(ApplicationData.Current.LocalFolder.Path + \"\\\\\" + _fileName);\r\n\r\n            _stream = new MemoryStream();\r\n            _startTime = DateTime.Now;\r\n            Vibrate();\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromMilliseconds(25.0), () =>\r\n            {\r\n                if (!_isSliding)\r\n                {\r\n                    if (_stopRequested)\r\n                    {\r\n                        _stopRequested = false;\r\n                        _cancelRequested = false;\r\n\r\n                        _isHintStoryboardPlaying = true;\r\n                        HintStoryboard.Begin();\r\n                        return;\r\n                    }\r\n                    Log(\"_isSliding=false return\");\r\n                    return;\r\n                }\r\n\r\n                if (Slider != null) SliderPanel.Visibility = Visibility.Visible;\r\n                if (TimerPanel != null) TimerPanel.Visibility = Visibility.Visible;\r\n\r\n                _asyncDispatcher.StartService(null);\r\n                _microphone.Start();\r\n                _recordingStoryboard.Begin();\r\n\r\n                StartRecordingStoryboard();\r\n\r\n                _bufferReady = false;\r\n\r\n                Execute.BeginOnUIThread(TimeSpan.FromSeconds(2.0), () =>\r\n                {\r\n                    if (!_bufferReady)\r\n                    {\r\n                        RecordButton.Opacity = 0.5;\r\n                        RecordButton.IsHitTestVisible = false;\r\n\r\n                        ShowMicrophonePrivacy();\r\n\r\n                        CancelRecording();\r\n\r\n                        RaiseRecordCanceled();\r\n\r\n                        _cancelRequested = false;\r\n                        _microphone.Stop();\r\n                        _recordingStoryboard.Stop();\r\n                        _asyncDispatcher.StopService();\r\n                        Component.StopRecord();\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n        private static void ShowMicrophonePrivacy()\r\n        {\r\n            try\r\n            {\r\n                var result = Guide.BeginShowMessageBox(\r\n                    AppResources.MicrophoneAccessDenied,\r\n                    AppResources.MicrophoneAccessDeniedDescription,\r\n                    new [] { AppResources.Ok, AppResources.Settings },\r\n                    0,\r\n                    MessageBoxIcon.Alert,\r\n                    null,\r\n                    null);\r\n\r\n                result.AsyncWaitHandle.WaitOne();\r\n\r\n                int? choice = Guide.EndShowMessageBox(result);\r\n\r\n                if (choice == 1)\r\n                {\r\n                    Launcher.LaunchUriAsync(new Uri(\"ms-settings:privacy-microphone\"));\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                TLUtils.WriteException(ex);\r\n            }\r\n        }\r\n\r\n        private static void Vibrate()\r\n        {\r\n            if (Debugger.IsAttached) return;\r\n\r\n            VibrateController.Default.Start(TimeSpan.FromMilliseconds(25));\r\n        }\r\n\r\n        private void RecordButton_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            Log(\"RecordButton_OnMouseLeftButtonUp\");\r\n            StopRecording();\r\n        }\r\n\r\n        private void LayoutRoot_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            if (!_isSliding) return;\r\n            if (Slider == null) return;\r\n\r\n\r\n            var transform = (TranslateTransform) Slider.RenderTransform;\r\n            transform.X += e.DeltaManipulation.Translation.X;\r\n\r\n            var scaleTransform = (ScaleTransform) CoverEllipse.RenderTransform;\r\n            var minScale = 2.5;\r\n            var scale = 5.0  + (5.0 - minScale) * transform.X / 75.0;\r\n            if (scale < minScale) scale = minScale;\r\n            if (scale > 5.0) scale = 5.0;\r\n            scaleTransform.ScaleX = scale;\r\n            scaleTransform.ScaleY = scale;\r\n\r\n            if (transform.X > 0)\r\n            {\r\n                transform.X = 0;\r\n            }\r\n            if (transform.X < -150)\r\n            {\r\n                //SliderTransform.X = 0;\r\n                _isSliding = false;\r\n\r\n                CancelRecordingStoryboard.Begin();\r\n            }\r\n        }\r\n\r\n        private void LayoutRoot_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            if (e.OriginalSource == RecordButtonIcon)\r\n            {\r\n                if (!_isSliding)\r\n                {\r\n                    SaveInputFocus();\r\n                    return;\r\n                }\r\n\r\n                if (!_cancelRequested && Hint.Visibility == Visibility.Collapsed)\r\n                {\r\n                    StopRecording();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnTimerTick()\r\n        {\r\n            //if (_lastUpdateTime.HasValue && (DateTime.Now - _lastUpdateTime.Value).TotalMilliseconds < 50.0) return;\r\n\r\n            _lastUpdateTime = DateTime.Now;\r\n\r\n            if (Duration == null) return;\r\n\r\n            var duration = DateTime.Now - _startTime;\r\n            Duration.Text = duration.ToString(duration.TotalHours >= 1.0 ? @\"h\\:mm\\:ss\\,f\" : @\"m\\:ss\\,f\");\r\n        }\r\n\r\n        private bool _bufferReady;\r\n\r\n        private void Microphone_OnBufferReady(object sender, System.EventArgs e)\r\n        {\r\n            _bufferReady = true;\r\n            //var duration = DateTime.Now - _startTime;\r\n            //System.Diagnostics.Debug.WriteLine(\"OnBufferReady {0}\", duration.ToString(@\"h\\:mm\\:ss\\.fff\"));\r\n\r\n            const int skipStartBuffersCount = 3;\r\n\r\n            if (Component == null) return;\r\n\r\n            var dataLength = _microphone.GetData(_buffer);\r\n            if (_skipBuffersCount < skipStartBuffersCount)\r\n            {\r\n                _skipBuffersCount++;\r\n                return;\r\n            }\r\n\r\n            var volume = GetCurrentVolume();\r\n            var scale = 5.0 + volume / 100.0 * 10.0;\r\n            var prevScale = ((ScaleTransform)VolumeEllipse.RenderTransform).ScaleX;\r\n            if (prevScale < scale)\r\n            {\r\n                _scalingStoryboard.Stop();\r\n\r\n                _scalingXKeyFrame.Value = scale;\r\n                _scalingYKeyFrame.Value = scale;\r\n\r\n                _scalingStoryboard.Begin();\r\n            }\r\n\r\n            //VolumeEllipseTransform.ScaleX = 5.0 + volume / 100.0 * 5.0;\r\n            //VolumeEllipseTransform.ScaleY = 5.0 + volume / 100.0 * 5.0;\r\n\r\n            System.Diagnostics.Debug.WriteLine(DateTime.Now.ToString(\"HH:mm:ss.fff\") + \" -volume : \" + volume + \" scale : \" + scale + \" prevScale : \" + prevScale); \r\n\r\n            const int frameLength = 1920;\r\n            var partsCount = dataLength / frameLength;\r\n            _stream.Write(_buffer, 0, _buffer.Length);\r\n            for (var i = 0; i < partsCount; i++)\r\n            {\r\n                var count = frameLength * (i + 1) > _buffer.Length ? _buffer.Length - frameLength * i : frameLength;\r\n                var result = Component.WriteFrame(_buffer.SubArray(frameLength * i, count), count);\r\n            }\r\n\r\n            if (_stopRequested || _cancelRequested)\r\n            {\r\n                _microphone.Stop();\r\n                _recordingStoryboard.Stop();\r\n                _asyncDispatcher.StopService();\r\n                Component.StopRecord();\r\n\r\n                if (UploadFileDuringRecording)\r\n                {\r\n                    UploadAudioFileAsync(true);\r\n                }\r\n\r\n                if (_stopRequested)\r\n                {\r\n                    if ((DateTime.Now - _startTime).TotalMilliseconds < 1000.0)\r\n                    {\r\n                        _stopRequested = false;\r\n                        _cancelRequested = false;\r\n                        //Log(\"HintStoryboard_OnCompleted._stopRequested=false\");\r\n\r\n                        _isHintStoryboardPlaying = true;\r\n                        HintStoryboard.Begin();\r\n                        return;\r\n                    }\r\n\r\n                    RaiseAudioRecorded(_stream, (DateTime.Now - _startTime - TimeSpan.FromTicks(_microphone.BufferDuration.Ticks * skipStartBuffersCount)).TotalSeconds, _fileName, _fileId, _uploadableParts);\r\n                    return;\r\n                }\r\n\r\n                if (_cancelRequested)\r\n                {\r\n                    RaiseRecordCanceled();\r\n                    return;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                var now = DateTime.Now;\r\n                if (!_lastTypingTime.HasValue\r\n                    || _lastTypingTime.Value.AddSeconds(1.0) < now)\r\n                {\r\n                    _lastTypingTime = DateTime.Now;\r\n                    RaiseRecordingAudio();\r\n                }\r\n\r\n                if (UploadFileDuringRecording)\r\n                {\r\n                    UploadAudioFileAsync(false);\r\n                }\r\n            }\r\n        }\r\n\r\n        private float GetCurrentVolume()\r\n        {\r\n            double rms = 0;\r\n            ushort byte1 = 0;\r\n            ushort byte2 = 0;\r\n            short value = 0;\r\n            float volume = 0;\r\n            rms = (short) (byte1 | (byte2 << 8));\r\n\r\n            for (int i = 0; i < _buffer.Length - 1; i += 2)\r\n            {\r\n                byte1 = _buffer[i];\r\n                byte2 = _buffer[i + 1];\r\n                value = (short) (byte1 | (byte2 << 8));\r\n                rms += Math.Pow(value, 2);\r\n            }\r\n            rms /= (double) (_buffer.Length/2);\r\n            volume = (int) Math.Floor(Math.Sqrt(rms));\r\n            if (volume > 10000)\r\n            {\r\n                volume = 10000;\r\n            }\r\n            else if (volume < 700)\r\n            {\r\n                volume = 0;\r\n            }\r\n            volume = (float) (volume/100);\r\n            return volume;\r\n        }\r\n\r\n        private void UploadAudioFileAsync(bool isLastPart)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                if (!_isPartReady) return;\r\n\r\n                _isPartReady = false;\r\n\r\n                var uploadablePart = GetUploadablePart(_fileName, _uploadingLength, _uploadableParts.Count, isLastPart);\r\n                if (uploadablePart == null)\r\n                {\r\n                    _isPartReady = true;\r\n                    return;\r\n                }\r\n\r\n                _uploadableParts.Add(uploadablePart);\r\n                _uploadingLength += uploadablePart.Count;\r\n\r\n                //Execute.BeginOnUIThread(() => VibrateController.Default.Start(TimeSpan.FromSeconds(0.02)));\r\n\r\n                if (!isLastPart)\r\n                {\r\n                    var mtProtoService = IoC.Get<IMTProtoService>();\r\n                    mtProtoService.SaveFilePartAsync(_fileId, uploadablePart.FilePart,\r\n                        TLString.FromBigEndianData(uploadablePart.Bytes),\r\n                        result =>\r\n                        {\r\n                            if (result.Value)\r\n                            {\r\n                                uploadablePart.Status = PartStatus.Processed;\r\n                            }\r\n                        },\r\n                        error => Execute.ShowDebugMessage(\"upload.saveFilePart error \" + error));\r\n                }\r\n\r\n                _isPartReady = true;\r\n            });\r\n        }\r\n\r\n        private static UploadablePart GetUploadablePart(string fileName, long position, int partId, bool isLastPart = false)\r\n        {\r\n            var fullFilePath = ApplicationData.Current.LocalFolder.Path + \"\\\\\" + fileName;\r\n            var fi = new FileInfo(fullFilePath);\r\n            if (!fi.Exists)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            const int minPartLength = 1024;\r\n            const int maxPartLength = 16 * 1024;\r\n\r\n            var recordingLength = fi.Length - position;\r\n            if (!isLastPart && recordingLength < minPartLength)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var subpartsCount = (int)recordingLength / minPartLength;\r\n            var uploadingBufferSize = 0;\r\n            if (isLastPart)\r\n            {\r\n                if (recordingLength > 0)\r\n                {\r\n                    uploadingBufferSize = Math.Min(maxPartLength, (int)recordingLength);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                uploadingBufferSize = Math.Min(maxPartLength, subpartsCount * minPartLength);\r\n            }\r\n            if (uploadingBufferSize == 0)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var uploadingBuffer = new byte[uploadingBufferSize];\r\n\r\n            try\r\n            {\r\n                using (var fileStream = File.Open(fullFilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))\r\n                {\r\n                    fileStream.Position = position;\r\n                    fileStream.Read(uploadingBuffer, 0, uploadingBufferSize);\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Execute.ShowDebugMessage(\"read file \" + fullFilePath + \" exception \" + ex);\r\n                return null;\r\n            }\r\n\r\n            return new UploadablePart(null, new TLInt(partId), uploadingBuffer, position, uploadingBufferSize);\r\n        }\r\n\r\n        private void HintStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            _isHintStoryboardPlaying = false;\r\n\r\n            RaiseRecordCanceled();\r\n        }\r\n\r\n        private void CancelRecordingStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            CancelRecording();\r\n        }\r\n\r\n        private Storyboard _scalingStoryboard;\r\n        private EasingDoubleKeyFrame _scalingXKeyFrame;\r\n        private EasingDoubleKeyFrame _scalingYKeyFrame;\r\n\r\n        private Storyboard GetScalingStoryboard(UIElement element)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var scalingXAnimation = new DoubleAnimationUsingKeyFrames();\r\n            _scalingXKeyFrame = new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 5.0 };\r\n            scalingXAnimation.KeyFrames.Add(_scalingXKeyFrame);\r\n            scalingXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.5), Value = 5.0 });\r\n            Storyboard.SetTarget(scalingXAnimation, element);\r\n            Storyboard.SetTargetProperty(scalingXAnimation, new PropertyPath(\"(UIElement.RenderTransform).(ScaleTransform.ScaleX)\"));\r\n            storyboard.Children.Add(scalingXAnimation);\r\n\r\n            var scalingYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            _scalingYKeyFrame = new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 5.0 };\r\n            scalingYAnimation.KeyFrames.Add(_scalingYKeyFrame);\r\n            scalingYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.5), Value = 5.0 });\r\n            Storyboard.SetTarget(scalingYAnimation, element);\r\n            Storyboard.SetTargetProperty(scalingYAnimation, new PropertyPath(\"(UIElement.RenderTransform).(ScaleTransform.ScaleY)\"));\r\n            storyboard.Children.Add(scalingYAnimation);\r\n\r\n            return storyboard;\r\n        }\r\n\r\n        private Storyboard _recordingStoryboard;\r\n\r\n        private IDisposable _keyPressSubscription;\r\n\r\n        private Storyboard GetRecordingStoryboard(UIElement element)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames { RepeatBehavior = RepeatBehavior.Forever };\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 1.0 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(1.0), Value = 0.0 });\r\n            Storyboard.SetTarget(opacityAnimation, element);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            return storyboard;\r\n        }\r\n\r\n        private void StartRecordingStoryboard()\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var recordEllipseAnimation = new DoubleAnimationUsingKeyFrames();\r\n            recordEllipseAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 2.5 });\r\n            recordEllipseAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 5.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } });\r\n            Storyboard.SetTarget(recordEllipseAnimation, CoverEllipse);\r\n            Storyboard.SetTargetProperty(recordEllipseAnimation, new PropertyPath(\"(UIElement.RenderTransform).(ScaleTransform.ScaleX)\"));\r\n            storyboard.Children.Add(recordEllipseAnimation);\r\n\r\n            var recordEllipseAnimation2 = new DoubleAnimationUsingKeyFrames();\r\n            recordEllipseAnimation2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 2.5 });\r\n            recordEllipseAnimation2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 5.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } });\r\n            Storyboard.SetTarget(recordEllipseAnimation2, CoverEllipse);\r\n            Storyboard.SetTargetProperty(recordEllipseAnimation2, new PropertyPath(\"(UIElement.RenderTransform).(ScaleTransform.ScaleY)\"));\r\n            storyboard.Children.Add(recordEllipseAnimation2);\r\n\r\n            var volumeEllipseAnimation = new DoubleAnimationUsingKeyFrames();\r\n            volumeEllipseAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 2.5 });\r\n            volumeEllipseAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 5.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } });\r\n            Storyboard.SetTarget(volumeEllipseAnimation, VolumeEllipse);\r\n            Storyboard.SetTargetProperty(volumeEllipseAnimation, new PropertyPath(\"(UIElement.RenderTransform).(ScaleTransform.ScaleX)\"));\r\n            storyboard.Children.Add(volumeEllipseAnimation);\r\n\r\n            var volumeEllipseAnimation2 = new DoubleAnimationUsingKeyFrames();\r\n            volumeEllipseAnimation2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 2.5 });\r\n            volumeEllipseAnimation2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 5.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } });\r\n            Storyboard.SetTarget(volumeEllipseAnimation2, VolumeEllipse);\r\n            Storyboard.SetTargetProperty(volumeEllipseAnimation2, new PropertyPath(\"(UIElement.RenderTransform).(ScaleTransform.ScaleY)\"));\r\n            storyboard.Children.Add(volumeEllipseAnimation2);\r\n\r\n            var timerAnimation = new DoubleAnimationUsingKeyFrames();\r\n            timerAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -100.0 });\r\n            timerAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase{ EasingMode = EasingMode.EaseOut, Exponent = 5.0 }});\r\n            Storyboard.SetTarget(timerAnimation, TimerPanel);\r\n            Storyboard.SetTargetProperty(timerAnimation, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.X)\"));\r\n            storyboard.Children.Add(timerAnimation);\r\n            \r\n            var sliderTextAnimation = new DoubleAnimationUsingKeyFrames();\r\n            sliderTextAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.05), Value = 100.0 });\r\n            sliderTextAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.30), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } });\r\n            Storyboard.SetTarget(sliderTextAnimation, _sliderTextTransform);\r\n            Storyboard.SetTargetProperty(sliderTextAnimation, new PropertyPath(\"X\"));\r\n            storyboard.Children.Add(sliderTextAnimation);\r\n\r\n            var sliderPathAnimation = new DoubleAnimationUsingKeyFrames();\r\n            sliderPathAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 100.0 });\r\n            sliderPathAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 } });\r\n            Storyboard.SetTarget(sliderPathAnimation, _sliderPathTransform);\r\n            Storyboard.SetTargetProperty(sliderPathAnimation, new PropertyPath(\"TranslateX\"));\r\n            storyboard.Children.Add(sliderPathAnimation);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void CancelRecording()\r\n        {\r\n            if (Slider != null) SliderPanel.Visibility = Visibility.Collapsed;\r\n            if (TimerPanel != null) TimerPanel.Visibility = Visibility.Collapsed;\r\n\r\n            if (!_stopRequested)\r\n            {\r\n                _cancelRequested = true;\r\n            }\r\n            _isSliding = false;\r\n            _lastTypingTime = null;\r\n        }\r\n\r\n        private void StopRecording()\r\n        {\r\n            Vibrate();\r\n\r\n            if (Slider != null) SliderPanel.Visibility = Visibility.Collapsed;\r\n            if (TimerPanel != null) TimerPanel.Visibility = Visibility.Collapsed;\r\n            _stopRequested = true;\r\n            _isSliding = false;\r\n            _lastTypingTime = null;\r\n        }\r\n\r\n        public event EventHandler<AudioEventArgs> AudioRecorded;\r\n\r\n        protected virtual void RaiseAudioRecorded(MemoryStream stream, double duration, string fileName, TLLong fileId, IList<UploadablePart> parts)\r\n        {\r\n            SetInputVisibility(Visibility.Visible);\r\n\r\n            var stringBuilder = new StringBuilder();\r\n            stringBuilder.AppendLine(\"parts\");\r\n            foreach (var part in parts)\r\n            {\r\n                stringBuilder.AppendLine(string.Format(\"file_part={0} position={1} count={2} status={3}\", part.FilePart, part.Position, part.Count, part.Status));\r\n            }\r\n\r\n            Telegram.Logs.Log.Write(string.Format(\"AudioRecorderControl.AudioRecorded duration={0} file_name={1}\\n{2}\", duration, fileName, stringBuilder));\r\n\r\n            var handler = AudioRecorded;\r\n            if (handler != null) handler(this, new AudioEventArgs(stream, duration, fileName, fileId, parts));\r\n        }\r\n\r\n        public event EventHandler<System.EventArgs> RecordCanceled;\r\n\r\n        protected virtual void RaiseRecordCanceled()\r\n        {\r\n            SetInputVisibility(Visibility.Visible);\r\n\r\n            Telegram.Logs.Log.Write(\"AudioRecorderControl.AudioRecordCanceled\");\r\n\r\n            var handler = RecordCanceled;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler<System.EventArgs> RecordStarted;\r\n\r\n        protected virtual void RaiseRecordStarted()\r\n        {\r\n            SetInputVisibility(Visibility.Collapsed);\r\n            Telegram.Logs.Log.Write(\"AudioRecorderControl.AudioRecordStarted\");\r\n\r\n            var handler = RecordStarted;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler<System.EventArgs> RecordingAudio;\r\n\r\n        protected virtual void RaiseRecordingAudio()\r\n        {\r\n            var handler = RecordingAudio;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void SetInputVisibility(Visibility visibility)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"SetInputVisibility \" + visibility);\r\n            //Scroll.IsHitTestVisible = visibility == Visibility.Visible;\r\n            //EmojiButton.IsHitTestVisible = visibility == Visibility.Visible;\r\n            //AdditionalButtons.IsHitTestVisible = visibility == Visibility.Visible;\r\n            EmojiButton.Visibility = visibility;\r\n            Scroll.Visibility = visibility;\r\n            AdditionalButtons.Visibility = visibility;\r\n            if (visibility == Visibility.Collapsed)\r\n            {\r\n                RecordButtonIcon.Background = new SolidColorBrush(Colors.White);\r\n                VolumeEllipse.Visibility = Visibility.Visible;\r\n                ((ScaleTransform) VolumeEllipse.RenderTransform).ScaleX = 2.5;\r\n                ((ScaleTransform) VolumeEllipse.RenderTransform).ScaleY = 2.5;\r\n                CoverEllipse.Visibility = Visibility.Visible;\r\n                ((ScaleTransform) CoverEllipse.RenderTransform).ScaleX = 2.5;\r\n                ((ScaleTransform) CoverEllipse.RenderTransform).ScaleY = 2.5;\r\n            }\r\n            else\r\n            {\r\n                RecordButtonIcon.Background = (Brush) Resources[\"InputForegroundBrushLight\"];\r\n                VolumeEllipse.Visibility = Visibility.Collapsed;\r\n                CoverEllipse.Visibility = Visibility.Collapsed;\r\n            }\r\n            SaveInputFocus();\r\n        }\r\n        #endregion\r\n\r\n        private void EmojiButton_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\n        public bool IsFullScreen { get; protected set; }\r\n\r\n        public void OpenFullScreen(double addHeight)\r\n        {\r\n            if (IsFullScreen) return;\r\n\r\n            addHeight = addHeight > 7.0 ? addHeight : 0.0;\r\n\r\n            Margin = new Thickness(0.0, -7.0, 0.0, 0.0);\r\n            KeyboardPlaceholder.Height = KeyboardPlaceholder.Height + addHeight;\r\n            IsFullScreen = true;\r\n\r\n            var emojiControl = KeyboardPlaceholder.Content as EmojiControl;\r\n            if (emojiControl != null)\r\n            {\r\n                emojiControl.OpenSearch();\r\n            }\r\n        }\r\n\r\n        public void CloseFullScreen()\r\n        {\r\n            Margin = new Thickness(0.0, 0.0, 0.0, 0.0);\r\n            KeyboardPlaceholder.Height = KeyboardHeight;\r\n            IsFullScreen = false;\r\n\r\n            var emojiControl = KeyboardPlaceholder.Content as EmojiControl;\r\n            if (emojiControl != null)\r\n            {\r\n                emojiControl.CloseSearch();\r\n            }\r\n        }\r\n    }\r\n\r\n    public class EmojiHintsEventArgs\r\n    {\r\n        public EmojiSuggestionParams Parameters { get; protected set; }\r\n\r\n        public EmojiHintsEventArgs(EmojiSuggestionParams parameters)\r\n        {\r\n            Parameters = parameters;\r\n        }\r\n    }\r\n\r\n    public class EmojiSuggestionParams\r\n    {\r\n        public int Index { get; set; }\r\n\r\n        public int Length { get; set; }\r\n\r\n        public int SelectionStart { get; set; }\r\n\r\n        public string Text { get; set; }\r\n\r\n        public string Query { get; set; }\r\n\r\n        public EmojiSuggestion[] Results { get; set; }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"text={0} selectionStart={1} query={2} results={3}\", Text, SelectionStart, Query, Results != null ? Results.Length : 0);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/LabeledPasswordBox.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.LabeledPasswordBox\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\"\r\n    x:Name=\"Self\">\r\n    <UserControl.Resources>\r\n        <ControlTemplate x:Key=\"PhoneDisabledPasswordBoxTemplate\" TargetType=\"PasswordBox\">\r\n            <Border x:Name=\"ContentElement\" BorderThickness=\"0\" Margin=\"{StaticResource PhonePasswordBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\"/>\r\n        </ControlTemplate>\r\n        <Style x:Key=\"PasswordBoxStyle1\" TargetType=\"PasswordBox\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"SelectionBackground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"23\"/>\r\n            <Setter Property=\"Padding\" Value=\"14,2,1,2\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"PasswordBox\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unfocused\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" HorizontalContentAlignment=\"Stretch\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                                <PasswordBox x:Name=\"DisabledContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\" Password=\"{TemplateBinding Password}\" PasswordChar=\"{TemplateBinding PasswordChar}\" Padding=\"{TemplateBinding Padding}\" Template=\"{StaticResource PhoneDisabledPasswordBoxTemplate}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\">\r\n        <PasswordBox x:Name=\"TextBox\" IsEnabled=\"{Binding IsEnabled, ElementName=Self}\" GotFocus=\"TextBox_OnGotFocus\" LostFocus=\"TextBox_OnLostFocus\" VerticalAlignment=\"Top\" Password=\"\" Style=\"{StaticResource PasswordBoxStyle1}\"/>\r\n        <TextBlock x:Name=\"TextBlock\" IsHitTestVisible=\"False\" VerticalAlignment=\"Top\" FontSize=\"23\" Margin=\"30,19,36,0\" Text=\"\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/LabeledPasswordBox.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class LabeledPasswordBox\r\n    {\r\n        public static readonly DependencyProperty LabelProperty = DependencyProperty.Register(\r\n            \"Label\", typeof (string), typeof (LabeledPasswordBox), new PropertyMetadata(default(string), OnLabelChanged));\r\n\r\n        private static void OnLabelChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var labeledTextBox = d as LabeledPasswordBox;\r\n            if (labeledTextBox != null)\r\n            {\r\n                labeledTextBox.TextBlock.Text = (string) e.NewValue;\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty PasswordProperty = DependencyProperty.Register(\r\n            \"Password\", typeof (string), typeof (LabeledPasswordBox), new PropertyMetadata(default(string), OnTextChanged));\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var labeledTextBox = d as LabeledPasswordBox;\r\n            if (labeledTextBox != null)\r\n            {\r\n                labeledTextBox.TextBox.Password = (string)e.NewValue;\r\n                labeledTextBox.TextBlock.Visibility = string.IsNullOrEmpty((string) e.NewValue)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public string Password\r\n        {\r\n            get { return (string) GetValue(PasswordProperty); }\r\n            set { SetValue(PasswordProperty, value); }\r\n        }\r\n\r\n        public string Label\r\n        {\r\n            get { return (string) GetValue(LabelProperty); }\r\n            set { SetValue(LabelProperty, value); }\r\n        }\r\n\r\n        public int MaxLength\r\n        {\r\n            get { return TextBox.MaxLength; }\r\n            set { TextBox.MaxLength = value; }\r\n        }\r\n\r\n        public PasswordBox Input { get { return TextBox; } }\r\n\r\n        public LabeledPasswordBox()\r\n        {\r\n            InitializeComponent();\r\n\r\n            TextBox.LostFocus += (sender, args) =>\r\n            {\r\n                Password = Input.Password;\r\n            };\r\n\r\n            GotFocus += (o, e) =>\r\n            {\r\n                TextBox.Focus();\r\n                if (!string.IsNullOrEmpty(TextBox.Password))\r\n                {\r\n                    TextBox.SelectAll();\r\n                }\r\n            };\r\n        }\r\n\r\n        private void TextBox_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            TextBlock.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private void TextBox_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            TextBlock.Visibility = string.IsNullOrEmpty(TextBox.Password)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/LabeledTextBox.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.LabeledTextBox\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"23\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\"\r\n    x:Name=\"Self\">\r\n    <UserControl.Resources>\r\n\r\n        <Style x:Key=\"TextBoxStyle1\" TargetType=\"TextBox\">\r\n            <Setter Property=\"VerticalAlignment\" Value=\"Top\"/>\r\n            <Setter Property=\"FontSize\" Value=\"23\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n            <Setter Property=\"SelectionBackground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n            <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n            <Setter Property=\"Padding\" Value=\"14,2,1,2\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"TextBox\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"ReadOnly\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledOrReadonlyContent\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unfocused\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentElement\" Content=\"|Test\" FontSize=\"{TemplateBinding FontSize}\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledOrReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                                <TextBox x:Name=\"DisabledOrReadonlyContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\" FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" IsReadOnly=\"True\" SelectionForeground=\"{TemplateBinding SelectionForeground}\" SelectionBackground=\"{TemplateBinding SelectionBackground}\" TextAlignment=\"{TemplateBinding TextAlignment}\" TextWrapping=\"{TemplateBinding TextWrapping}\" Text=\"{TemplateBinding Text}\" Padding=\"14,2,1,2\" Template=\"{StaticResource PhoneDisabledTextBoxTemplate}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n        <TextBox x:Name=\"TextBox\" Grid.Row=\"0\" IsEnabled=\"{Binding IsEnabled, ElementName=Self}\" TextChanged=\"TextBox_OnTextChanged\" GotFocus=\"TextBox_OnGotFocus\" LostFocus=\"TextBox_OnLostFocus\" Text=\"\" Style=\"{StaticResource TextBoxStyle1}\">\r\n            <TextBox.InputScope>\r\n                <InputScope>\r\n                    <InputScopeName NameValue=\"Text\"/>\r\n                </InputScope>\r\n            </TextBox.InputScope>\r\n        </TextBox>\r\n        <TextBlock x:Name=\"TextBlock\" Grid.Row=\"0\" IsHitTestVisible=\"False\" VerticalAlignment=\"Top\" Margin=\"30,19,36,0\" Text=\"\" Opacity=\"0.6\" Foreground=\"{StaticResource PhoneForegroundBrush}\"/>\r\n        <TextBlock x:Name=\"ErrorTextBlock\" Grid.Row=\"1\" Visibility=\"Collapsed\" IsHitTestVisible=\"False\" VerticalAlignment=\"Top\" Margin=\"12,-6,12,12\" Text=\"\" TextTrimming=\"None\" TextWrapping=\"Wrap\" FontSize=\"20\" Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/LabeledTextBox.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class LabeledTextBox\r\n    {\r\n        public static readonly DependencyProperty ErrorProperty = DependencyProperty.Register(\r\n            \"Error\", typeof(string), typeof(LabeledTextBox), new PropertyMetadata(default(string), OnErrorChanged));\r\n\r\n        private static void OnErrorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var labeledTextBox = d as LabeledTextBox;\r\n            if (labeledTextBox != null)\r\n            {\r\n                labeledTextBox.ErrorTextBlock.Text = (string)e.NewValue;\r\n                labeledTextBox.ErrorTextBlock.Visibility = string.IsNullOrEmpty(labeledTextBox.ErrorTextBlock.Text)\r\n                    ? Visibility.Collapsed\r\n                    : Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        public string Error\r\n        {\r\n            get { return (string) GetValue(ErrorProperty); }\r\n            set { SetValue(ErrorProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty LabelProperty = DependencyProperty.Register(\r\n            \"Label\", typeof (string), typeof (LabeledTextBox), new PropertyMetadata(default(string), OnLabelChanged));\r\n\r\n        private static void OnLabelChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var labeledTextBox = d as LabeledTextBox;\r\n            if (labeledTextBox != null)\r\n            {\r\n                labeledTextBox.TextBlock.Text = (string) e.NewValue;\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(\r\n            \"Text\", typeof (string), typeof (LabeledTextBox), new PropertyMetadata(default(string), OnTextChanged));\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var labeledTextBox = d as LabeledTextBox;\r\n            if (labeledTextBox != null)\r\n            {\r\n                labeledTextBox.TextBox.Text = (string)e.NewValue;\r\n                labeledTextBox.TextBlock.Visibility = string.IsNullOrEmpty((string) e.NewValue)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public string Text\r\n        {\r\n            get { return (string) GetValue(TextProperty); }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        public string Label\r\n        {\r\n            get { return (string) GetValue(LabelProperty); }\r\n            set { SetValue(LabelProperty, value); }\r\n        }\r\n\r\n        public InputScope InputScope\r\n        {\r\n            get { return TextBox.InputScope; }\r\n            set { TextBox.InputScope = value; }\r\n        }\r\n\r\n        public int MaxLength\r\n        {\r\n            get { return TextBox.MaxLength; }\r\n            set { TextBox.MaxLength = value; }\r\n        }\r\n\r\n        public int SelectionStart\r\n        {\r\n            get { return TextBox.SelectionStart; }\r\n            set { TextBox.SelectionStart = value; }\r\n        }\r\n\r\n        public TextWrapping TextWrapping\r\n        {\r\n            get { return TextBox.TextWrapping; }\r\n            set { TextBox.TextWrapping = value; }\r\n        }\r\n\r\n        public bool AcceptReturn\r\n        {\r\n            get { return TextBox.AcceptsReturn; }\r\n            set { TextBox.AcceptsReturn = value; }\r\n        }\r\n\r\n        public TextBox Input { get { return TextBox; } }\r\n\r\n        public LabeledTextBox()\r\n        {\r\n            InitializeComponent();\r\n\r\n            GotFocus += (o, e) =>\r\n            {\r\n                TextBox.Focus();\r\n                if (!string.IsNullOrEmpty(TextBox.Text))\r\n                {\r\n                    TextBox.SelectionStart = TextBox.Text.Length;\r\n                }\r\n            };\r\n        }\r\n\r\n        public void SetTextBox(TextBox textBox)\r\n        {\r\n            var inputScope = TextBox.InputScope;\r\n            var maxLength = TextBox.MaxLength;\r\n            LayoutRoot.Children.Remove(TextBox);\r\n            TextBox.GotFocus -= TextBox_OnGotFocus;\r\n            TextBox.LostFocus -= TextBox_OnLostFocus;\r\n            TextBox = textBox;\r\n            LayoutRoot.Children.Insert(0, textBox);\r\n            textBox.GotFocus += TextBox_OnGotFocus;\r\n            textBox.LostFocus += TextBox_OnLostFocus;\r\n            textBox.Style = (Style) Resources[\"TextBoxStyle1\"];\r\n            textBox.InputScope = inputScope;\r\n            textBox.MaxLength = maxLength;\r\n        }\r\n\r\n        private void TextBox_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            TextBlock.Visibility = string.IsNullOrEmpty(TextBox.Text)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            TextBlock.Foreground = (Brush)Application.Current.Resources[\"PhoneTextBoxForegroundBrush\"];\r\n        }\r\n\r\n        private void TextBox_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            Text = TextBox.Text;\r\n            TextBlock.Visibility = string.IsNullOrEmpty(TextBox.Text)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            TextBlock.Foreground = (Brush) Application.Current.Resources[\"PhoneForegroundBrush\"];\r\n        }\r\n\r\n        private void TextBox_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            TextBlock.Visibility = string.IsNullOrEmpty(TextBox.Text)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/LiveLocationIcon.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.LiveLocationIcon\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <Storyboard x:Name=\"Storyboard1\" RepeatBehavior=\"Forever\">\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation1\" Storyboard.TargetProperty=\"ScaleY\" From=\"0.62\" To=\"1.2\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation1\" Storyboard.TargetProperty=\"ScaleX\" From=\"0.62\" To=\"1.2\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Indicator1\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.8\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.2\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation3\" Storyboard.TargetProperty=\"ScaleY\" From=\"-0.62\" To=\"-1.2\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation3\" Storyboard.TargetProperty=\"ScaleX\" From=\"-0.62\" To=\"-1.2\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Indicator3\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.8\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.2\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"Storyboard2\" RepeatBehavior=\"Forever\" BeginTime=\"0:0:0.6\">\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation2\" Storyboard.TargetProperty=\"ScaleY\" From=\"0.62\" To=\"1.2\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation2\" Storyboard.TargetProperty=\"ScaleX\" From=\"0.62\" To=\"1.2\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Indicator2\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.8\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.2\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation4\" Storyboard.TargetProperty=\"ScaleY\" From=\"-0.62\" To=\"-1.2\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation4\" Storyboard.TargetProperty=\"ScaleX\" From=\"-0.62\" To=\"-1.2\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Indicator4\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.8\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.2\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Image Source=\"/Images/W10M/ic_location_2x.png\" Height=\"40\"/>\r\n        <controls:ProgressPieSlice x:Name=\"Indicator1\" Opacity=\"0\" IsHitTestVisible=\"False\" RenderTransformOrigin=\"0.5,0.5\" CacheMode=\"BitmapCache\" Stroke=\"White\" StrokeThickness=\"4\" StrokeStartLineCap=\"Round\"  StrokeEndLineCap=\"Round\" Radius=\"32\" StartAngle=\"0\" Angle=\"44\"  UseLayoutRounding=\"False\">\r\n            <controls:ProgressPieSlice.RenderTransform>\r\n                <CompositeTransform x:Name=\"Rotation1\" Rotation=\"68\" TranslateY=\"-6\" ScaleY=\"1\" ScaleX=\"1\"/>\r\n            </controls:ProgressPieSlice.RenderTransform>\r\n        </controls:ProgressPieSlice>\r\n\r\n        <controls:ProgressPieSlice x:Name=\"Indicator2\" Opacity=\"0\" IsHitTestVisible=\"False\" RenderTransformOrigin=\"0.5,0.5\" CacheMode=\"BitmapCache\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"4\" StrokeStartLineCap=\"Round\"  StrokeEndLineCap=\"Round\" Radius=\"32\" StartAngle=\"0\" Angle=\"44\"  UseLayoutRounding=\"False\">\r\n            <controls:ProgressPieSlice.RenderTransform>\r\n                <CompositeTransform x:Name=\"Rotation2\" Rotation=\"68\" TranslateY=\"-6\" ScaleY=\".62\" ScaleX=\".62\"/>\r\n            </controls:ProgressPieSlice.RenderTransform>\r\n        </controls:ProgressPieSlice>\r\n\r\n        <controls:ProgressPieSlice x:Name=\"Indicator3\" Opacity=\"0\" IsHitTestVisible=\"False\" RenderTransformOrigin=\"0.5,0.5\" CacheMode=\"BitmapCache\" Stroke=\"White\" StrokeThickness=\"4\" StrokeStartLineCap=\"Round\"  StrokeEndLineCap=\"Round\" Radius=\"32\" StartAngle=\"0\" Angle=\"44\"  UseLayoutRounding=\"False\">\r\n            <controls:ProgressPieSlice.RenderTransform>\r\n                <CompositeTransform x:Name=\"Rotation3\" Rotation=\"68\" TranslateY=\"-6\" ScaleY=\"-1\" ScaleX=\"-1\"/>\r\n            </controls:ProgressPieSlice.RenderTransform>\r\n        </controls:ProgressPieSlice>\r\n\r\n        <controls:ProgressPieSlice x:Name=\"Indicator4\" Opacity=\"0\" IsHitTestVisible=\"False\" RenderTransformOrigin=\"0.5,0.5\" CacheMode=\"BitmapCache\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"4\" StrokeStartLineCap=\"Round\"  StrokeEndLineCap=\"Round\" Radius=\"32\" StartAngle=\"0\" Angle=\"44\"  UseLayoutRounding=\"False\">\r\n            <controls:ProgressPieSlice.RenderTransform>\r\n                <CompositeTransform x:Name=\"Rotation4\" Rotation=\"68\" TranslateY=\"-6\" ScaleY=\"-.62\" ScaleX=\"-.62\"/>\r\n            </controls:ProgressPieSlice.RenderTransform>\r\n        </controls:ProgressPieSlice>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/LiveLocationIcon.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class LiveLocationIcon\r\n    {\r\n        public LiveLocationIcon()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Storyboard1.Begin();\r\n                Storyboard2.Begin();\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                Storyboard1.Stop();\r\n                Storyboard2.Stop();\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/LiveLocationProgress.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.LiveLocationProgress\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\">\r\n        <Border CornerRadius=\"19\" Width=\"38\" Height=\"38\" BorderThickness=\"2\" BorderBrush=\"{StaticResource TelegramBadgeAccentBrush}\" Opacity=\"0.3\"/>\r\n        <controls:ProgressPieSlice x:Name=\"Progress\" RenderTransformOrigin=\"0.5,0.5\" IsHitTestVisible=\"False\" CacheMode=\"BitmapCache\" Stroke=\"{StaticResource TelegramBadgeAccentBrush}\" StrokeThickness=\"2\" StrokeStartLineCap=\"Round\"  StrokeEndLineCap=\"Round\" Radius=\"18\" StartAngle=\"0\" Angle=\"270\">\r\n            <controls:ProgressPieSlice.RenderTransform>\r\n                <ScaleTransform ScaleX=\"-1\"/>\r\n            </controls:ProgressPieSlice.RenderTransform>\r\n        </controls:ProgressPieSlice>\r\n        <TextBlock x:Name=\"Label\" Margin=\"0,-3,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Text=\"59\" FontSize=\"16\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/LiveLocationProgress.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Media.Animation;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Resources;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class LiveLocationProgress\r\n    {\r\n        public static List<LiveLocationProgress> Controls = new List<LiveLocationProgress>();\r\n\r\n        public static readonly DependencyProperty MediaProperty = DependencyProperty.Register(\r\n            \"Media\", typeof(TLMessageMediaBase), typeof(LiveLocationProgress), new PropertyMetadata(default(TLMessageMediaBase), OnMediaChanged));\r\n\r\n        private static void OnMediaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var progress = d as LiveLocationProgress;\r\n            if (progress != null)\r\n            {\r\n                var mediaGeoLive = e.NewValue as TLMessageMediaGeoLive;\r\n                if (mediaGeoLive != null)\r\n                {\r\n                    progress.UpdateAnimation(mediaGeoLive);\r\n                }\r\n            }\r\n        }\r\n\r\n        public void Update()\r\n        {\r\n            UpdateAnimation(Media as TLMessageMediaGeoLive);\r\n        }\r\n\r\n        private void UpdateAnimation(TLMessageMediaGeoLive mediaGeoLive)\r\n        {\r\n            if (mediaGeoLive == null || mediaGeoLive.Date == null)\r\n            {\r\n                Label.Text = \"0\";\r\n                Progress.Angle = 0.0;\r\n                if (_storyboard.GetCurrentState() == ClockState.Active)\r\n                {\r\n                    _storyboard.SkipToFill(); // will invoke storyboard.Completed\r\n                }\r\n                return;\r\n            }\r\n\r\n            var date = TLUtils.DateToUniversalTimeTLInt(IoC.Get<IMTProtoService>().ClientTicksDelta, DateTime.Now);\r\n\r\n            var lastPartSeconds = (double)mediaGeoLive.Date.Value + mediaGeoLive.Period.Value - date.Value;\r\n            if (lastPartSeconds <= 0)\r\n            {\r\n                Label.Text = \"0\";\r\n                Progress.Angle = 0.0;\r\n                if (_storyboard.GetCurrentState() == ClockState.Active)\r\n                {\r\n                    _storyboard.SkipToFill(); // will invoke storyboard.Completed\r\n                }\r\n                return;\r\n            }\r\n            if (lastPartSeconds > mediaGeoLive.Period.Value)\r\n            {\r\n                lastPartSeconds = mediaGeoLive.Period.Value - 1.0;\r\n            }\r\n\r\n            Label.Text = GetLabelText(lastPartSeconds);\r\n\r\n            var percent = lastPartSeconds / mediaGeoLive.Period.Value;\r\n            var angle = 359.0 * percent;\r\n\r\n            _progressAnimation.From = angle;\r\n            _progressAnimation.Duration = TimeSpan.FromSeconds(lastPartSeconds);\r\n\r\n            Progress.Angle = angle;\r\n            _storyboard.Begin();\r\n\r\n            SetNextTimer(lastPartSeconds);\r\n        }\r\n\r\n        private string GetLabelText(double lastPartTotalSeconds)\r\n        {\r\n            if (lastPartTotalSeconds < 0)\r\n            {\r\n                return \"0\";\r\n            }\r\n            if (lastPartTotalSeconds < 60)\r\n            {\r\n                return Math.Ceiling(lastPartTotalSeconds).ToString();\r\n            }\r\n            if (lastPartTotalSeconds < 60 * 60)\r\n            {\r\n                return Math.Ceiling(lastPartTotalSeconds / 60).ToString();\r\n            }\r\n\r\n            return string.Format(\"{0}{1}\", Math.Ceiling(lastPartTotalSeconds / 60 / 60), AppResources.HourShort.ToLowerInvariant());\r\n        }\r\n\r\n        public TLMessageMediaBase Media\r\n        {\r\n            get { return (TLMessageMediaBase) GetValue(MediaProperty); }\r\n            set { SetValue(MediaProperty, value); }\r\n        }\r\n\r\n        public event EventHandler Completed;\r\n\r\n        protected virtual void RaiseCompleted()\r\n        {\r\n            var handler = Completed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private readonly Storyboard _storyboard;\r\n\r\n        private readonly DoubleAnimation _progressAnimation;\r\n\r\n        private readonly Timer _timer;\r\n\r\n        public LiveLocationProgress()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _timer = new Timer(Timer_OnTick);\r\n\r\n            _storyboard = new Storyboard();\r\n            _storyboard.Completed += (sender, args) =>\r\n            {\r\n                RaiseCompleted();\r\n            };\r\n            _progressAnimation = new DoubleAnimation{ To = 0.0 };\r\n            Storyboard.SetTarget(_progressAnimation, Progress);\r\n            Storyboard.SetTargetProperty(_progressAnimation, new PropertyPath(ProgressPieSlice.AngleProperty));\r\n            _storyboard.Children.Add(_progressAnimation);\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Controls.Add(this);\r\n\r\n                UpdateAnimation(Media as TLMessageMediaGeoLive);\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                Controls.Remove(this);\r\n\r\n                _storyboard.Stop();\r\n                _timer.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);\r\n            };\r\n        }\r\n\r\n        private void Timer_OnTick(object state)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                var mediaGeoLive = Media as TLMessageMediaGeoLive;\r\n                if (mediaGeoLive == null || mediaGeoLive.Date == null)\r\n                {\r\n                    Label.Text = \"0\";\r\n                    Progress.Angle = 0.0;\r\n                    \r\n                    return;\r\n                }\r\n\r\n                var date = TLUtils.DateToUniversalTimeTLInt(IoC.Get<IMTProtoService>().ClientTicksDelta, DateTime.Now);\r\n\r\n                var lastPartSeconds = (double)mediaGeoLive.Date.Value + mediaGeoLive.Period.Value - date.Value;\r\n                if (lastPartSeconds <= 0)\r\n                {\r\n                    Label.Text = \"0\";\r\n                    Progress.Angle = 0.0;\r\n\r\n                    return;\r\n                }\r\n\r\n                Label.Text = GetLabelText(lastPartSeconds);\r\n\r\n                SetNextTimer(lastPartSeconds);\r\n            });\r\n        }\r\n\r\n        private void SetNextTimer(double lastPartSeconds)\r\n        {\r\n            if (lastPartSeconds < 60)\r\n            {\r\n                _timer.Change(TimeSpan.FromSeconds(0.5), Timeout.InfiniteTimeSpan);\r\n                return;\r\n            }\r\n            if (lastPartSeconds < 60 * 2)\r\n            {\r\n                _timer.Change(TimeSpan.FromSeconds(lastPartSeconds - 60.0), Timeout.InfiniteTimeSpan);\r\n                return;\r\n            }\r\n\r\n            if (lastPartSeconds <= 60 * 60)\r\n            {\r\n                _timer.Change(TimeSpan.FromSeconds(lastPartSeconds - (int)(lastPartSeconds / 60.0) * 60.0), Timeout.InfiniteTimeSpan);\r\n                return;\r\n            }\r\n\r\n            _timer.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/LiveLocationsControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.LiveLocationsControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" Margin=\"0,20,0,0\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n        \r\n        <ListBox Grid.Row=\"1\" ItemsSource=\"{Binding Messages}\" MaxHeight=\"198\">\r\n            <ListBox.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Grid Margin=\"6\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <views:ConversationTileControl x:Name=\"DialogPhoto\" Size=\"54\"\r\n                            Margin=\"0,0,6,0\" Grid.Row=\"0\" Grid.Column=\"0\" VerticalAlignment=\"Top\"\r\n                            Source=\"{Binding To.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            Fill=\"{Binding To.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding To, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                        <TextBlock Grid.Column=\"1\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" Text=\"{Binding To.FullName2, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n\r\n                        <controls:LiveLocationProgress \r\n                            Grid.Column=\"2\"\r\n                            Margin=\"6,0,0,0\"\r\n                            Media=\"{Binding Media}\"\r\n                            VerticalAlignment=\"Center\"\r\n                            Completed=\"LiveLocationProgress_OnCompleted\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </ListBox.ItemTemplate>\r\n        </ListBox>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/LiveLocationsControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows.Input;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class LiveLocationsControl\r\n    {\r\n        public LiveLocationsControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        public event EventHandler<MediaEventArgs> LiveLocationCompleted;\r\n\r\n        private void LiveLocationProgress_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            var progress = sender as LiveLocationProgress;\r\n            if (progress != null)\r\n            {\r\n                RaiseCompleted(new MediaEventArgs{ Media = progress.Media });\r\n            }\r\n        }\r\n\r\n        protected virtual void RaiseCompleted(MediaEventArgs e)\r\n        {\r\n            var handler = LiveLocationCompleted;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n    }\r\n\r\n    public class MediaEventArgs : System.EventArgs\r\n    {\r\n        public TLMessageMediaBase Media { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/MediaPhotoControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.MediaPhotoControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"12\" d:DesignWidth=\"12\">\r\n\r\n    <Grid x:Name=\"Root\" Tap=\"LayoutRoot_OnTap\" Background=\"#66000000\">\r\n        <Image x:Name=\"Photo\" IsHitTestVisible=\"False\" Stretch=\"UniformToFill\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n        <Grid x:Name=\"DownloadIcon\" RenderTransformOrigin=\"0.5,0.5\" IsHitTestVisible=\"False\">\r\n            <Ellipse x:Name=\"DownloadEllipse\" Height=\"64\" Width=\"64\" Fill=\"#7F000000\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n            <Rectangle Width=\"4\" Height=\"24\" Fill=\"White\"/>\r\n            <Polyline StrokeThickness=\"3.5\" Stroke=\"White\" Margin=\"2,0,0,0\" Points=\"0 15 10 25 20 15\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n        </Grid>\r\n        <controls:Progress x:Name=\"Progress\" RenderTransformOrigin=\"0.5,0.5\" IsHitTestVisible=\"False\" Value=\"0\" Margin=\"-12\"/>\r\n        \r\n        <Border x:Name=\"SelectionBorder\" Visibility=\"Collapsed\" BorderThickness=\"3\" BorderBrush=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/MediaPhotoControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class MediaPhotoControl : IMediaControl\r\n    {\r\n        public static readonly DependencyProperty TTLParamsProperty = DependencyProperty.Register(\r\n            \"TTLParams\", typeof(TTLParams), typeof(MediaPhotoControl), new PropertyMetadata(default(TTLParams), OnTTLParamsChanged));\r\n\r\n        private static void OnTTLParamsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaPhotoControl;\r\n            if (control != null)\r\n            {\r\n                if (control._secretPhotoPlaceholder != null)\r\n                {\r\n                    control._secretPhotoPlaceholder.TTLParams = e.NewValue as TTLParams;\r\n                }\r\n            }\r\n        }\r\n\r\n        public TTLParams TTLParams\r\n        {\r\n            get { return (TTLParams) GetValue(TTLParamsProperty); }\r\n            set { SetValue(TTLParamsProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(\r\n            \"IsSelected\", typeof(bool), typeof(MediaPhotoControl), new PropertyMetadata(default(bool), OnIsSelectedChanged));\r\n\r\n        private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaPhotoControl;\r\n            if (control != null)\r\n            {\r\n                control.SelectionBorder.Visibility = (bool) e.NewValue ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return (bool) GetValue(IsSelectedProperty); }\r\n            set { SetValue(IsSelectedProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ProgressScaleProperty = DependencyProperty.Register(\r\n            \"ProgressScale\", typeof(double), typeof(MediaPhotoControl), new PropertyMetadata(default(double), OnProgressScaleChanged));\r\n\r\n        private static void OnProgressScaleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaPhotoControl;\r\n            if (control != null)\r\n            {\r\n                control.Progress.RenderTransform = new ScaleTransform { ScaleX = (double)e.NewValue, ScaleY = (double)e.NewValue };\r\n                control.DownloadIcon.RenderTransform = new ScaleTransform { ScaleX = (double)e.NewValue, ScaleY = (double)e.NewValue };\r\n                if (control._secretPhotoPlaceholder != null)\r\n                {\r\n                    control._secretPhotoPlaceholder.RenderTransform = new ScaleTransform { ScaleX = (double)e.NewValue, ScaleY = (double)e.NewValue };\r\n                }\r\n            }\r\n        }\r\n\r\n        public double ProgressScale\r\n        {\r\n            get { return (double) GetValue(ProgressScaleProperty); }\r\n            set { SetValue(ProgressScaleProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty MediaProperty = DependencyProperty.Register(\r\n            \"Media\", typeof(TLObject), typeof(MediaPhotoControl), new PropertyMetadata(default(TLObject), OnMediaChanged));\r\n\r\n        private static void OnMediaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaPhotoControl;\r\n            if (control != null)\r\n            {\r\n                //System.Diagnostics.Debug.WriteLine(\"  Change Media old={0} new={1}\", e.OldValue != null ? e.OldValue.GetHashCode() : 0, e.NewValue != null ? e.NewValue.GetHashCode() : 0);\r\n                \r\n                var isDownloading = control.DownloadingProgress > 0.0 && control.DownloadingProgress < 1.0;\r\n                var isUploading = control.UploadingProgress > 0.0 && control.UploadingProgress < 1.0;\r\n\r\n                control.SetDownloadIconVisibility(isDownloading || isUploading, control.Photo.Source);\r\n                var mediaPhoto = e.NewValue as TLMessageMediaPhoto70;\r\n                if (mediaPhoto != null)\r\n                {\r\n                    if (mediaPhoto.TTLSeconds != null)\r\n                    {\r\n                        control.GoToSecretMediaState();\r\n                    }\r\n                    else\r\n                    {\r\n                        control.GoToNormalMediaState();\r\n                    }\r\n                }\r\n\r\n                var decryptedMedia = e.NewValue as TLDecryptedMessageMediaBase;\r\n                if (decryptedMedia != null)\r\n                {\r\n                    if (decryptedMedia.TTLSeconds != null && decryptedMedia.TTLSeconds.Value > 0)\r\n                    {\r\n                        control.GoToSecretMediaState();\r\n                    }\r\n                    else\r\n                    {\r\n                        control.GoToNormalMediaState();\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void GoToNormalMediaState()\r\n        {\r\n            Root.Children.Remove(DownloadIcon);\r\n            Root.Children.Remove(Progress);\r\n            if (_secretPhotoPlaceholder != null) Root.Children.Remove(_secretPhotoPlaceholder);\r\n\r\n            Root.Children.Insert(1, Progress);\r\n            Root.Children.Insert(1, DownloadIcon);\r\n        }\r\n\r\n        private SecretPhotoPlaceholder _secretPhotoPlaceholder;\r\n\r\n        private void GoToSecretMediaState()\r\n        {\r\n            Root.Children.Remove(DownloadIcon);\r\n            Root.Children.Remove(Progress);\r\n            if (_secretPhotoPlaceholder != null) Root.Children.Remove(_secretPhotoPlaceholder);\r\n\r\n            _secretPhotoPlaceholder = _secretPhotoPlaceholder ?? new SecretPhotoPlaceholder\r\n            {\r\n                IsHitTestVisible = false,\r\n                ShowHint = false,\r\n                TTLParams = TTLParams,\r\n                RenderTransformOrigin = new Point(0.5, 0.5),\r\n                RenderTransform = new ScaleTransform { ScaleX = ProgressScale, ScaleY = ProgressScale },\r\n                Margin = new Thickness(-12.0),\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                HorizontalAlignment = HorizontalAlignment.Center\r\n            };\r\n\r\n            Root.Children.Insert(1, _secretPhotoPlaceholder);\r\n        }\r\n\r\n        public TLObject Media\r\n        {\r\n            get { return (TLObject)GetValue(MediaProperty); }\r\n            set { SetValue(MediaProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty PreviewSourceProperty = DependencyProperty.Register(\r\n            \"PreviewSource\", typeof(ImageSource), typeof(MediaPhotoControl), new PropertyMetadata(default(ImageSource), OnPreviewSourceChanged));\r\n\r\n        private static void OnPreviewSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaPhotoControl;\r\n            if (control != null)\r\n            {\r\n                //System.Diagnostics.Debug.WriteLine(\"  Change PreviewSource control={0}\", control.DataContext != null ? control.DataContext.GetHashCode() : 0);\r\n                if (control.Source == null) // large image not loaded\r\n                {\r\n                    control.Photo.Source = e.NewValue as ImageSource;\r\n                }\r\n            }\r\n        }\r\n\r\n        public ImageSource PreviewSource\r\n        {\r\n            get { return (ImageSource) GetValue(PreviewSourceProperty); }\r\n            set { SetValue(PreviewSourceProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(\r\n            \"Source\", typeof(ImageSource), typeof(MediaPhotoControl), new PropertyMetadata(default(ImageSource), OnImageSourceChanged));\r\n\r\n        private static void OnImageSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaPhotoControl;\r\n            if (control != null)\r\n            {\r\n                //System.Diagnostics.Debug.WriteLine(\"  Change Source control={0}\", control.DataContext != null ? control.DataContext.GetHashCode() : 0);\r\n                var source = e.NewValue as ImageSource;\r\n\r\n                control.Photo.Source = source;\r\n\r\n                var isDownloading = control.DownloadingProgress > 0.0 && control.DownloadingProgress < 1.0;\r\n                var isUploading = control.UploadingProgress > 0.0 && control.UploadingProgress < 1.0;\r\n\r\n                control.SetDownloadIconVisibility(isDownloading || isUploading, source);\r\n            }\r\n        }\r\n\r\n        private void SetDownloadIconVisibility(bool inProgress, ImageSource source)\r\n        {\r\n            if (!inProgress)\r\n            {\r\n                DownloadIcon.Visibility = source == null || Photo.Source != source\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n            else\r\n            {\r\n                DownloadIcon.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public ImageSource Source\r\n        {\r\n            get { return (ImageSource) GetValue(SourceProperty); }\r\n            set { SetValue(SourceProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty DownloadingProgressProperty = DependencyProperty.Register(\r\n            \"DownloadingProgress\", typeof(double), typeof(MediaPhotoControl), new PropertyMetadata(default(double), OnProgressChanged));\r\n\r\n        public double DownloadingProgress\r\n        {\r\n            get { return (double) GetValue(DownloadingProgressProperty); }\r\n            set { SetValue(DownloadingProgressProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty UploadingProgressProperty = DependencyProperty.Register(\r\n            \"UploadingProgress\", typeof(double), typeof(MediaPhotoControl), new PropertyMetadata(default(double), OnProgressChanged));\r\n\r\n        public double UploadingProgress\r\n        {\r\n            get { return (double) GetValue(UploadingProgressProperty); }\r\n            set { SetValue(UploadingProgressProperty, value); }\r\n        }\r\n\r\n        private static void OnProgressChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaPhotoControl;\r\n            if (control != null)\r\n            {\r\n                var progress = (double)e.NewValue;\r\n                var source = control.Source;\r\n\r\n                //System.Diagnostics.Debug.WriteLine(\"newValue=\" + newValue);\r\n                control.Progress.Value = progress;\r\n                if (control._secretPhotoPlaceholder != null)\r\n                {\r\n                    control._secretPhotoPlaceholder.DownloadingProgress = progress;\r\n                }\r\n\r\n                var inProgress = progress > 0.0 && progress < 1.0;\r\n\r\n                control.SetDownloadIconVisibility(inProgress, source);\r\n            }\r\n        }\r\n\r\n        public MediaPhotoControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        public event EventHandler CancelDownloading;\r\n\r\n        protected virtual void RaiseCancelDownloading()\r\n        {\r\n            var handler = CancelDownloading;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler CancelUploading;\r\n\r\n        protected virtual void RaiseCancelUploading()\r\n        {\r\n            var handler = CancelUploading;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void LayoutRoot_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (DownloadingProgress > 0.0 && DownloadingProgress < 1.0)\r\n            {\r\n                e.Handled = true;\r\n                RaiseCancelDownloading();\r\n            }\r\n            else if (UploadingProgress > 0.0 && UploadingProgress < 1.0)\r\n            {\r\n                e.Handled = true;\r\n                RaiseCancelUploading();\r\n            }\r\n        }\r\n    }\r\n\r\n    public interface IMediaControl\r\n    {\r\n        TLObject Media { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/MediaVideoControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.MediaVideoControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"Root\" Tap=\"LayoutRoot_OnTap\" Background=\"#66000000\">\r\n        <Image x:Name=\"Video\" IsHitTestVisible=\"False\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" />\r\n\r\n        <dialogs:DocumentTileControl \r\n            x:Name=\"Progress\" TileBrush=\"#7F000000\"\r\n            HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"\r\n            Width=\"64\" Height=\"64\" Margin=\"-12\"\r\n            Music=\"True\" RenderTransformOrigin=\"0.5,0.5\" IsHitTestVisible=\"False\"/>\r\n\r\n        <Border x:Name=\"SelectionBorder\" Visibility=\"Collapsed\" BorderThickness=\"3\" BorderBrush=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/MediaVideoControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.TL;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class MediaVideoControl : IMediaControl\r\n    {\r\n        public static readonly DependencyProperty TTLParamsProperty = DependencyProperty.Register(\r\n            \"TTLParams\", typeof(TTLParams), typeof(MediaVideoControl), new PropertyMetadata(default(TTLParams), OnTTLParamsChanged));\r\n\r\n        private static void OnTTLParamsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaVideoControl;\r\n            if (control != null)\r\n            {\r\n                if (control._secretPhotoPlaceholder != null)\r\n                {\r\n                    control._secretPhotoPlaceholder.TTLParams = e.NewValue as TTLParams;\r\n                }\r\n            }\r\n        }\r\n\r\n        public TTLParams TTLParams\r\n        {\r\n            get { return (TTLParams)GetValue(TTLParamsProperty); }\r\n            set { SetValue(TTLParamsProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty StretchProperty = DependencyProperty.Register(\r\n            \"Stretch\", typeof(Stretch), typeof(MediaVideoControl), new PropertyMetadata(default(Stretch), OnStretchChanged));\r\n\r\n        private static void OnStretchChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaVideoControl;\r\n            if (control != null)\r\n            {\r\n                control.Video.Stretch = (Stretch) e.NewValue;\r\n            }\r\n        }\r\n\r\n        public Stretch Stretch\r\n        {\r\n            get { return (Stretch) GetValue(StretchProperty); }\r\n            set { SetValue(StretchProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(\r\n            \"IsSelected\", typeof(bool), typeof(MediaVideoControl), new PropertyMetadata(default(bool), OnIsSelectedChanged));\r\n\r\n        private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaVideoControl;\r\n            if (control != null)\r\n            {\r\n                control.SelectionBorder.Visibility = (bool)e.NewValue ? Visibility.Visible : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return (bool)GetValue(IsSelectedProperty); }\r\n            set { SetValue(IsSelectedProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ProgressScaleProperty = DependencyProperty.Register(\r\n            \"ProgressScale\", typeof(double), typeof(MediaVideoControl), new PropertyMetadata(default(double), OnProgressScaleChanged));\r\n\r\n        private static void OnProgressScaleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaVideoControl;\r\n            if (control != null)\r\n            {\r\n                control.Progress.RenderTransform = new ScaleTransform { ScaleX = (double)e.NewValue, ScaleY = (double)e.NewValue };\r\n            }\r\n        }\r\n\r\n        public double ProgressScale\r\n        {\r\n            get { return (double)GetValue(ProgressScaleProperty); }\r\n            set { SetValue(ProgressScaleProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty MediaProperty = DependencyProperty.Register(\r\n            \"Media\", typeof(TLObject), typeof(MediaVideoControl), new PropertyMetadata(default(TLObject), OnMediaChanged));\r\n\r\n        private static void OnMediaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaVideoControl;\r\n            if (control != null)\r\n            {\r\n                //System.Diagnostics.Debug.WriteLine(\"  Change Media old={0} new={1}\", e.OldValue != null ? e.OldValue.GetHashCode() : 0, e.NewValue != null ? e.NewValue.GetHashCode() : 0);\r\n                //control.DownloadIcon.Visibility = Visibility.Visible;\r\n                var mediaPhoto = e.NewValue as TLMessageMediaDocument70;\r\n                if (mediaPhoto != null)\r\n                {\r\n                    if (mediaPhoto.TTLSeconds != null)\r\n                    {\r\n                        control.GoToSecretMediaState();\r\n                    }\r\n                    else\r\n                    {\r\n                        control.GoToNormalMediaState();\r\n                    }\r\n                }\r\n\r\n                var decryptedMedia = e.NewValue as TLDecryptedMessageMediaBase;\r\n                if (decryptedMedia != null)\r\n                {\r\n                    if (decryptedMedia.TTLSeconds != null && decryptedMedia.TTLSeconds.Value > 0)\r\n                    {\r\n                        control.GoToSecretMediaState();\r\n                    }\r\n                    else\r\n                    {\r\n                        control.GoToNormalMediaState();\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void GoToNormalMediaState()\r\n        {\r\n            Root.Children.Remove(Progress);\r\n            if (_secretPhotoPlaceholder != null) Root.Children.Remove(_secretPhotoPlaceholder);\r\n\r\n            Root.Children.Insert(1, Progress);\r\n        }\r\n\r\n        private SecretPhotoPlaceholder _secretPhotoPlaceholder;\r\n\r\n        private void GoToSecretMediaState()\r\n        {\r\n            Root.Children.Remove(Progress);\r\n            if (_secretPhotoPlaceholder != null) Root.Children.Remove(_secretPhotoPlaceholder);\r\n\r\n            _secretPhotoPlaceholder = _secretPhotoPlaceholder ?? new SecretPhotoPlaceholder\r\n            {\r\n                IsHitTestVisible = false,\r\n                ShowHint = false,\r\n                TTLParams = TTLParams,\r\n                RenderTransformOrigin = new Point(0.5, 0.5),\r\n                RenderTransform = new ScaleTransform { ScaleX = ProgressScale, ScaleY = ProgressScale },\r\n                Margin = new Thickness(-12.0),\r\n                VerticalAlignment = VerticalAlignment.Center,\r\n                HorizontalAlignment = HorizontalAlignment.Center\r\n            };\r\n\r\n            Root.Children.Insert(1, _secretPhotoPlaceholder);\r\n        }\r\n\r\n        public TLObject Media\r\n        {\r\n            get { return (TLObject)GetValue(MediaProperty); }\r\n            set { SetValue(MediaProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(\r\n            \"Source\", typeof(ImageSource), typeof(MediaVideoControl), new PropertyMetadata(default(ImageSource), OnSourceChanged));\r\n\r\n        private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaVideoControl;\r\n            if (control != null)\r\n            {\r\n                control.Video.Source = e.NewValue as ImageSource;\r\n            }\r\n        }\r\n\r\n        public ImageSource Source\r\n        {\r\n            get { return (ImageSource) GetValue(SourceProperty); }\r\n            set { SetValue(SourceProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty DownloadIconVisibilityProperty = DependencyProperty.Register(\r\n            \"DownloadIconVisibility\", typeof(Visibility), typeof(MediaVideoControl), new PropertyMetadata(default(Visibility), OnDownloadIconVisibilityChanged));\r\n\r\n        private static void OnDownloadIconVisibilityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaVideoControl;\r\n            if (control != null)\r\n            {\r\n                control.Progress.DownloadIconVisibility = (Visibility) e.NewValue;\r\n            }\r\n        }\r\n\r\n        public Visibility DownloadIconVisibility\r\n        {\r\n            get { return (Visibility) GetValue(DownloadIconVisibilityProperty); }\r\n            set { SetValue(DownloadIconVisibilityProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty DownloadingProgressProperty = DependencyProperty.Register(\r\n            \"DownloadingProgress\", typeof(double), typeof(MediaVideoControl), new PropertyMetadata(default(double), OnProgressChanged));\r\n\r\n        public double DownloadingProgress\r\n        {\r\n            get { return (double) GetValue(DownloadingProgressProperty); }\r\n            set { SetValue(DownloadingProgressProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty UploadingProgressProperty = DependencyProperty.Register(\r\n            \"UploadingProgress\", typeof(double), typeof(MediaVideoControl), new PropertyMetadata(default(double), OnProgressChanged));\r\n\r\n        public double UploadingProgress\r\n        {\r\n            get { return (double) GetValue(UploadingProgressProperty); }\r\n            set { SetValue(UploadingProgressProperty, value); }\r\n        }\r\n\r\n        private static void OnProgressChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as MediaVideoControl;\r\n            if (control != null)\r\n            {\r\n                var progress = (double)e.NewValue;\r\n\r\n                control.Progress.DownloadingProgress = progress;\r\n                if (control._secretPhotoPlaceholder != null)\r\n                {\r\n                    control._secretPhotoPlaceholder.DownloadingProgress = progress;\r\n                }\r\n            }\r\n        }\r\n\r\n        public MediaVideoControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        public event EventHandler CancelDownloading;\r\n\r\n        protected virtual void RaiseCancelDownloading()\r\n        {\r\n            var handler = CancelDownloading;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler CancelUploading;\r\n\r\n        protected virtual void RaiseCancelUploading()\r\n        {\r\n            var handler = CancelUploading;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void LayoutRoot_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (DownloadingProgress > 0.0 && DownloadingProgress < 1.0)\r\n            {\r\n                e.Handled = true;\r\n                RaiseCancelDownloading();\r\n            }\r\n            else if (UploadingProgress > 0.0 && UploadingProgress < 1.0)\r\n            {\r\n                e.Handled = true;\r\n                RaiseCancelUploading();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/MessageControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.MessageControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:dialogs=\"clr-namespace:TelegramClient.Views.Dialogs\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:templateSelectors=\"clr-namespace:TelegramClient.Helpers.TemplateSelectors\"\r\n    micro:View.ApplyConventions=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"FailedMessageBackgroundBrush\" Color=\"#FFFCE4E6\"/>\r\n        <SolidColorBrush x:Key=\"FailedMessageBorderBrush\" Color=\"#33ED4C59\"/>\r\n        <SolidColorBrush x:Key=\"FailedMessageForegroundBrush\" Color=\"#FFCD7C83\"/>\r\n        \r\n        <SolidColorBrush x:Key=\"ServiceMessageBackgroundBrush\" Color=\"#59597289\"/>\r\n        <SolidColorBrush x:Key=\"ServiceMessageBorderBrush\" Color=\"#59597289\"/>\r\n        <SolidColorBrush x:Key=\"ServiceMessageForegroundBrush\" Color=\"#FFFFFFFF\"/>\r\n        \r\n        <SolidColorBrush x:Key=\"OutputBackgroundBrushLight\" Color=\"#FFE3F4FF\"/>\r\n        <SolidColorBrush x:Key=\"OutputBorderBrushLight\" Color=\"#6686A9C9\"/>\r\n        <SolidColorBrush x:Key=\"OutputSubtleBrushLight\" Color=\"#FF7C9FBA\"/>\r\n        <SolidColorBrush x:Key=\"OutputForegroundBrushLight\" Color=\"#FF000000\"/>\r\n        <SolidColorBrush x:Key=\"InputBackgroundBrushLight\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#4D86A9C9\"/>\r\n        <SolidColorBrush x:Key=\"InputSubtleBrushLight\" Color=\"#FF93989D\"/>\r\n        <SolidColorBrush x:Key=\"InputForegroundBrushLight\" Color=\"#FF000000\"/>\r\n        <SolidColorBrush x:Key=\"StickerFooterBackgroundBrushLight\" Color=\"#49496A95\"/>\r\n        <SolidColorBrush x:Key=\"StickerFooterSubtleBrushLight\" Color=\"#FFFFFFFF\"/>\r\n\r\n        <SolidColorBrush x:Key=\"OutputBackgroundBrushDark\" Color=\"#FF2B2B2B\"/>\r\n        <SolidColorBrush x:Key=\"OutputBorderBrushDark\" Color=\"#0086A9C9\"/>\r\n        <SolidColorBrush x:Key=\"OutputSubtleBrushDark\" Color=\"#FFA0A0A0\"/>\r\n        <SolidColorBrush x:Key=\"OutputForegroundBrushDark\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"InputBackgroundBrushDark\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#0086A9C9\"/>\r\n        <SolidColorBrush x:Key=\"InputSubtleBrushDark\" Color=\"#FF93989D\"/>\r\n        <SolidColorBrush x:Key=\"InputForegroundBrushDark\" Color=\"#FF000000\"/>\r\n        <SolidColorBrush x:Key=\"StickerFooterBackgroundDark\" Color=\"#49496A95\"/>\r\n        <SolidColorBrush x:Key=\"StickerFooterBackgroundBrushDark\" Color=\"#49496A95\"/>\r\n        <SolidColorBrush x:Key=\"StickerFooterSubtleBrushDark\" Color=\"#FFFFFFFF\"/>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"MainItemGrid2\">\r\n\r\n        <Grid x:Name=\"MainItemGrid\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\" />\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"18\"/>\r\n                <ColumnDefinition x:Name=\"BeforeLastColumn\" Width=\"Auto\"/>\r\n                <ColumnDefinition x:Name=\"LastColumn\" Width=\"*\"/>\r\n                <ColumnDefinition Width=\"18\"/>\r\n                <ColumnDefinition Width=\"Auto\" />\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"6\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <views:ConversationTileControl \r\n                x:Name=\"Tile\"\r\n                Tap=\"Tile_OnTap\"\r\n                Grid.Column=\"1\" Grid.Row=\"1\"\r\n                Margin=\"18,0,4,0\" VerticalAlignment=\"Top\"\r\n                Size=\"45\" LabelFontSize=\"19\"\r\n                Source=\"{Binding From.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                Fill=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                Text=\"{Binding From, Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n            <Border x:Name=\"CornerBorder\" Grid.Column=\"2\" Grid.Row=\"1\" Margin=\"0,0,0,6\" BorderBrush=\"{StaticResource InputBorderBrushLight}\" BorderThickness=\"0,0,1,0\"/>\r\n            <Path x:Name=\"Corner\" \r\n                  Grid.Column=\"2\" Grid.Row=\"1\" \r\n                  HorizontalAlignment=\"Right\" \r\n                  Margin=\"0,12,-1,0\" \r\n                  VerticalAlignment=\"Top\" \r\n                  Data=\"F1 M12,12 L0,0 L12,0\" \r\n                  Width=\"12\" Height=\"12\" \r\n                  Stretch=\"Fill\" \r\n                  Fill=\"{StaticResource InputBackgroundBrushLight}\" \r\n                  StrokeThickness=\"1\" \r\n                  Stroke=\"{StaticResource InputBorderBrushLight}\"\r\n                  RenderTransformOrigin=\"0.5, 0.5\">\r\n                <Path.RenderTransform>\r\n                    <ScaleTransform x:Name=\"PathScaleTransform\" ScaleX=\"1\"/>\r\n                </Path.RenderTransform>\r\n            </Path>\r\n\r\n            <Border x:Name=\"MainBorder\" Grid.Column=\"3\" Grid.Row=\"1\" Margin=\"0,0,0,6\" Background=\"{StaticResource InputBackgroundBrushLight}\" BorderBrush=\"{StaticResource InputBorderBrushLight}\" BorderThickness=\"0,1,1,1\">\r\n                <StackPanel x:Name=\"Panel\">\r\n                    <Border x:Name=\"Header\" Margin=\"0,0,0,-6\" MaxWidth=\"335\" Background=\"{StaticResource InputBackgroundBrushLight}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Visibility=\"Collapsed\">\r\n                        <StackPanel x:Name=\"CaptionPanel\" Margin=\"12,6\">\r\n                            <toolkit:WrapPanel x:Name=\"FromLabelPanel\">\r\n                                <TextBlock x:Name=\"FromLabel\"\r\n                                    Text=\"{Binding From.FullName, Converter={StaticResource NonBreakingStringConverter}}\"\r\n                                    Foreground=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                                    MaxWidth=\"293\"\r\n                                    TextTrimming=\"WordEllipsis\"\r\n                                    Margin=\"0,2,0,0\"\r\n                                    Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n                            </toolkit:WrapPanel>\r\n                            \r\n                            <!--<Grid x:Name=\"FromLabelPanel\" HorizontalAlignment=\"Stretch\" MaxWidth=\"299\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <TextBlock x:Name=\"FromLabel\"\r\n                                    Text=\"{Binding From.FullName, Converter={StaticResource NonBreakingStringConverter}}\"\r\n                                    Foreground=\"{Binding From.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                                    MaxWidth=\"293\"\r\n                                    TextTrimming=\"WordEllipsis\"\r\n                                    Margin=\"0,2,0,0\"\r\n                                    Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n                                <TextBlock x:Name=\"AdminLabel\" Grid.Column=\"1\"\r\n                                    Text=\"{Binding Resources.Admin, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"\r\n                                    MaxWidth=\"293\"\r\n                                    TextTrimming=\"WordEllipsis\"\r\n                                    Margin=\"0,2,0,0\"\r\n                                    Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n                            </Grid>-->\r\n                            <Grid x:Name=\"FwdFromGrid\" Background=\"Transparent\" micro:Message.Attach=\"[Event Tap] = [Action OpenFwdContactDetails($DataContext)]\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <TextBlock Margin=\"0\" Text=\"{Binding Resources.ForwardedMessage, Source={StaticResource Strings}, StringFormat='\\{0\\} '}\" FontSize=\"20\" TextWrapping=\"NoWrap\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramTextAccentBrush}\"/>\r\n                                <TextBlock Grid.Column=\"1\" x:Name=\"FwdFromLabel\" Text=\"{Binding FwdFrom.FullName, Converter={StaticResource NonBreakingStringConverter}}\" FontWeight=\"SemiBold\" FontSize=\"20\" TextWrapping=\"NoWrap\" TextTrimming=\"WordEllipsis\" Foreground=\"{StaticResource TelegramTextAccentBrush}\"/>\r\n                            </Grid>\r\n                            <TextBlock \r\n                                x:Name=\"ViaBotGrid\"\r\n                                Tap=\"ViaBot_Tap\" \r\n                                Text=\"{Binding ViaBot, Converter={StaticResource ViaBotToStringConverter}}\" \r\n                                Margin=\"0,-6,0,0\" \r\n                                Foreground=\"{StaticResource TelegramTextAccentBrush}\" \r\n                                FontSize=\"20\"/>\r\n                            <ContentControl \r\n                                x:Name=\"ReplyContent\"\r\n                                Canvas.ZIndex=\"2\"\r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenReply($DataContext)]\" \r\n                                Content=\"{Binding ReplyInfo.Reply}\" \r\n                                Margin=\"0\"\r\n                                ContentTemplate=\"{Binding ReplyInfo, Converter={StaticResource ReplyTemplateSelector}}\"\r\n                                HorizontalContentAlignment=\"Stretch\"/>\r\n                        </StackPanel>\r\n                    </Border>\r\n                    <Grid x:Name=\"MessageGrid\" Canvas.ZIndex=\"2\" Margin=\"0,6,0,0\">\r\n                        <Grid>\r\n                            <emojiPanel:TelegramRichTextBox\r\n                                x:Name=\"InputMessage\"\r\n                                MaxHeight=\"1500\"\r\n                                MinWidth=\"100\"\r\n                                MaxWidth=\"335\"\r\n                                Entities=\"{Binding Entities}\"\r\n                                Text=\"{Binding Message}\"\r\n                                FooterFontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"\r\n                                emojiPanel:BrowserNavigationService.Message=\"{Binding}\"\r\n                                TextScaleFactor=\"{Binding TextScaleFactor, Source={StaticResource ScaledText}}\"\r\n                                MoreElement=\"{Binding ElementName=MorePanel}\"\r\n                                FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                                Style=\"{StaticResource MessageBodyTelegramRichTextStyle}\"/>\r\n                            <Border x:Name=\"MorePanel\" Background=\"{StaticResource InputBackgroundBrushLight}\" VerticalAlignment=\"Bottom\" Canvas.ZIndex=\"3\" Visibility=\"Collapsed\" Tap=\"MorePanel_OnTap\">\r\n                                <TextBlock Canvas.ZIndex=\"4\"\r\n                                Text=\"{Binding Resources.More, Source={StaticResource Strings}, StringFormat='\\{0\\}...'}\" \r\n                                TextDecorations=\"Underline\" \r\n                                Margin=\"12,-6,12,0\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" \r\n                                FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"\r\n                                VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Left\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Grid x:Name=\"MediaGrid\" Background=\"Transparent\">\r\n                        <ContentControl\r\n                            x:Name=\"MediaContentControl\"\r\n                            MaxHeight=\"1500\"\r\n                            Background=\"Transparent\"\r\n                            Tap=\"MediaContentControl_OnTap\"\r\n                            Margin=\"12,0,12,0\"\r\n                            Foreground=\"Red\"\r\n                            HorizontalContentAlignment=\"Stretch\"\r\n                            HorizontalAlignment=\"Stretch\"\r\n                            Content=\"{Binding Media}\"\r\n                            ContentTemplate=\"{Binding Media, Converter={StaticResource MediaTemplateSelector}}\"/>\r\n                    </Grid>\r\n                    <Border x:Name=\"Footer\"\r\n                        MaxWidth=\"335\"\r\n                        Margin=\"0,-1,0,0\" \r\n                        Canvas.ZIndex=\"1\" \r\n                        VerticalAlignment=\"Bottom\"\r\n                        Background=\"{StaticResource InputBackgroundBrushLight}\"\r\n                        IsHitTestVisible=\"False\">\r\n                        <ContentControl x:Name=\"FooterContent\" HorizontalContentAlignment=\"Stretch\">\r\n                            <Grid x:Name=\"FooterContentGrid\" Margin=\"6,2,6,6\" HorizontalAlignment=\"Right\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <TextBlock x:Name=\"AuthorLabel\" Grid.Column=\"2\" Margin=\"0,-1,0,2\"\r\n                                    Text=\"{Binding Author, Converter={StaticResource NonBreakingStringConverter}}\"\r\n                                    TextAlignment=\"Right\"\r\n                                    TextTrimming=\"WordEllipsis\" TextWrapping=\"NoWrap\" \r\n                                    FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"/>\r\n                                <Grid x:Name=\"ViewsGrid\" Grid.Column=\"3\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition/>\r\n                                        <ColumnDefinition/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Viewbox Height=\"{Binding DefaultSystemIconSize, Source={StaticResource ScaledText}}\">\r\n                                        <Path x:Name=\"ViewsIcon\" StrokeThickness=\"1.5\" Margin=\"6,0,0,0\" Data=\"M9.16666667,0 C5,0 1.44166667,2.59166667 0,6.25 C1.44166667,9.90833333 5,12.5 9.16666667,12.5 C13.3333333,12.5 16.8916667,9.90833333 18.3333333,6.25 C16.8916667,2.59166667 13.3333333,0 9.16666667,0 Z M9.16833337,9.58666674 C7.32741335,9.58666674 5.83333333,8.09258673 5.83333333,6.2516667 C5.83333333,4.41074668 7.32741335,2.91666667 9.16833337,2.91666667 C11.0092534,2.91666667 12.5033334,4.41074668 12.5033334,6.2516667 C12.5033334,8.09258673 11.0092534,9.58666674 9.16833337,9.58666674 Z\">\r\n                                            <Path.RenderTransform>\r\n                                                <TranslateTransform X=\"0\" Y=\"-1\"/>\r\n                                            </Path.RenderTransform>\r\n                                        </Path>\r\n                                    </Viewbox>\r\n                                    <!--<Image \r\n                                        Margin=\"6,0,0,0\" \r\n                                        Height=\"{Binding DefaultSystemIconSize, Source={StaticResource ScaledText}}\" \r\n                                        Stretch=\"UniformToFill\" \r\n                                        Source=\"/Images/Messages/message.state.views-WXGA.png\"/>-->\r\n                                    <TextBlock x:Name=\"ViewsLabel\" Grid.Column=\"1\" Margin=\"0,-1,0,2\"\r\n                                        Text=\"{Binding Views, Converter={StaticResource MessageViewsConverter}, StringFormat=' \\{0\\},'}\"\r\n                                        FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"/>\r\n                                </Grid>\r\n                                <TextBlock x:Name=\"EditLabel\" Grid.Column=\"4\" Margin=\"0,2\" Visibility=\"{Binding EditDateVisibility}\"\r\n                                    Text=\" \"\r\n                                    FontSize=\"{Binding DefaultSystemSegoeUISymbolFontSize, Source={StaticResource ScaledText}}\"\r\n                                    FontFamily=\"Segoe UI Symbol\"/>\r\n                                <TextBlock Grid.Column=\"5\" Margin=\"0,-1,0,2\" \r\n                                    Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' \\{0\\} '}\"\r\n                                    FontSize=\"{Binding DefaultSystemFontSize, Source={StaticResource ScaledText}}\"/>\r\n                                <Viewbox Grid.Column=\"6\" Height=\"{Binding DefaultSystemIconSize, Source={StaticResource ScaledText}}\">\r\n                                    <controls:StatusControl\r\n                                        x:Name=\"Status\"\r\n                                        Status=\"{Binding Status}\"\r\n                                        Fill=\"{StaticResource OutputSubtleBrushLight}\"/>\r\n                                </Viewbox>\r\n                            </Grid>\r\n                        </ContentControl>\r\n                    </Border>\r\n                </StackPanel>\r\n            </Border>\r\n\r\n            <dialogs:CommandsControl x:Name=\"Commands\" Grid.Row=\"2\" Grid.Column=\"3\" HorizontalAlignment=\"Stretch\" Inline=\"True\" MaxWidth=\"335\" Margin=\"0,0,0,6\" Visibility=\"Collapsed\" ReplyMarkup=\"{Binding ReplyMarkup}\" ButtonClick=\"CommandsControl_OnButtonClick\"/>\r\n\r\n            <Button x:Name=\"ShareButton\" Grid.Row=\"1\" Grid.Column=\"4\" Margin=\"6,0,-6,6\"\r\n                VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Left\" \r\n                Tap=\"ShareButton_OnTap\" Background=\"{StaticResource ServiceMessageBackgroundBrush}\"\r\n                Style=\"{StaticResource EmptyButtonStyle}\">\r\n                <Image x:Name=\"ShereButtonImage\" Width=\"20\" Stretch=\"Uniform\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                    <Image.RenderTransform>\r\n                        <TranslateTransform Y=\"-2\"/>\r\n                    </Image.RenderTransform>\r\n                </Image>\r\n            </Button>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/MessageControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Windows.Phone.Media.Devices;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Views.Dialogs;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class MessageControl\r\n    {\r\n        //~MessageControl()\r\n        //{\r\n            \r\n        //}\r\n\r\n        public static readonly DependencyProperty ShareButtonContextMenuProperty = DependencyProperty.Register(\r\n            \"ShareButtonContextMenu\", typeof (ContextMenu), typeof (MessageControl), new PropertyMetadata(default(ContextMenu), OnShareButtonContextMenuChanged));\r\n\r\n        private static void OnShareButtonContextMenuChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var messageControl = d as MessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                ContextMenuService.SetContextMenu(messageControl.ShareButton, e.NewValue as ContextMenu);\r\n            }\r\n        }\r\n\r\n        public ContextMenu ShareButtonContextMenu\r\n        {\r\n            get { return (ContextMenu) GetValue(ShareButtonContextMenuProperty); }\r\n            set { SetValue(ShareButtonContextMenuProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty MessageProperty = DependencyProperty.Register(\r\n            \"Message\", typeof (TLMessageBase), typeof (MessageControl), new PropertyMetadata(default(TLMessageBase), OnMessageChanged));\r\n\r\n        private static void OnMessageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var messageControl = d as MessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                OnMessageChangedInternal(messageControl, e.NewValue as TLMessageBase);\r\n            }\r\n        }\r\n\r\n        private static void OnMessageChangedInternal(MessageControl messageControl, TLMessageBase newMessage)\r\n        {\r\n            messageControl._isChannelMessage = false;\r\n\r\n            messageControl.SetupBinding(newMessage);\r\n\r\n            var messageCommon = newMessage as TLMessageCommon;\r\n            if (messageCommon != null)\r\n            {\r\n                var showAsService = IsServiceMessage(messageCommon);\r\n                if (!showAsService)\r\n                {\r\n                    messageControl.ToMessageTemplate(messageCommon);\r\n                }\r\n                else\r\n                {\r\n                    messageControl.ToServiceTemplate(messageCommon);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                messageControl.ToEmptyTemplate();\r\n            }\r\n        }\r\n\r\n        private void ToMessageTemplate(TLMessageCommon message)\r\n        {\r\n            DrawBubble(message);\r\n        }\r\n\r\n        private static bool GetIsChannelMessage(TLMessageCommon messageCommon)\r\n        {\r\n            var message = messageCommon as TLMessage;\r\n            if (message != null)\r\n            {\r\n                var message40 = message as TLMessage40;\r\n                if (message40 != null)\r\n                {\r\n                    if (message40.FromId == null || message40.FromId.Value < 0) return true;\r\n\r\n                    if (message40.ToId is TLPeerChannel) // with signatures\r\n                    {\r\n                        var channel = IoC.Get<ICacheService>().GetChat(message40.ToId.Id) as TLChannel;\r\n                        if (channel != null && !channel.IsMegaGroup)\r\n                        {\r\n                            return true;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static bool IsDocument(TLMessage message)\r\n        {\r\n            if (message == null) return false;\r\n\r\n            var mediaDocument = message.Media as TLMessageMediaDocument45;\r\n            if (mediaDocument == null) return false;\r\n\r\n            var document = mediaDocument.Document as IAttributes;\r\n            if (document == null) return false;\r\n\r\n            foreach (var attribute in document.Attributes)\r\n            {\r\n                if (attribute is TLDocumentAttributeAnimated\r\n                    || attribute is TLDocumentAttributeSticker\r\n                    || attribute is TLDocumentAttributeVideo\r\n                    )\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                var documentAttributeAudio = attribute as TLDocumentAttributeAudio46;\r\n                if (documentAttributeAudio != null && documentAttributeAudio.Voice)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private static bool IsServiceMessage(TLMessageBase messageBase)\r\n        {\r\n            var messageService = messageBase as TLMessageService;\r\n            var phoneCall = messageService != null && messageService.Action is TLMessageActionPhoneCall;\r\n            var mediaExpired = messageBase != null && messageBase.IsExpired();\r\n            var serviceMessage = (messageService != null && !phoneCall) || mediaExpired;\r\n\r\n            return serviceMessage;\r\n        }\r\n\r\n        private static bool IsSelfInputMessage(TLMessageCommon messageCommon)\r\n        {\r\n            var message = messageCommon as TLMessage73;\r\n            if (message != null && message.IsSelf())\r\n            {\r\n                var fwdHeader = message.FwdHeader as TLMessageFwdHeader73;\r\n                if (fwdHeader != null)\r\n                {\r\n                    var user = fwdHeader.From as TLUser;\r\n                    if (user == null || !user.IsSelf)\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void DrawBubble(TLMessageCommon messageCommon)\r\n        {\r\n            //System.Diagnostics.Debug.WriteLine(\"DrawBubble id=\" + messageCommon.Index);\r\n\r\n            var isLightTheme = (Visibility) Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            var message = messageCommon as TLMessage48;\r\n            var messageService = messageCommon as TLMessageService;\r\n            var showAsServiceMessage = IsServiceMessage(messageCommon);\r\n            var unreadSeparator = messageService != null && messageService.Action is TLMessageActionUnreadMessages;\r\n            var sticker = message != null && message.IsSticker();\r\n            var photo = message != null && message.Media is TLMessageMediaPhoto;\r\n            var grouped = message != null && message.Media is TLMessageMediaGroup;\r\n            var roundVideo = message != null && message.IsRoundVideo();\r\n\r\n            _isChannelMessage = GetIsChannelMessage(messageCommon);\r\n            var output = GetOutput(messageCommon);\r\n\r\n            FromLabel.Visibility = (message != null && !output && (message.ToId is TLPeerChannel || message.ToId is TLPeerChat || message.ToId is TLPeerBroadcast) && !sticker && !photo && !grouped) || IsSelfInputMessage(message)\r\n                ? Visibility.Visible \r\n                : Visibility.Collapsed;\r\n\r\n            Tile.Visibility = (message != null && !output && (message.ToId is TLPeerChannel || message.ToId is TLPeerChat || message.ToId is TLPeerBroadcast) && !_isChannelMessage) || IsSelfInputMessage(message)\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n\r\n            SetBackgroundAndBorder(messageCommon);\r\n\r\n            Brush foreground;\r\n            if (showAsServiceMessage)\r\n            {\r\n                foreground = (Brush)Resources[\"ServiceMessageForegroundBrush\"];\r\n            }\r\n            else\r\n            {\r\n                foreground = isLightTheme\r\n                    ? (output\r\n                        ? (Brush)Resources[\"OutputForegroundBrushLight\"]\r\n                        : (Brush)Resources[\"InputForegroundBrushLight\"])\r\n                    : (output\r\n                        ? (Brush)Resources[\"OutputForegroundBrushDark\"]\r\n                        : (Brush)Resources[\"InputForegroundBrushDark\"]);            \r\n            }   \r\n\r\n            Brush footerForeground;\r\n            if (!sticker)\r\n            {\r\n                footerForeground = isLightTheme\r\n                ? (output\r\n                    ? (Brush)Resources[\"OutputSubtleBrushLight\"]\r\n                    : (Brush)Resources[\"InputSubtleBrushLight\"])\r\n                : (output\r\n                    ? (Brush)Resources[\"OutputSubtleBrushDark\"]\r\n                    : (Brush)Resources[\"InputSubtleBrushDark\"]);\r\n            }\r\n            else\r\n            {\r\n                footerForeground = isLightTheme\r\n                    ? (Brush)Resources[\"StickerFooterSubtleBrushLight\"]\r\n                    : (Brush)Resources[\"StickerFooterSubtleBrushDark\"];\r\n            }\r\n\r\n            Brush footerBackground;\r\n            if (!sticker)\r\n            {\r\n                footerBackground = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n            else\r\n            {\r\n                footerBackground = isLightTheme\r\n                    ? (Brush)Resources[\"StickerFooterBackgroundBrushLight\"]\r\n                    : (Brush)Resources[\"StickerFooterBackgroundBrushDark\"];\r\n            }\r\n\r\n            Foreground = foreground;\r\n            InputMessage.SetForeground(foreground);\r\n\r\n            var beforeLastGridLength = output && !showAsServiceMessage\r\n                ? new GridLength(1.0, GridUnitType.Star)\r\n                : GridLength.Auto;\r\n\r\n            var lastGridLength = output && !showAsServiceMessage\r\n                ? GridLength.Auto\r\n                : new GridLength(1.0, GridUnitType.Star);\r\n\r\n            var bubbleGridColumn = output && !showAsServiceMessage\r\n                ? 4\r\n                : 3;\r\n\r\n            var cornerGridColumn = output && !showAsServiceMessage\r\n                ? 5\r\n                : 2;\r\n\r\n            var commandsGridColumn = bubbleGridColumn;\r\n\r\n            Corner.Margin = output\r\n                ? new Thickness(-1.0, 12.0, 0.0, 0.0)\r\n                : new Thickness(0.0, 12.0, -1.0, 0.0);\r\n            Corner.HorizontalAlignment = output\r\n                ? HorizontalAlignment.Left\r\n                : HorizontalAlignment.Right;\r\n            PathScaleTransform.ScaleX = output ? -1.0 : 1.0;\r\n            Corner.Visibility = showAsServiceMessage ? Visibility.Collapsed : Visibility.Visible;\r\n            CornerBorder.Visibility = showAsServiceMessage ? Visibility.Collapsed : Visibility.Visible;\r\n            if (unreadSeparator)\r\n            {\r\n                MainBorder.Margin = new Thickness(-18.0, 0.0, -18.0, 6.0);\r\n                MainBorder.HorizontalAlignment = HorizontalAlignment.Stretch;\r\n                Panel.HorizontalAlignment = HorizontalAlignment.Center;\r\n            }\r\n            else if (showAsServiceMessage)\r\n            {\r\n                MainBorder.Margin = new Thickness(0.0, 0.0, 0.0, 6.0);\r\n                MainBorder.HorizontalAlignment = HorizontalAlignment.Center;\r\n                Panel.HorizontalAlignment = HorizontalAlignment.Center;\r\n            }\r\n            else\r\n            {\r\n                MainBorder.Margin = new Thickness(0.0, 0.0, 0.0, 6.0);\r\n                MainBorder.HorizontalAlignment = HorizontalAlignment.Left;\r\n                Panel.HorizontalAlignment = HorizontalAlignment.Left;\r\n            }\r\n            Grid.SetColumnSpan(MainBorder, showAsServiceMessage ? 2 : 1);\r\n            InputMessage.TextAlignment = showAsServiceMessage ? TextAlignment.Center : TextAlignment.Left;            \r\n\r\n            MainBorder.BorderThickness = output\r\n                ? new Thickness(1.0, 1.0, 0.0, 1.0)\r\n                : new Thickness(0.0, 1.0, 1.0, 1.0);\r\n            CornerBorder.BorderThickness = output\r\n                ? new Thickness(1.0, 0.0, 0.0, 0.0)\r\n                : new Thickness(0.0, 0.0, 1.0, 0.0);\r\n\r\n            BeforeLastColumn.Width = beforeLastGridLength;\r\n            LastColumn.Width = lastGridLength;\r\n            Grid.SetColumn(MainBorder, bubbleGridColumn);\r\n            Grid.SetColumn(Corner, cornerGridColumn);\r\n            Grid.SetColumn(CornerBorder, cornerGridColumn);\r\n\r\n            Header.MaxWidth = messageCommon != null ? messageCommon.MediaWidth : 12.0 + 311.0 + 12.0;\r\n            FwdFromGrid.Visibility = message != null && !message.IsSticker() && !message.IsRoundVideo() && !message.IsSelf() ? message.FwdFromPeerVisibility : Visibility.Collapsed;\r\n\r\n            ViaBotGrid.Visibility = message != null ? message.ViaBotVisibility : Visibility.Collapsed;\r\n            ReplyContent.Visibility = messageCommon != null ? messageCommon.ReplyVisibility : Visibility.Collapsed;\r\n            if (FromLabel.Visibility == Visibility.Visible\r\n                || FwdFromGrid.Visibility == Visibility.Visible\r\n                || ViaBotGrid.Visibility == Visibility.Visible\r\n                || ReplyContent.Visibility == Visibility.Visible)\r\n            {\r\n                Header.Visibility = Visibility.Visible;\r\n            }\r\n            else\r\n            {\r\n                Header.Visibility = Visibility.Collapsed;\r\n            }\r\n            if (FromLabel.Visibility == Visibility.Visible\r\n                && FwdFromGrid.Visibility == Visibility.Collapsed\r\n                && ViaBotGrid.Visibility == Visibility.Collapsed\r\n                && ReplyContent.Visibility == Visibility.Collapsed\r\n                && message != null \r\n                && !TLString.IsNullOrEmpty(message.Message))\r\n            {\r\n                FromLabel.Margin = new Thickness(0.0, 2.0, 0.0, -4.0);\r\n            }\r\n            else if (FromLabel.Visibility == Visibility.Visible\r\n                && FwdFromGrid.Visibility == Visibility.Collapsed\r\n                && ViaBotGrid.Visibility == Visibility.Collapsed\r\n                && messageCommon != null && messageCommon.ReplyInfo != null)\r\n            {\r\n                FromLabel.Margin = new Thickness(0.0, 2.0, 0.0, 6.0);\r\n            }\r\n            else\r\n            {\r\n                FromLabel.Margin = new Thickness(0.0, 2.0, 0.0, 0.0);\r\n            }\r\n\r\n            if (FromLabel.Visibility == Visibility.Collapsed\r\n                && FwdFromGrid.Visibility == Visibility.Collapsed\r\n                && ViaBotGrid.Visibility == Visibility.Collapsed\r\n                && ReplyContent.Visibility == Visibility.Visible\r\n                && messageCommon != null && messageCommon.ReplyInfo != null)\r\n            {\r\n                ReplyContent.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n            }\r\n            else\r\n            {\r\n                ReplyContent.Margin = new Thickness(0.0, 0.0, 0.0, 0.0);\r\n            }\r\n\r\n            CaptionPanel.Children.Remove(ViaBotGrid);\r\n            FromLabelPanel.Children.Remove(ViaBotGrid);\r\n            if (FromLabel.Visibility == Visibility.Visible\r\n                && ViaBotGrid.Visibility == Visibility.Visible)\r\n            {\r\n                ViaBotGrid.Margin = FromLabel.Margin;              \r\n                FromLabel.Margin = new Thickness(FromLabel.Margin.Left, FromLabel.Margin.Top, FromLabel.Margin.Right + 6.0, FromLabel.Margin.Bottom);    \r\n                FromLabelPanel.Children.Add(ViaBotGrid);\r\n            }\r\n            else\r\n            {\r\n                ViaBotGrid.Margin = new Thickness(0.0, -6.0, 0.0, 0.0);\r\n                CaptionPanel.Children.Insert(2, ViaBotGrid);\r\n            }\r\n\r\n            AuthorLabel.Visibility = _isChannelMessage && message != null? message.AuthorVisibility : Visibility.Collapsed;\r\n            ViewsGrid.Visibility = message != null ? message.ViewsVisibility : Visibility.Collapsed;\r\n\r\n            Grid.SetColumn(Commands, commandsGridColumn);\r\n            \r\n            ShereButtonImage.Source = isLightTheme\r\n                ? new BitmapImage(new Uri(\"/Images/Messages/channel.share.white.png\", UriKind.Relative))\r\n                : new BitmapImage(new Uri(\"/Images/Messages/channel.share.white.png\", UriKind.Relative));\r\n\r\n            ShareButton.Visibility = message != null\r\n                && ((!sticker && message.ToId is TLPeerChannel && _isChannelMessage) || (message.Media is TLMessageMediaInvoice && !message.Out.Value) || IsSelfInputMessage(message))\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n\r\n            Status.Visibility = output? Visibility.Visible : Visibility.Collapsed;\r\n\r\n            MessageGrid.MaxWidth = messageCommon != null ? messageCommon.MediaWidth : 12.0 + 311.0 + 12.0;\r\n\r\n            Panel.Children.Remove(Header);\r\n            MainItemGrid.Children.Remove(Header);\r\n            if (showAsServiceMessage)\r\n            {\r\n                MessageGrid.Margin = new Thickness(0.0, 2.0, 0.0, 7.0);\r\n            }\r\n            else if (sticker)\r\n            {\r\n                ReplyContent.Foreground = footerForeground;\r\n                ViaBotGrid.Foreground = new SolidColorBrush(Colors.White);\r\n                Header.Background = footerBackground;\r\n                Grid.SetRow(Header, 1);\r\n                Grid.SetColumn(Header, output ? bubbleGridColumn - 1 : bubbleGridColumn + 1);\r\n                Header.HorizontalAlignment = output ? HorizontalAlignment.Right : HorizontalAlignment.Left;\r\n                Header.Margin = new Thickness(6.0);\r\n                MainItemGrid.Children.Add(Header);\r\n            }\r\n            else\r\n            {\r\n                ReplyContent.Foreground = foreground;\r\n                ViaBotGrid.Foreground = (Brush) Application.Current.Resources[\"TelegramBadgeAccentBrush\"];\r\n                Header.SetValue(Grid.RowProperty, DependencyProperty.UnsetValue);\r\n                Header.SetValue(Grid.ColumnProperty, DependencyProperty.UnsetValue);\r\n                Header.HorizontalAlignment = HorizontalAlignment.Left;\r\n                Header.Margin = new Thickness(0.0, 0.0, 0.0, -6.0);\r\n                Panel.Children.Insert(0, Header);\r\n            }\r\n\r\n            SetFooter(messageCommon);\r\n        }\r\n\r\n        private void SetBackgroundAndBorder(TLMessageCommon messageCommon)\r\n        {\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            var message = messageCommon as TLMessage48;\r\n            var messageService = messageCommon as TLMessageService;\r\n            var phoneCall = messageService != null && messageService.Action is TLMessageActionPhoneCall;\r\n            var mediaExpired = messageCommon != null && messageCommon.IsExpired();\r\n            var serviceMessage = (messageService != null && !phoneCall) || mediaExpired;\r\n            var sticker = messageCommon != null && messageCommon.IsSticker();\r\n            var roundVideo = messageCommon != null && messageCommon.IsRoundVideo();\r\n            var output = GetOutput(messageCommon);\r\n\r\n            Brush border;\r\n            if (serviceMessage)\r\n            {\r\n                border = (Brush)Resources[\"ServiceMessageBorderBrush\"];\r\n            }\r\n            else if (sticker)\r\n            {\r\n                border = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n            else if (roundVideo)\r\n            {\r\n                border = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n            else\r\n            {\r\n                border = isLightTheme\r\n                    ? (output\r\n                        ? (Brush)Resources[\"OutputBorderBrushLight\"]\r\n                        : (Brush)Resources[\"InputBorderBrushLight\"])\r\n                    : (output\r\n                        ? (Brush)Resources[\"OutputBorderBrushDark\"]\r\n                        : (Brush)Resources[\"InputBorderBrushDark\"]);\r\n            }\r\n\r\n            Brush background;\r\n            if (serviceMessage)\r\n            {\r\n                background = (Brush)Resources[\"ServiceMessageBackgroundBrush\"];\r\n            }\r\n            else if (sticker)\r\n            {\r\n                background = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n            else if (roundVideo)\r\n            {\r\n                background = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n            else\r\n            {\r\n                background = isLightTheme\r\n                    ? (output\r\n                        ? (Brush)Resources[\"OutputBackgroundBrushLight\"]\r\n                        : (Brush)Resources[\"InputBackgroundBrushLight\"])\r\n                    : (output\r\n                        ? (Brush)Resources[\"OutputBackgroundBrushDark\"]\r\n                        : (Brush)Resources[\"InputBackgroundBrushDark\"]);\r\n            }\r\n\r\n            Corner.Fill = background;\r\n            Corner.Stroke = border;\r\n            CornerBorder.BorderBrush = border;\r\n\r\n            MainBorder.Background = background;\r\n            MainBorder.BorderBrush = border;\r\n            MorePanel.Background = background;\r\n            Header.Background = background;\r\n        }\r\n\r\n        private bool _isChannelMessage;\r\n\r\n        private void ToServiceTemplate(TLMessageCommon messageCommon)\r\n        {\r\n            _isChannelMessage = false;\r\n            FromLabel.Visibility = Visibility.Collapsed;\r\n            Tile.Visibility = Visibility.Collapsed;\r\n\r\n            DrawBubble(messageCommon);\r\n        }\r\n\r\n        private Binding _authorBinding;\r\n        private Binding _viewsBinding;\r\n        private Binding _inputMessageTextBinding;\r\n        private Binding _inputMessageEntitiesBinding;\r\n        private Binding _inputMessageVisibilityBinding;\r\n        private Binding _mediaContentControlContentBinding;\r\n        private Binding _mediaContentControlContentTemplateBinding;\r\n        private Binding _commandsReplyMarkupBinding;\r\n        private Binding _editLabelVisibilityBinding;\r\n\r\n        private void SaveBinding(ref Binding binding, FrameworkElement element, DependencyProperty dp)\r\n        {\r\n            if (binding == null)\r\n            {\r\n                var bindingExpression = element.GetBindingExpression(dp);\r\n                if (bindingExpression != null)\r\n                {\r\n                    binding = bindingExpression.ParentBinding;\r\n                }\r\n                element.ClearValue(dp);\r\n            }\r\n        }\r\n\r\n        private void RestoreBinding(ref Binding binding, FrameworkElement element, DependencyProperty dp)\r\n        {\r\n            if (binding != null)\r\n            {\r\n                element.SetBinding(dp, binding);\r\n                binding = null;\r\n            }\r\n        }\r\n\r\n        private void SetupBinding(TLMessageBase messageBase)\r\n        {\r\n            // exceptions:\r\n            // 1) message with TTL and Document=null, Photo=null is service message (video has expired, photo has expired)\r\n            // 2) service message with phone call is regular message\r\n\r\n            var serviceMessage = messageBase as TLMessageService;\r\n            var message = messageBase as TLMessage;\r\n\r\n            if (serviceMessage != null)\r\n            {\r\n                SaveBinding(ref _inputMessageEntitiesBinding, InputMessage, TelegramRichTextBox.EntitiesProperty);\r\n                SaveBinding(ref _inputMessageTextBinding, InputMessage, TelegramRichTextBox.TextProperty);\r\n                SaveBinding(ref _commandsReplyMarkupBinding, Commands, CommandsControl.ReplyMarkupProperty);\r\n\r\n                var isPhoneCall = serviceMessage.Action is TLMessageActionPhoneCall;\r\n                if (!isPhoneCall)\r\n                {\r\n                    var serviceMessageToTextConverter = new ServiceMessageToTextConverter();\r\n                    InputMessage.Text = (string)serviceMessageToTextConverter.Convert(serviceMessage.Self, null, \"\", null);\r\n                }\r\n\r\n                ClearValue(MediaProperty);\r\n            }\r\n            else if (message != null && message.IsExpired())   // will be set manually to service message 'video has expired'/'photo has expired'\r\n            {\r\n                SaveBinding(ref _inputMessageEntitiesBinding, InputMessage, TelegramRichTextBox.EntitiesProperty);\r\n                SaveBinding(ref _inputMessageTextBinding, InputMessage, TelegramRichTextBox.TextProperty);\r\n                RestoreBinding(ref _commandsReplyMarkupBinding, Commands, CommandsControl.ReplyMarkupProperty);\r\n\r\n                var mediaPhoto = message.Media as TLMessageMediaPhoto70;\r\n                var mediaDocument = message.Media as TLMessageMediaDocument70;\r\n                if (mediaPhoto != null)\r\n                {\r\n                    InputMessage.Text = AppResources.MessageActionPhotoExpired;\r\n                }\r\n                else if (mediaDocument != null)\r\n                {\r\n                    InputMessage.Text = AppResources.MessageActionVideoExpired;\r\n                }\r\n\r\n                _suppressFooterReplacement = true;\r\n                SetBinding(MediaProperty, new Binding(\"Media\") { Source = messageBase, Mode = BindingMode.OneWay }); // Media field of type TLMessageService for phone calls is not acceptable for dependency property of type TLMessageMediaBase\r\n                _suppressFooterReplacement = false;\r\n            }\r\n            else\r\n            {\r\n                RestoreBinding(ref _inputMessageEntitiesBinding, InputMessage, TelegramRichTextBox.EntitiesProperty); // there is no Entities field on TLMessageService with phone call\r\n                RestoreBinding(ref _inputMessageTextBinding, InputMessage, TelegramRichTextBox.TextProperty);         // there is no Message field on TLMessageService with phone call\r\n                RestoreBinding(ref _commandsReplyMarkupBinding, Commands, CommandsControl.ReplyMarkupProperty);      // there is no ReplyMarkup field on TLMessageService with phone call\r\n\r\n                _suppressFooterReplacement = true;\r\n                SetBinding(MediaProperty, new Binding(\"Media\") { Source = messageBase, Mode = BindingMode.OneWay }); // Media field of type TLMessageService for phone calls is not acceptable for dependency property of type TLMessageMediaBase\r\n                _suppressFooterReplacement = false;\r\n            }\r\n\r\n            var showAsServiceMessage = IsServiceMessage(messageBase);\r\n            if (showAsServiceMessage)\r\n            {\r\n                //SaveBinding(ref _fwdFromLabelTextBinding, FwdFromLabel, Run.TextProperty);\r\n                SaveBinding(ref _inputMessageVisibilityBinding, InputMessage, TelegramRichTextBox.VisibilityProperty);\r\n                SaveBinding(ref _mediaContentControlContentBinding, MediaContentControl, ContentControl.ContentProperty);\r\n                SaveBinding(ref _mediaContentControlContentTemplateBinding, MediaContentControl, ContentControl.ContentTemplateProperty);\r\n                SaveBinding(ref _viewsBinding, ViewsLabel, TextBlock.TextProperty);\r\n                SaveBinding(ref _authorBinding, AuthorLabel, TextBlock.TextProperty);\r\n                SaveBinding(ref _editLabelVisibilityBinding, EditLabel, TextBlock.VisibilityProperty);\r\n\r\n                _suppressFooterReplacement = true;\r\n                ClearValue(MediaCaptionProperty);\r\n                _suppressFooterReplacement = false;\r\n\r\n                ClearValue(MediaUnreadProperty);\r\n            }\r\n            else\r\n            {\r\n                var stopwatch = Stopwatch.StartNew();\r\n                RestoreBinding(ref _inputMessageVisibilityBinding, InputMessage, TelegramRichTextBox.VisibilityProperty);\r\n                RestoreBinding(ref _mediaContentControlContentBinding, MediaContentControl, ContentControl.ContentProperty);\r\n                RestoreBinding(ref _mediaContentControlContentTemplateBinding, MediaContentControl, ContentControl.ContentTemplateProperty);\r\n                RestoreBinding(ref _viewsBinding, ViewsLabel, TextBlock.TextProperty);\r\n                RestoreBinding(ref _authorBinding, AuthorLabel, TextBlock.TextProperty);\r\n                RestoreBinding(ref _editLabelVisibilityBinding, EditLabel, TextBlock.VisibilityProperty);\r\n\r\n                _suppressFooterReplacement = true;\r\n                if (message != null)\r\n                {\r\n                    var mediaCaption = message.Media as IMediaCaption;\r\n                    if (mediaCaption != null)\r\n                    {\r\n                        var mediaCaptionBinding = new Binding(\"Message\") { Source = message, Mode = BindingMode.OneWay };\r\n                        SetBinding(MediaCaptionProperty, mediaCaptionBinding);\r\n                    }\r\n                }\r\n                _suppressFooterReplacement = false;\r\n\r\n                var message70 = messageBase as TLMessage70;\r\n                if (message70 != null && message70.HasTTL())\r\n                {\r\n                    var notListenedBinding = new Binding(\"TTLMediaExpired\") { Source = message, Mode = BindingMode.OneWay };\r\n                    SetBinding(MediaUnreadProperty, notListenedBinding);\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _suppressFooterReplacement;\r\n\r\n        public string MediaCaption\r\n        {\r\n            get { return (string)GetValue(MediaCaptionProperty); }\r\n            set { SetValue(MediaCaptionProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty MediaCaptionProperty = DependencyProperty.Register(\r\n            \"MediaCaption\", typeof (string), typeof (MessageControl), new PropertyMetadata(default(string), OnMediaCaptionChanged));\r\n\r\n        private static void OnMediaCaptionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var messageControl = d as MessageControl;\r\n            if (messageControl != null && !messageControl._suppressFooterReplacement)\r\n            {\r\n                var oldCaption = e.OldValue as string;\r\n                var newCaption = e.NewValue as string;\r\n                if (!string.Equals(oldCaption, newCaption, StringComparison.Ordinal))\r\n                {\r\n                    messageControl.SetFooter(messageControl.Message);\r\n                }\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty MediaUnreadProperty = DependencyProperty.Register(\r\n            \"MediaUnread\", typeof(bool), typeof(MessageControl), new PropertyMetadata(default(bool), OnMediaUnreadChanged));\r\n\r\n        private static void OnMediaUnreadChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var messageControl = d as MessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                var message = messageControl.Message as TLMessage;\r\n                if (message != null && message.IsExpired())\r\n                {\r\n                    var oldMediaUnread = (bool) e.OldValue;\r\n                    var newMediaUnread = (bool) e.NewValue;\r\n                    if (!oldMediaUnread && newMediaUnread)\r\n                    {\r\n                        OnMessageChangedInternal(messageControl, messageControl.Message);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool MediaUnread\r\n        {\r\n            get { return (bool) GetValue(MediaUnreadProperty); }\r\n            set { SetValue(MediaUnreadProperty, value); }\r\n        }\r\n\r\n        protected TLMessageMediaBase Media\r\n        {\r\n            get { return (TLMessageMediaBase)GetValue(MediaProperty); }\r\n            set { SetValue(MediaProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty MediaProperty = DependencyProperty.Register(\r\n            \"Media\", typeof (TLMessageMediaBase), typeof (MessageControl), new PropertyMetadata(default(TLMessageMediaBase), OnMediaChanged));\r\n\r\n        private static void OnMediaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var messageControl = d as MessageControl;\r\n            if (messageControl != null)\r\n            {\r\n                if (!messageControl._suppressFooterReplacement)\r\n                {\r\n                    var oldWebPage = e.OldValue as TLMessageMediaWebPage;\r\n                    var newWebPage = e.NewValue as TLMessageMediaWebPage;\r\n                    if (oldWebPage != null\r\n                        || newWebPage != null)\r\n                    {\r\n                        messageControl.SetFooter(messageControl.Message);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool GetOutput(TLMessageCommon message)\r\n        {\r\n            if (IsSelfInputMessage(message))\r\n            {\r\n                return false;\r\n            }\r\n\r\n            return message != null && message.Out.Value && !_isChannelMessage;\r\n        }\r\n\r\n        private void SetFooter(TLMessageBase messageBase)\r\n        {\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n            var messageCommon = messageBase as TLMessageCommon;\r\n            var message = messageBase as TLMessage48;\r\n            var service = messageBase as TLMessageService;\r\n            var phoneCall = service != null && service.Action is TLMessageActionPhoneCall;\r\n            var showAsServiceMessage = IsServiceMessage(messageBase);\r\n            var output = GetOutput(messageCommon);\r\n\r\n            var hasCaption = message != null && !TLString.IsNullOrEmpty(message.Message);\r\n            var isGroupedMedia = message != null && message.Media is TLMessageMediaGroup;\r\n            var isPhoto = message != null && message.Media is TLMessageMediaPhoto;\r\n            var isVideo = message != null && message.IsVideo();\r\n            var isGeo = message != null && message.Media is TLMessageMediaGeo && !(message.Media is TLMessageMediaGeoLive);\r\n            var isVenue = message != null && message.Media is TLMessageMediaVenue;\r\n            var isGeoLive = message != null && message.Media is TLMessageMediaGeoLive;\r\n            var isGif = message != null && message.IsGif() && !(message.Media is TLMessageMediaGame) && !(message.Media is TLMessageMediaWebPage);\r\n            var isDocument = message != null && IsDocument(message);\r\n            var isVoice = message != null && message.IsVoice();\r\n            var isRoundVideo = message != null && message.IsRoundVideo();\r\n            var isSticker = message != null && message.IsSticker();\r\n            var isWebPage = message != null && message.Media is TLMessageMediaWebPage;\r\n            var isEmptyMedia = message != null && (message.Media == null || message.Media is TLMessageMediaEmpty);\r\n            var isUnsupported = message != null && message.Media is TLMessageMediaUnsupported;\r\n\r\n            //var isGif = message != null && message.IsGif(); \r\n            var isShortFooter = IsShortFooter(message, isGroupedMedia, isPhoto, isVideo, isGeo, isGeoLive, isGif, isDocument, isVoice, isSticker, isWebPage, isEmptyMedia, isUnsupported);\r\n\r\n            Brush background;\r\n            if (showAsServiceMessage)\r\n            {\r\n                background = (Brush)Resources[\"ServiceMessageBackgroundBrush\"];\r\n            }\r\n            if (isSticker)\r\n            {\r\n                background = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n            if (isRoundVideo)\r\n            {\r\n                background = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n            else\r\n            {\r\n                background = isLightTheme\r\n                    ? (output\r\n                        ? (Brush)Resources[\"OutputBackgroundBrushLight\"]\r\n                        : (Brush)Resources[\"InputBackgroundBrushLight\"])\r\n                    : (output\r\n                        ? (Brush)Resources[\"OutputBackgroundBrushDark\"]\r\n                        : (Brush)Resources[\"InputBackgroundBrushDark\"]);\r\n            }\r\n\r\n            Brush footerForeground;\r\n            if (isSticker)\r\n            {\r\n                footerForeground = isLightTheme\r\n                    ? (Brush)Resources[\"StickerFooterSubtleBrushLight\"]\r\n                    : (Brush)Resources[\"StickerFooterSubtleBrushDark\"];\r\n            }\r\n            else if (isRoundVideo)\r\n            {\r\n                footerForeground = isLightTheme\r\n                    ? (Brush)Resources[\"StickerFooterSubtleBrushLight\"]\r\n                    : (Brush)Resources[\"StickerFooterSubtleBrushDark\"];\r\n            }\r\n            else if (isShortFooter && !hasCaption && (isGroupedMedia || isPhoto || (isGeo && !isVenue) || isVideo || isGif))\r\n            {\r\n                footerForeground = new SolidColorBrush(Colors.White);\r\n            }\r\n            else\r\n            {\r\n                footerForeground = isLightTheme\r\n                ? (output\r\n                    ? (Brush)Resources[\"OutputSubtleBrushLight\"]\r\n                    : (Brush)Resources[\"InputSubtleBrushLight\"])\r\n                : (output\r\n                    ? (Brush)Resources[\"OutputSubtleBrushDark\"]\r\n                    : (Brush)Resources[\"InputSubtleBrushDark\"]);\r\n            }\r\n\r\n            Brush footerBackground;\r\n            if (isSticker)\r\n            {\r\n                footerBackground = isLightTheme\r\n                    ? (Brush)Resources[\"StickerFooterBackgroundBrushLight\"]\r\n                    : (Brush)Resources[\"StickerFooterBackgroundBrushDark\"];\r\n            }\r\n            else if (isRoundVideo)\r\n            {\r\n                footerBackground = isLightTheme\r\n                    ? (Brush)Resources[\"StickerFooterBackgroundBrushLight\"]\r\n                    : (Brush)Resources[\"StickerFooterBackgroundBrushDark\"];\r\n            }\r\n            else if (isShortFooter && !hasCaption && (isGroupedMedia || isPhoto || isVideo || (isGeo && !isVenue) || isGif))\r\n            {\r\n                footerBackground = new SolidColorBrush(Color.FromArgb(128, 0, 0, 0));\r\n            }\r\n            else\r\n            {\r\n                footerBackground = new SolidColorBrush(Colors.Transparent);\r\n            }\r\n\r\n            FooterContent.Foreground = footerForeground;\r\n            FooterContentGrid.Background = footerBackground;\r\n            Footer.MaxWidth = messageCommon != null ? messageCommon.MediaWidth : 12.0 + 311.0 + 12.0;\r\n            Status.Fill = footerForeground;\r\n            ViewsIcon.Stroke = footerForeground;\r\n\r\n            if (messageCommon != null && messageCommon.Reply != null && (isGroupedMedia || isPhoto || isVideo || isGeo || isGif))\r\n            {\r\n                MediaContentControl.Margin = new Thickness(12.0, 3.0, 12.0, 0.0);\r\n            }\r\n            else\r\n            {\r\n                MediaContentControl.Margin = new Thickness(12.0, 0.0, 12.0, 0.0);\r\n            }\r\n\r\n            // setup message and media position\r\n            MessageGrid.Visibility = message != null && !TLString.IsNullOrEmpty(message.Message) || showAsServiceMessage\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n            Panel.Children.Remove(MessageGrid);\r\n            Panel.Children.Remove(MediaGrid);\r\n            if (message != null && (message.Media is TLMessageMediaWebPage || message.Media is TLMessageMediaEmpty) || showAsServiceMessage)\r\n            {\r\n                MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n                MediaGrid.Margin = new Thickness(0.0, 0.0, 0.0, 0.0);\r\n\r\n                Panel.Children.Add(MessageGrid);\r\n                Panel.Children.Add(MediaGrid);\r\n            }\r\n            else\r\n            {\r\n                MessageGrid.Margin = new Thickness(0.0, 0.0, 0.0, 0.0);\r\n                MediaGrid.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n\r\n                Panel.Children.Add(MediaGrid);\r\n                Panel.Children.Add(MessageGrid);\r\n            }\r\n\r\n            // setup footer position\r\n            Panel.Children.Remove(Footer);\r\n            MediaGrid.Children.Remove(Footer);\r\n            MessageGrid.Children.Remove(Footer);\r\n            if (showAsServiceMessage)\r\n            {\r\n                // remove footer\r\n                MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 6.0);\r\n            }\r\n            else if (phoneCall)\r\n            {\r\n                MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n            }\r\n            else if (!isShortFooter)\r\n            {\r\n                Footer.Margin = new Thickness(0.0, -1.0, 0.0, 0.0);\r\n                Footer.Background = background;\r\n                Footer.HorizontalAlignment = HorizontalAlignment.Stretch;\r\n                Footer.VerticalAlignment = VerticalAlignment.Stretch;\r\n                Panel.Children.Add(Footer);\r\n                MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n            }\r\n            else\r\n            {\r\n                if (isSticker)\r\n                {\r\n                    Footer.Margin = new Thickness(0.0, -1.0, 0.0, 0.0);\r\n                    Footer.Background = new SolidColorBrush(Colors.Transparent);\r\n                    Footer.HorizontalAlignment = HorizontalAlignment.Right;\r\n                    Footer.VerticalAlignment = VerticalAlignment.Bottom;\r\n                    MediaGrid.Children.Add(Footer);\r\n                    MessageGrid.Margin = new Thickness(0.0, 0.0, 0.0, 0.0);\r\n                }\r\n                else if (isEmptyMedia || hasCaption)\r\n                {\r\n                    Footer.Margin = new Thickness(0.0, -1.0, 0.0, -11.0);\r\n                    Footer.Background = new SolidColorBrush(Colors.Transparent);\r\n                    Footer.HorizontalAlignment = HorizontalAlignment.Stretch;\r\n                    Footer.VerticalAlignment = VerticalAlignment.Bottom;\r\n                    MessageGrid.Children.Add(Footer);\r\n                    MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 11.0);\r\n                }\r\n                else if (isGeoLive)\r\n                {\r\n                    Footer.Margin = new Thickness(0.0, -1.0, 0.0, 0.0);\r\n                    Footer.Background = new SolidColorBrush(Colors.Transparent);\r\n                    Footer.HorizontalAlignment = HorizontalAlignment.Right;\r\n                    Footer.VerticalAlignment = VerticalAlignment.Bottom;\r\n                    //MediaGrid.Children.Add(Footer);\r\n                    MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n                }\r\n                else if (isGroupedMedia || isPhoto || isVideo || isGeo || isGif || isVoice || isDocument)\r\n                {\r\n                    Footer.Margin = new Thickness(0.0, -1.0, 0.0, 0.0);\r\n                    Footer.Background = new SolidColorBrush(Colors.Transparent);\r\n                    Footer.HorizontalAlignment = HorizontalAlignment.Right;\r\n                    Footer.VerticalAlignment = VerticalAlignment.Bottom;\r\n                    MediaGrid.Children.Add(Footer);\r\n                    MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 11.0);\r\n                }\r\n                else\r\n                {\r\n                    Footer.Margin = new Thickness(0.0, -1.0, 0.0, 0.0);\r\n                    Footer.Background = background;\r\n                    Footer.HorizontalAlignment = HorizontalAlignment.Stretch;\r\n                    Footer.VerticalAlignment = VerticalAlignment.Stretch;\r\n                    Panel.Children.Add(Footer);\r\n                    MessageGrid.Margin = new Thickness(0.0, 6.0, 0.0, 0.0);\r\n                }\r\n            }\r\n\r\n            if (message != null\r\n                && !TLString.IsNullOrEmpty(message.Message)\r\n                && !(message.Media is TLMessageMediaWebPage))\r\n            {\r\n                var messageDateTimeConverter = (IValueConverter) Application.Current.Resources[\"MessageDateTimeConverter\"];\r\n                var dateText = messageDateTimeConverter.Convert(message.Date, null, null, null);\r\n\r\n                var footerBuilder = new StringBuilder();\r\n                if (FlowDirection == FlowDirection.RightToLeft)\r\n                {\r\n                    footerBuilder.Append(\"د\");\r\n                }\r\n                else\r\n                {\r\n                    footerBuilder.Append(\"a\");\r\n                }\r\n                if (_isChannelMessage\r\n                    && message.AuthorVisibility == Visibility.Visible\r\n                    && message.Author != null)\r\n                {\r\n                    footerBuilder.Append(string.Format(\"{0} \", message.Author));\r\n                }\r\n                if (message.ViewsVisibility == Visibility.Visible)\r\n                {\r\n                    footerBuilder.Append(string.Format(\"vc {0}, \",\r\n                        new MessageViewsConverter().Convert(message.Views, null, null, null)));\r\n                }\r\n                footerBuilder.Append(\"/ \" + dateText);\r\n                if (message.Out.Value)\r\n                {\r\n                    footerBuilder.Append(\" W\");\r\n                }\r\n\r\n                InputMessage.Footer = footerBuilder.ToString();\r\n            }\r\n            else\r\n            {\r\n                InputMessage.Footer = string.Empty;\r\n            }\r\n\r\n            if (isVoice)\r\n            {\r\n                MediaContentControl.Foreground = footerForeground;\r\n            }\r\n            else\r\n            {\r\n                MediaContentControl.SetValue(Control.ForegroundProperty, DependencyProperty.UnsetValue);\r\n            }\r\n        }\r\n\r\n        private static bool IsShortFooter(TLMessage48 message, bool isGrouped, bool isPhoto, bool isVideo, bool isGeo, bool isGeoLive, bool isGif, bool isDocument, bool isVoice, bool isSticker, bool isWebPage, bool isEmptyMedia, bool isUnsupported)\r\n        {\r\n            if (message != null)\r\n            {\r\n                if (isUnsupported)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                if (isWebPage)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                if (isGrouped || isPhoto || isVideo || isGeo || isGif)\r\n                {\r\n                    return true;\r\n                }\r\n                \r\n                if (isSticker)\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (isEmptyMedia)\r\n                {\r\n                    return true;\r\n                }\r\n                \r\n                if (isDocument || isVoice || isGeoLive)\r\n                {\r\n                    var clientDelta = IoC.Get<IMTProtoService>().ClientTicksDelta;\r\n                    //var utc0SecsLong = message.Date.Value * 4294967296 - clientDelta;\r\n                    var utc0SecsInt = message.Date.Value - clientDelta / 4294967296.0;\r\n\r\n                    var dateTime = Telegram.Api.Helpers.Utils.UnixTimestampToDateTime(utc0SecsInt);\r\n                    if (dateTime.Date.AddDays(365) < DateTime.Now.Date)\r\n                        return false;\r\n\r\n                    if (message.AuthorVisibility == Visibility.Visible\r\n                        && message.ToId is TLPeerChannel)\r\n                    {\r\n                        var channel = IoC.Get<ICacheService>().GetChat(message.ToId.Id) as TLChannel;\r\n                        if (channel != null && !channel.IsMegaGroup)\r\n                        {\r\n                            return false;\r\n                        }\r\n                    }\r\n\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void ToEmptyTemplate()\r\n        {\r\n            \r\n        }\r\n\r\n        public TLMessageBase Message\r\n        {\r\n            get { return (TLMessageBase) GetValue(MessageProperty); }\r\n            set { SetValue(MessageProperty, value); }\r\n        }\r\n\r\n        private static int _count;\r\n\r\n        public MessageControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            //System.Diagnostics.Debug.WriteLine(\"MessageControl \" + _count++);\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> TapViaBot;\r\n\r\n        protected virtual void RaiseTapViaBot(object sender, GestureEventArgs args)\r\n        {\r\n            var handler = TapViaBot;\r\n            if (handler != null) handler(sender, args);\r\n        }\r\n\r\n        private void ViaBot_Tap(object sender, GestureEventArgs args)\r\n        {\r\n            RaiseTapViaBot(sender, args);\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> TapMorePanel;\r\n\r\n        protected virtual void RaiseTapMorePanel(object sender, GestureEventArgs args)\r\n        {\r\n            var handler = TapMorePanel;\r\n            if (handler != null) handler(sender, args);\r\n        }\r\n\r\n        private void MorePanel_OnTap(object sender, GestureEventArgs args)\r\n        {\r\n            RaiseTapMorePanel(sender, args);\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> TapUserTile;\r\n\r\n        protected virtual void RaiseTapUserTile(object sender, GestureEventArgs args)\r\n        {\r\n            var handler = TapUserTile;\r\n            if (handler != null) handler(sender, args);\r\n        }\r\n\r\n        private void Tile_OnTap(object sender, GestureEventArgs args)\r\n        {\r\n            RaiseTapUserTile(sender, args);\r\n        }\r\n\r\n        public event EventHandler<KeyboardButtonEventArgs> CommandsControlButtonClick;\r\n\r\n        protected virtual void RaiseCommandsControlButtonClick(object sender, KeyboardButtonEventArgs e)\r\n        {\r\n            var handler = CommandsControlButtonClick;\r\n            if (handler != null) handler(sender, e);\r\n        }\r\n\r\n        private void CommandsControl_OnButtonClick(object sender, KeyboardButtonEventArgs e)\r\n        {\r\n            RaiseCommandsControlButtonClick(sender, e);\r\n        }\r\n\r\n        public event EventHandler<RoutedEventArgs> ShareButtonClick;\r\n\r\n        protected virtual void RaiseShareButtonClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var handler = ShareButtonClick;\r\n            if (handler != null) handler(sender, e);\r\n        }\r\n\r\n        private void ShareButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n            RaiseShareButtonClick(sender, e);\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> TapMedia;\r\n\r\n        private void MediaContentControl_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n            RaiseTapMedia(e);\r\n        }\r\n\r\n        protected virtual void RaiseTapMedia(GestureEventArgs e)\r\n        {\r\n            var handler = TapMedia;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n    }\r\n\r\n    public class NonBreakingStringConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return Convert(value);\r\n        }\r\n\r\n        public static object Convert(object value)\r\n        {\r\n            var str = value as string;\r\n            if (str != null)\r\n            {\r\n                return str.Replace(' ', '\\xA0').Replace(\"-\", \"\\u2011\");\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/OpacityMaskBorder.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.OpacityMaskBorder\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Border x:Name=\"Border\" Opacity=\"1\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\">\r\n        <Border.OpacityMask>\r\n            <ImageBrush x:Name=\"ImageBrush\" Stretch=\"UniformToFill\" ImageOpened=\"ImageBrush_OnImageOpened\" ImageFailed=\"ImageBrush_OnImageFailed\"/>\r\n        </Border.OpacityMask>\r\n    </Border>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/OpacityMaskBorder.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class OpacityMaskBorder\r\n    {\r\n        public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register(\r\n            \"ImageSource\", typeof (ImageSource), typeof (OpacityMaskBorder), new PropertyMetadata(default(ImageSource), OnImageSourceChanged));\r\n\r\n        private static void OnImageSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var opacityMaskBorder = d as OpacityMaskBorder;\r\n            if (opacityMaskBorder != null)\r\n            {\r\n                opacityMaskBorder.ImageBrush.ImageSource = e.NewValue as ImageSource;\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty BorderBackgroundProperty = DependencyProperty.Register(\r\n            \"BorderBackground\", typeof (Brush), typeof (OpacityMaskBorder), new PropertyMetadata(default(Brush), OnBorderBackgroundChanged));\r\n\r\n        private static void OnBorderBackgroundChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var opacityMaskBorder = d as OpacityMaskBorder;\r\n            if (opacityMaskBorder != null)\r\n            {\r\n                opacityMaskBorder.Border.Background = e.NewValue as Brush;\r\n            }\r\n        }\r\n\r\n        public Brush BorderBackground\r\n        {\r\n            get { return (Brush) GetValue(BorderBackgroundProperty); }\r\n            set { SetValue(BorderBackgroundProperty, value); }\r\n        }\r\n\r\n        public ImageSource ImageSource\r\n        {\r\n            get { return (ImageSource) GetValue(ImageSourceProperty); }\r\n            set { SetValue(ImageSourceProperty, value); }\r\n        }\r\n\r\n        public OpacityMaskBorder()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void ImageBrush_OnImageOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            var opacityMaskBorder = sender as OpacityMaskBorder;\r\n            if (opacityMaskBorder != null)\r\n            {\r\n                opacityMaskBorder.Border.Opacity = 1.0;\r\n            }\r\n        }\r\n\r\n        private void ImageBrush_OnImageFailed(object sender, ExceptionRoutedEventArgs e)\r\n        {\r\n            \r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/OpenPhotoPicker.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.OpenPhotoPicker\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"Self\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"LightThemeBackgroundBrush\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"DarkThemeBackgroundBrush\" Color=\"#FF2B2B2B\"/>\r\n        \r\n        <SolidColorBrush x:Key=\"BackgroundBrush\" Color=\"#FFFFFFFF\"/>\r\n        \r\n        <controls:PhotoConverter x:Key=\"BackgroundPhotoConverter\"/>\r\n        <converters:CountToVisibilityConverter Type=\"Equals\" x:Key=\"EmptyListToVisibilityConverter\"/>\r\n        <Style x:Key=\"LongListSelectorStyle1\" TargetType=\"phone:LongListSelector\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"phone:LongListSelector\">\r\n                        <Grid Background=\"{TemplateBinding Background}\" d:DesignWidth=\"480\" d:DesignHeight=\"800\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                    </VisualStateGroup.Transitions>\r\n                                    <VisualState x:Name=\"Scrolling\">\r\n                                        <Storyboard>\r\n                                            <!--<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>-->\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"NotScrolling\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Grid Margin=\"{TemplateBinding Padding}\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <ViewportControl x:Name=\"ViewportControl\" HorizontalContentAlignment=\"Stretch\" VerticalAlignment=\"Top\"/>\r\n                                <!--<ScrollBar x:Name=\"VerticalScrollBar\" HorizontalAlignment=\"Right\" Grid.Column=\"0\" Margin=\"0,0,0,0\" Opacity=\"0\" Orientation=\"Vertical\" Visibility=\"Collapsed\"/>-->\r\n                            </Grid>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"ButtonStyle1\" TargetType=\"Button\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"6,5,6,6\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"ScrollViewerStyle1\" TargetType=\"ScrollViewer\">\r\n            <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n            <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Disabled\"/>\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Padding\" Value=\"0\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"ScrollViewer\" >\r\n                        <Grid Margin=\"{TemplateBinding Padding}\" Background=\"{TemplateBinding Background}\">\r\n                            <Grid.Triggers>\r\n                                <EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n                                    <BeginStoryboard>\r\n                                        <!--<Storyboard>\r\n                                            <DoubleAnimation Duration=\"00:00:01.5\" From=\"1\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n                                            <DoubleAnimation Duration=\"00:00:01.5\" From=\"1\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalScrollBar\"/>\r\n                                        </Storyboard>-->\r\n                                    </BeginStoryboard>\r\n                                </EventTrigger>\r\n                            </Grid.Triggers>\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                    </VisualStateGroup.Transitions>\r\n                                    <VisualState x:Name=\"Scrolling\">\r\n                                        <!--<Storyboard>\r\n                                            <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>\r\n                                            <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"HorizontalScrollBar\"/>\r\n                                        </Storyboard>-->\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"NotScrolling\"/>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"VerticalCompression\">\r\n                                    <VisualState x:Name=\"NoVerticalCompression\"/>\r\n                                    <VisualState x:Name=\"CompressionTop\"/>\r\n                                    <VisualState x:Name=\"CompressionBottom\"/>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"HorizontalCompression\">\r\n                                    <VisualState x:Name=\"NoHorizontalCompression\"/>\r\n                                    <VisualState x:Name=\"CompressionLeft\"/>\r\n                                    <VisualState x:Name=\"CompressionRight\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <ScrollContentPresenter x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\"/>\r\n                            <ScrollBar x:Name=\"VerticalScrollBar\" HorizontalAlignment=\"Right\" Height=\"Auto\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Vertical\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{TemplateBinding VerticalOffset}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" VerticalAlignment=\"Stretch\" Width=\"5\"/>\r\n                            <ScrollBar x:Name=\"HorizontalScrollBar\" HorizontalAlignment=\"Stretch\" Height=\"5\" IsHitTestVisible=\"False\" IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Opacity=\"0\" Orientation=\"Horizontal\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{TemplateBinding HorizontalOffset}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" VerticalAlignment=\"Bottom\" Width=\"Auto\"/>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border Width=\"146\" Height=\"146\" x:Name=\"CameraPreview\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\"/>\r\n        <!--<Border Background=\"{StaticResource PhoneChromeBrush}\" Margin=\"0,292,0,0\"/>-->\r\n        <phone:LongListSelector \r\n            x:Name=\"Photos\" \r\n            ManipulationStarted=\"Photos_OnManipulationStarted\"\r\n            ManipulationDelta=\"Photos_OnManipulationDelta\"\r\n            ManipulationCompleted=\"Photos_OnManipulationCompleted\"\r\n            Style=\"{StaticResource LongListSelectorStyle1}\">\r\n            <phone:LongListSelector.RenderTransform>\r\n                <TranslateTransform/>\r\n            </phone:LongListSelector.RenderTransform>\r\n\r\n            <phone:LongListSelector.ListHeader>\r\n                <Grid Height=\"300\" Background=\"Transparent\" Tap=\"UIElement_OnTap\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n\r\n                    <ListBox\r\n                        x:Name=\"Folders\"\r\n                        Width=\"480\"\r\n                        Grid.Row=\"1\"\r\n                        Margin=\"0,-1,0,-1\"\r\n                        Background=\"{StaticResource BackgroundBrush}\"\r\n                        ScrollViewer.HorizontalScrollBarVisibility=\"Auto\"\r\n                        ScrollViewer.VerticalScrollBarVisibility=\"Disabled\"\r\n                        ItemContainerStyle=\"{StaticResource W10MPivotHeaderItemStyle}\"\r\n                        SelectionChanged=\"Folders_OnSelectionChanged\"\r\n                        Tap=\"Folders_OnTap\">\r\n                        <ListBox.Template>\r\n                            <ControlTemplate TargetType=\"ListBox\">\r\n                                <ScrollViewer x:Name=\"ScrollViewer\" Style=\"{StaticResource ScrollViewerStyle1}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" Padding=\"{TemplateBinding Padding}\">\r\n                                    <ItemsPresenter Margin=\"0,0,18,0\"/>\r\n                                </ScrollViewer>\r\n                            </ControlTemplate>\r\n                        </ListBox.Template>\r\n                        <ListBox.RenderTransform>\r\n                            <TranslateTransform x:Name=\"FoldersTransform\"/>\r\n                        </ListBox.RenderTransform>\r\n                        <ListBox.ItemsPanel>\r\n                            <ItemsPanelTemplate>\r\n                                <StackPanel Orientation=\"Horizontal\"/>\r\n                            </ItemsPanelTemplate>\r\n                        </ListBox.ItemsPanel>\r\n                        <ListBox.ItemTemplate>\r\n                            <DataTemplate>\r\n                                <Grid Background=\"Transparent\" Tap=\"Album_OnTap\">\r\n                                    <TextBlock Foreground=\"{StaticResource PhoneForegroundBrush}\" Margin=\"18,18,0,0\" Text=\"{Binding Name, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n                                </Grid>\r\n                            </DataTemplate>\r\n                        </ListBox.ItemTemplate>\r\n                    </ListBox>\r\n                    <Border Tap=\"Folders_OnTap\" Grid.Row=\"2\" MinHeight=\"18\" VerticalAlignment=\"Bottom\" Background=\"{StaticResource BackgroundBrush}\">\r\n                        <TextBlock Text=\"{Binding Resources.NoMediaHere, Source={StaticResource Strings}}\" Margin=\"18,12,18,0\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Visibility=\"{Binding ItemsSource.Count, ElementName=Photos, Converter={StaticResource EmptyListToVisibilityConverter}, ConverterParameter='0', FallbackValue=Collapsed}\" FontSize=\"27\"/>\r\n                    </Border>\r\n                </Grid>\r\n            </phone:LongListSelector.ListHeader>\r\n            <phone:LongListSelector.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Grid Background=\"{StaticResource BackgroundBrush}\" Height=\"151\" Margin=\"0,-1,0,-1\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"18\"/>\r\n                            <ColumnDefinition/>\r\n                            <ColumnDefinition Width=\"3\"/>\r\n                            <ColumnDefinition/>\r\n                            <ColumnDefinition Width=\"3\"/>\r\n                            <ColumnDefinition/>\r\n                            <ColumnDefinition Width=\"18\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <controls:PhotoControl\r\n                            Grid.Column=\"1\"\r\n                            File=\"{Binding File1}\"\r\n                            Source=\"{Binding File1.Self, Converter={StaticResource BackgroundPhotoConverter}}\"\r\n                            Index=\"{Binding File1.Index}\"\r\n                            IsSelected=\"{Binding File1.IsSelected, FallbackValue=false}\"\r\n                            MouseEnter=\"PhotoControl_OnMouseEnter\" Tap=\"PhotoControl_OnTap\"\r\n                            Margin=\"0,0,0,3\"/>\r\n\r\n                        <controls:PhotoControl\r\n                            Grid.Column=\"3\"\r\n                            File=\"{Binding File2}\"\r\n                            Source=\"{Binding File2.Self, Converter={StaticResource BackgroundPhotoConverter}}\"\r\n                            Index=\"{Binding File2.Index}\"\r\n                            IsSelected=\"{Binding File2.IsSelected, FallbackValue=false}\"\r\n                            MouseEnter=\"PhotoControl_OnMouseEnter\" Tap=\"PhotoControl_OnTap\"\r\n                            Margin=\"0,0,0,3\"/>\r\n\r\n                        <controls:PhotoControl\r\n                            Grid.Column=\"5\"\r\n                            File=\"{Binding File3}\"\r\n                            Source=\"{Binding File3.Self, Converter={StaticResource BackgroundPhotoConverter}}\"\r\n                            Index=\"{Binding File3.Index}\"\r\n                            IsSelected=\"{Binding File3.IsSelected, FallbackValue=false}\"\r\n                            MouseEnter=\"PhotoControl_OnMouseEnter\" Tap=\"PhotoControl_OnTap\"\r\n                            Margin=\"0,0,0,3\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </phone:LongListSelector.ItemTemplate>\r\n            <phone:LongListSelector.ListFooterTemplate>\r\n                <DataTemplate>\r\n                    <Grid Background=\"Transparent\">\r\n                        <Border Height=\"800\" Margin=\"0,0,0,-784\" VerticalAlignment=\"Bottom\" Background=\"{StaticResource BackgroundBrush}\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </phone:LongListSelector.ListFooterTemplate>\r\n        </phone:LongListSelector>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"0\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n        <Grid x:Name=\"Bar\" Grid.Row=\"1\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform/>\r\n            </Grid.RenderTransform>\r\n            <controls:TelegramApplicationBar\r\n                x:Name=\"AppBar\"\r\n                VerticalAlignment=\"Bottom\"\r\n                MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                <controls:TelegramApplicationBar.Buttons>\r\n                    <controls:TelegramAppBarButton\r\n                        IsEnabled=\"False\"\r\n                        Grid.Column=\"3\" \r\n                        Tap=\"ChooseButton_OnClick\"\r\n                        ImageSource=\"/Images/W10M/ic_send_2x.png\"\r\n                        Text=\"{Binding Resources.Attach, Source={StaticResource Strings}}\"\r\n                        LabelForeground=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                </controls:TelegramApplicationBar.Buttons>\r\n            </controls:TelegramApplicationBar>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/OpenPhotoPicker.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing Windows.Devices.Enumeration;\r\nusing Windows.Media.Capture;\r\nusing Windows.Storage;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Xna.Framework.Media;\r\nusing Microsoft.Xna.Framework.Media.PhoneExtensions;\r\nusing Telegram.Logs;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class OpenPhotoPicker\r\n    {\r\n        public bool IsSingleItem { get; set; }\r\n\r\n        private bool _isManipulating;\r\n        \r\n        private bool _hasManipulatingDelta;\r\n\r\n        private readonly Dictionary<Picture, PhotoFile> _selectedPictures = new Dictionary<Picture, PhotoFile>(); \r\n\r\n        private PictureAlbumCollection _allAlbums;\r\n\r\n        public event EventHandler<PickEventArgs> Pick;\r\n\r\n        protected virtual void RaisePick(PickEventArgs e)\r\n        {\r\n            var handler = Pick;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public OpenPhotoPicker()\r\n        {\r\n            InitializeComponent();\r\n\r\n            InitilalizeMediaLibrary();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                ((SolidColorBrush) Resources[\"BackgroundBrush\"]).Color = ((SolidColorBrush) Resources[\"LightThemeBackgroundBrush\"]).Color;\r\n            }\r\n            else\r\n            {\r\n                ((SolidColorBrush)Resources[\"BackgroundBrush\"]).Color = ((SolidColorBrush)Resources[\"DarkThemeBackgroundBrush\"]).Color;\r\n            }\r\n\r\n            Loaded += OnLoaded;\r\n        }\r\n\r\n        ~OpenPhotoPicker()\r\n        {\r\n\r\n        }\r\n\r\n        private TelegramAppBarButton _selectButton;\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= OnLoaded;\r\n\r\n            _selectButton = AppBar.Buttons[0] as TelegramAppBarButton;\r\n\r\n            BeginOpenStoryboard();\r\n        }\r\n\r\n        private void InitilalizeMediaLibrary()\r\n        {\r\n            MediaLibrary ml = null;\r\n\r\n            foreach (MediaSource source in MediaSource.GetAvailableMediaSources())\r\n            {\r\n                if (source.MediaSourceType == MediaSourceType.LocalDevice)\r\n                {\r\n                    ml = new MediaLibrary(source);\r\n                    _allAlbums = ml.RootPictureAlbum.Albums;\r\n                    _enumerator = _allAlbums.GetEnumerator();\r\n                    if (_enumerator.MoveNext())\r\n                    {\r\n                        CurrentAlbum = _enumerator.Current;\r\n                        Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                        {\r\n                            MakePhotoAlbum(_enumerator.Current);\r\n                        });\r\n                    }\r\n\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                    {\r\n                        if (Folders.ItemsSource == null)\r\n                        {\r\n                            _albums = ml.RootPictureAlbum.Albums.ToList();\r\n                            Folders.ItemsSource = ml.RootPictureAlbum.Albums.ToList();\r\n                            Folders.SelectedIndex = 0;\r\n                        }\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty CurrentAlbumProperty = DependencyProperty.Register(\r\n            \"CurrentAlbum\", typeof (PictureAlbum), typeof (OpenPhotoPicker), new PropertyMetadata(default(PictureAlbum)));\r\n\r\n        public PictureAlbum CurrentAlbum\r\n        {\r\n            get { return (PictureAlbum) GetValue(CurrentAlbumProperty); }\r\n            set { SetValue(CurrentAlbumProperty, value); }\r\n        }\r\n\r\n        private PictureAlbum _album;\r\n        \r\n        private void MakePhotoAlbum(PictureAlbum album)\r\n        {\r\n            PhotoRow currentRow = null;\r\n            var stopwatch = Stopwatch.StartNew();\r\n            var photoFiles = new List<PhotoFile>();\r\n            var photoRow = new ObservableCollection<PhotoRow>();\r\n            var secondSlice = new List<PhotoFile>();\r\n            _album = album;\r\n            if (_album.Pictures.Count > 0)\r\n            {\r\n                var cropedFiles = _album.Pictures.OrderByDescending(x => x.Date).ToList();\r\n                var maxCount = 12;\r\n                for (var i = 0; i < cropedFiles.Count; i++)\r\n                {\r\n                    var p = cropedFiles[i];\r\n                    var photoFile = new PhotoFile { Picture = p, SuppressAnimation = true, IsSelected = _selectedPictures.ContainsKey(p) };\r\n\r\n                    if (i < maxCount)\r\n                    {\r\n                        if (i % 3 == 0)\r\n                        {\r\n                            currentRow = new PhotoRow();\r\n                            photoRow.Add(currentRow);\r\n                        }\r\n                        Stream thumbnail;\r\n                        try\r\n                        {\r\n                            thumbnail = p.GetThumbnail();\r\n                        }\r\n                        catch (Exception e)\r\n                        {\r\n                            Log.Write(string.Format(\"OpenPhotoPicker File getThumbnail exception album={0} file={1}\\n{2}\", album.Name, p.Name, e));\r\n                            cropedFiles.RemoveAt(i--);\r\n                            continue;\r\n                        }\r\n\r\n                        photoFile.IsForeground = true;\r\n                        photoFile.Thumbnail = new WeakReference<Stream>(thumbnail);\r\n                        photoFiles.Add(photoFile);\r\n                        currentRow.Add(photoFile);\r\n                        photoFile.Row = currentRow;\r\n                    }\r\n                    else\r\n                    {\r\n                        secondSlice.Add(photoFile);\r\n                    }\r\n                }\r\n            }\r\n\r\n            System.Diagnostics.Debug.WriteLine(stopwatch.Elapsed);\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                CurrentAlbum = album;\r\n                if (photoRow.Count < 4)\r\n                {\r\n                    Photos.VerticalAlignment = VerticalAlignment.Bottom;\r\n                }\r\n                else\r\n                {\r\n                    Photos.VerticalAlignment = VerticalAlignment.Stretch;\r\n                }\r\n                Photos.ItemsSource = photoRow;\r\n                //LayoutRoot.Background = new SolidColorBrush(Color.FromArgb(128, 0, 0, 0));\r\n\r\n\r\n                Photos.Visibility = Visibility.Visible;\r\n                Photos.Opacity = 0.0;\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Photos.Opacity = 1.0;\r\n                    var storyboard = new Storyboard();\r\n                    var translateAnimaiton = new DoubleAnimationUsingKeyFrames();\r\n                    translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = Photos.ActualHeight });\r\n                    translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0.0, EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut } });\r\n                    Storyboard.SetTarget(translateAnimaiton, Photos);\r\n                    Storyboard.SetTargetProperty(translateAnimaiton, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n                    storyboard.Children.Add(translateAnimaiton);\r\n\r\n                    storyboard.Begin();\r\n\r\n                    if (secondSlice.Count > 0)\r\n                    {\r\n                        storyboard.Completed += (o, e) =>\r\n                        {\r\n                            for (var i = 0; i < secondSlice.Count; i++)\r\n                            {\r\n                                if (i % 3 == 0)\r\n                                {\r\n                                    currentRow = new PhotoRow();\r\n                                    photoRow.Add(currentRow);\r\n                                }\r\n\r\n                                photoFiles.Add(secondSlice[i]);\r\n                                currentRow.Add(secondSlice[i]);\r\n                                secondSlice[i].Row = currentRow;\r\n                            }\r\n                        };\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n        private void PhotoControl_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var control = sender as PhotoControl;\r\n            if (control != null)\r\n            {\r\n                var file1 = control.File;\r\n                if (file1 != null)\r\n                {\r\n                    ChangePictureSelection(file1, !file1.IsSelected);\r\n                }\r\n            }\r\n        }\r\n\r\n        private PhotoFile _previousFile;\r\n\r\n        private void ChangePictureSelection(PhotoFile file1, bool isSelected)\r\n        {\r\n            var index = 0;\r\n            // select middle item first of all\r\n            if (!IsSingleItem\r\n                && _hasManipulatingDelta\r\n                && _previousFile != null\r\n                && _previousFile.Row == file1.Row\r\n                && file1.Row.File2.IsSelected != isSelected)\r\n            {\r\n                var row = file1.Row;\r\n                if (\r\n                    (row.File1 == _previousFile && row.File3 == file1)\r\n                    || (row.File3 == _previousFile && row.File1 == file1))\r\n                {\r\n                    if (isSelected)\r\n                    {\r\n                        _selectedPictures[row.File2.Picture] = row.File2;\r\n\r\n                        index = _selectedPictures.Count;\r\n                    }\r\n                    else\r\n                    {\r\n                        _selectedPictures.Remove(row.File2.Picture);\r\n\r\n                        foreach (var photoFile in _selectedPictures.Values)\r\n                        {\r\n                            if (photoFile.Index > row.File2.Index)\r\n                            {\r\n                                photoFile.Index--;\r\n                                photoFile.RaisePropertyChanged(\"Index\");\r\n                            }\r\n                        }\r\n\r\n                        index = 0;\r\n                    }\r\n\r\n                    row.File2.SuppressAnimation = false;\r\n                    row.File2.IsSelected = isSelected;\r\n                    row.File2.RaisePropertyChanged(\"IsSelected\");\r\n                    row.File2.Index = index;\r\n                    row.File2.RaisePropertyChanged(\"Index\");\r\n                }\r\n            }\r\n\r\n\r\n            if (isSelected)\r\n            {\r\n                _selectedPictures[file1.Picture] = file1;\r\n\r\n                index = _selectedPictures.Count;\r\n            }\r\n            else\r\n            {\r\n                _selectedPictures.Remove(file1.Picture);\r\n\r\n                foreach (var photoFile in _selectedPictures.Values)\r\n                {\r\n                    if (photoFile.Index > file1.Index)\r\n                    {\r\n                        photoFile.Index--;\r\n                        photoFile.RaisePropertyChanged(\"Index\");\r\n                    }\r\n                }\r\n\r\n                index = 0;\r\n            }\r\n\r\n            file1.SuppressAnimation = false;\r\n            file1.IsSelected = isSelected;\r\n            file1.RaisePropertyChanged(\"IsSelected\");\r\n            file1.Index = index;\r\n            file1.RaisePropertyChanged(\"Index\");\r\n\r\n            _previousFile = file1;\r\n\r\n            _selectButton.IsEnabled = _selectedPictures.Any();\r\n\r\n            if (IsSingleItem)\r\n            {\r\n                ChooseButton_OnClick(null, null);\r\n                LayoutRoot.IsHitTestVisible = false;\r\n            }\r\n        }\r\n\r\n        private void Photos_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            _hasManipulatingDelta = false;\r\n        }\r\n\r\n        private void Photos_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            _hasManipulatingDelta = false;\r\n        }\r\n\r\n        private bool _isSelected;\r\n        private IEnumerator<PictureAlbum> _enumerator;\r\n\r\n        private void Photos_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            if (IsSingleItem) return;\r\n\r\n            if (!_hasManipulatingDelta)\r\n            {\r\n                var grid = e.OriginalSource as Grid;\r\n\r\n                if (grid != null)\r\n                {\r\n                    var control = grid.Parent as PhotoControl;\r\n                    if (control != null)\r\n                    {\r\n                        var file1 = control.File;\r\n                        if (file1 != null)\r\n                        {\r\n                            ChangePictureSelection(file1, !file1.IsSelected);\r\n                            _isSelected = file1.IsSelected;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            _hasManipulatingDelta = true;\r\n        }\r\n\r\n        private void PhotoControl_OnMouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            if (!_hasManipulatingDelta) return;\r\n\r\n            var control = sender as PhotoControl;\r\n            if (control != null)\r\n            {\r\n                var file1 = control.File;\r\n                if (file1 != null && file1.IsSelected != _isSelected)\r\n                {\r\n                    ChangePictureSelection(file1, _isSelected);\r\n                }\r\n            }\r\n        }\r\n\r\n        public event EventHandler Close;\r\n\r\n        protected virtual void RaiseClose()\r\n        {\r\n            EventHandler handler = Close;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            BeginCloseStoryboard(RaiseClose);\r\n            //RaiseClose();\r\n        }\r\n\r\n        public async void StartPreview()\r\n        {\r\n            var devices = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture);\r\n            var deviceInfo = devices[0]; //grab first result\r\n            DeviceInformation rearCamera = null;\r\n            foreach (var device in devices)\r\n            {\r\n                if (device.Name.ToLowerInvariant().Contains(\"front\"))\r\n                {\r\n                    DeviceInformation frontCamera;\r\n                    deviceInfo = frontCamera = device;\r\n                    var hasFrontCamera = true;\r\n                }\r\n                if (device.Name.ToLowerInvariant().Contains(\"back\"))\r\n                {\r\n                    rearCamera = device;\r\n                }\r\n            }\r\n\r\n            var mediaSettings = new MediaCaptureInitializationSettings\r\n            {\r\n                MediaCategory = MediaCategory.Communications,\r\n                StreamingCaptureMode = StreamingCaptureMode.AudioAndVideo,\r\n                VideoDeviceId = rearCamera.Id\r\n            };\r\n\r\n            var mediaCaptureManager = new Windows.Media.Capture.MediaCapture();\r\n            await mediaCaptureManager.InitializeAsync(mediaSettings);\r\n\r\n            var previewSink = new Windows.Phone.Media.Capture.MediaCapturePreviewSink();\r\n\r\n            // List of supported video preview formats to be used by the default preview format selector.\r\n            var supportedVideoFormats = new List<string> { \"nv12\", \"rgb32\" };\r\n\r\n            // Find the supported preview format\r\n            var availableMediaStreamProperties =\r\n                mediaCaptureManager.VideoDeviceController.GetAvailableMediaStreamProperties(\r\n                Windows.Media.Capture.MediaStreamType.VideoPreview)\r\n                    .OfType<Windows.Media.MediaProperties.VideoEncodingProperties>()\r\n                    .Where(p => p != null\r\n                        && !String.IsNullOrEmpty(p.Subtype)\r\n                        && supportedVideoFormats.Contains(p.Subtype.ToLower()))\r\n                    .ToList();\r\n            var previewFormat = availableMediaStreamProperties.FirstOrDefault();\r\n            foreach (var property in availableMediaStreamProperties)\r\n            {\r\n                if (previewFormat.Width < property.Width)\r\n                {\r\n                    previewFormat = property;\r\n                }\r\n            }\r\n            //previewFormat.Width = 480;\r\n            //previewFormat.Height = 480;\r\n            // Start Preview stream\r\n            await mediaCaptureManager.VideoDeviceController.SetMediaStreamPropertiesAsync(Windows.Media.Capture.MediaStreamType.VideoPreview, previewFormat);\r\n            await mediaCaptureManager.StartPreviewToCustomSinkAsync(new Windows.Media.MediaProperties.MediaEncodingProfile { Video = previewFormat }, previewSink);\r\n\r\n            var viewfinderBrush = new VideoBrush{ Stretch = Stretch.Uniform };\r\n            // Set the source of the VideoBrush used for your preview\r\n            Microsoft.Devices.CameraVideoBrushExtensions.SetSource(viewfinderBrush, previewSink);\r\n            CameraPreview.Background = viewfinderBrush;\r\n\r\n\r\n            mediaCaptureManager.SetPreviewRotation(VideoRotation.Clockwise90Degrees);\r\n        }\r\n\r\n        private async void ChooseButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var selectedPhoto = _selectedPictures.Values.OrderBy(x => x.Index).ToList();\r\n\r\n            var picturesLibrary = KnownFolders.PicturesLibrary;\r\n            if (picturesLibrary != null)\r\n            {\r\n                var folder = await picturesLibrary.GetFolderAsync(_album.Name);\r\n                var folders = await picturesLibrary.GetFoldersAsync();\r\n\r\n                if (folder != null)\r\n                {\r\n                    var getFileOperations = new List<Task<StorageFile>>();\r\n\r\n                    foreach (var file in selectedPhoto)\r\n                    {\r\n                        getFileOperations.Add(Task.Run(async () =>\r\n                        {\r\n                            var f = new List<StorageFolder>();\r\n                            foreach (var storageFolder in folders)\r\n                            {\r\n                                if (storageFolder.Name == file.Picture.Album.Name)\r\n                                {\r\n                                    f.Add(storageFolder);\r\n                                    try\r\n                                    {\r\n                                        var returnFile = await storageFolder.GetFileAsync(file.Picture.Name);\r\n                                        return returnFile;\r\n                                    }\r\n                                    catch (Exception ex)\r\n                                    {\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            string filePath = string.Empty;\r\n                            try\r\n                            {\r\n                                filePath = file.Picture.GetPath();\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                \r\n                            }\r\n\r\n                            Log.Write(string.Format(\"OpenPhotoPicker File '{0}' is missing at folder '{1}'\\nPath={2}\\nFolders\\n{3}\", file.Picture.Name, file.Picture.Album, filePath, string.Join(Environment.NewLine, folders.Select(x => string.Format(\"Name='{0}' DisplayName='{1}' Path='{2}'\", x.Name, x.DisplayName, x.Path)))));\r\n                            \r\n                            try\r\n                            {\r\n                                using (var imageStream = file.Picture.GetImage())\r\n                                {\r\n                                    var localFileName = string.Format(\"{0}_{1}_{2}\", imageStream.Length, file.Picture.Album.Name, file.Picture.Name);\r\n                                    try\r\n                                    {\r\n                                        var localFile = await ApplicationData.Current.LocalFolder.GetFileAsync(localFileName);\r\n                                        return localFile;\r\n                                    }\r\n                                    catch (Exception ex)\r\n                                    {\r\n\r\n                                    }\r\n\r\n                                    var newFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(localFileName, CreationCollisionOption.ReplaceExisting);\r\n                                    using (Stream outputStream = await newFile.OpenStreamForWriteAsync())\r\n                                    {\r\n                                        await imageStream.CopyToAsync(outputStream);\r\n                                    }\r\n                                    return newFile;\r\n                                }\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                \r\n                            }\r\n\r\n                            try\r\n                            {\r\n                                using (var imageStream = file.Picture.GetThumbnail())\r\n                                {\r\n                                    var localFileName = string.Format(\"{0}_{1}_{2}\", imageStream.Length, file.Picture.Album.Name, file.Picture.Name);\r\n                                    try\r\n                                    {\r\n                                        var localFile = await ApplicationData.Current.LocalFolder.GetFileAsync(localFileName);\r\n                                        return localFile;\r\n                                    }\r\n                                    catch (Exception ex)\r\n                                    {\r\n\r\n                                    }\r\n\r\n                                    var newFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(localFileName, CreationCollisionOption.ReplaceExisting);\r\n                                    using (Stream outputStream = await newFile.OpenStreamForWriteAsync())\r\n                                    {\r\n                                        await imageStream.CopyToAsync(outputStream);\r\n                                    }\r\n                                    return newFile;\r\n                                }\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n\r\n                            }\r\n\r\n                            return null;\r\n                        }));\r\n                    }\r\n                    // wait for all operations in parallel\r\n                    var result = await Task.WhenAll(getFileOperations);\r\n                    var files = new List<StorageFile>(); \r\n                    var photoFiles = new List<PhotoFile>();\r\n\r\n                    for (var i = 0; i < result.Length; i++)\r\n                    {\r\n                        if (result[i] != null)\r\n                        {\r\n                            files.Add(result[i]);\r\n                            photoFiles.Add(selectedPhoto[i]);\r\n                        }\r\n                    }\r\n\r\n                    RaisePick(new PickEventArgs{ Files = new ReadOnlyCollection<StorageFile>(files), PhotoFiles = new ReadOnlyCollection<PhotoFile>(photoFiles)} );\r\n                    //MessageBox.Show(\"Files selected: \" + files.Count(x => x != null));\r\n                    System.Diagnostics.Debug.WriteLine(files.Count());\r\n                }\r\n            }\r\n        }\r\n\r\n        private Popup _popup;\r\n        private List<PictureAlbum> _albums;\r\n\r\n        private void ChangeButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n\r\n            return;\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                if (_enumerator.MoveNext())\r\n                {\r\n                    MakePhotoAlbum(_enumerator.Current);\r\n                }\r\n                else\r\n                {\r\n                    _enumerator.Reset();\r\n                    if (_enumerator.MoveNext())\r\n                    {\r\n                        MakePhotoAlbum(_enumerator.Current);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n\r\n        private void BeginOpenStoryboard()\r\n        {\r\n            LayoutRoot.IsHitTestVisible = true;\r\n            Bar.Visibility = Visibility.Collapsed;\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimaiton = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0.0, EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut } });\r\n            Storyboard.SetTarget(translateAnimaiton, Bar);\r\n            Storyboard.SetTargetProperty(translateAnimaiton, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateAnimaiton);\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                Bar.Visibility = Visibility.Visible;\r\n                storyboard.Begin();\r\n            });\r\n        }\r\n\r\n        private void BeginCloseStoryboard(Action callback)\r\n        {\r\n            LayoutRoot.IsHitTestVisible = false;\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, Photos);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            var translateBarAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0 });\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateBarAniamtion, Bar);\r\n            Storyboard.SetTargetProperty(translateBarAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateBarAniamtion);\r\n\r\n            storyboard.Begin();\r\n            if (callback != null)\r\n            {\r\n                storyboard.Completed += (o, e) => callback();\r\n            }\r\n        }\r\n\r\n        private void Album_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            //ToggleFoldersVisibility();\r\n\r\n            var frameworkElement = sender as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var album = frameworkElement.DataContext as PictureAlbum;\r\n                if (album != null)\r\n                {\r\n                    Folders.SelectedItem = album;\r\n\r\n                    Folders.UpdateLayout();\r\n                    Folders.ScrollIntoView(album);\r\n\r\n\r\n                    Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                    {\r\n                        MakePhotoAlbum(album);\r\n                    });\r\n                }\r\n            }\r\n        }\r\n\r\n        public bool TryClose()\r\n        {\r\n            BeginCloseStoryboard(RaiseClose);\r\n\r\n            return true;\r\n        }\r\n\r\n        private void Folders_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void Folders_OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n\r\n        }\r\n    }\r\n\r\n    public class PhotoRow\r\n    {\r\n        public PhotoFile File1 { get; set; }\r\n        public PhotoFile File2 { get; set; }\r\n        public PhotoFile File3 { get; set; }\r\n\r\n        public void Add(PhotoFile file)\r\n        {\r\n            if (File1 == null) File1 = file;\r\n            else if (File2 == null) File2 = file;\r\n            else if (File3 == null) File3 = file;\r\n        }\r\n    }\r\n\r\n    public class PhotoFile : INotifyPropertyChanged\r\n    {\r\n        public int Index { get; set; }\r\n        public bool IsSelected { get; set; }\r\n\r\n        public WeakReference<Stream> Thumbnail { get; set; }\r\n        public Picture Picture { get; set; }\r\n        public PhotoFile Self { get { return this; } }\r\n        public bool IsForeground { get; set; }\r\n        public PhotoRow Row { get; set; }\r\n\r\n        public bool SuppressAnimation { get; set; }\r\n\r\n        public event PropertyChangedEventHandler PropertyChanged;\r\n\r\n        public virtual void RaisePropertyChanged([CallerMemberName] string propertyName = null)\r\n        {\r\n            PropertyChangedEventHandler handler = PropertyChanged;\r\n            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));\r\n        }\r\n    }\r\n\r\n    public class PickEventArgs\r\n    {\r\n        public ReadOnlyCollection<StorageFile> Files { get; set; }\r\n\r\n        public ReadOnlyCollection<PhotoFile> PhotoFiles { get; set; } \r\n    }\r\n\r\n    public class PhotoConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var photoFile = value as PhotoFile;\r\n            if (photoFile != null)\r\n            {\r\n                var picture = photoFile.Picture;\r\n                Stream thumbnail = null;\r\n\r\n                if (photoFile.Thumbnail == null\r\n                    || !photoFile.Thumbnail.TryGetTarget(out thumbnail))\r\n                {\r\n                    Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                    {\r\n                        thumbnail = picture.GetThumbnail();\r\n                        photoFile.Thumbnail = new WeakReference<Stream>(thumbnail);\r\n\r\n                        Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            photoFile.RaisePropertyChanged(\"Self\");\r\n                        });\r\n                    });\r\n\r\n                    return null;\r\n                }\r\n\r\n                var b = new BitmapImage();\r\n                if (!photoFile.IsForeground)\r\n                {\r\n                    b.CreateOptions = BitmapCreateOptions.BackgroundCreation;\r\n                }\r\n\r\n                b.SetSource(thumbnail);\r\n\r\n                return b;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/PhotoControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.PhotoControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"CustomAccentBrush\" Color=\"#FF29B6F6\"/>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Width=\"146\" Height=\"146\" Background=\"Transparent\" IsHitTestVisible=\"True\">\r\n        <Border x:Name=\"ChromeBorder\" Background=\"{StaticResource PhoneChromeBrush}\" IsHitTestVisible=\"False\"/>\r\n        <Image x:Name=\"ImageControl\" Stretch=\"UniformToFill\" IsHitTestVisible=\"False\"/>\r\n        <Border x:Name=\"SelectionBorder\" IsHitTestVisible=\"False\" BorderThickness=\"3\" BorderBrush=\"{StaticResource CustomAccentBrush}\"/>\r\n        <controls:SelectionControl x:Name=\"SelectionControl\" Margin=\"12\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/PhotoControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class PhotoControl\r\n    {\r\n        public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(\r\n            \"Source\", typeof (ImageSource), typeof (PhotoControl), new PropertyMetadata(default(ImageSource), OnSourceChanged));\r\n\r\n        private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var photoControl = d as PhotoControl;\r\n            if (photoControl != null)\r\n            {\r\n                var source = (ImageSource) e.NewValue;\r\n\r\n                photoControl.ImageControl.Source = source;\r\n            }\r\n        }\r\n\r\n        public ImageSource Source\r\n        {\r\n            get { return (ImageSource) GetValue(SourceProperty); }\r\n            set { SetValue(SourceProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty IndexProperty = DependencyProperty.Register(\r\n            \"Index\", typeof(int), typeof(PhotoControl), new PropertyMetadata(default(int), OnIndexChanged));\r\n\r\n        private static void OnIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var photoControl = d as PhotoControl;\r\n            if (photoControl != null)\r\n            {\r\n                var index = (int) e.NewValue;\r\n                var isSelected = index > 0;\r\n\r\n                photoControl.SelectionControl.SuppressAnimation = photoControl.File != null && photoControl.File.SuppressAnimation;\r\n                photoControl.SelectionControl.IsSelected = isSelected;\r\n                photoControl.SelectionControl.Index = index;\r\n\r\n                photoControl.SelectionBorder.Visibility = isSelected\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public int Index\r\n        {\r\n            get { return (int) GetValue(IndexProperty); }\r\n            set { SetValue(IndexProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(\r\n            \"IsSelected\", typeof (bool), typeof (PhotoControl), new PropertyMetadata(default(bool), OnIsSelectedChanged));\r\n\r\n        private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var photoControl = d as PhotoControl;\r\n            if (photoControl != null)\r\n            {\r\n                var isSelected = (bool) e.NewValue;\r\n\r\n                photoControl.SelectionControl.SuppressAnimation = photoControl.File != null && photoControl.File.SuppressAnimation;\r\n                photoControl.SelectionControl.IsSelected = isSelected;\r\n\r\n                photoControl.SelectionBorder.Visibility = isSelected\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return (bool) GetValue(IsSelectedProperty); }\r\n            set { SetValue(IsSelectedProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty FileProperty = DependencyProperty.Register(\r\n            \"File\", typeof (PhotoFile), typeof (PhotoControl), new PropertyMetadata(default(PhotoFile), OnFileChanged));\r\n\r\n        private static void OnFileChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var photoControl = d as PhotoControl;\r\n            if (photoControl != null)\r\n            {\r\n                var file = e.NewValue as PhotoFile;\r\n\r\n                photoControl.LayoutRoot.Visibility = file != null\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public PhotoFile File\r\n        {\r\n            get { return (PhotoFile) GetValue(FileProperty); }\r\n            set { SetValue(FileProperty, value); }\r\n        }\r\n\r\n        public PhotoControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            LayoutRoot.Visibility = Visibility.Collapsed;\r\n            SelectionBorder.Visibility = Visibility.Collapsed;\r\n            SelectionControl.IsSelected = false;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/Progress.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.Progress\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Border x:Name=\"BackgrondElement\" Tap=\"Border_OnTap\" CornerRadius=\"32\" Background=\"#7F000000\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Width=\"64\" Height=\"64\"/>\r\n        <Image x:Name=\"CancelButton\" IsHitTestVisible=\"False\" Source=\"/Images/ApplicationBar/appbar.cancel.rest.png\" Width=\"48\" Height=\"48\"/>\r\n        <controls:ProgressPieSlice x:Name=\"Indicator\" IsHitTestVisible=\"False\" CacheMode=\"BitmapCache\" Stroke=\"White\" StrokeThickness=\"4\" StrokeStartLineCap=\"Round\"  StrokeEndLineCap=\"Round\" Radius=\"28\" StartAngle=\"0\" Angle=\"0\">\r\n            <controls:ProgressPieSlice.RenderTransform>\r\n                <RotateTransform x:Name=\"Rotation\" CenterX=\"30\" CenterY=\"30\" Angle=\"0\"/>\r\n            </controls:ProgressPieSlice.RenderTransform>\r\n        </controls:ProgressPieSlice>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/Progress.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class Progress\r\n    {\r\n        public Brush BackgroundBrush\r\n        {\r\n            get { return BackgrondElement.Background; }\r\n            set { BackgrondElement.Background = value; }\r\n        }\r\n\r\n        public static readonly DependencyProperty CancelVisibilityProperty = DependencyProperty.Register(\r\n            \"CancelVisibility\", typeof (Visibility), typeof (Progress), new PropertyMetadata(default(Visibility), OnCancelVisibilityChanged));\r\n\r\n        private static void OnCancelVisibilityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var progress = (Progress)d;\r\n            if (progress != null)\r\n            {\r\n                progress.CancelButton.Visibility = (Visibility) e.NewValue;\r\n            }\r\n        }\r\n\r\n        public Visibility CancelVisibility\r\n        {\r\n            get { return (Visibility) GetValue(CancelVisibilityProperty); }\r\n            set { SetValue(CancelVisibilityProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(\r\n            \"Value\", typeof(double), typeof(Progress), new PropertyMetadata(default(double), OnValueChanged));\r\n\r\n        private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var progress = (Progress)d;\r\n            if (progress != null)\r\n            {\r\n                double newAngle = 0.0;\r\n                if (e.OldValue != null\r\n                    && e.NewValue != null\r\n                    && (double) e.OldValue > 0.0\r\n                    && (double) e.OldValue < 1.0\r\n                    && (double) e.NewValue == 0.0)\r\n                {\r\n                    newAngle = 0.0; //359.0;\r\n                }\r\n                else\r\n                {\r\n                    newAngle = (double)e.NewValue * 359.0;\r\n                    if (newAngle < 0.0)\r\n                    {\r\n                        newAngle = 0.0;\r\n                    }\r\n                    else if (newAngle > 359.0)\r\n                    {\r\n                        newAngle = 359.0;\r\n                    }\r\n                }\r\n\r\n                if (newAngle != progress.Indicator.Angle)\r\n                {\r\n                    if (newAngle > 0.0 && newAngle < 359.0)\r\n                    {\r\n                        progress.Visibility = Visibility.Visible;\r\n                    }\r\n\r\n                    progress._angleStoryboard.Stop();\r\n                    if (newAngle > progress.Indicator.Angle)\r\n                    {\r\n                        var doubleAnimation = (DoubleAnimation)progress._angleStoryboard.Children[0];\r\n                        doubleAnimation.To = newAngle;\r\n                        progress._angleStoryboard.Begin();\r\n                    }\r\n                    else\r\n                    {\r\n                        progress.Indicator.Angle = newAngle;\r\n                        if (progress.Value >= 1.0 || progress.Value <= 0.0)\r\n                        {\r\n                            progress.Visibility = Visibility.Collapsed;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public double Value\r\n        {\r\n            get { return (double)GetValue(ValueProperty); }\r\n            set { SetValue(ValueProperty, value); }\r\n        }\r\n\r\n        private readonly Storyboard _angleStoryboard;\r\n\r\n        private readonly Storyboard _foreverStoryboard;\r\n\r\n        public Progress()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Visibility = Visibility.Collapsed;\r\n\r\n            _foreverStoryboard = new Storyboard { RepeatBehavior = RepeatBehavior.Forever };\r\n            var animation = new DoubleAnimation\r\n            {\r\n                From = 0,\r\n                To = 360,\r\n                Duration = TimeSpan.FromSeconds(3.0)\r\n            };\r\n            Storyboard.SetTarget(animation, Rotation);\r\n            Storyboard.SetTargetProperty(animation, new PropertyPath(\"(RotateTransform.Angle)\"));\r\n            _foreverStoryboard.Children.Add(animation);\r\n            _foreverStoryboard.Completed += OnForeverStoryboardCompleted;\r\n\r\n\r\n            _angleStoryboard = new Storyboard();\r\n            var angleAnimation = new DoubleAnimation\r\n            {\r\n                Duration = TimeSpan.FromSeconds(.25),\r\n            };\r\n            Storyboard.SetTarget(angleAnimation, Indicator);\r\n            Storyboard.SetTargetProperty(angleAnimation, new PropertyPath(\"Angle\"));\r\n            _angleStoryboard.Children.Add(angleAnimation);\r\n            _angleStoryboard.Completed += OnAngleStoryboardCompleted;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                _foreverStoryboard.RepeatBehavior = RepeatBehavior.Forever;\r\n                _foreverStoryboard.Begin();\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                _foreverStoryboard.RepeatBehavior = new RepeatBehavior(1.0);\r\n            };\r\n\r\n        }\r\n\r\n        private void OnAngleStoryboardCompleted(object sender, System.EventArgs e)\r\n        {\r\n            if (Value >= 1.0 || Value <= 0.0)\r\n            {\r\n                Visibility = Visibility.Collapsed;\r\n                RaiseCompleted();\r\n            }\r\n        }\r\n\r\n        public event EventHandler Completed;\r\n\r\n        protected virtual void RaiseCompleted()\r\n        {\r\n            var handler = Completed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void OnForeverStoryboardCompleted(object sender, System.EventArgs e)\r\n        {\r\n\r\n\r\n        }\r\n\r\n        private void Border_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (Value > 0.0 && Value < 1.0)\r\n            {\r\n                RaiseCancel(e);\r\n                Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public event EventHandler<GestureEventArgs> Cancel;\r\n\r\n        protected virtual void RaiseCancel(GestureEventArgs args)\r\n        {\r\n            var handler = Cancel;\r\n            if (handler != null) handler(this, args);\r\n        }\r\n    }\r\n\r\n    public class ProgressPieSlice : Path\r\n    {\r\n        private bool m_HasLoaded = false;\r\n\r\n        public ProgressPieSlice()\r\n        {\r\n            Loaded += (s, e) =>\r\n            {\r\n                m_HasLoaded = true;\r\n                UpdatePath();\r\n            };\r\n        }\r\n\r\n        // StartAngle\r\n        public static readonly DependencyProperty StartAngleProperty\r\n            = DependencyProperty.Register(\"StartAngle\", typeof(double), typeof(ProgressPieSlice),\r\n            new PropertyMetadata(DependencyProperty.UnsetValue, (s, e) => { Changed(s as ProgressPieSlice); }));\r\n        public double StartAngle\r\n        {\r\n            get { return (double)GetValue(StartAngleProperty); }\r\n            set { SetValue(StartAngleProperty, value); }\r\n        }\r\n\r\n        // Angle\r\n        public static readonly DependencyProperty AngleProperty\r\n            = DependencyProperty.Register(\"Angle\", typeof(double), typeof(ProgressPieSlice),\r\n            new PropertyMetadata(DependencyProperty.UnsetValue, (s, e) => { Changed(s as ProgressPieSlice); }));\r\n        public double Angle\r\n        {\r\n            get { return (double)GetValue(AngleProperty); }\r\n            set { SetValue(AngleProperty, value); }\r\n        }\r\n\r\n        // Radius\r\n        public static readonly DependencyProperty RadiusProperty\r\n            = DependencyProperty.Register(\"Radius\", typeof(double), typeof(ProgressPieSlice),\r\n            new PropertyMetadata(DependencyProperty.UnsetValue, (s, e) => { Changed(s as ProgressPieSlice); }));\r\n        public double Radius\r\n        {\r\n            get { return (double)GetValue(RadiusProperty); }\r\n            set { SetValue(RadiusProperty, value); }\r\n        }\r\n\r\n        private static void Changed(ProgressPieSlice pieSlice)\r\n        {\r\n            if (pieSlice.m_HasLoaded)\r\n                pieSlice.UpdatePath();\r\n        }\r\n\r\n        public void UpdatePath()\r\n        {\r\n            // ensure variables\r\n            if (GetValue(StartAngleProperty) == DependencyProperty.UnsetValue)\r\n                throw new ArgumentNullException(\"Start Angle is required\");\r\n            if (GetValue(RadiusProperty) == DependencyProperty.UnsetValue)\r\n                throw new ArgumentNullException(\"Radius is required\");\r\n            if (GetValue(AngleProperty) == DependencyProperty.UnsetValue)\r\n                throw new ArgumentNullException(\"Angle is required\");\r\n\r\n            Width = Height = 2 * Radius + StrokeThickness;\r\n            var endAngle = StartAngle + Angle;\r\n\r\n            // path container\r\n            var figure = new PathFigure\r\n            {\r\n                StartPoint = new Point(Radius + StrokeThickness / 2.0, 0 + StrokeThickness / 2.0),\r\n                IsClosed = false,\r\n            };\r\n\r\n            // outer arc\r\n            var arcX = Radius + Math.Sin(endAngle * Math.PI / 180) * Radius + StrokeThickness / 2.0;\r\n            var arcY = Radius - Math.Cos(endAngle * Math.PI / 180) * Radius + StrokeThickness / 2.0;\r\n            var arcSize = new Size(Radius, Radius);\r\n            var arcPoint = new Point(arcX, arcY);\r\n            var arc = new ArcSegment\r\n            {\r\n                IsLargeArc = Angle >= 180.0,\r\n                Point = arcPoint,\r\n                Size = arcSize,\r\n                SweepDirection = SweepDirection.Clockwise,\r\n            };\r\n            figure.Segments.Add(arc);\r\n\r\n            // finalé\r\n            Data = new PathGeometry { Figures = { figure } };\r\n\r\n            InvalidateArrange();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/ProxyStatusControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.ProxyStatusControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <Style x:Key=\"ProxyProgressBarStyle\" TargetType=\"ProgressBar\">\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneProgressBarBackgroundBrush}\"/>\r\n            <Setter Property=\"Maximum\" Value=\"100\"/>\r\n            <Setter Property=\"IsHitTestVisible\" Value=\"False\"/>\r\n            <Setter Property=\"Padding\" Value=\"9,9,9,11\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"ProgressBar\">\r\n                        <Grid>\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Determinate\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Duration=\"0:00:0.5\" From=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"DeterminateIcon\"/>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DeterminateIcon\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0:00:0.0\" Value=\"Visible\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <DoubleAnimation Duration=\"0:00:0.5\" From=\"1\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"IndeterminateIcon\"/>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"IndeterminateIcon\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0:00:0.5\" Value=\"Collapsed\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ProgressIcon\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0:00:0.0\" Value=\"Collapsed\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Indeterminate\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"IndeterminateIcon\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0:00:0.0\" Value=\"Visible\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DeterminateIcon\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0:00:0.0\" Value=\"Collapsed\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <DoubleAnimation RepeatBehavior=\"Forever\" Storyboard.TargetProperty=\"Angle\" Storyboard.TargetName=\"Transform\" From=\"0\" To=\"360\" Duration=\"0:00:1.0\"/>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Grid Margin=\"{TemplateBinding Padding}\" Visibility=\"Visible\">\r\n                                <Image x:Name=\"DeterminateIcon\" Source=\"/Images/W10M/ic_proxy_on_2x.png\" Width=\"24\" VerticalAlignment=\"Center\" Visibility=\"Collapsed\"/>\r\n                                <Image x:Name=\"IndeterminateIcon\" Source=\"/Images/W10M/ic_proxy_off_2x.png\" Width=\"24\" VerticalAlignment=\"Center\" Visibility=\"Visible\"/>\r\n                                <Ellipse x:Name=\"ProgressIcon\" Width=\"8\" Height=\"8\" RenderTransformOrigin=\"0.5, 0.5\" Stroke=\"White\" StrokeThickness=\"1.5\" StrokeDashCap=\"Round\" StrokeDashArray=\"3 15\">\r\n                                    <Ellipse.RenderTransform>\r\n                                        <RotateTransform x:Name=\"Transform\" Angle=\"0\"/>\r\n                                    </Ellipse.RenderTransform>\r\n                                </Ellipse>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        \r\n        <Style x:Key=\"DirectProgressBarStyle\" TargetType=\"ProgressBar\">\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneProgressBarBackgroundBrush}\"/>\r\n            <Setter Property=\"Maximum\" Value=\"100\"/>\r\n            <Setter Property=\"IsHitTestVisible\" Value=\"False\"/>\r\n            <Setter Property=\"Padding\" Value=\"9,9,9,11\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"ProgressBar\">\r\n                        <Grid>\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Determinate\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Duration=\"0:00:0.5\" From=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"DeterminateIcon\"/>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DeterminateIcon\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0:00:0.0\" Value=\"Visible\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <DoubleAnimation Duration=\"0:00:0.5\" From=\"1\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"IndeterminateIcon\"/>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"IndeterminateIcon\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0:00:0.5\" Value=\"Collapsed\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ProgressIcon\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0:00:0.0\" Value=\"Collapsed\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Indeterminate\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"IndeterminateIcon\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0:00:0.0\" Value=\"Visible\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DeterminateIcon\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0:00:0.0\" Value=\"Collapsed\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <DoubleAnimation RepeatBehavior=\"Forever\" Storyboard.TargetProperty=\"Angle\" Storyboard.TargetName=\"Transform\" From=\"0\" To=\"360\" Duration=\"0:00:1.0\"/>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Grid Margin=\"{TemplateBinding Padding}\" Visibility=\"Visible\">\r\n                                <Image x:Name=\"DeterminateIcon\" Source=\"/Images/W10M/ic_proxy_off_2x.png\" Width=\"24\" VerticalAlignment=\"Center\" Visibility=\"Collapsed\"/>\r\n                                <Image x:Name=\"IndeterminateIcon\" Source=\"/Images/W10M/ic_proxy_off_2x.png\" Width=\"24\" VerticalAlignment=\"Center\" Visibility=\"Visible\"/>\r\n                                <Ellipse x:Name=\"ProgressIcon\" Width=\"8\" Height=\"8\" RenderTransformOrigin=\"0.5, 0.5\" Stroke=\"White\" StrokeThickness=\"1.5\" StrokeDashCap=\"Round\" StrokeDashArray=\"3 15\">\r\n                                    <Ellipse.RenderTransform>\r\n                                        <RotateTransform x:Name=\"Transform\" Angle=\"0\"/>\r\n                                    </Ellipse.RenderTransform>\r\n                                </Ellipse>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <ProgressBar x:Name=\"Progress\" IsIndeterminate=\"True\" Style=\"{StaticResource ProxyProgressBarStyle}\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/ProxyStatusControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class ProxyStatusControl\r\n    {\r\n        public static readonly DependencyProperty ConnectionTypeProperty = DependencyProperty.Register(\r\n            \"ConnectionType\", typeof(ConnectionType), typeof(ProxyStatusControl), new PropertyMetadata(default(ConnectionType), OnConnectionTypeChanged));\r\n\r\n        private static void OnConnectionTypeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var proxyStatusControl = d as ProxyStatusControl;\r\n            if (proxyStatusControl != null)\r\n            {\r\n                proxyStatusControl.Progress.Style = (ConnectionType) e.NewValue == ConnectionType.Direct\r\n                    ? (Style) proxyStatusControl.Resources[\"DirectProgressBarStyle\"]\r\n                    : (Style) proxyStatusControl.Resources[\"ProxyProgressBarStyle\"];\r\n            }\r\n        }\r\n\r\n        public ConnectionType ConnectionType\r\n        {\r\n            get { return (ConnectionType) GetValue(ConnectionTypeProperty); }\r\n            set { SetValue(ConnectionTypeProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty IsIndeterminateProperty = DependencyProperty.Register(\r\n            \"IsIndeterminate\", typeof(bool), typeof(ProxyStatusControl), new PropertyMetadata(true, OnIsIndeterminateChanged));\r\n\r\n        private static void OnIsIndeterminateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as ProxyStatusControl;\r\n            if (control != null)\r\n            {\r\n                control.Progress.IsIndeterminate = (bool)e.NewValue;\r\n            }\r\n        }\r\n\r\n        public bool IsIndeterminate\r\n        {\r\n            get { return (bool) GetValue(IsIndeterminateProperty); }\r\n            set { SetValue(IsIndeterminateProperty, value); }\r\n        }\r\n\r\n        public ProxyStatusControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n\r\n    public enum ConnectionType\r\n    {\r\n        Proxy,\r\n        Direct\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/RecordingControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.RecordingControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <Storyboard x:Name=\"Storyboard1\" RepeatBehavior=\"Forever\">\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation1\" Storyboard.TargetProperty=\"ScaleY\" From=\"0.4\" To=\"1.0\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation1\" Storyboard.TargetProperty=\"ScaleX\" From=\"0.4\" To=\"1.0\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Indicator1\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.4\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.8\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.2\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"Storyboard2\" RepeatBehavior=\"Forever\" BeginTime=\"0:0:0.4\">\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation2\" Storyboard.TargetProperty=\"ScaleY\" From=\"0.4\" To=\"1.0\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation2\" Storyboard.TargetProperty=\"ScaleX\" From=\"0.4\" To=\"1.0\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Indicator2\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.4\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.8\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.2\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"Storyboard3\" RepeatBehavior=\"Forever\" BeginTime=\"0:0:0.8\">\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation3\" Storyboard.TargetProperty=\"ScaleY\" From=\"0.4\" To=\"1.0\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimation Storyboard.TargetName=\"Rotation3\" Storyboard.TargetProperty=\"ScaleX\" From=\"0.4\" To=\"1.0\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Indicator3\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.4\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.8\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.2\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" Margin=\"-34,-11,0,-11\">\r\n        <controls:ProgressPieSlice x:Name=\"Indicator3\" Opacity=\"0\" IsHitTestVisible=\"False\" RenderTransformOrigin=\"0.5,0.5\" CacheMode=\"BitmapCache\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"2\" StrokeStartLineCap=\"Round\"  StrokeEndLineCap=\"Round\" Radius=\"24\" StartAngle=\"0\" Angle=\"33\"  UseLayoutRounding=\"False\">\r\n            <controls:ProgressPieSlice.RenderTransform>\r\n                <CompositeTransform x:Name=\"Rotation3\" Rotation=\"74\" ScaleY=\"1\" ScaleX=\"1\"/>\r\n            </controls:ProgressPieSlice.RenderTransform>\r\n        </controls:ProgressPieSlice>\r\n\r\n        <controls:ProgressPieSlice x:Name=\"Indicator1\" Opacity=\"0\" IsHitTestVisible=\"False\" RenderTransformOrigin=\"0.5,0.5\" CacheMode=\"BitmapCache\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"2\" StrokeStartLineCap=\"Round\"  StrokeEndLineCap=\"Round\" Radius=\"24\" StartAngle=\"0\" Angle=\"33\"  UseLayoutRounding=\"False\">\r\n            <controls:ProgressPieSlice.RenderTransform>\r\n                <CompositeTransform x:Name=\"Rotation1\" Rotation=\"74\" ScaleY=\".7\" ScaleX=\"0.7\"/>\r\n            </controls:ProgressPieSlice.RenderTransform>\r\n        </controls:ProgressPieSlice>\r\n\r\n        <controls:ProgressPieSlice x:Name=\"Indicator2\" Opacity=\"0\" IsHitTestVisible=\"False\" RenderTransformOrigin=\"0.5,0.5\" CacheMode=\"BitmapCache\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"2\" StrokeStartLineCap=\"Round\"  StrokeEndLineCap=\"Round\" Radius=\"24\" StartAngle=\"0\" Angle=\"33\"  UseLayoutRounding=\"False\">\r\n            <controls:ProgressPieSlice.RenderTransform>\r\n                <CompositeTransform x:Name=\"Rotation2\" Rotation=\"74\" ScaleY=\".4\" ScaleX=\".4\"/>\r\n            </controls:ProgressPieSlice.RenderTransform>\r\n        </controls:ProgressPieSlice>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/RecordingControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class RecordingControl\r\n    {\r\n        public RecordingControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Storyboard1.Begin();\r\n                Storyboard2.Begin();\r\n                Storyboard3.Begin();\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                Storyboard1.Stop();\r\n                Storyboard2.Stop();\r\n                Storyboard3.Stop();\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/RibbonControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.RibbonControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <converters:ImageViewerPhotoConverter x:Key=\"ImageViewerPhotoConverter\"/>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid Height=\"60\" x:Name=\"Panel\" Background=\"Transparent\">\r\n        <!--<Grid.RenderTransform>\r\n            <TranslateTransform x:Name=\"Transform\"/>\r\n        </Grid.RenderTransform>-->\r\n        <controls:CachingItemsControl x:Name=\"Items\" >\r\n            <ItemsControl.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <!--<StackPanel Orientation=\"Horizontal\"/>-->\r\n                    <Canvas/>\r\n                </ItemsPanelTemplate>\r\n            </ItemsControl.ItemsPanel>\r\n            <ItemsControl.ItemTemplate>\r\n                <DataTemplate>\r\n                    <controls:RibbonImageControl \r\n                        x:Name=\"Photo\" \r\n                        Width=\"40\"\r\n                        CacheMode=\"BitmapCache\"\r\n                        PhotoWidth=\"{Binding Media, Converter={StaticResource PhotoToDimensionConverter}, ConverterParameter=Width, FallbackValue=40}\"\r\n                        PhotoHeight=\"{Binding Media, Converter={StaticResource PhotoToDimensionConverter}, ConverterParameter=Height, FallbackValue=60}\"\r\n                        Source=\"{Binding Media.ThumbSelf, Converter={StaticResource PhotoToThumbConverter}, ConverterParameter=noblur}\"/>                      \r\n                </DataTemplate>\r\n            </ItemsControl.ItemTemplate>\r\n        </controls:CachingItemsControl>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/RibbonControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Telegram.Api.Extensions;\r\nusing TelegramClient.Behaviors;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class RibbonControl\r\n    {\r\n        public static readonly DependencyProperty ItemTemplateProperty = DependencyProperty.Register(\r\n            \"ItemTemplate\", typeof(DataTemplate), typeof(RibbonControl), new PropertyMetadata(default(DataTemplate), OnItemTemplateChanged));\r\n\r\n        private static void OnItemTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as RibbonControl;\r\n            if (control != null)\r\n            {\r\n                control.Items.ItemTemplate = e.NewValue as DataTemplate;\r\n            }\r\n        }\r\n\r\n        public DataTemplate ItemTemplate\r\n        {\r\n            get { return (DataTemplate) GetValue(ItemTemplateProperty); }\r\n            set { SetValue(ItemTemplateProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ItemsSourceProperty = DependencyProperty.Register(\r\n            \"ItemsSource\", typeof(IList), typeof(RibbonControl), new PropertyMetadata(default(IList), OnItemsSourceChanged));\r\n\r\n        private static void OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as RibbonControl;\r\n            if (control != null)\r\n            {\r\n                var collectionChangedOld = e.OldValue as INotifyCollectionChanged;\r\n                if (collectionChangedOld != null)\r\n                {\r\n                    collectionChangedOld.CollectionChanged -= control.OnCollectionChanged;\r\n                }\r\n\r\n                control.Items.ItemsSource = e.NewValue as IList;\r\n                control.Clear();\r\n\r\n                var collectionChangedNew = e.NewValue as INotifyCollectionChanged;\r\n                if (collectionChangedNew != null)\r\n                {\r\n                    collectionChangedNew.CollectionChanged += control.OnCollectionChanged;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs)\r\n        {\r\n            Clear();\r\n        }\r\n\r\n        public IList ItemsSource\r\n        {\r\n            get { return (IList)GetValue(ItemsSourceProperty); }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        public RibbonControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Items.PrepareContainerForItem = PrepareContainerForItem;\r\n        }\r\n\r\n        private void PrepareContainerForItem(DependencyObject element, object item)\r\n        {\r\n            var contentPresenter = element as ContentPresenter;\r\n            if (contentPresenter != null)\r\n            {\r\n                var index = Items.Items.IndexOf(item);\r\n                contentPresenter.RenderTransform = new TranslateTransform { X = index * RibbonImageControl.MinExpandedWidth }; \r\n\r\n                var ribbonImageControl = GetChild<RibbonImageControl>(contentPresenter);\r\n                if (ribbonImageControl != null)\r\n                {\r\n                    ribbonImageControl.Prepare();   \r\n                }\r\n            }\r\n        }\r\n\r\n        private int _selectedIndex = -1;\r\n\r\n        private double _minTranslationX;\r\n\r\n        private double _maxTranslationX;\r\n\r\n        private double _translationX;\r\n\r\n        private RibbonImageControl _previousImage;\r\n\r\n        private ContentPresenter _previousContainer;\r\n\r\n        private RibbonImageControl _currentImage;\r\n\r\n        private ContentPresenter _currentContainer;\r\n\r\n        private RibbonImageControl _nextImage;\r\n\r\n        private ContentPresenter _nextContainer;\r\n\r\n        public TranslateTransform Transform = new TranslateTransform();\r\n\r\n        private void Clear()\r\n        {\r\n            _selectedIndex = -1;\r\n            _minTranslationX = 0.0;\r\n            _maxTranslationX = 0.0;\r\n            _translationX = 0.0;\r\n            _previousImage = null;\r\n            _currentImage = null;\r\n            _nextImage = null;\r\n        }\r\n\r\n        public bool ScrollTo(int index, double duration)\r\n        {\r\n            if (index == _selectedIndex)\r\n            {\r\n                AnimatePosition(_currentImage, _currentImage != null ? _currentImage.ExpandedWidth : RibbonImageControl.MinExpandedWidth, _toImage, RibbonImageControl.MinExpandedWidth, Transform, _translationX, duration);\r\n                \r\n                return true;\r\n            }\r\n\r\n            ContentPresenter fromContainer;\r\n            ContentPresenter toContainer;\r\n            var fromItem = FindAtIndex<RibbonImageControl>(Items, _selectedIndex, out fromContainer);\r\n            var toItem = FindAtIndex<RibbonImageControl>(Items, index, out toContainer);\r\n\r\n            if (toItem == null)\r\n            {\r\n                var translationX = index > _selectedIndex ? _minTranslationX : _maxTranslationX;\r\n                AnimatePosition(fromItem, RibbonImageControl.MinExpandedWidth, null, 0, Transform, translationX, duration);\r\n\r\n                return false;\r\n            }\r\n\r\n            _selectedIndex = index;\r\n\r\n            _previousImage = FindAtIndex<RibbonImageControl>(Items, _selectedIndex - 1, out _previousContainer);\r\n            _currentImage = toItem;\r\n            _currentContainer = toContainer;\r\n            _nextImage = FindAtIndex<RibbonImageControl>(Items, _selectedIndex + 1, out _nextContainer);\r\n\r\n            _minTranslationX = -(_selectedIndex + 1) * RibbonImageControl.MinExpandedWidth - (_nextImage != null ? _nextImage.ExpandedWidth / 2.0 : RibbonImageControl.MaxExpandedWidth / 2.0);\r\n            _maxTranslationX = -(_selectedIndex - 1) * RibbonImageControl.MinExpandedWidth - (_previousImage != null ? _previousImage.ExpandedWidth / 2.0 : RibbonImageControl.MinExpandedWidth - RibbonImageControl.MaxExpandedWidth / 2.0);\r\n            _translationX = -(RibbonImageControl.MinExpandedWidth * index + toItem.ExpandedWidth / 2.0);\r\n\r\n            AnimatePosition(fromItem, RibbonImageControl.MinExpandedWidth, toItem, toItem.ExpandedWidth, Transform, -(RibbonImageControl.MinExpandedWidth * index + toItem.ExpandedWidth / 2.0), duration);\r\n\r\n            return true;\r\n        }\r\n\r\n        public bool ScrollNext(double duration)\r\n        {\r\n            return ScrollTo(_selectedIndex + 1, duration);\r\n        }\r\n\r\n        public bool ScrollPrevious(double duration)\r\n        {\r\n            return ScrollTo(_selectedIndex - 1, duration);\r\n        }\r\n\r\n        public bool ScrollBack(double duration)\r\n        {\r\n            return ScrollTo(_selectedIndex, duration);\r\n        }\r\n\r\n        private void AnimatePosition(RibbonImageControl currentControl, double currentWidth, RibbonImageControl nextControl, double nextWidth, TranslateTransform transform, double translateXAll, double duration)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n//#if EXTENDED_LENGTH\r\n            if (currentControl != null)\r\n            {\r\n                var currentWidthAnimation = new DoubleAnimation();\r\n                currentWidthAnimation.To = currentWidth;\r\n                currentWidthAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n                Storyboard.SetTarget(currentWidthAnimation, currentControl);\r\n                Storyboard.SetTargetProperty(currentWidthAnimation, new PropertyPath(\"Width\"));\r\n                storyboard.Children.Add(currentWidthAnimation);\r\n            }\r\n\r\n            if (nextControl != null && nextControl != currentControl)\r\n            {\r\n                var nextWidthAnimation = new DoubleAnimation();\r\n                nextWidthAnimation.To = nextWidth;\r\n                nextWidthAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n                Storyboard.SetTarget(nextWidthAnimation, nextControl);\r\n                Storyboard.SetTargetProperty(nextWidthAnimation, new PropertyPath(\"Width\"));\r\n                storyboard.Children.Add(nextWidthAnimation);\r\n            }\r\n//#endif\r\n\r\n            //var translateXAnimation = new DoubleAnimation();\r\n            //translateXAnimation.To = translateX;\r\n            //translateXAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            //Storyboard.SetTarget(translateXAnimation, transform);\r\n            //Storyboard.SetTargetProperty(translateXAnimation, new PropertyPath(\"X\"));\r\n            //storyboard.Children.Add(translateXAnimation);\r\n\r\n            var x = 0.0;\r\n            for (var i = 0; i < Items.Items.Count; i++)\r\n            {\r\n                ContentPresenter container;\r\n                var image = FindAtIndex<RibbonImageControl>(Items, i, out container);\r\n                if (container != null)\r\n                {\r\n                    var animation = new DoubleAnimation();\r\n                    animation.To = x + translateXAll;\r\n                    animation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n                    Storyboard.SetTarget(animation, container.RenderTransform);\r\n                    Storyboard.SetTargetProperty(animation, new PropertyPath(\"X\"));\r\n                    storyboard.Children.Add(animation);\r\n\r\n                    //container.RenderTransform = new TranslateTransform { X = x };\r\n                    //x += image.Width;\r\n\r\n                    if (image == currentControl)\r\n                    {\r\n                        x += currentWidth;\r\n                    }\r\n                    else if (image == nextControl)\r\n                    {\r\n                        x += nextWidth;\r\n                    }\r\n                    else if (image != null)\r\n                    {\r\n                        x += image.Width;\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private RibbonImageControl _toImage;\r\n\r\n        private ContentPresenter _toContainer;\r\n\r\n        public void Move(double percent)\r\n        {\r\n            percent = PanAndZoomBehavior.Clamp(percent, -1.0, 1.0);\r\n\r\n            var translateX = percent < 0.0\r\n                ? _translationX - (_minTranslationX - _translationX) * percent\r\n                : _translationX + (_maxTranslationX - _translationX) * percent;\r\n\r\n            //Transform.X = translateX;\r\n\r\n            if (_currentImage != null)\r\n            {\r\n                _currentImage.Width = _currentImage.ExpandedWidth - (_currentImage.ExpandedWidth - RibbonImageControl.MinExpandedWidth) * Math.Abs(percent);\r\n            }\r\n\r\n            _toImage = percent < 0.0 ? _nextImage : _previousImage;\r\n            if (_toImage != null)\r\n            {\r\n                _toImage.Width = RibbonImageControl.MinExpandedWidth + (_toImage.ExpandedWidth - RibbonImageControl.MinExpandedWidth) * Math.Abs(percent);\r\n            }\r\n\r\n            _toContainer = percent < 0.0 ? _nextContainer : _previousContainer;\r\n\r\n            var x = 0.0;\r\n            for (var i = 0; i < Items.Items.Count; i++)\r\n            {\r\n                ContentPresenter container;\r\n                var image = FindAtIndex<RibbonImageControl>(Items, i, out container);\r\n                if (container != null)\r\n                {\r\n                    container.RenderTransform = new TranslateTransform { X = x + translateX };\r\n                    x += image.Width;\r\n\r\n                    //if (container == _toContainer)\r\n                    //{\r\n                    //    x += _toImage.Width;\r\n                    //}\r\n                    //else if (container == _currentContainer)\r\n                    //{\r\n                    //    x += _currentImage.Width;\r\n                    //}\r\n                    //else if (container != null)\r\n                    //{\r\n                    //    x += image.Width;\r\n                    //}\r\n                }\r\n            }\r\n        }\r\n\r\n        private static T FindAtIndex<T>(ItemsControl itemsControl, int index, out ContentPresenter container) where T : DependencyObject\r\n        {\r\n            container = null;\r\n            var item = index >= 0 && index < itemsControl.Items.Count ? itemsControl.Items[index] : null;\r\n            if (item != null)\r\n            {\r\n                container = itemsControl.ItemContainerGenerator.ContainerFromIndex(index) as ContentPresenter;\r\n                if (container != null)\r\n                {\r\n                    return GetChild<T>(container);\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n\r\n        private static T GetChild<T>(DependencyObject obj) where T : DependencyObject\r\n        {\r\n            int childrenCount = VisualTreeHelper.GetChildrenCount(obj);\r\n            for (int i = 0; i < childrenCount; i++)\r\n            {\r\n                var child = VisualTreeHelper.GetChild(obj, i);\r\n                var result = child as T;\r\n                if (result != null)\r\n                {\r\n                    return result;\r\n                }\r\n                result = GetChild<T>(child);\r\n                if (result != null)\r\n                {\r\n                    return result;\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n    }\r\n    public class CachingItemsControl : ItemsControl\r\n    {\r\n        private readonly Stack<DependencyObject> _cache =\r\n            new Stack<DependencyObject>();\r\n\r\n        protected override DependencyObject GetContainerForItemOverride()\r\n        {\r\n            return\r\n                _cache.Count > 0\r\n                ? _cache.Pop()\r\n                : base.GetContainerForItemOverride();\r\n        }\r\n\r\n        protected override void ClearContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            _cache.Push(element);\r\n        }\r\n\r\n        public Action<DependencyObject, object> PrepareContainerForItem; \r\n\r\n        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            PrepareContainerForItem.SafeInvoke(element, item);\r\n\r\n            base.PrepareContainerForItemOverride(element, item);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/RibbonImageControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.RibbonImageControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\" Margin=\"2\">\r\n        <Image Stretch=\"UniformToFill\" x:Name=\"Photo\" ImageOpened=\"Photo_OnImageOpened\" Opacity=\"0.0\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/RibbonImageControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#define EXTENDED_LENGTH\r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class RibbonImageControl\r\n    {\r\n        public static readonly DependencyProperty PhotoWidthProperty = DependencyProperty.Register(\r\n            \"PhotoWidth\", typeof(double), typeof(RibbonImageControl), new PropertyMetadata(default(double), OnPhotoWidthChanged));\r\n\r\n        private static void OnPhotoWidthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as RibbonImageControl;\r\n            if (control != null)\r\n            {\r\n                control.SetPhotoDimenstion((double) e.NewValue, control.PhotoHeight);\r\n            }\r\n        }\r\n\r\n        private void SetPhotoDimenstion(double width, double height)\r\n        {\r\n            if (height > 0.0 && width > 0.0)\r\n            {\r\n                var minWidth = _minExpandedWidth;\r\n                var maxWidth = 2 * _minExpandedWidth;\r\n                Photo.Width = _height / height * width;\r\n\r\n                if (Photo.Width < minWidth) Photo.Width = minWidth;\r\n                if (Photo.Width > maxWidth) Photo.Width = maxWidth;\r\n            }\r\n        }\r\n\r\n        public double PhotoWidth\r\n        {\r\n            get { return (double) GetValue(PhotoWidthProperty); }\r\n            set { SetValue(PhotoWidthProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty PhotoHeightProperty = DependencyProperty.Register(\r\n            \"PhotoHeight\", typeof(double), typeof(RibbonImageControl), new PropertyMetadata(default(double), OnPhotoHeightChanged));\r\n\r\n        private static void OnPhotoHeightChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as RibbonImageControl;\r\n            if (control != null)\r\n            {\r\n                control.SetPhotoDimenstion(control.PhotoWidth, (double) e.NewValue);\r\n            }\r\n        }\r\n\r\n        public double PhotoHeight\r\n        {\r\n            get { return (double) GetValue(PhotoHeightProperty); }\r\n            set { SetValue(PhotoHeightProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(\r\n            \"Source\", typeof(ImageSource), typeof(RibbonImageControl), new PropertyMetadata(default(ImageSource), OnSourceChanged));\r\n\r\n        private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as RibbonImageControl;\r\n            if (control != null)\r\n            {\r\n                control.Photo.Source = e.NewValue as ImageSource;\r\n\r\n                var bitmapImage = control.Photo.Source as BitmapImage;\r\n                if (bitmapImage != null && (bitmapImage.PixelHeight > 0 || bitmapImage.PixelWidth > 0))\r\n                {\r\n                    control.Photo.Opacity = 1.0;\r\n                }\r\n                else\r\n                {\r\n                    control.Photo.Opacity = 0.0;\r\n                }\r\n            }\r\n        }\r\n\r\n        public ImageSource Source\r\n        {\r\n            get { return (ImageSource)GetValue(SourceProperty); }\r\n            set { SetValue(SourceProperty, value); }\r\n        }\r\n\r\n        public RibbonImageControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Photo.Width = MinExpandedWidth;\r\n            Photo.Height = _height;\r\n        }\r\n\r\n        private void Photo_OnImageOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var opacityAnimation = new DoubleAnimation();\r\n            opacityAnimation.To = 1.0;\r\n            opacityAnimation.Duration = TimeSpan.FromSeconds(.25);\r\n\r\n            Storyboard.SetTarget(opacityAnimation, Photo);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"Opacity\"));\r\n\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private double _height = 60.0;\r\n\r\n        private static double _minExpandedWidth = 40.0;\r\n\r\n        public static double MinExpandedWidth\r\n        {\r\n            get { return _minExpandedWidth; }\r\n        }\r\n\r\n        public double ExpandedWidth\r\n        {\r\n            get\r\n            {\r\n#if EXTENDED_LENGTH\r\n                var minWidth = MinExpandedWidth;\r\n                var maxWidth = MaxExpandedWidth;\r\n                return Photo.Width < minWidth ? minWidth : (Photo.Width > maxWidth) ? maxWidth : Photo.Width;\r\n#else\r\n                return MinExpandedWidth;\r\n#endif\r\n            }\r\n        }\r\n\r\n        public static double MaxExpandedWidth\r\n        {\r\n            get { return _minExpandedWidth * 2.0; }\r\n        }\r\n\r\n        public void Prepare()\r\n        {\r\n            if (Width > MinExpandedWidth)\r\n            {\r\n                Width = MinExpandedWidth;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/SelectionControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.SelectionControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\">\r\n    \r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <SolidColorBrush x:Key=\"CustomAccentBrush\" Color=\"#FF29B6F6\"/>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n    <Border x:Name=\"Border\" HorizontalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" MinWidth=\"32\" Height=\"32\" CornerRadius=\"16\" BorderBrush=\"White\" Background=\"{StaticResource CustomAccentBrush}\" BorderThickness=\"2\">\r\n        <Border.RenderTransform>\r\n            <ScaleTransform x:Name=\"ScaleTransform\"/>\r\n        </Border.RenderTransform>\r\n        <Grid>\r\n            <Path x:Name=\"Path\" Data=\"M0,7 5,12 17,0\"  Visibility=\"Visible\" StrokeThickness=\"2\" Stroke=\"White\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n            <TextBlock x:Name=\"Label\" Visibility=\"Collapsed\" Text=\"\" HorizontalAlignment=\"Center\" Margin=\"6,-1\"/>\r\n        </Grid>\r\n    </Border>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/SelectionControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class SelectionControl\r\n    {\r\n        public static readonly DependencyProperty SelectedBorderBrushProperty = DependencyProperty.Register(\r\n            \"SelectedBorderBrush\", typeof(Brush), typeof(SelectionControl), new PropertyMetadata(default(Brush), OnSelectedBorderBrushChanged));\r\n\r\n        public Brush SelectedBorderBrush\r\n        {\r\n            get { return (Brush)GetValue(SelectedBorderBrushProperty); }\r\n            set { SetValue(SelectedBorderBrushProperty, value); }\r\n        }\r\n\r\n        private static void OnSelectedBorderBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as SelectionControl;\r\n            if (control != null)\r\n            {\r\n                if (control.IsSelected)\r\n                {\r\n                    control.Border.BorderBrush = e.NewValue as Brush;\r\n                }\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty UnselectedBorderBrushProperty = DependencyProperty.Register(\r\n            \"UnselectedBorderBrush\", typeof(Brush), typeof(SelectionControl), new PropertyMetadata(default(Brush), OnUnselectedBorderBrushChanged));\r\n\r\n        public Brush UnselectedBorderBrush\r\n        {\r\n            get { return (Brush)GetValue(UnselectedBorderBrushProperty); }\r\n            set { SetValue(UnselectedBorderBrushProperty, value); }\r\n        }\r\n\r\n        private static void OnUnselectedBorderBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as SelectionControl;\r\n            if (control != null)\r\n            {\r\n                if (!control.IsSelected)\r\n                {\r\n                    control.Border.BorderBrush = e.NewValue as Brush;\r\n                }\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty IndexProperty = DependencyProperty.Register(\r\n            \"Index\", typeof(int), typeof(SelectionControl), new PropertyMetadata(default(int), OnIndexChanged));\r\n\r\n        private static void OnIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as SelectionControl;\r\n            if (control != null)\r\n            {\r\n                var index = (int) e.NewValue;\r\n\r\n                control.Label.Text = index.ToString();\r\n                control.Label.Visibility = index > 0 ? Visibility.Visible : Visibility.Collapsed;\r\n                control.Path.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public int Index\r\n        {\r\n            get { return (int) GetValue(IndexProperty); }\r\n            set { SetValue(IndexProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(\r\n            \"IsSelected\", typeof (bool), typeof (SelectionControl), new PropertyMetadata(default(bool), OnIsSelectedChanged));\r\n\r\n        private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var selectionControl = d as SelectionControl;\r\n            if (selectionControl != null)\r\n            {\r\n                var isSelected = (bool) e.NewValue;\r\n\r\n                if (!selectionControl.SuppressAnimation)\r\n                {\r\n                    var toValue = !isSelected ? 0.75 : 1.25;\r\n                    var easingFunction = new ExponentialEase { Exponent = 2.0, EasingMode = EasingMode.EaseOut };\r\n                    var storyboard = new Storyboard();\r\n                    var scaleXAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    scaleXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = toValue, EasingFunction = easingFunction });\r\n                    scaleXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 1.0, EasingFunction = easingFunction });\r\n                    Storyboard.SetTarget(scaleXAnimation, selectionControl.ScaleTransform);\r\n                    Storyboard.SetTargetProperty(scaleXAnimation, new PropertyPath(\"ScaleX\"));\r\n                    storyboard.Children.Add(scaleXAnimation);\r\n                    var scaleYAnimation = new DoubleAnimationUsingKeyFrames();\r\n                    scaleYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.2), Value = toValue, EasingFunction = easingFunction });\r\n                    scaleYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 1.0, EasingFunction = easingFunction });\r\n                    Storyboard.SetTarget(scaleYAnimation, selectionControl.ScaleTransform);\r\n                    Storyboard.SetTargetProperty(scaleYAnimation, new PropertyPath(\"ScaleY\"));\r\n                    storyboard.Children.Add(scaleYAnimation);\r\n\r\n                    storyboard.Begin();\r\n                }\r\n\r\n                selectionControl.Border.BorderBrush = isSelected\r\n                    ? selectionControl.SelectedBorderBrush ?? selectionControl.Border.BorderBrush\r\n                    : selectionControl.UnselectedBorderBrush ?? selectionControl.Border.BorderBrush;\r\n\r\n                selectionControl.Border.Background = isSelected\r\n                    ? (Brush) selectionControl.Resources[\"CustomAccentBrush\"]\r\n                    : null;\r\n                selectionControl.Path.Visibility = isSelected\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return (bool) GetValue(IsSelectedProperty); }\r\n            set { SetValue(IsSelectedProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty SuppressAnimationProperty = DependencyProperty.Register(\r\n            \"SuppressAnimation\", typeof (bool), typeof (SelectionControl), new PropertyMetadata(default(bool)));\r\n\r\n        public bool SuppressAnimation\r\n        {\r\n            get { return (bool) GetValue(SuppressAnimationProperty); }\r\n            set { SetValue(SuppressAnimationProperty, value); }\r\n        }\r\n\r\n        public SelectionControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Border.Background = null;\r\n            Path.Visibility = Visibility.Collapsed;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/ShareMessagePicker.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.ShareMessagePicker\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:controls1=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:telegramClient=\"clr-namespace:TelegramClient\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    x:Name=\"Self\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"LightThemeBackgroundBrush\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"DarkThemeBackgroundBrush\" Color=\"#FF2B2B2B\"/>\r\n\r\n        <SolidColorBrush x:Key=\"BackgroundBrush\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"TransaprentBackgroundBrush\" Color=\"#66000000\"/>\r\n\r\n        <controls:PhotoConverter x:Key=\"BackgroundPhotoConverter\"/>\r\n        <converters:CountToVisibilityConverter Type=\"Equals\" x:Key=\"EmptyListToVisibilityConverter\"/>\r\n        <Style x:Key=\"LongListSelectorStyle1\" TargetType=\"phone:LongListSelector\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"phone:LongListSelector\">\r\n                        <Grid Background=\"{TemplateBinding Background}\" d:DesignWidth=\"480\" d:DesignHeight=\"800\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"ScrollStates\">\r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition GeneratedDuration=\"00:00:00.5\"/>\r\n                                    </VisualStateGroup.Transitions>\r\n                                    <VisualState x:Name=\"Scrolling\">\r\n                                        <Storyboard>\r\n                                            <!--<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"VerticalScrollBar\"/>-->\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"NotScrolling\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Grid Margin=\"{TemplateBinding Padding}\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <ViewportControl x:Name=\"ViewportControl\" HorizontalContentAlignment=\"Stretch\" VerticalAlignment=\"Top\"/>\r\n                                <!--<ScrollBar x:Name=\"VerticalScrollBar\" HorizontalAlignment=\"Right\" Grid.Column=\"0\" Margin=\"0,0,0,0\" Opacity=\"0\" Orientation=\"Vertical\" Visibility=\"Collapsed\"/>-->\r\n                            </Grid>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"WatermarkedTextBoxStyle1\" TargetType=\"controls1:WatermarkedTextBox\">\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"23\"/>\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"SelectionBackground\" Value=\"Transparent\"/>\r\n            <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"Padding\" Value=\"18,12\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"controls1:WatermarkedTextBox\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"ReadOnly\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledOrReadonlyContent\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unfocused\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"0\">\r\n                                <Grid>\r\n                                    <ContentControl x:Name=\"WatermarkContent\" Background=\"Transparent\" Content=\"{TemplateBinding Watermark}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" Opacity=\"0.5\" Style=\"{TemplateBinding WatermarkStyle}\"/>\r\n                                    <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                                </Grid>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledOrReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                                <TextBox x:Name=\"DisabledOrReadonlyContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\" FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" IsReadOnly=\"True\" SelectionForeground=\"{TemplateBinding SelectionForeground}\" SelectionBackground=\"{TemplateBinding SelectionBackground}\" TextAlignment=\"{TemplateBinding TextAlignment}\" TextWrapping=\"{TemplateBinding TextWrapping}\" Text=\"{TemplateBinding Text}\" Template=\"{StaticResource PhoneDisabledTextBoxTemplate}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <telegramClient:LongListSelectorEx\r\n            x:Name=\"Dialogs\"\r\n            LayoutMode=\"List\"\r\n            IsGroupingEnabled=\"True\"\r\n            Margin=\"0,32,0,0\"\r\n            ViewportChanged=\"Dialogs_OnViewportChanged\"\r\n            ManipulationStarted=\"Photos_OnManipulationStarted\"\r\n            ManipulationDelta=\"Dialogs_OnManipulationDelta\"\r\n            ManipulationCompleted=\"Photos_OnManipulationCompleted\"\r\n            CloseToEnd=\"Dialogs_OnCloseToEnd\"\r\n            Style=\"{StaticResource LongListSelectorStyle1}\">\r\n            <phone:LongListSelector.RenderTransform>\r\n                <TranslateTransform/>\r\n            </phone:LongListSelector.RenderTransform>\r\n            <phone:LongListSelector.GroupHeaderTemplate>\r\n                <DataTemplate>\r\n                    <Grid VerticalAlignment=\"Bottom\" Background=\"{StaticResource BackgroundBrush}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        \r\n                        <Border Grid.Row=\"2\" Height=\"2\" Background=\"#77ACAFB3\" Margin=\"0,0,0,0\"/>\r\n                        <Border Grid.Row=\"3\" Visibility=\"{Binding Rows.Count, ElementName=Self, Converter={StaticResource EmptyListToVisibilityConverter}, ConverterParameter='0', FallbackValue=Collapsed}\">\r\n                            <TextBlock Text=\"{Binding Resources.NoResults, Source={StaticResource Strings}}\" Margin=\"18,12,18,0\" Foreground=\"{StaticResource PhoneForegroundBrush}\" FontSize=\"27\"/>\r\n                        </Border>\r\n\r\n                        <controls1:WatermarkedTextBox Tag=\"Search\" Style=\"{StaticResource WatermarkedTextBoxStyle1}\" Grid.Row=\"1\" GotFocus=\"UIElement_OnGotFocus\" LostFocus=\"UIElement_OnLostFocus\" Text=\"{Binding Text, ElementName=Self, Mode=TwoWay}\" Watermark=\"{Binding Resources.Search, Source={StaticResource Strings}, StringFormat='\\{0\\}...'}\">\r\n                            <controls1:WatermarkedTextBox.CaretBrush>\r\n                                <SolidColorBrush Color=\"{StaticResource PhoneForegroundColor}\"/>\r\n                            </controls1:WatermarkedTextBox.CaretBrush>\r\n                            <controls1:WatermarkedTextBox.InputScope>\r\n                                <InputScope>\r\n                                    <InputScopeName NameValue=\"Search\"/>\r\n                                </InputScope>\r\n                            </controls1:WatermarkedTextBox.InputScope>\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </controls1:WatermarkedTextBox>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </phone:LongListSelector.GroupHeaderTemplate>\r\n            <phone:LongListSelector.ListHeader>\r\n                <Grid Height=\"300\" Background=\"Transparent\" Tap=\"ListHeader_OnTap\"/>\r\n            </phone:LongListSelector.ListHeader>\r\n            <phone:LongListSelector.ItemTemplate>\r\n                <DataTemplate>\r\n                    <Grid x:Name=\"MainGrid\" Background=\"{StaticResource BackgroundBrush}\" Margin=\"0,-1,0,-1\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"18\"/>\r\n                            <ColumnDefinition/>\r\n                            <ColumnDefinition Width=\"18\"/>\r\n                            <ColumnDefinition/>\r\n                            <ColumnDefinition Width=\"18\"/>\r\n                            <ColumnDefinition/>\r\n                            <ColumnDefinition Width=\"18\"/>\r\n                            <ColumnDefinition/>\r\n                            <ColumnDefinition Width=\"18\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <controls:DialogControl \r\n                            Grid.Column=\"1\" \r\n                            DataContext=\"{Binding Dialog1}\"\r\n                            Object=\"{Binding Dialog.With}\"\r\n                            Fill=\"{Binding Dialog.With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Dialog.With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Dialog.With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            ShortName=\"{Binding Dialog.With.FullName}\"\r\n                            IsSelected=\"{Binding IsSelected, FallbackValue=false}\"\r\n                            Tap=\"DialogControl_OnTap\"\r\n                            MouseEnter=\"DialogControl_OnMouseEnter\"\r\n                            SelectedBorderBrush=\"White\"\r\n                            UnselectedBorderBrush=\"Transparent\" />\r\n\r\n                        <controls:DialogControl Grid.Column=\"3\" \r\n                            DataContext=\"{Binding Dialog2}\"\r\n                            Object=\"{Binding Dialog.With}\"\r\n                            Fill=\"{Binding Dialog.With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Dialog.With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Dialog.With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            ShortName=\"{Binding Dialog.With.FullName}\"\r\n                            IsSelected=\"{Binding IsSelected, FallbackValue=false}\"\r\n                            Tap=\"DialogControl_OnTap\"\r\n                            MouseEnter=\"DialogControl_OnMouseEnter\"\r\n                            SelectedBorderBrush=\"White\"\r\n                            UnselectedBorderBrush=\"Transparent\" />\r\n\r\n                        <controls:DialogControl Grid.Column=\"5\" \r\n                            DataContext=\"{Binding Dialog3}\"\r\n                            Object=\"{Binding Dialog.With}\"\r\n                            Fill=\"{Binding Dialog.With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Dialog.With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Dialog.With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            ShortName=\"{Binding Dialog.With.FullName}\"\r\n                            IsSelected=\"{Binding IsSelected, FallbackValue=false}\"\r\n                            Tap=\"DialogControl_OnTap\"\r\n                            MouseEnter=\"DialogControl_OnMouseEnter\"\r\n                            SelectedBorderBrush=\"White\"\r\n                            UnselectedBorderBrush=\"Transparent\" />\r\n\r\n                        <controls:DialogControl Grid.Column=\"7\" \r\n                            DataContext=\"{Binding Dialog4}\"\r\n                            Object=\"{Binding Dialog.With}\"\r\n                            Fill=\"{Binding Dialog.With.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                            Text=\"{Binding Dialog.With, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                            Source=\"{Binding Dialog.With.Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                            ShortName=\"{Binding Dialog.With.FullName}\"\r\n                            IsSelected=\"{Binding IsSelected, FallbackValue=false}\"\r\n                            Tap=\"DialogControl_OnTap\"\r\n                            MouseEnter=\"DialogControl_OnMouseEnter\"\r\n                            SelectedBorderBrush=\"White\"\r\n                            UnselectedBorderBrush=\"Transparent\" />\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </phone:LongListSelector.ItemTemplate>\r\n            <phone:LongListSelector.ListFooterTemplate>\r\n                <DataTemplate>\r\n                    <Grid Background=\"Transparent\">\r\n                        <Border Height=\"800\" Margin=\"0,0,0,-784\" VerticalAlignment=\"Bottom\" Background=\"{StaticResource BackgroundBrush}\"/>\r\n                    </Grid>\r\n                </DataTemplate>\r\n            </phone:LongListSelector.ListFooterTemplate>\r\n        </telegramClient:LongListSelectorEx>\r\n        <TextBlock x:Name=\"Debug\" Margin=\"0,100,0,0\" Foreground=\"Green\" Visibility=\"Collapsed\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <Grid x:Name=\"CommentGrid\" Visibility=\"Collapsed\" Margin=\"0,32,0,0\" Grid.Row=\"0\" VerticalAlignment=\"Bottom\" Background=\"{StaticResource BackgroundBrush}\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform/>\r\n            </Grid.RenderTransform>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"Auto\"/>\r\n            </Grid.RowDefinitions>\r\n\r\n            <Border Grid.Row=\"0\" Height=\"2\" Background=\"#77ACAFB3\" Margin=\"0,0,0,0\"/>\r\n            <controls1:WatermarkedTextBox Style=\"{StaticResource WatermarkedTextBoxStyle1}\" Grid.Row=\"1\" GotFocus=\"UIElement_OnGotFocus\" LostFocus=\"UIElement_OnLostFocus\" Text=\"{Binding Comment, ElementName=Self, Mode=TwoWay}\" Watermark=\"{Binding Resources.CommentNominativeSingular, Source={StaticResource Strings}, StringFormat='\\{0\\}...'}\">\r\n                <controls1:WatermarkedTextBox.CaretBrush>\r\n                    <SolidColorBrush Color=\"{StaticResource PhoneForegroundColor}\"/>\r\n                </controls1:WatermarkedTextBox.CaretBrush>\r\n                <controls1:WatermarkedTextBox.InputScope>\r\n                    <InputScope>\r\n                        <InputScopeName NameValue=\"Text\"/>\r\n                    </InputScope>\r\n                </controls1:WatermarkedTextBox.InputScope>\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls1:WatermarkedTextBox>\r\n            <Border Grid.Row=\"2\" x:Name=\"KeyboardPlaceholder\"/>\r\n        </Grid>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"0\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n            <StackPanel x:Name=\"CopyLinkMenuItem\" Visibility=\"Collapsed\">\r\n                <Border Height=\"2\" Background=\"#77ACAFB3\" Margin=\"0,0,0,0\"/>\r\n                <ListBoxItem Tap=\"CopyLink_OnTap\" Padding=\"18\" Content=\"{Binding Resources.CopyLink, Source={StaticResource Strings}}\" FontSize=\"23\"/>\r\n            </StackPanel>\r\n        </Border>\r\n        <Grid x:Name=\"Bar\" Grid.Row=\"1\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform/>\r\n            </Grid.RenderTransform>\r\n            <controls:TelegramApplicationBar\r\n                x:Name=\"AppBar\"\r\n                VerticalAlignment=\"Bottom\"\r\n                MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                <controls:TelegramApplicationBar.Buttons>\r\n                    <controls:TelegramAppBarButton\r\n                        IsEnabled=\"False\"\r\n                        Grid.Column=\"3\" \r\n                        Tap=\"ChooseButton_OnClick\"\r\n                        ImageSource=\"/Images/W10M/ic_send_2x.png\"\r\n                        Text=\"{Binding Resources.Share, Source={StaticResource Strings}}\"\r\n                        LabelForeground=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                </controls:TelegramApplicationBar.Buttons>\r\n            </controls:TelegramApplicationBar>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/ShareMessagePicker.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Windows.UI.ViewManagement;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.Services.Cache;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls;\r\nusing Telegram.Controls.Utils;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing Action = System.Action;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class ShareMessagePicker\r\n    {\r\n        public static readonly DependencyProperty CommentProperty = DependencyProperty.Register(\r\n            \"Comment\", typeof(string), typeof(ShareMessagePicker), new PropertyMetadata(default(string)));\r\n\r\n        public string Comment\r\n        {\r\n            get { return (string) GetValue(CommentProperty); }\r\n            set { SetValue(CommentProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(\r\n            \"Text\", typeof(string), typeof(ShareMessagePicker), new PropertyMetadata(default(string), OnTextChanged));\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var picker = d as ShareMessagePicker;\r\n            if (picker != null)\r\n            {\r\n                picker.Search();\r\n            }\r\n        }\r\n\r\n        public string Text\r\n        {\r\n            get { return (string) GetValue(TextProperty); }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        private readonly Dictionary<int, DialogItem> _selectedPictures = new Dictionary<int, DialogItem>();\r\n\r\n        public TLDialogBase CurrentDialog { get; set; }\r\n\r\n        public List<DialogItem> DialogsSource { get; protected set; }\r\n\r\n        public ShareMessagePicker()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                ((SolidColorBrush)Resources[\"BackgroundBrush\"]).Color = ((SolidColorBrush)Resources[\"LightThemeBackgroundBrush\"]).Color;\r\n            }\r\n            else\r\n            {\r\n                ((SolidColorBrush)Resources[\"BackgroundBrush\"]).Color = ((SolidColorBrush)Resources[\"DarkThemeBackgroundBrush\"]).Color;\r\n            }\r\n\r\n            Rows = new BindableCollection<DialogRow>();\r\n            DialogsSource = new List<DialogItem>();\r\n\r\n            InitilalizeDialogs();\r\n\r\n            Bar.Visibility = Visibility.Collapsed;\r\n\r\n            Loaded += OnLoadedOnce;\r\n            Loaded += OnLoaded;\r\n            Unloaded += OnUnloaded;\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            InputPane.GetForCurrentView().Showing += InputPane_Showing;\r\n            InputPane.GetForCurrentView().Hiding += InputPane_Hiding;\r\n        }\r\n\r\n        private void InputPane_Hiding(InputPane sender, InputPaneVisibilityEventArgs args)\r\n        {\r\n            KeyboardPlaceholder.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private void InputPane_Showing(InputPane sender, InputPaneVisibilityEventArgs args)\r\n        {\r\n            var keyboardHeight = 480.0 / args.OccludedRect.Width * args.OccludedRect.Height - AppBar.ActualHeight + 18.0;\r\n\r\n            KeyboardPlaceholder.Visibility = Visibility.Visible;\r\n            KeyboardPlaceholder.Height = keyboardHeight;\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            InputPane.GetForCurrentView().Showing -= InputPane_Showing;\r\n            InputPane.GetForCurrentView().Hiding -= InputPane_Hiding;\r\n        }\r\n\r\n        //~ShareMessagePicker()\r\n        //{\r\n            \r\n        //}\r\n\r\n        private void InitilalizeDialogs()\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                LoadDialogs();\r\n            });\r\n        }\r\n\r\n        private static bool Skip(TLDialogBase d)\r\n        {\r\n            if (d is TLEncryptedDialog)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var user = d.With as TLUser;\r\n            if (user != null && user.IsSelf)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (user != null && user.IsDeleted)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var channel = d.With as TLChannel;\r\n            if (channel != null && channel.Left.Value)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var chat = d.With as TLChat41;\r\n            if (chat != null && chat.IsMigrated)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            if (channel != null && !channel.IsMegaGroup && !(channel.IsEditor || channel.Creator))\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var chatForbidden = d.With as TLChatForbidden;\r\n            if (chatForbidden != null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public BindableCollection<DialogRow> Rows { get; set; }\r\n\r\n        private IList<TLDialogBase> _dialogs;\r\n\r\n        private void LoadDialogs()\r\n        {\r\n            TLDialogBase currentUserDialog = null;\r\n            _dialogs = IoC.Get<ICacheService>().GetDialogs();\r\n\r\n            var clearedDialogs = new List<TLDialogBase>();\r\n            foreach (var d in _dialogs)\r\n            {\r\n                if (Skip(d))\r\n                {\r\n                    var user = d.With as TLUser;\r\n                    if (user != null && user.IsSelf)\r\n                    {\r\n                        currentUserDialog = d;\r\n                    }\r\n\r\n                    continue;\r\n                }\r\n\r\n                clearedDialogs.Add(d);\r\n            }\r\n\r\n            if (currentUserDialog != null)\r\n            {\r\n                clearedDialogs.Insert(0, currentUserDialog);\r\n            }\r\n            else\r\n            {\r\n                var currentUser = IoC.Get<ICacheService>().GetUser(new TLInt(IoC.Get<IStateService>().CurrentUserId));\r\n\r\n                currentUserDialog = new TLDialog{ Peer = new TLPeerUser{ Id = currentUser.Id }, With = currentUser };\r\n                clearedDialogs.Insert(0, currentUserDialog);\r\n            }\r\n\r\n            _dialogsSource = clearedDialogs;\r\n\r\n            DialogRow currentRow = null;\r\n            var rows = new Group<DialogRow>(\"group\");\r\n            Rows = rows;\r\n            var groups = new ObservableCollection<Group<DialogRow>>{ rows };\r\n            var secondSlice = new List<DialogRow>();\r\n            if (clearedDialogs.Count > 0)\r\n            {\r\n                var maxFirstSliceCount = 12;\r\n                var maxSecondSliceCount = 24;\r\n                for (var i = 0; i < clearedDialogs.Count; i++)\r\n                {\r\n                    if (i % 4 == 0)\r\n                    {\r\n                        currentRow = new DialogRow();\r\n                        if (i < maxFirstSliceCount)\r\n                        {\r\n                            rows.Add(currentRow);\r\n                        }\r\n                        else if (i < maxSecondSliceCount)\r\n                        {\r\n                            secondSlice.Add(currentRow);\r\n                        }\r\n                    }\r\n\r\n                    var d = new DialogItem { Dialog = clearedDialogs[i], Row = currentRow };\r\n\r\n                    DialogsSource.Add(d);\r\n\r\n                    currentRow.Add(d);\r\n                }\r\n            }\r\n\r\n            var lastDialog = _dialogs.LastOrDefault(x => x is TLDialog) as TLDialog;\r\n            UpdateDialogsAsync(lastDialog);\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                SetListVerticalAlignment(Rows.Count);\r\n                Dialogs.ItemsSource = groups;\r\n                Dialogs.Visibility = Visibility.Visible;\r\n                Dialogs.Opacity = 0.0;\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Dialogs.Opacity = 1.0;\r\n                    var storyboard = new Storyboard();\r\n                    var translateAnimaiton = new DoubleAnimationUsingKeyFrames();\r\n                    translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = Dialogs.ActualHeight });\r\n                    translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0.0, EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut } });\r\n                    Storyboard.SetTarget(translateAnimaiton, Dialogs);\r\n                    Storyboard.SetTargetProperty(translateAnimaiton, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n                    storyboard.Children.Add(translateAnimaiton);\r\n\r\n                    storyboard.Begin();\r\n\r\n                    if (secondSlice.Count > 0)\r\n                    {\r\n                        storyboard.Completed += (o, e) =>\r\n                        {\r\n                            foreach (var item in secondSlice)\r\n                            {\r\n                                Rows.Add(item);\r\n                            }\r\n                            _secondSliceLoaded = true;\r\n\r\n                            LoadNextSlice();\r\n                        };\r\n                    }\r\n                    else\r\n                    {\r\n                        _secondSliceLoaded = true;\r\n\r\n                        LoadNextSlice();\r\n                    }\r\n                });\r\n            });\r\n        }\r\n\r\n        private bool _secondSliceLoaded;\r\n\r\n        private void LoadLastSlice()\r\n        {\r\n            if (_lastSlice != null && _lastSlice.Count > 0)\r\n            {\r\n                var lastSlice = _lastSlice;\r\n                _lastSlice = null;\r\n\r\n                LoadNextRows(lastSlice);\r\n            }\r\n        }\r\n\r\n        private void LoadNextRows(List<DialogRow> rows)\r\n        {\r\n            for (var i = 0; i < 5; i++)\r\n            {\r\n                var row = rows.FirstOrDefault();\r\n                if (row != null)\r\n                {\r\n                    rows.RemoveAt(0);\r\n\r\n                    Rows.Add(row);\r\n                }\r\n                else\r\n                {\r\n                    return;\r\n                }\r\n            }\r\n\r\n            if (rows.Count > 0)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    LoadNextRows(rows);\r\n                });\r\n            }\r\n        }\r\n\r\n        public void LoadNextSlice()\r\n        {\r\n            if (!string.IsNullOrEmpty(Text)) return;\r\n            if (!_secondSliceLoaded) return;\r\n\r\n            var maxSliceCount = int.MaxValue;\r\n            var index = 0;\r\n\r\n            var lastRow = Rows.LastOrDefault();\r\n            if (lastRow != null)\r\n            {\r\n                var lastDialogItem = lastRow.GetLast();\r\n                if (lastDialogItem != null)\r\n                {\r\n                    index = DialogsSource.IndexOf(lastDialogItem);\r\n                }\r\n            }\r\n\r\n            var currentRow = lastRow;\r\n            if (currentRow != null && currentRow.HasEmptyItem())\r\n            {\r\n                for (index = index + 1; index < DialogsSource.Count; index++)\r\n                {\r\n                    if (!currentRow.HasEmptyItem()) break;\r\n\r\n                    var d = DialogsSource[index];\r\n\r\n                    d.Row = currentRow;\r\n\r\n                    currentRow.Add(d, true);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                index++;\r\n            }\r\n\r\n            _lastSlice = new List<DialogRow>();\r\n            for (var count = 0; index < DialogsSource.Count && count < maxSliceCount; index++, count++)\r\n            {\r\n                if (currentRow == null || !currentRow.HasEmptyItem())\r\n                {\r\n                    currentRow = new DialogRow();\r\n                    _lastSlice.Add(currentRow);\r\n                }\r\n\r\n                var d = DialogsSource[index];\r\n                d.Row = currentRow;\r\n\r\n                currentRow.Add(d);\r\n            }\r\n\r\n            if (_lastSlice.Count > 0\r\n                && Rows.Count < 10)\r\n            {\r\n                for (var i = 0; i < 10 - Rows.Count; i++)\r\n                {\r\n                    var row = _lastSlice.FirstOrDefault();\r\n                    if (row != null)\r\n                    {\r\n                        _lastSlice.RemoveAt(0);\r\n                        Rows.Add(row);\r\n                    }\r\n                    else\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool _lastSliceLoaded;\r\n\r\n        private void UpdateDialogsAsync(TLDialog lastDialog)\r\n        {\r\n            if (_lastSliceLoaded) return;\r\n\r\n            var offsetDate = 0;\r\n            var offsetId = 0;\r\n            TLInputPeerBase offsetPeer = new TLInputPeerEmpty();\r\n            if (lastDialog != null)\r\n            {\r\n                var lastMessage = lastDialog.TopMessage as TLMessageCommon;\r\n                if (lastMessage != null)\r\n                {\r\n                    offsetDate = lastMessage.DateIndex;\r\n                    offsetId = lastMessage.Index;\r\n                    if (lastMessage.ToId is TLPeerUser)\r\n                    {\r\n                        offsetPeer = !lastMessage.Out.Value\r\n                            ? DialogDetailsViewModel.PeerToInputPeer(new TLPeerUser { Id = lastMessage.FromId })\r\n                            : DialogDetailsViewModel.PeerToInputPeer(lastMessage.ToId);\r\n                    }\r\n                    else\r\n                    {\r\n                        offsetPeer = DialogDetailsViewModel.PeerToInputPeer(lastMessage.ToId);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var stopwatch = Stopwatch.StartNew();\r\n            IoC.Get<IMTProtoService>().GetDialogsAsync(stopwatch,\r\n                new TLInt(offsetDate), \r\n                new TLInt(offsetId), \r\n                offsetPeer, \r\n                new TLInt(int.MaxValue),\r\n                new TLInt(0),\r\n                result => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    _lastSliceLoaded = true;\r\n\r\n                    var dialogs = result.Dialogs;\r\n                    var clearedDialogs = new List<TLDialogBase>();\r\n                    foreach (var d in dialogs)\r\n                    {\r\n                        if (Skip(d))\r\n                        {\r\n                            continue;\r\n                        }\r\n\r\n                        clearedDialogs.Add(d);\r\n                    }\r\n\r\n                    foreach (var clearedDialog in clearedDialogs)\r\n                    {\r\n                        var d = new DialogItem { Dialog = clearedDialog };\r\n\r\n                        DialogsSource.Add(d);\r\n                    }\r\n\r\n                    LoadNextSlice();\r\n                }),\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n\r\n                }));\r\n        }\r\n\r\n        private void SetListVerticalAlignment(int rowsCount)\r\n        {\r\n            Dialogs.VerticalAlignment = rowsCount < 3 ? VerticalAlignment.Bottom : VerticalAlignment.Stretch;\r\n        }\r\n\r\n        private TelegramAppBarButton _selectButton;\r\n\r\n        private void OnLoadedOnce(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= OnLoadedOnce;\r\n\r\n            _selectButton = AppBar.Buttons[0] as TelegramAppBarButton;\r\n\r\n            BeginOpenStoryboard();\r\n        }\r\n\r\n        private void BeginOpenCommentGridStoryboard()\r\n        {\r\n            if (CommentGrid.Visibility == Visibility.Visible) return;\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimaiton = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0.0, EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut } });\r\n            Storyboard.SetTarget(translateAnimaiton, CommentGrid);\r\n            Storyboard.SetTargetProperty(translateAnimaiton, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateAnimaiton);\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                CommentGrid.Visibility = Visibility.Visible;\r\n                storyboard.Begin();\r\n            });\r\n        }\r\n\r\n        private void BeginCloseCommentGridStoryboard()\r\n        {\r\n            if (CommentGrid.Visibility == Visibility.Collapsed) return;\r\n\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            var translateCommentGridAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateCommentGridAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0 });\r\n            translateCommentGridAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateCommentGridAniamtion, CommentGrid);\r\n            Storyboard.SetTargetProperty(translateCommentGridAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateCommentGridAniamtion);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                CommentGrid.Visibility = Visibility.Collapsed;\r\n            };\r\n        }\r\n\r\n        private void BeginOpenStoryboard()\r\n        {\r\n            Bar.Visibility = Visibility.Collapsed;\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            var storyboard = new Storyboard();\r\n            var translateAnimaiton = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateAnimaiton.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0.0, EasingFunction = new ExponentialEase { Exponent = 5.0, EasingMode = EasingMode.EaseOut } });\r\n            Storyboard.SetTarget(translateAnimaiton, Bar);\r\n            Storyboard.SetTargetProperty(translateAnimaiton, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateAnimaiton);\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                Bar.Visibility = Visibility.Visible;\r\n                storyboard.Begin();\r\n            });\r\n        }\r\n\r\n        private void BeginCloseStoryboard(Action callback)\r\n        {\r\n            //LayoutRoot.Background = (Brush)Resources[\"BackgroundTransparentBrush\"];\r\n\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, Dialogs);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            var translateBarAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0 });\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateBarAniamtion, Bar);\r\n            Storyboard.SetTargetProperty(translateBarAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateBarAniamtion);\r\n\r\n            var translateCommentGridAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateCommentGridAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0 });\r\n            translateCommentGridAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateCommentGridAniamtion, CommentGrid);\r\n            Storyboard.SetTargetProperty(translateCommentGridAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(TranslateTransform.Y)\"));\r\n            storyboard.Children.Add(translateCommentGridAniamtion);\r\n\r\n            storyboard.Begin();\r\n            if (callback != null)\r\n            {\r\n                storyboard.Completed += (o, e) => callback();\r\n            }\r\n        }\r\n\r\n        public bool TryClose()\r\n        {\r\n            BeginCloseStoryboard(RaiseClose);\r\n\r\n            return true;\r\n        }\r\n\r\n        public bool ForceClose()\r\n        {\r\n            RaiseClose();\r\n\r\n            return true;\r\n        }\r\n\r\n        public event EventHandler Close;\r\n\r\n        protected virtual void RaiseClose()\r\n        {\r\n            var handler = Close;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler<PickDialogEventArgs> Pick;\r\n\r\n        protected virtual void RaisePick(PickDialogEventArgs e)\r\n        {\r\n            var handler = Pick;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private void DialogControl_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var control = sender as DialogControl;\r\n            if (control != null)\r\n            {\r\n                var dialogItem = control.DataContext as DialogItem;\r\n                if (dialogItem != null)\r\n                {\r\n                    ChangeDialogSelection(dialogItem, !dialogItem.IsSelected);\r\n                }\r\n            }\r\n        }\r\n\r\n        private DialogItem _previousDialog;\r\n\r\n        private void ChangeDialogSelection(DialogItem dialogItem, bool isSelected)\r\n        {\r\n            if (isSelected)\r\n            {\r\n                _selectedPictures[dialogItem.Dialog.Index] = dialogItem;\r\n            }\r\n            else\r\n            {\r\n                _selectedPictures.Remove(dialogItem.Dialog.Index);\r\n            }\r\n\r\n            dialogItem.SuppressAnimation = false;\r\n            dialogItem.IsSelected = isSelected;\r\n            dialogItem.RaisePropertyChanged(\"IsSelected\");\r\n\r\n            if (_hasManipulatingDelta\r\n                && _previousDialog != null\r\n                && _previousDialog.Row == dialogItem.Row)\r\n            {\r\n                var row = dialogItem.Row;\r\n                var between = row.Between(_previousDialog, dialogItem).ToList();\r\n                if (between.Count > 0)\r\n                {\r\n                    if (isSelected)\r\n                    {\r\n                        foreach (var item in between)\r\n                        {\r\n                            _selectedPictures[item.Dialog.Index] = item;\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        foreach (var item in between)\r\n                        {\r\n                            _selectedPictures.Remove(item.Dialog.Index);\r\n                        }\r\n                    }\r\n\r\n                    foreach (var item in between)\r\n                    {\r\n                        item.SuppressAnimation = false;\r\n                        item.IsSelected = isSelected;\r\n                        item.RaisePropertyChanged(\"IsSelected\");\r\n                    }\r\n                }\r\n            }\r\n\r\n            _previousDialog = dialogItem;\r\n\r\n            _selectButton.IsEnabled = _selectedPictures.Any();\r\n\r\n            if (_selectedPictures.Any())\r\n            {\r\n                BeginOpenCommentGridStoryboard();\r\n            }\r\n            else\r\n            {\r\n                BeginCloseCommentGridStoryboard();\r\n            }\r\n            //if (IsSingleItem)\r\n            //{\r\n            //    ChooseButton_OnClick(null, null);\r\n            //}\r\n        }\r\n\r\n        private bool _hasManipulatingDelta;\r\n\r\n        private void Photos_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            _hasManipulatingDelta = false;\r\n        }\r\n\r\n        private void Photos_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            _hasManipulatingDelta = false;\r\n        }\r\n\r\n        private bool _isSelected;\r\n\r\n        private void Dialogs_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            //Debug.Text = string.Format(\"{0}\\n{1}\\n{2}\", Dialogs.Viewport.Viewport, Dialogs.Viewport.Bounds, e.CumulativeManipulation.Translation);\r\n\r\n            if (!_hasManipulatingDelta)\r\n            {\r\n                var grid = e.OriginalSource as Grid;\r\n\r\n                if (grid != null)\r\n                {\r\n                    var control = grid.Parent as DialogControl;\r\n                    if (control != null)\r\n                    {\r\n                        var file1 = control.DataContext as DialogItem;\r\n                        if (file1 != null)\r\n                        {\r\n                            ChangeDialogSelection(file1, !file1.IsSelected);\r\n                            _isSelected = file1.IsSelected;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            _hasManipulatingDelta = true;\r\n        }\r\n\r\n        private void DialogControl_OnMouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            if (!_hasManipulatingDelta) return;\r\n\r\n            var control = sender as DialogControl;\r\n            if (control != null)\r\n            {\r\n                var file1 = control.DataContext as DialogItem;\r\n                if (file1 != null)\r\n                {\r\n                    ChangeDialogSelection(file1, _isSelected);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ChooseButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var selectedDialogs = _selectedPictures.Values.Select(x => x.Dialog).ToList();\r\n            if (selectedDialogs.Count == 0) return;\r\n\r\n            RaisePick(new PickDialogEventArgs { Comment = Comment, Dialogs = new ReadOnlyCollection<TLDialogBase>(selectedDialogs) });\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                TryClose();\r\n            });\r\n        }\r\n\r\n        public static readonly DependencyProperty LinkProperty = DependencyProperty.Register(\r\n            \"Link\", typeof(string), typeof(ShareMessagePicker), new PropertyMetadata(default(string), OnLinkChanged));\r\n\r\n        private static void OnLinkChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as ShareMessagePicker;\r\n            if (control != null)\r\n            {\r\n                control.CopyLinkMenuItem.Visibility = !string.IsNullOrEmpty(e.NewValue as string)\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public string Link\r\n        {\r\n            get { return (string) GetValue(LinkProperty); }\r\n            set { SetValue(LinkProperty, value); }\r\n        }\r\n\r\n        private void CopyLink_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBar.Close();\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            {\r\n                if (string.IsNullOrEmpty(Link)) return;\r\n\r\n                Clipboard.SetText(Link);\r\n            });\r\n        }\r\n\r\n        private void Dialogs_OnViewportChanged(object sender, ViewportChangedEventArgs e)\r\n        {\r\n            if (Dialogs.VerticalAlignment == VerticalAlignment.Stretch\r\n                && Dialogs.Viewport.Viewport.Height + Dialogs.Viewport.Viewport.Y >= Dialogs.Viewport.Bounds.Height + Dialogs.Viewport.Bounds.Y - 0.1   // scrolled to top\r\n                && Dialogs.Viewport.Viewport.Y - Dialogs.Viewport.Bounds.Y >= 300.0 - 0.1)      // header not in view\r\n            {\r\n                Dialogs.Background = (Brush)Resources[\"BackgroundBrush\"];\r\n                //LayoutRoot.Background = (Brush) Resources[\"BackgroundBrush\"];\r\n            }\r\n            else\r\n            {\r\n                Dialogs.Background = null;\r\n                //LayoutRoot.Background = (Brush) Resources[\"TransparentBackgroundBrush\"];\r\n            }\r\n\r\n            var watermarkTextBox = FocusManager.GetFocusedElement() as WatermarkedTextBox;\r\n            if (watermarkTextBox != null && string.Equals(watermarkTextBox.Tag, \"Search\"))\r\n            {\r\n                Dialogs.Background = (Brush)Resources[\"BackgroundBrush\"];\r\n                //LayoutRoot.Background = (Brush)Resources[\"BackgroundBrush\"];\r\n            }\r\n\r\n            if (Dialogs.VerticalAlignment == VerticalAlignment.Stretch\r\n                && Dialogs.Viewport.Viewport.Height + Dialogs.Viewport.Viewport.Y >= Dialogs.Viewport.Bounds.Height + Dialogs.Viewport.Bounds.Y - 400.0)\r\n            {\r\n                LoadLastSlice();\r\n            }\r\n\r\n            Debug.Text = Dialogs.Viewport.Viewport + Environment.NewLine + Dialogs.Viewport.Bounds;\r\n        }\r\n\r\n        private VerticalAlignment _previousAlignment;\r\n\r\n        private List<DialogRow> _previousRows;\r\n\r\n        private List<TLDialogBase> _dialogsSource;\r\n\r\n        private SearchDialogRequest _lastRequest;\r\n\r\n        private readonly LRUCache<string, SearchDialogRequest> _searchResultsCache = new LRUCache<string, SearchDialogRequest>(Constants.MaxCacheCapacity);\r\n\r\n        private List<DialogRow> _lastSlice;\r\n\r\n        private void Search()\r\n        {\r\n            _previousRows = _previousRows ?? new List<DialogRow>(Rows);\r\n\r\n            var text = Text;\r\n\r\n            var trimmedText = Text.Trim();\r\n            if (string.IsNullOrEmpty(trimmedText))\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (!string.Equals(trimmedText, Text.Trim(), StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                    Rows.Clear();\r\n                    var firstSliceCount = 5;\r\n                    var count = 0;\r\n                    var secondSlice = new List<DialogRow>();\r\n                    foreach (var item in _previousRows)\r\n                    {\r\n                        if (count < firstSliceCount)\r\n                        {\r\n                            Rows.Add(item);\r\n                            count++;\r\n                        }\r\n                        else\r\n                        {\r\n                            secondSlice.Add(item);\r\n                        }\r\n                    }\r\n                    if (secondSlice.Count > 0)\r\n                    {\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (!string.Equals(trimmedText, Text.Trim(), StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                            foreach (var item in secondSlice)\r\n                            {\r\n                                Rows.Add(item);\r\n                            }\r\n                        });\r\n                    }\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            //Search(Text);\r\n            //return;\r\n\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            {\r\n                if (!string.Equals(text, Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                Search(Text);\r\n            });\r\n        }\r\n\r\n        private void Search(string text)\r\n        {\r\n            if (!string.Equals(text, Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n            if (_lastRequest != null)\r\n            {\r\n                _lastRequest.Cancel();\r\n            }\r\n\r\n            var trimmedText = Text.Trim();\r\n            if (string.IsNullOrEmpty(trimmedText))\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (!string.Equals(trimmedText, Text.Trim(), StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                    Rows.Clear();\r\n                    var firstSliceCount = 5;\r\n                    var count = 0;\r\n                    var secondSlice = new List<DialogRow>();\r\n                    foreach (var item in _previousRows)\r\n                    {\r\n                        if (count < firstSliceCount)\r\n                        {\r\n                            Rows.Add(item);\r\n                            count++;\r\n                        }\r\n                        else\r\n                        {\r\n                            secondSlice.Add(item);\r\n                        }\r\n                    }\r\n                    if (secondSlice.Count > 0)\r\n                    {\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (!string.Equals(trimmedText, Text.Trim(), StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                            foreach (var item in secondSlice)\r\n                            {\r\n                                Rows.Add(item);\r\n                            }\r\n                        });\r\n                    }\r\n                });\r\n\r\n                return;\r\n            }\r\n\r\n            var nextRequest = GetNextRequest(text, DialogsSource);\r\n\r\n            nextRequest.ProcessAsync(results =>\r\n            {\r\n                if (nextRequest.IsCanceled) return;\r\n                if (!string.Equals(Text, nextRequest.Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                Rows.Clear();\r\n                if (results.Count > 0)\r\n                {\r\n                    DialogRow currentRow = null;\r\n                    var secondSlice = new List<DialogItem>();\r\n                    var maxCount = 16;\r\n                    for (var i = 0; i < results.Count; i++)\r\n                    {\r\n                        var d = results[i];\r\n\r\n                        if (i < maxCount)\r\n                        {\r\n                            if (i % 4 == 0)\r\n                            {\r\n                                currentRow = new DialogRow();\r\n                                Rows.Add(currentRow);\r\n                            }\r\n\r\n                            currentRow.Add(d);\r\n                            d.Row = currentRow;\r\n                        }\r\n                        else\r\n                        {\r\n                            secondSlice.Add(d);\r\n                        }\r\n                    }\r\n\r\n                    if (secondSlice.Count > 0)\r\n                    {\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            if (nextRequest.IsCanceled) return;\r\n                            if (!string.Equals(Text, nextRequest.Text, StringComparison.OrdinalIgnoreCase)) return;\r\n\r\n                            for (var i = 0; i < secondSlice.Count; i++)\r\n                            {\r\n                                if (i % 4 == 0)\r\n                                {\r\n                                    currentRow = new DialogRow();\r\n                                    Rows.Add(currentRow);\r\n                                }\r\n\r\n                                currentRow.Add(secondSlice[i]);\r\n                                secondSlice[i].Row = currentRow;\r\n                            }\r\n                        });\r\n                    }\r\n                }\r\n            });\r\n\r\n            _searchResultsCache[nextRequest.Text] = nextRequest;\r\n            _lastRequest = nextRequest;\r\n        }\r\n\r\n        private SearchDialogRequest GetNextRequest(string text, List<DialogItem> dialogsSource)\r\n        {\r\n            SearchDialogRequest nextRequest;\r\n            if (!_searchResultsCache.TryGetValue(text, out nextRequest))\r\n            {\r\n                foreach (var dialogItem in dialogsSource)\r\n                {\r\n                    var dialog = dialogItem.Dialog;\r\n\r\n                    var chat = dialog.With as TLChatBase;\r\n                    var user = dialog.With as TLUserBase;\r\n                    if (chat != null && chat.FullNameWords == null)\r\n                    {\r\n                        chat.FullNameWords = chat.FullName.Split(' ');\r\n                    }\r\n                    else if (user != null && user.FullNameWords == null)\r\n                    {\r\n                        user.FullNameWords = user.FullName.Split(' ');\r\n                    }\r\n                }\r\n\r\n                nextRequest = new SearchDialogRequest(text, dialogsSource);\r\n            }\r\n            return nextRequest;\r\n        }\r\n\r\n        private void UIElement_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            var header = Dialogs.ListHeader as Grid;\r\n            if (header != null)\r\n            {\r\n                header.Visibility = Visibility.Collapsed;\r\n            }\r\n\r\n            Dialogs.VerticalAlignment = VerticalAlignment.Stretch;\r\n            Dialogs.Background = (Brush)Resources[\"BackgroundBrush\"];\r\n\r\n            //LayoutRoot.Background = (Brush)Resources[\"BackgroundBrush\"];\r\n        }\r\n\r\n        private void UIElement_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            var header = Dialogs.ListHeader as Grid;\r\n            if (header != null)\r\n            {\r\n                header.Visibility = Visibility.Visible;\r\n            }\r\n\r\n            SetListVerticalAlignment(Rows.Count);\r\n            Dialogs_OnViewportChanged(null, null);\r\n        }\r\n\r\n        private void Dialogs_OnCloseToEnd(object sender, System.EventArgs e)\r\n        {\r\n            //LoadNextSlice();\r\n        }\r\n\r\n        private void ListHeader_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            TryClose();\r\n        }\r\n    }\r\n    \r\n    public class Group<T> : BindableCollection<T>\r\n    {\r\n        public string GroupName { get; private set; }\r\n\r\n        public Group(string groupName)\r\n        {\r\n            GroupName = groupName;\r\n        }\r\n    }\r\n\r\n    public class DialogRow : PropertyChangedBase\r\n    {\r\n        public DialogItem Dialog1 { get; set; }\r\n        public DialogItem Dialog2 { get; set; }\r\n        public DialogItem Dialog3 { get; set; }\r\n        public DialogItem Dialog4 { get; set; }\r\n\r\n        public bool HasEmptyItem()\r\n        {\r\n            return Dialog4 == null;\r\n        }\r\n\r\n        public void Add(DialogItem dialog, bool notify = false)\r\n        {\r\n            if (Dialog1 == null)\r\n            {\r\n                Dialog1 = dialog;\r\n                if (notify) NotifyOfPropertyChange(() => Dialog1);\r\n            }\r\n            else if (Dialog2 == null)\r\n            {\r\n                Dialog2 = dialog;\r\n                if (notify) NotifyOfPropertyChange(() => Dialog2);\r\n            }\r\n            else if (Dialog3 == null)\r\n            {\r\n                Dialog3 = dialog;\r\n                if (notify) NotifyOfPropertyChange(() => Dialog3);\r\n            }\r\n            else if (Dialog4 == null)\r\n            {\r\n                Dialog4 = dialog;\r\n                if (notify) NotifyOfPropertyChange(() => Dialog4);\r\n            }\r\n        }\r\n\r\n        public IEnumerable<DialogItem> Between(DialogItem item1, DialogItem item2)\r\n        {\r\n            if (item1 == Dialog1)\r\n            {\r\n                if (item2 == Dialog3)\r\n                {\r\n                    yield return Dialog2;\r\n                }\r\n                else if (item2 == Dialog4)\r\n                {\r\n                    yield return Dialog2;\r\n                    yield return Dialog3;\r\n                }\r\n            }\r\n            else if (item1 == Dialog2)\r\n            {\r\n                if (item2 == Dialog4)\r\n                {\r\n                    yield return Dialog3;\r\n                }\r\n            }\r\n            else if (item1 == Dialog3)\r\n            {\r\n                if (item2 == Dialog1)\r\n                {\r\n                    yield return Dialog2;\r\n                }\r\n            }\r\n            else if (item1 == Dialog4)\r\n            {\r\n                if (item2 == Dialog2)\r\n                {\r\n                    yield return Dialog3;\r\n                }\r\n                else if (item2 == Dialog1)\r\n                {\r\n                    yield return Dialog2;\r\n                    yield return Dialog3;\r\n                }\r\n            }\r\n        }\r\n\r\n        public DialogItem GetLast()\r\n        {\r\n            if (Dialog4 != null) return Dialog4;\r\n            if (Dialog3 != null) return Dialog3;\r\n            if (Dialog2 != null) return Dialog2;\r\n\r\n            return Dialog1;\r\n        }\r\n    }\r\n\r\n    public class DialogItem : INotifyPropertyChanged\r\n    {\r\n        public bool IsSelected { get; set; }\r\n        public TLDialogBase Dialog { get; set; }\r\n        public DialogItem Self { get { return this; } }\r\n        public DialogRow Row { get; set; }\r\n\r\n        public bool SuppressAnimation { get; set; }\r\n\r\n        public event PropertyChangedEventHandler PropertyChanged;\r\n\r\n        public virtual void RaisePropertyChanged([CallerMemberName] string propertyName = null)\r\n        {\r\n            PropertyChangedEventHandler handler = PropertyChanged;\r\n            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));\r\n        }\r\n    }\r\n\r\n    public class PickDialogEventArgs : System.EventArgs\r\n    {\r\n        public string Comment { get; set; }\r\n\r\n        public IList<TLDialogBase> Dialogs { get; set; }\r\n    }\r\n\r\n    public class SearchDialogRequest\r\n    {\r\n        public bool IsCanceled;\r\n\r\n        public string TransliterateText { get; private set; }\r\n\r\n        public string Text { get; private set; }\r\n\r\n        public IList<DialogItem> DialogsSource { get; private set; }\r\n\r\n        public IList<DialogItem> Results { get; private set; }\r\n\r\n        public int Offset { get; set; }\r\n\r\n        public int Limit { get { return 20; } }\r\n\r\n        public bool IsLastSliceLoaded { get; set; }\r\n\r\n        public SearchDialogRequest(string text, IList<DialogItem> dialogsSource)\r\n        {\r\n            Text = text;\r\n            TransliterateText = Language.Transliterate(text);\r\n            DialogsSource = dialogsSource;\r\n        }\r\n\r\n        private static bool IsUserValid(TLUserBase contact, string text)\r\n        {\r\n            if (string.IsNullOrEmpty(text)) return false;\r\n\r\n            return contact.FirstName.ToString().StartsWith(text, StringComparison.OrdinalIgnoreCase)\r\n                || contact.LastName.ToString().StartsWith(text, StringComparison.OrdinalIgnoreCase)\r\n                || contact.FullName.StartsWith(text, StringComparison.OrdinalIgnoreCase)\r\n                || (contact.FullNameWords != null && contact.FullNameWords.Any(x => x.StartsWith(text, StringComparison.OrdinalIgnoreCase)));\r\n        }\r\n\r\n        private static bool IsChatValid(TLChatBase chat, string text, bool useFastSearch)\r\n        {\r\n            if (string.IsNullOrEmpty(text)) return false;\r\n\r\n            if (!useFastSearch)\r\n            {\r\n                var fullName = chat.FullName;\r\n\r\n                var i = fullName.IndexOf(text, StringComparison.OrdinalIgnoreCase);\r\n                if (i != -1)\r\n                {\r\n                    while (i < fullName.Length && i != -1)\r\n                    {\r\n                        if (i == 0 || (i > 0 && fullName[i - 1] == ' '))\r\n                        {\r\n                            return true;\r\n                        }\r\n                        if (fullName.Length > i + 1)\r\n                        {\r\n                            i = fullName.IndexOf(text, i + 1, StringComparison.OrdinalIgnoreCase);\r\n                        }\r\n                        else\r\n                        {\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (chat.FullNameWords != null\r\n                    && chat.FullNameWords.Any(x => x.StartsWith(text, StringComparison.OrdinalIgnoreCase)))\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static bool IsUsernameValid(IUserName userNameContact, string text)\r\n        {\r\n            if (text.Length >= Constants.UsernameMinLength)\r\n            {\r\n                if (userNameContact != null)\r\n                {\r\n                    var userName = userNameContact.UserName != null ? userNameContact.UserName.ToString() : string.Empty;\r\n                    if (userName.StartsWith(text.TrimStart('@'), StringComparison.OrdinalIgnoreCase))\r\n                    {\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public void ProcessAsync(Action<IList<DialogItem>> callback)\r\n        {\r\n            if (Results != null)\r\n            {\r\n                IsCanceled = false;\r\n                callback.SafeInvoke(Results);\r\n                return;\r\n            }\r\n\r\n            var dialogsSource = DialogsSource;\r\n\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var useFastSearch = !Text.Contains(\" \");\r\n\r\n                var results = new List<DialogItem>(dialogsSource.Count);\r\n                foreach (var dialogItem in dialogsSource)\r\n                {\r\n                    var dialog = dialogItem.Dialog;\r\n\r\n                    var user = dialog.With as TLUser;\r\n                    var chat = dialog.With as TLChatBase;\r\n                    if (user != null)\r\n                    {\r\n                        if (IsUserValid(user, Text)\r\n                            || IsUserValid(user, TransliterateText)\r\n                            || IsUsernameValid(user, Text))\r\n                        {\r\n                            results.Add(dialogItem);\r\n                        }\r\n                    }\r\n                    else if (chat != null)\r\n                    {\r\n                        if (IsChatValid(chat, Text, useFastSearch)\r\n                            || IsChatValid(chat, TransliterateText, useFastSearch)\r\n                            || IsUsernameValid(chat as IUserName, Text))\r\n                        {\r\n                            var channelForbidden = chat as TLChannelForbidden;\r\n                            if (channelForbidden != null)\r\n                            {\r\n                                continue;\r\n                            }\r\n\r\n                            var chat41 = chat as TLChat41;\r\n                            if (chat41 != null && chat41.IsMigrated)\r\n                            {\r\n                                continue;\r\n                            }\r\n\r\n                            results.Add(dialogItem);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                Results = results;\r\n\r\n                Execute.BeginOnUIThread(() => callback.SafeInvoke(Results));\r\n            });\r\n        }\r\n\r\n        public void Cancel()\r\n        {\r\n            IsCanceled = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/StatusControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.StatusControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    FlowDirection=\"LeftToRight\"\r\n    d:DesignHeight=\"120\" d:DesignWidth=\"120\">\r\n\r\n    <Grid>\r\n        <Grid x:Name=\"Sending\" HorizontalAlignment=\"Center\" Width=\"16\" Visibility=\"Collapsed\" Margin=\"0,0,6,0\">\r\n            <Ellipse x:Name=\"SendingEllipse\" Margin=\"0,0,0,0\" StrokeThickness=\"1.5\" Width=\"13\" Height=\"13\" Stroke=\"Green\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\"/>\r\n            <Polyline x:Name=\"SendingPolyline\" Margin=\"0,0,0,0\" Points=\"6.5,3 6.5,6.5 9,6.5\" Stroke=\"Green\" StrokeThickness=\"1.5\"/>\r\n        </Grid>\r\n        <Grid x:Name=\"Read\" HorizontalAlignment=\"Center\" Visibility=\"Collapsed\" Margin=\"-3,0,3,0\">\r\n            <Polyline x:Name=\"ReadPolyline1\" Points=\"5.6,10.0 1.7,6.0 0.3,7.5 5.6,12.8 16.2,2.2 14.8,0.8\" Fill=\"Red\" Margin=\"7,0,0,0\">\r\n                <Polyline.RenderTransform>\r\n                    <TranslateTransform X=\"-7\"/>\r\n                </Polyline.RenderTransform>\r\n            </Polyline>\r\n            <Polyline x:Name=\"ReadPolyline2\" VerticalAlignment=\"Stretch\" Points=\"20.3,0.8 21.7,2.2 11.1,12.8 9.7,11.4\" Fill=\"Red\" HorizontalAlignment=\"Left\"/>\r\n        </Grid>\r\n        <Grid x:Name=\"Failed\" HorizontalAlignment=\"Center\" Visibility=\"Collapsed\" Margin=\"-1,-2,5,-2\">\r\n            <Polyline Points=\"5.5,9 0,18 22,18 16.5,9\" Stroke=\"#FFCD7C83\" StrokeThickness=\"2\"/>\r\n            <Path Data=\"M11,0 11,10 M11,12 11,14\" Stroke=\"#FFCD7C83\" StrokeThickness=\"2\"/>\r\n        </Grid>\r\n        <Polyline x:Name=\"Confirmed\" Visibility=\"Visible\" HorizontalAlignment=\"Center\" Width=\"16\" Points=\"5.6,10.0 1.7,6.0 0.3,7.5 5.6,12.8 16.2,2.2 14.8,0.8\" Fill=\"Blue\" Margin=\"0,0,6,0\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/StatusControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class StatusControl\r\n    {\r\n        public static readonly DependencyProperty StatusProperty = DependencyProperty.Register(\r\n            \"Status\", typeof (MessageStatus), typeof (StatusControl), new PropertyMetadata(default(MessageStatus), OnStatusChanged));\r\n\r\n        private static void OnStatusChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var statusControl = d as StatusControl;\r\n            if (statusControl != null)\r\n            {\r\n                statusControl.Sending.Visibility = (MessageStatus)e.NewValue == MessageStatus.Sending || (MessageStatus)e.NewValue == MessageStatus.Compressing\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n                statusControl.Confirmed.Visibility = (MessageStatus)e.NewValue == MessageStatus.Confirmed\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n                statusControl.Read.Visibility = (MessageStatus)e.NewValue == MessageStatus.Read\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n                statusControl.Failed.Visibility = (MessageStatus)e.NewValue == MessageStatus.Failed\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty FillProperty = DependencyProperty.Register(\r\n            \"Fill\", typeof (Brush), typeof (StatusControl), new PropertyMetadata(default(Brush), OnFillChanged));\r\n\r\n        private static void OnFillChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var statusControl = d as StatusControl;\r\n            if (statusControl != null)\r\n            {\r\n                statusControl.SendingEllipse.Stroke = e.NewValue as Brush;\r\n                statusControl.SendingPolyline.Stroke = e.NewValue as Brush;\r\n\r\n                statusControl.ReadPolyline1.Fill = e.NewValue as Brush;\r\n                statusControl.ReadPolyline2.Fill = e.NewValue as Brush;\r\n\r\n                statusControl.Confirmed.Fill = e.NewValue as Brush;\r\n            }\r\n        }\r\n\r\n        public Brush Fill\r\n        {\r\n            get { return (Brush) GetValue(FillProperty); }\r\n            set { SetValue(FillProperty, value); }\r\n        }\r\n\r\n        public MessageStatus Status\r\n        {\r\n            get { return (MessageStatus) GetValue(StatusProperty); }\r\n            set { SetValue(StatusProperty, value); }\r\n        }\r\n\r\n        public StatusControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/TelegramAppBarButton.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.TelegramAppBarButton\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Disabled\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"LabelBlock\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"Button\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n            <VisualStateGroup x:Name=\"HintStates\">\r\n                <VisualState x:Name=\"Closed\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"LabelBlock\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Opened\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"LabelBlock\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n\r\n        <Border x:Name=\"Button\" Margin=\"20\" VerticalAlignment=\"Top\" Background=\"{StaticResource PhoneForegroundBrush}\" Width=\"32\" Height=\"32\">\r\n            <Border.OpacityMask>\r\n                <ImageBrush x:Name=\"ImageBrush\" ImageSource=\"/Images/ApplicationBar/ic_search_2x.png\"/>\r\n            </Border.OpacityMask>\r\n        </Border>\r\n        <TextBlock x:Name=\"LabelBlock\" \r\n            Visibility=\"Collapsed\" \r\n            Margin=\"-12,0,-12,9\" \r\n            MaxWidth=\"96\" \r\n            VerticalAlignment=\"Bottom\" \r\n            HorizontalAlignment=\"Center\"\r\n            Text=\"\" \r\n            TextWrapping=\"NoWrap\" \r\n            TextTrimming=\"WordEllipsis\" \r\n            FontSize=\"18\" \r\n            TextAlignment=\"Center\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/TelegramAppBarButton.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class TelegramAppBarButton\r\n    {\r\n        public static readonly DependencyProperty LabelForegroundProperty = DependencyProperty.Register(\r\n            \"LabelForeground\", typeof(Brush), typeof(TelegramAppBarButton), new PropertyMetadata(default(Brush), OnLabelForegroundChanged));\r\n\r\n        private static void OnLabelForegroundChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var telegramApplicationBarButton = d as TelegramAppBarButton;\r\n            if (telegramApplicationBarButton != null)\r\n            {\r\n                telegramApplicationBarButton.LabelBlock.Foreground = (Brush)e.NewValue;\r\n                telegramApplicationBarButton.Button.Background = (Brush)e.NewValue;\r\n            }\r\n        }\r\n\r\n        public Brush LabelForeground\r\n        {\r\n            get { return (Brush) GetValue(LabelForegroundProperty); }\r\n            set { SetValue(LabelForegroundProperty, value); }\r\n        }\r\n\r\n        private static void SetDefaultValues()\r\n        {\r\n            var applicationBar = TelegramApplicationBar.ApplicationBar;\r\n            if (applicationBar.DefaultSize < TelegramApplicationBar.ApplicaitonBarDefaultSize1X)\r\n            {\r\n                var scaleFactor = applicationBar.DefaultSize / TelegramApplicationBar.ApplicaitonBarDefaultSize1X;\r\n                _iconMargin = 20.0 * scaleFactor;\r\n                _iconSize = applicationBar.DefaultSize - 2.0 * _iconMargin;\r\n                _iconLabelFontSize = 18.0 * scaleFactor;\r\n            }\r\n            else\r\n            {\r\n                _iconSize = 32.0;\r\n                _iconMargin = 20.0;\r\n                _iconLabelFontSize = 18.0;\r\n            }\r\n        }\r\n\r\n        private static double? _iconLabelFontSize;\r\n\r\n        public static double IconLabelFontSize\r\n        {\r\n            get\r\n            {\r\n                if (_iconLabelFontSize == null)\r\n                {\r\n                    SetDefaultValues();\r\n                }\r\n\r\n                return _iconLabelFontSize.Value;\r\n            }\r\n        }\r\n\r\n        private static double? _iconSize;\r\n\r\n        public static double IconSize\r\n        {\r\n            get\r\n            {\r\n                if (_iconSize == null)\r\n                {\r\n                    SetDefaultValues();\r\n                }\r\n\r\n                return _iconSize.Value;\r\n            }\r\n        }\r\n\r\n        private static double? _iconMargin;\r\n\r\n        public static double IconMargin\r\n        {\r\n            get\r\n            {\r\n                if (_iconMargin == null)\r\n                {\r\n                    SetDefaultValues();\r\n                }\r\n\r\n                return _iconMargin.Value;\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register(\r\n            \"ImageSource\", typeof (ImageSource), typeof (TelegramAppBarButton), new PropertyMetadata(default(ImageSource), OnImageSourceChanged));\r\n\r\n        private static void OnImageSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var telegramApplicationBarButton = d as TelegramAppBarButton;\r\n            if (telegramApplicationBarButton != null)\r\n            {\r\n                telegramApplicationBarButton.ImageBrush.ImageSource = e.NewValue as ImageSource;\r\n            }\r\n        }\r\n\r\n        public ImageSource ImageSource\r\n        {\r\n            get { return (ImageSource) GetValue(ImageSourceProperty); }\r\n            set { SetValue(ImageSourceProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(\r\n            \"Text\", typeof (string), typeof (TelegramAppBarButton), new PropertyMetadata(default(string), OnTextChanged));\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var telegramApplicationBarButton = d as TelegramAppBarButton;\r\n            if (telegramApplicationBarButton != null)\r\n            {\r\n                telegramApplicationBarButton.LabelBlock.Text = e.NewValue as string;\r\n            }\r\n        }\r\n\r\n        public string Text\r\n        {\r\n            get { return (string) GetValue(TextProperty); }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        public TelegramAppBarButton()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Button.Margin = new Thickness(20.0, IconMargin, 20.0, IconMargin);\r\n            Button.Width = IconSize;\r\n            Button.Height = IconSize;\r\n\r\n            LabelBlock.FontSize = IconLabelFontSize;\r\n\r\n            IsEnabledChanged += OnIsEnabledChanged;\r\n            Loaded += OnLoaded;\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= OnLoaded;\r\n            if (!IsEnabled)\r\n            {\r\n                VisualStateManager.GoToState(this, \"Disabled\", false);\r\n                LayoutRoot.IsHitTestVisible = false;\r\n            }\r\n        }\r\n\r\n        private void OnIsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            VisualStateManager.GoToState(this, (bool) e.NewValue ? \"Normal\" : \"Disabled\", false);\r\n            LayoutRoot.IsHitTestVisible = (bool) e.NewValue;\r\n        }\r\n\r\n        public void HideLabel()\r\n        {\r\n            VisualStateManager.GoToState(this, \"Closed\", false);\r\n        }\r\n\r\n        public void ShowLabel()\r\n        {\r\n            VisualStateManager.GoToState(this, \"Opened\", false);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/TelegramApplicationBar.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.TelegramApplicationBar\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    Margin=\"0,0,0,-18\" Height=\"90\"\r\n    d:DesignHeight=\"90\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"AppBarPanelLight\" Color=\"#E7E9EB\"/>\r\n        <SolidColorBrush x:Key=\"AppBarPanelDark\" Color=\"#1F1F1F\"/>\r\n        <SolidColorBrush x:Key=\"MorePanelLight\" Color=\"#F3F4F5\"/>\r\n        <SolidColorBrush x:Key=\"MorePanelDark\" Color=\"#2B2B2B\"/>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" CacheMode=\"BitmapCache\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid.RenderTransform>\r\n            <TranslateTransform x:Name=\"Transform\" Y=\"0\"/>\r\n        </Grid.RenderTransform>\r\n        <Grid.ColumnDefinitions>\r\n            <ColumnDefinition Width=\"72\"/>\r\n            <ColumnDefinition/>\r\n            <ColumnDefinition Width=\"72\"/>\r\n            <ColumnDefinition/>\r\n            <ColumnDefinition Width=\"72\"/>\r\n        </Grid.ColumnDefinitions>\r\n        <controls:TelegramAppBarButton\r\n            x:Name=\"MoreButton\"\r\n            Grid.Column=\"4\" \r\n            Tap=\"More_OnTap\"\r\n            ImageSource=\"/Images/ApplicationBar/ic_more_2x.png\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/TelegramApplicationBar.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class TelegramApplicationBar\r\n    {\r\n        public Brush BackgroundBrush\r\n        {\r\n            get { return LayoutRoot.Background; }\r\n            set { LayoutRoot.Background = value; }\r\n        }\r\n\r\n        public Brush MorePanelBackgroundBrush\r\n        {\r\n            get { return _morePanelBrush; }\r\n            set\r\n            {\r\n                _morePanelBrush = value;\r\n                if (MorePanel != null)\r\n                {\r\n                    MorePanel.Background = _morePanelBrush;\r\n                }\r\n            }\r\n        }\r\n\r\n        public event EventHandler PanelOpened;\r\n\r\n        protected virtual void RaisePanelOpened()\r\n        {\r\n            var handler = PanelOpened;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler PanelClosed;\r\n\r\n        protected virtual void RaisePanelClosed()\r\n        {\r\n            EventHandler handler = PanelClosed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private static ApplicationBar _applicationBar;\r\n\r\n        public static ApplicationBar ApplicationBar\r\n        {\r\n            get\r\n            {\r\n                if (_applicationBar == null)\r\n                {\r\n                    _applicationBar = new ApplicationBar();\r\n                }\r\n\r\n                return _applicationBar;\r\n            }\r\n        }\r\n\r\n        public static double ApplicaitonBarDefaultSize1X\r\n        {\r\n            get { return 72.0; }\r\n        }\r\n\r\n        public static readonly DependencyProperty ButtonsProperty = DependencyProperty.Register(\r\n            \"Buttons\", typeof(IList), typeof(TelegramApplicationBar), new PropertyMetadata(default(IList), OnButtonsChanged));\r\n\r\n        public IList Buttons\r\n        {\r\n            get { return (IList)GetValue(ButtonsProperty); }\r\n            set { SetValue(ButtonsProperty, value); }\r\n        }\r\n\r\n        private static void OnButtonsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var telegramApplicationBar = d as TelegramApplicationBar;\r\n            if (telegramApplicationBar != null)\r\n            {\r\n                var oldButtons = e.OldValue as IList;\r\n                if (oldButtons != null)\r\n                {\r\n                    for (var i = oldButtons.Count - 1; i >= 0; i--)\r\n                    {\r\n                        var button = oldButtons[i] as FrameworkElement;\r\n                        if (button != null)\r\n                        {\r\n                            button.Tap -= telegramApplicationBar.Button_OnTap;\r\n                        }\r\n                    }\r\n\r\n                    var notifyCollectionChanged = oldButtons as INotifyCollectionChanged;\r\n                    if (notifyCollectionChanged != null)\r\n                    {\r\n                        notifyCollectionChanged.CollectionChanged -= telegramApplicationBar.OnCollectionChanged;\r\n                    }\r\n                }\r\n\r\n                telegramApplicationBar.LayoutRoot.Children.Clear();\r\n                var newButtons = e.NewValue as IList;\r\n                if (newButtons != null)\r\n                {\r\n                    for (var i = 0; i < newButtons.Count && i < 4; i++)\r\n                    {\r\n                        var button = newButtons[i] as FrameworkElement;\r\n                        if (button != null)\r\n                        {\r\n                            button.Tap += telegramApplicationBar.Button_OnTap;\r\n\r\n                            telegramApplicationBar.LayoutRoot.Children.Add(button);\r\n                        }\r\n                    }\r\n\r\n                    var notifyCollectionChanged = newButtons as INotifyCollectionChanged;\r\n                    if (notifyCollectionChanged != null)\r\n                    {\r\n                        notifyCollectionChanged.CollectionChanged += telegramApplicationBar.OnCollectionChanged;\r\n                    }\r\n                }\r\n                telegramApplicationBar.LayoutRoot.Children.Add(telegramApplicationBar.MoreButton);\r\n            }\r\n        }\r\n\r\n        private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (e.Action == NotifyCollectionChangedAction.Reset)\r\n            {\r\n                foreach (var child in LayoutRoot.Children)\r\n                {\r\n                    if (child == MoreButton) continue;\r\n\r\n                    var button = child as FrameworkElement;\r\n                    if (button != null)\r\n                    {\r\n                        button.Tap -= Button_OnTap;\r\n                    }\r\n                }\r\n\r\n                LayoutRoot.Children.Clear();\r\n                LayoutRoot.Children.Add(MoreButton);\r\n            }\r\n\r\n            if (e.OldItems != null)\r\n            {\r\n                foreach (var oldItem in e.OldItems)\r\n                {\r\n                    var button = oldItem as FrameworkElement;\r\n                    if (button != null)\r\n                    {\r\n                        button.Tap -= Button_OnTap;\r\n\r\n                        LayoutRoot.Children.Remove(button);\r\n                    }\r\n                }\r\n            }\r\n            if (e.NewItems != null)\r\n            {\r\n                foreach (var newItem in e.NewItems)\r\n                {\r\n                    var button = newItem as FrameworkElement;\r\n                    if (button != null)\r\n                    {\r\n                        button.Tap += Button_OnTap;\r\n\r\n                        LayoutRoot.Children.Add(button);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty MorePanelProperty = DependencyProperty.Register(\r\n            \"MorePanel\", typeof(Border), typeof(TelegramApplicationBar), new PropertyMetadata(default(Border), OnMorePanelChanged));\r\n\r\n        private static void OnMorePanelChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var telegramApplicationBar = d as TelegramApplicationBar;\r\n            if (telegramApplicationBar != null)\r\n            {\r\n                var morePanel = e.NewValue as Border;\r\n                if (morePanel != null)\r\n                {\r\n                    morePanel.Background = telegramApplicationBar._morePanelBrush;\r\n                }\r\n            }\r\n        }\r\n\r\n        public Border MorePanel\r\n        {\r\n            get { return (Border)GetValue(MorePanelProperty); }\r\n            set { SetValue(MorePanelProperty, value); }\r\n        }\r\n\r\n        private void Button_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            HideLabels();\r\n            Transform.Y = 0.0;\r\n            if (MorePanel != null)\r\n            {\r\n                RaisePanelClosed();\r\n                MorePanel.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        private void HideLabels()\r\n        {\r\n            foreach (var child in LayoutRoot.Children)\r\n            {\r\n                var button = child as TelegramAppBarButton;\r\n                if (button != null)\r\n                {\r\n                    button.HideLabel();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ShowLabels()\r\n        {\r\n            foreach (var child in LayoutRoot.Children)\r\n            {\r\n                var button = child as TelegramAppBarButton;\r\n                if (button != null)\r\n                {\r\n                    button.ShowLabel();\r\n                }\r\n            }\r\n        }\r\n\r\n        private Brush _morePanelBrush;\r\n\r\n        public TelegramApplicationBar()\r\n        {\r\n            InitializeComponent();\r\n\r\n            SetValue(ButtonsProperty, new ObservableCollection<FrameworkElement>()); \r\n\r\n            var applicationBar = ApplicationBar;\r\n            if (applicationBar.DefaultSize < ApplicaitonBarDefaultSize1X)\r\n            {\r\n                Height = applicationBar.DefaultSize + 18.0;\r\n            }\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            LayoutRoot.Background = isLightTheme ? (SolidColorBrush)Resources[\"AppBarPanelLight\"] : (SolidColorBrush)Resources[\"AppBarPanelDark\"];\r\n            _morePanelBrush = isLightTheme ? (SolidColorBrush)Resources[\"MorePanelLight\"] : (SolidColorBrush)Resources[\"MorePanelDark\"];\r\n            if (MorePanel != null)\r\n            {\r\n\r\n                MorePanel.Background = _morePanelBrush; \r\n            }\r\n\r\n            Loaded += OnApplicationBarLoaded;\r\n            Unloaded += OnApplicationBarUnloaded;\r\n        }\r\n\r\n        private PhoneApplicationFrame _parentFrame;\r\n\r\n        private void OnApplicationBarLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            _parentFrame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            if (_parentFrame != null)\r\n            {\r\n                _parentFrame.BackKeyPress += OnFrameBackKeyPressed;\r\n            }\r\n        }\r\n\r\n        private void OnApplicationBarUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_parentFrame != null)\r\n            {\r\n                _parentFrame.BackKeyPress -= OnFrameBackKeyPressed;\r\n            }\r\n        }\r\n\r\n        private void OnFrameBackKeyPressed(object sender, CancelEventArgs e)\r\n        {\r\n            if (MorePanel != null\r\n                && MorePanel.Visibility == Visibility.Visible)\r\n            {\r\n                Close();\r\n\r\n                e.Cancel = true;\r\n                return;\r\n            }\r\n        }\r\n\r\n        private void More_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (MorePanel.Visibility == Visibility.Visible)\r\n                {\r\n                    CloseMorePanel();\r\n                }\r\n                else\r\n                {\r\n                    OpenMorePanel();\r\n                }\r\n            });\r\n        }\r\n\r\n        private void OpenMorePanel()\r\n        {\r\n            if (MorePanel != null && MorePanel.ActualHeight == 0.0)\r\n            {\r\n                MorePanel.Visibility = Visibility.Visible;\r\n                MorePanel.Opacity = 0.0;\r\n                MorePanel.IsHitTestVisible = false;\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    MorePanel.Opacity = 1.0;\r\n                    MorePanel.IsHitTestVisible = true;\r\n\r\n                    OpenMorePanelInternal();\r\n                });\r\n            }\r\n            else\r\n            {\r\n                OpenMorePanelInternal();\r\n            }\r\n        }\r\n\r\n        private void OpenMorePanelInternal()\r\n        {\r\n            RaisePanelOpened();\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateAppBarPanelAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateAppBarPanelAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n            translateAppBarPanelAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = -18.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n            Storyboard.SetTarget(translateAppBarPanelAnimation, Transform);\r\n            Storyboard.SetTargetProperty(translateAppBarPanelAnimation, new PropertyPath(\"Y\"));\r\n            storyboard.Children.Add(translateAppBarPanelAnimation);\r\n\r\n            if (MorePanel != null)\r\n            {\r\n                MorePanel.Visibility = Visibility.Visible;\r\n\r\n                var continuumLayoutRootY = new DoubleAnimationUsingKeyFrames();\r\n                continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = MorePanel.ActualHeight });\r\n                continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = -18.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n                Storyboard.SetTarget(continuumLayoutRootY, MorePanel);\r\n                Storyboard.SetTargetProperty(continuumLayoutRootY, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(continuumLayoutRootY);\r\n            }\r\n\r\n            ShowLabels();\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void CloseMorePanel()\r\n        {\r\n            RaisePanelClosed();\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateAppBarPanelAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateAppBarPanelAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(translateAppBarPanelAnimation, Transform);\r\n            Storyboard.SetTargetProperty(translateAppBarPanelAnimation, new PropertyPath(\"Y\"));\r\n            storyboard.Children.Add(translateAppBarPanelAnimation);\r\n\r\n            if (MorePanel != null)\r\n            {\r\n                var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n                translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = MorePanel.ActualHeight, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n                Storyboard.SetTarget(translateAnimation, MorePanel);\r\n                Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n                storyboard.Children.Add(translateAnimation);\r\n            }\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                HideLabels();\r\n                if (MorePanel != null) MorePanel.Visibility = Visibility.Collapsed;\r\n            };\r\n        }\r\n\r\n        public void Close()\r\n        {\r\n            CloseMorePanel();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/TelegramDatePickerPage.xaml",
    "content": "﻿<controls:DateTimePickerPageBase\r\n    x:Class=\"TelegramClient.Views.Controls.TelegramDatePickerPage\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:toolkitPrimitives=\"clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:DateTimePickerPageBase.Resources>\r\n        <ExponentialEase x:Key=\"Ease\" EasingMode=\"EaseIn\"/>\r\n        <!--\r\n        <Style TargetType=\"toolkitPrimitives:LoopingSelectorItem\">\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n            <Setter Property=\"Padding\" Value=\"6\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"toolkitPrimitives:LoopingSelectorItem\">\r\n                        <Border x:Name=\"root\" Background=\"Transparent\" CacheMode=\"BitmapCache\" Padding=\"{TemplateBinding Padding}\">\r\n                            <Border.RenderTransform>\r\n                                <TranslateTransform x:Name=\"Transform\"/>\r\n                            </Border.RenderTransform>\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualStateGroup.Transitions>\r\n                                        <VisualTransition From=\"Normal\" GeneratedDuration=\"0:0:0.33\" To=\"Expanded\"/>\r\n                                        <VisualTransition From=\"Expanded\" GeneratedDuration=\"0:0:0.33\" To=\"Normal\"/>\r\n                                    </VisualStateGroup.Transitions>\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"Expanded\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Duration=\"0\" To=\"0.8\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"border\"/>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Selected\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"background\"/>\r\n                                            <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"border\"/>\r\n                                            <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"border\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"White\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Grid>\r\n                                <Rectangle x:Name=\"background\" CacheMode=\"BitmapCache\" Fill=\"{StaticResource TelegramBadgeAccentBrush}\" Margin=\"0\" Opacity=\"0\"/>\r\n                                <Border x:Name=\"border\" BorderBrush=\"{StaticResource PhoneSubtleBrush}\" BorderThickness=\"3\" Opacity=\"0\">\r\n                                    <ContentControl x:Name=\"contentControl\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" VerticalContentAlignment=\"Stretch\">\r\n                                        <ContentPresenter x:Name=\"contentPresenter\" CacheMode=\"BitmapCache\"/>\r\n                                    </ContentControl>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        -->\r\n        \r\n    </controls:DateTimePickerPageBase.Resources>\r\n\r\n    <Grid Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"VisibilityStates\">\r\n                <VisualState x:Name=\"Open\">\r\n                    <Storyboard>\r\n                        <DoubleAnimation\r\n                            Storyboard.TargetName=\"PlaneProjection\"\r\n                            Storyboard.TargetProperty=\"RotationX\"\r\n                            From=\"-50\"\r\n                            To=\"0\"\r\n                            Duration=\"0:0:0.2\"/>\r\n                    </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Closed\">\r\n                    <Storyboard>\r\n                        <DoubleAnimation\r\n                            Storyboard.TargetName=\"PlaneProjection\"\r\n                            Storyboard.TargetProperty=\"RotationX\"\r\n                            To=\"90\"\r\n                            Duration=\"0:0:0.2\"\r\n                            EasingFunction=\"{StaticResource Ease}\"/>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n        <Grid.Projection>\r\n            <PlaneProjection x:Name=\"PlaneProjection\"/>\r\n        </Grid.Projection>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!-- LoopingSelectors -->\r\n        <Grid\r\n            Grid.Row=\"2\"\r\n            HorizontalAlignment=\"Center\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition/>\r\n            </Grid.ColumnDefinitions>\r\n            <toolkitPrimitives:LoopingSelector\r\n                x:Name=\"SecondarySelector\"\r\n                Grid.Column=\"0\"\r\n                Width=\"148\"\r\n                ItemSize=\"148,148\"\r\n                ItemMargin=\"6\">\r\n                <toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <StackPanel\r\n                            HorizontalAlignment=\"Left\"\r\n                            VerticalAlignment=\"Bottom\"\r\n                            Margin=\"6\">\r\n                            <TextBlock\r\n                                Text=\"{Binding MonthNumber}\"\r\n                                FontSize=\"54\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\"\r\n                                Margin=\"0,-8\"/>\r\n                            <TextBlock\r\n                                Text=\"{Binding MonthName}\"\r\n                                FontSize=\"20\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                                Margin=\"0,-2\"/>\r\n                        </StackPanel>\r\n                    </DataTemplate>\r\n                </toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n            </toolkitPrimitives:LoopingSelector>\r\n            <toolkitPrimitives:LoopingSelector\r\n                x:Name=\"TertiarySelector\"\r\n                Grid.Column=\"1\"\r\n                Width=\"148\"\r\n                ItemSize=\"148,148\"\r\n                ItemMargin=\"6\">\r\n                <toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <StackPanel\r\n                            HorizontalAlignment=\"Left\"\r\n                            VerticalAlignment=\"Bottom\"\r\n                            Margin=\"6\">\r\n                            <TextBlock\r\n                                Text=\"{Binding DayNumber}\"\r\n                                FontSize=\"54\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\"\r\n                                Margin=\"0,-8\"/>\r\n                            <TextBlock\r\n                                Text=\"{Binding DayName}\"\r\n                                FontSize=\"20\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                                Margin=\"0,-2\"/>\r\n                        </StackPanel>\r\n                    </DataTemplate>\r\n                </toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n            </toolkitPrimitives:LoopingSelector>\r\n            <toolkitPrimitives:LoopingSelector\r\n                Grid.Column=\"2\"\r\n                x:Name=\"PrimarySelector\"\r\n                Width=\"148\"\r\n                ItemSize=\"148,148\"\r\n                ItemMargin=\"6\">\r\n                <toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n                    <DataTemplate>\r\n                        <StackPanel\r\n                            HorizontalAlignment=\"Left\"\r\n                            VerticalAlignment=\"Bottom\"\r\n                            Margin=\"6\">\r\n                            <TextBlock\r\n                                Text=\"{Binding YearNumber}\"\r\n                                FontSize=\"54\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilySemiBold}\"\r\n                                Margin=\"0,-8\"/>\r\n                            <TextBlock\r\n                                Text=\" \"\r\n                                FontSize=\"20\"\r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                                Foreground=\"{StaticResource PhoneSubtleBrush}\"\r\n                                Margin=\"0,-2\"/>\r\n                        </StackPanel>\r\n                    </DataTemplate>\r\n                </toolkitPrimitives:LoopingSelector.ItemTemplate>\r\n            </toolkitPrimitives:LoopingSelector>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</controls:DateTimePickerPageBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/TelegramDatePickerPage.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Controls.LocalizedResources;\r\nusing Microsoft.Phone.Controls.Primitives;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class TelegramDatePickerPage\r\n    {\r\n        public TelegramDatePickerPage(YearDataSource yearDataSource)\r\n        {\r\n            InitializeComponent();\r\n            PrimarySelector.DataSource = yearDataSource;\r\n            SecondarySelector.DataSource = new MonthDataSource();\r\n            TertiarySelector.DataSource = new DayDataSource();\r\n            InitializeDateTimePickerPage(PrimarySelector, SecondarySelector, TertiarySelector);\r\n        }\r\n\r\n        protected override IEnumerable<LoopingSelector> GetSelectorsOrderedByCulturePattern()\r\n        {\r\n            string pattern = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern.ToUpperInvariant();\r\n            if (DateShouldFlowRTL())\r\n            {\r\n                char[] charArray = pattern.ToCharArray();\r\n                Array.Reverse(charArray);\r\n                pattern = new string(charArray);\r\n            }\r\n            return DateTimePickerPageBase.GetSelectorsOrderedByCulturePattern(pattern, new[]\r\n            {\r\n                'Y',\r\n                'M',\r\n                'D'\r\n            }, new []\r\n            {\r\n                PrimarySelector,\r\n                SecondarySelector,\r\n                TertiarySelector\r\n            });\r\n        }\r\n\r\n        internal static bool DateShouldFlowRTL()\r\n        {\r\n            var letterIsoLanguageName = CultureInfo.CurrentCulture.TwoLetterISOLanguageName;\r\n            if (letterIsoLanguageName != \"ar\")\r\n                return letterIsoLanguageName == \"fa\";\r\n            return true;\r\n        }\r\n\r\n        public override void SetFlowDirection(FlowDirection flowDirection)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n    public abstract class DateTimePickerPageBase : PhoneApplicationPage, IDateTimePickerPage\r\n    {\r\n        private const string VisibilityGroupName = \"VisibilityStates\";\r\n        private const string OpenVisibilityStateName = \"Open\";\r\n        private const string ClosedVisibilityStateName = \"Closed\";\r\n        private const string StateKey_Value = \"DateTimePickerPageBase_State_Value\";\r\n        private LoopingSelector _primarySelectorPart;\r\n        private LoopingSelector _secondarySelectorPart;\r\n        private LoopingSelector _tertiarySelectorPart;\r\n        private Storyboard _closedStoryboard;\r\n        private DateTime? _value;\r\n\r\n        public DateTime? Value\r\n        {\r\n            get\r\n            {\r\n                return this._value;\r\n            }\r\n            set\r\n            {\r\n                this._value = value;\r\n                DateTimeWrapper dateTimeWrapper = new DateTimeWrapper(this._value.GetValueOrDefault(DateTime.Now));\r\n                this._primarySelectorPart.DataSource.SelectedItem = (object)dateTimeWrapper;\r\n                this._secondarySelectorPart.DataSource.SelectedItem = (object)dateTimeWrapper;\r\n                this._tertiarySelectorPart.DataSource.SelectedItem = (object)dateTimeWrapper;\r\n            }\r\n        }\r\n\r\n        protected void InitializeDateTimePickerPage(LoopingSelector primarySelector, LoopingSelector secondarySelector, LoopingSelector tertiarySelector)\r\n        {\r\n            if (primarySelector == null)\r\n                throw new ArgumentNullException(\"primarySelector\");\r\n            if (secondarySelector == null)\r\n                throw new ArgumentNullException(\"secondarySelector\");\r\n            if (tertiarySelector == null)\r\n                throw new ArgumentNullException(\"tertiarySelector\");\r\n            this._primarySelectorPart = primarySelector;\r\n            this._secondarySelectorPart = secondarySelector;\r\n            this._tertiarySelectorPart = tertiarySelector;\r\n            this._primarySelectorPart.DataSource.SelectionChanged += new EventHandler<SelectionChangedEventArgs>(this.OnDataSourceSelectionChanged);\r\n            this._secondarySelectorPart.DataSource.SelectionChanged += new EventHandler<SelectionChangedEventArgs>(this.OnDataSourceSelectionChanged);\r\n            this._tertiarySelectorPart.DataSource.SelectionChanged += new EventHandler<SelectionChangedEventArgs>(this.OnDataSourceSelectionChanged);\r\n            this._primarySelectorPart.IsExpandedChanged += new DependencyPropertyChangedEventHandler(this.OnSelectorIsExpandedChanged);\r\n            this._secondarySelectorPart.IsExpandedChanged += new DependencyPropertyChangedEventHandler(this.OnSelectorIsExpandedChanged);\r\n            this._tertiarySelectorPart.IsExpandedChanged += new DependencyPropertyChangedEventHandler(this.OnSelectorIsExpandedChanged);\r\n            this._primarySelectorPart.Visibility = Visibility.Collapsed;\r\n            this._secondarySelectorPart.Visibility = Visibility.Collapsed;\r\n            this._tertiarySelectorPart.Visibility = Visibility.Collapsed;\r\n            int num = 0;\r\n            foreach (LoopingSelector loopingSelector in this.GetSelectorsOrderedByCulturePattern())\r\n            {\r\n                Grid.SetColumn((FrameworkElement)loopingSelector, num);\r\n                loopingSelector.Visibility = Visibility.Visible;\r\n                ++num;\r\n            }\r\n            FrameworkElement child = VisualTreeHelper.GetChild((DependencyObject)this, 0) as FrameworkElement;\r\n            if (child != null)\r\n            {\r\n                foreach (VisualStateGroup visualStateGroup in (IEnumerable)VisualStateManager.GetVisualStateGroups(child))\r\n                {\r\n                    if (\"VisibilityStates\" == visualStateGroup.Name)\r\n                    {\r\n                        foreach (VisualState state in (IEnumerable)visualStateGroup.States)\r\n                        {\r\n                            if (\"Closed\" == state.Name && state.Storyboard != null)\r\n                            {\r\n                                this._closedStoryboard = state.Storyboard;\r\n                                this._closedStoryboard.Completed += new EventHandler(this.OnClosedStoryboardCompleted);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            if (this.ApplicationBar != null)\r\n            {\r\n                foreach (object button in (IEnumerable)this.ApplicationBar.Buttons)\r\n                {\r\n                    IApplicationBarIconButton applicationBarIconButton = button as IApplicationBarIconButton;\r\n                    if (applicationBarIconButton != null)\r\n                    {\r\n                        if (\"DONE\" == applicationBarIconButton.Text)\r\n                        {\r\n                            applicationBarIconButton.Text = ControlResources.DateTimePickerDoneText;\r\n                            applicationBarIconButton.Click += new EventHandler(this.OnDoneButtonClick);\r\n                        }\r\n                        else if (\"CANCEL\" == applicationBarIconButton.Text)\r\n                        {\r\n                            applicationBarIconButton.Text = ControlResources.DateTimePickerCancelText;\r\n                            applicationBarIconButton.Click += new EventHandler(this.OnCancelButtonClick);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            VisualStateManager.GoToState((Control)this, \"Open\", true);\r\n        }\r\n\r\n        private void OnDataSourceSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            DataSource dataSource = (DataSource)sender;\r\n            this._primarySelectorPart.DataSource.SelectedItem = dataSource.SelectedItem;\r\n            this._secondarySelectorPart.DataSource.SelectedItem = dataSource.SelectedItem;\r\n            this._tertiarySelectorPart.DataSource.SelectedItem = dataSource.SelectedItem;\r\n        }\r\n\r\n        private void OnSelectorIsExpandedChanged(object sender, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            if (!(bool)e.NewValue)\r\n                return;\r\n            this._primarySelectorPart.IsExpanded = sender == this._primarySelectorPart;\r\n            this._secondarySelectorPart.IsExpanded = sender == this._secondarySelectorPart;\r\n            this._tertiarySelectorPart.IsExpanded = sender == this._tertiarySelectorPart;\r\n        }\r\n\r\n        private void OnDoneButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            this._value = new DateTime?(((DateTimeWrapper)this._primarySelectorPart.DataSource.SelectedItem).DateTime);\r\n            this.ClosePickerPage();\r\n        }\r\n\r\n        private void OnCancelButtonClick(object sender, System.EventArgs e)\r\n        {\r\n            this._value = new DateTime?();\r\n            this.ClosePickerPage();\r\n        }\r\n\r\n        protected override void OnBackKeyPress(CancelEventArgs e)\r\n        {\r\n            if (e == null)\r\n                throw new ArgumentNullException(\"e\");\r\n            e.Cancel = true;\r\n            this.ClosePickerPage();\r\n        }\r\n\r\n        private void ClosePickerPage()\r\n        {\r\n            if (this._closedStoryboard != null)\r\n                VisualStateManager.GoToState((Control)this, \"Closed\", true);\r\n            else\r\n                this.OnClosedStoryboardCompleted((object)null, (System.EventArgs)null);\r\n        }\r\n\r\n        private void OnClosedStoryboardCompleted(object sender, System.EventArgs e)\r\n        {\r\n            this.NavigationService.GoBack();\r\n        }\r\n\r\n        protected abstract IEnumerable<LoopingSelector> GetSelectorsOrderedByCulturePattern();\r\n\r\n        protected static IEnumerable<LoopingSelector> GetSelectorsOrderedByCulturePattern(string pattern, char[] patternCharacters, LoopingSelector[] selectors)\r\n        {\r\n            if (pattern == null)\r\n                throw new ArgumentNullException(\"pattern\");\r\n            if (patternCharacters == null)\r\n                throw new ArgumentNullException(\"patternCharacters\");\r\n            if (selectors == null)\r\n                throw new ArgumentNullException(\"selectors\");\r\n            if (patternCharacters.Length != selectors.Length)\r\n                throw new ArgumentException(\"Arrays must contain the same number of elements.\");\r\n            List<Tuple<int, LoopingSelector>> source = new List<Tuple<int, LoopingSelector>>(patternCharacters.Length);\r\n            for (int index = 0; index < patternCharacters.Length; ++index)\r\n                source.Add(new Tuple<int, LoopingSelector>(pattern.IndexOf(patternCharacters[index]), selectors[index]));\r\n            return source.Where<Tuple<int, LoopingSelector>>((Func<Tuple<int, LoopingSelector>, bool>)(p => -1 != p.Item1)).OrderBy<Tuple<int, LoopingSelector>, int>((Func<Tuple<int, LoopingSelector>, int>)(p => p.Item1)).Select<Tuple<int, LoopingSelector>, LoopingSelector>((Func<Tuple<int, LoopingSelector>, LoopingSelector>)(p => p.Item2)).Where<LoopingSelector>((Func<LoopingSelector, bool>)(s => null != s));\r\n        }\r\n\r\n        protected override void OnNavigatedFrom(NavigationEventArgs e)\r\n        {\r\n            if (e == null)\r\n                throw new ArgumentNullException(\"e\");\r\n            base.OnNavigatedFrom(e);\r\n            if (!(\"app://external/\" == e.Uri.ToString()))\r\n                return;\r\n            this.State[\"DateTimePickerPageBase_State_Value\"] = (object)this.Value;\r\n        }\r\n\r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            if (e == null)\r\n                throw new ArgumentNullException(\"e\");\r\n            base.OnNavigatedTo(e);\r\n            if (!this.State.ContainsKey(\"DateTimePickerPageBase_State_Value\"))\r\n                return;\r\n            this.Value = this.State[\"DateTimePickerPageBase_State_Value\"] as DateTime?;\r\n            if (!this.NavigationService.CanGoBack)\r\n                return;\r\n            this.NavigationService.GoBack();\r\n        }\r\n\r\n        public abstract void SetFlowDirection(FlowDirection flowDirection);\r\n    }\r\n\r\n    public abstract class DataSource : ILoopingSelectorDataSource\r\n    {\r\n        private DateTimeWrapper _selectedItem;\r\n\r\n        public object SelectedItem\r\n        {\r\n            get\r\n            {\r\n                return (object)this._selectedItem;\r\n            }\r\n            set\r\n            {\r\n                if (value == this._selectedItem)\r\n                    return;\r\n                DateTimeWrapper dateTimeWrapper = (DateTimeWrapper)value;\r\n                if (dateTimeWrapper != null && this._selectedItem != null && !(dateTimeWrapper.DateTime != this._selectedItem.DateTime))\r\n                    return;\r\n                object selectedItem = (object)this._selectedItem;\r\n                this._selectedItem = dateTimeWrapper;\r\n                EventHandler<SelectionChangedEventArgs> selectionChanged = this.SelectionChanged;\r\n                if (selectionChanged == null)\r\n                    return;\r\n                selectionChanged((object)this, new SelectionChangedEventArgs((IList)new object[1]\r\n        {\r\n          selectedItem\r\n        }, (IList)new object[1]\r\n        {\r\n          (object) this._selectedItem\r\n        }));\r\n            }\r\n        }\r\n\r\n        public event EventHandler<SelectionChangedEventArgs> SelectionChanged;\r\n\r\n        public object GetNext(object relativeTo)\r\n        {\r\n            DateTime? relativeTo1 = this.GetRelativeTo(((DateTimeWrapper)relativeTo).DateTime, 1);\r\n            if (!relativeTo1.HasValue)\r\n                return (object)null;\r\n            return (object)new DateTimeWrapper(relativeTo1.Value);\r\n        }\r\n\r\n        public object GetPrevious(object relativeTo)\r\n        {\r\n            DateTime? relativeTo1 = this.GetRelativeTo(((DateTimeWrapper)relativeTo).DateTime, -1);\r\n            if (!relativeTo1.HasValue)\r\n                return (object)null;\r\n            return (object)new DateTimeWrapper(relativeTo1.Value);\r\n        }\r\n\r\n        protected abstract DateTime? GetRelativeTo(DateTime relativeDate, int delta);\r\n    }\r\n\r\n    public class YearDataSource : DataSource\r\n    {\r\n        private int _maxYear = DateTime.Now.Year;\r\n\r\n        public int MaxYear\r\n        {\r\n            get { return _maxYear; }\r\n            set { _maxYear = value; }\r\n        }\r\n\r\n        private int _minYear = 1900;\r\n\r\n        public int MinYear\r\n        {\r\n            get { return _minYear; }\r\n            set { _minYear = value; }\r\n        }\r\n\r\n        protected override DateTime? GetRelativeTo(DateTime relativeDate, int delta)\r\n        {\r\n            if (MinYear == relativeDate.Year && delta < 0 || MaxYear == relativeDate.Year && delta > 0)\r\n                return new DateTime?();\r\n            int year = relativeDate.Year + delta;\r\n            int day = Math.Min(relativeDate.Day, DateTime.DaysInMonth(year, relativeDate.Month));\r\n            return new DateTime?(new DateTime(year, relativeDate.Month, day, relativeDate.Hour, relativeDate.Minute, relativeDate.Second));\r\n        }\r\n    }\r\n\r\n    public class MonthDataSource : DataSource\r\n    {\r\n        protected override DateTime? GetRelativeTo(DateTime relativeDate, int delta)\r\n        {\r\n            int num = 12;\r\n            int month = (num + relativeDate.Month - 1 + delta) % num + 1;\r\n            int day = Math.Min(relativeDate.Day, DateTime.DaysInMonth(relativeDate.Year, month));\r\n            return new DateTime?(new DateTime(relativeDate.Year, month, day, relativeDate.Hour, relativeDate.Minute, relativeDate.Second));\r\n        }\r\n    }\r\n\r\n    public class DayDataSource : DataSource\r\n    {\r\n        protected override DateTime? GetRelativeTo(DateTime relativeDate, int delta)\r\n        {\r\n            int num = DateTime.DaysInMonth(relativeDate.Year, relativeDate.Month);\r\n            int day = (num + relativeDate.Day - 1 + delta) % num + 1;\r\n            return new DateTime?(new DateTime(relativeDate.Year, relativeDate.Month, day, relativeDate.Hour, relativeDate.Minute, relativeDate.Second));\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/TelegramPopup.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public class TelegramMessageBox : ContentControl\r\n    {\r\n        /// <summary>\r\n        /// Holds a weak reference to the message box that is currently displayed.\r\n        /// </summary>\r\n        private static WeakReference _currentInstance;\r\n\r\n        /// <summary>\r\n        /// The current screen width.\r\n        /// </summary>\r\n        private static readonly double _screenWidth = Application.Current.Host.Content.ActualWidth;\r\n\r\n        /// <summary>\r\n        /// The current screen height.\r\n        /// </summary>\r\n        private static readonly double _screenHeight = Application.Current.Host.Content.ActualHeight;\r\n\r\n        /// <summary>\r\n        /// The height of the system tray in pixels when the page\r\n        /// is in portrait mode.\r\n        /// </summary>\r\n        private const double _systemTrayHeightInPortrait = 32.0;\r\n\r\n        /// <summary>\r\n        /// The width of the system tray in pixels when the page\r\n        /// is in landscape mode.\r\n        /// </summary>\r\n        private const double _systemTrayWidthInLandscape = 72.0;\r\n\r\n        /// <summary>\r\n        /// Identifies whether the application bar and the system tray\r\n        /// must be restored after the message box is dismissed. \r\n        /// </summary>\r\n        private static bool _mustRestore = true;\r\n\r\n        /// <summary>\r\n        /// Left button template part.\r\n        /// </summary>\r\n        private Button _leftButton;\r\n\r\n        /// <summary>\r\n        /// Right button template part.\r\n        /// </summary>\r\n        private Button _rightButton;\r\n\r\n        /// <summary>\r\n        /// The popup used to display the message box.\r\n        /// </summary>\r\n        private Popup _popup;\r\n\r\n        /// <summary>\r\n        /// The child container of the popup.\r\n        /// </summary>\r\n        private Grid _container;\r\n\r\n        /// <summary>\r\n        /// The root visual of the application.\r\n        /// </summary>\r\n        private PhoneApplicationFrame _frame;\r\n\r\n        /// <summary>\r\n        /// The current application page.\r\n        /// </summary>\r\n        private PhoneApplicationPage _page;\r\n\r\n        /// <summary>\r\n        /// Identifies whether the application bar is visible or not before\r\n        /// opening the message box.\r\n        /// </summary>\r\n        private bool _hasApplicationBar;\r\n\r\n        /// <summary>\r\n        /// The current color of the system tray.\r\n        /// </summary>\r\n        private Color _systemTrayColor;\r\n\r\n        /// <summary>\r\n        /// Called when the message is being dismissing.\r\n        /// </summary>\r\n        public event EventHandler<DismissingEventArgs> Dismissing;\r\n\r\n        /// <summary>\r\n        /// Called when the message box is dismissed.\r\n        /// </summary>\r\n        public event EventHandler<DismissedEventArgs> Dismissed;\r\n\r\n        #region IsFullScreen DependencyProperty\r\n\r\n        /// <summary>\r\n        /// Gets or sets whether the message box occupies the whole screen.\r\n        /// </summary>\r\n        public bool IsFullScreen\r\n        {\r\n            get { return (bool)GetValue(IsFullScreenProperty); }\r\n            set { SetValue(IsFullScreenProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsFullScreen dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsFullScreenProperty =\r\n            DependencyProperty.Register(\"IsFullScreen\", typeof(bool), typeof(TelegramMessageBox), new PropertyMetadata(false, OnIsFullScreenPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Modifies the vertical alignment of the message box depending\r\n        /// on whether it should occupy the full screen or not.\r\n        /// </summary>\r\n        /// <param name=\"obj\"></param>\r\n        /// <param name=\"e\"></param>\r\n        private static void OnIsFullScreenPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var target = (TelegramMessageBox)obj;\r\n\r\n            if ((bool)e.NewValue)\r\n            {\r\n                target.VerticalAlignment = VerticalAlignment.Stretch;\r\n            }\r\n            else\r\n            {\r\n                target.VerticalAlignment = VerticalAlignment.Top;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Called when the back key is pressed. This event handler cancels\r\n        /// the backward navigation and dismisses the message box.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"e\">The event information.</param>\r\n        private void OnBackKeyPress(object sender, System.ComponentModel.CancelEventArgs e)\r\n        {\r\n            e.Cancel = true;\r\n            Dismiss(CustomMessageBoxResult.None, true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the application frame is navigating.\r\n        /// This event handler dismisses the message box.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"e\">The event information.</param>\r\n        private void OnNavigating(object sender, System.Windows.Navigation.NavigatingCancelEventArgs e)\r\n        {\r\n            Dismiss(CustomMessageBoxResult.None, false);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the CustomMessageBox class.\r\n        /// </summary>\r\n        public TelegramMessageBox()\r\n            : base()\r\n        {\r\n            //DefaultStyleKey = typeof(TelegramMessageBox);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Reveals the message box by inserting it into a popup and opening it.\r\n        /// </summary>\r\n        public void Show()\r\n        {\r\n            if (_popup != null)\r\n            {\r\n                if (_popup.IsOpen)\r\n                {\r\n                    return;\r\n                }\r\n            }\r\n\r\n            LayoutUpdated += CustomMessageBox_LayoutUpdated;\r\n\r\n            _frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n            _page = _frame.Content as PhoneApplicationPage;\r\n\r\n            // Change the color of the system tray if necessary.\r\n            if (SystemTray.IsVisible)\r\n            {\r\n                // Cache the original color of the system tray.\r\n                _systemTrayColor = SystemTray.BackgroundColor;\r\n\r\n                // Change the color of the system tray to match the message box.\r\n                if (Background is SolidColorBrush)\r\n                {\r\n                    SystemTray.BackgroundColor = ((SolidColorBrush)Background).Color;\r\n                }\r\n                else\r\n                {\r\n                    SystemTray.BackgroundColor = (Color)Application.Current.Resources[\"PhoneChromeColor\"];\r\n                }\r\n            }\r\n\r\n            // Hide the application bar if necessary.\r\n            if (_page.ApplicationBar != null)\r\n            {\r\n                // Cache the original visibility of the system tray.\r\n                _hasApplicationBar = _page.ApplicationBar.IsVisible;\r\n\r\n                // Hide it.\r\n                if (_hasApplicationBar)\r\n                {\r\n                    _page.ApplicationBar.IsVisible = false;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                _hasApplicationBar = false;\r\n            }\r\n\r\n            // Dismiss the current message box if there is any.\r\n            if (_currentInstance != null)\r\n            {\r\n                _mustRestore = false;\r\n\r\n                var target = _currentInstance.Target as TelegramMessageBox;\r\n\r\n                if (target != null)\r\n                {\r\n                    _systemTrayColor = target._systemTrayColor;\r\n                    _hasApplicationBar = target._hasApplicationBar;\r\n                    target.Dismiss();\r\n                }\r\n            }\r\n\r\n            _mustRestore = true;\r\n\r\n            // Insert the overlay.\r\n            Rectangle overlay = new Rectangle();\r\n            Color backgroundColor = (Color)Application.Current.Resources[\"PhoneBackgroundColor\"];\r\n            overlay.Fill = new SolidColorBrush(Color.FromArgb(0x99, backgroundColor.R, backgroundColor.G, backgroundColor.B));\r\n            _container = new Grid();\r\n            //_container.Children.Add(overlay);\r\n\r\n            // Insert the message box.\r\n            _container.Children.Add(this);\r\n\r\n            // Create and open the popup.\r\n            _popup = new Popup();\r\n            _popup.Child = _container;\r\n            SetSizeAndOffset();\r\n            _popup.IsOpen = true;\r\n            _currentInstance = new WeakReference(this);\r\n\r\n            // Attach event handlers.\r\n            if (_page != null)\r\n            {\r\n                _page.BackKeyPress += OnBackKeyPress;\r\n                _page.OrientationChanged += OnOrientationChanged;\r\n            }\r\n\r\n            if (_frame != null)\r\n            {\r\n                _frame.Navigating += OnNavigating;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Dismisses the message box.\r\n        /// </summary>\r\n        public void Dismiss()\r\n        {\r\n            Dismiss(CustomMessageBoxResult.None, true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Dismisses the message box.\r\n        /// </summary>\r\n        /// <param name=\"source\">\r\n        /// The source that caused the dismission.\r\n        /// </param>\r\n        /// <param name=\"useTransition\">\r\n        /// If true, the message box is dismissed after swiveling\r\n        /// backward and out.\r\n        /// </param>\r\n        private void Dismiss(CustomMessageBoxResult source, bool useTransition)\r\n        {\r\n            // Handle the dismissing event.\r\n            var handlerDismissing = Dismissing;\r\n            if (handlerDismissing != null)\r\n            {\r\n                DismissingEventArgs args = new DismissingEventArgs(source);\r\n                handlerDismissing(this, args);\r\n\r\n                if (args.Cancel)\r\n                {\r\n                    return;\r\n                }\r\n            }\r\n\r\n            // Handle the dismissed event.\r\n            var handlerDismissed = Dismissed;\r\n            if (handlerDismissed != null)\r\n            {\r\n                DismissedEventArgs args = new DismissedEventArgs(source);\r\n                handlerDismissed(this, args);\r\n            }\r\n\r\n            // Set the current instance to null.\r\n            _currentInstance = null;\r\n\r\n            // Cache this variable to avoid a race condition.\r\n            bool restoreOriginalValues = _mustRestore;\r\n\r\n            // Close popup.\r\n            if (useTransition)\r\n            {\r\n                SwivelTransition backwardOut = new SwivelTransition { Mode = SwivelTransitionMode.BackwardOut };\r\n                ITransition swivelTransition = backwardOut.GetTransition(this);\r\n                swivelTransition.Completed += (s, e) =>\r\n                {\r\n                    swivelTransition.Stop();\r\n                    ClosePopup(restoreOriginalValues);\r\n                };\r\n                Deployment.Current.Dispatcher.BeginInvoke(swivelTransition.Begin);\r\n            }\r\n            else\r\n            {\r\n                ClosePopup(restoreOriginalValues);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Closes the pop up.\r\n        /// </summary>\r\n        private void ClosePopup(bool restoreOriginalValues)\r\n        {\r\n            if (_popup == null) return;\r\n\r\n            // Remove the popup.\r\n            _popup.IsOpen = false;\r\n            _popup = null;\r\n\r\n            if (_container != null)\r\n            {\r\n                _container.Children.Remove(this);\r\n            }\r\n\r\n            // If there is no other message box displayed.  \r\n            if (restoreOriginalValues)\r\n            {\r\n                // Set the system tray back to its original \r\n                // color if necessary.\r\n                if (SystemTray.IsVisible)\r\n                {\r\n                    SystemTray.BackgroundColor = _systemTrayColor;\r\n                }\r\n\r\n                // Bring the application bar if necessary.\r\n                if (_hasApplicationBar)\r\n                {\r\n                    _hasApplicationBar = false;\r\n                    _page.ApplicationBar.IsVisible = true;\r\n                }\r\n            }\r\n\r\n            // Dettach event handlers.\r\n            if (_page != null)\r\n            {\r\n                _page.BackKeyPress -= OnBackKeyPress;\r\n                _page.OrientationChanged -= OnOrientationChanged;\r\n                _page = null;\r\n            }\r\n\r\n            if (_frame != null)\r\n            {\r\n                _frame.Navigating -= OnNavigating;\r\n                _frame = null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the visual layout changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"e\">The event information.</param>\r\n        private void CustomMessageBox_LayoutUpdated(object sender, System.EventArgs e)\r\n        {\r\n            SwivelTransition backwardIn = new SwivelTransition { Mode = SwivelTransitionMode.BackwardIn };\r\n            ITransition swivelTransition = backwardIn.GetTransition(this);\r\n            swivelTransition.Completed += (s1, e1) => swivelTransition.Stop();\r\n            swivelTransition.Begin();\r\n            LayoutUpdated -= CustomMessageBox_LayoutUpdated;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the current page changes orientation.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The event sender.</param>\r\n        /// <param name=\"e\">The event information.</param>\r\n        private void OnOrientationChanged(object sender, OrientationChangedEventArgs e)\r\n        {\r\n            return;\r\n            SetSizeAndOffset();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets The vertical and horizontal offset of the popup,\r\n        /// as well as the size of its child container.\r\n        /// </summary>\r\n        private void SetSizeAndOffset()\r\n        {\r\n            // Set the size the container.\r\n            Rect client = GetTransformedRect();\r\n            if (_container != null)\r\n            {\r\n                _container.RenderTransform = GetTransform();\r\n\r\n                _container.Width = client.Width;\r\n                _container.Height = client.Height;\r\n            }\r\n\r\n            // Set the vertical and horizontal offset of the popup.\r\n            if (SystemTray.IsVisible && _popup != null)\r\n            {\r\n                PageOrientation orientation = GetPageOrientation();\r\n\r\n                switch (orientation)\r\n                {\r\n                    case PageOrientation.PortraitUp:\r\n                        _popup.HorizontalOffset = 0.0;\r\n                        _popup.VerticalOffset = _systemTrayHeightInPortrait;\r\n                        _container.Height -= _systemTrayHeightInPortrait;\r\n                        break;\r\n                    case PageOrientation.LandscapeLeft:\r\n                        _popup.HorizontalOffset = 0.0;\r\n                        _popup.VerticalOffset = _systemTrayWidthInLandscape;\r\n                        break;\r\n                    case PageOrientation.LandscapeRight:\r\n                        _popup.HorizontalOffset = 0.0;\r\n                        _popup.VerticalOffset = 0.0;\r\n                        break;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a rectangle that occupies the entire page.\r\n        /// </summary>\r\n        /// <returns>The width, height and location of the rectangle.</returns>\r\n        private static Rect GetTransformedRect()\r\n        {\r\n            bool isLandscape = IsLandscape(GetPageOrientation());\r\n\r\n            return new Rect(0, 0,\r\n                isLandscape ? _screenHeight : _screenWidth,\r\n                isLandscape ? _screenWidth : _screenHeight);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether the orientation is landscape.\r\n        /// </summary>\r\n        /// <param name=\"orientation\">The orientation.</param>\r\n        /// <returns>True if the orientation is landscape.</returns>\r\n        private static bool IsLandscape(PageOrientation orientation)\r\n        {\r\n            return (orientation == PageOrientation.Landscape) || (orientation == PageOrientation.LandscapeLeft) || (orientation == PageOrientation.LandscapeRight);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a transform for popup elements based\r\n        /// on the current page orientation.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// A composite transform determined by page orientation.\r\n        /// </returns>\r\n        private static Transform GetTransform()\r\n        {\r\n            PageOrientation orientation = GetPageOrientation();\r\n\r\n            switch (orientation)\r\n            {\r\n                case PageOrientation.LandscapeLeft:\r\n                case PageOrientation.Landscape:\r\n                    return new CompositeTransform() { Rotation = 90, TranslateX = _screenWidth };\r\n                case PageOrientation.LandscapeRight:\r\n                    return new CompositeTransform() { Rotation = -90, TranslateY = _screenHeight };\r\n                default:\r\n                    return null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the current page orientation.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The current page orientation.\r\n        /// </returns>\r\n        private static PageOrientation GetPageOrientation()\r\n        {\r\n            PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;\r\n\r\n            if (frame != null)\r\n            {\r\n                PhoneApplicationPage page = frame.Content as PhoneApplicationPage;\r\n\r\n                if (page != null)\r\n                {\r\n                    return page.Orientation;\r\n                }\r\n            }\r\n\r\n            return PageOrientation.None;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/TextingControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.TextingControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <Storyboard x:Name=\"Storyboard1\" RepeatBehavior=\"Forever\">\r\n                <DoubleAnimation Storyboard.TargetName=\"Scale1\" Storyboard.TargetProperty=\"ScaleY\" From=\"0.6\" To=\"1.0\" Duration=\"0:0:0.4\" AutoReverse=\"True\"/>\r\n                <DoubleAnimation Storyboard.TargetName=\"Scale1\" Storyboard.TargetProperty=\"ScaleX\" From=\"0.6\" To=\"1.0\" Duration=\"0:0:0.4\" AutoReverse=\"True\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Ellipse1\" Storyboard.TargetProperty=\"Opacity\" AutoReverse=\"True\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.4\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.4\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"Storyboard2\" RepeatBehavior=\"Forever\" BeginTime=\"0:0:0.2\">\r\n                <DoubleAnimation Storyboard.TargetName=\"Scale2\" Storyboard.TargetProperty=\"ScaleY\" From=\"0.6\" To=\"1.0\" Duration=\"0:0:0.4\" AutoReverse=\"True\"/>\r\n                <DoubleAnimation Storyboard.TargetName=\"Scale2\" Storyboard.TargetProperty=\"ScaleX\" From=\"0.6\" To=\"1.0\" Duration=\"0:0:0.4\" AutoReverse=\"True\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Ellipse2\" Storyboard.TargetProperty=\"Opacity\" AutoReverse=\"True\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.4\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.4\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"Storyboard3\" RepeatBehavior=\"Forever\" BeginTime=\"0:0:0.4\">\r\n                <DoubleAnimation Storyboard.TargetName=\"Scale3\" Storyboard.TargetProperty=\"ScaleY\" From=\"0.6\" To=\"1.0\" Duration=\"0:0:0.4\" AutoReverse=\"True\"/>\r\n                <DoubleAnimation Storyboard.TargetName=\"Scale3\" Storyboard.TargetProperty=\"ScaleX\" From=\"0.6\" To=\"1.0\" Duration=\"0:0:0.4\" AutoReverse=\"True\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Ellipse3\" Storyboard.TargetProperty=\"Opacity\" AutoReverse=\"True\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.4\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.4\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Height=\"26\" Width=\"16\" Background=\"Transparent\">\r\n        <Ellipse x:Name=\"Ellipse1\" RenderTransformOrigin=\"0.5,0.5\" Width=\"3\" Height=\"3\" Fill=\"#FFFFFFFF\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Left\">\r\n            <Ellipse.RenderTransform>\r\n                <CompositeTransform x:Name=\"Scale1\" TranslateX=\"1\" TranslateY=\"1\"/>\r\n            </Ellipse.RenderTransform>\r\n        </Ellipse>\r\n        <Ellipse x:Name=\"Ellipse2\" RenderTransformOrigin=\"0.5,0.5\" Width=\"3\" Height=\"3\" Fill=\"#FFFFFFFF\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Left\">\r\n            <Ellipse.RenderTransform>\r\n                <CompositeTransform x:Name=\"Scale2\" TranslateX=\"7\" TranslateY=\"1\"/>\r\n            </Ellipse.RenderTransform>\r\n        </Ellipse>\r\n        <Ellipse x:Name=\"Ellipse3\" RenderTransformOrigin=\"0.5,0.5\" Width=\"3\" Height=\"3\" Fill=\"#FFFFFFFF\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Left\">\r\n            <Ellipse.RenderTransform>\r\n                <CompositeTransform x:Name=\"Scale3\" TranslateX=\"13\" TranslateY=\"1\"/>\r\n            </Ellipse.RenderTransform>\r\n        </Ellipse>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/TextingControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class TextingControl\r\n    {\r\n        public TextingControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Storyboard1.Begin();\r\n                Storyboard2.Begin();\r\n                Storyboard3.Begin();\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                Storyboard1.Stop();\r\n                Storyboard2.Stop();\r\n                Storyboard3.Stop();\r\n            };\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/TypingControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.TypingControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/TypingControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing Telegram.Api.TL;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class TypingControl\r\n    {\r\n        public static readonly DependencyProperty TypingProperty = DependencyProperty.Register(\r\n                    \"Typing\", typeof(Typing), typeof(TypingControl), new PropertyMetadata(default(Typing), OnTypingChanged));\r\n\r\n        private static void OnTypingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var typingControl = d as TypingControl;\r\n            if (typingControl != null)\r\n            {\r\n                var oldTyping = e.OldValue as Typing;\r\n                var newTyping = e.NewValue as Typing;\r\n                if (Typing.Equals(oldTyping, newTyping)) return;\r\n\r\n                if (newTyping == null)\r\n                {\r\n                    typingControl.Content = null;\r\n                }\r\n                else\r\n                {\r\n                    switch (newTyping.Type)\r\n                    {\r\n                        case TypingType.Record:\r\n                            typingControl.Content = new RecordingControl { Height = 26.0 };\r\n                            break;\r\n                        case TypingType.Upload:\r\n                            typingControl.Content = new UploadingControl { Height = 26.0 };\r\n                            break;\r\n                        default:\r\n                            typingControl.Content = new TextingControl { Height = 26.0 };\r\n                            break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public Typing Typing\r\n        {\r\n            get { return (Typing)GetValue(TypingProperty); }\r\n            set { SetValue(TypingProperty, value); }\r\n        }\r\n\r\n        public TypingControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/UpdateAppControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.UpdateAppControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <Style x:Key=\"ButtonStyle1\" TargetType=\"Button\">\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                <Setter Property=\"FontSize\" Value=\"23\"/>\r\n                <Setter Property=\"FontWeight\" Value=\"Normal\"/>\r\n                <Setter Property=\"Margin\" Value=\"12,-12\"/>\r\n                <Setter Property=\"VerticalAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"Padding\" Value=\"15,3,15,5\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"Button\">\r\n                            <Grid Background=\"Transparent\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Pressed\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0.7\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                    <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border Background=\"{StaticResource TelegramBadgeAccentBrush}\">\r\n            <Image x:Name=\"Logo\" Height=\"66\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Source=\"/Images/W10M/ic_updateapp_2x.png\" Stretch=\"Uniform\" Margin=\"36,48,36,48\"/>\r\n        </Border>\r\n        \r\n        <StackPanel Grid.Row=\"1\" Margin=\"18,72\" VerticalAlignment=\"Center\">\r\n            <TextBlock TextAlignment=\"Center\" FontSize=\"27\" FontWeight=\"SemiBold\" Text=\"Update Telegram\"/>\r\n            <TextBlock Margin=\"0,18,0,0\" TextWrapping=\"Wrap\" TextAlignment=\"Center\" Text=\"Please update Telegram to the latest version before you can use the app.\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Border x:Name=\"UpdatePanel\" Grid.Row=\"2\" Height=\"72\" Background=\"{StaticResource TelegramBadgeAccentBrush}\">\r\n            <Button x:Name=\"Update\" Tap=\"Update_OnTap\" FontWeight=\"SemiBold\" Foreground=\"White\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" Content=\"UPDATE (29MB)\" Style=\"{StaticResource ButtonStyle1}\"/>\r\n        </Border>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/UpdateAppControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing Caliburn.Micro;\r\nusing TelegramClient.Services;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class UpdateAppControl\r\n    {\r\n        public event EventHandler TapBottomMenu;\r\n\r\n        public bool ShowBottomMenu\r\n        {\r\n            get { return UpdatePanel.Visibility == Visibility.Visible; }\r\n            set { UpdatePanel.Visibility = value ? Visibility.Visible : Visibility.Collapsed; }\r\n        }\r\n\r\n        public UpdateAppControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void Update_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            RaiseTapBottomMenu();\r\n            return;\r\n            var storeUpdateService = IoC.Get<IWindowsPhoneStoreUpdateService>();\r\n            storeUpdateService.CheckForUpdatedVersion(\"Text\", \"Title\");\r\n        }\r\n\r\n        protected virtual void RaiseTapBottomMenu()\r\n        {\r\n            var handler = TapBottomMenu;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/UploadingControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.UploadingControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <ResourceDictionary>\r\n            <Storyboard x:Name=\"Storyboard1\" RepeatBehavior=\"Forever\">\r\n                <DoubleAnimation Storyboard.TargetName=\"Translation1\" Storyboard.TargetProperty=\"TranslateX\" From=\"0\" To=\"14\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Indicator1\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.4\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.8\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.2\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"Storyboard2\" RepeatBehavior=\"Forever\" BeginTime=\"0:0:0.4\">\r\n                <DoubleAnimation Storyboard.TargetName=\"Translation2\" Storyboard.TargetProperty=\"TranslateX\" From=\"0\" To=\"14\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Indicator2\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.4\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.8\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.2\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n            <Storyboard x:Name=\"Storyboard3\" RepeatBehavior=\"Forever\" BeginTime=\"0:0:0.8\">\r\n                <DoubleAnimation Storyboard.TargetName=\"Translation3\" Storyboard.TargetProperty=\"TranslateX\" From=\"0\" To=\"14\" Duration=\"0:0:1.2\"/>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Indicator3\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0.1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.4\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:0.8\" Value=\"1\"/>\r\n                    <EasingDoubleKeyFrame KeyTime=\"0:0:1.2\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ResourceDictionary>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\" Margin=\"0,0,0,0\" Height=\"26\" Width=\"16\">\r\n        <Path x:Name=\"Indicator3\" Opacity=\"0\" IsHitTestVisible=\"False\" RenderTransformOrigin=\"0.5,0.5\" CacheMode=\"BitmapCache\" Data=\"F1 M0,8 L5,13 L0,18\" Stroke=\"#FFFFFFFF\" StrokeStartLineCap=\"Round\" StrokeEndLineCap=\"Round\" StrokeThickness=\"1.5\">\r\n            <Path.RenderTransform>\r\n                <CompositeTransform x:Name=\"Translation3\" TranslateX=\"0\" />\r\n            </Path.RenderTransform>\r\n        </Path>\r\n\r\n        <Path x:Name=\"Indicator2\" Opacity=\"0\" IsHitTestVisible=\"False\" RenderTransformOrigin=\"0.5,0.5\" CacheMode=\"BitmapCache\" Data=\"F1 M0,8 L5,13 L0,18\" Stroke=\"#FFFFFFFF\" StrokeStartLineCap=\"Round\" StrokeEndLineCap=\"Round\" StrokeThickness=\"1.5\">\r\n            <Path.RenderTransform>\r\n                <CompositeTransform x:Name=\"Translation2\" TranslateX=\"7\" />\r\n            </Path.RenderTransform>\r\n        </Path>\r\n\r\n        <Path x:Name=\"Indicator1\" Opacity=\"0\" IsHitTestVisible=\"False\" RenderTransformOrigin=\"0.5,0.5\" CacheMode=\"BitmapCache\" Data=\"F1 M0,8 L5,13 L0,18\" Stroke=\"#FFFFFFFF\" StrokeStartLineCap=\"Round\" StrokeEndLineCap=\"Round\" StrokeThickness=\"1.5\">\r\n            <Path.RenderTransform>\r\n                <CompositeTransform x:Name=\"Translation1\" TranslateX=\"14\" />\r\n            </Path.RenderTransform>\r\n        </Path>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/UploadingControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class UploadingControl\r\n    {\r\n        public UploadingControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                Storyboard1.Begin();\r\n                Storyboard2.Begin();\r\n                Storyboard3.Begin();\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                Storyboard1.Stop();\r\n                Storyboard2.Stop();\r\n                Storyboard3.Stop();\r\n            };\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/VideoTimelineControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Controls.VideoTimelineControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Border BorderBrush=\"Black\" Background=\"Black\" BorderThickness=\"15,5,15,5\" Margin=\"0\" Width=\"480\" Height=\"60\">\r\n            <StackPanel x:Name=\"Photos\" IsHitTestVisible=\"False\" Orientation=\"Horizontal\" VerticalAlignment=\"Center\"/>\r\n        </Border>\r\n\r\n        <Border Background=\"Black\" Opacity=\"0.5\" Height=\"60\" CacheMode=\"BitmapCache\">\r\n            <Border.RenderTransform>\r\n                <TranslateTransform x:Name=\"LeftOpacityBorderTransform\" X=\"-465\"/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n\r\n        <Border Background=\"Black\" Opacity=\"0.5\" Height=\"60\" CacheMode=\"BitmapCache\">\r\n            <Border.RenderTransform>\r\n                <TranslateTransform x:Name=\"RightOpacityBorderTransform\" X=\"465\"/>\r\n            </Border.RenderTransform>\r\n        </Border>\r\n\r\n        <Grid HorizontalAlignment=\"Center\" CacheMode=\"BitmapCache\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform x:Name=\"LeftTransform\" X=\"-218\"/>\r\n            </Grid.RenderTransform>\r\n            <Border x:Name=\"Left\" IsHitTestVisible=\"False\" Width=\"63\" Height=\"108\" Margin=\"0,-24,0,-24\" Opacity=\"1.0\" Background=\"Transparent\" \r\n                    ManipulationStarted=\"Slider_OnManipulationStarted\"\r\n                    ManipulationDelta=\"Left_OnManipulationDelta\"\r\n                    ManipulationCompleted=\"Slider_OnManipulationCompleted\" />\r\n            <Border Background=\"{StaticResource PhoneAccentBrush}\" Width=\"15\" Height=\"60\" IsHitTestVisible=\"False\">\r\n                <Border Background=\"{StaticResource PhoneForegroundBrush}\" Width=\"5\" Height=\"25\" IsHitTestVisible=\"False\"/>\r\n            </Border>\r\n        </Grid>\r\n\r\n        <Grid HorizontalAlignment=\"Center\" CacheMode=\"BitmapCache\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform x:Name=\"RightTransform\" X=\"218\"/>\r\n            </Grid.RenderTransform>\r\n            <Border x:Name=\"Right\" IsHitTestVisible=\"False\" Width=\"63\" Height=\"108\" Margin=\"0,-24,0,-24\" Opacity=\"1.0\" Background=\"Transparent\" \r\n                    ManipulationStarted=\"Slider_OnManipulationStarted\"\r\n                    ManipulationDelta=\"Right_OnManipulationDelta\"\r\n                    ManipulationCompleted=\"Slider_OnManipulationCompleted\" />\r\n            <Border Background=\"{StaticResource PhoneAccentBrush}\" Width=\"15\" Height=\"60\" IsHitTestVisible=\"False\">\r\n                <Border Background=\"{StaticResource PhoneForegroundBrush}\" Width=\"5\" Height=\"25\" IsHitTestVisible=\"False\"/>\r\n            </Border>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/VideoTimelineControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.IO;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Windows.Graphics.Imaging;\r\nusing Windows.Media.Editing;\r\nusing Windows.Storage;\r\nusing Windows.Storage.FileProperties;\r\nusing Microsoft.Devices;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public partial class VideoTimelineControl\r\n    {\r\n        public static readonly DependencyProperty TrimRightProperty = DependencyProperty.Register(\r\n            \"TrimRight\", typeof(TimeSpan?), typeof(VideoTimelineControl), new PropertyMetadata(default(TimeSpan?)));\r\n\r\n        public TimeSpan? TrimRight\r\n        {\r\n            get { return (TimeSpan?)GetValue(TrimRightProperty); }\r\n            set { SetValue(TrimRightProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TrimLeftProperty = DependencyProperty.Register(\r\n            \"TrimLeft\", typeof(TimeSpan?), typeof(VideoTimelineControl), new PropertyMetadata(default(TimeSpan?)));\r\n\r\n        public TimeSpan? TrimLeft\r\n        {\r\n            get { return (TimeSpan?)GetValue(TrimLeftProperty); }\r\n            set { SetValue(TrimLeftProperty, value); }\r\n        }\r\n\r\n        public event EventHandler TrimChanged;\r\n\r\n        protected virtual void RaiseTrimChanged()\r\n        {\r\n            var handler = TrimChanged;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler<ThumbnailChangedEventArgs> ThumbnailChanged;\r\n\r\n        protected virtual void RaiseThumbnailChanged(ThumbnailChangedEventArgs e)\r\n        {\r\n            var handler = ThumbnailChanged;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        public static readonly DependencyProperty FileProperty = DependencyProperty.Register(\r\n            \"File\", typeof(StorageFile), typeof(VideoTimelineControl), new PropertyMetadata(default(StorageFile), OnFileChanged));\r\n\r\n        private static void OnFileChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var control = d as VideoTimelineControl;\r\n            if (control != null)\r\n            {\r\n                control.OnFileChangedInternal(e.NewValue as StorageFile);\r\n            }\r\n        }\r\n\r\n        private VideoProperties _videoProperties;\r\n\r\n        private void OnFileChangedInternal(StorageFile storageFile)\r\n        {\r\n            Photos.Children.Clear();\r\n            LeftTransform.X = -MaxTranslateX;\r\n            LeftOpacityBorderTransform.X = -465.0;\r\n            Left.IsHitTestVisible = false;\r\n            RightTransform.X = MaxTranslateX;\r\n            RightOpacityBorderTransform.X = 465.0;\r\n            Right.IsHitTestVisible = false;\r\n            _videoProperties = null;\r\n            _composition = null;\r\n            TrimRight = null;\r\n            TrimLeft = null;\r\n            _lastPosition = null;\r\n            _isManipulating = false;\r\n\r\n            if (storageFile != null)\r\n            {\r\n                Telegram.Api.Helpers.Execute.BeginOnThreadPool(TimeSpan.FromSeconds(1.0), async () =>\r\n                {\r\n                    _videoProperties = storageFile.Properties.GetVideoPropertiesAsync().AsTask().Result;\r\n                    if (_videoProperties == null) return;\r\n\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        Left.IsHitTestVisible = true;\r\n                        Right.IsHitTestVisible = true;\r\n                    });\r\n\r\n                    _composition = new MediaComposition();\r\n                    var clip = await MediaClip.CreateFromFileAsync(storageFile);\r\n                    _composition.Clips.Add(clip);\r\n\r\n                    var scaleFactor = 100.0 / Math.Min(_videoProperties.Width, _videoProperties.Height);\r\n                    var thumbnailWidth = _videoProperties.Orientation == VideoOrientation.Normal || _videoProperties.Orientation == VideoOrientation.Rotate180 ? (int)(_videoProperties.Width * scaleFactor) : (int)(_videoProperties.Height * scaleFactor);\r\n                    var thumbnailHeight = _videoProperties.Orientation == VideoOrientation.Normal || _videoProperties.Orientation == VideoOrientation.Rotate180 ? (int)(_videoProperties.Height * scaleFactor) : (int)(_videoProperties.Width * scaleFactor);\r\n                    for (var i = 0; i < 9; i++)\r\n                    {\r\n                        var timeStamp = new TimeSpan(_videoProperties.Duration.Ticks / 9 * i);\r\n\r\n                        var photo = await _composition.GetThumbnailAsync(timeStamp, thumbnailWidth, thumbnailHeight, VideoFramePrecision.NearestKeyFrame);\r\n                        Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                        {\r\n                            var stream = photo.AsStream();\r\n                            var bitmapImage = new BitmapImage();\r\n                            var image = new Image\r\n                            {\r\n                                CacheMode = new BitmapCache(),\r\n                                Stretch = Stretch.UniformToFill,\r\n                                Width = 50.0,\r\n                                Height = 50.0,\r\n                                Source = bitmapImage\r\n                            };\r\n                            Photos.Children.Add(image);\r\n\r\n                            bitmapImage.SetSource(stream);\r\n                        });\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        public StorageFile File\r\n        {\r\n            get { return (StorageFile)GetValue(FileProperty); }\r\n            set { SetValue(FileProperty, value); }\r\n        }\r\n\r\n        public VideoTimelineControl()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Unloaded += (o, e) =>\r\n            {\r\n                _isManipulating = false;\r\n            };\r\n        }\r\n\r\n        private MediaComposition _composition;\r\n\r\n        private const double MaxTranslateX = 218;\r\n\r\n        private void Left_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            LeftTransform.X += e.DeltaManipulation.Translation.X;\r\n            if (LeftTransform.X <= -MaxTranslateX) LeftTransform.X = -MaxTranslateX;\r\n            if (LeftTransform.X >= RightTransform.X - (Left.ActualWidth + Right.ActualWidth) / 2) LeftTransform.X = RightTransform.X - (Left.ActualWidth + Right.ActualWidth) / 2;\r\n\r\n            LeftOpacityBorderTransform.X = LeftTransform.X - (465.0 - MaxTranslateX);\r\n\r\n            var trimLeft = new TimeSpan((long)((LeftTransform.X + MaxTranslateX) / (2 * MaxTranslateX) * _videoProperties.Duration.Ticks));\r\n            if (trimLeft.Ticks < 0)\r\n            {\r\n                trimLeft = TimeSpan.Zero;\r\n            }\r\n\r\n            SetThumbnailPosition(trimLeft);\r\n\r\n            TrimLeft = trimLeft;\r\n            RaiseTrimChanged();\r\n        }\r\n\r\n        private void Right_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            RightTransform.X += e.DeltaManipulation.Translation.X;\r\n            if (RightTransform.X >= MaxTranslateX) RightTransform.X = MaxTranslateX;\r\n            if (RightTransform.X <= LeftTransform.X + (Left.ActualWidth + Right.ActualWidth) / 2) RightTransform.X = LeftTransform.X + (Left.ActualWidth + Right.ActualWidth) / 2;\r\n\r\n            RightOpacityBorderTransform.X = RightTransform.X + (465.0 - MaxTranslateX);\r\n\r\n            var trimRight = new TimeSpan((long)((RightTransform.X + MaxTranslateX) / (2 * MaxTranslateX) * _videoProperties.Duration.Ticks));\r\n            if (trimRight.Ticks >= _videoProperties.Duration.Ticks)\r\n            {\r\n                trimRight = new TimeSpan(_videoProperties.Duration.Ticks - 1);\r\n            }\r\n            SetThumbnailPosition(trimRight);\r\n\r\n            TrimRight = trimRight;\r\n            RaiseTrimChanged();\r\n        }\r\n\r\n        private TimeSpan? _lastPosition;\r\n\r\n        private bool _isManipulating;\r\n\r\n        private void SetThumbnailPosition(TimeSpan position)\r\n        {\r\n            _lastPosition = position;\r\n        }\r\n\r\n        private void Slider_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            _isManipulating = true;\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(async () =>\r\n            {\r\n                TimeSpan processedPosition;\r\n                while (_isManipulating)\r\n                {\r\n                    //return;\r\n                    var position = _lastPosition;\r\n                    if (position != null && processedPosition != position)\r\n                    {\r\n                        var thumbnailWidth = _videoProperties.Orientation == VideoOrientation.Normal || _videoProperties.Orientation == VideoOrientation.Rotate180 ? (int)_videoProperties.Width : (int)_videoProperties.Height;\r\n                        var thumbnailHeight = _videoProperties.Orientation == VideoOrientation.Normal || _videoProperties.Orientation == VideoOrientation.Rotate180 ? (int)_videoProperties.Height : (int)_videoProperties.Width;\r\n                        var photo = await _composition.GetThumbnailAsync(position.Value,\r\n                            0,\r\n                            0,\r\n                            VideoFramePrecision.NearestFrame);\r\n\r\n                        processedPosition = position.Value;\r\n                        Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                        {\r\n                            RaiseThumbnailChanged(new ThumbnailChangedEventArgs { Thumbnail = photo });\r\n                        });\r\n                    }\r\n                    //Thread.Sleep(100);\r\n//#if DEBUG\r\n//                    VibrateController.Default.Start(TimeSpan.FromMilliseconds(50));\r\n//#endif\r\n                }\r\n            });\r\n        }\r\n\r\n        private void Slider_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            _isManipulating = false;\r\n        }\r\n    }\r\n\r\n    public class ThumbnailChangedEventArgs : System.EventArgs\r\n    {\r\n        public ImageStream Thumbnail { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Controls/WaveformSlider.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace TelegramClient.Views.Controls\r\n{\r\n    public class WaveformSlider : Slider\r\n    {\r\n        private Path _horizontalTrack;\r\n\r\n        private Path _horizontalFill;\r\n\r\n        private FrameworkElement _horizontalCenterElement;\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            _horizontalFill = GetTemplateChild(\"HorizontalTrack\") as Path;\r\n            _horizontalTrack = GetTemplateChild(\"HorizontalFill\") as Path;\r\n            _horizontalCenterElement = GetTemplateChild(\"HorizontalCenterElement\") as FrameworkElement;\r\n\r\n            CreatePathData(Waveform);\r\n\r\n            base.OnApplyTemplate();\r\n        }\r\n\r\n        public static readonly DependencyProperty WaveformProperty = DependencyProperty.Register(\r\n            \"Waveform\", typeof (IList<double>), typeof (WaveformSlider), new PropertyMetadata(default(IList<double>), OnWaveformChanged));\r\n\r\n        private static void OnWaveformChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var waveformSlider = d as WaveformSlider;\r\n            if (waveformSlider != null)\r\n            {\r\n                var waveform = e.NewValue as IList<double>;\r\n                if (waveformSlider._horizontalFill == null\r\n                    || waveformSlider._horizontalTrack == null\r\n                    || waveformSlider._horizontalCenterElement == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                waveformSlider.CreatePathData(waveform);\r\n            }\r\n        }\r\n\r\n        private void CreatePathData(IList<double> waveform)\r\n        {\r\n            if (waveform == null)\r\n            {\r\n                _horizontalCenterElement.Width = 14.0;\r\n\r\n                _horizontalFill.Data = new RectangleGeometry\r\n                {\r\n                    RadiusX = 2.0,\r\n                    RadiusY = 2.0,\r\n                    Rect = new Rect(0.0, 18.0, 204.0, 4.0)\r\n                };\r\n                _horizontalTrack.Data = new RectangleGeometry\r\n                {\r\n                    RadiusX = 2.0,\r\n                    RadiusY = 2.0,\r\n                    Rect = new Rect(0.0, 18.0, 204.0, 4.0)\r\n                };\r\n            }\r\n            else\r\n            {\r\n                _horizontalCenterElement.Width = 0.0;\r\n                var data1 = new GeometryGroup();\r\n                var data2 = new GeometryGroup();\r\n                var bitmapHeight = 22;\r\n                var minBarHeight = 4;\r\n                var barWidth = 4.0;\r\n                var barSpace = 4.0;\r\n                var bitmapWidth = 204.0;\r\n\r\n                var totalBarsCount = waveform.Count;\r\n                var barsToDisplay = (bitmapWidth - barWidth) / (barWidth + barSpace) + 1;\r\n                var barsRate = totalBarsCount / barsToDisplay;\r\n                for (var i = 0; i < barsToDisplay; i++)\r\n                {\r\n                    var startBarNumber = (int)(i * barsRate);\r\n                    var endBarNumber = (int)((i + 1) * barsRate);\r\n                    var peak = 0.0;\r\n                    for (var j = startBarNumber; j < endBarNumber && j < waveform.Count; j++)\r\n                    {\r\n                        if (Math.Abs(waveform[j]) > peak)\r\n                        {\r\n                            peak = Math.Abs(waveform[j]);\r\n                        }\r\n                    }\r\n\r\n                    var barHeight = peak * (bitmapHeight - minBarHeight) + minBarHeight;\r\n\r\n                    data1.Children.Add(new RectangleGeometry { RadiusX = 2.0, RadiusY = 2.0, Rect = new Rect(i * (barWidth + barSpace), 22.0 - barHeight, 4.0, barHeight) });\r\n                    data2.Children.Add(new RectangleGeometry { RadiusX = 2.0, RadiusY = 2.0, Rect = new Rect(i * (barWidth + barSpace), 22.0 - barHeight, 4.0, barHeight) });\r\n                }\r\n\r\n                _horizontalFill.Data = data1;\r\n                _horizontalTrack.Data = data2;\r\n            }\r\n        }\r\n\r\n        public IList<double> Waveform\r\n        {\r\n            get { return (IList<double>) GetValue(WaveformProperty); }\r\n            set { SetValue(WaveformProperty, value); }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/DocumentTileControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.DocumentTileControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    FlowDirection=\"LeftToRight\"\r\n    d:DesignHeight=\"64\" d:DesignWidth=\"64\">\r\n\r\n    <Grid>\r\n        <Ellipse x:Name=\"Ellipse\" Height=\"64\" Width=\"64\" Fill=\"{StaticResource TelegramBadgeAccentBrush}\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n        \r\n        <Grid x:Name=\"Icon\">\r\n            <Path x:Name=\"DocumentIcon\" Fill=\"#FFFFFFFF\" Data=\"M0,0 L0,26.67 L26.67,26.67 L26.67,9.11 L17.56,9.11 L17.56,0 M19.56,0 L19.56,7.11 L26.67,7.11\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n            <Path x:Name=\"MusicIcon\" Visibility=\"Collapsed\" Fill=\"#FFFFFFFF\" Data=\"F1 M0,0 L0,30 L23,15\" Margin=\"7,0,0,0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n        </Grid>\r\n        \r\n        <Image x:Name=\"Image\" Stretch=\"UniformToFill\">\r\n            <Image.Clip>\r\n                <EllipseGeometry x:Name=\"ImageClipGeometry\" Center=\"32,32\" RadiusX=\"32\" RadiusY=\"32\"/>\r\n            </Image.Clip>\r\n        </Image>\r\n        <Grid x:Name=\"DownloadIcon\" Visibility=\"Collapsed\">\r\n            <Ellipse x:Name=\"DownloadEllipse\" Height=\"64\" Width=\"64\" Fill=\"#FF000000\" Opacity=\"0.0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n            <Rectangle Width=\"4\" Height=\"24\" Fill=\"White\"/>\r\n            <Polyline StrokeThickness=\"3.5\" Stroke=\"White\" Margin=\"1,0,0,0\" Points=\"0 15 10 25 20 15\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n        </Grid>\r\n        \r\n        <controls:Progress x:Name=\"Progress\" CancelVisibility=\"Visible\" IsHitTestVisible=\"False\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/DocumentTileControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class DocumentTileControl\r\n    {\r\n        public static readonly DependencyProperty TileBrushProperty = DependencyProperty.Register(\r\n            \"TileBrush\", typeof (Brush), typeof (DocumentTileControl), new PropertyMetadata(default(Brush), OnTileBrushChanged));\r\n\r\n        private static void OnTileBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var documentTileControl = d as DocumentTileControl;\r\n            if (documentTileControl != null)\r\n            {\r\n                documentTileControl.Ellipse.Fill = e.NewValue as Brush;\r\n            }\r\n        }\r\n\r\n        public Brush TileBrush\r\n        {\r\n            get { return (Brush) GetValue(TileBrushProperty); }\r\n            set { SetValue(TileBrushProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty MusicProperty = DependencyProperty.Register(\r\n            \"Music\", typeof (bool), typeof (DocumentTileControl), new PropertyMetadata(default(bool), OnMusicChanged));\r\n\r\n        private static void OnMusicChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var documentTileControl = d as DocumentTileControl;\r\n            if (documentTileControl != null)\r\n            {\r\n                var music = (bool) e.NewValue;\r\n\r\n                documentTileControl.MusicIcon.Visibility = music ? Visibility.Visible : Visibility.Collapsed;\r\n                documentTileControl.DocumentIcon.Visibility = music ? Visibility.Collapsed : Visibility.Visible;\r\n            }\r\n        }\r\n\r\n        public bool Music\r\n        {\r\n            get { return (bool) GetValue(MusicProperty); }\r\n            set { SetValue(MusicProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty DownloadIconVisibilityProperty = DependencyProperty.Register(\r\n            \"DownloadIconVisibility\", typeof (Visibility), typeof (DocumentTileControl), new PropertyMetadata(Visibility.Collapsed, OnDownloadIconVisibilityChanged));\r\n\r\n        private static void OnDownloadIconVisibilityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var documentTileControl = d as DocumentTileControl;\r\n            if (documentTileControl != null)\r\n            {\r\n                var visibility = (Visibility) e.NewValue;\r\n\r\n                documentTileControl.DownloadIcon.Visibility = visibility;\r\n                documentTileControl.Icon.Visibility = documentTileControl.DownloadIcon.Visibility == Visibility.Collapsed\r\n                    ? Visibility.Visible\r\n                    : Visibility.Collapsed;\r\n                //documentTileControl.\r\n            }\r\n        }\r\n\r\n        public Visibility DownloadIconVisibility\r\n        {\r\n            get { return (Visibility) GetValue(DownloadIconVisibilityProperty); }\r\n            set { SetValue(DownloadIconVisibilityProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty UploadingProgressProperty = DependencyProperty.Register(\r\n            \"UploadingProgress\", typeof (double), typeof (DocumentTileControl), new PropertyMetadata(default(double), OnProgressChanged));\r\n\r\n        private static void OnProgressChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var documentTileControl = d as DocumentTileControl;\r\n            if (documentTileControl != null)\r\n            {\r\n                var newValue = (double) e.NewValue;\r\n\r\n                //System.Diagnostics.Debug.WriteLine(\"  progress=\" + newValue);\r\n\r\n                documentTileControl.Progress.Value = newValue;\r\n\r\n                documentTileControl.Progress.CancelVisibility = newValue == 1.0\r\n                    ? Visibility.Collapsed\r\n                    : Visibility.Visible;\r\n\r\n                var hasImageSource = documentTileControl.Image.Source != null;\r\n                documentTileControl.Icon.Visibility = newValue > 0.0 && newValue < 1.0 && !hasImageSource\r\n                    ? Visibility.Collapsed\r\n                    : Visibility.Visible;\r\n                documentTileControl.DownloadIcon.Visibility = newValue > 0.0 && newValue < 1.0\r\n                    ? Visibility.Collapsed\r\n                    : documentTileControl.DownloadIconVisibility;\r\n\r\n                if (documentTileControl.DownloadIcon.Visibility == Visibility.Visible\r\n                    && documentTileControl.Icon.Visibility == Visibility.Visible)\r\n                {\r\n                    documentTileControl.Icon.Visibility = Visibility.Collapsed;\r\n                }\r\n\r\n            }\r\n        }\r\n\r\n        public double UploadingProgress\r\n        {\r\n            get { return (double) GetValue(UploadingProgressProperty); }\r\n            set { SetValue(UploadingProgressProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty DownloadingProgressProperty = DependencyProperty.Register(\r\n            \"DownloadingProgress\", typeof (double), typeof (DocumentTileControl), new PropertyMetadata(default(double), OnProgressChanged));\r\n\r\n        public double DownloadingProgress\r\n        {\r\n            get { return (double) GetValue(DownloadingProgressProperty); }\r\n            set { SetValue(DownloadingProgressProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(\r\n            \"Text\", typeof (string), typeof (DocumentTileControl), new PropertyMetadata(default(string), OnTextChanged));\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var documentTileControl = d as DocumentTileControl;\r\n            if (documentTileControl != null)\r\n            {\r\n                //documentTileControl.Label.Text = e.NewValue as string ?? string.Empty;\r\n            }\r\n        }\r\n\r\n        public string Text\r\n        {\r\n            get { return (string) GetValue(TextProperty); }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(\r\n            \"Source\", typeof (ImageSource), typeof (DocumentTileControl), new PropertyMetadata(default(ImageSource), OnImageSourceChanged));\r\n\r\n        private static void OnImageSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var documentTileControl = d as DocumentTileControl;\r\n            if (documentTileControl != null)\r\n            {\r\n                var source = e.NewValue as ImageSource;\r\n                if (source != null)\r\n                {\r\n                    documentTileControl.Image.Visibility = Visibility.Visible;\r\n                    documentTileControl.Image.Source = source;\r\n                    documentTileControl.Ellipse.Visibility = Visibility.Collapsed;\r\n                    documentTileControl.Icon.Visibility = Visibility.Collapsed;\r\n                    documentTileControl.DownloadEllipse.Opacity = 0.3;\r\n                }\r\n                else\r\n                {\r\n                    documentTileControl.Image.Visibility = Visibility.Visible;\r\n                    documentTileControl.Image.Source = null;\r\n                    documentTileControl.Ellipse.Visibility = Visibility.Visible;\r\n                    documentTileControl.Icon.Visibility = documentTileControl.DownloadIcon.Visibility == Visibility.Collapsed\r\n                        ? Visibility.Visible\r\n                        : Visibility.Collapsed;\r\n                    documentTileControl.DownloadEllipse.Opacity = 0.0;\r\n                }\r\n            }\r\n        }\r\n\r\n        public ImageSource Source\r\n        {\r\n            get { return (ImageSource) GetValue(SourceProperty); }\r\n            set { SetValue(SourceProperty, value); }\r\n        }\r\n\r\n        public DocumentTileControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/EmojiHintsView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.EmojiHintsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushLight\" Color=\"#FFFFFFFF\"/>\r\n        <SolidColorBrush x:Key=\"HintsBackgroundBrushDark\" Color=\"#FF1F1F1F\"/>\r\n    </UserControl.Resources>\r\n\r\n    <Grid VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\">\r\n        <Grid.Resources>\r\n            <DataTemplate x:Key=\"UsernameHintTemplate\">\r\n                <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                    <Grid Height=\"44\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <emojiPanel:TelegramRichTextBox Margin=\"15,0\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" VerticalAlignment=\"Center\" emojiPanel:BrowserNavigationService.SuppressParsing=\"True\" Text=\"{Binding Emoji}\"/>\r\n                        <TextBlock Grid.Column=\"2\" Text=\"{Binding Replacement, StringFormat=' \\{0\\}'}\" FontSize=\"{Binding DefaultFontSizeSmall, Source={StaticResource ScaledText}}\" Opacity=\"0.6\" Margin=\"0,2,0,0\" VerticalAlignment=\"Center\"/>\r\n\r\n                    </Grid>\r\n                </ListBoxItem>\r\n            </DataTemplate>\r\n        </Grid.Resources>\r\n        <Grid x:Name=\"EmojiHintsPanel\" Visibility=\"Visible\" CacheMode=\"BitmapCache\">\r\n            <Border x:Name=\"BackgroundBorder\" Background=\"White\"/>\r\n            <Border x:Name=\"Border\" VerticalAlignment=\"Top\" Height=\"2\" Visibility=\"{Binding Hints.Count, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter=0}\"/>\r\n            <ItemsControl ItemsSource=\"{Binding Hints}\" ItemTemplate=\"{StaticResource UsernameHintTemplate}\">\r\n                <ItemsControl.ItemsPanel>\r\n                    <ItemsPanelTemplate>\r\n                        <VirtualizingStackPanel/>\r\n                    </ItemsPanelTemplate>\r\n                </ItemsControl.ItemsPanel>\r\n                <ItemsControl.Template>\r\n                    <ControlTemplate TargetType=\"ItemsControl\">\r\n                        <ScrollViewer HorizontalScrollBarVisibility=\"Disabled\" VerticalScrollBarVisibility=\"Disabled\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </ControlTemplate>\r\n                </ItemsControl.Template>\r\n            </ItemsControl>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/EmojiHintsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class EmojiHintsView\r\n    {\r\n        public EmojiHintsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            BackgroundBorder.Background = isLightTheme\r\n                ? (Brush)Resources[\"HintsBackgroundBrushLight\"]\r\n                : (Brush)Resources[\"HintsBackgroundBrushDark\"];\r\n            Border.Background = isLightTheme\r\n                ? (Brush)Resources[\"InputBorderBrushLight\"]\r\n                : (Brush)Resources[\"InputBorderBrushDark\"];\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/LiveLocationBadgeView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.LiveLocationBadgeView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"36\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"UserActionLabel\">\r\n        <Grid.RenderTransform>\r\n            <TranslateTransform/>\r\n        </Grid.RenderTransform>\r\n\r\n        <Border Background=\"{StaticResource PhoneBackgroundBrush}\" Opacity=\"1.0\" Margin=\"0,-2,0,0\" MinHeight=\"48\" Tap=\"Message_OnTap\"/>\r\n        <Border x:Name=\"Border\" VerticalAlignment=\"Bottom\" Height=\"2\"/>\r\n\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n\r\n            <Grid VerticalAlignment=\"Center\" IsHitTestVisible=\"False\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                \r\n                <controls:LiveLocationIcon Width=\"68\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Margin=\"0,-20\" RenderTransformOrigin=\"0.5,0.5\">\r\n                    <controls:LiveLocationIcon.RenderTransform>\r\n                        <ScaleTransform ScaleX=\"0.5\" ScaleY=\"0.5\"/>\r\n                    </controls:LiveLocationIcon.RenderTransform>\r\n                </controls:LiveLocationIcon>\r\n\r\n                <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Text=\"{Binding Resources.LiveLocation, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Margin=\"0,-6,0,0\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n                <TextBlock Grid.Column=\"2\" Grid.Row=\"0\" Text=\"{Binding Subtitle, Converter={StaticResource NonBreakingStringConverter}}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Opacity=\"0.6\" Margin=\"0,-6,0,0\" Style=\"{StaticResource ReplyCaptionStyle}\"/>\r\n            </Grid>\r\n            \r\n            <Border Grid.Column=\"1\" Background=\"Transparent\" Tap=\"Close_OnTap\">\r\n                <Image Source=\"/Images/W10M/ic_cancel_2x.png\" Width=\"24\" Height=\"24\" Margin=\"20,0\"/>\r\n            </Border>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/LiveLocationBadgeView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing TelegramClient.ViewModels.Dialogs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class LiveLocationBadgeView\r\n    {\r\n        public LiveLocationBadgeViewModel ViewModel\r\n        {\r\n            get { return DataContext as LiveLocationBadgeViewModel; }\r\n        }\r\n\r\n        public LiveLocationBadgeView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                Border.Background = (Brush)Resources[\"InputBorderBrushLight\"];\r\n            }\r\n            else\r\n            {\r\n                Border.Background = (Brush)Resources[\"InputBorderBrushDark\"];\r\n            }\r\n        }\r\n\r\n        private void Close_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.RaiseClosed();\r\n        }\r\n\r\n        private void Message_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.RaiseOpenMessage();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/PhotoTileControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.PhotoTileControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Image x:Name=\"Photo\" Stretch=\"UniformToFill\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/PhotoTileControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class PhotoTileControl\r\n    {\r\n        public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(\r\n            \"Source\", typeof (ImageSource), typeof (PhotoTileControl), new PropertyMetadata(default(ImageSource), OnSourceChanged));\r\n\r\n        private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var photoTileControl = d as PhotoTileControl;\r\n            if (photoTileControl != null)\r\n            {\r\n                photoTileControl.Photo.Source = e.NewValue as ImageSource;\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty ThumbSourceProperty = DependencyProperty.Register(\r\n            \"ThumbSource\", typeof (ImageSource), typeof (PhotoTileControl), new PropertyMetadata(default(ImageSource), OnThumbSourceChanged));\r\n\r\n        private static void OnThumbSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var photoTileControl = d as PhotoTileControl;\r\n            if (photoTileControl != null)\r\n            {\r\n                if (photoTileControl._lastThumbDataContext == null\r\n                    || photoTileControl.DataContext != photoTileControl._lastThumbDataContext.Target)\r\n                {\r\n                    photoTileControl._lastThumbDataContext = new WeakReference(photoTileControl.DataContext);\r\n                    photoTileControl.Photo.Source = e.NewValue as ImageSource;\r\n                }\r\n            }\r\n        }\r\n\r\n        public ImageSource ThumbSource\r\n        {\r\n            get { return (ImageSource) GetValue(ThumbSourceProperty); }\r\n            set { SetValue(ThumbSourceProperty, value); }\r\n        }\r\n\r\n        public ImageSource Source\r\n        {\r\n            get { return (ImageSource) GetValue(SourceProperty); }\r\n            set { SetValue(SourceProperty, value); }\r\n        }\r\n\r\n        private WeakReference _lastThumbDataContext;\r\n\r\n        public PhotoTileControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/PlayerView.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.PlayerView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"72\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n        <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n\r\n        <Storyboard x:Name=\"OpenStoryboard\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.Y)\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"-90\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"0\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseOut\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n\r\n        <Storyboard x:Name=\"CloseStoryboard\" Completed=\"CloseStoryboard_OnCompleted\">\r\n            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TranslateTransform.Y)\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                <EasingDoubleKeyFrame KeyTime=\"0:0:0.15\" Value=\"-90\">\r\n                    <EasingDoubleKeyFrame.EasingFunction>\r\n                        <ExponentialEase EasingMode=\"EaseIn\" Exponent=\"3\"/>\r\n                    </EasingDoubleKeyFrame.EasingFunction>\r\n                </EasingDoubleKeyFrame>\r\n            </DoubleAnimationUsingKeyFrames>\r\n            <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"UserActionLabel\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <ObjectAnimationUsingKeyFrames.KeyFrames>\r\n                    <DiscreteObjectKeyFrame KeyTime=\"0:0:0.15\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                            <Visibility>Collapsed</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                    </DiscreteObjectKeyFrame>\r\n                </ObjectAnimationUsingKeyFrames.KeyFrames>\r\n            </ObjectAnimationUsingKeyFrames>\r\n        </Storyboard>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"UserActionLabel\">\r\n        <Grid.RenderTransform>\r\n            <TranslateTransform/>\r\n        </Grid.RenderTransform>\r\n\r\n        <Border Background=\"{StaticResource PhoneBackgroundBrush}\" Tap=\"Message_OnTap\" Opacity=\"1.0\" Margin=\"0,-2,0,0\" MinHeight=\"72\"/>\r\n        <Border x:Name=\"Border\" VerticalAlignment=\"Bottom\" Height=\"2\"/>\r\n\r\n        <Grid MaxWidth=\"480\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n            </Grid.ColumnDefinitions>\r\n\r\n            <ToggleButton\r\n                Visibility=\"Visible\"\r\n                toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n                x:Name=\"PlayerToggleButton\" VerticalAlignment=\"Center\" IsChecked=\"True\"\r\n                Click=\"PlayerToggleButton_OnClick\"\r\n                Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n                Style=\"{StaticResource DialogPlayerToggleButtonStyle}\"/>\r\n\r\n            <TextBlock Grid.Column=\"1\" x:Name=\"Title\" Margin=\"0,0,0,0\" Text=\"\" MaxWidth=\"200\" TextTrimming=\"WordEllipsis\" VerticalAlignment=\"Center\"/>\r\n            <TextBlock Grid.Column=\"2\" x:Name=\"Subtitle\" Margin=\"12,0,0,0\" Opacity=\"0.7\" Text=\"\" VerticalAlignment=\"Center\"/>\r\n            \r\n            <Border Grid.Column=\"3\" Background=\"Transparent\" Tap=\"CloseButton_OnClick\">\r\n                <Image Source=\"/Images/W10M/ic_cancel_2x.png\" Width=\"32\" Height=\"32\" Margin=\"20\"/>\r\n            </Border>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/PlayerView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Converters;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class PlayerView\r\n    {\r\n        public static readonly DependencyProperty MessageProperty = DependencyProperty.Register(\r\n            \"Message\", typeof (TLMessage), typeof (PlayerView), new PropertyMetadata(default(TLMessage), OnMessageChanged));\r\n\r\n        private static void OnMessageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var playerView = d as PlayerView;\r\n            if (playerView != null)\r\n            {\r\n                playerView.Title.Text = string.Empty;\r\n\r\n                var message = e.NewValue as TLMessage;\r\n                if (message != null)\r\n                {\r\n                    var user = message.From as TLUserBase;\r\n                    if (user != null)\r\n                    {\r\n                        playerView.Title.Text = user.FullName2;\r\n                    }\r\n                    var chat = message.From as TLChatBase;\r\n                    if (chat != null)\r\n                    {\r\n                        playerView.Title.Text = chat.FullName2;\r\n                    }\r\n\r\n                    var converter = Application.Current.Resources[\"MessageDateTimeConverter\"] as TLIntToDateTimeConverter;\r\n                    if (converter != null)\r\n                    {\r\n                        var date = converter.Convert(message.Date, null, null, null);\r\n                        playerView.Subtitle.Text = date != null ? date.ToString() : string.Empty;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public TLMessage Message\r\n        {\r\n            get { return (TLMessage) GetValue(MessageProperty); }\r\n            set { SetValue(MessageProperty, value); }\r\n        }\r\n\r\n        public PlayerView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                Border.Background = (Brush)Resources[\"InputBorderBrushLight\"];\r\n            }\r\n            else\r\n            {\r\n                Border.Background = (Brush)Resources[\"InputBorderBrushDark\"];\r\n            }\r\n\r\n            UserActionLabel.Visibility = Visibility.Collapsed;\r\n\r\n            Loaded += StartOpenStoryboard;\r\n        }\r\n\r\n        private void StartOpenStoryboard(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= StartOpenStoryboard;\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(() => OpenStoryboard.Begin());\r\n        }\r\n\r\n        private Action _closeCallback;\r\n\r\n        public void Close(Action callback = null)\r\n        {\r\n            _closeCallback = callback;\r\n\r\n            CloseStoryboard.Begin();\r\n        }\r\n\r\n        private void CloseStoryboard_OnCompleted(object sender, System.EventArgs e)\r\n        {\r\n            _closeCallback.SafeInvoke();\r\n        }\r\n\r\n        public event EventHandler Closed;\r\n\r\n        protected virtual void RaiseClosed()\r\n        {\r\n            var handler = Closed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler Paused;\r\n\r\n        protected virtual void RaisePaused()\r\n        {\r\n            EventHandler handler = Paused;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler Resumed;\r\n\r\n        protected virtual void RaiseResumed()\r\n        {\r\n            EventHandler handler = Resumed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private void CloseButton_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            Title.Text = \"Closed\";\r\n            RaiseClosed();\r\n        }\r\n\r\n        private void Message_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            \r\n        }\r\n\r\n        public void Pause()\r\n        {\r\n            PlayerToggleButton.IsChecked = false;\r\n        }\r\n\r\n        public void Resume()\r\n        {\r\n            PlayerToggleButton.IsChecked = true;\r\n        }\r\n\r\n        private void PlayerToggleButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            if (PlayerToggleButton.IsChecked == true)\r\n            {\r\n                RaiseResumed();\r\n            }\r\n            else\r\n            {\r\n                RaisePaused();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/SearchUserControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.SearchUserControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\">\r\n        <Grid.ColumnDefinitions>\r\n            <ColumnDefinition Width=\"Auto\"/>\r\n            <ColumnDefinition Width=\"*\"/>\r\n        </Grid.ColumnDefinitions>\r\n        <TextBlock x:Name=\"Label\" Text=\"from: \"/>\r\n        <TextBlock Grid.Column=\"1\" x:Name=\"From\" Text=\"Evgeny\" TextTrimming=\"WordEllipsis\" Opacity=\"0.5\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/SearchUserControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class SearchUserControl\r\n    {\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(\r\n            \"Text\", typeof (string), typeof (SearchUserControl), new PropertyMetadata(default(string), OnTextChanged));\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var searchUserControl = d as SearchUserControl;\r\n            if (searchUserControl != null)\r\n            {\r\n                var from = (string) e.NewValue;\r\n                searchUserControl.From.Text = (string) e.NewValue;\r\n\r\n                if (string.IsNullOrEmpty(from))\r\n                {\r\n                    searchUserControl.Label.Text = \"from:\";\r\n                }\r\n                else\r\n                {\r\n                    searchUserControl.Label.Text = \"from: \";\r\n                }\r\n            }\r\n        }\r\n\r\n        public string Text\r\n        {\r\n            get { return (string) GetValue(TextProperty); }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        public SearchUserControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/UnreadCounter.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Dialogs.UnreadCounter\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"28\" d:DesignWidth=\"68\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\">\r\n        <Grid.ColumnDefinitions>\r\n            <ColumnDefinition/>\r\n            <ColumnDefinition/>\r\n        </Grid.ColumnDefinitions>\r\n        <Border Grid.Column=\"0\" \r\n                x:Name=\"UnreadMentionsLabel\"\r\n                Margin=\"6,0,0,0\" VerticalAlignment=\"Top\"\r\n                Background=\"{StaticResource TelegramBadgeAccentBrush}\"\r\n                Height=\"28\" MinWidth=\"28\" CornerRadius=\"14\" \r\n                Visibility=\"Collapsed\">\r\n            <TextBlock Margin=\"0,-3,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n                Foreground=\"White\" \r\n                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                FontWeight=\"SemiBold\"\r\n                FontSize=\"18\"\r\n                Text=\"@\" />\r\n        </Border>\r\n\r\n        <Border Grid.Column=\"1\" \r\n                x:Name=\"PinnedLabel\"\r\n                Margin=\"6,0,0,0\" VerticalAlignment=\"Top\"\r\n                Width=\"28\" Height=\"28\" CornerRadius=\"14\"\r\n                BorderBrush=\"{StaticResource PhoneSubtleBrush}\" BorderThickness=\"2\"\r\n                Visibility=\"Collapsed\">\r\n            <Path Fill=\"{StaticResource PhoneSubtleBrush}\" Data=\"M16.15625,6.75 L15.46875,7.6875 L13.21875,10.78125 C11.924168,10.669855 10.5806,10.980836 9.59375,11.96875 L8.90625,12.65625 L9.59375,13.375 L11.40625,15.1875 L8,18.59375 L8,20 L9.40625,20 L12.8125,16.59375 L14.625,18.40625 L15.34375,19.09375 L16.0625,18.40625 C17.049185,17.419565 17.329972,16.075962 17.21875,14.78125 L20.3125,12.53125 L21.25,11.84375 L20.40625,11.03125 L16.96875,7.59375 L16.15625,6.75 Z M16.375,9.8125 L18.1875,11.625 L15.65625,13.46875 L15.125,13.875 L15.28125,14.53125 C15.41953,15.057691 15.3564,15.584769 15.15625,16.09375 L11.90625,12.84375 C12.415029,12.643713 12.941995,12.580388 13.46875,12.71875 L14.125,12.875 L14.53125,12.34375 L16.375,9.8125 Z\">\r\n                <Path.RenderTransform>\r\n                    <TranslateTransform X=\"-2\" Y=\"-2\"/>\r\n                </Path.RenderTransform>\r\n            </Path>\r\n        </Border>\r\n\r\n        <Border Grid.Column=\"1\" \r\n                x:Name=\"UnreadLabel\"\r\n                Margin=\"6,0,0,0\" VerticalAlignment=\"Top\"\r\n                Height=\"28\" MinWidth=\"28\" CornerRadius=\"14\"\r\n                Visibility=\"Collapsed\">\r\n            <TextBlock \r\n                x:Name=\"UnreadText\"\r\n                Margin=\"7,-3,7,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"\r\n                Foreground=\"White\" \r\n                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n                FontWeight=\"SemiBold\"\r\n                FontSize=\"18\" />\r\n        </Border>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Dialogs/UnreadCounter.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace TelegramClient.Views.Dialogs\r\n{\r\n    public partial class UnreadCounter\r\n    {\r\n        public static readonly DependencyProperty UnreadMarkProperty = DependencyProperty.Register(\r\n            \"UnreadMark\", typeof(bool), typeof(UnreadCounter), new PropertyMetadata(default(bool), OnUnreadMarkChanged));\r\n\r\n        private static void OnUnreadMarkChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var counter = d as UnreadCounter;\r\n            if (counter != null)\r\n            {\r\n                counter.UpdateLabels(counter.Count, counter.MentionsCount, (bool)e.NewValue, counter.Pinned);\r\n            }\r\n        }\r\n\r\n        public bool UnreadMark\r\n        {\r\n            get { return (bool)GetValue(UnreadMarkProperty); }\r\n            set { SetValue(UnreadMarkProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty BrushProperty = DependencyProperty.Register(\r\n            \"Brush\", typeof(Brush), typeof(UnreadCounter), new PropertyMetadata(default(Brush), OnBrushChanged));\r\n\r\n        public Brush Brush\r\n        {\r\n            get { return (Brush)GetValue(BrushProperty); }\r\n            set { SetValue(BrushProperty, value); }\r\n        }\r\n\r\n        private static void OnBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var counter = d as UnreadCounter;\r\n            if (counter != null)\r\n            {\r\n                counter.UnreadLabel.Background = e.NewValue as Brush;\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty MentionsCountProperty = DependencyProperty.Register(\r\n            \"MentionsCount\", typeof(int), typeof(UnreadCounter), new PropertyMetadata(default(int), OnMentionsCountChanged));\r\n\r\n        public int MentionsCount\r\n        {\r\n            get { return (int)GetValue(MentionsCountProperty); }\r\n            set { SetValue(MentionsCountProperty, value); }\r\n        }\r\n\r\n        private static void OnMentionsCountChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var counter = d as UnreadCounter;\r\n            if (counter != null)\r\n            {\r\n                counter.UpdateLabels(counter.Count, (int)e.NewValue, counter.UnreadMark, counter.Pinned);\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty CountProperty = DependencyProperty.Register(\r\n            \"Count\", typeof(int), typeof(UnreadCounter), new PropertyMetadata(default(int), OnCountChanged));\r\n\r\n        public int Count\r\n        {\r\n            get { return (int)GetValue(CountProperty); }\r\n            set { SetValue(CountProperty, value); }\r\n        }\r\n\r\n        private static void OnCountChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var counter = d as UnreadCounter;\r\n            if (counter != null)\r\n            {\r\n                counter.UnreadText.Text = e.NewValue.ToString();\r\n                counter.UpdateLabels((int)e.NewValue, counter.MentionsCount, counter.UnreadMark, counter.Pinned);\r\n            }\r\n        }\r\n\r\n        public static readonly DependencyProperty PinnedProperty = DependencyProperty.Register(\r\n            \"Pinned\", typeof(bool), typeof(UnreadCounter), new PropertyMetadata(default(bool), OnPinnedChanged));\r\n\r\n        public bool Pinned\r\n        {\r\n            get { return (bool)GetValue(PinnedProperty); }\r\n            set { SetValue(PinnedProperty, value); }\r\n        }\r\n\r\n        private static void OnPinnedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var counter = d as UnreadCounter;\r\n            if (counter != null)\r\n            {\r\n                counter.UpdateLabels(counter.Count, counter.MentionsCount, counter.UnreadMark, (bool)e.NewValue);\r\n            }\r\n        }\r\n\r\n        private void UpdateLabels(int unreadCount, int unreadMentionsCount, bool unreadMark, bool pinned)\r\n        {\r\n            UnreadMentionsLabel.Visibility = unreadMentionsCount > 0 ? Visibility.Visible : Visibility.Collapsed;\r\n            UnreadLabel.Visibility = unreadCount > 0 && !(unreadCount == 1 && unreadMentionsCount == 1) || unreadMark ? Visibility.Visible : Visibility.Collapsed;\r\n            PinnedLabel.Visibility = pinned ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public UnreadCounter()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Feed/FeedView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Feed.FeedView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:controls2=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:longListSelector=\"clr-namespace:Telegram.Controls.LongListSelector;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    BackKeyPress=\"ChatView_OnBackKeyPress\"\r\n    x:Name=\"Self\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <DataTemplate x:Key=\"UserItemTemplate\">\r\n            <ListBoxItem toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                <Grid x:Name=\"MainItemGrid\" Margin=\"12,0,24,12\" Background=\"Transparent\" Tap=\"MainItemGrid_OnTap\" micro:Message.Attach=\"[Event Tap] = [Action ViewChannel($DataContext)]\">\r\n\r\n                    <toolkit:ContextMenuService.ContextMenu>\r\n                        <toolkit:ContextMenu Style=\"{StaticResource W10MContextMenuStyle}\" micro:Action.TargetWithoutContext=\"{Binding DataContext, ElementName=Self}\">\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [Ungroup($DataContext)]\" Header=\"{Binding Resources.Ungroup, Source={StaticResource Strings}}\"/>\r\n                            <toolkit:MenuItem micro:Message.Attach=\"[Event Click] = [LeaveChannel($DataContext)]\" Header=\"{Binding Resources.LeaveChannel, Source={StaticResource Strings}}\"/>\r\n                        </toolkit:ContextMenu>\r\n                    </toolkit:ContextMenuService.ContextMenu>\r\n\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"72\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    \r\n                    <views:ConversationTileControl Size=\"72\" \r\n                        Margin=\"0,0,0,0\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\"\r\n                        Source=\"{Binding Photo, Converter={StaticResource DefaultPhotoConverter}}\"\r\n                        Fill=\"{Binding Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                        Text=\"{Binding Converter={StaticResource PlaceholderDefaultTextConverter}}\"/>\r\n\r\n                    <Grid Grid.Column=\"1\" VerticalAlignment=\"Center\" Margin=\"0,-2,0,0\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" Margin=\"17,-8,0,0\" Text=\"{Binding FullName2}\" MaxHeight=\"36\" FontSize=\"27\" Foreground=\"White\"/>\r\n                        <!--<TextBlock Grid.Row=\"1\" Margin=\"18,2,0,0\" \r\n                            Text=\"{Binding StatusCommon, Converter={StaticResource ChannelStatusToStringConverter}}\" \r\n                            Foreground=\"#99FFFFFF\"\r\n                            Visibility=\"{Binding Converter={StaticResource ContactToVisibilityConverter}}\" \r\n                            Style=\"{StaticResource PhoneTextSubtleStyle}\"/>-->\r\n                    </Grid>\r\n                </Grid>\r\n            </ListBoxItem>\r\n        </DataTemplate>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <controls1:TelegramTransitionService.NavigationInTransition>\r\n        <controls1:TelegramNavigationInTransition EndTransition=\"TelegramNavigationTransition_OnEndTransition\">\r\n            <controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls1:TelegramNavigationInTransition.Backward>\r\n            <controls1:TelegramNavigationInTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls1:TelegramNavigationInTransition.Forward>\r\n        </controls1:TelegramNavigationInTransition>\r\n    </controls1:TelegramTransitionService.NavigationInTransition>\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition>\r\n            <controls1:TelegramNavigationOutTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Backward>\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Info, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"LayoutRoot2\" Grid.Row=\"1\">\r\n            <longListSelector:LongListSelector \r\n                Margin=\"6,0,0,0\" \r\n                ItemsSource=\"{Binding Items}\" \r\n                IsFlatList=\"True\"\r\n                ItemTemplate=\"{StaticResource UserItemTemplate}\"\r\n                Background=\"Transparent\">\r\n                <longListSelector:LongListSelector.ListHeader>\r\n                    <Grid x:Name=\"ContentPanel\" Margin=\"0,0,12,0\" DataContext=\"{Binding DataContext, ElementName=Self}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Grid Grid.Row=\"0\" Margin=\"0,15,0,0\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <views:ConversationTileControl\r\n                                micro:Message.Attach=\"[Event Tap] = [Action OpenPhoto]\"\r\n\t\t\t\t                Margin=\"12,0,0,0\" \r\n                                Size=\"100\"\r\n                                Object=\"{Binding CurrentItem}\"\r\n                                RenderTransformOrigin=\"0.25,0.25\">\r\n                                <views:ConversationTileControl.RenderTransform>\r\n                                    <ScaleTransform ScaleX=\"1.38\" ScaleY=\"1.38\"/>\r\n                                </views:ConversationTileControl.RenderTransform>\r\n                            </views:ConversationTileControl>\r\n\r\n                            <StackPanel Grid.Column=\"1\" VerticalAlignment=\"Center\">\r\n                                <TextBlock Margin=\"24,0,0,0\" Text=\"{Binding Resources.Feed, Source={StaticResource Strings}}\" FontSize=\"30\" Foreground=\"White\"/>\r\n                                <TextBlock Margin=\"24,1,0,0\" Text=\"{Binding Subtitle}\" Opacity=\"0.6\" Foreground=\"White\"/>\r\n                            </StackPanel>\r\n                        </Grid>\r\n\r\n                        <Grid Grid.Row=\"1\" Margin=\"0,0,0,0\" x:Name=\"Actions\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <StackPanel x:Name=\"SettingsGrid\" Margin=\"0,24,0,0\">\r\n                                <StackPanel Margin=\"0,24,0,0\">\r\n                                    <toolkit:ToggleSwitch x:Name=\"NotificationsSwitch\" Margin=\"0,0,-24,-21\" Foreground=\"White\" Checked=\"ToggleSwitch_OnChecked\" Unchecked=\"ToggleSwitch_OnUnchecked\" IsChecked=\"{Binding DataContext.GroupNewChannels, ElementName=Self}\" Header=\"{Binding Resources.GroupNewChannels, Source={StaticResource Strings}}\">\r\n                                        <i:Interaction.Behaviors>\r\n                                            <behaviors:ToggleSwitchLocalizedContentBehavior\r\n                                            OnContent=\"{Binding Resources.On, Source={StaticResource Strings}}\"\r\n                                            OffContent=\"{Binding Resources.Off, Source={StaticResource Strings}}\"/>\r\n                                        </i:Interaction.Behaviors>\r\n                                    </toolkit:ToggleSwitch>\r\n                                </StackPanel>\r\n                            </StackPanel>\r\n\r\n                            <TextBlock Grid.Row=\"6\" Text=\"{Binding Subtitle}\" Margin=\"12,24,12,12\" FontSize=\"23\" Foreground=\"White\" Visibility=\"{Binding DataContext.CanViewParticipants, ElementName=Self, Converter={StaticResource BooleanToVisibilityConverter}}\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </longListSelector:LongListSelector.ListHeader>\r\n            </longListSelector:LongListSelector>\r\n        </Grid>\r\n\r\n        <Border x:Name=\"MorePanelBackground\" d:IsHidden=\"True\" Tap=\"MorePanelBackground_OnTap\" Visibility=\"Collapsed\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Grid.RowSpan=\"3\" Background=\"Black\" Opacity=\"0.4\"/>\r\n\r\n        <Border x:Name=\"MorePanel\" Grid.Row=\"1\" Visibility=\"Collapsed\" CacheMode=\"BitmapCache\" VerticalAlignment=\"Bottom\">\r\n            <Border.RenderTransform>\r\n                <CompositeTransform/>\r\n            </Border.RenderTransform>\r\n            <ContentControl x:Name=\"AppBarMenuItemsPlaceholder\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\">\r\n                <StackPanel x:Name=\"AppBarMenuItems\"/>\r\n            </ContentControl>\r\n        </Border>\r\n\r\n        <controls2:TelegramApplicationBar Grid.Row=\"2\"\r\n            x:Name=\"AppBarPanel\" \r\n            VerticalAlignment=\"Bottom\"\r\n            MorePanel=\"{Binding ElementName=MorePanel}\"\r\n            PanelOpened=\"AppBarPanel_OnPanelOpened\"\r\n            PanelClosed=\"AppBarPanel_OnPanelClosed\">\r\n            <controls2:TelegramApplicationBar.Buttons>\r\n            </controls2:TelegramApplicationBar.Buttons>\r\n        </controls2:TelegramApplicationBar>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Feed/FeedView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Chats;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Feed;\r\nusing TelegramClient.Views.Controls;\r\nusing TelegramClient.Views.Media;\r\n\r\nnamespace TelegramClient.Views.Feed\r\n{\r\n    public partial class FeedView\r\n    {\r\n        private FeedViewModel ViewModel { get { return DataContext as FeedViewModel; } }\r\n\r\n        private readonly TelegramAppBarButton _setPhotoButton = new TelegramAppBarButton\r\n        {\r\n            Text = AppResources.SetPhoto,\r\n            ImageSource = new BitmapImage(new Uri(\"/Images/W10M/ic_photo_2x.png\", UriKind.Relative))\r\n        };\r\n\r\n        private readonly TelegramAppBarButton _editButton = new TelegramAppBarButton\r\n        {\r\n            Text = AppResources.Edit,\r\n            ImageSource = new BitmapImage(new Uri(\"/Images/W10M/ic_edit_2x.png\", UriKind.Relative))\r\n        };\r\n\r\n        private readonly TelegramAppBarButton _addButton = new TelegramAppBarButton\r\n        {\r\n            Text = AppResources.Add,\r\n            ImageSource = new BitmapImage(new Uri(\"/Images/ApplicationBar/ic_plus_2x.png\", UriKind.Relative))\r\n        };\r\n\r\n        private readonly ListBoxItem _reportMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.Report,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private readonly ListBoxItem _setAdminsMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.SetAdmins,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private readonly ListBoxItem _convertToSupergroupMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.ConvertToSupergroup,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        private readonly ListBoxItem _deleteAndExitMenuItem = new ListBoxItem\r\n        {\r\n            Content = AppResources.DeleteAndExitGroup,\r\n            Padding = new Thickness(18.0),\r\n            FontSize = 23.0\r\n        };\r\n\r\n        public FeedView()\r\n        {\r\n            var timer = Stopwatch.StartNew();\r\n\r\n            InitializeComponent();\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                NotificationsSwitch.Style = (Style)Application.Current.Resources[\"ProfileLightToggleSwitch\"];\r\n                LayoutRoot.Background = ShellView.CaptionBrush;\r\n                AppBarPanel.MorePanelBackgroundBrush = ShellView.CaptionBrush;\r\n                AppBarPanel.BackgroundBrush = ShellView.CaptionBrush;\r\n\r\n                _setPhotoButton.LabelForeground = new SolidColorBrush(Colors.White);\r\n                _editButton.LabelForeground = new SolidColorBrush(Colors.White);\r\n                _addButton.LabelForeground = new SolidColorBrush(Colors.White);\r\n                AppBarPanel.MoreButton.LabelForeground = new SolidColorBrush(Colors.White);\r\n                AppBarMenuItemsPlaceholder.Foreground = new SolidColorBrush(Colors.White);\r\n            }\r\n\r\n            OptimizeFullHD();\r\n\r\n            _setPhotoButton.Tap += SetPhoto_OnTap;\r\n            _editButton.Tap += EditButton_OnTap;\r\n            _addButton.Tap += AddButton_OnTap;\r\n\r\n            _deleteAndExitMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    //ViewModel.DeleteAndExitGroup();\r\n                });\r\n            };\r\n            _setAdminsMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    //ViewModel.SetAdmins();\r\n                });\r\n            };\r\n            _convertToSupergroupMenuItem.Tap += (sender, args) =>\r\n            {\r\n                AppBarPanel.Close();\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n                {\r\n                    //ViewModel.ConvertToSupergroup();\r\n                });\r\n            };\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                //if (ViewModel.ProfilePhotoViewer != null)\r\n                //    ViewModel.ProfilePhotoViewer.PropertyChanged += OnProfileViewerPropertyChanged;\r\n\r\n                //ViewModel.PropertyChanged += OnChatDetailsPropertyChanged;\r\n                BuildLocalizedAppBar();\r\n            };\r\n\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                //ViewModel.PropertyChanged -= OnChatDetailsPropertyChanged;\r\n\r\n                //if (ViewModel.ProfilePhotoViewer != null)\r\n                //    ViewModel.ProfilePhotoViewer.PropertyChanged -= OnProfileViewerPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OptimizeFullHD()\r\n        {\r\n#if WP8\r\n            var isFullHD = Application.Current.Host.Content.ScaleFactor == 225;\r\n            //if (!isFullHD) return;\r\n#endif\r\n        }\r\n\r\n        private void OnChatDetailsPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            //if (Property.NameEquals(e.PropertyName, () => ViewModel.ProfilePhotoViewer))\r\n            //{\r\n            //    ViewModel.ProfilePhotoViewer.PropertyChanged += OnProfileViewerPropertyChanged;\r\n            //}\r\n            //else if (Property.NameEquals(e.PropertyName, () => ViewModel.IsChannelAdministrator))\r\n            //{\r\n            //    UpdateLocalizedAppBar();\r\n            //}\r\n            //else if (Property.NameEquals(e.PropertyName, () => ViewModel.CanEditChat))\r\n            //{\r\n            //    UpdateLocalizedAppBar();\r\n            //}\r\n        }\r\n\r\n        private IApplicationBar _prevAppBar;\r\n\r\n        private void OnProfileViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            //if (Property.NameEquals(e.PropertyName, () => ViewModel.ProfilePhotoViewer.IsOpen))\r\n            //{\r\n            //    LayoutRoot2.IsHitTestVisible = !ViewModel.ProfilePhotoViewer.IsOpen;\r\n            //    AppBarPanel.Visibility = !ViewModel.ProfilePhotoViewer.IsOpen\r\n            //        ? Visibility.Visible\r\n            //        : Visibility.Collapsed;\r\n\r\n            //    ViewModel.NotifyOfPropertyChange(() => ViewModel.IsViewerOpen);\r\n\r\n            //    if (ViewModel.ProfilePhotoViewer.IsOpen)\r\n            //    {\r\n            //        _prevAppBar = ApplicationBar;\r\n\r\n            //        var profilePhotoViewerView = ProfilePhotoViewer.Content as ProfilePhotoViewerView;\r\n            //        ApplicationBar = profilePhotoViewerView != null ? profilePhotoViewerView.ApplicationBar : null;\r\n            //    }\r\n            //    else\r\n            //    {\r\n            //        // wait to finish closing profile viewer animation\r\n            //        Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.25), () =>\r\n            //        {\r\n            //            if (_prevAppBar != null)\r\n            //            {\r\n            //                ApplicationBar = _prevAppBar;\r\n            //            }\r\n            //        });\r\n            //    }\r\n            //}\r\n        }\r\n\r\n        private ApplicationBar _applicationBar;\r\n\r\n        private void BuildLocalizedAppBar()\r\n        {\r\n            if (_applicationBar != null) return;\r\n\r\n            _applicationBar = new ApplicationBar { BackgroundColor = ((SolidColorBrush)ShellView.CaptionBrush).Color, ForegroundColor = Colors.White, Opacity = 0.99999 };\r\n            var gridColumn = 3;\r\n            //if (ViewModel.CanAddChannelParticipants || ViewModel.CanAddChatParticipants)\r\n            //{\r\n            //    Grid.SetColumn(_addButton, gridColumn--);\r\n            //    AppBarPanel.Buttons.Add(_addButton);\r\n            //    //_applicationBar.Buttons.Add(_addButton);\r\n            //}\r\n\r\n            //if (ViewModel.CanEditChannel || ViewModel.CanEditChat)\r\n            //{\r\n            //    Grid.SetColumn(_editButton, gridColumn--);\r\n            //    AppBarPanel.Buttons.Add(_editButton);\r\n\r\n            //    Grid.SetColumn(_setPhotoButton, gridColumn--);\r\n            //    AppBarPanel.Buttons.Add(_setPhotoButton);\r\n            //    //_applicationBar.Buttons.Add(_editButton);\r\n            //}\r\n\r\n            //if (ViewModel.IsReportButtonEnabled)\r\n            //{\r\n            //    AppBarMenuItems.Children.Add(_reportMenuItem);\r\n            //}\r\n\r\n            //if (ViewModel.IsDeleteAndExitVisible)\r\n            //{\r\n            //    _deleteAndExitMenuItem.Content = ViewModel.DeleteAndExitGroupString;\r\n            //    AppBarMenuItems.Children.Add(_deleteAndExitMenuItem);\r\n            //}\r\n\r\n            //var chat = ViewModel.Chat as TLChat40;\r\n            //if (chat != null && chat.Creator)\r\n            //{\r\n            //    AppBarMenuItems.Children.Add(_setAdminsMenuItem);\r\n            //    AppBarMenuItems.Children.Add(_convertToSupergroupMenuItem);\r\n            //}\r\n\r\n            UpdateLocalizedAppBar();\r\n        }\r\n\r\n        private void UpdateLocalizedAppBar()\r\n        {\r\n            if (_applicationBar == null) return;\r\n\r\n            //var channel = ViewModel.Chat as TLChannel;\r\n            //if (channel != null)\r\n            //{\r\n            //    //AppBarPanel.Visibility = (ViewModel.ChatDetails.CanEditChannel || ViewModel.ChatDetails.CanAddChannelParticipants)\r\n            //    //    ? Visibility.Visible\r\n            //    //    : Visibility.Collapsed;\r\n            //    //_applicationBar.IsVisible = ViewModel.ChatDetails.CanEditChannel || ViewModel.ChatDetails.CanAddChannelParticipants;\r\n            //    return;\r\n            //}\r\n\r\n            //var chat = ViewModel.Chat as TLChat40;\r\n            //if (chat != null)\r\n            //{\r\n            //    //AppBarPanel.Visibility = ViewModel.ChatDetails.CanEditChat\r\n            //    //    ? Visibility.Visible\r\n            //    //    : Visibility.Collapsed;\r\n            //    //_applicationBar.IsVisible = ViewModel.ChatDetails.CanEditChat;\r\n            //    return;\r\n            //}\r\n        }\r\n\r\n        private void ChatView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                var multiplePhotoChooser = popup.Child as OpenPhotoPicker;\r\n                if (multiplePhotoChooser != null)\r\n                {\r\n                    multiplePhotoChooser.TryClose();\r\n                }\r\n\r\n                var cropControl = popup.Child as CropControl;\r\n                if (cropControl != null)\r\n                {\r\n                    cropControl.TryClose();\r\n                }\r\n\r\n                return;\r\n            }\r\n\r\n            //if (ViewModel.ProfilePhotoViewer != null\r\n            //    && ViewModel.ProfilePhotoViewer.IsOpen)\r\n            //{\r\n            //    ViewModel.ProfilePhotoViewer.CloseViewer();\r\n            //    e.Cancel = true;\r\n            //    return;\r\n            //}\r\n        }\r\n\r\n        private bool _once;\r\n\r\n        private void TelegramNavigationTransition_OnEndTransition(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!_once)\r\n            {\r\n                _once = true;\r\n                ViewModel.ForwardInAnimationComplete();\r\n            }\r\n            //else\r\n            //{\r\n            //    ViewModel.UpdateTitles();\r\n            //}\r\n        }\r\n\r\n        private void AppBarPanel_OnPanelOpened(object sender, System.EventArgs e)\r\n        {\r\n            MorePanelBackground.Visibility = Visibility.Visible;\r\n        }\r\n\r\n        private void AppBarPanel_OnPanelClosed(object sender, System.EventArgs e)\r\n        {\r\n            MorePanelBackground.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private void MorePanelBackground_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            AppBarPanel.Close();\r\n        }\r\n\r\n        private void SetPhoto_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                //ViewModel.SetPhoto();\r\n            });\r\n        }\r\n\r\n        private void EditButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                //ViewModel.Edit();\r\n            });\r\n        }\r\n\r\n        private void AddButton_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                //ViewModel.AddParticipant();\r\n            });\r\n        }\r\n\r\n        private void MainItemGrid_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n\r\n            //ContextMenuService.GetContextMenu((DependencyObject)sender).IsOpen = true;\r\n        }\r\n\r\n        private void UIElement_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var span = element.DataContext as TimerSpan;\r\n            if (span == null) return;\r\n\r\n            //ViewModel.SelectSpan(span);\r\n        }\r\n\r\n        private void CopyLink_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            //ViewModel.CopyLink();\r\n        }\r\n\r\n        private void ToggleSwitch_OnChecked(object sender, RoutedEventArgs e)\r\n        {\r\n            //ViewModel.SelectSpan(ViewModel.Spans.First());\r\n        }\r\n\r\n        private void ToggleSwitch_OnUnchecked(object sender, RoutedEventArgs e)\r\n        {\r\n            //ViewModel.SelectSpan(ViewModel.Spans.Last());\r\n        }\r\n\r\n        private void DeleteMenuItem_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var element = sender as FrameworkElement;\r\n            if (element == null) return;\r\n\r\n            var user = element.DataContext as TLUserBase;\r\n            if (user == null) return;\r\n\r\n            element.Visibility = Visibility.Visible;\r\n\r\n            //var chat = ViewModel.CurrentItem as TLChat41;\r\n            //if (chat != null && chat.AdminsEnabled.Value && !chat.Admin.Value && !chat.Creator)\r\n            //{\r\n            //    element.Visibility = Visibility.Collapsed;\r\n            //    return;\r\n            //}\r\n\r\n            //var channel = ViewModel.CurrentItem as TLChannel;\r\n            //if (channel != null)\r\n            //{\r\n            //    if (!channel.IsEditor && !channel.Creator)\r\n            //    {\r\n            //        element.Visibility = Visibility.Collapsed;\r\n            //        return;\r\n            //    }\r\n\r\n            //    if (channel.ChannelParticipants != null)\r\n            //    {\r\n            //        var participants = channel.ChannelParticipants.Participants;\r\n            //        var creator = participants.FirstOrDefault(x => x is TLChannelParticipantCreator);\r\n            //        if (creator != null && creator.UserId.Value == user.Index)\r\n            //        {\r\n            //            element.Visibility = Visibility.Collapsed;\r\n            //            return;\r\n            //        }\r\n\r\n            //    }\r\n\r\n            //    return;\r\n            //}\r\n\r\n\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/MainPage.xaml",
    "content": "﻿<phone:PhoneApplicationPage\r\n    x:Class=\"TelegramClient.Views.MainPage\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <!--LayoutRoot is the root grid where all page content is placed-->\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <!--TitlePanel contains the name of the application and page title-->\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,17,0,28\">\r\n            <TextBlock Text=\"MY APPLICATION\" Style=\"{StaticResource PhoneTextNormalStyle}\"/>\r\n            <TextBlock Text=\"page name\" Margin=\"9,-7,0,0\" Style=\"{StaticResource PhoneTextTitle1Style}\"/>\r\n        </StackPanel>\r\n\r\n        <!--ContentPanel - place additional content here-->\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0,12,0\" />\r\n    </Grid>\r\n\r\n</phone:PhoneApplicationPage>"
  },
  {
    "path": "TelegramClient.WP81/Views/MainPage.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views\r\n{\r\n    public partial class MainPage : PhoneApplicationPage\r\n    {\r\n        public MainPage()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/ColorPicker.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Media.ColorPicker\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Border x:Name=\"GradientBorder\" HorizontalAlignment=\"Stretch\" Grid.Column=\"0\" Height=\"20\" CornerRadius=\"10\">\n            <Border.Background>\n                <LinearGradientBrush>\n                    <GradientStop Color=\"#ffea2739\" Offset=\"0\" />\r\n                    <GradientStop Color=\"#ffdb3ad2\" Offset=\".14\" />\n                    <GradientStop Color=\"#ff3051e3\" Offset=\".24\" />\r\n                    <GradientStop Color=\"#ff49c5ed\" Offset=\".39\" />\n                    <GradientStop Color=\"#ff80c864\" Offset=\".49\" />\r\n                    <GradientStop Color=\"#fffcde65\" Offset=\".62\" />\n                    <GradientStop Color=\"#fffc964d\" Offset=\".73\" />\r\n                    <GradientStop Color=\"#ff000000\" Offset=\".85\" />\r\n                    <GradientStop Color=\"#ffffffff\" Offset=\".99\" />\r\n                    <GradientStop Color=\"#ffffffff\" Offset=\"1\" />\n                </LinearGradientBrush>\n            </Border.Background>\n        </Border>\n\n        <Grid Grid.Column=\"0\"\r\n                HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\"\r\n                Margin=\"-24\"\r\n                Background=\"Transparent\"\r\n                RenderTransformOrigin=\"0.5,0.5\"\r\n                ManipulationStarted=\"PickerBorder_OnManipulationStarted\"\r\n                ManipulationDelta=\"UIElement_OnManipulationDelta\"\r\n                ManipulationCompleted=\"PickerBorder_OnManipulationCompleted\">\r\n            <Grid.RenderTransform>\r\n                <CompositeTransform x:Name=\"TranslateTransform\" TranslateX=\"0\"/>\r\n            </Grid.RenderTransform>\r\n            <Grid.CacheMode>\r\n                <BitmapCache RenderAtScale=\"2.0\"/>\r\n            </Grid.CacheMode>\r\n            <Ellipse x:Name=\"PickerBorder2\" IsHitTestVisible=\"False\"\n                     Fill=\"White\"\n                     Width=\"24\" Height=\"24\" Margin=\"12\"/>\n            <Ellipse x:Name=\"PickerBorder\" IsHitTestVisible=\"False\" \n                     StrokeThickness=\"1\" Stroke=\"#FFC0C0C0\" \n                     Fill=\"#ffea2739\" RenderTransformOrigin=\"0.5,0.5\"\n                     Width=\"22\" Height=\"22\" Margin=\"11\">\n                <Ellipse.CacheMode>\r\n                    <BitmapCache RenderAtScale=\"1.5\"/>\r\n                </Ellipse.CacheMode>\n                <Ellipse.RenderTransform>\n                    <ScaleTransform x:Name=\"PickerBorderScale\" ScaleX=\"0.35\" ScaleY=\"0.35\"/>\n                </Ellipse.RenderTransform>\n            </Ellipse>\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/ColorPicker.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class ColorPicker\r\n    {\r\n        public Color SelectedColor { get; set; }\r\n\r\n        public event EventHandler<ColorEventArgs> SelectedColorChanged;\r\n\r\n        protected virtual void RaiseSelectedColorChanged(ColorEventArgs e)\r\n        {\r\n            var handler = SelectedColorChanged;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private WriteableBitmap _bitmap;\r\n\r\n        public ColorPicker()\r\n        {\r\n            InitializeComponent();\r\n\r\n            SelectedColor = ((SolidColorBrush) PickerBorder.Fill).Color;\r\n\r\n            Loaded += OnColorPickerLoaded;\r\n        }\r\n\r\n        private void OnColorPickerLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (_bitmap == null)\r\n            {\r\n                _bitmap = new WriteableBitmap(GradientBorder, null);\r\n            }\r\n        }\r\n\r\n        private double _minScale = 0.2;\r\n\r\n        private double _maxScale = 0.95;\r\n\r\n        public double CurrentScale\r\n        {\r\n            get { return PickerBorderScale.ScaleX; }\r\n        }\r\n\r\n        private void UIElement_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            TranslateTransform.TranslateX += e.DeltaManipulation.Translation.X * TranslateTransform.ScaleX;\r\n            TranslateTransform.TranslateY += e.DeltaManipulation.Translation.Y * TranslateTransform.ScaleY;\r\n            if (TranslateTransform.TranslateX < 0.0) TranslateTransform.TranslateX = 0.0;\r\n            else if (TranslateTransform.TranslateX > ActualWidth - 2) TranslateTransform.TranslateX = ActualWidth - 2;\r\n\r\n            //if (TranslateTransform.TranslateY > -75.0) TranslateTransform.TranslateY = -75.0;\r\n\r\n            var minDisplacement = -100;\r\n            if (TranslateTransform.TranslateY < minDisplacement)\r\n            {\r\n                var percent = Math.Abs((-TranslateTransform.TranslateY + minDisplacement) / 300.0);\r\n                var scale = (_maxScale - _minScale) * percent + _minScale;\r\n                System.Diagnostics.Debug.WriteLine(\"y={0} percent={1} t={2}\", TranslateTransform.TranslateY, percent, scale);\r\n\r\n                if (scale < _minScale) scale = _minScale;\r\n                else if (scale > _maxScale) scale = _maxScale;\r\n                PickerBorderScale.ScaleX = scale;\r\n                PickerBorderScale.ScaleY = scale;\r\n            }\r\n\r\n            if (TranslateTransform.TranslateX > ActualWidth - 10)\r\n            {\r\n                PickerBorder.StrokeThickness = 0.5 / PickerBorderScale.ScaleX;\r\n            }\r\n            else\r\n            {\r\n                PickerBorder.StrokeThickness = 0.0;\r\n            }\r\n\r\n            var position = TranslateTransform.TranslateX / ActualWidth;\r\n            \r\n            var color = GetColor(position);\r\n            if (!color.HasValue) return;\r\n\r\n            PickerBorder.Fill = new SolidColorBrush(color.Value);\r\n            SelectedColor = color.Value;\r\n            RaiseSelectedColorChanged(new ColorEventArgs { Color = color.Value, Position = position });\r\n        }\r\n\r\n        public void SetPosition(double position)\r\n        {\r\n            var x = position * ActualWidth;\r\n            TranslateTransform.TranslateX = x;\r\n            if (TranslateTransform.TranslateX < 0.0) TranslateTransform.TranslateX = 0.0;\r\n            if (TranslateTransform.TranslateX > ActualWidth - 2) TranslateTransform.TranslateX = ActualWidth - 2;\r\n\r\n            position = TranslateTransform.TranslateX / ActualWidth;\r\n\r\n            var color = GetColor(position);\r\n            if (!color.HasValue) return;\r\n\r\n            PickerBorder.Fill = new SolidColorBrush(color.Value);\r\n        }\r\n\r\n        private Color? GetColor(double position)\r\n        {\r\n            if (_bitmap == null) return null;\r\n\r\n            var colorAsInt = GetPixel(_bitmap, (int) (_bitmap.PixelWidth*position), _bitmap.PixelHeight/2);\r\n\r\n            var color = Color.FromArgb(\r\n                (byte) ((colorAsInt >> 0x18) & 0xff),\r\n                (byte) ((colorAsInt >> 0x10) & 0xff),\r\n                (byte) ((colorAsInt >> 8) & 0xff),\r\n                (byte) (colorAsInt & 0xff));\r\n\r\n            return color;\r\n        }\r\n\r\n        private int GetPixel(WriteableBitmap bitmap, int x, int y)\r\n        {\r\n            if (bitmap == null) return 0;\r\n\r\n            return bitmap.Pixels[y * _bitmap.PixelWidth + x];\r\n        }\r\n\r\n        private void PickerBorder_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var toScaleX = 1.0;\r\n            var scaleXAnimation = new DoubleAnimationUsingKeyFrames();\r\n            scaleXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = toScaleX, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(scaleXAnimation, TranslateTransform);\r\n            Storyboard.SetTargetProperty(scaleXAnimation, new PropertyPath(\"ScaleX\"));\r\n            storyboard.Children.Add(scaleXAnimation);\r\n\r\n            var toScaleY = 1.0;\r\n            var scaleYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            scaleYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = toScaleY, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(scaleYAnimation, TranslateTransform);\r\n            Storyboard.SetTargetProperty(scaleYAnimation, new PropertyPath(\"ScaleY\"));\r\n            storyboard.Children.Add(scaleYAnimation);\r\n\r\n            var toTranslateY = 0.0;\r\n            var translateYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = toTranslateY, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(translateYAnimation, TranslateTransform);\r\n            Storyboard.SetTargetProperty(translateYAnimation, new PropertyPath(\"TranslateY\"));\r\n            storyboard.Children.Add(translateYAnimation);\r\n\r\n            //var toBorderThickness = 8.0;\r\n            //var borderThicknessAnimation = new DoubleAnimationUsingKeyFrames();\r\n            //borderThicknessAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = toBorderThickness, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            //Storyboard.SetTarget(borderThicknessAnimation, PickerBorder2);\r\n            //Storyboard.SetTargetProperty(borderThicknessAnimation, new PropertyPath(\"StrokeThickness\"));\r\n            //storyboard.Children.Add(borderThicknessAnimation);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void PickerBorder_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var toScaleX = 2.0;\r\n            var scaleXAnimation = new DoubleAnimationUsingKeyFrames();\r\n            scaleXAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = toScaleX, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(scaleXAnimation, TranslateTransform);\r\n            Storyboard.SetTargetProperty(scaleXAnimation, new PropertyPath(\"ScaleX\"));\r\n            storyboard.Children.Add(scaleXAnimation);\r\n\r\n            var toScaleY = 2.0;\r\n            var scaleYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            scaleYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = toScaleY, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(scaleYAnimation, TranslateTransform);\r\n            Storyboard.SetTargetProperty(scaleYAnimation, new PropertyPath(\"ScaleY\"));\r\n            storyboard.Children.Add(scaleYAnimation);\r\n\r\n            var toTranslateY = -75.0;\r\n            var translateYAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateYAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = toTranslateY, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(translateYAnimation, TranslateTransform);\r\n            Storyboard.SetTargetProperty(translateYAnimation, new PropertyPath(\"TranslateY\"));\r\n            storyboard.Children.Add(translateYAnimation);\r\n\r\n            //var toBorderThickness = 2.0;\r\n            //var borderThicknessAnimation = new DoubleAnimationUsingKeyFrames();\r\n            //borderThicknessAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = toBorderThickness, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 } });\r\n            //Storyboard.SetTarget(borderThicknessAnimation, PickerBorder2);\r\n            //Storyboard.SetTargetProperty(borderThicknessAnimation, new PropertyPath(\"StrokeThickness\"));\r\n            //storyboard.Children.Add(borderThicknessAnimation);\r\n\r\n            storyboard.Begin();\r\n        }\r\n    }\r\n\r\n    public class ColorEventArgs : System.EventArgs\r\n    {\r\n        public Color Color { get; set; }\r\n\r\n        public double Position { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/EditVideoView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Media.EditVideoView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:media=\"clr-namespace:TelegramClient.ViewModels.Media\"\r\n    xmlns:media1=\"clr-namespace:TelegramClient.Views.Media\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <SolidColorBrush x:Key=\"InputBorderBrushLight\" Color=\"#FFDEE3EA\"/>\r\n            <SolidColorBrush x:Key=\"InputBorderBrushDark\" Color=\"#CC5D5D5D\"/>\r\n            \r\n            <media1:BooleanToBrushConverter \r\n                x:Name=\"BooleanToBrushConverter\"\r\n                AccentBrush=\"{StaticResource TelegramBadgeAccentBrush}\"\r\n                NormalBrush=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            \r\n            <media:TimerSpanToBrushConverter \r\n                x:Name=\"TimerSpanToBrushConverter\"\r\n                AccentBrush=\"{StaticResource TelegramBadgeAccentBrush}\"\r\n                NormalBrush=\"{StaticResource PhoneForegroundBrush}\"/>\r\n\r\n            <Style x:Key=\"CaptionTextBox\" TargetType=\"TextBox\">\r\n                <Setter Property=\"CaretBrush\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{StaticResource PhoneSubtleColor}\"/>\r\n                    </Setter.Value>\r\n                </Setter>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n                <Setter Property=\"SelectionBackground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n                <Setter Property=\"Padding\" Value=\"10,2\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"TextBox\">\r\n                            <Grid Background=\"Transparent\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Collapsed</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Visible</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"ReadOnly\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Collapsed</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Visible</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"DisabledOrReadonlyBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"DisabledOrReadonlyContent\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                        <VisualState x:Name=\"Focused\">\r\n                                            <Storyboard>\r\n                                                <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"EnabledBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Unfocused\"/>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Border x:Name=\"EnabledBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"9,15,9,18\">\r\n                                    <ContentControl x:Name=\"ContentElement\" Content=\"|Test\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                                </Border>\r\n                                <Border x:Name=\"DisabledOrReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\">\r\n                                    <TextBox x:Name=\"DisabledOrReadonlyContent\" Background=\"Transparent\" Foreground=\"{StaticResource PhoneDisabledBrush}\" FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" IsReadOnly=\"True\" SelectionForeground=\"{TemplateBinding SelectionForeground}\" SelectionBackground=\"{TemplateBinding SelectionBackground}\" TextAlignment=\"{TemplateBinding TextAlignment}\" TextWrapping=\"{TemplateBinding TextWrapping}\" Text=\"{TemplateBinding Text}\" Template=\"{StaticResource PhoneDisabledTextBoxTemplate}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <Border x:Name=\"Caption2\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,24,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.Video, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n            <TextBlock Text=\"{Binding EditedVideoParameters}\" Margin=\"6,-4,0,0\" Foreground=\"White\" Opacity=\"0.5\" CacheMode=\"BitmapCache\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid x:Name=\"ImagesGrid\" Grid.Row=\"1\" Background=\"Black\" micro:Message.Attach=\"[Event Tap] = [Action OpenVideo]\">\r\n            <Image x:Name=\"Preview\" Source=\"{Binding PreviewPhoto, Converter={StaticResource PhotoConverter}}\" CacheMode=\"BitmapCache\"/>\r\n            <Grid VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"Auto\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Image VerticalAlignment=\"Center\"\r\n\t\t\t\t\t                Width=\"48\" Height=\"48\" Margin=\"-4,3,-4,0\"\r\n\t\t\t\t\t                Source=\"/Images/Audio/appbar.transport.play.rest.png\"/>\r\n                <TextBlock Grid.Column=\"1\"\r\n\t\t\t\t\t                VerticalAlignment=\"Center\" Margin=\" 0\"\r\n\t\t\t\t\t                Text=\"{Binding DurationString}\"\r\n\t\t\t\t\t                Foreground=\"White\"\r\n\t\t\t\t\t                Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n            </Grid>\r\n        </Grid>\r\n\r\n        <!-- Mentions -->\r\n        <ContentControl x:Name=\"UsernameHints\" \r\n            Grid.Row=\"1\"\r\n            VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Stretch\" \r\n            HorizontalContentAlignment=\"Stretch\" \r\n            Margin=\"0,-38,0,0\" MaxHeight=\"241\"\r\n            Tap=\"UsernameHint_OnTap\"\r\n            ManipulationStarted=\"UsernameHints_OnManipulationStarted\"/>\r\n\r\n        <StackPanel x:Name=\"Bar\" Grid.Row=\"2\">\r\n            <StackPanel.RenderTransform>\r\n                <CompositeTransform/>\r\n            </StackPanel.RenderTransform>\r\n            <Grid Background=\"{StaticResource PhoneChromeBrush}\">\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                    <RowDefinition Height=\"Auto\"/>\r\n                </Grid.RowDefinitions>\r\n                <Grid>\r\n                    <Rectangle x:Name=\"TopBorder\" VerticalAlignment=\"Top\" Height=\"2\" Fill=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                    <TextBlock x:Name=\"CaptionWatermark\" Margin=\"20,0\" Text=\"{Binding Resources.AddCaption, Source={StaticResource Strings}}\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\" VerticalAlignment=\"Center\"/>\r\n                    <TextBox x:Name=\"Caption\" MaxLength=\"140\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" Text=\"{Binding Caption, Mode=TwoWay}\" Foreground=\"{StaticResource PhoneForegroundBrush}\" InputScope=\"Text\" KeyDown=\"Caption_OnKeyDown\" GotFocus=\"Caption_OnGotFocus\" LostFocus=\"Caption_OnLostFocus\" TextChanged=\"Caption_OnTextChanged\" Style=\"{StaticResource CaptionTextBox}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </TextBox>\r\n                </Grid>\r\n                <Border Grid.Row=\"1\" x:Name=\"KeyboardPlaceholder\"/>\r\n                <controls1:VideoTimelineControl \r\n                    x:Name=\"Timeline\" \r\n                    Grid.Row=\"1\"\r\n                    VerticalAlignment=\"Bottom\"\r\n                    File=\"{Binding VideoFile}\"\r\n                    TrimLeft=\"{Binding TrimLeft, Mode=TwoWay}\"\r\n                    TrimRight=\"{Binding TrimRight, Mode=TwoWay}\" \r\n                    ThumbnailChanged=\"Timeline_OnThumbnailChanged\"/>\r\n            </Grid>\r\n            <Grid x:Name=\"ApplicationBarPlaceholder\">\r\n                <Border x:Name=\"MorePanel\" Grid.Row=\"0\" Visibility=\"Collapsed\" VerticalAlignment=\"Bottom\">\r\n                    <Border.RenderTransform>\r\n                        <CompositeTransform/>\r\n                    </Border.RenderTransform>\r\n                </Border>\r\n                <controls1:TelegramApplicationBar \r\n                        x:Name=\"AppBar\" \r\n                        VerticalAlignment=\"Bottom\"\r\n                        MorePanel=\"{Binding ElementName=MorePanel}\">\r\n                    <controls1:TelegramApplicationBar.Buttons>\r\n                        <controls1:TelegramAppBarButton\r\n                                x:Name=\"TimerButton\"\r\n                                Grid.Column=\"0\" \r\n                                Tap=\"Timer_OnClick\"\r\n                                ImageSource=\"/Images/W10M/ic_timer_2x.png\"\r\n                                Text=\"{Binding Resources.Timer, Source={StaticResource Strings}}\"\r\n                                LabelForeground=\"{Binding TimerSpan, Converter={StaticResource TimerSpanToBrushConverter}}\"/>\r\n                        <controls1:TelegramAppBarButton\r\n                                x:Name=\"QualityButton\"\r\n                                Grid.Column=\"1\" \r\n                                Tap=\"Quality_OnClick\"\r\n                                ImageSource=\"{Binding QualityButtonImageSource}\"\r\n                                Text=\"{Binding Resources.Quality, Source={StaticResource Strings}}\"\r\n                                IsEnabled=\"{Binding Compression}\"/>\r\n                        <controls1:TelegramAppBarButton\r\n                                x:Name=\"MuteButton\"\r\n                                Grid.Column=\"2\"\r\n                                Tap=\"Mute_OnClick\"\r\n                                ImageSource=\"/Images/W10M/ic_gif_2x.png\"\r\n                                Text=\"{Binding Resources.Gif, Source={StaticResource Strings}}\"\r\n                                IsEnabled=\"{Binding Mute}\"\r\n                                LabelForeground=\"{Binding IsMuteEnabled, Converter={StaticResource BooleanToBrushConverter}}\"/>\r\n                        <controls1:TelegramAppBarButton\r\n                                x:Name=\"SendButton\"\r\n                                Grid.Column=\"3\" \r\n                                Tap=\"Done_Click\"\r\n                                ImageSource=\"/Images/W10M/ic_send_2x.png\"\r\n                                Text=\"{Binding Resources.Send, Source={StaticResource Strings}}\"\r\n                                LabelForeground=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                    </controls1:TelegramApplicationBar.Buttons>\r\n                </controls1:TelegramApplicationBar>\r\n            </Grid>\r\n        </StackPanel>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/EditVideoView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Reactive.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing Windows.UI.ViewManagement;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Contacts;\r\nusing TelegramClient.ViewModels.Media;\r\nusing TelegramClient.Views.Additional;\r\nusing TelegramClient.Views.Controls;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class EditVideoView : IDisposable\r\n    {\r\n        private IDisposable _trimEventsSubscription;\r\n\r\n        public EditVideoViewModel ViewModel\r\n        {\r\n            get { return DataContext as EditVideoViewModel; }\r\n        }\r\n\r\n        public EditVideoView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption2.Background = ShellView.CaptionBrush;\r\n\r\n            Visibility = Visibility.Collapsed;\r\n\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            if (isLightTheme)\r\n            {\r\n                TopBorder.Fill = (Brush)Resources[\"InputBorderBrushLight\"];\r\n            }\r\n            else\r\n            {\r\n                TopBorder.Fill = (Brush)Resources[\"InputBorderBrushDark\"];\r\n            }\r\n\r\n            var trimEvents = Observable.FromEventPattern<EventHandler, System.EventArgs>(\r\n                keh => { Timeline.TrimChanged += keh; },\r\n                keh => { Timeline.TrimChanged -= keh; });\r\n\r\n            _trimEventsSubscription = trimEvents\r\n                .Sample(TimeSpan.FromSeconds(0.25))\r\n                .ObserveOnDispatcher()\r\n                .Subscribe(args => ViewModel.UpdateEditedVideoDuration());\r\n\r\n            Loaded += OnLoadedOnce;\r\n            Loaded += OnLoaded;\r\n            Unloaded += OnUnloaded;\r\n        }\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            InputPane.GetForCurrentView().Showing += InputPane_Showing;\r\n            InputPane.GetForCurrentView().Hiding += InputPane_Hiding;\r\n        }\r\n\r\n        private void OnUnloaded(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            InputPane.GetForCurrentView().Showing -= InputPane_Showing;\r\n            InputPane.GetForCurrentView().Hiding -= InputPane_Hiding;\r\n        }\r\n\r\n        private void InputPane_Hiding(InputPane sender, InputPaneVisibilityEventArgs args)\r\n        {\r\n            CaptionWatermark.Visibility = string.IsNullOrEmpty(Caption.Text) ? Visibility.Visible : Visibility.Collapsed;\r\n            KeyboardPlaceholder.Height = 0.0;\r\n            KeyboardPlaceholder.Visibility = Visibility.Collapsed;\r\n            ImagesGrid.Margin = new Thickness(0.0);\r\n        }\r\n\r\n        private void InputPane_Showing(InputPane sender, InputPaneVisibilityEventArgs args)\r\n        {\r\n            var keyboardHeight = 480.0 / args.OccludedRect.Width * args.OccludedRect.Height - AppBar.ActualHeight + 18.0;\r\n\r\n            var height = GetKeyboardHeightDifference(keyboardHeight);\r\n            CaptionWatermark.Visibility = Visibility.Collapsed;\r\n            KeyboardPlaceholder.Height = keyboardHeight;\r\n            KeyboardPlaceholder.Visibility = Visibility.Visible;\r\n            ImagesGrid.Margin = new Thickness(0.0, 0.0, 0.0, -height);\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))\r\n            {\r\n                if (ViewModel.IsOpen)\r\n                {\r\n                    BeginOpenStoryboard();\r\n                }\r\n                else\r\n                {\r\n                    BeginCloseStoryboard();\r\n                }\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.PreviewPhoto))\r\n            {\r\n                if (ViewModel.PreviewPhoto != null)\r\n                {\r\n                    var binding = new Binding(\"PreviewPhoto\");\r\n                    binding.Converter = (IValueConverter)Application.Current.Resources[\"PhotoConverter\"];\r\n                    Preview.SetBinding(Image.SourceProperty, binding);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void BeginCloseStoryboard()\r\n        {\r\n            SystemTray.IsVisible = true;\r\n            //ApplicationBar.IsVisible = false;\r\n\r\n            LayoutRoot.CacheMode = new BitmapCache();\r\n            Bar.CacheMode = new BitmapCache();\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            //var opacityImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            //opacityImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0 });\r\n            //Storyboard.SetTarget(opacityImageAniamtion, BackgroundBorder);\r\n            //Storyboard.SetTargetProperty(opacityImageAniamtion, new PropertyPath(\"Opacity\"));\r\n            //storyboard.Children.Add(opacityImageAniamtion);\r\n\r\n            var translateBarAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 0.0 });\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateBarAniamtion, Bar);\r\n            Storyboard.SetTargetProperty(translateBarAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateBarAniamtion);\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() => storyboard.Begin());\r\n            storyboard.Completed += (o, args) =>\r\n            {\r\n                LayoutRoot.CacheMode = null;\r\n                Bar.CacheMode = null;\r\n                Visibility = Visibility.Collapsed;\r\n            };\r\n        }\r\n\r\n        private void BeginOpenStoryboard()\r\n        {\r\n            SystemTray.IsVisible = false;\r\n            //ApplicationBar.IsVisible = true;\r\n\r\n            var transparentBlack = Colors.Black;\r\n            transparentBlack.A = 0;\r\n\r\n            //CaptionWatermark.Visibility = Visibility.Visible;\r\n            Visibility = Visibility.Visible;\r\n            //ImagesGrid.Opacity = 1.0;\r\n            //ImagesGrid.RenderTransform = new CompositeTransform();\r\n            //BackgroundBorder.Opacity = 1.0;\r\n\r\n\r\n            LayoutRoot.CacheMode = new BitmapCache();\r\n            Bar.CacheMode = new BitmapCache();\r\n            var duration = TimeSpan.FromSeconds(0.25);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            ((CompositeTransform)LayoutRoot.RenderTransform).TranslateY = translateYTo;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = 0.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            var translateBarAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = translateYTo });\r\n            translateBarAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.4), Value = 0.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateBarAniamtion, Bar);\r\n            Storyboard.SetTargetProperty(translateBarAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateBarAniamtion);\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                LayoutRoot.CacheMode = null;\r\n                Bar.CacheMode = null;\r\n            };\r\n            Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n        }\r\n\r\n        private void OnLoadedOnce(object sender, RoutedEventArgs e)\r\n        {\r\n            Loaded -= OnLoadedOnce;\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() => ViewModel.OpenEditor());\r\n        }\r\n\r\n        private void Timeline_OnThumbnailChanged(object sender, ThumbnailChangedEventArgs e)\r\n        {\r\n            var bitmapImage = new BitmapImage();\r\n            Preview.Source = bitmapImage;\r\n\r\n            bitmapImage.SetSource(e.Thumbnail.AsStream());\r\n        }\r\n\r\n        private void Mute_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            var isMuted = !ViewModel.IsMuteEnabled;\r\n            if (isMuted)\r\n            {\r\n                ViewModel.SelectedQuality = ViewModel.QualityList.Count == 1\r\n                    ? ViewModel.QualityList[0]\r\n                    : ViewModel.QualityList.FirstOrDefault(x => x.Seconds == 360) ??\r\n                      ViewModel.QualityList.FirstOrDefault(x => x.Seconds == 240);\r\n                ViewModel.NotifyOfPropertyChange(() => ViewModel.QualityButtonImageSource);\r\n            }\r\n            ViewModel.IsMuteEnabled = isMuted;\r\n            ViewModel.Compression = !ViewModel.IsMuteEnabled && ViewModel.QualityList.Count > 1;\r\n        }\r\n\r\n        private void Timer_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            var stateService = IoC.Get<IStateService>();\r\n            stateService.SelectedTimerSpan = ViewModel.TimerSpan;\r\n            var chooseTTLViewModel = IoC.Get<ChooseTTLViewModel>();\r\n            chooseTTLViewModel.Subtitle = AppResources.SelfDestructTimerVideoSubtitle;\r\n\r\n            var chooseTTLView = new ChooseTTLView { Height = 330.0, DataContext = chooseTTLViewModel, Margin = new Thickness(0.0, -34.0, 0.0, -6.0) };\r\n            ShellViewModel.ShowCustomMessageBox(null, null, AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                result =>\r\n                {\r\n                    if (result == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        var selector = chooseTTLView.Selector;\r\n\r\n                        ViewModel.TimerSpan = ((TimerSpan)selector.DataSource.SelectedItem);\r\n                        ViewModel.NotifyOfPropertyChange(() => ViewModel.TimerSpan);\r\n                    }\r\n                },\r\n                chooseTTLView);\r\n        }\r\n\r\n        private void Done_Click(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n\r\n        private void Caption_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            //CaptionWatermark.Visibility = string.IsNullOrEmpty(Caption.Text) ? Visibility.Visible : Visibility.Collapsed;\r\n            //KeyboardPlaceholder.Height = 0.0;\r\n            //ImagesGrid.Margin = new Thickness(0.0);\r\n        }\r\n\r\n        private void Caption_OnTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            CaptionWatermark.Visibility = string.IsNullOrEmpty(Caption.Text) ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        private void Caption_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.Done();\r\n            }\r\n        }\r\n\r\n        private double GetKeyboardHeightDifference(double keyboardHeight)\r\n        {\r\n            var heightDifference = keyboardHeight - Timeline.ActualHeight;\r\n\r\n            return heightDifference;\r\n        }\r\n\r\n        private void Caption_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            //var height = GetKeyboardHeightDifference();\r\n            //KeyboardPlaceholder.Height = EmojiControl.PortraitOrientationHeight - ApplicationBarPlaceholder.ActualHeight;\r\n            //ImagesGrid.Margin = new Thickness(0.0, 0.0, 0.0, -height);\r\n        }\r\n\r\n        private void Quality_OnClick(object sender, GestureEventArgs e)\r\n        {\r\n            var stateService = IoC.Get<IStateService>();\r\n            stateService.SelectedTimerSpan = ViewModel.SelectedQuality;\r\n            stateService.TimerSpans = ViewModel.QualityList;\r\n            var chooseVideoQualityViewModel = new ChooseVideoQualityViewModel(stateService);\r\n\r\n            var chooseTTLView = new ChooseVideoQualityView { DataContext = chooseVideoQualityViewModel, Margin = new Thickness(0.0, -34.0, 0.0, -6.0) };\r\n            ShellViewModel.ShowCustomMessageBox(null, null, AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),\r\n                result =>\r\n                {\r\n                    if (result == CustomMessageBoxResult.RightButton)\r\n                    {\r\n                        var selector = chooseTTLView.Selector;\r\n\r\n                        ViewModel.SelectedQuality = (TimerSpan)selector.DataSource.SelectedItem;\r\n                        ViewModel.NotifyOfPropertyChange(() => ViewModel.SelectedQuality);\r\n                        ViewModel.NotifyOfPropertyChange(() => ViewModel.QualityButtonImageSource);\r\n                    }\r\n                },\r\n                chooseTTLView);\r\n        }\r\n\r\n        public void Dispose()\r\n        {\r\n            if (_trimEventsSubscription != null) _trimEventsSubscription.Dispose();\r\n        }\r\n\r\n        private void UsernameHint_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            Caption.Focus();\r\n\r\n            var frameworkElement = e.OriginalSource as FrameworkElement;\r\n            if (frameworkElement != null)\r\n            {\r\n                var user = frameworkElement.DataContext as IUserName;\r\n                if (user != null)\r\n                {\r\n                    var userBase = user as TLUserBase;\r\n\r\n                    var index = 0;\r\n                    for (var i = Caption.Text.Length - 1; i >= 0; i--)\r\n                    {\r\n                        if (Caption.Text[i] == '@')\r\n                        {\r\n                            index = i;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (TLString.IsNullOrEmpty(user.UserName))\r\n                    {\r\n                        if (userBase != null)\r\n                        {\r\n                            ViewModel.AddMention(userBase);\r\n\r\n                            Caption.Text = string.Format(\"{0}({1})\", Caption.Text.Substring(0, index + 1), userBase.FullName);\r\n                            Caption.SelectionStart = Caption.Text.Length - userBase.FullName.Length - 1;\r\n                            Caption.SelectionLength = userBase.FullName.Length;\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        Caption.Text = string.Format(\"{0}{1} \", Caption.Text.Substring(0, index + 1), user.UserName);\r\n                        Caption.SelectionStart = Caption.Text.Length;\r\n                        Caption.SelectionLength = 0;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UsernameHints_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            ViewModel.ContinueLoadMentionHints();\r\n        }\r\n    }\r\n\r\n    public class BooleanToBrushConverter : DependencyObject, IValueConverter\r\n    {\r\n        public static readonly DependencyProperty AccentBrushProperty = DependencyProperty.Register(\r\n            \"AccentBrush\", typeof(Brush), typeof(BooleanToBrushConverter), new PropertyMetadata(default(Brush)));\r\n\r\n        public Brush AccentBrush\r\n        {\r\n            get { return (Brush)GetValue(AccentBrushProperty); }\r\n            set { SetValue(AccentBrushProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty NormalBrushProperty = DependencyProperty.Register(\r\n            \"NormalBrush\", typeof(Brush), typeof(BooleanToBrushConverter), new PropertyMetadata(default(Brush)));\r\n\r\n        public Brush NormalBrush\r\n        {\r\n            get { return (Brush)GetValue(NormalBrushProperty); }\r\n            set { SetValue(NormalBrushProperty, value); }\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if ((bool)value)\r\n            {\r\n                return AccentBrush;\r\n            }\r\n\r\n            return NormalBrush;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/ExtendedImageEditor.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Media.ExtendedImageEditor\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:media=\"clr-namespace:TelegramClient.Views.Media\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <UserControl.Resources>\r\n        <Style x:Key=\"ButtonStyle\" TargetType=\"Button\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"10,5,10,6\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"TextBoxStyle\" TargetType=\"TextBox\">\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMediumLarge}\"/>\r\n            <Setter Property=\"Background\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n            <Setter Property=\"SelectionBackground\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n            <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n            <Setter Property=\"Padding\" Value=\"2\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"TextBox\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"ReadOnly\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Collapsed</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                    <DiscreteObjectKeyFrame.Value>\r\n                                                        <Visibility>Visible</Visibility>\r\n                                                    </DiscreteObjectKeyFrame.Value>\r\n                                                </DiscreteObjectKeyFrame>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\">\r\n                                        <Storyboard>\r\n                                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>-->\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBorderBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unfocused\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"MainBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\"/>\r\n                            <Border x:Name=\"ReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\"/>\r\n                            <Border BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Margin=\"{StaticResource PhoneTextBoxInnerMargin}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"Stretch\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Black\" Margin=\"0,0,0,-1\" CacheMode=\"BitmapCache\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n        <Grid Grid.Row=\"0\" Margin=\"0,0,0,0\">\n            <Grid.ColumnDefinitions>\n                <ColumnDefinition Width=\"Auto\"/>\n                <ColumnDefinition Width=\"*\"/>\n                <ColumnDefinition Width=\"Auto\"/>\n            </Grid.ColumnDefinitions>\n            <Button Grid.Row=\"0\" Grid.Column=\"0\" x:Name=\"UndoButton\" HorizontalAlignment=\"Left\" Click=\"UndoButton_OnClick\" Style=\"{StaticResource ButtonStyle}\">\n                <Border Width=\"32\" Height=\"32\" Background=\"White\">\n                    <Border.OpacityMask>\n                        <ImageBrush Stretch=\"Uniform\" ImageSource=\"/Assets/photo_undo.png\"/>\n                    </Border.OpacityMask>\n                </Border>\n            </Button>\n            <Button Grid.Column=\"2\" Content=\"{Binding Resources.ClearAll, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" x:Name=\"ClearAllButton\" Foreground=\"White\" HorizontalAlignment=\"Right\" Click=\"ClearAllButton_OnClick\" Style=\"{StaticResource ButtonStyle}\"/>\n        </Grid>\r\n\n        <Grid x:Name=\"MeasureGrid\" Grid.Row=\"1\" Margin=\"0\"/>\r\n        <Canvas Grid.Row=\"1\" x:Name=\"PreviewCanvas\" Margin=\"0\" CacheMode=\"BitmapCache\"\n            HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"\n            ManipulationStarted=\"PreviewCanvas_OnManipulationStarted\"\n            ManipulationDelta=\"PreviewCanvas_OnManipulationDelta\"\n            ManipulationCompleted=\"PreviewCanvas_OnManipulationCompleted\"\n            Tap=\"PreviewCanvas_OnTap\"\n            Hold=\"PreviewCanvas_OnHold\">\n            <Image x:Name=\"Preview\" Canvas.ZIndex=\"0\" ImageOpened=\"Preview_OnImageOpened\" Width=\"456\" Tap=\"Preview_OnTap\"/>\n        </Canvas>\r\n        <ScrollViewer Grid.Row=\"1\" Grid.RowSpan=\"2\" Height=\"120\" Visibility=\"Collapsed\" VerticalAlignment=\"Bottom\" HorizontalScrollBarVisibility=\"Auto\" IsHitTestVisible=\"True\">\r\n            <TextBlock x:Name=\"DEBUG\" Text=\"\" TextWrapping=\"Wrap\"  FontSize=\"14\" Foreground=\"GreenYellow\"/>\r\n        </ScrollViewer>\n\n        <Grid Grid.Row=\"0\" Grid.RowSpan=\"2\" x:Name=\"InputGrid\" Visibility=\"Collapsed\">\n            <Border Background=\"#CC000000\"/>\n            <TextBox x:Name=\"Input\" Text=\"\" Foreground=\"White\" CaretBrush=\"White\" BorderThickness=\"0\" AcceptsReturn=\"True\" Background=\"Transparent\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" MaxHeight=\"450\" TextWrapping=\"Wrap\" TextAlignment=\"Center\" Visibility=\"Visible\"\n                     LostFocus=\"Input_OnLostFocus\" Style=\"{StaticResource TextBoxStyle}\"/>\n        </Grid>\n        <Grid Grid.Row=\"2\">\n            <Grid.RowDefinitions>\n                <RowDefinition Height=\"Auto\"/>\n                <RowDefinition Height=\"Auto\"/>\n                <RowDefinition Height=\"Auto\"/>\n            </Grid.RowDefinitions>\n            <Grid.ColumnDefinitions>\n                <ColumnDefinition Width=\"Auto\"/>\n                <ColumnDefinition/>\n                <ColumnDefinition Width=\"Auto\"/>\n                <ColumnDefinition/>\n                <ColumnDefinition Width=\"Auto\"/>\n            </Grid.ColumnDefinitions>\r\n\n            <Grid Grid.Row=\"1\" Grid.ColumnSpan=\"5\">\n                <Grid.ColumnDefinitions>\n                    <ColumnDefinition Width=\"*\"/>\n                    <ColumnDefinition Width=\"Auto\"/>\n                </Grid.ColumnDefinitions>\n                <media:ColorPicker x:Name=\"Picker\" SelectedColorChanged=\"ColorPicker_OnSelectedColorChanged\" Margin=\"24,0\"/>\n                <Button Grid.Column=\"1\" x:Name=\"FlipButton\" HorizontalAlignment=\"Left\" Click=\"FlipButton_OnClick\" CacheMode=\"BitmapCache\" Style=\"{StaticResource ButtonStyle}\">\n                    <Border Width=\"32\" Height=\"32\" Background=\"White\">\n                        <Border.OpacityMask>\n                            <ImageBrush Stretch=\"Uniform\" ImageSource=\"/Assets/photo_flip.png\"/>\n                        </Border.OpacityMask>\n                    </Border>\n                </Button>\n            </Grid>\n\n            <Button Grid.Row=\"2\" Grid.Column=\"0\" Content=\"{Binding Resources.Cancel, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" x:Name=\"CancelButton\" Foreground=\"White\" Click=\"CancelButton_OnClick\" Style=\"{StaticResource ButtonStyle}\"/>\n            <Button Grid.Row=\"2\" Grid.Column=\"1\" x:Name=\"Sticker\" HorizontalAlignment=\"Right\" Click=\"Sticker_OnClick\" Style=\"{StaticResource ButtonStyle}\">\n                <Border Width=\"32\" Height=\"32\" Background=\"White\">\n                    <Border.OpacityMask>\n                        <ImageBrush Stretch=\"Uniform\" ImageSource=\"/Assets/photo_sticker.png\"/>\n                    </Border.OpacityMask>\n                </Border>\n            </Button>\n            <Button Grid.Row=\"2\" Grid.Column=\"2\" x:Name=\"Paint\" Click=\"PaintButton_OnClick\" Style=\"{StaticResource ButtonStyle}\">\n                <Border Width=\"32\" Height=\"32\" Background=\"White\">\n                    <Border.OpacityMask>\n                        <ImageBrush Stretch=\"Uniform\" ImageSource=\"/Assets/photo_paint.png\"/>\n                    </Border.OpacityMask>\n                </Border>\n            </Button>\n            <Button Grid.Row=\"2\" Grid.Column=\"3\" x:Name=\"Text\" HorizontalAlignment=\"Left\" Click=\"Text_OnClick\" Style=\"{StaticResource ButtonStyle}\">\n                <Border Width=\"32\" Height=\"32\" Background=\"White\">\n                    <Border.OpacityMask>\n                        <ImageBrush Stretch=\"Uniform\" ImageSource=\"/Assets/photo_paint_text.png\"/>\n                    </Border.OpacityMask>\n                </Border>\n            </Button>\n            <Button Grid.Row=\"2\" Grid.Column=\"4\" Content=\"{Binding Resources.Done, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" x:Name=\"DoneButton\" Foreground=\"White\" Click=\"DoneButton_OnClick\" Style=\"{StaticResource ButtonStyle}\"/>\n        </Grid>\n        <ContentPresenter x:Name=\"StickersPanel\" d:IsHidden=\"True\" Grid.Row=\"0\" Grid.RowSpan=\"3\"/>\r\n    </Grid>\r\n\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/ExtendedImageEditor.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.IO.IsolatedStorage;\r\nusing System.Linq;\r\nusing System.Threading.Tasks;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing Windows.Storage;\r\nusing Windows.Storage.FileProperties;\r\nusing Windows.System.Threading;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Xna.Framework;\r\nusing OpenCVComponent;\r\nusing Telegram.Api.Aggregator;\r\nusing Telegram.Api.Extensions;\r\nusing Telegram.Api.Services.FileManager;\r\nusing Telegram.Api.TL;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.ViewModels.Dialogs;\r\nusing Action = System.Action;\r\nusing GestureEventArgs = System.Windows.Input.GestureEventArgs;\r\nusing Point = System.Windows.Point;\r\nusing ThreadPool = Windows.System.Threading.ThreadPool;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class ExtendedImageEditor : Telegram.Api.Aggregator.IHandle<DownloadableItem>\r\n    {\r\n        private ExtendedImageEditorMode _mode;\r\n\r\n        public event EventHandler Cancel;\r\n\r\n        protected virtual void RaiseCancel()\r\n        {\r\n            var handler = Cancel;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler<PreviewEventArgs> Done;\r\n\r\n        protected virtual void RaiseDone(PreviewEventArgs args)\r\n        {\r\n            var handler = Done;\r\n            if (handler != null) handler(this, args);\r\n        }\r\n\r\n        private OpenCVLib _opencv;\r\n\r\n        private readonly ITelegramEventAggregator _eventAggregator;\r\n\r\n        private TLAllStickers _masks;\r\n\r\n        private TLAllStickers _stickers;\r\n\r\n        public ExtendedImageEditor()\r\n        {\r\n            InitializeComponent();\r\n\r\n            _eventAggregator = IoC.Get<ITelegramEventAggregator>();\r\n\r\n            if (DesignerProperties.IsInDesignTool) return;\r\n            _opencv = new OpenCVLib();\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                _eventAggregator.Subscribe(this);\r\n\r\n                if (_lastStoryboard != null)\r\n                {\r\n                    Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n                    {\r\n                        if (_lastStoryboard == null) return;\r\n                        _lastStoryboard.Begin();\r\n                    });\r\n                }\r\n                //SetCanvasSize();\r\n            };\r\n            Unloaded += (o, e) =>\r\n            {\r\n                _eventAggregator.Unsubscribe(this);\r\n            };\r\n\r\n            Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n            {\r\n                _masks = IoC.Get<IStateService>().GetMasks();\r\n                _stickers = IoC.Get<IStateService>().GetAllStickers();\r\n            });\r\n        }\r\n\r\n        private void UpdateEnabledButtons()\r\n        {\r\n            var isEnabled = PreviewCanvas.Children.Count > 1;\r\n\r\n            ClearAllButton.IsEnabled = isEnabled;\r\n            UndoButton.IsEnabled = isEnabled;\r\n        }\r\n\r\n        private bool _isManipulating;\r\n\r\n        public bool IsStickerPanelOpened\r\n        {\r\n            get { return _stickersControl != null && _stickersControl.Visibility == Visibility.Visible; }\r\n        }\r\n\r\n        public void CloseStickerPanel()\r\n        {\r\n            if (_stickersControl == null) return;\r\n\r\n            _stickersControl.Close();\r\n        }\r\n\r\n        private FacesImage _facesImage;\r\n\r\n        private readonly List<PhotoFace> _photoFaces = new List<PhotoFace>();\r\n\r\n        private PhotoFile _photoFile;\r\n\r\n        private StorageFile _localFile;\r\n\r\n        private TLMessage _message;\r\n\r\n        private TLDecryptedMessage _decryptedMessage;\r\n\r\n        private int _h;\r\n\r\n        private int _w;\r\n\r\n        public void Detect(PhotoFile photoFile, BitmapSource image)\r\n        {\r\n            FlipButton.Opacity = 0.0;\r\n\r\n            _mode = ExtendedImageEditorMode.Paint;\r\n\r\n            Preview.Source = null;\r\n            PreviewCanvas.Children.Clear();\r\n            PreviewCanvas.Children.Add(Preview);\r\n\r\n            paintingSize = null;\r\n            _w = 0;\r\n            _h = 0;\r\n\r\n            UpdateEnabledButtons();\r\n\r\n            _photoFile = photoFile;\r\n            if (photoFile == null) return;\r\n\r\n            var message = _photoFile.Message;\r\n            var decryptedTuple = _photoFile.DecryptedTuple;\r\n            if (message != null)\r\n            {\r\n                var mediaPhoto = message.Media as TLMessageMediaPhoto;\r\n                if (mediaPhoto == null) return;\r\n\r\n                var file = mediaPhoto.File;\r\n                if (file == null) return;\r\n\r\n                _localFile = file;\r\n                _message = message;\r\n            }\r\n            else if (decryptedTuple != null)\r\n            {\r\n                var decryptedMessage = decryptedTuple.Item1 as TLDecryptedMessage;\r\n                if (decryptedMessage == null) return;\r\n\r\n                var mediaPhoto = decryptedMessage.Media as TLDecryptedMessageMediaPhoto;\r\n                if (mediaPhoto == null) return;\r\n\r\n                var file = mediaPhoto.StorageFile;\r\n                if (file == null) return;\r\n\r\n                _localFile = file;\r\n                _decryptedMessage = decryptedMessage;\r\n            }\r\n            else\r\n            {\r\n                return;\r\n            }\r\n            Preview.Source = image;\r\n\r\n            SetCanvasSize();\r\n            ThreadPool.RunAsync(async state =>\r\n            {\r\n                var cached = await GetFacesImage(photoFile, _localFile);\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n\r\n                    var bitmap = new WriteableBitmap(image);\r\n\r\n                    var pixels = _facesImage.Image;\r\n                    //#if DEBUG\r\n                    //if (!cached)\r\n                    //{\r\n                    //    for (int x = 0; x < bitmap.Pixels.Length; x++)\r\n                    //    {\r\n                    //        bitmap.Pixels[x] = pixels[x];\r\n                    //    }\r\n                    //    Preview.Source = bitmap;\r\n                    //}\r\n                    //#endif\r\n\r\n                    var targetSize = GetPaintingSize();\r\n                    _photoFaces.Clear();\r\n                    foreach (var face in _facesImage.Faces)\r\n                    {\r\n                        var photoFace = new PhotoFace(face, bitmap, targetSize, false);\r\n                        _photoFaces.Add(photoFace);\r\n                    }\r\n                });\r\n            },\r\n            WorkItemPriority.Low,\r\n            WorkItemOptions.None);\r\n        }\r\n\r\n        private void SetCanvasSize()\r\n        {\r\n            if (_w != 0 && _h != 0) return;\r\n\r\n            var image = Preview.Source as BitmapImage;\r\n            if (image == null) return;\r\n\r\n            var canvasWidth = 480.0;\r\n            var canvasHeight = 590.0;\r\n\r\n            if (Application.Current.Host.Content.ScaleFactor == 225)\r\n            {\r\n                canvasHeight = 621.0;\r\n            }\r\n\r\n            var imageWidth = image.PixelWidth;\r\n            var imageHeight = image.PixelHeight;\r\n\r\n            if (imageWidth >= imageHeight)\r\n            {\r\n                _w = (int)canvasWidth;\r\n                _h = (int)Math.Round(canvasWidth / imageWidth * imageHeight);\r\n            }\r\n            else\r\n            {\r\n                _w = (int)Math.Round(canvasHeight * imageWidth / imageHeight);\r\n                _h = (int)canvasHeight;\r\n            }\r\n\r\n            Preview.Width = _w;\r\n            Preview.Height = _h;\r\n\r\n            PreviewCanvas.Opacity = 1.0;\r\n            PreviewCanvas.Width = _w;\r\n            PreviewCanvas.Height = _h;\r\n            PreviewCanvas.Clip = new RectangleGeometry { Rect = new Rect(0, 0, _w, _h) };\r\n        }\r\n\r\n        private async Task<bool> GetFacesImage(PhotoFile photoFile, StorageFile file)\r\n        {\r\n            var cached = true;\r\n            if (photoFile.FacesImage == null)\r\n            {\r\n                _opencv = new OpenCVLib();\r\n\r\n                photoFile.FacesImage = await _opencv.ProcessImageAsync(file.Path);\r\n                cached = false;\r\n            }\r\n\r\n            _facesImage = photoFile.FacesImage;\r\n            return cached;\r\n        }\r\n\r\n        private void DrawPoint(Point? point, WriteableBitmap bitmap, Size targetSize, int width, uint color)\r\n        {\r\n            if (point.HasValue)\r\n            {\r\n                var x = (int)(point.Value.X * bitmap.PixelWidth / targetSize.Width);\r\n                var y = (int)(point.Value.Y * bitmap.PixelHeight / targetSize.Height);\r\n                DrawFilledRectangle(bitmap, x - width, y - width, x + width, y + width, (int)color);\r\n            }\r\n        }\r\n\r\n        public static void DrawFilledRectangle(WriteableBitmap bmp, int x1, int y1, int x2, int y2, int color)\r\n        {\r\n            // Use refs for faster access (really important!) speeds up a lot!\r\n            int w = bmp.PixelWidth;\r\n            int h = bmp.PixelHeight;\r\n            int[] pixels = bmp.Pixels;\r\n\r\n            // Check boundaries\r\n            if (x1 < 0) { x1 = 0; }\r\n            if (y1 < 0) { y1 = 0; }\r\n            if (x2 < 0) { x2 = 0; }\r\n            if (y2 < 0) { y2 = 0; }\r\n            if (x1 >= w) { x1 = w - 1; }\r\n            if (y1 >= h) { y1 = h - 1; }\r\n            if (x2 >= w) { x2 = w; }\r\n            if (y2 >= h) { y2 = h; }\r\n\r\n            int i = y1 * w;\r\n            for (int y = y1; y < y2; y++)\r\n            {\r\n                int i2 = i + x1;\r\n                while (i2 < i + x2)\r\n                {\r\n                    pixels[i2++] = color;\r\n                }\r\n                i += w;\r\n            }\r\n        }\r\n\r\n        private async void DoneButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            if (PreviewCanvas.Children.Count == 1)\r\n            {\r\n                RaiseCancel();\r\n                Telegram.Api.Helpers.Execute.ShowDebugMessage(\"Cancel editing\");\r\n                return;\r\n            }\r\n\r\n            AddMessageStickers();\r\n\r\n            ClearSelectedControl();\r\n\r\n            //return;\r\n            DoneButton.IsEnabled = false;\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                var bitmapImage = (BitmapSource)Preview.Source;\r\n                var bitmapImageMax = Math.Max(bitmapImage.PixelHeight, bitmapImage.PixelWidth);\r\n                var max = Math.Max(Preview.ActualHeight, Preview.ActualWidth);\r\n                var min = Math.Min(Constants.DefaultImageSize, bitmapImageMax);\r\n                var scale = min / max;\r\n                var preview = new WriteableBitmap(PreviewCanvas, new ScaleTransform { ScaleX = scale, ScaleY = scale });\r\n\r\n                TLPhotoSize photoSize = null;\r\n                TLDecryptedMessageMediaPhoto decryptedMessageMediaPhoto = null;\r\n                if (_message != null)\r\n                {\r\n                    var messageMediaPhoto = _message.Media as TLMessageMediaPhoto;\r\n                    if (messageMediaPhoto != null)\r\n                    {\r\n                        var photo = messageMediaPhoto.Photo as TLPhoto;\r\n                        if (photo != null)\r\n                        {\r\n                            photoSize = photo.Sizes.FirstOrDefault() as TLPhotoSize;\r\n                            if (photoSize != null)\r\n                            {\r\n                                photoSize.W = new TLInt(preview.PixelWidth);\r\n                                photoSize.H = new TLInt(preview.PixelHeight);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else if (_decryptedMessage != null)\r\n                {\r\n                    decryptedMessageMediaPhoto = _decryptedMessage.Media as TLDecryptedMessageMediaPhoto;\r\n                    if (decryptedMessageMediaPhoto != null)\r\n                    {\r\n                        decryptedMessageMediaPhoto.W = new TLInt(preview.PixelWidth);\r\n                        decryptedMessageMediaPhoto.H = new TLInt(preview.PixelHeight);\r\n                    }\r\n                }\r\n\r\n                RaiseDone(new PreviewEventArgs { Preview = null });\r\n\r\n                Telegram.Api.Helpers.Execute.BeginOnThreadPool(() =>\r\n                {\r\n                    if (_localFile == null) return;\r\n\r\n                    var fileName = _localFile.Name;\r\n                    using (var store = IsolatedStorageFile.GetUserStoreForApplication())\r\n                    {\r\n                        using (var f = store.OpenFile(fileName, FileMode.OpenOrCreate, FileAccess.Write))\r\n                        {\r\n                            var quality = 95;\r\n                            preview.SaveJpeg(f, preview.PixelWidth, preview.PixelHeight, 0, quality);\r\n                            if (decryptedMessageMediaPhoto != null)\r\n                            {\r\n                                decryptedMessageMediaPhoto.Size = new TLInt((int)f.Length);\r\n                            }\r\n                            else if (photoSize != null)\r\n                            {\r\n                                photoSize.Size = new TLInt((int)f.Length);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    Telegram.Api.Helpers.Execute.BeginOnUIThread(async () =>\r\n                    {\r\n                        DefaultPhotoConverter.InvalidateCacheItem(fileName);\r\n\r\n                        DoneButton.IsEnabled = true;\r\n\r\n                        _photoFile.File = _localFile;\r\n                        _photoFile.NotifyOfPropertyChange(() => _photoFile.Object);\r\n\r\n                        //if (_photoFile != null)\r\n                        //{\r\n                        //    var thumbnail = await DialogDetailsViewModel.GetPhotoThumbnailAsync(_localFile, ThumbnailMode.ListView, 99 * 2, ThumbnailOptions.None);\r\n                        //    _photoFile.Thumbnail = thumbnail;\r\n                        //    _photoFile.NotifyOfPropertyChange(() => _photoFile.Self);\r\n                        //}\r\n                    });\r\n                });\r\n            });\r\n        }\r\n\r\n        private void AddMessageStickers()\r\n        {\r\n            if (_photoFile != null)\r\n            {\r\n                var documents = new TLVector<TLDocumentBase>();\r\n                foreach (var child in PreviewCanvas.Children)\r\n                {\r\n                    var sticker = child as Sticker;\r\n                    if (sticker != null)\r\n                    {\r\n                        var document = sticker.StickerItem.Document as TLDocument54;\r\n                        if (document != null)\r\n                        {\r\n                            documents.Add(document);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (documents.Count > 0)\r\n                {\r\n                    var message48 = _photoFile.Message as TLMessage48;\r\n                    if (message48 != null)\r\n                    {\r\n                        message48.Documents = documents;\r\n                        var mediaPhoto = message48.Media as TLMessageMediaPhoto28;\r\n                        if (mediaPhoto != null)\r\n                        {\r\n                            var photo = mediaPhoto.Photo as TLPhoto56;\r\n                            if (photo != null)\r\n                            {\r\n                                photo.HasStickers = true;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Preview_OnImageOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            PreviewCanvas.Opacity = 1.0;\r\n        }\r\n\r\n        private readonly Random _random = new Random();\r\n\r\n        private StickersControl _stickersControl;\r\n\r\n        private void Sticker_OnClick(object sender, RoutedEventArgs args)\r\n        {\r\n            _mode = ExtendedImageEditorMode.Sticker;\r\n\r\n            if (_stickersControl == null)\r\n            {\r\n                _stickersControl = new StickersControl(\r\n                    //#if DEBUG\r\n                    //                    null, null\r\n                    //#else\r\n                    _masks, _stickers\r\n                    //#endif\r\n                    );\r\n                _stickersControl.StickerSelected += (o, e) =>\r\n                {\r\n                    var stickerPosition = CalculateStickerPosition(e.Sticker.Document as TLDocument54);\r\n\r\n#if DEBUG\r\n                    if (stickerPosition == null)\r\n                    {\r\n                        var positionX = _random.Next(100, (int)Preview.ActualWidth - 100);\r\n                        var positionY = _random.Next(100, (int)Preview.ActualHeight - 100);\r\n                        stickerPosition = new StickerPosition(new Point(positionX, positionY), 1.0f, 0.0f);\r\n                    }\r\n#else\r\n                    if (stickerPosition == null)\r\n                    {\r\n                        var positionX = _random.Next(100, (int)Preview.ActualWidth - 100);\r\n                        var positionY = _random.Next(100, (int)Preview.ActualHeight - 100);\r\n                        stickerPosition = new StickerPosition(new Point(positionX, positionY), 1.0f, 0.0f);\r\n                    }\r\n#endif\r\n                    var stickerSize = BaseStickerSize();\r\n                    var targetSize = GetPaintingSize();\r\n                    var transform = new CompositeTransform\r\n                    {\r\n                        Rotation = stickerPosition.Angle,\r\n                        ScaleX = stickerPosition.Scale / targetSize.Width * Preview.ActualWidth,\r\n                        ScaleY = stickerPosition.Scale / targetSize.Width * Preview.ActualWidth,\r\n                        TranslateX = stickerPosition.Position.X / targetSize.Width * Preview.ActualWidth,\r\n                        TranslateY = stickerPosition.Position.Y / targetSize.Height * Preview.ActualHeight\r\n                    };\r\n                    AddSticker(e, stickerSize, transform);\r\n                    _stickersControl.Close();\r\n                };\r\n                StickersPanel.Content = _stickersControl;\r\n            }\r\n            else\r\n            {\r\n                _stickersControl.Open();\r\n            }\r\n        }\r\n\r\n        private StickerPosition CalculateStickerPosition(TLDocument54 document)\r\n        {\r\n            TLMaskCoords maskCoords = null;\r\n\r\n            for (int a = 0; a < document.Attributes.Count; a++)\r\n            {\r\n                var attribute = document.Attributes[a] as TLDocumentAttributeSticker56;\r\n                if (attribute != null)\r\n                {\r\n                    maskCoords = attribute.MaskCoords;\r\n                    break;\r\n                }\r\n            }\r\n\r\n            var defaultPosition = new StickerPosition(CenterPositionForEntity(), 0.75f, 0.0f);\r\n            if (maskCoords == null || _photoFaces == null || _photoFaces.Count == 0)\r\n            {\r\n                return defaultPosition;\r\n            }\r\n\r\n            var anchor = maskCoords.N;\r\n\r\n            var face = GetRandomFaceWithVacantAnchor(anchor.Value, document.Id.Value, maskCoords);\r\n            if (face == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var referencePoint = face.GetPointForAnchor(anchor.Value);\r\n            if (referencePoint.HasValue)\r\n            {\r\n                var referenceWidth = face.GetWidthForAnchor(anchor.Value);\r\n                var angle = face.GetAngle();\r\n                var baseSize = BaseStickerSize();\r\n\r\n                var scale = (float)(referenceWidth / baseSize.Width * maskCoords.Zoom.Value * 1.25);\r\n\r\n                var radAngle = MathHelper.ToRadians(angle);\r\n                var xCompX = (float)(Math.Sin(Math.PI / 2.0f - radAngle) * referenceWidth * maskCoords.X.Value);\r\n                var xCompY = (float)(Math.Cos(Math.PI / 2.0f - radAngle) * referenceWidth * maskCoords.X.Value);\r\n\r\n                var yCompX = (float)(Math.Cos(Math.PI / 2.0f + radAngle) * referenceWidth * maskCoords.Y.Value);\r\n                var yCompY = (float)(Math.Sin(Math.PI / 2.0f + radAngle) * referenceWidth * maskCoords.Y.Value);\r\n\r\n                var x = (float)referencePoint.Value.X + xCompX + yCompX;\r\n                var y = (float)referencePoint.Value.Y + xCompY + yCompY;\r\n\r\n                return new StickerPosition(new Point(x, y), scale, angle);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private Point CenterPositionForEntity()\r\n        {\r\n            var paintingSize = GetPaintingSize();\r\n            return new Point(paintingSize.Width / 2.0f, paintingSize.Height / 2.0f);\r\n        }\r\n\r\n        private Size? paintingSize;\r\n\r\n        private Size GetPaintingSize()\r\n        {\r\n            if (paintingSize != null)\r\n            {\r\n                return paintingSize.Value;\r\n            }\r\n\r\n            var bitmapToEdit = Preview.Source as BitmapSource;\r\n            if (bitmapToEdit == null) return new Size();\r\n\r\n            float width = IsSidewardOrientation() ? bitmapToEdit.PixelHeight : bitmapToEdit.PixelWidth;\r\n            float height = IsSidewardOrientation() ? bitmapToEdit.PixelWidth : bitmapToEdit.PixelHeight;\r\n\r\n            var size = new Size(width, height);\r\n            size.Width = 1280;\r\n            size.Height = (float)Math.Floor(size.Width * height / width);\r\n            if (size.Height > 1280)\r\n            {\r\n                size.Height = 1280;\r\n                size.Width = (float)Math.Floor(size.Height * width / height);\r\n            }\r\n            paintingSize = size;\r\n            return size;\r\n        }\r\n\r\n        private bool IsSidewardOrientation()\r\n        {\r\n            return false;\r\n        }\r\n\r\n        private Size BaseStickerSize()\r\n        {\r\n            var side = (float)Math.Floor(GetPaintingSize().Width * 0.5);\r\n            return new Size(side, side);\r\n        }\r\n\r\n        private PhotoFace GetRandomFaceWithVacantAnchor(int anchor, long documentId, TLMaskCoords maskCoords)\r\n        {\r\n            if (anchor < 0 || anchor > 3 || _photoFaces == null || _photoFaces.Count == 0)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var random = new Random();\r\n            int count = _photoFaces.Count;\r\n            int randomIndex = random.Next(count);\r\n            int remaining = count;\r\n\r\n            PhotoFace selectedFace = null;\r\n            for (int i = randomIndex; remaining > 0; i = (i + 1) % count, remaining--)\r\n            {\r\n                PhotoFace face = _photoFaces[i];\r\n                if (!IsFaceAnchorOccupied(face, anchor, documentId, maskCoords))\r\n                {\r\n                    return face;\r\n                }\r\n            }\r\n\r\n            return selectedFace;\r\n        }\r\n\r\n        private bool IsFaceAnchorOccupied(PhotoFace face, int anchor, long documentId, TLMaskCoords maskCoords)\r\n        {\r\n            var anchorPoint = face.GetPointForAnchor(anchor);\r\n            if (anchorPoint == null)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            var targetSize = GetPaintingSize();\r\n\r\n            anchorPoint = new Point(\r\n                anchorPoint.Value.X / targetSize.Width * Preview.ActualWidth,\r\n                anchorPoint.Value.Y / targetSize.Height * Preview.ActualHeight);\r\n\r\n            float minDistance = face.GetWidthForAnchor(0) * 1.1f;\r\n\r\n            for (int index = 0; index < PreviewCanvas.Children.Count; index++)\r\n            {\r\n                var view = PreviewCanvas.Children[index];\r\n                if (!(view is Sticker))\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                Sticker stickerView = (Sticker)view;\r\n                if (stickerView.GetAnchor() != anchor)\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                Point location = stickerView.GetPosition();\r\n                float distance = (float)Math.Sqrt(Math.Pow(location.X - anchorPoint.Value.X, 2.0) + Math.Pow(location.Y - anchorPoint.Value.Y, 2.0));\r\n                if ((documentId == stickerView.StickerItem.Document.Id.Value || _photoFaces.Count > 1) && distance < minDistance)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void AddSticker(StickerSelectedEventArgs args, Size stickerSize, CompositeTransform transform, bool duplicate = false)\r\n        {\r\n            var sticker = new Sticker();\r\n            sticker.IsHitTestVisible = false;\r\n            sticker.CacheMode = new BitmapCache();\r\n            sticker.Width = stickerSize.Width;\r\n            sticker.Height = stickerSize.Height;\r\n\r\n            var sourceBinding = new System.Windows.Data.Binding(\"Self\")\r\n            {\r\n                Source = args.Sticker,\r\n                Converter = new DefaultPhotoConverter()\r\n            };\r\n            sticker.SetBinding(Media.Sticker.SourceProperty, sourceBinding);\r\n\r\n            var fullSourceBinding = new System.Windows.Data.Binding(\"Document\")\r\n            {\r\n                Source = args.Sticker,\r\n                Converter = new DefaultPhotoConverter()\r\n            };\r\n            sticker.SetBinding(Media.Sticker.FullSourceProperty, fullSourceBinding);\r\n\r\n            sticker.RenderTransformOrigin = new Point(0.5, 0.5);\r\n            DebugTransform(transform);\r\n\r\n            sticker.RenderTransform = transform;\r\n\r\n            sticker.StickerItem = args.Sticker;\r\n\r\n            var deleteMenuItem = new MenuItem { Header = AppResources.Delete };\r\n            deleteMenuItem.Click += (o, ee) =>\r\n            {\r\n                BeginOpacityAnimation(sticker, 0.0, () =>\r\n                {\r\n                    PreviewCanvas.Children.Remove(sticker);\r\n                    UpdateEnabledButtons();\r\n                });\r\n                BeginOpacityAnimation(FlipButton, 0.0);\r\n            };\r\n\r\n            var duplicateMenuItem = new MenuItem { Header = AppResources.Duplicate };\r\n            duplicateMenuItem.Click += (o, ee) =>\r\n            {\r\n                var selectedTextLabel = PreviewCanvas.Children.OfType<Sticker>().FirstOrDefault(x => x.IsSelected);\r\n                if (selectedTextLabel == null) return;\r\n\r\n                var selectedTransform = selectedTextLabel.RenderTransform as CompositeTransform;\r\n                if (selectedTransform == null) return;\r\n\r\n                var newCompositeTransfrom = new CompositeTransform\r\n                {\r\n                    Rotation = selectedTransform.Rotation,\r\n                    ScaleX = selectedTransform.ScaleX,\r\n                    ScaleY = selectedTransform.ScaleY,\r\n                    TranslateX = selectedTransform.TranslateX,\r\n                    TranslateY = selectedTransform.TranslateY\r\n                };\r\n                AddSticker(args, stickerSize, newCompositeTransfrom, true);\r\n            };\r\n\r\n            var contextMenu = new ContextMenu { Style = (Style)Application.Current.Resources[\"W10MContextMenuStyle\"] };\r\n            contextMenu.Items.Add(deleteMenuItem);\r\n            contextMenu.Items.Add(duplicateMenuItem);\r\n\r\n            ContextMenuService.SetContextMenu(sticker, contextMenu);\r\n            PreviewCanvas.Children.Add(sticker);\r\n            sticker.Opacity = 0.0;\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (!duplicate)\r\n                {\r\n                    transform.TranslateX -= sticker.ActualWidth / 2.0;\r\n                    transform.TranslateY -= sticker.ActualHeight / 2.0;\r\n                }\r\n                else\r\n                {\r\n                    BeginTranslateAnimation(sticker, transform.TranslateX + 50.0, transform.TranslateY + 50.0);\r\n                }\r\n                sticker.Opacity = 1.0;\r\n                BringToFront(sticker);\r\n\r\n                UpdateEnabledButtons();\r\n            });\r\n        }\r\n\r\n        private void DebugTransform(CompositeTransform transform)\r\n        {\r\n            return;\r\n            DEBUG.Text = string.Format(\"TranslateX={0}\\nTranslateY={1}\\nRotation={2}\\nScaleX={3}\\nScaleY={4}\\nPreview={5}x{6}\",\r\n                transform.TranslateX, transform.TranslateY, transform.Rotation, transform.ScaleX, transform.ScaleY, Preview.ActualWidth, Preview.ActualHeight);\r\n        }\r\n\r\n        private void Preview_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ClearSelectedControl();\r\n        }\r\n\r\n        private void ClearSelectedControl()\r\n        {\r\n            foreach (var child in PreviewCanvas.Children)\r\n            {\r\n                var childSticker = child as SelectableUserControl;\r\n                if (childSticker != null)\r\n                {\r\n                    childSticker.IsSelected = false;\r\n                }\r\n            }\r\n\r\n            BeginOpacityAnimation(FlipButton, 0.0);\r\n        }\r\n\r\n        private void BeginOpacityAnimation(DependencyObject element, double toOpacity, System.Action callback = null)\r\n        {\r\n            var storyboard = new Storyboard();\r\n            var opacityImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            opacityImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = toOpacity });\r\n            Storyboard.SetTarget(opacityImageAniamtion, element);\r\n            Storyboard.SetTargetProperty(opacityImageAniamtion, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacityImageAniamtion);\r\n            storyboard.Begin();\r\n            storyboard.Completed += (o, e) =>\r\n            {\r\n                callback.SafeInvoke();\r\n            };\r\n        }\r\n\r\n        private void BeginTranslateAnimation(DependencyObject element, double translateXTo, double translateYTo)\r\n        {\r\n            var storyboard = new Storyboard();\r\n            var duration = TimeSpan.FromSeconds(0.55);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n\r\n            var translateXAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateXAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = translateXTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateXAniamtion, element);\r\n            Storyboard.SetTargetProperty(translateXAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(translateXAniamtion);\r\n\r\n            var translateYAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateYAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateYAniamtion, element);\r\n            Storyboard.SetTargetProperty(translateYAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateYAniamtion);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void BringToFront(SelectableUserControl control)\r\n        {\r\n            if (control == null) return;\r\n\r\n            var maxZIndex = 0;\r\n            foreach (var child in PreviewCanvas.Children)\r\n            {\r\n                var childSticker = child as SelectableUserControl;\r\n                if (childSticker != null)\r\n                {\r\n                    childSticker.IsSelected = false;\r\n                }\r\n\r\n                var zIndex = Canvas.GetZIndex(child);\r\n                if (maxZIndex < zIndex)\r\n                {\r\n                    maxZIndex = zIndex;\r\n                }\r\n            }\r\n\r\n            if (Canvas.GetZIndex(control) == 0\r\n                || Canvas.GetZIndex(control) < maxZIndex)\r\n            {\r\n                Canvas.SetZIndex(control, maxZIndex + 1);\r\n            }\r\n\r\n            control.IsSelected = true;\r\n            _selectedControl = control;\r\n\r\n            var textLabel = control as TextLabel;\r\n            if (textLabel != null)\r\n            {\r\n                var position = textLabel.ColorPosition;\r\n                Picker.SetPosition(position);\r\n            }\r\n\r\n            var selectedSticker = control as Sticker;\r\n\r\n            BeginOpacityAnimation(FlipButton, selectedSticker != null ? 1.0 : 0.0);\r\n        }\r\n\r\n        private void CancelButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            RaiseCancel();\r\n        }\r\n\r\n        private void UndoButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            if (PreviewCanvas.Children.Count <= 1) return;\r\n\r\n            var path = PreviewCanvas.Children[PreviewCanvas.Children.Count - 1] as System.Windows.Shapes.Path;\r\n            if (path != null && path.Tag is Guid)\r\n            {\r\n                var tag = (Guid)path.Tag;\r\n                if (tag != null)\r\n                {\r\n                    for (var i = PreviewCanvas.Children.Count - 2; i >= 1; i--)\r\n                    {\r\n                        path = PreviewCanvas.Children[i] as System.Windows.Shapes.Path;\r\n                        if (path != null && path.Tag is Guid && (Guid)path.Tag == tag)\r\n                        {\r\n                            PreviewCanvas.Children.RemoveAt(i);\r\n                        }\r\n                        else\r\n                        {\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            PreviewCanvas.Children.RemoveAt(PreviewCanvas.Children.Count - 1);\r\n\r\n            UpdateEnabledButtons();\r\n        }\r\n\r\n        private void ClearAllButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var result = MessageBox.Show(AppResources.ClearPaintingConfirmation, AppResources.Confirm, MessageBoxButton.OKCancel);\r\n            if (result != MessageBoxResult.OK) return;\r\n\r\n            while (PreviewCanvas.Children.Count > 1)\r\n            {\r\n                PreviewCanvas.Children.RemoveAt(PreviewCanvas.Children.Count - 1);\r\n            }\r\n\r\n            UpdateEnabledButtons();\r\n        }\r\n\r\n        private void FlipButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            var sticker = PreviewCanvas.Children.OfType<Sticker>().FirstOrDefault(x => x.IsSelected);\r\n            if (sticker == null) return;\r\n\r\n            sticker.Flip();\r\n        }\r\n\r\n        private SelectableUserControl _selectedControl;\r\n\r\n        private bool _isPinch;\r\n\r\n        private void PreviewCanvas_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            if (InputGrid.Visibility == Visibility.Visible) return;\r\n\r\n            if (_mode == ExtendedImageEditorMode.Paint)\r\n            {\r\n                StartPainting(e, false);\r\n            }\r\n            else\r\n            {\r\n                _selectedControl = GetNearestControl(e);\r\n                if (_selectedControl != null)\r\n                {\r\n                    _mode = ExtendedImageEditorMode.Sticker;\r\n                    BringToFront(_selectedControl);\r\n                }\r\n                else\r\n                {\r\n                    _mode = ExtendedImageEditorMode.Paint;\r\n                    StartPainting(e, true);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void PreviewCanvas_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            if (_mode == ExtendedImageEditorMode.Paint)\r\n            {\r\n                ContinuePainting(e);\r\n            }\r\n            else\r\n            {\r\n                if (_selectedControl == null) return;\r\n\r\n                var compositeTransform = _selectedControl.RenderTransform as CompositeTransform;\r\n                if (compositeTransform == null) return;\r\n\r\n                var oldIsPinch = _isPinch;\r\n                _isPinch = e.PinchManipulation != null;\r\n\r\n                if (!oldIsPinch && !_isPinch)\r\n                {\r\n                    OnDragDelta(compositeTransform, e);\r\n                }\r\n                else if (!oldIsPinch && _isPinch)\r\n                {\r\n                    OnPinchStarted(compositeTransform, e);\r\n                }\r\n                else if (oldIsPinch && _isPinch)\r\n                {\r\n                    OnPinchDelta(compositeTransform, e);\r\n                }\r\n                else if (oldIsPinch && !_isPinch)\r\n                {\r\n                    OnPinchCompleted(compositeTransform, e);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void OnDragDelta(CompositeTransform transform, ManipulationDeltaEventArgs e)\r\n        {\r\n            // HorizontalChange and VerticalChange from DragDeltaGestureEventArgs are now\r\n            // DeltaManipulation.Translation.X and DeltaManipulation.Translation.Y.\r\n            transform.TranslateX += e.DeltaManipulation.Translation.X;\r\n            transform.TranslateY += e.DeltaManipulation.Translation.Y;\r\n\r\n            DebugTransform(transform);\r\n        }\r\n\r\n        private double _initialAngle;\r\n\r\n        private void OnPinchStarted(CompositeTransform transform, ManipulationDeltaEventArgs e)\r\n        {\r\n            _initialAngle = transform.Rotation;\r\n        }\r\n\r\n        private double GetAngle(PinchContactPoints points)\r\n        {\r\n            var directionVector = new Point(points.SecondaryContact.X - points.PrimaryContact.X, points.SecondaryContact.Y - points.PrimaryContact.Y);\r\n            return GetAngle(directionVector.X, directionVector.Y);\r\n        }\r\n\r\n        private double GetAngle(double x, double y)\r\n        {\r\n            // Note that this function works in xaml coordinates, where positive y is down, and the\r\n            // angle is computed clockwise from the x-axis. \r\n            var angle = Math.Atan2(y, x);\r\n\r\n            // Atan2() returns values between pi and -pi.  We want a value between\r\n            // 0 and 2 pi.  In order to compensate for this, we'll add 2 pi to the angle\r\n            // if it's less than 0, and then multiply by 180 / pi to get the angle\r\n            // in degrees rather than radians, which are the expected units in XAML.\r\n            if (angle < 0)\r\n            {\r\n                angle += 2 * Math.PI;\r\n            }\r\n\r\n            return angle * 180 / Math.PI;\r\n        }\r\n\r\n        private void OnPinchDelta(CompositeTransform transform, ManipulationDeltaEventArgs e)\r\n        {\r\n            // Rather than providing the rotation, the event args now just provide\r\n            // the raw points of contact for the pinch manipulation.\r\n            // However, calculating the rotation from these two points is fairly trivial;\r\n            // the utility method used here illustrates how that's done.\r\n            double angleDelta = GetAngle(e.PinchManipulation.Current) - GetAngle(e.PinchManipulation.Original);\r\n\r\n            transform.Rotation = _initialAngle + angleDelta;\r\n\r\n            // DistanceRatio from PinchGestureEventArgs is now replaced by\r\n            // PinchManipulation.DeltaScale and PinchManipulation.CumulativeScale,\r\n            // which expose the scale from the pinch directly.\r\n            transform.ScaleX *= e.PinchManipulation.DeltaScale;\r\n            transform.ScaleY *= e.PinchManipulation.DeltaScale;\r\n\r\n            var selectedTextLable = _selectedControl as TextLabel;\r\n            if (selectedTextLable != null)\r\n            {\r\n                if (transform.ScaleX > 4.0) transform.ScaleX = 4.0;\r\n                if (transform.ScaleY > 4.0) transform.ScaleY = 4.0;\r\n            }\r\n\r\n            DebugTransform(transform);\r\n        }\r\n\r\n        private void OnPinchCompleted(CompositeTransform transform, ManipulationDeltaEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        private void PreviewCanvas_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            if (_lastPath != null) _lastPath.CacheMode = null;\r\n            e.Handled = true;\r\n\r\n            UpdateEnabledButtons();\r\n            _mode = ExtendedImageEditorMode.Sticker;\r\n        }\r\n\r\n        private SelectableUserControl GetNearestControl(ManipulationStartedEventArgs e)\r\n        {\r\n            var globalPoint = e.ManipulationContainer.TransformToVisual(Application.Current.RootVisual).Transform(e.ManipulationOrigin);\r\n            var selectedControl = FindNearestControlInHostCoordinates(globalPoint);\r\n\r\n            return selectedControl;\r\n        }\r\n\r\n        private SelectableUserControl FindNearestControlInHostCoordinates(Point globalPoint)\r\n        {\r\n            var minDistance = double.MaxValue;\r\n            SelectableUserControl selectedSticker = null;\r\n            foreach (var child in PreviewCanvas.Children)\r\n            {\r\n                var sticker = child as SelectableUserControl;\r\n                if (sticker != null)\r\n                {\r\n                    var center = new Point(sticker.ActualWidth / 2.0, sticker.ActualHeight / 2.0);\r\n                    var globalStickerCenter = sticker.TransformToVisual(Application.Current.RootVisual).Transform(center);\r\n                    var stickerWidth = sticker.ActualWidth * ((CompositeTransform)sticker.RenderTransform).ScaleX;\r\n                    var stickerHeight = sticker.ActualHeight * ((CompositeTransform)sticker.RenderTransform).ScaleY;\r\n\r\n                    if (globalStickerCenter.X - stickerWidth / 2.0 < globalPoint.X\r\n                        && globalPoint.X < globalStickerCenter.X + stickerWidth / 2.0\r\n                        && globalStickerCenter.Y - stickerHeight / 2.0 < globalPoint.Y\r\n                        && globalPoint.Y < globalStickerCenter.Y + stickerHeight / 2.0)\r\n                    {\r\n                        var distance = Math.Sqrt(Math.Pow(globalStickerCenter.X - globalPoint.X, 2.0) + Math.Pow(globalStickerCenter.Y - globalPoint.Y, 2.0));\r\n                        if (distance < minDistance)\r\n                        {\r\n                            minDistance = distance;\r\n                            selectedSticker = sticker;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return selectedSticker;\r\n        }\r\n\r\n        private void PreviewCanvas_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            if (InputGrid.Visibility == Visibility.Visible) return;\r\n            if (_mode == ExtendedImageEditorMode.Paint) return;\r\n\r\n            var globalPoint = e.GetPosition(Application.Current.RootVisual);\r\n            var selectedSticker = FindNearestControlInHostCoordinates(globalPoint);\r\n\r\n            BringToFront(selectedSticker);\r\n        }\r\n\r\n        private void PreviewCanvas_OnHold(object sender, GestureEventArgs e)\r\n        {\r\n            var globalPoint = e.GetPosition(Application.Current.RootVisual);\r\n            var selectedSticker = FindNearestControlInHostCoordinates(globalPoint);\r\n\r\n            if (selectedSticker == null) return;\r\n\r\n            BringToFront(selectedSticker);\r\n\r\n            var contextMenu = ContextMenuService.GetContextMenu(selectedSticker);\r\n            if (contextMenu != null) contextMenu.IsOpen = true;\r\n        }\r\n\r\n        private void Text_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            _mode = ExtendedImageEditorMode.Text;\r\n\r\n            ClearSelectedControl();\r\n            Input.Text = string.Empty;\r\n            InputGrid.Visibility = Visibility.Visible;\r\n            Canvas.SetLeft(Input, (PreviewCanvas.ActualWidth - 300) / 2.0);\r\n            Canvas.SetTop(Input, (PreviewCanvas.ActualHeight - 100) / 2.0);\r\n            Input.Focus();\r\n        }\r\n\r\n        private void Input_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            AddOrEditTextLabel(Input.Text);\r\n        }\r\n\r\n        private void AddOrEditTextLabel(string text)\r\n        {\r\n            var selectedText = PreviewCanvas.Children.FirstOrDefault(x => x is TextLabel && ((TextLabel)x).IsSelected) as TextLabel;\r\n            if (selectedText != null)\r\n            {\r\n                if (string.IsNullOrEmpty(text))\r\n                {\r\n                    PreviewCanvas.Children.Remove(selectedText);\r\n                    InputGrid.Visibility = Visibility.Collapsed;\r\n                }\r\n                else\r\n                {\r\n                    selectedText.Text = text;\r\n                    InputGrid.Visibility = Visibility.Collapsed;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                var transform = new CompositeTransform\r\n                {\r\n                    Rotation = 0,\r\n                    ScaleX = 1.0,\r\n                    ScaleY = 1.0,\r\n                    TranslateX = PreviewCanvas.ActualWidth / 2.0,\r\n                    TranslateY = PreviewCanvas.ActualHeight / 2.0\r\n                };\r\n                AddTextLabel(text, transform, 1.0, new SolidColorBrush(Colors.White));\r\n            }\r\n        }\r\n\r\n        private void AddTextLabel(string text, CompositeTransform transform, double colorPosition, SolidColorBrush foreground, bool duplicate = false)\r\n        {\r\n            if (string.IsNullOrEmpty(text))\r\n            {\r\n                InputGrid.Visibility = Visibility.Collapsed;\r\n                return;\r\n            }\r\n\r\n            var textLabel = new TextLabel();\r\n            textLabel.MaxWidth = PreviewCanvas.ActualWidth;\r\n            textLabel.Text = text;\r\n            textLabel.IsHitTestVisible = false;\r\n            textLabel.CacheMode = new BitmapCache { RenderAtScale = 1.5 };\r\n            textLabel.RenderTransformOrigin = new Point(0.5, 0.5);\r\n            textLabel.ColorPosition = colorPosition;\r\n            textLabel.SetForeground(foreground);\r\n            DebugTransform(transform);\r\n\r\n            textLabel.RenderTransform = transform;\r\n\r\n            var editMenuItem = new MenuItem { Header = AppResources.Edit };\r\n            editMenuItem.Click += (o, ee) => { EditTextLable(textLabel); };\r\n\r\n            var deleteMenuItem = new MenuItem { Header = AppResources.Delete };\r\n            deleteMenuItem.Click += (o, ee) =>\r\n            {\r\n                BeginOpacityAnimation(textLabel, 0.0, () =>\r\n                {\r\n                    PreviewCanvas.Children.Remove(textLabel);\r\n\r\n                    UpdateEnabledButtons();\r\n                });\r\n            };\r\n\r\n            var duplicateMenuItem = new MenuItem { Header = AppResources.Duplicate };\r\n            duplicateMenuItem.Click += (o, ee) =>\r\n            {\r\n                var selectedTextLabel = PreviewCanvas.Children.OfType<TextLabel>().FirstOrDefault(x => x.IsSelected);\r\n                if (selectedTextLabel == null) return;\r\n\r\n                var selectedTransform = selectedTextLabel.RenderTransform as CompositeTransform;\r\n                if (selectedTransform == null) return;\r\n\r\n                var newCompositeTransfrom = new CompositeTransform\r\n                {\r\n                    Rotation = selectedTransform.Rotation,\r\n                    ScaleX = selectedTransform.ScaleX,\r\n                    ScaleY = selectedTransform.ScaleY,\r\n                    TranslateX = selectedTransform.TranslateX,  // + 50.0,\r\n                    TranslateY = selectedTransform.TranslateY   // + 50.0\r\n                };\r\n\r\n                AddTextLabel(selectedTextLabel.Text, newCompositeTransfrom, selectedTextLabel.ColorPosition, selectedTextLabel.GetForeground(), true);\r\n\r\n            };\r\n\r\n            var contextMenu = new ContextMenu { Style = (Style)Application.Current.Resources[\"W10MContextMenuStyle\"] };\r\n            contextMenu.Items.Add(deleteMenuItem);\r\n            contextMenu.Items.Add(editMenuItem);\r\n            contextMenu.Items.Add(duplicateMenuItem);\r\n\r\n            ContextMenuService.SetContextMenu(textLabel, contextMenu);\r\n\r\n            InputGrid.Visibility = Visibility.Collapsed;\r\n\r\n            PreviewCanvas.Children.Add(textLabel);\r\n            textLabel.Opacity = 0.0;\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n            {\r\n                if (!duplicate)\r\n                {\r\n                    transform.TranslateX -= textLabel.ActualWidth / 2.0;\r\n                    transform.TranslateY -= textLabel.ActualHeight / 2.0;\r\n                }\r\n                else\r\n                {\r\n                    BeginTranslateAnimation(textLabel, transform.TranslateX + 50.0, transform.TranslateY + 50.0);\r\n                }\r\n                textLabel.Opacity = 1.0;\r\n                BringToFront(textLabel);\r\n\r\n                UpdateEnabledButtons();\r\n            });\r\n        }\r\n\r\n        private void EditTextLable(TextLabel textLabel)\r\n        {\r\n            Input.Text = textLabel.Text;\r\n            InputGrid.Visibility = Visibility.Visible;\r\n            Input.SelectionStart = Input.Text.Length;\r\n            Input.SelectionLength = 0;\r\n            Input.Focus();\r\n        }\r\n\r\n        private void ColorPicker_OnSelectedColorChanged(object sender, ColorEventArgs e)\r\n        {\r\n            var textLabel = _selectedControl as TextLabel;\r\n            if (textLabel == null) return;\r\n\r\n            textLabel.SetForeground(new SolidColorBrush(e.Color));\r\n            textLabel.ColorPosition = e.Position;\r\n        }\r\n\r\n        private void PaintButton_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            _mode = ExtendedImageEditorMode.Paint;\r\n            ClearSelectedControl();\r\n        }\r\n\r\n        #region Painting\r\n\r\n        private Point _startPoint;\r\n\r\n        private Point _pathStartPoint;\r\n\r\n        private List<Point> _points;\r\n\r\n        private System.Windows.Shapes.Path _lastPath;\r\n\r\n        private int _pointsCount;\r\n\r\n        private Brush _brush;\r\n\r\n        private Guid _tag;\r\n\r\n        private int _strokeThickness;\r\n\r\n        private void StartPainting(ManipulationStartedEventArgs e, bool clearSelectedControl)\r\n        {\r\n            _tag = Guid.NewGuid();\r\n\r\n            if (_lastPath != null) _lastPath.CacheMode = null;\r\n            _lastPath = null;\r\n            _startPoint = e.ManipulationOrigin;\r\n            _pointsCount = 0;\r\n            _points = new List<Point>();\r\n\r\n            _strokeThickness = (int)(10.0 / 0.35 * Picker.CurrentScale);\r\n            _brush = new SolidColorBrush(Picker.SelectedColor);\r\n            _pathStartPoint = e.ManipulationOrigin;\r\n\r\n            if (clearSelectedControl)\r\n            {\r\n                ClearSelectedControl();\r\n            }\r\n            else\r\n            {\r\n                var segments = new PathSegmentCollection { new LineSegment { Point = new Point(_pathStartPoint.X, _pathStartPoint.Y) } };\r\n                _lastPath = GetPath(_strokeThickness, _brush, _pathStartPoint, segments);\r\n\r\n                PreviewCanvas.Children.Add(_lastPath);\r\n            }\r\n        }\r\n\r\n        private void ContinuePainting(ManipulationDeltaEventArgs e)\r\n        {\r\n            _pointsCount++;\r\n\r\n            if (_pointsCount == 100)\r\n            {\r\n                _pointsCount = 0;\r\n                _points = _points.Skip(_points.Count - 20).Take(20).ToList();\r\n                if (_lastPath != null) _lastPath.CacheMode = null;\r\n                _lastPath = null;\r\n                _pathStartPoint = _points[0];\r\n            }\r\n\r\n            var point = new Point(_startPoint.X + e.CumulativeManipulation.Translation.X,\r\n                _startPoint.Y + e.CumulativeManipulation.Translation.Y);\r\n            _points.Add(point);\r\n\r\n            if (_lastPath != null) PreviewCanvas.Children.Remove(_lastPath);\r\n\r\n            var segments = GetSegments(_points);\r\n            _lastPath = GetPath(_strokeThickness, _brush, _pathStartPoint, segments);\r\n\r\n            PreviewCanvas.Children.Add(_lastPath);\r\n        }\r\n\r\n        private System.Windows.Shapes.Path GetPath(double strokeThickness, Brush brush, Point startPoint, PathSegmentCollection segments)\r\n        {\r\n            var path = new System.Windows.Shapes.Path\r\n            {\r\n                Tag = _tag,\r\n                CacheMode = new BitmapCache(),\r\n                StrokeThickness = strokeThickness,\r\n                Stroke = brush,\r\n                StrokeStartLineCap = PenLineCap.Round,\r\n                StrokeEndLineCap = PenLineCap.Round,\r\n                StrokeDashCap = PenLineCap.Round,\r\n                StrokeLineJoin = PenLineJoin.Round,\r\n                Data = new PathGeometry\r\n                {\r\n                    Figures =\r\n                        new PathFigureCollection\r\n                        {\r\n                            new PathFigure {StartPoint = startPoint, Segments = segments, IsClosed = false}\r\n                        }\r\n                }\r\n            };\r\n\r\n            return path;\r\n        }\r\n\r\n        public static PathSegmentCollection GetSegments(IReadOnlyList<Point> controlPoints)\r\n        {\r\n            if (controlPoints.Count == 0)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            var collection = new PathSegmentCollection();\r\n\r\n            double beginPointX = controlPoints[0].X;\r\n            double beginPointY = controlPoints[0].Y;\r\n\r\n            if (controlPoints.Count <= 3)\r\n            {\r\n                var lineSegment = new LineSegment\r\n                {\r\n                    Point = new Point(beginPointX + 1, beginPointY)\r\n                };\r\n\r\n                collection.Add(lineSegment);\r\n            }\r\n            else\r\n            {\r\n                for (int i = 1; i < controlPoints.Count; i++)\r\n                {\r\n                    double prePointX = controlPoints[i - 1].X;\r\n                    double prePointY = controlPoints[i - 1].Y;\r\n                    double currentPointX = controlPoints[i].X;\r\n                    double currentPointY = controlPoints[i].Y;\r\n\r\n                    double s = Math.Sqrt(Math.Pow(currentPointX - prePointX, 2) + Math.Pow(currentPointY - prePointY, 2));\r\n\r\n                    if (s < 2)\r\n                    {\r\n                        var lineSegment = new LineSegment\r\n                        {\r\n                            Point = new Point(currentPointX, currentPointY)\r\n                        };\r\n\r\n                        collection.Add(lineSegment);\r\n                    }\r\n                    else\r\n                    {\r\n                        var startPoint = new Point(prePointX, prePointY);\r\n                        var stopPoint = i == controlPoints.Count - 1\r\n                            ? new Point((currentPointX), (currentPointY))\r\n                            : new Point((prePointX + currentPointX) / 2.0f, (prePointY + currentPointY) / 2.0f);\r\n\r\n                        var bezierSegment = new PolyQuadraticBezierSegment\r\n                        {\r\n                            Points = new PointCollection\r\n                            {\r\n                                startPoint,\r\n                                stopPoint\r\n                            }\r\n                        };\r\n\r\n                        collection.Add(bezierSegment);\r\n                    }\r\n                }\r\n            }\r\n\r\n            return collection;\r\n        }\r\n        #endregion\r\n\r\n\r\n        public void BeginCloseStoryboard(Action completeAction)\r\n        {\r\n            if (_lastStoryboard != null)\r\n            {\r\n                _lastStoryboard.Pause();\r\n            }\r\n\r\n            var duration = TimeSpan.FromSeconds(0.4);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = translateYTo, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            storyboard.Completed += (o, args) =>\r\n            {\r\n                completeAction.SafeInvoke();\r\n            };\r\n            Deployment.Current.Dispatcher.BeginInvoke(() => storyboard.Begin());\r\n        }\r\n\r\n        private Storyboard _lastStoryboard;\r\n\r\n        public void BeginOpenStoryboard(Action completeAction)\r\n        {\r\n            DoneButton.IsEnabled = true;\r\n\r\n            var transparentBlack = Colors.Black;\r\n            transparentBlack.A = 0;\r\n\r\n            LayoutRoot.RenderTransform = new CompositeTransform();\r\n\r\n            var duration = TimeSpan.FromSeconds(0.4);\r\n            var easingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 5.0 };\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var rootFrameHeight = ((PhoneApplicationFrame)Application.Current.RootVisual).ActualHeight;\r\n            var translateYTo = rootFrameHeight;\r\n\r\n            ((CompositeTransform)LayoutRoot.RenderTransform).TranslateY = translateYTo;\r\n            var translateImageAniamtion = new DoubleAnimationUsingKeyFrames();\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = translateYTo });\r\n            translateImageAniamtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = duration, Value = 0.0, EasingFunction = easingFunction });\r\n            Storyboard.SetTarget(translateImageAniamtion, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateImageAniamtion, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateImageAniamtion);\r\n\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                _lastStoryboard = null;\r\n                completeAction.SafeInvoke();\r\n            };\r\n\r\n            _lastStoryboard = storyboard;\r\n\r\n            if (ActualWidth == 0.0 && ActualHeight == 0.0)\r\n            {\r\n\r\n            }\r\n            else\r\n            {\r\n                Deployment.Current.Dispatcher.BeginInvoke(storyboard.Begin);\r\n            }\r\n        }\r\n\r\n        public void Handle(DownloadableItem item)\r\n        {\r\n            var document = item.Owner as TLDocument54;\r\n            if (document != null)\r\n            {\r\n                Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>\r\n                {\r\n                    var sprites = PreviewCanvas.Children;\r\n                    if (sprites != null)\r\n                    {\r\n                        for (var i = 0; i < sprites.Count; i++)\r\n                        {\r\n                            var stickerSprite = sprites[i] as Sticker;\r\n                            if (stickerSprite != null && stickerSprite.StickerItem.Document == document)\r\n                            {\r\n                                stickerSprite.StickerItem.NotifyOfPropertyChange(() => stickerSprite.StickerItem.Document);\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        public void UpdateRecentButtonsVisibility()\r\n        {\r\n            var stickersControl = StickersPanel.Content as StickersControl;\r\n            if (stickersControl != null)\r\n            {\r\n                stickersControl.UpdateRecentButtonsVisibility();\r\n            }\r\n        }\r\n\r\n        public void ClosePreview()\r\n        {\r\n            if (_stickersControl != null)\r\n            {\r\n                _stickersControl.ClosePreview();\r\n            }\r\n        }\r\n    }\r\n\r\n    public class PreviewEventArgs : System.EventArgs\r\n    {\r\n        public WriteableBitmap Preview { get; set; }\r\n    }\r\n\r\n    internal enum ExtendedImageEditorMode\r\n    {\r\n        Sticker,\r\n        Paint,\r\n        Text\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/MapUserTileControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Media.MapUserTileControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\" />\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/MapUserTileControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Microsoft.Phone.Shell;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class MapUserTileControl : UserControl\r\n    {\r\n        public MapUserTileControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/PhotoFace.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows.Media.Imaging;\r\nusing Windows.Foundation;\r\nusing Microsoft.Xna.Framework;\r\nusing OpenCVComponent;\r\nusing Point = System.Windows.Point;\r\nusing Size = System.Windows.Size;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public class PhotoFace\r\n    {\r\n        public float Width { get; protected set; }\r\n\r\n        public float Angle { get; protected set; }\r\n\r\n        public Point? ForeheadPoint { get; protected set; }\r\n\r\n        public Point? LeftEyePoint { get; protected set; }\r\n\r\n        public Point? RightEyePoint { get; protected set; }\r\n\r\n        public Point? EyesCenterPoint { get; protected set; }\r\n\r\n        public float EyesDistance { get; protected set; }\r\n\r\n        public Point? MouthPoint { get; protected set; }\r\n\r\n        public Point? ChinPoint { get; protected set; }\r\n\r\n        public PhotoFace(Face face, BitmapSource sourceBitmap, Size targetSize, bool sideward)\r\n        {\r\n            Point? leftMouthPoint;\r\n            Point? rightMouthPoint;\r\n\r\n            GetPoints(out leftMouthPoint, out rightMouthPoint, face, sourceBitmap, targetSize, sideward);\r\n\r\n            if (LeftEyePoint != null && RightEyePoint != null)\r\n            {\r\n                EyesCenterPoint = new Point(0.5f * LeftEyePoint.Value.X + 0.5f * RightEyePoint.Value.X, 0.5f * LeftEyePoint.Value.Y + 0.5f * RightEyePoint.Value.Y);\r\n                EyesDistance = (float)Math.Sqrt(Math.Pow(RightEyePoint.Value.X - LeftEyePoint.Value.X, 2.0) + Math.Pow(RightEyePoint.Value.Y - LeftEyePoint.Value.Y, 2.0));\r\n                Angle = MathHelper.ToDegrees((float)(Math.Atan2(RightEyePoint.Value.Y - LeftEyePoint.Value.Y, RightEyePoint.Value.X - LeftEyePoint.Value.X)));\r\n\r\n                Width = EyesDistance * 2.35f;\r\n\r\n                var foreheadHeight = 0.7f * EyesDistance;\r\n                var upAngle = MathHelper.ToRadians(Angle - 90.0f);\r\n                ForeheadPoint = new Point(EyesCenterPoint.Value.X + foreheadHeight * (float)Math.Cos(upAngle), EyesCenterPoint.Value.Y + foreheadHeight * (float)Math.Sin(upAngle));\r\n            }\r\n\r\n            if (leftMouthPoint != null && rightMouthPoint != null)\r\n            {\r\n                MouthPoint = new Point(0.5f * leftMouthPoint.Value.X + 0.5f * rightMouthPoint.Value.X, 0.5f * leftMouthPoint.Value.Y + 0.5f * rightMouthPoint.Value.Y);\r\n\r\n                var chinDepth = 0.6f * EyesDistance;\r\n                var downAngle = MathHelper.ToRadians(Angle + 90.0f);\r\n                ChinPoint = new Point(MouthPoint.Value.X + chinDepth * (float)Math.Cos(downAngle), MouthPoint.Value.Y + chinDepth * (float)Math.Sin(downAngle));\r\n            }\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return string.Format(\"Foregead={0}\\nLeftEye={1}\\nRightEye={2}\\nMouth={3}\\nChin={4}\", ForeheadPoint, LeftEyePoint, RightEyePoint, MouthPoint, ChinPoint);\r\n        }\r\n\r\n        private void GetPoints(out Point? leftMouthPoint, out Point? rightMouthPoint, Face face, BitmapSource sourceBitmap, Size targetSize, bool sideward)\r\n        {\r\n            Rect? leftEye = null;\r\n            Rect? rightEye = null;\r\n            foreach (var eye in face.Eye)\r\n            {\r\n                if (leftEye == null || leftEye.Value.X > eye.X)\r\n                {\r\n                    leftEye = eye;\r\n                }\r\n                if (rightEye == null || rightEye.Value.X < eye.X)\r\n                {\r\n                    rightEye = eye;\r\n                }\r\n            }\r\n\r\n            // two eyes\r\n            if (leftEye != rightEye)\r\n            {\r\n                LeftEyePoint = TransposePoint(new Point(leftEye.Value.X + leftEye.Value.Width / 2.0, leftEye.Value.Y + leftEye.Value.Height / 2.0), sourceBitmap, targetSize, sideward);\r\n                RightEyePoint = TransposePoint(new Point(rightEye.Value.X + rightEye.Value.Width / 2.0, rightEye.Value.Y + rightEye.Value.Height / 2.0), sourceBitmap, targetSize, sideward);\r\n            }\r\n            // only one eye was detected\r\n            else if (leftEye != null)\r\n            {\r\n                if (leftEye.Value.X < face.Position.X + face.Position.Width/2.0)\r\n                {\r\n                    var displX = leftEye.Value.X - face.Position.X;\r\n                    rightEye = new Rect(face.Position.X + face.Position.Width - leftEye.Value.Width - displX, leftEye.Value.Y, leftEye.Value.Width, leftEye.Value.Height);\r\n                }\r\n                else\r\n                {\r\n                    rightEye = leftEye;\r\n                    var displX = face.Position.X + face.Position.Width - rightEye.Value.X - rightEye.Value.Width;\r\n                    leftEye = new Rect(face.Position.X + displX, rightEye.Value.Y, rightEye.Value.Width, rightEye.Value.Height);\r\n                }\r\n\r\n                LeftEyePoint = TransposePoint(new Point(leftEye.Value.X + leftEye.Value.Width / 2.0, leftEye.Value.Y + leftEye.Value.Height / 2.0), sourceBitmap, targetSize, sideward);\r\n                RightEyePoint = TransposePoint(new Point(rightEye.Value.X + rightEye.Value.Width / 2.0, rightEye.Value.Y + rightEye.Value.Height / 2.0), sourceBitmap, targetSize, sideward);\r\n            }\r\n            // no eyes\r\n            else\r\n            {\r\n                LeftEyePoint = null;\r\n                RightEyePoint = null;\r\n            }\r\n\r\n            Windows.Foundation.Rect? leftMouth = null;\r\n            Windows.Foundation.Rect? rightMouth = null;\r\n            foreach (var mouth in face.Mouth)\r\n            {\r\n                if (leftMouth == null || leftMouth.Value.X > mouth.X)\r\n                {\r\n                    leftMouth = mouth;\r\n                }\r\n                if (rightMouth == null || rightMouth.Value.X < mouth.X)\r\n                {\r\n                    rightMouth = mouth;\r\n                }\r\n            }\r\n\r\n            if (leftMouth != null)\r\n            {\r\n                leftMouthPoint = TransposePoint(new Point(leftMouth.Value.X, leftMouth.Value.Y + leftMouth.Value.Height / 4.0), sourceBitmap, targetSize, sideward);\r\n                rightMouthPoint = TransposePoint(new Point(rightMouth.Value.X + rightMouth.Value.Width, rightMouth.Value.Y + rightMouth.Value.Height / 4.0), sourceBitmap, targetSize, sideward);\r\n            }\r\n            else\r\n            {\r\n                leftMouthPoint = null;\r\n                rightMouthPoint = null;\r\n            }\r\n        }\r\n\r\n        public bool IsSufficient()\r\n        {\r\n            return EyesCenterPoint != null;\r\n        }\r\n\r\n        private Point TransposePoint(Point point, BitmapSource sourceBitmap, Size targetSize, bool sideward)\r\n        {\r\n            float bitmapW = sideward ? sourceBitmap.PixelHeight : sourceBitmap.PixelWidth;\r\n            float bitmapH = sideward ? sourceBitmap.PixelWidth : sourceBitmap.PixelHeight;\r\n\r\n            return new Point(targetSize.Width / bitmapW * point.X, targetSize.Height / bitmapH * point.Y);\r\n        }\r\n\r\n        public Point? GetPointForAnchor(int anchor)\r\n        {\r\n            switch (anchor)\r\n            {\r\n                case 0:\r\n                    {\r\n                        return ForeheadPoint;\r\n                    }\r\n\r\n                case 1:\r\n                    {\r\n                        return EyesCenterPoint;\r\n                    }\r\n\r\n                case 2:\r\n                    {\r\n                        return MouthPoint;\r\n                    }\r\n\r\n                case 3:\r\n                    {\r\n                        return ChinPoint;\r\n                    }\r\n\r\n                default:\r\n                    {\r\n                        return null;\r\n                    }\r\n            }\r\n        }\r\n\r\n        public float GetWidthForAnchor(int anchor)\r\n        {\r\n            if (anchor == 1)\r\n                return EyesDistance;\r\n\r\n            return Width;\r\n        }\r\n\r\n        public float GetAngle()\r\n        {\r\n            return Angle;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/StaticMapControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Media.StaticMapControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\">\r\n        <Image x:Name=\"Map1\" Stretch=\"UniformToFill\"/>\r\n        <Image x:Name=\"Map2\" Stretch=\"UniformToFill\"/>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/StaticMapControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing TelegramClient.Converters;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class StaticMapControl\r\n    {\r\n        public event EventHandler Failed;\r\n\r\n        protected virtual void RaiseFailed()\r\n        {\r\n            var handler = Failed;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        public event EventHandler Opened;\r\n\r\n        protected virtual void RaiseOpened()\r\n        {\r\n            var handler = Opened;\r\n            if (handler != null) handler(this, System.EventArgs.Empty);\r\n        }\r\n\r\n        private object _prevDataContext;\r\n\r\n        public static readonly DependencyProperty ImageUriProperty = DependencyProperty.Register(\r\n            \"ImageUri\", typeof(string), typeof(StaticMapControl), new PropertyMetadata(default(string), OnUriChanged));\r\n\r\n        private static void OnUriChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var mapControl = d as StaticMapControl;\r\n            if (mapControl != null)\r\n            {\r\n                if (mapControl._prevDataContext == null)\r\n                {\r\n                    var bitmapImage = new BitmapImage(new Uri(e.NewValue as string));\r\n                    mapControl.Map2.Source = bitmapImage;\r\n                    mapControl._prevDataContext = mapControl.DataContext;\r\n                }\r\n                else if (mapControl._prevDataContext == mapControl.DataContext)\r\n                {\r\n                    var wrapper = new BitmapImageWrapper((string) e.NewValue, new BitmapImage(new Uri((string) e.NewValue)));\r\n                    wrapper.Subscribe(\r\n                        bi =>\r\n                        {\r\n                            var source = mapControl.Map1.Source;\r\n                            mapControl.Map1.Source = mapControl.Map2.Source;\r\n                            mapControl.Map2.Source = source;\r\n\r\n                            StartFadeInAnimation(mapControl.Map2);\r\n\r\n                            mapControl.RaiseOpened();\r\n                        },\r\n                        bi =>\r\n                        {\r\n                            mapControl.RaiseFailed();\r\n                        });\r\n\r\n                    mapControl.Map1.Source = wrapper.Image;\r\n                }\r\n                else\r\n                {\r\n                    mapControl._prevDataContext = mapControl.DataContext;\r\n\r\n                    var wrapper = new BitmapImageWrapper((string) e.NewValue, new BitmapImage(new Uri((string) e.NewValue)));\r\n                    wrapper.Subscribe(\r\n                        bi =>\r\n                        {\r\n                            var source = mapControl.Map1.Source;\r\n                            mapControl.Map1.Source = mapControl.Map2.Source;\r\n                            mapControl.Map2.Source = source;\r\n\r\n                            mapControl.RaiseOpened();\r\n                        },\r\n                        bi =>\r\n                        {\r\n                            mapControl.RaiseFailed();\r\n                        });\r\n                    mapControl.Map1.Source = wrapper.Image;\r\n                }\r\n            }\r\n        }\r\n\r\n        public string ImageUri\r\n        {\r\n            get { return (string)GetValue(ImageUriProperty); }\r\n            set { SetValue(ImageUriProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(\r\n            \"Source\", typeof(ImageSource), typeof(StaticMapControl), new PropertyMetadata(default(ImageSource), OnImageSourceChanged));\r\n\r\n        private static void StartFadeInAnimation(UIElement obj)\r\n        {\r\n            var storyboard = new Storyboard();\r\n            var opacity1Animation = new DoubleAnimationUsingKeyFrames();\r\n            opacity1Animation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 0.0 });\r\n            opacity1Animation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 1.0 });\r\n            Storyboard.SetTarget(opacity1Animation, obj);\r\n            Storyboard.SetTargetProperty(opacity1Animation, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(opacity1Animation);\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private static void OnImageSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var mapControl = d as StaticMapControl;\r\n            if (mapControl != null)\r\n            {\r\n                var newSource = e.NewValue as ImageSource;\r\n\r\n                if (mapControl._prevDataContext == null)\r\n                {\r\n                    mapControl._prevDataContext = mapControl.DataContext;\r\n\r\n                    mapControl.Map1.Source = null;\r\n                    mapControl.Map2.Source = newSource;\r\n\r\n                    StartFadeInAnimation(mapControl.Map2);\r\n                }\r\n                else if (mapControl._prevDataContext == mapControl.DataContext)\r\n                {\r\n                    mapControl.Map1.Source = mapControl.Map2.Source;\r\n                    mapControl.Map2.Source = newSource;\r\n\r\n                    StartFadeInAnimation(mapControl.Map2);\r\n\r\n                    mapControl.RaiseOpened();\r\n                }\r\n                else\r\n                {\r\n                    mapControl._prevDataContext = mapControl.DataContext;\r\n\r\n                    mapControl.Map1.Source = null;\r\n                    mapControl.Map2.Source = newSource;\r\n\r\n                    mapControl.Map2.Opacity = 1.0;\r\n\r\n                    mapControl.RaiseOpened();\r\n                }\r\n            }\r\n        }\r\n\r\n        public ImageSource Source\r\n        {\r\n            get { return (ImageSource) GetValue(SourceProperty); }\r\n            set { SetValue(SourceProperty, value); }\r\n        }\r\n\r\n        public StaticMapControl()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/Sticker.xaml",
    "content": "﻿<media:SelectableUserControl x:Class=\"TelegramClient.Views.Media.Sticker\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:media=\"clr-namespace:TelegramClient.Views.Media\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"12*\"/>\r\n                <RowDefinition Height=\"76*\"/>\r\n                <RowDefinition Height=\"12*\"/>\r\n            </Grid.RowDefinitions>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"12*\"/>\r\n                <ColumnDefinition Width=\"76*\"/>\r\n                <ColumnDefinition Width=\"12*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            \r\n            <Grid.RenderTransform>\r\n                <TransformGroup>\r\n                    <RotateTransform x:Name=\"RotateTransform\"/>\r\n                </TransformGroup>\r\n            </Grid.RenderTransform>\r\n            <Grid Grid.Column=\"1\" Grid.Row=\"1\" IsHitTestVisible=\"False\" RenderTransformOrigin=\"0.5, 0.5\">\r\n                <Grid.RenderTransform>\r\n                    <ScaleTransform x:Name=\"ImageScaleTransform\"/>\r\n                </Grid.RenderTransform>\r\n                <Image x:Name=\"Image\" Stretch=\"Uniform\"/>\r\n                <Image x:Name=\"FullImage\" Stretch=\"Uniform\"/>\r\n            </Grid>\r\n            <!--<Border IsHitTestVisible=\"False\" Width=\"6\" Height=\"6\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Background=\"{StaticResource PhoneAccentBrush}\" CornerRadius=\"3\"/>-->\r\n            <Ellipse x:Name=\"Border\" Grid.ColumnSpan=\"3\" Grid.RowSpan=\"3\" IsHitTestVisible=\"False\" StrokeThickness=\"3\" Stroke=\"White\" StrokeDashArray=\"15, 15\"/>\r\n            <Border Grid.ColumnSpan=\"3\" Grid.RowSpan=\"3\" Visibility=\"Collapsed\" IsHitTestVisible=\"True\" x:Name=\"LeftRotatePoint\" \r\n                    ManipulationStarted=\"LeftRotatePoint_OnManipulationStarted\"\r\n                    ManipulationDelta=\"LeftRotatePoint_OnManipulationDelta\" \r\n                    ManipulationCompleted=\"LeftRotatePoint_OnManipulationCompleted\"\r\n                    CornerRadius=\"20\" Background=\"Transparent\" Width=\"40\" Height=\"40\" Margin=\"-20,0\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\">\r\n                <Border IsHitTestVisible=\"False\" CornerRadius=\"5\" BorderBrush=\"White\" BorderThickness=\"1\" Background=\"{StaticResource PhoneAccentBrush}\" Width=\"10\" Height=\"10\"/>\r\n            </Border>\r\n            <Border Grid.ColumnSpan=\"3\" Grid.RowSpan=\"3\" Visibility=\"Collapsed\" IsHitTestVisible=\"True\" x:Name=\"RightRotatePoint\" \r\n                    ManipulationStarted=\"RightRotatePoint_OnManipulationStarted\"\r\n                    ManipulationDelta=\"RightRotatePoint_OnManipulationDelta\"\r\n                    ManipulationCompleted=\"RightRotatePoint_OnManipulationCompleted\"\r\n                    CornerRadius=\"20\" Background=\"Transparent\" Width=\"40\" Height=\"40\" Margin=\"-20,0\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\">\r\n                <Border IsHitTestVisible=\"False\" CornerRadius=\"5\" Background=\"{StaticResource PhoneAccentBrush}\" BorderBrush=\"White\" BorderThickness=\"1\" Width=\"10\" Height=\"10\"/>\r\n            </Border>\r\n        </Grid>\r\n        <TextBlock x:Name=\"DEBUG\" Grid.ColumnSpan=\"3\" Grid.RowSpan=\"3\" IsHitTestVisible=\"False\" Text=\"\" TextWrapping=\"Wrap\"  FontSize=\"14\" Foreground=\"GreenYellow\"/>\r\n    </Grid>\r\n</media:SelectableUserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/Sticker.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Views.Dialogs;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class Sticker\r\n    {\r\n        protected override void OnIsSelectedChanged(object sender, bool isSelected)\r\n        {\r\n            Border.Visibility = isSelected ? Visibility.Visible : Visibility.Collapsed;\r\n            //LeftRotatePoint.Visibility = isSelected ? Visibility.Visible : Visibility.Collapsed;\r\n            //RightRotatePoint.Visibility = isSelected ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public static readonly DependencyProperty FullSourceProperty = DependencyProperty.Register(\r\n            \"FullSource\", typeof(ImageSource), typeof(Sticker), new PropertyMetadata(default(ImageSource), OnFullSourceChanged));\r\n\r\n        private static void OnFullSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var sticker = d as Sticker;\r\n            if (sticker != null)\r\n            {\r\n                sticker.FullImage.Source = e.NewValue as ImageSource;\r\n                if (sticker.FullImage.Source != null)\r\n                {\r\n                    sticker.Image.Source = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        public ImageSource FullSource\r\n        {\r\n            get { return (ImageSource) GetValue(FullSourceProperty); }\r\n            set { SetValue(FullSourceProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(\r\n            \"Source\", typeof(ImageSource), typeof(Sticker), new PropertyMetadata(default(ImageSource), OnSourceChanged));\r\n\r\n        private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var sticker = d as Sticker;\r\n            if (sticker != null)\r\n            {\r\n                if (sticker.FullImage.Source == null)\r\n                {\r\n                    sticker.Image.Source = e.NewValue as ImageSource;\r\n                }\r\n            }\r\n        }\r\n\r\n        public ImageSource Source\r\n        {\r\n            get { return (ImageSource)GetValue(SourceProperty); }\r\n            set { SetValue(SourceProperty, value); }\r\n        }\r\n\r\n        public Sticker()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Border.Visibility = Visibility.Collapsed;\r\n            LeftRotatePoint.Visibility = Visibility.Collapsed;\r\n            RightRotatePoint.Visibility = Visibility.Collapsed;\r\n        }\r\n\r\n        private ContextMenu _lastContextMenu;\r\n\r\n        private void RemoveContextMenu()\r\n        {\r\n            _lastContextMenu = ContextMenuService.GetContextMenu(this);\r\n\r\n            ContextMenuService.SetContextMenu(this, null);\r\n        }\r\n\r\n        private void RestoreContextMenu()\r\n        {\r\n            ContextMenuService.SetContextMenu(this, _lastContextMenu);\r\n\r\n            _lastContextMenu = null;\r\n        }\r\n\r\n        private Point _manipulationOrigin;\r\n\r\n        private void RightRotatePoint_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            _manipulationOrigin = e.ManipulationOrigin;\r\n\r\n            RemoveContextMenu();\r\n        }\r\n\r\n        private void RightRotatePoint_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            DebugManipulationDelta(e);\r\n\r\n            e.Handled = true;\r\n\r\n            //var pointA = new Point(ActualWidth / 2.0, ActualHeight / 2.0);\r\n            //var pointB = new Point(0.0, ActualHeight / 2.0);\r\n            //var pointC = new Point(pointB.X + e.DeltaManipulation.Translation.X, pointB.Y + e.DeltaManipulation.Translation.Y);\r\n\r\n            //var AB = Math.Sqrt(Math.Pow(pointA.X - pointB.X, 2.0) + Math.Pow(pointA.Y - pointB.Y, 2.0));\r\n            //var BC = Math.Sqrt(Math.Pow(pointB.X - pointC.X, 2.0) + Math.Pow(pointB.Y - pointC.Y, 2.0));\r\n            //var AC = Math.Sqrt(Math.Pow(pointA.X - pointC.X, 2.0) + Math.Pow(pointA.Y - pointC.Y, 2.0));\r\n\r\n            //var cosA = (AB * AB + AC * AC - BC * BC) / (2.0 * AB * AC);\r\n            //var a = Math.Acos(cosA) * 180.0 / Math.PI;\r\n            //if (pointC.Y < pointB.Y)\r\n            //{\r\n            //    a = -a;\r\n            //}\r\n\r\n            //RotateTransform.CenterX = ActualWidth / 2.0;\r\n            //RotateTransform.CenterY = ActualHeight / 2.0;\r\n            //RotateTransform.Angle += a;\r\n\r\n        }\r\n\r\n        private void DebugManipulationDelta(ManipulationDeltaEventArgs e)\r\n        {\r\n            DEBUG.Text = string.Format(\"pinch{0}\\ncumulative\\nX={1}\\nY={2}\\ndelta\\nX={3}\\nY={4}\\n{5}\\n{6}\",\r\n                e.PinchManipulation,\r\n                e.CumulativeManipulation.Translation.X,\r\n                e.CumulativeManipulation.Translation.Y,\r\n                e.DeltaManipulation.Translation.X,\r\n                e.DeltaManipulation.Translation.Y,\r\n                e.CumulativeManipulation.Scale,\r\n                e.DeltaManipulation.Scale);\r\n        }\r\n\r\n        private void LeftRotatePoint_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            RemoveContextMenu();\r\n        }\r\n\r\n        private void LeftRotatePoint_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            DebugManipulationDelta(e);\r\n\r\n            e.Handled = true;\r\n\r\n            //var pointA = new Point(ActualWidth / 2.0, ActualHeight / 2.0);\r\n            //var pointB = new Point(0.0, ActualHeight / 2.0);\r\n            //var pointC = new Point(pointB.X + e.DeltaManipulation.Translation.X, pointB.Y + e.DeltaManipulation.Translation.Y);\r\n\r\n            //var AB = Math.Sqrt(Math.Pow(pointA.X - pointB.X, 2.0) + Math.Pow(pointA.Y - pointB.Y, 2.0));\r\n            //var BC = Math.Sqrt(Math.Pow(pointB.X - pointC.X, 2.0) + Math.Pow(pointB.Y - pointC.Y, 2.0));\r\n            //var AC = Math.Sqrt(Math.Pow(pointA.X - pointC.X, 2.0) + Math.Pow(pointA.Y - pointC.Y, 2.0));\r\n\r\n            //var cosA = (AB * AB + AC * AC - BC * BC) / (2.0 * AB * AC);\r\n            //var a = Math.Acos(cosA) * 180.0 / Math.PI;\r\n            //if (pointC.Y > pointB.Y)\r\n            //{\r\n            //    a = -a;\r\n            //}\r\n\r\n            //RotateTransform.CenterX = ActualWidth/2.0;\r\n            //RotateTransform.CenterY = ActualHeight/2.0;\r\n            //RotateTransform.Angle += a;\r\n        }\r\n\r\n        public void Flip()\r\n        {\r\n            var scaleTransform = ImageScaleTransform;\r\n            if (scaleTransform == null) return;\r\n\r\n            scaleTransform.CenterX = Image.ActualWidth / 2.0;\r\n            scaleTransform.CenterY = Image.ActualHeight / 2.0;\r\n\r\n            var storyboard = new Storyboard();\r\n\r\n            var toScaleY = scaleTransform.ScaleX > 0.0 ? -1.0 : 1.0;\r\n            var scaleAnimation = new DoubleAnimationUsingKeyFrames();\r\n            scaleAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = toScaleY, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(scaleAnimation, scaleTransform);\r\n            Storyboard.SetTargetProperty(scaleAnimation, new PropertyPath(\"ScaleX\"));\r\n            storyboard.Children.Add(scaleAnimation);\r\n\r\n            storyboard.Begin();\r\n        }\r\n\r\n        private void LeftRotatePoint_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            RestoreContextMenu();\r\n        }\r\n\r\n        private void RightRotatePoint_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            RestoreContextMenu();\r\n        }\r\n\r\n        public TLStickerItem StickerItem { get; set; }\r\n\r\n        public int GetAnchor()\r\n        {\r\n            if (StickerItem != null)\r\n            {\r\n                var document = StickerItem.Document as TLDocument54;\r\n\r\n                if (document != null)\r\n                {\r\n                    foreach (var attribute in document.Attributes)\r\n                    {\r\n                        var stickerAttribute = attribute as TLDocumentAttributeSticker56;\r\n                        if (stickerAttribute != null)\r\n                        {\r\n                            var maskCoords = stickerAttribute.MaskCoords;\r\n                            if (maskCoords != null)\r\n                            {\r\n                                return maskCoords.N.Value;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return -1;\r\n        }\r\n\r\n        public Point GetPosition()\r\n        {\r\n            var compositeTransform = RenderTransform as CompositeTransform;\r\n            if (compositeTransform != null)\r\n            {\r\n                return new Point(compositeTransform.TranslateX, compositeTransform.TranslateY);\r\n            }\r\n\r\n            return new Point(0.0, 0.0);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/StickerPosition.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public class StickerPosition\r\n    {\r\n        public Point Position { get; set; }\r\n\r\n        public float Scale { get; set; }\r\n\r\n        public float Angle { get; set; }\r\n\r\n        public StickerPosition(Point position, float scale, float angle)\r\n        {\r\n            Position = position;\r\n            Scale = scale;\r\n            Angle = angle;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/StickersControl.xaml",
    "content": "﻿<UserControl x:Class=\"TelegramClient.Views.Media.StickersControl\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:utilites=\"clr-namespace:Telegram.EmojiPanel.Controls.Utilites\"\r\n    xmlns:emojiPanel=\"clr-namespace:Telegram.EmojiPanel\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\" x:Name=\"Self\">\r\n\r\n    <UserControl.Resources>\r\n        <Style x:Key=\"CategoryButtonBaseStyle\" TargetType=\"Button\">\r\n            <Setter Property=\"Margin\" Value=\"3,0,3,0\"/>\r\n            <Setter Property=\"ClickMode\" Value=\"Release\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid x:Name=\"ContentGrid\" Background=\"{TemplateBinding Background}\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ContentGrid\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n\r\n                            <ContentControl x:Name=\"ContentContainer\"\r\n                                            ContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n                                            Content=\"{TemplateBinding Content}\" />\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"CategoryButtonDarkThemeStyle\" TargetType=\"Button\" BasedOn=\"{StaticResource CategoryButtonBaseStyle}\">\r\n            <Setter Property=\"Background\" Value=\"#FF474747\"/>\r\n        </Style>\r\n\r\n        <Style x:Key=\"CategoryButtonLightThemeStyle\" TargetType=\"Button\" BasedOn=\"{StaticResource CategoryButtonBaseStyle}\">\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        </Style>\r\n\r\n        <Style x:Key=\"ButtonStyle\" TargetType=\"Button\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n            <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilySemiBold}\"/>\r\n            <Setter Property=\"FontSize\" Value=\"{StaticResource PhoneFontSizeMedium}\"/>\r\n            <Setter Property=\"Padding\" Value=\"10,5,10,6\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"Button\">\r\n                        <Grid Background=\"Transparent\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\"/>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneAccentBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\">\r\n                                        <Storyboard>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                            </ObjectAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                <ContentControl x:Name=\"ContentContainer\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" CacheMode=\"BitmapCache\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n        <Grid Margin=\"0,0,0,0\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"Auto\"/>\r\n                <ColumnDefinition Width=\"*\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Button Grid.Column=\"0\" Content=\"{Binding Resources.Masks, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" toolkit:TiltEffect.SuppressTilt=\"True\" Click=\"Masks_OnClick\" ClickMode=\"Press\" Style=\"{StaticResource ButtonStyle}\"/>\r\n            <Button Grid.Column=\"1\" Content=\"{Binding Resources.Stickers, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" toolkit:TiltEffect.SuppressTilt=\"True\" Click=\"Stickers_OnClick\" ClickMode=\"Press\" Style=\"{StaticResource ButtonStyle}\"/>\r\n            <Button Grid.Column=\"2\" HorizontalAlignment=\"Right\" Content=\"{Binding Resources.Cancel, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Click=\"ButtonBase_OnClick\" Style=\"{StaticResource ButtonStyle}\"/>\r\n        </Grid>\r\n\r\n        <Grid Grid.Row=\"1\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\" />\r\n                <RowDefinition Height=\"*\" />\r\n            </Grid.RowDefinitions>\r\n\r\n            <Grid x:Name=\"StickersGrid\"\r\n                  Grid.Row=\"0\"\r\n                  Margin=\"0,6,0,0\"\r\n                  Background=\"{StaticResource PhoneChromeBrush}\" toolkit:TiltEffect.SuppressTilt=\"True\">\r\n                <ScrollViewer x:Name=\"MasksScrollViewer\" \r\n                    VerticalScrollBarVisibility=\"Disabled\" \r\n                    HorizontalScrollBarVisibility=\"Auto\">\r\n                    <StackPanel x:Name=\"MasksPanel\" Orientation=\"Horizontal\"/>\r\n                </ScrollViewer>\r\n                <ScrollViewer x:Name=\"StickersScrollViewer\" \r\n                    Visibility=\"Collapsed\"\r\n                    VerticalScrollBarVisibility=\"Disabled\" \r\n                    HorizontalScrollBarVisibility=\"Auto\">\r\n                    <StackPanel x:Name=\"StickersPanel\" Orientation=\"Horizontal\"/>\r\n                </ScrollViewer>\r\n            </Grid>\r\n            \r\n            <ProgressBar Grid.Row=\"1\" x:Name=\"LoadingProgressBar\" IsIndeterminate=\"True\"/>\r\n\r\n            <ScrollViewer Grid.Row=\"1\" Margin=\"0\" Padding=\"0\" x:Name=\"CSV\">\r\n                <utilites:MyVirtualizingPanel \r\n                    x:Name=\"VirtPanel\" \r\n                    Margin=\"0,3,0,0\"  \r\n                    VerticalAlignment=\"Top\" \r\n                    UseOptimizedManipulationRouting=\"False\"\r\n                    ManipulationStarted=\"StickerPanel_ManipulationStarted\"\r\n                    ManipulationDelta=\"StickerPanel_ManipulationDelta\"\r\n                    ManipulationCompleted=\"StickerPanel_ManipulationCompleted\"/>\r\n            </ScrollViewer>\r\n        </Grid>\r\n\r\n        <Grid x:Name=\"Preview\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Visibility=\"Collapsed\" IsHitTestVisible=\"False\">\r\n            <Border Opacity=\"0.5\" Background=\"{StaticResource PhoneBackgroundBrush}\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"/>\r\n            <Grid x:Name=\"PreviewGrid\" RenderTransformOrigin=\"0.5,0.5\" Loaded=\"StickerPreviewGrid_OnLoaded\" Width=\"96\" Height=\"96\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                <Grid.RenderTransform>\r\n                    <CompositeTransform ScaleX=\"2.6\" ScaleY=\"2.6\"/>\r\n                </Grid.RenderTransform>\r\n                <Image x:Name=\"PreviewImage\"/>\r\n                <Image x:Name=\"Image\" Source=\"{Binding DataContext.Document, ElementName=PreviewGrid, Converter={StaticResource DefaultPhotoConverter}}\"/>\r\n                <emojiPanel:TelegramRichTextBox \r\n                    Visibility=\"{Binding DataContext.Document.Mask, ElementName=PreviewGrid, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=invert}\"\r\n                    HorizontalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" Margin=\"0,-80,0,0\" emojiPanel:BrowserNavigationService.SuppressParsing=\"True\" Text=\"{Binding DataContext.Document.Emoticon, ElementName=PreviewGrid}\" FontSize=\"16\">\r\n                 <emojiPanel:TelegramRichTextBox.RenderTransform>\r\n                     <ScaleTransform ScaleX=\"0.5\" ScaleY=\"0.5\"/>\r\n                 </emojiPanel:TelegramRichTextBox.RenderTransform>\r\n                </emojiPanel:TelegramRichTextBox>\r\n            </Grid>\r\n        </Grid>\r\n    </Grid>\r\n</UserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/StickersControl.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media.Imaging;\r\nusing Caliburn.Micro;\r\nusing Telegram.Api.Services;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.VirtualizedView;\r\nusing Telegram.EmojiPanel.Controls.Emoji;\r\nusing TelegramClient.Converters;\r\nusing TelegramClient.Services;\r\nusing TelegramClient.Views.Dialogs;\r\nusing Execute = Telegram.Api.Helpers.Execute;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public partial class StickersControl\r\n    {\r\n        private const string RecentlyUsedStickersKey = \"@tlg/recentlyUsed\";\r\n\r\n        private const string RecentlyUsedMasksKey = \"@tlg/recentlyUsedMasks\";\r\n\r\n        public event EventHandler<StickerSelectedEventArgs> StickerSelected;\r\n\r\n        protected virtual void RaiseStickerSelected(StickerSelectedEventArgs e)\r\n        {\r\n            var handler = StickerSelected;\r\n            if (handler != null) handler(this, e);\r\n        }\r\n\r\n        private TLAllStickers _masks;\r\n\r\n        private TLAllStickers _stickers;\r\n\r\n        public StickersControl(TLAllStickers masks, TLAllStickers stickers)\r\n        {\r\n            InitializeComponent();\r\n\r\n            LayoutRoot.Opacity = 0.0;\r\n\r\n            VirtPanel.InitializeWithScrollViewer(CSV);\r\n\r\n            Loaded += OnLoaded;\r\n\r\n            _masks = masks;\r\n            _stickers = stickers;\r\n\r\n            if (_masks == null)\r\n            {\r\n                LoadMasksAsync();\r\n            }\r\n\r\n            if (_stickers == null)\r\n            {\r\n                LoadStickersAsync();\r\n            }\r\n\r\n            LoadButtons();\r\n            CreateSetsAndUpdatePanel();\r\n        }\r\n\r\n        private void LoadStickersAsync()\r\n        {\r\n            LoadingProgressBar.Visibility = Visibility.Visible;\r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n            mtProtoService.GetAllStickersAsync(TLString.Empty,\r\n                result =>\r\n                {\r\n                    var allStickers = result as TLAllStickers43;\r\n                    if (allStickers != null)\r\n                    {\r\n                        var stateService = IoC.Get<IStateService>();\r\n                        stateService.SaveAllStickersAsync(allStickers);\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n\r\n                            _stickers = result as TLAllStickers;\r\n                            CreateSets(_stickers);\r\n                            UpdateButtons(_stickers, StickersPanel, _recentStickersButton, _stickersButtons);\r\n                            if (StickersScrollViewer.Visibility == Visibility.Visible)\r\n                            {\r\n                                LoadSprites(_stickers, _stickersButtons);\r\n                            }\r\n                        });\r\n                    }\r\n                },\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.getAllStickers error \" + error);\r\n                    LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                }));\r\n        }\r\n\r\n        private void LoadMasksAsync()\r\n        {\r\n            LoadingProgressBar.Visibility = Visibility.Visible;\r\n            var mtProtoService = IoC.Get<IMTProtoService>();\r\n            mtProtoService.GetMaskStickersAsync(TLString.Empty,\r\n                result =>\r\n                {\r\n                    var allStickers = result as TLAllStickers43;\r\n\r\n                    if (allStickers != null)\r\n                    {\r\n                        var stateService = IoC.Get<IStateService>();\r\n                        stateService.SaveMasksAsync(allStickers);\r\n\r\n                        Execute.BeginOnUIThread(() =>\r\n                        {\r\n                            LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                            _masks = allStickers;\r\n                            CreateSets(_masks);\r\n                            UpdateButtons(_masks, MasksPanel, _recentMasksButton, _masksButtons);\r\n                            if (MasksScrollViewer.Visibility == Visibility.Visible)\r\n                            {\r\n                                LoadSprites(_masks, _masksButtons);\r\n                            }\r\n                        });\r\n                    }\r\n                },\r\n                error => Execute.BeginOnUIThread(() =>\r\n                {\r\n                    Execute.ShowDebugMessage(\"messages.getMaskStickers error \" + error);\r\n                    LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                }));\r\n        }\r\n\r\n        private readonly Button _recentMasksButton = new Button();\r\n\r\n        private readonly List<Button> _masksButtons = new List<Button>();\r\n\r\n        private readonly Button _recentStickersButton = new Button(); \r\n\r\n        private readonly List<Button> _stickersButtons = new List<Button>();\r\n\r\n        private void LoadButtons()\r\n        {\r\n            var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            var buttonStyleResourceKey = isLightTheme ? \"CategoryButtonLightThemeStyle\" : \"CategoryButtonDarkThemeStyle\";\r\n            var buttonStyle = (Style)Resources[buttonStyleResourceKey];\r\n\r\n            var prefix = isLightTheme ? \"light.\" : string.Empty;\r\n\r\n            _recentStickersButton.Style = buttonStyle;\r\n            _recentStickersButton.Width = 78.0;\r\n            _recentStickersButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Telegram.EmojiPanel.Controls.Utilites.Helpers.GetAssetUri(prefix + \"emoji.recent\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _recentStickersButton.Click += RecentStickersButtonOnClick;\r\n\r\n            _recentMasksButton.Style = buttonStyle;\r\n            _recentMasksButton.Width = 78.0;\r\n            _recentMasksButton.Content = new Image\r\n            {\r\n                Source = new BitmapImage(Telegram.EmojiPanel.Controls.Utilites.Helpers.GetAssetUri(prefix + \"emoji.recent\")),\r\n                Width = 34,\r\n                Height = 32\r\n            };\r\n            _recentMasksButton.Click += RecentMasksButtonOnClick;\r\n        }\r\n\r\n        public Brush ButtonBackground\r\n        {\r\n            get\r\n            {\r\n                var isLightTheme = (Visibility)Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n\r\n                return isLightTheme\r\n                    ? new SolidColorBrush(Colors.White)\r\n                    : new SolidColorBrush(Color.FromArgb(255, 71, 71, 71));\r\n            }\r\n        }\r\n\r\n        private Button _previousButton;\r\n\r\n        private void RecentStickersButtonOnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            SetButtonsBackground(sender);\r\n\r\n            List<TLDocument22> stickerSet;\r\n            if (_stickerSets != null && _stickerSets.TryGetValue(RecentlyUsedStickersKey, out stickerSet))\r\n            {\r\n                LoadStickerSet(RecentlyUsedStickersKey, stickerSet);\r\n            }\r\n            else\r\n            {\r\n                VirtPanel.ClearItems();\r\n                _recentStickersSprites = new List<VListItemBase>();\r\n            }\r\n        }\r\n\r\n        private void RecentMasksButtonOnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            SetButtonsBackground(sender);\r\n\r\n            List<TLDocument22> stickerSet;\r\n            if (_stickerSets != null && _stickerSets.TryGetValue(RecentlyUsedMasksKey, out stickerSet))\r\n            {\r\n                LoadStickerSet(RecentlyUsedMasksKey, stickerSet);\r\n            }\r\n            else\r\n            {\r\n                VirtPanel.ClearItems();\r\n                _recentStickersSprites = new List<VListItemBase>();\r\n            }\r\n        }\r\n        private void SetButtonsBackground(object sender)\r\n        {\r\n            if (_previousButton != null)\r\n            {\r\n                _previousButton.Tag = null;\r\n                _previousButton.Background = ButtonBackground;\r\n            }\r\n\r\n            _previousButton = sender as Button;\r\n            if (_previousButton != null)\r\n            {\r\n                _previousButton.Tag = true;\r\n                _previousButton.Background = (Brush) Application.Current.Resources[\"PhoneAccentBrush\"];\r\n            }\r\n        }\r\n\r\n        private void CreateSetsAndUpdatePanel()\r\n        {\r\n            _stickerSets.Clear();\r\n\r\n            CreateSets(_masks);\r\n            CreateSets(_stickers);\r\n\r\n            UpdateButtons(_masks, MasksPanel, _recentMasksButton, _masksButtons);\r\n            UpdateButtons(_stickers, StickersPanel, _recentStickersButton, _stickersButtons);\r\n        }\r\n\r\n        private readonly Dictionary<string, List<TLDocument22>> _stickerSets = new Dictionary<string, List<TLDocument22>>();\r\n\r\n        private void CreateSets(TLAllStickers allStickers)\r\n        {\r\n            if (allStickers == null) return;\r\n\r\n            var recentlyUsedSetId = allStickers == _masks? RecentlyUsedMasksKey : RecentlyUsedStickersKey;\r\n            _stickerSets[recentlyUsedSetId] = new List<TLDocument22>();\r\n\r\n            var documentsCache = new Dictionary<long, TLDocument22>();\r\n            for (var i = 0; i < allStickers.Documents.Count; i++)\r\n            {\r\n                var document22 = allStickers.Documents[i] as TLDocument22;\r\n                if (document22 != null)\r\n                {\r\n                    documentsCache[document22.Id.Value] = document22;\r\n\r\n                    if (document22.StickerSet != null)\r\n                    {\r\n                        var setId = document22.StickerSet.Name;\r\n                        List<TLDocument22> stickers;\r\n                        if (_stickerSets.TryGetValue(setId, out stickers))\r\n                        {\r\n                            stickers.Add(document22);\r\n                        }\r\n                        else\r\n                        {\r\n                            _stickerSets[setId] = new List<TLDocument22> { document22 };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            var allStickers43 = allStickers as TLAllStickers43;\r\n            if (allStickers43 != null)\r\n            {\r\n                if (allStickers43.RecentlyUsed != null)\r\n                {\r\n                    var documentsDict = new Dictionary<long, TLDocumentBase>();\r\n                    foreach (var document in allStickers43.Documents)\r\n                    {\r\n                        documentsDict[document.Id.Value] = document;\r\n                    }\r\n\r\n                    for (var i = 0; i < allStickers43.RecentlyUsed.Count; i++)\r\n                    {\r\n                        TLDocumentBase document;\r\n                        var recentlyUsedDocument = allStickers43.RecentlyUsed[i];\r\n                        if (documentsDict.TryGetValue(recentlyUsedDocument.Id.Value, out document))\r\n                        {\r\n                            var document22 = document as TLDocument22;\r\n                            if (document22 != null)\r\n                            {\r\n                                documentsCache[document22.Id.Value] = document22;\r\n\r\n                                List<TLDocument22> stickers;\r\n                                if (_stickerSets.TryGetValue(recentlyUsedSetId, out stickers))\r\n                                {\r\n                                    stickers.Add(document22);\r\n                                }\r\n                                else\r\n                                {\r\n                                    _stickerSets[recentlyUsedSetId] = new List<TLDocument22> { document22 };\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void UpdateButtons(TLAllStickers allStickersBase, Panel panel, Button recentStickersButton, List<Button> allButtons)\r\n        {\r\n            panel.Children.Clear();\r\n\r\n            if (allStickersBase == null)\r\n            {\r\n                return;\r\n            }\r\n            var allStickers43 = allStickersBase as TLAllStickers43;\r\n            if (allStickers43 != null)\r\n            {\r\n                recentStickersButton.Visibility = allStickers43.RecentlyUsed == null || allStickers43.RecentlyUsed.Count == 0\r\n                    ? Visibility.Collapsed\r\n                    : Visibility.Visible;\r\n            }\r\n            panel.Children.Add(recentStickersButton);\r\n\r\n            var isLightTheme = (Visibility) Application.Current.Resources[\"PhoneLightThemeVisibility\"] == Visibility.Visible;\r\n            var buttonStyleResourceKey = isLightTheme ? \"CategoryButtonLightThemeStyle\" : \"CategoryButtonDarkThemeStyle\";\r\n            var buttonStyle = (Style) Resources[buttonStyleResourceKey];\r\n\r\n            allButtons.Clear();\r\n            var allStickers = allStickersBase as TLAllStickers29;\r\n            if (allStickers != null)\r\n            {\r\n                foreach (var stickerSet in allStickers.Sets)\r\n                {\r\n                    var key = stickerSet.Id.Value.ToString(CultureInfo.InvariantCulture);\r\n                    List<TLDocument22> stickers;\r\n                    if (_stickerSets.TryGetValue(key, out stickers))\r\n                    {\r\n                        var image = new Image { Width = 53.0, Height = 53.0, DataContext = new TLStickerItem { Document = stickers.FirstOrDefault() } };\r\n                        var binding = new Binding(\"Self\")\r\n                        {\r\n                            Converter = new DefaultPhotoConverter(),\r\n                            ConverterParameter = 64.0\r\n                        };\r\n                        image.SetBinding(Image.SourceProperty, binding);\r\n\r\n                        var button = new Button\r\n                        {\r\n                            Width = 78.0,\r\n                            Height = 78.0,\r\n                            Style = buttonStyle,\r\n                            Content = image,\r\n                            DataContext = key\r\n                        };\r\n                        button.Click += StickerSetButtonOnClick;\r\n                        button.Tap += StickerSetButtonOnTap;\r\n                        panel.Children.Add(button);\r\n                        \r\n                        allButtons.Add(button);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void StickerSetButtonOnTap(object sender, GestureEventArgs e)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"Tap\");\r\n        }\r\n\r\n        private void StickerSetButtonOnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(\"Click\");\r\n\r\n            SetButtonsBackground(sender);\r\n\r\n            var button = sender as Button;\r\n            if (button == null) return;\r\n\r\n            var key = button.DataContext as string;\r\n            if (key == null) return;\r\n\r\n            List<TLDocument22> stickers;\r\n            if (_stickerSets.TryGetValue(key, out stickers))\r\n            {\r\n                LoadStickerSet(key, stickers);\r\n            }\r\n        }\r\n\r\n        private bool _reloadRecentStickers;\r\n\r\n        private bool _reloadRecentMasks;\r\n\r\n        public List<VListItemBase> CurrentSprites;\r\n\r\n        private readonly Dictionary<string, List<VListItemBase>> _stickerSetSprites = new Dictionary<string, List<VListItemBase>>();\r\n\r\n        private List<VListItemBase> _recentStickersSprites;\r\n\r\n        private List<VListItemBase> _recentMasksSprites;\r\n\r\n        private const int FirstStickerSliceCount = 6;\r\n\r\n        private void LoadStickerSet(string key, List<TLDocument22> stickerSet)\r\n        {\r\n            var stickerPerRow = 4;\r\n\r\n            var setId = key;\r\n            List<VListItemBase> sprites;\r\n            if (!_stickerSetSprites.TryGetValue(setId, out sprites)\r\n                || (key == RecentlyUsedMasksKey && _reloadRecentMasks)\r\n                || (key == RecentlyUsedStickersKey && _reloadRecentStickers))\r\n            {\r\n                if (key == RecentlyUsedStickersKey && _reloadRecentStickers) _reloadRecentStickers = false;\r\n                if (key == RecentlyUsedMasksKey && _reloadRecentMasks) _reloadRecentMasks = false;\r\n\r\n                sprites = new List<VListItemBase>();\r\n                var stickers = new List<TLStickerItem>();\r\n                for (var i = 1; i <= stickerSet.Count; i++)\r\n                {\r\n                    stickers.Add(new TLStickerItem { Document = stickerSet[i - 1] });\r\n\r\n                    if (i % stickerPerRow == 0 || i == stickerSet.Count)\r\n                    {\r\n                        var item = new StickerSpriteItem(stickerPerRow, new List<TLStickerItem>(stickers), 90.0, 472.0, StickerPanel_MouseEnter);\r\n                        item.StickerSelected += OnStickerSelected;\r\n                        sprites.Add(item);\r\n                        stickers.Clear();\r\n                    }\r\n                }\r\n\r\n                _stickerSetSprites[setId] = sprites;\r\n            }\r\n\r\n            if (key == RecentlyUsedMasksKey)\r\n            {\r\n                _recentMasksSprites = sprites;\r\n            }\r\n            else if (key == RecentlyUsedStickersKey)\r\n            {\r\n                _recentStickersSprites = sprites;\r\n            }\r\n\r\n            CurrentSprites = sprites;\r\n            AddSprites(sprites);\r\n        }\r\n\r\n        public void UpdateRecentAsync(List<TLDocument22> stickers, List<TLDocument22> masks)\r\n        {\r\n            Execute.BeginOnThreadPool(() =>\r\n            {\r\n                var stateService = IoC.Get<IStateService>();\r\n\r\n                var cachedMasks = _masks as TLAllStickers43;\r\n                if (cachedMasks != null\r\n                    && masks != null\r\n                    && masks.Count > 0)\r\n                {\r\n                    cachedMasks.RecentlyUsed = cachedMasks.RecentlyUsed ?? new TLVector<TLRecentlyUsedSticker>();\r\n\r\n                    foreach (var mask in masks)\r\n                    {\r\n                        var updated = false;\r\n                        for (var i = 0; i < cachedMasks.RecentlyUsed.Count; i++)\r\n                        {\r\n                            var recentlyUsedSticker = cachedMasks.RecentlyUsed[i];\r\n\r\n                            if (recentlyUsedSticker.Id.Value == mask.Id.Value)\r\n                            {\r\n                                recentlyUsedSticker.Count.Value++;\r\n                                cachedMasks.RecentlyUsed.RemoveAt(i);\r\n                                cachedMasks.RecentlyUsed.Insert(0, recentlyUsedSticker);\r\n                                updated = true;\r\n                                break;\r\n                            }\r\n                        }\r\n\r\n                        if (!updated)\r\n                        {\r\n                            cachedMasks.RecentlyUsed.Insert(0, new TLRecentlyUsedSticker { Id = mask.Id, Count = new TLLong(1) });\r\n                        }\r\n                    }\r\n\r\n                    List<TLDocument22> set;\r\n                    if (_stickerSets.TryGetValue(RecentlyUsedMasksKey, out set))\r\n                    {\r\n                        for (var i = 0; i < masks.Count; i++)\r\n                        {\r\n                            for (var j = 0; j < set.Count; j++)\r\n                            {\r\n                                if (set[j].Id.Value == masks[i].Id.Value)\r\n                                {\r\n                                    set.RemoveAt(j);\r\n                                    break;\r\n                                }\r\n                            }\r\n                            set.Insert(0, masks[i]);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        _stickerSets[RecentlyUsedMasksKey] = masks;\r\n                    }\r\n\r\n                    stateService.SaveMasksAsync(cachedMasks);\r\n\r\n                    _reloadRecentMasks = true;\r\n                }\r\n\r\n                var cachedStickers = _stickers as TLAllStickers43;\r\n                if (cachedStickers != null\r\n                    && stickers != null\r\n                    && stickers.Count > 0)\r\n                {\r\n                    cachedStickers.RecentlyUsed = cachedStickers.RecentlyUsed ?? new TLVector<TLRecentlyUsedSticker>();\r\n\r\n                    foreach (var sticker in stickers)\r\n                    {\r\n                        var updated = false;\r\n                        for (var i = 0; i < cachedStickers.RecentlyUsed.Count; i++)\r\n                        {\r\n                            var recentlyUsedSticker = cachedStickers.RecentlyUsed[i];\r\n\r\n                            if (recentlyUsedSticker.Id.Value == sticker.Id.Value)\r\n                            {\r\n                                recentlyUsedSticker.Count.Value++;\r\n                                cachedStickers.RecentlyUsed.RemoveAt(i);\r\n                                cachedStickers.RecentlyUsed.Insert(0, recentlyUsedSticker);\r\n                                updated = true;\r\n                                break;\r\n                            }\r\n                        }\r\n\r\n                        if (!updated)\r\n                        {\r\n                            cachedStickers.RecentlyUsed.Insert(0, new TLRecentlyUsedSticker { Id = sticker.Id, Count = new TLLong(1) });\r\n                        }\r\n                    }\r\n\r\n                    List<TLDocument22> set;\r\n                    if (_stickerSets.TryGetValue(RecentlyUsedStickersKey, out set))\r\n                    {\r\n                        for (var i = 0; i < stickers.Count; i++)\r\n                        {\r\n                            for (var j = 0; j < set.Count; j++)\r\n                            {\r\n                                if (set[j].Id.Value == stickers[i].Id.Value)\r\n                                {\r\n                                    set.RemoveAt(j);\r\n                                    break;\r\n                                }\r\n                            }\r\n                            set.Insert(0, stickers[i]);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        _stickerSets[RecentlyUsedStickersKey] = stickers;\r\n                    }\r\n\r\n                    stateService.SaveAllStickersAsync(cachedStickers);\r\n\r\n                    _reloadRecentStickers = true;\r\n                }\r\n            });\r\n        }\r\n\r\n        private void AddSprites(List<VListItemBase> sprites)\r\n        {\r\n            var firstSlice = new List<VListItemBase>();\r\n            var secondSlice = new List<VListItemBase>();\r\n\r\n            for (var i = 0; i < sprites.Count; i++)\r\n            {\r\n                if (i < FirstStickerSliceCount)\r\n                {\r\n                    firstSlice.Add(sprites[i]);\r\n                }\r\n                else\r\n                {\r\n                    secondSlice.Add(sprites[i]);\r\n                }\r\n            }\r\n\r\n            VirtPanel.ClearItems();\r\n            VirtPanel.AddItems(firstSlice);\r\n            Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.1), () => { VirtPanel.AddItems(secondSlice); });\r\n        }\r\n\r\n        private void OnStickerSelected(object sender, StickerSelectedEventArgs e)\r\n        {\r\n            RaiseStickerSelected(e);\r\n        }\r\n\r\n        private bool _once = true;\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)\r\n        {\r\n            if (!_once) return;\r\n\r\n            _once = false;\r\n            Deployment.Current.Dispatcher.BeginInvoke(Open);\r\n        }\r\n\r\n        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            Close();\r\n        }\r\n\r\n        public void Close()\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var translateAnimation = new DoubleAnimationUsingKeyFrames();\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 0.0 });\r\n            translateAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 150.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 6.0 } });\r\n            Storyboard.SetTarget(translateAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(translateAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(translateAnimation);\r\n\r\n            var opacityAnimation = new DoubleAnimationUsingKeyFrames();\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.00), Value = 1.0 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.15), Value = 1.0 });\r\n            opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n            Storyboard.SetTarget(opacityAnimation, LayoutRoot);\r\n            Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(opacityAnimation);\r\n\r\n            storyboard.Begin();\r\n            storyboard.Completed += (sender, args) =>\r\n            {\r\n                Visibility = Visibility.Collapsed;\r\n            };\r\n        }\r\n\r\n        public void Open()\r\n        {\r\n            var storyboard = new Storyboard();\r\n\r\n            var continuumLayoutRootY = new DoubleAnimationUsingKeyFrames();\r\n            continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = 150.0 });\r\n            continuumLayoutRootY.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0, EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3.0 } });\r\n            Storyboard.SetTarget(continuumLayoutRootY, LayoutRoot);\r\n            Storyboard.SetTargetProperty(continuumLayoutRootY, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(continuumLayoutRootY);\r\n\r\n            var continuumLayoutRootOpacity = new DoubleAnimation\r\n            {\r\n                From = 0.0,\r\n                To = 1.0,\r\n                Duration = TimeSpan.FromSeconds(0.25),\r\n                EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 6.0 }\r\n            };\r\n            Storyboard.SetTarget(continuumLayoutRootOpacity, LayoutRoot);\r\n            Storyboard.SetTargetProperty(continuumLayoutRootOpacity, new PropertyPath(\"(UIElement.Opacity)\"));\r\n            storyboard.Children.Add(continuumLayoutRootOpacity);\r\n\r\n            Deployment.Current.Dispatcher.BeginInvoke(() =>\r\n            {\r\n                Visibility = Visibility.Visible;\r\n                LayoutRoot.Opacity = 1.0;\r\n                storyboard.Completed += (o, e) =>\r\n                {\r\n                    LoadSprites(_masks, _masksButtons);\r\n                };\r\n                storyboard.Begin();\r\n            });\r\n        }\r\n\r\n        private void LoadSprites(TLAllStickers allStickers, List<Button> buttons)\r\n        {\r\n            if (VirtPanel.Children.Count > 0) return;\r\n\r\n            var selectRecentlyUsedStickers = false;\r\n            var selectFirstStickerSet = false;\r\n            var allStickers43 = allStickers as TLAllStickers43;\r\n            if (allStickers43 != null && (allStickers43.RecentlyUsed == null || allStickers43.RecentlyUsed.Count == 0))\r\n            {\r\n                if (buttons.Count > 0)\r\n                {\r\n                    selectFirstStickerSet = true;\r\n                }\r\n            }\r\n\r\n            if (!selectFirstStickerSet)\r\n            {\r\n                selectRecentlyUsedStickers = true;\r\n            }\r\n\r\n            if (selectFirstStickerSet)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    StickerSetButtonOnClick(buttons[0], null);\r\n                    LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n                    \r\n                    return;\r\n                });\r\n            }\r\n\r\n            if (selectRecentlyUsedStickers)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (allStickers == _masks)\r\n                    {\r\n                        RecentMasksButtonOnClick(_recentMasksButton, null);\r\n                    }\r\n                    else if (allStickers == _stickers)\r\n                    {\r\n                        RecentStickersButtonOnClick(_recentStickersButton, null);\r\n                    }\r\n                    LoadingProgressBar.Visibility = Visibility.Collapsed;\r\n\r\n                    return;\r\n                });\r\n            }\r\n        }\r\n\r\n        private List<VListItemBase> _previousSprites;\r\n\r\n        private Button _previousCategoryButton;\r\n\r\n        private void Masks_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            if (MasksScrollViewer.Visibility == Visibility.Visible) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var currentSprites = CurrentSprites;\r\n                var currentButton = StickersPanel.Children.OfType<Button>().FirstOrDefault(x => x.Tag is bool);\r\n                if (_previousSprites != null)\r\n                {\r\n                    CurrentSprites = _previousSprites;\r\n                    AddSprites(_previousSprites);\r\n                    SetButtonsBackground(_previousCategoryButton);\r\n                }\r\n                else\r\n                {\r\n                    VirtPanel.Children.Clear();\r\n                    LoadSprites(_masks, _masksButtons);\r\n                }\r\n\r\n                MasksScrollViewer.Visibility = Visibility.Visible;\r\n                StickersScrollViewer.Visibility = Visibility.Collapsed;\r\n\r\n                _previousSprites = currentSprites;\r\n                _previousCategoryButton = currentButton;\r\n            });\r\n        }\r\n\r\n        private void Stickers_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            if (StickersScrollViewer.Visibility == Visibility.Visible) return;\r\n\r\n            Execute.BeginOnUIThread(() =>\r\n            {\r\n                var currentSprites = CurrentSprites;\r\n                var currentButton = MasksPanel.Children.OfType<Button>().FirstOrDefault(x => x.Tag is bool);\r\n                if (_previousSprites != null)\r\n                {\r\n                    CurrentSprites = _previousSprites;\r\n                    AddSprites(_previousSprites);\r\n                    SetButtonsBackground(_previousCategoryButton);\r\n                }\r\n                else\r\n                {\r\n                    VirtPanel.Children.Clear();\r\n                    LoadSprites(_stickers, _stickersButtons);\r\n                }\r\n\r\n                MasksScrollViewer.Visibility = Visibility.Collapsed;\r\n                StickersScrollViewer.Visibility = Visibility.Visible;\r\n\r\n                _previousSprites = currentSprites;\r\n                _previousCategoryButton = currentButton;\r\n            });\r\n        }\r\n\r\n        public void UpdateRecentButtonsVisibility()\r\n        {\r\n            var masks43 = _masks as TLAllStickers43;\r\n            _recentMasksButton.Visibility = masks43 == null || masks43.RecentlyUsed == null || masks43.RecentlyUsed.Count == 0\r\n                    ? Visibility.Collapsed\r\n                    : Visibility.Visible;\r\n\r\n            var stickers43 = _stickers as TLAllStickers43;\r\n            _recentStickersButton.Visibility = stickers43 == null || stickers43.RecentlyUsed == null || stickers43.RecentlyUsed.Count == 0\r\n                    ? Visibility.Collapsed\r\n                    : Visibility.Visible;\r\n        }\r\n\r\n        private static DateTime? _startTime;\r\n        private static FrameworkElement _fromItem;\r\n        private static Storyboard _storyboard;\r\n        private static FrameworkElement _lastMouseEnter;\r\n        private static Storyboard _loadedStoryboard;\r\n        private static ManipulationStartedEventArgs _manipulationStartedArgs;\r\n\r\n        private void StickerPanel_ManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            _startTime = DateTime.Now;\r\n            var startTime = _startTime;\r\n\r\n            _fromItem = e.OriginalSource as FrameworkElement;\r\n            _lastMouseEnter = null;\r\n            _manipulationStartedArgs = e;\r\n\r\n            Touch.FrameReported += Touch_FrameReported;\r\n        }\r\n\r\n        private void Touch_FrameReported(object sender, TouchFrameEventArgs e)\r\n        {\r\n            if (_manipulationStartedArgs == null)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                return;\r\n            }\r\n\r\n            var point = e.GetPrimaryTouchPoint(null);\r\n            if (point.Action == TouchAction.Up)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                return;\r\n            }\r\n\r\n            var manipulationPoint = e.GetPrimaryTouchPoint(_manipulationStartedArgs.ManipulationContainer);\r\n            var length = Math.Pow(manipulationPoint.Position.X - _manipulationStartedArgs.ManipulationOrigin.X, 2.0)\r\n                + Math.Pow(manipulationPoint.Position.Y - _manipulationStartedArgs.ManipulationOrigin.Y, 2.0);\r\n            if (length > 30.0 * 30.0)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                return;\r\n            }\r\n\r\n            if (_startTime.HasValue && _startTime.Value.AddSeconds(0.5) <= DateTime.Now)\r\n            {\r\n                Touch.FrameReported -= Touch_FrameReported;\r\n                VirtPanel.DisableVerticalScrolling();\r\n\r\n                _loadedStoryboard = EmojiControl.GetScaleStoryboard(_fromItem, 0.85, 1.0);\r\n\r\n                Preview.Visibility = Visibility.Visible;\r\n                var stickerImage = _fromItem as Image;\r\n                if (stickerImage != null)\r\n                {\r\n                    PreviewImage.Source = stickerImage.Source;\r\n\r\n                    var stickerItem = stickerImage.DataContext as TLStickerItem;\r\n                    if (stickerItem != null)\r\n                    {\r\n                        Image.DataContext = stickerItem;\r\n                    }\r\n                }\r\n\r\n                var grid = Preview;\r\n                grid.Children.Remove(PreviewGrid);\r\n\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    PreviewGrid.RenderTransform = new CompositeTransform();\r\n                    PreviewGrid.Opacity = 0.0;\r\n                    grid.Children.Add(PreviewGrid);\r\n                });\r\n            }\r\n        }\r\n\r\n        private void StickerPanel_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            _startTime = null;\r\n        }\r\n\r\n        private void StickerPanel_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            var fromItem = _fromItem;\r\n\r\n            _startTime = null;\r\n            _fromItem = null;\r\n            \r\n            if (_storyboard != null)\r\n            {\r\n                _storyboard.SkipToFill();\r\n            }\r\n\r\n            VirtPanel.EnableVerticalScrolling();\r\n            Preview.Visibility = Visibility.Collapsed;\r\n\r\n            var st = EmojiControl.GetScaleStoryboard(_lastMouseEnter ?? fromItem, 1.0, 1.0);\r\n            if (st != null)\r\n            {\r\n                Execute.BeginOnUIThread(st.Begin);\r\n            }\r\n        }\r\n\r\n        private void StickerPanel_MouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            if (Preview.Visibility == Visibility.Collapsed) return;\r\n\r\n            //DebugText.Text = sender.GetHashCode().ToString();\r\n\r\n            var st1 = EmojiControl.GetScaleStoryboard(_lastMouseEnter ?? _fromItem, 1.0, 1.0);\r\n\r\n            _lastMouseEnter = e.OriginalSource as FrameworkElement;\r\n\r\n            var stickerImage = e.OriginalSource as Image;\r\n            if (stickerImage != null)\r\n            {\r\n                PreviewImage.Source = stickerImage.Source;\r\n\r\n                var stickerItem = stickerImage.DataContext as TLStickerItem;\r\n                if (stickerItem != null)\r\n                {\r\n                    Image.DataContext = stickerItem;\r\n                }\r\n                PreviewGrid.DataContext = Image.DataContext;\r\n            }\r\n\r\n            var duration = .5;\r\n            var easingFunction = new ElasticEase { Oscillations = 1, Springiness = 10.0, EasingMode = EasingMode.EaseOut };\r\n            var storyboard = new Storyboard();\r\n\r\n            var doubleAnimation = new DoubleAnimation();\r\n            doubleAnimation.From = 0.0;\r\n            doubleAnimation.To = 0.0;\r\n            doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(doubleAnimation);\r\n\r\n            var doubleAnimation2 = new DoubleAnimation();\r\n            doubleAnimation2.From = 0.0; //position.Y;\r\n            doubleAnimation2.To = 0.0;\r\n            doubleAnimation2.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation2.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation2, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(doubleAnimation2);\r\n\r\n            var doubleAnimation3 = new DoubleAnimation();\r\n            doubleAnimation3.From = 1.0;\r\n            doubleAnimation3.To = 1.0;\r\n            doubleAnimation3.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation3.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation3, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation3, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(doubleAnimation3);\r\n\r\n            var doubleAnimation4 = new DoubleAnimation();\r\n            doubleAnimation4.From = 2.4;\r\n            doubleAnimation4.To = 2.6;\r\n            doubleAnimation4.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation4.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation4, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation4, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleY)\"));\r\n            storyboard.Children.Add(doubleAnimation4);\r\n\r\n            var doubleAnimation5 = new DoubleAnimation();\r\n            doubleAnimation5.From = 2.4;\r\n            doubleAnimation5.To = 2.6;\r\n            doubleAnimation5.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation5.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation5, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation5, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleX)\"));\r\n            storyboard.Children.Add(doubleAnimation5);\r\n\r\n            storyboard.Begin();\r\n\r\n            _storyboard = storyboard;\r\n\r\n            var st2 = EmojiControl.GetScaleStoryboard(_lastMouseEnter, 0.85, 1.0);\r\n            if (st1 != null || st2 != null)\r\n            {\r\n                Execute.BeginOnUIThread(() =>\r\n                {\r\n                    if (st1 != null) st1.Begin();\r\n                    if (st2 != null) st2.Begin();\r\n                });\r\n            }\r\n        }\r\n\r\n        private void StickerPreviewGrid_OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            var fromItem = _fromItem;\r\n            if (fromItem == null) return;\r\n\r\n            var position = fromItem.TransformToVisual(Application.Current.RootVisual).Transform(new Point(fromItem.ActualWidth / 2.0, fromItem.ActualHeight / 2.0));\r\n\r\n            var position2 = new Point(240.0, 400.0);\r\n\r\n            var duration = .75;\r\n            IEasingFunction easingFunction = new ElasticEase { Oscillations = 1, Springiness = 10.0, EasingMode = EasingMode.EaseOut };\r\n            var storyboard = new Storyboard();\r\n\r\n            var doubleAnimation = new DoubleAnimation();\r\n            doubleAnimation.From = position.X - position2.X;\r\n            doubleAnimation.To = 0.0;\r\n            doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateX)\"));\r\n            storyboard.Children.Add(doubleAnimation);\r\n\r\n            var doubleAnimation2 = new DoubleAnimation();\r\n            doubleAnimation2.From = position.Y - position2.Y; //position.Y;\r\n            doubleAnimation2.To = 0.0;\r\n            doubleAnimation2.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation2.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation2, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation2, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.TranslateY)\"));\r\n            storyboard.Children.Add(doubleAnimation2);\r\n\r\n            var doubleAnimation3 = new DoubleAnimation();\r\n            doubleAnimation3.From = .5;\r\n            doubleAnimation3.To = 1.0;\r\n            doubleAnimation3.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation3.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation3, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation3, new PropertyPath(\"Opacity\"));\r\n            storyboard.Children.Add(doubleAnimation3);\r\n\r\n            var doubleAnimation4 = new DoubleAnimation();\r\n            doubleAnimation4.From = 1.0;\r\n            doubleAnimation4.To = 2.6;\r\n            doubleAnimation4.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation4.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation4, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation4, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleY)\"));\r\n            storyboard.Children.Add(doubleAnimation4);\r\n\r\n            var doubleAnimation5 = new DoubleAnimation();\r\n            doubleAnimation5.From = 1.0;\r\n            doubleAnimation5.To = 2.6;\r\n            doubleAnimation5.Duration = new Duration(TimeSpan.FromSeconds(duration));\r\n            doubleAnimation5.EasingFunction = easingFunction;\r\n            Storyboard.SetTarget(doubleAnimation5, PreviewGrid);\r\n            Storyboard.SetTargetProperty(doubleAnimation5, new PropertyPath(\"(UIElement.RenderTransform).(CompositeTransform.ScaleX)\"));\r\n            storyboard.Children.Add(doubleAnimation5);\r\n\r\n            storyboard.Begin();\r\n\r\n            if (_loadedStoryboard != null)\r\n            {\r\n                _loadedStoryboard.Begin();\r\n                _loadedStoryboard = null;\r\n            }\r\n\r\n            _storyboard = storyboard;\r\n        }\r\n\r\n        public void ClosePreview()\r\n        {\r\n            Touch.FrameReported -= Touch_FrameReported;\r\n\r\n            StickerPanel_ManipulationCompleted(null, null);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/TextLabel.xaml",
    "content": "﻿<media:SelectableUserControl x:Class=\"TelegramClient.Views.Media.TextLabel\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:media=\"clr-namespace:TelegramClient.Views.Media\"\r\n    mc:Ignorable=\"d\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    d:DesignHeight=\"480\" d:DesignWidth=\"480\">\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid>\r\n            <Grid.RenderTransform>\r\n                <TransformGroup>\r\n                    <RotateTransform x:Name=\"RotateTransform\"/>\r\n                </TransformGroup>\r\n            </Grid.RenderTransform>\r\n            <TextBlock x:Name=\"LabelShadow\" Text=\"Test\" TextAlignment=\"Center\" FontFamily=\"Helvetica\" TextWrapping=\"Wrap\" Margin=\"12\" FontWeight=\"SemiBold\" Foreground=\"#66000000\" TextTrimming=\"None\" IsHitTestVisible=\"False\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Style=\"{StaticResource PhoneTextLargeStyle}\">\r\n                <TextBlock.RenderTransform>\r\n                    <TranslateTransform X=\"1\" Y=\"1\"/>\r\n                </TextBlock.RenderTransform>\r\n            </TextBlock>\r\n            <TextBlock x:Name=\"Label\" Text=\"Test\" TextAlignment=\"Center\" FontFamily=\"Helvetica\" TextWrapping=\"Wrap\" Margin=\"12\" FontWeight=\"SemiBold\" Foreground=\"White\" TextTrimming=\"None\" IsHitTestVisible=\"False\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>\r\n            <!--<Border IsHitTestVisible=\"False\" Width=\"6\" Height=\"6\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Background=\"{StaticResource PhoneAccentBrush}\" CornerRadius=\"3\"/>-->\r\n            <Rectangle x:Name=\"Border\" IsHitTestVisible=\"False\" StrokeThickness=\"1\" Stroke=\"White\" StrokeDashArray=\"10, 10\"/>\r\n            <Border Visibility=\"Collapsed\" IsHitTestVisible=\"True\" x:Name=\"LeftRotatePoint\" \r\n                    ManipulationStarted=\"LeftRotatePoint_OnManipulationStarted\"\r\n                    ManipulationDelta=\"LeftRotatePoint_OnManipulationDelta\" \r\n                    ManipulationCompleted=\"LeftRotatePoint_OnManipulationCompleted\"\r\n                    CornerRadius=\"20\" Background=\"Transparent\" Width=\"40\" Height=\"40\" Margin=\"-20,0\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\">\r\n                <Border IsHitTestVisible=\"False\" CornerRadius=\"5\" BorderBrush=\"White\" BorderThickness=\"1\" Background=\"{StaticResource PhoneAccentBrush}\" Width=\"10\" Height=\"10\"/>\r\n            </Border>\r\n            <Border Visibility=\"Collapsed\" IsHitTestVisible=\"True\" x:Name=\"RightRotatePoint\" \r\n                    ManipulationStarted=\"RightRotatePoint_OnManipulationStarted\"\r\n                    ManipulationDelta=\"RightRotatePoint_OnManipulationDelta\"\r\n                    ManipulationCompleted=\"RightRotatePoint_OnManipulationCompleted\"\r\n                    CornerRadius=\"20\" Background=\"Transparent\" Width=\"40\" Height=\"40\" Margin=\"-20,0\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\">\r\n                <Border IsHitTestVisible=\"False\" CornerRadius=\"5\" Background=\"{StaticResource PhoneAccentBrush}\" BorderBrush=\"White\" BorderThickness=\"1\" Width=\"10\" Height=\"10\"/>\r\n            </Border>\r\n        </Grid>\r\n        <TextBlock x:Name=\"DEBUG\" IsHitTestVisible=\"False\" Text=\"\" TextWrapping=\"Wrap\"  FontSize=\"14\" Foreground=\"GreenYellow\"/>\r\n    </Grid>\r\n</media:SelectableUserControl>"
  },
  {
    "path": "TelegramClient.WP81/Views/Media/TextLabel.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing Microsoft.Phone.Controls;\r\n\r\nnamespace TelegramClient.Views.Media\r\n{\r\n    public abstract class SelectableUserControl : UserControl\r\n    {\r\n        public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(\r\n            \"IsSelected\", typeof(bool), typeof(SelectableUserControl), new PropertyMetadata(default(bool), OnIsSelectedChangedInternal));\r\n\r\n        private static void OnIsSelectedChangedInternal(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var selectableUserControl = d as SelectableUserControl;\r\n            if (selectableUserControl != null)\r\n            {\r\n                var isSelected = (bool)e.NewValue;\r\n\r\n                selectableUserControl.OnIsSelectedChanged(selectableUserControl, isSelected);\r\n            }\r\n        }\r\n\r\n        public bool IsSelected\r\n        {\r\n            get { return (bool)GetValue(IsSelectedProperty); }\r\n            set { SetValue(IsSelectedProperty, value); }\r\n        }\r\n\r\n        protected abstract void OnIsSelectedChanged(object sender, bool isSelected);\r\n    }\r\n\r\n    public partial class TextLabel\r\n    {\r\n        protected override void OnIsSelectedChanged(object sender, bool isSelected)\r\n        {\r\n            Border.Visibility = isSelected ? Visibility.Visible : Visibility.Collapsed;\r\n            //LeftRotatePoint.Visibility = isSelected ? Visibility.Visible : Visibility.Collapsed;\r\n            //RightRotatePoint.Visibility = isSelected ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n\r\n        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(\r\n            \"Text\", typeof(string), typeof(TextLabel), new PropertyMetadata(default(string), OnTextChanged));\r\n\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var textLabel = d as TextLabel;\r\n            if (textLabel != null)\r\n            {\r\n                textLabel.Label.Text = e.NewValue as string;\r\n                textLabel.LabelShadow.Text = e.NewValue as string;\r\n            }\r\n        }\r\n\r\n        public string Text\r\n        {\r\n            get { return (string)GetValue(TextProperty); }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        private double _colorPosition;\r\n\r\n        public double ColorPosition\r\n        {\r\n            get { return _colorPosition; }\r\n            set\r\n            {\r\n                _colorPosition = value;\r\n#if DEBUG\r\n                //DEBUG.Text = _colorPosition.ToString();\r\n#endif\r\n            }\r\n        }\r\n\r\n        public TextLabel()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private ContextMenu _lastContextMenu;\r\n\r\n        private void RemoveContextMenu()\r\n        {\r\n            _lastContextMenu = ContextMenuService.GetContextMenu(this);\r\n\r\n            ContextMenuService.SetContextMenu(this, null);\r\n        }\r\n\r\n        private void RestoreContextMenu()\r\n        {\r\n            ContextMenuService.SetContextMenu(this, _lastContextMenu);\r\n\r\n            _lastContextMenu = null;\r\n        }\r\n\r\n        private void DebugManipulationDelta(ManipulationDeltaEventArgs e)\r\n        {\r\n            DEBUG.Text = string.Format(\"pinch{0}\\ncumulative\\nX={1}\\nY={2}\\ndelta\\nX={3}\\nY={4}\\n{5}\\n{6}\",\r\n                e.PinchManipulation,\r\n                e.CumulativeManipulation.Translation.X,\r\n                e.CumulativeManipulation.Translation.Y,\r\n                e.DeltaManipulation.Translation.X,\r\n                e.DeltaManipulation.Translation.Y,\r\n                e.CumulativeManipulation.Scale,\r\n                e.DeltaManipulation.Scale);\r\n        }\r\n\r\n        private void LeftRotatePoint_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            RemoveContextMenu();\r\n        }\r\n\r\n        private void LeftRotatePoint_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            DebugManipulationDelta(e);\r\n\r\n            e.Handled = true;\r\n\r\n            //var pointA = new Point(ActualWidth / 2.0, ActualHeight / 2.0);\r\n            //var pointB = new Point(0.0, ActualHeight / 2.0);\r\n            //var pointC = new Point(pointB.X + e.DeltaManipulation.Translation.X, pointB.Y + e.DeltaManipulation.Translation.Y);\r\n\r\n            //var AB = Math.Sqrt(Math.Pow(pointA.X - pointB.X, 2.0) + Math.Pow(pointA.Y - pointB.Y, 2.0));\r\n            //var BC = Math.Sqrt(Math.Pow(pointB.X - pointC.X, 2.0) + Math.Pow(pointB.Y - pointC.Y, 2.0));\r\n            //var AC = Math.Sqrt(Math.Pow(pointA.X - pointC.X, 2.0) + Math.Pow(pointA.Y - pointC.Y, 2.0));\r\n\r\n            //var cosA = (AB * AB + AC * AC - BC * BC) / (2.0 * AB * AC);\r\n            //var a = Math.Acos(cosA) * 180.0 / Math.PI;\r\n            //if (pointC.Y > pointB.Y)\r\n            //{\r\n            //    a = -a;\r\n            //}\r\n\r\n            //RotateTransform.CenterX = ActualWidth/2.0;\r\n            //RotateTransform.CenterY = ActualHeight/2.0;\r\n            //RotateTransform.Angle += a;\r\n        }\r\n\r\n        private void LeftRotatePoint_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            RestoreContextMenu();\r\n        }\r\n\r\n        private void RightRotatePoint_OnManipulationStarted(object sender, ManipulationStartedEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n\r\n            RemoveContextMenu();\r\n        }\r\n\r\n        private void RightRotatePoint_OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)\r\n        {\r\n            DebugManipulationDelta(e);\r\n\r\n            e.Handled = true;\r\n\r\n            //var pointA = new Point(ActualWidth / 2.0, ActualHeight / 2.0);\r\n            //var pointB = new Point(0.0, ActualHeight / 2.0);\r\n            //var pointC = new Point(pointB.X + e.DeltaManipulation.Translation.X, pointB.Y + e.DeltaManipulation.Translation.Y);\r\n\r\n            //var AB = Math.Sqrt(Math.Pow(pointA.X - pointB.X, 2.0) + Math.Pow(pointA.Y - pointB.Y, 2.0));\r\n            //var BC = Math.Sqrt(Math.Pow(pointB.X - pointC.X, 2.0) + Math.Pow(pointB.Y - pointC.Y, 2.0));\r\n            //var AC = Math.Sqrt(Math.Pow(pointA.X - pointC.X, 2.0) + Math.Pow(pointA.Y - pointC.Y, 2.0));\r\n\r\n            //var cosA = (AB * AB + AC * AC - BC * BC) / (2.0 * AB * AC);\r\n            //var a = Math.Acos(cosA) * 180.0 / Math.PI;\r\n            //if (pointC.Y < pointB.Y)\r\n            //{\r\n            //    a = -a;\r\n            //}\r\n\r\n            //RotateTransform.CenterX = ActualWidth / 2.0;\r\n            //RotateTransform.CenterY = ActualHeight / 2.0;\r\n            //RotateTransform.Angle += a;\r\n\r\n        }\r\n\r\n        private void RightRotatePoint_OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)\r\n        {\r\n            RestoreContextMenu();\r\n        }\r\n\r\n        public void SetForeground(SolidColorBrush foreground)\r\n        {\r\n            Label.Foreground = foreground;\r\n        }\r\n\r\n        public SolidColorBrush GetForeground()\r\n        {\r\n            return Label.Foreground as SolidColorBrush;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/EmailCodeView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Passport.EmailCodeView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"20\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.PassportEmail, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Border Width=\"32\" Height=\"32\" Margin=\"18,36,18,18\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\" Background=\"{StaticResource PhoneForegroundBrush}\" Tap=\"DoneIcon_OnTap\">\r\n            <Border.OpacityMask>\r\n                <ImageBrush ImageSource=\"/Images/W10M/ic_done_2x.png\"/>\r\n            </Border.OpacityMask>\r\n        </Border>\r\n\r\n        <ScrollViewer x:Name=\"Scroll\" Grid.Row=\"1\">\r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n                <StackPanel>\r\n                    <RichTextBox Margin=\"0,18,0,0\" TextWrapping=\"Wrap\" chats:ConvertToSupergroupView.FormattedText=\"{Binding Subtitle}\"/>\r\n                    <TextBox x:Name=\"Code\" InputScope=\"Number\" MaxLength=\"{Binding CodeLength}\" Style=\"{StaticResource SignInTextBoxStyle}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </TextBox>\r\n                </StackPanel>\r\n            </StackPanel>\r\n        </ScrollViewer>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/EmailCodeView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Windows.Input;\r\nusing Telegram.Api.Helpers;\r\nusing TelegramClient.ViewModels.Passport;\r\n\r\nnamespace TelegramClient.Views.Passport\r\n{\r\n    public partial class EmailCodeView\r\n    {\r\n        public EmailCodeViewModel ViewModel\r\n        {\r\n            get { return DataContext as EmailCodeViewModel; }\r\n        }\r\n\r\n        public EmailCodeView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) => Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.3), () => Code.Focus());\r\n        }\r\n\r\n        private void DoneIcon_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Confirm();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/EmailView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Passport.EmailView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"20\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.PassportEmail, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Border Width=\"32\" Height=\"32\" Margin=\"18,36,18,18\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\" Background=\"{StaticResource PhoneForegroundBrush}\" Tap=\"DoneIcon_OnTap\">\r\n            <Border.OpacityMask>\r\n                <ImageBrush ImageSource=\"/Images/W10M/ic_done_2x.png\"/>\r\n            </Border.OpacityMask>\r\n        </Border>\r\n\r\n        <ScrollViewer x:Name=\"Scroll\" Grid.Row=\"1\">\r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n                <StackPanel>\r\n                    <StackPanel Visibility=\"{Binding CurrentEmail, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\">\r\n                        <Button x:Name=\"UseCurrentEmail\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,18,-12,0\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <StackPanel>\r\n                                <TextBlock Margin=\"12,0,-12,0\" Text=\"{Binding DataContext.UseCurrentEmailCommand, ElementName=ContentPanel}\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                            </StackPanel>\r\n                        </Button>\r\n                        <TextBlock Margin=\"12,12,12,18\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.PassportEmailUseSameInfo, Source={StaticResource Strings}}\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </StackPanel>\r\n                    <controls1:LabeledTextBox \r\n                        Margin=\"0,6,0,0\"\r\n                        x:Name=\"EmailLabel\" \r\n                        InputScope=\"EmailSmtpAddress\"\r\n                        Label=\"{Binding Resources.PassportEmail, Source={StaticResource Strings}}\" \r\n                        Text=\"{Binding Email, Mode=TwoWay}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <TextBlock Margin=\"12,18,12,0\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.PassportEmailUploadInfo, Source={StaticResource Strings}}\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                </StackPanel>\r\n            </StackPanel>\r\n        </ScrollViewer>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/EmailView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.Windows.Input;\r\nusing TelegramClient.ViewModels.Passport;\r\n\r\nnamespace TelegramClient.Views.Passport\r\n{\r\n    public partial class EmailView\r\n    {\r\n        public EmailViewModel ViewModel\r\n        {\r\n            get { return DataContext as EmailViewModel; }\r\n        }\r\n\r\n        public EmailView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void DoneIcon_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/EnterPasswordView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Passport.EnterPasswordView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\" d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"PasswordBox\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Done\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"ForgotPassword\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.TelegramPassport, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <StackPanel x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"12,0\">\r\n            <views:ConversationTileControl\r\n                    HorizontalAlignment=\"Center\"\r\n\t\t\t\t    Margin=\"0,18,0,0\" \r\n                    Size=\"100\"\r\n                    SuppressFaved=\"True\"\r\n                    Object=\"{Binding Bot}\"\r\n                    Fill=\"{Binding Bot.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                    Text=\"{Binding Bot, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                    Source=\"{Binding Bot.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"\r\n                />\r\n            <TextBlock Margin=\"12,18,12,18\" TextWrapping=\"Wrap\" Text=\"{Binding Hint}\" TextAlignment=\"Center\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n            <Grid>\r\n                <PasswordBox x:Name=\"PasswordBox\" VerticalContentAlignment=\"Top\" Password=\"{Binding Password, Mode=TwoWay}\" GotFocus=\"PasswordBox_OnGotFocus\" LostFocus=\"PasswordBox_OnLostFocus\" PasswordChanged=\"PasswordBox_OnPasswordChanged\" KeyDown=\"Passcode_OnKeyDown\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdatePasswordBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </PasswordBox>\r\n                <TextBlock x:Name=\"HintTextBlock\" IsHitTestVisible=\"False\" VerticalAlignment=\"Top\" FontSize=\"23\" Margin=\"31,20,31,0\" Text=\"{Binding PasswordHint}\" Opacity=\"0.6\" Foreground=\"{StaticResource PhoneForegroundBrush}\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            </Grid>\r\n            \r\n            <TextBlock Margin=\"12,18,12,18\" TextWrapping=\"Wrap\" Text=\"{Binding BottomHint}\" Visibility=\"{Binding BottomHint, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter='invert'}\" TextAlignment=\"Center\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            <Grid Margin=\"0,18,0,0\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                    <ColumnDefinition Width=\"*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Button Grid.Column=\"0\" Margin=\"0\" x:Name=\"Done\" Padding=\"12,2,12,6\" Content=\"{Binding Resources.Done, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\"/>\r\n                <Button Grid.Column=\"1\" Margin=\"0\" x:Name=\"ForgotPassword\" VerticalAlignment=\"Center\" Padding=\"0,2,0,6\" Content=\"{Binding Resources.ForgotPassword, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" Style=\"{StaticResource TextButton}\"/>\r\n            </Grid>\r\n            \r\n        </StackPanel>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/EnterPasswordView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing TelegramClient.ViewModels.Passport;\r\n\r\nnamespace TelegramClient.Views.Passport\r\n{\r\n    public partial class EnterPasswordView\r\n    {\r\n        public EnterPasswordViewModel ViewModel\r\n        {\r\n            get { return DataContext as EnterPasswordViewModel; }\r\n        }\r\n\r\n        public EnterPasswordView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) => PasswordBox.Focus();\r\n        }\r\n\r\n        private void Passcode_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.Done();\r\n            }\r\n        }\r\n\r\n        private void PasswordBox_OnPasswordChanged(object sender, RoutedEventArgs e)\r\n        {\r\n            HintTextBlock.Visibility = string.IsNullOrEmpty(PasswordBox.Password)\r\n                ? Visibility.Visible\r\n                : Visibility.Collapsed;\r\n        }\r\n\r\n        private void PasswordBox_OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            HintTextBlock.Foreground = (Brush)Application.Current.Resources[\"PhoneTextBoxForegroundBrush\"];\r\n        }\r\n\r\n        private void PasswordBox_OnLostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            HintTextBlock.Foreground = (Brush)Application.Current.Resources[\"PhoneForegroundBrush\"];\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/PassportView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Passport.PassportView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"20\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\"\r\n    BackKeyPress=\"PassportView_OnBackKeyPress\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <Style x:Key=\"ButtonStyle1\" TargetType=\"Button\">\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                <Setter Property=\"FontSize\" Value=\"23\"/>\r\n                <Setter Property=\"FontWeight\" Value=\"Normal\"/>\r\n                <Setter Property=\"Margin\" Value=\"12,-12\"/>\r\n                <Setter Property=\"VerticalAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"Padding\" Value=\"15,3,15,5\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"Button\">\r\n                            <Grid Background=\"Transparent\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Pressed\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0.7\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                    <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.TelegramPassport, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Border Width=\"32\" Height=\"32\" Margin=\"18,36,18,18\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\" Background=\"{StaticResource PhoneForegroundBrush}\" Tap=\"AboutIcon_OnTap\">\r\n            <Border.OpacityMask>\r\n                <ImageBrush ImageSource=\"/Images/W10M/ic_bio_2x.png\"/>\r\n            </Border.OpacityMask>\r\n        </Border>\r\n\r\n        <ScrollViewer Grid.Row=\"1\">\r\n            <StackPanel Margin=\"6,0\">\r\n                <views:ConversationTileControl\r\n                    HorizontalAlignment=\"Center\"\r\n\t\t\t\t    Margin=\"0,18,0,0\" \r\n                    Size=\"100\"\r\n                    Object=\"{Binding Bot}\"\r\n                    Fill=\"{Binding Bot.Index, Converter={StaticResource PlaceholderBackgroundConverter}}\"\r\n                    Text=\"{Binding Bot, Converter={StaticResource PlaceholderDefaultTextConverter}}\"\r\n                    Source=\"{Binding Bot.Photo, Converter={StaticResource ProfileSmallPhotoConverter}}\"/>\r\n                <TextBlock Margin=\"12,18,12,0\" TextWrapping=\"Wrap\" Text=\"{Binding Hint}\" TextAlignment=\"Center\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                <StackPanel Margin=\"0,0,0,0\">\r\n                    <TextBlock \r\n                        Text=\"{Binding Resources.PassportRequestedInformation, Source={StaticResource Strings}}\" \r\n                        FontSize=\"23\" \r\n                        Foreground=\"{StaticResource TelegramTextAccentBrush}\" \r\n                        Margin=\"12,18,12,0\"/>\r\n                    <ItemsControl x:Name=\"Types\" ItemsSource=\"{Binding RequiredTypes}\">\r\n                        <ItemsControl.ItemTemplate>\r\n                            <DataTemplate>\r\n                                <Grid>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Button cal:Message.Attach=\"[Event Tap] = [Action Edit($DataContext)]\"  Margin=\"-12,0,18,0\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                                        <StackPanel>\r\n                                            <TextBlock Margin=\"12,0,-12,0\" Text=\"{Binding Caption, Converter={StaticResource NonBreakingStringConverter}}\" TextTrimming=\"WordEllipsis\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                                            <TextBlock Margin=\"12,2,-12,0\" Text=\"{Binding Hint}\" Visibility=\"{Binding Error, Converter={StaticResource EmptyStringToVisibilityConverter}}\" TextTrimming=\"WordEllipsis\" Style=\"{StaticResource PhoneTextNormalStyle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                                            <TextBlock Margin=\"12,2,-12,0\" Text=\"{Binding Error}\" Visibility=\"{Binding Error, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" TextTrimming=\"WordEllipsis\" Style=\"{StaticResource PhoneTextNormalStyle}\" Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                                        </StackPanel>\r\n                                    </Button>\r\n                                    <Image Grid.Column=\"1\" Margin=\"0,0,12,0\" Visibility=\"{Binding IsCompleted, Converter={StaticResource BooleanToVisibilityConverter}}\" Width=\"32\" Height=\"32\" VerticalAlignment=\"Center\" Source=\"/Images/W10M/ic_done_2x.png\"/>\r\n                                </Grid>\r\n                            </DataTemplate>\r\n                        </ItemsControl.ItemTemplate>\r\n                    </ItemsControl>\r\n                </StackPanel>\r\n\r\n                <TextBlock Margin=\"12,18,12,18\" TextWrapping=\"Wrap\" TextAlignment=\"Center\" Text=\"{Binding AuthorizationFormHint}\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n            </StackPanel>\r\n        </ScrollViewer>\r\n\r\n        <Border Grid.Row=\"2\" Height=\"72\" Background=\"{StaticResource TelegramBadgeAccentBrush}\">\r\n            <Button x:Name=\"Authorize\" Style=\"{StaticResource ButtonStyle1}\">\r\n                <Button.Content>\r\n                    <StackPanel Orientation=\"Horizontal\">\r\n                        <Image Margin=\"0,-18,12,-18\" Width=\"14\" Height=\"20\" Stretch=\"UniformToFill\" VerticalAlignment=\"Center\" Source=\"/Images/W10M/authorize_2x.png\"/>\r\n                        <TextBlock FontWeight=\"SemiBold\" Text=\"{Binding Resources.Authorize, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\"/>\r\n                    </StackPanel>\r\n                </Button.Content>\r\n            </Button>\r\n        </Border>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/PassportView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels;\r\nusing TelegramClient.ViewModels.Passport;\r\nusing TelegramClient.Views.Payments;\r\n\r\nnamespace TelegramClient.Views.Passport\r\n{\r\n    public partial class PassportView\r\n    {\r\n        public PassportViewModel ViewModel\r\n        {\r\n            get { return DataContext as PassportViewModel; }\r\n        }\r\n\r\n        public PassportView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.Error))\r\n            {\r\n                if (ViewModel.Error != null)\r\n                {\r\n                    switch (ViewModel.Error)\r\n                    {\r\n                        case \"REQUIRED_TYPE\":\r\n                            var type = ViewModel.RequiredTypes.FirstOrDefault(x => !x.IsCompleted);\r\n                            if (type != null)\r\n                            {\r\n                                var control = Types.ItemContainerGenerator.ContainerFromItem(type) as FrameworkElement;\r\n                                if (control != null)\r\n                                {\r\n                                    ShippingInfoView.Shake(control);\r\n                                }\r\n                            }\r\n                            break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void AboutIcon_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ShellViewModel.ShowCustomMessageBox(\r\n                AppResources.PassportInfo, AppResources.PassportInfoTitle,\r\n                AppResources.Ok);\r\n        }\r\n\r\n        private void PassportView_OnBackKeyPress(object sender, CancelEventArgs e)\r\n        {\r\n            var popups = VisualTreeHelper.GetOpenPopups().ToList();\r\n            var popup = popups.FirstOrDefault();\r\n            if (popup != null)\r\n            {\r\n                e.Cancel = true;\r\n\r\n                return;\r\n            }\r\n\r\n            if (!ViewModel.IsCancelConfirmed)\r\n            {\r\n                e.Cancel = true;\r\n                ViewModel.Cancel();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/PasswordIntroView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Passport.PasswordIntroView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:additional=\"clr-namespace:TelegramClient.Views.Additional\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FEFFFFFF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\"\r\n    x:Name=\"Main\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <additional:SecureRequiredTypeToCaptionConverter x:Key=\"SecureValueTypeToStringConverter\"/>\r\n            <additional:SecureValueToHintConverter x:Key=\"SecureValueToHintConverter\"/>\r\n            <Style x:Key=\"ButtonStyle1\" TargetType=\"Button\">\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                <Setter Property=\"FontSize\" Value=\"23\"/>\r\n                <Setter Property=\"FontWeight\" Value=\"Normal\"/>\r\n                <Setter Property=\"Margin\" Value=\"12,-12\"/>\r\n                <Setter Property=\"VerticalAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"Padding\" Value=\"15,3,15,5\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"Button\">\r\n                            <Grid Background=\"Transparent\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Pressed\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0.7\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                    <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.TelegramPassport, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Grid Grid.Row=\"1\">\r\n            <StackPanel VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Width=\"480\">\r\n                <TextBlock Text=\"{Binding Resources.PassportSelfRequest, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Margin=\"18,0,18,0\" TextAlignment=\"Center\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                <Border x:Name=\"ImagePlaceholder\" Background=\"{StaticResource PhoneSubtleBrush}\" Width=\"100\" Height=\"184\" Opacity=\"0\" Margin=\"18,18,18,0\">\r\n                    <Border.OpacityMask>\r\n                        <ImageBrush ImageSource=\"/Images/W10M/no_password_2x.png\" Stretch=\"UniformToFill\" ImageOpened=\"ImageBrush_OnImageOpened\"/>\r\n                    </Border.OpacityMask>\r\n                </Border>\r\n                <TextBlock Text=\"{Binding Resources.TelegramPassportCreatePasswordInfo, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Margin=\"18,18,18,0\" TextAlignment=\"Center\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                <Button cal:Message.Attach=\"[Event Tap] = [Action CreatePassword]\" FontWeight=\"SemiBold\" Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" Margin=\"18,18,18,0\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" Content=\"{Binding Resources.TelegramPassportCreatePassword, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ButtonStyle1}\"/>\r\n            </StackPanel>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/PasswordIntroView.xaml.cs",
    "content": "﻿using System.Windows;\r\n\r\nnamespace TelegramClient.Views.Passport\r\n{\r\n    public partial class PasswordIntroView\r\n    {\r\n        public PasswordIntroView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void ImageBrush_OnImageOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            ImagePlaceholder.Opacity = 1.0;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/PersonalDetailsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Passport.PersonalDetailsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:passport=\"clr-namespace:TelegramClient.Views.Passport\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"20\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <converters:SecureFilePreviewConverter x:Key=\"SecureFilePreviewConverter\"/>\r\n            <passport:FileUploadingToOpacityConverter x:Key=\"FileUploadingToOpacityConverter\"/>\r\n            <passport:GenderToStringConverter x:Key=\"GenderToStringConverter\"/>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Caption, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Border Width=\"32\" Height=\"32\" Margin=\"18,36,18,18\" Opacity=\"{Binding IsFileUploading, Converter={StaticResource FileUploadingToOpacityConverter}}\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\" Background=\"{StaticResource PhoneForegroundBrush}\" Tap=\"DoneIcon_OnTap\">\r\n            <Border.OpacityMask>\r\n                <ImageBrush ImageSource=\"/Images/W10M/ic_done_2x.png\"/>\r\n            </Border.OpacityMask>\r\n        </Border>\r\n\r\n        <ScrollViewer x:Name=\"Scroll\" Grid.Row=\"1\">\r\n           \r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n\r\n                <ItemsControl Margin=\"0,18,0,0\"\r\n                    Visibility=\"{Binding Errors.Count, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter='0'}\"\r\n                    ItemsSource=\"{Binding Errors}\"\r\n                    IsHitTestVisible=\"False\" >\r\n                    <ItemsControl.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <TextBlock\r\n                                Margin=\"12,0,12,0\" \r\n                                Text=\"{Binding}\" \r\n                                TextTrimming=\"WordEllipsis\" \r\n                                TextWrapping=\"NoWrap\" \r\n                                FontSize=\"20\" \r\n                                Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                        </DataTemplate>\r\n                    </ItemsControl.ItemTemplate>\r\n                </ItemsControl>\r\n\r\n                <StackPanel Visibility=\"{Binding IsDataProofEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                    <TextBlock Text=\"{Binding DataProofCaption}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n\r\n                    <Grid Height=\"88\">\r\n                        <Button \r\n                            Visibility=\"{Binding FrontSide, Converter={StaticResource ExistsToVisibilityConverter}, ConverterParameter=invert}\"\r\n                            x:Name=\"AttachFrontSide\" \r\n                            toolkit:TiltEffect.IsTiltEnabled=\"True\" \r\n                            Margin=\"-12,0,-12,0\" \r\n                            Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <StackPanel>\r\n                                <TextBlock \r\n                                Margin=\"12,0,-12,0\" \r\n                                Text=\"{Binding FrontSideTitle}\" \r\n                                FontSize=\"27\" \r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                                <TextBlock\r\n                                Margin=\"12,2,-12,0\" \r\n                                Text=\"{Binding FrontSideSubtitle}\"\r\n                                FontSize=\"20\" \r\n                                Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            </StackPanel>\r\n                        </Button>\r\n\r\n                        <ListBoxItem\r\n                            x:Name=\"FrontSide\"\r\n                            VerticalAlignment=\"Center\"\r\n                            Visibility=\"{Binding FrontSide, Converter={StaticResource ExistsToVisibilityConverter}}\" \r\n                            Margin=\"12\" \r\n                            Background=\"Transparent\" \r\n                            cal:Message.Attach=\"[Event Hold] = [Action DeleteFrontSide]; [Event Tap] = [Action OpenScan($DataContext)]\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\"/>\r\n                                    <RowDefinition Height=\"Auto\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <Grid Grid.RowSpan=\"2\" Width=\"64\" Height=\"64\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n                                    <Image HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"UniformToFill\" Source=\"{Binding FrontSide.Self, Converter={StaticResource SecureFilePreviewConverter}}\"/>\r\n                                </Grid>\r\n\r\n                                <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,6,0\" Text=\"{Binding FrontSideTitle}\" FontSize=\"27\"/>\r\n                                <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"18,0,0,0\" Visibility=\"{Binding FrontSide.Error, Converter={StaticResource EmptyStringToVisibilityConverter}}\" >\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <TextBlock Grid.Column=\"0\" Margin=\"0\"\r\n                                        Visibility=\"{Binding FrontSide.UploadingProgress, Converter={StaticResource ProgressBetween0and1ToVisibilityConverter}}\"\r\n                                        Text=\"{Binding FrontSide.UploadingSize, Converter={StaticResource FileSizeConverter}, StringFormat='\\{0\\}/'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                    <TextBlock Grid.Column=\"1\" Margin=\"0\" Text=\"{Binding FrontSide.Size.Value, Converter={StaticResource FileSizeConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                    <TextBlock Grid.Column=\"2\" Margin=\"0\" Text=\"{Binding FrontSide.Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' • \\{0\\}'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                </Grid>\r\n                                <TextBlock Grid.Row=\"1\" Grid.Column=\"1\"\r\n                                    Visibility=\"{Binding FrontSide.Error, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                                    IsHitTestVisible=\"False\" \r\n                                    Margin=\"18,0\" \r\n                                    Text=\"{Binding FrontSide.Error}\" \r\n                                    TextTrimming=\"WordEllipsis\" \r\n                                    TextWrapping=\"NoWrap\" \r\n                                    FontSize=\"20\" \r\n                                    Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                            </Grid>\r\n                        </ListBoxItem>\r\n                    </Grid>\r\n\r\n                    <Grid Height=\"88\" Visibility=\"{Binding IsDataProofReverseEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <Button \r\n                            Visibility=\"{Binding ReverseSide, Converter={StaticResource ExistsToVisibilityConverter}, ConverterParameter=invert}\"\r\n                            x:Name=\"AttachReverseSide\" \r\n                            toolkit:TiltEffect.IsTiltEnabled=\"True\" \r\n                            Margin=\"-12,0,-12,0\" \r\n                            Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <StackPanel>\r\n                                <TextBlock \r\n                                Margin=\"12,0,-12,0\" \r\n                                Text=\"{Binding Resources.PassportReverseSide, Source={StaticResource Strings}}\" \r\n                                FontSize=\"27\" \r\n                                FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                                <TextBlock\r\n                                Margin=\"12,2,-12,0\" \r\n                                Text=\"{Binding Resources.PassportReverseSideInfo, Source={StaticResource Strings}}\"\r\n                                FontSize=\"20\" \r\n                                Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            </StackPanel>\r\n                        </Button>\r\n\r\n                        <ListBoxItem\r\n                            x:Name=\"ReverseSide\"\r\n                            VerticalAlignment=\"Center\"\r\n                            Visibility=\"{Binding ReverseSide, Converter={StaticResource ExistsToVisibilityConverter}}\" \r\n                            Margin=\"12\" \r\n                            Background=\"Transparent\" \r\n                            cal:Message.Attach=\"[Event Hold] = [Action DeleteReverseSide]; [Event Tap] = [Action OpenScan($DataContext)]\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\"/>\r\n                                    <RowDefinition Height=\"Auto\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <Grid Grid.RowSpan=\"2\" Width=\"64\" Height=\"64\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n                                    <Image HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"UniformToFill\" Source=\"{Binding ReverseSide.Self, Converter={StaticResource SecureFilePreviewConverter}}\"/>\r\n                                </Grid>\r\n\r\n                                <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,6,0\" Text=\"{Binding Resources.PassportReverseSide, Source={StaticResource Strings}}\" FontSize=\"27\"/>\r\n                                <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"18,0,0,0\" Visibility=\"{Binding ReverseSide.Error, Converter={StaticResource EmptyStringToVisibilityConverter}}\" >\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <TextBlock Grid.Column=\"0\" Margin=\"0\"\r\n                                        Visibility=\"{Binding ReverseSide.UploadingProgress, Converter={StaticResource ProgressBetween0and1ToVisibilityConverter}}\"\r\n                                        Text=\"{Binding ReverseSide.UploadingSize, Converter={StaticResource FileSizeConverter}, StringFormat='\\{0\\}/'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                    <TextBlock Grid.Column=\"1\" Margin=\"0\" Text=\"{Binding ReverseSide.Size.Value, Converter={StaticResource FileSizeConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                    <TextBlock Grid.Column=\"2\" Margin=\"0\" Text=\"{Binding ReverseSide.Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' • \\{0\\}'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                </Grid>\r\n                                <TextBlock Grid.Row=\"1\" Grid.Column=\"1\"\r\n                                    Visibility=\"{Binding ReverseSide.Error, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                                    IsHitTestVisible=\"False\" \r\n                                    Margin=\"18,0\" \r\n                                    Text=\"{Binding ReverseSide.Error}\" \r\n                                    TextTrimming=\"WordEllipsis\" \r\n                                    TextWrapping=\"NoWrap\" \r\n                                    FontSize=\"20\" \r\n                                    Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                            </Grid>\r\n                        </ListBoxItem>\r\n\r\n                    </Grid>\r\n\r\n                    <Grid Height=\"88\" Visibility=\"{Binding IsDataProofSelfieEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <Button\r\n                            Visibility=\"{Binding Selfie, Converter={StaticResource ExistsToVisibilityConverter}, ConverterParameter=invert}\"\r\n                            x:Name=\"AttachSelfie\" \r\n                            toolkit:TiltEffect.IsTiltEnabled=\"True\" \r\n                            Margin=\"-12,0,-12,0\"\r\n                            Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <StackPanel>\r\n                                <TextBlock \r\n                                    Margin=\"12,0,-12,0\" \r\n                                    Text=\"{Binding Resources.PassportSelfie, Source={StaticResource Strings}}\" \r\n                                    FontSize=\"27\" \r\n                                    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                                <TextBlock\r\n                                    Margin=\"12,2,-12,0\" \r\n                                    Text=\"{Binding Resources.PassportSelfieInfo, Source={StaticResource Strings}}\"\r\n                                    FontSize=\"20\" \r\n                                    Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                            </StackPanel>\r\n                        </Button>\r\n\r\n                        <ListBoxItem\r\n                            x:Name=\"Selfie\"\r\n                            VerticalAlignment=\"Center\"\r\n                            Visibility=\"{Binding Selfie, Converter={StaticResource ExistsToVisibilityConverter}}\" \r\n                            Margin=\"12\" \r\n                            Background=\"Transparent\" \r\n                            cal:Message.Attach=\"[Event Hold] = [Action DeleteSelfie]; [Event Tap] = [Action OpenScan($DataContext)]\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\"/>\r\n                                    <RowDefinition Height=\"Auto\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <Grid Grid.RowSpan=\"2\" Width=\"64\" Height=\"64\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n                                    <Image HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"UniformToFill\" Source=\"{Binding Selfie.Self, Converter={StaticResource SecureFilePreviewConverter}}\"/>\r\n                                </Grid>\r\n\r\n                                <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,6,0\" Text=\"{Binding Resources.PassportSelfie, Source={StaticResource Strings}}\" FontSize=\"27\"/>\r\n                                <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"18,0,0,0\" Visibility=\"{Binding Selfie.Error, Converter={StaticResource EmptyStringToVisibilityConverter}}\" >\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <TextBlock Grid.Column=\"0\" Margin=\"0\"\r\n                                        Visibility=\"{Binding Selfie.UploadingProgress, Converter={StaticResource ProgressBetween0and1ToVisibilityConverter}}\"\r\n                                        Text=\"{Binding Selfie.UploadingSize, Converter={StaticResource FileSizeConverter}, StringFormat='\\{0\\}/'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                    <TextBlock Grid.Column=\"1\" Margin=\"0\" Text=\"{Binding Selfie.Size.Value, Converter={StaticResource FileSizeConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                    <TextBlock Grid.Column=\"2\" Margin=\"0\" Text=\"{Binding Selfie.Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' • \\{0\\}'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                </Grid>\r\n                                <TextBlock Grid.Row=\"1\" Grid.Column=\"1\"\r\n                                    Visibility=\"{Binding Selfie.Error, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                                    IsHitTestVisible=\"False\" \r\n                                    Margin=\"18,0\" \r\n                                    Text=\"{Binding Selfie.Error}\" \r\n                                    TextTrimming=\"WordEllipsis\" \r\n                                    TextWrapping=\"NoWrap\" \r\n                                    FontSize=\"20\" \r\n                                    Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                            </Grid>\r\n                        </ListBoxItem>\r\n                    </Grid>\r\n                    \r\n                    <TextBlock Margin=\"12,12,12,12\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.PassportPersonalUploadInfo, Source={StaticResource Strings}}\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                    <StackPanel Visibility=\"{Binding IsDataProofTranslationEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <TextBlock Text=\"{Binding Resources.PassportTranslation, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n                        <ItemsControl x:Name=\"Translations\" ItemsSource=\"{Binding Translations}\" toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                            <ItemsControl.ItemTemplate>\r\n                                <DataTemplate>\r\n                                    <ListBoxItem Margin=\"12\" Background=\"Transparent\" cal:Message.Attach=\"[Event Hold] = [Action DeleteFile($DataContext)]; [Event Tap] = [Action OpenScan($DataContext)]\">\r\n                                        <Grid>\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"Auto\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"Auto\"/>\r\n                                                <RowDefinition Height=\"Auto\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid Grid.RowSpan=\"2\" Width=\"64\" Height=\"64\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n                                                <Image HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"UniformToFill\" Source=\"{Binding Self, Converter={StaticResource SecureFilePreviewConverter}}\"/>\r\n                                            </Grid>\r\n\r\n                                            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,6,0\" Text=\"{Binding Resources.Photo, Source={StaticResource Strings}}\" FontSize=\"27\"/>\r\n                                            <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"18,0,0,0\"\r\n                                                Visibility=\"{Binding Error, Converter={StaticResource EmptyStringToVisibilityConverter}}\" >\r\n                                                <Grid.ColumnDefinitions>\r\n                                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                                    <ColumnDefinition Width=\"*\"/>\r\n                                                </Grid.ColumnDefinitions>\r\n                                                <TextBlock Grid.Column=\"0\" Margin=\"0\"\r\n                                                    Visibility=\"{Binding UploadingProgress, Converter={StaticResource ProgressBetween0and1ToVisibilityConverter}}\"\r\n                                                    Text=\"{Binding UploadingSize, Converter={StaticResource FileSizeConverter}, StringFormat='\\{0\\}/'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                                <TextBlock Grid.Column=\"1\" Margin=\"0\" Text=\"{Binding Size.Value, Converter={StaticResource FileSizeConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                                <TextBlock Grid.Column=\"2\" Margin=\"0\" Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' • \\{0\\}'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                            </Grid>\r\n                                            <TextBlock Grid.Row=\"1\" Grid.Column=\"1\"\r\n                                                Visibility=\"{Binding Error, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                                                IsHitTestVisible=\"False\" \r\n                                                Margin=\"18,0\" \r\n                                                Text=\"{Binding Error}\" \r\n                                                TextTrimming=\"WordEllipsis\" \r\n                                                TextWrapping=\"NoWrap\" \r\n                                                FontSize=\"20\" \r\n                                                Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                                        </Grid>\r\n                                    </ListBoxItem>\r\n                                </DataTemplate>\r\n                            </ItemsControl.ItemTemplate>\r\n                        </ItemsControl>\r\n                        <Button x:Name=\"AttachTranslation\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0,-12,0\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <StackPanel>\r\n                                <TextBlock Margin=\"12,0,-12,0\" Text=\"{Binding DataContext.AttachDocumentCommand, ElementName=ContentPanel}\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                                <TextBlock \r\n                                    Visibility=\"{Binding TranslationsError, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                                    IsHitTestVisible=\"False\" \r\n                                    Margin=\"12,2,12,0\" \r\n                                    Text=\"{Binding TranslationsError}\" \r\n                                    TextTrimming=\"None\" \r\n                                    TextWrapping=\"Wrap\" \r\n                                    FontSize=\"20\" \r\n                                    Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                            </StackPanel>\r\n                        </Button>\r\n\r\n                        <TextBlock Margin=\"12,12,12,12\" TextWrapping=\"Wrap\" Text=\"{Binding AttachTranslationHint}\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </StackPanel>\r\n\r\n                </StackPanel>\r\n\r\n                <StackPanel>\r\n                    <TextBlock Text=\"{Binding Resources.PassportPersonalDetails, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n\r\n                    <StackPanel Visibility=\"{Binding IsDataEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <controls1:LabeledTextBox \r\n                            x:Name=\"FirstNameLabel\" \r\n                            Label=\"{Binding FirstNameHint}\" \r\n                            Text=\"{Binding FirstName, Mode=TwoWay}\"\r\n                            Error=\"{Binding FirstNameError}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                                <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=MiddleNameLabel}\"/>\r\n                            </i:Interaction.Behaviors>\r\n                        </controls1:LabeledTextBox>\r\n                        <controls1:LabeledTextBox \r\n                            x:Name=\"MiddleNameLabel\" \r\n                            Label=\"{Binding MiddleNameHint}\" \r\n                            Text=\"{Binding MiddleName, Mode=TwoWay}\"\r\n                            Error=\"{Binding MiddleNameError}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                                <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=LastNameLabel}\"/>\r\n                            </i:Interaction.Behaviors>\r\n                        </controls1:LabeledTextBox>\r\n                        <controls1:LabeledTextBox \r\n                            x:Name=\"LastNameLabel\" \r\n                            Label=\"{Binding LastNameHint}\" \r\n                            Text=\"{Binding LastName, Mode=TwoWay}\"\r\n                            Error=\"{Binding LastNameError}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </controls1:LabeledTextBox>\r\n                        <Button x:Name=\"SelectBirthDate\" HorizontalContentAlignment=\"Stretch\" Padding=\"15,4,15,4\" FontSize=\"23\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Path Grid.Column=\"1\" Data=\"M0,0 9,9 18,0\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\"/>\r\n                                <TextBlock Visibility=\"{Binding BirthDate, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" Text=\"{Binding BirthDate}\"/>\r\n                                <TextBlock Visibility=\"{Binding BirthDate, Converter={StaticResource EmptyStringToVisibilityConverter}}\" Text=\"{Binding Resources.PassportBirthdate, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                            </Grid>\r\n                        </Button>\r\n                        <TextBlock \r\n                            Visibility=\"{Binding BirthDateError, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                            IsHitTestVisible=\"False\" \r\n                            Margin=\"12,-6,12,12\" \r\n                            Text=\"{Binding BirthDateError}\" \r\n                            TextTrimming=\"None\" \r\n                            TextWrapping=\"Wrap\" \r\n                            FontSize=\"20\" \r\n                            Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                        <Button x:Name=\"SelectGender\" HorizontalContentAlignment=\"Stretch\" Padding=\"15,4,15,4\" FontSize=\"23\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Path Grid.Column=\"1\" Data=\"M0,0 9,9 18,0\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\"/>\r\n                                <TextBlock Visibility=\"{Binding Gender, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" Text=\"{Binding Gender, Converter={StaticResource GenderToStringConverter}}\"/>\r\n                                <TextBlock Visibility=\"{Binding Gender, Converter={StaticResource EmptyStringToVisibilityConverter}}\" Text=\"{Binding Resources.PassportGender, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                            </Grid>\r\n                        </Button>\r\n                        <TextBlock \r\n                            Visibility=\"{Binding GenderError, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                            IsHitTestVisible=\"False\" \r\n                            Margin=\"12,-6,12,12\" \r\n                            Text=\"{Binding GenderError}\" \r\n                            TextTrimming=\"None\" \r\n                            TextWrapping=\"Wrap\" \r\n                            FontSize=\"20\" \r\n                            Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                        <Button x:Name=\"SelectCountry\" HorizontalContentAlignment=\"Stretch\" Padding=\"15,4,15,4\" FontSize=\"23\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Path Grid.Column=\"1\" Data=\"M0,0 9,9 18,0\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\"/>\r\n                                <TextBlock Visibility=\"{Binding SelectedCountry, Converter={StaticResource ExistsToVisibilityConverter}}\" Text=\"{Binding SelectedCountry.Name}\"/>\r\n                                <TextBlock Visibility=\"{Binding SelectedCountry, Converter={StaticResource ExistsToVisibilityConverter}, ConverterParameter=invert}\" Text=\"{Binding Resources.PassportCitizenship, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                            </Grid>\r\n                        </Button>\r\n                        <TextBlock \r\n                            Visibility=\"{Binding SelectedCountryError, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                            IsHitTestVisible=\"False\" \r\n                            Margin=\"12,-6,12,12\" \r\n                            Text=\"{Binding SelectedCountryError}\" \r\n                            TextTrimming=\"None\" \r\n                            TextWrapping=\"Wrap\" \r\n                            FontSize=\"20\" \r\n                            Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                        <Button x:Name=\"SelectResidenceCountry\" HorizontalContentAlignment=\"Stretch\" Padding=\"15,4,15,4\" FontSize=\"23\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Path Grid.Column=\"1\" Data=\"M0,0 9,9 18,0\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\"/>\r\n                                <TextBlock Visibility=\"{Binding SelectedResidenceCountry, Converter={StaticResource ExistsToVisibilityConverter}}\" Text=\"{Binding SelectedResidenceCountry.Name}\"/>\r\n                                <TextBlock Visibility=\"{Binding SelectedResidenceCountry, Converter={StaticResource ExistsToVisibilityConverter}, ConverterParameter=invert}\" Text=\"{Binding Resources.PassportResidence, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                            </Grid>\r\n                        </Button>\r\n                        <TextBlock \r\n                            Visibility=\"{Binding SelectedResidenceCountryError, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                            IsHitTestVisible=\"False\" \r\n                            Margin=\"12,-6,12,12\" \r\n                            Text=\"{Binding SelectedResidenceCountryError}\" \r\n                            TextTrimming=\"None\" \r\n                            TextWrapping=\"Wrap\" \r\n                            FontSize=\"20\" \r\n                            Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                    </StackPanel>\r\n\r\n                    <StackPanel Visibility=\"{Binding IsDataProofEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <controls1:LabeledTextBox \r\n                            x:Name=\"DocumentNumberLabel\" \r\n                            Label=\"{Binding Resources.PassportDocumentNumber, Source={StaticResource Strings}}\" \r\n                            Text=\"{Binding DocumentNumber, Mode=TwoWay}\"\r\n                            Error=\"{Binding DocumentNumberError}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </controls1:LabeledTextBox>\r\n                        <Button x:Name=\"SelectExpiryDate\" HorizontalContentAlignment=\"Stretch\" Padding=\"15,4,15,4\" FontSize=\"23\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\">\r\n                            <Grid>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Path Grid.Column=\"1\" Data=\"M0,0 9,9 18,0\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\"/>\r\n                                <TextBlock Visibility=\"{Binding ExpiryDate, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" Text=\"{Binding ExpiryDate}\"/>\r\n                                <TextBlock Visibility=\"{Binding ExpiryDate, Converter={StaticResource EmptyStringToVisibilityConverter}}\" Text=\"{Binding Resources.PassportExpired, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                            </Grid>\r\n                        </Button>\r\n                        <TextBlock \r\n                            Visibility=\"{Binding ExpiryDateError, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                            IsHitTestVisible=\"False\" \r\n                            Margin=\"12,-6,12,12\" \r\n                            Text=\"{Binding ExpiryDateError}\" \r\n                            TextTrimming=\"None\" \r\n                            TextWrapping=\"Wrap\" \r\n                            FontSize=\"20\" \r\n                            Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                    </StackPanel>\r\n                </StackPanel>\r\n\r\n                <StackPanel Visibility=\"{Binding IsDataNativeNamesVisible, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                    <TextBlock Text=\"{Binding Resources.PassportNativeHeader, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n\r\n                    <controls1:LabeledTextBox \r\n                            x:Name=\"FirstNameNativeLabel\" \r\n                            Label=\"{Binding FirstNameNativeHint}\" \r\n                            Text=\"{Binding FirstNameNative, Mode=TwoWay}\"\r\n                            Error=\"{Binding FirstNameNativeError}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=MiddleNameNativeLabel}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox \r\n                            x:Name=\"MiddleNameNativeLabel\" \r\n                            Label=\"{Binding MiddleNameNativeHint}\" \r\n                            Text=\"{Binding MiddleNameNative, Mode=TwoWay}\"\r\n                            Error=\"{Binding MiddleNameNativeError}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=LastNameNativeLabel}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox \r\n                            x:Name=\"LastNameNativeLabel\" \r\n                            Label=\"{Binding LastNameNativeHint}\" \r\n                            Text=\"{Binding LastNameNative, Mode=TwoWay}\"\r\n                            Error=\"{Binding LastNameNativeError}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n\r\n                    <TextBlock Margin=\"12,12,12,12\" TextWrapping=\"Wrap\" Text=\"{Binding PassportNativeFooter}\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </StackPanel>\r\n\r\n                <Button x:Name=\"Delete\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0,-12,18\" Visibility=\"{Binding IsDeleteEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <TextBlock Margin=\"12,0,-12,0\" Text=\"{Binding DeleteCommand}\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                </Button>\r\n            </StackPanel>\r\n            \r\n        </ScrollViewer>\r\n        \r\n        <ContentControl x:Name=\"ImageViewer\" Grid.RowSpan=\"2\"\r\n            VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n            VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/PersonalDetailsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.Resources;\r\nusing TelegramClient.ViewModels.Passport;\r\nusing TelegramClient.Views.Payments;\r\n\r\nnamespace TelegramClient.Views.Passport\r\n{\r\n    public partial class PersonalDetailsView\r\n    {\r\n        public PersonalDetailsViewModel ViewModel\r\n        {\r\n            get { return DataContext as PersonalDetailsViewModel; }\r\n        }\r\n\r\n        public PersonalDetailsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n            \r\n            Loaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer)\r\n                && ViewModel.ImageViewer != null)\r\n            {\r\n                ViewModel.ImageViewer.PropertyChanged += OnImageViewerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.Error))\r\n            {\r\n                if (ViewModel.Error != null)\r\n                {\r\n                    var type = ViewModel.Error.GetErrorType();\r\n                    switch (type)\r\n                    {\r\n                        case ErrorType.ADDRESS_COUNTRY_INVALID:\r\n                            ScrollIntoViewAndShake(SelectCountry);\r\n                            break;\r\n                        case ErrorType.ADDRESS_RESIDENCE_COUNTRY_INVALID:\r\n                            ScrollIntoViewAndShake(SelectResidenceCountry);\r\n                            break;\r\n                        case ErrorType.FIRSTNAME_INVALID:\r\n                            ScrollIntoViewAndShake(FirstNameLabel);\r\n                            break;\r\n                        case ErrorType.MIDDLENAME_INVALID:\r\n                            ScrollIntoViewAndShake(MiddleNameLabel);\r\n                            break;\r\n                        case ErrorType.LASTNAME_INVALID:\r\n                            ScrollIntoViewAndShake(LastNameLabel);\r\n                            break;\r\n                        case ErrorType.BIRTHDATE_INVALID:\r\n                            ScrollIntoViewAndShake(SelectBirthDate);\r\n                            break;\r\n                        case ErrorType.GENDER_INVALID:\r\n                            ScrollIntoViewAndShake(SelectGender);\r\n                            break;\r\n                        case ErrorType.DOCUMENT_NUMBER_INVALID:\r\n                            ScrollIntoViewAndShake(DocumentNumberLabel);\r\n                            break;\r\n                        case ErrorType.EXPIRYDATE_INVALID:\r\n                            ScrollIntoViewAndShake(SelectExpiryDate);\r\n                            break;\r\n                        case ErrorType.FIRSTNAMENATIVE_INVALID:\r\n                            ScrollIntoViewAndShake(FirstNameNativeLabel);\r\n                            break;\r\n                        case ErrorType.MIDDLENAMENATIVE_INVALID:\r\n                            ScrollIntoViewAndShake(MiddleNameNativeLabel);\r\n                            break;\r\n                        case ErrorType.LASTNAMENATIVE_INVALID:\r\n                            ScrollIntoViewAndShake(LastNameNativeLabel);\r\n                            break;\r\n                        case ErrorType.FRONT_SIDE_REQUIRED:\r\n                            ScrollIntoViewAndShake(AttachFrontSide);\r\n                            ScrollIntoViewAndShake(FrontSide);\r\n                            break;\r\n                        case ErrorType.REVERSE_SIDE_REQUIRED:\r\n                            ScrollIntoViewAndShake(AttachReverseSide);\r\n                            ScrollIntoViewAndShake(ReverseSide);\r\n                            break;\r\n                        case ErrorType.SELFIE_REQUIRED:\r\n                            ScrollIntoViewAndShake(AttachSelfie);\r\n                            ScrollIntoViewAndShake(Selfie);\r\n                            break;\r\n                        case ErrorType.FILE_ERROR:\r\n                            var frontSide = ViewModel.FrontSide as ISecureFileError;\r\n                            var reverseSide = ViewModel.ReverseSide as ISecureFileError;\r\n                            var selfie = ViewModel.Selfie as ISecureFileError;\r\n                            if (frontSide != null && !string.IsNullOrEmpty(frontSide.Error))\r\n                            {\r\n                                ScrollIntoViewAndShake(FrontSide);\r\n                            }\r\n                            else if (reverseSide != null && !string.IsNullOrEmpty(reverseSide.Error))\r\n                            {\r\n                                ScrollIntoViewAndShake(ReverseSide);\r\n                            }\r\n                            else if (selfie != null && !string.IsNullOrEmpty(selfie.Error))\r\n                            {\r\n                                ScrollIntoViewAndShake(Selfie);\r\n                            }\r\n                            break;\r\n                        case ErrorType.TRANSLATION_EMPTY:\r\n                            ScrollIntoViewAndShake(AttachTranslation);\r\n                            break;\r\n                        case ErrorType.TRANSLATION_ERROR:\r\n                            if (ViewModel.Translations != null)\r\n                            {\r\n                                var file = ViewModel.Translations.OfType<ISecureFileError>().FirstOrDefault(x => !string.IsNullOrEmpty(x.Error));\r\n                                if (file != null)\r\n                                {\r\n                                    var control = Translations.ItemContainerGenerator.ContainerFromItem(file) as FrameworkElement;\r\n                                    if (control != null)\r\n                                    {\r\n                                        ScrollIntoViewAndShake(control);\r\n                                    }\r\n                                }\r\n                            }\r\n                            break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ScrollIntoViewAndShake(FrameworkElement element)\r\n        {\r\n            var duration = TimeSpan.FromSeconds(0.15);\r\n\r\n            Scroll.ScrollIntoView(element, 0.0, 128.0, duration);\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(duration, () => ShippingInfoView.Shake(element));\r\n        }\r\n\r\n        private void OnImageViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer.IsOpen))\r\n            {\r\n                Scroll.IsHitTestVisible = !ViewModel.ImageViewer.IsOpen;\r\n            }\r\n        }\r\n\r\n        private void DoneIcon_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n    }\r\n\r\n    public class GenderToStringConverter : IValueConverter\r\n    {\r\n        public static string Convert(string gender)\r\n        {\r\n            if (string.Equals(gender, \"male\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return AppResources.PassportMale;\r\n            }\r\n            if (string.Equals(gender, \"female\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return AppResources.PassportFemale;\r\n            }\r\n\r\n            return gender;\r\n        }\r\n\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            var gender = value as string;\r\n            if (gender != null)\r\n            {\r\n                return Convert(gender);\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/PhoneNumberCodeView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Passport.PhoneNumberCodeView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:chats=\"clr-namespace:TelegramClient.Views.Chats\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"20\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.PassportPhone, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Border Width=\"32\" Height=\"32\" Margin=\"18,36,18,18\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\" Background=\"{StaticResource PhoneForegroundBrush}\" Tap=\"DoneIcon_OnTap\">\r\n            <Border.OpacityMask>\r\n                <ImageBrush ImageSource=\"/Images/W10M/ic_done_2x.png\"/>\r\n            </Border.OpacityMask>\r\n        </Border>\r\n\r\n        <Grid x:Name=\"ContentPanel\" Grid.Row=\"1\" Margin=\"6,0\">\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"Auto\"/>\r\n                <RowDefinition Height=\"*\"/>\r\n            </Grid.RowDefinitions>\r\n            <StackPanel Grid.Row=\"0\">\r\n                <RichTextBox Margin=\"0,18,0,0\" TextWrapping=\"Wrap\" chats:ConvertToSupergroupView.FormattedText=\"{Binding Subtitle}\"/>\r\n                <TextBox x:Name=\"Code\" InputScope=\"Number\" MaxLength=\"{Binding CodeLength}\" Style=\"{StaticResource SignInTextBoxStyle}\">\r\n                    <i:Interaction.Behaviors>\r\n                        <behaviors:UpdateTextBindingBehavior/>\r\n                    </i:Interaction.Behaviors>\r\n                </TextBox>\r\n            </StackPanel>\r\n\r\n            <StackPanel Grid.Row=\"1\" Margin=\"0,-100,0,0\">\r\n                <TextBlock Margin=\"12,12,12,0\" Text=\"{Binding TimeCounterString}\"/>\r\n                <RichTextBox Margin=\"0,12,0,0\" Visibility=\"{Binding ResendCodeVisibility}\">\r\n                    <Paragraph>\r\n                        <Hyperlink Foreground=\"{StaticResource TelegramBadgeAccentBrush}\" Click=\"ResendCode_OnClick\">\r\n                            <Run Text=\"{Binding Resources.HaveNotReceivedCode, Source={StaticResource Strings}}\"/>\r\n                        </Hyperlink>\r\n                    </Paragraph>\r\n                </RichTextBox>\r\n            </StackPanel>\r\n        </Grid>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/PhoneNumberCodeView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing Telegram.Api.Helpers;\r\nusing TelegramClient.ViewModels.Passport;\r\n\r\nnamespace TelegramClient.Views.Passport\r\n{\r\n    public partial class PhoneNumberCodeView\r\n    {\r\n        public PhoneNumberCodeViewModel ViewModel\r\n        {\r\n            get { return DataContext as PhoneNumberCodeViewModel; }\r\n        }\r\n\r\n        public PhoneNumberCodeView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) => Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.3), () => Code.Focus());\r\n        }\r\n\r\n        private void ResendCode_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            ViewModel.Resend();\r\n        }\r\n\r\n        private void DoneIcon_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Confirm();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/PhoneNumberView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Passport.PhoneNumberView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"20\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.PassportPhone, Source={StaticResource Strings}, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Border Width=\"32\" Height=\"32\" Margin=\"18,36,18,18\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\" Background=\"{StaticResource PhoneForegroundBrush}\" Tap=\"DoneIcon_OnTap\">\r\n            <Border.OpacityMask>\r\n                <ImageBrush ImageSource=\"/Images/W10M/ic_done_2x.png\"/>\r\n            </Border.OpacityMask>\r\n        </Border>\r\n\r\n        <ScrollViewer x:Name=\"Scroll\" Grid.Row=\"1\">\r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n                <StackPanel>\r\n                    <Button x:Name=\"UseCurrentPhone\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,18,-12,0\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"12,0,-12,0\" Text=\"{Binding DataContext.UseCurrentPhoneCommand, ElementName=ContentPanel}\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                            <!--<TextBlock Margin=\"12,2,-12,0\" Text=\"{Binding ResidentialAddressHint}\" Style=\"{StaticResource PhoneTextNormalStyle}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>-->\r\n                        </StackPanel>\r\n                    </Button>\r\n                    <TextBlock Margin=\"12,12,12,12\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.PassportPhoneUseSameInfo, Source={StaticResource Strings}}\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                    <TextBlock Text=\"{Binding Resources.PassportPhoneUseOther, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>                   \r\n                    <Button x:Name=\"SelectCountry\" HorizontalContentAlignment=\"Stretch\" Padding=\"15,4,15,4\" FontSize=\"23\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\">\r\n                        <Grid>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Path Grid.Column=\"1\" Data=\"M0,0 9,9 18,0\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\"/>\r\n                            <TextBlock Visibility=\"{Binding SelectedCountry, Converter={StaticResource ExistsToVisibilityConverter}}\" Text=\"{Binding SelectedCountry.Name}\"/>\r\n                            <TextBlock Visibility=\"{Binding SelectedCountry, Converter={StaticResource ExistsToVisibilityConverter}, ConverterParameter=invert}\" Text=\"{Binding Resources.PassportCountry, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </Grid>\r\n                    </Button>\r\n                    <Grid Margin=\"0,0,0,18\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <TextBox x:Name=\"PCode\" Width=\"110\" MaxLength=\"4\" InputScope=\"TelephoneCountryCode\" KeyDown=\"PCode_OnKeyDown\" Text=\"{Binding PhoneCode, Mode=TwoWay}\" Style=\"{StaticResource PCodeTextBoxStyle}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </TextBox>\r\n                        <TextBox x:Name=\"PhoneNumber\" Grid.Column=\"1\" InputScope=\"TelephoneLocalNumber\" KeyDown=\"PhoneNumber_OnKeyDown\" Style=\"{StaticResource SignInTextBoxStyle}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </TextBox>\r\n                    </Grid>\r\n                    <TextBlock Margin=\"12,-100,12,12\" TextWrapping=\"Wrap\" Text=\"{Binding Resources.PassportPhoneUploadInfo, Source={StaticResource Strings}}\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                </StackPanel>\r\n            </StackPanel>\r\n        </ScrollViewer>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/PhoneNumberView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System.Linq;\r\nusing System.Windows.Input;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Passport;\r\n\r\nnamespace TelegramClient.Views.Passport\r\n{\r\n    public partial class PhoneNumberView\r\n    {\r\n        public PhoneNumberViewModel ViewModel\r\n        {\r\n            get { return DataContext as PhoneNumberViewModel; }\r\n        }\r\n\r\n        public PhoneNumberView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void DoneIcon_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n\r\n        private void PhoneNumber_OnKeyDown(object sender, KeyEventArgs args)\r\n        {\r\n            if (args.Key == Key.D8 ||\r\n                args.Key == Key.Unknown ||\r\n                args.Key == Key.D3 ||\r\n                args.Key == Key.A ||\r\n                args.Key == Key.Space)\r\n            {\r\n                args.Handled = true;\r\n            }\r\n\r\n            if (args.Key == Key.Back && PhoneNumber.Text.Length == 0)\r\n            {\r\n                args.Handled = true;\r\n                PCode.Focus();\r\n                PCode.Select(PCode.Text.Length, 0);\r\n            }\r\n        }\r\n\r\n        private void PCode_OnKeyDown(object sender, KeyEventArgs args)\r\n        {\r\n            if (args.Key == Key.D8 || // *\r\n                    args.Key == Key.Unknown || // +(long tap on 0) or -/.\r\n                    args.Key == Key.D3 || // #\r\n                    args.Key == Key.A)\r\n            {\r\n\r\n                args.Handled = true;\r\n            }\r\n\r\n            if (args.Key == Key.Space)\r\n            {\r\n                args.Handled = true;\r\n                PhoneNumber.Focus();\r\n            }\r\n\r\n            if (args.Key >= Key.NumPad0 && args.Key <= Key.NumPad9\r\n                && PCode.Text.Length == 3)\r\n            {\r\n                var codeTail = string.Empty;\r\n                if (ViewModel.IsPhoneCodeInvalid)\r\n                {\r\n                    var countryCode2 = CountryUtils.CountriesSource.FirstOrDefault(x => x.PhoneCode == PCode.Text.Substring(0, 2));\r\n                    if (countryCode2 != null)\r\n                    {\r\n                        codeTail = PCode.Text.Substring(2, 1);\r\n                        PCode.Text = PCode.Text.Substring(0, 2);\r\n                    }\r\n\r\n                    var countryCode1 = CountryUtils.CountriesSource.FirstOrDefault(x => x.PhoneCode == PCode.Text.Substring(0, 1));\r\n                    if (countryCode1 != null)\r\n                    {\r\n                        codeTail = PCode.Text.Substring(1, 2);\r\n                        PCode.Text = PCode.Text.Substring(0, 1);\r\n                    }\r\n                }\r\n\r\n\r\n                args.Handled = true;\r\n                PhoneNumber.Text = codeTail + args.Key.ToString().Replace(\"NumPad\", string.Empty) + PhoneNumber.Text;\r\n                PhoneNumber.SelectionStart = codeTail.Length + 1;\r\n                PhoneNumber.Focus();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/ResidentialAddressView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Passport.ResidentialAddressView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:passport=\"clr-namespace:TelegramClient.Views.Passport\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"20\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <converters:SecureFilePreviewConverter x:Key=\"SecureFilePreviewConverter\"/>\r\n            <passport:FileUploadingToOpacityConverter x:Key=\"FileUploadingToOpacityConverter\"/>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Caption, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <Border Width=\"32\" Height=\"32\" Margin=\"18,36,18,18\" Opacity=\"{Binding IsFileUploading, Converter={StaticResource FileUploadingToOpacityConverter}}\" VerticalAlignment=\"Bottom\" HorizontalAlignment=\"Right\" Background=\"{StaticResource PhoneForegroundBrush}\" Tap=\"DoneIcon_OnTap\">\r\n            <Border.OpacityMask>\r\n                <ImageBrush ImageSource=\"/Images/W10M/ic_done_2x.png\"/>\r\n            </Border.OpacityMask>\r\n        </Border>\r\n\r\n        <ScrollViewer x:Name=\"Scroll\" Grid.Row=\"1\">\r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n\r\n                <ItemsControl Margin=\"0,18,0,0\"\r\n                    Visibility=\"{Binding Errors.Count, Converter={StaticResource CountMoreThanToVisibilityConverter}, ConverterParameter='0'}\"\r\n                    ItemsSource=\"{Binding Errors}\"\r\n                    IsHitTestVisible=\"False\" >\r\n                    <ItemsControl.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <TextBlock\r\n                                Margin=\"12,0,12,0\" \r\n                                Text=\"{Binding}\" \r\n                                TextTrimming=\"WordEllipsis\" \r\n                                TextWrapping=\"NoWrap\" \r\n                                FontSize=\"20\" \r\n                                Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                        </DataTemplate>\r\n                    </ItemsControl.ItemTemplate>\r\n                </ItemsControl>\r\n                \r\n                <StackPanel Visibility=\"{Binding IsDataProofEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                    <TextBlock Text=\"{Binding Resources.PassportDocuments, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n                    <ItemsControl x:Name=\"Files\" ItemsSource=\"{Binding Files}\" toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                        <ItemsControl.ItemTemplate>\r\n                            <DataTemplate>\r\n                                <ListBoxItem Margin=\"12\" Background=\"Transparent\" cal:Message.Attach=\"[Event Hold] = [Action DeleteFile($DataContext)]; [Event Tap] = [Action OpenScan($DataContext)]\">\r\n                                    <Grid>\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"*\"/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <Grid.RowDefinitions>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                        </Grid.RowDefinitions>\r\n                                        <Grid Grid.RowSpan=\"2\" Width=\"64\" Height=\"64\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n                                            <Image HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"UniformToFill\" Source=\"{Binding Self, Converter={StaticResource SecureFilePreviewConverter}}\"/>\r\n                                        </Grid>\r\n\r\n                                        <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,6,0\" Text=\"{Binding Resources.Photo, Source={StaticResource Strings}}\" FontSize=\"27\"/>\r\n                                        <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"18,0,0,0\"\r\n                                                Visibility=\"{Binding Error, Converter={StaticResource EmptyStringToVisibilityConverter}}\" >\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"Auto\"/>\r\n                                                <ColumnDefinition Width=\"Auto\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <TextBlock Grid.Column=\"0\" Margin=\"0\"\r\n                                                    Visibility=\"{Binding UploadingProgress, Converter={StaticResource ProgressBetween0and1ToVisibilityConverter}}\"\r\n                                                    Text=\"{Binding UploadingSize, Converter={StaticResource FileSizeConverter}, StringFormat='\\{0\\}/'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                            <TextBlock Grid.Column=\"1\" Margin=\"0\" Text=\"{Binding Size.Value, Converter={StaticResource FileSizeConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                            <TextBlock Grid.Column=\"2\" Margin=\"0\" Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' • \\{0\\}'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                        </Grid>\r\n                                        <TextBlock Grid.Row=\"1\" Grid.Column=\"1\"\r\n                                                Visibility=\"{Binding Error, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                                                IsHitTestVisible=\"False\" \r\n                                                Margin=\"18,0\" \r\n                                                Text=\"{Binding Error}\" \r\n                                                TextTrimming=\"WordEllipsis\" \r\n                                                TextWrapping=\"NoWrap\" \r\n                                                FontSize=\"20\" \r\n                                                Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                                    </Grid>\r\n                                </ListBoxItem>\r\n                            </DataTemplate>\r\n                        </ItemsControl.ItemTemplate>\r\n                    </ItemsControl>\r\n                    <Button x:Name=\"AttachDocument\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0,-12,0\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                        <StackPanel>\r\n                            <TextBlock Margin=\"12,0,-12,0\" Text=\"{Binding DataContext.AttachDocumentCommand, ElementName=ContentPanel}\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                            <TextBlock \r\n                                    Visibility=\"{Binding FilesError, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                                    IsHitTestVisible=\"False\" \r\n                                    Margin=\"12,2,12,0\" \r\n                                    Text=\"{Binding FilesError}\" \r\n                                    TextTrimming=\"None\" \r\n                                    TextWrapping=\"Wrap\" \r\n                                    FontSize=\"20\" \r\n                                    Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                        </StackPanel>\r\n                    </Button>\r\n                    <TextBlock Margin=\"12,12,12,12\" TextWrapping=\"Wrap\" Text=\"{Binding AttachDocumentHint}\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                    <StackPanel Visibility=\"{Binding IsDataProofTranslationEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                        <TextBlock Text=\"{Binding Resources.PassportTranslation, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n                        <ItemsControl x:Name=\"Translations\" ItemsSource=\"{Binding Translations}\" toolkit:TiltEffect.IsTiltEnabled=\"True\">\r\n                            <ItemsControl.ItemTemplate>\r\n                                <DataTemplate>\r\n                                    <ListBoxItem Margin=\"12\" Background=\"Transparent\" cal:Message.Attach=\"[Event Hold] = [Action DeleteFile($DataContext)]; [Event Tap] = [Action OpenScan($DataContext)]\">\r\n                                        <Grid>\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"Auto\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"Auto\"/>\r\n                                                <RowDefinition Height=\"Auto\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid Grid.RowSpan=\"2\" Width=\"64\" Height=\"64\" Background=\"{StaticResource PhoneChromeBrush}\">\r\n                                                <Image HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"UniformToFill\" Source=\"{Binding Self, Converter={StaticResource SecureFilePreviewConverter}}\"/>\r\n                                            </Grid>\r\n\r\n                                            <TextBlock Grid.Column=\"1\" Grid.Row=\"0\" Margin=\"18,0,6,0\" Text=\"{Binding Resources.Photo, Source={StaticResource Strings}}\" FontSize=\"27\"/>\r\n                                            <Grid Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"18,0,0,0\"\r\n                                                Visibility=\"{Binding Error, Converter={StaticResource EmptyStringToVisibilityConverter}}\" >\r\n                                                <Grid.ColumnDefinitions>\r\n                                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                                    <ColumnDefinition Width=\"*\"/>\r\n                                                </Grid.ColumnDefinitions>\r\n                                                <TextBlock Grid.Column=\"0\" Margin=\"0\"\r\n                                                    Visibility=\"{Binding UploadingProgress, Converter={StaticResource ProgressBetween0and1ToVisibilityConverter}}\"\r\n                                                    Text=\"{Binding UploadingSize, Converter={StaticResource FileSizeConverter}, StringFormat='\\{0\\}/'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                                <TextBlock Grid.Column=\"1\" Margin=\"0\" Text=\"{Binding Size.Value, Converter={StaticResource FileSizeConverter}}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                                <TextBlock Grid.Column=\"2\" Margin=\"0\" Text=\"{Binding Date, Converter={StaticResource MessageDateTimeConverter}, StringFormat=' • \\{0\\}'}\" Opacity=\"0.6\" FontSize=\"20\"/>\r\n                                            </Grid>\r\n                                            <TextBlock Grid.Row=\"1\" Grid.Column=\"1\"\r\n                                                Visibility=\"{Binding Error, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                                                IsHitTestVisible=\"False\" \r\n                                                Margin=\"18,0\" \r\n                                                Text=\"{Binding Error}\" \r\n                                                TextTrimming=\"WordEllipsis\" \r\n                                                TextWrapping=\"NoWrap\" \r\n                                                FontSize=\"20\" \r\n                                                Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                                        </Grid>\r\n                                    </ListBoxItem>\r\n                                </DataTemplate>\r\n                            </ItemsControl.ItemTemplate>\r\n                        </ItemsControl>\r\n                        <Button x:Name=\"AttachTranslation\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0,-12,0\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                            <StackPanel>\r\n                                <TextBlock Margin=\"12,0,-12,0\" Text=\"{Binding DataContext.AttachTranslationCommand, ElementName=ContentPanel}\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                                <TextBlock \r\n                                    Visibility=\"{Binding TranslationsError, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                                    IsHitTestVisible=\"False\" \r\n                                    Margin=\"12,2,12,0\" \r\n                                    Text=\"{Binding TranslationsError}\" \r\n                                    TextTrimming=\"None\" \r\n                                    TextWrapping=\"Wrap\" \r\n                                    FontSize=\"20\" \r\n                                    Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                            </StackPanel>\r\n                        </Button>\r\n\r\n                        <TextBlock Margin=\"12,12,12,12\" TextWrapping=\"Wrap\" Text=\"{Binding AttachTranslationHint}\" FontSize=\"20\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    </StackPanel>\r\n                </StackPanel>\r\n\r\n                <StackPanel Visibility=\"{Binding IsDataEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\">\r\n                    <TextBlock Text=\"{Binding Resources.PassportAddressHeader, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n                    <controls1:LabeledTextBox \r\n                            x:Name=\"StreetLine1Label\" \r\n                            Label=\"{Binding Resources.PassportStreet1, Source={StaticResource Strings}}\" \r\n                            Text=\"{Binding StreetLine1, Mode=TwoWay}\"\r\n                            Error=\"{Binding StreetLine1Error}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=StreetLine2Label}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox \r\n                            x:Name=\"StreetLine2Label\" \r\n                            Label=\"{Binding Resources.PassportStreet2, Source={StaticResource Strings}}\" \r\n                            Text=\"{Binding StreetLine2, Mode=TwoWay}\"\r\n                            Error=\"{Binding StreetLine2Error}\" >\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=PostCodeLabel}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox \r\n                            x:Name=\"PostCodeLabel\" \r\n                            MaxLength=\"10\" \r\n                            Label=\"{Binding Resources.PassportPostcode, Source={StaticResource Strings}}\" \r\n                            Text=\"{Binding PostCode, Mode=TwoWay}\"\r\n                            Error=\"{Binding PostCodeError}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=CityLabel}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox \r\n                            x:Name=\"CityLabel\" \r\n                            Label=\"{Binding Resources.PassportCity, Source={StaticResource Strings}}\" \r\n                            Text=\"{Binding City, Mode=TwoWay}\"\r\n                            Error=\"{Binding CityError}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=StateLabel}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox \r\n                            x:Name=\"StateLabel\" \r\n                            Label=\"{Binding Resources.PassportState, Source={StaticResource Strings}}\" \r\n                            Text=\"{Binding State, Mode=TwoWay}\"\r\n                            Error=\"{Binding StateError}\" >\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <Button x:Name=\"SelectCountry\" HorizontalContentAlignment=\"Stretch\" Padding=\"15,4,15,4\" FontSize=\"23\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\">\r\n                        <Grid>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Path Grid.Column=\"1\" Data=\"M0,0 9,9 18,0\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\"/>\r\n                            <TextBlock Visibility=\"{Binding SelectedCountry, Converter={StaticResource ExistsToVisibilityConverter}}\" Text=\"{Binding SelectedCountry.Name}\"/>\r\n                            <TextBlock Visibility=\"{Binding SelectedCountry, Converter={StaticResource ExistsToVisibilityConverter}, ConverterParameter=invert}\" Text=\"{Binding Resources.PassportCountry, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </Grid>\r\n                    </Button>\r\n                    <TextBlock \r\n                            Visibility=\"{Binding SelectedCountryError, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert}\" \r\n                            IsHitTestVisible=\"False\" \r\n                            Margin=\"12,-6,12,12\" \r\n                            Text=\"{Binding SelectedCountryError}\" \r\n                            TextTrimming=\"None\" \r\n                            TextWrapping=\"Wrap\" \r\n                            FontSize=\"20\" \r\n                            Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                </StackPanel>\r\n\r\n                <Button x:Name=\"Delete\" toolkit:TiltEffect.IsTiltEnabled=\"True\" Margin=\"-12,0,-12,18\" Visibility=\"{Binding IsDeleteEnabled, Converter={StaticResource BooleanToVisibilityConverter}}\" Style=\"{StaticResource ProfileButtonStyle}\">\r\n                    <TextBlock Margin=\"12,0,-12,0\" Text=\"{Binding DeleteCommand}\" FontSize=\"27\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\" Foreground=\"{StaticResource TelegramTextRedBrush}\"/>\r\n                </Button>\r\n            </StackPanel>\r\n        </ScrollViewer>\r\n\r\n        <ContentControl x:Name=\"ImageViewer\" Grid.RowSpan=\"2\"\r\n            VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"\r\n            VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\"/>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Passport/ResidentialAddressView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n\r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing Telegram.Api.TL;\r\nusing Telegram.Controls.Extensions;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Passport;\r\nusing TelegramClient.Views.Payments;\r\n\r\nnamespace TelegramClient.Views.Passport\r\n{\r\n    public partial class ResidentialAddressView\r\n    {\r\n        public ResidentialAddressViewModel ViewModel\r\n        {\r\n            get { return DataContext as ResidentialAddressViewModel; }\r\n        }\r\n\r\n        public ResidentialAddressView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n            \r\n            Loaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer)\r\n                && ViewModel.ImageViewer != null)\r\n            {\r\n                ViewModel.ImageViewer.PropertyChanged += OnImageViewerPropertyChanged;\r\n            }\r\n            else if (Property.NameEquals(e.PropertyName, () => ViewModel.Error))\r\n            {\r\n                if (ViewModel.Error != null)\r\n                {\r\n                    var type = ViewModel.Error.GetErrorType();\r\n                    switch (type)\r\n                    {\r\n                        case ErrorType.ADDRESS_COUNTRY_INVALID:\r\n                            ScrollIntoViewAndShake(SelectCountry);\r\n                            break;\r\n                        case ErrorType.ADDRESS_CITY_INVALID:\r\n                            ScrollIntoViewAndShake(CityLabel.Input, CityLabel.Input);\r\n                            break;\r\n                        case ErrorType.ADDRESS_POSTCODE_INVALID:\r\n                            ScrollIntoViewAndShake(PostCodeLabel.Input, PostCodeLabel.Input);\r\n                            break;\r\n                        case ErrorType.ADDRESS_STATE_INVALID:\r\n                            ScrollIntoViewAndShake(StateLabel.Input, StateLabel.Input);\r\n                            break;\r\n                        case ErrorType.ADDRESS_STREET_LINE2_INVALID:\r\n                            ScrollIntoViewAndShake(StreetLine2Label.Input, StreetLine2Label.Input);\r\n                            break;\r\n                        case ErrorType.ADDRESS_STREET_LINE1_INVALID:\r\n                            ScrollIntoViewAndShake(StreetLine1Label.Input, StreetLine1Label.Input);\r\n                            break;\r\n                        case ErrorType.FILES_EMPTY:\r\n                            ScrollIntoViewAndShake(AttachDocument);\r\n                            break;\r\n                        case ErrorType.FILE_ERROR:\r\n                        {\r\n                            var file = ViewModel.Files.OfType<ISecureFileError>().FirstOrDefault(x => !string.IsNullOrEmpty(x.Error));\r\n                            if (file != null)\r\n                            {\r\n                                var control = Files.ItemContainerGenerator.ContainerFromItem(file) as FrameworkElement;\r\n                                if (control != null)\r\n                                {\r\n                                    ScrollIntoViewAndShake(control);\r\n                                }\r\n                            }\r\n                            break;\r\n                        }\r\n                        case ErrorType.TRANSLATION_EMPTY:\r\n                            ScrollIntoViewAndShake(AttachTranslation);\r\n                            break;\r\n                        case ErrorType.TRANSLATION_ERROR:\r\n                            if (ViewModel.Translations != null)\r\n                            {\r\n                                var file = ViewModel.Translations.OfType<ISecureFileError>().FirstOrDefault(x => !string.IsNullOrEmpty(x.Error));\r\n                                if (file != null)\r\n                                {\r\n                                    var control = Translations.ItemContainerGenerator.ContainerFromItem(file) as FrameworkElement;\r\n                                    if (control != null)\r\n                                    {\r\n                                        ScrollIntoViewAndShake(control);\r\n                                    }\r\n                                }\r\n                            }\r\n                            break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ScrollIntoViewAndShake(FrameworkElement element)\r\n        {\r\n            var duration = TimeSpan.FromSeconds(0.15);\r\n\r\n            Scroll.ScrollIntoView(element, 0.0, 128.0, duration);\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(duration, () => ShippingInfoView.Shake(element));\r\n        }\r\n\r\n        private void ScrollIntoViewAndShake(FrameworkElement element, TextBox focusElement)\r\n        {\r\n            var duration = TimeSpan.FromSeconds(0.15);\r\n\r\n            Scroll.ScrollIntoView(element, 0.0, 128.0, duration);\r\n            Telegram.Api.Helpers.Execute.BeginOnUIThread(duration, () => ShippingInfoView.Shake(element, focusElement));\r\n        }\r\n\r\n        private void OnImageViewerPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.ImageViewer.IsOpen))\r\n            {\r\n                Scroll.IsHitTestVisible = !ViewModel.ImageViewer.IsOpen;\r\n            }\r\n        }\r\n\r\n        private void DoneIcon_OnTap(object sender, GestureEventArgs e)\r\n        {\r\n            ViewModel.Done();\r\n        }\r\n    }\r\n\r\n    public class FileUploadingToOpacityConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value is bool)\r\n            {\r\n                return (bool) value ? 0.5 : 1.0;\r\n            }\r\n\r\n            return 1.0;\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/CardInfoView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Payments.CardInfoView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:telegramClient=\"clr-namespace:TelegramClient\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    xmlns:payments=\"clr-namespace:TelegramClient.Views.Payments\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Validate\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"SavePaymentInformation\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsHitTestVisible)\" Storyboard.TargetName=\"ContentPanel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.PaymentInfo, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\">\r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"6,0\" Visibility=\"{Binding PaymentInfo.Form.IsNativeProvider, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                <StackPanel>\r\n                    <TextBlock Text=\"{Binding Resources.PaymentCard, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n                    <controls1:LabeledTextBox x:Name=\"CardNumberLabel\" InputScope=\"Number\" Label=\"{Binding Resources.CardNumber, Source={StaticResource Strings}}\" Text=\"{Binding CardNumber, Mode=TwoWay}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=ExpirationDateLabel}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox x:Name=\"ExpirationDateLabel\" InputScope=\"Number\" MaxLength=\"5\" Label=\"{Binding Resources.MMYY, Source={StaticResource Strings}}\" Text=\"{Binding ExpirationDate, Mode=TwoWay}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=CardholderNameLabel}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox x:Name=\"CardholderNameLabel\" InputScope=\"PersonalFullName\" Label=\"{Binding Resources.NameSurname, Source={StaticResource Strings}}\" Text=\"{Binding CardholderName, Mode=TwoWay}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=SecurityCodeLabel}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledPasswordBox x:Name=\"SecurityCodeLabel\" MaxLength=\"3\" Label=\"{Binding Resources.SecurityCode, Source={StaticResource Strings}}\" Password=\"{Binding SecurityCode, Mode=TwoWay}\" KeyDown=\"SecurityCodeLabel_OnKeyDown\"/>\r\n                </StackPanel>\r\n                <StackPanel>\r\n                    <TextBlock Text=\"{Binding Resources.BillingAddress, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n                    <Button x:Name=\"SelectCountry\" HorizontalContentAlignment=\"Stretch\" Padding=\"15,4,15,4\" FontSize=\"23\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\">\r\n                        <Grid>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Path Grid.Column=\"1\" Data=\"M0,0 9,9 18,0\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\"/>\r\n                            <TextBlock Visibility=\"{Binding SelectedCountry, Converter={StaticResource ExistsToVisibilityConverter}}\" Text=\"{Binding SelectedCountry.Name}\"/>\r\n                            <TextBlock Visibility=\"{Binding SelectedCountry, Converter={StaticResource ExistsToVisibilityConverter}, ConverterParameter=invert}\" Text=\"{Binding Resources.Country, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </Grid>\r\n                    </Button>\r\n                    <controls1:LabeledTextBox x:Name=\"PostCodeLabel\" Label=\"{Binding Resources.Postcode, Source={StaticResource Strings}}\" Text=\"{Binding PostCode, Mode=TwoWay}\" KeyDown=\"PostCodeLabel_OnKeyDown\"/>\r\n                </StackPanel>\r\n\r\n                <StackPanel Visibility=\"{Binding SavePaymentInformationFormVisibility}\">\r\n                    <CheckBox x:Name=\"SavePaymentInformation\" Margin=\"0,18,0,0\" IsChecked=\"{Binding SavePaymentInformation, Mode=TwoWay}\" IsEnabled=\"{Binding PaymentInfo.Form.PasswordMissing, Converter={StaticResource InvertBooleanConverter}}\" Content=\"{Binding Resources.SavePaymentInformation, Source={StaticResource Strings}}\"/>\r\n                    <TextBlock Text=\"{Binding Resources.SavePaymentInformationHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                    <TextBlock Visibility=\"{Binding PaymentInfo.Form.PasswordMissing, Converter={StaticResource BooleanToVisibilityConverter}}\" cal:Message.Attach=\"[Event Tap] = [Action OpenTwoStepVerification]\" payments:CardInfoView.FormattedText=\"{Binding Resources.TurnOnTwoStepVerification, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </StackPanel>\r\n                <Button x:Name=\"Validate\" Margin=\"0,38,0,0\" Width=\"204\" Content=\"{Binding Resources.Next, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" HorizontalAlignment=\"Left\"/>\r\n\r\n            </StackPanel>\r\n        </ScrollViewer>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/CardInfoView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Payments;\r\nusing TelegramClient.Views.Controls;\r\n\r\nnamespace TelegramClient.Views.Payments\r\n{\r\n    public partial class CardInfoView\r\n    {\r\n        public static readonly DependencyProperty FormattedTextProperty = DependencyProperty.RegisterAttached(\r\n            \"FormattedText\", typeof(string), typeof(CardInfoView), new PropertyMetadata(default(string), OnFormattedTextChanged));\r\n\r\n        public static void SetFormattedText(DependencyObject element, string value)\r\n        {\r\n            element.SetValue(FormattedTextProperty, value);\r\n        }\r\n\r\n        public static string GetFormattedText(DependencyObject element)\r\n        {\r\n            return (string)element.GetValue(FormattedTextProperty);\r\n        }\r\n\r\n        private static void OnFormattedTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var r = d as TextBlock;\r\n            if (r != null)\r\n            {\r\n                var text = e.NewValue as string;\r\n                if (text != null)\r\n                {\r\n                    r.Inlines.Clear();\r\n                    var splittedText = text.Split(new[] { \"*\" }, StringSplitOptions.None);\r\n                    for (var i = 0; i < splittedText.Length; i++)\r\n                    {\r\n                        if (i % 2 == 1)\r\n                        {\r\n                            var bold = new Run();\r\n                            bold.FontWeight = FontWeights.SemiBold;\r\n                            bold.Foreground = (Brush) Application.Current.Resources[\"TelegramBadgeAccentBrush\"];\r\n                            bold.Text = splittedText[i];\r\n                            r.Inlines.Add(bold);\r\n\r\n                        }\r\n                        else\r\n                        {\r\n                            r.Inlines.Add(splittedText[i]);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public CardInfoViewModel ViewModel\r\n        {\r\n            get { return DataContext as CardInfoViewModel; }\r\n        }\r\n\r\n        public CardInfoView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            CardNumberLabel.SetTextBox(new CardTextBox());\r\n            ExpirationDateLabel.SetTextBox(new DateTextBox());\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.Error))\r\n            {\r\n                if (ViewModel.Error != null)\r\n                {\r\n                    var type = ViewModel.Error;\r\n                    if (!string.IsNullOrEmpty(type))\r\n                    {\r\n                        switch (type)\r\n                        {\r\n                            case \"invalid_number\":\r\n                            case \"CARD_NUMBER_INVALID\":\r\n                                ShippingInfoView.Shake(CardNumberLabel, CardNumberLabel.Input);\r\n                                break;\r\n                            case \"invalid_expiry_year\":\r\n                            case \"invalid_expiry_month\":\r\n                            case \"CARD_EXPIRE_DATE_INVALID\":\r\n                                ShippingInfoView.Shake(ExpirationDateLabel, ExpirationDateLabel.Input);\r\n                                break;\r\n                            case \"CARD_HOLDER_NAME_INVALID\":\r\n                                ShippingInfoView.Shake(CardholderNameLabel, CardholderNameLabel.Input);\r\n                                break;\r\n                            case \"invalid_cvc\":\r\n                            case \"CARD_CVC_INVALID\":\r\n                                ShippingInfoView.Shake(SecurityCodeLabel, SecurityCodeLabel.Input);\r\n                                break;\r\n                            case \"CARD_COUNTRY_INVALID\":\r\n                                ShippingInfoView.Shake(SelectCountry);\r\n                                break;\r\n                            case \"CARD_ZIP_INVALID\":\r\n                                ShippingInfoView.Shake(PostCodeLabel, PostCodeLabel.Input);\r\n                                break;\r\n                            case \"invalid_button\":\r\n                                ShippingInfoView.Shake(Validate);\r\n                                break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SecurityCodeLabel_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                if (PostCodeLabel.Visibility == Visibility.Visible)\r\n                {\r\n                    PostCodeLabel.Focus();\r\n                }\r\n                else\r\n                {\r\n                    ViewModel.SecurityCode = SecurityCodeLabel.TextBox.Password;\r\n                    ViewModel.Validate();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void PostCodeLabel_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.Validate();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/CheckoutView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Payments.CheckoutView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"20\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"False\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <converters:LabeledPriceToStringConverter x:Key=\"LabeledPriceToStringConverter\"/>\r\n            <Style x:Key=\"ButtonStyle1\" TargetType=\"Button\">\r\n                <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                <Setter Property=\"FontSize\" Value=\"23\"/>\r\n                <Setter Property=\"FontWeight\" Value=\"Normal\"/>\r\n                <Setter Property=\"Margin\" Value=\"12,-12\"/>\r\n                <Setter Property=\"VerticalAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"Padding\" Value=\"15,3,15,5\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"Button\">\r\n                            <Grid Background=\"Transparent\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Pressed\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0.7\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentContainer\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ButtonBackground\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Border x:Name=\"ButtonBackground\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                    <ContentControl x:Name=\"ContentContainer\" FontWeight=\"{TemplateBinding FontWeight}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Title, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\">\r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"18\">\r\n                <Grid Margin=\"0,0,0,18\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                        <ColumnDefinition Width=\"18\"/>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <Image VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\" MaxWidth=\"150\" Source=\"{Binding PaymentInfo.Message.Media.Photo.Uri}\" Stretch=\"Uniform\"/>\r\n\r\n                    <Grid Grid.Column=\"2\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Grid.Row=\"0\" FontSize=\"18\" TextTrimming=\"WordEllipsis\" FontWeight=\"SemiBold\" Text=\"{Binding PaymentInfo.Message.Media.Title}\"/>\r\n                        <TextBlock Grid.Row=\"1\" FontSize=\"16\" MaxHeight=\"64\" TextTrimming=\"WordEllipsis\" TextWrapping=\"Wrap\" Text=\"{Binding PaymentInfo.Message.Media.Description}\"/>\r\n                        <TextBlock Grid.Row=\"2\" FontSize=\"16\" Text=\"{Binding Bot.FullName}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                    </Grid>\r\n                </Grid>\r\n                <ItemsControl ItemsSource=\"{Binding Prices}\" Foreground=\"{StaticResource PhoneSubtleBrush}\">\r\n                    <ItemsControl.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <Grid Margin=\"0,12\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <TextBlock Text=\"{Binding Label}\"/>\r\n                                <TextBlock Grid.Column=\"1\" Text=\"{Binding Converter={StaticResource LabeledPriceToStringConverter}}\"/>\r\n                            </Grid>\r\n                        </DataTemplate>\r\n                    </ItemsControl.ItemTemplate>\r\n                </ItemsControl>\r\n                <Grid Margin=\"0,12\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"*\"/>\r\n                        <ColumnDefinition Width=\"Auto\"/>\r\n                    </Grid.ColumnDefinitions>\r\n                    <TextBlock FontWeight=\"SemiBold\" Text=\"{Binding Total.Label}\"/>\r\n                    <TextBlock FontWeight=\"SemiBold\" Grid.Column=\"1\" Text=\"{Binding Total, Converter={StaticResource LabeledPriceToStringConverter}}\"/>\r\n                </Grid>\r\n                <Grid cal:Message.Attach=\"[Event Tap] = [Action ChangeCredentials]\"  Margin=\"0,12\" Background=\"Transparent\" Visibility=\"{Binding PaymentInfo.CredentialsTitle, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" >\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Text=\"{Binding PaymentInfo.CredentialsTitle}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"16\" Text=\"{Binding Resources.PaymentMethod, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <Grid Margin=\"0,12\" Visibility=\"{Binding PaymentProvider, Converter={StaticResource EmptyStringToVisibilityConverter}, ConverterParameter=invert, FallbackValue=Collapsed}\" >\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Text=\"{Binding PaymentProvider}\"/>\r\n                    <TextBlock Grid.Row=\"1\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"16\" Text=\"{Binding Resources.PaymentProvider, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <Grid Margin=\"0,12\" Visibility=\"{Binding Invoice.ShippingAddressRequested, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\" >\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Text=\"{Binding SavedInfo.ShippingAddress}\" TextTrimming=\"WordEllipsis\"/>\r\n                    <TextBlock Grid.Row=\"1\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"16\" Text=\"{Binding Resources.ShippingAddress, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <Grid Margin=\"0,12\" Visibility=\"{Binding Invoice.NameRequested, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\" >\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Text=\"{Binding SavedInfo.Name}\" TextTrimming=\"WordEllipsis\"/>\r\n                    <TextBlock Grid.Row=\"1\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"16\" Text=\"{Binding Resources.Name, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <Grid Margin=\"0,12\" Visibility=\"{Binding Invoice.PhoneRequested, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\" >\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Text=\"{Binding SavedInfo.Phone, StringFormat='+\\{0\\}'}\" TextTrimming=\"WordEllipsis\"/>\r\n                    <TextBlock Grid.Row=\"1\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"16\" Text=\"{Binding Resources.PhoneNumber, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <Grid Margin=\"0,12\" Visibility=\"{Binding Invoice.EmailRequested, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\" >\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Text=\"{Binding SavedInfo.Email}\" TextTrimming=\"WordEllipsis\"/>\r\n                    <TextBlock Grid.Row=\"1\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"16\" Text=\"{Binding Resources.ContactAddress, Source={StaticResource Strings}}\"/>\r\n                </Grid>\r\n                <Grid Margin=\"0,12\" Visibility=\"{Binding ShippingOption, Converter={StaticResource ExistsToVisibilityConverter}, FallbackValue=Collapsed}\" >\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\"/>\r\n                        <RowDefinition Height=\"Auto\"/>\r\n                    </Grid.RowDefinitions>\r\n                    <TextBlock Text=\"{Binding ShippingOption.Title}\" TextTrimming=\"WordEllipsis\"/>\r\n                    <TextBlock Grid.Row=\"1\" Foreground=\"{StaticResource PhoneSubtleBrush}\" FontSize=\"16\" Text=\"{Binding Resources.ShippingMethod, Source={StaticResource Strings}}\"/>\r\n                </Grid>           \r\n            </StackPanel>\r\n        </ScrollViewer>\r\n\r\n        <Border x:Name=\"ValidatePanel\" Grid.Row=\"2\" Visibility=\"{Binding PaymentInfo.Receipt, Converter={StaticResource ExistsToVisibilityConverter}, ConverterParameter=invert}\" Height=\"72\" Background=\"{StaticResource TelegramBadgeAccentBrush}\">\r\n            <Button x:Name=\"Validate\" FontWeight=\"SemiBold\" Foreground=\"White\" FontSize=\"{Binding DefaultFontSize, Source={StaticResource ScaledText}}\" Content=\"{Binding PayString, Converter={StaticResource Uppercase}}\" Style=\"{StaticResource ButtonStyle1}\"/>\r\n        </Border>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/CheckoutView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing TelegramClient.Views.Controls;\r\n\r\nnamespace TelegramClient.Views.Payments\r\n{\r\n    public partial class CheckoutView\r\n    {\r\n        public CheckoutView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            ValidatePanel.Height = TelegramApplicationBar.ApplicationBar.DefaultSize;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/PasswordEmailView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Payments.PasswordEmailView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Create\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsHitTestVisible)\" Storyboard.TargetName=\"ContentPanel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.PasswordEmail, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\">\r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n                <StackPanel>\r\n                    <TextBlock Text=\"{Binding Resources.Password, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n                    <controls1:LabeledPasswordBox x:Name=\"PasswordLabel\" Label=\"{Binding Resources.EnterPassword, Source={StaticResource Strings}}\" Password=\"{Binding Password, Mode=TwoWay}\" KeyDown=\"PasswordLabel_OnKeyDown\"/>\r\n                    <controls1:LabeledPasswordBox x:Name=\"ConfirmPasswordLabel\" Label=\"{Binding Resources.ConfirmPassword, Source={StaticResource Strings}}\" Password=\"{Binding ConfirmPassword, Mode=TwoWay}\" KeyDown=\"ConfirmPasswordLabel_OnKeyDown\"/>\r\n                    <TextBlock Text=\"{Binding Resources.CreatePasswordHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </StackPanel>\r\n                \r\n                <StackPanel>\r\n                    <TextBlock Text=\"{Binding Resources.RecoveryEmail, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n                    <controls1:LabeledTextBox x:Name=\"RecoveryEmailLabel\" Label=\"{Binding Resources.EnterRecoveryEmail, Source={StaticResource Strings}}\" Text=\"{Binding RecoveryEmail, Mode=TwoWay}\" KeyDown=\"RecoveryEmailLabel_OnKeyDown\"/>\r\n                    <TextBlock Text=\"{Binding Resources.EnterRecoveryEmailHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n                </StackPanel>\r\n                \r\n                <Button x:Name=\"Create\" Margin=\"0,38,0,0\" Width=\"204\" Content=\"{Binding Resources.Done, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" HorizontalAlignment=\"Left\"/>\r\n\r\n            </StackPanel>\r\n        </ScrollViewer>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/PasswordEmailView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing System.Windows.Input;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Payments;\r\n\r\nnamespace TelegramClient.Views.Payments\r\n{\r\n    public partial class PasswordEmailView\r\n    {\r\n        public PasswordEmailViewModel ViewModel\r\n        {\r\n            get { return DataContext as PasswordEmailViewModel; }\r\n        }\r\n\r\n        public PasswordEmailView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.Error))\r\n            {\r\n                var type = ViewModel.Error;\r\n                if (!string.IsNullOrEmpty(type))\r\n                {\r\n                    switch (type)\r\n                    {\r\n                        case \"invalid_password\":\r\n                            ShippingInfoView.Shake(PasswordLabel, PasswordLabel.Input);\r\n                            break;\r\n                        case \"invalid_confirmpassword\":\r\n                            ShippingInfoView.Shake(ConfirmPasswordLabel, ConfirmPasswordLabel.Input);\r\n                            break;\r\n                        case \"invalid_email\":\r\n                            ShippingInfoView.Shake(RecoveryEmailLabel, RecoveryEmailLabel.Input);\r\n                            break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void PasswordLabel_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ConfirmPasswordLabel.Focus();\r\n            }\r\n        }\r\n\r\n        private void ConfirmPasswordLabel_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                RecoveryEmailLabel.Focus();\r\n            }\r\n        }\r\n\r\n        private void RecoveryEmailLabel_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.Password = PasswordLabel.TextBox.Password;\r\n                ViewModel.ConfirmPassword = ConfirmPasswordLabel.TextBox.Password;\r\n                ViewModel.RecoveryEmail = RecoveryEmailLabel.TextBox.Text;\r\n\r\n                ViewModel.Create();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/SavedCardInfoView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Payments.SavedCardInfoView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Validate\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsHitTestVisible)\" Storyboard.TargetName=\"ContentPanel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.PaymentInfo, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\">\r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n                <StackPanel>\r\n                    <TextBlock Text=\"{Binding Resources.PaymentCard, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n                    <TextBlock Text=\"{Binding Title}\" IsHitTestVisible=\"False\" VerticalAlignment=\"Top\" FontSize=\"23\" Margin=\"12,19,12,19\" Foreground=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                    <controls1:LabeledPasswordBox x:Name=\"PasswordLabel\" Label=\"{Binding Resources.Password, Source={StaticResource Strings}}\" Password=\"{Binding Password, Mode=TwoWay}\" KeyDown=\"PasswordLabel_OnKeyDown\"/>\r\n                </StackPanel>\r\n\r\n                <TextBlock Margin=\"12,12,12,12\" Text=\"{Binding SavedCardHint}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                <Border Background=\"Transparent\" cal:Message.Attach=\"[Event Tap] = [Action ChangeCredentials]\">\r\n                    <TextBlock Text=\"{Binding Resources.ChooseDifferentCard, Source={StaticResource Strings}}\" IsHitTestVisible=\"False\" VerticalAlignment=\"Top\" FontSize=\"23\" Margin=\"12,19,12,19\" Foreground=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                </Border>\r\n\r\n                <Button x:Name=\"Validate\" Margin=\"0,38,0,0\" Width=\"204\" Content=\"{Binding Resources.Next, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" HorizontalAlignment=\"Left\"/>\r\n\r\n            </StackPanel>\r\n        </ScrollViewer>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/SavedCardInfoView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.ComponentModel;\r\nusing System.Windows.Input;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Payments;\r\n\r\nnamespace TelegramClient.Views.Payments\r\n{\r\n    public partial class SavedCardInfoView\r\n    {\r\n        public SavedCardInfoViewModel ViewModel\r\n        {\r\n            get { return DataContext as SavedCardInfoViewModel; }\r\n        }\r\n\r\n        public SavedCardInfoView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.Error))\r\n            {\r\n                if (ViewModel.Error != null)\r\n                {\r\n                    var type = ViewModel.Error;\r\n                    switch (type)\r\n                    {\r\n                        case \"PASSWORD\":\r\n                            ShippingInfoView.Shake(PasswordLabel, PasswordLabel.Input);\r\n                            break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void PasswordLabel_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                ViewModel.Password = PasswordLabel.TextBox.Password;\r\n                ViewModel.Validate();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/ShippingInfoView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Payments.ShippingInfoView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Views.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:ec=\"clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:telegramClient=\"clr-namespace:TelegramClient\"\r\n    xmlns:cal=\"http://www.caliburnproject.org\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <Style x:Key=\"PCodeTextBoxStyle\" TargetType=\"TextBox\">\r\n                <Setter Property=\"FontFamily\" Value=\"{StaticResource PhoneFontFamilyNormal}\"/>\r\n                <Setter Property=\"FontSize\" Value=\"23\"/>\r\n                <Setter Property=\"Background\" Value=\"{StaticResource PhoneBackgroundBrush}\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{StaticResource PhoneForegroundBrush}\"/>\r\n                <Setter Property=\"BorderBrush\" Value=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                <Setter Property=\"SelectionBackground\" Value=\"{StaticResource TelegramBadgeAccentBrush}\"/>\r\n                <Setter Property=\"SelectionForeground\" Value=\"{StaticResource PhoneTextBoxSelectionForegroundBrush}\"/>\r\n                <Setter Property=\"BorderThickness\" Value=\"{StaticResource PhoneBorderThickness}\"/>\r\n                <Setter Property=\"Padding\" Value=\"14,2,1,2\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"TextBox\">\r\n                            <Grid Background=\"Transparent\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\"/>\r\n                                        <VisualState x:Name=\"MouseOver\"/>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Transparent\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"Placeholder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneDisabledBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"ReadOnly\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"MainBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Collapsed</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                            <Visibility>Visible</Visibility>\r\n                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                    </DiscreteObjectKeyFrame>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"ReadonlyBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"Placeholder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxReadOnlyBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                        <VisualState x:Name=\"Focused\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentElement\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"Placeholder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxForegroundBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"MainBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource PhoneTextBoxEditBackgroundBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"MainBorder\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TelegramAccentBrush}\"/>\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Unfocused\"/>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Border x:Name=\"MainBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\"/>\r\n                                <Border x:Name=\"ReadonlyBorder\" BorderBrush=\"{StaticResource PhoneDisabledBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\" Visibility=\"Collapsed\"/>\r\n                                <Border BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"Transparent\" Margin=\"{StaticResource PhoneTouchTargetOverhang}\">\r\n                                    <Grid Margin=\"{StaticResource PhoneTextBoxInnerMargin}\">\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"*\"/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                        <ContentControl x:Name=\"Placeholder\" Content=\"+\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Padding=\"14,2,0,2\" VerticalContentAlignment=\"Stretch\"/>\r\n                                        <ContentControl x:Name=\"ContentElement\" Grid.Column=\"1\" BorderThickness=\"0\" HorizontalContentAlignment=\"Stretch\" Padding=\"0,2,1,2\" VerticalContentAlignment=\"Stretch\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <i:Interaction.Behaviors>\r\n            <ec:DataStateBehavior Binding=\"{Binding IsWorking}\" Value=\"True\" TrueState=\"Working\" FalseState=\"Normal\"/>\r\n        </i:Interaction.Behaviors>\r\n\r\n        <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"MainGroup\">\r\n                <VisualState x:Name=\"Normal\"/>\r\n                <VisualState x:Name=\"Working\">\r\n                    <Storyboard>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"Validate\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsEnabled)\" Storyboard.TargetName=\"SaveShippingInformation\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Control.IsHitTestVisible)\" Storyboard.TargetName=\"ContentPanel\">\r\n                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"False\"/>\r\n                        </ObjectAnimationUsingKeyFrames>\r\n                    </Storyboard>\r\n                </VisualState>\r\n            </VisualStateGroup>\r\n        </VisualStateManager.VisualStateGroups>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.ShippingInformation, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\">\r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n                <StackPanel Visibility=\"{Binding PaymentInfo.Form.Invoice.ShippingAddressRequested, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                    <TextBlock Text=\"{Binding Resources.ShippingAddress, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n                    <controls1:LabeledTextBox x:Name=\"StreetLine1Label\" Label=\"{Binding Resources.Address1Street, Source={StaticResource Strings}}\" Text=\"{Binding StreetLine1, Mode=TwoWay}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=StreetLine2Label}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox x:Name=\"StreetLine2Label\" Label=\"{Binding Resources.Address2Street, Source={StaticResource Strings}}\" Text=\"{Binding StreetLine2, Mode=TwoWay}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=CityLabel}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox x:Name=\"CityLabel\" Label=\"{Binding Resources.City, Source={StaticResource Strings}}\" Text=\"{Binding City, Mode=TwoWay}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=StateLabel}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <controls1:LabeledTextBox x:Name=\"StateLabel\" Label=\"{Binding Resources.State, Source={StaticResource Strings}}\" Text=\"{Binding State, Mode=TwoWay}\">\r\n                        <i:Interaction.Behaviors>\r\n                            <behaviors:FocusNextElementOnEnterBehavior NextControl=\"{Binding ElementName=PostCodeLabel}\"/>\r\n                        </i:Interaction.Behaviors>\r\n                    </controls1:LabeledTextBox>\r\n                    <Button x:Name=\"SelectCountry\" HorizontalContentAlignment=\"Stretch\" Padding=\"15,4,15,4\" FontSize=\"23\" FontFamily=\"{StaticResource PhoneFontFamilyNormal}\">\r\n                        <Grid>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Path Grid.Column=\"1\" Data=\"M0,0 9,9 18,0\" Stroke=\"{StaticResource PhoneForegroundBrush}\" StrokeThickness=\"2\" VerticalAlignment=\"Center\"/>\r\n                            <TextBlock Visibility=\"{Binding SelectedCountry, Converter={StaticResource ExistsToVisibilityConverter}}\" Text=\"{Binding SelectedCountry.Name}\"/>\r\n                            <TextBlock Visibility=\"{Binding SelectedCountry, Converter={StaticResource ExistsToVisibilityConverter}, ConverterParameter=invert}\" Text=\"{Binding Resources.Country, Source={StaticResource Strings}}\" Foreground=\"{StaticResource PhoneSubtleBrush}\"/>\r\n                        </Grid>\r\n                    </Button>\r\n                    <controls1:LabeledTextBox x:Name=\"PostCodeLabel\" Label=\"{Binding Resources.Postcode, Source={StaticResource Strings}}\" Text=\"{Binding PostCode, Mode=TwoWay}\" KeyDown=\"PostCode_OnKeyDown\"/>\r\n                </StackPanel>\r\n                <StackPanel x:Name=\"ReceiverForm\" Visibility=\"{Binding PaymentInfo.Form.Invoice.ReceiverRequested, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                    <TextBlock Text=\"{Binding Resources.Receiver, Source={StaticResource Strings}}\" FontSize=\"23\" Foreground=\"{StaticResource TelegramTextAccentBrush}\" Margin=\"12,18,12,0\"/>\r\n                    <controls1:LabeledTextBox x:Name=\"NameLabel\" Label=\"{Binding Resources.FullName, Source={StaticResource Strings}}\" Text=\"{Binding Name, Mode=TwoWay}\"\r\n                        Visibility=\"{Binding PaymentInfo.Form.Invoice.NameRequested, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"\r\n                        KeyDown=\"Name_OnKeyDown\"/>\r\n                    <controls1:LabeledTextBox x:Name=\"EmailLabel\" InputScope=\"EmailSmtpAddress\" Label=\"{Binding Resources.Email, Source={StaticResource Strings}}\" Text=\"{Binding Email, Mode=TwoWay}\"\r\n                        Visibility=\"{Binding PaymentInfo.Form.Invoice.EmailRequested, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\"\r\n                        KeyDown=\"Email_OnKeyDown\"/>\r\n                    <Grid x:Name=\"Phone\" Visibility=\"{Binding PaymentInfo.Form.Invoice.PhoneRequested, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <TextBox x:Name=\"PCode\" Width=\"110\" MaxLength=\"4\" InputScope=\"TelephoneCountryCode\" KeyDown=\"Code_OnKeyDown\" Text=\"{Binding PhoneCode, Mode=TwoWay}\" Style=\"{StaticResource PCodeTextBoxStyle}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </TextBox>\r\n                        <controls1:LabeledTextBox x:Name=\"PhoneNumberLabel\" Grid.Column=\"1\" InputScope=\"TelephoneLocalNumber\" KeyDown=\"PhoneNumber_OnKeyDown\" Label=\"{Binding Resources.PhoneNumber, Source={StaticResource Strings}}\" Text=\"{Binding PhoneNumber, Mode=TwoWay}\">\r\n                            <i:Interaction.Behaviors>\r\n                                <behaviors:UpdateLabeledTextBindingBehavior/>\r\n                            </i:Interaction.Behaviors>\r\n                        </controls1:LabeledTextBox>\r\n                    </Grid>\r\n                </StackPanel>\r\n\r\n                <CheckBox x:Name=\"SaveShippingInformation\" Margin=\"0,18,0,0\" IsChecked=\"{Binding SaveShippingInformation, Mode=TwoWay}\" Content=\"{Binding Resources.SaveShippingInformation, Source={StaticResource Strings}}\"/>\r\n                <TextBlock Margin=\"12,0,12,38\" Text=\"{Binding Resources.SaveShippingInformationHint, Source={StaticResource Strings}}\" TextWrapping=\"Wrap\" LineHeight=\"22\" LineStackingStrategy=\"BlockLineHeight\" Style=\"{StaticResource PhoneTextSubtleStyle}\"/>\r\n\r\n                <Button x:Name=\"Validate\" Width=\"204\" Content=\"{Binding Resources.Next, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" HorizontalAlignment=\"Left\"/>\r\n\r\n            </StackPanel>\r\n        </ScrollViewer>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/ShippingInfoView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing Caliburn.Micro;\r\nusing Microsoft.Devices;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Helpers;\r\nusing TelegramClient.ViewModels.Additional;\r\nusing TelegramClient.ViewModels.Payments;\r\n\r\nnamespace TelegramClient.Views.Payments\r\n{\r\n    public partial class ShippingInfoView\r\n    {\r\n        public ShippingInfoViewModel ViewModel\r\n        {\r\n            get { return DataContext as ShippingInfoViewModel; }\r\n        }\r\n\r\n        public ShippingInfoView()\r\n        {\r\n            //LogManager.GetLog = type => new DebugLog(type);\r\n\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged += OnViewModelPropertyChanged;\r\n            };\r\n            Unloaded += (sender, args) =>\r\n            {\r\n                ViewModel.PropertyChanged -= OnViewModelPropertyChanged;\r\n            };\r\n        }\r\n\r\n        private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (Property.NameEquals(e.PropertyName, () => ViewModel.Error))\r\n            {\r\n                if (ViewModel.Error != null)\r\n                {\r\n                    var type = ViewModel.Error.GetErrorType();\r\n                    switch (type)\r\n                    {\r\n                        case ErrorType.REQ_INFO_NAME_INVALID:\r\n                            Shake(NameLabel, NameLabel.Input);\r\n                            break;\r\n                        case ErrorType.REQ_INFO_PHONE_INVALID:\r\n                            Shake(Phone, PhoneNumberLabel.Input);\r\n                            break;\r\n                        case ErrorType.REQ_INFO_EMAIL_INVALID:\r\n                            Shake(EmailLabel, EmailLabel.Input);\r\n                            break;\r\n                        case ErrorType.ADDRESS_COUNTRY_INVALID:\r\n                            Shake(SelectCountry);\r\n                            break;\r\n                        case ErrorType.ADDRESS_CITY_INVALID:\r\n                            Shake(CityLabel, CityLabel.Input);\r\n                            break;\r\n                        case ErrorType.ADDRESS_POSTCODE_INVALID:\r\n                            Shake(PostCodeLabel, PostCodeLabel.Input);\r\n                            break;\r\n                        case ErrorType.ADDRESS_STATE_INVALID:\r\n                            Shake(StateLabel, StateLabel.Input);\r\n                            break;\r\n                        case ErrorType.ADDRESS_STREET_LINE1_INVALID:\r\n                            Shake(StreetLine1Label, StreetLine1Label.Input);\r\n                            break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public static void Shake(FrameworkElement element, PasswordBox focusControl)\r\n        {\r\n            var translateTransform = new TranslateTransform();\r\n            element.RenderTransform = translateTransform;\r\n            var storyboard = new Storyboard();\r\n            var doubleAnimtion = new DoubleAnimationUsingKeyFrames();\r\n            doubleAnimtion.KeyFrames.Add(new DiscreteDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -3.0 });\r\n            doubleAnimtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 3.0, EasingFunction = new ElasticEase { EasingMode = EasingMode.EaseIn, Oscillations = 5, Springiness = 1.0 } });\r\n            doubleAnimtion.KeyFrames.Add(new DiscreteDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n\r\n            storyboard.Children.Add(doubleAnimtion);\r\n            Storyboard.SetTarget(storyboard, translateTransform);\r\n            Storyboard.SetTargetProperty(doubleAnimtion, new PropertyPath(\"X\"));\r\n            storyboard.Begin();\r\n\r\n            if (focusControl != null)\r\n            {\r\n                storyboard.Completed += (sender, args) =>\r\n                {\r\n                    focusControl.Focus();\r\n                    focusControl.SelectAll();\r\n                };\r\n            }\r\n\r\n            VibrateController.Default.Start(TimeSpan.FromSeconds(0.25));\r\n        }\r\n\r\n        public static void Shake(FrameworkElement element, TextBox focusControl = null)\r\n        {\r\n            var translateTransform = new TranslateTransform();\r\n            element.RenderTransform = translateTransform;\r\n            var storyboard = new Storyboard();\r\n            var doubleAnimtion = new DoubleAnimationUsingKeyFrames();\r\n            doubleAnimtion.KeyFrames.Add(new DiscreteDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.0), Value = -3.0 });\r\n            doubleAnimtion.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 3.0, EasingFunction = new ElasticEase { EasingMode = EasingMode.EaseIn, Oscillations = 5, Springiness = 1.0 } });\r\n            doubleAnimtion.KeyFrames.Add(new DiscreteDoubleKeyFrame { KeyTime = TimeSpan.FromSeconds(0.25), Value = 0.0 });\r\n\r\n            storyboard.Children.Add(doubleAnimtion);\r\n            Storyboard.SetTarget(storyboard, translateTransform);\r\n            Storyboard.SetTargetProperty(doubleAnimtion, new PropertyPath(\"X\"));\r\n            storyboard.Begin();\r\n\r\n            if (focusControl != null)\r\n            {\r\n                storyboard.Completed += (sender, args) =>\r\n                {\r\n                    focusControl.Focus();\r\n                    focusControl.SelectAll();\r\n                };\r\n            }\r\n\r\n            VibrateController.Default.Start(TimeSpan.FromSeconds(0.25));\r\n        }\r\n\r\n        private void Code_OnKeyDown(object sender, KeyEventArgs args)\r\n        {\r\n            if (args.Key == Key.Enter)\r\n            {\r\n                PhoneNumberLabel.Focus();\r\n                PhoneNumberLabel.SelectionStart = PhoneNumberLabel.Text.Length;\r\n            }\r\n\r\n            if (args.Key == Key.D8 || // *\r\n                    args.Key == Key.Unknown || // +(long tap on 0) or -/.\r\n                    args.Key == Key.D3 || // #\r\n                    args.Key == Key.A)\r\n            {\r\n\r\n                args.Handled = true;\r\n            }\r\n\r\n            if (args.Key == Key.Space)\r\n            {\r\n                args.Handled = true;\r\n                PhoneNumberLabel.Focus();\r\n            }\r\n\r\n            if (args.Key >= Key.NumPad0 && args.Key <= Key.NumPad9\r\n                && PCode.Text.Length == 3)\r\n            {\r\n                var codeTail = string.Empty;\r\n                if (ViewModel.IsPhoneCodeInvalid)\r\n                {\r\n                    var countryCode2 = CountryUtils.CountriesSource.FirstOrDefault(x => x.PhoneCode == PCode.Text.Substring(0, 2));\r\n                    if (countryCode2 != null)\r\n                    {\r\n                        codeTail = PCode.Text.Substring(2, 1);\r\n                        PCode.Text = PCode.Text.Substring(0, 2);\r\n                    }\r\n\r\n                    var countryCode1 = CountryUtils.CountriesSource.FirstOrDefault(x => x.PhoneCode == PCode.Text.Substring(0, 1));\r\n                    if (countryCode1 != null)\r\n                    {\r\n                        codeTail = PCode.Text.Substring(1, 2);\r\n                        PCode.Text = PCode.Text.Substring(0, 1);\r\n                    }\r\n                }\r\n\r\n\r\n                args.Handled = true;\r\n                PhoneNumberLabel.Text = codeTail + args.Key.ToString().Replace(\"NumPad\", string.Empty) + PhoneNumberLabel.Text;\r\n                PhoneNumberLabel.SelectionStart = codeTail.Length + 1;\r\n                PhoneNumberLabel.Focus();\r\n            }\r\n        }\r\n\r\n        private void PhoneNumber_OnKeyDown(object sender, KeyEventArgs args)\r\n        {\r\n            if (args.Key == Key.Enter)\r\n            {\r\n                ViewModel.Validate();\r\n            }\r\n\r\n            if (args.Key == Key.D8 || // *\r\n                    args.Key == Key.Unknown || // +(long tap on 0) or -/.\r\n                    args.Key == Key.D3 || // #\r\n                    args.Key == Key.A ||\r\n                    args.Key == Key.Space)\r\n            {\r\n                args.Handled = true;\r\n            }\r\n\r\n            if (args.Key == Key.Back && PhoneNumberLabel.Text.Length == 0)\r\n            {\r\n                args.Handled = true;\r\n                PCode.Focus();\r\n                PCode.Select(PCode.Text.Length, 0);\r\n            }\r\n        }\r\n\r\n        private void PostCode_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                if (ReceiverForm.Visibility == Visibility.Visible)\r\n                {\r\n                    if (NameLabel.Visibility == Visibility.Visible)\r\n                    {\r\n                        NameLabel.Focus();\r\n                    }\r\n                    else if (EmailLabel.Visibility == Visibility.Visible)\r\n                    {\r\n                        EmailLabel.Focus();\r\n                    }\r\n                    else if (Phone.Visibility == Visibility.Visible)\r\n                    {\r\n                        PCode.Focus();\r\n                        PCode.Select(PCode.Text.Length, 0);\r\n                    }\r\n                    else\r\n                    {\r\n                        ViewModel.Validate();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    ViewModel.Validate();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Name_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                if (ReceiverForm.Visibility == Visibility.Visible)\r\n                {\r\n                    if (EmailLabel.Visibility == Visibility.Visible)\r\n                    {\r\n                        EmailLabel.Focus();\r\n                    }\r\n                    else if (Phone.Visibility == Visibility.Visible)\r\n                    {\r\n                        PCode.Focus();\r\n                        PCode.Select(PCode.Text.Length, 0);\r\n                    }\r\n                    else\r\n                    {\r\n                        ViewModel.Validate();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    ViewModel.Validate();\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Email_OnKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            if (e.Key == Key.Enter)\r\n            {\r\n                if (Phone.Visibility == Visibility.Visible)\r\n                {\r\n                    PCode.Focus();\r\n                    PCode.Select(PCode.Text.Length, 0);\r\n                }\r\n                else\r\n                {\r\n                    ViewModel.Validate();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/ShippingMethodView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Payments.ShippingMethodView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:converters=\"clr-namespace:TelegramClient.Converters\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    mc:Ignorable=\"d\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\" \r\n    d:DesignHeight=\"768\" d:DesignWidth=\"480\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" Text=\"{Binding MTProtoService.Message}\"/>\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n    \r\n    <views:TelegramViewBase.Resources>\r\n        <ResourceDictionary>\r\n            <converters:ShippingOptionToStringConverter x:Key=\"ShippingOptionToStringConverter\"/>\r\n        </ResourceDictionary>\r\n    </views:TelegramViewBase.Resources>\r\n    \r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <TextBlock Text=\"{Binding Resources.ShippingMethods, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <ScrollViewer Grid.Row=\"1\">\r\n            <StackPanel x:Name=\"ContentPanel\" Margin=\"6,0\">\r\n                <ItemsControl Margin=\"0,18\" ItemsSource=\"{Binding PaymentInfo.ValidatedInfo.ShippingOptions}\">\r\n                    <ItemsControl.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <RadioButton GroupName=\"ShippingOptionsGroup\" IsChecked=\"{Binding IsSelected, Mode=TwoWay}\" Content=\"{Binding Converter={StaticResource ShippingOptionToStringConverter}}\"/>\r\n                        </DataTemplate>\r\n                    </ItemsControl.ItemTemplate>\r\n                </ItemsControl>\r\n                <Button x:Name=\"Validate\" Width=\"204\" Content=\"{Binding Resources.Next, Source={StaticResource Strings}, Converter={StaticResource Lowercase}}\" HorizontalAlignment=\"Left\"/>              \r\n            </StackPanel>\r\n        </ScrollViewer>\r\n    </Grid>\r\n\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/ShippingMethodView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nnamespace TelegramClient.Views.Payments\r\n{\r\n    public partial class ShippingMethodView\r\n    {\r\n        public ShippingMethodView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/WebCardInfoView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Payments.WebCardInfoView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"PortraitOrLandscape\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    OrientationChanged=\"WebPaymentView_OnOrientationChanged\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"CaptionBorder\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <StackPanel.RenderTransform>\r\n                <TranslateTransform x:Name=\"CaptionTransform\"/>\r\n            </StackPanel.RenderTransform>\r\n            <TextBlock Text=\"{Binding Resources.PaymentInfo, Converter={StaticResource Uppercase}, Source={StaticResource Strings}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <phone:WebBrowser x:Name=\"Browser\" Grid.Row=\"1\" Source=\"{Binding Url}\" IsScriptEnabled=\"True\" ScriptNotify=\"WebBrowser_OnScriptNotify\" Navigating=\"Browser_OnNavigating\" LoadCompleted=\"Browser_OnLoadCompleted\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/WebCardInfoView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System.Windows;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing TelegramClient.ViewModels.Payments;\r\n\r\nnamespace TelegramClient.Views.Payments\r\n{\r\n    public partial class WebCardInfoView\r\n    {\r\n        public WebCardInfoViewModel ViewModel\r\n        {\r\n            get { return DataContext as WebCardInfoViewModel; }\r\n        }\r\n\r\n        public WebCardInfoView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            CaptionBorder.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void WebBrowser_OnScriptNotify(object sender, NotifyEventArgs e)\r\n        {\r\n            ViewModel.ScriptNotify(e.Value);\r\n        }\r\n\r\n        private void WebPaymentView_OnOrientationChanged(object sender, OrientationChangedEventArgs e)\r\n        {\r\n            var contentScaleFactor = Application.Current.Host.Content.ScaleFactor / 100.0;\r\n            var systemTrayHeight = 72.0 / contentScaleFactor;\r\n            CaptionTransform.X = e.Orientation == PageOrientation.LandscapeLeft ? systemTrayHeight : 0.0;\r\n        }\r\n\r\n        private void Browser_OnNavigating(object sender, NavigatingEventArgs e)\r\n        {\r\n            ViewModel.IsWorking = true;\r\n        }\r\n\r\n        private void Browser_OnLoadCompleted(object sender, NavigationEventArgs e)\r\n        {\r\n            ViewModel.IsWorking = false;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/WebVerificationView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Payments.WebVerificationView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:controls=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"PortraitOrLandscape\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.ForegroundColor=\"#FFE3F4FF\"\r\n    shell:SystemTray.IsVisible=\"True\"\r\n    OrientationChanged=\"WebPaymentView_OnOrientationChanged\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"{Binding IsWorking}\" IsVisible=\"True\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls:TelegramTransitionService.NavigationInTransition>\r\n        <controls:TelegramNavigationInTransition>\r\n            <controls:TelegramNavigationInTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls:TelegramNavigationInTransition.Backward>\r\n            <controls:TelegramNavigationInTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls:TelegramNavigationInTransition.Forward>\r\n        </controls:TelegramNavigationInTransition>\r\n    </controls:TelegramTransitionService.NavigationInTransition>\r\n    <controls:TelegramTransitionService.NavigationOutTransition>\r\n        <controls:TelegramNavigationOutTransition>\r\n            <controls:TelegramNavigationOutTransition.Backward>\r\n                <controls:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Backward>\r\n            <controls:TelegramNavigationOutTransition.Forward>\r\n                <controls:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls:TelegramNavigationOutTransition.Forward>\r\n        </controls:TelegramNavigationOutTransition>\r\n    </controls:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"Transparent\">\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n            <RowDefinition Height=\"Auto\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"CaptionBorder\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel Grid.Row=\"0\" Margin=\"12,49,0,0\">\r\n            <StackPanel.RenderTransform>\r\n                <TranslateTransform x:Name=\"CaptionTransform\"/>\r\n            </StackPanel.RenderTransform>\r\n            <TextBlock Text=\"{Binding Title, Converter={StaticResource Uppercase}}\" Foreground=\"White\" Style=\"{StaticResource ApplicationTitleStyle}\"/>\r\n        </StackPanel>\r\n\r\n        <phone:WebBrowser x:Name=\"Browser\" Grid.Row=\"1\" Source=\"{Binding Url}\" IsScriptEnabled=\"True\" ScriptNotify=\"WebBrowser_OnScriptNotify\" Navigating=\"Browser_OnNavigating\" LoadCompleted=\"Browser_OnLoadCompleted\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Payments/WebVerificationView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Navigation;\r\nusing Microsoft.Phone.Controls;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Api.TL;\r\nusing TelegramClient.Utils;\r\nusing TelegramClient.ViewModels.Payments;\r\n\r\nnamespace TelegramClient.Views.Payments\r\n{\r\n    public partial class WebVerificationView\r\n    {\r\n        public WebVerificationViewModel ViewModel\r\n        {\r\n            get { return DataContext as WebVerificationViewModel; }\r\n        }\r\n\r\n        public WebVerificationView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            CaptionBorder.Background = ShellView.CaptionBrush;\r\n        }\r\n\r\n        private void WebBrowser_OnScriptNotify(object sender, NotifyEventArgs e)\r\n        {\r\n\r\n        }\r\n\r\n        private void WebPaymentView_OnOrientationChanged(object sender, OrientationChangedEventArgs e)\r\n        {\r\n            var contentScaleFactor = Application.Current.Host.Content.ScaleFactor / 100.0;\r\n            var systemTrayHeight = 72.0 / contentScaleFactor;\r\n            CaptionTransform.X = e.Orientation == PageOrientation.LandscapeLeft ? systemTrayHeight : 0.0;\r\n        }\r\n\r\n        private void Browser_OnNavigating(object sender, NavigatingEventArgs e)\r\n        {\r\n            if (e.Uri.ToString().StartsWith(\"tg://\"))\r\n            {\r\n                e.Cancel = true;\r\n\r\n                if (e.Uri.ToString().StartsWith(\"tg://resolve/?domain=\"))\r\n                {\r\n                    var previousEntry = NavigationService.BackStack.FirstOrDefault();\r\n                    if (previousEntry != null\r\n                        && previousEntry.Source.ToString().Contains(\"DialogDetailsView.xaml\"))\r\n                    {\r\n                        var user = ViewModel.PaymentInfo.With as TLUser45;\r\n                        if (user != null && user.UserName != null)\r\n                        {\r\n                            Dictionary<string, string> uriParams = null;\r\n                            try\r\n                            {\r\n                                uriParams = TelegramUriMapper.ParseQueryString(e.Uri.ToString());\r\n                            }\r\n                            catch (Exception ex)\r\n                            {\r\n                                Execute.ShowDebugMessage(\"Parse uri exception \" + e.Uri + ex);\r\n                            }\r\n                            if (uriParams != null)\r\n                            {\r\n                                if (e.Uri.ToString().Contains(\"domain\"))\r\n                                {\r\n                                    // /Protocol?encodedLaunchUri=tg://resolve/?domain=<username>&start=<access_token>\r\n                                    // /Protocol?encodedLaunchUri=tg://resolve/?domain=<username>&startgroup=<access_token>\r\n                                    // /Protocol?encodedLaunchUri=tg://resolve/?domain=<username>&post=<post_number>\r\n                                    // /Protocol?encodedLaunchUri=tg://resolve/?domain=<username>&game=<game>\r\n                                    var domain = uriParams[\"domain\"];\r\n\r\n                                    if (string.Equals(user.UserName.ToString(), domain, StringComparison.OrdinalIgnoreCase))\r\n                                    {\r\n                                        NavigationService.GoBack();\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    ViewModel.IsWorking = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Browser_OnLoadCompleted(object sender, NavigationEventArgs e)\r\n        {\r\n            ViewModel.IsWorking = false;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/Views/Search/SearchSharedContactsView.xaml",
    "content": "﻿<views:TelegramViewBase\r\n    x:Class=\"TelegramClient.Views.Search.SearchSharedContactsView\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"\r\n    xmlns:micro=\"clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform\"\r\n    xmlns:controls=\"clr-namespace:Telegram.Controls;assembly=Telegram.Controls\"\r\n    xmlns:i=\"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity\"\r\n    xmlns:behaviors=\"clr-namespace:TelegramClient.Behaviors\"\r\n    xmlns:controls1=\"clr-namespace:TelegramClient.Controls\"\r\n    xmlns:views=\"clr-namespace:TelegramClient.Views\"\r\n    xmlns:media=\"clr-namespace:TelegramClient.Views.Media\"\r\n    FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"\r\n    FontSize=\"{StaticResource PhoneFontSizeNormal}\"\r\n    Foreground=\"{StaticResource PhoneForegroundBrush}\"\r\n    SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"\r\n    mc:Ignorable=\"d\"\r\n    x:Name=\"Self\"\r\n    toolkit:TiltEffect.IsTiltEnabled=\"True\"\r\n    shell:SystemTray.Opacity=\"0.0\"\r\n    shell:SystemTray.IsVisible=\"True\">\r\n\r\n    <shell:SystemTray.ProgressIndicator>\r\n        <shell:ProgressIndicator x:Name=\"ProgressIndicator\" IsIndeterminate=\"True\" IsVisible=\"{Binding IsWorking}\" />\r\n    </shell:SystemTray.ProgressIndicator>\r\n\r\n    <controls1:TelegramTransitionService.NavigationInTransition>\r\n        <controls1:TelegramNavigationInTransition>\r\n            <controls1:TelegramNavigationInTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardIn\" />\r\n            </controls1:TelegramNavigationInTransition.Backward>\r\n            <controls1:TelegramNavigationInTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardIn\"/>\r\n            </controls1:TelegramNavigationInTransition.Forward>\r\n        </controls1:TelegramNavigationInTransition>\r\n    </controls1:TelegramTransitionService.NavigationInTransition>\r\n    <controls1:TelegramTransitionService.NavigationOutTransition>\r\n        <controls1:TelegramNavigationOutTransition>\r\n            <controls1:TelegramNavigationOutTransition.Backward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"BackwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Backward>\r\n            <controls1:TelegramNavigationOutTransition.Forward>\r\n                <controls1:TelegramTurnstileTransition Mode=\"ForwardOut\"/>\r\n            </controls1:TelegramNavigationOutTransition.Forward>\r\n        </controls1:TelegramNavigationOutTransition>\r\n    </controls1:TelegramTransitionService.NavigationOutTransition>\r\n\r\n    <Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneBackgroundBrush}\">\r\n        <Grid.RenderTransform>\r\n            <CompositeTransform/>\r\n        </Grid.RenderTransform>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition Height=\"Auto\"/>\r\n            <RowDefinition Height=\"*\"/>\r\n        </Grid.RowDefinitions>\r\n\r\n        <Border x:Name=\"Caption\" Height=\"104\" VerticalAlignment=\"Top\" IsHitTestVisible=\"False\"/>\r\n\r\n        <StackPanel x:Name=\"TitlePanel\" Grid.Row=\"0\" Margin=\"3,29,3,0\">\r\n            <controls:WatermarkedTextBox x:Name=\"SearchBox\" Text=\"{Binding Text, Mode=TwoWay}\" Watermark=\"{Binding Resources.Search, Source={StaticResource Strings}}\" Style=\"{StaticResource W10MWatermarkedTextBoxStyle}\">\r\n                <controls:WatermarkedTextBox.InputScope>\r\n                    <InputScope>\r\n                        <InputScopeName NameValue=\"Search\"/>\r\n                    </InputScope>\r\n                </controls:WatermarkedTextBox.InputScope>\r\n                <i:Interaction.Behaviors>\r\n                    <behaviors:UpdateTextBindingBehavior/>\r\n                </i:Interaction.Behaviors>\r\n            </controls:WatermarkedTextBox>\r\n        </StackPanel>\r\n\r\n        <controls:LazyListBox \r\n            Grid.Row=\"1\" \r\n            Margin=\"0,0,0,0\" \r\n            ItemsSource=\"{Binding Items}\" \r\n            ItemTemplate=\"{StaticResource UserItemTemplate}\"\r\n            ScrollingStateChanged=\"Items_OnScrollingStateChanged\">\r\n        </controls:LazyListBox>\r\n        <TextBlock Grid.Row=\"1\" Margin=\"24,12\" Text=\"{Binding Status}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Style=\"{StaticResource PhoneTextGroupHeaderStyle}\"/>\r\n    </Grid>\r\n</views:TelegramViewBase>"
  },
  {
    "path": "TelegramClient.WP81/Views/Search/SearchSharedContactsView.xaml.cs",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\nusing System;\r\nusing System.Windows.Input;\r\nusing Telegram.Api.Helpers;\r\nusing Telegram.Controls;\r\nusing TelegramClient.ViewModels.Search;\r\n\r\nnamespace TelegramClient.Views.Search\r\n{\r\n    public partial class SearchSharedContactsView\r\n    {\r\n        public SearchSharedContactsViewModel ViewModel\r\n        {\r\n            get { return DataContext as SearchSharedContactsViewModel; }\r\n        }\r\n\r\n        public SearchSharedContactsView()\r\n        {\r\n            InitializeComponent();\r\n\r\n            Caption.Background = ShellView.CaptionBrush;\r\n\r\n            Loaded += (o, e) =>\r\n            {\r\n                Execute.BeginOnUIThread(TimeSpan.FromMilliseconds(500), () => SearchBox.Focus());\r\n            };\r\n        }\r\n\r\n        private void Items_OnScrollingStateChanged(object sender, ScrollingStateChangedEventArgs e)\r\n        {\r\n            if (e.NewValue)\r\n            {\r\n                var focusElement = FocusManager.GetFocusedElement();\r\n                if (focusElement == SearchBox)\r\n                {\r\n                    Self.Focus();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "TelegramClient.WP81/app.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<configuration>\r\n  <runtime>\r\n    <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\r\n      <dependentAssembly>\r\n        <assemblyIdentity name=\"Microsoft.Phone.Controls\" publicKeyToken=\"24eec0d8c86cda1e\" culture=\"neutral\" />\r\n        <bindingRedirect oldVersion=\"0.0.0.0-8.0.0.0\" newVersion=\"8.0.0.0\" />\r\n      </dependentAssembly>\r\n    </assemblyBinding>\r\n  </runtime>\r\n</configuration>"
  },
  {
    "path": "TelegramClient.WP81/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Caliburn.Micro\" version=\"3.0.3\" targetFramework=\"wp81\" requireReinstallation=\"True\" />\r\n  <package id=\"Caliburn.Micro.Core\" version=\"3.0.3\" targetFramework=\"wp81\" requireReinstallation=\"True\" />\r\n  <package id=\"Coding4Fun.Toolkit.Controls\" version=\"2.0.7\" targetFramework=\"wp71\" requireReinstallation=\"True\" />\r\n  <package id=\"ID3\" version=\"0.3.0\" targetFramework=\"wp81\" />\r\n  <package id=\"ImageTools\" version=\"0.3.1\" targetFramework=\"wp81\" />\r\n  <package id=\"libphonenumber-csharp-portable\" version=\"1.0.0.2\" targetFramework=\"wp80\" />\r\n  <package id=\"Microsoft.Bcl\" version=\"1.1.10\" targetFramework=\"wp81\" />\r\n  <package id=\"Microsoft.Bcl.Build\" version=\"1.0.14\" targetFramework=\"wp81\" />\r\n  <package id=\"Microsoft.Net.Http\" version=\"2.2.29\" targetFramework=\"wp81\" />\r\n  <package id=\"Portable.BouncyCastle\" version=\"1.7.0.2\" targetFramework=\"wp81\" />\r\n  <package id=\"Rx-Core\" version=\"2.2.2\" targetFramework=\"wp71\" requireReinstallation=\"True\" />\r\n  <package id=\"Rx-Interfaces\" version=\"2.2.2\" targetFramework=\"wp71\" requireReinstallation=\"True\" />\r\n  <package id=\"Rx-Linq\" version=\"2.2.2\" targetFramework=\"wp71\" requireReinstallation=\"True\" />\r\n  <package id=\"Rx-Main\" version=\"2.2.2\" targetFramework=\"wp71\" />\r\n  <package id=\"Rx-PlatformServices\" version=\"2.2.3\" targetFramework=\"wp71\" requireReinstallation=\"True\" />\r\n  <package id=\"Rx-XAML\" version=\"2.2.2\" targetFramework=\"wp71\" requireReinstallation=\"True\" />\r\n  <package id=\"WPtoolkit\" version=\"4.2013.08.16\" targetFramework=\"wp80\" />\r\n</packages>"
  },
  {
    "path": "TelegramClient.WP81.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2013\r\nVisualStudioVersion = 12.0.30501.0\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TelegramClient.WP81\", \"TelegramClient.WP81\\TelegramClient.WP81.csproj\", \"{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Telegram.Api.WP8\", \"Telegram.Api.WP8\\Telegram.Api.WP8.csproj\", \"{E79D5093-8038-4A5F-8A98-CA38C0D0886F}\"\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{414D6805-ADB9-4A47-850B-7A65131D7A23}\"\r\n\tProjectSection(SolutionItems) = preProject\r\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\r\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\r\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"TelegramClient.Opus\", \"TelegramClient.Opus\\TelegramClient.Opus.vcxproj\", \"{5E327850-E16E-4642-957A-FD52BF8D3D02}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Telegram.Controls.WP8\", \"Telegram.Controls.WP8\\Telegram.Controls.WP8.csproj\", \"{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"TelegramClient.WebP\", \"TelegramClient.WebP\\TelegramClient.WebP.vcxproj\", \"{FAE12FD9-EDCA-433E-AD11-F1663A998F35}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TelegramClient.Player.WP8\", \"TelegramClient.Player.WP8\\TelegramClient.Player.WP8.csproj\", \"{62C14349-ED3B-4FF0-8635-F970AA1A8E32}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TelegramClient.Tasks\", \"TelegramClient.Tasks\\TelegramClient.Tasks.csproj\", \"{997BD0C4-68E8-4495-904A-EB798B166832}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Telegram.Api.PCL\", \"Telegram.Api.PCL\\Telegram.Api.PCL.csproj\", \"{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"OpenCVComponent\", \"OpenCVComponent\\OpenCVComponent.vcxproj\", \"{EADFF7B8-E6C3-4F34-9B33-014B3035C595}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"FFmpegInterop.Shared\", \"FFmpegInterop\\Win8.1\\FFmpegInterop.Shared\\FFmpegInterop.Shared.vcxitems\", \"{B290D2CE-E857-4ACE-8541-D80A3B9AB04E}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"FFmpegInterop.WindowsPhone\", \"FFmpegInterop\\Win8.1\\FFmpegInterop.WindowsPhone\\FFmpegInterop.WindowsPhone.vcxproj\", \"{EBC5CA98-87F1-4A01-A48D-69659C103E72}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libtgvoip\", \"libtgvoip-public\\libtgvoip.WP81.vcxproj\", \"{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"VoipBackendServerHost\", \"VoipBackendServerHost\\VoipBackendServerHost.vcxproj\", \"{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"BackEnd\", \"BackEnd\\BackEnd.vcxproj\", \"{C8D75245-FFCF-4932-A228-C9CC8BB60B03}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"BackEndProxyStub\", \"BackEndProxyStub\\BackEndProxyStub.vcxproj\", \"{BBABEEA1-494C-4618-96E3-399873A5558B}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Agents\", \"Agents\\Agents.csproj\", \"{820034C1-645D-4340-8813-D980C1EF77DE}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"TelegramClient.Native\", \"TelegramClient.Native\\TelegramClient.Native.vcxproj\", \"{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libtgnet\", \"libtgnet\\libtgnet.vcxproj\", \"{CC7A35BF-AABC-411D-B911-AC037A781266}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SharedMSBuildProjectFiles) = preSolution\r\n\t\tFFmpegInterop\\Win8.1\\FFmpegInterop.Shared\\FFmpegInterop.Shared.vcxitems*{b290d2ce-e857-4ace-8541-d80a3b9ab04e}*SharedItemsImports = 9\r\n\t\tFFmpegInterop\\Win8.1\\FFmpegInterop.Shared\\FFmpegInterop.Shared.vcxitems*{ebc5ca98-87f1-4a01-a48d-69659c103e72}*SharedItemsImports = 4\r\n\tEndGlobalSection\r\n\tGlobalSection(SubversionScc) = preSolution\r\n\t\tSvn-Managed = True\r\n\t\tManager = AnkhSVN - Subversion Support for Visual Studio\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug Private Beta|Any CPU = Debug Private Beta|Any CPU\r\n\t\tDebug Private Beta|ARM = Debug Private Beta|ARM\r\n\t\tDebug Private Beta|Mixed Platforms = Debug Private Beta|Mixed Platforms\r\n\t\tDebug Private Beta|Win32 = Debug Private Beta|Win32\r\n\t\tDebug Private Beta|x64 = Debug Private Beta|x64\r\n\t\tDebug Private Beta|x86 = Debug Private Beta|x86\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tDebug|ARM = Debug|ARM\r\n\t\tDebug|Mixed Platforms = Debug|Mixed Platforms\r\n\t\tDebug|Win32 = Debug|Win32\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tDebug|x86 = Debug|x86\r\n\t\tRelease Private Beta|Any CPU = Release Private Beta|Any CPU\r\n\t\tRelease Private Beta|ARM = Release Private Beta|ARM\r\n\t\tRelease Private Beta|Mixed Platforms = Release Private Beta|Mixed Platforms\r\n\t\tRelease Private Beta|Win32 = Release Private Beta|Win32\r\n\t\tRelease Private Beta|x64 = Release Private Beta|x64\r\n\t\tRelease Private Beta|x86 = Release Private Beta|x86\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\t\tRelease|ARM = Release|ARM\r\n\t\tRelease|Mixed Platforms = Release|Mixed Platforms\r\n\t\tRelease|Win32 = Release|Win32\r\n\t\tRelease|x64 = Release|x64\r\n\t\tRelease|x86 = Release|x86\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Win32.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Win32.Build.0 = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|x86.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|x86.Build.0 = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|Win32.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|Win32.Build.0 = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|x86.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|x86.Build.0 = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Win32.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Win32.Build.0 = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|x64.ActiveCfg = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|x86.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|x86.Build.0 = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Win32.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Win32.Build.0 = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|x86.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|x86.Build.0 = Release|x86\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|x86.Build.0 = Release|Win32\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug Private Beta|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug Private Beta|Win32.ActiveCfg = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug Private Beta|Win32.Build.0 = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug Private Beta|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug Private Beta|x86.ActiveCfg = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug Private Beta|x86.Build.0 = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug|Win32.ActiveCfg = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug|Win32.Build.0 = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug|x86.ActiveCfg = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Debug|x86.Build.0 = Debug|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release Private Beta|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release Private Beta|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release Private Beta|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release Private Beta|Win32.ActiveCfg = Release|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release Private Beta|Win32.Build.0 = Release|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release Private Beta|x64.ActiveCfg = Release|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release Private Beta|x86.ActiveCfg = Release|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release Private Beta|x86.Build.0 = Release|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release|Win32.ActiveCfg = Release|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release|Win32.Build.0 = Release|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release|x86.ActiveCfg = Release|x86\r\n\t\t{F04BE5A2-70DF-4E82-BFB5-CD03985C9746}.Release|x86.Build.0 = Release|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|Any CPU.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|Any CPU.Build.0 = Debug Private Beta|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|Any CPU.Deploy.0 = Debug Private Beta|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|ARM.ActiveCfg = Debug Private Beta|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|ARM.Build.0 = Debug Private Beta|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|ARM.Deploy.0 = Debug Private Beta|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|Mixed Platforms.Build.0 = Debug Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|Mixed Platforms.Deploy.0 = Debug Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|Win32.ActiveCfg = Debug Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|Win32.Build.0 = Debug Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|Win32.Deploy.0 = Debug Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|x64.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|x86.ActiveCfg = Debug Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|x86.Build.0 = Debug Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug Private Beta|x86.Deploy.0 = Debug Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|Any CPU.Deploy.0 = Debug|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|ARM.Deploy.0 = Debug|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|Mixed Platforms.Deploy.0 = Debug|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|Win32.ActiveCfg = Debug|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|Win32.Build.0 = Debug|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|Win32.Deploy.0 = Debug|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|x86.ActiveCfg = Debug|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|x86.Build.0 = Debug|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Debug|x86.Deploy.0 = Debug|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|Any CPU.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|Any CPU.Build.0 = Release Private Beta|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|Any CPU.Deploy.0 = Release Private Beta|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|ARM.ActiveCfg = Release Private Beta|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|ARM.Build.0 = Release Private Beta|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|ARM.Deploy.0 = Release Private Beta|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|Mixed Platforms.ActiveCfg = Release Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|Mixed Platforms.Build.0 = Release Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|Mixed Platforms.Deploy.0 = Release Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|Win32.ActiveCfg = Release Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|Win32.Build.0 = Release Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|Win32.Deploy.0 = Release Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|x64.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|x86.ActiveCfg = Release Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|x86.Build.0 = Release Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release Private Beta|x86.Deploy.0 = Release Private Beta|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|Any CPU.Deploy.0 = Release|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|ARM.Deploy.0 = Release|ARM\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|Mixed Platforms.Deploy.0 = Release|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|Win32.ActiveCfg = Release|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|Win32.Build.0 = Release|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|Win32.Deploy.0 = Release|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|x86.ActiveCfg = Release|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|x86.Build.0 = Release|x86\r\n\t\t{B4E6EEEF-5819-4528-8234-EA4A0EC7B6E3}.Release|x86.Deploy.0 = Release|x86\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|x86.Build.0 = Release|Win32\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug Private Beta|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug Private Beta|Win32.ActiveCfg = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug Private Beta|Win32.Build.0 = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug Private Beta|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug Private Beta|x86.ActiveCfg = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug Private Beta|x86.Build.0 = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug|Win32.ActiveCfg = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug|Win32.Build.0 = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug|x86.ActiveCfg = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Debug|x86.Build.0 = Debug|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release Private Beta|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release Private Beta|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release Private Beta|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release Private Beta|Win32.ActiveCfg = Release|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release Private Beta|Win32.Build.0 = Release|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release Private Beta|x64.ActiveCfg = Release|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release Private Beta|x86.ActiveCfg = Release|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release Private Beta|x86.Build.0 = Release|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release|Win32.ActiveCfg = Release|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release|Win32.Build.0 = Release|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release|x86.ActiveCfg = Release|x86\r\n\t\t{62C14349-ED3B-4FF0-8635-F970AA1A8E32}.Release|x86.Build.0 = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug Private Beta|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug Private Beta|Win32.ActiveCfg = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug Private Beta|Win32.Build.0 = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug Private Beta|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug Private Beta|x86.ActiveCfg = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug Private Beta|x86.Build.0 = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug|Win32.ActiveCfg = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug|Win32.Build.0 = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug|x86.ActiveCfg = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Debug|x86.Build.0 = Debug|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release Private Beta|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release Private Beta|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release Private Beta|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release Private Beta|Win32.ActiveCfg = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release Private Beta|Win32.Build.0 = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release Private Beta|x64.ActiveCfg = Release|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release Private Beta|x86.ActiveCfg = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release Private Beta|x86.Build.0 = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release|Win32.ActiveCfg = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release|Win32.Build.0 = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release|x86.ActiveCfg = Release|x86\r\n\t\t{997BD0C4-68E8-4495-904A-EB798B166832}.Release|x86.Build.0 = Release|x86\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug Private Beta|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug Private Beta|ARM.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug Private Beta|Win32.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug Private Beta|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug Private Beta|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug|ARM.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug|Win32.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release Private Beta|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release Private Beta|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release Private Beta|ARM.ActiveCfg = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release Private Beta|Mixed Platforms.Build.0 = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release Private Beta|Win32.ActiveCfg = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release Private Beta|x64.ActiveCfg = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release Private Beta|x86.ActiveCfg = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release|ARM.ActiveCfg = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release|ARM.Build.0 = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release|Mixed Platforms.Build.0 = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release|Win32.ActiveCfg = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{DE897F51-AF1F-48FE-9DBB-6B308F9740D1}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{EADFF7B8-E6C3-4F34-9B33-014B3035C595}.Release|x86.Build.0 = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{EBC5CA98-87F1-4A01-A48D-69659C103E72}.Release|x86.Build.0 = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{21F10158-C078-4BD7-A82A-9C4AEB8E2F8E}.Release|x86.Build.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|ARM.Deploy.0 = Debug|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|Mixed Platforms.Deploy.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|Win32.Deploy.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug Private Beta|x86.Deploy.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|ARM.Deploy.0 = Debug|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|Win32.Deploy.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Debug|x86.Deploy.0 = Debug|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|ARM.Deploy.0 = Release|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|Mixed Platforms.Deploy.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|Win32.Deploy.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release Private Beta|x86.Deploy.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|ARM.Deploy.0 = Release|ARM\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|Mixed Platforms.Deploy.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|Win32.Deploy.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|x86.Build.0 = Release|Win32\r\n\t\t{0A402E0E-CEE9-477E-B17A-A4B01BB1448C}.Release|x86.Deploy.0 = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{C8D75245-FFCF-4932-A228-C9CC8BB60B03}.Release|x86.Build.0 = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{BBABEEA1-494C-4618-96E3-399873A5558B}.Release|x86.Build.0 = Release|Win32\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug Private Beta|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug Private Beta|Win32.ActiveCfg = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug Private Beta|Win32.Build.0 = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug Private Beta|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug Private Beta|x86.ActiveCfg = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug Private Beta|x86.Build.0 = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug|Win32.ActiveCfg = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug|Win32.Build.0 = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug|x86.ActiveCfg = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Debug|x86.Build.0 = Debug|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release Private Beta|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release Private Beta|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release Private Beta|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release Private Beta|Win32.ActiveCfg = Release|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release Private Beta|Win32.Build.0 = Release|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release Private Beta|x64.ActiveCfg = Release|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release Private Beta|x86.ActiveCfg = Release|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release Private Beta|x86.Build.0 = Release|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release|Win32.ActiveCfg = Release|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release|Win32.Build.0 = Release|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release|x86.ActiveCfg = Release|x86\r\n\t\t{820034C1-645D-4340-8813-D980C1EF77DE}.Release|x86.Build.0 = Release|x86\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{B51DD8C5-335D-4A2D-B429-6D0F41ED0281}.Release|x86.Build.0 = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{CC7A35BF-AABC-411D-B911-AC037A781266}.Release|x86.Build.0 = Release|Win32\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "TelegramClient.WebP/ImageUtils.cpp",
    "content": "// \n// This is the source code of Telegram for Windows Phone v. 3.x.x.\n// It is licensed under GNU GPL v. 2 or later.\n// You should have received a copy of the license in this archive (see LICENSE).\n// \n// Copyright Evgeny Nadymov, 2013-present.\n// \n#include \"pch.h\"\n#include \"ImageUtils.h\"\n#include <time.h>\n#include <limits.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <math.h>\n#include <assert.h>\n\nusing namespace TelegramClient_WebP;\n\nImageUtils::ImageUtils()\n{\n}\n\n#define SIZE_FULL 8100\n\nstatic inline uint64_t get_colors(const uint8_t *p) {\n\treturn p[0] + (p[1] << 16) + ((uint64_t)p[2] << 32);\n}\n\nstatic void fastBlur(int width, int height, int s, void *pixels, int radius) {\n\tuint8_t *pix = (uint8_t *)pixels;\n\tconst int w = width;\n\tconst int h = height;\n\tconst int stride = s;\n\tconst int r1 = radius + 1;\n\tconst int div = radius * 2 + 1;\n\tint shift;\n\tif (radius == 1) {\n\t\tshift = 2;\n\t}\n\telse if (radius == 3) {\n\t\tshift = 4;\n\t}\n\telse if (radius == 7) {\n\t\tshift = 6;\n\t}\n\telse if (radius == 15) {\n\t\tshift = 8;\n\t}\n\telse {\n\t\treturn;\n\t}\n\n\tif (radius > 15 || div >= w || div >= h || w * h > SIZE_FULL) {\n\t\treturn;\n\t}\n\n\tstatic uint64_t rgb[SIZE_FULL];\n\n\tint x, y, i;\n\n\tint yw = 0;\n\tconst int we = w - r1;\n\tfor (y = 0; y < h; y++) {\n\t\tuint64_t cur = get_colors(&pix[yw]);\n\t\tuint64_t rgballsum = -radius * cur;\n\t\tuint64_t rgbsum = cur * ((r1 * (r1 + 1)) >> 1);\n\n\t\tfor (i = 1; i <= radius; i++) {\n\t\t\tuint64_t cur = get_colors(&pix[yw + i * 4]);\n\t\t\trgbsum += cur * (r1 - i);\n\t\t\trgballsum += cur;\n\t\t}\n\n\t\tx = 0;\n\n#define update(start, middle, end)                         \\\n      rgb[y * w + x] = (rgbsum >> shift) & 0x00FF00FF00FF00FF; \\\n                                                           \\\n      rgballsum += get_colors (&pix[yw + (start) * 4]) -   \\\n               2 * get_colors (&pix[yw + (middle) * 4]) +  \\\n                   get_colors (&pix[yw + (end) * 4]);      \\\n      rgbsum += rgballsum;                                 \\\n      x++;                                                 \\\n\n\t\twhile (x < r1) {\n\t\t\tupdate(0, x, x + r1);\n\t\t}\n\t\twhile (x < we) {\n\t\t\tupdate(x - r1, x, x + r1);\n\t\t}\n\t\twhile (x < w) {\n\t\t\tupdate(x - r1, x, w - 1);\n\t\t}\n#undef update\n\n\t\tyw += stride;\n\t}\n\n\tconst int he = h - r1;\n\tfor (x = 0; x < w; x++) {\n\t\tuint64_t rgballsum = -radius * rgb[x];\n\t\tuint64_t rgbsum = rgb[x] * ((r1 * (r1 + 1)) >> 1);\n\t\tfor (i = 1; i <= radius; i++) {\n\t\t\trgbsum += rgb[i * w + x] * (r1 - i);\n\t\t\trgballsum += rgb[i * w + x];\n\t\t}\n\n\t\ty = 0;\n\t\tint yi = x * 4;\n\n#define update(start, middle, end)         \\\n      int64_t res = rgbsum >> shift;           \\\n      pix[yi] = res;                       \\\n      pix[yi + 1] = res >> 16;             \\\n      pix[yi + 2] = res >> 32;             \\\n                                           \\\n      rgballsum += rgb[x + (start) * w] -  \\\n               2 * rgb[x + (middle) * w] + \\\n                   rgb[x + (end) * w];     \\\n      rgbsum += rgballsum;                 \\\n      y++;                                 \\\n      yi += stride;\n\n\t\twhile (y < r1) {\n\t\t\tupdate(0, y, y + r1);\n\t\t}\n\t\twhile (y < he) {\n\t\t\tupdate(y - r1, y, y + r1);\n\t\t}\n\t\twhile (y < h) {\n\t\t\tupdate(y - r1, y, h - 1);\n\t\t}\n#undef update\n\t}\n}\n\nPlatform::Array<uint8>^ ImageUtils::FastBlur(int width, int height, int stride, const Platform::Array<uint8>^ pixels){\n\n\tauto pix = new uint8_t[pixels->Length];\n\tfor (int i = 0; i < pixels->Length; i++) {\n\t\tpix[i] = pixels[i];\n\t}\n\n\tfastBlur(width, height, stride, pix, 3);\n\n\tPlatform::Array<uint8>^ returnPixels = ref new Platform::Array<uint8>(pixels->Length);\n\tfor (int i = 0; i < pixels->Length; i++) {\n\t\treturnPixels[i] = pix[i];\n\t}\n\n\tdelete[] pix;\n\n\treturn returnPixels;\n}\n\nPlatform::Array<uint8>^ ImageUtils::FastSecretBlur(int width, int height, int stride, const Platform::Array<uint8>^ pixels){\n\n\tauto pix = new uint8_t[pixels->Length];\n\tfor (int i = 0; i < pixels->Length; i++) {\n\t\tpix[i] = pixels[i];\n\t}\n\n\tfastBlur(width, height, stride, pix, 15);\n\n\tPlatform::Array<uint8>^ returnPixels = ref new Platform::Array<uint8>(pixels->Length);\n\tfor (int i = 0; i < pixels->Length; i++) {\n\t\treturnPixels[i] = pix[i];\n\t}\n\n\tdelete[] pix;\n\n\treturn returnPixels;\n}\n"
  },
  {
    "path": "TelegramClient.WebP/ImageUtils.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n\r\nnamespace TelegramClient_WebP\r\n{\r\n\tpublic ref class ImageUtils sealed\r\n\t{\r\n\tpublic:\r\n\t\tImageUtils();\r\n\r\n\t\tPlatform::Array<uint8>^ FastBlur(int width, int height, int stride, const Platform::Array<uint8>^ pixels);\r\n\t\tPlatform::Array<uint8>^ FastSecretBlur(int width, int height, int stride, const Platform::Array<uint8>^ pixels);\r\n\t};\r\n}"
  },
  {
    "path": "TelegramClient.WebP/TelegramClient.WebP.cpp",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"pch.h\"\r\n#include \"TelegramClient.WebP.h\"\r\n#include <windows.h>\r\n#include <malloc.h>\r\n\r\nusing namespace TelegramClient_WebP::LibWebP;\r\nusing namespace Platform;\r\n\r\nint(*WebPGetDecoderVersion) ();\r\nint (*WebPGetInfo) (void* data, unsigned int data_size, int* width, int* height);\r\nvoid* (*WebPDecodeRGBInto) (void* data, unsigned int data_size, void* output_buffer, int output_buffer_size, int output_stride);\r\nvoid* (*WebPDecodeBGRInto) (void* data, unsigned int data_size, void* output_buffer, int output_buffer_size, int output_stride);\r\nvoid* (*WebPDecodeBGRAInto) (void* data, unsigned int data_size, void* output_buffer, int output_buffer_size, int output_stride);\r\nvoid* (*WebPDecodeRgbAInto) (void* data, unsigned int data_size, void* output_buffer, int output_buffer_size, int output_stride);\r\nvoid* (*WebPDecodeRGBAInto) (void* data, unsigned int data_size, void* output_buffer, int output_buffer_size, int output_stride);\r\nbool loaded = false;\r\n\r\nWebPDecoder::WebPDecoder()\r\n{\r\n\tif (!loaded)\r\n\t{\r\n#if _M_ARM\r\n\t\tauto lib = LoadPackagedLibrary(L\"ARM\\\\libwebp\", 0);\r\n#else\r\n\t\tauto lib = LoadPackagedLibrary(L\"x86\\\\libwebp\", 0);\r\n#endif\r\n\t\tif (!lib)\r\n\t\t\tthrow ref new Platform::FailureException();\r\n\t\tWebPGetDecoderVersion = (int(*)()) GetProcAddress(lib, \"WebPGetDecoderVersion\");\r\n\t\tWebPGetInfo =\r\n\t\t\t(int(*)(\r\n\t\t\tvoid* data,\r\n\t\t\tunsigned int data_size,\r\n\t\t\tint* width,\r\n\t\t\tint* height))\r\n\t\t\tGetProcAddress(lib, \"WebPGetInfo\");\r\n\r\n\t\tWebPDecodeRGBInto =\r\n\t\t\t(void*(*)(\r\n\t\t\tvoid* data,\r\n\t\t\tunsigned int data_size,\r\n\t\t\tvoid* output_buffer,\r\n\t\t\tint output_buffer_size,\r\n\t\t\tint output_stride))\r\n\t\t\tGetProcAddress(lib, \"WebPDecodeRGBInto\");\r\n\r\n\t\tWebPDecodeBGRInto =\r\n\t\t\t(void*(*) (\r\n\t\t\tvoid* data,\r\n\t\t\tunsigned int data_size,\r\n\t\t\tvoid* output_buffer,\r\n\t\t\tint output_buffer_size,\r\n\t\t\tint output_stride))\r\n\t\t\tGetProcAddress(lib, \"WebPDecodeBGRInto\");\r\n\r\n\t\tWebPDecodeBGRAInto =\r\n\t\t\t(void* (*) (\r\n\t\t\tvoid* data,\r\n\t\t\tunsigned int data_size,\r\n\t\t\tvoid* output_buffer,\r\n\t\t\tint output_buffer_size,\r\n\t\t\tint output_stride))\r\n\t\t\tGetProcAddress(lib, \"WebPDecodeBGRAInto\");\r\n\r\n\t\tWebPDecodeRgbAInto =\r\n\t\t\t(void* (*) (\r\n\t\t\tvoid* data,\r\n\t\t\tunsigned int data_size,\r\n\t\t\tvoid* output_buffer,\r\n\t\t\tint output_buffer_size,\r\n\t\t\tint output_stride))\r\n\t\t\tGetProcAddress(lib, \"WebPDecodeRgbAInto\");\r\n\r\n\t\tWebPDecodeRGBAInto =\r\n\t\t\t(void* (*) (\r\n\t\t\tvoid* data,\r\n\t\t\tunsigned int data_size,\r\n\t\t\tvoid* output_buffer,\r\n\t\t\tint output_buffer_size,\r\n\t\t\tint output_stride))\r\n\t\t\tGetProcAddress(lib, \"WebPDecodeRGBAInto\");\r\n\r\n\t\tif (WebPGetDecoderVersion&&\r\n\t\t\tWebPGetInfo&&\r\n\t\t\tWebPDecodeRGBInto&&\r\n\t\t\tWebPDecodeBGRInto&&\r\n\t\t\tWebPDecodeBGRAInto&&\r\n\t\t\tWebPDecodeRgbAInto&&\r\n\t\t\tWebPDecodeRGBAInto)\r\n\t\t\tloaded = true;\r\n\t\telse\r\n\t\t\tthrow ref new Platform::FailureException();\r\n\t}\r\n}\r\n\r\n\r\nPlatform::String^ WebPDecoder::GetDecoderVersion()\r\n{\r\n\treturn GetDecoderVersion()->ToString();\r\n}\r\nbool WebPDecoder::GetInfo(const Platform::Array<unsigned char>^ Data, int* Width, int* Height)\r\n{\r\n\tauto nData = (unsigned char*) malloc(Data->Length*sizeof(unsigned char));\r\n\tmemcpy(nData, Data->Data, Data->Length);\r\n\tauto result = WebPGetInfo(nData, Data->Length, Width, Height);\r\n\tfree(nData);\r\n\treturn result;\r\n}\r\n\r\nPlatform::Array<unsigned char>^ WebPDecoder::Decode(DecodeType type, const Platform::Array<unsigned char>^ Data, int* Width, int* Height)\r\n{\r\n\tauto nData = (unsigned char*) malloc(Data->Length*sizeof(unsigned char));\r\n\tmemcpy(nData, Data->Data, Data->Length);\r\n\tint retDataLength = 0;\r\n\tunsigned char* retData = NULL;\r\n\tif (!GetInfo(Data, Width, Height))\r\n\t\tthrow ref new Platform::FailureException();\r\n\tswitch (type)\r\n\t{\r\n\tcase DecodeType::rgbA:\r\n\t\tretDataLength = (*Width) * (*Height) * 4 * sizeof(unsigned char);\r\n\t\tretData = (unsigned char*)malloc(retDataLength);\r\n\t\tretData = (unsigned char*)WebPDecodeRgbAInto(nData, Data->Length, retData, (*Width) * (*Height) * 4, (*Width) * 4);\r\n\t\tfree(nData);\r\n\t\tbreak;\r\n\tcase DecodeType::BGR:\r\n\t\tretDataLength = (*Width) * (*Height) * 3 * sizeof(unsigned char);\r\n\t\tretData = (unsigned char*) malloc(retDataLength);\r\n\t\tretData = (unsigned char*) WebPDecodeBGRInto(nData, Data->Length, retData, (*Width) * (*Height) * 3, (*Width) * 3);\r\n\t\tfree(nData);\r\n\t\tbreak;\r\n\tcase DecodeType::RGB:\r\n\t\tretDataLength = (*Width) * (*Height) * 3 * sizeof(unsigned char);\r\n\t\tretData = (unsigned char*) malloc(retDataLength);\r\n\t\tretData = (unsigned char*) WebPDecodeRGBInto(nData, Data->Length, retData, (*Width) * (*Height) * 3, (*Width) * 3);\r\n\t\tfree(nData);\r\n\t\tbreak;\r\n\tcase DecodeType::RGBA:\r\n\t\tretDataLength = (*Width) * (*Height) * 4 * sizeof(unsigned char);\r\n\t\tretData = (unsigned char*) malloc(retDataLength);\r\n\t\tretData = (unsigned char*) WebPDecodeRGBAInto(nData, Data->Length, retData, (*Width) * (*Height) * 4, (*Width) * 4);\r\n\t\tfree(nData);\r\n\t\tbreak;\r\n\tcase DecodeType::BGRA:\r\n\t\tretDataLength = (*Width) * (*Height) * 4 * sizeof(unsigned char);\r\n\t\tretData = (unsigned char*) malloc(retDataLength);\r\n\t\tretData = (unsigned char*) WebPDecodeBGRAInto(nData, Data->Length, retData, (*Width) * (*Height) * 4, (*Width) * 4);\r\n\t\tfree(nData);\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tfree(nData);\r\n\t\tthrow ref new Platform::NotImplementedException();\r\n\t}\r\n\tif (retData == NULL)\r\n\t\tthrow ref new Platform::FailureException();\r\n\r\n\tauto retArr = ref new Platform::Array<unsigned char>(retData, retDataLength);\r\n\t//for (auto i = 0; i < retDataLength; i++)\r\n\t//{\r\n\t//\tretArr[i] = retData[i];\r\n\t//}\r\n\tfree(retData);\r\n\treturn retArr;\r\n}\r\n\r\nPlatform::Array<unsigned char>^ WebPDecoder::DecodeRgbA(const Platform::Array<unsigned char>^ Data, int* Width, int* Height)\r\n{\r\n\tauto nData = (unsigned char*)malloc(Data->Length*sizeof(unsigned char));\r\n\tmemcpy(nData, Data->Data, Data->Length);\r\n\tint retDataLength = 0;\r\n\tunsigned char* retData = NULL;\r\n\tif (!GetInfo(Data, Width, Height))\r\n\t\tthrow ref new Platform::FailureException();\r\n\tretDataLength = (*Width)* (*Height)* 4 * sizeof(unsigned char);\r\n\tretData = (unsigned char*)malloc(retDataLength);\r\n\tretData = (unsigned char*)WebPDecodeRgbAInto(nData, Data->Length, retData, (*Width)* (*Height)* 4, (*Width)* 4);\r\n\tfree(nData);\r\n\r\n\tif (retData == NULL)\r\n\t\tthrow ref new Platform::FailureException();\r\n\r\n\tauto retArr = ref new Platform::Array<unsigned char>(retData, retDataLength);\r\n\t//for (auto i = 0; i < retDataLength; i++)\r\n\t//{\r\n\t//\tretArr[i] = retData[i];\r\n\t//}\r\n\tfree(retData);\r\n\treturn retArr;\r\n}\r\n"
  },
  {
    "path": "TelegramClient.WebP/TelegramClient.WebP.h",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n\r\nnamespace TelegramClient_WebP\r\n{\r\n    namespace LibWebP\r\n\t{\r\n\t\tpublic enum class DecodeType\r\n\t\t{\r\n\t\t\tRGB,\r\n\t\t\tRGBA,\r\n\t\t\trgbA,\r\n\t\t\tBGR,\r\n\t\t\tBGRA,\r\n\t\t\tYUV\r\n\t\t};\r\n\r\n\t\tpublic ref class WebPDecoder sealed\r\n\t\t{\r\n\t\tpublic:\r\n\t\t\tWebPDecoder();\r\n\t\t\tPlatform::String^ GetDecoderVersion();\r\n\t\t\tbool GetInfo(const Platform::Array<unsigned char>^ Data, int* Width, int* Height);\r\n\t\t\tPlatform::Array<unsigned char>^ Decode(DecodeType type, const Platform::Array<unsigned char>^ Data, int* Width, int* Height); \r\n\t\t\tPlatform::Array<unsigned char>^ DecodeRgbA(const Platform::Array<unsigned char>^ Data, int* Width, int* Height);\r\n\t\t\t//Platform::Array<unsigned int>^ WebPDecoder::DecodeToWritableBitmap(const Platform::Array<unsigned char>^ Data, int* Width, int* Height);\r\n\t\t\t//Platform::Array<int>^ Decode\r\n\t\t};\r\n\t}\r\n}"
  },
  {
    "path": "TelegramClient.WebP/TelegramClient.WebP.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|ARM\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{fae12fd9-edca-433e-ad11-f1663a998f35}</ProjectGuid>\r\n    <RootNamespace>TelegramClient_WebP</RootNamespace>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n    <WinMDAssembly>true</WinMDAssembly>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v110_wp80</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v110_wp80</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v110_wp80</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v110_wp80</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup>\r\n    <GenerateManifest>false</GenerateManifest>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>true</CompileAsWinRT>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>true</CompileAsWinRT>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>true</CompileAsWinRT>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <CompileAsWinRT>true</CompileAsWinRT>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n      <GenerateWindowsMetadata>true</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"platform.winmd\">\r\n      <IsWinMDFile>true</IsWinMDFile>\r\n      <Private>false</Private>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"ImageUtils.h\" />\r\n    <ClInclude Include=\"TelegramClient.WebP.h\" />\r\n    <ClInclude Include=\"pch.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"ImageUtils.cpp\" />\r\n    <ClCompile Include=\"TelegramClient.WebP.cpp\" />\r\n    <ClCompile Include=\"pch.cpp\">\r\n      <PrecompiledHeader>Create</PrecompiledHeader>\r\n    </ClCompile>\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\WindowsPhone\\v$(TargetPlatformVersion)\\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "TelegramClient.WebP/TelegramClient.WebP.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup>\r\n    <Filter Include=\"Resources\">\r\n      <UniqueIdentifier>5fd0e509-b6ae-4f29-bd2a-4d2cc10f3aa0</UniqueIdentifier>\r\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r\n    </Filter>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"TelegramClient.WebP.cpp\" />\r\n    <ClCompile Include=\"pch.cpp\" />\r\n    <ClCompile Include=\"ImageUtils.cpp\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"TelegramClient.WebP.h\" />\r\n    <ClInclude Include=\"pch.h\" />\r\n    <ClInclude Include=\"ImageUtils.h\" />\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "TelegramClient.WebP/pch.cpp",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"pch.h\"\r\n"
  },
  {
    "path": "TelegramClient.WebP/pch.h",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n"
  },
  {
    "path": "TelegramClient.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2012\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TelegramClient\", \"TelegramClient\\TelegramClient.csproj\", \"{CE3550C4-15BA-4212-BB5F-A9AF0059D775}\"\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \".nuget\", \".nuget\", \"{99C5C576-3226-40E7-A022-97A16D4403F9}\"\r\n\tProjectSection(SolutionItems) = preProject\r\n\t\t.nuget\\NuGet.Config = .nuget\\NuGet.Config\r\n\t\t.nuget\\NuGet.exe = .nuget\\NuGet.exe\r\n\t\t.nuget\\NuGet.targets = .nuget\\NuGet.targets\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Telegram.Api\", \"Telegram.Api\\Telegram.Api.csproj\", \"{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Telegram.Controls\", \"Telegram.Controls\\Telegram.Controls.csproj\", \"{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}\"\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Solution Items\", \"Solution Items\", \"{23F284E7-C938-4C0A-8D9D-A4169898567C}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TelegramClient.WP8\", \"TelegramClient.WP8\\TelegramClient.WP8.csproj\", \"{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"TelegramClient.Opus\", \"TelegramClient.Opus\\TelegramClient.Opus.vcxproj\", \"{5E327850-E16E-4642-957A-FD52BF8D3D02}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TelegramClient.ScheduledTaskAgent\", \"TelegramClient.ScheduledTaskAgent\\TelegramClient.ScheduledTaskAgent.csproj\", \"{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Telegram.Api.WP8\", \"Telegram.Api.WP8\\Telegram.Api.WP8.csproj\", \"{E79D5093-8038-4A5F-8A98-CA38C0D0886F}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TelegramClient.ScheduledTaskAgent.WP8\", \"TelegramClient.ScheduledTaskAgent.WP8\\TelegramClient.ScheduledTaskAgent.WP8.csproj\", \"{30ADA306-4873-4AF3-99D3-BE57E723013C}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"TelegramClient.WebP\", \"TelegramClient.WebP\\TelegramClient.WebP.vcxproj\", \"{FAE12FD9-EDCA-433E-AD11-F1663A998F35}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"ExifLib\", \"ExifLib\\ExifLib.csproj\", \"{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TelegramClient.Player\", \"TelegramClient.Player\\TelegramClient.Player.csproj\", \"{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SubversionScc) = preSolution\r\n\t\tSvn-Managed = True\r\n\t\tManager = AnkhSVN - Subversion Support for Visual Studio\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug Private Beta|Any CPU = Debug Private Beta|Any CPU\r\n\t\tDebug Private Beta|ARM = Debug Private Beta|ARM\r\n\t\tDebug Private Beta|Mixed Platforms = Debug Private Beta|Mixed Platforms\r\n\t\tDebug Private Beta|Win32 = Debug Private Beta|Win32\r\n\t\tDebug Private Beta|x64 = Debug Private Beta|x64\r\n\t\tDebug Private Beta|x86 = Debug Private Beta|x86\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tDebug|ARM = Debug|ARM\r\n\t\tDebug|Mixed Platforms = Debug|Mixed Platforms\r\n\t\tDebug|Win32 = Debug|Win32\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tDebug|x86 = Debug|x86\r\n\t\tRelease Private Beta|Any CPU = Release Private Beta|Any CPU\r\n\t\tRelease Private Beta|ARM = Release Private Beta|ARM\r\n\t\tRelease Private Beta|Mixed Platforms = Release Private Beta|Mixed Platforms\r\n\t\tRelease Private Beta|Win32 = Release Private Beta|Win32\r\n\t\tRelease Private Beta|x64 = Release Private Beta|x64\r\n\t\tRelease Private Beta|x86 = Release Private Beta|x86\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\t\tRelease|ARM = Release|ARM\r\n\t\tRelease|Mixed Platforms = Release|Mixed Platforms\r\n\t\tRelease|Win32 = Release|Win32\r\n\t\tRelease|x64 = Release|x64\r\n\t\tRelease|x86 = Release|x86\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug Private Beta|Any CPU.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug Private Beta|Any CPU.Build.0 = Debug Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug Private Beta|Any CPU.Deploy.0 = Debug Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug Private Beta|ARM.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug Private Beta|Mixed Platforms.Build.0 = Debug Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug Private Beta|Mixed Platforms.Deploy.0 = Debug Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug Private Beta|Win32.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug Private Beta|x64.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug Private Beta|x86.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|Any CPU.Deploy.0 = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|ARM.ActiveCfg = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|ARM.Build.0 = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|ARM.Deploy.0 = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|Win32.ActiveCfg = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release Private Beta|Any CPU.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release Private Beta|Any CPU.Build.0 = Release Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release Private Beta|Any CPU.Deploy.0 = Release Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release Private Beta|ARM.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release Private Beta|ARM.Build.0 = Release Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release Private Beta|Mixed Platforms.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release Private Beta|Mixed Platforms.Build.0 = Release Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release Private Beta|Mixed Platforms.Deploy.0 = Release Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release Private Beta|Win32.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release Private Beta|x64.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release Private Beta|x86.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release|Any CPU.Deploy.0 = Release|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release|ARM.ActiveCfg = Release|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release|ARM.Build.0 = Release|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release|Mixed Platforms.Build.0 = Release|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release|Mixed Platforms.Deploy.0 = Release|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release|Win32.ActiveCfg = Release|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{CE3550C4-15BA-4212-BB5F-A9AF0059D775}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug Private Beta|Any CPU.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug Private Beta|Any CPU.Build.0 = Debug Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug Private Beta|ARM.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug Private Beta|ARM.Build.0 = Debug Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug Private Beta|Mixed Platforms.Build.0 = Debug Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug Private Beta|Win32.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug Private Beta|x64.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug Private Beta|x86.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug|ARM.ActiveCfg = Debug|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug|ARM.Build.0 = Debug|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug|Win32.ActiveCfg = Debug|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release Private Beta|Any CPU.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release Private Beta|Any CPU.Build.0 = Release Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release Private Beta|ARM.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release Private Beta|ARM.Build.0 = Release Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release Private Beta|Mixed Platforms.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release Private Beta|Mixed Platforms.Build.0 = Release Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release Private Beta|Win32.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release Private Beta|x64.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release Private Beta|x86.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release|ARM.ActiveCfg = Release|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release|ARM.Build.0 = Release|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release|Mixed Platforms.Build.0 = Release|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release|Win32.ActiveCfg = Release|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{0C2F1B61-A8FE-45FB-8538-AA6925A415B6}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug Private Beta|Any CPU.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug Private Beta|Any CPU.Build.0 = Debug Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug Private Beta|ARM.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug Private Beta|ARM.Build.0 = Debug Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug Private Beta|Mixed Platforms.Build.0 = Debug Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug Private Beta|Win32.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug Private Beta|x64.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug Private Beta|x86.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug|ARM.ActiveCfg = Debug|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug|ARM.Build.0 = Debug|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug|Win32.ActiveCfg = Debug|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release Private Beta|Any CPU.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release Private Beta|Any CPU.Build.0 = Release Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release Private Beta|ARM.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release Private Beta|ARM.Build.0 = Release Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release Private Beta|Mixed Platforms.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release Private Beta|Mixed Platforms.Build.0 = Release Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release Private Beta|Win32.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release Private Beta|x64.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release Private Beta|x86.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release|ARM.ActiveCfg = Release|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release|ARM.Build.0 = Release|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release|Mixed Platforms.Build.0 = Release|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release|Win32.ActiveCfg = Release|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{C1E19589-BD32-4DCF-AF58-393AD4D40B4E}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|Any CPU.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|Any CPU.Build.0 = Debug Private Beta|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|Any CPU.Deploy.0 = Debug Private Beta|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|ARM.ActiveCfg = Debug Private Beta|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|ARM.Build.0 = Debug Private Beta|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|ARM.Deploy.0 = Debug Private Beta|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|Mixed Platforms.Build.0 = Debug Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|Mixed Platforms.Deploy.0 = Debug Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|Win32.ActiveCfg = Debug Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|Win32.Build.0 = Debug Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|Win32.Deploy.0 = Debug Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|x64.ActiveCfg = Debug Private Beta|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|x86.ActiveCfg = Debug Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|x86.Build.0 = Debug Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug Private Beta|x86.Deploy.0 = Debug Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|ARM.Deploy.0 = Debug|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|Win32.ActiveCfg = Debug|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|Win32.Build.0 = Debug|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|Win32.Deploy.0 = Debug|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|x86.ActiveCfg = Debug|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|x86.Build.0 = Debug|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Debug|x86.Deploy.0 = Debug|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|Any CPU.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|Any CPU.Build.0 = Release Private Beta|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|Any CPU.Deploy.0 = Release Private Beta|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|ARM.ActiveCfg = Release Private Beta|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|ARM.Build.0 = Release Private Beta|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|ARM.Deploy.0 = Release Private Beta|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|Mixed Platforms.ActiveCfg = Release Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|Mixed Platforms.Build.0 = Release Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|Mixed Platforms.Deploy.0 = Release Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|Win32.ActiveCfg = Release Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|Win32.Build.0 = Release Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|Win32.Deploy.0 = Release Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|x64.ActiveCfg = Release Private Beta|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|x86.ActiveCfg = Release Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|x86.Build.0 = Release Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release Private Beta|x86.Deploy.0 = Release Private Beta|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|Any CPU.Deploy.0 = Release|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|ARM.Deploy.0 = Release|ARM\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|Mixed Platforms.Deploy.0 = Release|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|Win32.ActiveCfg = Release|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|Win32.Build.0 = Release|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|Win32.Deploy.0 = Release|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|x86.ActiveCfg = Release|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|x86.Build.0 = Release|x86\r\n\t\t{DD748D4D-D311-4DD5-878E-AC3B400DCE2E}.Release|x86.Deploy.0 = Release|x86\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{5E327850-E16E-4642-957A-FD52BF8D3D02}.Release|x86.Build.0 = Release|Win32\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug Private Beta|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug Private Beta|ARM.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug Private Beta|Win32.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug Private Beta|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug Private Beta|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug|ARM.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug|Win32.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release Private Beta|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release Private Beta|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release Private Beta|ARM.ActiveCfg = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release Private Beta|Mixed Platforms.Build.0 = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release Private Beta|Win32.ActiveCfg = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release Private Beta|x64.ActiveCfg = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release Private Beta|x86.ActiveCfg = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release|ARM.ActiveCfg = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release|ARM.Build.0 = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release|Mixed Platforms.Build.0 = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release|Win32.ActiveCfg = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{218ABB75-04FB-4E0E-BBB5-69DD36B204B5}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Win32.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|Win32.Build.0 = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|x86.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug Private Beta|x86.Build.0 = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|Win32.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|Win32.Build.0 = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|x86.ActiveCfg = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Debug|x86.Build.0 = Debug|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Win32.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|Win32.Build.0 = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|x64.ActiveCfg = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|x86.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release Private Beta|x86.Build.0 = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Win32.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|Win32.Build.0 = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|x86.ActiveCfg = Release|x86\r\n\t\t{E79D5093-8038-4A5F-8A98-CA38C0D0886F}.Release|x86.Build.0 = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug Private Beta|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug Private Beta|Win32.ActiveCfg = Debug|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug Private Beta|Win32.Build.0 = Debug|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug Private Beta|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug Private Beta|x86.ActiveCfg = Debug|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug Private Beta|x86.Build.0 = Debug|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug|Win32.ActiveCfg = Debug|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug|Win32.Build.0 = Debug|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug|x86.ActiveCfg = Debug|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Debug|x86.Build.0 = Debug|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release Private Beta|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release Private Beta|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release Private Beta|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release Private Beta|Win32.ActiveCfg = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release Private Beta|Win32.Build.0 = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release Private Beta|x64.ActiveCfg = Release|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release Private Beta|x86.ActiveCfg = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release Private Beta|x86.Build.0 = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release|Mixed Platforms.ActiveCfg = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release|Mixed Platforms.Build.0 = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release|Win32.ActiveCfg = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release|Win32.Build.0 = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release|x86.ActiveCfg = Release|x86\r\n\t\t{30ADA306-4873-4AF3-99D3-BE57E723013C}.Release|x86.Build.0 = Release|x86\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|ARM.ActiveCfg = Debug|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|ARM.Build.0 = Debug|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|Win32.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|Win32.Build.0 = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|x64.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|x86.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug Private Beta|x86.Build.0 = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|Any CPU.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|ARM.ActiveCfg = Debug|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|ARM.Build.0 = Debug|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|x64.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|ARM.ActiveCfg = Release|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|ARM.Build.0 = Release|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|Win32.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|Win32.Build.0 = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|x64.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|x86.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release Private Beta|x86.Build.0 = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|Any CPU.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|ARM.ActiveCfg = Release|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|ARM.Build.0 = Release|ARM\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|Mixed Platforms.Build.0 = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|x64.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{FAE12FD9-EDCA-433E-AD11-F1663A998F35}.Release|x86.Build.0 = Release|Win32\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug Private Beta|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug Private Beta|ARM.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug Private Beta|Win32.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug Private Beta|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug Private Beta|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug|ARM.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug|Win32.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release Private Beta|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release Private Beta|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release Private Beta|ARM.ActiveCfg = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release Private Beta|Mixed Platforms.Build.0 = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release Private Beta|Win32.ActiveCfg = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release Private Beta|x64.ActiveCfg = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release Private Beta|x86.ActiveCfg = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release|ARM.ActiveCfg = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release|ARM.Build.0 = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release|Mixed Platforms.Build.0 = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release|Win32.ActiveCfg = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{1E7F202B-8830-42F6-BCDA-2A6C590A7E10}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug Private Beta|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug Private Beta|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug Private Beta|ARM.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug Private Beta|Mixed Platforms.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug Private Beta|Mixed Platforms.Build.0 = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug Private Beta|Win32.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug Private Beta|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug Private Beta|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug|ARM.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug|Win32.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release Private Beta|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release Private Beta|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release Private Beta|ARM.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release Private Beta|Mixed Platforms.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release Private Beta|Mixed Platforms.Build.0 = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release Private Beta|Win32.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release Private Beta|x64.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release Private Beta|x86.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release|ARM.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release|Mixed Platforms.Build.0 = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release|Win32.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{C5F29433-1957-4C9E-A7D6-56E52A89AFA4}.Release|x86.ActiveCfg = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "VoipBackendServerHost/Package.appxmanifest",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">\r\n  <Identity Name=\"86ac7b2d-c9c4-41d0-a6df-5243eec0a454\" Publisher=\"CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A\" Version=\"1.0.0.0\" />\r\n  <mp:PhoneIdentity PhoneProductId=\"86ac7b2d-c9c4-41d0-a6df-5243eec0a454\" PhonePublisherId=\"a652821a-0986-4366-8fe7-f00379d89c9b\" />\r\n  <Properties>\r\n    <DisplayName>VoipBackendServerHost</DisplayName>\r\n    <PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>\r\n    <Logo>Assets\\StoreLogo.png</Logo>\r\n  </Properties>\r\n  <Prerequisites>\r\n    <OSMinVersion>6.3.1</OSMinVersion>\r\n    <OSMaxVersionTested>6.3.1</OSMaxVersionTested>\r\n  </Prerequisites>\r\n  <Resources>\r\n    <Resource Language=\"x-generate\" />\r\n  </Resources>\r\n  <Applications>\r\n    <Application Id=\"App\" Executable=\"$targetnametoken$.exe\" EntryPoint=\"VoipBackendServerHost.App\">\r\n      <m3:VisualElements DisplayName=\"VoipBackendServerHost\" Square150x150Logo=\"Assets\\Logo.png\" Square44x44Logo=\"Assets\\SmallLogo.png\" Description=\"VoipBackendServerHost\" ForegroundText=\"light\" BackgroundColor=\"transparent\">\r\n        <m3:DefaultTile Wide310x150Logo=\"Assets\\WideLogo.png\" Square71x71Logo=\"Assets\\Square71x71Logo.png\">\r\n        </m3:DefaultTile>\r\n        <m3:SplashScreen Image=\"Assets\\SplashScreen.png\" />\r\n      </m3:VisualElements>\r\n    </Application>\r\n  </Applications>\r\n  <Capabilities>\r\n    <Capability Name=\"internetClientServer\" />\r\n    <DeviceCapability Name=\"microphone\" />\r\n  </Capabilities>\r\n</Package>"
  },
  {
    "path": "VoipBackendServerHost/VoipBackendServerHost.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|ARM\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{0a402e0e-cee9-477e-b17a-a4b01bb1448c}</ProjectGuid>\r\n    <RootNamespace>VoipBackendServerHost</RootNamespace>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\r\n    <AppContainerApplication>true</AppContainerApplication>\r\n    <ApplicationType>Windows Phone</ApplicationType>\r\n    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120_wp81</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"ExtensionSettings\">\r\n    <Import Project=\"$(VSINSTALLDIR)\\Common7\\IDE\\Extensions\\Microsoft\\VsGraphics\\ImageContentTask.props\" />\r\n    <Import Project=\"$(VSINSTALLDIR)\\Common7\\IDE\\Extensions\\Microsoft\\VsGraphics\\MeshContentTask.props\" />\r\n    <Import Project=\"$(VSINSTALLDIR)\\Common7\\IDE\\Extensions\\Microsoft\\VsGraphics\\ShaderGraphContentTask.props\" />\r\n  </ImportGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)app.h\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)app.cpp\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)pch.h\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)pch.cpp\">\r\n      <PrecompiledHeader>Create</PrecompiledHeader>\r\n    </ClCompile>\r\n  </ItemGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Link>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(WindowsPhoneSDK_LibraryPath_x86)</AdditionalLibraryDirectories>\r\n      <AdditionalDependencies>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\BackEnd\\PhoneVoIPApp.BackEnd.lib;WindowsPhoneCore.lib;RuntimeObject.lib</AdditionalDependencies>\r\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Link>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(WindowsPhoneSDK_LibraryPath_x86)</AdditionalLibraryDirectories>\r\n      <AdditionalDependencies>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\BackEnd\\PhoneVoIPApp.BackEnd.lib;WindowsPhoneCore.lib;RuntimeObject.lib</AdditionalDependencies>\r\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <Link>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(WindowsPhoneSDK_LibraryPath_arm)</AdditionalLibraryDirectories>\r\n      <AdditionalDependencies>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\BackEnd\\PhoneVoIPApp.BackEnd.lib;WindowsPhoneCore.lib;RuntimeObject.lib</AdditionalDependencies>\r\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <Link>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(WindowsPhoneSDK_LibraryPath_arm)</AdditionalLibraryDirectories>\r\n      <AdditionalDependencies>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\BackEnd\\PhoneVoIPApp.BackEnd.lib;WindowsPhoneCore.lib;RuntimeObject.lib</AdditionalDependencies>\r\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <OutDir>$(SolutionDir)TelegramClient.WP81</OutDir>\r\n    <TargetName>PhoneVoIP.BackEnd.HostServer</TargetName>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <TargetName>PhoneVoIP.BackEnd.HostServer</TargetName>\r\n    <OutDir>$(SolutionDir)TelegramClient.WP81</OutDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <OutDir>$(SolutionDir)TelegramClient.WP81</OutDir>\r\n    <TargetName>PhoneVoIP.BackEnd.HostServer</TargetName>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <TargetName>PhoneVoIP.BackEnd.HostServer</TargetName>\r\n    <OutDir>$(SolutionDir)TelegramClient.WP81</OutDir>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Image Include=\"Assets\\Logo.scale-240.png\" />\r\n    <Image Include=\"Assets\\SmallLogo.scale-240.png\" />\r\n    <Image Include=\"Assets\\SplashScreen.scale-240.png\" />\r\n    <Image Include=\"Assets\\Square71x71Logo.scale-240.png\" />\r\n    <Image Include=\"Assets\\StoreLogo.scale-240.png\" />\r\n    <Image Include=\"Assets\\WideLogo.scale-240.png\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <AppxManifest Include=\"Package.appxmanifest\">\r\n      <SubType>Designer</SubType>\r\n    </AppxManifest>\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n    <Import Project=\"$(VSINSTALLDIR)\\Common7\\IDE\\Extensions\\Microsoft\\VsGraphics\\ImageContentTask.targets\" />\r\n    <Import Project=\"$(VSINSTALLDIR)\\Common7\\IDE\\Extensions\\Microsoft\\VsGraphics\\MeshContentTask.targets\" />\r\n    <Import Project=\"$(VSINSTALLDIR)\\Common7\\IDE\\Extensions\\Microsoft\\VsGraphics\\ShaderGraphContentTask.targets\" />\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "VoipBackendServerHost/VoipBackendServerHost.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup>\r\n    <Filter Include=\"Assets\">\r\n      <UniqueIdentifier>81831a9a-2456-4c0b-b73d-96906923ffa7</UniqueIdentifier>\r\n      <Extensions>bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png</Extensions>\r\n    </Filter>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)app.h\" />\r\n    <ClInclude Include=\"$(MSBuildThisFileDirectory)pch.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)app.cpp\" />\r\n    <ClCompile Include=\"$(MSBuildThisFileDirectory)pch.cpp\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Image Include=\"Assets\\Logo.scale-240.png\">\r\n      <Filter>Assets</Filter>\r\n    </Image>\r\n    <Image Include=\"Assets\\SmallLogo.scale-240.png\">\r\n      <Filter>Assets</Filter>\r\n    </Image>\r\n    <Image Include=\"Assets\\SplashScreen.scale-240.png\">\r\n      <Filter>Assets</Filter>\r\n    </Image>\r\n    <Image Include=\"Assets\\Square71x71Logo.scale-240.png\">\r\n      <Filter>Assets</Filter>\r\n    </Image>\r\n    <Image Include=\"Assets\\StoreLogo.scale-240.png\">\r\n      <Filter>Assets</Filter>\r\n    </Image>\r\n    <Image Include=\"Assets\\WideLogo.scale-240.png\">\r\n      <Filter>Assets</Filter>\r\n    </Image>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <AppxManifest Include=\"Package.appxmanifest\" />\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "VoipBackendServerHost/app.cpp",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"pch.h\"\r\n#include \"App.h\"\r\n\r\n#include <windows.applicationmodel.core.h>\r\n#include <wrl.h>\r\n#include <string>\r\n#include <stdexcept>\r\n\r\nusing namespace ABI::Windows::ApplicationModel::Core;\r\nusing namespace ABI::Windows::Foundation;\r\nusing namespace Microsoft::WRL;\r\nusing namespace Wrappers;\r\n\r\nHRESULT __cdecl MyGetActivationFactory(_In_ HSTRING activatableClassId, _COM_Outptr_ IInspectable **factory);\r\n\r\nclass GetCustomClass : public RuntimeClass<RuntimeClassFlags<RuntimeClassType::WinRtClassicComMix>,\r\n\tIGetActivationFactory,\r\n\tCloakedIid<IAgileObject >>\r\n{\r\npublic:\r\n\tIFACEMETHODIMP GetActivationFactory(_In_ HSTRING activatableClassId, _COM_Outptr_ IInspectable **factory)\r\n\t{\r\n\t\treturn MyGetActivationFactory(activatableClassId, factory);\r\n\t}\r\n\r\nprivate:\r\n\tHMODULE m_hMod;\r\n};\r\n\r\n[Platform::MTAThread]\r\nint main(Platform::Array<Platform::String^>^)\r\n{\r\n\tHRESULT hr = Initialize(RO_INIT_MULTITHREADED);\r\n\tif (FAILED(hr))\r\n\t{\r\n\t\tthrow std::runtime_error(std::string(\"Failed to Initialize(RO_INIT_MULTITHREADED), HRESULT: \").append(std::to_string(hr)));\r\n\t}\r\n\r\n\t// Scoping for smart pointers\r\n\t{\r\n\t\tComPtr<ICoreApplication> spApplicationFactory;\r\n\t\thr = GetActivationFactory(HStringReference(RuntimeClass_Windows_ApplicationModel_Core_CoreApplication).Get(), &spApplicationFactory);\r\n\t\tif (FAILED(hr))\r\n\t\t{\r\n\t\t\tthrow std::runtime_error(std::string(\"Failed to GetActivationFactory(RuntimeClass_Windows_ApplicationModel_Core_CoreApplication), HRESULT: \").append(std::to_string(hr)));\r\n\t\t}\r\n\r\n\t\tComPtr<IGetActivationFactory> spGetActivationFactory = Make<GetCustomClass>();\r\n\t\tspApplicationFactory->RunWithActivationFactories(spGetActivationFactory.Get());\r\n\t}\r\n\r\n\tUninitialize();\r\n}\r\n\r\n"
  },
  {
    "path": "VoipBackendServerHost/app.h",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n\r\n#include \"pch.h\"\r\n\r\nnamespace VoipBackendServerHost\r\n{\r\n\t// Main entry point for our app. Connects the app with the Windows shell and handles application lifecycle events.\r\n\tref class App sealed\r\n\t{\r\n\t\tpublic:\r\n\t\t\tApp();\r\n\t};\r\n}\r\n\r\n"
  },
  {
    "path": "VoipBackendServerHost/pch.cpp",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"pch.h\"\r\n"
  },
  {
    "path": "VoipBackendServerHost/pch.h",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n\r\n#include <wrl.h>\r\n#include <wrl/client.h>\r\n#include <d3d11_2.h>\r\n#include <d2d1_2.h>\r\n#include <d2d1effects_1.h>\r\n#include <dwrite_2.h>\r\n#include <wincodec.h>\r\n#include <DirectXColors.h>\r\n#include <DirectXMath.h>\r\n#include <memory>\r\n#include <agile.h>\r\n#include <concrt.h>\r\n#include <collection.h>\r\n#include <ppltasks.h>"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/avcodec.h",
    "content": "/*\n * copyright (c) 2001 Fabrice Bellard\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_AVCODEC_H\n#define AVCODEC_AVCODEC_H\n\n/**\n * @file\n * @ingroup libavc\n * Libavcodec external API header\n */\n\n#include <errno.h>\n#include \"libavutil/samplefmt.h\"\n#include \"libavutil/attributes.h\"\n#include \"libavutil/avutil.h\"\n#include \"libavutil/buffer.h\"\n#include \"libavutil/cpu.h\"\n#include \"libavutil/channel_layout.h\"\n#include \"libavutil/dict.h\"\n#include \"libavutil/frame.h\"\n#include \"libavutil/log.h\"\n#include \"libavutil/pixfmt.h\"\n#include \"libavutil/rational.h\"\n\n#include \"version.h\"\n\n/**\n * @defgroup libavc Encoding/Decoding Library\n * @{\n *\n * @defgroup lavc_decoding Decoding\n * @{\n * @}\n *\n * @defgroup lavc_encoding Encoding\n * @{\n * @}\n *\n * @defgroup lavc_codec Codecs\n * @{\n * @defgroup lavc_codec_native Native Codecs\n * @{\n * @}\n * @defgroup lavc_codec_wrappers External library wrappers\n * @{\n * @}\n * @defgroup lavc_codec_hwaccel Hardware Accelerators bridge\n * @{\n * @}\n * @}\n * @defgroup lavc_internal Internal\n * @{\n * @}\n * @}\n *\n */\n\n/**\n * @defgroup lavc_core Core functions/structures.\n * @ingroup libavc\n *\n * Basic definitions, functions for querying libavcodec capabilities,\n * allocating core structures, etc.\n * @{\n */\n\n\n/**\n * Identify the syntax and semantics of the bitstream.\n * The principle is roughly:\n * Two decoders with the same ID can decode the same streams.\n * Two encoders with the same ID can encode compatible streams.\n * There may be slight deviations from the principle due to implementation\n * details.\n *\n * If you add a codec ID to this list, add it so that\n * 1. no value of a existing codec ID changes (that would break ABI),\n * 2. it is as close as possible to similar codecs\n *\n * After adding new codec IDs, do not forget to add an entry to the codec\n * descriptor list and bump libavcodec minor version.\n */\nenum AVCodecID {\n    AV_CODEC_ID_NONE,\n\n    /* video codecs */\n    AV_CODEC_ID_MPEG1VIDEO,\n    AV_CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding\n#if FF_API_XVMC\n    AV_CODEC_ID_MPEG2VIDEO_XVMC,\n#endif /* FF_API_XVMC */\n    AV_CODEC_ID_H261,\n    AV_CODEC_ID_H263,\n    AV_CODEC_ID_RV10,\n    AV_CODEC_ID_RV20,\n    AV_CODEC_ID_MJPEG,\n    AV_CODEC_ID_MJPEGB,\n    AV_CODEC_ID_LJPEG,\n    AV_CODEC_ID_SP5X,\n    AV_CODEC_ID_JPEGLS,\n    AV_CODEC_ID_MPEG4,\n    AV_CODEC_ID_RAWVIDEO,\n    AV_CODEC_ID_MSMPEG4V1,\n    AV_CODEC_ID_MSMPEG4V2,\n    AV_CODEC_ID_MSMPEG4V3,\n    AV_CODEC_ID_WMV1,\n    AV_CODEC_ID_WMV2,\n    AV_CODEC_ID_H263P,\n    AV_CODEC_ID_H263I,\n    AV_CODEC_ID_FLV1,\n    AV_CODEC_ID_SVQ1,\n    AV_CODEC_ID_SVQ3,\n    AV_CODEC_ID_DVVIDEO,\n    AV_CODEC_ID_HUFFYUV,\n    AV_CODEC_ID_CYUV,\n    AV_CODEC_ID_H264,\n    AV_CODEC_ID_INDEO3,\n    AV_CODEC_ID_VP3,\n    AV_CODEC_ID_THEORA,\n    AV_CODEC_ID_ASV1,\n    AV_CODEC_ID_ASV2,\n    AV_CODEC_ID_FFV1,\n    AV_CODEC_ID_4XM,\n    AV_CODEC_ID_VCR1,\n    AV_CODEC_ID_CLJR,\n    AV_CODEC_ID_MDEC,\n    AV_CODEC_ID_ROQ,\n    AV_CODEC_ID_INTERPLAY_VIDEO,\n    AV_CODEC_ID_XAN_WC3,\n    AV_CODEC_ID_XAN_WC4,\n    AV_CODEC_ID_RPZA,\n    AV_CODEC_ID_CINEPAK,\n    AV_CODEC_ID_WS_VQA,\n    AV_CODEC_ID_MSRLE,\n    AV_CODEC_ID_MSVIDEO1,\n    AV_CODEC_ID_IDCIN,\n    AV_CODEC_ID_8BPS,\n    AV_CODEC_ID_SMC,\n    AV_CODEC_ID_FLIC,\n    AV_CODEC_ID_TRUEMOTION1,\n    AV_CODEC_ID_VMDVIDEO,\n    AV_CODEC_ID_MSZH,\n    AV_CODEC_ID_ZLIB,\n    AV_CODEC_ID_QTRLE,\n    AV_CODEC_ID_TSCC,\n    AV_CODEC_ID_ULTI,\n    AV_CODEC_ID_QDRAW,\n    AV_CODEC_ID_VIXL,\n    AV_CODEC_ID_QPEG,\n    AV_CODEC_ID_PNG,\n    AV_CODEC_ID_PPM,\n    AV_CODEC_ID_PBM,\n    AV_CODEC_ID_PGM,\n    AV_CODEC_ID_PGMYUV,\n    AV_CODEC_ID_PAM,\n    AV_CODEC_ID_FFVHUFF,\n    AV_CODEC_ID_RV30,\n    AV_CODEC_ID_RV40,\n    AV_CODEC_ID_VC1,\n    AV_CODEC_ID_WMV3,\n    AV_CODEC_ID_LOCO,\n    AV_CODEC_ID_WNV1,\n    AV_CODEC_ID_AASC,\n    AV_CODEC_ID_INDEO2,\n    AV_CODEC_ID_FRAPS,\n    AV_CODEC_ID_TRUEMOTION2,\n    AV_CODEC_ID_BMP,\n    AV_CODEC_ID_CSCD,\n    AV_CODEC_ID_MMVIDEO,\n    AV_CODEC_ID_ZMBV,\n    AV_CODEC_ID_AVS,\n    AV_CODEC_ID_SMACKVIDEO,\n    AV_CODEC_ID_NUV,\n    AV_CODEC_ID_KMVC,\n    AV_CODEC_ID_FLASHSV,\n    AV_CODEC_ID_CAVS,\n    AV_CODEC_ID_JPEG2000,\n    AV_CODEC_ID_VMNC,\n    AV_CODEC_ID_VP5,\n    AV_CODEC_ID_VP6,\n    AV_CODEC_ID_VP6F,\n    AV_CODEC_ID_TARGA,\n    AV_CODEC_ID_DSICINVIDEO,\n    AV_CODEC_ID_TIERTEXSEQVIDEO,\n    AV_CODEC_ID_TIFF,\n    AV_CODEC_ID_GIF,\n    AV_CODEC_ID_DXA,\n    AV_CODEC_ID_DNXHD,\n    AV_CODEC_ID_THP,\n    AV_CODEC_ID_SGI,\n    AV_CODEC_ID_C93,\n    AV_CODEC_ID_BETHSOFTVID,\n    AV_CODEC_ID_PTX,\n    AV_CODEC_ID_TXD,\n    AV_CODEC_ID_VP6A,\n    AV_CODEC_ID_AMV,\n    AV_CODEC_ID_VB,\n    AV_CODEC_ID_PCX,\n    AV_CODEC_ID_SUNRAST,\n    AV_CODEC_ID_INDEO4,\n    AV_CODEC_ID_INDEO5,\n    AV_CODEC_ID_MIMIC,\n    AV_CODEC_ID_RL2,\n    AV_CODEC_ID_ESCAPE124,\n    AV_CODEC_ID_DIRAC,\n    AV_CODEC_ID_BFI,\n    AV_CODEC_ID_CMV,\n    AV_CODEC_ID_MOTIONPIXELS,\n    AV_CODEC_ID_TGV,\n    AV_CODEC_ID_TGQ,\n    AV_CODEC_ID_TQI,\n    AV_CODEC_ID_AURA,\n    AV_CODEC_ID_AURA2,\n    AV_CODEC_ID_V210X,\n    AV_CODEC_ID_TMV,\n    AV_CODEC_ID_V210,\n    AV_CODEC_ID_DPX,\n    AV_CODEC_ID_MAD,\n    AV_CODEC_ID_FRWU,\n    AV_CODEC_ID_FLASHSV2,\n    AV_CODEC_ID_CDGRAPHICS,\n    AV_CODEC_ID_R210,\n    AV_CODEC_ID_ANM,\n    AV_CODEC_ID_BINKVIDEO,\n    AV_CODEC_ID_IFF_ILBM,\n#define AV_CODEC_ID_IFF_BYTERUN1 AV_CODEC_ID_IFF_ILBM\n    AV_CODEC_ID_KGV1,\n    AV_CODEC_ID_YOP,\n    AV_CODEC_ID_VP8,\n    AV_CODEC_ID_PICTOR,\n    AV_CODEC_ID_ANSI,\n    AV_CODEC_ID_A64_MULTI,\n    AV_CODEC_ID_A64_MULTI5,\n    AV_CODEC_ID_R10K,\n    AV_CODEC_ID_MXPEG,\n    AV_CODEC_ID_LAGARITH,\n    AV_CODEC_ID_PRORES,\n    AV_CODEC_ID_JV,\n    AV_CODEC_ID_DFA,\n    AV_CODEC_ID_WMV3IMAGE,\n    AV_CODEC_ID_VC1IMAGE,\n    AV_CODEC_ID_UTVIDEO,\n    AV_CODEC_ID_BMV_VIDEO,\n    AV_CODEC_ID_VBLE,\n    AV_CODEC_ID_DXTORY,\n    AV_CODEC_ID_V410,\n    AV_CODEC_ID_XWD,\n    AV_CODEC_ID_CDXL,\n    AV_CODEC_ID_XBM,\n    AV_CODEC_ID_ZEROCODEC,\n    AV_CODEC_ID_MSS1,\n    AV_CODEC_ID_MSA1,\n    AV_CODEC_ID_TSCC2,\n    AV_CODEC_ID_MTS2,\n    AV_CODEC_ID_CLLC,\n    AV_CODEC_ID_MSS2,\n    AV_CODEC_ID_VP9,\n    AV_CODEC_ID_AIC,\n    AV_CODEC_ID_ESCAPE130,\n    AV_CODEC_ID_G2M,\n    AV_CODEC_ID_WEBP,\n    AV_CODEC_ID_HNM4_VIDEO,\n    AV_CODEC_ID_HEVC,\n#define AV_CODEC_ID_H265 AV_CODEC_ID_HEVC\n    AV_CODEC_ID_FIC,\n    AV_CODEC_ID_ALIAS_PIX,\n    AV_CODEC_ID_BRENDER_PIX,\n    AV_CODEC_ID_PAF_VIDEO,\n    AV_CODEC_ID_EXR,\n    AV_CODEC_ID_VP7,\n    AV_CODEC_ID_SANM,\n    AV_CODEC_ID_SGIRLE,\n    AV_CODEC_ID_MVC1,\n    AV_CODEC_ID_MVC2,\n    AV_CODEC_ID_HQX,\n    AV_CODEC_ID_TDSC,\n    AV_CODEC_ID_HQ_HQA,\n    AV_CODEC_ID_HAP,\n    AV_CODEC_ID_DDS,\n    AV_CODEC_ID_DXV,\n    AV_CODEC_ID_SCREENPRESSO,\n    AV_CODEC_ID_RSCC,\n\n    AV_CODEC_ID_Y41P = 0x8000,\n    AV_CODEC_ID_AVRP,\n    AV_CODEC_ID_012V,\n    AV_CODEC_ID_AVUI,\n    AV_CODEC_ID_AYUV,\n    AV_CODEC_ID_TARGA_Y216,\n    AV_CODEC_ID_V308,\n    AV_CODEC_ID_V408,\n    AV_CODEC_ID_YUV4,\n    AV_CODEC_ID_AVRN,\n    AV_CODEC_ID_CPIA,\n    AV_CODEC_ID_XFACE,\n    AV_CODEC_ID_SNOW,\n    AV_CODEC_ID_SMVJPEG,\n    AV_CODEC_ID_APNG,\n    AV_CODEC_ID_DAALA,\n\n    /* various PCM \"codecs\" */\n    AV_CODEC_ID_FIRST_AUDIO = 0x10000,     ///< A dummy id pointing at the start of audio codecs\n    AV_CODEC_ID_PCM_S16LE = 0x10000,\n    AV_CODEC_ID_PCM_S16BE,\n    AV_CODEC_ID_PCM_U16LE,\n    AV_CODEC_ID_PCM_U16BE,\n    AV_CODEC_ID_PCM_S8,\n    AV_CODEC_ID_PCM_U8,\n    AV_CODEC_ID_PCM_MULAW,\n    AV_CODEC_ID_PCM_ALAW,\n    AV_CODEC_ID_PCM_S32LE,\n    AV_CODEC_ID_PCM_S32BE,\n    AV_CODEC_ID_PCM_U32LE,\n    AV_CODEC_ID_PCM_U32BE,\n    AV_CODEC_ID_PCM_S24LE,\n    AV_CODEC_ID_PCM_S24BE,\n    AV_CODEC_ID_PCM_U24LE,\n    AV_CODEC_ID_PCM_U24BE,\n    AV_CODEC_ID_PCM_S24DAUD,\n    AV_CODEC_ID_PCM_ZORK,\n    AV_CODEC_ID_PCM_S16LE_PLANAR,\n    AV_CODEC_ID_PCM_DVD,\n    AV_CODEC_ID_PCM_F32BE,\n    AV_CODEC_ID_PCM_F32LE,\n    AV_CODEC_ID_PCM_F64BE,\n    AV_CODEC_ID_PCM_F64LE,\n    AV_CODEC_ID_PCM_BLURAY,\n    AV_CODEC_ID_PCM_LXF,\n    AV_CODEC_ID_S302M,\n    AV_CODEC_ID_PCM_S8_PLANAR,\n    AV_CODEC_ID_PCM_S24LE_PLANAR,\n    AV_CODEC_ID_PCM_S32LE_PLANAR,\n    AV_CODEC_ID_PCM_S16BE_PLANAR,\n    /* new PCM \"codecs\" should be added right below this line starting with\n     * an explicit value of for example 0x10800\n     */\n\n    /* various ADPCM codecs */\n    AV_CODEC_ID_ADPCM_IMA_QT = 0x11000,\n    AV_CODEC_ID_ADPCM_IMA_WAV,\n    AV_CODEC_ID_ADPCM_IMA_DK3,\n    AV_CODEC_ID_ADPCM_IMA_DK4,\n    AV_CODEC_ID_ADPCM_IMA_WS,\n    AV_CODEC_ID_ADPCM_IMA_SMJPEG,\n    AV_CODEC_ID_ADPCM_MS,\n    AV_CODEC_ID_ADPCM_4XM,\n    AV_CODEC_ID_ADPCM_XA,\n    AV_CODEC_ID_ADPCM_ADX,\n    AV_CODEC_ID_ADPCM_EA,\n    AV_CODEC_ID_ADPCM_G726,\n    AV_CODEC_ID_ADPCM_CT,\n    AV_CODEC_ID_ADPCM_SWF,\n    AV_CODEC_ID_ADPCM_YAMAHA,\n    AV_CODEC_ID_ADPCM_SBPRO_4,\n    AV_CODEC_ID_ADPCM_SBPRO_3,\n    AV_CODEC_ID_ADPCM_SBPRO_2,\n    AV_CODEC_ID_ADPCM_THP,\n    AV_CODEC_ID_ADPCM_IMA_AMV,\n    AV_CODEC_ID_ADPCM_EA_R1,\n    AV_CODEC_ID_ADPCM_EA_R3,\n    AV_CODEC_ID_ADPCM_EA_R2,\n    AV_CODEC_ID_ADPCM_IMA_EA_SEAD,\n    AV_CODEC_ID_ADPCM_IMA_EA_EACS,\n    AV_CODEC_ID_ADPCM_EA_XAS,\n    AV_CODEC_ID_ADPCM_EA_MAXIS_XA,\n    AV_CODEC_ID_ADPCM_IMA_ISS,\n    AV_CODEC_ID_ADPCM_G722,\n    AV_CODEC_ID_ADPCM_IMA_APC,\n    AV_CODEC_ID_ADPCM_VIMA,\n#if FF_API_VIMA_DECODER\n    AV_CODEC_ID_VIMA = AV_CODEC_ID_ADPCM_VIMA,\n#endif\n\n    AV_CODEC_ID_ADPCM_AFC = 0x11800,\n    AV_CODEC_ID_ADPCM_IMA_OKI,\n    AV_CODEC_ID_ADPCM_DTK,\n    AV_CODEC_ID_ADPCM_IMA_RAD,\n    AV_CODEC_ID_ADPCM_G726LE,\n    AV_CODEC_ID_ADPCM_THP_LE,\n    AV_CODEC_ID_ADPCM_PSX,\n    AV_CODEC_ID_ADPCM_AICA,\n\n    /* AMR */\n    AV_CODEC_ID_AMR_NB = 0x12000,\n    AV_CODEC_ID_AMR_WB,\n\n    /* RealAudio codecs*/\n    AV_CODEC_ID_RA_144 = 0x13000,\n    AV_CODEC_ID_RA_288,\n\n    /* various DPCM codecs */\n    AV_CODEC_ID_ROQ_DPCM = 0x14000,\n    AV_CODEC_ID_INTERPLAY_DPCM,\n    AV_CODEC_ID_XAN_DPCM,\n    AV_CODEC_ID_SOL_DPCM,\n\n    AV_CODEC_ID_SDX2_DPCM = 0x14800,\n\n    /* audio codecs */\n    AV_CODEC_ID_MP2 = 0x15000,\n    AV_CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3\n    AV_CODEC_ID_AAC,\n    AV_CODEC_ID_AC3,\n    AV_CODEC_ID_DTS,\n    AV_CODEC_ID_VORBIS,\n    AV_CODEC_ID_DVAUDIO,\n    AV_CODEC_ID_WMAV1,\n    AV_CODEC_ID_WMAV2,\n    AV_CODEC_ID_MACE3,\n    AV_CODEC_ID_MACE6,\n    AV_CODEC_ID_VMDAUDIO,\n    AV_CODEC_ID_FLAC,\n    AV_CODEC_ID_MP3ADU,\n    AV_CODEC_ID_MP3ON4,\n    AV_CODEC_ID_SHORTEN,\n    AV_CODEC_ID_ALAC,\n    AV_CODEC_ID_WESTWOOD_SND1,\n    AV_CODEC_ID_GSM, ///< as in Berlin toast format\n    AV_CODEC_ID_QDM2,\n    AV_CODEC_ID_COOK,\n    AV_CODEC_ID_TRUESPEECH,\n    AV_CODEC_ID_TTA,\n    AV_CODEC_ID_SMACKAUDIO,\n    AV_CODEC_ID_QCELP,\n    AV_CODEC_ID_WAVPACK,\n    AV_CODEC_ID_DSICINAUDIO,\n    AV_CODEC_ID_IMC,\n    AV_CODEC_ID_MUSEPACK7,\n    AV_CODEC_ID_MLP,\n    AV_CODEC_ID_GSM_MS, /* as found in WAV */\n    AV_CODEC_ID_ATRAC3,\n#if FF_API_VOXWARE\n    AV_CODEC_ID_VOXWARE,\n#endif\n    AV_CODEC_ID_APE,\n    AV_CODEC_ID_NELLYMOSER,\n    AV_CODEC_ID_MUSEPACK8,\n    AV_CODEC_ID_SPEEX,\n    AV_CODEC_ID_WMAVOICE,\n    AV_CODEC_ID_WMAPRO,\n    AV_CODEC_ID_WMALOSSLESS,\n    AV_CODEC_ID_ATRAC3P,\n    AV_CODEC_ID_EAC3,\n    AV_CODEC_ID_SIPR,\n    AV_CODEC_ID_MP1,\n    AV_CODEC_ID_TWINVQ,\n    AV_CODEC_ID_TRUEHD,\n    AV_CODEC_ID_MP4ALS,\n    AV_CODEC_ID_ATRAC1,\n    AV_CODEC_ID_BINKAUDIO_RDFT,\n    AV_CODEC_ID_BINKAUDIO_DCT,\n    AV_CODEC_ID_AAC_LATM,\n    AV_CODEC_ID_QDMC,\n    AV_CODEC_ID_CELT,\n    AV_CODEC_ID_G723_1,\n    AV_CODEC_ID_G729,\n    AV_CODEC_ID_8SVX_EXP,\n    AV_CODEC_ID_8SVX_FIB,\n    AV_CODEC_ID_BMV_AUDIO,\n    AV_CODEC_ID_RALF,\n    AV_CODEC_ID_IAC,\n    AV_CODEC_ID_ILBC,\n    AV_CODEC_ID_OPUS,\n    AV_CODEC_ID_COMFORT_NOISE,\n    AV_CODEC_ID_TAK,\n    AV_CODEC_ID_METASOUND,\n    AV_CODEC_ID_PAF_AUDIO,\n    AV_CODEC_ID_ON2AVC,\n    AV_CODEC_ID_DSS_SP,\n\n    AV_CODEC_ID_FFWAVESYNTH = 0x15800,\n    AV_CODEC_ID_SONIC,\n    AV_CODEC_ID_SONIC_LS,\n    AV_CODEC_ID_EVRC,\n    AV_CODEC_ID_SMV,\n    AV_CODEC_ID_DSD_LSBF,\n    AV_CODEC_ID_DSD_MSBF,\n    AV_CODEC_ID_DSD_LSBF_PLANAR,\n    AV_CODEC_ID_DSD_MSBF_PLANAR,\n    AV_CODEC_ID_4GV,\n    AV_CODEC_ID_INTERPLAY_ACM,\n    AV_CODEC_ID_XMA1,\n    AV_CODEC_ID_XMA2,\n\n    /* subtitle codecs */\n    AV_CODEC_ID_FIRST_SUBTITLE = 0x17000,          ///< A dummy ID pointing at the start of subtitle codecs.\n    AV_CODEC_ID_DVD_SUBTITLE = 0x17000,\n    AV_CODEC_ID_DVB_SUBTITLE,\n    AV_CODEC_ID_TEXT,  ///< raw UTF-8 text\n    AV_CODEC_ID_XSUB,\n    AV_CODEC_ID_SSA,\n    AV_CODEC_ID_MOV_TEXT,\n    AV_CODEC_ID_HDMV_PGS_SUBTITLE,\n    AV_CODEC_ID_DVB_TELETEXT,\n    AV_CODEC_ID_SRT,\n\n    AV_CODEC_ID_MICRODVD   = 0x17800,\n    AV_CODEC_ID_EIA_608,\n    AV_CODEC_ID_JACOSUB,\n    AV_CODEC_ID_SAMI,\n    AV_CODEC_ID_REALTEXT,\n    AV_CODEC_ID_STL,\n    AV_CODEC_ID_SUBVIEWER1,\n    AV_CODEC_ID_SUBVIEWER,\n    AV_CODEC_ID_SUBRIP,\n    AV_CODEC_ID_WEBVTT,\n    AV_CODEC_ID_MPL2,\n    AV_CODEC_ID_VPLAYER,\n    AV_CODEC_ID_PJS,\n    AV_CODEC_ID_ASS,\n    AV_CODEC_ID_HDMV_TEXT_SUBTITLE,\n\n    /* other specific kind of codecs (generally used for attachments) */\n    AV_CODEC_ID_FIRST_UNKNOWN = 0x18000,           ///< A dummy ID pointing at the start of various fake codecs.\n    AV_CODEC_ID_TTF = 0x18000,\n\n    AV_CODEC_ID_BINTEXT    = 0x18800,\n    AV_CODEC_ID_XBIN,\n    AV_CODEC_ID_IDF,\n    AV_CODEC_ID_OTF,\n    AV_CODEC_ID_SMPTE_KLV,\n    AV_CODEC_ID_DVD_NAV,\n    AV_CODEC_ID_TIMED_ID3,\n    AV_CODEC_ID_BIN_DATA,\n\n\n    AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it\n\n    AV_CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS\n                                * stream (only used by libavformat) */\n    AV_CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems\n                                * stream (only used by libavformat) */\n    AV_CODEC_ID_FFMETADATA = 0x21000,   ///< Dummy codec for streams containing only metadata information.\n    AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001, ///< Passthrough codec, AVFrames wrapped in AVPacket\n};\n\n/**\n * This struct describes the properties of a single codec described by an\n * AVCodecID.\n * @see avcodec_descriptor_get()\n */\ntypedef struct AVCodecDescriptor {\n    enum AVCodecID     id;\n    enum AVMediaType type;\n    /**\n     * Name of the codec described by this descriptor. It is non-empty and\n     * unique for each codec descriptor. It should contain alphanumeric\n     * characters and '_' only.\n     */\n    const char      *name;\n    /**\n     * A more descriptive name for this codec. May be NULL.\n     */\n    const char *long_name;\n    /**\n     * Codec properties, a combination of AV_CODEC_PROP_* flags.\n     */\n    int             props;\n\n    /**\n     * MIME type(s) associated with the codec.\n     * May be NULL; if not, a NULL-terminated array of MIME types.\n     * The first item is always non-NULL and is the preferred MIME type.\n     */\n    const char *const *mime_types;\n} AVCodecDescriptor;\n\n/**\n * Codec uses only intra compression.\n * Video codecs only.\n */\n#define AV_CODEC_PROP_INTRA_ONLY    (1 << 0)\n/**\n * Codec supports lossy compression. Audio and video codecs only.\n * @note a codec may support both lossy and lossless\n * compression modes\n */\n#define AV_CODEC_PROP_LOSSY         (1 << 1)\n/**\n * Codec supports lossless compression. Audio and video codecs only.\n */\n#define AV_CODEC_PROP_LOSSLESS      (1 << 2)\n/**\n * Codec supports frame reordering. That is, the coded order (the order in which\n * the encoded packets are output by the encoders / stored / input to the\n * decoders) may be different from the presentation order of the corresponding\n * frames.\n *\n * For codecs that do not have this property set, PTS and DTS should always be\n * equal.\n */\n#define AV_CODEC_PROP_REORDER       (1 << 3)\n/**\n * Subtitle codec is bitmap based\n * Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field.\n */\n#define AV_CODEC_PROP_BITMAP_SUB    (1 << 16)\n/**\n * Subtitle codec is text based.\n * Decoded AVSubtitle data can be read from the AVSubtitleRect->ass field.\n */\n#define AV_CODEC_PROP_TEXT_SUB      (1 << 17)\n\n/**\n * @ingroup lavc_decoding\n * Required number of additionally allocated bytes at the end of the input bitstream for decoding.\n * This is mainly needed because some optimized bitstream readers read\n * 32 or 64 bit at once and could read over the end.<br>\n * Note: If the first 23 bits of the additional bytes are not 0, then damaged\n * MPEG bitstreams could cause overread and segfault.\n */\n#define AV_INPUT_BUFFER_PADDING_SIZE 32\n\n/**\n * @ingroup lavc_encoding\n * minimum encoding buffer size\n * Used to avoid some checks during header writing.\n */\n#define AV_INPUT_BUFFER_MIN_SIZE 16384\n\n#if FF_API_WITHOUT_PREFIX\n/**\n * @deprecated use AV_INPUT_BUFFER_PADDING_SIZE instead\n */\n#define FF_INPUT_BUFFER_PADDING_SIZE 32\n\n/**\n * @deprecated use AV_INPUT_BUFFER_MIN_SIZE instead\n */\n#define FF_MIN_BUFFER_SIZE 16384\n#endif /* FF_API_WITHOUT_PREFIX */\n\n/**\n * @ingroup lavc_encoding\n * motion estimation type.\n * @deprecated use codec private option instead\n */\n#if FF_API_MOTION_EST\nenum Motion_Est_ID {\n    ME_ZERO = 1,    ///< no search, that is use 0,0 vector whenever one is needed\n    ME_FULL,\n    ME_LOG,\n    ME_PHODS,\n    ME_EPZS,        ///< enhanced predictive zonal search\n    ME_X1,          ///< reserved for experiments\n    ME_HEX,         ///< hexagon based search\n    ME_UMH,         ///< uneven multi-hexagon search\n    ME_TESA,        ///< transformed exhaustive search algorithm\n    ME_ITER=50,     ///< iterative search\n};\n#endif\n\n/**\n * @ingroup lavc_decoding\n */\nenum AVDiscard{\n    /* We leave some space between them for extensions (drop some\n     * keyframes for intra-only or drop just some bidir frames). */\n    AVDISCARD_NONE    =-16, ///< discard nothing\n    AVDISCARD_DEFAULT =  0, ///< discard useless packets like 0 size packets in avi\n    AVDISCARD_NONREF  =  8, ///< discard all non reference\n    AVDISCARD_BIDIR   = 16, ///< discard all bidirectional frames\n    AVDISCARD_NONINTRA= 24, ///< discard all non intra frames\n    AVDISCARD_NONKEY  = 32, ///< discard all frames except keyframes\n    AVDISCARD_ALL     = 48, ///< discard all\n};\n\nenum AVAudioServiceType {\n    AV_AUDIO_SERVICE_TYPE_MAIN              = 0,\n    AV_AUDIO_SERVICE_TYPE_EFFECTS           = 1,\n    AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,\n    AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED  = 3,\n    AV_AUDIO_SERVICE_TYPE_DIALOGUE          = 4,\n    AV_AUDIO_SERVICE_TYPE_COMMENTARY        = 5,\n    AV_AUDIO_SERVICE_TYPE_EMERGENCY         = 6,\n    AV_AUDIO_SERVICE_TYPE_VOICE_OVER        = 7,\n    AV_AUDIO_SERVICE_TYPE_KARAOKE           = 8,\n    AV_AUDIO_SERVICE_TYPE_NB                   , ///< Not part of ABI\n};\n\n/**\n * @ingroup lavc_encoding\n */\ntypedef struct RcOverride{\n    int start_frame;\n    int end_frame;\n    int qscale; // If this is 0 then quality_factor will be used instead.\n    float quality_factor;\n} RcOverride;\n\n#if FF_API_MAX_BFRAMES\n/**\n * @deprecated there is no libavcodec-wide limit on the number of B-frames\n */\n#define FF_MAX_B_FRAMES 16\n#endif\n\n/* encoding support\n   These flags can be passed in AVCodecContext.flags before initialization.\n   Note: Not everything is supported yet.\n*/\n\n/**\n * Allow decoders to produce frames with data planes that are not aligned\n * to CPU requirements (e.g. due to cropping).\n */\n#define AV_CODEC_FLAG_UNALIGNED       (1 <<  0)\n/**\n * Use fixed qscale.\n */\n#define AV_CODEC_FLAG_QSCALE          (1 <<  1)\n/**\n * 4 MV per MB allowed / advanced prediction for H.263.\n */\n#define AV_CODEC_FLAG_4MV             (1 <<  2)\n/**\n * Output even those frames that might be corrupted.\n */\n#define AV_CODEC_FLAG_OUTPUT_CORRUPT  (1 <<  3)\n/**\n * Use qpel MC.\n */\n#define AV_CODEC_FLAG_QPEL            (1 <<  4)\n/**\n * Use internal 2pass ratecontrol in first pass mode.\n */\n#define AV_CODEC_FLAG_PASS1           (1 <<  9)\n/**\n * Use internal 2pass ratecontrol in second pass mode.\n */\n#define AV_CODEC_FLAG_PASS2           (1 << 10)\n/**\n * loop filter.\n */\n#define AV_CODEC_FLAG_LOOP_FILTER     (1 << 11)\n/**\n * Only decode/encode grayscale.\n */\n#define AV_CODEC_FLAG_GRAY            (1 << 13)\n/**\n * error[?] variables will be set during encoding.\n */\n#define AV_CODEC_FLAG_PSNR            (1 << 15)\n/**\n * Input bitstream might be truncated at a random location\n * instead of only at frame boundaries.\n */\n#define AV_CODEC_FLAG_TRUNCATED       (1 << 16)\n/**\n * Use interlaced DCT.\n */\n#define AV_CODEC_FLAG_INTERLACED_DCT  (1 << 18)\n/**\n * Force low delay.\n */\n#define AV_CODEC_FLAG_LOW_DELAY       (1 << 19)\n/**\n * Place global headers in extradata instead of every keyframe.\n */\n#define AV_CODEC_FLAG_GLOBAL_HEADER   (1 << 22)\n/**\n * Use only bitexact stuff (except (I)DCT).\n */\n#define AV_CODEC_FLAG_BITEXACT        (1 << 23)\n/* Fx : Flag for h263+ extra options */\n/**\n * H.263 advanced intra coding / MPEG-4 AC prediction\n */\n#define AV_CODEC_FLAG_AC_PRED         (1 << 24)\n/**\n * interlaced motion estimation\n */\n#define AV_CODEC_FLAG_INTERLACED_ME   (1 << 29)\n#define AV_CODEC_FLAG_CLOSED_GOP      (1U << 31)\n\n/**\n * Allow non spec compliant speedup tricks.\n */\n#define AV_CODEC_FLAG2_FAST           (1 <<  0)\n/**\n * Skip bitstream encoding.\n */\n#define AV_CODEC_FLAG2_NO_OUTPUT      (1 <<  2)\n/**\n * Place global headers at every keyframe instead of in extradata.\n */\n#define AV_CODEC_FLAG2_LOCAL_HEADER   (1 <<  3)\n\n/**\n * timecode is in drop frame format. DEPRECATED!!!!\n */\n#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13)\n\n/**\n * Input bitstream might be truncated at a packet boundaries\n * instead of only at frame boundaries.\n */\n#define AV_CODEC_FLAG2_CHUNKS         (1 << 15)\n/**\n * Discard cropping information from SPS.\n */\n#define AV_CODEC_FLAG2_IGNORE_CROP    (1 << 16)\n\n/**\n * Show all frames before the first keyframe\n */\n#define AV_CODEC_FLAG2_SHOW_ALL       (1 << 22)\n/**\n * Export motion vectors through frame side data\n */\n#define AV_CODEC_FLAG2_EXPORT_MVS     (1 << 28)\n/**\n * Do not skip samples and export skip information as frame side data\n */\n#define AV_CODEC_FLAG2_SKIP_MANUAL    (1 << 29)\n\n/* Unsupported options :\n *              Syntax Arithmetic coding (SAC)\n *              Reference Picture Selection\n *              Independent Segment Decoding */\n/* /Fx */\n/* codec capabilities */\n\n/**\n * Decoder can use draw_horiz_band callback.\n */\n#define AV_CODEC_CAP_DRAW_HORIZ_BAND     (1 <<  0)\n/**\n * Codec uses get_buffer() for allocating buffers and supports custom allocators.\n * If not set, it might not use get_buffer() at all or use operations that\n * assume the buffer was allocated by avcodec_default_get_buffer.\n */\n#define AV_CODEC_CAP_DR1                 (1 <<  1)\n#define AV_CODEC_CAP_TRUNCATED           (1 <<  3)\n/**\n * Encoder or decoder requires flushing with NULL input at the end in order to\n * give the complete and correct output.\n *\n * NOTE: If this flag is not set, the codec is guaranteed to never be fed with\n *       with NULL data. The user can still send NULL data to the public encode\n *       or decode function, but libavcodec will not pass it along to the codec\n *       unless this flag is set.\n *\n * Decoders:\n * The decoder has a non-zero delay and needs to be fed with avpkt->data=NULL,\n * avpkt->size=0 at the end to get the delayed data until the decoder no longer\n * returns frames.\n *\n * Encoders:\n * The encoder needs to be fed with NULL data at the end of encoding until the\n * encoder no longer returns data.\n *\n * NOTE: For encoders implementing the AVCodec.encode2() function, setting this\n *       flag also means that the encoder must set the pts and duration for\n *       each output packet. If this flag is not set, the pts and duration will\n *       be determined by libavcodec from the input frame.\n */\n#define AV_CODEC_CAP_DELAY               (1 <<  5)\n/**\n * Codec can be fed a final frame with a smaller size.\n * This can be used to prevent truncation of the last audio samples.\n */\n#define AV_CODEC_CAP_SMALL_LAST_FRAME    (1 <<  6)\n\n#if FF_API_CAP_VDPAU\n/**\n * Codec can export data for HW decoding (VDPAU).\n */\n#define AV_CODEC_CAP_HWACCEL_VDPAU       (1 <<  7)\n#endif\n\n/**\n * Codec can output multiple frames per AVPacket\n * Normally demuxers return one frame at a time, demuxers which do not do\n * are connected to a parser to split what they return into proper frames.\n * This flag is reserved to the very rare category of codecs which have a\n * bitstream that cannot be split into frames without timeconsuming\n * operations like full decoding. Demuxers carring such bitstreams thus\n * may return multiple frames in a packet. This has many disadvantages like\n * prohibiting stream copy in many cases thus it should only be considered\n * as a last resort.\n */\n#define AV_CODEC_CAP_SUBFRAMES           (1 <<  8)\n/**\n * Codec is experimental and is thus avoided in favor of non experimental\n * encoders\n */\n#define AV_CODEC_CAP_EXPERIMENTAL        (1 <<  9)\n/**\n * Codec should fill in channel configuration and samplerate instead of container\n */\n#define AV_CODEC_CAP_CHANNEL_CONF        (1 << 10)\n/**\n * Codec supports frame-level multithreading.\n */\n#define AV_CODEC_CAP_FRAME_THREADS       (1 << 12)\n/**\n * Codec supports slice-based (or partition-based) multithreading.\n */\n#define AV_CODEC_CAP_SLICE_THREADS       (1 << 13)\n/**\n * Codec supports changed parameters at any point.\n */\n#define AV_CODEC_CAP_PARAM_CHANGE        (1 << 14)\n/**\n * Codec supports avctx->thread_count == 0 (auto).\n */\n#define AV_CODEC_CAP_AUTO_THREADS        (1 << 15)\n/**\n * Audio encoder supports receiving a different number of samples in each call.\n */\n#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)\n/**\n * Codec is intra only.\n */\n#define AV_CODEC_CAP_INTRA_ONLY       0x40000000\n/**\n * Codec is lossless.\n */\n#define AV_CODEC_CAP_LOSSLESS         0x80000000\n\n\n#if FF_API_WITHOUT_PREFIX\n/**\n * Allow decoders to produce frames with data planes that are not aligned\n * to CPU requirements (e.g. due to cropping).\n */\n#define CODEC_FLAG_UNALIGNED AV_CODEC_FLAG_UNALIGNED\n#define CODEC_FLAG_QSCALE AV_CODEC_FLAG_QSCALE\n#define CODEC_FLAG_4MV    AV_CODEC_FLAG_4MV\n#define CODEC_FLAG_OUTPUT_CORRUPT AV_CODEC_FLAG_OUTPUT_CORRUPT\n#define CODEC_FLAG_QPEL   AV_CODEC_FLAG_QPEL\n#if FF_API_GMC\n/**\n * @deprecated use the \"gmc\" private option of the libxvid encoder\n */\n#define CODEC_FLAG_GMC    0x0020  ///< Use GMC.\n#endif\n#if FF_API_MV0\n/**\n * @deprecated use the flag \"mv0\" in the \"mpv_flags\" private option of the\n * mpegvideo encoders\n */\n#define CODEC_FLAG_MV0    0x0040\n#endif\n#if FF_API_INPUT_PRESERVED\n/**\n * @deprecated passing reference-counted frames to the encoders replaces this\n * flag\n */\n#define CODEC_FLAG_INPUT_PRESERVED 0x0100\n#endif\n#define CODEC_FLAG_PASS1           AV_CODEC_FLAG_PASS1\n#define CODEC_FLAG_PASS2           AV_CODEC_FLAG_PASS2\n#define CODEC_FLAG_GRAY            AV_CODEC_FLAG_GRAY\n#if FF_API_EMU_EDGE\n/**\n * @deprecated edges are not used/required anymore. I.e. this flag is now always\n * set.\n */\n#define CODEC_FLAG_EMU_EDGE        0x4000\n#endif\n#define CODEC_FLAG_PSNR            AV_CODEC_FLAG_PSNR\n#define CODEC_FLAG_TRUNCATED       AV_CODEC_FLAG_TRUNCATED\n\n#if FF_API_NORMALIZE_AQP\n/**\n * @deprecated use the flag \"naq\" in the \"mpv_flags\" private option of the\n * mpegvideo encoders\n */\n#define CODEC_FLAG_NORMALIZE_AQP  0x00020000\n#endif\n#define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT\n#define CODEC_FLAG_LOW_DELAY      AV_CODEC_FLAG_LOW_DELAY\n#define CODEC_FLAG_GLOBAL_HEADER  AV_CODEC_FLAG_GLOBAL_HEADER\n#define CODEC_FLAG_BITEXACT       AV_CODEC_FLAG_BITEXACT\n#define CODEC_FLAG_AC_PRED        AV_CODEC_FLAG_AC_PRED\n#define CODEC_FLAG_LOOP_FILTER    AV_CODEC_FLAG_LOOP_FILTER\n#define CODEC_FLAG_INTERLACED_ME  AV_CODEC_FLAG_INTERLACED_ME\n#define CODEC_FLAG_CLOSED_GOP     AV_CODEC_FLAG_CLOSED_GOP\n#define CODEC_FLAG2_FAST          AV_CODEC_FLAG2_FAST\n#define CODEC_FLAG2_NO_OUTPUT     AV_CODEC_FLAG2_NO_OUTPUT\n#define CODEC_FLAG2_LOCAL_HEADER  AV_CODEC_FLAG2_LOCAL_HEADER\n#define CODEC_FLAG2_DROP_FRAME_TIMECODE AV_CODEC_FLAG2_DROP_FRAME_TIMECODE\n#define CODEC_FLAG2_IGNORE_CROP   AV_CODEC_FLAG2_IGNORE_CROP\n\n#define CODEC_FLAG2_CHUNKS        AV_CODEC_FLAG2_CHUNKS\n#define CODEC_FLAG2_SHOW_ALL      AV_CODEC_FLAG2_SHOW_ALL\n#define CODEC_FLAG2_EXPORT_MVS    AV_CODEC_FLAG2_EXPORT_MVS\n#define CODEC_FLAG2_SKIP_MANUAL   AV_CODEC_FLAG2_SKIP_MANUAL\n\n/* Unsupported options :\n *              Syntax Arithmetic coding (SAC)\n *              Reference Picture Selection\n *              Independent Segment Decoding */\n/* /Fx */\n/* codec capabilities */\n\n#define CODEC_CAP_DRAW_HORIZ_BAND AV_CODEC_CAP_DRAW_HORIZ_BAND ///< Decoder can use draw_horiz_band callback.\n/**\n * Codec uses get_buffer() for allocating buffers and supports custom allocators.\n * If not set, it might not use get_buffer() at all or use operations that\n * assume the buffer was allocated by avcodec_default_get_buffer.\n */\n#define CODEC_CAP_DR1             AV_CODEC_CAP_DR1\n#define CODEC_CAP_TRUNCATED       AV_CODEC_CAP_TRUNCATED\n#if FF_API_XVMC\n/* Codec can export data for HW decoding. This flag indicates that\n * the codec would call get_format() with list that might contain HW accelerated\n * pixel formats (XvMC, VDPAU, VAAPI, etc). The application can pick any of them\n * including raw image format.\n * The application can use the passed context to determine bitstream version,\n * chroma format, resolution etc.\n */\n#define CODEC_CAP_HWACCEL         0x0010\n#endif /* FF_API_XVMC */\n/**\n * Encoder or decoder requires flushing with NULL input at the end in order to\n * give the complete and correct output.\n *\n * NOTE: If this flag is not set, the codec is guaranteed to never be fed with\n *       with NULL data. The user can still send NULL data to the public encode\n *       or decode function, but libavcodec will not pass it along to the codec\n *       unless this flag is set.\n *\n * Decoders:\n * The decoder has a non-zero delay and needs to be fed with avpkt->data=NULL,\n * avpkt->size=0 at the end to get the delayed data until the decoder no longer\n * returns frames.\n *\n * Encoders:\n * The encoder needs to be fed with NULL data at the end of encoding until the\n * encoder no longer returns data.\n *\n * NOTE: For encoders implementing the AVCodec.encode2() function, setting this\n *       flag also means that the encoder must set the pts and duration for\n *       each output packet. If this flag is not set, the pts and duration will\n *       be determined by libavcodec from the input frame.\n */\n#define CODEC_CAP_DELAY           AV_CODEC_CAP_DELAY\n/**\n * Codec can be fed a final frame with a smaller size.\n * This can be used to prevent truncation of the last audio samples.\n */\n#define CODEC_CAP_SMALL_LAST_FRAME AV_CODEC_CAP_SMALL_LAST_FRAME\n#if FF_API_CAP_VDPAU\n/**\n * Codec can export data for HW decoding (VDPAU).\n */\n#define CODEC_CAP_HWACCEL_VDPAU    AV_CODEC_CAP_HWACCEL_VDPAU\n#endif\n/**\n * Codec can output multiple frames per AVPacket\n * Normally demuxers return one frame at a time, demuxers which do not do\n * are connected to a parser to split what they return into proper frames.\n * This flag is reserved to the very rare category of codecs which have a\n * bitstream that cannot be split into frames without timeconsuming\n * operations like full decoding. Demuxers carring such bitstreams thus\n * may return multiple frames in a packet. This has many disadvantages like\n * prohibiting stream copy in many cases thus it should only be considered\n * as a last resort.\n */\n#define CODEC_CAP_SUBFRAMES        AV_CODEC_CAP_SUBFRAMES\n/**\n * Codec is experimental and is thus avoided in favor of non experimental\n * encoders\n */\n#define CODEC_CAP_EXPERIMENTAL     AV_CODEC_CAP_EXPERIMENTAL\n/**\n * Codec should fill in channel configuration and samplerate instead of container\n */\n#define CODEC_CAP_CHANNEL_CONF     AV_CODEC_CAP_CHANNEL_CONF\n#if FF_API_NEG_LINESIZES\n/**\n * @deprecated no codecs use this capability\n */\n#define CODEC_CAP_NEG_LINESIZES    0x0800\n#endif\n/**\n * Codec supports frame-level multithreading.\n */\n#define CODEC_CAP_FRAME_THREADS    AV_CODEC_CAP_FRAME_THREADS\n/**\n * Codec supports slice-based (or partition-based) multithreading.\n */\n#define CODEC_CAP_SLICE_THREADS    AV_CODEC_CAP_SLICE_THREADS\n/**\n * Codec supports changed parameters at any point.\n */\n#define CODEC_CAP_PARAM_CHANGE     AV_CODEC_CAP_PARAM_CHANGE\n/**\n * Codec supports avctx->thread_count == 0 (auto).\n */\n#define CODEC_CAP_AUTO_THREADS     AV_CODEC_CAP_AUTO_THREADS\n/**\n * Audio encoder supports receiving a different number of samples in each call.\n */\n#define CODEC_CAP_VARIABLE_FRAME_SIZE AV_CODEC_CAP_VARIABLE_FRAME_SIZE\n/**\n * Codec is intra only.\n */\n#define CODEC_CAP_INTRA_ONLY       AV_CODEC_CAP_INTRA_ONLY\n/**\n * Codec is lossless.\n */\n#define CODEC_CAP_LOSSLESS         AV_CODEC_CAP_LOSSLESS\n\n/**\n * HWAccel is experimental and is thus avoided in favor of non experimental\n * codecs\n */\n#define HWACCEL_CODEC_CAP_EXPERIMENTAL     0x0200\n#endif /* FF_API_WITHOUT_PREFIX */\n\n#if FF_API_MB_TYPE\n//The following defines may change, don't expect compatibility if you use them.\n#define MB_TYPE_INTRA4x4   0x0001\n#define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific\n#define MB_TYPE_INTRA_PCM  0x0004 //FIXME H.264-specific\n#define MB_TYPE_16x16      0x0008\n#define MB_TYPE_16x8       0x0010\n#define MB_TYPE_8x16       0x0020\n#define MB_TYPE_8x8        0x0040\n#define MB_TYPE_INTERLACED 0x0080\n#define MB_TYPE_DIRECT2    0x0100 //FIXME\n#define MB_TYPE_ACPRED     0x0200\n#define MB_TYPE_GMC        0x0400\n#define MB_TYPE_SKIP       0x0800\n#define MB_TYPE_P0L0       0x1000\n#define MB_TYPE_P1L0       0x2000\n#define MB_TYPE_P0L1       0x4000\n#define MB_TYPE_P1L1       0x8000\n#define MB_TYPE_L0         (MB_TYPE_P0L0 | MB_TYPE_P1L0)\n#define MB_TYPE_L1         (MB_TYPE_P0L1 | MB_TYPE_P1L1)\n#define MB_TYPE_L0L1       (MB_TYPE_L0   | MB_TYPE_L1)\n#define MB_TYPE_QUANT      0x00010000\n#define MB_TYPE_CBP        0x00020000\n//Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...)\n#endif\n\n/**\n * Pan Scan area.\n * This specifies the area which should be displayed.\n * Note there may be multiple such areas for one frame.\n */\ntypedef struct AVPanScan{\n    /**\n     * id\n     * - encoding: Set by user.\n     * - decoding: Set by libavcodec.\n     */\n    int id;\n\n    /**\n     * width and height in 1/16 pel\n     * - encoding: Set by user.\n     * - decoding: Set by libavcodec.\n     */\n    int width;\n    int height;\n\n    /**\n     * position of the top left corner in 1/16 pel for up to 3 fields/frames\n     * - encoding: Set by user.\n     * - decoding: Set by libavcodec.\n     */\n    int16_t position[3][2];\n}AVPanScan;\n\n/**\n * This structure describes the bitrate properties of an encoded bitstream. It\n * roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD\n * parameters for H.264/HEVC.\n */\ntypedef struct AVCPBProperties {\n    /**\n     * Maximum bitrate of the stream, in bits per second.\n     * Zero if unknown or unspecified.\n     */\n    int max_bitrate;\n    /**\n     * Minimum bitrate of the stream, in bits per second.\n     * Zero if unknown or unspecified.\n     */\n    int min_bitrate;\n    /**\n     * Average bitrate of the stream, in bits per second.\n     * Zero if unknown or unspecified.\n     */\n    int avg_bitrate;\n\n    /**\n     * The size of the buffer to which the ratecontrol is applied, in bits.\n     * Zero if unknown or unspecified.\n     */\n    int buffer_size;\n\n    /**\n     * The delay between the time the packet this structure is associated with\n     * is received and the time when it should be decoded, in periods of a 27MHz\n     * clock.\n     *\n     * UINT64_MAX when unknown or unspecified.\n     */\n    uint64_t vbv_delay;\n} AVCPBProperties;\n\n#if FF_API_QSCALE_TYPE\n#define FF_QSCALE_TYPE_MPEG1 0\n#define FF_QSCALE_TYPE_MPEG2 1\n#define FF_QSCALE_TYPE_H264  2\n#define FF_QSCALE_TYPE_VP56  3\n#endif\n\n/**\n * The decoder will keep a reference to the frame and may reuse it later.\n */\n#define AV_GET_BUFFER_FLAG_REF (1 << 0)\n\n/**\n * @defgroup lavc_packet AVPacket\n *\n * Types and functions for working with AVPacket.\n * @{\n */\nenum AVPacketSideDataType {\n    AV_PKT_DATA_PALETTE,\n    AV_PKT_DATA_NEW_EXTRADATA,\n\n    /**\n     * An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:\n     * @code\n     * u32le param_flags\n     * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT)\n     *     s32le channel_count\n     * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT)\n     *     u64le channel_layout\n     * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE)\n     *     s32le sample_rate\n     * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS)\n     *     s32le width\n     *     s32le height\n     * @endcode\n     */\n    AV_PKT_DATA_PARAM_CHANGE,\n\n    /**\n     * An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of\n     * structures with info about macroblocks relevant to splitting the\n     * packet into smaller packets on macroblock edges (e.g. as for RFC 2190).\n     * That is, it does not necessarily contain info about all macroblocks,\n     * as long as the distance between macroblocks in the info is smaller\n     * than the target payload size.\n     * Each MB info structure is 12 bytes, and is laid out as follows:\n     * @code\n     * u32le bit offset from the start of the packet\n     * u8    current quantizer at the start of the macroblock\n     * u8    GOB number\n     * u16le macroblock address within the GOB\n     * u8    horizontal MV predictor\n     * u8    vertical MV predictor\n     * u8    horizontal MV predictor for block number 3\n     * u8    vertical MV predictor for block number 3\n     * @endcode\n     */\n    AV_PKT_DATA_H263_MB_INFO,\n\n    /**\n     * This side data should be associated with an audio stream and contains\n     * ReplayGain information in form of the AVReplayGain struct.\n     */\n    AV_PKT_DATA_REPLAYGAIN,\n\n    /**\n     * This side data contains a 3x3 transformation matrix describing an affine\n     * transformation that needs to be applied to the decoded video frames for\n     * correct presentation.\n     *\n     * See libavutil/display.h for a detailed description of the data.\n     */\n    AV_PKT_DATA_DISPLAYMATRIX,\n\n    /**\n     * This side data should be associated with a video stream and contains\n     * Stereoscopic 3D information in form of the AVStereo3D struct.\n     */\n    AV_PKT_DATA_STEREO3D,\n\n    /**\n     * This side data should be associated with an audio stream and corresponds\n     * to enum AVAudioServiceType.\n     */\n    AV_PKT_DATA_AUDIO_SERVICE_TYPE,\n\n    /**\n     * This side data contains quality related information from the encoder.\n     * @code\n     * u32le quality factor of the compressed frame. Allowed range is between 1 (good) and FF_LAMBDA_MAX (bad).\n     * u8    picture type\n     * u8    error count\n     * u16   reserved\n     * u64le[error count] sum of squared differences between encoder in and output\n     * @endcode\n     */\n    AV_PKT_DATA_QUALITY_STATS,\n\n    /**\n     * This side data contains an integer value representing the stream index\n     * of a \"fallback\" track.  A fallback track indicates an alternate\n     * track to use when the current track can not be decoded for some reason.\n     * e.g. no decoder available for codec.\n     */\n    AV_PKT_DATA_FALLBACK_TRACK,\n\n    /**\n     * This side data corresponds to the AVCPBProperties struct.\n     */\n    AV_PKT_DATA_CPB_PROPERTIES,\n\n    /**\n     * Recommmends skipping the specified number of samples\n     * @code\n     * u32le number of samples to skip from start of this packet\n     * u32le number of samples to skip from end of this packet\n     * u8    reason for start skip\n     * u8    reason for end   skip (0=padding silence, 1=convergence)\n     * @endcode\n     */\n    AV_PKT_DATA_SKIP_SAMPLES=70,\n\n    /**\n     * An AV_PKT_DATA_JP_DUALMONO side data packet indicates that\n     * the packet may contain \"dual mono\" audio specific to Japanese DTV\n     * and if it is true, recommends only the selected channel to be used.\n     * @code\n     * u8    selected channels (0=mail/left, 1=sub/right, 2=both)\n     * @endcode\n     */\n    AV_PKT_DATA_JP_DUALMONO,\n\n    /**\n     * A list of zero terminated key/value strings. There is no end marker for\n     * the list, so it is required to rely on the side data size to stop.\n     */\n    AV_PKT_DATA_STRINGS_METADATA,\n\n    /**\n     * Subtitle event position\n     * @code\n     * u32le x1\n     * u32le y1\n     * u32le x2\n     * u32le y2\n     * @endcode\n     */\n    AV_PKT_DATA_SUBTITLE_POSITION,\n\n    /**\n     * Data found in BlockAdditional element of matroska container. There is\n     * no end marker for the data, so it is required to rely on the side data\n     * size to recognize the end. 8 byte id (as found in BlockAddId) followed\n     * by data.\n     */\n    AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,\n\n    /**\n     * The optional first identifier line of a WebVTT cue.\n     */\n    AV_PKT_DATA_WEBVTT_IDENTIFIER,\n\n    /**\n     * The optional settings (rendering instructions) that immediately\n     * follow the timestamp specifier of a WebVTT cue.\n     */\n    AV_PKT_DATA_WEBVTT_SETTINGS,\n\n    /**\n     * A list of zero terminated key/value strings. There is no end marker for\n     * the list, so it is required to rely on the side data size to stop. This\n     * side data includes updated metadata which appeared in the stream.\n     */\n    AV_PKT_DATA_METADATA_UPDATE,\n};\n\n#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED\n\ntypedef struct AVPacketSideData {\n    uint8_t *data;\n    int      size;\n    enum AVPacketSideDataType type;\n} AVPacketSideData;\n\n/**\n * This structure stores compressed data. It is typically exported by demuxers\n * and then passed as input to decoders, or received as output from encoders and\n * then passed to muxers.\n *\n * For video, it should typically contain one compressed frame. For audio it may\n * contain several compressed frames. Encoders are allowed to output empty\n * packets, with no compressed data, containing only side data\n * (e.g. to update some stream parameters at the end of encoding).\n *\n * AVPacket is one of the few structs in FFmpeg, whose size is a part of public\n * ABI. Thus it may be allocated on stack and no new fields can be added to it\n * without libavcodec and libavformat major bump.\n *\n * The semantics of data ownership depends on the buf field.\n * If it is set, the packet data is dynamically allocated and is\n * valid indefinitely until a call to av_packet_unref() reduces the\n * reference count to 0.\n *\n * If the buf field is not set av_packet_ref() would make a copy instead\n * of increasing the reference count.\n *\n * The side data is always allocated with av_malloc(), copied by\n * av_packet_ref() and freed by av_packet_unref().\n *\n * @see av_packet_ref\n * @see av_packet_unref\n */\ntypedef struct AVPacket {\n    /**\n     * A reference to the reference-counted buffer where the packet data is\n     * stored.\n     * May be NULL, then the packet data is not reference-counted.\n     */\n    AVBufferRef *buf;\n    /**\n     * Presentation timestamp in AVStream->time_base units; the time at which\n     * the decompressed packet will be presented to the user.\n     * Can be AV_NOPTS_VALUE if it is not stored in the file.\n     * pts MUST be larger or equal to dts as presentation cannot happen before\n     * decompression, unless one wants to view hex dumps. Some formats misuse\n     * the terms dts and pts/cts to mean something different. Such timestamps\n     * must be converted to true pts/dts before they are stored in AVPacket.\n     */\n    int64_t pts;\n    /**\n     * Decompression timestamp in AVStream->time_base units; the time at which\n     * the packet is decompressed.\n     * Can be AV_NOPTS_VALUE if it is not stored in the file.\n     */\n    int64_t dts;\n    uint8_t *data;\n    int   size;\n    int   stream_index;\n    /**\n     * A combination of AV_PKT_FLAG values\n     */\n    int   flags;\n    /**\n     * Additional packet data that can be provided by the container.\n     * Packet can contain several types of side information.\n     */\n    AVPacketSideData *side_data;\n    int side_data_elems;\n\n    /**\n     * Duration of this packet in AVStream->time_base units, 0 if unknown.\n     * Equals next_pts - this_pts in presentation order.\n     */\n    int64_t duration;\n\n    int64_t pos;                            ///< byte position in stream, -1 if unknown\n\n#if FF_API_CONVERGENCE_DURATION\n    /**\n     * @deprecated Same as the duration field, but as int64_t. This was required\n     * for Matroska subtitles, whose duration values could overflow when the\n     * duration field was still an int.\n     */\n    attribute_deprecated\n    int64_t convergence_duration;\n#endif\n} AVPacket;\n#define AV_PKT_FLAG_KEY     0x0001 ///< The packet contains a keyframe\n#define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted\n\nenum AVSideDataParamChangeFlags {\n    AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT  = 0x0001,\n    AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002,\n    AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE    = 0x0004,\n    AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS     = 0x0008,\n};\n/**\n * @}\n */\n\nstruct AVCodecInternal;\n\nenum AVFieldOrder {\n    AV_FIELD_UNKNOWN,\n    AV_FIELD_PROGRESSIVE,\n    AV_FIELD_TT,          //< Top coded_first, top displayed first\n    AV_FIELD_BB,          //< Bottom coded first, bottom displayed first\n    AV_FIELD_TB,          //< Top coded first, bottom displayed first\n    AV_FIELD_BT,          //< Bottom coded first, top displayed first\n};\n\n/**\n * main external API structure.\n * New fields can be added to the end with minor version bumps.\n * Removal, reordering and changes to existing fields require a major\n * version bump.\n * Please use AVOptions (av_opt* / av_set/get*()) to access these fields from user\n * applications.\n * sizeof(AVCodecContext) must not be used outside libav*.\n */\ntypedef struct AVCodecContext {\n    /**\n     * information on struct for av_log\n     * - set by avcodec_alloc_context3\n     */\n    const AVClass *av_class;\n    int log_level_offset;\n\n    enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */\n    const struct AVCodec  *codec;\n#if FF_API_CODEC_NAME\n    /**\n     * @deprecated this field is not used for anything in libavcodec\n     */\n    attribute_deprecated\n    char             codec_name[32];\n#endif\n    enum AVCodecID     codec_id; /* see AV_CODEC_ID_xxx */\n\n    /**\n     * fourcc (LSB first, so \"ABCD\" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').\n     * This is used to work around some encoder bugs.\n     * A demuxer should set this to what is stored in the field used to identify the codec.\n     * If there are multiple such fields in a container then the demuxer should choose the one\n     * which maximizes the information about the used codec.\n     * If the codec tag field in a container is larger than 32 bits then the demuxer should\n     * remap the longer ID to 32 bits with a table or other structure. Alternatively a new\n     * extra_codec_tag + size could be added but for this a clear advantage must be demonstrated\n     * first.\n     * - encoding: Set by user, if not then the default based on codec_id will be used.\n     * - decoding: Set by user, will be converted to uppercase by libavcodec during init.\n     */\n    unsigned int codec_tag;\n\n#if FF_API_STREAM_CODEC_TAG\n    /**\n     * @deprecated this field is unused\n     */\n    attribute_deprecated\n    unsigned int stream_codec_tag;\n#endif\n\n    void *priv_data;\n\n    /**\n     * Private context used for internal data.\n     *\n     * Unlike priv_data, this is not codec-specific. It is used in general\n     * libavcodec functions.\n     */\n    struct AVCodecInternal *internal;\n\n    /**\n     * Private data of the user, can be used to carry app specific stuff.\n     * - encoding: Set by user.\n     * - decoding: Set by user.\n     */\n    void *opaque;\n\n    /**\n     * the average bitrate\n     * - encoding: Set by user; unused for constant quantizer encoding.\n     * - decoding: Set by user, may be overwritten by libavcodec\n     *             if this info is available in the stream\n     */\n    int64_t bit_rate;\n\n    /**\n     * number of bits the bitstream is allowed to diverge from the reference.\n     *           the reference can be CBR (for CBR pass1) or VBR (for pass2)\n     * - encoding: Set by user; unused for constant quantizer encoding.\n     * - decoding: unused\n     */\n    int bit_rate_tolerance;\n\n    /**\n     * Global quality for codecs which cannot change it per frame.\n     * This should be proportional to MPEG-1/2/4 qscale.\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int global_quality;\n\n    /**\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int compression_level;\n#define FF_COMPRESSION_DEFAULT -1\n\n    /**\n     * AV_CODEC_FLAG_*.\n     * - encoding: Set by user.\n     * - decoding: Set by user.\n     */\n    int flags;\n\n    /**\n     * AV_CODEC_FLAG2_*\n     * - encoding: Set by user.\n     * - decoding: Set by user.\n     */\n    int flags2;\n\n    /**\n     * some codecs need / can use extradata like Huffman tables.\n     * mjpeg: Huffman tables\n     * rv10: additional flags\n     * mpeg4: global headers (they can be in the bitstream or here)\n     * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger\n     * than extradata_size to avoid problems if it is read with the bitstream reader.\n     * The bytewise contents of extradata must not depend on the architecture or CPU endianness.\n     * - encoding: Set/allocated/freed by libavcodec.\n     * - decoding: Set/allocated/freed by user.\n     */\n    uint8_t *extradata;\n    int extradata_size;\n\n    /**\n     * This is the fundamental unit of time (in seconds) in terms\n     * of which frame timestamps are represented. For fixed-fps content,\n     * timebase should be 1/framerate and timestamp increments should be\n     * identically 1.\n     * This often, but not always is the inverse of the frame rate or field rate\n     * for video.\n     * - encoding: MUST be set by user.\n     * - decoding: the use of this field for decoding is deprecated.\n     *             Use framerate instead.\n     */\n    AVRational time_base;\n\n    /**\n     * For some codecs, the time base is closer to the field rate than the frame rate.\n     * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration\n     * if no telecine is used ...\n     *\n     * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.\n     */\n    int ticks_per_frame;\n\n    /**\n     * Codec delay.\n     *\n     * Encoding: Number of frames delay there will be from the encoder input to\n     *           the decoder output. (we assume the decoder matches the spec)\n     * Decoding: Number of frames delay in addition to what a standard decoder\n     *           as specified in the spec would produce.\n     *\n     * Video:\n     *   Number of frames the decoded output will be delayed relative to the\n     *   encoded input.\n     *\n     * Audio:\n     *   For encoding, this field is unused (see initial_padding).\n     *\n     *   For decoding, this is the number of samples the decoder needs to\n     *   output before the decoder's output is valid. When seeking, you should\n     *   start decoding this many samples prior to your desired seek point.\n     *\n     * - encoding: Set by libavcodec.\n     * - decoding: Set by libavcodec.\n     */\n    int delay;\n\n\n    /* video only */\n    /**\n     * picture width / height.\n     *\n     * @note Those fields may not match the values of the last\n     * AVFrame outputted by avcodec_decode_video2 due frame\n     * reordering.\n     *\n     * - encoding: MUST be set by user.\n     * - decoding: May be set by the user before opening the decoder if known e.g.\n     *             from the container. Some decoders will require the dimensions\n     *             to be set by the caller. During decoding, the decoder may\n     *             overwrite those values as required while parsing the data.\n     */\n    int width, height;\n\n    /**\n     * Bitstream width / height, may be different from width/height e.g. when\n     * the decoded frame is cropped before being output or lowres is enabled.\n     *\n     * @note Those field may not match the value of the last\n     * AVFrame outputted by avcodec_decode_video2 due frame\n     * reordering.\n     *\n     * - encoding: unused\n     * - decoding: May be set by the user before opening the decoder if known\n     *             e.g. from the container. During decoding, the decoder may\n     *             overwrite those values as required while parsing the data.\n     */\n    int coded_width, coded_height;\n\n#if FF_API_ASPECT_EXTENDED\n#define FF_ASPECT_EXTENDED 15\n#endif\n\n    /**\n     * the number of pictures in a group of pictures, or 0 for intra_only\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int gop_size;\n\n    /**\n     * Pixel format, see AV_PIX_FMT_xxx.\n     * May be set by the demuxer if known from headers.\n     * May be overridden by the decoder if it knows better.\n     *\n     * @note This field may not match the value of the last\n     * AVFrame outputted by avcodec_decode_video2 due frame\n     * reordering.\n     *\n     * - encoding: Set by user.\n     * - decoding: Set by user if known, overridden by libavcodec while\n     *             parsing the data.\n     */\n    enum AVPixelFormat pix_fmt;\n\n#if FF_API_MOTION_EST\n    /**\n     * This option does nothing\n     * @deprecated use codec private options instead\n     */\n    attribute_deprecated int me_method;\n#endif\n\n    /**\n     * If non NULL, 'draw_horiz_band' is called by the libavcodec\n     * decoder to draw a horizontal band. It improves cache usage. Not\n     * all codecs can do that. You must check the codec capabilities\n     * beforehand.\n     * When multithreading is used, it may be called from multiple threads\n     * at the same time; threads might draw different parts of the same AVFrame,\n     * or multiple AVFrames, and there is no guarantee that slices will be drawn\n     * in order.\n     * The function is also used by hardware acceleration APIs.\n     * It is called at least once during frame decoding to pass\n     * the data needed for hardware render.\n     * In that mode instead of pixel data, AVFrame points to\n     * a structure specific to the acceleration API. The application\n     * reads the structure and can change some fields to indicate progress\n     * or mark state.\n     * - encoding: unused\n     * - decoding: Set by user.\n     * @param height the height of the slice\n     * @param y the y position of the slice\n     * @param type 1->top field, 2->bottom field, 3->frame\n     * @param offset offset into the AVFrame.data from which the slice should be read\n     */\n    void (*draw_horiz_band)(struct AVCodecContext *s,\n                            const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],\n                            int y, int type, int height);\n\n    /**\n     * callback to negotiate the pixelFormat\n     * @param fmt is the list of formats which are supported by the codec,\n     * it is terminated by -1 as 0 is a valid format, the formats are ordered by quality.\n     * The first is always the native one.\n     * @note The callback may be called again immediately if initialization for\n     * the selected (hardware-accelerated) pixel format failed.\n     * @warning Behavior is undefined if the callback returns a value not\n     * in the fmt list of formats.\n     * @return the chosen format\n     * - encoding: unused\n     * - decoding: Set by user, if not set the native format will be chosen.\n     */\n    enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);\n\n    /**\n     * maximum number of B-frames between non-B-frames\n     * Note: The output will be delayed by max_b_frames+1 relative to the input.\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int max_b_frames;\n\n    /**\n     * qscale factor between IP and B-frames\n     * If > 0 then the last P-frame quantizer will be used (q= lastp_q*factor+offset).\n     * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    float b_quant_factor;\n\n#if FF_API_RC_STRATEGY\n    /** @deprecated use codec private option instead */\n    attribute_deprecated int rc_strategy;\n#define FF_RC_STRATEGY_XVID 1\n#endif\n\n    int b_frame_strategy;\n\n    /**\n     * qscale offset between IP and B-frames\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    float b_quant_offset;\n\n    /**\n     * Size of the frame reordering buffer in the decoder.\n     * For MPEG-2 it is 1 IPB or 0 low delay IP.\n     * - encoding: Set by libavcodec.\n     * - decoding: Set by libavcodec.\n     */\n    int has_b_frames;\n\n    /**\n     * 0-> h263 quant 1-> mpeg quant\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int mpeg_quant;\n\n    /**\n     * qscale factor between P and I-frames\n     * If > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset).\n     * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    float i_quant_factor;\n\n    /**\n     * qscale offset between P and I-frames\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    float i_quant_offset;\n\n    /**\n     * luminance masking (0-> disabled)\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    float lumi_masking;\n\n    /**\n     * temporary complexity masking (0-> disabled)\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    float temporal_cplx_masking;\n\n    /**\n     * spatial complexity masking (0-> disabled)\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    float spatial_cplx_masking;\n\n    /**\n     * p block masking (0-> disabled)\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    float p_masking;\n\n    /**\n     * darkness masking (0-> disabled)\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    float dark_masking;\n\n    /**\n     * slice count\n     * - encoding: Set by libavcodec.\n     * - decoding: Set by user (or 0).\n     */\n    int slice_count;\n    /**\n     * prediction method (needed for huffyuv)\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n     int prediction_method;\n#define FF_PRED_LEFT   0\n#define FF_PRED_PLANE  1\n#define FF_PRED_MEDIAN 2\n\n    /**\n     * slice offsets in the frame in bytes\n     * - encoding: Set/allocated by libavcodec.\n     * - decoding: Set/allocated by user (or NULL).\n     */\n    int *slice_offset;\n\n    /**\n     * sample aspect ratio (0 if unknown)\n     * That is the width of a pixel divided by the height of the pixel.\n     * Numerator and denominator must be relatively prime and smaller than 256 for some video standards.\n     * - encoding: Set by user.\n     * - decoding: Set by libavcodec.\n     */\n    AVRational sample_aspect_ratio;\n\n    /**\n     * motion estimation comparison function\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int me_cmp;\n    /**\n     * subpixel motion estimation comparison function\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int me_sub_cmp;\n    /**\n     * macroblock comparison function (not supported yet)\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int mb_cmp;\n    /**\n     * interlaced DCT comparison function\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int ildct_cmp;\n#define FF_CMP_SAD    0\n#define FF_CMP_SSE    1\n#define FF_CMP_SATD   2\n#define FF_CMP_DCT    3\n#define FF_CMP_PSNR   4\n#define FF_CMP_BIT    5\n#define FF_CMP_RD     6\n#define FF_CMP_ZERO   7\n#define FF_CMP_VSAD   8\n#define FF_CMP_VSSE   9\n#define FF_CMP_NSSE   10\n#define FF_CMP_W53    11\n#define FF_CMP_W97    12\n#define FF_CMP_DCTMAX 13\n#define FF_CMP_DCT264 14\n#define FF_CMP_CHROMA 256\n\n    /**\n     * ME diamond size & shape\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int dia_size;\n\n    /**\n     * amount of previous MV predictors (2a+1 x 2a+1 square)\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int last_predictor_count;\n\n    /**\n     * prepass for motion estimation\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int pre_me;\n\n    /**\n     * motion estimation prepass comparison function\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int me_pre_cmp;\n\n    /**\n     * ME prepass diamond size & shape\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int pre_dia_size;\n\n    /**\n     * subpel ME quality\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int me_subpel_quality;\n\n#if FF_API_AFD\n    /**\n     * DTG active format information (additional aspect ratio\n     * information only used in DVB MPEG-2 transport streams)\n     * 0 if not set.\n     *\n     * - encoding: unused\n     * - decoding: Set by decoder.\n     * @deprecated Deprecated in favor of AVSideData\n     */\n    attribute_deprecated int dtg_active_format;\n#define FF_DTG_AFD_SAME         8\n#define FF_DTG_AFD_4_3          9\n#define FF_DTG_AFD_16_9         10\n#define FF_DTG_AFD_14_9         11\n#define FF_DTG_AFD_4_3_SP_14_9  13\n#define FF_DTG_AFD_16_9_SP_14_9 14\n#define FF_DTG_AFD_SP_4_3       15\n#endif /* FF_API_AFD */\n\n    /**\n     * maximum motion estimation search range in subpel units\n     * If 0 then no limit.\n     *\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int me_range;\n\n#if FF_API_QUANT_BIAS\n    /**\n     * @deprecated use encoder private option instead\n     */\n    attribute_deprecated int intra_quant_bias;\n#define FF_DEFAULT_QUANT_BIAS 999999\n\n    /**\n     * @deprecated use encoder private option instead\n     */\n    attribute_deprecated int inter_quant_bias;\n#endif\n\n    /**\n     * slice flags\n     * - encoding: unused\n     * - decoding: Set by user.\n     */\n    int slice_flags;\n#define SLICE_FLAG_CODED_ORDER    0x0001 ///< draw_horiz_band() is called in coded order instead of display\n#define SLICE_FLAG_ALLOW_FIELD    0x0002 ///< allow draw_horiz_band() with field slices (MPEG2 field pics)\n#define SLICE_FLAG_ALLOW_PLANE    0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1)\n\n#if FF_API_XVMC\n    /**\n     * XVideo Motion Acceleration\n     * - encoding: forbidden\n     * - decoding: set by decoder\n     * @deprecated XvMC doesn't need it anymore.\n     */\n    attribute_deprecated int xvmc_acceleration;\n#endif /* FF_API_XVMC */\n\n    /**\n     * macroblock decision mode\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int mb_decision;\n#define FF_MB_DECISION_SIMPLE 0        ///< uses mb_cmp\n#define FF_MB_DECISION_BITS   1        ///< chooses the one which needs the fewest bits\n#define FF_MB_DECISION_RD     2        ///< rate distortion\n\n    /**\n     * custom intra quantization matrix\n     * - encoding: Set by user, can be NULL.\n     * - decoding: Set by libavcodec.\n     */\n    uint16_t *intra_matrix;\n\n    /**\n     * custom inter quantization matrix\n     * - encoding: Set by user, can be NULL.\n     * - decoding: Set by libavcodec.\n     */\n    uint16_t *inter_matrix;\n\n    /**\n     * scene change detection threshold\n     * 0 is default, larger means fewer detected scene changes.\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int scenechange_threshold;\n\n    /**\n     * noise reduction strength\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int noise_reduction;\n\n#if FF_API_MPV_OPT\n    /**\n     * @deprecated this field is unused\n     */\n    attribute_deprecated\n    int me_threshold;\n\n    /**\n     * @deprecated this field is unused\n     */\n    attribute_deprecated\n    int mb_threshold;\n#endif\n\n    /**\n     * precision of the intra DC coefficient - 8\n     * - encoding: Set by user.\n     * - decoding: Set by libavcodec\n     */\n    int intra_dc_precision;\n\n    /**\n     * Number of macroblock rows at the top which are skipped.\n     * - encoding: unused\n     * - decoding: Set by user.\n     */\n    int skip_top;\n\n    /**\n     * Number of macroblock rows at the bottom which are skipped.\n     * - encoding: unused\n     * - decoding: Set by user.\n     */\n    int skip_bottom;\n\n#if FF_API_MPV_OPT\n    /**\n     * @deprecated use encoder private options instead\n     */\n    attribute_deprecated\n    float border_masking;\n#endif\n\n    /**\n     * minimum MB lagrange multipler\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int mb_lmin;\n\n    /**\n     * maximum MB lagrange multipler\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int mb_lmax;\n\n    /**\n     *\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int me_penalty_compensation;\n\n    /**\n     *\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int bidir_refine;\n\n    /**\n     *\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int brd_scale;\n\n    /**\n     * minimum GOP size\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int keyint_min;\n\n    /**\n     * number of reference frames\n     * - encoding: Set by user.\n     * - decoding: Set by lavc.\n     */\n    int refs;\n\n    /**\n     * chroma qp offset from luma\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int chromaoffset;\n\n#if FF_API_UNUSED_MEMBERS\n    /**\n     * Multiplied by qscale for each frame and added to scene_change_score.\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    attribute_deprecated int scenechange_factor;\n#endif\n\n    /**\n     *\n     * Note: Value depends upon the compare function used for fullpel ME.\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int mv0_threshold;\n\n    /**\n     * Adjust sensitivity of b_frame_strategy 1.\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int b_sensitivity;\n\n    /**\n     * Chromaticity coordinates of the source primaries.\n     * - encoding: Set by user\n     * - decoding: Set by libavcodec\n     */\n    enum AVColorPrimaries color_primaries;\n\n    /**\n     * Color Transfer Characteristic.\n     * - encoding: Set by user\n     * - decoding: Set by libavcodec\n     */\n    enum AVColorTransferCharacteristic color_trc;\n\n    /**\n     * YUV colorspace type.\n     * - encoding: Set by user\n     * - decoding: Set by libavcodec\n     */\n    enum AVColorSpace colorspace;\n\n    /**\n     * MPEG vs JPEG YUV range.\n     * - encoding: Set by user\n     * - decoding: Set by libavcodec\n     */\n    enum AVColorRange color_range;\n\n    /**\n     * This defines the location of chroma samples.\n     * - encoding: Set by user\n     * - decoding: Set by libavcodec\n     */\n    enum AVChromaLocation chroma_sample_location;\n\n    /**\n     * Number of slices.\n     * Indicates number of picture subdivisions. Used for parallelized\n     * decoding.\n     * - encoding: Set by user\n     * - decoding: unused\n     */\n    int slices;\n\n    /** Field order\n     * - encoding: set by libavcodec\n     * - decoding: Set by user.\n     */\n    enum AVFieldOrder field_order;\n\n    /* audio only */\n    int sample_rate; ///< samples per second\n    int channels;    ///< number of audio channels\n\n    /**\n     * audio sample format\n     * - encoding: Set by user.\n     * - decoding: Set by libavcodec.\n     */\n    enum AVSampleFormat sample_fmt;  ///< sample format\n\n    /* The following data should not be initialized. */\n    /**\n     * Number of samples per channel in an audio frame.\n     *\n     * - encoding: set by libavcodec in avcodec_open2(). Each submitted frame\n     *   except the last must contain exactly frame_size samples per channel.\n     *   May be 0 when the codec has AV_CODEC_CAP_VARIABLE_FRAME_SIZE set, then the\n     *   frame size is not restricted.\n     * - decoding: may be set by some decoders to indicate constant frame size\n     */\n    int frame_size;\n\n    /**\n     * Frame counter, set by libavcodec.\n     *\n     * - decoding: total number of frames returned from the decoder so far.\n     * - encoding: total number of frames passed to the encoder so far.\n     *\n     *   @note the counter is not incremented if encoding/decoding resulted in\n     *   an error.\n     */\n    int frame_number;\n\n    /**\n     * number of bytes per packet if constant and known or 0\n     * Used by some WAV based audio codecs.\n     */\n    int block_align;\n\n    /**\n     * Audio cutoff bandwidth (0 means \"automatic\")\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int cutoff;\n\n    /**\n     * Audio channel layout.\n     * - encoding: set by user.\n     * - decoding: set by user, may be overwritten by libavcodec.\n     */\n    uint64_t channel_layout;\n\n    /**\n     * Request decoder to use this channel layout if it can (0 for default)\n     * - encoding: unused\n     * - decoding: Set by user.\n     */\n    uint64_t request_channel_layout;\n\n    /**\n     * Type of service that the audio stream conveys.\n     * - encoding: Set by user.\n     * - decoding: Set by libavcodec.\n     */\n    enum AVAudioServiceType audio_service_type;\n\n    /**\n     * desired sample format\n     * - encoding: Not used.\n     * - decoding: Set by user.\n     * Decoder will decode to this format if it can.\n     */\n    enum AVSampleFormat request_sample_fmt;\n\n    /**\n     * This callback is called at the beginning of each frame to get data\n     * buffer(s) for it. There may be one contiguous buffer for all the data or\n     * there may be a buffer per each data plane or anything in between. What\n     * this means is, you may set however many entries in buf[] you feel necessary.\n     * Each buffer must be reference-counted using the AVBuffer API (see description\n     * of buf[] below).\n     *\n     * The following fields will be set in the frame before this callback is\n     * called:\n     * - format\n     * - width, height (video only)\n     * - sample_rate, channel_layout, nb_samples (audio only)\n     * Their values may differ from the corresponding values in\n     * AVCodecContext. This callback must use the frame values, not the codec\n     * context values, to calculate the required buffer size.\n     *\n     * This callback must fill the following fields in the frame:\n     * - data[]\n     * - linesize[]\n     * - extended_data:\n     *   * if the data is planar audio with more than 8 channels, then this\n     *     callback must allocate and fill extended_data to contain all pointers\n     *     to all data planes. data[] must hold as many pointers as it can.\n     *     extended_data must be allocated with av_malloc() and will be freed in\n     *     av_frame_unref().\n     *   * otherwise exended_data must point to data\n     * - buf[] must contain one or more pointers to AVBufferRef structures. Each of\n     *   the frame's data and extended_data pointers must be contained in these. That\n     *   is, one AVBufferRef for each allocated chunk of memory, not necessarily one\n     *   AVBufferRef per data[] entry. See: av_buffer_create(), av_buffer_alloc(),\n     *   and av_buffer_ref().\n     * - extended_buf and nb_extended_buf must be allocated with av_malloc() by\n     *   this callback and filled with the extra buffers if there are more\n     *   buffers than buf[] can hold. extended_buf will be freed in\n     *   av_frame_unref().\n     *\n     * If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call\n     * avcodec_default_get_buffer2() instead of providing buffers allocated by\n     * some other means.\n     *\n     * Each data plane must be aligned to the maximum required by the target\n     * CPU.\n     *\n     * @see avcodec_default_get_buffer2()\n     *\n     * Video:\n     *\n     * If AV_GET_BUFFER_FLAG_REF is set in flags then the frame may be reused\n     * (read and/or written to if it is writable) later by libavcodec.\n     *\n     * avcodec_align_dimensions2() should be used to find the required width and\n     * height, as they normally need to be rounded up to the next multiple of 16.\n     *\n     * Some decoders do not support linesizes changing between frames.\n     *\n     * If frame multithreading is used and thread_safe_callbacks is set,\n     * this callback may be called from a different thread, but not from more\n     * than one at once. Does not need to be reentrant.\n     *\n     * @see avcodec_align_dimensions2()\n     *\n     * Audio:\n     *\n     * Decoders request a buffer of a particular size by setting\n     * AVFrame.nb_samples prior to calling get_buffer2(). The decoder may,\n     * however, utilize only part of the buffer by setting AVFrame.nb_samples\n     * to a smaller value in the output frame.\n     *\n     * As a convenience, av_samples_get_buffer_size() and\n     * av_samples_fill_arrays() in libavutil may be used by custom get_buffer2()\n     * functions to find the required data size and to fill data pointers and\n     * linesize. In AVFrame.linesize, only linesize[0] may be set for audio\n     * since all planes must be the same size.\n     *\n     * @see av_samples_get_buffer_size(), av_samples_fill_arrays()\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec, user can override.\n     */\n    int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);\n\n    /**\n     * If non-zero, the decoded audio and video frames returned from\n     * avcodec_decode_video2() and avcodec_decode_audio4() are reference-counted\n     * and are valid indefinitely. The caller must free them with\n     * av_frame_unref() when they are not needed anymore.\n     * Otherwise, the decoded frames must not be freed by the caller and are\n     * only valid until the next decode call.\n     *\n     * - encoding: unused\n     * - decoding: set by the caller before avcodec_open2().\n     */\n    int refcounted_frames;\n\n    /* - encoding parameters */\n    float qcompress;  ///< amount of qscale change between easy & hard scenes (0.0-1.0)\n    float qblur;      ///< amount of qscale smoothing over time (0.0-1.0)\n\n    /**\n     * minimum quantizer\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int qmin;\n\n    /**\n     * maximum quantizer\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int qmax;\n\n    /**\n     * maximum quantizer difference between frames\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int max_qdiff;\n\n#if FF_API_MPV_OPT\n    /**\n     * @deprecated use encoder private options instead\n     */\n    attribute_deprecated\n    float rc_qsquish;\n\n    attribute_deprecated\n    float rc_qmod_amp;\n    attribute_deprecated\n    int rc_qmod_freq;\n#endif\n\n    /**\n     * decoder bitstream buffer size\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int rc_buffer_size;\n\n    /**\n     * ratecontrol override, see RcOverride\n     * - encoding: Allocated/set/freed by user.\n     * - decoding: unused\n     */\n    int rc_override_count;\n    RcOverride *rc_override;\n\n#if FF_API_MPV_OPT\n    /**\n     * @deprecated use encoder private options instead\n     */\n    attribute_deprecated\n    const char *rc_eq;\n#endif\n\n    /**\n     * maximum bitrate\n     * - encoding: Set by user.\n     * - decoding: Set by user, may be overwritten by libavcodec.\n     */\n    int64_t rc_max_rate;\n\n    /**\n     * minimum bitrate\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int64_t rc_min_rate;\n\n#if FF_API_MPV_OPT\n    /**\n     * @deprecated use encoder private options instead\n     */\n    attribute_deprecated\n    float rc_buffer_aggressivity;\n\n    attribute_deprecated\n    float rc_initial_cplx;\n#endif\n\n    /**\n     * Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow.\n     * - encoding: Set by user.\n     * - decoding: unused.\n     */\n    float rc_max_available_vbv_use;\n\n    /**\n     * Ratecontrol attempt to use, at least, <value> times the amount needed to prevent a vbv overflow.\n     * - encoding: Set by user.\n     * - decoding: unused.\n     */\n    float rc_min_vbv_overflow_use;\n\n    /**\n     * Number of bits which should be loaded into the rc buffer before decoding starts.\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int rc_initial_buffer_occupancy;\n\n#if FF_API_CODER_TYPE\n#define FF_CODER_TYPE_VLC       0\n#define FF_CODER_TYPE_AC        1\n#define FF_CODER_TYPE_RAW       2\n#define FF_CODER_TYPE_RLE       3\n#if FF_API_UNUSED_MEMBERS\n#define FF_CODER_TYPE_DEFLATE   4\n#endif /* FF_API_UNUSED_MEMBERS */\n    /**\n     * @deprecated use encoder private options instead\n     */\n    attribute_deprecated\n    int coder_type;\n#endif /* FF_API_CODER_TYPE */\n\n    /**\n     * context model\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int context_model;\n\n#if FF_API_MPV_OPT\n    /**\n     * @deprecated use encoder private options instead\n     */\n    attribute_deprecated\n    int lmin;\n\n    /**\n     * @deprecated use encoder private options instead\n     */\n    attribute_deprecated\n    int lmax;\n#endif\n\n    /**\n     * frame skip threshold\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int frame_skip_threshold;\n\n    /**\n     * frame skip factor\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int frame_skip_factor;\n\n    /**\n     * frame skip exponent\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int frame_skip_exp;\n\n    /**\n     * frame skip comparison function\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int frame_skip_cmp;\n\n    /**\n     * trellis RD quantization\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int trellis;\n\n    /**\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int min_prediction_order;\n\n    /**\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int max_prediction_order;\n\n    /**\n     * GOP timecode frame start number\n     * - encoding: Set by user, in non drop frame format\n     * - decoding: Set by libavcodec (timecode in the 25 bits format, -1 if unset)\n     */\n    int64_t timecode_frame_start;\n\n#if FF_API_RTP_CALLBACK\n    /**\n     * @deprecated unused\n     */\n    /* The RTP callback: This function is called    */\n    /* every time the encoder has a packet to send. */\n    /* It depends on the encoder if the data starts */\n    /* with a Start Code (it should). H.263 does.   */\n    /* mb_nb contains the number of macroblocks     */\n    /* encoded in the RTP payload.                  */\n    attribute_deprecated\n    void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);\n#endif\n\n    int rtp_payload_size;   /* The size of the RTP payload: the coder will  */\n                            /* do its best to deliver a chunk with size     */\n                            /* below rtp_payload_size, the chunk will start */\n                            /* with a start code on some codecs like H.263. */\n                            /* This doesn't take account of any particular  */\n                            /* headers inside the transmitted RTP payload.  */\n\n#if FF_API_STAT_BITS\n    /* statistics, used for 2-pass encoding */\n    attribute_deprecated\n    int mv_bits;\n    attribute_deprecated\n    int header_bits;\n    attribute_deprecated\n    int i_tex_bits;\n    attribute_deprecated\n    int p_tex_bits;\n    attribute_deprecated\n    int i_count;\n    attribute_deprecated\n    int p_count;\n    attribute_deprecated\n    int skip_count;\n    attribute_deprecated\n    int misc_bits;\n\n    /** @deprecated this field is unused */\n    attribute_deprecated\n    int frame_bits;\n#endif\n\n    /**\n     * pass1 encoding statistics output buffer\n     * - encoding: Set by libavcodec.\n     * - decoding: unused\n     */\n    char *stats_out;\n\n    /**\n     * pass2 encoding statistics input buffer\n     * Concatenated stuff from stats_out of pass1 should be placed here.\n     * - encoding: Allocated/set/freed by user.\n     * - decoding: unused\n     */\n    char *stats_in;\n\n    /**\n     * Work around bugs in encoders which sometimes cannot be detected automatically.\n     * - encoding: Set by user\n     * - decoding: Set by user\n     */\n    int workaround_bugs;\n#define FF_BUG_AUTODETECT       1  ///< autodetection\n#if FF_API_OLD_MSMPEG4\n#define FF_BUG_OLD_MSMPEG4      2\n#endif\n#define FF_BUG_XVID_ILACE       4\n#define FF_BUG_UMP4             8\n#define FF_BUG_NO_PADDING       16\n#define FF_BUG_AMV              32\n#if FF_API_AC_VLC\n#define FF_BUG_AC_VLC           0  ///< Will be removed, libavcodec can now handle these non-compliant files by default.\n#endif\n#define FF_BUG_QPEL_CHROMA      64\n#define FF_BUG_STD_QPEL         128\n#define FF_BUG_QPEL_CHROMA2     256\n#define FF_BUG_DIRECT_BLOCKSIZE 512\n#define FF_BUG_EDGE             1024\n#define FF_BUG_HPEL_CHROMA      2048\n#define FF_BUG_DC_CLIP          4096\n#define FF_BUG_MS               8192 ///< Work around various bugs in Microsoft's broken decoders.\n#define FF_BUG_TRUNCATED       16384\n\n    /**\n     * strictly follow the standard (MPEG4, ...).\n     * - encoding: Set by user.\n     * - decoding: Set by user.\n     * Setting this to STRICT or higher means the encoder and decoder will\n     * generally do stupid things, whereas setting it to unofficial or lower\n     * will mean the encoder might produce output that is not supported by all\n     * spec-compliant decoders. Decoders don't differentiate between normal,\n     * unofficial and experimental (that is, they always try to decode things\n     * when they can) unless they are explicitly asked to behave stupidly\n     * (=strictly conform to the specs)\n     */\n    int strict_std_compliance;\n#define FF_COMPLIANCE_VERY_STRICT   2 ///< Strictly conform to an older more strict version of the spec or reference software.\n#define FF_COMPLIANCE_STRICT        1 ///< Strictly conform to all the things in the spec no matter what consequences.\n#define FF_COMPLIANCE_NORMAL        0\n#define FF_COMPLIANCE_UNOFFICIAL   -1 ///< Allow unofficial extensions\n#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.\n\n    /**\n     * error concealment flags\n     * - encoding: unused\n     * - decoding: Set by user.\n     */\n    int error_concealment;\n#define FF_EC_GUESS_MVS   1\n#define FF_EC_DEBLOCK     2\n#define FF_EC_FAVOR_INTER 256\n\n    /**\n     * debug\n     * - encoding: Set by user.\n     * - decoding: Set by user.\n     */\n    int debug;\n#define FF_DEBUG_PICT_INFO   1\n#define FF_DEBUG_RC          2\n#define FF_DEBUG_BITSTREAM   4\n#define FF_DEBUG_MB_TYPE     8\n#define FF_DEBUG_QP          16\n#if FF_API_DEBUG_MV\n/**\n * @deprecated this option does nothing\n */\n#define FF_DEBUG_MV          32\n#endif\n#define FF_DEBUG_DCT_COEFF   0x00000040\n#define FF_DEBUG_SKIP        0x00000080\n#define FF_DEBUG_STARTCODE   0x00000100\n#if FF_API_UNUSED_MEMBERS\n#define FF_DEBUG_PTS         0x00000200\n#endif /* FF_API_UNUSED_MEMBERS */\n#define FF_DEBUG_ER          0x00000400\n#define FF_DEBUG_MMCO        0x00000800\n#define FF_DEBUG_BUGS        0x00001000\n#if FF_API_DEBUG_MV\n#define FF_DEBUG_VIS_QP      0x00002000 ///< only access through AVOptions from outside libavcodec\n#define FF_DEBUG_VIS_MB_TYPE 0x00004000 ///< only access through AVOptions from outside libavcodec\n#endif\n#define FF_DEBUG_BUFFERS     0x00008000\n#define FF_DEBUG_THREADS     0x00010000\n#define FF_DEBUG_GREEN_MD    0x00800000\n#define FF_DEBUG_NOMC        0x01000000\n\n#if FF_API_DEBUG_MV\n    /**\n     * debug\n     * Code outside libavcodec should access this field using AVOptions\n     * - encoding: Set by user.\n     * - decoding: Set by user.\n     */\n    int debug_mv;\n#define FF_DEBUG_VIS_MV_P_FOR  0x00000001 //visualize forward predicted MVs of P frames\n#define FF_DEBUG_VIS_MV_B_FOR  0x00000002 //visualize forward predicted MVs of B frames\n#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames\n#endif\n\n    /**\n     * Error recognition; may misdetect some more or less valid parts as errors.\n     * - encoding: unused\n     * - decoding: Set by user.\n     */\n    int err_recognition;\n\n/**\n * Verify checksums embedded in the bitstream (could be of either encoded or\n * decoded data, depending on the codec) and print an error message on mismatch.\n * If AV_EF_EXPLODE is also set, a mismatching checksum will result in the\n * decoder returning an error.\n */\n#define AV_EF_CRCCHECK  (1<<0)\n#define AV_EF_BITSTREAM (1<<1)          ///< detect bitstream specification deviations\n#define AV_EF_BUFFER    (1<<2)          ///< detect improper bitstream length\n#define AV_EF_EXPLODE   (1<<3)          ///< abort decoding on minor error detection\n\n#define AV_EF_IGNORE_ERR (1<<15)        ///< ignore errors and continue\n#define AV_EF_CAREFUL    (1<<16)        ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors\n#define AV_EF_COMPLIANT  (1<<17)        ///< consider all spec non compliances as errors\n#define AV_EF_AGGRESSIVE (1<<18)        ///< consider things that a sane encoder should not do as an error\n\n\n    /**\n     * opaque 64bit number (generally a PTS) that will be reordered and\n     * output in AVFrame.reordered_opaque\n     * - encoding: unused\n     * - decoding: Set by user.\n     */\n    int64_t reordered_opaque;\n\n    /**\n     * Hardware accelerator in use\n     * - encoding: unused.\n     * - decoding: Set by libavcodec\n     */\n    struct AVHWAccel *hwaccel;\n\n    /**\n     * Hardware accelerator context.\n     * For some hardware accelerators, a global context needs to be\n     * provided by the user. In that case, this holds display-dependent\n     * data FFmpeg cannot instantiate itself. Please refer to the\n     * FFmpeg HW accelerator documentation to know how to fill this\n     * is. e.g. for VA API, this is a struct vaapi_context.\n     * - encoding: unused\n     * - decoding: Set by user\n     */\n    void *hwaccel_context;\n\n    /**\n     * error\n     * - encoding: Set by libavcodec if flags & AV_CODEC_FLAG_PSNR.\n     * - decoding: unused\n     */\n    uint64_t error[AV_NUM_DATA_POINTERS];\n\n    /**\n     * DCT algorithm, see FF_DCT_* below\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n    int dct_algo;\n#define FF_DCT_AUTO    0\n#define FF_DCT_FASTINT 1\n#define FF_DCT_INT     2\n#define FF_DCT_MMX     3\n#define FF_DCT_ALTIVEC 5\n#define FF_DCT_FAAN    6\n\n    /**\n     * IDCT algorithm, see FF_IDCT_* below.\n     * - encoding: Set by user.\n     * - decoding: Set by user.\n     */\n    int idct_algo;\n#define FF_IDCT_AUTO          0\n#define FF_IDCT_INT           1\n#define FF_IDCT_SIMPLE        2\n#define FF_IDCT_SIMPLEMMX     3\n#define FF_IDCT_ARM           7\n#define FF_IDCT_ALTIVEC       8\n#if FF_API_ARCH_SH4\n#define FF_IDCT_SH4           9\n#endif\n#define FF_IDCT_SIMPLEARM     10\n#if FF_API_UNUSED_MEMBERS\n#define FF_IDCT_IPP           13\n#endif /* FF_API_UNUSED_MEMBERS */\n#define FF_IDCT_XVID          14\n#if FF_API_IDCT_XVIDMMX\n#define FF_IDCT_XVIDMMX       14\n#endif /* FF_API_IDCT_XVIDMMX */\n#define FF_IDCT_SIMPLEARMV5TE 16\n#define FF_IDCT_SIMPLEARMV6   17\n#if FF_API_ARCH_SPARC\n#define FF_IDCT_SIMPLEVIS     18\n#endif\n#define FF_IDCT_FAAN          20\n#define FF_IDCT_SIMPLENEON    22\n#if FF_API_ARCH_ALPHA\n#define FF_IDCT_SIMPLEALPHA   23\n#endif\n#define FF_IDCT_SIMPLEAUTO    128\n\n    /**\n     * bits per sample/pixel from the demuxer (needed for huffyuv).\n     * - encoding: Set by libavcodec.\n     * - decoding: Set by user.\n     */\n     int bits_per_coded_sample;\n\n    /**\n     * Bits per sample/pixel of internal libavcodec pixel/sample format.\n     * - encoding: set by user.\n     * - decoding: set by libavcodec.\n     */\n    int bits_per_raw_sample;\n\n#if FF_API_LOWRES\n    /**\n     * low resolution decoding, 1-> 1/2 size, 2->1/4 size\n     * - encoding: unused\n     * - decoding: Set by user.\n     * Code outside libavcodec should access this field using:\n     * av_codec_{get,set}_lowres(avctx)\n     */\n     int lowres;\n#endif\n\n#if FF_API_CODED_FRAME\n    /**\n     * the picture in the bitstream\n     * - encoding: Set by libavcodec.\n     * - decoding: unused\n     *\n     * @deprecated use the quality factor packet side data instead\n     */\n    attribute_deprecated AVFrame *coded_frame;\n#endif\n\n    /**\n     * thread count\n     * is used to decide how many independent tasks should be passed to execute()\n     * - encoding: Set by user.\n     * - decoding: Set by user.\n     */\n    int thread_count;\n\n    /**\n     * Which multithreading methods to use.\n     * Use of FF_THREAD_FRAME will increase decoding delay by one frame per thread,\n     * so clients which cannot provide future frames should not use it.\n     *\n     * - encoding: Set by user, otherwise the default is used.\n     * - decoding: Set by user, otherwise the default is used.\n     */\n    int thread_type;\n#define FF_THREAD_FRAME   1 ///< Decode more than one frame at once\n#define FF_THREAD_SLICE   2 ///< Decode more than one part of a single frame at once\n\n    /**\n     * Which multithreading methods are in use by the codec.\n     * - encoding: Set by libavcodec.\n     * - decoding: Set by libavcodec.\n     */\n    int active_thread_type;\n\n    /**\n     * Set by the client if its custom get_buffer() callback can be called\n     * synchronously from another thread, which allows faster multithreaded decoding.\n     * draw_horiz_band() will be called from other threads regardless of this setting.\n     * Ignored if the default get_buffer() is used.\n     * - encoding: Set by user.\n     * - decoding: Set by user.\n     */\n    int thread_safe_callbacks;\n\n    /**\n     * The codec may call this to execute several independent things.\n     * It will return only after finishing all tasks.\n     * The user may replace this with some multithreaded implementation,\n     * the default implementation will execute the parts serially.\n     * @param count the number of things to execute\n     * - encoding: Set by libavcodec, user can override.\n     * - decoding: Set by libavcodec, user can override.\n     */\n    int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);\n\n    /**\n     * The codec may call this to execute several independent things.\n     * It will return only after finishing all tasks.\n     * The user may replace this with some multithreaded implementation,\n     * the default implementation will execute the parts serially.\n     * Also see avcodec_thread_init and e.g. the --enable-pthread configure option.\n     * @param c context passed also to func\n     * @param count the number of things to execute\n     * @param arg2 argument passed unchanged to func\n     * @param ret return values of executed functions, must have space for \"count\" values. May be NULL.\n     * @param func function that will be called count times, with jobnr from 0 to count-1.\n     *             threadnr will be in the range 0 to c->thread_count-1 < MAX_THREADS and so that no\n     *             two instances of func executing at the same time will have the same threadnr.\n     * @return always 0 currently, but code should handle a future improvement where when any call to func\n     *         returns < 0 no further calls to func may be done and < 0 is returned.\n     * - encoding: Set by libavcodec, user can override.\n     * - decoding: Set by libavcodec, user can override.\n     */\n    int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);\n\n    /**\n     * noise vs. sse weight for the nsse comparison function\n     * - encoding: Set by user.\n     * - decoding: unused\n     */\n     int nsse_weight;\n\n    /**\n     * profile\n     * - encoding: Set by user.\n     * - decoding: Set by libavcodec.\n     */\n     int profile;\n#define FF_PROFILE_UNKNOWN -99\n#define FF_PROFILE_RESERVED -100\n\n#define FF_PROFILE_AAC_MAIN 0\n#define FF_PROFILE_AAC_LOW  1\n#define FF_PROFILE_AAC_SSR  2\n#define FF_PROFILE_AAC_LTP  3\n#define FF_PROFILE_AAC_HE   4\n#define FF_PROFILE_AAC_HE_V2 28\n#define FF_PROFILE_AAC_LD   22\n#define FF_PROFILE_AAC_ELD  38\n#define FF_PROFILE_MPEG2_AAC_LOW 128\n#define FF_PROFILE_MPEG2_AAC_HE  131\n\n#define FF_PROFILE_DTS         20\n#define FF_PROFILE_DTS_ES      30\n#define FF_PROFILE_DTS_96_24   40\n#define FF_PROFILE_DTS_HD_HRA  50\n#define FF_PROFILE_DTS_HD_MA   60\n#define FF_PROFILE_DTS_EXPRESS 70\n\n#define FF_PROFILE_MPEG2_422    0\n#define FF_PROFILE_MPEG2_HIGH   1\n#define FF_PROFILE_MPEG2_SS     2\n#define FF_PROFILE_MPEG2_SNR_SCALABLE  3\n#define FF_PROFILE_MPEG2_MAIN   4\n#define FF_PROFILE_MPEG2_SIMPLE 5\n\n#define FF_PROFILE_H264_CONSTRAINED  (1<<9)  // 8+1; constraint_set1_flag\n#define FF_PROFILE_H264_INTRA        (1<<11) // 8+3; constraint_set3_flag\n\n#define FF_PROFILE_H264_BASELINE             66\n#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)\n#define FF_PROFILE_H264_MAIN                 77\n#define FF_PROFILE_H264_EXTENDED             88\n#define FF_PROFILE_H264_HIGH                 100\n#define FF_PROFILE_H264_HIGH_10              110\n#define FF_PROFILE_H264_HIGH_10_INTRA        (110|FF_PROFILE_H264_INTRA)\n#define FF_PROFILE_H264_HIGH_422             122\n#define FF_PROFILE_H264_HIGH_422_INTRA       (122|FF_PROFILE_H264_INTRA)\n#define FF_PROFILE_H264_HIGH_444             144\n#define FF_PROFILE_H264_HIGH_444_PREDICTIVE  244\n#define FF_PROFILE_H264_HIGH_444_INTRA       (244|FF_PROFILE_H264_INTRA)\n#define FF_PROFILE_H264_CAVLC_444            44\n\n#define FF_PROFILE_VC1_SIMPLE   0\n#define FF_PROFILE_VC1_MAIN     1\n#define FF_PROFILE_VC1_COMPLEX  2\n#define FF_PROFILE_VC1_ADVANCED 3\n\n#define FF_PROFILE_MPEG4_SIMPLE                     0\n#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE            1\n#define FF_PROFILE_MPEG4_CORE                       2\n#define FF_PROFILE_MPEG4_MAIN                       3\n#define FF_PROFILE_MPEG4_N_BIT                      4\n#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE           5\n#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION      6\n#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE     7\n#define FF_PROFILE_MPEG4_HYBRID                     8\n#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME         9\n#define FF_PROFILE_MPEG4_CORE_SCALABLE             10\n#define FF_PROFILE_MPEG4_ADVANCED_CODING           11\n#define FF_PROFILE_MPEG4_ADVANCED_CORE             12\n#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13\n#define FF_PROFILE_MPEG4_SIMPLE_STUDIO             14\n#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE           15\n\n#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0   0\n#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1   1\n#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION  2\n#define FF_PROFILE_JPEG2000_DCINEMA_2K              3\n#define FF_PROFILE_JPEG2000_DCINEMA_4K              4\n\n#define FF_PROFILE_VP9_0                            0\n#define FF_PROFILE_VP9_1                            1\n#define FF_PROFILE_VP9_2                            2\n#define FF_PROFILE_VP9_3                            3\n\n#define FF_PROFILE_HEVC_MAIN                        1\n#define FF_PROFILE_HEVC_MAIN_10                     2\n#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE          3\n#define FF_PROFILE_HEVC_REXT                        4\n\n    /**\n     * level\n     * - encoding: Set by user.\n     * - decoding: Set by libavcodec.\n     */\n     int level;\n#define FF_LEVEL_UNKNOWN -99\n\n    /**\n     * Skip loop filtering for selected frames.\n     * - encoding: unused\n     * - decoding: Set by user.\n     */\n    enum AVDiscard skip_loop_filter;\n\n    /**\n     * Skip IDCT/dequantization for selected frames.\n     * - encoding: unused\n     * - decoding: Set by user.\n     */\n    enum AVDiscard skip_idct;\n\n    /**\n     * Skip decoding for selected frames.\n     * - encoding: unused\n     * - decoding: Set by user.\n     */\n    enum AVDiscard skip_frame;\n\n    /**\n     * Header containing style information for text subtitles.\n     * For SUBTITLE_ASS subtitle type, it should contain the whole ASS\n     * [Script Info] and [V4+ Styles] section, plus the [Events] line and\n     * the Format line following. It shouldn't include any Dialogue line.\n     * - encoding: Set/allocated/freed by user (before avcodec_open2())\n     * - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())\n     */\n    uint8_t *subtitle_header;\n    int subtitle_header_size;\n\n#if FF_API_ERROR_RATE\n    /**\n     * @deprecated use the 'error_rate' private AVOption of the mpegvideo\n     * encoders\n     */\n    attribute_deprecated\n    int error_rate;\n#endif\n\n#if FF_API_VBV_DELAY\n    /**\n     * VBV delay coded in the last frame (in periods of a 27 MHz clock).\n     * Used for compliant TS muxing.\n     * - encoding: Set by libavcodec.\n     * - decoding: unused.\n     * @deprecated this value is now exported as a part of\n     * AV_PKT_DATA_CPB_PROPERTIES packet side data\n     */\n    attribute_deprecated\n    uint64_t vbv_delay;\n#endif\n\n#if FF_API_SIDEDATA_ONLY_PKT\n    /**\n     * Encoding only and set by default. Allow encoders to output packets\n     * that do not contain any encoded data, only side data.\n     *\n     * Some encoders need to output such packets, e.g. to update some stream\n     * parameters at the end of encoding.\n     *\n     * @deprecated this field disables the default behaviour and\n     *             it is kept only for compatibility.\n     */\n    attribute_deprecated\n    int side_data_only_packets;\n#endif\n\n    /**\n     * Audio only. The number of \"priming\" samples (padding) inserted by the\n     * encoder at the beginning of the audio. I.e. this number of leading\n     * decoded samples must be discarded by the caller to get the original audio\n     * without leading padding.\n     *\n     * - decoding: unused\n     * - encoding: Set by libavcodec. The timestamps on the output packets are\n     *             adjusted by the encoder so that they always refer to the\n     *             first sample of the data actually contained in the packet,\n     *             including any added padding.  E.g. if the timebase is\n     *             1/samplerate and the timestamp of the first input sample is\n     *             0, the timestamp of the first output packet will be\n     *             -initial_padding.\n     */\n    int initial_padding;\n\n    /**\n     * - decoding: For codecs that store a framerate value in the compressed\n     *             bitstream, the decoder may export it here. { 0, 1} when\n     *             unknown.\n     * - encoding: unused\n     */\n    AVRational framerate;\n\n    /**\n     * Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.\n     * - encoding: unused.\n     * - decoding: Set by libavcodec before calling get_format()\n     */\n    enum AVPixelFormat sw_pix_fmt;\n\n    /**\n     * Timebase in which pkt_dts/pts and AVPacket.dts/pts are.\n     * Code outside libavcodec should access this field using:\n     * av_codec_{get,set}_pkt_timebase(avctx)\n     * - encoding unused.\n     * - decoding set by user.\n     */\n    AVRational pkt_timebase;\n\n    /**\n     * AVCodecDescriptor\n     * Code outside libavcodec should access this field using:\n     * av_codec_{get,set}_codec_descriptor(avctx)\n     * - encoding: unused.\n     * - decoding: set by libavcodec.\n     */\n    const AVCodecDescriptor *codec_descriptor;\n\n#if !FF_API_LOWRES\n    /**\n     * low resolution decoding, 1-> 1/2 size, 2->1/4 size\n     * - encoding: unused\n     * - decoding: Set by user.\n     * Code outside libavcodec should access this field using:\n     * av_codec_{get,set}_lowres(avctx)\n     */\n     int lowres;\n#endif\n\n    /**\n     * Current statistics for PTS correction.\n     * - decoding: maintained and used by libavcodec, not intended to be used by user apps\n     * - encoding: unused\n     */\n    int64_t pts_correction_num_faulty_pts; /// Number of incorrect PTS values so far\n    int64_t pts_correction_num_faulty_dts; /// Number of incorrect DTS values so far\n    int64_t pts_correction_last_pts;       /// PTS of the last frame\n    int64_t pts_correction_last_dts;       /// DTS of the last frame\n\n    /**\n     * Character encoding of the input subtitles file.\n     * - decoding: set by user\n     * - encoding: unused\n     */\n    char *sub_charenc;\n\n    /**\n     * Subtitles character encoding mode. Formats or codecs might be adjusting\n     * this setting (if they are doing the conversion themselves for instance).\n     * - decoding: set by libavcodec\n     * - encoding: unused\n     */\n    int sub_charenc_mode;\n#define FF_SUB_CHARENC_MODE_DO_NOTHING  -1  ///< do nothing (demuxer outputs a stream supposed to be already in UTF-8, or the codec is bitmap for instance)\n#define FF_SUB_CHARENC_MODE_AUTOMATIC    0  ///< libavcodec will select the mode itself\n#define FF_SUB_CHARENC_MODE_PRE_DECODER  1  ///< the AVPacket data needs to be recoded to UTF-8 before being fed to the decoder, requires iconv\n\n    /**\n     * Skip processing alpha if supported by codec.\n     * Note that if the format uses pre-multiplied alpha (common with VP6,\n     * and recommended due to better video quality/compression)\n     * the image will look as if alpha-blended onto a black background.\n     * However for formats that do not use pre-multiplied alpha\n     * there might be serious artefacts (though e.g. libswscale currently\n     * assumes pre-multiplied alpha anyway).\n     * Code outside libavcodec should access this field using AVOptions\n     *\n     * - decoding: set by user\n     * - encoding: unused\n     */\n    int skip_alpha;\n\n    /**\n     * Number of samples to skip after a discontinuity\n     * - decoding: unused\n     * - encoding: set by libavcodec\n     */\n    int seek_preroll;\n\n#if !FF_API_DEBUG_MV\n    /**\n     * debug motion vectors\n     * Code outside libavcodec should access this field using AVOptions\n     * - encoding: Set by user.\n     * - decoding: Set by user.\n     */\n    int debug_mv;\n#define FF_DEBUG_VIS_MV_P_FOR  0x00000001 //visualize forward predicted MVs of P frames\n#define FF_DEBUG_VIS_MV_B_FOR  0x00000002 //visualize forward predicted MVs of B frames\n#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames\n#endif\n\n    /**\n     * custom intra quantization matrix\n     * Code outside libavcodec should access this field using av_codec_g/set_chroma_intra_matrix()\n     * - encoding: Set by user, can be NULL.\n     * - decoding: unused.\n     */\n    uint16_t *chroma_intra_matrix;\n\n    /**\n     * dump format separator.\n     * can be \", \" or \"\\n      \" or anything else\n     * Code outside libavcodec should access this field using AVOptions\n     * (NO direct access).\n     * - encoding: Set by user.\n     * - decoding: Set by user.\n     */\n    uint8_t *dump_separator;\n\n    /**\n     * ',' separated list of allowed decoders.\n     * If NULL then all are allowed\n     * - encoding: unused\n     * - decoding: set by user through AVOPtions (NO direct access)\n     */\n    char *codec_whitelist;\n\n    /*\n     * Properties of the stream that gets decoded\n     * To be accessed through av_codec_get_properties() (NO direct access)\n     * - encoding: unused\n     * - decoding: set by libavcodec\n     */\n    unsigned properties;\n#define FF_CODEC_PROPERTY_LOSSLESS        0x00000001\n#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002\n\n    /**\n     * Additional data associated with the entire coded stream.\n     *\n     * - decoding: unused\n     * - encoding: may be set by libavcodec after avcodec_open2().\n     */\n    AVPacketSideData *coded_side_data;\n    int            nb_coded_side_data;\n\n} AVCodecContext;\n\nAVRational av_codec_get_pkt_timebase         (const AVCodecContext *avctx);\nvoid       av_codec_set_pkt_timebase         (AVCodecContext *avctx, AVRational val);\n\nconst AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx);\nvoid                     av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc);\n\nunsigned av_codec_get_codec_properties(const AVCodecContext *avctx);\n\nint  av_codec_get_lowres(const AVCodecContext *avctx);\nvoid av_codec_set_lowres(AVCodecContext *avctx, int val);\n\nint  av_codec_get_seek_preroll(const AVCodecContext *avctx);\nvoid av_codec_set_seek_preroll(AVCodecContext *avctx, int val);\n\nuint16_t *av_codec_get_chroma_intra_matrix(const AVCodecContext *avctx);\nvoid av_codec_set_chroma_intra_matrix(AVCodecContext *avctx, uint16_t *val);\n\n/**\n * AVProfile.\n */\ntypedef struct AVProfile {\n    int profile;\n    const char *name; ///< short name for the profile\n} AVProfile;\n\ntypedef struct AVCodecDefault AVCodecDefault;\n\nstruct AVSubtitle;\n\n/**\n * AVCodec.\n */\ntypedef struct AVCodec {\n    /**\n     * Name of the codec implementation.\n     * The name is globally unique among encoders and among decoders (but an\n     * encoder and a decoder can share the same name).\n     * This is the primary way to find a codec from the user perspective.\n     */\n    const char *name;\n    /**\n     * Descriptive name for the codec, meant to be more human readable than name.\n     * You should use the NULL_IF_CONFIG_SMALL() macro to define it.\n     */\n    const char *long_name;\n    enum AVMediaType type;\n    enum AVCodecID id;\n    /**\n     * Codec capabilities.\n     * see AV_CODEC_CAP_*\n     */\n    int capabilities;\n    const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0}\n    const enum AVPixelFormat *pix_fmts;     ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1\n    const int *supported_samplerates;       ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0\n    const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1\n    const uint64_t *channel_layouts;         ///< array of support channel layouts, or NULL if unknown. array is terminated by 0\n    uint8_t max_lowres;                     ///< maximum value for lowres supported by the decoder, no direct access, use av_codec_get_max_lowres()\n    const AVClass *priv_class;              ///< AVClass for the private context\n    const AVProfile *profiles;              ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}\n\n    /*****************************************************************\n     * No fields below this line are part of the public API. They\n     * may not be used outside of libavcodec and can be changed and\n     * removed at will.\n     * New public fields should be added right above.\n     *****************************************************************\n     */\n    int priv_data_size;\n    struct AVCodec *next;\n    /**\n     * @name Frame-level threading support functions\n     * @{\n     */\n    /**\n     * If defined, called on thread contexts when they are created.\n     * If the codec allocates writable tables in init(), re-allocate them here.\n     * priv_data will be set to a copy of the original.\n     */\n    int (*init_thread_copy)(AVCodecContext *);\n    /**\n     * Copy necessary context variables from a previous thread context to the current one.\n     * If not defined, the next thread will start automatically; otherwise, the codec\n     * must call ff_thread_finish_setup().\n     *\n     * dst and src will (rarely) point to the same context, in which case memcpy should be skipped.\n     */\n    int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);\n    /** @} */\n\n    /**\n     * Private codec-specific defaults.\n     */\n    const AVCodecDefault *defaults;\n\n    /**\n     * Initialize codec static data, called from avcodec_register().\n     */\n    void (*init_static_data)(struct AVCodec *codec);\n\n    int (*init)(AVCodecContext *);\n    int (*encode_sub)(AVCodecContext *, uint8_t *buf, int buf_size,\n                      const struct AVSubtitle *sub);\n    /**\n     * Encode data to an AVPacket.\n     *\n     * @param      avctx          codec context\n     * @param      avpkt          output AVPacket (may contain a user-provided buffer)\n     * @param[in]  frame          AVFrame containing the raw data to be encoded\n     * @param[out] got_packet_ptr encoder sets to 0 or 1 to indicate that a\n     *                            non-empty packet was returned in avpkt.\n     * @return 0 on success, negative error code on failure\n     */\n    int (*encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame,\n                   int *got_packet_ptr);\n    int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);\n    int (*close)(AVCodecContext *);\n    /**\n     * Flush buffers.\n     * Will be called when seeking\n     */\n    void (*flush)(AVCodecContext *);\n    /**\n     * Internal codec capabilities.\n     * See FF_CODEC_CAP_* in internal.h\n     */\n    int caps_internal;\n} AVCodec;\n\nint av_codec_get_max_lowres(const AVCodec *codec);\n\nstruct MpegEncContext;\n\n/**\n * @defgroup lavc_hwaccel AVHWAccel\n * @{\n */\ntypedef struct AVHWAccel {\n    /**\n     * Name of the hardware accelerated codec.\n     * The name is globally unique among encoders and among decoders (but an\n     * encoder and a decoder can share the same name).\n     */\n    const char *name;\n\n    /**\n     * Type of codec implemented by the hardware accelerator.\n     *\n     * See AVMEDIA_TYPE_xxx\n     */\n    enum AVMediaType type;\n\n    /**\n     * Codec implemented by the hardware accelerator.\n     *\n     * See AV_CODEC_ID_xxx\n     */\n    enum AVCodecID id;\n\n    /**\n     * Supported pixel format.\n     *\n     * Only hardware accelerated formats are supported here.\n     */\n    enum AVPixelFormat pix_fmt;\n\n    /**\n     * Hardware accelerated codec capabilities.\n     * see HWACCEL_CODEC_CAP_*\n     */\n    int capabilities;\n\n    /*****************************************************************\n     * No fields below this line are part of the public API. They\n     * may not be used outside of libavcodec and can be changed and\n     * removed at will.\n     * New public fields should be added right above.\n     *****************************************************************\n     */\n    struct AVHWAccel *next;\n\n    /**\n     * Allocate a custom buffer\n     */\n    int (*alloc_frame)(AVCodecContext *avctx, AVFrame *frame);\n\n    /**\n     * Called at the beginning of each frame or field picture.\n     *\n     * Meaningful frame information (codec specific) is guaranteed to\n     * be parsed at this point. This function is mandatory.\n     *\n     * Note that buf can be NULL along with buf_size set to 0.\n     * Otherwise, this means the whole frame is available at this point.\n     *\n     * @param avctx the codec context\n     * @param buf the frame data buffer base\n     * @param buf_size the size of the frame in bytes\n     * @return zero if successful, a negative value otherwise\n     */\n    int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);\n\n    /**\n     * Callback for each slice.\n     *\n     * Meaningful slice information (codec specific) is guaranteed to\n     * be parsed at this point. This function is mandatory.\n     * The only exception is XvMC, that works on MB level.\n     *\n     * @param avctx the codec context\n     * @param buf the slice data buffer base\n     * @param buf_size the size of the slice in bytes\n     * @return zero if successful, a negative value otherwise\n     */\n    int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);\n\n    /**\n     * Called at the end of each frame or field picture.\n     *\n     * The whole picture is parsed at this point and can now be sent\n     * to the hardware accelerator. This function is mandatory.\n     *\n     * @param avctx the codec context\n     * @return zero if successful, a negative value otherwise\n     */\n    int (*end_frame)(AVCodecContext *avctx);\n\n    /**\n     * Size of per-frame hardware accelerator private data.\n     *\n     * Private data is allocated with av_mallocz() before\n     * AVCodecContext.get_buffer() and deallocated after\n     * AVCodecContext.release_buffer().\n     */\n    int frame_priv_data_size;\n\n    /**\n     * Called for every Macroblock in a slice.\n     *\n     * XvMC uses it to replace the ff_mpv_decode_mb().\n     * Instead of decoding to raw picture, MB parameters are\n     * stored in an array provided by the video driver.\n     *\n     * @param s the mpeg context\n     */\n    void (*decode_mb)(struct MpegEncContext *s);\n\n    /**\n     * Initialize the hwaccel private data.\n     *\n     * This will be called from ff_get_format(), after hwaccel and\n     * hwaccel_context are set and the hwaccel private data in AVCodecInternal\n     * is allocated.\n     */\n    int (*init)(AVCodecContext *avctx);\n\n    /**\n     * Uninitialize the hwaccel private data.\n     *\n     * This will be called from get_format() or avcodec_close(), after hwaccel\n     * and hwaccel_context are already uninitialized.\n     */\n    int (*uninit)(AVCodecContext *avctx);\n\n    /**\n     * Size of the private data to allocate in\n     * AVCodecInternal.hwaccel_priv_data.\n     */\n    int priv_data_size;\n} AVHWAccel;\n\n/**\n * Hardware acceleration should be used for decoding even if the codec level\n * used is unknown or higher than the maximum supported level reported by the\n * hardware driver.\n *\n * It's generally a good idea to pass this flag unless you have a specific\n * reason not to, as hardware tends to under-report supported levels.\n */\n#define AV_HWACCEL_FLAG_IGNORE_LEVEL (1 << 0)\n\n/**\n * Hardware acceleration can output YUV pixel formats with a different chroma\n * sampling than 4:2:0 and/or other than 8 bits per component.\n */\n#define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH (1 << 1)\n\n/**\n * @}\n */\n\n#if FF_API_AVPICTURE\n/**\n * @defgroup lavc_picture AVPicture\n *\n * Functions for working with AVPicture\n * @{\n */\n\n/**\n * Picture data structure.\n *\n * Up to four components can be stored into it, the last component is\n * alpha.\n * @deprecated use AVFrame or imgutils functions instead\n */\ntypedef struct AVPicture {\n    attribute_deprecated\n    uint8_t *data[AV_NUM_DATA_POINTERS];    ///< pointers to the image data planes\n    attribute_deprecated\n    int linesize[AV_NUM_DATA_POINTERS];     ///< number of bytes per line\n} AVPicture;\n\n/**\n * @}\n */\n#endif\n\nenum AVSubtitleType {\n    SUBTITLE_NONE,\n\n    SUBTITLE_BITMAP,                ///< A bitmap, pict will be set\n\n    /**\n     * Plain text, the text field must be set by the decoder and is\n     * authoritative. ass and pict fields may contain approximations.\n     */\n    SUBTITLE_TEXT,\n\n    /**\n     * Formatted text, the ass field must be set by the decoder and is\n     * authoritative. pict and text fields may contain approximations.\n     */\n    SUBTITLE_ASS,\n};\n\n#define AV_SUBTITLE_FLAG_FORCED 0x00000001\n\ntypedef struct AVSubtitleRect {\n    int x;         ///< top left corner  of pict, undefined when pict is not set\n    int y;         ///< top left corner  of pict, undefined when pict is not set\n    int w;         ///< width            of pict, undefined when pict is not set\n    int h;         ///< height           of pict, undefined when pict is not set\n    int nb_colors; ///< number of colors in pict, undefined when pict is not set\n\n#if FF_API_AVPICTURE\n    /**\n     * @deprecated unused\n     */\n    attribute_deprecated\n    AVPicture pict;\n#endif\n    /**\n     * data+linesize for the bitmap of this subtitle.\n     * Can be set for text/ass as well once they are rendered.\n     */\n    uint8_t *data[4];\n    int linesize[4];\n\n    enum AVSubtitleType type;\n\n    char *text;                     ///< 0 terminated plain UTF-8 text\n\n    /**\n     * 0 terminated ASS/SSA compatible event line.\n     * The presentation of this is unaffected by the other values in this\n     * struct.\n     */\n    char *ass;\n\n    int flags;\n} AVSubtitleRect;\n\ntypedef struct AVSubtitle {\n    uint16_t format; /* 0 = graphics */\n    uint32_t start_display_time; /* relative to packet pts, in ms */\n    uint32_t end_display_time; /* relative to packet pts, in ms */\n    unsigned num_rects;\n    AVSubtitleRect **rects;\n    int64_t pts;    ///< Same as packet pts, in AV_TIME_BASE\n} AVSubtitle;\n\n/**\n * If c is NULL, returns the first registered codec,\n * if c is non-NULL, returns the next registered codec after c,\n * or NULL if c is the last one.\n */\nAVCodec *av_codec_next(const AVCodec *c);\n\n/**\n * Return the LIBAVCODEC_VERSION_INT constant.\n */\nunsigned avcodec_version(void);\n\n/**\n * Return the libavcodec build-time configuration.\n */\nconst char *avcodec_configuration(void);\n\n/**\n * Return the libavcodec license.\n */\nconst char *avcodec_license(void);\n\n/**\n * Register the codec codec and initialize libavcodec.\n *\n * @warning either this function or avcodec_register_all() must be called\n * before any other libavcodec functions.\n *\n * @see avcodec_register_all()\n */\nvoid avcodec_register(AVCodec *codec);\n\n/**\n * Register all the codecs, parsers and bitstream filters which were enabled at\n * configuration time. If you do not call this function you can select exactly\n * which formats you want to support, by using the individual registration\n * functions.\n *\n * @see avcodec_register\n * @see av_register_codec_parser\n * @see av_register_bitstream_filter\n */\nvoid avcodec_register_all(void);\n\n/**\n * Allocate an AVCodecContext and set its fields to default values. The\n * resulting struct should be freed with avcodec_free_context().\n *\n * @param codec if non-NULL, allocate private data and initialize defaults\n *              for the given codec. It is illegal to then call avcodec_open2()\n *              with a different codec.\n *              If NULL, then the codec-specific defaults won't be initialized,\n *              which may result in suboptimal default settings (this is\n *              important mainly for encoders, e.g. libx264).\n *\n * @return An AVCodecContext filled with default values or NULL on failure.\n * @see avcodec_get_context_defaults\n */\nAVCodecContext *avcodec_alloc_context3(const AVCodec *codec);\n\n/**\n * Free the codec context and everything associated with it and write NULL to\n * the provided pointer.\n */\nvoid avcodec_free_context(AVCodecContext **avctx);\n\n/**\n * Set the fields of the given AVCodecContext to default values corresponding\n * to the given codec (defaults may be codec-dependent).\n *\n * Do not call this function if a non-NULL codec has been passed\n * to avcodec_alloc_context3() that allocated this AVCodecContext.\n * If codec is non-NULL, it is illegal to call avcodec_open2() with a\n * different codec on this AVCodecContext.\n */\nint avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec);\n\n/**\n * Get the AVClass for AVCodecContext. It can be used in combination with\n * AV_OPT_SEARCH_FAKE_OBJ for examining options.\n *\n * @see av_opt_find().\n */\nconst AVClass *avcodec_get_class(void);\n\n/**\n * Get the AVClass for AVFrame. It can be used in combination with\n * AV_OPT_SEARCH_FAKE_OBJ for examining options.\n *\n * @see av_opt_find().\n */\nconst AVClass *avcodec_get_frame_class(void);\n\n/**\n * Get the AVClass for AVSubtitleRect. It can be used in combination with\n * AV_OPT_SEARCH_FAKE_OBJ for examining options.\n *\n * @see av_opt_find().\n */\nconst AVClass *avcodec_get_subtitle_rect_class(void);\n\n/**\n * Copy the settings of the source AVCodecContext into the destination\n * AVCodecContext. The resulting destination codec context will be\n * unopened, i.e. you are required to call avcodec_open2() before you\n * can use this AVCodecContext to decode/encode video/audio data.\n *\n * @param dest target codec context, should be initialized with\n *             avcodec_alloc_context3(NULL), but otherwise uninitialized\n * @param src source codec context\n * @return AVERROR() on error (e.g. memory allocation error), 0 on success\n */\nint avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);\n\n/**\n * Initialize the AVCodecContext to use the given AVCodec. Prior to using this\n * function the context has to be allocated with avcodec_alloc_context3().\n *\n * The functions avcodec_find_decoder_by_name(), avcodec_find_encoder_by_name(),\n * avcodec_find_decoder() and avcodec_find_encoder() provide an easy way for\n * retrieving a codec.\n *\n * @warning This function is not thread safe!\n *\n * @note Always call this function before using decoding routines (such as\n * @ref avcodec_decode_video2()).\n *\n * @code\n * avcodec_register_all();\n * av_dict_set(&opts, \"b\", \"2.5M\", 0);\n * codec = avcodec_find_decoder(AV_CODEC_ID_H264);\n * if (!codec)\n *     exit(1);\n *\n * context = avcodec_alloc_context3(codec);\n *\n * if (avcodec_open2(context, codec, opts) < 0)\n *     exit(1);\n * @endcode\n *\n * @param avctx The context to initialize.\n * @param codec The codec to open this context for. If a non-NULL codec has been\n *              previously passed to avcodec_alloc_context3() or\n *              avcodec_get_context_defaults3() for this context, then this\n *              parameter MUST be either NULL or equal to the previously passed\n *              codec.\n * @param options A dictionary filled with AVCodecContext and codec-private options.\n *                On return this object will be filled with options that were not found.\n *\n * @return zero on success, a negative value on error\n * @see avcodec_alloc_context3(), avcodec_find_decoder(), avcodec_find_encoder(),\n *      av_dict_set(), av_opt_find().\n */\nint avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);\n\n/**\n * Close a given AVCodecContext and free all the data associated with it\n * (but not the AVCodecContext itself).\n *\n * Calling this function on an AVCodecContext that hasn't been opened will free\n * the codec-specific data allocated in avcodec_alloc_context3() /\n * avcodec_get_context_defaults3() with a non-NULL codec. Subsequent calls will\n * do nothing.\n */\nint avcodec_close(AVCodecContext *avctx);\n\n/**\n * Free all allocated data in the given subtitle struct.\n *\n * @param sub AVSubtitle to free.\n */\nvoid avsubtitle_free(AVSubtitle *sub);\n\n/**\n * @}\n */\n\n/**\n * @addtogroup lavc_packet\n * @{\n */\n\n/**\n * Allocate an AVPacket and set its fields to default values.  The resulting\n * struct must be freed using av_packet_free().\n *\n * @return An AVPacket filled with default values or NULL on failure.\n *\n * @note this only allocates the AVPacket itself, not the data buffers. Those\n * must be allocated through other means such as av_new_packet.\n *\n * @see av_new_packet\n */\nAVPacket *av_packet_alloc(void);\n\n/**\n * Create a new packet that references the same data as src.\n *\n * This is a shortcut for av_packet_alloc()+av_packet_ref().\n *\n * @return newly created AVPacket on success, NULL on error.\n *\n * @see av_packet_alloc\n * @see av_packet_ref\n */\nAVPacket *av_packet_clone(AVPacket *src);\n\n/**\n * Free the packet, if the packet is reference counted, it will be\n * unreferenced first.\n *\n * @param packet packet to be freed. The pointer will be set to NULL.\n * @note passing NULL is a no-op.\n */\nvoid av_packet_free(AVPacket **pkt);\n\n/**\n * Initialize optional fields of a packet with default values.\n *\n * Note, this does not touch the data and size members, which have to be\n * initialized separately.\n *\n * @param pkt packet\n */\nvoid av_init_packet(AVPacket *pkt);\n\n/**\n * Allocate the payload of a packet and initialize its fields with\n * default values.\n *\n * @param pkt packet\n * @param size wanted payload size\n * @return 0 if OK, AVERROR_xxx otherwise\n */\nint av_new_packet(AVPacket *pkt, int size);\n\n/**\n * Reduce packet size, correctly zeroing padding\n *\n * @param pkt packet\n * @param size new size\n */\nvoid av_shrink_packet(AVPacket *pkt, int size);\n\n/**\n * Increase packet size, correctly zeroing padding\n *\n * @param pkt packet\n * @param grow_by number of bytes by which to increase the size of the packet\n */\nint av_grow_packet(AVPacket *pkt, int grow_by);\n\n/**\n * Initialize a reference-counted packet from av_malloc()ed data.\n *\n * @param pkt packet to be initialized. This function will set the data, size,\n *        buf and destruct fields, all others are left untouched.\n * @param data Data allocated by av_malloc() to be used as packet data. If this\n *        function returns successfully, the data is owned by the underlying AVBuffer.\n *        The caller may not access the data through other means.\n * @param size size of data in bytes, without the padding. I.e. the full buffer\n *        size is assumed to be size + AV_INPUT_BUFFER_PADDING_SIZE.\n *\n * @return 0 on success, a negative AVERROR on error\n */\nint av_packet_from_data(AVPacket *pkt, uint8_t *data, int size);\n\n#if FF_API_AVPACKET_OLD_API\n/**\n * @warning This is a hack - the packet memory allocation stuff is broken. The\n * packet is allocated if it was not really allocated.\n *\n * @deprecated Use av_packet_ref\n */\nattribute_deprecated\nint av_dup_packet(AVPacket *pkt);\n/**\n * Copy packet, including contents\n *\n * @return 0 on success, negative AVERROR on fail\n */\nint av_copy_packet(AVPacket *dst, const AVPacket *src);\n\n/**\n * Copy packet side data\n *\n * @return 0 on success, negative AVERROR on fail\n */\nint av_copy_packet_side_data(AVPacket *dst, const AVPacket *src);\n\n/**\n * Free a packet.\n *\n * @deprecated Use av_packet_unref\n *\n * @param pkt packet to free\n */\nattribute_deprecated\nvoid av_free_packet(AVPacket *pkt);\n#endif\n/**\n * Allocate new information of a packet.\n *\n * @param pkt packet\n * @param type side information type\n * @param size side information size\n * @return pointer to fresh allocated data or NULL otherwise\n */\nuint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,\n                                 int size);\n\n/**\n * Wrap an existing array as a packet side data.\n *\n * @param pkt packet\n * @param type side information type\n * @param data the side data array. It must be allocated with the av_malloc()\n *             family of functions. The ownership of the data is transferred to\n *             pkt.\n * @param size side information size\n * @return a non-negative number on success, a negative AVERROR code on\n *         failure. On failure, the packet is unchanged and the data remains\n *         owned by the caller.\n */\nint av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type,\n                            uint8_t *data, size_t size);\n\n/**\n * Shrink the already allocated side data buffer\n *\n * @param pkt packet\n * @param type side information type\n * @param size new side information size\n * @return 0 on success, < 0 on failure\n */\nint av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,\n                               int size);\n\n/**\n * Get side information from packet.\n *\n * @param pkt packet\n * @param type desired side information type\n * @param size pointer for side information size to store (optional)\n * @return pointer to data if present or NULL otherwise\n */\nuint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,\n                                 int *size);\n\nint av_packet_merge_side_data(AVPacket *pkt);\n\nint av_packet_split_side_data(AVPacket *pkt);\n\nconst char *av_packet_side_data_name(enum AVPacketSideDataType type);\n\n/**\n * Pack a dictionary for use in side_data.\n *\n * @param dict The dictionary to pack.\n * @param size pointer to store the size of the returned data\n * @return pointer to data if successful, NULL otherwise\n */\nuint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size);\n/**\n * Unpack a dictionary from side_data.\n *\n * @param data data from side_data\n * @param size size of the data\n * @param dict the metadata storage dictionary\n * @return 0 on success, < 0 on failure\n */\nint av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict);\n\n\n/**\n * Convenience function to free all the side data stored.\n * All the other fields stay untouched.\n *\n * @param pkt packet\n */\nvoid av_packet_free_side_data(AVPacket *pkt);\n\n/**\n * Setup a new reference to the data described by a given packet\n *\n * If src is reference-counted, setup dst as a new reference to the\n * buffer in src. Otherwise allocate a new buffer in dst and copy the\n * data from src into it.\n *\n * All the other fields are copied from src.\n *\n * @see av_packet_unref\n *\n * @param dst Destination packet\n * @param src Source packet\n *\n * @return 0 on success, a negative AVERROR on error.\n */\nint av_packet_ref(AVPacket *dst, const AVPacket *src);\n\n/**\n * Wipe the packet.\n *\n * Unreference the buffer referenced by the packet and reset the\n * remaining packet fields to their default values.\n *\n * @param pkt The packet to be unreferenced.\n */\nvoid av_packet_unref(AVPacket *pkt);\n\n/**\n * Move every field in src to dst and reset src.\n *\n * @see av_packet_unref\n *\n * @param src Source packet, will be reset\n * @param dst Destination packet\n */\nvoid av_packet_move_ref(AVPacket *dst, AVPacket *src);\n\n/**\n * Copy only \"properties\" fields from src to dst.\n *\n * Properties for the purpose of this function are all the fields\n * beside those related to the packet data (buf, data, size)\n *\n * @param dst Destination packet\n * @param src Source packet\n *\n * @return 0 on success AVERROR on failure.\n *\n */\nint av_packet_copy_props(AVPacket *dst, const AVPacket *src);\n\n/**\n * Convert valid timing fields (timestamps / durations) in a packet from one\n * timebase to another. Timestamps with unknown values (AV_NOPTS_VALUE) will be\n * ignored.\n *\n * @param pkt packet on which the conversion will be performed\n * @param tb_src source timebase, in which the timing fields in pkt are\n *               expressed\n * @param tb_dst destination timebase, to which the timing fields will be\n *               converted\n */\nvoid av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst);\n\n/**\n * @}\n */\n\n/**\n * @addtogroup lavc_decoding\n * @{\n */\n\n/**\n * Find a registered decoder with a matching codec ID.\n *\n * @param id AVCodecID of the requested decoder\n * @return A decoder if one was found, NULL otherwise.\n */\nAVCodec *avcodec_find_decoder(enum AVCodecID id);\n\n/**\n * Find a registered decoder with the specified name.\n *\n * @param name name of the requested decoder\n * @return A decoder if one was found, NULL otherwise.\n */\nAVCodec *avcodec_find_decoder_by_name(const char *name);\n\n/**\n * The default callback for AVCodecContext.get_buffer2(). It is made public so\n * it can be called by custom get_buffer2() implementations for decoders without\n * AV_CODEC_CAP_DR1 set.\n */\nint avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);\n\n#if FF_API_EMU_EDGE\n/**\n * Return the amount of padding in pixels which the get_buffer callback must\n * provide around the edge of the image for codecs which do not have the\n * CODEC_FLAG_EMU_EDGE flag.\n *\n * @return Required padding in pixels.\n *\n * @deprecated CODEC_FLAG_EMU_EDGE is deprecated, so this function is no longer\n * needed\n */\nattribute_deprecated\nunsigned avcodec_get_edge_width(void);\n#endif\n\n/**\n * Modify width and height values so that they will result in a memory\n * buffer that is acceptable for the codec if you do not use any horizontal\n * padding.\n *\n * May only be used if a codec with AV_CODEC_CAP_DR1 has been opened.\n */\nvoid avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);\n\n/**\n * Modify width and height values so that they will result in a memory\n * buffer that is acceptable for the codec if you also ensure that all\n * line sizes are a multiple of the respective linesize_align[i].\n *\n * May only be used if a codec with AV_CODEC_CAP_DR1 has been opened.\n */\nvoid avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,\n                               int linesize_align[AV_NUM_DATA_POINTERS]);\n\n/**\n * Converts AVChromaLocation to swscale x/y chroma position.\n *\n * The positions represent the chroma (0,0) position in a coordinates system\n * with luma (0,0) representing the origin and luma(1,1) representing 256,256\n *\n * @param xpos  horizontal chroma sample position\n * @param ypos  vertical   chroma sample position\n */\nint avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);\n\n/**\n * Converts swscale x/y chroma position to AVChromaLocation.\n *\n * The positions represent the chroma (0,0) position in a coordinates system\n * with luma (0,0) representing the origin and luma(1,1) representing 256,256\n *\n * @param xpos  horizontal chroma sample position\n * @param ypos  vertical   chroma sample position\n */\nenum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);\n\n/**\n * Decode the audio frame of size avpkt->size from avpkt->data into frame.\n *\n * Some decoders may support multiple frames in a single AVPacket. Such\n * decoders would then just decode the first frame and the return value would be\n * less than the packet size. In this case, avcodec_decode_audio4 has to be\n * called again with an AVPacket containing the remaining data in order to\n * decode the second frame, etc...  Even if no frames are returned, the packet\n * needs to be fed to the decoder with remaining data until it is completely\n * consumed or an error occurs.\n *\n * Some decoders (those marked with AV_CODEC_CAP_DELAY) have a delay between input\n * and output. This means that for some packets they will not immediately\n * produce decoded output and need to be flushed at the end of decoding to get\n * all the decoded data. Flushing is done by calling this function with packets\n * with avpkt->data set to NULL and avpkt->size set to 0 until it stops\n * returning samples. It is safe to flush even those decoders that are not\n * marked with AV_CODEC_CAP_DELAY, then no samples will be returned.\n *\n * @warning The input buffer, avpkt->data must be AV_INPUT_BUFFER_PADDING_SIZE\n *          larger than the actual read bytes because some optimized bitstream\n *          readers read 32 or 64 bits at once and could read over the end.\n *\n * @note The AVCodecContext MUST have been opened with @ref avcodec_open2()\n * before packets may be fed to the decoder.\n *\n * @param      avctx the codec context\n * @param[out] frame The AVFrame in which to store decoded audio samples.\n *                   The decoder will allocate a buffer for the decoded frame by\n *                   calling the AVCodecContext.get_buffer2() callback.\n *                   When AVCodecContext.refcounted_frames is set to 1, the frame is\n *                   reference counted and the returned reference belongs to the\n *                   caller. The caller must release the frame using av_frame_unref()\n *                   when the frame is no longer needed. The caller may safely write\n *                   to the frame if av_frame_is_writable() returns 1.\n *                   When AVCodecContext.refcounted_frames is set to 0, the returned\n *                   reference belongs to the decoder and is valid only until the\n *                   next call to this function or until closing or flushing the\n *                   decoder. The caller may not write to it.\n * @param[out] got_frame_ptr Zero if no frame could be decoded, otherwise it is\n *                           non-zero. Note that this field being set to zero\n *                           does not mean that an error has occurred. For\n *                           decoders with AV_CODEC_CAP_DELAY set, no given decode\n *                           call is guaranteed to produce a frame.\n * @param[in]  avpkt The input AVPacket containing the input buffer.\n *                   At least avpkt->data and avpkt->size should be set. Some\n *                   decoders might also require additional fields to be set.\n * @return A negative error code is returned if an error occurred during\n *         decoding, otherwise the number of bytes consumed from the input\n *         AVPacket is returned.\n */\nint avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,\n                          int *got_frame_ptr, const AVPacket *avpkt);\n\n/**\n * Decode the video frame of size avpkt->size from avpkt->data into picture.\n * Some decoders may support multiple frames in a single AVPacket, such\n * decoders would then just decode the first frame.\n *\n * @warning The input buffer must be AV_INPUT_BUFFER_PADDING_SIZE larger than\n * the actual read bytes because some optimized bitstream readers read 32 or 64\n * bits at once and could read over the end.\n *\n * @warning The end of the input buffer buf should be set to 0 to ensure that\n * no overreading happens for damaged MPEG streams.\n *\n * @note Codecs which have the AV_CODEC_CAP_DELAY capability set have a delay\n * between input and output, these need to be fed with avpkt->data=NULL,\n * avpkt->size=0 at the end to return the remaining frames.\n *\n * @note The AVCodecContext MUST have been opened with @ref avcodec_open2()\n * before packets may be fed to the decoder.\n *\n * @param avctx the codec context\n * @param[out] picture The AVFrame in which the decoded video frame will be stored.\n *             Use av_frame_alloc() to get an AVFrame. The codec will\n *             allocate memory for the actual bitmap by calling the\n *             AVCodecContext.get_buffer2() callback.\n *             When AVCodecContext.refcounted_frames is set to 1, the frame is\n *             reference counted and the returned reference belongs to the\n *             caller. The caller must release the frame using av_frame_unref()\n *             when the frame is no longer needed. The caller may safely write\n *             to the frame if av_frame_is_writable() returns 1.\n *             When AVCodecContext.refcounted_frames is set to 0, the returned\n *             reference belongs to the decoder and is valid only until the\n *             next call to this function or until closing or flushing the\n *             decoder. The caller may not write to it.\n *\n * @param[in] avpkt The input AVPacket containing the input buffer.\n *            You can create such packet with av_init_packet() and by then setting\n *            data and size, some decoders might in addition need other fields like\n *            flags&AV_PKT_FLAG_KEY. All decoders are designed to use the least\n *            fields possible.\n * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero.\n * @return On error a negative value is returned, otherwise the number of bytes\n * used or zero if no frame could be decompressed.\n */\nint avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,\n                         int *got_picture_ptr,\n                         const AVPacket *avpkt);\n\n/**\n * Decode a subtitle message.\n * Return a negative value on error, otherwise return the number of bytes used.\n * If no subtitle could be decompressed, got_sub_ptr is zero.\n * Otherwise, the subtitle is stored in *sub.\n * Note that AV_CODEC_CAP_DR1 is not available for subtitle codecs. This is for\n * simplicity, because the performance difference is expect to be negligible\n * and reusing a get_buffer written for video codecs would probably perform badly\n * due to a potentially very different allocation pattern.\n *\n * Some decoders (those marked with CODEC_CAP_DELAY) have a delay between input\n * and output. This means that for some packets they will not immediately\n * produce decoded output and need to be flushed at the end of decoding to get\n * all the decoded data. Flushing is done by calling this function with packets\n * with avpkt->data set to NULL and avpkt->size set to 0 until it stops\n * returning subtitles. It is safe to flush even those decoders that are not\n * marked with CODEC_CAP_DELAY, then no subtitles will be returned.\n *\n * @note The AVCodecContext MUST have been opened with @ref avcodec_open2()\n * before packets may be fed to the decoder.\n *\n * @param avctx the codec context\n * @param[out] sub The Preallocated AVSubtitle in which the decoded subtitle will be stored,\n *                 must be freed with avsubtitle_free if *got_sub_ptr is set.\n * @param[in,out] got_sub_ptr Zero if no subtitle could be decompressed, otherwise, it is nonzero.\n * @param[in] avpkt The input AVPacket containing the input buffer.\n */\nint avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,\n                            int *got_sub_ptr,\n                            AVPacket *avpkt);\n\n/**\n * @defgroup lavc_parsing Frame parsing\n * @{\n */\n\nenum AVPictureStructure {\n    AV_PICTURE_STRUCTURE_UNKNOWN,      //< unknown\n    AV_PICTURE_STRUCTURE_TOP_FIELD,    //< coded as top field\n    AV_PICTURE_STRUCTURE_BOTTOM_FIELD, //< coded as bottom field\n    AV_PICTURE_STRUCTURE_FRAME,        //< coded as frame\n};\n\ntypedef struct AVCodecParserContext {\n    void *priv_data;\n    struct AVCodecParser *parser;\n    int64_t frame_offset; /* offset of the current frame */\n    int64_t cur_offset; /* current offset\n                           (incremented by each av_parser_parse()) */\n    int64_t next_frame_offset; /* offset of the next frame */\n    /* video info */\n    int pict_type; /* XXX: Put it back in AVCodecContext. */\n    /**\n     * This field is used for proper frame duration computation in lavf.\n     * It signals, how much longer the frame duration of the current frame\n     * is compared to normal frame duration.\n     *\n     * frame_duration = (1 + repeat_pict) * time_base\n     *\n     * It is used by codecs like H.264 to display telecined material.\n     */\n    int repeat_pict; /* XXX: Put it back in AVCodecContext. */\n    int64_t pts;     /* pts of the current frame */\n    int64_t dts;     /* dts of the current frame */\n\n    /* private data */\n    int64_t last_pts;\n    int64_t last_dts;\n    int fetch_timestamp;\n\n#define AV_PARSER_PTS_NB 4\n    int cur_frame_start_index;\n    int64_t cur_frame_offset[AV_PARSER_PTS_NB];\n    int64_t cur_frame_pts[AV_PARSER_PTS_NB];\n    int64_t cur_frame_dts[AV_PARSER_PTS_NB];\n\n    int flags;\n#define PARSER_FLAG_COMPLETE_FRAMES           0x0001\n#define PARSER_FLAG_ONCE                      0x0002\n/// Set if the parser has a valid file offset\n#define PARSER_FLAG_FETCHED_OFFSET            0x0004\n#define PARSER_FLAG_USE_CODEC_TS              0x1000\n\n    int64_t offset;      ///< byte offset from starting packet start\n    int64_t cur_frame_end[AV_PARSER_PTS_NB];\n\n    /**\n     * Set by parser to 1 for key frames and 0 for non-key frames.\n     * It is initialized to -1, so if the parser doesn't set this flag,\n     * old-style fallback using AV_PICTURE_TYPE_I picture type as key frames\n     * will be used.\n     */\n    int key_frame;\n\n#if FF_API_CONVERGENCE_DURATION\n    /**\n     * @deprecated unused\n     */\n    attribute_deprecated\n    int64_t convergence_duration;\n#endif\n\n    // Timestamp generation support:\n    /**\n     * Synchronization point for start of timestamp generation.\n     *\n     * Set to >0 for sync point, 0 for no sync point and <0 for undefined\n     * (default).\n     *\n     * For example, this corresponds to presence of H.264 buffering period\n     * SEI message.\n     */\n    int dts_sync_point;\n\n    /**\n     * Offset of the current timestamp against last timestamp sync point in\n     * units of AVCodecContext.time_base.\n     *\n     * Set to INT_MIN when dts_sync_point unused. Otherwise, it must\n     * contain a valid timestamp offset.\n     *\n     * Note that the timestamp of sync point has usually a nonzero\n     * dts_ref_dts_delta, which refers to the previous sync point. Offset of\n     * the next frame after timestamp sync point will be usually 1.\n     *\n     * For example, this corresponds to H.264 cpb_removal_delay.\n     */\n    int dts_ref_dts_delta;\n\n    /**\n     * Presentation delay of current frame in units of AVCodecContext.time_base.\n     *\n     * Set to INT_MIN when dts_sync_point unused. Otherwise, it must\n     * contain valid non-negative timestamp delta (presentation time of a frame\n     * must not lie in the past).\n     *\n     * This delay represents the difference between decoding and presentation\n     * time of the frame.\n     *\n     * For example, this corresponds to H.264 dpb_output_delay.\n     */\n    int pts_dts_delta;\n\n    /**\n     * Position of the packet in file.\n     *\n     * Analogous to cur_frame_pts/dts\n     */\n    int64_t cur_frame_pos[AV_PARSER_PTS_NB];\n\n    /**\n     * Byte position of currently parsed frame in stream.\n     */\n    int64_t pos;\n\n    /**\n     * Previous frame byte position.\n     */\n    int64_t last_pos;\n\n    /**\n     * Duration of the current frame.\n     * For audio, this is in units of 1 / AVCodecContext.sample_rate.\n     * For all other types, this is in units of AVCodecContext.time_base.\n     */\n    int duration;\n\n    enum AVFieldOrder field_order;\n\n    /**\n     * Indicate whether a picture is coded as a frame, top field or bottom field.\n     *\n     * For example, H.264 field_pic_flag equal to 0 corresponds to\n     * AV_PICTURE_STRUCTURE_FRAME. An H.264 picture with field_pic_flag\n     * equal to 1 and bottom_field_flag equal to 0 corresponds to\n     * AV_PICTURE_STRUCTURE_TOP_FIELD.\n     */\n    enum AVPictureStructure picture_structure;\n\n    /**\n     * Picture number incremented in presentation or output order.\n     * This field may be reinitialized at the first picture of a new sequence.\n     *\n     * For example, this corresponds to H.264 PicOrderCnt.\n     */\n    int output_picture_number;\n\n    /**\n     * Dimensions of the decoded video intended for presentation.\n     */\n    int width;\n    int height;\n\n    /**\n     * Dimensions of the coded video.\n     */\n    int coded_width;\n    int coded_height;\n\n    /**\n     * The format of the coded data, corresponds to enum AVPixelFormat for video\n     * and for enum AVSampleFormat for audio.\n     *\n     * Note that a decoder can have considerable freedom in how exactly it\n     * decodes the data, so the format reported here might be different from the\n     * one returned by a decoder.\n     */\n    int format;\n} AVCodecParserContext;\n\ntypedef struct AVCodecParser {\n    int codec_ids[5]; /* several codec IDs are permitted */\n    int priv_data_size;\n    int (*parser_init)(AVCodecParserContext *s);\n    /* This callback never returns an error, a negative value means that\n     * the frame start was in a previous packet. */\n    int (*parser_parse)(AVCodecParserContext *s,\n                        AVCodecContext *avctx,\n                        const uint8_t **poutbuf, int *poutbuf_size,\n                        const uint8_t *buf, int buf_size);\n    void (*parser_close)(AVCodecParserContext *s);\n    int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);\n    struct AVCodecParser *next;\n} AVCodecParser;\n\nAVCodecParser *av_parser_next(const AVCodecParser *c);\n\nvoid av_register_codec_parser(AVCodecParser *parser);\nAVCodecParserContext *av_parser_init(int codec_id);\n\n/**\n * Parse a packet.\n *\n * @param s             parser context.\n * @param avctx         codec context.\n * @param poutbuf       set to pointer to parsed buffer or NULL if not yet finished.\n * @param poutbuf_size  set to size of parsed buffer or zero if not yet finished.\n * @param buf           input buffer.\n * @param buf_size      input length, to signal EOF, this should be 0 (so that the last frame can be output).\n * @param pts           input presentation timestamp.\n * @param dts           input decoding timestamp.\n * @param pos           input byte position in stream.\n * @return the number of bytes of the input bitstream used.\n *\n * Example:\n * @code\n *   while(in_len){\n *       len = av_parser_parse2(myparser, AVCodecContext, &data, &size,\n *                                        in_data, in_len,\n *                                        pts, dts, pos);\n *       in_data += len;\n *       in_len  -= len;\n *\n *       if(size)\n *          decode_frame(data, size);\n *   }\n * @endcode\n */\nint av_parser_parse2(AVCodecParserContext *s,\n                     AVCodecContext *avctx,\n                     uint8_t **poutbuf, int *poutbuf_size,\n                     const uint8_t *buf, int buf_size,\n                     int64_t pts, int64_t dts,\n                     int64_t pos);\n\n/**\n * @return 0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed\n * @deprecated use AVBitStreamFilter\n */\nint av_parser_change(AVCodecParserContext *s,\n                     AVCodecContext *avctx,\n                     uint8_t **poutbuf, int *poutbuf_size,\n                     const uint8_t *buf, int buf_size, int keyframe);\nvoid av_parser_close(AVCodecParserContext *s);\n\n/**\n * @}\n * @}\n */\n\n/**\n * @addtogroup lavc_encoding\n * @{\n */\n\n/**\n * Find a registered encoder with a matching codec ID.\n *\n * @param id AVCodecID of the requested encoder\n * @return An encoder if one was found, NULL otherwise.\n */\nAVCodec *avcodec_find_encoder(enum AVCodecID id);\n\n/**\n * Find a registered encoder with the specified name.\n *\n * @param name name of the requested encoder\n * @return An encoder if one was found, NULL otherwise.\n */\nAVCodec *avcodec_find_encoder_by_name(const char *name);\n\n/**\n * Encode a frame of audio.\n *\n * Takes input samples from frame and writes the next output packet, if\n * available, to avpkt. The output packet does not necessarily contain data for\n * the most recent frame, as encoders can delay, split, and combine input frames\n * internally as needed.\n *\n * @param avctx     codec context\n * @param avpkt     output AVPacket.\n *                  The user can supply an output buffer by setting\n *                  avpkt->data and avpkt->size prior to calling the\n *                  function, but if the size of the user-provided data is not\n *                  large enough, encoding will fail. If avpkt->data and\n *                  avpkt->size are set, avpkt->destruct must also be set. All\n *                  other AVPacket fields will be reset by the encoder using\n *                  av_init_packet(). If avpkt->data is NULL, the encoder will\n *                  allocate it. The encoder will set avpkt->size to the size\n *                  of the output packet.\n *\n *                  If this function fails or produces no output, avpkt will be\n *                  freed using av_packet_unref().\n * @param[in] frame AVFrame containing the raw audio data to be encoded.\n *                  May be NULL when flushing an encoder that has the\n *                  AV_CODEC_CAP_DELAY capability set.\n *                  If AV_CODEC_CAP_VARIABLE_FRAME_SIZE is set, then each frame\n *                  can have any number of samples.\n *                  If it is not set, frame->nb_samples must be equal to\n *                  avctx->frame_size for all frames except the last.\n *                  The final frame may be smaller than avctx->frame_size.\n * @param[out] got_packet_ptr This field is set to 1 by libavcodec if the\n *                            output packet is non-empty, and to 0 if it is\n *                            empty. If the function returns an error, the\n *                            packet can be assumed to be invalid, and the\n *                            value of got_packet_ptr is undefined and should\n *                            not be used.\n * @return          0 on success, negative error code on failure\n */\nint avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,\n                          const AVFrame *frame, int *got_packet_ptr);\n\n/**\n * Encode a frame of video.\n *\n * Takes input raw video data from frame and writes the next output packet, if\n * available, to avpkt. The output packet does not necessarily contain data for\n * the most recent frame, as encoders can delay and reorder input frames\n * internally as needed.\n *\n * @param avctx     codec context\n * @param avpkt     output AVPacket.\n *                  The user can supply an output buffer by setting\n *                  avpkt->data and avpkt->size prior to calling the\n *                  function, but if the size of the user-provided data is not\n *                  large enough, encoding will fail. All other AVPacket fields\n *                  will be reset by the encoder using av_init_packet(). If\n *                  avpkt->data is NULL, the encoder will allocate it.\n *                  The encoder will set avpkt->size to the size of the\n *                  output packet. The returned data (if any) belongs to the\n *                  caller, he is responsible for freeing it.\n *\n *                  If this function fails or produces no output, avpkt will be\n *                  freed using av_packet_unref().\n * @param[in] frame AVFrame containing the raw video data to be encoded.\n *                  May be NULL when flushing an encoder that has the\n *                  AV_CODEC_CAP_DELAY capability set.\n * @param[out] got_packet_ptr This field is set to 1 by libavcodec if the\n *                            output packet is non-empty, and to 0 if it is\n *                            empty. If the function returns an error, the\n *                            packet can be assumed to be invalid, and the\n *                            value of got_packet_ptr is undefined and should\n *                            not be used.\n * @return          0 on success, negative error code on failure\n */\nint avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,\n                          const AVFrame *frame, int *got_packet_ptr);\n\nint avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,\n                            const AVSubtitle *sub);\n\n\n/**\n * @}\n */\n\n#if FF_API_AVCODEC_RESAMPLE\n/**\n * @defgroup lavc_resample Audio resampling\n * @ingroup libavc\n * @deprecated use libswresample instead\n *\n * @{\n */\nstruct ReSampleContext;\nstruct AVResampleContext;\n\ntypedef struct ReSampleContext ReSampleContext;\n\n/**\n *  Initialize audio resampling context.\n *\n * @param output_channels  number of output channels\n * @param input_channels   number of input channels\n * @param output_rate      output sample rate\n * @param input_rate       input sample rate\n * @param sample_fmt_out   requested output sample format\n * @param sample_fmt_in    input sample format\n * @param filter_length    length of each FIR filter in the filterbank relative to the cutoff frequency\n * @param log2_phase_count log2 of the number of entries in the polyphase filterbank\n * @param linear           if 1 then the used FIR filter will be linearly interpolated\n                           between the 2 closest, if 0 the closest will be used\n * @param cutoff           cutoff frequency, 1.0 corresponds to half the output sampling rate\n * @return allocated ReSampleContext, NULL if error occurred\n */\nattribute_deprecated\nReSampleContext *av_audio_resample_init(int output_channels, int input_channels,\n                                        int output_rate, int input_rate,\n                                        enum AVSampleFormat sample_fmt_out,\n                                        enum AVSampleFormat sample_fmt_in,\n                                        int filter_length, int log2_phase_count,\n                                        int linear, double cutoff);\n\nattribute_deprecated\nint audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);\n\n/**\n * Free resample context.\n *\n * @param s a non-NULL pointer to a resample context previously\n *          created with av_audio_resample_init()\n */\nattribute_deprecated\nvoid audio_resample_close(ReSampleContext *s);\n\n\n/**\n * Initialize an audio resampler.\n * Note, if either rate is not an integer then simply scale both rates up so they are.\n * @param filter_length length of each FIR filter in the filterbank relative to the cutoff freq\n * @param log2_phase_count log2 of the number of entries in the polyphase filterbank\n * @param linear If 1 then the used FIR filter will be linearly interpolated\n                 between the 2 closest, if 0 the closest will be used\n * @param cutoff cutoff frequency, 1.0 corresponds to half the output sampling rate\n */\nattribute_deprecated\nstruct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);\n\n/**\n * Resample an array of samples using a previously configured context.\n * @param src an array of unconsumed samples\n * @param consumed the number of samples of src which have been consumed are returned here\n * @param src_size the number of unconsumed samples available\n * @param dst_size the amount of space in samples available in dst\n * @param update_ctx If this is 0 then the context will not be modified, that way several channels can be resampled with the same context.\n * @return the number of samples written in dst or -1 if an error occurred\n */\nattribute_deprecated\nint av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);\n\n\n/**\n * Compensate samplerate/timestamp drift. The compensation is done by changing\n * the resampler parameters, so no audible clicks or similar distortions occur\n * @param compensation_distance distance in output samples over which the compensation should be performed\n * @param sample_delta number of output samples which should be output less\n *\n * example: av_resample_compensate(c, 10, 500)\n * here instead of 510 samples only 500 samples would be output\n *\n * note, due to rounding the actual compensation might be slightly different,\n * especially if the compensation_distance is large and the in_rate used during init is small\n */\nattribute_deprecated\nvoid av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);\nattribute_deprecated\nvoid av_resample_close(struct AVResampleContext *c);\n\n/**\n * @}\n */\n#endif\n\n#if FF_API_AVPICTURE\n/**\n * @addtogroup lavc_picture\n * @{\n */\n\n/**\n * @deprecated unused\n */\nattribute_deprecated\nint avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height);\n\n/**\n * @deprecated unused\n */\nattribute_deprecated\nvoid avpicture_free(AVPicture *picture);\n\n/**\n * @deprecated use av_image_fill_arrays() instead.\n */\nattribute_deprecated\nint avpicture_fill(AVPicture *picture, const uint8_t *ptr,\n                   enum AVPixelFormat pix_fmt, int width, int height);\n\n/**\n * @deprecated use av_image_copy_to_buffer() instead.\n */\nattribute_deprecated\nint avpicture_layout(const AVPicture *src, enum AVPixelFormat pix_fmt,\n                     int width, int height,\n                     unsigned char *dest, int dest_size);\n\n/**\n * @deprecated use av_image_get_buffer_size() instead.\n */\nattribute_deprecated\nint avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height);\n\n/**\n * @deprecated av_image_copy() instead.\n */\nattribute_deprecated\nvoid av_picture_copy(AVPicture *dst, const AVPicture *src,\n                     enum AVPixelFormat pix_fmt, int width, int height);\n\n/**\n * @deprecated unused\n */\nattribute_deprecated\nint av_picture_crop(AVPicture *dst, const AVPicture *src,\n                    enum AVPixelFormat pix_fmt, int top_band, int left_band);\n\n/**\n * @deprecated unused\n */\nattribute_deprecated\nint av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt,\n            int padtop, int padbottom, int padleft, int padright, int *color);\n\n/**\n * @}\n */\n#endif\n\n/**\n * @defgroup lavc_misc Utility functions\n * @ingroup libavc\n *\n * Miscellaneous utility functions related to both encoding and decoding\n * (or neither).\n * @{\n */\n\n/**\n * @defgroup lavc_misc_pixfmt Pixel formats\n *\n * Functions for working with pixel formats.\n * @{\n */\n\n/**\n * Utility function to access log2_chroma_w log2_chroma_h from\n * the pixel format AVPixFmtDescriptor.\n *\n * This function asserts that pix_fmt is valid. See av_pix_fmt_get_chroma_sub_sample\n * for one that returns a failure code and continues in case of invalid\n * pix_fmts.\n *\n * @param[in]  pix_fmt the pixel format\n * @param[out] h_shift store log2_chroma_w\n * @param[out] v_shift store log2_chroma_h\n *\n * @see av_pix_fmt_get_chroma_sub_sample\n */\n\nvoid avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift);\n\n/**\n * Return a value representing the fourCC code associated to the\n * pixel format pix_fmt, or 0 if no associated fourCC code can be\n * found.\n */\nunsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt);\n\n/**\n * @deprecated see av_get_pix_fmt_loss()\n */\nint avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt,\n                             int has_alpha);\n\n/**\n * Find the best pixel format to convert to given a certain source pixel\n * format.  When converting from one pixel format to another, information loss\n * may occur.  For example, when converting from RGB24 to GRAY, the color\n * information will be lost. Similarly, other losses occur when converting from\n * some formats to other formats. avcodec_find_best_pix_fmt_of_2() searches which of\n * the given pixel formats should be used to suffer the least amount of loss.\n * The pixel formats from which it chooses one, are determined by the\n * pix_fmt_list parameter.\n *\n *\n * @param[in] pix_fmt_list AV_PIX_FMT_NONE terminated array of pixel formats to choose from\n * @param[in] src_pix_fmt source pixel format\n * @param[in] has_alpha Whether the source pixel format alpha channel is used.\n * @param[out] loss_ptr Combination of flags informing you what kind of losses will occur.\n * @return The best pixel format to convert to or -1 if none was found.\n */\nenum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *pix_fmt_list,\n                                            enum AVPixelFormat src_pix_fmt,\n                                            int has_alpha, int *loss_ptr);\n\n/**\n * @deprecated see av_find_best_pix_fmt_of_2()\n */\nenum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,\n                                            enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);\n\nattribute_deprecated\n#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI\nenum AVPixelFormat avcodec_find_best_pix_fmt2(const enum AVPixelFormat *pix_fmt_list,\n                                              enum AVPixelFormat src_pix_fmt,\n                                              int has_alpha, int *loss_ptr);\n#else\nenum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,\n                                            enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);\n#endif\n\n\nenum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt);\n\n/**\n * @}\n */\n\n#if FF_API_SET_DIMENSIONS\n/**\n * @deprecated this function is not supposed to be used from outside of lavc\n */\nattribute_deprecated\nvoid avcodec_set_dimensions(AVCodecContext *s, int width, int height);\n#endif\n\n/**\n * Put a string representing the codec tag codec_tag in buf.\n *\n * @param buf       buffer to place codec tag in\n * @param buf_size size in bytes of buf\n * @param codec_tag codec tag to assign\n * @return the length of the string that would have been generated if\n * enough space had been available, excluding the trailing null\n */\nsize_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);\n\nvoid avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);\n\n/**\n * Return a name for the specified profile, if available.\n *\n * @param codec the codec that is searched for the given profile\n * @param profile the profile value for which a name is requested\n * @return A name for the profile if found, NULL otherwise.\n */\nconst char *av_get_profile_name(const AVCodec *codec, int profile);\n\nint avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);\nint avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);\n//FIXME func typedef\n\n/**\n * Fill AVFrame audio data and linesize pointers.\n *\n * The buffer buf must be a preallocated buffer with a size big enough\n * to contain the specified samples amount. The filled AVFrame data\n * pointers will point to this buffer.\n *\n * AVFrame extended_data channel pointers are allocated if necessary for\n * planar audio.\n *\n * @param frame       the AVFrame\n *                    frame->nb_samples must be set prior to calling the\n *                    function. This function fills in frame->data,\n *                    frame->extended_data, frame->linesize[0].\n * @param nb_channels channel count\n * @param sample_fmt  sample format\n * @param buf         buffer to use for frame data\n * @param buf_size    size of buffer\n * @param align       plane size sample alignment (0 = default)\n * @return            >=0 on success, negative error code on failure\n * @todo return the size in bytes required to store the samples in\n * case of success, at the next libavutil bump\n */\nint avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,\n                             enum AVSampleFormat sample_fmt, const uint8_t *buf,\n                             int buf_size, int align);\n\n/**\n * Reset the internal decoder state / flush internal buffers. Should be called\n * e.g. when seeking or when switching to a different stream.\n *\n * @note when refcounted frames are not used (i.e. avctx->refcounted_frames is 0),\n * this invalidates the frames previously returned from the decoder. When\n * refcounted frames are used, the decoder just releases any references it might\n * keep internally, but the caller's reference remains valid.\n */\nvoid avcodec_flush_buffers(AVCodecContext *avctx);\n\n/**\n * Return codec bits per sample.\n *\n * @param[in] codec_id the codec\n * @return Number of bits per sample or zero if unknown for the given codec.\n */\nint av_get_bits_per_sample(enum AVCodecID codec_id);\n\n/**\n * Return the PCM codec associated with a sample format.\n * @param be  endianness, 0 for little, 1 for big,\n *            -1 (or anything else) for native\n * @return  AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE\n */\nenum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be);\n\n/**\n * Return codec bits per sample.\n * Only return non-zero if the bits per sample is exactly correct, not an\n * approximation.\n *\n * @param[in] codec_id the codec\n * @return Number of bits per sample or zero if unknown for the given codec.\n */\nint av_get_exact_bits_per_sample(enum AVCodecID codec_id);\n\n/**\n * Return audio frame duration.\n *\n * @param avctx        codec context\n * @param frame_bytes  size of the frame, or 0 if unknown\n * @return             frame duration, in samples, if known. 0 if not able to\n *                     determine.\n */\nint av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes);\n\n\ntypedef struct AVBitStreamFilterContext {\n    void *priv_data;\n    struct AVBitStreamFilter *filter;\n    AVCodecParserContext *parser;\n    struct AVBitStreamFilterContext *next;\n    /**\n     * Internal default arguments, used if NULL is passed to av_bitstream_filter_filter().\n     * Not for access by library users.\n     */\n    char *args;\n} AVBitStreamFilterContext;\n\n\ntypedef struct AVBitStreamFilter {\n    const char *name;\n    int priv_data_size;\n    int (*filter)(AVBitStreamFilterContext *bsfc,\n                  AVCodecContext *avctx, const char *args,\n                  uint8_t **poutbuf, int *poutbuf_size,\n                  const uint8_t *buf, int buf_size, int keyframe);\n    void (*close)(AVBitStreamFilterContext *bsfc);\n    struct AVBitStreamFilter *next;\n} AVBitStreamFilter;\n\n/**\n * Register a bitstream filter.\n *\n * The filter will be accessible to the application code through\n * av_bitstream_filter_next() or can be directly initialized with\n * av_bitstream_filter_init().\n *\n * @see avcodec_register_all()\n */\nvoid av_register_bitstream_filter(AVBitStreamFilter *bsf);\n\n/**\n * Create and initialize a bitstream filter context given a bitstream\n * filter name.\n *\n * The returned context must be freed with av_bitstream_filter_close().\n *\n * @param name    the name of the bitstream filter\n * @return a bitstream filter context if a matching filter was found\n * and successfully initialized, NULL otherwise\n */\nAVBitStreamFilterContext *av_bitstream_filter_init(const char *name);\n\n/**\n * Filter bitstream.\n *\n * This function filters the buffer buf with size buf_size, and places the\n * filtered buffer in the buffer pointed to by poutbuf.\n *\n * The output buffer must be freed by the caller.\n *\n * @param bsfc            bitstream filter context created by av_bitstream_filter_init()\n * @param avctx           AVCodecContext accessed by the filter, may be NULL.\n *                        If specified, this must point to the encoder context of the\n *                        output stream the packet is sent to.\n * @param args            arguments which specify the filter configuration, may be NULL\n * @param poutbuf         pointer which is updated to point to the filtered buffer\n * @param poutbuf_size    pointer which is updated to the filtered buffer size in bytes\n * @param buf             buffer containing the data to filter\n * @param buf_size        size in bytes of buf\n * @param keyframe        set to non-zero if the buffer to filter corresponds to a key-frame packet data\n * @return >= 0 in case of success, or a negative error code in case of failure\n *\n * If the return value is positive, an output buffer is allocated and\n * is available in *poutbuf, and is distinct from the input buffer.\n *\n * If the return value is 0, the output buffer is not allocated and\n * should be considered identical to the input buffer, or in case\n * *poutbuf was set it points to the input buffer (not necessarily to\n * its starting address).\n */\nint av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,\n                               AVCodecContext *avctx, const char *args,\n                               uint8_t **poutbuf, int *poutbuf_size,\n                               const uint8_t *buf, int buf_size, int keyframe);\n\n/**\n * Release bitstream filter context.\n *\n * @param bsf the bitstream filter context created with\n * av_bitstream_filter_init(), can be NULL\n */\nvoid av_bitstream_filter_close(AVBitStreamFilterContext *bsf);\n\n/**\n * If f is NULL, return the first registered bitstream filter,\n * if f is non-NULL, return the next registered bitstream filter\n * after f, or NULL if f is the last one.\n *\n * This function can be used to iterate over all registered bitstream\n * filters.\n */\nAVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f);\n\n/* memory */\n\n/**\n * Same behaviour av_fast_malloc but the buffer has additional\n * AV_INPUT_BUFFER_PADDING_SIZE at the end which will always be 0.\n *\n * In addition the whole buffer will initially and after resizes\n * be 0-initialized so that no uninitialized data will ever appear.\n */\nvoid av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);\n\n/**\n * Same behaviour av_fast_padded_malloc except that buffer will always\n * be 0-initialized after call.\n */\nvoid av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);\n\n/**\n * Encode extradata length to a buffer. Used by xiph codecs.\n *\n * @param s buffer to write to; must be at least (v/255+1) bytes long\n * @param v size of extradata in bytes\n * @return number of bytes written to the buffer.\n */\nunsigned int av_xiphlacing(unsigned char *s, unsigned int v);\n\n#if FF_API_MISSING_SAMPLE\n/**\n * Log a generic warning message about a missing feature. This function is\n * intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)\n * only, and would normally not be used by applications.\n * @param[in] avc a pointer to an arbitrary struct of which the first field is\n * a pointer to an AVClass struct\n * @param[in] feature string containing the name of the missing feature\n * @param[in] want_sample indicates if samples are wanted which exhibit this feature.\n * If want_sample is non-zero, additional verbage will be added to the log\n * message which tells the user how to report samples to the development\n * mailing list.\n * @deprecated Use avpriv_report_missing_feature() instead.\n */\nattribute_deprecated\nvoid av_log_missing_feature(void *avc, const char *feature, int want_sample);\n\n/**\n * Log a generic warning message asking for a sample. This function is\n * intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)\n * only, and would normally not be used by applications.\n * @param[in] avc a pointer to an arbitrary struct of which the first field is\n * a pointer to an AVClass struct\n * @param[in] msg string containing an optional message, or NULL if no message\n * @deprecated Use avpriv_request_sample() instead.\n */\nattribute_deprecated\nvoid av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3);\n#endif /* FF_API_MISSING_SAMPLE */\n\n/**\n * Register the hardware accelerator hwaccel.\n */\nvoid av_register_hwaccel(AVHWAccel *hwaccel);\n\n/**\n * If hwaccel is NULL, returns the first registered hardware accelerator,\n * if hwaccel is non-NULL, returns the next registered hardware accelerator\n * after hwaccel, or NULL if hwaccel is the last one.\n */\nAVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel);\n\n\n/**\n * Lock operation used by lockmgr\n */\nenum AVLockOp {\n  AV_LOCK_CREATE,  ///< Create a mutex\n  AV_LOCK_OBTAIN,  ///< Lock the mutex\n  AV_LOCK_RELEASE, ///< Unlock the mutex\n  AV_LOCK_DESTROY, ///< Free mutex resources\n};\n\n/**\n * Register a user provided lock manager supporting the operations\n * specified by AVLockOp. The \"mutex\" argument to the function points\n * to a (void *) where the lockmgr should store/get a pointer to a user\n * allocated mutex. It is NULL upon AV_LOCK_CREATE and equal to the\n * value left by the last call for all other ops. If the lock manager is\n * unable to perform the op then it should leave the mutex in the same\n * state as when it was called and return a non-zero value. However,\n * when called with AV_LOCK_DESTROY the mutex will always be assumed to\n * have been successfully destroyed. If av_lockmgr_register succeeds\n * it will return a non-negative value, if it fails it will return a\n * negative value and destroy all mutex and unregister all callbacks.\n * av_lockmgr_register is not thread-safe, it must be called from a\n * single thread before any calls which make use of locking are used.\n *\n * @param cb User defined callback. av_lockmgr_register invokes calls\n *           to this callback and the previously registered callback.\n *           The callback will be used to create more than one mutex\n *           each of which must be backed by its own underlying locking\n *           mechanism (i.e. do not use a single static object to\n *           implement your lock manager). If cb is set to NULL the\n *           lockmgr will be unregistered.\n */\nint av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));\n\n/**\n * Get the type of the given codec.\n */\nenum AVMediaType avcodec_get_type(enum AVCodecID codec_id);\n\n/**\n * Get the name of a codec.\n * @return  a static string identifying the codec; never NULL\n */\nconst char *avcodec_get_name(enum AVCodecID id);\n\n/**\n * @return a positive value if s is open (i.e. avcodec_open2() was called on it\n * with no corresponding avcodec_close()), 0 otherwise.\n */\nint avcodec_is_open(AVCodecContext *s);\n\n/**\n * @return a non-zero number if codec is an encoder, zero otherwise\n */\nint av_codec_is_encoder(const AVCodec *codec);\n\n/**\n * @return a non-zero number if codec is a decoder, zero otherwise\n */\nint av_codec_is_decoder(const AVCodec *codec);\n\n/**\n * @return descriptor for given codec ID or NULL if no descriptor exists.\n */\nconst AVCodecDescriptor *avcodec_descriptor_get(enum AVCodecID id);\n\n/**\n * Iterate over all codec descriptors known to libavcodec.\n *\n * @param prev previous descriptor. NULL to get the first descriptor.\n *\n * @return next descriptor or NULL after the last descriptor\n */\nconst AVCodecDescriptor *avcodec_descriptor_next(const AVCodecDescriptor *prev);\n\n/**\n * @return codec descriptor with the given name or NULL if no such descriptor\n *         exists.\n */\nconst AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name);\n\n/**\n * Allocate a CPB properties structure and initialize its fields to default\n * values.\n *\n * @param size if non-NULL, the size of the allocated struct will be written\n *             here. This is useful for embedding it in side data.\n *\n * @return the newly allocated struct or NULL on failure\n */\nAVCPBProperties *av_cpb_properties_alloc(size_t *size);\n\n/**\n * @}\n */\n\n#endif /* AVCODEC_AVCODEC_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/avdct.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_AVDCT_H\n#define AVCODEC_AVDCT_H\n\n#include \"libavutil/opt.h\"\n\n/**\n * AVDCT context.\n * @note function pointers can be NULL if the specific features have been\n *       disabled at build time.\n */\ntypedef struct AVDCT {\n    const AVClass *av_class;\n\n    void (*idct)(int16_t *block /* align 16 */);\n\n    /**\n     * IDCT input permutation.\n     * Several optimized IDCTs need a permutated input (relative to the\n     * normal order of the reference IDCT).\n     * This permutation must be performed before the idct_put/add.\n     * Note, normally this can be merged with the zigzag/alternate scan<br>\n     * An example to avoid confusion:\n     * - (->decode coeffs -> zigzag reorder -> dequant -> reference IDCT -> ...)\n     * - (x -> reference DCT -> reference IDCT -> x)\n     * - (x -> reference DCT -> simple_mmx_perm = idct_permutation\n     *    -> simple_idct_mmx -> x)\n     * - (-> decode coeffs -> zigzag reorder -> simple_mmx_perm -> dequant\n     *    -> simple_idct_mmx -> ...)\n     */\n    uint8_t idct_permutation[64];\n\n    void (*fdct)(int16_t *block /* align 16 */);\n\n\n    /**\n     * DCT algorithm.\n     * must use AVOptions to set this field.\n     */\n    int dct_algo;\n\n    /**\n     * IDCT algorithm.\n     * must use AVOptions to set this field.\n     */\n    int idct_algo;\n\n    void (*get_pixels)(int16_t *block /* align 16 */,\n                       const uint8_t *pixels /* align 8 */,\n                       ptrdiff_t line_size);\n\n    int bits_per_sample;\n} AVDCT;\n\n/**\n * Allocates a AVDCT context.\n * This needs to be initialized with avcodec_dct_init() after optionally\n * configuring it with AVOptions.\n *\n * To free it use av_free()\n */\nAVDCT *avcodec_dct_alloc(void);\nint avcodec_dct_init(AVDCT *);\n\nconst AVClass *avcodec_dct_get_class(void);\n\n#endif /* AVCODEC_AVDCT_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/avfft.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_AVFFT_H\n#define AVCODEC_AVFFT_H\n\n/**\n * @file\n * @ingroup lavc_fft\n * FFT functions\n */\n\n/**\n * @defgroup lavc_fft FFT functions\n * @ingroup lavc_misc\n *\n * @{\n */\n\ntypedef float FFTSample;\n\ntypedef struct FFTComplex {\n    FFTSample re, im;\n} FFTComplex;\n\ntypedef struct FFTContext FFTContext;\n\n/**\n * Set up a complex FFT.\n * @param nbits           log2 of the length of the input array\n * @param inverse         if 0 perform the forward transform, if 1 perform the inverse\n */\nFFTContext *av_fft_init(int nbits, int inverse);\n\n/**\n * Do the permutation needed BEFORE calling ff_fft_calc().\n */\nvoid av_fft_permute(FFTContext *s, FFTComplex *z);\n\n/**\n * Do a complex FFT with the parameters defined in av_fft_init(). The\n * input data must be permuted before. No 1.0/sqrt(n) normalization is done.\n */\nvoid av_fft_calc(FFTContext *s, FFTComplex *z);\n\nvoid av_fft_end(FFTContext *s);\n\nFFTContext *av_mdct_init(int nbits, int inverse, double scale);\nvoid av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);\nvoid av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);\nvoid av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);\nvoid av_mdct_end(FFTContext *s);\n\n/* Real Discrete Fourier Transform */\n\nenum RDFTransformType {\n    DFT_R2C,\n    IDFT_C2R,\n    IDFT_R2C,\n    DFT_C2R,\n};\n\ntypedef struct RDFTContext RDFTContext;\n\n/**\n * Set up a real FFT.\n * @param nbits           log2 of the length of the input array\n * @param trans           the type of transform\n */\nRDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);\nvoid av_rdft_calc(RDFTContext *s, FFTSample *data);\nvoid av_rdft_end(RDFTContext *s);\n\n/* Discrete Cosine Transform */\n\ntypedef struct DCTContext DCTContext;\n\nenum DCTTransformType {\n    DCT_II = 0,\n    DCT_III,\n    DCT_I,\n    DST_I,\n};\n\n/**\n * Set up DCT.\n *\n * @param nbits           size of the input array:\n *                        (1 << nbits)     for DCT-II, DCT-III and DST-I\n *                        (1 << nbits) + 1 for DCT-I\n * @param type            the type of transform\n *\n * @note the first element of the input of DST-I is ignored\n */\nDCTContext *av_dct_init(int nbits, enum DCTTransformType type);\nvoid av_dct_calc(DCTContext *s, FFTSample *data);\nvoid av_dct_end (DCTContext *s);\n\n/**\n * @}\n */\n\n#endif /* AVCODEC_AVFFT_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/d3d11va.h",
    "content": "/*\n * Direct3D11 HW acceleration\n *\n * copyright (c) 2009 Laurent Aimar\n * copyright (c) 2015 Steve Lhomme\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_D3D11VA_H\n#define AVCODEC_D3D11VA_H\n\n/**\n * @file\n * @ingroup lavc_codec_hwaccel_d3d11va\n * Public libavcodec D3D11VA header.\n */\n\n#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602\n#undef _WIN32_WINNT\n#define _WIN32_WINNT 0x0602\n#endif\n\n#include <stdint.h>\n#include <d3d11.h>\n\n/**\n * @defgroup lavc_codec_hwaccel_d3d11va Direct3D11\n * @ingroup lavc_codec_hwaccel\n *\n * @{\n */\n\n#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for Direct3D11 and old UVD/UVD+ ATI video cards\n#define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO    2 ///< Work around for Direct3D11 and old Intel GPUs with ClearVideo interface\n\n/**\n * This structure is used to provides the necessary configurations and data\n * to the Direct3D11 FFmpeg HWAccel implementation.\n *\n * The application must make it available as AVCodecContext.hwaccel_context.\n *\n * Use av_d3d11va_alloc_context() exclusively to allocate an AVD3D11VAContext.\n */\ntypedef struct AVD3D11VAContext {\n    /**\n     * D3D11 decoder object\n     */\n    ID3D11VideoDecoder *decoder;\n\n    /**\n      * D3D11 VideoContext\n      */\n    ID3D11VideoContext *video_context;\n\n    /**\n     * D3D11 configuration used to create the decoder\n     */\n    D3D11_VIDEO_DECODER_CONFIG *cfg;\n\n    /**\n     * The number of surface in the surface array\n     */\n    unsigned surface_count;\n\n    /**\n     * The array of Direct3D surfaces used to create the decoder\n     */\n    ID3D11VideoDecoderOutputView **surface;\n\n    /**\n     * A bit field configuring the workarounds needed for using the decoder\n     */\n    uint64_t workaround;\n\n    /**\n     * Private to the FFmpeg AVHWAccel implementation\n     */\n    unsigned report_id;\n\n    /**\n      * Mutex to access video_context\n      */\n    HANDLE  context_mutex;\n} AVD3D11VAContext;\n\n/**\n * Allocate an AVD3D11VAContext.\n *\n * @return Newly-allocated AVD3D11VAContext or NULL on failure.\n */\nAVD3D11VAContext *av_d3d11va_alloc_context(void);\n\n/**\n * @}\n */\n\n#endif /* AVCODEC_D3D11VA_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/dirac.h",
    "content": "/*\n * Copyright (C) 2007 Marco Gerards <marco@gnu.org>\n * Copyright (C) 2009 David Conrad\n * Copyright (C) 2011 Jordi Ortiz\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_DIRAC_H\n#define AVCODEC_DIRAC_H\n\n/**\n * @file\n * Interface to Dirac Decoder/Encoder\n * @author Marco Gerards <marco@gnu.org>\n * @author David Conrad\n * @author Jordi Ortiz\n */\n\n#include \"avcodec.h\"\n\n/**\n * Parse code values:\n *\n * Dirac Specification ->\n * 9.6.1  Table 9.1\n *\n * VC-2 Specification  ->\n * 10.4.1 Table 10.1\n */\n\nenum DiracParseCodes {\n    DIRAC_PCODE_SEQ_HEADER      = 0x00,\n    DIRAC_PCODE_END_SEQ         = 0x10,\n    DIRAC_PCODE_AUX             = 0x20,\n    DIRAC_PCODE_PAD             = 0x30,\n    DIRAC_PCODE_PICTURE_CODED   = 0x08,\n    DIRAC_PCODE_PICTURE_RAW     = 0x48,\n    DIRAC_PCODE_PICTURE_LOW_DEL = 0xC8,\n    DIRAC_PCODE_PICTURE_HQ      = 0xE8,\n    DIRAC_PCODE_MAGIC           = 0x42424344,\n};\n\ntypedef struct DiracVersionInfo {\n    int major;\n    int minor;\n} DiracVersionInfo;\n\ntypedef struct AVDiracSeqHeader {\n    unsigned width;\n    unsigned height;\n    uint8_t chroma_format;          ///< 0: 444  1: 422  2: 420\n\n    uint8_t interlaced;\n    uint8_t top_field_first;\n\n    uint8_t frame_rate_index;       ///< index into dirac_frame_rate[]\n    uint8_t aspect_ratio_index;     ///< index into dirac_aspect_ratio[]\n\n    uint16_t clean_width;\n    uint16_t clean_height;\n    uint16_t clean_left_offset;\n    uint16_t clean_right_offset;\n\n    uint8_t pixel_range_index;      ///< index into dirac_pixel_range_presets[]\n    uint8_t color_spec_index;       ///< index into dirac_color_spec_presets[]\n\n    int profile;\n    int level;\n\n    AVRational framerate;\n    AVRational sample_aspect_ratio;\n\n    enum AVPixelFormat pix_fmt;\n    enum AVColorRange color_range;\n    enum AVColorPrimaries color_primaries;\n    enum AVColorTransferCharacteristic color_trc;\n    enum AVColorSpace colorspace;\n\n    DiracVersionInfo version;\n    int bit_depth;\n} AVDiracSeqHeader;\n\n/**\n * Parse a Dirac sequence header.\n *\n * @param dsh this function will allocate and fill an AVDiracSeqHeader struct\n *            and write it into this pointer. The caller must free it with\n *            av_free().\n * @param buf the data buffer\n * @param buf_size the size of the data buffer in bytes\n * @param log_ctx if non-NULL, this function will log errors here\n * @return 0 on success, a negative AVERROR code on failure\n */\nint av_dirac_parse_sequence_header(AVDiracSeqHeader **dsh,\n                                   const uint8_t *buf, size_t buf_size,\n                                   void *log_ctx);\n\n#endif /* AVCODEC_DIRAC_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/dv_profile.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_DV_PROFILE_H\n#define AVCODEC_DV_PROFILE_H\n\n#include <stdint.h>\n\n#include \"libavutil/pixfmt.h\"\n#include \"libavutil/rational.h\"\n#include \"avcodec.h\"\n\n/* minimum number of bytes to read from a DV stream in order to\n * determine the profile */\n#define DV_PROFILE_BYTES (6 * 80) /* 6 DIF blocks */\n\n\n/*\n * AVDVProfile is used to express the differences between various\n * DV flavors. For now it's primarily used for differentiating\n * 525/60 and 625/50, but the plans are to use it for various\n * DV specs as well (e.g. SMPTE314M vs. IEC 61834).\n */\ntypedef struct AVDVProfile {\n    int              dsf;                   /* value of the dsf in the DV header */\n    int              video_stype;           /* stype for VAUX source pack */\n    int              frame_size;            /* total size of one frame in bytes */\n    int              difseg_size;           /* number of DIF segments per DIF channel */\n    int              n_difchan;             /* number of DIF channels per frame */\n    AVRational       time_base;             /* 1/framerate */\n    int              ltc_divisor;           /* FPS from the LTS standpoint */\n    int              height;                /* picture height in pixels */\n    int              width;                 /* picture width in pixels */\n    AVRational       sar[2];                /* sample aspect ratios for 4:3 and 16:9 */\n    enum AVPixelFormat pix_fmt;             /* picture pixel format */\n    int              bpm;                   /* blocks per macroblock */\n    const uint8_t   *block_sizes;           /* AC block sizes, in bits */\n    int              audio_stride;          /* size of audio_shuffle table */\n    int              audio_min_samples[3];  /* min amount of audio samples */\n                                            /* for 48kHz, 44.1kHz and 32kHz */\n    int              audio_samples_dist[5]; /* how many samples are supposed to be */\n                                            /* in each frame in a 5 frames window */\n    const uint8_t  (*audio_shuffle)[9];     /* PCM shuffling table */\n} AVDVProfile;\n\n/**\n * Get a DV profile for the provided compressed frame.\n *\n * @param sys the profile used for the previous frame, may be NULL\n * @param frame the compressed data buffer\n * @param buf_size size of the buffer in bytes\n * @return the DV profile for the supplied data or NULL on failure\n */\nconst AVDVProfile *av_dv_frame_profile(const AVDVProfile *sys,\n                                       const uint8_t *frame, unsigned buf_size);\n\n/**\n * Get a DV profile for the provided stream parameters.\n */\nconst AVDVProfile *av_dv_codec_profile(int width, int height, enum AVPixelFormat pix_fmt);\n\n/**\n * Get a DV profile for the provided stream parameters.\n * The frame rate is used as a best-effort parameter.\n */\nconst AVDVProfile *av_dv_codec_profile2(int width, int height, enum AVPixelFormat pix_fmt, AVRational frame_rate);\n\n#endif /* AVCODEC_DV_PROFILE_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/dxva2.h",
    "content": "/*\n * DXVA2 HW acceleration\n *\n * copyright (c) 2009 Laurent Aimar\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_DXVA_H\n#define AVCODEC_DXVA_H\n\n/**\n * @file\n * @ingroup lavc_codec_hwaccel_dxva2\n * Public libavcodec DXVA2 header.\n */\n\n#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602\n#undef _WIN32_WINNT\n#define _WIN32_WINNT 0x0602\n#endif\n\n#include <stdint.h>\n#include <d3d9.h>\n#include <dxva2api.h>\n\n/**\n * @defgroup lavc_codec_hwaccel_dxva2 DXVA2\n * @ingroup lavc_codec_hwaccel\n *\n * @{\n */\n\n#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards\n#define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO    2 ///< Work around for DXVA2 and old Intel GPUs with ClearVideo interface\n\n/**\n * This structure is used to provides the necessary configurations and data\n * to the DXVA2 FFmpeg HWAccel implementation.\n *\n * The application must make it available as AVCodecContext.hwaccel_context.\n */\nstruct dxva_context {\n    /**\n     * DXVA2 decoder object\n     */\n    IDirectXVideoDecoder *decoder;\n\n    /**\n     * DXVA2 configuration used to create the decoder\n     */\n    const DXVA2_ConfigPictureDecode *cfg;\n\n    /**\n     * The number of surface in the surface array\n     */\n    unsigned surface_count;\n\n    /**\n     * The array of Direct3D surfaces used to create the decoder\n     */\n    LPDIRECT3DSURFACE9 *surface;\n\n    /**\n     * A bit field configuring the workarounds needed for using the decoder\n     */\n    uint64_t workaround;\n\n    /**\n     * Private to the FFmpeg AVHWAccel implementation\n     */\n    unsigned report_id;\n};\n\n/**\n * @}\n */\n\n#endif /* AVCODEC_DXVA_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/qsv.h",
    "content": "/*\n * Intel MediaSDK QSV public API\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_QSV_H\n#define AVCODEC_QSV_H\n\n#include <mfx/mfxvideo.h>\n\n#include \"libavutil/buffer.h\"\n\n/**\n * This struct is used for communicating QSV parameters between libavcodec and\n * the caller. It is managed by the caller and must be assigned to\n * AVCodecContext.hwaccel_context.\n * - decoding: hwaccel_context must be set on return from the get_format()\n *             callback\n * - encoding: hwaccel_context must be set before avcodec_open2()\n */\ntypedef struct AVQSVContext {\n    /**\n     * If non-NULL, the session to use for encoding or decoding.\n     * Otherwise, libavcodec will try to create an internal session.\n     */\n    mfxSession session;\n\n    /**\n     * The IO pattern to use.\n     */\n    int iopattern;\n\n    /**\n     * Extra buffers to pass to encoder or decoder initialization.\n     */\n    mfxExtBuffer **ext_buffers;\n    int         nb_ext_buffers;\n\n    /**\n     * Encoding only. If this field is set to non-zero by the caller, libavcodec\n     * will create an mfxExtOpaqueSurfaceAlloc extended buffer and pass it to\n     * the encoder initialization. This only makes sense if iopattern is also\n     * set to MFX_IOPATTERN_IN_OPAQUE_MEMORY.\n     *\n     * The number of allocated opaque surfaces will be the sum of the number\n     * required by the encoder and the user-provided value nb_opaque_surfaces.\n     * The array of the opaque surfaces will be exported to the caller through\n     * the opaque_surfaces field.\n     */\n    int opaque_alloc;\n\n    /**\n     * Encoding only, and only if opaque_alloc is set to non-zero. Before\n     * calling avcodec_open2(), the caller should set this field to the number\n     * of extra opaque surfaces to allocate beyond what is required by the\n     * encoder.\n     *\n     * On return from avcodec_open2(), this field will be set by libavcodec to\n     * the total number of allocated opaque surfaces.\n     */\n    int nb_opaque_surfaces;\n\n    /**\n     * Encoding only, and only if opaque_alloc is set to non-zero. On return\n     * from avcodec_open2(), this field will be used by libavcodec to export the\n     * array of the allocated opaque surfaces to the caller, so they can be\n     * passed to other parts of the pipeline.\n     *\n     * The buffer reference exported here is owned and managed by libavcodec,\n     * the callers should make their own reference with av_buffer_ref() and free\n     * it with av_buffer_unref() when it is no longer needed.\n     *\n     * The buffer data is an nb_opaque_surfaces-sized array of mfxFrameSurface1.\n     */\n    AVBufferRef *opaque_surfaces;\n\n    /**\n     * Encoding only, and only if opaque_alloc is set to non-zero. On return\n     * from avcodec_open2(), this field will be set to the surface type used in\n     * the opaque allocation request.\n     */\n    int opaque_alloc_type;\n} AVQSVContext;\n\n/**\n * Allocate a new context.\n *\n * It must be freed by the caller with av_free().\n */\nAVQSVContext *av_qsv_alloc_context(void);\n\n#endif /* AVCODEC_QSV_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/vaapi.h",
    "content": "/*\n * Video Acceleration API (shared data between FFmpeg and the video player)\n * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1\n *\n * Copyright (C) 2008-2009 Splitted-Desktop Systems\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_VAAPI_H\n#define AVCODEC_VAAPI_H\n\n/**\n * @file\n * @ingroup lavc_codec_hwaccel_vaapi\n * Public libavcodec VA API header.\n */\n\n#include <stdint.h>\n#include \"libavutil/attributes.h\"\n#include \"version.h\"\n\n/**\n * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding\n * @ingroup lavc_codec_hwaccel\n * @{\n */\n\n/**\n * This structure is used to share data between the FFmpeg library and\n * the client video application.\n * This shall be zero-allocated and available as\n * AVCodecContext.hwaccel_context. All user members can be set once\n * during initialization or through each AVCodecContext.get_buffer()\n * function call. In any case, they must be valid prior to calling\n * decoding functions.\n */\nstruct vaapi_context {\n    /**\n     * Window system dependent data\n     *\n     * - encoding: unused\n     * - decoding: Set by user\n     */\n    void *display;\n\n    /**\n     * Configuration ID\n     *\n     * - encoding: unused\n     * - decoding: Set by user\n     */\n    uint32_t config_id;\n\n    /**\n     * Context ID (video decode pipeline)\n     *\n     * - encoding: unused\n     * - decoding: Set by user\n     */\n    uint32_t context_id;\n\n#if FF_API_VAAPI_CONTEXT\n    /**\n     * VAPictureParameterBuffer ID\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    uint32_t pic_param_buf_id;\n\n    /**\n     * VAIQMatrixBuffer ID\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    uint32_t iq_matrix_buf_id;\n\n    /**\n     * VABitPlaneBuffer ID (for VC-1 decoding)\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    uint32_t bitplane_buf_id;\n\n    /**\n     * Slice parameter/data buffer IDs\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    uint32_t *slice_buf_ids;\n\n    /**\n     * Number of effective slice buffer IDs to send to the HW\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    unsigned int n_slice_buf_ids;\n\n    /**\n     * Size of pre-allocated slice_buf_ids\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    unsigned int slice_buf_ids_alloc;\n\n    /**\n     * Pointer to VASliceParameterBuffers\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    void *slice_params;\n\n    /**\n     * Size of a VASliceParameterBuffer element\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    unsigned int slice_param_size;\n\n    /**\n     * Size of pre-allocated slice_params\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    unsigned int slice_params_alloc;\n\n    /**\n     * Number of slices currently filled in\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    unsigned int slice_count;\n\n    /**\n     * Pointer to slice data buffer base\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    const uint8_t *slice_data;\n\n    /**\n     * Current size of slice data\n     *\n     * - encoding: unused\n     * - decoding: Set by libavcodec\n     */\n    attribute_deprecated\n    uint32_t slice_data_size;\n#endif\n};\n\n/* @} */\n\n#endif /* AVCODEC_VAAPI_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/vda.h",
    "content": "/*\n * VDA HW acceleration\n *\n * copyright (c) 2011 Sebastien Zwickert\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_VDA_H\n#define AVCODEC_VDA_H\n\n/**\n * @file\n * @ingroup lavc_codec_hwaccel_vda\n * Public libavcodec VDA header.\n */\n\n#include \"libavcodec/avcodec.h\"\n\n#include <stdint.h>\n\n// emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes\n// http://openradar.appspot.com/8026390\n#undef __GNUC_STDC_INLINE__\n\n#define Picture QuickdrawPicture\n#include <VideoDecodeAcceleration/VDADecoder.h>\n#undef Picture\n\n#include \"libavcodec/version.h\"\n\n// extra flags not defined in VDADecoder.h\nenum {\n    kVDADecodeInfo_Asynchronous = 1UL << 0,\n    kVDADecodeInfo_FrameDropped = 1UL << 1\n};\n\n/**\n * @defgroup lavc_codec_hwaccel_vda VDA\n * @ingroup lavc_codec_hwaccel\n *\n * @{\n */\n\n/**\n * This structure is used to provide the necessary configurations and data\n * to the VDA FFmpeg HWAccel implementation.\n *\n * The application must make it available as AVCodecContext.hwaccel_context.\n */\nstruct vda_context {\n    /**\n     * VDA decoder object.\n     *\n     * - encoding: unused\n     * - decoding: Set/Unset by libavcodec.\n     */\n    VDADecoder          decoder;\n\n    /**\n     * The Core Video pixel buffer that contains the current image data.\n     *\n     * encoding: unused\n     * decoding: Set by libavcodec. Unset by user.\n     */\n    CVPixelBufferRef    cv_buffer;\n\n    /**\n     * Use the hardware decoder in synchronous mode.\n     *\n     * encoding: unused\n     * decoding: Set by user.\n     */\n    int                 use_sync_decoding;\n\n    /**\n     * The frame width.\n     *\n     * - encoding: unused\n     * - decoding: Set/Unset by user.\n     */\n    int                 width;\n\n    /**\n     * The frame height.\n     *\n     * - encoding: unused\n     * - decoding: Set/Unset by user.\n     */\n    int                 height;\n\n    /**\n     * The frame format.\n     *\n     * - encoding: unused\n     * - decoding: Set/Unset by user.\n     */\n    int                 format;\n\n    /**\n     * The pixel format for output image buffers.\n     *\n     * - encoding: unused\n     * - decoding: Set/Unset by user.\n     */\n    OSType              cv_pix_fmt_type;\n\n    /**\n     * unused\n     */\n    uint8_t             *priv_bitstream;\n\n    /**\n     * unused\n     */\n    int                 priv_bitstream_size;\n\n    /**\n     * unused\n     */\n    int                 priv_allocated_size;\n\n    /**\n     * Use av_buffer to manage buffer.\n     * When the flag is set, the CVPixelBuffers returned by the decoder will\n     * be released automatically, so you have to retain them if necessary.\n     * Not setting this flag may cause memory leak.\n     *\n     * encoding: unused\n     * decoding: Set by user.\n     */\n    int                 use_ref_buffer;\n};\n\n/** Create the video decoder. */\nint ff_vda_create_decoder(struct vda_context *vda_ctx,\n                          uint8_t *extradata,\n                          int extradata_size);\n\n/** Destroy the video decoder. */\nint ff_vda_destroy_decoder(struct vda_context *vda_ctx);\n\n/**\n * This struct holds all the information that needs to be passed\n * between the caller and libavcodec for initializing VDA decoding.\n * Its size is not a part of the public ABI, it must be allocated with\n * av_vda_alloc_context() and freed with av_free().\n */\ntypedef struct AVVDAContext {\n    /**\n     * VDA decoder object. Created and freed by the caller.\n     */\n    VDADecoder decoder;\n\n    /**\n     * The output callback that must be passed to VDADecoderCreate.\n     * Set by av_vda_alloc_context().\n     */\n    VDADecoderOutputCallback output_callback;\n\n    /**\n     * CVPixelBuffer Format Type that VDA will use for decoded frames; set by\n     * the caller.\n     */\n    OSType cv_pix_fmt_type;\n} AVVDAContext;\n\n/**\n * Allocate and initialize a VDA context.\n *\n * This function should be called from the get_format() callback when the caller\n * selects the AV_PIX_FMT_VDA format. The caller must then create the decoder\n * object (using the output callback provided by libavcodec) that will be used\n * for VDA-accelerated decoding.\n *\n * When decoding with VDA is finished, the caller must destroy the decoder\n * object and free the VDA context using av_free().\n *\n * @return the newly allocated context or NULL on failure\n */\nAVVDAContext *av_vda_alloc_context(void);\n\n/**\n * This is a convenience function that creates and sets up the VDA context using\n * an internal implementation.\n *\n * @param avctx the corresponding codec context\n *\n * @return >= 0 on success, a negative AVERROR code on failure\n */\nint av_vda_default_init(AVCodecContext *avctx);\n\n/**\n * This is a convenience function that creates and sets up the VDA context using\n * an internal implementation.\n *\n * @param avctx the corresponding codec context\n * @param vdactx the VDA context to use\n *\n * @return >= 0 on success, a negative AVERROR code on failure\n */\nint av_vda_default_init2(AVCodecContext *avctx, AVVDAContext *vdactx);\n\n/**\n * This function must be called to free the VDA context initialized with\n * av_vda_default_init().\n *\n * @param avctx the corresponding codec context\n */\nvoid av_vda_default_free(AVCodecContext *avctx);\n\n/**\n * @}\n */\n\n#endif /* AVCODEC_VDA_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/vdpau.h",
    "content": "/*\n * The Video Decode and Presentation API for UNIX (VDPAU) is used for\n * hardware-accelerated decoding of MPEG-1/2, H.264 and VC-1.\n *\n * Copyright (C) 2008 NVIDIA\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_VDPAU_H\n#define AVCODEC_VDPAU_H\n\n/**\n * @file\n * @ingroup lavc_codec_hwaccel_vdpau\n * Public libavcodec VDPAU header.\n */\n\n\n/**\n * @defgroup lavc_codec_hwaccel_vdpau VDPAU Decoder and Renderer\n * @ingroup lavc_codec_hwaccel\n *\n * VDPAU hardware acceleration has two modules\n * - VDPAU decoding\n * - VDPAU presentation\n *\n * The VDPAU decoding module parses all headers using FFmpeg\n * parsing mechanisms and uses VDPAU for the actual decoding.\n *\n * As per the current implementation, the actual decoding\n * and rendering (API calls) are done as part of the VDPAU\n * presentation (vo_vdpau.c) module.\n *\n * @{\n */\n\n#include <vdpau/vdpau.h>\n#include <vdpau/vdpau_x11.h>\n#include \"libavutil/avconfig.h\"\n#include \"libavutil/attributes.h\"\n\n#include \"avcodec.h\"\n#include \"version.h\"\n\n#if FF_API_BUFS_VDPAU\nunion AVVDPAUPictureInfo {\n    VdpPictureInfoH264        h264;\n    VdpPictureInfoMPEG1Or2    mpeg;\n    VdpPictureInfoVC1          vc1;\n    VdpPictureInfoMPEG4Part2 mpeg4;\n};\n#endif\n\nstruct AVCodecContext;\nstruct AVFrame;\n\ntypedef int (*AVVDPAU_Render2)(struct AVCodecContext *, struct AVFrame *,\n                               const VdpPictureInfo *, uint32_t,\n                               const VdpBitstreamBuffer *);\n\n/**\n * This structure is used to share data between the libavcodec library and\n * the client video application.\n * The user shall allocate the structure via the av_alloc_vdpau_hwaccel\n * function and make it available as\n * AVCodecContext.hwaccel_context. Members can be set by the user once\n * during initialization or through each AVCodecContext.get_buffer()\n * function call. In any case, they must be valid prior to calling\n * decoding functions.\n *\n * The size of this structure is not a part of the public ABI and must not\n * be used outside of libavcodec. Use av_vdpau_alloc_context() to allocate an\n * AVVDPAUContext.\n */\ntypedef struct AVVDPAUContext {\n    /**\n     * VDPAU decoder handle\n     *\n     * Set by user.\n     */\n    VdpDecoder decoder;\n\n    /**\n     * VDPAU decoder render callback\n     *\n     * Set by the user.\n     */\n    VdpDecoderRender *render;\n\n#if FF_API_BUFS_VDPAU\n    /**\n     * VDPAU picture information\n     *\n     * Set by libavcodec.\n     */\n    attribute_deprecated\n    union AVVDPAUPictureInfo info;\n\n    /**\n     * Allocated size of the bitstream_buffers table.\n     *\n     * Set by libavcodec.\n     */\n    attribute_deprecated\n    int bitstream_buffers_allocated;\n\n    /**\n     * Useful bitstream buffers in the bitstream buffers table.\n     *\n     * Set by libavcodec.\n     */\n    attribute_deprecated\n    int bitstream_buffers_used;\n\n   /**\n     * Table of bitstream buffers.\n     * The user is responsible for freeing this buffer using av_freep().\n     *\n     * Set by libavcodec.\n     */\n    attribute_deprecated\n    VdpBitstreamBuffer *bitstream_buffers;\n#endif\n    AVVDPAU_Render2 render2;\n} AVVDPAUContext;\n\n/**\n * @brief allocation function for AVVDPAUContext\n *\n * Allows extending the struct without breaking API/ABI\n */\nAVVDPAUContext *av_alloc_vdpaucontext(void);\n\nAVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *);\nvoid av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);\n\n/**\n * Associate a VDPAU device with a codec context for hardware acceleration.\n * This function is meant to be called from the get_format() codec callback,\n * or earlier. It can also be called after avcodec_flush_buffers() to change\n * the underlying VDPAU device mid-stream (e.g. to recover from non-transparent\n * display preemption).\n *\n * @note get_format() must return AV_PIX_FMT_VDPAU if this function completes\n * successfully.\n *\n * @param avctx decoding context whose get_format() callback is invoked\n * @param device VDPAU device handle to use for hardware acceleration\n * @param get_proc_address VDPAU device driver\n * @param flags zero of more OR'd AV_HWACCEL_FLAG_* flags\n *\n * @return 0 on success, an AVERROR code on failure.\n */\nint av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,\n                          VdpGetProcAddress *get_proc_address, unsigned flags);\n\n/**\n * Gets the parameters to create an adequate VDPAU video surface for the codec\n * context using VDPAU hardware decoding acceleration.\n *\n * @note Behavior is undefined if the context was not successfully bound to a\n * VDPAU device using av_vdpau_bind_context().\n *\n * @param avctx the codec context being used for decoding the stream\n * @param type storage space for the VDPAU video surface chroma type\n *              (or NULL to ignore)\n * @param width storage space for the VDPAU video surface pixel width\n *              (or NULL to ignore)\n * @param height storage space for the VDPAU video surface pixel height\n *              (or NULL to ignore)\n *\n * @return 0 on success, a negative AVERROR code on failure.\n */\nint av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,\n                                    uint32_t *width, uint32_t *height);\n\n/**\n * Allocate an AVVDPAUContext.\n *\n * @return Newly-allocated AVVDPAUContext or NULL on failure.\n */\nAVVDPAUContext *av_vdpau_alloc_context(void);\n\n#if FF_API_VDPAU_PROFILE\n/**\n * Get a decoder profile that should be used for initializing a VDPAU decoder.\n * Should be called from the AVCodecContext.get_format() callback.\n *\n * @deprecated Use av_vdpau_bind_context() instead.\n *\n * @param avctx the codec context being used for decoding the stream\n * @param profile a pointer into which the result will be written on success.\n *                The contents of profile are undefined if this function returns\n *                an error.\n *\n * @return 0 on success (non-negative), a negative AVERROR on failure.\n */\nattribute_deprecated\nint av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile);\n#endif\n\n#if FF_API_CAP_VDPAU\n/** @brief The videoSurface is used for rendering. */\n#define FF_VDPAU_STATE_USED_FOR_RENDER 1\n\n/**\n * @brief The videoSurface is needed for reference/prediction.\n * The codec manipulates this.\n */\n#define FF_VDPAU_STATE_USED_FOR_REFERENCE 2\n\n/**\n * @brief This structure is used as a callback between the FFmpeg\n * decoder (vd_) and presentation (vo_) module.\n * This is used for defining a video frame containing surface,\n * picture parameter, bitstream information etc which are passed\n * between the FFmpeg decoder and its clients.\n */\nstruct vdpau_render_state {\n    VdpVideoSurface surface; ///< Used as rendered surface, never changed.\n\n    int state; ///< Holds FF_VDPAU_STATE_* values.\n\n    /** picture parameter information for all supported codecs */\n    union AVVDPAUPictureInfo info;\n\n    /** Describe size/location of the compressed video data.\n        Set to 0 when freeing bitstream_buffers. */\n    int bitstream_buffers_allocated;\n    int bitstream_buffers_used;\n    /** The user is responsible for freeing this buffer using av_freep(). */\n    VdpBitstreamBuffer *bitstream_buffers;\n};\n#endif\n\n/* @}*/\n\n#endif /* AVCODEC_VDPAU_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/version.h",
    "content": "/*\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_VERSION_H\n#define AVCODEC_VERSION_H\n\n/**\n * @file\n * @ingroup libavc\n * Libavcodec version macros.\n */\n\n#include \"libavutil/version.h\"\n\n#define LIBAVCODEC_VERSION_MAJOR  57\n#define LIBAVCODEC_VERSION_MINOR  20\n#define LIBAVCODEC_VERSION_MICRO 100\n\n#define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \\\n                                               LIBAVCODEC_VERSION_MINOR, \\\n                                               LIBAVCODEC_VERSION_MICRO)\n#define LIBAVCODEC_VERSION      AV_VERSION(LIBAVCODEC_VERSION_MAJOR,    \\\n                                           LIBAVCODEC_VERSION_MINOR,    \\\n                                           LIBAVCODEC_VERSION_MICRO)\n#define LIBAVCODEC_BUILD        LIBAVCODEC_VERSION_INT\n\n#define LIBAVCODEC_IDENT        \"Lavc\" AV_STRINGIFY(LIBAVCODEC_VERSION)\n\n/**\n * FF_API_* defines may be placed below to indicate public API that will be\n * dropped at a future version bump. The defines themselves are not part of\n * the public API and may change, break or disappear at any time.\n *\n * @note, when bumping the major version it is recommended to manually\n * disable each FF_API_* in its own commit instead of disabling them all\n * at once through the bump. This improves the git bisect-ability of the change.\n */\n\n#ifndef FF_API_VIMA_DECODER\n#define FF_API_VIMA_DECODER     (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_AUDIO_CONVERT\n#define FF_API_AUDIO_CONVERT     (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_AVCODEC_RESAMPLE\n#define FF_API_AVCODEC_RESAMPLE  FF_API_AUDIO_CONVERT\n#endif\n#ifndef FF_API_MISSING_SAMPLE\n#define FF_API_MISSING_SAMPLE    (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_LOWRES\n#define FF_API_LOWRES            (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_CAP_VDPAU\n#define FF_API_CAP_VDPAU         (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_BUFS_VDPAU\n#define FF_API_BUFS_VDPAU        (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_VOXWARE\n#define FF_API_VOXWARE           (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_SET_DIMENSIONS\n#define FF_API_SET_DIMENSIONS    (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_DEBUG_MV\n#define FF_API_DEBUG_MV          (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_AC_VLC\n#define FF_API_AC_VLC            (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_OLD_MSMPEG4\n#define FF_API_OLD_MSMPEG4       (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_ASPECT_EXTENDED\n#define FF_API_ASPECT_EXTENDED   (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_ARCH_ALPHA\n#define FF_API_ARCH_ALPHA        (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_XVMC\n#define FF_API_XVMC              (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_ERROR_RATE\n#define FF_API_ERROR_RATE        (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_QSCALE_TYPE\n#define FF_API_QSCALE_TYPE       (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_MB_TYPE\n#define FF_API_MB_TYPE           (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_MAX_BFRAMES\n#define FF_API_MAX_BFRAMES       (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_NEG_LINESIZES\n#define FF_API_NEG_LINESIZES     (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_EMU_EDGE\n#define FF_API_EMU_EDGE          (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_ARCH_SH4\n#define FF_API_ARCH_SH4          (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_ARCH_SPARC\n#define FF_API_ARCH_SPARC        (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_UNUSED_MEMBERS\n#define FF_API_UNUSED_MEMBERS    (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_IDCT_XVIDMMX\n#define FF_API_IDCT_XVIDMMX      (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_INPUT_PRESERVED\n#define FF_API_INPUT_PRESERVED   (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_NORMALIZE_AQP\n#define FF_API_NORMALIZE_AQP     (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_GMC\n#define FF_API_GMC               (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_MV0\n#define FF_API_MV0               (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_CODEC_NAME\n#define FF_API_CODEC_NAME        (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_AFD\n#define FF_API_AFD               (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_VISMV\n/* XXX: don't forget to drop the -vismv documentation */\n#define FF_API_VISMV             (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_AUDIOENC_DELAY\n#define FF_API_AUDIOENC_DELAY    (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_VAAPI_CONTEXT\n#define FF_API_VAAPI_CONTEXT     (LIBAVCODEC_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_AVCTX_TIMEBASE\n#define FF_API_AVCTX_TIMEBASE    (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_MPV_OPT\n#define FF_API_MPV_OPT           (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_STREAM_CODEC_TAG\n#define FF_API_STREAM_CODEC_TAG  (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_QUANT_BIAS\n#define FF_API_QUANT_BIAS        (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_RC_STRATEGY\n#define FF_API_RC_STRATEGY       (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_CODED_FRAME\n#define FF_API_CODED_FRAME       (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_MOTION_EST\n#define FF_API_MOTION_EST        (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_WITHOUT_PREFIX\n#define FF_API_WITHOUT_PREFIX    (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_SIDEDATA_ONLY_PKT\n#define FF_API_SIDEDATA_ONLY_PKT (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_VDPAU_PROFILE\n#define FF_API_VDPAU_PROFILE     (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_CONVERGENCE_DURATION\n#define FF_API_CONVERGENCE_DURATION (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_AVPICTURE\n#define FF_API_AVPICTURE         (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_AVPACKET_OLD_API\n#define FF_API_AVPACKET_OLD_API (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_RTP_CALLBACK\n#define FF_API_RTP_CALLBACK      (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_VBV_DELAY\n#define FF_API_VBV_DELAY         (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_CODER_TYPE\n#define FF_API_CODER_TYPE        (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n#ifndef FF_API_STAT_BITS\n#define FF_API_STAT_BITS         (LIBAVCODEC_VERSION_MAJOR < 59)\n#endif\n\n#endif /* AVCODEC_VERSION_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/videotoolbox.h",
    "content": "/*\n * Videotoolbox hardware acceleration\n *\n * copyright (c) 2012 Sebastien Zwickert\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_VIDEOTOOLBOX_H\n#define AVCODEC_VIDEOTOOLBOX_H\n\n/**\n * @file\n * @ingroup lavc_codec_hwaccel_videotoolbox\n * Public libavcodec Videotoolbox header.\n */\n\n#include <stdint.h>\n\n#define Picture QuickdrawPicture\n#include <VideoToolbox/VideoToolbox.h>\n#undef Picture\n\n#include \"libavcodec/avcodec.h\"\n\n/**\n * This struct holds all the information that needs to be passed\n * between the caller and libavcodec for initializing Videotoolbox decoding.\n * Its size is not a part of the public ABI, it must be allocated with\n * av_videotoolbox_alloc_context() and freed with av_free().\n */\ntypedef struct AVVideotoolboxContext {\n    /**\n     * Videotoolbox decompression session object.\n     * Created and freed the caller.\n     */\n    VTDecompressionSessionRef session;\n\n    /**\n     * The output callback that must be passed to the session.\n     * Set by av_videottoolbox_default_init()\n     */\n    VTDecompressionOutputCallback output_callback;\n\n    /**\n     * CVPixelBuffer Format Type that Videotoolbox will use for decoded frames.\n     * set by the caller.\n     */\n    OSType cv_pix_fmt_type;\n\n    /**\n     * CoreMedia Format Description that Videotoolbox will use to create the decompression session.\n     * Set by the caller.\n     */\n    CMVideoFormatDescriptionRef cm_fmt_desc;\n\n    /**\n     * CoreMedia codec type that Videotoolbox will use to create the decompression session.\n     * Set by the caller.\n     */\n    int cm_codec_type;\n} AVVideotoolboxContext;\n\n/**\n * Allocate and initialize a Videotoolbox context.\n *\n * This function should be called from the get_format() callback when the caller\n * selects the AV_PIX_FMT_VIDETOOLBOX format. The caller must then create\n * the decoder object (using the output callback provided by libavcodec) that\n * will be used for Videotoolbox-accelerated decoding.\n *\n * When decoding with Videotoolbox is finished, the caller must destroy the decoder\n * object and free the Videotoolbox context using av_free().\n *\n * @return the newly allocated context or NULL on failure\n */\nAVVideotoolboxContext *av_videotoolbox_alloc_context(void);\n\n/**\n * This is a convenience function that creates and sets up the Videotoolbox context using\n * an internal implementation.\n *\n * @param avctx the corresponding codec context\n *\n * @return >= 0 on success, a negative AVERROR code on failure\n */\nint av_videotoolbox_default_init(AVCodecContext *avctx);\n\n/**\n * This is a convenience function that creates and sets up the Videotoolbox context using\n * an internal implementation.\n *\n * @param avctx the corresponding codec context\n * @param vtctx the Videotoolbox context to use\n *\n * @return >= 0 on success, a negative AVERROR code on failure\n */\nint av_videotoolbox_default_init2(AVCodecContext *avctx, AVVideotoolboxContext *vtctx);\n\n/**\n * This function must be called to free the Videotoolbox context initialized with\n * av_videotoolbox_default_init().\n *\n * @param avctx the corresponding codec context\n */\nvoid av_videotoolbox_default_free(AVCodecContext *avctx);\n\n/**\n * @}\n */\n\n#endif /* AVCODEC_VIDEOTOOLBOX_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/vorbis_parser.h",
    "content": "/*\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * A public API for Vorbis parsing\n *\n * Determines the duration for each packet.\n */\n\n#ifndef AVCODEC_VORBIS_PARSE_H\n#define AVCODEC_VORBIS_PARSE_H\n\n#include <stdint.h>\n\ntypedef struct AVVorbisParseContext AVVorbisParseContext;\n\n/**\n * Allocate and initialize the Vorbis parser using headers in the extradata.\n *\n * @param avctx codec context\n * @param s     Vorbis parser context\n */\nAVVorbisParseContext *av_vorbis_parse_init(const uint8_t *extradata,\n                                           int extradata_size);\n\n/**\n * Free the parser and everything associated with it.\n */\nvoid av_vorbis_parse_free(AVVorbisParseContext **s);\n\n#define VORBIS_FLAG_HEADER  0x00000001\n#define VORBIS_FLAG_COMMENT 0x00000002\n#define VORBIS_FLAG_SETUP   0x00000004\n\n/**\n * Get the duration for a Vorbis packet.\n *\n * If @p flags is @c NULL,\n * special frames are considered invalid.\n *\n * @param s        Vorbis parser context\n * @param buf      buffer containing a Vorbis frame\n * @param buf_size size of the buffer\n * @param flags    flags for special frames\n */\nint av_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf,\n                                int buf_size, int *flags);\n\n/**\n * Get the duration for a Vorbis packet.\n *\n * @param s        Vorbis parser context\n * @param buf      buffer containing a Vorbis frame\n * @param buf_size size of the buffer\n */\nint av_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf,\n                          int buf_size);\n\nvoid av_vorbis_parse_reset(AVVorbisParseContext *s);\n\n#endif /* AVCODEC_VORBIS_PARSE_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavcodec/xvmc.h",
    "content": "/*\n * Copyright (C) 2003 Ivan Kalvachev\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVCODEC_XVMC_H\n#define AVCODEC_XVMC_H\n\n/**\n * @file\n * @ingroup lavc_codec_hwaccel_xvmc\n * Public libavcodec XvMC header.\n */\n\n#include <X11/extensions/XvMC.h>\n\n#include \"libavutil/attributes.h\"\n#include \"version.h\"\n#include \"avcodec.h\"\n\n/**\n * @defgroup lavc_codec_hwaccel_xvmc XvMC\n * @ingroup lavc_codec_hwaccel\n *\n * @{\n */\n\n#define AV_XVMC_ID                    0x1DC711C0  /**< special value to ensure that regular pixel routines haven't corrupted the struct\n                                                       the number is 1337 speak for the letters IDCT MCo (motion compensation) */\n\nstruct attribute_deprecated xvmc_pix_fmt {\n    /** The field contains the special constant value AV_XVMC_ID.\n        It is used as a test that the application correctly uses the API,\n        and that there is no corruption caused by pixel routines.\n        - application - set during initialization\n        - libavcodec  - unchanged\n    */\n    int             xvmc_id;\n\n    /** Pointer to the block array allocated by XvMCCreateBlocks().\n        The array has to be freed by XvMCDestroyBlocks().\n        Each group of 64 values represents one data block of differential\n        pixel information (in MoCo mode) or coefficients for IDCT.\n        - application - set the pointer during initialization\n        - libavcodec  - fills coefficients/pixel data into the array\n    */\n    short*          data_blocks;\n\n    /** Pointer to the macroblock description array allocated by\n        XvMCCreateMacroBlocks() and freed by XvMCDestroyMacroBlocks().\n        - application - set the pointer during initialization\n        - libavcodec  - fills description data into the array\n    */\n    XvMCMacroBlock* mv_blocks;\n\n    /** Number of macroblock descriptions that can be stored in the mv_blocks\n        array.\n        - application - set during initialization\n        - libavcodec  - unchanged\n    */\n    int             allocated_mv_blocks;\n\n    /** Number of blocks that can be stored at once in the data_blocks array.\n        - application - set during initialization\n        - libavcodec  - unchanged\n    */\n    int             allocated_data_blocks;\n\n    /** Indicate that the hardware would interpret data_blocks as IDCT\n        coefficients and perform IDCT on them.\n        - application - set during initialization\n        - libavcodec  - unchanged\n    */\n    int             idct;\n\n    /** In MoCo mode it indicates that intra macroblocks are assumed to be in\n        unsigned format; same as the XVMC_INTRA_UNSIGNED flag.\n        - application - set during initialization\n        - libavcodec  - unchanged\n    */\n    int             unsigned_intra;\n\n    /** Pointer to the surface allocated by XvMCCreateSurface().\n        It has to be freed by XvMCDestroySurface() on application exit.\n        It identifies the frame and its state on the video hardware.\n        - application - set during initialization\n        - libavcodec  - unchanged\n    */\n    XvMCSurface*    p_surface;\n\n/** Set by the decoder before calling ff_draw_horiz_band(),\n    needed by the XvMCRenderSurface function. */\n//@{\n    /** Pointer to the surface used as past reference\n        - application - unchanged\n        - libavcodec  - set\n    */\n    XvMCSurface*    p_past_surface;\n\n    /** Pointer to the surface used as future reference\n        - application - unchanged\n        - libavcodec  - set\n    */\n    XvMCSurface*    p_future_surface;\n\n    /** top/bottom field or frame\n        - application - unchanged\n        - libavcodec  - set\n    */\n    unsigned int    picture_structure;\n\n    /** XVMC_SECOND_FIELD - 1st or 2nd field in the sequence\n        - application - unchanged\n        - libavcodec  - set\n    */\n    unsigned int    flags;\n//}@\n\n    /** Number of macroblock descriptions in the mv_blocks array\n        that have already been passed to the hardware.\n        - application - zeroes it on get_buffer().\n                        A successful ff_draw_horiz_band() may increment it\n                        with filled_mb_block_num or zero both.\n        - libavcodec  - unchanged\n    */\n    int             start_mv_blocks_num;\n\n    /** Number of new macroblock descriptions in the mv_blocks array (after\n        start_mv_blocks_num) that are filled by libavcodec and have to be\n        passed to the hardware.\n        - application - zeroes it on get_buffer() or after successful\n                        ff_draw_horiz_band().\n        - libavcodec  - increment with one of each stored MB\n    */\n    int             filled_mv_blocks_num;\n\n    /** Number of the next free data block; one data block consists of\n        64 short values in the data_blocks array.\n        All blocks before this one have already been claimed by placing their\n        position into the corresponding block description structure field,\n        that are part of the mv_blocks array.\n        - application - zeroes it on get_buffer().\n                        A successful ff_draw_horiz_band() may zero it together\n                        with start_mb_blocks_num.\n        - libavcodec  - each decoded macroblock increases it by the number\n                        of coded blocks it contains.\n    */\n    int             next_free_data_block_num;\n};\n\n/**\n * @}\n */\n\n#endif /* AVCODEC_XVMC_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavdevice/avdevice.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVDEVICE_AVDEVICE_H\n#define AVDEVICE_AVDEVICE_H\n\n#include \"version.h\"\n\n/**\n * @file\n * @ingroup lavd\n * Main libavdevice API header\n */\n\n/**\n * @defgroup lavd Special devices muxing/demuxing library\n * @{\n * Libavdevice is a complementary library to @ref libavf \"libavformat\". It\n * provides various \"special\" platform-specific muxers and demuxers, e.g. for\n * grabbing devices, audio capture and playback etc. As a consequence, the\n * (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own\n * I/O functions). The filename passed to avformat_open_input() often does not\n * refer to an actually existing file, but has some special device-specific\n * meaning - e.g. for x11grab it is the display name.\n *\n * To use libavdevice, simply call avdevice_register_all() to register all\n * compiled muxers and demuxers. They all use standard libavformat API.\n * @}\n */\n\n#include \"libavutil/log.h\"\n#include \"libavutil/opt.h\"\n#include \"libavutil/dict.h\"\n#include \"libavformat/avformat.h\"\n\n/**\n * Return the LIBAVDEVICE_VERSION_INT constant.\n */\nunsigned avdevice_version(void);\n\n/**\n * Return the libavdevice build-time configuration.\n */\nconst char *avdevice_configuration(void);\n\n/**\n * Return the libavdevice license.\n */\nconst char *avdevice_license(void);\n\n/**\n * Initialize libavdevice and register all the input and output devices.\n * @warning This function is not thread safe.\n */\nvoid avdevice_register_all(void);\n\n/**\n * Audio input devices iterator.\n *\n * If d is NULL, returns the first registered input audio/video device,\n * if d is non-NULL, returns the next registered input audio/video device after d\n * or NULL if d is the last one.\n */\nAVInputFormat *av_input_audio_device_next(AVInputFormat  *d);\n\n/**\n * Video input devices iterator.\n *\n * If d is NULL, returns the first registered input audio/video device,\n * if d is non-NULL, returns the next registered input audio/video device after d\n * or NULL if d is the last one.\n */\nAVInputFormat *av_input_video_device_next(AVInputFormat  *d);\n\n/**\n * Audio output devices iterator.\n *\n * If d is NULL, returns the first registered output audio/video device,\n * if d is non-NULL, returns the next registered output audio/video device after d\n * or NULL if d is the last one.\n */\nAVOutputFormat *av_output_audio_device_next(AVOutputFormat *d);\n\n/**\n * Video output devices iterator.\n *\n * If d is NULL, returns the first registered output audio/video device,\n * if d is non-NULL, returns the next registered output audio/video device after d\n * or NULL if d is the last one.\n */\nAVOutputFormat *av_output_video_device_next(AVOutputFormat *d);\n\ntypedef struct AVDeviceRect {\n    int x;      /**< x coordinate of top left corner */\n    int y;      /**< y coordinate of top left corner */\n    int width;  /**< width */\n    int height; /**< height */\n} AVDeviceRect;\n\n/**\n * Message types used by avdevice_app_to_dev_control_message().\n */\nenum AVAppToDevMessageType {\n    /**\n     * Dummy message.\n     */\n    AV_APP_TO_DEV_NONE = MKBETAG('N','O','N','E'),\n\n    /**\n     * Window size change message.\n     *\n     * Message is sent to the device every time the application changes the size\n     * of the window device renders to.\n     * Message should also be sent right after window is created.\n     *\n     * data: AVDeviceRect: new window size.\n     */\n    AV_APP_TO_DEV_WINDOW_SIZE = MKBETAG('G','E','O','M'),\n\n    /**\n     * Repaint request message.\n     *\n     * Message is sent to the device when window has to be repainted.\n     *\n     * data: AVDeviceRect: area required to be repainted.\n     *       NULL: whole area is required to be repainted.\n     */\n    AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A'),\n\n    /**\n     * Request pause/play.\n     *\n     * Application requests pause/unpause playback.\n     * Mostly usable with devices that have internal buffer.\n     * By default devices are not paused.\n     *\n     * data: NULL\n     */\n    AV_APP_TO_DEV_PAUSE        = MKBETAG('P', 'A', 'U', ' '),\n    AV_APP_TO_DEV_PLAY         = MKBETAG('P', 'L', 'A', 'Y'),\n    AV_APP_TO_DEV_TOGGLE_PAUSE = MKBETAG('P', 'A', 'U', 'T'),\n\n    /**\n     * Volume control message.\n     *\n     * Set volume level. It may be device-dependent if volume\n     * is changed per stream or system wide. Per stream volume\n     * change is expected when possible.\n     *\n     * data: double: new volume with range of 0.0 - 1.0.\n     */\n    AV_APP_TO_DEV_SET_VOLUME = MKBETAG('S', 'V', 'O', 'L'),\n\n    /**\n     * Mute control messages.\n     *\n     * Change mute state. It may be device-dependent if mute status\n     * is changed per stream or system wide. Per stream mute status\n     * change is expected when possible.\n     *\n     * data: NULL.\n     */\n    AV_APP_TO_DEV_MUTE        = MKBETAG(' ', 'M', 'U', 'T'),\n    AV_APP_TO_DEV_UNMUTE      = MKBETAG('U', 'M', 'U', 'T'),\n    AV_APP_TO_DEV_TOGGLE_MUTE = MKBETAG('T', 'M', 'U', 'T'),\n\n    /**\n     * Get volume/mute messages.\n     *\n     * Force the device to send AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED or\n     * AV_DEV_TO_APP_MUTE_STATE_CHANGED command respectively.\n     *\n     * data: NULL.\n     */\n    AV_APP_TO_DEV_GET_VOLUME = MKBETAG('G', 'V', 'O', 'L'),\n    AV_APP_TO_DEV_GET_MUTE   = MKBETAG('G', 'M', 'U', 'T'),\n};\n\n/**\n * Message types used by avdevice_dev_to_app_control_message().\n */\nenum AVDevToAppMessageType {\n    /**\n     * Dummy message.\n     */\n    AV_DEV_TO_APP_NONE = MKBETAG('N','O','N','E'),\n\n    /**\n     * Create window buffer message.\n     *\n     * Device requests to create a window buffer. Exact meaning is device-\n     * and application-dependent. Message is sent before rendering first\n     * frame and all one-shot initializations should be done here.\n     * Application is allowed to ignore preferred window buffer size.\n     *\n     * @note: Application is obligated to inform about window buffer size\n     *        with AV_APP_TO_DEV_WINDOW_SIZE message.\n     *\n     * data: AVDeviceRect: preferred size of the window buffer.\n     *       NULL: no preferred size of the window buffer.\n     */\n    AV_DEV_TO_APP_CREATE_WINDOW_BUFFER = MKBETAG('B','C','R','E'),\n\n    /**\n     * Prepare window buffer message.\n     *\n     * Device requests to prepare a window buffer for rendering.\n     * Exact meaning is device- and application-dependent.\n     * Message is sent before rendering of each frame.\n     *\n     * data: NULL.\n     */\n    AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER = MKBETAG('B','P','R','E'),\n\n    /**\n     * Display window buffer message.\n     *\n     * Device requests to display a window buffer.\n     * Message is sent when new frame is ready to be displayed.\n     * Usually buffers need to be swapped in handler of this message.\n     *\n     * data: NULL.\n     */\n    AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER = MKBETAG('B','D','I','S'),\n\n    /**\n     * Destroy window buffer message.\n     *\n     * Device requests to destroy a window buffer.\n     * Message is sent when device is about to be destroyed and window\n     * buffer is not required anymore.\n     *\n     * data: NULL.\n     */\n    AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER = MKBETAG('B','D','E','S'),\n\n    /**\n     * Buffer fullness status messages.\n     *\n     * Device signals buffer overflow/underflow.\n     *\n     * data: NULL.\n     */\n    AV_DEV_TO_APP_BUFFER_OVERFLOW = MKBETAG('B','O','F','L'),\n    AV_DEV_TO_APP_BUFFER_UNDERFLOW = MKBETAG('B','U','F','L'),\n\n    /**\n     * Buffer readable/writable.\n     *\n     * Device informs that buffer is readable/writable.\n     * When possible, device informs how many bytes can be read/write.\n     *\n     * @warning Device may not inform when number of bytes than can be read/write changes.\n     *\n     * data: int64_t: amount of bytes available to read/write.\n     *       NULL: amount of bytes available to read/write is not known.\n     */\n    AV_DEV_TO_APP_BUFFER_READABLE = MKBETAG('B','R','D',' '),\n    AV_DEV_TO_APP_BUFFER_WRITABLE = MKBETAG('B','W','R',' '),\n\n    /**\n     * Mute state change message.\n     *\n     * Device informs that mute state has changed.\n     *\n     * data: int: 0 for not muted state, non-zero for muted state.\n     */\n    AV_DEV_TO_APP_MUTE_STATE_CHANGED = MKBETAG('C','M','U','T'),\n\n    /**\n     * Volume level change message.\n     *\n     * Device informs that volume level has changed.\n     *\n     * data: double: new volume with range of 0.0 - 1.0.\n     */\n    AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED = MKBETAG('C','V','O','L'),\n};\n\n/**\n * Send control message from application to device.\n *\n * @param s         device context.\n * @param type      message type.\n * @param data      message data. Exact type depends on message type.\n * @param data_size size of message data.\n * @return >= 0 on success, negative on error.\n *         AVERROR(ENOSYS) when device doesn't implement handler of the message.\n */\nint avdevice_app_to_dev_control_message(struct AVFormatContext *s,\n                                        enum AVAppToDevMessageType type,\n                                        void *data, size_t data_size);\n\n/**\n * Send control message from device to application.\n *\n * @param s         device context.\n * @param type      message type.\n * @param data      message data. Can be NULL.\n * @param data_size size of message data.\n * @return >= 0 on success, negative on error.\n *         AVERROR(ENOSYS) when application doesn't implement handler of the message.\n */\nint avdevice_dev_to_app_control_message(struct AVFormatContext *s,\n                                        enum AVDevToAppMessageType type,\n                                        void *data, size_t data_size);\n\n/**\n * Following API allows user to probe device capabilities (supported codecs,\n * pixel formats, sample formats, resolutions, channel counts, etc).\n * It is build on top op AVOption API.\n * Queried capabilities make it possible to set up converters of video or audio\n * parameters that fit to the device.\n *\n * List of capabilities that can be queried:\n *  - Capabilities valid for both audio and video devices:\n *    - codec:          supported audio/video codecs.\n *                      type: AV_OPT_TYPE_INT (AVCodecID value)\n *  - Capabilities valid for audio devices:\n *    - sample_format:  supported sample formats.\n *                      type: AV_OPT_TYPE_INT (AVSampleFormat value)\n *    - sample_rate:    supported sample rates.\n *                      type: AV_OPT_TYPE_INT\n *    - channels:       supported number of channels.\n *                      type: AV_OPT_TYPE_INT\n *    - channel_layout: supported channel layouts.\n *                      type: AV_OPT_TYPE_INT64\n *  - Capabilities valid for video devices:\n *    - pixel_format:   supported pixel formats.\n *                      type: AV_OPT_TYPE_INT (AVPixelFormat value)\n *    - window_size:    supported window sizes (describes size of the window size presented to the user).\n *                      type: AV_OPT_TYPE_IMAGE_SIZE\n *    - frame_size:     supported frame sizes (describes size of provided video frames).\n *                      type: AV_OPT_TYPE_IMAGE_SIZE\n *    - fps:            supported fps values\n *                      type: AV_OPT_TYPE_RATIONAL\n *\n * Value of the capability may be set by user using av_opt_set() function\n * and AVDeviceCapabilitiesQuery object. Following queries will\n * limit results to the values matching already set capabilities.\n * For example, setting a codec may impact number of formats or fps values\n * returned during next query. Setting invalid value may limit results to zero.\n *\n * Example of the usage basing on opengl output device:\n *\n * @code\n *  AVFormatContext *oc = NULL;\n *  AVDeviceCapabilitiesQuery *caps = NULL;\n *  AVOptionRanges *ranges;\n *  int ret;\n *\n *  if ((ret = avformat_alloc_output_context2(&oc, NULL, \"opengl\", NULL)) < 0)\n *      goto fail;\n *  if (avdevice_capabilities_create(&caps, oc, NULL) < 0)\n *      goto fail;\n *\n *  //query codecs\n *  if (av_opt_query_ranges(&ranges, caps, \"codec\", AV_OPT_MULTI_COMPONENT_RANGE)) < 0)\n *      goto fail;\n *  //pick codec here and set it\n *  av_opt_set(caps, \"codec\", AV_CODEC_ID_RAWVIDEO, 0);\n *\n *  //query format\n *  if (av_opt_query_ranges(&ranges, caps, \"pixel_format\", AV_OPT_MULTI_COMPONENT_RANGE)) < 0)\n *      goto fail;\n *  //pick format here and set it\n *  av_opt_set(caps, \"pixel_format\", AV_PIX_FMT_YUV420P, 0);\n *\n *  //query and set more capabilities\n *\n * fail:\n *  //clean up code\n *  avdevice_capabilities_free(&query, oc);\n *  avformat_free_context(oc);\n * @endcode\n */\n\n/**\n * Structure describes device capabilities.\n *\n * It is used by devices in conjunction with av_device_capabilities AVOption table\n * to implement capabilities probing API based on AVOption API. Should not be used directly.\n */\ntypedef struct AVDeviceCapabilitiesQuery {\n    const AVClass *av_class;\n    AVFormatContext *device_context;\n    enum AVCodecID codec;\n    enum AVSampleFormat sample_format;\n    enum AVPixelFormat pixel_format;\n    int sample_rate;\n    int channels;\n    int64_t channel_layout;\n    int window_width;\n    int window_height;\n    int frame_width;\n    int frame_height;\n    AVRational fps;\n} AVDeviceCapabilitiesQuery;\n\n/**\n * AVOption table used by devices to implement device capabilities API. Should not be used by a user.\n */\nextern const AVOption av_device_capabilities[];\n\n/**\n * Initialize capabilities probing API based on AVOption API.\n *\n * avdevice_capabilities_free() must be called when query capabilities API is\n * not used anymore.\n *\n * @param[out] caps      Device capabilities data. Pointer to a NULL pointer must be passed.\n * @param s              Context of the device.\n * @param device_options An AVDictionary filled with device-private options.\n *                       On return this parameter will be destroyed and replaced with a dict\n *                       containing options that were not found. May be NULL.\n *                       The same options must be passed later to avformat_write_header() for output\n *                       devices or avformat_open_input() for input devices, or at any other place\n *                       that affects device-private options.\n *\n * @return >= 0 on success, negative otherwise.\n */\nint avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s,\n                                 AVDictionary **device_options);\n\n/**\n * Free resources created by avdevice_capabilities_create()\n *\n * @param caps Device capabilities data to be freed.\n * @param s    Context of the device.\n */\nvoid avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s);\n\n/**\n * Structure describes basic parameters of the device.\n */\ntypedef struct AVDeviceInfo {\n    char *device_name;                   /**< device name, format depends on device */\n    char *device_description;            /**< human friendly name */\n} AVDeviceInfo;\n\n/**\n * List of devices.\n */\ntypedef struct AVDeviceInfoList {\n    AVDeviceInfo **devices;              /**< list of autodetected devices */\n    int nb_devices;                      /**< number of autodetected devices */\n    int default_device;                  /**< index of default device or -1 if no default */\n} AVDeviceInfoList;\n\n/**\n * List devices.\n *\n * Returns available device names and their parameters.\n *\n * @note: Some devices may accept system-dependent device names that cannot be\n *        autodetected. The list returned by this function cannot be assumed to\n *        be always completed.\n *\n * @param s                device context.\n * @param[out] device_list list of autodetected devices.\n * @return count of autodetected devices, negative on error.\n */\nint avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list);\n\n/**\n * Convenient function to free result of avdevice_list_devices().\n *\n * @param devices device list to be freed.\n */\nvoid avdevice_free_list_devices(AVDeviceInfoList **device_list);\n\n/**\n * List devices.\n *\n * Returns available device names and their parameters.\n * These are convinient wrappers for avdevice_list_devices().\n * Device context is allocated and deallocated internally.\n *\n * @param device           device format. May be NULL if device name is set.\n * @param device_name      device name. May be NULL if device format is set.\n * @param device_options   An AVDictionary filled with device-private options. May be NULL.\n *                         The same options must be passed later to avformat_write_header() for output\n *                         devices or avformat_open_input() for input devices, or at any other place\n *                         that affects device-private options.\n * @param[out] device_list list of autodetected devices\n * @return count of autodetected devices, negative on error.\n * @note device argument takes precedence over device_name when both are set.\n */\nint avdevice_list_input_sources(struct AVInputFormat *device, const char *device_name,\n                                AVDictionary *device_options, AVDeviceInfoList **device_list);\nint avdevice_list_output_sinks(struct AVOutputFormat *device, const char *device_name,\n                               AVDictionary *device_options, AVDeviceInfoList **device_list);\n\n#endif /* AVDEVICE_AVDEVICE_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavdevice/version.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVDEVICE_VERSION_H\n#define AVDEVICE_VERSION_H\n\n/**\n * @file\n * @ingroup lavd\n * Libavdevice version macros\n */\n\n#include \"libavutil/version.h\"\n\n#define LIBAVDEVICE_VERSION_MAJOR  57\n#define LIBAVDEVICE_VERSION_MINOR   0\n#define LIBAVDEVICE_VERSION_MICRO 100\n\n#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \\\n                                               LIBAVDEVICE_VERSION_MINOR, \\\n                                               LIBAVDEVICE_VERSION_MICRO)\n#define LIBAVDEVICE_VERSION     AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \\\n                                           LIBAVDEVICE_VERSION_MINOR, \\\n                                           LIBAVDEVICE_VERSION_MICRO)\n#define LIBAVDEVICE_BUILD       LIBAVDEVICE_VERSION_INT\n\n#define LIBAVDEVICE_IDENT       \"Lavd\" AV_STRINGIFY(LIBAVDEVICE_VERSION)\n\n/**\n * FF_API_* defines may be placed below to indicate public API that will be\n * dropped at a future version bump. The defines themselves are not part of\n * the public API and may change, break or disappear at any time.\n */\n\n#endif /* AVDEVICE_VERSION_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavfilter/avfilter.h",
    "content": "/*\n * filter layer\n * Copyright (c) 2007 Bobby Bingham\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVFILTER_AVFILTER_H\n#define AVFILTER_AVFILTER_H\n\n/**\n * @file\n * @ingroup lavfi\n * Main libavfilter public API header\n */\n\n/**\n * @defgroup lavfi Libavfilter - graph-based frame editing library\n * @{\n */\n\n#include <stddef.h>\n\n#include \"libavutil/attributes.h\"\n#include \"libavutil/avutil.h\"\n#include \"libavutil/dict.h\"\n#include \"libavutil/frame.h\"\n#include \"libavutil/log.h\"\n#include \"libavutil/samplefmt.h\"\n#include \"libavutil/pixfmt.h\"\n#include \"libavutil/rational.h\"\n\n#include \"libavfilter/version.h\"\n\n/**\n * Return the LIBAVFILTER_VERSION_INT constant.\n */\nunsigned avfilter_version(void);\n\n/**\n * Return the libavfilter build-time configuration.\n */\nconst char *avfilter_configuration(void);\n\n/**\n * Return the libavfilter license.\n */\nconst char *avfilter_license(void);\n\ntypedef struct AVFilterContext AVFilterContext;\ntypedef struct AVFilterLink    AVFilterLink;\ntypedef struct AVFilterPad     AVFilterPad;\ntypedef struct AVFilterFormats AVFilterFormats;\n\n/**\n * Get the number of elements in a NULL-terminated array of AVFilterPads (e.g.\n * AVFilter.inputs/outputs).\n */\nint avfilter_pad_count(const AVFilterPad *pads);\n\n/**\n * Get the name of an AVFilterPad.\n *\n * @param pads an array of AVFilterPads\n * @param pad_idx index of the pad in the array it; is the caller's\n *                responsibility to ensure the index is valid\n *\n * @return name of the pad_idx'th pad in pads\n */\nconst char *avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx);\n\n/**\n * Get the type of an AVFilterPad.\n *\n * @param pads an array of AVFilterPads\n * @param pad_idx index of the pad in the array; it is the caller's\n *                responsibility to ensure the index is valid\n *\n * @return type of the pad_idx'th pad in pads\n */\nenum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);\n\n/**\n * The number of the filter inputs is not determined just by AVFilter.inputs.\n * The filter might add additional inputs during initialization depending on the\n * options supplied to it.\n */\n#define AVFILTER_FLAG_DYNAMIC_INPUTS        (1 << 0)\n/**\n * The number of the filter outputs is not determined just by AVFilter.outputs.\n * The filter might add additional outputs during initialization depending on\n * the options supplied to it.\n */\n#define AVFILTER_FLAG_DYNAMIC_OUTPUTS       (1 << 1)\n/**\n * The filter supports multithreading by splitting frames into multiple parts\n * and processing them concurrently.\n */\n#define AVFILTER_FLAG_SLICE_THREADS         (1 << 2)\n/**\n * Some filters support a generic \"enable\" expression option that can be used\n * to enable or disable a filter in the timeline. Filters supporting this\n * option have this flag set. When the enable expression is false, the default\n * no-op filter_frame() function is called in place of the filter_frame()\n * callback defined on each input pad, thus the frame is passed unchanged to\n * the next filters.\n */\n#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC  (1 << 16)\n/**\n * Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will\n * have its filter_frame() callback(s) called as usual even when the enable\n * expression is false. The filter will disable filtering within the\n * filter_frame() callback(s) itself, for example executing code depending on\n * the AVFilterContext->is_disabled value.\n */\n#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL (1 << 17)\n/**\n * Handy mask to test whether the filter supports or no the timeline feature\n * (internally or generically).\n */\n#define AVFILTER_FLAG_SUPPORT_TIMELINE (AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL)\n\n/**\n * Filter definition. This defines the pads a filter contains, and all the\n * callback functions used to interact with the filter.\n */\ntypedef struct AVFilter {\n    /**\n     * Filter name. Must be non-NULL and unique among filters.\n     */\n    const char *name;\n\n    /**\n     * A description of the filter. May be NULL.\n     *\n     * You should use the NULL_IF_CONFIG_SMALL() macro to define it.\n     */\n    const char *description;\n\n    /**\n     * List of inputs, terminated by a zeroed element.\n     *\n     * NULL if there are no (static) inputs. Instances of filters with\n     * AVFILTER_FLAG_DYNAMIC_INPUTS set may have more inputs than present in\n     * this list.\n     */\n    const AVFilterPad *inputs;\n    /**\n     * List of outputs, terminated by a zeroed element.\n     *\n     * NULL if there are no (static) outputs. Instances of filters with\n     * AVFILTER_FLAG_DYNAMIC_OUTPUTS set may have more outputs than present in\n     * this list.\n     */\n    const AVFilterPad *outputs;\n\n    /**\n     * A class for the private data, used to declare filter private AVOptions.\n     * This field is NULL for filters that do not declare any options.\n     *\n     * If this field is non-NULL, the first member of the filter private data\n     * must be a pointer to AVClass, which will be set by libavfilter generic\n     * code to this class.\n     */\n    const AVClass *priv_class;\n\n    /**\n     * A combination of AVFILTER_FLAG_*\n     */\n    int flags;\n\n    /*****************************************************************\n     * All fields below this line are not part of the public API. They\n     * may not be used outside of libavfilter and can be changed and\n     * removed at will.\n     * New public fields should be added right above.\n     *****************************************************************\n     */\n\n    /**\n     * Filter initialization function.\n     *\n     * This callback will be called only once during the filter lifetime, after\n     * all the options have been set, but before links between filters are\n     * established and format negotiation is done.\n     *\n     * Basic filter initialization should be done here. Filters with dynamic\n     * inputs and/or outputs should create those inputs/outputs here based on\n     * provided options. No more changes to this filter's inputs/outputs can be\n     * done after this callback.\n     *\n     * This callback must not assume that the filter links exist or frame\n     * parameters are known.\n     *\n     * @ref AVFilter.uninit \"uninit\" is guaranteed to be called even if\n     * initialization fails, so this callback does not have to clean up on\n     * failure.\n     *\n     * @return 0 on success, a negative AVERROR on failure\n     */\n    int (*init)(AVFilterContext *ctx);\n\n    /**\n     * Should be set instead of @ref AVFilter.init \"init\" by the filters that\n     * want to pass a dictionary of AVOptions to nested contexts that are\n     * allocated during init.\n     *\n     * On return, the options dict should be freed and replaced with one that\n     * contains all the options which could not be processed by this filter (or\n     * with NULL if all the options were processed).\n     *\n     * Otherwise the semantics is the same as for @ref AVFilter.init \"init\".\n     */\n    int (*init_dict)(AVFilterContext *ctx, AVDictionary **options);\n\n    /**\n     * Filter uninitialization function.\n     *\n     * Called only once right before the filter is freed. Should deallocate any\n     * memory held by the filter, release any buffer references, etc. It does\n     * not need to deallocate the AVFilterContext.priv memory itself.\n     *\n     * This callback may be called even if @ref AVFilter.init \"init\" was not\n     * called or failed, so it must be prepared to handle such a situation.\n     */\n    void (*uninit)(AVFilterContext *ctx);\n\n    /**\n     * Query formats supported by the filter on its inputs and outputs.\n     *\n     * This callback is called after the filter is initialized (so the inputs\n     * and outputs are fixed), shortly before the format negotiation. This\n     * callback may be called more than once.\n     *\n     * This callback must set AVFilterLink.out_formats on every input link and\n     * AVFilterLink.in_formats on every output link to a list of pixel/sample\n     * formats that the filter supports on that link. For audio links, this\n     * filter must also set @ref AVFilterLink.in_samplerates \"in_samplerates\" /\n     * @ref AVFilterLink.out_samplerates \"out_samplerates\" and\n     * @ref AVFilterLink.in_channel_layouts \"in_channel_layouts\" /\n     * @ref AVFilterLink.out_channel_layouts \"out_channel_layouts\" analogously.\n     *\n     * This callback may be NULL for filters with one input, in which case\n     * libavfilter assumes that it supports all input formats and preserves\n     * them on output.\n     *\n     * @return zero on success, a negative value corresponding to an\n     * AVERROR code otherwise\n     */\n    int (*query_formats)(AVFilterContext *);\n\n    int priv_size;      ///< size of private data to allocate for the filter\n\n    /**\n     * Used by the filter registration system. Must not be touched by any other\n     * code.\n     */\n    struct AVFilter *next;\n\n    /**\n     * Make the filter instance process a command.\n     *\n     * @param cmd    the command to process, for handling simplicity all commands must be alphanumeric only\n     * @param arg    the argument for the command\n     * @param res    a buffer with size res_size where the filter(s) can return a response. This must not change when the command is not supported.\n     * @param flags  if AVFILTER_CMD_FLAG_FAST is set and the command would be\n     *               time consuming then a filter should treat it like an unsupported command\n     *\n     * @returns >=0 on success otherwise an error code.\n     *          AVERROR(ENOSYS) on unsupported commands\n     */\n    int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags);\n\n    /**\n     * Filter initialization function, alternative to the init()\n     * callback. Args contains the user-supplied parameters, opaque is\n     * used for providing binary data.\n     */\n    int (*init_opaque)(AVFilterContext *ctx, void *opaque);\n} AVFilter;\n\n/**\n * Process multiple parts of the frame concurrently.\n */\n#define AVFILTER_THREAD_SLICE (1 << 0)\n\ntypedef struct AVFilterInternal AVFilterInternal;\n\n/** An instance of a filter */\nstruct AVFilterContext {\n    const AVClass *av_class;        ///< needed for av_log() and filters common options\n\n    const AVFilter *filter;         ///< the AVFilter of which this is an instance\n\n    char *name;                     ///< name of this filter instance\n\n    AVFilterPad   *input_pads;      ///< array of input pads\n    AVFilterLink **inputs;          ///< array of pointers to input links\n    unsigned    nb_inputs;          ///< number of input pads\n\n    AVFilterPad   *output_pads;     ///< array of output pads\n    AVFilterLink **outputs;         ///< array of pointers to output links\n    unsigned    nb_outputs;         ///< number of output pads\n\n    void *priv;                     ///< private data for use by the filter\n\n    struct AVFilterGraph *graph;    ///< filtergraph this filter belongs to\n\n    /**\n     * Type of multithreading being allowed/used. A combination of\n     * AVFILTER_THREAD_* flags.\n     *\n     * May be set by the caller before initializing the filter to forbid some\n     * or all kinds of multithreading for this filter. The default is allowing\n     * everything.\n     *\n     * When the filter is initialized, this field is combined using bit AND with\n     * AVFilterGraph.thread_type to get the final mask used for determining\n     * allowed threading types. I.e. a threading type needs to be set in both\n     * to be allowed.\n     *\n     * After the filter is initialized, libavfilter sets this field to the\n     * threading type that is actually used (0 for no multithreading).\n     */\n    int thread_type;\n\n    /**\n     * An opaque struct for libavfilter internal use.\n     */\n    AVFilterInternal *internal;\n\n    struct AVFilterCommand *command_queue;\n\n    char *enable_str;               ///< enable expression string\n    void *enable;                   ///< parsed expression (AVExpr*)\n    double *var_values;             ///< variable values for the enable expression\n    int is_disabled;                ///< the enabled state from the last expression evaluation\n};\n\n/**\n * A link between two filters. This contains pointers to the source and\n * destination filters between which this link exists, and the indexes of\n * the pads involved. In addition, this link also contains the parameters\n * which have been negotiated and agreed upon between the filter, such as\n * image dimensions, format, etc.\n */\nstruct AVFilterLink {\n    AVFilterContext *src;       ///< source filter\n    AVFilterPad *srcpad;        ///< output pad on the source filter\n\n    AVFilterContext *dst;       ///< dest filter\n    AVFilterPad *dstpad;        ///< input pad on the dest filter\n\n    enum AVMediaType type;      ///< filter media type\n\n    /* These parameters apply only to video */\n    int w;                      ///< agreed upon image width\n    int h;                      ///< agreed upon image height\n    AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio\n    /* These parameters apply only to audio */\n    uint64_t channel_layout;    ///< channel layout of current buffer (see libavutil/channel_layout.h)\n    int sample_rate;            ///< samples per second\n\n    int format;                 ///< agreed upon media format\n\n    /**\n     * Define the time base used by the PTS of the frames/samples\n     * which will pass through this link.\n     * During the configuration stage, each filter is supposed to\n     * change only the output timebase, while the timebase of the\n     * input link is assumed to be an unchangeable property.\n     */\n    AVRational time_base;\n\n    /*****************************************************************\n     * All fields below this line are not part of the public API. They\n     * may not be used outside of libavfilter and can be changed and\n     * removed at will.\n     * New public fields should be added right above.\n     *****************************************************************\n     */\n    /**\n     * Lists of formats and channel layouts supported by the input and output\n     * filters respectively. These lists are used for negotiating the format\n     * to actually be used, which will be loaded into the format and\n     * channel_layout members, above, when chosen.\n     *\n     */\n    AVFilterFormats *in_formats;\n    AVFilterFormats *out_formats;\n\n    /**\n     * Lists of channel layouts and sample rates used for automatic\n     * negotiation.\n     */\n    AVFilterFormats  *in_samplerates;\n    AVFilterFormats *out_samplerates;\n    struct AVFilterChannelLayouts  *in_channel_layouts;\n    struct AVFilterChannelLayouts *out_channel_layouts;\n\n    /**\n     * Audio only, the destination filter sets this to a non-zero value to\n     * request that buffers with the given number of samples should be sent to\n     * it. AVFilterPad.needs_fifo must also be set on the corresponding input\n     * pad.\n     * Last buffer before EOF will be padded with silence.\n     */\n    int request_samples;\n\n    /** stage of the initialization of the link properties (dimensions, etc) */\n    enum {\n        AVLINK_UNINIT = 0,      ///< not started\n        AVLINK_STARTINIT,       ///< started, but incomplete\n        AVLINK_INIT             ///< complete\n    } init_state;\n\n    /**\n     * Graph the filter belongs to.\n     */\n    struct AVFilterGraph *graph;\n\n    /**\n     * Current timestamp of the link, as defined by the most recent\n     * frame(s), in link time_base units.\n     */\n    int64_t current_pts;\n\n    /**\n     * Current timestamp of the link, as defined by the most recent\n     * frame(s), in AV_TIME_BASE units.\n     */\n    int64_t current_pts_us;\n\n    /**\n     * Index in the age array.\n     */\n    int age_index;\n\n    /**\n     * Frame rate of the stream on the link, or 1/0 if unknown or variable;\n     * if left to 0/0, will be automatically copied from the first input\n     * of the source filter if it exists.\n     *\n     * Sources should set it to the best estimation of the real frame rate.\n     * If the source frame rate is unknown or variable, set this to 1/0.\n     * Filters should update it if necessary depending on their function.\n     * Sinks can use it to set a default output frame rate.\n     * It is similar to the r_frame_rate field in AVStream.\n     */\n    AVRational frame_rate;\n\n    /**\n     * Buffer partially filled with samples to achieve a fixed/minimum size.\n     */\n    AVFrame *partial_buf;\n\n    /**\n     * Size of the partial buffer to allocate.\n     * Must be between min_samples and max_samples.\n     */\n    int partial_buf_size;\n\n    /**\n     * Minimum number of samples to filter at once. If filter_frame() is\n     * called with fewer samples, it will accumulate them in partial_buf.\n     * This field and the related ones must not be changed after filtering\n     * has started.\n     * If 0, all related fields are ignored.\n     */\n    int min_samples;\n\n    /**\n     * Maximum number of samples to filter at once. If filter_frame() is\n     * called with more samples, it will split them.\n     */\n    int max_samples;\n\n    /**\n     * Link status.\n     * If not zero, all attempts of start_frame, filter_frame or request_frame\n     * will fail with the corresponding code, and if necessary the reference\n     * will be destroyed.\n     * If request_frame returns an error, the status is set on the\n     * corresponding link.\n     * It can be set also be set by either the source or the destination\n     * filter.\n     */\n    int status;\n\n    /**\n     * Number of channels.\n     */\n    int channels;\n\n    /**\n     * Link processing flags.\n     */\n    unsigned flags;\n\n    /**\n     * Number of past frames sent through the link.\n     */\n    int64_t frame_count;\n\n    /**\n     * A pointer to a FFVideoFramePool struct.\n     */\n    void *video_frame_pool;\n\n    /**\n     * True if a frame is currently wanted on the input of this filter.\n     * Set when ff_request_frame() is called by the output,\n     * cleared when the request is handled or forwarded.\n     */\n    int frame_wanted_in;\n\n    /**\n     * True if a frame is currently wanted on the output of this filter.\n     * Set when ff_request_frame() is called by the output,\n     * cleared when a frame is filtered.\n     */\n    int frame_wanted_out;\n};\n\n/**\n * Link two filters together.\n *\n * @param src    the source filter\n * @param srcpad index of the output pad on the source filter\n * @param dst    the destination filter\n * @param dstpad index of the input pad on the destination filter\n * @return       zero on success\n */\nint avfilter_link(AVFilterContext *src, unsigned srcpad,\n                  AVFilterContext *dst, unsigned dstpad);\n\n/**\n * Free the link in *link, and set its pointer to NULL.\n */\nvoid avfilter_link_free(AVFilterLink **link);\n\n/**\n * Get the number of channels of a link.\n */\nint avfilter_link_get_channels(AVFilterLink *link);\n\n/**\n * Set the closed field of a link.\n * @deprecated applications are not supposed to mess with links, they should\n * close the sinks.\n */\nattribute_deprecated\nvoid avfilter_link_set_closed(AVFilterLink *link, int closed);\n\n/**\n * Negotiate the media format, dimensions, etc of all inputs to a filter.\n *\n * @param filter the filter to negotiate the properties for its inputs\n * @return       zero on successful negotiation\n */\nint avfilter_config_links(AVFilterContext *filter);\n\n#define AVFILTER_CMD_FLAG_ONE   1 ///< Stop once a filter understood the command (for target=all for example), fast filters are favored automatically\n#define AVFILTER_CMD_FLAG_FAST  2 ///< Only execute command when its fast (like a video out that supports contrast adjustment in hw)\n\n/**\n * Make the filter instance process a command.\n * It is recommended to use avfilter_graph_send_command().\n */\nint avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags);\n\n/** Initialize the filter system. Register all builtin filters. */\nvoid avfilter_register_all(void);\n\n#if FF_API_OLD_FILTER_REGISTER\n/** Uninitialize the filter system. Unregister all filters. */\nattribute_deprecated\nvoid avfilter_uninit(void);\n#endif\n\n/**\n * Register a filter. This is only needed if you plan to use\n * avfilter_get_by_name later to lookup the AVFilter structure by name. A\n * filter can still by instantiated with avfilter_graph_alloc_filter even if it\n * is not registered.\n *\n * @param filter the filter to register\n * @return 0 if the registration was successful, a negative value\n * otherwise\n */\nint avfilter_register(AVFilter *filter);\n\n/**\n * Get a filter definition matching the given name.\n *\n * @param name the filter name to find\n * @return     the filter definition, if any matching one is registered.\n *             NULL if none found.\n */\n#if !FF_API_NOCONST_GET_NAME\nconst\n#endif\nAVFilter *avfilter_get_by_name(const char *name);\n\n/**\n * Iterate over all registered filters.\n * @return If prev is non-NULL, next registered filter after prev or NULL if\n * prev is the last filter. If prev is NULL, return the first registered filter.\n */\nconst AVFilter *avfilter_next(const AVFilter *prev);\n\n#if FF_API_OLD_FILTER_REGISTER\n/**\n * If filter is NULL, returns a pointer to the first registered filter pointer,\n * if filter is non-NULL, returns the next pointer after filter.\n * If the returned pointer points to NULL, the last registered filter\n * was already reached.\n * @deprecated use avfilter_next()\n */\nattribute_deprecated\nAVFilter **av_filter_next(AVFilter **filter);\n#endif\n\n#if FF_API_AVFILTER_OPEN\n/**\n * Create a filter instance.\n *\n * @param filter_ctx put here a pointer to the created filter context\n * on success, NULL on failure\n * @param filter    the filter to create an instance of\n * @param inst_name Name to give to the new instance. Can be NULL for none.\n * @return >= 0 in case of success, a negative error code otherwise\n * @deprecated use avfilter_graph_alloc_filter() instead\n */\nattribute_deprecated\nint avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name);\n#endif\n\n\n#if FF_API_AVFILTER_INIT_FILTER\n/**\n * Initialize a filter.\n *\n * @param filter the filter to initialize\n * @param args   A string of parameters to use when initializing the filter.\n *               The format and meaning of this string varies by filter.\n * @param opaque Any extra non-string data needed by the filter. The meaning\n *               of this parameter varies by filter.\n * @return       zero on success\n */\nattribute_deprecated\nint avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque);\n#endif\n\n/**\n * Initialize a filter with the supplied parameters.\n *\n * @param ctx  uninitialized filter context to initialize\n * @param args Options to initialize the filter with. This must be a\n *             ':'-separated list of options in the 'key=value' form.\n *             May be NULL if the options have been set directly using the\n *             AVOptions API or there are no options that need to be set.\n * @return 0 on success, a negative AVERROR on failure\n */\nint avfilter_init_str(AVFilterContext *ctx, const char *args);\n\n/**\n * Initialize a filter with the supplied dictionary of options.\n *\n * @param ctx     uninitialized filter context to initialize\n * @param options An AVDictionary filled with options for this filter. On\n *                return this parameter will be destroyed and replaced with\n *                a dict containing options that were not found. This dictionary\n *                must be freed by the caller.\n *                May be NULL, then this function is equivalent to\n *                avfilter_init_str() with the second parameter set to NULL.\n * @return 0 on success, a negative AVERROR on failure\n *\n * @note This function and avfilter_init_str() do essentially the same thing,\n * the difference is in manner in which the options are passed. It is up to the\n * calling code to choose whichever is more preferable. The two functions also\n * behave differently when some of the provided options are not declared as\n * supported by the filter. In such a case, avfilter_init_str() will fail, but\n * this function will leave those extra options in the options AVDictionary and\n * continue as usual.\n */\nint avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options);\n\n/**\n * Free a filter context. This will also remove the filter from its\n * filtergraph's list of filters.\n *\n * @param filter the filter to free\n */\nvoid avfilter_free(AVFilterContext *filter);\n\n/**\n * Insert a filter in the middle of an existing link.\n *\n * @param link the link into which the filter should be inserted\n * @param filt the filter to be inserted\n * @param filt_srcpad_idx the input pad on the filter to connect\n * @param filt_dstpad_idx the output pad on the filter to connect\n * @return     zero on success\n */\nint avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,\n                           unsigned filt_srcpad_idx, unsigned filt_dstpad_idx);\n\n/**\n * @return AVClass for AVFilterContext.\n *\n * @see av_opt_find().\n */\nconst AVClass *avfilter_get_class(void);\n\ntypedef struct AVFilterGraphInternal AVFilterGraphInternal;\n\n/**\n * A function pointer passed to the @ref AVFilterGraph.execute callback to be\n * executed multiple times, possibly in parallel.\n *\n * @param ctx the filter context the job belongs to\n * @param arg an opaque parameter passed through from @ref\n *            AVFilterGraph.execute\n * @param jobnr the index of the job being executed\n * @param nb_jobs the total number of jobs\n *\n * @return 0 on success, a negative AVERROR on error\n */\ntypedef int (avfilter_action_func)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);\n\n/**\n * A function executing multiple jobs, possibly in parallel.\n *\n * @param ctx the filter context to which the jobs belong\n * @param func the function to be called multiple times\n * @param arg the argument to be passed to func\n * @param ret a nb_jobs-sized array to be filled with return values from each\n *            invocation of func\n * @param nb_jobs the number of jobs to execute\n *\n * @return 0 on success, a negative AVERROR on error\n */\ntypedef int (avfilter_execute_func)(AVFilterContext *ctx, avfilter_action_func *func,\n                                    void *arg, int *ret, int nb_jobs);\n\ntypedef struct AVFilterGraph {\n    const AVClass *av_class;\n    AVFilterContext **filters;\n    unsigned nb_filters;\n\n    char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters\n    char *resample_lavr_opts;   ///< libavresample options to use for the auto-inserted resample filters\n\n    /**\n     * Type of multithreading allowed for filters in this graph. A combination\n     * of AVFILTER_THREAD_* flags.\n     *\n     * May be set by the caller at any point, the setting will apply to all\n     * filters initialized after that. The default is allowing everything.\n     *\n     * When a filter in this graph is initialized, this field is combined using\n     * bit AND with AVFilterContext.thread_type to get the final mask used for\n     * determining allowed threading types. I.e. a threading type needs to be\n     * set in both to be allowed.\n     */\n    int thread_type;\n\n    /**\n     * Maximum number of threads used by filters in this graph. May be set by\n     * the caller before adding any filters to the filtergraph. Zero (the\n     * default) means that the number of threads is determined automatically.\n     */\n    int nb_threads;\n\n    /**\n     * Opaque object for libavfilter internal use.\n     */\n    AVFilterGraphInternal *internal;\n\n    /**\n     * Opaque user data. May be set by the caller to an arbitrary value, e.g. to\n     * be used from callbacks like @ref AVFilterGraph.execute.\n     * Libavfilter will not touch this field in any way.\n     */\n    void *opaque;\n\n    /**\n     * This callback may be set by the caller immediately after allocating the\n     * graph and before adding any filters to it, to provide a custom\n     * multithreading implementation.\n     *\n     * If set, filters with slice threading capability will call this callback\n     * to execute multiple jobs in parallel.\n     *\n     * If this field is left unset, libavfilter will use its internal\n     * implementation, which may or may not be multithreaded depending on the\n     * platform and build options.\n     */\n    avfilter_execute_func *execute;\n\n    char *aresample_swr_opts; ///< swr options to use for the auto-inserted aresample filters, Access ONLY through AVOptions\n\n    /**\n     * Private fields\n     *\n     * The following fields are for internal use only.\n     * Their type, offset, number and semantic can change without notice.\n     */\n\n    AVFilterLink **sink_links;\n    int sink_links_count;\n\n    unsigned disable_auto_convert;\n} AVFilterGraph;\n\n/**\n * Allocate a filter graph.\n *\n * @return the allocated filter graph on success or NULL.\n */\nAVFilterGraph *avfilter_graph_alloc(void);\n\n/**\n * Create a new filter instance in a filter graph.\n *\n * @param graph graph in which the new filter will be used\n * @param filter the filter to create an instance of\n * @param name Name to give to the new instance (will be copied to\n *             AVFilterContext.name). This may be used by the caller to identify\n *             different filters, libavfilter itself assigns no semantics to\n *             this parameter. May be NULL.\n *\n * @return the context of the newly created filter instance (note that it is\n *         also retrievable directly through AVFilterGraph.filters or with\n *         avfilter_graph_get_filter()) on success or NULL on failure.\n */\nAVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph,\n                                             const AVFilter *filter,\n                                             const char *name);\n\n/**\n * Get a filter instance identified by instance name from graph.\n *\n * @param graph filter graph to search through.\n * @param name filter instance name (should be unique in the graph).\n * @return the pointer to the found filter instance or NULL if it\n * cannot be found.\n */\nAVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *name);\n\n#if FF_API_AVFILTER_OPEN\n/**\n * Add an existing filter instance to a filter graph.\n *\n * @param graphctx  the filter graph\n * @param filter the filter to be added\n *\n * @deprecated use avfilter_graph_alloc_filter() to allocate a filter in a\n * filter graph\n */\nattribute_deprecated\nint avfilter_graph_add_filter(AVFilterGraph *graphctx, AVFilterContext *filter);\n#endif\n\n/**\n * Create and add a filter instance into an existing graph.\n * The filter instance is created from the filter filt and inited\n * with the parameters args and opaque.\n *\n * In case of success put in *filt_ctx the pointer to the created\n * filter instance, otherwise set *filt_ctx to NULL.\n *\n * @param name the instance name to give to the created filter instance\n * @param graph_ctx the filter graph\n * @return a negative AVERROR error code in case of failure, a non\n * negative value otherwise\n */\nint avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt,\n                                 const char *name, const char *args, void *opaque,\n                                 AVFilterGraph *graph_ctx);\n\n/**\n * Enable or disable automatic format conversion inside the graph.\n *\n * Note that format conversion can still happen inside explicitly inserted\n * scale and aresample filters.\n *\n * @param flags  any of the AVFILTER_AUTO_CONVERT_* constants\n */\nvoid avfilter_graph_set_auto_convert(AVFilterGraph *graph, unsigned flags);\n\nenum {\n    AVFILTER_AUTO_CONVERT_ALL  =  0, /**< all automatic conversions enabled */\n    AVFILTER_AUTO_CONVERT_NONE = -1, /**< all automatic conversions disabled */\n};\n\n/**\n * Check validity and configure all the links and formats in the graph.\n *\n * @param graphctx the filter graph\n * @param log_ctx context used for logging\n * @return >= 0 in case of success, a negative AVERROR code otherwise\n */\nint avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx);\n\n/**\n * Free a graph, destroy its links, and set *graph to NULL.\n * If *graph is NULL, do nothing.\n */\nvoid avfilter_graph_free(AVFilterGraph **graph);\n\n/**\n * A linked-list of the inputs/outputs of the filter chain.\n *\n * This is mainly useful for avfilter_graph_parse() / avfilter_graph_parse2(),\n * where it is used to communicate open (unlinked) inputs and outputs from and\n * to the caller.\n * This struct specifies, per each not connected pad contained in the graph, the\n * filter context and the pad index required for establishing a link.\n */\ntypedef struct AVFilterInOut {\n    /** unique name for this input/output in the list */\n    char *name;\n\n    /** filter context associated to this input/output */\n    AVFilterContext *filter_ctx;\n\n    /** index of the filt_ctx pad to use for linking */\n    int pad_idx;\n\n    /** next input/input in the list, NULL if this is the last */\n    struct AVFilterInOut *next;\n} AVFilterInOut;\n\n/**\n * Allocate a single AVFilterInOut entry.\n * Must be freed with avfilter_inout_free().\n * @return allocated AVFilterInOut on success, NULL on failure.\n */\nAVFilterInOut *avfilter_inout_alloc(void);\n\n/**\n * Free the supplied list of AVFilterInOut and set *inout to NULL.\n * If *inout is NULL, do nothing.\n */\nvoid avfilter_inout_free(AVFilterInOut **inout);\n\n/**\n * Add a graph described by a string to a graph.\n *\n * @note The caller must provide the lists of inputs and outputs,\n * which therefore must be known before calling the function.\n *\n * @note The inputs parameter describes inputs of the already existing\n * part of the graph; i.e. from the point of view of the newly created\n * part, they are outputs. Similarly the outputs parameter describes\n * outputs of the already existing filters, which are provided as\n * inputs to the parsed filters.\n *\n * @param graph   the filter graph where to link the parsed graph context\n * @param filters string to be parsed\n * @param inputs  linked list to the inputs of the graph\n * @param outputs linked list to the outputs of the graph\n * @return zero on success, a negative AVERROR code on error\n */\nint avfilter_graph_parse(AVFilterGraph *graph, const char *filters,\n                         AVFilterInOut *inputs, AVFilterInOut *outputs,\n                         void *log_ctx);\n\n/**\n * Add a graph described by a string to a graph.\n *\n * In the graph filters description, if the input label of the first\n * filter is not specified, \"in\" is assumed; if the output label of\n * the last filter is not specified, \"out\" is assumed.\n *\n * @param graph   the filter graph where to link the parsed graph context\n * @param filters string to be parsed\n * @param inputs  pointer to a linked list to the inputs of the graph, may be NULL.\n *                If non-NULL, *inputs is updated to contain the list of open inputs\n *                after the parsing, should be freed with avfilter_inout_free().\n * @param outputs pointer to a linked list to the outputs of the graph, may be NULL.\n *                If non-NULL, *outputs is updated to contain the list of open outputs\n *                after the parsing, should be freed with avfilter_inout_free().\n * @return non negative on success, a negative AVERROR code on error\n */\nint avfilter_graph_parse_ptr(AVFilterGraph *graph, const char *filters,\n                             AVFilterInOut **inputs, AVFilterInOut **outputs,\n                             void *log_ctx);\n\n/**\n * Add a graph described by a string to a graph.\n *\n * @param[in]  graph   the filter graph where to link the parsed graph context\n * @param[in]  filters string to be parsed\n * @param[out] inputs  a linked list of all free (unlinked) inputs of the\n *                     parsed graph will be returned here. It is to be freed\n *                     by the caller using avfilter_inout_free().\n * @param[out] outputs a linked list of all free (unlinked) outputs of the\n *                     parsed graph will be returned here. It is to be freed by the\n *                     caller using avfilter_inout_free().\n * @return zero on success, a negative AVERROR code on error\n *\n * @note This function returns the inputs and outputs that are left\n * unlinked after parsing the graph and the caller then deals with\n * them.\n * @note This function makes no reference whatsoever to already\n * existing parts of the graph and the inputs parameter will on return\n * contain inputs of the newly parsed part of the graph.  Analogously\n * the outputs parameter will contain outputs of the newly created\n * filters.\n */\nint avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,\n                          AVFilterInOut **inputs,\n                          AVFilterInOut **outputs);\n\n/**\n * Send a command to one or more filter instances.\n *\n * @param graph  the filter graph\n * @param target the filter(s) to which the command should be sent\n *               \"all\" sends to all filters\n *               otherwise it can be a filter or filter instance name\n *               which will send the command to all matching filters.\n * @param cmd    the command to send, for handling simplicity all commands must be alphanumeric only\n * @param arg    the argument for the command\n * @param res    a buffer with size res_size where the filter(s) can return a response.\n *\n * @returns >=0 on success otherwise an error code.\n *              AVERROR(ENOSYS) on unsupported commands\n */\nint avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags);\n\n/**\n * Queue a command for one or more filter instances.\n *\n * @param graph  the filter graph\n * @param target the filter(s) to which the command should be sent\n *               \"all\" sends to all filters\n *               otherwise it can be a filter or filter instance name\n *               which will send the command to all matching filters.\n * @param cmd    the command to sent, for handling simplicity all commands must be alphanumeric only\n * @param arg    the argument for the command\n * @param ts     time at which the command should be sent to the filter\n *\n * @note As this executes commands after this function returns, no return code\n *       from the filter is provided, also AVFILTER_CMD_FLAG_ONE is not supported.\n */\nint avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, int flags, double ts);\n\n\n/**\n * Dump a graph into a human-readable string representation.\n *\n * @param graph    the graph to dump\n * @param options  formatting options; currently ignored\n * @return  a string, or NULL in case of memory allocation failure;\n *          the string must be freed using av_free\n */\nchar *avfilter_graph_dump(AVFilterGraph *graph, const char *options);\n\n/**\n * Request a frame on the oldest sink link.\n *\n * If the request returns AVERROR_EOF, try the next.\n *\n * Note that this function is not meant to be the sole scheduling mechanism\n * of a filtergraph, only a convenience function to help drain a filtergraph\n * in a balanced way under normal circumstances.\n *\n * Also note that AVERROR_EOF does not mean that frames did not arrive on\n * some of the sinks during the process.\n * When there are multiple sink links, in case the requested link\n * returns an EOF, this may cause a filter to flush pending frames\n * which are sent to another sink link, although unrequested.\n *\n * @return  the return value of ff_request_frame(),\n *          or AVERROR_EOF if all links returned AVERROR_EOF\n */\nint avfilter_graph_request_oldest(AVFilterGraph *graph);\n\n/**\n * @}\n */\n\n#endif /* AVFILTER_AVFILTER_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavfilter/avfiltergraph.h",
    "content": "/*\n * Filter graphs\n * copyright (c) 2007 Bobby Bingham\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVFILTER_AVFILTERGRAPH_H\n#define AVFILTER_AVFILTERGRAPH_H\n\n#include \"avfilter.h\"\n#include \"libavutil/log.h\"\n\n#endif /* AVFILTER_AVFILTERGRAPH_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavfilter/buffersink.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVFILTER_BUFFERSINK_H\n#define AVFILTER_BUFFERSINK_H\n\n/**\n * @file\n * @ingroup lavfi_buffersink\n * memory buffer sink API for audio and video\n */\n\n#include \"avfilter.h\"\n\n/**\n * @defgroup lavfi_buffersink Buffer sink API\n * @ingroup lavfi\n * @{\n */\n\n/**\n * Get a frame with filtered data from sink and put it in frame.\n *\n * @param ctx    pointer to a buffersink or abuffersink filter context.\n * @param frame  pointer to an allocated frame that will be filled with data.\n *               The data must be freed using av_frame_unref() / av_frame_free()\n * @param flags  a combination of AV_BUFFERSINK_FLAG_* flags\n *\n * @return  >= 0 in for success, a negative AVERROR code for failure.\n */\nint av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags);\n\n/**\n * Tell av_buffersink_get_buffer_ref() to read video/samples buffer\n * reference, but not remove it from the buffer. This is useful if you\n * need only to read a video/samples buffer, without to fetch it.\n */\n#define AV_BUFFERSINK_FLAG_PEEK 1\n\n/**\n * Tell av_buffersink_get_buffer_ref() not to request a frame from its input.\n * If a frame is already buffered, it is read (and removed from the buffer),\n * but if no frame is present, return AVERROR(EAGAIN).\n */\n#define AV_BUFFERSINK_FLAG_NO_REQUEST 2\n\n/**\n * Struct to use for initializing a buffersink context.\n */\ntypedef struct {\n    const enum AVPixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by AV_PIX_FMT_NONE\n} AVBufferSinkParams;\n\n/**\n * Create an AVBufferSinkParams structure.\n *\n * Must be freed with av_free().\n */\nAVBufferSinkParams *av_buffersink_params_alloc(void);\n\n/**\n * Struct to use for initializing an abuffersink context.\n */\ntypedef struct {\n    const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE\n    const int64_t *channel_layouts;         ///< list of allowed channel layouts, terminated by -1\n    const int *channel_counts;              ///< list of allowed channel counts, terminated by -1\n    int all_channel_counts;                 ///< if not 0, accept any channel count or layout\n    int *sample_rates;                      ///< list of allowed sample rates, terminated by -1\n} AVABufferSinkParams;\n\n/**\n * Create an AVABufferSinkParams structure.\n *\n * Must be freed with av_free().\n */\nAVABufferSinkParams *av_abuffersink_params_alloc(void);\n\n/**\n * Set the frame size for an audio buffer sink.\n *\n * All calls to av_buffersink_get_buffer_ref will return a buffer with\n * exactly the specified number of samples, or AVERROR(EAGAIN) if there is\n * not enough. The last buffer at EOF will be padded with 0.\n */\nvoid av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size);\n\n/**\n * Get the frame rate of the input.\n */\nAVRational av_buffersink_get_frame_rate(AVFilterContext *ctx);\n\n/**\n * Get a frame with filtered data from sink and put it in frame.\n *\n * @param ctx pointer to a context of a buffersink or abuffersink AVFilter.\n * @param frame pointer to an allocated frame that will be filled with data.\n *              The data must be freed using av_frame_unref() / av_frame_free()\n *\n * @return\n *         - >= 0 if a frame was successfully returned.\n *         - AVERROR(EAGAIN) if no frames are available at this point; more\n *           input frames must be added to the filtergraph to get more output.\n *         - AVERROR_EOF if there will be no more output frames on this sink.\n *         - A different negative AVERROR code in other failure cases.\n */\nint av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame);\n\n/**\n * Same as av_buffersink_get_frame(), but with the ability to specify the number\n * of samples read. This function is less efficient than\n * av_buffersink_get_frame(), because it copies the data around.\n *\n * @param ctx pointer to a context of the abuffersink AVFilter.\n * @param frame pointer to an allocated frame that will be filled with data.\n *              The data must be freed using av_frame_unref() / av_frame_free()\n *              frame will contain exactly nb_samples audio samples, except at\n *              the end of stream, when it can contain less than nb_samples.\n *\n * @return The return codes have the same meaning as for\n *         av_buffersink_get_samples().\n *\n * @warning do not mix this function with av_buffersink_get_frame(). Use only one or\n * the other with a single sink, not both.\n */\nint av_buffersink_get_samples(AVFilterContext *ctx, AVFrame *frame, int nb_samples);\n\n/**\n * @}\n */\n\n#endif /* AVFILTER_BUFFERSINK_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavfilter/buffersrc.h",
    "content": "/*\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVFILTER_BUFFERSRC_H\n#define AVFILTER_BUFFERSRC_H\n\n/**\n * @file\n * @ingroup lavfi_buffersrc\n * Memory buffer source API.\n */\n\n#include \"libavcodec/avcodec.h\"\n#include \"avfilter.h\"\n\n/**\n * @defgroup lavfi_buffersrc Buffer source API\n * @ingroup lavfi\n * @{\n */\n\nenum {\n\n    /**\n     * Do not check for format changes.\n     */\n    AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1,\n\n    /**\n     * Immediately push the frame to the output.\n     */\n    AV_BUFFERSRC_FLAG_PUSH = 4,\n\n    /**\n     * Keep a reference to the frame.\n     * If the frame if reference-counted, create a new reference; otherwise\n     * copy the frame data.\n     */\n    AV_BUFFERSRC_FLAG_KEEP_REF = 8,\n\n};\n\n/**\n * Get the number of failed requests.\n *\n * A failed request is when the request_frame method is called while no\n * frame is present in the buffer.\n * The number is reset when a frame is added.\n */\nunsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src);\n\n/**\n * Add a frame to the buffer source.\n *\n * @param ctx   an instance of the buffersrc filter\n * @param frame frame to be added. If the frame is reference counted, this\n * function will make a new reference to it. Otherwise the frame data will be\n * copied.\n *\n * @return 0 on success, a negative AVERROR on error\n *\n * This function is equivalent to av_buffersrc_add_frame_flags() with the\n * AV_BUFFERSRC_FLAG_KEEP_REF flag.\n */\nav_warn_unused_result\nint av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame);\n\n/**\n * Add a frame to the buffer source.\n *\n * @param ctx   an instance of the buffersrc filter\n * @param frame frame to be added. If the frame is reference counted, this\n * function will take ownership of the reference(s) and reset the frame.\n * Otherwise the frame data will be copied. If this function returns an error,\n * the input frame is not touched.\n *\n * @return 0 on success, a negative AVERROR on error.\n *\n * @note the difference between this function and av_buffersrc_write_frame() is\n * that av_buffersrc_write_frame() creates a new reference to the input frame,\n * while this function takes ownership of the reference passed to it.\n *\n * This function is equivalent to av_buffersrc_add_frame_flags() without the\n * AV_BUFFERSRC_FLAG_KEEP_REF flag.\n */\nav_warn_unused_result\nint av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame);\n\n/**\n * Add a frame to the buffer source.\n *\n * By default, if the frame is reference-counted, this function will take\n * ownership of the reference(s) and reset the frame. This can be controlled\n * using the flags.\n *\n * If this function returns an error, the input frame is not touched.\n *\n * @param buffer_src  pointer to a buffer source context\n * @param frame       a frame, or NULL to mark EOF\n * @param flags       a combination of AV_BUFFERSRC_FLAG_*\n * @return            >= 0 in case of success, a negative AVERROR code\n *                    in case of failure\n */\nav_warn_unused_result\nint av_buffersrc_add_frame_flags(AVFilterContext *buffer_src,\n                                 AVFrame *frame, int flags);\n\n\n/**\n * @}\n */\n\n#endif /* AVFILTER_BUFFERSRC_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavfilter/version.h",
    "content": "/*\n * Version macros.\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVFILTER_VERSION_H\n#define AVFILTER_VERSION_H\n\n/**\n * @file\n * @ingroup lavfi\n * Libavfilter version macros\n */\n\n#include \"libavutil/version.h\"\n\n#define LIBAVFILTER_VERSION_MAJOR   6\n#define LIBAVFILTER_VERSION_MINOR  22\n#define LIBAVFILTER_VERSION_MICRO 100\n\n#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \\\n                                               LIBAVFILTER_VERSION_MINOR, \\\n                                               LIBAVFILTER_VERSION_MICRO)\n#define LIBAVFILTER_VERSION     AV_VERSION(LIBAVFILTER_VERSION_MAJOR,   \\\n                                           LIBAVFILTER_VERSION_MINOR,   \\\n                                           LIBAVFILTER_VERSION_MICRO)\n#define LIBAVFILTER_BUILD       LIBAVFILTER_VERSION_INT\n\n#define LIBAVFILTER_IDENT       \"Lavfi\" AV_STRINGIFY(LIBAVFILTER_VERSION)\n\n/**\n * FF_API_* defines may be placed below to indicate public API that will be\n * dropped at a future version bump. The defines themselves are not part of\n * the public API and may change, break or disappear at any time.\n */\n\n#ifndef FF_API_OLD_FILTER_OPTS\n#define FF_API_OLD_FILTER_OPTS              (LIBAVFILTER_VERSION_MAJOR < 7)\n#endif\n#ifndef FF_API_OLD_FILTER_OPTS_ERROR\n#define FF_API_OLD_FILTER_OPTS_ERROR        (LIBAVFILTER_VERSION_MAJOR < 7)\n#endif\n#ifndef FF_API_AVFILTER_OPEN\n#define FF_API_AVFILTER_OPEN                (LIBAVFILTER_VERSION_MAJOR < 7)\n#endif\n#ifndef FF_API_AVFILTER_INIT_FILTER\n#define FF_API_AVFILTER_INIT_FILTER         (LIBAVFILTER_VERSION_MAJOR < 7)\n#endif\n#ifndef FF_API_OLD_FILTER_REGISTER\n#define FF_API_OLD_FILTER_REGISTER          (LIBAVFILTER_VERSION_MAJOR < 7)\n#endif\n#ifndef FF_API_NOCONST_GET_NAME\n#define FF_API_NOCONST_GET_NAME             (LIBAVFILTER_VERSION_MAJOR < 7)\n#endif\n\n#endif /* AVFILTER_VERSION_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavformat/avformat.h",
    "content": "/*\n * copyright (c) 2001 Fabrice Bellard\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVFORMAT_AVFORMAT_H\n#define AVFORMAT_AVFORMAT_H\n\n/**\n * @file\n * @ingroup libavf\n * Main libavformat public API header\n */\n\n/**\n * @defgroup libavf I/O and Muxing/Demuxing Library\n * @{\n *\n * Libavformat (lavf) is a library for dealing with various media container\n * formats. Its main two purposes are demuxing - i.e. splitting a media file\n * into component streams, and the reverse process of muxing - writing supplied\n * data in a specified container format. It also has an @ref lavf_io\n * \"I/O module\" which supports a number of protocols for accessing the data (e.g.\n * file, tcp, http and others). Before using lavf, you need to call\n * av_register_all() to register all compiled muxers, demuxers and protocols.\n * Unless you are absolutely sure you won't use libavformat's network\n * capabilities, you should also call avformat_network_init().\n *\n * A supported input format is described by an AVInputFormat struct, conversely\n * an output format is described by AVOutputFormat. You can iterate over all\n * registered input/output formats using the av_iformat_next() /\n * av_oformat_next() functions. The protocols layer is not part of the public\n * API, so you can only get the names of supported protocols with the\n * avio_enum_protocols() function.\n *\n * Main lavf structure used for both muxing and demuxing is AVFormatContext,\n * which exports all information about the file being read or written. As with\n * most Libavformat structures, its size is not part of public ABI, so it cannot be\n * allocated on stack or directly with av_malloc(). To create an\n * AVFormatContext, use avformat_alloc_context() (some functions, like\n * avformat_open_input() might do that for you).\n *\n * Most importantly an AVFormatContext contains:\n * @li the @ref AVFormatContext.iformat \"input\" or @ref AVFormatContext.oformat\n * \"output\" format. It is either autodetected or set by user for input;\n * always set by user for output.\n * @li an @ref AVFormatContext.streams \"array\" of AVStreams, which describe all\n * elementary streams stored in the file. AVStreams are typically referred to\n * using their index in this array.\n * @li an @ref AVFormatContext.pb \"I/O context\". It is either opened by lavf or\n * set by user for input, always set by user for output (unless you are dealing\n * with an AVFMT_NOFILE format).\n *\n * @section lavf_options Passing options to (de)muxers\n * It is possible to configure lavf muxers and demuxers using the @ref avoptions\n * mechanism. Generic (format-independent) libavformat options are provided by\n * AVFormatContext, they can be examined from a user program by calling\n * av_opt_next() / av_opt_find() on an allocated AVFormatContext (or its AVClass\n * from avformat_get_class()). Private (format-specific) options are provided by\n * AVFormatContext.priv_data if and only if AVInputFormat.priv_class /\n * AVOutputFormat.priv_class of the corresponding format struct is non-NULL.\n * Further options may be provided by the @ref AVFormatContext.pb \"I/O context\",\n * if its AVClass is non-NULL, and the protocols layer. See the discussion on\n * nesting in @ref avoptions documentation to learn how to access those.\n *\n * @defgroup lavf_decoding Demuxing\n * @{\n * Demuxers read a media file and split it into chunks of data (@em packets). A\n * @ref AVPacket \"packet\" contains one or more encoded frames which belongs to a\n * single elementary stream. In the lavf API this process is represented by the\n * avformat_open_input() function for opening a file, av_read_frame() for\n * reading a single packet and finally avformat_close_input(), which does the\n * cleanup.\n *\n * @section lavf_decoding_open Opening a media file\n * The minimum information required to open a file is its URL or filename, which\n * is passed to avformat_open_input(), as in the following code:\n * @code\n * const char    *url = \"in.mp3\";\n * AVFormatContext *s = NULL;\n * int ret = avformat_open_input(&s, url, NULL, NULL);\n * if (ret < 0)\n *     abort();\n * @endcode\n * The above code attempts to allocate an AVFormatContext, open the\n * specified file (autodetecting the format) and read the header, exporting the\n * information stored there into s. Some formats do not have a header or do not\n * store enough information there, so it is recommended that you call the\n * avformat_find_stream_info() function which tries to read and decode a few\n * frames to find missing information.\n *\n * In some cases you might want to preallocate an AVFormatContext yourself with\n * avformat_alloc_context() and do some tweaking on it before passing it to\n * avformat_open_input(). One such case is when you want to use custom functions\n * for reading input data instead of lavf internal I/O layer.\n * To do that, create your own AVIOContext with avio_alloc_context(), passing\n * your reading callbacks to it. Then set the @em pb field of your\n * AVFormatContext to newly created AVIOContext.\n *\n * Since the format of the opened file is in general not known until after\n * avformat_open_input() has returned, it is not possible to set demuxer private\n * options on a preallocated context. Instead, the options should be passed to\n * avformat_open_input() wrapped in an AVDictionary:\n * @code\n * AVDictionary *options = NULL;\n * av_dict_set(&options, \"video_size\", \"640x480\", 0);\n * av_dict_set(&options, \"pixel_format\", \"rgb24\", 0);\n *\n * if (avformat_open_input(&s, url, NULL, &options) < 0)\n *     abort();\n * av_dict_free(&options);\n * @endcode\n * This code passes the private options 'video_size' and 'pixel_format' to the\n * demuxer. They would be necessary for e.g. the rawvideo demuxer, since it\n * cannot know how to interpret raw video data otherwise. If the format turns\n * out to be something different than raw video, those options will not be\n * recognized by the demuxer and therefore will not be applied. Such unrecognized\n * options are then returned in the options dictionary (recognized options are\n * consumed). The calling program can handle such unrecognized options as it\n * wishes, e.g.\n * @code\n * AVDictionaryEntry *e;\n * if (e = av_dict_get(options, \"\", NULL, AV_DICT_IGNORE_SUFFIX)) {\n *     fprintf(stderr, \"Option %s not recognized by the demuxer.\\n\", e->key);\n *     abort();\n * }\n * @endcode\n *\n * After you have finished reading the file, you must close it with\n * avformat_close_input(). It will free everything associated with the file.\n *\n * @section lavf_decoding_read Reading from an opened file\n * Reading data from an opened AVFormatContext is done by repeatedly calling\n * av_read_frame() on it. Each call, if successful, will return an AVPacket\n * containing encoded data for one AVStream, identified by\n * AVPacket.stream_index. This packet may be passed straight into the libavcodec\n * decoding functions avcodec_decode_video2(), avcodec_decode_audio4() or\n * avcodec_decode_subtitle2() if the caller wishes to decode the data.\n *\n * AVPacket.pts, AVPacket.dts and AVPacket.duration timing information will be\n * set if known. They may also be unset (i.e. AV_NOPTS_VALUE for\n * pts/dts, 0 for duration) if the stream does not provide them. The timing\n * information will be in AVStream.time_base units, i.e. it has to be\n * multiplied by the timebase to convert them to seconds.\n *\n * If AVPacket.buf is set on the returned packet, then the packet is\n * allocated dynamically and the user may keep it indefinitely.\n * Otherwise, if AVPacket.buf is NULL, the packet data is backed by a\n * static storage somewhere inside the demuxer and the packet is only valid\n * until the next av_read_frame() call or closing the file. If the caller\n * requires a longer lifetime, av_dup_packet() will make an av_malloc()ed copy\n * of it.\n * In both cases, the packet must be freed with av_packet_unref() when it is no\n * longer needed.\n *\n * @section lavf_decoding_seek Seeking\n * @}\n *\n * @defgroup lavf_encoding Muxing\n * @{\n * Muxers take encoded data in the form of @ref AVPacket \"AVPackets\" and write\n * it into files or other output bytestreams in the specified container format.\n *\n * The main API functions for muxing are avformat_write_header() for writing the\n * file header, av_write_frame() / av_interleaved_write_frame() for writing the\n * packets and av_write_trailer() for finalizing the file.\n *\n * At the beginning of the muxing process, the caller must first call\n * avformat_alloc_context() to create a muxing context. The caller then sets up\n * the muxer by filling the various fields in this context:\n *\n * - The @ref AVFormatContext.oformat \"oformat\" field must be set to select the\n *   muxer that will be used.\n * - Unless the format is of the AVFMT_NOFILE type, the @ref AVFormatContext.pb\n *   \"pb\" field must be set to an opened IO context, either returned from\n *   avio_open2() or a custom one.\n * - Unless the format is of the AVFMT_NOSTREAMS type, at least one stream must\n *   be created with the avformat_new_stream() function. The caller should fill\n *   the @ref AVStream.codec \"stream codec context\" information, such as the\n *   codec @ref AVCodecContext.codec_type \"type\", @ref AVCodecContext.codec_id\n *   \"id\" and other parameters (e.g. width / height, the pixel or sample format,\n *   etc.) as known. The @ref AVStream.time_base \"stream timebase\" should\n *   be set to the timebase that the caller desires to use for this stream (note\n *   that the timebase actually used by the muxer can be different, as will be\n *   described later).\n * - It is advised to manually initialize only the relevant fields in\n *   AVCodecContext, rather than using @ref avcodec_copy_context() during\n *   remuxing: there is no guarantee that the codec context values remain valid\n *   for both input and output format contexts.\n * - The caller may fill in additional information, such as @ref\n *   AVFormatContext.metadata \"global\" or @ref AVStream.metadata \"per-stream\"\n *   metadata, @ref AVFormatContext.chapters \"chapters\", @ref\n *   AVFormatContext.programs \"programs\", etc. as described in the\n *   AVFormatContext documentation. Whether such information will actually be\n *   stored in the output depends on what the container format and the muxer\n *   support.\n *\n * When the muxing context is fully set up, the caller must call\n * avformat_write_header() to initialize the muxer internals and write the file\n * header. Whether anything actually is written to the IO context at this step\n * depends on the muxer, but this function must always be called. Any muxer\n * private options must be passed in the options parameter to this function.\n *\n * The data is then sent to the muxer by repeatedly calling av_write_frame() or\n * av_interleaved_write_frame() (consult those functions' documentation for\n * discussion on the difference between them; only one of them may be used with\n * a single muxing context, they should not be mixed). Do note that the timing\n * information on the packets sent to the muxer must be in the corresponding\n * AVStream's timebase. That timebase is set by the muxer (in the\n * avformat_write_header() step) and may be different from the timebase\n * requested by the caller.\n *\n * Once all the data has been written, the caller must call av_write_trailer()\n * to flush any buffered packets and finalize the output file, then close the IO\n * context (if any) and finally free the muxing context with\n * avformat_free_context().\n * @}\n *\n * @defgroup lavf_io I/O Read/Write\n * @{\n * @section lavf_io_dirlist Directory listing\n * The directory listing API makes it possible to list files on remote servers.\n *\n * Some of possible use cases:\n * - an \"open file\" dialog to choose files from a remote location,\n * - a recursive media finder providing a player with an ability to play all\n * files from a given directory.\n *\n * @subsection lavf_io_dirlist_open Opening a directory\n * At first, a directory needs to be opened by calling avio_open_dir()\n * supplied with a URL and, optionally, ::AVDictionary containing\n * protocol-specific parameters. The function returns zero or positive\n * integer and allocates AVIODirContext on success.\n *\n * @code\n * AVIODirContext *ctx = NULL;\n * if (avio_open_dir(&ctx, \"smb://example.com/some_dir\", NULL) < 0) {\n *     fprintf(stderr, \"Cannot open directory.\\n\");\n *     abort();\n * }\n * @endcode\n *\n * This code tries to open a sample directory using smb protocol without\n * any additional parameters.\n *\n * @subsection lavf_io_dirlist_read Reading entries\n * Each directory's entry (i.e. file, another directory, anything else\n * within ::AVIODirEntryType) is represented by AVIODirEntry.\n * Reading consecutive entries from an opened AVIODirContext is done by\n * repeatedly calling avio_read_dir() on it. Each call returns zero or\n * positive integer if successful. Reading can be stopped right after the\n * NULL entry has been read -- it means there are no entries left to be\n * read. The following code reads all entries from a directory associated\n * with ctx and prints their names to standard output.\n * @code\n * AVIODirEntry *entry = NULL;\n * for (;;) {\n *     if (avio_read_dir(ctx, &entry) < 0) {\n *         fprintf(stderr, \"Cannot list directory.\\n\");\n *         abort();\n *     }\n *     if (!entry)\n *         break;\n *     printf(\"%s\\n\", entry->name);\n *     avio_free_directory_entry(&entry);\n * }\n * @endcode\n * @}\n *\n * @defgroup lavf_codec Demuxers\n * @{\n * @defgroup lavf_codec_native Native Demuxers\n * @{\n * @}\n * @defgroup lavf_codec_wrappers External library wrappers\n * @{\n * @}\n * @}\n * @defgroup lavf_protos I/O Protocols\n * @{\n * @}\n * @defgroup lavf_internal Internal\n * @{\n * @}\n * @}\n *\n */\n\n#include <time.h>\n#include <stdio.h>  /* FILE */\n#include \"libavcodec/avcodec.h\"\n#include \"libavutil/dict.h\"\n#include \"libavutil/log.h\"\n\n#include \"avio.h\"\n#include \"libavformat/version.h\"\n\nstruct AVFormatContext;\n\nstruct AVDeviceInfoList;\nstruct AVDeviceCapabilitiesQuery;\n\n/**\n * @defgroup metadata_api Public Metadata API\n * @{\n * @ingroup libavf\n * The metadata API allows libavformat to export metadata tags to a client\n * application when demuxing. Conversely it allows a client application to\n * set metadata when muxing.\n *\n * Metadata is exported or set as pairs of key/value strings in the 'metadata'\n * fields of the AVFormatContext, AVStream, AVChapter and AVProgram structs\n * using the @ref lavu_dict \"AVDictionary\" API. Like all strings in FFmpeg,\n * metadata is assumed to be UTF-8 encoded Unicode. Note that metadata\n * exported by demuxers isn't checked to be valid UTF-8 in most cases.\n *\n * Important concepts to keep in mind:\n * -  Keys are unique; there can never be 2 tags with the same key. This is\n *    also meant semantically, i.e., a demuxer should not knowingly produce\n *    several keys that are literally different but semantically identical.\n *    E.g., key=Author5, key=Author6. In this example, all authors must be\n *    placed in the same tag.\n * -  Metadata is flat, not hierarchical; there are no subtags. If you\n *    want to store, e.g., the email address of the child of producer Alice\n *    and actor Bob, that could have key=alice_and_bobs_childs_email_address.\n * -  Several modifiers can be applied to the tag name. This is done by\n *    appending a dash character ('-') and the modifier name in the order\n *    they appear in the list below -- e.g. foo-eng-sort, not foo-sort-eng.\n *    -  language -- a tag whose value is localized for a particular language\n *       is appended with the ISO 639-2/B 3-letter language code.\n *       For example: Author-ger=Michael, Author-eng=Mike\n *       The original/default language is in the unqualified \"Author\" tag.\n *       A demuxer should set a default if it sets any translated tag.\n *    -  sorting  -- a modified version of a tag that should be used for\n *       sorting will have '-sort' appended. E.g. artist=\"The Beatles\",\n *       artist-sort=\"Beatles, The\".\n * - Some protocols and demuxers support metadata updates. After a successful\n *   call to av_read_packet(), AVFormatContext.event_flags or AVStream.event_flags\n *   will be updated to indicate if metadata changed. In order to detect metadata\n *   changes on a stream, you need to loop through all streams in the AVFormatContext\n *   and check their individual event_flags.\n *\n * -  Demuxers attempt to export metadata in a generic format, however tags\n *    with no generic equivalents are left as they are stored in the container.\n *    Follows a list of generic tag names:\n *\n @verbatim\n album        -- name of the set this work belongs to\n album_artist -- main creator of the set/album, if different from artist.\n                 e.g. \"Various Artists\" for compilation albums.\n artist       -- main creator of the work\n comment      -- any additional description of the file.\n composer     -- who composed the work, if different from artist.\n copyright    -- name of copyright holder.\n creation_time-- date when the file was created, preferably in ISO 8601.\n date         -- date when the work was created, preferably in ISO 8601.\n disc         -- number of a subset, e.g. disc in a multi-disc collection.\n encoder      -- name/settings of the software/hardware that produced the file.\n encoded_by   -- person/group who created the file.\n filename     -- original name of the file.\n genre        -- <self-evident>.\n language     -- main language in which the work is performed, preferably\n                 in ISO 639-2 format. Multiple languages can be specified by\n                 separating them with commas.\n performer    -- artist who performed the work, if different from artist.\n                 E.g for \"Also sprach Zarathustra\", artist would be \"Richard\n                 Strauss\" and performer \"London Philharmonic Orchestra\".\n publisher    -- name of the label/publisher.\n service_name     -- name of the service in broadcasting (channel name).\n service_provider -- name of the service provider in broadcasting.\n title        -- name of the work.\n track        -- number of this work in the set, can be in form current/total.\n variant_bitrate -- the total bitrate of the bitrate variant that the current stream is part of\n @endverbatim\n *\n * Look in the examples section for an application example how to use the Metadata API.\n *\n * @}\n */\n\n/* packet functions */\n\n\n/**\n * Allocate and read the payload of a packet and initialize its\n * fields with default values.\n *\n * @param s    associated IO context\n * @param pkt packet\n * @param size desired payload size\n * @return >0 (read size) if OK, AVERROR_xxx otherwise\n */\nint av_get_packet(AVIOContext *s, AVPacket *pkt, int size);\n\n\n/**\n * Read data and append it to the current content of the AVPacket.\n * If pkt->size is 0 this is identical to av_get_packet.\n * Note that this uses av_grow_packet and thus involves a realloc\n * which is inefficient. Thus this function should only be used\n * when there is no reasonable way to know (an upper bound of)\n * the final size.\n *\n * @param s    associated IO context\n * @param pkt packet\n * @param size amount of data to read\n * @return >0 (read size) if OK, AVERROR_xxx otherwise, previous data\n *         will not be lost even if an error occurs.\n */\nint av_append_packet(AVIOContext *s, AVPacket *pkt, int size);\n\n#if FF_API_LAVF_FRAC\n/*************************************************/\n/* fractional numbers for exact pts handling */\n\n/**\n * The exact value of the fractional number is: 'val + num / den'.\n * num is assumed to be 0 <= num < den.\n */\ntypedef struct AVFrac {\n    int64_t val, num, den;\n} AVFrac;\n#endif\n\n/*************************************************/\n/* input/output formats */\n\nstruct AVCodecTag;\n\n/**\n * This structure contains the data a format has to probe a file.\n */\ntypedef struct AVProbeData {\n    const char *filename;\n    unsigned char *buf; /**< Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero. */\n    int buf_size;       /**< Size of buf except extra allocated bytes */\n    const char *mime_type; /**< mime_type, when known. */\n} AVProbeData;\n\n#define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4)\n#define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1)\n\n#define AVPROBE_SCORE_EXTENSION  50 ///< score for file extension\n#define AVPROBE_SCORE_MIME       75 ///< score for file mime type\n#define AVPROBE_SCORE_MAX       100 ///< maximum score\n\n#define AVPROBE_PADDING_SIZE 32             ///< extra allocated bytes at the end of the probe buffer\n\n/// Demuxer will use avio_open, no opened file should be provided by the caller.\n#define AVFMT_NOFILE        0x0001\n#define AVFMT_NEEDNUMBER    0x0002 /**< Needs '%d' in filename. */\n#define AVFMT_SHOW_IDS      0x0008 /**< Show format stream IDs numbers. */\n#if FF_API_LAVF_FMT_RAWPICTURE\n#define AVFMT_RAWPICTURE    0x0020 /**< Format wants AVPicture structure for\n                                      raw picture data. @deprecated Not used anymore */\n#endif\n#define AVFMT_GLOBALHEADER  0x0040 /**< Format wants global header. */\n#define AVFMT_NOTIMESTAMPS  0x0080 /**< Format does not need / have any timestamps. */\n#define AVFMT_GENERIC_INDEX 0x0100 /**< Use generic index building code. */\n#define AVFMT_TS_DISCONT    0x0200 /**< Format allows timestamp discontinuities. Note, muxers always require valid (monotone) timestamps */\n#define AVFMT_VARIABLE_FPS  0x0400 /**< Format allows variable fps. */\n#define AVFMT_NODIMENSIONS  0x0800 /**< Format does not need width/height */\n#define AVFMT_NOSTREAMS     0x1000 /**< Format does not require any streams */\n#define AVFMT_NOBINSEARCH   0x2000 /**< Format does not allow to fall back on binary search via read_timestamp */\n#define AVFMT_NOGENSEARCH   0x4000 /**< Format does not allow to fall back on generic search */\n#define AVFMT_NO_BYTE_SEEK  0x8000 /**< Format does not allow seeking by bytes */\n#define AVFMT_ALLOW_FLUSH  0x10000 /**< Format allows flushing. If not set, the muxer will not receive a NULL packet in the write_packet function. */\n#define AVFMT_TS_NONSTRICT 0x20000 /**< Format does not require strictly\n                                        increasing timestamps, but they must\n                                        still be monotonic */\n#define AVFMT_TS_NEGATIVE  0x40000 /**< Format allows muxing negative\n                                        timestamps. If not set the timestamp\n                                        will be shifted in av_write_frame and\n                                        av_interleaved_write_frame so they\n                                        start from 0.\n                                        The user or muxer can override this through\n                                        AVFormatContext.avoid_negative_ts\n                                        */\n\n#define AVFMT_SEEK_TO_PTS   0x4000000 /**< Seeking is based on PTS */\n\n/**\n * @addtogroup lavf_encoding\n * @{\n */\ntypedef struct AVOutputFormat {\n    const char *name;\n    /**\n     * Descriptive name for the format, meant to be more human-readable\n     * than name. You should use the NULL_IF_CONFIG_SMALL() macro\n     * to define it.\n     */\n    const char *long_name;\n    const char *mime_type;\n    const char *extensions; /**< comma-separated filename extensions */\n    /* output support */\n    enum AVCodecID audio_codec;    /**< default audio codec */\n    enum AVCodecID video_codec;    /**< default video codec */\n    enum AVCodecID subtitle_codec; /**< default subtitle codec */\n    /**\n     * can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER,\n     * AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS,\n     * AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_ALLOW_FLUSH,\n     * AVFMT_TS_NONSTRICT\n     */\n    int flags;\n\n    /**\n     * List of supported codec_id-codec_tag pairs, ordered by \"better\n     * choice first\". The arrays are all terminated by AV_CODEC_ID_NONE.\n     */\n    const struct AVCodecTag * const *codec_tag;\n\n\n    const AVClass *priv_class; ///< AVClass for the private context\n\n    /*****************************************************************\n     * No fields below this line are part of the public API. They\n     * may not be used outside of libavformat and can be changed and\n     * removed at will.\n     * New public fields should be added right above.\n     *****************************************************************\n     */\n    struct AVOutputFormat *next;\n    /**\n     * size of private data so that it can be allocated in the wrapper\n     */\n    int priv_data_size;\n\n    int (*write_header)(struct AVFormatContext *);\n    /**\n     * Write a packet. If AVFMT_ALLOW_FLUSH is set in flags,\n     * pkt can be NULL in order to flush data buffered in the muxer.\n     * When flushing, return 0 if there still is more data to flush,\n     * or 1 if everything was flushed and there is no more buffered\n     * data.\n     */\n    int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);\n    int (*write_trailer)(struct AVFormatContext *);\n    /**\n     * Currently only used to set pixel format if not YUV420P.\n     */\n    int (*interleave_packet)(struct AVFormatContext *, AVPacket *out,\n                             AVPacket *in, int flush);\n    /**\n     * Test if the given codec can be stored in this container.\n     *\n     * @return 1 if the codec is supported, 0 if it is not.\n     *         A negative number if unknown.\n     *         MKTAG('A', 'P', 'I', 'C') if the codec is only supported as AV_DISPOSITION_ATTACHED_PIC\n     */\n    int (*query_codec)(enum AVCodecID id, int std_compliance);\n\n    void (*get_output_timestamp)(struct AVFormatContext *s, int stream,\n                                 int64_t *dts, int64_t *wall);\n    /**\n     * Allows sending messages from application to device.\n     */\n    int (*control_message)(struct AVFormatContext *s, int type,\n                           void *data, size_t data_size);\n\n    /**\n     * Write an uncoded AVFrame.\n     *\n     * See av_write_uncoded_frame() for details.\n     *\n     * The library will free *frame afterwards, but the muxer can prevent it\n     * by setting the pointer to NULL.\n     */\n    int (*write_uncoded_frame)(struct AVFormatContext *, int stream_index,\n                               AVFrame **frame, unsigned flags);\n    /**\n     * Returns device list with it properties.\n     * @see avdevice_list_devices() for more details.\n     */\n    int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);\n    /**\n     * Initialize device capabilities submodule.\n     * @see avdevice_capabilities_create() for more details.\n     */\n    int (*create_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps);\n    /**\n     * Free device capabilities submodule.\n     * @see avdevice_capabilities_free() for more details.\n     */\n    int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps);\n    enum AVCodecID data_codec; /**< default data codec */\n    /**\n     * Initialize format. May allocate data here, and set any AVFormatContext or\n     * AVStream parameters that need to be set before packets are sent.\n     * This method must not write output.\n     *\n     * Any allocations made here must be freed in deinit().\n     */\n    int (*init)(struct AVFormatContext *);\n    /**\n     * Deinitialize format. If present, this is called whenever the muxer is being\n     * destroyed, regardless of whether or not the header has been written.\n     *\n     * If a trailer is being written, this is called after write_trailer().\n     *\n     * This is called if init() fails as well.\n     */\n    void (*deinit)(struct AVFormatContext *);\n    /**\n     * Set up any necessary bitstream filtering and extract any extra data needed\n     * for the global header.\n     * Return 0 if more packets from this stream must be checked; 1 if not.\n     */\n    int (*check_bitstream)(struct AVFormatContext *, const AVPacket *pkt);\n} AVOutputFormat;\n/**\n * @}\n */\n\n/**\n * @addtogroup lavf_decoding\n * @{\n */\ntypedef struct AVInputFormat {\n    /**\n     * A comma separated list of short names for the format. New names\n     * may be appended with a minor bump.\n     */\n    const char *name;\n\n    /**\n     * Descriptive name for the format, meant to be more human-readable\n     * than name. You should use the NULL_IF_CONFIG_SMALL() macro\n     * to define it.\n     */\n    const char *long_name;\n\n    /**\n     * Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS,\n     * AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH,\n     * AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS.\n     */\n    int flags;\n\n    /**\n     * If extensions are defined, then no probe is done. You should\n     * usually not use extension format guessing because it is not\n     * reliable enough\n     */\n    const char *extensions;\n\n    const struct AVCodecTag * const *codec_tag;\n\n    const AVClass *priv_class; ///< AVClass for the private context\n\n    /**\n     * Comma-separated list of mime types.\n     * It is used check for matching mime types while probing.\n     * @see av_probe_input_format2\n     */\n    const char *mime_type;\n\n    /*****************************************************************\n     * No fields below this line are part of the public API. They\n     * may not be used outside of libavformat and can be changed and\n     * removed at will.\n     * New public fields should be added right above.\n     *****************************************************************\n     */\n    struct AVInputFormat *next;\n\n    /**\n     * Raw demuxers store their codec ID here.\n     */\n    int raw_codec_id;\n\n    /**\n     * Size of private data so that it can be allocated in the wrapper.\n     */\n    int priv_data_size;\n\n    /**\n     * Tell if a given file has a chance of being parsed as this format.\n     * The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes\n     * big so you do not have to check for that unless you need more.\n     */\n    int (*read_probe)(AVProbeData *);\n\n    /**\n     * Read the format header and initialize the AVFormatContext\n     * structure. Return 0 if OK. 'avformat_new_stream' should be\n     * called to create new streams.\n     */\n    int (*read_header)(struct AVFormatContext *);\n\n    /**\n     * Read one packet and put it in 'pkt'. pts and flags are also\n     * set. 'avformat_new_stream' can be called only if the flag\n     * AVFMTCTX_NOHEADER is used and only in the calling thread (not in a\n     * background thread).\n     * @return 0 on success, < 0 on error.\n     *         When returning an error, pkt must not have been allocated\n     *         or must be freed before returning\n     */\n    int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);\n\n    /**\n     * Close the stream. The AVFormatContext and AVStreams are not\n     * freed by this function\n     */\n    int (*read_close)(struct AVFormatContext *);\n\n    /**\n     * Seek to a given timestamp relative to the frames in\n     * stream component stream_index.\n     * @param stream_index Must not be -1.\n     * @param flags Selects which direction should be preferred if no exact\n     *              match is available.\n     * @return >= 0 on success (but not necessarily the new offset)\n     */\n    int (*read_seek)(struct AVFormatContext *,\n                     int stream_index, int64_t timestamp, int flags);\n\n    /**\n     * Get the next timestamp in stream[stream_index].time_base units.\n     * @return the timestamp or AV_NOPTS_VALUE if an error occurred\n     */\n    int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,\n                              int64_t *pos, int64_t pos_limit);\n\n    /**\n     * Start/resume playing - only meaningful if using a network-based format\n     * (RTSP).\n     */\n    int (*read_play)(struct AVFormatContext *);\n\n    /**\n     * Pause playing - only meaningful if using a network-based format\n     * (RTSP).\n     */\n    int (*read_pause)(struct AVFormatContext *);\n\n    /**\n     * Seek to timestamp ts.\n     * Seeking will be done so that the point from which all active streams\n     * can be presented successfully will be closest to ts and within min/max_ts.\n     * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.\n     */\n    int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);\n\n    /**\n     * Returns device list with it properties.\n     * @see avdevice_list_devices() for more details.\n     */\n    int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);\n\n    /**\n     * Initialize device capabilities submodule.\n     * @see avdevice_capabilities_create() for more details.\n     */\n    int (*create_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps);\n\n    /**\n     * Free device capabilities submodule.\n     * @see avdevice_capabilities_free() for more details.\n     */\n    int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps);\n} AVInputFormat;\n/**\n * @}\n */\n\nenum AVStreamParseType {\n    AVSTREAM_PARSE_NONE,\n    AVSTREAM_PARSE_FULL,       /**< full parsing and repack */\n    AVSTREAM_PARSE_HEADERS,    /**< Only parse headers, do not repack. */\n    AVSTREAM_PARSE_TIMESTAMPS, /**< full parsing and interpolation of timestamps for frames not starting on a packet boundary */\n    AVSTREAM_PARSE_FULL_ONCE,  /**< full parsing and repack of the first frame only, only implemented for H.264 currently */\n    AVSTREAM_PARSE_FULL_RAW=MKTAG(0,'R','A','W'),       /**< full parsing and repack with timestamp and position generation by parser for raw\n                                                             this assumes that each packet in the file contains no demuxer level headers and\n                                                             just codec level data, otherwise position generation would fail */\n};\n\ntypedef struct AVIndexEntry {\n    int64_t pos;\n    int64_t timestamp;        /**<\n                               * Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are available\n                               * when seeking to this entry. That means preferable PTS on keyframe based formats.\n                               * But demuxers can choose to store a different timestamp, if it is more convenient for the implementation or nothing better\n                               * is known\n                               */\n#define AVINDEX_KEYFRAME 0x0001\n    int flags:2;\n    int size:30; //Yeah, trying to keep the size of this small to reduce memory requirements (it is 24 vs. 32 bytes due to possible 8-byte alignment).\n    int min_distance;         /**< Minimum distance between this and the previous keyframe, used to avoid unneeded searching. */\n} AVIndexEntry;\n\n#define AV_DISPOSITION_DEFAULT   0x0001\n#define AV_DISPOSITION_DUB       0x0002\n#define AV_DISPOSITION_ORIGINAL  0x0004\n#define AV_DISPOSITION_COMMENT   0x0008\n#define AV_DISPOSITION_LYRICS    0x0010\n#define AV_DISPOSITION_KARAOKE   0x0020\n\n/**\n * Track should be used during playback by default.\n * Useful for subtitle track that should be displayed\n * even when user did not explicitly ask for subtitles.\n */\n#define AV_DISPOSITION_FORCED    0x0040\n#define AV_DISPOSITION_HEARING_IMPAIRED  0x0080  /**< stream for hearing impaired audiences */\n#define AV_DISPOSITION_VISUAL_IMPAIRED   0x0100  /**< stream for visual impaired audiences */\n#define AV_DISPOSITION_CLEAN_EFFECTS     0x0200  /**< stream without voice */\n/**\n * The stream is stored in the file as an attached picture/\"cover art\" (e.g.\n * APIC frame in ID3v2). The single packet associated with it will be returned\n * among the first few packets read from the file unless seeking takes place.\n * It can also be accessed at any time in AVStream.attached_pic.\n */\n#define AV_DISPOSITION_ATTACHED_PIC      0x0400\n\ntypedef struct AVStreamInternal AVStreamInternal;\n\n/**\n * To specify text track kind (different from subtitles default).\n */\n#define AV_DISPOSITION_CAPTIONS     0x10000\n#define AV_DISPOSITION_DESCRIPTIONS 0x20000\n#define AV_DISPOSITION_METADATA     0x40000\n\n/**\n * Options for behavior on timestamp wrap detection.\n */\n#define AV_PTS_WRAP_IGNORE      0   ///< ignore the wrap\n#define AV_PTS_WRAP_ADD_OFFSET  1   ///< add the format specific offset on wrap detection\n#define AV_PTS_WRAP_SUB_OFFSET  -1  ///< subtract the format specific offset on wrap detection\n\n/**\n * Stream structure.\n * New fields can be added to the end with minor version bumps.\n * Removal, reordering and changes to existing fields require a major\n * version bump.\n * sizeof(AVStream) must not be used outside libav*.\n */\ntypedef struct AVStream {\n    int index;    /**< stream index in AVFormatContext */\n    /**\n     * Format-specific stream ID.\n     * decoding: set by libavformat\n     * encoding: set by the user, replaced by libavformat if left unset\n     */\n    int id;\n    /**\n     * Codec context associated with this stream. Allocated and freed by\n     * libavformat.\n     *\n     * - decoding: The demuxer exports codec information stored in the headers\n     *             here.\n     * - encoding: The user sets codec information, the muxer writes it to the\n     *             output. Mandatory fields as specified in AVCodecContext\n     *             documentation must be set even if this AVCodecContext is\n     *             not actually used for encoding.\n     */\n    AVCodecContext *codec;\n    void *priv_data;\n\n#if FF_API_LAVF_FRAC\n    /**\n     * @deprecated this field is unused\n     */\n    attribute_deprecated\n    struct AVFrac pts;\n#endif\n\n    /**\n     * This is the fundamental unit of time (in seconds) in terms\n     * of which frame timestamps are represented.\n     *\n     * decoding: set by libavformat\n     * encoding: May be set by the caller before avformat_write_header() to\n     *           provide a hint to the muxer about the desired timebase. In\n     *           avformat_write_header(), the muxer will overwrite this field\n     *           with the timebase that will actually be used for the timestamps\n     *           written into the file (which may or may not be related to the\n     *           user-provided one, depending on the format).\n     */\n    AVRational time_base;\n\n    /**\n     * Decoding: pts of the first frame of the stream in presentation order, in stream time base.\n     * Only set this if you are absolutely 100% sure that the value you set\n     * it to really is the pts of the first frame.\n     * This may be undefined (AV_NOPTS_VALUE).\n     * @note The ASF header does NOT contain a correct start_time the ASF\n     * demuxer must NOT set this.\n     */\n    int64_t start_time;\n\n    /**\n     * Decoding: duration of the stream, in stream time base.\n     * If a source file does not specify a duration, but does specify\n     * a bitrate, this value will be estimated from bitrate and file size.\n     */\n    int64_t duration;\n\n    int64_t nb_frames;                 ///< number of frames in this stream if known or 0\n\n    int disposition; /**< AV_DISPOSITION_* bit field */\n\n    enum AVDiscard discard; ///< Selects which packets can be discarded at will and do not need to be demuxed.\n\n    /**\n     * sample aspect ratio (0 if unknown)\n     * - encoding: Set by user.\n     * - decoding: Set by libavformat.\n     */\n    AVRational sample_aspect_ratio;\n\n    AVDictionary *metadata;\n\n    /**\n     * Average framerate\n     *\n     * - demuxing: May be set by libavformat when creating the stream or in\n     *             avformat_find_stream_info().\n     * - muxing: May be set by the caller before avformat_write_header().\n     */\n    AVRational avg_frame_rate;\n\n    /**\n     * For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet\n     * will contain the attached picture.\n     *\n     * decoding: set by libavformat, must not be modified by the caller.\n     * encoding: unused\n     */\n    AVPacket attached_pic;\n\n    /**\n     * An array of side data that applies to the whole stream (i.e. the\n     * container does not allow it to change between packets).\n     *\n     * There may be no overlap between the side data in this array and side data\n     * in the packets. I.e. a given side data is either exported by the muxer\n     * (demuxing) / set by the caller (muxing) in this array, then it never\n     * appears in the packets, or the side data is exported / sent through\n     * the packets (always in the first packet where the value becomes known or\n     * changes), then it does not appear in this array.\n     *\n     * - demuxing: Set by libavformat when the stream is created.\n     * - muxing: May be set by the caller before avformat_write_header().\n     *\n     * Freed by libavformat in avformat_free_context().\n     *\n     * @see av_format_inject_global_side_data()\n     */\n    AVPacketSideData *side_data;\n    /**\n     * The number of elements in the AVStream.side_data array.\n     */\n    int            nb_side_data;\n\n    /**\n     * Flags for the user to detect events happening on the stream. Flags must\n     * be cleared by the user once the event has been handled.\n     * A combination of AVSTREAM_EVENT_FLAG_*.\n     */\n    int event_flags;\n#define AVSTREAM_EVENT_FLAG_METADATA_UPDATED 0x0001 ///< The call resulted in updated metadata.\n\n    /*****************************************************************\n     * All fields below this line are not part of the public API. They\n     * may not be used outside of libavformat and can be changed and\n     * removed at will.\n     * New public fields should be added right above.\n     *****************************************************************\n     */\n\n    /**\n     * Stream information used internally by av_find_stream_info()\n     */\n#define MAX_STD_TIMEBASES (30*12+7+6)\n    struct {\n        int64_t last_dts;\n        int64_t duration_gcd;\n        int duration_count;\n        int64_t rfps_duration_sum;\n        double (*duration_error)[2][MAX_STD_TIMEBASES];\n        int64_t codec_info_duration;\n        int64_t codec_info_duration_fields;\n\n        /**\n         * 0  -> decoder has not been searched for yet.\n         * >0 -> decoder found\n         * <0 -> decoder with codec_id == -found_decoder has not been found\n         */\n        int found_decoder;\n\n        int64_t last_duration;\n\n        /**\n         * Those are used for average framerate estimation.\n         */\n        int64_t fps_first_dts;\n        int     fps_first_dts_idx;\n        int64_t fps_last_dts;\n        int     fps_last_dts_idx;\n\n    } *info;\n\n    int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */\n\n    // Timestamp generation support:\n    /**\n     * Timestamp corresponding to the last dts sync point.\n     *\n     * Initialized when AVCodecParserContext.dts_sync_point >= 0 and\n     * a DTS is received from the underlying container. Otherwise set to\n     * AV_NOPTS_VALUE by default.\n     */\n    int64_t first_dts;\n    int64_t cur_dts;\n    int64_t last_IP_pts;\n    int last_IP_duration;\n\n    /**\n     * Number of packets to buffer for codec probing\n     */\n    int probe_packets;\n\n    /**\n     * Number of frames that have been demuxed during av_find_stream_info()\n     */\n    int codec_info_nb_frames;\n\n    /* av_read_frame() support */\n    enum AVStreamParseType need_parsing;\n    struct AVCodecParserContext *parser;\n\n    /**\n     * last packet in packet_buffer for this stream when muxing.\n     */\n    struct AVPacketList *last_in_packet_buffer;\n    AVProbeData probe_data;\n#define MAX_REORDER_DELAY 16\n    int64_t pts_buffer[MAX_REORDER_DELAY+1];\n\n    AVIndexEntry *index_entries; /**< Only used if the format does not\n                                    support seeking natively. */\n    int nb_index_entries;\n    unsigned int index_entries_allocated_size;\n\n    /**\n     * Real base framerate of the stream.\n     * This is the lowest framerate with which all timestamps can be\n     * represented accurately (it is the least common multiple of all\n     * framerates in the stream). Note, this value is just a guess!\n     * For example, if the time base is 1/90000 and all frames have either\n     * approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.\n     *\n     * Code outside avformat should access this field using:\n     * av_stream_get/set_r_frame_rate(stream)\n     */\n    AVRational r_frame_rate;\n\n    /**\n     * Stream Identifier\n     * This is the MPEG-TS stream identifier +1\n     * 0 means unknown\n     */\n    int stream_identifier;\n\n    int64_t interleaver_chunk_size;\n    int64_t interleaver_chunk_duration;\n\n    /**\n     * stream probing state\n     * -1   -> probing finished\n     *  0   -> no probing requested\n     * rest -> perform probing with request_probe being the minimum score to accept.\n     * NOT PART OF PUBLIC API\n     */\n    int request_probe;\n    /**\n     * Indicates that everything up to the next keyframe\n     * should be discarded.\n     */\n    int skip_to_keyframe;\n\n    /**\n     * Number of samples to skip at the start of the frame decoded from the next packet.\n     */\n    int skip_samples;\n\n    /**\n     * If not 0, the number of samples that should be skipped from the start of\n     * the stream (the samples are removed from packets with pts==0, which also\n     * assumes negative timestamps do not happen).\n     * Intended for use with formats such as mp3 with ad-hoc gapless audio\n     * support.\n     */\n    int64_t start_skip_samples;\n\n    /**\n     * If not 0, the first audio sample that should be discarded from the stream.\n     * This is broken by design (needs global sample count), but can't be\n     * avoided for broken by design formats such as mp3 with ad-hoc gapless\n     * audio support.\n     */\n    int64_t first_discard_sample;\n\n    /**\n     * The sample after last sample that is intended to be discarded after\n     * first_discard_sample. Works on frame boundaries only. Used to prevent\n     * early EOF if the gapless info is broken (considered concatenated mp3s).\n     */\n    int64_t last_discard_sample;\n\n    /**\n     * Number of internally decoded frames, used internally in libavformat, do not access\n     * its lifetime differs from info which is why it is not in that structure.\n     */\n    int nb_decoded_frames;\n\n    /**\n     * Timestamp offset added to timestamps before muxing\n     * NOT PART OF PUBLIC API\n     */\n    int64_t mux_ts_offset;\n\n    /**\n     * Internal data to check for wrapping of the time stamp\n     */\n    int64_t pts_wrap_reference;\n\n    /**\n     * Options for behavior, when a wrap is detected.\n     *\n     * Defined by AV_PTS_WRAP_ values.\n     *\n     * If correction is enabled, there are two possibilities:\n     * If the first time stamp is near the wrap point, the wrap offset\n     * will be subtracted, which will create negative time stamps.\n     * Otherwise the offset will be added.\n     */\n    int pts_wrap_behavior;\n\n    /**\n     * Internal data to prevent doing update_initial_durations() twice\n     */\n    int update_initial_durations_done;\n\n    /**\n     * Internal data to generate dts from pts\n     */\n    int64_t pts_reorder_error[MAX_REORDER_DELAY+1];\n    uint8_t pts_reorder_error_count[MAX_REORDER_DELAY+1];\n\n    /**\n     * Internal data to analyze DTS and detect faulty mpeg streams\n     */\n    int64_t last_dts_for_order_check;\n    uint8_t dts_ordered;\n    uint8_t dts_misordered;\n\n    /**\n     * Internal data to inject global side data\n     */\n    int inject_global_side_data;\n\n    /**\n     * String containing paris of key and values describing recommended encoder configuration.\n     * Paris are separated by ','.\n     * Keys are separated from values by '='.\n     */\n    char *recommended_encoder_configuration;\n\n    /**\n     * display aspect ratio (0 if unknown)\n     * - encoding: unused\n     * - decoding: Set by libavformat to calculate sample_aspect_ratio internally\n     */\n    AVRational display_aspect_ratio;\n\n    struct FFFrac *priv_pts;\n\n    /**\n     * An opaque field for libavformat internal usage.\n     * Must not be accessed in any way by callers.\n     */\n    AVStreamInternal *internal;\n} AVStream;\n\nAVRational av_stream_get_r_frame_rate(const AVStream *s);\nvoid       av_stream_set_r_frame_rate(AVStream *s, AVRational r);\nstruct AVCodecParserContext *av_stream_get_parser(const AVStream *s);\nchar* av_stream_get_recommended_encoder_configuration(const AVStream *s);\nvoid  av_stream_set_recommended_encoder_configuration(AVStream *s, char *configuration);\n\n/**\n * Returns the pts of the last muxed packet + its duration\n *\n * the retuned value is undefined when used with a demuxer.\n */\nint64_t    av_stream_get_end_pts(const AVStream *st);\n\n#define AV_PROGRAM_RUNNING 1\n\n/**\n * New fields can be added to the end with minor version bumps.\n * Removal, reordering and changes to existing fields require a major\n * version bump.\n * sizeof(AVProgram) must not be used outside libav*.\n */\ntypedef struct AVProgram {\n    int            id;\n    int            flags;\n    enum AVDiscard discard;        ///< selects which program to discard and which to feed to the caller\n    unsigned int   *stream_index;\n    unsigned int   nb_stream_indexes;\n    AVDictionary *metadata;\n\n    int program_num;\n    int pmt_pid;\n    int pcr_pid;\n\n    /*****************************************************************\n     * All fields below this line are not part of the public API. They\n     * may not be used outside of libavformat and can be changed and\n     * removed at will.\n     * New public fields should be added right above.\n     *****************************************************************\n     */\n    int64_t start_time;\n    int64_t end_time;\n\n    int64_t pts_wrap_reference;    ///< reference dts for wrap detection\n    int pts_wrap_behavior;         ///< behavior on wrap detection\n} AVProgram;\n\n#define AVFMTCTX_NOHEADER      0x0001 /**< signal that no header is present\n                                         (streams are added dynamically) */\n\ntypedef struct AVChapter {\n    int id;                 ///< unique ID to identify the chapter\n    AVRational time_base;   ///< time base in which the start/end timestamps are specified\n    int64_t start, end;     ///< chapter start/end time in time_base units\n    AVDictionary *metadata;\n} AVChapter;\n\n\n/**\n * Callback used by devices to communicate with application.\n */\ntypedef int (*av_format_control_message)(struct AVFormatContext *s, int type,\n                                         void *data, size_t data_size);\n\ntypedef int (*AVOpenCallback)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags,\n                              const AVIOInterruptCB *int_cb, AVDictionary **options);\n\n/**\n * The duration of a video can be estimated through various ways, and this enum can be used\n * to know how the duration was estimated.\n */\nenum AVDurationEstimationMethod {\n    AVFMT_DURATION_FROM_PTS,    ///< Duration accurately estimated from PTSes\n    AVFMT_DURATION_FROM_STREAM, ///< Duration estimated from a stream with a known duration\n    AVFMT_DURATION_FROM_BITRATE ///< Duration estimated from bitrate (less accurate)\n};\n\ntypedef struct AVFormatInternal AVFormatInternal;\n\n/**\n * Format I/O context.\n * New fields can be added to the end with minor version bumps.\n * Removal, reordering and changes to existing fields require a major\n * version bump.\n * sizeof(AVFormatContext) must not be used outside libav*, use\n * avformat_alloc_context() to create an AVFormatContext.\n */\ntypedef struct AVFormatContext {\n    /**\n     * A class for logging and @ref avoptions. Set by avformat_alloc_context().\n     * Exports (de)muxer private options if they exist.\n     */\n    const AVClass *av_class;\n\n    /**\n     * The input container format.\n     *\n     * Demuxing only, set by avformat_open_input().\n     */\n    struct AVInputFormat *iformat;\n\n    /**\n     * The output container format.\n     *\n     * Muxing only, must be set by the caller before avformat_write_header().\n     */\n    struct AVOutputFormat *oformat;\n\n    /**\n     * Format private data. This is an AVOptions-enabled struct\n     * if and only if iformat/oformat.priv_class is not NULL.\n     *\n     * - muxing: set by avformat_write_header()\n     * - demuxing: set by avformat_open_input()\n     */\n    void *priv_data;\n\n    /**\n     * I/O context.\n     *\n     * - demuxing: either set by the user before avformat_open_input() (then\n     *             the user must close it manually) or set by avformat_open_input().\n     * - muxing: set by the user before avformat_write_header(). The caller must\n     *           take care of closing / freeing the IO context.\n     *\n     * Do NOT set this field if AVFMT_NOFILE flag is set in\n     * iformat/oformat.flags. In such a case, the (de)muxer will handle\n     * I/O in some other way and this field will be NULL.\n     */\n    AVIOContext *pb;\n\n    /* stream info */\n    /**\n     * Flags signalling stream properties. A combination of AVFMTCTX_*.\n     * Set by libavformat.\n     */\n    int ctx_flags;\n\n    /**\n     * Number of elements in AVFormatContext.streams.\n     *\n     * Set by avformat_new_stream(), must not be modified by any other code.\n     */\n    unsigned int nb_streams;\n    /**\n     * A list of all streams in the file. New streams are created with\n     * avformat_new_stream().\n     *\n     * - demuxing: streams are created by libavformat in avformat_open_input().\n     *             If AVFMTCTX_NOHEADER is set in ctx_flags, then new streams may also\n     *             appear in av_read_frame().\n     * - muxing: streams are created by the user before avformat_write_header().\n     *\n     * Freed by libavformat in avformat_free_context().\n     */\n    AVStream **streams;\n\n    /**\n     * input or output filename\n     *\n     * - demuxing: set by avformat_open_input()\n     * - muxing: may be set by the caller before avformat_write_header()\n     */\n    char filename[1024];\n\n    /**\n     * Position of the first frame of the component, in\n     * AV_TIME_BASE fractional seconds. NEVER set this value directly:\n     * It is deduced from the AVStream values.\n     *\n     * Demuxing only, set by libavformat.\n     */\n    int64_t start_time;\n\n    /**\n     * Duration of the stream, in AV_TIME_BASE fractional\n     * seconds. Only set this value if you know none of the individual stream\n     * durations and also do not set any of them. This is deduced from the\n     * AVStream values if not set.\n     *\n     * Demuxing only, set by libavformat.\n     */\n    int64_t duration;\n\n    /**\n     * Total stream bitrate in bit/s, 0 if not\n     * available. Never set it directly if the file_size and the\n     * duration are known as FFmpeg can compute it automatically.\n     */\n    int64_t bit_rate;\n\n    unsigned int packet_size;\n    int max_delay;\n\n    /**\n     * Flags modifying the (de)muxer behaviour. A combination of AVFMT_FLAG_*.\n     * Set by the user before avformat_open_input() / avformat_write_header().\n     */\n    int flags;\n#define AVFMT_FLAG_GENPTS       0x0001 ///< Generate missing pts even if it requires parsing future frames.\n#define AVFMT_FLAG_IGNIDX       0x0002 ///< Ignore index.\n#define AVFMT_FLAG_NONBLOCK     0x0004 ///< Do not block when reading packets from input.\n#define AVFMT_FLAG_IGNDTS       0x0008 ///< Ignore DTS on frames that contain both DTS & PTS\n#define AVFMT_FLAG_NOFILLIN     0x0010 ///< Do not infer any values from other values, just return what is stored in the container\n#define AVFMT_FLAG_NOPARSE      0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled\n#define AVFMT_FLAG_NOBUFFER     0x0040 ///< Do not buffer frames when possible\n#define AVFMT_FLAG_CUSTOM_IO    0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it.\n#define AVFMT_FLAG_DISCARD_CORRUPT  0x0100 ///< Discard frames marked corrupted\n#define AVFMT_FLAG_FLUSH_PACKETS    0x0200 ///< Flush the AVIOContext every packet.\n/**\n * When muxing, try to avoid writing any random/volatile data to the output.\n * This includes any random IDs, real-time timestamps/dates, muxer version, etc.\n *\n * This flag is mainly intended for testing.\n */\n#define AVFMT_FLAG_BITEXACT         0x0400\n#define AVFMT_FLAG_MP4A_LATM    0x8000 ///< Enable RTP MP4A-LATM payload\n#define AVFMT_FLAG_SORT_DTS    0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)\n#define AVFMT_FLAG_PRIV_OPT    0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted)\n#define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Don't merge side data but keep it separate.\n#define AVFMT_FLAG_FAST_SEEK   0x80000 ///< Enable fast, but inaccurate seeks for some formats\n\n    /**\n     * Maximum size of the data read from input for determining\n     * the input container format.\n     * Demuxing only, set by the caller before avformat_open_input().\n     */\n    int64_t probesize;\n\n    /**\n     * Maximum duration (in AV_TIME_BASE units) of the data read\n     * from input in avformat_find_stream_info().\n     * Demuxing only, set by the caller before avformat_find_stream_info().\n     * Can be set to 0 to let avformat choose using a heuristic.\n     */\n    int64_t max_analyze_duration;\n\n    const uint8_t *key;\n    int keylen;\n\n    unsigned int nb_programs;\n    AVProgram **programs;\n\n    /**\n     * Forced video codec_id.\n     * Demuxing: Set by user.\n     */\n    enum AVCodecID video_codec_id;\n\n    /**\n     * Forced audio codec_id.\n     * Demuxing: Set by user.\n     */\n    enum AVCodecID audio_codec_id;\n\n    /**\n     * Forced subtitle codec_id.\n     * Demuxing: Set by user.\n     */\n    enum AVCodecID subtitle_codec_id;\n\n    /**\n     * Maximum amount of memory in bytes to use for the index of each stream.\n     * If the index exceeds this size, entries will be discarded as\n     * needed to maintain a smaller size. This can lead to slower or less\n     * accurate seeking (depends on demuxer).\n     * Demuxers for which a full in-memory index is mandatory will ignore\n     * this.\n     * - muxing: unused\n     * - demuxing: set by user\n     */\n    unsigned int max_index_size;\n\n    /**\n     * Maximum amount of memory in bytes to use for buffering frames\n     * obtained from realtime capture devices.\n     */\n    unsigned int max_picture_buffer;\n\n    /**\n     * Number of chapters in AVChapter array.\n     * When muxing, chapters are normally written in the file header,\n     * so nb_chapters should normally be initialized before write_header\n     * is called. Some muxers (e.g. mov and mkv) can also write chapters\n     * in the trailer.  To write chapters in the trailer, nb_chapters\n     * must be zero when write_header is called and non-zero when\n     * write_trailer is called.\n     * - muxing: set by user\n     * - demuxing: set by libavformat\n     */\n    unsigned int nb_chapters;\n    AVChapter **chapters;\n\n    /**\n     * Metadata that applies to the whole file.\n     *\n     * - demuxing: set by libavformat in avformat_open_input()\n     * - muxing: may be set by the caller before avformat_write_header()\n     *\n     * Freed by libavformat in avformat_free_context().\n     */\n    AVDictionary *metadata;\n\n    /**\n     * Start time of the stream in real world time, in microseconds\n     * since the Unix epoch (00:00 1st January 1970). That is, pts=0 in the\n     * stream was captured at this real world time.\n     * - muxing: Set by the caller before avformat_write_header(). If set to\n     *           either 0 or AV_NOPTS_VALUE, then the current wall-time will\n     *           be used.\n     * - demuxing: Set by libavformat. AV_NOPTS_VALUE if unknown. Note that\n     *             the value may become known after some number of frames\n     *             have been received.\n     */\n    int64_t start_time_realtime;\n\n    /**\n     * The number of frames used for determining the framerate in\n     * avformat_find_stream_info().\n     * Demuxing only, set by the caller before avformat_find_stream_info().\n     */\n    int fps_probe_size;\n\n    /**\n     * Error recognition; higher values will detect more errors but may\n     * misdetect some more or less valid parts as errors.\n     * Demuxing only, set by the caller before avformat_open_input().\n     */\n    int error_recognition;\n\n    /**\n     * Custom interrupt callbacks for the I/O layer.\n     *\n     * demuxing: set by the user before avformat_open_input().\n     * muxing: set by the user before avformat_write_header()\n     * (mainly useful for AVFMT_NOFILE formats). The callback\n     * should also be passed to avio_open2() if it's used to\n     * open the file.\n     */\n    AVIOInterruptCB interrupt_callback;\n\n    /**\n     * Flags to enable debugging.\n     */\n    int debug;\n#define FF_FDEBUG_TS        0x0001\n\n    /**\n     * Maximum buffering duration for interleaving.\n     *\n     * To ensure all the streams are interleaved correctly,\n     * av_interleaved_write_frame() will wait until it has at least one packet\n     * for each stream before actually writing any packets to the output file.\n     * When some streams are \"sparse\" (i.e. there are large gaps between\n     * successive packets), this can result in excessive buffering.\n     *\n     * This field specifies the maximum difference between the timestamps of the\n     * first and the last packet in the muxing queue, above which libavformat\n     * will output a packet regardless of whether it has queued a packet for all\n     * the streams.\n     *\n     * Muxing only, set by the caller before avformat_write_header().\n     */\n    int64_t max_interleave_delta;\n\n    /**\n     * Allow non-standard and experimental extension\n     * @see AVCodecContext.strict_std_compliance\n     */\n    int strict_std_compliance;\n\n    /**\n     * Flags for the user to detect events happening on the file. Flags must\n     * be cleared by the user once the event has been handled.\n     * A combination of AVFMT_EVENT_FLAG_*.\n     */\n    int event_flags;\n#define AVFMT_EVENT_FLAG_METADATA_UPDATED 0x0001 ///< The call resulted in updated metadata.\n\n    /**\n     * Maximum number of packets to read while waiting for the first timestamp.\n     * Decoding only.\n     */\n    int max_ts_probe;\n\n    /**\n     * Avoid negative timestamps during muxing.\n     * Any value of the AVFMT_AVOID_NEG_TS_* constants.\n     * Note, this only works when using av_interleaved_write_frame. (interleave_packet_per_dts is in use)\n     * - muxing: Set by user\n     * - demuxing: unused\n     */\n    int avoid_negative_ts;\n#define AVFMT_AVOID_NEG_TS_AUTO             -1 ///< Enabled when required by target format\n#define AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE 1 ///< Shift timestamps so they are non negative\n#define AVFMT_AVOID_NEG_TS_MAKE_ZERO         2 ///< Shift timestamps so that they start at 0\n\n    /**\n     * Transport stream id.\n     * This will be moved into demuxer private options. Thus no API/ABI compatibility\n     */\n    int ts_id;\n\n    /**\n     * Audio preload in microseconds.\n     * Note, not all formats support this and unpredictable things may happen if it is used when not supported.\n     * - encoding: Set by user via AVOptions (NO direct access)\n     * - decoding: unused\n     */\n    int audio_preload;\n\n    /**\n     * Max chunk time in microseconds.\n     * Note, not all formats support this and unpredictable things may happen if it is used when not supported.\n     * - encoding: Set by user via AVOptions (NO direct access)\n     * - decoding: unused\n     */\n    int max_chunk_duration;\n\n    /**\n     * Max chunk size in bytes\n     * Note, not all formats support this and unpredictable things may happen if it is used when not supported.\n     * - encoding: Set by user via AVOptions (NO direct access)\n     * - decoding: unused\n     */\n    int max_chunk_size;\n\n    /**\n     * forces the use of wallclock timestamps as pts/dts of packets\n     * This has undefined results in the presence of B frames.\n     * - encoding: unused\n     * - decoding: Set by user via AVOptions (NO direct access)\n     */\n    int use_wallclock_as_timestamps;\n\n    /**\n     * avio flags, used to force AVIO_FLAG_DIRECT.\n     * - encoding: unused\n     * - decoding: Set by user via AVOptions (NO direct access)\n     */\n    int avio_flags;\n\n    /**\n     * The duration field can be estimated through various ways, and this field can be used\n     * to know how the duration was estimated.\n     * - encoding: unused\n     * - decoding: Read by user via AVOptions (NO direct access)\n     */\n    enum AVDurationEstimationMethod duration_estimation_method;\n\n    /**\n     * Skip initial bytes when opening stream\n     * - encoding: unused\n     * - decoding: Set by user via AVOptions (NO direct access)\n     */\n    int64_t skip_initial_bytes;\n\n    /**\n     * Correct single timestamp overflows\n     * - encoding: unused\n     * - decoding: Set by user via AVOptions (NO direct access)\n     */\n    unsigned int correct_ts_overflow;\n\n    /**\n     * Force seeking to any (also non key) frames.\n     * - encoding: unused\n     * - decoding: Set by user via AVOptions (NO direct access)\n     */\n    int seek2any;\n\n    /**\n     * Flush the I/O context after each packet.\n     * - encoding: Set by user via AVOptions (NO direct access)\n     * - decoding: unused\n     */\n    int flush_packets;\n\n    /**\n     * format probing score.\n     * The maximal score is AVPROBE_SCORE_MAX, its set when the demuxer probes\n     * the format.\n     * - encoding: unused\n     * - decoding: set by avformat, read by user via av_format_get_probe_score() (NO direct access)\n     */\n    int probe_score;\n\n    /**\n     * number of bytes to read maximally to identify format.\n     * - encoding: unused\n     * - decoding: set by user through AVOPtions (NO direct access)\n     */\n    int format_probesize;\n\n    /**\n     * ',' separated list of allowed decoders.\n     * If NULL then all are allowed\n     * - encoding: unused\n     * - decoding: set by user through AVOptions (NO direct access)\n     */\n    char *codec_whitelist;\n\n    /**\n     * ',' separated list of allowed demuxers.\n     * If NULL then all are allowed\n     * - encoding: unused\n     * - decoding: set by user through AVOptions (NO direct access)\n     */\n    char *format_whitelist;\n\n    /**\n     * An opaque field for libavformat internal usage.\n     * Must not be accessed in any way by callers.\n     */\n    AVFormatInternal *internal;\n\n    /**\n     * IO repositioned flag.\n     * This is set by avformat when the underlaying IO context read pointer\n     * is repositioned, for example when doing byte based seeking.\n     * Demuxers can use the flag to detect such changes.\n     */\n    int io_repositioned;\n\n    /**\n     * Forced video codec.\n     * This allows forcing a specific decoder, even when there are multiple with\n     * the same codec_id.\n     * Demuxing: Set by user via av_format_set_video_codec (NO direct access).\n     */\n    AVCodec *video_codec;\n\n    /**\n     * Forced audio codec.\n     * This allows forcing a specific decoder, even when there are multiple with\n     * the same codec_id.\n     * Demuxing: Set by user via av_format_set_audio_codec (NO direct access).\n     */\n    AVCodec *audio_codec;\n\n    /**\n     * Forced subtitle codec.\n     * This allows forcing a specific decoder, even when there are multiple with\n     * the same codec_id.\n     * Demuxing: Set by user via av_format_set_subtitle_codec (NO direct access).\n     */\n    AVCodec *subtitle_codec;\n\n    /**\n     * Forced data codec.\n     * This allows forcing a specific decoder, even when there are multiple with\n     * the same codec_id.\n     * Demuxing: Set by user via av_format_set_data_codec (NO direct access).\n     */\n    AVCodec *data_codec;\n\n    /**\n     * Number of bytes to be written as padding in a metadata header.\n     * Demuxing: Unused.\n     * Muxing: Set by user via av_format_set_metadata_header_padding.\n     */\n    int metadata_header_padding;\n\n    /**\n     * User data.\n     * This is a place for some private data of the user.\n     * Mostly usable with control_message_cb or any future callbacks in device's context.\n     */\n    void *opaque;\n\n    /**\n     * Callback used by devices to communicate with application.\n     */\n    av_format_control_message control_message_cb;\n\n    /**\n     * Output timestamp offset, in microseconds.\n     * Muxing: set by user via AVOptions (NO direct access)\n     */\n    int64_t output_ts_offset;\n\n    /**\n     * dump format separator.\n     * can be \", \" or \"\\n      \" or anything else\n     * Code outside libavformat should access this field using AVOptions\n     * (NO direct access).\n     * - muxing: Set by user.\n     * - demuxing: Set by user.\n     */\n    uint8_t *dump_separator;\n\n    /**\n     * Forced Data codec_id.\n     * Demuxing: Set by user.\n     */\n    enum AVCodecID data_codec_id;\n\n    /**\n     * Called to open further IO contexts when needed for demuxing.\n     *\n     * This can be set by the user application to perform security checks on\n     * the URLs before opening them.\n     * The function should behave like avio_open2(), AVFormatContext is provided\n     * as contextual information and to reach AVFormatContext.opaque.\n     *\n     * If NULL then some simple checks are used together with avio_open2().\n     *\n     * Must not be accessed directly from outside avformat.\n     * @See av_format_set_open_cb()\n     *\n     * Demuxing: Set by user.\n     */\n    int (*open_cb)(struct AVFormatContext *s, AVIOContext **p, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options);\n} AVFormatContext;\n\nint av_format_get_probe_score(const AVFormatContext *s);\nAVCodec * av_format_get_video_codec(const AVFormatContext *s);\nvoid      av_format_set_video_codec(AVFormatContext *s, AVCodec *c);\nAVCodec * av_format_get_audio_codec(const AVFormatContext *s);\nvoid      av_format_set_audio_codec(AVFormatContext *s, AVCodec *c);\nAVCodec * av_format_get_subtitle_codec(const AVFormatContext *s);\nvoid      av_format_set_subtitle_codec(AVFormatContext *s, AVCodec *c);\nAVCodec * av_format_get_data_codec(const AVFormatContext *s);\nvoid      av_format_set_data_codec(AVFormatContext *s, AVCodec *c);\nint       av_format_get_metadata_header_padding(const AVFormatContext *s);\nvoid      av_format_set_metadata_header_padding(AVFormatContext *s, int c);\nvoid *    av_format_get_opaque(const AVFormatContext *s);\nvoid      av_format_set_opaque(AVFormatContext *s, void *opaque);\nav_format_control_message av_format_get_control_message_cb(const AVFormatContext *s);\nvoid      av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback);\nAVOpenCallback av_format_get_open_cb(const AVFormatContext *s);\nvoid      av_format_set_open_cb(AVFormatContext *s, AVOpenCallback callback);\n\n/**\n * This function will cause global side data to be injected in the next packet\n * of each stream as well as after any subsequent seek.\n */\nvoid av_format_inject_global_side_data(AVFormatContext *s);\n\n/**\n * Returns the method used to set ctx->duration.\n *\n * @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE.\n */\nenum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx);\n\ntypedef struct AVPacketList {\n    AVPacket pkt;\n    struct AVPacketList *next;\n} AVPacketList;\n\n\n/**\n * @defgroup lavf_core Core functions\n * @ingroup libavf\n *\n * Functions for querying libavformat capabilities, allocating core structures,\n * etc.\n * @{\n */\n\n/**\n * Return the LIBAVFORMAT_VERSION_INT constant.\n */\nunsigned avformat_version(void);\n\n/**\n * Return the libavformat build-time configuration.\n */\nconst char *avformat_configuration(void);\n\n/**\n * Return the libavformat license.\n */\nconst char *avformat_license(void);\n\n/**\n * Initialize libavformat and register all the muxers, demuxers and\n * protocols. If you do not call this function, then you can select\n * exactly which formats you want to support.\n *\n * @see av_register_input_format()\n * @see av_register_output_format()\n */\nvoid av_register_all(void);\n\nvoid av_register_input_format(AVInputFormat *format);\nvoid av_register_output_format(AVOutputFormat *format);\n\n/**\n * Do global initialization of network components. This is optional,\n * but recommended, since it avoids the overhead of implicitly\n * doing the setup for each session.\n *\n * Calling this function will become mandatory if using network\n * protocols at some major version bump.\n */\nint avformat_network_init(void);\n\n/**\n * Undo the initialization done by avformat_network_init.\n */\nint avformat_network_deinit(void);\n\n/**\n * If f is NULL, returns the first registered input format,\n * if f is non-NULL, returns the next registered input format after f\n * or NULL if f is the last one.\n */\nAVInputFormat  *av_iformat_next(const AVInputFormat  *f);\n\n/**\n * If f is NULL, returns the first registered output format,\n * if f is non-NULL, returns the next registered output format after f\n * or NULL if f is the last one.\n */\nAVOutputFormat *av_oformat_next(const AVOutputFormat *f);\n\n/**\n * Allocate an AVFormatContext.\n * avformat_free_context() can be used to free the context and everything\n * allocated by the framework within it.\n */\nAVFormatContext *avformat_alloc_context(void);\n\n/**\n * Free an AVFormatContext and all its streams.\n * @param s context to free\n */\nvoid avformat_free_context(AVFormatContext *s);\n\n/**\n * Get the AVClass for AVFormatContext. It can be used in combination with\n * AV_OPT_SEARCH_FAKE_OBJ for examining options.\n *\n * @see av_opt_find().\n */\nconst AVClass *avformat_get_class(void);\n\n/**\n * Add a new stream to a media file.\n *\n * When demuxing, it is called by the demuxer in read_header(). If the\n * flag AVFMTCTX_NOHEADER is set in s.ctx_flags, then it may also\n * be called in read_packet().\n *\n * When muxing, should be called by the user before avformat_write_header().\n *\n * User is required to call avcodec_close() and avformat_free_context() to\n * clean up the allocation by avformat_new_stream().\n *\n * @param s media file handle\n * @param c If non-NULL, the AVCodecContext corresponding to the new stream\n * will be initialized to use this codec. This is needed for e.g. codec-specific\n * defaults to be set, so codec should be provided if it is known.\n *\n * @return newly created stream or NULL on error.\n */\nAVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c);\n\n/**\n * Allocate new information from stream.\n *\n * @param stream stream\n * @param type desired side information type\n * @param size side information size\n * @return pointer to fresh allocated data or NULL otherwise\n */\nuint8_t *av_stream_new_side_data(AVStream *stream,\n                                 enum AVPacketSideDataType type, int size);\n/**\n * Get side information from stream.\n *\n * @param stream stream\n * @param type desired side information type\n * @param size pointer for side information size to store (optional)\n * @return pointer to data if present or NULL otherwise\n */\nuint8_t *av_stream_get_side_data(AVStream *stream,\n                                 enum AVPacketSideDataType type, int *size);\n\nAVProgram *av_new_program(AVFormatContext *s, int id);\n\n/**\n * @}\n */\n\n\n/**\n * Allocate an AVFormatContext for an output format.\n * avformat_free_context() can be used to free the context and\n * everything allocated by the framework within it.\n *\n * @param *ctx is set to the created format context, or to NULL in\n * case of failure\n * @param oformat format to use for allocating the context, if NULL\n * format_name and filename are used instead\n * @param format_name the name of output format to use for allocating the\n * context, if NULL filename is used instead\n * @param filename the name of the filename to use for allocating the\n * context, may be NULL\n * @return >= 0 in case of success, a negative AVERROR code in case of\n * failure\n */\nint avformat_alloc_output_context2(AVFormatContext **ctx, AVOutputFormat *oformat,\n                                   const char *format_name, const char *filename);\n\n/**\n * @addtogroup lavf_decoding\n * @{\n */\n\n/**\n * Find AVInputFormat based on the short name of the input format.\n */\nAVInputFormat *av_find_input_format(const char *short_name);\n\n/**\n * Guess the file format.\n *\n * @param pd        data to be probed\n * @param is_opened Whether the file is already opened; determines whether\n *                  demuxers with or without AVFMT_NOFILE are probed.\n */\nAVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);\n\n/**\n * Guess the file format.\n *\n * @param pd        data to be probed\n * @param is_opened Whether the file is already opened; determines whether\n *                  demuxers with or without AVFMT_NOFILE are probed.\n * @param score_max A probe score larger that this is required to accept a\n *                  detection, the variable is set to the actual detection\n *                  score afterwards.\n *                  If the score is <= AVPROBE_SCORE_MAX / 4 it is recommended\n *                  to retry with a larger probe buffer.\n */\nAVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);\n\n/**\n * Guess the file format.\n *\n * @param is_opened Whether the file is already opened; determines whether\n *                  demuxers with or without AVFMT_NOFILE are probed.\n * @param score_ret The score of the best detection.\n */\nAVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score_ret);\n\n/**\n * Probe a bytestream to determine the input format. Each time a probe returns\n * with a score that is too low, the probe buffer size is increased and another\n * attempt is made. When the maximum probe size is reached, the input format\n * with the highest score is returned.\n *\n * @param pb the bytestream to probe\n * @param fmt the input format is put here\n * @param filename the filename of the stream\n * @param logctx the log context\n * @param offset the offset within the bytestream to probe from\n * @param max_probe_size the maximum probe buffer size (zero for default)\n * @return the score in case of success, a negative value corresponding to an\n *         the maximal score is AVPROBE_SCORE_MAX\n * AVERROR code otherwise\n */\nint av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt,\n                           const char *filename, void *logctx,\n                           unsigned int offset, unsigned int max_probe_size);\n\n/**\n * Like av_probe_input_buffer2() but returns 0 on success\n */\nint av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,\n                          const char *filename, void *logctx,\n                          unsigned int offset, unsigned int max_probe_size);\n\n/**\n * Open an input stream and read the header. The codecs are not opened.\n * The stream must be closed with avformat_close_input().\n *\n * @param ps Pointer to user-supplied AVFormatContext (allocated by avformat_alloc_context).\n *           May be a pointer to NULL, in which case an AVFormatContext is allocated by this\n *           function and written into ps.\n *           Note that a user-supplied AVFormatContext will be freed on failure.\n * @param filename Name of the stream to open.\n * @param fmt If non-NULL, this parameter forces a specific input format.\n *            Otherwise the format is autodetected.\n * @param options  A dictionary filled with AVFormatContext and demuxer-private options.\n *                 On return this parameter will be destroyed and replaced with a dict containing\n *                 options that were not found. May be NULL.\n *\n * @return 0 on success, a negative AVERROR on failure.\n *\n * @note If you want to use custom IO, preallocate the format context and set its pb field.\n */\nint avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options);\n\nattribute_deprecated\nint av_demuxer_open(AVFormatContext *ic);\n\n/**\n * Read packets of a media file to get stream information. This\n * is useful for file formats with no headers such as MPEG. This\n * function also computes the real framerate in case of MPEG-2 repeat\n * frame mode.\n * The logical file position is not changed by this function;\n * examined packets may be buffered for later processing.\n *\n * @param ic media file handle\n * @param options  If non-NULL, an ic.nb_streams long array of pointers to\n *                 dictionaries, where i-th member contains options for\n *                 codec corresponding to i-th stream.\n *                 On return each dictionary will be filled with options that were not found.\n * @return >=0 if OK, AVERROR_xxx on error\n *\n * @note this function isn't guaranteed to open all the codecs, so\n *       options being non-empty at return is a perfectly normal behavior.\n *\n * @todo Let the user decide somehow what information is needed so that\n *       we do not waste time getting stuff the user does not need.\n */\nint avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);\n\n/**\n * Find the programs which belong to a given stream.\n *\n * @param ic    media file handle\n * @param last  the last found program, the search will start after this\n *              program, or from the beginning if it is NULL\n * @param s     stream index\n * @return the next program which belongs to s, NULL if no program is found or\n *         the last program is not among the programs of ic.\n */\nAVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s);\n\nvoid av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx);\n\n/**\n * Find the \"best\" stream in the file.\n * The best stream is determined according to various heuristics as the most\n * likely to be what the user expects.\n * If the decoder parameter is non-NULL, av_find_best_stream will find the\n * default decoder for the stream's codec; streams for which no decoder can\n * be found are ignored.\n *\n * @param ic                media file handle\n * @param type              stream type: video, audio, subtitles, etc.\n * @param wanted_stream_nb  user-requested stream number,\n *                          or -1 for automatic selection\n * @param related_stream    try to find a stream related (eg. in the same\n *                          program) to this one, or -1 if none\n * @param decoder_ret       if non-NULL, returns the decoder for the\n *                          selected stream\n * @param flags             flags; none are currently defined\n * @return  the non-negative stream number in case of success,\n *          AVERROR_STREAM_NOT_FOUND if no stream with the requested type\n *          could be found,\n *          AVERROR_DECODER_NOT_FOUND if streams were found but no decoder\n * @note  If av_find_best_stream returns successfully and decoder_ret is not\n *        NULL, then *decoder_ret is guaranteed to be set to a valid AVCodec.\n */\nint av_find_best_stream(AVFormatContext *ic,\n                        enum AVMediaType type,\n                        int wanted_stream_nb,\n                        int related_stream,\n                        AVCodec **decoder_ret,\n                        int flags);\n\n/**\n * Return the next frame of a stream.\n * This function returns what is stored in the file, and does not validate\n * that what is there are valid frames for the decoder. It will split what is\n * stored in the file into frames and return one for each call. It will not\n * omit invalid data between valid frames so as to give the decoder the maximum\n * information possible for decoding.\n *\n * If pkt->buf is NULL, then the packet is valid until the next\n * av_read_frame() or until avformat_close_input(). Otherwise the packet\n * is valid indefinitely. In both cases the packet must be freed with\n * av_packet_unref when it is no longer needed. For video, the packet contains\n * exactly one frame. For audio, it contains an integer number of frames if each\n * frame has a known fixed size (e.g. PCM or ADPCM data). If the audio frames\n * have a variable size (e.g. MPEG audio), then it contains one frame.\n *\n * pkt->pts, pkt->dts and pkt->duration are always set to correct\n * values in AVStream.time_base units (and guessed if the format cannot\n * provide them). pkt->pts can be AV_NOPTS_VALUE if the video format\n * has B-frames, so it is better to rely on pkt->dts if you do not\n * decompress the payload.\n *\n * @return 0 if OK, < 0 on error or end of file\n */\nint av_read_frame(AVFormatContext *s, AVPacket *pkt);\n\n/**\n * Seek to the keyframe at timestamp.\n * 'timestamp' in 'stream_index'.\n *\n * @param s media file handle\n * @param stream_index If stream_index is (-1), a default\n * stream is selected, and timestamp is automatically converted\n * from AV_TIME_BASE units to the stream specific time_base.\n * @param timestamp Timestamp in AVStream.time_base units\n *        or, if no stream is specified, in AV_TIME_BASE units.\n * @param flags flags which select direction and seeking mode\n * @return >= 0 on success\n */\nint av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,\n                  int flags);\n\n/**\n * Seek to timestamp ts.\n * Seeking will be done so that the point from which all active streams\n * can be presented successfully will be closest to ts and within min/max_ts.\n * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.\n *\n * If flags contain AVSEEK_FLAG_BYTE, then all timestamps are in bytes and\n * are the file position (this may not be supported by all demuxers).\n * If flags contain AVSEEK_FLAG_FRAME, then all timestamps are in frames\n * in the stream with stream_index (this may not be supported by all demuxers).\n * Otherwise all timestamps are in units of the stream selected by stream_index\n * or if stream_index is -1, in AV_TIME_BASE units.\n * If flags contain AVSEEK_FLAG_ANY, then non-keyframes are treated as\n * keyframes (this may not be supported by all demuxers).\n * If flags contain AVSEEK_FLAG_BACKWARD, it is ignored.\n *\n * @param s media file handle\n * @param stream_index index of the stream which is used as time base reference\n * @param min_ts smallest acceptable timestamp\n * @param ts target timestamp\n * @param max_ts largest acceptable timestamp\n * @param flags flags\n * @return >=0 on success, error code otherwise\n *\n * @note This is part of the new seek API which is still under construction.\n *       Thus do not use this yet. It may change at any time, do not expect\n *       ABI compatibility yet!\n */\nint avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);\n\n/**\n * Discard all internally buffered data. This can be useful when dealing with\n * discontinuities in the byte stream. Generally works only with formats that\n * can resync. This includes headerless formats like MPEG-TS/TS but should also\n * work with NUT, Ogg and in a limited way AVI for example.\n *\n * The set of streams, the detected duration, stream parameters and codecs do\n * not change when calling this function. If you want a complete reset, it's\n * better to open a new AVFormatContext.\n *\n * This does not flush the AVIOContext (s->pb). If necessary, call\n * avio_flush(s->pb) before calling this function.\n *\n * @param s media file handle\n * @return >=0 on success, error code otherwise\n */\nint avformat_flush(AVFormatContext *s);\n\n/**\n * Start playing a network-based stream (e.g. RTSP stream) at the\n * current position.\n */\nint av_read_play(AVFormatContext *s);\n\n/**\n * Pause a network-based stream (e.g. RTSP stream).\n *\n * Use av_read_play() to resume it.\n */\nint av_read_pause(AVFormatContext *s);\n\n/**\n * Close an opened input AVFormatContext. Free it and all its contents\n * and set *s to NULL.\n */\nvoid avformat_close_input(AVFormatContext **s);\n/**\n * @}\n */\n\n#define AVSEEK_FLAG_BACKWARD 1 ///< seek backward\n#define AVSEEK_FLAG_BYTE     2 ///< seeking based on position in bytes\n#define AVSEEK_FLAG_ANY      4 ///< seek to any frame, even non-keyframes\n#define AVSEEK_FLAG_FRAME    8 ///< seeking based on frame number\n\n/**\n * @addtogroup lavf_encoding\n * @{\n */\n/**\n * Allocate the stream private data and write the stream header to\n * an output media file.\n *\n * @param s Media file handle, must be allocated with avformat_alloc_context().\n *          Its oformat field must be set to the desired output format;\n *          Its pb field must be set to an already opened AVIOContext.\n * @param options  An AVDictionary filled with AVFormatContext and muxer-private options.\n *                 On return this parameter will be destroyed and replaced with a dict containing\n *                 options that were not found. May be NULL.\n *\n * @return 0 on success, negative AVERROR on failure.\n *\n * @see av_opt_find, av_dict_set, avio_open, av_oformat_next.\n */\nav_warn_unused_result\nint avformat_write_header(AVFormatContext *s, AVDictionary **options);\n\n/**\n * Write a packet to an output media file.\n *\n * This function passes the packet directly to the muxer, without any buffering\n * or reordering. The caller is responsible for correctly interleaving the\n * packets if the format requires it. Callers that want libavformat to handle\n * the interleaving should call av_interleaved_write_frame() instead of this\n * function.\n *\n * @param s media file handle\n * @param pkt The packet containing the data to be written. Note that unlike\n *            av_interleaved_write_frame(), this function does not take\n *            ownership of the packet passed to it (though some muxers may make\n *            an internal reference to the input packet).\n *            <br>\n *            This parameter can be NULL (at any time, not just at the end), in\n *            order to immediately flush data buffered within the muxer, for\n *            muxers that buffer up data internally before writing it to the\n *            output.\n *            <br>\n *            Packet's @ref AVPacket.stream_index \"stream_index\" field must be\n *            set to the index of the corresponding stream in @ref\n *            AVFormatContext.streams \"s->streams\".\n *            <br>\n *            The timestamps (@ref AVPacket.pts \"pts\", @ref AVPacket.dts \"dts\")\n *            must be set to correct values in the stream's timebase (unless the\n *            output format is flagged with the AVFMT_NOTIMESTAMPS flag, then\n *            they can be set to AV_NOPTS_VALUE).\n *            The dts for subsequent packets passed to this function must be strictly\n *            increasing when compared in their respective timebases (unless the\n *            output format is flagged with the AVFMT_TS_NONSTRICT, then they\n *            merely have to be nondecreasing).  @ref AVPacket.duration\n *            \"duration\") should also be set if known.\n * @return < 0 on error, = 0 if OK, 1 if flushed and there is no more data to flush\n *\n * @see av_interleaved_write_frame()\n */\nint av_write_frame(AVFormatContext *s, AVPacket *pkt);\n\n/**\n * Write a packet to an output media file ensuring correct interleaving.\n *\n * This function will buffer the packets internally as needed to make sure the\n * packets in the output file are properly interleaved in the order of\n * increasing dts. Callers doing their own interleaving should call\n * av_write_frame() instead of this function.\n *\n * @param s media file handle\n * @param pkt The packet containing the data to be written.\n *            <br>\n *            If the packet is reference-counted, this function will take\n *            ownership of this reference and unreference it later when it sees\n *            fit.\n *            The caller must not access the data through this reference after\n *            this function returns. If the packet is not reference-counted,\n *            libavformat will make a copy.\n *            <br>\n *            This parameter can be NULL (at any time, not just at the end), to\n *            flush the interleaving queues.\n *            <br>\n *            Packet's @ref AVPacket.stream_index \"stream_index\" field must be\n *            set to the index of the corresponding stream in @ref\n *            AVFormatContext.streams \"s->streams\".\n *            <br>\n *            The timestamps (@ref AVPacket.pts \"pts\", @ref AVPacket.dts \"dts\")\n *            must be set to correct values in the stream's timebase (unless the\n *            output format is flagged with the AVFMT_NOTIMESTAMPS flag, then\n *            they can be set to AV_NOPTS_VALUE).\n *            The dts for subsequent packets in one stream must be strictly\n *            increasing (unless the output format is flagged with the\n *            AVFMT_TS_NONSTRICT, then they merely have to be nondecreasing).\n *            @ref AVPacket.duration \"duration\") should also be set if known.\n *\n * @return 0 on success, a negative AVERROR on error. Libavformat will always\n *         take care of freeing the packet, even if this function fails.\n *\n * @see av_write_frame(), AVFormatContext.max_interleave_delta\n */\nint av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt);\n\n/**\n * Write a uncoded frame to an output media file.\n *\n * The frame must be correctly interleaved according to the container\n * specification; if not, then av_interleaved_write_frame() must be used.\n *\n * See av_interleaved_write_frame() for details.\n */\nint av_write_uncoded_frame(AVFormatContext *s, int stream_index,\n                           AVFrame *frame);\n\n/**\n * Write a uncoded frame to an output media file.\n *\n * If the muxer supports it, this function makes it possible to write an AVFrame\n * structure directly, without encoding it into a packet.\n * It is mostly useful for devices and similar special muxers that use raw\n * video or PCM data and will not serialize it into a byte stream.\n *\n * To test whether it is possible to use it with a given muxer and stream,\n * use av_write_uncoded_frame_query().\n *\n * The caller gives up ownership of the frame and must not access it\n * afterwards.\n *\n * @return  >=0 for success, a negative code on error\n */\nint av_interleaved_write_uncoded_frame(AVFormatContext *s, int stream_index,\n                                       AVFrame *frame);\n\n/**\n * Test whether a muxer supports uncoded frame.\n *\n * @return  >=0 if an uncoded frame can be written to that muxer and stream,\n *          <0 if not\n */\nint av_write_uncoded_frame_query(AVFormatContext *s, int stream_index);\n\n/**\n * Write the stream trailer to an output media file and free the\n * file private data.\n *\n * May only be called after a successful call to avformat_write_header.\n *\n * @param s media file handle\n * @return 0 if OK, AVERROR_xxx on error\n */\nint av_write_trailer(AVFormatContext *s);\n\n/**\n * Return the output format in the list of registered output formats\n * which best matches the provided parameters, or return NULL if\n * there is no match.\n *\n * @param short_name if non-NULL checks if short_name matches with the\n * names of the registered formats\n * @param filename if non-NULL checks if filename terminates with the\n * extensions of the registered formats\n * @param mime_type if non-NULL checks if mime_type matches with the\n * MIME type of the registered formats\n */\nAVOutputFormat *av_guess_format(const char *short_name,\n                                const char *filename,\n                                const char *mime_type);\n\n/**\n * Guess the codec ID based upon muxer and filename.\n */\nenum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,\n                            const char *filename, const char *mime_type,\n                            enum AVMediaType type);\n\n/**\n * Get timing information for the data currently output.\n * The exact meaning of \"currently output\" depends on the format.\n * It is mostly relevant for devices that have an internal buffer and/or\n * work in real time.\n * @param s          media file handle\n * @param stream     stream in the media file\n * @param[out] dts   DTS of the last packet output for the stream, in stream\n *                   time_base units\n * @param[out] wall  absolute time when that packet whas output,\n *                   in microsecond\n * @return  0 if OK, AVERROR(ENOSYS) if the format does not support it\n * Note: some formats or devices may not allow to measure dts and wall\n * atomically.\n */\nint av_get_output_timestamp(struct AVFormatContext *s, int stream,\n                            int64_t *dts, int64_t *wall);\n\n\n/**\n * @}\n */\n\n\n/**\n * @defgroup lavf_misc Utility functions\n * @ingroup libavf\n * @{\n *\n * Miscellaneous utility functions related to both muxing and demuxing\n * (or neither).\n */\n\n/**\n * Send a nice hexadecimal dump of a buffer to the specified file stream.\n *\n * @param f The file stream pointer where the dump should be sent to.\n * @param buf buffer\n * @param size buffer size\n *\n * @see av_hex_dump_log, av_pkt_dump2, av_pkt_dump_log2\n */\nvoid av_hex_dump(FILE *f, const uint8_t *buf, int size);\n\n/**\n * Send a nice hexadecimal dump of a buffer to the log.\n *\n * @param avcl A pointer to an arbitrary struct of which the first field is a\n * pointer to an AVClass struct.\n * @param level The importance level of the message, lower values signifying\n * higher importance.\n * @param buf buffer\n * @param size buffer size\n *\n * @see av_hex_dump, av_pkt_dump2, av_pkt_dump_log2\n */\nvoid av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size);\n\n/**\n * Send a nice dump of a packet to the specified file stream.\n *\n * @param f The file stream pointer where the dump should be sent to.\n * @param pkt packet to dump\n * @param dump_payload True if the payload must be displayed, too.\n * @param st AVStream that the packet belongs to\n */\nvoid av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st);\n\n\n/**\n * Send a nice dump of a packet to the log.\n *\n * @param avcl A pointer to an arbitrary struct of which the first field is a\n * pointer to an AVClass struct.\n * @param level The importance level of the message, lower values signifying\n * higher importance.\n * @param pkt packet to dump\n * @param dump_payload True if the payload must be displayed, too.\n * @param st AVStream that the packet belongs to\n */\nvoid av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload,\n                      const AVStream *st);\n\n/**\n * Get the AVCodecID for the given codec tag tag.\n * If no codec id is found returns AV_CODEC_ID_NONE.\n *\n * @param tags list of supported codec_id-codec_tag pairs, as stored\n * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag\n * @param tag  codec tag to match to a codec ID\n */\nenum AVCodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);\n\n/**\n * Get the codec tag for the given codec id id.\n * If no codec tag is found returns 0.\n *\n * @param tags list of supported codec_id-codec_tag pairs, as stored\n * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag\n * @param id   codec ID to match to a codec tag\n */\nunsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum AVCodecID id);\n\n/**\n * Get the codec tag for the given codec id.\n *\n * @param tags list of supported codec_id - codec_tag pairs, as stored\n * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag\n * @param id codec id that should be searched for in the list\n * @param tag A pointer to the found tag\n * @return 0 if id was not found in tags, > 0 if it was found\n */\nint av_codec_get_tag2(const struct AVCodecTag * const *tags, enum AVCodecID id,\n                      unsigned int *tag);\n\nint av_find_default_stream_index(AVFormatContext *s);\n\n/**\n * Get the index for a specific timestamp.\n *\n * @param st        stream that the timestamp belongs to\n * @param timestamp timestamp to retrieve the index for\n * @param flags if AVSEEK_FLAG_BACKWARD then the returned index will correspond\n *                 to the timestamp which is <= the requested one, if backward\n *                 is 0, then it will be >=\n *              if AVSEEK_FLAG_ANY seek to any frame, only keyframes otherwise\n * @return < 0 if no such timestamp could be found\n */\nint av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags);\n\n/**\n * Add an index entry into a sorted list. Update the entry if the list\n * already contains it.\n *\n * @param timestamp timestamp in the time base of the given stream\n */\nint av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp,\n                       int size, int distance, int flags);\n\n\n/**\n * Split a URL string into components.\n *\n * The pointers to buffers for storing individual components may be null,\n * in order to ignore that component. Buffers for components not found are\n * set to empty strings. If the port is not found, it is set to a negative\n * value.\n *\n * @param proto the buffer for the protocol\n * @param proto_size the size of the proto buffer\n * @param authorization the buffer for the authorization\n * @param authorization_size the size of the authorization buffer\n * @param hostname the buffer for the host name\n * @param hostname_size the size of the hostname buffer\n * @param port_ptr a pointer to store the port number in\n * @param path the buffer for the path\n * @param path_size the size of the path buffer\n * @param url the URL to split\n */\nvoid av_url_split(char *proto,         int proto_size,\n                  char *authorization, int authorization_size,\n                  char *hostname,      int hostname_size,\n                  int *port_ptr,\n                  char *path,          int path_size,\n                  const char *url);\n\n\n/**\n * Print detailed information about the input or output format, such as\n * duration, bitrate, streams, container, programs, metadata, side data,\n * codec and time base.\n *\n * @param ic        the context to analyze\n * @param index     index of the stream to dump information about\n * @param url       the URL to print, such as source or destination file\n * @param is_output Select whether the specified context is an input(0) or output(1)\n */\nvoid av_dump_format(AVFormatContext *ic,\n                    int index,\n                    const char *url,\n                    int is_output);\n\n/**\n * Return in 'buf' the path with '%d' replaced by a number.\n *\n * Also handles the '%0nd' format where 'n' is the total number\n * of digits and '%%'.\n *\n * @param buf destination buffer\n * @param buf_size destination buffer size\n * @param path numbered sequence string\n * @param number frame number\n * @return 0 if OK, -1 on format error\n */\nint av_get_frame_filename(char *buf, int buf_size,\n                          const char *path, int number);\n\n/**\n * Check whether filename actually is a numbered sequence generator.\n *\n * @param filename possible numbered sequence string\n * @return 1 if a valid numbered sequence string, 0 otherwise\n */\nint av_filename_number_test(const char *filename);\n\n/**\n * Generate an SDP for an RTP session.\n *\n * Note, this overwrites the id values of AVStreams in the muxer contexts\n * for getting unique dynamic payload types.\n *\n * @param ac array of AVFormatContexts describing the RTP streams. If the\n *           array is composed by only one context, such context can contain\n *           multiple AVStreams (one AVStream per RTP stream). Otherwise,\n *           all the contexts in the array (an AVCodecContext per RTP stream)\n *           must contain only one AVStream.\n * @param n_files number of AVCodecContexts contained in ac\n * @param buf buffer where the SDP will be stored (must be allocated by\n *            the caller)\n * @param size the size of the buffer\n * @return 0 if OK, AVERROR_xxx on error\n */\nint av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size);\n\n/**\n * Return a positive value if the given filename has one of the given\n * extensions, 0 otherwise.\n *\n * @param filename   file name to check against the given extensions\n * @param extensions a comma-separated list of filename extensions\n */\nint av_match_ext(const char *filename, const char *extensions);\n\n/**\n * Test if the given container can store a codec.\n *\n * @param ofmt           container to check for compatibility\n * @param codec_id       codec to potentially store in container\n * @param std_compliance standards compliance level, one of FF_COMPLIANCE_*\n *\n * @return 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot.\n *         A negative number if this information is not available.\n */\nint avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,\n                         int std_compliance);\n\n/**\n * @defgroup riff_fourcc RIFF FourCCs\n * @{\n * Get the tables mapping RIFF FourCCs to libavcodec AVCodecIDs. The tables are\n * meant to be passed to av_codec_get_id()/av_codec_get_tag() as in the\n * following code:\n * @code\n * uint32_t tag = MKTAG('H', '2', '6', '4');\n * const struct AVCodecTag *table[] = { avformat_get_riff_video_tags(), 0 };\n * enum AVCodecID id = av_codec_get_id(table, tag);\n * @endcode\n */\n/**\n * @return the table mapping RIFF FourCCs for video to libavcodec AVCodecID.\n */\nconst struct AVCodecTag *avformat_get_riff_video_tags(void);\n/**\n * @return the table mapping RIFF FourCCs for audio to AVCodecID.\n */\nconst struct AVCodecTag *avformat_get_riff_audio_tags(void);\n/**\n * @return the table mapping MOV FourCCs for video to libavcodec AVCodecID.\n */\nconst struct AVCodecTag *avformat_get_mov_video_tags(void);\n/**\n * @return the table mapping MOV FourCCs for audio to AVCodecID.\n */\nconst struct AVCodecTag *avformat_get_mov_audio_tags(void);\n\n/**\n * @}\n */\n\n/**\n * Guess the sample aspect ratio of a frame, based on both the stream and the\n * frame aspect ratio.\n *\n * Since the frame aspect ratio is set by the codec but the stream aspect ratio\n * is set by the demuxer, these two may not be equal. This function tries to\n * return the value that you should use if you would like to display the frame.\n *\n * Basic logic is to use the stream aspect ratio if it is set to something sane\n * otherwise use the frame aspect ratio. This way a container setting, which is\n * usually easy to modify can override the coded value in the frames.\n *\n * @param format the format context which the stream is part of\n * @param stream the stream which the frame is part of\n * @param frame the frame with the aspect ratio to be determined\n * @return the guessed (valid) sample_aspect_ratio, 0/1 if no idea\n */\nAVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *stream, AVFrame *frame);\n\n/**\n * Guess the frame rate, based on both the container and codec information.\n *\n * @param ctx the format context which the stream is part of\n * @param stream the stream which the frame is part of\n * @param frame the frame for which the frame rate should be determined, may be NULL\n * @return the guessed (valid) frame rate, 0/1 if no idea\n */\nAVRational av_guess_frame_rate(AVFormatContext *ctx, AVStream *stream, AVFrame *frame);\n\n/**\n * Check if the stream st contained in s is matched by the stream specifier\n * spec.\n *\n * See the \"stream specifiers\" chapter in the documentation for the syntax\n * of spec.\n *\n * @return  >0 if st is matched by spec;\n *          0  if st is not matched by spec;\n *          AVERROR code if spec is invalid\n *\n * @note  A stream specifier can match several streams in the format.\n */\nint avformat_match_stream_specifier(AVFormatContext *s, AVStream *st,\n                                    const char *spec);\n\nint avformat_queue_attached_pictures(AVFormatContext *s);\n\n/**\n * Apply a list of bitstream filters to a packet.\n *\n * @param codec AVCodecContext, usually from an AVStream\n * @param pkt the packet to apply filters to\n * @param bsfc a NULL-terminated list of filters to apply\n * @return  >=0 on success;\n *          AVERROR code on failure\n */\nint av_apply_bitstream_filters(AVCodecContext *codec, AVPacket *pkt,\n                               AVBitStreamFilterContext *bsfc);\n\n/**\n * @}\n */\n\n#endif /* AVFORMAT_AVFORMAT_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavformat/avio.h",
    "content": "/*\n * copyright (c) 2001 Fabrice Bellard\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n#ifndef AVFORMAT_AVIO_H\n#define AVFORMAT_AVIO_H\n\n/**\n * @file\n * @ingroup lavf_io\n * Buffered I/O operations\n */\n\n#include <stdint.h>\n\n#include \"libavutil/common.h\"\n#include \"libavutil/dict.h\"\n#include \"libavutil/log.h\"\n\n#include \"libavformat/version.h\"\n\n#define AVIO_SEEKABLE_NORMAL 0x0001 /**< Seeking works like for a local file */\n\n/**\n * Callback for checking whether to abort blocking functions.\n * AVERROR_EXIT is returned in this case by the interrupted\n * function. During blocking operations, callback is called with\n * opaque as parameter. If the callback returns 1, the\n * blocking operation will be aborted.\n *\n * No members can be added to this struct without a major bump, if\n * new elements have been added after this struct in AVFormatContext\n * or AVIOContext.\n */\ntypedef struct AVIOInterruptCB {\n    int (*callback)(void*);\n    void *opaque;\n} AVIOInterruptCB;\n\n/**\n * Directory entry types.\n */\nenum AVIODirEntryType {\n    AVIO_ENTRY_UNKNOWN,\n    AVIO_ENTRY_BLOCK_DEVICE,\n    AVIO_ENTRY_CHARACTER_DEVICE,\n    AVIO_ENTRY_DIRECTORY,\n    AVIO_ENTRY_NAMED_PIPE,\n    AVIO_ENTRY_SYMBOLIC_LINK,\n    AVIO_ENTRY_SOCKET,\n    AVIO_ENTRY_FILE,\n    AVIO_ENTRY_SERVER,\n    AVIO_ENTRY_SHARE,\n    AVIO_ENTRY_WORKGROUP,\n};\n\n/**\n * Describes single entry of the directory.\n *\n * Only name and type fields are guaranteed be set.\n * Rest of fields are protocol or/and platform dependent and might be unknown.\n */\ntypedef struct AVIODirEntry {\n    char *name;                           /**< Filename */\n    int type;                             /**< Type of the entry */\n    int utf8;                             /**< Set to 1 when name is encoded with UTF-8, 0 otherwise.\n                                               Name can be encoded with UTF-8 even though 0 is set. */\n    int64_t size;                         /**< File size in bytes, -1 if unknown. */\n    int64_t modification_timestamp;       /**< Time of last modification in microseconds since unix\n                                               epoch, -1 if unknown. */\n    int64_t access_timestamp;             /**< Time of last access in microseconds since unix epoch,\n                                               -1 if unknown. */\n    int64_t status_change_timestamp;      /**< Time of last status change in microseconds since unix\n                                               epoch, -1 if unknown. */\n    int64_t user_id;                      /**< User ID of owner, -1 if unknown. */\n    int64_t group_id;                     /**< Group ID of owner, -1 if unknown. */\n    int64_t filemode;                     /**< Unix file mode, -1 if unknown. */\n} AVIODirEntry;\n\ntypedef struct AVIODirContext {\n    struct URLContext *url_context;\n} AVIODirContext;\n\n/**\n * Bytestream IO Context.\n * New fields can be added to the end with minor version bumps.\n * Removal, reordering and changes to existing fields require a major\n * version bump.\n * sizeof(AVIOContext) must not be used outside libav*.\n *\n * @note None of the function pointers in AVIOContext should be called\n *       directly, they should only be set by the client application\n *       when implementing custom I/O. Normally these are set to the\n *       function pointers specified in avio_alloc_context()\n */\ntypedef struct AVIOContext {\n    /**\n     * A class for private options.\n     *\n     * If this AVIOContext is created by avio_open2(), av_class is set and\n     * passes the options down to protocols.\n     *\n     * If this AVIOContext is manually allocated, then av_class may be set by\n     * the caller.\n     *\n     * warning -- this field can be NULL, be sure to not pass this AVIOContext\n     * to any av_opt_* functions in that case.\n     */\n    const AVClass *av_class;\n\n    /*\n     * The following shows the relationship between buffer, buf_ptr, buf_end, buf_size,\n     * and pos, when reading and when writing (since AVIOContext is used for both):\n     *\n     **********************************************************************************\n     *                                   READING\n     **********************************************************************************\n     *\n     *                            |              buffer_size              |\n     *                            |---------------------------------------|\n     *                            |                                       |\n     *\n     *                         buffer          buf_ptr       buf_end\n     *                            +---------------+-----------------------+\n     *                            |/ / / / / / / /|/ / / / / / /|         |\n     *  read buffer:              |/ / consumed / | to be read /|         |\n     *                            |/ / / / / / / /|/ / / / / / /|         |\n     *                            +---------------+-----------------------+\n     *\n     *                                                         pos\n     *              +-------------------------------------------+-----------------+\n     *  input file: |                                           |                 |\n     *              +-------------------------------------------+-----------------+\n     *\n     *\n     **********************************************************************************\n     *                                   WRITING\n     **********************************************************************************\n     *\n     *                                          |          buffer_size          |\n     *                                          |-------------------------------|\n     *                                          |                               |\n     *\n     *                                       buffer              buf_ptr     buf_end\n     *                                          +-------------------+-----------+\n     *                                          |/ / / / / / / / / /|           |\n     *  write buffer:                           | / to be flushed / |           |\n     *                                          |/ / / / / / / / / /|           |\n     *                                          +-------------------+-----------+\n     *\n     *                                         pos\n     *               +--------------------------+-----------------------------------+\n     *  output file: |                          |                                   |\n     *               +--------------------------+-----------------------------------+\n     *\n     */\n    unsigned char *buffer;  /**< Start of the buffer. */\n    int buffer_size;        /**< Maximum buffer size */\n    unsigned char *buf_ptr; /**< Current position in the buffer */\n    unsigned char *buf_end; /**< End of the data, may be less than\n                                 buffer+buffer_size if the read function returned\n                                 less data than requested, e.g. for streams where\n                                 no more data has been received yet. */\n    void *opaque;           /**< A private pointer, passed to the read/write/seek/...\n                                 functions. */\n    int (*read_packet)(void *opaque, uint8_t *buf, int buf_size);\n    int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);\n    int64_t (*seek)(void *opaque, int64_t offset, int whence);\n    int64_t pos;            /**< position in the file of the current buffer */\n    int must_flush;         /**< true if the next seek should flush */\n    int eof_reached;        /**< true if eof reached */\n    int write_flag;         /**< true if open for writing */\n    int max_packet_size;\n    unsigned long checksum;\n    unsigned char *checksum_ptr;\n    unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);\n    int error;              /**< contains the error code or 0 if no error happened */\n    /**\n     * Pause or resume playback for network streaming protocols - e.g. MMS.\n     */\n    int (*read_pause)(void *opaque, int pause);\n    /**\n     * Seek to a given timestamp in stream with the specified stream_index.\n     * Needed for some network streaming protocols which don't support seeking\n     * to byte position.\n     */\n    int64_t (*read_seek)(void *opaque, int stream_index,\n                         int64_t timestamp, int flags);\n    /**\n     * A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.\n     */\n    int seekable;\n\n    /**\n     * max filesize, used to limit allocations\n     * This field is internal to libavformat and access from outside is not allowed.\n     */\n    int64_t maxsize;\n\n    /**\n     * avio_read and avio_write should if possible be satisfied directly\n     * instead of going through a buffer, and avio_seek will always\n     * call the underlying seek function directly.\n     */\n    int direct;\n\n    /**\n     * Bytes read statistic\n     * This field is internal to libavformat and access from outside is not allowed.\n     */\n    int64_t bytes_read;\n\n    /**\n     * seek statistic\n     * This field is internal to libavformat and access from outside is not allowed.\n     */\n    int seek_count;\n\n    /**\n     * writeout statistic\n     * This field is internal to libavformat and access from outside is not allowed.\n     */\n    int writeout_count;\n\n    /**\n     * Original buffer size\n     * used internally after probing and ensure seekback to reset the buffer size\n     * This field is internal to libavformat and access from outside is not allowed.\n     */\n    int orig_buffer_size;\n\n    /**\n     * Threshold to favor readahead over seek.\n     * This is current internal only, do not use from outside.\n     */\n    int short_seek_threshold;\n} AVIOContext;\n\n/* unbuffered I/O */\n\n/**\n * Return the name of the protocol that will handle the passed URL.\n *\n * NULL is returned if no protocol could be found for the given URL.\n *\n * @return Name of the protocol or NULL.\n */\nconst char *avio_find_protocol_name(const char *url);\n\n/**\n * Return AVIO_FLAG_* access flags corresponding to the access permissions\n * of the resource in url, or a negative value corresponding to an\n * AVERROR code in case of failure. The returned access flags are\n * masked by the value in flags.\n *\n * @note This function is intrinsically unsafe, in the sense that the\n * checked resource may change its existence or permission status from\n * one call to another. Thus you should not trust the returned value,\n * unless you are sure that no other processes are accessing the\n * checked resource.\n */\nint avio_check(const char *url, int flags);\n\n/**\n * Move or rename a resource.\n *\n * @note url_src and url_dst should share the same protocol and authority.\n *\n * @param url_src url to resource to be moved\n * @param url_dst new url to resource if the operation succeeded\n * @return >=0 on success or negative on error.\n */\nint avpriv_io_move(const char *url_src, const char *url_dst);\n\n/**\n * Delete a resource.\n *\n * @param url resource to be deleted.\n * @return >=0 on success or negative on error.\n */\nint avpriv_io_delete(const char *url);\n\n/**\n * Open directory for reading.\n *\n * @param s       directory read context. Pointer to a NULL pointer must be passed.\n * @param url     directory to be listed.\n * @param options A dictionary filled with protocol-private options. On return\n *                this parameter will be destroyed and replaced with a dictionary\n *                containing options that were not found. May be NULL.\n * @return >=0 on success or negative on error.\n */\nint avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options);\n\n/**\n * Get next directory entry.\n *\n * Returned entry must be freed with avio_free_directory_entry(). In particular\n * it may outlive AVIODirContext.\n *\n * @param s         directory read context.\n * @param[out] next next entry or NULL when no more entries.\n * @return >=0 on success or negative on error. End of list is not considered an\n *             error.\n */\nint avio_read_dir(AVIODirContext *s, AVIODirEntry **next);\n\n/**\n * Close directory.\n *\n * @note Entries created using avio_read_dir() are not deleted and must be\n * freeded with avio_free_directory_entry().\n *\n * @param s         directory read context.\n * @return >=0 on success or negative on error.\n */\nint avio_close_dir(AVIODirContext **s);\n\n/**\n * Free entry allocated by avio_read_dir().\n *\n * @param entry entry to be freed.\n */\nvoid avio_free_directory_entry(AVIODirEntry **entry);\n\n/**\n * Allocate and initialize an AVIOContext for buffered I/O. It must be later\n * freed with av_free().\n *\n * @param buffer Memory block for input/output operations via AVIOContext.\n *        The buffer must be allocated with av_malloc() and friends.\n *        It may be freed and replaced with a new buffer by libavformat.\n *        AVIOContext.buffer holds the buffer currently in use,\n *        which must be later freed with av_free().\n * @param buffer_size The buffer size is very important for performance.\n *        For protocols with fixed blocksize it should be set to this blocksize.\n *        For others a typical size is a cache page, e.g. 4kb.\n * @param write_flag Set to 1 if the buffer should be writable, 0 otherwise.\n * @param opaque An opaque pointer to user-specific data.\n * @param read_packet  A function for refilling the buffer, may be NULL.\n * @param write_packet A function for writing the buffer contents, may be NULL.\n *        The function may not change the input buffers content.\n * @param seek A function for seeking to specified byte position, may be NULL.\n *\n * @return Allocated AVIOContext or NULL on failure.\n */\nAVIOContext *avio_alloc_context(\n                  unsigned char *buffer,\n                  int buffer_size,\n                  int write_flag,\n                  void *opaque,\n                  int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),\n                  int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),\n                  int64_t (*seek)(void *opaque, int64_t offset, int whence));\n\nvoid avio_w8(AVIOContext *s, int b);\nvoid avio_write(AVIOContext *s, const unsigned char *buf, int size);\nvoid avio_wl64(AVIOContext *s, uint64_t val);\nvoid avio_wb64(AVIOContext *s, uint64_t val);\nvoid avio_wl32(AVIOContext *s, unsigned int val);\nvoid avio_wb32(AVIOContext *s, unsigned int val);\nvoid avio_wl24(AVIOContext *s, unsigned int val);\nvoid avio_wb24(AVIOContext *s, unsigned int val);\nvoid avio_wl16(AVIOContext *s, unsigned int val);\nvoid avio_wb16(AVIOContext *s, unsigned int val);\n\n/**\n * Write a NULL-terminated string.\n * @return number of bytes written.\n */\nint avio_put_str(AVIOContext *s, const char *str);\n\n/**\n * Convert an UTF-8 string to UTF-16LE and write it.\n * @param s the AVIOContext\n * @param str NULL-terminated UTF-8 string\n *\n * @return number of bytes written.\n */\nint avio_put_str16le(AVIOContext *s, const char *str);\n\n/**\n * Convert an UTF-8 string to UTF-16BE and write it.\n * @param s the AVIOContext\n * @param str NULL-terminated UTF-8 string\n *\n * @return number of bytes written.\n */\nint avio_put_str16be(AVIOContext *s, const char *str);\n\n/**\n * Passing this as the \"whence\" parameter to a seek function causes it to\n * return the filesize without seeking anywhere. Supporting this is optional.\n * If it is not supported then the seek function will return <0.\n */\n#define AVSEEK_SIZE 0x10000\n\n/**\n * Oring this flag as into the \"whence\" parameter to a seek function causes it to\n * seek by any means (like reopening and linear reading) or other normally unreasonable\n * means that can be extremely slow.\n * This may be ignored by the seek code.\n */\n#define AVSEEK_FORCE 0x20000\n\n/**\n * fseek() equivalent for AVIOContext.\n * @return new position or AVERROR.\n */\nint64_t avio_seek(AVIOContext *s, int64_t offset, int whence);\n\n/**\n * Skip given number of bytes forward\n * @return new position or AVERROR.\n */\nint64_t avio_skip(AVIOContext *s, int64_t offset);\n\n/**\n * ftell() equivalent for AVIOContext.\n * @return position or AVERROR.\n */\nstatic av_always_inline int64_t avio_tell(AVIOContext *s)\n{\n    return avio_seek(s, 0, SEEK_CUR);\n}\n\n/**\n * Get the filesize.\n * @return filesize or AVERROR\n */\nint64_t avio_size(AVIOContext *s);\n\n/**\n * feof() equivalent for AVIOContext.\n * @return non zero if and only if end of file\n */\nint avio_feof(AVIOContext *s);\n#if FF_API_URL_FEOF\n/**\n * @deprecated use avio_feof()\n */\nattribute_deprecated\nint url_feof(AVIOContext *s);\n#endif\n\n/** @warning Writes up to 4 KiB per call */\nint avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);\n\n/**\n * Force flushing of buffered data.\n *\n * For write streams, force the buffered data to be immediately written to the output,\n * without to wait to fill the internal buffer.\n *\n * For read streams, discard all currently buffered data, and advance the\n * reported file position to that of the underlying stream. This does not\n * read new data, and does not perform any seeks.\n */\nvoid avio_flush(AVIOContext *s);\n\n/**\n * Read size bytes from AVIOContext into buf.\n * @return number of bytes read or AVERROR\n */\nint avio_read(AVIOContext *s, unsigned char *buf, int size);\n\n/**\n * @name Functions for reading from AVIOContext\n * @{\n *\n * @note return 0 if EOF, so you cannot use it if EOF handling is\n *       necessary\n */\nint          avio_r8  (AVIOContext *s);\nunsigned int avio_rl16(AVIOContext *s);\nunsigned int avio_rl24(AVIOContext *s);\nunsigned int avio_rl32(AVIOContext *s);\nuint64_t     avio_rl64(AVIOContext *s);\nunsigned int avio_rb16(AVIOContext *s);\nunsigned int avio_rb24(AVIOContext *s);\nunsigned int avio_rb32(AVIOContext *s);\nuint64_t     avio_rb64(AVIOContext *s);\n/**\n * @}\n */\n\n/**\n * Read a string from pb into buf. The reading will terminate when either\n * a NULL character was encountered, maxlen bytes have been read, or nothing\n * more can be read from pb. The result is guaranteed to be NULL-terminated, it\n * will be truncated if buf is too small.\n * Note that the string is not interpreted or validated in any way, it\n * might get truncated in the middle of a sequence for multi-byte encodings.\n *\n * @return number of bytes read (is always <= maxlen).\n * If reading ends on EOF or error, the return value will be one more than\n * bytes actually read.\n */\nint avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen);\n\n/**\n * Read a UTF-16 string from pb and convert it to UTF-8.\n * The reading will terminate when either a null or invalid character was\n * encountered or maxlen bytes have been read.\n * @return number of bytes read (is always <= maxlen)\n */\nint avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen);\nint avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen);\n\n\n/**\n * @name URL open modes\n * The flags argument to avio_open must be one of the following\n * constants, optionally ORed with other flags.\n * @{\n */\n#define AVIO_FLAG_READ  1                                      /**< read-only */\n#define AVIO_FLAG_WRITE 2                                      /**< write-only */\n#define AVIO_FLAG_READ_WRITE (AVIO_FLAG_READ|AVIO_FLAG_WRITE)  /**< read-write pseudo flag */\n/**\n * @}\n */\n\n/**\n * Use non-blocking mode.\n * If this flag is set, operations on the context will return\n * AVERROR(EAGAIN) if they can not be performed immediately.\n * If this flag is not set, operations on the context will never return\n * AVERROR(EAGAIN).\n * Note that this flag does not affect the opening/connecting of the\n * context. Connecting a protocol will always block if necessary (e.g. on\n * network protocols) but never hang (e.g. on busy devices).\n * Warning: non-blocking protocols is work-in-progress; this flag may be\n * silently ignored.\n */\n#define AVIO_FLAG_NONBLOCK 8\n\n/**\n * Use direct mode.\n * avio_read and avio_write should if possible be satisfied directly\n * instead of going through a buffer, and avio_seek will always\n * call the underlying seek function directly.\n */\n#define AVIO_FLAG_DIRECT 0x8000\n\n/**\n * Create and initialize a AVIOContext for accessing the\n * resource indicated by url.\n * @note When the resource indicated by url has been opened in\n * read+write mode, the AVIOContext can be used only for writing.\n *\n * @param s Used to return the pointer to the created AVIOContext.\n * In case of failure the pointed to value is set to NULL.\n * @param url resource to access\n * @param flags flags which control how the resource indicated by url\n * is to be opened\n * @return >= 0 in case of success, a negative value corresponding to an\n * AVERROR code in case of failure\n */\nint avio_open(AVIOContext **s, const char *url, int flags);\n\n/**\n * Create and initialize a AVIOContext for accessing the\n * resource indicated by url.\n * @note When the resource indicated by url has been opened in\n * read+write mode, the AVIOContext can be used only for writing.\n *\n * @param s Used to return the pointer to the created AVIOContext.\n * In case of failure the pointed to value is set to NULL.\n * @param url resource to access\n * @param flags flags which control how the resource indicated by url\n * is to be opened\n * @param int_cb an interrupt callback to be used at the protocols level\n * @param options  A dictionary filled with protocol-private options. On return\n * this parameter will be destroyed and replaced with a dict containing options\n * that were not found. May be NULL.\n * @return >= 0 in case of success, a negative value corresponding to an\n * AVERROR code in case of failure\n */\nint avio_open2(AVIOContext **s, const char *url, int flags,\n               const AVIOInterruptCB *int_cb, AVDictionary **options);\n\n/**\n * Close the resource accessed by the AVIOContext s and free it.\n * This function can only be used if s was opened by avio_open().\n *\n * The internal buffer is automatically flushed before closing the\n * resource.\n *\n * @return 0 on success, an AVERROR < 0 on error.\n * @see avio_closep\n */\nint avio_close(AVIOContext *s);\n\n/**\n * Close the resource accessed by the AVIOContext *s, free it\n * and set the pointer pointing to it to NULL.\n * This function can only be used if s was opened by avio_open().\n *\n * The internal buffer is automatically flushed before closing the\n * resource.\n *\n * @return 0 on success, an AVERROR < 0 on error.\n * @see avio_close\n */\nint avio_closep(AVIOContext **s);\n\n\n/**\n * Open a write only memory stream.\n *\n * @param s new IO context\n * @return zero if no error.\n */\nint avio_open_dyn_buf(AVIOContext **s);\n\n/**\n * Return the written size and a pointer to the buffer. The buffer\n * must be freed with av_free().\n * Padding of AV_INPUT_BUFFER_PADDING_SIZE is added to the buffer.\n *\n * @param s IO context\n * @param pbuffer pointer to a byte buffer\n * @return the length of the byte buffer\n */\nint avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);\n\n/**\n * Iterate through names of available protocols.\n *\n * @param opaque A private pointer representing current protocol.\n *        It must be a pointer to NULL on first iteration and will\n *        be updated by successive calls to avio_enum_protocols.\n * @param output If set to 1, iterate over output protocols,\n *               otherwise over input protocols.\n *\n * @return A static string containing the name of current protocol or NULL\n */\nconst char *avio_enum_protocols(void **opaque, int output);\n\n/**\n * Pause and resume playing - only meaningful if using a network streaming\n * protocol (e.g. MMS).\n *\n * @param h     IO context from which to call the read_pause function pointer\n * @param pause 1 for pause, 0 for resume\n */\nint     avio_pause(AVIOContext *h, int pause);\n\n/**\n * Seek to a given timestamp relative to some component stream.\n * Only meaningful if using a network streaming protocol (e.g. MMS.).\n *\n * @param h IO context from which to call the seek function pointers\n * @param stream_index The stream index that the timestamp is relative to.\n *        If stream_index is (-1) the timestamp should be in AV_TIME_BASE\n *        units from the beginning of the presentation.\n *        If a stream_index >= 0 is used and the protocol does not support\n *        seeking based on component streams, the call will fail.\n * @param timestamp timestamp in AVStream.time_base units\n *        or if there is no stream specified then in AV_TIME_BASE units.\n * @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE\n *        and AVSEEK_FLAG_ANY. The protocol may silently ignore\n *        AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will\n *        fail if used and not supported.\n * @return >= 0 on success\n * @see AVInputFormat::read_seek\n */\nint64_t avio_seek_time(AVIOContext *h, int stream_index,\n                       int64_t timestamp, int flags);\n\n/* Avoid a warning. The header can not be included because it breaks c++. */\nstruct AVBPrint;\n\n/**\n * Read contents of h into print buffer, up to max_size bytes, or up to EOF.\n *\n * @return 0 for success (max_size bytes read or EOF reached), negative error\n * code otherwise\n */\nint avio_read_to_bprint(AVIOContext *h, struct AVBPrint *pb, size_t max_size);\n\n/**\n * Accept and allocate a client context on a server context.\n * @param  s the server context\n * @param  c the client context, must be unallocated\n * @return   >= 0 on success or a negative value corresponding\n *           to an AVERROR on failure\n */\nint avio_accept(AVIOContext *s, AVIOContext **c);\n\n/**\n * Perform one step of the protocol handshake to accept a new client.\n * This function must be called on a client returned by avio_accept() before\n * using it as a read/write context.\n * It is separate from avio_accept() because it may block.\n * A step of the handshake is defined by places where the application may\n * decide to change the proceedings.\n * For example, on a protocol with a request header and a reply header, each\n * one can constitute a step because the application may use the parameters\n * from the request to change parameters in the reply; or each individual\n * chunk of the request can constitute a step.\n * If the handshake is already finished, avio_handshake() does nothing and\n * returns 0 immediately.\n *\n * @param  c the client context to perform the handshake on\n * @return   0   on a complete and successful handshake\n *           > 0 if the handshake progressed, but is not complete\n *           < 0 for an AVERROR code\n */\nint avio_handshake(AVIOContext *c);\n#endif /* AVFORMAT_AVIO_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavformat/version.h",
    "content": "/*\n * Version macros.\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVFORMAT_VERSION_H\n#define AVFORMAT_VERSION_H\n\n/**\n * @file\n * @ingroup libavf\n * Libavformat version macros\n */\n\n#include \"libavutil/version.h\"\n\n#define LIBAVFORMAT_VERSION_MAJOR  57\n#define LIBAVFORMAT_VERSION_MINOR  21\n#define LIBAVFORMAT_VERSION_MICRO 100\n\n#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \\\n                                               LIBAVFORMAT_VERSION_MINOR, \\\n                                               LIBAVFORMAT_VERSION_MICRO)\n#define LIBAVFORMAT_VERSION     AV_VERSION(LIBAVFORMAT_VERSION_MAJOR,   \\\n                                           LIBAVFORMAT_VERSION_MINOR,   \\\n                                           LIBAVFORMAT_VERSION_MICRO)\n#define LIBAVFORMAT_BUILD       LIBAVFORMAT_VERSION_INT\n\n#define LIBAVFORMAT_IDENT       \"Lavf\" AV_STRINGIFY(LIBAVFORMAT_VERSION)\n\n/**\n * FF_API_* defines may be placed below to indicate public API that will be\n * dropped at a future version bump. The defines themselves are not part of\n * the public API and may change, break or disappear at any time.\n *\n * @note, when bumping the major version it is recommended to manually\n * disable each FF_API_* in its own commit instead of disabling them all\n * at once through the bump. This improves the git bisect-ability of the change.\n *\n */\n#ifndef FF_API_LAVF_BITEXACT\n#define FF_API_LAVF_BITEXACT            (LIBAVFORMAT_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_LAVF_FRAC\n#define FF_API_LAVF_FRAC                (LIBAVFORMAT_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_LAVF_CODEC_TB\n#define FF_API_LAVF_CODEC_TB            (LIBAVFORMAT_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_URL_FEOF\n#define FF_API_URL_FEOF                 (LIBAVFORMAT_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_LAVF_FMT_RAWPICTURE\n#define FF_API_LAVF_FMT_RAWPICTURE      (LIBAVFORMAT_VERSION_MAJOR < 58)\n#endif\n#ifndef FF_API_COMPUTE_PKT_FIELDS2\n#define FF_API_COMPUTE_PKT_FIELDS2      (LIBAVFORMAT_VERSION_MAJOR < 58)\n#endif\n\n#ifndef FF_API_R_FRAME_RATE\n#define FF_API_R_FRAME_RATE            1\n#endif\n#endif /* AVFORMAT_VERSION_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/adler32.h",
    "content": "/*\n * copyright (c) 2006 Mans Rullgard\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_ADLER32_H\n#define AVUTIL_ADLER32_H\n\n#include <stdint.h>\n#include \"attributes.h\"\n\n/**\n * @file\n * Public header for libavutil Adler32 hasher\n *\n * @defgroup lavu_adler32 Adler32\n * @ingroup lavu_crypto\n * @{\n */\n\n/**\n * Calculate the Adler32 checksum of a buffer.\n *\n * Passing the return value to a subsequent av_adler32_update() call\n * allows the checksum of multiple buffers to be calculated as though\n * they were concatenated.\n *\n * @param adler initial checksum value\n * @param buf   pointer to input buffer\n * @param len   size of input buffer\n * @return      updated checksum\n */\nunsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,\n                                unsigned int len) av_pure;\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_ADLER32_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/aes.h",
    "content": "/*\n * copyright (c) 2007 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_AES_H\n#define AVUTIL_AES_H\n\n#include <stdint.h>\n\n#include \"attributes.h\"\n#include \"version.h\"\n\n/**\n * @defgroup lavu_aes AES\n * @ingroup lavu_crypto\n * @{\n */\n\nextern const int av_aes_size;\n\nstruct AVAES;\n\n/**\n * Allocate an AVAES context.\n */\nstruct AVAES *av_aes_alloc(void);\n\n/**\n * Initialize an AVAES context.\n * @param key_bits 128, 192 or 256\n * @param decrypt 0 for encryption, 1 for decryption\n */\nint av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt);\n\n/**\n * Encrypt or decrypt a buffer using a previously initialized context.\n * @param count number of 16 byte blocks\n * @param dst destination array, can be equal to src\n * @param src source array, can be equal to dst\n * @param iv initialization vector for CBC mode, if NULL then ECB will be used\n * @param decrypt 0 for encryption, 1 for decryption\n */\nvoid av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_AES_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/aes_ctr.h",
    "content": "/*\n * AES-CTR cipher\n * Copyright (c) 2015 Eran Kornblau <erankor at gmail dot com>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_AES_CTR_H\n#define AVUTIL_AES_CTR_H\n\n#include <stdint.h>\n\n#include \"attributes.h\"\n#include \"version.h\"\n\n#define AES_CTR_KEY_SIZE (16)\n#define AES_CTR_IV_SIZE (8)\n\nstruct AVAESCTR;\n\n/**\n * Allocate an AVAESCTR context.\n */\nstruct AVAESCTR *av_aes_ctr_alloc(void);\n\n/**\n * Initialize an AVAESCTR context.\n * @param key encryption key, must have a length of AES_CTR_KEY_SIZE\n */\nint av_aes_ctr_init(struct AVAESCTR *a, const uint8_t *key);\n\n/**\n * Release an AVAESCTR context.\n */\nvoid av_aes_ctr_free(struct AVAESCTR *a);\n\n/**\n * Process a buffer using a previously initialized context.\n * @param dst destination array, can be equal to src\n * @param src source array, can be equal to dst\n * @param size the size of src and dst\n */\nvoid av_aes_ctr_crypt(struct AVAESCTR *a, uint8_t *dst, const uint8_t *src, int size);\n\n/**\n * Get the current iv\n */\nconst uint8_t* av_aes_ctr_get_iv(struct AVAESCTR *a);\n\n/**\n * Generate a random iv\n */\nvoid av_aes_ctr_set_random_iv(struct AVAESCTR *a);\n\n/**\n * Forcefully change the iv\n */\nvoid av_aes_ctr_set_iv(struct AVAESCTR *a, const uint8_t* iv);\n\n/**\n * Increment the top 64 bit of the iv (performed after each frame)\n */\nvoid av_aes_ctr_increment_iv(struct AVAESCTR *a);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_AES_CTR_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/attributes.h",
    "content": "/*\n * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * Macro definitions for various function/variable attributes\n */\n\n#ifndef AVUTIL_ATTRIBUTES_H\n#define AVUTIL_ATTRIBUTES_H\n\n#ifdef __GNUC__\n#    define AV_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > (x) || __GNUC__ == (x) && __GNUC_MINOR__ >= (y))\n#    define AV_GCC_VERSION_AT_MOST(x,y)  (__GNUC__ < (x) || __GNUC__ == (x) && __GNUC_MINOR__ <= (y))\n#else\n#    define AV_GCC_VERSION_AT_LEAST(x,y) 0\n#    define AV_GCC_VERSION_AT_MOST(x,y)  0\n#endif\n\n#ifndef av_always_inline\n#if AV_GCC_VERSION_AT_LEAST(3,1)\n#    define av_always_inline __attribute__((always_inline)) inline\n#elif defined(_MSC_VER)\n#    define av_always_inline __forceinline\n#else\n#    define av_always_inline inline\n#endif\n#endif\n\n#ifndef av_extern_inline\n#if defined(__ICL) && __ICL >= 1210 || defined(__GNUC_STDC_INLINE__)\n#    define av_extern_inline extern inline\n#else\n#    define av_extern_inline inline\n#endif\n#endif\n\n#if AV_GCC_VERSION_AT_LEAST(3,4)\n#    define av_warn_unused_result __attribute__((warn_unused_result))\n#else\n#    define av_warn_unused_result\n#endif\n\n#if AV_GCC_VERSION_AT_LEAST(3,1)\n#    define av_noinline __attribute__((noinline))\n#elif defined(_MSC_VER)\n#    define av_noinline __declspec(noinline)\n#else\n#    define av_noinline\n#endif\n\n#if AV_GCC_VERSION_AT_LEAST(3,1)\n#    define av_pure __attribute__((pure))\n#else\n#    define av_pure\n#endif\n\n#if AV_GCC_VERSION_AT_LEAST(2,6)\n#    define av_const __attribute__((const))\n#else\n#    define av_const\n#endif\n\n#if AV_GCC_VERSION_AT_LEAST(4,3)\n#    define av_cold __attribute__((cold))\n#else\n#    define av_cold\n#endif\n\n#if AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__llvm__)\n#    define av_flatten __attribute__((flatten))\n#else\n#    define av_flatten\n#endif\n\n#if AV_GCC_VERSION_AT_LEAST(3,1)\n#    define attribute_deprecated __attribute__((deprecated))\n#elif defined(_MSC_VER)\n#    define attribute_deprecated __declspec(deprecated)\n#else\n#    define attribute_deprecated\n#endif\n\n/**\n * Disable warnings about deprecated features\n * This is useful for sections of code kept for backward compatibility and\n * scheduled for removal.\n */\n#ifndef AV_NOWARN_DEPRECATED\n#if AV_GCC_VERSION_AT_LEAST(4,6)\n#    define AV_NOWARN_DEPRECATED(code) \\\n        _Pragma(\"GCC diagnostic push\") \\\n        _Pragma(\"GCC diagnostic ignored \\\"-Wdeprecated-declarations\\\"\") \\\n        code \\\n        _Pragma(\"GCC diagnostic pop\")\n#elif defined(_MSC_VER)\n#    define AV_NOWARN_DEPRECATED(code) \\\n        __pragma(warning(push)) \\\n        __pragma(warning(disable : 4996)) \\\n        code; \\\n        __pragma(warning(pop))\n#else\n#    define AV_NOWARN_DEPRECATED(code) code\n#endif\n#endif\n\n\n#if defined(__GNUC__)\n#    define av_unused __attribute__((unused))\n#else\n#    define av_unused\n#endif\n\n/**\n * Mark a variable as used and prevent the compiler from optimizing it\n * away.  This is useful for variables accessed only from inline\n * assembler without the compiler being aware.\n */\n#if AV_GCC_VERSION_AT_LEAST(3,1)\n#    define av_used __attribute__((used))\n#else\n#    define av_used\n#endif\n\n#if AV_GCC_VERSION_AT_LEAST(3,3)\n#   define av_alias __attribute__((may_alias))\n#else\n#   define av_alias\n#endif\n\n#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)\n#    define av_uninit(x) x=x\n#else\n#    define av_uninit(x) x\n#endif\n\n#ifdef __GNUC__\n#    define av_builtin_constant_p __builtin_constant_p\n#    define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))\n#else\n#    define av_builtin_constant_p(x) 0\n#    define av_printf_format(fmtpos, attrpos)\n#endif\n\n#if AV_GCC_VERSION_AT_LEAST(2,5)\n#    define av_noreturn __attribute__((noreturn))\n#else\n#    define av_noreturn\n#endif\n\n#endif /* AVUTIL_ATTRIBUTES_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/audio_fifo.h",
    "content": "/*\n * Audio FIFO\n * Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * Audio FIFO Buffer\n */\n\n#ifndef AVUTIL_AUDIO_FIFO_H\n#define AVUTIL_AUDIO_FIFO_H\n\n#include \"avutil.h\"\n#include \"fifo.h\"\n#include \"samplefmt.h\"\n\n/**\n * @addtogroup lavu_audio\n * @{\n *\n * @defgroup lavu_audiofifo Audio FIFO Buffer\n * @{\n */\n\n/**\n * Context for an Audio FIFO Buffer.\n *\n * - Operates at the sample level rather than the byte level.\n * - Supports multiple channels with either planar or packed sample format.\n * - Automatic reallocation when writing to a full buffer.\n */\ntypedef struct AVAudioFifo AVAudioFifo;\n\n/**\n * Free an AVAudioFifo.\n *\n * @param af  AVAudioFifo to free\n */\nvoid av_audio_fifo_free(AVAudioFifo *af);\n\n/**\n * Allocate an AVAudioFifo.\n *\n * @param sample_fmt  sample format\n * @param channels    number of channels\n * @param nb_samples  initial allocation size, in samples\n * @return            newly allocated AVAudioFifo, or NULL on error\n */\nAVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels,\n                                 int nb_samples);\n\n/**\n * Reallocate an AVAudioFifo.\n *\n * @param af          AVAudioFifo to reallocate\n * @param nb_samples  new allocation size, in samples\n * @return            0 if OK, or negative AVERROR code on failure\n */\nav_warn_unused_result\nint av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);\n\n/**\n * Write data to an AVAudioFifo.\n *\n * The AVAudioFifo will be reallocated automatically if the available space\n * is less than nb_samples.\n *\n * @see enum AVSampleFormat\n * The documentation for AVSampleFormat describes the data layout.\n *\n * @param af          AVAudioFifo to write to\n * @param data        audio data plane pointers\n * @param nb_samples  number of samples to write\n * @return            number of samples actually written, or negative AVERROR\n *                    code on failure. If successful, the number of samples\n *                    actually written will always be nb_samples.\n */\nint av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);\n\n/**\n * Peek data from an AVAudioFifo.\n *\n * @see enum AVSampleFormat\n * The documentation for AVSampleFormat describes the data layout.\n *\n * @param af          AVAudioFifo to read from\n * @param data        audio data plane pointers\n * @param nb_samples  number of samples to peek\n * @return            number of samples actually peek, or negative AVERROR code\n *                    on failure. The number of samples actually peek will not\n *                    be greater than nb_samples, and will only be less than\n *                    nb_samples if av_audio_fifo_size is less than nb_samples.\n */\nint av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples);\n\n/**\n * Read data from an AVAudioFifo.\n *\n * @see enum AVSampleFormat\n * The documentation for AVSampleFormat describes the data layout.\n *\n * @param af          AVAudioFifo to read from\n * @param data        audio data plane pointers\n * @param nb_samples  number of samples to read\n * @return            number of samples actually read, or negative AVERROR code\n *                    on failure. The number of samples actually read will not\n *                    be greater than nb_samples, and will only be less than\n *                    nb_samples if av_audio_fifo_size is less than nb_samples.\n */\nint av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples);\n\n/**\n * Drain data from an AVAudioFifo.\n *\n * Removes the data without reading it.\n *\n * @param af          AVAudioFifo to drain\n * @param nb_samples  number of samples to drain\n * @return            0 if OK, or negative AVERROR code on failure\n */\nint av_audio_fifo_drain(AVAudioFifo *af, int nb_samples);\n\n/**\n * Reset the AVAudioFifo buffer.\n *\n * This empties all data in the buffer.\n *\n * @param af  AVAudioFifo to reset\n */\nvoid av_audio_fifo_reset(AVAudioFifo *af);\n\n/**\n * Get the current number of samples in the AVAudioFifo available for reading.\n *\n * @param af  the AVAudioFifo to query\n * @return    number of samples available for reading\n */\nint av_audio_fifo_size(AVAudioFifo *af);\n\n/**\n * Get the current number of samples in the AVAudioFifo available for writing.\n *\n * @param af  the AVAudioFifo to query\n * @return    number of samples available for writing\n */\nint av_audio_fifo_space(AVAudioFifo *af);\n\n/**\n * @}\n * @}\n */\n\n#endif /* AVUTIL_AUDIO_FIFO_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/avassert.h",
    "content": "/*\n * copyright (c) 2010 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * simple assert() macros that are a bit more flexible than ISO C assert().\n * @author Michael Niedermayer <michaelni@gmx.at>\n */\n\n#ifndef AVUTIL_AVASSERT_H\n#define AVUTIL_AVASSERT_H\n\n#include <stdlib.h>\n#include \"avutil.h\"\n#include \"log.h\"\n\n/**\n * assert() equivalent, that is always enabled.\n */\n#define av_assert0(cond) do {                                           \\\n    if (!(cond)) {                                                      \\\n        av_log(NULL, AV_LOG_PANIC, \"Assertion %s failed at %s:%d\\n\",    \\\n               AV_STRINGIFY(cond), __FILE__, __LINE__);                 \\\n        abort();                                                        \\\n    }                                                                   \\\n} while (0)\n\n\n/**\n * assert() equivalent, that does not lie in speed critical code.\n * These asserts() thus can be enabled without fearing speedloss.\n */\n#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0\n#define av_assert1(cond) av_assert0(cond)\n#else\n#define av_assert1(cond) ((void)0)\n#endif\n\n\n/**\n * assert() equivalent, that does lie in speed critical code.\n */\n#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1\n#define av_assert2(cond) av_assert0(cond)\n#else\n#define av_assert2(cond) ((void)0)\n#endif\n\n#endif /* AVUTIL_AVASSERT_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/avconfig.h",
    "content": "/* Generated by ffconf */\n#ifndef AVUTIL_AVCONFIG_H\n#define AVUTIL_AVCONFIG_H\n#define AV_HAVE_BIGENDIAN 0\n#define AV_HAVE_FAST_UNALIGNED 1\n#define AV_HAVE_INCOMPATIBLE_LIBAV_ABI 0\n#endif /* AVUTIL_AVCONFIG_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/avstring.h",
    "content": "/*\n * Copyright (c) 2007 Mans Rullgard\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_AVSTRING_H\n#define AVUTIL_AVSTRING_H\n\n#include <stddef.h>\n#include <stdint.h>\n#include \"attributes.h\"\n\n/**\n * @addtogroup lavu_string\n * @{\n */\n\n/**\n * Return non-zero if pfx is a prefix of str. If it is, *ptr is set to\n * the address of the first character in str after the prefix.\n *\n * @param str input string\n * @param pfx prefix to test\n * @param ptr updated if the prefix is matched inside str\n * @return non-zero if the prefix matches, zero otherwise\n */\nint av_strstart(const char *str, const char *pfx, const char **ptr);\n\n/**\n * Return non-zero if pfx is a prefix of str independent of case. If\n * it is, *ptr is set to the address of the first character in str\n * after the prefix.\n *\n * @param str input string\n * @param pfx prefix to test\n * @param ptr updated if the prefix is matched inside str\n * @return non-zero if the prefix matches, zero otherwise\n */\nint av_stristart(const char *str, const char *pfx, const char **ptr);\n\n/**\n * Locate the first case-independent occurrence in the string haystack\n * of the string needle.  A zero-length string needle is considered to\n * match at the start of haystack.\n *\n * This function is a case-insensitive version of the standard strstr().\n *\n * @param haystack string to search in\n * @param needle   string to search for\n * @return         pointer to the located match within haystack\n *                 or a null pointer if no match\n */\nchar *av_stristr(const char *haystack, const char *needle);\n\n/**\n * Locate the first occurrence of the string needle in the string haystack\n * where not more than hay_length characters are searched. A zero-length\n * string needle is considered to match at the start of haystack.\n *\n * This function is a length-limited version of the standard strstr().\n *\n * @param haystack   string to search in\n * @param needle     string to search for\n * @param hay_length length of string to search in\n * @return           pointer to the located match within haystack\n *                   or a null pointer if no match\n */\nchar *av_strnstr(const char *haystack, const char *needle, size_t hay_length);\n\n/**\n * Copy the string src to dst, but no more than size - 1 bytes, and\n * null-terminate dst.\n *\n * This function is the same as BSD strlcpy().\n *\n * @param dst destination buffer\n * @param src source string\n * @param size size of destination buffer\n * @return the length of src\n *\n * @warning since the return value is the length of src, src absolutely\n * _must_ be a properly 0-terminated string, otherwise this will read beyond\n * the end of the buffer and possibly crash.\n */\nsize_t av_strlcpy(char *dst, const char *src, size_t size);\n\n/**\n * Append the string src to the string dst, but to a total length of\n * no more than size - 1 bytes, and null-terminate dst.\n *\n * This function is similar to BSD strlcat(), but differs when\n * size <= strlen(dst).\n *\n * @param dst destination buffer\n * @param src source string\n * @param size size of destination buffer\n * @return the total length of src and dst\n *\n * @warning since the return value use the length of src and dst, these\n * absolutely _must_ be a properly 0-terminated strings, otherwise this\n * will read beyond the end of the buffer and possibly crash.\n */\nsize_t av_strlcat(char *dst, const char *src, size_t size);\n\n/**\n * Append output to a string, according to a format. Never write out of\n * the destination buffer, and always put a terminating 0 within\n * the buffer.\n * @param dst destination buffer (string to which the output is\n *  appended)\n * @param size total size of the destination buffer\n * @param fmt printf-compatible format string, specifying how the\n *  following parameters are used\n * @return the length of the string that would have been generated\n *  if enough space had been available\n */\nsize_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_format(3, 4);\n\n/**\n * Get the count of continuous non zero chars starting from the beginning.\n *\n * @param len maximum number of characters to check in the string, that\n *            is the maximum value which is returned by the function\n */\nstatic inline size_t av_strnlen(const char *s, size_t len)\n{\n    size_t i;\n    for (i = 0; i < len && s[i]; i++)\n        ;\n    return i;\n}\n\n/**\n * Print arguments following specified format into a large enough auto\n * allocated buffer. It is similar to GNU asprintf().\n * @param fmt printf-compatible format string, specifying how the\n *            following parameters are used.\n * @return the allocated string\n * @note You have to free the string yourself with av_free().\n */\nchar *av_asprintf(const char *fmt, ...) av_printf_format(1, 2);\n\n/**\n * Convert a number to a av_malloced string.\n */\nchar *av_d2str(double d);\n\n/**\n * Unescape the given string until a non escaped terminating char,\n * and return the token corresponding to the unescaped string.\n *\n * The normal \\ and ' escaping is supported. Leading and trailing\n * whitespaces are removed, unless they are escaped with '\\' or are\n * enclosed between ''.\n *\n * @param buf the buffer to parse, buf will be updated to point to the\n * terminating char\n * @param term a 0-terminated list of terminating chars\n * @return the malloced unescaped string, which must be av_freed by\n * the user, NULL in case of allocation failure\n */\nchar *av_get_token(const char **buf, const char *term);\n\n/**\n * Split the string into several tokens which can be accessed by\n * successive calls to av_strtok().\n *\n * A token is defined as a sequence of characters not belonging to the\n * set specified in delim.\n *\n * On the first call to av_strtok(), s should point to the string to\n * parse, and the value of saveptr is ignored. In subsequent calls, s\n * should be NULL, and saveptr should be unchanged since the previous\n * call.\n *\n * This function is similar to strtok_r() defined in POSIX.1.\n *\n * @param s the string to parse, may be NULL\n * @param delim 0-terminated list of token delimiters, must be non-NULL\n * @param saveptr user-provided pointer which points to stored\n * information necessary for av_strtok() to continue scanning the same\n * string. saveptr is updated to point to the next character after the\n * first delimiter found, or to NULL if the string was terminated\n * @return the found token, or NULL when no token is found\n */\nchar *av_strtok(char *s, const char *delim, char **saveptr);\n\n/**\n * Locale-independent conversion of ASCII isdigit.\n */\nstatic inline av_const int av_isdigit(int c)\n{\n    return c >= '0' && c <= '9';\n}\n\n/**\n * Locale-independent conversion of ASCII isgraph.\n */\nstatic inline av_const int av_isgraph(int c)\n{\n    return c > 32 && c < 127;\n}\n\n/**\n * Locale-independent conversion of ASCII isspace.\n */\nstatic inline av_const int av_isspace(int c)\n{\n    return c == ' ' || c == '\\f' || c == '\\n' || c == '\\r' || c == '\\t' ||\n           c == '\\v';\n}\n\n/**\n * Locale-independent conversion of ASCII characters to uppercase.\n */\nstatic inline av_const int av_toupper(int c)\n{\n    if (c >= 'a' && c <= 'z')\n        c ^= 0x20;\n    return c;\n}\n\n/**\n * Locale-independent conversion of ASCII characters to lowercase.\n */\nstatic inline av_const int av_tolower(int c)\n{\n    if (c >= 'A' && c <= 'Z')\n        c ^= 0x20;\n    return c;\n}\n\n/**\n * Locale-independent conversion of ASCII isxdigit.\n */\nstatic inline av_const int av_isxdigit(int c)\n{\n    c = av_tolower(c);\n    return av_isdigit(c) || (c >= 'a' && c <= 'f');\n}\n\n/**\n * Locale-independent case-insensitive compare.\n * @note This means only ASCII-range characters are case-insensitive\n */\nint av_strcasecmp(const char *a, const char *b);\n\n/**\n * Locale-independent case-insensitive compare.\n * @note This means only ASCII-range characters are case-insensitive\n */\nint av_strncasecmp(const char *a, const char *b, size_t n);\n\n\n/**\n * Thread safe basename.\n * @param path the path, on DOS both \\ and / are considered separators.\n * @return pointer to the basename substring.\n */\nconst char *av_basename(const char *path);\n\n/**\n * Thread safe dirname.\n * @param path the path, on DOS both \\ and / are considered separators.\n * @return the path with the separator replaced by the string terminator or \".\".\n * @note the function may change the input string.\n */\nconst char *av_dirname(char *path);\n\n/**\n * Match instances of a name in a comma-separated list of names.\n * @param name  Name to look for.\n * @param names List of names.\n * @return 1 on match, 0 otherwise.\n */\nint av_match_name(const char *name, const char *names);\n\n/**\n * Append path component to the existing path.\n * Path separator '/' is placed between when needed.\n * Resulting string have to be freed with av_free().\n * @param path      base path\n * @param component component to be appended\n * @return new path or NULL on error.\n */\nchar *av_append_path_component(const char *path, const char *component);\n\nenum AVEscapeMode {\n    AV_ESCAPE_MODE_AUTO,      ///< Use auto-selected escaping mode.\n    AV_ESCAPE_MODE_BACKSLASH, ///< Use backslash escaping.\n    AV_ESCAPE_MODE_QUOTE,     ///< Use single-quote escaping.\n};\n\n/**\n * Consider spaces special and escape them even in the middle of the\n * string.\n *\n * This is equivalent to adding the whitespace characters to the special\n * characters lists, except it is guaranteed to use the exact same list\n * of whitespace characters as the rest of libavutil.\n */\n#define AV_ESCAPE_FLAG_WHITESPACE (1 << 0)\n\n/**\n * Escape only specified special characters.\n * Without this flag, escape also any characters that may be considered\n * special by av_get_token(), such as the single quote.\n */\n#define AV_ESCAPE_FLAG_STRICT (1 << 1)\n\n/**\n * Escape string in src, and put the escaped string in an allocated\n * string in *dst, which must be freed with av_free().\n *\n * @param dst           pointer where an allocated string is put\n * @param src           string to escape, must be non-NULL\n * @param special_chars string containing the special characters which\n *                      need to be escaped, can be NULL\n * @param mode          escape mode to employ, see AV_ESCAPE_MODE_* macros.\n *                      Any unknown value for mode will be considered equivalent to\n *                      AV_ESCAPE_MODE_BACKSLASH, but this behaviour can change without\n *                      notice.\n * @param flags         flags which control how to escape, see AV_ESCAPE_FLAG_ macros\n * @return the length of the allocated string, or a negative error code in case of error\n * @see av_bprint_escape()\n */\nav_warn_unused_result\nint av_escape(char **dst, const char *src, const char *special_chars,\n              enum AVEscapeMode mode, int flags);\n\n#define AV_UTF8_FLAG_ACCEPT_INVALID_BIG_CODES          1 ///< accept codepoints over 0x10FFFF\n#define AV_UTF8_FLAG_ACCEPT_NON_CHARACTERS             2 ///< accept non-characters - 0xFFFE and 0xFFFF\n#define AV_UTF8_FLAG_ACCEPT_SURROGATES                 4 ///< accept UTF-16 surrogates codes\n#define AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES 8 ///< exclude control codes not accepted by XML\n\n#define AV_UTF8_FLAG_ACCEPT_ALL \\\n    AV_UTF8_FLAG_ACCEPT_INVALID_BIG_CODES|AV_UTF8_FLAG_ACCEPT_NON_CHARACTERS|AV_UTF8_FLAG_ACCEPT_SURROGATES\n\n/**\n * Read and decode a single UTF-8 code point (character) from the\n * buffer in *buf, and update *buf to point to the next byte to\n * decode.\n *\n * In case of an invalid byte sequence, the pointer will be updated to\n * the next byte after the invalid sequence and the function will\n * return an error code.\n *\n * Depending on the specified flags, the function will also fail in\n * case the decoded code point does not belong to a valid range.\n *\n * @note For speed-relevant code a carefully implemented use of\n * GET_UTF8() may be preferred.\n *\n * @param codep   pointer used to return the parsed code in case of success.\n *                The value in *codep is set even in case the range check fails.\n * @param bufp    pointer to the address the first byte of the sequence\n *                to decode, updated by the function to point to the\n *                byte next after the decoded sequence\n * @param buf_end pointer to the end of the buffer, points to the next\n *                byte past the last in the buffer. This is used to\n *                avoid buffer overreads (in case of an unfinished\n *                UTF-8 sequence towards the end of the buffer).\n * @param flags   a collection of AV_UTF8_FLAG_* flags\n * @return >= 0 in case a sequence was successfully read, a negative\n * value in case of invalid sequence\n */\nav_warn_unused_result\nint av_utf8_decode(int32_t *codep, const uint8_t **bufp, const uint8_t *buf_end,\n                   unsigned int flags);\n\n/**\n * Check if a name is in a list.\n * @returns 0 if not found, or the 1 based index where it has been found in the\n *            list.\n */\nint av_match_list(const char *name, const char *list, char separator);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_AVSTRING_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/avutil.h",
    "content": "/*\n * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_AVUTIL_H\n#define AVUTIL_AVUTIL_H\n\n/**\n * @file\n * external API header\n */\n\n/**\n * @mainpage\n *\n * @section ffmpeg_intro Introduction\n *\n * This document describes the usage of the different libraries\n * provided by FFmpeg.\n *\n * @li @ref libavc \"libavcodec\" encoding/decoding library\n * @li @ref lavfi \"libavfilter\" graph-based frame editing library\n * @li @ref libavf \"libavformat\" I/O and muxing/demuxing library\n * @li @ref lavd \"libavdevice\" special devices muxing/demuxing library\n * @li @ref lavu \"libavutil\" common utility library\n * @li @ref lswr \"libswresample\" audio resampling, format conversion and mixing\n * @li @ref lpp  \"libpostproc\" post processing library\n * @li @ref libsws \"libswscale\" color conversion and scaling library\n *\n * @section ffmpeg_versioning Versioning and compatibility\n *\n * Each of the FFmpeg libraries contains a version.h header, which defines a\n * major, minor and micro version number with the\n * <em>LIBRARYNAME_VERSION_{MAJOR,MINOR,MICRO}</em> macros. The major version\n * number is incremented with backward incompatible changes - e.g. removing\n * parts of the public API, reordering public struct members, etc. The minor\n * version number is incremented for backward compatible API changes or major\n * new features - e.g. adding a new public function or a new decoder. The micro\n * version number is incremented for smaller changes that a calling program\n * might still want to check for - e.g. changing behavior in a previously\n * unspecified situation.\n *\n * FFmpeg guarantees backward API and ABI compatibility for each library as long\n * as its major version number is unchanged. This means that no public symbols\n * will be removed or renamed. Types and names of the public struct members and\n * values of public macros and enums will remain the same (unless they were\n * explicitly declared as not part of the public API). Documented behavior will\n * not change.\n *\n * In other words, any correct program that works with a given FFmpeg snapshot\n * should work just as well without any changes with any later snapshot with the\n * same major versions. This applies to both rebuilding the program against new\n * FFmpeg versions or to replacing the dynamic FFmpeg libraries that a program\n * links against.\n *\n * However, new public symbols may be added and new members may be appended to\n * public structs whose size is not part of public ABI (most public structs in\n * FFmpeg). New macros and enum values may be added. Behavior in undocumented\n * situations may change slightly (and be documented). All those are accompanied\n * by an entry in doc/APIchanges and incrementing either the minor or micro\n * version number.\n */\n\n/**\n * @defgroup lavu Common utility functions\n *\n * @brief\n * libavutil contains the code shared across all the other FFmpeg\n * libraries\n *\n * @note In order to use the functions provided by avutil you must include\n * the specific header.\n *\n * @{\n *\n * @defgroup lavu_crypto Crypto and Hashing\n *\n * @{\n * @}\n *\n * @defgroup lavu_math Maths\n * @{\n *\n * @}\n *\n * @defgroup lavu_string String Manipulation\n *\n * @{\n *\n * @}\n *\n * @defgroup lavu_mem Memory Management\n *\n * @{\n *\n * @}\n *\n * @defgroup lavu_data Data Structures\n * @{\n *\n * @}\n *\n * @defgroup lavu_audio Audio related\n *\n * @{\n *\n * @}\n *\n * @defgroup lavu_error Error Codes\n *\n * @{\n *\n * @}\n *\n * @defgroup lavu_log Logging Facility\n *\n * @{\n *\n * @}\n *\n * @defgroup lavu_misc Other\n *\n * @{\n *\n * @defgroup preproc_misc Preprocessor String Macros\n *\n * @{\n *\n * @}\n *\n * @defgroup version_utils Library Version Macros\n *\n * @{\n *\n * @}\n */\n\n\n/**\n * @addtogroup lavu_ver\n * @{\n */\n\n/**\n * Return the LIBAVUTIL_VERSION_INT constant.\n */\nunsigned avutil_version(void);\n\n/**\n * Return an informative version string. This usually is the actual release\n * version number or a git commit description. This string has no fixed format\n * and can change any time. It should never be parsed by code.\n */\nconst char *av_version_info(void);\n\n/**\n * Return the libavutil build-time configuration.\n */\nconst char *avutil_configuration(void);\n\n/**\n * Return the libavutil license.\n */\nconst char *avutil_license(void);\n\n/**\n * @}\n */\n\n/**\n * @addtogroup lavu_media Media Type\n * @brief Media Type\n */\n\nenum AVMediaType {\n    AVMEDIA_TYPE_UNKNOWN = -1,  ///< Usually treated as AVMEDIA_TYPE_DATA\n    AVMEDIA_TYPE_VIDEO,\n    AVMEDIA_TYPE_AUDIO,\n    AVMEDIA_TYPE_DATA,          ///< Opaque data information usually continuous\n    AVMEDIA_TYPE_SUBTITLE,\n    AVMEDIA_TYPE_ATTACHMENT,    ///< Opaque data information usually sparse\n    AVMEDIA_TYPE_NB\n};\n\n/**\n * Return a string describing the media_type enum, NULL if media_type\n * is unknown.\n */\nconst char *av_get_media_type_string(enum AVMediaType media_type);\n\n/**\n * @defgroup lavu_const Constants\n * @{\n *\n * @defgroup lavu_enc Encoding specific\n *\n * @note those definition should move to avcodec\n * @{\n */\n\n#define FF_LAMBDA_SHIFT 7\n#define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)\n#define FF_QP2LAMBDA 118 ///< factor to convert from H.263 QP to lambda\n#define FF_LAMBDA_MAX (256*128-1)\n\n#define FF_QUALITY_SCALE FF_LAMBDA_SCALE //FIXME maybe remove\n\n/**\n * @}\n * @defgroup lavu_time Timestamp specific\n *\n * FFmpeg internal timebase and timestamp definitions\n *\n * @{\n */\n\n/**\n * @brief Undefined timestamp value\n *\n * Usually reported by demuxer that work on containers that do not provide\n * either pts or dts.\n */\n\n#define AV_NOPTS_VALUE          ((int64_t)UINT64_C(0x8000000000000000))\n\n/**\n * Internal time base represented as integer\n */\n\n#define AV_TIME_BASE            1000000\n\n/**\n * Internal time base represented as fractional value\n */\n\n#define AV_TIME_BASE_Q          (AVRational){1, AV_TIME_BASE}\n\n/**\n * @}\n * @}\n * @defgroup lavu_picture Image related\n *\n * AVPicture types, pixel formats and basic image planes manipulation.\n *\n * @{\n */\n\nenum AVPictureType {\n    AV_PICTURE_TYPE_NONE = 0, ///< Undefined\n    AV_PICTURE_TYPE_I,     ///< Intra\n    AV_PICTURE_TYPE_P,     ///< Predicted\n    AV_PICTURE_TYPE_B,     ///< Bi-dir predicted\n    AV_PICTURE_TYPE_S,     ///< S(GMC)-VOP MPEG4\n    AV_PICTURE_TYPE_SI,    ///< Switching Intra\n    AV_PICTURE_TYPE_SP,    ///< Switching Predicted\n    AV_PICTURE_TYPE_BI,    ///< BI type\n};\n\n/**\n * Return a single letter to describe the given picture type\n * pict_type.\n *\n * @param[in] pict_type the picture type @return a single character\n * representing the picture type, '?' if pict_type is unknown\n */\nchar av_get_picture_type_char(enum AVPictureType pict_type);\n\n/**\n * @}\n */\n\n#include \"common.h\"\n#include \"error.h\"\n#include \"rational.h\"\n#include \"version.h\"\n#include \"macros.h\"\n#include \"mathematics.h\"\n#include \"log.h\"\n#include \"pixfmt.h\"\n\n/**\n * Return x default pointer in case p is NULL.\n */\nstatic inline void *av_x_if_null(const void *p, const void *x)\n{\n    return (void *)(intptr_t)(p ? p : x);\n}\n\n/**\n * Compute the length of an integer list.\n *\n * @param elsize  size in bytes of each list element (only 1, 2, 4 or 8)\n * @param term    list terminator (usually 0 or -1)\n * @param list    pointer to the list\n * @return  length of the list, in elements, not counting the terminator\n */\nunsigned av_int_list_length_for_size(unsigned elsize,\n                                     const void *list, uint64_t term) av_pure;\n\n/**\n * Compute the length of an integer list.\n *\n * @param term  list terminator (usually 0 or -1)\n * @param list  pointer to the list\n * @return  length of the list, in elements, not counting the terminator\n */\n#define av_int_list_length(list, term) \\\n    av_int_list_length_for_size(sizeof(*(list)), list, term)\n\n/**\n * Open a file using a UTF-8 filename.\n * The API of this function matches POSIX fopen(), errors are returned through\n * errno.\n */\nFILE *av_fopen_utf8(const char *path, const char *mode);\n\n/**\n * Return the fractional representation of the internal time base.\n */\nAVRational av_get_time_base_q(void);\n\n/**\n * @}\n * @}\n */\n\n#endif /* AVUTIL_AVUTIL_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/base64.h",
    "content": "/*\n * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com)\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_BASE64_H\n#define AVUTIL_BASE64_H\n\n#include <stdint.h>\n\n/**\n * @defgroup lavu_base64 Base64\n * @ingroup lavu_crypto\n * @{\n */\n\n\n/**\n * Decode a base64-encoded string.\n *\n * @param out      buffer for decoded data\n * @param in       null-terminated input string\n * @param out_size size in bytes of the out buffer, must be at\n *                 least 3/4 of the length of in\n * @return         number of bytes written, or a negative value in case of\n *                 invalid input\n */\nint av_base64_decode(uint8_t *out, const char *in, int out_size);\n\n/**\n * Encode data to base64 and null-terminate.\n *\n * @param out      buffer for encoded data\n * @param out_size size in bytes of the out buffer (including the\n *                 null terminator), must be at least AV_BASE64_SIZE(in_size)\n * @param in       input buffer containing the data to encode\n * @param in_size  size in bytes of the in buffer\n * @return         out or NULL in case of error\n */\nchar *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size);\n\n/**\n * Calculate the output size needed to base64-encode x bytes to a\n * null-terminated string.\n */\n#define AV_BASE64_SIZE(x)  (((x)+2) / 3 * 4 + 1)\n\n /**\n  * @}\n  */\n\n#endif /* AVUTIL_BASE64_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/blowfish.h",
    "content": "/*\n * Blowfish algorithm\n * Copyright (c) 2012 Samuel Pitoiset\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_BLOWFISH_H\n#define AVUTIL_BLOWFISH_H\n\n#include <stdint.h>\n\n/**\n * @defgroup lavu_blowfish Blowfish\n * @ingroup lavu_crypto\n * @{\n */\n\n#define AV_BF_ROUNDS 16\n\ntypedef struct AVBlowfish {\n    uint32_t p[AV_BF_ROUNDS + 2];\n    uint32_t s[4][256];\n} AVBlowfish;\n\n/**\n * Allocate an AVBlowfish context.\n */\nAVBlowfish *av_blowfish_alloc(void);\n\n/**\n * Initialize an AVBlowfish context.\n *\n * @param ctx an AVBlowfish context\n * @param key a key\n * @param key_len length of the key\n */\nvoid av_blowfish_init(struct AVBlowfish *ctx, const uint8_t *key, int key_len);\n\n/**\n * Encrypt or decrypt a buffer using a previously initialized context.\n *\n * @param ctx an AVBlowfish context\n * @param xl left four bytes halves of input to be encrypted\n * @param xr right four bytes halves of input to be encrypted\n * @param decrypt 0 for encryption, 1 for decryption\n */\nvoid av_blowfish_crypt_ecb(struct AVBlowfish *ctx, uint32_t *xl, uint32_t *xr,\n                           int decrypt);\n\n/**\n * Encrypt or decrypt a buffer using a previously initialized context.\n *\n * @param ctx an AVBlowfish context\n * @param dst destination array, can be equal to src\n * @param src source array, can be equal to dst\n * @param count number of 8 byte blocks\n * @param iv initialization vector for CBC mode, if NULL ECB will be used\n * @param decrypt 0 for encryption, 1 for decryption\n */\nvoid av_blowfish_crypt(struct AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,\n                       int count, uint8_t *iv, int decrypt);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_BLOWFISH_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/bprint.h",
    "content": "/*\n * Copyright (c) 2012 Nicolas George\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_BPRINT_H\n#define AVUTIL_BPRINT_H\n\n#include <stdarg.h>\n\n#include \"attributes.h\"\n#include \"avstring.h\"\n\n/**\n * Define a structure with extra padding to a fixed size\n * This helps ensuring binary compatibility with future versions.\n */\n\n#define FF_PAD_STRUCTURE(name, size, ...) \\\nstruct ff_pad_helper_##name { __VA_ARGS__ }; \\\ntypedef struct name { \\\n    __VA_ARGS__ \\\n    char reserved_padding[size - sizeof(struct ff_pad_helper_##name)]; \\\n} name;\n\n/**\n * Buffer to print data progressively\n *\n * The string buffer grows as necessary and is always 0-terminated.\n * The content of the string is never accessed, and thus is\n * encoding-agnostic and can even hold binary data.\n *\n * Small buffers are kept in the structure itself, and thus require no\n * memory allocation at all (unless the contents of the buffer is needed\n * after the structure goes out of scope). This is almost as lightweight as\n * declaring a local \"char buf[512]\".\n *\n * The length of the string can go beyond the allocated size: the buffer is\n * then truncated, but the functions still keep account of the actual total\n * length.\n *\n * In other words, buf->len can be greater than buf->size and records the\n * total length of what would have been to the buffer if there had been\n * enough memory.\n *\n * Append operations do not need to be tested for failure: if a memory\n * allocation fails, data stop being appended to the buffer, but the length\n * is still updated. This situation can be tested with\n * av_bprint_is_complete().\n *\n * The size_max field determines several possible behaviours:\n *\n * size_max = -1 (= UINT_MAX) or any large value will let the buffer be\n * reallocated as necessary, with an amortized linear cost.\n *\n * size_max = 0 prevents writing anything to the buffer: only the total\n * length is computed. The write operations can then possibly be repeated in\n * a buffer with exactly the necessary size\n * (using size_init = size_max = len + 1).\n *\n * size_max = 1 is automatically replaced by the exact size available in the\n * structure itself, thus ensuring no dynamic memory allocation. The\n * internal buffer is large enough to hold a reasonable paragraph of text,\n * such as the current paragraph.\n */\n\nFF_PAD_STRUCTURE(AVBPrint, 1024,\n    char *str;         /**< string so far */\n    unsigned len;      /**< length so far */\n    unsigned size;     /**< allocated memory */\n    unsigned size_max; /**< maximum allocated memory */\n    char reserved_internal_buffer[1];\n)\n\n/**\n * Convenience macros for special values for av_bprint_init() size_max\n * parameter.\n */\n#define AV_BPRINT_SIZE_UNLIMITED  ((unsigned)-1)\n#define AV_BPRINT_SIZE_AUTOMATIC  1\n#define AV_BPRINT_SIZE_COUNT_ONLY 0\n\n/**\n * Init a print buffer.\n *\n * @param buf        buffer to init\n * @param size_init  initial size (including the final 0)\n * @param size_max   maximum size;\n *                   0 means do not write anything, just count the length;\n *                   1 is replaced by the maximum value for automatic storage;\n *                   any large value means that the internal buffer will be\n *                   reallocated as needed up to that limit; -1 is converted to\n *                   UINT_MAX, the largest limit possible.\n *                   Check also AV_BPRINT_SIZE_* macros.\n */\nvoid av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max);\n\n/**\n * Init a print buffer using a pre-existing buffer.\n *\n * The buffer will not be reallocated.\n *\n * @param buf     buffer structure to init\n * @param buffer  byte buffer to use for the string data\n * @param size    size of buffer\n */\nvoid av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size);\n\n/**\n * Append a formatted string to a print buffer.\n */\nvoid av_bprintf(AVBPrint *buf, const char *fmt, ...) av_printf_format(2, 3);\n\n/**\n * Append a formatted string to a print buffer.\n */\nvoid av_vbprintf(AVBPrint *buf, const char *fmt, va_list vl_arg);\n\n/**\n * Append char c n times to a print buffer.\n */\nvoid av_bprint_chars(AVBPrint *buf, char c, unsigned n);\n\n/**\n * Append data to a print buffer.\n *\n * param buf  bprint buffer to use\n * param data pointer to data\n * param size size of data\n */\nvoid av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size);\n\nstruct tm;\n/**\n * Append a formatted date and time to a print buffer.\n *\n * param buf  bprint buffer to use\n * param fmt  date and time format string, see strftime()\n * param tm   broken-down time structure to translate\n *\n * @note due to poor design of the standard strftime function, it may\n * produce poor results if the format string expands to a very long text and\n * the bprint buffer is near the limit stated by the size_max option.\n */\nvoid av_bprint_strftime(AVBPrint *buf, const char *fmt, const struct tm *tm);\n\n/**\n * Allocate bytes in the buffer for external use.\n *\n * @param[in]  buf          buffer structure\n * @param[in]  size         required size\n * @param[out] mem          pointer to the memory area\n * @param[out] actual_size  size of the memory area after allocation;\n *                          can be larger or smaller than size\n */\nvoid av_bprint_get_buffer(AVBPrint *buf, unsigned size,\n                          unsigned char **mem, unsigned *actual_size);\n\n/**\n * Reset the string to \"\" but keep internal allocated data.\n */\nvoid av_bprint_clear(AVBPrint *buf);\n\n/**\n * Test if the print buffer is complete (not truncated).\n *\n * It may have been truncated due to a memory allocation failure\n * or the size_max limit (compare size and size_max if necessary).\n */\nstatic inline int av_bprint_is_complete(const AVBPrint *buf)\n{\n    return buf->len < buf->size;\n}\n\n/**\n * Finalize a print buffer.\n *\n * The print buffer can no longer be used afterwards,\n * but the len and size fields are still valid.\n *\n * @arg[out] ret_str  if not NULL, used to return a permanent copy of the\n *                    buffer contents, or NULL if memory allocation fails;\n *                    if NULL, the buffer is discarded and freed\n * @return  0 for success or error code (probably AVERROR(ENOMEM))\n */\nint av_bprint_finalize(AVBPrint *buf, char **ret_str);\n\n/**\n * Escape the content in src and append it to dstbuf.\n *\n * @param dstbuf        already inited destination bprint buffer\n * @param src           string containing the text to escape\n * @param special_chars string containing the special characters which\n *                      need to be escaped, can be NULL\n * @param mode          escape mode to employ, see AV_ESCAPE_MODE_* macros.\n *                      Any unknown value for mode will be considered equivalent to\n *                      AV_ESCAPE_MODE_BACKSLASH, but this behaviour can change without\n *                      notice.\n * @param flags         flags which control how to escape, see AV_ESCAPE_FLAG_* macros\n */\nvoid av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars,\n                      enum AVEscapeMode mode, int flags);\n\n#endif /* AVUTIL_BPRINT_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/bswap.h",
    "content": "/*\n * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * byte swapping routines\n */\n\n#ifndef AVUTIL_BSWAP_H\n#define AVUTIL_BSWAP_H\n\n#include <stdint.h>\n#include \"libavutil/avconfig.h\"\n#include \"attributes.h\"\n\n#ifdef HAVE_AV_CONFIG_H\n\n#include \"config.h\"\n\n#if   ARCH_AARCH64\n#   include \"aarch64/bswap.h\"\n#elif ARCH_ARM\n#   include \"arm/bswap.h\"\n#elif ARCH_AVR32\n#   include \"avr32/bswap.h\"\n#elif ARCH_SH4\n#   include \"sh4/bswap.h\"\n#elif ARCH_X86\n#   include \"x86/bswap.h\"\n#endif\n\n#endif /* HAVE_AV_CONFIG_H */\n\n#define AV_BSWAP16C(x) (((x) << 8 & 0xff00)  | ((x) >> 8 & 0x00ff))\n#define AV_BSWAP32C(x) (AV_BSWAP16C(x) << 16 | AV_BSWAP16C((x) >> 16))\n#define AV_BSWAP64C(x) (AV_BSWAP32C(x) << 32 | AV_BSWAP32C((x) >> 32))\n\n#define AV_BSWAPC(s, x) AV_BSWAP##s##C(x)\n\n#ifndef av_bswap16\nstatic av_always_inline av_const uint16_t av_bswap16(uint16_t x)\n{\n    x= (x>>8) | (x<<8);\n    return x;\n}\n#endif\n\n#ifndef av_bswap32\nstatic av_always_inline av_const uint32_t av_bswap32(uint32_t x)\n{\n    return AV_BSWAP32C(x);\n}\n#endif\n\n#ifndef av_bswap64\nstatic inline uint64_t av_const av_bswap64(uint64_t x)\n{\n    return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);\n}\n#endif\n\n// be2ne ... big-endian to native-endian\n// le2ne ... little-endian to native-endian\n\n#if AV_HAVE_BIGENDIAN\n#define av_be2ne16(x) (x)\n#define av_be2ne32(x) (x)\n#define av_be2ne64(x) (x)\n#define av_le2ne16(x) av_bswap16(x)\n#define av_le2ne32(x) av_bswap32(x)\n#define av_le2ne64(x) av_bswap64(x)\n#define AV_BE2NEC(s, x) (x)\n#define AV_LE2NEC(s, x) AV_BSWAPC(s, x)\n#else\n#define av_be2ne16(x) av_bswap16(x)\n#define av_be2ne32(x) av_bswap32(x)\n#define av_be2ne64(x) av_bswap64(x)\n#define av_le2ne16(x) (x)\n#define av_le2ne32(x) (x)\n#define av_le2ne64(x) (x)\n#define AV_BE2NEC(s, x) AV_BSWAPC(s, x)\n#define AV_LE2NEC(s, x) (x)\n#endif\n\n#define AV_BE2NE16C(x) AV_BE2NEC(16, x)\n#define AV_BE2NE32C(x) AV_BE2NEC(32, x)\n#define AV_BE2NE64C(x) AV_BE2NEC(64, x)\n#define AV_LE2NE16C(x) AV_LE2NEC(16, x)\n#define AV_LE2NE32C(x) AV_LE2NEC(32, x)\n#define AV_LE2NE64C(x) AV_LE2NEC(64, x)\n\n#endif /* AVUTIL_BSWAP_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/buffer.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * @ingroup lavu_buffer\n * refcounted data buffer API\n */\n\n#ifndef AVUTIL_BUFFER_H\n#define AVUTIL_BUFFER_H\n\n#include <stdint.h>\n\n/**\n * @defgroup lavu_buffer AVBuffer\n * @ingroup lavu_data\n *\n * @{\n * AVBuffer is an API for reference-counted data buffers.\n *\n * There are two core objects in this API -- AVBuffer and AVBufferRef. AVBuffer\n * represents the data buffer itself; it is opaque and not meant to be accessed\n * by the caller directly, but only through AVBufferRef. However, the caller may\n * e.g. compare two AVBuffer pointers to check whether two different references\n * are describing the same data buffer. AVBufferRef represents a single\n * reference to an AVBuffer and it is the object that may be manipulated by the\n * caller directly.\n *\n * There are two functions provided for creating a new AVBuffer with a single\n * reference -- av_buffer_alloc() to just allocate a new buffer, and\n * av_buffer_create() to wrap an existing array in an AVBuffer. From an existing\n * reference, additional references may be created with av_buffer_ref().\n * Use av_buffer_unref() to free a reference (this will automatically free the\n * data once all the references are freed).\n *\n * The convention throughout this API and the rest of FFmpeg is such that the\n * buffer is considered writable if there exists only one reference to it (and\n * it has not been marked as read-only). The av_buffer_is_writable() function is\n * provided to check whether this is true and av_buffer_make_writable() will\n * automatically create a new writable buffer when necessary.\n * Of course nothing prevents the calling code from violating this convention,\n * however that is safe only when all the existing references are under its\n * control.\n *\n * @note Referencing and unreferencing the buffers is thread-safe and thus\n * may be done from multiple threads simultaneously without any need for\n * additional locking.\n *\n * @note Two different references to the same buffer can point to different\n * parts of the buffer (i.e. their AVBufferRef.data will not be equal).\n */\n\n/**\n * A reference counted buffer type. It is opaque and is meant to be used through\n * references (AVBufferRef).\n */\ntypedef struct AVBuffer AVBuffer;\n\n/**\n * A reference to a data buffer.\n *\n * The size of this struct is not a part of the public ABI and it is not meant\n * to be allocated directly.\n */\ntypedef struct AVBufferRef {\n    AVBuffer *buffer;\n\n    /**\n     * The data buffer. It is considered writable if and only if\n     * this is the only reference to the buffer, in which case\n     * av_buffer_is_writable() returns 1.\n     */\n    uint8_t *data;\n    /**\n     * Size of data in bytes.\n     */\n    int      size;\n} AVBufferRef;\n\n/**\n * Allocate an AVBuffer of the given size using av_malloc().\n *\n * @return an AVBufferRef of given size or NULL when out of memory\n */\nAVBufferRef *av_buffer_alloc(int size);\n\n/**\n * Same as av_buffer_alloc(), except the returned buffer will be initialized\n * to zero.\n */\nAVBufferRef *av_buffer_allocz(int size);\n\n/**\n * Always treat the buffer as read-only, even when it has only one\n * reference.\n */\n#define AV_BUFFER_FLAG_READONLY (1 << 0)\n\n/**\n * Create an AVBuffer from an existing array.\n *\n * If this function is successful, data is owned by the AVBuffer. The caller may\n * only access data through the returned AVBufferRef and references derived from\n * it.\n * If this function fails, data is left untouched.\n * @param data   data array\n * @param size   size of data in bytes\n * @param free   a callback for freeing this buffer's data\n * @param opaque parameter to be got for processing or passed to free\n * @param flags  a combination of AV_BUFFER_FLAG_*\n *\n * @return an AVBufferRef referring to data on success, NULL on failure.\n */\nAVBufferRef *av_buffer_create(uint8_t *data, int size,\n                              void (*free)(void *opaque, uint8_t *data),\n                              void *opaque, int flags);\n\n/**\n * Default free callback, which calls av_free() on the buffer data.\n * This function is meant to be passed to av_buffer_create(), not called\n * directly.\n */\nvoid av_buffer_default_free(void *opaque, uint8_t *data);\n\n/**\n * Create a new reference to an AVBuffer.\n *\n * @return a new AVBufferRef referring to the same AVBuffer as buf or NULL on\n * failure.\n */\nAVBufferRef *av_buffer_ref(AVBufferRef *buf);\n\n/**\n * Free a given reference and automatically free the buffer if there are no more\n * references to it.\n *\n * @param buf the reference to be freed. The pointer is set to NULL on return.\n */\nvoid av_buffer_unref(AVBufferRef **buf);\n\n/**\n * @return 1 if the caller may write to the data referred to by buf (which is\n * true if and only if buf is the only reference to the underlying AVBuffer).\n * Return 0 otherwise.\n * A positive answer is valid until av_buffer_ref() is called on buf.\n */\nint av_buffer_is_writable(const AVBufferRef *buf);\n\n/**\n * @return the opaque parameter set by av_buffer_create.\n */\nvoid *av_buffer_get_opaque(const AVBufferRef *buf);\n\nint av_buffer_get_ref_count(const AVBufferRef *buf);\n\n/**\n * Create a writable reference from a given buffer reference, avoiding data copy\n * if possible.\n *\n * @param buf buffer reference to make writable. On success, buf is either left\n *            untouched, or it is unreferenced and a new writable AVBufferRef is\n *            written in its place. On failure, buf is left untouched.\n * @return 0 on success, a negative AVERROR on failure.\n */\nint av_buffer_make_writable(AVBufferRef **buf);\n\n/**\n * Reallocate a given buffer.\n *\n * @param buf  a buffer reference to reallocate. On success, buf will be\n *             unreferenced and a new reference with the required size will be\n *             written in its place. On failure buf will be left untouched. *buf\n *             may be NULL, then a new buffer is allocated.\n * @param size required new buffer size.\n * @return 0 on success, a negative AVERROR on failure.\n *\n * @note the buffer is actually reallocated with av_realloc() only if it was\n * initially allocated through av_buffer_realloc(NULL) and there is only one\n * reference to it (i.e. the one passed to this function). In all other cases\n * a new buffer is allocated and the data is copied.\n */\nint av_buffer_realloc(AVBufferRef **buf, int size);\n\n/**\n * @}\n */\n\n/**\n * @defgroup lavu_bufferpool AVBufferPool\n * @ingroup lavu_data\n *\n * @{\n * AVBufferPool is an API for a lock-free thread-safe pool of AVBuffers.\n *\n * Frequently allocating and freeing large buffers may be slow. AVBufferPool is\n * meant to solve this in cases when the caller needs a set of buffers of the\n * same size (the most obvious use case being buffers for raw video or audio\n * frames).\n *\n * At the beginning, the user must call av_buffer_pool_init() to create the\n * buffer pool. Then whenever a buffer is needed, call av_buffer_pool_get() to\n * get a reference to a new buffer, similar to av_buffer_alloc(). This new\n * reference works in all aspects the same way as the one created by\n * av_buffer_alloc(). However, when the last reference to this buffer is\n * unreferenced, it is returned to the pool instead of being freed and will be\n * reused for subsequent av_buffer_pool_get() calls.\n *\n * When the caller is done with the pool and no longer needs to allocate any new\n * buffers, av_buffer_pool_uninit() must be called to mark the pool as freeable.\n * Once all the buffers are released, it will automatically be freed.\n *\n * Allocating and releasing buffers with this API is thread-safe as long as\n * either the default alloc callback is used, or the user-supplied one is\n * thread-safe.\n */\n\n/**\n * The buffer pool. This structure is opaque and not meant to be accessed\n * directly. It is allocated with av_buffer_pool_init() and freed with\n * av_buffer_pool_uninit().\n */\ntypedef struct AVBufferPool AVBufferPool;\n\n/**\n * Allocate and initialize a buffer pool.\n *\n * @param size size of each buffer in this pool\n * @param alloc a function that will be used to allocate new buffers when the\n * pool is empty. May be NULL, then the default allocator will be used\n * (av_buffer_alloc()).\n * @return newly created buffer pool on success, NULL on error.\n */\nAVBufferPool *av_buffer_pool_init(int size, AVBufferRef* (*alloc)(int size));\n\n/**\n * Mark the pool as being available for freeing. It will actually be freed only\n * once all the allocated buffers associated with the pool are released. Thus it\n * is safe to call this function while some of the allocated buffers are still\n * in use.\n *\n * @param pool pointer to the pool to be freed. It will be set to NULL.\n * @see av_buffer_pool_can_uninit()\n */\nvoid av_buffer_pool_uninit(AVBufferPool **pool);\n\n/**\n * Allocate a new AVBuffer, reusing an old buffer from the pool when available.\n * This function may be called simultaneously from multiple threads.\n *\n * @return a reference to the new buffer on success, NULL on error.\n */\nAVBufferRef *av_buffer_pool_get(AVBufferPool *pool);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_BUFFER_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/camellia.h",
    "content": "/*\n * An implementation of the CAMELLIA algorithm as mentioned in RFC3713\n * Copyright (c) 2014 Supraja Meedinti\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_CAMELLIA_H\n#define AVUTIL_CAMELLIA_H\n\n#include <stdint.h>\n\n\n/**\n  * @file\n  * @brief Public header for libavutil CAMELLIA algorithm\n  * @defgroup lavu_camellia CAMELLIA\n  * @ingroup lavu_crypto\n  * @{\n  */\n\nextern const int av_camellia_size;\n\nstruct AVCAMELLIA;\n\n/**\n  * Allocate an AVCAMELLIA context\n  * To free the struct: av_free(ptr)\n  */\nstruct AVCAMELLIA *av_camellia_alloc(void);\n\n/**\n  * Initialize an AVCAMELLIA context.\n  *\n  * @param ctx an AVCAMELLIA context\n  * @param key a key of 16, 24, 32 bytes used for encryption/decryption\n  * @param key_bits number of keybits: possible are 128, 192, 256\n */\nint av_camellia_init(struct AVCAMELLIA *ctx, const uint8_t *key, int key_bits);\n\n/**\n  * Encrypt or decrypt a buffer using a previously initialized context\n  *\n  * @param ctx an AVCAMELLIA context\n  * @param dst destination array, can be equal to src\n  * @param src source array, can be equal to dst\n  * @param count number of 16 byte blocks\n  * @paran iv initialization vector for CBC mode, NULL for ECB mode\n  * @param decrypt 0 for encryption, 1 for decryption\n */\nvoid av_camellia_crypt(struct AVCAMELLIA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt);\n\n/**\n * @}\n */\n#endif /* AVUTIL_CAMELLIA_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/cast5.h",
    "content": "/*\n * An implementation of the CAST128 algorithm as mentioned in RFC2144\n * Copyright (c) 2014 Supraja Meedinti\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_CAST5_H\n#define AVUTIL_CAST5_H\n\n#include <stdint.h>\n\n\n/**\n  * @file\n  * @brief Public header for libavutil CAST5 algorithm\n  * @defgroup lavu_cast5 CAST5\n  * @ingroup lavu_crypto\n  * @{\n  */\n\nextern const int av_cast5_size;\n\nstruct AVCAST5;\n\n/**\n  * Allocate an AVCAST5 context\n  * To free the struct: av_free(ptr)\n  */\nstruct AVCAST5 *av_cast5_alloc(void);\n/**\n  * Initialize an AVCAST5 context.\n  *\n  * @param ctx an AVCAST5 context\n  * @param key a key of 5,6,...16 bytes used for encryption/decryption\n  * @param key_bits number of keybits: possible are 40,48,...,128\n  * @return 0 on success, less than 0 on failure\n */\nint av_cast5_init(struct AVCAST5 *ctx, const uint8_t *key, int key_bits);\n\n/**\n  * Encrypt or decrypt a buffer using a previously initialized context, ECB mode only\n  *\n  * @param ctx an AVCAST5 context\n  * @param dst destination array, can be equal to src\n  * @param src source array, can be equal to dst\n  * @param count number of 8 byte blocks\n  * @param decrypt 0 for encryption, 1 for decryption\n */\nvoid av_cast5_crypt(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, int decrypt);\n\n/**\n  * Encrypt or decrypt a buffer using a previously initialized context\n  *\n  * @param ctx an AVCAST5 context\n  * @param dst destination array, can be equal to src\n  * @param src source array, can be equal to dst\n  * @param count number of 8 byte blocks\n  * @param iv initialization vector for CBC mode, NULL for ECB mode\n  * @param decrypt 0 for encryption, 1 for decryption\n */\nvoid av_cast5_crypt2(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);\n/**\n * @}\n */\n#endif /* AVUTIL_CAST5_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/channel_layout.h",
    "content": "/*\n * Copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n * Copyright (c) 2008 Peter Ross\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_CHANNEL_LAYOUT_H\n#define AVUTIL_CHANNEL_LAYOUT_H\n\n#include <stdint.h>\n\n/**\n * @file\n * audio channel layout utility functions\n */\n\n/**\n * @addtogroup lavu_audio\n * @{\n */\n\n/**\n * @defgroup channel_masks Audio channel masks\n *\n * A channel layout is a 64-bits integer with a bit set for every channel.\n * The number of bits set must be equal to the number of channels.\n * The value 0 means that the channel layout is not known.\n * @note this data structure is not powerful enough to handle channels\n * combinations that have the same channel multiple times, such as\n * dual-mono.\n *\n * @{\n */\n#define AV_CH_FRONT_LEFT             0x00000001\n#define AV_CH_FRONT_RIGHT            0x00000002\n#define AV_CH_FRONT_CENTER           0x00000004\n#define AV_CH_LOW_FREQUENCY          0x00000008\n#define AV_CH_BACK_LEFT              0x00000010\n#define AV_CH_BACK_RIGHT             0x00000020\n#define AV_CH_FRONT_LEFT_OF_CENTER   0x00000040\n#define AV_CH_FRONT_RIGHT_OF_CENTER  0x00000080\n#define AV_CH_BACK_CENTER            0x00000100\n#define AV_CH_SIDE_LEFT              0x00000200\n#define AV_CH_SIDE_RIGHT             0x00000400\n#define AV_CH_TOP_CENTER             0x00000800\n#define AV_CH_TOP_FRONT_LEFT         0x00001000\n#define AV_CH_TOP_FRONT_CENTER       0x00002000\n#define AV_CH_TOP_FRONT_RIGHT        0x00004000\n#define AV_CH_TOP_BACK_LEFT          0x00008000\n#define AV_CH_TOP_BACK_CENTER        0x00010000\n#define AV_CH_TOP_BACK_RIGHT         0x00020000\n#define AV_CH_STEREO_LEFT            0x20000000  ///< Stereo downmix.\n#define AV_CH_STEREO_RIGHT           0x40000000  ///< See AV_CH_STEREO_LEFT.\n#define AV_CH_WIDE_LEFT              0x0000000080000000ULL\n#define AV_CH_WIDE_RIGHT             0x0000000100000000ULL\n#define AV_CH_SURROUND_DIRECT_LEFT   0x0000000200000000ULL\n#define AV_CH_SURROUND_DIRECT_RIGHT  0x0000000400000000ULL\n#define AV_CH_LOW_FREQUENCY_2        0x0000000800000000ULL\n\n/** Channel mask value used for AVCodecContext.request_channel_layout\n    to indicate that the user requests the channel order of the decoder output\n    to be the native codec channel order. */\n#define AV_CH_LAYOUT_NATIVE          0x8000000000000000ULL\n\n/**\n * @}\n * @defgroup channel_mask_c Audio channel layouts\n * @{\n * */\n#define AV_CH_LAYOUT_MONO              (AV_CH_FRONT_CENTER)\n#define AV_CH_LAYOUT_STEREO            (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT)\n#define AV_CH_LAYOUT_2POINT1           (AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY)\n#define AV_CH_LAYOUT_2_1               (AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER)\n#define AV_CH_LAYOUT_SURROUND          (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER)\n#define AV_CH_LAYOUT_3POINT1           (AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY)\n#define AV_CH_LAYOUT_4POINT0           (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_CENTER)\n#define AV_CH_LAYOUT_4POINT1           (AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY)\n#define AV_CH_LAYOUT_2_2               (AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)\n#define AV_CH_LAYOUT_QUAD              (AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)\n#define AV_CH_LAYOUT_5POINT0           (AV_CH_LAYOUT_SURROUND|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)\n#define AV_CH_LAYOUT_5POINT1           (AV_CH_LAYOUT_5POINT0|AV_CH_LOW_FREQUENCY)\n#define AV_CH_LAYOUT_5POINT0_BACK      (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)\n#define AV_CH_LAYOUT_5POINT1_BACK      (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_LOW_FREQUENCY)\n#define AV_CH_LAYOUT_6POINT0           (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER)\n#define AV_CH_LAYOUT_6POINT0_FRONT     (AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)\n#define AV_CH_LAYOUT_HEXAGONAL         (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER)\n#define AV_CH_LAYOUT_6POINT1           (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER)\n#define AV_CH_LAYOUT_6POINT1_BACK      (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER)\n#define AV_CH_LAYOUT_6POINT1_FRONT     (AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY)\n#define AV_CH_LAYOUT_7POINT0           (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)\n#define AV_CH_LAYOUT_7POINT0_FRONT     (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)\n#define AV_CH_LAYOUT_7POINT1           (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)\n#define AV_CH_LAYOUT_7POINT1_WIDE      (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)\n#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)\n#define AV_CH_LAYOUT_OCTAGONAL         (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)\n#define AV_CH_LAYOUT_HEXADECAGONAL     (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)\n#define AV_CH_LAYOUT_STEREO_DOWNMIX    (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)\n\nenum AVMatrixEncoding {\n    AV_MATRIX_ENCODING_NONE,\n    AV_MATRIX_ENCODING_DOLBY,\n    AV_MATRIX_ENCODING_DPLII,\n    AV_MATRIX_ENCODING_DPLIIX,\n    AV_MATRIX_ENCODING_DPLIIZ,\n    AV_MATRIX_ENCODING_DOLBYEX,\n    AV_MATRIX_ENCODING_DOLBYHEADPHONE,\n    AV_MATRIX_ENCODING_NB\n};\n\n/**\n * Return a channel layout id that matches name, or 0 if no match is found.\n *\n * name can be one or several of the following notations,\n * separated by '+' or '|':\n * - the name of an usual channel layout (mono, stereo, 4.0, quad, 5.0,\n *   5.0(side), 5.1, 5.1(side), 7.1, 7.1(wide), downmix);\n * - the name of a single channel (FL, FR, FC, LFE, BL, BR, FLC, FRC, BC,\n *   SL, SR, TC, TFL, TFC, TFR, TBL, TBC, TBR, DL, DR);\n * - a number of channels, in decimal, optionally followed by 'c', yielding\n *   the default channel layout for that number of channels (@see\n *   av_get_default_channel_layout);\n * - a channel layout mask, in hexadecimal starting with \"0x\" (see the\n *   AV_CH_* macros).\n *\n * @warning Starting from the next major bump the trailing character\n * 'c' to specify a number of channels will be required, while a\n * channel layout mask could also be specified as a decimal number\n * (if and only if not followed by \"c\").\n *\n * Example: \"stereo+FC\" = \"2c+FC\" = \"2c+1c\" = \"0x7\"\n */\nuint64_t av_get_channel_layout(const char *name);\n\n/**\n * Return a description of a channel layout.\n * If nb_channels is <= 0, it is guessed from the channel_layout.\n *\n * @param buf put here the string containing the channel layout\n * @param buf_size size in bytes of the buffer\n */\nvoid av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);\n\nstruct AVBPrint;\n/**\n * Append a description of a channel layout to a bprint buffer.\n */\nvoid av_bprint_channel_layout(struct AVBPrint *bp, int nb_channels, uint64_t channel_layout);\n\n/**\n * Return the number of channels in the channel layout.\n */\nint av_get_channel_layout_nb_channels(uint64_t channel_layout);\n\n/**\n * Return default channel layout for a given number of channels.\n */\nint64_t av_get_default_channel_layout(int nb_channels);\n\n/**\n * Get the index of a channel in channel_layout.\n *\n * @param channel a channel layout describing exactly one channel which must be\n *                present in channel_layout.\n *\n * @return index of channel in channel_layout on success, a negative AVERROR\n *         on error.\n */\nint av_get_channel_layout_channel_index(uint64_t channel_layout,\n                                        uint64_t channel);\n\n/**\n * Get the channel with the given index in channel_layout.\n */\nuint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index);\n\n/**\n * Get the name of a given channel.\n *\n * @return channel name on success, NULL on error.\n */\nconst char *av_get_channel_name(uint64_t channel);\n\n/**\n * Get the description of a given channel.\n *\n * @param channel  a channel layout with a single channel\n * @return  channel description on success, NULL on error\n */\nconst char *av_get_channel_description(uint64_t channel);\n\n/**\n * Get the value and name of a standard channel layout.\n *\n * @param[in]  index   index in an internal list, starting at 0\n * @param[out] layout  channel layout mask\n * @param[out] name    name of the layout\n * @return  0  if the layout exists,\n *          <0 if index is beyond the limits\n */\nint av_get_standard_channel_layout(unsigned index, uint64_t *layout,\n                                   const char **name);\n\n/**\n * @}\n * @}\n */\n\n#endif /* AVUTIL_CHANNEL_LAYOUT_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/common.h",
    "content": "/*\n * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * common internal and external API header\n */\n\n#ifndef AVUTIL_COMMON_H\n#define AVUTIL_COMMON_H\n\n#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS) && !defined(UINT64_C)\n#error missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS\n#endif\n\n#include <errno.h>\n#include <inttypes.h>\n#include <limits.h>\n#include <math.h>\n#include <stdint.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"attributes.h\"\n#include \"version.h\"\n#include \"libavutil/avconfig.h\"\n\n#if AV_HAVE_BIGENDIAN\n#   define AV_NE(be, le) (be)\n#else\n#   define AV_NE(be, le) (le)\n#endif\n\n//rounded division & shift\n#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))\n/* assume b>0 */\n#define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))\n/* assume a>0 and b>0 */\n#define FF_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \\\n                                                       : ((a) + (1<<(b)) - 1) >> (b))\n#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b))\n#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b))\n\n/**\n * Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they\n * are not representable as absolute values of their type. This is the same\n * as with *abs()\n * @see FFNABS()\n */\n#define FFABS(a) ((a) >= 0 ? (a) : (-(a)))\n#define FFSIGN(a) ((a) > 0 ? 1 : -1)\n\n/**\n * Negative Absolute value.\n * this works for all integers of all types.\n * As with many macros, this evaluates its argument twice, it thus must not have\n * a sideeffect, that is FFNABS(x++) has undefined behavior.\n */\n#define FFNABS(a) ((a) <= 0 ? (a) : (-(a)))\n\n/**\n * Comparator.\n * For two numerical expressions x and y, gives 1 if x > y, -1 if x < y, and 0\n * if x == y. This is useful for instance in a qsort comparator callback.\n * Furthermore, compilers are able to optimize this to branchless code, and\n * there is no risk of overflow with signed types.\n * As with many macros, this evaluates its argument multiple times, it thus\n * must not have a side-effect.\n */\n#define FFDIFFSIGN(x,y) (((x)>(y)) - ((x)<(y)))\n\n#define FFMAX(a,b) ((a) > (b) ? (a) : (b))\n#define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c)\n#define FFMIN(a,b) ((a) > (b) ? (b) : (a))\n#define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c)\n\n#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)\n#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))\n#define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1))\n\n/* misc math functions */\n\n#ifdef HAVE_AV_CONFIG_H\n#   include \"config.h\"\n#   include \"intmath.h\"\n#endif\n\n/* Pull in unguarded fallback defines at the end of this file. */\n#include \"common.h\"\n\n#ifndef av_log2\nav_const int av_log2(unsigned v);\n#endif\n\n#ifndef av_log2_16bit\nav_const int av_log2_16bit(unsigned v);\n#endif\n\n/**\n * Clip a signed integer value into the amin-amax range.\n * @param a value to clip\n * @param amin minimum value of the clip range\n * @param amax maximum value of the clip range\n * @return clipped value\n */\nstatic av_always_inline av_const int av_clip_c(int a, int amin, int amax)\n{\n#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2\n    if (amin > amax) abort();\n#endif\n    if      (a < amin) return amin;\n    else if (a > amax) return amax;\n    else               return a;\n}\n\n/**\n * Clip a signed 64bit integer value into the amin-amax range.\n * @param a value to clip\n * @param amin minimum value of the clip range\n * @param amax maximum value of the clip range\n * @return clipped value\n */\nstatic av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, int64_t amax)\n{\n#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2\n    if (amin > amax) abort();\n#endif\n    if      (a < amin) return amin;\n    else if (a > amax) return amax;\n    else               return a;\n}\n\n/**\n * Clip a signed integer value into the 0-255 range.\n * @param a value to clip\n * @return clipped value\n */\nstatic av_always_inline av_const uint8_t av_clip_uint8_c(int a)\n{\n    if (a&(~0xFF)) return (-a)>>31;\n    else           return a;\n}\n\n/**\n * Clip a signed integer value into the -128,127 range.\n * @param a value to clip\n * @return clipped value\n */\nstatic av_always_inline av_const int8_t av_clip_int8_c(int a)\n{\n    if ((a+0x80U) & ~0xFF) return (a>>31) ^ 0x7F;\n    else                  return a;\n}\n\n/**\n * Clip a signed integer value into the 0-65535 range.\n * @param a value to clip\n * @return clipped value\n */\nstatic av_always_inline av_const uint16_t av_clip_uint16_c(int a)\n{\n    if (a&(~0xFFFF)) return (-a)>>31;\n    else             return a;\n}\n\n/**\n * Clip a signed integer value into the -32768,32767 range.\n * @param a value to clip\n * @return clipped value\n */\nstatic av_always_inline av_const int16_t av_clip_int16_c(int a)\n{\n    if ((a+0x8000U) & ~0xFFFF) return (a>>31) ^ 0x7FFF;\n    else                      return a;\n}\n\n/**\n * Clip a signed 64-bit integer value into the -2147483648,2147483647 range.\n * @param a value to clip\n * @return clipped value\n */\nstatic av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)\n{\n    if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (int32_t)((a>>63) ^ 0x7FFFFFFF);\n    else                                         return (int32_t)a;\n}\n\n/**\n * Clip a signed integer into the -(2^p),(2^p-1) range.\n * @param  a value to clip\n * @param  p bit position to clip at\n * @return clipped value\n */\nstatic av_always_inline av_const int av_clip_intp2_c(int a, int p)\n{\n    if ((a + (1 << p)) & ~((2 << p) - 1))\n        return (a >> 31) ^ ((1 << p) - 1);\n    else\n        return a;\n}\n\n/**\n * Clip a signed integer to an unsigned power of two range.\n * @param  a value to clip\n * @param  p bit position to clip at\n * @return clipped value\n */\nstatic av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)\n{\n    if (a & ~((1<<p) - 1)) return -a >> 31 & ((1<<p) - 1);\n    else                   return  a;\n}\n\n/**\n * Clear high bits from an unsigned integer starting with specific bit position\n * @param  a value to clip\n * @param  p bit position to clip at\n * @return clipped value\n */\nstatic av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p)\n{\n    return a & ((1 << p) - 1);\n}\n\n/**\n * Add two signed 32-bit values with saturation.\n *\n * @param  a one value\n * @param  b another value\n * @return sum with signed saturation\n */\nstatic av_always_inline int av_sat_add32_c(int a, int b)\n{\n    return av_clipl_int32((int64_t)a + b);\n}\n\n/**\n * Add a doubled value to another value with saturation at both stages.\n *\n * @param  a first value\n * @param  b value doubled and added to a\n * @return sum with signed saturation\n */\nstatic av_always_inline int av_sat_dadd32_c(int a, int b)\n{\n    return av_sat_add32(a, av_sat_add32(b, b));\n}\n\n/**\n * Clip a float value into the amin-amax range.\n * @param a value to clip\n * @param amin minimum value of the clip range\n * @param amax maximum value of the clip range\n * @return clipped value\n */\nstatic av_always_inline av_const float av_clipf_c(float a, float amin, float amax)\n{\n#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2\n    if (amin > amax) abort();\n#endif\n    if      (a < amin) return amin;\n    else if (a > amax) return amax;\n    else               return a;\n}\n\n/**\n * Clip a double value into the amin-amax range.\n * @param a value to clip\n * @param amin minimum value of the clip range\n * @param amax maximum value of the clip range\n * @return clipped value\n */\nstatic av_always_inline av_const double av_clipd_c(double a, double amin, double amax)\n{\n#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2\n    if (amin > amax) abort();\n#endif\n    if      (a < amin) return amin;\n    else if (a > amax) return amax;\n    else               return a;\n}\n\n/** Compute ceil(log2(x)).\n * @param x value used to compute ceil(log2(x))\n * @return computed ceiling of log2(x)\n */\nstatic av_always_inline av_const int av_ceil_log2_c(int x)\n{\n    return av_log2((x - 1) << 1);\n}\n\n/**\n * Count number of bits set to one in x\n * @param x value to count bits of\n * @return the number of bits set to one in x\n */\nstatic av_always_inline av_const int av_popcount_c(uint32_t x)\n{\n    x -= (x >> 1) & 0x55555555;\n    x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n    x = (x + (x >> 4)) & 0x0F0F0F0F;\n    x += x >> 8;\n    return (x + (x >> 16)) & 0x3F;\n}\n\n/**\n * Count number of bits set to one in x\n * @param x value to count bits of\n * @return the number of bits set to one in x\n */\nstatic av_always_inline av_const int av_popcount64_c(uint64_t x)\n{\n    return av_popcount((uint32_t)x) + av_popcount((uint32_t)(x >> 32));\n}\n\n#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))\n#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))\n\n/**\n * Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.\n *\n * @param val      Output value, must be an lvalue of type uint32_t.\n * @param GET_BYTE Expression reading one byte from the input.\n *                 Evaluated up to 7 times (4 for the currently\n *                 assigned Unicode range).  With a memory buffer\n *                 input, this could be *ptr++.\n * @param ERROR    Expression to be evaluated on invalid input,\n *                 typically a goto statement.\n *\n * @warning ERROR should not contain a loop control statement which\n * could interact with the internal while loop, and should force an\n * exit from the macro code (e.g. through a goto or a return) in order\n * to prevent undefined results.\n */\n#define GET_UTF8(val, GET_BYTE, ERROR)\\\n    val= GET_BYTE;\\\n    {\\\n        uint32_t top = (val & 128) >> 1;\\\n        if ((val & 0xc0) == 0x80 || val >= 0xFE)\\\n            ERROR\\\n        while (val & top) {\\\n            int tmp= GET_BYTE - 128;\\\n            if(tmp>>6)\\\n                ERROR\\\n            val= (val<<6) + tmp;\\\n            top <<= 5;\\\n        }\\\n        val &= (top << 1) - 1;\\\n    }\n\n/**\n * Convert a UTF-16 character (2 or 4 bytes) to its 32-bit UCS-4 encoded form.\n *\n * @param val       Output value, must be an lvalue of type uint32_t.\n * @param GET_16BIT Expression returning two bytes of UTF-16 data converted\n *                  to native byte order.  Evaluated one or two times.\n * @param ERROR     Expression to be evaluated on invalid input,\n *                  typically a goto statement.\n */\n#define GET_UTF16(val, GET_16BIT, ERROR)\\\n    val = GET_16BIT;\\\n    {\\\n        unsigned int hi = val - 0xD800;\\\n        if (hi < 0x800) {\\\n            val = GET_16BIT - 0xDC00;\\\n            if (val > 0x3FFU || hi > 0x3FFU)\\\n                ERROR\\\n            val += (hi<<10) + 0x10000;\\\n        }\\\n    }\\\n\n/**\n * @def PUT_UTF8(val, tmp, PUT_BYTE)\n * Convert a 32-bit Unicode character to its UTF-8 encoded form (up to 4 bytes long).\n * @param val is an input-only argument and should be of type uint32_t. It holds\n * a UCS-4 encoded Unicode character that is to be converted to UTF-8. If\n * val is given as a function it is executed only once.\n * @param tmp is a temporary variable and should be of type uint8_t. It\n * represents an intermediate value during conversion that is to be\n * output by PUT_BYTE.\n * @param PUT_BYTE writes the converted UTF-8 bytes to any proper destination.\n * It could be a function or a statement, and uses tmp as the input byte.\n * For example, PUT_BYTE could be \"*output++ = tmp;\" PUT_BYTE will be\n * executed up to 4 times for values in the valid UTF-8 range and up to\n * 7 times in the general case, depending on the length of the converted\n * Unicode character.\n */\n#define PUT_UTF8(val, tmp, PUT_BYTE)\\\n    {\\\n        int bytes, shift;\\\n        uint32_t in = val;\\\n        if (in < 0x80) {\\\n            tmp = in;\\\n            PUT_BYTE\\\n        } else {\\\n            bytes = (av_log2(in) + 4) / 5;\\\n            shift = (bytes - 1) * 6;\\\n            tmp = (256 - (256 >> bytes)) | (in >> shift);\\\n            PUT_BYTE\\\n            while (shift >= 6) {\\\n                shift -= 6;\\\n                tmp = 0x80 | ((in >> shift) & 0x3f);\\\n                PUT_BYTE\\\n            }\\\n        }\\\n    }\n\n/**\n * @def PUT_UTF16(val, tmp, PUT_16BIT)\n * Convert a 32-bit Unicode character to its UTF-16 encoded form (2 or 4 bytes).\n * @param val is an input-only argument and should be of type uint32_t. It holds\n * a UCS-4 encoded Unicode character that is to be converted to UTF-16. If\n * val is given as a function it is executed only once.\n * @param tmp is a temporary variable and should be of type uint16_t. It\n * represents an intermediate value during conversion that is to be\n * output by PUT_16BIT.\n * @param PUT_16BIT writes the converted UTF-16 data to any proper destination\n * in desired endianness. It could be a function or a statement, and uses tmp\n * as the input byte.  For example, PUT_BYTE could be \"*output++ = tmp;\"\n * PUT_BYTE will be executed 1 or 2 times depending on input character.\n */\n#define PUT_UTF16(val, tmp, PUT_16BIT)\\\n    {\\\n        uint32_t in = val;\\\n        if (in < 0x10000) {\\\n            tmp = in;\\\n            PUT_16BIT\\\n        } else {\\\n            tmp = 0xD800 | ((in - 0x10000) >> 10);\\\n            PUT_16BIT\\\n            tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\\\n            PUT_16BIT\\\n        }\\\n    }\\\n\n\n\n#include \"mem.h\"\n\n#ifdef HAVE_AV_CONFIG_H\n#    include \"internal.h\"\n#endif /* HAVE_AV_CONFIG_H */\n\n#endif /* AVUTIL_COMMON_H */\n\n/*\n * The following definitions are outside the multiple inclusion guard\n * to ensure they are immediately available in intmath.h.\n */\n\n#ifndef av_ceil_log2\n#   define av_ceil_log2     av_ceil_log2_c\n#endif\n#ifndef av_clip\n#   define av_clip          av_clip_c\n#endif\n#ifndef av_clip64\n#   define av_clip64        av_clip64_c\n#endif\n#ifndef av_clip_uint8\n#   define av_clip_uint8    av_clip_uint8_c\n#endif\n#ifndef av_clip_int8\n#   define av_clip_int8     av_clip_int8_c\n#endif\n#ifndef av_clip_uint16\n#   define av_clip_uint16   av_clip_uint16_c\n#endif\n#ifndef av_clip_int16\n#   define av_clip_int16    av_clip_int16_c\n#endif\n#ifndef av_clipl_int32\n#   define av_clipl_int32   av_clipl_int32_c\n#endif\n#ifndef av_clip_intp2\n#   define av_clip_intp2    av_clip_intp2_c\n#endif\n#ifndef av_clip_uintp2\n#   define av_clip_uintp2   av_clip_uintp2_c\n#endif\n#ifndef av_mod_uintp2\n#   define av_mod_uintp2    av_mod_uintp2_c\n#endif\n#ifndef av_sat_add32\n#   define av_sat_add32     av_sat_add32_c\n#endif\n#ifndef av_sat_dadd32\n#   define av_sat_dadd32    av_sat_dadd32_c\n#endif\n#ifndef av_clipf\n#   define av_clipf         av_clipf_c\n#endif\n#ifndef av_clipd\n#   define av_clipd         av_clipd_c\n#endif\n#ifndef av_popcount\n#   define av_popcount      av_popcount_c\n#endif\n#ifndef av_popcount64\n#   define av_popcount64    av_popcount64_c\n#endif\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/cpu.h",
    "content": "/*\n * Copyright (c) 2000, 2001, 2002 Fabrice Bellard\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_CPU_H\n#define AVUTIL_CPU_H\n\n#include \"attributes.h\"\n\n#define AV_CPU_FLAG_FORCE    0x80000000 /* force usage of selected flags (OR) */\n\n    /* lower 16 bits - CPU features */\n#define AV_CPU_FLAG_MMX          0x0001 ///< standard MMX\n#define AV_CPU_FLAG_MMXEXT       0x0002 ///< SSE integer functions or AMD MMX ext\n#define AV_CPU_FLAG_MMX2         0x0002 ///< SSE integer functions or AMD MMX ext\n#define AV_CPU_FLAG_3DNOW        0x0004 ///< AMD 3DNOW\n#define AV_CPU_FLAG_SSE          0x0008 ///< SSE functions\n#define AV_CPU_FLAG_SSE2         0x0010 ///< PIV SSE2 functions\n#define AV_CPU_FLAG_SSE2SLOW 0x40000000 ///< SSE2 supported, but usually not faster\n                                        ///< than regular MMX/SSE (e.g. Core1)\n#define AV_CPU_FLAG_3DNOWEXT     0x0020 ///< AMD 3DNowExt\n#define AV_CPU_FLAG_SSE3         0x0040 ///< Prescott SSE3 functions\n#define AV_CPU_FLAG_SSE3SLOW 0x20000000 ///< SSE3 supported, but usually not faster\n                                        ///< than regular MMX/SSE (e.g. Core1)\n#define AV_CPU_FLAG_SSSE3        0x0080 ///< Conroe SSSE3 functions\n#define AV_CPU_FLAG_ATOM     0x10000000 ///< Atom processor, some SSSE3 instructions are slower\n#define AV_CPU_FLAG_SSE4         0x0100 ///< Penryn SSE4.1 functions\n#define AV_CPU_FLAG_SSE42        0x0200 ///< Nehalem SSE4.2 functions\n#define AV_CPU_FLAG_AESNI       0x80000 ///< Advanced Encryption Standard functions\n#define AV_CPU_FLAG_AVX          0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used\n#define AV_CPU_FLAG_AVXSLOW   0x8000000 ///< AVX supported, but slow when using YMM registers (e.g. Bulldozer)\n#define AV_CPU_FLAG_XOP          0x0400 ///< Bulldozer XOP functions\n#define AV_CPU_FLAG_FMA4         0x0800 ///< Bulldozer FMA4 functions\n#define AV_CPU_FLAG_CMOV         0x1000 ///< supports cmov instruction\n#define AV_CPU_FLAG_AVX2         0x8000 ///< AVX2 functions: requires OS support even if YMM registers aren't used\n#define AV_CPU_FLAG_FMA3        0x10000 ///< Haswell FMA3 functions\n#define AV_CPU_FLAG_BMI1        0x20000 ///< Bit Manipulation Instruction Set 1\n#define AV_CPU_FLAG_BMI2        0x40000 ///< Bit Manipulation Instruction Set 2\n\n#define AV_CPU_FLAG_ALTIVEC      0x0001 ///< standard\n#define AV_CPU_FLAG_VSX          0x0002 ///< ISA 2.06\n#define AV_CPU_FLAG_POWER8       0x0004 ///< ISA 2.07\n\n#define AV_CPU_FLAG_ARMV5TE      (1 << 0)\n#define AV_CPU_FLAG_ARMV6        (1 << 1)\n#define AV_CPU_FLAG_ARMV6T2      (1 << 2)\n#define AV_CPU_FLAG_VFP          (1 << 3)\n#define AV_CPU_FLAG_VFPV3        (1 << 4)\n#define AV_CPU_FLAG_NEON         (1 << 5)\n#define AV_CPU_FLAG_ARMV8        (1 << 6)\n#define AV_CPU_FLAG_SETEND       (1 <<16)\n\n/**\n * Return the flags which specify extensions supported by the CPU.\n * The returned value is affected by av_force_cpu_flags() if that was used\n * before. So av_get_cpu_flags() can easily be used in a application to\n * detect the enabled cpu flags.\n */\nint av_get_cpu_flags(void);\n\n/**\n * Disables cpu detection and forces the specified flags.\n * -1 is a special case that disables forcing of specific flags.\n */\nvoid av_force_cpu_flags(int flags);\n\n/**\n * Set a mask on flags returned by av_get_cpu_flags().\n * This function is mainly useful for testing.\n * Please use av_force_cpu_flags() and av_get_cpu_flags() instead which are more flexible\n *\n * @warning this function is not thread safe.\n */\nattribute_deprecated void av_set_cpu_flags_mask(int mask);\n\n/**\n * Parse CPU flags from a string.\n *\n * The returned flags contain the specified flags as well as related unspecified flags.\n *\n * This function exists only for compatibility with libav.\n * Please use av_parse_cpu_caps() when possible.\n * @return a combination of AV_CPU_* flags, negative on error.\n */\nattribute_deprecated\nint av_parse_cpu_flags(const char *s);\n\n/**\n * Parse CPU caps from a string and update the given AV_CPU_* flags based on that.\n *\n * @return negative on error.\n */\nint av_parse_cpu_caps(unsigned *flags, const char *s);\n\n/**\n * @return the number of logical CPU cores present.\n */\nint av_cpu_count(void);\n\n#endif /* AVUTIL_CPU_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/crc.h",
    "content": "/*\n * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_CRC_H\n#define AVUTIL_CRC_H\n\n#include <stdint.h>\n#include <stddef.h>\n#include \"attributes.h\"\n#include \"version.h\"\n\n/**\n * @defgroup lavu_crc32 CRC32\n * @ingroup lavu_crypto\n * @{\n */\n\ntypedef uint32_t AVCRC;\n\ntypedef enum {\n    AV_CRC_8_ATM,\n    AV_CRC_16_ANSI,\n    AV_CRC_16_CCITT,\n    AV_CRC_32_IEEE,\n    AV_CRC_32_IEEE_LE,  /*< reversed bitorder version of AV_CRC_32_IEEE */\n    AV_CRC_16_ANSI_LE,  /*< reversed bitorder version of AV_CRC_16_ANSI */\n#if FF_API_CRC_BIG_TABLE\n    AV_CRC_24_IEEE = 12,\n#else\n    AV_CRC_24_IEEE,\n#endif /* FF_API_CRC_BIG_TABLE */\n    AV_CRC_MAX,         /*< Not part of public API! Do not use outside libavutil. */\n}AVCRCId;\n\n/**\n * Initialize a CRC table.\n * @param ctx must be an array of size sizeof(AVCRC)*257 or sizeof(AVCRC)*1024\n * @param le If 1, the lowest bit represents the coefficient for the highest\n *           exponent of the corresponding polynomial (both for poly and\n *           actual CRC).\n *           If 0, you must swap the CRC parameter and the result of av_crc\n *           if you need the standard representation (can be simplified in\n *           most cases to e.g. bswap16):\n *           av_bswap32(crc << (32-bits))\n * @param bits number of bits for the CRC\n * @param poly generator polynomial without the x**bits coefficient, in the\n *             representation as specified by le\n * @param ctx_size size of ctx in bytes\n * @return <0 on failure\n */\nint av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);\n\n/**\n * Get an initialized standard CRC table.\n * @param crc_id ID of a standard CRC\n * @return a pointer to the CRC table or NULL on failure\n */\nconst AVCRC *av_crc_get_table(AVCRCId crc_id);\n\n/**\n * Calculate the CRC of a block.\n * @param crc CRC of previous blocks if any or initial value for CRC\n * @return CRC updated with the data from the given block\n *\n * @see av_crc_init() \"le\" parameter\n */\nuint32_t av_crc(const AVCRC *ctx, uint32_t crc,\n                const uint8_t *buffer, size_t length) av_pure;\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_CRC_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/des.h",
    "content": "/*\n * DES encryption/decryption\n * Copyright (c) 2007 Reimar Doeffinger\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_DES_H\n#define AVUTIL_DES_H\n\n#include <stdint.h>\n\n/**\n * @defgroup lavu_des DES\n * @ingroup lavu_crypto\n * @{\n */\n\ntypedef struct AVDES {\n    uint64_t round_keys[3][16];\n    int triple_des;\n} AVDES;\n\n/**\n * Allocate an AVDES context.\n */\nAVDES *av_des_alloc(void);\n\n/**\n * @brief Initializes an AVDES context.\n *\n * @param key_bits must be 64 or 192\n * @param decrypt 0 for encryption/CBC-MAC, 1 for decryption\n * @return zero on success, negative value otherwise\n */\nint av_des_init(struct AVDES *d, const uint8_t *key, int key_bits, int decrypt);\n\n/**\n * @brief Encrypts / decrypts using the DES algorithm.\n *\n * @param count number of 8 byte blocks\n * @param dst destination array, can be equal to src, must be 8-byte aligned\n * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL\n * @param iv initialization vector for CBC mode, if NULL then ECB will be used,\n *           must be 8-byte aligned\n * @param decrypt 0 for encryption, 1 for decryption\n */\nvoid av_des_crypt(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);\n\n/**\n * @brief Calculates CBC-MAC using the DES algorithm.\n *\n * @param count number of 8 byte blocks\n * @param dst destination array, can be equal to src, must be 8-byte aligned\n * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL\n */\nvoid av_des_mac(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_DES_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/dict.h",
    "content": "/*\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * Public dictionary API.\n * @deprecated\n *  AVDictionary is provided for compatibility with libav. It is both in\n *  implementation as well as API inefficient. It does not scale and is\n *  extremely slow with large dictionaries.\n *  It is recommended that new code uses our tree container from tree.c/h\n *  where applicable, which uses AVL trees to achieve O(log n) performance.\n */\n\n#ifndef AVUTIL_DICT_H\n#define AVUTIL_DICT_H\n\n#include <stdint.h>\n\n#include \"version.h\"\n\n/**\n * @addtogroup lavu_dict AVDictionary\n * @ingroup lavu_data\n *\n * @brief Simple key:value store\n *\n * @{\n * Dictionaries are used for storing key:value pairs. To create\n * an AVDictionary, simply pass an address of a NULL pointer to\n * av_dict_set(). NULL can be used as an empty dictionary wherever\n * a pointer to an AVDictionary is required.\n * Use av_dict_get() to retrieve an entry or iterate over all\n * entries and finally av_dict_free() to free the dictionary\n * and all its contents.\n *\n @code\n   AVDictionary *d = NULL;           // \"create\" an empty dictionary\n   AVDictionaryEntry *t = NULL;\n\n   av_dict_set(&d, \"foo\", \"bar\", 0); // add an entry\n\n   char *k = av_strdup(\"key\");       // if your strings are already allocated,\n   char *v = av_strdup(\"value\");     // you can avoid copying them like this\n   av_dict_set(&d, k, v, AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL);\n\n   while (t = av_dict_get(d, \"\", t, AV_DICT_IGNORE_SUFFIX)) {\n       <....>                             // iterate over all entries in d\n   }\n   av_dict_free(&d);\n @endcode\n *\n */\n\n#define AV_DICT_MATCH_CASE      1   /**< Only get an entry with exact-case key match. Only relevant in av_dict_get(). */\n#define AV_DICT_IGNORE_SUFFIX   2   /**< Return first entry in a dictionary whose first part corresponds to the search key,\n                                         ignoring the suffix of the found key string. Only relevant in av_dict_get(). */\n#define AV_DICT_DONT_STRDUP_KEY 4   /**< Take ownership of a key that's been\n                                         allocated with av_malloc() or another memory allocation function. */\n#define AV_DICT_DONT_STRDUP_VAL 8   /**< Take ownership of a value that's been\n                                         allocated with av_malloc() or another memory allocation function. */\n#define AV_DICT_DONT_OVERWRITE 16   ///< Don't overwrite existing entries.\n#define AV_DICT_APPEND         32   /**< If the entry already exists, append to it.  Note that no\n                                      delimiter is added, the strings are simply concatenated. */\n\ntypedef struct AVDictionaryEntry {\n    char *key;\n    char *value;\n} AVDictionaryEntry;\n\ntypedef struct AVDictionary AVDictionary;\n\n/**\n * Get a dictionary entry with matching key.\n *\n * The returned entry key or value must not be changed, or it will\n * cause undefined behavior.\n *\n * To iterate through all the dictionary entries, you can set the matching key\n * to the null string \"\" and set the AV_DICT_IGNORE_SUFFIX flag.\n *\n * @param prev Set to the previous matching element to find the next.\n *             If set to NULL the first matching element is returned.\n * @param key matching key\n * @param flags a collection of AV_DICT_* flags controlling how the entry is retrieved\n * @return found entry or NULL in case no matching entry was found in the dictionary\n */\nAVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,\n                               const AVDictionaryEntry *prev, int flags);\n\n/**\n * Get number of entries in dictionary.\n *\n * @param m dictionary\n * @return  number of entries in dictionary\n */\nint av_dict_count(const AVDictionary *m);\n\n/**\n * Set the given entry in *pm, overwriting an existing entry.\n *\n * Note: If AV_DICT_DONT_STRDUP_KEY or AV_DICT_DONT_STRDUP_VAL is set,\n * these arguments will be freed on error.\n *\n * @param pm pointer to a pointer to a dictionary struct. If *pm is NULL\n * a dictionary struct is allocated and put in *pm.\n * @param key entry key to add to *pm (will be av_strduped depending on flags)\n * @param value entry value to add to *pm (will be av_strduped depending on flags).\n *        Passing a NULL value will cause an existing entry to be deleted.\n * @return >= 0 on success otherwise an error code <0\n */\nint av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);\n\n/**\n * Convenience wrapper for av_dict_set that converts the value to a string\n * and stores it.\n *\n * Note: If AV_DICT_DONT_STRDUP_KEY is set, key will be freed on error.\n */\nint av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags);\n\n/**\n * Parse the key/value pairs list and add the parsed entries to a dictionary.\n *\n * In case of failure, all the successfully set entries are stored in\n * *pm. You may need to manually free the created dictionary.\n *\n * @param key_val_sep  a 0-terminated list of characters used to separate\n *                     key from value\n * @param pairs_sep    a 0-terminated list of characters used to separate\n *                     two pairs from each other\n * @param flags        flags to use when adding to dictionary.\n *                     AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL\n *                     are ignored since the key/value tokens will always\n *                     be duplicated.\n * @return             0 on success, negative AVERROR code on failure\n */\nint av_dict_parse_string(AVDictionary **pm, const char *str,\n                         const char *key_val_sep, const char *pairs_sep,\n                         int flags);\n\n/**\n * Copy entries from one AVDictionary struct into another.\n * @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL,\n *            this function will allocate a struct for you and put it in *dst\n * @param src pointer to source AVDictionary struct\n * @param flags flags to use when setting entries in *dst\n * @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag\n * @return 0 on success, negative AVERROR code on failure. If dst was allocated\n *           by this function, callers should free the associated memory.\n */\nint av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags);\n\n/**\n * Free all the memory allocated for an AVDictionary struct\n * and all keys and values.\n */\nvoid av_dict_free(AVDictionary **m);\n\n/**\n * Get dictionary entries as a string.\n *\n * Create a string containing dictionary's entries.\n * Such string may be passed back to av_dict_parse_string().\n * @note String is escaped with backslashes ('\\').\n *\n * @param[in]  m             dictionary\n * @param[out] buffer        Pointer to buffer that will be allocated with string containg entries.\n *                           Buffer must be freed by the caller when is no longer needed.\n * @param[in]  key_val_sep   character used to separate key from value\n * @param[in]  pairs_sep     character used to separate two pairs from each other\n * @return                   >= 0 on success, negative on error\n * @warning Separators cannot be neither '\\\\' nor '\\0'. They also cannot be the same.\n */\nint av_dict_get_string(const AVDictionary *m, char **buffer,\n                       const char key_val_sep, const char pairs_sep);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_DICT_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/display.h",
    "content": "/*\n * Copyright (c) 2014 Vittorio Giovara <vittorio.giovara@gmail.com>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_DISPLAY_H\n#define AVUTIL_DISPLAY_H\n\n#include <stdint.h>\n\n/**\n * The display transformation matrix specifies an affine transformation that\n * should be applied to video frames for correct presentation. It is compatible\n * with the matrices stored in the ISO/IEC 14496-12 container format.\n *\n * The data is a 3x3 matrix represented as a 9-element array:\n *\n *                                  | a b u |\n *   (a, b, u, c, d, v, x, y, w) -> | c d v |\n *                                  | x y w |\n *\n * All numbers are stored in native endianness, as 16.16 fixed-point values,\n * except for u, v and w, which are stored as 2.30 fixed-point values.\n *\n * The transformation maps a point (p, q) in the source (pre-transformation)\n * frame to the point (p', q') in the destination (post-transformation) frame as\n * follows:\n *               | a b u |\n *   (p, q, 1) . | c d v | = z * (p', q', 1)\n *               | x y w |\n *\n * The transformation can also be more explicitly written in components as\n * follows:\n *   p' = (a * p + c * q + x) / z;\n *   q' = (b * p + d * q + y) / z;\n *   z  =  u * p + v * q + w\n */\n\n/**\n * Extract the rotation component of the transformation matrix.\n *\n * @param matrix the transformation matrix\n * @return the angle (in degrees) by which the transformation rotates the frame\n *         counterclockwise. The angle will be in range [-180.0, 180.0],\n *         or NaN if the matrix is singular.\n *\n * @note floating point numbers are inherently inexact, so callers are\n *       recommended to round the return value to nearest integer before use.\n */\ndouble av_display_rotation_get(const int32_t matrix[9]);\n\n/**\n * Initialize a transformation matrix describing a pure counterclockwise\n * rotation by the specified angle (in degrees).\n *\n * @param matrix an allocated transformation matrix (will be fully overwritten\n *               by this function)\n * @param angle rotation angle in degrees.\n */\nvoid av_display_rotation_set(int32_t matrix[9], double angle);\n\n/**\n * Flip the input matrix horizontally and/or vertically.\n *\n * @param matrix an allocated transformation matrix\n * @param hflip whether the matrix should be flipped horizontally\n * @param vflip whether the matrix should be flipped vertically\n */\nvoid av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip);\n\n#endif /* AVUTIL_DISPLAY_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/downmix_info.h",
    "content": "/*\n * Copyright (c) 2014 Tim Walker <tdskywalker@gmail.com>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_DOWNMIX_INFO_H\n#define AVUTIL_DOWNMIX_INFO_H\n\n#include \"frame.h\"\n\n/**\n * @file\n * audio downmix medatata\n */\n\n/**\n * @addtogroup lavu_audio\n * @{\n */\n\n/**\n * @defgroup downmix_info Audio downmix metadata\n * @{\n */\n\n/**\n * Possible downmix types.\n */\nenum AVDownmixType {\n    AV_DOWNMIX_TYPE_UNKNOWN, /**< Not indicated. */\n    AV_DOWNMIX_TYPE_LORO,    /**< Lo/Ro 2-channel downmix (Stereo). */\n    AV_DOWNMIX_TYPE_LTRT,    /**< Lt/Rt 2-channel downmix, Dolby Surround compatible. */\n    AV_DOWNMIX_TYPE_DPLII,   /**< Lt/Rt 2-channel downmix, Dolby Pro Logic II compatible. */\n    AV_DOWNMIX_TYPE_NB       /**< Number of downmix types. Not part of ABI. */\n};\n\n/**\n * This structure describes optional metadata relevant to a downmix procedure.\n *\n * All fields are set by the decoder to the value indicated in the audio\n * bitstream (if present), or to a \"sane\" default otherwise.\n */\ntypedef struct AVDownmixInfo {\n    /**\n     * Type of downmix preferred by the mastering engineer.\n     */\n    enum AVDownmixType preferred_downmix_type;\n\n    /**\n     * Absolute scale factor representing the nominal level of the center\n     * channel during a regular downmix.\n     */\n    double center_mix_level;\n\n    /**\n     * Absolute scale factor representing the nominal level of the center\n     * channel during an Lt/Rt compatible downmix.\n     */\n    double center_mix_level_ltrt;\n\n    /**\n     * Absolute scale factor representing the nominal level of the surround\n     * channels during a regular downmix.\n     */\n    double surround_mix_level;\n\n    /**\n     * Absolute scale factor representing the nominal level of the surround\n     * channels during an Lt/Rt compatible downmix.\n     */\n    double surround_mix_level_ltrt;\n\n    /**\n     * Absolute scale factor representing the level at which the LFE data is\n     * mixed into L/R channels during downmixing.\n     */\n    double lfe_mix_level;\n} AVDownmixInfo;\n\n/**\n * Get a frame's AV_FRAME_DATA_DOWNMIX_INFO side data for editing.\n *\n * If the side data is absent, it is created and added to the frame.\n *\n * @param frame the frame for which the side data is to be obtained or created\n *\n * @return the AVDownmixInfo structure to be edited by the caller, or NULL if\n *         the structure cannot be allocated.\n */\nAVDownmixInfo *av_downmix_info_update_side_data(AVFrame *frame);\n\n/**\n * @}\n */\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_DOWNMIX_INFO_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/error.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * error code definitions\n */\n\n#ifndef AVUTIL_ERROR_H\n#define AVUTIL_ERROR_H\n\n#include <errno.h>\n#include <stddef.h>\n\n/**\n * @addtogroup lavu_error\n *\n * @{\n */\n\n\n/* error handling */\n#if EDOM > 0\n#define AVERROR(e) (-(e))   ///< Returns a negative error code from a POSIX error code, to return from library functions.\n#define AVUNERROR(e) (-(e)) ///< Returns a POSIX error code from a library function error return value.\n#else\n/* Some platforms have E* and errno already negated. */\n#define AVERROR(e) (e)\n#define AVUNERROR(e) (e)\n#endif\n\n#define FFERRTAG(a, b, c, d) (-(int)MKTAG(a, b, c, d))\n\n#define AVERROR_BSF_NOT_FOUND      FFERRTAG(0xF8,'B','S','F') ///< Bitstream filter not found\n#define AVERROR_BUG                FFERRTAG( 'B','U','G','!') ///< Internal bug, also see AVERROR_BUG2\n#define AVERROR_BUFFER_TOO_SMALL   FFERRTAG( 'B','U','F','S') ///< Buffer too small\n#define AVERROR_DECODER_NOT_FOUND  FFERRTAG(0xF8,'D','E','C') ///< Decoder not found\n#define AVERROR_DEMUXER_NOT_FOUND  FFERRTAG(0xF8,'D','E','M') ///< Demuxer not found\n#define AVERROR_ENCODER_NOT_FOUND  FFERRTAG(0xF8,'E','N','C') ///< Encoder not found\n#define AVERROR_EOF                FFERRTAG( 'E','O','F',' ') ///< End of file\n#define AVERROR_EXIT               FFERRTAG( 'E','X','I','T') ///< Immediate exit was requested; the called function should not be restarted\n#define AVERROR_EXTERNAL           FFERRTAG( 'E','X','T',' ') ///< Generic error in an external library\n#define AVERROR_FILTER_NOT_FOUND   FFERRTAG(0xF8,'F','I','L') ///< Filter not found\n#define AVERROR_INVALIDDATA        FFERRTAG( 'I','N','D','A') ///< Invalid data found when processing input\n#define AVERROR_MUXER_NOT_FOUND    FFERRTAG(0xF8,'M','U','X') ///< Muxer not found\n#define AVERROR_OPTION_NOT_FOUND   FFERRTAG(0xF8,'O','P','T') ///< Option not found\n#define AVERROR_PATCHWELCOME       FFERRTAG( 'P','A','W','E') ///< Not yet implemented in FFmpeg, patches welcome\n#define AVERROR_PROTOCOL_NOT_FOUND FFERRTAG(0xF8,'P','R','O') ///< Protocol not found\n\n#define AVERROR_STREAM_NOT_FOUND   FFERRTAG(0xF8,'S','T','R') ///< Stream not found\n/**\n * This is semantically identical to AVERROR_BUG\n * it has been introduced in Libav after our AVERROR_BUG and with a modified value.\n */\n#define AVERROR_BUG2               FFERRTAG( 'B','U','G',' ')\n#define AVERROR_UNKNOWN            FFERRTAG( 'U','N','K','N') ///< Unknown error, typically from an external library\n#define AVERROR_EXPERIMENTAL       (-0x2bb2afa8) ///< Requested feature is flagged experimental. Set strict_std_compliance if you really want to use it.\n#define AVERROR_INPUT_CHANGED      (-0x636e6701) ///< Input changed between calls. Reconfiguration is required. (can be OR-ed with AVERROR_OUTPUT_CHANGED)\n#define AVERROR_OUTPUT_CHANGED     (-0x636e6702) ///< Output changed between calls. Reconfiguration is required. (can be OR-ed with AVERROR_INPUT_CHANGED)\n/* HTTP & RTSP errors */\n#define AVERROR_HTTP_BAD_REQUEST   FFERRTAG(0xF8,'4','0','0')\n#define AVERROR_HTTP_UNAUTHORIZED  FFERRTAG(0xF8,'4','0','1')\n#define AVERROR_HTTP_FORBIDDEN     FFERRTAG(0xF8,'4','0','3')\n#define AVERROR_HTTP_NOT_FOUND     FFERRTAG(0xF8,'4','0','4')\n#define AVERROR_HTTP_OTHER_4XX     FFERRTAG(0xF8,'4','X','X')\n#define AVERROR_HTTP_SERVER_ERROR  FFERRTAG(0xF8,'5','X','X')\n\n#define AV_ERROR_MAX_STRING_SIZE 64\n\n/**\n * Put a description of the AVERROR code errnum in errbuf.\n * In case of failure the global variable errno is set to indicate the\n * error. Even in case of failure av_strerror() will print a generic\n * error message indicating the errnum provided to errbuf.\n *\n * @param errnum      error code to describe\n * @param errbuf      buffer to which description is written\n * @param errbuf_size the size in bytes of errbuf\n * @return 0 on success, a negative value if a description for errnum\n * cannot be found\n */\nint av_strerror(int errnum, char *errbuf, size_t errbuf_size);\n\n/**\n * Fill the provided buffer with a string containing an error string\n * corresponding to the AVERROR code errnum.\n *\n * @param errbuf         a buffer\n * @param errbuf_size    size in bytes of errbuf\n * @param errnum         error code to describe\n * @return the buffer in input, filled with the error description\n * @see av_strerror()\n */\nstatic inline char *av_make_error_string(char *errbuf, size_t errbuf_size, int errnum)\n{\n    av_strerror(errnum, errbuf, errbuf_size);\n    return errbuf;\n}\n\n/**\n * Convenience macro, the return value should be used only directly in\n * function arguments but never stand-alone.\n */\n#define av_err2str(errnum) \\\n    av_make_error_string((char[AV_ERROR_MAX_STRING_SIZE]){0}, AV_ERROR_MAX_STRING_SIZE, errnum)\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_ERROR_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/eval.h",
    "content": "/*\n * Copyright (c) 2002 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * simple arithmetic expression evaluator\n */\n\n#ifndef AVUTIL_EVAL_H\n#define AVUTIL_EVAL_H\n\n#include \"avutil.h\"\n\ntypedef struct AVExpr AVExpr;\n\n/**\n * Parse and evaluate an expression.\n * Note, this is significantly slower than av_expr_eval().\n *\n * @param res a pointer to a double where is put the result value of\n * the expression, or NAN in case of error\n * @param s expression as a zero terminated string, for example \"1+2^3+5*5+sin(2/3)\"\n * @param const_names NULL terminated array of zero terminated strings of constant identifiers, for example {\"PI\", \"E\", 0}\n * @param const_values a zero terminated array of values for the identifiers from const_names\n * @param func1_names NULL terminated array of zero terminated strings of funcs1 identifiers\n * @param funcs1 NULL terminated array of function pointers for functions which take 1 argument\n * @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers\n * @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments\n * @param opaque a pointer which will be passed to all functions from funcs1 and funcs2\n * @param log_ctx parent logging context\n * @return >= 0 in case of success, a negative value corresponding to an\n * AVERROR code otherwise\n */\nint av_expr_parse_and_eval(double *res, const char *s,\n                           const char * const *const_names, const double *const_values,\n                           const char * const *func1_names, double (* const *funcs1)(void *, double),\n                           const char * const *func2_names, double (* const *funcs2)(void *, double, double),\n                           void *opaque, int log_offset, void *log_ctx);\n\n/**\n * Parse an expression.\n *\n * @param expr a pointer where is put an AVExpr containing the parsed\n * value in case of successful parsing, or NULL otherwise.\n * The pointed to AVExpr must be freed with av_expr_free() by the user\n * when it is not needed anymore.\n * @param s expression as a zero terminated string, for example \"1+2^3+5*5+sin(2/3)\"\n * @param const_names NULL terminated array of zero terminated strings of constant identifiers, for example {\"PI\", \"E\", 0}\n * @param func1_names NULL terminated array of zero terminated strings of funcs1 identifiers\n * @param funcs1 NULL terminated array of function pointers for functions which take 1 argument\n * @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers\n * @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments\n * @param log_ctx parent logging context\n * @return >= 0 in case of success, a negative value corresponding to an\n * AVERROR code otherwise\n */\nint av_expr_parse(AVExpr **expr, const char *s,\n                  const char * const *const_names,\n                  const char * const *func1_names, double (* const *funcs1)(void *, double),\n                  const char * const *func2_names, double (* const *funcs2)(void *, double, double),\n                  int log_offset, void *log_ctx);\n\n/**\n * Evaluate a previously parsed expression.\n *\n * @param const_values a zero terminated array of values for the identifiers from av_expr_parse() const_names\n * @param opaque a pointer which will be passed to all functions from funcs1 and funcs2\n * @return the value of the expression\n */\ndouble av_expr_eval(AVExpr *e, const double *const_values, void *opaque);\n\n/**\n * Free a parsed expression previously created with av_expr_parse().\n */\nvoid av_expr_free(AVExpr *e);\n\n/**\n * Parse the string in numstr and return its value as a double. If\n * the string is empty, contains only whitespaces, or does not contain\n * an initial substring that has the expected syntax for a\n * floating-point number, no conversion is performed. In this case,\n * returns a value of zero and the value returned in tail is the value\n * of numstr.\n *\n * @param numstr a string representing a number, may contain one of\n * the International System number postfixes, for example 'K', 'M',\n * 'G'. If 'i' is appended after the postfix, powers of 2 are used\n * instead of powers of 10. The 'B' postfix multiplies the value by\n * 8, and can be appended after another postfix or used alone. This\n * allows using for example 'KB', 'MiB', 'G' and 'B' as postfix.\n * @param tail if non-NULL puts here the pointer to the char next\n * after the last parsed character\n */\ndouble av_strtod(const char *numstr, char **tail);\n\n#endif /* AVUTIL_EVAL_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/ffversion.h",
    "content": "/* Automatically generated by version.sh, do not manually edit! */\n#ifndef AVUTIL_FFVERSION_H\n#define AVUTIL_FFVERSION_H\n#define FFMPEG_VERSION \"2.8.git\"\n#endif /* AVUTIL_FFVERSION_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/fifo.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * a very simple circular buffer FIFO implementation\n */\n\n#ifndef AVUTIL_FIFO_H\n#define AVUTIL_FIFO_H\n\n#include <stdint.h>\n#include \"avutil.h\"\n#include \"attributes.h\"\n\ntypedef struct AVFifoBuffer {\n    uint8_t *buffer;\n    uint8_t *rptr, *wptr, *end;\n    uint32_t rndx, wndx;\n} AVFifoBuffer;\n\n/**\n * Initialize an AVFifoBuffer.\n * @param size of FIFO\n * @return AVFifoBuffer or NULL in case of memory allocation failure\n */\nAVFifoBuffer *av_fifo_alloc(unsigned int size);\n\n/**\n * Initialize an AVFifoBuffer.\n * @param nmemb number of elements\n * @param size  size of the single element\n * @return AVFifoBuffer or NULL in case of memory allocation failure\n */\nAVFifoBuffer *av_fifo_alloc_array(size_t nmemb, size_t size);\n\n/**\n * Free an AVFifoBuffer.\n * @param f AVFifoBuffer to free\n */\nvoid av_fifo_free(AVFifoBuffer *f);\n\n/**\n * Free an AVFifoBuffer and reset pointer to NULL.\n * @param f AVFifoBuffer to free\n */\nvoid av_fifo_freep(AVFifoBuffer **f);\n\n/**\n * Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied.\n * @param f AVFifoBuffer to reset\n */\nvoid av_fifo_reset(AVFifoBuffer *f);\n\n/**\n * Return the amount of data in bytes in the AVFifoBuffer, that is the\n * amount of data you can read from it.\n * @param f AVFifoBuffer to read from\n * @return size\n */\nint av_fifo_size(const AVFifoBuffer *f);\n\n/**\n * Return the amount of space in bytes in the AVFifoBuffer, that is the\n * amount of data you can write into it.\n * @param f AVFifoBuffer to write into\n * @return size\n */\nint av_fifo_space(const AVFifoBuffer *f);\n\n/**\n * Feed data at specific position from an AVFifoBuffer to a user-supplied callback.\n * Similar as av_fifo_gereric_read but without discarding data.\n * @param f AVFifoBuffer to read from\n * @param offset offset from current read position\n * @param buf_size number of bytes to read\n * @param func generic read function\n * @param dest data destination\n */\nint av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void (*func)(void*, void*, int));\n\n/**\n * Feed data from an AVFifoBuffer to a user-supplied callback.\n * Similar as av_fifo_gereric_read but without discarding data.\n * @param f AVFifoBuffer to read from\n * @param buf_size number of bytes to read\n * @param func generic read function\n * @param dest data destination\n */\nint av_fifo_generic_peek(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int));\n\n/**\n * Feed data from an AVFifoBuffer to a user-supplied callback.\n * @param f AVFifoBuffer to read from\n * @param buf_size number of bytes to read\n * @param func generic read function\n * @param dest data destination\n */\nint av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int));\n\n/**\n * Feed data from a user-supplied callback to an AVFifoBuffer.\n * @param f AVFifoBuffer to write to\n * @param src data source; non-const since it may be used as a\n * modifiable context by the function defined in func\n * @param size number of bytes to write\n * @param func generic write function; the first parameter is src,\n * the second is dest_buf, the third is dest_buf_size.\n * func must return the number of bytes written to dest_buf, or <= 0 to\n * indicate no more data available to write.\n * If func is NULL, src is interpreted as a simple byte array for source data.\n * @return the number of bytes written to the FIFO\n */\nint av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int));\n\n/**\n * Resize an AVFifoBuffer.\n * In case of reallocation failure, the old FIFO is kept unchanged.\n *\n * @param f AVFifoBuffer to resize\n * @param size new AVFifoBuffer size in bytes\n * @return <0 for failure, >=0 otherwise\n */\nint av_fifo_realloc2(AVFifoBuffer *f, unsigned int size);\n\n/**\n * Enlarge an AVFifoBuffer.\n * In case of reallocation failure, the old FIFO is kept unchanged.\n * The new fifo size may be larger than the requested size.\n *\n * @param f AVFifoBuffer to resize\n * @param additional_space the amount of space in bytes to allocate in addition to av_fifo_size()\n * @return <0 for failure, >=0 otherwise\n */\nint av_fifo_grow(AVFifoBuffer *f, unsigned int additional_space);\n\n/**\n * Read and discard the specified amount of data from an AVFifoBuffer.\n * @param f AVFifoBuffer to read from\n * @param size amount of data to read in bytes\n */\nvoid av_fifo_drain(AVFifoBuffer *f, int size);\n\n/**\n * Return a pointer to the data stored in a FIFO buffer at a certain offset.\n * The FIFO buffer is not modified.\n *\n * @param f    AVFifoBuffer to peek at, f must be non-NULL\n * @param offs an offset in bytes, its absolute value must be less\n *             than the used buffer size or the returned pointer will\n *             point outside to the buffer data.\n *             The used buffer size can be checked with av_fifo_size().\n */\nstatic inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs)\n{\n    uint8_t *ptr = f->rptr + offs;\n    if (ptr >= f->end)\n        ptr = f->buffer + (ptr - f->end);\n    else if (ptr < f->buffer)\n        ptr = f->end - (f->buffer - ptr);\n    return ptr;\n}\n\n#endif /* AVUTIL_FIFO_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/file.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_FILE_H\n#define AVUTIL_FILE_H\n\n#include <stdint.h>\n\n#include \"avutil.h\"\n\n/**\n * @file\n * Misc file utilities.\n */\n\n/**\n * Read the file with name filename, and put its content in a newly\n * allocated buffer or map it with mmap() when available.\n * In case of success set *bufptr to the read or mmapped buffer, and\n * *size to the size in bytes of the buffer in *bufptr.\n * The returned buffer must be released with av_file_unmap().\n *\n * @param log_offset loglevel offset used for logging\n * @param log_ctx context used for logging\n * @return a non negative number in case of success, a negative value\n * corresponding to an AVERROR error code in case of failure\n */\nav_warn_unused_result\nint av_file_map(const char *filename, uint8_t **bufptr, size_t *size,\n                int log_offset, void *log_ctx);\n\n/**\n * Unmap or free the buffer bufptr created by av_file_map().\n *\n * @param size size in bytes of bufptr, must be the same as returned\n * by av_file_map()\n */\nvoid av_file_unmap(uint8_t *bufptr, size_t size);\n\n/**\n * Wrapper to work around the lack of mkstemp() on mingw.\n * Also, tries to create file in /tmp first, if possible.\n * *prefix can be a character constant; *filename will be allocated internally.\n * @return file descriptor of opened file (or negative value corresponding to an\n * AVERROR code on error)\n * and opened file name in **filename.\n * @note On very old libcs it is necessary to set a secure umask before\n *       calling this, av_tempfile() can't call umask itself as it is used in\n *       libraries and could interfere with the calling application.\n */\nint av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx);\n\n#endif /* AVUTIL_FILE_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/frame.h",
    "content": "/*\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * @ingroup lavu_frame\n * reference-counted frame API\n */\n\n#ifndef AVUTIL_FRAME_H\n#define AVUTIL_FRAME_H\n\n#include <stdint.h>\n\n#include \"avutil.h\"\n#include \"buffer.h\"\n#include \"dict.h\"\n#include \"rational.h\"\n#include \"samplefmt.h\"\n#include \"pixfmt.h\"\n#include \"version.h\"\n\n\n/**\n * @defgroup lavu_frame AVFrame\n * @ingroup lavu_data\n *\n * @{\n * AVFrame is an abstraction for reference-counted raw multimedia data.\n */\n\nenum AVFrameSideDataType {\n    /**\n     * The data is the AVPanScan struct defined in libavcodec.\n     */\n    AV_FRAME_DATA_PANSCAN,\n    /**\n     * ATSC A53 Part 4 Closed Captions.\n     * A53 CC bitstream is stored as uint8_t in AVFrameSideData.data.\n     * The number of bytes of CC data is AVFrameSideData.size.\n     */\n    AV_FRAME_DATA_A53_CC,\n    /**\n     * Stereoscopic 3d metadata.\n     * The data is the AVStereo3D struct defined in libavutil/stereo3d.h.\n     */\n    AV_FRAME_DATA_STEREO3D,\n    /**\n     * The data is the AVMatrixEncoding enum defined in libavutil/channel_layout.h.\n     */\n    AV_FRAME_DATA_MATRIXENCODING,\n    /**\n     * Metadata relevant to a downmix procedure.\n     * The data is the AVDownmixInfo struct defined in libavutil/downmix_info.h.\n     */\n    AV_FRAME_DATA_DOWNMIX_INFO,\n    /**\n     * ReplayGain information in the form of the AVReplayGain struct.\n     */\n    AV_FRAME_DATA_REPLAYGAIN,\n    /**\n     * This side data contains a 3x3 transformation matrix describing an affine\n     * transformation that needs to be applied to the frame for correct\n     * presentation.\n     *\n     * See libavutil/display.h for a detailed description of the data.\n     */\n    AV_FRAME_DATA_DISPLAYMATRIX,\n    /**\n     * Active Format Description data consisting of a single byte as specified\n     * in ETSI TS 101 154 using AVActiveFormatDescription enum.\n     */\n    AV_FRAME_DATA_AFD,\n    /**\n     * Motion vectors exported by some codecs (on demand through the export_mvs\n     * flag set in the libavcodec AVCodecContext flags2 option).\n     * The data is the AVMotionVector struct defined in\n     * libavutil/motion_vector.h.\n     */\n    AV_FRAME_DATA_MOTION_VECTORS,\n    /**\n     * Recommmends skipping the specified number of samples. This is exported\n     * only if the \"skip_manual\" AVOption is set in libavcodec.\n     * This has the same format as AV_PKT_DATA_SKIP_SAMPLES.\n     * @code\n     * u32le number of samples to skip from start of this packet\n     * u32le number of samples to skip from end of this packet\n     * u8    reason for start skip\n     * u8    reason for end   skip (0=padding silence, 1=convergence)\n     * @endcode\n     */\n    AV_FRAME_DATA_SKIP_SAMPLES,\n\n    /**\n     * This side data must be associated with an audio frame and corresponds to\n     * enum AVAudioServiceType defined in avcodec.h.\n     */\n    AV_FRAME_DATA_AUDIO_SERVICE_TYPE,\n};\n\nenum AVActiveFormatDescription {\n    AV_AFD_SAME         = 8,\n    AV_AFD_4_3          = 9,\n    AV_AFD_16_9         = 10,\n    AV_AFD_14_9         = 11,\n    AV_AFD_4_3_SP_14_9  = 13,\n    AV_AFD_16_9_SP_14_9 = 14,\n    AV_AFD_SP_4_3       = 15,\n};\n\n\n/**\n * Structure to hold side data for an AVFrame.\n *\n * sizeof(AVFrameSideData) is not a part of the public ABI, so new fields may be added\n * to the end with a minor bump.\n */\ntypedef struct AVFrameSideData {\n    enum AVFrameSideDataType type;\n    uint8_t *data;\n    int      size;\n    AVDictionary *metadata;\n    AVBufferRef *buf;\n} AVFrameSideData;\n\n/**\n * This structure describes decoded (raw) audio or video data.\n *\n * AVFrame must be allocated using av_frame_alloc(). Note that this only\n * allocates the AVFrame itself, the buffers for the data must be managed\n * through other means (see below).\n * AVFrame must be freed with av_frame_free().\n *\n * AVFrame is typically allocated once and then reused multiple times to hold\n * different data (e.g. a single AVFrame to hold frames received from a\n * decoder). In such a case, av_frame_unref() will free any references held by\n * the frame and reset it to its original clean state before it\n * is reused again.\n *\n * The data described by an AVFrame is usually reference counted through the\n * AVBuffer API. The underlying buffer references are stored in AVFrame.buf /\n * AVFrame.extended_buf. An AVFrame is considered to be reference counted if at\n * least one reference is set, i.e. if AVFrame.buf[0] != NULL. In such a case,\n * every single data plane must be contained in one of the buffers in\n * AVFrame.buf or AVFrame.extended_buf.\n * There may be a single buffer for all the data, or one separate buffer for\n * each plane, or anything in between.\n *\n * sizeof(AVFrame) is not a part of the public ABI, so new fields may be added\n * to the end with a minor bump.\n * Similarly fields that are marked as to be only accessed by\n * av_opt_ptr() can be reordered. This allows 2 forks to add fields\n * without breaking compatibility with each other.\n */\ntypedef struct AVFrame {\n#define AV_NUM_DATA_POINTERS 8\n    /**\n     * pointer to the picture/channel planes.\n     * This might be different from the first allocated byte\n     *\n     * Some decoders access areas outside 0,0 - width,height, please\n     * see avcodec_align_dimensions2(). Some filters and swscale can read\n     * up to 16 bytes beyond the planes, if these filters are to be used,\n     * then 16 extra bytes must be allocated.\n     */\n    uint8_t *data[AV_NUM_DATA_POINTERS];\n\n    /**\n     * For video, size in bytes of each picture line.\n     * For audio, size in bytes of each plane.\n     *\n     * For audio, only linesize[0] may be set. For planar audio, each channel\n     * plane must be the same size.\n     *\n     * For video the linesizes should be multiples of the CPUs alignment\n     * preference, this is 16 or 32 for modern desktop CPUs.\n     * Some code requires such alignment other code can be slower without\n     * correct alignment, for yet other it makes no difference.\n     *\n     * @note The linesize may be larger than the size of usable data -- there\n     * may be extra padding present for performance reasons.\n     */\n    int linesize[AV_NUM_DATA_POINTERS];\n\n    /**\n     * pointers to the data planes/channels.\n     *\n     * For video, this should simply point to data[].\n     *\n     * For planar audio, each channel has a separate data pointer, and\n     * linesize[0] contains the size of each channel buffer.\n     * For packed audio, there is just one data pointer, and linesize[0]\n     * contains the total size of the buffer for all channels.\n     *\n     * Note: Both data and extended_data should always be set in a valid frame,\n     * but for planar audio with more channels that can fit in data,\n     * extended_data must be used in order to access all channels.\n     */\n    uint8_t **extended_data;\n\n    /**\n     * width and height of the video frame\n     */\n    int width, height;\n\n    /**\n     * number of audio samples (per channel) described by this frame\n     */\n    int nb_samples;\n\n    /**\n     * format of the frame, -1 if unknown or unset\n     * Values correspond to enum AVPixelFormat for video frames,\n     * enum AVSampleFormat for audio)\n     */\n    int format;\n\n    /**\n     * 1 -> keyframe, 0-> not\n     */\n    int key_frame;\n\n    /**\n     * Picture type of the frame.\n     */\n    enum AVPictureType pict_type;\n\n    /**\n     * Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.\n     */\n    AVRational sample_aspect_ratio;\n\n    /**\n     * Presentation timestamp in time_base units (time when frame should be shown to user).\n     */\n    int64_t pts;\n\n    /**\n     * PTS copied from the AVPacket that was decoded to produce this frame.\n     */\n    int64_t pkt_pts;\n\n    /**\n     * DTS copied from the AVPacket that triggered returning this frame. (if frame threading isn't used)\n     * This is also the Presentation time of this AVFrame calculated from\n     * only AVPacket.dts values without pts values.\n     */\n    int64_t pkt_dts;\n\n    /**\n     * picture number in bitstream order\n     */\n    int coded_picture_number;\n    /**\n     * picture number in display order\n     */\n    int display_picture_number;\n\n    /**\n     * quality (between 1 (good) and FF_LAMBDA_MAX (bad))\n     */\n    int quality;\n\n    /**\n     * for some private data of the user\n     */\n    void *opaque;\n\n#if FF_API_ERROR_FRAME\n    /**\n     * @deprecated unused\n     */\n    attribute_deprecated\n    uint64_t error[AV_NUM_DATA_POINTERS];\n#endif\n\n    /**\n     * When decoding, this signals how much the picture must be delayed.\n     * extra_delay = repeat_pict / (2*fps)\n     */\n    int repeat_pict;\n\n    /**\n     * The content of the picture is interlaced.\n     */\n    int interlaced_frame;\n\n    /**\n     * If the content is interlaced, is top field displayed first.\n     */\n    int top_field_first;\n\n    /**\n     * Tell user application that palette has changed from previous frame.\n     */\n    int palette_has_changed;\n\n    /**\n     * reordered opaque 64bit (generally an integer or a double precision float\n     * PTS but can be anything).\n     * The user sets AVCodecContext.reordered_opaque to represent the input at\n     * that time,\n     * the decoder reorders values as needed and sets AVFrame.reordered_opaque\n     * to exactly one of the values provided by the user through AVCodecContext.reordered_opaque\n     * @deprecated in favor of pkt_pts\n     */\n    int64_t reordered_opaque;\n\n    /**\n     * Sample rate of the audio data.\n     */\n    int sample_rate;\n\n    /**\n     * Channel layout of the audio data.\n     */\n    uint64_t channel_layout;\n\n    /**\n     * AVBuffer references backing the data for this frame. If all elements of\n     * this array are NULL, then this frame is not reference counted. This array\n     * must be filled contiguously -- if buf[i] is non-NULL then buf[j] must\n     * also be non-NULL for all j < i.\n     *\n     * There may be at most one AVBuffer per data plane, so for video this array\n     * always contains all the references. For planar audio with more than\n     * AV_NUM_DATA_POINTERS channels, there may be more buffers than can fit in\n     * this array. Then the extra AVBufferRef pointers are stored in the\n     * extended_buf array.\n     */\n    AVBufferRef *buf[AV_NUM_DATA_POINTERS];\n\n    /**\n     * For planar audio which requires more than AV_NUM_DATA_POINTERS\n     * AVBufferRef pointers, this array will hold all the references which\n     * cannot fit into AVFrame.buf.\n     *\n     * Note that this is different from AVFrame.extended_data, which always\n     * contains all the pointers. This array only contains the extra pointers,\n     * which cannot fit into AVFrame.buf.\n     *\n     * This array is always allocated using av_malloc() by whoever constructs\n     * the frame. It is freed in av_frame_unref().\n     */\n    AVBufferRef **extended_buf;\n    /**\n     * Number of elements in extended_buf.\n     */\n    int        nb_extended_buf;\n\n    AVFrameSideData **side_data;\n    int            nb_side_data;\n\n/**\n * @defgroup lavu_frame_flags AV_FRAME_FLAGS\n * Flags describing additional frame properties.\n *\n * @{\n */\n\n/**\n * The frame data may be corrupted, e.g. due to decoding errors.\n */\n#define AV_FRAME_FLAG_CORRUPT       (1 << 0)\n/**\n * @}\n */\n\n    /**\n     * Frame flags, a combination of @ref lavu_frame_flags\n     */\n    int flags;\n\n    /**\n     * MPEG vs JPEG YUV range.\n     * It must be accessed using av_frame_get_color_range() and\n     * av_frame_set_color_range().\n     * - encoding: Set by user\n     * - decoding: Set by libavcodec\n     */\n    enum AVColorRange color_range;\n\n    enum AVColorPrimaries color_primaries;\n\n    enum AVColorTransferCharacteristic color_trc;\n\n    /**\n     * YUV colorspace type.\n     * It must be accessed using av_frame_get_colorspace() and\n     * av_frame_set_colorspace().\n     * - encoding: Set by user\n     * - decoding: Set by libavcodec\n     */\n    enum AVColorSpace colorspace;\n\n    enum AVChromaLocation chroma_location;\n\n    /**\n     * frame timestamp estimated using various heuristics, in stream time base\n     * Code outside libavutil should access this field using:\n     * av_frame_get_best_effort_timestamp(frame)\n     * - encoding: unused\n     * - decoding: set by libavcodec, read by user.\n     */\n    int64_t best_effort_timestamp;\n\n    /**\n     * reordered pos from the last AVPacket that has been input into the decoder\n     * Code outside libavutil should access this field using:\n     * av_frame_get_pkt_pos(frame)\n     * - encoding: unused\n     * - decoding: Read by user.\n     */\n    int64_t pkt_pos;\n\n    /**\n     * duration of the corresponding packet, expressed in\n     * AVStream->time_base units, 0 if unknown.\n     * Code outside libavutil should access this field using:\n     * av_frame_get_pkt_duration(frame)\n     * - encoding: unused\n     * - decoding: Read by user.\n     */\n    int64_t pkt_duration;\n\n    /**\n     * metadata.\n     * Code outside libavutil should access this field using:\n     * av_frame_get_metadata(frame)\n     * - encoding: Set by user.\n     * - decoding: Set by libavcodec.\n     */\n    AVDictionary *metadata;\n\n    /**\n     * decode error flags of the frame, set to a combination of\n     * FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there\n     * were errors during the decoding.\n     * Code outside libavutil should access this field using:\n     * av_frame_get_decode_error_flags(frame)\n     * - encoding: unused\n     * - decoding: set by libavcodec, read by user.\n     */\n    int decode_error_flags;\n#define FF_DECODE_ERROR_INVALID_BITSTREAM   1\n#define FF_DECODE_ERROR_MISSING_REFERENCE   2\n\n    /**\n     * number of audio channels, only used for audio.\n     * Code outside libavutil should access this field using:\n     * av_frame_get_channels(frame)\n     * - encoding: unused\n     * - decoding: Read by user.\n     */\n    int channels;\n\n    /**\n     * size of the corresponding packet containing the compressed\n     * frame. It must be accessed using av_frame_get_pkt_size() and\n     * av_frame_set_pkt_size().\n     * It is set to a negative value if unknown.\n     * - encoding: unused\n     * - decoding: set by libavcodec, read by user.\n     */\n    int pkt_size;\n\n#if FF_API_FRAME_QP\n    /**\n     * QP table\n     * Not to be accessed directly from outside libavutil\n     */\n    attribute_deprecated\n    int8_t *qscale_table;\n    /**\n     * QP store stride\n     * Not to be accessed directly from outside libavutil\n     */\n    attribute_deprecated\n    int qstride;\n\n    attribute_deprecated\n    int qscale_type;\n\n    /**\n     * Not to be accessed directly from outside libavutil\n     */\n    AVBufferRef *qp_table_buf;\n#endif\n} AVFrame;\n\n/**\n * Accessors for some AVFrame fields.\n * The position of these field in the structure is not part of the ABI,\n * they should not be accessed directly outside libavutil.\n */\nint64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);\nvoid    av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);\nint64_t av_frame_get_pkt_duration         (const AVFrame *frame);\nvoid    av_frame_set_pkt_duration         (AVFrame *frame, int64_t val);\nint64_t av_frame_get_pkt_pos              (const AVFrame *frame);\nvoid    av_frame_set_pkt_pos              (AVFrame *frame, int64_t val);\nint64_t av_frame_get_channel_layout       (const AVFrame *frame);\nvoid    av_frame_set_channel_layout       (AVFrame *frame, int64_t val);\nint     av_frame_get_channels             (const AVFrame *frame);\nvoid    av_frame_set_channels             (AVFrame *frame, int     val);\nint     av_frame_get_sample_rate          (const AVFrame *frame);\nvoid    av_frame_set_sample_rate          (AVFrame *frame, int     val);\nAVDictionary *av_frame_get_metadata       (const AVFrame *frame);\nvoid          av_frame_set_metadata       (AVFrame *frame, AVDictionary *val);\nint     av_frame_get_decode_error_flags   (const AVFrame *frame);\nvoid    av_frame_set_decode_error_flags   (AVFrame *frame, int     val);\nint     av_frame_get_pkt_size(const AVFrame *frame);\nvoid    av_frame_set_pkt_size(AVFrame *frame, int val);\nAVDictionary **avpriv_frame_get_metadatap(AVFrame *frame);\n#if FF_API_FRAME_QP\nint8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type);\nint av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type);\n#endif\nenum AVColorSpace av_frame_get_colorspace(const AVFrame *frame);\nvoid    av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val);\nenum AVColorRange av_frame_get_color_range(const AVFrame *frame);\nvoid    av_frame_set_color_range(AVFrame *frame, enum AVColorRange val);\n\n/**\n * Get the name of a colorspace.\n * @return a static string identifying the colorspace; can be NULL.\n */\nconst char *av_get_colorspace_name(enum AVColorSpace val);\n\n/**\n * Allocate an AVFrame and set its fields to default values.  The resulting\n * struct must be freed using av_frame_free().\n *\n * @return An AVFrame filled with default values or NULL on failure.\n *\n * @note this only allocates the AVFrame itself, not the data buffers. Those\n * must be allocated through other means, e.g. with av_frame_get_buffer() or\n * manually.\n */\nAVFrame *av_frame_alloc(void);\n\n/**\n * Free the frame and any dynamically allocated objects in it,\n * e.g. extended_data. If the frame is reference counted, it will be\n * unreferenced first.\n *\n * @param frame frame to be freed. The pointer will be set to NULL.\n */\nvoid av_frame_free(AVFrame **frame);\n\n/**\n * Set up a new reference to the data described by the source frame.\n *\n * Copy frame properties from src to dst and create a new reference for each\n * AVBufferRef from src.\n *\n * If src is not reference counted, new buffers are allocated and the data is\n * copied.\n *\n * @return 0 on success, a negative AVERROR on error\n */\nint av_frame_ref(AVFrame *dst, const AVFrame *src);\n\n/**\n * Create a new frame that references the same data as src.\n *\n * This is a shortcut for av_frame_alloc()+av_frame_ref().\n *\n * @return newly created AVFrame on success, NULL on error.\n */\nAVFrame *av_frame_clone(const AVFrame *src);\n\n/**\n * Unreference all the buffers referenced by frame and reset the frame fields.\n */\nvoid av_frame_unref(AVFrame *frame);\n\n/**\n * Move everything contained in src to dst and reset src.\n */\nvoid av_frame_move_ref(AVFrame *dst, AVFrame *src);\n\n/**\n * Allocate new buffer(s) for audio or video data.\n *\n * The following fields must be set on frame before calling this function:\n * - format (pixel format for video, sample format for audio)\n * - width and height for video\n * - nb_samples and channel_layout for audio\n *\n * This function will fill AVFrame.data and AVFrame.buf arrays and, if\n * necessary, allocate and fill AVFrame.extended_data and AVFrame.extended_buf.\n * For planar formats, one buffer will be allocated for each plane.\n *\n * @param frame frame in which to store the new buffers.\n * @param align required buffer size alignment\n *\n * @return 0 on success, a negative AVERROR on error.\n */\nint av_frame_get_buffer(AVFrame *frame, int align);\n\n/**\n * Check if the frame data is writable.\n *\n * @return A positive value if the frame data is writable (which is true if and\n * only if each of the underlying buffers has only one reference, namely the one\n * stored in this frame). Return 0 otherwise.\n *\n * If 1 is returned the answer is valid until av_buffer_ref() is called on any\n * of the underlying AVBufferRefs (e.g. through av_frame_ref() or directly).\n *\n * @see av_frame_make_writable(), av_buffer_is_writable()\n */\nint av_frame_is_writable(AVFrame *frame);\n\n/**\n * Ensure that the frame data is writable, avoiding data copy if possible.\n *\n * Do nothing if the frame is writable, allocate new buffers and copy the data\n * if it is not.\n *\n * @return 0 on success, a negative AVERROR on error.\n *\n * @see av_frame_is_writable(), av_buffer_is_writable(),\n * av_buffer_make_writable()\n */\nint av_frame_make_writable(AVFrame *frame);\n\n/**\n * Copy the frame data from src to dst.\n *\n * This function does not allocate anything, dst must be already initialized and\n * allocated with the same parameters as src.\n *\n * This function only copies the frame data (i.e. the contents of the data /\n * extended data arrays), not any other properties.\n *\n * @return >= 0 on success, a negative AVERROR on error.\n */\nint av_frame_copy(AVFrame *dst, const AVFrame *src);\n\n/**\n * Copy only \"metadata\" fields from src to dst.\n *\n * Metadata for the purpose of this function are those fields that do not affect\n * the data layout in the buffers.  E.g. pts, sample rate (for audio) or sample\n * aspect ratio (for video), but not width/height or channel layout.\n * Side data is also copied.\n */\nint av_frame_copy_props(AVFrame *dst, const AVFrame *src);\n\n/**\n * Get the buffer reference a given data plane is stored in.\n *\n * @param plane index of the data plane of interest in frame->extended_data.\n *\n * @return the buffer reference that contains the plane or NULL if the input\n * frame is not valid.\n */\nAVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane);\n\n/**\n * Add a new side data to a frame.\n *\n * @param frame a frame to which the side data should be added\n * @param type type of the added side data\n * @param size size of the side data\n *\n * @return newly added side data on success, NULL on error\n */\nAVFrameSideData *av_frame_new_side_data(AVFrame *frame,\n                                        enum AVFrameSideDataType type,\n                                        int size);\n\n/**\n * @return a pointer to the side data of a given type on success, NULL if there\n * is no side data with such type in this frame.\n */\nAVFrameSideData *av_frame_get_side_data(const AVFrame *frame,\n                                        enum AVFrameSideDataType type);\n\n/**\n * If side data of the supplied type exists in the frame, free it and remove it\n * from the frame.\n */\nvoid av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type);\n\n/**\n * @return a string identifying the side data type\n */\nconst char *av_frame_side_data_name(enum AVFrameSideDataType type);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_FRAME_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/hash.h",
    "content": "/*\n * Copyright (C) 2013 Reimar Döffinger <Reimar.Doeffinger@gmx.de>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_HASH_H\n#define AVUTIL_HASH_H\n\n#include <stdint.h>\n\nstruct AVHashContext;\n\n/**\n * Allocate a hash context for the algorithm specified by name.\n *\n * @return  >= 0 for success, a negative error code for failure\n * @note  The context is not initialized, you must call av_hash_init().\n */\nint av_hash_alloc(struct AVHashContext **ctx, const char *name);\n\n/**\n * Get the names of available hash algorithms.\n *\n * This function can be used to enumerate the algorithms.\n *\n * @param i  index of the hash algorithm, starting from 0\n * @return   a pointer to a static string or NULL if i is out of range\n */\nconst char *av_hash_names(int i);\n\n/**\n * Get the name of the algorithm corresponding to the given hash context.\n */\nconst char *av_hash_get_name(const struct AVHashContext *ctx);\n\n/**\n * Maximum value that av_hash_get_size will currently return.\n *\n * You can use this if you absolutely want or need to use static allocation\n * and are fine with not supporting hashes newly added to libavutil without\n * recompilation.\n * Note that you still need to check against av_hash_get_size, adding new hashes\n * with larger sizes will not be considered an ABI change and should not cause\n * your code to overflow a buffer.\n */\n#define AV_HASH_MAX_SIZE 64\n\n/**\n * Get the size of the resulting hash value in bytes.\n *\n * The pointer passed to av_hash_final have space for at least this many bytes.\n */\nint av_hash_get_size(const struct AVHashContext *ctx);\n\n/**\n * Initialize or reset a hash context.\n */\nvoid av_hash_init(struct AVHashContext *ctx);\n\n/**\n * Update a hash context with additional data.\n */\nvoid av_hash_update(struct AVHashContext *ctx, const uint8_t *src, int len);\n\n/**\n * Finalize a hash context and compute the actual hash value.\n */\nvoid av_hash_final(struct AVHashContext *ctx, uint8_t *dst);\n\n/**\n * Finalize a hash context and compute the actual hash value.\n * If size is smaller than the hash size, the hash is truncated;\n * if size is larger, the buffer is padded with 0.\n */\nvoid av_hash_final_bin(struct AVHashContext *ctx, uint8_t *dst, int size);\n\n/**\n * Finalize a hash context and compute the actual hash value as a hex string.\n * The string is always 0-terminated.\n * If size is smaller than 2 * hash_size + 1, the hex string is truncated.\n */\nvoid av_hash_final_hex(struct AVHashContext *ctx, uint8_t *dst, int size);\n\n/**\n * Finalize a hash context and compute the actual hash value as a base64 string.\n * The string is always 0-terminated.\n * If size is smaller than AV_BASE64_SIZE(hash_size), the base64 string is\n * truncated.\n */\nvoid av_hash_final_b64(struct AVHashContext *ctx, uint8_t *dst, int size);\n\n/**\n * Free hash context.\n */\nvoid av_hash_freep(struct AVHashContext **ctx);\n\n#endif /* AVUTIL_HASH_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/hmac.h",
    "content": "/*\n * Copyright (C) 2012 Martin Storsjo\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_HMAC_H\n#define AVUTIL_HMAC_H\n\n#include <stdint.h>\n\n#include \"version.h\"\n/**\n * @defgroup lavu_hmac HMAC\n * @ingroup lavu_crypto\n * @{\n */\n\nenum AVHMACType {\n    AV_HMAC_MD5,\n    AV_HMAC_SHA1,\n    AV_HMAC_SHA224,\n    AV_HMAC_SHA256,\n    AV_HMAC_SHA384 = 12,\n    AV_HMAC_SHA512,\n};\n\ntypedef struct AVHMAC AVHMAC;\n\n/**\n * Allocate an AVHMAC context.\n * @param type The hash function used for the HMAC.\n */\nAVHMAC *av_hmac_alloc(enum AVHMACType type);\n\n/**\n * Free an AVHMAC context.\n * @param ctx The context to free, may be NULL\n */\nvoid av_hmac_free(AVHMAC *ctx);\n\n/**\n * Initialize an AVHMAC context with an authentication key.\n * @param ctx    The HMAC context\n * @param key    The authentication key\n * @param keylen The length of the key, in bytes\n */\nvoid av_hmac_init(AVHMAC *ctx, const uint8_t *key, unsigned int keylen);\n\n/**\n * Hash data with the HMAC.\n * @param ctx  The HMAC context\n * @param data The data to hash\n * @param len  The length of the data, in bytes\n */\nvoid av_hmac_update(AVHMAC *ctx, const uint8_t *data, unsigned int len);\n\n/**\n * Finish hashing and output the HMAC digest.\n * @param ctx    The HMAC context\n * @param out    The output buffer to write the digest into\n * @param outlen The length of the out buffer, in bytes\n * @return       The number of bytes written to out, or a negative error code.\n */\nint av_hmac_final(AVHMAC *ctx, uint8_t *out, unsigned int outlen);\n\n/**\n * Hash an array of data with a key.\n * @param ctx    The HMAC context\n * @param data   The data to hash\n * @param len    The length of the data, in bytes\n * @param key    The authentication key\n * @param keylen The length of the key, in bytes\n * @param out    The output buffer to write the digest into\n * @param outlen The length of the out buffer, in bytes\n * @return       The number of bytes written to out, or a negative error code.\n */\nint av_hmac_calc(AVHMAC *ctx, const uint8_t *data, unsigned int len,\n                 const uint8_t *key, unsigned int keylen,\n                 uint8_t *out, unsigned int outlen);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_HMAC_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/imgutils.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_IMGUTILS_H\n#define AVUTIL_IMGUTILS_H\n\n/**\n * @file\n * misc image utilities\n *\n * @addtogroup lavu_picture\n * @{\n */\n\n#include \"avutil.h\"\n#include \"pixdesc.h\"\n#include \"rational.h\"\n\n/**\n * Compute the max pixel step for each plane of an image with a\n * format described by pixdesc.\n *\n * The pixel step is the distance in bytes between the first byte of\n * the group of bytes which describe a pixel component and the first\n * byte of the successive group in the same plane for the same\n * component.\n *\n * @param max_pixsteps an array which is filled with the max pixel step\n * for each plane. Since a plane may contain different pixel\n * components, the computed max_pixsteps[plane] is relative to the\n * component in the plane with the max pixel step.\n * @param max_pixstep_comps an array which is filled with the component\n * for each plane which has the max pixel step. May be NULL.\n */\nvoid av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4],\n                                const AVPixFmtDescriptor *pixdesc);\n\n/**\n * Compute the size of an image line with format pix_fmt and width\n * width for the plane plane.\n *\n * @return the computed size in bytes\n */\nint av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane);\n\n/**\n * Fill plane linesizes for an image with pixel format pix_fmt and\n * width width.\n *\n * @param linesizes array to be filled with the linesize for each plane\n * @return >= 0 in case of success, a negative error code otherwise\n */\nint av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width);\n\n/**\n * Fill plane data pointers for an image with pixel format pix_fmt and\n * height height.\n *\n * @param data pointers array to be filled with the pointer for each image plane\n * @param ptr the pointer to a buffer which will contain the image\n * @param linesizes the array containing the linesize for each\n * plane, should be filled by av_image_fill_linesizes()\n * @return the size in bytes required for the image buffer, a negative\n * error code in case of failure\n */\nint av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int height,\n                           uint8_t *ptr, const int linesizes[4]);\n\n/**\n * Allocate an image with size w and h and pixel format pix_fmt, and\n * fill pointers and linesizes accordingly.\n * The allocated image buffer has to be freed by using\n * av_freep(&pointers[0]).\n *\n * @param align the value to use for buffer size alignment\n * @return the size in bytes required for the image buffer, a negative\n * error code in case of failure\n */\nint av_image_alloc(uint8_t *pointers[4], int linesizes[4],\n                   int w, int h, enum AVPixelFormat pix_fmt, int align);\n\n/**\n * Copy image plane from src to dst.\n * That is, copy \"height\" number of lines of \"bytewidth\" bytes each.\n * The first byte of each successive line is separated by *_linesize\n * bytes.\n *\n * bytewidth must be contained by both absolute values of dst_linesize\n * and src_linesize, otherwise the function behavior is undefined.\n *\n * @param dst_linesize linesize for the image plane in dst\n * @param src_linesize linesize for the image plane in src\n */\nvoid av_image_copy_plane(uint8_t       *dst, int dst_linesize,\n                         const uint8_t *src, int src_linesize,\n                         int bytewidth, int height);\n\n/**\n * Copy image in src_data to dst_data.\n *\n * @param dst_linesizes linesizes for the image in dst_data\n * @param src_linesizes linesizes for the image in src_data\n */\nvoid av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],\n                   const uint8_t *src_data[4], const int src_linesizes[4],\n                   enum AVPixelFormat pix_fmt, int width, int height);\n\n/**\n * Setup the data pointers and linesizes based on the specified image\n * parameters and the provided array.\n *\n * The fields of the given image are filled in by using the src\n * address which points to the image data buffer. Depending on the\n * specified pixel format, one or multiple image data pointers and\n * line sizes will be set.  If a planar format is specified, several\n * pointers will be set pointing to the different picture planes and\n * the line sizes of the different planes will be stored in the\n * lines_sizes array. Call with src == NULL to get the required\n * size for the src buffer.\n *\n * To allocate the buffer and fill in the dst_data and dst_linesize in\n * one call, use av_image_alloc().\n *\n * @param dst_data      data pointers to be filled in\n * @param dst_linesizes linesizes for the image in dst_data to be filled in\n * @param src           buffer which will contain or contains the actual image data, can be NULL\n * @param pix_fmt       the pixel format of the image\n * @param width         the width of the image in pixels\n * @param height        the height of the image in pixels\n * @param align         the value used in src for linesize alignment\n * @return the size in bytes required for src, a negative error code\n * in case of failure\n */\nint av_image_fill_arrays(uint8_t *dst_data[4], int dst_linesize[4],\n                         const uint8_t *src,\n                         enum AVPixelFormat pix_fmt, int width, int height, int align);\n\n/**\n * Return the size in bytes of the amount of data required to store an\n * image with the given parameters.\n *\n * @param[in] align the assumed linesize alignment\n */\nint av_image_get_buffer_size(enum AVPixelFormat pix_fmt, int width, int height, int align);\n\n/**\n * Copy image data from an image into a buffer.\n *\n * av_image_get_buffer_size() can be used to compute the required size\n * for the buffer to fill.\n *\n * @param dst           a buffer into which picture data will be copied\n * @param dst_size      the size in bytes of dst\n * @param src_data      pointers containing the source image data\n * @param src_linesizes linesizes for the image in src_data\n * @param pix_fmt       the pixel format of the source image\n * @param width         the width of the source image in pixels\n * @param height        the height of the source image in pixels\n * @param align         the assumed linesize alignment for dst\n * @return the number of bytes written to dst, or a negative value\n * (error code) on error\n */\nint av_image_copy_to_buffer(uint8_t *dst, int dst_size,\n                            const uint8_t * const src_data[4], const int src_linesize[4],\n                            enum AVPixelFormat pix_fmt, int width, int height, int align);\n\n/**\n * Check if the given dimension of an image is valid, meaning that all\n * bytes of the image can be addressed with a signed int.\n *\n * @param w the width of the picture\n * @param h the height of the picture\n * @param log_offset the offset to sum to the log level for logging with log_ctx\n * @param log_ctx the parent logging context, it may be NULL\n * @return >= 0 if valid, a negative error code otherwise\n */\nint av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx);\n\n/**\n * Check if the given sample aspect ratio of an image is valid.\n *\n * It is considered invalid if the denominator is 0 or if applying the ratio\n * to the image size would make the smaller dimension less than 1. If the\n * sar numerator is 0, it is considered unknown and will return as valid.\n *\n * @param w width of the image\n * @param h height of the image\n * @param sar sample aspect ratio of the image\n * @return 0 if valid, a negative AVERROR code otherwise\n */\nint av_image_check_sar(unsigned int w, unsigned int h, AVRational sar);\n\n/**\n * @}\n */\n\n\n#endif /* AVUTIL_IMGUTILS_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/intfloat.h",
    "content": "/*\n * Copyright (c) 2011 Mans Rullgard\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_INTFLOAT_H\n#define AVUTIL_INTFLOAT_H\n\n#include <stdint.h>\n#include \"attributes.h\"\n\nunion av_intfloat32 {\n    uint32_t i;\n    float    f;\n};\n\nunion av_intfloat64 {\n    uint64_t i;\n    double   f;\n};\n\n/**\n * Reinterpret a 32-bit integer as a float.\n */\nstatic av_always_inline float av_int2float(uint32_t i)\n{\n    union av_intfloat32 v;\n    v.i = i;\n    return v.f;\n}\n\n/**\n * Reinterpret a float as a 32-bit integer.\n */\nstatic av_always_inline uint32_t av_float2int(float f)\n{\n    union av_intfloat32 v;\n    v.f = f;\n    return v.i;\n}\n\n/**\n * Reinterpret a 64-bit integer as a double.\n */\nstatic av_always_inline double av_int2double(uint64_t i)\n{\n    union av_intfloat64 v;\n    v.i = i;\n    return v.f;\n}\n\n/**\n * Reinterpret a double as a 64-bit integer.\n */\nstatic av_always_inline uint64_t av_double2int(double f)\n{\n    union av_intfloat64 v;\n    v.f = f;\n    return v.i;\n}\n\n#endif /* AVUTIL_INTFLOAT_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/intreadwrite.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_INTREADWRITE_H\n#define AVUTIL_INTREADWRITE_H\n\n#include <stdint.h>\n#include \"libavutil/avconfig.h\"\n#include \"attributes.h\"\n#include \"bswap.h\"\n\ntypedef union {\n    uint64_t u64;\n    uint32_t u32[2];\n    uint16_t u16[4];\n    uint8_t  u8 [8];\n    double   f64;\n    float    f32[2];\n} av_alias av_alias64;\n\ntypedef union {\n    uint32_t u32;\n    uint16_t u16[2];\n    uint8_t  u8 [4];\n    float    f32;\n} av_alias av_alias32;\n\ntypedef union {\n    uint16_t u16;\n    uint8_t  u8 [2];\n} av_alias av_alias16;\n\n/*\n * Arch-specific headers can provide any combination of\n * AV_[RW][BLN](16|24|32|48|64) and AV_(COPY|SWAP|ZERO)(64|128) macros.\n * Preprocessor symbols must be defined, even if these are implemented\n * as inline functions.\n *\n * R/W means read/write, B/L/N means big/little/native endianness.\n * The following macros require aligned access, compared to their\n * unaligned variants: AV_(COPY|SWAP|ZERO)(64|128), AV_[RW]N[8-64]A.\n * Incorrect usage may range from abysmal performance to crash\n * depending on the platform.\n *\n * The unaligned variants are AV_[RW][BLN][8-64] and AV_COPY*U.\n */\n\n#ifdef HAVE_AV_CONFIG_H\n\n#include \"config.h\"\n\n#if   ARCH_ARM\n#   include \"arm/intreadwrite.h\"\n#elif ARCH_AVR32\n#   include \"avr32/intreadwrite.h\"\n#elif ARCH_MIPS\n#   include \"mips/intreadwrite.h\"\n#elif ARCH_PPC\n#   include \"ppc/intreadwrite.h\"\n#elif ARCH_TOMI\n#   include \"tomi/intreadwrite.h\"\n#elif ARCH_X86\n#   include \"x86/intreadwrite.h\"\n#endif\n\n#endif /* HAVE_AV_CONFIG_H */\n\n/*\n * Map AV_RNXX <-> AV_R[BL]XX for all variants provided by per-arch headers.\n */\n\n#if AV_HAVE_BIGENDIAN\n\n#   if    defined(AV_RN16) && !defined(AV_RB16)\n#       define AV_RB16(p) AV_RN16(p)\n#   elif !defined(AV_RN16) &&  defined(AV_RB16)\n#       define AV_RN16(p) AV_RB16(p)\n#   endif\n\n#   if    defined(AV_WN16) && !defined(AV_WB16)\n#       define AV_WB16(p, v) AV_WN16(p, v)\n#   elif !defined(AV_WN16) &&  defined(AV_WB16)\n#       define AV_WN16(p, v) AV_WB16(p, v)\n#   endif\n\n#   if    defined(AV_RN24) && !defined(AV_RB24)\n#       define AV_RB24(p) AV_RN24(p)\n#   elif !defined(AV_RN24) &&  defined(AV_RB24)\n#       define AV_RN24(p) AV_RB24(p)\n#   endif\n\n#   if    defined(AV_WN24) && !defined(AV_WB24)\n#       define AV_WB24(p, v) AV_WN24(p, v)\n#   elif !defined(AV_WN24) &&  defined(AV_WB24)\n#       define AV_WN24(p, v) AV_WB24(p, v)\n#   endif\n\n#   if    defined(AV_RN32) && !defined(AV_RB32)\n#       define AV_RB32(p) AV_RN32(p)\n#   elif !defined(AV_RN32) &&  defined(AV_RB32)\n#       define AV_RN32(p) AV_RB32(p)\n#   endif\n\n#   if    defined(AV_WN32) && !defined(AV_WB32)\n#       define AV_WB32(p, v) AV_WN32(p, v)\n#   elif !defined(AV_WN32) &&  defined(AV_WB32)\n#       define AV_WN32(p, v) AV_WB32(p, v)\n#   endif\n\n#   if    defined(AV_RN48) && !defined(AV_RB48)\n#       define AV_RB48(p) AV_RN48(p)\n#   elif !defined(AV_RN48) &&  defined(AV_RB48)\n#       define AV_RN48(p) AV_RB48(p)\n#   endif\n\n#   if    defined(AV_WN48) && !defined(AV_WB48)\n#       define AV_WB48(p, v) AV_WN48(p, v)\n#   elif !defined(AV_WN48) &&  defined(AV_WB48)\n#       define AV_WN48(p, v) AV_WB48(p, v)\n#   endif\n\n#   if    defined(AV_RN64) && !defined(AV_RB64)\n#       define AV_RB64(p) AV_RN64(p)\n#   elif !defined(AV_RN64) &&  defined(AV_RB64)\n#       define AV_RN64(p) AV_RB64(p)\n#   endif\n\n#   if    defined(AV_WN64) && !defined(AV_WB64)\n#       define AV_WB64(p, v) AV_WN64(p, v)\n#   elif !defined(AV_WN64) &&  defined(AV_WB64)\n#       define AV_WN64(p, v) AV_WB64(p, v)\n#   endif\n\n#else /* AV_HAVE_BIGENDIAN */\n\n#   if    defined(AV_RN16) && !defined(AV_RL16)\n#       define AV_RL16(p) AV_RN16(p)\n#   elif !defined(AV_RN16) &&  defined(AV_RL16)\n#       define AV_RN16(p) AV_RL16(p)\n#   endif\n\n#   if    defined(AV_WN16) && !defined(AV_WL16)\n#       define AV_WL16(p, v) AV_WN16(p, v)\n#   elif !defined(AV_WN16) &&  defined(AV_WL16)\n#       define AV_WN16(p, v) AV_WL16(p, v)\n#   endif\n\n#   if    defined(AV_RN24) && !defined(AV_RL24)\n#       define AV_RL24(p) AV_RN24(p)\n#   elif !defined(AV_RN24) &&  defined(AV_RL24)\n#       define AV_RN24(p) AV_RL24(p)\n#   endif\n\n#   if    defined(AV_WN24) && !defined(AV_WL24)\n#       define AV_WL24(p, v) AV_WN24(p, v)\n#   elif !defined(AV_WN24) &&  defined(AV_WL24)\n#       define AV_WN24(p, v) AV_WL24(p, v)\n#   endif\n\n#   if    defined(AV_RN32) && !defined(AV_RL32)\n#       define AV_RL32(p) AV_RN32(p)\n#   elif !defined(AV_RN32) &&  defined(AV_RL32)\n#       define AV_RN32(p) AV_RL32(p)\n#   endif\n\n#   if    defined(AV_WN32) && !defined(AV_WL32)\n#       define AV_WL32(p, v) AV_WN32(p, v)\n#   elif !defined(AV_WN32) &&  defined(AV_WL32)\n#       define AV_WN32(p, v) AV_WL32(p, v)\n#   endif\n\n#   if    defined(AV_RN48) && !defined(AV_RL48)\n#       define AV_RL48(p) AV_RN48(p)\n#   elif !defined(AV_RN48) &&  defined(AV_RL48)\n#       define AV_RN48(p) AV_RL48(p)\n#   endif\n\n#   if    defined(AV_WN48) && !defined(AV_WL48)\n#       define AV_WL48(p, v) AV_WN48(p, v)\n#   elif !defined(AV_WN48) &&  defined(AV_WL48)\n#       define AV_WN48(p, v) AV_WL48(p, v)\n#   endif\n\n#   if    defined(AV_RN64) && !defined(AV_RL64)\n#       define AV_RL64(p) AV_RN64(p)\n#   elif !defined(AV_RN64) &&  defined(AV_RL64)\n#       define AV_RN64(p) AV_RL64(p)\n#   endif\n\n#   if    defined(AV_WN64) && !defined(AV_WL64)\n#       define AV_WL64(p, v) AV_WN64(p, v)\n#   elif !defined(AV_WN64) &&  defined(AV_WL64)\n#       define AV_WN64(p, v) AV_WL64(p, v)\n#   endif\n\n#endif /* !AV_HAVE_BIGENDIAN */\n\n/*\n * Define AV_[RW]N helper macros to simplify definitions not provided\n * by per-arch headers.\n */\n\n#if defined(__GNUC__) && !defined(__TI_COMPILER_VERSION__)\n\nunion unaligned_64 { uint64_t l; } __attribute__((packed)) av_alias;\nunion unaligned_32 { uint32_t l; } __attribute__((packed)) av_alias;\nunion unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;\n\n#   define AV_RN(s, p) (((const union unaligned_##s *) (p))->l)\n#   define AV_WN(s, p, v) ((((union unaligned_##s *) (p))->l) = (v))\n\n#elif defined(__DECC)\n\n#   define AV_RN(s, p) (*((const __unaligned uint##s##_t*)(p)))\n#   define AV_WN(s, p, v) (*((__unaligned uint##s##_t*)(p)) = (v))\n\n#elif AV_HAVE_FAST_UNALIGNED\n\n#   define AV_RN(s, p) (((const av_alias##s*)(p))->u##s)\n#   define AV_WN(s, p, v) (((av_alias##s*)(p))->u##s = (v))\n\n#else\n\n#ifndef AV_RB16\n#   define AV_RB16(x)                           \\\n    ((((const uint8_t*)(x))[0] << 8) |          \\\n      ((const uint8_t*)(x))[1])\n#endif\n#ifndef AV_WB16\n#   define AV_WB16(p, darg) do {                \\\n        unsigned d = (darg);                    \\\n        ((uint8_t*)(p))[1] = (d);               \\\n        ((uint8_t*)(p))[0] = (d)>>8;            \\\n    } while(0)\n#endif\n\n#ifndef AV_RL16\n#   define AV_RL16(x)                           \\\n    ((((const uint8_t*)(x))[1] << 8) |          \\\n      ((const uint8_t*)(x))[0])\n#endif\n#ifndef AV_WL16\n#   define AV_WL16(p, darg) do {                \\\n        unsigned d = (darg);                    \\\n        ((uint8_t*)(p))[0] = (d);               \\\n        ((uint8_t*)(p))[1] = (d)>>8;            \\\n    } while(0)\n#endif\n\n#ifndef AV_RB32\n#   define AV_RB32(x)                                \\\n    (((uint32_t)((const uint8_t*)(x))[0] << 24) |    \\\n               (((const uint8_t*)(x))[1] << 16) |    \\\n               (((const uint8_t*)(x))[2] <<  8) |    \\\n                ((const uint8_t*)(x))[3])\n#endif\n#ifndef AV_WB32\n#   define AV_WB32(p, darg) do {                \\\n        unsigned d = (darg);                    \\\n        ((uint8_t*)(p))[3] = (d);               \\\n        ((uint8_t*)(p))[2] = (d)>>8;            \\\n        ((uint8_t*)(p))[1] = (d)>>16;           \\\n        ((uint8_t*)(p))[0] = (d)>>24;           \\\n    } while(0)\n#endif\n\n#ifndef AV_RL32\n#   define AV_RL32(x)                                \\\n    (((uint32_t)((const uint8_t*)(x))[3] << 24) |    \\\n               (((const uint8_t*)(x))[2] << 16) |    \\\n               (((const uint8_t*)(x))[1] <<  8) |    \\\n                ((const uint8_t*)(x))[0])\n#endif\n#ifndef AV_WL32\n#   define AV_WL32(p, darg) do {                \\\n        unsigned d = (darg);                    \\\n        ((uint8_t*)(p))[0] = (d);               \\\n        ((uint8_t*)(p))[1] = (d)>>8;            \\\n        ((uint8_t*)(p))[2] = (d)>>16;           \\\n        ((uint8_t*)(p))[3] = (d)>>24;           \\\n    } while(0)\n#endif\n\n#ifndef AV_RB64\n#   define AV_RB64(x)                                   \\\n    (((uint64_t)((const uint8_t*)(x))[0] << 56) |       \\\n     ((uint64_t)((const uint8_t*)(x))[1] << 48) |       \\\n     ((uint64_t)((const uint8_t*)(x))[2] << 40) |       \\\n     ((uint64_t)((const uint8_t*)(x))[3] << 32) |       \\\n     ((uint64_t)((const uint8_t*)(x))[4] << 24) |       \\\n     ((uint64_t)((const uint8_t*)(x))[5] << 16) |       \\\n     ((uint64_t)((const uint8_t*)(x))[6] <<  8) |       \\\n      (uint64_t)((const uint8_t*)(x))[7])\n#endif\n#ifndef AV_WB64\n#   define AV_WB64(p, darg) do {                \\\n        uint64_t d = (darg);                    \\\n        ((uint8_t*)(p))[7] = (d);               \\\n        ((uint8_t*)(p))[6] = (d)>>8;            \\\n        ((uint8_t*)(p))[5] = (d)>>16;           \\\n        ((uint8_t*)(p))[4] = (d)>>24;           \\\n        ((uint8_t*)(p))[3] = (d)>>32;           \\\n        ((uint8_t*)(p))[2] = (d)>>40;           \\\n        ((uint8_t*)(p))[1] = (d)>>48;           \\\n        ((uint8_t*)(p))[0] = (d)>>56;           \\\n    } while(0)\n#endif\n\n#ifndef AV_RL64\n#   define AV_RL64(x)                                   \\\n    (((uint64_t)((const uint8_t*)(x))[7] << 56) |       \\\n     ((uint64_t)((const uint8_t*)(x))[6] << 48) |       \\\n     ((uint64_t)((const uint8_t*)(x))[5] << 40) |       \\\n     ((uint64_t)((const uint8_t*)(x))[4] << 32) |       \\\n     ((uint64_t)((const uint8_t*)(x))[3] << 24) |       \\\n     ((uint64_t)((const uint8_t*)(x))[2] << 16) |       \\\n     ((uint64_t)((const uint8_t*)(x))[1] <<  8) |       \\\n      (uint64_t)((const uint8_t*)(x))[0])\n#endif\n#ifndef AV_WL64\n#   define AV_WL64(p, darg) do {                \\\n        uint64_t d = (darg);                    \\\n        ((uint8_t*)(p))[0] = (d);               \\\n        ((uint8_t*)(p))[1] = (d)>>8;            \\\n        ((uint8_t*)(p))[2] = (d)>>16;           \\\n        ((uint8_t*)(p))[3] = (d)>>24;           \\\n        ((uint8_t*)(p))[4] = (d)>>32;           \\\n        ((uint8_t*)(p))[5] = (d)>>40;           \\\n        ((uint8_t*)(p))[6] = (d)>>48;           \\\n        ((uint8_t*)(p))[7] = (d)>>56;           \\\n    } while(0)\n#endif\n\n#if AV_HAVE_BIGENDIAN\n#   define AV_RN(s, p)    AV_RB##s(p)\n#   define AV_WN(s, p, v) AV_WB##s(p, v)\n#else\n#   define AV_RN(s, p)    AV_RL##s(p)\n#   define AV_WN(s, p, v) AV_WL##s(p, v)\n#endif\n\n#endif /* HAVE_FAST_UNALIGNED */\n\n#ifndef AV_RN16\n#   define AV_RN16(p) AV_RN(16, p)\n#endif\n\n#ifndef AV_RN32\n#   define AV_RN32(p) AV_RN(32, p)\n#endif\n\n#ifndef AV_RN64\n#   define AV_RN64(p) AV_RN(64, p)\n#endif\n\n#ifndef AV_WN16\n#   define AV_WN16(p, v) AV_WN(16, p, v)\n#endif\n\n#ifndef AV_WN32\n#   define AV_WN32(p, v) AV_WN(32, p, v)\n#endif\n\n#ifndef AV_WN64\n#   define AV_WN64(p, v) AV_WN(64, p, v)\n#endif\n\n#if AV_HAVE_BIGENDIAN\n#   define AV_RB(s, p)    AV_RN##s(p)\n#   define AV_WB(s, p, v) AV_WN##s(p, v)\n#   define AV_RL(s, p)    av_bswap##s(AV_RN##s(p))\n#   define AV_WL(s, p, v) AV_WN##s(p, av_bswap##s(v))\n#else\n#   define AV_RB(s, p)    av_bswap##s(AV_RN##s(p))\n#   define AV_WB(s, p, v) AV_WN##s(p, av_bswap##s(v))\n#   define AV_RL(s, p)    AV_RN##s(p)\n#   define AV_WL(s, p, v) AV_WN##s(p, v)\n#endif\n\n#define AV_RB8(x)     (((const uint8_t*)(x))[0])\n#define AV_WB8(p, d)  do { ((uint8_t*)(p))[0] = (d); } while(0)\n\n#define AV_RL8(x)     AV_RB8(x)\n#define AV_WL8(p, d)  AV_WB8(p, d)\n\n#ifndef AV_RB16\n#   define AV_RB16(p)    AV_RB(16, p)\n#endif\n#ifndef AV_WB16\n#   define AV_WB16(p, v) AV_WB(16, p, v)\n#endif\n\n#ifndef AV_RL16\n#   define AV_RL16(p)    AV_RL(16, p)\n#endif\n#ifndef AV_WL16\n#   define AV_WL16(p, v) AV_WL(16, p, v)\n#endif\n\n#ifndef AV_RB32\n#   define AV_RB32(p)    AV_RB(32, p)\n#endif\n#ifndef AV_WB32\n#   define AV_WB32(p, v) AV_WB(32, p, v)\n#endif\n\n#ifndef AV_RL32\n#   define AV_RL32(p)    AV_RL(32, p)\n#endif\n#ifndef AV_WL32\n#   define AV_WL32(p, v) AV_WL(32, p, v)\n#endif\n\n#ifndef AV_RB64\n#   define AV_RB64(p)    AV_RB(64, p)\n#endif\n#ifndef AV_WB64\n#   define AV_WB64(p, v) AV_WB(64, p, v)\n#endif\n\n#ifndef AV_RL64\n#   define AV_RL64(p)    AV_RL(64, p)\n#endif\n#ifndef AV_WL64\n#   define AV_WL64(p, v) AV_WL(64, p, v)\n#endif\n\n#ifndef AV_RB24\n#   define AV_RB24(x)                           \\\n    ((((const uint8_t*)(x))[0] << 16) |         \\\n     (((const uint8_t*)(x))[1] <<  8) |         \\\n      ((const uint8_t*)(x))[2])\n#endif\n#ifndef AV_WB24\n#   define AV_WB24(p, d) do {                   \\\n        ((uint8_t*)(p))[2] = (d);               \\\n        ((uint8_t*)(p))[1] = (d)>>8;            \\\n        ((uint8_t*)(p))[0] = (d)>>16;           \\\n    } while(0)\n#endif\n\n#ifndef AV_RL24\n#   define AV_RL24(x)                           \\\n    ((((const uint8_t*)(x))[2] << 16) |         \\\n     (((const uint8_t*)(x))[1] <<  8) |         \\\n      ((const uint8_t*)(x))[0])\n#endif\n#ifndef AV_WL24\n#   define AV_WL24(p, d) do {                   \\\n        ((uint8_t*)(p))[0] = (d);               \\\n        ((uint8_t*)(p))[1] = (d)>>8;            \\\n        ((uint8_t*)(p))[2] = (d)>>16;           \\\n    } while(0)\n#endif\n\n#ifndef AV_RB48\n#   define AV_RB48(x)                                     \\\n    (((uint64_t)((const uint8_t*)(x))[0] << 40) |         \\\n     ((uint64_t)((const uint8_t*)(x))[1] << 32) |         \\\n     ((uint64_t)((const uint8_t*)(x))[2] << 24) |         \\\n     ((uint64_t)((const uint8_t*)(x))[3] << 16) |         \\\n     ((uint64_t)((const uint8_t*)(x))[4] <<  8) |         \\\n      (uint64_t)((const uint8_t*)(x))[5])\n#endif\n#ifndef AV_WB48\n#   define AV_WB48(p, darg) do {                \\\n        uint64_t d = (darg);                    \\\n        ((uint8_t*)(p))[5] = (d);               \\\n        ((uint8_t*)(p))[4] = (d)>>8;            \\\n        ((uint8_t*)(p))[3] = (d)>>16;           \\\n        ((uint8_t*)(p))[2] = (d)>>24;           \\\n        ((uint8_t*)(p))[1] = (d)>>32;           \\\n        ((uint8_t*)(p))[0] = (d)>>40;           \\\n    } while(0)\n#endif\n\n#ifndef AV_RL48\n#   define AV_RL48(x)                                     \\\n    (((uint64_t)((const uint8_t*)(x))[5] << 40) |         \\\n     ((uint64_t)((const uint8_t*)(x))[4] << 32) |         \\\n     ((uint64_t)((const uint8_t*)(x))[3] << 24) |         \\\n     ((uint64_t)((const uint8_t*)(x))[2] << 16) |         \\\n     ((uint64_t)((const uint8_t*)(x))[1] <<  8) |         \\\n      (uint64_t)((const uint8_t*)(x))[0])\n#endif\n#ifndef AV_WL48\n#   define AV_WL48(p, darg) do {                \\\n        uint64_t d = (darg);                    \\\n        ((uint8_t*)(p))[0] = (d);               \\\n        ((uint8_t*)(p))[1] = (d)>>8;            \\\n        ((uint8_t*)(p))[2] = (d)>>16;           \\\n        ((uint8_t*)(p))[3] = (d)>>24;           \\\n        ((uint8_t*)(p))[4] = (d)>>32;           \\\n        ((uint8_t*)(p))[5] = (d)>>40;           \\\n    } while(0)\n#endif\n\n/*\n * The AV_[RW]NA macros access naturally aligned data\n * in a type-safe way.\n */\n\n#define AV_RNA(s, p)    (((const av_alias##s*)(p))->u##s)\n#define AV_WNA(s, p, v) (((av_alias##s*)(p))->u##s = (v))\n\n#ifndef AV_RN16A\n#   define AV_RN16A(p) AV_RNA(16, p)\n#endif\n\n#ifndef AV_RN32A\n#   define AV_RN32A(p) AV_RNA(32, p)\n#endif\n\n#ifndef AV_RN64A\n#   define AV_RN64A(p) AV_RNA(64, p)\n#endif\n\n#ifndef AV_WN16A\n#   define AV_WN16A(p, v) AV_WNA(16, p, v)\n#endif\n\n#ifndef AV_WN32A\n#   define AV_WN32A(p, v) AV_WNA(32, p, v)\n#endif\n\n#ifndef AV_WN64A\n#   define AV_WN64A(p, v) AV_WNA(64, p, v)\n#endif\n\n/*\n * The AV_COPYxxU macros are suitable for copying data to/from unaligned\n * memory locations.\n */\n\n#define AV_COPYU(n, d, s) AV_WN##n(d, AV_RN##n(s));\n\n#ifndef AV_COPY16U\n#   define AV_COPY16U(d, s) AV_COPYU(16, d, s)\n#endif\n\n#ifndef AV_COPY32U\n#   define AV_COPY32U(d, s) AV_COPYU(32, d, s)\n#endif\n\n#ifndef AV_COPY64U\n#   define AV_COPY64U(d, s) AV_COPYU(64, d, s)\n#endif\n\n#ifndef AV_COPY128U\n#   define AV_COPY128U(d, s)                                    \\\n    do {                                                        \\\n        AV_COPY64U(d, s);                                       \\\n        AV_COPY64U((char *)(d) + 8, (const char *)(s) + 8);     \\\n    } while(0)\n#endif\n\n/* Parameters for AV_COPY*, AV_SWAP*, AV_ZERO* must be\n * naturally aligned. They may be implemented using MMX,\n * so emms_c() must be called before using any float code\n * afterwards.\n */\n\n#define AV_COPY(n, d, s) \\\n    (((av_alias##n*)(d))->u##n = ((const av_alias##n*)(s))->u##n)\n\n#ifndef AV_COPY16\n#   define AV_COPY16(d, s) AV_COPY(16, d, s)\n#endif\n\n#ifndef AV_COPY32\n#   define AV_COPY32(d, s) AV_COPY(32, d, s)\n#endif\n\n#ifndef AV_COPY64\n#   define AV_COPY64(d, s) AV_COPY(64, d, s)\n#endif\n\n#ifndef AV_COPY128\n#   define AV_COPY128(d, s)                    \\\n    do {                                       \\\n        AV_COPY64(d, s);                       \\\n        AV_COPY64((char*)(d)+8, (char*)(s)+8); \\\n    } while(0)\n#endif\n\n#define AV_SWAP(n, a, b) FFSWAP(av_alias##n, *(av_alias##n*)(a), *(av_alias##n*)(b))\n\n#ifndef AV_SWAP64\n#   define AV_SWAP64(a, b) AV_SWAP(64, a, b)\n#endif\n\n#define AV_ZERO(n, d) (((av_alias##n*)(d))->u##n = 0)\n\n#ifndef AV_ZERO16\n#   define AV_ZERO16(d) AV_ZERO(16, d)\n#endif\n\n#ifndef AV_ZERO32\n#   define AV_ZERO32(d) AV_ZERO(32, d)\n#endif\n\n#ifndef AV_ZERO64\n#   define AV_ZERO64(d) AV_ZERO(64, d)\n#endif\n\n#ifndef AV_ZERO128\n#   define AV_ZERO128(d)         \\\n    do {                         \\\n        AV_ZERO64(d);            \\\n        AV_ZERO64((char*)(d)+8); \\\n    } while(0)\n#endif\n\n#endif /* AVUTIL_INTREADWRITE_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/lfg.h",
    "content": "/*\n * Lagged Fibonacci PRNG\n * Copyright (c) 2008 Michael Niedermayer\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_LFG_H\n#define AVUTIL_LFG_H\n\ntypedef struct AVLFG {\n    unsigned int state[64];\n    int index;\n} AVLFG;\n\nvoid av_lfg_init(AVLFG *c, unsigned int seed);\n\n/**\n * Get the next random unsigned 32-bit number using an ALFG.\n *\n * Please also consider a simple LCG like state= state*1664525+1013904223,\n * it may be good enough and faster for your specific use case.\n */\nstatic inline unsigned int av_lfg_get(AVLFG *c){\n    c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63];\n    return c->state[c->index++ & 63];\n}\n\n/**\n * Get the next random unsigned 32-bit number using a MLFG.\n *\n * Please also consider av_lfg_get() above, it is faster.\n */\nstatic inline unsigned int av_mlfg_get(AVLFG *c){\n    unsigned int a= c->state[(c->index-55) & 63];\n    unsigned int b= c->state[(c->index-24) & 63];\n    return c->state[c->index++ & 63] = 2*a*b+a+b;\n}\n\n/**\n * Get the next two numbers generated by a Box-Muller Gaussian\n * generator using the random numbers issued by lfg.\n *\n * @param out array where the two generated numbers are placed\n */\nvoid av_bmg_get(AVLFG *lfg, double out[2]);\n\n#endif /* AVUTIL_LFG_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/log.h",
    "content": "/*\n * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_LOG_H\n#define AVUTIL_LOG_H\n\n#include <stdarg.h>\n#include \"avutil.h\"\n#include \"attributes.h\"\n#include \"version.h\"\n\ntypedef enum {\n    AV_CLASS_CATEGORY_NA = 0,\n    AV_CLASS_CATEGORY_INPUT,\n    AV_CLASS_CATEGORY_OUTPUT,\n    AV_CLASS_CATEGORY_MUXER,\n    AV_CLASS_CATEGORY_DEMUXER,\n    AV_CLASS_CATEGORY_ENCODER,\n    AV_CLASS_CATEGORY_DECODER,\n    AV_CLASS_CATEGORY_FILTER,\n    AV_CLASS_CATEGORY_BITSTREAM_FILTER,\n    AV_CLASS_CATEGORY_SWSCALER,\n    AV_CLASS_CATEGORY_SWRESAMPLER,\n    AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT = 40,\n    AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,\n    AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,\n    AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,\n    AV_CLASS_CATEGORY_DEVICE_OUTPUT,\n    AV_CLASS_CATEGORY_DEVICE_INPUT,\n    AV_CLASS_CATEGORY_NB, ///< not part of ABI/API\n}AVClassCategory;\n\n#define AV_IS_INPUT_DEVICE(category) \\\n    (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT) || \\\n     ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT) || \\\n     ((category) == AV_CLASS_CATEGORY_DEVICE_INPUT))\n\n#define AV_IS_OUTPUT_DEVICE(category) \\\n    (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT) || \\\n     ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT) || \\\n     ((category) == AV_CLASS_CATEGORY_DEVICE_OUTPUT))\n\nstruct AVOptionRanges;\n\n/**\n * Describe the class of an AVClass context structure. That is an\n * arbitrary struct of which the first field is a pointer to an\n * AVClass struct (e.g. AVCodecContext, AVFormatContext etc.).\n */\ntypedef struct AVClass {\n    /**\n     * The name of the class; usually it is the same name as the\n     * context structure type to which the AVClass is associated.\n     */\n    const char* class_name;\n\n    /**\n     * A pointer to a function which returns the name of a context\n     * instance ctx associated with the class.\n     */\n    const char* (*item_name)(void* ctx);\n\n    /**\n     * a pointer to the first option specified in the class if any or NULL\n     *\n     * @see av_set_default_options()\n     */\n    const struct AVOption *option;\n\n    /**\n     * LIBAVUTIL_VERSION with which this structure was created.\n     * This is used to allow fields to be added without requiring major\n     * version bumps everywhere.\n     */\n\n    int version;\n\n    /**\n     * Offset in the structure where log_level_offset is stored.\n     * 0 means there is no such variable\n     */\n    int log_level_offset_offset;\n\n    /**\n     * Offset in the structure where a pointer to the parent context for\n     * logging is stored. For example a decoder could pass its AVCodecContext\n     * to eval as such a parent context, which an av_log() implementation\n     * could then leverage to display the parent context.\n     * The offset can be NULL.\n     */\n    int parent_log_context_offset;\n\n    /**\n     * Return next AVOptions-enabled child or NULL\n     */\n    void* (*child_next)(void *obj, void *prev);\n\n    /**\n     * Return an AVClass corresponding to the next potential\n     * AVOptions-enabled child.\n     *\n     * The difference between child_next and this is that\n     * child_next iterates over _already existing_ objects, while\n     * child_class_next iterates over _all possible_ children.\n     */\n    const struct AVClass* (*child_class_next)(const struct AVClass *prev);\n\n    /**\n     * Category used for visualization (like color)\n     * This is only set if the category is equal for all objects using this class.\n     * available since version (51 << 16 | 56 << 8 | 100)\n     */\n    AVClassCategory category;\n\n    /**\n     * Callback to return the category.\n     * available since version (51 << 16 | 59 << 8 | 100)\n     */\n    AVClassCategory (*get_category)(void* ctx);\n\n    /**\n     * Callback to return the supported/allowed ranges.\n     * available since version (52.12)\n     */\n    int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);\n} AVClass;\n\n/**\n * @addtogroup lavu_log\n *\n * @{\n *\n * @defgroup lavu_log_constants Logging Constants\n *\n * @{\n */\n\n/**\n * Print no output.\n */\n#define AV_LOG_QUIET    -8\n\n/**\n * Something went really wrong and we will crash now.\n */\n#define AV_LOG_PANIC     0\n\n/**\n * Something went wrong and recovery is not possible.\n * For example, no header was found for a format which depends\n * on headers or an illegal combination of parameters is used.\n */\n#define AV_LOG_FATAL     8\n\n/**\n * Something went wrong and cannot losslessly be recovered.\n * However, not all future data is affected.\n */\n#define AV_LOG_ERROR    16\n\n/**\n * Something somehow does not look correct. This may or may not\n * lead to problems. An example would be the use of '-vstrict -2'.\n */\n#define AV_LOG_WARNING  24\n\n/**\n * Standard information.\n */\n#define AV_LOG_INFO     32\n\n/**\n * Detailed information.\n */\n#define AV_LOG_VERBOSE  40\n\n/**\n * Stuff which is only useful for libav* developers.\n */\n#define AV_LOG_DEBUG    48\n\n/**\n * Extremely verbose debugging, useful for libav* development.\n */\n#define AV_LOG_TRACE    56\n\n#define AV_LOG_MAX_OFFSET (AV_LOG_TRACE - AV_LOG_QUIET)\n\n/**\n * @}\n */\n\n/**\n * Sets additional colors for extended debugging sessions.\n * @code\n   av_log(ctx, AV_LOG_DEBUG|AV_LOG_C(134), \"Message in purple\\n\");\n   @endcode\n * Requires 256color terminal support. Uses outside debugging is not\n * recommended.\n */\n#define AV_LOG_C(x) ((x) << 8)\n\n/**\n * Send the specified message to the log if the level is less than or equal\n * to the current av_log_level. By default, all logging messages are sent to\n * stderr. This behavior can be altered by setting a different logging callback\n * function.\n * @see av_log_set_callback\n *\n * @param avcl A pointer to an arbitrary struct of which the first field is a\n *        pointer to an AVClass struct or NULL if general log.\n * @param level The importance level of the message expressed using a @ref\n *        lavu_log_constants \"Logging Constant\".\n * @param fmt The format string (printf-compatible) that specifies how\n *        subsequent arguments are converted to output.\n */\nvoid av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);\n\n\n/**\n * Send the specified message to the log if the level is less than or equal\n * to the current av_log_level. By default, all logging messages are sent to\n * stderr. This behavior can be altered by setting a different logging callback\n * function.\n * @see av_log_set_callback\n *\n * @param avcl A pointer to an arbitrary struct of which the first field is a\n *        pointer to an AVClass struct.\n * @param level The importance level of the message expressed using a @ref\n *        lavu_log_constants \"Logging Constant\".\n * @param fmt The format string (printf-compatible) that specifies how\n *        subsequent arguments are converted to output.\n * @param vl The arguments referenced by the format string.\n */\nvoid av_vlog(void *avcl, int level, const char *fmt, va_list vl);\n\n/**\n * Get the current log level\n *\n * @see lavu_log_constants\n *\n * @return Current log level\n */\nint av_log_get_level(void);\n\n/**\n * Set the log level\n *\n * @see lavu_log_constants\n *\n * @param level Logging level\n */\nvoid av_log_set_level(int level);\n\n/**\n * Set the logging callback\n *\n * @note The callback must be thread safe, even if the application does not use\n *       threads itself as some codecs are multithreaded.\n *\n * @see av_log_default_callback\n *\n * @param callback A logging function with a compatible signature.\n */\nvoid av_log_set_callback(void (*callback)(void*, int, const char*, va_list));\n\n/**\n * Default logging callback\n *\n * It prints the message to stderr, optionally colorizing it.\n *\n * @param avcl A pointer to an arbitrary struct of which the first field is a\n *        pointer to an AVClass struct.\n * @param level The importance level of the message expressed using a @ref\n *        lavu_log_constants \"Logging Constant\".\n * @param fmt The format string (printf-compatible) that specifies how\n *        subsequent arguments are converted to output.\n * @param vl The arguments referenced by the format string.\n */\nvoid av_log_default_callback(void *avcl, int level, const char *fmt,\n                             va_list vl);\n\n/**\n * Return the context name\n *\n * @param  ctx The AVClass context\n *\n * @return The AVClass class_name\n */\nconst char* av_default_item_name(void* ctx);\nAVClassCategory av_default_get_category(void *ptr);\n\n/**\n * Format a line of log the same way as the default callback.\n * @param line          buffer to receive the formatted line\n * @param line_size     size of the buffer\n * @param print_prefix  used to store whether the prefix must be printed;\n *                      must point to a persistent integer initially set to 1\n */\nvoid av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,\n                        char *line, int line_size, int *print_prefix);\n\n#if FF_API_DLOG\n/**\n * av_dlog macros\n * @deprecated unused\n * Useful to print debug messages that shouldn't get compiled in normally.\n */\n\n#ifdef DEBUG\n#    define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)\n#else\n#    define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)\n#endif\n#endif /* FF_API_DLOG */\n\n/**\n * Skip repeated messages, this requires the user app to use av_log() instead of\n * (f)printf as the 2 would otherwise interfere and lead to\n * \"Last message repeated x times\" messages below (f)printf messages with some\n * bad luck.\n * Also to receive the last, \"last repeated\" line if any, the user app must\n * call av_log(NULL, AV_LOG_QUIET, \"%s\", \"\"); at the end\n */\n#define AV_LOG_SKIP_REPEATED 1\n\n/**\n * Include the log severity in messages originating from codecs.\n *\n * Results in messages such as:\n * [rawvideo @ 0xDEADBEEF] [error] encode did not produce valid pts\n */\n#define AV_LOG_PRINT_LEVEL 2\n\nvoid av_log_set_flags(int arg);\nint av_log_get_flags(void);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_LOG_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/lzo.h",
    "content": "/*\n * LZO 1x decompression\n * copyright (c) 2006 Reimar Doeffinger\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_LZO_H\n#define AVUTIL_LZO_H\n\n/**\n * @defgroup lavu_lzo LZO\n * @ingroup lavu_crypto\n *\n * @{\n */\n\n#include <stdint.h>\n\n/** @name Error flags returned by av_lzo1x_decode\n * @{ */\n/// end of the input buffer reached before decoding finished\n#define AV_LZO_INPUT_DEPLETED  1\n/// decoded data did not fit into output buffer\n#define AV_LZO_OUTPUT_FULL     2\n/// a reference to previously decoded data was wrong\n#define AV_LZO_INVALID_BACKPTR 4\n/// a non-specific error in the compressed bitstream\n#define AV_LZO_ERROR           8\n/** @} */\n\n#define AV_LZO_INPUT_PADDING   8\n#define AV_LZO_OUTPUT_PADDING 12\n\n/**\n * @brief Decodes LZO 1x compressed data.\n * @param out output buffer\n * @param outlen size of output buffer, number of bytes left are returned here\n * @param in input buffer\n * @param inlen size of input buffer, number of bytes left are returned here\n * @return 0 on success, otherwise a combination of the error flags above\n *\n * Make sure all buffers are appropriately padded, in must provide\n * AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes.\n */\nint av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_LZO_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/macros.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * @ingroup lavu\n * Utility Preprocessor macros\n */\n\n#ifndef AVUTIL_MACROS_H\n#define AVUTIL_MACROS_H\n\n/**\n * @addtogroup preproc_misc Preprocessor String Macros\n *\n * String manipulation macros\n *\n * @{\n */\n\n#define AV_STRINGIFY(s)         AV_TOSTRING(s)\n#define AV_TOSTRING(s) #s\n\n#define AV_GLUE(a, b) a ## b\n#define AV_JOIN(a, b) AV_GLUE(a, b)\n\n/**\n * @}\n */\n\n#define AV_PRAGMA(s) _Pragma(#s)\n\n#endif /* AVUTIL_MACROS_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/mathematics.h",
    "content": "/*\n * copyright (c) 2005-2012 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_MATHEMATICS_H\n#define AVUTIL_MATHEMATICS_H\n\n#include <stdint.h>\n#include <math.h>\n#include \"attributes.h\"\n#include \"rational.h\"\n#include \"intfloat.h\"\n\n#ifndef M_E\n#define M_E            2.7182818284590452354   /* e */\n#endif\n#ifndef M_LN2\n#define M_LN2          0.69314718055994530942  /* log_e 2 */\n#endif\n#ifndef M_LN10\n#define M_LN10         2.30258509299404568402  /* log_e 10 */\n#endif\n#ifndef M_LOG2_10\n#define M_LOG2_10      3.32192809488736234787  /* log_2 10 */\n#endif\n#ifndef M_PHI\n#define M_PHI          1.61803398874989484820   /* phi / golden ratio */\n#endif\n#ifndef M_PI\n#define M_PI           3.14159265358979323846  /* pi */\n#endif\n#ifndef M_PI_2\n#define M_PI_2         1.57079632679489661923  /* pi/2 */\n#endif\n#ifndef M_SQRT1_2\n#define M_SQRT1_2      0.70710678118654752440  /* 1/sqrt(2) */\n#endif\n#ifndef M_SQRT2\n#define M_SQRT2        1.41421356237309504880  /* sqrt(2) */\n#endif\n#ifndef NAN\n#define NAN            av_int2float(0x7fc00000)\n#endif\n#ifndef INFINITY\n#define INFINITY       av_int2float(0x7f800000)\n#endif\n\n/**\n * @addtogroup lavu_math\n * @{\n */\n\n\nenum AVRounding {\n    AV_ROUND_ZERO     = 0, ///< Round toward zero.\n    AV_ROUND_INF      = 1, ///< Round away from zero.\n    AV_ROUND_DOWN     = 2, ///< Round toward -infinity.\n    AV_ROUND_UP       = 3, ///< Round toward +infinity.\n    AV_ROUND_NEAR_INF = 5, ///< Round to nearest and halfway cases away from zero.\n    AV_ROUND_PASS_MINMAX = 8192, ///< Flag to pass INT64_MIN/MAX through instead of rescaling, this avoids special cases for AV_NOPTS_VALUE\n};\n\n/**\n * Compute the greatest common divisor of a and b.\n *\n * @return gcd of a and b up to sign; if a >= 0 and b >= 0, return value is >= 0;\n * if a == 0 and b == 0, returns 0.\n */\nint64_t av_const av_gcd(int64_t a, int64_t b);\n\n/**\n * Rescale a 64-bit integer with rounding to nearest.\n * A simple a*b/c isn't possible as it can overflow.\n */\nint64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const;\n\n/**\n * Rescale a 64-bit integer with specified rounding.\n * A simple a*b/c isn't possible as it can overflow.\n *\n * @return rescaled value a, or if AV_ROUND_PASS_MINMAX is set and a is\n *         INT64_MIN or INT64_MAX then a is passed through unchanged.\n */\nint64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) av_const;\n\n/**\n * Rescale a 64-bit integer by 2 rational numbers.\n */\nint64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const;\n\n/**\n * Rescale a 64-bit integer by 2 rational numbers with specified rounding.\n *\n * @return rescaled value a, or if AV_ROUND_PASS_MINMAX is set and a is\n *         INT64_MIN or INT64_MAX then a is passed through unchanged.\n */\nint64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq,\n                         enum AVRounding) av_const;\n\n/**\n * Compare 2 timestamps each in its own timebases.\n * The result of the function is undefined if one of the timestamps\n * is outside the int64_t range when represented in the others timebase.\n * @return -1 if ts_a is before ts_b, 1 if ts_a is after ts_b or 0 if they represent the same position\n */\nint av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b);\n\n/**\n * Compare 2 integers modulo mod.\n * That is we compare integers a and b for which only the least\n * significant log2(mod) bits are known.\n *\n * @param mod must be a power of 2\n * @return a negative value if a is smaller than b\n *         a positive value if a is greater than b\n *         0                if a equals          b\n */\nint64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod);\n\n/**\n * Rescale a timestamp while preserving known durations.\n *\n * @param in_ts Input timestamp\n * @param in_tb Input timebase\n * @param fs_tb Duration and *last timebase\n * @param duration duration till the next call\n * @param out_tb Output timebase\n */\nint64_t av_rescale_delta(AVRational in_tb, int64_t in_ts,  AVRational fs_tb, int duration, int64_t *last, AVRational out_tb);\n\n/**\n * Add a value to a timestamp.\n *\n * This function guarantees that when the same value is repeatly added that\n * no accumulation of rounding errors occurs.\n *\n * @param ts Input timestamp\n * @param ts_tb Input timestamp timebase\n * @param inc value to add to ts\n * @param inc_tb inc timebase\n */\nint64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc);\n\n\n    /**\n * @}\n */\n\n#endif /* AVUTIL_MATHEMATICS_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/md5.h",
    "content": "/*\n * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_MD5_H\n#define AVUTIL_MD5_H\n\n#include <stdint.h>\n\n#include \"attributes.h\"\n#include \"version.h\"\n\n/**\n * @defgroup lavu_md5 MD5\n * @ingroup lavu_crypto\n * @{\n */\n\nextern const int av_md5_size;\n\nstruct AVMD5;\n\n/**\n * Allocate an AVMD5 context.\n */\nstruct AVMD5 *av_md5_alloc(void);\n\n/**\n * Initialize MD5 hashing.\n *\n * @param ctx pointer to the function context (of size av_md5_size)\n */\nvoid av_md5_init(struct AVMD5 *ctx);\n\n/**\n * Update hash value.\n *\n * @param ctx hash function context\n * @param src input data to update hash with\n * @param len input data length\n */\nvoid av_md5_update(struct AVMD5 *ctx, const uint8_t *src, int len);\n\n/**\n * Finish hashing and output digest value.\n *\n * @param ctx hash function context\n * @param dst buffer where output digest value is stored\n */\nvoid av_md5_final(struct AVMD5 *ctx, uint8_t *dst);\n\n/**\n * Hash an array of data.\n *\n * @param dst The output buffer to write the digest into\n * @param src The data to hash\n * @param len The length of the data, in bytes\n */\nvoid av_md5_sum(uint8_t *dst, const uint8_t *src, const int len);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_MD5_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/mem.h",
    "content": "/*\n * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * memory handling functions\n */\n\n#ifndef AVUTIL_MEM_H\n#define AVUTIL_MEM_H\n\n#include <limits.h>\n#include <stdint.h>\n\n#include \"attributes.h\"\n#include \"error.h\"\n#include \"avutil.h\"\n\n/**\n * @addtogroup lavu_mem\n * @{\n */\n\n\n#if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C)\n    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v\n    #define DECLARE_ASM_CONST(n,t,v)    const t __attribute__ ((aligned (n))) v\n#elif defined(__TI_COMPILER_VERSION__)\n    #define DECLARE_ALIGNED(n,t,v)                      \\\n        AV_PRAGMA(DATA_ALIGN(v,n))                      \\\n        t __attribute__((aligned(n))) v\n    #define DECLARE_ASM_CONST(n,t,v)                    \\\n        AV_PRAGMA(DATA_ALIGN(v,n))                      \\\n        static const t __attribute__((aligned(n))) v\n#elif defined(__GNUC__)\n    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v\n    #define DECLARE_ASM_CONST(n,t,v)    static const t av_used __attribute__ ((aligned (n))) v\n#elif defined(_MSC_VER)\n    #define DECLARE_ALIGNED(n,t,v)      __declspec(align(n)) t v\n    #define DECLARE_ASM_CONST(n,t,v)    __declspec(align(n)) static const t v\n#else\n    #define DECLARE_ALIGNED(n,t,v)      t v\n    #define DECLARE_ASM_CONST(n,t,v)    static const t v\n#endif\n\n#if AV_GCC_VERSION_AT_LEAST(3,1)\n    #define av_malloc_attrib __attribute__((__malloc__))\n#else\n    #define av_malloc_attrib\n#endif\n\n#if AV_GCC_VERSION_AT_LEAST(4,3)\n    #define av_alloc_size(...) __attribute__((alloc_size(__VA_ARGS__)))\n#else\n    #define av_alloc_size(...)\n#endif\n\n/**\n * Allocate a block of size bytes with alignment suitable for all\n * memory accesses (including vectors if available on the CPU).\n * @param size Size in bytes for the memory block to be allocated.\n * @return Pointer to the allocated block, NULL if the block cannot\n * be allocated.\n * @see av_mallocz()\n */\nvoid *av_malloc(size_t size) av_malloc_attrib av_alloc_size(1);\n\n/**\n * Allocate a block of size * nmemb bytes with av_malloc().\n * @param nmemb Number of elements\n * @param size Size of the single element\n * @return Pointer to the allocated block, NULL if the block cannot\n * be allocated.\n * @see av_malloc()\n */\nav_alloc_size(1, 2) static inline void *av_malloc_array(size_t nmemb, size_t size)\n{\n    if (!size || nmemb >= INT_MAX / size)\n        return NULL;\n    return av_malloc(nmemb * size);\n}\n\n/**\n * Allocate or reallocate a block of memory.\n * If ptr is NULL and size > 0, allocate a new block. If\n * size is zero, free the memory block pointed to by ptr.\n * @param ptr Pointer to a memory block already allocated with\n * av_realloc() or NULL.\n * @param size Size in bytes of the memory block to be allocated or\n * reallocated.\n * @return Pointer to a newly-reallocated block or NULL if the block\n * cannot be reallocated or the function is used to free the memory block.\n * @warning Pointers originating from the av_malloc() family of functions must\n *          not be passed to av_realloc(). The former can be implemented using\n *          memalign() (or other functions), and there is no guarantee that\n *          pointers from such functions can be passed to realloc() at all.\n *          The situation is undefined according to POSIX and may crash with\n *          some libc implementations.\n * @see av_fast_realloc()\n */\nvoid *av_realloc(void *ptr, size_t size) av_alloc_size(2);\n\n/**\n * Allocate or reallocate a block of memory.\n * This function does the same thing as av_realloc, except:\n * - It takes two arguments and checks the result of the multiplication for\n *   integer overflow.\n * - It frees the input block in case of failure, thus avoiding the memory\n *   leak with the classic \"buf = realloc(buf); if (!buf) return -1;\".\n */\nvoid *av_realloc_f(void *ptr, size_t nelem, size_t elsize);\n\n/**\n * Allocate or reallocate a block of memory.\n * If *ptr is NULL and size > 0, allocate a new block. If\n * size is zero, free the memory block pointed to by ptr.\n * @param   ptr Pointer to a pointer to a memory block already allocated\n *          with av_realloc(), or pointer to a pointer to NULL.\n *          The pointer is updated on success, or freed on failure.\n * @param   size Size in bytes for the memory block to be allocated or\n *          reallocated\n * @return  Zero on success, an AVERROR error code on failure.\n * @warning Pointers originating from the av_malloc() family of functions must\n *          not be passed to av_reallocp(). The former can be implemented using\n *          memalign() (or other functions), and there is no guarantee that\n *          pointers from such functions can be passed to realloc() at all.\n *          The situation is undefined according to POSIX and may crash with\n *          some libc implementations.\n */\nav_warn_unused_result\nint av_reallocp(void *ptr, size_t size);\n\n/**\n * Allocate or reallocate an array.\n * If ptr is NULL and nmemb > 0, allocate a new block. If\n * nmemb is zero, free the memory block pointed to by ptr.\n * @param ptr Pointer to a memory block already allocated with\n * av_realloc() or NULL.\n * @param nmemb Number of elements\n * @param size Size of the single element\n * @return Pointer to a newly-reallocated block or NULL if the block\n * cannot be reallocated or the function is used to free the memory block.\n * @warning Pointers originating from the av_malloc() family of functions must\n *          not be passed to av_realloc(). The former can be implemented using\n *          memalign() (or other functions), and there is no guarantee that\n *          pointers from such functions can be passed to realloc() at all.\n *          The situation is undefined according to POSIX and may crash with\n *          some libc implementations.\n */\nav_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size);\n\n/**\n * Allocate or reallocate an array through a pointer to a pointer.\n * If *ptr is NULL and nmemb > 0, allocate a new block. If\n * nmemb is zero, free the memory block pointed to by ptr.\n * @param ptr Pointer to a pointer to a memory block already allocated\n * with av_realloc(), or pointer to a pointer to NULL.\n * The pointer is updated on success, or freed on failure.\n * @param nmemb Number of elements\n * @param size Size of the single element\n * @return Zero on success, an AVERROR error code on failure.\n * @warning Pointers originating from the av_malloc() family of functions must\n *          not be passed to av_realloc(). The former can be implemented using\n *          memalign() (or other functions), and there is no guarantee that\n *          pointers from such functions can be passed to realloc() at all.\n *          The situation is undefined according to POSIX and may crash with\n *          some libc implementations.\n */\nav_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);\n\n/**\n * Free a memory block which has been allocated with av_malloc(z)() or\n * av_realloc().\n * @param ptr Pointer to the memory block which should be freed.\n * @note ptr = NULL is explicitly allowed.\n * @note It is recommended that you use av_freep() instead.\n * @see av_freep()\n */\nvoid av_free(void *ptr);\n\n/**\n * Allocate a block of size bytes with alignment suitable for all\n * memory accesses (including vectors if available on the CPU) and\n * zero all the bytes of the block.\n * @param size Size in bytes for the memory block to be allocated.\n * @return Pointer to the allocated block, NULL if it cannot be allocated.\n * @see av_malloc()\n */\nvoid *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1);\n\n/**\n * Allocate a block of nmemb * size bytes with alignment suitable for all\n * memory accesses (including vectors if available on the CPU) and\n * zero all the bytes of the block.\n * The allocation will fail if nmemb * size is greater than or equal\n * to INT_MAX.\n * @param nmemb\n * @param size\n * @return Pointer to the allocated block, NULL if it cannot be allocated.\n */\nvoid *av_calloc(size_t nmemb, size_t size) av_malloc_attrib;\n\n/**\n * Allocate a block of size * nmemb bytes with av_mallocz().\n * @param nmemb Number of elements\n * @param size Size of the single element\n * @return Pointer to the allocated block, NULL if the block cannot\n * be allocated.\n * @see av_mallocz()\n * @see av_malloc_array()\n */\nav_alloc_size(1, 2) static inline void *av_mallocz_array(size_t nmemb, size_t size)\n{\n    if (!size || nmemb >= INT_MAX / size)\n        return NULL;\n    return av_mallocz(nmemb * size);\n}\n\n/**\n * Duplicate the string s.\n * @param s string to be duplicated\n * @return Pointer to a newly-allocated string containing a\n * copy of s or NULL if the string cannot be allocated.\n */\nchar *av_strdup(const char *s) av_malloc_attrib;\n\n/**\n * Duplicate a substring of the string s.\n * @param s string to be duplicated\n * @param len the maximum length of the resulting string (not counting the\n *            terminating byte).\n * @return Pointer to a newly-allocated string containing a\n * copy of s or NULL if the string cannot be allocated.\n */\nchar *av_strndup(const char *s, size_t len) av_malloc_attrib;\n\n/**\n * Duplicate the buffer p.\n * @param p buffer to be duplicated\n * @return Pointer to a newly allocated buffer containing a\n * copy of p or NULL if the buffer cannot be allocated.\n */\nvoid *av_memdup(const void *p, size_t size);\n\n/**\n * Free a memory block which has been allocated with av_malloc(z)() or\n * av_realloc() and set the pointer pointing to it to NULL.\n * @param ptr Pointer to the pointer to the memory block which should\n * be freed.\n * @note passing a pointer to a NULL pointer is safe and leads to no action.\n * @see av_free()\n */\nvoid av_freep(void *ptr);\n\n/**\n * Add an element to a dynamic array.\n *\n * The array to grow is supposed to be an array of pointers to\n * structures, and the element to add must be a pointer to an already\n * allocated structure.\n *\n * The array is reallocated when its size reaches powers of 2.\n * Therefore, the amortized cost of adding an element is constant.\n *\n * In case of success, the pointer to the array is updated in order to\n * point to the new grown array, and the number pointed to by nb_ptr\n * is incremented.\n * In case of failure, the array is freed, *tab_ptr is set to NULL and\n * *nb_ptr is set to 0.\n *\n * @param tab_ptr pointer to the array to grow\n * @param nb_ptr  pointer to the number of elements in the array\n * @param elem    element to add\n * @see av_dynarray_add_nofree(), av_dynarray2_add()\n */\nvoid av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem);\n\n/**\n * Add an element to a dynamic array.\n *\n * Function has the same functionality as av_dynarray_add(),\n * but it doesn't free memory on fails. It returns error code\n * instead and leave current buffer untouched.\n *\n * @param tab_ptr pointer to the array to grow\n * @param nb_ptr  pointer to the number of elements in the array\n * @param elem    element to add\n * @return >=0 on success, negative otherwise.\n * @see av_dynarray_add(), av_dynarray2_add()\n */\nav_warn_unused_result\nint av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem);\n\n/**\n * Add an element of size elem_size to a dynamic array.\n *\n * The array is reallocated when its number of elements reaches powers of 2.\n * Therefore, the amortized cost of adding an element is constant.\n *\n * In case of success, the pointer to the array is updated in order to\n * point to the new grown array, and the number pointed to by nb_ptr\n * is incremented.\n * In case of failure, the array is freed, *tab_ptr is set to NULL and\n * *nb_ptr is set to 0.\n *\n * @param tab_ptr   pointer to the array to grow\n * @param nb_ptr    pointer to the number of elements in the array\n * @param elem_size size in bytes of the elements in the array\n * @param elem_data pointer to the data of the element to add. If NULL, the space of\n *                  the new added element is not filled.\n * @return          pointer to the data of the element to copy in the new allocated space.\n *                  If NULL, the new allocated space is left uninitialized.\"\n * @see av_dynarray_add(), av_dynarray_add_nofree()\n */\nvoid *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size,\n                       const uint8_t *elem_data);\n\n/**\n * Multiply two size_t values checking for overflow.\n * @return  0 if success, AVERROR(EINVAL) if overflow.\n */\nstatic inline int av_size_mult(size_t a, size_t b, size_t *r)\n{\n    size_t t = a * b;\n    /* Hack inspired from glibc: only try the division if nelem and elsize\n     * are both greater than sqrt(SIZE_MAX). */\n    if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b)\n        return AVERROR(EINVAL);\n    *r = t;\n    return 0;\n}\n\n/**\n * Set the maximum size that may me allocated in one block.\n */\nvoid av_max_alloc(size_t max);\n\n/**\n * deliberately overlapping memcpy implementation\n * @param dst destination buffer\n * @param back how many bytes back we start (the initial size of the overlapping window), must be > 0\n * @param cnt number of bytes to copy, must be >= 0\n *\n * cnt > back is valid, this will copy the bytes we just copied,\n * thus creating a repeating pattern with a period length of back.\n */\nvoid av_memcpy_backptr(uint8_t *dst, int back, int cnt);\n\n/**\n * Reallocate the given block if it is not large enough, otherwise do nothing.\n *\n * @see av_realloc\n */\nvoid *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);\n\n/**\n * Allocate a buffer, reusing the given one if large enough.\n *\n * Contrary to av_fast_realloc the current buffer contents might not be\n * preserved and on error the old buffer is freed, thus no special\n * handling to avoid memleaks is necessary.\n *\n * @param ptr pointer to pointer to already allocated buffer, overwritten with pointer to new buffer\n * @param size size of the buffer *ptr points to\n * @param min_size minimum size of *ptr buffer after returning, *ptr will be NULL and\n *                 *size 0 if an error occurred.\n */\nvoid av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);\n\n/**\n * Allocate a buffer, reusing the given one if large enough.\n *\n * All newly allocated space is initially cleared\n * Contrary to av_fast_realloc the current buffer contents might not be\n * preserved and on error the old buffer is freed, thus no special\n * handling to avoid memleaks is necessary.\n *\n * @param ptr pointer to pointer to already allocated buffer, overwritten with pointer to new buffer\n * @param size size of the buffer *ptr points to\n * @param min_size minimum size of *ptr buffer after returning, *ptr will be NULL and\n *                 *size 0 if an error occurred.\n */\nvoid av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_MEM_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/motion_vector.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_MOTION_VECTOR_H\n#define AVUTIL_MOTION_VECTOR_H\n\n#include <stdint.h>\n\ntypedef struct AVMotionVector {\n    /**\n     * Where the current macroblock comes from; negative value when it comes\n     * from the past, positive value when it comes from the future.\n     * XXX: set exact relative ref frame reference instead of a +/- 1 \"direction\".\n     */\n    int32_t source;\n    /**\n     * Width and height of the block.\n     */\n    uint8_t w, h;\n    /**\n     * Absolute source position. Can be outside the frame area.\n     */\n    int16_t src_x, src_y;\n    /**\n     * Absolute destination position. Can be outside the frame area.\n     */\n    int16_t dst_x, dst_y;\n    /**\n     * Extra flag information.\n     * Currently unused.\n     */\n    uint64_t flags;\n    /**\n     * Motion vector\n     * src_x = dst_x + motion_x / motion_scale\n     * src_y = dst_y + motion_y / motion_scale\n     */\n    int32_t motion_x, motion_y;\n    uint16_t motion_scale;\n} AVMotionVector;\n\n#endif /* AVUTIL_MOTION_VECTOR_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/murmur3.h",
    "content": "/*\n * Copyright (C) 2013 Reimar Döffinger <Reimar.Doeffinger@gmx.de>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_MURMUR3_H\n#define AVUTIL_MURMUR3_H\n\n#include <stdint.h>\n\nstruct AVMurMur3 *av_murmur3_alloc(void);\nvoid av_murmur3_init_seeded(struct AVMurMur3 *c, uint64_t seed);\nvoid av_murmur3_init(struct AVMurMur3 *c);\nvoid av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, int len);\nvoid av_murmur3_final(struct AVMurMur3 *c, uint8_t dst[16]);\n\n#endif /* AVUTIL_MURMUR3_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/opt.h",
    "content": "/*\n * AVOptions\n * copyright (c) 2005 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_OPT_H\n#define AVUTIL_OPT_H\n\n/**\n * @file\n * AVOptions\n */\n\n#include \"rational.h\"\n#include \"avutil.h\"\n#include \"dict.h\"\n#include \"log.h\"\n#include \"pixfmt.h\"\n#include \"samplefmt.h\"\n#include \"version.h\"\n\n/**\n * @defgroup avoptions AVOptions\n * @ingroup lavu_data\n * @{\n * AVOptions provide a generic system to declare options on arbitrary structs\n * (\"objects\"). An option can have a help text, a type and a range of possible\n * values. Options may then be enumerated, read and written to.\n *\n * @section avoptions_implement Implementing AVOptions\n * This section describes how to add AVOptions capabilities to a struct.\n *\n * All AVOptions-related information is stored in an AVClass. Therefore\n * the first member of the struct should be a pointer to an AVClass describing it.\n * The option field of the AVClass must be set to a NULL-terminated static array\n * of AVOptions. Each AVOption must have a non-empty name, a type, a default\n * value and for number-type AVOptions also a range of allowed values. It must\n * also declare an offset in bytes from the start of the struct, where the field\n * associated with this AVOption is located. Other fields in the AVOption struct\n * should also be set when applicable, but are not required.\n *\n * The following example illustrates an AVOptions-enabled struct:\n * @code\n * typedef struct test_struct {\n *     AVClass *class;\n *     int      int_opt;\n *     char    *str_opt;\n *     uint8_t *bin_opt;\n *     int      bin_len;\n * } test_struct;\n *\n * static const AVOption test_options[] = {\n *   { \"test_int\", \"This is a test option of int type.\", offsetof(test_struct, int_opt),\n *     AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX },\n *   { \"test_str\", \"This is a test option of string type.\", offsetof(test_struct, str_opt),\n *     AV_OPT_TYPE_STRING },\n *   { \"test_bin\", \"This is a test option of binary type.\", offsetof(test_struct, bin_opt),\n *     AV_OPT_TYPE_BINARY },\n *   { NULL },\n * };\n *\n * static const AVClass test_class = {\n *     .class_name = \"test class\",\n *     .item_name  = av_default_item_name,\n *     .option     = test_options,\n *     .version    = LIBAVUTIL_VERSION_INT,\n * };\n * @endcode\n *\n * Next, when allocating your struct, you must ensure that the AVClass pointer\n * is set to the correct value. Then, av_opt_set_defaults() can be called to\n * initialize defaults. After that the struct is ready to be used with the\n * AVOptions API.\n *\n * When cleaning up, you may use the av_opt_free() function to automatically\n * free all the allocated string and binary options.\n *\n * Continuing with the above example:\n *\n * @code\n * test_struct *alloc_test_struct(void)\n * {\n *     test_struct *ret = av_malloc(sizeof(*ret));\n *     ret->class = &test_class;\n *     av_opt_set_defaults(ret);\n *     return ret;\n * }\n * void free_test_struct(test_struct **foo)\n * {\n *     av_opt_free(*foo);\n *     av_freep(foo);\n * }\n * @endcode\n *\n * @subsection avoptions_implement_nesting Nesting\n *      It may happen that an AVOptions-enabled struct contains another\n *      AVOptions-enabled struct as a member (e.g. AVCodecContext in\n *      libavcodec exports generic options, while its priv_data field exports\n *      codec-specific options). In such a case, it is possible to set up the\n *      parent struct to export a child's options. To do that, simply\n *      implement AVClass.child_next() and AVClass.child_class_next() in the\n *      parent struct's AVClass.\n *      Assuming that the test_struct from above now also contains a\n *      child_struct field:\n *\n *      @code\n *      typedef struct child_struct {\n *          AVClass *class;\n *          int flags_opt;\n *      } child_struct;\n *      static const AVOption child_opts[] = {\n *          { \"test_flags\", \"This is a test option of flags type.\",\n *            offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX },\n *          { NULL },\n *      };\n *      static const AVClass child_class = {\n *          .class_name = \"child class\",\n *          .item_name  = av_default_item_name,\n *          .option     = child_opts,\n *          .version    = LIBAVUTIL_VERSION_INT,\n *      };\n *\n *      void *child_next(void *obj, void *prev)\n *      {\n *          test_struct *t = obj;\n *          if (!prev && t->child_struct)\n *              return t->child_struct;\n *          return NULL\n *      }\n *      const AVClass child_class_next(const AVClass *prev)\n *      {\n *          return prev ? NULL : &child_class;\n *      }\n *      @endcode\n *      Putting child_next() and child_class_next() as defined above into\n *      test_class will now make child_struct's options accessible through\n *      test_struct (again, proper setup as described above needs to be done on\n *      child_struct right after it is created).\n *\n *      From the above example it might not be clear why both child_next()\n *      and child_class_next() are needed. The distinction is that child_next()\n *      iterates over actually existing objects, while child_class_next()\n *      iterates over all possible child classes. E.g. if an AVCodecContext\n *      was initialized to use a codec which has private options, then its\n *      child_next() will return AVCodecContext.priv_data and finish\n *      iterating. OTOH child_class_next() on AVCodecContext.av_class will\n *      iterate over all available codecs with private options.\n *\n * @subsection avoptions_implement_named_constants Named constants\n *      It is possible to create named constants for options. Simply set the unit\n *      field of the option the constants should apply to a string and\n *      create the constants themselves as options of type AV_OPT_TYPE_CONST\n *      with their unit field set to the same string.\n *      Their default_val field should contain the value of the named\n *      constant.\n *      For example, to add some named constants for the test_flags option\n *      above, put the following into the child_opts array:\n *      @code\n *      { \"test_flags\", \"This is a test option of flags type.\",\n *        offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX, \"test_unit\" },\n *      { \"flag1\", \"This is a flag with value 16\", 0, AV_OPT_TYPE_CONST, { .i64 = 16 }, 0, 0, \"test_unit\" },\n *      @endcode\n *\n * @section avoptions_use Using AVOptions\n * This section deals with accessing options in an AVOptions-enabled struct.\n * Such structs in FFmpeg are e.g. AVCodecContext in libavcodec or\n * AVFormatContext in libavformat.\n *\n * @subsection avoptions_use_examine Examining AVOptions\n * The basic functions for examining options are av_opt_next(), which iterates\n * over all options defined for one object, and av_opt_find(), which searches\n * for an option with the given name.\n *\n * The situation is more complicated with nesting. An AVOptions-enabled struct\n * may have AVOptions-enabled children. Passing the AV_OPT_SEARCH_CHILDREN flag\n * to av_opt_find() will make the function search children recursively.\n *\n * For enumerating there are basically two cases. The first is when you want to\n * get all options that may potentially exist on the struct and its children\n * (e.g.  when constructing documentation). In that case you should call\n * av_opt_child_class_next() recursively on the parent struct's AVClass.  The\n * second case is when you have an already initialized struct with all its\n * children and you want to get all options that can be actually written or read\n * from it. In that case you should call av_opt_child_next() recursively (and\n * av_opt_next() on each result).\n *\n * @subsection avoptions_use_get_set Reading and writing AVOptions\n * When setting options, you often have a string read directly from the\n * user. In such a case, simply passing it to av_opt_set() is enough. For\n * non-string type options, av_opt_set() will parse the string according to the\n * option type.\n *\n * Similarly av_opt_get() will read any option type and convert it to a string\n * which will be returned. Do not forget that the string is allocated, so you\n * have to free it with av_free().\n *\n * In some cases it may be more convenient to put all options into an\n * AVDictionary and call av_opt_set_dict() on it. A specific case of this\n * are the format/codec open functions in lavf/lavc which take a dictionary\n * filled with option as a parameter. This makes it possible to set some options\n * that cannot be set otherwise, since e.g. the input file format is not known\n * before the file is actually opened.\n */\n\nenum AVOptionType{\n    AV_OPT_TYPE_FLAGS,\n    AV_OPT_TYPE_INT,\n    AV_OPT_TYPE_INT64,\n    AV_OPT_TYPE_DOUBLE,\n    AV_OPT_TYPE_FLOAT,\n    AV_OPT_TYPE_STRING,\n    AV_OPT_TYPE_RATIONAL,\n    AV_OPT_TYPE_BINARY,  ///< offset must point to a pointer immediately followed by an int for the length\n    AV_OPT_TYPE_DICT,\n    AV_OPT_TYPE_CONST = 128,\n    AV_OPT_TYPE_IMAGE_SIZE = MKBETAG('S','I','Z','E'), ///< offset must point to two consecutive integers\n    AV_OPT_TYPE_PIXEL_FMT  = MKBETAG('P','F','M','T'),\n    AV_OPT_TYPE_SAMPLE_FMT = MKBETAG('S','F','M','T'),\n    AV_OPT_TYPE_VIDEO_RATE = MKBETAG('V','R','A','T'), ///< offset must point to AVRational\n    AV_OPT_TYPE_DURATION   = MKBETAG('D','U','R',' '),\n    AV_OPT_TYPE_COLOR      = MKBETAG('C','O','L','R'),\n    AV_OPT_TYPE_CHANNEL_LAYOUT = MKBETAG('C','H','L','A'),\n    AV_OPT_TYPE_BOOL           = MKBETAG('B','O','O','L'),\n};\n\n/**\n * AVOption\n */\ntypedef struct AVOption {\n    const char *name;\n\n    /**\n     * short English help text\n     * @todo What about other languages?\n     */\n    const char *help;\n\n    /**\n     * The offset relative to the context structure where the option\n     * value is stored. It should be 0 for named constants.\n     */\n    int offset;\n    enum AVOptionType type;\n\n    /**\n     * the default value for scalar options\n     */\n    union {\n        int64_t i64;\n        double dbl;\n        const char *str;\n        /* TODO those are unused now */\n        AVRational q;\n    } default_val;\n    double min;                 ///< minimum valid value for the option\n    double max;                 ///< maximum valid value for the option\n\n    int flags;\n#define AV_OPT_FLAG_ENCODING_PARAM  1   ///< a generic parameter which can be set by the user for muxing or encoding\n#define AV_OPT_FLAG_DECODING_PARAM  2   ///< a generic parameter which can be set by the user for demuxing or decoding\n#if FF_API_OPT_TYPE_METADATA\n#define AV_OPT_FLAG_METADATA        4   ///< some data extracted or inserted into the file like title, comment, ...\n#endif\n#define AV_OPT_FLAG_AUDIO_PARAM     8\n#define AV_OPT_FLAG_VIDEO_PARAM     16\n#define AV_OPT_FLAG_SUBTITLE_PARAM  32\n/**\n * The option is inteded for exporting values to the caller.\n */\n#define AV_OPT_FLAG_EXPORT          64\n/**\n * The option may not be set through the AVOptions API, only read.\n * This flag only makes sense when AV_OPT_FLAG_EXPORT is also set.\n */\n#define AV_OPT_FLAG_READONLY        128\n#define AV_OPT_FLAG_FILTERING_PARAM (1<<16) ///< a generic parameter which can be set by the user for filtering\n//FIXME think about enc-audio, ... style flags\n\n    /**\n     * The logical unit to which the option belongs. Non-constant\n     * options and corresponding named constants share the same\n     * unit. May be NULL.\n     */\n    const char *unit;\n} AVOption;\n\n/**\n * A single allowed range of values, or a single allowed value.\n */\ntypedef struct AVOptionRange {\n    const char *str;\n    /**\n     * Value range.\n     * For string ranges this represents the min/max length.\n     * For dimensions this represents the min/max pixel count or width/height in multi-component case.\n     */\n    double value_min, value_max;\n    /**\n     * Value's component range.\n     * For string this represents the unicode range for chars, 0-127 limits to ASCII.\n     */\n    double component_min, component_max;\n    /**\n     * Range flag.\n     * If set to 1 the struct encodes a range, if set to 0 a single value.\n     */\n    int is_range;\n} AVOptionRange;\n\n/**\n * List of AVOptionRange structs.\n */\ntypedef struct AVOptionRanges {\n    /**\n     * Array of option ranges.\n     *\n     * Most of option types use just one component.\n     * Following describes multi-component option types:\n     *\n     * AV_OPT_TYPE_IMAGE_SIZE:\n     * component index 0: range of pixel count (width * height).\n     * component index 1: range of width.\n     * component index 2: range of height.\n     *\n     * @note To obtain multi-component version of this structure, user must\n     *       provide AV_OPT_MULTI_COMPONENT_RANGE to av_opt_query_ranges or\n     *       av_opt_query_ranges_default function.\n     *\n     * Multi-component range can be read as in following example:\n     *\n     * @code\n     * int range_index, component_index;\n     * AVOptionRanges *ranges;\n     * AVOptionRange *range[3]; //may require more than 3 in the future.\n     * av_opt_query_ranges(&ranges, obj, key, AV_OPT_MULTI_COMPONENT_RANGE);\n     * for (range_index = 0; range_index < ranges->nb_ranges; range_index++) {\n     *     for (component_index = 0; component_index < ranges->nb_components; component_index++)\n     *         range[component_index] = ranges->range[ranges->nb_ranges * component_index + range_index];\n     *     //do something with range here.\n     * }\n     * av_opt_freep_ranges(&ranges);\n     * @endcode\n     */\n    AVOptionRange **range;\n    /**\n     * Number of ranges per component.\n     */\n    int nb_ranges;\n    /**\n     * Number of componentes.\n     */\n    int nb_components;\n} AVOptionRanges;\n\n/**\n * Show the obj options.\n *\n * @param req_flags requested flags for the options to show. Show only the\n * options for which it is opt->flags & req_flags.\n * @param rej_flags rejected flags for the options to show. Show only the\n * options for which it is !(opt->flags & req_flags).\n * @param av_log_obj log context to use for showing the options\n */\nint av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags);\n\n/**\n * Set the values of all AVOption fields to their default values.\n *\n * @param s an AVOption-enabled struct (its first member must be a pointer to AVClass)\n */\nvoid av_opt_set_defaults(void *s);\n\n/**\n * Set the values of all AVOption fields to their default values. Only these\n * AVOption fields for which (opt->flags & mask) == flags will have their\n * default applied to s.\n *\n * @param s an AVOption-enabled struct (its first member must be a pointer to AVClass)\n * @param mask combination of AV_OPT_FLAG_*\n * @param flags combination of AV_OPT_FLAG_*\n */\nvoid av_opt_set_defaults2(void *s, int mask, int flags);\n\n/**\n * Parse the key/value pairs list in opts. For each key/value pair\n * found, stores the value in the field in ctx that is named like the\n * key. ctx must be an AVClass context, storing is done using\n * AVOptions.\n *\n * @param opts options string to parse, may be NULL\n * @param key_val_sep a 0-terminated list of characters used to\n * separate key from value\n * @param pairs_sep a 0-terminated list of characters used to separate\n * two pairs from each other\n * @return the number of successfully set key/value pairs, or a negative\n * value corresponding to an AVERROR code in case of error:\n * AVERROR(EINVAL) if opts cannot be parsed,\n * the error code issued by av_opt_set() if a key/value pair\n * cannot be set\n */\nint av_set_options_string(void *ctx, const char *opts,\n                          const char *key_val_sep, const char *pairs_sep);\n\n/**\n * Parse the key-value pairs list in opts. For each key=value pair found,\n * set the value of the corresponding option in ctx.\n *\n * @param ctx          the AVClass object to set options on\n * @param opts         the options string, key-value pairs separated by a\n *                     delimiter\n * @param shorthand    a NULL-terminated array of options names for shorthand\n *                     notation: if the first field in opts has no key part,\n *                     the key is taken from the first element of shorthand;\n *                     then again for the second, etc., until either opts is\n *                     finished, shorthand is finished or a named option is\n *                     found; after that, all options must be named\n * @param key_val_sep  a 0-terminated list of characters used to separate\n *                     key from value, for example '='\n * @param pairs_sep    a 0-terminated list of characters used to separate\n *                     two pairs from each other, for example ':' or ','\n * @return  the number of successfully set key=value pairs, or a negative\n *          value corresponding to an AVERROR code in case of error:\n *          AVERROR(EINVAL) if opts cannot be parsed,\n *          the error code issued by av_set_string3() if a key/value pair\n *          cannot be set\n *\n * Options names must use only the following characters: a-z A-Z 0-9 - . / _\n * Separators must use characters distinct from option names and from each\n * other.\n */\nint av_opt_set_from_string(void *ctx, const char *opts,\n                           const char *const *shorthand,\n                           const char *key_val_sep, const char *pairs_sep);\n/**\n * Free all allocated objects in obj.\n */\nvoid av_opt_free(void *obj);\n\n/**\n * Check whether a particular flag is set in a flags field.\n *\n * @param field_name the name of the flag field option\n * @param flag_name the name of the flag to check\n * @return non-zero if the flag is set, zero if the flag isn't set,\n *         isn't of the right type, or the flags field doesn't exist.\n */\nint av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name);\n\n/**\n * Set all the options from a given dictionary on an object.\n *\n * @param obj a struct whose first element is a pointer to AVClass\n * @param options options to process. This dictionary will be freed and replaced\n *                by a new one containing all options not found in obj.\n *                Of course this new dictionary needs to be freed by caller\n *                with av_dict_free().\n *\n * @return 0 on success, a negative AVERROR if some option was found in obj,\n *         but could not be set.\n *\n * @see av_dict_copy()\n */\nint av_opt_set_dict(void *obj, struct AVDictionary **options);\n\n\n/**\n * Set all the options from a given dictionary on an object.\n *\n * @param obj a struct whose first element is a pointer to AVClass\n * @param options options to process. This dictionary will be freed and replaced\n *                by a new one containing all options not found in obj.\n *                Of course this new dictionary needs to be freed by caller\n *                with av_dict_free().\n * @param search_flags A combination of AV_OPT_SEARCH_*.\n *\n * @return 0 on success, a negative AVERROR if some option was found in obj,\n *         but could not be set.\n *\n * @see av_dict_copy()\n */\nint av_opt_set_dict2(void *obj, struct AVDictionary **options, int search_flags);\n\n/**\n * Extract a key-value pair from the beginning of a string.\n *\n * @param ropts        pointer to the options string, will be updated to\n *                     point to the rest of the string (one of the pairs_sep\n *                     or the final NUL)\n * @param key_val_sep  a 0-terminated list of characters used to separate\n *                     key from value, for example '='\n * @param pairs_sep    a 0-terminated list of characters used to separate\n *                     two pairs from each other, for example ':' or ','\n * @param flags        flags; see the AV_OPT_FLAG_* values below\n * @param rkey         parsed key; must be freed using av_free()\n * @param rval         parsed value; must be freed using av_free()\n *\n * @return  >=0 for success, or a negative value corresponding to an\n *          AVERROR code in case of error; in particular:\n *          AVERROR(EINVAL) if no key is present\n *\n */\nint av_opt_get_key_value(const char **ropts,\n                         const char *key_val_sep, const char *pairs_sep,\n                         unsigned flags,\n                         char **rkey, char **rval);\n\nenum {\n\n    /**\n     * Accept to parse a value without a key; the key will then be returned\n     * as NULL.\n     */\n    AV_OPT_FLAG_IMPLICIT_KEY = 1,\n};\n\n/**\n * @defgroup opt_eval_funcs Evaluating option strings\n * @{\n * This group of functions can be used to evaluate option strings\n * and get numbers out of them. They do the same thing as av_opt_set(),\n * except the result is written into the caller-supplied pointer.\n *\n * @param obj a struct whose first element is a pointer to AVClass.\n * @param o an option for which the string is to be evaluated.\n * @param val string to be evaluated.\n * @param *_out value of the string will be written here.\n *\n * @return 0 on success, a negative number on failure.\n */\nint av_opt_eval_flags (void *obj, const AVOption *o, const char *val, int        *flags_out);\nint av_opt_eval_int   (void *obj, const AVOption *o, const char *val, int        *int_out);\nint av_opt_eval_int64 (void *obj, const AVOption *o, const char *val, int64_t    *int64_out);\nint av_opt_eval_float (void *obj, const AVOption *o, const char *val, float      *float_out);\nint av_opt_eval_double(void *obj, const AVOption *o, const char *val, double     *double_out);\nint av_opt_eval_q     (void *obj, const AVOption *o, const char *val, AVRational *q_out);\n/**\n * @}\n */\n\n#define AV_OPT_SEARCH_CHILDREN   (1 << 0) /**< Search in possible children of the\n                                               given object first. */\n/**\n *  The obj passed to av_opt_find() is fake -- only a double pointer to AVClass\n *  instead of a required pointer to a struct containing AVClass. This is\n *  useful for searching for options without needing to allocate the corresponding\n *  object.\n */\n#define AV_OPT_SEARCH_FAKE_OBJ   (1 << 1)\n\n/**\n *  In av_opt_get, return NULL if the option has a pointer type and is set to NULL,\n *  rather than returning an empty string.\n */\n#define AV_OPT_ALLOW_NULL (1 << 2)\n\n/**\n *  Allows av_opt_query_ranges and av_opt_query_ranges_default to return more than\n *  one component for certain option types.\n *  @see AVOptionRanges for details.\n */\n#define AV_OPT_MULTI_COMPONENT_RANGE (1 << 12)\n\n/**\n * Look for an option in an object. Consider only options which\n * have all the specified flags set.\n *\n * @param[in] obj A pointer to a struct whose first element is a\n *                pointer to an AVClass.\n *                Alternatively a double pointer to an AVClass, if\n *                AV_OPT_SEARCH_FAKE_OBJ search flag is set.\n * @param[in] name The name of the option to look for.\n * @param[in] unit When searching for named constants, name of the unit\n *                 it belongs to.\n * @param opt_flags Find only options with all the specified flags set (AV_OPT_FLAG).\n * @param search_flags A combination of AV_OPT_SEARCH_*.\n *\n * @return A pointer to the option found, or NULL if no option\n *         was found.\n *\n * @note Options found with AV_OPT_SEARCH_CHILDREN flag may not be settable\n * directly with av_opt_set(). Use special calls which take an options\n * AVDictionary (e.g. avformat_open_input()) to set options found with this\n * flag.\n */\nconst AVOption *av_opt_find(void *obj, const char *name, const char *unit,\n                            int opt_flags, int search_flags);\n\n/**\n * Look for an option in an object. Consider only options which\n * have all the specified flags set.\n *\n * @param[in] obj A pointer to a struct whose first element is a\n *                pointer to an AVClass.\n *                Alternatively a double pointer to an AVClass, if\n *                AV_OPT_SEARCH_FAKE_OBJ search flag is set.\n * @param[in] name The name of the option to look for.\n * @param[in] unit When searching for named constants, name of the unit\n *                 it belongs to.\n * @param opt_flags Find only options with all the specified flags set (AV_OPT_FLAG).\n * @param search_flags A combination of AV_OPT_SEARCH_*.\n * @param[out] target_obj if non-NULL, an object to which the option belongs will be\n * written here. It may be different from obj if AV_OPT_SEARCH_CHILDREN is present\n * in search_flags. This parameter is ignored if search_flags contain\n * AV_OPT_SEARCH_FAKE_OBJ.\n *\n * @return A pointer to the option found, or NULL if no option\n *         was found.\n */\nconst AVOption *av_opt_find2(void *obj, const char *name, const char *unit,\n                             int opt_flags, int search_flags, void **target_obj);\n\n/**\n * Iterate over all AVOptions belonging to obj.\n *\n * @param obj an AVOptions-enabled struct or a double pointer to an\n *            AVClass describing it.\n * @param prev result of the previous call to av_opt_next() on this object\n *             or NULL\n * @return next AVOption or NULL\n */\nconst AVOption *av_opt_next(const void *obj, const AVOption *prev);\n\n/**\n * Iterate over AVOptions-enabled children of obj.\n *\n * @param prev result of a previous call to this function or NULL\n * @return next AVOptions-enabled child or NULL\n */\nvoid *av_opt_child_next(void *obj, void *prev);\n\n/**\n * Iterate over potential AVOptions-enabled children of parent.\n *\n * @param prev result of a previous call to this function or NULL\n * @return AVClass corresponding to next potential child or NULL\n */\nconst AVClass *av_opt_child_class_next(const AVClass *parent, const AVClass *prev);\n\n/**\n * @defgroup opt_set_funcs Option setting functions\n * @{\n * Those functions set the field of obj with the given name to value.\n *\n * @param[in] obj A struct whose first element is a pointer to an AVClass.\n * @param[in] name the name of the field to set\n * @param[in] val The value to set. In case of av_opt_set() if the field is not\n * of a string type, then the given string is parsed.\n * SI postfixes and some named scalars are supported.\n * If the field is of a numeric type, it has to be a numeric or named\n * scalar. Behavior with more than one scalar and +- infix operators\n * is undefined.\n * If the field is of a flags type, it has to be a sequence of numeric\n * scalars or named flags separated by '+' or '-'. Prefixing a flag\n * with '+' causes it to be set without affecting the other flags;\n * similarly, '-' unsets a flag.\n * @param search_flags flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN\n * is passed here, then the option may be set on a child of obj.\n *\n * @return 0 if the value has been set, or an AVERROR code in case of\n * error:\n * AVERROR_OPTION_NOT_FOUND if no matching option exists\n * AVERROR(ERANGE) if the value is out of range\n * AVERROR(EINVAL) if the value is not valid\n */\nint av_opt_set         (void *obj, const char *name, const char *val, int search_flags);\nint av_opt_set_int     (void *obj, const char *name, int64_t     val, int search_flags);\nint av_opt_set_double  (void *obj, const char *name, double      val, int search_flags);\nint av_opt_set_q       (void *obj, const char *name, AVRational  val, int search_flags);\nint av_opt_set_bin     (void *obj, const char *name, const uint8_t *val, int size, int search_flags);\nint av_opt_set_image_size(void *obj, const char *name, int w, int h, int search_flags);\nint av_opt_set_pixel_fmt (void *obj, const char *name, enum AVPixelFormat fmt, int search_flags);\nint av_opt_set_sample_fmt(void *obj, const char *name, enum AVSampleFormat fmt, int search_flags);\nint av_opt_set_video_rate(void *obj, const char *name, AVRational val, int search_flags);\nint av_opt_set_channel_layout(void *obj, const char *name, int64_t ch_layout, int search_flags);\n/**\n * @note Any old dictionary present is discarded and replaced with a copy of the new one. The\n * caller still owns val is and responsible for freeing it.\n */\nint av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, int search_flags);\n\n/**\n * Set a binary option to an integer list.\n *\n * @param obj    AVClass object to set options on\n * @param name   name of the binary option\n * @param val    pointer to an integer list (must have the correct type with\n *               regard to the contents of the list)\n * @param term   list terminator (usually 0 or -1)\n * @param flags  search flags\n */\n#define av_opt_set_int_list(obj, name, val, term, flags) \\\n    (av_int_list_length(val, term) > INT_MAX / sizeof(*(val)) ? \\\n     AVERROR(EINVAL) : \\\n     av_opt_set_bin(obj, name, (const uint8_t *)(val), \\\n                    av_int_list_length(val, term) * sizeof(*(val)), flags))\n\n/**\n * @}\n */\n\n/**\n * @defgroup opt_get_funcs Option getting functions\n * @{\n * Those functions get a value of the option with the given name from an object.\n *\n * @param[in] obj a struct whose first element is a pointer to an AVClass.\n * @param[in] name name of the option to get.\n * @param[in] search_flags flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN\n * is passed here, then the option may be found in a child of obj.\n * @param[out] out_val value of the option will be written here\n * @return >=0 on success, a negative error code otherwise\n */\n/**\n * @note the returned string will be av_malloc()ed and must be av_free()ed by the caller\n *\n * @note if AV_OPT_ALLOW_NULL is set in search_flags in av_opt_get, and the option has\n * AV_OPT_TYPE_STRING or AV_OPT_TYPE_BINARY and is set to NULL, *out_val will be set\n * to NULL instead of an allocated empty string.\n */\nint av_opt_get         (void *obj, const char *name, int search_flags, uint8_t   **out_val);\nint av_opt_get_int     (void *obj, const char *name, int search_flags, int64_t    *out_val);\nint av_opt_get_double  (void *obj, const char *name, int search_flags, double     *out_val);\nint av_opt_get_q       (void *obj, const char *name, int search_flags, AVRational *out_val);\nint av_opt_get_image_size(void *obj, const char *name, int search_flags, int *w_out, int *h_out);\nint av_opt_get_pixel_fmt (void *obj, const char *name, int search_flags, enum AVPixelFormat *out_fmt);\nint av_opt_get_sample_fmt(void *obj, const char *name, int search_flags, enum AVSampleFormat *out_fmt);\nint av_opt_get_video_rate(void *obj, const char *name, int search_flags, AVRational *out_val);\nint av_opt_get_channel_layout(void *obj, const char *name, int search_flags, int64_t *ch_layout);\n/**\n * @param[out] out_val The returned dictionary is a copy of the actual value and must\n * be freed with av_dict_free() by the caller\n */\nint av_opt_get_dict_val(void *obj, const char *name, int search_flags, AVDictionary **out_val);\n/**\n * @}\n */\n/**\n * Gets a pointer to the requested field in a struct.\n * This function allows accessing a struct even when its fields are moved or\n * renamed since the application making the access has been compiled,\n *\n * @returns a pointer to the field, it can be cast to the correct type and read\n *          or written to.\n */\nvoid *av_opt_ptr(const AVClass *avclass, void *obj, const char *name);\n\n/**\n * Free an AVOptionRanges struct and set it to NULL.\n */\nvoid av_opt_freep_ranges(AVOptionRanges **ranges);\n\n/**\n * Get a list of allowed ranges for the given option.\n *\n * The returned list may depend on other fields in obj like for example profile.\n *\n * @param flags is a bitmask of flags, undefined flags should not be set and should be ignored\n *              AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance\n *              AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges\n *\n * The result must be freed with av_opt_freep_ranges.\n *\n * @return number of compontents returned on success, a negative errro code otherwise\n */\nint av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags);\n\n/**\n * Copy options from src object into dest object.\n *\n * Options that require memory allocation (e.g. string or binary) are malloc'ed in dest object.\n * Original memory allocated for such options is freed unless both src and dest options points to the same memory.\n *\n * @param dest Object to copy from\n * @param src  Object to copy into\n * @return 0 on success, negative on error\n */\nint av_opt_copy(void *dest, const void *src);\n\n/**\n * Get a default list of allowed ranges for the given option.\n *\n * This list is constructed without using the AVClass.query_ranges() callback\n * and can be used as fallback from within the callback.\n *\n * @param flags is a bitmask of flags, undefined flags should not be set and should be ignored\n *              AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance\n *              AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges\n *\n * The result must be freed with av_opt_free_ranges.\n *\n * @return number of compontents returned on success, a negative errro code otherwise\n */\nint av_opt_query_ranges_default(AVOptionRanges **, void *obj, const char *key, int flags);\n\n/**\n * Check if given option is set to its default value.\n *\n * Options o must belong to the obj. This function must not be called to check child's options state.\n * @see av_opt_is_set_to_default_by_name().\n *\n * @param obj  AVClass object to check option on\n * @param o    option to be checked\n * @return     >0 when option is set to its default,\n *              0 when option is not set its default,\n *             <0 on error\n */\nint av_opt_is_set_to_default(void *obj, const AVOption *o);\n\n/**\n * Check if given option is set to its default value.\n *\n * @param obj          AVClass object to check option on\n * @param name         option name\n * @param search_flags combination of AV_OPT_SEARCH_*\n * @return             >0 when option is set to its default,\n *                     0 when option is not set its default,\n *                     <0 on error\n */\nint av_opt_is_set_to_default_by_name(void *obj, const char *name, int search_flags);\n\n\n#define AV_OPT_SERIALIZE_SKIP_DEFAULTS              0x00000001  ///< Serialize options that are not set to default values only.\n#define AV_OPT_SERIALIZE_OPT_FLAGS_EXACT            0x00000002  ///< Serialize options that exactly match opt_flags only.\n\n/**\n * Serialize object's options.\n *\n * Create a string containing object's serialized options.\n * Such string may be passed back to av_opt_set_from_string() in order to restore option values.\n * A key/value or pairs separator occurring in the serialized value or\n * name string are escaped through the av_escape() function.\n *\n * @param[in]  obj           AVClass object to serialize\n * @param[in]  opt_flags     serialize options with all the specified flags set (AV_OPT_FLAG)\n * @param[in]  flags         combination of AV_OPT_SERIALIZE_* flags\n * @param[out] buffer        Pointer to buffer that will be allocated with string containg serialized options.\n *                           Buffer must be freed by the caller when is no longer needed.\n * @param[in]  key_val_sep   character used to separate key from value\n * @param[in]  pairs_sep     character used to separate two pairs from each other\n * @return                   >= 0 on success, negative on error\n * @warning Separators cannot be neither '\\\\' nor '\\0'. They also cannot be the same.\n */\nint av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer,\n                     const char key_val_sep, const char pairs_sep);\n/**\n * @}\n */\n\n#endif /* AVUTIL_OPT_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/parseutils.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_PARSEUTILS_H\n#define AVUTIL_PARSEUTILS_H\n\n#include <time.h>\n\n#include \"rational.h\"\n\n/**\n * @file\n * misc parsing utilities\n */\n\n/**\n * Parse str and store the parsed ratio in q.\n *\n * Note that a ratio with infinite (1/0) or negative value is\n * considered valid, so you should check on the returned value if you\n * want to exclude those values.\n *\n * The undefined value can be expressed using the \"0:0\" string.\n *\n * @param[in,out] q pointer to the AVRational which will contain the ratio\n * @param[in] str the string to parse: it has to be a string in the format\n * num:den, a float number or an expression\n * @param[in] max the maximum allowed numerator and denominator\n * @param[in] log_offset log level offset which is applied to the log\n * level of log_ctx\n * @param[in] log_ctx parent logging context\n * @return >= 0 on success, a negative error code otherwise\n */\nint av_parse_ratio(AVRational *q, const char *str, int max,\n                   int log_offset, void *log_ctx);\n\n#define av_parse_ratio_quiet(rate, str, max) \\\n    av_parse_ratio(rate, str, max, AV_LOG_MAX_OFFSET, NULL)\n\n/**\n * Parse str and put in width_ptr and height_ptr the detected values.\n *\n * @param[in,out] width_ptr pointer to the variable which will contain the detected\n * width value\n * @param[in,out] height_ptr pointer to the variable which will contain the detected\n * height value\n * @param[in] str the string to parse: it has to be a string in the format\n * width x height or a valid video size abbreviation.\n * @return >= 0 on success, a negative error code otherwise\n */\nint av_parse_video_size(int *width_ptr, int *height_ptr, const char *str);\n\n/**\n * Parse str and store the detected values in *rate.\n *\n * @param[in,out] rate pointer to the AVRational which will contain the detected\n * frame rate\n * @param[in] str the string to parse: it has to be a string in the format\n * rate_num / rate_den, a float number or a valid video rate abbreviation\n * @return >= 0 on success, a negative error code otherwise\n */\nint av_parse_video_rate(AVRational *rate, const char *str);\n\n/**\n * Put the RGBA values that correspond to color_string in rgba_color.\n *\n * @param color_string a string specifying a color. It can be the name of\n * a color (case insensitive match) or a [0x|#]RRGGBB[AA] sequence,\n * possibly followed by \"@\" and a string representing the alpha\n * component.\n * The alpha component may be a string composed by \"0x\" followed by an\n * hexadecimal number or a decimal number between 0.0 and 1.0, which\n * represents the opacity value (0x00/0.0 means completely transparent,\n * 0xff/1.0 completely opaque).\n * If the alpha component is not specified then 0xff is assumed.\n * The string \"random\" will result in a random color.\n * @param slen length of the initial part of color_string containing the\n * color. It can be set to -1 if color_string is a null terminated string\n * containing nothing else than the color.\n * @return >= 0 in case of success, a negative value in case of\n * failure (for example if color_string cannot be parsed).\n */\nint av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,\n                   void *log_ctx);\n\n/**\n * Get the name of a color from the internal table of hard-coded named\n * colors.\n *\n * This function is meant to enumerate the color names recognized by\n * av_parse_color().\n *\n * @param color_idx index of the requested color, starting from 0\n * @param rgbp      if not NULL, will point to a 3-elements array with the color value in RGB\n * @return the color name string or NULL if color_idx is not in the array\n */\nconst char *av_get_known_color_name(int color_idx, const uint8_t **rgb);\n\n/**\n * Parse timestr and return in *time a corresponding number of\n * microseconds.\n *\n * @param timeval puts here the number of microseconds corresponding\n * to the string in timestr. If the string represents a duration, it\n * is the number of microseconds contained in the time interval.  If\n * the string is a date, is the number of microseconds since 1st of\n * January, 1970 up to the time of the parsed date.  If timestr cannot\n * be successfully parsed, set *time to INT64_MIN.\n\n * @param timestr a string representing a date or a duration.\n * - If a date the syntax is:\n * @code\n * [{YYYY-MM-DD|YYYYMMDD}[T|t| ]]{{HH:MM:SS[.m...]]]}|{HHMMSS[.m...]]]}}[Z]\n * now\n * @endcode\n * If the value is \"now\" it takes the current time.\n * Time is local time unless Z is appended, in which case it is\n * interpreted as UTC.\n * If the year-month-day part is not specified it takes the current\n * year-month-day.\n * - If a duration the syntax is:\n * @code\n * [-][HH:]MM:SS[.m...]\n * [-]S+[.m...]\n * @endcode\n * @param duration flag which tells how to interpret timestr, if not\n * zero timestr is interpreted as a duration, otherwise as a date\n * @return >= 0 in case of success, a negative value corresponding to an\n * AVERROR code otherwise\n */\nint av_parse_time(int64_t *timeval, const char *timestr, int duration);\n\n/**\n * Attempt to find a specific tag in a URL.\n *\n * syntax: '?tag1=val1&tag2=val2...'. Little URL decoding is done.\n * Return 1 if found.\n */\nint av_find_info_tag(char *arg, int arg_size, const char *tag1, const char *info);\n\n/**\n * Simplified version of strptime\n *\n * Parse the input string p according to the format string fmt and\n * store its results in the structure dt.\n * This implementation supports only a subset of the formats supported\n * by the standard strptime().\n *\n * The supported input field descriptors are listed below.\n * - %H: the hour as a decimal number, using a 24-hour clock, in the\n *   range '00' through '23'\n * - %J: hours as a decimal number, in the range '0' through INT_MAX\n * - %M: the minute as a decimal number, using a 24-hour clock, in the\n *   range '00' through '59'\n * - %S: the second as a decimal number, using a 24-hour clock, in the\n *   range '00' through '59'\n * - %Y: the year as a decimal number, using the Gregorian calendar\n * - %m: the month as a decimal number, in the range '1' through '12'\n * - %d: the day of the month as a decimal number, in the range '1'\n *   through '31'\n * - %T: alias for '%H:%M:%S'\n * - %%: a literal '%'\n *\n * @return a pointer to the first character not processed in this function\n *         call. In case the input string contains more characters than\n *         required by the format string the return value points right after\n *         the last consumed input character. In case the whole input string\n *         is consumed the return value points to the null byte at the end of\n *         the string. On failure NULL is returned.\n */\nchar *av_small_strptime(const char *p, const char *fmt, struct tm *dt);\n\n/**\n * Convert the decomposed UTC time in tm to a time_t value.\n */\ntime_t av_timegm(struct tm *tm);\n\n#endif /* AVUTIL_PARSEUTILS_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/pixdesc.h",
    "content": "/*\n * pixel format descriptor\n * Copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_PIXDESC_H\n#define AVUTIL_PIXDESC_H\n\n#include <inttypes.h>\n\n#include \"attributes.h\"\n#include \"pixfmt.h\"\n#include \"version.h\"\n\ntypedef struct AVComponentDescriptor {\n    /**\n     * Which of the 4 planes contains the component.\n     */\n    int plane;\n\n    /**\n     * Number of elements between 2 horizontally consecutive pixels.\n     * Elements are bits for bitstream formats, bytes otherwise.\n     */\n    int step;\n\n    /**\n     * Number of elements before the component of the first pixel.\n     * Elements are bits for bitstream formats, bytes otherwise.\n     */\n    int offset;\n\n    /**\n     * Number of least significant bits that must be shifted away\n     * to get the value.\n     */\n    int shift;\n\n    /**\n     * Number of bits in the component.\n     */\n    int depth;\n\n#if FF_API_PLUS1_MINUS1\n    /** deprecated, use step instead */\n    attribute_deprecated int step_minus1;\n\n    /** deprecated, use depth instead */\n    attribute_deprecated int depth_minus1;\n\n    /** deprecated, use offset instead */\n    attribute_deprecated int offset_plus1;\n#endif\n} AVComponentDescriptor;\n\n/**\n * Descriptor that unambiguously describes how the bits of a pixel are\n * stored in the up to 4 data planes of an image. It also stores the\n * subsampling factors and number of components.\n *\n * @note This is separate of the colorspace (RGB, YCbCr, YPbPr, JPEG-style YUV\n *       and all the YUV variants) AVPixFmtDescriptor just stores how values\n *       are stored not what these values represent.\n */\ntypedef struct AVPixFmtDescriptor {\n    const char *name;\n    uint8_t nb_components;  ///< The number of components each pixel has, (1-4)\n\n    /**\n     * Amount to shift the luma width right to find the chroma width.\n     * For YV12 this is 1 for example.\n     * chroma_width = -((-luma_width) >> log2_chroma_w)\n     * The note above is needed to ensure rounding up.\n     * This value only refers to the chroma components.\n     */\n    uint8_t log2_chroma_w;  ///< chroma_width = -((-luma_width )>>log2_chroma_w)\n\n    /**\n     * Amount to shift the luma height right to find the chroma height.\n     * For YV12 this is 1 for example.\n     * chroma_height= -((-luma_height) >> log2_chroma_h)\n     * The note above is needed to ensure rounding up.\n     * This value only refers to the chroma components.\n     */\n    uint8_t log2_chroma_h;\n\n    /**\n     * Combination of AV_PIX_FMT_FLAG_... flags.\n     */\n    uint64_t flags;\n\n    /**\n     * Parameters that describe how pixels are packed.\n     * If the format has 1 or 2 components, then luma is 0.\n     * If the format has 3 or 4 components:\n     *   if the RGB flag is set then 0 is red, 1 is green and 2 is blue;\n     *   otherwise 0 is luma, 1 is chroma-U and 2 is chroma-V.\n     *\n     * If present, the Alpha channel is always the last component.\n     */\n    AVComponentDescriptor comp[4];\n\n    /**\n     * Alternative comma-separated names.\n     */\n    const char *alias;\n} AVPixFmtDescriptor;\n\n/**\n * Pixel format is big-endian.\n */\n#define AV_PIX_FMT_FLAG_BE           (1 << 0)\n/**\n * Pixel format has a palette in data[1], values are indexes in this palette.\n */\n#define AV_PIX_FMT_FLAG_PAL          (1 << 1)\n/**\n * All values of a component are bit-wise packed end to end.\n */\n#define AV_PIX_FMT_FLAG_BITSTREAM    (1 << 2)\n/**\n * Pixel format is an HW accelerated format.\n */\n#define AV_PIX_FMT_FLAG_HWACCEL      (1 << 3)\n/**\n * At least one pixel component is not in the first data plane.\n */\n#define AV_PIX_FMT_FLAG_PLANAR       (1 << 4)\n/**\n * The pixel format contains RGB-like data (as opposed to YUV/grayscale).\n */\n#define AV_PIX_FMT_FLAG_RGB          (1 << 5)\n\n/**\n * The pixel format is \"pseudo-paletted\". This means that it contains a\n * fixed palette in the 2nd plane but the palette is fixed/constant for each\n * PIX_FMT. This allows interpreting the data as if it was PAL8, which can\n * in some cases be simpler. Or the data can be interpreted purely based on\n * the pixel format without using the palette.\n * An example of a pseudo-paletted format is AV_PIX_FMT_GRAY8\n */\n#define AV_PIX_FMT_FLAG_PSEUDOPAL    (1 << 6)\n\n/**\n * The pixel format has an alpha channel. This is set on all formats that\n * support alpha in some way. The exception is AV_PIX_FMT_PAL8, which can\n * carry alpha as part of the palette. Details are explained in the\n * AVPixelFormat enum, and are also encoded in the corresponding\n * AVPixFmtDescriptor.\n *\n * The alpha is always straight, never pre-multiplied.\n *\n * If a codec or a filter does not support alpha, it should set all alpha to\n * opaque, or use the equivalent pixel formats without alpha component, e.g.\n * AV_PIX_FMT_RGB0 (or AV_PIX_FMT_RGB24 etc.) instead of AV_PIX_FMT_RGBA.\n */\n#define AV_PIX_FMT_FLAG_ALPHA        (1 << 7)\n\n/**\n * Read a line from an image, and write the values of the\n * pixel format component c to dst.\n *\n * @param data the array containing the pointers to the planes of the image\n * @param linesize the array containing the linesizes of the image\n * @param desc the pixel format descriptor for the image\n * @param x the horizontal coordinate of the first pixel to read\n * @param y the vertical coordinate of the first pixel to read\n * @param w the width of the line to read, that is the number of\n * values to write to dst\n * @param read_pal_component if not zero and the format is a paletted\n * format writes the values corresponding to the palette\n * component c in data[1] to dst, rather than the palette indexes in\n * data[0]. The behavior is undefined if the format is not paletted.\n */\nvoid av_read_image_line(uint16_t *dst, const uint8_t *data[4],\n                        const int linesize[4], const AVPixFmtDescriptor *desc,\n                        int x, int y, int c, int w, int read_pal_component);\n\n/**\n * Write the values from src to the pixel format component c of an\n * image line.\n *\n * @param src array containing the values to write\n * @param data the array containing the pointers to the planes of the\n * image to write into. It is supposed to be zeroed.\n * @param linesize the array containing the linesizes of the image\n * @param desc the pixel format descriptor for the image\n * @param x the horizontal coordinate of the first pixel to write\n * @param y the vertical coordinate of the first pixel to write\n * @param w the width of the line to write, that is the number of\n * values to write to the image line\n */\nvoid av_write_image_line(const uint16_t *src, uint8_t *data[4],\n                         const int linesize[4], const AVPixFmtDescriptor *desc,\n                         int x, int y, int c, int w);\n\n/**\n * Return the pixel format corresponding to name.\n *\n * If there is no pixel format with name name, then looks for a\n * pixel format with the name corresponding to the native endian\n * format of name.\n * For example in a little-endian system, first looks for \"gray16\",\n * then for \"gray16le\".\n *\n * Finally if no pixel format has been found, returns AV_PIX_FMT_NONE.\n */\nenum AVPixelFormat av_get_pix_fmt(const char *name);\n\n/**\n * Return the short name for a pixel format, NULL in case pix_fmt is\n * unknown.\n *\n * @see av_get_pix_fmt(), av_get_pix_fmt_string()\n */\nconst char *av_get_pix_fmt_name(enum AVPixelFormat pix_fmt);\n\n/**\n * Print in buf the string corresponding to the pixel format with\n * number pix_fmt, or a header if pix_fmt is negative.\n *\n * @param buf the buffer where to write the string\n * @param buf_size the size of buf\n * @param pix_fmt the number of the pixel format to print the\n * corresponding info string, or a negative value to print the\n * corresponding header.\n */\nchar *av_get_pix_fmt_string(char *buf, int buf_size,\n                            enum AVPixelFormat pix_fmt);\n\n/**\n * Return the number of bits per pixel used by the pixel format\n * described by pixdesc. Note that this is not the same as the number\n * of bits per sample.\n *\n * The returned number of bits refers to the number of bits actually\n * used for storing the pixel information, that is padding bits are\n * not counted.\n */\nint av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc);\n\n/**\n * Return the number of bits per pixel for the pixel format\n * described by pixdesc, including any padding or unused bits.\n */\nint av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc);\n\n/**\n * @return a pixel format descriptor for provided pixel format or NULL if\n * this pixel format is unknown.\n */\nconst AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt);\n\n/**\n * Iterate over all pixel format descriptors known to libavutil.\n *\n * @param prev previous descriptor. NULL to get the first descriptor.\n *\n * @return next descriptor or NULL after the last descriptor\n */\nconst AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev);\n\n/**\n * @return an AVPixelFormat id described by desc, or AV_PIX_FMT_NONE if desc\n * is not a valid pointer to a pixel format descriptor.\n */\nenum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc);\n\n/**\n * Utility function to access log2_chroma_w log2_chroma_h from\n * the pixel format AVPixFmtDescriptor.\n *\n * See av_get_chroma_sub_sample() for a function that asserts a\n * valid pixel format instead of returning an error code.\n * Its recommended that you use avcodec_get_chroma_sub_sample unless\n * you do check the return code!\n *\n * @param[in]  pix_fmt the pixel format\n * @param[out] h_shift store log2_chroma_w\n * @param[out] v_shift store log2_chroma_h\n *\n * @return 0 on success, AVERROR(ENOSYS) on invalid or unknown pixel format\n */\nint av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt,\n                                     int *h_shift, int *v_shift);\n\n/**\n * @return number of planes in pix_fmt, a negative AVERROR if pix_fmt is not a\n * valid pixel format.\n */\nint av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt);\n\n/**\n * Utility function to swap the endianness of a pixel format.\n *\n * @param[in]  pix_fmt the pixel format\n *\n * @return pixel format with swapped endianness if it exists,\n * otherwise AV_PIX_FMT_NONE\n */\nenum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt);\n\n#define FF_LOSS_RESOLUTION  0x0001 /**< loss due to resolution change */\n#define FF_LOSS_DEPTH       0x0002 /**< loss due to color depth change */\n#define FF_LOSS_COLORSPACE  0x0004 /**< loss due to color space conversion */\n#define FF_LOSS_ALPHA       0x0008 /**< loss of alpha bits */\n#define FF_LOSS_COLORQUANT  0x0010 /**< loss due to color quantization */\n#define FF_LOSS_CHROMA      0x0020 /**< loss of chroma (e.g. RGB to gray conversion) */\n\n/**\n * Compute what kind of losses will occur when converting from one specific\n * pixel format to another.\n * When converting from one pixel format to another, information loss may occur.\n * For example, when converting from RGB24 to GRAY, the color information will\n * be lost. Similarly, other losses occur when converting from some formats to\n * other formats. These losses can involve loss of chroma, but also loss of\n * resolution, loss of color depth, loss due to the color space conversion, loss\n * of the alpha bits or loss due to color quantization.\n * av_get_fix_fmt_loss() informs you about the various types of losses\n * which will occur when converting from one pixel format to another.\n *\n * @param[in] dst_pix_fmt destination pixel format\n * @param[in] src_pix_fmt source pixel format\n * @param[in] has_alpha Whether the source pixel format alpha channel is used.\n * @return Combination of flags informing you what kind of losses will occur\n * (maximum loss for an invalid dst_pix_fmt).\n */\nint av_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,\n                        enum AVPixelFormat src_pix_fmt,\n                        int has_alpha);\n\n/**\n * Compute what kind of losses will occur when converting from one specific\n * pixel format to another.\n * When converting from one pixel format to another, information loss may occur.\n * For example, when converting from RGB24 to GRAY, the color information will\n * be lost. Similarly, other losses occur when converting from some formats to\n * other formats. These losses can involve loss of chroma, but also loss of\n * resolution, loss of color depth, loss due to the color space conversion, loss\n * of the alpha bits or loss due to color quantization.\n * av_get_fix_fmt_loss() informs you about the various types of losses\n * which will occur when converting from one pixel format to another.\n *\n * @param[in] dst_pix_fmt destination pixel format\n * @param[in] src_pix_fmt source pixel format\n * @param[in] has_alpha Whether the source pixel format alpha channel is used.\n * @return Combination of flags informing you what kind of losses will occur\n * (maximum loss for an invalid dst_pix_fmt).\n */\nenum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,\n                                             enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);\n\n/**\n * @return the name for provided color range or NULL if unknown.\n */\nconst char *av_color_range_name(enum AVColorRange range);\n\n/**\n * @return the name for provided color primaries or NULL if unknown.\n */\nconst char *av_color_primaries_name(enum AVColorPrimaries primaries);\n\n/**\n * @return the name for provided color transfer or NULL if unknown.\n */\nconst char *av_color_transfer_name(enum AVColorTransferCharacteristic transfer);\n\n/**\n * @return the name for provided color space or NULL if unknown.\n */\nconst char *av_color_space_name(enum AVColorSpace space);\n\n/**\n * @return the name for provided chroma location or NULL if unknown.\n */\nconst char *av_chroma_location_name(enum AVChromaLocation location);\n\n#endif /* AVUTIL_PIXDESC_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/pixelutils.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_PIXELUTILS_H\n#define AVUTIL_PIXELUTILS_H\n\n#include <stddef.h>\n#include <stdint.h>\n#include \"common.h\"\n\n/**\n * Sum of abs(src1[x] - src2[x])\n */\ntypedef int (*av_pixelutils_sad_fn)(const uint8_t *src1, ptrdiff_t stride1,\n                                    const uint8_t *src2, ptrdiff_t stride2);\n\n/**\n * Get a potentially optimized pointer to a Sum-of-absolute-differences\n * function (see the av_pixelutils_sad_fn prototype).\n *\n * @param w_bits  1<<w_bits is the requested width of the block size\n * @param h_bits  1<<h_bits is the requested height of the block size\n * @param aligned If set to 2, the returned sad function will assume src1 and\n *                src2 addresses are aligned on the block size.\n *                If set to 1, the returned sad function will assume src1 is\n *                aligned on the block size.\n *                If set to 0, the returned sad function assume no particular\n *                alignment.\n * @param log_ctx context used for logging, can be NULL\n *\n * @return a pointer to the SAD function or NULL in case of error (because of\n *         invalid parameters)\n */\nav_pixelutils_sad_fn av_pixelutils_get_sad_fn(int w_bits, int h_bits,\n                                              int aligned, void *log_ctx);\n\n#endif /* AVUTIL_PIXELUTILS_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/pixfmt.h",
    "content": "/*\n * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_PIXFMT_H\n#define AVUTIL_PIXFMT_H\n\n/**\n * @file\n * pixel format definitions\n *\n */\n\n#include \"libavutil/avconfig.h\"\n#include \"version.h\"\n\n#define AVPALETTE_SIZE 1024\n#define AVPALETTE_COUNT 256\n\n/**\n * Pixel format.\n *\n * @note\n * AV_PIX_FMT_RGB32 is handled in an endian-specific manner. An RGBA\n * color is put together as:\n *  (A << 24) | (R << 16) | (G << 8) | B\n * This is stored as BGRA on little-endian CPU architectures and ARGB on\n * big-endian CPUs.\n *\n * @par\n * When the pixel format is palettized RGB32 (AV_PIX_FMT_PAL8), the palettized\n * image data is stored in AVFrame.data[0]. The palette is transported in\n * AVFrame.data[1], is 1024 bytes long (256 4-byte entries) and is\n * formatted the same as in AV_PIX_FMT_RGB32 described above (i.e., it is\n * also endian-specific). Note also that the individual RGB32 palette\n * components stored in AVFrame.data[1] should be in the range 0..255.\n * This is important as many custom PAL8 video codecs that were designed\n * to run on the IBM VGA graphics adapter use 6-bit palette components.\n *\n * @par\n * For all the 8bit per pixel formats, an RGB32 palette is in data[1] like\n * for pal8. This palette is filled in automatically by the function\n * allocating the picture.\n */\nenum AVPixelFormat {\n    AV_PIX_FMT_NONE = -1,\n    AV_PIX_FMT_YUV420P,   ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)\n    AV_PIX_FMT_YUYV422,   ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr\n    AV_PIX_FMT_RGB24,     ///< packed RGB 8:8:8, 24bpp, RGBRGB...\n    AV_PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...\n    AV_PIX_FMT_YUV422P,   ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)\n    AV_PIX_FMT_YUV444P,   ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)\n    AV_PIX_FMT_YUV410P,   ///< planar YUV 4:1:0,  9bpp, (1 Cr & Cb sample per 4x4 Y samples)\n    AV_PIX_FMT_YUV411P,   ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)\n    AV_PIX_FMT_GRAY8,     ///<        Y        ,  8bpp\n    AV_PIX_FMT_MONOWHITE, ///<        Y        ,  1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb\n    AV_PIX_FMT_MONOBLACK, ///<        Y        ,  1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb\n    AV_PIX_FMT_PAL8,      ///< 8 bit with AV_PIX_FMT_RGB32 palette\n    AV_PIX_FMT_YUVJ420P,  ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range\n    AV_PIX_FMT_YUVJ422P,  ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting color_range\n    AV_PIX_FMT_YUVJ444P,  ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting color_range\n#if FF_API_XVMC\n    AV_PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing\n    AV_PIX_FMT_XVMC_MPEG2_IDCT,\n#define AV_PIX_FMT_XVMC AV_PIX_FMT_XVMC_MPEG2_IDCT\n#endif /* FF_API_XVMC */\n    AV_PIX_FMT_UYVY422,   ///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1\n    AV_PIX_FMT_UYYVYY411, ///< packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3\n    AV_PIX_FMT_BGR8,      ///< packed RGB 3:3:2,  8bpp, (msb)2B 3G 3R(lsb)\n    AV_PIX_FMT_BGR4,      ///< packed RGB 1:2:1 bitstream,  4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits\n    AV_PIX_FMT_BGR4_BYTE, ///< packed RGB 1:2:1,  8bpp, (msb)1B 2G 1R(lsb)\n    AV_PIX_FMT_RGB8,      ///< packed RGB 3:3:2,  8bpp, (msb)2R 3G 3B(lsb)\n    AV_PIX_FMT_RGB4,      ///< packed RGB 1:2:1 bitstream,  4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits\n    AV_PIX_FMT_RGB4_BYTE, ///< packed RGB 1:2:1,  8bpp, (msb)1R 2G 1B(lsb)\n    AV_PIX_FMT_NV12,      ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)\n    AV_PIX_FMT_NV21,      ///< as above, but U and V bytes are swapped\n\n    AV_PIX_FMT_ARGB,      ///< packed ARGB 8:8:8:8, 32bpp, ARGBARGB...\n    AV_PIX_FMT_RGBA,      ///< packed RGBA 8:8:8:8, 32bpp, RGBARGBA...\n    AV_PIX_FMT_ABGR,      ///< packed ABGR 8:8:8:8, 32bpp, ABGRABGR...\n    AV_PIX_FMT_BGRA,      ///< packed BGRA 8:8:8:8, 32bpp, BGRABGRA...\n\n    AV_PIX_FMT_GRAY16BE,  ///<        Y        , 16bpp, big-endian\n    AV_PIX_FMT_GRAY16LE,  ///<        Y        , 16bpp, little-endian\n    AV_PIX_FMT_YUV440P,   ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)\n    AV_PIX_FMT_YUVJ440P,  ///< planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range\n    AV_PIX_FMT_YUVA420P,  ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)\n#if FF_API_VDPAU\n    AV_PIX_FMT_VDPAU_H264,///< H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers\n    AV_PIX_FMT_VDPAU_MPEG1,///< MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers\n    AV_PIX_FMT_VDPAU_MPEG2,///< MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers\n    AV_PIX_FMT_VDPAU_WMV3,///< WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers\n    AV_PIX_FMT_VDPAU_VC1, ///< VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers\n#endif\n    AV_PIX_FMT_RGB48BE,   ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big-endian\n    AV_PIX_FMT_RGB48LE,   ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as little-endian\n\n    AV_PIX_FMT_RGB565BE,  ///< packed RGB 5:6:5, 16bpp, (msb)   5R 6G 5B(lsb), big-endian\n    AV_PIX_FMT_RGB565LE,  ///< packed RGB 5:6:5, 16bpp, (msb)   5R 6G 5B(lsb), little-endian\n    AV_PIX_FMT_RGB555BE,  ///< packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian   , X=unused/undefined\n    AV_PIX_FMT_RGB555LE,  ///< packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined\n\n    AV_PIX_FMT_BGR565BE,  ///< packed BGR 5:6:5, 16bpp, (msb)   5B 6G 5R(lsb), big-endian\n    AV_PIX_FMT_BGR565LE,  ///< packed BGR 5:6:5, 16bpp, (msb)   5B 6G 5R(lsb), little-endian\n    AV_PIX_FMT_BGR555BE,  ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian   , X=unused/undefined\n    AV_PIX_FMT_BGR555LE,  ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined\n\n#if FF_API_VAAPI\n    /** @name Deprecated pixel formats */\n    /**@{*/\n    AV_PIX_FMT_VAAPI_MOCO, ///< HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_render_state struct which contains macroblocks as well as various fields extracted from headers\n    AV_PIX_FMT_VAAPI_IDCT, ///< HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state struct which contains fields extracted from headers\n    AV_PIX_FMT_VAAPI_VLD,  ///< HW decoding through VA API, Picture.data[3] contains a vaapi_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers\n    /**@}*/\n    AV_PIX_FMT_VAAPI = AV_PIX_FMT_VAAPI_VLD,\n#else\n    /**\n     *  Hardware acceleration through VA-API, data[3] contains a\n     *  VASurfaceID.\n     */\n    AV_PIX_FMT_VAAPI,\n#endif\n\n    AV_PIX_FMT_YUV420P16LE,  ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian\n    AV_PIX_FMT_YUV420P16BE,  ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian\n    AV_PIX_FMT_YUV422P16LE,  ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian\n    AV_PIX_FMT_YUV422P16BE,  ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian\n    AV_PIX_FMT_YUV444P16LE,  ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian\n    AV_PIX_FMT_YUV444P16BE,  ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian\n#if FF_API_VDPAU\n    AV_PIX_FMT_VDPAU_MPEG4,  ///< MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers\n#endif\n    AV_PIX_FMT_DXVA2_VLD,    ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer\n\n    AV_PIX_FMT_RGB444LE,  ///< packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined\n    AV_PIX_FMT_RGB444BE,  ///< packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian,    X=unused/undefined\n    AV_PIX_FMT_BGR444LE,  ///< packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined\n    AV_PIX_FMT_BGR444BE,  ///< packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian,    X=unused/undefined\n    AV_PIX_FMT_YA8,       ///< 8bit gray, 8bit alpha\n\n    AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8\n    AV_PIX_FMT_GRAY8A= AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8\n\n    AV_PIX_FMT_BGR48BE,   ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian\n    AV_PIX_FMT_BGR48LE,   ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian\n\n    /**\n     * The following 12 formats have the disadvantage of needing 1 format for each bit depth.\n     * Notice that each 9/10 bits sample is stored in 16 bits with extra padding.\n     * If you want to support multiple bit depths, then using AV_PIX_FMT_YUV420P16* with the bpp stored separately is better.\n     */\n    AV_PIX_FMT_YUV420P9BE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian\n    AV_PIX_FMT_YUV420P9LE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian\n    AV_PIX_FMT_YUV420P10BE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian\n    AV_PIX_FMT_YUV420P10LE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian\n    AV_PIX_FMT_YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian\n    AV_PIX_FMT_YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian\n    AV_PIX_FMT_YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian\n    AV_PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian\n    AV_PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian\n    AV_PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian\n    AV_PIX_FMT_YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian\n    AV_PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian\n    AV_PIX_FMT_VDA_VLD,    ///< hardware decoding through VDA\n    AV_PIX_FMT_GBRP,      ///< planar GBR 4:4:4 24bpp\n    AV_PIX_FMT_GBRP9BE,   ///< planar GBR 4:4:4 27bpp, big-endian\n    AV_PIX_FMT_GBRP9LE,   ///< planar GBR 4:4:4 27bpp, little-endian\n    AV_PIX_FMT_GBRP10BE,  ///< planar GBR 4:4:4 30bpp, big-endian\n    AV_PIX_FMT_GBRP10LE,  ///< planar GBR 4:4:4 30bpp, little-endian\n    AV_PIX_FMT_GBRP16BE,  ///< planar GBR 4:4:4 48bpp, big-endian\n    AV_PIX_FMT_GBRP16LE,  ///< planar GBR 4:4:4 48bpp, little-endian\n    AV_PIX_FMT_YUVA422P,  ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)\n    AV_PIX_FMT_YUVA444P,  ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)\n    AV_PIX_FMT_YUVA420P9BE,  ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian\n    AV_PIX_FMT_YUVA420P9LE,  ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian\n    AV_PIX_FMT_YUVA422P9BE,  ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian\n    AV_PIX_FMT_YUVA422P9LE,  ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian\n    AV_PIX_FMT_YUVA444P9BE,  ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian\n    AV_PIX_FMT_YUVA444P9LE,  ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian\n    AV_PIX_FMT_YUVA420P10BE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)\n    AV_PIX_FMT_YUVA420P10LE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)\n    AV_PIX_FMT_YUVA422P10BE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)\n    AV_PIX_FMT_YUVA422P10LE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)\n    AV_PIX_FMT_YUVA444P10BE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)\n    AV_PIX_FMT_YUVA444P10LE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)\n    AV_PIX_FMT_YUVA420P16BE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)\n    AV_PIX_FMT_YUVA420P16LE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)\n    AV_PIX_FMT_YUVA422P16BE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)\n    AV_PIX_FMT_YUVA422P16LE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)\n    AV_PIX_FMT_YUVA444P16BE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)\n    AV_PIX_FMT_YUVA444P16LE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)\n\n    AV_PIX_FMT_VDPAU,     ///< HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface\n\n    AV_PIX_FMT_XYZ12LE,      ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as little-endian, the 4 lower bits are set to 0\n    AV_PIX_FMT_XYZ12BE,      ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as big-endian, the 4 lower bits are set to 0\n    AV_PIX_FMT_NV16,         ///< interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)\n    AV_PIX_FMT_NV20LE,       ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian\n    AV_PIX_FMT_NV20BE,       ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian\n\n    AV_PIX_FMT_RGBA64BE,     ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian\n    AV_PIX_FMT_RGBA64LE,     ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian\n    AV_PIX_FMT_BGRA64BE,     ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian\n    AV_PIX_FMT_BGRA64LE,     ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian\n\n    AV_PIX_FMT_YVYU422,   ///< packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb\n\n    AV_PIX_FMT_VDA,          ///< HW acceleration through VDA, data[3] contains a CVPixelBufferRef\n\n    AV_PIX_FMT_YA16BE,       ///< 16bit gray, 16bit alpha (big-endian)\n    AV_PIX_FMT_YA16LE,       ///< 16bit gray, 16bit alpha (little-endian)\n\n    AV_PIX_FMT_GBRAP,        ///< planar GBRA 4:4:4:4 32bpp\n    AV_PIX_FMT_GBRAP16BE,    ///< planar GBRA 4:4:4:4 64bpp, big-endian\n    AV_PIX_FMT_GBRAP16LE,    ///< planar GBRA 4:4:4:4 64bpp, little-endian\n    /**\n     *  HW acceleration through QSV, data[3] contains a pointer to the\n     *  mfxFrameSurface1 structure.\n     */\n    AV_PIX_FMT_QSV,\n    /**\n     * HW acceleration though MMAL, data[3] contains a pointer to the\n     * MMAL_BUFFER_HEADER_T structure.\n     */\n    AV_PIX_FMT_MMAL,\n\n    AV_PIX_FMT_D3D11VA_VLD,  ///< HW decoding through Direct3D11, Picture.data[3] contains a ID3D11VideoDecoderOutputView pointer\n\n    AV_PIX_FMT_0RGB=0x123+4,///< packed RGB 8:8:8, 32bpp, XRGBXRGB...   X=unused/undefined\n    AV_PIX_FMT_RGB0,        ///< packed RGB 8:8:8, 32bpp, RGBXRGBX...   X=unused/undefined\n    AV_PIX_FMT_0BGR,        ///< packed BGR 8:8:8, 32bpp, XBGRXBGR...   X=unused/undefined\n    AV_PIX_FMT_BGR0,        ///< packed BGR 8:8:8, 32bpp, BGRXBGRX...   X=unused/undefined\n\n    AV_PIX_FMT_YUV420P12BE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian\n    AV_PIX_FMT_YUV420P12LE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian\n    AV_PIX_FMT_YUV420P14BE, ///< planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian\n    AV_PIX_FMT_YUV420P14LE, ///< planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian\n    AV_PIX_FMT_YUV422P12BE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian\n    AV_PIX_FMT_YUV422P12LE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian\n    AV_PIX_FMT_YUV422P14BE, ///< planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian\n    AV_PIX_FMT_YUV422P14LE, ///< planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian\n    AV_PIX_FMT_YUV444P12BE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian\n    AV_PIX_FMT_YUV444P12LE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian\n    AV_PIX_FMT_YUV444P14BE, ///< planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian\n    AV_PIX_FMT_YUV444P14LE, ///< planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian\n    AV_PIX_FMT_GBRP12BE,    ///< planar GBR 4:4:4 36bpp, big-endian\n    AV_PIX_FMT_GBRP12LE,    ///< planar GBR 4:4:4 36bpp, little-endian\n    AV_PIX_FMT_GBRP14BE,    ///< planar GBR 4:4:4 42bpp, big-endian\n    AV_PIX_FMT_GBRP14LE,    ///< planar GBR 4:4:4 42bpp, little-endian\n    AV_PIX_FMT_YUVJ411P,    ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV411P and setting color_range\n\n    AV_PIX_FMT_BAYER_BGGR8,    ///< bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples */\n    AV_PIX_FMT_BAYER_RGGB8,    ///< bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples */\n    AV_PIX_FMT_BAYER_GBRG8,    ///< bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples */\n    AV_PIX_FMT_BAYER_GRBG8,    ///< bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples */\n    AV_PIX_FMT_BAYER_BGGR16LE, ///< bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian */\n    AV_PIX_FMT_BAYER_BGGR16BE, ///< bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian */\n    AV_PIX_FMT_BAYER_RGGB16LE, ///< bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian */\n    AV_PIX_FMT_BAYER_RGGB16BE, ///< bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian */\n    AV_PIX_FMT_BAYER_GBRG16LE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian */\n    AV_PIX_FMT_BAYER_GBRG16BE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian */\n    AV_PIX_FMT_BAYER_GRBG16LE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian */\n    AV_PIX_FMT_BAYER_GRBG16BE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian */\n#if !FF_API_XVMC\n    AV_PIX_FMT_XVMC,///< XVideo Motion Acceleration via common packet passing\n#endif /* !FF_API_XVMC */\n    AV_PIX_FMT_YUV440P10LE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian\n    AV_PIX_FMT_YUV440P10BE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian\n    AV_PIX_FMT_YUV440P12LE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian\n    AV_PIX_FMT_YUV440P12BE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian\n    AV_PIX_FMT_AYUV64LE,    ///< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian\n    AV_PIX_FMT_AYUV64BE,    ///< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian\n\n    AV_PIX_FMT_VIDEOTOOLBOX, ///< hardware decoding through Videotoolbox\n\n    AV_PIX_FMT_NB,        ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions\n};\n\n#define AV_PIX_FMT_Y400A AV_PIX_FMT_GRAY8A\n#define AV_PIX_FMT_GBR24P AV_PIX_FMT_GBRP\n\n#if AV_HAVE_BIGENDIAN\n#   define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##be\n#else\n#   define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##le\n#endif\n\n#define AV_PIX_FMT_RGB32   AV_PIX_FMT_NE(ARGB, BGRA)\n#define AV_PIX_FMT_RGB32_1 AV_PIX_FMT_NE(RGBA, ABGR)\n#define AV_PIX_FMT_BGR32   AV_PIX_FMT_NE(ABGR, RGBA)\n#define AV_PIX_FMT_BGR32_1 AV_PIX_FMT_NE(BGRA, ARGB)\n#define AV_PIX_FMT_0RGB32  AV_PIX_FMT_NE(0RGB, BGR0)\n#define AV_PIX_FMT_0BGR32  AV_PIX_FMT_NE(0BGR, RGB0)\n\n#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)\n#define AV_PIX_FMT_YA16   AV_PIX_FMT_NE(YA16BE,   YA16LE)\n#define AV_PIX_FMT_RGB48  AV_PIX_FMT_NE(RGB48BE,  RGB48LE)\n#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE)\n#define AV_PIX_FMT_RGB555 AV_PIX_FMT_NE(RGB555BE, RGB555LE)\n#define AV_PIX_FMT_RGB444 AV_PIX_FMT_NE(RGB444BE, RGB444LE)\n#define AV_PIX_FMT_RGBA64 AV_PIX_FMT_NE(RGBA64BE, RGBA64LE)\n#define AV_PIX_FMT_BGR48  AV_PIX_FMT_NE(BGR48BE,  BGR48LE)\n#define AV_PIX_FMT_BGR565 AV_PIX_FMT_NE(BGR565BE, BGR565LE)\n#define AV_PIX_FMT_BGR555 AV_PIX_FMT_NE(BGR555BE, BGR555LE)\n#define AV_PIX_FMT_BGR444 AV_PIX_FMT_NE(BGR444BE, BGR444LE)\n#define AV_PIX_FMT_BGRA64 AV_PIX_FMT_NE(BGRA64BE, BGRA64LE)\n\n#define AV_PIX_FMT_YUV420P9  AV_PIX_FMT_NE(YUV420P9BE , YUV420P9LE)\n#define AV_PIX_FMT_YUV422P9  AV_PIX_FMT_NE(YUV422P9BE , YUV422P9LE)\n#define AV_PIX_FMT_YUV444P9  AV_PIX_FMT_NE(YUV444P9BE , YUV444P9LE)\n#define AV_PIX_FMT_YUV420P10 AV_PIX_FMT_NE(YUV420P10BE, YUV420P10LE)\n#define AV_PIX_FMT_YUV422P10 AV_PIX_FMT_NE(YUV422P10BE, YUV422P10LE)\n#define AV_PIX_FMT_YUV440P10 AV_PIX_FMT_NE(YUV440P10BE, YUV440P10LE)\n#define AV_PIX_FMT_YUV444P10 AV_PIX_FMT_NE(YUV444P10BE, YUV444P10LE)\n#define AV_PIX_FMT_YUV420P12 AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE)\n#define AV_PIX_FMT_YUV422P12 AV_PIX_FMT_NE(YUV422P12BE, YUV422P12LE)\n#define AV_PIX_FMT_YUV440P12 AV_PIX_FMT_NE(YUV440P12BE, YUV440P12LE)\n#define AV_PIX_FMT_YUV444P12 AV_PIX_FMT_NE(YUV444P12BE, YUV444P12LE)\n#define AV_PIX_FMT_YUV420P14 AV_PIX_FMT_NE(YUV420P14BE, YUV420P14LE)\n#define AV_PIX_FMT_YUV422P14 AV_PIX_FMT_NE(YUV422P14BE, YUV422P14LE)\n#define AV_PIX_FMT_YUV444P14 AV_PIX_FMT_NE(YUV444P14BE, YUV444P14LE)\n#define AV_PIX_FMT_YUV420P16 AV_PIX_FMT_NE(YUV420P16BE, YUV420P16LE)\n#define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE)\n#define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE)\n\n#define AV_PIX_FMT_GBRP9     AV_PIX_FMT_NE(GBRP9BE ,    GBRP9LE)\n#define AV_PIX_FMT_GBRP10    AV_PIX_FMT_NE(GBRP10BE,    GBRP10LE)\n#define AV_PIX_FMT_GBRP12    AV_PIX_FMT_NE(GBRP12BE,    GBRP12LE)\n#define AV_PIX_FMT_GBRP14    AV_PIX_FMT_NE(GBRP14BE,    GBRP14LE)\n#define AV_PIX_FMT_GBRP16    AV_PIX_FMT_NE(GBRP16BE,    GBRP16LE)\n#define AV_PIX_FMT_GBRAP16   AV_PIX_FMT_NE(GBRAP16BE,   GBRAP16LE)\n\n#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE,    BAYER_BGGR16LE)\n#define AV_PIX_FMT_BAYER_RGGB16 AV_PIX_FMT_NE(BAYER_RGGB16BE,    BAYER_RGGB16LE)\n#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE,    BAYER_GBRG16LE)\n#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE,    BAYER_GRBG16LE)\n\n\n#define AV_PIX_FMT_YUVA420P9  AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)\n#define AV_PIX_FMT_YUVA422P9  AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)\n#define AV_PIX_FMT_YUVA444P9  AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)\n#define AV_PIX_FMT_YUVA420P10 AV_PIX_FMT_NE(YUVA420P10BE, YUVA420P10LE)\n#define AV_PIX_FMT_YUVA422P10 AV_PIX_FMT_NE(YUVA422P10BE, YUVA422P10LE)\n#define AV_PIX_FMT_YUVA444P10 AV_PIX_FMT_NE(YUVA444P10BE, YUVA444P10LE)\n#define AV_PIX_FMT_YUVA420P16 AV_PIX_FMT_NE(YUVA420P16BE, YUVA420P16LE)\n#define AV_PIX_FMT_YUVA422P16 AV_PIX_FMT_NE(YUVA422P16BE, YUVA422P16LE)\n#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE)\n\n#define AV_PIX_FMT_XYZ12      AV_PIX_FMT_NE(XYZ12BE, XYZ12LE)\n#define AV_PIX_FMT_NV20       AV_PIX_FMT_NE(NV20BE,  NV20LE)\n#define AV_PIX_FMT_AYUV64     AV_PIX_FMT_NE(AYUV64BE, AYUV64LE)\n\n/**\n  * Chromaticity coordinates of the source primaries.\n  */\nenum AVColorPrimaries {\n    AVCOL_PRI_RESERVED0   = 0,\n    AVCOL_PRI_BT709       = 1,  ///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B\n    AVCOL_PRI_UNSPECIFIED = 2,\n    AVCOL_PRI_RESERVED    = 3,\n    AVCOL_PRI_BT470M      = 4,  ///< also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)\n\n    AVCOL_PRI_BT470BG     = 5,  ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM\n    AVCOL_PRI_SMPTE170M   = 6,  ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC\n    AVCOL_PRI_SMPTE240M   = 7,  ///< functionally identical to above\n    AVCOL_PRI_FILM        = 8,  ///< colour filters using Illuminant C\n    AVCOL_PRI_BT2020      = 9,  ///< ITU-R BT2020\n    AVCOL_PRI_SMPTEST428_1= 10, ///< SMPTE ST 428-1 (CIE 1931 XYZ)\n    AVCOL_PRI_NB,               ///< Not part of ABI\n};\n\n/**\n * Color Transfer Characteristic.\n */\nenum AVColorTransferCharacteristic {\n    AVCOL_TRC_RESERVED0    = 0,\n    AVCOL_TRC_BT709        = 1,  ///< also ITU-R BT1361\n    AVCOL_TRC_UNSPECIFIED  = 2,\n    AVCOL_TRC_RESERVED     = 3,\n    AVCOL_TRC_GAMMA22      = 4,  ///< also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM\n    AVCOL_TRC_GAMMA28      = 5,  ///< also ITU-R BT470BG\n    AVCOL_TRC_SMPTE170M    = 6,  ///< also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC\n    AVCOL_TRC_SMPTE240M    = 7,\n    AVCOL_TRC_LINEAR       = 8,  ///< \"Linear transfer characteristics\"\n    AVCOL_TRC_LOG          = 9,  ///< \"Logarithmic transfer characteristic (100:1 range)\"\n    AVCOL_TRC_LOG_SQRT     = 10, ///< \"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)\"\n    AVCOL_TRC_IEC61966_2_4 = 11, ///< IEC 61966-2-4\n    AVCOL_TRC_BT1361_ECG   = 12, ///< ITU-R BT1361 Extended Colour Gamut\n    AVCOL_TRC_IEC61966_2_1 = 13, ///< IEC 61966-2-1 (sRGB or sYCC)\n    AVCOL_TRC_BT2020_10    = 14, ///< ITU-R BT2020 for 10 bit system\n    AVCOL_TRC_BT2020_12    = 15, ///< ITU-R BT2020 for 12 bit system\n    AVCOL_TRC_SMPTEST2084  = 16, ///< SMPTE ST 2084 for 10, 12, 14 and 16 bit systems\n    AVCOL_TRC_SMPTEST428_1 = 17, ///< SMPTE ST 428-1\n    AVCOL_TRC_NB,                ///< Not part of ABI\n};\n\n/**\n * YUV colorspace type.\n */\nenum AVColorSpace {\n    AVCOL_SPC_RGB         = 0,  ///< order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)\n    AVCOL_SPC_BT709       = 1,  ///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B\n    AVCOL_SPC_UNSPECIFIED = 2,\n    AVCOL_SPC_RESERVED    = 3,\n    AVCOL_SPC_FCC         = 4,  ///< FCC Title 47 Code of Federal Regulations 73.682 (a)(20)\n    AVCOL_SPC_BT470BG     = 5,  ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601\n    AVCOL_SPC_SMPTE170M   = 6,  ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above\n    AVCOL_SPC_SMPTE240M   = 7,\n    AVCOL_SPC_YCOCG       = 8,  ///< Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16\n    AVCOL_SPC_BT2020_NCL  = 9,  ///< ITU-R BT2020 non-constant luminance system\n    AVCOL_SPC_BT2020_CL   = 10, ///< ITU-R BT2020 constant luminance system\n    AVCOL_SPC_NB,               ///< Not part of ABI\n};\n#define AVCOL_SPC_YCGCO AVCOL_SPC_YCOCG\n\n\n/**\n * MPEG vs JPEG YUV range.\n */\nenum AVColorRange {\n    AVCOL_RANGE_UNSPECIFIED = 0,\n    AVCOL_RANGE_MPEG        = 1, ///< the normal 219*2^(n-8) \"MPEG\" YUV ranges\n    AVCOL_RANGE_JPEG        = 2, ///< the normal     2^n-1   \"JPEG\" YUV ranges\n    AVCOL_RANGE_NB,              ///< Not part of ABI\n};\n\n/**\n * Location of chroma samples.\n *\n * Illustration showing the location of the first (top left) chroma sample of the\n * image, the left shows only luma, the right\n * shows the location of the chroma sample, the 2 could be imagined to overlay\n * each other but are drawn separately due to limitations of ASCII\n *\n *                1st 2nd       1st 2nd horizontal luma sample positions\n *                 v   v         v   v\n *                 ______        ______\n *1st luma line > |X   X ...    |3 4 X ...     X are luma samples,\n *                |             |1 2           1-6 are possible chroma positions\n *2nd luma line > |X   X ...    |5 6 X ...     0 is undefined/unknown position\n */\nenum AVChromaLocation {\n    AVCHROMA_LOC_UNSPECIFIED = 0,\n    AVCHROMA_LOC_LEFT        = 1, ///< mpeg2/4 4:2:0, h264 default for 4:2:0\n    AVCHROMA_LOC_CENTER      = 2, ///< mpeg1 4:2:0, jpeg 4:2:0, h263 4:2:0\n    AVCHROMA_LOC_TOPLEFT     = 3, ///< ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2\n    AVCHROMA_LOC_TOP         = 4,\n    AVCHROMA_LOC_BOTTOMLEFT  = 5,\n    AVCHROMA_LOC_BOTTOM      = 6,\n    AVCHROMA_LOC_NB,              ///< Not part of ABI\n};\n\n#endif /* AVUTIL_PIXFMT_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/random_seed.h",
    "content": "/*\n * Copyright (c) 2009 Baptiste Coudurier <baptiste.coudurier@gmail.com>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_RANDOM_SEED_H\n#define AVUTIL_RANDOM_SEED_H\n\n#include <stdint.h>\n/**\n * @addtogroup lavu_crypto\n * @{\n */\n\n/**\n * Get a seed to use in conjunction with random functions.\n * This function tries to provide a good seed at a best effort bases.\n * Its possible to call this function multiple times if more bits are needed.\n * It can be quite slow, which is why it should only be used as seed for a faster\n * PRNG. The quality of the seed depends on the platform.\n */\nuint32_t av_get_random_seed(void);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_RANDOM_SEED_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/rational.h",
    "content": "/*\n * rational numbers\n * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * rational numbers\n * @author Michael Niedermayer <michaelni@gmx.at>\n */\n\n#ifndef AVUTIL_RATIONAL_H\n#define AVUTIL_RATIONAL_H\n\n#include <stdint.h>\n#include <limits.h>\n#include \"attributes.h\"\n\n/**\n * @addtogroup lavu_math\n * @{\n */\n\n/**\n * rational number numerator/denominator\n */\ntypedef struct AVRational{\n    int num; ///< numerator\n    int den; ///< denominator\n} AVRational;\n\n/**\n * Create a rational.\n * Useful for compilers that do not support compound literals.\n * @note  The return value is not reduced.\n */\nstatic inline AVRational av_make_q(int num, int den)\n{\n    AVRational r = { num, den };\n    return r;\n}\n\n/**\n * Compare two rationals.\n * @param a first rational\n * @param b second rational\n * @return 0 if a==b, 1 if a>b, -1 if a<b, and INT_MIN if one of the\n * values is of the form 0/0\n */\nstatic inline int av_cmp_q(AVRational a, AVRational b){\n    const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den;\n\n    if(tmp) return (int)((tmp ^ a.den ^ b.den)>>63)|1;\n    else if(b.den && a.den) return 0;\n    else if(a.num && b.num) return (a.num>>31) - (b.num>>31);\n    else                    return INT_MIN;\n}\n\n/**\n * Convert rational to double.\n * @param a rational to convert\n * @return (double) a\n */\nstatic inline double av_q2d(AVRational a){\n    return a.num / (double) a.den;\n}\n\n/**\n * Reduce a fraction.\n * This is useful for framerate calculations.\n * @param dst_num destination numerator\n * @param dst_den destination denominator\n * @param num source numerator\n * @param den source denominator\n * @param max the maximum allowed for dst_num & dst_den\n * @return 1 if exact, 0 otherwise\n */\nint av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max);\n\n/**\n * Multiply two rationals.\n * @param b first rational\n * @param c second rational\n * @return b*c\n */\nAVRational av_mul_q(AVRational b, AVRational c) av_const;\n\n/**\n * Divide one rational by another.\n * @param b first rational\n * @param c second rational\n * @return b/c\n */\nAVRational av_div_q(AVRational b, AVRational c) av_const;\n\n/**\n * Add two rationals.\n * @param b first rational\n * @param c second rational\n * @return b+c\n */\nAVRational av_add_q(AVRational b, AVRational c) av_const;\n\n/**\n * Subtract one rational from another.\n * @param b first rational\n * @param c second rational\n * @return b-c\n */\nAVRational av_sub_q(AVRational b, AVRational c) av_const;\n\n/**\n * Invert a rational.\n * @param q value\n * @return 1 / q\n */\nstatic av_always_inline AVRational av_inv_q(AVRational q)\n{\n    AVRational r = { q.den, q.num };\n    return r;\n}\n\n/**\n * Convert a double precision floating point number to a rational.\n * inf is expressed as {1,0} or {-1,0} depending on the sign.\n *\n * @param d double to convert\n * @param max the maximum allowed numerator and denominator\n * @return (AVRational) d\n */\nAVRational av_d2q(double d, int max) av_const;\n\n/**\n * @return 1 if q1 is nearer to q than q2, -1 if q2 is nearer\n * than q1, 0 if they have the same distance.\n */\nint av_nearer_q(AVRational q, AVRational q1, AVRational q2);\n\n/**\n * Find the nearest value in q_list to q.\n * @param q_list an array of rationals terminated by {0, 0}\n * @return the index of the nearest value found in the array\n */\nint av_find_nearest_q_idx(AVRational q, const AVRational* q_list);\n\n/**\n * Converts a AVRational to a IEEE 32bit float.\n *\n * The float is returned in a uint32_t and its value is platform indepenant.\n */\nuint32_t av_q2intfloat(AVRational q);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_RATIONAL_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/rc4.h",
    "content": "/*\n * RC4 encryption/decryption/pseudo-random number generator\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_RC4_H\n#define AVUTIL_RC4_H\n\n#include <stdint.h>\n\n/**\n * @defgroup lavu_rc4 RC4\n * @ingroup lavu_crypto\n * @{\n */\n\ntypedef struct AVRC4 {\n    uint8_t state[256];\n    int x, y;\n} AVRC4;\n\n/**\n * Allocate an AVRC4 context.\n */\nAVRC4 *av_rc4_alloc(void);\n\n/**\n * @brief Initializes an AVRC4 context.\n *\n * @param key_bits must be a multiple of 8\n * @param decrypt 0 for encryption, 1 for decryption, currently has no effect\n * @return zero on success, negative value otherwise\n */\nint av_rc4_init(struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt);\n\n/**\n * @brief Encrypts / decrypts using the RC4 algorithm.\n *\n * @param count number of bytes\n * @param dst destination array, can be equal to src\n * @param src source array, can be equal to dst, may be NULL\n * @param iv not (yet) used for RC4, should be NULL\n * @param decrypt 0 for encryption, 1 for decryption, not (yet) used\n */\nvoid av_rc4_crypt(struct AVRC4 *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_RC4_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/replaygain.h",
    "content": "/*\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_REPLAYGAIN_H\n#define AVUTIL_REPLAYGAIN_H\n\n#include <stdint.h>\n\n/**\n * ReplayGain information (see\n * http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification).\n * The size of this struct is a part of the public ABI.\n */\ntypedef struct AVReplayGain {\n    /**\n     * Track replay gain in microbels (divide by 100000 to get the value in dB).\n     * Should be set to INT32_MIN when unknown.\n     */\n    int32_t track_gain;\n    /**\n     * Peak track amplitude, with 100000 representing full scale (but values\n     * may overflow). 0 when unknown.\n     */\n    uint32_t track_peak;\n    /**\n     * Same as track_gain, but for the whole album.\n     */\n    int32_t album_gain;\n    /**\n     * Same as track_peak, but for the whole album,\n     */\n    uint32_t album_peak;\n} AVReplayGain;\n\n#endif /* AVUTIL_REPLAYGAIN_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/ripemd.h",
    "content": "/*\n * Copyright (C) 2007 Michael Niedermayer <michaelni@gmx.at>\n * Copyright (C) 2013 James Almer <jamrial@gmail.com>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_RIPEMD_H\n#define AVUTIL_RIPEMD_H\n\n#include <stdint.h>\n\n#include \"attributes.h\"\n#include \"version.h\"\n\n/**\n * @defgroup lavu_ripemd RIPEMD\n * @ingroup lavu_crypto\n * @{\n */\n\nextern const int av_ripemd_size;\n\nstruct AVRIPEMD;\n\n/**\n * Allocate an AVRIPEMD context.\n */\nstruct AVRIPEMD *av_ripemd_alloc(void);\n\n/**\n * Initialize RIPEMD hashing.\n *\n * @param context pointer to the function context (of size av_ripemd_size)\n * @param bits    number of bits in digest (128, 160, 256 or 320 bits)\n * @return        zero if initialization succeeded, -1 otherwise\n */\nint av_ripemd_init(struct AVRIPEMD* context, int bits);\n\n/**\n * Update hash value.\n *\n * @param context hash function context\n * @param data    input data to update hash with\n * @param len     input data length\n */\nvoid av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, unsigned int len);\n\n/**\n * Finish hashing and output digest value.\n *\n * @param context hash function context\n * @param digest  buffer where output digest value is stored\n */\nvoid av_ripemd_final(struct AVRIPEMD* context, uint8_t *digest);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_RIPEMD_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/samplefmt.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_SAMPLEFMT_H\n#define AVUTIL_SAMPLEFMT_H\n\n#include <stdint.h>\n\n#include \"avutil.h\"\n#include \"attributes.h\"\n\n/**\n * @addtogroup lavu_audio\n * @{\n *\n * @defgroup lavu_sampfmts Audio sample formats\n *\n * Audio sample format enumeration and related convenience functions.\n * @{\n *\n */\n\n/**\n * Audio sample formats\n *\n * - The data described by the sample format is always in native-endian order.\n *   Sample values can be expressed by native C types, hence the lack of a signed\n *   24-bit sample format even though it is a common raw audio data format.\n *\n * - The floating-point formats are based on full volume being in the range\n *   [-1.0, 1.0]. Any values outside this range are beyond full volume level.\n *\n * - The data layout as used in av_samples_fill_arrays() and elsewhere in FFmpeg\n *   (such as AVFrame in libavcodec) is as follows:\n *\n * @par\n * For planar sample formats, each audio channel is in a separate data plane,\n * and linesize is the buffer size, in bytes, for a single plane. All data\n * planes must be the same size. For packed sample formats, only the first data\n * plane is used, and samples for each channel are interleaved. In this case,\n * linesize is the buffer size, in bytes, for the 1 plane.\n *\n */\nenum AVSampleFormat {\n    AV_SAMPLE_FMT_NONE = -1,\n    AV_SAMPLE_FMT_U8,          ///< unsigned 8 bits\n    AV_SAMPLE_FMT_S16,         ///< signed 16 bits\n    AV_SAMPLE_FMT_S32,         ///< signed 32 bits\n    AV_SAMPLE_FMT_FLT,         ///< float\n    AV_SAMPLE_FMT_DBL,         ///< double\n\n    AV_SAMPLE_FMT_U8P,         ///< unsigned 8 bits, planar\n    AV_SAMPLE_FMT_S16P,        ///< signed 16 bits, planar\n    AV_SAMPLE_FMT_S32P,        ///< signed 32 bits, planar\n    AV_SAMPLE_FMT_FLTP,        ///< float, planar\n    AV_SAMPLE_FMT_DBLP,        ///< double, planar\n\n    AV_SAMPLE_FMT_NB           ///< Number of sample formats. DO NOT USE if linking dynamically\n};\n\n/**\n * Return the name of sample_fmt, or NULL if sample_fmt is not\n * recognized.\n */\nconst char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt);\n\n/**\n * Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE\n * on error.\n */\nenum AVSampleFormat av_get_sample_fmt(const char *name);\n\n/**\n * Return the planar<->packed alternative form of the given sample format, or\n * AV_SAMPLE_FMT_NONE on error. If the passed sample_fmt is already in the\n * requested planar/packed format, the format returned is the same as the\n * input.\n */\nenum AVSampleFormat av_get_alt_sample_fmt(enum AVSampleFormat sample_fmt, int planar);\n\n/**\n * Get the packed alternative form of the given sample format.\n *\n * If the passed sample_fmt is already in packed format, the format returned is\n * the same as the input.\n *\n * @return  the packed alternative form of the given sample format or\n            AV_SAMPLE_FMT_NONE on error.\n */\nenum AVSampleFormat av_get_packed_sample_fmt(enum AVSampleFormat sample_fmt);\n\n/**\n * Get the planar alternative form of the given sample format.\n *\n * If the passed sample_fmt is already in planar format, the format returned is\n * the same as the input.\n *\n * @return  the planar alternative form of the given sample format or\n            AV_SAMPLE_FMT_NONE on error.\n */\nenum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);\n\n/**\n * Generate a string corresponding to the sample format with\n * sample_fmt, or a header if sample_fmt is negative.\n *\n * @param buf the buffer where to write the string\n * @param buf_size the size of buf\n * @param sample_fmt the number of the sample format to print the\n * corresponding info string, or a negative value to print the\n * corresponding header.\n * @return the pointer to the filled buffer or NULL if sample_fmt is\n * unknown or in case of other errors\n */\nchar *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);\n\n/**\n * Return number of bytes per sample.\n *\n * @param sample_fmt the sample format\n * @return number of bytes per sample or zero if unknown for the given\n * sample format\n */\nint av_get_bytes_per_sample(enum AVSampleFormat sample_fmt);\n\n/**\n * Check if the sample format is planar.\n *\n * @param sample_fmt the sample format to inspect\n * @return 1 if the sample format is planar, 0 if it is interleaved\n */\nint av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt);\n\n/**\n * Get the required buffer size for the given audio parameters.\n *\n * @param[out] linesize calculated linesize, may be NULL\n * @param nb_channels   the number of channels\n * @param nb_samples    the number of samples in a single channel\n * @param sample_fmt    the sample format\n * @param align         buffer size alignment (0 = default, 1 = no alignment)\n * @return              required buffer size, or negative error code on failure\n */\nint av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,\n                               enum AVSampleFormat sample_fmt, int align);\n\n/**\n * @}\n *\n * @defgroup lavu_sampmanip Samples manipulation\n *\n * Functions that manipulate audio samples\n * @{\n */\n\n/**\n * Fill plane data pointers and linesize for samples with sample\n * format sample_fmt.\n *\n * The audio_data array is filled with the pointers to the samples data planes:\n * for planar, set the start point of each channel's data within the buffer,\n * for packed, set the start point of the entire buffer only.\n *\n * The value pointed to by linesize is set to the aligned size of each\n * channel's data buffer for planar layout, or to the aligned size of the\n * buffer for all channels for packed layout.\n *\n * The buffer in buf must be big enough to contain all the samples\n * (use av_samples_get_buffer_size() to compute its minimum size),\n * otherwise the audio_data pointers will point to invalid data.\n *\n * @see enum AVSampleFormat\n * The documentation for AVSampleFormat describes the data layout.\n *\n * @param[out] audio_data  array to be filled with the pointer for each channel\n * @param[out] linesize    calculated linesize, may be NULL\n * @param buf              the pointer to a buffer containing the samples\n * @param nb_channels      the number of channels\n * @param nb_samples       the number of samples in a single channel\n * @param sample_fmt       the sample format\n * @param align            buffer size alignment (0 = default, 1 = no alignment)\n * @return                 >=0 on success or a negative error code on failure\n * @todo return minimum size in bytes required for the buffer in case\n * of success at the next bump\n */\nint av_samples_fill_arrays(uint8_t **audio_data, int *linesize,\n                           const uint8_t *buf,\n                           int nb_channels, int nb_samples,\n                           enum AVSampleFormat sample_fmt, int align);\n\n/**\n * Allocate a samples buffer for nb_samples samples, and fill data pointers and\n * linesize accordingly.\n * The allocated samples buffer can be freed by using av_freep(&audio_data[0])\n * Allocated data will be initialized to silence.\n *\n * @see enum AVSampleFormat\n * The documentation for AVSampleFormat describes the data layout.\n *\n * @param[out] audio_data  array to be filled with the pointer for each channel\n * @param[out] linesize    aligned size for audio buffer(s), may be NULL\n * @param nb_channels      number of audio channels\n * @param nb_samples       number of samples per channel\n * @param align            buffer size alignment (0 = default, 1 = no alignment)\n * @return                 >=0 on success or a negative error code on failure\n * @todo return the size of the allocated buffer in case of success at the next bump\n * @see av_samples_fill_arrays()\n * @see av_samples_alloc_array_and_samples()\n */\nint av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,\n                     int nb_samples, enum AVSampleFormat sample_fmt, int align);\n\n/**\n * Allocate a data pointers array, samples buffer for nb_samples\n * samples, and fill data pointers and linesize accordingly.\n *\n * This is the same as av_samples_alloc(), but also allocates the data\n * pointers array.\n *\n * @see av_samples_alloc()\n */\nint av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels,\n                                       int nb_samples, enum AVSampleFormat sample_fmt, int align);\n\n/**\n * Copy samples from src to dst.\n *\n * @param dst destination array of pointers to data planes\n * @param src source array of pointers to data planes\n * @param dst_offset offset in samples at which the data will be written to dst\n * @param src_offset offset in samples at which the data will be read from src\n * @param nb_samples number of samples to be copied\n * @param nb_channels number of audio channels\n * @param sample_fmt audio sample format\n */\nint av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset,\n                    int src_offset, int nb_samples, int nb_channels,\n                    enum AVSampleFormat sample_fmt);\n\n/**\n * Fill an audio buffer with silence.\n *\n * @param audio_data  array of pointers to data planes\n * @param offset      offset in samples at which to start filling\n * @param nb_samples  number of samples to fill\n * @param nb_channels number of audio channels\n * @param sample_fmt  audio sample format\n */\nint av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples,\n                           int nb_channels, enum AVSampleFormat sample_fmt);\n\n/**\n * @}\n * @}\n */\n#endif /* AVUTIL_SAMPLEFMT_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/sha.h",
    "content": "/*\n * Copyright (C) 2007 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_SHA_H\n#define AVUTIL_SHA_H\n\n#include <stdint.h>\n\n#include \"attributes.h\"\n#include \"version.h\"\n\n/**\n * @defgroup lavu_sha SHA\n * @ingroup lavu_crypto\n * @{\n */\n\nextern const int av_sha_size;\n\nstruct AVSHA;\n\n/**\n * Allocate an AVSHA context.\n */\nstruct AVSHA *av_sha_alloc(void);\n\n/**\n * Initialize SHA-1 or SHA-2 hashing.\n *\n * @param context pointer to the function context (of size av_sha_size)\n * @param bits    number of bits in digest (SHA-1 - 160 bits, SHA-2 224 or 256 bits)\n * @return        zero if initialization succeeded, -1 otherwise\n */\nint av_sha_init(struct AVSHA* context, int bits);\n\n/**\n * Update hash value.\n *\n * @param context hash function context\n * @param data    input data to update hash with\n * @param len     input data length\n */\nvoid av_sha_update(struct AVSHA* context, const uint8_t* data, unsigned int len);\n\n/**\n * Finish hashing and output digest value.\n *\n * @param context hash function context\n * @param digest  buffer where output digest value is stored\n */\nvoid av_sha_final(struct AVSHA* context, uint8_t *digest);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_SHA_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/sha512.h",
    "content": "/*\n * Copyright (C) 2007 Michael Niedermayer <michaelni@gmx.at>\n * Copyright (C) 2013 James Almer <jamrial@gmail.com>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_SHA512_H\n#define AVUTIL_SHA512_H\n\n#include <stdint.h>\n\n#include \"attributes.h\"\n#include \"version.h\"\n\n/**\n * @defgroup lavu_sha512 SHA512\n * @ingroup lavu_crypto\n * @{\n */\n\nextern const int av_sha512_size;\n\nstruct AVSHA512;\n\n/**\n * Allocate an AVSHA512 context.\n */\nstruct AVSHA512 *av_sha512_alloc(void);\n\n/**\n * Initialize SHA-2 512 hashing.\n *\n * @param context pointer to the function context (of size av_sha512_size)\n * @param bits    number of bits in digest (224, 256, 384 or 512 bits)\n * @return        zero if initialization succeeded, -1 otherwise\n */\nint av_sha512_init(struct AVSHA512* context, int bits);\n\n/**\n * Update hash value.\n *\n * @param context hash function context\n * @param data    input data to update hash with\n * @param len     input data length\n */\nvoid av_sha512_update(struct AVSHA512* context, const uint8_t* data, unsigned int len);\n\n/**\n * Finish hashing and output digest value.\n *\n * @param context hash function context\n * @param digest  buffer where output digest value is stored\n */\nvoid av_sha512_final(struct AVSHA512* context, uint8_t *digest);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_SHA512_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/stereo3d.h",
    "content": "/*\n * Copyright (c) 2013 Vittorio Giovara <vittorio.giovara@gmail.com>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_STEREO3D_H\n#define AVUTIL_STEREO3D_H\n\n#include <stdint.h>\n\n#include \"frame.h\"\n\n/**\n * List of possible 3D Types\n */\nenum AVStereo3DType {\n    /**\n     * Video is not stereoscopic (and metadata has to be there).\n     */\n    AV_STEREO3D_2D,\n\n    /**\n     * Views are next to each other.\n     *\n     *    LLLLRRRR\n     *    LLLLRRRR\n     *    LLLLRRRR\n     *    ...\n     */\n    AV_STEREO3D_SIDEBYSIDE,\n\n    /**\n     * Views are on top of each other.\n     *\n     *    LLLLLLLL\n     *    LLLLLLLL\n     *    RRRRRRRR\n     *    RRRRRRRR\n     */\n    AV_STEREO3D_TOPBOTTOM,\n\n    /**\n     * Views are alternated temporally.\n     *\n     *     frame0   frame1   frame2   ...\n     *    LLLLLLLL RRRRRRRR LLLLLLLL\n     *    LLLLLLLL RRRRRRRR LLLLLLLL\n     *    LLLLLLLL RRRRRRRR LLLLLLLL\n     *    ...      ...      ...\n     */\n    AV_STEREO3D_FRAMESEQUENCE,\n\n    /**\n     * Views are packed in a checkerboard-like structure per pixel.\n     *\n     *    LRLRLRLR\n     *    RLRLRLRL\n     *    LRLRLRLR\n     *    ...\n     */\n    AV_STEREO3D_CHECKERBOARD,\n\n    /**\n     * Views are next to each other, but when upscaling\n     * apply a checkerboard pattern.\n     *\n     *     LLLLRRRR          L L L L    R R R R\n     *     LLLLRRRR    =>     L L L L  R R R R\n     *     LLLLRRRR          L L L L    R R R R\n     *     LLLLRRRR           L L L L  R R R R\n     */\n    AV_STEREO3D_SIDEBYSIDE_QUINCUNX,\n\n    /**\n     * Views are packed per line, as if interlaced.\n     *\n     *    LLLLLLLL\n     *    RRRRRRRR\n     *    LLLLLLLL\n     *    ...\n     */\n    AV_STEREO3D_LINES,\n\n    /**\n     * Views are packed per column.\n     *\n     *    LRLRLRLR\n     *    LRLRLRLR\n     *    LRLRLRLR\n     *    ...\n     */\n    AV_STEREO3D_COLUMNS,\n};\n\n\n/**\n * Inverted views, Right/Bottom represents the left view.\n */\n#define AV_STEREO3D_FLAG_INVERT     (1 << 0)\n\n/**\n * Stereo 3D type: this structure describes how two videos are packed\n * within a single video surface, with additional information as needed.\n *\n * @note The struct must be allocated with av_stereo3d_alloc() and\n *       its size is not a part of the public ABI.\n */\ntypedef struct AVStereo3D {\n    /**\n     * How views are packed within the video.\n     */\n    enum AVStereo3DType type;\n\n    /**\n     * Additional information about the frame packing.\n     */\n    int flags;\n} AVStereo3D;\n\n/**\n * Allocate an AVStereo3D structure and set its fields to default values.\n * The resulting struct can be freed using av_freep().\n *\n * @return An AVStereo3D filled with default values or NULL on failure.\n */\nAVStereo3D *av_stereo3d_alloc(void);\n\n/**\n * Allocate a complete AVFrameSideData and add it to the frame.\n *\n * @param frame The frame which side data is added to.\n *\n * @return The AVStereo3D structure to be filled by caller.\n */\nAVStereo3D *av_stereo3d_create_side_data(AVFrame *frame);\n\n#endif /* AVUTIL_STEREO3D_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/tea.h",
    "content": "/*\n * A 32-bit implementation of the TEA algorithm\n * Copyright (c) 2015 Vesselin Bontchev\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_TEA_H\n#define AVUTIL_TEA_H\n\n#include <stdint.h>\n\n/**\n * @file\n * @brief Public header for libavutil TEA algorithm\n * @defgroup lavu_tea TEA\n * @ingroup lavu_crypto\n * @{\n */\n\nextern const int av_tea_size;\n\nstruct AVTEA;\n\n/**\n  * Allocate an AVTEA context\n  * To free the struct: av_free(ptr)\n  */\nstruct AVTEA *av_tea_alloc(void);\n\n/**\n * Initialize an AVTEA context.\n *\n * @param ctx an AVTEA context\n * @param key a key of 16 bytes used for encryption/decryption\n * @param rounds the number of rounds in TEA (64 is the \"standard\")\n */\nvoid av_tea_init(struct AVTEA *ctx, const uint8_t key[16], int rounds);\n\n/**\n * Encrypt or decrypt a buffer using a previously initialized context.\n *\n * @param ctx an AVTEA context\n * @param dst destination array, can be equal to src\n * @param src source array, can be equal to dst\n * @param count number of 8 byte blocks\n * @param iv initialization vector for CBC mode, if NULL then ECB will be used\n * @param decrypt 0 for encryption, 1 for decryption\n */\nvoid av_tea_crypt(struct AVTEA *ctx, uint8_t *dst, const uint8_t *src,\n                  int count, uint8_t *iv, int decrypt);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_TEA_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/threadmessage.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free 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; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * FFmpeg is distributed in the hope that it 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 * You should have received a copy of the GNU Lesser General Public License\n * along with FFmpeg; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_THREADMESSAGE_H\n#define AVUTIL_THREADMESSAGE_H\n\ntypedef struct AVThreadMessageQueue AVThreadMessageQueue;\n\ntypedef enum AVThreadMessageFlags {\n\n    /**\n     * Perform non-blocking operation.\n     * If this flag is set, send and recv operations are non-blocking and\n     * return AVERROR(EAGAIN) immediately if they can not proceed.\n     */\n    AV_THREAD_MESSAGE_NONBLOCK = 1,\n\n} AVThreadMessageFlags;\n\n/**\n * Allocate a new message queue.\n *\n * @param mq      pointer to the message queue\n * @param nelem   maximum number of elements in the queue\n * @param elsize  size of each element in the queue\n * @return  >=0 for success; <0 for error, in particular AVERROR(ENOSYS) if\n *          lavu was built without thread support\n */\nint av_thread_message_queue_alloc(AVThreadMessageQueue **mq,\n                                  unsigned nelem,\n                                  unsigned elsize);\n\n/**\n * Free a message queue.\n *\n * The message queue must no longer be in use by another thread.\n */\nvoid av_thread_message_queue_free(AVThreadMessageQueue **mq);\n\n/**\n * Send a message on the queue.\n */\nint av_thread_message_queue_send(AVThreadMessageQueue *mq,\n                                 void *msg,\n                                 unsigned flags);\n\n/**\n * Receive a message from the queue.\n */\nint av_thread_message_queue_recv(AVThreadMessageQueue *mq,\n                                 void *msg,\n                                 unsigned flags);\n\n/**\n * Set the sending error code.\n *\n * If the error code is set to non-zero, av_thread_message_queue_recv() will\n * return it immediately when there are no longer available messages.\n * Conventional values, such as AVERROR_EOF or AVERROR(EAGAIN), can be used\n * to cause the receiving thread to stop or suspend its operation.\n */\nvoid av_thread_message_queue_set_err_send(AVThreadMessageQueue *mq,\n                                          int err);\n\n/**\n * Set the receiving error code.\n *\n * If the error code is set to non-zero, av_thread_message_queue_send() will\n * return it immediately. Conventional values, such as AVERROR_EOF or\n * AVERROR(EAGAIN), can be used to cause the sending thread to stop or\n * suspend its operation.\n */\nvoid av_thread_message_queue_set_err_recv(AVThreadMessageQueue *mq,\n                                          int err);\n\n/**\n * Set the optional free message callback function which will be called if an\n * operation is removing messages from the queue.\n */\nvoid av_thread_message_queue_set_free_func(AVThreadMessageQueue *mq,\n                                           void (*free_func)(void *msg));\n\n/**\n * Flush the message queue\n *\n * This function is mostly equivalent to reading and free-ing every message\n * except that it will be done in a single operation (no lock/unlock between\n * reads).\n */\nvoid av_thread_message_flush(AVThreadMessageQueue *mq);\n\n#endif /* AVUTIL_THREADMESSAGE_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/time.h",
    "content": "/*\n * Copyright (c) 2000-2003 Fabrice Bellard\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_TIME_H\n#define AVUTIL_TIME_H\n\n#include <stdint.h>\n\n/**\n * Get the current time in microseconds.\n */\nint64_t av_gettime(void);\n\n/**\n * Get the current time in microseconds since some unspecified starting point.\n * On platforms that support it, the time comes from a monotonic clock\n * This property makes this time source ideal for measuring relative time.\n * The returned values may not be monotonic on platforms where a monotonic\n * clock is not available.\n */\nint64_t av_gettime_relative(void);\n\n/**\n * Indicates with a boolean result if the av_gettime_relative() time source\n * is monotonic.\n */\nint av_gettime_relative_is_monotonic(void);\n\n/**\n * Sleep for a period of time.  Although the duration is expressed in\n * microseconds, the actual delay may be rounded to the precision of the\n * system timer.\n *\n * @param  usec Number of microseconds to sleep.\n * @return zero on success or (negative) error code.\n */\nint av_usleep(unsigned usec);\n\n#endif /* AVUTIL_TIME_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/timecode.h",
    "content": "/*\n * Copyright (c) 2006 Smartjog S.A.S, Baptiste Coudurier <baptiste.coudurier@gmail.com>\n * Copyright (c) 2011-2012 Smartjog S.A.S, Clément Bœsch <clement.boesch@smartjog.com>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * Timecode helpers header\n */\n\n#ifndef AVUTIL_TIMECODE_H\n#define AVUTIL_TIMECODE_H\n\n#include <stdint.h>\n#include \"rational.h\"\n\n#define AV_TIMECODE_STR_SIZE 16\n\nenum AVTimecodeFlag {\n    AV_TIMECODE_FLAG_DROPFRAME      = 1<<0, ///< timecode is drop frame\n    AV_TIMECODE_FLAG_24HOURSMAX     = 1<<1, ///< timecode wraps after 24 hours\n    AV_TIMECODE_FLAG_ALLOWNEGATIVE  = 1<<2, ///< negative time values are allowed\n};\n\ntypedef struct {\n    int start;          ///< timecode frame start (first base frame number)\n    uint32_t flags;     ///< flags such as drop frame, +24 hours support, ...\n    AVRational rate;    ///< frame rate in rational form\n    unsigned fps;       ///< frame per second; must be consistent with the rate field\n} AVTimecode;\n\n/**\n * Adjust frame number for NTSC drop frame time code.\n *\n * @param framenum frame number to adjust\n * @param fps      frame per second, 30 or 60\n * @return         adjusted frame number\n * @warning        adjustment is only valid in NTSC 29.97 and 59.94\n */\nint av_timecode_adjust_ntsc_framenum2(int framenum, int fps);\n\n/**\n * Convert frame number to SMPTE 12M binary representation.\n *\n * @param tc       timecode data correctly initialized\n * @param framenum frame number\n * @return         the SMPTE binary representation\n *\n * @note Frame number adjustment is automatically done in case of drop timecode,\n *       you do NOT have to call av_timecode_adjust_ntsc_framenum2().\n * @note The frame number is relative to tc->start.\n * @note Color frame (CF), binary group flags (BGF) and biphase mark polarity\n *       correction (PC) bits are set to zero.\n */\nuint32_t av_timecode_get_smpte_from_framenum(const AVTimecode *tc, int framenum);\n\n/**\n * Load timecode string in buf.\n *\n * @param buf      destination buffer, must be at least AV_TIMECODE_STR_SIZE long\n * @param tc       timecode data correctly initialized\n * @param framenum frame number\n * @return         the buf parameter\n *\n * @note Timecode representation can be a negative timecode and have more than\n *       24 hours, but will only be honored if the flags are correctly set.\n * @note The frame number is relative to tc->start.\n */\nchar *av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum);\n\n/**\n * Get the timecode string from the SMPTE timecode format.\n *\n * @param buf        destination buffer, must be at least AV_TIMECODE_STR_SIZE long\n * @param tcsmpte    the 32-bit SMPTE timecode\n * @param prevent_df prevent the use of a drop flag when it is known the DF bit\n *                   is arbitrary\n * @return           the buf parameter\n */\nchar *av_timecode_make_smpte_tc_string(char *buf, uint32_t tcsmpte, int prevent_df);\n\n/**\n * Get the timecode string from the 25-bit timecode format (MPEG GOP format).\n *\n * @param buf     destination buffer, must be at least AV_TIMECODE_STR_SIZE long\n * @param tc25bit the 25-bits timecode\n * @return        the buf parameter\n */\nchar *av_timecode_make_mpeg_tc_string(char *buf, uint32_t tc25bit);\n\n/**\n * Init a timecode struct with the passed parameters.\n *\n * @param log_ctx     a pointer to an arbitrary struct of which the first field\n *                    is a pointer to an AVClass struct (used for av_log)\n * @param tc          pointer to an allocated AVTimecode\n * @param rate        frame rate in rational form\n * @param flags       miscellaneous flags such as drop frame, +24 hours, ...\n *                    (see AVTimecodeFlag)\n * @param frame_start the first frame number\n * @return            0 on success, AVERROR otherwise\n */\nint av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start, void *log_ctx);\n\n/**\n * Parse timecode representation (hh:mm:ss[:;.]ff).\n *\n * @param log_ctx a pointer to an arbitrary struct of which the first field is a\n *                pointer to an AVClass struct (used for av_log).\n * @param tc      pointer to an allocated AVTimecode\n * @param rate    frame rate in rational form\n * @param str     timecode string which will determine the frame start\n * @return        0 on success, AVERROR otherwise\n */\nint av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *str, void *log_ctx);\n\n/**\n * Check if the timecode feature is available for the given frame rate\n *\n * @return 0 if supported, <0 otherwise\n */\nint av_timecode_check_frame_rate(AVRational rate);\n\n#endif /* AVUTIL_TIMECODE_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/timestamp.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * timestamp utils, mostly useful for debugging/logging purposes\n */\n\n#ifndef AVUTIL_TIMESTAMP_H\n#define AVUTIL_TIMESTAMP_H\n\n#include \"common.h\"\n\n#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) && !defined(PRId64)\n#error missing -D__STDC_FORMAT_MACROS / #define __STDC_FORMAT_MACROS\n#endif\n\n#define AV_TS_MAX_STRING_SIZE 32\n\n/**\n * Fill the provided buffer with a string containing a timestamp\n * representation.\n *\n * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE\n * @param ts the timestamp to represent\n * @return the buffer in input\n */\nstatic inline char *av_ts_make_string(char *buf, int64_t ts)\n{\n    if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, \"NOPTS\");\n    else                      snprintf(buf, AV_TS_MAX_STRING_SIZE, \"%\"PRId64, ts);\n    return buf;\n}\n\n/**\n * Convenience macro, the return value should be used only directly in\n * function arguments but never stand-alone.\n */\n#define av_ts2str(ts) av_ts_make_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts)\n\n/**\n * Fill the provided buffer with a string containing a timestamp time\n * representation.\n *\n * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE\n * @param ts the timestamp to represent\n * @param tb the timebase of the timestamp\n * @return the buffer in input\n */\nstatic inline char *av_ts_make_time_string(char *buf, int64_t ts, AVRational *tb)\n{\n    if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, \"NOPTS\");\n    else                      snprintf(buf, AV_TS_MAX_STRING_SIZE, \"%.6g\", av_q2d(*tb) * ts);\n    return buf;\n}\n\n/**\n * Convenience macro, the return value should be used only directly in\n * function arguments but never stand-alone.\n */\n#define av_ts2timestr(ts, tb) av_ts_make_time_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts, tb)\n\n#endif /* AVUTIL_TIMESTAMP_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/tree.h",
    "content": "/*\n * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n/**\n * @file\n * A tree container.\n * @author Michael Niedermayer <michaelni@gmx.at>\n */\n\n#ifndef AVUTIL_TREE_H\n#define AVUTIL_TREE_H\n\n#include \"attributes.h\"\n#include \"version.h\"\n\n/**\n * @addtogroup lavu_tree AVTree\n * @ingroup lavu_data\n *\n * Low-complexity tree container\n *\n * Insertion, removal, finding equal, largest which is smaller than and\n * smallest which is larger than, all have O(log n) worst-case complexity.\n * @{\n */\n\n\nstruct AVTreeNode;\nextern const int av_tree_node_size;\n\n/**\n * Allocate an AVTreeNode.\n */\nstruct AVTreeNode *av_tree_node_alloc(void);\n\n/**\n * Find an element.\n * @param root a pointer to the root node of the tree\n * @param next If next is not NULL, then next[0] will contain the previous\n *             element and next[1] the next element. If either does not exist,\n *             then the corresponding entry in next is unchanged.\n * @param cmp compare function used to compare elements in the tree,\n *            API identical to that of Standard C's qsort\n *            It is guranteed that the first and only the first argument to cmp()\n *            will be the key parameter to av_tree_find(), thus it could if the\n *            user wants, be a different type (like an opaque context).\n * @return An element with cmp(key, elem) == 0 or NULL if no such element\n *         exists in the tree.\n */\nvoid *av_tree_find(const struct AVTreeNode *root, void *key,\n                   int (*cmp)(const void *key, const void *b), void *next[2]);\n\n/**\n * Insert or remove an element.\n *\n * If *next is NULL, then the supplied element will be removed if it exists.\n * If *next is non-NULL, then the supplied element will be inserted, unless\n * it already exists in the tree.\n *\n * @param rootp A pointer to a pointer to the root node of the tree; note that\n *              the root node can change during insertions, this is required\n *              to keep the tree balanced.\n * @param key  pointer to the element key to insert in the tree\n * @param next Used to allocate and free AVTreeNodes. For insertion the user\n *             must set it to an allocated and zeroed object of at least\n *             av_tree_node_size bytes size. av_tree_insert() will set it to\n *             NULL if it has been consumed.\n *             For deleting elements *next is set to NULL by the user and\n *             av_tree_insert() will set it to the AVTreeNode which was\n *             used for the removed element.\n *             This allows the use of flat arrays, which have\n *             lower overhead compared to many malloced elements.\n *             You might want to define a function like:\n *             @code\n *             void *tree_insert(struct AVTreeNode **rootp, void *key,\n *                               int (*cmp)(void *key, const void *b),\n *                               AVTreeNode **next)\n *             {\n *                 if (!*next)\n *                     *next = av_mallocz(av_tree_node_size);\n *                 return av_tree_insert(rootp, key, cmp, next);\n *             }\n *             void *tree_remove(struct AVTreeNode **rootp, void *key,\n *                               int (*cmp)(void *key, const void *b, AVTreeNode **next))\n *             {\n *                 av_freep(next);\n *                 return av_tree_insert(rootp, key, cmp, next);\n *             }\n *             @endcode\n * @param cmp compare function used to compare elements in the tree, API identical\n *            to that of Standard C's qsort\n * @return If no insertion happened, the found element; if an insertion or\n *         removal happened, then either key or NULL will be returned.\n *         Which one it is depends on the tree state and the implementation. You\n *         should make no assumptions that it's one or the other in the code.\n */\nvoid *av_tree_insert(struct AVTreeNode **rootp, void *key,\n                     int (*cmp)(const void *key, const void *b),\n                     struct AVTreeNode **next);\n\nvoid av_tree_destroy(struct AVTreeNode *t);\n\n/**\n * Apply enu(opaque, &elem) to all the elements in the tree in a given range.\n *\n * @param cmp a comparison function that returns < 0 for a element below the\n *            range, > 0 for a element above the range and == 0 for a\n *            element inside the range\n *\n * @note The cmp function should use the same ordering used to construct the\n *       tree.\n */\nvoid av_tree_enumerate(struct AVTreeNode *t, void *opaque,\n                       int (*cmp)(void *opaque, void *elem),\n                       int (*enu)(void *opaque, void *elem));\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_TREE_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/twofish.h",
    "content": "/*\n * An implementation of the TwoFish algorithm\n * Copyright (c) 2015 Supraja Meedinti\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_TWOFISH_H\n#define AVUTIL_TWOFISH_H\n\n#include <stdint.h>\n\n\n/**\n  * @file\n  * @brief Public header for libavutil TWOFISH algorithm\n  * @defgroup lavu_twofish TWOFISH\n  * @ingroup lavu_crypto\n  * @{\n  */\n\nextern const int av_twofish_size;\n\nstruct AVTWOFISH;\n\n/**\n  * Allocate an AVTWOFISH context\n  * To free the struct: av_free(ptr)\n  */\nstruct AVTWOFISH *av_twofish_alloc(void);\n\n/**\n  * Initialize an AVTWOFISH context.\n  *\n  * @param ctx an AVTWOFISH context\n  * @param key a key of size ranging from 1 to 32 bytes used for encryption/decryption\n  * @param key_bits number of keybits: 128, 192, 256 If less than the required, padded with zeroes to nearest valid value; return value is 0 if key_bits is 128/192/256, -1 if less than 0, 1 otherwise\n */\nint av_twofish_init(struct AVTWOFISH *ctx, const uint8_t *key, int key_bits);\n\n/**\n  * Encrypt or decrypt a buffer using a previously initialized context\n  *\n  * @param ctx an AVTWOFISH context\n  * @param dst destination array, can be equal to src\n  * @param src source array, can be equal to dst\n  * @param count number of 16 byte blocks\n  * @paran iv initialization vector for CBC mode, NULL for ECB mode\n  * @param decrypt 0 for encryption, 1 for decryption\n */\nvoid av_twofish_crypt(struct AVTWOFISH *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt);\n\n/**\n * @}\n */\n#endif /* AVUTIL_TWOFISH_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/version.h",
    "content": "/*\n * copyright (c) 2003 Fabrice Bellard\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_VERSION_H\n#define AVUTIL_VERSION_H\n\n#include \"macros.h\"\n\n/**\n * @addtogroup version_utils\n *\n * Useful to check and match library version in order to maintain\n * backward compatibility.\n *\n * @{\n */\n\n#define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c))\n#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c\n#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)\n\n/**\n * Extract version components from the full ::AV_VERSION_INT int as returned\n * by functions like ::avformat_version() and ::avcodec_version()\n */\n#define AV_VERSION_MAJOR(a) ((a) >> 16)\n#define AV_VERSION_MINOR(a) (((a) & 0x00FF00) >> 8)\n#define AV_VERSION_MICRO(a) ((a) & 0xFF)\n\n/**\n * @}\n */\n\n/**\n * @file\n * @ingroup lavu\n * Libavutil version macros\n */\n\n/**\n * @defgroup lavu_ver Version and Build diagnostics\n *\n * Macros and function useful to check at compiletime and at runtime\n * which version of libavutil is in use.\n *\n * @{\n */\n\n#define LIBAVUTIL_VERSION_MAJOR  55\n#define LIBAVUTIL_VERSION_MINOR  11\n#define LIBAVUTIL_VERSION_MICRO 100\n\n#define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \\\n                                               LIBAVUTIL_VERSION_MINOR, \\\n                                               LIBAVUTIL_VERSION_MICRO)\n#define LIBAVUTIL_VERSION       AV_VERSION(LIBAVUTIL_VERSION_MAJOR,     \\\n                                           LIBAVUTIL_VERSION_MINOR,     \\\n                                           LIBAVUTIL_VERSION_MICRO)\n#define LIBAVUTIL_BUILD         LIBAVUTIL_VERSION_INT\n\n#define LIBAVUTIL_IDENT         \"Lavu\" AV_STRINGIFY(LIBAVUTIL_VERSION)\n\n/**\n * @}\n *\n * @defgroup depr_guards Deprecation guards\n * FF_API_* defines may be placed below to indicate public API that will be\n * dropped at a future version bump. The defines themselves are not part of\n * the public API and may change, break or disappear at any time.\n *\n * @note, when bumping the major version it is recommended to manually\n * disable each FF_API_* in its own commit instead of disabling them all\n * at once through the bump. This improves the git bisect-ability of the change.\n *\n * @{\n */\n\n#ifndef FF_API_VDPAU\n#define FF_API_VDPAU                    (LIBAVUTIL_VERSION_MAJOR < 56)\n#endif\n#ifndef FF_API_XVMC\n#define FF_API_XVMC                     (LIBAVUTIL_VERSION_MAJOR < 56)\n#endif\n#ifndef FF_API_OPT_TYPE_METADATA\n#define FF_API_OPT_TYPE_METADATA        (LIBAVUTIL_VERSION_MAJOR < 56)\n#endif\n#ifndef FF_API_DLOG\n#define FF_API_DLOG                     (LIBAVUTIL_VERSION_MAJOR < 56)\n#endif\n#ifndef FF_API_VAAPI\n#define FF_API_VAAPI                    (LIBAVUTIL_VERSION_MAJOR < 56)\n#endif\n#ifndef FF_API_FRAME_QP\n#define FF_API_FRAME_QP                 (LIBAVUTIL_VERSION_MAJOR < 56)\n#endif\n#ifndef FF_API_PLUS1_MINUS1\n#define FF_API_PLUS1_MINUS1             (LIBAVUTIL_VERSION_MAJOR < 56)\n#endif\n#ifndef FF_API_ERROR_FRAME\n#define FF_API_ERROR_FRAME              (LIBAVUTIL_VERSION_MAJOR < 56)\n#endif\n#ifndef FF_API_CRC_BIG_TABLE\n#define FF_API_CRC_BIG_TABLE            (LIBAVUTIL_VERSION_MAJOR < 56)\n#endif\n\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_VERSION_H */\n\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libavutil/xtea.h",
    "content": "/*\n * A 32-bit implementation of the XTEA algorithm\n * Copyright (c) 2012 Samuel Pitoiset\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_XTEA_H\n#define AVUTIL_XTEA_H\n\n#include <stdint.h>\n\n/**\n * @file\n * @brief Public header for libavutil XTEA algorithm\n * @defgroup lavu_xtea XTEA\n * @ingroup lavu_crypto\n * @{\n */\n\ntypedef struct AVXTEA {\n    uint32_t key[16];\n} AVXTEA;\n\n/**\n * Allocate an AVXTEA context.\n */\nAVXTEA *av_xtea_alloc(void);\n\n/**\n * Initialize an AVXTEA context.\n *\n * @param ctx an AVXTEA context\n * @param key a key of 16 bytes used for encryption/decryption,\n *            interpreted as big endian 32 bit numbers\n */\nvoid av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]);\n\n/**\n * Initialize an AVXTEA context.\n *\n * @param ctx an AVXTEA context\n * @param key a key of 16 bytes used for encryption/decryption,\n *            interpreted as little endian 32 bit numbers\n */\nvoid av_xtea_le_init(struct AVXTEA *ctx, const uint8_t key[16]);\n\n/**\n * Encrypt or decrypt a buffer using a previously initialized context,\n * in big endian format.\n *\n * @param ctx an AVXTEA context\n * @param dst destination array, can be equal to src\n * @param src source array, can be equal to dst\n * @param count number of 8 byte blocks\n * @param iv initialization vector for CBC mode, if NULL then ECB will be used\n * @param decrypt 0 for encryption, 1 for decryption\n */\nvoid av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src,\n                   int count, uint8_t *iv, int decrypt);\n\n/**\n * Encrypt or decrypt a buffer using a previously initialized context,\n * in little endian format.\n *\n * @param ctx an AVXTEA context\n * @param dst destination array, can be equal to src\n * @param src source array, can be equal to dst\n * @param count number of 8 byte blocks\n * @param iv initialization vector for CBC mode, if NULL then ECB will be used\n * @param decrypt 0 for encryption, 1 for decryption\n */\nvoid av_xtea_le_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src,\n                      int count, uint8_t *iv, int decrypt);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_XTEA_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libswresample/swresample.h",
    "content": "/*\n * Copyright (C) 2011-2013 Michael Niedermayer (michaelni@gmx.at)\n *\n * This file is part of libswresample\n *\n * libswresample is free software; you can redistribute it and/or\n * 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 * libswresample is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with libswresample; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef SWRESAMPLE_SWRESAMPLE_H\n#define SWRESAMPLE_SWRESAMPLE_H\n\n/**\n * @file\n * @ingroup lswr\n * libswresample public header\n */\n\n/**\n * @defgroup lswr Libswresample\n * @{\n *\n * Libswresample (lswr) is a library that handles audio resampling, sample\n * format conversion and mixing.\n *\n * Interaction with lswr is done through SwrContext, which is\n * allocated with swr_alloc() or swr_alloc_set_opts(). It is opaque, so all parameters\n * must be set with the @ref avoptions API.\n *\n * The first thing you will need to do in order to use lswr is to allocate\n * SwrContext. This can be done with swr_alloc() or swr_alloc_set_opts(). If you\n * are using the former, you must set options through the @ref avoptions API.\n * The latter function provides the same feature, but it allows you to set some\n * common options in the same statement.\n *\n * For example the following code will setup conversion from planar float sample\n * format to interleaved signed 16-bit integer, downsampling from 48kHz to\n * 44.1kHz and downmixing from 5.1 channels to stereo (using the default mixing\n * matrix). This is using the swr_alloc() function.\n * @code\n * SwrContext *swr = swr_alloc();\n * av_opt_set_channel_layout(swr, \"in_channel_layout\",  AV_CH_LAYOUT_5POINT1, 0);\n * av_opt_set_channel_layout(swr, \"out_channel_layout\", AV_CH_LAYOUT_STEREO,  0);\n * av_opt_set_int(swr, \"in_sample_rate\",     48000,                0);\n * av_opt_set_int(swr, \"out_sample_rate\",    44100,                0);\n * av_opt_set_sample_fmt(swr, \"in_sample_fmt\",  AV_SAMPLE_FMT_FLTP, 0);\n * av_opt_set_sample_fmt(swr, \"out_sample_fmt\", AV_SAMPLE_FMT_S16,  0);\n * @endcode\n *\n * The same job can be done using swr_alloc_set_opts() as well:\n * @code\n * SwrContext *swr = swr_alloc_set_opts(NULL,  // we're allocating a new context\n *                       AV_CH_LAYOUT_STEREO,  // out_ch_layout\n *                       AV_SAMPLE_FMT_S16,    // out_sample_fmt\n *                       44100,                // out_sample_rate\n *                       AV_CH_LAYOUT_5POINT1, // in_ch_layout\n *                       AV_SAMPLE_FMT_FLTP,   // in_sample_fmt\n *                       48000,                // in_sample_rate\n *                       0,                    // log_offset\n *                       NULL);                // log_ctx\n * @endcode\n *\n * Once all values have been set, it must be initialized with swr_init(). If\n * you need to change the conversion parameters, you can change the parameters\n * using @ref AVOptions, as described above in the first example; or by using\n * swr_alloc_set_opts(), but with the first argument the allocated context.\n * You must then call swr_init() again.\n *\n * The conversion itself is done by repeatedly calling swr_convert().\n * Note that the samples may get buffered in swr if you provide insufficient\n * output space or if sample rate conversion is done, which requires \"future\"\n * samples. Samples that do not require future input can be retrieved at any\n * time by using swr_convert() (in_count can be set to 0).\n * At the end of conversion the resampling buffer can be flushed by calling\n * swr_convert() with NULL in and 0 in_count.\n *\n * The samples used in the conversion process can be managed with the libavutil\n * @ref lavu_sampmanip \"samples manipulation\" API, including av_samples_alloc()\n * function used in the following example.\n *\n * The delay between input and output, can at any time be found by using\n * swr_get_delay().\n *\n * The following code demonstrates the conversion loop assuming the parameters\n * from above and caller-defined functions get_input() and handle_output():\n * @code\n * uint8_t **input;\n * int in_samples;\n *\n * while (get_input(&input, &in_samples)) {\n *     uint8_t *output;\n *     int out_samples = av_rescale_rnd(swr_get_delay(swr, 48000) +\n *                                      in_samples, 44100, 48000, AV_ROUND_UP);\n *     av_samples_alloc(&output, NULL, 2, out_samples,\n *                      AV_SAMPLE_FMT_S16, 0);\n *     out_samples = swr_convert(swr, &output, out_samples,\n *                                      input, in_samples);\n *     handle_output(output, out_samples);\n *     av_freep(&output);\n * }\n * @endcode\n *\n * When the conversion is finished, the conversion\n * context and everything associated with it must be freed with swr_free().\n * A swr_close() function is also available, but it exists mainly for\n * compatibility with libavresample, and is not required to be called.\n *\n * There will be no memory leak if the data is not completely flushed before\n * swr_free().\n */\n\n#include <stdint.h>\n#include \"libavutil/frame.h\"\n#include \"libavutil/samplefmt.h\"\n\n#include \"libswresample/version.h\"\n\n#if LIBSWRESAMPLE_VERSION_MAJOR < 1\n#define SWR_CH_MAX 32   ///< Maximum number of channels\n#endif\n\n/**\n * @name Option constants\n * These constants are used for the @ref avoptions interface for lswr.\n * @{\n *\n */\n\n#define SWR_FLAG_RESAMPLE 1 ///< Force resampling even if equal sample rate\n//TODO use int resample ?\n//long term TODO can we enable this dynamically?\n\n/** Dithering algorithms */\nenum SwrDitherType {\n    SWR_DITHER_NONE = 0,\n    SWR_DITHER_RECTANGULAR,\n    SWR_DITHER_TRIANGULAR,\n    SWR_DITHER_TRIANGULAR_HIGHPASS,\n\n    SWR_DITHER_NS = 64,         ///< not part of API/ABI\n    SWR_DITHER_NS_LIPSHITZ,\n    SWR_DITHER_NS_F_WEIGHTED,\n    SWR_DITHER_NS_MODIFIED_E_WEIGHTED,\n    SWR_DITHER_NS_IMPROVED_E_WEIGHTED,\n    SWR_DITHER_NS_SHIBATA,\n    SWR_DITHER_NS_LOW_SHIBATA,\n    SWR_DITHER_NS_HIGH_SHIBATA,\n    SWR_DITHER_NB,              ///< not part of API/ABI\n};\n\n/** Resampling Engines */\nenum SwrEngine {\n    SWR_ENGINE_SWR,             /**< SW Resampler */\n    SWR_ENGINE_SOXR,            /**< SoX Resampler */\n    SWR_ENGINE_NB,              ///< not part of API/ABI\n};\n\n/** Resampling Filter Types */\nenum SwrFilterType {\n    SWR_FILTER_TYPE_CUBIC,              /**< Cubic */\n    SWR_FILTER_TYPE_BLACKMAN_NUTTALL,   /**< Blackman Nuttall windowed sinc */\n    SWR_FILTER_TYPE_KAISER,             /**< Kaiser windowed sinc */\n};\n\n/**\n * @}\n */\n\n/**\n * The libswresample context. Unlike libavcodec and libavformat, this structure\n * is opaque. This means that if you would like to set options, you must use\n * the @ref avoptions API and cannot directly set values to members of the\n * structure.\n */\ntypedef struct SwrContext SwrContext;\n\n/**\n * Get the AVClass for SwrContext. It can be used in combination with\n * AV_OPT_SEARCH_FAKE_OBJ for examining options.\n *\n * @see av_opt_find().\n * @return the AVClass of SwrContext\n */\nconst AVClass *swr_get_class(void);\n\n/**\n * @name SwrContext constructor functions\n * @{\n */\n\n/**\n * Allocate SwrContext.\n *\n * If you use this function you will need to set the parameters (manually or\n * with swr_alloc_set_opts()) before calling swr_init().\n *\n * @see swr_alloc_set_opts(), swr_init(), swr_free()\n * @return NULL on error, allocated context otherwise\n */\nstruct SwrContext *swr_alloc(void);\n\n/**\n * Initialize context after user parameters have been set.\n * @note The context must be configured using the AVOption API.\n *\n * @see av_opt_set_int()\n * @see av_opt_set_dict()\n *\n * @param[in,out]   s Swr context to initialize\n * @return AVERROR error code in case of failure.\n */\nint swr_init(struct SwrContext *s);\n\n/**\n * Check whether an swr context has been initialized or not.\n *\n * @param[in]       s Swr context to check\n * @see swr_init()\n * @return positive if it has been initialized, 0 if not initialized\n */\nint swr_is_initialized(struct SwrContext *s);\n\n/**\n * Allocate SwrContext if needed and set/reset common parameters.\n *\n * This function does not require s to be allocated with swr_alloc(). On the\n * other hand, swr_alloc() can use swr_alloc_set_opts() to set the parameters\n * on the allocated context.\n *\n * @param s               existing Swr context if available, or NULL if not\n * @param out_ch_layout   output channel layout (AV_CH_LAYOUT_*)\n * @param out_sample_fmt  output sample format (AV_SAMPLE_FMT_*).\n * @param out_sample_rate output sample rate (frequency in Hz)\n * @param in_ch_layout    input channel layout (AV_CH_LAYOUT_*)\n * @param in_sample_fmt   input sample format (AV_SAMPLE_FMT_*).\n * @param in_sample_rate  input sample rate (frequency in Hz)\n * @param log_offset      logging level offset\n * @param log_ctx         parent logging context, can be NULL\n *\n * @see swr_init(), swr_free()\n * @return NULL on error, allocated context otherwise\n */\nstruct SwrContext *swr_alloc_set_opts(struct SwrContext *s,\n                                      int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate,\n                                      int64_t  in_ch_layout, enum AVSampleFormat  in_sample_fmt, int  in_sample_rate,\n                                      int log_offset, void *log_ctx);\n\n/**\n * @}\n *\n * @name SwrContext destructor functions\n * @{\n */\n\n/**\n * Free the given SwrContext and set the pointer to NULL.\n *\n * @param[in] s a pointer to a pointer to Swr context\n */\nvoid swr_free(struct SwrContext **s);\n\n/**\n * Closes the context so that swr_is_initialized() returns 0.\n *\n * The context can be brought back to life by running swr_init(),\n * swr_init() can also be used without swr_close().\n * This function is mainly provided for simplifying the usecase\n * where one tries to support libavresample and libswresample.\n *\n * @param[in,out] s Swr context to be closed\n */\nvoid swr_close(struct SwrContext *s);\n\n/**\n * @}\n *\n * @name Core conversion functions\n * @{\n */\n\n/** Convert audio.\n *\n * in and in_count can be set to 0 to flush the last few samples out at the\n * end.\n *\n * If more input is provided than output space, then the input will be buffered.\n * You can avoid this buffering by using swr_get_out_samples() to retrieve an\n * upper bound on the required number of output samples for the given number of\n * input samples. Conversion will run directly without copying whenever possible.\n *\n * @param s         allocated Swr context, with parameters set\n * @param out       output buffers, only the first one need be set in case of packed audio\n * @param out_count amount of space available for output in samples per channel\n * @param in        input buffers, only the first one need to be set in case of packed audio\n * @param in_count  number of input samples available in one channel\n *\n * @return number of samples output per channel, negative value on error\n */\nint swr_convert(struct SwrContext *s, uint8_t **out, int out_count,\n                                const uint8_t **in , int in_count);\n\n/**\n * Convert the next timestamp from input to output\n * timestamps are in 1/(in_sample_rate * out_sample_rate) units.\n *\n * @note There are 2 slightly differently behaving modes.\n *       @li When automatic timestamp compensation is not used, (min_compensation >= FLT_MAX)\n *              in this case timestamps will be passed through with delays compensated\n *       @li When automatic timestamp compensation is used, (min_compensation < FLT_MAX)\n *              in this case the output timestamps will match output sample numbers.\n *              See ffmpeg-resampler(1) for the two modes of compensation.\n *\n * @param s[in]     initialized Swr context\n * @param pts[in]   timestamp for the next input sample, INT64_MIN if unknown\n * @see swr_set_compensation(), swr_drop_output(), and swr_inject_silence() are\n *      function used internally for timestamp compensation.\n * @return the output timestamp for the next output sample\n */\nint64_t swr_next_pts(struct SwrContext *s, int64_t pts);\n\n/**\n * @}\n *\n * @name Low-level option setting functions\n * These functons provide a means to set low-level options that is not possible\n * with the AVOption API.\n * @{\n */\n\n/**\n * Activate resampling compensation (\"soft\" compensation). This function is\n * internally called when needed in swr_next_pts().\n *\n * @param[in,out] s             allocated Swr context. If it is not initialized,\n *                              or SWR_FLAG_RESAMPLE is not set, swr_init() is\n *                              called with the flag set.\n * @param[in]     sample_delta  delta in PTS per sample\n * @param[in]     compensation_distance number of samples to compensate for\n * @return    >= 0 on success, AVERROR error codes if:\n *            @li @c s is NULL,\n *            @li @c compensation_distance is less than 0,\n *            @li @c compensation_distance is 0 but sample_delta is not,\n *            @li compensation unsupported by resampler, or\n *            @li swr_init() fails when called.\n */\nint swr_set_compensation(struct SwrContext *s, int sample_delta, int compensation_distance);\n\n/**\n * Set a customized input channel mapping.\n *\n * @param[in,out] s           allocated Swr context, not yet initialized\n * @param[in]     channel_map customized input channel mapping (array of channel\n *                            indexes, -1 for a muted channel)\n * @return >= 0 on success, or AVERROR error code in case of failure.\n */\nint swr_set_channel_mapping(struct SwrContext *s, const int *channel_map);\n\n/**\n * Set a customized remix matrix.\n *\n * @param s       allocated Swr context, not yet initialized\n * @param matrix  remix coefficients; matrix[i + stride * o] is\n *                the weight of input channel i in output channel o\n * @param stride  offset between lines of the matrix\n * @return  >= 0 on success, or AVERROR error code in case of failure.\n */\nint swr_set_matrix(struct SwrContext *s, const double *matrix, int stride);\n\n/**\n * @}\n *\n * @name Sample handling functions\n * @{\n */\n\n/**\n * Drops the specified number of output samples.\n *\n * This function, along with swr_inject_silence(), is called by swr_next_pts()\n * if needed for \"hard\" compensation.\n *\n * @param s     allocated Swr context\n * @param count number of samples to be dropped\n *\n * @return >= 0 on success, or a negative AVERROR code on failure\n */\nint swr_drop_output(struct SwrContext *s, int count);\n\n/**\n * Injects the specified number of silence samples.\n *\n * This function, along with swr_drop_output(), is called by swr_next_pts()\n * if needed for \"hard\" compensation.\n *\n * @param s     allocated Swr context\n * @param count number of samples to be dropped\n *\n * @return >= 0 on success, or a negative AVERROR code on failure\n */\nint swr_inject_silence(struct SwrContext *s, int count);\n\n/**\n * Gets the delay the next input sample will experience relative to the next output sample.\n *\n * Swresample can buffer data if more input has been provided than available\n * output space, also converting between sample rates needs a delay.\n * This function returns the sum of all such delays.\n * The exact delay is not necessarily an integer value in either input or\n * output sample rate. Especially when downsampling by a large value, the\n * output sample rate may be a poor choice to represent the delay, similarly\n * for upsampling and the input sample rate.\n *\n * @param s     swr context\n * @param base  timebase in which the returned delay will be:\n *              @li if it's set to 1 the returned delay is in seconds\n *              @li if it's set to 1000 the returned delay is in milliseconds\n *              @li if it's set to the input sample rate then the returned\n *                  delay is in input samples\n *              @li if it's set to the output sample rate then the returned\n *                  delay is in output samples\n *              @li if it's the least common multiple of in_sample_rate and\n *                  out_sample_rate then an exact rounding-free delay will be\n *                  returned\n * @returns     the delay in 1 / @c base units.\n */\nint64_t swr_get_delay(struct SwrContext *s, int64_t base);\n\n/**\n * Find an upper bound on the number of samples that the next swr_convert\n * call will output, if called with in_samples of input samples. This\n * depends on the internal state, and anything changing the internal state\n * (like further swr_convert() calls) will may change the number of samples\n * swr_get_out_samples() returns for the same number of input samples.\n *\n * @param in_samples    number of input samples.\n * @note any call to swr_inject_silence(), swr_convert(), swr_next_pts()\n *       or swr_set_compensation() invalidates this limit\n * @note it is recommended to pass the correct available buffer size\n *       to all functions like swr_convert() even if swr_get_out_samples()\n *       indicates that less would be used.\n * @returns an upper bound on the number of samples that the next swr_convert\n *          will output or a negative value to indicate an error\n */\nint swr_get_out_samples(struct SwrContext *s, int in_samples);\n\n/**\n * @}\n *\n * @name Configuration accessors\n * @{\n */\n\n/**\n * Return the @ref LIBSWRESAMPLE_VERSION_INT constant.\n *\n * This is useful to check if the build-time libswresample has the same version\n * as the run-time one.\n *\n * @returns     the unsigned int-typed version\n */\nunsigned swresample_version(void);\n\n/**\n * Return the swr build-time configuration.\n *\n * @returns     the build-time @c ./configure flags\n */\nconst char *swresample_configuration(void);\n\n/**\n * Return the swr license.\n *\n * @returns     the license of libswresample, determined at build-time\n */\nconst char *swresample_license(void);\n\n/**\n * @}\n *\n * @name AVFrame based API\n * @{\n */\n\n/**\n * Convert the samples in the input AVFrame and write them to the output AVFrame.\n *\n * Input and output AVFrames must have channel_layout, sample_rate and format set.\n *\n * If the output AVFrame does not have the data pointers allocated the nb_samples\n * field will be set using av_frame_get_buffer()\n * is called to allocate the frame.\n *\n * The output AVFrame can be NULL or have fewer allocated samples than required.\n * In this case, any remaining samples not written to the output will be added\n * to an internal FIFO buffer, to be returned at the next call to this function\n * or to swr_convert().\n *\n * If converting sample rate, there may be data remaining in the internal\n * resampling delay buffer. swr_get_delay() tells the number of\n * remaining samples. To get this data as output, call this function or\n * swr_convert() with NULL input.\n *\n * If the SwrContext configuration does not match the output and\n * input AVFrame settings the conversion does not take place and depending on\n * which AVFrame is not matching AVERROR_OUTPUT_CHANGED, AVERROR_INPUT_CHANGED\n * or the result of a bitwise-OR of them is returned.\n *\n * @see swr_delay()\n * @see swr_convert()\n * @see swr_get_delay()\n *\n * @param swr             audio resample context\n * @param output          output AVFrame\n * @param input           input AVFrame\n * @return                0 on success, AVERROR on failure or nonmatching\n *                        configuration.\n */\nint swr_convert_frame(SwrContext *swr,\n                      AVFrame *output, const AVFrame *input);\n\n/**\n * Configure or reconfigure the SwrContext using the information\n * provided by the AVFrames.\n *\n * The original resampling context is reset even on failure.\n * The function calls swr_close() internally if the context is open.\n *\n * @see swr_close();\n *\n * @param swr             audio resample context\n * @param output          output AVFrame\n * @param input           input AVFrame\n * @return                0 on success, AVERROR on failure.\n */\nint swr_config_frame(SwrContext *swr, const AVFrame *out, const AVFrame *in);\n\n/**\n * @}\n * @}\n */\n\n#endif /* SWRESAMPLE_SWRESAMPLE_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libswresample/version.h",
    "content": "/*\n * Version macros.\n *\n * This file is part of libswresample\n *\n * libswresample is free software; you can redistribute it and/or\n * 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 * libswresample is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with libswresample; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef SWR_VERSION_H\n#define SWR_VERSION_H\n\n/**\n * @file\n * Libswresample version macros\n */\n\n#include \"libavutil/avutil.h\"\n\n#define LIBSWRESAMPLE_VERSION_MAJOR   2\n#define LIBSWRESAMPLE_VERSION_MINOR   0\n#define LIBSWRESAMPLE_VERSION_MICRO 101\n\n#define LIBSWRESAMPLE_VERSION_INT  AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \\\n                                                  LIBSWRESAMPLE_VERSION_MINOR, \\\n                                                  LIBSWRESAMPLE_VERSION_MICRO)\n#define LIBSWRESAMPLE_VERSION      AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, \\\n                                              LIBSWRESAMPLE_VERSION_MINOR, \\\n                                              LIBSWRESAMPLE_VERSION_MICRO)\n#define LIBSWRESAMPLE_BUILD        LIBSWRESAMPLE_VERSION_INT\n\n#define LIBSWRESAMPLE_IDENT        \"SwR\" AV_STRINGIFY(LIBSWRESAMPLE_VERSION)\n\n#endif /* SWR_VERSION_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libswscale/swscale.h",
    "content": "/*\n * Copyright (C) 2001-2011 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef SWSCALE_SWSCALE_H\n#define SWSCALE_SWSCALE_H\n\n/**\n * @file\n * @ingroup libsws\n * external API header\n */\n\n#include <stdint.h>\n\n#include \"libavutil/avutil.h\"\n#include \"libavutil/log.h\"\n#include \"libavutil/pixfmt.h\"\n#include \"version.h\"\n\n/**\n * @defgroup libsws Color conversion and scaling\n * @{\n *\n * Return the LIBSWSCALE_VERSION_INT constant.\n */\nunsigned swscale_version(void);\n\n/**\n * Return the libswscale build-time configuration.\n */\nconst char *swscale_configuration(void);\n\n/**\n * Return the libswscale license.\n */\nconst char *swscale_license(void);\n\n/* values for the flags, the stuff on the command line is different */\n#define SWS_FAST_BILINEAR     1\n#define SWS_BILINEAR          2\n#define SWS_BICUBIC           4\n#define SWS_X                 8\n#define SWS_POINT          0x10\n#define SWS_AREA           0x20\n#define SWS_BICUBLIN       0x40\n#define SWS_GAUSS          0x80\n#define SWS_SINC          0x100\n#define SWS_LANCZOS       0x200\n#define SWS_SPLINE        0x400\n\n#define SWS_SRC_V_CHR_DROP_MASK     0x30000\n#define SWS_SRC_V_CHR_DROP_SHIFT    16\n\n#define SWS_PARAM_DEFAULT           123456\n\n#define SWS_PRINT_INFO              0x1000\n\n//the following 3 flags are not completely implemented\n//internal chrominace subsampling info\n#define SWS_FULL_CHR_H_INT    0x2000\n//input subsampling info\n#define SWS_FULL_CHR_H_INP    0x4000\n#define SWS_DIRECT_BGR        0x8000\n#define SWS_ACCURATE_RND      0x40000\n#define SWS_BITEXACT          0x80000\n#define SWS_ERROR_DIFFUSION  0x800000\n\n#define SWS_MAX_REDUCE_CUTOFF 0.002\n\n#define SWS_CS_ITU709         1\n#define SWS_CS_FCC            4\n#define SWS_CS_ITU601         5\n#define SWS_CS_ITU624         5\n#define SWS_CS_SMPTE170M      5\n#define SWS_CS_SMPTE240M      7\n#define SWS_CS_DEFAULT        5\n\n/**\n * Return a pointer to yuv<->rgb coefficients for the given colorspace\n * suitable for sws_setColorspaceDetails().\n *\n * @param colorspace One of the SWS_CS_* macros. If invalid,\n * SWS_CS_DEFAULT is used.\n */\nconst int *sws_getCoefficients(int colorspace);\n\n// when used for filters they must have an odd number of elements\n// coeffs cannot be shared between vectors\ntypedef struct SwsVector {\n    double *coeff;              ///< pointer to the list of coefficients\n    int length;                 ///< number of coefficients in the vector\n} SwsVector;\n\n// vectors can be shared\ntypedef struct SwsFilter {\n    SwsVector *lumH;\n    SwsVector *lumV;\n    SwsVector *chrH;\n    SwsVector *chrV;\n} SwsFilter;\n\nstruct SwsContext;\n\n/**\n * Return a positive value if pix_fmt is a supported input format, 0\n * otherwise.\n */\nint sws_isSupportedInput(enum AVPixelFormat pix_fmt);\n\n/**\n * Return a positive value if pix_fmt is a supported output format, 0\n * otherwise.\n */\nint sws_isSupportedOutput(enum AVPixelFormat pix_fmt);\n\n/**\n * @param[in]  pix_fmt the pixel format\n * @return a positive value if an endianness conversion for pix_fmt is\n * supported, 0 otherwise.\n */\nint sws_isSupportedEndiannessConversion(enum AVPixelFormat pix_fmt);\n\n/**\n * Allocate an empty SwsContext. This must be filled and passed to\n * sws_init_context(). For filling see AVOptions, options.c and\n * sws_setColorspaceDetails().\n */\nstruct SwsContext *sws_alloc_context(void);\n\n/**\n * Initialize the swscaler context sws_context.\n *\n * @return zero or positive value on success, a negative value on\n * error\n */\nav_warn_unused_result\nint sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter);\n\n/**\n * Free the swscaler context swsContext.\n * If swsContext is NULL, then does nothing.\n */\nvoid sws_freeContext(struct SwsContext *swsContext);\n\n/**\n * Allocate and return an SwsContext. You need it to perform\n * scaling/conversion operations using sws_scale().\n *\n * @param srcW the width of the source image\n * @param srcH the height of the source image\n * @param srcFormat the source image format\n * @param dstW the width of the destination image\n * @param dstH the height of the destination image\n * @param dstFormat the destination image format\n * @param flags specify which algorithm and options to use for rescaling\n * @param param extra parameters to tune the used scaler\n *              For SWS_BICUBIC param[0] and [1] tune the shape of the basis\n *              function, param[0] tunes f(1) and param[1] f´(1)\n *              For SWS_GAUSS param[0] tunes the exponent and thus cutoff\n *              frequency\n *              For SWS_LANCZOS param[0] tunes the width of the window function\n * @return a pointer to an allocated context, or NULL in case of error\n * @note this function is to be removed after a saner alternative is\n *       written\n */\nstruct SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat,\n                                  int dstW, int dstH, enum AVPixelFormat dstFormat,\n                                  int flags, SwsFilter *srcFilter,\n                                  SwsFilter *dstFilter, const double *param);\n\n/**\n * Scale the image slice in srcSlice and put the resulting scaled\n * slice in the image in dst. A slice is a sequence of consecutive\n * rows in an image.\n *\n * Slices have to be provided in sequential order, either in\n * top-bottom or bottom-top order. If slices are provided in\n * non-sequential order the behavior of the function is undefined.\n *\n * @param c         the scaling context previously created with\n *                  sws_getContext()\n * @param srcSlice  the array containing the pointers to the planes of\n *                  the source slice\n * @param srcStride the array containing the strides for each plane of\n *                  the source image\n * @param srcSliceY the position in the source image of the slice to\n *                  process, that is the number (counted starting from\n *                  zero) in the image of the first row of the slice\n * @param srcSliceH the height of the source slice, that is the number\n *                  of rows in the slice\n * @param dst       the array containing the pointers to the planes of\n *                  the destination image\n * @param dstStride the array containing the strides for each plane of\n *                  the destination image\n * @return          the height of the output slice\n */\nint sws_scale(struct SwsContext *c, const uint8_t *const srcSlice[],\n              const int srcStride[], int srcSliceY, int srcSliceH,\n              uint8_t *const dst[], const int dstStride[]);\n\n/**\n * @param dstRange flag indicating the while-black range of the output (1=jpeg / 0=mpeg)\n * @param srcRange flag indicating the while-black range of the input (1=jpeg / 0=mpeg)\n * @param table the yuv2rgb coefficients describing the output yuv space, normally ff_yuv2rgb_coeffs[x]\n * @param inv_table the yuv2rgb coefficients describing the input yuv space, normally ff_yuv2rgb_coeffs[x]\n * @param brightness 16.16 fixed point brightness correction\n * @param contrast 16.16 fixed point contrast correction\n * @param saturation 16.16 fixed point saturation correction\n * @return -1 if not supported\n */\nint sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],\n                             int srcRange, const int table[4], int dstRange,\n                             int brightness, int contrast, int saturation);\n\n/**\n * @return -1 if not supported\n */\nint sws_getColorspaceDetails(struct SwsContext *c, int **inv_table,\n                             int *srcRange, int **table, int *dstRange,\n                             int *brightness, int *contrast, int *saturation);\n\n/**\n * Allocate and return an uninitialized vector with length coefficients.\n */\nSwsVector *sws_allocVec(int length);\n\n/**\n * Return a normalized Gaussian curve used to filter stuff\n * quality = 3 is high quality, lower is lower quality.\n */\nSwsVector *sws_getGaussianVec(double variance, double quality);\n\n/**\n * Allocate and return a vector with length coefficients, all\n * with the same value c.\n */\nSwsVector *sws_getConstVec(double c, int length);\n\n/**\n * Allocate and return a vector with just one coefficient, with\n * value 1.0.\n */\nSwsVector *sws_getIdentityVec(void);\n\n/**\n * Scale all the coefficients of a by the scalar value.\n */\nvoid sws_scaleVec(SwsVector *a, double scalar);\n\n/**\n * Scale all the coefficients of a so that their sum equals height.\n */\nvoid sws_normalizeVec(SwsVector *a, double height);\nvoid sws_convVec(SwsVector *a, SwsVector *b);\nvoid sws_addVec(SwsVector *a, SwsVector *b);\nvoid sws_subVec(SwsVector *a, SwsVector *b);\nvoid sws_shiftVec(SwsVector *a, int shift);\n\n/**\n * Allocate and return a clone of the vector a, that is a vector\n * with the same coefficients as a.\n */\nSwsVector *sws_cloneVec(SwsVector *a);\n\n/**\n * Print with av_log() a textual representation of the vector a\n * if log_level <= av_log_level.\n */\nvoid sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level);\n\nvoid sws_freeVec(SwsVector *a);\n\nSwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur,\n                                float lumaSharpen, float chromaSharpen,\n                                float chromaHShift, float chromaVShift,\n                                int verbose);\nvoid sws_freeFilter(SwsFilter *filter);\n\n/**\n * Check if context can be reused, otherwise reallocate a new one.\n *\n * If context is NULL, just calls sws_getContext() to get a new\n * context. Otherwise, checks if the parameters are the ones already\n * saved in context. If that is the case, returns the current\n * context. Otherwise, frees context and gets a new context with\n * the new parameters.\n *\n * Be warned that srcFilter and dstFilter are not checked, they\n * are assumed to remain the same.\n */\nstruct SwsContext *sws_getCachedContext(struct SwsContext *context,\n                                        int srcW, int srcH, enum AVPixelFormat srcFormat,\n                                        int dstW, int dstH, enum AVPixelFormat dstFormat,\n                                        int flags, SwsFilter *srcFilter,\n                                        SwsFilter *dstFilter, const double *param);\n\n/**\n * Convert an 8-bit paletted frame into a frame with a color depth of 32 bits.\n *\n * The output frame will have the same packed format as the palette.\n *\n * @param src        source frame buffer\n * @param dst        destination frame buffer\n * @param num_pixels number of pixels to convert\n * @param palette    array with [256] entries, which must match color arrangement (RGB or BGR) of src\n */\nvoid sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette);\n\n/**\n * Convert an 8-bit paletted frame into a frame with a color depth of 24 bits.\n *\n * With the palette format \"ABCD\", the destination frame ends up with the format \"ABC\".\n *\n * @param src        source frame buffer\n * @param dst        destination frame buffer\n * @param num_pixels number of pixels to convert\n * @param palette    array with [256] entries, which must match color arrangement (RGB or BGR) of src\n */\nvoid sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette);\n\n/**\n * Get the AVClass for swsContext. It can be used in combination with\n * AV_OPT_SEARCH_FAKE_OBJ for examining options.\n *\n * @see av_opt_find().\n */\nconst AVClass *sws_get_class(void);\n\n/**\n * @}\n */\n\n#endif /* SWSCALE_SWSCALE_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/include/libswscale/version.h",
    "content": "/*\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * 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 * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef SWSCALE_VERSION_H\n#define SWSCALE_VERSION_H\n\n/**\n * @file\n * swscale version macros\n */\n\n#include \"libavutil/version.h\"\n\n#define LIBSWSCALE_VERSION_MAJOR   4\n#define LIBSWSCALE_VERSION_MINOR   0\n#define LIBSWSCALE_VERSION_MICRO 100\n\n#define LIBSWSCALE_VERSION_INT  AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \\\n                                               LIBSWSCALE_VERSION_MINOR, \\\n                                               LIBSWSCALE_VERSION_MICRO)\n#define LIBSWSCALE_VERSION      AV_VERSION(LIBSWSCALE_VERSION_MAJOR, \\\n                                           LIBSWSCALE_VERSION_MINOR, \\\n                                           LIBSWSCALE_VERSION_MICRO)\n#define LIBSWSCALE_BUILD        LIBSWSCALE_VERSION_INT\n\n#define LIBSWSCALE_IDENT        \"SwS\" AV_STRINGIFY(LIBSWSCALE_VERSION)\n\n/**\n * FF_API_* defines may be placed below to indicate public API that will be\n * dropped at a future version bump. The defines themselves are not part of\n * the public API and may change, break or disappear at any time.\n */\n\n#endif /* SWSCALE_VERSION_H */\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/avcodec-57.def",
    "content": "EXPORTS\n    audio_resample\n    audio_resample_close\n    av_audio_convert\n    av_audio_convert_alloc\n    av_audio_convert_free\n    av_audio_resample_init\n    av_bitstream_filter_close\n    av_bitstream_filter_filter\n    av_bitstream_filter_init\n    av_bitstream_filter_next\n    av_codec_ffversion\n    av_codec_get_chroma_intra_matrix\n    av_codec_get_codec_descriptor\n    av_codec_get_codec_properties\n    av_codec_get_lowres\n    av_codec_get_max_lowres\n    av_codec_get_pkt_timebase\n    av_codec_get_seek_preroll\n    av_codec_is_decoder\n    av_codec_is_encoder\n    av_codec_next\n    av_codec_set_chroma_intra_matrix\n    av_codec_set_codec_descriptor\n    av_codec_set_lowres\n    av_codec_set_pkt_timebase\n    av_codec_set_seek_preroll\n    av_copy_packet\n    av_copy_packet_side_data\n    av_cpb_properties_alloc\n    av_d3d11va_alloc_context\n    av_dct_calc\n    av_dct_end\n    av_dct_init\n    av_dirac_parse_sequence_header\n    av_dup_packet\n    av_dv_codec_profile\n    av_dv_codec_profile2\n    av_dv_frame_profile\n    av_fast_padded_malloc\n    av_fast_padded_mallocz\n    av_fft_calc\n    av_fft_end\n    av_fft_init\n    av_fft_permute\n    av_fopen_utf8\n    av_free_packet\n    av_get_audio_frame_duration\n    av_get_bits_per_sample\n    av_get_codec_tag_string\n    av_get_exact_bits_per_sample\n    av_get_pcm_codec\n    av_get_profile_name\n    av_grow_packet\n    av_hwaccel_next\n    av_imdct_calc\n    av_imdct_half\n    av_init_packet\n    av_lockmgr_register\n    av_log_ask_for_sample\n    av_log_missing_feature\n    av_mdct_calc\n    av_mdct_end\n    av_mdct_init\n    av_new_packet\n    av_packet_add_side_data\n    av_packet_alloc\n    av_packet_clone\n    av_packet_copy_props\n    av_packet_free\n    av_packet_free_side_data\n    av_packet_from_data\n    av_packet_get_side_data\n    av_packet_merge_side_data\n    av_packet_move_ref\n    av_packet_new_side_data\n    av_packet_pack_dictionary\n    av_packet_ref\n    av_packet_rescale_ts\n    av_packet_shrink_side_data\n    av_packet_side_data_name\n    av_packet_split_side_data\n    av_packet_unpack_dictionary\n    av_packet_unref\n    av_parser_change\n    av_parser_close\n    av_parser_init\n    av_parser_next\n    av_parser_parse2\n    av_picture_copy\n    av_picture_crop\n    av_picture_pad\n    av_qsv_alloc_context\n    av_rdft_calc\n    av_rdft_end\n    av_rdft_init\n    av_register_bitstream_filter\n    av_register_codec_parser\n    av_register_hwaccel\n    av_resample\n    av_resample_close\n    av_resample_compensate\n    av_resample_init\n    av_shrink_packet\n    av_vorbis_parse_frame\n    av_vorbis_parse_frame_flags\n    av_vorbis_parse_free\n    av_vorbis_parse_init\n    av_vorbis_parse_reset\n    av_xiphlacing\n    avcodec_align_dimensions\n    avcodec_align_dimensions2\n    avcodec_alloc_context3\n    avcodec_chroma_pos_to_enum\n    avcodec_close\n    avcodec_configuration\n    avcodec_copy_context\n    avcodec_dct_alloc\n    avcodec_dct_get_class\n    avcodec_dct_init\n    avcodec_decode_audio4\n    avcodec_decode_subtitle2\n    avcodec_decode_video2\n    avcodec_default_execute\n    avcodec_default_execute2\n    avcodec_default_get_buffer2\n    avcodec_default_get_format\n    avcodec_descriptor_get\n    avcodec_descriptor_get_by_name\n    avcodec_descriptor_next\n    avcodec_encode_audio2\n    avcodec_encode_subtitle\n    avcodec_encode_video2\n    avcodec_enum_to_chroma_pos\n    avcodec_fill_audio_frame\n    avcodec_find_best_pix_fmt_of_2\n    avcodec_find_best_pix_fmt_of_list\n    avcodec_find_best_pix_fmt2\n    avcodec_find_decoder\n    avcodec_find_decoder_by_name\n    avcodec_find_encoder\n    avcodec_find_encoder_by_name\n    avcodec_flush_buffers\n    avcodec_free_context\n    avcodec_get_chroma_sub_sample\n    avcodec_get_class\n    avcodec_get_context_defaults3\n    avcodec_get_edge_width\n    avcodec_get_frame_class\n    avcodec_get_name\n    avcodec_get_pix_fmt_loss\n    avcodec_get_subtitle_rect_class\n    avcodec_get_type\n    avcodec_is_open\n    avcodec_license\n    avcodec_open2\n    avcodec_pix_fmt_to_codec_tag\n    avcodec_register\n    avcodec_register_all\n    avcodec_set_dimensions\n    avcodec_string\n    avcodec_version\n    avpicture_alloc\n    avpicture_fill\n    avpicture_free\n    avpicture_get_size\n    avpicture_layout\n    avpriv_aac_parse_header\n    avpriv_ac3_channel_layout_tab\n    avpriv_ac3_parse_header\n    avpriv_align_put_bits\n    avpriv_bprint_to_extradata\n    avpriv_copy_bits\n    avpriv_copy_pce_data\n    avpriv_dca_convert_bitstream\n    avpriv_dca_sample_rates\n    avpriv_dnxhd_get_frame_size\n    avpriv_dnxhd_get_interlaced\n    avpriv_do_elbg\n    avpriv_exif_decode_ifd\n    avpriv_find_pix_fmt\n    avpriv_find_start_code\n    avpriv_get_raw_pix_fmt_tags\n    avpriv_h264_has_num_reorder_frames\n    avpriv_init_elbg\n    avpriv_lock_avformat\n    avpriv_mjpeg_bits_ac_chrominance\n    avpriv_mjpeg_bits_ac_luminance\n    avpriv_mjpeg_bits_dc_chrominance\n    avpriv_mjpeg_bits_dc_luminance\n    avpriv_mjpeg_val_ac_chrominance\n    avpriv_mjpeg_val_ac_luminance\n    avpriv_mjpeg_val_dc\n    avpriv_mpa_bitrate_tab\n    avpriv_mpa_decode_header\n    avpriv_mpa_decode_header2\n    avpriv_mpa_freq_tab\n    avpriv_mpeg4audio_get_config\n    avpriv_mpeg4audio_sample_rates\n    avpriv_mpegaudio_decode_header\n    avpriv_pix_fmt_bps_avi\n    avpriv_pix_fmt_bps_mov\n    avpriv_put_string\n    avpriv_split_xiph_headers\n    avpriv_tak_parse_streaminfo\n    avpriv_toupper4\n    avpriv_unlock_avformat\n    avsubtitle_free\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/avdevice-57.def",
    "content": "EXPORTS\n    av_device_capabilities\n    av_device_ffversion\n    av_fopen_utf8\n    av_input_audio_device_next\n    av_input_video_device_next\n    av_output_audio_device_next\n    av_output_video_device_next\n    avdevice_app_to_dev_control_message\n    avdevice_capabilities_create\n    avdevice_capabilities_free\n    avdevice_configuration\n    avdevice_dev_to_app_control_message\n    avdevice_free_list_devices\n    avdevice_license\n    avdevice_list_devices\n    avdevice_list_input_sources\n    avdevice_list_output_sinks\n    avdevice_register_all\n    avdevice_version\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/avfilter-6.def",
    "content": "EXPORTS\n    av_abuffersink_params_alloc\n    av_buffersink_get_frame\n    av_buffersink_get_frame_flags\n    av_buffersink_get_frame_rate\n    av_buffersink_get_samples\n    av_buffersink_params_alloc\n    av_buffersink_set_frame_size\n    av_buffersrc_add_frame\n    av_buffersrc_add_frame_flags\n    av_buffersrc_get_nb_failed_requests\n    av_buffersrc_write_frame\n    av_filter_ffversion\n    av_filter_next\n    avfilter_add_matrix\n    avfilter_all_channel_layouts\n    avfilter_config_links\n    avfilter_configuration\n    avfilter_free\n    avfilter_get_by_name\n    avfilter_get_class\n    avfilter_get_matrix\n    avfilter_graph_add_filter\n    avfilter_graph_alloc\n    avfilter_graph_alloc_filter\n    avfilter_graph_config\n    avfilter_graph_create_filter\n    avfilter_graph_dump\n    avfilter_graph_free\n    avfilter_graph_get_filter\n    avfilter_graph_parse\n    avfilter_graph_parse_ptr\n    avfilter_graph_parse2\n    avfilter_graph_queue_command\n    avfilter_graph_request_oldest\n    avfilter_graph_send_command\n    avfilter_graph_set_auto_convert\n    avfilter_init_dict\n    avfilter_init_filter\n    avfilter_init_str\n    avfilter_inout_alloc\n    avfilter_inout_free\n    avfilter_insert_filter\n    avfilter_license\n    avfilter_link\n    avfilter_link_free\n    avfilter_link_get_channels\n    avfilter_link_set_closed\n    avfilter_make_format64_list\n    avfilter_mul_matrix\n    avfilter_next\n    avfilter_open\n    avfilter_pad_count\n    avfilter_pad_get_name\n    avfilter_pad_get_type\n    avfilter_process_command\n    avfilter_register\n    avfilter_register_all\n    avfilter_sub_matrix\n    avfilter_transform\n    avfilter_uninit\n    avfilter_version\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/avformat-57.def",
    "content": "EXPORTS\n    av_add_index_entry\n    av_append_packet\n    av_apply_bitstream_filters\n    av_codec_get_id\n    av_codec_get_tag\n    av_codec_get_tag2\n    av_convert_lang_to\n    av_demuxer_open\n    av_dump_format\n    av_filename_number_test\n    av_find_best_stream\n    av_find_default_stream_index\n    av_find_input_format\n    av_find_program_from_stream\n    av_fmt_ctx_get_duration_estimation_method\n    av_fopen_utf8\n    av_format_ffversion\n    av_format_get_audio_codec\n    av_format_get_control_message_cb\n    av_format_get_data_codec\n    av_format_get_metadata_header_padding\n    av_format_get_opaque\n    av_format_get_open_cb\n    av_format_get_probe_score\n    av_format_get_subtitle_codec\n    av_format_get_video_codec\n    av_format_inject_global_side_data\n    av_format_set_audio_codec\n    av_format_set_control_message_cb\n    av_format_set_data_codec\n    av_format_set_metadata_header_padding\n    av_format_set_opaque\n    av_format_set_open_cb\n    av_format_set_subtitle_codec\n    av_format_set_video_codec\n    av_get_frame_filename\n    av_get_output_timestamp\n    av_get_packet\n    av_guess_codec\n    av_guess_format\n    av_guess_frame_rate\n    av_guess_sample_aspect_ratio\n    av_hex_dump\n    av_hex_dump_log\n    av_iformat_next\n    av_index_search_timestamp\n    av_interleaved_write_frame\n    av_interleaved_write_uncoded_frame\n    av_match_ext\n    av_new_program\n    av_oformat_next\n    av_pkt_dump_log2\n    av_pkt_dump2\n    av_probe_input_buffer\n    av_probe_input_buffer2\n    av_probe_input_format\n    av_probe_input_format2\n    av_probe_input_format3\n    av_program_add_stream_index\n    av_read_frame\n    av_read_pause\n    av_read_play\n    av_register_all\n    av_register_input_format\n    av_register_output_format\n    av_sdp_create\n    av_seek_frame\n    av_stream_get_end_pts\n    av_stream_get_parser\n    av_stream_get_r_frame_rate\n    av_stream_get_recommended_encoder_configuration\n    av_stream_get_side_data\n    av_stream_new_side_data\n    av_stream_set_r_frame_rate\n    av_stream_set_recommended_encoder_configuration\n    av_url_split\n    av_write_frame\n    av_write_trailer\n    av_write_uncoded_frame\n    av_write_uncoded_frame_query\n    avformat_alloc_context\n    avformat_alloc_output_context2\n    avformat_close_input\n    avformat_configuration\n    avformat_find_stream_info\n    avformat_flush\n    avformat_free_context\n    avformat_get_class\n    avformat_get_mov_audio_tags\n    avformat_get_mov_video_tags\n    avformat_get_riff_audio_tags\n    avformat_get_riff_video_tags\n    avformat_license\n    avformat_match_stream_specifier\n    avformat_network_deinit\n    avformat_network_init\n    avformat_new_stream\n    avformat_open_input\n    avformat_query_codec\n    avformat_queue_attached_pictures\n    avformat_seek_file\n    avformat_version\n    avformat_write_header\n    avio_accept\n    avio_alloc_context\n    avio_check\n    avio_close\n    avio_close_dir\n    avio_close_dyn_buf\n    avio_closep\n    avio_enum_protocols\n    avio_feof\n    avio_find_protocol_name\n    avio_flush\n    avio_free_directory_entry\n    avio_get_str\n    avio_get_str16be\n    avio_get_str16le\n    avio_handshake\n    avio_open\n    avio_open_dir\n    avio_open_dyn_buf\n    avio_open2\n    avio_pause\n    avio_printf\n    avio_put_str\n    avio_put_str16be\n    avio_put_str16le\n    avio_r8\n    avio_rb16\n    avio_rb24\n    avio_rb32\n    avio_rb64\n    avio_read\n    avio_read_dir\n    avio_read_to_bprint\n    avio_rl16\n    avio_rl24\n    avio_rl32\n    avio_rl64\n    avio_seek\n    avio_seek_time\n    avio_size\n    avio_skip\n    avio_w8\n    avio_wb16\n    avio_wb24\n    avio_wb32\n    avio_wb64\n    avio_wl16\n    avio_wl24\n    avio_wl32\n    avio_wl64\n    avio_write\n    avpriv_dv_get_packet\n    avpriv_dv_init_demux\n    avpriv_dv_produce_packet\n    avpriv_io_delete\n    avpriv_io_move\n    avpriv_mpegts_parse_close\n    avpriv_mpegts_parse_open\n    avpriv_mpegts_parse_packet\n    avpriv_new_chapter\n    avpriv_set_pts_info\n    ff_inet_aton\n    ff_rtp_get_local_rtcp_port\n    ff_rtp_get_local_rtp_port\n    ff_rtsp_parse_line\n    ff_socket_nonblock\n    ffio_open_dyn_packet_buf\n    ffio_set_buf_size\n    ffurl_close\n    ffurl_closep\n    ffurl_open\n    ffurl_write\n    url_feof\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/avutil-55.def",
    "content": "EXPORTS\n    av_add_i\n    av_add_q\n    av_add_stable\n    av_adler32_update\n    av_aes_alloc\n    av_aes_crypt\n    av_aes_ctr_alloc\n    av_aes_ctr_crypt\n    av_aes_ctr_free\n    av_aes_ctr_get_iv\n    av_aes_ctr_increment_iv\n    av_aes_ctr_init\n    av_aes_ctr_set_iv\n    av_aes_ctr_set_random_iv\n    av_aes_init\n    av_aes_size\n    av_append_path_component\n    av_asprintf\n    av_audio_fifo_alloc\n    av_audio_fifo_drain\n    av_audio_fifo_free\n    av_audio_fifo_peek\n    av_audio_fifo_read\n    av_audio_fifo_realloc\n    av_audio_fifo_reset\n    av_audio_fifo_size\n    av_audio_fifo_space\n    av_audio_fifo_write\n    av_base64_decode\n    av_base64_encode\n    av_basename\n    av_blowfish_alloc\n    av_blowfish_crypt\n    av_blowfish_crypt_ecb\n    av_blowfish_init\n    av_bmg_get\n    av_bprint_append_data\n    av_bprint_channel_layout\n    av_bprint_chars\n    av_bprint_clear\n    av_bprint_escape\n    av_bprint_finalize\n    av_bprint_get_buffer\n    av_bprint_init\n    av_bprint_init_for_buffer\n    av_bprint_strftime\n    av_bprintf\n    av_buffer_alloc\n    av_buffer_allocz\n    av_buffer_create\n    av_buffer_default_free\n    av_buffer_get_opaque\n    av_buffer_get_ref_count\n    av_buffer_is_writable\n    av_buffer_make_writable\n    av_buffer_pool_get\n    av_buffer_pool_init\n    av_buffer_pool_uninit\n    av_buffer_realloc\n    av_buffer_ref\n    av_buffer_unref\n    av_calloc\n    av_camellia_alloc\n    av_camellia_crypt\n    av_camellia_init\n    av_camellia_size\n    av_cast5_alloc\n    av_cast5_crypt\n    av_cast5_crypt2\n    av_cast5_init\n    av_cast5_size\n    av_channel_layout_extract_channel\n    av_chroma_location_name\n    av_cmp_i\n    av_color_primaries_name\n    av_color_range_name\n    av_color_space_name\n    av_color_transfer_name\n    av_compare_mod\n    av_compare_ts\n    av_cpu_count\n    av_crc\n    av_crc_get_table\n    av_crc_init\n    av_d2q\n    av_d2str\n    av_default_get_category\n    av_default_item_name\n    av_des_alloc\n    av_des_crypt\n    av_des_init\n    av_des_mac\n    av_dict_copy\n    av_dict_count\n    av_dict_free\n    av_dict_get\n    av_dict_get_string\n    av_dict_parse_string\n    av_dict_set\n    av_dict_set_int\n    av_dirname\n    av_display_matrix_flip\n    av_display_rotation_get\n    av_display_rotation_set\n    av_div_i\n    av_div_q\n    av_downmix_info_update_side_data\n    av_dynarray_add\n    av_dynarray_add_nofree\n    av_dynarray2_add\n    av_escape\n    av_expr_eval\n    av_expr_free\n    av_expr_parse\n    av_expr_parse_and_eval\n    av_fast_malloc\n    av_fast_mallocz\n    av_fast_realloc\n    av_fifo_alloc\n    av_fifo_alloc_array\n    av_fifo_drain\n    av_fifo_free\n    av_fifo_freep\n    av_fifo_generic_peek\n    av_fifo_generic_peek_at\n    av_fifo_generic_read\n    av_fifo_generic_write\n    av_fifo_grow\n    av_fifo_realloc2\n    av_fifo_reset\n    av_fifo_size\n    av_fifo_space\n    av_file_map\n    av_file_unmap\n    av_find_best_pix_fmt_of_2\n    av_find_info_tag\n    av_find_nearest_q_idx\n    av_fopen_utf8\n    av_force_cpu_flags\n    av_frame_alloc\n    av_frame_clone\n    av_frame_copy\n    av_frame_copy_props\n    av_frame_free\n    av_frame_get_best_effort_timestamp\n    av_frame_get_buffer\n    av_frame_get_channel_layout\n    av_frame_get_channels\n    av_frame_get_color_range\n    av_frame_get_colorspace\n    av_frame_get_decode_error_flags\n    av_frame_get_metadata\n    av_frame_get_pkt_duration\n    av_frame_get_pkt_pos\n    av_frame_get_pkt_size\n    av_frame_get_plane_buffer\n    av_frame_get_qp_table\n    av_frame_get_sample_rate\n    av_frame_get_side_data\n    av_frame_is_writable\n    av_frame_make_writable\n    av_frame_move_ref\n    av_frame_new_side_data\n    av_frame_ref\n    av_frame_remove_side_data\n    av_frame_set_best_effort_timestamp\n    av_frame_set_channel_layout\n    av_frame_set_channels\n    av_frame_set_color_range\n    av_frame_set_colorspace\n    av_frame_set_decode_error_flags\n    av_frame_set_metadata\n    av_frame_set_pkt_duration\n    av_frame_set_pkt_pos\n    av_frame_set_pkt_size\n    av_frame_set_qp_table\n    av_frame_set_sample_rate\n    av_frame_side_data_name\n    av_frame_unref\n    av_free\n    av_freep\n    av_gcd\n    av_get_alt_sample_fmt\n    av_get_bits_per_pixel\n    av_get_bytes_per_sample\n    av_get_channel_description\n    av_get_channel_layout\n    av_get_channel_layout_channel_index\n    av_get_channel_layout_nb_channels\n    av_get_channel_layout_string\n    av_get_channel_name\n    av_get_colorspace_name\n    av_get_cpu_flags\n    av_get_default_channel_layout\n    av_get_known_color_name\n    av_get_media_type_string\n    av_get_packed_sample_fmt\n    av_get_padded_bits_per_pixel\n    av_get_picture_type_char\n    av_get_pix_fmt\n    av_get_pix_fmt_loss\n    av_get_pix_fmt_name\n    av_get_pix_fmt_string\n    av_get_planar_sample_fmt\n    av_get_random_seed\n    av_get_sample_fmt\n    av_get_sample_fmt_name\n    av_get_sample_fmt_string\n    av_get_standard_channel_layout\n    av_get_time_base_q\n    av_get_token\n    av_gettime\n    av_gettime_relative\n    av_gettime_relative_is_monotonic\n    av_hash_alloc\n    av_hash_final\n    av_hash_final_b64\n    av_hash_final_bin\n    av_hash_final_hex\n    av_hash_freep\n    av_hash_get_name\n    av_hash_get_size\n    av_hash_init\n    av_hash_names\n    av_hash_update\n    av_hmac_alloc\n    av_hmac_calc\n    av_hmac_final\n    av_hmac_free\n    av_hmac_init\n    av_hmac_update\n    av_i2int\n    av_image_alloc\n    av_image_check_sar\n    av_image_check_size\n    av_image_copy\n    av_image_copy_plane\n    av_image_copy_to_buffer\n    av_image_fill_arrays\n    av_image_fill_linesizes\n    av_image_fill_max_pixsteps\n    av_image_fill_pointers\n    av_image_get_buffer_size\n    av_image_get_linesize\n    av_int_list_length_for_size\n    av_int2i\n    av_lfg_init\n    av_log\n    av_log_default_callback\n    av_log_format_line\n    av_log_get_flags\n    av_log_get_level\n    av_log_set_callback\n    av_log_set_flags\n    av_log_set_level\n    av_log2\n    av_log2_16bit\n    av_log2_i\n    av_lzo1x_decode\n    av_malloc\n    av_mallocz\n    av_match_list\n    av_match_name\n    av_max_alloc\n    av_md5_alloc\n    av_md5_final\n    av_md5_init\n    av_md5_size\n    av_md5_sum\n    av_md5_update\n    av_memcpy_backptr\n    av_memdup\n    av_mod_i\n    av_mul_i\n    av_mul_q\n    av_murmur3_alloc\n    av_murmur3_final\n    av_murmur3_init\n    av_murmur3_init_seeded\n    av_murmur3_update\n    av_nearer_q\n    av_opt_child_class_next\n    av_opt_child_next\n    av_opt_copy\n    av_opt_eval_double\n    av_opt_eval_flags\n    av_opt_eval_float\n    av_opt_eval_int\n    av_opt_eval_int64\n    av_opt_eval_q\n    av_opt_find\n    av_opt_find2\n    av_opt_flag_is_set\n    av_opt_free\n    av_opt_freep_ranges\n    av_opt_get\n    av_opt_get_channel_layout\n    av_opt_get_dict_val\n    av_opt_get_double\n    av_opt_get_image_size\n    av_opt_get_int\n    av_opt_get_key_value\n    av_opt_get_pixel_fmt\n    av_opt_get_q\n    av_opt_get_sample_fmt\n    av_opt_get_video_rate\n    av_opt_is_set_to_default\n    av_opt_is_set_to_default_by_name\n    av_opt_next\n    av_opt_ptr\n    av_opt_query_ranges\n    av_opt_query_ranges_default\n    av_opt_serialize\n    av_opt_set\n    av_opt_set_bin\n    av_opt_set_channel_layout\n    av_opt_set_defaults\n    av_opt_set_defaults2\n    av_opt_set_dict\n    av_opt_set_dict_val\n    av_opt_set_dict2\n    av_opt_set_double\n    av_opt_set_from_string\n    av_opt_set_image_size\n    av_opt_set_int\n    av_opt_set_pixel_fmt\n    av_opt_set_q\n    av_opt_set_sample_fmt\n    av_opt_set_video_rate\n    av_opt_show2\n    av_parse_color\n    av_parse_cpu_caps\n    av_parse_cpu_flags\n    av_parse_ratio\n    av_parse_time\n    av_parse_video_rate\n    av_parse_video_size\n    av_pix_fmt_count_planes\n    av_pix_fmt_desc_get\n    av_pix_fmt_desc_get_id\n    av_pix_fmt_desc_next\n    av_pix_fmt_get_chroma_sub_sample\n    av_pix_fmt_swap_endianness\n    av_pixelutils_get_sad_fn\n    av_q2intfloat\n    av_rc4_alloc\n    av_rc4_crypt\n    av_rc4_init\n    av_read_image_line\n    av_realloc\n    av_realloc_array\n    av_realloc_f\n    av_reallocp\n    av_reallocp_array\n    av_reduce\n    av_rescale\n    av_rescale_delta\n    av_rescale_q\n    av_rescale_q_rnd\n    av_rescale_rnd\n    av_ripemd_alloc\n    av_ripemd_final\n    av_ripemd_init\n    av_ripemd_size\n    av_ripemd_update\n    av_sample_fmt_is_planar\n    av_samples_alloc\n    av_samples_alloc_array_and_samples\n    av_samples_copy\n    av_samples_fill_arrays\n    av_samples_get_buffer_size\n    av_samples_set_silence\n    av_set_cpu_flags_mask\n    av_set_options_string\n    av_sha_alloc\n    av_sha_final\n    av_sha_init\n    av_sha_size\n    av_sha_update\n    av_sha512_alloc\n    av_sha512_final\n    av_sha512_init\n    av_sha512_size\n    av_sha512_update\n    av_shr_i\n    av_small_strptime\n    av_stereo3d_alloc\n    av_stereo3d_create_side_data\n    av_strcasecmp\n    av_strdup\n    av_strerror\n    av_stristart\n    av_stristr\n    av_strlcat\n    av_strlcatf\n    av_strlcpy\n    av_strncasecmp\n    av_strndup\n    av_strnstr\n    av_strstart\n    av_strtod\n    av_strtok\n    av_sub_i\n    av_sub_q\n    av_tea_alloc\n    av_tea_crypt\n    av_tea_init\n    av_tea_size\n    av_tempfile\n    av_thread_message_flush\n    av_thread_message_queue_alloc\n    av_thread_message_queue_free\n    av_thread_message_queue_recv\n    av_thread_message_queue_send\n    av_thread_message_queue_set_err_recv\n    av_thread_message_queue_set_err_send\n    av_thread_message_queue_set_free_func\n    av_timecode_adjust_ntsc_framenum2\n    av_timecode_check_frame_rate\n    av_timecode_get_smpte_from_framenum\n    av_timecode_init\n    av_timecode_init_from_string\n    av_timecode_make_mpeg_tc_string\n    av_timecode_make_smpte_tc_string\n    av_timecode_make_string\n    av_timegm\n    av_tree_destroy\n    av_tree_enumerate\n    av_tree_find\n    av_tree_insert\n    av_tree_node_alloc\n    av_tree_node_size\n    av_twofish_alloc\n    av_twofish_crypt\n    av_twofish_init\n    av_twofish_size\n    av_usleep\n    av_utf8_decode\n    av_util_ffversion\n    av_vbprintf\n    av_version_info\n    av_vlog\n    av_write_image_line\n    av_xtea_alloc\n    av_xtea_crypt\n    av_xtea_init\n    av_xtea_le_crypt\n    av_xtea_le_init\n    avpriv_alloc_fixed_dsp\n    avpriv_cga_font\n    avpriv_float_dsp_alloc\n    avpriv_frame_get_metadatap\n    avpriv_get_gamma_from_trc\n    avpriv_get_trc_function_from_trc\n    avpriv_init_lls\n    avpriv_report_missing_feature\n    avpriv_request_sample\n    avpriv_scalarproduct_float_c\n    avpriv_set_systematic_pal2\n    avpriv_snprintf\n    avpriv_solve_lls\n    avpriv_strtod\n    avpriv_vga16_font\n    avpriv_vsnprintf\n    avutil_configuration\n    avutil_license\n    avutil_version\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/pkgconfig/libavcodec.pc",
    "content": "prefix=../../../Build/WindowsPhone8.1/ARM\nexec_prefix=${prefix}\nlibdir=${prefix}/lib\nincludedir=${prefix}/include\n\nName: libavcodec\nDescription: FFmpeg codec library\nVersion: 57.20.100\nRequires: \nRequires.private: libswresample >= 2.0.101, libavutil >= 55.11.100\nConflicts:\nLibs: -L${libdir}  -lavcodec \nLibs.private: ws2_32.lib\nCflags: -I${includedir}\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/pkgconfig/libavdevice.pc",
    "content": "prefix=../../../Build/WindowsPhone8.1/ARM\nexec_prefix=${prefix}\nlibdir=${prefix}/lib\nincludedir=${prefix}/include\n\nName: libavdevice\nDescription: FFmpeg device handling library\nVersion: 57.0.100\nRequires: \nRequires.private: libavfilter >= 6.22.100, libswscale >= 4.0.100, libavformat >= 57.21.100, libavcodec >= 57.20.100, libswresample >= 2.0.101, libavutil >= 55.11.100\nConflicts:\nLibs: -L${libdir}  -lavdevice \nLibs.private: ws2_32.lib\nCflags: -I${includedir}\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/pkgconfig/libavfilter.pc",
    "content": "prefix=../../../Build/WindowsPhone8.1/ARM\nexec_prefix=${prefix}\nlibdir=${prefix}/lib\nincludedir=${prefix}/include\n\nName: libavfilter\nDescription: FFmpeg audio/video filtering library\nVersion: 6.22.100\nRequires: \nRequires.private: libswscale >= 4.0.100, libavformat >= 57.21.100, libavcodec >= 57.20.100, libswresample >= 2.0.101, libavutil >= 55.11.100\nConflicts:\nLibs: -L${libdir}  -lavfilter \nLibs.private: ws2_32.lib\nCflags: -I${includedir}\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/pkgconfig/libavformat.pc",
    "content": "prefix=../../../Build/WindowsPhone8.1/ARM\nexec_prefix=${prefix}\nlibdir=${prefix}/lib\nincludedir=${prefix}/include\n\nName: libavformat\nDescription: FFmpeg container format library\nVersion: 57.21.100\nRequires: \nRequires.private: libavcodec >= 57.20.100, libswresample >= 2.0.101, libavutil >= 55.11.100\nConflicts:\nLibs: -L${libdir}  -lavformat \nLibs.private: ws2_32.lib\nCflags: -I${includedir}\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/pkgconfig/libavutil.pc",
    "content": "prefix=../../../Build/WindowsPhone8.1/ARM\nexec_prefix=${prefix}\nlibdir=${prefix}/lib\nincludedir=${prefix}/include\n\nName: libavutil\nDescription: FFmpeg utility library\nVersion: 55.11.100\nRequires: \nRequires.private: \nConflicts:\nLibs: -L${libdir}  -lavutil \nLibs.private: \nCflags: -I${includedir}\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/pkgconfig/libswresample.pc",
    "content": "prefix=../../../Build/WindowsPhone8.1/ARM\nexec_prefix=${prefix}\nlibdir=${prefix}/lib\nincludedir=${prefix}/include\n\nName: libswresample\nDescription: FFmpeg audio resampling library\nVersion: 2.0.101\nRequires: \nRequires.private: libavutil >= 55.11.100\nConflicts:\nLibs: -L${libdir}  -lswresample \nLibs.private: \nCflags: -I${includedir}\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/pkgconfig/libswscale.pc",
    "content": "prefix=../../../Build/WindowsPhone8.1/ARM\nexec_prefix=${prefix}\nlibdir=${prefix}/lib\nincludedir=${prefix}/include\n\nName: libswscale\nDescription: FFmpeg image rescaling library\nVersion: 4.0.100\nRequires: \nRequires.private: libavutil >= 55.11.100\nConflicts:\nLibs: -L${libdir}  -lswscale \nLibs.private: \nCflags: -I${includedir}\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/swresample-2.def",
    "content": "EXPORTS\n    swr_alloc\n    swr_alloc_set_opts\n    swr_close\n    swr_config_frame\n    swr_convert\n    swr_convert_frame\n    swr_drop_output\n    swr_ffversion\n    swr_free\n    swr_get_class\n    swr_get_delay\n    swr_get_out_samples\n    swr_init\n    swr_inject_silence\n    swr_is_initialized\n    swr_next_pts\n    swr_set_channel_mapping\n    swr_set_compensation\n    swr_set_matrix\n    swresample_configuration\n    swresample_license\n    swresample_version\n"
  },
  {
    "path": "ffmpeg/Build/WindowsPhone8.1/ARM/lib/swscale-4.def",
    "content": "EXPORTS\n    sws_addVec\n    sws_alloc_context\n    sws_alloc_set_opts\n    sws_allocVec\n    sws_cloneVec\n    sws_convertPalette8ToPacked24\n    sws_convertPalette8ToPacked32\n    sws_convVec\n    sws_freeContext\n    sws_freeFilter\n    sws_freeVec\n    sws_get_class\n    sws_getCachedContext\n    sws_getCoefficients\n    sws_getColorspaceDetails\n    sws_getConstVec\n    sws_getContext\n    sws_getDefaultFilter\n    sws_getGaussianVec\n    sws_getIdentityVec\n    sws_init_context\n    sws_isSupportedEndiannessConversion\n    sws_isSupportedInput\n    sws_isSupportedOutput\n    sws_normalizeVec\n    sws_printVec2\n    sws_scale\n    sws_scaleVec\n    sws_setColorspaceDetails\n    sws_shiftVec\n    sws_subVec\n    swscale_configuration\n    swscale_license\n    swscale_version\n"
  },
  {
    "path": "libtgnet/BufferOutputStream.cpp",
    "content": "// \n// This is the source code of Telegram for Windows Phone v. 3.x.x.\n// It is licensed under GNU GPL v. 2 or later.\n// You should have received a copy of the license in this archive (see LICENSE).\n// \n// Copyright Evgeny Nadymov, 2013-present.\n// \n#include \"pch.h\"\n#include \"BufferOutputStream.h\"\n#include <string.h>\n\nusing namespace libtgnet;\n\nBufferOutputStream::BufferOutputStream(size_t size){\n\tbuffer = (unsigned char*)malloc(size);\n\toffset = 0;\n\tthis->size = size;\n}\n\nBufferOutputStream::BufferOutputStream(unsigned char* buf, size_t size){\n\tbuffer = buf;\n\toffset = 0;\n\tthis->size = size;\n}\n\nBufferOutputStream::~BufferOutputStream(){\n\tfree(buffer);\n}\n\nvoid BufferOutputStream::WriteByte(unsigned char byte){\n\tthis->ExpandBufferIfNeeded(1);\n\tbuffer[offset++] = byte;\n}\n\nvoid BufferOutputStream::WriteInt32(int32_t i){\n\tthis->ExpandBufferIfNeeded(4);\n\tbuffer[offset + 3] = (unsigned char)((i >> 24) & 0xFF);\n\tbuffer[offset + 2] = (unsigned char)((i >> 16) & 0xFF);\n\tbuffer[offset + 1] = (unsigned char)((i >> 8) & 0xFF);\n\tbuffer[offset] = (unsigned char)(i & 0xFF);\n\toffset += 4;\n}\n\nvoid BufferOutputStream::WriteInt64(int64_t i){\n\tthis->ExpandBufferIfNeeded(8);\n\tbuffer[offset + 7] = (unsigned char)((i >> 56) & 0xFF);\n\tbuffer[offset + 6] = (unsigned char)((i >> 48) & 0xFF);\n\tbuffer[offset + 5] = (unsigned char)((i >> 40) & 0xFF);\n\tbuffer[offset + 4] = (unsigned char)((i >> 32) & 0xFF);\n\tbuffer[offset + 3] = (unsigned char)((i >> 24) & 0xFF);\n\tbuffer[offset + 2] = (unsigned char)((i >> 16) & 0xFF);\n\tbuffer[offset + 1] = (unsigned char)((i >> 8) & 0xFF);\n\tbuffer[offset] = (unsigned char)(i & 0xFF);\n\toffset += 8;\n}\n\nvoid BufferOutputStream::WriteInt16(int16_t i){\n\tthis->ExpandBufferIfNeeded(2);\n\tbuffer[offset + 1] = (unsigned char)((i >> 8) & 0xFF);\n\tbuffer[offset] = (unsigned char)(i & 0xFF);\n\toffset += 2;\n}\n\nvoid BufferOutputStream::WriteBytes(unsigned char *bytes, size_t count){\n\tthis->ExpandBufferIfNeeded(count);\n\tmemcpy(buffer + offset, bytes, count);\n\toffset += count;\n}\n\nunsigned char *BufferOutputStream::GetBuffer(){\n\treturn buffer;\n}\n\nsize_t BufferOutputStream::GetLength(){\n\treturn offset;\n}\n\nvoid BufferOutputStream::ExpandBufferIfNeeded(size_t need){\n\tif (offset + need>size){\n\t\tif (need<1024){\n\t\t\tbuffer = (unsigned char *)realloc(buffer, size + 1024);\n\t\t\tsize += 1024;\n\t\t}\n\t\telse{\n\t\t\tbuffer = (unsigned char *)realloc(buffer, size + need);\n\t\t\tsize += need;\n\t\t}\n\t}\n}\n\nvoid BufferOutputStream::Reset(){\n\toffset = 0;\n}\n"
  },
  {
    "path": "libtgnet/BufferOutputStream.h",
    "content": "// \n// This is the source code of Telegram for Windows Phone v. 3.x.x.\n// It is licensed under GNU GPL v. 2 or later.\n// You should have received a copy of the license in this archive (see LICENSE).\n// \n// Copyright Evgeny Nadymov, 2013-present.\n// \n#pragma once\n#include <stdlib.h>\n#include <stdint.h>\n\nnamespace libtgnet\n{\n\tclass BufferOutputStream{\n\n\tpublic:\n\t\tBufferOutputStream(size_t size);\n\t\tBufferOutputStream(unsigned char* buf, size_t size);\n\t\t~BufferOutputStream();\n\t\tvoid WriteByte(unsigned char byte);\n\t\tvoid WriteInt64(int64_t i);\n\t\tvoid WriteInt32(int32_t i);\n\t\tvoid WriteInt16(int16_t i);\n\t\tvoid WriteBytes(unsigned char* bytes, size_t count);\n\t\tunsigned char* GetBuffer();\n\t\tsize_t GetLength();\n\t\tvoid Reset();\n\n\tprivate:\n\t\tvoid ExpandBufferIfNeeded(size_t need);\n\t\tunsigned char* buffer;\n\t\tsize_t size;\n\t\tsize_t offset;\n\t};\n}"
  },
  {
    "path": "libtgnet/ConnectionSocket.cpp",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"pch.h\"\r\n\r\n#include <sstream>\r\n#include \"ConnectionSocket.h\"\r\n#include \"MicrosoftCryptoImpl.h\"\r\n#include \"BufferOutputStream.h\"\r\n\r\n#pragma comment(lib,\"WS2_32\")\r\n\r\nusing namespace libtgnet;\r\n\r\nvoip_crypto_functions_t ConnectionSocket::crypto; // set it yourself upon initialization\r\n\r\nConnectionSocket::ConnectionSocket(ConnectionSettings^ connectionSettings, ProxySettings^ proxySettings)\r\n{\r\n\tConnectionSocket::crypto.aes_ige_decrypt = MicrosoftCryptoImpl::AesIgeDecrypt;\r\n\tConnectionSocket::crypto.aes_ige_encrypt = MicrosoftCryptoImpl::AesIgeEncrypt;\r\n\tConnectionSocket::crypto.aes_ctr_encrypt = MicrosoftCryptoImpl::AesCtrEncrypt;\r\n\tConnectionSocket::crypto.sha1 = MicrosoftCryptoImpl::SHA1;\r\n\tConnectionSocket::crypto.sha256 = MicrosoftCryptoImpl::SHA256;\r\n\tConnectionSocket::crypto.rand_bytes = MicrosoftCryptoImpl::RandBytes;\r\n\tMicrosoftCryptoImpl::Init();\r\n\r\n\tWORD wVersionRequested;\r\n\tWSADATA wsaData;\r\n\tint err;\r\n\r\n\t/* Use the MAKEWORD(lowbyte, highbyte) macro declared in Windef.h */\r\n\twVersionRequested = MAKEWORD(2, 2);\r\n\r\n\terr = WSAStartup(wVersionRequested, &wsaData);\r\n\tif (err != 0) {\r\n\t\t/* Tell the user that we could not find a usable */\r\n\t\t/* Winsock DLL.                                  */\r\n\t\tprintf(\"WSAStartup failed with error: %d\\n\", err);\r\n\t\treturn;\r\n\t}\r\n\r\n\t_host = connectionSettings->Host;\r\n\t_port = connectionSettings->Port;\r\n\t_ipv4 = connectionSettings->IPv4;\r\n\t_protocolDCId = connectionSettings->ProtocolDCId;\r\n\t_protocolSecret = connectionSettings->ProtocolSecret;\r\n\r\n\t_proxySettings = proxySettings;\r\n}\r\n\r\nConnectionSocket::~ConnectionSocket()\r\n{\r\n\r\n}\r\n\r\nint ConnectionSocket::SendPacket(const Platform::Array<uint8>^ data)\r\n{\r\n\tBufferOutputStream os(data->Length + 4);\r\n\tsize_t len = data->Length / 4;\r\n\tif (len < 0x7F)\r\n\t{\r\n\t\tos.WriteByte((unsigned char)len);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tos.WriteByte(0x7F);\r\n\t\tos.WriteByte((unsigned char)(len & 0xFF));\r\n\t\tos.WriteByte((unsigned char)((len >> 8) & 0xFF));\r\n\t\tos.WriteByte((unsigned char)((len >> 16) & 0xFF));\r\n\t}\r\n\tos.WriteBytes(data->begin(), data->Length);\r\n\r\n#ifdef TCP_OBFUSCATED2\r\n\tEncryptForTCPO2(os.GetBuffer(), os.GetLength(), &_sendState);\r\n#endif\r\n\r\n\tint res = send(_socket, (const char*)os.GetBuffer(), os.GetLength(), 0);\r\n\tif (res < 0)\r\n\t{\r\n\t\tprintf(\"send failed with error: %d\\n\", res);\r\n\t}\r\n\r\n\treturn res;\r\n}\r\n\r\nPlatform::Array<uint8>^ ConnectionSocket::Receive()\r\n{\r\n\tint length = 0;\r\n\tint offset = 0;\r\n\r\n\tint res = recv(_socket, (char*)_recvbuf, 1, 0);\r\n\tif (res <= 0)\r\n\t{\r\n\t\tprintf(\"recv failed with error: %d\\n\", res);\r\n\t\treturn nullptr;\r\n\t}\r\n\r\n#ifdef TCP_OBFUSCATED2\r\n\tEncryptForTCPO2(_recvbuf, 1, &_recvState);\r\n#endif\r\n\r\n\tif (_recvbuf[0] < 0x7F)\r\n\t{\r\n\t\tlength = _recvbuf[0] * 4;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tint res = recv(_socket, (char*)_recvbuf, 3, 0);\r\n\t\tif (res <= 0)\r\n\t\t{\r\n\t\t\tprintf(\"recv failed with error: %d\\n\", res);\r\n\t\t\treturn nullptr;\r\n\t\t}\r\n\t\tif (res < 3)\r\n\t\t{\r\n\t\t\tprintf(\"recv failed with incorrect length size: %d\\n\", res);\r\n\t\t\treturn nullptr;\r\n\t\t}\r\n\r\n#ifdef TCP_OBFUSCATED2\r\n\t\tEncryptForTCPO2(_recvbuf, 3, &_recvState);\r\n#endif\r\n\r\n\t\tlength = ((size_t)_recvbuf[0] | ((size_t)_recvbuf[1] << 8) | ((size_t)_recvbuf[2] << 16)) * 4;\r\n\t}\r\n\r\n\tif (length <= 0)\r\n\t{\r\n\t\tprintf(\"recv failed with incorrect length: %d\\n\", length);\r\n\t\treturn nullptr;\r\n\t}\r\n\r\n\tPlatform::Array<uint8>^ buffer = ref new Platform::Array<uint8_t>(length);\r\n\r\n\twhile (offset < length)\r\n\t{\r\n\t\tint res = recv(_socket, (char*)buffer->begin() + offset, length - offset, 0);\r\n\t\tif (res <= 0)\r\n\t\t{\r\n\t\t\tprintf(\"recv failed with error: %d\\n\", res);\r\n\t\t\treturn nullptr;\r\n\t\t}\r\n\t\toffset += res;\r\n\t}\r\n\r\n#ifdef TCP_OBFUSCATED2\r\n\tEncryptForTCPO2(buffer->begin(), length, &_recvState);\r\n#endif\r\n\r\n\treturn buffer;\r\n}\r\n\r\nvoid ConnectionSocket::LOG(std::wstring str)\r\n{\r\n\tstd::wostringstream stream;\r\n\tstream << L\"[libtvnet::ConnectionSocket \" + std::wstring(_host->Begin()) + L\"] => \" << _socket << L\" \" << str << L\"\\n\";\r\n\r\n\t::OutputDebugString(stream.str().c_str());\r\n}\r\n\r\nvoid ConnectionSocket::Close()\r\n{\r\n\tLOG(L\"Close\");\r\n\tif (_socket == SOCKET_ERROR) return;\r\n\r\n\t_closed = true;\r\n\tint err = closesocket(_socket);\r\n\tif (err < 0)\r\n\t{\r\n\t\tprintf(\"closesocket failed with error: %d\\n\", err);\r\n\t\treturn;\r\n\t}\r\n}\r\n\r\nint ConnectionSocket::Connect()\r\n{\r\n\tint err = -1;\r\n\tBufferOutputStream p(1024);\r\n\r\n\t// init socket\r\n\tif (_proxySettings != nullptr)\r\n\t{\r\n\t\tstruct addrinfo hints;\r\n\t\tstruct addrinfo *info;\r\n\t\tmemset(&hints, 0, sizeof(hints));\r\n\r\n\t\tstd::wstring addressW(_proxySettings->Host->Begin());\r\n\t\tstd::string addressA(addressW.begin(), addressW.end());\r\n\r\n\t\tstd::string portA = std::to_string(_proxySettings->Port);\r\n\r\n\t\terr = getaddrinfo(addressA.c_str(), portA.c_str(), &hints, &info);\r\n\t\tif (err < 0)\r\n\t\t{\r\n\t\t\tprintf(\"getaddrinfo failed with error: %d\\n\", err);\r\n\t\t\treturn -2;\r\n\t\t}\r\n\t\tif (info == nullptr)\r\n\t\t{\r\n\t\t\tprintf(\"getaddrinfo info is null\");\r\n\t\t\treturn -2;\t// IMPORTANT! err=11001 here\r\n\t\t}\r\n\r\n\t\terr = Connect(info);\r\n\t\tif (err < 0)\r\n\t\t{\r\n\t\t\tprintf(\"connect failed with error: %d\\n\", err);\r\n\t\t\treturn -4;\r\n\t\t}\r\n\r\n\t\tif (_proxySettings->Type == ProxyType::MTProto)\r\n\t\t{\r\n\t\t\t_protocolSecret = _proxySettings->Secret;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tp.Reset();\r\n\t\t\tif (_proxySettings->Username->IsEmpty())\r\n\t\t\t{\r\n\t\t\t\tp.WriteByte(0x05); // VER\r\n\t\t\t\tp.WriteByte(0x01); // NMETHODS\r\n\t\t\t\tp.WriteByte(0x00); // no auth\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tp.WriteByte(0x05); // VER\r\n\t\t\t\tp.WriteByte(0x02); // NMETHODS\r\n\t\t\t\tp.WriteByte(0x00); // no auth\r\n\t\t\t\tp.WriteByte(0x02); // user/pass\r\n\t\t\t}\r\n\r\n\t\t\terr = send(_socket, (const char*)p.GetBuffer(), p.GetLength(), 0);\r\n\t\t\tif (err < 0)\r\n\t\t\t{\r\n\t\t\t\t//closesocket(_socket);\r\n\t\t\t\tprintf(\"send to proxy failed with error: %d\\n\", err);\r\n\t\t\t\treturn -8;\r\n\t\t\t}\r\n\r\n\t\t\terr = recv(_socket, (char*)_recvbuf, sizeof(_recvbuf), 0);\r\n\t\t\tif (err != 2)\r\n\t\t\t{\r\n\t\t\t\t//closesocket(_socket);\r\n\t\t\t\tprintf(\"recv from proxy failed with error: %d\\n\", err);\r\n\t\t\t\treturn -8;\r\n\t\t\t}\r\n\r\n\t\t\tif (_recvbuf[1] == 0xFF)\r\n\t\t\t{\r\n\t\t\t\t//closesocket(_socket);\r\n\t\t\t\tprintf(\"none of the authentication method was accepted by proxy server\");\r\n\t\t\t\treturn -8;\r\n\t\t\t}\r\n\r\n\t\t\t//Username/Password Authentication protocol\r\n\t\t\tif (_recvbuf[1] == 0x02)\r\n\t\t\t{\r\n\t\t\t\tp.Reset();\r\n\t\t\t\tp.WriteByte(0x01);\t// Version 5.\r\n\r\n\t\t\t\t// add user name\r\n\t\t\t\tstd::wstring usernameW(_proxySettings->Username->Begin());\r\n\t\t\t\tstd::string usernameA(usernameW.begin(), usernameW.end());\r\n\t\t\t\tconst char* srcUsername = usernameA.c_str();\r\n\r\n\t\t\t\tunsigned char usernameLength = _proxySettings->Username->Length() > 255 ? 255 : _proxySettings->Username->Length();\r\n\t\t\t\tp.WriteByte(usernameLength);\t\t\t\t\t\t\t\t// ULEN\r\n\t\t\t\tp.WriteBytes((unsigned char*)srcUsername, usernameLength);\t// UNAME\r\n\r\n\t\t\t\t// add password\r\n\t\t\t\tstd::wstring passwordW(_proxySettings->Password->Begin());\r\n\t\t\t\tstd::string passwordA(passwordW.begin(), passwordW.end());\r\n\t\t\t\tconst char* srcPassword = passwordA.c_str();\r\n\r\n\t\t\t\tunsigned char passwordLength = _proxySettings->Password->Length() > 255 ? 255 : _proxySettings->Password->Length();\r\n\t\t\t\tp.WriteByte(passwordLength);\t\t\t\t\t\t\t\t// PLEN\r\n\t\t\t\tp.WriteBytes((unsigned char*)srcPassword, passwordLength);\t// PASSWD\r\n\r\n\t\t\t\t// Send the Username/Password request\r\n\t\t\t\terr = send(_socket, (const char*)p.GetBuffer(), p.GetLength(), 0);\r\n\t\t\t\tif (err < 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tprintf(\"send to proxy failed with error: %d\\n\", err);\r\n\t\t\t\t}\r\n\r\n\t\t\t\terr = recv(_socket, (char*)_recvbuf, sizeof(_recvbuf), 0);\r\n\t\t\t\tif (err != 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tprintf(\"recv from proxy failed with error: %d\\n\", err);\r\n\t\t\t\t\treturn -16;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (_recvbuf[1] != 0x00)\r\n\t\t\t\t{\r\n\t\t\t\t\tprintf(\"bad username/password: %d\\n\", err);\r\n\t\t\t\t\treturn -16;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//// This version only supports connect command. \r\n\t\t\t//// UDP and Bind are not supported.\r\n\r\n\t\t\t// Send connect request now...\r\n\t\t\tp.Reset();\r\n\t\t\tp.WriteByte(0x05);\t// version 5.\r\n\t\t\tp.WriteByte(0x01);\t// command = connect.\r\n\t\t\tp.WriteByte(0x00);\t// Reserve = must be 0x00\r\n\r\n\t\t\t// Destination adress in an IP.\r\n\t\t\tif (_ipv4)\r\n\t\t\t{\r\n\t\t\t\t// Address is IPV4 format\r\n\t\t\t\tstd::wstring hostW(_host->Begin());\r\n\t\t\t\tstd::string hostA(hostW.begin(), hostW.end());\r\n\r\n\t\t\t\tp.WriteByte(0x01);\r\n\t\t\t\tp.WriteInt32(StringToV4Address(hostA));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Address is IPV6 format\r\n\t\t\t\tstd::wstring hostW(_host->Begin());\r\n\t\t\t\tstd::string hostA(hostW.begin(), hostW.end());\r\n\t\t\t\tuint8_t address[16];\r\n\t\t\t\tStringToV6Address(hostA, address);\r\n\r\n\t\t\t\tp.WriteByte(0x04);\r\n\t\t\t\tp.WriteBytes(address, 16);\r\n\t\t\t}\r\n\r\n\t\t\tp.WriteInt16(htons(_port));\r\n\r\n\t\t\t// send connect request.\r\n\t\t\terr = send(_socket, (const char*)p.GetBuffer(), p.GetLength(), 0);\r\n\t\t\tif (err < 0)\r\n\t\t\t{\r\n\t\t\t\tprintf(\"send to proxy failed with error: %d\\n\", err);\r\n\t\t\t}\r\n\r\n\t\t\terr = recv(_socket, (char*)_recvbuf, sizeof(_recvbuf), 0);\r\n\t\t\tif (err <= 0)\r\n\t\t\t{\r\n\t\t\t\tprintf(\"recv from proxy failed with error: %d\\n\", err);\r\n\t\t\t\treturn -32;\r\n\t\t\t}\r\n\t\t\tif (_recvbuf[1] != 0x00)\r\n\t\t\t{\r\n\t\t\t\tprintf(\"recv from proxy failed with proxy error: %d\\n\", _recvbuf[0]);\r\n\t\t\t\treturn -32;\r\n\t\t\t}\r\n\t\t\t// Success Connected...\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\terr = Connect(_host, _port, _ipv4);\r\n\t\tif (err < 0)\r\n\t\t{\r\n\t\t\tprintf(\"connect failed with error: %d\\n\", err);\r\n\t\t\treturn -64;\r\n\t\t}\r\n\t}\r\n\r\n\tp.Reset();\r\n#if defined(TCP_OBFUSCATED2) || defined(TCP_OBFUSCATED)\r\n\tunsigned char buf[64];\r\n\tGenerateTCPO2States(buf, &_recvState, &_sendState);\r\n\tp.WriteBytes(buf, 64);\r\n#else\r\n\tp.WriteByte(0xef);\r\n#endif\r\n\r\n\terr = send(_socket, (const char*)p.GetBuffer(), p.GetLength(), 0);\r\n\tif (err <= 0)\r\n\t{\r\n\t\tprintf(\"send failed with error: %d\\n\", err);\r\n\t\treturn -128;\r\n\t}\r\n\r\n\treturn err;\r\n}\r\n\r\nint ConnectionSocket::Connect(const addrinfo *info)\r\n{\r\n\tint err = -2;\r\n\tLOG(L\"Socket begin\");\r\n\t_socket = socket(info->ai_addr->sa_family, info->ai_socktype, info->ai_protocol);\r\n\tLOG(L\"Socket end\");\r\n\r\n\tLOG(L\"Connect\");\r\n\terr = connect(_socket, info->ai_addr, info->ai_addrlen);\r\n\r\n\treturn err;\r\n}\r\n\r\nint ConnectionSocket::Connect(Platform::String^ address, int port, bool ipv4)\r\n{\r\n\tint err = -2;\r\n\tstd::wstring addressW(address->Begin());\r\n\tstd::string addressA(addressW.begin(), addressW.end());\r\n\r\n\tif (ipv4)\r\n\t{\r\n\t\tLOG(L\"Socket begin\");\r\n\t\t_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);\r\n\t\tLOG(L\"Socket end\");\r\n\r\n\r\n\t\tsockaddr_in addr;\r\n\t\tZeroMemory(&addr, 0, sizeof(addr));\r\n\t\taddr.sin_family = AF_INET;\r\n\t\taddr.sin_addr.s_addr = inet_addr(addressA.c_str());\r\n\t\taddr.sin_port = htons(port);\r\n\r\n\t\tLOG(L\"Connect\");\r\n\t\terr = connect(_socket, (sockaddr*)&addr, sizeof(addr));\r\n\t}\r\n\telse\r\n\t{\r\n\t\t_socket = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);\r\n\r\n\t\tsockaddr_in6 addr;\r\n\t\tZeroMemory(&addr, sizeof(addr));\r\n\t\taddr.sin6_family = AF_INET6;\r\n\t\tint size = sizeof(addr);\r\n#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP\r\n\t\tWSAStringToAddressW((wchar_t*)addressW.c_str(), AF_INET6, NULL, (sockaddr*)&addr, &size);\r\n#else\r\n\t\tWSAStringToAddressA((char*)address.c_str(), AF_INET6, NULL, (sockaddr*)&addr, &size);\r\n#endif\r\n\t\taddr.sin6_flowinfo = 0;\r\n\t\taddr.sin6_scope_id = 0;\r\n\t\taddr.sin6_port = htons(port);\r\n\r\n\t\terr = connect(_socket, (sockaddr*)&addr, sizeof(addr));\r\n\t}\r\n\r\n\treturn err;\r\n}\r\n\r\nvoid ConnectionSocket::GenerateTCPO2States(unsigned char* buffer, TCPO2State* recvState, TCPO2State* sendState)\r\n{\r\n\tmemset(recvState, 0, sizeof(TCPO2State));\r\n\tmemset(sendState, 0, sizeof(TCPO2State));\r\n\tunsigned char nonce[64];\r\n\tunsigned char* zero = reinterpret_cast<unsigned char*>(nonce);\r\n\tuint32_t *first = reinterpret_cast<uint32_t*>(nonce);\r\n\tuint32_t *second = first + 1;\r\n\tuint32_t reserved11 = 0x44414548U;\r\n\tuint32_t reserved12 = 0x54534f50U;\r\n\tuint32_t reserved13 = 0x20544547U;\r\n\tuint32_t reserved14 = 0xEEEEEEEEU;\r\n\tuint32_t reserved21 = 0x00000000U;\r\n\tdo {\r\n\t\tConnectionSocket::crypto.rand_bytes(nonce, sizeof(nonce));\r\n\t} while (*zero == 0xef\r\n\t\t|| *first == reserved11\r\n\t\t|| *first == reserved12\r\n\t\t|| *first == reserved13\r\n\t\t|| *first == reserved14\r\n\t\t|| *second == reserved21);\r\n\r\n#if defined(TCP_OBFUSCATED2)\r\n\t// prepare encryption key/iv\r\n\tif (_protocolSecret != nullptr\r\n\t\t&& _protocolSecret->Length == 16)\r\n\t{\r\n\t\tmemcpy(sendState->key, nonce + 8, 32);\r\n\t\tmemcpy(sendState->iv, nonce + 8 + 32, 16);\r\n\r\n\t\tbyte buffer[32];\r\n\t\tmemcpy(buffer, sendState->key, 32);\r\n\r\n\t\tBufferOutputStream payload(64);\r\n\t\tpayload.WriteBytes(buffer, 32);\r\n\t\tpayload.WriteBytes(_protocolSecret->Data, _protocolSecret->Length);\r\n\r\n\t\tConnectionSocket::crypto.sha256(payload.GetBuffer(), payload.GetLength(), sendState->key);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tmemcpy(sendState->key, nonce + 8, 32);\r\n\t\tmemcpy(sendState->iv, nonce + 8 + 32, 16);\r\n\t}\r\n\r\n\t// prepare decryption key/iv\r\n\tchar reversed[48];\r\n\tmemcpy(reversed, nonce + 8, sizeof(reversed));\r\n\tstd::reverse(reversed, reversed + sizeof(reversed));\r\n\tif (_protocolSecret != nullptr\r\n\t\t&& _protocolSecret->Length == 16)\r\n\t{\r\n\t\tmemcpy(recvState->key, reversed, 32);\r\n\t\tmemcpy(recvState->iv, reversed + 32, 16);\r\n\r\n\t\tbyte buffer[32];\r\n\t\tmemcpy(buffer, recvState->key, 32);\r\n\r\n\t\tBufferOutputStream payload(64);\r\n\t\tpayload.WriteBytes(buffer, 32);\r\n\t\tpayload.WriteBytes(_protocolSecret->Data, _protocolSecret->Length);\r\n\r\n\t\tConnectionSocket::crypto.sha256(payload.GetBuffer(), payload.GetLength(), recvState->key);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tmemcpy(recvState->key, reversed, 32);\r\n\t\tmemcpy(recvState->iv, reversed + 32, 16);\r\n\t}\r\n\r\n\t// write protocol identifier\r\n\t*reinterpret_cast<uint32_t*>(nonce + 56) = 0xEFEFEFEFU;\r\n\r\n\t// write dc identifier\r\n\t*reinterpret_cast<int16*>(nonce + 60) = _protocolDCId;\r\n\r\n\tmemcpy(buffer, nonce, 56);\r\n\tEncryptForTCPO2(nonce, sizeof(nonce), sendState);\r\n\tmemcpy(buffer + 56, nonce + 56, 8);\r\n#else\r\n\t// write protocol identifier\r\n\t*reinterpret_cast<uint32_t*>(nonce + 56) = 0xEFEFEFEFU;\r\n\tmemcpy(buffer, nonce, 64);\r\n#endif\r\n}\r\n\r\nvoid ConnectionSocket::EncryptForTCPO2(unsigned char *buffer, size_t len, TCPO2State *state)\r\n{\r\n\tConnectionSocket::crypto.aes_ctr_encrypt(buffer, len, state->key, state->iv, state->ecount, &state->num);\r\n}\r\n\r\nuint32_t ConnectionSocket::StringToV4Address(std::string address)\r\n{\r\n\tsockaddr_in addr;\r\n\tZeroMemory(&addr, sizeof(addr));\r\n\taddr.sin_family = AF_INET;\r\n\tint size = sizeof(addr);\r\n#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP\r\n\twchar_t buf[INET_ADDRSTRLEN];\r\n\tMultiByteToWideChar(CP_UTF8, 0, address.c_str(), -1, buf, INET_ADDRSTRLEN);\r\n\tWSAStringToAddressW(buf, AF_INET, NULL, (sockaddr*)&addr, &size);\r\n#else\r\n\tWSAStringToAddressA((char*)address.c_str(), AF_INET, NULL, (sockaddr*)&addr, &size);\r\n#endif\r\n\treturn addr.sin_addr.s_addr;\r\n}\r\n\r\nvoid ConnectionSocket::StringToV6Address(std::string address, unsigned char *out)\r\n{\r\n\tsockaddr_in6 addr;\r\n\tZeroMemory(&addr, sizeof(addr));\r\n\taddr.sin6_family = AF_INET6;\r\n\tint size = sizeof(addr);\r\n#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP\r\n\twchar_t buf[INET6_ADDRSTRLEN];\r\n\tMultiByteToWideChar(CP_UTF8, 0, address.c_str(), -1, buf, INET6_ADDRSTRLEN);\r\n\tWSAStringToAddressW(buf, AF_INET6, NULL, (sockaddr*)&addr, &size);\r\n#else\r\n\tWSAStringToAddressA((char*)address.c_str(), AF_INET, NULL, (sockaddr*)&addr, &size);\r\n#endif\r\n\tmemcpy(out, addr.sin6_addr.s6_addr, 16);\r\n}\r\n"
  },
  {
    "path": "libtgnet/ConnectionSocket.h",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n#define TCP_OBFUSCATED2\r\n//#define TCP_OBFUSCATED\r\n#include <vector>\r\n#include <stdint.h>\r\n#include <string>\r\n#include <windows.h>\r\n#include <winsock2.h>\r\n#include <ws2tcpip.h>\r\n#include <stdio.h>\r\n\r\nnamespace libtgnet\r\n{\r\n\tstruct voip_crypto_functions_t{\r\n\t\tvoid(*rand_bytes)(uint8_t* buffer, size_t length);\r\n\t\tvoid(*sha1)(uint8_t* msg, size_t length, uint8_t* output);\r\n\t\tvoid(*sha256)(uint8_t* msg, size_t length, uint8_t* output);\r\n\t\tvoid(*aes_ige_encrypt)(uint8_t* in, uint8_t* out, size_t length, uint8_t* key, uint8_t* iv);\r\n\t\tvoid(*aes_ige_decrypt)(uint8_t* in, uint8_t* out, size_t length, uint8_t* key, uint8_t* iv);\r\n\t\tvoid(*aes_ctr_encrypt)(uint8_t* inout, size_t length, uint8_t* key, uint8_t* iv, uint8_t* ecount, uint32_t* num);\r\n\t};\r\n\ttypedef struct voip_crypto_functions_t voip_crypto_functions_t;\r\n\r\n\tstruct TCPO2State{\r\n\t\tunsigned char key[32];\r\n\t\tunsigned char iv[16];\r\n\t\tunsigned char ecount[16];\r\n\t\tuint32_t num;\r\n\t};\r\n\r\n\tpublic enum class ProxyType : int{\r\n\t\tSocks5 = 0,\r\n\t\tMTProto\r\n\t};\r\n\r\n\tpublic ref class ProxySettings sealed {\r\n\tpublic:\r\n\t\tproperty ProxyType Type;\r\n\t\tproperty Platform::String^ Host;\r\n\t\tproperty int Port;\r\n\t\tproperty bool IPv4;\r\n\t\tproperty Platform::String^ Username;\r\n\t\tproperty Platform::String^ Password;\r\n\t\tproperty Platform::Array<uint8_t>^ Secret;\r\n\t};\r\n\r\n\tpublic ref class ConnectionSettings sealed{\r\n\tpublic:\r\n\t\tproperty Platform::String^ Host;\r\n\t\tproperty int Port;\r\n\t\tproperty bool IPv4;\r\n\t\tproperty int16 ProtocolDCId;\r\n\t\tproperty Platform::Array<uint8_t>^ ProtocolSecret;\r\n\t};\r\n\r\n\tclass ConnectionSocket\r\n\t{\r\n\tprivate:\r\n\t\tint16 _protocolDCId;\r\n\t\tPlatform::Array<uint8_t>^ _protocolSecret = nullptr;\r\n\t\tPlatform::String^ _host;\r\n\t\tint _port;\r\n\t\tbool _ipv4;\r\n\t\tProxySettings^ _proxySettings = nullptr;\r\n\t\tbool _closed;\r\n\r\n\t\tunsigned char _recvbuf[64];\r\n\t\tSOCKET _socket = SOCKET_ERROR;\r\n\t\tTCPO2State _recvState;\r\n\t\tTCPO2State _sendState;\r\n\r\n\t\tvoid GenerateTCPO2States(unsigned char* buffer, TCPO2State* recvState, TCPO2State* sendState);\r\n\t\tvoid EncryptForTCPO2(unsigned char *buffer, size_t len, TCPO2State *state);\r\n\t\tuint32_t StringToV4Address(std::string address);\r\n\t\tvoid StringToV6Address(std::string address, unsigned char *out);\r\n\t\tint Connect(Platform::String^ address, int port, bool ipv4);\r\n\t\tint Connect(const addrinfo *info);\r\n\r\n\t\tvoid LOG(std::wstring str);\r\n\tpublic:\r\n\t\tstatic voip_crypto_functions_t crypto;\r\n\r\n\t\tConnectionSocket(ConnectionSettings^ connectionSettings, ProxySettings^ proxySettings);\r\n\t\t~ConnectionSocket();\r\n\t\tint Connect();\r\n\t\tint SendPacket(const Platform::Array<uint8>^ data);\r\n\t\tPlatform::Array<uint8>^ Receive();\r\n\t\tvoid Close();\r\n\t};\r\n}\r\n"
  },
  {
    "path": "libtgnet/ConnectionSocketWrapper.cpp",
    "content": "#include \"pch.h\"\r\n\r\n#include <sstream>\r\n#include <chrono>\r\n#include <iostream>\r\n#include \"ConnectionSocketWrapper.h\"\r\n#include \"MicrosoftCryptoImpl.h\"\r\n\r\nusing namespace libtgnet;\r\n\r\n\r\nPlatform::Array<uint8_t>^ ConnectionSocketWrapper::AesCtr(const Platform::Array<uint8_t>^ data, TCPO2StateWrapper^ state)\r\n{\r\n\tMicrosoftCryptoImpl::Init();\r\n\r\n\tauto result = ref new Platform::Array<uint8_t>(data);\r\n\tauto key = ref new Platform::Array<uint8_t>(state->Key);\r\n\tauto iv = ref new Platform::Array<uint8_t>(state->IV);\r\n\tauto ecount = ref new Platform::Array<uint8_t>(state->Ecount);\r\n\tuint32_t num = state->Num;\r\n\tMicrosoftCryptoImpl::AesCtrEncrypt(result->Data, result->Length, key->Data, iv->Data, ecount->Data, &num);\r\n\r\n\treturn result;\r\n}\r\n\r\nConnectionSocketWrapper::ConnectionSocketWrapper(ConnectionSettings^ connectionSettings, ProxySettings^ proxySettings)\r\n{\r\n\t_socket = new ConnectionSocket(connectionSettings, proxySettings);\r\n\t_host = connectionSettings->Host;\r\n}\r\n\r\nConnectionSocketWrapper::~ConnectionSocketWrapper()\r\n{\r\n\tdelete _socket;\r\n\t_socket = nullptr;\r\n}\r\n\r\nvoid ConnectionSocketWrapper::LOG(std::wstring str)\r\n{\r\n\tstd::wostringstream stream;\r\n\tstream << L\"[libtgnet::ConnectionSocketWrapper \" + std::wstring(_host->Begin()) + L\"] => \" << _socket << L\" \" << str << L\"\\n\";\r\n\r\n\t::OutputDebugString(stream.str().c_str());\r\n}\r\n\r\nint ConnectionSocketWrapper::Connect()\r\n{\r\n\tif (_socket == nullptr) return -2;\r\n\r\n\t//LOG(L\"Connect start\");\r\n\tauto result = _socket->Connect();\r\n\t//LOG(L\"Connect end\");\r\n\r\n\treturn result;\r\n}\r\n\r\nint ConnectionSocketWrapper::SendPacket(const Platform::Array<uint8>^ data)\r\n{\r\n\tif (_sendTime == 0)\r\n\t{\r\n\t\t_sendTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();\r\n\t}\r\n\r\n\tif (_socket == nullptr) return -2;\r\n\r\n\t//LOG(L\"SendPacket begin\");\r\n\tauto result = _socket->SendPacket(data);\r\n\t//LOG(L\"SendPacket end\");\r\n\r\n\treturn result;\r\n}\r\n\r\nvoid ConnectionSocketWrapper::StartReceive()\r\n{\r\n\tLOG(L\"StartReceive\");\r\n\twhile (true)\r\n\t{\r\n\t\tif (_socket == nullptr) return;\r\n\r\n\t\t//LOG(L\"Receive begin\");\r\n\t\tPlatform::Array<uint8_t>^ result = _socket->Receive();\r\n\t\t//LOG(L\"Receive end\");\r\n\t\tif (result == nullptr)\r\n\t\t{\r\n\t\t\tClosed(this);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (_receiveTime == 0)\r\n\t\t\t{\r\n\t\t\t\t_receiveTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();\r\n\t\t\t}\r\n\t\t\tPacketReceived(this, result);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nuint64_t ConnectionSocketWrapper::GetPing()\r\n{\r\n\tif (_sendTime > 0 && _sendTime < _receiveTime)\r\n\t{\r\n\t\treturn _receiveTime - _sendTime;\r\n\t}\r\n\r\n\treturn 0;\r\n}\r\n\r\nvoid ConnectionSocketWrapper::Close()\r\n{\r\n\tif (_socket == nullptr) return;\r\n\r\n\t//LOG(L\"Close begin\");\r\n\t_socket->Close();\r\n\t//LOG(L\"Close end\");\r\n}\r\n"
  },
  {
    "path": "libtgnet/ConnectionSocketWrapper.h",
    "content": "#pragma once\r\n#include \"ConnectionSocket.h\"\r\nnamespace libtgnet\r\n{\r\n\tref class ConnectionSocketWrapper;\r\n\tpublic delegate void PacketReceivedEventHandler(ConnectionSocketWrapper^ sender, const Platform::Array<uint8_t>^ s);\r\n\tpublic delegate void ConnectionClosedEventHandler(ConnectionSocketWrapper^ sender);\r\n\r\n\tpublic ref class TCPO2StateWrapper sealed\r\n\t{\r\n\tpublic:\r\n\t\tproperty Platform::Array<uint8_t>^ Key;\r\n\t\tproperty Platform::Array<uint8_t>^ IV;\r\n\t\tproperty Platform::Array<uint8_t>^ Ecount;\r\n\t\tproperty uint32_t Num;\r\n\t};\r\n\r\n\tpublic ref class ConnectionSocketWrapper sealed\r\n\t{\r\n\tprivate:\r\n\t\tConnectionSocket* _socket;\r\n\r\n\t\tPlatform::String^ _host;\r\n\t\tvoid LOG(std::wstring str);\r\n\r\n\t\tuint64_t _sendTime;\r\n\t\tuint64_t _receiveTime;\r\n\tpublic:\r\n\t\tConnectionSocketWrapper(ConnectionSettings^ connectionSettings, ProxySettings^ proxySettings);\r\n\t\tvirtual ~ConnectionSocketWrapper();\r\n\t\tint SendPacket(const Platform::Array<uint8_t>^ data);\r\n\t\tevent PacketReceivedEventHandler^ PacketReceived;\r\n\t\tevent ConnectionClosedEventHandler^ Closed;\r\n\t\tint Connect();\r\n\t\tvoid StartReceive();\r\n\t\tvoid Close();\r\n\r\n\t\tuint64_t GetPing();\r\n\r\n\t\tstatic Platform::Array<uint8_t>^ AesCtr(const Platform::Array<uint8_t>^ data, TCPO2StateWrapper^ state);\r\n\t};\r\n}\r\n\r\n"
  },
  {
    "path": "libtgnet/MicrosoftCryptoImpl.cpp",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"pch.h\"\r\n#include \"MicrosoftCryptoImpl.h\"\r\n#include <stdlib.h>\r\n#include <string.h>\r\n#include <windows.h>\r\n#include <vector>\r\n#include <string>\r\n#include <collection.h>\r\n#include <wrl.h>  \r\n#include <robuffer.h> \r\n\r\nusing namespace Windows::Storage::Streams;\r\nusing namespace Microsoft::WRL;\r\nusing namespace Platform;\r\nusing namespace Windows::Security::Cryptography;\r\nusing namespace Windows::Security::Cryptography::Core;\r\nusing namespace Windows::Storage::Streams;\r\nusing namespace Windows::Data::Json;\r\nusing namespace Windows::Phone::Media::Devices;\r\n\r\nHashAlgorithmProvider^ MicrosoftCryptoImpl::sha1Provider;\r\nHashAlgorithmProvider^ MicrosoftCryptoImpl::sha256Provider;\r\nSymmetricKeyAlgorithmProvider^ MicrosoftCryptoImpl::aesKeyProvider;\r\n\r\nvoid MicrosoftCryptoImpl::AesIgeEncrypt(uint8_t* in, uint8_t* out, size_t len, uint8_t* key, uint8_t* iv){\r\n\tIBuffer^ keybuf = IBufferFromPtr(key, 32);\r\n\tCryptographicKey^ _key = aesKeyProvider->CreateSymmetricKey(keybuf);\r\n\tuint8_t tmpOut[16];\r\n\tuint8_t* xPrev = iv + 16;\r\n\tuint8_t* yPrev = iv;\r\n\tuint8_t x[16];\r\n\tuint8_t y[16];\r\n\tfor (size_t offset = 0; offset<len; offset += 16){\r\n\t\tfor (size_t i = 0; i<16; i++){\r\n\t\t\tif (offset + i < len){\r\n\t\t\t\tx[i] = in[offset + i];\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tx[i] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\tXorInt128(x, yPrev, y);\r\n\t\tIBuffer^ inbuf = IBufferFromPtr(y, 16);\r\n\t\tIBuffer^ outbuf = CryptographicEngine::Encrypt(_key, inbuf, nullptr);\r\n\t\tIBufferToPtr(outbuf, 16, tmpOut);\r\n\t\tXorInt128(tmpOut, xPrev, y);\r\n\t\tmemcpy(xPrev, x, 16);\r\n\t\tmemcpy(yPrev, y, 16);\r\n\t\tmemcpy(out + offset, y, 16);\r\n\t}\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::AesIgeDecrypt(uint8_t* in, uint8_t* out, size_t len, uint8_t* key, uint8_t* iv){\r\n\tIBuffer^ keybuf = IBufferFromPtr(key, 32);\r\n\tCryptographicKey^ _key = aesKeyProvider->CreateSymmetricKey(keybuf);\r\n\tuint8_t tmpOut[16];\r\n\tuint8_t* xPrev = iv;\r\n\tuint8_t* yPrev = iv + 16;\r\n\tuint8_t x[16];\r\n\tuint8_t y[16];\r\n\tfor (size_t offset = 0; offset<len; offset += 16){\r\n\t\tfor (size_t i = 0; i<16; i++){\r\n\t\t\tif (offset + i < len){\r\n\t\t\t\tx[i] = in[offset + i];\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tx[i] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\tXorInt128(x, yPrev, y);\r\n\t\tIBuffer^ inbuf = IBufferFromPtr(y, 16);\r\n\t\tIBuffer^ outbuf = CryptographicEngine::Decrypt(_key, inbuf, nullptr);\r\n\t\tIBufferToPtr(outbuf, 16, tmpOut);\r\n\t\tXorInt128(tmpOut, xPrev, y);\r\n\t\tmemcpy(xPrev, x, 16);\r\n\t\tmemcpy(yPrev, y, 16);\r\n\t\tmemcpy(out + offset, y, 16);\r\n\t}\r\n}\r\n\r\n#define GETU32(pt) (((uint32_t)(pt)[0] << 24) ^ ((uint32_t)(pt)[1] << 16) ^ ((uint32_t)(pt)[2] <<  8) ^ ((uint32_t)(pt)[3]))\r\n#define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); }\r\n\r\ntypedef  uint8_t u8;\r\n\r\n/* increment counter (128-bit int) by 1 */\r\nstatic void AES_ctr128_inc(unsigned char *counter) {\r\n\tunsigned long c;\r\n\r\n\t/* Grab bottom dword of counter and increment */\r\n\tc = GETU32(counter + 12);\r\n\tc++;\tc &= 0xFFFFFFFF;\r\n\tPUTU32(counter + 12, c);\r\n\r\n\t/* if no overflow, we're done */\r\n\tif (c)\r\n\t\treturn;\r\n\r\n\t/* Grab 1st dword of counter and increment */\r\n\tc = GETU32(counter + 8);\r\n\tc++;\tc &= 0xFFFFFFFF;\r\n\tPUTU32(counter + 8, c);\r\n\r\n\t/* if no overflow, we're done */\r\n\tif (c)\r\n\t\treturn;\r\n\r\n\t/* Grab 2nd dword of counter and increment */\r\n\tc = GETU32(counter + 4);\r\n\tc++;\tc &= 0xFFFFFFFF;\r\n\tPUTU32(counter + 4, c);\r\n\r\n\t/* if no overflow, we're done */\r\n\tif (c)\r\n\t\treturn;\r\n\r\n\t/* Grab top dword of counter and increment */\r\n\tc = GETU32(counter + 0);\r\n\tc++;\tc &= 0xFFFFFFFF;\r\n\tPUTU32(counter + 0, c);\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::AesCtrEncrypt(uint8_t* inout, size_t len, uint8_t* key, uint8_t* counter, uint8_t* ecount_buf, uint32_t* num){\r\n\tunsigned int n;\r\n\tunsigned long l = len;\r\n\r\n\t//assert(in && out && key && counter && num);\r\n\t//assert(*num < AES_BLOCK_SIZE);\r\n\r\n\tIBuffer^ keybuf = IBufferFromPtr(key, 32);\r\n\tCryptographicKey^ _key = aesKeyProvider->CreateSymmetricKey(keybuf);\r\n\r\n\tn = *num;\r\n\r\n\twhile (l--) {\r\n\t\tif (n == 0) {\r\n\t\t\tIBuffer^ inbuf = IBufferFromPtr(counter, 16);\r\n\t\t\tIBuffer^ outbuf = CryptographicEngine::Encrypt(_key, inbuf, nullptr);\r\n\t\t\tIBufferToPtr(outbuf, 16, ecount_buf);\r\n\t\t\t//AES_encrypt(counter, ecount_buf, key);\r\n\t\t\tAES_ctr128_inc(counter);\r\n\t\t}\r\n\t\t*inout = *(inout++) ^ ecount_buf[n];\r\n\t\tn = (n + 1) % 16;\r\n\t}\r\n\r\n\t*num = n;\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::SHA1(uint8_t* msg, size_t len, uint8_t* out){\r\n\t//EnterCriticalSection(&hashMutex);\r\n\r\n\tIBuffer^ arr = IBufferFromPtr(msg, len);\r\n\tCryptographicHash^ hash = sha1Provider->CreateHash();\r\n\thash->Append(arr);\r\n\tIBuffer^ res = hash->GetValueAndReset();\r\n\tIBufferToPtr(res, 20, out);\r\n\r\n\t//LeaveCriticalSection(&hashMutex);\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::SHA256(uint8_t* msg, size_t len, uint8_t* out){\r\n\t//EnterCriticalSection(&hashMutex);\r\n\r\n\tIBuffer^ arr = IBufferFromPtr(msg, len);\r\n\tCryptographicHash^ hash = sha256Provider->CreateHash();\r\n\thash->Append(arr);\r\n\tIBuffer^ res = hash->GetValueAndReset();\r\n\tIBufferToPtr(res, 32, out);\r\n\t//LeaveCriticalSection(&hashMutex);\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::RandBytes(uint8_t* buffer, size_t len){\r\n\tIBuffer^ res = CryptographicBuffer::GenerateRandom(len);\r\n\tIBufferToPtr(res, len, buffer);\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::Init(){\r\n\t/*sha1Hash=HashAlgorithmProvider::OpenAlgorithm(HashAlgorithmNames::Sha1)->CreateHash();\r\n\tsha256Hash=HashAlgorithmProvider::OpenAlgorithm(HashAlgorithmNames::Sha256)->CreateHash();*/\r\n\tsha1Provider = HashAlgorithmProvider::OpenAlgorithm(HashAlgorithmNames::Sha1);\r\n\tsha256Provider = HashAlgorithmProvider::OpenAlgorithm(HashAlgorithmNames::Sha256);\r\n\taesKeyProvider = SymmetricKeyAlgorithmProvider::OpenAlgorithm(SymmetricAlgorithmNames::AesEcb);\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::XorInt128(uint8_t* a, uint8_t* b, uint8_t* out){\r\n\tuint64_t* _a = reinterpret_cast<uint64_t*>(a);\r\n\tuint64_t* _b = reinterpret_cast<uint64_t*>(b);\r\n\tuint64_t* _out = reinterpret_cast<uint64_t*>(out);\r\n\t_out[0] = _a[0] ^ _b[0];\r\n\t_out[1] = _a[1] ^ _b[1];\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::IBufferToPtr(IBuffer^ buffer, size_t len, uint8_t* out)\r\n{\r\n\tComPtr<IBufferByteAccess> bufferByteAccess;\r\n\treinterpret_cast<IInspectable*>(buffer)->QueryInterface(IID_PPV_ARGS(&bufferByteAccess));\r\n\r\n\tbyte* hashBuffer;\r\n\tbufferByteAccess->Buffer(&hashBuffer);\r\n\tCopyMemory(out, hashBuffer, len);\r\n}\r\n\r\nIBuffer^ MicrosoftCryptoImpl::IBufferFromPtr(uint8_t* msg, size_t len)\r\n{\r\n\tComPtr<NativeBuffer> nativeBuffer = Make<NativeBuffer>((byte *)msg, len);\r\n\treturn reinterpret_cast<IBuffer^>(nativeBuffer.Get());\r\n}\r\n"
  },
  {
    "path": "libtgnet/MicrosoftCryptoImpl.h",
    "content": "// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n#include <stdint.h>\r\n#include <wrl.h>\r\n#include <wrl/implements.h>\r\n#include <windows.storage.streams.h>\r\n#include <robuffer.h>\r\n#include <vector>\r\n\r\nref class MicrosoftCryptoImpl{\r\npublic:\r\n\tstatic void AesIgeEncrypt(uint8_t* in, uint8_t* out, size_t len, uint8_t* key, uint8_t* iv);\r\n\tstatic void AesIgeDecrypt(uint8_t* in, uint8_t* out, size_t len, uint8_t* key, uint8_t* iv);\r\n\tstatic void AesCtrEncrypt(uint8_t* inout, size_t len, uint8_t* key, uint8_t* iv, uint8_t* ecount, uint32_t* num);\r\n\tstatic void SHA1(uint8_t* msg, size_t len, uint8_t* out);\r\n\tstatic void SHA256(uint8_t* msg, size_t len, uint8_t* out);\r\n\tstatic void RandBytes(uint8_t* buffer, size_t len);\r\n\tstatic void Init();\r\nprivate:\r\n\tstatic inline void XorInt128(uint8_t* a, uint8_t* b, uint8_t* out);\r\n\tstatic void IBufferToPtr(Windows::Storage::Streams::IBuffer^ buffer, size_t len, uint8_t* out);\r\n\tstatic Windows::Storage::Streams::IBuffer^ IBufferFromPtr(uint8_t* msg, size_t len);\r\n\t/*static Windows::Security::Cryptography::Core::CryptographicHash^ sha1Hash;\r\n\tstatic Windows::Security::Cryptography::Core::CryptographicHash^ sha256Hash;*/\r\n\tstatic Windows::Security::Cryptography::Core::HashAlgorithmProvider^ sha1Provider;\r\n\tstatic Windows::Security::Cryptography::Core::HashAlgorithmProvider^ sha256Provider;\r\n\tstatic Windows::Security::Cryptography::Core::SymmetricKeyAlgorithmProvider^ aesKeyProvider;\r\n};\r\n\r\nclass NativeBuffer :\r\n\tpublic Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::RuntimeClassType::WinRtClassicComMix>,\r\n\tABI::Windows::Storage::Streams::IBuffer,\r\n\tWindows::Storage::Streams::IBufferByteAccess>\r\n{\r\npublic:\r\n\tNativeBuffer(byte *buffer, UINT totalSize)\r\n\t{\r\n\t\tm_length = totalSize;\r\n\t\tm_buffer = buffer;\r\n\t}\r\n\r\n\tvirtual ~NativeBuffer()\r\n\t{\r\n\t}\r\n\r\n\tSTDMETHODIMP RuntimeClassInitialize(byte *buffer, UINT totalSize)\r\n\t{\r\n\t\tm_length = totalSize;\r\n\t\tm_buffer = buffer;\r\n\t\treturn S_OK;\r\n\t}\r\n\r\n\tSTDMETHODIMP Buffer(byte **value)\r\n\t{\r\n\t\t*value = m_buffer;\r\n\t\treturn S_OK;\r\n\t}\r\n\r\n\tSTDMETHODIMP get_Capacity(UINT32 *value)\r\n\t{\r\n\t\t*value = m_length;\r\n\t\treturn S_OK;\r\n\t}\r\n\r\n\tSTDMETHODIMP get_Length(UINT32 *value)\r\n\t{\r\n\t\t*value = m_length;\r\n\t\treturn S_OK;\r\n\t}\r\n\r\n\tSTDMETHODIMP put_Length(UINT32 value)\r\n\t{\r\n\t\tm_length = value;\r\n\t\treturn S_OK;\r\n\t}\r\n\r\nprivate:\r\n\tUINT32 m_length;\r\n\tbyte *m_buffer;\r\n};\r\n\r\n"
  },
  {
    "path": "libtgnet/libtgnet.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|ARM\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{cc7a35bf-aabc-411d-b911-ac037a781266}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <ProjectName>libtgnet</ProjectName>\r\n    <RootNamespace>libtgnet</RootNamespace>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\r\n    <AppContainerApplication>true</AppContainerApplication>\r\n    <ApplicationType>Windows Phone Silverlight</ApplicationType>\r\n    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>Use</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"BufferOutputStream.h\" />\r\n    <ClInclude Include=\"ConnectionSocketWrapper.h\" />\r\n    <ClInclude Include=\"MicrosoftCryptoImpl.h\" />\r\n    <ClInclude Include=\"pch.h\" />\r\n    <ClInclude Include=\"ConnectionSocket.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"BufferOutputStream.cpp\" />\r\n    <ClCompile Include=\"ConnectionSocketWrapper.cpp\" />\r\n    <ClCompile Include=\"MicrosoftCryptoImpl.cpp\" />\r\n    <ClCompile Include=\"pch.cpp\">\r\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Create</PrecompiledHeader>\r\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Create</PrecompiledHeader>\r\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">Create</PrecompiledHeader>\r\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">Create</PrecompiledHeader>\r\n    </ClCompile>\r\n    <ClCompile Include=\"ConnectionSocket.cpp\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "libtgnet/libtgnet.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup>\r\n    <Filter Include=\"Resources\">\r\n      <UniqueIdentifier>2206d049-0e47-412e-8562-3d4e665b7879</UniqueIdentifier>\r\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r\n    </Filter>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"pch.cpp\" />\r\n    <ClCompile Include=\"ConnectionSocket.cpp\" />\r\n    <ClCompile Include=\"MicrosoftCryptoImpl.cpp\" />\r\n    <ClCompile Include=\"ConnectionSocketWrapper.cpp\" />\r\n    <ClCompile Include=\"BufferOutputStream.cpp\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"pch.h\" />\r\n    <ClInclude Include=\"ConnectionSocket.h\" />\r\n    <ClInclude Include=\"MicrosoftCryptoImpl.h\" />\r\n    <ClInclude Include=\"ConnectionSocketWrapper.h\" />\r\n    <ClInclude Include=\"BufferOutputStream.h\" />\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "libtgnet/pch.cpp",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#include \"pch.h\"\r\n"
  },
  {
    "path": "libtgnet/pch.h",
    "content": "﻿// \r\n// This is the source code of Telegram for Windows Phone v. 3.x.x.\r\n// It is licensed under GNU GPL v. 2 or later.\r\n// You should have received a copy of the license in this archive (see LICENSE).\r\n// \r\n// Copyright Evgeny Nadymov, 2013-present.\r\n// \r\n#pragma once\r\n"
  },
  {
    "path": "libtgvoip-public/BlockingQueue.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"BlockingQueue.h\"\n\nusing namespace tgvoip;\n\n"
  },
  {
    "path": "libtgvoip-public/BlockingQueue.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_BLOCKINGQUEUE_H\n#define LIBTGVOIP_BLOCKINGQUEUE_H\n\n#include <stdlib.h>\n#include <list>\n#include \"threading.h\"\n\nusing namespace std;\n\nnamespace tgvoip{\n\ntemplate<typename T>\nclass BlockingQueue{\npublic:\n\tBlockingQueue(size_t capacity) : semaphore(capacity, 0){\n\t\tthis->capacity=capacity;\n\t\toverflowCallback=NULL;\n\t};\n\n\t~BlockingQueue(){\n\t\tsemaphore.Release();\n\t}\n\n\tvoid Put(T thing){\n\t\tMutexGuard sync(mutex);\n\t\tqueue.push_back(std::move(thing));\n\t\tbool didOverflow=false;\n\t\twhile(queue.size()>capacity){\n\t\t\tdidOverflow=true;\n\t\t\tif(overflowCallback){\n\t\t\t\toverflowCallback(std::move(queue.front()));\n\t\t\t\tqueue.pop_front();\n\t\t\t}else{\n\t\t\t\tabort();\n\t\t\t}\n\t\t}\n\t\tif(!didOverflow)\n\t\t\tsemaphore.Release();\n\t}\n\n\tT GetBlocking(){\n\t\tsemaphore.Acquire();\n\t\tMutexGuard sync(mutex);\n\t\treturn GetInternal();\n\t}\n\n\tT Get(){\n\t\tMutexGuard sync(mutex);\n\t\tif(queue.size()>0)\n\t\t\tsemaphore.Acquire();\n\t\treturn GetInternal();\n\t}\n\n\tunsigned int Size(){\n\t\treturn queue.size();\n\t}\n\n\tvoid PrepareDealloc(){\n\n\t}\n\n\tvoid SetOverflowCallback(void (*overflowCallback)(T)){\n\t\tthis->overflowCallback=overflowCallback;\n\t}\n\nprivate:\n\tT GetInternal(){\n\t\t//if(queue.size()==0)\n\t\t//\treturn NULL;\n\t\tT r=std::move(queue.front());\n\t\tqueue.pop_front();\n\t\treturn r;\n\t}\n\n\tlist<T> queue;\n\tsize_t capacity;\n\t//tgvoip_lock_t lock;\n\tSemaphore semaphore;\n\tMutex mutex;\n\tvoid (*overflowCallback)(T);\n};\n}\n\n#endif //LIBTGVOIP_BLOCKINGQUEUE_H\n"
  },
  {
    "path": "libtgvoip-public/BufferInputStream.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"BufferInputStream.h\"\n#include <assert.h>\n#include <string.h>\n#include <exception>\n#include <stdexcept>\n\nusing namespace tgvoip;\n\nBufferInputStream::BufferInputStream(unsigned char* data, size_t length){\n\tthis->buffer=data;\n\tthis->length=length;\n\toffset=0;\n}\n\nBufferInputStream::~BufferInputStream(){\n\n}\n\n\nvoid BufferInputStream::Seek(size_t offset){\n\tif(offset>length){\n\t\tthrow std::out_of_range(\"Not enough bytes in buffer\");\n\t}\n\tthis->offset=offset;\n}\n\nsize_t BufferInputStream::GetLength(){\n\treturn length;\n}\n\nsize_t BufferInputStream::GetOffset(){\n\treturn offset;\n}\n\nsize_t BufferInputStream::Remaining(){\n\treturn length-offset;\n}\n\nunsigned char BufferInputStream::ReadByte(){\n\tEnsureEnoughRemaining(1);\n\treturn (unsigned char)buffer[offset++];\n}\n\nint32_t BufferInputStream::ReadInt32(){\n\tEnsureEnoughRemaining(4);\n\tint32_t res=((int32_t)buffer[offset] & 0xFF) |\n\t\t\t(((int32_t)buffer[offset+1] & 0xFF) << 8) |\n\t\t\t(((int32_t)buffer[offset+2] & 0xFF) << 16) |\n\t\t\t(((int32_t)buffer[offset+3] & 0xFF) << 24);\n\toffset+=4;\n\treturn res;\n}\n\nint64_t BufferInputStream::ReadInt64(){\n\tEnsureEnoughRemaining(8);\n\tint64_t res=((int64_t)buffer[offset] & 0xFF) |\n\t\t\t(((int64_t)buffer[offset+1] & 0xFF) << 8) |\n\t\t\t(((int64_t)buffer[offset+2] & 0xFF) << 16) |\n\t\t\t(((int64_t)buffer[offset+3] & 0xFF) << 24) |\n\t\t\t(((int64_t)buffer[offset+4] & 0xFF) << 32) |\n\t\t\t(((int64_t)buffer[offset+5] & 0xFF) << 40) |\n\t\t\t(((int64_t)buffer[offset+6] & 0xFF) << 48) |\n\t\t\t(((int64_t)buffer[offset+7] & 0xFF) << 56);\n\toffset+=8;\n\treturn res;\n}\n\nint16_t BufferInputStream::ReadInt16(){\n\tEnsureEnoughRemaining(2);\n\tint16_t res=(uint16_t)buffer[offset] | ((uint16_t)buffer[offset+1] << 8);\n\toffset+=2;\n\treturn res;\n}\n\n\nint32_t BufferInputStream::ReadTlLength(){\n\tunsigned char l=ReadByte();\n\tif(l<254)\n\t\treturn l;\n\tassert(length-offset>=3);\n\tEnsureEnoughRemaining(3);\n\tint32_t res=((int32_t)buffer[offset] & 0xFF) |\n\t\t\t\t(((int32_t)buffer[offset+1] & 0xFF) << 8) |\n\t\t\t\t(((int32_t)buffer[offset+2] & 0xFF) << 16);\n\toffset+=3;\n\treturn res;\n}\n\nvoid BufferInputStream::ReadBytes(unsigned char *to, size_t count){\n\tEnsureEnoughRemaining(count);\n\tmemcpy(to, buffer+offset, count);\n\toffset+=count;\n}\n\nBufferInputStream BufferInputStream::GetPartBuffer(size_t length, bool advance){\n\tEnsureEnoughRemaining(length);\n\tBufferInputStream s=BufferInputStream(buffer+offset, length);\n\tif(advance)\n\t\toffset+=length;\n\treturn s;\n}\n\nvoid BufferInputStream::EnsureEnoughRemaining(size_t need){\n\tif(length-offset<need){\n\t\tthrow std::out_of_range(\"Not enough bytes in buffer\");\n\t}\n}\n"
  },
  {
    "path": "libtgvoip-public/BufferInputStream.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_BUFFERINPUTSTREAM_H\n#define LIBTGVOIP_BUFFERINPUTSTREAM_H\n\n#include <stdio.h>\n#include <stdint.h>\n\nnamespace tgvoip{\nclass BufferInputStream{\n\npublic:\n\tBufferInputStream(unsigned char* data, size_t length);\n\t~BufferInputStream();\n\tvoid Seek(size_t offset);\n\tsize_t GetLength();\n\tsize_t GetOffset();\n\tsize_t Remaining();\n\tunsigned char ReadByte();\n\tint64_t ReadInt64();\n\tint32_t ReadInt32();\n\tint16_t ReadInt16();\n\tint32_t ReadTlLength();\n\tvoid ReadBytes(unsigned char* to, size_t count);\n\tBufferInputStream GetPartBuffer(size_t length, bool advance);\n\nprivate:\n\tvoid EnsureEnoughRemaining(size_t need);\n\tunsigned char* buffer;\n\tsize_t length;\n\tsize_t offset;\n};\n}\n\n#endif //LIBTGVOIP_BUFFERINPUTSTREAM_H\n"
  },
  {
    "path": "libtgvoip-public/BufferOutputStream.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"BufferOutputStream.h\"\n#include <stdexcept>\n#include <string.h>\n\nusing namespace tgvoip;\n\nBufferOutputStream::BufferOutputStream(size_t size){\n\tbuffer=(unsigned char*) malloc(size);\n\toffset=0;\n\tthis->size=size;\n\tbufferProvided=false;\n}\n\nBufferOutputStream::BufferOutputStream(unsigned char *buffer, size_t size){\n\tthis->buffer=buffer;\n\tthis->size=size;\n\toffset=0;\n\tbufferProvided=true;\n}\n\nBufferOutputStream::~BufferOutputStream(){\n\tif(!bufferProvided)\n\t\tfree(buffer);\n}\n\nvoid BufferOutputStream::WriteByte(unsigned char byte){\n\tthis->ExpandBufferIfNeeded(1);\n\tbuffer[offset++]=byte;\n}\n\nvoid BufferOutputStream::WriteInt32(int32_t i){\n\tthis->ExpandBufferIfNeeded(4);\n\tbuffer[offset+3]=(unsigned char)((i >> 24) & 0xFF);\n\tbuffer[offset+2]=(unsigned char)((i >> 16) & 0xFF);\n\tbuffer[offset+1]=(unsigned char)((i >> 8) & 0xFF);\n\tbuffer[offset]=(unsigned char)(i & 0xFF);\n\toffset+=4;\n}\n\nvoid BufferOutputStream::WriteInt64(int64_t i){\n\tthis->ExpandBufferIfNeeded(8);\n\tbuffer[offset+7]=(unsigned char)((i >> 56) & 0xFF);\n\tbuffer[offset+6]=(unsigned char)((i >> 48) & 0xFF);\n\tbuffer[offset+5]=(unsigned char)((i >> 40) & 0xFF);\n\tbuffer[offset+4]=(unsigned char)((i >> 32) & 0xFF);\n\tbuffer[offset+3]=(unsigned char)((i >> 24) & 0xFF);\n\tbuffer[offset+2]=(unsigned char)((i >> 16) & 0xFF);\n\tbuffer[offset+1]=(unsigned char)((i >> 8) & 0xFF);\n\tbuffer[offset]=(unsigned char)(i & 0xFF);\n\toffset+=8;\n}\n\nvoid BufferOutputStream::WriteInt16(int16_t i){\n\tthis->ExpandBufferIfNeeded(2);\n\tbuffer[offset+1]=(unsigned char)((i >> 8) & 0xFF);\n\tbuffer[offset]=(unsigned char)(i & 0xFF);\n\toffset+=2;\n}\n\nvoid BufferOutputStream::WriteBytes(unsigned char *bytes, size_t count){\n\tthis->ExpandBufferIfNeeded(count);\n\tmemcpy(buffer+offset, bytes, count);\n\toffset+=count;\n}\n\nunsigned char *BufferOutputStream::GetBuffer(){\n\treturn buffer;\n}\n\nsize_t BufferOutputStream::GetLength(){\n\treturn offset;\n}\n\nvoid BufferOutputStream::ExpandBufferIfNeeded(size_t need){\n\tif(offset+need>size){\n\t\tif(bufferProvided){\n\t\t\tthrow std::out_of_range(\"buffer overflow\");\n\t\t}\n\t\tif(need<1024){\n\t\t\tbuffer=(unsigned char *) realloc(buffer, size+1024);\n\t\t\tsize+=1024;\n\t\t}else{\n\t\t\tbuffer=(unsigned char *) realloc(buffer, size+need);\n\t\t\tsize+=need;\n\t\t}\n\t}\n}\n\n\nvoid BufferOutputStream::Reset(){\n\toffset=0;\n}\n\nvoid BufferOutputStream::Rewind(size_t numBytes){\n\tif(numBytes>offset)\n\t\tthrow std::out_of_range(\"buffer underflow\");\n\toffset-=numBytes;\n}\n"
  },
  {
    "path": "libtgvoip-public/BufferOutputStream.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_BUFFEROUTPUTSTREAM_H\n#define LIBTGVOIP_BUFFEROUTPUTSTREAM_H\n\n#include <stdlib.h>\n#include <stdint.h>\n\nnamespace tgvoip{\nclass BufferOutputStream{\n\npublic:\n\tBufferOutputStream(size_t size);\n\tBufferOutputStream(unsigned char* buffer, size_t size);\n\t~BufferOutputStream();\n\tvoid WriteByte(unsigned char byte);\n\tvoid WriteInt64(int64_t i);\n\tvoid WriteInt32(int32_t i);\n\tvoid WriteInt16(int16_t i);\n\tvoid WriteBytes(unsigned char* bytes, size_t count);\n\tunsigned char* GetBuffer();\n\tsize_t GetLength();\n\tvoid Reset();\n\tvoid Rewind(size_t numBytes);\n\nprivate:\n\tvoid ExpandBufferIfNeeded(size_t need);\n\tunsigned char* buffer;\n\tsize_t size;\n\tsize_t offset;\n\tbool bufferProvided;\n};\n}\n\n#endif //LIBTGVOIP_BUFFEROUTPUTSTREAM_H\n"
  },
  {
    "path": "libtgvoip-public/BufferPool.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"BufferPool.h\"\n#include \"logging.h\"\n#include <stdlib.h>\n#include <assert.h>\n\nusing namespace tgvoip;\n\nBufferPool::BufferPool(unsigned int size, unsigned int count){\n\tassert(count<=64);\n\tbuffers[0]=(unsigned char*) malloc(size*count);\n\tbufferCount=count;\n\tunsigned int i;\n\tfor(i=1;i<count;i++){\n\t\tbuffers[i]=buffers[0]+i*size;\n\t}\n\tusedBuffers=0;\n\tthis->size=size;\n}\n\nBufferPool::~BufferPool(){\n\tfree(buffers[0]);\n}\n\nunsigned char* BufferPool::Get(){\n\tMutexGuard m(mutex);\n\tint i;\n\tfor(i=0;i<bufferCount;i++){\n\t\tif(!((usedBuffers >> i) & 1)){\n\t\t\tusedBuffers|=(1LL << i);\n\t\t\treturn buffers[i];\n\t\t}\n\t}\n\treturn NULL;\n}\n\nvoid BufferPool::Reuse(unsigned char* buffer){\n\tMutexGuard m(mutex);\n\tint i;\n\tfor(i=0;i<bufferCount;i++){\n\t\tif(buffers[i]==buffer){\n\t\t\tusedBuffers&= ~(1LL << i);\n\t\t\treturn;\n\t\t}\n\t}\n\tLOGE(\"pointer passed isn't a valid buffer from this pool\");\n\tabort();\n}\n\nsize_t BufferPool::GetSingleBufferSize(){\n\treturn size;\n}\n\nsize_t BufferPool::GetBufferCount(){\n\treturn (size_t) bufferCount;\n}\n"
  },
  {
    "path": "libtgvoip-public/BufferPool.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_BUFFERPOOL_H\n#define LIBTGVOIP_BUFFERPOOL_H\n\n#include <stdint.h>\n#include \"threading.h\"\n\nnamespace tgvoip{\nclass BufferPool{\npublic:\n\tBufferPool(unsigned int size, unsigned int count);\n\t~BufferPool();\n\tunsigned char* Get();\n\tvoid Reuse(unsigned char* buffer);\n\tsize_t GetSingleBufferSize();\n\tsize_t GetBufferCount();\n\nprivate:\n\tuint64_t usedBuffers;\n\tint bufferCount;\n\tsize_t size;\n\tunsigned char* buffers[64];\n\tMutex mutex;\n};\n}\n\n#endif //LIBTGVOIP_BUFFERPOOL_H\n"
  },
  {
    "path": "libtgvoip-public/Buffers.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"Buffers.h\"\n#include <assert.h>\n#include <string.h>\n#include <exception>\n#include <stdexcept>\n#include <stdlib.h>\n#include \"logging.h\"\n\nusing namespace tgvoip;\n\n#pragma mark -- BufferInputStream\n\nBufferInputStream::BufferInputStream(unsigned char* data, size_t length){\n\tthis->buffer=data;\n\tthis->length=length;\n\toffset=0;\n}\n\nBufferInputStream::~BufferInputStream(){\n\n}\n\n\nvoid BufferInputStream::Seek(size_t offset){\n\tif(offset>length){\n\t\tthrow std::out_of_range(\"Not enough bytes in buffer\");\n\t}\n\tthis->offset=offset;\n}\n\nsize_t BufferInputStream::GetLength(){\n\treturn length;\n}\n\nsize_t BufferInputStream::GetOffset(){\n\treturn offset;\n}\n\nsize_t BufferInputStream::Remaining(){\n\treturn length-offset;\n}\n\nunsigned char BufferInputStream::ReadByte(){\n\tEnsureEnoughRemaining(1);\n\treturn (unsigned char)buffer[offset++];\n}\n\nint32_t BufferInputStream::ReadInt32(){\n\tEnsureEnoughRemaining(4);\n\tint32_t res=((int32_t)buffer[offset] & 0xFF) |\n\t\t\t(((int32_t)buffer[offset+1] & 0xFF) << 8) |\n\t\t\t(((int32_t)buffer[offset+2] & 0xFF) << 16) |\n\t\t\t(((int32_t)buffer[offset+3] & 0xFF) << 24);\n\toffset+=4;\n\treturn res;\n}\n\nint64_t BufferInputStream::ReadInt64(){\n\tEnsureEnoughRemaining(8);\n\tint64_t res=((int64_t)buffer[offset] & 0xFF) |\n\t\t\t(((int64_t)buffer[offset+1] & 0xFF) << 8) |\n\t\t\t(((int64_t)buffer[offset+2] & 0xFF) << 16) |\n\t\t\t(((int64_t)buffer[offset+3] & 0xFF) << 24) |\n\t\t\t(((int64_t)buffer[offset+4] & 0xFF) << 32) |\n\t\t\t(((int64_t)buffer[offset+5] & 0xFF) << 40) |\n\t\t\t(((int64_t)buffer[offset+6] & 0xFF) << 48) |\n\t\t\t(((int64_t)buffer[offset+7] & 0xFF) << 56);\n\toffset+=8;\n\treturn res;\n}\n\nint16_t BufferInputStream::ReadInt16(){\n\tEnsureEnoughRemaining(2);\n\tint16_t res=(uint16_t)buffer[offset] | ((uint16_t)buffer[offset+1] << 8);\n\toffset+=2;\n\treturn res;\n}\n\n\nint32_t BufferInputStream::ReadTlLength(){\n\tunsigned char l=ReadByte();\n\tif(l<254)\n\t\treturn l;\n\tassert(length-offset>=3);\n\tEnsureEnoughRemaining(3);\n\tint32_t res=((int32_t)buffer[offset] & 0xFF) |\n\t\t\t\t(((int32_t)buffer[offset+1] & 0xFF) << 8) |\n\t\t\t\t(((int32_t)buffer[offset+2] & 0xFF) << 16);\n\toffset+=3;\n\treturn res;\n}\n\nvoid BufferInputStream::ReadBytes(unsigned char *to, size_t count){\n\tEnsureEnoughRemaining(count);\n\tmemcpy(to, buffer+offset, count);\n\toffset+=count;\n}\n\nBufferInputStream BufferInputStream::GetPartBuffer(size_t length, bool advance){\n\tEnsureEnoughRemaining(length);\n\tBufferInputStream s=BufferInputStream(buffer+offset, length);\n\tif(advance)\n\t\toffset+=length;\n\treturn s;\n}\n\nvoid BufferInputStream::EnsureEnoughRemaining(size_t need){\n\tif(length-offset<need){\n\t\tthrow std::out_of_range(\"Not enough bytes in buffer\");\n\t}\n}\n\n#pragma mark -- BufferOutputStream\n\nBufferOutputStream::BufferOutputStream(size_t size){\n\tbuffer=(unsigned char*) malloc(size);\n\toffset=0;\n\tthis->size=size;\n\tbufferProvided=false;\n}\n\nBufferOutputStream::BufferOutputStream(unsigned char *buffer, size_t size){\n\tthis->buffer=buffer;\n\tthis->size=size;\n\toffset=0;\n\tbufferProvided=true;\n}\n\nBufferOutputStream::~BufferOutputStream(){\n\tif(!bufferProvided && buffer)\n\t\tfree(buffer);\n}\n\nvoid BufferOutputStream::WriteByte(unsigned char byte){\n\tthis->ExpandBufferIfNeeded(1);\n\tbuffer[offset++]=byte;\n}\n\nvoid BufferOutputStream::WriteInt32(int32_t i){\n\tthis->ExpandBufferIfNeeded(4);\n\tbuffer[offset+3]=(unsigned char)((i >> 24) & 0xFF);\n\tbuffer[offset+2]=(unsigned char)((i >> 16) & 0xFF);\n\tbuffer[offset+1]=(unsigned char)((i >> 8) & 0xFF);\n\tbuffer[offset]=(unsigned char)(i & 0xFF);\n\toffset+=4;\n}\n\nvoid BufferOutputStream::WriteInt64(int64_t i){\n\tthis->ExpandBufferIfNeeded(8);\n\tbuffer[offset+7]=(unsigned char)((i >> 56) & 0xFF);\n\tbuffer[offset+6]=(unsigned char)((i >> 48) & 0xFF);\n\tbuffer[offset+5]=(unsigned char)((i >> 40) & 0xFF);\n\tbuffer[offset+4]=(unsigned char)((i >> 32) & 0xFF);\n\tbuffer[offset+3]=(unsigned char)((i >> 24) & 0xFF);\n\tbuffer[offset+2]=(unsigned char)((i >> 16) & 0xFF);\n\tbuffer[offset+1]=(unsigned char)((i >> 8) & 0xFF);\n\tbuffer[offset]=(unsigned char)(i & 0xFF);\n\toffset+=8;\n}\n\nvoid BufferOutputStream::WriteInt16(int16_t i){\n\tthis->ExpandBufferIfNeeded(2);\n\tbuffer[offset+1]=(unsigned char)((i >> 8) & 0xFF);\n\tbuffer[offset]=(unsigned char)(i & 0xFF);\n\toffset+=2;\n}\n\nvoid BufferOutputStream::WriteBytes(unsigned char *bytes, size_t count){\n\tthis->ExpandBufferIfNeeded(count);\n\tmemcpy(buffer+offset, bytes, count);\n\toffset+=count;\n}\n\nvoid BufferOutputStream::WriteBytes(Buffer &buffer){\n\tWriteBytes(*buffer, buffer.Length());\n}\n\nunsigned char *BufferOutputStream::GetBuffer(){\n\treturn buffer;\n}\n\nsize_t BufferOutputStream::GetLength(){\n\treturn offset;\n}\n\nvoid BufferOutputStream::ExpandBufferIfNeeded(size_t need){\n\tif(offset+need>size){\n\t\tif(bufferProvided){\n\t\t\tthrow std::out_of_range(\"buffer overflow\");\n\t\t}\n\t\tif(need<1024){\n\t\t\tbuffer=(unsigned char *) realloc(buffer, size+1024);\n\t\t\tsize+=1024;\n\t\t}else{\n\t\t\tbuffer=(unsigned char *) realloc(buffer, size+need);\n\t\t\tsize+=need;\n\t\t}\n\t}\n}\n\n\nvoid BufferOutputStream::Reset(){\n\toffset=0;\n}\n\nvoid BufferOutputStream::Rewind(size_t numBytes){\n\tif(numBytes>offset)\n\t\tthrow std::out_of_range(\"buffer underflow\");\n\toffset-=numBytes;\n}\n\n#pragma mark -- BufferPool\n\nBufferPool::BufferPool(unsigned int size, unsigned int count){\n\tassert(count<=64);\n\tbuffers[0]=(unsigned char*) malloc(size*count);\n\tbufferCount=count;\n\tunsigned int i;\n\tfor(i=1;i<count;i++){\n\t\tbuffers[i]=buffers[0]+i*size;\n\t}\n\tusedBuffers=0;\n\tthis->size=size;\n}\n\nBufferPool::~BufferPool(){\n\tfree(buffers[0]);\n}\n\nunsigned char* BufferPool::Get(){\n\tMutexGuard m(mutex);\n\tint i;\n\tfor(i=0;i<bufferCount;i++){\n\t\tif(!((usedBuffers >> i) & 1)){\n\t\t\tusedBuffers|=(1LL << i);\n\t\t\treturn buffers[i];\n\t\t}\n\t}\n\treturn NULL;\n}\n\nvoid BufferPool::Reuse(unsigned char* buffer){\n\tMutexGuard m(mutex);\n\tint i;\n\tfor(i=0;i<bufferCount;i++){\n\t\tif(buffers[i]==buffer){\n\t\t\tusedBuffers&= ~(1LL << i);\n\t\t\treturn;\n\t\t}\n\t}\n\tLOGE(\"pointer passed isn't a valid buffer from this pool\");\n\tabort();\n}\n\nsize_t BufferPool::GetSingleBufferSize(){\n\treturn size;\n}\n\nsize_t BufferPool::GetBufferCount(){\n\treturn (size_t) bufferCount;\n}\n\n#pragma mark -- Buffer\n\n"
  },
  {
    "path": "libtgvoip-public/Buffers.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_BUFFERINPUTSTREAM_H\n#define LIBTGVOIP_BUFFERINPUTSTREAM_H\n\n#include <stdio.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n#include <stdexcept>\n#include <array>\n#include <limits>\n#include <stddef.h>\n#include \"threading.h\"\n\nnamespace tgvoip{\n\tclass Buffer;\n\n\tclass BufferInputStream{\n\n\tpublic:\n\t\tBufferInputStream(unsigned char* data, size_t length);\n\t\t~BufferInputStream();\n\t\tvoid Seek(size_t offset);\n\t\tsize_t GetLength();\n\t\tsize_t GetOffset();\n\t\tsize_t Remaining();\n\t\tunsigned char ReadByte();\n\t\tint64_t ReadInt64();\n\t\tint32_t ReadInt32();\n\t\tint16_t ReadInt16();\n\t\tint32_t ReadTlLength();\n\t\tvoid ReadBytes(unsigned char* to, size_t count);\n\t\tBufferInputStream GetPartBuffer(size_t length, bool advance);\n\n\tprivate:\n\t\tvoid EnsureEnoughRemaining(size_t need);\n\t\tunsigned char* buffer;\n\t\tsize_t length;\n\t\tsize_t offset;\n\t};\n\n\tclass BufferOutputStream{\n\tfriend class Buffer;\n\tpublic:\n\t\tBufferOutputStream(size_t size);\n\t\tBufferOutputStream(unsigned char* buffer, size_t size);\n\t\tBufferOutputStream(const BufferOutputStream& other)=delete;\n\t\t~BufferOutputStream();\n\t\tvoid WriteByte(unsigned char byte);\n\t\tvoid WriteInt64(int64_t i);\n\t\tvoid WriteInt32(int32_t i);\n\t\tvoid WriteInt16(int16_t i);\n\t\tvoid WriteBytes(unsigned char* bytes, size_t count);\n\t\tvoid WriteBytes(Buffer& buffer);\n\t\tunsigned char* GetBuffer();\n\t\tsize_t GetLength();\n\t\tvoid Reset();\n\t\tvoid Rewind(size_t numBytes);\n\t\t\n\t\tBufferOutputStream& operator=(BufferOutputStream&& other){\n\t\t\tif(this!=&other){\n\t\t\t\tif(!bufferProvided && buffer)\n\t\t\t\t\tfree(buffer);\n\t\t\t\tbuffer=other.buffer;\n\t\t\t\toffset=other.offset;\n\t\t\t\tsize=other.size;\n\t\t\t\tbufferProvided=other.bufferProvided;\n\t\t\t\tother.buffer=NULL;\n\t\t\t}\n\t\t\treturn *this;\n\t\t}\n\n\tprivate:\n\t\tvoid ExpandBufferIfNeeded(size_t need);\n\t\tunsigned char* buffer=NULL;\n\t\tsize_t size;\n\t\tsize_t offset;\n\t\tbool bufferProvided;\n\t};\n\n\tclass BufferPool{\n\tpublic:\n\t\tBufferPool(unsigned int size, unsigned int count);\n\t\t~BufferPool();\n\t\tunsigned char* Get();\n\t\tvoid Reuse(unsigned char* buffer);\n\t\tsize_t GetSingleBufferSize();\n\t\tsize_t GetBufferCount();\n\n\tprivate:\n\t\tuint64_t usedBuffers;\n\t\tint bufferCount;\n\t\tsize_t size;\n\t\tunsigned char* buffers[64];\n\t\tMutex mutex;\n\t};\n\n\tclass Buffer{\n\tpublic:\n\t\tBuffer(size_t capacity){\n\t\t\tif(capacity>0)\n\t\t\t\tdata=(unsigned char *) malloc(capacity);\n\t\t\telse\n\t\t\t\tdata=NULL;\n\t\t\tlength=capacity;\n\t\t};\n\t\tBuffer(const Buffer& other)=delete;\n\t\tBuffer(Buffer&& other) noexcept {\n\t\t\tdata=other.data;\n\t\t\tlength=other.length;\n\t\t\tother.data=NULL;\n\t\t};\n\t\tBuffer(BufferOutputStream&& stream){\n\t\t\tdata=stream.buffer;\n\t\t\tlength=stream.offset;\n\t\t\tstream.buffer=NULL;\n\t\t}\n\t\tBuffer(){\n\t\t\tdata=NULL;\n\t\t\tlength=0;\n\t\t}\n\t\t~Buffer(){\n\t\t\tif(data)\n\t\t\t\tfree(data);\n\t\t\tdata=NULL;\n\t\t};\n\t\tBuffer& operator=(Buffer&& other){\n\t\t\tif(this!=&other){\n\t\t\t\tif(data)\n\t\t\t\t\tfree(data);\n\t\t\t\tdata=other.data;\n\t\t\t\tlength=other.length;\n\t\t\t\tother.data=NULL;\n\t\t\t}\n\t\t\treturn *this;\n\t\t}\n\t\tunsigned char& operator[](size_t i){\n\t\t\tif(i>=length)\n\t\t\t\tthrow std::out_of_range(\"\");\n\t\t\treturn data[i];\n\t\t}\n\t\tconst unsigned char& operator[](size_t i) const{\n\t\t\tif(i>=length)\n\t\t\t\tthrow std::out_of_range(\"\");\n\t\t\treturn data[i];\n\t\t}\n\t\tunsigned char* operator*(){\n\t\t\treturn data;\n\t\t}\n\t\tconst unsigned char* operator*() const{\n\t\t\treturn data;\n\t\t}\n\t\tvoid CopyFrom(Buffer& other, size_t count, size_t srcOffset=0, size_t dstOffset=0){\n\t\t\tif(!other.data)\n\t\t\t\tthrow std::invalid_argument(\"CopyFrom can't copy from NULL\");\n\t\t\tif(other.length<srcOffset+count || length<dstOffset+count)\n\t\t\t\tthrow std::out_of_range(\"Out of offset+count bounds of either buffer\");\n\t\t\tmemcpy(data+dstOffset, other.data+srcOffset, count);\n\t\t}\n\t\tvoid CopyFrom(const void* ptr, size_t dstOffset, size_t count){\n\t\t\tif(length<dstOffset+count)\n\t\t\t\tthrow std::out_of_range(\"Offset+count is out of bounds\");\n\t\t\tmemcpy(data+dstOffset, ptr, count);\n\t\t}\n\t\tvoid Resize(size_t newSize){\n\t\t\tdata=(unsigned char *) realloc(data, newSize);\n\t\t\tlength=newSize;\n\t\t}\n\t\tsize_t Length(){\n\t\t\treturn length;\n\t\t}\n\tprivate:\n\t\tunsigned char* data;\n\t\tsize_t length;\n\t};\n\n\ttemplate <typename T, size_t size, typename AVG_T=T> class HistoricBuffer{\n\tpublic:\n\t\tHistoricBuffer(){\n\t\t\tstd::fill(data.begin(), data.end(), (T)0);\n\t\t}\n\n\t\tAVG_T Average(){\n\t\t\tAVG_T avg=(AVG_T)0;\n\t\t\tfor(T& i:data){\n\t\t\t\tavg+=i;\n\t\t\t}\n\t\t\treturn avg/(AVG_T)size;\n\t\t}\n\n\t\tAVG_T Average(size_t firstN){\n\t\t\tAVG_T avg=(AVG_T)0;\n\t\t\tfor(size_t i=0;i<firstN;i++){\n\t\t\t\tavg+=(*this)[i];\n\t\t\t}\n\t\t\treturn avg/(AVG_T)firstN;\n\t\t}\n\n\t\tAVG_T NonZeroAverage(){\n\t\t\tAVG_T avg=(AVG_T)0;\n\t\t\tint nonZeroCount=0;\n\t\t\tfor(T& i:data){\n\t\t\t\tif(i!=0){\n\t\t\t\t\tnonZeroCount++;\n\t\t\t\t\tavg+=i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(nonZeroCount==0)\n\t\t\t\treturn (AVG_T)0;\n\t\t\treturn avg/(AVG_T)nonZeroCount;\n\t\t}\n\n\t\tvoid Add(T el){\n\t\t\tdata[offset]=el;\n\t\t\toffset=(offset+1)%size;\n\t\t}\n\n\t\tT Min(){\n\t\t\tT min=std::numeric_limits<T>::max();\n\t\t\tfor(T& i:data){\n\t\t\t\tif(i<min)\n\t\t\t\t\tmin=i;\n\t\t\t}\n\t\t\treturn min;\n\t\t}\n\n\t\tT Max(){\n\t\t\tT max=std::numeric_limits<T>::min();\n\t\t\tfor(T& i:data){\n\t\t\t\tif(i>max)\n\t\t\t\t\tmax=i;\n\t\t\t}\n\t\t\treturn max;\n\t\t}\n\n\t\tvoid Reset(){\n\t\t\tstd::fill(data.begin(), data.end(), (T)0);\n\t\t\toffset=0;\n\t\t}\n\n\t\tT& operator[](size_t i){\n\t\t\tassert(i<size);\n\t\t\t// [0] should return the most recent entry, [1] the one before it, and so on\n\t\t\tptrdiff_t _i=offset-i-1;\n\t\t\tif(_i<0)\n\t\t\t\t_i=size+_i;\n\t\t\treturn data[_i];\n\t\t}\n\tprivate:\n\t\tstd::array<T, size> data;\n\t\tptrdiff_t offset=0;\n\t};\n}\n\n#endif //LIBTGVOIP_BUFFERINPUTSTREAM_H\n"
  },
  {
    "path": "libtgvoip-public/CongestionControl.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"CongestionControl.h\"\n#include \"VoIPController.h\"\n#include \"logging.h\"\n#include \"VoIPServerConfig.h\"\n#include \"PrivateDefines.h\"\n#include <math.h>\n#include <assert.h>\n\nusing namespace tgvoip;\n\nCongestionControl::CongestionControl(){\n\tmemset(inflightPackets, 0, sizeof(inflightPackets));\n\ttmpRtt=0;\n\ttmpRttCount=0;\n\tlastSentSeq=0;\n\tlastActionTime=0;\n\tlastActionRtt=0;\n\tstateTransitionTime=0;\n\tinflightDataSize=0;\n\tlossCount=0;\n\tcwnd=(size_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_congestion_window\", 1024);\n}\n\nCongestionControl::~CongestionControl(){\n}\n\nsize_t CongestionControl::GetAcknowledgedDataSize(){\n\treturn 0;\n}\n\ndouble CongestionControl::GetAverageRTT(){\n\treturn rttHistory.NonZeroAverage();\n}\n\nsize_t CongestionControl::GetInflightDataSize(){\n\treturn inflightHistory.Average();\n}\n\n\nsize_t CongestionControl::GetCongestionWindow(){\n\treturn cwnd;\n}\n\ndouble CongestionControl::GetMinimumRTT(){\n\treturn rttHistory.Min();\n}\n\nvoid CongestionControl::PacketAcknowledged(uint32_t seq){\n\tMutexGuard sync(mutex);\n\tint i;\n\tfor(i=0;i<100;i++){\n\t\tif(inflightPackets[i].seq==seq && inflightPackets[i].sendTime>0){\n\t\t\ttmpRtt+=(VoIPController::GetCurrentTime()-inflightPackets[i].sendTime);\n\t\t\ttmpRttCount++;\n\t\t\tinflightPackets[i].sendTime=0;\n\t\t\tinflightDataSize-=inflightPackets[i].size;\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\nvoid CongestionControl::PacketSent(uint32_t seq, size_t size){\n\tif(!seqgt(seq, lastSentSeq) || seq==lastSentSeq){\n\t\tLOGW(\"Duplicate outgoing seq %u\", seq);\n\t\treturn;\n\t}\n\tlastSentSeq=seq;\n\tMutexGuard sync(mutex);\n\tdouble smallestSendTime=INFINITY;\n\ttgvoip_congestionctl_packet_t* slot=NULL;\n\tint i;\n\tfor(i=0;i<100;i++){\n\t\tif(inflightPackets[i].sendTime==0){\n\t\t\tslot=&inflightPackets[i];\n\t\t\tbreak;\n\t\t}\n\t\tif(smallestSendTime>inflightPackets[i].sendTime){\n\t\t\tslot=&inflightPackets[i];\n\t\t\tsmallestSendTime=slot->sendTime;\n\t\t}\n\t}\n\tassert(slot!=NULL);\n\tif(slot->sendTime>0){\n\t\tinflightDataSize-=slot->size;\n\t\tlossCount++;\n\t\tLOGD(\"Packet with seq %u was not acknowledged\", slot->seq);\n\t}\n\tslot->seq=seq;\n\tslot->size=size;\n\tslot->sendTime=VoIPController::GetCurrentTime();\n\tinflightDataSize+=size;\n}\n\n\nvoid CongestionControl::Tick(){\n\ttickCount++;\n\tMutexGuard sync(mutex);\n\tif(tmpRttCount>0){\n\t\trttHistory.Add(tmpRtt/tmpRttCount);\n\t\ttmpRtt=0;\n\t\ttmpRttCount=0;\n\t}\n\tint i;\n\tfor(i=0;i<100;i++){\n\t\tif(inflightPackets[i].sendTime!=0 && VoIPController::GetCurrentTime()-inflightPackets[i].sendTime>2){\n\t\t\tinflightPackets[i].sendTime=0;\n\t\t\tinflightDataSize-=inflightPackets[i].size;\n\t\t\tlossCount++;\n\t\t\tLOGD(\"Packet with seq %u was not acknowledged\", inflightPackets[i].seq);\n\t\t}\n\t}\n\tinflightHistory.Add(inflightDataSize);\n}\n\n\nint CongestionControl::GetBandwidthControlAction(){\n\tif(VoIPController::GetCurrentTime()-lastActionTime<1)\n\t\treturn TGVOIP_CONCTL_ACT_NONE;\n\tsize_t inflightAvg=GetInflightDataSize();\n\tsize_t max=cwnd+cwnd/10;\n\tsize_t min=cwnd-cwnd/10;\n\tif(inflightAvg<min){\n\t\tlastActionTime=VoIPController::GetCurrentTime();\n\t\treturn TGVOIP_CONCTL_ACT_INCREASE;\n\t}\n\tif(inflightAvg>max){\n\t\tlastActionTime=VoIPController::GetCurrentTime();\n\t\treturn TGVOIP_CONCTL_ACT_DECREASE;\n\t}\n\treturn TGVOIP_CONCTL_ACT_NONE;\n}\n\n\nuint32_t CongestionControl::GetSendLossCount(){\n\treturn lossCount;\n}\n"
  },
  {
    "path": "libtgvoip-public/CongestionControl.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_CONGESTIONCONTROL_H\n#define LIBTGVOIP_CONGESTIONCONTROL_H\n\n#include <stdlib.h>\n#include <stdint.h>\n#include \"threading.h\"\n#include \"Buffers.h\"\n\n#define TGVOIP_CONCTL_ACT_INCREASE 1\n#define TGVOIP_CONCTL_ACT_DECREASE 2\n#define TGVOIP_CONCTL_ACT_NONE 0\n\nnamespace tgvoip{\n\nstruct tgvoip_congestionctl_packet_t{\n\tuint32_t seq;\n\tdouble sendTime;\n\tsize_t size;\n};\ntypedef struct tgvoip_congestionctl_packet_t tgvoip_congestionctl_packet_t;\n\nclass CongestionControl{\npublic:\n\tCongestionControl();\n\t~CongestionControl();\n\n\tvoid PacketSent(uint32_t seq, size_t size);\n\tvoid PacketAcknowledged(uint32_t seq);\n\n\tdouble GetAverageRTT();\n\tdouble GetMinimumRTT();\n\tsize_t GetInflightDataSize();\n\tsize_t GetCongestionWindow();\n\tsize_t GetAcknowledgedDataSize();\n\tvoid Tick();\n\tint GetBandwidthControlAction();\n\tuint32_t GetSendLossCount();\n\nprivate:\n\tHistoricBuffer<double, 100> rttHistory;\n\tHistoricBuffer<size_t, 30> inflightHistory;\n\ttgvoip_congestionctl_packet_t inflightPackets[100];\n\tuint32_t lossCount;\n\tdouble tmpRtt;\n\tdouble lastActionTime;\n\tdouble lastActionRtt;\n\tdouble stateTransitionTime;\n\tint tmpRttCount;\n\tuint32_t lastSentSeq;\n\tuint32_t tickCount;\n\tsize_t inflightDataSize;\n\tsize_t cwnd;\n\tMutex mutex;\n};\n}\n\n#endif //LIBTGVOIP_CONGESTIONCONTROL_H\n"
  },
  {
    "path": "libtgvoip-public/EchoCanceller.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"EchoCanceller.h\"\n#include \"audio/AudioOutput.h\"\n#include \"audio/AudioInput.h\"\n#include \"logging.h\"\n#include <string.h>\n#include <stdio.h>\n\n#ifndef TGVOIP_NO_DSP\n#ifndef TGVOIP_USE_DESKTOP_DSP\n#include \"webrtc/modules/audio_processing/aecm/echo_control_mobile.h\"\n#include \"webrtc/modules/audio_processing/ns/noise_suppression_x.h\"\n#else\n#include \"webrtc/modules/audio_processing/aec/echo_cancellation.h\"\n//#include \"webrtc/modules/audio_processing/ns/noise_suppression.h\"\n#include \"webrtc/modules/audio_processing/ns/noise_suppression_x.h\"\n#endif\n#include \"webrtc/modules/audio_processing/splitting_filter.h\"\n#include \"webrtc/common_audio/channel_buffer.h\"\n#include \"webrtc/modules/audio_processing/agc/legacy/gain_control.h\"\n#endif\n\n#define AEC_FRAME_SIZE 160\n#define OFFSET_STEP AEC_FRAME_SIZE*2\n\n//#define CLAMP(x, min, max) (x<max ? (x>min ? x : min) : max)\n#define CLAMP(x, min, max) x\n\nusing namespace tgvoip;\n\n#ifdef TGVOIP_USE_DESKTOP_DSP\nnamespace webrtc{\n\tvoid WebRtcAec_enable_delay_agnostic(AecCore* self, int enable);\n}\n#endif\n\nEchoCanceller::EchoCanceller(bool enableAEC, bool enableNS, bool enableAGC){\n#ifndef TGVOIP_NO_DSP\n\tthis->enableAEC=enableAEC;\n\tthis->enableAGC=enableAGC;\n\tthis->enableNS=enableNS;\n\tisOn=true;\n\n\tsplittingFilter=new webrtc::SplittingFilter(1, 3, 960);\n\tsplittingFilterFarend=new webrtc::SplittingFilter(1, 3, 960);\n\t\n\tsplittingFilterIn=new webrtc::IFChannelBuffer(960, 1, 1);\n\tsplittingFilterFarendIn=new webrtc::IFChannelBuffer(960, 1, 1);\n\tsplittingFilterOut=new webrtc::IFChannelBuffer(960, 1, 3);\n\tsplittingFilterFarendOut=new webrtc::IFChannelBuffer(960, 1, 3);\n\n\tif(enableAEC){\n#ifndef TGVOIP_USE_DESKTOP_DSP\n\t\taec=WebRtcAecm_Create();\n\t\tWebRtcAecm_Init(aec, 16000);\n\t\tAecmConfig cfg;\n\t\tcfg.cngMode=AecmFalse;\n\t\tcfg.echoMode=0;\n\t\tWebRtcAecm_set_config(aec, cfg);\n#else\n\t\taec=webrtc::WebRtcAec_Create();\n\t\twebrtc::WebRtcAec_Init(aec, 48000, 48000);\n\t\twebrtc::WebRtcAec_enable_delay_agnostic(webrtc::WebRtcAec_aec_core(aec), 1);\n\t\twebrtc::AecConfig config;\n\t\tconfig.metricsMode=webrtc::kAecFalse;\n\t\tconfig.nlpMode=webrtc::kAecNlpAggressive;\n\t\tconfig.skewMode=webrtc::kAecFalse;\n\t\tconfig.delay_logging=webrtc::kAecFalse;\n\t\twebrtc::WebRtcAec_set_config(aec, config);\n#endif\n\n\t\tfarendQueue=new BlockingQueue<int16_t*>(11);\n\t\tfarendBufferPool=new BufferPool(960*2, 10);\n\t\trunning=true;\n\n\t\tbufferFarendThread=new Thread(new MethodPointer<EchoCanceller>(&EchoCanceller::RunBufferFarendThread, this), NULL);\n\t\tbufferFarendThread->Start();\n\t}else{\n\t\taec=NULL;\n\t}\n\n\tif(enableNS){\n//#ifndef TGVOIP_USE_DESKTOP_DSP\n\t\tns=WebRtcNsx_Create();\n\t\tWebRtcNsx_Init((NsxHandle*)ns, 48000);\n\t\tWebRtcNsx_set_policy((NsxHandle*)ns, 0);\n/*#else\n\t\tns=WebRtcNs_Create();\n\t\tWebRtcNs_Init((NsHandle*)ns, 48000);\n\t\tWebRtcNs_set_policy((NsHandle*)ns, 1);\n#endif*/\n\t}else{\n\t\tns=NULL;\n\t}\n\n\tif(enableAGC){\n\t\tagc=WebRtcAgc_Create();\n\t\tWebRtcAgcConfig agcConfig;\n\t\tagcConfig.compressionGaindB = 20;\n\t\tagcConfig.limiterEnable = 1;\n\t\tagcConfig.targetLevelDbfs = 9;\n\t\tWebRtcAgc_Init(agc, 0, 255, kAgcModeAdaptiveDigital, 48000);\n\t\tWebRtcAgc_set_config(agc, agcConfig);\n\t\tagcMicLevel=0;\n\t}else{\n\t\tagc=NULL;\n\t}\n#else\n\tthis->enableAEC=this->enableAGC=enableAGC=this->enableNS=enableNS=false;\n\tisOn=true;\n#endif\n}\n\nEchoCanceller::~EchoCanceller(){\n#ifndef TGVOIP_NO_DSP\n\tif(enableAEC){\n\t\trunning=false;\n\t\tfarendQueue->Put(NULL);\n\t\tbufferFarendThread->Join();\n\t\tdelete bufferFarendThread;\n\t\tdelete farendQueue;\n\t\tdelete farendBufferPool;\n#ifndef TGVOIP_USE_DESKTOP_DSP\n\t\tWebRtcAecm_Free(aec);\n#else\n\t\twebrtc::WebRtcAec_Free(aec);\n#endif\n\t}\n\tif(enableNS){\n//#ifndef TGVOIP_USE_DESKTOP_DSP\n\t\tWebRtcNsx_Free((NsxHandle*)ns);\n/*#else\n\t\tWebRtcNs_Free((NsHandle*)ns);\n#endif*/\n\t}\n\tif(enableAGC){\n\t\tWebRtcAgc_Free(agc);\n\t}\n\t//webrtc::WebRtcAec_Free(state);\n\t\n\tdelete (webrtc::SplittingFilter*)splittingFilter;\n\tdelete (webrtc::SplittingFilter*)splittingFilterFarend;\n\t\n\tdelete (webrtc::IFChannelBuffer*)splittingFilterIn;\n\tdelete (webrtc::IFChannelBuffer*)splittingFilterOut;\n\tdelete (webrtc::IFChannelBuffer*)splittingFilterFarendIn;\n\tdelete (webrtc::IFChannelBuffer*)splittingFilterFarendOut;\n#endif\n}\n\nvoid EchoCanceller::Start(){\n\n}\n\nvoid EchoCanceller::Stop(){\n\n}\n\n\nvoid EchoCanceller::SpeakerOutCallback(unsigned char* data, size_t len){\n    if(len!=960*2 || !enableAEC || !isOn)\n\t\treturn;\n\t/*size_t offset=0;\n\twhile(offset<len){\n\t\tWebRtcAecm_BufferFarend(state, (int16_t*)(data+offset), AEC_FRAME_SIZE);\n\t\toffset+=OFFSET_STEP;\n\t}*/\n#ifndef TGVOIP_NO_DSP\n\tint16_t* buf=(int16_t*)farendBufferPool->Get();\n\tif(buf){\n\t\tmemcpy(buf, data, 960*2);\n\t\tfarendQueue->Put(buf);\n\t}\n#endif\n}\n\n#ifndef TGVOIP_NO_DSP\nvoid EchoCanceller::RunBufferFarendThread(void* arg){\n\twhile(running){\n\t\tint16_t* samplesIn=farendQueue->GetBlocking();\n\t\tif(samplesIn){\n\t\t\twebrtc::IFChannelBuffer* bufIn=(webrtc::IFChannelBuffer*) splittingFilterFarendIn;\n\t\t\twebrtc::IFChannelBuffer* bufOut=(webrtc::IFChannelBuffer*) splittingFilterFarendOut;\n\t\t\tmemcpy(bufIn->ibuf()->bands(0)[0], samplesIn, 960*2);\n\t\t\tfarendBufferPool->Reuse((unsigned char *) samplesIn);\n\t\t\t((webrtc::SplittingFilter*)splittingFilterFarend)->Analysis(bufIn, bufOut);\n\t\t\taecMutex.Lock();\n\t\t\t//outstandingFarendFrames++;\n\t\t\t//LOGV(\"BufferFarend: %d frames\", outstandingFarendFrames);\n#ifndef TGVOIP_USE_DESKTOP_DSP\n\t\t\tWebRtcAecm_BufferFarend(aec, bufOut->ibuf_const()->bands(0)[0], 160);\n\t\t\tWebRtcAecm_BufferFarend(aec, bufOut->ibuf_const()->bands(0)[0]+160, 160);\n#else\n\t\t\twebrtc::WebRtcAec_BufferFarend(aec, bufOut->fbuf_const()->bands(0)[0], 160);\n\t\t\twebrtc::WebRtcAec_BufferFarend(aec, bufOut->fbuf_const()->bands(0)[0]+160, 160);\n#endif\n\t\t\taecMutex.Unlock();\n\t\t\tdidBufferFarend=true;\n\t\t}\n\t}\n}\n#endif\n\nvoid EchoCanceller::Enable(bool enabled){\n\tisOn=enabled;\n}\n\nvoid EchoCanceller::ProcessInput(unsigned char* data, unsigned char* out, size_t len){\n\tint i;\n\tif(!isOn || (!enableAEC && !enableAGC && !enableNS)){\n\t\tmemcpy(out, data, len);\n\t\treturn;\n\t}\n#ifndef TGVOIP_NO_DSP\n\tint16_t* samplesIn=(int16_t*)data;\n\tint16_t* samplesOut=(int16_t*)out;\n\t\n\twebrtc::IFChannelBuffer* bufIn=(webrtc::IFChannelBuffer*) splittingFilterIn;\n\twebrtc::IFChannelBuffer* bufOut=(webrtc::IFChannelBuffer*) splittingFilterOut;\n\t\n\tmemcpy(bufIn->ibuf()->bands(0)[0], samplesIn, 960*2);\n\n\t((webrtc::SplittingFilter*)splittingFilter)->Analysis(bufIn, bufOut);\n\n#ifndef TGVOIP_USE_DESKTOP_DSP\n\tif(enableAEC && enableNS){\n\t\tint16_t _nsOut[3][320];\n\t\tint16_t* nsIn[3];\n\t\tint16_t* nsOut[3];\n\t\tfor(i=0;i<3;i++){\n\t\t\tnsIn[i]=(int16_t*)bufOut->ibuf_const()->bands(0)[i];\n\t\t\tnsOut[i]=_nsOut[i];\n\t\t}\n\t\tWebRtcNsx_Process((NsxHandle*)ns, (const short *const *) nsIn, 3, nsOut);\n\t\tfor(i=0;i<3;i++){\n\t\t\tnsOut[i]+=160;\n\t\t\tnsIn[i]+=160;\n\t\t}\n\t\tWebRtcNsx_Process((NsxHandle*)ns, (const short *const *) nsIn, 3, nsOut);\n\n\t\tmemcpy(bufOut->ibuf()->bands(0)[1], _nsOut[1], 320*2*2);\n\n\t\taecMutex.Lock();\n\t\tWebRtcAecm_Process(aec, bufOut->ibuf()->bands(0)[0], _nsOut[0], samplesOut, AEC_FRAME_SIZE, (int16_t) tgvoip::audio::AudioOutput::GetEstimatedDelay());\n\t\tWebRtcAecm_Process(aec, bufOut->ibuf()->bands(0)[0]+160, _nsOut[0]+160, samplesOut+160, AEC_FRAME_SIZE, (int16_t) (tgvoip::audio::AudioOutput::GetEstimatedDelay()+audio::AudioInput::GetEstimatedDelay()));\n\t\taecMutex.Unlock();\n\t\tmemcpy(bufOut->ibuf()->bands(0)[0], samplesOut, 320*2);\n\t}else if(enableAEC){\n\t\taecMutex.Lock();\n\t\tWebRtcAecm_Process(aec, bufOut->ibuf()->bands(0)[0], NULL, samplesOut, AEC_FRAME_SIZE, (int16_t) tgvoip::audio::AudioOutput::GetEstimatedDelay());\n\t\tWebRtcAecm_Process(aec, bufOut->ibuf()->bands(0)[0]+160, NULL, samplesOut+160, AEC_FRAME_SIZE, (int16_t) (tgvoip::audio::AudioOutput::GetEstimatedDelay()+audio::AudioInput::GetEstimatedDelay()));\n\t\taecMutex.Unlock();\n\t\tmemcpy(bufOut->ibuf()->bands(0)[0], samplesOut, 320*2);\n\t}else if(enableNS){\n\t\tint16_t _nsOut[3][320];\n\t\tint16_t* nsIn[3];\n\t\tint16_t* nsOut[3];\n\t\tfor(i=0;i<3;i++){\n\t\t\tnsIn[i]=(int16_t*)bufOut->ibuf_const()->bands(0)[i];\n\t\t\tnsOut[i]=_nsOut[i];\n\t\t}\n\t\tWebRtcNsx_Process((NsxHandle*)ns, (const short *const *) nsIn, 3, nsOut);\n\t\tfor(i=0;i<3;i++){\n\t\t\tnsOut[i]+=160;\n\t\t\tnsIn[i]+=160;\n\t\t}\n\t\tWebRtcNsx_Process((NsxHandle*)ns, (const short *const *) nsIn, 3, nsOut);\n\n\t\tmemcpy(bufOut->ibuf()->bands(0)[0], _nsOut[0], 320*2);\n\t\tmemcpy(bufOut->ibuf()->bands(0)[1], _nsOut[1], 320*2);\n\t\tmemcpy(bufOut->ibuf()->bands(0)[2], _nsOut[2], 320*2);\n\t}\n#else\n\t/*if(enableNS){\n\t\tfloat _nsOut[3][320];\n\t\tconst float* nsIn[3];\n\t\tfloat* nsOut[3];\n\t\tfor(i=0;i<3;i++){\n\t\t\tnsIn[i]=bufOut->fbuf_const()->bands(0)[i];\n\t\t\tnsOut[i]=_nsOut[i];\n\t\t}\n\t\tWebRtcNs_Process((NsHandle*)ns, nsIn, 3, nsOut);\n\t\tfor(i=0;i<3;i++){\n\t\t\tnsOut[i]+=160;\n\t\t\tnsIn[i]+=160;\n\t\t}\n\t\tWebRtcNs_Process((NsHandle*)ns, nsIn, 3, nsOut);\n\n\t\tmemcpy(bufOut->fbuf()->bands(0)[0], _nsOut[0], 320*4);\n\t\tmemcpy(bufOut->fbuf()->bands(0)[1], _nsOut[1], 320*4);\n\t\tmemcpy(bufOut->fbuf()->bands(0)[2], _nsOut[2], 320*4);\n\t}*/\n\tif(enableNS){\n\t\tint16_t _nsOut[3][320];\n\t\tint16_t* nsIn[3];\n\t\tint16_t* nsOut[3];\n\t\tfor(i=0;i<3;i++){\n\t\t\tnsIn[i]=(int16_t*)bufOut->ibuf_const()->bands(0)[i];\n\t\t\tnsOut[i]=_nsOut[i];\n\t\t}\n\t\tWebRtcNsx_Process((NsxHandle*)ns, (const short *const *)nsIn, 3, nsOut);\n\t\tfor(i=0;i<3;i++){\n\t\t\tnsOut[i]+=160;\n\t\t\tnsIn[i]+=160;\n\t\t}\n\t\tWebRtcNsx_Process((NsxHandle*)ns, (const short *const *)nsIn, 3, nsOut);\n\n\t\tmemcpy(bufOut->ibuf()->bands(0)[0], _nsOut[0], 320*2);\n\t\tmemcpy(bufOut->ibuf()->bands(0)[1], _nsOut[1], 320*2);\n\t\tmemcpy(bufOut->ibuf()->bands(0)[2], _nsOut[2], 320*2);\n\t}\n\n\tif(enableAEC){\n\t\tconst float* aecIn[3];\n\t\tfloat* aecOut[3];\n\t\tfloat _aecOut[3][320];\n\t\tfor(i=0;i<3;i++){\n\t\t\taecIn[i]=bufOut->fbuf_const()->bands(0)[i];\n\t\t\taecOut[i]=_aecOut[i];\n\t\t}\n\t\twebrtc::WebRtcAec_Process(aec, aecIn, 3, aecOut, AEC_FRAME_SIZE, audio::AudioOutput::GetEstimatedDelay()+audio::AudioInput::GetEstimatedDelay(), 0);\n\t\tfor(i=0;i<3;i++){\n\t\t\taecOut[i]+=160;\n\t\t\taecIn[i]+=160;\n\t\t}\n\t\twebrtc::WebRtcAec_Process(aec, aecIn, 3, aecOut, AEC_FRAME_SIZE, audio::AudioOutput::GetEstimatedDelay()+audio::AudioInput::GetEstimatedDelay(), 0);\n\t\t//outstandingFarendFrames--;\n\t\t//LOGV(\"Process: %d frames\", outstandingFarendFrames);\n\t\t\n\t\tmemcpy(bufOut->fbuf()->bands(0)[0], _aecOut[0], 320*4);\n\t\tmemcpy(bufOut->fbuf()->bands(0)[1], _aecOut[1], 320*4);\n\t\tmemcpy(bufOut->fbuf()->bands(0)[2], _aecOut[2], 320*4);\n\t}\n#endif\n\t\n\tif(enableAGC){\n\t\tint16_t _agcOut[3][320];\n\t\tint16_t* agcIn[3];\n\t\tint16_t* agcOut[3];\n\t\tfor(i=0;i<3;i++){\n\t\t\tagcIn[i]=(int16_t*)bufOut->ibuf_const()->bands(0)[i];\n\t\t\tagcOut[i]=_agcOut[i];\n\t\t}\n\t\tuint8_t saturation;\n\t\tWebRtcAgc_AddMic(agc, agcIn, 3, 160);\n\t\tWebRtcAgc_Process(agc, (const int16_t *const *) agcIn, 3, 160, agcOut, agcMicLevel, &agcMicLevel, 0, &saturation);\n\t\tfor(i=0;i<3;i++){\n\t\t\tagcOut[i]+=160;\n\t\t\tagcIn[i]+=160;\n\t\t}\n\t\tWebRtcAgc_AddMic(agc, agcIn, 3, 160);\n\t\tWebRtcAgc_Process(agc, (const int16_t *const *) agcIn, 3, 160, agcOut, agcMicLevel, &agcMicLevel, 0, &saturation);\n\t\t//LOGV(\"AGC mic level %d\", agcMicLevel);\n\t\tmemcpy(bufOut->ibuf()->bands(0)[0], _agcOut[0], 320*2);\n\t\tmemcpy(bufOut->ibuf()->bands(0)[1], _agcOut[1], 320*2);\n\t\tmemcpy(bufOut->ibuf()->bands(0)[2], _agcOut[2], 320*2);\n\t}\n\n\t((webrtc::SplittingFilter*)splittingFilter)->Synthesis(bufOut, bufIn);\n\t\n\tmemcpy(samplesOut, bufIn->ibuf_const()->bands(0)[0], 960*2);\n#endif\n}\n\nvoid EchoCanceller::SetAECStrength(int strength){\n#ifndef TGVOIP_NO_DSP\n\tif(aec){\n#ifndef TGVOIP_USE_DESKTOP_DSP\n\t\tAecmConfig cfg;\n\t\tcfg.cngMode=AecmFalse;\n\t\tcfg.echoMode=(int16_t) strength;\n\t\tWebRtcAecm_set_config(aec, cfg);\n#endif\n\t}\n#endif\n}\n\nAudioEffect::~AudioEffect(){\n\n}\n\nvoid AudioEffect::SetPassThrough(bool passThrough){\n\tthis->passThrough=passThrough;\n}\n\nAutomaticGainControl::AutomaticGainControl(){\n#ifndef TGVOIP_NO_DSP\n\tsplittingFilter=new webrtc::SplittingFilter(1, 3, 960);\n\tsplittingFilterIn=new webrtc::IFChannelBuffer(960, 1, 1);\n\tsplittingFilterOut=new webrtc::IFChannelBuffer(960, 1, 3);\n\n\tagc=WebRtcAgc_Create();\n\tWebRtcAgcConfig agcConfig;\n\tagcConfig.compressionGaindB = 9;\n\tagcConfig.limiterEnable = 1;\n\tagcConfig.targetLevelDbfs = 3;\n\tWebRtcAgc_Init(agc, 0, 255, kAgcModeAdaptiveDigital, 48000);\n\tWebRtcAgc_set_config(agc, agcConfig);\n\tagcMicLevel=0;\n#endif\n}\n\nAutomaticGainControl::~AutomaticGainControl(){\n#ifndef TGVOIP_NO_DSP\n\tdelete (webrtc::SplittingFilter*)splittingFilter;\n\tdelete (webrtc::IFChannelBuffer*)splittingFilterIn;\n\tdelete (webrtc::IFChannelBuffer*)splittingFilterOut;\n\tWebRtcAgc_Free(agc);\n#endif\n}\n\nvoid AutomaticGainControl::Process(int16_t *inOut, size_t numSamples){\n#ifndef TGVOIP_NO_DSP\n\tif(passThrough)\n\t\treturn;\n\tif(numSamples!=960){\n\t\tLOGW(\"AutomaticGainControl only works on 960-sample buffers (got %u samples)\", (unsigned int)numSamples);\n\t\treturn;\n\t}\n\t//LOGV(\"processing frame through AGC\");\n\n\twebrtc::IFChannelBuffer* bufIn=(webrtc::IFChannelBuffer*) splittingFilterIn;\n\twebrtc::IFChannelBuffer* bufOut=(webrtc::IFChannelBuffer*) splittingFilterOut;\n\n\tmemcpy(bufIn->ibuf()->bands(0)[0], inOut, 960*2);\n\n\t((webrtc::SplittingFilter*)splittingFilter)->Analysis(bufIn, bufOut);\n\n\tint i;\n\tint16_t _agcOut[3][320];\n\tint16_t* agcIn[3];\n\tint16_t* agcOut[3];\n\tfor(i=0;i<3;i++){\n\t\tagcIn[i]=(int16_t*)bufOut->ibuf_const()->bands(0)[i];\n\t\tagcOut[i]=_agcOut[i];\n\t}\n\tuint8_t saturation;\n\tWebRtcAgc_AddMic(agc, agcIn, 3, 160);\n\tWebRtcAgc_Process(agc, (const int16_t *const *) agcIn, 3, 160, agcOut, agcMicLevel, &agcMicLevel, 0, &saturation);\n\tfor(i=0;i<3;i++){\n\t\tagcOut[i]+=160;\n\t\tagcIn[i]+=160;\n\t}\n\tWebRtcAgc_AddMic(agc, agcIn, 3, 160);\n\tWebRtcAgc_Process(agc, (const int16_t *const *) agcIn, 3, 160, agcOut, agcMicLevel, &agcMicLevel, 0, &saturation);\n\tmemcpy(bufOut->ibuf()->bands(0)[0], _agcOut[0], 320*2);\n\tmemcpy(bufOut->ibuf()->bands(0)[1], _agcOut[1], 320*2);\n\tmemcpy(bufOut->ibuf()->bands(0)[2], _agcOut[2], 320*2);\n\n\t((webrtc::SplittingFilter*)splittingFilter)->Synthesis(bufOut, bufIn);\n\n\tmemcpy(inOut, bufIn->ibuf_const()->bands(0)[0], 960*2);\n#endif\n}\n\n"
  },
  {
    "path": "libtgvoip-public/EchoCanceller.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_ECHOCANCELLER_H\n#define LIBTGVOIP_ECHOCANCELLER_H\n\n#include \"threading.h\"\n#include \"Buffers.h\"\n#include \"BlockingQueue.h\"\n#include \"MediaStreamItf.h\"\n\nnamespace tgvoip{\nclass EchoCanceller{\n\npublic:\n\tEchoCanceller(bool enableAEC, bool enableNS, bool enableAGC);\n\tvirtual ~EchoCanceller();\n\tvirtual void Start();\n\tvirtual void Stop();\n\tvoid SpeakerOutCallback(unsigned char* data, size_t len);\n\tvoid Enable(bool enabled);\n\tvoid ProcessInput(unsigned char* data, unsigned char* out, size_t len);\n\tvoid SetAECStrength(int strength);\n\nprivate:\n\tbool enableAEC;\n\tbool enableAGC;\n\tbool enableNS;\n\tbool isOn;\n#ifndef TGVOIP_NO_DSP\n\tvoid RunBufferFarendThread(void* arg);\n\tbool didBufferFarend;\n\tMutex aecMutex;\n\tvoid* aec;\n\tvoid* splittingFilter; // webrtc::SplittingFilter\n\tvoid* splittingFilterIn; // webrtc::IFChannelBuffer\n\tvoid* splittingFilterOut; // webrtc::IFChannelBuffer\n\tvoid* splittingFilterFarend; // webrtc::SplittingFilter\n\tvoid* splittingFilterFarendIn; // webrtc::IFChannelBuffer\n\tvoid* splittingFilterFarendOut; // webrtc::IFChannelBuffer\n\tThread* bufferFarendThread;\n\tBlockingQueue<int16_t*>* farendQueue;\n\tBufferPool* farendBufferPool;\n\tbool running;\n\tvoid* ns; // NsxHandle\n\tvoid* agc;\n\tint32_t agcMicLevel;\n\t//int32_t outstandingFarendFrames=0;\n#endif\n};\n\n\tclass AudioEffect{\n\tpublic:\n\t\tvirtual ~AudioEffect()=0;\n\t\tvirtual void Process(int16_t* inOut, size_t numSamples)=0;\n\t\tvirtual void SetPassThrough(bool passThrough);\n\tprotected:\n\t\tbool passThrough;\n\t};\n\n\tclass AutomaticGainControl : public AudioEffect{\n\tpublic:\n\t\tAutomaticGainControl();\n\t\tvirtual ~AutomaticGainControl();\n\t\tvirtual void Process(int16_t* inOut, size_t numSamples);\n\n\tprivate:\n\t\tvoid* agc;\n\t\tvoid* splittingFilter;\n\t\tvoid* splittingFilterIn;\n\t\tvoid* splittingFilterOut;\n\t\tint32_t agcMicLevel;\n\t};\n};\n\n#endif //LIBTGVOIP_ECHOCANCELLER_H\n"
  },
  {
    "path": "libtgvoip-public/JitterBuffer.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"VoIPController.h\"\n#include \"JitterBuffer.h\"\n#include \"logging.h\"\n#include \"VoIPServerConfig.h\"\n#include <math.h>\n\nusing namespace tgvoip;\n\nJitterBuffer::JitterBuffer(MediaStreamItf *out, uint32_t step):bufferPool(JITTER_SLOT_SIZE, JITTER_SLOT_COUNT){\n\tif(out)\n\t\tout->SetCallback(JitterBuffer::CallbackOut, this);\n\tthis->step=step;\n\tmemset(slots, 0, sizeof(jitter_packet_t)*JITTER_SLOT_COUNT);\n\tif(step<30){\n\t\tminMinDelay=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_min_delay_20\", 6);\n\t\tmaxMinDelay=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_max_delay_20\", 25);\n\t\tmaxUsedSlots=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_max_slots_20\", 50);\n\t}else if(step<50){\n\t\tminMinDelay=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_min_delay_40\", 4);\n\t\tmaxMinDelay=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_max_delay_40\", 15);\n\t\tmaxUsedSlots=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_max_slots_40\", 30);\n\t}else{\n\t\tminMinDelay=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_min_delay_60\", 1);\n\t\tmaxMinDelay=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_max_delay_60\", 10);\n\t\tmaxUsedSlots=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_max_slots_60\", 20);\n\t}\n\tlossesToReset=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_losses_to_reset\", 20);\n\tresyncThreshold=ServerConfig::GetSharedInstance()->GetDouble(\"jitter_resync_threshold\", 1.0);\n#ifdef TGVOIP_DUMP_JITTER_STATS\n#ifdef TGVOIP_JITTER_DUMP_FILE\n\tdump=fopen(TGVOIP_JITTER_DUMP_FILE, \"w\");\n#elif defined(__ANDROID__)\n\tdump=fopen(\"/sdcard/tgvoip_jitter_dump.txt\", \"w\");\n#else\n\tdump=fopen(\"tgvoip_jitter_dump.txt\", \"w\");\n#endif\n\ttgvoip_log_file_write_header(dump);\n\tfprintf(dump, \"PTS\\tRTS\\tNumInBuf\\tAJitter\\tADelay\\tTDelay\\n\");\n#endif\n\tReset();\n}\n\nJitterBuffer::~JitterBuffer(){\n\tReset();\n}\n\nvoid JitterBuffer::SetMinPacketCount(uint32_t count){\n\tif(minDelay==count)\n\t\treturn;\n\tminDelay=count;\n\t//Reset();\n}\n\nint JitterBuffer::GetMinPacketCount(){\n\treturn (int)minDelay;\n}\n\nsize_t JitterBuffer::CallbackIn(unsigned char *data, size_t len, void *param){\n\t//((JitterBuffer*)param)->HandleInput(data, len);\n\treturn 0;\n}\n\nsize_t JitterBuffer::CallbackOut(unsigned char *data, size_t len, void *param){\n\treturn 0; //((JitterBuffer*)param)->HandleOutput(data, len, 0, NULL);\n}\n\nvoid JitterBuffer::HandleInput(unsigned char *data, size_t len, uint32_t timestamp, bool isEC){\n\tMutexGuard m(mutex);\n\tjitter_packet_t pkt;\n\tpkt.size=len;\n\tpkt.buffer=data;\n\tpkt.timestamp=timestamp;\n\tpkt.isEC=isEC;\n\tPutInternal(&pkt, !isEC);\n\t//LOGV(\"in, ts=%d, ec=%d\", timestamp, isEC);\n\n}\n\nvoid JitterBuffer::Reset(){\n\twasReset=true;\n\tneedBuffering=true;\n\tlastPutTimestamp=0;\n\tint i;\n\tfor(i=0;i<JITTER_SLOT_COUNT;i++){\n\t\tif(slots[i].buffer){\n\t\t\tbufferPool.Reuse(slots[i].buffer);\n\t\t\tslots[i].buffer=NULL;\n\t\t}\n\t}\n\tdelayHistory.Reset();\n\tlateHistory.Reset();\n\tadjustingDelay=false;\n\tlostSinceReset=0;\n\tgotSinceReset=0;\n\texpectNextAtTime=0;\n\tdeviationHistory.Reset();\n\toutstandingDelayChange=0;\n\tdontChangeDelay=0;\n}\n\n\nsize_t JitterBuffer::HandleOutput(unsigned char *buffer, size_t len, int offsetInSteps, bool advance, int& playbackScaledDuration, bool& isEC){\n\tjitter_packet_t pkt;\n\tpkt.buffer=buffer;\n\tpkt.size=len;\n\tMutexGuard m(mutex);\n\tint result=GetInternal(&pkt, offsetInSteps, advance);\n\tif(outstandingDelayChange!=0){\n\t\tif(outstandingDelayChange<0){\n\t\t\tplaybackScaledDuration=40;\n\t\t\toutstandingDelayChange+=20;\n\t\t}else{\n\t\t\tplaybackScaledDuration=80;\n\t\t\toutstandingDelayChange-=20;\n\t\t}\n\t\t//LOGV(\"outstanding delay change: %d\", outstandingDelayChange);\n\t}else if(advance && GetCurrentDelay()==0){\n\t\t//LOGV(\"stretching packet because the next one is late\");\n\t\tplaybackScaledDuration=80;\n\t}else{\n\t\tplaybackScaledDuration=60;\n\t}\n\tif(result==JR_OK){\n\t\tisEC=pkt.isEC;\n\t\treturn pkt.size;\n\t}else{\n\t\treturn 0;\n\t}\n}\n\n\nint JitterBuffer::GetInternal(jitter_packet_t* pkt, int offset, bool advance){\n\t/*if(needBuffering && lastPutTimestamp<nextTimestamp){\n\t\tLOGV(\"jitter: don't have timestamp %lld, buffering\", (long long int)nextTimestamp);\n\t\tAdvance();\n\t\treturn JR_BUFFERING;\n\t}*/\n\n\t//needBuffering=false;\n\n\tint64_t timestampToGet=nextTimestamp+offset*(int32_t)step;\n\n\tint i;\n\tfor(i=0;i<JITTER_SLOT_COUNT;i++){\n\t\tif(slots[i].buffer!=NULL && slots[i].timestamp==timestampToGet){\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif(i<JITTER_SLOT_COUNT){\n\t\tif(pkt && pkt->size<slots[i].size){\n\t\t\tLOGE(\"jitter: packet won't fit into provided buffer of %d (need %d)\", int(slots[i].size), int(pkt->size));\n\t\t}else{\n\t\t\tif(pkt) {\n\t\t\t\tpkt->size = slots[i].size;\n\t\t\t\tpkt->timestamp = slots[i].timestamp;\n\t\t\t\tmemcpy(pkt->buffer, slots[i].buffer, slots[i].size);\n\t\t\t\tpkt->isEC=slots[i].isEC;\n\t\t\t}\n\t\t}\n\t\tbufferPool.Reuse(slots[i].buffer);\n\t\tslots[i].buffer=NULL;\n\t\tif(offset==0)\n\t\t\tAdvance();\n\t\tlostCount=0;\n\t\tneedBuffering=false;\n\t\treturn JR_OK;\n\t}\n\n\t//LOGV(\"jitter: found no packet for timestamp %lld (last put = %d, lost = %d)\", (long long int)timestampToGet, lastPutTimestamp, lostCount);\n\n\tif(advance)\n\t\tAdvance();\n\n\tif(!needBuffering){\n\t\tlostCount++;\n\t\tif(offset==0){\n\t\t\tlostPackets++;\n\t\t\tlostSinceReset++;\n\t\t}\n\t\tif(lostCount>=lossesToReset || (gotSinceReset>minDelay*25 && lostSinceReset>gotSinceReset/2)){\n\t\t\tLOGW(\"jitter: lost %d packets in a row, resetting\", lostCount);\n\t\t\t//minDelay++;\n\t\t\tdontIncMinDelay=16;\n\t\t\tdontDecMinDelay+=128;\n\t\t\tif(GetCurrentDelay()<minDelay)\n\t\t\t\tnextTimestamp-=(int64_t)(minDelay-GetCurrentDelay());\n\t\t\tlostCount=0;\n\t\t\tReset();\n\t\t}\n\n\t\treturn JR_MISSING;\n\t}\n\treturn JR_BUFFERING;\n}\n\nvoid JitterBuffer::PutInternal(jitter_packet_t* pkt, bool overwriteExisting){\n\tif(pkt->size>JITTER_SLOT_SIZE){\n\t\tLOGE(\"The packet is too big to fit into the jitter buffer\");\n\t\treturn;\n\t}\n\n\tint i;\n\tfor(i=0;i<JITTER_SLOT_COUNT;i++){\n\t\tif(slots[i].buffer && slots[i].timestamp==pkt->timestamp){\n\t\t\t//LOGV(\"Found existing packet for timestamp %u, overwrite %d\", pkt->timestamp, overwriteExisting);\n\t\t\tif(overwriteExisting){\n\t\t\t\tmemcpy(slots[i].buffer, pkt->buffer, pkt->size);\n\t\t\t\tslots[i].size=pkt->size;\n\t\t\t\tslots[i].isEC=pkt->isEC;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}\n\tgotSinceReset++;\n\tif(wasReset){\n\t\twasReset=false;\n\t\toutstandingDelayChange=0;\n\t\tnextTimestamp=(int64_t)(((int64_t)pkt->timestamp)-step*minDelay);\n\t\tLOGI(\"jitter: resyncing, next timestamp = %lld (step=%d, minDelay=%f)\", (long long int)nextTimestamp, step, minDelay);\n\t}\n\t\n\tfor(i=0;i<JITTER_SLOT_COUNT;i++){\n\t\tif(slots[i].buffer!=NULL){\n\t\t\tif(slots[i].timestamp<nextTimestamp-1){\n\t\t\t\tbufferPool.Reuse(slots[i].buffer);\n\t\t\t\tslots[i].buffer=NULL;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*double prevTime=0;\n\tuint32_t closestTime=0;\n\tfor(i=0;i<JITTER_SLOT_COUNT;i++){\n\t\tif(slots[i].buffer!=NULL && pkt->timestamp-slots[i].timestamp<pkt->timestamp-closestTime){\n\t\t\tclosestTime=slots[i].timestamp;\n\t\t\tprevTime=slots[i].recvTime;\n\t\t}\n\t}*/\n\tdouble time=VoIPController::GetCurrentTime();\n\tif(expectNextAtTime!=0){\n\t\tdouble dev=expectNextAtTime-time;\n\t\t//LOGV(\"packet dev %f\", dev);\n\t\tdeviationHistory.Add(dev);\n\t\texpectNextAtTime+=step/1000.0;\n\t}else{\n\t\texpectNextAtTime=time+step/1000.0;\n\t}\n\n\tif(pkt->timestamp<nextTimestamp){\n\t\t//LOGW(\"jitter: would drop packet with timestamp %d because it is late but not hopelessly\", pkt->timestamp);\n\t\tlatePacketCount++;\n\t\tlostPackets--;\n\t}else if(pkt->timestamp<nextTimestamp-1){\n\t\t//LOGW(\"jitter: dropping packet with timestamp %d because it is too late\", pkt->timestamp);\n\t\tlatePacketCount++;\n\t\treturn;\n\t}\n\n\tif(pkt->timestamp>lastPutTimestamp)\n\t\tlastPutTimestamp=pkt->timestamp;\n\n\tfor(i=0;i<JITTER_SLOT_COUNT;i++){\n\t\tif(slots[i].buffer==NULL)\n\t\t\tbreak;\n\t}\n\tif(i==JITTER_SLOT_COUNT || GetCurrentDelay()>=maxUsedSlots){\n\t\tint toRemove=JITTER_SLOT_COUNT;\n\t\tuint32_t bestTimestamp=0xFFFFFFFF;\n\t\tfor(i=0;i<JITTER_SLOT_COUNT;i++){\n\t\t\tif(slots[i].buffer!=NULL && slots[i].timestamp<bestTimestamp){\n\t\t\t\ttoRemove=i;\n\t\t\t\tbestTimestamp=slots[i].timestamp;\n\t\t\t}\n\t\t}\n\t\tAdvance();\n\t\tbufferPool.Reuse(slots[toRemove].buffer);\n\t\tslots[toRemove].buffer=NULL;\n\t\ti=toRemove;\n\t}\n\tslots[i].timestamp=pkt->timestamp;\n\tslots[i].size=pkt->size;\n\tslots[i].buffer=bufferPool.Get();\n\tslots[i].recvTimeDiff=time-prevRecvTime;\n\tslots[i].isEC=pkt->isEC;\n\tif(slots[i].buffer)\n\t\tmemcpy(slots[i].buffer, pkt->buffer, pkt->size);\n\telse\n\t\tLOGE(\"WTF!!\");\n#ifdef TGVOIP_DUMP_JITTER_STATS\n\tfprintf(dump, \"%u\\t%.03f\\t%d\\t%.03f\\t%.03f\\t%.03f\\n\", pkt->timestamp, time, GetCurrentDelay(), lastMeasuredJitter, lastMeasuredDelay, minDelay);\n#endif\n\tprevRecvTime=time;\n}\n\n\nvoid JitterBuffer::Advance(){\n\tnextTimestamp+=step;\n}\n\n\nunsigned int JitterBuffer::GetCurrentDelay(){\n\tunsigned int delay=0;\n\tint i;\n\tfor(i=0;i<JITTER_SLOT_COUNT;i++){\n\t\tif(slots[i].buffer!=NULL)\n\t\t\tdelay++;\n\t}\n\treturn delay;\n}\n\nvoid JitterBuffer::Tick(){\n\tMutexGuard m(mutex);\n\tint i;\n\n\tlateHistory.Add(latePacketCount);\n\tlatePacketCount=0;\n\tbool absolutelyNoLatePackets=lateHistory.Max()==0;\n\n\tdouble avgLate16=lateHistory.Average(16);\n\t//LOGV(\"jitter: avg late=%.1f, %.1f, %.1f\", avgLate16, avgLate32, avgLate64);\n\tif(avgLate16>=resyncThreshold){\n\t\tLOGV(\"resyncing: avgLate16=%f, resyncThreshold=%f\", avgLate16, resyncThreshold);\n\t\twasReset=true;\n\t}\n\n\tif(absolutelyNoLatePackets){\n\t\tif(dontDecMinDelay>0)\n\t\t\tdontDecMinDelay--;\n\t}\n\n\tdelayHistory.Add(GetCurrentDelay());\n\tavgDelay=delayHistory.Average(32);\n\n\tdouble stddev=0;\n\tdouble avgdev=deviationHistory.Average();\n\tfor(i=0;i<64;i++){\n\t\tdouble d=(deviationHistory[i]-avgdev);\n\t\tstddev+=(d*d);\n\t}\n\tstddev=sqrt(stddev/64);\n\tuint32_t stddevDelay=(uint32_t)ceil(stddev*2*1000/step);\n\tif(stddevDelay<minMinDelay)\n\t\tstddevDelay=minMinDelay;\n\tif(stddevDelay>maxMinDelay)\n\t\tstddevDelay=maxMinDelay;\n\tif(stddevDelay!=minDelay){\n\t\tint32_t diff=(int32_t)(stddevDelay-minDelay);\n\t\tif(diff>0){\n\t\t\tdontDecMinDelay=100;\n\t\t}\n\t\tif(diff<-1)\n\t\t\tdiff=-1;\n\t\tif(diff>1)\n\t\t\tdiff=1;\n\t\tif((diff>0 && dontIncMinDelay==0) || (diff<0 && dontDecMinDelay==0)){\n\t\t\t//nextTimestamp+=diff*(int32_t)step;\n\t\t\tminDelay+=diff;\n\t\t\toutstandingDelayChange+=diff*60;\n\t\t\tdontChangeDelay+=32;\n\t\t\t//LOGD(\"new delay from stddev %f\", minDelay);\n\t\t\tif(diff<0){\n\t\t\t\tdontDecMinDelay+=25;\n\t\t\t}\n\t\t\tif(diff>0){\n\t\t\t\tdontIncMinDelay=25;\n\t\t\t}\n\t\t}\n\t}\n\tlastMeasuredJitter=stddev;\n\tlastMeasuredDelay=stddevDelay;\n\t//LOGV(\"stddev=%.3f, avg=%.3f, ndelay=%d, dontDec=%u\", stddev, avgdev, stddevDelay, dontDecMinDelay);\n\tif(dontChangeDelay==0){\n\t\tif(avgDelay>minDelay+0.5){\n\t\t\toutstandingDelayChange-=avgDelay>minDelay+2 ? 60 : 20;\n\t\t\tdontChangeDelay+=10;\n\t\t}else if(avgDelay<minDelay-0.3){\n\t\t\toutstandingDelayChange+=20;\n\t\t\tdontChangeDelay+=10;\n\t\t}\n\t}\n\tif(dontChangeDelay>0)\n\t\tdontChangeDelay--;\n\n\t//LOGV(\"jitter: avg delay=%d, delay=%d, late16=%.1f, dontDecMinDelay=%d\", avgDelay, delayHistory[0], avgLate16, dontDecMinDelay);\n\t/*if(!adjustingDelay) {\n\t\tif (((minDelay==1 ? (avgDelay>=3) : (avgDelay>=minDelay/2)) && delayHistory[0]>minDelay && avgLate16<=0.1 && absolutelyNoLatePackets && dontDecMinDelay<32 && min>minDelay)) {\n\t\t\tLOGI(\"jitter: need adjust\");\n\t\t\tadjustingDelay=true;\n\t\t}\n\t}else{\n\t\tif(!absolutelyNoLatePackets){\n\t\t\tLOGI(\"jitter: done adjusting because we're losing packets\");\n\t\t\tadjustingDelay=false;\n\t\t}else if(tickCount%5==0){\n\t\t\tLOGD(\"jitter: removing a packet to reduce delay\");\n\t\t\tGetInternal(NULL, 0);\n\t\t\texpectNextAtTime=0;\n\t\t\tif(GetCurrentDelay()<=minDelay || min<=minDelay){\n\t\t\t\tadjustingDelay = false;\n\t\t\t\tLOGI(\"jitter: done adjusting\");\n\t\t\t}\n\t\t}\n\t}*/\n\n\ttickCount++;\n\n}\n\n\nvoid JitterBuffer::GetAverageLateCount(double *out){\n\tdouble avgLate64=lateHistory.Average(), avgLate32=lateHistory.Average(32), avgLate16=lateHistory.Average(16);\n\tout[0]=avgLate16;\n\tout[1]=avgLate32;\n\tout[2]=avgLate64;\n}\n\n\nint JitterBuffer::GetAndResetLostPacketCount(){\n\tMutexGuard m(mutex);\n\tint r=lostPackets;\n\tlostPackets=0;\n\treturn r;\n}\n\ndouble JitterBuffer::GetLastMeasuredJitter(){\n\treturn lastMeasuredJitter;\n}\n\ndouble JitterBuffer::GetLastMeasuredDelay(){\n\treturn lastMeasuredDelay;\n}\n\ndouble JitterBuffer::GetAverageDelay(){\n\treturn avgDelay;\n}\n"
  },
  {
    "path": "libtgvoip-public/JitterBuffer.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_JITTERBUFFER_H\n#define LIBTGVOIP_JITTERBUFFER_H\n\n#include <stdlib.h>\n#include <vector>\n#include <stdio.h>\n#include \"MediaStreamItf.h\"\n#include \"BlockingQueue.h\"\n#include \"Buffers.h\"\n#include \"threading.h\"\n\n#define JITTER_SLOT_COUNT 64\n#define JITTER_SLOT_SIZE 1024\n#define JR_OK 1\n#define JR_MISSING 2\n#define JR_BUFFERING 3\n\n\nnamespace tgvoip{\nclass JitterBuffer{\npublic:\n\tJitterBuffer(MediaStreamItf* out, uint32_t step);\n\t~JitterBuffer();\n\tvoid SetMinPacketCount(uint32_t count);\n\tint GetMinPacketCount();\n\tunsigned int GetCurrentDelay();\n\tdouble GetAverageDelay();\n\tvoid Reset();\n\tvoid HandleInput(unsigned char* data, size_t len, uint32_t timestamp, bool isEC);\n\tsize_t HandleOutput(unsigned char* buffer, size_t len, int offsetInSteps, bool advance, int& playbackScaledDuration, bool& isEC);\n\tvoid Tick();\n\tvoid GetAverageLateCount(double* out);\n\tint GetAndResetLostPacketCount();\n\tdouble GetLastMeasuredJitter();\n\tdouble GetLastMeasuredDelay();\n\nprivate:\n\tstruct jitter_packet_t{\n\t\tunsigned char* buffer;\n\t\tsize_t size;\n\t\tuint32_t timestamp;\n\t\tbool isEC;\n\t\tdouble recvTimeDiff;\n\t};\n\tstatic size_t CallbackIn(unsigned char* data, size_t len, void* param);\n\tstatic size_t CallbackOut(unsigned char* data, size_t len, void* param);\n\tvoid PutInternal(jitter_packet_t* pkt, bool overwriteExisting);\n\tint GetInternal(jitter_packet_t* pkt, int offset, bool advance);\n\tvoid Advance();\n\n\tBufferPool bufferPool;\n\tMutex mutex;\n\tjitter_packet_t slots[JITTER_SLOT_COUNT];\n\tint64_t nextTimestamp=0;\n\tuint32_t step;\n\tdouble minDelay=6;\n\tuint32_t minMinDelay;\n\tuint32_t maxMinDelay;\n\tuint32_t maxUsedSlots;\n\tuint32_t lastPutTimestamp;\n\tuint32_t lossesToReset;\n\tdouble resyncThreshold;\n\tunsigned int lostCount=0;\n\tunsigned int lostSinceReset=0;\n\tunsigned int gotSinceReset=0;\n\tbool wasReset=true;\n\tbool needBuffering=true;\n\tHistoricBuffer<int, 64, double> delayHistory;\n\tHistoricBuffer<int, 64, double> lateHistory;\n\tbool adjustingDelay=false;\n\tunsigned int tickCount=0;\n\tunsigned int latePacketCount=0;\n\tunsigned int dontIncMinDelay=0;\n\tunsigned int dontDecMinDelay=0;\n\tint lostPackets=0;\n\tdouble prevRecvTime=0;\n\tdouble expectNextAtTime=0;\n\tHistoricBuffer<double, 64> deviationHistory;\n\tdouble lastMeasuredJitter=0;\n\tdouble lastMeasuredDelay=0;\n\tint outstandingDelayChange=0;\n\tunsigned int dontChangeDelay=0;\n\tdouble avgDelay=0;\n#ifdef TGVOIP_DUMP_JITTER_STATS\n\tFILE* dump;\n#endif\n};\n}\n\n#endif //LIBTGVOIP_JITTERBUFFER_H\n"
  },
  {
    "path": "libtgvoip-public/MediaStreamItf.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"logging.h\"\n#include \"MediaStreamItf.h\"\n#include \"EchoCanceller.h\"\n#include <stdint.h>\n#include <algorithm>\n#include <math.h>\n#include <assert.h>\n\nusing namespace tgvoip;\n\nvoid MediaStreamItf::SetCallback(size_t (*f)(unsigned char *, size_t, void*), void* param){\n\tcallback=f;\n\tcallbackParam=param;\n}\n\nsize_t MediaStreamItf::InvokeCallback(unsigned char *data, size_t length){\n\tif(callback)\n\t\treturn (*callback)(data, length, callbackParam);\n\treturn NULL;\n}\n\nAudioMixer::AudioMixer() : bufferPool(960*2, 16), processedQueue(16), semaphore(16, 0){\n\trunning=false;\n}\n\nAudioMixer::~AudioMixer(){\n}\n\nvoid AudioMixer::SetOutput(MediaStreamItf* output){\n\toutput->SetCallback(OutputCallback, this);\n}\n\nvoid AudioMixer::Start(){\n\tassert(!running);\n\trunning=true;\n\tthread=new Thread(new MethodPointer<AudioMixer>(&AudioMixer::RunThread, this), NULL);\n\tthread->Start();\n\tthread->SetName(\"AudioMixer\");\n}\n\nvoid AudioMixer::Stop(){\n\tif(!running){\n\t\tLOGE(\"Tried to stop AudioMixer that wasn't started\");\n\t\treturn;\n\t}\n\trunning=false;\n\tsemaphore.Release();\n\tthread->Join();\n\tdelete thread;\n\tthread=NULL;\n}\n\nvoid AudioMixer::DoCallback(unsigned char *data, size_t length){\n\t//memset(data, 0, 960*2);\n\t//LOGD(\"audio mixer callback, %d inputs\", inputs.size());\n\tif(processedQueue.Size()==0)\n\t\tsemaphore.Release(2);\n\telse\n\t\tsemaphore.Release();\n\tunsigned char* buf=processedQueue.GetBlocking();\n\tmemcpy(data, buf, 960*2);\n\tbufferPool.Reuse(buf);\n}\n\nsize_t AudioMixer::OutputCallback(unsigned char *data, size_t length, void *arg){\n\t((AudioMixer*)arg)->DoCallback(data, length);\n\treturn 960*2;\n}\n\nvoid AudioMixer::AddInput(std::shared_ptr<MediaStreamItf> input){\n\tMutexGuard m(inputsMutex);\n\tMixerInput in;\n\tin.multiplier=1;\n\tin.source=input;\n\tinputs.push_back(in);\n}\n\nvoid AudioMixer::RemoveInput(std::shared_ptr<MediaStreamItf> input){\n\tMutexGuard m(inputsMutex);\n\tfor(std::vector<MixerInput>::iterator i=inputs.begin();i!=inputs.end();++i){\n\t\tif(i->source==input){\n\t\t\tinputs.erase(i);\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nvoid AudioMixer::SetInputVolume(std::shared_ptr<MediaStreamItf> input, float volumeDB){\n\tMutexGuard m(inputsMutex);\n\tfor(std::vector<MixerInput>::iterator i=inputs.begin();i!=inputs.end();++i){\n\t\tif(i->source==input){\n\t\t\tif(volumeDB==-INFINITY)\n\t\t\t\ti->multiplier=0;\n\t\t\telse\n\t\t\t\ti->multiplier=expf(volumeDB/20.0f * logf(10.0f));\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nvoid AudioMixer::RunThread(void* arg){\n\tLOGV(\"AudioMixer thread started\");\n\twhile(running){\n\t\tsemaphore.Acquire();\n\t\tif(!running)\n\t\t\tbreak;\n\n\t\tunsigned char* data=bufferPool.Get();\n\t\t//LOGV(\"Audio mixer processing a frame\");\n\t\tif(!data){\n\t\t\tLOGE(\"AudioMixer: no buffers left\");\n\t\t\tcontinue;\n\t\t}\n\t\tMutexGuard m(inputsMutex);\n\t\tint16_t* buf=reinterpret_cast<int16_t*>(data);\n\t\tint16_t input[960];\n\t\tfloat out[960];\n\t\tmemset(out, 0, 960*4);\n\t\tint usedInputs=0;\n\t\tfor(std::vector<MixerInput>::iterator in=inputs.begin();in!=inputs.end();++in){\n\t\t\tsize_t res=in->source->InvokeCallback(reinterpret_cast<unsigned char*>(input), 960*2);\n\t\t\tif(!res || in->multiplier==0){\n\t\t\t\t//LOGV(\"AudioMixer: skipping silent packet\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tusedInputs++;\n\t\t\tfloat k=in->multiplier;\n\t\t\tif(k!=1){\n\t\t\t\tfor(size_t i=0; i<960; i++){\n\t\t\t\t\tout[i]+=(float)input[i]*k;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tfor(size_t i=0;i<960;i++){\n\t\t\t\t\tout[i]+=(float)input[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(usedInputs>0){\n\t\t\tfor(size_t i=0; i<960; i++){\n\t\t\t\tif(out[i]>32767.0f)\n\t\t\t\t\tbuf[i]=INT16_MAX;\n\t\t\t\telse if(out[i]<-32768.0f)\n\t\t\t\t\tbuf[i]=INT16_MIN;\n\t\t\t\telse\n\t\t\t\t\tbuf[i]=(int16_t)out[i];\n\t\t\t}\n\t\t}else{\n\t\t\tmemset(data, 0, 960*2);\n\t\t}\n\t\tif(echoCanceller)\n\t\t\techoCanceller->SpeakerOutCallback(data, 960*2);\n\t\tprocessedQueue.Put(data);\n\t}\n\tLOGI(\"======== audio mixer thread exiting =========\");\n}\n\nvoid AudioMixer::SetEchoCanceller(EchoCanceller *aec){\n\techoCanceller=aec;\n}\n\nAudioLevelMeter::AudioLevelMeter(){\n\tabsMax=0;\n\tcount=0;\n\tcurrentLevel=0;\n\tcurrentLevelFullRange=0;\n}\n\nfloat AudioLevelMeter::GetLevel(){\n\treturn currentLevel/9.0f;\n}\n\nvoid AudioLevelMeter::Update(int16_t *samples, size_t count){\n\t// Number of bars on the indicator.\n\t// Note that the number of elements is specified because we are indexing it\n\t// in the range of 0-32\n\tconst int8_t permutation[33]={0,1,2,3,4,4,5,5,5,5,6,6,6,6,6,7,7,7,7,8,8,8,9,9,9,9,9,9,9,9,9,9,9};\n\tint16_t absValue=0;\n\tfor(unsigned int k=0;k<count;k++){\n\t\tint16_t absolute=(int16_t)abs(samples[k]);\n\t\tif (absolute>absValue)\n\t\t\tabsValue=absolute;\n\t}\n\n\tif(absValue>absMax)\n\t\tabsMax = absValue;\n\t// Update level approximately 10 times per second\n\tif (this->count++==10){\n\t\tcurrentLevelFullRange=absMax;\n\t\tthis->count=0;\n\t\t// Highest value for a int16_t is 0x7fff = 32767\n\t\t// Divide with 1000 to get in the range of 0-32 which is the range of\n\t\t// the permutation vector\n\t\tint32_t position=absMax/1000;\n\t\t// Make it less likely that the bar stays at position 0. I.e. only if\n\t\t// its in the range 0-250 (instead of 0-1000)\n\t\t/*if ((position==0) && (absMax>250)){\n\t\t\tposition=1;\n\t\t}*/\n\t\tcurrentLevel=permutation[position];\n\t\t// Decay the absolute maximum (divide by 4)\n\t\tabsMax >>= 2;\n\t}\n}\n"
  },
  {
    "path": "libtgvoip-public/MediaStreamItf.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_MEDIASTREAMINPUT_H\n#define LIBTGVOIP_MEDIASTREAMINPUT_H\n\n#include <string.h>\n#include <vector>\n#include <memory>\n#include <stdint.h>\n#include \"threading.h\"\n#include \"BlockingQueue.h\"\n#include \"Buffers.h\"\n\nnamespace tgvoip{\n\n\tclass EchoCanceller;\n\nclass MediaStreamItf{\npublic:\n\tvirtual void Start()=0;\n\tvirtual void Stop()=0;\n\tvoid SetCallback(size_t (*f)(unsigned char*, size_t, void*), void* param);\n\n//protected:\n\tsize_t InvokeCallback(unsigned char* data, size_t length);\n\nprivate:\n\tsize_t (*callback)(unsigned char*, size_t, void*);\n\tvoid* callbackParam;\n};\n\n\tclass AudioMixer : public MediaStreamItf{\n\tpublic:\n\t\tAudioMixer();\n\t\tvirtual ~AudioMixer();\n\t\tvoid SetOutput(MediaStreamItf* output);\n\t\tvirtual void Start();\n\t\tvirtual void Stop();\n\t\tvoid AddInput(std::shared_ptr<MediaStreamItf> input);\n\t\tvoid RemoveInput(std::shared_ptr<MediaStreamItf> input);\n\t\tvoid SetInputVolume(std::shared_ptr<MediaStreamItf> input, float volumeDB);\n\t\tvoid SetEchoCanceller(EchoCanceller* aec);\n\tprivate:\n\t\tvoid RunThread(void* arg);\n\t\tstruct MixerInput{\n\t\t\tstd::shared_ptr<MediaStreamItf> source;\n\t\t\tfloat multiplier;\n\t\t};\n\t\tMutex inputsMutex;\n\t\tvoid DoCallback(unsigned char* data, size_t length);\n\t\tstatic size_t OutputCallback(unsigned char* data, size_t length, void* arg);\n\t\tstd::vector<MixerInput> inputs;\n\t\tThread* thread;\n\t\tBufferPool bufferPool;\n\t\tBlockingQueue<unsigned char*> processedQueue;\n\t\tSemaphore semaphore;\n\t\tEchoCanceller* echoCanceller;\n\t\tbool running;\n\t};\n\n\tclass CallbackWrapper : public MediaStreamItf{\n\tpublic:\n\t\tCallbackWrapper(){};\n\t\tvirtual ~CallbackWrapper(){};\n\t\tvirtual void Start(){};\n\t\tvirtual void Stop(){};\n\n\t};\n\n\tclass AudioLevelMeter{\n\tpublic:\n\t\tAudioLevelMeter();\n\t\tfloat GetLevel();\n\t\tvoid Update(int16_t* samples, size_t count);\n\tprivate:\n\t\tint16_t absMax;\n\t\tint16_t count;\n\t\tint8_t currentLevel;\n\t\tint16_t currentLevelFullRange;\n\t};\n};\n\n\n#endif //LIBTGVOIP_MEDIASTREAMINPUT_H\n"
  },
  {
    "path": "libtgvoip-public/MessageThread.cpp",
    "content": "//\n// Created by Grishka on 17.06.2018.\n//\n\n#include <assert.h>\n#include <time.h>\n#include <math.h>\n#include <float.h>\n#include <stdint.h>\n\n#ifndef _WIN32\n#include <sys/time.h>\n#endif\n\n#include \"MessageThread.h\"\n#include \"VoIPController.h\"\n#include \"logging.h\"\n\nusing namespace tgvoip;\n\nMessageThread::MessageThread() : Thread(new MethodPointer<MessageThread>(&MessageThread::Run, this), NULL){\n\n\tSetName(\"MessageThread\");\n\n#ifdef _WIN32\n#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP\n\tevent=CreateEvent(NULL, false, false, NULL);\n#else\n\tevent=CreateEventEx(NULL, NULL, 0, EVENT_ALL_ACCESS);\n#endif\n#else\n\tpthread_cond_init(&cond, NULL);\n#endif\n}\n\nMessageThread::~MessageThread(){\n\tStop();\n#ifdef _WIN32\n\tCloseHandle(event);\n#else\n\tpthread_cond_destroy(&cond);\n#endif\n}\n\nvoid MessageThread::Stop(){\n\tif(running){\n\t\trunning=false;\n#ifdef _WIN32\n\t\tSetEvent(event);\n#else\n\t\tpthread_cond_signal(&cond);\n#endif\n\t\tJoin();\n\t}\n}\n\nvoid MessageThread::Run(void* arg){\n\tqueueMutex.Lock();\n\twhile(running){\n\t\tdouble currentTime=VoIPController::GetCurrentTime();\n\t\tdouble waitTimeout=queue.empty() ? DBL_MAX : (queue[0].deliverAt-currentTime);\n\t\t//LOGW(\"MessageThread wait timeout %f\", waitTimeout);\n\t\tif(waitTimeout>0.0){\n#ifdef _WIN32\n\t\t\tqueueMutex.Unlock();\n\t\t\tDWORD actualWaitTimeout=waitTimeout==DBL_MAX ? INFINITE : ((DWORD)round(waitTimeout*1000.0));\n#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP\n\t\t\tWaitForSingleObject(event, actualWaitTimeout);\n#else\n\t\t\tWaitForSingleObjectEx(event, actualWaitTimeout, false);\n#endif\n\t\t\t// we don't really care if a context switch happens here and anything gets added to the queue by another thread\n\t\t\t// since any new no-delay messages will get delivered on this iteration anyway\n\t\t\tqueueMutex.Lock();\n#else\n\t\t\tif(waitTimeout!=DBL_MAX){\n\t\t\t\tstruct timeval now;\n\t\t\t\tstruct timespec timeout;\n\t\t\t\tgettimeofday(&now, NULL);\n\t\t\t\twaitTimeout+=now.tv_sec;\n\t\t\t\twaitTimeout+=(now.tv_usec/1000000.0);\n\t\t\t\ttimeout.tv_sec=(time_t)(floor(waitTimeout));\n\t\t\t\ttimeout.tv_nsec=(long)((waitTimeout-floor(waitTimeout))*1000000000.0);\n\t\t\t\tpthread_cond_timedwait(&cond, queueMutex.NativeHandle(), &timeout);\n\t\t\t}else{\n\t\t\t\tpthread_cond_wait(&cond, queueMutex.NativeHandle());\n\t\t\t}\n#endif\n\t\t}\n\t\tcurrentTime=VoIPController::GetCurrentTime();\n\t\tstd::vector<Message> msgsToDeliverNow;\n\t\tfor(std::vector<Message>::iterator m=queue.begin();m!=queue.end();){\n\t\t\tif(m->deliverAt==0.0 || currentTime>=m->deliverAt){\n\t\t\t\tmsgsToDeliverNow.push_back(*m);\n\t\t\t\tm=queue.erase(m);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t++m;\n\t\t}\n\n\t\tfor(Message& m:msgsToDeliverNow){\n\t\t\t//LOGI(\"MessageThread delivering %u\", m.msg);\n\t\t\tcancelCurrent=false;\n\t\t\tif(m.deliverAt==0.0)\n\t\t\t\tm.deliverAt=VoIPController::GetCurrentTime();\n\t\t\tif(m.func!=nullptr){\n\t\t\t\tm.func();\n\t\t\t}\n\t\t\tif(!cancelCurrent && m.interval>0.0){\n\t\t\t\tm.deliverAt+=m.interval;\n\t\t\t\tInsertMessageInternal(m);\n\t\t\t}\n\t\t}\n\n\t}\n\tqueueMutex.Unlock();\n}\n\nuint32_t MessageThread::Post(std::function<void()> func, double delay, double interval){\n\tassert(delay>=0);\n\t//LOGI(\"MessageThread post [function] delay %f\", delay);\n\tif(!IsCurrent()){\n\t\tqueueMutex.Lock();\n\t}\n\tdouble currentTime=VoIPController::GetCurrentTime();\n\tMessage m{lastMessageID++, delay==0.0 ? 0.0 : (currentTime+delay), interval, func};\n\tInsertMessageInternal(m);\n\tif(!IsCurrent()){\n#ifdef _WIN32\n\t\tSetEvent(event);\n#else\n\t\tpthread_cond_signal(&cond);\n#endif\n\t\tqueueMutex.Unlock();\n\t}\n\treturn m.id;\n}\n\nvoid MessageThread::InsertMessageInternal(MessageThread::Message &m){\n\tif(queue.empty()){\n\t\tqueue.push_back(m);\n\t}else{\n\t\tif(queue[0].deliverAt>m.deliverAt){\n\t\t\tqueue.insert(queue.begin(), m);\n\t\t}else{\n\t\t\tstd::vector<Message>::iterator insertAfter=queue.begin();\n\t\t\tfor(; insertAfter!=queue.end(); ++insertAfter){\n\t\t\t\tstd::vector<Message>::iterator next=std::next(insertAfter);\n\t\t\t\tif(next==queue.end() || (next->deliverAt>m.deliverAt && insertAfter->deliverAt<=m.deliverAt)){\n\t\t\t\t\tqueue.insert(next, m);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid MessageThread::Cancel(uint32_t id){\n\tif(!IsCurrent()){\n\t\tqueueMutex.Lock();\n\t}\n\n\tfor(std::vector<Message>::iterator m=queue.begin();m!=queue.end();){\n\t\tif(m->id==id){\n\t\t\tm=queue.erase(m);\n\t\t}else{\n\t\t\t++m;\n\t\t}\n\t}\n\n\tif(!IsCurrent()){\n\t\tqueueMutex.Unlock();\n\t}\n}\n\nvoid MessageThread::CancelSelf(){\n\tassert(IsCurrent());\n\tcancelCurrent=true;\n}\n"
  },
  {
    "path": "libtgvoip-public/MessageThread.h",
    "content": "//\n// Created by Grishka on 17.06.2018.\n//\n\n#ifndef LIBTGVOIP_MESSAGETHREAD_H\n#define LIBTGVOIP_MESSAGETHREAD_H\n\n#include \"threading.h\"\n#include <vector>\n#include <functional>\n\nnamespace tgvoip{\n\tclass MessageThread : public Thread{\n\tpublic:\n\t\tMessageThread();\n\t\tvirtual ~MessageThread();\n\t\tuint32_t Post(std::function<void()> func, double delay=0, double interval=0);\n\t\tvoid Cancel(uint32_t id);\n\t\tvoid CancelSelf();\n\t\tvoid Stop();\n\n\t\tenum{\n\t\t\tINVALID_ID=0\n\t\t};\n\tprivate:\n\t\tstruct Message{\n\t\t\tuint32_t id;\n\t\t\tdouble deliverAt;\n\t\t\tdouble interval;\n\t\t\tstd::function<void()> func;\n\t\t};\n\n\t\tvoid Run(void* arg);\n\t\tvoid InsertMessageInternal(Message& m);\n\n\t\tbool running=true;\n\t\tstd::vector<Message> queue;\n\t\tMutex queueMutex;\n\t\tuint32_t lastMessageID=1;\n\t\tbool cancelCurrent=false;\n\n#ifdef _WIN32\n\t\tHANDLE event;\n#else\n\t\tpthread_cond_t cond;\n#endif\n\t};\n}\n\n#endif //LIBTGVOIP_MESSAGETHREAD_H\n"
  },
  {
    "path": "libtgvoip-public/NetworkSocket.cpp",
    "content": "//\n// Created by Grishka on 29.03.17.\n//\n\n#include \"NetworkSocket.h\"\n#include <stdexcept>\n#include <algorithm>\n#include <stdlib.h>\n#include <string.h>\n#if defined(_WIN32)\n#include \"os/windows/NetworkSocketWinsock.h\"\n#include <winsock2.h>\n#else\n#include \"os/posix/NetworkSocketPosix.h\"\n#endif\n#include \"logging.h\"\n#include \"VoIPServerConfig.h\"\n#include \"VoIPController.h\"\n#include \"Buffers.h\"\n\n#define MIN_UDP_PORT 16384\n#define MAX_UDP_PORT 32768\n\nusing namespace tgvoip;\n\nNetworkSocket::NetworkSocket(NetworkProtocol protocol) : protocol(protocol){\n\tipv6Timeout=ServerConfig::GetSharedInstance()->GetDouble(\"nat64_fallback_timeout\", 3);\n\tfailed=false;\n\n\tproxyAddress=NULL;\n\tproxyPort=0;\n\tproxyUsername=NULL;\n\tproxyPassword=NULL;\n}\n\nNetworkSocket::~NetworkSocket(){\n\n}\n\nstd::string NetworkSocket::GetLocalInterfaceInfo(IPv4Address *inet4addr, IPv6Address *inet6addr){\n\tstd::string r=\"not implemented\";\n\treturn r;\n}\n\nuint16_t NetworkSocket::GenerateLocalPort(){\n\treturn (uint16_t) ((rand()%(MAX_UDP_PORT-MIN_UDP_PORT))+MIN_UDP_PORT);\n}\n\nvoid NetworkSocket::SetMaxPriority(){\n}\n\nbool NetworkSocket::IsFailed(){\n\treturn failed;\n}\n\nNetworkSocket *NetworkSocket::Create(NetworkProtocol protocol){\n#ifndef _WIN32\n\treturn new NetworkSocketPosix(protocol);\n#else\n\treturn new NetworkSocketWinsock(protocol);\n#endif\n}\n\nIPv4Address *NetworkSocket::ResolveDomainName(std::string name){\n#ifndef _WIN32\n\treturn NetworkSocketPosix::ResolveDomainName(name);\n#else\n\treturn NetworkSocketWinsock::ResolveDomainName(name);\n#endif\n}\n\nvoid NetworkSocket::SetSocksProxy(IPv4Address *addr, uint16_t port, char *username, char *password){\n\tproxyAddress=addr;\n\tproxyPort=port;\n\tproxyUsername=username;\n\tproxyPassword=password;\n}\n\nvoid NetworkSocket::GenerateTCPO2States(unsigned char* buffer, TCPO2State* recvState, TCPO2State* sendState){\n\tmemset(recvState, 0, sizeof(TCPO2State));\n\tmemset(sendState, 0, sizeof(TCPO2State));\n\tunsigned char nonce[64];\n\tuint32_t *first = reinterpret_cast<uint32_t*>(nonce), *second = first + 1;\n\tuint32_t first1 = 0x44414548U, first2 = 0x54534f50U, first3 = 0x20544547U, first4 = 0x20544547U, first5 = 0xeeeeeeeeU;\n\tuint32_t second1 = 0;\n\tdo {\n\t\tVoIPController::crypto.rand_bytes(nonce, sizeof(nonce));\n\t} while (*first == first1 || *first == first2 || *first == first3 || *first == first4 || *first == first5 || *second == second1 || *reinterpret_cast<unsigned char*>(nonce) == 0xef);\n\n\t// prepare encryption key/iv\n\tmemcpy(sendState->key, nonce + 8, 32);\n\tmemcpy(sendState->iv, nonce + 8 + 32, 16);\n\n\t// prepare decryption key/iv\n\tchar reversed[48];\n\tmemcpy(reversed, nonce + 8, sizeof(reversed));\n\tstd::reverse(reversed, reversed + sizeof(reversed));\n\tmemcpy(recvState->key, reversed, 32);\n\tmemcpy(recvState->iv, reversed + 32, 16);\n\n\t// write protocol identifier\n\t*reinterpret_cast<uint32_t*>(nonce + 56) = 0xefefefefU;\n\tmemcpy(buffer, nonce, 56);\n\tEncryptForTCPO2(nonce, sizeof(nonce), sendState);\n\tmemcpy(buffer+56, nonce+56, 8);\n}\n\nvoid NetworkSocket::EncryptForTCPO2(unsigned char *buffer, size_t len, TCPO2State *state){\n\tVoIPController::crypto.aes_ctr_encrypt(buffer, len, state->key, state->iv, state->ecount, &state->num);\n}\n\nsize_t NetworkSocket::Receive(unsigned char *buffer, size_t len){\n\tNetworkPacket pkt={0};\n\tpkt.data=buffer;\n\tpkt.length=len;\n\tReceive(&pkt);\n\treturn pkt.length;\n}\n\nsize_t NetworkSocket::Send(unsigned char *buffer, size_t len){\n\tNetworkPacket pkt={0};\n\tpkt.data=buffer;\n\tpkt.length=len;\n\tSend(&pkt);\n\treturn pkt.length;\n}\n\nbool NetworkAddress::operator==(const NetworkAddress &other){\n\tIPv4Address* self4=dynamic_cast<IPv4Address*>(this);\n\tIPv4Address* other4=dynamic_cast<IPv4Address*>((NetworkAddress*)&other);\n\tif(self4 && other4){\n\t\treturn self4->GetAddress()==other4->GetAddress();\n\t}\n\tIPv6Address* self6=dynamic_cast<IPv6Address*>(this);\n\tIPv6Address* other6=dynamic_cast<IPv6Address*>((NetworkAddress*)&other);\n\tif(self6 && other6){\n\t\treturn memcmp(self6->GetAddress(), other6->GetAddress(), 16)==0;\n\t}\n\treturn false;\n}\n\nbool NetworkAddress::operator!=(const NetworkAddress &other){\n\treturn !(*this == other);\n}\n\nIPv4Address::IPv4Address(std::string addr){\n#ifndef _WIN32\n\tthis->address=NetworkSocketPosix::StringToV4Address(addr);\n#else\n\tthis->address=NetworkSocketWinsock::StringToV4Address(addr);\n#endif\n}\n\nIPv4Address::IPv4Address(uint32_t addr){\n\tthis->address=addr;\n}\n\nIPv4Address::IPv4Address(){\n\tthis->address=0;\n}\n\n\nstd::string IPv4Address::ToString(){\n#ifndef _WIN32\n\treturn NetworkSocketPosix::V4AddressToString(address);\n#else\n\treturn NetworkSocketWinsock::V4AddressToString(address);\n#endif\n}\n\n/*sockaddr &IPv4Address::ToSockAddr(uint16_t port){\n\tsockaddr_in sa;\n\tsa.sin_family=AF_INET;\n\tsa.sin_addr=addr;\n\tsa.sin_port=port;\n\treturn *((sockaddr *) &sa);\n}*/\n\nuint32_t IPv4Address::GetAddress(){\n\treturn address;\n}\n\nbool IPv4Address::IsEmpty(){\n\treturn address==0;\n}\n\nIPv6Address::IPv6Address(std::string addr){\n#ifndef _WIN32\n\tNetworkSocketPosix::StringToV6Address(addr, this->address);\n#else\n\tNetworkSocketWinsock::StringToV6Address(addr, this->address);\n#endif\n}\n\nIPv6Address::IPv6Address(const uint8_t* addr){\n\tmemcpy(address, addr, 16);\n}\n\nIPv6Address::IPv6Address(){\n\tmemset(address, 0, 16);\n}\n\nstd::string IPv6Address::ToString(){\n#ifndef _WIN32\n\treturn NetworkSocketPosix::V6AddressToString(address);\n#else\n\treturn NetworkSocketWinsock::V6AddressToString(address);\n#endif\n}\n\nbool IPv6Address::IsEmpty(){\n\tuint64_t* a=reinterpret_cast<uint64_t*>(address);\n\treturn a[0]==0LL && a[1]==0LL;\n}\n\n/*sockaddr &IPv6Address::ToSockAddr(uint16_t port){\n\tsockaddr_in6 sa;\n\tsa.sin6_family=AF_INET6;\n\tsa.sin6_addr=addr;\n\tsa.sin6_port=port;\n\treturn *((sockaddr *) &sa);\n}*/\n\nconst uint8_t *IPv6Address::GetAddress(){\n\treturn address;\n}\n\nbool NetworkSocket::Select(std::vector<NetworkSocket *> &readFds, std::vector<NetworkSocket *> &errorFds, SocketSelectCanceller *canceller){\n#ifndef _WIN32\n\treturn NetworkSocketPosix::Select(readFds, errorFds, canceller);\n#else\n\treturn NetworkSocketWinsock::Select(readFds, errorFds, canceller);\n#endif\n}\n\nSocketSelectCanceller::~SocketSelectCanceller(){\n\n}\n\nSocketSelectCanceller *SocketSelectCanceller::Create(){\n#ifndef _WIN32\n\treturn new SocketSelectCancellerPosix();\n#else\n\treturn new SocketSelectCancellerWin32();\n#endif\n}\n\n\n\nNetworkSocketTCPObfuscated::NetworkSocketTCPObfuscated(NetworkSocket *wrapped) : NetworkSocketWrapper(PROTO_TCP){\n\tthis->wrapped=wrapped;\n}\n\nNetworkSocketTCPObfuscated::~NetworkSocketTCPObfuscated(){\n\tif(wrapped)\n\t\tdelete wrapped;\n}\n\nNetworkSocket *NetworkSocketTCPObfuscated::GetWrapped(){\n\treturn wrapped;\n}\n\nvoid NetworkSocketTCPObfuscated::InitConnection(){\n\tunsigned char buf[64];\n\tGenerateTCPO2States(buf, &recvState, &sendState);\n\twrapped->Send(buf, 64);\n}\n\nvoid NetworkSocketTCPObfuscated::Send(NetworkPacket *packet){\n\tBufferOutputStream os(packet->length+4);\n\tsize_t len=packet->length/4;\n\tif(len<0x7F){\n\t\tos.WriteByte((unsigned char)len);\n\t}else{\n\t\tos.WriteByte(0x7F);\n\t\tos.WriteByte((unsigned char)(len & 0xFF));\n\t\tos.WriteByte((unsigned char)((len >> 8) & 0xFF));\n\t\tos.WriteByte((unsigned char)((len >> 16) & 0xFF));\n\t}\n\tos.WriteBytes(packet->data, packet->length);\n\tEncryptForTCPO2(os.GetBuffer(), os.GetLength(), &sendState);\n\twrapped->Send(os.GetBuffer(), os.GetLength());\n\t//LOGD(\"Sent %u bytes\", os.GetLength());\n}\n\nvoid NetworkSocketTCPObfuscated::Receive(NetworkPacket *packet){\n\tunsigned char len1;\n\tsize_t packetLen=0;\n\tsize_t offset=0;\n\tsize_t len;\n\tlen=wrapped->Receive(&len1, 1);\n\tif(len<=0){\n\t\tpacket->length=0;\n\t\treturn;\n\t}\n\tEncryptForTCPO2(&len1, 1, &recvState);\n\n\tif(len1<0x7F){\n\t\tpacketLen=(size_t)len1*4;\n\t}else{\n\t\tunsigned char len2[3];\n\t\tlen=wrapped->Receive(len2, 3);\n\t\tif(len<=0){\n\t\t\tpacket->length=0;\n\t\t\treturn;\n\t\t}\n\t\tEncryptForTCPO2(len2, 3, &recvState);\n\t\tpacketLen=((size_t)len2[0] | ((size_t)len2[1] << 8) | ((size_t)len2[2] << 16))*4;\n\t}\n\n\tif(packetLen>packet->length){\n\t\tLOGW(\"packet too big to fit into buffer (%u vs %u)\", (unsigned int)packetLen, (unsigned int)packet->length);\n\t\tpacket->length=0;\n\t\treturn;\n\t}\n\n\twhile(offset<packetLen){\n\t\tlen=wrapped->Receive(packet->data+offset, packetLen-offset);\n\t\tif(len<=0){\n\t\t\tpacket->length=0;\n\t\t\treturn;\n\t\t}\n\t\toffset+=len;\n\t}\n\tEncryptForTCPO2(packet->data, packetLen, &recvState);\n\t//packet->address=&itr->address;\n\tpacket->length=packetLen;\n\t//packet->port=itr->port;\n\tpacket->protocol=PROTO_TCP;\n\tpacket->address=wrapped->GetConnectedAddress();\n\tpacket->port=wrapped->GetConnectedPort();\n}\n\nvoid NetworkSocketTCPObfuscated::Open(){\n\n}\n\nvoid NetworkSocketTCPObfuscated::Close(){\n\twrapped->Close();\n}\n\nvoid NetworkSocketTCPObfuscated::Connect(NetworkAddress *address, uint16_t port){\n\n}\n\nbool NetworkSocketTCPObfuscated::IsFailed(){\n\treturn wrapped->IsFailed();\n}\n\nNetworkSocketSOCKS5Proxy::NetworkSocketSOCKS5Proxy(NetworkSocket *tcp, NetworkSocket *udp, std::string username, std::string password) : NetworkSocketWrapper(udp ? PROTO_UDP : PROTO_TCP){\n\tthis->tcp=tcp;\n\tthis->udp=udp;\n\tthis->username=username;\n\tthis->password=password;\n\tconnectedAddress=NULL;\n}\n\nNetworkSocketSOCKS5Proxy::~NetworkSocketSOCKS5Proxy(){\n\tdelete tcp;\n\tif(connectedAddress)\n\t\tdelete connectedAddress;\n}\n\nvoid NetworkSocketSOCKS5Proxy::Send(NetworkPacket *packet){\n\tif(protocol==PROTO_TCP){\n\t\ttcp->Send(packet);\n\t}else if(protocol==PROTO_UDP){\n\t\tunsigned char buf[1500];\n\t\tBufferOutputStream out(buf, sizeof(buf));\n\t\tout.WriteInt16(0); // RSV\n\t\tout.WriteByte(0); // FRAG\n\t\tIPv4Address* v4=dynamic_cast<IPv4Address*>(packet->address);\n\t\tIPv6Address* v6=dynamic_cast<IPv6Address*>(packet->address);\n\t\tif(v4){\n\t\t\tout.WriteByte(1); // ATYP (IPv4)\n\t\t\tout.WriteInt32(v4->GetAddress());\n\t\t}else{\n\t\t\tout.WriteByte(4); // ATYP (IPv6)\n\t\t\tout.WriteBytes((unsigned char *) v6->GetAddress(), 16);\n\t\t}\n\t\tout.WriteInt16(htons(packet->port));\n\t\tout.WriteBytes(packet->data, packet->length);\n\t\tNetworkPacket p={0};\n\t\tp.data=buf;\n\t\tp.length=out.GetLength();\n\t\tp.address=connectedAddress;\n\t\tp.port=connectedPort;\n\t\tp.protocol=PROTO_UDP;\n\t\tudp->Send(&p);\n\t}\n}\n\nvoid NetworkSocketSOCKS5Proxy::Receive(NetworkPacket *packet){\n\tif(protocol==PROTO_TCP){\n\t\ttcp->Receive(packet);\n\t}else if(protocol==PROTO_UDP){\n\t\tunsigned char buf[1500];\n\t\tNetworkPacket p={0};\n\t\tp.data=buf;\n\t\tp.length=sizeof(buf);\n\t\tudp->Receive(&p);\n\t\tif(p.length && p.address && *p.address==*connectedAddress && p.port==connectedPort){\n\t\t\tBufferInputStream in(buf, p.length);\n\t\t\tin.ReadInt16(); // RSV\n\t\t\tin.ReadByte(); // FRAG\n\t\t\tunsigned char atyp=in.ReadByte();\n\t\t\tif(atyp==1){ // IPv4\n\t\t\t\tlastRecvdV4=IPv4Address((uint32_t) in.ReadInt32());\n\t\t\t\tpacket->address=&lastRecvdV4;\n\t\t\t}else if(atyp==4){ // IPv6\n\t\t\t\tunsigned char addr[16];\n\t\t\t\tin.ReadBytes(addr, 16);\n\t\t\t\tlastRecvdV6=IPv6Address(addr);\n\t\t\t\tpacket->address=&lastRecvdV6;\n\t\t\t}\n\t\t\tpacket->port=ntohs(in.ReadInt16());\n\t\t\tif(packet->length>=in.Remaining()){\n\t\t\t\tpacket->length=in.Remaining();\n\t\t\t\tin.ReadBytes(packet->data, in.Remaining());\n\t\t\t}else{\n\t\t\t\tpacket->length=0;\n\t\t\t\tLOGW(\"socks5: received packet too big\");\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid NetworkSocketSOCKS5Proxy::Open(){\n\tif(protocol==PROTO_UDP){\n\t\tunsigned char buf[1024];\n\t\tBufferOutputStream out(buf, sizeof(buf));\n\t\tout.WriteByte(5); // VER\n\t\tout.WriteByte(3); // CMD (UDP ASSOCIATE)\n\t\tout.WriteByte(0); // RSV\n\t\tout.WriteByte(1); // ATYP (IPv4)\n\t\tout.WriteInt32(0); // DST.ADDR\n\t\tout.WriteInt16(0); // DST.PORT\n\t\ttcp->Send(buf, out.GetLength());\n\t\tsize_t l=tcp->Receive(buf, sizeof(buf));\n\t\tif(l<2 || tcp->IsFailed()){\n\t\t\tLOGW(\"socks5: udp associate failed\");\n\t\t\tfailed=true;\n\t\t\treturn;\n\t\t}\n\t\ttry{\n\t\t\tBufferInputStream in(buf, l);\n\t\t\tunsigned char ver=in.ReadByte();\n\t\t\tunsigned char rep=in.ReadByte();\n\t\t\tif(ver!=5){\n\t\t\t\tLOGW(\"socks5: udp associate: wrong ver in response\");\n\t\t\t\tfailed=true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(rep!=0){\n\t\t\t\tLOGW(\"socks5: udp associate failed with error %02X\", rep);\n\t\t\t\tfailed=true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tin.ReadByte(); // RSV\n\t\t\tunsigned char atyp=in.ReadByte();\n\t\t\tif(atyp==1){\n\t\t\t\tuint32_t addr=(uint32_t) in.ReadInt32();\n\t\t\t\tconnectedAddress=new IPv4Address(addr);\n\t\t\t}else if(atyp==3){\n\t\t\t\tunsigned char len=in.ReadByte();\n\t\t\t\tchar domain[256];\n\t\t\t\tmemset(domain, 0, sizeof(domain));\n\t\t\t\tin.ReadBytes((unsigned char*)domain, len);\n\t\t\t\tLOGD(\"address type is domain, address=%s\", domain);\n\t\t\t\tconnectedAddress=ResolveDomainName(std::string(domain));\n\t\t\t\tif(!connectedAddress){\n\t\t\t\t\tLOGW(\"socks5: failed to resolve domain name '%s'\", domain);\n\t\t\t\t\tfailed=true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}else if(atyp==4){\n\t\t\t\tunsigned char addr[16];\n\t\t\t\tin.ReadBytes(addr, 16);\n\t\t\t\tconnectedAddress=new IPv6Address(addr);\n\t\t\t}else{\n\t\t\t\tLOGW(\"socks5: unknown address type %d\", atyp);\n\t\t\t\tfailed=true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconnectedPort=(uint16_t)ntohs(in.ReadInt16());\n\t\t\ttcp->SetTimeouts(0, 0);\n\t\t\tLOGV(\"socks5: udp associate successful, given endpoint %s:%d\", connectedAddress->ToString().c_str(), connectedPort);\n\t\t}catch(std::out_of_range& x){\n\t\t\tLOGW(\"socks5: udp associate response parse failed\");\n\t\t\tfailed=true;\n\t\t}\n\t}\n}\n\nvoid NetworkSocketSOCKS5Proxy::Close(){\n\ttcp->Close();\n}\n\nvoid NetworkSocketSOCKS5Proxy::Connect(NetworkAddress *address, uint16_t port){\n\tif(!failed){\n\t\ttcp->SetTimeouts(1, 2);\n\t\tunsigned char buf[1024];\n\t\tBufferOutputStream out(buf, sizeof(buf));\n\t\tout.WriteByte(5); // VER\n\t\tout.WriteByte(1); // CMD (CONNECT)\n\t\tout.WriteByte(0); // RSV\n\t\tIPv4Address* v4=dynamic_cast<IPv4Address*>(address);\n\t\tIPv6Address* v6=dynamic_cast<IPv6Address*>(address);\n\t\tif(v4){\n\t\t\tout.WriteByte(1); // ATYP (IPv4)\n\t\t\tout.WriteInt32(v4->GetAddress());\n\t\t}else if(v6){\n\t\t\tout.WriteByte(4); // ATYP (IPv6)\n\t\t\tout.WriteBytes((unsigned char*)v6->GetAddress(), 16);\n\t\t}else{\n\t\t\tLOGW(\"socks5: unknown address type\");\n\t\t\tfailed=true;\n\t\t\treturn;\n\t\t}\n\t\tout.WriteInt16(htons(port)); // DST.PORT\n\t\ttcp->Send(buf, out.GetLength());\n\t\tsize_t l=tcp->Receive(buf, sizeof(buf));\n\t\tif(l<2 || tcp->IsFailed()){\n\t\t\tLOGW(\"socks5: connect failed\")\n\t\t\tfailed=true;\n\t\t\treturn;\n\t\t}\n\t\tBufferInputStream in(buf, l);\n\t\tunsigned char ver=in.ReadByte();\n\t\tif(ver!=5){\n\t\t\tLOGW(\"socks5: connect: wrong ver in response\");\n\t\t\tfailed=true;\n\t\t\treturn;\n\t\t}\n\t\tunsigned char rep=in.ReadByte();\n\t\tif(rep!=0){\n\t\t\tLOGW(\"socks5: connect: failed with error %02X\", rep);\n\t\t\tfailed=true;\n\t\t\treturn;\n\t\t}\n\t\tconnectedAddress=v4 ? (NetworkAddress*)new IPv4Address(*v4) : (NetworkAddress*)new IPv6Address(*v6);\n\t\tconnectedPort=port;\n\t\tLOGV(\"socks5: connect succeeded\");\n\t\ttcp->SetTimeouts(5, 60);\n\t}\n}\n\nNetworkSocket *NetworkSocketSOCKS5Proxy::GetWrapped(){\n\treturn protocol==PROTO_TCP ? tcp : udp;\n}\n\nvoid NetworkSocketSOCKS5Proxy::InitConnection(){\n\tunsigned char buf[1024];\n\ttcp->SetTimeouts(1, 2);\n\tBufferOutputStream p(buf, sizeof(buf));\n\tp.WriteByte(5); // VER\n\tif(!username.empty()){\n\t\tp.WriteByte(2); // NMETHODS\n\t\tp.WriteByte(0); // no auth\n\t\tp.WriteByte(2); // user/pass\n\t}else{\n\t\tp.WriteByte(1); // NMETHODS\n\t\tp.WriteByte(0); // no auth\n\t}\n\ttcp->Send(buf, p.GetLength());\n\tsize_t l=tcp->Receive(buf, sizeof(buf));\n\tif(l<2 || tcp->IsFailed()){\n\t\tfailed=true;\n\t\treturn;\n\t}\n\tBufferInputStream in(buf, l);\n\tunsigned char ver=in.ReadByte();\n\tunsigned char chosenMethod=in.ReadByte();\n\tLOGV(\"socks5: VER=%02X, METHOD=%02X\", ver, chosenMethod);\n\tif(ver!=5){\n\t\tLOGW(\"socks5: incorrect VER in response\");\n\t\tfailed=true;\n\t\treturn;\n\t}\n\tif(chosenMethod==0){\n\t\t// connected, no further auth needed\n\t}else if(chosenMethod==2 && !username.empty()){\n\t\tp.Reset();\n\t\tp.WriteByte(1); // VER\n\t\tp.WriteByte((unsigned char)(username.length()>255 ? 255 : username.length())); // ULEN\n\t\tp.WriteBytes((unsigned char*)username.c_str(), username.length()>255 ? 255 : username.length()); // UNAME\n\t\tp.WriteByte((unsigned char)(password.length()>255 ? 255 : password.length())); // PLEN\n\t\tp.WriteBytes((unsigned char*)password.c_str(), password.length()>255 ? 255 : password.length()); // PASSWD\n\t\ttcp->Send(buf, p.GetLength());\n\t\tl=tcp->Receive(buf, sizeof(buf));\n\t\tif(l<2 || tcp->IsFailed()){\n\t\t\tfailed=true;\n\t\t\treturn;\n\t\t}\n\t\tin=BufferInputStream(buf, l);\n\t\tver=in.ReadByte();\n\t\tunsigned char status=in.ReadByte();\n\t\tLOGV(\"socks5: auth response VER=%02X, STATUS=%02X\", ver, status);\n\t\tif(ver!=1){\n\t\t\tLOGW(\"socks5: auth response VER is incorrect\");\n\t\t\tfailed=true;\n\t\t\treturn;\n\t\t}\n\t\tif(status!=0){\n\t\t\tLOGW(\"socks5: username/password auth failed\");\n\t\t\tfailed=true;\n\t\t\treturn;\n\t\t}\n\t\tLOGV(\"socks5: authentication succeeded\");\n\t}else{\n\t\tLOGW(\"socks5: unsupported auth method\");\n\t\tfailed=true;\n\t\treturn;\n\t}\n\ttcp->SetTimeouts(5, 60);\n}\n\nbool NetworkSocketSOCKS5Proxy::IsFailed(){\n\treturn NetworkSocket::IsFailed() || tcp->IsFailed();\n}\n\nNetworkAddress *NetworkSocketSOCKS5Proxy::GetConnectedAddress(){\n\treturn connectedAddress;\n}\n\nuint16_t NetworkSocketSOCKS5Proxy::GetConnectedPort(){\n\treturn connectedPort;\n}\n"
  },
  {
    "path": "libtgvoip-public/NetworkSocket.h",
    "content": "//\n// Created by Grishka on 29.03.17.\n//\n\n#ifndef LIBTGVOIP_NETWORKSOCKET_H\n#define LIBTGVOIP_NETWORKSOCKET_H\n\n#include <stdint.h>\n#include <string>\n#include <vector>\n\nnamespace tgvoip {\n\n\tenum NetworkProtocol{\n\t\tPROTO_UDP=0,\n\t\tPROTO_TCP\n\t};\n\n\tstruct TCPO2State{\n\t\tunsigned char key[32];\n\t\tunsigned char iv[16];\n\t\tunsigned char ecount[16];\n\t\tuint32_t num;\n\t};\n\n\tclass NetworkAddress{\n\tpublic:\n\t\tvirtual std::string ToString()=0;\n\t\tbool operator==(const NetworkAddress& other);\n\t\tbool operator!=(const NetworkAddress& other);\n\t\tvirtual ~NetworkAddress()=default;\n\t\tvirtual bool IsEmpty()=0;\n\t};\n\n\tclass IPv4Address : public NetworkAddress{\n\tpublic:\n\t\tIPv4Address(std::string addr);\n\t\tIPv4Address(uint32_t addr);\n\t\tIPv4Address();\n\t\tvirtual std::string ToString();\n\t\t//virtual sockaddr& ToSockAddr(uint16_t port);\n\t\tuint32_t GetAddress();\n\t\tvirtual bool IsEmpty();\n\tprivate:\n\t\tuint32_t address;\n\t};\n\n\tclass IPv6Address : public NetworkAddress{\n\tpublic:\n\t\tIPv6Address(std::string addr);\n\t\tIPv6Address(const uint8_t* addr);\n\t\tIPv6Address();\n\t\tvirtual std::string ToString();\n\t\t//virtual sockaddr& ToSockAddr(uint16_t port);\n\t\tconst uint8_t* GetAddress();\n\t\tvirtual bool IsEmpty();\n\tprivate:\n\t\tuint8_t address[16];\n\t};\n\n\tstruct NetworkPacket{\n\t\tunsigned char* data;\n\t\tsize_t length;\n\t\tNetworkAddress* address;\n\t\tuint16_t port;\n\t\tNetworkProtocol protocol;\n\t};\n\ttypedef struct NetworkPacket NetworkPacket;\n\n\tclass SocketSelectCanceller{\n\tpublic:\n\t\tvirtual ~SocketSelectCanceller();\n\t\tvirtual void CancelSelect()=0;\n\t\tstatic SocketSelectCanceller* Create();\n\t};\n\n\tclass NetworkSocket{\n\tpublic:\n\t\tNetworkSocket(NetworkProtocol protocol);\n\t\tvirtual ~NetworkSocket();\n\t\tvirtual void Send(NetworkPacket* packet)=0;\n\t\tvirtual void Receive(NetworkPacket* packet)=0;\n\t\tsize_t Receive(unsigned char* buffer, size_t len);\n\t\tsize_t Send(unsigned char* buffer, size_t len);\n\t\tvirtual void Open()=0;\n\t\tvirtual void Close()=0;\n\t\tvirtual uint16_t GetLocalPort(){ return 0; };\n\t\tvirtual void Connect(NetworkAddress* address, uint16_t port)=0;\n\t\tvirtual std::string GetLocalInterfaceInfo(IPv4Address* inet4addr, IPv6Address* inet6addr);\n\t\tvirtual void OnActiveInterfaceChanged(){};\n\t\tvirtual NetworkAddress* GetConnectedAddress(){ return NULL; };\n\t\tvirtual uint16_t GetConnectedPort(){ return 0; };\n\t\tvirtual void SetTimeouts(int sendTimeout, int recvTimeout){};\n\n\t\tvirtual bool IsFailed();\n\t\tvoid SetSocksProxy(IPv4Address* addr, uint16_t port, char* username, char* password);\n\n\t\tstatic NetworkSocket* Create(NetworkProtocol protocol);\n\t\tstatic IPv4Address* ResolveDomainName(std::string name);\n\t\tstatic bool Select(std::vector<NetworkSocket*>& readFds, std::vector<NetworkSocket*>& errorFds, SocketSelectCanceller* canceller);\n\n\tprotected:\n\t\tvirtual uint16_t GenerateLocalPort();\n\t\tvirtual void SetMaxPriority();\n\t\tstatic void GenerateTCPO2States(unsigned char* buffer, TCPO2State* recvState, TCPO2State* sendState);\n\t\tstatic void EncryptForTCPO2(unsigned char* buffer, size_t len, TCPO2State* state);\n\t\tdouble ipv6Timeout;\n\t\tunsigned char nat64Prefix[12];\n\t\tbool failed;\n\t\tNetworkProtocol protocol;\n\n\t\tIPv4Address* proxyAddress;\n\t\tuint16_t proxyPort;\n\t\tchar* proxyUsername;\n\t\tchar* proxyPassword;\n\t};\n\n\tclass NetworkSocketWrapper : public NetworkSocket{\n\tpublic:\n\t\tNetworkSocketWrapper(NetworkProtocol protocol) : NetworkSocket(protocol){};\n\t\tvirtual ~NetworkSocketWrapper(){};\n\t\tvirtual NetworkSocket* GetWrapped()=0;\n\t\tvirtual void InitConnection()=0;\n\t};\n\n\tclass NetworkSocketTCPObfuscated : public NetworkSocketWrapper{\n\tpublic:\n\t\tNetworkSocketTCPObfuscated(NetworkSocket* wrapped);\n\t\tvirtual ~NetworkSocketTCPObfuscated();\n\t\tvirtual NetworkSocket* GetWrapped();\n\t\tvirtual void InitConnection();\n\t\tvirtual void Send(NetworkPacket *packet);\n\t\tvirtual void Receive(NetworkPacket *packet);\n\t\tvirtual void Open();\n\t\tvirtual void Close();\n\t\tvirtual void Connect(NetworkAddress *address, uint16_t port);\n\n\t\tvirtual bool IsFailed();\n\n\tprivate:\n\t\tNetworkSocket* wrapped;\n\t\tTCPO2State recvState;\n\t\tTCPO2State sendState;\n\t};\n\n\tclass NetworkSocketSOCKS5Proxy : public NetworkSocketWrapper{\n\tpublic:\n\t\tNetworkSocketSOCKS5Proxy(NetworkSocket* tcp, NetworkSocket* udp, std::string username, std::string password);\n\t\tvirtual ~NetworkSocketSOCKS5Proxy();\n\t\tvirtual void Send(NetworkPacket *packet);\n\t\tvirtual void Receive(NetworkPacket *packet);\n\t\tvirtual void Open();\n\t\tvirtual void Close();\n\t\tvirtual void Connect(NetworkAddress *address, uint16_t port);\n\t\tvirtual NetworkSocket *GetWrapped();\n\t\tvirtual void InitConnection();\n\t\tvirtual bool IsFailed();\n\t\tvirtual NetworkAddress *GetConnectedAddress();\n\t\tvirtual uint16_t GetConnectedPort();\n\n\tprivate:\n\t\tNetworkSocket* tcp;\n\t\tNetworkSocket* udp;\n\t\tstd::string username;\n\t\tstd::string password;\n\t\tNetworkAddress* connectedAddress;\n\t\tuint16_t connectedPort;\n\n\t\tIPv4Address lastRecvdV4;\n\t\tIPv6Address lastRecvdV6;\n\t};\n\n}\n\n#endif //LIBTGVOIP_NETWORKSOCKET_H\n"
  },
  {
    "path": "libtgvoip-public/OpusDecoder.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"OpusDecoder.h\"\n#include \"audio/Resampler.h\"\n#include \"logging.h\"\n#include <assert.h>\n#include <math.h>\n#include <algorithm>\n#ifdef HAVE_CONFIG_H\n#include <opus/opus.h>\n#else\n#include \"opus.h\"\n#endif\n\n#include \"VoIPController.h\"\n\n#define PACKET_SIZE (960*2)\n\nusing namespace tgvoip;\n\ntgvoip::OpusDecoder::OpusDecoder(const std::shared_ptr<MediaStreamItf>& dst, bool isAsync, bool needEC){\n\tdst->SetCallback(OpusDecoder::Callback, this);\n\tInitialize(isAsync, needEC);\n}\n\ntgvoip::OpusDecoder::OpusDecoder(const std::unique_ptr<MediaStreamItf>& dst, bool isAsync, bool needEC){\n\tdst->SetCallback(OpusDecoder::Callback, this);\n\tInitialize(isAsync, needEC);\n}\n\ntgvoip::OpusDecoder::OpusDecoder(MediaStreamItf* dst, bool isAsync, bool needEC){\n\tdst->SetCallback(OpusDecoder::Callback, this);\n\tInitialize(isAsync, needEC);\n}\n\nvoid tgvoip::OpusDecoder::Initialize(bool isAsync, bool needEC){\n\tasync=isAsync;\n\tif(async){\n\t\tdecodedQueue=new BlockingQueue<unsigned char*>(33);\n\t\tbufferPool=new BufferPool(PACKET_SIZE, 32);\n\t\tsemaphore=new Semaphore(32, 0);\n\t}else{\n\t\tdecodedQueue=NULL;\n\t\tbufferPool=NULL;\n\t\tsemaphore=NULL;\n\t}\n\tdec=opus_decoder_create(48000, 1, NULL);\n\tif(needEC)\n\t\tecDec=opus_decoder_create(48000, 1, NULL);\n\telse\n\t\tecDec=NULL;\n\tbuffer=(unsigned char *) malloc(8192);\n\tlastDecoded=NULL;\n\toutputBufferSize=0;\n\techoCanceller=NULL;\n\tframeDuration=20;\n\tconsecutiveLostPackets=0;\n\tenableDTX=false;\n\tsilentPacketCount=0;\n\tlevelMeter=NULL;\n\tnextLen=0;\n\trunning=false;\n\tremainingDataLen=0;\n\tprocessedBuffer=NULL;\n\tprevWasEC=false;\n\tprevLastSample=0;\n}\n\ntgvoip::OpusDecoder::~OpusDecoder(){\n\topus_decoder_destroy(dec);\n\tif(ecDec)\n\t\topus_decoder_destroy(ecDec);\n\tfree(buffer);\n\tif(bufferPool)\n\t\tdelete bufferPool;\n\tif(decodedQueue)\n\t\tdelete decodedQueue;\n\tif(semaphore)\n\t\tdelete semaphore;\n}\n\n\nvoid tgvoip::OpusDecoder::SetEchoCanceller(EchoCanceller* canceller){\n\techoCanceller=canceller;\n}\n\nsize_t tgvoip::OpusDecoder::Callback(unsigned char *data, size_t len, void *param){\n\treturn ((OpusDecoder*)param)->HandleCallback(data, len);\n}\n\nsize_t tgvoip::OpusDecoder::HandleCallback(unsigned char *data, size_t len){\n\tif(async){\n\t\tif(!running){\n\t\t\tmemset(data, 0, len);\n\t\t\treturn 0;\n\t\t}\n\t\tif(outputBufferSize==0){\n\t\t\toutputBufferSize=len;\n\t\t\tint packetsNeeded;\n\t\t\tif(len>PACKET_SIZE)\n\t\t\t\tpacketsNeeded=len/PACKET_SIZE;\n\t\t\telse\n\t\t\t\tpacketsNeeded=1;\n\t\t\tpacketsNeeded*=2;\n\t\t\tsemaphore->Release(packetsNeeded);\n\t\t}\n\t\tassert(outputBufferSize==len && \"output buffer size is supposed to be the same throughout callbacks\");\n\t\tif(len==PACKET_SIZE){\n\t\t\tlastDecoded=(unsigned char *) decodedQueue->GetBlocking();\n\t\t\tif(!lastDecoded)\n\t\t\t\treturn 0;\n\t\t\tmemcpy(data, lastDecoded, PACKET_SIZE);\n\t\t\tbufferPool->Reuse(lastDecoded);\n\t\t\tsemaphore->Release();\n\t\t\tif(silentPacketCount>0){\n\t\t\t\tsilentPacketCount--;\n\t\t\t\tif(levelMeter)\n\t\t\t\t\tlevelMeter->Update(reinterpret_cast<int16_t *>(data), 0);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif(echoCanceller){\n\t\t\t\techoCanceller->SpeakerOutCallback(data, PACKET_SIZE);\n\t\t\t}\n\t\t}else{\n\t\t\tLOGE(\"Opus decoder buffer length != 960 samples\");\n\t\t\tabort();\n\t\t}\n\t}else{\n\t\tif(remainingDataLen==0 && silentPacketCount==0){\n\t\t\tint duration=DecodeNextFrame();\n\t\t\tremainingDataLen=(size_t) (duration/20*960*2);\n\t\t}\n\t\tif(silentPacketCount>0 || remainingDataLen==0 || !processedBuffer){\n\t\t\tif(silentPacketCount>0)\n\t\t\t\tsilentPacketCount--;\n\t\t\tmemset(data, 0, 960*2);\n\t\t\tif(levelMeter)\n\t\t\t\tlevelMeter->Update(reinterpret_cast<int16_t *>(data), 0);\n\t\t\treturn 0;\n\t\t}\n\t\tmemcpy(data, processedBuffer, 960*2);\n\t\tremainingDataLen-=960*2;\n\t\tif(remainingDataLen>0){\n\t\t\tmemmove(processedBuffer, processedBuffer+960*2, remainingDataLen);\n\t\t}\n\t}\n\tif(levelMeter)\n\t\tlevelMeter->Update(reinterpret_cast<int16_t *>(data), len/2);\n\treturn len;\n}\n\n\nvoid tgvoip::OpusDecoder::Start(){\n\tif(!async)\n\t\treturn;\n\trunning=true;\n\tthread=new Thread(new MethodPointer<tgvoip::OpusDecoder>(&tgvoip::OpusDecoder::RunThread, this), NULL);\n\tthread->SetName(\"opus_decoder\");\n\tthread->SetMaxPriority();\n\tthread->Start();\n}\n\nvoid tgvoip::OpusDecoder::Stop(){\n\tif(!running || !async)\n\t\treturn;\n\trunning=false;\n\tsemaphore->Release();\n\tthread->Join();\n\tdelete thread;\n}\n\nvoid tgvoip::OpusDecoder::RunThread(void* param){\n\tint i;\n\tLOGI(\"decoder: packets per frame %d\", packetsPerFrame);\n\twhile(running){\n\t\tint playbackDuration=DecodeNextFrame();\n\t\tfor(i=0;i<playbackDuration/20;i++){\n\t\t\tsemaphore->Acquire();\n\t\t\tif(!running){\n\t\t\t\tLOGI(\"==== decoder exiting ====\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tunsigned char *buf=bufferPool->Get();\n\t\t\tif(buf){\n\t\t\t\tif(remainingDataLen>0){\n\t\t\t\t\tfor(std::vector<AudioEffect*>::iterator effect=postProcEffects.begin();effect!=postProcEffects.end();++effect){\n\t\t\t\t\t\t(*effect)->Process(reinterpret_cast<int16_t*>(processedBuffer+(PACKET_SIZE*i)), 960);\n\t\t\t\t\t}\n\t\t\t\t\tmemcpy(buf, processedBuffer+(PACKET_SIZE*i), PACKET_SIZE);\n\t\t\t\t}else{\n\t\t\t\t\t//LOGE(\"Error decoding, result=%d\", size);\n\t\t\t\t\tmemset(buf, 0, PACKET_SIZE);\n\t\t\t\t}\n\t\t\t\tdecodedQueue->Put(buf);\n\t\t\t}else{\n\t\t\t\tLOGW(\"decoder: no buffers left!\");\n\t\t\t}\n\t\t}\n\t}\n}\n\nint tgvoip::OpusDecoder::DecodeNextFrame(){\n\tint playbackDuration=0;\n\tbool isEC=false;\n\tsize_t len=jitterBuffer->HandleOutput(buffer, 8192, 0, true, playbackDuration, isEC);\n\tbool fec=false;\n\tif(!len){\n\t\tfec=true;\n\t\tlen=jitterBuffer->HandleOutput(buffer, 8192, 0, false, playbackDuration, isEC);\n\t\t//if(len)\n\t\t//\tLOGV(\"Trying FEC...\");\n\t}\n\tint size;\n\tif(len){\n\t\tsize=opus_decode(isEC ? ecDec : dec, buffer, len, (opus_int16 *) decodeBuffer, packetsPerFrame*960, fec ? 1 : 0);\n\t\tconsecutiveLostPackets=0;\n\t\tif(prevWasEC!=isEC && size){\n\t\t\t// It turns out the waveforms generated by the PLC feature are also great to help smooth out the\n\t\t\t// otherwise audible transition between the frames from different decoders. Those are basically an extrapolation\n\t\t\t// of the previous successfully decoded data -- which is exactly what we need here.\n\t\t\tsize=opus_decode(prevWasEC ? ecDec : dec, NULL, 0, (opus_int16*)nextBuffer, packetsPerFrame*960, 0);\n\t\t\tif(size){\n\t\t\t\tint16_t* plcSamples=reinterpret_cast<int16_t*>(nextBuffer);\n\t\t\t\tint16_t* samples=reinterpret_cast<int16_t*>(decodeBuffer);\n\t\t\t\tfloat coeffs[]={0.999802, 0.995062, 0.984031, 0.966778, 0.943413, 0.914084, 0.878975, 0.838309, 0.792344,\n\t\t\t\t\t\t\t\t\t\t  0.741368, 0.685706, 0.625708, 0.561754, 0.494249, 0.423619, 0.350311, 0.274788, 0.197527, 0.119018, 0.039757};\n\t\t\t\tfor(int i=0;i<20;i++){\n\t\t\t\t\tsamples[i]=(int16_t)round((plcSamples[i]*coeffs[i]+(float)samples[i]*(1.0-coeffs[i])));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tprevWasEC=isEC;\n\t\tprevLastSample=decodeBuffer[size-1];\n\t}else{ // do packet loss concealment\n\t\tconsecutiveLostPackets++;\n\t\tif(consecutiveLostPackets>2 && enableDTX){\n\t\t\tsilentPacketCount+=packetsPerFrame;\n\t\t\tsize=packetsPerFrame*960;\n\t\t}else{\n\t\t\tsize=opus_decode(prevWasEC ? ecDec : dec, NULL, 0, (opus_int16 *) decodeBuffer, packetsPerFrame*960, 0);\n\t\t\t//LOGV(\"PLC\");\n\t\t}\n\t}\n\tif(size<0)\n\t\tLOGW(\"decoder: opus_decode error %d\", size);\n\tremainingDataLen=size;\n\tif(playbackDuration==80){\n\t\tprocessedBuffer=buffer;\n\t\taudio::Resampler::Rescale60To80((int16_t*) decodeBuffer, (int16_t*) processedBuffer);\n\t}else if(playbackDuration==40){\n\t\tprocessedBuffer=buffer;\n\t\taudio::Resampler::Rescale60To40((int16_t*) decodeBuffer, (int16_t*) processedBuffer);\n\t}else{\n\t\tprocessedBuffer=decodeBuffer;\n\t}\n\treturn playbackDuration;\n}\n\n\nvoid tgvoip::OpusDecoder::SetFrameDuration(uint32_t duration){\n\tframeDuration=duration;\n\tpacketsPerFrame=frameDuration/20;\n}\n\n\nvoid tgvoip::OpusDecoder::SetJitterBuffer(std::shared_ptr<JitterBuffer> jitterBuffer){\n\tthis->jitterBuffer=jitterBuffer;\n}\n\nvoid tgvoip::OpusDecoder::SetDTX(bool enable){\n\tenableDTX=enable;\n}\n\nvoid tgvoip::OpusDecoder::SetLevelMeter(AudioLevelMeter *levelMeter){\n\tthis->levelMeter=levelMeter;\n}\n\nvoid tgvoip::OpusDecoder::AddAudioEffect(AudioEffect *effect){\n\tpostProcEffects.push_back(effect);\n}\n\nvoid tgvoip::OpusDecoder::RemoveAudioEffect(AudioEffect *effect){\n\tstd::vector<AudioEffect*>::iterator i=std::find(postProcEffects.begin(), postProcEffects.end(), effect);\n\tif(i!=postProcEffects.end())\n\t\tpostProcEffects.erase(i);\n}\n"
  },
  {
    "path": "libtgvoip-public/OpusDecoder.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_OPUSDECODER_H\n#define LIBTGVOIP_OPUSDECODER_H\n\n\n#include \"MediaStreamItf.h\"\n#include \"threading.h\"\n#include \"BlockingQueue.h\"\n#include \"Buffers.h\"\n#include \"EchoCanceller.h\"\n#include \"JitterBuffer.h\"\n#include <stdio.h>\n#include <vector>\n#include <memory>\n\nstruct OpusDecoder;\n\nnamespace tgvoip{\nclass OpusDecoder {\npublic:\n\tvirtual void Start();\n\n\tvirtual void Stop();\n\n\tOpusDecoder(const std::shared_ptr<MediaStreamItf>& dst, bool isAsync, bool needEC);\n\tOpusDecoder(const std::unique_ptr<MediaStreamItf>& dst, bool isAsync, bool needEC);\n\tOpusDecoder(MediaStreamItf* dst, bool isAsync, bool needEC);\n\tvirtual ~OpusDecoder();\n\tsize_t HandleCallback(unsigned char* data, size_t len);\n\tvoid SetEchoCanceller(EchoCanceller* canceller);\n\tvoid SetFrameDuration(uint32_t duration);\n\tvoid SetJitterBuffer(std::shared_ptr<JitterBuffer> jitterBuffer);\n\tvoid SetDTX(bool enable);\n\tvoid SetLevelMeter(AudioLevelMeter* levelMeter);\n\tvoid AddAudioEffect(AudioEffect* effect);\n\tvoid RemoveAudioEffect(AudioEffect* effect);\n\nprivate:\n\tvoid Initialize(bool isAsync, bool needEC);\n\tstatic size_t Callback(unsigned char* data, size_t len, void* param);\n\tvoid RunThread(void* param);\n\tint DecodeNextFrame();\n\t::OpusDecoder* dec;\n\t::OpusDecoder* ecDec;\n\tBlockingQueue<unsigned char*>* decodedQueue;\n\tBufferPool* bufferPool;\n\tunsigned char* buffer;\n\tunsigned char* lastDecoded;\n\tunsigned char* processedBuffer;\n\tsize_t outputBufferSize;\n\tbool running;\n    Thread* thread;\n\tSemaphore* semaphore;\n\tuint32_t frameDuration;\n\tEchoCanceller* echoCanceller;\n\tstd::shared_ptr<JitterBuffer> jitterBuffer;\n\tAudioLevelMeter* levelMeter;\n\tint consecutiveLostPackets;\n\tbool enableDTX;\n\tsize_t silentPacketCount;\n\tstd::vector<AudioEffect*> postProcEffects;\n\tbool async;\n\tunsigned char nextBuffer[8192];\n\tunsigned char decodeBuffer[8192];\n\tsize_t nextLen;\n\tunsigned int packetsPerFrame;\n\tptrdiff_t remainingDataLen;\n\tbool prevWasEC;\n\tint16_t prevLastSample;\n};\n}\n\n#endif //LIBTGVOIP_OPUSDECODER_H\n"
  },
  {
    "path": "libtgvoip-public/OpusEncoder.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"OpusEncoder.h\"\n#include <assert.h>\n#include \"logging.h\"\n#include \"VoIPServerConfig.h\"\n#ifdef HAVE_CONFIG_H\n#include <opus/opus.h>\n#else\n#include \"opus.h\"\n#endif\n\ntgvoip::OpusEncoder::OpusEncoder(MediaStreamItf *source, bool needSecondary):queue(11), bufferPool(960*2, 10){\n\tthis->source=source;\n\tsource->SetCallback(tgvoip::OpusEncoder::Callback, this);\n\tenc=opus_encoder_create(48000, 1, OPUS_APPLICATION_VOIP, NULL);\n\topus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(10));\n\topus_encoder_ctl(enc, OPUS_SET_PACKET_LOSS_PERC(15));\n\topus_encoder_ctl(enc, OPUS_SET_INBAND_FEC(1));\n\topus_encoder_ctl(enc, OPUS_SET_SIGNAL(OPUS_SIGNAL_VOICE));\n\topus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_FULLBAND));\n\trequestedBitrate=32000;\n\tcurrentBitrate=0;\n\trunning=false;\n\techoCanceller=NULL;\n\tcomplexity=10;\n\tframeDuration=20;\n\tlevelMeter=NULL;\n\tmediumCorrectionBitrate=ServerConfig::GetSharedInstance()->GetInt(\"audio_medium_fec_bitrate\", 10000);\n\tstrongCorrectionBitrate=ServerConfig::GetSharedInstance()->GetInt(\"audio_strong_fec_bitrate\", 8000);\n\tmediumCorrectionMultiplier=ServerConfig::GetSharedInstance()->GetDouble(\"audio_medium_fec_multiplier\", 1.5);\n\tstrongCorrectionMultiplier=ServerConfig::GetSharedInstance()->GetDouble(\"audio_strong_fec_multiplier\", 2.0);\n\tsecondaryEncoderEnabled=false;\n\n\tif(needSecondary){\n\t\tsecondaryEncoder=opus_encoder_create(48000, 1, OPUS_APPLICATION_VOIP, NULL);\n\t\topus_encoder_ctl(secondaryEncoder, OPUS_SET_COMPLEXITY(10));\n\t\topus_encoder_ctl(secondaryEncoder, OPUS_SET_SIGNAL(OPUS_SIGNAL_VOICE));\n\t\topus_encoder_ctl(secondaryEncoder, OPUS_SET_VBR(0));\n\t\topus_encoder_ctl(secondaryEncoder, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_FULLBAND));\n\t\topus_encoder_ctl(secondaryEncoder, OPUS_SET_BITRATE(8000));\n\t\topus_encoder_ctl(secondaryEncoder, OPUS_SET_INBAND_FEC(1));\n\t\topus_encoder_ctl(secondaryEncoder, OPUS_SET_PACKET_LOSS_PERC(15));\n\n\t\topus_int32 delay, ecDelay;\n\t\topus_encoder_ctl(secondaryEncoder, OPUS_GET_LOOKAHEAD(&ecDelay));\n\t\topus_encoder_ctl(enc, OPUS_GET_LOOKAHEAD(&delay));\n\t}else{\n\t\tsecondaryEncoder=NULL;\n\t}\n}\n\ntgvoip::OpusEncoder::~OpusEncoder(){\n\topus_encoder_destroy(enc);\n\tif(secondaryEncoder)\n\t\topus_encoder_destroy(secondaryEncoder);\n}\n\nvoid tgvoip::OpusEncoder::Start(){\n\tif(running)\n\t\treturn;\n\trunning=true;\n\tthread=new Thread(new MethodPointer<tgvoip::OpusEncoder>(&tgvoip::OpusEncoder::RunThread, this), NULL);\n\tthread->SetName(\"OpusEncoder\");\n\tthread->Start();\n\tthread->SetMaxPriority();\n}\n\nvoid tgvoip::OpusEncoder::Stop(){\n\tif(!running)\n\t\treturn;\n\trunning=false;\n\tqueue.Put(NULL);\n\tthread->Join();\n\tdelete thread;\n}\n\n\nvoid tgvoip::OpusEncoder::SetBitrate(uint32_t bitrate){\n\trequestedBitrate=bitrate;\n}\n\nvoid tgvoip::OpusEncoder::Encode(unsigned char *data, size_t len){\n\tif(requestedBitrate!=currentBitrate){\n\t\topus_encoder_ctl(enc, OPUS_SET_BITRATE(requestedBitrate));\n\t\tcurrentBitrate=requestedBitrate;\n\t\tLOGV(\"opus_encoder: setting bitrate to %u\", currentBitrate);\n\t}\n\tif(levelMeter)\n\t\tlevelMeter->Update(reinterpret_cast<int16_t *>(data), len/2);\n\tint32_t r=opus_encode(enc, (int16_t*)data, len/2, buffer, 4096);\n\tif(r<=0){\n\t\tLOGE(\"Error encoding: %d\", r);\n\t}else if(r==1){\n\t\tLOGW(\"DTX\");\n\t}else if(running){\n\t\t//LOGV(\"Packet size = %d\", r);\n\t\tint32_t secondaryLen=0;\n\t\tunsigned char secondaryBuffer[128];\n\t\tif(secondaryEncoderEnabled && secondaryEncoder){\n\t\t\tsecondaryLen=opus_encode(secondaryEncoder, (int16_t*)data, len/2, secondaryBuffer, sizeof(secondaryBuffer));\n\t\t\t//LOGV(\"secondaryLen %d\", secondaryLen);\n\t\t}\n\t\tInvokeCallback(buffer, (size_t)r, secondaryBuffer, (size_t)secondaryLen);\n\t}\n}\n\nsize_t tgvoip::OpusEncoder::Callback(unsigned char *data, size_t len, void* param){\n\tOpusEncoder* e=(OpusEncoder*)param;\n\tunsigned char* buf=e->bufferPool.Get();\n\tif(buf){\n\t\tassert(len==960*2);\n\t\tmemcpy(buf, data, 960*2);\n\t\te->queue.Put(buf);\n\t}else{\n\t\tLOGW(\"opus_encoder: no buffer slots left\");\n\t\tif(e->complexity>1){\n\t\t\te->complexity--;\n\t\t\topus_encoder_ctl(e->enc, OPUS_SET_COMPLEXITY(e->complexity));\n\t\t}\n\t}\n\treturn 0;\n}\n\n\nuint32_t tgvoip::OpusEncoder::GetBitrate(){\n\treturn requestedBitrate;\n}\n\nvoid tgvoip::OpusEncoder::SetEchoCanceller(EchoCanceller* aec){\n\techoCanceller=aec;\n}\n\nvoid tgvoip::OpusEncoder::RunThread(void* arg){\n\tunsigned char buf[960*2];\n\tuint32_t bufferedCount=0;\n\tuint32_t packetsPerFrame=frameDuration/20;\n\tLOGV(\"starting encoder, packets per frame=%d\", packetsPerFrame);\n\tunsigned char* frame;\n\tif(packetsPerFrame>1)\n\t\tframe=(unsigned char *) malloc(960*2*packetsPerFrame);\n\telse\n\t\tframe=NULL;\n\twhile(running){\n\t\tunsigned char* packet=(unsigned char*)queue.GetBlocking();\n\t\tif(packet){\n\t\t\tif(echoCanceller)\n\t\t\t\techoCanceller->ProcessInput(packet, buf, 960*2);\n\t\t\telse\n\t\t\t\tmemcpy(buf, packet, 960*2);\n\t\t\tif(packetsPerFrame==1){\n\t\t\t\tEncode(buf, 960*2);\n\t\t\t}else{\n\t\t\t\tmemcpy(frame+(960*2*bufferedCount), buf, 960*2);\n\t\t\t\tbufferedCount++;\n\t\t\t\tif(bufferedCount==packetsPerFrame){\n\t\t\t\t\tEncode(frame, 960*2*packetsPerFrame);\n\t\t\t\t\tbufferedCount=0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbufferPool.Reuse(packet);\n\t\t}\n\t}\n\tif(frame)\n\t\tfree(frame);\n}\n\n\nvoid tgvoip::OpusEncoder::SetOutputFrameDuration(uint32_t duration){\n\tframeDuration=duration;\n}\n\n\nvoid tgvoip::OpusEncoder::SetPacketLoss(int percent){\n\tpacketLossPercent=percent;\n\tdouble multiplier=1;\n\tif(currentBitrate<=strongCorrectionBitrate)\n\t\tmultiplier=strongCorrectionMultiplier;\n\telse if(currentBitrate<=mediumCorrectionBitrate)\n\t\tmultiplier=mediumCorrectionMultiplier;\n\topus_encoder_ctl(enc, OPUS_SET_PACKET_LOSS_PERC((int)(percent*multiplier)));\n\topus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(percent>17 ? OPUS_AUTO : OPUS_BANDWIDTH_FULLBAND));\n}\n\nint tgvoip::OpusEncoder::GetPacketLoss(){\n\treturn packetLossPercent;\n}\n\nvoid tgvoip::OpusEncoder::SetDTX(bool enable){\n\topus_encoder_ctl(enc, OPUS_SET_DTX(enable ? 1 : 0));\n}\n\nvoid tgvoip::OpusEncoder::SetLevelMeter(tgvoip::AudioLevelMeter *levelMeter){\n\tthis->levelMeter=levelMeter;\n}\n\nvoid tgvoip::OpusEncoder::SetCallback(void (*f)(unsigned char *, size_t, unsigned char *, size_t, void *), void *param){\n\tcallback=f;\n\tcallbackParam=param;\n}\n\nvoid tgvoip::OpusEncoder::InvokeCallback(unsigned char *data, size_t length, unsigned char *secondaryData, size_t secondaryLength){\n\tcallback(data, length, secondaryData, secondaryLength, callbackParam);\n}\n\nvoid tgvoip::OpusEncoder::SetSecondaryEncoderEnabled(bool enabled){\n\tsecondaryEncoderEnabled=enabled;\n}\n"
  },
  {
    "path": "libtgvoip-public/OpusEncoder.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_OPUSENCODER_H\n#define LIBTGVOIP_OPUSENCODER_H\n\n\n#include \"MediaStreamItf.h\"\n#include \"threading.h\"\n#include \"BlockingQueue.h\"\n#include \"Buffers.h\"\n#include \"EchoCanceller.h\"\n\n#include <stdint.h>\n\nstruct OpusEncoder;\n\nnamespace tgvoip{\nclass OpusEncoder{\npublic:\n\tOpusEncoder(MediaStreamItf* source, bool needSecondary);\n\tvirtual ~OpusEncoder();\n\tvirtual void Start();\n\tvirtual void Stop();\n\tvoid SetBitrate(uint32_t bitrate);\n\tvoid SetEchoCanceller(EchoCanceller* aec);\n\tvoid SetOutputFrameDuration(uint32_t duration);\n\tvoid SetPacketLoss(int percent);\n\tint GetPacketLoss();\n\tuint32_t GetBitrate();\n\tvoid SetDTX(bool enable);\n\tvoid SetLevelMeter(AudioLevelMeter* levelMeter);\n\tvoid SetCallback(void (*f)(unsigned char*, size_t, unsigned char*, size_t, void*), void* param);\n\tvoid SetSecondaryEncoderEnabled(bool enabled);\n\nprivate:\n\tstatic size_t Callback(unsigned char* data, size_t len, void* param);\n\tvoid RunThread(void* arg);\n\tvoid Encode(unsigned char* data, size_t len);\n\tvoid InvokeCallback(unsigned char* data, size_t length, unsigned char* secondaryData, size_t secondaryLength);\n\tMediaStreamItf* source;\n\t::OpusEncoder* enc;\n\t::OpusEncoder* secondaryEncoder;\n\tunsigned char buffer[4096];\n\tuint32_t requestedBitrate;\n\tuint32_t currentBitrate;\n\tThread* thread;\n\tBlockingQueue<unsigned char*> queue;\n\tBufferPool bufferPool;\n\tEchoCanceller* echoCanceller;\n\tint complexity;\n\tbool running;\n\tuint32_t frameDuration;\n\tint packetLossPercent;\n\tuint32_t mediumCorrectionBitrate;\n\tuint32_t strongCorrectionBitrate;\n\tdouble mediumCorrectionMultiplier;\n\tdouble strongCorrectionMultiplier;\n\tAudioLevelMeter* levelMeter;\n\tbool secondaryEncoderEnabled;\n\n\tvoid (*callback)(unsigned char*, size_t, unsigned char*, size_t, void*);\n\tvoid* callbackParam;\n};\n}\n\n#endif //LIBTGVOIP_OPUSENCODER_H\n"
  },
  {
    "path": "libtgvoip-public/PacketReassembler.cpp",
    "content": "//\n// Created by Grishka on 19.03.2018.\n//\n\n#include \"PacketReassembler.h\"\n\nusing namespace tgvoip;\n\nPacketReassembler::PacketReassembler(){\n\n}\n\nPacketReassembler::~PacketReassembler(){\n\n}\n\nvoid PacketReassembler::Reset(){\n\n}\n\nvoid PacketReassembler::AddPacket(unsigned char *data, size_t offset, size_t len, uint32_t pts){\n\n}\n"
  },
  {
    "path": "libtgvoip-public/PacketReassembler.h",
    "content": "//\n// Created by Grishka on 19.03.2018.\n//\n\n#ifndef TGVOIP_PACKETREASSEMBLER_H\n#define TGVOIP_PACKETREASSEMBLER_H\n\n#include \"MediaStreamItf.h\"\n\nnamespace tgvoip {\n\tclass PacketReassembler : public MediaStreamItf{\n\tpublic:\n\t\tPacketReassembler();\n\t\tvirtual ~PacketReassembler();\n\n\t\tvoid Start(){};\n\t\tvoid Stop(){};\n\n\t\tvoid Reset();\n\t\tvoid AddPacket(unsigned char* data, size_t offset, size_t len, uint32_t pts);\n\n\tprivate:\n\t\tunsigned char* buffer;\n\t\tsize_t currentSize;\n\t\tsize_t finalSize;\n\t};\n}\n\n#endif //TGVOIP_PACKETREASSEMBLER_H\n"
  },
  {
    "path": "libtgvoip-public/PrivateDefines.h",
    "content": "//\n// Created by Grishka on 20.04.2018.\n//\n\n#ifndef TGVOIP_PRIVATEDEFINES_H\n#define TGVOIP_PRIVATEDEFINES_H\n\n#define PKT_INIT 1\n#define PKT_INIT_ACK 2\n#define PKT_STREAM_STATE 3\n#define PKT_STREAM_DATA 4\n#define PKT_UPDATE_STREAMS 5\n#define PKT_PING 6\n#define PKT_PONG 7\n#define PKT_STREAM_DATA_X2 8\n#define PKT_STREAM_DATA_X3 9\n#define PKT_LAN_ENDPOINT 10\n#define PKT_NETWORK_CHANGED 11\n#define PKT_SWITCH_PREF_RELAY 12\n#define PKT_SWITCH_TO_P2P 13\n#define PKT_NOP 14\n//#define PKT_GROUP_CALL_KEY 15\t\t// replaced with 'extra' in 2.1 (protocol v6)\n//#define PKT_REQUEST_GROUP 16\n#define PKT_STREAM_EC 17\n\n#define IS_MOBILE_NETWORK(x) (x==NET_TYPE_GPRS || x==NET_TYPE_EDGE || x==NET_TYPE_3G || x==NET_TYPE_HSPA || x==NET_TYPE_LTE || x==NET_TYPE_OTHER_MOBILE)\n\n#define PROTOCOL_NAME 0x50567247 // \"GrVP\" in little endian (reversed here)\n#define PROTOCOL_VERSION 6\n#define MIN_PROTOCOL_VERSION 3\n\n#define STREAM_DATA_FLAG_LEN16 0x40\n#define STREAM_DATA_FLAG_HAS_MORE_FLAGS 0x80\n#define STREAM_DATA_XFLAG_KEYFRAME 0x01\n#define STREAM_DATA_XFLAG_FRAGMENTED 0x02\n\n#define STREAM_TYPE_AUDIO 1\n#define STREAM_TYPE_VIDEO 2\n\n#define FOURCC(a,b,c,d) ((uint32_t)d | ((uint32_t)c << 8) | ((uint32_t)b << 16) | ((uint32_t)a << 24))\n\n#define CODEC_OPUS_OLD 1\n#define CODEC_OPUS FOURCC('O','P','U','S')\n#define CODEC_AVC FOURCC('A','V','C',' ')\n#define CODEC_HEVC FOURCC('H','E','V','C')\n#define CODEC_VP8 FOURCC('V','P','8','0')\n\n#define DEFAULT_MTU 1100\n\n/*flags:# voice_call_id:flags.2?int128 in_seq_no:flags.4?int out_seq_no:flags.4?int\n\t * recent_received_mask:flags.5?int proto:flags.3?int extra:flags.1?string raw_data:flags.0?string*/\n#define PFLAG_HAS_DATA 1\n#define PFLAG_HAS_EXTRA 2\n#define PFLAG_HAS_CALL_ID 4\n#define PFLAG_HAS_PROTO 8\n#define PFLAG_HAS_SEQ 16\n#define PFLAG_HAS_RECENT_RECV 32\n#define PFLAG_HAS_SENDER_TAG_HASH 64\n\n#define XPFLAG_HAS_EXTRA 1\n\n#define EXTRA_TYPE_STREAM_FLAGS 1\n#define EXTRA_TYPE_STREAM_CSD 2\n#define EXTRA_TYPE_LAN_ENDPOINT 3\n#define EXTRA_TYPE_NETWORK_CHANGED 4\n#define EXTRA_TYPE_GROUP_CALL_KEY 5\n#define EXTRA_TYPE_REQUEST_GROUP 6\n#define EXTRA_TYPE_IPV6_ENDPOINT 7\n\n#define STREAM_FLAG_ENABLED 1\n#define STREAM_FLAG_DTX 2\n#define STREAM_FLAG_EXTRA_EC 4\n\n#define STREAM_RFLAG_SUPPORTED 1\n\n#define INIT_FLAG_DATA_SAVING_ENABLED 1\n#define INIT_FLAG_GROUP_CALLS_SUPPORTED 2\n\n#define TLID_DECRYPTED_AUDIO_BLOCK 0xDBF948C1\n#define TLID_SIMPLE_AUDIO_BLOCK 0xCC0D0E76\n#define TLID_UDP_REFLECTOR_PEER_INFO 0x27D9371C\n#define TLID_UDP_REFLECTOR_PEER_INFO_IPV6 0x83fc73b1\n#define TLID_UDP_REFLECTOR_SELF_INFO 0xc01572c7\n#define TLID_UDP_REFLECTOR_REQUEST_PACKETS_INFO 0x1a06fc96\n#define TLID_UDP_REFLECTOR_LAST_PACKETS_INFO 0x0e107305\n#define TLID_VECTOR 0x1cb5c415\n#define PAD4(x) (4-(x+(x<=253 ? 1 : 0))%4)\n\n#define MAX_RECENT_PACKETS 64\n\n#define MAX(a,b) (a>b ? a : b)\n#define MIN(a,b) (a<b ? a : b)\n\n#define SHA1_LENGTH 20\n#define SHA256_LENGTH 32\n\n#ifdef _MSC_VER\n#define MSC_STACK_FALLBACK(a, b) (b)\n#else\n#define MSC_STACK_FALLBACK(a, b) (a)\n#endif\n\n#define SEQ_MAX 0xFFFFFFFF\n\ninline bool seqgt(uint32_t s1, uint32_t s2){\n\treturn ((s1>s2) && (s1-s2<=SEQ_MAX/2)) || ((s1<s2) && (s2-s1>SEQ_MAX/2));\n}\n\n\n#endif //TGVOIP_PRIVATEDEFINES_H\n"
  },
  {
    "path": "libtgvoip-public/VoIPController.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef _WIN32\n#include <unistd.h>\n#include <sys/time.h>\n#endif\n#include <errno.h>\n#include <string.h>\n#include <wchar.h>\n#include \"VoIPController.h\"\n#include \"logging.h\"\n#include \"threading.h\"\n#include \"Buffers.h\"\n#include \"OpusEncoder.h\"\n#include \"OpusDecoder.h\"\n#include \"VoIPServerConfig.h\"\n#include \"PrivateDefines.h\"\n#include <assert.h>\n#include <time.h>\n#include <math.h>\n#include <exception>\n#include <stdexcept>\n#include <algorithm>\n#include <inttypes.h>\n#include <float.h>\n\n\ninline int pad4(int x){\n\tint r=PAD4(x);\n\tif(r==4)\n\t\treturn 0;\n\treturn r;\n}\n\n\nusing namespace tgvoip;\nusing namespace std;\n\n#ifdef __APPLE__\n#include \"os/darwin/AudioUnitIO.h\"\n#include <mach/mach_time.h>\ndouble VoIPController::machTimebase=0;\nuint64_t VoIPController::machTimestart=0;\n#endif\n\n#ifdef _WIN32\nint64_t VoIPController::win32TimeScale = 0;\nbool VoIPController::didInitWin32TimeScale = false;\n#endif\n\n#if defined(TGVOIP_USE_CALLBACK_AUDIO_IO)\n#include \"audio/AudioIOCallback.h\"\n#endif\n\n#ifndef TGVOIP_USE_CUSTOM_CRYPTO\nextern \"C\" {\n#include <openssl/sha.h>\n#include <openssl/aes.h>\n#include <openssl/modes.h>\n#include <openssl/rand.h>\n}\n\nvoid tgvoip_openssl_aes_ige_encrypt(uint8_t* in, uint8_t* out, size_t length, uint8_t* key, uint8_t* iv){\n\tAES_KEY akey;\n\tAES_set_encrypt_key(key, 32*8, &akey);\n\tAES_ige_encrypt(in, out, length, &akey, iv, AES_ENCRYPT);\n}\n\nvoid tgvoip_openssl_aes_ige_decrypt(uint8_t* in, uint8_t* out, size_t length, uint8_t* key, uint8_t* iv){\n\tAES_KEY akey;\n\tAES_set_decrypt_key(key, 32*8, &akey);\n\tAES_ige_encrypt(in, out, length, &akey, iv, AES_DECRYPT);\n}\n\nvoid tgvoip_openssl_rand_bytes(uint8_t* buffer, size_t len){\n\tRAND_bytes(buffer, len);\n}\n\nvoid tgvoip_openssl_sha1(uint8_t* msg, size_t len, uint8_t* output){\n\tSHA1(msg, len, output);\n}\n\nvoid tgvoip_openssl_sha256(uint8_t* msg, size_t len, uint8_t* output){\n\tSHA256(msg, len, output);\n}\n\nvoid tgvoip_openssl_aes_ctr_encrypt(uint8_t* inout, size_t length, uint8_t* key, uint8_t* iv, uint8_t* ecount, uint32_t* num){\n\tAES_KEY akey;\n\tAES_set_encrypt_key(key, 32*8, &akey);\n\tCRYPTO_ctr128_encrypt(inout, inout, length, &akey, iv, ecount, num, (block128_f) AES_encrypt);\n}\n\nvoid tgvoip_openssl_aes_cbc_encrypt(uint8_t* in, uint8_t* out, size_t length, uint8_t* key, uint8_t* iv){\n\tAES_KEY akey;\n\tAES_set_encrypt_key(key, 256, &akey);\n\tAES_cbc_encrypt(in, out, length, &akey, iv, AES_ENCRYPT);\n}\n\nvoid tgvoip_openssl_aes_cbc_decrypt(uint8_t* in, uint8_t* out, size_t length, uint8_t* key, uint8_t* iv){\n\tAES_KEY akey;\n\tAES_set_decrypt_key(key, 256, &akey);\n\tAES_cbc_encrypt(in, out, length, &akey, iv, AES_DECRYPT);\n}\n\nCryptoFunctions VoIPController::crypto={\n\t\ttgvoip_openssl_rand_bytes,\n\t\ttgvoip_openssl_sha1,\n\t\ttgvoip_openssl_sha256,\n\t\ttgvoip_openssl_aes_ige_encrypt,\n\t\ttgvoip_openssl_aes_ige_decrypt,\n\t\ttgvoip_openssl_aes_ctr_encrypt,\n\t\ttgvoip_openssl_aes_cbc_encrypt,\n\t\ttgvoip_openssl_aes_cbc_decrypt\n\n};\n#else\nCryptoFunctions VoIPController::crypto; // set it yourself upon initialization\n#endif\n\n\nextern FILE* tgvoipLogFile;\n\nVoIPController::VoIPController() : activeNetItfName(\"\"),\n\t\t\t\t\t\t\t\t   currentAudioInput(\"default\"),\n\t\t\t\t\t\t\t\t   currentAudioOutput(\"default\"),\n\t\t\t\t\t\t\t\t   proxyAddress(\"\"),\n\t\t\t\t\t\t\t\t   proxyUsername(\"\"),\n\t\t\t\t\t\t\t\t   proxyPassword(\"\"){\n\tseq=1;\n\tlastRemoteSeq=0;\n\tstate=STATE_WAIT_INIT;\n\taudioInput=NULL;\n\taudioOutput=NULL;\n\tencoder=NULL;\n\taudioOutStarted=false;\n\taudioTimestampIn=0;\n\taudioTimestampOut=0;\n\tstopping=false;\n\tsendQueue=new BlockingQueue<PendingOutgoingPacket>(21);\n\tmemset(recvPacketTimes, 0, sizeof(double)*32);\n\tmemset(&stats, 0, sizeof(TrafficStats));\n\tlastRemoteAckSeq=0;\n\tlastSentSeq=0;\n\trecvLossCount=0;\n\tpacketsReceived=0;\n\twaitingForAcks=false;\n\tnetworkType=NET_TYPE_UNKNOWN;\n\techoCanceller=NULL;\n\tdontSendPackets=0;\n\tmicMuted=false;\n\tcurrentEndpoint=NULL;\n\twaitingForRelayPeerInfo=false;\n\tallowP2p=true;\n\tdataSavingMode=false;\n\tpublicEndpointsReqTime=0;\n\tconnectionInitTime=0;\n\tlastRecvPacketTime=0;\n\tdataSavingRequestedByPeer=false;\n\tpeerVersion=0;\n\tconctl=new CongestionControl();\n\tprevSendLossCount=0;\n\treceivedInit=false;\n\treceivedInitAck=false;\n\tpeerPreferredRelay=NULL;\n\tstatsDump=NULL;\n\tuseTCP=false;\n\tuseUDP=true;\n\tdidAddTcpRelays=false;\n\tudpPingCount=0;\n\tlastUdpPingTime=0;\n\topeningTcpSocket=NULL;\n\n\tproxyProtocol=PROXY_NONE;\n\tproxyPort=0;\n\tresolvedProxyAddress=NULL;\n\n\tselectCanceller=SocketSelectCanceller::Create();\n\tudpSocket=NetworkSocket::Create(PROTO_UDP);\n\trealUdpSocket=udpSocket;\n\tudpConnectivityState=UDP_UNKNOWN;\n\techoCancellationStrength=1;\n\n\toutputAGC=NULL;\n\toutputAGCEnabled=false;\n\tpeerCapabilities=0;\n\tcallbacks={0};\n\tdidReceiveGroupCallKey=false;\n\tdidReceiveGroupCallKeyAck=false;\n\tdidSendGroupCallKey=false;\n\tdidSendUpgradeRequest=false;\n\tdidInvokeUpgradeCallback=false;\n\n\tconnectionMaxLayer=0;\n\tuseMTProto2=false;\n\tsetCurrentEndpointToTCP=false;\n\tuseIPv6=false;\n\tpeerIPv6Available=false;\n\tshittyInternetMode=false;\n\tdidAddIPv6Relays=false;\n\tdidSendIPv6Endpoint=false;\n\tunsentStreamPackets.store(0);\n\n\tsendThread=NULL;\n\trecvThread=NULL;\n\n\tmaxAudioBitrate=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_max_bitrate\", 20000);\n\tmaxAudioBitrateGPRS=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_max_bitrate_gprs\", 8000);\n\tmaxAudioBitrateEDGE=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_max_bitrate_edge\", 16000);\n\tmaxAudioBitrateSaving=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_max_bitrate_saving\", 8000);\n\tinitAudioBitrate=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_init_bitrate\", 16000);\n\tinitAudioBitrateGPRS=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_init_bitrate_gprs\", 8000);\n\tinitAudioBitrateEDGE=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_init_bitrate_edge\", 8000);\n\tinitAudioBitrateSaving=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_init_bitrate_saving\", 8000);\n\taudioBitrateStepIncr=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_bitrate_step_incr\", 1000);\n\taudioBitrateStepDecr=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_bitrate_step_decr\", 1000);\n\tminAudioBitrate=(uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"audio_min_bitrate\", 8000);\n\trelaySwitchThreshold=ServerConfig::GetSharedInstance()->GetDouble(\"relay_switch_threshold\", 0.8);\n\tp2pToRelaySwitchThreshold=ServerConfig::GetSharedInstance()->GetDouble(\"p2p_to_relay_switch_threshold\", 0.6);\n\trelayToP2pSwitchThreshold=ServerConfig::GetSharedInstance()->GetDouble(\"relay_to_p2p_switch_threshold\", 0.8);\n\treconnectingTimeout=ServerConfig::GetSharedInstance()->GetDouble(\"reconnecting_state_timeout\", 2.0);\n\n#ifdef __APPLE__\n\tmachTimestart=0;\n#endif\n\n\tsendQueue->SetOverflowCallback([](PendingOutgoingPacket p){\n\t\tLOGW(\"Dropping outgoing packet (type %d seq %d) from queue\", p.type, p.seq);\n\t});\n\n\tshared_ptr<Stream> stm=make_shared<Stream>();\n\tstm->id=1;\n\tstm->type=STREAM_TYPE_AUDIO;\n\tstm->codec=CODEC_OPUS;\n\tstm->enabled=1;\n\tstm->frameDuration=60;\n\toutgoingStreams.push_back(stm);\n\n\t/*Stream vstm={0};\n\tvstm.id=2;\n\tvstm.type=STREAM_TYPE_VIDEO;\n\tvstm.codec=CODEC_AVC;\n\tvstm.enabled=1;\n\toutgoingStreams.push_back(vstm);*/\n}\n\nVoIPController::~VoIPController(){\n\tLOGD(\"Entered VoIPController::~VoIPController\");\n\tif(!stopping){\n\t\tLOGE(\"!!!!!!!!!!!!!!!!!!!! CALL controller->Stop() BEFORE DELETING THE CONTROLLER OBJECT !!!!!!!!!!!!!!!!!!!!!!!1\");\n\t\tabort();\n\t}\n\tLOGD(\"before close socket\");\n\tif(udpSocket)\n\t\tdelete udpSocket;\n\tif(udpSocket!=realUdpSocket)\n\t\tdelete realUdpSocket;\n\tfor(vector<shared_ptr<Stream>>::iterator _stm=incomingStreams.begin();_stm!=incomingStreams.end();++_stm){\n\t\t//LOGD(\"before delete jitter buffer\");\n\t\tshared_ptr<Stream> stm=*_stm;\n\t\t/*if(stm->jitterBuffer){\n\t\t\tdelete stm->jitterBuffer;\n\t\t}*/\n\t\tLOGD(\"before stop decoder\");\n\t\tif(stm->decoder){\n\t\t\tstm->decoder->Stop();\n\t\t}\n\t}\n\t//LOGD(\"before delete audio input\");\n\t//if(audioInput){\n\t//\tdelete audioInput;\n\t//}\n\tLOGD(\"before delete encoder\");\n\tif(encoder){\n\t\tencoder->Stop();\n\t\tdelete encoder;\n\t}\n\t//LOGD(\"before delete audio output\");\n\t//if(audioOutput){\n\t\t//delete audioOutput;\n\t\t//audioOutput.reset();\n\t//}\n\t/*for(vector<shared_ptr<Stream>>::iterator stm=incomingStreams.begin();stm!=incomingStreams.end();++stm){\n\t\tLOGD(\"before delete decoder\");\n\t\tif((*stm)->decoder){\n\t\t\tdelete (*stm)->decoder;\n\t\t}\n\t}*/\n\tLOGD(\"before delete echo canceller\");\n\tif(echoCanceller){\n\t\techoCanceller->Stop();\n\t\tdelete echoCanceller;\n\t}\n\tdelete sendQueue;\n\t/*for(i=0;i<queuedPackets.size();i++){\n\t\tif(queuedPackets[i]->data)\n\t\t\tfree(queuedPackets[i]->data);\n\t\tfree(queuedPackets[i]);\n\t}*/\n\tdelete conctl;\n\t/*for(vector<Endpoint*>::iterator itr=endpoints.begin();itr!=endpoints.end();++itr){\n\t\tif((*itr)->socket){\n\t\t\t(*itr)->socket->Close();\n\t\t\tdelete (*itr)->socket;\n\t\t}\n\t\tdelete *itr;\n\t}*/\n\tif(tgvoipLogFile){\n\t\tFILE* log=tgvoipLogFile;\n\t\ttgvoipLogFile=NULL;\n\t\tfclose(log);\n\t}\n\tif(statsDump)\n\t\tfclose(statsDump);\n\tif(resolvedProxyAddress)\n\t\tdelete resolvedProxyAddress;\n\tdelete selectCanceller;\n\tif(outputAGC)\n\t\tdelete outputAGC;\n\tLOGD(\"Left VoIPController::~VoIPController\");\n}\n\nvoid VoIPController::Stop(){\n\tLOGD(\"Entered VoIPController::Stop\");\n\tstopping=true;\n\trunReceiver=false;\n\tLOGD(\"before shutdown socket\");\n\tif(udpSocket)\n\t\tudpSocket->Close();\n\tif(realUdpSocket!=udpSocket)\n\t\trealUdpSocket->Close();\n\tselectCanceller->CancelSelect();\n\tBuffer emptyBuf(0);\n\tPendingOutgoingPacket emptyPacket{0, 0, 0, move(emptyBuf), 0};\n\tsendQueue->Put(move(emptyPacket));\n\tif(openingTcpSocket)\n\t\topeningTcpSocket->Close();\n\tLOGD(\"before join sendThread\");\n\tif(sendThread){\n\t\tsendThread->Join();\n\t\tdelete sendThread;\n\t}\n\tLOGD(\"before join recvThread\");\n\tif(recvThread){\n\t\trecvThread->Join();\n\t\tdelete recvThread;\n\t}\n\tLOGD(\"before stop messageThread\");\n\tmessageThread.Stop();\n\t{\n\t\tLOGD(\"Before stop audio I/O\");\n\t\tMutexGuard m(audioIOMutex);\n\t\tif(audioInput){\n\t\t\taudioInput->Stop();\n\t\t\taudioInput->SetCallback(NULL, NULL);\n\t\t}\n\t\tif(audioOutput){\n\t\t\taudioOutput->Stop();\n\t\t\taudioOutput->SetCallback(NULL, NULL);\n\t\t}\n\t}\n\tLOGD(\"Left VoIPController::Stop\");\n}\n\nvoid VoIPController::SetRemoteEndpoints(vector<Endpoint> endpoints, bool allowP2p, int32_t connectionMaxLayer){\n\tLOGW(\"Set remote endpoints, allowP2P=%d, connectionMaxLayer=%u\", allowP2p ? 1 : 0, connectionMaxLayer);\n\tpreferredRelay=NULL;\n\t{\n\t\tMutexGuard m(endpointsMutex);\n\t\tthis->endpoints.clear();\n\t\tdidAddTcpRelays=false;\n\t\tuseTCP=true;\n\t\tfor(vector<Endpoint>::iterator itrtr=endpoints.begin();itrtr!=endpoints.end();++itrtr){\n\t\t\tthis->endpoints.push_back(make_shared<Endpoint>(*itrtr));\n\t\t\tif(itrtr->type==Endpoint::TYPE_TCP_RELAY)\n\t\t\t\tdidAddTcpRelays=true;\n\t\t\tif(itrtr->type==Endpoint::TYPE_UDP_RELAY)\n\t\t\t\tuseTCP=false;\n\t\t\tLOGV(\"Adding endpoint: %s:%d, %s\", itrtr->address.ToString().c_str(), itrtr->port, itrtr->type==Endpoint::TYPE_UDP_RELAY ? \"UDP\" : \"TCP\");\n\t\t}\n\t}\n\tcurrentEndpoint=this->endpoints[0];\n\tpreferredRelay=currentEndpoint;\n\tthis->allowP2p=allowP2p;\n\tthis->connectionMaxLayer=connectionMaxLayer;\n\tif(connectionMaxLayer>=74){\n\t\tuseMTProto2=true;\n\t}\n\tAddIPv6Relays();\n}\n\nvoid VoIPController::Start(){\n\tLOGW(\"Starting voip controller\");\n\tudpSocket->Open();\n\tif(udpSocket->IsFailed()){\n\t\tSetState(STATE_FAILED);\n\t\treturn;\n\t}\n\n\t//SendPacket(NULL, 0, currentEndpoint);\n\n\trunReceiver=true;\n\trecvThread=new Thread(new MethodPointer<VoIPController>(&VoIPController::RunRecvThread, this), NULL);\n\trecvThread->SetName(\"VoipRecv\");\n\trecvThread->Start();\n\tsendThread=new Thread(new MethodPointer<VoIPController>(&VoIPController::RunSendThread, this), NULL);\n\tsendThread->SetName(\"VoipSend\");\n\tsendThread->Start();\n\n\tmessageThread.Start();\n}\n\nvoid VoIPController::AudioInputCallback(unsigned char* data, size_t length, unsigned char* secondaryData, size_t secondaryLength, void* param){\n\t((VoIPController*)param)->HandleAudioInput(data, length, secondaryData, secondaryLength);\n}\n\nvoid VoIPController::HandleAudioInput(unsigned char *data, size_t len, unsigned char* secondaryData, size_t secondaryLen){\n\tif(stopping)\n\t\treturn;\n\tif(waitingForAcks || dontSendPackets>0 || (unsigned int)unsentStreamPackets>=2){\n\t\tLOGV(\"waiting for queue, dropping outgoing audio packet\");\n\t\treturn;\n\t}\n\t//LOGV(\"Audio packet size %u\", (unsigned int)len);\n\n\tBufferOutputStream pkt(1500);\n\n\tunsigned char flags=(unsigned char) (len>255 ? STREAM_DATA_FLAG_LEN16 : 0);\n\tpkt.WriteByte((unsigned char) (1 | flags)); // streamID + flags\n\tif(len>255)\n\t\tpkt.WriteInt16((int16_t) len);\n\telse\n\t\tpkt.WriteByte((unsigned char) len);\n\tpkt.WriteInt32(audioTimestampOut);\n\tpkt.WriteBytes(data, len);\n\n\tunsentStreamPackets++;\n\tPendingOutgoingPacket p{\n\t\t\t/*.seq=*/GenerateOutSeq(),\n\t\t\t/*.type=*/PKT_STREAM_DATA,\n\t\t\t/*.len=*/pkt.GetLength(),\n\t\t\t/*.data=*/Buffer(move(pkt)),\n\t\t\t/*.endpoint=*/0,\n\t};\n\tsendQueue->Put(move(p));\n\tif(secondaryData && secondaryLen && shittyInternetMode){\n\t\tBuffer ecBuf(secondaryLen);\n\t\tecBuf.CopyFrom(secondaryData, 0, secondaryLen);\n\t\tecAudioPackets.push_back(move(ecBuf));\n\t\twhile(ecAudioPackets.size()>4)\n\t\t\tecAudioPackets.erase(ecAudioPackets.begin());\n\t\tpkt=BufferOutputStream(1500);\n\t\tpkt.WriteByte(outgoingStreams[0]->id);\n\t\tpkt.WriteInt32(audioTimestampOut);\n\t\tpkt.WriteByte((unsigned char)ecAudioPackets.size());\n\t\tfor(Buffer& ecData:ecAudioPackets){\n\t\t\tpkt.WriteByte((unsigned char)ecData.Length());\n\t\t\tpkt.WriteBytes(ecData);\n\t\t}\n\n\t\tPendingOutgoingPacket p{\n\t\t\t\tGenerateOutSeq(),\n\t\t\t\tPKT_STREAM_EC,\n\t\t\t\tpkt.GetLength(),\n\t\t\t\tBuffer(move(pkt)),\n\t\t\t\t0\n\t\t};\n\t\tsendQueue->Put(move(p));\n\t}\n\n\taudioTimestampOut+=outgoingStreams[0]->frameDuration;\n}\n\nvoid VoIPController::HandleVideoInput(EncodedVideoFrame& frame){\n\tif(stopping)\n\t\treturn;\n\tif(waitingForAcks || dontSendPackets>0 || networkType==NET_TYPE_EDGE || networkType==NET_TYPE_GPRS){\n\t\tLOGV(\"dropping outgoing video packet\");\n\t\treturn;\n\t}\n\n\n}\n\nvoid VoIPController::Connect(){\n\tassert(state!=STATE_WAIT_INIT_ACK);\n\tif(proxyProtocol==PROXY_SOCKS5){\n\t\tresolvedProxyAddress=NetworkSocket::ResolveDomainName(proxyAddress);\n\t\tif(!resolvedProxyAddress){\n\t\t\tLOGW(\"Error resolving proxy address %s\", proxyAddress.c_str());\n\t\t\tSetState(STATE_FAILED);\n\t\t\treturn;\n\t\t}\n\t\tInitUDPProxy();\n\t}\n\tconnectionInitTime=GetCurrentTime();\n\tif(config.initTimeout==0.0){\n\t\tLOGE(\"Init timeout is 0 -- did you forget to set config?\");\n\t\tconfig.initTimeout=30.0;\n\t}\n\n\tInitializeTimers();\n\tSendInit();\n}\n\nvoid VoIPController::InitializeTimers(){\n\tinitTimeoutID=messageThread.Post([this]{\n\t\tLOGW(\"Init timeout, disconnecting\");\n\t\tlastError=ERROR_TIMEOUT;\n\t\tSetState(STATE_FAILED);\n\t}, config.initTimeout);\n\n\tif(!config.statsDumpFilePath.empty()){\n\t\tmessageThread.Post([this]{\n\t\t\tif(statsDump && incomingStreams.size()==1){\n\t\t\t\tshared_ptr<JitterBuffer>& jitterBuffer=incomingStreams[0]->jitterBuffer;\n\t\t\t\t//fprintf(statsDump, \"Time\\tRTT\\tLISeq\\tLASeq\\tCWnd\\tBitrate\\tJitter\\tJDelay\\tAJDelay\\n\");\n\t\t\t\tfprintf(statsDump, \"%.3f\\t%.3f\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\t%d\\t%.3f\\t%.3f\\t%.3f\\n\",\n\t\t\t\t\t\tGetCurrentTime()-connectionInitTime,\n\t\t\t\t\t\tcurrentEndpoint->rtts[0],\n\t\t\t\t\t\tlastRemoteSeq,\n\t\t\t\t\t\tseq,\n\t\t\t\t\t\tlastRemoteAckSeq,\n\t\t\t\t\t\trecvLossCount,\n\t\t\t\t\t\tconctl ? conctl->GetSendLossCount() : 0,\n\t\t\t\t\t\tconctl ? (int)conctl->GetInflightDataSize() : 0,\n\t\t\t\t\t\tencoder ? encoder->GetBitrate() : 0,\n\t\t\t\t\t\tencoder ? encoder->GetPacketLoss() : 0,\n\t\t\t\t\t\tjitterBuffer ? jitterBuffer->GetLastMeasuredJitter() : 0,\n\t\t\t\t\t\tjitterBuffer ? jitterBuffer->GetLastMeasuredDelay()*0.06 : 0,\n\t\t\t\t\t\tjitterBuffer ? jitterBuffer->GetAverageDelay()*0.06 : 0);\n\t\t\t}\n\t\t}, 0.1, 0.1);\n\t}\n\n\tudpConnectivityState=UDP_PING_PENDING;\n\tudpPingTimeoutID=messageThread.Post(std::bind(&VoIPController::SendUdpPings, this), 0.0, 0.5);\n\tmessageThread.Post(std::bind(&VoIPController::SendRelayPings, this), 0.0, 2.0);\n}\n\n\nvoid VoIPController::SetEncryptionKey(char *key, bool isOutgoing){\n\tmemcpy(encryptionKey, key, 256);\n\tuint8_t sha1[SHA1_LENGTH];\n\tcrypto.sha1((uint8_t*) encryptionKey, 256, sha1);\n\tmemcpy(keyFingerprint, sha1+(SHA1_LENGTH-8), 8);\n\tuint8_t sha256[SHA256_LENGTH];\n\tcrypto.sha256((uint8_t*) encryptionKey, 256, sha256);\n\tmemcpy(callID, sha256+(SHA256_LENGTH-16), 16);\n\tthis->isOutgoing=isOutgoing;\n}\n\nuint32_t VoIPController::GenerateOutSeq(){\n\treturn seq++;\n}\n\nvoid VoIPController::WritePacketHeader(uint32_t pseq, BufferOutputStream *s, unsigned char type, uint32_t length){\n\tuint32_t acks=0;\n\tint i;\n\tfor(i=0;i<32;i++){\n\t\tif(recvPacketTimes[i]>0)\n\t\t\tacks|=1;\n\t\tif(i<31)\n\t\t\tacks<<=1;\n\t}\n\n\tif(state==STATE_WAIT_INIT || state==STATE_WAIT_INIT_ACK){\n\t\ts->WriteInt32(TLID_DECRYPTED_AUDIO_BLOCK);\n\t\tint64_t randomID;\n\t\tcrypto.rand_bytes((uint8_t *) &randomID, 8);\n\t\ts->WriteInt64(randomID);\n\t\tunsigned char randBytes[7];\n\t\tcrypto.rand_bytes(randBytes, 7);\n\t\ts->WriteByte(7);\n\t\ts->WriteBytes(randBytes, 7);\n\t\tuint32_t pflags=PFLAG_HAS_RECENT_RECV | PFLAG_HAS_SEQ;\n\t\tif(length>0)\n\t\t\tpflags|=PFLAG_HAS_DATA;\n\t\tif(state==STATE_WAIT_INIT || state==STATE_WAIT_INIT_ACK){\n\t\t\tpflags|=PFLAG_HAS_CALL_ID | PFLAG_HAS_PROTO;\n\t\t}\n\t\tpflags|=((uint32_t) type) << 24;\n\t\ts->WriteInt32(pflags);\n\n\t\tif(pflags & PFLAG_HAS_CALL_ID){\n\t\t\ts->WriteBytes(callID, 16);\n\t\t}\n\t\ts->WriteInt32(lastRemoteSeq);\n\t\ts->WriteInt32(pseq);\n\t\ts->WriteInt32(acks);\n\t\tif(pflags & PFLAG_HAS_PROTO){\n\t\t\ts->WriteInt32(PROTOCOL_NAME);\n\t\t}\n\t\tif(length>0){\n\t\t\tif(length<=253){\n\t\t\t\ts->WriteByte((unsigned char) length);\n\t\t\t}else{\n\t\t\t\ts->WriteByte(254);\n\t\t\t\ts->WriteByte((unsigned char) (length & 0xFF));\n\t\t\t\ts->WriteByte((unsigned char) ((length >> 8) & 0xFF));\n\t\t\t\ts->WriteByte((unsigned char) ((length >> 16) & 0xFF));\n\t\t\t}\n\t\t}\n\t}else{\n\t\ts->WriteInt32(TLID_SIMPLE_AUDIO_BLOCK);\n\t\tint64_t randomID;\n\t\tcrypto.rand_bytes((uint8_t *) &randomID, 8);\n\t\ts->WriteInt64(randomID);\n\t\tunsigned char randBytes[7];\n\t\tcrypto.rand_bytes(randBytes, 7);\n\t\ts->WriteByte(7);\n\t\ts->WriteBytes(randBytes, 7);\n\t\tuint32_t lenWithHeader=length+13;\n\t\tif(lenWithHeader>0){\n\t\t\tif(lenWithHeader<=253){\n\t\t\t\ts->WriteByte((unsigned char) lenWithHeader);\n\t\t\t}else{\n\t\t\t\ts->WriteByte(254);\n\t\t\t\ts->WriteByte((unsigned char) (lenWithHeader & 0xFF));\n\t\t\t\ts->WriteByte((unsigned char) ((lenWithHeader >> 8) & 0xFF));\n\t\t\t\ts->WriteByte((unsigned char) ((lenWithHeader >> 16) & 0xFF));\n\t\t\t}\n\t\t}\n\t\ts->WriteByte(type);\n\t\ts->WriteInt32(lastRemoteSeq);\n\t\ts->WriteInt32(pseq);\n\t\ts->WriteInt32(acks);\n\t\tif(peerVersion>=6){\n\t\t\tMutexGuard m(queuedPacketsMutex);\n\t\t\tif(currentExtras.empty()){\n\t\t\t\ts->WriteByte(0);\n\t\t\t}else{\n\t\t\t\ts->WriteByte(XPFLAG_HAS_EXTRA);\n\t\t\t\ts->WriteByte(static_cast<unsigned char>(currentExtras.size()));\n\t\t\t\tfor(vector<UnacknowledgedExtraData>::iterator x=currentExtras.begin();x!=currentExtras.end();++x){\n\t\t\t\t\tLOGV(\"Writing extra into header: type %u, length %lu\", x->type, x->data.Length());\n\t\t\t\t\tassert(x->data.Length()<=254);\n\t\t\t\t\ts->WriteByte(static_cast<unsigned char>(x->data.Length()+1));\n\t\t\t\t\ts->WriteByte(x->type);\n\t\t\t\t\ts->WriteBytes(*x->data, x->data.Length());\n\t\t\t\t\tif(x->firstContainingSeq==0)\n\t\t\t\t\t\tx->firstContainingSeq=pseq;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif(type==PKT_STREAM_DATA || type==PKT_STREAM_DATA_X2 || type==PKT_STREAM_DATA_X3)\n\t\tconctl->PacketSent(pseq, length);\n\n\tMutexGuard m(queuedPacketsMutex);\n\trecentOutgoingPackets.push_back(RecentOutgoingPacket{\n\t\t\tpseq,\n\t\t\t0,\n\t\t\tGetCurrentTime(),\n\t\t\t0\n\t});\n\twhile(recentOutgoingPackets.size()>MAX_RECENT_PACKETS)\n\t\trecentOutgoingPackets.erase(recentOutgoingPackets.begin());\n\tlastSentSeq=pseq;\n\t//LOGI(\"packet header size %d\", s->GetLength());\n}\n\n\nvoid VoIPController::UpdateAudioBitrateLimit(){\n\tif(encoder){\n\t\tif(dataSavingMode || dataSavingRequestedByPeer){\n\t\t\tmaxBitrate=maxAudioBitrateSaving;\n\t\t\tencoder->SetBitrate(initAudioBitrateSaving);\n\t\t}else if(networkType==NET_TYPE_GPRS){\n\t\t\tmaxBitrate=maxAudioBitrateGPRS;\n\t\t\tencoder->SetBitrate(initAudioBitrateGPRS);\n\t\t}else if(networkType==NET_TYPE_EDGE){\n\t\t\tmaxBitrate=maxAudioBitrateEDGE;\n\t\t\tencoder->SetBitrate(initAudioBitrateEDGE);\n\t\t}else{\n\t\t\tmaxBitrate=maxAudioBitrate;\n\t\t\tencoder->SetBitrate(initAudioBitrate);\n\t\t}\n\t}\n}\n\n\nvoid VoIPController::SendInit(){\n\t{\n\t\tMutexGuard m(endpointsMutex);\n\t\tuint32_t initSeq=GenerateOutSeq();\n\t\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\t\tif(e->type==Endpoint::TYPE_TCP_RELAY && !useTCP)\n\t\t\t\tcontinue;\n\t\t\tBufferOutputStream out(1024);\n\t\t\tout.WriteInt32(PROTOCOL_VERSION);\n\t\t\tout.WriteInt32(MIN_PROTOCOL_VERSION);\n\t\t\tuint32_t flags=0;\n\t\t\tif(config.enableCallUpgrade)\n\t\t\t\tflags|=INIT_FLAG_GROUP_CALLS_SUPPORTED;\n\t\t\tif(dataSavingMode)\n\t\t\t\tflags|=INIT_FLAG_DATA_SAVING_ENABLED;\n\t\t\tout.WriteInt32(flags);\n\t\t\tif(connectionMaxLayer<74){\n\t\t\t\tout.WriteByte(2); // audio codecs count\n\t\t\t\tout.WriteByte(CODEC_OPUS_OLD);\n\t\t\t\tout.WriteByte(0);\n\t\t\t\tout.WriteByte(0);\n\t\t\t\tout.WriteByte(0);\n\t\t\t\tout.WriteInt32(CODEC_OPUS);\n\t\t\t\tout.WriteByte(0); // video codecs count (decode)\n\t\t\t\tout.WriteByte(0); // video codecs count (encode)\n\t\t\t}else{\n\t\t\t\tout.WriteByte(1);\n\t\t\t\tout.WriteInt32(CODEC_OPUS);\n\t\t\t\t/*out.WriteByte(1);\n\t\t\t\tout.WriteInt32(CODEC_AVC);\n\t\t\t\tout.WriteByte(1);\n\t\t\t\tout.WriteInt32(CODEC_AVC);*/\n\t\t\t\tout.WriteByte(0);\n\t\t\t\tout.WriteByte(0);\n\t\t\t}\n\t\t\tsendQueue->Put(PendingOutgoingPacket{\n\t\t\t\t\t/*.seq=*/initSeq,\n\t\t\t\t\t/*.type=*/PKT_INIT,\n\t\t\t\t\t/*.len=*/out.GetLength(),\n\t\t\t\t\t/*.data=*/Buffer(move(out)),\n\t\t\t\t\t/*.endpoint=*/e->id\n\t\t\t});\n\t\t}\n\t}\n\tif(state==STATE_WAIT_INIT)\n\t\tSetState(STATE_WAIT_INIT_ACK);\n\tmessageThread.Post([this]{\n\t\tif(state==STATE_WAIT_INIT_ACK){\n\t\t\tSendInit();\n\t\t}\n\t}, 0.5);\n}\n\nvoid VoIPController::InitUDPProxy(){\n\tif(realUdpSocket!=udpSocket){\n\t\tudpSocket->Close();\n\t\tdelete udpSocket;\n\t\tudpSocket=realUdpSocket;\n\t}\n\tNetworkSocket* tcp=NetworkSocket::Create(PROTO_TCP);\n\ttcp->Connect(resolvedProxyAddress, proxyPort);\n\tif(tcp->IsFailed()){\n\t\tlastError=ERROR_PROXY;\n\t\tSetState(STATE_FAILED);\n\t\ttcp->Close();\n\t\tdelete tcp;\n\t\treturn;\n\t}\n\tNetworkSocketSOCKS5Proxy* udpProxy=new NetworkSocketSOCKS5Proxy(tcp, udpSocket, proxyUsername, proxyPassword);\n\tudpProxy->InitConnection();\n\tudpProxy->Open();\n\tif(udpProxy->IsFailed()){\n\t\tudpProxy->Close();\n\t\tdelete udpProxy;\n\t\tuseTCP=true;\n\t\tuseUDP=false;\n\t\tudpConnectivityState=UDP_NOT_AVAILABLE;\n\t}else{\n\t\tudpSocket=udpProxy;\n\t}\n}\n\nvoid VoIPController::RunRecvThread(void* arg){\n\tLOGI(\"Receive thread starting\");\n\tunsigned char *buffer = (unsigned char *)malloc(1500);\n\tNetworkPacket packet={0};\n\twhile(runReceiver){\n\t\tpacket.data=buffer;\n\t\tpacket.length=1500;\n\n\t\tvector<NetworkSocket*> readSockets;\n\t\tvector<NetworkSocket*> errorSockets;\n\t\treadSockets.push_back(udpSocket);\n\t\terrorSockets.push_back(realUdpSocket);\n\n\t\t{\n\t\t\tMutexGuard m(endpointsMutex);\n\t\t\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\t\t\tif(e->type==Endpoint::TYPE_TCP_RELAY){\n\t\t\t\t\tif(e->socket){\n\t\t\t\t\t\treadSockets.push_back(e->socket);\n\t\t\t\t\t\terrorSockets.push_back(e->socket);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t{\n\t\t\tMutexGuard m(socketSelectMutex);\n\t\t\tbool selRes=NetworkSocket::Select(readSockets, errorSockets, selectCanceller);\n\t\t\tif(!selRes){\n\t\t\t\tLOGV(\"Select canceled\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif(!runReceiver)\n\t\t\treturn;\n\n\t\tif(!errorSockets.empty()){\n\t\t\tif(find(errorSockets.begin(), errorSockets.end(), realUdpSocket)!=errorSockets.end()){\n\t\t\t\tLOGW(\"UDP socket failed\");\n\t\t\t\tSetState(STATE_FAILED);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tMutexGuard m(endpointsMutex);\n\t\t\tfor(vector<NetworkSocket*>::iterator itr=errorSockets.begin();itr!=errorSockets.end();++itr){\n\t\t\t\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\t\t\t\tif(e->socket && e->socket==*itr){\n\t\t\t\t\t\te->socket->Close();\n\t\t\t\t\t\tdelete e->socket;\n\t\t\t\t\t\te->socket=NULL;\n\t\t\t\t\t\tLOGI(\"Closing failed TCP socket for %s:%u\", e->GetAddress().ToString().c_str(), e->port);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\t//NetworkSocket* socket=NULL;\n\n\t\t/*if(find(readSockets.begin(), readSockets.end(), realUdpSocket)!=readSockets.end()){\n\t\t\tsocket=udpSocket;\n\t\t}else if(readSockets.size()>0){\n\t\t\tsocket=readSockets[0];\n\t\t}else{\n\t\t\tLOGI(\"no sockets to read from\");\n\t\t\tcontinue;\n\t\t}*/\n\n\t\tfor(NetworkSocket*& socket:readSockets){\n\t\t\tsocket->Receive(&packet);\n\t\t\tif(!packet.address){\n\t\t\t\tLOGE(\"Packet has null address. This shouldn't happen.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tsize_t len=packet.length;\n\t\t\tif(!len){\n\t\t\t\tLOGE(\"Packet has zero length.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//LOGV(\"Received %d bytes from %s:%d at %.5lf\", len, packet.address->ToString().c_str(), packet.port, GetCurrentTime());\n\t\t\tshared_ptr<Endpoint> srcEndpoint;\n\n\t\t\tIPv4Address *src4=dynamic_cast<IPv4Address *>(packet.address);\n\t\t\tif(src4){\n\t\t\t\tMutexGuard m(endpointsMutex);\n\t\t\t\tfor(shared_ptr<Endpoint> &e:endpoints){\n\t\t\t\t\tif(e->address==*src4 && e->port==packet.port){\n\t\t\t\t\t\tif((e->type!=Endpoint::TYPE_TCP_RELAY && packet.protocol==PROTO_UDP) || (e->type==Endpoint::TYPE_TCP_RELAY && packet.protocol==PROTO_TCP)){\n\t\t\t\t\t\t\tsrcEndpoint=e;\n\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}else{\n\t\t\t\tIPv6Address *src6=dynamic_cast<IPv6Address *>(packet.address);\n\t\t\t\tif(src6){\n\t\t\t\t\tMutexGuard m(endpointsMutex);\n\t\t\t\t\tfor(shared_ptr<Endpoint> &e:endpoints){\n\t\t\t\t\t\tif(e->v6address==*src6 && e->port==packet.port && e->address.IsEmpty()){\n\t\t\t\t\t\t\tif((e->type!=Endpoint::TYPE_TCP_RELAY && packet.protocol==PROTO_UDP) || (e->type==Endpoint::TYPE_TCP_RELAY && packet.protocol==PROTO_TCP)){\n\t\t\t\t\t\t\t\tsrcEndpoint=e;\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\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!srcEndpoint){\n\t\t\t\tLOGW(\"Received a packet from unknown source %s:%u\", packet.address->ToString().c_str(), packet.port);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(len<=0){\n\t\t\t\t//LOGW(\"error receiving: %d / %s\", errno, strerror(errno));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(IS_MOBILE_NETWORK(networkType))\n\t\t\t\tstats.bytesRecvdMobile+=(uint64_t) len;\n\t\t\telse\n\t\t\t\tstats.bytesRecvdWifi+=(uint64_t) len;\n\t\t\ttry{\n\t\t\t\tProcessIncomingPacket(packet, srcEndpoint);\n\t\t\t}catch(out_of_range& x){\n\t\t\t\tLOGW(\"Error parsing packet: %s\", x.what());\n\t\t\t}\n\t\t}\n\t}\n\tfree(buffer);\n\tLOGI(\"=== recv thread exiting ===\");\n}\n\nvoid VoIPController::RunSendThread(void* arg){\n\tunsigned char buf[1500];\n\twhile(runReceiver){\n\t\tPendingOutgoingPacket pkt=sendQueue->GetBlocking();\n\t\t//if(pkt.data.Length()){\n\t\t\tshared_ptr<Endpoint> endpoint;\n\t\t\tif(pkt.endpoint){\n\t\t\t\tendpoint=GetEndpointByID(pkt.endpoint);\n\t\t\t}\n\t\t\tif(!endpoint){ // either packet has no endpoint specified or it no longer exists\n\t\t\t\tendpoint=currentEndpoint;\n\t\t\t}\n\t\t\tif((endpoint->type==Endpoint::TYPE_TCP_RELAY && useTCP) || (endpoint->type!=Endpoint::TYPE_TCP_RELAY && useUDP)){\n\t\t\t\tBufferOutputStream p(buf, sizeof(buf));\n\t\t\t\tWritePacketHeader(pkt.seq, &p, pkt.type, (uint32_t)pkt.len);\n\t\t\t\tp.WriteBytes(pkt.data);\n\t\t\t\tif(pkt.type==PKT_STREAM_DATA){\n\t\t\t\t\tunsentStreamPackets--;\n\t\t\t\t}\n\t\t\t\tSendPacket(p.GetBuffer(), p.GetLength(), endpoint, pkt);\n\t\t\t}\n\t\t//}else{\n\t\t//\tLOGE(\"tried to send null packet\");\n\t\t//}\n\t}\n\tLOGI(\"=== send thread exiting ===\");\n}\n\nvoid VoIPController::ProcessIncomingPacket(NetworkPacket &packet, shared_ptr<Endpoint> srcEndpoint){\n\tunsigned char* buffer=packet.data;\n\tsize_t len=packet.length;\n\tBufferInputStream in(buffer, (size_t)len);\n\tif(memcmp(buffer, srcEndpoint->type==Endpoint::TYPE_UDP_RELAY || srcEndpoint->type==Endpoint::TYPE_TCP_RELAY ? (void*)srcEndpoint->peerTag : (void*)callID, 16)!=0){\n\t\tLOGW(\"Received packet has wrong peerTag\");\n\t\treturn;\n\t}\n\tin.Seek(16);\n\tif(in.Remaining()>=16 && (srcEndpoint->type==Endpoint::TYPE_UDP_RELAY || srcEndpoint->type==Endpoint::TYPE_TCP_RELAY)\n\t   && *reinterpret_cast<uint64_t*>(buffer+16)==0xFFFFFFFFFFFFFFFFLL && *reinterpret_cast<uint32_t*>(buffer+24)==0xFFFFFFFF){\n\t\t// relay special request response\n\t\tin.Seek(16+12);\n\t\tuint32_t tlid=(uint32_t) in.ReadInt32();\n\n\t\tif(tlid==TLID_UDP_REFLECTOR_SELF_INFO){\n\t\t\tif(srcEndpoint->type==Endpoint::TYPE_UDP_RELAY /*&& udpConnectivityState==UDP_PING_SENT*/ && in.Remaining()>=32){\n\t\t\t\tint32_t date=in.ReadInt32();\n\t\t\t\tint64_t queryID=in.ReadInt64();\n\t\t\t\tunsigned char myIP[16];\n\t\t\t\tin.ReadBytes(myIP, 16);\n\t\t\t\tint32_t myPort=in.ReadInt32();\n\t\t\t\t//udpConnectivityState=UDP_AVAILABLE;\n\t\t\t\tLOGV(\"Received UDP ping reply from %s:%d: date=%d, queryID=%ld, my IP=%s, my port=%d\", srcEndpoint->address.ToString().c_str(), srcEndpoint->port, date, (long int)queryID, IPv4Address(*reinterpret_cast<uint32_t*>(myIP+12)).ToString().c_str(), myPort);\n\t\t\t\tsrcEndpoint->udpPongCount++;\n\t\t\t\tif(srcEndpoint->IsIPv6Only() && !didSendIPv6Endpoint){\n\t\t\t\t\tIPv6Address realAddr(myIP);\n\t\t\t\t\tif(realAddr==myIPv6){\n\t\t\t\t\t\tLOGI(\"Public IPv6 matches local address\");\n\t\t\t\t\t\tuseIPv6=true;\n\t\t\t\t\t\tif(allowP2p){\n\t\t\t\t\t\t\tdidSendIPv6Endpoint=true;\n\t\t\t\t\t\t\tBufferOutputStream o(18);\n\t\t\t\t\t\t\to.WriteBytes(myIP, 16);\n\t\t\t\t\t\t\to.WriteInt16(udpSocket->GetLocalPort());\n\t\t\t\t\t\t\tBuffer b(move(o));\n\t\t\t\t\t\t\tSendExtra(b, EXTRA_TYPE_IPV6_ENDPOINT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(tlid==TLID_UDP_REFLECTOR_PEER_INFO){\n\t\t\tif(waitingForRelayPeerInfo && in.Remaining()>=16){\n\t\t\t\tMutexGuard _m(endpointsMutex);\n\t\t\t\tuint32_t myAddr=(uint32_t) in.ReadInt32();\n\t\t\t\tuint32_t myPort=(uint32_t) in.ReadInt32();\n\t\t\t\tuint32_t peerAddr=(uint32_t) in.ReadInt32();\n\t\t\t\tuint32_t peerPort=(uint32_t) in.ReadInt32();\n\t\t\t\tfor(vector<shared_ptr<Endpoint>>::iterator itrtr=endpoints.begin(); itrtr!=endpoints.end(); ++itrtr){\n\t\t\t\t\tshared_ptr<Endpoint>  ep=*itrtr;\n\t\t\t\t\tif(ep->type==Endpoint::TYPE_UDP_P2P_INET && !ep->IsIPv6Only()){\n\t\t\t\t\t\tif(currentEndpoint==ep)\n\t\t\t\t\t\t\tcurrentEndpoint=preferredRelay;\n\t\t\t\t\t\tendpoints.erase(itrtr);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(vector<shared_ptr<Endpoint>>::iterator itrtr=endpoints.begin(); itrtr!=endpoints.end(); ++itrtr){\n\t\t\t\t\tshared_ptr<Endpoint> ep=*itrtr;\n\t\t\t\t\tif(ep->type==Endpoint::TYPE_UDP_P2P_LAN){\n\t\t\t\t\t\tif(currentEndpoint==ep)\n\t\t\t\t\t\t\tcurrentEndpoint=preferredRelay;\n\t\t\t\t\t\tendpoints.erase(itrtr);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tIPv4Address _peerAddr(peerAddr);\n\t\t\t\tIPv6Address emptyV6(string(\"::0\"));\n\t\t\t\tunsigned char peerTag[16];\n\t\t\t\tendpoints.push_back(make_shared<Endpoint>((int64_t)(FOURCC('P','2','P','4')) << 32, (uint16_t) peerPort, _peerAddr, emptyV6, Endpoint::TYPE_UDP_P2P_INET, peerTag));\n\t\t\t\tLOGW(\"Received reflector peer info, my=%08X:%u, peer=%08X:%u\", myAddr, myPort, peerAddr, peerPort);\n\t\t\t\tif(myAddr==peerAddr){\n\t\t\t\t\tLOGW(\"Detected LAN\");\n\t\t\t\t\tIPv4Address lanAddr(0);\n\t\t\t\t\tudpSocket->GetLocalInterfaceInfo(&lanAddr, NULL);\n\n\t\t\t\t\tBufferOutputStream pkt(8);\n\t\t\t\t\tpkt.WriteInt32(lanAddr.GetAddress());\n\t\t\t\t\tpkt.WriteInt32(udpSocket->GetLocalPort());\n\t\t\t\t\tif(peerVersion<6){\n\t\t\t\t\t\tSendPacketReliably(PKT_LAN_ENDPOINT, pkt.GetBuffer(), pkt.GetLength(), 0.5, 10);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tBuffer buf(move(pkt));\n\t\t\t\t\t\tSendExtra(buf, EXTRA_TYPE_LAN_ENDPOINT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twaitingForRelayPeerInfo=false;\n\t\t\t}\n\t\t}else{\n\t\t\tLOGV(\"Received relay response with unknown tl id: 0x%08X\", tlid);\n\t\t}\n\t\treturn;\n\t}\n\tif(in.Remaining()<40){\n\t\tLOGV(\"Received packet is too small\");\n\t\treturn;\n\t}\n\n\tbool retryWith2=false;\n\n\tif(!useMTProto2){\n\t\tunsigned char fingerprint[8], msgHash[16];\n\t\tin.ReadBytes(fingerprint, 8);\n\t\tin.ReadBytes(msgHash, 16);\n\t\tif(memcmp(fingerprint, keyFingerprint, 8)!=0){\n\t\t\tLOGW(\"Received packet has wrong key fingerprint\");\n\t\t\treturn;\n\t\t}\n\t\tunsigned char key[32], iv[32];\n\t\tKDF(msgHash, isOutgoing ? 8 : 0, key, iv);\n\t\tunsigned char aesOut[MSC_STACK_FALLBACK(in.Remaining(), 1500)];\n\t\tif(in.Remaining()>sizeof(aesOut))\n\t\t\treturn;\n\t\tcrypto.aes_ige_decrypt((unsigned char *) buffer+in.GetOffset(), aesOut, in.Remaining(), key, iv);\n\t\tBufferInputStream _in(aesOut, in.Remaining());\n\t\tunsigned char sha[SHA1_LENGTH];\n\t\tuint32_t _len=(uint32_t) _in.ReadInt32();\n\t\tif(_len>_in.Remaining())\n\t\t\t_len=_in.Remaining();\n\t\tcrypto.sha1((uint8_t *) (aesOut), (size_t) (_len+4), sha);\n\t\tif(memcmp(msgHash, sha+(SHA1_LENGTH-16), 16)!=0){\n\t\t\tLOGW(\"Received packet has wrong hash after decryption\");\n\t\t\tif(state==STATE_WAIT_INIT || state==STATE_WAIT_INIT_ACK)\n\t\t\t\tretryWith2=true;\n\t\t\telse\n\t\t\t\treturn;\n\t\t}else{\n\t\t\tmemcpy(buffer+in.GetOffset(), aesOut, in.Remaining());\n\t\t\tin.ReadInt32();\n\t\t}\n\t}\n\n\tif(useMTProto2 || retryWith2){\n\t\tin.Seek(16); // peer tag\n\n\t\tunsigned char fingerprint[8], msgKey[16];\n\t\tin.ReadBytes(fingerprint, 8);\n\t\tif(memcmp(fingerprint, keyFingerprint, 8)!=0){\n\t\t\tLOGW(\"Received packet has wrong key fingerprint\");\n\t\t\treturn;\n\t\t}\n\t\tin.ReadBytes(msgKey, 16);\n\n\t\tunsigned char decrypted[1500];\n\t\tunsigned char aesKey[32], aesIv[32];\n\t\tKDF2(msgKey, isOutgoing ? 8 : 0, aesKey, aesIv);\n\t\tsize_t decryptedLen=in.Remaining();\n\t\tif(decryptedLen>sizeof(decrypted))\n\t\t\treturn;\n\t\t//LOGV(\"-> MSG KEY: %08x %08x %08x %08x, hashed %u\", *reinterpret_cast<int32_t*>(msgKey), *reinterpret_cast<int32_t*>(msgKey+4), *reinterpret_cast<int32_t*>(msgKey+8), *reinterpret_cast<int32_t*>(msgKey+12), decryptedLen-4);\n\n\t\t/*uint8_t *decryptOffset = packet.data + in.GetOffset();\n\t\tif ((((intptr_t)decryptOffset) % sizeof(long)) != 0) {\n\t\t\tLOGE(\"alignment2 packet.data+in.GetOffset()\");\n\t\t}\n\t\tif (decryptedLen % sizeof(long) != 0) {\n\t\t\tLOGE(\"alignment2 decryptedLen\");\n\t\t}*/\n\t\tcrypto.aes_ige_decrypt(packet.data+in.GetOffset(), decrypted, decryptedLen, aesKey, aesIv);\n\n\t\tin=BufferInputStream(decrypted, decryptedLen);\n\t\t//LOGD(\"received packet length: %d\", in.ReadInt32());\n\n\t\tBufferOutputStream buf(decryptedLen+32);\n\t\tsize_t x=isOutgoing ? 8 : 0;\n\t\tbuf.WriteBytes(encryptionKey+88+x, 32);\n\t\tbuf.WriteBytes(decrypted+4, decryptedLen-4);\n\t\tunsigned char msgKeyLarge[32];\n\t\tcrypto.sha256(buf.GetBuffer(), buf.GetLength(), msgKeyLarge);\n\n\t\tif(memcmp(msgKey, msgKeyLarge+8, 16)!=0){\n\t\t\tLOGW(\"Received packet has wrong hash\");\n\t\t\treturn;\n\t\t}\n\n\t\tuint32_t innerLen=(uint32_t) in.ReadInt32();\n\t\tif(innerLen>decryptedLen-4){\n\t\t\tLOGW(\"Received packet has wrong inner length (%d with total of %u)\", (int)innerLen, (unsigned int)decryptedLen);\n\t\t\treturn;\n\t\t}\n\t\tif(decryptedLen-innerLen<12){\n\t\t\tLOGW(\"Received packet has too little padding (%u)\", (unsigned int)(decryptedLen-innerLen));\n\t\t\treturn;\n\t\t}\n\t\tmemcpy(buffer, decrypted+4, innerLen);\n\t\tin=BufferInputStream(buffer, (size_t) innerLen);\n\t\tif(retryWith2){\n\t\t\tLOGD(\"Successfully decrypted packet in MTProto2.0 fallback, upgrading\");\n\t\t\tuseMTProto2=true;\n\t\t}\n\t}\n\n\tlastRecvPacketTime=GetCurrentTime();\n\n\tif(state==STATE_RECONNECTING){\n\t\tLOGI(\"Received a valid packet while reconnecting - setting state to established\");\n\t\tSetState(STATE_ESTABLISHED);\n\t}\n\n\t/*decryptedAudioBlock random_id:long random_bytes:string flags:# voice_call_id:flags.2?int128 in_seq_no:flags.4?int out_seq_no:flags.4?int\n * recent_received_mask:flags.5?int proto:flags.3?int extra:flags.1?string raw_data:flags.0?string = DecryptedAudioBlock\nsimpleAudioBlock random_id:long random_bytes:string raw_data:string = DecryptedAudioBlock;\n*/\n\tuint32_t ackId, pseq, acks;\n\tunsigned char type, pflags;\n\tuint32_t tlid=(uint32_t) in.ReadInt32();\n\tuint32_t packetInnerLen=0;\n\tif(tlid==TLID_DECRYPTED_AUDIO_BLOCK){\n\t\tin.ReadInt64(); // random id\n\t\tuint32_t randLen=(uint32_t) in.ReadTlLength();\n\t\tin.Seek(in.GetOffset()+randLen+pad4(randLen));\n\t\tuint32_t flags=(uint32_t) in.ReadInt32();\n\t\ttype=(unsigned char) ((flags >> 24) & 0xFF);\n\t\tif(!(flags & PFLAG_HAS_SEQ && flags & PFLAG_HAS_RECENT_RECV)){\n\t\t\tLOGW(\"Received packet doesn't have PFLAG_HAS_SEQ, PFLAG_HAS_RECENT_RECV, or both\");\n\n\t\t\treturn;\n\t\t}\n\t\tif(flags & PFLAG_HAS_CALL_ID){\n\t\t\tunsigned char pktCallID[16];\n\t\t\tin.ReadBytes(pktCallID, 16);\n\t\t\tif(memcmp(pktCallID, callID, 16)!=0){\n\t\t\t\tLOGW(\"Received packet has wrong call id\");\n\n\t\t\t\tlastError=ERROR_UNKNOWN;\n\t\t\t\tSetState(STATE_FAILED);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tackId=(uint32_t) in.ReadInt32();\n\t\tpseq=(uint32_t) in.ReadInt32();\n\t\tacks=(uint32_t) in.ReadInt32();\n\t\tif(flags & PFLAG_HAS_PROTO){\n\t\t\tuint32_t proto=(uint32_t) in.ReadInt32();\n\t\t\tif(proto!=PROTOCOL_NAME){\n\t\t\t\tLOGW(\"Received packet uses wrong protocol\");\n\n\t\t\t\tlastError=ERROR_INCOMPATIBLE;\n\t\t\t\tSetState(STATE_FAILED);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(flags & PFLAG_HAS_EXTRA){\n\t\t\tuint32_t extraLen=(uint32_t) in.ReadTlLength();\n\t\t\tin.Seek(in.GetOffset()+extraLen+pad4(extraLen));\n\t\t}\n\t\tif(flags & PFLAG_HAS_DATA){\n\t\t\tpacketInnerLen=in.ReadTlLength();\n\t\t}\n\t\tpflags=0;\n\t}else if(tlid==TLID_SIMPLE_AUDIO_BLOCK){\n\t\tin.ReadInt64(); // random id\n\t\tuint32_t randLen=(uint32_t) in.ReadTlLength();\n\t\tin.Seek(in.GetOffset()+randLen+pad4(randLen));\n\t\tpacketInnerLen=in.ReadTlLength();\n\t\ttype=in.ReadByte();\n\t\tackId=(uint32_t) in.ReadInt32();\n\t\tpseq=(uint32_t) in.ReadInt32();\n\t\tacks=(uint32_t) in.ReadInt32();\n\t\tif(peerVersion>=6)\n\t\t\tpflags=in.ReadByte();\n\t\telse\n\t\t\tpflags=0;\n\t}else{\n\t\tLOGW(\"Received a packet of unknown type %08X\", tlid);\n\n\t\treturn;\n\t}\n\tpacketsReceived++;\n\tif(seqgt(pseq, lastRemoteSeq)){\n\t\tuint32_t diff=pseq-lastRemoteSeq;\n\t\tif(diff>31){\n\t\t\tmemset(recvPacketTimes, 0, 32*sizeof(double));\n\t\t}else{\n\t\t\tmemmove(&recvPacketTimes[diff], recvPacketTimes, (32-diff)*sizeof(double));\n\t\t\tif(diff>1){\n\t\t\t\tmemset(recvPacketTimes, 0, diff*sizeof(double));\n\t\t\t}\n\t\t\trecvPacketTimes[0]=GetCurrentTime();\n\t\t}\n\t\tlastRemoteSeq=pseq;\n\t}else if(!seqgt(pseq, lastRemoteSeq) && lastRemoteSeq-pseq<32){\n\t\tif(recvPacketTimes[lastRemoteSeq-pseq]!=0){\n\t\t\tLOGW(\"Received duplicated packet for seq %u\", pseq);\n\n\t\t\treturn;\n\t\t}\n\t\trecvPacketTimes[lastRemoteSeq-pseq]=GetCurrentTime();\n\t}else if(lastRemoteSeq-pseq>=32){\n\t\tLOGW(\"Packet %u is out of order and too late\", pseq);\n\n\t\treturn;\n\t}\n\tif(seqgt(ackId, lastRemoteAckSeq)){\n\t\t//uint32_t diff=ackId-lastRemoteAckSeq;\n\t\t/*if(diff>31){\n\t\t\tmemset(remoteAcks, 0, 32*sizeof(double));\n\t\t}else{\n\t\t\tmemmove(&remoteAcks[diff], remoteAcks, (32-diff)*sizeof(double));\n\t\t\tif(diff>1){\n\t\t\t\tmemset(remoteAcks, 0, diff*sizeof(double));\n\t\t\t}\n\t\t\tremoteAcks[0]=GetCurrentTime();\n\t\t}*/\n\t\tMutexGuard _m(queuedPacketsMutex);\n\t\tif(waitingForAcks && lastRemoteAckSeq>=firstSentPing){\n\t\t\trttHistory.Reset();\n\t\t\twaitingForAcks=false;\n\t\t\tdontSendPackets=10;\n\t\t\tmessageThread.Post([this]{\n\t\t\t\tdontSendPackets=0;\n\t\t\t}, 1.0);\n\t\t\tLOGI(\"resuming sending\");\n\t\t}\n\t\tlastRemoteAckSeq=ackId;\n\t\tconctl->PacketAcknowledged(ackId);\n\t\tunsigned int i;\n\t\tfor(i=0;i<31;i++){\n\t\t\tfor(vector<RecentOutgoingPacket>::iterator itr=recentOutgoingPackets.begin();itr!=recentOutgoingPackets.end();++itr){\n\t\t\t\tif(itr->ackTime!=0)\n\t\t\t\t\tcontinue;\n\t\t\t\tif(((acks >> (31-i)) & 1) && itr->seq==ackId-(i+1)){\n\t\t\t\t\titr->ackTime=GetCurrentTime();\n\t\t\t\t\tconctl->PacketAcknowledged(itr->seq);\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*if(remoteAcks[i+1]==0){\n\t\t\t\tif((acks >> (31-i)) & 1){\n\t\t\t\t\tremoteAcks[i+1]=GetCurrentTime();\n\t\t\t\t\tconctl->PacketAcknowledged(ackId-(i+1));\n\t\t\t\t}\n\t\t\t}*/\n\t\t}\n\t\tfor(i=0;i<queuedPackets.size();i++){\n\t\t\tQueuedPacket& qp=queuedPackets[i];\n\t\t\tint j;\n\t\t\tbool didAck=false;\n\t\t\tfor(j=0;j<16;j++){\n\t\t\t\tLOGD(\"queued packet %u, seq %u=%u\", i, j, qp.seqs[j]);\n\t\t\t\tif(qp.seqs[j]==0)\n\t\t\t\t\tbreak;\n\t\t\t\tint remoteAcksIndex=lastRemoteAckSeq-qp.seqs[j];\n\t\t\t\t//LOGV(\"remote acks index %u, value %f\", remoteAcksIndex, remoteAcksIndex>=0 && remoteAcksIndex<32 ? remoteAcks[remoteAcksIndex] : -1);\n\t\t\t\tif(seqgt(lastRemoteAckSeq, qp.seqs[j]) && remoteAcksIndex>=0 && remoteAcksIndex<32){\n\t\t\t\t\tfor(RecentOutgoingPacket& opkt:recentOutgoingPackets){\n\t\t\t\t\t\tif(opkt.seq==qp.seqs[j] && opkt.ackTime>0){\n\t\t\t\t\t\t\tLOGD(\"did ack seq %u, removing\", qp.seqs[j]);\n\t\t\t\t\t\t\tdidAck=true;\n\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\tif(didAck)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(didAck){\n\t\t\t\tqueuedPackets.erase(queuedPackets.begin()+i);\n\t\t\t\ti--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tfor(vector<UnacknowledgedExtraData>::iterator x=currentExtras.begin();x!=currentExtras.end();){\n\t\t\tif(x->firstContainingSeq!=0 && (lastRemoteAckSeq==x->firstContainingSeq || seqgt(lastRemoteAckSeq, x->firstContainingSeq))){\n\t\t\t\tLOGV(\"Peer acknowledged extra type %u length %lu\", x->type, x->data.Length());\n\t\t\t\tProcessAcknowledgedOutgoingExtra(*x);\n\t\t\t\tx=currentExtras.erase(x);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t++x;\n\t\t}\n\t}\n\n\tif(srcEndpoint!=currentEndpoint && (srcEndpoint->type==Endpoint::TYPE_UDP_RELAY || srcEndpoint->type==Endpoint::TYPE_TCP_RELAY) && ((currentEndpoint->type!=Endpoint::TYPE_UDP_RELAY && currentEndpoint->type!=Endpoint::TYPE_TCP_RELAY) || currentEndpoint->averageRTT==0)){\n\t\tif(seqgt(lastSentSeq-32, lastRemoteAckSeq)){\n\t\t\tcurrentEndpoint=srcEndpoint;\n\t\t\tLOGI(\"Peer network address probably changed, switching to relay\");\n\t\t\tif(allowP2p)\n\t\t\t\tSendPublicEndpointsRequest();\n\t\t}\n\t}\n\n\tif(pflags & XPFLAG_HAS_EXTRA){\n\t\tunsigned char extraCount=in.ReadByte();\n\t\tfor(int i=0;i<extraCount;i++){\n\t\t\tsize_t extraLen=in.ReadByte();\n\t\t\tBuffer xbuffer(extraLen);\n\t\t\tin.ReadBytes(*xbuffer, extraLen);\n\t\t\tProcessExtraData(xbuffer);\n\t\t}\n\t}\n\n\t//LOGV(\"acks: %u -> %.2lf, %.2lf, %.2lf, %.2lf, %.2lf, %.2lf, %.2lf, %.2lf\", lastRemoteAckSeq, remoteAcks[0], remoteAcks[1], remoteAcks[2], remoteAcks[3], remoteAcks[4], remoteAcks[5], remoteAcks[6], remoteAcks[7]);\n\t//LOGD(\"recv: %u -> %.2lf, %.2lf, %.2lf, %.2lf, %.2lf, %.2lf, %.2lf, %.2lf\", lastRemoteSeq, recvPacketTimes[0], recvPacketTimes[1], recvPacketTimes[2], recvPacketTimes[3], recvPacketTimes[4], recvPacketTimes[5], recvPacketTimes[6], recvPacketTimes[7]);\n\t//LOGI(\"RTT = %.3lf\", GetAverageRTT());\n\t//LOGV(\"Packet %u type is %d\", pseq, type);\n\tif(type==PKT_INIT){\n\t\tLOGD(\"Received init\");\n\t\tuint32_t ver=(uint32_t)in.ReadInt32();\n\t\tif(!receivedInit)\n\t\t\tpeerVersion=ver;\n\t\tLOGI(\"Peer version is %d\", peerVersion);\n\t\tuint32_t minVer=(uint32_t) in.ReadInt32();\n\t\tif(minVer>PROTOCOL_VERSION || peerVersion<MIN_PROTOCOL_VERSION){\n\t\t\tlastError=ERROR_INCOMPATIBLE;\n\n\t\t\tSetState(STATE_FAILED);\n\t\t\treturn;\n\t\t}\n\t\tuint32_t flags=(uint32_t) in.ReadInt32();\n\t\tif(!receivedInit){\n\t\t\tif(flags & INIT_FLAG_DATA_SAVING_ENABLED){\n\t\t\t\tdataSavingRequestedByPeer=true;\n\t\t\t\tUpdateDataSavingState();\n\t\t\t\tUpdateAudioBitrateLimit();\n\t\t\t}\n\t\t\tif(flags & INIT_FLAG_GROUP_CALLS_SUPPORTED){\n\t\t\t\tpeerCapabilities|=TGVOIP_PEER_CAP_GROUP_CALLS;\n\t\t\t}\n\t\t}\n\n\t\tunsigned int i;\n\t\tunsigned int numSupportedAudioCodecs=in.ReadByte();\n\t\tfor(i=0; i<numSupportedAudioCodecs; i++){\n\t\t\tif(peerVersion<5)\n\t\t\t\tin.ReadByte(); // ignore for now\n\t\t\telse\n\t\t\t\tin.ReadInt32();\n\t\t}\n\t\tunsigned int numSupportedVideoCodecs=in.ReadByte();\n\t\tfor(i=0; i<numSupportedVideoCodecs; i++){\n\t\t\tif(peerVersion<5)\n\t\t\t\tin.ReadByte(); // ignore for now\n\t\t\telse\n\t\t\t\tin.ReadInt32();\n\t\t}\n\n\t\tBufferOutputStream out(1024);\n\n\t\tout.WriteInt32(PROTOCOL_VERSION);\n\t\tout.WriteInt32(MIN_PROTOCOL_VERSION);\n\n\t\tout.WriteByte((unsigned char) outgoingStreams.size());\n\t\tfor(vector<shared_ptr<Stream>>::iterator s=outgoingStreams.begin(); s!=outgoingStreams.end(); ++s){\n\t\t\tout.WriteByte((*s)->id);\n\t\t\tout.WriteByte((*s)->type);\n\t\t\tif(peerVersion<5)\n\t\t\t\tout.WriteByte((unsigned char) ((*s)->codec==CODEC_OPUS ? CODEC_OPUS_OLD : 0));\n\t\t\telse\n\t\t\t\tout.WriteInt32((*s)->codec);\n\t\t\tout.WriteInt16((*s)->frameDuration);\n\t\t\tout.WriteByte((unsigned char) ((*s)->enabled ? 1 : 0));\n\t\t}\n\t\tLOGI(\"Sending init ack\");\n\t\tsendQueue->Put(PendingOutgoingPacket{\n\t\t\t\t/*.seq=*/GenerateOutSeq(),\n\t\t\t\t/*.type=*/PKT_INIT_ACK,\n\t\t\t\t/*.len=*/out.GetLength(),\n\t\t\t\t/*.data=*/Buffer(move(out)),\n\t\t\t\t/*.endpoint=*/0\n\t\t});\n\t\tif(!receivedInit){\n\t\t\treceivedInit=true;\n\t\t\tif((srcEndpoint->type==Endpoint::TYPE_UDP_RELAY && udpConnectivityState!=UDP_BAD && udpConnectivityState!=UDP_NOT_AVAILABLE) || srcEndpoint->type==Endpoint::TYPE_TCP_RELAY){\n\t\t\t\tcurrentEndpoint=srcEndpoint;\n\t\t\t\tif(srcEndpoint->type==Endpoint::TYPE_UDP_RELAY || (useTCP && srcEndpoint->type==Endpoint::TYPE_TCP_RELAY))\n\t\t\t\t\tpreferredRelay=srcEndpoint;\n\t\t\t}\n\t\t\tLogDebugInfo();\n\t\t}\n\t}\n\tif(type==PKT_INIT_ACK){\n\t\tLOGD(\"Received init ack\");\n\n\t\tif(!receivedInitAck){\n\t\t\treceivedInitAck=true;\n\n\t\t\tmessageThread.Cancel(initTimeoutID);\n\t\t\tinitTimeoutID=MessageThread::INVALID_ID;\n\n\t\t\tif(packetInnerLen>10){\n\t\t\t\tpeerVersion=in.ReadInt32();\n\t\t\t\tuint32_t minVer=(uint32_t) in.ReadInt32();\n\t\t\t\tif(minVer>PROTOCOL_VERSION || peerVersion<MIN_PROTOCOL_VERSION){\n\t\t\t\t\tlastError=ERROR_INCOMPATIBLE;\n\n\t\t\t\t\tSetState(STATE_FAILED);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tpeerVersion=1;\n\t\t\t}\n\n\t\t\tLOGI(\"peer version from init ack %d\", peerVersion);\n\n\t\t\tunsigned char streamCount=in.ReadByte();\n\t\t\tif(streamCount==0)\n\t\t\t\treturn;\n\n\t\t\tint i;\n\t\t\tshared_ptr<Stream> incomingAudioStream=NULL;\n\t\t\tfor(i=0; i<streamCount; i++){\n\t\t\t\tshared_ptr<Stream> stm=make_shared<Stream>();\n\t\t\t\tstm->id=in.ReadByte();\n\t\t\t\tstm->type=in.ReadByte();\n\t\t\t\tif(peerVersion<5){\n\t\t\t\t\tunsigned char codec=in.ReadByte();\n\t\t\t\t\tif(codec==CODEC_OPUS_OLD)\n\t\t\t\t\t\tstm->codec=CODEC_OPUS;\n\t\t\t\t}else{\n\t\t\t\t\tstm->codec=(uint32_t) in.ReadInt32();\n\t\t\t\t}\n\t\t\t\tstm->frameDuration=(uint16_t) in.ReadInt16();\n\t\t\t\tstm->enabled=in.ReadByte()==1;\n\t\t\t\tif(stm->type==STREAM_TYPE_AUDIO){\n\t\t\t\t\tstm->jitterBuffer=make_shared<JitterBuffer>(nullptr, stm->frameDuration);\n\t\t\t\t\tif(stm->frameDuration>50)\n\t\t\t\t\t\tstm->jitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_initial_delay_60\", 3));\n\t\t\t\t\telse if(stm->frameDuration>30)\n\t\t\t\t\t\tstm->jitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_initial_delay_40\", 4));\n\t\t\t\t\telse\n\t\t\t\t\t\tstm->jitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_initial_delay_20\", 6));\n\t\t\t\t\tstm->decoder=NULL;\n\t\t\t\t}else if(stm->type==STREAM_TYPE_VIDEO){\n\t\t\t\t\tif(!stm->packetReassembler){\n\t\t\t\t\t\tstm->packetReassembler=make_shared<PacketReassembler>();\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tLOGW(\"Unknown incoming stream type: %d\", stm->type);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tincomingStreams.push_back(stm);\n\t\t\t\tif(stm->type==STREAM_TYPE_AUDIO && !incomingAudioStream)\n\t\t\t\t\tincomingAudioStream=stm;\n\t\t\t}\n\t\t\tif(!incomingAudioStream)\n\t\t\t\treturn;\n\n\t\t\tif(peerVersion>=5 && !useMTProto2){\n\t\t\t\tuseMTProto2=true;\n\t\t\t\tLOGD(\"MTProto2 wasn't initially enabled for whatever reason but peer supports it; upgrading\");\n\t\t\t}\n\n\t\t\t{\n\t\t\t\tMutexGuard m(audioIOMutex);\n\t\t\t\tif(!audioInput){\n\t\t\t\t\tStartAudio();\n\t\t\t\t}\n\t\t\t}\n\t\t\tmessageThread.Post([this]{\n\t\t\t\tif(state==STATE_WAIT_INIT_ACK){\n\t\t\t\t\tSetState(STATE_ESTABLISHED);\n\t\t\t\t}\n\t\t\t}, ServerConfig::GetSharedInstance()->GetDouble(\"established_delay_if_no_stream_data\", 1.5));\n\t\t\tif(allowP2p)\n\t\t\t\tSendPublicEndpointsRequest();\n\t\t}\n\t}\n\tif(type==PKT_STREAM_DATA || type==PKT_STREAM_DATA_X2 || type==PKT_STREAM_DATA_X3){\n\t\tif(!receivedFirstStreamPacket){\n\t\t\treceivedFirstStreamPacket=true;\n\t\t\tif(state!=STATE_ESTABLISHED && receivedInitAck){\n\t\t\t\tmessageThread.Post([this](){\n\t\t\t\t\tSetState(STATE_ESTABLISHED);\n\t\t\t\t}, .5);\n\t\t\t\tLOGW(\"First audio packet - setting state to ESTABLISHED\");\n\t\t\t}\n\t\t}\n\t\tint count;\n\t\tswitch(type){\n\t\t\tcase PKT_STREAM_DATA_X2:\n\t\t\t\tcount=2;\n\t\t\t\tbreak;\n\t\t\tcase PKT_STREAM_DATA_X3:\n\t\t\t\tcount=3;\n\t\t\t\tbreak;\n\t\t\tcase PKT_STREAM_DATA:\n\t\t\tdefault:\n\t\t\t\tcount=1;\n\t\t\t\tbreak;\n\t\t}\n\t\tint i;\n\t\tif(srcEndpoint->type==Endpoint::TYPE_UDP_RELAY && srcEndpoint!=peerPreferredRelay){\n\t\t\tpeerPreferredRelay=srcEndpoint;\n\t\t}\n\t\tfor(i=0;i<count;i++){\n\t\t\tunsigned char streamID=in.ReadByte();\n\t\t\tunsigned char flags=(unsigned char) (streamID & 0xC0);\n\t\t\tuint16_t sdlen=(uint16_t) (flags & STREAM_DATA_FLAG_LEN16 ? in.ReadInt16() : in.ReadByte());\n\t\t\tuint32_t pts=(uint32_t) in.ReadInt32();\n\t\t\t//LOGD(\"stream data, pts=%d, len=%d, rem=%d\", pts, sdlen, in.Remaining());\n\t\t\taudioTimestampIn=pts;\n\t\t\tif(!audioOutStarted && audioOutput){\n\t\t\t\tMutexGuard m(audioIOMutex);\n\t\t\t\taudioOutput->Start();\n\t\t\t\taudioOutStarted=true;\n\t\t\t}\n\t\t\tif(in.GetOffset()+sdlen>len){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(incomingStreams.size()>0 && incomingStreams[0]->jitterBuffer /*&& !incomingStreams[0]->extraECEnabled*/)\n\t\t\t\tincomingStreams[0]->jitterBuffer->HandleInput((unsigned char*) (buffer+in.GetOffset()), sdlen, pts, false);\n\t\t\tif(i<count-1)\n\t\t\t\tin.Seek(in.GetOffset()+sdlen);\n\t\t}\n\t}\n\tif(type==PKT_PING){\n\t\t//LOGD(\"Received ping from %s:%d\", srcEndpoint->address.ToString().c_str(), srcEndpoint->port);\n\t\tif(srcEndpoint->type!=Endpoint::TYPE_UDP_RELAY && srcEndpoint->type!=Endpoint::TYPE_TCP_RELAY && !allowP2p){\n\t\t\tLOGW(\"Received p2p ping but p2p is disabled by manual override\");\n\t\t\treturn;\n\t\t}\n\t\tBufferOutputStream pkt(128);\n\t\tpkt.WriteInt32(pseq);\n\t\tsendQueue->Put(PendingOutgoingPacket{\n\t\t\t\t/*.seq=*/GenerateOutSeq(),\n\t\t\t\t/*.type=*/PKT_PONG,\n\t\t\t\t/*.len=*/pkt.GetLength(),\n\t\t\t\t/*.data=*/Buffer(move(pkt)),\n\t\t\t\t/*.endpoint=*/srcEndpoint->id,\n\t\t});\n\t}\n\tif(type==PKT_PONG){\n\t\tif(packetInnerLen>=4){\n\t\t\tuint32_t pingSeq=(uint32_t) in.ReadInt32();\n\t\t\tif(pingSeq==srcEndpoint->lastPingSeq){\n\t\t\t\tsrcEndpoint->rtts.Add(GetCurrentTime()-srcEndpoint->lastPingTime);\n\t\t\t\tsrcEndpoint->averageRTT=srcEndpoint->rtts.NonZeroAverage();\n\t\t\t\tLOGD(\"Current RTT via %s: %.3f, average: %.3f\", packet.address->ToString().c_str(), srcEndpoint->rtts[0], srcEndpoint->averageRTT);\n\t\t\t}\n\t\t}\n\t}\n\tif(type==PKT_STREAM_STATE){\n\t\tunsigned char id=in.ReadByte();\n\t\tunsigned char enabled=in.ReadByte();\n\t\tfor(vector<shared_ptr<Stream>>::iterator s=incomingStreams.begin();s!=incomingStreams.end();++s){\n\t\t\tif((*s)->id==id){\n\t\t\t\t(*s)->enabled=enabled==1;\n\t\t\t\tUpdateAudioOutputState();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif(type==PKT_LAN_ENDPOINT){\n\t\tLOGV(\"received lan endpoint\");\n\t\tuint32_t peerAddr=(uint32_t) in.ReadInt32();\n\t\tuint16_t peerPort=(uint16_t) in.ReadInt32();\n\t\tMutexGuard m(endpointsMutex);\n\t\tbool found=false;\n\t\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\t\tif(e->type==Endpoint::TYPE_UDP_P2P_LAN){\n\t\t\t\tif(currentEndpoint==e)\n\t\t\t\t\tcurrentEndpoint=preferredRelay;\n\t\t\t\tfound=true;\n\t\t\t\te->address=peerAddr;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!found){\n\t\t\tIPv4Address v4addr(peerAddr);\n\t\t\tIPv6Address v6addr(string(\"::0\"));\n\t\t\tunsigned char peerTag[16];\n\t\t\tendpoints.push_back(make_shared<Endpoint>((int64_t)(FOURCC('L','A','N','4')) << 32, peerPort, v4addr, v6addr, Endpoint::TYPE_UDP_P2P_LAN, peerTag));\n\t\t}\n\t}\n\tif(type==PKT_NETWORK_CHANGED && currentEndpoint->type!=Endpoint::TYPE_UDP_RELAY && currentEndpoint->type!=Endpoint::TYPE_TCP_RELAY){\n\t\tcurrentEndpoint=preferredRelay;\n\t\tif(allowP2p)\n\t\t\tSendPublicEndpointsRequest();\n\t\tif(peerVersion>=2){\n\t\t\tuint32_t flags=(uint32_t) in.ReadInt32();\n\t\t\tdataSavingRequestedByPeer=(flags & INIT_FLAG_DATA_SAVING_ENABLED)==INIT_FLAG_DATA_SAVING_ENABLED;\n\t\t\tUpdateDataSavingState();\n\t\t\tUpdateAudioBitrateLimit();\n\t\t\tResetEndpointPingStats();\n\t\t}\n\t}\n\tif(type==PKT_STREAM_EC){\n\t\tunsigned char streamID=in.ReadByte();\n\t\tuint32_t lastTimestamp=(uint32_t)in.ReadInt32();\n\t\tunsigned char count=in.ReadByte();\n\t\tfor(shared_ptr<Stream>& stm:incomingStreams){\n\t\t\tif(stm->id==streamID){\n\t\t\t\tfor(unsigned int i=0;i<count;i++){\n\t\t\t\t\tunsigned char dlen=in.ReadByte();\n\t\t\t\t\tunsigned char data[256];\n\t\t\t\t\tin.ReadBytes(data, dlen);\n\t\t\t\t\tif(stm->jitterBuffer){\n\t\t\t\t\t\tstm->jitterBuffer->HandleInput(data, dlen, lastTimestamp-(count-i-1)*stm->frameDuration, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid VoIPController::ProcessExtraData(Buffer &data){\n\tBufferInputStream in(*data, data.Length());\n\tunsigned char type=in.ReadByte();\n\tunsigned char fullHash[SHA1_LENGTH];\n\tcrypto.sha1(*data, data.Length(), fullHash);\n\tuint64_t hash=*reinterpret_cast<uint64_t*>(fullHash);\n\tif(lastReceivedExtrasByType[type]==hash){\n\t\treturn;\n\t}\n\tlastReceivedExtrasByType[type]=hash;\n\tif(type==EXTRA_TYPE_STREAM_FLAGS){\n\t\tunsigned char id=in.ReadByte();\n\t\tuint32_t flags=static_cast<uint32_t>(in.ReadInt32());\n\t\tfor(shared_ptr<Stream>& s:incomingStreams){\n\t\t\tif(s->id==id){\n\t\t\t\ts->enabled=(flags & STREAM_FLAG_ENABLED)==STREAM_FLAG_ENABLED;\n\t\t\t\tif(flags & STREAM_FLAG_EXTRA_EC){\n\t\t\t\t\tif(!s->extraECEnabled){\n\t\t\t\t\t\ts->extraECEnabled=true;\n\t\t\t\t\t\tif(s->jitterBuffer)\n\t\t\t\t\t\t\ts->jitterBuffer->SetMinPacketCount(4);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(s->extraECEnabled){\n\t\t\t\t\t\ts->extraECEnabled=false;\n\t\t\t\t\t\tif(s->jitterBuffer)\n\t\t\t\t\t\t\ts->jitterBuffer->SetMinPacketCount(2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tUpdateAudioOutputState();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}else if(type==EXTRA_TYPE_STREAM_CSD){\n\n\t}else if(type==EXTRA_TYPE_LAN_ENDPOINT){\n\t\tif(!allowP2p)\n\t\t\treturn;\n\t\tLOGV(\"received lan endpoint (extra)\");\n\t\tuint32_t peerAddr=(uint32_t) in.ReadInt32();\n\t\tuint16_t peerPort=(uint16_t) in.ReadInt32();\n\t\tMutexGuard m(endpointsMutex);\n\t\tbool found=false;\n\t\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\t\tif(e->type==Endpoint::TYPE_UDP_P2P_LAN){\n\t\t\t\tif(currentEndpoint==e)\n\t\t\t\t\tcurrentEndpoint=preferredRelay;\n\t\t\t\tfound=true;\n\t\t\t\te->address=peerAddr;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!found){\n\t\t\tIPv4Address v4addr(peerAddr);\n\t\t\tIPv6Address v6addr(string(\"::0\"));\n\t\t\tunsigned char peerTag[16];\n\t\t\tendpoints.push_back(make_shared<Endpoint>((int64_t)(FOURCC('L','A','N','4')) << 32, peerPort, v4addr, v6addr, Endpoint::TYPE_UDP_P2P_LAN, peerTag));\n\t\t}\n\t}else if(type==EXTRA_TYPE_NETWORK_CHANGED){\n\t\tLOGI(\"Peer network changed\");\n\t\tif(currentEndpoint->type!=Endpoint::TYPE_UDP_RELAY && currentEndpoint->type!=Endpoint::TYPE_TCP_RELAY)\n\t\t\tcurrentEndpoint=preferredRelay;\n\t\tif(allowP2p)\n\t\t\tSendPublicEndpointsRequest();\n\t\tuint32_t flags=(uint32_t) in.ReadInt32();\n\t\tdataSavingRequestedByPeer=(flags & INIT_FLAG_DATA_SAVING_ENABLED)==INIT_FLAG_DATA_SAVING_ENABLED;\n\t\tUpdateDataSavingState();\n\t\tUpdateAudioBitrateLimit();\n\t\tResetEndpointPingStats();\n\t}else if(type==EXTRA_TYPE_GROUP_CALL_KEY){\n\t\tif(!didReceiveGroupCallKey && !didSendGroupCallKey){\n\t\t\tunsigned char groupKey[256];\n\t\t\tin.ReadBytes(groupKey, 256);\n\t\t\tmessageThread.Post([this, &groupKey]{\n\t\t\t\tif(callbacks.groupCallKeyReceived)\n\t\t\t\t\tcallbacks.groupCallKeyReceived(this, groupKey);\n\t\t\t});\n\t\t\tdidReceiveGroupCallKey=true;\n\t\t}\n\t}else if(type==EXTRA_TYPE_REQUEST_GROUP){\n\t\tif(!didInvokeUpgradeCallback){\n\t\t\tmessageThread.Post([this]{\n\t\t\t\tif(callbacks.upgradeToGroupCallRequested)\n\t\t\t\t\tcallbacks.upgradeToGroupCallRequested(this);\n\t\t\t});\n\t\t\tdidInvokeUpgradeCallback=true;\n\t\t}\n\t}else if(type==EXTRA_TYPE_IPV6_ENDPOINT){\n\t\tif(!allowP2p)\n\t\t\treturn;\n\t\tunsigned char _addr[16];\n\t\tin.ReadBytes(_addr, 16);\n\t\tIPv6Address addr(_addr);\n\t\tuint16_t port=static_cast<uint16_t>(in.ReadInt16());\n\t\tMutexGuard m(endpointsMutex);\n\t\tpeerIPv6Available=true;\n\t\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\t\tif(e->type==Endpoint::TYPE_UDP_P2P_INET && e->IsIPv6Only()){\n\t\t\t\te->v6address=addr;\n\t\t\t\tif(!myIPv6.IsEmpty())\n\t\t\t\t\tcurrentEndpoint=e;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tshared_ptr<Endpoint> ep=make_shared<Endpoint>();\n\t\tep->type=Endpoint::TYPE_UDP_P2P_INET;\n\t\tep->port=port;\n\t\tep->v6address=addr;\n\t\tep->id=(int64_t)(FOURCC('P','2','P','6')) << 32;\n\t\tendpoints.push_back(ep);\n\t\tif(!myIPv6.IsEmpty())\n\t\t\tcurrentEndpoint=ep;\n\t}\n}\n\nvoid VoIPController::ProcessAcknowledgedOutgoingExtra(VoIPController::UnacknowledgedExtraData &extra){\n\tif(extra.type==EXTRA_TYPE_GROUP_CALL_KEY){\n\t\tif(!didReceiveGroupCallKeyAck){\n\t\t\tdidReceiveGroupCallKeyAck=true;\n\t\t\tmessageThread.Post([this]{\n\t\t\t\tif(callbacks.groupCallKeySent)\n\t\t\t\t\tcallbacks.groupCallKeySent(this);\n\t\t\t});\n\t\t}\n\t}\n}\n\nEndpoint& VoIPController::GetRemoteEndpoint(){\n\treturn *currentEndpoint;\n}\n\n\nvoid VoIPController::SendPacket(unsigned char *data, size_t len, shared_ptr<Endpoint> ep, PendingOutgoingPacket& srcPacket){\n\tif(stopping)\n\t\treturn;\n\tif(ep->type==Endpoint::TYPE_TCP_RELAY && !useTCP)\n\t\treturn;\n\tBufferOutputStream out(len+128);\n\tif(ep->type==Endpoint::TYPE_UDP_RELAY || ep->type==Endpoint::TYPE_TCP_RELAY)\n\t\tout.WriteBytes((unsigned char*)ep->peerTag, 16);\n\telse\n\t\tout.WriteBytes(callID, 16);\n\tif(len>0){\n\t\tif(useMTProto2){\n\t\t\tBufferOutputStream inner(len+128);\n\t\t\tinner.WriteInt32((uint32_t)len);\n\t\t\tinner.WriteBytes(data, len);\n\t\t\tsize_t padLen=16-inner.GetLength()%16;\n\t\t\tif(padLen<12)\n\t\t\t\tpadLen+=16;\n\t\t\tunsigned char padding[28];\n\t\t\tcrypto.rand_bytes((uint8_t *) padding, padLen);\n\t\t\tinner.WriteBytes(padding, padLen);\n\t\t\tassert(inner.GetLength()%16==0);\n\n\t\t\tunsigned char key[32], iv[32], msgKey[16];\n\t\t\tout.WriteBytes(keyFingerprint, 8);\n\t\t\tBufferOutputStream buf(len+32);\n\t\t\tsize_t x=isOutgoing ? 0 : 8;\n\t\t\tbuf.WriteBytes(encryptionKey+88+x, 32);\n\t\t\tbuf.WriteBytes(inner.GetBuffer()+4, inner.GetLength()-4);\n\t\t\tunsigned char msgKeyLarge[32];\n\t\t\tcrypto.sha256(buf.GetBuffer(), buf.GetLength(), msgKeyLarge);\n\t\t\tmemcpy(msgKey, msgKeyLarge+8, 16);\n\t\t\tKDF2(msgKey, isOutgoing ? 0 : 8, key, iv);\n\t\t\tout.WriteBytes(msgKey, 16);\n\t\t\t//LOGV(\"<- MSG KEY: %08x %08x %08x %08x, hashed %u\", *reinterpret_cast<int32_t*>(msgKey), *reinterpret_cast<int32_t*>(msgKey+4), *reinterpret_cast<int32_t*>(msgKey+8), *reinterpret_cast<int32_t*>(msgKey+12), inner.GetLength()-4);\n\n\t\t\tunsigned char aesOut[MSC_STACK_FALLBACK(inner.GetLength(), 1500)];\n\t\t\tcrypto.aes_ige_encrypt(inner.GetBuffer(), aesOut, inner.GetLength(), key, iv);\n\t\t\tout.WriteBytes(aesOut, inner.GetLength());\n\t\t}else{\n\t\t\tBufferOutputStream inner(len+128);\n\t\t\tinner.WriteInt32(len);\n\t\t\tinner.WriteBytes(data, len);\n\t\t\tif(inner.GetLength()%16!=0){\n\t\t\t\tsize_t padLen=16-inner.GetLength()%16;\n\t\t\t\tunsigned char padding[16];\n\t\t\t\tcrypto.rand_bytes((uint8_t *) padding, padLen);\n\t\t\t\tinner.WriteBytes(padding, padLen);\n\t\t\t}\n\t\t\tassert(inner.GetLength()%16==0);\n\t\t\tunsigned char key[32], iv[32], msgHash[SHA1_LENGTH];\n\t\t\tcrypto.sha1((uint8_t *) inner.GetBuffer(), len+4, msgHash);\n\t\t\tout.WriteBytes(keyFingerprint, 8);\n\t\t\tout.WriteBytes((msgHash+(SHA1_LENGTH-16)), 16);\n\t\t\tKDF(msgHash+(SHA1_LENGTH-16), isOutgoing ? 0 : 8, key, iv);\n\t\t\tunsigned char aesOut[MSC_STACK_FALLBACK(inner.GetLength(), 1500)];\n\t\t\tcrypto.aes_ige_encrypt(inner.GetBuffer(), aesOut, inner.GetLength(), key, iv);\n\t\t\tout.WriteBytes(aesOut, inner.GetLength());\n\t\t}\n\t}\n\t//LOGV(\"Sending %d bytes to %s:%d\", out.GetLength(), ep->address.ToString().c_str(), ep->port);\n\n\tNetworkPacket pkt={0};\n\tpkt.address=&ep->GetAddress();\n\tpkt.port=ep->port;\n\tpkt.length=out.GetLength();\n\tpkt.data=out.GetBuffer();\n\tpkt.protocol=ep->type==Endpoint::TYPE_TCP_RELAY ? PROTO_TCP : PROTO_UDP;\n\tActuallySendPacket(pkt, ep);\n}\n\nvoid VoIPController::ActuallySendPacket(NetworkPacket &pkt, shared_ptr<Endpoint> ep){\n\t//LOGI(\"Sending packet of %d bytes\", pkt.length);\n\tif(IS_MOBILE_NETWORK(networkType))\n\t\tstats.bytesSentMobile+=(uint64_t)pkt.length;\n\telse\n\t\tstats.bytesSentWifi+=(uint64_t)pkt.length;\n\tif(ep->type==Endpoint::TYPE_TCP_RELAY){\n\t\tif(ep->socket && !ep->socket->IsFailed()){\n\t\t\tep->socket->Send(&pkt);\n\t\t}else{\n\t\t\tif(ep->socket){\n\t\t\t\tLOGD(\"closing failed TCP socket: %s:%u\", ep->address.ToString().c_str(), ep->port);\n\t\t\t\tep->socket->Close();\n\t\t\t\tdelete ep->socket;\n\t\t\t\tep->socket=NULL;\n\t\t\t}\n\t\t\tLOGI(\"connecting to tcp: %s:%u\", ep->address.ToString().c_str(), ep->port);\n\t\t\tNetworkSocket* s;\n\t\t\tif(proxyProtocol==PROXY_NONE){\n\t\t\t\ts=NetworkSocket::Create(PROTO_TCP);\n\t\t\t}else if(proxyProtocol==PROXY_SOCKS5){\n\t\t\t\tNetworkSocket* rawTcp=NetworkSocket::Create(PROTO_TCP);\n\t\t\t\topeningTcpSocket=rawTcp;\n\t\t\t\trawTcp->Connect(resolvedProxyAddress, proxyPort);\n\t\t\t\tif(rawTcp->IsFailed()){\n\t\t\t\t\topeningTcpSocket=NULL;\n\t\t\t\t\trawTcp->Close();\n\t\t\t\t\tdelete rawTcp;\n\t\t\t\t\tLOGW(\"Error connecting to SOCKS5 proxy\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tNetworkSocketSOCKS5Proxy* proxy=new NetworkSocketSOCKS5Proxy(rawTcp, NULL, proxyUsername, proxyPassword);\n\t\t\t\topeningTcpSocket=proxy;\n\t\t\t\tproxy->InitConnection();\n\t\t\t\tif(proxy->IsFailed()){\n\t\t\t\t\topeningTcpSocket=NULL;\n\t\t\t\t\tLOGW(\"Proxy initialization failed\");\n\t\t\t\t\tproxy->Close();\n\t\t\t\t\tdelete proxy;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ts=proxy;\n\t\t\t}/*else if(proxyProtocol==PROXY_HTTP){\n\t\t\t\ts=NetworkSocket::Create(PROTO_TCP);\n\t\t\t}*/else{\n\t\t\t\tLOGE(\"Unsupported proxy protocol %d\", proxyProtocol);\n\t\t\t\tSetState(STATE_FAILED);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ts->Connect(&ep->address, ep->port);\n\t\t\tif(s->IsFailed()){\n\t\t\t\topeningTcpSocket=NULL;\n\t\t\t\ts->Close();\n\t\t\t\tdelete s;\n\t\t\t\tLOGW(\"Error connecting to %s:%u\", ep->address.ToString().c_str(), ep->port);\n\t\t\t}else{\n\t\t\t\tNetworkSocketTCPObfuscated* tcpWrapper=new NetworkSocketTCPObfuscated(s);\n\t\t\t\topeningTcpSocket=tcpWrapper;\n\t\t\t\ttcpWrapper->InitConnection();\n\t\t\t\topeningTcpSocket=NULL;\n\t\t\t\tif(tcpWrapper->IsFailed()){\n\t\t\t\t\ttcpWrapper->Close();\n\t\t\t\t\tdelete tcpWrapper;\n\t\t\t\t\tLOGW(\"Error initializing connection to %s:%u\", ep->address.ToString().c_str(), ep->port);\n\t\t\t\t}else{\n\t\t\t\t\ttcpWrapper->Send(&pkt);\n\t\t\t\t\tep->socket=tcpWrapper;\n\t\t\t\t\tselectCanceller->CancelSelect();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}else{\n\t\tudpSocket->Send(&pkt);\n\t}\n}\n\nvoid VoIPController::SetNetworkType(int type){\n\tnetworkType=type;\n\tUpdateDataSavingState();\n\tUpdateAudioBitrateLimit();\n\tmyIPv6=IPv6Address();\n\tstring itfName=udpSocket->GetLocalInterfaceInfo(NULL, &myIPv6);\n\tLOGI(\"Local IPv6 address: %s\", myIPv6.ToString().c_str());\n\tif(itfName!=activeNetItfName){\n\t\tudpSocket->OnActiveInterfaceChanged();\n\t\tLOGI(\"Active network interface changed: %s -> %s\", activeNetItfName.c_str(), itfName.c_str());\n\t\tbool isFirstChange=activeNetItfName.length()==0 && state!=STATE_ESTABLISHED && state!=STATE_RECONNECTING;\n\t\tactiveNetItfName=itfName;\n\t\tif(isFirstChange)\n\t\t\treturn;\n\t\tif(currentEndpoint && currentEndpoint->type!=Endpoint::TYPE_UDP_RELAY){\n\t\t\tif(preferredRelay->type==Endpoint::TYPE_UDP_RELAY)\n\t\t\t\tcurrentEndpoint=preferredRelay;\n\t\t\tMutexGuard m(endpointsMutex);\n\t\t\tfor(vector<shared_ptr<Endpoint>>::iterator itr=endpoints.begin();itr!=endpoints.end();){\n\t\t\t\tshared_ptr<Endpoint> endpoint=*itr;\n\t\t\t\tif(endpoint->type==Endpoint::TYPE_UDP_RELAY && useTCP){\n\t\t\t\t\tuseTCP=false;\n\t\t\t\t\tif(preferredRelay->type==Endpoint::TYPE_TCP_RELAY){\n\t\t\t\t\t\tpreferredRelay=endpoint;\n\t\t\t\t\t\tcurrentEndpoint=endpoint;\n\t\t\t\t\t}\n\t\t\t\t}else if(endpoint->type==Endpoint::TYPE_TCP_RELAY && endpoint->socket){\n\t\t\t\t\tendpoint->socket->Close();\n\t\t\t\t}\n\t\t\t\t//if(endpoint->type==Endpoint::TYPE_UDP_P2P_INET){\n\t\t\t\t\tendpoint->averageRTT=0;\n\t\t\t\tendpoint->rtts.Reset();\n\t\t\t\t//}\n\t\t\t\tif(endpoint->type==Endpoint::TYPE_UDP_P2P_LAN){\n\t\t\t\t\titr=endpoints.erase(itr);\n\t\t\t\t}else{\n\t\t\t\t\t++itr;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlastUdpPingTime=0;\n\t\tif(proxyProtocol==PROXY_SOCKS5)\n\t\t\tInitUDPProxy();\n\t\tif(allowP2p && currentEndpoint){\n\t\t\tSendPublicEndpointsRequest();\n\t\t}\n\t\tBufferOutputStream s(4);\n\t\ts.WriteInt32(dataSavingMode ? INIT_FLAG_DATA_SAVING_ENABLED : 0);\n\t\tif(peerVersion<6){\n\t\t\tSendPacketReliably(PKT_NETWORK_CHANGED, s.GetBuffer(), s.GetLength(), 1, 20);\n\t\t}else{\n\t\t\tBuffer buf(move(s));\n\t\t\tSendExtra(buf, EXTRA_TYPE_NETWORK_CHANGED);\n\t\t}\n\t\tselectCanceller->CancelSelect();\n\t\tdidSendIPv6Endpoint=false;\n\n\t\tAddIPv6Relays();\n\t\tResetUdpAvailability();\n\t\tResetEndpointPingStats();\n\t}\n\tLOGI(\"set network type: %d, active interface %s\", type, activeNetItfName.c_str());\n}\n\nvoid VoIPController::AddIPv6Relays(){\n\tif(!myIPv6.IsEmpty() && !didAddIPv6Relays){\n\t\tunordered_map<string, vector<shared_ptr<Endpoint>>> endpointsByAddress;\n\t\tMutexGuard m(endpointsMutex);\n\t\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\t\tif((e->type==Endpoint::TYPE_UDP_RELAY || e->type==Endpoint::TYPE_TCP_RELAY) && !e->v6address.IsEmpty() && !e->address.IsEmpty()){\n\t\t\t\tendpointsByAddress[e->v6address.ToString()].push_back(e);\n\t\t\t}\n\t\t}\n\t\t//int globalId=callID[15];\n\t\tfor(unordered_map<string, vector<shared_ptr<Endpoint>>>::iterator addr=endpointsByAddress.begin();addr!=endpointsByAddress.end();++addr){\n\t\t\tshared_ptr<Endpoint> best=NULL;\n\t\t\t//int bestDiff=256;\n\t\t\tfor(shared_ptr<Endpoint>& e:addr->second){\n\t\t\t\t//int epId=(int) (e->id & 0xFF);\n\t\t\t\t//int diff=abs(globalId-epId);\n\t\t\t\t//if(diff<bestDiff){\n\t\t\t\t\tbest=e;\n\t\t\t\t//\tbestDiff=diff;\n\t\t\t\t//}\n\t\t\t\t//}\n\t\t\t\tif(best){\n\t\t\t\t\tdidAddIPv6Relays=true;\n\t\t\t\t\tshared_ptr<Endpoint> v6only=make_shared<Endpoint>(*best);\n\t\t\t\t\tv6only->address=IPv4Address(0);\n\t\t\t\t\tv6only->id=v6only->id ^ ((int64_t)(FOURCC('I','P','v','6')) << 32);\n\t\t\t\t\tendpoints.push_back(v6only);\n\t\t\t\t\tLOGD(\"Adding IPv6-only endpoint [%s]:%u\", v6only->v6address.ToString().c_str(), v6only->port);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid VoIPController::AddTCPRelays(){\n\tif(!didAddTcpRelays){\n\t\tMutexGuard m(endpointsMutex);\n\t\tvector<shared_ptr<Endpoint>> relays;\n\t\tfor(shared_ptr<Endpoint> &e:endpoints){\n\t\t\tif(e->type!=Endpoint::TYPE_UDP_RELAY)\n\t\t\t\tcontinue;\n\t\t\tshared_ptr<Endpoint> tcpRelay=make_shared<Endpoint>(*e);\n\t\t\ttcpRelay->type=Endpoint::TYPE_TCP_RELAY;\n\t\t\ttcpRelay->averageRTT=0;\n\t\t\ttcpRelay->lastPingSeq=0;\n\t\t\ttcpRelay->lastPingTime=0;\n\t\t\ttcpRelay->rtts.Reset();\n\t\t\ttcpRelay->udpPongCount=0;\n\t\t\ttcpRelay->id=tcpRelay->id ^ ((int64_t) (FOURCC('T', 'C', 'P', 0)) << 32);\n\t\t\tif(setCurrentEndpointToTCP && currentEndpoint->type!=Endpoint::TYPE_TCP_RELAY){\n\t\t\t\tsetCurrentEndpointToTCP=false;\n\t\t\t\tcurrentEndpoint=tcpRelay;\n\t\t\t\tpreferredRelay=tcpRelay;\n\t\t\t}\n\t\t\trelays.push_back(tcpRelay);\n\t\t}\n\t\tendpoints.insert(endpoints.end(), relays.begin(), relays.end());\n\t\tdidAddTcpRelays=true;\n\t}\n}\n\ndouble VoIPController::GetAverageRTT(){\n\tif(lastSentSeq>=lastRemoteAckSeq){\n\t\tuint32_t diff=lastSentSeq-lastRemoteAckSeq;\n\t\t//LOGV(\"rtt diff=%u\", diff);\n\t\tif(diff<32){\n\t\t\tdouble res=0;\n\t\t\tint count=0;\n\t\t\t/*for(i=diff;i<32;i++){\n\t\t\t\tif(remoteAcks[i-diff]>0){\n\t\t\t\t\tres+=(remoteAcks[i-diff]-sentPacketTimes[i]);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}*/\n\t\t\tMutexGuard m(queuedPacketsMutex);\n\t\t\tfor(std::vector<RecentOutgoingPacket>::iterator itr=recentOutgoingPackets.begin();itr!=recentOutgoingPackets.end();++itr){\n\t\t\t\tif(itr->ackTime>0){\n\t\t\t\t\tres+=(itr->ackTime-itr->sendTime);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(count>0)\n\t\t\t\tres/=count;\n\t\t\treturn res;\n\t\t}\n\t}\n\treturn 999;\n}\n\n#if defined(__APPLE__)\nstatic void initMachTimestart() {\n\tmach_timebase_info_data_t tb = { 0, 0 };\n\tmach_timebase_info(&tb);\n\tVoIPController::machTimebase = tb.numer;\n\tVoIPController::machTimebase /= tb.denom;\n\tVoIPController::machTimestart = mach_absolute_time();\n}\n#endif\n\ndouble VoIPController::GetCurrentTime(){\n#if defined(__linux__)\n\tstruct timespec ts;\n\tclock_gettime(CLOCK_MONOTONIC, &ts);\n\treturn ts.tv_sec+(double)ts.tv_nsec/1000000000.0;\n#elif defined(__APPLE__)\n\tstatic pthread_once_t token = PTHREAD_ONCE_INIT;\n\tpthread_once(&token, &initMachTimestart);\n\treturn (mach_absolute_time() - machTimestart) * machTimebase / 1000000000.0f;\n#elif defined(_WIN32)\n\tif(!didInitWin32TimeScale){\n\t\tLARGE_INTEGER scale;\n\t\tQueryPerformanceFrequency(&scale);\n\t\twin32TimeScale=scale.QuadPart;\n\t\tdidInitWin32TimeScale=true;\n\t}\n\tLARGE_INTEGER t;\n\tQueryPerformanceCounter(&t);\n\treturn (double)t.QuadPart/(double)win32TimeScale;\n#endif\n}\n\nvoid VoIPController::SetState(int state){\n\tthis->state=state;\n\tLOGV(\"Call state changed to %d\", state);\n\tstateChangeTime=GetCurrentTime();\n\tmessageThread.Post([this, state]{\n\t\tif(callbacks.connectionStateChanged)\n\t\t\tcallbacks.connectionStateChanged(this, state);\n\t});\n\tif(state==STATE_ESTABLISHED){\n\t\tSetMicMute(micMuted);\n\t\tif(!wasEstablished){\n\t\t\twasEstablished=true;\n\t\t\tmessageThread.Post(std::bind(&VoIPController::UpdateRTT, this), 0.1, 0.5);\n\t\t\tmessageThread.Post(std::bind(&VoIPController::UpdateAudioBitrate, this), 0.0, 0.3);\n\t\t\tmessageThread.Post(std::bind(&VoIPController::UpdateCongestion, this), 0.0, 1.0);\n\t\t\tmessageThread.Post(std::bind(&VoIPController::UpdateSignalBars, this), 1.0, 1.0);\n\t\t\tmessageThread.Post(std::bind(&VoIPController::TickJitterBufferAngCongestionControl, this), 0.0, 0.1);\n\t\t}\n\t}\n}\n\n\nvoid VoIPController::SetMicMute(bool mute){\n\tif(micMuted==mute)\n\t\treturn;\n\tmicMuted=mute;\n\tif(audioInput){\n\t\tif(mute)\n\t\t\taudioInput->Stop();\n\t\telse\n\t\t\taudioInput->Start();\n\t\tif(!audioInput->IsInitialized()){\n\t\t\tlastError=ERROR_AUDIO_IO;\n\t\t\tSetState(STATE_FAILED);\n\t\t\treturn;\n\t\t}\n\t}\n\tif(echoCanceller)\n\t\techoCanceller->Enable(!mute);\n\tif(state==STATE_ESTABLISHED){\n\t\tfor(shared_ptr<Stream>& s:outgoingStreams){\n\t\t\tif(s->type==STREAM_TYPE_AUDIO){\n\t\t\t\ts->enabled=!mute;\n\t\t\t\tif(peerVersion<6){\n\t\t\t\t\tunsigned char buf[2];\n\t\t\t\t\tbuf[0]=s->id;\n\t\t\t\t\tbuf[1]=(char) (mute ? 0 : 1);\n\t\t\t\t\tSendPacketReliably(PKT_STREAM_STATE, buf, 2, .5f, 20);\n\t\t\t\t}else{\n\t\t\t\t\tSendStreamFlags(*s);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(mute){\n\t\tif(noStreamsNopID==MessageThread::INVALID_ID)\n\t\t\tnoStreamsNopID=messageThread.Post(std::bind(&VoIPController::SendNopPacket, this), 0.2, 0.2);\n\t}else{\n\t\tif(noStreamsNopID!=MessageThread::INVALID_ID){\n\t\t\tmessageThread.Cancel(noStreamsNopID);\n\t\t\tnoStreamsNopID=MessageThread::INVALID_ID;\n\t\t}\n\t}\n}\n\n\nvoid VoIPController::UpdateAudioOutputState(){\n\tbool areAnyAudioStreamsEnabled=false;\n\tfor(vector<shared_ptr<Stream>>::iterator s=incomingStreams.begin();s!=incomingStreams.end();++s){\n\t\tif((*s)->type==STREAM_TYPE_AUDIO && (*s)->enabled)\n\t\t\tareAnyAudioStreamsEnabled=true;\n\t}\n\t/*if(jitterBuffer){\n\t\tjitterBuffer->Reset();\n\t}\n\tif(decoder){\n\t\tdecoder->ResetQueue();\n\t}*/\n\tif(audioOutput){\n\t\tif(audioOutput->IsPlaying()!=areAnyAudioStreamsEnabled){\n\t\t\tif(areAnyAudioStreamsEnabled)\n\t\t\t\taudioOutput->Start();\n\t\t\telse\n\t\t\t\taudioOutput->Stop();\n\t\t}\n\t}\n}\n\nvoid VoIPController::SendStreamFlags(Stream& stream){\n\tBufferOutputStream s(5);\n\ts.WriteByte(stream.id);\n\tuint32_t flags=0;\n\tif(stream.enabled)\n\t\tflags|=STREAM_FLAG_ENABLED;\n\tif(stream.extraECEnabled)\n\t\tflags|=STREAM_FLAG_EXTRA_EC;\n\ts.WriteInt32(flags);\n\tBuffer buf(move(s));\n\tSendExtra(buf, EXTRA_TYPE_STREAM_FLAGS);\n}\n\nvoid VoIPController::KDF(unsigned char* msgKey, size_t x, unsigned char* aesKey, unsigned char* aesIv){\n\tuint8_t sA[SHA1_LENGTH], sB[SHA1_LENGTH], sC[SHA1_LENGTH], sD[SHA1_LENGTH];\n\tBufferOutputStream buf(128);\n\tbuf.WriteBytes(msgKey, 16);\n\tbuf.WriteBytes(encryptionKey+x, 32);\n\tcrypto.sha1(buf.GetBuffer(), buf.GetLength(), sA);\n\tbuf.Reset();\n\tbuf.WriteBytes(encryptionKey+32+x, 16);\n\tbuf.WriteBytes(msgKey, 16);\n\tbuf.WriteBytes(encryptionKey+48+x, 16);\n\tcrypto.sha1(buf.GetBuffer(), buf.GetLength(), sB);\n\tbuf.Reset();\n\tbuf.WriteBytes(encryptionKey+64+x, 32);\n\tbuf.WriteBytes(msgKey, 16);\n\tcrypto.sha1(buf.GetBuffer(), buf.GetLength(), sC);\n\tbuf.Reset();\n\tbuf.WriteBytes(msgKey, 16);\n\tbuf.WriteBytes(encryptionKey+96+x, 32);\n\tcrypto.sha1(buf.GetBuffer(), buf.GetLength(), sD);\n\tbuf.Reset();\n\tbuf.WriteBytes(sA, 8);\n\tbuf.WriteBytes(sB+8, 12);\n\tbuf.WriteBytes(sC+4, 12);\n\tassert(buf.GetLength()==32);\n\tmemcpy(aesKey, buf.GetBuffer(), 32);\n\tbuf.Reset();\n\tbuf.WriteBytes(sA+8, 12);\n\tbuf.WriteBytes(sB, 8);\n\tbuf.WriteBytes(sC+16, 4);\n\tbuf.WriteBytes(sD, 8);\n\tassert(buf.GetLength()==32);\n\tmemcpy(aesIv, buf.GetBuffer(), 32);\n}\n\nvoid VoIPController::KDF2(unsigned char* msgKey, size_t x, unsigned char *aesKey, unsigned char *aesIv){\n\tuint8_t sA[32], sB[32];\n\tBufferOutputStream buf(128);\n\tbuf.WriteBytes(msgKey, 16);\n\tbuf.WriteBytes(encryptionKey+x, 36);\n\tcrypto.sha256(buf.GetBuffer(), buf.GetLength(), sA);\n\tbuf.Reset();\n\tbuf.WriteBytes(encryptionKey+40+x, 36);\n\tbuf.WriteBytes(msgKey, 16);\n\tcrypto.sha256(buf.GetBuffer(), buf.GetLength(), sB);\n\tbuf.Reset();\n\tbuf.WriteBytes(sA, 8);\n\tbuf.WriteBytes(sB+8, 16);\n\tbuf.WriteBytes(sA+24, 8);\n\tmemcpy(aesKey, buf.GetBuffer(), 32);\n\tbuf.Reset();\n\tbuf.WriteBytes(sB, 8);\n\tbuf.WriteBytes(sA+8, 16);\n\tbuf.WriteBytes(sB+24, 8);\n\tmemcpy(aesIv, buf.GetBuffer(), 32);\n}\n\nstring VoIPController::GetDebugString(){\n\tstring r=\"Remote endpoints: \\n\";\n\tchar buffer[2048];\n\tMutexGuard m(endpointsMutex);\n\tfor(shared_ptr<Endpoint>& endpoint:endpoints){\n\t\tconst char* type;\n\t\tswitch(endpoint->type){\n\t\t\tcase Endpoint::TYPE_UDP_P2P_INET:\n\t\t\t\ttype=\"UDP_P2P_INET\";\n\t\t\t\tbreak;\n\t\t\tcase Endpoint::TYPE_UDP_P2P_LAN:\n\t\t\t\ttype=\"UDP_P2P_LAN\";\n\t\t\t\tbreak;\n\t\t\tcase Endpoint::TYPE_UDP_RELAY:\n\t\t\t\ttype=\"UDP_RELAY\";\n\t\t\t\tbreak;\n\t\t\tcase Endpoint::TYPE_TCP_RELAY:\n\t\t\t\ttype=\"TCP_RELAY\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttype=\"UNKNOWN\";\n\t\t\t\tbreak;\n\t\t}\n\t\tsnprintf(buffer, sizeof(buffer), \"%s:%u %dms %d 0x%\" PRIx64 \" [%s%s]\\n\", endpoint->address.IsEmpty() ? (\"[\"+endpoint->v6address.ToString()+\"]\").c_str() : endpoint->address.ToString().c_str(), endpoint->port, (int)(endpoint->averageRTT*1000), endpoint->udpPongCount, (uint64_t)endpoint->id, type, currentEndpoint==endpoint ? \", IN_USE\" : \"\");\n\t\tr+=buffer;\n\t}\n\tif(shittyInternetMode){\n\t\tr+=\"ShittyInternetMode enabled\\n\";\n\t}\n\tdouble avgLate[3];\n\tshared_ptr<JitterBuffer> jitterBuffer=incomingStreams.size()==1 ? incomingStreams[0]->jitterBuffer : NULL;\n\tif(jitterBuffer)\n\t\tjitterBuffer->GetAverageLateCount(avgLate);\n\telse\n\t\tmemset(avgLate, 0, 3*sizeof(double));\n\tsnprintf(buffer, sizeof(buffer),\n\t\t\t\t\t \"Jitter buffer: %d/%.2f | %.1f, %.1f, %.1f\\n\"\n\t\t\t\t\t \"RTT avg/min: %d/%d\\n\"\n\t\t\t\t\t \"Congestion window: %d/%d bytes\\n\"\n\t\t\t\t\t \"Key fingerprint: %02hhX%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX%s\\n\"\n\t\t\t\t\t \"Last sent/ack'd seq: %u/%u\\n\"\n\t\t\t\t\t \"Last recvd seq: %u\\n\"\n\t\t\t\t\t \"Send/recv losses: %u/%u (%d%%)\\n\"\n\t\t\t\t\t \"Audio bitrate: %d kbit\\n\"\n\t\t\t\t\t \"Outgoing queue: %u\\n\"\n//\t\t\t\t\t \"Packet grouping: %d\\n\"\n\t\t\t\t\t\"Frame size out/in: %d/%d\\n\"\n\t\t\t\t\t \"Bytes sent/recvd: %llu/%llu\",\n\t\t\t jitterBuffer ? jitterBuffer->GetMinPacketCount() : 0, jitterBuffer ? jitterBuffer->GetAverageDelay() : 0, avgLate[0], avgLate[1], avgLate[2],\n\t\t\t// (int)(GetAverageRTT()*1000), 0,\n\t\t\t (int)(conctl->GetAverageRTT()*1000), (int)(conctl->GetMinimumRTT()*1000),\n\t\t\t int(conctl->GetInflightDataSize()), int(conctl->GetCongestionWindow()),\n\t\t\t keyFingerprint[0],keyFingerprint[1],keyFingerprint[2],keyFingerprint[3],keyFingerprint[4],keyFingerprint[5],keyFingerprint[6],keyFingerprint[7],\n\t\t\t useMTProto2 ? \" (MTProto2.0)\" : \"\",\n\t\t\t lastSentSeq, lastRemoteAckSeq, lastRemoteSeq,\n\t\t\t conctl->GetSendLossCount(), recvLossCount, encoder ? encoder->GetPacketLoss() : 0,\n\t\t\t encoder ? (encoder->GetBitrate()/1000) : 0,\n\t\t\t static_cast<unsigned int>(unsentStreamPackets),\n//\t\t\t audioPacketGrouping,\n\t\t\t outgoingStreams[0]->frameDuration, incomingStreams.size()>0 ? incomingStreams[0]->frameDuration : 0,\n\t\t\t (long long unsigned int)(stats.bytesSentMobile+stats.bytesSentWifi),\n\t\t\t (long long unsigned int)(stats.bytesRecvdMobile+stats.bytesRecvdWifi));\n\tr+=buffer;\n\treturn r;\n}\n\n\nvoid VoIPController::SendPublicEndpointsRequest(Endpoint& relay){\n\tif(!useUDP)\n\t\treturn;\n\tLOGD(\"Sending public endpoints request to %s:%d\", relay.address.ToString().c_str(), relay.port);\n\tpublicEndpointsReqTime=GetCurrentTime();\n\twaitingForRelayPeerInfo=true;\n\tunsigned char buf[32];\n\tmemcpy(buf, relay.peerTag, 16);\n\tmemset(buf+16, 0xFF, 16);\n\tNetworkPacket pkt={0};\n\tpkt.data=buf;\n\tpkt.length=32;\n\tpkt.address=(NetworkAddress*)&relay.address;\n\tpkt.port=relay.port;\n\tpkt.protocol=PROTO_UDP;\n\tudpSocket->Send(&pkt);\n}\n\nshared_ptr<Endpoint> VoIPController::GetEndpointByType(int type){\n\tif(type==Endpoint::TYPE_UDP_RELAY && preferredRelay)\n\t\treturn preferredRelay;\n\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\tif(e->type==type)\n\t\t\treturn e;\n\t}\n\treturn NULL;\n}\n\nshared_ptr<Endpoint> VoIPController::GetEndpointByID(int64_t id){\n\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\tif(e->id==id)\n\t\t\treturn e;\n\t}\n\treturn NULL;\n}\n\n\nvoid VoIPController::SendPacketReliably(unsigned char type, unsigned char *data, size_t len, double retryInterval, double timeout){\n\tLOGD(\"Send reliably, type=%u, len=%u, retry=%.3f, timeout=%.3f\", type, unsigned(len), retryInterval, timeout);\n\tQueuedPacket pkt;\n\tif(data){\n\t\tBuffer b(len);\n\t\tb.CopyFrom(data, 0, len);\n\t\tpkt.data=move(b);\n\t}\n\tpkt.type=type;\n\tpkt.retryInterval=retryInterval;\n\tpkt.timeout=timeout;\n\tpkt.firstSentTime=0;\n\tpkt.lastSentTime=0;\n\t{\n\t\tMutexGuard m(queuedPacketsMutex);\n\t\tqueuedPackets.push_back(move(pkt));\n\t}\n\tmessageThread.Post(std::bind(&VoIPController::UpdateQueuedPackets, this));\n\tif(timeout>0.0){\n\t\tmessageThread.Post(std::bind(&VoIPController::UpdateQueuedPackets, this), timeout);\n\t}\n}\n\nvoid VoIPController::SendExtra(Buffer &data, unsigned char type){\n\tMutexGuard m(queuedPacketsMutex);\n\tLOGV(\"Sending extra type %u length %lu\", type, data.Length());\n\tfor(vector<UnacknowledgedExtraData>::iterator x=currentExtras.begin();x!=currentExtras.end();++x){\n\t\tif(x->type==type){\n\t\t\tx->firstContainingSeq=0;\n\t\t\tx->data=move(data);\n\t\t\treturn;\n\t\t}\n\t}\n\tUnacknowledgedExtraData xd={type, move(data), 0};\n\tcurrentExtras.push_back(move(xd));\n}\n\n\nvoid VoIPController::SetConfig(const Config& cfg){\n\tconfig=cfg;\n\tif(tgvoipLogFile){\n\t\tfclose(tgvoipLogFile);\n\t\ttgvoipLogFile=NULL;\n\t}\n\tif(!config.logFilePath.empty()){\n#ifndef _WIN32\n\t\ttgvoipLogFile=fopen(config.logFilePath.c_str(), \"a\");\n#else\n\t\tif(_wfopen_s(&tgvoipLogFile, config.logFilePath.c_str(), L\"a\")!=0){\n\t\t\ttgvoipLogFile=NULL;\n\t\t}\n#endif\n\t\ttgvoip_log_file_write_header(tgvoipLogFile);\n\t}else{\n\t\ttgvoipLogFile=NULL;\n\t}\n\tif(statsDump){\n\t\tfclose(statsDump);\n\t\tstatsDump=NULL;\n\t}\n\tif(!config.statsDumpFilePath.empty()){\n#ifndef _WIN32\n\t\tstatsDump=fopen(config.statsDumpFilePath.c_str(), \"w\");\n#else\n\t\tif(_wfopen_s(&statsDump, config.statsDumpFilePath.c_str(), L\"w\")!=0){\n\t\t\tstatsDump=NULL;\n\t\t}\n#endif\n\t\tif(statsDump)\n\t\t\tfprintf(statsDump, \"Time\\tRTT\\tLRSeq\\tLSSeq\\tLASeq\\tLostR\\tLostS\\tCWnd\\tBitrate\\tLoss%%\\tJitter\\tJDelay\\tAJDelay\\n\");\n\t\t//else\n\t\t//\tLOGW(\"Failed to open stats dump file %s for writing\", config.statsDumpFilePath.c_str());\n\t}else{\n\t\tstatsDump=NULL;\n\t}\n\tUpdateDataSavingState();\n\tUpdateAudioBitrateLimit();\n}\n\n\nvoid VoIPController::UpdateDataSavingState(){\n\tif(config.dataSaving==DATA_SAVING_ALWAYS){\n\t\tdataSavingMode=true;\n\t}else if(config.dataSaving==DATA_SAVING_MOBILE){\n\t\tdataSavingMode=networkType==NET_TYPE_GPRS || networkType==NET_TYPE_EDGE ||\n\t\t   networkType==NET_TYPE_3G || networkType==NET_TYPE_HSPA || networkType==NET_TYPE_LTE || networkType==NET_TYPE_OTHER_MOBILE;\n\t}else{\n\t\tdataSavingMode=false;\n\t}\n\tLOGI(\"update data saving mode, config %d, enabled %d, reqd by peer %d\", config.dataSaving, dataSavingMode, dataSavingRequestedByPeer);\n}\n\n\nvoid VoIPController::DebugCtl(int request, int param){\n\tif(request==1){ // set bitrate\n\t\tmaxBitrate=param;\n\t\tif(encoder){\n\t\t\tencoder->SetBitrate(maxBitrate);\n\t\t}\n\t}else if(request==2){ // set packet loss\n\t\tif(encoder){\n\t\t\tencoder->SetPacketLoss(param);\n\t\t}\n\t}else if(request==3){ // force enable/disable p2p\n\t\tallowP2p=param==1;\n\t\tif(!allowP2p && currentEndpoint && currentEndpoint->type!=Endpoint::TYPE_UDP_RELAY){\n\t\t\tcurrentEndpoint=preferredRelay;\n\t\t}else if(allowP2p){\n\t\t\tSendPublicEndpointsRequest();\n\t\t}\n\t\tBufferOutputStream s(4);\n\t\ts.WriteInt32(dataSavingMode ? INIT_FLAG_DATA_SAVING_ENABLED : 0);\n\t\tSendPacketReliably(PKT_NETWORK_CHANGED, s.GetBuffer(), s.GetLength(), 1, 20);\n\t}else if(request==4){\n\t\tif(echoCanceller)\n\t\t\techoCanceller->Enable(param==1);\n\t}\n}\n\n\nconst char* VoIPController::GetVersion(){\n\treturn LIBTGVOIP_VERSION;\n}\n\n\nint64_t VoIPController::GetPreferredRelayID(){\n\tif(preferredRelay)\n\t\treturn preferredRelay->id;\n\treturn 0;\n}\n\n\nint VoIPController::GetLastError(){\n\treturn lastError;\n}\n\n\nvoid VoIPController::GetStats(TrafficStats *stats){\n\tmemcpy(stats, &this->stats, sizeof(TrafficStats));\n}\n\n#ifdef TGVOIP_USE_AUDIO_SESSION\nvoid VoIPController::SetAcquireAudioSession(void (^completion)(void (^)())) {\n\tthis->acquireAudioSession = [completion copy];\n}\n\nvoid VoIPController::ReleaseAudioSession(void (^completion)()) {\n\tcompletion();\n}\n#endif\n\nvoid VoIPController::LogDebugInfo(){\n\tstring json=\"{\\\"endpoints\\\":[\";\n\tfor(vector<shared_ptr<Endpoint>>::iterator itr=endpoints.begin();itr!=endpoints.end();++itr){\n\t\tshared_ptr<Endpoint> e=*itr;\n\t\tchar buffer[1024];\n\t\tconst char* typeStr=\"unknown\";\n\t\tswitch(e->type){\n\t\t\tcase Endpoint::TYPE_UDP_RELAY:\n\t\t\t\ttypeStr=\"udp_relay\";\n\t\t\t\tbreak;\n\t\t\tcase Endpoint::TYPE_UDP_P2P_INET:\n\t\t\t\ttypeStr=\"udp_p2p_inet\";\n\t\t\t\tbreak;\n\t\t\tcase Endpoint::TYPE_UDP_P2P_LAN:\n\t\t\t\ttypeStr=\"udp_p2p_lan\";\n\t\t\t\tbreak;\n\t\t\tcase Endpoint::TYPE_TCP_RELAY:\n\t\t\t\ttypeStr=\"tcp_relay\";\n\t\t\t\tbreak;\n\t\t}\n\t\tsnprintf(buffer, 1024, \"{\\\"address\\\":\\\"%s\\\",\\\"port\\\":%u,\\\"type\\\":\\\"%s\\\",\\\"rtt\\\":%u%s%s}\", e->address.ToString().c_str(), e->port, typeStr, (unsigned int)round(e->averageRTT*1000), currentEndpoint==e ? \",\\\"in_use\\\":true\" : \"\", preferredRelay==e ? \",\\\"preferred\\\":true\" : \"\");\n\t\tjson+=buffer;\n\t\tif(itr!=endpoints.end()-1)\n\t\t\tjson+=\",\";\n\t}\n\tjson+=\"],\";\n\tchar buffer[1024];\n\tconst char* netTypeStr;\n\tswitch(networkType){\n\t\tcase NET_TYPE_WIFI:\n\t\t\tnetTypeStr=\"wifi\";\n\t\t\tbreak;\n\t\tcase NET_TYPE_GPRS:\n\t\t\tnetTypeStr=\"gprs\";\n\t\t\tbreak;\n\t\tcase NET_TYPE_EDGE:\n\t\t\tnetTypeStr=\"edge\";\n\t\t\tbreak;\n\t\tcase NET_TYPE_3G:\n\t\t\tnetTypeStr=\"3g\";\n\t\t\tbreak;\n\t\tcase NET_TYPE_HSPA:\n\t\t\tnetTypeStr=\"hspa\";\n\t\t\tbreak;\n\t\tcase NET_TYPE_LTE:\n\t\t\tnetTypeStr=\"lte\";\n\t\t\tbreak;\n\t\tcase NET_TYPE_ETHERNET:\n\t\t\tnetTypeStr=\"ethernet\";\n\t\t\tbreak;\n\t\tcase NET_TYPE_OTHER_HIGH_SPEED:\n\t\t\tnetTypeStr=\"other_high_speed\";\n\t\t\tbreak;\n\t\tcase NET_TYPE_OTHER_LOW_SPEED:\n\t\t\tnetTypeStr=\"other_low_speed\";\n\t\t\tbreak;\n\t\tcase NET_TYPE_DIALUP:\n\t\t\tnetTypeStr=\"dialup\";\n\t\t\tbreak;\n\t\tcase NET_TYPE_OTHER_MOBILE:\n\t\t\tnetTypeStr=\"other_mobile\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tnetTypeStr=\"unknown\";\n\t\t\tbreak;\n\t}\n\tsnprintf(buffer, 1024, \"\\\"time\\\":%u,\\\"network_type\\\":\\\"%s\\\"}\", (unsigned int)time(NULL), netTypeStr);\n\tjson+=buffer;\n\tdebugLogs.push_back(json);\n}\n\nstring VoIPController::GetDebugLog(){\n\tstring log=\"{\\\"events\\\":[\";\n\n\tfor(vector<string>::iterator itr=debugLogs.begin();itr!=debugLogs.end();++itr){\n\t\tlog+=(*itr);\n\t\tif((itr+1)!=debugLogs.end())\n\t\t\tlog+=\",\";\n\t}\n\tlog+=\"],\\\"libtgvoip_version\\\":\\\"\" LIBTGVOIP_VERSION \"\\\"}\";\n\treturn log;\n}\n\nvoid VoIPController::GetDebugLog(char *buffer){\n\tstrcpy(buffer, GetDebugLog().c_str());\n}\n\nsize_t VoIPController::GetDebugLogLength(){\n\tsize_t len=128;\n\tfor(vector<string>::iterator itr=debugLogs.begin();itr!=debugLogs.end();++itr){\n\t\tlen+=(*itr).length()+1;\n\t}\n\treturn len;\n}\n\nvector<AudioInputDevice> VoIPController::EnumerateAudioInputs(){\n\tvector<AudioInputDevice> devs;\n\taudio::AudioInput::EnumerateDevices(devs);\n\treturn devs;\n}\n\nvector<AudioOutputDevice> VoIPController::EnumerateAudioOutputs(){\n\tvector<AudioOutputDevice> devs;\n\taudio::AudioOutput::EnumerateDevices(devs);\n\treturn devs;\n}\n\nvoid VoIPController::SetCurrentAudioInput(string id){\n\tcurrentAudioInput=id;\n\tif(audioInput)\n\t\taudioInput->SetCurrentDevice(id);\n}\n\nvoid VoIPController::SetCurrentAudioOutput(string id){\n\tcurrentAudioOutput=id;\n\tif(audioOutput)\n\t\taudioOutput->SetCurrentDevice(id);\n}\n\nstring VoIPController::GetCurrentAudioInputID(){\n\treturn currentAudioInput;\n}\n\nstring VoIPController::GetCurrentAudioOutputID(){\n\treturn currentAudioOutput;\n}\n\nvoid VoIPController::SetProxy(int protocol, string address, uint16_t port, string username, string password){\n\tproxyProtocol=protocol;\n\tproxyAddress=address;\n\tproxyPort=port;\n\tproxyUsername=username;\n\tproxyPassword=password;\n}\n\nvoid VoIPController::SendUdpPing(shared_ptr<Endpoint> endpoint){\n\tif(endpoint->type!=Endpoint::TYPE_UDP_RELAY)\n\t\treturn;\n\tLOGV(\"Sending UDP ping to %s:%d\", endpoint->GetAddress().ToString().c_str(), endpoint->port);\n\tBufferOutputStream p(1024);\n\tp.WriteBytes(endpoint->peerTag, 16);\n\tp.WriteInt32(-1);\n\tp.WriteInt32(-1);\n\tp.WriteInt32(-1);\n\tp.WriteInt32(-2);\n\tp.WriteInt64(12345);\n\tNetworkPacket pkt={0};\n\tpkt.address=&endpoint->GetAddress();\n\tpkt.port=endpoint->port;\n\tpkt.protocol=PROTO_UDP;\n\tpkt.data=p.GetBuffer();\n\tpkt.length=p.GetLength();\n\tudpSocket->Send(&pkt);\n}\n\n\nvoid VoIPController::StartAudio(){\n\tshared_ptr<Stream>& outgoingAudioStream=outgoingStreams[0];\n\tLOGI(\"before create audio io\");\n\taudioIO=audio::AudioIO::Create();\n\taudioInput=audioIO->GetInput();\n\taudioOutput=audioIO->GetOutput();\n\tLOGI(\"AEC: %d NS: %d AGC: %d\", config.enableAEC, config.enableNS, config.enableAGC);\n\techoCanceller=new EchoCanceller(config.enableAEC, config.enableNS, config.enableAGC);\n\tencoder=new OpusEncoder(audioInput, peerVersion>=6);\n\tencoder->SetCallback(AudioInputCallback, this);\n\tencoder->SetOutputFrameDuration(outgoingAudioStream->frameDuration);\n\tencoder->SetEchoCanceller(echoCanceller);\n\tencoder->SetSecondaryEncoderEnabled(false);\n\n#if defined(TGVOIP_USE_CALLBACK_AUDIO_IO)\n\tdynamic_cast<audio::AudioInputCallback*>(audioInput)->SetDataCallback(audioInputDataCallback);\n\tdynamic_cast<audio::AudioOutputCallback*>(audioOutput)->SetDataCallback(audioOutputDataCallback);\n#endif\n\t\n\tif(!audioOutput->IsInitialized()){\n\t\tLOGE(\"Erorr initializing audio playback\");\n\t\tlastError=ERROR_AUDIO_IO;\n\n\t\tSetState(STATE_FAILED);\n\t\treturn;\n\t}\n\tUpdateAudioBitrateLimit();\n\n\t/*voip_stream_t* incomingAudioStream=incomingStreams[0];\n\tjitterBuffer=new JitterBuffer(NULL, incomingAudioStream->frameDuration);\n\tdecoder=new OpusDecoder(audioOutput);\n\tdecoder->SetEchoCanceller(echoCanceller);\n\tdecoder->SetJitterBuffer(jitterBuffer);\n\tdecoder->SetFrameDuration(incomingAudioStream->frameDuration);\n\tdecoder->Start();\n\tif(incomingAudioStream->frameDuration>50)\n\t\tjitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_initial_delay_60\", 3));\n\telse if(incomingAudioStream->frameDuration>30)\n\t\tjitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_initial_delay_40\", 4));\n\telse\n\t\tjitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_initial_delay_20\", 6));*/\n\t//audioOutput->Start();\n\tOnAudioOutputReady();\n\n\tencoder->Start();\n\tif(!micMuted){\n\t\taudioInput->Start();\n\t\tif(!audioInput->IsInitialized()){\n\t\t\tLOGE(\"Erorr initializing audio capture\");\n\t\t\tlastError=ERROR_AUDIO_IO;\n\n\t\t\tSetState(STATE_FAILED);\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nvoid VoIPController::OnAudioOutputReady(){\n\tLOGI(\"Audio I/O ready\");\n\tshared_ptr<Stream>& stm=incomingStreams[0];\n\toutputAGC=new AutomaticGainControl();\n\toutputAGC->SetPassThrough(!outputAGCEnabled);\n\tstm->decoder=make_shared<OpusDecoder>(audioOutput, true, peerVersion>=6);\n\tstm->decoder->AddAudioEffect(outputAGC);\n\tstm->decoder->SetEchoCanceller(echoCanceller);\n\tstm->decoder->SetJitterBuffer(stm->jitterBuffer);\n\tstm->decoder->SetFrameDuration(stm->frameDuration);\n\tstm->decoder->Start();\n}\n\nint VoIPController::GetSignalBarsCount(){\n\treturn signalBarsHistory.NonZeroAverage();\n}\n\nvoid VoIPController::SetCallbacks(VoIPController::Callbacks callbacks){\n\tthis->callbacks=callbacks;\n\tif(callbacks.connectionStateChanged)\n\t\tcallbacks.connectionStateChanged(this, state);\n}\n\nvoid VoIPController::SetAudioOutputGainControlEnabled(bool enabled){\n\tLOGD(\"New output AGC state: %d\", enabled);\n\toutputAGCEnabled=enabled;\n\tif(outputAGC)\n\t\toutputAGC->SetPassThrough(!enabled);\n}\n\nuint32_t VoIPController::GetPeerCapabilities(){\n\treturn peerCapabilities;\n}\n\nvoid VoIPController::SendGroupCallKey(unsigned char *key){\n\tif(!(peerCapabilities & TGVOIP_PEER_CAP_GROUP_CALLS)){\n\t\tLOGE(\"Tried to send group call key but peer isn't capable of them\");\n\t\treturn;\n\t}\n\tif(didSendGroupCallKey){\n\t\tLOGE(\"Tried to send a group call key repeatedly\");\n\t\treturn;\n\t}\n\tif(!isOutgoing){\n\t\tLOGE(\"You aren't supposed to send group call key in an incoming call, use VoIPController::RequestCallUpgrade() instead\");\n\t\treturn;\n\t}\n\tdidSendGroupCallKey=true;\n\tBuffer buf(256);\n\tbuf.CopyFrom(key, 0, 256);\n\tSendExtra(buf, EXTRA_TYPE_GROUP_CALL_KEY);\n}\n\nvoid VoIPController::RequestCallUpgrade(){\n\tif(!(peerCapabilities & TGVOIP_PEER_CAP_GROUP_CALLS)){\n\t\tLOGE(\"Tried to send group call key but peer isn't capable of them\");\n\t\treturn;\n\t}\n\tif(didSendUpgradeRequest){\n\t\tLOGE(\"Tried to send upgrade request repeatedly\");\n\t\treturn;\n\t}\n\tif(isOutgoing){\n\t\tLOGE(\"You aren't supposed to send an upgrade request in an outgoing call, generate an encryption key and use VoIPController::SendGroupCallKey instead\");\n\t\treturn;\n\t}\n\tdidSendUpgradeRequest=true;\n\tBuffer empty(0);\n\tSendExtra(empty, EXTRA_TYPE_REQUEST_GROUP);\n}\n\nvoid VoIPController::SetEchoCancellationStrength(int strength){\n\techoCancellationStrength=strength;\n\tif(echoCanceller)\n\t\techoCanceller->SetAECStrength(strength);\n}\n\nvoid VoIPController::ResetUdpAvailability(){\n\tLOGI(\"Resetting UDP availability\");\n\tif(udpPingTimeoutID!=MessageThread::INVALID_ID){\n\t\tmessageThread.Cancel(udpPingTimeoutID);\n\t}\n\t{\n\t\tMutexGuard m(endpointsMutex);\n\t\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\t\te->udpPongCount=0;\n\t\t}\n\t}\n\tudpPingCount=0;\n\tudpConnectivityState=UDP_PING_PENDING;\n\tudpPingTimeoutID=messageThread.Post(std::bind(&VoIPController::SendUdpPings, this), 0.0, 0.5);\n}\n\nvoid VoIPController::ResetEndpointPingStats(){\n\tMutexGuard m(endpointsMutex);\n\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\te->averageRTT=0.0;\n\t\te->rtts.Reset();\n\t}\n}\n\n#if defined(TGVOIP_USE_CALLBACK_AUDIO_IO)\nvoid VoIPController::SetAudioDataCallbacks(std::function<void(int16_t*, size_t)> input, std::function<void(int16_t*, size_t)> output){\n\taudioInputDataCallback=input;\n\taudioOutputDataCallback=output;\n}\n#endif\n\nint VoIPController::GetConnectionState(){\n\treturn state;\n}\n\n#pragma mark - Timer methods\n\nvoid VoIPController::SendUdpPings(){\n\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\tif(e->type==Endpoint::TYPE_UDP_RELAY){\n\t\t\tSendUdpPing(e);\n\t\t}\n\t}\n\tif(udpConnectivityState==UDP_UNKNOWN || udpConnectivityState==UDP_PING_PENDING)\n\t\tudpConnectivityState=UDP_PING_SENT;\n\tudpPingCount++;\n\tif(udpPingCount==4 || udpPingCount==10){\n\t\tmessageThread.CancelSelf();\n\t\tudpPingTimeoutID=messageThread.Post(std::bind(&VoIPController::EvaluateUdpPingResults, this), 1.0);\n\t}\n}\n\nvoid VoIPController::EvaluateUdpPingResults(){\n\tdouble avgPongs=0;\n\tint count=0;\n\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\tif(e->type==Endpoint::TYPE_UDP_RELAY){\n\t\t\tif(e->udpPongCount>0){\n\t\t\t\tavgPongs+=(double) e->udpPongCount;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t}\n\tif(count>0)\n\t\tavgPongs/=(double)count;\n\telse\n\t\tavgPongs=0.0;\n\tLOGI(\"UDP ping reply count: %.2f\", avgPongs);\n\tbool configUseTCP=ServerConfig::GetSharedInstance()->GetBoolean(\"use_tcp\", true);\n\tif(configUseTCP){\n\t\tif(avgPongs==0.0 || (udpConnectivityState==UDP_BAD && avgPongs<7.0)){\n\t\t\tudpConnectivityState=UDP_NOT_AVAILABLE;\n\t\t\tuseTCP=true;\n\t\t\tAddTCPRelays();\n\t\t\tuseUDP=false;\n\t\t\twaitingForRelayPeerInfo=false;\n\t\t\tif(currentEndpoint->type!=Endpoint::TYPE_TCP_RELAY)\n\t\t\t\tsetCurrentEndpointToTCP=true;\n\t\t}else if(avgPongs<3.0){\n\t\t\tudpConnectivityState=UDP_BAD;\n\t\t\tuseTCP=true;\n\t\t\tAddTCPRelays();\n\t\t\tsetCurrentEndpointToTCP=true;\n\t\t\tudpPingTimeoutID=messageThread.Post(std::bind(&VoIPController::SendUdpPings, this), 0.5, 0.5);\n\t\t}else{\n\t\t\tudpPingTimeoutID=MessageThread::INVALID_ID;\n\t\t\tudpConnectivityState=UDP_AVAILABLE;\n\t\t}\n\t}else{\n\t\tudpPingTimeoutID=MessageThread::INVALID_ID;\n\t\tudpConnectivityState=UDP_NOT_AVAILABLE;\n\t}\n}\n\nvoid VoIPController::SendRelayPings(){\n\tMutexGuard m(endpointsMutex);\n\tif((state==STATE_ESTABLISHED || state==STATE_RECONNECTING) && endpoints.size()>1){\n\t\tshared_ptr<Endpoint> minPingRelay=preferredRelay;\n\t\tdouble minPing=preferredRelay->averageRTT*(preferredRelay->type==Endpoint::TYPE_TCP_RELAY ? 2 : 1);\n\t\tif(minPing==0.0) // force the switch to an available relay, if any\n\t\t\tminPing=DBL_MAX;\n\t\tfor(shared_ptr<Endpoint>& endpoint:endpoints){\n\t\t\tif(endpoint->type==Endpoint::TYPE_TCP_RELAY && !useTCP)\n\t\t\t\tcontinue;\n\t\t\tif(GetCurrentTime()-endpoint->lastPingTime>=10){\n\t\t\t\tLOGV(\"Sending ping to %s\", endpoint->GetAddress().ToString().c_str());\n\t\t\t\tsendQueue->Put(PendingOutgoingPacket{\n\t\t\t\t\t\t/*.seq=*/(endpoint->lastPingSeq=GenerateOutSeq()),\n\t\t\t\t\t\t/*.type=*/PKT_PING,\n\t\t\t\t\t\t/*.len=*/0,\n\t\t\t\t\t\t/*.data=*/Buffer(),\n\t\t\t\t\t\t/*.endpoint=*/endpoint->id\n\t\t\t\t});\n\t\t\t\tendpoint->lastPingTime=GetCurrentTime();\n\t\t\t}\n\t\t\tif(endpoint->type==Endpoint::TYPE_UDP_RELAY || (useTCP && endpoint->type==Endpoint::TYPE_TCP_RELAY)){\n\t\t\t\tdouble k=endpoint->type==Endpoint::TYPE_UDP_RELAY ? 1 : 2;\n\t\t\t\tif(endpoint->averageRTT>0 && endpoint->averageRTT*k<minPing*relaySwitchThreshold){\n\t\t\t\t\tminPing=endpoint->averageRTT*k;\n\t\t\t\t\tminPingRelay=endpoint;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(minPingRelay!=preferredRelay){\n\t\t\tpreferredRelay=minPingRelay;\n\t\t\tLOGV(\"set preferred relay to %s\", preferredRelay->address.ToString().c_str());\n\t\t\tif(currentEndpoint->type==Endpoint::TYPE_UDP_RELAY || currentEndpoint->type==Endpoint::TYPE_TCP_RELAY)\n\t\t\t\tcurrentEndpoint=preferredRelay;\n\t\t\tLogDebugInfo();\n\t\t}\n\t\tif(currentEndpoint->type==Endpoint::TYPE_UDP_RELAY){\n\t\t\tshared_ptr<Endpoint> p2p=GetEndpointByType(Endpoint::TYPE_UDP_P2P_INET);\n\t\t\tif(p2p){\n\t\t\t\tshared_ptr<Endpoint> lan=GetEndpointByType(Endpoint::TYPE_UDP_P2P_LAN);\n\t\t\t\tif(lan && lan->averageRTT>0 && lan->averageRTT<minPing*relayToP2pSwitchThreshold){\n\t\t\t\t\tcurrentEndpoint=lan;\n\t\t\t\t\tLOGI(\"Switching to p2p (LAN)\");\n\t\t\t\t\tLogDebugInfo();\n\t\t\t\t}else{\n\t\t\t\t\tif(p2p->averageRTT>0 && p2p->averageRTT<minPing*relayToP2pSwitchThreshold){\n\t\t\t\t\t\tcurrentEndpoint=p2p;\n\t\t\t\t\t\tLOGI(\"Switching to p2p (Inet)\");\n\t\t\t\t\t\tLogDebugInfo();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tif(minPing>0 && minPing<currentEndpoint->averageRTT*p2pToRelaySwitchThreshold){\n\t\t\t\tLOGI(\"Switching to relay\");\n\t\t\t\tcurrentEndpoint=preferredRelay;\n\t\t\t\tLogDebugInfo();\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid VoIPController::UpdateRTT(){\n\trttHistory.Add(GetAverageRTT());\n\t//double v=rttHistory.Average();\n\tif(rttHistory[0]>10.0 && rttHistory[8]>10.0 && (networkType==NET_TYPE_EDGE || networkType==NET_TYPE_GPRS)){\n\t\twaitingForAcks=true;\n\t}else{\n\t\twaitingForAcks=false;\n\t}\n\t//LOGI(\"%.3lf/%.3lf, rtt diff %.3lf, waiting=%d, queue=%d\", rttHistory[0], rttHistory[8], v, waitingForAcks, sendQueue->Size());\n\tfor(vector<shared_ptr<Stream>>::iterator stm=incomingStreams.begin();stm!=incomingStreams.end();++stm){\n\t\tif((*stm)->jitterBuffer){\n\t\t\tint lostCount=(*stm)->jitterBuffer->GetAndResetLostPacketCount();\n\t\t\tif(lostCount>0 || (lostCount<0 && recvLossCount>((uint32_t) -lostCount)))\n\t\t\t\trecvLossCount+=lostCount;\n\t\t}\n\t}\n}\n\nvoid VoIPController::UpdateCongestion(){\n\tif(conctl && encoder){\n\t\tuint32_t sendLossCount=conctl->GetSendLossCount();\n\t\tsendLossCountHistory.Add(sendLossCount-prevSendLossCount);\n\t\tprevSendLossCount=sendLossCount;\n\t\tdouble packetsPerSec=1000/(double) outgoingStreams[0]->frameDuration;\n\t\tdouble avgSendLossCount=sendLossCountHistory.Average()/packetsPerSec;\n\t\t//LOGV(\"avg send loss: %.1f%%\", avgSendLossCount*100);\n\n\t\tif(avgSendLossCount>0.125 && networkType!=NET_TYPE_GPRS && networkType!=NET_TYPE_EDGE){\n\t\t\tencoder->SetPacketLoss(40);\n\t\t\tif(!shittyInternetMode){\n\t\t\t\t// Shitty Internet Mode™. Redundant redundancy you can trust.\n\t\t\t\tshittyInternetMode=true;\n\t\t\t\tfor(shared_ptr<Stream> &s:outgoingStreams){\n\t\t\t\t\tif(s->type==STREAM_TYPE_AUDIO){\n\t\t\t\t\t\ts->extraECEnabled=true;\n\t\t\t\t\t\tSendStreamFlags(*s);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(encoder)\n\t\t\t\t\tencoder->SetSecondaryEncoderEnabled(true);\n\t\t\t\tLOGW(\"Enabling extra EC\");\n\t\t\t}\n\t\t}else if(avgSendLossCount>0.1){\n\t\t\tencoder->SetPacketLoss(40);\n\t\t}else if(avgSendLossCount>0.075){\n\t\t\tencoder->SetPacketLoss(35);\n\t\t}else if(avgSendLossCount>0.0625){\n\t\t\tencoder->SetPacketLoss(30);\n\t\t}else if(avgSendLossCount>0.05){\n\t\t\tencoder->SetPacketLoss(25);\n\t\t}else if(avgSendLossCount>0.025){\n\t\t\tencoder->SetPacketLoss(20);\n\t\t}else if(avgSendLossCount>0.01){\n\t\t\tencoder->SetPacketLoss(17);\n\t\t}else{\n\t\t\tencoder->SetPacketLoss(15);\n\t\t}\n\n\t\tif((avgSendLossCount<0.15 || networkType==NET_TYPE_EDGE || networkType==NET_TYPE_GPRS) && shittyInternetMode){\n\t\t\tshittyInternetMode=false;\n\t\t\tfor(shared_ptr<Stream> &s:outgoingStreams){\n\t\t\t\tif(s->type==STREAM_TYPE_AUDIO){\n\t\t\t\t\ts->extraECEnabled=false;\n\t\t\t\t\tSendStreamFlags(*s);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(encoder)\n\t\t\t\tencoder->SetSecondaryEncoderEnabled(false);\n\t\t\tLOGW(\"Disabling extra EC\");\n\t\t}\n\t}\n}\n\nvoid VoIPController::UpdateAudioBitrate(){\n\tif(encoder && conctl){\n\t\tdouble time=GetCurrentTime();\n\t\tif((audioInput && !audioInput->IsInitialized()) || (audioOutput && !audioOutput->IsInitialized())){\n\t\t\tLOGE(\"Audio I/O failed\");\n\t\t\tlastError=ERROR_AUDIO_IO;\n\t\t\tSetState(STATE_FAILED);\n\t\t}\n\n\t\tint act=conctl->GetBandwidthControlAction();\n\t\tif(shittyInternetMode){\n\t\t\tencoder->SetBitrate(8000);\n\t\t}else if(act==TGVOIP_CONCTL_ACT_DECREASE){\n\t\t\tuint32_t bitrate=encoder->GetBitrate();\n\t\t\tif(bitrate>8000)\n\t\t\t\tencoder->SetBitrate(bitrate<(minAudioBitrate+audioBitrateStepDecr) ? minAudioBitrate : (bitrate-audioBitrateStepDecr));\n\t\t}else if(act==TGVOIP_CONCTL_ACT_INCREASE){\n\t\t\tuint32_t bitrate=encoder->GetBitrate();\n\t\t\tif(bitrate<maxBitrate)\n\t\t\t\tencoder->SetBitrate(bitrate+audioBitrateStepIncr);\n\t\t}\n\n\t\tif(state==STATE_ESTABLISHED && time-lastRecvPacketTime>=reconnectingTimeout){\n\t\t\tSetState(STATE_RECONNECTING);\n\t\t\tResetUdpAvailability();\n\t\t}\n\n\t\tif(state==STATE_ESTABLISHED || state==STATE_RECONNECTING){\n\t\t\tif(time-lastRecvPacketTime>=config.recvTimeout){\n\t\t\t\tif(currentEndpoint && currentEndpoint->type!=Endpoint::TYPE_UDP_RELAY && currentEndpoint->type!=Endpoint::TYPE_TCP_RELAY){\n\t\t\t\t\tLOGW(\"Packet receive timeout, switching to relay\");\n\t\t\t\t\tcurrentEndpoint=preferredRelay;\n\t\t\t\t\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\t\t\t\t\tif(e->type==Endpoint::TYPE_UDP_P2P_INET || e->type==Endpoint::TYPE_UDP_P2P_LAN){\n\t\t\t\t\t\t\te->averageRTT=0;\n\t\t\t\t\t\t\te->rtts.Reset();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(allowP2p){\n\t\t\t\t\t\tSendPublicEndpointsRequest();\n\t\t\t\t\t}\n\t\t\t\t\tUpdateDataSavingState();\n\t\t\t\t\tUpdateAudioBitrateLimit();\n\t\t\t\t\tBufferOutputStream s(4);\n\t\t\t\t\ts.WriteInt32(dataSavingMode ? INIT_FLAG_DATA_SAVING_ENABLED : 0);\n\t\t\t\t\tif(peerVersion<6){\n\t\t\t\t\t\tSendPacketReliably(PKT_NETWORK_CHANGED, s.GetBuffer(), s.GetLength(), 1, 20);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tBuffer buf(move(s));\n\t\t\t\t\t\tSendExtra(buf, EXTRA_TYPE_NETWORK_CHANGED);\n\t\t\t\t\t}\n\t\t\t\t\tlastRecvPacketTime=time;\n\t\t\t\t}else{\n\t\t\t\t\tLOGW(\"Packet receive timeout, disconnecting\");\n\t\t\t\t\tlastError=ERROR_TIMEOUT;\n\t\t\t\t\tSetState(STATE_FAILED);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid VoIPController::UpdateSignalBars(){\n\tint prevSignalBarCount=GetSignalBarsCount();\n\tdouble packetsPerSec=1000/(double) outgoingStreams[0]->frameDuration;\n\tdouble avgSendLossCount=sendLossCountHistory.Average()/packetsPerSec;\n\n\tint signalBarCount=4;\n\tif(state==STATE_RECONNECTING || waitingForAcks)\n\t\tsignalBarCount=1;\n\tif(currentEndpoint->type==Endpoint::TYPE_TCP_RELAY){\n\t\tsignalBarCount=MIN(signalBarCount, 3);\n\t}\n\tif(avgSendLossCount>0.1){\n\t\tsignalBarCount=1;\n\t}else if(avgSendLossCount>0.0625){\n\t\tsignalBarCount=MIN(signalBarCount, 2);\n\t}else if(avgSendLossCount>0.025){\n\t\tsignalBarCount=MIN(signalBarCount, 3);\n\t}\n\n\tfor(shared_ptr<Stream>& stm:incomingStreams){\n\t\tif(stm->jitterBuffer){\n\t\t\tdouble avgLateCount[3];\n\t\t\tstm->jitterBuffer->GetAverageLateCount(avgLateCount);\n\t\t\tif(avgLateCount[2]>=0.2)\n\t\t\t\tsignalBarCount=1;\n\t\t\telse if(avgLateCount[2]>=0.1)\n\t\t\t\tsignalBarCount=MIN(signalBarCount, 2);\n\t\t}\n\t}\n\n\tsignalBarsHistory.Add(static_cast<unsigned char>(signalBarCount));\n\t//LOGV(\"Signal bar count history %08X\", *reinterpret_cast<uint32_t *>(&signalBarsHistory));\n\tint _signalBarCount=GetSignalBarsCount();\n\tif(_signalBarCount!=prevSignalBarCount){\n\t\tLOGD(\"SIGNAL BAR COUNT CHANGED: %d\", _signalBarCount);\n\t\tif(callbacks.signalBarCountChanged)\n\t\t\tcallbacks.signalBarCountChanged(this, _signalBarCount);\n\t}\n}\n\nvoid VoIPController::UpdateQueuedPackets(){\n\tMutexGuard m(queuedPacketsMutex);\n\tfor(std::vector<QueuedPacket>::iterator qp=queuedPackets.begin();qp!=queuedPackets.end();){\n\t\tif(qp->timeout>0 && qp->firstSentTime>0 && GetCurrentTime()-qp->firstSentTime>=qp->timeout){\n\t\t\tLOGD(\"Removing queued packet because of timeout\");\n\t\t\tqp=queuedPackets.erase(qp);\n\t\t\tcontinue;\n\t\t}\n\t\tif(GetCurrentTime()-qp->lastSentTime>=qp->retryInterval){\n\t\t\tmessageThread.Post(std::bind(&VoIPController::UpdateQueuedPackets, this), qp->retryInterval);\n\t\t\tuint32_t seq=GenerateOutSeq();\n\t\t\tqp->seqs.Add(seq);\n\t\t\tqp->lastSentTime=GetCurrentTime();\n\t\t\t//LOGD(\"Sending queued packet, seq=%u, type=%u, len=%u\", seq, qp.type, qp.data.Length());\n\t\t\tBuffer buf(qp->data.Length());\n\t\t\tif(qp->firstSentTime==0)\n\t\t\t\tqp->firstSentTime=qp->lastSentTime;\n\t\t\tif(qp->data.Length())\n\t\t\t\tbuf.CopyFrom(qp->data, qp->data.Length());\n\t\t\tsendQueue->Put(PendingOutgoingPacket{\n\t\t\t\t\t/*.seq=*/seq,\n\t\t\t\t\t/*.type=*/qp->type,\n\t\t\t\t\t/*.len=*/qp->data.Length(),\n\t\t\t\t\t/*.data=*/move(buf),\n\t\t\t\t\t/*.endpoint=*/0\n\t\t\t});\n\t\t}\n\t\t++qp;\n\t}\n}\n\nvoid VoIPController::SendNopPacket(){\n\tsendQueue->Put(PendingOutgoingPacket{\n\t\t\t/*.seq=*/(firstSentPing=GenerateOutSeq()),\n\t\t\t/*.type=*/PKT_NOP,\n\t\t\t/*.len=*/0,\n\t\t\t/*.data=*/Buffer(),\n\t\t\t/*.endpoint=*/0\n\t});\n}\n\nvoid VoIPController::SendPublicEndpointsRequest(){\n\tif(!allowP2p)\n\t\treturn;\n\tLOGI(\"Sending public endpoints request\");\n\tMutexGuard m(endpointsMutex);\n\tfor(shared_ptr<Endpoint>& e:endpoints){\n\t\tif(e->type==Endpoint::TYPE_UDP_RELAY && !e->IsIPv6Only()){\n\t\t\tSendPublicEndpointsRequest(*e);\n\t\t}\n\t}\n\tpublicEndpointsReqCount++;\n\tif(publicEndpointsReqCount<10){\n\t\tmessageThread.Post([this]{\n\t\t\tif(waitingForRelayPeerInfo){\n\t\t\t\tLOGW(\"Resending peer relay info request\");\n\t\t\t\tSendPublicEndpointsRequest();\n\t\t\t}\n\t\t}, 5.0);\n\t}else{\n\t\tpublicEndpointsReqCount=0;\n\t}\n}\n\nvoid VoIPController::TickJitterBufferAngCongestionControl(){\n\t// TODO get rid of this and update states of these things internally and retroactively\n\tfor(shared_ptr<Stream>& stm:incomingStreams){\n\t\tif(stm->jitterBuffer){\n\t\t\tstm->jitterBuffer->Tick();\n\t\t}\n\t}\n\tif(conctl){\n\t\tconctl->Tick();\n\t}\n}\n\n#pragma mark - Endpoint\n\nEndpoint::Endpoint(int64_t id, uint16_t port, IPv4Address& _address, IPv6Address& _v6address, char type, unsigned char peerTag[16]) : address(_address), v6address(_v6address){\n\tthis->id=id;\n\tthis->port=port;\n\tthis->type=type;\n\tmemcpy(this->peerTag, peerTag, 16);\n\tif(type==TYPE_UDP_RELAY && ServerConfig::GetSharedInstance()->GetBoolean(\"force_tcp\", false))\n\t\tthis->type=TYPE_TCP_RELAY;\n\n\tlastPingSeq=0;\n\tlastPingTime=0;\n\taverageRTT=0;\n\tsocket=NULL;\n\tudpPongCount=0;\n}\n\nEndpoint::Endpoint() : address(0), v6address(string(\"::0\")) {\n\tlastPingSeq=0;\n\tlastPingTime=0;\n\taverageRTT=0;\n\tsocket=NULL;\n\tudpPongCount=0;\n}\n\nNetworkAddress &Endpoint::GetAddress(){\n\treturn IsIPv6Only() ? (NetworkAddress&)v6address : (NetworkAddress&)address;\n}\n\nbool Endpoint::IsIPv6Only(){\n\treturn address.IsEmpty() && !v6address.IsEmpty();\n}\n\nEndpoint::~Endpoint(){\n\tif(socket){\n\t\tsocket->Close();\n\t\tdelete socket;\n\t}\n}\n"
  },
  {
    "path": "libtgvoip-public/VoIPController.h",
    "content": "//\r\n// libtgvoip is free and unencumbered public domain software.\r\n// For more information, see http://unlicense.org or the UNLICENSE file\r\n// you should have received with this source code distribution.\r\n//\r\n\r\n#ifndef __VOIPCONTROLLER_H\r\n#define __VOIPCONTROLLER_H\r\n\r\n#ifndef _WIN32\r\n#include <arpa/inet.h>\r\n#include <netinet/in.h>\r\n#endif\r\n#ifdef __APPLE__\r\n#include <TargetConditionals.h>\r\n#include \"os/darwin/AudioUnitIO.h\"\r\n#endif\r\n#include <stdint.h>\r\n#include <vector>\r\n#include <string>\r\n#include <unordered_map>\r\n#include <memory>\r\n#include <atomic>\r\n#include \"audio/AudioInput.h\"\r\n#include \"BlockingQueue.h\"\r\n#include \"audio/AudioOutput.h\"\r\n#include \"audio/AudioIO.h\"\r\n#include \"JitterBuffer.h\"\r\n#include \"OpusDecoder.h\"\r\n#include \"OpusEncoder.h\"\r\n#include \"EchoCanceller.h\"\r\n#include \"CongestionControl.h\"\r\n#include \"NetworkSocket.h\"\r\n#include \"Buffers.h\"\r\n#include \"PacketReassembler.h\"\r\n#include \"MessageThread.h\"\r\n\r\n#define LIBTGVOIP_VERSION \"2.2.4\"\r\n\r\n#ifdef _WIN32\r\n#undef GetCurrentTime\r\n#undef ERROR_TIMEOUT\r\n#endif\r\n\r\n#define TGVOIP_PEER_CAP_GROUP_CALLS 1\r\n\r\nnamespace tgvoip{\r\n\r\n\tenum{\r\n\t\tPROXY_NONE = 0,\r\n\t\tPROXY_SOCKS5,\r\n\t\t//PROXY_HTTP\r\n\t};\r\n\r\n\tenum{\r\n\t\tSTATE_WAIT_INIT = 1,\r\n\t\tSTATE_WAIT_INIT_ACK,\r\n\t\tSTATE_ESTABLISHED,\r\n\t\tSTATE_FAILED,\r\n\t\tSTATE_RECONNECTING\r\n\t};\r\n\r\n\tenum{\r\n\t\tERROR_UNKNOWN = 0,\r\n\t\tERROR_INCOMPATIBLE,\r\n\t\tERROR_TIMEOUT,\r\n\t\tERROR_AUDIO_IO,\r\n\t\tERROR_PROXY\r\n\t};\r\n\r\n\tenum{\r\n\t\tNET_TYPE_UNKNOWN = 0,\r\n\t\tNET_TYPE_GPRS,\r\n\t\tNET_TYPE_EDGE,\r\n\t\tNET_TYPE_3G,\r\n\t\tNET_TYPE_HSPA,\r\n\t\tNET_TYPE_LTE,\r\n\t\tNET_TYPE_WIFI,\r\n\t\tNET_TYPE_ETHERNET,\r\n\t\tNET_TYPE_OTHER_HIGH_SPEED,\r\n\t\tNET_TYPE_OTHER_LOW_SPEED,\r\n\t\tNET_TYPE_DIALUP,\r\n\t\tNET_TYPE_OTHER_MOBILE\r\n\t};\r\n\r\n\tenum{\r\n\t\tDATA_SAVING_NEVER = 0,\r\n\t\tDATA_SAVING_MOBILE,\r\n\t\tDATA_SAVING_ALWAYS\r\n\t};\r\n\r\n\tstruct CryptoFunctions{\r\n\t\tvoid(*rand_bytes)(uint8_t* buffer, size_t length);\r\n\t\tvoid(*sha1)(uint8_t* msg, size_t length, uint8_t* output);\r\n\t\tvoid(*sha256)(uint8_t* msg, size_t length, uint8_t* output);\r\n\t\tvoid(*aes_ige_encrypt)(uint8_t* in, uint8_t* out, size_t length, uint8_t* key, uint8_t* iv);\r\n\t\tvoid(*aes_ige_decrypt)(uint8_t* in, uint8_t* out, size_t length, uint8_t* key, uint8_t* iv);\r\n\t\tvoid(*aes_ctr_encrypt)(uint8_t* inout, size_t length, uint8_t* key, uint8_t* iv, uint8_t* ecount, uint32_t* num);\r\n\t\tvoid(*aes_cbc_encrypt)(uint8_t* in, uint8_t* out, size_t length, uint8_t* key, uint8_t* iv);\r\n\t\tvoid(*aes_cbc_decrypt)(uint8_t* in, uint8_t* out, size_t length, uint8_t* key, uint8_t* iv);\r\n\t};\r\n\r\n\tclass Endpoint{\r\n\t\tfriend class VoIPController;\r\n\t\tfriend class VoIPGroupController;\r\n\tpublic:\r\n\r\n\t\tenum{\r\n\t\t\tTYPE_UDP_P2P_INET = 1,\r\n\t\t\tTYPE_UDP_P2P_LAN,\r\n\t\t\tTYPE_UDP_RELAY,\r\n\t\t\tTYPE_TCP_RELAY\r\n\t\t};\r\n\r\n\t\tEndpoint(int64_t id, uint16_t port, IPv4Address& address, IPv6Address& v6address, char type, unsigned char* peerTag);\r\n\t\tEndpoint();\r\n\t\t~Endpoint();\r\n\t\tNetworkAddress& GetAddress();\r\n\t\tbool IsIPv6Only();\r\n\t\tint64_t id;\r\n\t\tuint16_t port;\r\n\t\tIPv4Address address;\r\n\t\tIPv6Address v6address;\r\n\t\tchar type;\r\n\t\tunsigned char peerTag[16];\r\n\r\n\tprivate:\r\n\t\tdouble lastPingTime;\r\n\t\tuint32_t lastPingSeq;\r\n\t\tHistoricBuffer<double, 6> rtts;\r\n\t\tdouble averageRTT;\r\n\t\tNetworkSocket* socket;\r\n\t\tint udpPongCount;\r\n\t};\r\n\r\n\tclass AudioDevice{\r\n\tpublic:\r\n\t\tstd::string id;\r\n\t\tstd::string displayName;\r\n\t};\r\n\r\n\tclass AudioOutputDevice : public AudioDevice{\r\n\r\n\t};\r\n\r\n\tclass AudioInputDevice : public AudioDevice{\r\n\r\n\t};\r\n\r\n\tstruct EncodedVideoFrame{\r\n\t\tunsigned char* data;\r\n\t\tsize_t size;\r\n\t\tuint32_t flags;\r\n\r\n\t\tEncodedVideoFrame(size_t size){\r\n\t\t\tthis->size = size;\r\n\t\t\tdata = (unsigned char*)malloc(size);\r\n\t\t}\r\n\r\n\t\t~EncodedVideoFrame(){\r\n\t\t\tfree(data);\r\n\t\t}\r\n\t};\r\n\r\n\tclass VoIPController{\r\n\t\tfriend class VoIPGroupController;\r\n\tpublic:\r\n\t\tstruct Config{\r\n\t\t\tConfig(double initTimeout = 30.0, double recvTimeout = 20.0, int dataSaving = DATA_SAVING_NEVER, bool enableAEC = false, bool enableNS = false, bool enableAGC = false, bool enableCallUpgrade = false){\r\n\t\t\t\tthis->initTimeout = initTimeout;\r\n\t\t\t\tthis->recvTimeout = recvTimeout;\r\n\t\t\t\tthis->dataSaving = dataSaving;\r\n\t\t\t\tthis->enableAEC = enableAEC;\r\n\t\t\t\tthis->enableNS = enableNS;\r\n\t\t\t\tthis->enableAGC = enableAGC;\r\n\t\t\t\tthis->enableCallUpgrade = enableCallUpgrade;\r\n\t\t\t}\r\n\r\n\t\t\tdouble initTimeout;\r\n\t\t\tdouble recvTimeout;\r\n\t\t\tint dataSaving;\r\n#ifndef _WIN32\r\n\t\t\tstd::string logFilePath = \"\";\r\n\t\t\tstd::string statsDumpFilePath = \"\";\r\n#else\r\n\t\t\tstd::wstring logFilePath = L\"\";\r\n\t\t\tstd::wstring statsDumpFilePath = L\"\";\r\n#endif\r\n\r\n\t\t\tbool enableAEC;\r\n\t\t\tbool enableNS;\r\n\t\t\tbool enableAGC;\r\n\r\n\t\t\tbool enableCallUpgrade;\r\n\t\t};\r\n\r\n\t\tstruct TrafficStats{\r\n\t\t\tuint64_t bytesSentWifi;\r\n\t\t\tuint64_t bytesRecvdWifi;\r\n\t\t\tuint64_t bytesSentMobile;\r\n\t\t\tuint64_t bytesRecvdMobile;\r\n\t\t};\r\n\r\n\r\n\t\tVoIPController();\r\n\t\tvirtual ~VoIPController();\r\n\r\n\t\t/**\r\n\t\t* Set the initial endpoints (relays)\r\n\t\t* @param endpoints Endpoints converted from phone.PhoneConnection TL objects\r\n\t\t* @param allowP2p Whether p2p connectivity is allowed\r\n\t\t*/\r\n\t\tvoid SetRemoteEndpoints(std::vector<Endpoint> endpoints, bool allowP2p, int32_t connectionMaxLayer);\r\n\t\t/**\r\n\t\t* Initialize and start all the internal threads\r\n\t\t*/\r\n\t\tvoid Start();\r\n\t\t/**\r\n\t\t* Stop any internal threads. Don't call any other methods after this.\r\n\t\t*/\r\n\t\tvoid Stop();\r\n\t\t/**\r\n\t\t* Initiate connection\r\n\t\t*/\r\n\t\tvoid Connect();\r\n\t\tEndpoint& GetRemoteEndpoint();\r\n\t\t/**\r\n\t\t* Get the debug info string to be displayed in client UI\r\n\t\t*/\r\n\t\tvirtual std::string GetDebugString();\r\n\t\t/**\r\n\t\t* Notify the library of network type change\r\n\t\t* @param type The new network type\r\n\t\t*/\r\n\t\tvirtual void SetNetworkType(int type);\r\n\t\t/**\r\n\t\t* Get the average round-trip time for network packets\r\n\t\t* @return\r\n\t\t*/\r\n\t\tdouble GetAverageRTT();\r\n\t\tstatic double GetCurrentTime();\r\n\t\t/**\r\n\t\t* Use this field to store any of your context data associated with this call\r\n\t\t*/\r\n\t\tvoid* implData;\r\n\t\t/**\r\n\t\t*\r\n\t\t* @param mute\r\n\t\t*/\r\n\t\tvirtual void SetMicMute(bool mute);\r\n\t\t/**\r\n\t\t*\r\n\t\t* @param key\r\n\t\t* @param isOutgoing\r\n\t\t*/\r\n\t\tvoid SetEncryptionKey(char* key, bool isOutgoing);\r\n\t\t/**\r\n\t\t*\r\n\t\t* @param cfg\r\n\t\t*/\r\n\t\tvoid SetConfig(const Config& cfg);\r\n\t\tvoid DebugCtl(int request, int param);\r\n\t\t/**\r\n\t\t*\r\n\t\t* @param stats\r\n\t\t*/\r\n\t\tvoid GetStats(TrafficStats* stats);\r\n\t\t/**\r\n\t\t*\r\n\t\t* @return\r\n\t\t*/\r\n\t\tint64_t GetPreferredRelayID();\r\n\t\t/**\r\n\t\t*\r\n\t\t* @return\r\n\t\t*/\r\n\t\tint GetLastError();\r\n\t\t/**\r\n\t\t*\r\n\t\t*/\r\n\t\tstatic CryptoFunctions crypto;\r\n\t\t/**\r\n\t\t*\r\n\t\t* @return\r\n\t\t*/\r\n\t\tstatic const char* GetVersion();\r\n\t\t/**\r\n\t\t*\r\n\t\t* @return\r\n\t\t*/\r\n\t\tstd::string GetDebugLog();\r\n\t\t/**\r\n\t\t*\r\n\t\t* @param buffer\r\n\t\t*/\r\n\t\tvoid GetDebugLog(char* buffer);\r\n\t\tsize_t GetDebugLogLength();\r\n\t\t/**\r\n\t\t*\r\n\t\t* @return\r\n\t\t*/\r\n\t\tstatic std::vector<AudioInputDevice> EnumerateAudioInputs();\r\n\t\t/**\r\n\t\t*\r\n\t\t* @return\r\n\t\t*/\r\n\t\tstatic std::vector<AudioOutputDevice> EnumerateAudioOutputs();\r\n\t\t/**\r\n\t\t*\r\n\t\t* @param id\r\n\t\t*/\r\n\t\tvoid SetCurrentAudioInput(std::string id);\r\n\t\t/**\r\n\t\t*\r\n\t\t* @param id\r\n\t\t*/\r\n\t\tvoid SetCurrentAudioOutput(std::string id);\r\n\t\t/**\r\n\t\t*\r\n\t\t* @return\r\n\t\t*/\r\n\t\tstd::string GetCurrentAudioInputID();\r\n\t\t/**\r\n\t\t*\r\n\t\t* @return\r\n\t\t*/\r\n\t\tstd::string GetCurrentAudioOutputID();\r\n\t\t/**\r\n\t\t* Set the proxy server to route the data through. Call this before connecting.\r\n\t\t* @param protocol PROXY_NONE or PROXY_SOCKS5\r\n\t\t* @param address IP address or domain name of the server\r\n\t\t* @param port Port of the server\r\n\t\t* @param username Username; empty string for anonymous\r\n\t\t* @param password Password; empty string if none\r\n\t\t*/\r\n\t\tvoid SetProxy(int protocol, std::string address, uint16_t port, std::string username, std::string password);\r\n\t\t/**\r\n\t\t* Get the number of signal bars to display in the client UI.\r\n\t\t* @return the number of signal bars, from 1 to 4\r\n\t\t*/\r\n\t\tint GetSignalBarsCount();\r\n\t\t/**\r\n\t\t* Enable or disable AGC (automatic gain control) on audio output. Should only be enabled on phones when the earpiece speaker is being used.\r\n\t\t* The audio output will be louder with this on.\r\n\t\t* AGC with speakerphone or other kinds of loud speakers has detrimental effects on some echo cancellation implementations.\r\n\t\t* @param enabled I usually pick argument names to be self-explanatory\r\n\t\t*/\r\n\t\tvoid SetAudioOutputGainControlEnabled(bool enabled);\r\n\t\t/**\r\n\t\t* Get the additional capabilities of the peer client app\r\n\t\t* @return corresponding TGVOIP_PEER_CAP_* flags OR'ed together\r\n\t\t*/\r\n\t\tuint32_t GetPeerCapabilities();\r\n\t\t/**\r\n\t\t* Send the peer the key for the group call to prepare this private call to an upgrade to a E2E group call.\r\n\t\t* The peer must have the TGVOIP_PEER_CAP_GROUP_CALLS capability. After the peer acknowledges the key, Callbacks::groupCallKeySent will be called.\r\n\t\t* @param key newly-generated group call key, must be exactly 265 bytes long\r\n\t\t*/\r\n\t\tvoid SendGroupCallKey(unsigned char* key);\r\n\t\t/**\r\n\t\t* In an incoming call, request the peer to generate a new encryption key, send it to you and upgrade this call to a E2E group call.\r\n\t\t*/\r\n\t\tvoid RequestCallUpgrade();\r\n\t\tvoid SetEchoCancellationStrength(int strength);\r\n\t\tint GetConnectionState();\r\n\r\n#if defined(TGVOIP_USE_CALLBACK_AUDIO_IO)\r\n\t\tvoid SetAudioDataCallbacks(std::function<void(int16_t*, size_t)> input, std::function<void(int16_t*, size_t)> output);\r\n#endif\r\n\r\n\t\tstruct Callbacks{\r\n\t\t\tvoid(*connectionStateChanged)(VoIPController*, int);\r\n\t\t\tvoid(*signalBarCountChanged)(VoIPController*, int);\r\n\t\t\tvoid(*groupCallKeySent)(VoIPController*);\r\n\t\t\tvoid(*groupCallKeyReceived)(VoIPController*, const unsigned char*);\r\n\t\t\tvoid(*upgradeToGroupCallRequested)(VoIPController*);\r\n\t\t};\r\n\t\tvoid SetCallbacks(Callbacks callbacks);\r\n\r\n\t\tfloat GetOutputLevel(){\r\n\t\t\treturn 0.0f;\r\n\t\t};\r\n\r\n\tprivate:\r\n\t\tstruct Stream;\r\n\t\tstruct UnacknowledgedExtraData;\r\n\r\n\tprotected:\r\n\t\tstruct RecentOutgoingPacket{\r\n\t\t\tuint32_t seq;\r\n\t\t\tuint16_t id; // for group calls only\r\n\t\t\tdouble sendTime;\r\n\t\t\tdouble ackTime;\r\n\t\t};\r\n\t\tstruct PendingOutgoingPacket{\r\n#if defined(_MSC_VER) && _MSC_VER <= 1800 // VS2013 doesn't support auto-generating move constructors\r\n\t\t\t//TGVOIP_DISALLOW_COPY_AND_ASSIGN(PendingOutgoingPacket);\r\n\t\t\tPendingOutgoingPacket(uint32_t seq, unsigned char type, size_t len, Buffer&& data, int64_t endpoint){\r\n\t\t\t\tthis->seq = seq;\r\n\t\t\t\tthis->type = type;\r\n\t\t\t\tthis->len = len;\r\n\t\t\t\tthis->data = std::move(data);\r\n\t\t\t\tthis->endpoint = endpoint;\r\n\t\t\t}\r\n\t\t\tPendingOutgoingPacket(PendingOutgoingPacket&& other){\r\n\t\t\t\tseq = other.seq;\r\n\t\t\t\ttype = other.type;\r\n\t\t\t\tlen = other.len;\r\n\t\t\t\tdata = std::move(other.data);\r\n\t\t\t\tendpoint = other.endpoint;\r\n\t\t\t}\r\n#endif\r\n\t\t\tuint32_t seq;\r\n\t\t\tunsigned char type;\r\n\t\t\tsize_t len;\r\n\t\t\tBuffer data;\r\n\t\t\tint64_t endpoint;\r\n\t\t};\r\n\t\tstruct SegmentedPacket{\r\n\t\t\tunsigned char type;\r\n\r\n\t\t};\r\n\t\tstruct QueuedPacket{\r\n#if defined(_MSC_VER) && _MSC_VER <= 1800 // VS2013 doesn't support auto-generating move constructors\r\n\t\t\t//TGVOIP_DISALLOW_COPY_AND_ASSIGN(QueuedPacket);\r\n\t\t\tQueuedPacket(QueuedPacket&& other){\r\n\t\t\t\tdata = std::move(other.data);\r\n\t\t\t\ttype = other.type;\r\n\t\t\t\tseqs = other.seqs;\r\n\t\t\t\tfirstSentTime = other.firstSentTime;\r\n\t\t\t\tlastSentTime = other.lastSentTime;\r\n\t\t\t\tretryInterval = other.retryInterval;\r\n\t\t\t\ttimeout = other.timeout;\r\n\t\t\t}\r\n\t\t\tQueuedPacket(){\r\n\r\n\t\t\t}\r\n#endif\r\n\t\t\tBuffer data;\r\n\t\t\tunsigned char type;\r\n\t\t\tHistoricBuffer<uint32_t, 16> seqs;\r\n\t\t\tdouble firstSentTime;\r\n\t\t\tdouble lastSentTime;\r\n\t\t\tdouble retryInterval;\r\n\t\t\tdouble timeout;\r\n\t\t};\r\n\t\tvirtual void ProcessIncomingPacket(NetworkPacket& packet, std::shared_ptr<Endpoint> srcEndpoint);\r\n\t\tvirtual void ProcessExtraData(Buffer& data);\r\n\t\tvirtual void WritePacketHeader(uint32_t seq, BufferOutputStream* s, unsigned char type, uint32_t length);\r\n\t\tvirtual void SendPacket(unsigned char* data, size_t len, std::shared_ptr<Endpoint> ep, PendingOutgoingPacket& srcPacket);\r\n\t\tvirtual void SendInit();\r\n\t\tvirtual void SendUdpPing(std::shared_ptr<Endpoint> endpoint);\r\n\t\tvirtual void SendRelayPings();\r\n\t\tvirtual void OnAudioOutputReady();\r\n\t\tvirtual void SendExtra(Buffer& data, unsigned char type);\r\n\t\tvoid SendStreamFlags(Stream& stream);\r\n\t\tvoid InitializeTimers();\r\n\t\tvoid ResetEndpointPingStats();\r\n\r\n\tprivate:\r\n\t\tstruct Stream{\r\n\t\t\tint32_t userID;\r\n\t\t\tunsigned char id;\r\n\t\t\tunsigned char type;\r\n\t\t\tuint32_t codec;\r\n\t\t\tbool enabled;\r\n\t\t\tbool extraECEnabled;\r\n\t\t\tuint16_t frameDuration;\r\n\t\t\tstd::shared_ptr<JitterBuffer> jitterBuffer;\r\n\t\t\tstd::shared_ptr<OpusDecoder> decoder;\r\n\t\t\tstd::shared_ptr<PacketReassembler> packetReassembler;\r\n\t\t\tstd::shared_ptr<CallbackWrapper> callbackWrapper;\r\n\t\t\tstd::vector<Buffer> codecSpecificData;\r\n\t\t};\r\n\t\tstruct UnacknowledgedExtraData{\r\n#if defined(_MSC_VER) && _MSC_VER <= 1800 // VS2013 doesn't support auto-generating move constructors\r\n\t\t\tUnacknowledgedExtraData(UnacknowledgedExtraData&& other){\r\n\t\t\t\ttype = other.type;\r\n\t\t\t\tdata = std::move(other.data);\r\n\t\t\t\tfirstContainingSeq = other.firstContainingSeq;\r\n\t\t\t}\r\n\t\t\tUnacknowledgedExtraData(unsigned char _type, Buffer&& _data, uint32_t _firstContainingSeq){\r\n\t\t\t\ttype = _type;\r\n\t\t\t\tdata = std::move(_data);\r\n\t\t\t\tfirstContainingSeq = _firstContainingSeq;\r\n\t\t\t}\r\n#endif\r\n\t\t\tunsigned char type;\r\n\t\t\tBuffer data;\r\n\t\t\tuint32_t firstContainingSeq;\r\n\t\t};\r\n\t\tenum{\r\n\t\t\tUDP_UNKNOWN = 0,\r\n\t\t\tUDP_PING_PENDING,\r\n\t\t\tUDP_PING_SENT,\r\n\t\t\tUDP_AVAILABLE,\r\n\t\t\tUDP_NOT_AVAILABLE,\r\n\t\t\tUDP_BAD\r\n\t\t};\r\n\r\n\t\tvoid RunRecvThread(void* arg);\r\n\t\tvoid RunSendThread(void* arg);\r\n\t\tvoid HandleAudioInput(unsigned char* data, size_t len, unsigned char* secondaryData, size_t secondaryLen);\r\n\t\tvoid HandleVideoInput(EncodedVideoFrame& frame);\r\n\t\tvoid UpdateAudioBitrateLimit();\r\n\t\tvoid SetState(int state);\r\n\t\tvoid UpdateAudioOutputState();\r\n\t\tvoid InitUDPProxy();\r\n\t\tvoid UpdateDataSavingState();\r\n\t\tvoid KDF(unsigned char* msgKey, size_t x, unsigned char* aesKey, unsigned char* aesIv);\r\n\t\tvoid KDF2(unsigned char* msgKey, size_t x, unsigned char* aesKey, unsigned char* aesIv);\r\n\t\tstatic void AudioInputCallback(unsigned char* data, size_t length, unsigned char* secondaryData, size_t secondaryLength, void* param);\r\n\t\tvoid SendPublicEndpointsRequest();\r\n\t\tvoid SendPublicEndpointsRequest(Endpoint& relay);\r\n\t\tstd::shared_ptr<Endpoint> GetEndpointByType(int type);\r\n\t\tstd::shared_ptr<Endpoint> GetEndpointByID(int64_t id);\r\n\t\tvoid SendPacketReliably(unsigned char type, unsigned char* data, size_t len, double retryInterval, double timeout);\r\n\t\tuint32_t GenerateOutSeq();\r\n\t\tvoid LogDebugInfo();\r\n\t\tvoid ActuallySendPacket(NetworkPacket& pkt, std::shared_ptr<Endpoint> ep);\r\n\t\tvoid StartAudio();\r\n\t\tvoid ProcessAcknowledgedOutgoingExtra(UnacknowledgedExtraData& extra);\r\n\t\tvoid AddIPv6Relays();\r\n\t\tvoid AddTCPRelays();\r\n\t\tvoid SendUdpPings();\r\n\t\tvoid EvaluateUdpPingResults();\r\n\t\tvoid UpdateRTT();\r\n\t\tvoid UpdateCongestion();\r\n\t\tvoid UpdateAudioBitrate();\r\n\t\tvoid UpdateSignalBars();\r\n\t\tvoid UpdateQueuedPackets();\r\n\t\tvoid SendNopPacket();\r\n\t\tvoid TickJitterBufferAngCongestionControl();\r\n\t\tvoid ResetUdpAvailability();\r\n\r\n\t\tint state;\r\n\t\tstd::vector<std::shared_ptr<Endpoint>> endpoints;\r\n\t\tstd::shared_ptr<Endpoint> currentEndpoint;\r\n\t\tstd::shared_ptr<Endpoint> preferredRelay;\r\n\t\tstd::shared_ptr<Endpoint> peerPreferredRelay;\r\n\t\tbool runReceiver;\r\n\t\tuint32_t seq;\r\n\t\tuint32_t lastRemoteSeq;\r\n\t\tuint32_t lastRemoteAckSeq;\r\n\t\tuint32_t lastSentSeq;\r\n\t\tstd::vector<RecentOutgoingPacket> recentOutgoingPackets;\r\n\t\tdouble recvPacketTimes[32];\r\n\t\tHistoricBuffer<uint32_t, 10, double> sendLossCountHistory;\r\n\t\tuint32_t audioTimestampIn;\r\n\t\tuint32_t audioTimestampOut;\r\n\t\tstd::shared_ptr<tgvoip::audio::AudioIO> audioIO;\r\n\t\ttgvoip::audio::AudioInput* audioInput;\r\n\t\ttgvoip::audio::AudioOutput* audioOutput;\r\n\t\tOpusEncoder* encoder;\r\n\t\tBlockingQueue<PendingOutgoingPacket>* sendQueue;\r\n\t\tEchoCanceller* echoCanceller;\r\n\t\tMutex sendBufferMutex;\r\n\t\tMutex endpointsMutex;\r\n\t\tMutex socketSelectMutex;\r\n\t\tbool stopping;\r\n\t\tbool audioOutStarted;\r\n\t\tThread* recvThread;\r\n\t\tThread* sendThread;\r\n\t\tuint32_t packetsReceived;\r\n\t\tuint32_t recvLossCount;\r\n\t\tuint32_t prevSendLossCount;\r\n\t\tuint32_t firstSentPing;\r\n\t\tHistoricBuffer<double, 32> rttHistory;\r\n\t\tbool waitingForAcks;\r\n\t\tint networkType;\r\n\t\tint dontSendPackets;\r\n\t\tint lastError;\r\n\t\tbool micMuted;\r\n\t\tuint32_t maxBitrate;\r\n\t\tstd::vector<std::shared_ptr<Stream>> outgoingStreams;\r\n\t\tstd::vector<std::shared_ptr<Stream>> incomingStreams;\r\n\t\tunsigned char encryptionKey[256];\r\n\t\tunsigned char keyFingerprint[8];\r\n\t\tunsigned char callID[16];\r\n\t\tdouble stateChangeTime;\r\n\t\tbool waitingForRelayPeerInfo;\r\n\t\tbool allowP2p;\r\n\t\tbool dataSavingMode;\r\n\t\tbool dataSavingRequestedByPeer;\r\n\t\tstd::string activeNetItfName;\r\n\t\tdouble publicEndpointsReqTime;\r\n\t\tstd::vector<QueuedPacket> queuedPackets;\r\n\t\tMutex audioIOMutex;\r\n\t\tMutex queuedPacketsMutex;\r\n\t\tdouble connectionInitTime;\r\n\t\tdouble lastRecvPacketTime;\r\n\t\tConfig config;\r\n\t\tint32_t peerVersion;\r\n\t\tCongestionControl* conctl;\r\n\t\tTrafficStats stats;\r\n\t\tbool receivedInit;\r\n\t\tbool receivedInitAck;\r\n\t\tstd::vector<std::string> debugLogs;\r\n\t\tbool isOutgoing;\r\n\t\tNetworkSocket* udpSocket;\r\n\t\tNetworkSocket* realUdpSocket;\r\n\t\tFILE* statsDump;\r\n\t\tstd::string currentAudioInput;\r\n\t\tstd::string currentAudioOutput;\r\n\t\tbool useTCP;\r\n\t\tbool useUDP;\r\n\t\tbool didAddTcpRelays;\r\n\t\tSocketSelectCanceller* selectCanceller;\r\n\t\tNetworkSocket* openingTcpSocket;\r\n\t\tHistoricBuffer<unsigned char, 4, int> signalBarsHistory;\r\n\r\n\t\tint udpConnectivityState;\r\n\t\tdouble lastUdpPingTime;\r\n\t\tint udpPingCount;\r\n\t\tint echoCancellationStrength;\r\n\r\n\t\tint proxyProtocol;\r\n\t\tstd::string proxyAddress;\r\n\t\tuint16_t proxyPort;\r\n\t\tstd::string proxyUsername;\r\n\t\tstd::string proxyPassword;\r\n\t\tIPv4Address* resolvedProxyAddress;\r\n\r\n\t\tAutomaticGainControl* outputAGC;\r\n\t\tbool outputAGCEnabled;\r\n\t\tuint32_t peerCapabilities;\r\n\t\tCallbacks callbacks;\r\n\t\tbool didReceiveGroupCallKey;\r\n\t\tbool didReceiveGroupCallKeyAck;\r\n\t\tbool didSendGroupCallKey;\r\n\t\tbool didSendUpgradeRequest;\r\n\t\tbool didInvokeUpgradeCallback;\r\n\r\n\t\tint32_t connectionMaxLayer;\r\n\t\tbool useMTProto2;\r\n\t\tbool setCurrentEndpointToTCP;\r\n\r\n\t\tstd::vector<UnacknowledgedExtraData> currentExtras;\r\n\t\tstd::unordered_map<uint8_t, uint64_t> lastReceivedExtrasByType;\r\n\t\tbool useIPv6;\r\n\t\tbool peerIPv6Available;\r\n\t\tIPv6Address myIPv6;\r\n\t\tbool shittyInternetMode;\r\n\t\tstd::vector<Buffer> ecAudioPackets;\r\n\t\tbool didAddIPv6Relays;\r\n\t\tbool didSendIPv6Endpoint;\r\n\t\tint publicEndpointsReqCount = 0;\r\n\t\tMessageThread messageThread;\r\n\t\tbool wasEstablished = false;\r\n\t\tbool receivedFirstStreamPacket = false;\r\n\t\tstd::atomic<unsigned int> unsentStreamPackets;\r\n\r\n\t\tuint32_t initTimeoutID = MessageThread::INVALID_ID;\r\n\t\tuint32_t noStreamsNopID = MessageThread::INVALID_ID;\r\n\t\tuint32_t udpPingTimeoutID = MessageThread::INVALID_ID;\r\n\r\n#if defined(TGVOIP_USE_CALLBACK_AUDIO_IO)\r\n\t\tstd::function<void(int16_t*, size_t)> audioInputDataCallback;\r\n\t\tstd::function<void(int16_t*, size_t)> audioOutputDataCallback;\r\n#endif\r\n\r\n\t\t/*** server config values ***/\r\n\t\tuint32_t maxAudioBitrate;\r\n\t\tuint32_t maxAudioBitrateEDGE;\r\n\t\tuint32_t maxAudioBitrateGPRS;\r\n\t\tuint32_t maxAudioBitrateSaving;\r\n\t\tuint32_t initAudioBitrate;\r\n\t\tuint32_t initAudioBitrateEDGE;\r\n\t\tuint32_t initAudioBitrateGPRS;\r\n\t\tuint32_t initAudioBitrateSaving;\r\n\t\tuint32_t minAudioBitrate;\r\n\t\tuint32_t audioBitrateStepIncr;\r\n\t\tuint32_t audioBitrateStepDecr;\r\n\t\tdouble relaySwitchThreshold;\r\n\t\tdouble p2pToRelaySwitchThreshold;\r\n\t\tdouble relayToP2pSwitchThreshold;\r\n\t\tdouble reconnectingTimeout;\r\n\r\n\tpublic:\r\n#ifdef __APPLE__\r\n\t\tstatic double machTimebase;\r\n\t\tstatic uint64_t machTimestart;\r\n#endif\r\n#ifdef _WIN32\r\n\t\tstatic int64_t win32TimeScale;\r\n\t\tstatic bool didInitWin32TimeScale;\r\n#endif\r\n\t};\r\n\r\n\tclass VoIPGroupController : public VoIPController{\r\n\tpublic:\r\n\t\tVoIPGroupController(int32_t timeDifference);\r\n\t\tvirtual ~VoIPGroupController();\r\n\t\tvoid SetGroupCallInfo(unsigned char* encryptionKey, unsigned char* reflectorGroupTag, unsigned char* reflectorSelfTag, unsigned char* reflectorSelfSecret, unsigned char* reflectorSelfTagHash, int32_t selfUserID, IPv4Address reflectorAddress, IPv6Address reflectorAddressV6, uint16_t reflectorPort);\r\n\t\tvoid AddGroupCallParticipant(int32_t userID, unsigned char* memberTagHash, unsigned char* serializedStreams, size_t streamsLength);\r\n\t\tvoid RemoveGroupCallParticipant(int32_t userID);\r\n\t\tfloat GetParticipantAudioLevel(int32_t userID);\r\n\t\tvirtual void SetMicMute(bool mute);\r\n\t\tvoid SetParticipantVolume(int32_t userID, float volume);\r\n\t\tvoid SetParticipantStreams(int32_t userID, unsigned char* serializedStreams, size_t length);\r\n\t\tstatic size_t GetInitialStreams(unsigned char* buf, size_t size);\r\n\r\n\t\tstruct Callbacks : public VoIPController::Callbacks{\r\n\t\t\tvoid(*updateStreams)(VoIPGroupController*, unsigned char*, size_t);\r\n\t\t\tvoid(*participantAudioStateChanged)(VoIPGroupController*, int32_t, bool);\r\n\r\n\t\t};\r\n\t\tvoid SetCallbacks(Callbacks callbacks);\r\n\t\tvirtual std::string GetDebugString();\r\n\t\tvirtual void SetNetworkType(int type);\r\n\tprotected:\r\n\t\tvirtual void ProcessIncomingPacket(NetworkPacket& packet, std::shared_ptr<Endpoint> srcEndpoint);\r\n\t\tvirtual void SendInit();\r\n\t\tvirtual void SendUdpPing(std::shared_ptr<Endpoint> endpoint);\r\n\t\tvirtual void SendRelayPings();\r\n\t\tvirtual void SendPacket(unsigned char* data, size_t len, std::shared_ptr<Endpoint> ep, PendingOutgoingPacket& srcPacket);\r\n\t\tvirtual void WritePacketHeader(uint32_t seq, BufferOutputStream* s, unsigned char type, uint32_t length);\r\n\t\tvirtual void OnAudioOutputReady();\r\n\tprivate:\r\n\t\tint32_t GetCurrentUnixtime();\r\n\t\tstd::vector<std::shared_ptr<Stream>> DeserializeStreams(BufferInputStream& in);\r\n\t\tvoid SendRecentPacketsRequest();\r\n\t\tvoid SendSpecialReflectorRequest(unsigned char* data, size_t len);\r\n\t\tvoid SerializeAndUpdateOutgoingStreams();\r\n\t\tstruct GroupCallParticipant{\r\n\t\t\tint32_t userID;\r\n\t\t\tunsigned char memberTagHash[32];\r\n\t\t\tstd::vector<std::shared_ptr<Stream>> streams;\r\n\t\t\tAudioLevelMeter* levelMeter;\r\n\t\t};\r\n\t\tstd::vector<GroupCallParticipant> participants;\r\n\t\tunsigned char reflectorSelfTag[16];\r\n\t\tunsigned char reflectorSelfSecret[16];\r\n\t\tunsigned char reflectorSelfTagHash[32];\r\n\t\tint32_t userSelfID;\r\n\t\tstd::shared_ptr<Endpoint> groupReflector;\r\n\t\tAudioMixer* audioMixer;\r\n\t\tAudioLevelMeter selfLevelMeter;\r\n\t\tCallbacks groupCallbacks;\r\n\t\tstruct PacketIdMapping{\r\n\t\t\tuint32_t seq;\r\n\t\t\tuint16_t id;\r\n\t\t\tdouble ackTime;\r\n\t\t};\r\n\t\tstd::vector<PacketIdMapping> recentSentPackets;\r\n\t\tMutex sentPacketsMutex;\r\n\t\tMutex participantsMutex;\r\n\t\tint32_t timeDifference;\r\n\t};\r\n\r\n};\r\n\r\n#endif\r\n"
  },
  {
    "path": "libtgvoip-public/VoIPGroupController.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"VoIPController.h\"\n#include \"logging.h\"\n#include \"VoIPServerConfig.h\"\n#include \"PrivateDefines.h\"\n#include <assert.h>\n#include <math.h>\n#include <time.h>\n\nusing namespace tgvoip;\nusing namespace std;\n\nVoIPGroupController::VoIPGroupController(int32_t timeDifference){\n\taudioMixer=new AudioMixer();\n\tmemset(&callbacks, 0, sizeof(callbacks));\n\tuserSelfID=0;\n\tthis->timeDifference=timeDifference;\n\tLOGV(\"Created VoIPGroupController; timeDifference=%d\", timeDifference);\n}\n\nVoIPGroupController::~VoIPGroupController(){\n\tif(audioOutput){\n\t\taudioOutput->Stop();\n\t}\n\tLOGD(\"before stop audio mixer\");\n\taudioMixer->Stop();\n\tdelete audioMixer;\n\n\tfor(vector<GroupCallParticipant>::iterator p=participants.begin();p!=participants.end();p++){\n\t\tif(p->levelMeter)\n\t\t\tdelete p->levelMeter;\n\t}\n}\n\nvoid VoIPGroupController::SetGroupCallInfo(unsigned char *encryptionKey, unsigned char *reflectorGroupTag, unsigned char *reflectorSelfTag, unsigned char *reflectorSelfSecret, unsigned char* reflectorSelfTagHash, int32_t selfUserID, IPv4Address reflectorAddress, IPv6Address reflectorAddressV6, uint16_t reflectorPort){\n\tshared_ptr<Endpoint> e=make_shared<Endpoint>();\n\te->address=reflectorAddress;\n\te->v6address=reflectorAddressV6;\n\te->port=reflectorPort;\n\tmemcpy(e->peerTag, reflectorGroupTag, 16);\n\te->type=Endpoint::TYPE_UDP_RELAY;\n\tendpoints.push_back(e);\n\tgroupReflector=e;\n\tcurrentEndpoint=e;\n\n\tmemcpy(this->encryptionKey, encryptionKey, 256);\n\tmemcpy(this->reflectorSelfTag, reflectorSelfTag, 16);\n\tmemcpy(this->reflectorSelfSecret, reflectorSelfSecret, 16);\n\tmemcpy(this->reflectorSelfTagHash, reflectorSelfTagHash, 16);\n\tuint8_t sha256[SHA256_LENGTH];\n\tcrypto.sha256((uint8_t*) encryptionKey, 256, sha256);\n\tmemcpy(callID, sha256+(SHA256_LENGTH-16), 16);\n\tmemcpy(keyFingerprint, sha256+(SHA256_LENGTH-16), 8);\n\tthis->userSelfID=selfUserID;\n\n\t//LOGD(\"reflectorSelfTag = %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\", reflectorSelfTag[0], reflectorSelfTag[1], reflectorSelfTag[2], reflectorSelfTag[3], reflectorSelfTag[4], reflectorSelfTag[5], reflectorSelfTag[6], reflectorSelfTag[7], reflectorSelfTag[8], reflectorSelfTag[9], reflectorSelfTag[10], reflectorSelfTag[11], reflectorSelfTag[12], reflectorSelfTag[13], reflectorSelfTag[14], reflectorSelfTag[15]);\n\t//LOGD(\"reflectorSelfSecret = %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\", reflectorSelfSecret[0], reflectorSelfSecret[1], reflectorSelfSecret[2], reflectorSelfSecret[3], reflectorSelfSecret[4], reflectorSelfSecret[5], reflectorSelfSecret[6], reflectorSelfSecret[7], reflectorSelfSecret[8], reflectorSelfSecret[9], reflectorSelfSecret[10], reflectorSelfSecret[11], reflectorSelfSecret[12], reflectorSelfSecret[13], reflectorSelfSecret[14], reflectorSelfSecret[15]);\n\t//LOGD(\"reflectorSelfTagHash = %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\", reflectorSelfTagHash[0], reflectorSelfTagHash[1], reflectorSelfTagHash[2], reflectorSelfTagHash[3], reflectorSelfTagHash[4], reflectorSelfTagHash[5], reflectorSelfTagHash[6], reflectorSelfTagHash[7], reflectorSelfTagHash[8], reflectorSelfTagHash[9], reflectorSelfTagHash[10], reflectorSelfTagHash[11], reflectorSelfTagHash[12], reflectorSelfTagHash[13], reflectorSelfTagHash[14], reflectorSelfTagHash[15]);\n}\n\nvoid VoIPGroupController::AddGroupCallParticipant(int32_t userID, unsigned char *memberTagHash, unsigned char* serializedStreams, size_t streamsLength){\n\tif(userID==userSelfID)\n\t\treturn;\n\tif(userSelfID==0)\n\t\treturn;\n\t//if(streamsLength==0)\n\t//\treturn;\n\tMutexGuard m(participantsMutex);\n\tLOGV(\"Adding group call user %d, streams length %u\", userID, (unsigned int)streamsLength);\n\n\tfor(vector<GroupCallParticipant>::iterator p=participants.begin();p!=participants.end();++p){\n\t\tif(p->userID==userID){\n\t\t\tLOGE(\"user %d already added\", userID);\n\t\t\tabort();\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tGroupCallParticipant p;\n\tp.userID=userID;\n\tmemcpy(p.memberTagHash, memberTagHash, sizeof(p.memberTagHash));\n\tp.levelMeter=new AudioLevelMeter();\n\n\tBufferInputStream ss(serializedStreams, streamsLength);\n\tvector<shared_ptr<Stream>> streams=DeserializeStreams(ss);\n\n\tunsigned char audioStreamID=0;\n\n\tfor(vector<shared_ptr<Stream>>::iterator _s=streams.begin();_s!=streams.end();++_s){\n\t\tshared_ptr<Stream>& s=*_s;\n\t\ts->userID=userID;\n\t\tif(s->type==STREAM_TYPE_AUDIO && s->codec==CODEC_OPUS && !audioStreamID){\n\t\t\taudioStreamID=s->id;\n\t\t\ts->jitterBuffer=make_shared<JitterBuffer>(nullptr, s->frameDuration);\n\t\t\tif(s->frameDuration>50)\n\t\t\t\ts->jitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_initial_delay_60\", 2));\n\t\t\telse if(s->frameDuration>30)\n\t\t\t\ts->jitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_initial_delay_40\", 4));\n\t\t\telse\n\t\t\t\ts->jitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt(\"jitter_initial_delay_20\", 6));\n\t\t\ts->callbackWrapper=make_shared<CallbackWrapper>();\n\t\t\ts->decoder=make_shared<OpusDecoder>(s->callbackWrapper, false, false);\n\t\t\ts->decoder->SetJitterBuffer(s->jitterBuffer);\n\t\t\ts->decoder->SetFrameDuration(s->frameDuration);\n\t\t\ts->decoder->SetDTX(true);\n\t\t\ts->decoder->SetLevelMeter(p.levelMeter);\n\t\t\taudioMixer->AddInput(s->callbackWrapper);\n\t\t}\n\t\tincomingStreams.push_back(s);\n\t}\n\n\tif(!audioStreamID){\n\t\tLOGW(\"User %d has no usable audio stream\", userID);\n\t}\n\n\tp.streams.insert(p.streams.end(), streams.begin(), streams.end());\n\tparticipants.push_back(p);\n\tLOGI(\"Added group call participant %d\", userID);\n}\n\nvoid VoIPGroupController::RemoveGroupCallParticipant(int32_t userID){\n\tMutexGuard m(participantsMutex);\n\tvector<shared_ptr<Stream>>::iterator stm=incomingStreams.begin();\n\twhile(stm!=incomingStreams.end()){\n\t\tif((*stm)->userID==userID){\n\t\t\tLOGI(\"Removed stream %d belonging to user %d\", (*stm)->id, userID);\n\t\t\taudioMixer->RemoveInput((*stm)->callbackWrapper);\n\t\t\t(*stm)->decoder->Stop();\n\t\t\t//delete (*stm)->decoder;\n\t\t\t//delete (*stm)->jitterBuffer;\n\t\t\t//delete (*stm)->callbackWrapper;\n\t\t\tstm=incomingStreams.erase(stm);\n\t\t\tcontinue;\n\t\t}\n\t\t++stm;\n\t}\n\tfor(vector<GroupCallParticipant>::iterator p=participants.begin();p!=participants.end();++p){\n\t\tif(p->userID==userID){\n\t\t\tif(p->levelMeter)\n\t\t\t\tdelete p->levelMeter;\n\t\t\tparticipants.erase(p);\n\t\t\tLOGI(\"Removed group call participant %d\", userID);\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\nvector<shared_ptr<VoIPController::Stream>> VoIPGroupController::DeserializeStreams(BufferInputStream& in){\n\tvector<shared_ptr<Stream>> res;\n\ttry{\n\t\tunsigned char count=in.ReadByte();\n\t\tfor(unsigned char i=0;i<count;i++){\n\t\t\tuint16_t len=(uint16_t) in.ReadInt16();\n\t\t\tBufferInputStream inner=in.GetPartBuffer(len, true);\n\t\t\tshared_ptr<Stream> s=make_shared<Stream>();\n\t\t\ts->id=inner.ReadByte();\n\t\t\ts->type=inner.ReadByte();\n\t\t\ts->codec=(uint32_t) inner.ReadInt32();\n\t\t\tuint32_t flags=(uint32_t) inner.ReadInt32();\n\t\t\ts->enabled=(flags & STREAM_FLAG_ENABLED)==STREAM_FLAG_ENABLED;\n\t\t\ts->frameDuration=(uint16_t) inner.ReadInt16();\n\t\t\tres.push_back(s);\n\t\t}\n\t}catch(out_of_range& x){\n\t\tLOGW(\"Error deserializing streams: %s\", x.what());\n\t}\n\treturn res;\n}\n\nvoid VoIPGroupController::SetParticipantStreams(int32_t userID, unsigned char *serializedStreams, size_t length){\n\tLOGD(\"Set participant streams for %d\", userID);\n\tMutexGuard m(participantsMutex);\n\tfor(vector<GroupCallParticipant>::iterator p=participants.begin();p!=participants.end();++p){\n\t\tif(p->userID==userID){\n\t\t\tBufferInputStream in(serializedStreams, length);\n\t\t\tvector<shared_ptr<Stream>> streams=DeserializeStreams(in);\n\t\t\tfor(vector<shared_ptr<Stream>>::iterator ns=streams.begin();ns!=streams.end();++ns){\n\t\t\t\tbool found=false;\n\t\t\t\tfor(vector<shared_ptr<Stream>>::iterator s=p->streams.begin();s!=p->streams.end();++s){\n\t\t\t\t\tif((*s)->id==(*ns)->id){\n\t\t\t\t\t\t(*s)->enabled=(*ns)->enabled;\n\t\t\t\t\t\tif(groupCallbacks.participantAudioStateChanged)\n\t\t\t\t\t\t\tgroupCallbacks.participantAudioStateChanged(this, userID, (*s)->enabled);\n\t\t\t\t\t\tfound=true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!found){\n\t\t\t\t\tLOGW(\"Tried to add stream %d for user %d but adding/removing streams is not supported\", (*ns)->id, userID);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\nsize_t VoIPGroupController::GetInitialStreams(unsigned char *buf, size_t size){\n\tBufferOutputStream s(buf, size);\n\ts.WriteByte(1); // streams count\n\n\ts.WriteInt16(12); // this object length\n\ts.WriteByte(1); // stream id\n\ts.WriteByte(STREAM_TYPE_AUDIO);\n\ts.WriteInt32(CODEC_OPUS);\n\ts.WriteInt32(STREAM_FLAG_ENABLED | STREAM_FLAG_DTX); // flags\n\ts.WriteInt16(60); // frame duration\n\n\treturn s.GetLength();\n}\n\nvoid VoIPGroupController::SendInit(){\n\tSendRecentPacketsRequest();\n}\n\nvoid VoIPGroupController::ProcessIncomingPacket(NetworkPacket &packet, shared_ptr<Endpoint> srcEndpoint){\n\t//LOGD(\"Received incoming packet from %s:%u, %u bytes\", packet.address->ToString().c_str(), packet.port, packet.length);\n\tif(packet.length<17 || packet.length>2000){\n\t\tLOGW(\"Received packet has wrong length %d\", (int)packet.length);\n\t\treturn;\n\t}\n\tBufferOutputStream sigData(packet.length);\n\tsigData.WriteBytes(packet.data, packet.length-16);\n\tsigData.WriteBytes(reflectorSelfSecret, 16);\n\tunsigned char sig[32];\n\tcrypto.sha256(sigData.GetBuffer(), sigData.GetLength(), sig);\n\tif(memcmp(sig, packet.data+(packet.length-16), 16)!=0){\n\t\tLOGW(\"Received packet has incorrect signature\");\n\t\treturn;\n\t}\n\n\t// reflector special response\n\tif(memcmp(packet.data, reflectorSelfTagHash, 16)==0 && packet.length>60){\n\t\t//LOGI(\"possible reflector special response\");\n\t\tunsigned char firstBlock[16];\n\t\tunsigned char iv[16];\n\t\tmemcpy(iv, packet.data+16, 16);\n\t\tunsigned char key[32];\n\t\tcrypto.sha256(reflectorSelfSecret, 16, key);\n\t\tcrypto.aes_cbc_decrypt(packet.data+32, firstBlock, 16, key, iv);\n\t\tBufferInputStream in(firstBlock, 16);\n\t\tin.Seek(8);\n\t\tsize_t len=(size_t) in.ReadInt32();\n\t\tint32_t tlid=in.ReadInt32();\n\t\t//LOGD(\"special response: len=%d, tlid=0x%08X\", len, tlid);\n\t\tif(len%4==0 && len+60<=packet.length && packet.length<=1500){\n\t\t\tlastRecvPacketTime=GetCurrentTime();\n\t\t\tmemcpy(iv, packet.data+16, 16);\n\t\t\tunsigned char buf[1500];\n\t\t\tcrypto.aes_cbc_decrypt(packet.data+32, buf, len+16, key, iv);\n\t\t\ttry{\n\t\t\t\tif(tlid==TLID_UDP_REFLECTOR_LAST_PACKETS_INFO){\n\t\t\t\t\tMutexGuard m(sentPacketsMutex);\n\t\t\t\t\t//LOGV(\"received udpReflector.lastPacketsInfo\");\n\t\t\t\t\tin=BufferInputStream(buf, len+16);\n\t\t\t\t\tin.Seek(16);\n\t\t\t\t\t/*int32_t date=*/in.ReadInt32();\n\t\t\t\t\t/*int64_t queryID=*/in.ReadInt64();\n\t\t\t\t\tint32_t vectorMagic=in.ReadInt32();\n\t\t\t\t\tif(vectorMagic!=TLID_VECTOR){\n\t\t\t\t\t\tLOGW(\"last packets info: expected vector, got %08X\", vectorMagic);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tint32_t recvCount=in.ReadInt32();\n\t\t\t\t\t//LOGV(\"%d received packets\", recvCount);\n\t\t\t\t\tfor(int i=0;i<recvCount;i++){\n\t\t\t\t\t\tuint32_t p=(uint32_t) in.ReadInt32();\n\t\t\t\t\t\t//LOGV(\"Relay received packet: %08X\", p);\n\t\t\t\t\t\tuint16_t id=(uint16_t) (p & 0xFFFF);\n\t\t\t\t\t\t//LOGV(\"ack id %04X\", id);\n\t\t\t\t\t\tfor(vector<PacketIdMapping>::iterator pkt=recentSentPackets.begin();pkt!=recentSentPackets.end();++pkt){\n\t\t\t\t\t\t\t//LOGV(\"== sent id %04X\", pkt->id);\n\t\t\t\t\t\t\tif(pkt->id==id){\n\t\t\t\t\t\t\t\tif(!pkt->ackTime){\n\t\t\t\t\t\t\t\t\tpkt->ackTime=GetCurrentTime();\n\t\t\t\t\t\t\t\t\tconctl->PacketAcknowledged(pkt->seq);\n\t\t\t\t\t\t\t\t\t//LOGV(\"relay acknowledged packet %u\", pkt->seq);\n\t\t\t\t\t\t\t\t\tif(seqgt(pkt->seq, lastRemoteAckSeq))\n\t\t\t\t\t\t\t\t\t\tlastRemoteAckSeq=pkt->seq;\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}\n\t\t\t\t\t}\n\t\t\t\t\tvectorMagic=in.ReadInt32();\n\t\t\t\t\tif(vectorMagic!=TLID_VECTOR){\n\t\t\t\t\t\tLOGW(\"last packets info: expected vector, got %08X\", vectorMagic);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tint32_t sentCount=in.ReadInt32();\n\t\t\t\t\t//LOGV(\"%d sent packets\", sentCount);\n\t\t\t\t\tfor(int i=0;i<sentCount;i++){\n\t\t\t\t\t\t/*int32_t p=*/in.ReadInt32();\n\t\t\t\t\t\t//LOGV(\"Sent packet: %08X\", p);\n\t\t\t\t\t}\n\t\t\t\t\tif(udpConnectivityState!=UDP_AVAILABLE)\n\t\t\t\t\t\tudpConnectivityState=UDP_AVAILABLE;\n\t\t\t\t\tif(state!=STATE_ESTABLISHED)\n\t\t\t\t\t\tSetState(STATE_ESTABLISHED);\n\t\t\t\t\tif(!audioInput){\n\t\t\t\t\t\tStartAudio();\n\t\t\t\t\t\tif(state!=STATE_FAILED){\n\t\t\t\t\t\t\t//\taudioOutput->Start();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(out_of_range& x){\n\t\t\t\tLOGE(\"Error parsing special response: %s\", x.what());\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif(packet.length<32)\n\t\treturn;\n\n\t// it's a packet relayed from another participant - find the sender\n\tMutexGuard m(participantsMutex);\n\tGroupCallParticipant* sender=NULL;\n\tfor(vector<GroupCallParticipant>::iterator p=participants.begin();p!=participants.end();++p){\n\t\tif(memcmp(packet.data, p->memberTagHash, 16)==0){\n\t\t\t//LOGV(\"received data packet from user %d\", p->userID);\n\t\t\tsender=&*p;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(!sender){\n\t\tLOGV(\"Received data packet is from unknown user\");\n\t\treturn;\n\t}\n\n\tif(memcmp(packet.data+16, keyFingerprint, 8)!=0){\n\t\tLOGW(\"received packet has wrong key fingerprint\");\n\t\treturn;\n\t}\n\n\tBufferInputStream in(packet.data, packet.length-16);\n\tin.Seek(16+8); // peer tag + key fingerprint\n\n\tunsigned char msgKey[16];\n\tin.ReadBytes(msgKey, 16);\n\n\tunsigned char decrypted[1500];\n\tunsigned char aesKey[32], aesIv[32];\n\tKDF2(msgKey, 0, aesKey, aesIv);\n\tsize_t decryptedLen=in.Remaining()-16;\n\tif(decryptedLen>sizeof(decrypted))\n\t\treturn;\n\t//LOGV(\"-> MSG KEY: %08x %08x %08x %08x, hashed %u\", *reinterpret_cast<int32_t*>(msgKey), *reinterpret_cast<int32_t*>(msgKey+4), *reinterpret_cast<int32_t*>(msgKey+8), *reinterpret_cast<int32_t*>(msgKey+12), decryptedLen-4);\n\tuint8_t *decryptOffset = packet.data + in.GetOffset();\n\tif ((((intptr_t)decryptOffset) % sizeof(long)) != 0) {\n\t\tLOGE(\"alignment2 packet.data+in.GetOffset()\");\n\t}\n\tif (decryptedLen % sizeof(long) != 0) {\n\t\tLOGE(\"alignment2 decryptedLen\");\n\t}\n\tcrypto.aes_ige_decrypt(packet.data+in.GetOffset(), decrypted, decryptedLen, aesKey, aesIv);\n\n\tin=BufferInputStream(decrypted, decryptedLen);\n\t//LOGD(\"received packet length: %d\", in.ReadInt32());\n\n\tBufferOutputStream buf(decryptedLen+32);\n\tsize_t x=0;\n\tbuf.WriteBytes(encryptionKey+88+x, 32);\n\tbuf.WriteBytes(decrypted+4, decryptedLen-4);\n\tunsigned char msgKeyLarge[32];\n\tcrypto.sha256(buf.GetBuffer(), buf.GetLength(), msgKeyLarge);\n\n\tif(memcmp(msgKey, msgKeyLarge+8, 16)!=0){\n\t\tLOGW(\"Received packet from user %d has wrong hash\", sender->userID);\n\t\treturn;\n\t}\n\n\tuint32_t innerLen=(uint32_t) in.ReadInt32();\n\tif(innerLen>decryptedLen-4){\n\t\tLOGW(\"Received packet has wrong inner length (%d with total of %u)\", (int)innerLen, (unsigned int)decryptedLen);\n\t\treturn;\n\t}\n\tif(decryptedLen-innerLen<12){\n\t\tLOGW(\"Received packet has too little padding (%u)\", (unsigned int)(decryptedLen-innerLen));\n\t\treturn;\n\t}\n\tin=BufferInputStream(decrypted+4, (size_t) innerLen);\n\n\tuint32_t tlid=(uint32_t) in.ReadInt32();\n\tif(tlid!=TLID_DECRYPTED_AUDIO_BLOCK){\n\t\tLOGW(\"Received packet has unknown TL ID 0x%08x\", tlid);\n\t\treturn;\n\t}\n\tin.Seek(in.GetOffset()+16); // random bytes\n\tint32_t flags=in.ReadInt32();\n\tif(!(flags & PFLAG_HAS_SEQ) || !(flags & PFLAG_HAS_SENDER_TAG_HASH)){\n\t\tLOGW(\"Received packet has wrong flags\");\n\t\treturn;\n\t}\n\t/*uint32_t seq=(uint32_t) */in.ReadInt32();\n\tunsigned char senderTagHash[16];\n\tin.ReadBytes(senderTagHash, 16);\n\tif(memcmp(senderTagHash, sender->memberTagHash, 16)!=0){\n\t\tLOGW(\"Received packet has wrong inner sender tag hash\");\n\t\treturn;\n\t}\n\n\t//int32_t oneMoreInnerLengthWhyDoWeEvenNeedThis;\n\tif(flags & PFLAG_HAS_DATA){\n\t\t/*oneMoreInnerLengthWhyDoWeEvenNeedThis=*/in.ReadTlLength();\n\t}\n\tunsigned char type=(unsigned char) ((flags >> 24) & 0xFF);\n\tlastRecvPacketTime=GetCurrentTime();\n\n\tif(type==PKT_STREAM_DATA || type==PKT_STREAM_DATA_X2 || type==PKT_STREAM_DATA_X3){\n\t\tif(state!=STATE_ESTABLISHED && receivedInitAck)\n\t\t\tSetState(STATE_ESTABLISHED);\n\t\tint count;\n\t\tswitch(type){\n\t\t\tcase PKT_STREAM_DATA_X2:\n\t\t\t\tcount=2;\n\t\t\t\tbreak;\n\t\t\tcase PKT_STREAM_DATA_X3:\n\t\t\t\tcount=3;\n\t\t\t\tbreak;\n\t\t\tcase PKT_STREAM_DATA:\n\t\t\tdefault:\n\t\t\t\tcount=1;\n\t\t\t\tbreak;\n\t\t}\n\t\tint i;\n\t\t//if(srcEndpoint->type==Endpoint::TYPE_UDP_RELAY && srcEndpoint!=peerPreferredRelay){\n\t\t//\tpeerPreferredRelay=srcEndpoint;\n\t\t//}\n\t\tfor(i=0;i<count;i++){\n\t\t\tunsigned char streamID=in.ReadByte();\n\t\t\tunsigned char sflags=(unsigned char) (streamID & 0xC0);\n\t\t\tuint16_t sdlen=(uint16_t) (sflags & STREAM_DATA_FLAG_LEN16 ? in.ReadInt16() : in.ReadByte());\n\t\t\tuint32_t pts=(uint32_t) in.ReadInt32();\n\t\t\t//LOGD(\"stream data, pts=%d, len=%d, rem=%d\", pts, sdlen, in.Remaining());\n\t\t\taudioTimestampIn=pts;\n\t\t\t/*if(!audioOutStarted && audioOutput){\n\t\t\t\taudioOutput->Start();\n\t\t\t\taudioOutStarted=true;\n\t\t\t}*/\n\t\t\tif(in.GetOffset()+sdlen>in.GetLength()){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor(vector<shared_ptr<Stream>>::iterator stm=sender->streams.begin();stm!=sender->streams.end();++stm){\n\t\t\t\tif((*stm)->id==streamID){\n\t\t\t\t\tif((*stm)->jitterBuffer){\n\t\t\t\t\t\t(*stm)->jitterBuffer->HandleInput(decrypted+4+in.GetOffset(), sdlen, pts, false);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i<count-1)\n\t\t\t\tin.Seek(in.GetOffset()+sdlen);\n\t\t}\n\t}\n}\n\nvoid VoIPGroupController::SendUdpPing(shared_ptr<Endpoint> endpoint){\n\n}\n\nvoid VoIPGroupController::SetNetworkType(int type){\n\tnetworkType=type;\n\tUpdateDataSavingState();\n\tUpdateAudioBitrateLimit();\n\tstring itfName=udpSocket->GetLocalInterfaceInfo(NULL, NULL);\n\tif(itfName!=activeNetItfName){\n\t\tudpSocket->OnActiveInterfaceChanged();\n\t\tLOGI(\"Active network interface changed: %s -> %s\", activeNetItfName.c_str(), itfName.c_str());\n\t\tbool isFirstChange=activeNetItfName.length()==0;\n\t\tactiveNetItfName=itfName;\n\t\tif(isFirstChange)\n\t\t\treturn;\n\t\tudpConnectivityState=UDP_UNKNOWN;\n\t\tudpPingCount=0;\n\t\tlastUdpPingTime=0;\n\t\tif(proxyProtocol==PROXY_SOCKS5)\n\t\t\tInitUDPProxy();\n\t\tselectCanceller->CancelSelect();\n\t}\n}\n\nvoid VoIPGroupController::SendRecentPacketsRequest(){\n\tBufferOutputStream out(1024);\n\tout.WriteInt32(TLID_UDP_REFLECTOR_REQUEST_PACKETS_INFO); // TL function\n\tout.WriteInt32(GetCurrentUnixtime()); // date:int\n\tout.WriteInt64(0); // query_id:long\n\tout.WriteInt32(64); // recv_num:int\n\tout.WriteInt32(0); // sent_num:int\n\tSendSpecialReflectorRequest(out.GetBuffer(), out.GetLength());\n}\n\nvoid VoIPGroupController::SendSpecialReflectorRequest(unsigned char *data, size_t len){\n\tBufferOutputStream out(1024);\n\tunsigned char buf[1500];\n\tcrypto.rand_bytes(buf, 8);\n\tout.WriteBytes(buf, 8);\n\tout.WriteInt32((int32_t)len);\n\tout.WriteBytes(data, len);\n\tif(out.GetLength()%16!=0){\n\t\tsize_t paddingLen=16-(out.GetLength()%16);\n\t\tcrypto.rand_bytes(buf, paddingLen);\n\t\tout.WriteBytes(buf, paddingLen);\n\t}\n\tunsigned char iv[16];\n\tcrypto.rand_bytes(iv, 16);\n\tunsigned char key[32];\n\tcrypto.sha256(reflectorSelfSecret, 16, key);\n\tunsigned char _iv[16];\n\tmemcpy(_iv, iv, 16);\n\tsize_t encryptedLen=out.GetLength();\n\tcrypto.aes_cbc_encrypt(out.GetBuffer(), buf, encryptedLen, key, _iv);\n\tout.Reset();\n\tout.WriteBytes(reflectorSelfTag, 16);\n\tout.WriteBytes(iv, 16);\n\tout.WriteBytes(buf, encryptedLen);\n\tout.WriteBytes(reflectorSelfSecret, 16);\n\tcrypto.sha256(out.GetBuffer(), out.GetLength(), buf);\n\tout.Rewind(16);\n\tout.WriteBytes(buf, 16);\n\n\tNetworkPacket pkt={0};\n\tpkt.address=&groupReflector->address;\n\tpkt.port=groupReflector->port;\n\tpkt.protocol=PROTO_UDP;\n\tpkt.data=out.GetBuffer();\n\tpkt.length=out.GetLength();\n\tActuallySendPacket(pkt, groupReflector);\n}\n\nvoid VoIPGroupController::SendRelayPings(){\n\t//LOGV(\"Send relay pings 2\");\n\tdouble currentTime=GetCurrentTime();\n\tif(currentTime-groupReflector->lastPingTime>=0.25){\n\t\tSendRecentPacketsRequest();\n\t\tgroupReflector->lastPingTime=currentTime;\n\t}\n}\n\nvoid VoIPGroupController::OnAudioOutputReady(){\n\tencoder->SetDTX(true);\n\taudioMixer->SetOutput(audioOutput);\n\taudioMixer->SetEchoCanceller(echoCanceller);\n\taudioMixer->Start();\n\taudioOutput->Start();\n\taudioOutStarted=true;\n\tencoder->SetLevelMeter(&selfLevelMeter);\n}\n\nvoid VoIPGroupController::WritePacketHeader(uint32_t seq, BufferOutputStream *s, unsigned char type, uint32_t length){\n\ts->WriteInt32(TLID_DECRYPTED_AUDIO_BLOCK);\n\tint64_t randomID;\n\tcrypto.rand_bytes((uint8_t *) &randomID, 8);\n\ts->WriteInt64(randomID);\n\tunsigned char randBytes[7];\n\tcrypto.rand_bytes(randBytes, 7);\n\ts->WriteByte(7);\n\ts->WriteBytes(randBytes, 7);\n\tuint32_t pflags=PFLAG_HAS_SEQ | PFLAG_HAS_SENDER_TAG_HASH;\n\tif(length>0)\n\t\tpflags|=PFLAG_HAS_DATA;\n\tpflags|=((uint32_t) type) << 24;\n\ts->WriteInt32(pflags);\n\n\tif(type==PKT_STREAM_DATA || type==PKT_STREAM_DATA_X2 || type==PKT_STREAM_DATA_X3){\n\t\tconctl->PacketSent(seq, length);\n\t}\n\n\t/*if(pflags & PFLAG_HAS_CALL_ID){\n\t\ts->WriteBytes(callID, 16);\n\t}*/\n\t//s->WriteInt32(lastRemoteSeq);\n\ts->WriteInt32(seq);\n\ts->WriteBytes(reflectorSelfTagHash, 16);\n\tif(length>0){\n\t\tif(length<=253){\n\t\t\ts->WriteByte((unsigned char) length);\n\t\t}else{\n\t\t\ts->WriteByte(254);\n\t\t\ts->WriteByte((unsigned char) (length & 0xFF));\n\t\t\ts->WriteByte((unsigned char) ((length >> 8) & 0xFF));\n\t\t\ts->WriteByte((unsigned char) ((length >> 16) & 0xFF));\n\t\t}\n\t}\n}\n\nvoid VoIPGroupController::SendPacket(unsigned char *data, size_t len, shared_ptr<Endpoint> ep, PendingOutgoingPacket& srcPacket){\n\tif(stopping)\n\t\treturn;\n\tif(ep->type==Endpoint::TYPE_TCP_RELAY && !useTCP)\n\t\treturn;\n\tBufferOutputStream out(len+128);\n\t//LOGV(\"send group packet %u\", len);\n\n\tout.WriteBytes(reflectorSelfTag, 16);\n\n\tif(len>0){\n\t\tBufferOutputStream inner(len+128);\n\t\tinner.WriteInt32((uint32_t)len);\n\t\tinner.WriteBytes(data, len);\n\t\tsize_t padLen=16-inner.GetLength()%16;\n\t\tif(padLen<12)\n\t\t\tpadLen+=16;\n\t\tunsigned char padding[28];\n\t\tcrypto.rand_bytes((uint8_t *) padding, padLen);\n\t\tinner.WriteBytes(padding, padLen);\n\t\tassert(inner.GetLength()%16==0);\n\n\t\tunsigned char key[32], iv[32], msgKey[16];\n\t\tout.WriteBytes(keyFingerprint, 8);\n\t\tBufferOutputStream buf(len+32);\n\t\tsize_t x=0;\n\t\tbuf.WriteBytes(encryptionKey+88+x, 32);\n\t\tbuf.WriteBytes(inner.GetBuffer()+4, inner.GetLength()-4);\n\t\tunsigned char msgKeyLarge[32];\n\t\tcrypto.sha256(buf.GetBuffer(), buf.GetLength(), msgKeyLarge);\n\t\tmemcpy(msgKey, msgKeyLarge+8, 16);\n\t\tKDF2(msgKey, 0, key, iv);\n\t\tout.WriteBytes(msgKey, 16);\n\t\t//LOGV(\"<- MSG KEY: %08x %08x %08x %08x, hashed %u\", *reinterpret_cast<int32_t*>(msgKey), *reinterpret_cast<int32_t*>(msgKey+4), *reinterpret_cast<int32_t*>(msgKey+8), *reinterpret_cast<int32_t*>(msgKey+12), inner.GetLength()-4);\n\n\t\tunsigned char aesOut[MSC_STACK_FALLBACK(inner.GetLength(), 1500)];\n\t\tcrypto.aes_ige_encrypt(inner.GetBuffer(), aesOut, inner.GetLength(), key, iv);\n\t\tout.WriteBytes(aesOut, inner.GetLength());\n\t}\n\n\t// relay signature\n\tout.WriteBytes(reflectorSelfSecret, 16);\n\tunsigned char sig[32];\n\tcrypto.sha256(out.GetBuffer(), out.GetLength(), sig);\n\tout.Rewind(16);\n\tout.WriteBytes(sig, 16);\n\n\tif(srcPacket.type==PKT_STREAM_DATA || srcPacket.type==PKT_STREAM_DATA_X2 || srcPacket.type==PKT_STREAM_DATA_X3){\n\t\tPacketIdMapping mapping={srcPacket.seq, *reinterpret_cast<uint16_t*>(sig+14), 0};\n\t\tMutexGuard m(sentPacketsMutex);\n\t\trecentSentPackets.push_back(mapping);\n\t\t//LOGD(\"sent packet with id: %04X\", mapping.id);\n\t\twhile(recentSentPackets.size()>64)\n\t\t\trecentSentPackets.erase(recentSentPackets.begin());\n\t}\n\tlastSentSeq=srcPacket.seq;\n\n\tif(IS_MOBILE_NETWORK(networkType))\n\t\tstats.bytesSentMobile+=(uint64_t)out.GetLength();\n\telse\n\t\tstats.bytesSentWifi+=(uint64_t)out.GetLength();\n\n\tNetworkPacket pkt={0};\n\tpkt.address=(NetworkAddress*)&ep->address;\n\tpkt.port=ep->port;\n\tpkt.length=out.GetLength();\n\tpkt.data=out.GetBuffer();\n\tpkt.protocol=ep->type==Endpoint::TYPE_TCP_RELAY ? PROTO_TCP : PROTO_UDP;\n\tActuallySendPacket(pkt, ep);\n}\n\nvoid VoIPGroupController::SetCallbacks(VoIPGroupController::Callbacks callbacks){\n\tVoIPController::SetCallbacks(callbacks);\n\tthis->groupCallbacks=callbacks;\n}\n\nint32_t VoIPGroupController::GetCurrentUnixtime(){\n\treturn time(NULL)+timeDifference;\n}\n\nfloat VoIPGroupController::GetParticipantAudioLevel(int32_t userID){\n\tif(userID==userSelfID)\n\t\treturn selfLevelMeter.GetLevel();\n\tMutexGuard m(participantsMutex);\n\tfor(vector<GroupCallParticipant>::iterator p=participants.begin(); p!=participants.end(); ++p){\n\t\tif(p->userID==userID){\n\t\t\treturn p->levelMeter->GetLevel();\n\t\t}\n\t}\n\treturn 0;\n}\n\nvoid VoIPGroupController::SetMicMute(bool mute){\n\tmicMuted=mute;\n\tif(audioInput){\n\t\tif(mute)\n\t\t\taudioInput->Stop();\n\t\telse\n\t\t\taudioInput->Start();\n\t\tif(!audioInput->IsInitialized()){\n\t\t\tlastError=ERROR_AUDIO_IO;\n\t\t\tSetState(STATE_FAILED);\n\t\t\treturn;\n\t\t}\n\t}\n\toutgoingStreams[0]->enabled=!mute;\n\tSerializeAndUpdateOutgoingStreams();\n}\n\nvoid VoIPGroupController::SetParticipantVolume(int32_t userID, float volume){\n\tMutexGuard m(participantsMutex);\n\tfor(vector<GroupCallParticipant>::iterator p=participants.begin();p!=participants.end();++p){\n\t\tif(p->userID==userID){\n\t\t\tfor(vector<shared_ptr<Stream>>::iterator s=p->streams.begin();s!=p->streams.end();++s){\n\t\t\t\tif((*s)->type==STREAM_TYPE_AUDIO){\n\t\t\t\t\tif((*s)->decoder){\n\t\t\t\t\t\tfloat db;\n\t\t\t\t\t\tif(volume==0.0f)\n\t\t\t\t\t\t\tdb=-INFINITY;\n\t\t\t\t\t\telse if(volume<1.0f)\n\t\t\t\t\t\t\tdb=-50.0f*(1.0f-volume);\n\t\t\t\t\t\telse if(volume>1.0f && volume<=2.0f)\n\t\t\t\t\t\t\tdb=10.0f*(volume-1.0f);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdb=0.0f;\n\t\t\t\t\t\t//LOGV(\"Setting user %u audio volume to %.2f dB\", userID, db);\n\t\t\t\t\t\taudioMixer->SetInputVolume((*s)->callbackWrapper, db);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\nvoid VoIPGroupController::SerializeAndUpdateOutgoingStreams(){\n\tBufferOutputStream out(1024);\n\tout.WriteByte((unsigned char) outgoingStreams.size());\n\n\tfor(vector<shared_ptr<Stream>>::iterator s=outgoingStreams.begin(); s!=outgoingStreams.end(); ++s){\n\t\tBufferOutputStream o(128);\n\t\to.WriteByte((*s)->id);\n\t\to.WriteByte((*s)->type);\n\t\to.WriteInt32((*s)->codec);\n\t\to.WriteInt32((unsigned char) (((*s)->enabled ? STREAM_FLAG_ENABLED : 0) | STREAM_FLAG_DTX));\n\t\to.WriteInt16((*s)->frameDuration);\n\t\tout.WriteInt16((int16_t) o.GetLength());\n\t\tout.WriteBytes(o.GetBuffer(), o.GetLength());\n\t}\n\tif(groupCallbacks.updateStreams)\n\t\tgroupCallbacks.updateStreams(this, out.GetBuffer(), out.GetLength());\n}\n\nstd::string VoIPGroupController::GetDebugString(){\n\tstd::string r=\"Remote endpoints: \\n\";\n\tchar buffer[2048];\n\tfor(shared_ptr<Endpoint>& endpoint:endpoints){\n\t\tconst char* type;\n\t\tswitch(endpoint->type){\n\t\t\tcase Endpoint::TYPE_UDP_P2P_INET:\n\t\t\t\ttype=\"UDP_P2P_INET\";\n\t\t\t\tbreak;\n\t\t\tcase Endpoint::TYPE_UDP_P2P_LAN:\n\t\t\t\ttype=\"UDP_P2P_LAN\";\n\t\t\t\tbreak;\n\t\t\tcase Endpoint::TYPE_UDP_RELAY:\n\t\t\t\ttype=\"UDP_RELAY\";\n\t\t\t\tbreak;\n\t\t\tcase Endpoint::TYPE_TCP_RELAY:\n\t\t\t\ttype=\"TCP_RELAY\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttype=\"UNKNOWN\";\n\t\t\t\tbreak;\n\t\t}\n\t\tsnprintf(buffer, sizeof(buffer), \"%s:%u %dms [%s%s]\\n\", endpoint->address.ToString().c_str(), endpoint->port, (int)(endpoint->averageRTT*1000), type, currentEndpoint==endpoint ? \", IN_USE\" : \"\");\n\t\tr+=buffer;\n\t}\n\tdouble avgLate[3];\n\tshared_ptr<JitterBuffer> jitterBuffer=incomingStreams.size()==1 ? incomingStreams[0]->jitterBuffer : NULL;\n\tif(jitterBuffer)\n\t\tjitterBuffer->GetAverageLateCount(avgLate);\n\telse\n\t\tmemset(avgLate, 0, 3*sizeof(double));\n\tsnprintf(buffer, sizeof(buffer),\n\t\t\t\t\t \"RTT avg/min: %d/%d\\n\"\n\t\t\t\t\t \"Congestion window: %d/%d bytes\\n\"\n\t\t\t\t\t \"Key fingerprint: %02hhX%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX\\n\"\n\t\t\t\t\t \"Last sent/ack'd seq: %u/%u\\n\"\n\t\t\t\t\t \"Send/recv losses: %u/%u (%d%%)\\n\"\n\t\t\t\t\t \"Audio bitrate: %d kbit\\n\"\n\t\t\t\t\t \"Bytes sent/recvd: %llu/%llu\\n\\n\",\n\t\t\t (int)(conctl->GetAverageRTT()*1000), (int)(conctl->GetMinimumRTT()*1000),\n\t\t\t int(conctl->GetInflightDataSize()), int(conctl->GetCongestionWindow()),\n\t\t\t keyFingerprint[0],keyFingerprint[1],keyFingerprint[2],keyFingerprint[3],keyFingerprint[4],keyFingerprint[5],keyFingerprint[6],keyFingerprint[7],\n\t\t\t lastSentSeq, lastRemoteAckSeq,\n\t\t\t conctl->GetSendLossCount(), recvLossCount, encoder ? encoder->GetPacketLoss() : 0,\n\t\t\t encoder ? (encoder->GetBitrate()/1000) : 0,\n\t\t\t (long long unsigned int)(stats.bytesSentMobile+stats.bytesSentWifi),\n\t\t\t (long long unsigned int)(stats.bytesRecvdMobile+stats.bytesRecvdWifi));\n\n\tMutexGuard m(participantsMutex);\n\tfor(vector<GroupCallParticipant>::iterator p=participants.begin();p!=participants.end();++p){\n\t\tsnprintf(buffer, sizeof(buffer), \"Participant id: %d\\n\", p->userID);\n\t\tr+=buffer;\n\t\tfor(vector<shared_ptr<Stream>>::iterator stm=p->streams.begin();stm!=p->streams.end();++stm){\n\t\t\tchar* codec=reinterpret_cast<char*>(&(*stm)->codec);\n\t\t\tsnprintf(buffer, sizeof(buffer), \"Stream %d (type %d, codec '%c%c%c%c', %sabled)\\n\",\n\t\t\t\t\t (*stm)->id, (*stm)->type, codec[3], codec[2], codec[1], codec[0], (*stm)->enabled ? \"en\" : \"dis\");\n\t\t\tr+=buffer;\n\t\t\tif((*stm)->enabled){\n\t\t\t\tif((*stm)->jitterBuffer){\n\t\t\t\t\tsnprintf(buffer, sizeof(buffer), \"Jitter buffer: %d/%.2f\\n\",\n\t\t\t\t\t\t\t (*stm)->jitterBuffer->GetMinPacketCount(), (*stm)->jitterBuffer->GetAverageDelay());\n\t\t\t\t\tr+=buffer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tr+=\"\\n\";\n\t}\n\treturn r;\n}\n"
  },
  {
    "path": "libtgvoip-public/VoIPServerConfig.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"VoIPServerConfig.h\"\n#include <stdlib.h>\n#include \"logging.h\"\n#include <sstream>\n#include <locale>\n\nusing namespace tgvoip;\n\nServerConfig* ServerConfig::sharedInstance=NULL;\n\nServerConfig::ServerConfig(){\n}\n\nServerConfig::~ServerConfig(){\n}\n\nServerConfig *ServerConfig::GetSharedInstance(){\n\tif(!sharedInstance)\n\t\tsharedInstance=new ServerConfig();\n\treturn sharedInstance;\n}\n\nbool ServerConfig::GetBoolean(std::string name, bool fallback){\n\tMutexGuard sync(mutex);\n\tif(ContainsKey(name)){\n\t\tstd::string val=config[name];\n\t\tif(val==\"true\")\n\t\t\treturn true;\n\t\tif(val==\"false\")\n\t\t\treturn false;\n\t}\n\treturn fallback;\n}\n\ndouble ServerConfig::GetDouble(std::string name, double fallback){\n\tMutexGuard sync(mutex);\n\tif(ContainsKey(name)){\n\t\tstd::string val=config[name];\n\t\tstd::istringstream stm(val);\n\t\tdouble rval=fallback;\n\t\tstm.imbue(std::locale(\"C\"));\n\t\tstm >> rval;\n\t\tif(!stm.fail())\n\t\t\treturn rval;\n\t}\n\treturn fallback;\n}\n\nint32_t ServerConfig::GetInt(std::string name, int32_t fallback){\n\tMutexGuard sync(mutex);\n\tif(ContainsKey(name)){\n\t\tstd::string val=config[name];\n\t\tchar* end;\n\t\tconst char* start=val.c_str();\n\t\tint32_t d=strtol(start, &end, 0);\n\t\tif(end!=start){\n\t\t\treturn d;\n\t\t}\n\t}\n\treturn fallback;\n}\n\nstd::string ServerConfig::GetString(std::string name, std::string fallback){\n\tMutexGuard sync(mutex);\n\tif(ContainsKey(name))\n\t\treturn config[name];\n\treturn fallback;\n}\n\nvoid ServerConfig::Update(std::map<std::string, std::string> newValues){\n\tMutexGuard sync(mutex);\n\tLOGD(\"=== Updating voip config ===\");\n\tconfig.clear();\n\tfor(std::map<std::string, std::string>::iterator itr=newValues.begin();itr!=newValues.end();++itr){\n\t\tstd::string key=itr->first;\n\t\tstd::string val=itr->second;\n\t\tLOGV(\"%s -> %s\", key.c_str(), val.c_str());\n\t\tconfig[key]=val;\n\t}\n}\n\nvoid ServerConfig::Update(const char **values, int count) {\n    std::map<std::string, std::string> result;\n    for (int i = 0; i < count / 2; i++) {\n        result[values[i * 2 + 0]] = std::string(values[i * 2 + 1]);\n    }\n    Update(result);\n}\n\n\nbool ServerConfig::ContainsKey(std::string key){\n\treturn config.find(key)!=config.end();\n}\n\n\n"
  },
  {
    "path": "libtgvoip-public/VoIPServerConfig.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef TGVOIP_VOIPSERVERCONFIG_H\n#define TGVOIP_VOIPSERVERCONFIG_H\n\n#include <map>\n#include <string>\n#include <stdint.h>\n#include \"threading.h\"\n\nnamespace tgvoip{\n\nclass ServerConfig{\npublic:\n\tServerConfig();\n\t~ServerConfig();\n\tstatic ServerConfig* GetSharedInstance();\n\tint32_t GetInt(std::string name, int32_t fallback);\n\tdouble GetDouble(std::string name, double fallback);\n\tstd::string GetString(std::string name, std::string fallback);\n\tbool GetBoolean(std::string name, bool fallback);\n\tvoid Update(std::map<std::string, std::string> newValues);\n    void Update(const char **values, int count);\n\nprivate:\n\tstatic ServerConfig* sharedInstance;\n\tbool ContainsKey(std::string key);\n\tstd::map<std::string, std::string> config;\n\tMutex mutex;\n};\n}\n\n#endif //TGVOIP_VOIPSERVERCONFIG_H\n"
  },
  {
    "path": "libtgvoip-public/audio/AudioIO.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n\n#include \"AudioIO.h\"\n#include \"../logging.h\"\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#if defined(TGVOIP_USE_CALLBACK_AUDIO_IO)\n#include \"AudioIOCallback.h\"\n#elif defined(__ANDROID__)\n#include \"../os/android/AudioInputAndroid.h\"\n#include \"../os/android/AudioOutputAndroid.h\"\n#elif defined(__APPLE__)\n#include <TargetConditionals.h>\n#include \"../os/darwin/AudioUnitIO.h\"\n#if TARGET_OS_OSX\n#include \"../os/darwin/AudioInputAudioUnitOSX.h\"\n#include \"../os/darwin/AudioOutputAudioUnitOSX.h\"\n#endif\n#elif defined(_WIN32)\n#ifdef TGVOIP_WINXP_COMPAT\n#include \"../os/windows/AudioInputWave.h\"\n#include \"../os/windows/AudioOutputWave.h\"\n#endif\n#include \"../os/windows/AudioInputWASAPI.h\"\n#include \"../os/windows/AudioOutputWASAPI.h\"\n#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__)\n#ifndef WITHOUT_ALSA\n#include \"../os/linux/AudioInputALSA.h\"\n#include \"../os/linux/AudioOutputALSA.h\"\n#endif\n#ifndef WITHOUT_PULSE\n#include \"../os/linux/AudioPulse.h\"\n#endif\n#else\n#error \"Unsupported operating system\"\n#endif\n\nusing namespace tgvoip;\nusing namespace tgvoip::audio;\nusing namespace std;\n\nshared_ptr<AudioIO> AudioIO::Create(){\n\tstd::string inputDevice=\"default\", outputDevice=\"default\";\n#if defined(TGVOIP_USE_CALLBACK_AUDIO_IO)\n\treturn std::make_shared<AudioIOCallback>();\n#elif defined(__ANDROID__)\n\treturn std::make_shared<ContextlessAudioIO<AudioInputAndroid, AudioOutputAndroid>>();\n#elif defined(__APPLE__)\n#if TARGET_OS_OSX\n\tif(kCFCoreFoundationVersionNumber<kCFCoreFoundationVersionNumber10_7)\n\t\treturn std::make_shared<ContextlessAudioIO<AudioInputAudioUnitLegacy, AudioOutputAudioUnitLegacy>>(inputDevice, outputDevice);\n\n#endif\n\treturn std::make_shared<AudioUnitIO>();\n#elif defined(_WIN32)\n#ifdef TGVOIP_WINXP_COMPAT\n\tif(LOBYTE(LOWORD(GetVersion()))<6)\n\t\treturn std::make_shared<ContextlessAudioIO<AudioInputWave, AudioOutputWave>>(inputDevice, outputDevice);\n#endif\n\treturn std::make_shared<ContextlessAudioIO<AudioInputWASAPI, AudioOutputWASAPI>>(inputDevice, outputDevice);\n#elif defined(__linux__)\n#ifndef WITHOUT_ALSA\n#ifndef WITHOUT_PULSE\n\tif(AudioPulse::Load()){\n\t\tstd::shared_ptr<AudioIO> io=std::make_shared<AudioPulse>(inputDevice, outputDevice);\n\t\tif(!io->Failed() && io->GetInput()->IsInitialized() && io->GetOutput()->IsInitialized())\n\t\t\treturn io;\n\t\tLOGW(\"PulseAudio available but not working; trying ALSA\");\n\t}\n#endif\n\treturn std::make_shared<ContextlessAudioIO<AudioInputALSA, AudioOutputALSA>>(inputDevice, outputDevice);\n#else\n\treturn std::make_shared<AudioPulse>(inputDevice, outputDevice);\n#endif\n#endif\n}\n\nbool AudioIO::Failed(){\n\treturn failed;\n}\n\nstd::string AudioIO::GetErrorDescription(){\n\treturn error;\n}\n"
  },
  {
    "path": "libtgvoip-public/audio/AudioIO.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n\n#ifndef LIBTGVOIP_AUDIOIO_H\n#define LIBTGVOIP_AUDIOIO_H\n\n#include \"AudioInput.h\"\n#include \"AudioOutput.h\"\n#include \"../utils.h\"\n#include <memory>\n#include <string>\n\nnamespace tgvoip{\n\tnamespace audio {\n\t\tclass AudioIO{\n\t\tpublic:\n\t\t\tAudioIO(){};\n\t\t\tvirtual ~AudioIO(){};\n\t\t\tTGVOIP_DISALLOW_COPY_AND_ASSIGN(AudioIO);\n\t\t\tstatic std::shared_ptr<AudioIO> Create();\n\t\t\tvirtual AudioInput* GetInput()=0;\n\t\t\tvirtual AudioOutput* GetOutput()=0;\n\t\t\tbool Failed();\n\t\t\tstd::string GetErrorDescription();\n\t\tprotected:\n\t\t\tbool failed=false;\n\t\t\tstd::string error;\n\t\t};\n\t\t\n\t\ttemplate<class I, class O> class ContextlessAudioIO : public AudioIO{\n\t\tpublic:\n\t\t\tContextlessAudioIO(){\n\t\t\t\tinput=new I();\n\t\t\t\toutput=new O();\n\t\t\t}\n\n\t\t\tContextlessAudioIO(std::string inputDeviceID, std::string outputDeviceID){\n\t\t\t\tinput=new I(inputDeviceID);\n\t\t\t\toutput=new O(outputDeviceID);\n\t\t\t}\n\t\t\t\n\t\t\tvirtual ~ContextlessAudioIO(){\n\t\t\t\tdelete input;\n\t\t\t\tdelete output;\n\t\t\t}\n\t\t\t\n\t\t\tvirtual AudioInput* GetInput(){\n\t\t\t\treturn input;\n\t\t\t}\n\t\t\t\n\t\t\tvirtual AudioOutput* GetOutput(){\n\t\t\t\treturn output;\n\t\t\t}\n\t\tprivate:\n\t\t\tI* input;\n\t\t\tO* output;\n\t\t};\n\t}\n}\n\n#endif //LIBTGVOIP_AUDIOIO_H\n"
  },
  {
    "path": "libtgvoip-public/audio/AudioInput.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"AudioInput.h\"\n#include \"../logging.h\"\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#if defined(TGVOIP_USE_CALLBACK_AUDIO_IO)\n// nothing\n#elif defined(__ANDROID__)\n#include \"../os/android/AudioInputAndroid.h\"\n#elif defined(__APPLE__)\n#include <TargetConditionals.h>\n#include \"../os/darwin/AudioInputAudioUnit.h\"\n#if TARGET_OS_OSX\n#include \"../os/darwin/AudioInputAudioUnitOSX.h\"\n#endif\n#elif defined(_WIN32)\n#ifdef TGVOIP_WINXP_COMPAT\n#include \"../os/windows/AudioInputWave.h\"\n#endif\n#include \"../os/windows/AudioInputWASAPI.h\"\n#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__)\n#ifndef WITHOUT_ALSA\n#include \"../os/linux/AudioInputALSA.h\"\n#endif\n#ifndef WITHOUT_PULSE\n#include \"../os/linux/AudioPulse.h\"\n#endif\n#else\n#error \"Unsupported operating system\"\n#endif\n\nusing namespace tgvoip;\nusing namespace tgvoip::audio;\n\nint32_t AudioInput::estimatedDelay=60;\n\nAudioInput::AudioInput() : currentDevice(\"default\"){\n\tfailed=false;\n}\n\nAudioInput::AudioInput(std::string deviceID) : currentDevice(deviceID){\n\tfailed=false;\n}\n\n\nAudioInput::~AudioInput(){\n\n}\n\nbool AudioInput::IsInitialized(){\n\treturn !failed;\n}\n\nvoid AudioInput::EnumerateDevices(std::vector<AudioInputDevice>& devs){\n#if defined(TGVOIP_USE_CALLBACK_AUDIO_IO)\n\t// not supported\n#elif defined(__APPLE__) && TARGET_OS_OSX\n\tAudioInputAudioUnitLegacy::EnumerateDevices(devs);\n#elif defined(_WIN32)\n#ifdef TGVOIP_WINXP_COMPAT\n\tif(LOBYTE(LOWORD(GetVersion()))<6){\n\t\tAudioInputWave::EnumerateDevices(devs);\n\t\treturn;\n\t}\n#endif\n\tAudioInputWASAPI::EnumerateDevices(devs);\n#elif defined(__linux__) && !defined(__ANDROID__)\n#if !defined(WITHOUT_PULSE) && !defined(WITHOUT_ALSA)\n\tif(!AudioInputPulse::EnumerateDevices(devs))\n\t\tAudioInputALSA::EnumerateDevices(devs);\n#elif defined(WITHOUT_PULSE)\n\tAudioInputALSA::EnumerateDevices(devs);\n#else\n\tAudioInputPulse::EnumerateDevices(devs)\n#endif\n#endif\n}\n\nstd::string AudioInput::GetCurrentDevice(){\n\treturn currentDevice;\n}\n\nvoid AudioInput::SetCurrentDevice(std::string deviceID){\n\t\n}\n\nint32_t AudioInput::GetEstimatedDelay(){\n\treturn estimatedDelay;\n}\n"
  },
  {
    "path": "libtgvoip-public/audio/AudioInput.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_AUDIOINPUT_H\n#define LIBTGVOIP_AUDIOINPUT_H\n\n#include <stdint.h>\n#include <vector>\n#include <string>\n#include \"../MediaStreamItf.h\"\n\nnamespace tgvoip{\n\nclass AudioInputDevice;\nclass AudioOutputDevice;\n\t\nnamespace audio{\nclass AudioInput : public MediaStreamItf{\npublic:\n\tAudioInput();\n\tAudioInput(std::string deviceID);\n\tvirtual ~AudioInput();\n\n\tbool IsInitialized();\n\tvirtual std::string GetCurrentDevice();\n\tvirtual void SetCurrentDevice(std::string deviceID);\n\t//static AudioInput* Create(std::string deviceID, void* platformSpecific);\n\tstatic void EnumerateDevices(std::vector<AudioInputDevice>& devs);\n\tstatic int32_t GetEstimatedDelay();\n\nprotected:\n\tstd::string currentDevice;\n\tbool failed;\n\tstatic int32_t estimatedDelay;\n};\n}}\n\n#endif //LIBTGVOIP_AUDIOINPUT_H\n"
  },
  {
    "path": "libtgvoip-public/audio/AudioOutput.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"AudioOutput.h\"\n#include \"../logging.h\"\n#include <stdlib.h>\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#if defined(TGVOIP_USE_CALLBACK_AUDIO_IO)\n// nothing\n#elif defined(__ANDROID__)\n#include \"../os/android/AudioOutputOpenSLES.h\"\n#include \"../os/android/AudioOutputAndroid.h\"\n#include <sys/system_properties.h>\n#elif defined(__APPLE__)\n#include <TargetConditionals.h>\n#include \"../os/darwin/AudioOutputAudioUnit.h\"\n#if TARGET_OS_OSX\n#include \"../os/darwin/AudioOutputAudioUnitOSX.h\"\n#endif\n#elif defined(_WIN32)\n#ifdef TGVOIP_WINXP_COMPAT\n#include \"../os/windows/AudioOutputWave.h\"\n#endif\n#include \"../os/windows/AudioOutputWASAPI.h\"\n#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__)\n#ifndef WITHOUT_ALSA\n#include \"../os/linux/AudioOutputALSA.h\"\n#endif\n#ifndef WITHOUT_PULSE\n#include \"../os/linux/AudioOutputPulse.h\"\n#include \"../os/linux/AudioPulse.h\"\n#endif\n#else\n#error \"Unsupported operating system\"\n#endif\n\nusing namespace tgvoip;\nusing namespace tgvoip::audio;\n\nint32_t AudioOutput::estimatedDelay=60;\n\nAudioOutput::AudioOutput() : currentDevice(\"default\"){\n\tfailed=false;\n}\n\nAudioOutput::AudioOutput(std::string deviceID) : currentDevice(deviceID){\n\tfailed=false;\n}\n\nAudioOutput::~AudioOutput(){\n\n}\n\n\nint32_t AudioOutput::GetEstimatedDelay(){\n#if defined(__ANDROID__)\n\tchar sdkNum[PROP_VALUE_MAX];\n\t__system_property_get(\"ro.build.version.sdk\", sdkNum);\n\tint systemVersion=atoi(sdkNum);\n\treturn systemVersion<21 ? 150 : 50;\n#endif\n\treturn estimatedDelay;\n}\n\n\nvoid AudioOutput::EnumerateDevices(std::vector<AudioOutputDevice>& devs){\n#if defined(TGVOIP_USE_CALLBACK_AUDIO_IO)\n\t// not supported\n#elif defined(__APPLE__) && TARGET_OS_OSX\n\tAudioOutputAudioUnitLegacy::EnumerateDevices(devs);\n#elif defined(_WIN32)\n#ifdef TGVOIP_WINXP_COMPAT\n\tif(LOBYTE(LOWORD(GetVersion()))<6){\n\t\tAudioOutputWave::EnumerateDevices(devs);\n\t\treturn;\n\t}\n#endif\n\tAudioOutputWASAPI::EnumerateDevices(devs);\n#elif defined(__linux__) && !defined(__ANDROID__)\n#if !defined(WITHOUT_PULSE) && !defined(WITHOUT_ALSA)\n\tif(!AudioOutputPulse::EnumerateDevices(devs))\n\t\tAudioOutputALSA::EnumerateDevices(devs);\n#elif defined(WITHOUT_PULSE)\n\tAudioOutputALSA::EnumerateDevices(devs);\n#else\n\tAudioOutputPulse::EnumerateDevices(devs)\n#endif\n#endif\n}\n\n\nstd::string AudioOutput::GetCurrentDevice(){\n\treturn currentDevice;\n}\n\nvoid AudioOutput::SetCurrentDevice(std::string deviceID){\n\t\n}\n\nbool AudioOutput::IsInitialized(){\n\treturn !failed;\n}\n"
  },
  {
    "path": "libtgvoip-public/audio/AudioOutput.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_AUDIOOUTPUT_H\n#define LIBTGVOIP_AUDIOOUTPUT_H\n\n#include <stdint.h>\n#include <string>\n#include <vector>\n#include <memory>\n#include \"../MediaStreamItf.h\"\n\nnamespace tgvoip{\n\nclass AudioInputDevice;\nclass AudioOutputDevice;\n\t\nnamespace audio{\nclass AudioOutput : public MediaStreamItf{\npublic:\n\tAudioOutput();\n\tAudioOutput(std::string deviceID);\n\tvirtual ~AudioOutput();\n\tvirtual bool IsPlaying()=0;\n\tstatic int32_t GetEstimatedDelay();\n\tvirtual std::string GetCurrentDevice();\n\tvirtual void SetCurrentDevice(std::string deviceID);\n\t//static std::unique_ptr<AudioOutput> Create(std::string deviceID, void* platformSpecific);\n\tstatic void EnumerateDevices(std::vector<AudioOutputDevice>& devs);\n\tbool IsInitialized();\n\nprotected:\n\tstd::string currentDevice;\n\tbool failed;\n\tstatic int32_t estimatedDelay;\n};\n}}\n\n#endif //LIBTGVOIP_AUDIOOUTPUT_H\n"
  },
  {
    "path": "libtgvoip-public/audio/Resampler.cpp",
    "content": "//\n// Created by Grishka on 01.04.17.\n//\n\n#include <math.h>\n#include <string.h>\n#include \"Resampler.h\"\n\nusing namespace tgvoip::audio;\nstatic const int16_t hann[960]={\n\t\t0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0002, 0x0003, 0x0004, 0x0006, 0x0007, 0x0009, 0x000B, 0x000D, 0x000F, 0x0011, 0x0014, 0x0016, 0x0019, 0x001C, 0x0020,\n\t\t0x0023, 0x0027, 0x002A, 0x002E, 0x0033, 0x0037, 0x003B, 0x0040, 0x0045, 0x004A, 0x004F, 0x0054, 0x005A, 0x0060, 0x0065, 0x006B, 0x0072, 0x0078, 0x007F, 0x0085,\n\t\t0x008C, 0x0093, 0x009B, 0x00A2, 0x00AA, 0x00B2, 0x00B9, 0x00C2, 0x00CA, 0x00D2, 0x00DB, 0x00E4, 0x00ED, 0x00F6, 0x00FF, 0x0109, 0x0113, 0x011C, 0x0127, 0x0131,\n\t\t0x013B, 0x0146, 0x0150, 0x015B, 0x0166, 0x0172, 0x017D, 0x0189, 0x0194, 0x01A0, 0x01AC, 0x01B9, 0x01C5, 0x01D2, 0x01DF, 0x01EC, 0x01F9, 0x0206, 0x0213, 0x0221,\n\t\t0x022F, 0x023D, 0x024B, 0x0259, 0x0268, 0x0276, 0x0285, 0x0294, 0x02A3, 0x02B3, 0x02C2, 0x02D2, 0x02E2, 0x02F2, 0x0302, 0x0312, 0x0323, 0x0333, 0x0344, 0x0355,\n\t\t0x0366, 0x0378, 0x0389, 0x039B, 0x03AD, 0x03BF, 0x03D1, 0x03E3, 0x03F6, 0x0408, 0x041B, 0x042E, 0x0441, 0x0455, 0x0468, 0x047C, 0x0490, 0x04A4, 0x04B8, 0x04CC,\n\t\t0x04E0, 0x04F5, 0x050A, 0x051F, 0x0534, 0x0549, 0x055F, 0x0574, 0x058A, 0x05A0, 0x05B6, 0x05CC, 0x05E2, 0x05F9, 0x0610, 0x0627, 0x063E, 0x0655, 0x066C, 0x0684,\n\t\t0x069B, 0x06B3, 0x06CB, 0x06E3, 0x06FC, 0x0714, 0x072D, 0x0745, 0x075E, 0x0777, 0x0791, 0x07AA, 0x07C3, 0x07DD, 0x07F7, 0x0811, 0x082B, 0x0845, 0x0860, 0x087A,\n\t\t0x0895, 0x08B0, 0x08CB, 0x08E6, 0x0902, 0x091D, 0x0939, 0x0955, 0x0971, 0x098D, 0x09A9, 0x09C6, 0x09E2, 0x09FF, 0x0A1C, 0x0A39, 0x0A56, 0x0A73, 0x0A91, 0x0AAE,\n\t\t0x0ACC, 0x0AEA, 0x0B08, 0x0B26, 0x0B44, 0x0B63, 0x0B81, 0x0BA0, 0x0BBF, 0x0BDE, 0x0BFD, 0x0C1D, 0x0C3C, 0x0C5C, 0x0C7B, 0x0C9B, 0x0CBB, 0x0CDC, 0x0CFC, 0x0D1C,\n\t\t0x0D3D, 0x0D5E, 0x0D7F, 0x0DA0, 0x0DC1, 0x0DE2, 0x0E04, 0x0E25, 0x0E47, 0x0E69, 0x0E8B, 0x0EAD, 0x0ECF, 0x0EF1, 0x0F14, 0x0F37, 0x0F59, 0x0F7C, 0x0F9F, 0x0FC2,\n\t\t0x0FE6, 0x1009, 0x102D, 0x1051, 0x1074, 0x1098, 0x10BC, 0x10E1, 0x1105, 0x112A, 0x114E, 0x1173, 0x1198, 0x11BD, 0x11E2, 0x1207, 0x122D, 0x1252, 0x1278, 0x129D,\n\t\t0x12C3, 0x12E9, 0x130F, 0x1336, 0x135C, 0x1383, 0x13A9, 0x13D0, 0x13F7, 0x141E, 0x1445, 0x146C, 0x1494, 0x14BB, 0x14E3, 0x150A, 0x1532, 0x155A, 0x1582, 0x15AA,\n\t\t0x15D3, 0x15FB, 0x1623, 0x164C, 0x1675, 0x169E, 0x16C7, 0x16F0, 0x1719, 0x1742, 0x176C, 0x1795, 0x17BF, 0x17E9, 0x1813, 0x183D, 0x1867, 0x1891, 0x18BB, 0x18E6,\n\t\t0x1910, 0x193B, 0x1965, 0x1990, 0x19BB, 0x19E6, 0x1A11, 0x1A3D, 0x1A68, 0x1A93, 0x1ABF, 0x1AEB, 0x1B17, 0x1B42, 0x1B6E, 0x1B9A, 0x1BC7, 0x1BF3, 0x1C1F, 0x1C4C,\n\t\t0x1C78, 0x1CA5, 0x1CD2, 0x1CFF, 0x1D2C, 0x1D59, 0x1D86, 0x1DB3, 0x1DE0, 0x1E0E, 0x1E3B, 0x1E69, 0x1E97, 0x1EC4, 0x1EF2, 0x1F20, 0x1F4E, 0x1F7C, 0x1FAB, 0x1FD9,\n\t\t0x2007, 0x2036, 0x2065, 0x2093, 0x20C2, 0x20F1, 0x2120, 0x214F, 0x217E, 0x21AD, 0x21DD, 0x220C, 0x223B, 0x226B, 0x229A, 0x22CA, 0x22FA, 0x232A, 0x235A, 0x238A,\n\t\t0x23BA, 0x23EA, 0x241A, 0x244B, 0x247B, 0x24AB, 0x24DC, 0x250D, 0x253D, 0x256E, 0x259F, 0x25D0, 0x2601, 0x2632, 0x2663, 0x2694, 0x26C5, 0x26F7, 0x2728, 0x275A,\n\t\t0x278B, 0x27BD, 0x27EE, 0x2820, 0x2852, 0x2884, 0x28B6, 0x28E8, 0x291A, 0x294C, 0x297E, 0x29B0, 0x29E3, 0x2A15, 0x2A47, 0x2A7A, 0x2AAC, 0x2ADF, 0x2B12, 0x2B44,\n\t\t0x2B77, 0x2BAA, 0x2BDD, 0x2C10, 0x2C43, 0x2C76, 0x2CA9, 0x2CDC, 0x2D0F, 0x2D43, 0x2D76, 0x2DA9, 0x2DDD, 0x2E10, 0x2E44, 0x2E77, 0x2EAB, 0x2EDF, 0x2F12, 0x2F46,\n\t\t0x2F7A, 0x2FAE, 0x2FE2, 0x3016, 0x304A, 0x307E, 0x30B2, 0x30E6, 0x311A, 0x314E, 0x3182, 0x31B7, 0x31EB, 0x321F, 0x3254, 0x3288, 0x32BD, 0x32F1, 0x3326, 0x335A,\n\t\t0x338F, 0x33C3, 0x33F8, 0x342D, 0x3461, 0x3496, 0x34CB, 0x3500, 0x3535, 0x356A, 0x359F, 0x35D4, 0x3608, 0x363D, 0x3673, 0x36A8, 0x36DD, 0x3712, 0x3747, 0x377C,\n\t\t0x37B1, 0x37E6, 0x381C, 0x3851, 0x3886, 0x38BB, 0x38F1, 0x3926, 0x395B, 0x3991, 0x39C6, 0x39FC, 0x3A31, 0x3A66, 0x3A9C, 0x3AD1, 0x3B07, 0x3B3C, 0x3B72, 0x3BA7,\n\t\t0x3BDD, 0x3C12, 0x3C48, 0x3C7D, 0x3CB3, 0x3CE9, 0x3D1E, 0x3D54, 0x3D89, 0x3DBF, 0x3DF5, 0x3E2A, 0x3E60, 0x3E95, 0x3ECB, 0x3F01, 0x3F36, 0x3F6C, 0x3FA2, 0x3FD7,\n\t\t0x400D, 0x4043, 0x4078, 0x40AE, 0x40E3, 0x4119, 0x414F, 0x4184, 0x41BA, 0x41F0, 0x4225, 0x425B, 0x4290, 0x42C6, 0x42FC, 0x4331, 0x4367, 0x439C, 0x43D2, 0x4407,\n\t\t0x443D, 0x4472, 0x44A8, 0x44DD, 0x4513, 0x4548, 0x457E, 0x45B3, 0x45E9, 0x461E, 0x4654, 0x4689, 0x46BE, 0x46F4, 0x4729, 0x475E, 0x4793, 0x47C9, 0x47FE, 0x4833,\n\t\t0x4868, 0x489E, 0x48D3, 0x4908, 0x493D, 0x4972, 0x49A7, 0x49DC, 0x4A11, 0x4A46, 0x4A7B, 0x4AB0, 0x4AE5, 0x4B1A, 0x4B4E, 0x4B83, 0x4BB8, 0x4BED, 0x4C21, 0x4C56,\n\t\t0x4C8B, 0x4CBF, 0x4CF4, 0x4D28, 0x4D5D, 0x4D91, 0x4DC6, 0x4DFA, 0x4E2E, 0x4E63, 0x4E97, 0x4ECB, 0x4EFF, 0x4F33, 0x4F67, 0x4F9B, 0x4FCF, 0x5003, 0x5037, 0x506B,\n\t\t0x509F, 0x50D3, 0x5106, 0x513A, 0x516E, 0x51A1, 0x51D5, 0x5208, 0x523C, 0x526F, 0x52A3, 0x52D6, 0x5309, 0x533C, 0x536F, 0x53A3, 0x53D6, 0x5409, 0x543B, 0x546E,\n\t\t0x54A1, 0x54D4, 0x5507, 0x5539, 0x556C, 0x559E, 0x55D1, 0x5603, 0x5636, 0x5668, 0x569A, 0x56CC, 0x56FE, 0x5730, 0x5762, 0x5794, 0x57C6, 0x57F8, 0x5829, 0x585B,\n\t\t0x588D, 0x58BE, 0x58F0, 0x5921, 0x5952, 0x5984, 0x59B5, 0x59E6, 0x5A17, 0x5A48, 0x5A79, 0x5AA9, 0x5ADA, 0x5B0B, 0x5B3B, 0x5B6C, 0x5B9C, 0x5BCD, 0x5BFD, 0x5C2D,\n\t\t0x5C5D, 0x5C8D, 0x5CBD, 0x5CED, 0x5D1D, 0x5D4D, 0x5D7C, 0x5DAC, 0x5DDB, 0x5E0B, 0x5E3A, 0x5E69, 0x5E99, 0x5EC8, 0x5EF7, 0x5F26, 0x5F54, 0x5F83, 0x5FB2, 0x5FE0,\n\t\t0x600F, 0x603D, 0x606B, 0x609A, 0x60C8, 0x60F6, 0x6124, 0x6152, 0x617F, 0x61AD, 0x61DB, 0x6208, 0x6235, 0x6263, 0x6290, 0x62BD, 0x62EA, 0x6317, 0x6344, 0x6370,\n\t\t0x639D, 0x63CA, 0x63F6, 0x6422, 0x644E, 0x647B, 0x64A7, 0x64D3, 0x64FE, 0x652A, 0x6556, 0x6581, 0x65AD, 0x65D8, 0x6603, 0x662E, 0x6659, 0x6684, 0x66AF, 0x66DA,\n\t\t0x6704, 0x672F, 0x6759, 0x6783, 0x67AD, 0x67D7, 0x6801, 0x682B, 0x6855, 0x687E, 0x68A8, 0x68D1, 0x68FB, 0x6924, 0x694D, 0x6976, 0x699F, 0x69C7, 0x69F0, 0x6A18,\n\t\t0x6A41, 0x6A69, 0x6A91, 0x6AB9, 0x6AE1, 0x6B09, 0x6B30, 0x6B58, 0x6B7F, 0x6BA6, 0x6BCE, 0x6BF5, 0x6C1C, 0x6C42, 0x6C69, 0x6C90, 0x6CB6, 0x6CDC, 0x6D03, 0x6D29,\n\t\t0x6D4F, 0x6D74, 0x6D9A, 0x6DC0, 0x6DE5, 0x6E0A, 0x6E30, 0x6E55, 0x6E7A, 0x6E9E, 0x6EC3, 0x6EE8, 0x6F0C, 0x6F30, 0x6F55, 0x6F79, 0x6F9D, 0x6FC0, 0x6FE4, 0x7008,\n\t\t0x702B, 0x704E, 0x7071, 0x7094, 0x70B7, 0x70DA, 0x70FC, 0x711F, 0x7141, 0x7163, 0x7185, 0x71A7, 0x71C9, 0x71EB, 0x720C, 0x722E, 0x724F, 0x7270, 0x7291, 0x72B2,\n\t\t0x72D2, 0x72F3, 0x7313, 0x7333, 0x7354, 0x7374, 0x7393, 0x73B3, 0x73D3, 0x73F2, 0x7411, 0x7430, 0x744F, 0x746E, 0x748D, 0x74AB, 0x74CA, 0x74E8, 0x7506, 0x7524,\n\t\t0x7542, 0x7560, 0x757D, 0x759B, 0x75B8, 0x75D5, 0x75F2, 0x760F, 0x762B, 0x7648, 0x7664, 0x7680, 0x769C, 0x76B8, 0x76D4, 0x76F0, 0x770B, 0x7726, 0x7741, 0x775C,\n\t\t0x7777, 0x7792, 0x77AC, 0x77C7, 0x77E1, 0x77FB, 0x7815, 0x782F, 0x7848, 0x7862, 0x787B, 0x7894, 0x78AD, 0x78C6, 0x78DF, 0x78F7, 0x7910, 0x7928, 0x7940, 0x7958,\n\t\t0x7970, 0x7987, 0x799F, 0x79B6, 0x79CD, 0x79E4, 0x79FB, 0x7A11, 0x7A28, 0x7A3E, 0x7A54, 0x7A6A, 0x7A80, 0x7A96, 0x7AAB, 0x7AC1, 0x7AD6, 0x7AEB, 0x7B00, 0x7B14,\n\t\t0x7B29, 0x7B3D, 0x7B51, 0x7B65, 0x7B79, 0x7B8D, 0x7BA1, 0x7BB4, 0x7BC7, 0x7BDA, 0x7BED, 0x7C00, 0x7C13, 0x7C25, 0x7C37, 0x7C49, 0x7C5B, 0x7C6D, 0x7C7F, 0x7C90,\n\t\t0x7CA1, 0x7CB2, 0x7CC3, 0x7CD4, 0x7CE5, 0x7CF5, 0x7D05, 0x7D15, 0x7D25, 0x7D35, 0x7D45, 0x7D54, 0x7D63, 0x7D72, 0x7D81, 0x7D90, 0x7D9F, 0x7DAD, 0x7DBB, 0x7DC9,\n\t\t0x7DD7, 0x7DE5, 0x7DF2, 0x7E00, 0x7E0D, 0x7E1A, 0x7E27, 0x7E34, 0x7E40, 0x7E4C, 0x7E59, 0x7E65, 0x7E71, 0x7E7C, 0x7E88, 0x7E93, 0x7E9E, 0x7EA9, 0x7EB4, 0x7EBF,\n\t\t0x7EC9, 0x7ED3, 0x7EDE, 0x7EE7, 0x7EF1, 0x7EFB, 0x7F04, 0x7F0E, 0x7F17, 0x7F20, 0x7F28, 0x7F31, 0x7F39, 0x7F41, 0x7F4A, 0x7F51, 0x7F59, 0x7F61, 0x7F68, 0x7F6F,\n\t\t0x7F76, 0x7F7D, 0x7F84, 0x7F8A, 0x7F90, 0x7F97, 0x7F9D, 0x7FA2, 0x7FA8, 0x7FAD, 0x7FB3, 0x7FB8, 0x7FBD, 0x7FC1, 0x7FC6, 0x7FCA, 0x7FCF, 0x7FD3, 0x7FD6, 0x7FDA,\n\t\t0x7FDE, 0x7FE1, 0x7FE4, 0x7FE7, 0x7FEA, 0x7FED, 0x7FEF, 0x7FF1, 0x7FF3, 0x7FF5, 0x7FF7, 0x7FF9, 0x7FFA, 0x7FFB, 0x7FFC, 0x7FFD, 0x7FFE, 0x7FFE, 0x7FFF, 0x7FFF\n};\n\n#define MIN(a, b) (a<b ? a : b)\n\nsize_t Resampler::Convert48To44(int16_t *from, int16_t *to, size_t fromLen, size_t toLen){\n\tsize_t outLen=fromLen*147/160;\n\tif(toLen<outLen)\n\t\toutLen=toLen;\n\tunsigned int offset;\n\tfor(offset=0;offset<outLen;offset++){\n\t\tfloat offsetf=offset*160.0f/147.0f;\n\t\tfloat factor=offsetf-floorf(offsetf);\n\t\tto[offset]=(int16_t)((from[(int)floorf(offsetf)]*(1-factor))+(from[(int)ceilf(offsetf)]*(factor)));\n\t}\n\treturn outLen;\n}\n\nsize_t Resampler::Convert44To48(int16_t *from, int16_t *to, size_t fromLen, size_t toLen){\n\tsize_t outLen=fromLen*160/147;\n\tif(toLen<outLen)\n\t\toutLen=toLen;\n\tunsigned int offset;\n\tfor(offset=0;offset<outLen;offset++){\n\t\tfloat offsetf=offset*147.0f/160.0f;\n\t\tfloat factor=offsetf-floorf(offsetf);\n\t\tto[offset]=(int16_t)((from[(int)floorf(offsetf)]*(1-factor))+(from[(int)ceilf(offsetf)]*(factor)));\n\t}\n\treturn outLen;\n}\n\n\nsize_t Resampler::Convert(int16_t *from, int16_t *to, size_t fromLen, size_t toLen, int num, int denom){\n\tsize_t outLen=fromLen*num/denom;\n\tif(toLen<outLen)\n\t\toutLen=toLen;\n\tunsigned int offset;\n\tfor(offset=0;offset<outLen;offset++){\n\t\tfloat offsetf=offset*(float)denom/(float)num;\n\t\tfloat factor=offsetf-floorf(offsetf);\n\t\tto[offset]=(int16_t)((from[(int)floorf(offsetf)]*(1-factor))+(from[(int)ceilf(offsetf)]*(factor)));\n\t}\n\treturn outLen;\n}\n\nvoid Resampler::Rescale60To80(int16_t *in, int16_t *out){\n\tmemcpy(out, in, 960*2);\n\tmemcpy(out+960*3, in+960*2, 960*2);\n\tfor(int i=0;i<960;i++){\n\t\tout[960+i]=(int16_t)(((int32_t)in[960+i]*hann[959-i]) >> 15) + (int16_t)(((int32_t)in[480+i]*hann[i]) >> 15);\n\t\tout[1920+i]=(int16_t)(((int32_t)in[960+480+i]*hann[959-i]) >> 15) + (int16_t)(((int32_t)in[960+i]*hann[i]) >> 15);\n\t}\n}\n\nvoid Resampler::Rescale60To40(int16_t *in, int16_t *out){\n\tfor(int i=0;i<960;i++){\n\t\tout[i]=(int16_t)(((int32_t)in[i]*hann[959-i]) >> 15) + (int16_t)(((int32_t)in[480+i]*hann[i]) >> 15);\n\t\tout[960+i]=(int16_t)(((int32_t)in[1920+i]*hann[i]) >> 15) + (int16_t)(((int32_t)in[1440+i]*hann[959-i]) >> 15);\n\t}\n}\n"
  },
  {
    "path": "libtgvoip-public/audio/Resampler.h",
    "content": "//\n// Created by Grishka on 01.04.17.\n//\n\n#ifndef LIBTGVOIP_RESAMPLER_H\n#define LIBTGVOIP_RESAMPLER_H\n\n#include <stdlib.h>\n#include <stdint.h>\n\nnamespace tgvoip{ namespace audio{\n\tclass Resampler{\n\tpublic:\n\t\tstatic size_t Convert48To44(int16_t* from, int16_t* to, size_t fromLen, size_t toLen);\n\t\tstatic size_t Convert44To48(int16_t* from, int16_t* to, size_t fromLen, size_t toLen);\n\t\tstatic size_t Convert(int16_t* from, int16_t* to, size_t fromLen, size_t toLen, int num, int denom);\n\t\tstatic void Rescale60To80(int16_t* in, int16_t* out);\n\t\tstatic void Rescale60To40(int16_t* in, int16_t* out);\n\t};\n}}\n\n#endif //LIBTGVOIP_RESAMPLER_H\n"
  },
  {
    "path": "libtgvoip-public/libtgvoip.WP81.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|ARM\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{21f10158-c078-4bd7-a82a-9c4aeb8e2f8e}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <ProjectName>libtgvoip</ProjectName>\r\n    <RootNamespace>libtgvoip</RootNamespace>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\r\n    <AppContainerApplication>true</AppContainerApplication>\r\n    <ApplicationType>Windows Phone Silverlight</ApplicationType>\r\n    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;TGVOIP_WP_SILVERLIGHT;_CRT_SECURE_NO_WARNINGS;NOMINMAX;WEBRTC_APM_DEBUG_DUMP=0;TGVOIP_USE_CUSTOM_CRYPTO;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n      <AdditionalIncludeDirectories>webrtc_dsp;../TelegramClient.Opus/opus/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <AdditionalDependencies>ws2_32.lib;phoneaudioses.lib;../$(Platform)/$(Configuration)/TelegramClient.Opus/TelegramClient.Opus.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;TGVOIP_WP_SILVERLIGHT;NDEBUG;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n      <AdditionalIncludeDirectories>webrtc_dsp;../TelegramClient.Opus/opus/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <AdditionalDependencies>ws2_32.lib;phoneaudioses.lib;../$(Platform)/$(Configuration)/TelegramClient.Opus/TelegramClient.Opus.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;TGVOIP_WP_SILVERLIGHT;_CRT_SECURE_NO_WARNINGS;NOMINMAX;WEBRTC_APM_DEBUG_DUMP=0;TGVOIP_USE_CUSTOM_CRYPTO;noexcept=;_ALLOW_KEYWORD_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n      <AdditionalIncludeDirectories>webrtc_dsp;../TelegramClient.Opus/opus/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <DisableSpecificWarnings>4068;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <AdditionalDependencies>ws2_32.lib;phoneaudioses.lib;../$(Platform)/$(Configuration)/TelegramClient.Opus/TelegramClient.Opus.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <PreprocessorDefinitions>_WINRT_DLL;TGVOIP_WP_SILVERLIGHT;NDEBUG;_CRT_SECURE_NO_WARNINGS;NOMINMAX;WEBRTC_APM_DEBUG_DUMP=0;TGVOIP_USE_CUSTOM_CRYPTO;noexcept=;_ALLOW_KEYWORD_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n      <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>\r\n      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r\n      <SDLCheck>true</SDLCheck>\r\n      <AdditionalIncludeDirectories>webrtc_dsp;../TelegramClient.Opus/opus/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <RuntimeTypeInfo>true</RuntimeTypeInfo>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <AdditionalDependencies>ws2_32.lib;phoneaudioses.lib;../$(Platform)/$(Configuration)/TelegramClient.Opus/TelegramClient.Opus.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"audio\\AudioInput.h\" />\r\n    <ClInclude Include=\"audio\\AudioIO.h\" />\r\n    <ClInclude Include=\"audio\\AudioOutput.h\" />\r\n    <ClInclude Include=\"audio\\Resampler.h\" />\r\n    <ClInclude Include=\"BlockingQueue.h\" />\r\n    <ClInclude Include=\"Buffers.h\" />\r\n    <ClInclude Include=\"CongestionControl.h\" />\r\n    <ClInclude Include=\"EchoCanceller.h\" />\r\n    <ClInclude Include=\"JitterBuffer.h\" />\r\n    <ClInclude Include=\"logging.h\" />\r\n    <ClInclude Include=\"MediaStreamItf.h\" />\r\n    <ClInclude Include=\"MessageThread.h\" />\r\n    <ClInclude Include=\"NetworkSocket.h\" />\r\n    <ClInclude Include=\"OpusDecoder.h\" />\r\n    <ClInclude Include=\"OpusEncoder.h\" />\r\n    <ClInclude Include=\"os\\windows\\AudioInputWASAPI.h\" />\r\n    <ClInclude Include=\"os\\windows\\AudioOutputWASAPI.h\" />\r\n    <ClInclude Include=\"os\\windows\\NetworkSocketWinsock.h\" />\r\n    <ClInclude Include=\"os\\windows\\WindowsSandboxUtils.h\" />\r\n    <ClInclude Include=\"PacketReassembler.h\" />\r\n    <ClInclude Include=\"PrivateDefines.h\" />\r\n    <ClInclude Include=\"threading.h\" />\r\n    <ClInclude Include=\"utils.h\" />\r\n    <ClInclude Include=\"VoIPController.h\" />\r\n    <ClInclude Include=\"os\\windows\\CXWrapper.h\" />\r\n    <ClInclude Include=\"VoIPServerConfig.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\array_view.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\atomicops.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\basictypes.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\checks.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\constructormagic.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\safe_compare.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\safe_conversions.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\safe_conversions_impl.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\sanitizer.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\stringutils.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\type_traits.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\channel_buffer.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\fft4g.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\include\\audio_util.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\ring_buffer.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\complex_fft_tables.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\include\\real_fft.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\include\\signal_processing_library.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\include\\spl_inl.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\include\\spl_inl_armv7.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\include\\spl_inl_mips.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample_by_2_internal.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\sparse_fir_filter.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\wav_file.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\wav_header.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\aecm_core.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\aecm_defines.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\echo_control_mobile.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_common.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_core.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_core_optimized_methods.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_resampler.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\echo_cancellation.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\agc\\legacy\\analog_agc.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\agc\\legacy\\digital_agc.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\agc\\legacy\\gain_control.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\logging\\apm_data_dumper.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\defines.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\noise_suppression.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\noise_suppression_x.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\nsx_core.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\nsx_defines.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\ns_core.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\windows_private.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\splitting_filter.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\three_band_filter_bank.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\block_mean_calculator.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\delay_estimator.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\delay_estimator_internal.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\delay_estimator_wrapper.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft_tables_common.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft_tables_neon_sse2.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\system_wrappers\\include\\asm_defines.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\system_wrappers\\include\\compile_assert_c.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\system_wrappers\\include\\cpu_features_wrapper.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\system_wrappers\\include\\metrics.h\" />\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\typedefs.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"audio\\AudioInput.cpp\" />\r\n    <ClCompile Include=\"audio\\AudioIO.cpp\" />\r\n    <ClCompile Include=\"audio\\AudioOutput.cpp\" />\r\n    <ClCompile Include=\"audio\\Resampler.cpp\" />\r\n    <ClCompile Include=\"BlockingQueue.cpp\" />\r\n    <ClCompile Include=\"Buffers.cpp\" />\r\n    <ClCompile Include=\"CongestionControl.cpp\" />\r\n    <ClCompile Include=\"EchoCanceller.cpp\" />\r\n    <ClCompile Include=\"JitterBuffer.cpp\" />\r\n    <ClCompile Include=\"logging.cpp\" />\r\n    <ClCompile Include=\"MediaStreamItf.cpp\" />\r\n    <ClCompile Include=\"MessageThread.cpp\" />\r\n    <ClCompile Include=\"NetworkSocket.cpp\" />\r\n    <ClCompile Include=\"OpusDecoder.cpp\" />\r\n    <ClCompile Include=\"OpusEncoder.cpp\" />\r\n    <ClCompile Include=\"os\\windows\\AudioInputWASAPI.cpp\" />\r\n    <ClCompile Include=\"os\\windows\\AudioOutputWASAPI.cpp\" />\r\n    <ClCompile Include=\"os\\windows\\NetworkSocketWinsock.cpp\" />\r\n    <ClCompile Include=\"os\\windows\\WindowsSandboxUtils.cpp\" />\r\n    <ClCompile Include=\"PacketReassembler.cpp\" />\r\n    <ClCompile Include=\"VoIPController.cpp\" />\r\n    <ClCompile Include=\"os\\windows\\CXWrapper.cpp\" />\r\n    <ClCompile Include=\"VoIPGroupController.cpp\" />\r\n    <ClCompile Include=\"VoIPServerConfig.cpp\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\base\\checks.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\base\\stringutils.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\audio_util.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\channel_buffer.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\fft4g.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\ring_buffer.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\auto_correlation.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\auto_corr_to_refl_coef.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\complex_bit_reverse.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\complex_fft.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\copy_set_operations.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\cross_correlation.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\cross_correlation_neon.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\division_operations.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\dot_product_with_scale.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\downsample_fast.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\downsample_fast_neon.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\energy.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\filter_ar.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\filter_ar_fast_q12.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\filter_ma_fast_q12.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\get_hanning_window.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\get_scaling_square.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\ilbc_specific_functions.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\levinson_durbin.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\lpc_to_refl_coef.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\min_max_operations.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\min_max_operations_neon.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\randomization_functions.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\real_fft.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\refl_coef_to_lpc.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample_48khz.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample_by_2.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample_by_2_internal.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample_fractional.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\splitting_filter_impl.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\spl_init.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\spl_inl.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\spl_sqrt.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\spl_sqrt_floor.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\sqrt_of_one_minus_x_squared.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\vector_scaling_operations.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\sparse_fir_filter.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\wav_file.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\wav_header.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\aecm_core.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\aecm_core_c.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\aecm_core_neon.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\echo_control_mobile.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_core.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_core_neon.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_core_sse2.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_resampler.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\echo_cancellation.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\agc\\legacy\\analog_agc.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\agc\\legacy\\digital_agc.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\logging\\apm_data_dumper.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\noise_suppression.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\noise_suppression_x.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\nsx_core.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\nsx_core_c.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\nsx_core_neon.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\ns_core.c\">\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\splitting_filter.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\three_band_filter_bank.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\block_mean_calculator.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\delay_estimator.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\delay_estimator_wrapper.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft_neon.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft_sse2.cc\" />\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\system_wrappers\\source\\cpu_features.cc\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "libtgvoip-public/libtgvoip.WP81.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup>\r\n    <Filter Include=\"Resources\">\r\n      <UniqueIdentifier>11199e80-17a0-460f-a780-9bfde20eb11c</UniqueIdentifier>\r\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r\n    </Filter>\r\n    <Filter Include=\"audio\">\r\n      <UniqueIdentifier>{c5b75146-c75a-4c56-aeb2-2781658d7b0a}</UniqueIdentifier>\r\n    </Filter>\r\n    <Filter Include=\"windows\">\r\n      <UniqueIdentifier>{de1527d9-7564-4e96-9653-6e023b90d2bc}</UniqueIdentifier>\r\n    </Filter>\r\n    <Filter Include=\"webrtc_dsp\">\r\n      <UniqueIdentifier>{3b15701a-65dd-4d52-92d4-a7b64a73b293}</UniqueIdentifier>\r\n    </Filter>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"VoIPController.cpp\" />\r\n    <ClCompile Include=\"VoIPServerConfig.cpp\" />\r\n    <ClCompile Include=\"BlockingQueue.cpp\" />\r\n    <ClCompile Include=\"CongestionControl.cpp\" />\r\n    <ClCompile Include=\"EchoCanceller.cpp\" />\r\n    <ClCompile Include=\"JitterBuffer.cpp\" />\r\n    <ClCompile Include=\"logging.cpp\" />\r\n    <ClCompile Include=\"MediaStreamItf.cpp\" />\r\n    <ClCompile Include=\"NetworkSocket.cpp\" />\r\n    <ClCompile Include=\"OpusDecoder.cpp\" />\r\n    <ClCompile Include=\"OpusEncoder.cpp\" />\r\n    <ClCompile Include=\"audio\\AudioInput.cpp\">\r\n      <Filter>audio</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"audio\\AudioOutput.cpp\">\r\n      <Filter>audio</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"audio\\Resampler.cpp\">\r\n      <Filter>audio</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"os\\windows\\AudioInputWASAPI.cpp\">\r\n      <Filter>windows</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"os\\windows\\AudioOutputWASAPI.cpp\">\r\n      <Filter>windows</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"os\\windows\\NetworkSocketWinsock.cpp\">\r\n      <Filter>windows</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"os\\windows\\WindowsSandboxUtils.cpp\">\r\n      <Filter>windows</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\base\\checks.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\base\\stringutils.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\audio_util.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\channel_buffer.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\fft4g.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\ring_buffer.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\auto_correlation.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\auto_corr_to_refl_coef.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\complex_bit_reverse.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\complex_fft.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\copy_set_operations.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\cross_correlation.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\cross_correlation_neon.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\division_operations.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\dot_product_with_scale.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\downsample_fast.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\downsample_fast_neon.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\energy.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\filter_ar.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\filter_ar_fast_q12.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\filter_ma_fast_q12.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\get_hanning_window.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\get_scaling_square.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\ilbc_specific_functions.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\levinson_durbin.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\lpc_to_refl_coef.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\min_max_operations.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\min_max_operations_neon.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\randomization_functions.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\real_fft.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\refl_coef_to_lpc.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample_48khz.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample_by_2.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample_by_2_internal.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample_fractional.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\splitting_filter_impl.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\spl_init.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\spl_inl.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\spl_sqrt.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\spl_sqrt_floor.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\sqrt_of_one_minus_x_squared.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\vector_scaling_operations.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\sparse_fir_filter.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\wav_file.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\common_audio\\wav_header.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_core.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_core_neon.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_core_sse2.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_resampler.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\echo_cancellation.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\aecm_core.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\aecm_core_c.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\aecm_core_neon.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\echo_control_mobile.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\agc\\legacy\\analog_agc.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\agc\\legacy\\digital_agc.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\logging\\apm_data_dumper.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\noise_suppression.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\noise_suppression_x.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\nsx_core.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\nsx_core_c.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\nsx_core_neon.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\ns_core.c\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\splitting_filter.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\three_band_filter_bank.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\block_mean_calculator.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\delay_estimator.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\delay_estimator_wrapper.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft_neon.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft_sse2.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"webrtc_dsp\\webrtc\\system_wrappers\\source\\cpu_features.cc\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"os\\windows\\CXWrapper.cpp\">\r\n      <Filter>windows</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"Buffers.cpp\" />\r\n    <ClCompile Include=\"MessageThread.cpp\" />\r\n    <ClCompile Include=\"PacketReassembler.cpp\" />\r\n    <ClCompile Include=\"audio\\AudioIO.cpp\">\r\n      <Filter>audio</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"VoIPGroupController.cpp\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"VoIPController.h\" />\r\n    <ClInclude Include=\"VoIPServerConfig.h\" />\r\n    <ClInclude Include=\"BlockingQueue.h\" />\r\n    <ClInclude Include=\"CongestionControl.h\" />\r\n    <ClInclude Include=\"EchoCanceller.h\" />\r\n    <ClInclude Include=\"JitterBuffer.h\" />\r\n    <ClInclude Include=\"logging.h\" />\r\n    <ClInclude Include=\"MediaStreamItf.h\" />\r\n    <ClInclude Include=\"NetworkSocket.h\" />\r\n    <ClInclude Include=\"OpusDecoder.h\" />\r\n    <ClInclude Include=\"OpusEncoder.h\" />\r\n    <ClInclude Include=\"threading.h\" />\r\n    <ClInclude Include=\"audio\\AudioInput.h\">\r\n      <Filter>audio</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"audio\\AudioOutput.h\">\r\n      <Filter>audio</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"audio\\Resampler.h\">\r\n      <Filter>audio</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"os\\windows\\AudioInputWASAPI.h\">\r\n      <Filter>windows</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"os\\windows\\AudioOutputWASAPI.h\">\r\n      <Filter>windows</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"os\\windows\\NetworkSocketWinsock.h\">\r\n      <Filter>windows</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"os\\windows\\WindowsSandboxUtils.h\">\r\n      <Filter>windows</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\array_view.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\atomicops.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\basictypes.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\checks.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\constructormagic.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\safe_compare.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\safe_conversions.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\safe_conversions_impl.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\sanitizer.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\stringutils.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\base\\type_traits.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\channel_buffer.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\fft4g.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\include\\audio_util.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\ring_buffer.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\complex_fft_tables.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\include\\real_fft.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\include\\signal_processing_library.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\include\\spl_inl.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\include\\spl_inl_armv7.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\include\\spl_inl_mips.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\signal_processing\\resample_by_2_internal.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\sparse_fir_filter.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\wav_file.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\common_audio\\wav_header.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_common.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_core.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_core_optimized_methods.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\aec_resampler.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aec\\echo_cancellation.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\aecm_core.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\aecm_defines.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\aecm\\echo_control_mobile.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\agc\\legacy\\analog_agc.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\agc\\legacy\\digital_agc.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\agc\\legacy\\gain_control.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\logging\\apm_data_dumper.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\defines.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\noise_suppression.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\noise_suppression_x.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\nsx_core.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\nsx_defines.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\ns_core.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\ns\\windows_private.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\splitting_filter.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\three_band_filter_bank.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\block_mean_calculator.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\delay_estimator.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\delay_estimator_internal.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\delay_estimator_wrapper.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft_tables_common.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\modules\\audio_processing\\utility\\ooura_fft_tables_neon_sse2.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\system_wrappers\\include\\asm_defines.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\system_wrappers\\include\\compile_assert_c.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\system_wrappers\\include\\cpu_features_wrapper.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\system_wrappers\\include\\metrics.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"webrtc_dsp\\webrtc\\typedefs.h\">\r\n      <Filter>webrtc_dsp</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"os\\windows\\CXWrapper.h\">\r\n      <Filter>windows</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"Buffers.h\" />\r\n    <ClInclude Include=\"MessageThread.h\" />\r\n    <ClInclude Include=\"PacketReassembler.h\" />\r\n    <ClInclude Include=\"audio\\AudioIO.h\">\r\n      <Filter>audio</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"utils.h\" />\r\n    <ClInclude Include=\"PrivateDefines.h\" />\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "libtgvoip-public/logging.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n\n#include <stdio.h>\n#include <stdarg.h>\n#include <time.h>\n\n#include \"VoIPController.h\"\n\n#ifdef __ANDROID__\n#include <sys/system_properties.h>\n#elif defined(__linux__)\n#include <sys/utsname.h>\n#endif\n\n#ifdef __APPLE__\n#include <TargetConditionals.h>\n#include \"os/darwin/DarwinSpecific.h\"\n#endif\n\nFILE* tgvoipLogFile=NULL;\n\nvoid tgvoip_log_file_printf(char level, const char* msg, ...){\n\tif(tgvoipLogFile){\n\t\tva_list argptr;\n\t\tva_start(argptr, msg);\n\t\ttime_t t = time(0);\n\t\tstruct tm *now = localtime(&t);\n\t\tfprintf(tgvoipLogFile, \"%02d-%02d %02d:%02d:%02d %c: \", now->tm_mon + 1, now->tm_mday, now->tm_hour, now->tm_min, now->tm_sec, level);\n\t\tvfprintf(tgvoipLogFile, msg, argptr);\n\t\tfprintf(tgvoipLogFile, \"\\n\");\n\t\tfflush(tgvoipLogFile);\n\t}\n}\n\nvoid tgvoip_log_file_write_header(FILE* file){\n\tif(file){\n\t\ttime_t t = time(0);\n\t\tstruct tm *now = localtime(&t);\n#if defined(_WIN32)\n\t\t#if WINAPI_PARTITION_DESKTOP\n\t\t\tchar systemVersion[64];\n\t\t\tOSVERSIONINFOA vInfo;\n\t\t\tvInfo.dwOSVersionInfoSize=sizeof(vInfo);\n\t\t\tGetVersionExA(&vInfo);\n\t\t\tsnprintf(systemVersion, sizeof(systemVersion), \"Windows %d.%d.%d %s\", vInfo.dwMajorVersion, vInfo.dwMinorVersion, vInfo.dwBuildNumber, vInfo.szCSDVersion);\n#else\n\t\t\tchar* systemVersion=\"Windows RT\";\n#endif\n#elif defined(__linux__)\n#ifdef __ANDROID__\n\t\tchar systemVersion[128];\n\t\tchar sysRel[PROP_VALUE_MAX];\n\t\tchar deviceVendor[PROP_VALUE_MAX];\n\t\tchar deviceModel[PROP_VALUE_MAX];\n\t\t__system_property_get(\"ro.build.version.release\", sysRel);\n\t\t__system_property_get(\"ro.product.manufacturer\", deviceVendor);\n\t\t__system_property_get(\"ro.product.model\", deviceModel);\n\t\tsnprintf(systemVersion, sizeof(systemVersion), \"Android %s (%s %s)\", sysRel, deviceVendor, deviceModel);\n#else\n\t\tstruct utsname sysname;\n\t\tuname(&sysname);\n\t\tstd::string sysver(sysname.sysname);\n\t\tsysver+=\" \";\n\t\tsysver+=sysname.release;\n\t\tsysver+=\" (\";\n\t\tsysver+=sysname.version;\n\t\tsysver+=\")\";\n\t\tconst char* systemVersion=sysver.c_str();\n#endif\n#elif defined(__APPLE__)\n\t\tchar osxVer[128];\n\t\ttgvoip::DarwinSpecific::GetSystemName(osxVer, sizeof(osxVer));\n\t\tchar systemVersion[128];\n#if TARGET_OS_OSX\n\t\tsnprintf(systemVersion, sizeof(systemVersion), \"OS X %s\", osxVer);\n#elif TARGET_OS_IPHONE\n\t\tsnprintf(systemVersion, sizeof(systemVersion), \"iOS %s\", osxVer);\n#else\n\t\tsnprintf(systemVersion, sizeof(systemVersion), \"Unknown Darwin %s\", osxVer);\n#endif\n#else\n\t\tconst char* systemVersion=\"Unknown OS\";\n#endif\n\n#if defined(__aarch64__)\n\t\tconst char* cpuArch=\"ARM64\";\n#elif defined(__arm__) || defined(_M_ARM)\n\t\tconst char* cpuArch=\"ARM\";\n#elif defined(_M_X64) || defined(__x86_64__)\n\t\tconst char* cpuArch=\"x86_64\";\n#elif defined(_M_IX86) || defined(__i386__)\n\t\tconst char* cpuArch=\"x86\";\n#else\n\t\tconst char* cpuArch=\"Unknown CPU\";\n#endif\n\n\t\tfprintf(file, \"---------------\\nlibtgvoip v\" LIBTGVOIP_VERSION \" on %s %s\\nLog started on %d/%02d/%d at %d:%02d:%02d\\n---------------\\n\", systemVersion, cpuArch, now->tm_mday, now->tm_mon+1, now->tm_year+1900, now->tm_hour, now->tm_min, now->tm_sec);\n\t}\n}\n"
  },
  {
    "path": "libtgvoip-public/logging.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef __LOGGING_H\n#define __LOGGING_H\n#define LSTR_INT(x) LSTR_DO_INT(x)\n#define LSTR_DO_INT(x) #x\n\n#ifdef __APPLE__\n#include <TargetConditionals.h>\n#endif\n\n#include <stdio.h>\n\nvoid tgvoip_log_file_printf(char level, const char* msg, ...);\nvoid tgvoip_log_file_write_header(FILE* file);\n\n#if defined(__ANDROID__)\n\n#include <android/log.h>\n\n//#define _LOG_WRAP(...) __BASE_FILE__\":\"LSTR_INT(__LINE__)\": \"__VA_ARGS__\n#define _LOG_WRAP(...) __VA_ARGS__\n#define TAG \"tg-voip-native\"\n#define LOGV(...) {__android_log_print(ANDROID_LOG_VERBOSE, TAG, _LOG_WRAP(__VA_ARGS__)); tgvoip_log_file_printf('V', __VA_ARGS__);}\n#define LOGD(...) {__android_log_print(ANDROID_LOG_DEBUG, TAG, _LOG_WRAP(__VA_ARGS__)); tgvoip_log_file_printf('D', __VA_ARGS__);}\n#define LOGI(...) {__android_log_print(ANDROID_LOG_INFO, TAG, _LOG_WRAP(__VA_ARGS__)); tgvoip_log_file_printf('I', __VA_ARGS__);}\n#define LOGW(...) {__android_log_print(ANDROID_LOG_WARN, TAG, _LOG_WRAP(__VA_ARGS__)); tgvoip_log_file_printf('W', __VA_ARGS__);}\n#define LOGE(...) {__android_log_print(ANDROID_LOG_ERROR, TAG, _LOG_WRAP(__VA_ARGS__)); tgvoip_log_file_printf('E', __VA_ARGS__);}\n\n#elif defined(__APPLE__) && TARGET_OS_IPHONE && defined(TGVOIP_HAVE_TGLOG)\n\n#include \"os/darwin/TGLogWrapper.h\"\n\n#define LOGV(msg, ...) {__tgvoip_call_tglog(\"V/tgvoip: \" msg, ##__VA_ARGS__); tgvoip_log_file_printf('V', msg, ##__VA_ARGS__);}\n#define LOGD(msg, ...) {__tgvoip_call_tglog(\"D/tgvoip: \" msg, ##__VA_ARGS__); tgvoip_log_file_printf('D', msg, ##__VA_ARGS__);}\n#define LOGI(msg, ...) {__tgvoip_call_tglog(\"I/tgvoip: \" msg, ##__VA_ARGS__); tgvoip_log_file_printf('I', msg, ##__VA_ARGS__);}\n#define LOGW(msg, ...) {__tgvoip_call_tglog(\"W/tgvoip: \" msg, ##__VA_ARGS__); tgvoip_log_file_printf('W', msg, ##__VA_ARGS__);}\n#define LOGE(msg, ...) {__tgvoip_call_tglog(\"E/tgvoip: \" msg, ##__VA_ARGS__); tgvoip_log_file_printf('E', msg, ##__VA_ARGS__);}\n\n#elif defined(_WIN32) && defined(_DEBUG)\n\n#include <windows.h>\n#include <stdio.h>\n\n#define _TGVOIP_W32_LOG_PRINT(verb, msg, ...){ char __log_buf[1024]; snprintf(__log_buf, 1024, \"%c/tgvoip: \" msg \"\\n\", verb, ##__VA_ARGS__); OutputDebugStringA(__log_buf); tgvoip_log_file_printf((char)verb, msg, __VA_ARGS__);}\n\n#define LOGV(msg, ...) _TGVOIP_W32_LOG_PRINT('V', msg, ##__VA_ARGS__)\n#define LOGD(msg, ...) _TGVOIP_W32_LOG_PRINT('D', msg, ##__VA_ARGS__)\n#define LOGI(msg, ...) _TGVOIP_W32_LOG_PRINT('I', msg, ##__VA_ARGS__)\n#define LOGW(msg, ...) _TGVOIP_W32_LOG_PRINT('W', msg, ##__VA_ARGS__)\n#define LOGE(msg, ...) _TGVOIP_W32_LOG_PRINT('E', msg, ##__VA_ARGS__)\n\n#else\n\n#include <stdio.h>\n\n#define _TGVOIP_LOG_PRINT(verb, msg, ...) {printf(\"%c/tgvoip: \" msg \"\\n\", verb, ##__VA_ARGS__); tgvoip_log_file_printf(verb, msg, ##__VA_ARGS__);}\n\n#define LOGV(msg, ...) _TGVOIP_LOG_PRINT('V', msg, ##__VA_ARGS__)\n#define LOGD(msg, ...) _TGVOIP_LOG_PRINT('D', msg, ##__VA_ARGS__)\n#define LOGI(msg, ...) _TGVOIP_LOG_PRINT('I', msg, ##__VA_ARGS__)\n#define LOGW(msg, ...) _TGVOIP_LOG_PRINT('W', msg, ##__VA_ARGS__)\n#define LOGE(msg, ...) _TGVOIP_LOG_PRINT('E', msg, ##__VA_ARGS__)\n\n#endif\n\n#if !defined(snprintf) && defined(_WIN32) && defined(__cplusplus_winrt)\n#define snprintf _snprintf\n#endif\n\n#ifdef TGVOIP_LOG_VERBOSITY\n#if TGVOIP_LOG_VERBOSITY<5\n#undef LOGV\n#define LOGV(msg, ...)\n#endif\n#if TGVOIP_LOG_VERBOSITY<4\n#undef LOGD\n#define LOGD(msg, ...)\n#endif\n#if TGVOIP_LOG_VERBOSITY<3\n#undef LOGI\n#define LOGI(msg, ...)\n#endif\n#if TGVOIP_LOG_VERBOSITY<2\n#undef LOGW\n#define LOGW(msg, ...)\n#endif\n#if TGVOIP_LOG_VERBOSITY<1\n#undef LOGE\n#define LOGE(msg, ...)\n#endif\n#endif\n\n#endif //__LOGGING_H\n"
  },
  {
    "path": "libtgvoip-public/os/windows/AudioInputWASAPI.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n\n#include <assert.h>\n#include \"AudioInputWASAPI.h\"\n#include \"../../logging.h\"\n#include \"../../VoIPController.h\"\n\n#define BUFFER_SIZE 960\n#define CHECK_RES(res, msg) {if(FAILED(res)){LOGE(\"%s failed: HRESULT=0x%08X\", msg, res); failed=true; return;}}\n#define SCHECK_RES(res, msg) {if(FAILED(res)){LOGE(\"%s failed: HRESULT=0x%08X\", msg, res); return;}}\n\ntemplate <class T> void SafeRelease(T **ppT)\n{\n\tif(*ppT)\n\t{\n\t\t(*ppT)->Release();\n\t\t*ppT = NULL;\n\t}\n}\n\nusing namespace tgvoip::audio;\n\nAudioInputWASAPI::AudioInputWASAPI(std::string deviceID){\n\tisRecording=false;\n\tremainingDataLen=0;\n\trefCount=1;\n\tHRESULT res;\n\tres=CoInitializeEx(NULL, COINIT_MULTITHREADED);\n\tCHECK_RES(res, \"CoInitializeEx\");\n#ifdef TGVOIP_WINXP_COMPAT\n\tHANDLE (WINAPI *__CreateEventExA)(LPSECURITY_ATTRIBUTES lpEventAttributes, LPCSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess);\n\t__CreateEventExA=(HANDLE (WINAPI *)(LPSECURITY_ATTRIBUTES, LPCSTR, DWORD, DWORD))GetProcAddress(GetModuleHandleA(\"kernel32.dll\"), \"CreateEventExA\");\n#undef CreateEventEx\n#define CreateEventEx __CreateEventExA\n#endif\n\tshutdownEvent=CreateEventEx(NULL, NULL, 0, EVENT_MODIFY_STATE | SYNCHRONIZE);\n\taudioSamplesReadyEvent=CreateEventEx(NULL, NULL, 0, EVENT_MODIFY_STATE | SYNCHRONIZE);\n\tstreamSwitchEvent=CreateEventEx(NULL, NULL, 0, EVENT_MODIFY_STATE | SYNCHRONIZE);\n\tZeroMemory(&format, sizeof(format));\n\tformat.wFormatTag=WAVE_FORMAT_PCM;\n\tformat.nChannels=1;\n\tformat.nSamplesPerSec=48000;\n\tformat.nBlockAlign=2;\n\tformat.nAvgBytesPerSec=format.nSamplesPerSec*format.nBlockAlign;\n\tformat.wBitsPerSample=16;\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tres=CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&enumerator));\n\tCHECK_RES(res, \"CoCreateInstance(MMDeviceEnumerator)\");\n\tres=enumerator->RegisterEndpointNotificationCallback(this);\n\tCHECK_RES(res, \"enumerator->RegisterEndpointNotificationCallback\");\n\taudioSessionControl=NULL;\n\tdevice=NULL;\n#endif\n\n\taudioClient=NULL;\n\tcaptureClient=NULL;\n\tthread=NULL;\n\tstarted=false;\n\n\tSetCurrentDevice(deviceID);\n}\n\nAudioInputWASAPI::~AudioInputWASAPI(){\n\tif(audioClient && started){\n\t\taudioClient->Stop();\n\t}\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tif(audioSessionControl){\n\t\taudioSessionControl->UnregisterAudioSessionNotification(this);\n\t}\n#endif\n\n\tSetEvent(shutdownEvent);\n\tif(thread){\n\t\tWaitForSingleObjectEx(thread, INFINITE, false);\n\t\tCloseHandle(thread);\n\t}\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tSafeRelease(&audioSessionControl);\n#endif\n\tSafeRelease(&captureClient);\n\tSafeRelease(&audioClient);\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tSafeRelease(&device);\n#endif\n\tCloseHandle(shutdownEvent);\n\tCloseHandle(audioSamplesReadyEvent);\n\tCloseHandle(streamSwitchEvent);\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tif(enumerator)\n\t\tenumerator->UnregisterEndpointNotificationCallback(this);\n\tSafeRelease(&enumerator);\n#endif\n}\nvoid AudioInputWASAPI::Start(){\n\tisRecording=true;\n\tif(!thread){\n\t\tthread=CreateThread(NULL, 0, AudioInputWASAPI::StartThread, this, 0, NULL);\n\t}\n\t\n\tif(audioClient && !started){\n\t\tLOGI(\"audioClient->Start\");\n\t\taudioClient->Start();\n\t\tstarted=true;\n\t}\n}\n\nvoid AudioInputWASAPI::Stop(){\n\tisRecording=false;\n}\n\nbool AudioInputWASAPI::IsRecording(){\n\treturn isRecording;\n}\n\nvoid AudioInputWASAPI::EnumerateDevices(std::vector<tgvoip::AudioInputDevice>& devs){\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tHRESULT res;\n\tres=CoInitializeEx(NULL, COINIT_MULTITHREADED);\n\tSCHECK_RES(res, \"CoInitializeEx\");\n\n\tIMMDeviceEnumerator *deviceEnumerator = NULL;\n\tIMMDeviceCollection *deviceCollection = NULL;\n\n\tres=CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&deviceEnumerator));\n\tSCHECK_RES(res, \"CoCreateInstance(MMDeviceEnumerator)\");\n\n\tres=deviceEnumerator->EnumAudioEndpoints(eCapture, DEVICE_STATE_ACTIVE, &deviceCollection);\n\tSCHECK_RES(res, \"EnumAudioEndpoints\");\n\n\tUINT devCount;\n\tres=deviceCollection->GetCount(&devCount);\n\tSCHECK_RES(res, \"GetCount\");\n\n\tfor(UINT i=0;i<devCount;i++){\n\t\tIMMDevice* device;\n\t\tres=deviceCollection->Item(i, &device);\n\t\tSCHECK_RES(res, \"GetDeviceItem\");\n\t\twchar_t* devID;\n\t\tres=device->GetId(&devID);\n\t\tSCHECK_RES(res, \"get device id\");\n\n\t\tIPropertyStore* propStore;\n\t\tres=device->OpenPropertyStore(STGM_READ, &propStore);\n\t\tSafeRelease(&device);\n\t\tSCHECK_RES(res, \"OpenPropertyStore\");\n\t\t\n\t\tPROPVARIANT friendlyName;\n\t\tPropVariantInit(&friendlyName);\n\t\tres=propStore->GetValue(PKEY_Device_FriendlyName, &friendlyName);\n\t\tSafeRelease(&propStore);\n\n\t\tAudioInputDevice dev;\n\n\t\twchar_t actualFriendlyName[128];\n\t\tif(friendlyName.vt==VT_LPWSTR){\n\t\t\twcsncpy(actualFriendlyName, friendlyName.pwszVal, sizeof(actualFriendlyName)/sizeof(wchar_t));\n\t\t}else{\n\t\t\twcscpy(actualFriendlyName, L\"Unknown\");\n\t\t}\n\t\tPropVariantClear(&friendlyName);\n\n\t\tchar buf[256];\n\t\tWideCharToMultiByte(CP_UTF8, 0, devID, -1, buf, sizeof(buf), NULL, NULL);\n\t\tdev.id=buf;\n\t\tWideCharToMultiByte(CP_UTF8, 0, actualFriendlyName, -1, buf, sizeof(buf), NULL, NULL);\n\t\tdev.displayName=buf;\n\t\tdevs.push_back(dev);\n\n\t\tCoTaskMemFree(devID);\n\t}\n\n\tSafeRelease(&deviceCollection);\n\tSafeRelease(&deviceEnumerator);\n#endif\n}\n\nvoid AudioInputWASAPI::SetCurrentDevice(std::string deviceID){\n\tif(thread){\n\t\tstreamChangeToDevice=deviceID;\n\t\tSetEvent(streamSwitchEvent);\n\t}else{\n\t\tActuallySetCurrentDevice(deviceID);\n\t}\n}\n\nvoid AudioInputWASAPI::ActuallySetCurrentDevice(std::string deviceID){\n\tcurrentDevice=deviceID;\n\tHRESULT res;\n\n\tif(audioClient){\n\t\tres=audioClient->Stop();\n\t\tCHECK_RES(res, \"audioClient->Stop\");\n\t}\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tif(audioSessionControl){\n\t\tres=audioSessionControl->UnregisterAudioSessionNotification(this);\n\t\tCHECK_RES(res, \"audioSessionControl->UnregisterAudioSessionNotification\");\n\t}\n\n\tSafeRelease(&audioSessionControl);\n#endif\n\tSafeRelease(&captureClient);\n\tSafeRelease(&audioClient);\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tSafeRelease(&device);\n\n\tIMMDeviceCollection *deviceCollection = NULL;\n\n\tif(deviceID==\"default\"){\n\t\tisDefaultDevice=true;\n\t\tres=enumerator->GetDefaultAudioEndpoint(eCapture, eCommunications, &device);\n\t\tCHECK_RES(res, \"GetDefaultAudioEndpoint\");\n\t}else{\n\t\tisDefaultDevice=false;\n\t\tres=enumerator->EnumAudioEndpoints(eCapture, DEVICE_STATE_ACTIVE, &deviceCollection);\n\t\tCHECK_RES(res, \"EnumAudioEndpoints\");\n\n\t\tUINT devCount;\n\t\tres=deviceCollection->GetCount(&devCount);\n\t\tCHECK_RES(res, \"GetCount\");\n\n\t\tfor(UINT i=0;i<devCount;i++){\n\t\t\tIMMDevice* device;\n\t\t\tres=deviceCollection->Item(i, &device);\n\t\t\tCHECK_RES(res, \"GetDeviceItem\");\n\t\t\twchar_t* _devID;\n\t\t\tres=device->GetId(&_devID);\n\t\t\tCHECK_RES(res, \"get device id\");\n\n\t\t\tchar devID[128];\n\t\t\tWideCharToMultiByte(CP_UTF8, 0, _devID, -1, devID, 128, NULL, NULL);\n\n\t\t\tCoTaskMemFree(_devID);\n\t\t\tif(deviceID==devID){\n\t\t\t\tthis->device=device;\n\t\t\t\t//device->AddRef();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif(deviceCollection)\n\t\tSafeRelease(&deviceCollection);\n\n\tif(!device){\n\t\tLOGE(\"Didn't find capture device; failing\");\n\t\tfailed=true;\n\t\treturn;\n\t}\n\t\n\tres=device->Activate(__uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL, (void**)&audioClient);\n\tCHECK_RES(res, \"device->Activate\");\n#else\n\tPlatform::String^ defaultDevID=Windows::Media::Devices::MediaDevice::GetDefaultAudioCaptureId(Windows::Media::Devices::AudioDeviceRole::Communications);\n\tHRESULT res1, res2;\n\tIAudioClient2* audioClient2=WindowsSandboxUtils::ActivateAudioDevice(defaultDevID->Data(), &res1, &res2);\n\tCHECK_RES(res1, \"activate1\");\n\tCHECK_RES(res2, \"activate2\");\n\n\tAudioClientProperties properties={};\n\tproperties.cbSize=sizeof AudioClientProperties;\n\tproperties.eCategory=AudioCategory_Communications;\n\tres = audioClient2->SetClientProperties(&properties);\n\tCHECK_RES(res, \"audioClient2->SetClientProperties\");\n\n\taudioClient=audioClient2;\n#endif\n\t\n\t\n\t// {2C693079-3F59-49FD-964F-61C005EAA5D3}\n\tconst GUID guid = { 0x2c693079, 0x3f59, 0x49fd, { 0x96, 0x4f, 0x61, 0xc0, 0x5, 0xea, 0xa5, 0xd3 } };\n\tres = audioClient->Initialize(AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST | 0x80000000/*AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM*/, 60 * 10000, 0, &format, &guid);\n\tCHECK_RES(res, \"audioClient->Initialize\");\n\n\tuint32_t bufSize;\n\tres = audioClient->GetBufferSize(&bufSize);\n\tCHECK_RES(res, \"audioClient->GetBufferSize\");\n\n\tLOGV(\"buffer size: %u\", bufSize);\n\tREFERENCE_TIME latency;\n\tif(SUCCEEDED(audioClient->GetStreamLatency(&latency))){\n\t\testimatedDelay=latency ? (int32_t)(latency/10000) : 60;\n\t\tLOGD(\"capture latency: %d\", estimatedDelay);\n\t}else{\n\t\testimatedDelay=60;\n\t}\n\n\tres = audioClient->SetEventHandle(audioSamplesReadyEvent);\n\tCHECK_RES(res, \"audioClient->SetEventHandle\");\n\n\tres = audioClient->GetService(IID_PPV_ARGS(&captureClient));\n\tCHECK_RES(res, \"audioClient->GetService\");\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tres=audioClient->GetService(IID_PPV_ARGS(&audioSessionControl));\n\tCHECK_RES(res, \"audioClient->GetService(IAudioSessionControl)\");\n\n\tres=audioSessionControl->RegisterAudioSessionNotification(this);\n\tCHECK_RES(res, \"audioSessionControl->RegisterAudioSessionNotification\");\n#endif\n\n\tif(isRecording)\n\t\taudioClient->Start();\n\n\tLOGV(\"set current input device done\");\n}\n\nDWORD WINAPI AudioInputWASAPI::StartThread(void* arg) {\n\tLOGV(\"WASAPI capture thread starting\");\n\t((AudioInputWASAPI*)arg)->RunThread();\n\treturn 0;\n}\n\nvoid AudioInputWASAPI::RunThread() {\n\tif(failed)\n\t\treturn;\n\tSetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST);\n\n\tHANDLE waitArray[]={shutdownEvent, streamSwitchEvent, audioSamplesReadyEvent};\n\tHRESULT res=CoInitializeEx(NULL, COINIT_MULTITHREADED);\n\tCHECK_RES(res, \"CoInitializeEx in capture thread\");\n\n\tuint32_t bufferSize=0;\n\tuint32_t framesWritten=0;\n\n\tbool running=true;\n\t//double prevCallback=VoIPController::GetCurrentTime();\n\n\twhile(running){\n\t\tDWORD waitResult=WaitForMultipleObjectsEx(3, waitArray, false, INFINITE, false);\n\t\tif(waitResult==WAIT_OBJECT_0){ // shutdownEvent\n\t\t\tLOGV(\"capture thread shutting down\");\n\t\t\trunning=false;\n\t\t}else if(waitResult==WAIT_OBJECT_0+1){ // streamSwitchEvent\n\t\t\tLOGV(\"stream switch\");\n\t\t\tActuallySetCurrentDevice(streamChangeToDevice);\n\t\t\tResetEvent(streamSwitchEvent);\n\t\t\tbufferSize=0;\n\t\t\tLOGV(\"stream switch done\");\n\t\t}else if(waitResult==WAIT_OBJECT_0+2){ // audioSamplesReadyEvent\n\t\t\tif(!audioClient)\n\t\t\t\tcontinue;\n\t\t\tres=captureClient->GetNextPacketSize(&bufferSize);\n\t\t\tCHECK_RES(res, \"captureClient->GetNextPacketSize\");\n\t\t\tBYTE* data;\n\t\t\tuint32_t framesAvailable=bufferSize;\n\t\t\tDWORD flags;\n\n\t\t\tres=captureClient->GetBuffer(&data, &framesAvailable, &flags, NULL, NULL);\n\t\t\tCHECK_RES(res, \"captureClient->GetBuffer\");\n\t\t\tsize_t dataLen=framesAvailable*2;\n\t\t\tassert(remainingDataLen+dataLen<sizeof(remainingData));\n\n\t\t\t//double t=VoIPController::GetCurrentTime();\n\t\t\t//LOGV(\"audio capture: %u, time %f\", framesAvailable, t-prevCallback);\n\t\t\t//prevCallback=t;\n\n\t\t\tmemcpy(remainingData+remainingDataLen, data, dataLen);\n\t\t\tremainingDataLen+=dataLen;\n\t\t\twhile(remainingDataLen>960*2){\n\t\t\t\tif(isRecording)\n\t\t\t\t\tInvokeCallback(remainingData, 960*2);\n\t\t\t\t//LOGV(\"remaining data len %u\", remainingDataLen);\n\t\t\t\tmemmove(remainingData, remainingData+(960*2), remainingDataLen-960*2);\n\t\t\t\tremainingDataLen-=960*2;\n\t\t\t}\n\n\t\t\tres=captureClient->ReleaseBuffer(framesAvailable);\n\t\t\tCHECK_RES(res, \"captureClient->ReleaseBuffer\");\n\n\t\t\tframesWritten+=framesAvailable;\n\t\t}\n\t}\n}\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\nHRESULT AudioInputWASAPI::OnSessionDisconnected(AudioSessionDisconnectReason reason) {\n\tif(!isDefaultDevice){\n\t\tstreamChangeToDevice=\"default\";\n\t\tSetEvent(streamSwitchEvent);\n\t}\n\treturn S_OK;\n}\n\nHRESULT AudioInputWASAPI::OnDefaultDeviceChanged(EDataFlow flow, ERole role, LPCWSTR newDevID) {\n\tif(flow==eCapture && role==eCommunications && isDefaultDevice){\n\t\tstreamChangeToDevice=\"default\";\n\t\tSetEvent(streamSwitchEvent);\n\t}\n\treturn S_OK;\n}\n\nULONG AudioInputWASAPI::AddRef(){\n\treturn InterlockedIncrement(&refCount);\n}\n\nULONG AudioInputWASAPI::Release(){\n\treturn InterlockedDecrement(&refCount);\n}\n\nHRESULT AudioInputWASAPI::QueryInterface(REFIID iid, void** obj){\n\tif(!obj){\n\t\treturn E_POINTER;\n\t}\n\t*obj=NULL;\n\n\tif(iid==IID_IUnknown){\n\t\t*obj=static_cast<IUnknown*>(static_cast<IAudioSessionEvents*>(this));\n\t\tAddRef();\n\t}else if(iid==__uuidof(IMMNotificationClient)){\n\t\t*obj=static_cast<IMMNotificationClient*>(this);\n\t\tAddRef();\n\t}else if(iid==__uuidof(IAudioSessionEvents)){\n\t\t*obj=static_cast<IAudioSessionEvents*>(this);\n\t\tAddRef();\n\t}else{\n\t\treturn E_NOINTERFACE;\n\t}\n\n\treturn S_OK;\n}\n#endif"
  },
  {
    "path": "libtgvoip-public/os/windows/AudioInputWASAPI.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_AUDIOINPUTWASAPI_H\n#define LIBTGVOIP_AUDIOINPUTWASAPI_H\n\n#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP\n#define TGVOIP_WINDOWS_PHONE\n#endif\n#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY==WINAPI_FAMILY_DESKTOP_APP\n#define TGVOIP_WINDOWS_DESKTOP\n#endif\n\n#include <windows.h>\n#include <string>\n#include <vector>\n#pragma warning(push)\n#pragma warning(disable : 4201)\n#ifndef TGVOIP_WP_SILVERLIGHT\n#include <mmdeviceapi.h>\n#endif\n#ifdef TGVOIP_WINDOWS_DESKTOP\n#include <audiopolicy.h>\n#include <functiondiscoverykeys.h>\n#else\n#include <audioclient.h>\n#include \"WindowsSandboxUtils.h\"\n#endif\n#pragma warning(pop)\n#include \"../../audio/AudioInput.h\"\n\nnamespace tgvoip{\nnamespace audio{\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\nclass AudioInputWASAPI : public AudioInput, IMMNotificationClient, IAudioSessionEvents{\n#else\nclass AudioInputWASAPI : public AudioInput{\n#endif\n\npublic:\n\tAudioInputWASAPI(std::string deviceID);\n\tvirtual ~AudioInputWASAPI();\n\tvirtual void Start();\n\tvirtual void Stop();\n\tvirtual bool IsRecording();\n\tvirtual void SetCurrentDevice(std::string deviceID);\n\tstatic void EnumerateDevices(std::vector<AudioInputDevice>& devs);\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tSTDMETHOD_(ULONG, AddRef)();\n\tSTDMETHOD_(ULONG, Release)();\n#endif\n\nprivate:\n\tvoid ActuallySetCurrentDevice(std::string deviceID);\n\tstatic DWORD WINAPI StartThread(void* arg);\n\tvoid RunThread();\n\tWAVEFORMATEX format;\n\tbool isRecording;\n\tHANDLE shutdownEvent;\n\tHANDLE audioSamplesReadyEvent;\n\tHANDLE streamSwitchEvent;\n\tHANDLE thread;\n\tIAudioClient* audioClient;\n\tIAudioCaptureClient* captureClient;\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tIMMDeviceEnumerator* enumerator;\n\tIAudioSessionControl* audioSessionControl;\n\tIMMDevice* device;\n#endif\n\tunsigned char remainingData[10240];\n\tsize_t remainingDataLen;\n\tbool isDefaultDevice;\n\tULONG refCount;\n\tstd::string streamChangeToDevice;\n\tbool started;\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tSTDMETHOD(OnDisplayNameChanged) (LPCWSTR /*NewDisplayName*/, LPCGUID /*EventContext*/) { return S_OK; };\n\tSTDMETHOD(OnIconPathChanged) (LPCWSTR /*NewIconPath*/, LPCGUID /*EventContext*/) { return S_OK; };\n\tSTDMETHOD(OnSimpleVolumeChanged) (float /*NewSimpleVolume*/, BOOL /*NewMute*/, LPCGUID /*EventContext*/) { return S_OK; }\n\tSTDMETHOD(OnChannelVolumeChanged) (DWORD /*ChannelCount*/, float /*NewChannelVolumes*/[], DWORD /*ChangedChannel*/, LPCGUID /*EventContext*/) { return S_OK; };\n\tSTDMETHOD(OnGroupingParamChanged) (LPCGUID /*NewGroupingParam*/, LPCGUID /*EventContext*/) { return S_OK; };\n\tSTDMETHOD(OnStateChanged) (AudioSessionState /*NewState*/) { return S_OK; };\n\tSTDMETHOD(OnSessionDisconnected) (AudioSessionDisconnectReason DisconnectReason);\n\tSTDMETHOD(OnDeviceStateChanged) (LPCWSTR /*DeviceId*/, DWORD /*NewState*/) { return S_OK; }\n\tSTDMETHOD(OnDeviceAdded) (LPCWSTR /*DeviceId*/) { return S_OK; };\n\tSTDMETHOD(OnDeviceRemoved) (LPCWSTR /*DeviceId(*/) { return S_OK; };\n\tSTDMETHOD(OnDefaultDeviceChanged) (EDataFlow Flow, ERole Role, LPCWSTR NewDefaultDeviceId);\n\tSTDMETHOD(OnPropertyValueChanged) (LPCWSTR /*DeviceId*/, const PROPERTYKEY /*Key*/) { return S_OK; };\n\n\t//\n\t//  IUnknown\n\t//\n\tSTDMETHOD(QueryInterface)(REFIID iid, void **pvObject);\n#endif\n};\n\n}\n}\n\n#endif //LIBTGVOIP_AUDIOINPUTWASAPI_H\n"
  },
  {
    "path": "libtgvoip-public/os/windows/AudioOutputWASAPI.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n\n#include <assert.h>\n#include \"AudioOutputWASAPI.h\"\n#include \"../../logging.h\"\n#include \"../../VoIPController.h\"\n\n#define BUFFER_SIZE 960\n#define CHECK_RES(res, msg) {if(FAILED(res)){LOGE(\"%s failed: HRESULT=0x%08X\", msg, res); failed=true; return;}}\n#define SCHECK_RES(res, msg) {if(FAILED(res)){LOGE(\"%s failed: HRESULT=0x%08X\", msg, res); return;}}\n\ntemplate <class T> void SafeRelease(T **ppT)\n{\n\tif(*ppT)\n\t{\n\t\t(*ppT)->Release();\n\t\t*ppT = NULL;\n\t}\n}\n\n#ifdef TGVOIP_WINXP_COMPAT\n\n#endif\n\nusing namespace tgvoip::audio;\n\nAudioOutputWASAPI::AudioOutputWASAPI(std::string deviceID){\n\tisPlaying=false;\n\tremainingDataLen=0;\n\trefCount=1;\n\tHRESULT res;\n\tres=CoInitializeEx(NULL, COINIT_MULTITHREADED);\n\tCHECK_RES(res, \"CoInitializeEx\");\n#ifdef TGVOIP_WINXP_COMPAT\n\tHANDLE (WINAPI *__CreateEventExA)(LPSECURITY_ATTRIBUTES lpEventAttributes, LPCSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess);\n\t__CreateEventExA=(HANDLE (WINAPI *)(LPSECURITY_ATTRIBUTES, LPCSTR, DWORD, DWORD))GetProcAddress(GetModuleHandleA(\"kernel32.dll\"), \"CreateEventExA\");\n#undef CreateEventEx\n#define CreateEventEx __CreateEventExA\n#endif\n\tshutdownEvent=CreateEventEx(NULL, NULL, 0, EVENT_MODIFY_STATE | SYNCHRONIZE);\n\taudioSamplesReadyEvent=CreateEventEx(NULL, NULL, 0, EVENT_MODIFY_STATE | SYNCHRONIZE);\n\tstreamSwitchEvent=CreateEventEx(NULL, NULL, 0, EVENT_MODIFY_STATE | SYNCHRONIZE);\n\tZeroMemory(&format, sizeof(format));\n\tformat.wFormatTag=WAVE_FORMAT_PCM;\n\tformat.nChannels=1;\n\tformat.nSamplesPerSec=48000;\n\tformat.nBlockAlign=2;\n\tformat.nAvgBytesPerSec=format.nSamplesPerSec*format.nBlockAlign;\n\tformat.wBitsPerSample=16;\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tres=CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&enumerator));\n\tCHECK_RES(res, \"CoCreateInstance(MMDeviceEnumerator)\");\n\tres=enumerator->RegisterEndpointNotificationCallback(this);\n\tCHECK_RES(res, \"enumerator->RegisterEndpointNotificationCallback\");\n\taudioSessionControl=NULL;\n\tdevice=NULL;\n#endif\n\n\taudioClient=NULL;\n\trenderClient=NULL;\n\tthread=NULL;\n\n\tSetCurrentDevice(deviceID);\n}\n\nAudioOutputWASAPI::~AudioOutputWASAPI(){\n\tif(audioClient){\n\t\taudioClient->Stop();\n\t}\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tif(audioSessionControl){\n\t\taudioSessionControl->UnregisterAudioSessionNotification(this);\n\t}\n#endif\n\n\tSetEvent(shutdownEvent);\n\tif(thread){\n\t\tWaitForSingleObjectEx(thread, INFINITE, false);\n\t\tCloseHandle(thread);\n\t}\n\tSafeRelease(&renderClient);\n\tSafeRelease(&audioClient);\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tSafeRelease(&device);\n\tSafeRelease(&audioSessionControl);\n#endif\n\tCloseHandle(shutdownEvent);\n\tCloseHandle(audioSamplesReadyEvent);\n\tCloseHandle(streamSwitchEvent);\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tif(enumerator)\n\t\tenumerator->UnregisterEndpointNotificationCallback(this);\n\tSafeRelease(&enumerator);\n#endif\n}\n\nvoid AudioOutputWASAPI::Start(){\n\tisPlaying=true;\n\tif(!thread){\n\t\tthread=CreateThread(NULL, 0, AudioOutputWASAPI::StartThread, this, 0, NULL);\n\t}\n}\n\nvoid AudioOutputWASAPI::Stop(){\n\tisPlaying=false;\n}\n\nbool AudioOutputWASAPI::IsPlaying(){\n\treturn isPlaying;\n}\n\nvoid AudioOutputWASAPI::EnumerateDevices(std::vector<tgvoip::AudioOutputDevice>& devs){\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tHRESULT res;\n\tres=CoInitializeEx(NULL, COINIT_MULTITHREADED);\n\tSCHECK_RES(res, \"CoInitializeEx\");\n\n\tIMMDeviceEnumerator *deviceEnumerator = NULL;\n\tIMMDeviceCollection *deviceCollection = NULL;\n\n\tres=CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&deviceEnumerator));\n\tSCHECK_RES(res, \"CoCreateInstance(MMDeviceEnumerator)\");\n\n\tres=deviceEnumerator->EnumAudioEndpoints(eRender, DEVICE_STATE_ACTIVE, &deviceCollection);\n\tSCHECK_RES(res, \"EnumAudioEndpoints\");\n\n\tUINT devCount;\n\tres=deviceCollection->GetCount(&devCount);\n\tSCHECK_RES(res, \"GetCount\");\n\n\tfor(UINT i=0;i<devCount;i++){\n\t\tIMMDevice* device;\n\t\tres=deviceCollection->Item(i, &device);\n\t\tSCHECK_RES(res, \"GetDeviceItem\");\n\t\twchar_t* devID;\n\t\tres=device->GetId(&devID);\n\t\tSCHECK_RES(res, \"get device id\");\n\n\t\tIPropertyStore* propStore;\n\t\tres=device->OpenPropertyStore(STGM_READ, &propStore);\n\t\tSafeRelease(&device);\n\t\tSCHECK_RES(res, \"OpenPropertyStore\");\n\t\t\n\t\tPROPVARIANT friendlyName;\n\t\tPropVariantInit(&friendlyName);\n\t\tres=propStore->GetValue(PKEY_Device_FriendlyName, &friendlyName);\n\t\tSafeRelease(&propStore);\n\n\t\tAudioOutputDevice dev;\n\n\t\twchar_t actualFriendlyName[128];\n\t\tif(friendlyName.vt==VT_LPWSTR){\n\t\t\twcsncpy(actualFriendlyName, friendlyName.pwszVal, sizeof(actualFriendlyName)/sizeof(wchar_t));\n\t\t}else{\n\t\t\twcscpy(actualFriendlyName, L\"Unknown\");\n\t\t}\n\t\tPropVariantClear(&friendlyName);\n\n\t\tchar buf[256];\n\t\tWideCharToMultiByte(CP_UTF8, 0, devID, -1, buf, sizeof(buf), NULL, NULL);\n\t\tdev.id=buf;\n\t\tWideCharToMultiByte(CP_UTF8, 0, actualFriendlyName, -1, buf, sizeof(buf), NULL, NULL);\n\t\tdev.displayName=buf;\n\t\tdevs.push_back(dev);\n\n\t\tCoTaskMemFree(devID);\n\t}\n\n\tSafeRelease(&deviceCollection);\n\tSafeRelease(&deviceEnumerator);\n#endif\n}\n\nvoid AudioOutputWASAPI::SetCurrentDevice(std::string deviceID){\n\tif(thread){\n\t\tstreamChangeToDevice=deviceID;\n\t\tSetEvent(streamSwitchEvent);\n\t}else{\n\t\tActuallySetCurrentDevice(deviceID);\n\t}\n}\n\nvoid AudioOutputWASAPI::ActuallySetCurrentDevice(std::string deviceID){\n\tcurrentDevice=deviceID;\n\tHRESULT res;\n\n\tif(audioClient){\n\t\tres=audioClient->Stop();\n\t\tCHECK_RES(res, \"audioClient->Stop\");\n\t}\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tif(audioSessionControl){\n\t\tres=audioSessionControl->UnregisterAudioSessionNotification(this);\n\t\tCHECK_RES(res, \"audioSessionControl->UnregisterAudioSessionNotification\");\n\t}\n\n\tSafeRelease(&audioSessionControl);\n#endif\n\tSafeRelease(&renderClient);\n\tSafeRelease(&audioClient);\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tSafeRelease(&device);\n\n\n\tIMMDeviceCollection *deviceCollection = NULL;\n\n\tif(deviceID==\"default\"){\n\t\tisDefaultDevice=true;\n\t\tres=enumerator->GetDefaultAudioEndpoint(eRender, eCommunications, &device);\n\t\tCHECK_RES(res, \"GetDefaultAudioEndpoint\");\n\t}else{\n\t\tisDefaultDevice=false;\n\t\tres=enumerator->EnumAudioEndpoints(eRender, DEVICE_STATE_ACTIVE, &deviceCollection);\n\t\tCHECK_RES(res, \"EnumAudioEndpoints\");\n\n\t\tUINT devCount;\n\t\tres=deviceCollection->GetCount(&devCount);\n\t\tCHECK_RES(res, \"GetCount\");\n\n\t\tfor(UINT i=0;i<devCount;i++){\n\t\t\tIMMDevice* device;\n\t\t\tres=deviceCollection->Item(i, &device);\n\t\t\tCHECK_RES(res, \"GetDeviceItem\");\n\t\t\twchar_t* _devID;\n\t\t\tres=device->GetId(&_devID);\n\t\t\tCHECK_RES(res, \"get device id\");\n\n\t\t\tchar devID[128];\n\t\t\tWideCharToMultiByte(CP_UTF8, 0, _devID, -1, devID, 128, NULL, NULL);\n\n\t\t\tCoTaskMemFree(_devID);\n\t\t\tif(deviceID==devID){\n\t\t\t\tthis->device=device;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif(deviceCollection)\n\t\tSafeRelease(&deviceCollection);\n\n\tif(!device){\n\t\tLOGE(\"Didn't find playback device; failing\");\n\t\tfailed=true;\n\t\treturn;\n\t}\n\t\n\tres=device->Activate(__uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL, (void**)&audioClient);\n\tCHECK_RES(res, \"device->Activate\");\n#else\n\tPlatform::String^ defaultDevID=Windows::Media::Devices::MediaDevice::GetDefaultAudioRenderId(Windows::Media::Devices::AudioDeviceRole::Communications);\n\tHRESULT res1, res2;\n\tIAudioClient2* audioClient2=WindowsSandboxUtils::ActivateAudioDevice(defaultDevID->Data(), &res1, &res2);\n\tCHECK_RES(res1, \"activate1\");\n\tCHECK_RES(res2, \"activate2\");\n\n\tAudioClientProperties properties={};\n\tproperties.cbSize=sizeof AudioClientProperties;\n\tproperties.eCategory=AudioCategory_Communications;\n\tres = audioClient2->SetClientProperties(&properties);\n\tCHECK_RES(res, \"audioClient2->SetClientProperties\");\n\n\taudioClient = audioClient2;\n#endif\n\n\t// {2C693079-3F59-49FD-964F-61C005EAA5D3}\n\tconst GUID guid = { 0x2c693079, 0x3f59, 0x49fd, { 0x96, 0x4f, 0x61, 0xc0, 0x5, 0xea, 0xa5, 0xd3 } };\n\tres = audioClient->Initialize(AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST | 0x80000000/*AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM*/, 60 * 10000, 0, &format, &guid);\n\tCHECK_RES(res, \"audioClient->Initialize\");\n\n\tuint32_t bufSize;\n\tres = audioClient->GetBufferSize(&bufSize);\n\tCHECK_RES(res, \"audioClient->GetBufferSize\");\n\n\tLOGV(\"buffer size: %u\", bufSize);\n\tREFERENCE_TIME latency;\n\tif(SUCCEEDED(audioClient->GetStreamLatency(&latency))){\n\t\testimatedDelay=latency ? (int32_t)(latency/10000) : 60;\n\t\tLOGD(\"playback latency: %d\", estimatedDelay);\n\t}else{\n\t\testimatedDelay=60;\n\t}\n\n\tres = audioClient->SetEventHandle(audioSamplesReadyEvent);\n\tCHECK_RES(res, \"audioClient->SetEventHandle\");\n\n\tres = audioClient->GetService(IID_PPV_ARGS(&renderClient));\n\tCHECK_RES(res, \"audioClient->GetService\");\n\n\tBYTE* data;\n\tres = renderClient->GetBuffer(bufSize, &data);\n\tCHECK_RES(res, \"renderClient->GetBuffer\");\n\n\tres = renderClient->ReleaseBuffer(bufSize, AUDCLNT_BUFFERFLAGS_SILENT);\n\tCHECK_RES(res, \"renderClient->ReleaseBuffer\");\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tres=audioClient->GetService(IID_PPV_ARGS(&audioSessionControl));\n\tCHECK_RES(res, \"audioClient->GetService(IAudioSessionControl)\");\n\n\tres=audioSessionControl->RegisterAudioSessionNotification(this);\n\tCHECK_RES(res, \"audioSessionControl->RegisterAudioSessionNotification\");\n#endif\n\n\taudioClient->Start();\n\n\tLOGV(\"set current output device done\");\n}\n\nDWORD WINAPI AudioOutputWASAPI::StartThread(void* arg) {\n\t((AudioOutputWASAPI*)arg)->RunThread();\n\treturn 0;\n}\n\nvoid AudioOutputWASAPI::RunThread() {\n\tSetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST);\n\n\tHANDLE waitArray[]={shutdownEvent, streamSwitchEvent, audioSamplesReadyEvent};\n\tHRESULT res=CoInitializeEx(NULL, COINIT_MULTITHREADED);\n\tCHECK_RES(res, \"CoInitializeEx in render thread\");\n\n\tuint32_t bufferSize;\n\tres=audioClient->GetBufferSize(&bufferSize);\n\tCHECK_RES(res, \"audioClient->GetBufferSize\");\n\tuint32_t framesWritten=0;\n\n\tbool running=true;\n\t//double prevCallback=VoIPController::GetCurrentTime();\n\n\twhile(running){\n\t\tDWORD waitResult=WaitForMultipleObjectsEx(3, waitArray, false, INFINITE, false);\n\t\tif(waitResult==WAIT_OBJECT_0){ // shutdownEvent\n\t\t\tLOGV(\"render thread shutting down\");\n\t\t\trunning=false;\n\t\t}else if(waitResult==WAIT_OBJECT_0+1){ // streamSwitchEvent\n\t\t\tLOGV(\"stream switch\");\n\t\t\tActuallySetCurrentDevice(streamChangeToDevice);\n\t\t\tResetEvent(streamSwitchEvent);\n\t\t\tLOGV(\"stream switch done\");\n\t\t}else if(waitResult==WAIT_OBJECT_0+2){ // audioSamplesReadyEvent\n\t\t\tif(!audioClient)\n\t\t\t\tcontinue;\n\t\t\tBYTE* data;\n\t\t\tuint32_t padding;\n\t\t\tuint32_t framesAvailable;\n\t\t\tres=audioClient->GetCurrentPadding(&padding);\n\t\t\tCHECK_RES(res, \"audioClient->GetCurrentPadding\");\n\t\t\tframesAvailable=bufferSize-padding;\n\t\t\tres=renderClient->GetBuffer(framesAvailable, &data);\n\t\t\tCHECK_RES(res, \"renderClient->GetBuffer\");\n\n\t\t\t//double t=VoIPController::GetCurrentTime();\n\t\t\t//LOGV(\"framesAvail: %u, time: %f, isPlaying: %d\", framesAvailable, t-prevCallback, isPlaying);\n\t\t\t//prevCallback=t;\n\t\t\t\n\t\t\tsize_t bytesAvailable=framesAvailable*2;\n\t\t\twhile(bytesAvailable>remainingDataLen){\n\t\t\t\tif(isPlaying){\n\t\t\t\t\tInvokeCallback(remainingData+remainingDataLen, 960*2);\n\t\t\t\t}else{\n\t\t\t\t\tmemset(remainingData+remainingDataLen, 0, 960*2);\n\t\t\t\t}\n\t\t\t\tremainingDataLen+=960*2;\n\t\t\t}\n\t\t\tmemcpy(data, remainingData, bytesAvailable);\n\t\t\tif(remainingDataLen>bytesAvailable){\n\t\t\t\tmemmove(remainingData, remainingData+bytesAvailable, remainingDataLen-bytesAvailable);\n\t\t\t}\n\t\t\tremainingDataLen-=bytesAvailable;\n\n\t\t\tres=renderClient->ReleaseBuffer(framesAvailable, 0);\n\t\t\tCHECK_RES(res, \"renderClient->ReleaseBuffer\");\n\t\t\tframesWritten+=framesAvailable;\n\t\t}\n\t}\n}\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\nHRESULT AudioOutputWASAPI::OnSessionDisconnected(AudioSessionDisconnectReason reason) {\n\tif(!isDefaultDevice){\n\t\tstreamChangeToDevice=\"default\";\n\t\tSetEvent(streamSwitchEvent);\n\t}\n\treturn S_OK;\n}\n\nHRESULT AudioOutputWASAPI::OnDefaultDeviceChanged(EDataFlow flow, ERole role, LPCWSTR newDevID) {\n\tif(flow==eRender && role==eCommunications && isDefaultDevice){\n\t\tstreamChangeToDevice=\"default\";\n\t\tSetEvent(streamSwitchEvent);\n\t}\n\treturn S_OK;\n}\n\nULONG AudioOutputWASAPI::AddRef(){\n\treturn InterlockedIncrement(&refCount);\n}\n\nULONG AudioOutputWASAPI::Release(){\n\treturn InterlockedDecrement(&refCount);\n}\n\nHRESULT AudioOutputWASAPI::QueryInterface(REFIID iid, void** obj){\n\tif(!obj){\n\t\treturn E_POINTER;\n\t}\n\t*obj=NULL;\n\n\tif(iid==IID_IUnknown){\n\t\t*obj=static_cast<IUnknown*>(static_cast<IAudioSessionEvents*>(this));\n\t\tAddRef();\n\t}else if(iid==__uuidof(IMMNotificationClient)){\n\t\t*obj=static_cast<IMMNotificationClient*>(this);\n\t\tAddRef();\n\t}else if(iid==__uuidof(IAudioSessionEvents)){\n\t\t*obj=static_cast<IAudioSessionEvents*>(this);\n\t\tAddRef();\n\t}else{\n\t\treturn E_NOINTERFACE;\n\t}\n\n\treturn S_OK;\n}\n#endif"
  },
  {
    "path": "libtgvoip-public/os/windows/AudioOutputWASAPI.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_AUDIOOUTPUTWASAPI_H\n#define LIBTGVOIP_AUDIOOUTPUTWASAPI_H\n\n#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP\n#define TGVOIP_WINDOWS_PHONE\n#endif\n#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY==WINAPI_FAMILY_DESKTOP_APP\n#define TGVOIP_WINDOWS_DESKTOP\n#endif\n\n#include <windows.h>\n#include <string>\n#include <vector>\n#pragma warning(push)\n#pragma warning(disable : 4201)\n#ifndef TGVOIP_WP_SILVERLIGHT\n#include <mmdeviceapi.h>\n#endif\n#ifdef TGVOIP_WINDOWS_DESKTOP\n#include <audiopolicy.h>\n#include <functiondiscoverykeys.h>\n#else\n#include <audioclient.h>\n#include \"WindowsSandboxUtils.h\"\n#endif\n#pragma warning(pop)\n#include \"../../audio/AudioOutput.h\"\n\nnamespace tgvoip{\nnamespace audio{\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\nclass AudioOutputWASAPI : public AudioOutput, IMMNotificationClient, IAudioSessionEvents{\n#else\nclass AudioOutputWASAPI : public AudioOutput{\n#endif\npublic:\n\tAudioOutputWASAPI(std::string deviceID);\n\tvirtual ~AudioOutputWASAPI();\n\tvirtual void Start();\n\tvirtual void Stop();\n\tvirtual bool IsPlaying();\n\tvirtual void SetCurrentDevice(std::string deviceID);\n\tstatic void EnumerateDevices(std::vector<AudioOutputDevice>& devs);\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tSTDMETHOD_(ULONG, AddRef)();\n\tSTDMETHOD_(ULONG, Release)();\n#endif\n\nprivate:\n\tvoid ActuallySetCurrentDevice(std::string deviceID);\n\tstatic DWORD WINAPI StartThread(void* arg);\n\tvoid RunThread();\n\tWAVEFORMATEX format;\n\tbool isPlaying;\n\tHANDLE shutdownEvent;\n\tHANDLE audioSamplesReadyEvent;\n\tHANDLE streamSwitchEvent;\n\tHANDLE thread;\n\tIAudioClient* audioClient;\n\tIAudioRenderClient* renderClient;\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tIMMDeviceEnumerator* enumerator;\n\tIAudioSessionControl* audioSessionControl;\n\tIMMDevice* device;\n#endif\n\tunsigned char remainingData[10240];\n\tsize_t remainingDataLen;\n\tbool isDefaultDevice;\n\tULONG refCount;\n\tstd::string streamChangeToDevice;\n\n#ifdef TGVOIP_WINDOWS_DESKTOP\n\tSTDMETHOD(OnDisplayNameChanged) (LPCWSTR /*NewDisplayName*/, LPCGUID /*EventContext*/) { return S_OK; };\n\tSTDMETHOD(OnIconPathChanged) (LPCWSTR /*NewIconPath*/, LPCGUID /*EventContext*/) { return S_OK; };\n\tSTDMETHOD(OnSimpleVolumeChanged) (float /*NewSimpleVolume*/, BOOL /*NewMute*/, LPCGUID /*EventContext*/) { return S_OK; }\n\tSTDMETHOD(OnChannelVolumeChanged) (DWORD /*ChannelCount*/, float /*NewChannelVolumes*/[], DWORD /*ChangedChannel*/, LPCGUID /*EventContext*/) { return S_OK; };\n\tSTDMETHOD(OnGroupingParamChanged) (LPCGUID /*NewGroupingParam*/, LPCGUID /*EventContext*/) { return S_OK; };\n\tSTDMETHOD(OnStateChanged) (AudioSessionState /*NewState*/) { return S_OK; };\n\tSTDMETHOD(OnSessionDisconnected) (AudioSessionDisconnectReason DisconnectReason);\n\tSTDMETHOD(OnDeviceStateChanged) (LPCWSTR /*DeviceId*/, DWORD /*NewState*/) { return S_OK; }\n\tSTDMETHOD(OnDeviceAdded) (LPCWSTR /*DeviceId*/) { return S_OK; };\n\tSTDMETHOD(OnDeviceRemoved) (LPCWSTR /*DeviceId(*/) { return S_OK; };\n\tSTDMETHOD(OnDefaultDeviceChanged) (EDataFlow Flow, ERole Role, LPCWSTR NewDefaultDeviceId);\n\tSTDMETHOD(OnPropertyValueChanged) (LPCWSTR /*DeviceId*/, const PROPERTYKEY /*Key*/) { return S_OK; };\n\n\t//\n\t//  IUnknown\n\t//\n\tSTDMETHOD(QueryInterface)(REFIID iid, void **pvObject);\n#endif\n};\n\n}\n}\n\n#endif //LIBTGVOIP_AUDIOOUTPUTWASAPI_H\n"
  },
  {
    "path": "libtgvoip-public/os/windows/CXWrapper.cpp",
    "content": "﻿#include <stdlib.h>\r\n#include <string.h>\r\n#include <windows.h>\r\n#include <vector>\r\n#include <string>\r\n#include <collection.h>\r\n#include \"CXWrapper.h\"\r\n#include <wrl.h>  \r\n#include <robuffer.h>  \r\n\r\nusing namespace Windows::Storage::Streams;\r\nusing namespace Microsoft::WRL;\r\nusing namespace libtgvoip;\r\nusing namespace Platform;\r\nusing namespace tgvoip;\r\nusing namespace Windows::Security::Cryptography;\r\nusing namespace Windows::Security::Cryptography::Core;\r\nusing namespace Windows::Storage::Streams;\r\nusing namespace Windows::Data::Json;\r\nusing namespace Windows::Phone::Media::Devices;\r\n\r\n//CryptographicHash^ MicrosoftCryptoImpl::sha1Hash;\r\n//CryptographicHash^ MicrosoftCryptoImpl::sha256Hash;\r\nHashAlgorithmProvider^ MicrosoftCryptoImpl::sha1Provider;\r\nHashAlgorithmProvider^ MicrosoftCryptoImpl::sha256Provider;\r\nSymmetricKeyAlgorithmProvider^ MicrosoftCryptoImpl::aesKeyProvider;\r\n\r\n/*struct tgvoip_cx_data{\r\n\tVoIPControllerWrapper^ self;\r\n};*/\r\n\r\nVoIPControllerWrapper::VoIPControllerWrapper(){\r\n\tVoIPController::crypto.aes_ige_decrypt=MicrosoftCryptoImpl::AesIgeDecrypt;\r\n\tVoIPController::crypto.aes_ige_encrypt=MicrosoftCryptoImpl::AesIgeEncrypt;\r\n\tVoIPController::crypto.aes_ctr_encrypt = MicrosoftCryptoImpl::AesCtrEncrypt;\r\n\tVoIPController::crypto.sha1=MicrosoftCryptoImpl::SHA1;\r\n\tVoIPController::crypto.sha256=MicrosoftCryptoImpl::SHA256;\r\n\tVoIPController::crypto.rand_bytes=MicrosoftCryptoImpl::RandBytes;\r\n\tMicrosoftCryptoImpl::Init();\r\n\tcontroller=new VoIPController();\r\n\tcontroller->implData=(void*)this;\r\n\tVoIPController::Callbacks callbacks={0};\r\n\tcallbacks.connectionStateChanged=VoIPControllerWrapper::OnStateChanged;\r\n\tcallbacks.signalBarCountChanged=VoIPControllerWrapper::OnSignalBarsChanged;\r\n\tcontroller->SetCallbacks(callbacks);\r\n}\r\n\r\nVoIPControllerWrapper::~VoIPControllerWrapper(){\r\n\tcontroller->Stop();\r\n\tdelete controller;\r\n}\r\n\r\nvoid VoIPControllerWrapper::Start(){\r\n\tcontroller->Start();\r\n}\r\n\r\nvoid VoIPControllerWrapper::Connect(){\r\n\tcontroller->Connect();\r\n}\r\n\r\nvoid VoIPControllerWrapper::SetPublicEndpoints(const Platform::Array<libtgvoip::Endpoint^>^ endpoints, bool allowP2P, int32_t connectionMaxLayer){\r\n\tstd::vector<tgvoip::Endpoint> eps;\r\n\tfor (unsigned int i = 0; i < endpoints->Length; i++)\r\n\t{\r\n\t\tlibtgvoip::Endpoint^ _ep = endpoints[i];\r\n\t\ttgvoip::Endpoint ep;\r\n\t\tep.id = _ep->id;\r\n\t\tep.type = tgvoip::Endpoint::TYPE_UDP_RELAY;\r\n\t\tchar buf[128];\r\n\t\tif (_ep->ipv4){\r\n\t\t\tWideCharToMultiByte(CP_UTF8, 0, _ep->ipv4->Data(), -1, buf, sizeof(buf), NULL, NULL);\r\n\t\t\tep.address = IPv4Address(buf);\r\n\t\t}\r\n\t\tif (_ep->ipv6){\r\n\t\t\tWideCharToMultiByte(CP_UTF8, 0, _ep->ipv6->Data(), -1, buf, sizeof(buf), NULL, NULL);\r\n\t\t\tep.v6address = IPv6Address(buf);\r\n\t\t}\r\n\t\tep.port = _ep->port;\r\n\t\tif (_ep->peerTag->Length != 16)\r\n\t\t\tthrow ref new Platform::InvalidArgumentException(\"Peer tag must be exactly 16 bytes long\");\r\n\t\tmemcpy(ep.peerTag, _ep->peerTag->Data, 16);\r\n\t\teps.push_back(ep);\r\n\t}\r\n\tcontroller->SetRemoteEndpoints(eps, allowP2P, connectionMaxLayer);\r\n}\r\n\r\nvoid VoIPControllerWrapper::SetNetworkType(NetworkType type){\r\n\tcontroller->SetNetworkType((int)type);\r\n}\r\n\r\nvoid VoIPControllerWrapper::SetMicMute(bool mute){\r\n\tcontroller->SetMicMute(mute);\r\n}\r\n\r\nint64 VoIPControllerWrapper::GetPreferredRelayID(){\r\n\treturn controller->GetPreferredRelayID();\r\n}\r\n\r\nvoid VoIPControllerWrapper::SetEncryptionKey(const Platform::Array<uint8>^ key, bool isOutgoing){\r\n\tif(key->Length!=256)\r\n\t\tthrow ref new Platform::InvalidArgumentException(\"Encryption key must be exactly 256 bytes long\");\r\n\tcontroller->SetEncryptionKey((char*)key->Data, isOutgoing);\r\n}\r\n\r\nPlatform::String^ VoIPControllerWrapper::GetDebugString(){\r\n\tstd::string log = controller->GetDebugString();\r\n\tsize_t len = sizeof(wchar_t)*(log.length() + 1);\r\n\twchar_t* wlog = (wchar_t*)malloc(len);\r\n\tMultiByteToWideChar(CP_UTF8, 0, log.c_str(), -1, wlog, len / sizeof(wchar_t));\r\n\tPlatform::String^ res = ref new Platform::String(wlog);\r\n\tfree(wlog);\r\n\treturn res;\r\n}\r\n\r\nPlatform::String^ VoIPControllerWrapper::GetDebugLog(){\r\n\tstd::string log=controller->GetDebugLog();\r\n\tsize_t len=sizeof(wchar_t)*(log.length()+1);\r\n\twchar_t* wlog=(wchar_t*)malloc(len);\r\n\tMultiByteToWideChar(CP_UTF8, 0, log.c_str(), -1, wlog, len/sizeof(wchar_t));\r\n\tPlatform::String^ res=ref new Platform::String(wlog);\r\n\tfree(wlog);\r\n\treturn res;\r\n}\r\n\r\nError VoIPControllerWrapper::GetLastError(){\r\n\treturn (Error)controller->GetLastError();\r\n}\r\n\r\nPlatform::String^ VoIPControllerWrapper::GetVersion(){\r\n\tconst char* v=VoIPController::GetVersion();\r\n\twchar_t buf[32];\r\n\tMultiByteToWideChar(CP_UTF8, 0, v, -1, buf, sizeof(buf));\r\n\treturn ref new Platform::String(buf);\r\n}\r\n\r\nvoid VoIPControllerWrapper::OnStateChanged(VoIPController* c, int state){\r\n\treinterpret_cast<VoIPControllerWrapper^>(c->implData)->OnStateChangedInternal(state);\r\n}\r\n\r\nvoid VoIPControllerWrapper::OnSignalBarsChanged(VoIPController* c, int count){\r\n\treinterpret_cast<VoIPControllerWrapper^>(c->implData)->OnSignalBarsChangedInternal(count);\r\n}\r\n\r\nvoid VoIPControllerWrapper::OnStateChangedInternal(int state){\r\n\tCallStateChanged(this, (CallState)state);\r\n}\r\n\r\nvoid VoIPControllerWrapper::OnSignalBarsChangedInternal(int count){\r\n\tSignalBarsChanged(this, count);\r\n}\r\n\r\nvoid VoIPControllerWrapper::SetConfig(double initTimeout, double recvTimeout, DataSavingMode dataSavingMode, bool enableAEC, bool enableNS, bool enableAGC, Platform::String^ logFilePath, Platform::String^ statsDumpFilePath){\r\n\tVoIPController::Config config{0};\r\n\tconfig.initTimeout=initTimeout;\r\n\tconfig.recvTimeout=recvTimeout;\r\n\tconfig.dataSaving=(int)dataSavingMode;\r\n\tconfig.enableAEC=enableAEC;\r\n\tconfig.enableAGC=enableAGC;\r\n\tconfig.enableNS=enableNS;\r\n\tif(logFilePath!=nullptr&&!logFilePath->IsEmpty()){\r\n\t\tconfig.logFilePath = wstring(logFilePath->Data());\r\n\t\t//WideCharToMultiByte(CP_UTF8, 0, logFilePath->Data(), -1, config.logFilePath, sizeof(config.logFilePath), NULL, NULL);\r\n\t}\r\n\tif (statsDumpFilePath != nullptr&&!statsDumpFilePath->IsEmpty()){\r\n\t\tconfig.statsDumpFilePath = wstring(statsDumpFilePath->Data());\r\n\t\t//WideCharToMultiByte(CP_UTF8, 0, statsDumpFilePath->Data(), -1, config.statsDumpFilePath, sizeof(config.statsDumpFilePath), NULL, NULL);\r\n\t}\r\n\tcontroller->SetConfig(config);\r\n}\r\n\r\nvoid VoIPControllerWrapper::SetProxy(ProxyProtocol protocol, Platform::String^ address, uint16_t port, Platform::String^ username, Platform::String^ password){\r\n\tchar _address[2000];\r\n\tchar _username[256];\r\n\tchar _password[256];\r\n\r\n\tWideCharToMultiByte(CP_UTF8, 0, address->Data(), -1, _address, sizeof(_address), NULL, NULL);\r\n\tWideCharToMultiByte(CP_UTF8, 0, username->Data(), -1, _username, sizeof(_username), NULL, NULL);\r\n\tWideCharToMultiByte(CP_UTF8, 0, password->Data(), -1, _password, sizeof(_password), NULL, NULL);\r\n\r\n\tcontroller->SetProxy((int)protocol, _address, port, _username, _password);\r\n}\r\n\r\nint VoIPControllerWrapper::GetSignalBarsCount(){\r\n\treturn controller->GetSignalBarsCount();\r\n}\r\n\r\nvoid VoIPControllerWrapper::SetAudioOutputGainControlEnabled(bool enabled){\r\n\tcontroller->SetAudioOutputGainControlEnabled(enabled);\r\n}\r\n\r\nvoid VoIPControllerWrapper::UpdateServerConfig(Platform::String^ json){\r\n\tJsonObject^ jconfig=JsonValue::Parse(json)->GetObject();\r\n\tstd::map<std::string, std::string> config;\r\n\r\n\tfor each (auto item in jconfig){\r\n\t\tchar _key[128];\r\n\t\tchar _value[256];\r\n\t\tWideCharToMultiByte(CP_UTF8, 0, item->Key->Data(), -1, _key, sizeof(_key), NULL, NULL);\r\n\t\tif (item->Value->ValueType == Windows::Data::Json::JsonValueType::Number)\r\n\t\t{\r\n\t\t\tstd::string str = to_string((int)item->Value->GetNumber());\r\n\t\t\tstrncpy(_value, str.c_str(), sizeof(_value));\r\n\t\t}\r\n\t\telse if (item->Value->ValueType == Windows::Data::Json::JsonValueType::Boolean)\r\n\t\t{\r\n\t\t\tstd::string str = item->Value->GetBoolean() ? \"true\" : \"false\";\r\n\t\t\tstrncpy(_value, str.c_str(), sizeof(_value));\r\n\t\t}\r\n\t\telse if(item->Value->ValueType==Windows::Data::Json::JsonValueType::String)\r\n\t\t\tWideCharToMultiByte(CP_UTF8, 0, item->Value->GetString()->Data(), -1, _value, sizeof(_value), NULL, NULL);\r\n\t\telse\r\n\t\t\tWideCharToMultiByte(CP_UTF8, 0, item->Value->ToString()->Data(), -1, _value, sizeof(_value), NULL, NULL);\r\n\t\tstd::string key(_key);\r\n\t\tstd::string value(_value);\r\n\r\n\t\tconfig[key]=value;\r\n\t}\r\n\r\n\tServerConfig::GetSharedInstance()->Update(config);\r\n}\r\n\r\nvoid VoIPControllerWrapper::SwitchSpeaker(bool external){\r\n\tauto routingManager = AudioRoutingManager::GetDefault();\r\n\tif (external){\r\n\t\troutingManager->SetAudioEndpoint(AudioRoutingEndpoint::Speakerphone);\r\n\t}\r\n\telse{\r\n\t\tif ((routingManager->AvailableAudioEndpoints & AvailableAudioRoutingEndpoints::Bluetooth) == AvailableAudioRoutingEndpoints::Bluetooth){\r\n\t\t\troutingManager->SetAudioEndpoint(AudioRoutingEndpoint::Bluetooth);\r\n\t\t}\r\n\t\telse if ((routingManager->AvailableAudioEndpoints & AvailableAudioRoutingEndpoints::Earpiece) == AvailableAudioRoutingEndpoints::Earpiece){\r\n\t\t\troutingManager->SetAudioEndpoint(AudioRoutingEndpoint::Earpiece);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::AesIgeEncrypt(uint8_t* in, uint8_t* out, size_t len, uint8_t* key, uint8_t* iv){\r\n\tIBuffer^ keybuf=IBufferFromPtr(key, 32);\r\n\tCryptographicKey^ _key=aesKeyProvider->CreateSymmetricKey(keybuf);\r\n\tuint8_t tmpOut[16];\r\n\tuint8_t* xPrev=iv+16;\r\n\tuint8_t* yPrev=iv;\r\n\tuint8_t x[16];\r\n\tuint8_t y[16];\r\n\tfor(size_t offset=0;offset<len;offset+=16){\r\n\t\tfor (size_t i=0;i<16;i++){\r\n\t\t\tif (offset+i < len){\r\n\t\t\t\tx[i] = in[offset+i];\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tx[i]=0;\r\n\t\t\t}\r\n\t\t}\r\n\t\tXorInt128(x, yPrev, y);\r\n\t\tIBuffer^ inbuf=IBufferFromPtr(y, 16);\r\n\t\tIBuffer^ outbuf=CryptographicEngine::Encrypt(_key, inbuf, nullptr);\r\n\t\tIBufferToPtr(outbuf, 16, tmpOut);\r\n\t\tXorInt128(tmpOut, xPrev, y);\r\n\t\tmemcpy(xPrev, x, 16);\r\n\t\tmemcpy(yPrev, y, 16);\r\n\t\tmemcpy(out+offset, y, 16);\r\n\t}\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::AesIgeDecrypt(uint8_t* in, uint8_t* out, size_t len, uint8_t* key, uint8_t* iv){\r\n\tIBuffer^ keybuf=IBufferFromPtr(key, 32);\r\n\tCryptographicKey^ _key=aesKeyProvider->CreateSymmetricKey(keybuf);\r\n\tuint8_t tmpOut[16];\r\n\tuint8_t* xPrev=iv;\r\n\tuint8_t* yPrev=iv+16;\r\n\tuint8_t x[16];\r\n\tuint8_t y[16];\r\n\tfor(size_t offset=0;offset<len;offset+=16){\r\n\t\tfor (size_t i=0;i<16;i++){\r\n\t\t\tif (offset+i < len){\r\n\t\t\t\tx[i] = in[offset+i];\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tx[i]=0;\r\n\t\t\t}\r\n\t\t}\r\n\t\tXorInt128(x, yPrev, y);\r\n\t\tIBuffer^ inbuf=IBufferFromPtr(y, 16);\r\n\t\tIBuffer^ outbuf=CryptographicEngine::Decrypt(_key, inbuf, nullptr);\r\n\t\tIBufferToPtr(outbuf, 16, tmpOut);\r\n\t\tXorInt128(tmpOut, xPrev, y);\r\n\t\tmemcpy(xPrev, x, 16);\r\n\t\tmemcpy(yPrev, y, 16);\r\n\t\tmemcpy(out+offset, y, 16);\r\n\t}\r\n}\r\n\r\n#define GETU32(pt) (((uint32_t)(pt)[0] << 24) ^ ((uint32_t)(pt)[1] << 16) ^ ((uint32_t)(pt)[2] <<  8) ^ ((uint32_t)(pt)[3]))\r\n#define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); }\r\n\r\ntypedef  uint8_t u8;\r\n\r\n#define L_ENDIAN\r\n\r\n/* increment counter (128-bit int) by 2^64 */\r\nstatic void AES_ctr128_inc(unsigned char *counter) {\r\n\tunsigned long c;\r\n\r\n\t/* Grab 3rd dword of counter and increment */\r\n#ifdef L_ENDIAN\r\n\tc = GETU32(counter + 8);\r\n\tc++;\r\n\tPUTU32(counter + 8, c);\r\n#else\r\n\tc = GETU32(counter + 4);\r\n\tc++;\r\n\tPUTU32(counter + 4, c);\r\n#endif\r\n\r\n\t/* if no overflow, we're done */\r\n\tif (c)\r\n\t\treturn;\r\n\r\n\t/* Grab top dword of counter and increment */\r\n#ifdef L_ENDIAN\r\n\tc = GETU32(counter + 12);\r\n\tc++;\r\n\tPUTU32(counter + 12, c);\r\n#else\r\n\tc = GETU32(counter + 0);\r\n\tc++;\r\n\tPUTU32(counter + 0, c);\r\n#endif\r\n\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::AesCtrEncrypt(uint8_t* inout, size_t len, uint8_t* key, uint8_t* counter, uint8_t* ecount_buf, uint32_t* num){\r\n\tunsigned int n;\r\n\tunsigned long l = len;\r\n\r\n\t//assert(in && out && key && counter && num);\r\n\t//assert(*num < AES_BLOCK_SIZE);\r\n\r\n\tIBuffer^ keybuf = IBufferFromPtr(key, 32);\r\n\tCryptographicKey^ _key = aesKeyProvider->CreateSymmetricKey(keybuf);\r\n\r\n\tn = *num;\r\n\r\n\twhile (l--) {\r\n\t\tif (n == 0) {\r\n\t\t\tIBuffer^ inbuf = IBufferFromPtr(counter, 16);\r\n\t\t\tIBuffer^ outbuf = CryptographicEngine::Encrypt(_key, inbuf, nullptr);\r\n\t\t\tIBufferToPtr(outbuf, 16, ecount_buf);\r\n\t\t\t//AES_encrypt(counter, ecount_buf, key);\r\n\t\t\tAES_ctr128_inc(counter);\r\n\t\t}\r\n\t\t*inout = *(inout++) ^ ecount_buf[n];\r\n\t\tn = (n + 1) % 16;\r\n\t}\r\n\r\n\t*num = n;\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::SHA1(uint8_t* msg, size_t len, uint8_t* out){\r\n\t//EnterCriticalSection(&hashMutex);\r\n\r\n\tIBuffer^ arr=IBufferFromPtr(msg, len);\r\n\tCryptographicHash^ hash=sha1Provider->CreateHash();\r\n\thash->Append(arr);\r\n\tIBuffer^ res=hash->GetValueAndReset();\r\n\tIBufferToPtr(res, 20, out);\r\n\r\n\t//LeaveCriticalSection(&hashMutex);\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::SHA256(uint8_t* msg, size_t len, uint8_t* out){\r\n\t//EnterCriticalSection(&hashMutex);\r\n\r\n\tIBuffer^ arr=IBufferFromPtr(msg, len);\r\n\tCryptographicHash^ hash=sha256Provider->CreateHash();\r\n\thash->Append(arr);\r\n\tIBuffer^ res=hash->GetValueAndReset();\r\n\tIBufferToPtr(res, 32, out);\r\n\t//LeaveCriticalSection(&hashMutex);\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::RandBytes(uint8_t* buffer, size_t len){\r\n\tIBuffer^ res=CryptographicBuffer::GenerateRandom(len);\r\n\tIBufferToPtr(res, len, buffer);\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::Init(){\r\n\t/*sha1Hash=HashAlgorithmProvider::OpenAlgorithm(HashAlgorithmNames::Sha1)->CreateHash();\r\n\tsha256Hash=HashAlgorithmProvider::OpenAlgorithm(HashAlgorithmNames::Sha256)->CreateHash();*/\r\n\tsha1Provider=HashAlgorithmProvider::OpenAlgorithm(HashAlgorithmNames::Sha1);\r\n\tsha256Provider=HashAlgorithmProvider::OpenAlgorithm(HashAlgorithmNames::Sha256);\r\n\taesKeyProvider=SymmetricKeyAlgorithmProvider::OpenAlgorithm(SymmetricAlgorithmNames::AesEcb);\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::XorInt128(uint8_t* a, uint8_t* b, uint8_t* out){\r\n\tuint64_t* _a=reinterpret_cast<uint64_t*>(a);\r\n\tuint64_t* _b=reinterpret_cast<uint64_t*>(b);\r\n\tuint64_t* _out=reinterpret_cast<uint64_t*>(out);\r\n\t_out[0]=_a[0]^_b[0];\r\n\t_out[1]=_a[1]^_b[1];\r\n}\r\n\r\nvoid MicrosoftCryptoImpl::IBufferToPtr(IBuffer^ buffer, size_t len, uint8_t* out)\r\n{\r\n\tComPtr<IBufferByteAccess> bufferByteAccess;\r\n\treinterpret_cast<IInspectable*>(buffer)->QueryInterface(IID_PPV_ARGS(&bufferByteAccess));\r\n\r\n\tbyte* hashBuffer;\r\n\tbufferByteAccess->Buffer(&hashBuffer);\r\n\tCopyMemory(out, hashBuffer, len);\r\n}\r\n\r\nIBuffer^ MicrosoftCryptoImpl::IBufferFromPtr(uint8_t* msg, size_t len)\r\n{\r\n\tComPtr<NativeBuffer> nativeBuffer=Make<NativeBuffer>((byte *)msg, len);\r\n\treturn reinterpret_cast<IBuffer^>(nativeBuffer.Get());\r\n}\r\n\r\n/*Platform::String^ VoIPControllerWrapper::TestAesIge(){\r\n\tMicrosoftCryptoImpl::Init();\r\n\tPlatform::String^ res=\"\";\r\n\tPlatform::Array<uint8>^ data=ref new Platform::Array<uint8>(32);\r\n\tPlatform::Array<uint8>^ out=ref new Platform::Array<uint8>(32);\r\n\tPlatform::Array<uint8>^ key=ref new Platform::Array<uint8>(16);\r\n\tPlatform::Array<uint8>^ iv=ref new Platform::Array<uint8>(32);\r\n\t\r\n\t\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"0000000000000000000000000000000000000000000000000000000000000000\"), &data);\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f\"), &iv);\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"000102030405060708090a0b0c0d0e0f\"), &key);\r\n\tMicrosoftCryptoImpl::AesIgeEncrypt(data->Data, out->Data, 32, key->Data, iv->Data);\r\n\tres+=CryptographicBuffer::EncodeToHexString(CryptographicBuffer::CreateFromByteArray(out));\r\n\tres+=\"\\n\";\r\n\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"1A8519A6557BE652E9DA8E43DA4EF4453CF456B4CA488AA383C79C98B34797CB\"), &data);\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f\"), &iv);\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"000102030405060708090a0b0c0d0e0f\"), &key);\r\n\tMicrosoftCryptoImpl::AesIgeDecrypt(data->Data, out->Data, 32, key->Data, iv->Data);\r\n\tres+=CryptographicBuffer::EncodeToHexString(CryptographicBuffer::CreateFromByteArray(out));\r\n\tres+=\"\\n\";\r\n\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"99706487A1CDE613BC6DE0B6F24B1C7AA448C8B9C3403E3467A8CAD89340F53B\"), &data);\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"6D656E746174696F6E206F6620494745206D6F646520666F72204F70656E5353\"), &iv);\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"5468697320697320616E20696D706C65\"), &key);\r\n\tMicrosoftCryptoImpl::AesIgeEncrypt(data->Data, out->Data, 32, key->Data, iv->Data);\r\n\tres+=CryptographicBuffer::EncodeToHexString(CryptographicBuffer::CreateFromByteArray(out));\r\n\tres+=\"\\n\";\r\n\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"4C2E204C6574277320686F70652042656E20676F74206974207269676874210A\"), &data);\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"6D656E746174696F6E206F6620494745206D6F646520666F72204F70656E5353\"), &iv);\r\n\tCryptographicBuffer::CopyToByteArray(CryptographicBuffer::DecodeFromHexString(\"5468697320697320616E20696D706C65\"), &key);\r\n\tMicrosoftCryptoImpl::AesIgeDecrypt(data->Data, out->Data, 32, key->Data, iv->Data);\r\n\tres+=CryptographicBuffer::EncodeToHexString(CryptographicBuffer::CreateFromByteArray(out));\r\n\treturn res;\r\n}*/"
  },
  {
    "path": "libtgvoip-public/os/windows/CXWrapper.h",
    "content": "﻿#pragma once\r\n\r\n#include <wrl.h>\r\n#include <wrl/implements.h>\r\n#include <windows.storage.streams.h>\r\n#include <robuffer.h>\r\n#include <vector>\r\n#include \"../../VoIPController.h\"\r\n#include \"../../VoIPServerConfig.h\"\r\n\r\nnamespace libtgvoip{\r\n\tpublic ref class Endpoint sealed{\r\n\tpublic:\r\n\t\tproperty int64 id;\r\n\t\tproperty uint16 port;\r\n\t\tproperty Platform::String^ ipv4;\r\n\t\tproperty Platform::String^ ipv6;\r\n\t\tproperty Platform::Array<uint8>^ peerTag;\r\n\t};\r\n\r\n\tpublic enum class CallState : int{\r\n\t\tWaitInit=1,\r\n\t\tWaitInitAck,\r\n\t\tEstablished,\r\n\t\tFailed\r\n\t};\r\n\r\n\tpublic enum class Error : int{\r\n\t\tUnknown=0,\r\n\t\tIncompatible,\r\n\t\tTimeout,\r\n\t\tAudioIO\r\n\t};\r\n\r\n\tpublic enum class NetworkType : int{\r\n\t\tUnknown=0,\r\n\t\tGPRS,\r\n\t\tEDGE,\r\n\t\tUMTS,\r\n\t\tHSPA,\r\n\t\tLTE,\r\n\t\tWiFi,\r\n\t\tEthernet,\r\n\t\tOtherHighSpeed,\r\n\t\tOtherLowSpeed,\r\n\t\tDialup,\r\n\t\tOtherMobile\r\n\t};\r\n\r\n\tpublic enum class DataSavingMode{\r\n\t\tNever=0,\r\n\t\tMobileOnly,\r\n\t\tAlways\r\n\t};\r\n\r\n\tpublic enum class ProxyProtocol{\r\n\t\tNone=0,\r\n\t\tSOCKS5\r\n\t};\r\n\r\n\tref class VoIPControllerWrapper;\r\n\tpublic delegate void CallStateChangedEventHandler(VoIPControllerWrapper^ sender, CallState newState);\r\n\r\n\tref class VoIPControllerWrapper;\r\n\tpublic delegate void SignalBarsChangedEventHandler(VoIPControllerWrapper^ sender, int newCount);\r\n\r\n    public ref class VoIPControllerWrapper sealed{\r\n    public:\r\n        VoIPControllerWrapper();\r\n\t\tvirtual ~VoIPControllerWrapper();\r\n\t\tvoid Start();\r\n\t\tvoid Connect();\r\n\t\tvoid SetPublicEndpoints(const Platform::Array<Endpoint^>^ endpoints, bool allowP2P, int32_t connectionMaxLayer);\r\n\t\tvoid SetNetworkType(NetworkType type);\r\n\t\tvoid SetMicMute(bool mute);\r\n\t\tvoid SetEncryptionKey(const Platform::Array<uint8>^ key, bool isOutgoing);\r\n\t\tvoid SetConfig(double initTimeout, double recvTimeout, DataSavingMode dataSavingMode, bool enableAEC, bool enableNS, bool enableAGC, Platform::String^ logFilePath, Platform::String^ statsDumpFilePath);\r\n\t\tvoid SetProxy(ProxyProtocol protocol, Platform::String^ address, uint16_t port, Platform::String^ username, Platform::String^ password);\r\n\t\tint GetSignalBarsCount();\r\n\t\tPlatform::String^ GetDebugString();\r\n\t\tPlatform::String^ GetDebugLog();\r\n\t\tError GetLastError();\r\n\t\tstatic Platform::String^ GetVersion();\r\n\t\tint64 GetPreferredRelayID();\r\n\t\tvoid SetAudioOutputGainControlEnabled(bool enabled);\r\n\t\tstatic void UpdateServerConfig(Platform::String^ json);\r\n\t\tstatic void SwitchSpeaker(bool external);\r\n\t\t//static Platform::String^ TestAesIge();\r\n\r\n\t\tevent CallStateChangedEventHandler^ CallStateChanged;\r\n\t\tevent SignalBarsChangedEventHandler^ SignalBarsChanged;\r\n\r\n\tprivate:\r\n\t\tstatic void OnStateChanged(tgvoip::VoIPController* c, int state);\r\n\t\tstatic void OnSignalBarsChanged(tgvoip::VoIPController* c, int count);\r\n\t\tvoid OnStateChangedInternal(int state);\r\n\t\tvoid OnSignalBarsChangedInternal(int count);\r\n\t\ttgvoip::VoIPController* controller;\r\n    };\r\n\r\n\tref class MicrosoftCryptoImpl{\r\n\tpublic:\r\n\t\tstatic void AesIgeEncrypt(uint8_t* in, uint8_t* out, size_t len, uint8_t* key, uint8_t* iv);\r\n\t\tstatic void AesIgeDecrypt(uint8_t* in, uint8_t* out, size_t len, uint8_t* key, uint8_t* iv);\r\n\t\tstatic void AesCtrEncrypt(uint8_t* inout, size_t len, uint8_t* key, uint8_t* iv, uint8_t* ecount, uint32_t* num);\r\n\t\tstatic void SHA1(uint8_t* msg, size_t len, uint8_t* out);\r\n\t\tstatic void SHA256(uint8_t* msg, size_t len, uint8_t* out);\r\n\t\tstatic void RandBytes(uint8_t* buffer, size_t len);\r\n\t\tstatic void Init();\r\n\tprivate:\r\n\t\tstatic inline void XorInt128(uint8_t* a, uint8_t* b, uint8_t* out);\r\n\t\tstatic void IBufferToPtr(Windows::Storage::Streams::IBuffer^ buffer, size_t len, uint8_t* out);\r\n\t\tstatic Windows::Storage::Streams::IBuffer^ IBufferFromPtr(uint8_t* msg, size_t len);\r\n\t\t/*static Windows::Security::Cryptography::Core::CryptographicHash^ sha1Hash;\r\n\t\tstatic Windows::Security::Cryptography::Core::CryptographicHash^ sha256Hash;*/\r\n\t\tstatic Windows::Security::Cryptography::Core::HashAlgorithmProvider^ sha1Provider;\r\n\t\tstatic Windows::Security::Cryptography::Core::HashAlgorithmProvider^ sha256Provider;\r\n\t\tstatic Windows::Security::Cryptography::Core::SymmetricKeyAlgorithmProvider^ aesKeyProvider;\r\n\t};\r\n\r\n\tclass NativeBuffer :\r\n\t\tpublic Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::RuntimeClassType::WinRtClassicComMix>,\r\n\t\tABI::Windows::Storage::Streams::IBuffer,\r\n\t\tWindows::Storage::Streams::IBufferByteAccess>\r\n\t{\r\n\tpublic:\r\n\t\tNativeBuffer(byte *buffer, UINT totalSize)\r\n\t\t{\r\n\t\t\tm_length=totalSize;\r\n\t\t\tm_buffer=buffer;\r\n\t\t}\r\n\r\n\t\tvirtual ~NativeBuffer()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\tSTDMETHODIMP RuntimeClassInitialize(byte *buffer, UINT totalSize)\r\n\t\t{\r\n\t\t\tm_length=totalSize;\r\n\t\t\tm_buffer=buffer;\r\n\t\t\treturn S_OK;\r\n\t\t}\r\n\r\n\t\tSTDMETHODIMP Buffer(byte **value)\r\n\t\t{\r\n\t\t\t*value=m_buffer;\r\n\t\t\treturn S_OK;\r\n\t\t}\r\n\r\n\t\tSTDMETHODIMP get_Capacity(UINT32 *value)\r\n\t\t{\r\n\t\t\t*value=m_length;\r\n\t\t\treturn S_OK;\r\n\t\t}\r\n\r\n\t\tSTDMETHODIMP get_Length(UINT32 *value)\r\n\t\t{\r\n\t\t\t*value=m_length;\r\n\t\t\treturn S_OK;\r\n\t\t}\r\n\r\n\t\tSTDMETHODIMP put_Length(UINT32 value)\r\n\t\t{\r\n\t\t\tm_length=value;\r\n\t\t\treturn S_OK;\r\n\t\t}\r\n\r\n\tprivate:\r\n\t\tUINT32 m_length;\r\n\t\tbyte *m_buffer;\r\n\t};\r\n}"
  },
  {
    "path": "libtgvoip-public/os/windows/NetworkSocketWinsock.cpp",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#include \"NetworkSocketWinsock.h\"\n#include <winsock2.h>\n#include <ws2tcpip.h>\n#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP\n\n#else\n#include <IPHlpApi.h>\n#endif\n#include <assert.h>\n#include \"../../logging.h\"\n#include \"../../VoIPController.h\"\n\nusing namespace tgvoip;\n\nNetworkSocketWinsock::NetworkSocketWinsock(NetworkProtocol protocol) : NetworkSocket(protocol), lastRecvdV4(0), lastRecvdV6(\"::0\"){\n\tneedUpdateNat64Prefix=true;\n\tnat64Present=false;\n\tswitchToV6at=0;\n\tisV4Available=false;\n\tclosing=false;\n\tfd=INVALID_SOCKET;\n\n#ifdef TGVOIP_WINXP_COMPAT\n\tDWORD version=GetVersion();\n\tisAtLeastVista=LOBYTE(LOWORD(version))>=6; // Vista is 6.0, XP is 5.1 and 5.2\n#else\n\tisAtLeastVista=true;\n#endif\n\n\tWSADATA wsaData;\n\tWSAStartup(MAKEWORD(2, 2), &wsaData);\n\tLOGD(\"Initialized winsock, version %d.%d\", wsaData.wHighVersion, wsaData.wVersion);\n\ttcpConnectedAddress=NULL;\n}\n\nNetworkSocketWinsock::~NetworkSocketWinsock(){\n\tif(tcpConnectedAddress)\n\t\tdelete tcpConnectedAddress;\n}\n\nvoid NetworkSocketWinsock::SetMaxPriority(){\n\t\n}\n\nvoid NetworkSocketWinsock::Send(NetworkPacket *packet){\n\tif(!packet || (protocol==PROTO_UDP && !packet->address)){\n\t\tLOGW(\"tried to send null packet %d %d\", (int)packet, protocol);\n\t\treturn;\n\t}\n\tint res;\n\tif(protocol==PROTO_UDP){\n\t\tIPv4Address *v4addr=dynamic_cast<IPv4Address *>(packet->address);\n\t\tif(isAtLeastVista){\n\t\t\tsockaddr_in6 addr;\n\t\t\tif(v4addr){\n\t\t\t\tif(needUpdateNat64Prefix && !isV4Available && VoIPController::GetCurrentTime()>switchToV6at && switchToV6at!=0){\n\t\t\t\t\tLOGV(\"Updating NAT64 prefix\");\n\t\t\t\t\tnat64Present=false;\n\t\t\t\t\taddrinfo *addr0;\n\t\t\t\t\tint res=getaddrinfo(\"ipv4only.arpa\", NULL, NULL, &addr0);\n\t\t\t\t\tif(res!=0){\n\t\t\t\t\t\tLOGW(\"Error updating NAT64 prefix: %d / %s\", res, gai_strerror(res));\n\t\t\t\t\t}else{\n\t\t\t\t\t\taddrinfo *addrPtr;\n\t\t\t\t\t\tunsigned char *addr170=NULL;\n\t\t\t\t\t\tunsigned char *addr171=NULL;\n\t\t\t\t\t\tfor(addrPtr=addr0; addrPtr; addrPtr=addrPtr->ai_next){\n\t\t\t\t\t\t\tif(addrPtr->ai_family==AF_INET6){\n\t\t\t\t\t\t\t\tsockaddr_in6 *translatedAddr=(sockaddr_in6 *) addrPtr->ai_addr;\n\t\t\t\t\t\t\t\tuint32_t v4part=*((uint32_t *) &translatedAddr->sin6_addr.s6_addr[12]);\n\t\t\t\t\t\t\t\tif(v4part==0xAA0000C0 && !addr170){\n\t\t\t\t\t\t\t\t\taddr170=translatedAddr->sin6_addr.s6_addr;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(v4part==0xAB0000C0 && !addr171){\n\t\t\t\t\t\t\t\t\taddr171=translatedAddr->sin6_addr.s6_addr;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tchar buf[INET6_ADDRSTRLEN];\n\t\t\t\t\t\t\t\t//LOGV(\"Got translated address: %s\", inet_ntop(AF_INET6, &translatedAddr->sin6_addr, buf, sizeof(buf)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(addr170 && addr171 && memcmp(addr170, addr171, 12)==0){\n\t\t\t\t\t\t\tnat64Present=true;\n\t\t\t\t\t\t\tmemcpy(nat64Prefix, addr170, 12);\n\t\t\t\t\t\t\tchar buf[INET6_ADDRSTRLEN];\n\t\t\t\t\t\t\t//LOGV(\"Found nat64 prefix from %s\", inet_ntop(AF_INET6, addr170, buf, sizeof(buf)));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tLOGV(\"Didn't find nat64\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfreeaddrinfo(addr0);\n\t\t\t\t\t}\n\t\t\t\t\tneedUpdateNat64Prefix=false;\n\t\t\t\t}\n\t\t\t\tmemset(&addr, 0, sizeof(sockaddr_in6));\n\t\t\t\taddr.sin6_family=AF_INET6;\n\t\t\t\t*((uint32_t *) &addr.sin6_addr.s6_addr[12])=v4addr->GetAddress();\n\t\t\t\tif(nat64Present)\n\t\t\t\t\tmemcpy(addr.sin6_addr.s6_addr, nat64Prefix, 12);\n\t\t\t\telse\n\t\t\t\t\taddr.sin6_addr.s6_addr[11]=addr.sin6_addr.s6_addr[10]=0xFF;\n\n\t\t\t}else{\n\t\t\t\tIPv6Address *v6addr=dynamic_cast<IPv6Address *>(packet->address);\n\t\t\t\tassert(v6addr!=NULL);\n\t\t\t\tmemcpy(addr.sin6_addr.s6_addr, v6addr->GetAddress(), 16);\n\t\t\t}\n\t\t\taddr.sin6_port=htons(packet->port);\n\t\t\tres=sendto(fd, (const char*)packet->data, packet->length, 0, (const sockaddr *) &addr, sizeof(addr));\n\t\t}else if(v4addr){\n\t\t\tsockaddr_in addr;\n\t\t\taddr.sin_addr.s_addr=v4addr->GetAddress();\n\t\t\taddr.sin_port=htons(packet->port);\n\t\t\taddr.sin_family=AF_INET;\n\t\t\tres=sendto(fd, (const char*)packet->data, packet->length, 0, (const sockaddr*)&addr, sizeof(addr));\n\t\t}\n\t}else{\n\t\tres=send(fd, (const char*)packet->data, packet->length, 0);\n\t}\n\tif(res==SOCKET_ERROR){\n\t\tLOGE(\"error sending: %d\", WSAGetLastError());\n\t\tif(errno==ENETUNREACH && !isV4Available && VoIPController::GetCurrentTime()<switchToV6at){\n\t\t\tswitchToV6at=VoIPController::GetCurrentTime();\n\t\t\tLOGI(\"Network unreachable, trying NAT64\");\n\t\t}\n\t}\n}\n\nvoid NetworkSocketWinsock::Receive(NetworkPacket *packet){\n\tif(protocol==PROTO_UDP){\n\t\tif(isAtLeastVista){\n\t\t\tint addrLen=sizeof(sockaddr_in6);\n\t\t\tsockaddr_in6 srcAddr;\n\t\t\tint res=recvfrom(fd, (char*)packet->data, packet->length, 0, (sockaddr *) &srcAddr, (socklen_t *) &addrLen);\n\t\t\tif(res!=SOCKET_ERROR)\n\t\t\t\tpacket->length=(size_t) res;\n\t\t\telse{\n\t\t\t\tLOGE(\"error receiving %d\", WSAGetLastError());\n\t\t\t\tpacket->length=0;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//LOGV(\"Received %d bytes from %s:%d at %.5lf\", len, inet_ntoa(srcAddr.sin_addr), ntohs(srcAddr.sin_port), GetCurrentTime());\n\t\t\tif(!isV4Available && IN6_IS_ADDR_V4MAPPED(&srcAddr.sin6_addr)){\n\t\t\t\tisV4Available=true;\n\t\t\t\tLOGI(\"Detected IPv4 connectivity, will not try IPv6\");\n\t\t\t}\n\t\t\tif(IN6_IS_ADDR_V4MAPPED(&srcAddr.sin6_addr) || (nat64Present && memcmp(nat64Prefix, srcAddr.sin6_addr.s6_addr, 12)==0)){\n\t\t\t\tin_addr v4addr=*((in_addr *) &srcAddr.sin6_addr.s6_addr[12]);\n\t\t\t\tlastRecvdV4=IPv4Address(v4addr.s_addr);\n\t\t\t\tpacket->address=&lastRecvdV4;\n\t\t\t}else{\n\t\t\t\tlastRecvdV6=IPv6Address(srcAddr.sin6_addr.s6_addr);\n\t\t\t\tpacket->address=&lastRecvdV6;\n\t\t\t}\n\t\t\tpacket->port=ntohs(srcAddr.sin6_port);\n\t\t}else{\n\t\t\tint addrLen=sizeof(sockaddr_in);\n\t\t\tsockaddr_in srcAddr;\n\t\t\tint res=recvfrom(fd, (char*)packet->data, packet->length, 0, (sockaddr *) &srcAddr, (socklen_t *) &addrLen);\n\t\t\tif(res!=SOCKET_ERROR)\n\t\t\t\tpacket->length=(size_t) res;\n\t\t\telse{\n\t\t\t\tLOGE(\"error receiving %d\", WSAGetLastError());\n\t\t\t\tpacket->length=0;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlastRecvdV4=IPv4Address(srcAddr.sin_addr.s_addr);\n\t\t\tpacket->address=&lastRecvdV4;\n\t\t\tpacket->port=ntohs(srcAddr.sin_port);\n\t\t}\n\t\tpacket->protocol=PROTO_UDP;\n\t}else if(protocol==PROTO_TCP){\n\t\tint res=recv(fd, (char*)packet->data, packet->length, 0);\n\t\tif(res==SOCKET_ERROR){\n\t\t\tLOGE(\"Error receiving from TCP socket: %d\", WSAGetLastError());\n\t\t\tfailed=true;\n\t\t}else{\n\t\t\tpacket->length=(size_t)res;\n\t\t\tpacket->address=tcpConnectedAddress;\n\t\t\tpacket->port=tcpConnectedPort;\n\t\t\tpacket->protocol=PROTO_TCP;\n\t\t}\n\t}\n}\n\nvoid NetworkSocketWinsock::Open(){\n\tif(protocol==PROTO_UDP){\n\t\tfd=socket(isAtLeastVista ? AF_INET6 : AF_INET, SOCK_DGRAM, IPPROTO_UDP);\n\t\tif(fd==INVALID_SOCKET){\n\t\t\tint error=WSAGetLastError();\n\t\t\tLOGE(\"error creating socket: %d\", error);\n\t\t\tfailed=true;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint res;\n\t\tif(isAtLeastVista){\n\t\t\tDWORD flag=0;\n\t\t\tres=setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&flag, sizeof(flag));\n\t\t\tif(res==SOCKET_ERROR){\n\t\t\t\tLOGE(\"error enabling dual stack socket: %d\", WSAGetLastError());\n\t\t\t\tfailed=true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tSetMaxPriority();\n\n\t\tint tries=0;\n\t\tsockaddr* addr;\n\t\tsockaddr_in addr4;\n\t\tsockaddr_in6 addr6;\n\t\tint addrLen;\n\t\tif(isAtLeastVista){\n\t\t\t//addr.sin6_addr.s_addr=0;\n\t\t\tmemset(&addr6, 0, sizeof(sockaddr_in6));\n\t\t\t//addr.sin6_len=sizeof(sa_family_t);\n\t\t\taddr6.sin6_family=AF_INET6;\n\t\t\taddr=(sockaddr*)&addr6;\n\t\t\taddrLen=sizeof(addr6);\n\t\t}else{\n\t\t\tsockaddr_in addr4;\n\t\t\taddr4.sin_addr.s_addr=0;\n\t\t\taddr4.sin_family=AF_INET;\n\t\t\taddr=(sockaddr*)&addr4;\n\t\t\taddrLen=sizeof(addr4);\n\t\t}\n\t\tfor(tries=0;tries<10;tries++){\n\t\t\tuint16_t port=htons(GenerateLocalPort());\n\t\t\tif(isAtLeastVista)\n\t\t\t\t((sockaddr_in6*)addr)->sin6_port=port;\n\t\t\telse\n\t\t\t\t((sockaddr_in*)addr)->sin_port=port;\n\t\t\tres=::bind(fd, addr, addrLen);\n\t\t\tLOGV(\"trying bind to port %u\", ntohs(port));\n\t\t\tif(res<0){\n\t\t\t\tLOGE(\"error binding to port %u: %d / %s\", ntohs(port), errno, strerror(errno));\n\t\t\t}else{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(tries==10){\n\t\t\tif(isAtLeastVista)\n\t\t\t\t((sockaddr_in6*)addr)->sin6_port=0;\n\t\t\telse\n\t\t\t\t((sockaddr_in*)addr)->sin_port=0;\n\t\t\tres=::bind(fd, addr, addrLen);\n\t\t\tif(res<0){\n\t\t\t\tLOGE(\"error binding to port %u: %d / %s\", 0, errno, strerror(errno));\n\t\t\t\t//SetState(STATE_FAILED);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tgetsockname(fd, addr, (socklen_t*) &addrLen);\n\t\tuint16_t localUdpPort;\n\t\tif(isAtLeastVista)\n\t\t\tlocalUdpPort=ntohs(((sockaddr_in6*)addr)->sin6_port);\n\t\telse\n\t\t\tlocalUdpPort=ntohs(((sockaddr_in*)addr)->sin_port);\n\t\tLOGD(\"Bound to local UDP port %u\", localUdpPort);\n\n\t\tneedUpdateNat64Prefix=true;\n\t\tisV4Available=false;\n\t\tswitchToV6at=VoIPController::GetCurrentTime()+ipv6Timeout;\n\t}\n}\n\nvoid NetworkSocketWinsock::Close(){\n\tclosing=true;\n\tfailed=true;\n\tif(fd!=INVALID_SOCKET)\n\t\tclosesocket(fd);\n}\n\nvoid NetworkSocketWinsock::OnActiveInterfaceChanged(){\n\tneedUpdateNat64Prefix=true;\n\tisV4Available=false;\n\tswitchToV6at=VoIPController::GetCurrentTime()+ipv6Timeout;\n}\n\nstd::string NetworkSocketWinsock::GetLocalInterfaceInfo(IPv4Address *v4addr, IPv6Address *v6addr){\n#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP\n\tWindows::Networking::Connectivity::ConnectionProfile^ profile=Windows::Networking::Connectivity::NetworkInformation::GetInternetConnectionProfile();\n\tif(profile){\n\t\tWindows::Foundation::Collections::IVectorView<Windows::Networking::HostName^>^ hostnames=Windows::Networking::Connectivity::NetworkInformation::GetHostNames();\n\t\tfor(unsigned int i=0;i<hostnames->Size;i++){\n\t\t\tWindows::Networking::HostName^ n = hostnames->GetAt(i);\n\t\t\tif(n->Type!=Windows::Networking::HostNameType::Ipv4 && n->Type!=Windows::Networking::HostNameType::Ipv6)\n\t\t\t\tcontinue;\n\t\t\tif(n->IPInformation->NetworkAdapter->Equals(profile->NetworkAdapter)){\n\t\t\t\tif(v4addr && n->Type==Windows::Networking::HostNameType::Ipv4){\n\t\t\t\t\tchar buf[INET_ADDRSTRLEN];\n\t\t\t\t\tWideCharToMultiByte(CP_UTF8, 0, n->RawName->Data(), -1, buf, sizeof(buf), NULL, NULL);\n\t\t\t\t\t*v4addr=IPv4Address(buf);\n\t\t\t\t}else if(v6addr && n->Type==Windows::Networking::HostNameType::Ipv6){\n\t\t\t\t\tchar buf[INET6_ADDRSTRLEN];\n\t\t\t\t\tWideCharToMultiByte(CP_UTF8, 0, n->RawName->Data(), -1, buf, sizeof(buf), NULL, NULL);\n\t\t\t\t\t*v6addr=IPv6Address(buf);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tchar buf[128];\n\t\tWideCharToMultiByte(CP_UTF8, 0, profile->NetworkAdapter->NetworkAdapterId.ToString()->Data(), -1, buf, sizeof(buf), NULL, NULL);\n\t\treturn std::string(buf);\n\t}\n\treturn \"\";\n#else\n\tIP_ADAPTER_ADDRESSES* addrs=(IP_ADAPTER_ADDRESSES*)malloc(15*1024);\n\tULONG size=15*1024;\n\tULONG flags=GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST | GAA_FLAG_SKIP_DNS_SERVER | GAA_FLAG_SKIP_FRIENDLY_NAME;\n\t\n\tULONG res=GetAdaptersAddresses(AF_UNSPEC, flags, NULL, addrs, &size);\n\tif(res==ERROR_BUFFER_OVERFLOW){\n\t\taddrs=(IP_ADAPTER_ADDRESSES*)realloc(addrs, size);\n\t\tres=GetAdaptersAddresses(AF_UNSPEC, flags, NULL, addrs, &size);\n\t}\n\n\tULONG bestMetric=0;\n\tstd::string bestName(\"\");\n\n\tif(res==ERROR_SUCCESS){\n\t\tIP_ADAPTER_ADDRESSES* current=addrs;\n\t\twhile(current){\n\t\t\tchar* name=current->AdapterName;\n\t\t\tLOGV(\"Adapter '%s':\", name);\n\t\t\tIP_ADAPTER_UNICAST_ADDRESS* curAddr=current->FirstUnicastAddress;\n\t\t\tif(current->OperStatus!=IfOperStatusUp){\n\t\t\t\tLOGV(\"-> (down)\");\n\t\t\t\tcurrent=current->Next;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(current->IfType==IF_TYPE_SOFTWARE_LOOPBACK){\n\t\t\t\tLOGV(\"-> (loopback)\");\n\t\t\t\tcurrent=current->Next;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(isAtLeastVista)\n\t\t\t\tLOGV(\"v4 metric: %u, v6 metric: %u\", current->Ipv4Metric, current->Ipv6Metric);\n\t\t\twhile(curAddr){\n\t\t\t\tsockaddr* addr=curAddr->Address.lpSockaddr;\n\t\t\t\tif(addr->sa_family==AF_INET && v4addr){\n\t\t\t\t\tsockaddr_in* ipv4=(sockaddr_in*)addr;\n\t\t\t\t\tLOGV(\"-> V4: %s\", V4AddressToString(ipv4->sin_addr.s_addr).c_str());\n\t\t\t\t\tuint32_t ip=ntohl(ipv4->sin_addr.s_addr);\n\t\t\t\t\tif((ip & 0xFFFF0000)!=0xA9FE0000){\n\t\t\t\t\t\tif(isAtLeastVista){\n\t\t\t\t\t\t\tif(current->Ipv4Metric>bestMetric){\n\t\t\t\t\t\t\t\tbestMetric=current->Ipv4Metric;\n\t\t\t\t\t\t\t\tbestName=std::string(current->AdapterName);\n\t\t\t\t\t\t\t\t*v4addr=IPv4Address(ipv4->sin_addr.s_addr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbestName=std::string(current->AdapterName);\n\t\t\t\t\t\t\t*v4addr=IPv4Address(ipv4->sin_addr.s_addr);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(addr->sa_family==AF_INET6 && v6addr){\n\t\t\t\t\tsockaddr_in6* ipv6=(sockaddr_in6*)addr;\n\t\t\t\t\tLOGV(\"-> V6: %s\", V6AddressToString(ipv6->sin6_addr.s6_addr).c_str());\n\t\t\t\t\tif(!IN6_IS_ADDR_LINKLOCAL(&ipv6->sin6_addr)){\n\t\t\t\t\t\t*v6addr=IPv6Address(ipv6->sin6_addr.s6_addr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcurAddr=curAddr->Next;\n\t\t\t}\n\t\t\tcurrent=current->Next;\n\t\t}\n\t}\n\n\tfree(addrs);\n\treturn bestName;\n#endif\n}\n\nuint16_t NetworkSocketWinsock::GetLocalPort(){\n\tif(!isAtLeastVista){\n\t\tsockaddr_in addr;\n\t\tsize_t addrLen=sizeof(sockaddr_in);\n\t\tgetsockname(fd, (sockaddr*)&addr, (socklen_t*)&addrLen);\n\t\treturn ntohs(addr.sin_port);\n\t}\n\tsockaddr_in6 addr;\n\tsize_t addrLen=sizeof(sockaddr_in6);\n\tgetsockname(fd, (sockaddr*)&addr, (socklen_t*) &addrLen);\n\treturn ntohs(addr.sin6_port);\n}\n\nstd::string NetworkSocketWinsock::V4AddressToString(uint32_t address){\n\tchar buf[INET_ADDRSTRLEN];\n\tsockaddr_in addr;\n\tZeroMemory(&addr, sizeof(addr));\n\taddr.sin_family=AF_INET;\n\taddr.sin_addr.s_addr=address;\n\tDWORD len=sizeof(buf);\n#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP\n\twchar_t wbuf[INET_ADDRSTRLEN];\n\tZeroMemory(wbuf, sizeof(wbuf));\n\tWSAAddressToStringW((sockaddr*)&addr, sizeof(addr), NULL, wbuf, &len);\n\tWideCharToMultiByte(CP_UTF8, 0, wbuf, -1, buf, sizeof(buf), NULL, NULL);\n#else\n\tWSAAddressToStringA((sockaddr*)&addr, sizeof(addr), NULL, buf, &len);\n#endif\n\treturn std::string(buf);\n}\n\nstd::string NetworkSocketWinsock::V6AddressToString(unsigned char *address){\n\tchar buf[INET6_ADDRSTRLEN];\n\tsockaddr_in6 addr;\n\tZeroMemory(&addr, sizeof(addr));\n\taddr.sin6_family=AF_INET6;\n\tmemcpy(addr.sin6_addr.s6_addr, address, 16);\n\tDWORD len=sizeof(buf);\n#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP\n\twchar_t wbuf[INET6_ADDRSTRLEN];\n\tZeroMemory(wbuf, sizeof(wbuf));\n\tWSAAddressToStringW((sockaddr*)&addr, sizeof(addr), NULL, wbuf, &len);\n\tWideCharToMultiByte(CP_UTF8, 0, wbuf, -1, buf, sizeof(buf), NULL, NULL);\n#else\n\tWSAAddressToStringA((sockaddr*)&addr, sizeof(addr), NULL, buf, &len);\n#endif\n\treturn std::string(buf);\n}\n\nuint32_t NetworkSocketWinsock::StringToV4Address(std::string address){\n\tsockaddr_in addr;\n\tZeroMemory(&addr, sizeof(addr));\n\taddr.sin_family=AF_INET;\n\tint size=sizeof(addr);\n#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP\n\twchar_t buf[INET_ADDRSTRLEN];\n\tMultiByteToWideChar(CP_UTF8, 0, address.c_str(), -1, buf, INET_ADDRSTRLEN);\n\tWSAStringToAddressW(buf, AF_INET, NULL, (sockaddr*)&addr, &size);\n#else\n\tWSAStringToAddressA((char*)address.c_str(), AF_INET, NULL, (sockaddr*)&addr, &size);\n#endif\n\treturn addr.sin_addr.s_addr;\n}\n\nvoid NetworkSocketWinsock::StringToV6Address(std::string address, unsigned char *out){\n\tsockaddr_in6 addr;\n\tZeroMemory(&addr, sizeof(addr));\n\taddr.sin6_family=AF_INET6;\n\tint size=sizeof(addr);\n#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP\n\twchar_t buf[INET6_ADDRSTRLEN];\n\tMultiByteToWideChar(CP_UTF8, 0, address.c_str(), -1, buf, INET6_ADDRSTRLEN);\n\tWSAStringToAddressW(buf, AF_INET, NULL, (sockaddr*)&addr, &size);\n#else\n\tWSAStringToAddressA((char*)address.c_str(), AF_INET, NULL, (sockaddr*)&addr, &size);\n#endif\n\tmemcpy(out, addr.sin6_addr.s6_addr, 16);\n}\n\nvoid NetworkSocketWinsock::Connect(NetworkAddress *address, uint16_t port){\n\tIPv4Address* v4addr=dynamic_cast<IPv4Address*>(address);\n\tIPv6Address* v6addr=dynamic_cast<IPv6Address*>(address);\n\tsockaddr_in v4;\n\tsockaddr_in6 v6;\n\tsockaddr* addr=NULL;\n\tsize_t addrLen=0;\n\tif(v4addr){\n\t\tv4.sin_family=AF_INET;\n\t\tv4.sin_addr.s_addr=v4addr->GetAddress();\n\t\tv4.sin_port=htons(port);\n\t\taddr=reinterpret_cast<sockaddr*>(&v4);\n\t\taddrLen=sizeof(v4);\n\t}else if(v6addr){\n\t\tv6.sin6_family=AF_INET6;\n\t\tmemcpy(v6.sin6_addr.s6_addr, v6addr->GetAddress(), 16);\n\t\tv6.sin6_flowinfo=0;\n\t\tv6.sin6_scope_id=0;\n\t\tv6.sin6_port=htons(port);\n\t\taddr=reinterpret_cast<sockaddr*>(&v6);\n\t\taddrLen=sizeof(v6);\n\t}else{\n\t\tLOGE(\"Unknown address type in TCP connect\");\n\t\tfailed=true;\n\t\treturn;\n\t}\n\tfd=socket(addr->sa_family, SOCK_STREAM, IPPROTO_TCP);\n\tif(fd==0){\n\t\tLOGE(\"Error creating TCP socket: %d\", WSAGetLastError());\n\t\tfailed=true;\n\t\treturn;\n\t}\n\tint opt=1;\n\tsetsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const char*)&opt, sizeof(opt));\n\tDWORD timeout=5000;\n\tsetsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout, sizeof(timeout));\n\ttimeout=60000;\n\tsetsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout, sizeof(timeout));\n\tint res=connect(fd, (const sockaddr*) addr, addrLen);\n\tif(res!=0){\n\t\tLOGW(\"error connecting TCP socket to %s:%u: %d\", address->ToString().c_str(), port, WSAGetLastError());\n\t\tclosesocket(fd);\n\t\tfailed=true;\n\t\treturn;\n\t}\n\ttcpConnectedAddress=v4addr ? (NetworkAddress*)new IPv4Address(*v4addr) : (NetworkAddress*)new IPv6Address(*v6addr);\n\ttcpConnectedPort=port;\n\tLOGI(\"successfully connected to %s:%d\", tcpConnectedAddress->ToString().c_str(), tcpConnectedPort);\n}\n\nIPv4Address *NetworkSocketWinsock::ResolveDomainName(std::string name){\n\taddrinfo* addr0;\n\tIPv4Address* ret=NULL;\n\tint res=getaddrinfo(name.c_str(), NULL, NULL, &addr0);\n\tif(res!=0){\n\t\tLOGW(\"Error updating NAT64 prefix: %d / %s\", res, gai_strerror(res));\n\t}else{\n\t\taddrinfo* addrPtr;\n\t\tfor(addrPtr=addr0;addrPtr;addrPtr=addrPtr->ai_next){\n\t\t\tif(addrPtr->ai_family==AF_INET){\n\t\t\t\tsockaddr_in* addr=(sockaddr_in*)addrPtr->ai_addr;\n\t\t\t\tret=new IPv4Address(addr->sin_addr.s_addr);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfreeaddrinfo(addr0);\n\t}\n\treturn ret;\n}\n\nNetworkAddress *NetworkSocketWinsock::GetConnectedAddress(){\n\treturn tcpConnectedAddress;\n}\n\nuint16_t NetworkSocketWinsock::GetConnectedPort(){\n\treturn tcpConnectedPort;\n}\n\nvoid NetworkSocketWinsock::SetTimeouts(int sendTimeout, int recvTimeout){\n\tDWORD timeout=sendTimeout*1000;\n\tsetsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout, sizeof(timeout));\n\ttimeout=recvTimeout*1000;\n\tsetsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout, sizeof(timeout));\n}\n\nbool NetworkSocketWinsock::Select(std::vector<NetworkSocket *> &readFds, std::vector<NetworkSocket *> &errorFds, SocketSelectCanceller* _canceller){\n\tfd_set readSet;\n\tfd_set errorSet;\n\tSocketSelectCancellerWin32* canceller=dynamic_cast<SocketSelectCancellerWin32*>(_canceller);\n\ttimeval timeout={0, 10000};\n\tbool anyFailed=false;\n\tint res=0;\n\n\tdo{\n\t\tFD_ZERO(&readSet);\n\t\tFD_ZERO(&errorSet);\n\n\t\tfor(std::vector<NetworkSocket*>::iterator itr=readFds.begin();itr!=readFds.end();++itr){\n\t\t\tint sfd=GetDescriptorFromSocket(*itr);\n\t\t\tif(sfd==0){\n\t\t\t\tLOGW(\"can't select on one of sockets because it's not a NetworkSocketWinsock instance\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tFD_SET(sfd, &readSet);\n\t\t}\n\n\n\t\tfor(std::vector<NetworkSocket*>::iterator itr=errorFds.begin();itr!=errorFds.end();++itr){\n\t\t\tint sfd=GetDescriptorFromSocket(*itr);\n\t\t\tif(sfd==0){\n\t\t\t\tLOGW(\"can't select on one of sockets because it's not a NetworkSocketWinsock instance\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tanyFailed |= (*itr)->IsFailed();\n\t\t\tFD_SET(sfd, &errorSet);\n\t\t}\n\t\tif(canceller && canceller->canceled)\n\t\t\tbreak;\n\t\tres=select(0, &readSet, NULL, &errorSet, &timeout);\n\t\t//LOGV(\"select result %d\", res);\n\t\tif(res==SOCKET_ERROR)\n\t\t\tLOGE(\"SELECT ERROR %d\", WSAGetLastError());\n\t}while(res==0);\n\n\n\tif(canceller && canceller->canceled && !anyFailed){\n\t\tcanceller->canceled=false;\n\t\treturn false;\n\t}else if(anyFailed){\n\t\tFD_ZERO(&readSet);\n\t\tFD_ZERO(&errorSet);\n\t}\n\n\tstd::vector<NetworkSocket*>::iterator itr=readFds.begin();\n\twhile(itr!=readFds.end()){\n\t\tint sfd=GetDescriptorFromSocket(*itr);\n\t\tif(sfd==0 || !FD_ISSET(sfd, &readSet)){\n\t\t\titr=readFds.erase(itr);\n\t\t}else{\n\t\t\t++itr;\n\t\t}\n\t}\n\n\titr=errorFds.begin();\n\twhile(itr!=errorFds.end()){\n\t\tint sfd=GetDescriptorFromSocket(*itr);\n\t\tif((sfd==0 || !FD_ISSET(sfd, &errorSet)) && !(*itr)->IsFailed()){\n\t\t\titr=errorFds.erase(itr);\n\t\t}else{\n\t\t\t++itr;\n\t\t}\n\t}\n\t//LOGV(\"select fds left: read=%d, error=%d\", readFds.size(), errorFds.size());\n\n\treturn readFds.size()>0 || errorFds.size()>0;\n}\n\nSocketSelectCancellerWin32::SocketSelectCancellerWin32(){\n\tcanceled=false;\n}\n\nSocketSelectCancellerWin32::~SocketSelectCancellerWin32(){\n}\n\nvoid SocketSelectCancellerWin32::CancelSelect(){\n\tcanceled=true;\n}\n\nint NetworkSocketWinsock::GetDescriptorFromSocket(NetworkSocket *socket){\n\tNetworkSocketWinsock* sp=dynamic_cast<NetworkSocketWinsock*>(socket);\n\tif(sp)\n\t\treturn sp->fd;\n\tNetworkSocketWrapper* sw=dynamic_cast<NetworkSocketWrapper*>(socket);\n\tif(sw)\n\t\treturn GetDescriptorFromSocket(sw->GetWrapped());\n\treturn 0;\n}\n"
  },
  {
    "path": "libtgvoip-public/os/windows/NetworkSocketWinsock.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_NETWORKSOCKETWINSOCK_H\n#define LIBTGVOIP_NETWORKSOCKETWINSOCK_H\n\n#include \"../../NetworkSocket.h\"\n#include <stdint.h>\n#include <vector>\n\nnamespace tgvoip {\n\nclass SocketSelectCancellerWin32 : public SocketSelectCanceller{\nfriend class NetworkSocketWinsock;\npublic:\n\tSocketSelectCancellerWin32();\n\tvirtual ~SocketSelectCancellerWin32();\n\tvirtual void CancelSelect();\nprivate:\n\tbool canceled;\n};\n\nclass NetworkSocketWinsock : public NetworkSocket{\npublic:\n\tNetworkSocketWinsock(NetworkProtocol protocol);\n\tvirtual ~NetworkSocketWinsock();\n\tvirtual void Send(NetworkPacket* packet);\n\tvirtual void Receive(NetworkPacket* packet);\n\tvirtual void Open();\n\tvirtual void Close();\n\tvirtual std::string GetLocalInterfaceInfo(IPv4Address* v4addr, IPv6Address* v6addr);\n\tvirtual void OnActiveInterfaceChanged();\n\tvirtual uint16_t GetLocalPort();\n\tvirtual void Connect(NetworkAddress* address, uint16_t port);\n\n\tstatic std::string V4AddressToString(uint32_t address);\n\tstatic std::string V6AddressToString(unsigned char address[16]);\n\tstatic uint32_t StringToV4Address(std::string address);\n\tstatic void StringToV6Address(std::string address, unsigned char* out);\n\tstatic IPv4Address* ResolveDomainName(std::string name);\n\tstatic bool Select(std::vector<NetworkSocket*>& readFds, std::vector<NetworkSocket*>& errorFds, SocketSelectCanceller* canceller);\n\n\tvirtual NetworkAddress *GetConnectedAddress();\n\n\tvirtual uint16_t GetConnectedPort();\n\n\tvirtual void SetTimeouts(int sendTimeout, int recvTimeout);\n\nprotected:\n\tvirtual void SetMaxPriority();\n\nprivate:\n\tstatic int GetDescriptorFromSocket(NetworkSocket* socket);\n\tuintptr_t fd;\n\tbool needUpdateNat64Prefix;\n\tbool nat64Present;\n\tdouble switchToV6at;\n\tbool isV4Available;\n\tIPv4Address lastRecvdV4;\n\tIPv6Address lastRecvdV6;\n\tbool isAtLeastVista;\n\tbool closing;\n\tNetworkAddress* tcpConnectedAddress;\n\tuint16_t tcpConnectedPort;\n};\n\n}\n\n#endif //LIBTGVOIP_NETWORKSOCKETWINSOCK_H\n"
  },
  {
    "path": "libtgvoip-public/os/windows/WindowsSandboxUtils.cpp",
    "content": "\r\n//\r\n// libtgvoip is free and unencumbered public domain software.\r\n// For more information, see http://unlicense.org or the UNLICENSE file\r\n// you should have received with this source code distribution.\r\n//\r\n\r\n#include \"WindowsSandboxUtils.h\"\r\n#include <audioclient.h>\r\n#include <windows.h>\r\n#ifdef TGVOIP_WP_SILVERLIGHT\r\n#include <phoneaudioclient.h>\r\n#endif\r\n\r\nusing namespace tgvoip;\r\nusing namespace Microsoft::WRL;\r\n\r\n\r\nIAudioClient2* WindowsSandboxUtils::ActivateAudioDevice(const wchar_t* devID, HRESULT* callRes, HRESULT* actRes) {\r\n#ifndef TGVOIP_WP_SILVERLIGHT\r\n\t// Did I say that I hate pointlessly asynchronous things?\r\n\tHANDLE event = CreateEventEx(NULL, NULL, 0, EVENT_ALL_ACCESS);\r\n\tActivationHandler activationHandler(event);\r\n\tIActivateAudioInterfaceAsyncOperation* actHandler;\r\n\tHRESULT cr = ActivateAudioInterfaceAsync(devID, __uuidof(IAudioClient2), NULL, (IActivateAudioInterfaceCompletionHandler*)&activationHandler, &actHandler);\r\n\tif (callRes)\r\n\t\t*callRes = cr;\r\n\tDWORD resulttt = WaitForSingleObjectEx(event, INFINITE, false);\r\n\tDWORD last = GetLastError();\r\n\tCloseHandle(event);\r\n\tif (actRes)\r\n\t\t*actRes = activationHandler.actResult;\r\n\treturn activationHandler.client;\r\n#else\r\n\tIAudioClient2* client;\r\n\tHRESULT res=ActivateAudioInterface(devID, __uuidof(IAudioClient2), (void**)&client);\r\n\tif(callRes)\r\n\t\t*callRes=S_OK;\r\n\tif(actRes)\r\n\t\t*actRes=res;\r\n\treturn client;\r\n#endif\r\n}\r\n\r\n#ifndef TGVOIP_WP_SILVERLIGHT\r\nActivationHandler::ActivationHandler(HANDLE _event) : event(_event)\r\n{\r\n\r\n}\r\n\r\nSTDMETHODIMP ActivationHandler::ActivateCompleted(IActivateAudioInterfaceAsyncOperation * operation)\r\n{\r\n\tHRESULT hr = S_OK;\r\n\tHRESULT hrActivateResult = S_OK;\r\n\tIUnknown *punkAudioInterface = nullptr;\r\n\r\n\thr = operation->GetActivateResult(&hrActivateResult, &punkAudioInterface);\r\n\tif (SUCCEEDED(hr) && SUCCEEDED(hrActivateResult))\r\n\t{\r\n\t\tpunkAudioInterface->QueryInterface(IID_PPV_ARGS(&client));\r\n\t}\r\n\r\n\tSetEvent(event);\r\n\r\n\treturn hr;\r\n}\r\n\r\n#endif"
  },
  {
    "path": "libtgvoip-public/os/windows/WindowsSandboxUtils.h",
    "content": "//\r\n// libtgvoip is free and unencumbered public domain software.\r\n// For more information, see http://unlicense.org or the UNLICENSE file\r\n// you should have received with this source code distribution.\r\n//\r\n\r\n#ifndef LIBTGVOIP_WINDOWS_SANDBOX_UTILS\r\n#define LIBTGVOIP_WINDOWS_SANDBOX_UTILS\r\n\r\n#include <audioclient.h>\r\n#include <windows.h>\r\n#ifndef TGVOIP_WP_SILVERLIGHT\r\n#include <mmdeviceapi.h>\r\n#endif\r\n#include <wrl.h>\r\n#include <wrl/implements.h>\r\n\r\nusing namespace Microsoft::WRL;\r\n\r\nnamespace tgvoip {\r\n\r\n#ifndef TGVOIP_WP_SILVERLIGHT\r\n\tclass ActivationHandler :\r\n\t\tpublic RuntimeClass< RuntimeClassFlags< ClassicCom >, FtmBase, IActivateAudioInterfaceCompletionHandler >\r\n\t{\r\n\tpublic:\r\n\t\tSTDMETHOD(ActivateCompleted)(IActivateAudioInterfaceAsyncOperation *operation);\r\n\r\n\t\tActivationHandler(HANDLE _event);\r\n\t\tHANDLE event;\r\n\t\tIAudioClient2* client;\r\n\t\tHRESULT actResult;\r\n\t};\r\n#endif\r\n\r\n\tclass WindowsSandboxUtils {\r\n\tpublic:\r\n\t\tstatic IAudioClient2* ActivateAudioDevice(const wchar_t* devID, HRESULT* callResult, HRESULT* actResult);\r\n\t};\r\n}\r\n\r\n#endif // LIBTGVOIP_WINDOWS_SANDBOX_UTILS\r\n"
  },
  {
    "path": "libtgvoip-public/threading.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef __THREADING_H\n#define __THREADING_H\n\nnamespace tgvoip{\n\tclass MethodPointerBase{\n\tpublic:\n\t\tvirtual ~MethodPointerBase(){\n\n\t\t}\n\t\tvirtual void Invoke(void* arg)=0;\n\t};\n\n\ttemplate<typename T> class MethodPointer : public MethodPointerBase{\n\tpublic:\n\t\tMethodPointer(void (T::*method)(void*), T* obj){\n\t\t\tthis->method=method;\n\t\t\tthis->obj=obj;\n\t\t}\n\n\t\tvirtual void Invoke(void* arg){\n\t\t\t(obj->*method)(arg);\n\t\t}\n\n\tprivate:\n\t\tvoid (T::*method)(void*);\n\t\tT* obj;\n\t};\n}\n\n#if defined(_POSIX_THREADS) || defined(_POSIX_VERSION) || defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__))\n\n#include <pthread.h>\n#include <semaphore.h>\n#include <sched.h>\n#include <unistd.h>\n#ifdef __APPLE__\n#include \"os/darwin/DarwinSpecific.h\"\n#endif\n\nnamespace tgvoip{\n\tclass Mutex{\n\tpublic:\n\t\tMutex(){\n\t\t\tpthread_mutex_init(&mtx, NULL);\n\t\t}\n\n\t\t~Mutex(){\n\t\t\tpthread_mutex_destroy(&mtx);\n\t\t}\n\n\t\tvoid Lock(){\n\t\t\tpthread_mutex_lock(&mtx);\n\t\t}\n\n\t\tvoid Unlock(){\n\t\t\tpthread_mutex_unlock(&mtx);\n\t\t}\n\n\t\tpthread_mutex_t* NativeHandle(){\n\t\t\treturn &mtx;\n\t\t}\n\n\tprivate:\n\t\tMutex(const Mutex& other);\n\t\tpthread_mutex_t mtx;\n\t};\n\n\tclass Thread{\n\tpublic:\n\t\tThread(MethodPointerBase* entry, void* arg) : entry(entry), arg(arg){\n\t\t\tname=NULL;\n\t\t}\n\n\t\tvirtual ~Thread(){\n\t\t\tdelete entry;\n\t\t}\n\n\t\tvoid Start(){\n\t\t\tif(pthread_create(&thread, NULL, Thread::ActualEntryPoint, this)==0){\n\t\t\t\tvalid=true;\n\t\t\t}\n\t\t}\n\n\t\tvoid Join(){\n\t\t\tif(valid)\n\t\t\t\tpthread_join(thread, NULL);\n\t\t}\n\n\t\tvoid SetName(const char* name){\n\t\t\tthis->name=name;\n\t\t}\n\n\n\t\tvoid SetMaxPriority(){\n#ifdef __APPLE__\n\t\t\tmaxPriority=true;\n#endif\n\t\t}\n\n\t\tstatic void Sleep(double seconds){\n\t\t\tusleep((useconds_t)(seconds*1000000.0));\n\t\t}\n\n\t\tbool IsCurrent(){\n\t\t\treturn pthread_equal(thread, pthread_self())!=0;\n\t\t}\n\n\tprivate:\n\t\tstatic void* ActualEntryPoint(void* arg){\n\t\t\tThread* self=reinterpret_cast<Thread*>(arg);\n\t\t\tif(self->name){\n#if !defined(__APPLE__) && !defined(__gnu_hurd__)\n\t\t\t\tpthread_setname_np(self->thread, self->name);\n#elif !defined(__gnu_hurd__)\n\t\t\t\tpthread_setname_np(self->name);\n\t\t\t\tif(self->maxPriority){\n\t\t\t\t\tDarwinSpecific::SetCurrentThreadPriority(DarwinSpecific::THREAD_PRIO_USER_INTERACTIVE);\n\t\t\t\t}\n#endif\n\t\t\t}\n\t\t\tself->entry->Invoke(self->arg);\n\t\t\treturn NULL;\n\t\t}\n\t\tMethodPointerBase* entry;\n\t\tvoid* arg;\n\t\tpthread_t thread;\n\t\tconst char* name;\n\t\tbool maxPriority=false;\n\t\tbool valid=false;\n\t};\n}\n\n#ifdef __APPLE__\n#include <dispatch/dispatch.h>\nnamespace tgvoip{\nclass Semaphore{\npublic:\n\tSemaphore(unsigned int maxCount, unsigned int initValue){\n\t\tsem = dispatch_semaphore_create(initValue);\n\t}\n\t\n\t~Semaphore(){\n#if ! __has_feature(objc_arc)\n        dispatch_release(sem);\n#endif\n\t}\n\t\n\tvoid Acquire(){\n\t\tdispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);\n\t}\n\t\n\tvoid Release(){\n\t\tdispatch_semaphore_signal(sem);\n\t}\n\t\n\tvoid Acquire(int count){\n\t\tfor(int i=0;i<count;i++)\n\t\t\tAcquire();\n\t}\n\t\n\tvoid Release(int count){\n\t\tfor(int i=0;i<count;i++)\n\t\t\tRelease();\n\t}\n\t\nprivate:\n\tdispatch_semaphore_t sem;\n};\n}\n#else\nnamespace tgvoip{\nclass Semaphore{\npublic:\n\tSemaphore(unsigned int maxCount, unsigned int initValue){\n\t\tsem_init(&sem, 0, initValue);\n\t}\n\n\t~Semaphore(){\n\t\tsem_destroy(&sem);\n\t}\n\n\tvoid Acquire(){\n\t\tsem_wait(&sem);\n\t}\n\n\tvoid Release(){\n\t\tsem_post(&sem);\n\t}\n\n\tvoid Acquire(int count){\n\t\tfor(int i=0;i<count;i++)\n\t\t\tAcquire();\n\t}\n\n\tvoid Release(int count){\n\t\tfor(int i=0;i<count;i++)\n\t\t\tRelease();\n\t}\n\nprivate:\n\tsem_t sem;\n};\n}\n#endif\n\n#elif defined(_WIN32)\n\n#include <Windows.h>\n#include <assert.h>\n\nnamespace tgvoip{\n\tclass Mutex{\n\tpublic:\n\t\tMutex(){\n#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP\n\t\t\tInitializeCriticalSection(&section);\n#else\n\t\t\tInitializeCriticalSectionEx(&section, 0, 0);\n#endif\n\t\t}\n\n\t\t~Mutex(){\n\t\t\tDeleteCriticalSection(&section);\n\t\t}\n\n\t\tvoid Lock(){\n\t\t\tEnterCriticalSection(&section);\n\t\t}\n\n\t\tvoid Unlock(){\n\t\t\tLeaveCriticalSection(&section);\n\t\t}\n\n\tprivate:\n\t\tMutex(const Mutex& other);\n\t\tCRITICAL_SECTION section;\n\t};\n\n\tclass Thread{\n\tpublic:\n\t\tThread(MethodPointerBase* entry, void* arg) : entry(entry), arg(arg){\n\t\t\tname=NULL;\n\t\t\tthread=NULL;\n\t\t}\n\n\t\t~Thread(){\n\t\t\tdelete entry;\n\t\t}\n\n\t\tvoid Start(){\n\t\t\tthread=CreateThread(NULL, 0, Thread::ActualEntryPoint, this, 0, &id);\n\t\t}\n\n\t\tvoid Join(){\n\t\t\tif(!thread)\n\t\t\t\treturn;\n#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP\n\t\t\tWaitForSingleObject(thread, INFINITE);\n#else\n\t\t\tWaitForSingleObjectEx(thread, INFINITE, false);\n#endif\n\t\t\tCloseHandle(thread);\n\t\t}\n\n\t\tvoid SetName(const char* name){\n\t\t\tthis->name=name;\n\t\t}\n\n\t\tvoid SetMaxPriority(){\n\t\t\tSetThreadPriority(thread, THREAD_PRIORITY_HIGHEST);\n\t\t}\n\n\t\tstatic void Sleep(double seconds){\n\t\t\t::Sleep((DWORD)(seconds*1000));\n\t\t}\n\n\t\tbool IsCurrent(){\n\t\t\treturn id==GetCurrentThreadId();\n\t\t}\n\n\tprivate:\n\t\tstatic const DWORD MS_VC_EXCEPTION=0x406D1388;\n\n\t\t#pragma pack(push,8)\n\t\ttypedef struct tagTHREADNAME_INFO\n\t\t{\n\t\t   DWORD dwType; // Must be 0x1000.\n\t\t   LPCSTR szName; // Pointer to name (in user addr space).\n\t\t   DWORD dwThreadID; // Thread ID (-1=caller thread).\n\t\t  DWORD dwFlags; // Reserved for future use, must be zero.\n\t\t} THREADNAME_INFO;\n\t\t#pragma pack(pop)\n\n\t\tstatic DWORD WINAPI ActualEntryPoint(void* arg){\n\t\t\tThread* self=reinterpret_cast<Thread*>(arg);\n\t\t\tif(self->name){\n\t\t\t\tTHREADNAME_INFO info;\n\t\t\t\tinfo.dwType=0x1000;\n\t\t\t\tinfo.szName=self->name;\n\t\t\t\tinfo.dwThreadID=-1;\n\t\t\t\tinfo.dwFlags=0;\n\t\t\t\t__try{\n\t\t\t\t\tRaiseException(MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info);\n\t\t\t\t}__except(EXCEPTION_EXECUTE_HANDLER){}\n\t\t\t}\n\t\t\tself->entry->Invoke(self->arg);\n\t\t\treturn 0;\n\t\t}\n\t\tMethodPointerBase* entry;\n\t\tvoid* arg;\n\t\tHANDLE thread;\n\t\tDWORD id;\n\t\tconst char* name;\n\t};\n\nclass Semaphore{\npublic:\n\tSemaphore(unsigned int maxCount, unsigned int initValue){\n#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP\n\t\th=CreateSemaphore(NULL, initValue, maxCount, NULL);\n#else\n\t\th=CreateSemaphoreEx(NULL, initValue, maxCount, NULL, 0, SEMAPHORE_ALL_ACCESS);\n\t\tassert(h);\n#endif\n\t}\n\n\t~Semaphore(){\n\t\tCloseHandle(h);\n\t}\n\n\tvoid Acquire(){\n#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP\n\t\tWaitForSingleObject(h, INFINITE);\n#else\n\t\tWaitForSingleObjectEx(h, INFINITE, false);\n#endif\n\t}\n\n\tvoid Release(){\n\t\tReleaseSemaphore(h, 1, NULL);\n\t}\n\n\tvoid Acquire(int count){\n\t\tfor(int i=0;i<count;i++)\n\t\t\tAcquire();\n\t}\n\n\tvoid Release(int count){\n\t\tReleaseSemaphore(h, count, NULL);\n\t}\n\nprivate:\n\tHANDLE h;\n};\n}\n#else\n#error \"No threading implementation for your operating system\"\n#endif\n\nnamespace tgvoip{\nclass MutexGuard{\npublic:\n    MutexGuard(Mutex &mutex) : mutex(mutex) {\n\t\tmutex.Lock();\n\t}\n\t~MutexGuard(){\n\t\tmutex.Unlock();\n\t}\nprivate:\n\tMutex &mutex;\n};\n}\n\t\n#endif //__THREADING_H\n"
  },
  {
    "path": "libtgvoip-public/utils.h",
    "content": "//\n// libtgvoip is free and unencumbered public domain software.\n// For more information, see http://unlicense.org or the UNLICENSE file\n// you should have received with this source code distribution.\n//\n\n#ifndef LIBTGVOIP_UTILS_H\n#define LIBTGVOIP_UTILS_H\n\n#define TGVOIP_DISALLOW_COPY_AND_ASSIGN(TypeName) \\\nTypeName(const TypeName&) = delete;   \\\nvoid operator=(const TypeName&) = delete\n\n#endif /* LIBTGVOIP_UTILS_H */\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/array_view.h",
    "content": "/*\n *  Copyright 2015 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_BASE_ARRAY_VIEW_H_\n#define WEBRTC_BASE_ARRAY_VIEW_H_\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/base/type_traits.h\"\n\nnamespace rtc {\n\n// Many functions read from or write to arrays. The obvious way to do this is\n// to use two arguments, a pointer to the first element and an element count:\n//\n//   bool Contains17(const int* arr, size_t size) {\n//     for (size_t i = 0; i < size; ++i) {\n//       if (arr[i] == 17)\n//         return true;\n//     }\n//     return false;\n//   }\n//\n// This is flexible, since it doesn't matter how the array is stored (C array,\n// std::vector, rtc::Buffer, ...), but it's error-prone because the caller has\n// to correctly specify the array length:\n//\n//   Contains17(arr, arraysize(arr));  // C array\n//   Contains17(&arr[0], arr.size());  // std::vector\n//   Contains17(arr, size);            // pointer + size\n//   ...\n//\n// It's also kind of messy to have two separate arguments for what is\n// conceptually a single thing.\n//\n// Enter rtc::ArrayView<T>. It contains a T pointer (to an array it doesn't\n// own) and a count, and supports the basic things you'd expect, such as\n// indexing and iteration. It allows us to write our function like this:\n//\n//   bool Contains17(rtc::ArrayView<const int> arr) {\n//     for (auto e : arr) {\n//       if (e == 17)\n//         return true;\n//     }\n//     return false;\n//   }\n//\n// And even better, because a bunch of things will implicitly convert to\n// ArrayView, we can call it like this:\n//\n//   Contains17(arr);                             // C array\n//   Contains17(arr);                             // std::vector\n//   Contains17(rtc::ArrayView<int>(arr, size));  // pointer + size\n//   Contains17(nullptr);                         // nullptr -> empty ArrayView\n//   ...\n//\n// One important point is that ArrayView<T> and ArrayView<const T> are\n// different types, which allow and don't allow mutation of the array elements,\n// respectively. The implicit conversions work just like you'd hope, so that\n// e.g. vector<int> will convert to either ArrayView<int> or ArrayView<const\n// int>, but const vector<int> will convert only to ArrayView<const int>.\n// (ArrayView itself can be the source type in such conversions, so\n// ArrayView<int> will convert to ArrayView<const int>.)\n//\n// Note: ArrayView is tiny (just a pointer and a count) and trivially copyable,\n// so it's probably cheaper to pass it by value than by const reference.\ntemplate <typename T>\nclass ArrayView final {\n public:\n  using value_type = T;\n  using const_iterator = const T*;\n\n  // Construct an empty ArrayView.\n  ArrayView() : ArrayView(static_cast<T*>(nullptr), 0) {}\n  ArrayView(std::nullptr_t) : ArrayView() {}\n\n  // Construct an ArrayView for a (pointer,size) pair.\n  template <typename U>\n  ArrayView(U* data, size_t size)\n      : data_(size == 0 ? nullptr : data), size_(size) {\n    CheckInvariant();\n  }\n\n  // Construct an ArrayView for an array.\n  template <typename U, size_t N>\n  ArrayView(U (&array)[N]) : ArrayView(&array[0], N) {}\n\n  // Construct an ArrayView for any type U that has a size() method whose\n  // return value converts implicitly to size_t, and a data() method whose\n  // return value converts implicitly to T*. In particular, this means we allow\n  // conversion from ArrayView<T> to ArrayView<const T>, but not the other way\n  // around. Other allowed conversions include std::vector<T> to ArrayView<T>\n  // or ArrayView<const T>, const std::vector<T> to ArrayView<const T>, and\n  // rtc::Buffer to ArrayView<uint8_t> (with the same const behavior as\n  // std::vector).\n  template <\n      typename U,\n#if defined(_MSC_VER) && _MCS_VER<=1800\n      typename std::enable_if<true>::type* = nullptr>\n#else\n      typename std::enable_if<HasDataAndSize<U, T>::value>::type* = nullptr>\n#endif\n  ArrayView(U& u) : ArrayView(u.data(), u.size()) {}\n\n  // Indexing, size, and iteration. These allow mutation even if the ArrayView\n  // is const, because the ArrayView doesn't own the array. (To prevent\n  // mutation, use ArrayView<const T>.)\n  size_t size() const { return size_; }\n  bool empty() const { return size_ == 0; }\n  T* data() const { return data_; }\n  T& operator[](size_t idx) const {\n    RTC_DCHECK_LT(idx, size_);\n    RTC_DCHECK(data_);  // Follows from size_ > idx and the class invariant.\n    return data_[idx];\n  }\n  T* begin() const { return data_; }\n  T* end() const { return data_ + size_; }\n  const T* cbegin() const { return data_; }\n  const T* cend() const { return data_ + size_; }\n\n  ArrayView subview(size_t offset, size_t size) const {\n    if (offset >= size_)\n      return ArrayView();\n    return ArrayView(data_ + offset, std::min(size, size_ - offset));\n  }\n  ArrayView subview(size_t offset) const { return subview(offset, size_); }\n\n  // Comparing two ArrayViews compares their (pointer,size) pairs; it does\n  // *not* dereference the pointers.\n  friend bool operator==(const ArrayView& a, const ArrayView& b) {\n    return a.data_ == b.data_ && a.size_ == b.size_;\n  }\n  friend bool operator!=(const ArrayView& a, const ArrayView& b) {\n    return !(a == b);\n  }\n\n private:\n  // Invariant: !data_ iff size_ == 0.\n  void CheckInvariant() const { RTC_DCHECK_EQ(!data_, size_ == 0); }\n  T* data_;\n  size_t size_;\n};\n\ntemplate <typename T>\ninline ArrayView<T> MakeArrayView(T* data, size_t size) {\n  return ArrayView<T>(data, size);\n}\n\n}  // namespace rtc\n\n#endif  // WEBRTC_BASE_ARRAY_VIEW_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/atomicops.h",
    "content": "/*\n *  Copyright 2011 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_BASE_ATOMICOPS_H_\n#define WEBRTC_BASE_ATOMICOPS_H_\n\n#if defined(WEBRTC_WIN)\n// Include winsock2.h before including <windows.h> to maintain consistency with\n// win32.h.  We can't include win32.h directly here since it pulls in\n// headers such as basictypes.h which causes problems in Chromium where webrtc\n// exists as two separate projects, webrtc and libjingle.\n#include <winsock2.h>\n#include <windows.h>\n#endif  // defined(WEBRTC_WIN)\n\nnamespace rtc {\nclass AtomicOps {\n public:\n#if defined(WEBRTC_WIN)\n  // Assumes sizeof(int) == sizeof(LONG), which it is on Win32 and Win64.\n  static int Increment(volatile int* i) {\n    return ::InterlockedIncrement(reinterpret_cast<volatile LONG*>(i));\n  }\n  static int Decrement(volatile int* i) {\n    return ::InterlockedDecrement(reinterpret_cast<volatile LONG*>(i));\n  }\n  static int AcquireLoad(volatile const int* i) {\n    return *i;\n  }\n  static void ReleaseStore(volatile int* i, int value) {\n    *i = value;\n  }\n  static int CompareAndSwap(volatile int* i, int old_value, int new_value) {\n    return ::InterlockedCompareExchange(reinterpret_cast<volatile LONG*>(i),\n                                        new_value,\n                                        old_value);\n  }\n  // Pointer variants.\n  template <typename T>\n  static T* AcquireLoadPtr(T* volatile* ptr) {\n    return *ptr;\n  }\n  template <typename T>\n  static T* CompareAndSwapPtr(T* volatile* ptr, T* old_value, T* new_value) {\n    return static_cast<T*>(::InterlockedCompareExchangePointer(\n        reinterpret_cast<PVOID volatile*>(ptr), new_value, old_value));\n  }\n#else\n  static int Increment(volatile int* i) {\n    return __sync_add_and_fetch(i, 1);\n  }\n  static int Decrement(volatile int* i) {\n    return __sync_sub_and_fetch(i, 1);\n  }\n  static int AcquireLoad(volatile const int* i) {\n    return __atomic_load_n(i, __ATOMIC_ACQUIRE);\n  }\n  static void ReleaseStore(volatile int* i, int value) {\n    __atomic_store_n(i, value, __ATOMIC_RELEASE);\n  }\n  static int CompareAndSwap(volatile int* i, int old_value, int new_value) {\n    return __sync_val_compare_and_swap(i, old_value, new_value);\n  }\n  // Pointer variants.\n  template <typename T>\n  static T* AcquireLoadPtr(T* volatile* ptr) {\n    return __atomic_load_n(ptr, __ATOMIC_ACQUIRE);\n  }\n  template <typename T>\n  static T* CompareAndSwapPtr(T* volatile* ptr, T* old_value, T* new_value) {\n    return __sync_val_compare_and_swap(ptr, old_value, new_value);\n  }\n#endif\n};\n\n\n\n}\n\n#endif  // WEBRTC_BASE_ATOMICOPS_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/basictypes.h",
    "content": "/*\n *  Copyright 2004 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_BASE_BASICTYPES_H_\n#define WEBRTC_BASE_BASICTYPES_H_\n\n#include <stddef.h>  // for NULL, size_t\n#include <stdint.h>  // for uintptr_t and (u)int_t types.\n\n// Detect compiler is for x86 or x64.\n#if defined(__x86_64__) || defined(_M_X64) || \\\n    defined(__i386__) || defined(_M_IX86)\n#define CPU_X86 1\n#endif\n\n// Detect compiler is for arm.\n#if defined(__arm__) || defined(_M_ARM)\n#define CPU_ARM 1\n#endif\n\n#if defined(CPU_X86) && defined(CPU_ARM)\n#error CPU_X86 and CPU_ARM both defined.\n#endif\n\n#if !defined(RTC_ARCH_CPU_BIG_ENDIAN) && !defined(RTC_ARCH_CPU_LITTLE_ENDIAN)\n// x86, arm or GCC provided __BYTE_ORDER__ macros\n#if defined(CPU_X86) || defined(CPU_ARM) ||                             \\\n  (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)\n#define RTC_ARCH_CPU_LITTLE_ENDIAN\n#elif defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__\n#define RTC_ARCH_CPU_BIG_ENDIAN\n#else\n#error RTC_ARCH_CPU_BIG_ENDIAN or RTC_ARCH_CPU_LITTLE_ENDIAN should be defined.\n#endif\n#endif\n\n#if defined(RTC_ARCH_CPU_BIG_ENDIAN) && defined(RTC_ARCH_CPU_LITTLE_ENDIAN)\n#error RTC_ARCH_CPU_BIG_ENDIAN and RTC_ARCH_CPU_LITTLE_ENDIAN both defined.\n#endif\n\n#if defined(WEBRTC_WIN)\ntypedef int socklen_t;\n#endif\n\n// The following only works for C++\n#ifdef __cplusplus\n\n#ifndef ALIGNP\n#define ALIGNP(p, t)                                             \\\n  (reinterpret_cast<uint8_t*>(((reinterpret_cast<uintptr_t>(p) + \\\n  ((t) - 1)) & ~((t) - 1))))\n#endif\n\n#define RTC_IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))\n\n// Use these to declare and define a static local variable that gets leaked so\n// that its destructors are not called at exit.\n#define RTC_DEFINE_STATIC_LOCAL(type, name, arguments) \\\n  static type& name = *new type arguments\n\n#endif  // __cplusplus\n\n#endif  // WEBRTC_BASE_BASICTYPES_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/checks.cc",
    "content": "/*\n *  Copyright 2006 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// Most of this was borrowed (with minor modifications) from V8's and Chromium's\n// src/base/logging.cc.\n\n// Use the C++ version to provide __GLIBCXX__.\n#include <cstdarg>\n#include <cstdio>\n#include <cstdlib>\n\n#if defined(__GLIBCXX__) && !defined(__UCLIBC__)\n#include <cxxabi.h>\n//#include <execinfo.h>\n#endif\n\n#if defined(WEBRTC_ANDROID)\n#define RTC_LOG_TAG \"rtc\"\n#include <android/log.h>  // NOLINT\n#endif\n\n#if defined(WEBRTC_WIN)\n#include <windows.h>\n#endif\n\n#include \"webrtc/base/checks.h\"\n//#include \"webrtc/base/logging.h\"\n\n#if defined(_MSC_VER)\n// Warning C4722: destructor never returns, potential memory leak.\n// FatalMessage's dtor very intentionally aborts.\n#pragma warning(disable:4722)\n#endif\n\nnamespace rtc {\n\nvoid VPrintError(const char* format, va_list args) {\n#if defined(WEBRTC_ANDROID)\n  __android_log_vprint(ANDROID_LOG_ERROR, RTC_LOG_TAG, format, args);\n#else\n  vfprintf(stderr, format, args);\n#endif\n}\n\nvoid PrintError(const char* format, ...) {\n  va_list args;\n  va_start(args, format);\n  VPrintError(format, args);\n  va_end(args);\n}\n\n// TODO(ajm): This works on Mac (although the parsing fails) but I don't seem\n// to get usable symbols on Linux. This is copied from V8. Chromium has a more\n// advanced stace trace system; also more difficult to copy.\nvoid DumpBacktrace() {\n/*#if defined(__GLIBCXX__) && !defined(__UCLIBC__)\n  void* trace[100];\n  int size = backtrace(trace, sizeof(trace) / sizeof(*trace));\n  char** symbols = backtrace_symbols(trace, size);\n  PrintError(\"\\n==== C stack trace ===============================\\n\\n\");\n  if (size == 0) {\n    PrintError(\"(empty)\\n\");\n  } else if (symbols == NULL) {\n    PrintError(\"(no symbols)\\n\");\n  } else {\n    for (int i = 1; i < size; ++i) {\n      char mangled[201];\n      if (sscanf(symbols[i], \"%*[^(]%*[(]%200[^)+]\", mangled) == 1) {  // NOLINT\n        PrintError(\"%2d: \", i);\n        int status;\n        size_t length;\n        char* demangled = abi::__cxa_demangle(mangled, NULL, &length, &status);\n        PrintError(\"%s\\n\", demangled != NULL ? demangled : mangled);\n        free(demangled);\n      } else {\n        // If parsing failed, at least print the unparsed symbol.\n        PrintError(\"%s\\n\", symbols[i]);\n      }\n    }\n  }\n  free(symbols);\n#endif*/\n}\n\nFatalMessage::FatalMessage(const char* file, int line) {\n  Init(file, line);\n}\n\nFatalMessage::FatalMessage(const char* file, int line, std::string* result) {\n  Init(file, line);\n  stream_ << \"Check failed: \" << *result << std::endl << \"# \";\n  delete result;\n}\n\nNO_RETURN FatalMessage::~FatalMessage() {\n  fflush(stdout);\n  fflush(stderr);\n  stream_ << std::endl << \"#\" << std::endl;\n  PrintError(stream_.str().c_str());\n  DumpBacktrace();\n  fflush(stderr);\n  abort();\n}\n\nvoid FatalMessage::Init(const char* file, int line) {\n  stream_ << std::endl << std::endl\n          << \"#\" << std::endl\n          << \"# Fatal error in \" << file << \", line \" << line << std::endl\n        //  << \"# last system error: \" << LAST_SYSTEM_ERROR << std::endl\n          << \"# \";\n}\n\n// MSVC doesn't like complex extern templates and DLLs.\n#if !defined(COMPILER_MSVC)\n// Explicit instantiations for commonly used comparisons.\ntemplate std::string* MakeCheckOpString<int, int>(\n    const int&, const int&, const char* names);\ntemplate std::string* MakeCheckOpString<unsigned long, unsigned long>(\n    const unsigned long&, const unsigned long&, const char* names);\ntemplate std::string* MakeCheckOpString<unsigned long, unsigned int>(\n    const unsigned long&, const unsigned int&, const char* names);\ntemplate std::string* MakeCheckOpString<unsigned int, unsigned long>(\n    const unsigned int&, const unsigned long&, const char* names);\ntemplate std::string* MakeCheckOpString<std::string, std::string>(\n    const std::string&, const std::string&, const char* name);\n#endif\n\n}  // namespace rtc\n\n// Function to call from the C version of the RTC_CHECK and RTC_DCHECK macros.\nNO_RETURN void rtc_FatalMessage(const char* file, int line, const char* msg) {\n  rtc::FatalMessage(file, line).stream() << msg;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/checks.h",
    "content": "/*\n *  Copyright 2006 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_BASE_CHECKS_H_\n#define WEBRTC_BASE_CHECKS_H_\n\n#include \"webrtc/typedefs.h\"\n\n// If you for some reson need to know if DCHECKs are on, test the value of\n// RTC_DCHECK_IS_ON. (Test its value, not if it's defined; it'll always be\n// defined, to either a true or a false value.)\n#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)\n#define RTC_DCHECK_IS_ON 1\n#else\n#define RTC_DCHECK_IS_ON 0\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nNO_RETURN void rtc_FatalMessage(const char* file, int line, const char* msg);\n#ifdef __cplusplus\n}  // extern \"C\"\n#endif\n\n#ifdef __cplusplus\n// C++ version.\n\n#include <sstream>\n#include <string>\n\n#include \"webrtc/base/safe_compare.h\"\n\n// The macros here print a message to stderr and abort under various\n// conditions. All will accept additional stream messages. For example:\n// RTC_DCHECK_EQ(foo, bar) << \"I'm printed when foo != bar.\";\n//\n// - RTC_CHECK(x) is an assertion that x is always true, and that if it isn't,\n//   it's better to terminate the process than to continue. During development,\n//   the reason that it's better to terminate might simply be that the error\n//   handling code isn't in place yet; in production, the reason might be that\n//   the author of the code truly believes that x will always be true, but that\n//   she recognizes that if she is wrong, abrupt and unpleasant process\n//   termination is still better than carrying on with the assumption violated.\n//\n//   RTC_CHECK always evaluates its argument, so it's OK for x to have side\n//   effects.\n//\n// - RTC_DCHECK(x) is the same as RTC_CHECK(x)---an assertion that x is always\n//   true---except that x will only be evaluated in debug builds; in production\n//   builds, x is simply assumed to be true. This is useful if evaluating x is\n//   expensive and the expected cost of failing to detect the violated\n//   assumption is acceptable. You should not handle cases where a production\n//   build fails to spot a violated condition, even those that would result in\n//   crashes. If the code needs to cope with the error, make it cope, but don't\n//   call RTC_DCHECK; if the condition really can't occur, but you'd sleep\n//   better at night knowing that the process will suicide instead of carrying\n//   on in case you were wrong, use RTC_CHECK instead of RTC_DCHECK.\n//\n//   RTC_DCHECK only evaluates its argument in debug builds, so if x has visible\n//   side effects, you need to write e.g.\n//     bool w = x; RTC_DCHECK(w);\n//\n// - RTC_CHECK_EQ, _NE, _GT, ..., and RTC_DCHECK_EQ, _NE, _GT, ... are\n//   specialized variants of RTC_CHECK and RTC_DCHECK that print prettier\n//   messages if the condition doesn't hold. Prefer them to raw RTC_CHECK and\n//   RTC_DCHECK.\n//\n// - FATAL() aborts unconditionally.\n//\n// TODO(ajm): Ideally, checks.h would be combined with logging.h, but\n// consolidation with system_wrappers/logging.h should happen first.\n\nnamespace rtc {\n\n// Helper macro which avoids evaluating the arguments to a stream if\n// the condition doesn't hold.\n#define RTC_LAZY_STREAM(stream, condition)                                    \\\n  !(condition) ? static_cast<void>(0) : rtc::FatalMessageVoidify() & (stream)\n\n// The actual stream used isn't important. We reference |ignored| in the code\n// but don't evaluate it; this is to avoid \"unused variable\" warnings (we do so\n// in a particularly convoluted way with an extra ?: because that appears to be\n// the simplest construct that keeps Visual Studio from complaining about\n// condition being unused).\n#define RTC_EAT_STREAM_PARAMETERS(ignored) \\\n  (true ? true : ((void)(ignored), true))  \\\n      ? static_cast<void>(0)               \\\n      : rtc::FatalMessageVoidify() & rtc::FatalMessage(\"\", 0).stream()\n\n// Call RTC_EAT_STREAM_PARAMETERS with an argument that fails to compile if\n// values of the same types as |a| and |b| can't be compared with the given\n// operation, and that would evaluate |a| and |b| if evaluated.\n#define RTC_EAT_STREAM_PARAMETERS_OP(op, a, b) \\\n  RTC_EAT_STREAM_PARAMETERS(((void)rtc::safe_cmp::op(a, b)))\n\n// RTC_CHECK dies with a fatal error if condition is not true. It is *not*\n// controlled by NDEBUG or anything else, so the check will be executed\n// regardless of compilation mode.\n//\n// We make sure RTC_CHECK et al. always evaluates their arguments, as\n// doing RTC_CHECK(FunctionWithSideEffect()) is a common idiom.\n#define RTC_CHECK(condition)                                      \\\n  RTC_LAZY_STREAM(rtc::FatalMessage(__FILE__, __LINE__).stream(), \\\n                  !(condition))                                   \\\n      << \"Check failed: \" #condition << std::endl << \"# \"\n\n// Helper macro for binary operators.\n// Don't use this macro directly in your code, use RTC_CHECK_EQ et al below.\n//\n// TODO(akalin): Rewrite this so that constructs like if (...)\n// RTC_CHECK_EQ(...) else { ... } work properly.\n#define RTC_CHECK_OP(name, op, val1, val2)                                 \\\n  if (std::string* _result =                                               \\\n          rtc::Check##name##Impl((val1), (val2), #val1 \" \" #op \" \" #val2)) \\\n    rtc::FatalMessage(__FILE__, __LINE__, _result).stream()\n\n// Build the error message string.  This is separate from the \"Impl\"\n// function template because it is not performance critical and so can\n// be out of line, while the \"Impl\" code should be inline.  Caller\n// takes ownership of the returned string.\ntemplate<class t1, class t2>\nstd::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {\n  std::ostringstream ss;\n  ss << names << \" (\" << v1 << \" vs. \" << v2 << \")\";\n  std::string* msg = new std::string(ss.str());\n  return msg;\n}\n\n// MSVC doesn't like complex extern templates and DLLs.\n#if !defined(COMPILER_MSVC)\n// Commonly used instantiations of MakeCheckOpString<>. Explicitly instantiated\n// in logging.cc.\nextern template std::string* MakeCheckOpString<int, int>(\n    const int&, const int&, const char* names);\nextern template\nstd::string* MakeCheckOpString<unsigned long, unsigned long>(\n    const unsigned long&, const unsigned long&, const char* names);\nextern template\nstd::string* MakeCheckOpString<unsigned long, unsigned int>(\n    const unsigned long&, const unsigned int&, const char* names);\nextern template\nstd::string* MakeCheckOpString<unsigned int, unsigned long>(\n    const unsigned int&, const unsigned long&, const char* names);\nextern template\nstd::string* MakeCheckOpString<std::string, std::string>(\n    const std::string&, const std::string&, const char* name);\n#endif\n\n// Helper functions for RTC_CHECK_OP macro.\n// The (int, int) specialization works around the issue that the compiler\n// will not instantiate the template version of the function on values of\n// unnamed enum type - see comment below.\n#define DEFINE_RTC_CHECK_OP_IMPL(name)                                       \\\n  template <class t1, class t2>                                              \\\n  inline std::string* Check##name##Impl(const t1& v1, const t2& v2,          \\\n                                        const char* names) {                 \\\n    if (rtc::safe_cmp::name(v1, v2))                                         \\\n      return NULL;                                                           \\\n    else                                                                     \\\n      return rtc::MakeCheckOpString(v1, v2, names);                          \\\n  }                                                                          \\\n  inline std::string* Check##name##Impl(int v1, int v2, const char* names) { \\\n    if (rtc::safe_cmp::name(v1, v2))                                         \\\n      return NULL;                                                           \\\n    else                                                                     \\\n      return rtc::MakeCheckOpString(v1, v2, names);                          \\\n  }\nDEFINE_RTC_CHECK_OP_IMPL(Eq)\nDEFINE_RTC_CHECK_OP_IMPL(Ne)\nDEFINE_RTC_CHECK_OP_IMPL(Le)\nDEFINE_RTC_CHECK_OP_IMPL(Lt)\nDEFINE_RTC_CHECK_OP_IMPL(Ge)\nDEFINE_RTC_CHECK_OP_IMPL(Gt)\n#undef DEFINE_RTC_CHECK_OP_IMPL\n\n#define RTC_CHECK_EQ(val1, val2) RTC_CHECK_OP(Eq, ==, val1, val2)\n#define RTC_CHECK_NE(val1, val2) RTC_CHECK_OP(Ne, !=, val1, val2)\n#define RTC_CHECK_LE(val1, val2) RTC_CHECK_OP(Le, <=, val1, val2)\n#define RTC_CHECK_LT(val1, val2) RTC_CHECK_OP(Lt, <, val1, val2)\n#define RTC_CHECK_GE(val1, val2) RTC_CHECK_OP(Ge, >=, val1, val2)\n#define RTC_CHECK_GT(val1, val2) RTC_CHECK_OP(Gt, >, val1, val2)\n\n// The RTC_DCHECK macro is equivalent to RTC_CHECK except that it only generates\n// code in debug builds. It does reference the condition parameter in all cases,\n// though, so callers won't risk getting warnings about unused variables.\n#if RTC_DCHECK_IS_ON\n#define RTC_DCHECK(condition) RTC_CHECK(condition)\n#define RTC_DCHECK_EQ(v1, v2) RTC_CHECK_EQ(v1, v2)\n#define RTC_DCHECK_NE(v1, v2) RTC_CHECK_NE(v1, v2)\n#define RTC_DCHECK_LE(v1, v2) RTC_CHECK_LE(v1, v2)\n#define RTC_DCHECK_LT(v1, v2) RTC_CHECK_LT(v1, v2)\n#define RTC_DCHECK_GE(v1, v2) RTC_CHECK_GE(v1, v2)\n#define RTC_DCHECK_GT(v1, v2) RTC_CHECK_GT(v1, v2)\n#else\n#define RTC_DCHECK(condition) RTC_EAT_STREAM_PARAMETERS(condition)\n#define RTC_DCHECK_EQ(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Eq, v1, v2)\n#define RTC_DCHECK_NE(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Ne, v1, v2)\n#define RTC_DCHECK_LE(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Le, v1, v2)\n#define RTC_DCHECK_LT(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Lt, v1, v2)\n#define RTC_DCHECK_GE(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Ge, v1, v2)\n#define RTC_DCHECK_GT(v1, v2) RTC_EAT_STREAM_PARAMETERS_OP(Gt, v1, v2)\n#endif\n\n// This is identical to LogMessageVoidify but in name.\nclass FatalMessageVoidify {\n public:\n  FatalMessageVoidify() { }\n  // This has to be an operator with a precedence lower than << but\n  // higher than ?:\n  void operator&(std::ostream&) { }\n};\n\n#define RTC_UNREACHABLE_CODE_HIT false\n#define RTC_NOTREACHED() RTC_DCHECK(RTC_UNREACHABLE_CODE_HIT)\n\n#define FATAL() rtc::FatalMessage(__FILE__, __LINE__).stream()\n// TODO(ajm): Consider adding RTC_NOTIMPLEMENTED macro when\n// base/logging.h and system_wrappers/logging.h are consolidated such that we\n// can match the Chromium behavior.\n\n// Like a stripped-down LogMessage from logging.h, except that it aborts.\nclass FatalMessage {\n public:\n  FatalMessage(const char* file, int line);\n  // Used for RTC_CHECK_EQ(), etc. Takes ownership of the given string.\n  FatalMessage(const char* file, int line, std::string* result);\n  NO_RETURN ~FatalMessage();\n\n  std::ostream& stream() { return stream_; }\n\n private:\n  void Init(const char* file, int line);\n\n  std::ostringstream stream_;\n};\n\n// Performs the integer division a/b and returns the result. CHECKs that the\n// remainder is zero.\ntemplate <typename T>\ninline T CheckedDivExact(T a, T b) {\n  RTC_CHECK_EQ(a % b, static_cast<T>(0)) << a << \" is not evenly divisible by \"\n                                         << b;\n  return a / b;\n}\n\n}  // namespace rtc\n\n#else  // __cplusplus not defined\n// C version. Lacks many features compared to the C++ version, but usage\n// guidelines are the same.\n\n#define RTC_CHECK(condition)                                             \\\n  do {                                                                   \\\n    if (!(condition)) {                                                  \\\n      rtc_FatalMessage(__FILE__, __LINE__, \"CHECK failed: \" #condition); \\\n    }                                                                    \\\n  } while (0)\n\n#define RTC_CHECK_EQ(a, b) RTC_CHECK((a) == (b))\n#define RTC_CHECK_NE(a, b) RTC_CHECK((a) != (b))\n#define RTC_CHECK_LE(a, b) RTC_CHECK((a) <= (b))\n#define RTC_CHECK_LT(a, b) RTC_CHECK((a) < (b))\n#define RTC_CHECK_GE(a, b) RTC_CHECK((a) >= (b))\n#define RTC_CHECK_GT(a, b) RTC_CHECK((a) > (b))\n\n#define RTC_DCHECK(condition)                                             \\\n  do {                                                                    \\\n    if (RTC_DCHECK_IS_ON && !(condition)) {                               \\\n      rtc_FatalMessage(__FILE__, __LINE__, \"DCHECK failed: \" #condition); \\\n    }                                                                     \\\n  } while (0)\n\n#define RTC_DCHECK_EQ(a, b) RTC_DCHECK((a) == (b))\n#define RTC_DCHECK_NE(a, b) RTC_DCHECK((a) != (b))\n#define RTC_DCHECK_LE(a, b) RTC_DCHECK((a) <= (b))\n#define RTC_DCHECK_LT(a, b) RTC_DCHECK((a) < (b))\n#define RTC_DCHECK_GE(a, b) RTC_DCHECK((a) >= (b))\n#define RTC_DCHECK_GT(a, b) RTC_DCHECK((a) > (b))\n\n#endif  // __cplusplus\n\n#endif  // WEBRTC_BASE_CHECKS_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/constructormagic.h",
    "content": "/*\n *  Copyright 2004 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_BASE_CONSTRUCTORMAGIC_H_\n#define WEBRTC_BASE_CONSTRUCTORMAGIC_H_\n\n// Put this in the declarations for a class to be unassignable.\n#define RTC_DISALLOW_ASSIGN(TypeName) \\\n  void operator=(const TypeName&) = delete\n\n// A macro to disallow the copy constructor and operator= functions. This should\n// be used in the declarations for a class.\n#define RTC_DISALLOW_COPY_AND_ASSIGN(TypeName) \\\n  TypeName(const TypeName&) = delete;          \\\n  RTC_DISALLOW_ASSIGN(TypeName)\n\n// A macro to disallow all the implicit constructors, namely the default\n// constructor, copy constructor and operator= functions.\n//\n// This should be used in the declarations for a class that wants to prevent\n// anyone from instantiating it. This is especially useful for classes\n// containing only static methods.\n#define RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \\\n  TypeName() = delete;                               \\\n  RTC_DISALLOW_COPY_AND_ASSIGN(TypeName)\n\n#endif  // WEBRTC_BASE_CONSTRUCTORMAGIC_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/safe_compare.h",
    "content": "/*\n *  Copyright 2016 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// This file defines six functions:\n//\n//   rtc::safe_cmp::Eq  // ==\n//   rtc::safe_cmp::Ne  // !=\n//   rtc::safe_cmp::Lt  // <\n//   rtc::safe_cmp::Le  // <=\n//   rtc::safe_cmp::Gt  // >\n//   rtc::safe_cmp::Ge  // >=\n//\n// They each accept two arguments of arbitrary types, and in almost all cases,\n// they simply call the appropriate comparison operator. However, if both\n// arguments are integers, they don't compare them using C++'s quirky rules,\n// but instead adhere to the true mathematical definitions. It is as if the\n// arguments were first converted to infinite-range signed integers, and then\n// compared, although of course nothing expensive like that actually takes\n// place. In practice, for signed/signed and unsigned/unsigned comparisons and\n// some mixed-signed comparisons with a compile-time constant, the overhead is\n// zero; in the remaining cases, it is just a few machine instructions (no\n// branches).\n\n#ifndef WEBRTC_BASE_SAFE_COMPARE_H_\n#define WEBRTC_BASE_SAFE_COMPARE_H_\n\n#if defined(_MSC_VER) && _MSC_VER<=1800\n#define constexpr const // Older MSVC used for WP app doesn't support this thing but we can ignore it\n#endif\n\n#include <stddef.h>\n#include <stdint.h>\n\n#include <type_traits>\n#include <utility>\n\nnamespace rtc {\nnamespace safe_cmp {\n\nnamespace safe_cmp_impl {\n\ntemplate <size_t N>\nstruct LargerIntImpl : std::false_type {};\ntemplate <>\nstruct LargerIntImpl<sizeof(int8_t)> : std::true_type {\n  using type = int16_t;\n};\ntemplate <>\nstruct LargerIntImpl<sizeof(int16_t)> : std::true_type {\n  using type = int32_t;\n};\ntemplate <>\nstruct LargerIntImpl<sizeof(int32_t)> : std::true_type {\n  using type = int64_t;\n};\n\n// LargerInt<T1, T2>::value is true iff there's a signed type that's larger\n// than T1 (and no larger than the larger of T2 and int*, for performance\n// reasons); and if there is such a type, LargerInt<T1, T2>::type is an alias\n// for it.\ntemplate <typename T1, typename T2>\nstruct LargerInt\n    : LargerIntImpl<sizeof(T1) < sizeof(T2) || sizeof(T1) < sizeof(int*)\n                        ? sizeof(T1)\n                        : 0> {};\n\ntemplate <typename T>\ninline typename std::make_unsigned<T>::type MakeUnsigned(T a) {\n  return static_cast<typename std::make_unsigned<T>::type>(a);\n}\n\n// Overload for when both T1 and T2 have the same signedness.\ntemplate <typename Op,\n          typename T1,\n          typename T2,\n          typename std::enable_if<std::is_signed<T1>::value ==\n                                  std::is_signed<T2>::value>::type* = nullptr>\ninline bool Cmp(T1 a, T2 b) {\n  return Op::Op(a, b);\n}\n\n// Overload for signed - unsigned comparison that can be promoted to a bigger\n// signed type.\ntemplate <typename Op,\n          typename T1,\n          typename T2,\n          typename std::enable_if<std::is_signed<T1>::value &&\n                                  std::is_unsigned<T2>::value &&\n                                  LargerInt<T2, T1>::value>::type* = nullptr>\ninline bool Cmp(T1 a, T2 b) {\n  return Op::Op(a, static_cast<typename LargerInt<T2, T1>::type>(b));\n}\n\n// Overload for unsigned - signed comparison that can be promoted to a bigger\n// signed type.\ntemplate <typename Op,\n          typename T1,\n          typename T2,\n          typename std::enable_if<std::is_unsigned<T1>::value &&\n                                  std::is_signed<T2>::value &&\n                                  LargerInt<T1, T2>::value>::type* = nullptr>\ninline bool Cmp(T1 a, T2 b) {\n  return Op::Op(static_cast<typename LargerInt<T1, T2>::type>(a), b);\n}\n\n// Overload for signed - unsigned comparison that can't be promoted to a bigger\n// signed type.\ntemplate <typename Op,\n          typename T1,\n          typename T2,\n          typename std::enable_if<std::is_signed<T1>::value &&\n                                  std::is_unsigned<T2>::value &&\n                                  !LargerInt<T2, T1>::value>::type* = nullptr>\ninline bool Cmp(T1 a, T2 b) {\n  return a < 0 ? Op::Op(-1, 0) : Op::Op(safe_cmp_impl::MakeUnsigned(a), b);\n}\n\n// Overload for unsigned - signed comparison that can't be promoted to a bigger\n// signed type.\ntemplate <typename Op,\n          typename T1,\n          typename T2,\n          typename std::enable_if<std::is_unsigned<T1>::value &&\n                                  std::is_signed<T2>::value &&\n                                  !LargerInt<T1, T2>::value>::type* = nullptr>\ninline bool Cmp(T1 a, T2 b) {\n  return b < 0 ? Op::Op(0, -1) : Op::Op(a, safe_cmp_impl::MakeUnsigned(b));\n}\n\n#define RTC_SAFECMP_MAKE_OP(name, op)      \\\n  struct name {                            \\\n    template <typename T1, typename T2>    \\\n    static constexpr bool Op(T1 a, T2 b) { \\\n      return a op b;                       \\\n    }                                      \\\n  };\nRTC_SAFECMP_MAKE_OP(EqOp, ==)\nRTC_SAFECMP_MAKE_OP(NeOp, !=)\nRTC_SAFECMP_MAKE_OP(LtOp, <)\nRTC_SAFECMP_MAKE_OP(LeOp, <=)\nRTC_SAFECMP_MAKE_OP(GtOp, >)\nRTC_SAFECMP_MAKE_OP(GeOp, >=)\n#undef RTC_SAFECMP_MAKE_OP\n\n}  // namespace safe_cmp_impl\n\n#define RTC_SAFECMP_MAKE_FUN(name)                                             \\\n  template <                                                                   \\\n      typename T1, typename T2,                                                \\\n      typename std::enable_if<                                                 \\\n          std::is_integral<typename std::remove_reference<T1>::type>::value && \\\n          std::is_integral<typename std::remove_reference<T2>::type>::value>:: \\\n          type* = nullptr>                                                     \\\n  inline bool name(T1 a, T2 b) {                                               \\\n    return safe_cmp_impl::Cmp<safe_cmp_impl::name##Op>(a, b);                  \\\n  }                                                                            \\\n  template <typename T1, typename T2,                                          \\\n            typename std::enable_if<                                           \\\n                !std::is_integral<                                             \\\n                    typename std::remove_reference<T1>::type>::value ||        \\\n                !std::is_integral<typename std::remove_reference<T2>::type>::  \\\n                    value>::type* = nullptr>                                   \\\n  inline bool name(T1&& a, T2&& b) {                                           \\\n    return safe_cmp_impl::name##Op::Op(a, b);                                  \\\n  }\nRTC_SAFECMP_MAKE_FUN(Eq)\nRTC_SAFECMP_MAKE_FUN(Ne)\nRTC_SAFECMP_MAKE_FUN(Lt)\nRTC_SAFECMP_MAKE_FUN(Le)\nRTC_SAFECMP_MAKE_FUN(Gt)\nRTC_SAFECMP_MAKE_FUN(Ge)\n#undef RTC_SAFECMP_MAKE_FUN\n\n}  // namespace safe_cmp\n}  // namespace rtc\n\n#endif  // WEBRTC_BASE_SAFE_COMPARE_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/safe_conversions.h",
    "content": "/*\n *  Copyright 2014 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// Borrowed from Chromium's src/base/numerics/safe_conversions.h.\n\n#ifndef WEBRTC_BASE_SAFE_CONVERSIONS_H_\n#define WEBRTC_BASE_SAFE_CONVERSIONS_H_\n\n#include <limits>\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/base/safe_conversions_impl.h\"\n\nnamespace rtc {\n\n// Convenience function that returns true if the supplied value is in range\n// for the destination type.\ntemplate <typename Dst, typename Src>\ninline bool IsValueInRangeForNumericType(Src value) {\n  return internal::RangeCheck<Dst>(value) == internal::TYPE_VALID;\n}\n\n// checked_cast<> is analogous to static_cast<> for numeric types,\n// except that it CHECKs that the specified numeric conversion will not\n// overflow or underflow. NaN source will always trigger a CHECK.\ntemplate <typename Dst, typename Src>\ninline Dst checked_cast(Src value) {\n  RTC_CHECK(IsValueInRangeForNumericType<Dst>(value));\n  return static_cast<Dst>(value);\n}\n\n// saturated_cast<> is analogous to static_cast<> for numeric types, except\n// that the specified numeric conversion will saturate rather than overflow or\n// underflow. NaN assignment to an integral will trigger a RTC_CHECK condition.\ntemplate <typename Dst, typename Src>\ninline Dst saturated_cast(Src value) {\n  // Optimization for floating point values, which already saturate.\n  if (std::numeric_limits<Dst>::is_iec559)\n    return static_cast<Dst>(value);\n\n  switch (internal::RangeCheck<Dst>(value)) {\n    case internal::TYPE_VALID:\n      return static_cast<Dst>(value);\n\n    case internal::TYPE_UNDERFLOW:\n      return std::numeric_limits<Dst>::min();\n\n    case internal::TYPE_OVERFLOW:\n      return std::numeric_limits<Dst>::max();\n\n    // Should fail only on attempting to assign NaN to a saturated integer.\n    case internal::TYPE_INVALID:\n      FATAL();\n      return std::numeric_limits<Dst>::max();\n  }\n\n  FATAL();\n  return static_cast<Dst>(value);\n}\n\n}  // namespace rtc\n\n#endif  // WEBRTC_BASE_SAFE_CONVERSIONS_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/safe_conversions_impl.h",
    "content": "/*\n *  Copyright 2014 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// Borrowed from Chromium's src/base/numerics/safe_conversions_impl.h.\n\n#ifndef WEBRTC_BASE_SAFE_CONVERSIONS_IMPL_H_\n#define WEBRTC_BASE_SAFE_CONVERSIONS_IMPL_H_\n\n#include <limits>\n\nnamespace rtc {\nnamespace internal {\n\nenum DstSign {\n  DST_UNSIGNED,\n  DST_SIGNED\n};\n\nenum SrcSign {\n  SRC_UNSIGNED,\n  SRC_SIGNED\n};\n\nenum DstRange {\n  OVERLAPS_RANGE,\n  CONTAINS_RANGE\n};\n\n// Helper templates to statically determine if our destination type can contain\n// all values represented by the source type.\n\ntemplate <typename Dst, typename Src,\n          DstSign IsDstSigned = std::numeric_limits<Dst>::is_signed ?\n                                DST_SIGNED : DST_UNSIGNED,\n          SrcSign IsSrcSigned = std::numeric_limits<Src>::is_signed ?\n                                SRC_SIGNED : SRC_UNSIGNED>\nstruct StaticRangeCheck {};\n\ntemplate <typename Dst, typename Src>\nstruct StaticRangeCheck<Dst, Src, DST_SIGNED, SRC_SIGNED> {\n  typedef std::numeric_limits<Dst> DstLimits;\n  typedef std::numeric_limits<Src> SrcLimits;\n  // Compare based on max_exponent, which we must compute for integrals.\n  static const size_t kDstMaxExponent = DstLimits::is_iec559 ?\n                                        DstLimits::max_exponent :\n                                        (sizeof(Dst) * 8 - 1);\n  static const size_t kSrcMaxExponent = SrcLimits::is_iec559 ?\n                                        SrcLimits::max_exponent :\n                                        (sizeof(Src) * 8 - 1);\n  static const DstRange value = kDstMaxExponent >= kSrcMaxExponent ?\n                                CONTAINS_RANGE : OVERLAPS_RANGE;\n};\n\ntemplate <typename Dst, typename Src>\nstruct StaticRangeCheck<Dst, Src, DST_UNSIGNED, SRC_UNSIGNED> {\n  static const DstRange value = sizeof(Dst) >= sizeof(Src) ?\n                                CONTAINS_RANGE : OVERLAPS_RANGE;\n};\n\ntemplate <typename Dst, typename Src>\nstruct StaticRangeCheck<Dst, Src, DST_SIGNED, SRC_UNSIGNED> {\n  typedef std::numeric_limits<Dst> DstLimits;\n  typedef std::numeric_limits<Src> SrcLimits;\n  // Compare based on max_exponent, which we must compute for integrals.\n  static const size_t kDstMaxExponent = DstLimits::is_iec559 ?\n                                        DstLimits::max_exponent :\n                                        (sizeof(Dst) * 8 - 1);\n  static const size_t kSrcMaxExponent = sizeof(Src) * 8;\n  static const DstRange value = kDstMaxExponent >= kSrcMaxExponent ?\n                                CONTAINS_RANGE : OVERLAPS_RANGE;\n};\n\ntemplate <typename Dst, typename Src>\nstruct StaticRangeCheck<Dst, Src, DST_UNSIGNED, SRC_SIGNED> {\n  static const DstRange value = OVERLAPS_RANGE;\n};\n\n\nenum RangeCheckResult {\n  TYPE_VALID = 0,      // Value can be represented by the destination type.\n  TYPE_UNDERFLOW = 1,  // Value would overflow.\n  TYPE_OVERFLOW = 2,   // Value would underflow.\n  TYPE_INVALID = 3     // Source value is invalid (i.e. NaN).\n};\n\n// This macro creates a RangeCheckResult from an upper and lower bound\n// check by taking advantage of the fact that only NaN can be out of range in\n// both directions at once.\n#define BASE_NUMERIC_RANGE_CHECK_RESULT(is_in_upper_bound, is_in_lower_bound) \\\n    RangeCheckResult(((is_in_upper_bound) ? 0 : TYPE_OVERFLOW) | \\\n                            ((is_in_lower_bound) ? 0 : TYPE_UNDERFLOW))\n\ntemplate <typename Dst,\n          typename Src,\n          DstSign IsDstSigned = std::numeric_limits<Dst>::is_signed ?\n                                DST_SIGNED : DST_UNSIGNED,\n          SrcSign IsSrcSigned = std::numeric_limits<Src>::is_signed ?\n                                SRC_SIGNED : SRC_UNSIGNED,\n          DstRange IsSrcRangeContained = StaticRangeCheck<Dst, Src>::value>\nstruct RangeCheckImpl {};\n\n// The following templates are for ranges that must be verified at runtime. We\n// split it into checks based on signedness to avoid confusing casts and\n// compiler warnings on signed an unsigned comparisons.\n\n// Dst range always contains the result: nothing to check.\ntemplate <typename Dst, typename Src, DstSign IsDstSigned, SrcSign IsSrcSigned>\nstruct RangeCheckImpl<Dst, Src, IsDstSigned, IsSrcSigned, CONTAINS_RANGE> {\n  static RangeCheckResult Check(Src value) {\n    return TYPE_VALID;\n  }\n};\n\n// Signed to signed narrowing.\ntemplate <typename Dst, typename Src>\nstruct RangeCheckImpl<Dst, Src, DST_SIGNED, SRC_SIGNED, OVERLAPS_RANGE> {\n  static RangeCheckResult Check(Src value) {\n    typedef std::numeric_limits<Dst> DstLimits;\n    return DstLimits::is_iec559 ?\n           BASE_NUMERIC_RANGE_CHECK_RESULT(\n               value <= static_cast<Src>(DstLimits::max()),\n               value >= static_cast<Src>(DstLimits::max() * -1)) :\n           BASE_NUMERIC_RANGE_CHECK_RESULT(\n               value <= static_cast<Src>(DstLimits::max()),\n               value >= static_cast<Src>(DstLimits::min()));\n  }\n};\n\n// Unsigned to unsigned narrowing.\ntemplate <typename Dst, typename Src>\nstruct RangeCheckImpl<Dst, Src, DST_UNSIGNED, SRC_UNSIGNED, OVERLAPS_RANGE> {\n  static RangeCheckResult Check(Src value) {\n    typedef std::numeric_limits<Dst> DstLimits;\n    return BASE_NUMERIC_RANGE_CHECK_RESULT(\n               value <= static_cast<Src>(DstLimits::max()), true);\n  }\n};\n\n// Unsigned to signed.\ntemplate <typename Dst, typename Src>\nstruct RangeCheckImpl<Dst, Src, DST_SIGNED, SRC_UNSIGNED, OVERLAPS_RANGE> {\n  static RangeCheckResult Check(Src value) {\n    typedef std::numeric_limits<Dst> DstLimits;\n    return sizeof(Dst) > sizeof(Src) ? TYPE_VALID :\n           BASE_NUMERIC_RANGE_CHECK_RESULT(\n               value <= static_cast<Src>(DstLimits::max()), true);\n  }\n};\n\n// Signed to unsigned.\ntemplate <typename Dst, typename Src>\nstruct RangeCheckImpl<Dst, Src, DST_UNSIGNED, SRC_SIGNED, OVERLAPS_RANGE> {\n  static RangeCheckResult Check(Src value) {\n    typedef std::numeric_limits<Dst> DstLimits;\n    typedef std::numeric_limits<Src> SrcLimits;\n    // Compare based on max_exponent, which we must compute for integrals.\n    static const size_t kDstMaxExponent = sizeof(Dst) * 8;\n    static const size_t kSrcMaxExponent = SrcLimits::is_iec559 ?\n                                          SrcLimits::max_exponent :\n                                          (sizeof(Src) * 8 - 1);\n    return (kDstMaxExponent >= kSrcMaxExponent) ?\n           BASE_NUMERIC_RANGE_CHECK_RESULT(true, value >= static_cast<Src>(0)) :\n           BASE_NUMERIC_RANGE_CHECK_RESULT(\n               value <= static_cast<Src>(DstLimits::max()),\n               value >= static_cast<Src>(0));\n  }\n};\n\ntemplate <typename Dst, typename Src>\ninline RangeCheckResult RangeCheck(Src value) {\n  static_assert(std::numeric_limits<Src>::is_specialized,\n                \"argument must be numeric\");\n  static_assert(std::numeric_limits<Dst>::is_specialized,\n                \"result must be numeric\");\n  return RangeCheckImpl<Dst, Src>::Check(value);\n}\n\n}  // namespace internal\n}  // namespace rtc\n\n#endif  // WEBRTC_BASE_SAFE_CONVERSIONS_IMPL_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/sanitizer.h",
    "content": "/*\n *  Copyright 2016 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_BASE_SANITIZER_H_\n#define WEBRTC_BASE_SANITIZER_H_\n\n#if defined(__has_feature)\n#if __has_feature(address_sanitizer)\n#define RTC_HAS_ASAN 1\n#endif\n#if __has_feature(memory_sanitizer)\n#define RTC_HAS_MSAN 1\n#endif\n#endif\n#ifndef RTC_HAS_ASAN\n#define RTC_HAS_ASAN 0\n#endif\n#ifndef RTC_HAS_MSAN\n#define RTC_HAS_MSAN 0\n#endif\n\n#if RTC_HAS_ASAN\n#include <sanitizer/asan_interface.h>\n#endif\n#if RTC_HAS_MSAN\n#include <sanitizer/msan_interface.h>\n#endif\n\n#ifdef __has_attribute\n#if __has_attribute(no_sanitize)\n#define RTC_NO_SANITIZE(what) __attribute__((no_sanitize(what)))\n#endif\n#endif\n#ifndef RTC_NO_SANITIZE\n#define RTC_NO_SANITIZE(what)\n#endif\n\n// Ask ASan to mark the memory range [ptr, ptr + element_size * num_elements)\n// as being unaddressable, so that reads and writes are not allowed. ASan may\n// narrow the range to the nearest alignment boundaries.\nstatic inline void rtc_AsanPoison(const volatile void* ptr,\n                                  size_t element_size,\n                                  size_t num_elements) {\n#if RTC_HAS_ASAN\n  ASAN_POISON_MEMORY_REGION(ptr, element_size * num_elements);\n#endif\n}\n\n// Ask ASan to mark the memory range [ptr, ptr + element_size * num_elements)\n// as being addressable, so that reads and writes are allowed. ASan may widen\n// the range to the nearest alignment boundaries.\nstatic inline void rtc_AsanUnpoison(const volatile void* ptr,\n                                    size_t element_size,\n                                    size_t num_elements) {\n#if RTC_HAS_ASAN\n  ASAN_UNPOISON_MEMORY_REGION(ptr, element_size * num_elements);\n#endif\n}\n\n// Ask MSan to mark the memory range [ptr, ptr + element_size * num_elements)\n// as being uninitialized.\nstatic inline void rtc_MsanMarkUninitialized(const volatile void* ptr,\n                                             size_t element_size,\n                                             size_t num_elements) {\n#if RTC_HAS_MSAN\n  __msan_poison(ptr, element_size * num_elements);\n#endif\n}\n\n// Force an MSan check (if any bits in the memory range [ptr, ptr +\n// element_size * num_elements) are uninitialized the call will crash with an\n// MSan report).\nstatic inline void rtc_MsanCheckInitialized(const volatile void* ptr,\n                                            size_t element_size,\n                                            size_t num_elements) {\n#if RTC_HAS_MSAN\n  __msan_check_mem_is_initialized(ptr, element_size * num_elements);\n#endif\n}\n\n#ifdef __cplusplus\n\nnamespace rtc {\n\ntemplate <typename T>\ninline void AsanPoison(const T& mem) {\n  rtc_AsanPoison(mem.data(), sizeof(mem.data()[0]), mem.size());\n}\n\ntemplate <typename T>\ninline void AsanUnpoison(const T& mem) {\n  rtc_AsanUnpoison(mem.data(), sizeof(mem.data()[0]), mem.size());\n}\n\ntemplate <typename T>\ninline void MsanMarkUninitialized(const T& mem) {\n  rtc_MsanMarkUninitialized(mem.data(), sizeof(mem.data()[0]), mem.size());\n}\n\ntemplate <typename T>\ninline void MsanCheckInitialized(const T& mem) {\n  rtc_MsanCheckInitialized(mem.data(), sizeof(mem.data()[0]), mem.size());\n}\n\n}  // namespace rtc\n\n#endif  // __cplusplus\n\n#endif  // WEBRTC_BASE_SANITIZER_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/stringutils.cc",
    "content": "/*\n *  Copyright 2004 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/base/stringutils.h\"\n\nnamespace rtc {\n\nbool memory_check(const void* memory, int c, size_t count) {\n  const char* char_memory = static_cast<const char*>(memory);\n  char char_c = static_cast<char>(c);\n  for (size_t i = 0; i < count; ++i) {\n    if (char_memory[i] != char_c) {\n      return false;\n    }\n  }\n  return true;\n}\n\nbool string_match(const char* target, const char* pattern) {\n  while (*pattern) {\n    if (*pattern == '*') {\n      if (!*++pattern) {\n        return true;\n      }\n      while (*target) {\n        if ((toupper(*pattern) == toupper(*target))\n            && string_match(target + 1, pattern + 1)) {\n          return true;\n        }\n        ++target;\n      }\n      return false;\n    } else {\n      if (toupper(*pattern) != toupper(*target)) {\n        return false;\n      }\n      ++target;\n      ++pattern;\n    }\n  }\n  return !*target;\n}\n\n#if defined(WEBRTC_WIN)\nint ascii_string_compare(const wchar_t* s1, const char* s2, size_t n,\n                         CharacterTransformation transformation) {\n  wchar_t c1, c2;\n  while (true) {\n    if (n-- == 0) return 0;\n    c1 = transformation(*s1);\n    // Double check that characters are not UTF-8\n    RTC_DCHECK_LT(*s2, 128);\n    // Note: *s2 gets implicitly promoted to wchar_t\n    c2 = transformation(*s2);\n    if (c1 != c2) return (c1 < c2) ? -1 : 1;\n    if (!c1) return 0;\n    ++s1;\n    ++s2;\n  }\n}\n\nsize_t asccpyn(wchar_t* buffer, size_t buflen,\n               const char* source, size_t srclen) {\n  if (buflen <= 0)\n    return 0;\n\n  if (srclen == SIZE_UNKNOWN) {\n    srclen = strlenn(source, buflen - 1);\n  } else if (srclen >= buflen) {\n    srclen = buflen - 1;\n  }\n#if RTC_DCHECK_IS_ON\n  // Double check that characters are not UTF-8\n  for (size_t pos = 0; pos < srclen; ++pos)\n    RTC_DCHECK_LT(source[pos], 128);\n#endif\n  std::copy(source, source + srclen, buffer);\n  buffer[srclen] = 0;\n  return srclen;\n}\n\n#endif  // WEBRTC_WIN\n\nvoid replace_substrs(const char *search,\n                     size_t search_len,\n                     const char *replace,\n                     size_t replace_len,\n                     std::string *s) {\n  size_t pos = 0;\n  while ((pos = s->find(search, pos, search_len)) != std::string::npos) {\n    s->replace(pos, search_len, replace, replace_len);\n    pos += replace_len;\n  }\n}\n\nbool starts_with(const char *s1, const char *s2) {\n  return strncmp(s1, s2, strlen(s2)) == 0;\n}\n\nbool ends_with(const char *s1, const char *s2) {\n  size_t s1_length = strlen(s1);\n  size_t s2_length = strlen(s2);\n\n  if (s2_length > s1_length) {\n    return false;\n  }\n\n  const char* start = s1 + (s1_length - s2_length);\n  return strncmp(start, s2, s2_length) == 0;\n}\n\nstatic const char kWhitespace[] = \" \\n\\r\\t\";\n\nstd::string string_trim(const std::string& s) {\n  std::string::size_type first = s.find_first_not_of(kWhitespace);\n  std::string::size_type last  = s.find_last_not_of(kWhitespace);\n\n  if (first == std::string::npos || last == std::string::npos) {\n    return std::string(\"\");\n  }\n\n  return s.substr(first, last - first + 1);\n}\n\n}  // namespace rtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/stringutils.h",
    "content": "/*\n *  Copyright 2004 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_BASE_STRINGUTILS_H__\n#define WEBRTC_BASE_STRINGUTILS_H__\n\n#include <ctype.h>\n#include <stdarg.h>\n#include <stdio.h>\n#include <string.h>\n\n#if defined(WEBRTC_WIN)\n#include <malloc.h>\n#include <wchar.h>\n#define alloca _alloca\n#endif  // WEBRTC_WIN \n\n#if defined(WEBRTC_POSIX)\n#ifdef BSD\n#include <stdlib.h>\n#else  // BSD\n#include <alloca.h>\n#endif  // !BSD\n#endif  // WEBRTC_POSIX\n\n#include <string>\n\n#include \"webrtc/base/basictypes.h\"\n\n///////////////////////////////////////////////////////////////////////////////\n// Generic string/memory utilities\n///////////////////////////////////////////////////////////////////////////////\n\n#define STACK_ARRAY(TYPE, LEN) static_cast<TYPE*>(::alloca((LEN)*sizeof(TYPE)))\n\nnamespace rtc {\n\n// Complement to memset.  Verifies memory consists of count bytes of value c.\nbool memory_check(const void* memory, int c, size_t count);\n\n// Determines whether the simple wildcard pattern matches target.\n// Alpha characters in pattern match case-insensitively.\n// Asterisks in pattern match 0 or more characters.\n// Ex: string_match(\"www.TEST.GOOGLE.COM\", \"www.*.com\") -> true\nbool string_match(const char* target, const char* pattern);\n\n}  // namespace rtc\n\n///////////////////////////////////////////////////////////////////////////////\n// Rename a bunch of common string functions so they are consistent across\n// platforms and between char and wchar_t variants.\n// Here is the full list of functions that are unified:\n//  strlen, strcmp, stricmp, strncmp, strnicmp\n//  strchr, vsnprintf, strtoul, tolowercase\n// tolowercase is like tolower, but not compatible with end-of-file value\n//\n// It's not clear if we will ever use wchar_t strings on unix.  In theory,\n// all strings should be Utf8 all the time, except when interfacing with Win32\n// APIs that require Utf16.\n///////////////////////////////////////////////////////////////////////////////\n\ninline char tolowercase(char c) {\n  return static_cast<char>(tolower(c));\n}\n\n#if defined(WEBRTC_WIN)\n\ninline size_t strlen(const wchar_t* s) {\n  return wcslen(s);\n}\ninline int strcmp(const wchar_t* s1, const wchar_t* s2) {\n  return wcscmp(s1, s2);\n}\ninline int stricmp(const wchar_t* s1, const wchar_t* s2) {\n  return _wcsicmp(s1, s2);\n}\ninline int strncmp(const wchar_t* s1, const wchar_t* s2, size_t n) {\n  return wcsncmp(s1, s2, n);\n}\ninline int strnicmp(const wchar_t* s1, const wchar_t* s2, size_t n) {\n  return _wcsnicmp(s1, s2, n);\n}\ninline const wchar_t* strchr(const wchar_t* s, wchar_t c) {\n  return wcschr(s, c);\n}\ninline const wchar_t* strstr(const wchar_t* haystack, const wchar_t* needle) {\n  return wcsstr(haystack, needle);\n}\n#ifndef vsnprintf\ninline int vsnprintf(wchar_t* buf, size_t n, const wchar_t* fmt, va_list args) {\n  return _vsnwprintf(buf, n, fmt, args);\n}\n#endif // !vsnprintf\ninline unsigned long strtoul(const wchar_t* snum, wchar_t** end, int base) {\n  return wcstoul(snum, end, base);\n}\ninline wchar_t tolowercase(wchar_t c) {\n  return static_cast<wchar_t>(towlower(c));\n}\n\n#endif  // WEBRTC_WIN \n\n#if defined(WEBRTC_POSIX)\n\ninline int _stricmp(const char* s1, const char* s2) {\n  return strcasecmp(s1, s2);\n}\ninline int _strnicmp(const char* s1, const char* s2, size_t n) {\n  return strncasecmp(s1, s2, n);\n}\n\n#endif // WEBRTC_POSIX\n\n///////////////////////////////////////////////////////////////////////////////\n// Traits simplifies porting string functions to be CTYPE-agnostic\n///////////////////////////////////////////////////////////////////////////////\n\nnamespace rtc {\n\nconst size_t SIZE_UNKNOWN = static_cast<size_t>(-1);\n\ntemplate<class CTYPE>\nstruct Traits {\n  // STL string type\n  //typedef XXX string;\n  // Null-terminated string\n  //inline static const CTYPE* empty_str();\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// String utilities which work with char or wchar_t\n///////////////////////////////////////////////////////////////////////////////\n\ntemplate<class CTYPE>\ninline const CTYPE* nonnull(const CTYPE* str, const CTYPE* def_str = NULL) {\n  return str ? str : (def_str ? def_str : Traits<CTYPE>::empty_str());\n}\n\ntemplate<class CTYPE>\nconst CTYPE* strchr(const CTYPE* str, const CTYPE* chs) {\n  for (size_t i=0; str[i]; ++i) {\n    for (size_t j=0; chs[j]; ++j) {\n      if (str[i] == chs[j]) {\n        return str + i;\n      }\n    }\n  }\n  return 0;\n}\n\ntemplate<class CTYPE>\nconst CTYPE* strchrn(const CTYPE* str, size_t slen, CTYPE ch) {\n  for (size_t i=0; i<slen && str[i]; ++i) {\n    if (str[i] == ch) {\n      return str + i;\n    }\n  }\n  return 0;\n}\n\ntemplate<class CTYPE>\nsize_t strlenn(const CTYPE* buffer, size_t buflen) {\n  size_t bufpos = 0;\n  while (buffer[bufpos] && (bufpos < buflen)) {\n    ++bufpos;\n  }\n  return bufpos;\n}\n\n// Safe versions of strncpy, strncat, snprintf and vsnprintf that always\n// null-terminate.\n\ntemplate<class CTYPE>\nsize_t strcpyn(CTYPE* buffer, size_t buflen,\n               const CTYPE* source, size_t srclen = SIZE_UNKNOWN) {\n  if (buflen <= 0)\n    return 0;\n\n  if (srclen == SIZE_UNKNOWN) {\n    srclen = strlenn(source, buflen - 1);\n  } else if (srclen >= buflen) {\n    srclen = buflen - 1;\n  }\n  memcpy(buffer, source, srclen * sizeof(CTYPE));\n  buffer[srclen] = 0;\n  return srclen;\n}\n\ntemplate<class CTYPE>\nsize_t strcatn(CTYPE* buffer, size_t buflen,\n               const CTYPE* source, size_t srclen = SIZE_UNKNOWN) {\n  if (buflen <= 0)\n    return 0;\n\n  size_t bufpos = strlenn(buffer, buflen - 1);\n  return bufpos + strcpyn(buffer + bufpos, buflen - bufpos, source, srclen);\n}\n\n// Some compilers (clang specifically) require vsprintfn be defined before\n// sprintfn.\ntemplate<class CTYPE>\nsize_t vsprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format,\n                 va_list args) {\n  int len = vsnprintf(buffer, buflen, format, args);\n  if ((len < 0) || (static_cast<size_t>(len) >= buflen)) {\n    len = static_cast<int>(buflen - 1);\n    buffer[len] = 0;\n  }\n  return len;\n}\n\ntemplate<class CTYPE>\nsize_t sprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, ...);\ntemplate<class CTYPE>\nsize_t sprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, ...) {\n  va_list args;\n  va_start(args, format);\n  size_t len = vsprintfn(buffer, buflen, format, args);\n  va_end(args);\n  return len;\n}\n\n///////////////////////////////////////////////////////////////////////////////\n// Allow safe comparing and copying ascii (not UTF-8) with both wide and\n// non-wide character strings.\n///////////////////////////////////////////////////////////////////////////////\n\ninline int asccmp(const char* s1, const char* s2) {\n  return strcmp(s1, s2);\n}\ninline int ascicmp(const char* s1, const char* s2) {\n  return strcmp(s1, s2);\n}\ninline int ascncmp(const char* s1, const char* s2, size_t n) {\n  return strncmp(s1, s2, n);\n}\ninline int ascnicmp(const char* s1, const char* s2, size_t n) {\n  return strncmp(s1, s2, n);\n}\ninline size_t asccpyn(char* buffer, size_t buflen,\n                      const char* source, size_t srclen = SIZE_UNKNOWN) {\n  return strcpyn(buffer, buflen, source, srclen);\n}\n\n#if defined(WEBRTC_WIN)\n\ntypedef wchar_t(*CharacterTransformation)(wchar_t);\ninline wchar_t identity(wchar_t c) { return c; }\nint ascii_string_compare(const wchar_t* s1, const char* s2, size_t n,\n                         CharacterTransformation transformation);\n\ninline int asccmp(const wchar_t* s1, const char* s2) {\n  return ascii_string_compare(s1, s2, static_cast<size_t>(-1), identity);\n}\ninline int ascicmp(const wchar_t* s1, const char* s2) {\n  return ascii_string_compare(s1, s2, static_cast<size_t>(-1), tolowercase);\n}\ninline int ascncmp(const wchar_t* s1, const char* s2, size_t n) {\n  return ascii_string_compare(s1, s2, n, identity);\n}\ninline int ascnicmp(const wchar_t* s1, const char* s2, size_t n) {\n  return ascii_string_compare(s1, s2, n, tolowercase);\n}\nsize_t asccpyn(wchar_t* buffer, size_t buflen,\n               const char* source, size_t srclen = SIZE_UNKNOWN);\n\n#endif  // WEBRTC_WIN \n\n///////////////////////////////////////////////////////////////////////////////\n// Traits<char> specializations\n///////////////////////////////////////////////////////////////////////////////\n\ntemplate<>\nstruct Traits<char> {\n  typedef std::string string;\n  inline static const char* empty_str() { return \"\"; }\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// Traits<wchar_t> specializations (Windows only, currently)\n///////////////////////////////////////////////////////////////////////////////\n\n#if defined(WEBRTC_WIN)\n\ntemplate<>\nstruct Traits<wchar_t> {\n  typedef std::wstring string;\n  inline static const wchar_t* empty_str() { return L\"\"; }\n};\n\n#endif  // WEBRTC_WIN \n\n// Replaces all occurrences of \"search\" with \"replace\".\nvoid replace_substrs(const char *search,\n                     size_t search_len,\n                     const char *replace,\n                     size_t replace_len,\n                     std::string *s);\n\n// True iff s1 starts with s2.\nbool starts_with(const char *s1, const char *s2);\n\n// True iff s1 ends with s2.\nbool ends_with(const char *s1, const char *s2);\n\n// Remove leading and trailing whitespaces.\nstd::string string_trim(const std::string& s);\n\n}  // namespace rtc\n\n#endif // WEBRTC_BASE_STRINGUTILS_H__\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/base/type_traits.h",
    "content": "/*\n *  Copyright 2016 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n \n#if (!defined(_MSC_VER) || _MSC_VER>1800)\n#ifndef WEBRTC_BASE_TYPE_TRAITS_H_ \n#define WEBRTC_BASE_TYPE_TRAITS_H_\n\n#include <cstddef>\n#include <type_traits>\n\nnamespace rtc {\n\n// Determines if the given class has zero-argument .data() and .size() methods\n// whose return values are convertible to T* and size_t, respectively.\ntemplate <typename DS, typename T>\nclass HasDataAndSize {\n private:\n  template <\n      typename C,\n      typename std::enable_if<\n          std::is_convertible<decltype(std::declval<C>().data()), T*>::value &&\n          std::is_convertible<decltype(std::declval<C>().size()),\n                              std::size_t>::value>::type* = nullptr>\n  static int Test(int);\n\n  template <typename>\n  static char Test(...);\n\n public:\n  static constexpr bool value = std::is_same<decltype(Test<DS>(0)), int>::value;\n};\n\nnamespace test_has_data_and_size {\n\ntemplate <typename DR, typename SR>\nstruct Test1 {\n  DR data();\n  SR size();\n};\nstatic_assert(HasDataAndSize<Test1<int*, int>, int>::value, \"\");\nstatic_assert(HasDataAndSize<Test1<int*, int>, const int>::value, \"\");\nstatic_assert(HasDataAndSize<Test1<const int*, int>, const int>::value, \"\");\nstatic_assert(!HasDataAndSize<Test1<const int*, int>, int>::value,\n              \"implicit cast of const int* to int*\");\nstatic_assert(!HasDataAndSize<Test1<char*, size_t>, int>::value,\n              \"implicit cast of char* to int*\");\n\nstruct Test2 {\n  int* data;\n  size_t size;\n};\nstatic_assert(!HasDataAndSize<Test2, int>::value,\n              \".data and .size aren't functions\");\n\nstruct Test3 {\n  int* data();\n};\nstatic_assert(!HasDataAndSize<Test3, int>::value, \".size() is missing\");\n\nclass Test4 {\n  int* data();\n  size_t size();\n};\nstatic_assert(!HasDataAndSize<Test4, int>::value,\n              \".data() and .size() are private\");\n\n}  // namespace test_has_data_and_size\n\n}  // namespace rtc\n\n#endif  // WEBRTC_BASE_TYPE_TRAITS_H_\n#endif\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/audio_util.cc",
    "content": "/*\n *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/include/audio_util.h\"\n\n#include \"webrtc/typedefs.h\"\n\nnamespace webrtc {\n\nvoid FloatToS16(const float* src, size_t size, int16_t* dest) {\n  for (size_t i = 0; i < size; ++i)\n    dest[i] = FloatToS16(src[i]);\n}\n\nvoid S16ToFloat(const int16_t* src, size_t size, float* dest) {\n  for (size_t i = 0; i < size; ++i)\n    dest[i] = S16ToFloat(src[i]);\n}\n\nvoid FloatS16ToS16(const float* src, size_t size, int16_t* dest) {\n  for (size_t i = 0; i < size; ++i)\n    dest[i] = FloatS16ToS16(src[i]);\n}\n\nvoid FloatToFloatS16(const float* src, size_t size, float* dest) {\n  for (size_t i = 0; i < size; ++i)\n    dest[i] = FloatToFloatS16(src[i]);\n}\n\nvoid FloatS16ToFloat(const float* src, size_t size, float* dest) {\n  for (size_t i = 0; i < size; ++i)\n    dest[i] = FloatS16ToFloat(src[i]);\n}\n\ntemplate <>\nvoid DownmixInterleavedToMono<int16_t>(const int16_t* interleaved,\n                                       size_t num_frames,\n                                       int num_channels,\n                                       int16_t* deinterleaved) {\n  DownmixInterleavedToMonoImpl<int16_t, int32_t>(interleaved, num_frames,\n                                                 num_channels, deinterleaved);\n}\n\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/channel_buffer.cc",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/channel_buffer.h\"\n\n#include \"webrtc/base/checks.h\"\n\nnamespace webrtc {\n\nIFChannelBuffer::IFChannelBuffer(size_t num_frames,\n                                 size_t num_channels,\n                                 size_t num_bands)\n    : ivalid_(true),\n      ibuf_(num_frames, num_channels, num_bands),\n      fvalid_(true),\n      fbuf_(num_frames, num_channels, num_bands) {}\n\nIFChannelBuffer::~IFChannelBuffer() = default;\n\nChannelBuffer<int16_t>* IFChannelBuffer::ibuf() {\n  RefreshI();\n  fvalid_ = false;\n  return &ibuf_;\n}\n\nChannelBuffer<float>* IFChannelBuffer::fbuf() {\n  RefreshF();\n  ivalid_ = false;\n  return &fbuf_;\n}\n\nconst ChannelBuffer<int16_t>* IFChannelBuffer::ibuf_const() const {\n  RefreshI();\n  return &ibuf_;\n}\n\nconst ChannelBuffer<float>* IFChannelBuffer::fbuf_const() const {\n  RefreshF();\n  return &fbuf_;\n}\n\nvoid IFChannelBuffer::RefreshF() const {\n  if (!fvalid_) {\n    RTC_DCHECK(ivalid_);\n    fbuf_.set_num_channels(ibuf_.num_channels());\n    const int16_t* const* int_channels = ibuf_.channels();\n    float* const* float_channels = fbuf_.channels();\n    for (size_t i = 0; i < ibuf_.num_channels(); ++i) {\n      for (size_t j = 0; j < ibuf_.num_frames(); ++j) {\n        float_channels[i][j] = int_channels[i][j];\n      }\n    }\n    fvalid_ = true;\n  }\n}\n\nvoid IFChannelBuffer::RefreshI() const {\n  if (!ivalid_) {\n    RTC_DCHECK(fvalid_);\n    int16_t* const* int_channels = ibuf_.channels();\n    ibuf_.set_num_channels(fbuf_.num_channels());\n    const float* const* float_channels = fbuf_.channels();\n    for (size_t i = 0; i < fbuf_.num_channels(); ++i) {\n      FloatS16ToS16(float_channels[i],\n                    ibuf_.num_frames(),\n                    int_channels[i]);\n    }\n    ivalid_ = true;\n  }\n}\n\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/channel_buffer.h",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_CHANNEL_BUFFER_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_CHANNEL_BUFFER_H_\n\n#include <string.h>\n\n#include <memory>\n\n#include \"webrtc/base/checks.h\"\n//#include \"webrtc/base/gtest_prod_util.h\"\n#include \"webrtc/common_audio/include/audio_util.h\"\n\nnamespace webrtc {\n\n// Helper to encapsulate a contiguous data buffer, full or split into frequency\n// bands, with access to a pointer arrays of the deinterleaved channels and\n// bands. The buffer is zero initialized at creation.\n//\n// The buffer structure is showed below for a 2 channel and 2 bands case:\n//\n// |data_|:\n// { [ --- b1ch1 --- ] [ --- b2ch1 --- ] [ --- b1ch2 --- ] [ --- b2ch2 --- ] }\n//\n// The pointer arrays for the same example are as follows:\n//\n// |channels_|:\n// { [ b1ch1* ] [ b1ch2* ] [ b2ch1* ] [ b2ch2* ] }\n//\n// |bands_|:\n// { [ b1ch1* ] [ b2ch1* ] [ b1ch2* ] [ b2ch2* ] }\ntemplate <typename T>\nclass ChannelBuffer {\n public:\n  ChannelBuffer(size_t num_frames,\n                size_t num_channels,\n                size_t num_bands = 1)\n      : data_(new T[num_frames * num_channels]()),\n        channels_(new T*[num_channels * num_bands]),\n        bands_(new T*[num_channels * num_bands]),\n        num_frames_(num_frames),\n        num_frames_per_band_(num_frames / num_bands),\n        num_allocated_channels_(num_channels),\n        num_channels_(num_channels),\n        num_bands_(num_bands) {\n    for (size_t i = 0; i < num_allocated_channels_; ++i) {\n      for (size_t j = 0; j < num_bands_; ++j) {\n        channels_[j * num_allocated_channels_ + i] =\n            &data_[i * num_frames_ + j * num_frames_per_band_];\n        bands_[i * num_bands_ + j] = channels_[j * num_allocated_channels_ + i];\n      }\n    }\n  }\n\n  // Returns a pointer array to the full-band channels (or lower band channels).\n  // Usage:\n  // channels()[channel][sample].\n  // Where:\n  // 0 <= channel < |num_allocated_channels_|\n  // 0 <= sample < |num_frames_|\n  T* const* channels() { return channels(0); }\n  const T* const* channels() const { return channels(0); }\n\n  // Returns a pointer array to the channels for a specific band.\n  // Usage:\n  // channels(band)[channel][sample].\n  // Where:\n  // 0 <= band < |num_bands_|\n  // 0 <= channel < |num_allocated_channels_|\n  // 0 <= sample < |num_frames_per_band_|\n  const T* const* channels(size_t band) const {\n    RTC_DCHECK_LT(band, num_bands_);\n    return &channels_[band * num_allocated_channels_];\n  }\n  T* const* channels(size_t band) {\n    const ChannelBuffer<T>* t = this;\n    return const_cast<T* const*>(t->channels(band));\n  }\n\n  // Returns a pointer array to the bands for a specific channel.\n  // Usage:\n  // bands(channel)[band][sample].\n  // Where:\n  // 0 <= channel < |num_channels_|\n  // 0 <= band < |num_bands_|\n  // 0 <= sample < |num_frames_per_band_|\n  const T* const* bands(size_t channel) const {\n    RTC_DCHECK_LT(channel, num_channels_);\n    RTC_DCHECK_GE(channel, 0);\n    return &bands_[channel * num_bands_];\n  }\n  T* const* bands(size_t channel) {\n    const ChannelBuffer<T>* t = this;\n    return const_cast<T* const*>(t->bands(channel));\n  }\n\n  // Sets the |slice| pointers to the |start_frame| position for each channel.\n  // Returns |slice| for convenience.\n  const T* const* Slice(T** slice, size_t start_frame) const {\n    RTC_DCHECK_LT(start_frame, num_frames_);\n    for (size_t i = 0; i < num_channels_; ++i)\n      slice[i] = &channels_[i][start_frame];\n    return slice;\n  }\n  T** Slice(T** slice, size_t start_frame) {\n    const ChannelBuffer<T>* t = this;\n    return const_cast<T**>(t->Slice(slice, start_frame));\n  }\n\n  size_t num_frames() const { return num_frames_; }\n  size_t num_frames_per_band() const { return num_frames_per_band_; }\n  size_t num_channels() const { return num_channels_; }\n  size_t num_bands() const { return num_bands_; }\n  size_t size() const {return num_frames_ * num_allocated_channels_; }\n\n  void set_num_channels(size_t num_channels) {\n    RTC_DCHECK_LE(num_channels, num_allocated_channels_);\n    num_channels_ = num_channels;\n  }\n\n  void SetDataForTesting(const T* data, size_t size) {\n    RTC_CHECK_EQ(size, this->size());\n    memcpy(data_.get(), data, size * sizeof(*data));\n  }\n\n private:\n  std::unique_ptr<T[]> data_;\n  std::unique_ptr<T* []> channels_;\n  std::unique_ptr<T* []> bands_;\n  const size_t num_frames_;\n  const size_t num_frames_per_band_;\n  // Number of channels the internal buffer holds.\n  const size_t num_allocated_channels_;\n  // Number of channels the user sees.\n  size_t num_channels_;\n  const size_t num_bands_;\n};\n\n// One int16_t and one float ChannelBuffer that are kept in sync. The sync is\n// broken when someone requests write access to either ChannelBuffer, and\n// reestablished when someone requests the outdated ChannelBuffer. It is\n// therefore safe to use the return value of ibuf_const() and fbuf_const()\n// until the next call to ibuf() or fbuf(), and the return value of ibuf() and\n// fbuf() until the next call to any of the other functions.\nclass IFChannelBuffer {\n public:\n  IFChannelBuffer(size_t num_frames, size_t num_channels, size_t num_bands = 1);\n  ~IFChannelBuffer();\n\n  ChannelBuffer<int16_t>* ibuf();\n  ChannelBuffer<float>* fbuf();\n  const ChannelBuffer<int16_t>* ibuf_const() const;\n  const ChannelBuffer<float>* fbuf_const() const;\n\n  size_t num_frames() const { return ibuf_.num_frames(); }\n  size_t num_frames_per_band() const { return ibuf_.num_frames_per_band(); }\n  size_t num_channels() const {\n    return ivalid_ ? ibuf_.num_channels() : fbuf_.num_channels();\n  }\n  void set_num_channels(size_t num_channels) {\n    ibuf_.set_num_channels(num_channels);\n    fbuf_.set_num_channels(num_channels);\n  }\n  size_t num_bands() const { return ibuf_.num_bands(); }\n\n private:\n  void RefreshF() const;\n  void RefreshI() const;\n\n  mutable bool ivalid_;\n  mutable ChannelBuffer<int16_t> ibuf_;\n  mutable bool fvalid_;\n  mutable ChannelBuffer<float> fbuf_;\n};\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_CHANNEL_BUFFER_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/fft4g.c",
    "content": "/*\n * http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html\n * Copyright Takuya OOURA, 1996-2001\n *\n * You may use, copy, modify and distribute this code for any purpose (include\n * commercial use) and without fee. Please refer to this package when you modify\n * this code.\n *\n * Changes:\n * Trivial type modifications by the WebRTC authors.\n */\n\n/*\nFast Fourier/Cosine/Sine Transform\n    dimension   :one\n    data length :power of 2\n    decimation  :frequency\n    radix       :4, 2\n    data        :inplace\n    table       :use\nfunctions\n    cdft: Complex Discrete Fourier Transform\n    rdft: Real Discrete Fourier Transform\n    ddct: Discrete Cosine Transform\n    ddst: Discrete Sine Transform\n    dfct: Cosine Transform of RDFT (Real Symmetric DFT)\n    dfst: Sine Transform of RDFT (Real Anti-symmetric DFT)\nfunction prototypes\n    void cdft(int, int, float *, int *, float *);\n    void rdft(size_t, int, float *, size_t *, float *);\n    void ddct(int, int, float *, int *, float *);\n    void ddst(int, int, float *, int *, float *);\n    void dfct(int, float *, float *, int *, float *);\n    void dfst(int, float *, float *, int *, float *);\n\n\n-------- Complex DFT (Discrete Fourier Transform) --------\n    [definition]\n        <case1>\n            X[k] = sum_j=0^n-1 x[j]*exp(2*pi*i*j*k/n), 0<=k<n\n        <case2>\n            X[k] = sum_j=0^n-1 x[j]*exp(-2*pi*i*j*k/n), 0<=k<n\n        (notes: sum_j=0^n-1 is a summation from j=0 to n-1)\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            cdft(2*n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            cdft(2*n, -1, a, ip, w);\n    [parameters]\n        2*n            :data length (int)\n                        n >= 1, n = power of 2\n        a[0...2*n-1]   :input/output data (float *)\n                        input data\n                            a[2*j] = Re(x[j]),\n                            a[2*j+1] = Im(x[j]), 0<=j<n\n                        output data\n                            a[2*k] = Re(X[k]),\n                            a[2*k+1] = Im(X[k]), 0<=k<n\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n)\n                        strictly,\n                        length of ip >=\n                            2+(1<<(int)(log(n+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n/2-1]   :cos/sin table (float *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of\n            cdft(2*n, -1, a, ip, w);\n        is\n            cdft(2*n, 1, a, ip, w);\n            for (j = 0; j <= 2 * n - 1; j++) {\n                a[j] *= 1.0 / n;\n            }\n        .\n\n\n-------- Real DFT / Inverse of Real DFT --------\n    [definition]\n        <case1> RDFT\n            R[k] = sum_j=0^n-1 a[j]*cos(2*pi*j*k/n), 0<=k<=n/2\n            I[k] = sum_j=0^n-1 a[j]*sin(2*pi*j*k/n), 0<k<n/2\n        <case2> IRDFT (excluding scale)\n            a[k] = (R[0] + R[n/2]*cos(pi*k))/2 +\n                   sum_j=1^n/2-1 R[j]*cos(2*pi*j*k/n) +\n                   sum_j=1^n/2-1 I[j]*sin(2*pi*j*k/n), 0<=k<n\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            rdft(n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            rdft(n, -1, a, ip, w);\n    [parameters]\n        n              :data length (size_t)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (float *)\n                        <case1>\n                            output data\n                                a[2*k] = R[k], 0<=k<n/2\n                                a[2*k+1] = I[k], 0<k<n/2\n                                a[1] = R[n/2]\n                        <case2>\n                            input data\n                                a[2*j] = R[j], 0<=j<n/2\n                                a[2*j+1] = I[j], 0<j<n/2\n                                a[1] = R[n/2]\n        ip[0...*]      :work area for bit reversal (size_t *)\n                        length of ip >= 2+sqrt(n/2)\n                        strictly,\n                        length of ip >=\n                            2+(1<<(int)(log(n/2+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n/2-1]   :cos/sin table (float *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of\n            rdft(n, 1, a, ip, w);\n        is\n            rdft(n, -1, a, ip, w);\n            for (j = 0; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- DCT (Discrete Cosine Transform) / Inverse of DCT --------\n    [definition]\n        <case1> IDCT (excluding scale)\n            C[k] = sum_j=0^n-1 a[j]*cos(pi*j*(k+1/2)/n), 0<=k<n\n        <case2> DCT\n            C[k] = sum_j=0^n-1 a[j]*cos(pi*(j+1/2)*k/n), 0<=k<n\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            ddct(n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            ddct(n, -1, a, ip, w);\n    [parameters]\n        n              :data length (int)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (float *)\n                        output data\n                            a[k] = C[k], 0<=k<n\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/2)\n                        strictly,\n                        length of ip >=\n                            2+(1<<(int)(log(n/2+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/4-1] :cos/sin table (float *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of\n            ddct(n, -1, a, ip, w);\n        is\n            a[0] *= 0.5;\n            ddct(n, 1, a, ip, w);\n            for (j = 0; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- DST (Discrete Sine Transform) / Inverse of DST --------\n    [definition]\n        <case1> IDST (excluding scale)\n            S[k] = sum_j=1^n A[j]*sin(pi*j*(k+1/2)/n), 0<=k<n\n        <case2> DST\n            S[k] = sum_j=0^n-1 a[j]*sin(pi*(j+1/2)*k/n), 0<k<=n\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            ddst(n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            ddst(n, -1, a, ip, w);\n    [parameters]\n        n              :data length (int)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (float *)\n                        <case1>\n                            input data\n                                a[j] = A[j], 0<j<n\n                                a[0] = A[n]\n                            output data\n                                a[k] = S[k], 0<=k<n\n                        <case2>\n                            output data\n                                a[k] = S[k], 0<k<n\n                                a[0] = S[n]\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/2)\n                        strictly,\n                        length of ip >=\n                            2+(1<<(int)(log(n/2+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/4-1] :cos/sin table (float *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of\n            ddst(n, -1, a, ip, w);\n        is\n            a[0] *= 0.5;\n            ddst(n, 1, a, ip, w);\n            for (j = 0; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- Cosine Transform of RDFT (Real Symmetric DFT) --------\n    [definition]\n        C[k] = sum_j=0^n a[j]*cos(pi*j*k/n), 0<=k<=n\n    [usage]\n        ip[0] = 0; // first time only\n        dfct(n, a, t, ip, w);\n    [parameters]\n        n              :data length - 1 (int)\n                        n >= 2, n = power of 2\n        a[0...n]       :input/output data (float *)\n                        output data\n                            a[k] = C[k], 0<=k<=n\n        t[0...n/2]     :work area (float *)\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/4)\n                        strictly,\n                        length of ip >=\n                            2+(1<<(int)(log(n/4+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/8-1] :cos/sin table (float *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of\n            a[0] *= 0.5;\n            a[n] *= 0.5;\n            dfct(n, a, t, ip, w);\n        is\n            a[0] *= 0.5;\n            a[n] *= 0.5;\n            dfct(n, a, t, ip, w);\n            for (j = 0; j <= n; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- Sine Transform of RDFT (Real Anti-symmetric DFT) --------\n    [definition]\n        S[k] = sum_j=1^n-1 a[j]*sin(pi*j*k/n), 0<k<n\n    [usage]\n        ip[0] = 0; // first time only\n        dfst(n, a, t, ip, w);\n    [parameters]\n        n              :data length + 1 (int)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (float *)\n                        output data\n                            a[k] = S[k], 0<k<n\n                        (a[0] is used for work area)\n        t[0...n/2-1]   :work area (float *)\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/4)\n                        strictly,\n                        length of ip >=\n                            2+(1<<(int)(log(n/4+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/8-1] :cos/sin table (float *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of\n            dfst(n, a, t, ip, w);\n        is\n            dfst(n, a, t, ip, w);\n            for (j = 1; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\nAppendix :\n    The cos/sin table is recalculated when the larger table required.\n    w[] and ip[] are compatible with all routines.\n*/\n\n#include <stddef.h>\n\nstatic void makewt(size_t nw, size_t *ip, float *w);\nstatic void makect(size_t nc, size_t *ip, float *c);\nstatic void bitrv2(size_t n, size_t *ip, float *a);\n#if 0  // Not used.\nstatic void bitrv2conj(int n, int *ip, float *a);\n#endif\nstatic void cftfsub(size_t n, float *a, float *w);\nstatic void cftbsub(size_t n, float *a, float *w);\nstatic void cft1st(size_t n, float *a, float *w);\nstatic void cftmdl(size_t n, size_t l, float *a, float *w);\nstatic void rftfsub(size_t n, float *a, size_t nc, float *c);\nstatic void rftbsub(size_t n, float *a, size_t nc, float *c);\n#if 0  // Not used.\nstatic void dctsub(int n, float *a, int nc, float *c)\nstatic void dstsub(int n, float *a, int nc, float *c)\n#endif\n\n\n#if 0  // Not used.\nvoid WebRtc_cdft(int n, int isgn, float *a, int *ip, float *w)\n{\n    if (n > (ip[0] << 2)) {\n        makewt(n >> 2, ip, w);\n    }\n    if (n > 4) {\n        if (isgn >= 0) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n        } else {\n            bitrv2conj(n, ip + 2, a);\n            cftbsub(n, a, w);\n        }\n    } else if (n == 4) {\n        cftfsub(n, a, w);\n    }\n}\n#endif\n\n\nvoid WebRtc_rdft(size_t n, int isgn, float *a, size_t *ip, float *w)\n{\n    size_t nw, nc;\n    float xi;\n\n    nw = ip[0];\n    if (n > (nw << 2)) {\n        nw = n >> 2;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > (nc << 2)) {\n        nc = n >> 2;\n        makect(nc, ip, w + nw);\n    }\n    if (isgn >= 0) {\n        if (n > 4) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n            rftfsub(n, a, nc, w + nw);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n        xi = a[0] - a[1];\n        a[0] += a[1];\n        a[1] = xi;\n    } else {\n        a[1] = 0.5f * (a[0] - a[1]);\n        a[0] -= a[1];\n        if (n > 4) {\n            rftbsub(n, a, nc, w + nw);\n            bitrv2(n, ip + 2, a);\n            cftbsub(n, a, w);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n    }\n}\n\n#if 0  // Not used.\nstatic void ddct(int n, int isgn, float *a, int *ip, float *w)\n{\n    int j, nw, nc;\n    float xr;\n\n    nw = ip[0];\n    if (n > (nw << 2)) {\n        nw = n >> 2;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > nc) {\n        nc = n;\n        makect(nc, ip, w + nw);\n    }\n    if (isgn < 0) {\n        xr = a[n - 1];\n        for (j = n - 2; j >= 2; j -= 2) {\n            a[j + 1] = a[j] - a[j - 1];\n            a[j] += a[j - 1];\n        }\n        a[1] = a[0] - xr;\n        a[0] += xr;\n        if (n > 4) {\n            rftbsub(n, a, nc, w + nw);\n            bitrv2(n, ip + 2, a);\n            cftbsub(n, a, w);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n    }\n    dctsub(n, a, nc, w + nw);\n    if (isgn >= 0) {\n        if (n > 4) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n            rftfsub(n, a, nc, w + nw);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n        xr = a[0] - a[1];\n        a[0] += a[1];\n        for (j = 2; j < n; j += 2) {\n            a[j - 1] = a[j] - a[j + 1];\n            a[j] += a[j + 1];\n        }\n        a[n - 1] = xr;\n    }\n}\n\n\nstatic void ddst(int n, int isgn, float *a, int *ip, float *w)\n{\n    int j, nw, nc;\n    float xr;\n\n    nw = ip[0];\n    if (n > (nw << 2)) {\n        nw = n >> 2;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > nc) {\n        nc = n;\n        makect(nc, ip, w + nw);\n    }\n    if (isgn < 0) {\n        xr = a[n - 1];\n        for (j = n - 2; j >= 2; j -= 2) {\n            a[j + 1] = -a[j] - a[j - 1];\n            a[j] -= a[j - 1];\n        }\n        a[1] = a[0] + xr;\n        a[0] -= xr;\n        if (n > 4) {\n            rftbsub(n, a, nc, w + nw);\n            bitrv2(n, ip + 2, a);\n            cftbsub(n, a, w);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n    }\n    dstsub(n, a, nc, w + nw);\n    if (isgn >= 0) {\n        if (n > 4) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n            rftfsub(n, a, nc, w + nw);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n        xr = a[0] - a[1];\n        a[0] += a[1];\n        for (j = 2; j < n; j += 2) {\n            a[j - 1] = -a[j] - a[j + 1];\n            a[j] -= a[j + 1];\n        }\n        a[n - 1] = -xr;\n    }\n}\n\n\nstatic void dfct(int n, float *a, float *t, int *ip, float *w)\n{\n    int j, k, l, m, mh, nw, nc;\n    float xr, xi, yr, yi;\n\n    nw = ip[0];\n    if (n > (nw << 3)) {\n        nw = n >> 3;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > (nc << 1)) {\n        nc = n >> 1;\n        makect(nc, ip, w + nw);\n    }\n    m = n >> 1;\n    yi = a[m];\n    xi = a[0] + a[n];\n    a[0] -= a[n];\n    t[0] = xi - yi;\n    t[m] = xi + yi;\n    if (n > 2) {\n        mh = m >> 1;\n        for (j = 1; j < mh; j++) {\n            k = m - j;\n            xr = a[j] - a[n - j];\n            xi = a[j] + a[n - j];\n            yr = a[k] - a[n - k];\n            yi = a[k] + a[n - k];\n            a[j] = xr;\n            a[k] = yr;\n            t[j] = xi - yi;\n            t[k] = xi + yi;\n        }\n        t[mh] = a[mh] + a[n - mh];\n        a[mh] -= a[n - mh];\n        dctsub(m, a, nc, w + nw);\n        if (m > 4) {\n            bitrv2(m, ip + 2, a);\n            cftfsub(m, a, w);\n            rftfsub(m, a, nc, w + nw);\n        } else if (m == 4) {\n            cftfsub(m, a, w);\n        }\n        a[n - 1] = a[0] - a[1];\n        a[1] = a[0] + a[1];\n        for (j = m - 2; j >= 2; j -= 2) {\n            a[2 * j + 1] = a[j] + a[j + 1];\n            a[2 * j - 1] = a[j] - a[j + 1];\n        }\n        l = 2;\n        m = mh;\n        while (m >= 2) {\n            dctsub(m, t, nc, w + nw);\n            if (m > 4) {\n                bitrv2(m, ip + 2, t);\n                cftfsub(m, t, w);\n                rftfsub(m, t, nc, w + nw);\n            } else if (m == 4) {\n                cftfsub(m, t, w);\n            }\n            a[n - l] = t[0] - t[1];\n            a[l] = t[0] + t[1];\n            k = 0;\n            for (j = 2; j < m; j += 2) {\n                k += l << 2;\n                a[k - l] = t[j] - t[j + 1];\n                a[k + l] = t[j] + t[j + 1];\n            }\n            l <<= 1;\n            mh = m >> 1;\n            for (j = 0; j < mh; j++) {\n                k = m - j;\n                t[j] = t[m + k] - t[m + j];\n                t[k] = t[m + k] + t[m + j];\n            }\n            t[mh] = t[m + mh];\n            m = mh;\n        }\n        a[l] = t[0];\n        a[n] = t[2] - t[1];\n        a[0] = t[2] + t[1];\n    } else {\n        a[1] = a[0];\n        a[2] = t[0];\n        a[0] = t[1];\n    }\n}\n\nstatic void dfst(int n, float *a, float *t, int *ip, float *w)\n{\n    int j, k, l, m, mh, nw, nc;\n    float xr, xi, yr, yi;\n\n    nw = ip[0];\n    if (n > (nw << 3)) {\n        nw = n >> 3;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > (nc << 1)) {\n        nc = n >> 1;\n        makect(nc, ip, w + nw);\n    }\n    if (n > 2) {\n        m = n >> 1;\n        mh = m >> 1;\n        for (j = 1; j < mh; j++) {\n            k = m - j;\n            xr = a[j] + a[n - j];\n            xi = a[j] - a[n - j];\n            yr = a[k] + a[n - k];\n            yi = a[k] - a[n - k];\n            a[j] = xr;\n            a[k] = yr;\n            t[j] = xi + yi;\n            t[k] = xi - yi;\n        }\n        t[0] = a[mh] - a[n - mh];\n        a[mh] += a[n - mh];\n        a[0] = a[m];\n        dstsub(m, a, nc, w + nw);\n        if (m > 4) {\n            bitrv2(m, ip + 2, a);\n            cftfsub(m, a, w);\n            rftfsub(m, a, nc, w + nw);\n        } else if (m == 4) {\n            cftfsub(m, a, w);\n        }\n        a[n - 1] = a[1] - a[0];\n        a[1] = a[0] + a[1];\n        for (j = m - 2; j >= 2; j -= 2) {\n            a[2 * j + 1] = a[j] - a[j + 1];\n            a[2 * j - 1] = -a[j] - a[j + 1];\n        }\n        l = 2;\n        m = mh;\n        while (m >= 2) {\n            dstsub(m, t, nc, w + nw);\n            if (m > 4) {\n                bitrv2(m, ip + 2, t);\n                cftfsub(m, t, w);\n                rftfsub(m, t, nc, w + nw);\n            } else if (m == 4) {\n                cftfsub(m, t, w);\n            }\n            a[n - l] = t[1] - t[0];\n            a[l] = t[0] + t[1];\n            k = 0;\n            for (j = 2; j < m; j += 2) {\n                k += l << 2;\n                a[k - l] = -t[j] - t[j + 1];\n                a[k + l] = t[j] - t[j + 1];\n            }\n            l <<= 1;\n            mh = m >> 1;\n            for (j = 1; j < mh; j++) {\n                k = m - j;\n                t[j] = t[m + k] + t[m + j];\n                t[k] = t[m + k] - t[m + j];\n            }\n            t[0] = t[m + mh];\n            m = mh;\n        }\n        a[l] = t[0];\n    }\n    a[0] = 0;\n}\n#endif  // Not used.\n\n\n/* -------- initializing routines -------- */\n\n\n#include <math.h>\n\nstatic void makewt(size_t nw, size_t *ip, float *w)\n{\n    size_t j, nwh;\n    float delta, x, y;\n\n    ip[0] = nw;\n    ip[1] = 1;\n    if (nw > 2) {\n        nwh = nw >> 1;\n        delta = atanf(1.0f) / nwh;\n        w[0] = 1;\n        w[1] = 0;\n        w[nwh] = (float)cos(delta * nwh);\n        w[nwh + 1] = w[nwh];\n        if (nwh > 2) {\n            for (j = 2; j < nwh; j += 2) {\n                x = (float)cos(delta * j);\n                y = (float)sin(delta * j);\n                w[j] = x;\n                w[j + 1] = y;\n                w[nw - j] = y;\n                w[nw - j + 1] = x;\n            }\n            bitrv2(nw, ip + 2, w);\n        }\n    }\n}\n\n\nstatic void makect(size_t nc, size_t *ip, float *c)\n{\n    size_t j, nch;\n    float delta;\n\n    ip[1] = nc;\n    if (nc > 1) {\n        nch = nc >> 1;\n        delta = atanf(1.0f) / nch;\n        c[0] = (float)cos(delta * nch);\n        c[nch] = 0.5f * c[0];\n        for (j = 1; j < nch; j++) {\n            c[j] = 0.5f * (float)cos(delta * j);\n            c[nc - j] = 0.5f * (float)sin(delta * j);\n        }\n    }\n}\n\n\n/* -------- child routines -------- */\n\n\nstatic void bitrv2(size_t n, size_t *ip, float *a)\n{\n    size_t j, j1, k, k1, l, m, m2;\n    float xr, xi, yr, yi;\n\n    ip[0] = 0;\n    l = n;\n    m = 1;\n    while ((m << 3) < l) {\n        l >>= 1;\n        for (j = 0; j < m; j++) {\n            ip[m + j] = ip[j] + l;\n        }\n        m <<= 1;\n    }\n    m2 = 2 * m;\n    if ((m << 3) == l) {\n        for (k = 0; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 -= m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n            j1 = 2 * k + m2 + ip[k];\n            k1 = j1 + m2;\n            xr = a[j1];\n            xi = a[j1 + 1];\n            yr = a[k1];\n            yi = a[k1 + 1];\n            a[j1] = yr;\n            a[j1 + 1] = yi;\n            a[k1] = xr;\n            a[k1 + 1] = xi;\n        }\n    } else {\n        for (k = 1; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n        }\n    }\n}\n\n#if 0  // Not used.\nstatic void bitrv2conj(int n, int *ip, float *a)\n{\n    int j, j1, k, k1, l, m, m2;\n    float xr, xi, yr, yi;\n\n    ip[0] = 0;\n    l = n;\n    m = 1;\n    while ((m << 3) < l) {\n        l >>= 1;\n        for (j = 0; j < m; j++) {\n            ip[m + j] = ip[j] + l;\n        }\n        m <<= 1;\n    }\n    m2 = 2 * m;\n    if ((m << 3) == l) {\n        for (k = 0; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 -= m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n            k1 = 2 * k + ip[k];\n            a[k1 + 1] = -a[k1 + 1];\n            j1 = k1 + m2;\n            k1 = j1 + m2;\n            xr = a[j1];\n            xi = -a[j1 + 1];\n            yr = a[k1];\n            yi = -a[k1 + 1];\n            a[j1] = yr;\n            a[j1 + 1] = yi;\n            a[k1] = xr;\n            a[k1 + 1] = xi;\n            k1 += m2;\n            a[k1 + 1] = -a[k1 + 1];\n        }\n    } else {\n        a[1] = -a[1];\n        a[m2 + 1] = -a[m2 + 1];\n        for (k = 1; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n            k1 = 2 * k + ip[k];\n            a[k1 + 1] = -a[k1 + 1];\n            a[k1 + m2 + 1] = -a[k1 + m2 + 1];\n        }\n    }\n}\n#endif\n\nstatic void cftfsub(size_t n, float *a, float *w)\n{\n    size_t j, j1, j2, j3, l;\n    float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n\n    l = 2;\n    if (n > 8) {\n        cft1st(n, a, w);\n        l = 8;\n        while ((l << 2) < n) {\n            cftmdl(n, l, a, w);\n            l <<= 2;\n        }\n    }\n    if ((l << 2) == n) {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = a[j + 1] + a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = a[j + 1] - a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i + x2i;\n            a[j2] = x0r - x2r;\n            a[j2 + 1] = x0i - x2i;\n            a[j1] = x1r - x3i;\n            a[j1 + 1] = x1i + x3r;\n            a[j3] = x1r + x3i;\n            a[j3 + 1] = x1i - x3r;\n        }\n    } else {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            x0r = a[j] - a[j1];\n            x0i = a[j + 1] - a[j1 + 1];\n            a[j] += a[j1];\n            a[j + 1] += a[j1 + 1];\n            a[j1] = x0r;\n            a[j1 + 1] = x0i;\n        }\n    }\n}\n\n\nstatic void cftbsub(size_t n, float *a, float *w)\n{\n    size_t j, j1, j2, j3, l;\n    float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n\n    l = 2;\n    if (n > 8) {\n        cft1st(n, a, w);\n        l = 8;\n        while ((l << 2) < n) {\n            cftmdl(n, l, a, w);\n            l <<= 2;\n        }\n    }\n    if ((l << 2) == n) {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = -a[j + 1] - a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = -a[j + 1] + a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i - x2i;\n            a[j2] = x0r - x2r;\n            a[j2 + 1] = x0i + x2i;\n            a[j1] = x1r - x3i;\n            a[j1 + 1] = x1i - x3r;\n            a[j3] = x1r + x3i;\n            a[j3 + 1] = x1i + x3r;\n        }\n    } else {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            x0r = a[j] - a[j1];\n            x0i = -a[j + 1] + a[j1 + 1];\n            a[j] += a[j1];\n            a[j + 1] = -a[j + 1] - a[j1 + 1];\n            a[j1] = x0r;\n            a[j1 + 1] = x0i;\n        }\n    }\n}\n\n\nstatic void cft1st(size_t n, float *a, float *w)\n{\n    size_t j, k1, k2;\n    float wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;\n    float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n\n    x0r = a[0] + a[2];\n    x0i = a[1] + a[3];\n    x1r = a[0] - a[2];\n    x1i = a[1] - a[3];\n    x2r = a[4] + a[6];\n    x2i = a[5] + a[7];\n    x3r = a[4] - a[6];\n    x3i = a[5] - a[7];\n    a[0] = x0r + x2r;\n    a[1] = x0i + x2i;\n    a[4] = x0r - x2r;\n    a[5] = x0i - x2i;\n    a[2] = x1r - x3i;\n    a[3] = x1i + x3r;\n    a[6] = x1r + x3i;\n    a[7] = x1i - x3r;\n    wk1r = w[2];\n    x0r = a[8] + a[10];\n    x0i = a[9] + a[11];\n    x1r = a[8] - a[10];\n    x1i = a[9] - a[11];\n    x2r = a[12] + a[14];\n    x2i = a[13] + a[15];\n    x3r = a[12] - a[14];\n    x3i = a[13] - a[15];\n    a[8] = x0r + x2r;\n    a[9] = x0i + x2i;\n    a[12] = x2i - x0i;\n    a[13] = x0r - x2r;\n    x0r = x1r - x3i;\n    x0i = x1i + x3r;\n    a[10] = wk1r * (x0r - x0i);\n    a[11] = wk1r * (x0r + x0i);\n    x0r = x3i + x1r;\n    x0i = x3r - x1i;\n    a[14] = wk1r * (x0i - x0r);\n    a[15] = wk1r * (x0i + x0r);\n    k1 = 0;\n    for (j = 16; j < n; j += 16) {\n        k1 += 2;\n        k2 = 2 * k1;\n        wk2r = w[k1];\n        wk2i = w[k1 + 1];\n        wk1r = w[k2];\n        wk1i = w[k2 + 1];\n        wk3r = wk1r - 2 * wk2i * wk1i;\n        wk3i = 2 * wk2i * wk1r - wk1i;\n        x0r = a[j] + a[j + 2];\n        x0i = a[j + 1] + a[j + 3];\n        x1r = a[j] - a[j + 2];\n        x1i = a[j + 1] - a[j + 3];\n        x2r = a[j + 4] + a[j + 6];\n        x2i = a[j + 5] + a[j + 7];\n        x3r = a[j + 4] - a[j + 6];\n        x3i = a[j + 5] - a[j + 7];\n        a[j] = x0r + x2r;\n        a[j + 1] = x0i + x2i;\n        x0r -= x2r;\n        x0i -= x2i;\n        a[j + 4] = wk2r * x0r - wk2i * x0i;\n        a[j + 5] = wk2r * x0i + wk2i * x0r;\n        x0r = x1r - x3i;\n        x0i = x1i + x3r;\n        a[j + 2] = wk1r * x0r - wk1i * x0i;\n        a[j + 3] = wk1r * x0i + wk1i * x0r;\n        x0r = x1r + x3i;\n        x0i = x1i - x3r;\n        a[j + 6] = wk3r * x0r - wk3i * x0i;\n        a[j + 7] = wk3r * x0i + wk3i * x0r;\n        wk1r = w[k2 + 2];\n        wk1i = w[k2 + 3];\n        wk3r = wk1r - 2 * wk2r * wk1i;\n        wk3i = 2 * wk2r * wk1r - wk1i;\n        x0r = a[j + 8] + a[j + 10];\n        x0i = a[j + 9] + a[j + 11];\n        x1r = a[j + 8] - a[j + 10];\n        x1i = a[j + 9] - a[j + 11];\n        x2r = a[j + 12] + a[j + 14];\n        x2i = a[j + 13] + a[j + 15];\n        x3r = a[j + 12] - a[j + 14];\n        x3i = a[j + 13] - a[j + 15];\n        a[j + 8] = x0r + x2r;\n        a[j + 9] = x0i + x2i;\n        x0r -= x2r;\n        x0i -= x2i;\n        a[j + 12] = -wk2i * x0r - wk2r * x0i;\n        a[j + 13] = -wk2i * x0i + wk2r * x0r;\n        x0r = x1r - x3i;\n        x0i = x1i + x3r;\n        a[j + 10] = wk1r * x0r - wk1i * x0i;\n        a[j + 11] = wk1r * x0i + wk1i * x0r;\n        x0r = x1r + x3i;\n        x0i = x1i - x3r;\n        a[j + 14] = wk3r * x0r - wk3i * x0i;\n        a[j + 15] = wk3r * x0i + wk3i * x0r;\n    }\n}\n\n\nstatic void cftmdl(size_t n, size_t l, float *a, float *w)\n{\n    size_t j, j1, j2, j3, k, k1, k2, m, m2;\n    float wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;\n    float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n\n    m = l << 2;\n    for (j = 0; j < l; j += 2) {\n        j1 = j + l;\n        j2 = j1 + l;\n        j3 = j2 + l;\n        x0r = a[j] + a[j1];\n        x0i = a[j + 1] + a[j1 + 1];\n        x1r = a[j] - a[j1];\n        x1i = a[j + 1] - a[j1 + 1];\n        x2r = a[j2] + a[j3];\n        x2i = a[j2 + 1] + a[j3 + 1];\n        x3r = a[j2] - a[j3];\n        x3i = a[j2 + 1] - a[j3 + 1];\n        a[j] = x0r + x2r;\n        a[j + 1] = x0i + x2i;\n        a[j2] = x0r - x2r;\n        a[j2 + 1] = x0i - x2i;\n        a[j1] = x1r - x3i;\n        a[j1 + 1] = x1i + x3r;\n        a[j3] = x1r + x3i;\n        a[j3 + 1] = x1i - x3r;\n    }\n    wk1r = w[2];\n    for (j = m; j < l + m; j += 2) {\n        j1 = j + l;\n        j2 = j1 + l;\n        j3 = j2 + l;\n        x0r = a[j] + a[j1];\n        x0i = a[j + 1] + a[j1 + 1];\n        x1r = a[j] - a[j1];\n        x1i = a[j + 1] - a[j1 + 1];\n        x2r = a[j2] + a[j3];\n        x2i = a[j2 + 1] + a[j3 + 1];\n        x3r = a[j2] - a[j3];\n        x3i = a[j2 + 1] - a[j3 + 1];\n        a[j] = x0r + x2r;\n        a[j + 1] = x0i + x2i;\n        a[j2] = x2i - x0i;\n        a[j2 + 1] = x0r - x2r;\n        x0r = x1r - x3i;\n        x0i = x1i + x3r;\n        a[j1] = wk1r * (x0r - x0i);\n        a[j1 + 1] = wk1r * (x0r + x0i);\n        x0r = x3i + x1r;\n        x0i = x3r - x1i;\n        a[j3] = wk1r * (x0i - x0r);\n        a[j3 + 1] = wk1r * (x0i + x0r);\n    }\n    k1 = 0;\n    m2 = 2 * m;\n    for (k = m2; k < n; k += m2) {\n        k1 += 2;\n        k2 = 2 * k1;\n        wk2r = w[k1];\n        wk2i = w[k1 + 1];\n        wk1r = w[k2];\n        wk1i = w[k2 + 1];\n        wk3r = wk1r - 2 * wk2i * wk1i;\n        wk3i = 2 * wk2i * wk1r - wk1i;\n        for (j = k; j < l + k; j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = a[j + 1] + a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = a[j + 1] - a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i + x2i;\n            x0r -= x2r;\n            x0i -= x2i;\n            a[j2] = wk2r * x0r - wk2i * x0i;\n            a[j2 + 1] = wk2r * x0i + wk2i * x0r;\n            x0r = x1r - x3i;\n            x0i = x1i + x3r;\n            a[j1] = wk1r * x0r - wk1i * x0i;\n            a[j1 + 1] = wk1r * x0i + wk1i * x0r;\n            x0r = x1r + x3i;\n            x0i = x1i - x3r;\n            a[j3] = wk3r * x0r - wk3i * x0i;\n            a[j3 + 1] = wk3r * x0i + wk3i * x0r;\n        }\n        wk1r = w[k2 + 2];\n        wk1i = w[k2 + 3];\n        wk3r = wk1r - 2 * wk2r * wk1i;\n        wk3i = 2 * wk2r * wk1r - wk1i;\n        for (j = k + m; j < l + (k + m); j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = a[j + 1] + a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = a[j + 1] - a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i + x2i;\n            x0r -= x2r;\n            x0i -= x2i;\n            a[j2] = -wk2i * x0r - wk2r * x0i;\n            a[j2 + 1] = -wk2i * x0i + wk2r * x0r;\n            x0r = x1r - x3i;\n            x0i = x1i + x3r;\n            a[j1] = wk1r * x0r - wk1i * x0i;\n            a[j1 + 1] = wk1r * x0i + wk1i * x0r;\n            x0r = x1r + x3i;\n            x0i = x1i - x3r;\n            a[j3] = wk3r * x0r - wk3i * x0i;\n            a[j3 + 1] = wk3r * x0i + wk3i * x0r;\n        }\n    }\n}\n\n\nstatic void rftfsub(size_t n, float *a, size_t nc, float *c)\n{\n    size_t j, k, kk, ks, m;\n    float wkr, wki, xr, xi, yr, yi;\n\n    m = n >> 1;\n    ks = 2 * nc / m;\n    kk = 0;\n    for (j = 2; j < m; j += 2) {\n        k = n - j;\n        kk += ks;\n        wkr = 0.5f - c[nc - kk];\n        wki = c[kk];\n        xr = a[j] - a[k];\n        xi = a[j + 1] + a[k + 1];\n        yr = wkr * xr - wki * xi;\n        yi = wkr * xi + wki * xr;\n        a[j] -= yr;\n        a[j + 1] -= yi;\n        a[k] += yr;\n        a[k + 1] -= yi;\n    }\n}\n\n\nstatic void rftbsub(size_t n, float *a, size_t nc, float *c)\n{\n    size_t j, k, kk, ks, m;\n    float wkr, wki, xr, xi, yr, yi;\n\n    a[1] = -a[1];\n    m = n >> 1;\n    ks = 2 * nc / m;\n    kk = 0;\n    for (j = 2; j < m; j += 2) {\n        k = n - j;\n        kk += ks;\n        wkr = 0.5f - c[nc - kk];\n        wki = c[kk];\n        xr = a[j] - a[k];\n        xi = a[j + 1] + a[k + 1];\n        yr = wkr * xr + wki * xi;\n        yi = wkr * xi - wki * xr;\n        a[j] -= yr;\n        a[j + 1] = yi - a[j + 1];\n        a[k] += yr;\n        a[k + 1] = yi - a[k + 1];\n    }\n    a[m + 1] = -a[m + 1];\n}\n\n#if 0  // Not used.\nstatic void dctsub(int n, float *a, int nc, float *c)\n{\n    int j, k, kk, ks, m;\n    float wkr, wki, xr;\n\n    m = n >> 1;\n    ks = nc / n;\n    kk = 0;\n    for (j = 1; j < m; j++) {\n        k = n - j;\n        kk += ks;\n        wkr = c[kk] - c[nc - kk];\n        wki = c[kk] + c[nc - kk];\n        xr = wki * a[j] - wkr * a[k];\n        a[j] = wkr * a[j] + wki * a[k];\n        a[k] = xr;\n    }\n    a[m] *= c[0];\n}\n\n\nstatic void dstsub(int n, float *a, int nc, float *c)\n{\n    int j, k, kk, ks, m;\n    float wkr, wki, xr;\n\n    m = n >> 1;\n    ks = nc / n;\n    kk = 0;\n    for (j = 1; j < m; j++) {\n        k = n - j;\n        kk += ks;\n        wkr = c[kk] - c[nc - kk];\n        wki = c[kk] + c[nc - kk];\n        xr = wki * a[k] - wkr * a[j];\n        a[k] = wkr * a[k] + wki * a[j];\n        a[j] = xr;\n    }\n    a[m] *= c[0];\n}\n#endif  // Not used.\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/fft4g.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_COMMON_AUDIO_FFT4G_H_\n#define WEBRTC_COMMON_AUDIO_FFT4G_H_\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\n// Refer to fft4g.c for documentation.\nvoid WebRtc_rdft(size_t n, int isgn, float *a, size_t *ip, float *w);\n\n#if defined(__cplusplus)\n}\n#endif\n\n#endif  // WEBRTC_COMMON_AUDIO_FFT4G_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/include/audio_util.h",
    "content": "/*\n *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_COMMON_AUDIO_INCLUDE_AUDIO_UTIL_H_\n#define WEBRTC_COMMON_AUDIO_INCLUDE_AUDIO_UTIL_H_\n\n#include <limits>\n#include <cstring>\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/typedefs.h\"\n\nnamespace webrtc {\n\ntypedef std::numeric_limits<int16_t> limits_int16;\n\n// The conversion functions use the following naming convention:\n// S16:      int16_t [-32768, 32767]\n// Float:    float   [-1.0, 1.0]\n// FloatS16: float   [-32768.0, 32767.0]\nstatic inline int16_t FloatToS16(float v) {\n  if (v > 0)\n    return v >= 1 ? limits_int16::max()\n                  : static_cast<int16_t>(v * limits_int16::max() + 0.5f);\n  return v <= -1 ? limits_int16::min()\n                 : static_cast<int16_t>(-v * limits_int16::min() - 0.5f);\n}\n\nstatic inline float S16ToFloat(int16_t v) {\n  static const float kMaxInt16Inverse = 1.f / limits_int16::max();\n  static const float kMinInt16Inverse = 1.f / limits_int16::min();\n  return v * (v > 0 ? kMaxInt16Inverse : -kMinInt16Inverse);\n}\n\nstatic inline int16_t FloatS16ToS16(float v) {\n  static const float kMaxRound = limits_int16::max() - 0.5f;\n  static const float kMinRound = limits_int16::min() + 0.5f;\n  if (v > 0)\n    return v >= kMaxRound ? limits_int16::max()\n                          : static_cast<int16_t>(v + 0.5f);\n  return v <= kMinRound ? limits_int16::min() : static_cast<int16_t>(v - 0.5f);\n}\n\nstatic inline float FloatToFloatS16(float v) {\n  return v * (v > 0 ? limits_int16::max() : -limits_int16::min());\n}\n\nstatic inline float FloatS16ToFloat(float v) {\n  static const float kMaxInt16Inverse = 1.f / limits_int16::max();\n  static const float kMinInt16Inverse = 1.f / limits_int16::min();\n  return v * (v > 0 ? kMaxInt16Inverse : -kMinInt16Inverse);\n}\n\nvoid FloatToS16(const float* src, size_t size, int16_t* dest);\nvoid S16ToFloat(const int16_t* src, size_t size, float* dest);\nvoid FloatS16ToS16(const float* src, size_t size, int16_t* dest);\nvoid FloatToFloatS16(const float* src, size_t size, float* dest);\nvoid FloatS16ToFloat(const float* src, size_t size, float* dest);\n\n// Copy audio from |src| channels to |dest| channels unless |src| and |dest|\n// point to the same address. |src| and |dest| must have the same number of\n// channels, and there must be sufficient space allocated in |dest|.\ntemplate <typename T>\nvoid CopyAudioIfNeeded(const T* const* src,\n                       int num_frames,\n                       int num_channels,\n                       T* const* dest) {\n  for (int i = 0; i < num_channels; ++i) {\n    if (src[i] != dest[i]) {\n      std::copy(src[i], src[i] + num_frames, dest[i]);\n    }\n  }\n}\n\n// Deinterleave audio from |interleaved| to the channel buffers pointed to\n// by |deinterleaved|. There must be sufficient space allocated in the\n// |deinterleaved| buffers (|num_channel| buffers with |samples_per_channel|\n// per buffer).\ntemplate <typename T>\nvoid Deinterleave(const T* interleaved,\n                  size_t samples_per_channel,\n                  size_t num_channels,\n                  T* const* deinterleaved) {\n  for (size_t i = 0; i < num_channels; ++i) {\n    T* channel = deinterleaved[i];\n    size_t interleaved_idx = i;\n    for (size_t j = 0; j < samples_per_channel; ++j) {\n      channel[j] = interleaved[interleaved_idx];\n      interleaved_idx += num_channels;\n    }\n  }\n}\n\n// Interleave audio from the channel buffers pointed to by |deinterleaved| to\n// |interleaved|. There must be sufficient space allocated in |interleaved|\n// (|samples_per_channel| * |num_channels|).\ntemplate <typename T>\nvoid Interleave(const T* const* deinterleaved,\n                size_t samples_per_channel,\n                size_t num_channels,\n                T* interleaved) {\n  for (size_t i = 0; i < num_channels; ++i) {\n    const T* channel = deinterleaved[i];\n    size_t interleaved_idx = i;\n    for (size_t j = 0; j < samples_per_channel; ++j) {\n      interleaved[interleaved_idx] = channel[j];\n      interleaved_idx += num_channels;\n    }\n  }\n}\n\n// Copies audio from a single channel buffer pointed to by |mono| to each\n// channel of |interleaved|. There must be sufficient space allocated in\n// |interleaved| (|samples_per_channel| * |num_channels|).\ntemplate <typename T>\nvoid UpmixMonoToInterleaved(const T* mono,\n                            int num_frames,\n                            int num_channels,\n                            T* interleaved) {\n  int interleaved_idx = 0;\n  for (int i = 0; i < num_frames; ++i) {\n    for (int j = 0; j < num_channels; ++j) {\n      interleaved[interleaved_idx++] = mono[i];\n    }\n  }\n}\n\ntemplate <typename T, typename Intermediate>\nvoid DownmixToMono(const T* const* input_channels,\n                   size_t num_frames,\n                   int num_channels,\n                   T* out) {\n  for (size_t i = 0; i < num_frames; ++i) {\n    Intermediate value = input_channels[0][i];\n    for (int j = 1; j < num_channels; ++j) {\n      value += input_channels[j][i];\n    }\n    out[i] = value / num_channels;\n  }\n}\n\n// Downmixes an interleaved multichannel signal to a single channel by averaging\n// all channels.\ntemplate <typename T, typename Intermediate>\nvoid DownmixInterleavedToMonoImpl(const T* interleaved,\n                                  size_t num_frames,\n                                  int num_channels,\n                                  T* deinterleaved) {\n  RTC_DCHECK_GT(num_channels, 0);\n  RTC_DCHECK_GT(num_frames, 0);\n\n  const T* const end = interleaved + num_frames * num_channels;\n\n  while (interleaved < end) {\n    const T* const frame_end = interleaved + num_channels;\n\n    Intermediate value = *interleaved++;\n    while (interleaved < frame_end) {\n      value += *interleaved++;\n    }\n\n    *deinterleaved++ = value / num_channels;\n  }\n}\n\ntemplate <typename T>\nvoid DownmixInterleavedToMono(const T* interleaved,\n                              size_t num_frames,\n                              int num_channels,\n                              T* deinterleaved);\n\ntemplate <>\nvoid DownmixInterleavedToMono<int16_t>(const int16_t* interleaved,\n                                       size_t num_frames,\n                                       int num_channels,\n                                       int16_t* deinterleaved);\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_COMMON_AUDIO_INCLUDE_AUDIO_UTIL_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/ring_buffer.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// A ring buffer to hold arbitrary data. Provides no thread safety. Unless\n// otherwise specified, functions return 0 on success and -1 on error.\n\n#include \"webrtc/common_audio/ring_buffer.h\"\n\n#include <stddef.h>  // size_t\n#include <stdlib.h>\n#include <string.h>\n\n// Get address of region(s) from which we can read data.\n// If the region is contiguous, |data_ptr_bytes_2| will be zero.\n// If non-contiguous, |data_ptr_bytes_2| will be the size in bytes of the second\n// region. Returns room available to be read or |element_count|, whichever is\n// smaller.\nstatic size_t GetBufferReadRegions(RingBuffer* buf,\n                                   size_t element_count,\n                                   void** data_ptr_1,\n                                   size_t* data_ptr_bytes_1,\n                                   void** data_ptr_2,\n                                   size_t* data_ptr_bytes_2) {\n\n  const size_t readable_elements = WebRtc_available_read(buf);\n  const size_t read_elements = (readable_elements < element_count ?\n      readable_elements : element_count);\n  const size_t margin = buf->element_count - buf->read_pos;\n\n  // Check to see if read is not contiguous.\n  if (read_elements > margin) {\n    // Write data in two blocks that wrap the buffer.\n    *data_ptr_1 = buf->data + buf->read_pos * buf->element_size;\n    *data_ptr_bytes_1 = margin * buf->element_size;\n    *data_ptr_2 = buf->data;\n    *data_ptr_bytes_2 = (read_elements - margin) * buf->element_size;\n  } else {\n    *data_ptr_1 = buf->data + buf->read_pos * buf->element_size;\n    *data_ptr_bytes_1 = read_elements * buf->element_size;\n    *data_ptr_2 = NULL;\n    *data_ptr_bytes_2 = 0;\n  }\n\n  return read_elements;\n}\n\nRingBuffer* WebRtc_CreateBuffer(size_t element_count, size_t element_size) {\n  RingBuffer* self = NULL;\n  if (element_count == 0 || element_size == 0) {\n    return NULL;\n  }\n\n  self = malloc(sizeof(RingBuffer));\n  if (!self) {\n    return NULL;\n  }\n\n  self->data = malloc(element_count * element_size);\n  if (!self->data) {\n    free(self);\n    self = NULL;\n    return NULL;\n  }\n\n  self->element_count = element_count;\n  self->element_size = element_size;\n  WebRtc_InitBuffer(self);\n\n  return self;\n}\n\nvoid WebRtc_InitBuffer(RingBuffer* self) {\n  self->read_pos = 0;\n  self->write_pos = 0;\n  self->rw_wrap = SAME_WRAP;\n\n  // Initialize buffer to zeros\n  memset(self->data, 0, self->element_count * self->element_size);\n}\n\nvoid WebRtc_FreeBuffer(void* handle) {\n  RingBuffer* self = (RingBuffer*)handle;\n  if (!self) {\n    return;\n  }\n\n  free(self->data);\n  free(self);\n}\n\nsize_t WebRtc_ReadBuffer(RingBuffer* self,\n                         void** data_ptr,\n                         void* data,\n                         size_t element_count) {\n\n  if (self == NULL) {\n    return 0;\n  }\n  if (data == NULL) {\n    return 0;\n  }\n\n  {\n    void* buf_ptr_1 = NULL;\n    void* buf_ptr_2 = NULL;\n    size_t buf_ptr_bytes_1 = 0;\n    size_t buf_ptr_bytes_2 = 0;\n    const size_t read_count = GetBufferReadRegions(self,\n                                                   element_count,\n                                                   &buf_ptr_1,\n                                                   &buf_ptr_bytes_1,\n                                                   &buf_ptr_2,\n                                                   &buf_ptr_bytes_2);\n\n    if (buf_ptr_bytes_2 > 0) {\n      // We have a wrap around when reading the buffer. Copy the buffer data to\n      // |data| and point to it.\n      memcpy(data, buf_ptr_1, buf_ptr_bytes_1);\n      memcpy(((char*) data) + buf_ptr_bytes_1, buf_ptr_2, buf_ptr_bytes_2);\n      buf_ptr_1 = data;\n    } else if (!data_ptr) {\n      // No wrap, but a memcpy was requested.\n      memcpy(data, buf_ptr_1, buf_ptr_bytes_1);\n    }\n    if (data_ptr) {\n      // |buf_ptr_1| == |data| in the case of a wrap.\n      *data_ptr = buf_ptr_1;\n    }\n\n    // Update read position\n    WebRtc_MoveReadPtr(self, (int) read_count);\n\n    return read_count;\n  }\n}\n\nsize_t WebRtc_WriteBuffer(RingBuffer* self,\n                          const void* data,\n                          size_t element_count) {\n  if (!self) {\n    return 0;\n  }\n  if (!data) {\n    return 0;\n  }\n\n  {\n    const size_t free_elements = WebRtc_available_write(self);\n    const size_t write_elements = (free_elements < element_count ? free_elements\n        : element_count);\n    size_t n = write_elements;\n    const size_t margin = self->element_count - self->write_pos;\n\n    if (write_elements > margin) {\n      // Buffer wrap around when writing.\n      memcpy(self->data + self->write_pos * self->element_size,\n             data, margin * self->element_size);\n      self->write_pos = 0;\n      n -= margin;\n      self->rw_wrap = DIFF_WRAP;\n    }\n    memcpy(self->data + self->write_pos * self->element_size,\n           ((const char*) data) + ((write_elements - n) * self->element_size),\n           n * self->element_size);\n    self->write_pos += n;\n\n    return write_elements;\n  }\n}\n\nint WebRtc_MoveReadPtr(RingBuffer* self, int element_count) {\n  if (!self) {\n    return 0;\n  }\n\n  {\n    // We need to be able to take care of negative changes, hence use \"int\"\n    // instead of \"size_t\".\n    const int free_elements = (int) WebRtc_available_write(self);\n    const int readable_elements = (int) WebRtc_available_read(self);\n    int read_pos = (int) self->read_pos;\n\n    if (element_count > readable_elements) {\n      element_count = readable_elements;\n    }\n    if (element_count < -free_elements) {\n      element_count = -free_elements;\n    }\n\n    read_pos += element_count;\n    if (read_pos > (int) self->element_count) {\n      // Buffer wrap around. Restart read position and wrap indicator.\n      read_pos -= (int) self->element_count;\n      self->rw_wrap = SAME_WRAP;\n    }\n    if (read_pos < 0) {\n      // Buffer wrap around. Restart read position and wrap indicator.\n      read_pos += (int) self->element_count;\n      self->rw_wrap = DIFF_WRAP;\n    }\n\n    self->read_pos = (size_t) read_pos;\n\n    return element_count;\n  }\n}\n\nsize_t WebRtc_available_read(const RingBuffer* self) {\n  if (!self) {\n    return 0;\n  }\n\n  if (self->rw_wrap == SAME_WRAP) {\n    return self->write_pos - self->read_pos;\n  } else {\n    return self->element_count - self->read_pos + self->write_pos;\n  }\n}\n\nsize_t WebRtc_available_write(const RingBuffer* self) {\n  if (!self) {\n    return 0;\n  }\n\n  return self->element_count - WebRtc_available_read(self);\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/ring_buffer.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// A ring buffer to hold arbitrary data. Provides no thread safety. Unless\n// otherwise specified, functions return 0 on success and -1 on error.\n\n#ifndef WEBRTC_COMMON_AUDIO_RING_BUFFER_H_\n#define WEBRTC_COMMON_AUDIO_RING_BUFFER_H_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <stddef.h>  // size_t\n\nenum Wrap { SAME_WRAP, DIFF_WRAP };\n\ntypedef struct RingBuffer {\n  size_t read_pos;\n  size_t write_pos;\n  size_t element_count;\n  size_t element_size;\n  enum Wrap rw_wrap;\n  char* data;\n} RingBuffer;\n\n// Creates and initializes the buffer. Returns NULL on failure.\nRingBuffer* WebRtc_CreateBuffer(size_t element_count, size_t element_size);\nvoid WebRtc_InitBuffer(RingBuffer* handle);\nvoid WebRtc_FreeBuffer(void* handle);\n\n// Reads data from the buffer. The |data_ptr| will point to the address where\n// it is located. If all |element_count| data are feasible to read without\n// buffer wrap around |data_ptr| will point to the location in the buffer.\n// Otherwise, the data will be copied to |data| (memory allocation done by the\n// user) and |data_ptr| points to the address of |data|. |data_ptr| is only\n// guaranteed to be valid until the next call to WebRtc_WriteBuffer().\n//\n// To force a copying to |data|, pass a NULL |data_ptr|.\n//\n// Returns number of elements read.\nsize_t WebRtc_ReadBuffer(RingBuffer* handle,\n                         void** data_ptr,\n                         void* data,\n                         size_t element_count);\n\n// Writes |data| to buffer and returns the number of elements written.\nsize_t WebRtc_WriteBuffer(RingBuffer* handle, const void* data,\n                          size_t element_count);\n\n// Moves the buffer read position and returns the number of elements moved.\n// Positive |element_count| moves the read position towards the write position,\n// that is, flushing the buffer. Negative |element_count| moves the read\n// position away from the the write position, that is, stuffing the buffer.\n// Returns number of elements moved.\nint WebRtc_MoveReadPtr(RingBuffer* handle, int element_count);\n\n// Returns number of available elements to read.\nsize_t WebRtc_available_read(const RingBuffer* handle);\n\n// Returns number of available elements for write.\nsize_t WebRtc_available_write(const RingBuffer* handle);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // WEBRTC_COMMON_AUDIO_RING_BUFFER_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/auto_corr_to_refl_coef.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_AutoCorrToReflCoef().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nvoid WebRtcSpl_AutoCorrToReflCoef(const int32_t *R, int use_order, int16_t *K)\n{\n    int i, n;\n    int16_t tmp;\n    const int32_t *rptr;\n    int32_t L_num, L_den;\n    int16_t *acfptr, *pptr, *wptr, *p1ptr, *w1ptr, ACF[WEBRTC_SPL_MAX_LPC_ORDER],\n            P[WEBRTC_SPL_MAX_LPC_ORDER], W[WEBRTC_SPL_MAX_LPC_ORDER];\n\n    // Initialize loop and pointers.\n    acfptr = ACF;\n    rptr = R;\n    pptr = P;\n    p1ptr = &P[1];\n    w1ptr = &W[1];\n    wptr = w1ptr;\n\n    // First loop; n=0. Determine shifting.\n    tmp = WebRtcSpl_NormW32(*R);\n    *acfptr = (int16_t)((*rptr++ << tmp) >> 16);\n    *pptr++ = *acfptr++;\n\n    // Initialize ACF, P and W.\n    for (i = 1; i <= use_order; i++)\n    {\n        *acfptr = (int16_t)((*rptr++ << tmp) >> 16);\n        *wptr++ = *acfptr;\n        *pptr++ = *acfptr++;\n    }\n\n    // Compute reflection coefficients.\n    for (n = 1; n <= use_order; n++, K++)\n    {\n        tmp = WEBRTC_SPL_ABS_W16(*p1ptr);\n        if (*P < tmp)\n        {\n            for (i = n; i <= use_order; i++)\n                *K++ = 0;\n\n            return;\n        }\n\n        // Division: WebRtcSpl_div(tmp, *P)\n        *K = 0;\n        if (tmp != 0)\n        {\n            L_num = tmp;\n            L_den = *P;\n            i = 15;\n            while (i--)\n            {\n                (*K) <<= 1;\n                L_num <<= 1;\n                if (L_num >= L_den)\n                {\n                    L_num -= L_den;\n                    (*K)++;\n                }\n            }\n            if (*p1ptr > 0)\n                *K = -*K;\n        }\n\n        // Last iteration; don't do Schur recursion.\n        if (n == use_order)\n            return;\n\n        // Schur recursion.\n        pptr = P;\n        wptr = w1ptr;\n        tmp = (int16_t)(((int32_t)*p1ptr * (int32_t)*K + 16384) >> 15);\n        *pptr = WebRtcSpl_AddSatW16(*pptr, tmp);\n        pptr++;\n        for (i = 1; i <= use_order - n; i++)\n        {\n            tmp = (int16_t)(((int32_t)*wptr * (int32_t)*K + 16384) >> 15);\n            *pptr = WebRtcSpl_AddSatW16(*(pptr + 1), tmp);\n            pptr++;\n            tmp = (int16_t)(((int32_t)*pptr * (int32_t)*K + 16384) >> 15);\n            *wptr = WebRtcSpl_AddSatW16(*wptr, tmp);\n            wptr++;\n        }\n    }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/auto_correlation.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n#include \"webrtc/base/checks.h\"\n\nsize_t WebRtcSpl_AutoCorrelation(const int16_t* in_vector,\n                                 size_t in_vector_length,\n                                 size_t order,\n                                 int32_t* result,\n                                 int* scale) {\n  int32_t sum = 0;\n  size_t i = 0, j = 0;\n  int16_t smax = 0;\n  int scaling = 0;\n\n  RTC_DCHECK_LE(order, in_vector_length);\n\n  // Find the maximum absolute value of the samples.\n  smax = WebRtcSpl_MaxAbsValueW16(in_vector, in_vector_length);\n\n  // In order to avoid overflow when computing the sum we should scale the\n  // samples so that (in_vector_length * smax * smax) will not overflow.\n  if (smax == 0) {\n    scaling = 0;\n  } else {\n    // Number of bits in the sum loop.\n    int nbits = WebRtcSpl_GetSizeInBits((uint32_t)in_vector_length);\n    // Number of bits to normalize smax.\n    int t = WebRtcSpl_NormW32(WEBRTC_SPL_MUL(smax, smax));\n\n    if (t > nbits) {\n      scaling = 0;\n    } else {\n      scaling = nbits - t;\n    }\n  }\n\n  // Perform the actual correlation calculation.\n  for (i = 0; i < order + 1; i++) {\n    sum = 0;\n    /* Unroll the loop to improve performance. */\n    for (j = 0; i + j + 3 < in_vector_length; j += 4) {\n      sum += (in_vector[j + 0] * in_vector[i + j + 0]) >> scaling;\n      sum += (in_vector[j + 1] * in_vector[i + j + 1]) >> scaling;\n      sum += (in_vector[j + 2] * in_vector[i + j + 2]) >> scaling;\n      sum += (in_vector[j + 3] * in_vector[i + j + 3]) >> scaling;\n    }\n    for (; j < in_vector_length - i; j++) {\n      sum += (in_vector[j] * in_vector[i + j]) >> scaling;\n    }\n    *result++ = sum;\n  }\n\n  *scale = scaling;\n  return order + 1;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/complex_bit_reverse.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n/* Tables for data buffer indexes that are bit reversed and thus need to be\n * swapped. Note that, index_7[{0, 2, 4, ...}] are for the left side of the swap\n * operations, while index_7[{1, 3, 5, ...}] are for the right side of the\n * operation. Same for index_8.\n */\n\n/* Indexes for the case of stages == 7. */\nstatic const int16_t index_7[112] = {\n  1, 64, 2, 32, 3, 96, 4, 16, 5, 80, 6, 48, 7, 112, 9, 72, 10, 40, 11, 104,\n  12, 24, 13, 88, 14, 56, 15, 120, 17, 68, 18, 36, 19, 100, 21, 84, 22, 52,\n  23, 116, 25, 76, 26, 44, 27, 108, 29, 92, 30, 60, 31, 124, 33, 66, 35, 98,\n  37, 82, 38, 50, 39, 114, 41, 74, 43, 106, 45, 90, 46, 58, 47, 122, 49, 70,\n  51, 102, 53, 86, 55, 118, 57, 78, 59, 110, 61, 94, 63, 126, 67, 97, 69,\n  81, 71, 113, 75, 105, 77, 89, 79, 121, 83, 101, 87, 117, 91, 109, 95, 125,\n  103, 115, 111, 123\n};\n\n/* Indexes for the case of stages == 8. */\nstatic const int16_t index_8[240] = {\n  1, 128, 2, 64, 3, 192, 4, 32, 5, 160, 6, 96, 7, 224, 8, 16, 9, 144, 10, 80,\n  11, 208, 12, 48, 13, 176, 14, 112, 15, 240, 17, 136, 18, 72, 19, 200, 20,\n  40, 21, 168, 22, 104, 23, 232, 25, 152, 26, 88, 27, 216, 28, 56, 29, 184,\n  30, 120, 31, 248, 33, 132, 34, 68, 35, 196, 37, 164, 38, 100, 39, 228, 41,\n  148, 42, 84, 43, 212, 44, 52, 45, 180, 46, 116, 47, 244, 49, 140, 50, 76,\n  51, 204, 53, 172, 54, 108, 55, 236, 57, 156, 58, 92, 59, 220, 61, 188, 62,\n  124, 63, 252, 65, 130, 67, 194, 69, 162, 70, 98, 71, 226, 73, 146, 74, 82,\n  75, 210, 77, 178, 78, 114, 79, 242, 81, 138, 83, 202, 85, 170, 86, 106, 87,\n  234, 89, 154, 91, 218, 93, 186, 94, 122, 95, 250, 97, 134, 99, 198, 101,\n  166, 103, 230, 105, 150, 107, 214, 109, 182, 110, 118, 111, 246, 113, 142,\n  115, 206, 117, 174, 119, 238, 121, 158, 123, 222, 125, 190, 127, 254, 131,\n  193, 133, 161, 135, 225, 137, 145, 139, 209, 141, 177, 143, 241, 147, 201,\n  149, 169, 151, 233, 155, 217, 157, 185, 159, 249, 163, 197, 167, 229, 171,\n  213, 173, 181, 175, 245, 179, 205, 183, 237, 187, 221, 191, 253, 199, 227,\n  203, 211, 207, 243, 215, 235, 223, 251, 239, 247\n};\n\nvoid WebRtcSpl_ComplexBitReverse(int16_t* __restrict complex_data, int stages) {\n  /* For any specific value of stages, we know exactly the indexes that are\n   * bit reversed. Currently (Feb. 2012) in WebRTC the only possible values of\n   * stages are 7 and 8, so we use tables to save unnecessary iterations and\n   * calculations for these two cases.\n   */\n  if (stages == 7 || stages == 8) {\n    int m = 0;\n    int length = 112;\n    const int16_t* index = index_7;\n\n    if (stages == 8) {\n      length = 240;\n      index = index_8;\n    }\n\n    /* Decimation in time. Swap the elements with bit-reversed indexes. */\n    for (m = 0; m < length; m += 2) {\n      /* We declare a int32_t* type pointer, to load both the 16-bit real\n       * and imaginary elements from complex_data in one instruction, reducing\n       * complexity.\n       */\n      int32_t* complex_data_ptr = (int32_t*)complex_data;\n      int32_t temp = 0;\n\n      temp = complex_data_ptr[index[m]];  /* Real and imaginary */\n      complex_data_ptr[index[m]] = complex_data_ptr[index[m + 1]];\n      complex_data_ptr[index[m + 1]] = temp;\n    }\n  }\n  else {\n    int m = 0, mr = 0, l = 0;\n    int n = 1 << stages;\n    int nn = n - 1;\n\n    /* Decimation in time - re-order data */\n    for (m = 1; m <= nn; ++m) {\n      int32_t* complex_data_ptr = (int32_t*)complex_data;\n      int32_t temp = 0;\n\n      /* Find out indexes that are bit-reversed. */\n      l = n;\n      do {\n        l >>= 1;\n      } while (l > nn - mr);\n      mr = (mr & (l - 1)) + l;\n\n      if (mr <= m) {\n        continue;\n      }\n\n      /* Swap the elements with bit-reversed indexes.\n       * This is similar to the loop in the stages == 7 or 8 cases.\n       */\n      temp = complex_data_ptr[m];  /* Real and imaginary */\n      complex_data_ptr[m] = complex_data_ptr[mr];\n      complex_data_ptr[mr] = temp;\n    }\n  }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/complex_fft.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_ComplexFFT().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/complex_fft_tables.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n#define CFFTSFT 14\n#define CFFTRND 1\n#define CFFTRND2 16384\n\n#define CIFFTSFT 14\n#define CIFFTRND 1\n\n\nint WebRtcSpl_ComplexFFT(int16_t frfi[], int stages, int mode)\n{\n    int i, j, l, k, istep, n, m;\n    int16_t wr, wi;\n    int32_t tr32, ti32, qr32, qi32;\n\n    /* The 1024-value is a constant given from the size of kSinTable1024[],\n     * and should not be changed depending on the input parameter 'stages'\n     */\n    n = 1 << stages;\n    if (n > 1024)\n        return -1;\n\n    l = 1;\n    k = 10 - 1; /* Constant for given kSinTable1024[]. Do not change\n         depending on the input parameter 'stages' */\n\n    if (mode == 0)\n    {\n        // mode==0: Low-complexity and Low-accuracy mode\n        while (l < n)\n        {\n            istep = l << 1;\n\n            for (m = 0; m < l; ++m)\n            {\n                j = m << k;\n\n                /* The 256-value is a constant given as 1/4 of the size of\n                 * kSinTable1024[], and should not be changed depending on the input\n                 * parameter 'stages'. It will result in 0 <= j < N_SINE_WAVE/2\n                 */\n                wr = kSinTable1024[j + 256];\n                wi = -kSinTable1024[j];\n\n                for (i = m; i < n; i += istep)\n                {\n                    j = i + l;\n\n                    tr32 = (wr * frfi[2 * j] - wi * frfi[2 * j + 1]) >> 15;\n\n                    ti32 = (wr * frfi[2 * j + 1] + wi * frfi[2 * j]) >> 15;\n\n                    qr32 = (int32_t)frfi[2 * i];\n                    qi32 = (int32_t)frfi[2 * i + 1];\n                    frfi[2 * j] = (int16_t)((qr32 - tr32) >> 1);\n                    frfi[2 * j + 1] = (int16_t)((qi32 - ti32) >> 1);\n                    frfi[2 * i] = (int16_t)((qr32 + tr32) >> 1);\n                    frfi[2 * i + 1] = (int16_t)((qi32 + ti32) >> 1);\n                }\n            }\n\n            --k;\n            l = istep;\n\n        }\n\n    } else\n    {\n        // mode==1: High-complexity and High-accuracy mode\n        while (l < n)\n        {\n            istep = l << 1;\n\n            for (m = 0; m < l; ++m)\n            {\n                j = m << k;\n\n                /* The 256-value is a constant given as 1/4 of the size of\n                 * kSinTable1024[], and should not be changed depending on the input\n                 * parameter 'stages'. It will result in 0 <= j < N_SINE_WAVE/2\n                 */\n                wr = kSinTable1024[j + 256];\n                wi = -kSinTable1024[j];\n\n#ifdef WEBRTC_ARCH_ARM_V7\n                int32_t wri = 0;\n                __asm __volatile(\"pkhbt %0, %1, %2, lsl #16\" : \"=r\"(wri) :\n                    \"r\"((int32_t)wr), \"r\"((int32_t)wi));\n#endif\n\n                for (i = m; i < n; i += istep)\n                {\n                    j = i + l;\n\n#ifdef WEBRTC_ARCH_ARM_V7\n                    register int32_t frfi_r;\n                    __asm __volatile(\n                        \"pkhbt %[frfi_r], %[frfi_even], %[frfi_odd],\"\n                        \" lsl #16\\n\\t\"\n                        \"smlsd %[tr32], %[wri], %[frfi_r], %[cfftrnd]\\n\\t\"\n                        \"smladx %[ti32], %[wri], %[frfi_r], %[cfftrnd]\\n\\t\"\n                        :[frfi_r]\"=&r\"(frfi_r),\n                         [tr32]\"=&r\"(tr32),\n                         [ti32]\"=r\"(ti32)\n                        :[frfi_even]\"r\"((int32_t)frfi[2*j]),\n                         [frfi_odd]\"r\"((int32_t)frfi[2*j +1]),\n                         [wri]\"r\"(wri),\n                         [cfftrnd]\"r\"(CFFTRND));\n#else\n                    tr32 = wr * frfi[2 * j] - wi * frfi[2 * j + 1] + CFFTRND;\n\n                    ti32 = wr * frfi[2 * j + 1] + wi * frfi[2 * j] + CFFTRND;\n#endif\n\n                    tr32 >>= 15 - CFFTSFT;\n                    ti32 >>= 15 - CFFTSFT;\n\n                    qr32 = ((int32_t)frfi[2 * i]) << CFFTSFT;\n                    qi32 = ((int32_t)frfi[2 * i + 1]) << CFFTSFT;\n\n                    frfi[2 * j] = (int16_t)(\n                        (qr32 - tr32 + CFFTRND2) >> (1 + CFFTSFT));\n                    frfi[2 * j + 1] = (int16_t)(\n                        (qi32 - ti32 + CFFTRND2) >> (1 + CFFTSFT));\n                    frfi[2 * i] = (int16_t)(\n                        (qr32 + tr32 + CFFTRND2) >> (1 + CFFTSFT));\n                    frfi[2 * i + 1] = (int16_t)(\n                        (qi32 + ti32 + CFFTRND2) >> (1 + CFFTSFT));\n                }\n            }\n\n            --k;\n            l = istep;\n        }\n    }\n    return 0;\n}\n\nint WebRtcSpl_ComplexIFFT(int16_t frfi[], int stages, int mode)\n{\n    size_t i, j, l, istep, n, m;\n    int k, scale, shift;\n    int16_t wr, wi;\n    int32_t tr32, ti32, qr32, qi32;\n    int32_t tmp32, round2;\n\n    /* The 1024-value is a constant given from the size of kSinTable1024[],\n     * and should not be changed depending on the input parameter 'stages'\n     */\n    n = 1 << stages;\n    if (n > 1024)\n        return -1;\n\n    scale = 0;\n\n    l = 1;\n    k = 10 - 1; /* Constant for given kSinTable1024[]. Do not change\n         depending on the input parameter 'stages' */\n\n    while (l < n)\n    {\n        // variable scaling, depending upon data\n        shift = 0;\n        round2 = 8192;\n\n        tmp32 = WebRtcSpl_MaxAbsValueW16(frfi, 2 * n);\n        if (tmp32 > 13573)\n        {\n            shift++;\n            scale++;\n            round2 <<= 1;\n        }\n        if (tmp32 > 27146)\n        {\n            shift++;\n            scale++;\n            round2 <<= 1;\n        }\n\n        istep = l << 1;\n\n        if (mode == 0)\n        {\n            // mode==0: Low-complexity and Low-accuracy mode\n            for (m = 0; m < l; ++m)\n            {\n                j = m << k;\n\n                /* The 256-value is a constant given as 1/4 of the size of\n                 * kSinTable1024[], and should not be changed depending on the input\n                 * parameter 'stages'. It will result in 0 <= j < N_SINE_WAVE/2\n                 */\n                wr = kSinTable1024[j + 256];\n                wi = kSinTable1024[j];\n\n                for (i = m; i < n; i += istep)\n                {\n                    j = i + l;\n\n                    tr32 = (wr * frfi[2 * j] - wi * frfi[2 * j + 1]) >> 15;\n\n                    ti32 = (wr * frfi[2 * j + 1] + wi * frfi[2 * j]) >> 15;\n\n                    qr32 = (int32_t)frfi[2 * i];\n                    qi32 = (int32_t)frfi[2 * i + 1];\n                    frfi[2 * j] = (int16_t)((qr32 - tr32) >> shift);\n                    frfi[2 * j + 1] = (int16_t)((qi32 - ti32) >> shift);\n                    frfi[2 * i] = (int16_t)((qr32 + tr32) >> shift);\n                    frfi[2 * i + 1] = (int16_t)((qi32 + ti32) >> shift);\n                }\n            }\n        } else\n        {\n            // mode==1: High-complexity and High-accuracy mode\n\n            for (m = 0; m < l; ++m)\n            {\n                j = m << k;\n\n                /* The 256-value is a constant given as 1/4 of the size of\n                 * kSinTable1024[], and should not be changed depending on the input\n                 * parameter 'stages'. It will result in 0 <= j < N_SINE_WAVE/2\n                 */\n                wr = kSinTable1024[j + 256];\n                wi = kSinTable1024[j];\n\n#ifdef WEBRTC_ARCH_ARM_V7\n                int32_t wri = 0;\n                __asm __volatile(\"pkhbt %0, %1, %2, lsl #16\" : \"=r\"(wri) :\n                    \"r\"((int32_t)wr), \"r\"((int32_t)wi));\n#endif\n\n                for (i = m; i < n; i += istep)\n                {\n                    j = i + l;\n\n#ifdef WEBRTC_ARCH_ARM_V7\n                    register int32_t frfi_r;\n                    __asm __volatile(\n                      \"pkhbt %[frfi_r], %[frfi_even], %[frfi_odd], lsl #16\\n\\t\"\n                      \"smlsd %[tr32], %[wri], %[frfi_r], %[cifftrnd]\\n\\t\"\n                      \"smladx %[ti32], %[wri], %[frfi_r], %[cifftrnd]\\n\\t\"\n                      :[frfi_r]\"=&r\"(frfi_r),\n                       [tr32]\"=&r\"(tr32),\n                       [ti32]\"=r\"(ti32)\n                      :[frfi_even]\"r\"((int32_t)frfi[2*j]),\n                       [frfi_odd]\"r\"((int32_t)frfi[2*j +1]),\n                       [wri]\"r\"(wri),\n                       [cifftrnd]\"r\"(CIFFTRND)\n                    );\n#else\n\n                    tr32 = wr * frfi[2 * j] - wi * frfi[2 * j + 1] + CIFFTRND;\n\n                    ti32 = wr * frfi[2 * j + 1] + wi * frfi[2 * j] + CIFFTRND;\n#endif\n                    tr32 >>= 15 - CIFFTSFT;\n                    ti32 >>= 15 - CIFFTSFT;\n\n                    qr32 = ((int32_t)frfi[2 * i]) << CIFFTSFT;\n                    qi32 = ((int32_t)frfi[2 * i + 1]) << CIFFTSFT;\n\n                    frfi[2 * j] = (int16_t)(\n                        (qr32 - tr32 + round2) >> (shift + CIFFTSFT));\n                    frfi[2 * j + 1] = (int16_t)(\n                        (qi32 - ti32 + round2) >> (shift + CIFFTSFT));\n                    frfi[2 * i] = (int16_t)(\n                        (qr32 + tr32 + round2) >> (shift + CIFFTSFT));\n                    frfi[2 * i + 1] = (int16_t)(\n                        (qi32 + ti32 + round2) >> (shift + CIFFTSFT));\n                }\n            }\n\n        }\n        --k;\n        l = istep;\n    }\n    return scale;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/complex_fft_tables.h",
    "content": "/*\n *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n#ifndef WEBRTC_COMMON_AUDIO_SIGNAL_PROCESSING_COMPLEX_FFT_TABLES_H_\n#define WEBRTC_COMMON_AUDIO_SIGNAL_PROCESSING_COMPLEX_FFT_TABLES_H_\n\n#include \"webrtc/typedefs.h\"\n\nstatic const int16_t kSinTable1024[] = {\n       0,    201,    402,    603,    804,   1005,   1206,   1406,\n    1607,   1808,   2009,   2209,   2410,   2610,   2811,   3011,\n    3211,   3411,   3611,   3811,   4011,   4210,   4409,   4608,\n    4807,   5006,   5205,   5403,   5601,   5799,   5997,   6195,\n    6392,   6589,   6786,   6982,   7179,   7375,   7571,   7766,\n    7961,   8156,   8351,   8545,   8739,   8932,   9126,   9319,\n    9511,   9703,   9895,  10087,  10278,  10469,  10659,  10849,\n   11038,  11227,  11416,  11604,  11792,  11980,  12166,  12353,\n   12539,  12724,  12909,  13094,  13278,  13462,  13645,  13827,\n   14009,  14191,  14372,  14552,  14732,  14911,  15090,  15268,\n   15446,  15623,  15799,  15975,  16150,  16325,  16499,  16672,\n   16845,  17017,  17189,  17360,  17530,  17699,  17868,  18036,\n   18204,  18371,  18537,  18702,  18867,  19031,  19194,  19357,\n   19519,  19680,  19840,  20000,  20159,  20317,  20474,  20631,\n   20787,  20942,  21096,  21249,  21402,  21554,  21705,  21855,\n   22004,  22153,  22301,  22448,  22594,  22739,  22883,  23027,\n   23169,  23311,  23452,  23592,  23731,  23869,  24006,  24143,\n   24278,  24413,  24546,  24679,  24811,  24942,  25072,  25201,\n   25329,  25456,  25582,  25707,  25831,  25954,  26077,  26198,\n   26318,  26437,  26556,  26673,  26789,  26905,  27019,  27132,\n   27244,  27355,  27466,  27575,  27683,  27790,  27896,  28001,\n   28105,  28208,  28309,  28410,  28510,  28608,  28706,  28802,\n   28897,  28992,  29085,  29177,  29268,  29358,  29446,  29534,\n   29621,  29706,  29790,  29873,  29955,  30036,  30116,  30195,\n   30272,  30349,  30424,  30498,  30571,  30643,  30713,  30783,\n   30851,  30918,  30984,  31049,  31113,  31175,  31236,  31297,\n   31356,  31413,  31470,  31525,  31580,  31633,  31684,  31735,\n   31785,  31833,  31880,  31926,  31970,  32014,  32056,  32097,\n   32137,  32176,  32213,  32249,  32284,  32318,  32350,  32382,\n   32412,  32441,  32468,  32495,  32520,  32544,  32567,  32588,\n   32609,  32628,  32646,  32662,  32678,  32692,  32705,  32717,\n   32727,  32736,  32744,  32751,  32757,  32761,  32764,  32766,\n   32767,  32766,  32764,  32761,  32757,  32751,  32744,  32736,\n   32727,  32717,  32705,  32692,  32678,  32662,  32646,  32628,\n   32609,  32588,  32567,  32544,  32520,  32495,  32468,  32441,\n   32412,  32382,  32350,  32318,  32284,  32249,  32213,  32176,\n   32137,  32097,  32056,  32014,  31970,  31926,  31880,  31833,\n   31785,  31735,  31684,  31633,  31580,  31525,  31470,  31413,\n   31356,  31297,  31236,  31175,  31113,  31049,  30984,  30918,\n   30851,  30783,  30713,  30643,  30571,  30498,  30424,  30349,\n   30272,  30195,  30116,  30036,  29955,  29873,  29790,  29706,\n   29621,  29534,  29446,  29358,  29268,  29177,  29085,  28992,\n   28897,  28802,  28706,  28608,  28510,  28410,  28309,  28208,\n   28105,  28001,  27896,  27790,  27683,  27575,  27466,  27355,\n   27244,  27132,  27019,  26905,  26789,  26673,  26556,  26437,\n   26318,  26198,  26077,  25954,  25831,  25707,  25582,  25456,\n   25329,  25201,  25072,  24942,  24811,  24679,  24546,  24413,\n   24278,  24143,  24006,  23869,  23731,  23592,  23452,  23311,\n   23169,  23027,  22883,  22739,  22594,  22448,  22301,  22153,\n   22004,  21855,  21705,  21554,  21402,  21249,  21096,  20942,\n   20787,  20631,  20474,  20317,  20159,  20000,  19840,  19680,\n   19519,  19357,  19194,  19031,  18867,  18702,  18537,  18371,\n   18204,  18036,  17868,  17699,  17530,  17360,  17189,  17017,\n   16845,  16672,  16499,  16325,  16150,  15975,  15799,  15623,\n   15446,  15268,  15090,  14911,  14732,  14552,  14372,  14191,\n   14009,  13827,  13645,  13462,  13278,  13094,  12909,  12724,\n   12539,  12353,  12166,  11980,  11792,  11604,  11416,  11227,\n   11038,  10849,  10659,  10469,  10278,  10087,   9895,   9703,\n    9511,   9319,   9126,   8932,   8739,   8545,   8351,   8156,\n    7961,   7766,   7571,   7375,   7179,   6982,   6786,   6589,\n    6392,   6195,   5997,   5799,   5601,   5403,   5205,   5006,\n    4807,   4608,   4409,   4210,   4011,   3811,   3611,   3411,\n    3211,   3011,   2811,   2610,   2410,   2209,   2009,   1808,\n    1607,   1406,   1206,   1005,    804,    603,    402,    201,\n       0,   -201,   -402,   -603,   -804,  -1005,  -1206,  -1406,\n   -1607,  -1808,  -2009,  -2209,  -2410,  -2610,  -2811,  -3011,\n   -3211,  -3411,  -3611,  -3811,  -4011,  -4210,  -4409,  -4608,\n   -4807,  -5006,  -5205,  -5403,  -5601,  -5799,  -5997,  -6195,\n   -6392,  -6589,  -6786,  -6982,  -7179,  -7375,  -7571,  -7766,\n   -7961,  -8156,  -8351,  -8545,  -8739,  -8932,  -9126,  -9319,\n   -9511,  -9703,  -9895, -10087, -10278, -10469, -10659, -10849,\n  -11038, -11227, -11416, -11604, -11792, -11980, -12166, -12353,\n  -12539, -12724, -12909, -13094, -13278, -13462, -13645, -13827,\n  -14009, -14191, -14372, -14552, -14732, -14911, -15090, -15268,\n  -15446, -15623, -15799, -15975, -16150, -16325, -16499, -16672,\n  -16845, -17017, -17189, -17360, -17530, -17699, -17868, -18036,\n  -18204, -18371, -18537, -18702, -18867, -19031, -19194, -19357,\n  -19519, -19680, -19840, -20000, -20159, -20317, -20474, -20631,\n  -20787, -20942, -21096, -21249, -21402, -21554, -21705, -21855,\n  -22004, -22153, -22301, -22448, -22594, -22739, -22883, -23027,\n  -23169, -23311, -23452, -23592, -23731, -23869, -24006, -24143,\n  -24278, -24413, -24546, -24679, -24811, -24942, -25072, -25201,\n  -25329, -25456, -25582, -25707, -25831, -25954, -26077, -26198,\n  -26318, -26437, -26556, -26673, -26789, -26905, -27019, -27132,\n  -27244, -27355, -27466, -27575, -27683, -27790, -27896, -28001,\n  -28105, -28208, -28309, -28410, -28510, -28608, -28706, -28802,\n  -28897, -28992, -29085, -29177, -29268, -29358, -29446, -29534,\n  -29621, -29706, -29790, -29873, -29955, -30036, -30116, -30195,\n  -30272, -30349, -30424, -30498, -30571, -30643, -30713, -30783,\n  -30851, -30918, -30984, -31049, -31113, -31175, -31236, -31297,\n  -31356, -31413, -31470, -31525, -31580, -31633, -31684, -31735,\n  -31785, -31833, -31880, -31926, -31970, -32014, -32056, -32097,\n  -32137, -32176, -32213, -32249, -32284, -32318, -32350, -32382,\n  -32412, -32441, -32468, -32495, -32520, -32544, -32567, -32588,\n  -32609, -32628, -32646, -32662, -32678, -32692, -32705, -32717,\n  -32727, -32736, -32744, -32751, -32757, -32761, -32764, -32766,\n  -32767, -32766, -32764, -32761, -32757, -32751, -32744, -32736,\n  -32727, -32717, -32705, -32692, -32678, -32662, -32646, -32628,\n  -32609, -32588, -32567, -32544, -32520, -32495, -32468, -32441,\n  -32412, -32382, -32350, -32318, -32284, -32249, -32213, -32176,\n  -32137, -32097, -32056, -32014, -31970, -31926, -31880, -31833,\n  -31785, -31735, -31684, -31633, -31580, -31525, -31470, -31413,\n  -31356, -31297, -31236, -31175, -31113, -31049, -30984, -30918,\n  -30851, -30783, -30713, -30643, -30571, -30498, -30424, -30349,\n  -30272, -30195, -30116, -30036, -29955, -29873, -29790, -29706,\n  -29621, -29534, -29446, -29358, -29268, -29177, -29085, -28992,\n  -28897, -28802, -28706, -28608, -28510, -28410, -28309, -28208,\n  -28105, -28001, -27896, -27790, -27683, -27575, -27466, -27355,\n  -27244, -27132, -27019, -26905, -26789, -26673, -26556, -26437,\n  -26318, -26198, -26077, -25954, -25831, -25707, -25582, -25456,\n  -25329, -25201, -25072, -24942, -24811, -24679, -24546, -24413,\n  -24278, -24143, -24006, -23869, -23731, -23592, -23452, -23311,\n  -23169, -23027, -22883, -22739, -22594, -22448, -22301, -22153,\n  -22004, -21855, -21705, -21554, -21402, -21249, -21096, -20942,\n  -20787, -20631, -20474, -20317, -20159, -20000, -19840, -19680,\n  -19519, -19357, -19194, -19031, -18867, -18702, -18537, -18371,\n  -18204, -18036, -17868, -17699, -17530, -17360, -17189, -17017,\n  -16845, -16672, -16499, -16325, -16150, -15975, -15799, -15623,\n  -15446, -15268, -15090, -14911, -14732, -14552, -14372, -14191,\n  -14009, -13827, -13645, -13462, -13278, -13094, -12909, -12724,\n  -12539, -12353, -12166, -11980, -11792, -11604, -11416, -11227,\n  -11038, -10849, -10659, -10469, -10278, -10087,  -9895,  -9703,\n   -9511,  -9319,  -9126,  -8932,  -8739,  -8545,  -8351,  -8156,\n   -7961,  -7766,  -7571,  -7375,  -7179,  -6982,  -6786,  -6589,\n   -6392,  -6195,  -5997,  -5799,  -5601,  -5403,  -5205,  -5006,\n   -4807,  -4608,  -4409,  -4210,  -4011,  -3811,  -3611,  -3411,\n   -3211,  -3011,  -2811,  -2610,  -2410,  -2209,  -2009,  -1808,\n   -1607,  -1406,  -1206,  -1005,   -804,   -603,   -402,   -201\n};\n\n#endif  // WEBRTC_COMMON_AUDIO_SIGNAL_PROCESSING_COMPLEX_FFT_TABLES_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/copy_set_operations.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the implementation of functions\n * WebRtcSpl_MemSetW16()\n * WebRtcSpl_MemSetW32()\n * WebRtcSpl_MemCpyReversedOrder()\n * WebRtcSpl_CopyFromEndW16()\n * WebRtcSpl_ZerosArrayW16()\n * WebRtcSpl_ZerosArrayW32()\n *\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include <string.h>\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n\nvoid WebRtcSpl_MemSetW16(int16_t *ptr, int16_t set_value, size_t length)\n{\n    size_t j;\n    int16_t *arrptr = ptr;\n\n    for (j = length; j > 0; j--)\n    {\n        *arrptr++ = set_value;\n    }\n}\n\nvoid WebRtcSpl_MemSetW32(int32_t *ptr, int32_t set_value, size_t length)\n{\n    size_t j;\n    int32_t *arrptr = ptr;\n\n    for (j = length; j > 0; j--)\n    {\n        *arrptr++ = set_value;\n    }\n}\n\nvoid WebRtcSpl_MemCpyReversedOrder(int16_t* dest,\n                                   int16_t* source,\n                                   size_t length)\n{\n    size_t j;\n    int16_t* destPtr = dest;\n    int16_t* sourcePtr = source;\n\n    for (j = 0; j < length; j++)\n    {\n        *destPtr-- = *sourcePtr++;\n    }\n}\n\nvoid WebRtcSpl_CopyFromEndW16(const int16_t *vector_in,\n                              size_t length,\n                              size_t samples,\n                              int16_t *vector_out)\n{\n    // Copy the last <samples> of the input vector to vector_out\n    WEBRTC_SPL_MEMCPY_W16(vector_out, &vector_in[length - samples], samples);\n}\n\nvoid WebRtcSpl_ZerosArrayW16(int16_t *vector, size_t length)\n{\n    WebRtcSpl_MemSetW16(vector, 0, length);\n}\n\nvoid WebRtcSpl_ZerosArrayW32(int32_t *vector, size_t length)\n{\n    WebRtcSpl_MemSetW32(vector, 0, length);\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/cross_correlation.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n/* C version of WebRtcSpl_CrossCorrelation() for generic platforms. */\nvoid WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation,\n                                 const int16_t* seq1,\n                                 const int16_t* seq2,\n                                 size_t dim_seq,\n                                 size_t dim_cross_correlation,\n                                 int right_shifts,\n                                 int step_seq2) {\n  size_t i = 0, j = 0;\n\n  for (i = 0; i < dim_cross_correlation; i++) {\n    int32_t corr = 0;\n    for (j = 0; j < dim_seq; j++)\n      corr += (seq1[j] * seq2[j]) >> right_shifts;\n    seq2 += step_seq2;\n    *cross_correlation++ = corr;\n  }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/cross_correlation_neon.c",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n#ifdef WEBRTC_ARCH_ARM_FAMILY\n\n#include <arm_neon.h>\n\nstatic inline void DotProductWithScaleNeon(int32_t* cross_correlation,\n                                           const int16_t* vector1,\n                                           const int16_t* vector2,\n                                           size_t length,\n                                           int scaling) {\n  size_t i = 0;\n  size_t len1 = length >> 3;\n  size_t len2 = length & 7;\n  int64x2_t sum0 = vdupq_n_s64(0);\n  int64x2_t sum1 = vdupq_n_s64(0);\n\n  for (i = len1; i > 0; i -= 1) {\n    int16x8_t seq1_16x8 = vld1q_s16(vector1);\n    int16x8_t seq2_16x8 = vld1q_s16(vector2);\n#if defined(WEBRTC_ARCH_ARM64)\n    int32x4_t tmp0 = vmull_s16(vget_low_s16(seq1_16x8),\n                               vget_low_s16(seq2_16x8));\n    int32x4_t tmp1 = vmull_high_s16(seq1_16x8, seq2_16x8);\n#else\n    int32x4_t tmp0 = vmull_s16(vget_low_s16(seq1_16x8),\n                               vget_low_s16(seq2_16x8));\n    int32x4_t tmp1 = vmull_s16(vget_high_s16(seq1_16x8),\n                               vget_high_s16(seq2_16x8));\n#endif\n    sum0 = vpadalq_s32(sum0, tmp0);\n    sum1 = vpadalq_s32(sum1, tmp1);\n    vector1 += 8;\n    vector2 += 8;\n  }\n\n  // Calculate the rest of the samples.\n  int64_t sum_res = 0;\n  for (i = len2; i > 0; i -= 1) {\n    sum_res += WEBRTC_SPL_MUL_16_16(*vector1, *vector2);\n    vector1++;\n    vector2++;\n  }\n\n  sum0 = vaddq_s64(sum0, sum1);\n#if defined(WEBRTC_ARCH_ARM64)\n  int64_t sum2 = vaddvq_s64(sum0);\n  *cross_correlation = (int32_t)((sum2 + sum_res) >> scaling);\n#else\n  int64x1_t shift = vdup_n_s64(-scaling);\n  int64x1_t sum2 = vadd_s64(vget_low_s64(sum0), vget_high_s64(sum0));\n  sum2 = vadd_s64(sum2, vdup_n_s64(sum_res));\n  sum2 = vshl_s64(sum2, shift);\n  vst1_lane_s32(cross_correlation, vreinterpret_s32_s64(sum2), 0);\n#endif\n}\n\n/* NEON version of WebRtcSpl_CrossCorrelation() for ARM32/64 platforms. */\nvoid WebRtcSpl_CrossCorrelationNeon(int32_t* cross_correlation,\n                                    const int16_t* seq1,\n                                    const int16_t* seq2,\n                                    size_t dim_seq,\n                                    size_t dim_cross_correlation,\n                                    int right_shifts,\n                                    int step_seq2) {\n  size_t i = 0;\n\n  for (i = 0; i < dim_cross_correlation; i++) {\n    const int16_t* seq1_ptr = seq1;\n    const int16_t* seq2_ptr = seq2 + (step_seq2 * i);\n\n    DotProductWithScaleNeon(cross_correlation,\n                            seq1_ptr,\n                            seq2_ptr,\n                            dim_seq,\n                            right_shifts);\n    cross_correlation++;\n  }\n}\n\n#endif // WEBRTC_ARCH_ARM_FAMILY\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/division_operations.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains implementations of the divisions\n * WebRtcSpl_DivU32U16()\n * WebRtcSpl_DivW32W16()\n * WebRtcSpl_DivW32W16ResW16()\n * WebRtcSpl_DivResultInQ31()\n * WebRtcSpl_DivW32HiLow()\n *\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nuint32_t WebRtcSpl_DivU32U16(uint32_t num, uint16_t den)\n{\n    // Guard against division with 0\n    if (den != 0)\n    {\n        return (uint32_t)(num / den);\n    } else\n    {\n        return (uint32_t)0xFFFFFFFF;\n    }\n}\n\nint32_t WebRtcSpl_DivW32W16(int32_t num, int16_t den)\n{\n    // Guard against division with 0\n    if (den != 0)\n    {\n        return (int32_t)(num / den);\n    } else\n    {\n        return (int32_t)0x7FFFFFFF;\n    }\n}\n\nint16_t WebRtcSpl_DivW32W16ResW16(int32_t num, int16_t den)\n{\n    // Guard against division with 0\n    if (den != 0)\n    {\n        return (int16_t)(num / den);\n    } else\n    {\n        return (int16_t)0x7FFF;\n    }\n}\n\nint32_t WebRtcSpl_DivResultInQ31(int32_t num, int32_t den)\n{\n    int32_t L_num = num;\n    int32_t L_den = den;\n    int32_t div = 0;\n    int k = 31;\n    int change_sign = 0;\n\n    if (num == 0)\n        return 0;\n\n    if (num < 0)\n    {\n        change_sign++;\n        L_num = -num;\n    }\n    if (den < 0)\n    {\n        change_sign++;\n        L_den = -den;\n    }\n    while (k--)\n    {\n        div <<= 1;\n        L_num <<= 1;\n        if (L_num >= L_den)\n        {\n            L_num -= L_den;\n            div++;\n        }\n    }\n    if (change_sign == 1)\n    {\n        div = -div;\n    }\n    return div;\n}\n\nint32_t WebRtcSpl_DivW32HiLow(int32_t num, int16_t den_hi, int16_t den_low)\n{\n    int16_t approx, tmp_hi, tmp_low, num_hi, num_low;\n    int32_t tmpW32;\n\n    approx = (int16_t)WebRtcSpl_DivW32W16((int32_t)0x1FFFFFFF, den_hi);\n    // result in Q14 (Note: 3FFFFFFF = 0.5 in Q30)\n\n    // tmpW32 = 1/den = approx * (2.0 - den * approx) (in Q30)\n    tmpW32 = (den_hi * approx << 1) + ((den_low * approx >> 15) << 1);\n    // tmpW32 = den * approx\n\n    tmpW32 = (int32_t)0x7fffffffL - tmpW32; // result in Q30 (tmpW32 = 2.0-(den*approx))\n\n    // Store tmpW32 in hi and low format\n    tmp_hi = (int16_t)(tmpW32 >> 16);\n    tmp_low = (int16_t)((tmpW32 - ((int32_t)tmp_hi << 16)) >> 1);\n\n    // tmpW32 = 1/den in Q29\n    tmpW32 = (tmp_hi * approx + (tmp_low * approx >> 15)) << 1;\n\n    // 1/den in hi and low format\n    tmp_hi = (int16_t)(tmpW32 >> 16);\n    tmp_low = (int16_t)((tmpW32 - ((int32_t)tmp_hi << 16)) >> 1);\n\n    // Store num in hi and low format\n    num_hi = (int16_t)(num >> 16);\n    num_low = (int16_t)((num - ((int32_t)num_hi << 16)) >> 1);\n\n    // num * (1/den) by 32 bit multiplication (result in Q28)\n\n    tmpW32 = num_hi * tmp_hi + (num_hi * tmp_low >> 15) +\n        (num_low * tmp_hi >> 15);\n\n    // Put result in Q31 (convert from Q28)\n    tmpW32 = WEBRTC_SPL_LSHIFT_W32(tmpW32, 3);\n\n    return tmpW32;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/dot_product_with_scale.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nint32_t WebRtcSpl_DotProductWithScale(const int16_t* vector1,\n                                      const int16_t* vector2,\n                                      size_t length,\n                                      int scaling) {\n  int32_t sum = 0;\n  size_t i = 0;\n\n  /* Unroll the loop to improve performance. */\n  for (i = 0; i + 3 < length; i += 4) {\n    sum += (vector1[i + 0] * vector2[i + 0]) >> scaling;\n    sum += (vector1[i + 1] * vector2[i + 1]) >> scaling;\n    sum += (vector1[i + 2] * vector2[i + 2]) >> scaling;\n    sum += (vector1[i + 3] * vector2[i + 3]) >> scaling;\n  }\n  for (; i < length; i++) {\n    sum += (vector1[i] * vector2[i]) >> scaling;\n  }\n\n  return sum;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/downsample_fast.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/base/sanitizer.h\"\n\n// TODO(Bjornv): Change the function parameter order to WebRTC code style.\n// C version of WebRtcSpl_DownsampleFast() for generic platforms.\nint WebRtcSpl_DownsampleFastC(const int16_t* data_in,\n                              size_t data_in_length,\n                              int16_t* data_out,\n                              size_t data_out_length,\n                              const int16_t* __restrict coefficients,\n                              size_t coefficients_length,\n                              int factor,\n                              size_t delay) {\n  int16_t* const original_data_out = data_out;\n  size_t i = 0;\n  size_t j = 0;\n  int32_t out_s32 = 0;\n  size_t endpos = delay + factor * (data_out_length - 1) + 1;\n\n  // Return error if any of the running conditions doesn't meet.\n  if (data_out_length == 0 || coefficients_length == 0\n                           || data_in_length < endpos) {\n    return -1;\n  }\n\n  rtc_MsanCheckInitialized(coefficients, sizeof(coefficients[0]),\n                           coefficients_length);\n\n  for (i = delay; i < endpos; i += factor) {\n    out_s32 = 2048;  // Round value, 0.5 in Q12.\n\n    for (j = 0; j < coefficients_length; j++) {\n      rtc_MsanCheckInitialized(&data_in[i - j], sizeof(data_in[0]), 1);\n      out_s32 += coefficients[j] * data_in[i - j];  // Q12.\n    }\n\n    out_s32 >>= 12;  // Q0.\n\n    // Saturate and store the output.\n    *data_out++ = WebRtcSpl_SatW32ToW16(out_s32);\n  }\n\n  RTC_DCHECK_EQ(original_data_out + data_out_length, data_out);\n  rtc_MsanCheckInitialized(original_data_out, sizeof(original_data_out[0]),\n                           data_out_length);\n\n  return 0;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/downsample_fast_neon.c",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n#ifdef WEBRTC_ARCH_ARM_FAMILY\n\n#include <arm_neon.h>\n\n// NEON intrinsics version of WebRtcSpl_DownsampleFast()\n// for ARM 32-bit/64-bit platforms.\nint WebRtcSpl_DownsampleFastNeon(const int16_t* data_in,\n                                 size_t data_in_length,\n                                 int16_t* data_out,\n                                 size_t data_out_length,\n                                 const int16_t* __restrict coefficients,\n                                 size_t coefficients_length,\n                                 int factor,\n                                 size_t delay) {\n  size_t i = 0;\n  size_t j = 0;\n  int32_t out_s32 = 0;\n  size_t endpos = delay + factor * (data_out_length - 1) + 1;\n  size_t res = data_out_length & 0x7;\n  size_t endpos1 = endpos - factor * res;\n\n  // Return error if any of the running conditions doesn't meet.\n  if (data_out_length == 0 || coefficients_length == 0\n                           || data_in_length < endpos) {\n    return -1;\n  }\n\n  // First part, unroll the loop 8 times, with 3 subcases\n  // (factor == 2, 4, others).\n  switch (factor) {\n    case 2: {\n      for (i = delay; i < endpos1; i += 16) {\n        // Round value, 0.5 in Q12.\n        int32x4_t out32x4_0 = vdupq_n_s32(2048);\n        int32x4_t out32x4_1 = vdupq_n_s32(2048);\n\n#if defined(WEBRTC_ARCH_ARM64)\n        // Unroll the loop 2 times.\n        for (j = 0; j < coefficients_length - 1; j += 2) {\n          int32x2_t coeff32 = vld1_dup_s32((int32_t*)&coefficients[j]);\n          int16x4_t coeff16x4 = vreinterpret_s16_s32(coeff32);\n          int16x8x2_t in16x8x2 = vld2q_s16(&data_in[i - j - 1]);\n\n          // Mul and accumulate low 64-bit data.\n          int16x4_t in16x4_0 = vget_low_s16(in16x8x2.val[0]);\n          int16x4_t in16x4_1 = vget_low_s16(in16x8x2.val[1]);\n          out32x4_0 = vmlal_lane_s16(out32x4_0, in16x4_0, coeff16x4, 1);\n          out32x4_0 = vmlal_lane_s16(out32x4_0, in16x4_1, coeff16x4, 0);\n\n          // Mul and accumulate high 64-bit data.\n          // TODO: vget_high_s16 need extra cost on ARM64. This could be\n          // replaced by vmlal_high_lane_s16. But for the interface of\n          // vmlal_high_lane_s16, there is a bug in gcc 4.9.\n          // This issue need to be tracked in the future.\n          int16x4_t in16x4_2 = vget_high_s16(in16x8x2.val[0]);\n          int16x4_t in16x4_3 = vget_high_s16(in16x8x2.val[1]);\n          out32x4_1 = vmlal_lane_s16(out32x4_1, in16x4_2, coeff16x4, 1);\n          out32x4_1 = vmlal_lane_s16(out32x4_1, in16x4_3, coeff16x4, 0);\n        }\n\n        for (; j < coefficients_length; j++) {\n          int16x4_t coeff16x4 = vld1_dup_s16(&coefficients[j]);\n          int16x8x2_t in16x8x2 = vld2q_s16(&data_in[i - j]);\n\n          // Mul and accumulate low 64-bit data.\n          int16x4_t in16x4_0 = vget_low_s16(in16x8x2.val[0]);\n          out32x4_0 = vmlal_lane_s16(out32x4_0, in16x4_0, coeff16x4, 0);\n\n          // Mul and accumulate high 64-bit data.\n          // TODO: vget_high_s16 need extra cost on ARM64. This could be\n          // replaced by vmlal_high_lane_s16. But for the interface of\n          // vmlal_high_lane_s16, there is a bug in gcc 4.9.\n          // This issue need to be tracked in the future.\n          int16x4_t in16x4_1 = vget_high_s16(in16x8x2.val[0]);\n          out32x4_1 = vmlal_lane_s16(out32x4_1, in16x4_1, coeff16x4, 0);\n        }\n#else\n        // On ARMv7, the loop unrolling 2 times results in performance\n        // regression.\n        for (j = 0; j < coefficients_length; j++) {\n          int16x4_t coeff16x4 = vld1_dup_s16(&coefficients[j]);\n          int16x8x2_t in16x8x2 = vld2q_s16(&data_in[i - j]);\n\n          // Mul and accumulate.\n          int16x4_t in16x4_0 = vget_low_s16(in16x8x2.val[0]);\n          int16x4_t in16x4_1 = vget_high_s16(in16x8x2.val[0]);\n          out32x4_0 = vmlal_lane_s16(out32x4_0, in16x4_0, coeff16x4, 0);\n          out32x4_1 = vmlal_lane_s16(out32x4_1, in16x4_1, coeff16x4, 0);\n        }\n#endif\n\n        // Saturate and store the output.\n        int16x4_t out16x4_0 = vqshrn_n_s32(out32x4_0, 12);\n        int16x4_t out16x4_1 = vqshrn_n_s32(out32x4_1, 12);\n        vst1q_s16(data_out, vcombine_s16(out16x4_0, out16x4_1));\n        data_out += 8;\n      }\n      break;\n    }\n    case 4: {\n      for (i = delay; i < endpos1; i += 32) {\n        // Round value, 0.5 in Q12.\n        int32x4_t out32x4_0 = vdupq_n_s32(2048);\n        int32x4_t out32x4_1 = vdupq_n_s32(2048);\n\n        // Unroll the loop 4 times.\n        for (j = 0; j < coefficients_length - 3; j += 4) {\n          int16x4_t coeff16x4 = vld1_s16(&coefficients[j]);\n          int16x8x4_t in16x8x4 = vld4q_s16(&data_in[i - j - 3]);\n\n          // Mul and accumulate low 64-bit data.\n          int16x4_t in16x4_0 = vget_low_s16(in16x8x4.val[0]);\n          int16x4_t in16x4_2 = vget_low_s16(in16x8x4.val[1]);\n          int16x4_t in16x4_4 = vget_low_s16(in16x8x4.val[2]);\n          int16x4_t in16x4_6 = vget_low_s16(in16x8x4.val[3]);\n          out32x4_0 = vmlal_lane_s16(out32x4_0, in16x4_0, coeff16x4, 3);\n          out32x4_0 = vmlal_lane_s16(out32x4_0, in16x4_2, coeff16x4, 2);\n          out32x4_0 = vmlal_lane_s16(out32x4_0, in16x4_4, coeff16x4, 1);\n          out32x4_0 = vmlal_lane_s16(out32x4_0, in16x4_6, coeff16x4, 0);\n\n          // Mul and accumulate high 64-bit data.\n          // TODO: vget_high_s16 need extra cost on ARM64. This could be\n          // replaced by vmlal_high_lane_s16. But for the interface of\n          // vmlal_high_lane_s16, there is a bug in gcc 4.9.\n          // This issue need to be tracked in the future.\n          int16x4_t in16x4_1 = vget_high_s16(in16x8x4.val[0]);\n          int16x4_t in16x4_3 = vget_high_s16(in16x8x4.val[1]);\n          int16x4_t in16x4_5 = vget_high_s16(in16x8x4.val[2]);\n          int16x4_t in16x4_7 = vget_high_s16(in16x8x4.val[3]);\n          out32x4_1 = vmlal_lane_s16(out32x4_1, in16x4_1, coeff16x4, 3);\n          out32x4_1 = vmlal_lane_s16(out32x4_1, in16x4_3, coeff16x4, 2);\n          out32x4_1 = vmlal_lane_s16(out32x4_1, in16x4_5, coeff16x4, 1);\n          out32x4_1 = vmlal_lane_s16(out32x4_1, in16x4_7, coeff16x4, 0);\n        }\n\n        for (; j < coefficients_length; j++) {\n          int16x4_t coeff16x4 = vld1_dup_s16(&coefficients[j]);\n          int16x8x4_t in16x8x4 = vld4q_s16(&data_in[i - j]);\n\n          // Mul and accumulate low 64-bit data.\n          int16x4_t in16x4_0 = vget_low_s16(in16x8x4.val[0]);\n          out32x4_0 = vmlal_lane_s16(out32x4_0, in16x4_0, coeff16x4, 0);\n\n          // Mul and accumulate high 64-bit data.\n          // TODO: vget_high_s16 need extra cost on ARM64. This could be\n          // replaced by vmlal_high_lane_s16. But for the interface of\n          // vmlal_high_lane_s16, there is a bug in gcc 4.9.\n          // This issue need to be tracked in the future.\n          int16x4_t in16x4_1 = vget_high_s16(in16x8x4.val[0]);\n          out32x4_1 = vmlal_lane_s16(out32x4_1, in16x4_1, coeff16x4, 0);\n        }\n\n        // Saturate and store the output.\n        int16x4_t out16x4_0 = vqshrn_n_s32(out32x4_0, 12);\n        int16x4_t out16x4_1 = vqshrn_n_s32(out32x4_1, 12);\n        vst1q_s16(data_out, vcombine_s16(out16x4_0, out16x4_1));\n        data_out += 8;\n      }\n      break;\n    }\n    default: {\n      for (i = delay; i < endpos1; i += factor * 8) {\n        // Round value, 0.5 in Q12.\n        int32x4_t out32x4_0 = vdupq_n_s32(2048);\n        int32x4_t out32x4_1 = vdupq_n_s32(2048);\n\n        for (j = 0; j < coefficients_length; j++) {\n          int16x4_t coeff16x4 = vld1_dup_s16(&coefficients[j]);\n          int16x4_t in16x4_0 = vld1_dup_s16(&data_in[i - j]);\n          in16x4_0 = vld1_lane_s16(&data_in[i + factor - j], in16x4_0, 1);\n          in16x4_0 = vld1_lane_s16(&data_in[i + factor * 2 - j], in16x4_0, 2);\n          in16x4_0 = vld1_lane_s16(&data_in[i + factor * 3 - j], in16x4_0, 3);\n          int16x4_t in16x4_1 = vld1_dup_s16(&data_in[i + factor * 4 - j]);\n          in16x4_1 = vld1_lane_s16(&data_in[i + factor * 5 - j], in16x4_1, 1);\n          in16x4_1 = vld1_lane_s16(&data_in[i + factor * 6 - j], in16x4_1, 2);\n          in16x4_1 = vld1_lane_s16(&data_in[i + factor * 7 - j], in16x4_1, 3);\n\n          // Mul and accumulate.\n          out32x4_0 = vmlal_lane_s16(out32x4_0, in16x4_0, coeff16x4, 0);\n          out32x4_1 = vmlal_lane_s16(out32x4_1, in16x4_1, coeff16x4, 0);\n        }\n\n        // Saturate and store the output.\n        int16x4_t out16x4_0 = vqshrn_n_s32(out32x4_0, 12);\n        int16x4_t out16x4_1 = vqshrn_n_s32(out32x4_1, 12);\n        vst1q_s16(data_out, vcombine_s16(out16x4_0, out16x4_1));\n        data_out += 8;\n      }\n      break;\n    }\n  }\n\n  // Second part, do the rest iterations (if any).\n  for (; i < endpos; i += factor) {\n    out_s32 = 2048;  // Round value, 0.5 in Q12.\n\n    for (j = 0; j < coefficients_length; j++) {\n      out_s32 = WebRtc_MulAccumW16(coefficients[j], data_in[i - j], out_s32);\n    }\n\n    // Saturate and store the output.\n    out_s32 >>= 12;\n    *data_out++ = WebRtcSpl_SatW32ToW16(out_s32);\n  }\n\n  return 0;\n}\n\n#endif\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/energy.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_Energy().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nint32_t WebRtcSpl_Energy(int16_t* vector,\n                         size_t vector_length,\n                         int* scale_factor)\n{\n    int32_t en = 0;\n    size_t i;\n    int scaling =\n        WebRtcSpl_GetScalingSquare(vector, vector_length, vector_length);\n    size_t looptimes = vector_length;\n    int16_t *vectorptr = vector;\n\n    for (i = 0; i < looptimes; i++)\n    {\n      en += (*vectorptr * *vectorptr) >> scaling;\n      vectorptr++;\n    }\n    *scale_factor = scaling;\n\n    return en;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/filter_ar.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_FilterAR().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nsize_t WebRtcSpl_FilterAR(const int16_t* a,\n                          size_t a_length,\n                          const int16_t* x,\n                          size_t x_length,\n                          int16_t* state,\n                          size_t state_length,\n                          int16_t* state_low,\n                          size_t state_low_length,\n                          int16_t* filtered,\n                          int16_t* filtered_low,\n                          size_t filtered_low_length)\n{\n    int32_t o;\n    int32_t oLOW;\n    size_t i, j, stop;\n    const int16_t* x_ptr = &x[0];\n    int16_t* filteredFINAL_ptr = filtered;\n    int16_t* filteredFINAL_LOW_ptr = filtered_low;\n\n    for (i = 0; i < x_length; i++)\n    {\n        // Calculate filtered[i] and filtered_low[i]\n        const int16_t* a_ptr = &a[1];\n        int16_t* filtered_ptr = &filtered[i - 1];\n        int16_t* filtered_low_ptr = &filtered_low[i - 1];\n        int16_t* state_ptr = &state[state_length - 1];\n        int16_t* state_low_ptr = &state_low[state_length - 1];\n\n        o = (int32_t)(*x_ptr++) * (1 << 12);\n        oLOW = (int32_t)0;\n\n        stop = (i < a_length) ? i + 1 : a_length;\n        for (j = 1; j < stop; j++)\n        {\n          o -= *a_ptr * *filtered_ptr--;\n          oLOW -= *a_ptr++ * *filtered_low_ptr--;\n        }\n        for (j = i + 1; j < a_length; j++)\n        {\n          o -= *a_ptr * *state_ptr--;\n          oLOW -= *a_ptr++ * *state_low_ptr--;\n        }\n\n        o += (oLOW >> 12);\n        *filteredFINAL_ptr = (int16_t)((o + (int32_t)2048) >> 12);\n        *filteredFINAL_LOW_ptr++ =\n            (int16_t)(o - ((int32_t)(*filteredFINAL_ptr++) * (1 << 12)));\n    }\n\n    // Save the filter state\n    if (x_length >= state_length)\n    {\n        WebRtcSpl_CopyFromEndW16(filtered, x_length, a_length - 1, state);\n        WebRtcSpl_CopyFromEndW16(filtered_low, x_length, a_length - 1, state_low);\n    } else\n    {\n        for (i = 0; i < state_length - x_length; i++)\n        {\n            state[i] = state[i + x_length];\n            state_low[i] = state_low[i + x_length];\n        }\n        for (i = 0; i < x_length; i++)\n        {\n            state[state_length - x_length + i] = filtered[i];\n            state[state_length - x_length + i] = filtered_low[i];\n        }\n    }\n\n    return x_length;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/filter_ar_fast_q12.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n// TODO(bjornv): Change the return type to report errors.\n\nvoid WebRtcSpl_FilterARFastQ12(const int16_t* data_in,\n                               int16_t* data_out,\n                               const int16_t* __restrict coefficients,\n                               size_t coefficients_length,\n                               size_t data_length) {\n  size_t i = 0;\n  size_t j = 0;\n\n  RTC_DCHECK_GT(data_length, 0);\n  RTC_DCHECK_GT(coefficients_length, 1);\n\n  for (i = 0; i < data_length; i++) {\n    int32_t output = 0;\n    int32_t sum = 0;\n\n    for (j = coefficients_length - 1; j > 0; j--) {\n      sum += coefficients[j] * data_out[i - j];\n    }\n\n    output = coefficients[0] * data_in[i];\n    output -= sum;\n\n    // Saturate and store the output.\n    output = WEBRTC_SPL_SAT(134215679, output, -134217728);\n    data_out[i] = (int16_t)((output + 2048) >> 12);\n  }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_FilterMAFastQ12().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n#include \"webrtc/base/sanitizer.h\"\n\nvoid WebRtcSpl_FilterMAFastQ12(const int16_t* in_ptr,\n                               int16_t* out_ptr,\n                               const int16_t* B,\n                               size_t B_length,\n                               size_t length)\n{\n    size_t i, j;\n\n    rtc_MsanCheckInitialized(B, sizeof(B[0]), B_length);\n    rtc_MsanCheckInitialized(in_ptr - B_length + 1, sizeof(in_ptr[0]),\n                             B_length + length - 1);\n\n    for (i = 0; i < length; i++)\n    {\n        int32_t o = 0;\n\n        for (j = 0; j < B_length; j++)\n        {\n          o += B[j] * in_ptr[i - j];\n        }\n\n        // If output is higher than 32768, saturate it. Same with negative side\n        // 2^27 = 134217728, which corresponds to 32768 in Q12\n\n        // Saturate the output\n        o = WEBRTC_SPL_SAT((int32_t)134215679, o, (int32_t)-134217728);\n\n        *out_ptr++ = (int16_t)((o + (int32_t)2048) >> 12);\n    }\n    return;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/get_hanning_window.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_GetHanningWindow().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n// Hanning table with 256 entries\nstatic const int16_t kHanningTable[] = {\n    1,      2,      6,     10,     15,     22,     30,     39,\n   50,     62,     75,     89,    104,    121,    138,    157,\n  178,    199,    222,    246,    271,    297,    324,    353,\n  383,    413,    446,    479,    513,    549,    586,    624,\n  663,    703,    744,    787,    830,    875,    920,    967,\n 1015,   1064,   1114,   1165,   1218,   1271,   1325,   1381,\n 1437,   1494,   1553,   1612,   1673,   1734,   1796,   1859,\n 1924,   1989,   2055,   2122,   2190,   2259,   2329,   2399,\n 2471,   2543,   2617,   2691,   2765,   2841,   2918,   2995,\n 3073,   3152,   3232,   3312,   3393,   3475,   3558,   3641,\n 3725,   3809,   3895,   3980,   4067,   4154,   4242,   4330,\n 4419,   4509,   4599,   4689,   4781,   4872,   4964,   5057,\n 5150,   5244,   5338,   5432,   5527,   5622,   5718,   5814,\n 5910,   6007,   6104,   6202,   6299,   6397,   6495,   6594,\n 6693,   6791,   6891,   6990,   7090,   7189,   7289,   7389,\n 7489,   7589,   7690,   7790,   7890,   7991,   8091,   8192,\n 8293,   8393,   8494,   8594,   8694,   8795,   8895,   8995,\n 9095,   9195,   9294,   9394,   9493,   9593,   9691,   9790,\n 9889,   9987,  10085,  10182,  10280,  10377,  10474,  10570,\n10666,  10762,  10857,  10952,  11046,  11140,  11234,  11327,\n11420,  11512,  11603,  11695,  11785,  11875,  11965,  12054,\n12142,  12230,  12317,  12404,  12489,  12575,  12659,  12743,\n12826,  12909,  12991,  13072,  13152,  13232,  13311,  13389,\n13466,  13543,  13619,  13693,  13767,  13841,  13913,  13985,\n14055,  14125,  14194,  14262,  14329,  14395,  14460,  14525,\n14588,  14650,  14711,  14772,  14831,  14890,  14947,  15003,\n15059,  15113,  15166,  15219,  15270,  15320,  15369,  15417,\n15464,  15509,  15554,  15597,  15640,  15681,  15721,  15760,\n15798,  15835,  15871,  15905,  15938,  15971,  16001,  16031,\n16060,  16087,  16113,  16138,  16162,  16185,  16206,  16227,\n16246,  16263,  16280,  16295,  16309,  16322,  16334,  16345,\n16354,  16362,  16369,  16374,  16378,  16382,  16383,  16384\n};\n\nvoid WebRtcSpl_GetHanningWindow(int16_t *v, size_t size)\n{\n    size_t jj;\n    int16_t *vptr1;\n\n    int32_t index;\n    int32_t factor = ((int32_t)0x40000000);\n\n    factor = WebRtcSpl_DivW32W16(factor, (int16_t)size);\n    if (size < 513)\n        index = (int32_t)-0x200000;\n    else\n        index = (int32_t)-0x100000;\n    vptr1 = v;\n\n    for (jj = 0; jj < size; jj++)\n    {\n        index += factor;\n        (*vptr1++) = kHanningTable[index >> 22];\n    }\n\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/get_scaling_square.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_GetScalingSquare().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nint16_t WebRtcSpl_GetScalingSquare(int16_t* in_vector,\n                                   size_t in_vector_length,\n                                   size_t times)\n{\n    int16_t nbits = WebRtcSpl_GetSizeInBits((uint32_t)times);\n    size_t i;\n    int16_t smax = -1;\n    int16_t sabs;\n    int16_t *sptr = in_vector;\n    int16_t t;\n    size_t looptimes = in_vector_length;\n\n    for (i = looptimes; i > 0; i--)\n    {\n        sabs = (*sptr > 0 ? *sptr++ : -*sptr++);\n        smax = (sabs > smax ? sabs : smax);\n    }\n    t = WebRtcSpl_NormW32(WEBRTC_SPL_MUL(smax, smax));\n\n    if (smax == 0)\n    {\n        return 0; // Since norm(0) returns 0\n    } else\n    {\n        return (t > nbits) ? 0 : nbits - t;\n    }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/ilbc_specific_functions.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains implementations of the iLBC specific functions\n * WebRtcSpl_ReverseOrderMultArrayElements()\n * WebRtcSpl_ElementwiseVectorMult()\n * WebRtcSpl_AddVectorsAndShift()\n * WebRtcSpl_AddAffineVectorToVector()\n * WebRtcSpl_AffineTransformVector()\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nvoid WebRtcSpl_ReverseOrderMultArrayElements(int16_t *out, const int16_t *in,\n                                             const int16_t *win,\n                                             size_t vector_length,\n                                             int16_t right_shifts)\n{\n    size_t i;\n    int16_t *outptr = out;\n    const int16_t *inptr = in;\n    const int16_t *winptr = win;\n    for (i = 0; i < vector_length; i++)\n    {\n      *outptr++ = (int16_t)((*inptr++ * *winptr--) >> right_shifts);\n    }\n}\n\nvoid WebRtcSpl_ElementwiseVectorMult(int16_t *out, const int16_t *in,\n                                     const int16_t *win, size_t vector_length,\n                                     int16_t right_shifts)\n{\n    size_t i;\n    int16_t *outptr = out;\n    const int16_t *inptr = in;\n    const int16_t *winptr = win;\n    for (i = 0; i < vector_length; i++)\n    {\n      *outptr++ = (int16_t)((*inptr++ * *winptr++) >> right_shifts);\n    }\n}\n\nvoid WebRtcSpl_AddVectorsAndShift(int16_t *out, const int16_t *in1,\n                                  const int16_t *in2, size_t vector_length,\n                                  int16_t right_shifts)\n{\n    size_t i;\n    int16_t *outptr = out;\n    const int16_t *in1ptr = in1;\n    const int16_t *in2ptr = in2;\n    for (i = vector_length; i > 0; i--)\n    {\n        (*outptr++) = (int16_t)(((*in1ptr++) + (*in2ptr++)) >> right_shifts);\n    }\n}\n\nvoid WebRtcSpl_AddAffineVectorToVector(int16_t *out, int16_t *in,\n                                       int16_t gain, int32_t add_constant,\n                                       int16_t right_shifts,\n                                       size_t vector_length)\n{\n    size_t i;\n\n    for (i = 0; i < vector_length; i++)\n    {\n      out[i] += (int16_t)((in[i] * gain + add_constant) >> right_shifts);\n    }\n}\n\nvoid WebRtcSpl_AffineTransformVector(int16_t *out, int16_t *in,\n                                     int16_t gain, int32_t add_constant,\n                                     int16_t right_shifts, size_t vector_length)\n{\n    size_t i;\n\n    for (i = 0; i < vector_length; i++)\n    {\n      out[i] = (int16_t)((in[i] * gain + add_constant) >> right_shifts);\n    }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/include/real_fft.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_REAL_FFT_H_\n#define WEBRTC_COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_REAL_FFT_H_\n\n#include \"webrtc/typedefs.h\"\n\n// For ComplexFFT(), the maximum fft order is 10;\n// for OpenMax FFT in ARM, it is 12;\n// WebRTC APM uses orders of only 7 and 8.\nenum {kMaxFFTOrder = 10};\n\nstruct RealFFT;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct RealFFT* WebRtcSpl_CreateRealFFT(int order);\nvoid WebRtcSpl_FreeRealFFT(struct RealFFT* self);\n\n// Compute an FFT for a real-valued signal of length of 2^order,\n// where 1 < order <= MAX_FFT_ORDER. Transform length is determined by the\n// specification structure, which must be initialized prior to calling the FFT\n// function with WebRtcSpl_CreateRealFFT().\n// The relationship between the input and output sequences can\n// be expressed in terms of the DFT, i.e.:\n//     x[n] = (2^(-scalefactor)/N)  . SUM[k=0,...,N-1] X[k].e^(jnk.2.pi/N)\n//     n=0,1,2,...N-1\n//     N=2^order.\n// The conjugate-symmetric output sequence is represented using a CCS vector,\n// which is of length N+2, and is organized as follows:\n//     Index:      0  1  2  3  4  5   . . .   N-2       N-1       N       N+1\n//     Component:  R0 0  R1 I1 R2 I2  . . .   R[N/2-1]  I[N/2-1]  R[N/2]  0\n// where R[n] and I[n], respectively, denote the real and imaginary components\n// for FFT bin 'n'. Bins  are numbered from 0 to N/2, where N is the FFT length.\n// Bin index 0 corresponds to the DC component, and bin index N/2 corresponds to\n// the foldover frequency.\n//\n// Input Arguments:\n//   self - pointer to preallocated and initialized FFT specification structure.\n//   real_data_in - the input signal. For an ARM Neon platform, it must be\n//                  aligned on a 32-byte boundary.\n//\n// Output Arguments:\n//   complex_data_out - the output complex signal with (2^order + 2) 16-bit\n//                      elements. For an ARM Neon platform, it must be different\n//                      from real_data_in, and aligned on a 32-byte boundary.\n//\n// Return Value:\n//   0  - FFT calculation is successful.\n//   -1 - Error with bad arguments (NULL pointers).\nint WebRtcSpl_RealForwardFFT(struct RealFFT* self,\n                             const int16_t* real_data_in,\n                             int16_t* complex_data_out);\n\n// Compute the inverse FFT for a conjugate-symmetric input sequence of length of\n// 2^order, where 1 < order <= MAX_FFT_ORDER. Transform length is determined by\n// the specification structure, which must be initialized prior to calling the\n// FFT function with WebRtcSpl_CreateRealFFT().\n// For a transform of length M, the input sequence is represented using a packed\n// CCS vector of length M+2, which is explained in the comments for\n// WebRtcSpl_RealForwardFFTC above.\n//\n// Input Arguments:\n//   self - pointer to preallocated and initialized FFT specification structure.\n//   complex_data_in - the input complex signal with (2^order + 2) 16-bit\n//                     elements. For an ARM Neon platform, it must be aligned on\n//                     a 32-byte boundary.\n//\n// Output Arguments:\n//   real_data_out - the output real signal. For an ARM Neon platform, it must\n//                   be different to complex_data_in, and aligned on a 32-byte\n//                   boundary.\n//\n// Return Value:\n//   0 or a positive number - a value that the elements in the |real_data_out|\n//                            should be shifted left with in order to get\n//                            correct physical values.\n//   -1 - Error with bad arguments (NULL pointers).\nint WebRtcSpl_RealInverseFFT(struct RealFFT* self,\n                             const int16_t* complex_data_in,\n                             int16_t* real_data_out);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // WEBRTC_COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_REAL_FFT_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/include/signal_processing_library.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This header file includes all of the fix point signal processing library (SPL) function\n * descriptions and declarations.\n * For specific function calls, see bottom of file.\n */\n\n#ifndef WEBRTC_SPL_SIGNAL_PROCESSING_LIBRARY_H_\n#define WEBRTC_SPL_SIGNAL_PROCESSING_LIBRARY_H_\n\n#include <string.h>\n#include \"webrtc/typedefs.h\"\n\n// Macros specific for the fixed point implementation\n#define WEBRTC_SPL_WORD16_MAX       32767\n#define WEBRTC_SPL_WORD16_MIN       -32768\n#define WEBRTC_SPL_WORD32_MAX       (int32_t)0x7fffffff\n#define WEBRTC_SPL_WORD32_MIN       (int32_t)0x80000000\n#define WEBRTC_SPL_MAX_LPC_ORDER    14\n#define WEBRTC_SPL_MIN(A, B)        (A < B ? A : B)  // Get min value\n#define WEBRTC_SPL_MAX(A, B)        (A > B ? A : B)  // Get max value\n// TODO(kma/bjorn): For the next two macros, investigate how to correct the code\n// for inputs of a = WEBRTC_SPL_WORD16_MIN or WEBRTC_SPL_WORD32_MIN.\n#define WEBRTC_SPL_ABS_W16(a) \\\n    (((int16_t)a >= 0) ? ((int16_t)a) : -((int16_t)a))\n#define WEBRTC_SPL_ABS_W32(a) \\\n    (((int32_t)a >= 0) ? ((int32_t)a) : -((int32_t)a))\n\n#define WEBRTC_SPL_MUL(a, b) \\\n    ((int32_t) ((int32_t)(a) * (int32_t)(b)))\n#define WEBRTC_SPL_UMUL(a, b) \\\n    ((uint32_t) ((uint32_t)(a) * (uint32_t)(b)))\n#define WEBRTC_SPL_UMUL_32_16(a, b) \\\n    ((uint32_t) ((uint32_t)(a) * (uint16_t)(b)))\n#define WEBRTC_SPL_MUL_16_U16(a, b) \\\n    ((int32_t)(int16_t)(a) * (uint16_t)(b))\n\n#ifndef WEBRTC_ARCH_ARM_V7\n// For ARMv7 platforms, these are inline functions in spl_inl_armv7.h\n#ifndef MIPS32_LE\n// For MIPS platforms, these are inline functions in spl_inl_mips.h\n#define WEBRTC_SPL_MUL_16_16(a, b) \\\n    ((int32_t) (((int16_t)(a)) * ((int16_t)(b))))\n#define WEBRTC_SPL_MUL_16_32_RSFT16(a, b) \\\n    (WEBRTC_SPL_MUL_16_16(a, b >> 16) \\\n     + ((WEBRTC_SPL_MUL_16_16(a, (b & 0xffff) >> 1) + 0x4000) >> 15))\n#endif\n#endif\n\n#define WEBRTC_SPL_MUL_16_32_RSFT11(a, b)          \\\n  (WEBRTC_SPL_MUL_16_16(a, (b) >> 16) * (1 << 5) + \\\n   (((WEBRTC_SPL_MUL_16_U16(a, (uint16_t)(b)) >> 1) + 0x0200) >> 10))\n#define WEBRTC_SPL_MUL_16_32_RSFT14(a, b)          \\\n  (WEBRTC_SPL_MUL_16_16(a, (b) >> 16) * (1 << 2) + \\\n   (((WEBRTC_SPL_MUL_16_U16(a, (uint16_t)(b)) >> 1) + 0x1000) >> 13))\n#define WEBRTC_SPL_MUL_16_32_RSFT15(a, b)            \\\n  ((WEBRTC_SPL_MUL_16_16(a, (b) >> 16) * (1 << 1)) + \\\n   (((WEBRTC_SPL_MUL_16_U16(a, (uint16_t)(b)) >> 1) + 0x2000) >> 14))\n\n#define WEBRTC_SPL_MUL_16_16_RSFT(a, b, c) \\\n    (WEBRTC_SPL_MUL_16_16(a, b) >> (c))\n\n#define WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(a, b, c) \\\n    ((WEBRTC_SPL_MUL_16_16(a, b) + ((int32_t) \\\n                                  (((int32_t)1) << ((c) - 1)))) >> (c))\n\n// C + the 32 most significant bits of A * B\n#define WEBRTC_SPL_SCALEDIFF32(A, B, C) \\\n    (C + (B >> 16) * A + (((uint32_t)(0x0000FFFF & B) * A) >> 16))\n\n#define WEBRTC_SPL_SAT(a, b, c)         (b > a ? a : b < c ? c : b)\n\n// Shifting with negative numbers allowed\n// Positive means left shift\n#define WEBRTC_SPL_SHIFT_W32(x, c) ((c) >= 0 ? (x) * (1 << (c)) : (x) >> -(c))\n\n// Shifting with negative numbers not allowed\n// We cannot do casting here due to signed/unsigned problem\n#define WEBRTC_SPL_LSHIFT_W32(x, c)     ((x) << (c))\n\n#define WEBRTC_SPL_RSHIFT_U32(x, c)     ((uint32_t)(x) >> (c))\n\n#define WEBRTC_SPL_RAND(a) \\\n    ((int16_t)((((int16_t)a * 18816) >> 7) & 0x00007fff))\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define WEBRTC_SPL_MEMCPY_W16(v1, v2, length) \\\n  memcpy(v1, v2, (length) * sizeof(int16_t))\n\n// inline functions:\n#include \"webrtc/common_audio/signal_processing/include/spl_inl.h\"\n\n// Initialize SPL. Currently it contains only function pointer initialization.\n// If the underlying platform is known to be ARM-Neon (WEBRTC_HAS_NEON defined),\n// the pointers will be assigned to code optimized for Neon; otherwise, generic\n// C code will be assigned.\n// Note that this function MUST be called in any application that uses SPL\n// functions.\nvoid WebRtcSpl_Init();\n\nint16_t WebRtcSpl_GetScalingSquare(int16_t* in_vector,\n                                   size_t in_vector_length,\n                                   size_t times);\n\n// Copy and set operations. Implementation in copy_set_operations.c.\n// Descriptions at bottom of file.\nvoid WebRtcSpl_MemSetW16(int16_t* vector,\n                         int16_t set_value,\n                         size_t vector_length);\nvoid WebRtcSpl_MemSetW32(int32_t* vector,\n                         int32_t set_value,\n                         size_t vector_length);\nvoid WebRtcSpl_MemCpyReversedOrder(int16_t* out_vector,\n                                   int16_t* in_vector,\n                                   size_t vector_length);\nvoid WebRtcSpl_CopyFromEndW16(const int16_t* in_vector,\n                              size_t in_vector_length,\n                              size_t samples,\n                              int16_t* out_vector);\nvoid WebRtcSpl_ZerosArrayW16(int16_t* vector,\n                             size_t vector_length);\nvoid WebRtcSpl_ZerosArrayW32(int32_t* vector,\n                             size_t vector_length);\n// End: Copy and set operations.\n\n\n// Minimum and maximum operation functions and their pointers.\n// Implementation in min_max_operations.c.\n\n// Returns the largest absolute value in a signed 16-bit vector.\n//\n// Input:\n//      - vector : 16-bit input vector.\n//      - length : Number of samples in vector.\n//\n// Return value  : Maximum absolute value in vector.\ntypedef int16_t (*MaxAbsValueW16)(const int16_t* vector, size_t length);\nextern MaxAbsValueW16 WebRtcSpl_MaxAbsValueW16;\nint16_t WebRtcSpl_MaxAbsValueW16C(const int16_t* vector, size_t length);\n#if defined(WEBRTC_HAS_NEON)\nint16_t WebRtcSpl_MaxAbsValueW16Neon(const int16_t* vector, size_t length);\n#endif\n#if defined(MIPS32_LE)\nint16_t WebRtcSpl_MaxAbsValueW16_mips(const int16_t* vector, size_t length);\n#endif\n\n// Returns the largest absolute value in a signed 32-bit vector.\n//\n// Input:\n//      - vector : 32-bit input vector.\n//      - length : Number of samples in vector.\n//\n// Return value  : Maximum absolute value in vector.\ntypedef int32_t (*MaxAbsValueW32)(const int32_t* vector, size_t length);\nextern MaxAbsValueW32 WebRtcSpl_MaxAbsValueW32;\nint32_t WebRtcSpl_MaxAbsValueW32C(const int32_t* vector, size_t length);\n#if defined(WEBRTC_HAS_NEON)\nint32_t WebRtcSpl_MaxAbsValueW32Neon(const int32_t* vector, size_t length);\n#endif\n#if defined(MIPS_DSP_R1_LE)\nint32_t WebRtcSpl_MaxAbsValueW32_mips(const int32_t* vector, size_t length);\n#endif\n\n// Returns the maximum value of a 16-bit vector.\n//\n// Input:\n//      - vector : 16-bit input vector.\n//      - length : Number of samples in vector.\n//\n// Return value  : Maximum sample value in |vector|.\ntypedef int16_t (*MaxValueW16)(const int16_t* vector, size_t length);\nextern MaxValueW16 WebRtcSpl_MaxValueW16;\nint16_t WebRtcSpl_MaxValueW16C(const int16_t* vector, size_t length);\n#if defined(WEBRTC_HAS_NEON)\nint16_t WebRtcSpl_MaxValueW16Neon(const int16_t* vector, size_t length);\n#endif\n#if defined(MIPS32_LE)\nint16_t WebRtcSpl_MaxValueW16_mips(const int16_t* vector, size_t length);\n#endif\n\n// Returns the maximum value of a 32-bit vector.\n//\n// Input:\n//      - vector : 32-bit input vector.\n//      - length : Number of samples in vector.\n//\n// Return value  : Maximum sample value in |vector|.\ntypedef int32_t (*MaxValueW32)(const int32_t* vector, size_t length);\nextern MaxValueW32 WebRtcSpl_MaxValueW32;\nint32_t WebRtcSpl_MaxValueW32C(const int32_t* vector, size_t length);\n#if defined(WEBRTC_HAS_NEON)\nint32_t WebRtcSpl_MaxValueW32Neon(const int32_t* vector, size_t length);\n#endif\n#if defined(MIPS32_LE)\nint32_t WebRtcSpl_MaxValueW32_mips(const int32_t* vector, size_t length);\n#endif\n\n// Returns the minimum value of a 16-bit vector.\n//\n// Input:\n//      - vector : 16-bit input vector.\n//      - length : Number of samples in vector.\n//\n// Return value  : Minimum sample value in |vector|.\ntypedef int16_t (*MinValueW16)(const int16_t* vector, size_t length);\nextern MinValueW16 WebRtcSpl_MinValueW16;\nint16_t WebRtcSpl_MinValueW16C(const int16_t* vector, size_t length);\n#if defined(WEBRTC_HAS_NEON)\nint16_t WebRtcSpl_MinValueW16Neon(const int16_t* vector, size_t length);\n#endif\n#if defined(MIPS32_LE)\nint16_t WebRtcSpl_MinValueW16_mips(const int16_t* vector, size_t length);\n#endif\n\n// Returns the minimum value of a 32-bit vector.\n//\n// Input:\n//      - vector : 32-bit input vector.\n//      - length : Number of samples in vector.\n//\n// Return value  : Minimum sample value in |vector|.\ntypedef int32_t (*MinValueW32)(const int32_t* vector, size_t length);\nextern MinValueW32 WebRtcSpl_MinValueW32;\nint32_t WebRtcSpl_MinValueW32C(const int32_t* vector, size_t length);\n#if defined(WEBRTC_HAS_NEON)\nint32_t WebRtcSpl_MinValueW32Neon(const int32_t* vector, size_t length);\n#endif\n#if defined(MIPS32_LE)\nint32_t WebRtcSpl_MinValueW32_mips(const int32_t* vector, size_t length);\n#endif\n\n// Returns the vector index to the largest absolute value of a 16-bit vector.\n//\n// Input:\n//      - vector : 16-bit input vector.\n//      - length : Number of samples in vector.\n//\n// Return value  : Index to the maximum absolute value in vector.\n//                 If there are multiple equal maxima, return the index of the\n//                 first. -32768 will always have precedence over 32767 (despite\n//                 -32768 presenting an int16 absolute value of 32767).\nsize_t WebRtcSpl_MaxAbsIndexW16(const int16_t* vector, size_t length);\n\n// Returns the vector index to the maximum sample value of a 16-bit vector.\n//\n// Input:\n//      - vector : 16-bit input vector.\n//      - length : Number of samples in vector.\n//\n// Return value  : Index to the maximum value in vector (if multiple\n//                 indexes have the maximum, return the first).\nsize_t WebRtcSpl_MaxIndexW16(const int16_t* vector, size_t length);\n\n// Returns the vector index to the maximum sample value of a 32-bit vector.\n//\n// Input:\n//      - vector : 32-bit input vector.\n//      - length : Number of samples in vector.\n//\n// Return value  : Index to the maximum value in vector (if multiple\n//                 indexes have the maximum, return the first).\nsize_t WebRtcSpl_MaxIndexW32(const int32_t* vector, size_t length);\n\n// Returns the vector index to the minimum sample value of a 16-bit vector.\n//\n// Input:\n//      - vector : 16-bit input vector.\n//      - length : Number of samples in vector.\n//\n// Return value  : Index to the mimimum value in vector  (if multiple\n//                 indexes have the minimum, return the first).\nsize_t WebRtcSpl_MinIndexW16(const int16_t* vector, size_t length);\n\n// Returns the vector index to the minimum sample value of a 32-bit vector.\n//\n// Input:\n//      - vector : 32-bit input vector.\n//      - length : Number of samples in vector.\n//\n// Return value  : Index to the mimimum value in vector  (if multiple\n//                 indexes have the minimum, return the first).\nsize_t WebRtcSpl_MinIndexW32(const int32_t* vector, size_t length);\n\n// End: Minimum and maximum operations.\n\n\n// Vector scaling operations. Implementation in vector_scaling_operations.c.\n// Description at bottom of file.\nvoid WebRtcSpl_VectorBitShiftW16(int16_t* out_vector,\n                                 size_t vector_length,\n                                 const int16_t* in_vector,\n                                 int16_t right_shifts);\nvoid WebRtcSpl_VectorBitShiftW32(int32_t* out_vector,\n                                 size_t vector_length,\n                                 const int32_t* in_vector,\n                                 int16_t right_shifts);\nvoid WebRtcSpl_VectorBitShiftW32ToW16(int16_t* out_vector,\n                                      size_t vector_length,\n                                      const int32_t* in_vector,\n                                      int right_shifts);\nvoid WebRtcSpl_ScaleVector(const int16_t* in_vector,\n                           int16_t* out_vector,\n                           int16_t gain,\n                           size_t vector_length,\n                           int16_t right_shifts);\nvoid WebRtcSpl_ScaleVectorWithSat(const int16_t* in_vector,\n                                  int16_t* out_vector,\n                                  int16_t gain,\n                                  size_t vector_length,\n                                  int16_t right_shifts);\nvoid WebRtcSpl_ScaleAndAddVectors(const int16_t* in_vector1,\n                                  int16_t gain1, int right_shifts1,\n                                  const int16_t* in_vector2,\n                                  int16_t gain2, int right_shifts2,\n                                  int16_t* out_vector,\n                                  size_t vector_length);\n\n// The functions (with related pointer) perform the vector operation:\n//   out_vector[k] = ((scale1 * in_vector1[k]) + (scale2 * in_vector2[k])\n//        + round_value) >> right_shifts,\n//   where  round_value = (1 << right_shifts) >> 1.\n//\n// Input:\n//      - in_vector1       : Input vector 1\n//      - in_vector1_scale : Gain to be used for vector 1\n//      - in_vector2       : Input vector 2\n//      - in_vector2_scale : Gain to be used for vector 2\n//      - right_shifts     : Number of right bit shifts to be applied\n//      - length           : Number of elements in the input vectors\n//\n// Output:\n//      - out_vector       : Output vector\n// Return value            : 0 if OK, -1 if (in_vector1 == NULL\n//                           || in_vector2 == NULL || out_vector == NULL\n//                           || length <= 0 || right_shift < 0).\ntypedef int (*ScaleAndAddVectorsWithRound)(const int16_t* in_vector1,\n                                           int16_t in_vector1_scale,\n                                           const int16_t* in_vector2,\n                                           int16_t in_vector2_scale,\n                                           int right_shifts,\n                                           int16_t* out_vector,\n                                           size_t length);\nextern ScaleAndAddVectorsWithRound WebRtcSpl_ScaleAndAddVectorsWithRound;\nint WebRtcSpl_ScaleAndAddVectorsWithRoundC(const int16_t* in_vector1,\n                                           int16_t in_vector1_scale,\n                                           const int16_t* in_vector2,\n                                           int16_t in_vector2_scale,\n                                           int right_shifts,\n                                           int16_t* out_vector,\n                                           size_t length);\n#if defined(MIPS_DSP_R1_LE)\nint WebRtcSpl_ScaleAndAddVectorsWithRound_mips(const int16_t* in_vector1,\n                                               int16_t in_vector1_scale,\n                                               const int16_t* in_vector2,\n                                               int16_t in_vector2_scale,\n                                               int right_shifts,\n                                               int16_t* out_vector,\n                                               size_t length);\n#endif\n// End: Vector scaling operations.\n\n// iLBC specific functions. Implementations in ilbc_specific_functions.c.\n// Description at bottom of file.\nvoid WebRtcSpl_ReverseOrderMultArrayElements(int16_t* out_vector,\n                                             const int16_t* in_vector,\n                                             const int16_t* window,\n                                             size_t vector_length,\n                                             int16_t right_shifts);\nvoid WebRtcSpl_ElementwiseVectorMult(int16_t* out_vector,\n                                     const int16_t* in_vector,\n                                     const int16_t* window,\n                                     size_t vector_length,\n                                     int16_t right_shifts);\nvoid WebRtcSpl_AddVectorsAndShift(int16_t* out_vector,\n                                  const int16_t* in_vector1,\n                                  const int16_t* in_vector2,\n                                  size_t vector_length,\n                                  int16_t right_shifts);\nvoid WebRtcSpl_AddAffineVectorToVector(int16_t* out_vector,\n                                       int16_t* in_vector,\n                                       int16_t gain,\n                                       int32_t add_constant,\n                                       int16_t right_shifts,\n                                       size_t vector_length);\nvoid WebRtcSpl_AffineTransformVector(int16_t* out_vector,\n                                     int16_t* in_vector,\n                                     int16_t gain,\n                                     int32_t add_constant,\n                                     int16_t right_shifts,\n                                     size_t vector_length);\n// End: iLBC specific functions.\n\n// Signal processing operations.\n\n// A 32-bit fix-point implementation of auto-correlation computation\n//\n// Input:\n//      - in_vector        : Vector to calculate autocorrelation upon\n//      - in_vector_length : Length (in samples) of |vector|\n//      - order            : The order up to which the autocorrelation should be\n//                           calculated\n//\n// Output:\n//      - result           : auto-correlation values (values should be seen\n//                           relative to each other since the absolute values\n//                           might have been down shifted to avoid overflow)\n//\n//      - scale            : The number of left shifts required to obtain the\n//                           auto-correlation in Q0\n//\n// Return value            : Number of samples in |result|, i.e. (order+1)\nsize_t WebRtcSpl_AutoCorrelation(const int16_t* in_vector,\n                                 size_t in_vector_length,\n                                 size_t order,\n                                 int32_t* result,\n                                 int* scale);\n\n// A 32-bit fix-point implementation of the Levinson-Durbin algorithm that\n// does NOT use the 64 bit class\n//\n// Input:\n//      - auto_corr : Vector with autocorrelation values of length >= |order|+1\n//      - order     : The LPC filter order (support up to order 20)\n//\n// Output:\n//      - lpc_coef  : lpc_coef[0..order] LPC coefficients in Q12\n//      - refl_coef : refl_coef[0...order-1]| Reflection coefficients in Q15\n//\n// Return value     : 1 for stable 0 for unstable\nint16_t WebRtcSpl_LevinsonDurbin(const int32_t* auto_corr,\n                                 int16_t* lpc_coef,\n                                 int16_t* refl_coef,\n                                 size_t order);\n\n// Converts reflection coefficients |refl_coef| to LPC coefficients |lpc_coef|.\n// This version is a 16 bit operation.\n//\n// NOTE: The 16 bit refl_coef -> lpc_coef conversion might result in a\n// \"slightly unstable\" filter (i.e., a pole just outside the unit circle) in\n// \"rare\" cases even if the reflection coefficients are stable.\n//\n// Input:\n//      - refl_coef : Reflection coefficients in Q15 that should be converted\n//                    to LPC coefficients\n//      - use_order : Number of coefficients in |refl_coef|\n//\n// Output:\n//      - lpc_coef  : LPC coefficients in Q12\nvoid WebRtcSpl_ReflCoefToLpc(const int16_t* refl_coef,\n                             int use_order,\n                             int16_t* lpc_coef);\n\n// Converts LPC coefficients |lpc_coef| to reflection coefficients |refl_coef|.\n// This version is a 16 bit operation.\n// The conversion is implemented by the step-down algorithm.\n//\n// Input:\n//      - lpc_coef  : LPC coefficients in Q12, that should be converted to\n//                    reflection coefficients\n//      - use_order : Number of coefficients in |lpc_coef|\n//\n// Output:\n//      - refl_coef : Reflection coefficients in Q15.\nvoid WebRtcSpl_LpcToReflCoef(int16_t* lpc_coef,\n                             int use_order,\n                             int16_t* refl_coef);\n\n// Calculates reflection coefficients (16 bit) from auto-correlation values\n//\n// Input:\n//      - auto_corr : Auto-correlation values\n//      - use_order : Number of coefficients wanted be calculated\n//\n// Output:\n//      - refl_coef : Reflection coefficients in Q15.\nvoid WebRtcSpl_AutoCorrToReflCoef(const int32_t* auto_corr,\n                                  int use_order,\n                                  int16_t* refl_coef);\n\n// The functions (with related pointer) calculate the cross-correlation between\n// two sequences |seq1| and |seq2|.\n// |seq1| is fixed and |seq2| slides as the pointer is increased with the\n// amount |step_seq2|. Note the arguments should obey the relationship:\n// |dim_seq| - 1 + |step_seq2| * (|dim_cross_correlation| - 1) <\n//      buffer size of |seq2|\n//\n// Input:\n//      - seq1           : First sequence (fixed throughout the correlation)\n//      - seq2           : Second sequence (slides |step_vector2| for each\n//                            new correlation)\n//      - dim_seq        : Number of samples to use in the cross-correlation\n//      - dim_cross_correlation : Number of cross-correlations to calculate (the\n//                            start position for |vector2| is updated for each\n//                            new one)\n//      - right_shifts   : Number of right bit shifts to use. This will\n//                            become the output Q-domain.\n//      - step_seq2      : How many (positive or negative) steps the\n//                            |vector2| pointer should be updated for each new\n//                            cross-correlation value.\n//\n// Output:\n//      - cross_correlation : The cross-correlation in Q(-right_shifts)\ntypedef void (*CrossCorrelation)(int32_t* cross_correlation,\n                                 const int16_t* seq1,\n                                 const int16_t* seq2,\n                                 size_t dim_seq,\n                                 size_t dim_cross_correlation,\n                                 int right_shifts,\n                                 int step_seq2);\nextern CrossCorrelation WebRtcSpl_CrossCorrelation;\nvoid WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation,\n                                 const int16_t* seq1,\n                                 const int16_t* seq2,\n                                 size_t dim_seq,\n                                 size_t dim_cross_correlation,\n                                 int right_shifts,\n                                 int step_seq2);\n#if defined(WEBRTC_HAS_NEON)\nvoid WebRtcSpl_CrossCorrelationNeon(int32_t* cross_correlation,\n                                    const int16_t* seq1,\n                                    const int16_t* seq2,\n                                    size_t dim_seq,\n                                    size_t dim_cross_correlation,\n                                    int right_shifts,\n                                    int step_seq2);\n#endif\n#if defined(MIPS32_LE)\nvoid WebRtcSpl_CrossCorrelation_mips(int32_t* cross_correlation,\n                                     const int16_t* seq1,\n                                     const int16_t* seq2,\n                                     size_t dim_seq,\n                                     size_t dim_cross_correlation,\n                                     int right_shifts,\n                                     int step_seq2);\n#endif\n\n// Creates (the first half of) a Hanning window. Size must be at least 1 and\n// at most 512.\n//\n// Input:\n//      - size      : Length of the requested Hanning window (1 to 512)\n//\n// Output:\n//      - window    : Hanning vector in Q14.\nvoid WebRtcSpl_GetHanningWindow(int16_t* window, size_t size);\n\n// Calculates y[k] = sqrt(1 - x[k]^2) for each element of the input vector\n// |in_vector|. Input and output values are in Q15.\n//\n// Inputs:\n//      - in_vector     : Values to calculate sqrt(1 - x^2) of\n//      - vector_length : Length of vector |in_vector|\n//\n// Output:\n//      - out_vector    : Output values in Q15\nvoid WebRtcSpl_SqrtOfOneMinusXSquared(int16_t* in_vector,\n                                      size_t vector_length,\n                                      int16_t* out_vector);\n// End: Signal processing operations.\n\n// Randomization functions. Implementations collected in\n// randomization_functions.c and descriptions at bottom of this file.\nint16_t WebRtcSpl_RandU(uint32_t* seed);\nint16_t WebRtcSpl_RandN(uint32_t* seed);\nint16_t WebRtcSpl_RandUArray(int16_t* vector,\n                             int16_t vector_length,\n                             uint32_t* seed);\n// End: Randomization functions.\n\n// Math functions\nint32_t WebRtcSpl_Sqrt(int32_t value);\nint32_t WebRtcSpl_SqrtFloor(int32_t value);\n\n// Divisions. Implementations collected in division_operations.c and\n// descriptions at bottom of this file.\nuint32_t WebRtcSpl_DivU32U16(uint32_t num, uint16_t den);\nint32_t WebRtcSpl_DivW32W16(int32_t num, int16_t den);\nint16_t WebRtcSpl_DivW32W16ResW16(int32_t num, int16_t den);\nint32_t WebRtcSpl_DivResultInQ31(int32_t num, int32_t den);\nint32_t WebRtcSpl_DivW32HiLow(int32_t num, int16_t den_hi, int16_t den_low);\n// End: Divisions.\n\nint32_t WebRtcSpl_Energy(int16_t* vector,\n                         size_t vector_length,\n                         int* scale_factor);\n\n// Calculates the dot product between two (int16_t) vectors.\n//\n// Input:\n//      - vector1       : Vector 1\n//      - vector2       : Vector 2\n//      - vector_length : Number of samples used in the dot product\n//      - scaling       : The number of right bit shifts to apply on each term\n//                        during calculation to avoid overflow, i.e., the\n//                        output will be in Q(-|scaling|)\n//\n// Return value         : The dot product in Q(-scaling)\nint32_t WebRtcSpl_DotProductWithScale(const int16_t* vector1,\n                                      const int16_t* vector2,\n                                      size_t length,\n                                      int scaling);\n\n// Filter operations.\nsize_t WebRtcSpl_FilterAR(const int16_t* ar_coef,\n                          size_t ar_coef_length,\n                          const int16_t* in_vector,\n                          size_t in_vector_length,\n                          int16_t* filter_state,\n                          size_t filter_state_length,\n                          int16_t* filter_state_low,\n                          size_t filter_state_low_length,\n                          int16_t* out_vector,\n                          int16_t* out_vector_low,\n                          size_t out_vector_low_length);\n\n// WebRtcSpl_FilterMAFastQ12(...)\n//\n// Performs a MA filtering on a vector in Q12\n//\n// Input:\n//      - in_vector         : Input samples (state in positions\n//                            in_vector[-order] .. in_vector[-1])\n//      - ma_coef           : Filter coefficients (in Q12)\n//      - ma_coef_length    : Number of B coefficients (order+1)\n//      - vector_length     : Number of samples to be filtered\n//\n// Output:\n//      - out_vector        : Filtered samples\n//\nvoid WebRtcSpl_FilterMAFastQ12(const int16_t* in_vector,\n                               int16_t* out_vector,\n                               const int16_t* ma_coef,\n                               size_t ma_coef_length,\n                               size_t vector_length);\n\n// Performs a AR filtering on a vector in Q12\n// Input:\n//      - data_in            : Input samples\n//      - data_out           : State information in positions\n//                               data_out[-order] .. data_out[-1]\n//      - coefficients       : Filter coefficients (in Q12)\n//      - coefficients_length: Number of coefficients (order+1)\n//      - data_length        : Number of samples to be filtered\n// Output:\n//      - data_out           : Filtered samples\nvoid WebRtcSpl_FilterARFastQ12(const int16_t* data_in,\n                               int16_t* data_out,\n                               const int16_t* __restrict coefficients,\n                               size_t coefficients_length,\n                               size_t data_length);\n\n// The functions (with related pointer) perform a MA down sampling filter\n// on a vector.\n// Input:\n//      - data_in            : Input samples (state in positions\n//                               data_in[-order] .. data_in[-1])\n//      - data_in_length     : Number of samples in |data_in| to be filtered.\n//                               This must be at least\n//                               |delay| + |factor|*(|out_vector_length|-1) + 1)\n//      - data_out_length    : Number of down sampled samples desired\n//      - coefficients       : Filter coefficients (in Q12)\n//      - coefficients_length: Number of coefficients (order+1)\n//      - factor             : Decimation factor\n//      - delay              : Delay of filter (compensated for in out_vector)\n// Output:\n//      - data_out           : Filtered samples\n// Return value              : 0 if OK, -1 if |in_vector| is too short\ntypedef int (*DownsampleFast)(const int16_t* data_in,\n                              size_t data_in_length,\n                              int16_t* data_out,\n                              size_t data_out_length,\n                              const int16_t* __restrict coefficients,\n                              size_t coefficients_length,\n                              int factor,\n                              size_t delay);\nextern DownsampleFast WebRtcSpl_DownsampleFast;\nint WebRtcSpl_DownsampleFastC(const int16_t* data_in,\n                              size_t data_in_length,\n                              int16_t* data_out,\n                              size_t data_out_length,\n                              const int16_t* __restrict coefficients,\n                              size_t coefficients_length,\n                              int factor,\n                              size_t delay);\n#if defined(WEBRTC_HAS_NEON)\nint WebRtcSpl_DownsampleFastNeon(const int16_t* data_in,\n                                 size_t data_in_length,\n                                 int16_t* data_out,\n                                 size_t data_out_length,\n                                 const int16_t* __restrict coefficients,\n                                 size_t coefficients_length,\n                                 int factor,\n                                 size_t delay);\n#endif\n#if defined(MIPS32_LE)\nint WebRtcSpl_DownsampleFast_mips(const int16_t* data_in,\n                                  size_t data_in_length,\n                                  int16_t* data_out,\n                                  size_t data_out_length,\n                                  const int16_t* __restrict coefficients,\n                                  size_t coefficients_length,\n                                  int factor,\n                                  size_t delay);\n#endif\n\n// End: Filter operations.\n\n// FFT operations\n\nint WebRtcSpl_ComplexFFT(int16_t vector[], int stages, int mode);\nint WebRtcSpl_ComplexIFFT(int16_t vector[], int stages, int mode);\n\n// Treat a 16-bit complex data buffer |complex_data| as an array of 32-bit\n// values, and swap elements whose indexes are bit-reverses of each other.\n//\n// Input:\n//      - complex_data  : Complex data buffer containing 2^|stages| real\n//                        elements interleaved with 2^|stages| imaginary\n//                        elements: [Re Im Re Im Re Im....]\n//      - stages        : Number of FFT stages. Must be at least 3 and at most\n//                        10, since the table WebRtcSpl_kSinTable1024[] is 1024\n//                        elements long.\n//\n// Output:\n//      - complex_data  : The complex data buffer.\n\nvoid WebRtcSpl_ComplexBitReverse(int16_t* __restrict complex_data, int stages);\n\n// End: FFT operations\n\n/************************************************************\n *\n * RESAMPLING FUNCTIONS AND THEIR STRUCTS ARE DEFINED BELOW\n *\n ************************************************************/\n\n/*******************************************************************\n * resample.c\n *\n * Includes the following resampling combinations\n * 22 kHz -> 16 kHz\n * 16 kHz -> 22 kHz\n * 22 kHz ->  8 kHz\n *  8 kHz -> 22 kHz\n *\n ******************************************************************/\n\n// state structure for 22 -> 16 resampler\ntypedef struct {\n  int32_t S_22_44[8];\n  int32_t S_44_32[8];\n  int32_t S_32_16[8];\n} WebRtcSpl_State22khzTo16khz;\n\nvoid WebRtcSpl_Resample22khzTo16khz(const int16_t* in,\n                                    int16_t* out,\n                                    WebRtcSpl_State22khzTo16khz* state,\n                                    int32_t* tmpmem);\n\nvoid WebRtcSpl_ResetResample22khzTo16khz(WebRtcSpl_State22khzTo16khz* state);\n\n// state structure for 16 -> 22 resampler\ntypedef struct {\n  int32_t S_16_32[8];\n  int32_t S_32_22[8];\n} WebRtcSpl_State16khzTo22khz;\n\nvoid WebRtcSpl_Resample16khzTo22khz(const int16_t* in,\n                                    int16_t* out,\n                                    WebRtcSpl_State16khzTo22khz* state,\n                                    int32_t* tmpmem);\n\nvoid WebRtcSpl_ResetResample16khzTo22khz(WebRtcSpl_State16khzTo22khz* state);\n\n// state structure for 22 -> 8 resampler\ntypedef struct {\n  int32_t S_22_22[16];\n  int32_t S_22_16[8];\n  int32_t S_16_8[8];\n} WebRtcSpl_State22khzTo8khz;\n\nvoid WebRtcSpl_Resample22khzTo8khz(const int16_t* in, int16_t* out,\n                                   WebRtcSpl_State22khzTo8khz* state,\n                                   int32_t* tmpmem);\n\nvoid WebRtcSpl_ResetResample22khzTo8khz(WebRtcSpl_State22khzTo8khz* state);\n\n// state structure for 8 -> 22 resampler\ntypedef struct {\n  int32_t S_8_16[8];\n  int32_t S_16_11[8];\n  int32_t S_11_22[8];\n} WebRtcSpl_State8khzTo22khz;\n\nvoid WebRtcSpl_Resample8khzTo22khz(const int16_t* in, int16_t* out,\n                                   WebRtcSpl_State8khzTo22khz* state,\n                                   int32_t* tmpmem);\n\nvoid WebRtcSpl_ResetResample8khzTo22khz(WebRtcSpl_State8khzTo22khz* state);\n\n/*******************************************************************\n * resample_fractional.c\n * Functions for internal use in the other resample functions\n *\n * Includes the following resampling combinations\n * 48 kHz -> 32 kHz\n * 32 kHz -> 24 kHz\n * 44 kHz -> 32 kHz\n *\n ******************************************************************/\n\nvoid WebRtcSpl_Resample48khzTo32khz(const int32_t* In, int32_t* Out, size_t K);\n\nvoid WebRtcSpl_Resample32khzTo24khz(const int32_t* In, int32_t* Out, size_t K);\n\nvoid WebRtcSpl_Resample44khzTo32khz(const int32_t* In, int32_t* Out, size_t K);\n\n/*******************************************************************\n * resample_48khz.c\n *\n * Includes the following resampling combinations\n * 48 kHz -> 16 kHz\n * 16 kHz -> 48 kHz\n * 48 kHz ->  8 kHz\n *  8 kHz -> 48 kHz\n *\n ******************************************************************/\n\ntypedef struct {\n  int32_t S_48_48[16];\n  int32_t S_48_32[8];\n  int32_t S_32_16[8];\n} WebRtcSpl_State48khzTo16khz;\n\nvoid WebRtcSpl_Resample48khzTo16khz(const int16_t* in, int16_t* out,\n                                    WebRtcSpl_State48khzTo16khz* state,\n                                    int32_t* tmpmem);\n\nvoid WebRtcSpl_ResetResample48khzTo16khz(WebRtcSpl_State48khzTo16khz* state);\n\ntypedef struct {\n  int32_t S_16_32[8];\n  int32_t S_32_24[8];\n  int32_t S_24_48[8];\n} WebRtcSpl_State16khzTo48khz;\n\nvoid WebRtcSpl_Resample16khzTo48khz(const int16_t* in, int16_t* out,\n                                    WebRtcSpl_State16khzTo48khz* state,\n                                    int32_t* tmpmem);\n\nvoid WebRtcSpl_ResetResample16khzTo48khz(WebRtcSpl_State16khzTo48khz* state);\n\ntypedef struct {\n  int32_t S_48_24[8];\n  int32_t S_24_24[16];\n  int32_t S_24_16[8];\n  int32_t S_16_8[8];\n} WebRtcSpl_State48khzTo8khz;\n\nvoid WebRtcSpl_Resample48khzTo8khz(const int16_t* in, int16_t* out,\n                                   WebRtcSpl_State48khzTo8khz* state,\n                                   int32_t* tmpmem);\n\nvoid WebRtcSpl_ResetResample48khzTo8khz(WebRtcSpl_State48khzTo8khz* state);\n\ntypedef struct {\n  int32_t S_8_16[8];\n  int32_t S_16_12[8];\n  int32_t S_12_24[8];\n  int32_t S_24_48[8];\n} WebRtcSpl_State8khzTo48khz;\n\nvoid WebRtcSpl_Resample8khzTo48khz(const int16_t* in, int16_t* out,\n                                   WebRtcSpl_State8khzTo48khz* state,\n                                   int32_t* tmpmem);\n\nvoid WebRtcSpl_ResetResample8khzTo48khz(WebRtcSpl_State8khzTo48khz* state);\n\n/*******************************************************************\n * resample_by_2.c\n *\n * Includes down and up sampling by a factor of two.\n *\n ******************************************************************/\n\nvoid WebRtcSpl_DownsampleBy2(const int16_t* in, size_t len,\n                             int16_t* out, int32_t* filtState);\n\nvoid WebRtcSpl_UpsampleBy2(const int16_t* in, size_t len,\n                           int16_t* out, int32_t* filtState);\n\n/************************************************************\n * END OF RESAMPLING FUNCTIONS\n ************************************************************/\nvoid WebRtcSpl_AnalysisQMF(const int16_t* in_data,\n                           size_t in_data_length,\n                           int16_t* low_band,\n                           int16_t* high_band,\n                           int32_t* filter_state1,\n                           int32_t* filter_state2);\nvoid WebRtcSpl_SynthesisQMF(const int16_t* low_band,\n                            const int16_t* high_band,\n                            size_t band_length,\n                            int16_t* out_data,\n                            int32_t* filter_state1,\n                            int32_t* filter_state2);\n\n#ifdef __cplusplus\n}\n#endif  // __cplusplus\n#endif  // WEBRTC_SPL_SIGNAL_PROCESSING_LIBRARY_H_\n\n//\n// WebRtcSpl_AddSatW16(...)\n// WebRtcSpl_AddSatW32(...)\n//\n// Returns the result of a saturated 16-bit, respectively 32-bit, addition of\n// the numbers specified by the |var1| and |var2| parameters.\n//\n// Input:\n//      - var1      : Input variable 1\n//      - var2      : Input variable 2\n//\n// Return value     : Added and saturated value\n//\n\n//\n// WebRtcSpl_SubSatW16(...)\n// WebRtcSpl_SubSatW32(...)\n//\n// Returns the result of a saturated 16-bit, respectively 32-bit, subtraction\n// of the numbers specified by the |var1| and |var2| parameters.\n//\n// Input:\n//      - var1      : Input variable 1\n//      - var2      : Input variable 2\n//\n// Returned value   : Subtracted and saturated value\n//\n\n//\n// WebRtcSpl_GetSizeInBits(...)\n//\n// Returns the # of bits that are needed at the most to represent the number\n// specified by the |value| parameter.\n//\n// Input:\n//      - value     : Input value\n//\n// Return value     : Number of bits needed to represent |value|\n//\n\n//\n// WebRtcSpl_NormW32(...)\n//\n// Norm returns the # of left shifts required to 32-bit normalize the 32-bit\n// signed number specified by the |value| parameter.\n//\n// Input:\n//      - value     : Input value\n//\n// Return value     : Number of bit shifts needed to 32-bit normalize |value|\n//\n\n//\n// WebRtcSpl_NormW16(...)\n//\n// Norm returns the # of left shifts required to 16-bit normalize the 16-bit\n// signed number specified by the |value| parameter.\n//\n// Input:\n//      - value     : Input value\n//\n// Return value     : Number of bit shifts needed to 32-bit normalize |value|\n//\n\n//\n// WebRtcSpl_NormU32(...)\n//\n// Norm returns the # of left shifts required to 32-bit normalize the unsigned\n// 32-bit number specified by the |value| parameter.\n//\n// Input:\n//      - value     : Input value\n//\n// Return value     : Number of bit shifts needed to 32-bit normalize |value|\n//\n\n//\n// WebRtcSpl_GetScalingSquare(...)\n//\n// Returns the # of bits required to scale the samples specified in the\n// |in_vector| parameter so that, if the squares of the samples are added the\n// # of times specified by the |times| parameter, the 32-bit addition will not\n// overflow (result in int32_t).\n//\n// Input:\n//      - in_vector         : Input vector to check scaling on\n//      - in_vector_length  : Samples in |in_vector|\n//      - times             : Number of additions to be performed\n//\n// Return value             : Number of right bit shifts needed to avoid\n//                            overflow in the addition calculation\n//\n\n//\n// WebRtcSpl_MemSetW16(...)\n//\n// Sets all the values in the int16_t vector |vector| of length\n// |vector_length| to the specified value |set_value|\n//\n// Input:\n//      - vector        : Pointer to the int16_t vector\n//      - set_value     : Value specified\n//      - vector_length : Length of vector\n//\n\n//\n// WebRtcSpl_MemSetW32(...)\n//\n// Sets all the values in the int32_t vector |vector| of length\n// |vector_length| to the specified value |set_value|\n//\n// Input:\n//      - vector        : Pointer to the int16_t vector\n//      - set_value     : Value specified\n//      - vector_length : Length of vector\n//\n\n//\n// WebRtcSpl_MemCpyReversedOrder(...)\n//\n// Copies all the values from the source int16_t vector |in_vector| to a\n// destination int16_t vector |out_vector|. It is done in reversed order,\n// meaning that the first sample of |in_vector| is copied to the last sample of\n// the |out_vector|. The procedure continues until the last sample of\n// |in_vector| has been copied to the first sample of |out_vector|. This\n// creates a reversed vector. Used in e.g. prediction in iLBC.\n//\n// Input:\n//      - in_vector     : Pointer to the first sample in a int16_t vector\n//                        of length |length|\n//      - vector_length : Number of elements to copy\n//\n// Output:\n//      - out_vector    : Pointer to the last sample in a int16_t vector\n//                        of length |length|\n//\n\n//\n// WebRtcSpl_CopyFromEndW16(...)\n//\n// Copies the rightmost |samples| of |in_vector| (of length |in_vector_length|)\n// to the vector |out_vector|.\n//\n// Input:\n//      - in_vector         : Input vector\n//      - in_vector_length  : Number of samples in |in_vector|\n//      - samples           : Number of samples to extract (from right side)\n//                            from |in_vector|\n//\n// Output:\n//      - out_vector        : Vector with the requested samples\n//\n\n//\n// WebRtcSpl_ZerosArrayW16(...)\n// WebRtcSpl_ZerosArrayW32(...)\n//\n// Inserts the value \"zero\" in all positions of a w16 and a w32 vector\n// respectively.\n//\n// Input:\n//      - vector_length : Number of samples in vector\n//\n// Output:\n//      - vector        : Vector containing all zeros\n//\n\n//\n// WebRtcSpl_VectorBitShiftW16(...)\n// WebRtcSpl_VectorBitShiftW32(...)\n//\n// Bit shifts all the values in a vector up or downwards. Different calls for\n// int16_t and int32_t vectors respectively.\n//\n// Input:\n//      - vector_length : Length of vector\n//      - in_vector     : Pointer to the vector that should be bit shifted\n//      - right_shifts  : Number of right bit shifts (negative value gives left\n//                        shifts)\n//\n// Output:\n//      - out_vector    : Pointer to the result vector (can be the same as\n//                        |in_vector|)\n//\n\n//\n// WebRtcSpl_VectorBitShiftW32ToW16(...)\n//\n// Bit shifts all the values in a int32_t vector up or downwards and\n// stores the result as an int16_t vector. The function will saturate the\n// signal if needed, before storing in the output vector.\n//\n// Input:\n//      - vector_length : Length of vector\n//      - in_vector     : Pointer to the vector that should be bit shifted\n//      - right_shifts  : Number of right bit shifts (negative value gives left\n//                        shifts)\n//\n// Output:\n//      - out_vector    : Pointer to the result vector (can be the same as\n//                        |in_vector|)\n//\n\n//\n// WebRtcSpl_ScaleVector(...)\n//\n// Performs the vector operation:\n//  out_vector[k] = (gain*in_vector[k])>>right_shifts\n//\n// Input:\n//      - in_vector     : Input vector\n//      - gain          : Scaling gain\n//      - vector_length : Elements in the |in_vector|\n//      - right_shifts  : Number of right bit shifts applied\n//\n// Output:\n//      - out_vector    : Output vector (can be the same as |in_vector|)\n//\n\n//\n// WebRtcSpl_ScaleVectorWithSat(...)\n//\n// Performs the vector operation:\n//  out_vector[k] = SATURATE( (gain*in_vector[k])>>right_shifts )\n//\n// Input:\n//      - in_vector     : Input vector\n//      - gain          : Scaling gain\n//      - vector_length : Elements in the |in_vector|\n//      - right_shifts  : Number of right bit shifts applied\n//\n// Output:\n//      - out_vector    : Output vector (can be the same as |in_vector|)\n//\n\n//\n// WebRtcSpl_ScaleAndAddVectors(...)\n//\n// Performs the vector operation:\n//  out_vector[k] = (gain1*in_vector1[k])>>right_shifts1\n//                  + (gain2*in_vector2[k])>>right_shifts2\n//\n// Input:\n//      - in_vector1    : Input vector 1\n//      - gain1         : Gain to be used for vector 1\n//      - right_shifts1 : Right bit shift to be used for vector 1\n//      - in_vector2    : Input vector 2\n//      - gain2         : Gain to be used for vector 2\n//      - right_shifts2 : Right bit shift to be used for vector 2\n//      - vector_length : Elements in the input vectors\n//\n// Output:\n//      - out_vector    : Output vector\n//\n\n//\n// WebRtcSpl_ReverseOrderMultArrayElements(...)\n//\n// Performs the vector operation:\n//  out_vector[n] = (in_vector[n]*window[-n])>>right_shifts\n//\n// Input:\n//      - in_vector     : Input vector\n//      - window        : Window vector (should be reversed). The pointer\n//                        should be set to the last value in the vector\n//      - right_shifts  : Number of right bit shift to be applied after the\n//                        multiplication\n//      - vector_length : Number of elements in |in_vector|\n//\n// Output:\n//      - out_vector    : Output vector (can be same as |in_vector|)\n//\n\n//\n// WebRtcSpl_ElementwiseVectorMult(...)\n//\n// Performs the vector operation:\n//  out_vector[n] = (in_vector[n]*window[n])>>right_shifts\n//\n// Input:\n//      - in_vector     : Input vector\n//      - window        : Window vector.\n//      - right_shifts  : Number of right bit shift to be applied after the\n//                        multiplication\n//      - vector_length : Number of elements in |in_vector|\n//\n// Output:\n//      - out_vector    : Output vector (can be same as |in_vector|)\n//\n\n//\n// WebRtcSpl_AddVectorsAndShift(...)\n//\n// Performs the vector operation:\n//  out_vector[k] = (in_vector1[k] + in_vector2[k])>>right_shifts\n//\n// Input:\n//      - in_vector1    : Input vector 1\n//      - in_vector2    : Input vector 2\n//      - right_shifts  : Number of right bit shift to be applied after the\n//                        multiplication\n//      - vector_length : Number of elements in |in_vector1| and |in_vector2|\n//\n// Output:\n//      - out_vector    : Output vector (can be same as |in_vector1|)\n//\n\n//\n// WebRtcSpl_AddAffineVectorToVector(...)\n//\n// Adds an affine transformed vector to another vector |out_vector|, i.e,\n// performs\n//  out_vector[k] += (in_vector[k]*gain+add_constant)>>right_shifts\n//\n// Input:\n//      - in_vector     : Input vector\n//      - gain          : Gain value, used to multiply the in vector with\n//      - add_constant  : Constant value to add (usually 1<<(right_shifts-1),\n//                        but others can be used as well\n//      - right_shifts  : Number of right bit shifts (0-16)\n//      - vector_length : Number of samples in |in_vector| and |out_vector|\n//\n// Output:\n//      - out_vector    : Vector with the output\n//\n\n//\n// WebRtcSpl_AffineTransformVector(...)\n//\n// Affine transforms a vector, i.e, performs\n//  out_vector[k] = (in_vector[k]*gain+add_constant)>>right_shifts\n//\n// Input:\n//      - in_vector     : Input vector\n//      - gain          : Gain value, used to multiply the in vector with\n//      - add_constant  : Constant value to add (usually 1<<(right_shifts-1),\n//                        but others can be used as well\n//      - right_shifts  : Number of right bit shifts (0-16)\n//      - vector_length : Number of samples in |in_vector| and |out_vector|\n//\n// Output:\n//      - out_vector    : Vector with the output\n//\n\n//\n// WebRtcSpl_IncreaseSeed(...)\n//\n// Increases the seed (and returns the new value)\n//\n// Input:\n//      - seed      : Seed for random calculation\n//\n// Output:\n//      - seed      : Updated seed value\n//\n// Return value     : The new seed value\n//\n\n//\n// WebRtcSpl_RandU(...)\n//\n// Produces a uniformly distributed value in the int16_t range\n//\n// Input:\n//      - seed      : Seed for random calculation\n//\n// Output:\n//      - seed      : Updated seed value\n//\n// Return value     : Uniformly distributed value in the range\n//                    [Word16_MIN...Word16_MAX]\n//\n\n//\n// WebRtcSpl_RandN(...)\n//\n// Produces a normal distributed value in the int16_t range\n//\n// Input:\n//      - seed      : Seed for random calculation\n//\n// Output:\n//      - seed      : Updated seed value\n//\n// Return value     : N(0,1) value in the Q13 domain\n//\n\n//\n// WebRtcSpl_RandUArray(...)\n//\n// Produces a uniformly distributed vector with elements in the int16_t\n// range\n//\n// Input:\n//      - vector_length : Samples wanted in the vector\n//      - seed          : Seed for random calculation\n//\n// Output:\n//      - vector        : Vector with the uniform values\n//      - seed          : Updated seed value\n//\n// Return value         : Number of samples in vector, i.e., |vector_length|\n//\n\n//\n// WebRtcSpl_Sqrt(...)\n//\n// Returns the square root of the input value |value|. The precision of this\n// function is integer precision, i.e., sqrt(8) gives 2 as answer.\n// If |value| is a negative number then 0 is returned.\n//\n// Algorithm:\n//\n// A sixth order Taylor Series expansion is used here to compute the square\n// root of a number y^0.5 = (1+x)^0.5\n// where\n// x = y-1\n//   = 1+(x/2)-0.5*((x/2)^2+0.5*((x/2)^3-0.625*((x/2)^4+0.875*((x/2)^5)\n// 0.5 <= x < 1\n//\n// Input:\n//      - value     : Value to calculate sqrt of\n//\n// Return value     : Result of the sqrt calculation\n//\n\n//\n// WebRtcSpl_SqrtFloor(...)\n//\n// Returns the square root of the input value |value|. The precision of this\n// function is rounding down integer precision, i.e., sqrt(8) gives 2 as answer.\n// If |value| is a negative number then 0 is returned.\n//\n// Algorithm:\n//\n// An iterative 4 cylce/bit routine\n//\n// Input:\n//      - value     : Value to calculate sqrt of\n//\n// Return value     : Result of the sqrt calculation\n//\n\n//\n// WebRtcSpl_DivU32U16(...)\n//\n// Divides a uint32_t |num| by a uint16_t |den|.\n//\n// If |den|==0, (uint32_t)0xFFFFFFFF is returned.\n//\n// Input:\n//      - num       : Numerator\n//      - den       : Denominator\n//\n// Return value     : Result of the division (as a uint32_t), i.e., the\n//                    integer part of num/den.\n//\n\n//\n// WebRtcSpl_DivW32W16(...)\n//\n// Divides a int32_t |num| by a int16_t |den|.\n//\n// If |den|==0, (int32_t)0x7FFFFFFF is returned.\n//\n// Input:\n//      - num       : Numerator\n//      - den       : Denominator\n//\n// Return value     : Result of the division (as a int32_t), i.e., the\n//                    integer part of num/den.\n//\n\n//\n// WebRtcSpl_DivW32W16ResW16(...)\n//\n// Divides a int32_t |num| by a int16_t |den|, assuming that the\n// result is less than 32768, otherwise an unpredictable result will occur.\n//\n// If |den|==0, (int16_t)0x7FFF is returned.\n//\n// Input:\n//      - num       : Numerator\n//      - den       : Denominator\n//\n// Return value     : Result of the division (as a int16_t), i.e., the\n//                    integer part of num/den.\n//\n\n//\n// WebRtcSpl_DivResultInQ31(...)\n//\n// Divides a int32_t |num| by a int16_t |den|, assuming that the\n// absolute value of the denominator is larger than the numerator, otherwise\n// an unpredictable result will occur.\n//\n// Input:\n//      - num       : Numerator\n//      - den       : Denominator\n//\n// Return value     : Result of the division in Q31.\n//\n\n//\n// WebRtcSpl_DivW32HiLow(...)\n//\n// Divides a int32_t |num| by a denominator in hi, low format. The\n// absolute value of the denominator has to be larger (or equal to) the\n// numerator.\n//\n// Input:\n//      - num       : Numerator\n//      - den_hi    : High part of denominator\n//      - den_low   : Low part of denominator\n//\n// Return value     : Divided value in Q31\n//\n\n//\n// WebRtcSpl_Energy(...)\n//\n// Calculates the energy of a vector\n//\n// Input:\n//      - vector        : Vector which the energy should be calculated on\n//      - vector_length : Number of samples in vector\n//\n// Output:\n//      - scale_factor  : Number of left bit shifts needed to get the physical\n//                        energy value, i.e, to get the Q0 value\n//\n// Return value         : Energy value in Q(-|scale_factor|)\n//\n\n//\n// WebRtcSpl_FilterAR(...)\n//\n// Performs a 32-bit AR filtering on a vector in Q12\n//\n// Input:\n//  - ar_coef                   : AR-coefficient vector (values in Q12),\n//                                ar_coef[0] must be 4096.\n//  - ar_coef_length            : Number of coefficients in |ar_coef|.\n//  - in_vector                 : Vector to be filtered.\n//  - in_vector_length          : Number of samples in |in_vector|.\n//  - filter_state              : Current state (higher part) of the filter.\n//  - filter_state_length       : Length (in samples) of |filter_state|.\n//  - filter_state_low          : Current state (lower part) of the filter.\n//  - filter_state_low_length   : Length (in samples) of |filter_state_low|.\n//  - out_vector_low_length     : Maximum length (in samples) of\n//                                |out_vector_low|.\n//\n// Output:\n//  - filter_state              : Updated state (upper part) vector.\n//  - filter_state_low          : Updated state (lower part) vector.\n//  - out_vector                : Vector containing the upper part of the\n//                                filtered values.\n//  - out_vector_low            : Vector containing the lower part of the\n//                                filtered values.\n//\n// Return value                 : Number of samples in the |out_vector|.\n//\n\n//\n// WebRtcSpl_ComplexIFFT(...)\n//\n// Complex Inverse FFT\n//\n// Computes an inverse complex 2^|stages|-point FFT on the input vector, which\n// is in bit-reversed order. The original content of the vector is destroyed in\n// the process, since the input is overwritten by the output, normal-ordered,\n// FFT vector. With X as the input complex vector, y as the output complex\n// vector and with M = 2^|stages|, the following is computed:\n//\n//        M-1\n// y(k) = sum[X(i)*[cos(2*pi*i*k/M) + j*sin(2*pi*i*k/M)]]\n//        i=0\n//\n// The implementations are optimized for speed, not for code size. It uses the\n// decimation-in-time algorithm with radix-2 butterfly technique.\n//\n// Input:\n//      - vector    : In pointer to complex vector containing 2^|stages|\n//                    real elements interleaved with 2^|stages| imaginary\n//                    elements.\n//                    [ReImReImReIm....]\n//                    The elements are in Q(-scale) domain, see more on Return\n//                    Value below.\n//\n//      - stages    : Number of FFT stages. Must be at least 3 and at most 10,\n//                    since the table WebRtcSpl_kSinTable1024[] is 1024\n//                    elements long.\n//\n//      - mode      : This parameter gives the user to choose how the FFT\n//                    should work.\n//                    mode==0: Low-complexity and Low-accuracy mode\n//                    mode==1: High-complexity and High-accuracy mode\n//\n// Output:\n//      - vector    : Out pointer to the FFT vector (the same as input).\n//\n// Return Value     : The scale value that tells the number of left bit shifts\n//                    that the elements in the |vector| should be shifted with\n//                    in order to get Q0 values, i.e. the physically correct\n//                    values. The scale parameter is always 0 or positive,\n//                    except if N>1024 (|stages|>10), which returns a scale\n//                    value of -1, indicating error.\n//\n\n//\n// WebRtcSpl_ComplexFFT(...)\n//\n// Complex FFT\n//\n// Computes a complex 2^|stages|-point FFT on the input vector, which is in\n// bit-reversed order. The original content of the vector is destroyed in\n// the process, since the input is overwritten by the output, normal-ordered,\n// FFT vector. With x as the input complex vector, Y as the output complex\n// vector and with M = 2^|stages|, the following is computed:\n//\n//              M-1\n// Y(k) = 1/M * sum[x(i)*[cos(2*pi*i*k/M) + j*sin(2*pi*i*k/M)]]\n//              i=0\n//\n// The implementations are optimized for speed, not for code size. It uses the\n// decimation-in-time algorithm with radix-2 butterfly technique.\n//\n// This routine prevents overflow by scaling by 2 before each FFT stage. This is\n// a fixed scaling, for proper normalization - there will be log2(n) passes, so\n// this results in an overall factor of 1/n, distributed to maximize arithmetic\n// accuracy.\n//\n// Input:\n//      - vector    : In pointer to complex vector containing 2^|stages| real\n//                    elements interleaved with 2^|stages| imaginary elements.\n//                    [ReImReImReIm....]\n//                    The output is in the Q0 domain.\n//\n//      - stages    : Number of FFT stages. Must be at least 3 and at most 10,\n//                    since the table WebRtcSpl_kSinTable1024[] is 1024\n//                    elements long.\n//\n//      - mode      : This parameter gives the user to choose how the FFT\n//                    should work.\n//                    mode==0: Low-complexity and Low-accuracy mode\n//                    mode==1: High-complexity and High-accuracy mode\n//\n// Output:\n//      - vector    : The output FFT vector is in the Q0 domain.\n//\n// Return value     : The scale parameter is always 0, except if N>1024,\n//                    which returns a scale value of -1, indicating error.\n//\n\n//\n// WebRtcSpl_AnalysisQMF(...)\n//\n// Splits a 0-2*F Hz signal into two sub bands: 0-F Hz and F-2*F Hz. The\n// current version has F = 8000, therefore, a super-wideband audio signal is\n// split to lower-band 0-8 kHz and upper-band 8-16 kHz.\n//\n// Input:\n//      - in_data       : Wide band speech signal, 320 samples (10 ms)\n//\n// Input & Output:\n//      - filter_state1 : Filter state for first All-pass filter\n//      - filter_state2 : Filter state for second All-pass filter\n//\n// Output:\n//      - low_band      : Lower-band signal 0-8 kHz band, 160 samples (10 ms)\n//      - high_band     : Upper-band signal 8-16 kHz band (flipped in frequency\n//                        domain), 160 samples (10 ms)\n//\n\n//\n// WebRtcSpl_SynthesisQMF(...)\n//\n// Combines the two sub bands (0-F and F-2*F Hz) into a signal of 0-2*F\n// Hz, (current version has F = 8000 Hz). So the filter combines lower-band\n// (0-8 kHz) and upper-band (8-16 kHz) channels to obtain super-wideband 0-16\n// kHz audio.\n//\n// Input:\n//      - low_band      : The signal with the 0-8 kHz band, 160 samples (10 ms)\n//      - high_band     : The signal with the 8-16 kHz band, 160 samples (10 ms)\n//\n// Input & Output:\n//      - filter_state1 : Filter state for first All-pass filter\n//      - filter_state2 : Filter state for second All-pass filter\n//\n// Output:\n//      - out_data      : Super-wideband speech signal, 0-16 kHz\n//\n\n// int16_t WebRtcSpl_SatW32ToW16(...)\n//\n// This function saturates a 32-bit word into a 16-bit word.\n//\n// Input:\n//      - value32   : The value of a 32-bit word.\n//\n// Output:\n//      - out16     : the saturated 16-bit word.\n//\n\n// int32_t WebRtc_MulAccumW16(...)\n//\n// This function multiply a 16-bit word by a 16-bit word, and accumulate this\n// value to a 32-bit integer.\n//\n// Input:\n//      - a    : The value of the first 16-bit word.\n//      - b    : The value of the second 16-bit word.\n//      - c    : The value of an 32-bit integer.\n//\n// Return Value: The value of a * b + c.\n//\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/include/spl_inl.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n// This header file includes the inline functions in\n// the fix point signal processing library.\n\n#ifndef WEBRTC_SPL_SPL_INL_H_\n#define WEBRTC_SPL_SPL_INL_H_\n\n#include \"webrtc/system_wrappers/include/compile_assert_c.h\"\n\nextern const int8_t kWebRtcSpl_CountLeadingZeros32_Table[64];\n\n// Don't call this directly except in tests!\nstatic __inline int WebRtcSpl_CountLeadingZeros32_NotBuiltin(uint32_t n) {\n  // Normalize n by rounding up to the nearest number that is a sequence of 0\n  // bits followed by a sequence of 1 bits. This number has the same number of\n  // leading zeros as the original n. There are exactly 33 such values.\n  n |= n >> 1;\n  n |= n >> 2;\n  n |= n >> 4;\n  n |= n >> 8;\n  n |= n >> 16;\n\n  // Multiply the modified n with a constant selected (by exhaustive search)\n  // such that each of the 33 possible values of n give a product whose 6 most\n  // significant bits are unique. Then look up the answer in the table.\n  return kWebRtcSpl_CountLeadingZeros32_Table[(n * 0x8c0b2891) >> 26];\n}\n\n// Don't call this directly except in tests!\nstatic __inline int WebRtcSpl_CountLeadingZeros64_NotBuiltin(uint64_t n) {\n  const int leading_zeros = n >> 32 == 0 ? 32 : 0;\n  return leading_zeros + WebRtcSpl_CountLeadingZeros32_NotBuiltin(\n                             (uint32_t)(n >> (32 - leading_zeros)));\n}\n\n// Returns the number of leading zero bits in the argument.\nstatic __inline int WebRtcSpl_CountLeadingZeros32(uint32_t n) {\n#ifdef __GNUC__\n  COMPILE_ASSERT(sizeof(unsigned int) == sizeof(uint32_t));\n  return n == 0 ? 32 : __builtin_clz(n);\n#else\n  return WebRtcSpl_CountLeadingZeros32_NotBuiltin(n);\n#endif\n}\n\n// Returns the number of leading zero bits in the argument.\nstatic __inline int WebRtcSpl_CountLeadingZeros64(uint64_t n) {\n#ifdef __GNUC__\n  COMPILE_ASSERT(sizeof(unsigned long long) == sizeof(uint64_t));\n  return n == 0 ? 64 : __builtin_clzll(n);\n#else\n  return WebRtcSpl_CountLeadingZeros64_NotBuiltin(n);\n#endif\n}\n\n#ifdef WEBRTC_ARCH_ARM_V7\n#include \"webrtc/common_audio/signal_processing/include/spl_inl_armv7.h\"\n#else\n\n#if defined(MIPS32_LE)\n#include \"webrtc/common_audio/signal_processing/include/spl_inl_mips.h\"\n#endif\n\n#if !defined(MIPS_DSP_R1_LE)\nstatic __inline int16_t WebRtcSpl_SatW32ToW16(int32_t value32) {\n  int16_t out16 = (int16_t) value32;\n\n  if (value32 > 32767)\n    out16 = 32767;\n  else if (value32 < -32768)\n    out16 = -32768;\n\n  return out16;\n}\n\nstatic __inline int32_t WebRtcSpl_AddSatW32(int32_t a, int32_t b) {\n  // Do the addition in unsigned numbers, since signed overflow is undefined\n  // behavior.\n  const int32_t sum = (int32_t)((uint32_t)a + (uint32_t)b);\n\n  // a + b can't overflow if a and b have different signs. If they have the\n  // same sign, a + b also has the same sign iff it didn't overflow.\n  if ((a < 0) == (b < 0) && (a < 0) != (sum < 0)) {\n    // The direction of the overflow is obvious from the sign of a + b.\n    return sum < 0 ? INT32_MAX : INT32_MIN;\n  }\n  return sum;\n}\n\nstatic __inline int32_t WebRtcSpl_SubSatW32(int32_t a, int32_t b) {\n  // Do the subtraction in unsigned numbers, since signed overflow is undefined\n  // behavior.\n  const int32_t diff = (int32_t)((uint32_t)a - (uint32_t)b);\n\n  // a - b can't overflow if a and b have the same sign. If they have different\n  // signs, a - b has the same sign as a iff it didn't overflow.\n  if ((a < 0) != (b < 0) && (a < 0) != (diff < 0)) {\n    // The direction of the overflow is obvious from the sign of a - b.\n    return diff < 0 ? INT32_MAX : INT32_MIN;\n  }\n  return diff;\n}\n\nstatic __inline int16_t WebRtcSpl_AddSatW16(int16_t a, int16_t b) {\n  return WebRtcSpl_SatW32ToW16((int32_t) a + (int32_t) b);\n}\n\nstatic __inline int16_t WebRtcSpl_SubSatW16(int16_t var1, int16_t var2) {\n  return WebRtcSpl_SatW32ToW16((int32_t) var1 - (int32_t) var2);\n}\n#endif  // #if !defined(MIPS_DSP_R1_LE)\n\n#if !defined(MIPS32_LE)\nstatic __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) {\n  return 32 - WebRtcSpl_CountLeadingZeros32(n);\n}\n\n// Return the number of steps a can be left-shifted without overflow,\n// or 0 if a == 0.\nstatic __inline int16_t WebRtcSpl_NormW32(int32_t a) {\n  return a == 0 ? 0 : WebRtcSpl_CountLeadingZeros32(a < 0 ? ~a : a) - 1;\n}\n\n// Return the number of steps a can be left-shifted without overflow,\n// or 0 if a == 0.\nstatic __inline int16_t WebRtcSpl_NormU32(uint32_t a) {\n  return a == 0 ? 0 : WebRtcSpl_CountLeadingZeros32(a);\n}\n\n// Return the number of steps a can be left-shifted without overflow,\n// or 0 if a == 0.\nstatic __inline int16_t WebRtcSpl_NormW16(int16_t a) {\n  const int32_t a32 = a;\n  return a == 0 ? 0 : WebRtcSpl_CountLeadingZeros32(a < 0 ? ~a32 : a32) - 17;\n}\n\nstatic __inline int32_t WebRtc_MulAccumW16(int16_t a, int16_t b, int32_t c) {\n  return (a * b + c);\n}\n#endif  // #if !defined(MIPS32_LE)\n\n#endif  // WEBRTC_ARCH_ARM_V7\n\n#endif  // WEBRTC_SPL_SPL_INL_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/include/spl_inl_armv7.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/* This header file includes the inline functions for ARM processors in\n * the fix point signal processing library.\n */\n\n#ifndef WEBRTC_SPL_SPL_INL_ARMV7_H_\n#define WEBRTC_SPL_SPL_INL_ARMV7_H_\n\n/* TODO(kma): Replace some assembly code with GCC intrinsics\n * (e.g. __builtin_clz).\n */\n\n/* This function produces result that is not bit exact with that by the generic\n * C version in some cases, although the former is at least as accurate as the\n * later.\n */\nstatic __inline int32_t WEBRTC_SPL_MUL_16_32_RSFT16(int16_t a, int32_t b) {\n  int32_t tmp = 0;\n  __asm __volatile (\"smulwb %0, %1, %2\":\"=r\"(tmp):\"r\"(b), \"r\"(a));\n  return tmp;\n}\n\nstatic __inline int32_t WEBRTC_SPL_MUL_16_16(int16_t a, int16_t b) {\n  int32_t tmp = 0;\n  __asm __volatile (\"smulbb %0, %1, %2\":\"=r\"(tmp):\"r\"(a), \"r\"(b));\n  return tmp;\n}\n\n// TODO(kma): add unit test.\nstatic __inline int32_t WebRtc_MulAccumW16(int16_t a, int16_t b, int32_t c) {\n  int32_t tmp = 0;\n  __asm __volatile (\"smlabb %0, %1, %2, %3\":\"=r\"(tmp):\"r\"(a), \"r\"(b), \"r\"(c));\n  return tmp;\n}\n\nstatic __inline int16_t WebRtcSpl_AddSatW16(int16_t a, int16_t b) {\n  int32_t s_sum = 0;\n\n  __asm __volatile (\"qadd16 %0, %1, %2\":\"=r\"(s_sum):\"r\"(a), \"r\"(b));\n\n  return (int16_t) s_sum;\n}\n\nstatic __inline int32_t WebRtcSpl_AddSatW32(int32_t l_var1, int32_t l_var2) {\n  int32_t l_sum = 0;\n\n  __asm __volatile (\"qadd %0, %1, %2\":\"=r\"(l_sum):\"r\"(l_var1), \"r\"(l_var2));\n\n  return l_sum;\n}\n\nstatic __inline int32_t WebRtcSpl_SubSatW32(int32_t l_var1, int32_t l_var2) {\n  int32_t l_sub = 0;\n\n  __asm __volatile (\"qsub %0, %1, %2\":\"=r\"(l_sub):\"r\"(l_var1), \"r\"(l_var2));\n\n  return l_sub;\n}\n\nstatic __inline int16_t WebRtcSpl_SubSatW16(int16_t var1, int16_t var2) {\n  int32_t s_sub = 0;\n\n  __asm __volatile (\"qsub16 %0, %1, %2\":\"=r\"(s_sub):\"r\"(var1), \"r\"(var2));\n\n  return (int16_t)s_sub;\n}\n\nstatic __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) {\n  int32_t tmp = 0;\n\n  __asm __volatile (\"clz %0, %1\":\"=r\"(tmp):\"r\"(n));\n\n  return (int16_t)(32 - tmp);\n}\n\nstatic __inline int16_t WebRtcSpl_NormW32(int32_t a) {\n  int32_t tmp = 0;\n\n  if (a == 0) {\n    return 0;\n  }\n  else if (a < 0) {\n    a ^= 0xFFFFFFFF;\n  }\n\n  __asm __volatile (\"clz %0, %1\":\"=r\"(tmp):\"r\"(a));\n\n  return (int16_t)(tmp - 1);\n}\n\nstatic __inline int16_t WebRtcSpl_NormU32(uint32_t a) {\n  int tmp = 0;\n\n  if (a == 0) return 0;\n\n  __asm __volatile (\"clz %0, %1\":\"=r\"(tmp):\"r\"(a));\n\n  return (int16_t)tmp;\n}\n\nstatic __inline int16_t WebRtcSpl_NormW16(int16_t a) {\n  int32_t tmp = 0;\n  int32_t a_32 = a;\n\n  if (a_32 == 0) {\n    return 0;\n  }\n  else if (a_32 < 0) {\n    a_32 ^= 0xFFFFFFFF;\n  }\n\n  __asm __volatile (\"clz %0, %1\":\"=r\"(tmp):\"r\"(a_32));\n\n  return (int16_t)(tmp - 17);\n}\n\n// TODO(kma): add unit test.\nstatic __inline int16_t WebRtcSpl_SatW32ToW16(int32_t value32) {\n  int32_t out = 0;\n\n  __asm __volatile (\"ssat %0, #16, %1\" : \"=r\"(out) : \"r\"(value32));\n\n  return (int16_t)out;\n}\n\n#endif  // WEBRTC_SPL_SPL_INL_ARMV7_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/include/spl_inl_mips.h",
    "content": "/*\n *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n// This header file includes the inline functions in\n// the fix point signal processing library.\n\n#ifndef WEBRTC_SPL_SPL_INL_MIPS_H_\n#define WEBRTC_SPL_SPL_INL_MIPS_H_\n\nstatic __inline int32_t WEBRTC_SPL_MUL_16_16(int32_t a,\n                                             int32_t b) {\n  int32_t value32 = 0;\n  int32_t a1 = 0, b1 = 0;\n\n  __asm __volatile(\n#if defined(MIPS32_R2_LE)\n    \"seh    %[a1],          %[a]                \\n\\t\"\n    \"seh    %[b1],          %[b]                \\n\\t\"\n#else\n    \"sll    %[a1],          %[a],         16    \\n\\t\"\n    \"sll    %[b1],          %[b],         16    \\n\\t\"\n    \"sra    %[a1],          %[a1],        16    \\n\\t\"\n    \"sra    %[b1],          %[b1],        16    \\n\\t\"\n#endif\n    \"mul    %[value32],     %[a1],  %[b1]       \\n\\t\"\n    : [value32] \"=r\" (value32), [a1] \"=&r\" (a1), [b1] \"=&r\" (b1)\n    : [a] \"r\" (a), [b] \"r\" (b)\n    : \"hi\", \"lo\"\n  );\n  return value32;\n}\n\nstatic __inline int32_t WEBRTC_SPL_MUL_16_32_RSFT16(int16_t a,\n                                                    int32_t b) {\n  int32_t value32 = 0, b1 = 0, b2 = 0;\n  int32_t a1 = 0;\n\n  __asm __volatile(\n#if defined(MIPS32_R2_LE)\n    \"seh    %[a1],          %[a]                        \\n\\t\"\n#else\n    \"sll    %[a1],          %[a],           16          \\n\\t\"\n    \"sra    %[a1],          %[a1],          16          \\n\\t\"\n#endif\n    \"andi   %[b2],          %[b],           0xFFFF      \\n\\t\"\n    \"sra    %[b1],          %[b],           16          \\n\\t\"\n    \"sra    %[b2],          %[b2],          1           \\n\\t\"\n    \"mul    %[value32],     %[a1],          %[b1]       \\n\\t\"\n    \"mul    %[b2],          %[a1],          %[b2]       \\n\\t\"\n    \"addiu  %[b2],          %[b2],          0x4000      \\n\\t\"\n    \"sra    %[b2],          %[b2],          15          \\n\\t\"\n    \"addu   %[value32],     %[value32],     %[b2]       \\n\\t\"\n    : [value32] \"=&r\" (value32), [b1] \"=&r\" (b1), [b2] \"=&r\" (b2),\n      [a1] \"=&r\" (a1)\n    : [a] \"r\" (a), [b] \"r\" (b)\n    : \"hi\", \"lo\"\n  );\n  return value32;\n}\n\n#if defined(MIPS_DSP_R1_LE)\nstatic __inline int16_t WebRtcSpl_SatW32ToW16(int32_t value32) {\n  __asm __volatile(\n    \"shll_s.w   %[value32], %[value32], 16      \\n\\t\"\n    \"sra        %[value32], %[value32], 16      \\n\\t\"\n    : [value32] \"+r\" (value32)\n    :\n  );\n  int16_t out16 = (int16_t)value32;\n  return out16;\n}\n\nstatic __inline int16_t WebRtcSpl_AddSatW16(int16_t a, int16_t b) {\n  int32_t value32 = 0;\n\n  __asm __volatile(\n    \"addq_s.ph      %[value32],     %[a],   %[b]    \\n\\t\"\n    : [value32] \"=r\" (value32)\n    : [a] \"r\" (a), [b] \"r\" (b)\n  );\n  return (int16_t)value32;\n}\n\nstatic __inline int32_t WebRtcSpl_AddSatW32(int32_t l_var1, int32_t l_var2) {\n  int32_t l_sum;\n\n  __asm __volatile(\n    \"addq_s.w   %[l_sum],       %[l_var1],      %[l_var2]    \\n\\t\"\n    : [l_sum] \"=r\" (l_sum)\n    : [l_var1] \"r\" (l_var1), [l_var2] \"r\" (l_var2)\n  );\n\n  return l_sum;\n}\n\nstatic __inline int16_t WebRtcSpl_SubSatW16(int16_t var1, int16_t var2) {\n  int32_t value32;\n\n  __asm __volatile(\n    \"subq_s.ph  %[value32], %[var1],    %[var2]     \\n\\t\"\n    : [value32] \"=r\" (value32)\n    : [var1] \"r\" (var1), [var2] \"r\" (var2)\n  );\n\n  return (int16_t)value32;\n}\n\nstatic __inline int32_t WebRtcSpl_SubSatW32(int32_t l_var1, int32_t l_var2) {\n  int32_t l_diff;\n\n  __asm __volatile(\n    \"subq_s.w   %[l_diff],      %[l_var1],      %[l_var2]    \\n\\t\"\n    : [l_diff] \"=r\" (l_diff)\n    : [l_var1] \"r\" (l_var1), [l_var2] \"r\" (l_var2)\n  );\n\n  return l_diff;\n}\n#endif\n\nstatic __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) {\n  int bits = 0;\n  int i32 = 32;\n\n  __asm __volatile(\n    \"clz    %[bits],    %[n]                    \\n\\t\"\n    \"subu   %[bits],    %[i32],     %[bits]     \\n\\t\"\n    : [bits] \"=&r\" (bits)\n    : [n] \"r\" (n), [i32] \"r\" (i32)\n  );\n\n  return (int16_t)bits;\n}\n\nstatic __inline int16_t WebRtcSpl_NormW32(int32_t a) {\n  int zeros = 0;\n\n  __asm __volatile(\n    \".set       push                                \\n\\t\"\n    \".set       noreorder                           \\n\\t\"\n    \"bnez       %[a],       1f                      \\n\\t\"\n    \" sra       %[zeros],   %[a],       31          \\n\\t\"\n    \"b          2f                                  \\n\\t\"\n    \" move      %[zeros],   $zero                   \\n\\t\"\n   \"1:                                              \\n\\t\"\n    \"xor        %[zeros],   %[a],       %[zeros]    \\n\\t\"\n    \"clz        %[zeros],   %[zeros]                \\n\\t\"\n    \"addiu      %[zeros],   %[zeros],   -1          \\n\\t\"\n   \"2:                                              \\n\\t\"\n    \".set       pop                                 \\n\\t\"\n    : [zeros]\"=&r\"(zeros)\n    : [a] \"r\" (a)\n  );\n\n  return (int16_t)zeros;\n}\n\nstatic __inline int16_t WebRtcSpl_NormU32(uint32_t a) {\n  int zeros = 0;\n\n  __asm __volatile(\n    \"clz    %[zeros],   %[a]    \\n\\t\"\n    : [zeros] \"=r\" (zeros)\n    : [a] \"r\" (a)\n  );\n\n  return (int16_t)(zeros & 0x1f);\n}\n\nstatic __inline int16_t WebRtcSpl_NormW16(int16_t a) {\n  int zeros = 0;\n  int a0 = a << 16;\n\n  __asm __volatile(\n    \".set       push                                \\n\\t\"\n    \".set       noreorder                           \\n\\t\"\n    \"bnez       %[a0],      1f                      \\n\\t\"\n    \" sra       %[zeros],   %[a0],      31          \\n\\t\"\n    \"b          2f                                  \\n\\t\"\n    \" move      %[zeros],   $zero                   \\n\\t\"\n   \"1:                                              \\n\\t\"\n    \"xor        %[zeros],   %[a0],      %[zeros]    \\n\\t\"\n    \"clz        %[zeros],   %[zeros]                \\n\\t\"\n    \"addiu      %[zeros],   %[zeros],   -1          \\n\\t\"\n   \"2:                                              \\n\\t\"\n    \".set       pop                                 \\n\\t\"\n    : [zeros]\"=&r\"(zeros)\n    : [a0] \"r\" (a0)\n  );\n\n  return (int16_t)zeros;\n}\n\nstatic __inline int32_t WebRtc_MulAccumW16(int16_t a,\n                                           int16_t b,\n                                           int32_t c) {\n  int32_t res = 0, c1 = 0;\n  __asm __volatile(\n#if defined(MIPS32_R2_LE)\n    \"seh    %[a],       %[a]            \\n\\t\"\n    \"seh    %[b],       %[b]            \\n\\t\"\n#else\n    \"sll    %[a],       %[a],   16      \\n\\t\"\n    \"sll    %[b],       %[b],   16      \\n\\t\"\n    \"sra    %[a],       %[a],   16      \\n\\t\"\n    \"sra    %[b],       %[b],   16      \\n\\t\"\n#endif\n    \"mul    %[res],     %[a],   %[b]    \\n\\t\"\n    \"addu   %[c1],      %[c],   %[res]  \\n\\t\"\n    : [c1] \"=r\" (c1), [res] \"=&r\" (res)\n    : [a] \"r\" (a), [b] \"r\" (b), [c] \"r\" (c)\n    : \"hi\", \"lo\"\n  );\n  return (c1);\n}\n\n#endif  // WEBRTC_SPL_SPL_INL_MIPS_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/levinson_durbin.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_LevinsonDurbin().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n#define SPL_LEVINSON_MAXORDER 20\n\nint16_t WebRtcSpl_LevinsonDurbin(const int32_t* R, int16_t* A, int16_t* K,\n                                 size_t order)\n{\n    size_t i, j;\n    // Auto-correlation coefficients in high precision\n    int16_t R_hi[SPL_LEVINSON_MAXORDER + 1], R_low[SPL_LEVINSON_MAXORDER + 1];\n    // LPC coefficients in high precision\n    int16_t A_hi[SPL_LEVINSON_MAXORDER + 1], A_low[SPL_LEVINSON_MAXORDER + 1];\n    // LPC coefficients for next iteration\n    int16_t A_upd_hi[SPL_LEVINSON_MAXORDER + 1], A_upd_low[SPL_LEVINSON_MAXORDER + 1];\n    // Reflection coefficient in high precision\n    int16_t K_hi, K_low;\n    // Prediction gain Alpha in high precision and with scale factor\n    int16_t Alpha_hi, Alpha_low, Alpha_exp;\n    int16_t tmp_hi, tmp_low;\n    int32_t temp1W32, temp2W32, temp3W32;\n    int16_t norm;\n\n    // Normalize the autocorrelation R[0]...R[order+1]\n\n    norm = WebRtcSpl_NormW32(R[0]);\n\n    for (i = 0; i <= order; ++i)\n    {\n        temp1W32 = WEBRTC_SPL_LSHIFT_W32(R[i], norm);\n        // Put R in hi and low format\n        R_hi[i] = (int16_t)(temp1W32 >> 16);\n        R_low[i] = (int16_t)((temp1W32 - ((int32_t)R_hi[i] << 16)) >> 1);\n    }\n\n    // K = A[1] = -R[1] / R[0]\n\n    temp2W32 = WEBRTC_SPL_LSHIFT_W32((int32_t)R_hi[1],16)\n            + WEBRTC_SPL_LSHIFT_W32((int32_t)R_low[1],1); // R[1] in Q31\n    temp3W32 = WEBRTC_SPL_ABS_W32(temp2W32); // abs R[1]\n    temp1W32 = WebRtcSpl_DivW32HiLow(temp3W32, R_hi[0], R_low[0]); // abs(R[1])/R[0] in Q31\n    // Put back the sign on R[1]\n    if (temp2W32 > 0)\n    {\n        temp1W32 = -temp1W32;\n    }\n\n    // Put K in hi and low format\n    K_hi = (int16_t)(temp1W32 >> 16);\n    K_low = (int16_t)((temp1W32 - ((int32_t)K_hi << 16)) >> 1);\n\n    // Store first reflection coefficient\n    K[0] = K_hi;\n\n    temp1W32 >>= 4;  // A[1] in Q27.\n\n    // Put A[1] in hi and low format\n    A_hi[1] = (int16_t)(temp1W32 >> 16);\n    A_low[1] = (int16_t)((temp1W32 - ((int32_t)A_hi[1] << 16)) >> 1);\n\n    // Alpha = R[0] * (1-K^2)\n\n    temp1W32 = ((K_hi * K_low >> 14) + K_hi * K_hi) << 1;  // = k^2 in Q31\n\n    temp1W32 = WEBRTC_SPL_ABS_W32(temp1W32); // Guard against <0\n    temp1W32 = (int32_t)0x7fffffffL - temp1W32; // temp1W32 = (1 - K[0]*K[0]) in Q31\n\n    // Store temp1W32 = 1 - K[0]*K[0] on hi and low format\n    tmp_hi = (int16_t)(temp1W32 >> 16);\n    tmp_low = (int16_t)((temp1W32 - ((int32_t)tmp_hi << 16)) >> 1);\n\n    // Calculate Alpha in Q31\n    temp1W32 = (R_hi[0] * tmp_hi + (R_hi[0] * tmp_low >> 15) +\n        (R_low[0] * tmp_hi >> 15)) << 1;\n\n    // Normalize Alpha and put it in hi and low format\n\n    Alpha_exp = WebRtcSpl_NormW32(temp1W32);\n    temp1W32 = WEBRTC_SPL_LSHIFT_W32(temp1W32, Alpha_exp);\n    Alpha_hi = (int16_t)(temp1W32 >> 16);\n    Alpha_low = (int16_t)((temp1W32 - ((int32_t)Alpha_hi << 16)) >> 1);\n\n    // Perform the iterative calculations in the Levinson-Durbin algorithm\n\n    for (i = 2; i <= order; i++)\n    {\n        /*                    ----\n         temp1W32 =  R[i] + > R[j]*A[i-j]\n         /\n         ----\n         j=1..i-1\n         */\n\n        temp1W32 = 0;\n\n        for (j = 1; j < i; j++)\n        {\n          // temp1W32 is in Q31\n          temp1W32 += (R_hi[j] * A_hi[i - j] << 1) +\n              (((R_hi[j] * A_low[i - j] >> 15) +\n              (R_low[j] * A_hi[i - j] >> 15)) << 1);\n        }\n\n        temp1W32 = WEBRTC_SPL_LSHIFT_W32(temp1W32, 4);\n        temp1W32 += (WEBRTC_SPL_LSHIFT_W32((int32_t)R_hi[i], 16)\n                + WEBRTC_SPL_LSHIFT_W32((int32_t)R_low[i], 1));\n\n        // K = -temp1W32 / Alpha\n        temp2W32 = WEBRTC_SPL_ABS_W32(temp1W32); // abs(temp1W32)\n        temp3W32 = WebRtcSpl_DivW32HiLow(temp2W32, Alpha_hi, Alpha_low); // abs(temp1W32)/Alpha\n\n        // Put the sign of temp1W32 back again\n        if (temp1W32 > 0)\n        {\n            temp3W32 = -temp3W32;\n        }\n\n        // Use the Alpha shifts from earlier to de-normalize\n        norm = WebRtcSpl_NormW32(temp3W32);\n        if ((Alpha_exp <= norm) || (temp3W32 == 0))\n        {\n            temp3W32 = WEBRTC_SPL_LSHIFT_W32(temp3W32, Alpha_exp);\n        } else\n        {\n            if (temp3W32 > 0)\n            {\n                temp3W32 = (int32_t)0x7fffffffL;\n            } else\n            {\n                temp3W32 = (int32_t)0x80000000L;\n            }\n        }\n\n        // Put K on hi and low format\n        K_hi = (int16_t)(temp3W32 >> 16);\n        K_low = (int16_t)((temp3W32 - ((int32_t)K_hi << 16)) >> 1);\n\n        // Store Reflection coefficient in Q15\n        K[i - 1] = K_hi;\n\n        // Test for unstable filter.\n        // If unstable return 0 and let the user decide what to do in that case\n\n        if ((int32_t)WEBRTC_SPL_ABS_W16(K_hi) > (int32_t)32750)\n        {\n            return 0; // Unstable filter\n        }\n\n        /*\n         Compute updated LPC coefficient: Anew[i]\n         Anew[j]= A[j] + K*A[i-j]   for j=1..i-1\n         Anew[i]= K\n         */\n\n        for (j = 1; j < i; j++)\n        {\n            // temp1W32 = A[j] in Q27\n            temp1W32 = WEBRTC_SPL_LSHIFT_W32((int32_t)A_hi[j],16)\n                    + WEBRTC_SPL_LSHIFT_W32((int32_t)A_low[j],1);\n\n            // temp1W32 += K*A[i-j] in Q27\n            temp1W32 += (K_hi * A_hi[i - j] + (K_hi * A_low[i - j] >> 15) +\n                (K_low * A_hi[i - j] >> 15)) << 1;\n\n            // Put Anew in hi and low format\n            A_upd_hi[j] = (int16_t)(temp1W32 >> 16);\n            A_upd_low[j] = (int16_t)(\n                (temp1W32 - ((int32_t)A_upd_hi[j] << 16)) >> 1);\n        }\n\n        // temp3W32 = K in Q27 (Convert from Q31 to Q27)\n        temp3W32 >>= 4;\n\n        // Store Anew in hi and low format\n        A_upd_hi[i] = (int16_t)(temp3W32 >> 16);\n        A_upd_low[i] = (int16_t)(\n            (temp3W32 - ((int32_t)A_upd_hi[i] << 16)) >> 1);\n\n        // Alpha = Alpha * (1-K^2)\n\n        temp1W32 = ((K_hi * K_low >> 14) + K_hi * K_hi) << 1;  // K*K in Q31\n\n        temp1W32 = WEBRTC_SPL_ABS_W32(temp1W32); // Guard against <0\n        temp1W32 = (int32_t)0x7fffffffL - temp1W32; // 1 - K*K  in Q31\n\n        // Convert 1- K^2 in hi and low format\n        tmp_hi = (int16_t)(temp1W32 >> 16);\n        tmp_low = (int16_t)((temp1W32 - ((int32_t)tmp_hi << 16)) >> 1);\n\n        // Calculate Alpha = Alpha * (1-K^2) in Q31\n        temp1W32 = (Alpha_hi * tmp_hi + (Alpha_hi * tmp_low >> 15) +\n            (Alpha_low * tmp_hi >> 15)) << 1;\n\n        // Normalize Alpha and store it on hi and low format\n\n        norm = WebRtcSpl_NormW32(temp1W32);\n        temp1W32 = WEBRTC_SPL_LSHIFT_W32(temp1W32, norm);\n\n        Alpha_hi = (int16_t)(temp1W32 >> 16);\n        Alpha_low = (int16_t)((temp1W32 - ((int32_t)Alpha_hi << 16)) >> 1);\n\n        // Update the total normalization of Alpha\n        Alpha_exp = Alpha_exp + norm;\n\n        // Update A[]\n\n        for (j = 1; j <= i; j++)\n        {\n            A_hi[j] = A_upd_hi[j];\n            A_low[j] = A_upd_low[j];\n        }\n    }\n\n    /*\n     Set A[0] to 1.0 and store the A[i] i=1...order in Q12\n     (Convert from Q27 and use rounding)\n     */\n\n    A[0] = 4096;\n\n    for (i = 1; i <= order; i++)\n    {\n        // temp1W32 in Q27\n        temp1W32 = WEBRTC_SPL_LSHIFT_W32((int32_t)A_hi[i], 16)\n                + WEBRTC_SPL_LSHIFT_W32((int32_t)A_low[i], 1);\n        // Round and store upper word\n        A[i] = (int16_t)(((temp1W32 << 1) + 32768) >> 16);\n    }\n    return 1; // Stable filters\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/lpc_to_refl_coef.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_LpcToReflCoef().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n#define SPL_LPC_TO_REFL_COEF_MAX_AR_MODEL_ORDER 50\n\nvoid WebRtcSpl_LpcToReflCoef(int16_t* a16, int use_order, int16_t* k16)\n{\n    int m, k;\n    int32_t tmp32[SPL_LPC_TO_REFL_COEF_MAX_AR_MODEL_ORDER];\n    int32_t tmp_inv_denom32;\n    int16_t tmp_inv_denom16;\n\n    k16[use_order - 1] = a16[use_order] << 3;  // Q12<<3 => Q15\n    for (m = use_order - 1; m > 0; m--)\n    {\n        // (1 - k^2) in Q30\n        tmp_inv_denom32 = 1073741823 - k16[m] * k16[m];\n        // (1 - k^2) in Q15\n        tmp_inv_denom16 = (int16_t)(tmp_inv_denom32 >> 15);\n\n        for (k = 1; k <= m; k++)\n        {\n            // tmp[k] = (a[k] - RC[m] * a[m-k+1]) / (1.0 - RC[m]*RC[m]);\n\n            // [Q12<<16 - (Q15*Q12)<<1] = [Q28 - Q28] = Q28\n            tmp32[k] = (a16[k] << 16) - (k16[m] * a16[m - k + 1] << 1);\n\n            tmp32[k] = WebRtcSpl_DivW32W16(tmp32[k], tmp_inv_denom16); //Q28/Q15 = Q13\n        }\n\n        for (k = 1; k < m; k++)\n        {\n            a16[k] = (int16_t)(tmp32[k] >> 1);  // Q13>>1 => Q12\n        }\n\n        tmp32[m] = WEBRTC_SPL_SAT(8191, tmp32[m], -8191);\n        k16[m - 1] = (int16_t)WEBRTC_SPL_LSHIFT_W32(tmp32[m], 2); //Q13<<2 => Q15\n    }\n    return;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/min_max_operations.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/*\n * This file contains the implementation of functions\n * WebRtcSpl_MaxAbsValueW16C()\n * WebRtcSpl_MaxAbsValueW32C()\n * WebRtcSpl_MaxValueW16C()\n * WebRtcSpl_MaxValueW32C()\n * WebRtcSpl_MinValueW16C()\n * WebRtcSpl_MinValueW32C()\n * WebRtcSpl_MaxAbsIndexW16()\n * WebRtcSpl_MaxIndexW16()\n * WebRtcSpl_MaxIndexW32()\n * WebRtcSpl_MinIndexW16()\n * WebRtcSpl_MinIndexW32()\n *\n */\n\n#include <stdlib.h>\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n// TODO(bjorn/kma): Consolidate function pairs (e.g. combine\n//   WebRtcSpl_MaxAbsValueW16C and WebRtcSpl_MaxAbsIndexW16 into a single one.)\n// TODO(kma): Move the next six functions into min_max_operations_c.c.\n\n// Maximum absolute value of word16 vector. C version for generic platforms.\nint16_t WebRtcSpl_MaxAbsValueW16C(const int16_t* vector, size_t length) {\n  size_t i = 0;\n  int absolute = 0, maximum = 0;\n\n  RTC_DCHECK_GT(length, 0);\n\n  for (i = 0; i < length; i++) {\n    absolute = abs((int)vector[i]);\n\n    if (absolute > maximum) {\n      maximum = absolute;\n    }\n  }\n\n  // Guard the case for abs(-32768).\n  if (maximum > WEBRTC_SPL_WORD16_MAX) {\n    maximum = WEBRTC_SPL_WORD16_MAX;\n  }\n\n  return (int16_t)maximum;\n}\n\n// Maximum absolute value of word32 vector. C version for generic platforms.\nint32_t WebRtcSpl_MaxAbsValueW32C(const int32_t* vector, size_t length) {\n  // Use uint32_t for the local variables, to accommodate the return value\n  // of abs(0x80000000), which is 0x80000000.\n\n  uint32_t absolute = 0, maximum = 0;\n  size_t i = 0;\n\n  RTC_DCHECK_GT(length, 0);\n\n  for (i = 0; i < length; i++) {\n    absolute = abs((int)vector[i]);\n    if (absolute > maximum) {\n      maximum = absolute;\n    }\n  }\n\n  maximum = WEBRTC_SPL_MIN(maximum, WEBRTC_SPL_WORD32_MAX);\n\n  return (int32_t)maximum;\n}\n\n// Maximum value of word16 vector. C version for generic platforms.\nint16_t WebRtcSpl_MaxValueW16C(const int16_t* vector, size_t length) {\n  int16_t maximum = WEBRTC_SPL_WORD16_MIN;\n  size_t i = 0;\n\n  RTC_DCHECK_GT(length, 0);\n\n  for (i = 0; i < length; i++) {\n    if (vector[i] > maximum)\n      maximum = vector[i];\n  }\n  return maximum;\n}\n\n// Maximum value of word32 vector. C version for generic platforms.\nint32_t WebRtcSpl_MaxValueW32C(const int32_t* vector, size_t length) {\n  int32_t maximum = WEBRTC_SPL_WORD32_MIN;\n  size_t i = 0;\n\n  RTC_DCHECK_GT(length, 0);\n\n  for (i = 0; i < length; i++) {\n    if (vector[i] > maximum)\n      maximum = vector[i];\n  }\n  return maximum;\n}\n\n// Minimum value of word16 vector. C version for generic platforms.\nint16_t WebRtcSpl_MinValueW16C(const int16_t* vector, size_t length) {\n  int16_t minimum = WEBRTC_SPL_WORD16_MAX;\n  size_t i = 0;\n\n  RTC_DCHECK_GT(length, 0);\n\n  for (i = 0; i < length; i++) {\n    if (vector[i] < minimum)\n      minimum = vector[i];\n  }\n  return minimum;\n}\n\n// Minimum value of word32 vector. C version for generic platforms.\nint32_t WebRtcSpl_MinValueW32C(const int32_t* vector, size_t length) {\n  int32_t minimum = WEBRTC_SPL_WORD32_MAX;\n  size_t i = 0;\n\n  RTC_DCHECK_GT(length, 0);\n\n  for (i = 0; i < length; i++) {\n    if (vector[i] < minimum)\n      minimum = vector[i];\n  }\n  return minimum;\n}\n\n// Index of maximum absolute value in a word16 vector.\nsize_t WebRtcSpl_MaxAbsIndexW16(const int16_t* vector, size_t length) {\n  // Use type int for local variables, to accomodate the value of abs(-32768).\n\n  size_t i = 0, index = 0;\n  int absolute = 0, maximum = 0;\n\n  RTC_DCHECK_GT(length, 0);\n\n  for (i = 0; i < length; i++) {\n    absolute = abs((int)vector[i]);\n\n    if (absolute > maximum) {\n      maximum = absolute;\n      index = i;\n    }\n  }\n\n  return index;\n}\n\n// Index of maximum value in a word16 vector.\nsize_t WebRtcSpl_MaxIndexW16(const int16_t* vector, size_t length) {\n  size_t i = 0, index = 0;\n  int16_t maximum = WEBRTC_SPL_WORD16_MIN;\n\n  RTC_DCHECK_GT(length, 0);\n\n  for (i = 0; i < length; i++) {\n    if (vector[i] > maximum) {\n      maximum = vector[i];\n      index = i;\n    }\n  }\n\n  return index;\n}\n\n// Index of maximum value in a word32 vector.\nsize_t WebRtcSpl_MaxIndexW32(const int32_t* vector, size_t length) {\n  size_t i = 0, index = 0;\n  int32_t maximum = WEBRTC_SPL_WORD32_MIN;\n\n  RTC_DCHECK_GT(length, 0);\n\n  for (i = 0; i < length; i++) {\n    if (vector[i] > maximum) {\n      maximum = vector[i];\n      index = i;\n    }\n  }\n\n  return index;\n}\n\n// Index of minimum value in a word16 vector.\nsize_t WebRtcSpl_MinIndexW16(const int16_t* vector, size_t length) {\n  size_t i = 0, index = 0;\n  int16_t minimum = WEBRTC_SPL_WORD16_MAX;\n\n  RTC_DCHECK_GT(length, 0);\n\n  for (i = 0; i < length; i++) {\n    if (vector[i] < minimum) {\n      minimum = vector[i];\n      index = i;\n    }\n  }\n\n  return index;\n}\n\n// Index of minimum value in a word32 vector.\nsize_t WebRtcSpl_MinIndexW32(const int32_t* vector, size_t length) {\n  size_t i = 0, index = 0;\n  int32_t minimum = WEBRTC_SPL_WORD32_MAX;\n\n  RTC_DCHECK_GT(length, 0);\n\n  for (i = 0; i < length; i++) {\n    if (vector[i] < minimum) {\n      minimum = vector[i];\n      index = i;\n    }\n  }\n\n  return index;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/min_max_operations_neon.c",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifdef WEBRTC_ARCH_ARM_FAMILY\n\n#include <arm_neon.h>\n#include <stdlib.h>\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n// Maximum absolute value of word16 vector. C version for generic platforms.\nint16_t WebRtcSpl_MaxAbsValueW16Neon(const int16_t* vector, size_t length) {\n  int absolute = 0, maximum = 0;\n\n  RTC_DCHECK_GT(length, 0);\n\n  const int16_t* p_start = vector;\n  size_t rest = length & 7;\n  const int16_t* p_end = vector + length - rest;\n\n  int16x8_t v;\n  uint16x8_t max_qv;\n  max_qv = vdupq_n_u16(0);\n\n  while (p_start < p_end) {\n    v = vld1q_s16(p_start);\n    // Note vabs doesn't change the value of -32768.\n    v = vabsq_s16(v);\n    // Use u16 so we don't lose the value -32768.\n    max_qv = vmaxq_u16(max_qv, vreinterpretq_u16_s16(v));\n    p_start += 8;\n  }\n\n#ifdef WEBRTC_ARCH_ARM64\n  maximum = (int)vmaxvq_u16(max_qv);\n#else\n  uint16x4_t max_dv;\n  max_dv = vmax_u16(vget_low_u16(max_qv), vget_high_u16(max_qv));\n  max_dv = vpmax_u16(max_dv, max_dv);\n  max_dv = vpmax_u16(max_dv, max_dv);\n\n  maximum = (int)vget_lane_u16(max_dv, 0);\n#endif\n\n  p_end = vector + length;\n  while (p_start < p_end) {\n    absolute = abs((int)(*p_start));\n\n    if (absolute > maximum) {\n      maximum = absolute;\n    }\n    p_start++;\n  }\n\n  // Guard the case for abs(-32768).\n  if (maximum > WEBRTC_SPL_WORD16_MAX) {\n    maximum = WEBRTC_SPL_WORD16_MAX;\n  }\n\n  return (int16_t)maximum;\n}\n\n// Maximum absolute value of word32 vector. NEON intrinsics version for\n// ARM 32-bit/64-bit platforms.\nint32_t WebRtcSpl_MaxAbsValueW32Neon(const int32_t* vector, size_t length) {\n  // Use uint32_t for the local variables, to accommodate the return value\n  // of abs(0x80000000), which is 0x80000000.\n\n  uint32_t absolute = 0, maximum = 0;\n  size_t i = 0;\n  size_t residual = length & 0x7;\n\n  RTC_DCHECK_GT(length, 0);\n\n  const int32_t* p_start = vector;\n  uint32x4_t max32x4_0 = vdupq_n_u32(0);\n  uint32x4_t max32x4_1 = vdupq_n_u32(0);\n\n  // First part, unroll the loop 8 times.\n  for (i = 0; i < length - residual; i += 8) {\n    int32x4_t in32x4_0 = vld1q_s32(p_start);\n    p_start += 4;\n    int32x4_t in32x4_1 = vld1q_s32(p_start);\n    p_start += 4;\n    in32x4_0 = vabsq_s32(in32x4_0);\n    in32x4_1 = vabsq_s32(in32x4_1);\n    // vabs doesn't change the value of 0x80000000.\n    // Use u32 so we don't lose the value 0x80000000.\n    max32x4_0 = vmaxq_u32(max32x4_0, vreinterpretq_u32_s32(in32x4_0));\n    max32x4_1 = vmaxq_u32(max32x4_1, vreinterpretq_u32_s32(in32x4_1));\n  }\n\n  uint32x4_t max32x4 = vmaxq_u32(max32x4_0, max32x4_1);\n#if defined(WEBRTC_ARCH_ARM64)\n  maximum = vmaxvq_u32(max32x4);\n#else\n  uint32x2_t max32x2 = vmax_u32(vget_low_u32(max32x4), vget_high_u32(max32x4));\n  max32x2 = vpmax_u32(max32x2, max32x2);\n\n  maximum = vget_lane_u32(max32x2, 0);\n#endif\n\n  // Second part, do the remaining iterations (if any).\n  for (i = residual; i > 0; i--) {\n    absolute = abs((int)(*p_start));\n    if (absolute > maximum) {\n      maximum = absolute;\n    }\n    p_start++;\n  }\n\n  // Guard against the case for 0x80000000.\n  maximum = WEBRTC_SPL_MIN(maximum, WEBRTC_SPL_WORD32_MAX);\n\n  return (int32_t)maximum;\n}\n\n// Maximum value of word16 vector. NEON intrinsics version for\n// ARM 32-bit/64-bit platforms.\nint16_t WebRtcSpl_MaxValueW16Neon(const int16_t* vector, size_t length) {\n  int16_t maximum = WEBRTC_SPL_WORD16_MIN;\n  size_t i = 0;\n  size_t residual = length & 0x7;\n\n  RTC_DCHECK_GT(length, 0);\n\n  const int16_t* p_start = vector;\n  int16x8_t max16x8 = vdupq_n_s16(WEBRTC_SPL_WORD16_MIN);\n\n  // First part, unroll the loop 8 times.\n  for (i = 0; i < length - residual; i += 8) {\n    int16x8_t in16x8 = vld1q_s16(p_start);\n    max16x8 = vmaxq_s16(max16x8, in16x8);\n    p_start += 8;\n  }\n\n#if defined(WEBRTC_ARCH_ARM64)\n  maximum = vmaxvq_s16(max16x8);\n#else\n  int16x4_t max16x4 = vmax_s16(vget_low_s16(max16x8), vget_high_s16(max16x8));\n  max16x4 = vpmax_s16(max16x4, max16x4);\n  max16x4 = vpmax_s16(max16x4, max16x4);\n\n  maximum = vget_lane_s16(max16x4, 0);\n#endif\n\n  // Second part, do the remaining iterations (if any).\n  for (i = residual; i > 0; i--) {\n    if (*p_start > maximum)\n      maximum = *p_start;\n    p_start++;\n  }\n  return maximum;\n}\n\n// Maximum value of word32 vector. NEON intrinsics version for\n// ARM 32-bit/64-bit platforms.\nint32_t WebRtcSpl_MaxValueW32Neon(const int32_t* vector, size_t length) {\n  int32_t maximum = WEBRTC_SPL_WORD32_MIN;\n  size_t i = 0;\n  size_t residual = length & 0x7;\n\n  RTC_DCHECK_GT(length, 0);\n\n  const int32_t* p_start = vector;\n  int32x4_t max32x4_0 = vdupq_n_s32(WEBRTC_SPL_WORD32_MIN);\n  int32x4_t max32x4_1 = vdupq_n_s32(WEBRTC_SPL_WORD32_MIN);\n\n  // First part, unroll the loop 8 times.\n  for (i = 0; i < length - residual; i += 8) {\n    int32x4_t in32x4_0 = vld1q_s32(p_start);\n    p_start += 4;\n    int32x4_t in32x4_1 = vld1q_s32(p_start);\n    p_start += 4;\n    max32x4_0 = vmaxq_s32(max32x4_0, in32x4_0);\n    max32x4_1 = vmaxq_s32(max32x4_1, in32x4_1);\n  }\n\n  int32x4_t max32x4 = vmaxq_s32(max32x4_0, max32x4_1);\n#if defined(WEBRTC_ARCH_ARM64)\n  maximum = vmaxvq_s32(max32x4);\n#else\n  int32x2_t max32x2 = vmax_s32(vget_low_s32(max32x4), vget_high_s32(max32x4));\n  max32x2 = vpmax_s32(max32x2, max32x2);\n\n  maximum = vget_lane_s32(max32x2, 0);\n#endif\n\n  // Second part, do the remaining iterations (if any).\n  for (i = residual; i > 0; i--) {\n    if (*p_start > maximum)\n      maximum = *p_start;\n    p_start++;\n  }\n  return maximum;\n}\n\n// Minimum value of word16 vector. NEON intrinsics version for\n// ARM 32-bit/64-bit platforms.\nint16_t WebRtcSpl_MinValueW16Neon(const int16_t* vector, size_t length) {\n  int16_t minimum = WEBRTC_SPL_WORD16_MAX;\n  size_t i = 0;\n  size_t residual = length & 0x7;\n\n  RTC_DCHECK_GT(length, 0);\n\n  const int16_t* p_start = vector;\n  int16x8_t min16x8 = vdupq_n_s16(WEBRTC_SPL_WORD16_MAX);\n\n  // First part, unroll the loop 8 times.\n  for (i = 0; i < length - residual; i += 8) {\n    int16x8_t in16x8 = vld1q_s16(p_start);\n    min16x8 = vminq_s16(min16x8, in16x8);\n    p_start += 8;\n  }\n\n#if defined(WEBRTC_ARCH_ARM64)\n  minimum = vminvq_s16(min16x8);\n#else\n  int16x4_t min16x4 = vmin_s16(vget_low_s16(min16x8), vget_high_s16(min16x8));\n  min16x4 = vpmin_s16(min16x4, min16x4);\n  min16x4 = vpmin_s16(min16x4, min16x4);\n\n  minimum = vget_lane_s16(min16x4, 0);\n#endif\n\n  // Second part, do the remaining iterations (if any).\n  for (i = residual; i > 0; i--) {\n    if (*p_start < minimum)\n      minimum = *p_start;\n    p_start++;\n  }\n  return minimum;\n}\n\n// Minimum value of word32 vector. NEON intrinsics version for\n// ARM 32-bit/64-bit platforms.\nint32_t WebRtcSpl_MinValueW32Neon(const int32_t* vector, size_t length) {\n  int32_t minimum = WEBRTC_SPL_WORD32_MAX;\n  size_t i = 0;\n  size_t residual = length & 0x7;\n\n  RTC_DCHECK_GT(length, 0);\n\n  const int32_t* p_start = vector;\n  int32x4_t min32x4_0 = vdupq_n_s32(WEBRTC_SPL_WORD32_MAX);\n  int32x4_t min32x4_1 = vdupq_n_s32(WEBRTC_SPL_WORD32_MAX);\n\n  // First part, unroll the loop 8 times.\n  for (i = 0; i < length - residual; i += 8) {\n    int32x4_t in32x4_0 = vld1q_s32(p_start);\n    p_start += 4;\n    int32x4_t in32x4_1 = vld1q_s32(p_start);\n    p_start += 4;\n    min32x4_0 = vminq_s32(min32x4_0, in32x4_0);\n    min32x4_1 = vminq_s32(min32x4_1, in32x4_1);\n  }\n\n  int32x4_t min32x4 = vminq_s32(min32x4_0, min32x4_1);\n#if defined(WEBRTC_ARCH_ARM64)\n  minimum = vminvq_s32(min32x4);\n#else\n  int32x2_t min32x2 = vmin_s32(vget_low_s32(min32x4), vget_high_s32(min32x4));\n  min32x2 = vpmin_s32(min32x2, min32x2);\n\n  minimum = vget_lane_s32(min32x2, 0);\n#endif\n\n  // Second part, do the remaining iterations (if any).\n  for (i = residual; i > 0; i--) {\n    if (*p_start < minimum)\n      minimum = *p_start;\n    p_start++;\n  }\n  return minimum;\n}\n\n#endif\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/randomization_functions.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains implementations of the randomization functions\n * WebRtcSpl_RandU()\n * WebRtcSpl_RandN()\n * WebRtcSpl_RandUArray()\n *\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nstatic const uint32_t kMaxSeedUsed = 0x80000000;\n\nstatic const int16_t kRandNTable[] = {\n    9178,    -7260,       40,    10189,     4894,    -3531,   -13779,    14764,\n   -4008,    -8884,    -8990,     1008,     7368,     5184,     3251,    -5817,\n   -9786,     5963,     1770,     8066,    -7135,    10772,    -2298,     1361,\n    6484,     2241,    -8633,      792,      199,    -3344,     6553,   -10079,\n  -15040,       95,    11608,   -12469,    14161,    -4176,     2476,     6403,\n   13685,   -16005,     6646,     2239,    10916,    -3004,     -602,    -3141,\n    2142,    14144,    -5829,     5305,     8209,     4713,     2697,    -5112,\n   16092,    -1210,    -2891,    -6631,    -5360,   -11878,    -6781,    -2739,\n   -6392,      536,    10923,    10872,     5059,    -4748,    -7770,     5477,\n      38,    -1025,    -2892,     1638,     6304,    14375,   -11028,     1553,\n   -1565,    10762,     -393,     4040,     5257,    12310,     6554,    -4799,\n    4899,    -6354,     1603,    -1048,    -2220,     8247,     -186,    -8944,\n  -12004,     2332,     4801,    -4933,     6371,      131,     8614,    -5927,\n   -8287,   -22760,     4033,   -15162,     3385,     3246,     3153,    -5250,\n    3766,      784,     6494,      -62,     3531,    -1582,    15572,      662,\n   -3952,     -330,    -3196,      669,     7236,    -2678,    -6569,    23319,\n   -8645,     -741,    14830,   -15976,     4903,      315,   -11342,    10311,\n    1858,    -7777,     2145,     5436,     5677,     -113,   -10033,      826,\n   -1353,    17210,     7768,      986,    -1471,     8291,    -4982,     8207,\n  -14911,    -6255,    -2449,   -11881,    -7059,   -11703,    -4338,     8025,\n    7538,    -2823,   -12490,     9470,    -1613,    -2529,   -10092,    -7807,\n    9480,     6970,   -12844,     5123,     3532,     4816,     4803,    -8455,\n   -5045,    14032,    -4378,    -1643,     5756,   -11041,    -2732,   -16618,\n   -6430,   -18375,    -3320,     6098,     5131,    -4269,    -8840,     2482,\n   -7048,     1547,   -21890,    -6505,    -7414,     -424,   -11722,     7955,\n    1653,   -17299,     1823,      473,    -9232,     3337,     1111,      873,\n    4018,    -8982,     9889,     3531,   -11763,    -3799,     7373,    -4539,\n    3231,     7054,    -8537,     7616,     6244,    16635,      447,    -2915,\n   13967,      705,    -2669,    -1520,    -1771,   -16188,     5956,     5117,\n    6371,    -9936,    -1448,     2480,     5128,     7550,    -8130,     5236,\n    8213,    -6443,     7707,    -1950,   -13811,     7218,     7031,    -3883,\n      67,     5731,    -2874,    13480,    -3743,     9298,    -3280,     3552,\n   -4425,      -18,    -3785,    -9988,    -5357,     5477,   -11794,     2117,\n    1416,    -9935,     3376,      802,    -5079,    -8243,    12652,       66,\n    3653,    -2368,     6781,   -21895,    -7227,     2487,     7839,     -385,\n    6646,    -7016,    -4658,     5531,    -1705,      834,      129,     3694,\n   -1343,     2238,   -22640,    -6417,   -11139,    11301,    -2945,    -3494,\n   -5626,      185,    -3615,    -2041,    -7972,    -3106,      -60,   -23497,\n   -1566,    17064,     3519,     2518,      304,    -6805,   -10269,     2105,\n    1936,     -426,     -736,    -8122,    -1467,     4238,    -6939,   -13309,\n     360,     7402,    -7970,    12576,     3287,    12194,    -6289,   -16006,\n    9171,     4042,    -9193,     9123,    -2512,     6388,    -4734,    -8739,\n    1028,    -5406,    -1696,     5889,     -666,    -4736,     4971,     3565,\n    9362,    -6292,     3876,    -3652,   -19666,     7523,    -4061,      391,\n  -11773,     7502,    -3763,     4929,    -9478,    13278,     2805,     4496,\n    7814,    16419,    12455,   -14773,     2127,    -2746,     3763,     4847,\n    3698,     6978,     4751,    -6957,    -3581,      -45,     6252,     1513,\n   -4797,    -7925,    11270,    16188,    -2359,    -5269,     9376,   -10777,\n    7262,    20031,    -6515,    -2208,    -5353,     8085,    -1341,    -1303,\n    7333,     5576,     3625,     5763,    -7931,     9833,    -3371,   -10305,\n    6534,   -13539,    -9971,      997,     8464,    -4064,    -1495,     1857,\n   13624,     5458,     9490,   -11086,    -4524,    12022,     -550,     -198,\n     408,    -8455,    -7068,    10289,     9712,    -3366,     9028,    -7621,\n   -5243,     2362,     6909,     4672,    -4933,    -1799,     4709,    -4563,\n     -62,     -566,     1624,    -7010,    14730,   -17791,    -3697,    -2344,\n   -1741,     7099,    -9509,    -6855,    -1989,     3495,    -2289,     2031,\n   12784,      891,    14189,    -3963,    -5683,      421,   -12575,     1724,\n  -12682,    -5970,    -8169,     3143,    -1824,    -5488,    -5130,     8536,\n   12799,      794,     5738,     3459,   -11689,     -258,    -3738,    -3775,\n   -8742,     2333,     8312,    -9383,    10331,    13119,     8398,    10644,\n  -19433,    -6446,   -16277,   -11793,    16284,     9345,    15222,    15834,\n    2009,    -7349,      130,   -14547,      338,    -5998,     3337,    21492,\n    2406,     7703,     -951,    11196,     -564,     3406,     2217,     4806,\n    2374,    -5797,    11839,     8940,   -11874,    18213,     2855,    10492\n};\n\nstatic uint32_t IncreaseSeed(uint32_t* seed) {\n  seed[0] = (seed[0] * ((int32_t)69069) + 1) & (kMaxSeedUsed - 1);\n  return seed[0];\n}\n\nint16_t WebRtcSpl_RandU(uint32_t* seed) {\n  return (int16_t)(IncreaseSeed(seed) >> 16);\n}\n\nint16_t WebRtcSpl_RandN(uint32_t* seed) {\n  return kRandNTable[IncreaseSeed(seed) >> 23];\n}\n\n// Creates an array of uniformly distributed variables.\nint16_t WebRtcSpl_RandUArray(int16_t* vector,\n                             int16_t vector_length,\n                             uint32_t* seed) {\n  int i;\n  for (i = 0; i < vector_length; i++) {\n    vector[i] = WebRtcSpl_RandU(seed);\n  }\n  return vector_length;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/real_fft.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/signal_processing/include/real_fft.h\"\n\n#include <stdlib.h>\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nstruct RealFFT {\n  int order;\n};\n\nstruct RealFFT* WebRtcSpl_CreateRealFFT(int order) {\n  struct RealFFT* self = NULL;\n\n  if (order > kMaxFFTOrder || order < 0) {\n    return NULL;\n  }\n\n  self = malloc(sizeof(struct RealFFT));\n  if (self == NULL) {\n    return NULL;\n  }\n  self->order = order;\n\n  return self;\n}\n\nvoid WebRtcSpl_FreeRealFFT(struct RealFFT* self) {\n  if (self != NULL) {\n    free(self);\n  }\n}\n\n// The C version FFT functions (i.e. WebRtcSpl_RealForwardFFT and\n// WebRtcSpl_RealInverseFFT) are real-valued FFT wrappers for complex-valued\n// FFT implementation in SPL.\n\nint WebRtcSpl_RealForwardFFT(struct RealFFT* self,\n                             const int16_t* real_data_in,\n                             int16_t* complex_data_out) {\n  int i = 0;\n  int j = 0;\n  int result = 0;\n  int n = 1 << self->order;\n  // The complex-value FFT implementation needs a buffer to hold 2^order\n  // 16-bit COMPLEX numbers, for both time and frequency data.\n  int16_t complex_buffer[2 << kMaxFFTOrder];\n\n  // Insert zeros to the imaginary parts for complex forward FFT input.\n  for (i = 0, j = 0; i < n; i += 1, j += 2) {\n    complex_buffer[j] = real_data_in[i];\n    complex_buffer[j + 1] = 0;\n  };\n\n  WebRtcSpl_ComplexBitReverse(complex_buffer, self->order);\n  result = WebRtcSpl_ComplexFFT(complex_buffer, self->order, 1);\n\n  // For real FFT output, use only the first N + 2 elements from\n  // complex forward FFT.\n  memcpy(complex_data_out, complex_buffer, sizeof(int16_t) * (n + 2));\n\n  return result;\n}\n\nint WebRtcSpl_RealInverseFFT(struct RealFFT* self,\n                             const int16_t* complex_data_in,\n                             int16_t* real_data_out) {\n  int i = 0;\n  int j = 0;\n  int result = 0;\n  int n = 1 << self->order;\n  // Create the buffer specific to complex-valued FFT implementation.\n  int16_t complex_buffer[2 << kMaxFFTOrder];\n\n  // For n-point FFT, first copy the first n + 2 elements into complex\n  // FFT, then construct the remaining n - 2 elements by real FFT's\n  // conjugate-symmetric properties.\n  memcpy(complex_buffer, complex_data_in, sizeof(int16_t) * (n + 2));\n  for (i = n + 2; i < 2 * n; i += 2) {\n    complex_buffer[i] = complex_data_in[2 * n - i];\n    complex_buffer[i + 1] = -complex_data_in[2 * n - i + 1];\n  }\n\n  WebRtcSpl_ComplexBitReverse(complex_buffer, self->order);\n  result = WebRtcSpl_ComplexIFFT(complex_buffer, self->order, 1);\n\n  // Strip out the imaginary parts of the complex inverse FFT output.\n  for (i = 0, j = 0; i < n; i += 1, j += 2) {\n    real_data_out[i] = complex_buffer[j];\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/refl_coef_to_lpc.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_ReflCoefToLpc().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nvoid WebRtcSpl_ReflCoefToLpc(const int16_t *k, int use_order, int16_t *a)\n{\n    int16_t any[WEBRTC_SPL_MAX_LPC_ORDER + 1];\n    int16_t *aptr, *aptr2, *anyptr;\n    const int16_t *kptr;\n    int m, i;\n\n    kptr = k;\n    *a = 4096; // i.e., (Word16_MAX >> 3)+1.\n    *any = *a;\n    a[1] = *k >> 3;\n\n    for (m = 1; m < use_order; m++)\n    {\n        kptr++;\n        aptr = a;\n        aptr++;\n        aptr2 = &a[m];\n        anyptr = any;\n        anyptr++;\n\n        any[m + 1] = *kptr >> 3;\n        for (i = 0; i < m; i++)\n        {\n            *anyptr = *aptr + (int16_t)((*aptr2 * *kptr) >> 15);\n            anyptr++;\n            aptr++;\n            aptr2--;\n        }\n\n        aptr = a;\n        anyptr = any;\n        for (i = 0; i < (m + 2); i++)\n        {\n            *aptr = *anyptr;\n            aptr++;\n            anyptr++;\n        }\n    }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/resample.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the resampling functions for 22 kHz.\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n#include \"webrtc/common_audio/signal_processing/resample_by_2_internal.h\"\n\n// Declaration of internally used functions\nstatic void WebRtcSpl_32khzTo22khzIntToShort(const int32_t *In, int16_t *Out,\n                                             int32_t K);\n\nvoid WebRtcSpl_32khzTo22khzIntToInt(const int32_t *In, int32_t *Out,\n                                    int32_t K);\n\n// interpolation coefficients\nstatic const int16_t kCoefficients32To22[5][9] = {\n        {127, -712,  2359, -6333, 23456, 16775, -3695,  945, -154},\n        {-39,  230,  -830,  2785, 32366, -2324,   760, -218,   38},\n        {117, -663,  2222, -6133, 26634, 13070, -3174,  831, -137},\n        {-77,  457, -1677,  5958, 31175, -4136,  1405, -408,   71},\n        { 98, -560,  1900, -5406, 29240,  9423, -2480,  663, -110}\n};\n\n//////////////////////\n// 22 kHz -> 16 kHz //\n//////////////////////\n\n// number of subblocks; options: 1, 2, 4, 5, 10\n#define SUB_BLOCKS_22_16    5\n\n// 22 -> 16 resampler\nvoid WebRtcSpl_Resample22khzTo16khz(const int16_t* in, int16_t* out,\n                                    WebRtcSpl_State22khzTo16khz* state, int32_t* tmpmem)\n{\n    int k;\n\n    // process two blocks of 10/SUB_BLOCKS_22_16 ms (to reduce temp buffer size)\n    for (k = 0; k < SUB_BLOCKS_22_16; k++)\n    {\n        ///// 22 --> 44 /////\n        // int16_t  in[220/SUB_BLOCKS_22_16]\n        // int32_t out[440/SUB_BLOCKS_22_16]\n        /////\n        WebRtcSpl_UpBy2ShortToInt(in, 220 / SUB_BLOCKS_22_16, tmpmem + 16, state->S_22_44);\n\n        ///// 44 --> 32 /////\n        // int32_t  in[440/SUB_BLOCKS_22_16]\n        // int32_t out[320/SUB_BLOCKS_22_16]\n        /////\n        // copy state to and from input array\n        tmpmem[8] = state->S_44_32[0];\n        tmpmem[9] = state->S_44_32[1];\n        tmpmem[10] = state->S_44_32[2];\n        tmpmem[11] = state->S_44_32[3];\n        tmpmem[12] = state->S_44_32[4];\n        tmpmem[13] = state->S_44_32[5];\n        tmpmem[14] = state->S_44_32[6];\n        tmpmem[15] = state->S_44_32[7];\n        state->S_44_32[0] = tmpmem[440 / SUB_BLOCKS_22_16 + 8];\n        state->S_44_32[1] = tmpmem[440 / SUB_BLOCKS_22_16 + 9];\n        state->S_44_32[2] = tmpmem[440 / SUB_BLOCKS_22_16 + 10];\n        state->S_44_32[3] = tmpmem[440 / SUB_BLOCKS_22_16 + 11];\n        state->S_44_32[4] = tmpmem[440 / SUB_BLOCKS_22_16 + 12];\n        state->S_44_32[5] = tmpmem[440 / SUB_BLOCKS_22_16 + 13];\n        state->S_44_32[6] = tmpmem[440 / SUB_BLOCKS_22_16 + 14];\n        state->S_44_32[7] = tmpmem[440 / SUB_BLOCKS_22_16 + 15];\n\n        WebRtcSpl_Resample44khzTo32khz(tmpmem + 8, tmpmem, 40 / SUB_BLOCKS_22_16);\n\n        ///// 32 --> 16 /////\n        // int32_t  in[320/SUB_BLOCKS_22_16]\n        // int32_t out[160/SUB_BLOCKS_22_16]\n        /////\n        WebRtcSpl_DownBy2IntToShort(tmpmem, 320 / SUB_BLOCKS_22_16, out, state->S_32_16);\n\n        // move input/output pointers 10/SUB_BLOCKS_22_16 ms seconds ahead\n        in += 220 / SUB_BLOCKS_22_16;\n        out += 160 / SUB_BLOCKS_22_16;\n    }\n}\n\n// initialize state of 22 -> 16 resampler\nvoid WebRtcSpl_ResetResample22khzTo16khz(WebRtcSpl_State22khzTo16khz* state)\n{\n    int k;\n    for (k = 0; k < 8; k++)\n    {\n        state->S_22_44[k] = 0;\n        state->S_44_32[k] = 0;\n        state->S_32_16[k] = 0;\n    }\n}\n\n//////////////////////\n// 16 kHz -> 22 kHz //\n//////////////////////\n\n// number of subblocks; options: 1, 2, 4, 5, 10\n#define SUB_BLOCKS_16_22    4\n\n// 16 -> 22 resampler\nvoid WebRtcSpl_Resample16khzTo22khz(const int16_t* in, int16_t* out,\n                                    WebRtcSpl_State16khzTo22khz* state, int32_t* tmpmem)\n{\n    int k;\n\n    // process two blocks of 10/SUB_BLOCKS_16_22 ms (to reduce temp buffer size)\n    for (k = 0; k < SUB_BLOCKS_16_22; k++)\n    {\n        ///// 16 --> 32 /////\n        // int16_t  in[160/SUB_BLOCKS_16_22]\n        // int32_t out[320/SUB_BLOCKS_16_22]\n        /////\n        WebRtcSpl_UpBy2ShortToInt(in, 160 / SUB_BLOCKS_16_22, tmpmem + 8, state->S_16_32);\n\n        ///// 32 --> 22 /////\n        // int32_t  in[320/SUB_BLOCKS_16_22]\n        // int32_t out[220/SUB_BLOCKS_16_22]\n        /////\n        // copy state to and from input array\n        tmpmem[0] = state->S_32_22[0];\n        tmpmem[1] = state->S_32_22[1];\n        tmpmem[2] = state->S_32_22[2];\n        tmpmem[3] = state->S_32_22[3];\n        tmpmem[4] = state->S_32_22[4];\n        tmpmem[5] = state->S_32_22[5];\n        tmpmem[6] = state->S_32_22[6];\n        tmpmem[7] = state->S_32_22[7];\n        state->S_32_22[0] = tmpmem[320 / SUB_BLOCKS_16_22];\n        state->S_32_22[1] = tmpmem[320 / SUB_BLOCKS_16_22 + 1];\n        state->S_32_22[2] = tmpmem[320 / SUB_BLOCKS_16_22 + 2];\n        state->S_32_22[3] = tmpmem[320 / SUB_BLOCKS_16_22 + 3];\n        state->S_32_22[4] = tmpmem[320 / SUB_BLOCKS_16_22 + 4];\n        state->S_32_22[5] = tmpmem[320 / SUB_BLOCKS_16_22 + 5];\n        state->S_32_22[6] = tmpmem[320 / SUB_BLOCKS_16_22 + 6];\n        state->S_32_22[7] = tmpmem[320 / SUB_BLOCKS_16_22 + 7];\n\n        WebRtcSpl_32khzTo22khzIntToShort(tmpmem, out, 20 / SUB_BLOCKS_16_22);\n\n        // move input/output pointers 10/SUB_BLOCKS_16_22 ms seconds ahead\n        in += 160 / SUB_BLOCKS_16_22;\n        out += 220 / SUB_BLOCKS_16_22;\n    }\n}\n\n// initialize state of 16 -> 22 resampler\nvoid WebRtcSpl_ResetResample16khzTo22khz(WebRtcSpl_State16khzTo22khz* state)\n{\n    int k;\n    for (k = 0; k < 8; k++)\n    {\n        state->S_16_32[k] = 0;\n        state->S_32_22[k] = 0;\n    }\n}\n\n//////////////////////\n// 22 kHz ->  8 kHz //\n//////////////////////\n\n// number of subblocks; options: 1, 2, 5, 10\n#define SUB_BLOCKS_22_8     2\n\n// 22 -> 8 resampler\nvoid WebRtcSpl_Resample22khzTo8khz(const int16_t* in, int16_t* out,\n                                   WebRtcSpl_State22khzTo8khz* state, int32_t* tmpmem)\n{\n    int k;\n\n    // process two blocks of 10/SUB_BLOCKS_22_8 ms (to reduce temp buffer size)\n    for (k = 0; k < SUB_BLOCKS_22_8; k++)\n    {\n        ///// 22 --> 22 lowpass /////\n        // int16_t  in[220/SUB_BLOCKS_22_8]\n        // int32_t out[220/SUB_BLOCKS_22_8]\n        /////\n        WebRtcSpl_LPBy2ShortToInt(in, 220 / SUB_BLOCKS_22_8, tmpmem + 16, state->S_22_22);\n\n        ///// 22 --> 16 /////\n        // int32_t  in[220/SUB_BLOCKS_22_8]\n        // int32_t out[160/SUB_BLOCKS_22_8]\n        /////\n        // copy state to and from input array\n        tmpmem[8] = state->S_22_16[0];\n        tmpmem[9] = state->S_22_16[1];\n        tmpmem[10] = state->S_22_16[2];\n        tmpmem[11] = state->S_22_16[3];\n        tmpmem[12] = state->S_22_16[4];\n        tmpmem[13] = state->S_22_16[5];\n        tmpmem[14] = state->S_22_16[6];\n        tmpmem[15] = state->S_22_16[7];\n        state->S_22_16[0] = tmpmem[220 / SUB_BLOCKS_22_8 + 8];\n        state->S_22_16[1] = tmpmem[220 / SUB_BLOCKS_22_8 + 9];\n        state->S_22_16[2] = tmpmem[220 / SUB_BLOCKS_22_8 + 10];\n        state->S_22_16[3] = tmpmem[220 / SUB_BLOCKS_22_8 + 11];\n        state->S_22_16[4] = tmpmem[220 / SUB_BLOCKS_22_8 + 12];\n        state->S_22_16[5] = tmpmem[220 / SUB_BLOCKS_22_8 + 13];\n        state->S_22_16[6] = tmpmem[220 / SUB_BLOCKS_22_8 + 14];\n        state->S_22_16[7] = tmpmem[220 / SUB_BLOCKS_22_8 + 15];\n\n        WebRtcSpl_Resample44khzTo32khz(tmpmem + 8, tmpmem, 20 / SUB_BLOCKS_22_8);\n\n        ///// 16 --> 8 /////\n        // int32_t in[160/SUB_BLOCKS_22_8]\n        // int32_t out[80/SUB_BLOCKS_22_8]\n        /////\n        WebRtcSpl_DownBy2IntToShort(tmpmem, 160 / SUB_BLOCKS_22_8, out, state->S_16_8);\n\n        // move input/output pointers 10/SUB_BLOCKS_22_8 ms seconds ahead\n        in += 220 / SUB_BLOCKS_22_8;\n        out += 80 / SUB_BLOCKS_22_8;\n    }\n}\n\n// initialize state of 22 -> 8 resampler\nvoid WebRtcSpl_ResetResample22khzTo8khz(WebRtcSpl_State22khzTo8khz* state)\n{\n    int k;\n    for (k = 0; k < 8; k++)\n    {\n        state->S_22_22[k] = 0;\n        state->S_22_22[k + 8] = 0;\n        state->S_22_16[k] = 0;\n        state->S_16_8[k] = 0;\n    }\n}\n\n//////////////////////\n//  8 kHz -> 22 kHz //\n//////////////////////\n\n// number of subblocks; options: 1, 2, 5, 10\n#define SUB_BLOCKS_8_22     2\n\n// 8 -> 22 resampler\nvoid WebRtcSpl_Resample8khzTo22khz(const int16_t* in, int16_t* out,\n                                   WebRtcSpl_State8khzTo22khz* state, int32_t* tmpmem)\n{\n    int k;\n\n    // process two blocks of 10/SUB_BLOCKS_8_22 ms (to reduce temp buffer size)\n    for (k = 0; k < SUB_BLOCKS_8_22; k++)\n    {\n        ///// 8 --> 16 /////\n        // int16_t  in[80/SUB_BLOCKS_8_22]\n        // int32_t out[160/SUB_BLOCKS_8_22]\n        /////\n        WebRtcSpl_UpBy2ShortToInt(in, 80 / SUB_BLOCKS_8_22, tmpmem + 18, state->S_8_16);\n\n        ///// 16 --> 11 /////\n        // int32_t  in[160/SUB_BLOCKS_8_22]\n        // int32_t out[110/SUB_BLOCKS_8_22]\n        /////\n        // copy state to and from input array\n        tmpmem[10] = state->S_16_11[0];\n        tmpmem[11] = state->S_16_11[1];\n        tmpmem[12] = state->S_16_11[2];\n        tmpmem[13] = state->S_16_11[3];\n        tmpmem[14] = state->S_16_11[4];\n        tmpmem[15] = state->S_16_11[5];\n        tmpmem[16] = state->S_16_11[6];\n        tmpmem[17] = state->S_16_11[7];\n        state->S_16_11[0] = tmpmem[160 / SUB_BLOCKS_8_22 + 10];\n        state->S_16_11[1] = tmpmem[160 / SUB_BLOCKS_8_22 + 11];\n        state->S_16_11[2] = tmpmem[160 / SUB_BLOCKS_8_22 + 12];\n        state->S_16_11[3] = tmpmem[160 / SUB_BLOCKS_8_22 + 13];\n        state->S_16_11[4] = tmpmem[160 / SUB_BLOCKS_8_22 + 14];\n        state->S_16_11[5] = tmpmem[160 / SUB_BLOCKS_8_22 + 15];\n        state->S_16_11[6] = tmpmem[160 / SUB_BLOCKS_8_22 + 16];\n        state->S_16_11[7] = tmpmem[160 / SUB_BLOCKS_8_22 + 17];\n\n        WebRtcSpl_32khzTo22khzIntToInt(tmpmem + 10, tmpmem, 10 / SUB_BLOCKS_8_22);\n\n        ///// 11 --> 22 /////\n        // int32_t  in[110/SUB_BLOCKS_8_22]\n        // int16_t out[220/SUB_BLOCKS_8_22]\n        /////\n        WebRtcSpl_UpBy2IntToShort(tmpmem, 110 / SUB_BLOCKS_8_22, out, state->S_11_22);\n\n        // move input/output pointers 10/SUB_BLOCKS_8_22 ms seconds ahead\n        in += 80 / SUB_BLOCKS_8_22;\n        out += 220 / SUB_BLOCKS_8_22;\n    }\n}\n\n// initialize state of 8 -> 22 resampler\nvoid WebRtcSpl_ResetResample8khzTo22khz(WebRtcSpl_State8khzTo22khz* state)\n{\n    int k;\n    for (k = 0; k < 8; k++)\n    {\n        state->S_8_16[k] = 0;\n        state->S_16_11[k] = 0;\n        state->S_11_22[k] = 0;\n    }\n}\n\n// compute two inner-products and store them to output array\nstatic void WebRtcSpl_DotProdIntToInt(const int32_t* in1, const int32_t* in2,\n                                      const int16_t* coef_ptr, int32_t* out1,\n                                      int32_t* out2)\n{\n    int32_t tmp1 = 16384;\n    int32_t tmp2 = 16384;\n    int16_t coef;\n\n    coef = coef_ptr[0];\n    tmp1 += coef * in1[0];\n    tmp2 += coef * in2[-0];\n\n    coef = coef_ptr[1];\n    tmp1 += coef * in1[1];\n    tmp2 += coef * in2[-1];\n\n    coef = coef_ptr[2];\n    tmp1 += coef * in1[2];\n    tmp2 += coef * in2[-2];\n\n    coef = coef_ptr[3];\n    tmp1 += coef * in1[3];\n    tmp2 += coef * in2[-3];\n\n    coef = coef_ptr[4];\n    tmp1 += coef * in1[4];\n    tmp2 += coef * in2[-4];\n\n    coef = coef_ptr[5];\n    tmp1 += coef * in1[5];\n    tmp2 += coef * in2[-5];\n\n    coef = coef_ptr[6];\n    tmp1 += coef * in1[6];\n    tmp2 += coef * in2[-6];\n\n    coef = coef_ptr[7];\n    tmp1 += coef * in1[7];\n    tmp2 += coef * in2[-7];\n\n    coef = coef_ptr[8];\n    *out1 = tmp1 + coef * in1[8];\n    *out2 = tmp2 + coef * in2[-8];\n}\n\n// compute two inner-products and store them to output array\nstatic void WebRtcSpl_DotProdIntToShort(const int32_t* in1, const int32_t* in2,\n                                        const int16_t* coef_ptr, int16_t* out1,\n                                        int16_t* out2)\n{\n    int32_t tmp1 = 16384;\n    int32_t tmp2 = 16384;\n    int16_t coef;\n\n    coef = coef_ptr[0];\n    tmp1 += coef * in1[0];\n    tmp2 += coef * in2[-0];\n\n    coef = coef_ptr[1];\n    tmp1 += coef * in1[1];\n    tmp2 += coef * in2[-1];\n\n    coef = coef_ptr[2];\n    tmp1 += coef * in1[2];\n    tmp2 += coef * in2[-2];\n\n    coef = coef_ptr[3];\n    tmp1 += coef * in1[3];\n    tmp2 += coef * in2[-3];\n\n    coef = coef_ptr[4];\n    tmp1 += coef * in1[4];\n    tmp2 += coef * in2[-4];\n\n    coef = coef_ptr[5];\n    tmp1 += coef * in1[5];\n    tmp2 += coef * in2[-5];\n\n    coef = coef_ptr[6];\n    tmp1 += coef * in1[6];\n    tmp2 += coef * in2[-6];\n\n    coef = coef_ptr[7];\n    tmp1 += coef * in1[7];\n    tmp2 += coef * in2[-7];\n\n    coef = coef_ptr[8];\n    tmp1 += coef * in1[8];\n    tmp2 += coef * in2[-8];\n\n    // scale down, round and saturate\n    tmp1 >>= 15;\n    if (tmp1 > (int32_t)0x00007FFF)\n        tmp1 = 0x00007FFF;\n    if (tmp1 < (int32_t)0xFFFF8000)\n        tmp1 = 0xFFFF8000;\n    tmp2 >>= 15;\n    if (tmp2 > (int32_t)0x00007FFF)\n        tmp2 = 0x00007FFF;\n    if (tmp2 < (int32_t)0xFFFF8000)\n        tmp2 = 0xFFFF8000;\n    *out1 = (int16_t)tmp1;\n    *out2 = (int16_t)tmp2;\n}\n\n//   Resampling ratio: 11/16\n// input:  int32_t (normalized, not saturated) :: size 16 * K\n// output: int32_t (shifted 15 positions to the left, + offset 16384) :: size 11 * K\n//      K: Number of blocks\n\nvoid WebRtcSpl_32khzTo22khzIntToInt(const int32_t* In,\n                                    int32_t* Out,\n                                    int32_t K)\n{\n    /////////////////////////////////////////////////////////////\n    // Filter operation:\n    //\n    // Perform resampling (16 input samples -> 11 output samples);\n    // process in sub blocks of size 16 samples.\n    int32_t m;\n\n    for (m = 0; m < K; m++)\n    {\n        // first output sample\n        Out[0] = ((int32_t)In[3] << 15) + (1 << 14);\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_DotProdIntToInt(&In[0], &In[22], kCoefficients32To22[0], &Out[1], &Out[10]);\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_DotProdIntToInt(&In[2], &In[20], kCoefficients32To22[1], &Out[2], &Out[9]);\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_DotProdIntToInt(&In[3], &In[19], kCoefficients32To22[2], &Out[3], &Out[8]);\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_DotProdIntToInt(&In[5], &In[17], kCoefficients32To22[3], &Out[4], &Out[7]);\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_DotProdIntToInt(&In[6], &In[16], kCoefficients32To22[4], &Out[5], &Out[6]);\n\n        // update pointers\n        In += 16;\n        Out += 11;\n    }\n}\n\n//   Resampling ratio: 11/16\n// input:  int32_t (normalized, not saturated) :: size 16 * K\n// output: int16_t (saturated) :: size 11 * K\n//      K: Number of blocks\n\nvoid WebRtcSpl_32khzTo22khzIntToShort(const int32_t *In,\n                                      int16_t *Out,\n                                      int32_t K)\n{\n    /////////////////////////////////////////////////////////////\n    // Filter operation:\n    //\n    // Perform resampling (16 input samples -> 11 output samples);\n    // process in sub blocks of size 16 samples.\n    int32_t tmp;\n    int32_t m;\n\n    for (m = 0; m < K; m++)\n    {\n        // first output sample\n        tmp = In[3];\n        if (tmp > (int32_t)0x00007FFF)\n            tmp = 0x00007FFF;\n        if (tmp < (int32_t)0xFFFF8000)\n            tmp = 0xFFFF8000;\n        Out[0] = (int16_t)tmp;\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_DotProdIntToShort(&In[0], &In[22], kCoefficients32To22[0], &Out[1], &Out[10]);\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_DotProdIntToShort(&In[2], &In[20], kCoefficients32To22[1], &Out[2], &Out[9]);\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_DotProdIntToShort(&In[3], &In[19], kCoefficients32To22[2], &Out[3], &Out[8]);\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_DotProdIntToShort(&In[5], &In[17], kCoefficients32To22[3], &Out[4], &Out[7]);\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_DotProdIntToShort(&In[6], &In[16], kCoefficients32To22[4], &Out[5], &Out[6]);\n\n        // update pointers\n        In += 16;\n        Out += 11;\n    }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/resample_48khz.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains resampling functions between 48 kHz and nb/wb.\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include <string.h>\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n#include \"webrtc/common_audio/signal_processing/resample_by_2_internal.h\"\n\n////////////////////////////\n///// 48 kHz -> 16 kHz /////\n////////////////////////////\n\n// 48 -> 16 resampler\nvoid WebRtcSpl_Resample48khzTo16khz(const int16_t* in, int16_t* out,\n                                    WebRtcSpl_State48khzTo16khz* state, int32_t* tmpmem)\n{\n    ///// 48 --> 48(LP) /////\n    // int16_t  in[480]\n    // int32_t out[480]\n    /////\n    WebRtcSpl_LPBy2ShortToInt(in, 480, tmpmem + 16, state->S_48_48);\n\n    ///// 48 --> 32 /////\n    // int32_t  in[480]\n    // int32_t out[320]\n    /////\n    // copy state to and from input array\n    memcpy(tmpmem + 8, state->S_48_32, 8 * sizeof(int32_t));\n    memcpy(state->S_48_32, tmpmem + 488, 8 * sizeof(int32_t));\n    WebRtcSpl_Resample48khzTo32khz(tmpmem + 8, tmpmem, 160);\n\n    ///// 32 --> 16 /////\n    // int32_t  in[320]\n    // int16_t out[160]\n    /////\n    WebRtcSpl_DownBy2IntToShort(tmpmem, 320, out, state->S_32_16);\n}\n\n// initialize state of 48 -> 16 resampler\nvoid WebRtcSpl_ResetResample48khzTo16khz(WebRtcSpl_State48khzTo16khz* state)\n{\n    memset(state->S_48_48, 0, 16 * sizeof(int32_t));\n    memset(state->S_48_32, 0, 8 * sizeof(int32_t));\n    memset(state->S_32_16, 0, 8 * sizeof(int32_t));\n}\n\n////////////////////////////\n///// 16 kHz -> 48 kHz /////\n////////////////////////////\n\n// 16 -> 48 resampler\nvoid WebRtcSpl_Resample16khzTo48khz(const int16_t* in, int16_t* out,\n                                    WebRtcSpl_State16khzTo48khz* state, int32_t* tmpmem)\n{\n    ///// 16 --> 32 /////\n    // int16_t  in[160]\n    // int32_t out[320]\n    /////\n    WebRtcSpl_UpBy2ShortToInt(in, 160, tmpmem + 16, state->S_16_32);\n\n    ///// 32 --> 24 /////\n    // int32_t  in[320]\n    // int32_t out[240]\n    // copy state to and from input array\n    /////\n    memcpy(tmpmem + 8, state->S_32_24, 8 * sizeof(int32_t));\n    memcpy(state->S_32_24, tmpmem + 328, 8 * sizeof(int32_t));\n    WebRtcSpl_Resample32khzTo24khz(tmpmem + 8, tmpmem, 80);\n\n    ///// 24 --> 48 /////\n    // int32_t  in[240]\n    // int16_t out[480]\n    /////\n    WebRtcSpl_UpBy2IntToShort(tmpmem, 240, out, state->S_24_48);\n}\n\n// initialize state of 16 -> 48 resampler\nvoid WebRtcSpl_ResetResample16khzTo48khz(WebRtcSpl_State16khzTo48khz* state)\n{\n    memset(state->S_16_32, 0, 8 * sizeof(int32_t));\n    memset(state->S_32_24, 0, 8 * sizeof(int32_t));\n    memset(state->S_24_48, 0, 8 * sizeof(int32_t));\n}\n\n////////////////////////////\n///// 48 kHz ->  8 kHz /////\n////////////////////////////\n\n// 48 -> 8 resampler\nvoid WebRtcSpl_Resample48khzTo8khz(const int16_t* in, int16_t* out,\n                                   WebRtcSpl_State48khzTo8khz* state, int32_t* tmpmem)\n{\n    ///// 48 --> 24 /////\n    // int16_t  in[480]\n    // int32_t out[240]\n    /////\n    WebRtcSpl_DownBy2ShortToInt(in, 480, tmpmem + 256, state->S_48_24);\n\n    ///// 24 --> 24(LP) /////\n    // int32_t  in[240]\n    // int32_t out[240]\n    /////\n    WebRtcSpl_LPBy2IntToInt(tmpmem + 256, 240, tmpmem + 16, state->S_24_24);\n\n    ///// 24 --> 16 /////\n    // int32_t  in[240]\n    // int32_t out[160]\n    /////\n    // copy state to and from input array\n    memcpy(tmpmem + 8, state->S_24_16, 8 * sizeof(int32_t));\n    memcpy(state->S_24_16, tmpmem + 248, 8 * sizeof(int32_t));\n    WebRtcSpl_Resample48khzTo32khz(tmpmem + 8, tmpmem, 80);\n\n    ///// 16 --> 8 /////\n    // int32_t  in[160]\n    // int16_t out[80]\n    /////\n    WebRtcSpl_DownBy2IntToShort(tmpmem, 160, out, state->S_16_8);\n}\n\n// initialize state of 48 -> 8 resampler\nvoid WebRtcSpl_ResetResample48khzTo8khz(WebRtcSpl_State48khzTo8khz* state)\n{\n    memset(state->S_48_24, 0, 8 * sizeof(int32_t));\n    memset(state->S_24_24, 0, 16 * sizeof(int32_t));\n    memset(state->S_24_16, 0, 8 * sizeof(int32_t));\n    memset(state->S_16_8, 0, 8 * sizeof(int32_t));\n}\n\n////////////////////////////\n/////  8 kHz -> 48 kHz /////\n////////////////////////////\n\n// 8 -> 48 resampler\nvoid WebRtcSpl_Resample8khzTo48khz(const int16_t* in, int16_t* out,\n                                   WebRtcSpl_State8khzTo48khz* state, int32_t* tmpmem)\n{\n    ///// 8 --> 16 /////\n    // int16_t  in[80]\n    // int32_t out[160]\n    /////\n    WebRtcSpl_UpBy2ShortToInt(in, 80, tmpmem + 264, state->S_8_16);\n\n    ///// 16 --> 12 /////\n    // int32_t  in[160]\n    // int32_t out[120]\n    /////\n    // copy state to and from input array\n    memcpy(tmpmem + 256, state->S_16_12, 8 * sizeof(int32_t));\n    memcpy(state->S_16_12, tmpmem + 416, 8 * sizeof(int32_t));\n    WebRtcSpl_Resample32khzTo24khz(tmpmem + 256, tmpmem + 240, 40);\n\n    ///// 12 --> 24 /////\n    // int32_t  in[120]\n    // int16_t out[240]\n    /////\n    WebRtcSpl_UpBy2IntToInt(tmpmem + 240, 120, tmpmem, state->S_12_24);\n\n    ///// 24 --> 48 /////\n    // int32_t  in[240]\n    // int16_t out[480]\n    /////\n    WebRtcSpl_UpBy2IntToShort(tmpmem, 240, out, state->S_24_48);\n}\n\n// initialize state of 8 -> 48 resampler\nvoid WebRtcSpl_ResetResample8khzTo48khz(WebRtcSpl_State8khzTo48khz* state)\n{\n    memset(state->S_8_16, 0, 8 * sizeof(int32_t));\n    memset(state->S_16_12, 0, 8 * sizeof(int32_t));\n    memset(state->S_12_24, 0, 8 * sizeof(int32_t));\n    memset(state->S_24_48, 0, 8 * sizeof(int32_t));\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/resample_by_2.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the resampling by two functions.\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n#ifdef WEBRTC_ARCH_ARM_V7\n\n// allpass filter coefficients.\nstatic const uint32_t kResampleAllpass1[3] = {3284, 24441, 49528 << 15};\nstatic const uint32_t kResampleAllpass2[3] =\n  {12199, 37471 << 15, 60255 << 15};\n\n// Multiply two 32-bit values and accumulate to another input value.\n// Return: state + ((diff * tbl_value) >> 16)\n\nstatic __inline int32_t MUL_ACCUM_1(int32_t tbl_value,\n                                    int32_t diff,\n                                    int32_t state) {\n  int32_t result;\n  __asm __volatile (\"smlawb %0, %1, %2, %3\": \"=r\"(result): \"r\"(diff),\n                                   \"r\"(tbl_value), \"r\"(state));\n  return result;\n}\n\n// Multiply two 32-bit values and accumulate to another input value.\n// Return: Return: state + (((diff << 1) * tbl_value) >> 32)\n//\n// The reason to introduce this function is that, in case we can't use smlawb\n// instruction (in MUL_ACCUM_1) due to input value range, we can still use \n// smmla to save some cycles.\n\nstatic __inline int32_t MUL_ACCUM_2(int32_t tbl_value,\n                                    int32_t diff,\n                                    int32_t state) {\n  int32_t result;\n  __asm __volatile (\"smmla %0, %1, %2, %3\": \"=r\"(result): \"r\"(diff << 1),\n                                  \"r\"(tbl_value), \"r\"(state));\n  return result;\n}\n\n#else\n\n// allpass filter coefficients.\nstatic const uint16_t kResampleAllpass1[3] = {3284, 24441, 49528};\nstatic const uint16_t kResampleAllpass2[3] = {12199, 37471, 60255};\n\n// Multiply a 32-bit value with a 16-bit value and accumulate to another input:\n#define MUL_ACCUM_1(a, b, c) WEBRTC_SPL_SCALEDIFF32(a, b, c)\n#define MUL_ACCUM_2(a, b, c) WEBRTC_SPL_SCALEDIFF32(a, b, c)\n\n#endif  // WEBRTC_ARCH_ARM_V7\n\n\n// decimator\n#if !defined(MIPS32_LE)\nvoid WebRtcSpl_DownsampleBy2(const int16_t* in, size_t len,\n                             int16_t* out, int32_t* filtState) {\n  int32_t tmp1, tmp2, diff, in32, out32;\n  size_t i;\n\n  register int32_t state0 = filtState[0];\n  register int32_t state1 = filtState[1];\n  register int32_t state2 = filtState[2];\n  register int32_t state3 = filtState[3];\n  register int32_t state4 = filtState[4];\n  register int32_t state5 = filtState[5];\n  register int32_t state6 = filtState[6];\n  register int32_t state7 = filtState[7];\n\n  for (i = (len >> 1); i > 0; i--) {\n    // lower allpass filter\n    in32 = (int32_t)(*in++) << 10;\n    diff = in32 - state1;\n    tmp1 = MUL_ACCUM_1(kResampleAllpass2[0], diff, state0);\n    state0 = in32;\n    diff = tmp1 - state2;\n    tmp2 = MUL_ACCUM_2(kResampleAllpass2[1], diff, state1);\n    state1 = tmp1;\n    diff = tmp2 - state3;\n    state3 = MUL_ACCUM_2(kResampleAllpass2[2], diff, state2);\n    state2 = tmp2;\n\n    // upper allpass filter\n    in32 = (int32_t)(*in++) << 10;\n    diff = in32 - state5;\n    tmp1 = MUL_ACCUM_1(kResampleAllpass1[0], diff, state4);\n    state4 = in32;\n    diff = tmp1 - state6;\n    tmp2 = MUL_ACCUM_1(kResampleAllpass1[1], diff, state5);\n    state5 = tmp1;\n    diff = tmp2 - state7;\n    state7 = MUL_ACCUM_2(kResampleAllpass1[2], diff, state6);\n    state6 = tmp2;\n\n    // add two allpass outputs, divide by two and round\n    out32 = (state3 + state7 + 1024) >> 11;\n\n    // limit amplitude to prevent wrap-around, and write to output array\n    *out++ = WebRtcSpl_SatW32ToW16(out32);\n  }\n\n  filtState[0] = state0;\n  filtState[1] = state1;\n  filtState[2] = state2;\n  filtState[3] = state3;\n  filtState[4] = state4;\n  filtState[5] = state5;\n  filtState[6] = state6;\n  filtState[7] = state7;\n}\n#endif  // #if defined(MIPS32_LE)\n\n\nvoid WebRtcSpl_UpsampleBy2(const int16_t* in, size_t len,\n                           int16_t* out, int32_t* filtState) {\n  int32_t tmp1, tmp2, diff, in32, out32;\n  size_t i;\n\n  register int32_t state0 = filtState[0];\n  register int32_t state1 = filtState[1];\n  register int32_t state2 = filtState[2];\n  register int32_t state3 = filtState[3];\n  register int32_t state4 = filtState[4];\n  register int32_t state5 = filtState[5];\n  register int32_t state6 = filtState[6];\n  register int32_t state7 = filtState[7];\n\n  for (i = len; i > 0; i--) {\n    // lower allpass filter\n    in32 = (int32_t)(*in++) << 10;\n    diff = in32 - state1;\n    tmp1 = MUL_ACCUM_1(kResampleAllpass1[0], diff, state0);\n    state0 = in32;\n    diff = tmp1 - state2;\n    tmp2 = MUL_ACCUM_1(kResampleAllpass1[1], diff, state1);\n    state1 = tmp1;\n    diff = tmp2 - state3;\n    state3 = MUL_ACCUM_2(kResampleAllpass1[2], diff, state2);\n    state2 = tmp2;\n\n    // round; limit amplitude to prevent wrap-around; write to output array\n    out32 = (state3 + 512) >> 10;\n    *out++ = WebRtcSpl_SatW32ToW16(out32);\n\n    // upper allpass filter\n    diff = in32 - state5;\n    tmp1 = MUL_ACCUM_1(kResampleAllpass2[0], diff, state4);\n    state4 = in32;\n    diff = tmp1 - state6;\n    tmp2 = MUL_ACCUM_2(kResampleAllpass2[1], diff, state5);\n    state5 = tmp1;\n    diff = tmp2 - state7;\n    state7 = MUL_ACCUM_2(kResampleAllpass2[2], diff, state6);\n    state6 = tmp2;\n\n    // round; limit amplitude to prevent wrap-around; write to output array\n    out32 = (state7 + 512) >> 10;\n    *out++ = WebRtcSpl_SatW32ToW16(out32);\n  }\n\n  filtState[0] = state0;\n  filtState[1] = state1;\n  filtState[2] = state2;\n  filtState[3] = state3;\n  filtState[4] = state4;\n  filtState[5] = state5;\n  filtState[6] = state6;\n  filtState[7] = state7;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/resample_by_2_internal.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This header file contains some internal resampling functions.\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/resample_by_2_internal.h\"\n\n// allpass filter coefficients.\nstatic const int16_t kResampleAllpass[2][3] = {\n        {821, 6110, 12382},\n        {3050, 9368, 15063}\n};\n\n//\n//   decimator\n// input:  int32_t (shifted 15 positions to the left, + offset 16384) OVERWRITTEN!\n// output: int16_t (saturated) (of length len/2)\n// state:  filter state array; length = 8\n\nvoid WebRtcSpl_DownBy2IntToShort(int32_t *in, int32_t len, int16_t *out,\n                                 int32_t *state)\n{\n    int32_t tmp0, tmp1, diff;\n    int32_t i;\n\n    len >>= 1;\n\n    // lower allpass filter (operates on even input samples)\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = in[i << 1];\n        diff = tmp0 - state[1];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[0] + diff * kResampleAllpass[1][0];\n        state[0] = tmp0;\n        diff = tmp1 - state[2];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[1] + diff * kResampleAllpass[1][1];\n        state[1] = tmp1;\n        diff = tmp0 - state[3];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[3] = state[2] + diff * kResampleAllpass[1][2];\n        state[2] = tmp0;\n\n        // divide by two and store temporarily\n        in[i << 1] = (state[3] >> 1);\n    }\n\n    in++;\n\n    // upper allpass filter (operates on odd input samples)\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = in[i << 1];\n        diff = tmp0 - state[5];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[4] + diff * kResampleAllpass[0][0];\n        state[4] = tmp0;\n        diff = tmp1 - state[6];\n        // scale down and round\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[5] + diff * kResampleAllpass[0][1];\n        state[5] = tmp1;\n        diff = tmp0 - state[7];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[7] = state[6] + diff * kResampleAllpass[0][2];\n        state[6] = tmp0;\n\n        // divide by two and store temporarily\n        in[i << 1] = (state[7] >> 1);\n    }\n\n    in--;\n\n    // combine allpass outputs\n    for (i = 0; i < len; i += 2)\n    {\n        // divide by two, add both allpass outputs and round\n        tmp0 = (in[i << 1] + in[(i << 1) + 1]) >> 15;\n        tmp1 = (in[(i << 1) + 2] + in[(i << 1) + 3]) >> 15;\n        if (tmp0 > (int32_t)0x00007FFF)\n            tmp0 = 0x00007FFF;\n        if (tmp0 < (int32_t)0xFFFF8000)\n            tmp0 = 0xFFFF8000;\n        out[i] = (int16_t)tmp0;\n        if (tmp1 > (int32_t)0x00007FFF)\n            tmp1 = 0x00007FFF;\n        if (tmp1 < (int32_t)0xFFFF8000)\n            tmp1 = 0xFFFF8000;\n        out[i + 1] = (int16_t)tmp1;\n    }\n}\n\n//\n//   decimator\n// input:  int16_t\n// output: int32_t (shifted 15 positions to the left, + offset 16384) (of length len/2)\n// state:  filter state array; length = 8\n\nvoid WebRtcSpl_DownBy2ShortToInt(const int16_t *in,\n                                  int32_t len,\n                                  int32_t *out,\n                                  int32_t *state)\n{\n    int32_t tmp0, tmp1, diff;\n    int32_t i;\n\n    len >>= 1;\n\n    // lower allpass filter (operates on even input samples)\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = ((int32_t)in[i << 1] << 15) + (1 << 14);\n        diff = tmp0 - state[1];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[0] + diff * kResampleAllpass[1][0];\n        state[0] = tmp0;\n        diff = tmp1 - state[2];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[1] + diff * kResampleAllpass[1][1];\n        state[1] = tmp1;\n        diff = tmp0 - state[3];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[3] = state[2] + diff * kResampleAllpass[1][2];\n        state[2] = tmp0;\n\n        // divide by two and store temporarily\n        out[i] = (state[3] >> 1);\n    }\n\n    in++;\n\n    // upper allpass filter (operates on odd input samples)\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = ((int32_t)in[i << 1] << 15) + (1 << 14);\n        diff = tmp0 - state[5];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[4] + diff * kResampleAllpass[0][0];\n        state[4] = tmp0;\n        diff = tmp1 - state[6];\n        // scale down and round\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[5] + diff * kResampleAllpass[0][1];\n        state[5] = tmp1;\n        diff = tmp0 - state[7];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[7] = state[6] + diff * kResampleAllpass[0][2];\n        state[6] = tmp0;\n\n        // divide by two and store temporarily\n        out[i] += (state[7] >> 1);\n    }\n\n    in--;\n}\n\n//\n//   interpolator\n// input:  int16_t\n// output: int32_t (normalized, not saturated) (of length len*2)\n// state:  filter state array; length = 8\nvoid WebRtcSpl_UpBy2ShortToInt(const int16_t *in, int32_t len, int32_t *out,\n                               int32_t *state)\n{\n    int32_t tmp0, tmp1, diff;\n    int32_t i;\n\n    // upper allpass filter (generates odd output samples)\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = ((int32_t)in[i] << 15) + (1 << 14);\n        diff = tmp0 - state[5];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[4] + diff * kResampleAllpass[0][0];\n        state[4] = tmp0;\n        diff = tmp1 - state[6];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[5] + diff * kResampleAllpass[0][1];\n        state[5] = tmp1;\n        diff = tmp0 - state[7];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[7] = state[6] + diff * kResampleAllpass[0][2];\n        state[6] = tmp0;\n\n        // scale down, round and store\n        out[i << 1] = state[7] >> 15;\n    }\n\n    out++;\n\n    // lower allpass filter (generates even output samples)\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = ((int32_t)in[i] << 15) + (1 << 14);\n        diff = tmp0 - state[1];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[0] + diff * kResampleAllpass[1][0];\n        state[0] = tmp0;\n        diff = tmp1 - state[2];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[1] + diff * kResampleAllpass[1][1];\n        state[1] = tmp1;\n        diff = tmp0 - state[3];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[3] = state[2] + diff * kResampleAllpass[1][2];\n        state[2] = tmp0;\n\n        // scale down, round and store\n        out[i << 1] = state[3] >> 15;\n    }\n}\n\n//\n//   interpolator\n// input:  int32_t (shifted 15 positions to the left, + offset 16384)\n// output: int32_t (shifted 15 positions to the left, + offset 16384) (of length len*2)\n// state:  filter state array; length = 8\nvoid WebRtcSpl_UpBy2IntToInt(const int32_t *in, int32_t len, int32_t *out,\n                             int32_t *state)\n{\n    int32_t tmp0, tmp1, diff;\n    int32_t i;\n\n    // upper allpass filter (generates odd output samples)\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = in[i];\n        diff = tmp0 - state[5];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[4] + diff * kResampleAllpass[0][0];\n        state[4] = tmp0;\n        diff = tmp1 - state[6];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[5] + diff * kResampleAllpass[0][1];\n        state[5] = tmp1;\n        diff = tmp0 - state[7];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[7] = state[6] + diff * kResampleAllpass[0][2];\n        state[6] = tmp0;\n\n        // scale down, round and store\n        out[i << 1] = state[7];\n    }\n\n    out++;\n\n    // lower allpass filter (generates even output samples)\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = in[i];\n        diff = tmp0 - state[1];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[0] + diff * kResampleAllpass[1][0];\n        state[0] = tmp0;\n        diff = tmp1 - state[2];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[1] + diff * kResampleAllpass[1][1];\n        state[1] = tmp1;\n        diff = tmp0 - state[3];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[3] = state[2] + diff * kResampleAllpass[1][2];\n        state[2] = tmp0;\n\n        // scale down, round and store\n        out[i << 1] = state[3];\n    }\n}\n\n//\n//   interpolator\n// input:  int32_t (shifted 15 positions to the left, + offset 16384)\n// output: int16_t (saturated) (of length len*2)\n// state:  filter state array; length = 8\nvoid WebRtcSpl_UpBy2IntToShort(const int32_t *in, int32_t len, int16_t *out,\n                               int32_t *state)\n{\n    int32_t tmp0, tmp1, diff;\n    int32_t i;\n\n    // upper allpass filter (generates odd output samples)\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = in[i];\n        diff = tmp0 - state[5];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[4] + diff * kResampleAllpass[0][0];\n        state[4] = tmp0;\n        diff = tmp1 - state[6];\n        // scale down and round\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[5] + diff * kResampleAllpass[0][1];\n        state[5] = tmp1;\n        diff = tmp0 - state[7];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[7] = state[6] + diff * kResampleAllpass[0][2];\n        state[6] = tmp0;\n\n        // scale down, saturate and store\n        tmp1 = state[7] >> 15;\n        if (tmp1 > (int32_t)0x00007FFF)\n            tmp1 = 0x00007FFF;\n        if (tmp1 < (int32_t)0xFFFF8000)\n            tmp1 = 0xFFFF8000;\n        out[i << 1] = (int16_t)tmp1;\n    }\n\n    out++;\n\n    // lower allpass filter (generates even output samples)\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = in[i];\n        diff = tmp0 - state[1];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[0] + diff * kResampleAllpass[1][0];\n        state[0] = tmp0;\n        diff = tmp1 - state[2];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[1] + diff * kResampleAllpass[1][1];\n        state[1] = tmp1;\n        diff = tmp0 - state[3];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[3] = state[2] + diff * kResampleAllpass[1][2];\n        state[2] = tmp0;\n\n        // scale down, saturate and store\n        tmp1 = state[3] >> 15;\n        if (tmp1 > (int32_t)0x00007FFF)\n            tmp1 = 0x00007FFF;\n        if (tmp1 < (int32_t)0xFFFF8000)\n            tmp1 = 0xFFFF8000;\n        out[i << 1] = (int16_t)tmp1;\n    }\n}\n\n//   lowpass filter\n// input:  int16_t\n// output: int32_t (normalized, not saturated)\n// state:  filter state array; length = 8\nvoid WebRtcSpl_LPBy2ShortToInt(const int16_t* in, int32_t len, int32_t* out,\n                               int32_t* state)\n{\n    int32_t tmp0, tmp1, diff;\n    int32_t i;\n\n    len >>= 1;\n\n    // lower allpass filter: odd input -> even output samples\n    in++;\n    // initial state of polyphase delay element\n    tmp0 = state[12];\n    for (i = 0; i < len; i++)\n    {\n        diff = tmp0 - state[1];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[0] + diff * kResampleAllpass[1][0];\n        state[0] = tmp0;\n        diff = tmp1 - state[2];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[1] + diff * kResampleAllpass[1][1];\n        state[1] = tmp1;\n        diff = tmp0 - state[3];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[3] = state[2] + diff * kResampleAllpass[1][2];\n        state[2] = tmp0;\n\n        // scale down, round and store\n        out[i << 1] = state[3] >> 1;\n        tmp0 = ((int32_t)in[i << 1] << 15) + (1 << 14);\n    }\n    in--;\n\n    // upper allpass filter: even input -> even output samples\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = ((int32_t)in[i << 1] << 15) + (1 << 14);\n        diff = tmp0 - state[5];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[4] + diff * kResampleAllpass[0][0];\n        state[4] = tmp0;\n        diff = tmp1 - state[6];\n        // scale down and round\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[5] + diff * kResampleAllpass[0][1];\n        state[5] = tmp1;\n        diff = tmp0 - state[7];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[7] = state[6] + diff * kResampleAllpass[0][2];\n        state[6] = tmp0;\n\n        // average the two allpass outputs, scale down and store\n        out[i << 1] = (out[i << 1] + (state[7] >> 1)) >> 15;\n    }\n\n    // switch to odd output samples\n    out++;\n\n    // lower allpass filter: even input -> odd output samples\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = ((int32_t)in[i << 1] << 15) + (1 << 14);\n        diff = tmp0 - state[9];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[8] + diff * kResampleAllpass[1][0];\n        state[8] = tmp0;\n        diff = tmp1 - state[10];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[9] + diff * kResampleAllpass[1][1];\n        state[9] = tmp1;\n        diff = tmp0 - state[11];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[11] = state[10] + diff * kResampleAllpass[1][2];\n        state[10] = tmp0;\n\n        // scale down, round and store\n        out[i << 1] = state[11] >> 1;\n    }\n\n    // upper allpass filter: odd input -> odd output samples\n    in++;\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = ((int32_t)in[i << 1] << 15) + (1 << 14);\n        diff = tmp0 - state[13];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[12] + diff * kResampleAllpass[0][0];\n        state[12] = tmp0;\n        diff = tmp1 - state[14];\n        // scale down and round\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[13] + diff * kResampleAllpass[0][1];\n        state[13] = tmp1;\n        diff = tmp0 - state[15];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[15] = state[14] + diff * kResampleAllpass[0][2];\n        state[14] = tmp0;\n\n        // average the two allpass outputs, scale down and store\n        out[i << 1] = (out[i << 1] + (state[15] >> 1)) >> 15;\n    }\n}\n\n//   lowpass filter\n// input:  int32_t (shifted 15 positions to the left, + offset 16384)\n// output: int32_t (normalized, not saturated)\n// state:  filter state array; length = 8\nvoid WebRtcSpl_LPBy2IntToInt(const int32_t* in, int32_t len, int32_t* out,\n                             int32_t* state)\n{\n    int32_t tmp0, tmp1, diff;\n    int32_t i;\n\n    len >>= 1;\n\n    // lower allpass filter: odd input -> even output samples\n    in++;\n    // initial state of polyphase delay element\n    tmp0 = state[12];\n    for (i = 0; i < len; i++)\n    {\n        diff = tmp0 - state[1];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[0] + diff * kResampleAllpass[1][0];\n        state[0] = tmp0;\n        diff = tmp1 - state[2];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[1] + diff * kResampleAllpass[1][1];\n        state[1] = tmp1;\n        diff = tmp0 - state[3];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[3] = state[2] + diff * kResampleAllpass[1][2];\n        state[2] = tmp0;\n\n        // scale down, round and store\n        out[i << 1] = state[3] >> 1;\n        tmp0 = in[i << 1];\n    }\n    in--;\n\n    // upper allpass filter: even input -> even output samples\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = in[i << 1];\n        diff = tmp0 - state[5];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[4] + diff * kResampleAllpass[0][0];\n        state[4] = tmp0;\n        diff = tmp1 - state[6];\n        // scale down and round\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[5] + diff * kResampleAllpass[0][1];\n        state[5] = tmp1;\n        diff = tmp0 - state[7];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[7] = state[6] + diff * kResampleAllpass[0][2];\n        state[6] = tmp0;\n\n        // average the two allpass outputs, scale down and store\n        out[i << 1] = (out[i << 1] + (state[7] >> 1)) >> 15;\n    }\n\n    // switch to odd output samples\n    out++;\n\n    // lower allpass filter: even input -> odd output samples\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = in[i << 1];\n        diff = tmp0 - state[9];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[8] + diff * kResampleAllpass[1][0];\n        state[8] = tmp0;\n        diff = tmp1 - state[10];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[9] + diff * kResampleAllpass[1][1];\n        state[9] = tmp1;\n        diff = tmp0 - state[11];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[11] = state[10] + diff * kResampleAllpass[1][2];\n        state[10] = tmp0;\n\n        // scale down, round and store\n        out[i << 1] = state[11] >> 1;\n    }\n\n    // upper allpass filter: odd input -> odd output samples\n    in++;\n    for (i = 0; i < len; i++)\n    {\n        tmp0 = in[i << 1];\n        diff = tmp0 - state[13];\n        // scale down and round\n        diff = (diff + (1 << 13)) >> 14;\n        tmp1 = state[12] + diff * kResampleAllpass[0][0];\n        state[12] = tmp0;\n        diff = tmp1 - state[14];\n        // scale down and round\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        tmp0 = state[13] + diff * kResampleAllpass[0][1];\n        state[13] = tmp1;\n        diff = tmp0 - state[15];\n        // scale down and truncate\n        diff = diff >> 14;\n        if (diff < 0)\n            diff += 1;\n        state[15] = state[14] + diff * kResampleAllpass[0][2];\n        state[14] = tmp0;\n\n        // average the two allpass outputs, scale down and store\n        out[i << 1] = (out[i << 1] + (state[15] >> 1)) >> 15;\n    }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/resample_by_2_internal.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This header file contains some internal resampling functions.\n *\n */\n\n#ifndef WEBRTC_SPL_RESAMPLE_BY_2_INTERNAL_H_\n#define WEBRTC_SPL_RESAMPLE_BY_2_INTERNAL_H_\n\n#include \"webrtc/typedefs.h\"\n\n/*******************************************************************\n * resample_by_2_fast.c\n * Functions for internal use in the other resample functions\n ******************************************************************/\nvoid WebRtcSpl_DownBy2IntToShort(int32_t *in, int32_t len, int16_t *out,\n                                 int32_t *state);\n\nvoid WebRtcSpl_DownBy2ShortToInt(const int16_t *in, int32_t len,\n                                 int32_t *out, int32_t *state);\n\nvoid WebRtcSpl_UpBy2ShortToInt(const int16_t *in, int32_t len,\n                               int32_t *out, int32_t *state);\n\nvoid WebRtcSpl_UpBy2IntToInt(const int32_t *in, int32_t len, int32_t *out,\n                             int32_t *state);\n\nvoid WebRtcSpl_UpBy2IntToShort(const int32_t *in, int32_t len,\n                               int16_t *out, int32_t *state);\n\nvoid WebRtcSpl_LPBy2ShortToInt(const int16_t* in, int32_t len,\n                               int32_t* out, int32_t* state);\n\nvoid WebRtcSpl_LPBy2IntToInt(const int32_t* in, int32_t len, int32_t* out,\n                             int32_t* state);\n\n#endif // WEBRTC_SPL_RESAMPLE_BY_2_INTERNAL_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/resample_fractional.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the resampling functions between 48, 44, 32 and 24 kHz.\n * The description headers can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n// interpolation coefficients\nstatic const int16_t kCoefficients48To32[2][8] = {\n        {778, -2050, 1087, 23285, 12903, -3783, 441, 222},\n        {222, 441, -3783, 12903, 23285, 1087, -2050, 778}\n};\n\nstatic const int16_t kCoefficients32To24[3][8] = {\n        {767, -2362, 2434, 24406, 10620, -3838, 721, 90},\n        {386, -381, -2646, 19062, 19062, -2646, -381, 386},\n        {90, 721, -3838, 10620, 24406, 2434, -2362, 767}\n};\n\nstatic const int16_t kCoefficients44To32[4][9] = {\n        {117, -669, 2245, -6183, 26267, 13529, -3245, 845, -138},\n        {-101, 612, -2283, 8532, 29790, -5138, 1789, -524, 91},\n        {50, -292, 1016, -3064, 32010, 3933, -1147, 315, -53},\n        {-156, 974, -3863, 18603, 21691, -6246, 2353, -712, 126}\n};\n\n//   Resampling ratio: 2/3\n// input:  int32_t (normalized, not saturated) :: size 3 * K\n// output: int32_t (shifted 15 positions to the left, + offset 16384) :: size 2 * K\n//      K: number of blocks\n\nvoid WebRtcSpl_Resample48khzTo32khz(const int32_t *In, int32_t *Out, size_t K)\n{\n    /////////////////////////////////////////////////////////////\n    // Filter operation:\n    //\n    // Perform resampling (3 input samples -> 2 output samples);\n    // process in sub blocks of size 3 samples.\n    int32_t tmp;\n    size_t m;\n\n    for (m = 0; m < K; m++)\n    {\n        tmp = 1 << 14;\n        tmp += kCoefficients48To32[0][0] * In[0];\n        tmp += kCoefficients48To32[0][1] * In[1];\n        tmp += kCoefficients48To32[0][2] * In[2];\n        tmp += kCoefficients48To32[0][3] * In[3];\n        tmp += kCoefficients48To32[0][4] * In[4];\n        tmp += kCoefficients48To32[0][5] * In[5];\n        tmp += kCoefficients48To32[0][6] * In[6];\n        tmp += kCoefficients48To32[0][7] * In[7];\n        Out[0] = tmp;\n\n        tmp = 1 << 14;\n        tmp += kCoefficients48To32[1][0] * In[1];\n        tmp += kCoefficients48To32[1][1] * In[2];\n        tmp += kCoefficients48To32[1][2] * In[3];\n        tmp += kCoefficients48To32[1][3] * In[4];\n        tmp += kCoefficients48To32[1][4] * In[5];\n        tmp += kCoefficients48To32[1][5] * In[6];\n        tmp += kCoefficients48To32[1][6] * In[7];\n        tmp += kCoefficients48To32[1][7] * In[8];\n        Out[1] = tmp;\n\n        // update pointers\n        In += 3;\n        Out += 2;\n    }\n}\n\n//   Resampling ratio: 3/4\n// input:  int32_t (normalized, not saturated) :: size 4 * K\n// output: int32_t (shifted 15 positions to the left, + offset 16384) :: size 3 * K\n//      K: number of blocks\n\nvoid WebRtcSpl_Resample32khzTo24khz(const int32_t *In, int32_t *Out, size_t K)\n{\n    /////////////////////////////////////////////////////////////\n    // Filter operation:\n    //\n    // Perform resampling (4 input samples -> 3 output samples);\n    // process in sub blocks of size 4 samples.\n    size_t m;\n    int32_t tmp;\n\n    for (m = 0; m < K; m++)\n    {\n        tmp = 1 << 14;\n        tmp += kCoefficients32To24[0][0] * In[0];\n        tmp += kCoefficients32To24[0][1] * In[1];\n        tmp += kCoefficients32To24[0][2] * In[2];\n        tmp += kCoefficients32To24[0][3] * In[3];\n        tmp += kCoefficients32To24[0][4] * In[4];\n        tmp += kCoefficients32To24[0][5] * In[5];\n        tmp += kCoefficients32To24[0][6] * In[6];\n        tmp += kCoefficients32To24[0][7] * In[7];\n        Out[0] = tmp;\n\n        tmp = 1 << 14;\n        tmp += kCoefficients32To24[1][0] * In[1];\n        tmp += kCoefficients32To24[1][1] * In[2];\n        tmp += kCoefficients32To24[1][2] * In[3];\n        tmp += kCoefficients32To24[1][3] * In[4];\n        tmp += kCoefficients32To24[1][4] * In[5];\n        tmp += kCoefficients32To24[1][5] * In[6];\n        tmp += kCoefficients32To24[1][6] * In[7];\n        tmp += kCoefficients32To24[1][7] * In[8];\n        Out[1] = tmp;\n\n        tmp = 1 << 14;\n        tmp += kCoefficients32To24[2][0] * In[2];\n        tmp += kCoefficients32To24[2][1] * In[3];\n        tmp += kCoefficients32To24[2][2] * In[4];\n        tmp += kCoefficients32To24[2][3] * In[5];\n        tmp += kCoefficients32To24[2][4] * In[6];\n        tmp += kCoefficients32To24[2][5] * In[7];\n        tmp += kCoefficients32To24[2][6] * In[8];\n        tmp += kCoefficients32To24[2][7] * In[9];\n        Out[2] = tmp;\n\n        // update pointers\n        In += 4;\n        Out += 3;\n    }\n}\n\n//\n// fractional resampling filters\n//   Fout = 11/16 * Fin\n//   Fout =  8/11 * Fin\n//\n\n// compute two inner-products and store them to output array\nstatic void WebRtcSpl_ResampDotProduct(const int32_t *in1, const int32_t *in2,\n                                       const int16_t *coef_ptr, int32_t *out1,\n                                       int32_t *out2)\n{\n    int32_t tmp1 = 16384;\n    int32_t tmp2 = 16384;\n    int16_t coef;\n\n    coef = coef_ptr[0];\n    tmp1 += coef * in1[0];\n    tmp2 += coef * in2[-0];\n\n    coef = coef_ptr[1];\n    tmp1 += coef * in1[1];\n    tmp2 += coef * in2[-1];\n\n    coef = coef_ptr[2];\n    tmp1 += coef * in1[2];\n    tmp2 += coef * in2[-2];\n\n    coef = coef_ptr[3];\n    tmp1 += coef * in1[3];\n    tmp2 += coef * in2[-3];\n\n    coef = coef_ptr[4];\n    tmp1 += coef * in1[4];\n    tmp2 += coef * in2[-4];\n\n    coef = coef_ptr[5];\n    tmp1 += coef * in1[5];\n    tmp2 += coef * in2[-5];\n\n    coef = coef_ptr[6];\n    tmp1 += coef * in1[6];\n    tmp2 += coef * in2[-6];\n\n    coef = coef_ptr[7];\n    tmp1 += coef * in1[7];\n    tmp2 += coef * in2[-7];\n\n    coef = coef_ptr[8];\n    *out1 = tmp1 + coef * in1[8];\n    *out2 = tmp2 + coef * in2[-8];\n}\n\n//   Resampling ratio: 8/11\n// input:  int32_t (normalized, not saturated) :: size 11 * K\n// output: int32_t (shifted 15 positions to the left, + offset 16384) :: size  8 * K\n//      K: number of blocks\n\nvoid WebRtcSpl_Resample44khzTo32khz(const int32_t *In, int32_t *Out, size_t K)\n{\n    /////////////////////////////////////////////////////////////\n    // Filter operation:\n    //\n    // Perform resampling (11 input samples -> 8 output samples);\n    // process in sub blocks of size 11 samples.\n    int32_t tmp;\n    size_t m;\n\n    for (m = 0; m < K; m++)\n    {\n        tmp = 1 << 14;\n\n        // first output sample\n        Out[0] = ((int32_t)In[3] << 15) + tmp;\n\n        // sum and accumulate filter coefficients and input samples\n        tmp += kCoefficients44To32[3][0] * In[5];\n        tmp += kCoefficients44To32[3][1] * In[6];\n        tmp += kCoefficients44To32[3][2] * In[7];\n        tmp += kCoefficients44To32[3][3] * In[8];\n        tmp += kCoefficients44To32[3][4] * In[9];\n        tmp += kCoefficients44To32[3][5] * In[10];\n        tmp += kCoefficients44To32[3][6] * In[11];\n        tmp += kCoefficients44To32[3][7] * In[12];\n        tmp += kCoefficients44To32[3][8] * In[13];\n        Out[4] = tmp;\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_ResampDotProduct(&In[0], &In[17], kCoefficients44To32[0], &Out[1], &Out[7]);\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_ResampDotProduct(&In[2], &In[15], kCoefficients44To32[1], &Out[2], &Out[6]);\n\n        // sum and accumulate filter coefficients and input samples\n        WebRtcSpl_ResampDotProduct(&In[3], &In[14], kCoefficients44To32[2], &Out[3], &Out[5]);\n\n        // update pointers\n        In += 11;\n        Out += 8;\n    }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/spl_init.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/* The global function contained in this file initializes SPL function\n * pointers, currently only for ARM platforms.\n *\n * Some code came from common/rtcd.c in the WebM project.\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n#include \"webrtc/system_wrappers/include/cpu_features_wrapper.h\"\n\n/* Declare function pointers. */\nMaxAbsValueW16 WebRtcSpl_MaxAbsValueW16;\nMaxAbsValueW32 WebRtcSpl_MaxAbsValueW32;\nMaxValueW16 WebRtcSpl_MaxValueW16;\nMaxValueW32 WebRtcSpl_MaxValueW32;\nMinValueW16 WebRtcSpl_MinValueW16;\nMinValueW32 WebRtcSpl_MinValueW32;\nCrossCorrelation WebRtcSpl_CrossCorrelation;\nDownsampleFast WebRtcSpl_DownsampleFast;\nScaleAndAddVectorsWithRound WebRtcSpl_ScaleAndAddVectorsWithRound;\n\n#if (!defined(WEBRTC_HAS_NEON)) && !defined(MIPS32_LE)\n/* Initialize function pointers to the generic C version. */\nstatic void InitPointersToC() {\n  WebRtcSpl_MaxAbsValueW16 = WebRtcSpl_MaxAbsValueW16C;\n  WebRtcSpl_MaxAbsValueW32 = WebRtcSpl_MaxAbsValueW32C;\n  WebRtcSpl_MaxValueW16 = WebRtcSpl_MaxValueW16C;\n  WebRtcSpl_MaxValueW32 = WebRtcSpl_MaxValueW32C;\n  WebRtcSpl_MinValueW16 = WebRtcSpl_MinValueW16C;\n  WebRtcSpl_MinValueW32 = WebRtcSpl_MinValueW32C;\n  WebRtcSpl_CrossCorrelation = WebRtcSpl_CrossCorrelationC;\n  WebRtcSpl_DownsampleFast = WebRtcSpl_DownsampleFastC;\n  WebRtcSpl_ScaleAndAddVectorsWithRound =\n      WebRtcSpl_ScaleAndAddVectorsWithRoundC;\n}\n#endif\n\n#if defined(WEBRTC_HAS_NEON)\n/* Initialize function pointers to the Neon version. */\nstatic void InitPointersToNeon() {\n  WebRtcSpl_MaxAbsValueW16 = WebRtcSpl_MaxAbsValueW16Neon;\n  WebRtcSpl_MaxAbsValueW32 = WebRtcSpl_MaxAbsValueW32Neon;\n  WebRtcSpl_MaxValueW16 = WebRtcSpl_MaxValueW16Neon;\n  WebRtcSpl_MaxValueW32 = WebRtcSpl_MaxValueW32Neon;\n  WebRtcSpl_MinValueW16 = WebRtcSpl_MinValueW16Neon;\n  WebRtcSpl_MinValueW32 = WebRtcSpl_MinValueW32Neon;\n  WebRtcSpl_CrossCorrelation = WebRtcSpl_CrossCorrelationNeon;\n  WebRtcSpl_DownsampleFast = WebRtcSpl_DownsampleFastNeon;\n  WebRtcSpl_ScaleAndAddVectorsWithRound =\n      WebRtcSpl_ScaleAndAddVectorsWithRoundC;\n}\n#endif\n\n#if defined(MIPS32_LE)\n/* Initialize function pointers to the MIPS version. */\nstatic void InitPointersToMIPS() {\n  WebRtcSpl_MaxAbsValueW16 = WebRtcSpl_MaxAbsValueW16_mips;\n  WebRtcSpl_MaxValueW16 = WebRtcSpl_MaxValueW16_mips;\n  WebRtcSpl_MaxValueW32 = WebRtcSpl_MaxValueW32_mips;\n  WebRtcSpl_MinValueW16 = WebRtcSpl_MinValueW16_mips;\n  WebRtcSpl_MinValueW32 = WebRtcSpl_MinValueW32_mips;\n  WebRtcSpl_CrossCorrelation = WebRtcSpl_CrossCorrelation_mips;\n  WebRtcSpl_DownsampleFast = WebRtcSpl_DownsampleFast_mips;\n#if defined(MIPS_DSP_R1_LE)\n  WebRtcSpl_MaxAbsValueW32 = WebRtcSpl_MaxAbsValueW32_mips;\n  WebRtcSpl_ScaleAndAddVectorsWithRound =\n      WebRtcSpl_ScaleAndAddVectorsWithRound_mips;\n#else\n  WebRtcSpl_MaxAbsValueW32 = WebRtcSpl_MaxAbsValueW32C;\n  WebRtcSpl_ScaleAndAddVectorsWithRound =\n      WebRtcSpl_ScaleAndAddVectorsWithRoundC;\n#endif\n}\n#endif\n\nstatic void InitFunctionPointers(void) {\n#if defined(WEBRTC_HAS_NEON)\n  InitPointersToNeon();\n#elif defined(MIPS32_LE)\n  InitPointersToMIPS();\n#else\n  InitPointersToC();\n#endif  /* WEBRTC_HAS_NEON */\n}\n\n#if defined(WEBRTC_POSIX)\n#include <pthread.h>\n\nstatic void once(void (*func)(void)) {\n  static pthread_once_t lock = PTHREAD_ONCE_INIT;\n  pthread_once(&lock, func);\n}\n\n#elif defined(_WIN32)\n#include <windows.h>\n\nstatic void once(void (*func)(void)) {\n  /* Didn't use InitializeCriticalSection() since there's no race-free context\n   * in which to execute it.\n   *\n   * TODO(kma): Change to different implementation (e.g.\n   * InterlockedCompareExchangePointer) to avoid issues similar to\n   * http://code.google.com/p/webm/issues/detail?id=467.\n   */\n  static CRITICAL_SECTION lock = {(void *)((size_t)-1), -1, 0, 0, 0, 0};\n  static int done = 0;\n\n  EnterCriticalSection(&lock);\n  if (!done) {\n    func();\n    done = 1;\n  }\n  LeaveCriticalSection(&lock);\n}\n\n/* There's no fallback version as an #else block here to ensure thread safety.\n * In case of neither pthread for WEBRTC_POSIX nor _WIN32 is present, build\n * system should pick it up.\n */\n#endif  /* WEBRTC_POSIX */\n\nvoid WebRtcSpl_Init() {\n  once(InitFunctionPointers);\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/spl_inl.c",
    "content": "/*\n *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include <stdint.h>\n\n#include \"webrtc/common_audio/signal_processing/include/spl_inl.h\"\n\n// Table used by WebRtcSpl_CountLeadingZeros32_NotBuiltin. For each uint32_t n\n// that's a sequence of 0 bits followed by a sequence of 1 bits, the entry at\n// index (n * 0x8c0b2891) >> 26 in this table gives the number of zero bits in\n// n.\nconst int8_t kWebRtcSpl_CountLeadingZeros32_Table[64] = {\n    32, 8,  17, -1, -1, 14, -1, -1, -1, 20, -1, -1, -1, 28, -1, 18,\n    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,  26, 25, 24,\n    4,  11, 23, 31, 3,  7,  10, 16, 22, 30, -1, -1, 2,  6,  13, 9,\n    -1, 15, -1, 21, -1, 29, 19, -1, -1, -1, -1, -1, 1,  27, 5,  12,\n};\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/spl_sqrt.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_Sqrt().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nint32_t WebRtcSpl_SqrtLocal(int32_t in);\n\nint32_t WebRtcSpl_SqrtLocal(int32_t in)\n{\n\n    int16_t x_half, t16;\n    int32_t A, B, x2;\n\n    /* The following block performs:\n     y=in/2\n     x=y-2^30\n     x_half=x/2^31\n     t = 1 + (x_half) - 0.5*((x_half)^2) + 0.5*((x_half)^3) - 0.625*((x_half)^4)\n         + 0.875*((x_half)^5)\n     */\n\n    B = in / 2;\n\n    B = B - ((int32_t)0x40000000); // B = in/2 - 1/2\n    x_half = (int16_t)(B >> 16);  // x_half = x/2 = (in-1)/2\n    B = B + ((int32_t)0x40000000); // B = 1 + x/2\n    B = B + ((int32_t)0x40000000); // Add 0.5 twice (since 1.0 does not exist in Q31)\n\n    x2 = ((int32_t)x_half) * ((int32_t)x_half) * 2; // A = (x/2)^2\n    A = -x2; // A = -(x/2)^2\n    B = B + (A >> 1); // B = 1 + x/2 - 0.5*(x/2)^2\n\n    A >>= 16;\n    A = A * A * 2; // A = (x/2)^4\n    t16 = (int16_t)(A >> 16);\n    B += -20480 * t16 * 2;  // B = B - 0.625*A\n    // After this, B = 1 + x/2 - 0.5*(x/2)^2 - 0.625*(x/2)^4\n\n    A = x_half * t16 * 2;  // A = (x/2)^5\n    t16 = (int16_t)(A >> 16);\n    B += 28672 * t16 * 2;  // B = B + 0.875*A\n    // After this, B = 1 + x/2 - 0.5*(x/2)^2 - 0.625*(x/2)^4 + 0.875*(x/2)^5\n\n    t16 = (int16_t)(x2 >> 16);\n    A = x_half * t16 * 2;  // A = x/2^3\n\n    B = B + (A >> 1); // B = B + 0.5*A\n    // After this, B = 1 + x/2 - 0.5*(x/2)^2 + 0.5*(x/2)^3 - 0.625*(x/2)^4 + 0.875*(x/2)^5\n\n    B = B + ((int32_t)32768); // Round off bit\n\n    return B;\n}\n\nint32_t WebRtcSpl_Sqrt(int32_t value)\n{\n    /*\n     Algorithm:\n\n     Six term Taylor Series is used here to compute the square root of a number\n     y^0.5 = (1+x)^0.5 where x = y-1\n     = 1+(x/2)-0.5*((x/2)^2+0.5*((x/2)^3-0.625*((x/2)^4+0.875*((x/2)^5)\n     0.5 <= x < 1\n\n     Example of how the algorithm works, with ut=sqrt(in), and\n     with in=73632 and ut=271 (even shift value case):\n\n     in=73632\n     y= in/131072\n     x=y-1\n     t = 1 + (x/2) - 0.5*((x/2)^2) + 0.5*((x/2)^3) - 0.625*((x/2)^4) + 0.875*((x/2)^5)\n     ut=t*(1/sqrt(2))*512\n\n     or:\n\n     in=73632\n     in2=73632*2^14\n     y= in2/2^31\n     x=y-1\n     t = 1 + (x/2) - 0.5*((x/2)^2) + 0.5*((x/2)^3) - 0.625*((x/2)^4) + 0.875*((x/2)^5)\n     ut=t*(1/sqrt(2))\n     ut2=ut*2^9\n\n     which gives:\n\n     in  = 73632\n     in2 = 1206386688\n     y   = 0.56176757812500\n     x   = -0.43823242187500\n     t   = 0.74973506527313\n     ut  = 0.53014274874797\n     ut2 = 2.714330873589594e+002\n\n     or:\n\n     in=73632\n     in2=73632*2^14\n     y=in2/2\n     x=y-2^30\n     x_half=x/2^31\n     t = 1 + (x_half) - 0.5*((x_half)^2) + 0.5*((x_half)^3) - 0.625*((x_half)^4)\n         + 0.875*((x_half)^5)\n     ut=t*(1/sqrt(2))\n     ut2=ut*2^9\n\n     which gives:\n\n     in  = 73632\n     in2 = 1206386688\n     y   = 603193344\n     x   = -470548480\n     x_half =  -0.21911621093750\n     t   = 0.74973506527313\n     ut  = 0.53014274874797\n     ut2 = 2.714330873589594e+002\n\n     */\n\n    int16_t x_norm, nshift, t16, sh;\n    int32_t A;\n\n    int16_t k_sqrt_2 = 23170; // 1/sqrt2 (==5a82)\n\n    A = value;\n\n    // The convention in this function is to calculate sqrt(abs(A)). Negate the\n    // input if it is negative.\n    if (A < 0) {\n        if (A == WEBRTC_SPL_WORD32_MIN) {\n            // This number cannot be held in an int32_t after negating.\n            // Map it to the maximum positive value.\n            A = WEBRTC_SPL_WORD32_MAX;\n        } else {\n            A = -A;\n        }\n    } else if (A == 0) {\n        return 0;  // sqrt(0) = 0\n    }\n\n    sh = WebRtcSpl_NormW32(A); // # shifts to normalize A\n    A = WEBRTC_SPL_LSHIFT_W32(A, sh); // Normalize A\n    if (A < (WEBRTC_SPL_WORD32_MAX - 32767))\n    {\n        A = A + ((int32_t)32768); // Round off bit\n    } else\n    {\n        A = WEBRTC_SPL_WORD32_MAX;\n    }\n\n    x_norm = (int16_t)(A >> 16);  // x_norm = AH\n\n    nshift = (sh / 2);\n    RTC_DCHECK_GE(nshift, 0);\n\n    A = (int32_t)WEBRTC_SPL_LSHIFT_W32((int32_t)x_norm, 16);\n    A = WEBRTC_SPL_ABS_W32(A); // A = abs(x_norm<<16)\n    A = WebRtcSpl_SqrtLocal(A); // A = sqrt(A)\n\n    if (2 * nshift == sh) {\n        // Even shift value case\n\n        t16 = (int16_t)(A >> 16);  // t16 = AH\n\n        A = k_sqrt_2 * t16 * 2;  // A = 1/sqrt(2)*t16\n        A = A + ((int32_t)32768); // Round off\n        A = A & ((int32_t)0x7fff0000); // Round off\n\n        A >>= 15;  // A = A>>16\n\n    } else\n    {\n        A >>= 16;  // A = A>>16\n    }\n\n    A = A & ((int32_t)0x0000ffff);\n    A >>= nshift;  // De-normalize the result.\n\n    return A;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/spl_sqrt_floor.c",
    "content": "/*\n * Written by Wilco Dijkstra, 1996. The following email exchange establishes the\n * license.\n *\n * From: Wilco Dijkstra <Wilco.Dijkstra@ntlworld.com>\n * Date: Fri, Jun 24, 2011 at 3:20 AM\n * Subject: Re: sqrt routine\n * To: Kevin Ma <kma@google.com>\n * Hi Kevin,\n * Thanks for asking. Those routines are public domain (originally posted to\n * comp.sys.arm a long time ago), so you can use them freely for any purpose.\n * Cheers,\n * Wilco\n *\n * ----- Original Message -----\n * From: \"Kevin Ma\" <kma@google.com>\n * To: <Wilco.Dijkstra@ntlworld.com>\n * Sent: Thursday, June 23, 2011 11:44 PM\n * Subject: Fwd: sqrt routine\n * Hi Wilco,\n * I saw your sqrt routine from several web sites, including\n * http://www.finesse.demon.co.uk/steven/sqrt.html.\n * Just wonder if there's any copyright information with your Successive\n * approximation routines, or if I can freely use it for any purpose.\n * Thanks.\n * Kevin\n */\n\n// Minor modifications in code style for WebRTC, 2012.\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n/*\n * Algorithm:\n * Successive approximation of the equation (root + delta) ^ 2 = N\n * until delta < 1. If delta < 1 we have the integer part of SQRT (N).\n * Use delta = 2^i for i = 15 .. 0.\n *\n * Output precision is 16 bits. Note for large input values (close to\n * 0x7FFFFFFF), bit 15 (the highest bit of the low 16-bit half word)\n * contains the MSB information (a non-sign value). Do with caution\n * if you need to cast the output to int16_t type.\n *\n * If the input value is negative, it returns 0.\n */\n\n#define WEBRTC_SPL_SQRT_ITER(N)                 \\\n  try1 = root + (1 << (N));                     \\\n  if (value >= try1 << (N))                     \\\n  {                                             \\\n    value -= try1 << (N);                       \\\n    root |= 2 << (N);                           \\\n  }\n\nint32_t WebRtcSpl_SqrtFloor(int32_t value)\n{\n  int32_t root = 0, try1;\n\n  WEBRTC_SPL_SQRT_ITER (15);\n  WEBRTC_SPL_SQRT_ITER (14);\n  WEBRTC_SPL_SQRT_ITER (13);\n  WEBRTC_SPL_SQRT_ITER (12);\n  WEBRTC_SPL_SQRT_ITER (11);\n  WEBRTC_SPL_SQRT_ITER (10);\n  WEBRTC_SPL_SQRT_ITER ( 9);\n  WEBRTC_SPL_SQRT_ITER ( 8);\n  WEBRTC_SPL_SQRT_ITER ( 7);\n  WEBRTC_SPL_SQRT_ITER ( 6);\n  WEBRTC_SPL_SQRT_ITER ( 5);\n  WEBRTC_SPL_SQRT_ITER ( 4);\n  WEBRTC_SPL_SQRT_ITER ( 3);\n  WEBRTC_SPL_SQRT_ITER ( 2);\n  WEBRTC_SPL_SQRT_ITER ( 1);\n  WEBRTC_SPL_SQRT_ITER ( 0);\n\n  return root >> 1;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/splitting_filter_impl.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/*\n * This file contains the splitting filter functions.\n *\n */\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\n// Maximum number of samples in a low/high-band frame.\nenum\n{\n    kMaxBandFrameLength = 320  // 10 ms at 64 kHz.\n};\n\n// QMF filter coefficients in Q16.\nstatic const uint16_t WebRtcSpl_kAllPassFilter1[3] = {6418, 36982, 57261};\nstatic const uint16_t WebRtcSpl_kAllPassFilter2[3] = {21333, 49062, 63010};\n\n///////////////////////////////////////////////////////////////////////////////////////////////\n// WebRtcSpl_AllPassQMF(...)\n//\n// Allpass filter used by the analysis and synthesis parts of the QMF filter.\n//\n// Input:\n//    - in_data             : Input data sequence (Q10)\n//    - data_length         : Length of data sequence (>2)\n//    - filter_coefficients : Filter coefficients (length 3, Q16)\n//\n// Input & Output:\n//    - filter_state        : Filter state (length 6, Q10).\n//\n// Output:\n//    - out_data            : Output data sequence (Q10), length equal to\n//                            |data_length|\n//\n\nvoid WebRtcSpl_AllPassQMF(int32_t* in_data, size_t data_length,\n                          int32_t* out_data, const uint16_t* filter_coefficients,\n                          int32_t* filter_state)\n{\n    // The procedure is to filter the input with three first order all pass filters\n    // (cascade operations).\n    //\n    //         a_3 + q^-1    a_2 + q^-1    a_1 + q^-1\n    // y[n] =  -----------   -----------   -----------   x[n]\n    //         1 + a_3q^-1   1 + a_2q^-1   1 + a_1q^-1\n    //\n    // The input vector |filter_coefficients| includes these three filter coefficients.\n    // The filter state contains the in_data state, in_data[-1], followed by\n    // the out_data state, out_data[-1]. This is repeated for each cascade.\n    // The first cascade filter will filter the |in_data| and store the output in\n    // |out_data|. The second will the take the |out_data| as input and make an\n    // intermediate storage in |in_data|, to save memory. The third, and final, cascade\n    // filter operation takes the |in_data| (which is the output from the previous cascade\n    // filter) and store the output in |out_data|.\n    // Note that the input vector values are changed during the process.\n    size_t k;\n    int32_t diff;\n    // First all-pass cascade; filter from in_data to out_data.\n\n    // Let y_i[n] indicate the output of cascade filter i (with filter coefficient a_i) at\n    // vector position n. Then the final output will be y[n] = y_3[n]\n\n    // First loop, use the states stored in memory.\n    // \"diff\" should be safe from wrap around since max values are 2^25\n    // diff = (x[0] - y_1[-1])\n    diff = WebRtcSpl_SubSatW32(in_data[0], filter_state[1]);\n    // y_1[0] =  x[-1] + a_1 * (x[0] - y_1[-1])\n    out_data[0] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[0], diff, filter_state[0]);\n\n    // For the remaining loops, use previous values.\n    for (k = 1; k < data_length; k++)\n    {\n        // diff = (x[n] - y_1[n-1])\n        diff = WebRtcSpl_SubSatW32(in_data[k], out_data[k - 1]);\n        // y_1[n] =  x[n-1] + a_1 * (x[n] - y_1[n-1])\n        out_data[k] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[0], diff, in_data[k - 1]);\n    }\n\n    // Update states.\n    filter_state[0] = in_data[data_length - 1]; // x[N-1], becomes x[-1] next time\n    filter_state[1] = out_data[data_length - 1]; // y_1[N-1], becomes y_1[-1] next time\n\n    // Second all-pass cascade; filter from out_data to in_data.\n    // diff = (y_1[0] - y_2[-1])\n    diff = WebRtcSpl_SubSatW32(out_data[0], filter_state[3]);\n    // y_2[0] =  y_1[-1] + a_2 * (y_1[0] - y_2[-1])\n    in_data[0] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[1], diff, filter_state[2]);\n    for (k = 1; k < data_length; k++)\n    {\n        // diff = (y_1[n] - y_2[n-1])\n        diff = WebRtcSpl_SubSatW32(out_data[k], in_data[k - 1]);\n        // y_2[0] =  y_1[-1] + a_2 * (y_1[0] - y_2[-1])\n        in_data[k] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[1], diff, out_data[k-1]);\n    }\n\n    filter_state[2] = out_data[data_length - 1]; // y_1[N-1], becomes y_1[-1] next time\n    filter_state[3] = in_data[data_length - 1]; // y_2[N-1], becomes y_2[-1] next time\n\n    // Third all-pass cascade; filter from in_data to out_data.\n    // diff = (y_2[0] - y[-1])\n    diff = WebRtcSpl_SubSatW32(in_data[0], filter_state[5]);\n    // y[0] =  y_2[-1] + a_3 * (y_2[0] - y[-1])\n    out_data[0] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[2], diff, filter_state[4]);\n    for (k = 1; k < data_length; k++)\n    {\n        // diff = (y_2[n] - y[n-1])\n        diff = WebRtcSpl_SubSatW32(in_data[k], out_data[k - 1]);\n        // y[n] =  y_2[n-1] + a_3 * (y_2[n] - y[n-1])\n        out_data[k] = WEBRTC_SPL_SCALEDIFF32(filter_coefficients[2], diff, in_data[k-1]);\n    }\n    filter_state[4] = in_data[data_length - 1]; // y_2[N-1], becomes y_2[-1] next time\n    filter_state[5] = out_data[data_length - 1]; // y[N-1], becomes y[-1] next time\n}\n\nvoid WebRtcSpl_AnalysisQMF(const int16_t* in_data, size_t in_data_length,\n                           int16_t* low_band, int16_t* high_band,\n                           int32_t* filter_state1, int32_t* filter_state2)\n{\n    size_t i;\n    int16_t k;\n    int32_t tmp;\n    int32_t half_in1[kMaxBandFrameLength];\n    int32_t half_in2[kMaxBandFrameLength];\n    int32_t filter1[kMaxBandFrameLength];\n    int32_t filter2[kMaxBandFrameLength];\n    const size_t band_length = in_data_length / 2;\n    RTC_DCHECK_EQ(0, in_data_length % 2);\n    RTC_DCHECK_LE(band_length, kMaxBandFrameLength);\n\n    // Split even and odd samples. Also shift them to Q10.\n    for (i = 0, k = 0; i < band_length; i++, k += 2)\n    {\n        half_in2[i] = WEBRTC_SPL_LSHIFT_W32((int32_t)in_data[k], 10);\n        half_in1[i] = WEBRTC_SPL_LSHIFT_W32((int32_t)in_data[k + 1], 10);\n    }\n\n    // All pass filter even and odd samples, independently.\n    WebRtcSpl_AllPassQMF(half_in1, band_length, filter1,\n                         WebRtcSpl_kAllPassFilter1, filter_state1);\n    WebRtcSpl_AllPassQMF(half_in2, band_length, filter2,\n                         WebRtcSpl_kAllPassFilter2, filter_state2);\n\n    // Take the sum and difference of filtered version of odd and even\n    // branches to get upper & lower band.\n    for (i = 0; i < band_length; i++)\n    {\n        tmp = (filter1[i] + filter2[i] + 1024) >> 11;\n        low_band[i] = WebRtcSpl_SatW32ToW16(tmp);\n\n        tmp = (filter1[i] - filter2[i] + 1024) >> 11;\n        high_band[i] = WebRtcSpl_SatW32ToW16(tmp);\n    }\n}\n\nvoid WebRtcSpl_SynthesisQMF(const int16_t* low_band, const int16_t* high_band,\n                            size_t band_length, int16_t* out_data,\n                            int32_t* filter_state1, int32_t* filter_state2)\n{\n    int32_t tmp;\n    int32_t half_in1[kMaxBandFrameLength];\n    int32_t half_in2[kMaxBandFrameLength];\n    int32_t filter1[kMaxBandFrameLength];\n    int32_t filter2[kMaxBandFrameLength];\n    size_t i;\n    int16_t k;\n    RTC_DCHECK_LE(band_length, kMaxBandFrameLength);\n\n    // Obtain the sum and difference channels out of upper and lower-band channels.\n    // Also shift to Q10 domain.\n    for (i = 0; i < band_length; i++)\n    {\n        tmp = (int32_t)low_band[i] + (int32_t)high_band[i];\n        half_in1[i] = tmp * (1 << 10);\n        tmp = (int32_t)low_band[i] - (int32_t)high_band[i];\n        half_in2[i] = tmp * (1 << 10);\n    }\n\n    // all-pass filter the sum and difference channels\n    WebRtcSpl_AllPassQMF(half_in1, band_length, filter1,\n                         WebRtcSpl_kAllPassFilter2, filter_state1);\n    WebRtcSpl_AllPassQMF(half_in2, band_length, filter2,\n                         WebRtcSpl_kAllPassFilter1, filter_state2);\n\n    // The filtered signals are even and odd samples of the output. Combine\n    // them. The signals are Q10 should shift them back to Q0 and take care of\n    // saturation.\n    for (i = 0, k = 0; i < band_length; i++)\n    {\n        tmp = (filter2[i] + 512) >> 10;\n        out_data[k++] = WebRtcSpl_SatW32ToW16(tmp);\n\n        tmp = (filter1[i] + 512) >> 10;\n        out_data[k++] = WebRtcSpl_SatW32ToW16(tmp);\n    }\n\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/sqrt_of_one_minus_x_squared.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains the function WebRtcSpl_SqrtOfOneMinusXSquared().\n * The description header can be found in signal_processing_library.h\n *\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nvoid WebRtcSpl_SqrtOfOneMinusXSquared(int16_t *xQ15, size_t vector_length,\n                                      int16_t *yQ15)\n{\n    int32_t sq;\n    size_t m;\n    int16_t tmp;\n\n    for (m = 0; m < vector_length; m++)\n    {\n        tmp = xQ15[m];\n        sq = tmp * tmp;  // x^2 in Q30\n        sq = 1073741823 - sq; // 1-x^2, where 1 ~= 0.99999999906 is 1073741823 in Q30\n        sq = WebRtcSpl_Sqrt(sq); // sqrt(1-x^2) in Q15\n        yQ15[m] = (int16_t)sq;\n    }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/signal_processing/vector_scaling_operations.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n\n/*\n * This file contains implementations of the functions\n * WebRtcSpl_VectorBitShiftW16()\n * WebRtcSpl_VectorBitShiftW32()\n * WebRtcSpl_VectorBitShiftW32ToW16()\n * WebRtcSpl_ScaleVector()\n * WebRtcSpl_ScaleVectorWithSat()\n * WebRtcSpl_ScaleAndAddVectors()\n * WebRtcSpl_ScaleAndAddVectorsWithRoundC()\n */\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n\nvoid WebRtcSpl_VectorBitShiftW16(int16_t *res, size_t length,\n                                 const int16_t *in, int16_t right_shifts)\n{\n    size_t i;\n\n    if (right_shifts > 0)\n    {\n        for (i = length; i > 0; i--)\n        {\n            (*res++) = ((*in++) >> right_shifts);\n        }\n    } else\n    {\n        for (i = length; i > 0; i--)\n        {\n            (*res++) = ((*in++) << (-right_shifts));\n        }\n    }\n}\n\nvoid WebRtcSpl_VectorBitShiftW32(int32_t *out_vector,\n                                 size_t vector_length,\n                                 const int32_t *in_vector,\n                                 int16_t right_shifts)\n{\n    size_t i;\n\n    if (right_shifts > 0)\n    {\n        for (i = vector_length; i > 0; i--)\n        {\n            (*out_vector++) = ((*in_vector++) >> right_shifts);\n        }\n    } else\n    {\n        for (i = vector_length; i > 0; i--)\n        {\n            (*out_vector++) = ((*in_vector++) << (-right_shifts));\n        }\n    }\n}\n\nvoid WebRtcSpl_VectorBitShiftW32ToW16(int16_t* out, size_t length,\n                                      const int32_t* in, int right_shifts) {\n  size_t i;\n  int32_t tmp_w32;\n\n  if (right_shifts >= 0) {\n    for (i = length; i > 0; i--) {\n      tmp_w32 = (*in++) >> right_shifts;\n      (*out++) = WebRtcSpl_SatW32ToW16(tmp_w32);\n    }\n  } else {\n    int left_shifts = -right_shifts;\n    for (i = length; i > 0; i--) {\n      tmp_w32 = (*in++) << left_shifts;\n      (*out++) = WebRtcSpl_SatW32ToW16(tmp_w32);\n    }\n  }\n}\n\nvoid WebRtcSpl_ScaleVector(const int16_t *in_vector, int16_t *out_vector,\n                           int16_t gain, size_t in_vector_length,\n                           int16_t right_shifts)\n{\n    // Performs vector operation: out_vector = (gain*in_vector)>>right_shifts\n    size_t i;\n    const int16_t *inptr;\n    int16_t *outptr;\n\n    inptr = in_vector;\n    outptr = out_vector;\n\n    for (i = 0; i < in_vector_length; i++)\n    {\n      *outptr++ = (int16_t)((*inptr++ * gain) >> right_shifts);\n    }\n}\n\nvoid WebRtcSpl_ScaleVectorWithSat(const int16_t *in_vector, int16_t *out_vector,\n                                 int16_t gain, size_t in_vector_length,\n                                 int16_t right_shifts)\n{\n    // Performs vector operation: out_vector = (gain*in_vector)>>right_shifts\n    size_t i;\n    const int16_t *inptr;\n    int16_t *outptr;\n\n    inptr = in_vector;\n    outptr = out_vector;\n\n    for (i = 0; i < in_vector_length; i++) {\n      *outptr++ = WebRtcSpl_SatW32ToW16((*inptr++ * gain) >> right_shifts);\n    }\n}\n\nvoid WebRtcSpl_ScaleAndAddVectors(const int16_t *in1, int16_t gain1, int shift1,\n                                  const int16_t *in2, int16_t gain2, int shift2,\n                                  int16_t *out, size_t vector_length)\n{\n    // Performs vector operation: out = (gain1*in1)>>shift1 + (gain2*in2)>>shift2\n    size_t i;\n    const int16_t *in1ptr;\n    const int16_t *in2ptr;\n    int16_t *outptr;\n\n    in1ptr = in1;\n    in2ptr = in2;\n    outptr = out;\n\n    for (i = 0; i < vector_length; i++)\n    {\n      *outptr++ = (int16_t)((gain1 * *in1ptr++) >> shift1) +\n          (int16_t)((gain2 * *in2ptr++) >> shift2);\n    }\n}\n\n// C version of WebRtcSpl_ScaleAndAddVectorsWithRound() for generic platforms.\nint WebRtcSpl_ScaleAndAddVectorsWithRoundC(const int16_t* in_vector1,\n                                           int16_t in_vector1_scale,\n                                           const int16_t* in_vector2,\n                                           int16_t in_vector2_scale,\n                                           int right_shifts,\n                                           int16_t* out_vector,\n                                           size_t length) {\n  size_t i = 0;\n  int round_value = (1 << right_shifts) >> 1;\n\n  if (in_vector1 == NULL || in_vector2 == NULL || out_vector == NULL ||\n      length == 0 || right_shifts < 0) {\n    return -1;\n  }\n\n  for (i = 0; i < length; i++) {\n    out_vector[i] = (int16_t)((\n        in_vector1[i] * in_vector1_scale + in_vector2[i] * in_vector2_scale +\n        round_value) >> right_shifts);\n  }\n\n  return 0;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/sparse_fir_filter.cc",
    "content": "/*\n *  Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/sparse_fir_filter.h\"\n\n#include \"webrtc/base/checks.h\"\n\nnamespace webrtc {\n\nSparseFIRFilter::SparseFIRFilter(const float* nonzero_coeffs,\n                                 size_t num_nonzero_coeffs,\n                                 size_t sparsity,\n                                 size_t offset)\n    : sparsity_(sparsity),\n      offset_(offset),\n      nonzero_coeffs_(nonzero_coeffs, nonzero_coeffs + num_nonzero_coeffs),\n      state_(sparsity_ * (num_nonzero_coeffs - 1) + offset_, 0.f) {\n  RTC_CHECK_GE(num_nonzero_coeffs, 1);\n  RTC_CHECK_GE(sparsity, 1);\n}\n\nSparseFIRFilter::~SparseFIRFilter() = default;\n\nvoid SparseFIRFilter::Filter(const float* in, size_t length, float* out) {\n  // Convolves the input signal |in| with the filter kernel |nonzero_coeffs_|\n  // taking into account the previous state.\n  for (size_t i = 0; i < length; ++i) {\n    out[i] = 0.f;\n    size_t j;\n    for (j = 0; i >= j * sparsity_ + offset_ &&\n                j < nonzero_coeffs_.size(); ++j) {\n      out[i] += in[i - j * sparsity_ - offset_] * nonzero_coeffs_[j];\n    }\n    for (; j < nonzero_coeffs_.size(); ++j) {\n      out[i] += state_[i + (nonzero_coeffs_.size() - j - 1) * sparsity_] *\n                nonzero_coeffs_[j];\n    }\n  }\n\n  // Update current state.\n  if (state_.size() > 0u) {\n    if (length >= state_.size()) {\n      std::memcpy(&state_[0],\n                  &in[length - state_.size()],\n                  state_.size() * sizeof(*in));\n    } else {\n      std::memmove(&state_[0],\n                   &state_[length],\n                   (state_.size() - length) * sizeof(state_[0]));\n      std::memcpy(&state_[state_.size() - length], in, length * sizeof(*in));\n    }\n  }\n}\n\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/sparse_fir_filter.h",
    "content": "/*\n *  Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_COMMON_AUDIO_SPARSE_FIR_FILTER_H_\n#define WEBRTC_COMMON_AUDIO_SPARSE_FIR_FILTER_H_\n\n#include <cstring>\n#include <vector>\n\n#include \"webrtc/base/constructormagic.h\"\n\nnamespace webrtc {\n\n// A Finite Impulse Response filter implementation which takes advantage of a\n// sparse structure with uniformly distributed non-zero coefficients.\nclass SparseFIRFilter final {\n public:\n  // |num_nonzero_coeffs| is the number of non-zero coefficients,\n  // |nonzero_coeffs|. They are assumed to be uniformly distributed every\n  // |sparsity| samples and with an initial |offset|. The rest of the filter\n  // coefficients will be assumed zeros. For example, with sparsity = 3, and\n  // offset = 1 the filter coefficients will be:\n  // B = [0 coeffs[0] 0 0 coeffs[1] 0 0 coeffs[2] ... ]\n  // All initial state values will be zeros.\n  SparseFIRFilter(const float* nonzero_coeffs,\n                  size_t num_nonzero_coeffs,\n                  size_t sparsity,\n                  size_t offset);\n  ~SparseFIRFilter();\n\n  // Filters the |in| data supplied.\n  // |out| must be previously allocated and it must be at least of |length|.\n  void Filter(const float* in, size_t length, float* out);\n\n private:\n  const size_t sparsity_;\n  const size_t offset_;\n  const std::vector<float> nonzero_coeffs_;\n  std::vector<float> state_;\n\n  RTC_DISALLOW_COPY_AND_ASSIGN(SparseFIRFilter);\n};\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_COMMON_AUDIO_SPARSE_FIR_FILTER_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/wav_file.cc",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/common_audio/wav_file.h\"\n\n#include <algorithm>\n#include <cstdio>\n#include <limits>\n#include <sstream>\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/base/safe_conversions.h\"\n#include \"webrtc/common_audio/include/audio_util.h\"\n#include \"webrtc/common_audio/wav_header.h\"\n\nnamespace webrtc {\n\n// We write 16-bit PCM WAV files.\nstatic const WavFormat kWavFormat = kWavFormatPcm;\nstatic const size_t kBytesPerSample = 2;\n\n// Doesn't take ownership of the file handle and won't close it.\nclass ReadableWavFile : public ReadableWav {\n public:\n  explicit ReadableWavFile(FILE* file) : file_(file) {}\n  virtual size_t Read(void* buf, size_t num_bytes) {\n    return fread(buf, 1, num_bytes, file_);\n  }\n\n private:\n  FILE* file_;\n};\n\nstd::string WavFile::FormatAsString() const {\n  std::ostringstream s;\n  s << \"Sample rate: \" << sample_rate() << \" Hz, Channels: \" << num_channels()\n    << \", Duration: \"\n    << (1.f * num_samples()) / (num_channels() * sample_rate()) << \" s\";\n  return s.str();\n}\n\nWavReader::WavReader(const std::string& filename)\n    : file_handle_(fopen(filename.c_str(), \"rb\")) {\n  RTC_CHECK(file_handle_) << \"Could not open wav file for reading.\";\n\n  ReadableWavFile readable(file_handle_);\n  WavFormat format;\n  size_t bytes_per_sample;\n  RTC_CHECK(ReadWavHeader(&readable, &num_channels_, &sample_rate_, &format,\n                          &bytes_per_sample, &num_samples_));\n  num_samples_remaining_ = num_samples_;\n  RTC_CHECK_EQ(kWavFormat, format);\n  RTC_CHECK_EQ(kBytesPerSample, bytes_per_sample);\n}\n\nWavReader::~WavReader() {\n  Close();\n}\n\nint WavReader::sample_rate() const {\n  return sample_rate_;\n}\n\nsize_t WavReader::num_channels() const {\n  return num_channels_;\n}\n\nsize_t WavReader::num_samples() const {\n  return num_samples_;\n}\n\nsize_t WavReader::ReadSamples(size_t num_samples, int16_t* samples) {\n#ifndef WEBRTC_ARCH_LITTLE_ENDIAN\n#error \"Need to convert samples to big-endian when reading from WAV file\"\n#endif\n  // There could be metadata after the audio; ensure we don't read it.\n  num_samples = std::min(num_samples, num_samples_remaining_);\n  const size_t read =\n      fread(samples, sizeof(*samples), num_samples, file_handle_);\n  // If we didn't read what was requested, ensure we've reached the EOF.\n  RTC_CHECK(read == num_samples || feof(file_handle_));\n  RTC_CHECK_LE(read, num_samples_remaining_);\n  num_samples_remaining_ -= read;\n  return read;\n}\n\nsize_t WavReader::ReadSamples(size_t num_samples, float* samples) {\n  static const size_t kChunksize = 4096 / sizeof(uint16_t);\n  size_t read = 0;\n  for (size_t i = 0; i < num_samples; i += kChunksize) {\n    int16_t isamples[kChunksize];\n    size_t chunk = std::min(kChunksize, num_samples - i);\n    chunk = ReadSamples(chunk, isamples);\n    for (size_t j = 0; j < chunk; ++j)\n      samples[i + j] = isamples[j];\n    read += chunk;\n  }\n  return read;\n}\n\nvoid WavReader::Close() {\n  RTC_CHECK_EQ(0, fclose(file_handle_));\n  file_handle_ = NULL;\n}\n\nWavWriter::WavWriter(const std::string& filename, int sample_rate,\n                     size_t num_channels)\n    : sample_rate_(sample_rate),\n      num_channels_(num_channels),\n      num_samples_(0),\n      file_handle_(fopen(filename.c_str(), \"wb\")) {\n  RTC_CHECK(file_handle_) << \"Could not open wav file for writing.\";\n  RTC_CHECK(CheckWavParameters(num_channels_, sample_rate_, kWavFormat,\n                               kBytesPerSample, num_samples_));\n\n  // Write a blank placeholder header, since we need to know the total number\n  // of samples before we can fill in the real data.\n  static const uint8_t blank_header[kWavHeaderSize] = {0};\n  RTC_CHECK_EQ(1, fwrite(blank_header, kWavHeaderSize, 1, file_handle_));\n}\n\nWavWriter::~WavWriter() {\n  Close();\n}\n\nint WavWriter::sample_rate() const {\n  return sample_rate_;\n}\n\nsize_t WavWriter::num_channels() const {\n  return num_channels_;\n}\n\nsize_t WavWriter::num_samples() const {\n  return num_samples_;\n}\n\nvoid WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) {\n#ifndef WEBRTC_ARCH_LITTLE_ENDIAN\n#error \"Need to convert samples to little-endian when writing to WAV file\"\n#endif\n  const size_t written =\n      fwrite(samples, sizeof(*samples), num_samples, file_handle_);\n  RTC_CHECK_EQ(num_samples, written);\n  num_samples_ += written;\n  RTC_CHECK(num_samples_ >= written);  // detect size_t overflow\n}\n\nvoid WavWriter::WriteSamples(const float* samples, size_t num_samples) {\n  static const size_t kChunksize = 4096 / sizeof(uint16_t);\n  for (size_t i = 0; i < num_samples; i += kChunksize) {\n    int16_t isamples[kChunksize];\n    const size_t chunk = std::min(kChunksize, num_samples - i);\n    FloatS16ToS16(samples + i, chunk, isamples);\n    WriteSamples(isamples, chunk);\n  }\n}\n\nvoid WavWriter::Close() {\n  RTC_CHECK_EQ(0, fseek(file_handle_, 0, SEEK_SET));\n  uint8_t header[kWavHeaderSize];\n  WriteWavHeader(header, num_channels_, sample_rate_, kWavFormat,\n                 kBytesPerSample, num_samples_);\n  RTC_CHECK_EQ(1, fwrite(header, kWavHeaderSize, 1, file_handle_));\n  RTC_CHECK_EQ(0, fclose(file_handle_));\n  file_handle_ = NULL;\n}\n\n}  // namespace webrtc\n\nrtc_WavWriter* rtc_WavOpen(const char* filename,\n                           int sample_rate,\n                           size_t num_channels) {\n  return reinterpret_cast<rtc_WavWriter*>(\n      new webrtc::WavWriter(filename, sample_rate, num_channels));\n}\n\nvoid rtc_WavClose(rtc_WavWriter* wf) {\n  delete reinterpret_cast<webrtc::WavWriter*>(wf);\n}\n\nvoid rtc_WavWriteSamples(rtc_WavWriter* wf,\n                         const float* samples,\n                         size_t num_samples) {\n  reinterpret_cast<webrtc::WavWriter*>(wf)->WriteSamples(samples, num_samples);\n}\n\nint rtc_WavSampleRate(const rtc_WavWriter* wf) {\n  return reinterpret_cast<const webrtc::WavWriter*>(wf)->sample_rate();\n}\n\nsize_t rtc_WavNumChannels(const rtc_WavWriter* wf) {\n  return reinterpret_cast<const webrtc::WavWriter*>(wf)->num_channels();\n}\n\nsize_t rtc_WavNumSamples(const rtc_WavWriter* wf) {\n  return reinterpret_cast<const webrtc::WavWriter*>(wf)->num_samples();\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/wav_file.h",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_COMMON_AUDIO_WAV_FILE_H_\n#define WEBRTC_COMMON_AUDIO_WAV_FILE_H_\n\n#ifdef __cplusplus\n\n#include <stdint.h>\n#include <cstddef>\n#include <string>\n\n#include \"webrtc/base/constructormagic.h\"\n\nnamespace webrtc {\n\n// Interface to provide access to WAV file parameters.\nclass WavFile {\n public:\n  virtual ~WavFile() {}\n\n  virtual int sample_rate() const = 0;\n  virtual size_t num_channels() const = 0;\n  virtual size_t num_samples() const = 0;\n\n  // Returns a human-readable string containing the audio format.\n  std::string FormatAsString() const;\n};\n\n// Simple C++ class for writing 16-bit PCM WAV files. All error handling is\n// by calls to RTC_CHECK(), making it unsuitable for anything but debug code.\nclass WavWriter final : public WavFile {\n public:\n  // Open a new WAV file for writing.\n  WavWriter(const std::string& filename, int sample_rate, size_t num_channels);\n\n  // Close the WAV file, after writing its header.\n  ~WavWriter() override;\n\n  // Write additional samples to the file. Each sample is in the range\n  // [-32768,32767], and there must be the previously specified number of\n  // interleaved channels.\n  void WriteSamples(const float* samples, size_t num_samples);\n  void WriteSamples(const int16_t* samples, size_t num_samples);\n\n  int sample_rate() const override;\n  size_t num_channels() const override;\n  size_t num_samples() const override;\n\n private:\n  void Close();\n  const int sample_rate_;\n  const size_t num_channels_;\n  size_t num_samples_;  // Total number of samples written to file.\n  FILE* file_handle_;  // Output file, owned by this class\n\n  RTC_DISALLOW_COPY_AND_ASSIGN(WavWriter);\n};\n\n// Follows the conventions of WavWriter.\nclass WavReader final : public WavFile {\n public:\n  // Opens an existing WAV file for reading.\n  explicit WavReader(const std::string& filename);\n\n  // Close the WAV file.\n  ~WavReader() override;\n\n  // Returns the number of samples read. If this is less than requested,\n  // verifies that the end of the file was reached.\n  size_t ReadSamples(size_t num_samples, float* samples);\n  size_t ReadSamples(size_t num_samples, int16_t* samples);\n\n  int sample_rate() const override;\n  size_t num_channels() const override;\n  size_t num_samples() const override;\n\n private:\n  void Close();\n  int sample_rate_;\n  size_t num_channels_;\n  size_t num_samples_;  // Total number of samples in the file.\n  size_t num_samples_remaining_;\n  FILE* file_handle_;  // Input file, owned by this class.\n\n  RTC_DISALLOW_COPY_AND_ASSIGN(WavReader);\n};\n\n}  // namespace webrtc\n\nextern \"C\" {\n#endif  // __cplusplus\n\n// C wrappers for the WavWriter class.\ntypedef struct rtc_WavWriter rtc_WavWriter;\nrtc_WavWriter* rtc_WavOpen(const char* filename,\n                           int sample_rate,\n                           size_t num_channels);\nvoid rtc_WavClose(rtc_WavWriter* wf);\nvoid rtc_WavWriteSamples(rtc_WavWriter* wf,\n                         const float* samples,\n                         size_t num_samples);\nint rtc_WavSampleRate(const rtc_WavWriter* wf);\nsize_t rtc_WavNumChannels(const rtc_WavWriter* wf);\nsize_t rtc_WavNumSamples(const rtc_WavWriter* wf);\n\n#ifdef __cplusplus\n}  // extern \"C\"\n#endif\n\n#endif  // WEBRTC_COMMON_AUDIO_WAV_FILE_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/wav_header.cc",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// Based on the WAV file format documentation at\n// https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ and\n// http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html\n\n#include \"webrtc/common_audio/wav_header.h\"\n\n#include <algorithm>\n#include <cstring>\n#include <limits>\n#include <string>\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_audio/include/audio_util.h\"\n\nnamespace webrtc {\nnamespace {\n\nstruct ChunkHeader {\n  uint32_t ID;\n  uint32_t Size;\n};\nstatic_assert(sizeof(ChunkHeader) == 8, \"ChunkHeader size\");\n\n// We can't nest this definition in WavHeader, because VS2013 gives an error\n// on sizeof(WavHeader::fmt): \"error C2070: 'unknown': illegal sizeof operand\".\nstruct FmtSubchunk {\n  ChunkHeader header;\n  uint16_t AudioFormat;\n  uint16_t NumChannels;\n  uint32_t SampleRate;\n  uint32_t ByteRate;\n  uint16_t BlockAlign;\n  uint16_t BitsPerSample;\n};\nstatic_assert(sizeof(FmtSubchunk) == 24, \"FmtSubchunk size\");\nconst uint32_t kFmtSubchunkSize = sizeof(FmtSubchunk) - sizeof(ChunkHeader);\n\nstruct WavHeader {\n  struct {\n    ChunkHeader header;\n    uint32_t Format;\n  } riff;\n  FmtSubchunk fmt;\n  struct {\n    ChunkHeader header;\n  } data;\n};\nstatic_assert(sizeof(WavHeader) == kWavHeaderSize, \"no padding in header\");\n\n}  // namespace\n\nbool CheckWavParameters(size_t num_channels,\n                        int sample_rate,\n                        WavFormat format,\n                        size_t bytes_per_sample,\n                        size_t num_samples) {\n  // num_channels, sample_rate, and bytes_per_sample must be positive, must fit\n  // in their respective fields, and their product must fit in the 32-bit\n  // ByteRate field.\n  if (num_channels == 0 || sample_rate <= 0 || bytes_per_sample == 0)\n    return false;\n  if (static_cast<uint64_t>(sample_rate) > std::numeric_limits<uint32_t>::max())\n    return false;\n  if (num_channels > std::numeric_limits<uint16_t>::max())\n    return false;\n  if (static_cast<uint64_t>(bytes_per_sample) * 8 >\n      std::numeric_limits<uint16_t>::max())\n    return false;\n  if (static_cast<uint64_t>(sample_rate) * num_channels * bytes_per_sample >\n      std::numeric_limits<uint32_t>::max())\n    return false;\n\n  // format and bytes_per_sample must agree.\n  switch (format) {\n    case kWavFormatPcm:\n      // Other values may be OK, but for now we're conservative:\n      if (bytes_per_sample != 1 && bytes_per_sample != 2)\n        return false;\n      break;\n    case kWavFormatALaw:\n    case kWavFormatMuLaw:\n      if (bytes_per_sample != 1)\n        return false;\n      break;\n    default:\n      return false;\n  }\n\n  // The number of bytes in the file, not counting the first ChunkHeader, must\n  // be less than 2^32; otherwise, the ChunkSize field overflows.\n  const size_t header_size = kWavHeaderSize - sizeof(ChunkHeader);\n  const size_t max_samples =\n      (std::numeric_limits<uint32_t>::max() - header_size) / bytes_per_sample;\n  if (num_samples > max_samples)\n    return false;\n\n  // Each channel must have the same number of samples.\n  if (num_samples % num_channels != 0)\n    return false;\n\n  return true;\n}\n\n#ifdef WEBRTC_ARCH_LITTLE_ENDIAN\nstatic inline void WriteLE16(uint16_t* f, uint16_t x) { *f = x; }\nstatic inline void WriteLE32(uint32_t* f, uint32_t x) { *f = x; }\nstatic inline void WriteFourCC(uint32_t* f, char a, char b, char c, char d) {\n  *f = static_cast<uint32_t>(a)\n      | static_cast<uint32_t>(b) << 8\n      | static_cast<uint32_t>(c) << 16\n      | static_cast<uint32_t>(d) << 24;\n}\n\nstatic inline uint16_t ReadLE16(uint16_t x) { return x; }\nstatic inline uint32_t ReadLE32(uint32_t x) { return x; }\nstatic inline std::string ReadFourCC(uint32_t x) {\n  return std::string(reinterpret_cast<char*>(&x), 4);\n}\n#else\n#error \"Write be-to-le conversion functions\"\n#endif\n\nstatic inline uint32_t RiffChunkSize(size_t bytes_in_payload) {\n  return static_cast<uint32_t>(\n      bytes_in_payload + kWavHeaderSize - sizeof(ChunkHeader));\n}\n\nstatic inline uint32_t ByteRate(size_t num_channels, int sample_rate,\n                                size_t bytes_per_sample) {\n  return static_cast<uint32_t>(num_channels * sample_rate * bytes_per_sample);\n}\n\nstatic inline uint16_t BlockAlign(size_t num_channels,\n                                  size_t bytes_per_sample) {\n  return static_cast<uint16_t>(num_channels * bytes_per_sample);\n}\n\nvoid WriteWavHeader(uint8_t* buf,\n                    size_t num_channels,\n                    int sample_rate,\n                    WavFormat format,\n                    size_t bytes_per_sample,\n                    size_t num_samples) {\n  RTC_CHECK(CheckWavParameters(num_channels, sample_rate, format,\n                               bytes_per_sample, num_samples));\n\n  WavHeader header;\n  const size_t bytes_in_payload = bytes_per_sample * num_samples;\n\n  WriteFourCC(&header.riff.header.ID, 'R', 'I', 'F', 'F');\n  WriteLE32(&header.riff.header.Size, RiffChunkSize(bytes_in_payload));\n  WriteFourCC(&header.riff.Format, 'W', 'A', 'V', 'E');\n\n  WriteFourCC(&header.fmt.header.ID, 'f', 'm', 't', ' ');\n  WriteLE32(&header.fmt.header.Size, kFmtSubchunkSize);\n  WriteLE16(&header.fmt.AudioFormat, format);\n  WriteLE16(&header.fmt.NumChannels, static_cast<uint16_t>(num_channels));\n  WriteLE32(&header.fmt.SampleRate, sample_rate);\n  WriteLE32(&header.fmt.ByteRate, ByteRate(num_channels, sample_rate,\n                                           bytes_per_sample));\n  WriteLE16(&header.fmt.BlockAlign, BlockAlign(num_channels, bytes_per_sample));\n  WriteLE16(&header.fmt.BitsPerSample,\n            static_cast<uint16_t>(8 * bytes_per_sample));\n\n  WriteFourCC(&header.data.header.ID, 'd', 'a', 't', 'a');\n  WriteLE32(&header.data.header.Size, static_cast<uint32_t>(bytes_in_payload));\n\n  // Do an extra copy rather than writing everything to buf directly, since buf\n  // might not be correctly aligned.\n  memcpy(buf, &header, kWavHeaderSize);\n}\n\nbool ReadWavHeader(ReadableWav* readable,\n                   size_t* num_channels,\n                   int* sample_rate,\n                   WavFormat* format,\n                   size_t* bytes_per_sample,\n                   size_t* num_samples) {\n  WavHeader header;\n  if (readable->Read(&header, kWavHeaderSize - sizeof(header.data)) !=\n      kWavHeaderSize - sizeof(header.data))\n    return false;\n\n  const uint32_t fmt_size = ReadLE32(header.fmt.header.Size);\n  if (fmt_size != kFmtSubchunkSize) {\n    // There is an optional two-byte extension field permitted to be present\n    // with PCM, but which must be zero.\n    int16_t ext_size;\n    if (kFmtSubchunkSize + sizeof(ext_size) != fmt_size)\n      return false;\n    if (readable->Read(&ext_size, sizeof(ext_size)) != sizeof(ext_size))\n      return false;\n    if (ext_size != 0)\n      return false;\n  }\n  if (readable->Read(&header.data, sizeof(header.data)) != sizeof(header.data))\n    return false;\n\n  // Parse needed fields.\n  *format = static_cast<WavFormat>(ReadLE16(header.fmt.AudioFormat));\n  *num_channels = ReadLE16(header.fmt.NumChannels);\n  *sample_rate = ReadLE32(header.fmt.SampleRate);\n  *bytes_per_sample = ReadLE16(header.fmt.BitsPerSample) / 8;\n  const size_t bytes_in_payload = ReadLE32(header.data.header.Size);\n  if (*bytes_per_sample == 0)\n    return false;\n  *num_samples = bytes_in_payload / *bytes_per_sample;\n\n  // Sanity check remaining fields.\n  if (ReadFourCC(header.riff.header.ID) != \"RIFF\")\n    return false;\n  if (ReadFourCC(header.riff.Format) != \"WAVE\")\n    return false;\n  if (ReadFourCC(header.fmt.header.ID) != \"fmt \")\n    return false;\n  if (ReadFourCC(header.data.header.ID) != \"data\")\n    return false;\n\n  if (ReadLE32(header.riff.header.Size) < RiffChunkSize(bytes_in_payload))\n    return false;\n  if (ReadLE32(header.fmt.ByteRate) !=\n      ByteRate(*num_channels, *sample_rate, *bytes_per_sample))\n    return false;\n  if (ReadLE16(header.fmt.BlockAlign) !=\n      BlockAlign(*num_channels, *bytes_per_sample))\n    return false;\n\n  return CheckWavParameters(*num_channels, *sample_rate, *format,\n                            *bytes_per_sample, *num_samples);\n}\n\n\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/common_audio/wav_header.h",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_COMMON_AUDIO_WAV_HEADER_H_\n#define WEBRTC_COMMON_AUDIO_WAV_HEADER_H_\n\n#include <stddef.h>\n#include <stdint.h>\n\nnamespace webrtc {\n\nstatic const size_t kWavHeaderSize = 44;\n\nclass ReadableWav {\n public:\n  // Returns the number of bytes read.\n  size_t virtual Read(void* buf, size_t num_bytes) = 0;\n  virtual ~ReadableWav() {}\n};\n\nenum WavFormat {\n  kWavFormatPcm   = 1,  // PCM, each sample of size bytes_per_sample\n  kWavFormatALaw  = 6,  // 8-bit ITU-T G.711 A-law\n  kWavFormatMuLaw = 7,  // 8-bit ITU-T G.711 mu-law\n};\n\n// Return true if the given parameters will make a well-formed WAV header.\nbool CheckWavParameters(size_t num_channels,\n                        int sample_rate,\n                        WavFormat format,\n                        size_t bytes_per_sample,\n                        size_t num_samples);\n\n// Write a kWavHeaderSize bytes long WAV header to buf. The payload that\n// follows the header is supposed to have the specified number of interleaved\n// channels and contain the specified total number of samples of the specified\n// type. CHECKs the input parameters for validity.\nvoid WriteWavHeader(uint8_t* buf,\n                    size_t num_channels,\n                    int sample_rate,\n                    WavFormat format,\n                    size_t bytes_per_sample,\n                    size_t num_samples);\n\n// Read a WAV header from an implemented ReadableWav and parse the values into\n// the provided output parameters. ReadableWav is used because the header can\n// be variably sized. Returns false if the header is invalid.\nbool ReadWavHeader(ReadableWav* readable,\n                   size_t* num_channels,\n                   int* sample_rate,\n                   WavFormat* format,\n                   size_t* bytes_per_sample,\n                   size_t* num_samples);\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_COMMON_AUDIO_WAV_HEADER_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aec/aec_common.h",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_\n\n#include \"webrtc/typedefs.h\"\n\n#ifdef _MSC_VER /* visual c++ */\n#define ALIGN16_BEG __declspec(align(16))\n#define ALIGN16_END\n#else /* gcc or icc */\n#define ALIGN16_BEG\n#define ALIGN16_END __attribute__((aligned(16)))\n#endif\n\n#ifdef __cplusplus\nnamespace webrtc {\n#endif\n\nextern ALIGN16_BEG const float ALIGN16_END WebRtcAec_sqrtHanning[65];\nextern ALIGN16_BEG const float ALIGN16_END WebRtcAec_weightCurve[65];\nextern ALIGN16_BEG const float ALIGN16_END WebRtcAec_overDriveCurve[65];\nextern const float WebRtcAec_kExtendedSmoothingCoefficients[2][2];\nextern const float WebRtcAec_kNormalSmoothingCoefficients[2][2];\nextern const float WebRtcAec_kMinFarendPSD;\n\n#ifdef __cplusplus\n}  // namespace webrtc\n#endif\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_COMMON_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aec/aec_core.cc",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/*\n * The core AEC algorithm, which is presented with time-aligned signals.\n */\n\n#include \"webrtc/modules/audio_processing/aec/aec_core.h\"\n\n#include <algorithm>\n#include <math.h>\n#include <stddef.h>  // size_t\n#include <stdlib.h>\n#include <string.h>\n\n#include \"webrtc/base/checks.h\"\nextern \"C\" {\n#include \"webrtc/common_audio/ring_buffer.h\"\n}\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n#include \"webrtc/modules/audio_processing/aec/aec_common.h\"\n#include \"webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h\"\n#include \"webrtc/modules/audio_processing/logging/apm_data_dumper.h\"\n#include \"webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h\"\n#include \"webrtc/system_wrappers/include/cpu_features_wrapper.h\"\n//#include \"webrtc/system_wrappers/include/metrics.h\"\n#include \"webrtc/typedefs.h\"\n\nnamespace webrtc {\nnamespace {\nenum class DelaySource {\n  kSystemDelay,    // The delay values come from the OS.\n  kDelayAgnostic,  // The delay values come from the DA-AEC.\n};\n\nconstexpr int kMinDelayLogValue = -200;\nconstexpr int kMaxDelayLogValue = 200;\nconstexpr int kNumDelayLogBuckets = 100;\n\nvoid MaybeLogDelayAdjustment(int moved_ms, DelaySource source) {\n  if (moved_ms == 0)\n    return;\n  /*switch (source) {\n    case DelaySource::kSystemDelay:\n      RTC_HISTOGRAM_COUNTS(\"WebRTC.Audio.AecDelayAdjustmentMsSystemValue\",\n                           moved_ms, kMinDelayLogValue, kMaxDelayLogValue,\n                           kNumDelayLogBuckets);\n      return;\n    case DelaySource::kDelayAgnostic:\n      RTC_HISTOGRAM_COUNTS(\"WebRTC.Audio.AecDelayAdjustmentMsAgnosticValue\",\n                           moved_ms, kMinDelayLogValue, kMaxDelayLogValue,\n                           kNumDelayLogBuckets);\n      return;\n  }*/\n}\n}  // namespace\n\n// Buffer size (samples)\nstatic const size_t kBufferSizeBlocks = 250;  // 1 second of audio in 16 kHz.\n\n// Metrics\nstatic const size_t kSubCountLen = 4;\nstatic const size_t kCountLen = 50;\nstatic const int kDelayMetricsAggregationWindow = 1250;  // 5 seconds at 16 kHz.\n\n// Divergence metric is based on audio level, which gets updated every\n// |kSubCountLen + 1| * PART_LEN samples. Divergence metric takes the statistics\n// of |kDivergentFilterFractionAggregationWindowSize| audio levels. The\n// following value corresponds to 1 second at 16 kHz.\nstatic const int kDivergentFilterFractionAggregationWindowSize = 50;\n\n// Quantities to control H band scaling for SWB input\nstatic const float cnScaleHband = 0.4f;  // scale for comfort noise in H band.\n// Initial bin for averaging nlp gain in low band\nstatic const int freqAvgIc = PART_LEN / 2;\n\n// Matlab code to produce table:\n// win = sqrt(hanning(63)); win = [0 ; win(1:32)];\n// fprintf(1, '\\t%.14f, %.14f, %.14f,\\n', win);\nALIGN16_BEG const float ALIGN16_END WebRtcAec_sqrtHanning[65] = {\n    0.00000000000000f, 0.02454122852291f, 0.04906767432742f, 0.07356456359967f,\n    0.09801714032956f, 0.12241067519922f, 0.14673047445536f, 0.17096188876030f,\n    0.19509032201613f, 0.21910124015687f, 0.24298017990326f, 0.26671275747490f,\n    0.29028467725446f, 0.31368174039889f, 0.33688985339222f, 0.35989503653499f,\n    0.38268343236509f, 0.40524131400499f, 0.42755509343028f, 0.44961132965461f,\n    0.47139673682600f, 0.49289819222978f, 0.51410274419322f, 0.53499761988710f,\n    0.55557023301960f, 0.57580819141785f, 0.59569930449243f, 0.61523159058063f,\n    0.63439328416365f, 0.65317284295378f, 0.67155895484702f, 0.68954054473707f,\n    0.70710678118655f, 0.72424708295147f, 0.74095112535496f, 0.75720884650648f,\n    0.77301045336274f, 0.78834642762661f, 0.80320753148064f, 0.81758481315158f,\n    0.83146961230255f, 0.84485356524971f, 0.85772861000027f, 0.87008699110871f,\n    0.88192126434835f, 0.89322430119552f, 0.90398929312344f, 0.91420975570353f,\n    0.92387953251129f, 0.93299279883474f, 0.94154406518302f, 0.94952818059304f,\n    0.95694033573221f, 0.96377606579544f, 0.97003125319454f, 0.97570213003853f,\n    0.98078528040323f, 0.98527764238894f, 0.98917650996478f, 0.99247953459871f,\n    0.99518472667220f, 0.99729045667869f, 0.99879545620517f, 0.99969881869620f,\n    1.00000000000000f};\n\n// Matlab code to produce table:\n// weightCurve = [0 ; 0.3 * sqrt(linspace(0,1,64))' + 0.1];\n// fprintf(1, '\\t%.4f, %.4f, %.4f, %.4f, %.4f, %.4f,\\n', weightCurve);\nALIGN16_BEG const float ALIGN16_END WebRtcAec_weightCurve[65] = {\n    0.0000f, 0.1000f, 0.1378f, 0.1535f, 0.1655f, 0.1756f, 0.1845f, 0.1926f,\n    0.2000f, 0.2069f, 0.2134f, 0.2195f, 0.2254f, 0.2309f, 0.2363f, 0.2414f,\n    0.2464f, 0.2512f, 0.2558f, 0.2604f, 0.2648f, 0.2690f, 0.2732f, 0.2773f,\n    0.2813f, 0.2852f, 0.2890f, 0.2927f, 0.2964f, 0.3000f, 0.3035f, 0.3070f,\n    0.3104f, 0.3138f, 0.3171f, 0.3204f, 0.3236f, 0.3268f, 0.3299f, 0.3330f,\n    0.3360f, 0.3390f, 0.3420f, 0.3449f, 0.3478f, 0.3507f, 0.3535f, 0.3563f,\n    0.3591f, 0.3619f, 0.3646f, 0.3673f, 0.3699f, 0.3726f, 0.3752f, 0.3777f,\n    0.3803f, 0.3828f, 0.3854f, 0.3878f, 0.3903f, 0.3928f, 0.3952f, 0.3976f,\n    0.4000f};\n\n// Matlab code to produce table:\n// overDriveCurve = [sqrt(linspace(0,1,65))' + 1];\n// fprintf(1, '\\t%.4f, %.4f, %.4f, %.4f, %.4f, %.4f,\\n', overDriveCurve);\nALIGN16_BEG const float ALIGN16_END WebRtcAec_overDriveCurve[65] = {\n    1.0000f, 1.1250f, 1.1768f, 1.2165f, 1.2500f, 1.2795f, 1.3062f, 1.3307f,\n    1.3536f, 1.3750f, 1.3953f, 1.4146f, 1.4330f, 1.4507f, 1.4677f, 1.4841f,\n    1.5000f, 1.5154f, 1.5303f, 1.5449f, 1.5590f, 1.5728f, 1.5863f, 1.5995f,\n    1.6124f, 1.6250f, 1.6374f, 1.6495f, 1.6614f, 1.6731f, 1.6847f, 1.6960f,\n    1.7071f, 1.7181f, 1.7289f, 1.7395f, 1.7500f, 1.7603f, 1.7706f, 1.7806f,\n    1.7906f, 1.8004f, 1.8101f, 1.8197f, 1.8292f, 1.8385f, 1.8478f, 1.8570f,\n    1.8660f, 1.8750f, 1.8839f, 1.8927f, 1.9014f, 1.9100f, 1.9186f, 1.9270f,\n    1.9354f, 1.9437f, 1.9520f, 1.9601f, 1.9682f, 1.9763f, 1.9843f, 1.9922f,\n    2.0000f};\n\n// Delay Agnostic AEC parameters, still under development and may change.\nstatic const float kDelayQualityThresholdMax = 0.07f;\nstatic const float kDelayQualityThresholdMin = 0.01f;\nstatic const int kInitialShiftOffset = 5;\n#if !defined(WEBRTC_ANDROID)\nstatic const int kDelayCorrectionStart = 1500;  // 10 ms chunks\n#endif\n\n// Target suppression levels for nlp modes.\n// log{0.001, 0.00001, 0.00000001}\nstatic const float kTargetSupp[3] = {-6.9f, -11.5f, -18.4f};\n\n// Two sets of parameters, one for the extended filter mode.\nstatic const float kExtendedMinOverDrive[3] = {3.0f, 6.0f, 15.0f};\nstatic const float kNormalMinOverDrive[3] = {1.0f, 2.0f, 5.0f};\nconst float WebRtcAec_kExtendedSmoothingCoefficients[2][2] = {{0.9f, 0.1f},\n                                                              {0.92f, 0.08f}};\nconst float WebRtcAec_kNormalSmoothingCoefficients[2][2] = {{0.9f, 0.1f},\n                                                            {0.93f, 0.07f}};\n\n// Number of partitions forming the NLP's \"preferred\" bands.\nenum { kPrefBandSize = 24 };\n\nWebRtcAecFilterFar WebRtcAec_FilterFar;\nWebRtcAecScaleErrorSignal WebRtcAec_ScaleErrorSignal;\nWebRtcAecFilterAdaptation WebRtcAec_FilterAdaptation;\nWebRtcAecOverdrive WebRtcAec_Overdrive;\nWebRtcAecSuppress WebRtcAec_Suppress;\nWebRtcAecComputeCoherence WebRtcAec_ComputeCoherence;\nWebRtcAecUpdateCoherenceSpectra WebRtcAec_UpdateCoherenceSpectra;\nWebRtcAecStoreAsComplex WebRtcAec_StoreAsComplex;\nWebRtcAecPartitionDelay WebRtcAec_PartitionDelay;\nWebRtcAecWindowData WebRtcAec_WindowData;\n\n__inline static float MulRe(float aRe, float aIm, float bRe, float bIm) {\n  return aRe * bRe - aIm * bIm;\n}\n\n__inline static float MulIm(float aRe, float aIm, float bRe, float bIm) {\n  return aRe * bIm + aIm * bRe;\n}\n\n// TODO(minyue): Due to a legacy bug, |framelevel| and |averagelevel| use a\n// window, of which the length is 1 unit longer than indicated. Remove \"+1\" when\n// the code is refactored.\nPowerLevel::PowerLevel()\n    : framelevel(kSubCountLen + 1),\n      averagelevel(kCountLen + 1) {\n}\n\nBlockBuffer::BlockBuffer() {\n  buffer_ = WebRtc_CreateBuffer(kBufferSizeBlocks, sizeof(float) * PART_LEN);\n  RTC_CHECK(buffer_);\n  ReInit();\n}\n\nBlockBuffer::~BlockBuffer() {\n  WebRtc_FreeBuffer(buffer_);\n}\n\nvoid BlockBuffer::ReInit() {\n  WebRtc_InitBuffer(buffer_);\n}\n\nvoid BlockBuffer::Insert(const float block[PART_LEN]) {\n  WebRtc_WriteBuffer(buffer_, block, 1);\n}\n\nvoid BlockBuffer::ExtractExtendedBlock(float extended_block[PART_LEN2]) {\n  float* block_ptr = NULL;\n  RTC_DCHECK_LT(0, AvaliableSpace());\n\n  // Extract the previous block.\n  WebRtc_MoveReadPtr(buffer_, -1);\n  WebRtc_ReadBuffer(buffer_, reinterpret_cast<void**>(&block_ptr),\n                    &extended_block[0], 1);\n  if (block_ptr != &extended_block[0]) {\n    memcpy(&extended_block[0], block_ptr, PART_LEN * sizeof(float));\n  }\n\n  // Extract the current block.\n  WebRtc_ReadBuffer(buffer_, reinterpret_cast<void**>(&block_ptr),\n                    &extended_block[PART_LEN], 1);\n  if (block_ptr != &extended_block[PART_LEN]) {\n    memcpy(&extended_block[PART_LEN], block_ptr, PART_LEN * sizeof(float));\n  }\n}\n\nint BlockBuffer::AdjustSize(int buffer_size_decrease) {\n  return WebRtc_MoveReadPtr(buffer_, buffer_size_decrease);\n}\n\nsize_t BlockBuffer::Size() {\n  return static_cast<int>(WebRtc_available_read(buffer_));\n}\n\nsize_t BlockBuffer::AvaliableSpace() {\n  return WebRtc_available_write(buffer_);\n}\n\nDivergentFilterFraction::DivergentFilterFraction()\n    : count_(0),\n      occurrence_(0),\n      fraction_(-1.0) {\n}\n\nvoid DivergentFilterFraction::Reset() {\n  Clear();\n  fraction_ = -1.0;\n}\n\nvoid DivergentFilterFraction::AddObservation(const PowerLevel& nearlevel,\n                                             const PowerLevel& linoutlevel,\n                                             const PowerLevel& nlpoutlevel) {\n  const float near_level = nearlevel.framelevel.GetLatestMean();\n  const float level_increase =\n      linoutlevel.framelevel.GetLatestMean() - near_level;\n  const bool output_signal_active = nlpoutlevel.framelevel.GetLatestMean() >\n          40.0 * nlpoutlevel.minlevel;\n  // Level increase should be, in principle, negative, when the filter\n  // does not diverge. Here we allow some margin (0.01 * near end level) and\n  // numerical error (1.0). We count divergence only when the AEC output\n  // signal is active.\n  if (output_signal_active &&\n      level_increase > std::max(0.01 * near_level, 1.0))\n    occurrence_++;\n  ++count_;\n  if (count_ == kDivergentFilterFractionAggregationWindowSize) {\n    fraction_ = static_cast<float>(occurrence_) /\n        kDivergentFilterFractionAggregationWindowSize;\n    Clear();\n  }\n}\n\nfloat DivergentFilterFraction::GetLatestFraction() const {\n  return fraction_;\n}\n\nvoid DivergentFilterFraction::Clear() {\n  count_ = 0;\n  occurrence_ = 0;\n}\n\n// TODO(minyue): Moving some initialization from WebRtcAec_CreateAec() to ctor.\nAecCore::AecCore(int instance_index)\n    : data_dumper(new ApmDataDumper(instance_index)) {}\n\nAecCore::~AecCore() {}\n\nstatic int CmpFloat(const void* a, const void* b) {\n  const float* da = (const float*)a;\n  const float* db = (const float*)b;\n\n  return (*da > *db) - (*da < *db);\n}\n\nstatic void FilterFar(int num_partitions,\n                      int x_fft_buf_block_pos,\n                      float x_fft_buf[2][kExtendedNumPartitions * PART_LEN1],\n                      float h_fft_buf[2][kExtendedNumPartitions * PART_LEN1],\n                      float y_fft[2][PART_LEN1]) {\n  int i;\n  for (i = 0; i < num_partitions; i++) {\n    int j;\n    int xPos = (i + x_fft_buf_block_pos) * PART_LEN1;\n    int pos = i * PART_LEN1;\n    // Check for wrap\n    if (i + x_fft_buf_block_pos >= num_partitions) {\n      xPos -= num_partitions * (PART_LEN1);\n    }\n\n    for (j = 0; j < PART_LEN1; j++) {\n      y_fft[0][j] += MulRe(x_fft_buf[0][xPos + j], x_fft_buf[1][xPos + j],\n                           h_fft_buf[0][pos + j], h_fft_buf[1][pos + j]);\n      y_fft[1][j] += MulIm(x_fft_buf[0][xPos + j], x_fft_buf[1][xPos + j],\n                           h_fft_buf[0][pos + j], h_fft_buf[1][pos + j]);\n    }\n  }\n}\n\nstatic void ScaleErrorSignal(float mu,\n                             float error_threshold,\n                             float x_pow[PART_LEN1],\n                             float ef[2][PART_LEN1]) {\n  int i;\n  float abs_ef;\n  for (i = 0; i < (PART_LEN1); i++) {\n    ef[0][i] /= (x_pow[i] + 1e-10f);\n    ef[1][i] /= (x_pow[i] + 1e-10f);\n    abs_ef = sqrtf(ef[0][i] * ef[0][i] + ef[1][i] * ef[1][i]);\n\n    if (abs_ef > error_threshold) {\n      abs_ef = error_threshold / (abs_ef + 1e-10f);\n      ef[0][i] *= abs_ef;\n      ef[1][i] *= abs_ef;\n    }\n\n    // Stepsize factor\n    ef[0][i] *= mu;\n    ef[1][i] *= mu;\n  }\n}\n\nstatic void FilterAdaptation(\n    const OouraFft& ooura_fft,\n    int num_partitions,\n    int x_fft_buf_block_pos,\n    float x_fft_buf[2][kExtendedNumPartitions * PART_LEN1],\n    float e_fft[2][PART_LEN1],\n    float h_fft_buf[2][kExtendedNumPartitions * PART_LEN1]) {\n  int i, j;\n  float fft[PART_LEN2];\n  for (i = 0; i < num_partitions; i++) {\n    int xPos = (i + x_fft_buf_block_pos) * (PART_LEN1);\n    int pos;\n    // Check for wrap\n    if (i + x_fft_buf_block_pos >= num_partitions) {\n      xPos -= num_partitions * PART_LEN1;\n    }\n\n    pos = i * PART_LEN1;\n\n    for (j = 0; j < PART_LEN; j++) {\n      fft[2 * j] = MulRe(x_fft_buf[0][xPos + j], -x_fft_buf[1][xPos + j],\n                         e_fft[0][j], e_fft[1][j]);\n      fft[2 * j + 1] = MulIm(x_fft_buf[0][xPos + j], -x_fft_buf[1][xPos + j],\n                             e_fft[0][j], e_fft[1][j]);\n    }\n    fft[1] =\n        MulRe(x_fft_buf[0][xPos + PART_LEN], -x_fft_buf[1][xPos + PART_LEN],\n              e_fft[0][PART_LEN], e_fft[1][PART_LEN]);\n\n    ooura_fft.InverseFft(fft);\n    memset(fft + PART_LEN, 0, sizeof(float) * PART_LEN);\n\n    // fft scaling\n    {\n      float scale = 2.0f / PART_LEN2;\n      for (j = 0; j < PART_LEN; j++) {\n        fft[j] *= scale;\n      }\n    }\n    ooura_fft.Fft(fft);\n\n    h_fft_buf[0][pos] += fft[0];\n    h_fft_buf[0][pos + PART_LEN] += fft[1];\n\n    for (j = 1; j < PART_LEN; j++) {\n      h_fft_buf[0][pos + j] += fft[2 * j];\n      h_fft_buf[1][pos + j] += fft[2 * j + 1];\n    }\n  }\n}\n\nstatic void Overdrive(float overdrive_scaling,\n                      const float hNlFb,\n                      float hNl[PART_LEN1]) {\n  for (int i = 0; i < PART_LEN1; ++i) {\n    // Weight subbands\n    if (hNl[i] > hNlFb) {\n      hNl[i] = WebRtcAec_weightCurve[i] * hNlFb +\n               (1 - WebRtcAec_weightCurve[i]) * hNl[i];\n    }\n    hNl[i] = powf(hNl[i], overdrive_scaling * WebRtcAec_overDriveCurve[i]);\n  }\n}\n\nstatic void Suppress(const float hNl[PART_LEN1], float efw[2][PART_LEN1]) {\n  for (int i = 0; i < PART_LEN1; ++i) {\n    // Suppress error signal\n    efw[0][i] *= hNl[i];\n    efw[1][i] *= hNl[i];\n\n    // Ooura fft returns incorrect sign on imaginary component. It matters here\n    // because we are making an additive change with comfort noise.\n    efw[1][i] *= -1;\n  }\n}\n\nstatic int PartitionDelay(int num_partitions,\n                          float h_fft_buf[2]\n                                         [kExtendedNumPartitions * PART_LEN1]) {\n  // Measures the energy in each filter partition and returns the partition with\n  // highest energy.\n  // TODO(bjornv): Spread computational cost by computing one partition per\n  // block?\n  float wfEnMax = 0;\n  int i;\n  int delay = 0;\n\n  for (i = 0; i < num_partitions; i++) {\n    int j;\n    int pos = i * PART_LEN1;\n    float wfEn = 0;\n    for (j = 0; j < PART_LEN1; j++) {\n      wfEn += h_fft_buf[0][pos + j] * h_fft_buf[0][pos + j] +\n              h_fft_buf[1][pos + j] * h_fft_buf[1][pos + j];\n    }\n\n    if (wfEn > wfEnMax) {\n      wfEnMax = wfEn;\n      delay = i;\n    }\n  }\n  return delay;\n}\n\n// Update metric with 10 * log10(numerator / denominator).\nstatic void UpdateLogRatioMetric(Stats* metric, float numerator,\n                                 float denominator) {\n  RTC_DCHECK(metric);\n  RTC_CHECK(numerator >= 0);\n  RTC_CHECK(denominator >= 0);\n\n  const float log_numerator = log10(numerator + 1e-10f);\n  const float log_denominator = log10(denominator + 1e-10f);\n  metric->instant = 10.0f * (log_numerator - log_denominator);\n\n  // Max.\n  if (metric->instant > metric->max)\n    metric->max = metric->instant;\n\n  // Min.\n  if (metric->instant < metric->min)\n    metric->min = metric->instant;\n\n  // Average.\n  metric->counter++;\n  // This is to protect overflow, which should almost never happen.\n  RTC_CHECK_NE(0, metric->counter);\n  metric->sum += metric->instant;\n  metric->average = metric->sum / metric->counter;\n\n  // Upper mean.\n  if (metric->instant > metric->average) {\n    metric->hicounter++;\n    // This is to protect overflow, which should almost never happen.\n    RTC_CHECK_NE(0, metric->hicounter);\n    metric->hisum += metric->instant;\n    metric->himean = metric->hisum / metric->hicounter;\n  }\n}\n\n// Threshold to protect against the ill-effects of a zero far-end.\nconst float WebRtcAec_kMinFarendPSD = 15;\n\n// Updates the following smoothed Power Spectral Densities (PSD):\n//  - sd  : near-end\n//  - se  : residual echo\n//  - sx  : far-end\n//  - sde : cross-PSD of near-end and residual echo\n//  - sxd : cross-PSD of near-end and far-end\n//\n// In addition to updating the PSDs, also the filter diverge state is\n// determined.\nstatic void UpdateCoherenceSpectra(int mult,\n                                   bool extended_filter_enabled,\n                                   float efw[2][PART_LEN1],\n                                   float dfw[2][PART_LEN1],\n                                   float xfw[2][PART_LEN1],\n                                   CoherenceState* coherence_state,\n                                   short* filter_divergence_state,\n                                   int* extreme_filter_divergence) {\n  // Power estimate smoothing coefficients.\n  const float* ptrGCoh =\n      extended_filter_enabled\n          ? WebRtcAec_kExtendedSmoothingCoefficients[mult - 1]\n          : WebRtcAec_kNormalSmoothingCoefficients[mult - 1];\n  int i;\n  float sdSum = 0, seSum = 0;\n\n  for (i = 0; i < PART_LEN1; i++) {\n    coherence_state->sd[i] =\n        ptrGCoh[0] * coherence_state->sd[i] +\n        ptrGCoh[1] * (dfw[0][i] * dfw[0][i] + dfw[1][i] * dfw[1][i]);\n    coherence_state->se[i] =\n        ptrGCoh[0] * coherence_state->se[i] +\n        ptrGCoh[1] * (efw[0][i] * efw[0][i] + efw[1][i] * efw[1][i]);\n    // We threshold here to protect against the ill-effects of a zero farend.\n    // The threshold is not arbitrarily chosen, but balances protection and\n    // adverse interaction with the algorithm's tuning.\n    // TODO(bjornv): investigate further why this is so sensitive.\n    coherence_state->sx[i] =\n        ptrGCoh[0] * coherence_state->sx[i] +\n        ptrGCoh[1] *\n            WEBRTC_SPL_MAX(xfw[0][i] * xfw[0][i] + xfw[1][i] * xfw[1][i],\n                           WebRtcAec_kMinFarendPSD);\n\n    coherence_state->sde[i][0] =\n        ptrGCoh[0] * coherence_state->sde[i][0] +\n        ptrGCoh[1] * (dfw[0][i] * efw[0][i] + dfw[1][i] * efw[1][i]);\n    coherence_state->sde[i][1] =\n        ptrGCoh[0] * coherence_state->sde[i][1] +\n        ptrGCoh[1] * (dfw[0][i] * efw[1][i] - dfw[1][i] * efw[0][i]);\n\n    coherence_state->sxd[i][0] =\n        ptrGCoh[0] * coherence_state->sxd[i][0] +\n        ptrGCoh[1] * (dfw[0][i] * xfw[0][i] + dfw[1][i] * xfw[1][i]);\n    coherence_state->sxd[i][1] =\n        ptrGCoh[0] * coherence_state->sxd[i][1] +\n        ptrGCoh[1] * (dfw[0][i] * xfw[1][i] - dfw[1][i] * xfw[0][i]);\n\n    sdSum += coherence_state->sd[i];\n    seSum += coherence_state->se[i];\n  }\n\n  // Divergent filter safeguard update.\n  *filter_divergence_state =\n      (*filter_divergence_state ? 1.05f : 1.0f) * seSum > sdSum;\n\n  // Signal extreme filter divergence if the error is significantly larger\n  // than the nearend (13 dB).\n  *extreme_filter_divergence = (seSum > (19.95f * sdSum));\n}\n\n// Window time domain data to be used by the fft.\n__inline static void WindowData(float* x_windowed, const float* x) {\n  int i;\n  for (i = 0; i < PART_LEN; i++) {\n    x_windowed[i] = x[i] * WebRtcAec_sqrtHanning[i];\n    x_windowed[PART_LEN + i] =\n        x[PART_LEN + i] * WebRtcAec_sqrtHanning[PART_LEN - i];\n  }\n}\n\n// Puts fft output data into a complex valued array.\n__inline static void StoreAsComplex(const float* data,\n                                    float data_complex[2][PART_LEN1]) {\n  int i;\n  data_complex[0][0] = data[0];\n  data_complex[1][0] = 0;\n  for (i = 1; i < PART_LEN; i++) {\n    data_complex[0][i] = data[2 * i];\n    data_complex[1][i] = data[2 * i + 1];\n  }\n  data_complex[0][PART_LEN] = data[1];\n  data_complex[1][PART_LEN] = 0;\n}\n\nstatic void ComputeCoherence(const CoherenceState* coherence_state,\n                             float* cohde,\n                             float* cohxd) {\n  // Subband coherence\n  for (int i = 0; i < PART_LEN1; i++) {\n    cohde[i] = (coherence_state->sde[i][0] * coherence_state->sde[i][0] +\n                coherence_state->sde[i][1] * coherence_state->sde[i][1]) /\n               (coherence_state->sd[i] * coherence_state->se[i] + 1e-10f);\n    cohxd[i] = (coherence_state->sxd[i][0] * coherence_state->sxd[i][0] +\n                coherence_state->sxd[i][1] * coherence_state->sxd[i][1]) /\n               (coherence_state->sx[i] * coherence_state->sd[i] + 1e-10f);\n  }\n}\n\nstatic void GetHighbandGain(const float* lambda, float* nlpGainHband) {\n  int i;\n\n  *nlpGainHband = 0.0f;\n  for (i = freqAvgIc; i < PART_LEN1 - 1; i++) {\n    *nlpGainHband += lambda[i];\n  }\n  *nlpGainHband /= static_cast<float>(PART_LEN1 - 1 - freqAvgIc);\n}\n\nstatic void GenerateComplexNoise(uint32_t* seed, float noise[2][PART_LEN1]) {\n  const float kPi2 = 6.28318530717959f;\n  int16_t randW16[PART_LEN];\n  WebRtcSpl_RandUArray(randW16, PART_LEN, seed);\n\n  noise[0][0] = 0;\n  noise[1][0] = 0;\n  for (size_t i = 1; i < PART_LEN1; i++) {\n    float tmp = kPi2 * randW16[i - 1] / 32768.f;\n    noise[0][i] = cosf(tmp);\n    noise[1][i] = -sinf(tmp);\n  }\n  noise[1][PART_LEN] = 0;\n}\n\nstatic void ComfortNoise(bool generate_high_frequency_noise,\n                         uint32_t* seed,\n                         float e_fft[2][PART_LEN1],\n                         float high_frequency_comfort_noise[2][PART_LEN1],\n                         const float* noise_spectrum,\n                         const float* suppressor_gain) {\n  float complex_noise[2][PART_LEN1];\n\n  GenerateComplexNoise(seed, complex_noise);\n\n  // Shape, scale and add comfort noise.\n  for (int i = 1; i < PART_LEN1; ++i) {\n    float noise_scaling =\n        sqrtf(WEBRTC_SPL_MAX(1 - suppressor_gain[i] * suppressor_gain[i], 0)) *\n        sqrtf(noise_spectrum[i]);\n    e_fft[0][i] += noise_scaling * complex_noise[0][i];\n    e_fft[1][i] += noise_scaling * complex_noise[1][i];\n  }\n\n  // Form comfort noise for higher frequencies.\n  if (generate_high_frequency_noise) {\n    // Compute average noise power and nlp gain over the second half of freq\n    // spectrum (i.e., 4->8khz).\n    int start_avg_band = PART_LEN1 / 2;\n    float upper_bands_noise_power = 0.f;\n    float upper_bands_suppressor_gain = 0.f;\n    for (int i = start_avg_band; i < PART_LEN1; ++i) {\n      upper_bands_noise_power += sqrtf(noise_spectrum[i]);\n      upper_bands_suppressor_gain +=\n          sqrtf(WEBRTC_SPL_MAX(1 - suppressor_gain[i] * suppressor_gain[i], 0));\n    }\n    upper_bands_noise_power /= (PART_LEN1 - start_avg_band);\n    upper_bands_suppressor_gain /= (PART_LEN1 - start_avg_band);\n\n    // Shape, scale and add comfort noise.\n    float noise_scaling = upper_bands_suppressor_gain * upper_bands_noise_power;\n    high_frequency_comfort_noise[0][0] = 0;\n    high_frequency_comfort_noise[1][0] = 0;\n    for (int i = 1; i < PART_LEN1; ++i) {\n      high_frequency_comfort_noise[0][i] = noise_scaling * complex_noise[0][i];\n      high_frequency_comfort_noise[1][i] = noise_scaling * complex_noise[1][i];\n    }\n    high_frequency_comfort_noise[1][PART_LEN] = 0;\n  } else {\n    memset(high_frequency_comfort_noise, 0,\n           2 * PART_LEN1 * sizeof(high_frequency_comfort_noise[0][0]));\n  }\n}\n\nstatic void InitLevel(PowerLevel* level) {\n  const float kBigFloat = 1E17f;\n  level->averagelevel.Reset();\n  level->framelevel.Reset();\n  level->minlevel = kBigFloat;\n}\n\nstatic void InitStats(Stats* stats) {\n  stats->instant = kOffsetLevel;\n  stats->average = kOffsetLevel;\n  stats->max = kOffsetLevel;\n  stats->min = kOffsetLevel * (-1);\n  stats->sum = 0;\n  stats->hisum = 0;\n  stats->himean = kOffsetLevel;\n  stats->counter = 0;\n  stats->hicounter = 0;\n}\n\nstatic void InitMetrics(AecCore* self) {\n  self->stateCounter = 0;\n  InitLevel(&self->farlevel);\n  InitLevel(&self->nearlevel);\n  InitLevel(&self->linoutlevel);\n  InitLevel(&self->nlpoutlevel);\n\n  InitStats(&self->erl);\n  InitStats(&self->erle);\n  InitStats(&self->aNlp);\n  InitStats(&self->rerl);\n\n  self->divergent_filter_fraction.Reset();\n}\n\nstatic float CalculatePower(const float* in, size_t num_samples) {\n  size_t k;\n  float energy = 0.0f;\n\n  for (k = 0; k < num_samples; ++k) {\n    energy += in[k] * in[k];\n  }\n  return energy / num_samples;\n}\n\nstatic void UpdateLevel(PowerLevel* level, float power) {\n  level->framelevel.AddValue(power);\n  if (level->framelevel.EndOfBlock()) {\n    const float new_frame_level = level->framelevel.GetLatestMean();\n    if (new_frame_level > 0) {\n      if (new_frame_level < level->minlevel) {\n        level->minlevel = new_frame_level;  // New minimum.\n      } else {\n        level->minlevel *= (1 + 0.001f);  // Small increase.\n      }\n    }\n    level->averagelevel.AddValue(new_frame_level);\n  }\n}\n\nstatic void UpdateMetrics(AecCore* aec) {\n  const float actThresholdNoisy = 8.0f;\n  const float actThresholdClean = 40.0f;\n\n  const float noisyPower = 300000.0f;\n\n  float actThreshold;\n\n  if (aec->echoState) {  // Check if echo is likely present\n    aec->stateCounter++;\n  }\n\n  if (aec->linoutlevel.framelevel.EndOfBlock()) {\n    aec->divergent_filter_fraction.AddObservation(aec->nearlevel,\n                                                  aec->linoutlevel,\n                                                  aec->nlpoutlevel);\n  }\n\n  if (aec->farlevel.averagelevel.EndOfBlock()) {\n    if (aec->farlevel.minlevel < noisyPower) {\n      actThreshold = actThresholdClean;\n    } else {\n      actThreshold = actThresholdNoisy;\n    }\n\n    const float far_average_level = aec->farlevel.averagelevel.GetLatestMean();\n\n    // The last condition is to let estimation be made in active far-end\n    // segments only.\n    if ((aec->stateCounter > (0.5f * kCountLen * kSubCountLen)) &&\n        (aec->farlevel.framelevel.EndOfBlock()) &&\n        (far_average_level > (actThreshold * aec->farlevel.minlevel))) {\n\n      // ERL: error return loss.\n      const float near_average_level =\n          aec->nearlevel.averagelevel.GetLatestMean();\n      UpdateLogRatioMetric(&aec->erl, far_average_level, near_average_level);\n\n      // A_NLP: error return loss enhanced before the nonlinear suppression.\n      const float linout_average_level =\n          aec->linoutlevel.averagelevel.GetLatestMean();\n      UpdateLogRatioMetric(&aec->aNlp, near_average_level,\n                           linout_average_level);\n\n      // ERLE: error return loss enhanced.\n      const float nlpout_average_level =\n          aec->nlpoutlevel.averagelevel.GetLatestMean();\n      UpdateLogRatioMetric(&aec->erle, near_average_level,\n                           nlpout_average_level);\n    }\n\n    aec->stateCounter = 0;\n  }\n}\n\nstatic void UpdateDelayMetrics(AecCore* self) {\n  int i = 0;\n  int delay_values = 0;\n  int median = 0;\n  int lookahead = WebRtc_lookahead(self->delay_estimator);\n  const int kMsPerBlock = PART_LEN / (self->mult * 8);\n  int64_t l1_norm = 0;\n\n  if (self->num_delay_values == 0) {\n    // We have no new delay value data. Even though -1 is a valid |median| in\n    // the sense that we allow negative values, it will practically never be\n    // used since multiples of |kMsPerBlock| will always be returned.\n    // We therefore use -1 to indicate in the logs that the delay estimator was\n    // not able to estimate the delay.\n    self->delay_median = -1;\n    self->delay_std = -1;\n    self->fraction_poor_delays = -1;\n    return;\n  }\n\n  // Start value for median count down.\n  delay_values = self->num_delay_values >> 1;\n  // Get median of delay values since last update.\n  for (i = 0; i < kHistorySizeBlocks; i++) {\n    delay_values -= self->delay_histogram[i];\n    if (delay_values < 0) {\n      median = i;\n      break;\n    }\n  }\n  // Account for lookahead.\n  self->delay_median = (median - lookahead) * kMsPerBlock;\n\n  // Calculate the L1 norm, with median value as central moment.\n  for (i = 0; i < kHistorySizeBlocks; i++) {\n    l1_norm += abs(i - median) * self->delay_histogram[i];\n  }\n  self->delay_std =\n      static_cast<int>((l1_norm + self->num_delay_values / 2) /\n                       self->num_delay_values) * kMsPerBlock;\n\n  // Determine fraction of delays that are out of bounds, that is, either\n  // negative (anti-causal system) or larger than the AEC filter length.\n  {\n    int num_delays_out_of_bounds = self->num_delay_values;\n    const int histogram_length =\n        sizeof(self->delay_histogram) / sizeof(self->delay_histogram[0]);\n    for (i = lookahead; i < lookahead + self->num_partitions; ++i) {\n      if (i < histogram_length)\n        num_delays_out_of_bounds -= self->delay_histogram[i];\n    }\n    self->fraction_poor_delays =\n        static_cast<float>(num_delays_out_of_bounds) / self->num_delay_values;\n  }\n\n  // Reset histogram.\n  memset(self->delay_histogram, 0, sizeof(self->delay_histogram));\n  self->num_delay_values = 0;\n\n  return;\n}\n\nstatic void ScaledInverseFft(const OouraFft& ooura_fft,\n                             float freq_data[2][PART_LEN1],\n                             float time_data[PART_LEN2],\n                             float scale,\n                             int conjugate) {\n  int i;\n  const float normalization = scale / static_cast<float>(PART_LEN2);\n  const float sign = (conjugate ? -1 : 1);\n  time_data[0] = freq_data[0][0] * normalization;\n  time_data[1] = freq_data[0][PART_LEN] * normalization;\n  for (i = 1; i < PART_LEN; i++) {\n    time_data[2 * i] = freq_data[0][i] * normalization;\n    time_data[2 * i + 1] = sign * freq_data[1][i] * normalization;\n  }\n  ooura_fft.InverseFft(time_data);\n}\n\nstatic void Fft(const OouraFft& ooura_fft,\n                float time_data[PART_LEN2],\n                float freq_data[2][PART_LEN1]) {\n  int i;\n  ooura_fft.Fft(time_data);\n\n  // Reorder fft output data.\n  freq_data[1][0] = 0;\n  freq_data[1][PART_LEN] = 0;\n  freq_data[0][0] = time_data[0];\n  freq_data[0][PART_LEN] = time_data[1];\n  for (i = 1; i < PART_LEN; i++) {\n    freq_data[0][i] = time_data[2 * i];\n    freq_data[1][i] = time_data[2 * i + 1];\n  }\n}\n\nstatic int SignalBasedDelayCorrection(AecCore* self) {\n  int delay_correction = 0;\n  int last_delay = -2;\n  RTC_DCHECK(self);\n#if !defined(WEBRTC_ANDROID)\n  // On desktops, turn on correction after |kDelayCorrectionStart| frames.  This\n  // is to let the delay estimation get a chance to converge.  Also, if the\n  // playout audio volume is low (or even muted) the delay estimation can return\n  // a very large delay, which will break the AEC if it is applied.\n  if (self->frame_count < kDelayCorrectionStart) {\n    self->data_dumper->DumpRaw(\"aec_da_reported_delay\", 1, &last_delay);\n    return 0;\n  }\n#endif\n\n  // 1. Check for non-negative delay estimate.  Note that the estimates we get\n  //    from the delay estimation are not compensated for lookahead.  Hence, a\n  //    negative |last_delay| is an invalid one.\n  // 2. Verify that there is a delay change.  In addition, only allow a change\n  //    if the delay is outside a certain region taking the AEC filter length\n  //    into account.\n  // TODO(bjornv): Investigate if we can remove the non-zero delay change check.\n  // 3. Only allow delay correction if the delay estimation quality exceeds\n  //    |delay_quality_threshold|.\n  // 4. Finally, verify that the proposed |delay_correction| is feasible by\n  //    comparing with the size of the far-end buffer.\n  last_delay = WebRtc_last_delay(self->delay_estimator);\n  self->data_dumper->DumpRaw(\"aec_da_reported_delay\", 1, &last_delay);\n  if ((last_delay >= 0) && (last_delay != self->previous_delay) &&\n      (WebRtc_last_delay_quality(self->delay_estimator) >\n       self->delay_quality_threshold)) {\n    int delay = last_delay - WebRtc_lookahead(self->delay_estimator);\n    // Allow for a slack in the actual delay, defined by a |lower_bound| and an\n    // |upper_bound|.  The adaptive echo cancellation filter is currently\n    // |num_partitions| (of 64 samples) long.  If the delay estimate is negative\n    // or at least 3/4 of the filter length we open up for correction.\n    const int lower_bound = 0;\n    const int upper_bound = self->num_partitions * 3 / 4;\n    const int do_correction = delay <= lower_bound || delay > upper_bound;\n    if (do_correction == 1) {\n      int available_read = self->farend_block_buffer_.Size();\n      // With |shift_offset| we gradually rely on the delay estimates.  For\n      // positive delays we reduce the correction by |shift_offset| to lower the\n      // risk of pushing the AEC into a non causal state.  For negative delays\n      // we rely on the values up to a rounding error, hence compensate by 1\n      // element to make sure to push the delay into the causal region.\n      delay_correction = -delay;\n      delay_correction += delay > self->shift_offset ? self->shift_offset : 1;\n      self->shift_offset--;\n      self->shift_offset = (self->shift_offset <= 1 ? 1 : self->shift_offset);\n      if (delay_correction > available_read - self->mult - 1) {\n        // There is not enough data in the buffer to perform this shift.  Hence,\n        // we do not rely on the delay estimate and do nothing.\n        delay_correction = 0;\n      } else {\n        self->previous_delay = last_delay;\n        ++self->delay_correction_count;\n      }\n    }\n  }\n  // Update the |delay_quality_threshold| once we have our first delay\n  // correction.\n  if (self->delay_correction_count > 0) {\n    float delay_quality = WebRtc_last_delay_quality(self->delay_estimator);\n    delay_quality =\n        (delay_quality > kDelayQualityThresholdMax ? kDelayQualityThresholdMax\n                                                   : delay_quality);\n    self->delay_quality_threshold =\n        (delay_quality > self->delay_quality_threshold\n             ? delay_quality\n             : self->delay_quality_threshold);\n  }\n  self->data_dumper->DumpRaw(\"aec_da_delay_correction\", 1, &delay_correction);\n\n  return delay_correction;\n}\n\nstatic void RegressorPower(int num_partitions,\n                           int latest_added_partition,\n                           float x_fft_buf[2]\n                                          [kExtendedNumPartitions * PART_LEN1],\n                           float x_pow[PART_LEN1]) {\n  RTC_DCHECK_LT(latest_added_partition, num_partitions);\n  memset(x_pow, 0, PART_LEN1 * sizeof(x_pow[0]));\n\n  int partition = latest_added_partition;\n  int x_fft_buf_position = partition * PART_LEN1;\n  for (int i = 0; i < num_partitions; ++i) {\n    for (int bin = 0; bin < PART_LEN1; ++bin) {\n      float re = x_fft_buf[0][x_fft_buf_position];\n      float im = x_fft_buf[1][x_fft_buf_position];\n      x_pow[bin] += re * re + im * im;\n      ++x_fft_buf_position;\n    }\n\n    ++partition;\n    if (partition == num_partitions) {\n      partition = 0;\n      RTC_DCHECK_EQ(num_partitions * PART_LEN1, x_fft_buf_position);\n      x_fft_buf_position = 0;\n    }\n  }\n}\n\nstatic void EchoSubtraction(const OouraFft& ooura_fft,\n                            int num_partitions,\n                            int extended_filter_enabled,\n                            int* extreme_filter_divergence,\n                            float filter_step_size,\n                            float error_threshold,\n                            float* x_fft,\n                            int* x_fft_buf_block_pos,\n                            float x_fft_buf[2]\n                                           [kExtendedNumPartitions * PART_LEN1],\n                            float* const y,\n                            float x_pow[PART_LEN1],\n                            float h_fft_buf[2]\n                                           [kExtendedNumPartitions * PART_LEN1],\n                            float echo_subtractor_output[PART_LEN]) {\n  float s_fft[2][PART_LEN1];\n  float e_extended[PART_LEN2];\n  float s_extended[PART_LEN2];\n  float* s;\n  float e[PART_LEN];\n  float e_fft[2][PART_LEN1];\n  int i;\n\n  // Update the x_fft_buf block position.\n  (*x_fft_buf_block_pos)--;\n  if ((*x_fft_buf_block_pos) == -1) {\n    *x_fft_buf_block_pos = num_partitions - 1;\n  }\n\n  // Buffer x_fft.\n  memcpy(x_fft_buf[0] + (*x_fft_buf_block_pos) * PART_LEN1, x_fft,\n         sizeof(float) * PART_LEN1);\n  memcpy(x_fft_buf[1] + (*x_fft_buf_block_pos) * PART_LEN1, &x_fft[PART_LEN1],\n         sizeof(float) * PART_LEN1);\n\n  memset(s_fft, 0, sizeof(s_fft));\n\n  // Conditionally reset the echo subtraction filter if the filter has diverged\n  // significantly.\n  if (!extended_filter_enabled && *extreme_filter_divergence) {\n    memset(h_fft_buf, 0,\n           2 * kExtendedNumPartitions * PART_LEN1 * sizeof(h_fft_buf[0][0]));\n    *extreme_filter_divergence = 0;\n  }\n\n  // Produce echo estimate s_fft.\n  WebRtcAec_FilterFar(num_partitions, *x_fft_buf_block_pos, x_fft_buf,\n                      h_fft_buf, s_fft);\n\n  // Compute the time-domain echo estimate s.\n  ScaledInverseFft(ooura_fft, s_fft, s_extended, 2.0f, 0);\n  s = &s_extended[PART_LEN];\n\n  // Compute the time-domain echo prediction error.\n  for (i = 0; i < PART_LEN; ++i) {\n    e[i] = y[i] - s[i];\n  }\n\n  // Compute the frequency domain echo prediction error.\n  memset(e_extended, 0, sizeof(float) * PART_LEN);\n  memcpy(e_extended + PART_LEN, e, sizeof(float) * PART_LEN);\n  Fft(ooura_fft, e_extended, e_fft);\n\n  // Scale error signal inversely with far power.\n  WebRtcAec_ScaleErrorSignal(filter_step_size, error_threshold, x_pow, e_fft);\n  WebRtcAec_FilterAdaptation(ooura_fft, num_partitions, *x_fft_buf_block_pos,\n                             x_fft_buf, e_fft, h_fft_buf);\n  memcpy(echo_subtractor_output, e, sizeof(float) * PART_LEN);\n}\n\nstatic void FormSuppressionGain(AecCore* aec,\n                                float cohde[PART_LEN1],\n                                float cohxd[PART_LEN1],\n                                float hNl[PART_LEN1]) {\n  float hNlDeAvg, hNlXdAvg;\n  float hNlPref[kPrefBandSize];\n  float hNlFb = 0, hNlFbLow = 0;\n  const int prefBandSize = kPrefBandSize / aec->mult;\n  const float prefBandQuant = 0.75f, prefBandQuantLow = 0.5f;\n  const int minPrefBand = 4 / aec->mult;\n  // Power estimate smoothing coefficients.\n  const float* min_overdrive = aec->extended_filter_enabled\n                                   ? kExtendedMinOverDrive\n                                   : kNormalMinOverDrive;\n\n  hNlXdAvg = 0;\n  for (int i = minPrefBand; i < prefBandSize + minPrefBand; ++i) {\n    hNlXdAvg += cohxd[i];\n  }\n  hNlXdAvg /= prefBandSize;\n  hNlXdAvg = 1 - hNlXdAvg;\n\n  hNlDeAvg = 0;\n  for (int i = minPrefBand; i < prefBandSize + minPrefBand; ++i) {\n    hNlDeAvg += cohde[i];\n  }\n  hNlDeAvg /= prefBandSize;\n\n  if (hNlXdAvg < 0.75f && hNlXdAvg < aec->hNlXdAvgMin) {\n    aec->hNlXdAvgMin = hNlXdAvg;\n  }\n\n  if (hNlDeAvg > 0.98f && hNlXdAvg > 0.9f) {\n    aec->stNearState = 1;\n  } else if (hNlDeAvg < 0.95f || hNlXdAvg < 0.8f) {\n    aec->stNearState = 0;\n  }\n\n  if (aec->hNlXdAvgMin == 1) {\n    aec->echoState = 0;\n    aec->overDrive = min_overdrive[aec->nlp_mode];\n\n    if (aec->stNearState == 1) {\n      memcpy(hNl, cohde, sizeof(hNl[0]) * PART_LEN1);\n      hNlFb = hNlDeAvg;\n      hNlFbLow = hNlDeAvg;\n    } else {\n      for (int i = 0; i < PART_LEN1; ++i) {\n        hNl[i] = 1 - cohxd[i];\n      }\n      hNlFb = hNlXdAvg;\n      hNlFbLow = hNlXdAvg;\n    }\n  } else {\n    if (aec->stNearState == 1) {\n      aec->echoState = 0;\n      memcpy(hNl, cohde, sizeof(hNl[0]) * PART_LEN1);\n      hNlFb = hNlDeAvg;\n      hNlFbLow = hNlDeAvg;\n    } else {\n      aec->echoState = 1;\n      for (int i = 0; i < PART_LEN1; ++i) {\n        hNl[i] = WEBRTC_SPL_MIN(cohde[i], 1 - cohxd[i]);\n      }\n\n      // Select an order statistic from the preferred bands.\n      // TODO(peah): Using quicksort now, but a selection algorithm may be\n      // preferred.\n      memcpy(hNlPref, &hNl[minPrefBand], sizeof(float) * prefBandSize);\n      qsort(hNlPref, prefBandSize, sizeof(float), CmpFloat);\n      hNlFb = hNlPref[static_cast<int>(floor(prefBandQuant *\n                                             (prefBandSize - 1)))];\n      hNlFbLow = hNlPref[static_cast<int>(floor(prefBandQuantLow *\n                                                (prefBandSize - 1)))];\n    }\n  }\n\n  // Track the local filter minimum to determine suppression overdrive.\n  if (hNlFbLow < 0.6f && hNlFbLow < aec->hNlFbLocalMin) {\n    aec->hNlFbLocalMin = hNlFbLow;\n    aec->hNlFbMin = hNlFbLow;\n    aec->hNlNewMin = 1;\n    aec->hNlMinCtr = 0;\n  }\n  aec->hNlFbLocalMin =\n      WEBRTC_SPL_MIN(aec->hNlFbLocalMin + 0.0008f / aec->mult, 1);\n  aec->hNlXdAvgMin = WEBRTC_SPL_MIN(aec->hNlXdAvgMin + 0.0006f / aec->mult, 1);\n\n  if (aec->hNlNewMin == 1) {\n    aec->hNlMinCtr++;\n  }\n  if (aec->hNlMinCtr == 2) {\n    aec->hNlNewMin = 0;\n    aec->hNlMinCtr = 0;\n    aec->overDrive =\n        WEBRTC_SPL_MAX(kTargetSupp[aec->nlp_mode] /\n                       static_cast<float>(log(aec->hNlFbMin + 1e-10f) + 1e-10f),\n                       min_overdrive[aec->nlp_mode]);\n  }\n\n  // Smooth the overdrive.\n  if (aec->overDrive < aec->overdrive_scaling) {\n    aec->overdrive_scaling =\n        0.99f * aec->overdrive_scaling + 0.01f * aec->overDrive;\n  } else {\n    aec->overdrive_scaling =\n        0.9f * aec->overdrive_scaling + 0.1f * aec->overDrive;\n  }\n\n  // Apply the overdrive.\n  WebRtcAec_Overdrive(aec->overdrive_scaling, hNlFb, hNl);\n}\n\nstatic void EchoSuppression(const OouraFft& ooura_fft,\n                            AecCore* aec,\n                            float* nearend_extended_block_lowest_band,\n                            float farend_extended_block[PART_LEN2],\n                            float* echo_subtractor_output,\n                            float output[NUM_HIGH_BANDS_MAX + 1][PART_LEN]) {\n  float efw[2][PART_LEN1];\n  float xfw[2][PART_LEN1];\n  float dfw[2][PART_LEN1];\n  float comfortNoiseHband[2][PART_LEN1];\n  float fft[PART_LEN2];\n  float nlpGainHband;\n  int i;\n  size_t j;\n\n  // Coherence and non-linear filter\n  float cohde[PART_LEN1], cohxd[PART_LEN1];\n  float hNl[PART_LEN1];\n\n  // Filter energy\n  const int delayEstInterval = 10 * aec->mult;\n\n  float* xfw_ptr = NULL;\n\n  // Update eBuf with echo subtractor output.\n  memcpy(aec->eBuf + PART_LEN, echo_subtractor_output,\n         sizeof(float) * PART_LEN);\n\n  // Analysis filter banks for the echo suppressor.\n  // Windowed near-end ffts.\n  WindowData(fft, nearend_extended_block_lowest_band);\n  ooura_fft.Fft(fft);\n  StoreAsComplex(fft, dfw);\n\n  // Windowed echo suppressor output ffts.\n  WindowData(fft, aec->eBuf);\n  ooura_fft.Fft(fft);\n  StoreAsComplex(fft, efw);\n\n  // NLP\n\n  // Convert far-end partition to the frequency domain with windowing.\n  WindowData(fft, farend_extended_block);\n  Fft(ooura_fft, fft, xfw);\n  xfw_ptr = &xfw[0][0];\n\n  // Buffer far.\n  memcpy(aec->xfwBuf, xfw_ptr, sizeof(float) * 2 * PART_LEN1);\n\n  aec->delayEstCtr++;\n  if (aec->delayEstCtr == delayEstInterval) {\n    aec->delayEstCtr = 0;\n    aec->delayIdx = WebRtcAec_PartitionDelay(aec->num_partitions, aec->wfBuf);\n  }\n\n  aec->data_dumper->DumpRaw(\"aec_nlp_delay\", 1, &aec->delayIdx);\n\n  // Use delayed far.\n  memcpy(xfw, aec->xfwBuf + aec->delayIdx * PART_LEN1,\n         sizeof(xfw[0][0]) * 2 * PART_LEN1);\n\n  WebRtcAec_UpdateCoherenceSpectra(aec->mult, aec->extended_filter_enabled == 1,\n                                   efw, dfw, xfw, &aec->coherence_state,\n                                   &aec->divergeState,\n                                   &aec->extreme_filter_divergence);\n\n  WebRtcAec_ComputeCoherence(&aec->coherence_state, cohde, cohxd);\n\n  // Select the microphone signal as output if the filter is deemed to have\n  // diverged.\n  if (aec->divergeState) {\n    memcpy(efw, dfw, sizeof(efw[0][0]) * 2 * PART_LEN1);\n  }\n\n  FormSuppressionGain(aec, cohde, cohxd, hNl);\n\n  aec->data_dumper->DumpRaw(\"aec_nlp_gain\", PART_LEN1, hNl);\n\n  WebRtcAec_Suppress(hNl, efw);\n\n  // Add comfort noise.\n  ComfortNoise(aec->num_bands > 1, &aec->seed, efw, comfortNoiseHband,\n               aec->noisePow, hNl);\n\n  // Inverse error fft.\n  ScaledInverseFft(ooura_fft, efw, fft, 2.0f, 1);\n\n  // Overlap and add to obtain output.\n  for (i = 0; i < PART_LEN; i++) {\n    output[0][i] = (fft[i] * WebRtcAec_sqrtHanning[i] +\n                    aec->outBuf[i] * WebRtcAec_sqrtHanning[PART_LEN - i]);\n\n    // Saturate output to keep it in the allowed range.\n    output[0][i] = WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX, output[0][i],\n                                  WEBRTC_SPL_WORD16_MIN);\n  }\n  memcpy(aec->outBuf, &fft[PART_LEN], PART_LEN * sizeof(aec->outBuf[0]));\n\n  // For H band\n  if (aec->num_bands > 1) {\n    // H band gain\n    // average nlp over low band: average over second half of freq spectrum\n    // (4->8khz)\n    GetHighbandGain(hNl, &nlpGainHband);\n\n    // Inverse comfort_noise\n    ScaledInverseFft(ooura_fft, comfortNoiseHband, fft, 2.0f, 0);\n\n    // compute gain factor\n    for (j = 1; j < aec->num_bands; ++j) {\n      for (i = 0; i < PART_LEN; i++) {\n        output[j][i] = aec->previous_nearend_block[j][i] * nlpGainHband;\n      }\n    }\n\n    // Add some comfort noise where Hband is attenuated.\n    for (i = 0; i < PART_LEN; i++) {\n      output[1][i] += cnScaleHband * fft[i];\n    }\n\n    // Saturate output to keep it in the allowed range.\n    for (j = 1; j < aec->num_bands; ++j) {\n      for (i = 0; i < PART_LEN; i++) {\n        output[j][i] = WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX, output[j][i],\n                                      WEBRTC_SPL_WORD16_MIN);\n      }\n    }\n  }\n\n  // Copy the current block to the old position.\n  memcpy(aec->eBuf, aec->eBuf + PART_LEN, sizeof(float) * PART_LEN);\n\n  memmove(aec->xfwBuf + PART_LEN1, aec->xfwBuf,\n          sizeof(aec->xfwBuf) - sizeof(complex_t) * PART_LEN1);\n}\n\nstatic void ProcessNearendBlock(\n    AecCore* aec,\n    float farend_extended_block_lowest_band[PART_LEN2],\n    float nearend_block[NUM_HIGH_BANDS_MAX + 1][PART_LEN],\n    float output_block[NUM_HIGH_BANDS_MAX + 1][PART_LEN]) {\n  size_t i;\n\n  float fft[PART_LEN2];\n  float nearend_extended_block_lowest_band[PART_LEN2];\n  float farend_fft[2][PART_LEN1];\n  float nearend_fft[2][PART_LEN1];\n  float far_spectrum = 0.0f;\n  float near_spectrum = 0.0f;\n  float abs_far_spectrum[PART_LEN1];\n  float abs_near_spectrum[PART_LEN1];\n\n  const float gPow[2] = {0.9f, 0.1f};\n\n  // Noise estimate constants.\n  const int noiseInitBlocks = 500 * aec->mult;\n  const float step = 0.1f;\n  const float ramp = 1.0002f;\n  const float gInitNoise[2] = {0.999f, 0.001f};\n\n  float echo_subtractor_output[PART_LEN];\n\n  aec->data_dumper->DumpWav(\"aec_far\", PART_LEN,\n                            &farend_extended_block_lowest_band[PART_LEN],\n                            std::min(aec->sampFreq, 16000), 1);\n  aec->data_dumper->DumpWav(\"aec_near\", PART_LEN, &nearend_block[0][0],\n                            std::min(aec->sampFreq, 16000), 1);\n\n  if (aec->metricsMode == 1) {\n    // Update power levels\n    UpdateLevel(\n        &aec->farlevel,\n        CalculatePower(&farend_extended_block_lowest_band[PART_LEN], PART_LEN));\n    UpdateLevel(&aec->nearlevel,\n                CalculatePower(&nearend_block[0][0], PART_LEN));\n  }\n\n  // Convert far-end signal to the frequency domain.\n  memcpy(fft, farend_extended_block_lowest_band, sizeof(float) * PART_LEN2);\n  Fft(aec->ooura_fft, fft, farend_fft);\n\n  // Form extended nearend frame.\n  memcpy(&nearend_extended_block_lowest_band[0],\n         &aec->previous_nearend_block[0][0], sizeof(float) * PART_LEN);\n  memcpy(&nearend_extended_block_lowest_band[PART_LEN], &nearend_block[0][0],\n         sizeof(float) * PART_LEN);\n\n  // Convert near-end signal to the frequency domain.\n  memcpy(fft, nearend_extended_block_lowest_band, sizeof(float) * PART_LEN2);\n  Fft(aec->ooura_fft, fft, nearend_fft);\n\n  // Power smoothing.\n  if (aec->refined_adaptive_filter_enabled) {\n    for (i = 0; i < PART_LEN1; ++i) {\n      far_spectrum = farend_fft[0][i] * farend_fft[0][i] +\n                     farend_fft[1][i] * farend_fft[1][i];\n      // Calculate the magnitude spectrum.\n      abs_far_spectrum[i] = sqrtf(far_spectrum);\n    }\n    RegressorPower(aec->num_partitions, aec->xfBufBlockPos, aec->xfBuf,\n                   aec->xPow);\n  } else {\n    for (i = 0; i < PART_LEN1; ++i) {\n      far_spectrum = farend_fft[0][i] * farend_fft[0][i] +\n                     farend_fft[1][i] * farend_fft[1][i];\n      aec->xPow[i] =\n          gPow[0] * aec->xPow[i] + gPow[1] * aec->num_partitions * far_spectrum;\n      // Calculate the magnitude spectrum.\n      abs_far_spectrum[i] = sqrtf(far_spectrum);\n    }\n  }\n\n  for (i = 0; i < PART_LEN1; ++i) {\n    near_spectrum = nearend_fft[0][i] * nearend_fft[0][i] +\n                    nearend_fft[1][i] * nearend_fft[1][i];\n    aec->dPow[i] = gPow[0] * aec->dPow[i] + gPow[1] * near_spectrum;\n    // Calculate the magnitude spectrum.\n    abs_near_spectrum[i] = sqrtf(near_spectrum);\n  }\n\n  // Estimate noise power. Wait until dPow is more stable.\n  if (aec->noiseEstCtr > 50) {\n    for (i = 0; i < PART_LEN1; i++) {\n      if (aec->dPow[i] < aec->dMinPow[i]) {\n        aec->dMinPow[i] =\n            (aec->dPow[i] + step * (aec->dMinPow[i] - aec->dPow[i])) * ramp;\n      } else {\n        aec->dMinPow[i] *= ramp;\n      }\n    }\n  }\n\n  // Smooth increasing noise power from zero at the start,\n  // to avoid a sudden burst of comfort noise.\n  if (aec->noiseEstCtr < noiseInitBlocks) {\n    aec->noiseEstCtr++;\n    for (i = 0; i < PART_LEN1; i++) {\n      if (aec->dMinPow[i] > aec->dInitMinPow[i]) {\n        aec->dInitMinPow[i] = gInitNoise[0] * aec->dInitMinPow[i] +\n                              gInitNoise[1] * aec->dMinPow[i];\n      } else {\n        aec->dInitMinPow[i] = aec->dMinPow[i];\n      }\n    }\n    aec->noisePow = aec->dInitMinPow;\n  } else {\n    aec->noisePow = aec->dMinPow;\n  }\n\n  // Block wise delay estimation used for logging\n  if (aec->delay_logging_enabled) {\n    if (WebRtc_AddFarSpectrumFloat(aec->delay_estimator_farend,\n                                   abs_far_spectrum, PART_LEN1) == 0) {\n      int delay_estimate = WebRtc_DelayEstimatorProcessFloat(\n          aec->delay_estimator, abs_near_spectrum, PART_LEN1);\n      if (delay_estimate >= 0) {\n        // Update delay estimate buffer.\n        aec->delay_histogram[delay_estimate]++;\n        aec->num_delay_values++;\n      }\n      if (aec->delay_metrics_delivered == 1 &&\n          aec->num_delay_values >= kDelayMetricsAggregationWindow) {\n        UpdateDelayMetrics(aec);\n      }\n    }\n  }\n\n  // Perform echo subtraction.\n  EchoSubtraction(\n      aec->ooura_fft, aec->num_partitions, aec->extended_filter_enabled,\n      &aec->extreme_filter_divergence, aec->filter_step_size,\n      aec->error_threshold, &farend_fft[0][0], &aec->xfBufBlockPos, aec->xfBuf,\n      &nearend_block[0][0], aec->xPow, aec->wfBuf, echo_subtractor_output);\n  aec->data_dumper->DumpRaw(\"aec_h_fft\", PART_LEN1 * aec->num_partitions,\n                            &aec->wfBuf[0][0]);\n  aec->data_dumper->DumpRaw(\"aec_h_fft\", PART_LEN1 * aec->num_partitions,\n                            &aec->wfBuf[1][0]);\n\n  aec->data_dumper->DumpWav(\"aec_out_linear\", PART_LEN, echo_subtractor_output,\n                            std::min(aec->sampFreq, 16000), 1);\n\n  if (aec->metricsMode == 1) {\n    UpdateLevel(&aec->linoutlevel,\n                CalculatePower(echo_subtractor_output, PART_LEN));\n  }\n\n  // Perform echo suppression.\n  EchoSuppression(aec->ooura_fft, aec, nearend_extended_block_lowest_band,\n                  farend_extended_block_lowest_band, echo_subtractor_output,\n                  output_block);\n\n  if (aec->metricsMode == 1) {\n    UpdateLevel(&aec->nlpoutlevel,\n                CalculatePower(&output_block[0][0], PART_LEN));\n    UpdateMetrics(aec);\n  }\n\n  // Store the nearend signal until the next frame.\n  for (i = 0; i < aec->num_bands; ++i) {\n    memcpy(&aec->previous_nearend_block[i][0], &nearend_block[i][0],\n           sizeof(float) * PART_LEN);\n  }\n\n  aec->data_dumper->DumpWav(\"aec_out\", PART_LEN, &output_block[0][0],\n                            std::min(aec->sampFreq, 16000), 1);\n}\n\nAecCore* WebRtcAec_CreateAec(int instance_count) {\n  AecCore* aec = new AecCore(instance_count);\n\n  if (!aec) {\n    return NULL;\n  }\n  aec->nearend_buffer_size = 0;\n  memset(&aec->nearend_buffer[0], 0, sizeof(aec->nearend_buffer));\n  // Start the output buffer with zeros to be able to produce\n  // a full output frame in the first frame.\n  aec->output_buffer_size = PART_LEN - (FRAME_LEN - PART_LEN);\n  memset(&aec->output_buffer[0], 0, sizeof(aec->output_buffer));\n\n  aec->delay_estimator_farend =\n      WebRtc_CreateDelayEstimatorFarend(PART_LEN1, kHistorySizeBlocks);\n  if (aec->delay_estimator_farend == NULL) {\n    WebRtcAec_FreeAec(aec);\n    return NULL;\n  }\n  // We create the delay_estimator with the same amount of maximum lookahead as\n  // the delay history size (kHistorySizeBlocks) for symmetry reasons.\n  aec->delay_estimator = WebRtc_CreateDelayEstimator(\n      aec->delay_estimator_farend, kHistorySizeBlocks);\n  if (aec->delay_estimator == NULL) {\n    WebRtcAec_FreeAec(aec);\n    return NULL;\n  }\n#ifdef WEBRTC_ANDROID\n  aec->delay_agnostic_enabled = 1;  // DA-AEC enabled by default.\n  // DA-AEC assumes the system is causal from the beginning and will self adjust\n  // the lookahead when shifting is required.\n  WebRtc_set_lookahead(aec->delay_estimator, 0);\n#else\n  aec->delay_agnostic_enabled = 0;\n  WebRtc_set_lookahead(aec->delay_estimator, kLookaheadBlocks);\n#endif\n  aec->extended_filter_enabled = 0;\n  aec->refined_adaptive_filter_enabled = false;\n\n  // Assembly optimization\n  WebRtcAec_FilterFar = FilterFar;\n  WebRtcAec_ScaleErrorSignal = ScaleErrorSignal;\n  WebRtcAec_FilterAdaptation = FilterAdaptation;\n  WebRtcAec_Overdrive = Overdrive;\n  WebRtcAec_Suppress = Suppress;\n  WebRtcAec_ComputeCoherence = ComputeCoherence;\n  WebRtcAec_UpdateCoherenceSpectra = UpdateCoherenceSpectra;\n  WebRtcAec_StoreAsComplex = StoreAsComplex;\n  WebRtcAec_PartitionDelay = PartitionDelay;\n  WebRtcAec_WindowData = WindowData;\n\n#if defined(WEBRTC_ARCH_X86_FAMILY)\n  if (WebRtc_GetCPUInfo(kSSE2)) {\n    WebRtcAec_InitAec_SSE2();\n  }\n#endif\n\n#if defined(MIPS_FPU_LE)\n  WebRtcAec_InitAec_mips();\n#endif\n\n#if defined(WEBRTC_HAS_NEON)\n  WebRtcAec_InitAec_neon();\n#endif\n\n  return aec;\n}\n\nvoid WebRtcAec_FreeAec(AecCore* aec) {\n  if (aec == NULL) {\n    return;\n  }\n\n  WebRtc_FreeDelayEstimator(aec->delay_estimator);\n  WebRtc_FreeDelayEstimatorFarend(aec->delay_estimator_farend);\n\n  delete aec;\n}\n\nstatic void SetAdaptiveFilterStepSize(AecCore* aec) {\n  // Extended filter adaptation parameter.\n  // TODO(ajm): No narrowband tuning yet.\n  const float kExtendedMu = 0.4f;\n\n  if (aec->refined_adaptive_filter_enabled) {\n    aec->filter_step_size = 0.05f;\n  } else {\n    if (aec->extended_filter_enabled) {\n      aec->filter_step_size = kExtendedMu;\n    } else {\n      if (aec->sampFreq == 8000) {\n        aec->filter_step_size = 0.6f;\n      } else {\n        aec->filter_step_size = 0.5f;\n      }\n    }\n  }\n}\n\nstatic void SetErrorThreshold(AecCore* aec) {\n  // Extended filter adaptation parameter.\n  // TODO(ajm): No narrowband tuning yet.\n  static const float kExtendedErrorThreshold = 1.0e-6f;\n\n  if (aec->extended_filter_enabled) {\n    aec->error_threshold = kExtendedErrorThreshold;\n  } else {\n    if (aec->sampFreq == 8000) {\n      aec->error_threshold = 2e-6f;\n    } else {\n      aec->error_threshold = 1.5e-6f;\n    }\n  }\n}\n\nint WebRtcAec_InitAec(AecCore* aec, int sampFreq) {\n  int i;\n  aec->data_dumper->InitiateNewSetOfRecordings();\n\n  aec->sampFreq = sampFreq;\n\n  SetAdaptiveFilterStepSize(aec);\n  SetErrorThreshold(aec);\n\n  if (sampFreq == 8000) {\n    aec->num_bands = 1;\n  } else {\n    aec->num_bands = (size_t)(sampFreq / 16000);\n  }\n\n  // Start the output buffer with zeros to be able to produce\n  // a full output frame in the first frame.\n  aec->output_buffer_size = PART_LEN - (FRAME_LEN - PART_LEN);\n  memset(&aec->output_buffer[0], 0, sizeof(aec->output_buffer));\n  aec->nearend_buffer_size = 0;\n  memset(&aec->nearend_buffer[0], 0, sizeof(aec->nearend_buffer));\n\n  // Initialize far-end buffer.\n  aec->farend_block_buffer_.ReInit();\n\n  aec->system_delay = 0;\n\n  if (WebRtc_InitDelayEstimatorFarend(aec->delay_estimator_farend) != 0) {\n    return -1;\n  }\n  if (WebRtc_InitDelayEstimator(aec->delay_estimator) != 0) {\n    return -1;\n  }\n  aec->delay_logging_enabled = 0;\n  aec->delay_metrics_delivered = 0;\n  memset(aec->delay_histogram, 0, sizeof(aec->delay_histogram));\n  aec->num_delay_values = 0;\n  aec->delay_median = -1;\n  aec->delay_std = -1;\n  aec->fraction_poor_delays = -1.0f;\n\n  aec->previous_delay = -2;  // (-2): Uninitialized.\n  aec->delay_correction_count = 0;\n  aec->shift_offset = kInitialShiftOffset;\n  aec->delay_quality_threshold = kDelayQualityThresholdMin;\n\n  aec->num_partitions = kNormalNumPartitions;\n\n  // Update the delay estimator with filter length.  We use half the\n  // |num_partitions| to take the echo path into account.  In practice we say\n  // that the echo has a duration of maximum half |num_partitions|, which is not\n  // true, but serves as a crude measure.\n  WebRtc_set_allowed_offset(aec->delay_estimator, aec->num_partitions / 2);\n  // TODO(bjornv): I currently hard coded the enable.  Once we've established\n  // that AECM has no performance regression, robust_validation will be enabled\n  // all the time and the APIs to turn it on/off will be removed.  Hence, remove\n  // this line then.\n  WebRtc_enable_robust_validation(aec->delay_estimator, 1);\n  aec->frame_count = 0;\n\n  // Default target suppression mode.\n  aec->nlp_mode = 1;\n\n  // Sampling frequency multiplier w.r.t. 8 kHz.\n  // In case of multiple bands we process the lower band in 16 kHz, hence the\n  // multiplier is always 2.\n  if (aec->num_bands > 1) {\n    aec->mult = 2;\n  } else {\n    aec->mult = static_cast<int16_t>(aec->sampFreq) / 8000;\n  }\n\n  aec->farBufWritePos = 0;\n  aec->farBufReadPos = 0;\n\n  aec->inSamples = 0;\n  aec->outSamples = 0;\n  aec->knownDelay = 0;\n\n  // Initialize buffers\n  memset(aec->previous_nearend_block, 0, sizeof(aec->previous_nearend_block));\n  memset(aec->eBuf, 0, sizeof(aec->eBuf));\n\n  memset(aec->xPow, 0, sizeof(aec->xPow));\n  memset(aec->dPow, 0, sizeof(aec->dPow));\n  memset(aec->dInitMinPow, 0, sizeof(aec->dInitMinPow));\n  aec->noisePow = aec->dInitMinPow;\n  aec->noiseEstCtr = 0;\n\n  // Initial comfort noise power\n  for (i = 0; i < PART_LEN1; i++) {\n    aec->dMinPow[i] = 1.0e6f;\n  }\n\n  // Holds the last block written to\n  aec->xfBufBlockPos = 0;\n  // TODO(peah): Investigate need for these initializations. Deleting them\n  // doesn't change the output at all and yields 0.4% overall speedup.\n  memset(aec->xfBuf, 0, sizeof(complex_t) * kExtendedNumPartitions * PART_LEN1);\n  memset(aec->wfBuf, 0, sizeof(complex_t) * kExtendedNumPartitions * PART_LEN1);\n  memset(aec->coherence_state.sde, 0, sizeof(complex_t) * PART_LEN1);\n  memset(aec->coherence_state.sxd, 0, sizeof(complex_t) * PART_LEN1);\n  memset(aec->xfwBuf, 0,\n         sizeof(complex_t) * kExtendedNumPartitions * PART_LEN1);\n  memset(aec->coherence_state.se, 0, sizeof(float) * PART_LEN1);\n\n  // To prevent numerical instability in the first block.\n  for (i = 0; i < PART_LEN1; i++) {\n    aec->coherence_state.sd[i] = 1;\n  }\n  for (i = 0; i < PART_LEN1; i++) {\n    aec->coherence_state.sx[i] = 1;\n  }\n\n  memset(aec->hNs, 0, sizeof(aec->hNs));\n  memset(aec->outBuf, 0, sizeof(float) * PART_LEN);\n\n  aec->hNlFbMin = 1;\n  aec->hNlFbLocalMin = 1;\n  aec->hNlXdAvgMin = 1;\n  aec->hNlNewMin = 0;\n  aec->hNlMinCtr = 0;\n  aec->overDrive = 2;\n  aec->overdrive_scaling = 2;\n  aec->delayIdx = 0;\n  aec->stNearState = 0;\n  aec->echoState = 0;\n  aec->divergeState = 0;\n\n  aec->seed = 777;\n  aec->delayEstCtr = 0;\n\n  aec->extreme_filter_divergence = 0;\n\n  // Metrics disabled by default\n  aec->metricsMode = 0;\n  InitMetrics(aec);\n\n  return 0;\n}\n\nvoid WebRtcAec_BufferFarendBlock(AecCore* aec, const float* farend) {\n  // Check if the buffer is full, and in that case flush the oldest data.\n  if (aec->farend_block_buffer_.AvaliableSpace() < 1) {\n    aec->farend_block_buffer_.AdjustSize(1);\n  }\n  aec->farend_block_buffer_.Insert(farend);\n}\n\nint WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(AecCore* aec,\n                                                   int buffer_size_decrease) {\n  int achieved_buffer_size_decrease =\n      aec->farend_block_buffer_.AdjustSize(buffer_size_decrease);\n  aec->system_delay -= achieved_buffer_size_decrease * PART_LEN;\n  return achieved_buffer_size_decrease;\n}\n\nvoid FormNearendBlock(\n    size_t nearend_start_index,\n    size_t num_bands,\n    const float* const* nearend_frame,\n    size_t num_samples_from_nearend_frame,\n    const float nearend_buffer[NUM_HIGH_BANDS_MAX + 1]\n                              [PART_LEN - (FRAME_LEN - PART_LEN)],\n    float nearend_block[NUM_HIGH_BANDS_MAX + 1][PART_LEN]) {\n  RTC_DCHECK_LE(num_samples_from_nearend_frame, PART_LEN);\n  const int num_samples_from_buffer = PART_LEN - num_samples_from_nearend_frame;\n\n  if (num_samples_from_buffer > 0) {\n    for (size_t i = 0; i < num_bands; ++i) {\n      memcpy(&nearend_block[i][0], &nearend_buffer[i][0],\n             num_samples_from_buffer * sizeof(float));\n    }\n  }\n\n  for (size_t i = 0; i < num_bands; ++i) {\n    memcpy(&nearend_block[i][num_samples_from_buffer],\n           &nearend_frame[i][nearend_start_index],\n           num_samples_from_nearend_frame * sizeof(float));\n  }\n}\n\nvoid BufferNearendFrame(\n    size_t nearend_start_index,\n    size_t num_bands,\n    const float* const* nearend_frame,\n    size_t num_samples_to_buffer,\n    float nearend_buffer[NUM_HIGH_BANDS_MAX + 1]\n                        [PART_LEN - (FRAME_LEN - PART_LEN)]) {\n  for (size_t i = 0; i < num_bands; ++i) {\n    memcpy(\n        &nearend_buffer[i][0],\n        &nearend_frame[i]\n                      [nearend_start_index + FRAME_LEN - num_samples_to_buffer],\n        num_samples_to_buffer * sizeof(float));\n  }\n}\n\nvoid BufferOutputBlock(size_t num_bands,\n                       const float output_block[NUM_HIGH_BANDS_MAX + 1]\n                                               [PART_LEN],\n                       size_t* output_buffer_size,\n                       float output_buffer[NUM_HIGH_BANDS_MAX + 1]\n                                          [2 * PART_LEN]) {\n  for (size_t i = 0; i < num_bands; ++i) {\n    memcpy(&output_buffer[i][*output_buffer_size], &output_block[i][0],\n           PART_LEN * sizeof(float));\n  }\n  (*output_buffer_size) += PART_LEN;\n}\n\nvoid FormOutputFrame(size_t output_start_index,\n                     size_t num_bands,\n                     size_t* output_buffer_size,\n                     float output_buffer[NUM_HIGH_BANDS_MAX + 1][2 * PART_LEN],\n                     float* const* output_frame) {\n  RTC_DCHECK_LE(FRAME_LEN, *output_buffer_size);\n  for (size_t i = 0; i < num_bands; ++i) {\n    memcpy(&output_frame[i][output_start_index], &output_buffer[i][0],\n           FRAME_LEN * sizeof(float));\n  }\n  (*output_buffer_size) -= FRAME_LEN;\n  if (*output_buffer_size > 0) {\n    RTC_DCHECK_GE(2 * PART_LEN - FRAME_LEN, (*output_buffer_size));\n    for (size_t i = 0; i < num_bands; ++i) {\n      memcpy(&output_buffer[i][0], &output_buffer[i][FRAME_LEN],\n             (*output_buffer_size) * sizeof(float));\n    }\n  }\n}\n\nvoid WebRtcAec_ProcessFrames(AecCore* aec,\n                             const float* const* nearend,\n                             size_t num_bands,\n                             size_t num_samples,\n                             int knownDelay,\n                             float* const* out) {\n  RTC_DCHECK(num_samples == 80 || num_samples == 160);\n\n  aec->frame_count++;\n  // For each frame the process is as follows:\n  // 1) If the system_delay indicates on being too small for processing a\n  //    frame we stuff the buffer with enough data for 10 ms.\n  // 2 a) Adjust the buffer to the system delay, by moving the read pointer.\n  //   b) Apply signal based delay correction, if we have detected poor AEC\n  //    performance.\n  // 3) TODO(bjornv): Investigate if we need to add this:\n  //    If we can't move read pointer due to buffer size limitations we\n  //    flush/stuff the buffer.\n  // 4) Process as many partitions as possible.\n  // 5) Update the |system_delay| with respect to a full frame of FRAME_LEN\n  //    samples. Even though we will have data left to process (we work with\n  //    partitions) we consider updating a whole frame, since that's the\n  //    amount of data we input and output in audio_processing.\n  // 6) Update the outputs.\n\n  // The AEC has two different delay estimation algorithms built in.  The\n  // first relies on delay input values from the user and the amount of\n  // shifted buffer elements is controlled by |knownDelay|.  This delay will\n  // give a guess on how much we need to shift far-end buffers to align with\n  // the near-end signal.  The other delay estimation algorithm uses the\n  // far- and near-end signals to find the offset between them.  This one\n  // (called \"signal delay\") is then used to fine tune the alignment, or\n  // simply compensate for errors in the system based one.\n  // Note that the two algorithms operate independently.  Currently, we only\n  // allow one algorithm to be turned on.\n\n  RTC_DCHECK_EQ(aec->num_bands, num_bands);\n\n  for (size_t j = 0; j < num_samples; j += FRAME_LEN) {\n    // 1) At most we process |aec->mult|+1 partitions in 10 ms. Make sure we\n    // have enough far-end data for that by stuffing the buffer if the\n    // |system_delay| indicates others.\n    if (aec->system_delay < FRAME_LEN) {\n      // We don't have enough data so we rewind 10 ms.\n      WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(aec, -(aec->mult + 1));\n    }\n\n    if (!aec->delay_agnostic_enabled) {\n      // 2 a) Compensate for a possible change in the system delay.\n\n      // TODO(bjornv): Investigate how we should round the delay difference;\n      // right now we know that incoming |knownDelay| is underestimated when\n      // it's less than |aec->knownDelay|. We therefore, round (-32) in that\n      // direction. In the other direction, we don't have this situation, but\n      // might flush one partition too little. This can cause non-causality,\n      // which should be investigated. Maybe, allow for a non-symmetric\n      // rounding, like -16.\n      int move_elements = (aec->knownDelay - knownDelay - 32) / PART_LEN;\n      int moved_elements = aec->farend_block_buffer_.AdjustSize(move_elements);\n      MaybeLogDelayAdjustment(moved_elements * (aec->sampFreq == 8000 ? 8 : 4),\n                              DelaySource::kSystemDelay);\n      aec->knownDelay -= moved_elements * PART_LEN;\n    } else {\n      // 2 b) Apply signal based delay correction.\n      int move_elements = SignalBasedDelayCorrection(aec);\n      int moved_elements = aec->farend_block_buffer_.AdjustSize(move_elements);\n      MaybeLogDelayAdjustment(moved_elements * (aec->sampFreq == 8000 ? 8 : 4),\n                              DelaySource::kDelayAgnostic);\n      int far_near_buffer_diff =\n          aec->farend_block_buffer_.Size() -\n          (aec->nearend_buffer_size + FRAME_LEN) / PART_LEN;\n      WebRtc_SoftResetDelayEstimator(aec->delay_estimator, moved_elements);\n      WebRtc_SoftResetDelayEstimatorFarend(aec->delay_estimator_farend,\n                                           moved_elements);\n      // If we rely on reported system delay values only, a buffer underrun here\n      // can never occur since we've taken care of that in 1) above.  Here, we\n      // apply signal based delay correction and can therefore end up with\n      // buffer underruns since the delay estimation can be wrong.  We therefore\n      // stuff the buffer with enough elements if needed.\n      if (far_near_buffer_diff < 0) {\n        WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(aec,\n                                                       far_near_buffer_diff);\n      }\n    }\n\n    static_assert(\n        16 == (FRAME_LEN - PART_LEN),\n        \"These constants need to be properly related for this code to work\");\n    float output_block[NUM_HIGH_BANDS_MAX + 1][PART_LEN];\n    float nearend_block[NUM_HIGH_BANDS_MAX + 1][PART_LEN];\n    float farend_extended_block_lowest_band[PART_LEN2];\n\n    // Form and process a block of nearend samples, buffer the output block of\n    // samples.\n    aec->farend_block_buffer_.ExtractExtendedBlock(\n        farend_extended_block_lowest_band);\n    FormNearendBlock(j, num_bands, nearend, PART_LEN - aec->nearend_buffer_size,\n                     aec->nearend_buffer, nearend_block);\n    ProcessNearendBlock(aec, farend_extended_block_lowest_band, nearend_block,\n                        output_block);\n    BufferOutputBlock(num_bands, output_block, &aec->output_buffer_size,\n                      aec->output_buffer);\n\n    if ((FRAME_LEN - PART_LEN + aec->nearend_buffer_size) == PART_LEN) {\n      // When possible (every fourth frame) form and process a second block of\n      // nearend samples, buffer the output block of samples.\n      aec->farend_block_buffer_.ExtractExtendedBlock(\n          farend_extended_block_lowest_band);\n      FormNearendBlock(j + FRAME_LEN - PART_LEN, num_bands, nearend, PART_LEN,\n                       aec->nearend_buffer, nearend_block);\n      ProcessNearendBlock(aec, farend_extended_block_lowest_band, nearend_block,\n                          output_block);\n      BufferOutputBlock(num_bands, output_block, &aec->output_buffer_size,\n                        aec->output_buffer);\n\n      // Reset the buffer size as there are no samples left in the nearend input\n      // to buffer.\n      aec->nearend_buffer_size = 0;\n    } else {\n      // Buffer the remaining samples in the nearend input.\n      aec->nearend_buffer_size += FRAME_LEN - PART_LEN;\n      BufferNearendFrame(j, num_bands, nearend, aec->nearend_buffer_size,\n                         aec->nearend_buffer);\n    }\n\n    // 5) Update system delay with respect to the entire frame.\n    aec->system_delay -= FRAME_LEN;\n\n    // 6) Form the output frame.\n    FormOutputFrame(j, num_bands, &aec->output_buffer_size, aec->output_buffer,\n                    out);\n  }\n}\n\nint WebRtcAec_GetDelayMetricsCore(AecCore* self,\n                                  int* median,\n                                  int* std,\n                                  float* fraction_poor_delays) {\n  RTC_DCHECK(self);\n  RTC_DCHECK(median);\n  RTC_DCHECK(std);\n\n  if (self->delay_logging_enabled == 0) {\n    // Logging disabled.\n    return -1;\n  }\n\n  if (self->delay_metrics_delivered == 0) {\n    UpdateDelayMetrics(self);\n    self->delay_metrics_delivered = 1;\n  }\n  *median = self->delay_median;\n  *std = self->delay_std;\n  *fraction_poor_delays = self->fraction_poor_delays;\n\n  return 0;\n}\n\nint WebRtcAec_echo_state(AecCore* self) {\n  return self->echoState;\n}\n\nvoid WebRtcAec_GetEchoStats(AecCore* self,\n                            Stats* erl,\n                            Stats* erle,\n                            Stats* a_nlp,\n                            float* divergent_filter_fraction) {\n  RTC_DCHECK(erl);\n  RTC_DCHECK(erle);\n  RTC_DCHECK(a_nlp);\n  *erl = self->erl;\n  *erle = self->erle;\n  *a_nlp = self->aNlp;\n  *divergent_filter_fraction =\n      self->divergent_filter_fraction.GetLatestFraction();\n}\n\nvoid WebRtcAec_SetConfigCore(AecCore* self,\n                             int nlp_mode,\n                             int metrics_mode,\n                             int delay_logging) {\n  RTC_DCHECK_GE(nlp_mode, 0);\n  RTC_DCHECK_LT(nlp_mode, 3);\n  self->nlp_mode = nlp_mode;\n  self->metricsMode = metrics_mode;\n  if (self->metricsMode) {\n    InitMetrics(self);\n  }\n  // Turn on delay logging if it is either set explicitly or if delay agnostic\n  // AEC is enabled (which requires delay estimates).\n  self->delay_logging_enabled = delay_logging || self->delay_agnostic_enabled;\n  if (self->delay_logging_enabled) {\n    memset(self->delay_histogram, 0, sizeof(self->delay_histogram));\n  }\n}\n\nvoid WebRtcAec_enable_delay_agnostic(AecCore* self, int enable) {\n  self->delay_agnostic_enabled = enable;\n}\n\nint WebRtcAec_delay_agnostic_enabled(AecCore* self) {\n  return self->delay_agnostic_enabled;\n}\n\nvoid WebRtcAec_enable_refined_adaptive_filter(AecCore* self, bool enable) {\n  self->refined_adaptive_filter_enabled = enable;\n  SetAdaptiveFilterStepSize(self);\n  SetErrorThreshold(self);\n}\n\nbool WebRtcAec_refined_adaptive_filter_enabled(const AecCore* self) {\n  return self->refined_adaptive_filter_enabled;\n}\n\nvoid WebRtcAec_enable_extended_filter(AecCore* self, int enable) {\n  self->extended_filter_enabled = enable;\n  SetAdaptiveFilterStepSize(self);\n  SetErrorThreshold(self);\n  self->num_partitions = enable ? kExtendedNumPartitions : kNormalNumPartitions;\n  // Update the delay estimator with filter length.  See InitAEC() for details.\n  WebRtc_set_allowed_offset(self->delay_estimator, self->num_partitions / 2);\n}\n\nint WebRtcAec_extended_filter_enabled(AecCore* self) {\n  return self->extended_filter_enabled;\n}\n\nint WebRtcAec_system_delay(AecCore* self) {\n  return self->system_delay;\n}\n\nvoid WebRtcAec_SetSystemDelay(AecCore* self, int delay) {\n  RTC_DCHECK_GE(delay, 0);\n  self->system_delay = delay;\n}\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aec/aec_core.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/*\n * Specifies the interface for the AEC core.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_\n\n#include <stddef.h>\n\n#include <memory>\n\nextern \"C\" {\n#include \"webrtc/common_audio/ring_buffer.h\"\n}\n#include \"webrtc/base/constructormagic.h\"\n#include \"webrtc/common_audio/wav_file.h\"\n#include \"webrtc/modules/audio_processing/aec/aec_common.h\"\n#include \"webrtc/modules/audio_processing/utility/block_mean_calculator.h\"\n#include \"webrtc/modules/audio_processing/utility/ooura_fft.h\"\n#include \"webrtc/typedefs.h\"\n\nnamespace webrtc {\n\n#define FRAME_LEN 80\n#define PART_LEN 64               // Length of partition\n#define PART_LEN1 (PART_LEN + 1)  // Unique fft coefficients\n#define PART_LEN2 (PART_LEN * 2)  // Length of partition * 2\n#define NUM_HIGH_BANDS_MAX 2      // Max number of high bands\n\nclass ApmDataDumper;\n\ntypedef float complex_t[2];\n// For performance reasons, some arrays of complex numbers are replaced by twice\n// as long arrays of float, all the real parts followed by all the imaginary\n// ones (complex_t[SIZE] -> float[2][SIZE]). This allows SIMD optimizations and\n// is better than two arrays (one for the real parts and one for the imaginary\n// parts) as this other way would require two pointers instead of one and cause\n// extra register spilling. This also allows the offsets to be calculated at\n// compile time.\n\n// Metrics\nenum { kOffsetLevel = -100 };\n\ntypedef struct Stats {\n  float instant;\n  float average;\n  float min;\n  float max;\n  float sum;\n  float hisum;\n  float himean;\n  size_t counter;\n  size_t hicounter;\n} Stats;\n\n// Number of partitions for the extended filter mode. The first one is an enum\n// to be used in array declarations, as it represents the maximum filter length.\nenum { kExtendedNumPartitions = 32 };\nstatic const int kNormalNumPartitions = 12;\n\n// Delay estimator constants, used for logging and delay compensation if\n// if reported delays are disabled.\nenum { kLookaheadBlocks = 15 };\nenum {\n  // 500 ms for 16 kHz which is equivalent with the limit of reported delays.\n  kHistorySizeBlocks = 125\n};\n\ntypedef struct PowerLevel {\n  PowerLevel();\n\n  BlockMeanCalculator framelevel;\n  BlockMeanCalculator averagelevel;\n  float minlevel;\n} PowerLevel;\n\nclass BlockBuffer {\n public:\n  BlockBuffer();\n  ~BlockBuffer();\n  void ReInit();\n  void Insert(const float block[PART_LEN]);\n  void ExtractExtendedBlock(float extended_block[PART_LEN]);\n  int AdjustSize(int buffer_size_decrease);\n  size_t Size();\n  size_t AvaliableSpace();\n\n private:\n  RingBuffer* buffer_;\n};\n\nclass DivergentFilterFraction {\n public:\n  DivergentFilterFraction();\n\n  // Reset.\n  void Reset();\n\n  void AddObservation(const PowerLevel& nearlevel,\n                      const PowerLevel& linoutlevel,\n                      const PowerLevel& nlpoutlevel);\n\n  // Return the latest fraction.\n  float GetLatestFraction() const;\n\n private:\n  // Clear all values added.\n  void Clear();\n\n  size_t count_;\n  size_t occurrence_;\n  float fraction_;\n\n  RTC_DISALLOW_COPY_AND_ASSIGN(DivergentFilterFraction);\n};\n\ntypedef struct CoherenceState {\n  complex_t sde[PART_LEN1];  // cross-psd of nearend and error\n  complex_t sxd[PART_LEN1];  // cross-psd of farend and nearend\n  float sx[PART_LEN1], sd[PART_LEN1], se[PART_LEN1];  // far, near, error psd\n} CoherenceState;\n\nstruct AecCore {\n  explicit AecCore(int instance_index);\n  ~AecCore();\n\n  std::unique_ptr<ApmDataDumper> data_dumper;\n  const OouraFft ooura_fft;\n\n  CoherenceState coherence_state;\n\n  int farBufWritePos, farBufReadPos;\n\n  int knownDelay;\n  int inSamples, outSamples;\n  int delayEstCtr;\n\n  // Nearend buffer used for changing from FRAME_LEN to PART_LEN sample block\n  // sizes. The buffer stores all the incoming bands and for each band a maximum\n  // of PART_LEN - (FRAME_LEN - PART_LEN) values need to be buffered in order to\n  // change the block size from FRAME_LEN to PART_LEN.\n  float nearend_buffer[NUM_HIGH_BANDS_MAX + 1]\n                      [PART_LEN - (FRAME_LEN - PART_LEN)];\n  size_t nearend_buffer_size;\n  float output_buffer[NUM_HIGH_BANDS_MAX + 1][2 * PART_LEN];\n  size_t output_buffer_size;\n\n  float eBuf[PART_LEN2];  // error\n\n  float previous_nearend_block[NUM_HIGH_BANDS_MAX + 1][PART_LEN];\n\n  float xPow[PART_LEN1];\n  float dPow[PART_LEN1];\n  float dMinPow[PART_LEN1];\n  float dInitMinPow[PART_LEN1];\n  float* noisePow;\n\n  float xfBuf[2][kExtendedNumPartitions * PART_LEN1];  // farend fft buffer\n  float wfBuf[2][kExtendedNumPartitions * PART_LEN1];  // filter fft\n  // Farend windowed fft buffer.\n  complex_t xfwBuf[kExtendedNumPartitions * PART_LEN1];\n\n  float hNs[PART_LEN1];\n  float hNlFbMin, hNlFbLocalMin;\n  float hNlXdAvgMin;\n  int hNlNewMin, hNlMinCtr;\n  float overDrive;\n  float overdrive_scaling;\n  int nlp_mode;\n  float outBuf[PART_LEN];\n  int delayIdx;\n\n  short stNearState, echoState;\n  short divergeState;\n\n  int xfBufBlockPos;\n\n  BlockBuffer farend_block_buffer_;\n\n  int system_delay;  // Current system delay buffered in AEC.\n\n  int mult;  // sampling frequency multiple\n  int sampFreq = 16000;\n  size_t num_bands;\n  uint32_t seed;\n\n  float filter_step_size;  // stepsize\n  float error_threshold;   // error threshold\n\n  int noiseEstCtr;\n\n  PowerLevel farlevel;\n  PowerLevel nearlevel;\n  PowerLevel linoutlevel;\n  PowerLevel nlpoutlevel;\n\n  int metricsMode;\n  int stateCounter;\n  Stats erl;\n  Stats erle;\n  Stats aNlp;\n  Stats rerl;\n  DivergentFilterFraction divergent_filter_fraction;\n\n  // Quantities to control H band scaling for SWB input\n  int freq_avg_ic;       // initial bin for averaging nlp gain\n  int flag_Hband_cn;     // for comfort noise\n  float cn_scale_Hband;  // scale for comfort noise in H band\n\n  int delay_metrics_delivered;\n  int delay_histogram[kHistorySizeBlocks];\n  int num_delay_values;\n  int delay_median;\n  int delay_std;\n  float fraction_poor_delays;\n  int delay_logging_enabled;\n  void* delay_estimator_farend;\n  void* delay_estimator;\n  // Variables associated with delay correction through signal based delay\n  // estimation feedback.\n  int previous_delay;\n  int delay_correction_count;\n  int shift_offset;\n  float delay_quality_threshold;\n  int frame_count;\n\n  // 0 = delay agnostic mode (signal based delay correction) disabled.\n  // Otherwise enabled.\n  int delay_agnostic_enabled;\n  // 1 = extended filter mode enabled, 0 = disabled.\n  int extended_filter_enabled;\n  // 1 = refined filter adaptation aec mode enabled, 0 = disabled.\n  bool refined_adaptive_filter_enabled;\n\n  // Runtime selection of number of filter partitions.\n  int num_partitions;\n\n  // Flag that extreme filter divergence has been detected by the Echo\n  // Suppressor.\n  int extreme_filter_divergence;\n};\n\nAecCore* WebRtcAec_CreateAec(int instance_count);  // Returns NULL on error.\nvoid WebRtcAec_FreeAec(AecCore* aec);\nint WebRtcAec_InitAec(AecCore* aec, int sampFreq);\nvoid WebRtcAec_InitAec_SSE2(void);\n#if defined(MIPS_FPU_LE)\nvoid WebRtcAec_InitAec_mips(void);\n#endif\n#if defined(WEBRTC_HAS_NEON)\nvoid WebRtcAec_InitAec_neon(void);\n#endif\n\nvoid WebRtcAec_BufferFarendBlock(AecCore* aec, const float* farend);\nvoid WebRtcAec_ProcessFrames(AecCore* aec,\n                             const float* const* nearend,\n                             size_t num_bands,\n                             size_t num_samples,\n                             int knownDelay,\n                             float* const* out);\n\n// A helper function to call adjust the farend buffer size.\n// Returns the number of elements the size was decreased with, and adjusts\n// |system_delay| by the corresponding amount in ms.\nint WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(AecCore* aec,\n                                                   int size_decrease);\n\n// Calculates the median, standard deviation and amount of poor values among the\n// delay estimates aggregated up to the first call to the function. After that\n// first call the metrics are aggregated and updated every second. With poor\n// values we mean values that most likely will cause the AEC to perform poorly.\n// TODO(bjornv): Consider changing tests and tools to handle constant\n// constant aggregation window throughout the session instead.\nint WebRtcAec_GetDelayMetricsCore(AecCore* self,\n                                  int* median,\n                                  int* std,\n                                  float* fraction_poor_delays);\n\n// Returns the echo state (1: echo, 0: no echo).\nint WebRtcAec_echo_state(AecCore* self);\n\n// Gets statistics of the echo metrics ERL, ERLE, A_NLP.\nvoid WebRtcAec_GetEchoStats(AecCore* self,\n                            Stats* erl,\n                            Stats* erle,\n                            Stats* a_nlp,\n                            float* divergent_filter_fraction);\n\n// Sets local configuration modes.\nvoid WebRtcAec_SetConfigCore(AecCore* self,\n                             int nlp_mode,\n                             int metrics_mode,\n                             int delay_logging);\n\n// Non-zero enables, zero disables.\nvoid WebRtcAec_enable_delay_agnostic(AecCore* self, int enable);\n\n// Returns non-zero if delay agnostic (i.e., signal based delay estimation) is\n// enabled and zero if disabled.\nint WebRtcAec_delay_agnostic_enabled(AecCore* self);\n\n// Turns on/off the refined adaptive filter feature.\nvoid WebRtcAec_enable_refined_adaptive_filter(AecCore* self, bool enable);\n\n// Returns whether the refined adaptive filter is enabled.\nbool WebRtcAec_refined_adaptive_filter(const AecCore* self);\n\n// Enables or disables extended filter mode. Non-zero enables, zero disables.\nvoid WebRtcAec_enable_extended_filter(AecCore* self, int enable);\n\n// Returns non-zero if extended filter mode is enabled and zero if disabled.\nint WebRtcAec_extended_filter_enabled(AecCore* self);\n\n// Returns the current |system_delay|, i.e., the buffered difference between\n// far-end and near-end.\nint WebRtcAec_system_delay(AecCore* self);\n\n// Sets the |system_delay| to |value|.  Note that if the value is changed\n// improperly, there can be a performance regression.  So it should be used with\n// care.\nvoid WebRtcAec_SetSystemDelay(AecCore* self, int delay);\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aec/aec_core_neon.cc",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/*\n * The core AEC algorithm, neon version of speed-critical functions.\n *\n * Based on aec_core_sse2.c.\n */\n\n#ifdef WEBRTC_ARCH_ARM_FAMILY\n\n#include <arm_neon.h>\n#include <math.h>\n#include <string.h>  // memset\n\nextern \"C\" {\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n}\n#include \"webrtc/modules/audio_processing/aec/aec_common.h\"\n#include \"webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h\"\n#include \"webrtc/modules/audio_processing/utility/ooura_fft.h\"\n\nnamespace webrtc {\n\nenum { kShiftExponentIntoTopMantissa = 8 };\nenum { kFloatExponentShift = 23 };\n\n__inline static float MulRe(float aRe, float aIm, float bRe, float bIm) {\n  return aRe * bRe - aIm * bIm;\n}\n\n__inline static float MulIm(float aRe, float aIm, float bRe, float bIm) {\n  return aRe * bIm + aIm * bRe;\n}\n\nstatic void FilterFarNEON(int num_partitions,\n                          int x_fft_buf_block_pos,\n                          float x_fft_buf[2]\n                                         [kExtendedNumPartitions * PART_LEN1],\n                          float h_fft_buf[2]\n                                         [kExtendedNumPartitions * PART_LEN1],\n                          float y_fft[2][PART_LEN1]) {\n  int i;\n  for (i = 0; i < num_partitions; i++) {\n    int j;\n    int xPos = (i + x_fft_buf_block_pos) * PART_LEN1;\n    int pos = i * PART_LEN1;\n    // Check for wrap\n    if (i + x_fft_buf_block_pos >= num_partitions) {\n      xPos -= num_partitions * PART_LEN1;\n    }\n\n    // vectorized code (four at once)\n    for (j = 0; j + 3 < PART_LEN1; j += 4) {\n      const float32x4_t x_fft_buf_re = vld1q_f32(&x_fft_buf[0][xPos + j]);\n      const float32x4_t x_fft_buf_im = vld1q_f32(&x_fft_buf[1][xPos + j]);\n      const float32x4_t h_fft_buf_re = vld1q_f32(&h_fft_buf[0][pos + j]);\n      const float32x4_t h_fft_buf_im = vld1q_f32(&h_fft_buf[1][pos + j]);\n      const float32x4_t y_fft_re = vld1q_f32(&y_fft[0][j]);\n      const float32x4_t y_fft_im = vld1q_f32(&y_fft[1][j]);\n      const float32x4_t a = vmulq_f32(x_fft_buf_re, h_fft_buf_re);\n      const float32x4_t e = vmlsq_f32(a, x_fft_buf_im, h_fft_buf_im);\n      const float32x4_t c = vmulq_f32(x_fft_buf_re, h_fft_buf_im);\n      const float32x4_t f = vmlaq_f32(c, x_fft_buf_im, h_fft_buf_re);\n      const float32x4_t g = vaddq_f32(y_fft_re, e);\n      const float32x4_t h = vaddq_f32(y_fft_im, f);\n      vst1q_f32(&y_fft[0][j], g);\n      vst1q_f32(&y_fft[1][j], h);\n    }\n    // scalar code for the remaining items.\n    for (; j < PART_LEN1; j++) {\n      y_fft[0][j] += MulRe(x_fft_buf[0][xPos + j], x_fft_buf[1][xPos + j],\n                           h_fft_buf[0][pos + j], h_fft_buf[1][pos + j]);\n      y_fft[1][j] += MulIm(x_fft_buf[0][xPos + j], x_fft_buf[1][xPos + j],\n                           h_fft_buf[0][pos + j], h_fft_buf[1][pos + j]);\n    }\n  }\n}\n\n// ARM64's arm_neon.h has already defined vdivq_f32 vsqrtq_f32.\n#if !defined(WEBRTC_ARCH_ARM64)\nstatic float32x4_t vdivq_f32(float32x4_t a, float32x4_t b) {\n  int i;\n  float32x4_t x = vrecpeq_f32(b);\n  // from arm documentation\n  // The Newton-Raphson iteration:\n  //     x[n+1] = x[n] * (2 - d * x[n])\n  // converges to (1/d) if x0 is the result of VRECPE applied to d.\n  //\n  // Note: The precision did not improve after 2 iterations.\n  for (i = 0; i < 2; i++) {\n    x = vmulq_f32(vrecpsq_f32(b, x), x);\n  }\n  // a/b = a*(1/b)\n  return vmulq_f32(a, x);\n}\n\nstatic float32x4_t vsqrtq_f32(float32x4_t s) {\n  int i;\n  float32x4_t x = vrsqrteq_f32(s);\n\n  // Code to handle sqrt(0).\n  // If the input to sqrtf() is zero, a zero will be returned.\n  // If the input to vrsqrteq_f32() is zero, positive infinity is returned.\n  const uint32x4_t vec_p_inf = vdupq_n_u32(0x7F800000);\n  // check for divide by zero\n  const uint32x4_t div_by_zero = vceqq_u32(vec_p_inf, vreinterpretq_u32_f32(x));\n  // zero out the positive infinity results\n  x = vreinterpretq_f32_u32(\n      vandq_u32(vmvnq_u32(div_by_zero), vreinterpretq_u32_f32(x)));\n  // from arm documentation\n  // The Newton-Raphson iteration:\n  //     x[n+1] = x[n] * (3 - d * (x[n] * x[n])) / 2)\n  // converges to (1/√d) if x0 is the result of VRSQRTE applied to d.\n  //\n  // Note: The precision did not improve after 2 iterations.\n  for (i = 0; i < 2; i++) {\n    x = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x, x), s), x);\n  }\n  // sqrt(s) = s * 1/sqrt(s)\n  return vmulq_f32(s, x);\n}\n#endif  // WEBRTC_ARCH_ARM64\n\nstatic void ScaleErrorSignalNEON(float mu,\n                                 float error_threshold,\n                                 float x_pow[PART_LEN1],\n                                 float ef[2][PART_LEN1]) {\n  const float32x4_t k1e_10f = vdupq_n_f32(1e-10f);\n  const float32x4_t kMu = vmovq_n_f32(mu);\n  const float32x4_t kThresh = vmovq_n_f32(error_threshold);\n  int i;\n  // vectorized code (four at once)\n  for (i = 0; i + 3 < PART_LEN1; i += 4) {\n    const float32x4_t x_pow_local = vld1q_f32(&x_pow[i]);\n    const float32x4_t ef_re_base = vld1q_f32(&ef[0][i]);\n    const float32x4_t ef_im_base = vld1q_f32(&ef[1][i]);\n    const float32x4_t xPowPlus = vaddq_f32(x_pow_local, k1e_10f);\n    float32x4_t ef_re = vdivq_f32(ef_re_base, xPowPlus);\n    float32x4_t ef_im = vdivq_f32(ef_im_base, xPowPlus);\n    const float32x4_t ef_re2 = vmulq_f32(ef_re, ef_re);\n    const float32x4_t ef_sum2 = vmlaq_f32(ef_re2, ef_im, ef_im);\n    const float32x4_t absEf = vsqrtq_f32(ef_sum2);\n    const uint32x4_t bigger = vcgtq_f32(absEf, kThresh);\n    const float32x4_t absEfPlus = vaddq_f32(absEf, k1e_10f);\n    const float32x4_t absEfInv = vdivq_f32(kThresh, absEfPlus);\n    uint32x4_t ef_re_if = vreinterpretq_u32_f32(vmulq_f32(ef_re, absEfInv));\n    uint32x4_t ef_im_if = vreinterpretq_u32_f32(vmulq_f32(ef_im, absEfInv));\n    uint32x4_t ef_re_u32 =\n        vandq_u32(vmvnq_u32(bigger), vreinterpretq_u32_f32(ef_re));\n    uint32x4_t ef_im_u32 =\n        vandq_u32(vmvnq_u32(bigger), vreinterpretq_u32_f32(ef_im));\n    ef_re_if = vandq_u32(bigger, ef_re_if);\n    ef_im_if = vandq_u32(bigger, ef_im_if);\n    ef_re_u32 = vorrq_u32(ef_re_u32, ef_re_if);\n    ef_im_u32 = vorrq_u32(ef_im_u32, ef_im_if);\n    ef_re = vmulq_f32(vreinterpretq_f32_u32(ef_re_u32), kMu);\n    ef_im = vmulq_f32(vreinterpretq_f32_u32(ef_im_u32), kMu);\n    vst1q_f32(&ef[0][i], ef_re);\n    vst1q_f32(&ef[1][i], ef_im);\n  }\n  // scalar code for the remaining items.\n  for (; i < PART_LEN1; i++) {\n    float abs_ef;\n    ef[0][i] /= (x_pow[i] + 1e-10f);\n    ef[1][i] /= (x_pow[i] + 1e-10f);\n    abs_ef = sqrtf(ef[0][i] * ef[0][i] + ef[1][i] * ef[1][i]);\n\n    if (abs_ef > error_threshold) {\n      abs_ef = error_threshold / (abs_ef + 1e-10f);\n      ef[0][i] *= abs_ef;\n      ef[1][i] *= abs_ef;\n    }\n\n    // Stepsize factor\n    ef[0][i] *= mu;\n    ef[1][i] *= mu;\n  }\n}\n\nstatic void FilterAdaptationNEON(\n    const OouraFft& ooura_fft,\n    int num_partitions,\n    int x_fft_buf_block_pos,\n    float x_fft_buf[2][kExtendedNumPartitions * PART_LEN1],\n    float e_fft[2][PART_LEN1],\n    float h_fft_buf[2][kExtendedNumPartitions * PART_LEN1]) {\n  float fft[PART_LEN2];\n  int i;\n  for (i = 0; i < num_partitions; i++) {\n    int xPos = (i + x_fft_buf_block_pos) * PART_LEN1;\n    int pos = i * PART_LEN1;\n    int j;\n    // Check for wrap\n    if (i + x_fft_buf_block_pos >= num_partitions) {\n      xPos -= num_partitions * PART_LEN1;\n    }\n\n    // Process the whole array...\n    for (j = 0; j < PART_LEN; j += 4) {\n      // Load x_fft_buf and e_fft.\n      const float32x4_t x_fft_buf_re = vld1q_f32(&x_fft_buf[0][xPos + j]);\n      const float32x4_t x_fft_buf_im = vld1q_f32(&x_fft_buf[1][xPos + j]);\n      const float32x4_t e_fft_re = vld1q_f32(&e_fft[0][j]);\n      const float32x4_t e_fft_im = vld1q_f32(&e_fft[1][j]);\n      // Calculate the product of conjugate(x_fft_buf) by e_fft.\n      //   re(conjugate(a) * b) = aRe * bRe + aIm * bIm\n      //   im(conjugate(a) * b)=  aRe * bIm - aIm * bRe\n      const float32x4_t a = vmulq_f32(x_fft_buf_re, e_fft_re);\n      const float32x4_t e = vmlaq_f32(a, x_fft_buf_im, e_fft_im);\n      const float32x4_t c = vmulq_f32(x_fft_buf_re, e_fft_im);\n      const float32x4_t f = vmlsq_f32(c, x_fft_buf_im, e_fft_re);\n      // Interleave real and imaginary parts.\n      const float32x4x2_t g_n_h = vzipq_f32(e, f);\n      // Store\n      vst1q_f32(&fft[2 * j + 0], g_n_h.val[0]);\n      vst1q_f32(&fft[2 * j + 4], g_n_h.val[1]);\n    }\n    // ... and fixup the first imaginary entry.\n    fft[1] =\n        MulRe(x_fft_buf[0][xPos + PART_LEN], -x_fft_buf[1][xPos + PART_LEN],\n              e_fft[0][PART_LEN], e_fft[1][PART_LEN]);\n\n    ooura_fft.InverseFft(fft);\n    memset(fft + PART_LEN, 0, sizeof(float) * PART_LEN);\n\n    // fft scaling\n    {\n      const float scale = 2.0f / PART_LEN2;\n      const float32x4_t scale_ps = vmovq_n_f32(scale);\n      for (j = 0; j < PART_LEN; j += 4) {\n        const float32x4_t fft_ps = vld1q_f32(&fft[j]);\n        const float32x4_t fft_scale = vmulq_f32(fft_ps, scale_ps);\n        vst1q_f32(&fft[j], fft_scale);\n      }\n    }\n    ooura_fft.Fft(fft);\n\n    {\n      const float wt1 = h_fft_buf[1][pos];\n      h_fft_buf[0][pos + PART_LEN] += fft[1];\n      for (j = 0; j < PART_LEN; j += 4) {\n        float32x4_t wtBuf_re = vld1q_f32(&h_fft_buf[0][pos + j]);\n        float32x4_t wtBuf_im = vld1q_f32(&h_fft_buf[1][pos + j]);\n        const float32x4_t fft0 = vld1q_f32(&fft[2 * j + 0]);\n        const float32x4_t fft4 = vld1q_f32(&fft[2 * j + 4]);\n        const float32x4x2_t fft_re_im = vuzpq_f32(fft0, fft4);\n        wtBuf_re = vaddq_f32(wtBuf_re, fft_re_im.val[0]);\n        wtBuf_im = vaddq_f32(wtBuf_im, fft_re_im.val[1]);\n\n        vst1q_f32(&h_fft_buf[0][pos + j], wtBuf_re);\n        vst1q_f32(&h_fft_buf[1][pos + j], wtBuf_im);\n      }\n      h_fft_buf[1][pos] = wt1;\n    }\n  }\n}\n\nstatic float32x4_t vpowq_f32(float32x4_t a, float32x4_t b) {\n  // a^b = exp2(b * log2(a))\n  //   exp2(x) and log2(x) are calculated using polynomial approximations.\n  float32x4_t log2_a, b_log2_a, a_exp_b;\n\n  // Calculate log2(x), x = a.\n  {\n    // To calculate log2(x), we decompose x like this:\n    //   x = y * 2^n\n    //     n is an integer\n    //     y is in the [1.0, 2.0) range\n    //\n    //   log2(x) = log2(y) + n\n    //     n       can be evaluated by playing with float representation.\n    //     log2(y) in a small range can be approximated, this code uses an order\n    //             five polynomial approximation. The coefficients have been\n    //             estimated with the Remez algorithm and the resulting\n    //             polynomial has a maximum relative error of 0.00086%.\n\n    // Compute n.\n    //    This is done by masking the exponent, shifting it into the top bit of\n    //    the mantissa, putting eight into the biased exponent (to shift/\n    //    compensate the fact that the exponent has been shifted in the top/\n    //    fractional part and finally getting rid of the implicit leading one\n    //    from the mantissa by substracting it out.\n    const uint32x4_t vec_float_exponent_mask = vdupq_n_u32(0x7F800000);\n    const uint32x4_t vec_eight_biased_exponent = vdupq_n_u32(0x43800000);\n    const uint32x4_t vec_implicit_leading_one = vdupq_n_u32(0x43BF8000);\n    const uint32x4_t two_n =\n        vandq_u32(vreinterpretq_u32_f32(a), vec_float_exponent_mask);\n    const uint32x4_t n_1 = vshrq_n_u32(two_n, kShiftExponentIntoTopMantissa);\n    const uint32x4_t n_0 = vorrq_u32(n_1, vec_eight_biased_exponent);\n    const float32x4_t n =\n        vsubq_f32(vreinterpretq_f32_u32(n_0),\n                  vreinterpretq_f32_u32(vec_implicit_leading_one));\n    // Compute y.\n    const uint32x4_t vec_mantissa_mask = vdupq_n_u32(0x007FFFFF);\n    const uint32x4_t vec_zero_biased_exponent_is_one = vdupq_n_u32(0x3F800000);\n    const uint32x4_t mantissa =\n        vandq_u32(vreinterpretq_u32_f32(a), vec_mantissa_mask);\n    const float32x4_t y = vreinterpretq_f32_u32(\n        vorrq_u32(mantissa, vec_zero_biased_exponent_is_one));\n    // Approximate log2(y) ~= (y - 1) * pol5(y).\n    //    pol5(y) = C5 * y^5 + C4 * y^4 + C3 * y^3 + C2 * y^2 + C1 * y + C0\n    const float32x4_t C5 = vdupq_n_f32(-3.4436006e-2f);\n    const float32x4_t C4 = vdupq_n_f32(3.1821337e-1f);\n    const float32x4_t C3 = vdupq_n_f32(-1.2315303f);\n    const float32x4_t C2 = vdupq_n_f32(2.5988452f);\n    const float32x4_t C1 = vdupq_n_f32(-3.3241990f);\n    const float32x4_t C0 = vdupq_n_f32(3.1157899f);\n    float32x4_t pol5_y = C5;\n    pol5_y = vmlaq_f32(C4, y, pol5_y);\n    pol5_y = vmlaq_f32(C3, y, pol5_y);\n    pol5_y = vmlaq_f32(C2, y, pol5_y);\n    pol5_y = vmlaq_f32(C1, y, pol5_y);\n    pol5_y = vmlaq_f32(C0, y, pol5_y);\n    const float32x4_t y_minus_one =\n        vsubq_f32(y, vreinterpretq_f32_u32(vec_zero_biased_exponent_is_one));\n    const float32x4_t log2_y = vmulq_f32(y_minus_one, pol5_y);\n\n    // Combine parts.\n    log2_a = vaddq_f32(n, log2_y);\n  }\n\n  // b * log2(a)\n  b_log2_a = vmulq_f32(b, log2_a);\n\n  // Calculate exp2(x), x = b * log2(a).\n  {\n    // To calculate 2^x, we decompose x like this:\n    //   x = n + y\n    //     n is an integer, the value of x - 0.5 rounded down, therefore\n    //     y is in the [0.5, 1.5) range\n    //\n    //   2^x = 2^n * 2^y\n    //     2^n can be evaluated by playing with float representation.\n    //     2^y in a small range can be approximated, this code uses an order two\n    //         polynomial approximation. The coefficients have been estimated\n    //         with the Remez algorithm and the resulting polynomial has a\n    //         maximum relative error of 0.17%.\n    // To avoid over/underflow, we reduce the range of input to ]-127, 129].\n    const float32x4_t max_input = vdupq_n_f32(129.f);\n    const float32x4_t min_input = vdupq_n_f32(-126.99999f);\n    const float32x4_t x_min = vminq_f32(b_log2_a, max_input);\n    const float32x4_t x_max = vmaxq_f32(x_min, min_input);\n    // Compute n.\n    const float32x4_t half = vdupq_n_f32(0.5f);\n    const float32x4_t x_minus_half = vsubq_f32(x_max, half);\n    const int32x4_t x_minus_half_floor = vcvtq_s32_f32(x_minus_half);\n\n    // Compute 2^n.\n    const int32x4_t float_exponent_bias = vdupq_n_s32(127);\n    const int32x4_t two_n_exponent =\n        vaddq_s32(x_minus_half_floor, float_exponent_bias);\n    const float32x4_t two_n =\n        vreinterpretq_f32_s32(vshlq_n_s32(two_n_exponent, kFloatExponentShift));\n    // Compute y.\n    const float32x4_t y = vsubq_f32(x_max, vcvtq_f32_s32(x_minus_half_floor));\n\n    // Approximate 2^y ~= C2 * y^2 + C1 * y + C0.\n    const float32x4_t C2 = vdupq_n_f32(3.3718944e-1f);\n    const float32x4_t C1 = vdupq_n_f32(6.5763628e-1f);\n    const float32x4_t C0 = vdupq_n_f32(1.0017247f);\n    float32x4_t exp2_y = C2;\n    exp2_y = vmlaq_f32(C1, y, exp2_y);\n    exp2_y = vmlaq_f32(C0, y, exp2_y);\n\n    // Combine parts.\n    a_exp_b = vmulq_f32(exp2_y, two_n);\n  }\n\n  return a_exp_b;\n}\n\nstatic void OverdriveNEON(float overdrive_scaling,\n                          float hNlFb,\n                          float hNl[PART_LEN1]) {\n  int i;\n  const float32x4_t vec_hNlFb = vmovq_n_f32(hNlFb);\n  const float32x4_t vec_one = vdupq_n_f32(1.0f);\n  const float32x4_t vec_overdrive_scaling = vmovq_n_f32(overdrive_scaling);\n\n  // vectorized code (four at once)\n  for (i = 0; i + 3 < PART_LEN1; i += 4) {\n    // Weight subbands\n    float32x4_t vec_hNl = vld1q_f32(&hNl[i]);\n    const float32x4_t vec_weightCurve = vld1q_f32(&WebRtcAec_weightCurve[i]);\n    const uint32x4_t bigger = vcgtq_f32(vec_hNl, vec_hNlFb);\n    const float32x4_t vec_weightCurve_hNlFb =\n        vmulq_f32(vec_weightCurve, vec_hNlFb);\n    const float32x4_t vec_one_weightCurve = vsubq_f32(vec_one, vec_weightCurve);\n    const float32x4_t vec_one_weightCurve_hNl =\n        vmulq_f32(vec_one_weightCurve, vec_hNl);\n    const uint32x4_t vec_if0 =\n        vandq_u32(vmvnq_u32(bigger), vreinterpretq_u32_f32(vec_hNl));\n    const float32x4_t vec_one_weightCurve_add =\n        vaddq_f32(vec_weightCurve_hNlFb, vec_one_weightCurve_hNl);\n    const uint32x4_t vec_if1 =\n        vandq_u32(bigger, vreinterpretq_u32_f32(vec_one_weightCurve_add));\n\n    vec_hNl = vreinterpretq_f32_u32(vorrq_u32(vec_if0, vec_if1));\n\n    const float32x4_t vec_overDriveCurve =\n        vld1q_f32(&WebRtcAec_overDriveCurve[i]);\n    const float32x4_t vec_overDriveSm_overDriveCurve =\n        vmulq_f32(vec_overdrive_scaling, vec_overDriveCurve);\n    vec_hNl = vpowq_f32(vec_hNl, vec_overDriveSm_overDriveCurve);\n    vst1q_f32(&hNl[i], vec_hNl);\n  }\n\n  // scalar code for the remaining items.\n  for (; i < PART_LEN1; i++) {\n    // Weight subbands\n    if (hNl[i] > hNlFb) {\n      hNl[i] = WebRtcAec_weightCurve[i] * hNlFb +\n               (1 - WebRtcAec_weightCurve[i]) * hNl[i];\n    }\n\n    hNl[i] = powf(hNl[i], overdrive_scaling * WebRtcAec_overDriveCurve[i]);\n  }\n}\n\nstatic void SuppressNEON(const float hNl[PART_LEN1], float efw[2][PART_LEN1]) {\n  int i;\n  const float32x4_t vec_minus_one = vdupq_n_f32(-1.0f);\n  // vectorized code (four at once)\n  for (i = 0; i + 3 < PART_LEN1; i += 4) {\n    float32x4_t vec_hNl = vld1q_f32(&hNl[i]);\n    float32x4_t vec_efw_re = vld1q_f32(&efw[0][i]);\n    float32x4_t vec_efw_im = vld1q_f32(&efw[1][i]);\n    vec_efw_re = vmulq_f32(vec_efw_re, vec_hNl);\n    vec_efw_im = vmulq_f32(vec_efw_im, vec_hNl);\n\n    // Ooura fft returns incorrect sign on imaginary component. It matters\n    // here because we are making an additive change with comfort noise.\n    vec_efw_im = vmulq_f32(vec_efw_im, vec_minus_one);\n    vst1q_f32(&efw[0][i], vec_efw_re);\n    vst1q_f32(&efw[1][i], vec_efw_im);\n  }\n\n  // scalar code for the remaining items.\n  for (; i < PART_LEN1; i++) {\n    efw[0][i] *= hNl[i];\n    efw[1][i] *= hNl[i];\n\n    // Ooura fft returns incorrect sign on imaginary component. It matters\n    // here because we are making an additive change with comfort noise.\n    efw[1][i] *= -1;\n  }\n}\n\nstatic int PartitionDelayNEON(\n    int num_partitions,\n    float h_fft_buf[2][kExtendedNumPartitions * PART_LEN1]) {\n  // Measures the energy in each filter partition and returns the partition with\n  // highest energy.\n  // TODO(bjornv): Spread computational cost by computing one partition per\n  // block?\n  float wfEnMax = 0;\n  int i;\n  int delay = 0;\n\n  for (i = 0; i < num_partitions; i++) {\n    int j;\n    int pos = i * PART_LEN1;\n    float wfEn = 0;\n    float32x4_t vec_wfEn = vdupq_n_f32(0.0f);\n    // vectorized code (four at once)\n    for (j = 0; j + 3 < PART_LEN1; j += 4) {\n      const float32x4_t vec_wfBuf0 = vld1q_f32(&h_fft_buf[0][pos + j]);\n      const float32x4_t vec_wfBuf1 = vld1q_f32(&h_fft_buf[1][pos + j]);\n      vec_wfEn = vmlaq_f32(vec_wfEn, vec_wfBuf0, vec_wfBuf0);\n      vec_wfEn = vmlaq_f32(vec_wfEn, vec_wfBuf1, vec_wfBuf1);\n    }\n    {\n      float32x2_t vec_total;\n      // A B C D\n      vec_total = vpadd_f32(vget_low_f32(vec_wfEn), vget_high_f32(vec_wfEn));\n      // A+B C+D\n      vec_total = vpadd_f32(vec_total, vec_total);\n      // A+B+C+D A+B+C+D\n      wfEn = vget_lane_f32(vec_total, 0);\n    }\n\n    // scalar code for the remaining items.\n    for (; j < PART_LEN1; j++) {\n      wfEn += h_fft_buf[0][pos + j] * h_fft_buf[0][pos + j] +\n              h_fft_buf[1][pos + j] * h_fft_buf[1][pos + j];\n    }\n\n    if (wfEn > wfEnMax) {\n      wfEnMax = wfEn;\n      delay = i;\n    }\n  }\n  return delay;\n}\n\n// Updates the following smoothed  Power Spectral Densities (PSD):\n//  - sd  : near-end\n//  - se  : residual echo\n//  - sx  : far-end\n//  - sde : cross-PSD of near-end and residual echo\n//  - sxd : cross-PSD of near-end and far-end\n//\n// In addition to updating the PSDs, also the filter diverge state is determined\n// upon actions are taken.\nstatic void UpdateCoherenceSpectraNEON(int mult,\n                                       bool extended_filter_enabled,\n                                       float efw[2][PART_LEN1],\n                                       float dfw[2][PART_LEN1],\n                                       float xfw[2][PART_LEN1],\n                                       CoherenceState* coherence_state,\n                                       short* filter_divergence_state,\n                                       int* extreme_filter_divergence) {\n  // Power estimate smoothing coefficients.\n  const float* ptrGCoh =\n      extended_filter_enabled\n          ? WebRtcAec_kExtendedSmoothingCoefficients[mult - 1]\n          : WebRtcAec_kNormalSmoothingCoefficients[mult - 1];\n  int i;\n  float sdSum = 0, seSum = 0;\n  const float32x4_t vec_15 = vdupq_n_f32(WebRtcAec_kMinFarendPSD);\n  float32x4_t vec_sdSum = vdupq_n_f32(0.0f);\n  float32x4_t vec_seSum = vdupq_n_f32(0.0f);\n\n  for (i = 0; i + 3 < PART_LEN1; i += 4) {\n    const float32x4_t vec_dfw0 = vld1q_f32(&dfw[0][i]);\n    const float32x4_t vec_dfw1 = vld1q_f32(&dfw[1][i]);\n    const float32x4_t vec_efw0 = vld1q_f32(&efw[0][i]);\n    const float32x4_t vec_efw1 = vld1q_f32(&efw[1][i]);\n    const float32x4_t vec_xfw0 = vld1q_f32(&xfw[0][i]);\n    const float32x4_t vec_xfw1 = vld1q_f32(&xfw[1][i]);\n    float32x4_t vec_sd =\n        vmulq_n_f32(vld1q_f32(&coherence_state->sd[i]), ptrGCoh[0]);\n    float32x4_t vec_se =\n        vmulq_n_f32(vld1q_f32(&coherence_state->se[i]), ptrGCoh[0]);\n    float32x4_t vec_sx =\n        vmulq_n_f32(vld1q_f32(&coherence_state->sx[i]), ptrGCoh[0]);\n    float32x4_t vec_dfw_sumsq = vmulq_f32(vec_dfw0, vec_dfw0);\n    float32x4_t vec_efw_sumsq = vmulq_f32(vec_efw0, vec_efw0);\n    float32x4_t vec_xfw_sumsq = vmulq_f32(vec_xfw0, vec_xfw0);\n\n    vec_dfw_sumsq = vmlaq_f32(vec_dfw_sumsq, vec_dfw1, vec_dfw1);\n    vec_efw_sumsq = vmlaq_f32(vec_efw_sumsq, vec_efw1, vec_efw1);\n    vec_xfw_sumsq = vmlaq_f32(vec_xfw_sumsq, vec_xfw1, vec_xfw1);\n    vec_xfw_sumsq = vmaxq_f32(vec_xfw_sumsq, vec_15);\n    vec_sd = vmlaq_n_f32(vec_sd, vec_dfw_sumsq, ptrGCoh[1]);\n    vec_se = vmlaq_n_f32(vec_se, vec_efw_sumsq, ptrGCoh[1]);\n    vec_sx = vmlaq_n_f32(vec_sx, vec_xfw_sumsq, ptrGCoh[1]);\n\n    vst1q_f32(&coherence_state->sd[i], vec_sd);\n    vst1q_f32(&coherence_state->se[i], vec_se);\n    vst1q_f32(&coherence_state->sx[i], vec_sx);\n\n    {\n      float32x4x2_t vec_sde = vld2q_f32(&coherence_state->sde[i][0]);\n      float32x4_t vec_dfwefw0011 = vmulq_f32(vec_dfw0, vec_efw0);\n      float32x4_t vec_dfwefw0110 = vmulq_f32(vec_dfw0, vec_efw1);\n      vec_sde.val[0] = vmulq_n_f32(vec_sde.val[0], ptrGCoh[0]);\n      vec_sde.val[1] = vmulq_n_f32(vec_sde.val[1], ptrGCoh[0]);\n      vec_dfwefw0011 = vmlaq_f32(vec_dfwefw0011, vec_dfw1, vec_efw1);\n      vec_dfwefw0110 = vmlsq_f32(vec_dfwefw0110, vec_dfw1, vec_efw0);\n      vec_sde.val[0] = vmlaq_n_f32(vec_sde.val[0], vec_dfwefw0011, ptrGCoh[1]);\n      vec_sde.val[1] = vmlaq_n_f32(vec_sde.val[1], vec_dfwefw0110, ptrGCoh[1]);\n      vst2q_f32(&coherence_state->sde[i][0], vec_sde);\n    }\n\n    {\n      float32x4x2_t vec_sxd = vld2q_f32(&coherence_state->sxd[i][0]);\n      float32x4_t vec_dfwxfw0011 = vmulq_f32(vec_dfw0, vec_xfw0);\n      float32x4_t vec_dfwxfw0110 = vmulq_f32(vec_dfw0, vec_xfw1);\n      vec_sxd.val[0] = vmulq_n_f32(vec_sxd.val[0], ptrGCoh[0]);\n      vec_sxd.val[1] = vmulq_n_f32(vec_sxd.val[1], ptrGCoh[0]);\n      vec_dfwxfw0011 = vmlaq_f32(vec_dfwxfw0011, vec_dfw1, vec_xfw1);\n      vec_dfwxfw0110 = vmlsq_f32(vec_dfwxfw0110, vec_dfw1, vec_xfw0);\n      vec_sxd.val[0] = vmlaq_n_f32(vec_sxd.val[0], vec_dfwxfw0011, ptrGCoh[1]);\n      vec_sxd.val[1] = vmlaq_n_f32(vec_sxd.val[1], vec_dfwxfw0110, ptrGCoh[1]);\n      vst2q_f32(&coherence_state->sxd[i][0], vec_sxd);\n    }\n\n    vec_sdSum = vaddq_f32(vec_sdSum, vec_sd);\n    vec_seSum = vaddq_f32(vec_seSum, vec_se);\n  }\n  {\n    float32x2_t vec_sdSum_total;\n    float32x2_t vec_seSum_total;\n    // A B C D\n    vec_sdSum_total =\n        vpadd_f32(vget_low_f32(vec_sdSum), vget_high_f32(vec_sdSum));\n    vec_seSum_total =\n        vpadd_f32(vget_low_f32(vec_seSum), vget_high_f32(vec_seSum));\n    // A+B C+D\n    vec_sdSum_total = vpadd_f32(vec_sdSum_total, vec_sdSum_total);\n    vec_seSum_total = vpadd_f32(vec_seSum_total, vec_seSum_total);\n    // A+B+C+D A+B+C+D\n    sdSum = vget_lane_f32(vec_sdSum_total, 0);\n    seSum = vget_lane_f32(vec_seSum_total, 0);\n  }\n\n  // scalar code for the remaining items.\n  for (; i < PART_LEN1; i++) {\n    coherence_state->sd[i] =\n        ptrGCoh[0] * coherence_state->sd[i] +\n        ptrGCoh[1] * (dfw[0][i] * dfw[0][i] + dfw[1][i] * dfw[1][i]);\n    coherence_state->se[i] =\n        ptrGCoh[0] * coherence_state->se[i] +\n        ptrGCoh[1] * (efw[0][i] * efw[0][i] + efw[1][i] * efw[1][i]);\n    // We threshold here to protect against the ill-effects of a zero farend.\n    // The threshold is not arbitrarily chosen, but balances protection and\n    // adverse interaction with the algorithm's tuning.\n    // TODO(bjornv): investigate further why this is so sensitive.\n    coherence_state->sx[i] =\n        ptrGCoh[0] * coherence_state->sx[i] +\n        ptrGCoh[1] *\n            WEBRTC_SPL_MAX(xfw[0][i] * xfw[0][i] + xfw[1][i] * xfw[1][i],\n                           WebRtcAec_kMinFarendPSD);\n\n    coherence_state->sde[i][0] =\n        ptrGCoh[0] * coherence_state->sde[i][0] +\n        ptrGCoh[1] * (dfw[0][i] * efw[0][i] + dfw[1][i] * efw[1][i]);\n    coherence_state->sde[i][1] =\n        ptrGCoh[0] * coherence_state->sde[i][1] +\n        ptrGCoh[1] * (dfw[0][i] * efw[1][i] - dfw[1][i] * efw[0][i]);\n\n    coherence_state->sxd[i][0] =\n        ptrGCoh[0] * coherence_state->sxd[i][0] +\n        ptrGCoh[1] * (dfw[0][i] * xfw[0][i] + dfw[1][i] * xfw[1][i]);\n    coherence_state->sxd[i][1] =\n        ptrGCoh[0] * coherence_state->sxd[i][1] +\n        ptrGCoh[1] * (dfw[0][i] * xfw[1][i] - dfw[1][i] * xfw[0][i]);\n\n    sdSum += coherence_state->sd[i];\n    seSum += coherence_state->se[i];\n  }\n\n  // Divergent filter safeguard update.\n  *filter_divergence_state =\n      (*filter_divergence_state ? 1.05f : 1.0f) * seSum > sdSum;\n\n  // Signal extreme filter divergence if the error is significantly larger\n  // than the nearend (13 dB).\n  *extreme_filter_divergence = (seSum > (19.95f * sdSum));\n}\n\n// Window time domain data to be used by the fft.\nstatic void WindowDataNEON(float* x_windowed, const float* x) {\n  int i;\n  for (i = 0; i < PART_LEN; i += 4) {\n    const float32x4_t vec_Buf1 = vld1q_f32(&x[i]);\n    const float32x4_t vec_Buf2 = vld1q_f32(&x[PART_LEN + i]);\n    const float32x4_t vec_sqrtHanning = vld1q_f32(&WebRtcAec_sqrtHanning[i]);\n    // A B C D\n    float32x4_t vec_sqrtHanning_rev =\n        vld1q_f32(&WebRtcAec_sqrtHanning[PART_LEN - i - 3]);\n    // B A D C\n    vec_sqrtHanning_rev = vrev64q_f32(vec_sqrtHanning_rev);\n    // D C B A\n    vec_sqrtHanning_rev = vcombine_f32(vget_high_f32(vec_sqrtHanning_rev),\n                                       vget_low_f32(vec_sqrtHanning_rev));\n    vst1q_f32(&x_windowed[i], vmulq_f32(vec_Buf1, vec_sqrtHanning));\n    vst1q_f32(&x_windowed[PART_LEN + i],\n              vmulq_f32(vec_Buf2, vec_sqrtHanning_rev));\n  }\n}\n\n// Puts fft output data into a complex valued array.\nstatic void StoreAsComplexNEON(const float* data,\n                               float data_complex[2][PART_LEN1]) {\n  int i;\n  for (i = 0; i < PART_LEN; i += 4) {\n    const float32x4x2_t vec_data = vld2q_f32(&data[2 * i]);\n    vst1q_f32(&data_complex[0][i], vec_data.val[0]);\n    vst1q_f32(&data_complex[1][i], vec_data.val[1]);\n  }\n  // fix beginning/end values\n  data_complex[1][0] = 0;\n  data_complex[1][PART_LEN] = 0;\n  data_complex[0][0] = data[0];\n  data_complex[0][PART_LEN] = data[1];\n}\n\nstatic void ComputeCoherenceNEON(const CoherenceState* coherence_state,\n                                 float* cohde,\n                                 float* cohxd) {\n  int i;\n\n  {\n    const float32x4_t vec_1eminus10 = vdupq_n_f32(1e-10f);\n\n    // Subband coherence\n    for (i = 0; i + 3 < PART_LEN1; i += 4) {\n      const float32x4_t vec_sd = vld1q_f32(&coherence_state->sd[i]);\n      const float32x4_t vec_se = vld1q_f32(&coherence_state->se[i]);\n      const float32x4_t vec_sx = vld1q_f32(&coherence_state->sx[i]);\n      const float32x4_t vec_sdse = vmlaq_f32(vec_1eminus10, vec_sd, vec_se);\n      const float32x4_t vec_sdsx = vmlaq_f32(vec_1eminus10, vec_sd, vec_sx);\n      float32x4x2_t vec_sde = vld2q_f32(&coherence_state->sde[i][0]);\n      float32x4x2_t vec_sxd = vld2q_f32(&coherence_state->sxd[i][0]);\n      float32x4_t vec_cohde = vmulq_f32(vec_sde.val[0], vec_sde.val[0]);\n      float32x4_t vec_cohxd = vmulq_f32(vec_sxd.val[0], vec_sxd.val[0]);\n      vec_cohde = vmlaq_f32(vec_cohde, vec_sde.val[1], vec_sde.val[1]);\n      vec_cohde = vdivq_f32(vec_cohde, vec_sdse);\n      vec_cohxd = vmlaq_f32(vec_cohxd, vec_sxd.val[1], vec_sxd.val[1]);\n      vec_cohxd = vdivq_f32(vec_cohxd, vec_sdsx);\n\n      vst1q_f32(&cohde[i], vec_cohde);\n      vst1q_f32(&cohxd[i], vec_cohxd);\n    }\n  }\n  // scalar code for the remaining items.\n  for (; i < PART_LEN1; i++) {\n    cohde[i] = (coherence_state->sde[i][0] * coherence_state->sde[i][0] +\n                coherence_state->sde[i][1] * coherence_state->sde[i][1]) /\n               (coherence_state->sd[i] * coherence_state->se[i] + 1e-10f);\n    cohxd[i] = (coherence_state->sxd[i][0] * coherence_state->sxd[i][0] +\n                coherence_state->sxd[i][1] * coherence_state->sxd[i][1]) /\n               (coherence_state->sx[i] * coherence_state->sd[i] + 1e-10f);\n  }\n}\n\nvoid WebRtcAec_InitAec_neon(void) {\n  WebRtcAec_FilterFar = FilterFarNEON;\n  WebRtcAec_ScaleErrorSignal = ScaleErrorSignalNEON;\n  WebRtcAec_FilterAdaptation = FilterAdaptationNEON;\n  WebRtcAec_Overdrive = OverdriveNEON;\n  WebRtcAec_Suppress = SuppressNEON;\n  WebRtcAec_ComputeCoherence = ComputeCoherenceNEON;\n  WebRtcAec_UpdateCoherenceSpectra = UpdateCoherenceSpectraNEON;\n  WebRtcAec_StoreAsComplex = StoreAsComplexNEON;\n  WebRtcAec_PartitionDelay = PartitionDelayNEON;\n  WebRtcAec_WindowData = WindowDataNEON;\n}\n}  // namespace webrtc\n\n#endif\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h",
    "content": "/*\n *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_OPTIMIZED_METHODS_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_OPTIMIZED_METHODS_H_\n\n#include <memory>\n\n#include \"webrtc/modules/audio_processing/aec/aec_core.h\"\n#include \"webrtc/typedefs.h\"\n\nnamespace webrtc {\n\ntypedef void (*WebRtcAecFilterFar)(\n    int num_partitions,\n    int x_fft_buf_block_pos,\n    float x_fft_buf[2][kExtendedNumPartitions * PART_LEN1],\n    float h_fft_buf[2][kExtendedNumPartitions * PART_LEN1],\n    float y_fft[2][PART_LEN1]);\nextern WebRtcAecFilterFar WebRtcAec_FilterFar;\ntypedef void (*WebRtcAecScaleErrorSignal)(float mu,\n                                          float error_threshold,\n                                          float x_pow[PART_LEN1],\n                                          float ef[2][PART_LEN1]);\nextern WebRtcAecScaleErrorSignal WebRtcAec_ScaleErrorSignal;\ntypedef void (*WebRtcAecFilterAdaptation)(\n    const OouraFft& ooura_fft,\n    int num_partitions,\n    int x_fft_buf_block_pos,\n    float x_fft_buf[2][kExtendedNumPartitions * PART_LEN1],\n    float e_fft[2][PART_LEN1],\n    float h_fft_buf[2][kExtendedNumPartitions * PART_LEN1]);\nextern WebRtcAecFilterAdaptation WebRtcAec_FilterAdaptation;\n\ntypedef void (*WebRtcAecOverdrive)(float overdrive_scaling,\n                                   const float hNlFb,\n                                   float hNl[PART_LEN1]);\nextern WebRtcAecOverdrive WebRtcAec_Overdrive;\n\ntypedef void (*WebRtcAecSuppress)(const float hNl[PART_LEN1],\n                                  float efw[2][PART_LEN1]);\nextern WebRtcAecSuppress WebRtcAec_Suppress;\n\ntypedef void (*WebRtcAecComputeCoherence)(const CoherenceState* coherence_state,\n                                          float* cohde,\n                                          float* cohxd);\nextern WebRtcAecComputeCoherence WebRtcAec_ComputeCoherence;\n\ntypedef void (*WebRtcAecUpdateCoherenceSpectra)(int mult,\n                                                bool extended_filter_enabled,\n                                                float efw[2][PART_LEN1],\n                                                float dfw[2][PART_LEN1],\n                                                float xfw[2][PART_LEN1],\n                                                CoherenceState* coherence_state,\n                                                short* filter_divergence_state,\n                                                int* extreme_filter_divergence);\nextern WebRtcAecUpdateCoherenceSpectra WebRtcAec_UpdateCoherenceSpectra;\n\ntypedef int (*WebRtcAecPartitionDelay)(\n    int num_partitions,\n    float h_fft_buf[2][kExtendedNumPartitions * PART_LEN1]);\nextern WebRtcAecPartitionDelay WebRtcAec_PartitionDelay;\n\ntypedef void (*WebRtcAecStoreAsComplex)(const float* data,\n                                        float data_complex[2][PART_LEN1]);\nextern WebRtcAecStoreAsComplex WebRtcAec_StoreAsComplex;\n\ntypedef void (*WebRtcAecWindowData)(float* x_windowed, const float* x);\nextern WebRtcAecWindowData WebRtcAec_WindowData;\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_OPTIMIZED_METHODS_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aec/aec_core_sse2.cc",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/*\n * The core AEC algorithm, SSE2 version of speed-critical functions.\n */\n\nextern \"C\" {\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n}\n#include \"webrtc/modules/audio_processing/aec/aec_common.h\"\n#include \"webrtc/modules/audio_processing/aec/aec_core_optimized_methods.h\"\n#include \"webrtc/modules/audio_processing/utility/ooura_fft.h\"\n\n#if defined(WEBRTC_ARCH_X86_FAMILY)\n\n#include <emmintrin.h>\n#include <math.h>\n#include <string.h>  // memset\n\nnamespace webrtc {\n\n__inline static float MulRe(float aRe, float aIm, float bRe, float bIm) {\n  return aRe * bRe - aIm * bIm;\n}\n\n__inline static float MulIm(float aRe, float aIm, float bRe, float bIm) {\n  return aRe * bIm + aIm * bRe;\n}\n\nstatic void FilterFarSSE2(int num_partitions,\n                          int x_fft_buf_block_pos,\n                          float x_fft_buf[2]\n                                         [kExtendedNumPartitions * PART_LEN1],\n                          float h_fft_buf[2]\n                                         [kExtendedNumPartitions * PART_LEN1],\n                          float y_fft[2][PART_LEN1]) {\n  int i;\n  for (i = 0; i < num_partitions; i++) {\n    int j;\n    int xPos = (i + x_fft_buf_block_pos) * PART_LEN1;\n    int pos = i * PART_LEN1;\n    // Check for wrap\n    if (i + x_fft_buf_block_pos >= num_partitions) {\n      xPos -= num_partitions * (PART_LEN1);\n    }\n\n    // vectorized code (four at once)\n    for (j = 0; j + 3 < PART_LEN1; j += 4) {\n      const __m128 x_fft_buf_re = _mm_loadu_ps(&x_fft_buf[0][xPos + j]);\n      const __m128 x_fft_buf_im = _mm_loadu_ps(&x_fft_buf[1][xPos + j]);\n      const __m128 h_fft_buf_re = _mm_loadu_ps(&h_fft_buf[0][pos + j]);\n      const __m128 h_fft_buf_im = _mm_loadu_ps(&h_fft_buf[1][pos + j]);\n      const __m128 y_fft_re = _mm_loadu_ps(&y_fft[0][j]);\n      const __m128 y_fft_im = _mm_loadu_ps(&y_fft[1][j]);\n      const __m128 a = _mm_mul_ps(x_fft_buf_re, h_fft_buf_re);\n      const __m128 b = _mm_mul_ps(x_fft_buf_im, h_fft_buf_im);\n      const __m128 c = _mm_mul_ps(x_fft_buf_re, h_fft_buf_im);\n      const __m128 d = _mm_mul_ps(x_fft_buf_im, h_fft_buf_re);\n      const __m128 e = _mm_sub_ps(a, b);\n      const __m128 f = _mm_add_ps(c, d);\n      const __m128 g = _mm_add_ps(y_fft_re, e);\n      const __m128 h = _mm_add_ps(y_fft_im, f);\n      _mm_storeu_ps(&y_fft[0][j], g);\n      _mm_storeu_ps(&y_fft[1][j], h);\n    }\n    // scalar code for the remaining items.\n    for (; j < PART_LEN1; j++) {\n      y_fft[0][j] += MulRe(x_fft_buf[0][xPos + j], x_fft_buf[1][xPos + j],\n                           h_fft_buf[0][pos + j], h_fft_buf[1][pos + j]);\n      y_fft[1][j] += MulIm(x_fft_buf[0][xPos + j], x_fft_buf[1][xPos + j],\n                           h_fft_buf[0][pos + j], h_fft_buf[1][pos + j]);\n    }\n  }\n}\n\nstatic void ScaleErrorSignalSSE2(float mu,\n                                 float error_threshold,\n                                 float x_pow[PART_LEN1],\n                                 float ef[2][PART_LEN1]) {\n  const __m128 k1e_10f = _mm_set1_ps(1e-10f);\n  const __m128 kMu = _mm_set1_ps(mu);\n  const __m128 kThresh = _mm_set1_ps(error_threshold);\n\n  int i;\n  // vectorized code (four at once)\n  for (i = 0; i + 3 < PART_LEN1; i += 4) {\n    const __m128 x_pow_local = _mm_loadu_ps(&x_pow[i]);\n    const __m128 ef_re_base = _mm_loadu_ps(&ef[0][i]);\n    const __m128 ef_im_base = _mm_loadu_ps(&ef[1][i]);\n\n    const __m128 xPowPlus = _mm_add_ps(x_pow_local, k1e_10f);\n    __m128 ef_re = _mm_div_ps(ef_re_base, xPowPlus);\n    __m128 ef_im = _mm_div_ps(ef_im_base, xPowPlus);\n    const __m128 ef_re2 = _mm_mul_ps(ef_re, ef_re);\n    const __m128 ef_im2 = _mm_mul_ps(ef_im, ef_im);\n    const __m128 ef_sum2 = _mm_add_ps(ef_re2, ef_im2);\n    const __m128 absEf = _mm_sqrt_ps(ef_sum2);\n    const __m128 bigger = _mm_cmpgt_ps(absEf, kThresh);\n    __m128 absEfPlus = _mm_add_ps(absEf, k1e_10f);\n    const __m128 absEfInv = _mm_div_ps(kThresh, absEfPlus);\n    __m128 ef_re_if = _mm_mul_ps(ef_re, absEfInv);\n    __m128 ef_im_if = _mm_mul_ps(ef_im, absEfInv);\n    ef_re_if = _mm_and_ps(bigger, ef_re_if);\n    ef_im_if = _mm_and_ps(bigger, ef_im_if);\n    ef_re = _mm_andnot_ps(bigger, ef_re);\n    ef_im = _mm_andnot_ps(bigger, ef_im);\n    ef_re = _mm_or_ps(ef_re, ef_re_if);\n    ef_im = _mm_or_ps(ef_im, ef_im_if);\n    ef_re = _mm_mul_ps(ef_re, kMu);\n    ef_im = _mm_mul_ps(ef_im, kMu);\n\n    _mm_storeu_ps(&ef[0][i], ef_re);\n    _mm_storeu_ps(&ef[1][i], ef_im);\n  }\n  // scalar code for the remaining items.\n  {\n    for (; i < (PART_LEN1); i++) {\n      float abs_ef;\n      ef[0][i] /= (x_pow[i] + 1e-10f);\n      ef[1][i] /= (x_pow[i] + 1e-10f);\n      abs_ef = sqrtf(ef[0][i] * ef[0][i] + ef[1][i] * ef[1][i]);\n\n      if (abs_ef > error_threshold) {\n        abs_ef = error_threshold / (abs_ef + 1e-10f);\n        ef[0][i] *= abs_ef;\n        ef[1][i] *= abs_ef;\n      }\n\n      // Stepsize factor\n      ef[0][i] *= mu;\n      ef[1][i] *= mu;\n    }\n  }\n}\n\nstatic void FilterAdaptationSSE2(\n    const OouraFft& ooura_fft,\n    int num_partitions,\n    int x_fft_buf_block_pos,\n    float x_fft_buf[2][kExtendedNumPartitions * PART_LEN1],\n    float e_fft[2][PART_LEN1],\n    float h_fft_buf[2][kExtendedNumPartitions * PART_LEN1]) {\n  float fft[PART_LEN2];\n  int i, j;\n  for (i = 0; i < num_partitions; i++) {\n    int xPos = (i + x_fft_buf_block_pos) * (PART_LEN1);\n    int pos = i * PART_LEN1;\n    // Check for wrap\n    if (i + x_fft_buf_block_pos >= num_partitions) {\n      xPos -= num_partitions * PART_LEN1;\n    }\n\n    // Process the whole array...\n    for (j = 0; j < PART_LEN; j += 4) {\n      // Load x_fft_buf and e_fft.\n      const __m128 x_fft_buf_re = _mm_loadu_ps(&x_fft_buf[0][xPos + j]);\n      const __m128 x_fft_buf_im = _mm_loadu_ps(&x_fft_buf[1][xPos + j]);\n      const __m128 e_fft_re = _mm_loadu_ps(&e_fft[0][j]);\n      const __m128 e_fft_im = _mm_loadu_ps(&e_fft[1][j]);\n      // Calculate the product of conjugate(x_fft_buf) by e_fft.\n      //   re(conjugate(a) * b) = aRe * bRe + aIm * bIm\n      //   im(conjugate(a) * b)=  aRe * bIm - aIm * bRe\n      const __m128 a = _mm_mul_ps(x_fft_buf_re, e_fft_re);\n      const __m128 b = _mm_mul_ps(x_fft_buf_im, e_fft_im);\n      const __m128 c = _mm_mul_ps(x_fft_buf_re, e_fft_im);\n      const __m128 d = _mm_mul_ps(x_fft_buf_im, e_fft_re);\n      const __m128 e = _mm_add_ps(a, b);\n      const __m128 f = _mm_sub_ps(c, d);\n      // Interleave real and imaginary parts.\n      const __m128 g = _mm_unpacklo_ps(e, f);\n      const __m128 h = _mm_unpackhi_ps(e, f);\n      // Store\n      _mm_storeu_ps(&fft[2 * j + 0], g);\n      _mm_storeu_ps(&fft[2 * j + 4], h);\n    }\n    // ... and fixup the first imaginary entry.\n    fft[1] =\n        MulRe(x_fft_buf[0][xPos + PART_LEN], -x_fft_buf[1][xPos + PART_LEN],\n              e_fft[0][PART_LEN], e_fft[1][PART_LEN]);\n\n    ooura_fft.InverseFft(fft);\n    memset(fft + PART_LEN, 0, sizeof(float) * PART_LEN);\n\n    // fft scaling\n    {\n      float scale = 2.0f / PART_LEN2;\n      const __m128 scale_ps = _mm_load_ps1(&scale);\n      for (j = 0; j < PART_LEN; j += 4) {\n        const __m128 fft_ps = _mm_loadu_ps(&fft[j]);\n        const __m128 fft_scale = _mm_mul_ps(fft_ps, scale_ps);\n        _mm_storeu_ps(&fft[j], fft_scale);\n      }\n    }\n    ooura_fft.Fft(fft);\n\n    {\n      float wt1 = h_fft_buf[1][pos];\n      h_fft_buf[0][pos + PART_LEN] += fft[1];\n      for (j = 0; j < PART_LEN; j += 4) {\n        __m128 wtBuf_re = _mm_loadu_ps(&h_fft_buf[0][pos + j]);\n        __m128 wtBuf_im = _mm_loadu_ps(&h_fft_buf[1][pos + j]);\n        const __m128 fft0 = _mm_loadu_ps(&fft[2 * j + 0]);\n        const __m128 fft4 = _mm_loadu_ps(&fft[2 * j + 4]);\n        const __m128 fft_re =\n            _mm_shuffle_ps(fft0, fft4, _MM_SHUFFLE(2, 0, 2, 0));\n        const __m128 fft_im =\n            _mm_shuffle_ps(fft0, fft4, _MM_SHUFFLE(3, 1, 3, 1));\n        wtBuf_re = _mm_add_ps(wtBuf_re, fft_re);\n        wtBuf_im = _mm_add_ps(wtBuf_im, fft_im);\n        _mm_storeu_ps(&h_fft_buf[0][pos + j], wtBuf_re);\n        _mm_storeu_ps(&h_fft_buf[1][pos + j], wtBuf_im);\n      }\n      h_fft_buf[1][pos] = wt1;\n    }\n  }\n}\n\nstatic __m128 mm_pow_ps(__m128 a, __m128 b) {\n  // a^b = exp2(b * log2(a))\n  //   exp2(x) and log2(x) are calculated using polynomial approximations.\n  __m128 log2_a, b_log2_a, a_exp_b;\n\n  // Calculate log2(x), x = a.\n  {\n    // To calculate log2(x), we decompose x like this:\n    //   x = y * 2^n\n    //     n is an integer\n    //     y is in the [1.0, 2.0) range\n    //\n    //   log2(x) = log2(y) + n\n    //     n       can be evaluated by playing with float representation.\n    //     log2(y) in a small range can be approximated, this code uses an order\n    //             five polynomial approximation. The coefficients have been\n    //             estimated with the Remez algorithm and the resulting\n    //             polynomial has a maximum relative error of 0.00086%.\n\n    // Compute n.\n    //    This is done by masking the exponent, shifting it into the top bit of\n    //    the mantissa, putting eight into the biased exponent (to shift/\n    //    compensate the fact that the exponent has been shifted in the top/\n    //    fractional part and finally getting rid of the implicit leading one\n    //    from the mantissa by substracting it out.\n    static const ALIGN16_BEG int float_exponent_mask[4] ALIGN16_END = {\n        0x7F800000, 0x7F800000, 0x7F800000, 0x7F800000};\n    static const ALIGN16_BEG int eight_biased_exponent[4] ALIGN16_END = {\n        0x43800000, 0x43800000, 0x43800000, 0x43800000};\n    static const ALIGN16_BEG int implicit_leading_one[4] ALIGN16_END = {\n        0x43BF8000, 0x43BF8000, 0x43BF8000, 0x43BF8000};\n    static const int shift_exponent_into_top_mantissa = 8;\n    const __m128 two_n =\n        _mm_and_ps(a, *(reinterpret_cast<const __m128*>(float_exponent_mask)));\n    const __m128 n_1 = _mm_castsi128_ps(_mm_srli_epi32(\n        _mm_castps_si128(two_n), shift_exponent_into_top_mantissa));\n    const __m128 n_0 =\n      _mm_or_ps(n_1, *(reinterpret_cast<const __m128*>(eight_biased_exponent)));\n    const __m128 n =\n      _mm_sub_ps(n_0, *(reinterpret_cast<const __m128*>(implicit_leading_one)));\n\n    // Compute y.\n    static const ALIGN16_BEG int mantissa_mask[4] ALIGN16_END = {\n        0x007FFFFF, 0x007FFFFF, 0x007FFFFF, 0x007FFFFF};\n    static const ALIGN16_BEG int zero_biased_exponent_is_one[4] ALIGN16_END = {\n        0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000};\n    const __m128 mantissa =\n        _mm_and_ps(a, *(reinterpret_cast<const __m128*>(mantissa_mask)));\n    const __m128 y =\n        _mm_or_ps(mantissa,\n               *(reinterpret_cast<const __m128*>(zero_biased_exponent_is_one)));\n\n    // Approximate log2(y) ~= (y - 1) * pol5(y).\n    //    pol5(y) = C5 * y^5 + C4 * y^4 + C3 * y^3 + C2 * y^2 + C1 * y + C0\n    static const ALIGN16_BEG float ALIGN16_END C5[4] = {\n        -3.4436006e-2f, -3.4436006e-2f, -3.4436006e-2f, -3.4436006e-2f};\n    static const ALIGN16_BEG float ALIGN16_END C4[4] = {\n        3.1821337e-1f, 3.1821337e-1f, 3.1821337e-1f, 3.1821337e-1f};\n    static const ALIGN16_BEG float ALIGN16_END C3[4] = {\n        -1.2315303f, -1.2315303f, -1.2315303f, -1.2315303f};\n    static const ALIGN16_BEG float ALIGN16_END C2[4] = {2.5988452f, 2.5988452f,\n                                                        2.5988452f, 2.5988452f};\n    static const ALIGN16_BEG float ALIGN16_END C1[4] = {\n        -3.3241990f, -3.3241990f, -3.3241990f, -3.3241990f};\n    static const ALIGN16_BEG float ALIGN16_END C0[4] = {3.1157899f, 3.1157899f,\n                                                        3.1157899f, 3.1157899f};\n    const __m128 pol5_y_0 =\n        _mm_mul_ps(y, *(reinterpret_cast<const __m128*>(C5)));\n    const __m128 pol5_y_1 =\n        _mm_add_ps(pol5_y_0, *(reinterpret_cast<const __m128*>(C4)));\n    const __m128 pol5_y_2 = _mm_mul_ps(pol5_y_1, y);\n    const __m128 pol5_y_3 =\n        _mm_add_ps(pol5_y_2, *(reinterpret_cast<const __m128*>(C3)));\n    const __m128 pol5_y_4 = _mm_mul_ps(pol5_y_3, y);\n    const __m128 pol5_y_5 =\n        _mm_add_ps(pol5_y_4, *(reinterpret_cast<const __m128*>(C2)));\n    const __m128 pol5_y_6 = _mm_mul_ps(pol5_y_5, y);\n    const __m128 pol5_y_7 =\n        _mm_add_ps(pol5_y_6, *(reinterpret_cast<const __m128*>(C1)));\n    const __m128 pol5_y_8 = _mm_mul_ps(pol5_y_7, y);\n    const __m128 pol5_y =\n        _mm_add_ps(pol5_y_8, *(reinterpret_cast<const __m128*>(C0)));\n    const __m128 y_minus_one =\n        _mm_sub_ps(y,\n               *(reinterpret_cast<const __m128*>(zero_biased_exponent_is_one)));\n    const __m128 log2_y = _mm_mul_ps(y_minus_one, pol5_y);\n\n    // Combine parts.\n    log2_a = _mm_add_ps(n, log2_y);\n  }\n\n  // b * log2(a)\n  b_log2_a = _mm_mul_ps(b, log2_a);\n\n  // Calculate exp2(x), x = b * log2(a).\n  {\n    // To calculate 2^x, we decompose x like this:\n    //   x = n + y\n    //     n is an integer, the value of x - 0.5 rounded down, therefore\n    //     y is in the [0.5, 1.5) range\n    //\n    //   2^x = 2^n * 2^y\n    //     2^n can be evaluated by playing with float representation.\n    //     2^y in a small range can be approximated, this code uses an order two\n    //         polynomial approximation. The coefficients have been estimated\n    //         with the Remez algorithm and the resulting polynomial has a\n    //         maximum relative error of 0.17%.\n\n    // To avoid over/underflow, we reduce the range of input to ]-127, 129].\n    static const ALIGN16_BEG float max_input[4] ALIGN16_END = {129.f, 129.f,\n                                                               129.f, 129.f};\n    static const ALIGN16_BEG float min_input[4] ALIGN16_END = {\n        -126.99999f, -126.99999f, -126.99999f, -126.99999f};\n    const __m128 x_min =\n        _mm_min_ps(b_log2_a, *(reinterpret_cast<const __m128*>(max_input)));\n    const __m128 x_max =\n        _mm_max_ps(x_min, *(reinterpret_cast<const __m128*>(min_input)));\n    // Compute n.\n    static const ALIGN16_BEG float half[4] ALIGN16_END = {0.5f, 0.5f, 0.5f,\n                                                          0.5f};\n    const __m128 x_minus_half =\n        _mm_sub_ps(x_max, *(reinterpret_cast<const __m128*>(half)));\n    const __m128i x_minus_half_floor = _mm_cvtps_epi32(x_minus_half);\n    // Compute 2^n.\n    static const ALIGN16_BEG int float_exponent_bias[4] ALIGN16_END = {\n        127, 127, 127, 127};\n    static const int float_exponent_shift = 23;\n    const __m128i two_n_exponent =\n        _mm_add_epi32(x_minus_half_floor,\n                      *(reinterpret_cast<const __m128i*>(float_exponent_bias)));\n    const __m128 two_n =\n        _mm_castsi128_ps(_mm_slli_epi32(two_n_exponent, float_exponent_shift));\n    // Compute y.\n    const __m128 y = _mm_sub_ps(x_max, _mm_cvtepi32_ps(x_minus_half_floor));\n    // Approximate 2^y ~= C2 * y^2 + C1 * y + C0.\n    static const ALIGN16_BEG float C2[4] ALIGN16_END = {\n        3.3718944e-1f, 3.3718944e-1f, 3.3718944e-1f, 3.3718944e-1f};\n    static const ALIGN16_BEG float C1[4] ALIGN16_END = {\n        6.5763628e-1f, 6.5763628e-1f, 6.5763628e-1f, 6.5763628e-1f};\n    static const ALIGN16_BEG float C0[4] ALIGN16_END = {1.0017247f, 1.0017247f,\n                                                        1.0017247f, 1.0017247f};\n    const __m128 exp2_y_0 =\n        _mm_mul_ps(y, *(reinterpret_cast<const __m128*>(C2)));\n    const __m128 exp2_y_1 =\n        _mm_add_ps(exp2_y_0, *(reinterpret_cast<const __m128*>(C1)));\n    const __m128 exp2_y_2 = _mm_mul_ps(exp2_y_1, y);\n    const __m128 exp2_y =\n        _mm_add_ps(exp2_y_2, *(reinterpret_cast<const __m128*>(C0)));\n\n    // Combine parts.\n    a_exp_b = _mm_mul_ps(exp2_y, two_n);\n  }\n  return a_exp_b;\n}\n\nstatic void OverdriveSSE2(float overdrive_scaling,\n                          float hNlFb,\n                          float hNl[PART_LEN1]) {\n  int i;\n  const __m128 vec_hNlFb = _mm_set1_ps(hNlFb);\n  const __m128 vec_one = _mm_set1_ps(1.0f);\n  const __m128 vec_overdrive_scaling = _mm_set1_ps(overdrive_scaling);\n  // vectorized code (four at once)\n  for (i = 0; i + 3 < PART_LEN1; i += 4) {\n    // Weight subbands\n    __m128 vec_hNl = _mm_loadu_ps(&hNl[i]);\n    const __m128 vec_weightCurve = _mm_loadu_ps(&WebRtcAec_weightCurve[i]);\n    const __m128 bigger = _mm_cmpgt_ps(vec_hNl, vec_hNlFb);\n    const __m128 vec_weightCurve_hNlFb = _mm_mul_ps(vec_weightCurve, vec_hNlFb);\n    const __m128 vec_one_weightCurve = _mm_sub_ps(vec_one, vec_weightCurve);\n    const __m128 vec_one_weightCurve_hNl =\n        _mm_mul_ps(vec_one_weightCurve, vec_hNl);\n    const __m128 vec_if0 = _mm_andnot_ps(bigger, vec_hNl);\n    const __m128 vec_if1 = _mm_and_ps(\n        bigger, _mm_add_ps(vec_weightCurve_hNlFb, vec_one_weightCurve_hNl));\n    vec_hNl = _mm_or_ps(vec_if0, vec_if1);\n\n    const __m128 vec_overDriveCurve =\n        _mm_loadu_ps(&WebRtcAec_overDriveCurve[i]);\n    const __m128 vec_overDriveSm_overDriveCurve =\n        _mm_mul_ps(vec_overdrive_scaling, vec_overDriveCurve);\n    vec_hNl = mm_pow_ps(vec_hNl, vec_overDriveSm_overDriveCurve);\n    _mm_storeu_ps(&hNl[i], vec_hNl);\n  }\n  // scalar code for the remaining items.\n  for (; i < PART_LEN1; i++) {\n    // Weight subbands\n    if (hNl[i] > hNlFb) {\n      hNl[i] = WebRtcAec_weightCurve[i] * hNlFb +\n               (1 - WebRtcAec_weightCurve[i]) * hNl[i];\n    }\n    hNl[i] = powf(hNl[i], overdrive_scaling * WebRtcAec_overDriveCurve[i]);\n  }\n}\n\nstatic void SuppressSSE2(const float hNl[PART_LEN1], float efw[2][PART_LEN1]) {\n  int i;\n  const __m128 vec_minus_one = _mm_set1_ps(-1.0f);\n  // vectorized code (four at once)\n  for (i = 0; i + 3 < PART_LEN1; i += 4) {\n    // Suppress error signal\n    __m128 vec_hNl = _mm_loadu_ps(&hNl[i]);\n    __m128 vec_efw_re = _mm_loadu_ps(&efw[0][i]);\n    __m128 vec_efw_im = _mm_loadu_ps(&efw[1][i]);\n    vec_efw_re = _mm_mul_ps(vec_efw_re, vec_hNl);\n    vec_efw_im = _mm_mul_ps(vec_efw_im, vec_hNl);\n\n    // Ooura fft returns incorrect sign on imaginary component. It matters\n    // here because we are making an additive change with comfort noise.\n    vec_efw_im = _mm_mul_ps(vec_efw_im, vec_minus_one);\n    _mm_storeu_ps(&efw[0][i], vec_efw_re);\n    _mm_storeu_ps(&efw[1][i], vec_efw_im);\n  }\n  // scalar code for the remaining items.\n  for (; i < PART_LEN1; i++) {\n    // Suppress error signal\n    efw[0][i] *= hNl[i];\n    efw[1][i] *= hNl[i];\n\n    // Ooura fft returns incorrect sign on imaginary component. It matters\n    // here because we are making an additive change with comfort noise.\n    efw[1][i] *= -1;\n  }\n}\n\n__inline static void _mm_add_ps_4x1(__m128 sum, float* dst) {\n  // A+B C+D\n  sum = _mm_add_ps(sum, _mm_shuffle_ps(sum, sum, _MM_SHUFFLE(0, 0, 3, 2)));\n  // A+B+C+D A+B+C+D\n  sum = _mm_add_ps(sum, _mm_shuffle_ps(sum, sum, _MM_SHUFFLE(1, 1, 1, 1)));\n  _mm_store_ss(dst, sum);\n}\n\nstatic int PartitionDelaySSE2(\n    int num_partitions,\n    float h_fft_buf[2][kExtendedNumPartitions * PART_LEN1]) {\n  // Measures the energy in each filter partition and returns the partition with\n  // highest energy.\n  // TODO(bjornv): Spread computational cost by computing one partition per\n  // block?\n  float wfEnMax = 0;\n  int i;\n  int delay = 0;\n\n  for (i = 0; i < num_partitions; i++) {\n    int j;\n    int pos = i * PART_LEN1;\n    float wfEn = 0;\n    __m128 vec_wfEn = _mm_set1_ps(0.0f);\n    // vectorized code (four at once)\n    for (j = 0; j + 3 < PART_LEN1; j += 4) {\n      const __m128 vec_wfBuf0 = _mm_loadu_ps(&h_fft_buf[0][pos + j]);\n      const __m128 vec_wfBuf1 = _mm_loadu_ps(&h_fft_buf[1][pos + j]);\n      vec_wfEn = _mm_add_ps(vec_wfEn, _mm_mul_ps(vec_wfBuf0, vec_wfBuf0));\n      vec_wfEn = _mm_add_ps(vec_wfEn, _mm_mul_ps(vec_wfBuf1, vec_wfBuf1));\n    }\n    _mm_add_ps_4x1(vec_wfEn, &wfEn);\n\n    // scalar code for the remaining items.\n    for (; j < PART_LEN1; j++) {\n      wfEn += h_fft_buf[0][pos + j] * h_fft_buf[0][pos + j] +\n              h_fft_buf[1][pos + j] * h_fft_buf[1][pos + j];\n    }\n\n    if (wfEn > wfEnMax) {\n      wfEnMax = wfEn;\n      delay = i;\n    }\n  }\n  return delay;\n}\n\n// Updates the following smoothed  Power Spectral Densities (PSD):\n//  - sd  : near-end\n//  - se  : residual echo\n//  - sx  : far-end\n//  - sde : cross-PSD of near-end and residual echo\n//  - sxd : cross-PSD of near-end and far-end\n//\n// In addition to updating the PSDs, also the filter diverge state is determined\n// upon actions are taken.\nstatic void UpdateCoherenceSpectraSSE2(int mult,\n                                       bool extended_filter_enabled,\n                                       float efw[2][PART_LEN1],\n                                       float dfw[2][PART_LEN1],\n                                       float xfw[2][PART_LEN1],\n                                       CoherenceState* coherence_state,\n                                       short* filter_divergence_state,\n                                       int* extreme_filter_divergence) {\n  // Power estimate smoothing coefficients.\n  const float* ptrGCoh =\n      extended_filter_enabled\n          ? WebRtcAec_kExtendedSmoothingCoefficients[mult - 1]\n          : WebRtcAec_kNormalSmoothingCoefficients[mult - 1];\n  int i;\n  float sdSum = 0, seSum = 0;\n  const __m128 vec_15 = _mm_set1_ps(WebRtcAec_kMinFarendPSD);\n  const __m128 vec_GCoh0 = _mm_set1_ps(ptrGCoh[0]);\n  const __m128 vec_GCoh1 = _mm_set1_ps(ptrGCoh[1]);\n  __m128 vec_sdSum = _mm_set1_ps(0.0f);\n  __m128 vec_seSum = _mm_set1_ps(0.0f);\n\n  for (i = 0; i + 3 < PART_LEN1; i += 4) {\n    const __m128 vec_dfw0 = _mm_loadu_ps(&dfw[0][i]);\n    const __m128 vec_dfw1 = _mm_loadu_ps(&dfw[1][i]);\n    const __m128 vec_efw0 = _mm_loadu_ps(&efw[0][i]);\n    const __m128 vec_efw1 = _mm_loadu_ps(&efw[1][i]);\n    const __m128 vec_xfw0 = _mm_loadu_ps(&xfw[0][i]);\n    const __m128 vec_xfw1 = _mm_loadu_ps(&xfw[1][i]);\n    __m128 vec_sd =\n        _mm_mul_ps(_mm_loadu_ps(&coherence_state->sd[i]), vec_GCoh0);\n    __m128 vec_se =\n        _mm_mul_ps(_mm_loadu_ps(&coherence_state->se[i]), vec_GCoh0);\n    __m128 vec_sx =\n        _mm_mul_ps(_mm_loadu_ps(&coherence_state->sx[i]), vec_GCoh0);\n    __m128 vec_dfw_sumsq = _mm_mul_ps(vec_dfw0, vec_dfw0);\n    __m128 vec_efw_sumsq = _mm_mul_ps(vec_efw0, vec_efw0);\n    __m128 vec_xfw_sumsq = _mm_mul_ps(vec_xfw0, vec_xfw0);\n    vec_dfw_sumsq = _mm_add_ps(vec_dfw_sumsq, _mm_mul_ps(vec_dfw1, vec_dfw1));\n    vec_efw_sumsq = _mm_add_ps(vec_efw_sumsq, _mm_mul_ps(vec_efw1, vec_efw1));\n    vec_xfw_sumsq = _mm_add_ps(vec_xfw_sumsq, _mm_mul_ps(vec_xfw1, vec_xfw1));\n    vec_xfw_sumsq = _mm_max_ps(vec_xfw_sumsq, vec_15);\n    vec_sd = _mm_add_ps(vec_sd, _mm_mul_ps(vec_dfw_sumsq, vec_GCoh1));\n    vec_se = _mm_add_ps(vec_se, _mm_mul_ps(vec_efw_sumsq, vec_GCoh1));\n    vec_sx = _mm_add_ps(vec_sx, _mm_mul_ps(vec_xfw_sumsq, vec_GCoh1));\n    _mm_storeu_ps(&coherence_state->sd[i], vec_sd);\n    _mm_storeu_ps(&coherence_state->se[i], vec_se);\n    _mm_storeu_ps(&coherence_state->sx[i], vec_sx);\n\n    {\n      const __m128 vec_3210 = _mm_loadu_ps(&coherence_state->sde[i][0]);\n      const __m128 vec_7654 = _mm_loadu_ps(&coherence_state->sde[i + 2][0]);\n      __m128 vec_a =\n          _mm_shuffle_ps(vec_3210, vec_7654, _MM_SHUFFLE(2, 0, 2, 0));\n      __m128 vec_b =\n          _mm_shuffle_ps(vec_3210, vec_7654, _MM_SHUFFLE(3, 1, 3, 1));\n      __m128 vec_dfwefw0011 = _mm_mul_ps(vec_dfw0, vec_efw0);\n      __m128 vec_dfwefw0110 = _mm_mul_ps(vec_dfw0, vec_efw1);\n      vec_a = _mm_mul_ps(vec_a, vec_GCoh0);\n      vec_b = _mm_mul_ps(vec_b, vec_GCoh0);\n      vec_dfwefw0011 =\n          _mm_add_ps(vec_dfwefw0011, _mm_mul_ps(vec_dfw1, vec_efw1));\n      vec_dfwefw0110 =\n          _mm_sub_ps(vec_dfwefw0110, _mm_mul_ps(vec_dfw1, vec_efw0));\n      vec_a = _mm_add_ps(vec_a, _mm_mul_ps(vec_dfwefw0011, vec_GCoh1));\n      vec_b = _mm_add_ps(vec_b, _mm_mul_ps(vec_dfwefw0110, vec_GCoh1));\n      _mm_storeu_ps(&coherence_state->sde[i][0], _mm_unpacklo_ps(vec_a, vec_b));\n      _mm_storeu_ps(&coherence_state->sde[i + 2][0],\n                    _mm_unpackhi_ps(vec_a, vec_b));\n    }\n\n    {\n      const __m128 vec_3210 = _mm_loadu_ps(&coherence_state->sxd[i][0]);\n      const __m128 vec_7654 = _mm_loadu_ps(&coherence_state->sxd[i + 2][0]);\n      __m128 vec_a =\n          _mm_shuffle_ps(vec_3210, vec_7654, _MM_SHUFFLE(2, 0, 2, 0));\n      __m128 vec_b =\n          _mm_shuffle_ps(vec_3210, vec_7654, _MM_SHUFFLE(3, 1, 3, 1));\n      __m128 vec_dfwxfw0011 = _mm_mul_ps(vec_dfw0, vec_xfw0);\n      __m128 vec_dfwxfw0110 = _mm_mul_ps(vec_dfw0, vec_xfw1);\n      vec_a = _mm_mul_ps(vec_a, vec_GCoh0);\n      vec_b = _mm_mul_ps(vec_b, vec_GCoh0);\n      vec_dfwxfw0011 =\n          _mm_add_ps(vec_dfwxfw0011, _mm_mul_ps(vec_dfw1, vec_xfw1));\n      vec_dfwxfw0110 =\n          _mm_sub_ps(vec_dfwxfw0110, _mm_mul_ps(vec_dfw1, vec_xfw0));\n      vec_a = _mm_add_ps(vec_a, _mm_mul_ps(vec_dfwxfw0011, vec_GCoh1));\n      vec_b = _mm_add_ps(vec_b, _mm_mul_ps(vec_dfwxfw0110, vec_GCoh1));\n      _mm_storeu_ps(&coherence_state->sxd[i][0], _mm_unpacklo_ps(vec_a, vec_b));\n      _mm_storeu_ps(&coherence_state->sxd[i + 2][0],\n                    _mm_unpackhi_ps(vec_a, vec_b));\n    }\n\n    vec_sdSum = _mm_add_ps(vec_sdSum, vec_sd);\n    vec_seSum = _mm_add_ps(vec_seSum, vec_se);\n  }\n\n  _mm_add_ps_4x1(vec_sdSum, &sdSum);\n  _mm_add_ps_4x1(vec_seSum, &seSum);\n\n  for (; i < PART_LEN1; i++) {\n    coherence_state->sd[i] =\n        ptrGCoh[0] * coherence_state->sd[i] +\n        ptrGCoh[1] * (dfw[0][i] * dfw[0][i] + dfw[1][i] * dfw[1][i]);\n    coherence_state->se[i] =\n        ptrGCoh[0] * coherence_state->se[i] +\n        ptrGCoh[1] * (efw[0][i] * efw[0][i] + efw[1][i] * efw[1][i]);\n    // We threshold here to protect against the ill-effects of a zero farend.\n    // The threshold is not arbitrarily chosen, but balances protection and\n    // adverse interaction with the algorithm's tuning.\n    // TODO(bjornv): investigate further why this is so sensitive.\n    coherence_state->sx[i] =\n        ptrGCoh[0] * coherence_state->sx[i] +\n        ptrGCoh[1] *\n            WEBRTC_SPL_MAX(xfw[0][i] * xfw[0][i] + xfw[1][i] * xfw[1][i],\n                           WebRtcAec_kMinFarendPSD);\n\n    coherence_state->sde[i][0] =\n        ptrGCoh[0] * coherence_state->sde[i][0] +\n        ptrGCoh[1] * (dfw[0][i] * efw[0][i] + dfw[1][i] * efw[1][i]);\n    coherence_state->sde[i][1] =\n        ptrGCoh[0] * coherence_state->sde[i][1] +\n        ptrGCoh[1] * (dfw[0][i] * efw[1][i] - dfw[1][i] * efw[0][i]);\n\n    coherence_state->sxd[i][0] =\n        ptrGCoh[0] * coherence_state->sxd[i][0] +\n        ptrGCoh[1] * (dfw[0][i] * xfw[0][i] + dfw[1][i] * xfw[1][i]);\n    coherence_state->sxd[i][1] =\n        ptrGCoh[0] * coherence_state->sxd[i][1] +\n        ptrGCoh[1] * (dfw[0][i] * xfw[1][i] - dfw[1][i] * xfw[0][i]);\n\n    sdSum += coherence_state->sd[i];\n    seSum += coherence_state->se[i];\n  }\n\n  // Divergent filter safeguard update.\n  *filter_divergence_state =\n      (*filter_divergence_state ? 1.05f : 1.0f) * seSum > sdSum;\n\n  // Signal extreme filter divergence if the error is significantly larger\n  // than the nearend (13 dB).\n  *extreme_filter_divergence = (seSum > (19.95f * sdSum));\n}\n\n// Window time domain data to be used by the fft.\nstatic void WindowDataSSE2(float* x_windowed, const float* x) {\n  int i;\n  for (i = 0; i < PART_LEN; i += 4) {\n    const __m128 vec_Buf1 = _mm_loadu_ps(&x[i]);\n    const __m128 vec_Buf2 = _mm_loadu_ps(&x[PART_LEN + i]);\n    const __m128 vec_sqrtHanning = _mm_load_ps(&WebRtcAec_sqrtHanning[i]);\n    // A B C D\n    __m128 vec_sqrtHanning_rev =\n        _mm_loadu_ps(&WebRtcAec_sqrtHanning[PART_LEN - i - 3]);\n    // D C B A\n    vec_sqrtHanning_rev = _mm_shuffle_ps(\n        vec_sqrtHanning_rev, vec_sqrtHanning_rev, _MM_SHUFFLE(0, 1, 2, 3));\n    _mm_storeu_ps(&x_windowed[i], _mm_mul_ps(vec_Buf1, vec_sqrtHanning));\n    _mm_storeu_ps(&x_windowed[PART_LEN + i],\n                  _mm_mul_ps(vec_Buf2, vec_sqrtHanning_rev));\n  }\n}\n\n// Puts fft output data into a complex valued array.\nstatic void StoreAsComplexSSE2(const float* data,\n                               float data_complex[2][PART_LEN1]) {\n  int i;\n  for (i = 0; i < PART_LEN; i += 4) {\n    const __m128 vec_fft0 = _mm_loadu_ps(&data[2 * i]);\n    const __m128 vec_fft4 = _mm_loadu_ps(&data[2 * i + 4]);\n    const __m128 vec_a =\n        _mm_shuffle_ps(vec_fft0, vec_fft4, _MM_SHUFFLE(2, 0, 2, 0));\n    const __m128 vec_b =\n        _mm_shuffle_ps(vec_fft0, vec_fft4, _MM_SHUFFLE(3, 1, 3, 1));\n    _mm_storeu_ps(&data_complex[0][i], vec_a);\n    _mm_storeu_ps(&data_complex[1][i], vec_b);\n  }\n  // fix beginning/end values\n  data_complex[1][0] = 0;\n  data_complex[1][PART_LEN] = 0;\n  data_complex[0][0] = data[0];\n  data_complex[0][PART_LEN] = data[1];\n}\n\nstatic void ComputeCoherenceSSE2(const CoherenceState* coherence_state,\n                                 float* cohde,\n                                 float* cohxd) {\n  int i;\n\n  {\n    const __m128 vec_1eminus10 = _mm_set1_ps(1e-10f);\n\n    // Subband coherence\n    for (i = 0; i + 3 < PART_LEN1; i += 4) {\n      const __m128 vec_sd = _mm_loadu_ps(&coherence_state->sd[i]);\n      const __m128 vec_se = _mm_loadu_ps(&coherence_state->se[i]);\n      const __m128 vec_sx = _mm_loadu_ps(&coherence_state->sx[i]);\n      const __m128 vec_sdse =\n          _mm_add_ps(vec_1eminus10, _mm_mul_ps(vec_sd, vec_se));\n      const __m128 vec_sdsx =\n          _mm_add_ps(vec_1eminus10, _mm_mul_ps(vec_sd, vec_sx));\n      const __m128 vec_sde_3210 = _mm_loadu_ps(&coherence_state->sde[i][0]);\n      const __m128 vec_sde_7654 = _mm_loadu_ps(&coherence_state->sde[i + 2][0]);\n      const __m128 vec_sxd_3210 = _mm_loadu_ps(&coherence_state->sxd[i][0]);\n      const __m128 vec_sxd_7654 = _mm_loadu_ps(&coherence_state->sxd[i + 2][0]);\n      const __m128 vec_sde_0 =\n          _mm_shuffle_ps(vec_sde_3210, vec_sde_7654, _MM_SHUFFLE(2, 0, 2, 0));\n      const __m128 vec_sde_1 =\n          _mm_shuffle_ps(vec_sde_3210, vec_sde_7654, _MM_SHUFFLE(3, 1, 3, 1));\n      const __m128 vec_sxd_0 =\n          _mm_shuffle_ps(vec_sxd_3210, vec_sxd_7654, _MM_SHUFFLE(2, 0, 2, 0));\n      const __m128 vec_sxd_1 =\n          _mm_shuffle_ps(vec_sxd_3210, vec_sxd_7654, _MM_SHUFFLE(3, 1, 3, 1));\n      __m128 vec_cohde = _mm_mul_ps(vec_sde_0, vec_sde_0);\n      __m128 vec_cohxd = _mm_mul_ps(vec_sxd_0, vec_sxd_0);\n      vec_cohde = _mm_add_ps(vec_cohde, _mm_mul_ps(vec_sde_1, vec_sde_1));\n      vec_cohde = _mm_div_ps(vec_cohde, vec_sdse);\n      vec_cohxd = _mm_add_ps(vec_cohxd, _mm_mul_ps(vec_sxd_1, vec_sxd_1));\n      vec_cohxd = _mm_div_ps(vec_cohxd, vec_sdsx);\n      _mm_storeu_ps(&cohde[i], vec_cohde);\n      _mm_storeu_ps(&cohxd[i], vec_cohxd);\n    }\n\n    // scalar code for the remaining items.\n    for (; i < PART_LEN1; i++) {\n      cohde[i] = (coherence_state->sde[i][0] * coherence_state->sde[i][0] +\n                  coherence_state->sde[i][1] * coherence_state->sde[i][1]) /\n                 (coherence_state->sd[i] * coherence_state->se[i] + 1e-10f);\n      cohxd[i] = (coherence_state->sxd[i][0] * coherence_state->sxd[i][0] +\n                  coherence_state->sxd[i][1] * coherence_state->sxd[i][1]) /\n                 (coherence_state->sx[i] * coherence_state->sd[i] + 1e-10f);\n    }\n  }\n}\n\nvoid WebRtcAec_InitAec_SSE2(void) {\n  WebRtcAec_FilterFar = FilterFarSSE2;\n  WebRtcAec_ScaleErrorSignal = ScaleErrorSignalSSE2;\n  WebRtcAec_FilterAdaptation = FilterAdaptationSSE2;\n  WebRtcAec_Overdrive = OverdriveSSE2;\n  WebRtcAec_Suppress = SuppressSSE2;\n  WebRtcAec_ComputeCoherence = ComputeCoherenceSSE2;\n  WebRtcAec_UpdateCoherenceSpectra = UpdateCoherenceSpectraSSE2;\n  WebRtcAec_StoreAsComplex = StoreAsComplexSSE2;\n  WebRtcAec_PartitionDelay = PartitionDelaySSE2;\n  WebRtcAec_WindowData = WindowDataSSE2;\n}\n}  // namespace webrtc\n#endif\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aec/aec_resampler.cc",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/* Resamples a signal to an arbitrary rate. Used by the AEC to compensate for\n * clock skew by resampling the farend signal.\n */\n\n#include \"webrtc/modules/audio_processing/aec/aec_resampler.h\"\n\n#include <math.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/modules/audio_processing/aec/aec_core.h\"\n\nnamespace webrtc {\n\nenum { kEstimateLengthFrames = 400 };\n\ntypedef struct {\n  float buffer[kResamplerBufferSize];\n  float position;\n\n  int deviceSampleRateHz;\n  int skewData[kEstimateLengthFrames];\n  int skewDataIndex;\n  float skewEstimate;\n} AecResampler;\n\nstatic int EstimateSkew(const int* rawSkew,\n                        int size,\n                        int absLimit,\n                        float* skewEst);\n\nvoid* WebRtcAec_CreateResampler() {\n  return malloc(sizeof(AecResampler));\n}\n\nint WebRtcAec_InitResampler(void* resampInst, int deviceSampleRateHz) {\n  AecResampler* obj = static_cast<AecResampler*>(resampInst);\n  memset(obj->buffer, 0, sizeof(obj->buffer));\n  obj->position = 0.0;\n\n  obj->deviceSampleRateHz = deviceSampleRateHz;\n  memset(obj->skewData, 0, sizeof(obj->skewData));\n  obj->skewDataIndex = 0;\n  obj->skewEstimate = 0.0;\n\n  return 0;\n}\n\nvoid WebRtcAec_FreeResampler(void* resampInst) {\n  AecResampler* obj = static_cast<AecResampler*>(resampInst);\n  free(obj);\n}\n\nvoid WebRtcAec_ResampleLinear(void* resampInst,\n                              const float* inspeech,\n                              size_t size,\n                              float skew,\n                              float* outspeech,\n                              size_t* size_out) {\n  AecResampler* obj = static_cast<AecResampler*>(resampInst);\n\n  float* y;\n  float be, tnew;\n  size_t tn, mm;\n\n  RTC_DCHECK_LE(size, 2 * FRAME_LEN);\n  RTC_DCHECK(resampInst);\n  RTC_DCHECK(inspeech);\n  RTC_DCHECK(outspeech);\n  RTC_DCHECK(size_out);\n\n  // Add new frame data in lookahead\n  memcpy(&obj->buffer[FRAME_LEN + kResamplingDelay], inspeech,\n         size * sizeof(inspeech[0]));\n\n  // Sample rate ratio\n  be = 1 + skew;\n\n  // Loop over input frame\n  mm = 0;\n  y = &obj->buffer[FRAME_LEN];  // Point at current frame\n\n  tnew = be * mm + obj->position;\n  tn = (size_t)tnew;\n\n  while (tn < size) {\n    // Interpolation\n    outspeech[mm] = y[tn] + (tnew - tn) * (y[tn + 1] - y[tn]);\n    mm++;\n\n    tnew = be * mm + obj->position;\n    tn = static_cast<int>(tnew);\n  }\n\n  *size_out = mm;\n  obj->position += (*size_out) * be - size;\n\n  // Shift buffer\n  memmove(obj->buffer, &obj->buffer[size],\n          (kResamplerBufferSize - size) * sizeof(obj->buffer[0]));\n}\n\nint WebRtcAec_GetSkew(void* resampInst, int rawSkew, float* skewEst) {\n  AecResampler* obj = static_cast<AecResampler*>(resampInst);\n  int err = 0;\n\n  if (obj->skewDataIndex < kEstimateLengthFrames) {\n    obj->skewData[obj->skewDataIndex] = rawSkew;\n    obj->skewDataIndex++;\n  } else if (obj->skewDataIndex == kEstimateLengthFrames) {\n    err = EstimateSkew(obj->skewData, kEstimateLengthFrames,\n                       obj->deviceSampleRateHz, skewEst);\n    obj->skewEstimate = *skewEst;\n    obj->skewDataIndex++;\n  } else {\n    *skewEst = obj->skewEstimate;\n  }\n\n  return err;\n}\n\nint EstimateSkew(const int* rawSkew,\n                 int size,\n                 int deviceSampleRateHz,\n                 float* skewEst) {\n  const int absLimitOuter = static_cast<int>(0.04f * deviceSampleRateHz);\n  const int absLimitInner = static_cast<int>(0.0025f * deviceSampleRateHz);\n  int i = 0;\n  int n = 0;\n  float rawAvg = 0;\n  float err = 0;\n  float rawAbsDev = 0;\n  int upperLimit = 0;\n  int lowerLimit = 0;\n  float cumSum = 0;\n  float x = 0;\n  float x2 = 0;\n  float y = 0;\n  float xy = 0;\n  float xAvg = 0;\n  float denom = 0;\n  float skew = 0;\n\n  *skewEst = 0;  // Set in case of error below.\n  for (i = 0; i < size; i++) {\n    if ((rawSkew[i] < absLimitOuter && rawSkew[i] > -absLimitOuter)) {\n      n++;\n      rawAvg += rawSkew[i];\n    }\n  }\n\n  if (n == 0) {\n    return -1;\n  }\n  RTC_DCHECK_GT(n, 0);\n  rawAvg /= n;\n\n  for (i = 0; i < size; i++) {\n    if ((rawSkew[i] < absLimitOuter && rawSkew[i] > -absLimitOuter)) {\n      err = rawSkew[i] - rawAvg;\n      rawAbsDev += err >= 0 ? err : -err;\n    }\n  }\n  RTC_DCHECK_GT(n, 0);\n  rawAbsDev /= n;\n  upperLimit = static_cast<int>(rawAvg + 5 * rawAbsDev + 1);  // +1 for ceiling.\n  lowerLimit = static_cast<int>(rawAvg - 5 * rawAbsDev - 1);  // -1 for floor.\n\n  n = 0;\n  for (i = 0; i < size; i++) {\n    if ((rawSkew[i] < absLimitInner && rawSkew[i] > -absLimitInner) ||\n        (rawSkew[i] < upperLimit && rawSkew[i] > lowerLimit)) {\n      n++;\n      cumSum += rawSkew[i];\n      x += n;\n      x2 += n * n;\n      y += cumSum;\n      xy += n * cumSum;\n    }\n  }\n\n  if (n == 0) {\n    return -1;\n  }\n  RTC_DCHECK_GT(n, 0);\n  xAvg = x / n;\n  denom = x2 - xAvg * x;\n\n  if (denom != 0) {\n    skew = (xy - xAvg * y) / denom;\n  }\n\n  *skewEst = skew;\n  return 0;\n}\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aec/aec_resampler.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_RESAMPLER_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_RESAMPLER_H_\n\n#include \"webrtc/modules/audio_processing/aec/aec_core.h\"\n\nnamespace webrtc {\n\nenum { kResamplingDelay = 1 };\nenum { kResamplerBufferSize = FRAME_LEN * 4 };\n\n// Unless otherwise specified, functions return 0 on success and -1 on error.\nvoid* WebRtcAec_CreateResampler();  // Returns NULL on error.\nint WebRtcAec_InitResampler(void* resampInst, int deviceSampleRateHz);\nvoid WebRtcAec_FreeResampler(void* resampInst);\n\n// Estimates skew from raw measurement.\nint WebRtcAec_GetSkew(void* resampInst, int rawSkew, float* skewEst);\n\n// Resamples input using linear interpolation.\nvoid WebRtcAec_ResampleLinear(void* resampInst,\n                              const float* inspeech,\n                              size_t size,\n                              float skew,\n                              float* outspeech,\n                              size_t* size_out);\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_RESAMPLER_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aec/echo_cancellation.cc",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/*\n * Contains the API functions for the AEC.\n */\n#include \"webrtc/modules/audio_processing/aec/echo_cancellation.h\"\n\n#include <math.h>\n#include <stdlib.h>\n#include <string.h>\n\nextern \"C\" {\n#include \"webrtc/common_audio/ring_buffer.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n}\n#include \"webrtc/modules/audio_processing/aec/aec_core.h\"\n#include \"webrtc/modules/audio_processing/aec/aec_resampler.h\"\n#include \"webrtc/modules/audio_processing/logging/apm_data_dumper.h\"\n#include \"webrtc/typedefs.h\"\n\nnamespace webrtc {\n\nAec::Aec() = default;\nAec::~Aec() = default;\n\n// Measured delays [ms]\n// Device                Chrome  GTP\n// MacBook Air           10\n// MacBook Retina        10      100\n// MacPro                30?\n//\n// Win7 Desktop          70      80?\n// Win7 T430s            110\n// Win8 T420s            70\n//\n// Daisy                 50\n// Pixel (w/ preproc?)           240\n// Pixel (w/o preproc?)  110     110\n\n// The extended filter mode gives us the flexibility to ignore the system's\n// reported delays. We do this for platforms which we believe provide results\n// which are incompatible with the AEC's expectations. Based on measurements\n// (some provided above) we set a conservative (i.e. lower than measured)\n// fixed delay.\n//\n// WEBRTC_UNTRUSTED_DELAY will only have an impact when |extended_filter_mode|\n// is enabled. See the note along with |DelayCorrection| in\n// echo_cancellation_impl.h for more details on the mode.\n//\n// Justification:\n// Chromium/Mac: Here, the true latency is so low (~10-20 ms), that it plays\n// havoc with the AEC's buffering. To avoid this, we set a fixed delay of 20 ms\n// and then compensate by rewinding by 10 ms (in wideband) through\n// kDelayDiffOffsetSamples. This trick does not seem to work for larger rewind\n// values, but fortunately this is sufficient.\n//\n// Chromium/Linux(ChromeOS): The values we get on this platform don't correspond\n// well to reality. The variance doesn't match the AEC's buffer changes, and the\n// bulk values tend to be too low. However, the range across different hardware\n// appears to be too large to choose a single value.\n//\n// GTP/Linux(ChromeOS): TBD, but for the moment we will trust the values.\n#if defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_MAC)\n#define WEBRTC_UNTRUSTED_DELAY\n#endif\n\n#if defined(WEBRTC_UNTRUSTED_DELAY) && defined(WEBRTC_MAC)\nstatic const int kDelayDiffOffsetSamples = -160;\n#else\n// Not enabled for now.\nstatic const int kDelayDiffOffsetSamples = 0;\n#endif\n\n#if defined(WEBRTC_MAC)\nstatic const int kFixedDelayMs = 20;\n#else\nstatic const int kFixedDelayMs = 50;\n#endif\n#if !defined(WEBRTC_UNTRUSTED_DELAY)\nstatic const int kMinTrustedDelayMs = 20;\n#endif\nstatic const int kMaxTrustedDelayMs = 500;\n\n// Maximum length of resampled signal. Must be an integer multiple of frames\n// (ceil(1/(1 + MIN_SKEW)*2) + 1)*FRAME_LEN\n// The factor of 2 handles wb, and the + 1 is as a safety margin\n// TODO(bjornv): Replace with kResamplerBufferSize\n#define MAX_RESAMP_LEN (5 * FRAME_LEN)\n\nstatic const int kMaxBufSizeStart = 62;  // In partitions\nstatic const int sampMsNb = 8;           // samples per ms in nb\nstatic const int initCheck = 42;\n\nint Aec::instance_count = 0;\n\n// Estimates delay to set the position of the far-end buffer read pointer\n// (controlled by knownDelay)\nstatic void EstBufDelayNormal(Aec* aecInst);\nstatic void EstBufDelayExtended(Aec* aecInst);\nstatic int ProcessNormal(Aec* self,\n                         const float* const* near,\n                         size_t num_bands,\n                         float* const* out,\n                         size_t num_samples,\n                         int16_t reported_delay_ms,\n                         int32_t skew);\nstatic void ProcessExtended(Aec* self,\n                            const float* const* near,\n                            size_t num_bands,\n                            float* const* out,\n                            size_t num_samples,\n                            int16_t reported_delay_ms,\n                            int32_t skew);\n\nvoid* WebRtcAec_Create() {\n  Aec* aecpc = new Aec();\n\n  if (!aecpc) {\n    return NULL;\n  }\n  aecpc->data_dumper.reset(new ApmDataDumper(aecpc->instance_count));\n\n  aecpc->aec = WebRtcAec_CreateAec(aecpc->instance_count);\n  if (!aecpc->aec) {\n    WebRtcAec_Free(aecpc);\n    return NULL;\n  }\n  aecpc->resampler = WebRtcAec_CreateResampler();\n  if (!aecpc->resampler) {\n    WebRtcAec_Free(aecpc);\n    return NULL;\n  }\n  // Create far-end pre-buffer. The buffer size has to be large enough for\n  // largest possible drift compensation (kResamplerBufferSize) + \"almost\" an\n  // FFT buffer (PART_LEN2 - 1).\n  aecpc->far_pre_buf =\n      WebRtc_CreateBuffer(PART_LEN2 + kResamplerBufferSize, sizeof(float));\n  if (!aecpc->far_pre_buf) {\n    WebRtcAec_Free(aecpc);\n    return NULL;\n  }\n\n  aecpc->initFlag = 0;\n\n  aecpc->instance_count++;\n  return aecpc;\n}\n\nvoid WebRtcAec_Free(void* aecInst) {\n  Aec* aecpc = reinterpret_cast<Aec*>(aecInst);\n\n  if (aecpc == NULL) {\n    return;\n  }\n\n  WebRtc_FreeBuffer(aecpc->far_pre_buf);\n\n  WebRtcAec_FreeAec(aecpc->aec);\n  WebRtcAec_FreeResampler(aecpc->resampler);\n  delete aecpc;\n}\n\nint32_t WebRtcAec_Init(void* aecInst, int32_t sampFreq, int32_t scSampFreq) {\n  Aec* aecpc = reinterpret_cast<Aec*>(aecInst);\n  aecpc->data_dumper->InitiateNewSetOfRecordings();\n  AecConfig aecConfig;\n\n  if (sampFreq != 8000 && sampFreq != 16000 && sampFreq != 32000 &&\n      sampFreq != 48000) {\n    return AEC_BAD_PARAMETER_ERROR;\n  }\n  aecpc->sampFreq = sampFreq;\n\n  if (scSampFreq < 1 || scSampFreq > 96000) {\n    return AEC_BAD_PARAMETER_ERROR;\n  }\n  aecpc->scSampFreq = scSampFreq;\n\n  // Initialize echo canceller core\n  if (WebRtcAec_InitAec(aecpc->aec, aecpc->sampFreq) == -1) {\n    return AEC_UNSPECIFIED_ERROR;\n  }\n\n  if (WebRtcAec_InitResampler(aecpc->resampler, aecpc->scSampFreq) == -1) {\n    return AEC_UNSPECIFIED_ERROR;\n  }\n\n  WebRtc_InitBuffer(aecpc->far_pre_buf);\n  WebRtc_MoveReadPtr(aecpc->far_pre_buf, -PART_LEN);  // Start overlap.\n\n  aecpc->initFlag = initCheck;  // indicates that initialization has been done\n\n  if (aecpc->sampFreq == 32000 || aecpc->sampFreq == 48000) {\n    aecpc->splitSampFreq = 16000;\n  } else {\n    aecpc->splitSampFreq = sampFreq;\n  }\n\n  aecpc->delayCtr = 0;\n  aecpc->sampFactor = (aecpc->scSampFreq * 1.0f) / aecpc->splitSampFreq;\n  // Sampling frequency multiplier (SWB is processed as 160 frame size).\n  aecpc->rate_factor = aecpc->splitSampFreq / 8000;\n\n  aecpc->sum = 0;\n  aecpc->counter = 0;\n  aecpc->checkBuffSize = 1;\n  aecpc->firstVal = 0;\n\n  // We skip the startup_phase completely (setting to 0) if DA-AEC is enabled,\n  // but not extended_filter mode.\n  aecpc->startup_phase = WebRtcAec_extended_filter_enabled(aecpc->aec) ||\n                         !WebRtcAec_delay_agnostic_enabled(aecpc->aec);\n  aecpc->bufSizeStart = 0;\n  aecpc->checkBufSizeCtr = 0;\n  aecpc->msInSndCardBuf = 0;\n  aecpc->filtDelay = -1;  // -1 indicates an initialized state.\n  aecpc->timeForDelayChange = 0;\n  aecpc->knownDelay = 0;\n  aecpc->lastDelayDiff = 0;\n\n  aecpc->skewFrCtr = 0;\n  aecpc->resample = kAecFalse;\n  aecpc->highSkewCtr = 0;\n  aecpc->skew = 0;\n\n  aecpc->farend_started = 0;\n\n  // Default settings.\n  aecConfig.nlpMode = kAecNlpModerate;\n  aecConfig.skewMode = kAecFalse;\n  aecConfig.metricsMode = kAecFalse;\n  aecConfig.delay_logging = kAecFalse;\n\n  if (WebRtcAec_set_config(aecpc, aecConfig) == -1) {\n    return AEC_UNSPECIFIED_ERROR;\n  }\n\n  return 0;\n}\n\n// Returns any error that is caused when buffering the\n// far-end signal.\nint32_t WebRtcAec_GetBufferFarendError(void* aecInst,\n                                       const float* farend,\n                                       size_t nrOfSamples) {\n  Aec* aecpc = reinterpret_cast<Aec*>(aecInst);\n\n  if (!farend)\n    return AEC_NULL_POINTER_ERROR;\n\n  if (aecpc->initFlag != initCheck)\n    return AEC_UNINITIALIZED_ERROR;\n\n  // number of samples == 160 for SWB input\n  if (nrOfSamples != 80 && nrOfSamples != 160)\n    return AEC_BAD_PARAMETER_ERROR;\n\n  return 0;\n}\n\n// only buffer L band for farend\nint32_t WebRtcAec_BufferFarend(void* aecInst,\n                               const float* farend,\n                               size_t nrOfSamples) {\n  Aec* aecpc = reinterpret_cast<Aec*>(aecInst);\n  size_t newNrOfSamples = nrOfSamples;\n  float new_farend[MAX_RESAMP_LEN];\n  const float* farend_ptr = farend;\n\n  // Get any error caused by buffering the farend signal.\n  int32_t error_code =\n      WebRtcAec_GetBufferFarendError(aecInst, farend, nrOfSamples);\n\n  if (error_code != 0)\n    return error_code;\n\n  if (aecpc->skewMode == kAecTrue && aecpc->resample == kAecTrue) {\n    // Resample and get a new number of samples\n    WebRtcAec_ResampleLinear(aecpc->resampler, farend, nrOfSamples, aecpc->skew,\n                             new_farend, &newNrOfSamples);\n    farend_ptr = new_farend;\n  }\n\n  aecpc->farend_started = 1;\n  WebRtcAec_SetSystemDelay(aecpc->aec, WebRtcAec_system_delay(aecpc->aec) +\n                           static_cast<int>(newNrOfSamples));\n\n  // Write the time-domain data to |far_pre_buf|.\n  WebRtc_WriteBuffer(aecpc->far_pre_buf, farend_ptr, newNrOfSamples);\n\n  // TODO(minyue): reduce to |PART_LEN| samples for each buffering.\n  while (WebRtc_available_read(aecpc->far_pre_buf) >= PART_LEN2) {\n    // We have enough data to pass to the FFT, hence read PART_LEN2 samples.\n    {\n      float* ptmp = NULL;\n      float tmp[PART_LEN2];\n      WebRtc_ReadBuffer(aecpc->far_pre_buf,\n                        reinterpret_cast<void**>(&ptmp), tmp, PART_LEN2);\n      WebRtcAec_BufferFarendBlock(aecpc->aec, &ptmp[PART_LEN]);\n    }\n\n    // Rewind |far_pre_buf| PART_LEN samples for overlap before continuing.\n    WebRtc_MoveReadPtr(aecpc->far_pre_buf, -PART_LEN);\n  }\n\n  return 0;\n}\n\nint32_t WebRtcAec_Process(void* aecInst,\n                          const float* const* nearend,\n                          size_t num_bands,\n                          float* const* out,\n                          size_t nrOfSamples,\n                          int16_t msInSndCardBuf,\n                          int32_t skew) {\n  Aec* aecpc = reinterpret_cast<Aec*>(aecInst);\n  int32_t retVal = 0;\n\n  if (out == NULL) {\n    return AEC_NULL_POINTER_ERROR;\n  }\n\n  if (aecpc->initFlag != initCheck) {\n    return AEC_UNINITIALIZED_ERROR;\n  }\n\n  // number of samples == 160 for SWB input\n  if (nrOfSamples != 80 && nrOfSamples != 160) {\n    return AEC_BAD_PARAMETER_ERROR;\n  }\n\n  if (msInSndCardBuf < 0) {\n    msInSndCardBuf = 0;\n    retVal = AEC_BAD_PARAMETER_WARNING;\n  } else if (msInSndCardBuf > kMaxTrustedDelayMs) {\n    // The clamping is now done in ProcessExtended/Normal().\n    retVal = AEC_BAD_PARAMETER_WARNING;\n  }\n\n  // This returns the value of aec->extended_filter_enabled.\n  if (WebRtcAec_extended_filter_enabled(aecpc->aec)) {\n    ProcessExtended(aecpc, nearend, num_bands, out, nrOfSamples, msInSndCardBuf,\n                    skew);\n  } else {\n    retVal = ProcessNormal(aecpc, nearend, num_bands, out, nrOfSamples,\n                           msInSndCardBuf, skew);\n  }\n\n  int far_buf_size_samples = WebRtcAec_system_delay(aecpc->aec);\n  aecpc->data_dumper->DumpRaw(\"aec_system_delay\", 1, &far_buf_size_samples);\n  aecpc->data_dumper->DumpRaw(\"aec_known_delay\", 1, &aecpc->knownDelay);\n\n  return retVal;\n}\n\nint WebRtcAec_set_config(void* handle, AecConfig config) {\n  Aec* self = reinterpret_cast<Aec*>(handle);\n  if (self->initFlag != initCheck) {\n    return AEC_UNINITIALIZED_ERROR;\n  }\n\n  if (config.skewMode != kAecFalse && config.skewMode != kAecTrue) {\n    return AEC_BAD_PARAMETER_ERROR;\n  }\n  self->skewMode = config.skewMode;\n\n  if (config.nlpMode != kAecNlpConservative &&\n      config.nlpMode != kAecNlpModerate &&\n      config.nlpMode != kAecNlpAggressive) {\n    return AEC_BAD_PARAMETER_ERROR;\n  }\n\n  if (config.metricsMode != kAecFalse && config.metricsMode != kAecTrue) {\n    return AEC_BAD_PARAMETER_ERROR;\n  }\n\n  if (config.delay_logging != kAecFalse && config.delay_logging != kAecTrue) {\n    return AEC_BAD_PARAMETER_ERROR;\n  }\n\n  WebRtcAec_SetConfigCore(self->aec, config.nlpMode, config.metricsMode,\n                          config.delay_logging);\n  return 0;\n}\n\nint WebRtcAec_get_echo_status(void* handle, int* status) {\n  Aec* self = reinterpret_cast<Aec*>(handle);\n  if (status == NULL) {\n    return AEC_NULL_POINTER_ERROR;\n  }\n  if (self->initFlag != initCheck) {\n    return AEC_UNINITIALIZED_ERROR;\n  }\n\n  *status = WebRtcAec_echo_state(self->aec);\n\n  return 0;\n}\n\nint WebRtcAec_GetMetrics(void* handle, AecMetrics* metrics) {\n  const float kUpWeight = 0.7f;\n  float dtmp;\n  int stmp;\n  Aec* self = reinterpret_cast<Aec*>(handle);\n  Stats erl;\n  Stats erle;\n  Stats a_nlp;\n\n  if (handle == NULL) {\n    return -1;\n  }\n  if (metrics == NULL) {\n    return AEC_NULL_POINTER_ERROR;\n  }\n  if (self->initFlag != initCheck) {\n    return AEC_UNINITIALIZED_ERROR;\n  }\n\n  WebRtcAec_GetEchoStats(self->aec, &erl, &erle, &a_nlp,\n                         &metrics->divergent_filter_fraction);\n\n  // ERL\n  metrics->erl.instant = static_cast<int>(erl.instant);\n\n  if ((erl.himean > kOffsetLevel) && (erl.average > kOffsetLevel)) {\n    // Use a mix between regular average and upper part average.\n    dtmp = kUpWeight * erl.himean + (1 - kUpWeight) * erl.average;\n    metrics->erl.average = static_cast<int>(dtmp);\n  } else {\n    metrics->erl.average = kOffsetLevel;\n  }\n\n  metrics->erl.max = static_cast<int>(erl.max);\n\n  if (erl.min < (kOffsetLevel * (-1))) {\n    metrics->erl.min = static_cast<int>(erl.min);\n  } else {\n    metrics->erl.min = kOffsetLevel;\n  }\n\n  // ERLE\n  metrics->erle.instant = static_cast<int>(erle.instant);\n\n  if ((erle.himean > kOffsetLevel) && (erle.average > kOffsetLevel)) {\n    // Use a mix between regular average and upper part average.\n    dtmp = kUpWeight * erle.himean + (1 - kUpWeight) * erle.average;\n    metrics->erle.average = static_cast<int>(dtmp);\n  } else {\n    metrics->erle.average = kOffsetLevel;\n  }\n\n  metrics->erle.max = static_cast<int>(erle.max);\n\n  if (erle.min < (kOffsetLevel * (-1))) {\n    metrics->erle.min = static_cast<int>(erle.min);\n  } else {\n    metrics->erle.min = kOffsetLevel;\n  }\n\n  // RERL\n  if ((metrics->erl.average > kOffsetLevel) &&\n      (metrics->erle.average > kOffsetLevel)) {\n    stmp = metrics->erl.average + metrics->erle.average;\n  } else {\n    stmp = kOffsetLevel;\n  }\n  metrics->rerl.average = stmp;\n\n  // No other statistics needed, but returned for completeness.\n  metrics->rerl.instant = stmp;\n  metrics->rerl.max = stmp;\n  metrics->rerl.min = stmp;\n\n  // A_NLP\n  metrics->aNlp.instant = static_cast<int>(a_nlp.instant);\n\n  if ((a_nlp.himean > kOffsetLevel) && (a_nlp.average > kOffsetLevel)) {\n    // Use a mix between regular average and upper part average.\n    dtmp = kUpWeight * a_nlp.himean + (1 - kUpWeight) * a_nlp.average;\n    metrics->aNlp.average = static_cast<int>(dtmp);\n  } else {\n    metrics->aNlp.average = kOffsetLevel;\n  }\n\n  metrics->aNlp.max = static_cast<int>(a_nlp.max);\n\n  if (a_nlp.min < (kOffsetLevel * (-1))) {\n    metrics->aNlp.min = static_cast<int>(a_nlp.min);\n  } else {\n    metrics->aNlp.min = kOffsetLevel;\n  }\n\n  return 0;\n}\n\nint WebRtcAec_GetDelayMetrics(void* handle,\n                              int* median,\n                              int* std,\n                              float* fraction_poor_delays) {\n  Aec* self = reinterpret_cast<Aec*>(handle);\n  if (median == NULL) {\n    return AEC_NULL_POINTER_ERROR;\n  }\n  if (std == NULL) {\n    return AEC_NULL_POINTER_ERROR;\n  }\n  if (self->initFlag != initCheck) {\n    return AEC_UNINITIALIZED_ERROR;\n  }\n  if (WebRtcAec_GetDelayMetricsCore(self->aec, median, std,\n                                    fraction_poor_delays) == -1) {\n    // Logging disabled.\n    return AEC_UNSUPPORTED_FUNCTION_ERROR;\n  }\n\n  return 0;\n}\n\nAecCore* WebRtcAec_aec_core(void* handle) {\n  if (!handle) {\n    return NULL;\n  }\n  return reinterpret_cast<Aec*>(handle)->aec;\n}\n\nstatic int ProcessNormal(Aec* aecpc,\n                         const float* const* nearend,\n                         size_t num_bands,\n                         float* const* out,\n                         size_t nrOfSamples,\n                         int16_t msInSndCardBuf,\n                         int32_t skew) {\n  int retVal = 0;\n  size_t i;\n  size_t nBlocks10ms;\n  // Limit resampling to doubling/halving of signal\n  const float minSkewEst = -0.5f;\n  const float maxSkewEst = 1.0f;\n\n  msInSndCardBuf =\n      msInSndCardBuf > kMaxTrustedDelayMs ? kMaxTrustedDelayMs : msInSndCardBuf;\n  // TODO(andrew): we need to investigate if this +10 is really wanted.\n  msInSndCardBuf += 10;\n  aecpc->msInSndCardBuf = msInSndCardBuf;\n\n  if (aecpc->skewMode == kAecTrue) {\n    if (aecpc->skewFrCtr < 25) {\n      aecpc->skewFrCtr++;\n    } else {\n      retVal = WebRtcAec_GetSkew(aecpc->resampler, skew, &aecpc->skew);\n      if (retVal == -1) {\n        aecpc->skew = 0;\n        retVal = AEC_BAD_PARAMETER_WARNING;\n      }\n\n      aecpc->skew /= aecpc->sampFactor * nrOfSamples;\n\n      if (aecpc->skew < 1.0e-3 && aecpc->skew > -1.0e-3) {\n        aecpc->resample = kAecFalse;\n      } else {\n        aecpc->resample = kAecTrue;\n      }\n\n      if (aecpc->skew < minSkewEst) {\n        aecpc->skew = minSkewEst;\n      } else if (aecpc->skew > maxSkewEst) {\n        aecpc->skew = maxSkewEst;\n      }\n\n      aecpc->data_dumper->DumpRaw(\"aec_skew\", 1, &aecpc->skew);\n    }\n  }\n\n  nBlocks10ms = nrOfSamples / (FRAME_LEN * aecpc->rate_factor);\n\n  if (aecpc->startup_phase) {\n    for (i = 0; i < num_bands; ++i) {\n      // Only needed if they don't already point to the same place.\n      if (nearend[i] != out[i]) {\n        memcpy(out[i], nearend[i], sizeof(nearend[i][0]) * nrOfSamples);\n      }\n    }\n\n    // The AEC is in the start up mode\n    // AEC is disabled until the system delay is OK\n\n    // Mechanism to ensure that the system delay is reasonably stable.\n    if (aecpc->checkBuffSize) {\n      aecpc->checkBufSizeCtr++;\n      // Before we fill up the far-end buffer we require the system delay\n      // to be stable (+/-8 ms) compared to the first value. This\n      // comparison is made during the following 6 consecutive 10 ms\n      // blocks. If it seems to be stable then we start to fill up the\n      // far-end buffer.\n      if (aecpc->counter == 0) {\n        aecpc->firstVal = aecpc->msInSndCardBuf;\n        aecpc->sum = 0;\n      }\n\n      if (abs(aecpc->firstVal - aecpc->msInSndCardBuf) <\n          WEBRTC_SPL_MAX(0.2 * aecpc->msInSndCardBuf, sampMsNb)) {\n        aecpc->sum += aecpc->msInSndCardBuf;\n        aecpc->counter++;\n      } else {\n        aecpc->counter = 0;\n      }\n\n      if (aecpc->counter * nBlocks10ms >= 6) {\n        // The far-end buffer size is determined in partitions of\n        // PART_LEN samples. Use 75% of the average value of the system\n        // delay as buffer size to start with.\n        aecpc->bufSizeStart =\n            WEBRTC_SPL_MIN((3 * aecpc->sum * aecpc->rate_factor * 8) /\n                               (4 * aecpc->counter * PART_LEN),\n                           kMaxBufSizeStart);\n        // Buffer size has now been determined.\n        aecpc->checkBuffSize = 0;\n      }\n\n      if (aecpc->checkBufSizeCtr * nBlocks10ms > 50) {\n        // For really bad systems, don't disable the echo canceller for\n        // more than 0.5 sec.\n        aecpc->bufSizeStart = WEBRTC_SPL_MIN(\n            (aecpc->msInSndCardBuf * aecpc->rate_factor * 3) / 40,\n            kMaxBufSizeStart);\n        aecpc->checkBuffSize = 0;\n      }\n    }\n\n    // If |checkBuffSize| changed in the if-statement above.\n    if (!aecpc->checkBuffSize) {\n      // The system delay is now reasonably stable (or has been unstable\n      // for too long). When the far-end buffer is filled with\n      // approximately the same amount of data as reported by the system\n      // we end the startup phase.\n      int overhead_elements =\n          WebRtcAec_system_delay(aecpc->aec) / PART_LEN - aecpc->bufSizeStart;\n      if (overhead_elements == 0) {\n        // Enable the AEC\n        aecpc->startup_phase = 0;\n      } else if (overhead_elements > 0) {\n        // TODO(bjornv): Do we need a check on how much we actually\n        // moved the read pointer? It should always be possible to move\n        // the pointer |overhead_elements| since we have only added data\n        // to the buffer and no delay compensation nor AEC processing\n        // has been done.\n        WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(aecpc->aec,\n                                                       overhead_elements);\n\n        // Enable the AEC\n        aecpc->startup_phase = 0;\n      }\n    }\n  } else {\n    // AEC is enabled.\n    EstBufDelayNormal(aecpc);\n\n    // Call the AEC.\n    // TODO(bjornv): Re-structure such that we don't have to pass\n    // |aecpc->knownDelay| as input. Change name to something like\n    // |system_buffer_diff|.\n    WebRtcAec_ProcessFrames(aecpc->aec, nearend, num_bands, nrOfSamples,\n                            aecpc->knownDelay, out);\n  }\n\n  return retVal;\n}\n\nstatic void ProcessExtended(Aec* self,\n                            const float* const* near,\n                            size_t num_bands,\n                            float* const* out,\n                            size_t num_samples,\n                            int16_t reported_delay_ms,\n                            int32_t skew) {\n  size_t i;\n  const int delay_diff_offset = kDelayDiffOffsetSamples;\n  RTC_DCHECK(num_samples == 80 || num_samples == 160);\n#if defined(WEBRTC_UNTRUSTED_DELAY)\n  reported_delay_ms = kFixedDelayMs;\n#else\n  // This is the usual mode where we trust the reported system delay values.\n  // Due to the longer filter, we no longer add 10 ms to the reported delay\n  // to reduce chance of non-causality. Instead we apply a minimum here to avoid\n  // issues with the read pointer jumping around needlessly.\n  reported_delay_ms = reported_delay_ms < kMinTrustedDelayMs\n                          ? kMinTrustedDelayMs\n                          : reported_delay_ms;\n  // If the reported delay appears to be bogus, we attempt to recover by using\n  // the measured fixed delay values. We use >= here because higher layers\n  // may already clamp to this maximum value, and we would otherwise not\n  // detect it here.\n  reported_delay_ms = reported_delay_ms >= kMaxTrustedDelayMs\n                          ? kFixedDelayMs\n                          : reported_delay_ms;\n#endif\n  self->msInSndCardBuf = reported_delay_ms;\n\n  if (!self->farend_started) {\n    for (i = 0; i < num_bands; ++i) {\n      // Only needed if they don't already point to the same place.\n      if (near[i] != out[i]) {\n        memcpy(out[i], near[i], sizeof(near[i][0]) * num_samples);\n      }\n    }\n    return;\n  }\n  if (self->startup_phase) {\n    // In the extended mode, there isn't a startup \"phase\", just a special\n    // action on the first frame. In the trusted delay case, we'll take the\n    // current reported delay, unless it's less then our conservative\n    // measurement.\n    int startup_size_ms =\n        reported_delay_ms < kFixedDelayMs ? kFixedDelayMs : reported_delay_ms;\n#if defined(WEBRTC_ANDROID)\n    int target_delay = startup_size_ms * self->rate_factor * 8;\n#else\n    // To avoid putting the AEC in a non-causal state we're being slightly\n    // conservative and scale by 2. On Android we use a fixed delay and\n    // therefore there is no need to scale the target_delay.\n    int target_delay = startup_size_ms * self->rate_factor * 8 / 2;\n#endif\n    int overhead_elements =\n        (WebRtcAec_system_delay(self->aec) - target_delay) / PART_LEN;\n    WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(self->aec,\n                                                   overhead_elements);\n    self->startup_phase = 0;\n  }\n\n  EstBufDelayExtended(self);\n\n  {\n    // |delay_diff_offset| gives us the option to manually rewind the delay on\n    // very low delay platforms which can't be expressed purely through\n    // |reported_delay_ms|.\n    const int adjusted_known_delay =\n        WEBRTC_SPL_MAX(0, self->knownDelay + delay_diff_offset);\n\n    WebRtcAec_ProcessFrames(self->aec, near, num_bands, num_samples,\n                            adjusted_known_delay, out);\n  }\n}\n\nstatic void EstBufDelayNormal(Aec* aecpc) {\n  int nSampSndCard = aecpc->msInSndCardBuf * sampMsNb * aecpc->rate_factor;\n  int current_delay = nSampSndCard - WebRtcAec_system_delay(aecpc->aec);\n  int delay_difference = 0;\n\n  // Before we proceed with the delay estimate filtering we:\n  // 1) Compensate for the frame that will be read.\n  // 2) Compensate for drift resampling.\n  // 3) Compensate for non-causality if needed, since the estimated delay can't\n  //    be negative.\n\n  // 1) Compensating for the frame(s) that will be read/processed.\n  current_delay += FRAME_LEN * aecpc->rate_factor;\n\n  // 2) Account for resampling frame delay.\n  if (aecpc->skewMode == kAecTrue && aecpc->resample == kAecTrue) {\n    current_delay -= kResamplingDelay;\n  }\n\n  // 3) Compensate for non-causality, if needed, by flushing one block.\n  if (current_delay < PART_LEN) {\n    current_delay +=\n        WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(aecpc->aec, 1) *\n        PART_LEN;\n  }\n\n  // We use -1 to signal an initialized state in the \"extended\" implementation;\n  // compensate for that.\n  aecpc->filtDelay = aecpc->filtDelay < 0 ? 0 : aecpc->filtDelay;\n  aecpc->filtDelay =\n      WEBRTC_SPL_MAX(0, static_cast<int16_t>(0.8 *\n                                             aecpc->filtDelay +\n                                             0.2 * current_delay));\n\n  delay_difference = aecpc->filtDelay - aecpc->knownDelay;\n  if (delay_difference > 224) {\n    if (aecpc->lastDelayDiff < 96) {\n      aecpc->timeForDelayChange = 0;\n    } else {\n      aecpc->timeForDelayChange++;\n    }\n  } else if (delay_difference < 96 && aecpc->knownDelay > 0) {\n    if (aecpc->lastDelayDiff > 224) {\n      aecpc->timeForDelayChange = 0;\n    } else {\n      aecpc->timeForDelayChange++;\n    }\n  } else {\n    aecpc->timeForDelayChange = 0;\n  }\n  aecpc->lastDelayDiff = delay_difference;\n\n  if (aecpc->timeForDelayChange > 25) {\n    aecpc->knownDelay = WEBRTC_SPL_MAX((int)aecpc->filtDelay - 160, 0);\n  }\n}\n\nstatic void EstBufDelayExtended(Aec* self) {\n  int reported_delay = self->msInSndCardBuf * sampMsNb * self->rate_factor;\n  int current_delay = reported_delay - WebRtcAec_system_delay(self->aec);\n  int delay_difference = 0;\n\n  // Before we proceed with the delay estimate filtering we:\n  // 1) Compensate for the frame that will be read.\n  // 2) Compensate for drift resampling.\n  // 3) Compensate for non-causality if needed, since the estimated delay can't\n  //    be negative.\n\n  // 1) Compensating for the frame(s) that will be read/processed.\n  current_delay += FRAME_LEN * self->rate_factor;\n\n  // 2) Account for resampling frame delay.\n  if (self->skewMode == kAecTrue && self->resample == kAecTrue) {\n    current_delay -= kResamplingDelay;\n  }\n\n  // 3) Compensate for non-causality, if needed, by flushing two blocks.\n  if (current_delay < PART_LEN) {\n    current_delay +=\n        WebRtcAec_AdjustFarendBufferSizeAndSystemDelay(self->aec, 2) * PART_LEN;\n  }\n\n  if (self->filtDelay == -1) {\n    self->filtDelay = WEBRTC_SPL_MAX(0, 0.5 * current_delay);\n  } else {\n    self->filtDelay = WEBRTC_SPL_MAX(\n        0, static_cast<int16_t>(0.95 * self->filtDelay + 0.05 * current_delay));\n  }\n\n  delay_difference = self->filtDelay - self->knownDelay;\n  if (delay_difference > 384) {\n    if (self->lastDelayDiff < 128) {\n      self->timeForDelayChange = 0;\n    } else {\n      self->timeForDelayChange++;\n    }\n  } else if (delay_difference < 128 && self->knownDelay > 0) {\n    if (self->lastDelayDiff > 384) {\n      self->timeForDelayChange = 0;\n    } else {\n      self->timeForDelayChange++;\n    }\n  } else {\n    self->timeForDelayChange = 0;\n  }\n  self->lastDelayDiff = delay_difference;\n\n  if (self->timeForDelayChange > 25) {\n    self->knownDelay = WEBRTC_SPL_MAX((int)self->filtDelay - 256, 0);\n  }\n}\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aec/echo_cancellation.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_\n\n#include <memory>\n\n#include <stddef.h>\n\nextern \"C\" {\n#include \"webrtc/common_audio/ring_buffer.h\"\n}\n#include \"webrtc/modules/audio_processing/aec/aec_core.h\"\n#include \"webrtc/typedefs.h\"\n\nnamespace webrtc {\n\n// Errors\n#define AEC_UNSPECIFIED_ERROR 12000\n#define AEC_UNSUPPORTED_FUNCTION_ERROR 12001\n#define AEC_UNINITIALIZED_ERROR 12002\n#define AEC_NULL_POINTER_ERROR 12003\n#define AEC_BAD_PARAMETER_ERROR 12004\n\n// Warnings\n#define AEC_BAD_PARAMETER_WARNING 12050\n\nenum { kAecNlpConservative = 0, kAecNlpModerate, kAecNlpAggressive };\n\nenum { kAecFalse = 0, kAecTrue };\n\ntypedef struct {\n  int16_t nlpMode;      // default kAecNlpModerate\n  int16_t skewMode;     // default kAecFalse\n  int16_t metricsMode;  // default kAecFalse\n  int delay_logging;    // default kAecFalse\n  // float realSkew;\n} AecConfig;\n\ntypedef struct {\n  int instant;\n  int average;\n  int max;\n  int min;\n} AecLevel;\n\ntypedef struct {\n  AecLevel rerl;\n  AecLevel erl;\n  AecLevel erle;\n  AecLevel aNlp;\n  float divergent_filter_fraction;\n} AecMetrics;\n\nstruct AecCore;\n\nclass ApmDataDumper;\n\ntypedef struct Aec {\n  Aec();\n  ~Aec();\n\n  std::unique_ptr<ApmDataDumper> data_dumper;\n\n  int delayCtr;\n  int sampFreq;\n  int splitSampFreq;\n  int scSampFreq;\n  float sampFactor;  // scSampRate / sampFreq\n  short skewMode;\n  int bufSizeStart;\n  int knownDelay;\n  int rate_factor;\n\n  short initFlag;  // indicates if AEC has been initialized\n\n  // Variables used for averaging far end buffer size\n  short counter;\n  int sum;\n  short firstVal;\n  short checkBufSizeCtr;\n\n  // Variables used for delay shifts\n  short msInSndCardBuf;\n  short filtDelay;  // Filtered delay estimate.\n  int timeForDelayChange;\n  int startup_phase;\n  int checkBuffSize;\n  short lastDelayDiff;\n\n  // Structures\n  void* resampler;\n\n  int skewFrCtr;\n  int resample;  // if the skew is small enough we don't resample\n  int highSkewCtr;\n  float skew;\n\n  RingBuffer* far_pre_buf;  // Time domain far-end pre-buffer.\n\n  int farend_started;\n\n  // Aec instance counter.\n  static int instance_count;\n  AecCore* aec;\n} Aec;\n\n/*\n * Allocates the memory needed by the AEC. The memory needs to be initialized\n * separately using the WebRtcAec_Init() function. Returns a pointer to the\n * object or NULL on error.\n */\nvoid* WebRtcAec_Create();\n\n/*\n * This function releases the memory allocated by WebRtcAec_Create().\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*        aecInst         Pointer to the AEC instance\n */\nvoid WebRtcAec_Free(void* aecInst);\n\n/*\n * Initializes an AEC instance.\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*          aecInst       Pointer to the AEC instance\n * int32_t        sampFreq      Sampling frequency of data\n * int32_t        scSampFreq    Soundcard sampling frequency\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int32_t        return        0: OK\n *                             -1: error\n */\nint32_t WebRtcAec_Init(void* aecInst, int32_t sampFreq, int32_t scSampFreq);\n\n/*\n * Inserts an 80 or 160 sample block of data into the farend buffer.\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*          aecInst       Pointer to the AEC instance\n * const float*   farend        In buffer containing one frame of\n *                              farend signal for L band\n * int16_t        nrOfSamples   Number of samples in farend buffer\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int32_t        return        0: OK\n *                              12000-12050: error code\n */\nint32_t WebRtcAec_BufferFarend(void* aecInst,\n                               const float* farend,\n                               size_t nrOfSamples);\n\n/*\n * Reports any errors that would arise if buffering a farend buffer\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*          aecInst       Pointer to the AEC instance\n * const float*   farend        In buffer containing one frame of\n *                              farend signal for L band\n * int16_t        nrOfSamples   Number of samples in farend buffer\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int32_t        return        0: OK\n *                              12000-12050: error code\n */\nint32_t WebRtcAec_GetBufferFarendError(void* aecInst,\n                                       const float* farend,\n                                       size_t nrOfSamples);\n\n/*\n * Runs the echo canceller on an 80 or 160 sample blocks of data.\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*         aecInst        Pointer to the AEC instance\n * float* const* nearend        In buffer containing one frame of\n *                              nearend+echo signal for each band\n * int           num_bands      Number of bands in nearend buffer\n * int16_t       nrOfSamples    Number of samples in nearend buffer\n * int16_t       msInSndCardBuf Delay estimate for sound card and\n *                              system buffers\n * int16_t       skew           Difference between number of samples played\n *                              and recorded at the soundcard (for clock skew\n *                              compensation)\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * float* const* out            Out buffer, one frame of processed nearend\n *                              for each band\n * int32_t       return         0: OK\n *                              12000-12050: error code\n */\nint32_t WebRtcAec_Process(void* aecInst,\n                          const float* const* nearend,\n                          size_t num_bands,\n                          float* const* out,\n                          size_t nrOfSamples,\n                          int16_t msInSndCardBuf,\n                          int32_t skew);\n\n/*\n * This function enables the user to set certain parameters on-the-fly.\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*          handle        Pointer to the AEC instance\n * AecConfig      config        Config instance that contains all\n *                              properties to be set\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int            return        0: OK\n *                              12000-12050: error code\n */\nint WebRtcAec_set_config(void* handle, AecConfig config);\n\n/*\n * Gets the current echo status of the nearend signal.\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*          handle        Pointer to the AEC instance\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int*           status        0: Almost certainly nearend single-talk\n *                              1: Might not be neared single-talk\n * int            return        0: OK\n *                              12000-12050: error code\n */\nint WebRtcAec_get_echo_status(void* handle, int* status);\n\n/*\n * Gets the current echo metrics for the session.\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*          handle        Pointer to the AEC instance\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * AecMetrics*    metrics       Struct which will be filled out with the\n *                              current echo metrics.\n * int            return        0: OK\n *                              12000-12050: error code\n */\nint WebRtcAec_GetMetrics(void* handle, AecMetrics* metrics);\n\n/*\n * Gets the current delay metrics for the session.\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*   handle               Pointer to the AEC instance\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int*    median               Delay median value.\n * int*    std                  Delay standard deviation.\n * float*  fraction_poor_delays Fraction of the delay estimates that may\n *                              cause the AEC to perform poorly.\n *\n * int            return        0: OK\n *                              12000-12050: error code\n */\nint WebRtcAec_GetDelayMetrics(void* handle,\n                              int* median,\n                              int* std,\n                              float* fraction_poor_delays);\n\n// Returns a pointer to the low level AEC handle.\n//\n// Input:\n//  - handle                    : Pointer to the AEC instance.\n//\n// Return value:\n//  - AecCore pointer           : NULL for error.\n//\nstruct AecCore* WebRtcAec_aec_core(void* handle);\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aecm/aecm_core.cc",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/aecm/aecm_core.h\"\n\n#include <stddef.h>\n#include <stdlib.h>\n\nextern \"C\" {\n#include \"webrtc/common_audio/ring_buffer.h\"\n#include \"webrtc/common_audio/signal_processing/include/real_fft.h\"\n}\n#include \"webrtc/modules/audio_processing/aecm/echo_control_mobile.h\"\n#include \"webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h\"\nextern \"C\" {\n#include \"webrtc/system_wrappers/include/cpu_features_wrapper.h\"\n}\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/typedefs.h\"\n\n#ifdef AEC_DEBUG\nFILE *dfile;\nFILE *testfile;\n#endif\n\nconst int16_t WebRtcAecm_kCosTable[] = {\n    8192,  8190,  8187,  8180,  8172,  8160,  8147,  8130,  8112,\n    8091,  8067,  8041,  8012,  7982,  7948,  7912,  7874,  7834,\n    7791,  7745,  7697,  7647,  7595,  7540,  7483,  7424,  7362,\n    7299,  7233,  7164,  7094,  7021,  6947,  6870,  6791,  6710,\n    6627,  6542,  6455,  6366,  6275,  6182,  6087,  5991,  5892,\n    5792,  5690,  5586,  5481,  5374,  5265,  5155,  5043,  4930,\n    4815,  4698,  4580,  4461,  4341,  4219,  4096,  3971,  3845,\n    3719,  3591,  3462,  3331,  3200,  3068,  2935,  2801,  2667,\n    2531,  2395,  2258,  2120,  1981,  1842,  1703,  1563,  1422,\n    1281,  1140,   998,   856,   713,   571,   428,   285,   142,\n       0,  -142,  -285,  -428,  -571,  -713,  -856,  -998, -1140,\n   -1281, -1422, -1563, -1703, -1842, -1981, -2120, -2258, -2395,\n   -2531, -2667, -2801, -2935, -3068, -3200, -3331, -3462, -3591,\n   -3719, -3845, -3971, -4095, -4219, -4341, -4461, -4580, -4698,\n   -4815, -4930, -5043, -5155, -5265, -5374, -5481, -5586, -5690,\n   -5792, -5892, -5991, -6087, -6182, -6275, -6366, -6455, -6542,\n   -6627, -6710, -6791, -6870, -6947, -7021, -7094, -7164, -7233,\n   -7299, -7362, -7424, -7483, -7540, -7595, -7647, -7697, -7745,\n   -7791, -7834, -7874, -7912, -7948, -7982, -8012, -8041, -8067,\n   -8091, -8112, -8130, -8147, -8160, -8172, -8180, -8187, -8190,\n   -8191, -8190, -8187, -8180, -8172, -8160, -8147, -8130, -8112,\n   -8091, -8067, -8041, -8012, -7982, -7948, -7912, -7874, -7834,\n   -7791, -7745, -7697, -7647, -7595, -7540, -7483, -7424, -7362,\n   -7299, -7233, -7164, -7094, -7021, -6947, -6870, -6791, -6710,\n   -6627, -6542, -6455, -6366, -6275, -6182, -6087, -5991, -5892,\n   -5792, -5690, -5586, -5481, -5374, -5265, -5155, -5043, -4930,\n   -4815, -4698, -4580, -4461, -4341, -4219, -4096, -3971, -3845,\n   -3719, -3591, -3462, -3331, -3200, -3068, -2935, -2801, -2667,\n   -2531, -2395, -2258, -2120, -1981, -1842, -1703, -1563, -1422,\n   -1281, -1140,  -998,  -856,  -713,  -571,  -428,  -285,  -142,\n       0,   142,   285,   428,   571,   713,   856,   998,  1140,\n    1281,  1422,  1563,  1703,  1842,  1981,  2120,  2258,  2395,\n    2531,  2667,  2801,  2935,  3068,  3200,  3331,  3462,  3591,\n    3719,  3845,  3971,  4095,  4219,  4341,  4461,  4580,  4698,\n    4815,  4930,  5043,  5155,  5265,  5374,  5481,  5586,  5690,\n    5792,  5892,  5991,  6087,  6182,  6275,  6366,  6455,  6542,\n    6627,  6710,  6791,  6870,  6947,  7021,  7094,  7164,  7233,\n    7299,  7362,  7424,  7483,  7540,  7595,  7647,  7697,  7745,\n    7791,  7834,  7874,  7912,  7948,  7982,  8012,  8041,  8067,\n    8091,  8112,  8130,  8147,  8160,  8172,  8180,  8187,  8190\n};\n\nconst int16_t WebRtcAecm_kSinTable[] = {\n       0,    142,    285,    428,    571,    713,    856,    998,\n    1140,   1281,   1422,   1563,   1703,   1842,   1981,   2120,\n    2258,   2395,   2531,   2667,   2801,   2935,   3068,   3200,\n    3331,   3462,   3591,   3719,   3845,   3971,   4095,   4219,\n    4341,   4461,   4580,   4698,   4815,   4930,   5043,   5155,\n    5265,   5374,   5481,   5586,   5690,   5792,   5892,   5991,\n    6087,   6182,   6275,   6366,   6455,   6542,   6627,   6710,\n    6791,   6870,   6947,   7021,   7094,   7164,   7233,   7299,\n    7362,   7424,   7483,   7540,   7595,   7647,   7697,   7745,\n    7791,   7834,   7874,   7912,   7948,   7982,   8012,   8041,\n    8067,   8091,   8112,   8130,   8147,   8160,   8172,   8180,\n    8187,   8190,   8191,   8190,   8187,   8180,   8172,   8160,\n    8147,   8130,   8112,   8091,   8067,   8041,   8012,   7982,\n    7948,   7912,   7874,   7834,   7791,   7745,   7697,   7647,\n    7595,   7540,   7483,   7424,   7362,   7299,   7233,   7164,\n    7094,   7021,   6947,   6870,   6791,   6710,   6627,   6542,\n    6455,   6366,   6275,   6182,   6087,   5991,   5892,   5792,\n    5690,   5586,   5481,   5374,   5265,   5155,   5043,   4930,\n    4815,   4698,   4580,   4461,   4341,   4219,   4096,   3971,\n    3845,   3719,   3591,   3462,   3331,   3200,   3068,   2935,\n    2801,   2667,   2531,   2395,   2258,   2120,   1981,   1842,\n    1703,   1563,   1422,   1281,   1140,    998,    856,    713,\n     571,    428,    285,    142,      0,   -142,   -285,   -428,\n    -571,   -713,   -856,   -998,  -1140,  -1281,  -1422,  -1563,\n   -1703,  -1842,  -1981,  -2120,  -2258,  -2395,  -2531,  -2667,\n   -2801,  -2935,  -3068,  -3200,  -3331,  -3462,  -3591,  -3719,\n   -3845,  -3971,  -4095,  -4219,  -4341,  -4461,  -4580,  -4698,\n   -4815,  -4930,  -5043,  -5155,  -5265,  -5374,  -5481,  -5586,\n   -5690,  -5792,  -5892,  -5991,  -6087,  -6182,  -6275,  -6366,\n   -6455,  -6542,  -6627,  -6710,  -6791,  -6870,  -6947,  -7021,\n   -7094,  -7164,  -7233,  -7299,  -7362,  -7424,  -7483,  -7540,\n   -7595,  -7647,  -7697,  -7745,  -7791,  -7834,  -7874,  -7912,\n   -7948,  -7982,  -8012,  -8041,  -8067,  -8091,  -8112,  -8130,\n   -8147,  -8160,  -8172,  -8180,  -8187,  -8190,  -8191,  -8190,\n   -8187,  -8180,  -8172,  -8160,  -8147,  -8130,  -8112,  -8091,\n   -8067,  -8041,  -8012,  -7982,  -7948,  -7912,  -7874,  -7834,\n   -7791,  -7745,  -7697,  -7647,  -7595,  -7540,  -7483,  -7424,\n   -7362,  -7299,  -7233,  -7164,  -7094,  -7021,  -6947,  -6870,\n   -6791,  -6710,  -6627,  -6542,  -6455,  -6366,  -6275,  -6182,\n   -6087,  -5991,  -5892,  -5792,  -5690,  -5586,  -5481,  -5374,\n   -5265,  -5155,  -5043,  -4930,  -4815,  -4698,  -4580,  -4461,\n   -4341,  -4219,  -4096,  -3971,  -3845,  -3719,  -3591,  -3462,\n   -3331,  -3200,  -3068,  -2935,  -2801,  -2667,  -2531,  -2395,\n   -2258,  -2120,  -1981,  -1842,  -1703,  -1563,  -1422,  -1281,\n   -1140,   -998,   -856,   -713,   -571,   -428,   -285,   -142\n};\n\n// Initialization table for echo channel in 8 kHz\nstatic const int16_t kChannelStored8kHz[PART_LEN1] = {\n    2040,   1815,   1590,   1498,   1405,   1395,   1385,   1418,\n    1451,   1506,   1562,   1644,   1726,   1804,   1882,   1918,\n    1953,   1982,   2010,   2025,   2040,   2034,   2027,   2021,\n    2014,   1997,   1980,   1925,   1869,   1800,   1732,   1683,\n    1635,   1604,   1572,   1545,   1517,   1481,   1444,   1405,\n    1367,   1331,   1294,   1270,   1245,   1239,   1233,   1247,\n    1260,   1282,   1303,   1338,   1373,   1407,   1441,   1470,\n    1499,   1524,   1549,   1565,   1582,   1601,   1621,   1649,\n    1676\n};\n\n// Initialization table for echo channel in 16 kHz\nstatic const int16_t kChannelStored16kHz[PART_LEN1] = {\n    2040,   1590,   1405,   1385,   1451,   1562,   1726,   1882,\n    1953,   2010,   2040,   2027,   2014,   1980,   1869,   1732,\n    1635,   1572,   1517,   1444,   1367,   1294,   1245,   1233,\n    1260,   1303,   1373,   1441,   1499,   1549,   1582,   1621,\n    1676,   1741,   1802,   1861,   1921,   1983,   2040,   2102,\n    2170,   2265,   2375,   2515,   2651,   2781,   2922,   3075,\n    3253,   3471,   3738,   3976,   4151,   4258,   4308,   4288,\n    4270,   4253,   4237,   4179,   4086,   3947,   3757,   3484,\n    3153\n};\n\n// Moves the pointer to the next entry and inserts |far_spectrum| and\n// corresponding Q-domain in its buffer.\n//\n// Inputs:\n//      - self          : Pointer to the delay estimation instance\n//      - far_spectrum  : Pointer to the far end spectrum\n//      - far_q         : Q-domain of far end spectrum\n//\nvoid WebRtcAecm_UpdateFarHistory(AecmCore* self,\n                                 uint16_t* far_spectrum,\n                                 int far_q) {\n  // Get new buffer position\n  self->far_history_pos++;\n  if (self->far_history_pos >= MAX_DELAY) {\n    self->far_history_pos = 0;\n  }\n  // Update Q-domain buffer\n  self->far_q_domains[self->far_history_pos] = far_q;\n  // Update far end spectrum buffer\n  memcpy(&(self->far_history[self->far_history_pos * PART_LEN1]),\n         far_spectrum,\n         sizeof(uint16_t) * PART_LEN1);\n}\n\n// Returns a pointer to the far end spectrum aligned to current near end\n// spectrum. The function WebRtc_DelayEstimatorProcessFix(...) should have been\n// called before AlignedFarend(...). Otherwise, you get the pointer to the\n// previous frame. The memory is only valid until the next call of\n// WebRtc_DelayEstimatorProcessFix(...).\n//\n// Inputs:\n//      - self              : Pointer to the AECM instance.\n//      - delay             : Current delay estimate.\n//\n// Output:\n//      - far_q             : The Q-domain of the aligned far end spectrum\n//\n// Return value:\n//      - far_spectrum      : Pointer to the aligned far end spectrum\n//                            NULL - Error\n//\nconst uint16_t* WebRtcAecm_AlignedFarend(AecmCore* self,\n                                         int* far_q,\n                                         int delay) {\n  int buffer_position = 0;\n  RTC_DCHECK(self);\n  buffer_position = self->far_history_pos - delay;\n\n  // Check buffer position\n  if (buffer_position < 0) {\n    buffer_position += MAX_DELAY;\n  }\n  // Get Q-domain\n  *far_q = self->far_q_domains[buffer_position];\n  // Return far end spectrum\n  return &(self->far_history[buffer_position * PART_LEN1]);\n}\n\n// Declare function pointers.\nCalcLinearEnergies WebRtcAecm_CalcLinearEnergies;\nStoreAdaptiveChannel WebRtcAecm_StoreAdaptiveChannel;\nResetAdaptiveChannel WebRtcAecm_ResetAdaptiveChannel;\n\nAecmCore* WebRtcAecm_CreateCore() {\n    AecmCore* aecm = static_cast<AecmCore*>(malloc(sizeof(AecmCore)));\n\n    aecm->farFrameBuf = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN,\n                                            sizeof(int16_t));\n    if (!aecm->farFrameBuf)\n    {\n        WebRtcAecm_FreeCore(aecm);\n        return NULL;\n    }\n\n    aecm->nearNoisyFrameBuf = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN,\n                                                  sizeof(int16_t));\n    if (!aecm->nearNoisyFrameBuf)\n    {\n        WebRtcAecm_FreeCore(aecm);\n        return NULL;\n    }\n\n    aecm->nearCleanFrameBuf = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN,\n                                                  sizeof(int16_t));\n    if (!aecm->nearCleanFrameBuf)\n    {\n        WebRtcAecm_FreeCore(aecm);\n        return NULL;\n    }\n\n    aecm->outFrameBuf = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN,\n                                            sizeof(int16_t));\n    if (!aecm->outFrameBuf)\n    {\n        WebRtcAecm_FreeCore(aecm);\n        return NULL;\n    }\n\n    aecm->delay_estimator_farend = WebRtc_CreateDelayEstimatorFarend(PART_LEN1,\n                                                                     MAX_DELAY);\n    if (aecm->delay_estimator_farend == NULL) {\n      WebRtcAecm_FreeCore(aecm);\n      return NULL;\n    }\n    aecm->delay_estimator =\n        WebRtc_CreateDelayEstimator(aecm->delay_estimator_farend, 0);\n    if (aecm->delay_estimator == NULL) {\n      WebRtcAecm_FreeCore(aecm);\n      return NULL;\n    }\n    // TODO(bjornv): Explicitly disable robust delay validation until no\n    // performance regression has been established.  Then remove the line.\n    WebRtc_enable_robust_validation(aecm->delay_estimator, 0);\n\n    aecm->real_fft = WebRtcSpl_CreateRealFFT(PART_LEN_SHIFT);\n    if (aecm->real_fft == NULL) {\n      WebRtcAecm_FreeCore(aecm);\n      return NULL;\n    }\n\n    // Init some aecm pointers. 16 and 32 byte alignment is only necessary\n    // for Neon code currently.\n    aecm->xBuf = (int16_t*) (((uintptr_t)aecm->xBuf_buf + 31) & ~ 31);\n    aecm->dBufClean = (int16_t*) (((uintptr_t)aecm->dBufClean_buf + 31) & ~ 31);\n    aecm->dBufNoisy = (int16_t*) (((uintptr_t)aecm->dBufNoisy_buf + 31) & ~ 31);\n    aecm->outBuf = (int16_t*) (((uintptr_t)aecm->outBuf_buf + 15) & ~ 15);\n    aecm->channelStored = (int16_t*) (((uintptr_t)\n                                             aecm->channelStored_buf + 15) & ~ 15);\n    aecm->channelAdapt16 = (int16_t*) (((uintptr_t)\n                                              aecm->channelAdapt16_buf + 15) & ~ 15);\n    aecm->channelAdapt32 = (int32_t*) (((uintptr_t)\n                                              aecm->channelAdapt32_buf + 31) & ~ 31);\n\n    return aecm;\n}\n\nvoid WebRtcAecm_InitEchoPathCore(AecmCore* aecm, const int16_t* echo_path) {\n    int i = 0;\n\n    // Reset the stored channel\n    memcpy(aecm->channelStored, echo_path, sizeof(int16_t) * PART_LEN1);\n    // Reset the adapted channels\n    memcpy(aecm->channelAdapt16, echo_path, sizeof(int16_t) * PART_LEN1);\n    for (i = 0; i < PART_LEN1; i++)\n    {\n        aecm->channelAdapt32[i] = (int32_t)aecm->channelAdapt16[i] << 16;\n    }\n\n    // Reset channel storing variables\n    aecm->mseAdaptOld = 1000;\n    aecm->mseStoredOld = 1000;\n    aecm->mseThreshold = WEBRTC_SPL_WORD32_MAX;\n    aecm->mseChannelCount = 0;\n}\n\nstatic void CalcLinearEnergiesC(AecmCore* aecm,\n                                const uint16_t* far_spectrum,\n                                int32_t* echo_est,\n                                uint32_t* far_energy,\n                                uint32_t* echo_energy_adapt,\n                                uint32_t* echo_energy_stored) {\n    int i;\n\n    // Get energy for the delayed far end signal and estimated\n    // echo using both stored and adapted channels.\n    for (i = 0; i < PART_LEN1; i++)\n    {\n        echo_est[i] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i],\n                                           far_spectrum[i]);\n        (*far_energy) += (uint32_t)(far_spectrum[i]);\n        *echo_energy_adapt += aecm->channelAdapt16[i] * far_spectrum[i];\n        (*echo_energy_stored) += (uint32_t)echo_est[i];\n    }\n}\n\nstatic void StoreAdaptiveChannelC(AecmCore* aecm,\n                                  const uint16_t* far_spectrum,\n                                  int32_t* echo_est) {\n    int i;\n\n    // During startup we store the channel every block.\n    memcpy(aecm->channelStored, aecm->channelAdapt16, sizeof(int16_t) * PART_LEN1);\n    // Recalculate echo estimate\n    for (i = 0; i < PART_LEN; i += 4)\n    {\n        echo_est[i] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i],\n                                           far_spectrum[i]);\n        echo_est[i + 1] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i + 1],\n                                           far_spectrum[i + 1]);\n        echo_est[i + 2] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i + 2],\n                                           far_spectrum[i + 2]);\n        echo_est[i + 3] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i + 3],\n                                           far_spectrum[i + 3]);\n    }\n    echo_est[i] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i],\n                                       far_spectrum[i]);\n}\n\nstatic void ResetAdaptiveChannelC(AecmCore* aecm) {\n    int i;\n\n    // The stored channel has a significantly lower MSE than the adaptive one for\n    // two consecutive calculations. Reset the adaptive channel.\n    memcpy(aecm->channelAdapt16, aecm->channelStored,\n           sizeof(int16_t) * PART_LEN1);\n    // Restore the W32 channel\n    for (i = 0; i < PART_LEN; i += 4)\n    {\n        aecm->channelAdapt32[i] = (int32_t)aecm->channelStored[i] << 16;\n        aecm->channelAdapt32[i + 1] = (int32_t)aecm->channelStored[i + 1] << 16;\n        aecm->channelAdapt32[i + 2] = (int32_t)aecm->channelStored[i + 2] << 16;\n        aecm->channelAdapt32[i + 3] = (int32_t)aecm->channelStored[i + 3] << 16;\n    }\n    aecm->channelAdapt32[i] = (int32_t)aecm->channelStored[i] << 16;\n}\n\n// Initialize function pointers for ARM Neon platform.\n#if defined(WEBRTC_HAS_NEON)\nstatic void WebRtcAecm_InitNeon(void)\n{\n  WebRtcAecm_StoreAdaptiveChannel = WebRtcAecm_StoreAdaptiveChannelNeon;\n  WebRtcAecm_ResetAdaptiveChannel = WebRtcAecm_ResetAdaptiveChannelNeon;\n  WebRtcAecm_CalcLinearEnergies = WebRtcAecm_CalcLinearEnergiesNeon;\n}\n#endif\n\n// Initialize function pointers for MIPS platform.\n#if defined(MIPS32_LE)\nstatic void WebRtcAecm_InitMips(void)\n{\n#if defined(MIPS_DSP_R1_LE)\n  WebRtcAecm_StoreAdaptiveChannel = WebRtcAecm_StoreAdaptiveChannel_mips;\n  WebRtcAecm_ResetAdaptiveChannel = WebRtcAecm_ResetAdaptiveChannel_mips;\n#endif\n  WebRtcAecm_CalcLinearEnergies = WebRtcAecm_CalcLinearEnergies_mips;\n}\n#endif\n\n// WebRtcAecm_InitCore(...)\n//\n// This function initializes the AECM instant created with WebRtcAecm_CreateCore(...)\n// Input:\n//      - aecm            : Pointer to the Echo Suppression instance\n//      - samplingFreq   : Sampling Frequency\n//\n// Output:\n//      - aecm            : Initialized instance\n//\n// Return value         :  0 - Ok\n//                        -1 - Error\n//\nint WebRtcAecm_InitCore(AecmCore* const aecm, int samplingFreq) {\n    int i = 0;\n    int32_t tmp32 = PART_LEN1 * PART_LEN1;\n    int16_t tmp16 = PART_LEN1;\n\n    /*if (samplingFreq != 8000 && samplingFreq != 16000)\n    {\n        samplingFreq = 8000;\n        return -1;\n    }*/\n    // sanity check of sampling frequency\n    aecm->mult = (int16_t)samplingFreq / 8000;\n\n    aecm->farBufWritePos = 0;\n    aecm->farBufReadPos = 0;\n    aecm->knownDelay = 0;\n    aecm->lastKnownDelay = 0;\n\n    WebRtc_InitBuffer(aecm->farFrameBuf);\n    WebRtc_InitBuffer(aecm->nearNoisyFrameBuf);\n    WebRtc_InitBuffer(aecm->nearCleanFrameBuf);\n    WebRtc_InitBuffer(aecm->outFrameBuf);\n\n    memset(aecm->xBuf_buf, 0, sizeof(aecm->xBuf_buf));\n    memset(aecm->dBufClean_buf, 0, sizeof(aecm->dBufClean_buf));\n    memset(aecm->dBufNoisy_buf, 0, sizeof(aecm->dBufNoisy_buf));\n    memset(aecm->outBuf_buf, 0, sizeof(aecm->outBuf_buf));\n\n    aecm->seed = 666;\n    aecm->totCount = 0;\n\n    if (WebRtc_InitDelayEstimatorFarend(aecm->delay_estimator_farend) != 0) {\n      return -1;\n    }\n    if (WebRtc_InitDelayEstimator(aecm->delay_estimator) != 0) {\n      return -1;\n    }\n    // Set far end histories to zero\n    memset(aecm->far_history, 0, sizeof(uint16_t) * PART_LEN1 * MAX_DELAY);\n    memset(aecm->far_q_domains, 0, sizeof(int) * MAX_DELAY);\n    aecm->far_history_pos = MAX_DELAY;\n\n    aecm->nlpFlag = 1;\n    aecm->fixedDelay = -1;\n\n    aecm->dfaCleanQDomain = 0;\n    aecm->dfaCleanQDomainOld = 0;\n    aecm->dfaNoisyQDomain = 0;\n    aecm->dfaNoisyQDomainOld = 0;\n\n    memset(aecm->nearLogEnergy, 0, sizeof(aecm->nearLogEnergy));\n    aecm->farLogEnergy = 0;\n    memset(aecm->echoAdaptLogEnergy, 0, sizeof(aecm->echoAdaptLogEnergy));\n    memset(aecm->echoStoredLogEnergy, 0, sizeof(aecm->echoStoredLogEnergy));\n\n    // Initialize the echo channels with a stored shape.\n    if (samplingFreq == 8000)\n    {\n        WebRtcAecm_InitEchoPathCore(aecm, kChannelStored8kHz);\n    }\n    else\n    {\n        WebRtcAecm_InitEchoPathCore(aecm, kChannelStored16kHz);\n    }\n\n    memset(aecm->echoFilt, 0, sizeof(aecm->echoFilt));\n    memset(aecm->nearFilt, 0, sizeof(aecm->nearFilt));\n    aecm->noiseEstCtr = 0;\n\n    aecm->cngMode = AecmTrue;\n\n    memset(aecm->noiseEstTooLowCtr, 0, sizeof(aecm->noiseEstTooLowCtr));\n    memset(aecm->noiseEstTooHighCtr, 0, sizeof(aecm->noiseEstTooHighCtr));\n    // Shape the initial noise level to an approximate pink noise.\n    for (i = 0; i < (PART_LEN1 >> 1) - 1; i++)\n    {\n        aecm->noiseEst[i] = (tmp32 << 8);\n        tmp16--;\n        tmp32 -= (int32_t)((tmp16 << 1) + 1);\n    }\n    for (; i < PART_LEN1; i++)\n    {\n        aecm->noiseEst[i] = (tmp32 << 8);\n    }\n\n    aecm->farEnergyMin = WEBRTC_SPL_WORD16_MAX;\n    aecm->farEnergyMax = WEBRTC_SPL_WORD16_MIN;\n    aecm->farEnergyMaxMin = 0;\n    aecm->farEnergyVAD = FAR_ENERGY_MIN; // This prevents false speech detection at the\n                                         // beginning.\n    aecm->farEnergyMSE = 0;\n    aecm->currentVADValue = 0;\n    aecm->vadUpdateCount = 0;\n    aecm->firstVAD = 1;\n\n    aecm->startupState = 0;\n    aecm->supGain = SUPGAIN_DEFAULT;\n    aecm->supGainOld = SUPGAIN_DEFAULT;\n\n    aecm->supGainErrParamA = SUPGAIN_ERROR_PARAM_A;\n    aecm->supGainErrParamD = SUPGAIN_ERROR_PARAM_D;\n    aecm->supGainErrParamDiffAB = SUPGAIN_ERROR_PARAM_A - SUPGAIN_ERROR_PARAM_B;\n    aecm->supGainErrParamDiffBD = SUPGAIN_ERROR_PARAM_B - SUPGAIN_ERROR_PARAM_D;\n\n    // Assert a preprocessor definition at compile-time. It's an assumption\n    // used in assembly code, so check the assembly files before any change.\n    static_assert(PART_LEN % 16 == 0, \"PART_LEN is not a multiple of 16\");\n\n    // Initialize function pointers.\n    WebRtcAecm_CalcLinearEnergies = CalcLinearEnergiesC;\n    WebRtcAecm_StoreAdaptiveChannel = StoreAdaptiveChannelC;\n    WebRtcAecm_ResetAdaptiveChannel = ResetAdaptiveChannelC;\n\n#if defined(WEBRTC_HAS_NEON)\n    WebRtcAecm_InitNeon();\n#endif\n\n#if defined(MIPS32_LE)\n    WebRtcAecm_InitMips();\n#endif\n    return 0;\n}\n\n// TODO(bjornv): This function is currently not used. Add support for these\n// parameters from a higher level\nint WebRtcAecm_Control(AecmCore* aecm, int delay, int nlpFlag) {\n    aecm->nlpFlag = nlpFlag;\n    aecm->fixedDelay = delay;\n\n    return 0;\n}\n\nvoid WebRtcAecm_FreeCore(AecmCore* aecm) {\n    if (aecm == NULL) {\n      return;\n    }\n\n    WebRtc_FreeBuffer(aecm->farFrameBuf);\n    WebRtc_FreeBuffer(aecm->nearNoisyFrameBuf);\n    WebRtc_FreeBuffer(aecm->nearCleanFrameBuf);\n    WebRtc_FreeBuffer(aecm->outFrameBuf);\n\n    WebRtc_FreeDelayEstimator(aecm->delay_estimator);\n    WebRtc_FreeDelayEstimatorFarend(aecm->delay_estimator_farend);\n    WebRtcSpl_FreeRealFFT(aecm->real_fft);\n\n    free(aecm);\n}\n\nint WebRtcAecm_ProcessFrame(AecmCore* aecm,\n                            const int16_t* farend,\n                            const int16_t* nearendNoisy,\n                            const int16_t* nearendClean,\n                            int16_t* out) {\n    int16_t outBlock_buf[PART_LEN + 8]; // Align buffer to 8-byte boundary.\n    int16_t* outBlock = (int16_t*) (((uintptr_t) outBlock_buf + 15) & ~ 15);\n\n    int16_t farFrame[FRAME_LEN];\n    const int16_t* out_ptr = NULL;\n    int size = 0;\n\n    // Buffer the current frame.\n    // Fetch an older one corresponding to the delay.\n    WebRtcAecm_BufferFarFrame(aecm, farend, FRAME_LEN);\n    WebRtcAecm_FetchFarFrame(aecm, farFrame, FRAME_LEN, aecm->knownDelay);\n\n    // Buffer the synchronized far and near frames,\n    // to pass the smaller blocks individually.\n    WebRtc_WriteBuffer(aecm->farFrameBuf, farFrame, FRAME_LEN);\n    WebRtc_WriteBuffer(aecm->nearNoisyFrameBuf, nearendNoisy, FRAME_LEN);\n    if (nearendClean != NULL)\n    {\n        WebRtc_WriteBuffer(aecm->nearCleanFrameBuf, nearendClean, FRAME_LEN);\n    }\n\n    // Process as many blocks as possible.\n    while (WebRtc_available_read(aecm->farFrameBuf) >= PART_LEN)\n    {\n        int16_t far_block[PART_LEN];\n        const int16_t* far_block_ptr = NULL;\n        int16_t near_noisy_block[PART_LEN];\n        const int16_t* near_noisy_block_ptr = NULL;\n\n        WebRtc_ReadBuffer(aecm->farFrameBuf, (void**) &far_block_ptr, far_block,\n                          PART_LEN);\n        WebRtc_ReadBuffer(aecm->nearNoisyFrameBuf,\n                          (void**) &near_noisy_block_ptr,\n                          near_noisy_block,\n                          PART_LEN);\n        if (nearendClean != NULL)\n        {\n            int16_t near_clean_block[PART_LEN];\n            const int16_t* near_clean_block_ptr = NULL;\n\n            WebRtc_ReadBuffer(aecm->nearCleanFrameBuf,\n                              (void**) &near_clean_block_ptr,\n                              near_clean_block,\n                              PART_LEN);\n            if (WebRtcAecm_ProcessBlock(aecm,\n                                        far_block_ptr,\n                                        near_noisy_block_ptr,\n                                        near_clean_block_ptr,\n                                        outBlock) == -1)\n            {\n                return -1;\n            }\n        } else\n        {\n            if (WebRtcAecm_ProcessBlock(aecm,\n                                        far_block_ptr,\n                                        near_noisy_block_ptr,\n                                        NULL,\n                                        outBlock) == -1)\n            {\n                return -1;\n            }\n        }\n\n        WebRtc_WriteBuffer(aecm->outFrameBuf, outBlock, PART_LEN);\n    }\n\n    // Stuff the out buffer if we have less than a frame to output.\n    // This should only happen for the first frame.\n    size = (int) WebRtc_available_read(aecm->outFrameBuf);\n    if (size < FRAME_LEN)\n    {\n        WebRtc_MoveReadPtr(aecm->outFrameBuf, size - FRAME_LEN);\n    }\n\n    // Obtain an output frame.\n    WebRtc_ReadBuffer(aecm->outFrameBuf, (void**) &out_ptr, out, FRAME_LEN);\n    if (out_ptr != out) {\n      // ReadBuffer() hasn't copied to |out| in this case.\n      memcpy(out, out_ptr, FRAME_LEN * sizeof(int16_t));\n    }\n\n    return 0;\n}\n\n// WebRtcAecm_AsymFilt(...)\n//\n// Performs asymmetric filtering.\n//\n// Inputs:\n//      - filtOld       : Previous filtered value.\n//      - inVal         : New input value.\n//      - stepSizePos   : Step size when we have a positive contribution.\n//      - stepSizeNeg   : Step size when we have a negative contribution.\n//\n// Output:\n//\n// Return: - Filtered value.\n//\nint16_t WebRtcAecm_AsymFilt(const int16_t filtOld, const int16_t inVal,\n                            const int16_t stepSizePos,\n                            const int16_t stepSizeNeg)\n{\n    int16_t retVal;\n\n    if ((filtOld == WEBRTC_SPL_WORD16_MAX) | (filtOld == WEBRTC_SPL_WORD16_MIN))\n    {\n        return inVal;\n    }\n    retVal = filtOld;\n    if (filtOld > inVal)\n    {\n        retVal -= (filtOld - inVal) >> stepSizeNeg;\n    } else\n    {\n        retVal += (inVal - filtOld) >> stepSizePos;\n    }\n\n    return retVal;\n}\n\n// ExtractFractionPart(a, zeros)\n//\n// returns the fraction part of |a|, with |zeros| number of leading zeros, as an\n// int16_t scaled to Q8. There is no sanity check of |a| in the sense that the\n// number of zeros match.\nstatic int16_t ExtractFractionPart(uint32_t a, int zeros) {\n  return (int16_t)(((a << zeros) & 0x7FFFFFFF) >> 23);\n}\n\n// Calculates and returns the log of |energy| in Q8. The input |energy| is\n// supposed to be in Q(|q_domain|).\nstatic int16_t LogOfEnergyInQ8(uint32_t energy, int q_domain) {\n  static const int16_t kLogLowValue = PART_LEN_SHIFT << 7;\n  int16_t log_energy_q8 = kLogLowValue;\n  if (energy > 0) {\n    int zeros = WebRtcSpl_NormU32(energy);\n    int16_t frac = ExtractFractionPart(energy, zeros);\n    // log2 of |energy| in Q8.\n    log_energy_q8 += ((31 - zeros) << 8) + frac - (q_domain << 8);\n  }\n  return log_energy_q8;\n}\n\n// WebRtcAecm_CalcEnergies(...)\n//\n// This function calculates the log of energies for nearend, farend and estimated\n// echoes. There is also an update of energy decision levels, i.e. internal VAD.\n//\n//\n// @param  aecm         [i/o]   Handle of the AECM instance.\n// @param  far_spectrum [in]    Pointer to farend spectrum.\n// @param  far_q        [in]    Q-domain of farend spectrum.\n// @param  nearEner     [in]    Near end energy for current block in\n//                              Q(aecm->dfaQDomain).\n// @param  echoEst      [out]   Estimated echo in Q(xfa_q+RESOLUTION_CHANNEL16).\n//\nvoid WebRtcAecm_CalcEnergies(AecmCore* aecm,\n                             const uint16_t* far_spectrum,\n                             const int16_t far_q,\n                             const uint32_t nearEner,\n                             int32_t* echoEst) {\n    // Local variables\n    uint32_t tmpAdapt = 0;\n    uint32_t tmpStored = 0;\n    uint32_t tmpFar = 0;\n\n    int i;\n\n    int16_t tmp16;\n    int16_t increase_max_shifts = 4;\n    int16_t decrease_max_shifts = 11;\n    int16_t increase_min_shifts = 11;\n    int16_t decrease_min_shifts = 3;\n\n    // Get log of near end energy and store in buffer\n\n    // Shift buffer\n    memmove(aecm->nearLogEnergy + 1, aecm->nearLogEnergy,\n            sizeof(int16_t) * (MAX_BUF_LEN - 1));\n\n    // Logarithm of integrated magnitude spectrum (nearEner)\n    aecm->nearLogEnergy[0] = LogOfEnergyInQ8(nearEner, aecm->dfaNoisyQDomain);\n\n    WebRtcAecm_CalcLinearEnergies(aecm, far_spectrum, echoEst, &tmpFar, &tmpAdapt, &tmpStored);\n\n    // Shift buffers\n    memmove(aecm->echoAdaptLogEnergy + 1, aecm->echoAdaptLogEnergy,\n            sizeof(int16_t) * (MAX_BUF_LEN - 1));\n    memmove(aecm->echoStoredLogEnergy + 1, aecm->echoStoredLogEnergy,\n            sizeof(int16_t) * (MAX_BUF_LEN - 1));\n\n    // Logarithm of delayed far end energy\n    aecm->farLogEnergy = LogOfEnergyInQ8(tmpFar, far_q);\n\n    // Logarithm of estimated echo energy through adapted channel\n    aecm->echoAdaptLogEnergy[0] = LogOfEnergyInQ8(tmpAdapt,\n                                                  RESOLUTION_CHANNEL16 + far_q);\n\n    // Logarithm of estimated echo energy through stored channel\n    aecm->echoStoredLogEnergy[0] =\n        LogOfEnergyInQ8(tmpStored, RESOLUTION_CHANNEL16 + far_q);\n\n    // Update farend energy levels (min, max, vad, mse)\n    if (aecm->farLogEnergy > FAR_ENERGY_MIN)\n    {\n        if (aecm->startupState == 0)\n        {\n            increase_max_shifts = 2;\n            decrease_min_shifts = 2;\n            increase_min_shifts = 8;\n        }\n\n        aecm->farEnergyMin = WebRtcAecm_AsymFilt(aecm->farEnergyMin, aecm->farLogEnergy,\n                                                 increase_min_shifts, decrease_min_shifts);\n        aecm->farEnergyMax = WebRtcAecm_AsymFilt(aecm->farEnergyMax, aecm->farLogEnergy,\n                                                 increase_max_shifts, decrease_max_shifts);\n        aecm->farEnergyMaxMin = (aecm->farEnergyMax - aecm->farEnergyMin);\n\n        // Dynamic VAD region size\n        tmp16 = 2560 - aecm->farEnergyMin;\n        if (tmp16 > 0)\n        {\n          tmp16 = (int16_t)((tmp16 * FAR_ENERGY_VAD_REGION) >> 9);\n        } else\n        {\n            tmp16 = 0;\n        }\n        tmp16 += FAR_ENERGY_VAD_REGION;\n\n        if ((aecm->startupState == 0) | (aecm->vadUpdateCount > 1024))\n        {\n            // In startup phase or VAD update halted\n            aecm->farEnergyVAD = aecm->farEnergyMin + tmp16;\n        } else\n        {\n            if (aecm->farEnergyVAD > aecm->farLogEnergy)\n            {\n                aecm->farEnergyVAD +=\n                    (aecm->farLogEnergy + tmp16 - aecm->farEnergyVAD) >> 6;\n                aecm->vadUpdateCount = 0;\n            } else\n            {\n                aecm->vadUpdateCount++;\n            }\n        }\n        // Put MSE threshold higher than VAD\n        aecm->farEnergyMSE = aecm->farEnergyVAD + (1 << 8);\n    }\n\n    // Update VAD variables\n    if (aecm->farLogEnergy > aecm->farEnergyVAD)\n    {\n        if ((aecm->startupState == 0) | (aecm->farEnergyMaxMin > FAR_ENERGY_DIFF))\n        {\n            // We are in startup or have significant dynamics in input speech level\n            aecm->currentVADValue = 1;\n        }\n    } else\n    {\n        aecm->currentVADValue = 0;\n    }\n    if ((aecm->currentVADValue) && (aecm->firstVAD))\n    {\n        aecm->firstVAD = 0;\n        if (aecm->echoAdaptLogEnergy[0] > aecm->nearLogEnergy[0])\n        {\n            // The estimated echo has higher energy than the near end signal.\n            // This means that the initialization was too aggressive. Scale\n            // down by a factor 8\n            for (i = 0; i < PART_LEN1; i++)\n            {\n                aecm->channelAdapt16[i] >>= 3;\n            }\n            // Compensate the adapted echo energy level accordingly.\n            aecm->echoAdaptLogEnergy[0] -= (3 << 8);\n            aecm->firstVAD = 1;\n        }\n    }\n}\n\n// WebRtcAecm_CalcStepSize(...)\n//\n// This function calculates the step size used in channel estimation\n//\n//\n// @param  aecm  [in]    Handle of the AECM instance.\n// @param  mu    [out]   (Return value) Stepsize in log2(), i.e. number of shifts.\n//\n//\nint16_t WebRtcAecm_CalcStepSize(AecmCore* const aecm) {\n    int32_t tmp32;\n    int16_t tmp16;\n    int16_t mu = MU_MAX;\n\n    // Here we calculate the step size mu used in the\n    // following NLMS based Channel estimation algorithm\n    if (!aecm->currentVADValue)\n    {\n        // Far end energy level too low, no channel update\n        mu = 0;\n    } else if (aecm->startupState > 0)\n    {\n        if (aecm->farEnergyMin >= aecm->farEnergyMax)\n        {\n            mu = MU_MIN;\n        } else\n        {\n            tmp16 = (aecm->farLogEnergy - aecm->farEnergyMin);\n            tmp32 = tmp16 * MU_DIFF;\n            tmp32 = WebRtcSpl_DivW32W16(tmp32, aecm->farEnergyMaxMin);\n            mu = MU_MIN - 1 - (int16_t)(tmp32);\n            // The -1 is an alternative to rounding. This way we get a larger\n            // stepsize, so we in some sense compensate for truncation in NLMS\n        }\n        if (mu < MU_MAX)\n        {\n            mu = MU_MAX; // Equivalent with maximum step size of 2^-MU_MAX\n        }\n    }\n\n    return mu;\n}\n\n// WebRtcAecm_UpdateChannel(...)\n//\n// This function performs channel estimation. NLMS and decision on channel storage.\n//\n//\n// @param  aecm         [i/o]   Handle of the AECM instance.\n// @param  far_spectrum [in]    Absolute value of the farend signal in Q(far_q)\n// @param  far_q        [in]    Q-domain of the farend signal\n// @param  dfa          [in]    Absolute value of the nearend signal (Q[aecm->dfaQDomain])\n// @param  mu           [in]    NLMS step size.\n// @param  echoEst      [i/o]   Estimated echo in Q(far_q+RESOLUTION_CHANNEL16).\n//\nvoid WebRtcAecm_UpdateChannel(AecmCore* aecm,\n                              const uint16_t* far_spectrum,\n                              const int16_t far_q,\n                              const uint16_t* const dfa,\n                              const int16_t mu,\n                              int32_t* echoEst) {\n    uint32_t tmpU32no1, tmpU32no2;\n    int32_t tmp32no1, tmp32no2;\n    int32_t mseStored;\n    int32_t mseAdapt;\n\n    int i;\n\n    int16_t zerosFar, zerosNum, zerosCh, zerosDfa;\n    int16_t shiftChFar, shiftNum, shift2ResChan;\n    int16_t tmp16no1;\n    int16_t xfaQ, dfaQ;\n\n    // This is the channel estimation algorithm. It is base on NLMS but has a variable step\n    // length, which was calculated above.\n    if (mu)\n    {\n        for (i = 0; i < PART_LEN1; i++)\n        {\n            // Determine norm of channel and farend to make sure we don't get overflow in\n            // multiplication\n            zerosCh = WebRtcSpl_NormU32(aecm->channelAdapt32[i]);\n            zerosFar = WebRtcSpl_NormU32((uint32_t)far_spectrum[i]);\n            if (zerosCh + zerosFar > 31)\n            {\n                // Multiplication is safe\n                tmpU32no1 = WEBRTC_SPL_UMUL_32_16(aecm->channelAdapt32[i],\n                        far_spectrum[i]);\n                shiftChFar = 0;\n            } else\n            {\n                // We need to shift down before multiplication\n                shiftChFar = 32 - zerosCh - zerosFar;\n                tmpU32no1 = (aecm->channelAdapt32[i] >> shiftChFar) *\n                    far_spectrum[i];\n            }\n            // Determine Q-domain of numerator\n            zerosNum = WebRtcSpl_NormU32(tmpU32no1);\n            if (dfa[i])\n            {\n                zerosDfa = WebRtcSpl_NormU32((uint32_t)dfa[i]);\n            } else\n            {\n                zerosDfa = 32;\n            }\n            tmp16no1 = zerosDfa - 2 + aecm->dfaNoisyQDomain -\n                RESOLUTION_CHANNEL32 - far_q + shiftChFar;\n            if (zerosNum > tmp16no1 + 1)\n            {\n                xfaQ = tmp16no1;\n                dfaQ = zerosDfa - 2;\n            } else\n            {\n                xfaQ = zerosNum - 2;\n                dfaQ = RESOLUTION_CHANNEL32 + far_q - aecm->dfaNoisyQDomain -\n                    shiftChFar + xfaQ;\n            }\n            // Add in the same Q-domain\n            tmpU32no1 = WEBRTC_SPL_SHIFT_W32(tmpU32no1, xfaQ);\n            tmpU32no2 = WEBRTC_SPL_SHIFT_W32((uint32_t)dfa[i], dfaQ);\n            tmp32no1 = (int32_t)tmpU32no2 - (int32_t)tmpU32no1;\n            zerosNum = WebRtcSpl_NormW32(tmp32no1);\n            if ((tmp32no1) && (far_spectrum[i] > (CHANNEL_VAD << far_q)))\n            {\n                //\n                // Update is needed\n                //\n                // This is what we would like to compute\n                //\n                // tmp32no1 = dfa[i] - (aecm->channelAdapt[i] * far_spectrum[i])\n                // tmp32norm = (i + 1)\n                // aecm->channelAdapt[i] += (2^mu) * tmp32no1\n                //                        / (tmp32norm * far_spectrum[i])\n                //\n\n                // Make sure we don't get overflow in multiplication.\n                if (zerosNum + zerosFar > 31)\n                {\n                    if (tmp32no1 > 0)\n                    {\n                        tmp32no2 = (int32_t)WEBRTC_SPL_UMUL_32_16(tmp32no1,\n                                                                        far_spectrum[i]);\n                    } else\n                    {\n                        tmp32no2 = -(int32_t)WEBRTC_SPL_UMUL_32_16(-tmp32no1,\n                                                                         far_spectrum[i]);\n                    }\n                    shiftNum = 0;\n                } else\n                {\n                    shiftNum = 32 - (zerosNum + zerosFar);\n                    if (tmp32no1 > 0)\n                    {\n                        tmp32no2 = (tmp32no1 >> shiftNum) * far_spectrum[i];\n                    } else\n                    {\n                        tmp32no2 = -((-tmp32no1 >> shiftNum) * far_spectrum[i]);\n                    }\n                }\n                // Normalize with respect to frequency bin\n                tmp32no2 = WebRtcSpl_DivW32W16(tmp32no2, i + 1);\n                // Make sure we are in the right Q-domain\n                shift2ResChan = shiftNum + shiftChFar - xfaQ - mu - ((30 - zerosFar) << 1);\n                if (WebRtcSpl_NormW32(tmp32no2) < shift2ResChan)\n                {\n                    tmp32no2 = WEBRTC_SPL_WORD32_MAX;\n                } else\n                {\n                    tmp32no2 = WEBRTC_SPL_SHIFT_W32(tmp32no2, shift2ResChan);\n                }\n                aecm->channelAdapt32[i] =\n                    WebRtcSpl_AddSatW32(aecm->channelAdapt32[i], tmp32no2);\n                if (aecm->channelAdapt32[i] < 0)\n                {\n                    // We can never have negative channel gain\n                    aecm->channelAdapt32[i] = 0;\n                }\n                aecm->channelAdapt16[i] =\n                    (int16_t)(aecm->channelAdapt32[i] >> 16);\n            }\n        }\n    }\n    // END: Adaptive channel update\n\n    // Determine if we should store or restore the channel\n    if ((aecm->startupState == 0) & (aecm->currentVADValue))\n    {\n        // During startup we store the channel every block,\n        // and we recalculate echo estimate\n        WebRtcAecm_StoreAdaptiveChannel(aecm, far_spectrum, echoEst);\n    } else\n    {\n        if (aecm->farLogEnergy < aecm->farEnergyMSE)\n        {\n            aecm->mseChannelCount = 0;\n        } else\n        {\n            aecm->mseChannelCount++;\n        }\n        // Enough data for validation. Store channel if we can.\n        if (aecm->mseChannelCount >= (MIN_MSE_COUNT + 10))\n        {\n            // We have enough data.\n            // Calculate MSE of \"Adapt\" and \"Stored\" versions.\n            // It is actually not MSE, but average absolute error.\n            mseStored = 0;\n            mseAdapt = 0;\n            for (i = 0; i < MIN_MSE_COUNT; i++)\n            {\n                tmp32no1 = ((int32_t)aecm->echoStoredLogEnergy[i]\n                        - (int32_t)aecm->nearLogEnergy[i]);\n                tmp32no2 = WEBRTC_SPL_ABS_W32(tmp32no1);\n                mseStored += tmp32no2;\n\n                tmp32no1 = ((int32_t)aecm->echoAdaptLogEnergy[i]\n                        - (int32_t)aecm->nearLogEnergy[i]);\n                tmp32no2 = WEBRTC_SPL_ABS_W32(tmp32no1);\n                mseAdapt += tmp32no2;\n            }\n            if (((mseStored << MSE_RESOLUTION) < (MIN_MSE_DIFF * mseAdapt))\n                    & ((aecm->mseStoredOld << MSE_RESOLUTION) < (MIN_MSE_DIFF\n                            * aecm->mseAdaptOld)))\n            {\n                // The stored channel has a significantly lower MSE than the adaptive one for\n                // two consecutive calculations. Reset the adaptive channel.\n                WebRtcAecm_ResetAdaptiveChannel(aecm);\n            } else if (((MIN_MSE_DIFF * mseStored) > (mseAdapt << MSE_RESOLUTION)) & (mseAdapt\n                    < aecm->mseThreshold) & (aecm->mseAdaptOld < aecm->mseThreshold))\n            {\n                // The adaptive channel has a significantly lower MSE than the stored one.\n                // The MSE for the adaptive channel has also been low for two consecutive\n                // calculations. Store the adaptive channel.\n                WebRtcAecm_StoreAdaptiveChannel(aecm, far_spectrum, echoEst);\n\n                // Update threshold\n                if (aecm->mseThreshold == WEBRTC_SPL_WORD32_MAX)\n                {\n                    aecm->mseThreshold = (mseAdapt + aecm->mseAdaptOld);\n                } else\n                {\n                  int scaled_threshold = aecm->mseThreshold * 5 / 8;\n                  aecm->mseThreshold +=\n                      ((mseAdapt - scaled_threshold) * 205) >> 8;\n                }\n\n            }\n\n            // Reset counter\n            aecm->mseChannelCount = 0;\n\n            // Store the MSE values.\n            aecm->mseStoredOld = mseStored;\n            aecm->mseAdaptOld = mseAdapt;\n        }\n    }\n    // END: Determine if we should store or reset channel estimate.\n}\n\n// CalcSuppressionGain(...)\n//\n// This function calculates the suppression gain that is used in the Wiener filter.\n//\n//\n// @param  aecm     [i/n]   Handle of the AECM instance.\n// @param  supGain  [out]   (Return value) Suppression gain with which to scale the noise\n//                          level (Q14).\n//\n//\nint16_t WebRtcAecm_CalcSuppressionGain(AecmCore* const aecm) {\n    int32_t tmp32no1;\n\n    int16_t supGain = SUPGAIN_DEFAULT;\n    int16_t tmp16no1;\n    int16_t dE = 0;\n\n    // Determine suppression gain used in the Wiener filter. The gain is based on a mix of far\n    // end energy and echo estimation error.\n    // Adjust for the far end signal level. A low signal level indicates no far end signal,\n    // hence we set the suppression gain to 0\n    if (!aecm->currentVADValue)\n    {\n        supGain = 0;\n    } else\n    {\n        // Adjust for possible double talk. If we have large variations in estimation error we\n        // likely have double talk (or poor channel).\n        tmp16no1 = (aecm->nearLogEnergy[0] - aecm->echoStoredLogEnergy[0] - ENERGY_DEV_OFFSET);\n        dE = WEBRTC_SPL_ABS_W16(tmp16no1);\n\n        if (dE < ENERGY_DEV_TOL)\n        {\n            // Likely no double talk. The better estimation, the more we can suppress signal.\n            // Update counters\n            if (dE < SUPGAIN_EPC_DT)\n            {\n                tmp32no1 = aecm->supGainErrParamDiffAB * dE;\n                tmp32no1 += (SUPGAIN_EPC_DT >> 1);\n                tmp16no1 = (int16_t)WebRtcSpl_DivW32W16(tmp32no1, SUPGAIN_EPC_DT);\n                supGain = aecm->supGainErrParamA - tmp16no1;\n            } else\n            {\n                tmp32no1 = aecm->supGainErrParamDiffBD * (ENERGY_DEV_TOL - dE);\n                tmp32no1 += ((ENERGY_DEV_TOL - SUPGAIN_EPC_DT) >> 1);\n                tmp16no1 = (int16_t)WebRtcSpl_DivW32W16(tmp32no1, (ENERGY_DEV_TOL\n                        - SUPGAIN_EPC_DT));\n                supGain = aecm->supGainErrParamD + tmp16no1;\n            }\n        } else\n        {\n            // Likely in double talk. Use default value\n            supGain = aecm->supGainErrParamD;\n        }\n    }\n\n    if (supGain > aecm->supGainOld)\n    {\n        tmp16no1 = supGain;\n    } else\n    {\n        tmp16no1 = aecm->supGainOld;\n    }\n    aecm->supGainOld = supGain;\n    if (tmp16no1 < aecm->supGain)\n    {\n        aecm->supGain += (int16_t)((tmp16no1 - aecm->supGain) >> 4);\n    } else\n    {\n        aecm->supGain += (int16_t)((tmp16no1 - aecm->supGain) >> 4);\n    }\n\n    // END: Update suppression gain\n\n    return aecm->supGain;\n}\n\nvoid WebRtcAecm_BufferFarFrame(AecmCore* const aecm,\n                               const int16_t* const farend,\n                               const int farLen) {\n    int writeLen = farLen, writePos = 0;\n\n    // Check if the write position must be wrapped\n    while (aecm->farBufWritePos + writeLen > FAR_BUF_LEN)\n    {\n        // Write to remaining buffer space before wrapping\n        writeLen = FAR_BUF_LEN - aecm->farBufWritePos;\n        memcpy(aecm->farBuf + aecm->farBufWritePos, farend + writePos,\n               sizeof(int16_t) * writeLen);\n        aecm->farBufWritePos = 0;\n        writePos = writeLen;\n        writeLen = farLen - writeLen;\n    }\n\n    memcpy(aecm->farBuf + aecm->farBufWritePos, farend + writePos,\n           sizeof(int16_t) * writeLen);\n    aecm->farBufWritePos += writeLen;\n}\n\nvoid WebRtcAecm_FetchFarFrame(AecmCore* const aecm,\n                              int16_t* const farend,\n                              const int farLen,\n                              const int knownDelay) {\n    int readLen = farLen;\n    int readPos = 0;\n    int delayChange = knownDelay - aecm->lastKnownDelay;\n\n    aecm->farBufReadPos -= delayChange;\n\n    // Check if delay forces a read position wrap\n    while (aecm->farBufReadPos < 0)\n    {\n        aecm->farBufReadPos += FAR_BUF_LEN;\n    }\n    while (aecm->farBufReadPos > FAR_BUF_LEN - 1)\n    {\n        aecm->farBufReadPos -= FAR_BUF_LEN;\n    }\n\n    aecm->lastKnownDelay = knownDelay;\n\n    // Check if read position must be wrapped\n    while (aecm->farBufReadPos + readLen > FAR_BUF_LEN)\n    {\n\n        // Read from remaining buffer space before wrapping\n        readLen = FAR_BUF_LEN - aecm->farBufReadPos;\n        memcpy(farend + readPos, aecm->farBuf + aecm->farBufReadPos,\n               sizeof(int16_t) * readLen);\n        aecm->farBufReadPos = 0;\n        readPos = readLen;\n        readLen = farLen - readLen;\n    }\n    memcpy(farend + readPos, aecm->farBuf + aecm->farBufReadPos,\n           sizeof(int16_t) * readLen);\n    aecm->farBufReadPos += readLen;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aecm/aecm_core.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// Performs echo control (suppression) with fft routines in fixed-point.\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AECM_AECM_CORE_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_AECM_AECM_CORE_H_\n\nextern \"C\" {\n#include \"webrtc/common_audio/ring_buffer.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n}\n#include \"webrtc/modules/audio_processing/aecm/aecm_defines.h\"\n#include \"webrtc/typedefs.h\"\n\n#ifdef _MSC_VER  // visual c++\n#define ALIGN8_BEG __declspec(align(8))\n#define ALIGN8_END\n#else  // gcc or icc\n#define ALIGN8_BEG\n#define ALIGN8_END __attribute__((aligned(8)))\n#endif\n\ntypedef struct {\n    int16_t real;\n    int16_t imag;\n} ComplexInt16;\n\ntypedef struct {\n    int farBufWritePos;\n    int farBufReadPos;\n    int knownDelay;\n    int lastKnownDelay;\n    int firstVAD;  // Parameter to control poorly initialized channels\n\n    RingBuffer* farFrameBuf;\n    RingBuffer* nearNoisyFrameBuf;\n    RingBuffer* nearCleanFrameBuf;\n    RingBuffer* outFrameBuf;\n\n    int16_t farBuf[FAR_BUF_LEN];\n\n    int16_t mult;\n    uint32_t seed;\n\n    // Delay estimation variables\n    void* delay_estimator_farend;\n    void* delay_estimator;\n    uint16_t currentDelay;\n    // Far end history variables\n    // TODO(bjornv): Replace |far_history| with ring_buffer.\n    uint16_t far_history[PART_LEN1 * MAX_DELAY];\n    int far_history_pos;\n    int far_q_domains[MAX_DELAY];\n\n    int16_t nlpFlag;\n    int16_t fixedDelay;\n\n    uint32_t totCount;\n\n    int16_t dfaCleanQDomain;\n    int16_t dfaCleanQDomainOld;\n    int16_t dfaNoisyQDomain;\n    int16_t dfaNoisyQDomainOld;\n\n    int16_t nearLogEnergy[MAX_BUF_LEN];\n    int16_t farLogEnergy;\n    int16_t echoAdaptLogEnergy[MAX_BUF_LEN];\n    int16_t echoStoredLogEnergy[MAX_BUF_LEN];\n\n    // The extra 16 or 32 bytes in the following buffers are for alignment based\n    // Neon code.\n    // It's designed this way since the current GCC compiler can't align a\n    // buffer in 16 or 32 byte boundaries properly.\n    int16_t channelStored_buf[PART_LEN1 + 8];\n    int16_t channelAdapt16_buf[PART_LEN1 + 8];\n    int32_t channelAdapt32_buf[PART_LEN1 + 8];\n    int16_t xBuf_buf[PART_LEN2 + 16];  // farend\n    int16_t dBufClean_buf[PART_LEN2 + 16];  // nearend\n    int16_t dBufNoisy_buf[PART_LEN2 + 16];  // nearend\n    int16_t outBuf_buf[PART_LEN + 8];\n\n    // Pointers to the above buffers\n    int16_t *channelStored;\n    int16_t *channelAdapt16;\n    int32_t *channelAdapt32;\n    int16_t *xBuf;\n    int16_t *dBufClean;\n    int16_t *dBufNoisy;\n    int16_t *outBuf;\n\n    int32_t echoFilt[PART_LEN1];\n    int16_t nearFilt[PART_LEN1];\n    int32_t noiseEst[PART_LEN1];\n    int           noiseEstTooLowCtr[PART_LEN1];\n    int           noiseEstTooHighCtr[PART_LEN1];\n    int16_t noiseEstCtr;\n    int16_t cngMode;\n\n    int32_t mseAdaptOld;\n    int32_t mseStoredOld;\n    int32_t mseThreshold;\n\n    int16_t farEnergyMin;\n    int16_t farEnergyMax;\n    int16_t farEnergyMaxMin;\n    int16_t farEnergyVAD;\n    int16_t farEnergyMSE;\n    int currentVADValue;\n    int16_t vadUpdateCount;\n\n    int16_t startupState;\n    int16_t mseChannelCount;\n    int16_t supGain;\n    int16_t supGainOld;\n\n    int16_t supGainErrParamA;\n    int16_t supGainErrParamD;\n    int16_t supGainErrParamDiffAB;\n    int16_t supGainErrParamDiffBD;\n\n    struct RealFFT* real_fft;\n\n#ifdef AEC_DEBUG\n    FILE *farFile;\n    FILE *nearFile;\n    FILE *outFile;\n#endif\n} AecmCore;\n\n////////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_CreateCore()\n//\n// Allocates the memory needed by the AECM. The memory needs to be\n// initialized separately using the WebRtcAecm_InitCore() function.\n// Returns a pointer to the instance and a nullptr at failure.\nAecmCore* WebRtcAecm_CreateCore();\n\n////////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_InitCore(...)\n//\n// This function initializes the AECM instant created with\n// WebRtcAecm_CreateCore()\n// Input:\n//      - aecm          : Pointer to the AECM instance\n//      - samplingFreq  : Sampling Frequency\n//\n// Output:\n//      - aecm          : Initialized instance\n//\n// Return value         :  0 - Ok\n//                        -1 - Error\n//\nint WebRtcAecm_InitCore(AecmCore* const aecm, int samplingFreq);\n\n////////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_FreeCore(...)\n//\n// This function releases the memory allocated by WebRtcAecm_CreateCore()\n// Input:\n//      - aecm          : Pointer to the AECM instance\n//\nvoid WebRtcAecm_FreeCore(AecmCore* aecm);\n\nint WebRtcAecm_Control(AecmCore* aecm, int delay, int nlpFlag);\n\n////////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_InitEchoPathCore(...)\n//\n// This function resets the echo channel adaptation with the specified channel.\n// Input:\n//      - aecm          : Pointer to the AECM instance\n//      - echo_path     : Pointer to the data that should initialize the echo\n//                        path\n//\n// Output:\n//      - aecm          : Initialized instance\n//\nvoid WebRtcAecm_InitEchoPathCore(AecmCore* aecm, const int16_t* echo_path);\n\n////////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_ProcessFrame(...)\n//\n// This function processes frames and sends blocks to\n// WebRtcAecm_ProcessBlock(...)\n//\n// Inputs:\n//      - aecm          : Pointer to the AECM instance\n//      - farend        : In buffer containing one frame of echo signal\n//      - nearendNoisy  : In buffer containing one frame of nearend+echo signal\n//                        without NS\n//      - nearendClean  : In buffer containing one frame of nearend+echo signal\n//                        with NS\n//\n// Output:\n//      - out           : Out buffer, one frame of nearend signal          :\n//\n//\nint WebRtcAecm_ProcessFrame(AecmCore* aecm,\n                            const int16_t* farend,\n                            const int16_t* nearendNoisy,\n                            const int16_t* nearendClean,\n                            int16_t* out);\n\n////////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_ProcessBlock(...)\n//\n// This function is called for every block within one frame\n// This function is called by WebRtcAecm_ProcessFrame(...)\n//\n// Inputs:\n//      - aecm          : Pointer to the AECM instance\n//      - farend        : In buffer containing one block of echo signal\n//      - nearendNoisy  : In buffer containing one frame of nearend+echo signal\n//                        without NS\n//      - nearendClean  : In buffer containing one frame of nearend+echo signal\n//                        with NS\n//\n// Output:\n//      - out           : Out buffer, one block of nearend signal          :\n//\n//\nint WebRtcAecm_ProcessBlock(AecmCore* aecm,\n                            const int16_t* farend,\n                            const int16_t* nearendNoisy,\n                            const int16_t* noisyClean,\n                            int16_t* out);\n\n////////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_BufferFarFrame()\n//\n// Inserts a frame of data into farend buffer.\n//\n// Inputs:\n//      - aecm          : Pointer to the AECM instance\n//      - farend        : In buffer containing one frame of farend signal\n//      - farLen        : Length of frame\n//\nvoid WebRtcAecm_BufferFarFrame(AecmCore* const aecm,\n                               const int16_t* const farend,\n                               const int farLen);\n\n////////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_FetchFarFrame()\n//\n// Read the farend buffer to account for known delay\n//\n// Inputs:\n//      - aecm          : Pointer to the AECM instance\n//      - farend        : In buffer containing one frame of farend signal\n//      - farLen        : Length of frame\n//      - knownDelay    : known delay\n//\nvoid WebRtcAecm_FetchFarFrame(AecmCore* const aecm,\n                              int16_t* const farend,\n                              const int farLen,\n                              const int knownDelay);\n\n// All the functions below are intended to be private\n\n////////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_UpdateFarHistory()\n//\n// Moves the pointer to the next entry and inserts |far_spectrum| and\n// corresponding Q-domain in its buffer.\n//\n// Inputs:\n//      - self          : Pointer to the delay estimation instance\n//      - far_spectrum  : Pointer to the far end spectrum\n//      - far_q         : Q-domain of far end spectrum\n//\nvoid WebRtcAecm_UpdateFarHistory(AecmCore* self,\n                                 uint16_t* far_spectrum,\n                                 int far_q);\n\n////////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_AlignedFarend()\n//\n// Returns a pointer to the far end spectrum aligned to current near end\n// spectrum. The function WebRtc_DelayEstimatorProcessFix(...) should have been\n// called before AlignedFarend(...). Otherwise, you get the pointer to the\n// previous frame. The memory is only valid until the next call of\n// WebRtc_DelayEstimatorProcessFix(...).\n//\n// Inputs:\n//      - self              : Pointer to the AECM instance.\n//      - delay             : Current delay estimate.\n//\n// Output:\n//      - far_q             : The Q-domain of the aligned far end spectrum\n//\n// Return value:\n//      - far_spectrum      : Pointer to the aligned far end spectrum\n//                            NULL - Error\n//\nconst uint16_t* WebRtcAecm_AlignedFarend(AecmCore* self, int* far_q, int delay);\n\n///////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_CalcSuppressionGain()\n//\n// This function calculates the suppression gain that is used in the\n// Wiener filter.\n//\n// Inputs:\n//      - aecm              : Pointer to the AECM instance.\n//\n// Return value:\n//      - supGain           : Suppression gain with which to scale the noise\n//                            level (Q14).\n//\nint16_t WebRtcAecm_CalcSuppressionGain(AecmCore* const aecm);\n\n///////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_CalcEnergies()\n//\n// This function calculates the log of energies for nearend, farend and\n// estimated echoes. There is also an update of energy decision levels,\n// i.e. internal VAD.\n//\n// Inputs:\n//      - aecm              : Pointer to the AECM instance.\n//      - far_spectrum      : Pointer to farend spectrum.\n//      - far_q             : Q-domain of farend spectrum.\n//      - nearEner          : Near end energy for current block in\n//                            Q(aecm->dfaQDomain).\n//\n// Output:\n//     - echoEst            : Estimated echo in Q(xfa_q+RESOLUTION_CHANNEL16).\n//\nvoid WebRtcAecm_CalcEnergies(AecmCore* aecm,\n                             const uint16_t* far_spectrum,\n                             const int16_t far_q,\n                             const uint32_t nearEner,\n                             int32_t* echoEst);\n\n///////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_CalcStepSize()\n//\n// This function calculates the step size used in channel estimation\n//\n// Inputs:\n//      - aecm              : Pointer to the AECM instance.\n//\n// Return value:\n//      - mu                : Stepsize in log2(), i.e. number of shifts.\n//\nint16_t WebRtcAecm_CalcStepSize(AecmCore* const aecm);\n\n///////////////////////////////////////////////////////////////////////////////\n// WebRtcAecm_UpdateChannel(...)\n//\n// This function performs channel estimation.\n// NLMS and decision on channel storage.\n//\n// Inputs:\n//      - aecm              : Pointer to the AECM instance.\n//      - far_spectrum      : Absolute value of the farend signal in Q(far_q)\n//      - far_q             : Q-domain of the farend signal\n//      - dfa               : Absolute value of the nearend signal\n//                            (Q[aecm->dfaQDomain])\n//      - mu                : NLMS step size.\n// Input/Output:\n//      - echoEst           : Estimated echo in Q(far_q+RESOLUTION_CHANNEL16).\n//\nvoid WebRtcAecm_UpdateChannel(AecmCore* aecm,\n                              const uint16_t* far_spectrum,\n                              const int16_t far_q,\n                              const uint16_t* const dfa,\n                              const int16_t mu,\n                              int32_t* echoEst);\n\nextern const int16_t WebRtcAecm_kCosTable[];\nextern const int16_t WebRtcAecm_kSinTable[];\n\n///////////////////////////////////////////////////////////////////////////////\n// Some function pointers, for internal functions shared by ARM NEON and\n// generic C code.\n//\ntypedef void (*CalcLinearEnergies)(AecmCore* aecm,\n                                   const uint16_t* far_spectrum,\n                                   int32_t* echoEst,\n                                   uint32_t* far_energy,\n                                   uint32_t* echo_energy_adapt,\n                                   uint32_t* echo_energy_stored);\nextern CalcLinearEnergies WebRtcAecm_CalcLinearEnergies;\n\ntypedef void (*StoreAdaptiveChannel)(AecmCore* aecm,\n                                     const uint16_t* far_spectrum,\n                                     int32_t* echo_est);\nextern StoreAdaptiveChannel WebRtcAecm_StoreAdaptiveChannel;\n\ntypedef void (*ResetAdaptiveChannel)(AecmCore* aecm);\nextern ResetAdaptiveChannel WebRtcAecm_ResetAdaptiveChannel;\n\n// For the above function pointers, functions for generic platforms are declared\n// and defined as static in file aecm_core.c, while those for ARM Neon platforms\n// are declared below and defined in file aecm_core_neon.c.\n#if defined(WEBRTC_HAS_NEON)\nvoid WebRtcAecm_CalcLinearEnergiesNeon(AecmCore* aecm,\n                                       const uint16_t* far_spectrum,\n                                       int32_t* echo_est,\n                                       uint32_t* far_energy,\n                                       uint32_t* echo_energy_adapt,\n                                       uint32_t* echo_energy_stored);\n\nvoid WebRtcAecm_StoreAdaptiveChannelNeon(AecmCore* aecm,\n                                         const uint16_t* far_spectrum,\n                                         int32_t* echo_est);\n\nvoid WebRtcAecm_ResetAdaptiveChannelNeon(AecmCore* aecm);\n#endif\n\n#if defined(MIPS32_LE)\nvoid WebRtcAecm_CalcLinearEnergies_mips(AecmCore* aecm,\n                                        const uint16_t* far_spectrum,\n                                        int32_t* echo_est,\n                                        uint32_t* far_energy,\n                                        uint32_t* echo_energy_adapt,\n                                        uint32_t* echo_energy_stored);\n#if defined(MIPS_DSP_R1_LE)\nvoid WebRtcAecm_StoreAdaptiveChannel_mips(AecmCore* aecm,\n                                          const uint16_t* far_spectrum,\n                                          int32_t* echo_est);\n\nvoid WebRtcAecm_ResetAdaptiveChannel_mips(AecmCore* aecm);\n#endif\n#endif\n\n#endif\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aecm/aecm_core_c.cc",
    "content": "/*\n *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/aecm/aecm_core.h\"\n\n#include <stddef.h>\n#include <stdlib.h>\n\nextern \"C\" {\n#include \"webrtc/common_audio/ring_buffer.h\"\n#include \"webrtc/common_audio/signal_processing/include/real_fft.h\"\n}\n#include \"webrtc/modules/audio_processing/aecm/echo_control_mobile.h\"\n#include \"webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h\"\nextern \"C\" {\n#include \"webrtc/system_wrappers/include/cpu_features_wrapper.h\"\n}\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/typedefs.h\"\n\n// Square root of Hanning window in Q14.\nstatic const ALIGN8_BEG int16_t WebRtcAecm_kSqrtHanning[] ALIGN8_END = {\n  0, 399, 798, 1196, 1594, 1990, 2386, 2780, 3172,\n  3562, 3951, 4337, 4720, 5101, 5478, 5853, 6224,\n  6591, 6954, 7313, 7668, 8019, 8364, 8705, 9040,\n  9370, 9695, 10013, 10326, 10633, 10933, 11227, 11514,\n  11795, 12068, 12335, 12594, 12845, 13089, 13325, 13553,\n  13773, 13985, 14189, 14384, 14571, 14749, 14918, 15079,\n  15231, 15373, 15506, 15631, 15746, 15851, 15947, 16034,\n  16111, 16179, 16237, 16286, 16325, 16354, 16373, 16384\n};\n\n#ifdef AECM_WITH_ABS_APPROX\n//Q15 alpha = 0.99439986968132  const Factor for magnitude approximation\nstatic const uint16_t kAlpha1 = 32584;\n//Q15 beta = 0.12967166976970   const Factor for magnitude approximation\nstatic const uint16_t kBeta1 = 4249;\n//Q15 alpha = 0.94234827210087  const Factor for magnitude approximation\nstatic const uint16_t kAlpha2 = 30879;\n//Q15 beta = 0.33787806009150   const Factor for magnitude approximation\nstatic const uint16_t kBeta2 = 11072;\n//Q15 alpha = 0.82247698684306  const Factor for magnitude approximation\nstatic const uint16_t kAlpha3 = 26951;\n//Q15 beta = 0.57762063060713   const Factor for magnitude approximation\nstatic const uint16_t kBeta3 = 18927;\n#endif\n\nstatic const int16_t kNoiseEstQDomain = 15;\nstatic const int16_t kNoiseEstIncCount = 5;\n\nstatic void ComfortNoise(AecmCore* aecm,\n                         const uint16_t* dfa,\n                         ComplexInt16* out,\n                         const int16_t* lambda);\n\nstatic void WindowAndFFT(AecmCore* aecm,\n                         int16_t* fft,\n                         const int16_t* time_signal,\n                         ComplexInt16* freq_signal,\n                         int time_signal_scaling) {\n  int i = 0;\n\n  // FFT of signal\n  for (i = 0; i < PART_LEN; i++) {\n    // Window time domain signal and insert into real part of\n    // transformation array |fft|\n    int16_t scaled_time_signal = time_signal[i] << time_signal_scaling;\n    fft[i] = (int16_t)((scaled_time_signal * WebRtcAecm_kSqrtHanning[i]) >> 14);\n    scaled_time_signal = time_signal[i + PART_LEN] << time_signal_scaling;\n    fft[PART_LEN + i] = (int16_t)((\n        scaled_time_signal * WebRtcAecm_kSqrtHanning[PART_LEN - i]) >> 14);\n  }\n\n  // Do forward FFT, then take only the first PART_LEN complex samples,\n  // and change signs of the imaginary parts.\n  WebRtcSpl_RealForwardFFT(aecm->real_fft, fft, (int16_t*)freq_signal);\n  for (i = 0; i < PART_LEN; i++) {\n    freq_signal[i].imag = -freq_signal[i].imag;\n  }\n}\n\nstatic void InverseFFTAndWindow(AecmCore* aecm,\n                                int16_t* fft,\n                                ComplexInt16* efw,\n                                int16_t* output,\n                                const int16_t* nearendClean) {\n  int i, j, outCFFT;\n  int32_t tmp32no1;\n  // Reuse |efw| for the inverse FFT output after transferring\n  // the contents to |fft|.\n  int16_t* ifft_out = (int16_t*)efw;\n\n  // Synthesis\n  for (i = 1, j = 2; i < PART_LEN; i += 1, j += 2) {\n    fft[j] = efw[i].real;\n    fft[j + 1] = -efw[i].imag;\n  }\n  fft[0] = efw[0].real;\n  fft[1] = -efw[0].imag;\n\n  fft[PART_LEN2] = efw[PART_LEN].real;\n  fft[PART_LEN2 + 1] = -efw[PART_LEN].imag;\n\n  // Inverse FFT. Keep outCFFT to scale the samples in the next block.\n  outCFFT = WebRtcSpl_RealInverseFFT(aecm->real_fft, fft, ifft_out);\n  for (i = 0; i < PART_LEN; i++) {\n    ifft_out[i] = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(\n                    ifft_out[i], WebRtcAecm_kSqrtHanning[i], 14);\n    tmp32no1 = WEBRTC_SPL_SHIFT_W32((int32_t)ifft_out[i],\n                                     outCFFT - aecm->dfaCleanQDomain);\n    output[i] = (int16_t)WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX,\n                                        tmp32no1 + aecm->outBuf[i],\n                                        WEBRTC_SPL_WORD16_MIN);\n\n    tmp32no1 = (ifft_out[PART_LEN + i] *\n        WebRtcAecm_kSqrtHanning[PART_LEN - i]) >> 14;\n    tmp32no1 = WEBRTC_SPL_SHIFT_W32(tmp32no1,\n                                    outCFFT - aecm->dfaCleanQDomain);\n    aecm->outBuf[i] = (int16_t)WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX,\n                                                tmp32no1,\n                                                WEBRTC_SPL_WORD16_MIN);\n  }\n\n  // Copy the current block to the old position\n  // (aecm->outBuf is shifted elsewhere)\n  memcpy(aecm->xBuf, aecm->xBuf + PART_LEN, sizeof(int16_t) * PART_LEN);\n  memcpy(aecm->dBufNoisy,\n         aecm->dBufNoisy + PART_LEN,\n         sizeof(int16_t) * PART_LEN);\n  if (nearendClean != NULL)\n  {\n    memcpy(aecm->dBufClean,\n           aecm->dBufClean + PART_LEN,\n           sizeof(int16_t) * PART_LEN);\n  }\n}\n\n// Transforms a time domain signal into the frequency domain, outputting the\n// complex valued signal, absolute value and sum of absolute values.\n//\n// time_signal          [in]    Pointer to time domain signal\n// freq_signal_real     [out]   Pointer to real part of frequency domain array\n// freq_signal_imag     [out]   Pointer to imaginary part of frequency domain\n//                              array\n// freq_signal_abs      [out]   Pointer to absolute value of frequency domain\n//                              array\n// freq_signal_sum_abs  [out]   Pointer to the sum of all absolute values in\n//                              the frequency domain array\n// return value                 The Q-domain of current frequency values\n//\nstatic int TimeToFrequencyDomain(AecmCore* aecm,\n                                 const int16_t* time_signal,\n                                 ComplexInt16* freq_signal,\n                                 uint16_t* freq_signal_abs,\n                                 uint32_t* freq_signal_sum_abs) {\n  int i = 0;\n  int time_signal_scaling = 0;\n\n  int32_t tmp32no1 = 0;\n  int32_t tmp32no2 = 0;\n\n  // In fft_buf, +16 for 32-byte alignment.\n  int16_t fft_buf[PART_LEN4 + 16];\n  int16_t *fft = (int16_t *) (((uintptr_t) fft_buf + 31) & ~31);\n\n  int16_t tmp16no1;\n#ifndef WEBRTC_ARCH_ARM_V7\n  int16_t tmp16no2;\n#endif\n#ifdef AECM_WITH_ABS_APPROX\n  int16_t max_value = 0;\n  int16_t min_value = 0;\n  uint16_t alpha = 0;\n  uint16_t beta = 0;\n#endif\n\n#ifdef AECM_DYNAMIC_Q\n  tmp16no1 = WebRtcSpl_MaxAbsValueW16(time_signal, PART_LEN2);\n  time_signal_scaling = WebRtcSpl_NormW16(tmp16no1);\n#endif\n\n  WindowAndFFT(aecm, fft, time_signal, freq_signal, time_signal_scaling);\n\n  // Extract imaginary and real part, calculate the magnitude for\n  // all frequency bins\n  freq_signal[0].imag = 0;\n  freq_signal[PART_LEN].imag = 0;\n  freq_signal_abs[0] = (uint16_t)WEBRTC_SPL_ABS_W16(freq_signal[0].real);\n  freq_signal_abs[PART_LEN] = (uint16_t)WEBRTC_SPL_ABS_W16(\n                                freq_signal[PART_LEN].real);\n  (*freq_signal_sum_abs) = (uint32_t)(freq_signal_abs[0]) +\n                           (uint32_t)(freq_signal_abs[PART_LEN]);\n\n  for (i = 1; i < PART_LEN; i++)\n  {\n    if (freq_signal[i].real == 0)\n    {\n      freq_signal_abs[i] = (uint16_t)WEBRTC_SPL_ABS_W16(freq_signal[i].imag);\n    }\n    else if (freq_signal[i].imag == 0)\n    {\n      freq_signal_abs[i] = (uint16_t)WEBRTC_SPL_ABS_W16(freq_signal[i].real);\n    }\n    else\n    {\n      // Approximation for magnitude of complex fft output\n      // magn = sqrt(real^2 + imag^2)\n      // magn ~= alpha * max(|imag|,|real|) + beta * min(|imag|,|real|)\n      //\n      // The parameters alpha and beta are stored in Q15\n\n#ifdef AECM_WITH_ABS_APPROX\n      tmp16no1 = WEBRTC_SPL_ABS_W16(freq_signal[i].real);\n      tmp16no2 = WEBRTC_SPL_ABS_W16(freq_signal[i].imag);\n\n      if(tmp16no1 > tmp16no2)\n      {\n        max_value = tmp16no1;\n        min_value = tmp16no2;\n      } else\n      {\n        max_value = tmp16no2;\n        min_value = tmp16no1;\n      }\n\n      // Magnitude in Q(-6)\n      if ((max_value >> 2) > min_value)\n      {\n        alpha = kAlpha1;\n        beta = kBeta1;\n      } else if ((max_value >> 1) > min_value)\n      {\n        alpha = kAlpha2;\n        beta = kBeta2;\n      } else\n      {\n        alpha = kAlpha3;\n        beta = kBeta3;\n      }\n      tmp16no1 = (int16_t)((max_value * alpha) >> 15);\n      tmp16no2 = (int16_t)((min_value * beta) >> 15);\n      freq_signal_abs[i] = (uint16_t)tmp16no1 + (uint16_t)tmp16no2;\n#else\n#ifdef WEBRTC_ARCH_ARM_V7\n      __asm __volatile(\n        \"smulbb %[tmp32no1], %[real], %[real]\\n\\t\"\n        \"smlabb %[tmp32no2], %[imag], %[imag], %[tmp32no1]\\n\\t\"\n        :[tmp32no1]\"+&r\"(tmp32no1),\n         [tmp32no2]\"=r\"(tmp32no2)\n        :[real]\"r\"(freq_signal[i].real),\n         [imag]\"r\"(freq_signal[i].imag)\n      );\n#else\n      tmp16no1 = WEBRTC_SPL_ABS_W16(freq_signal[i].real);\n      tmp16no2 = WEBRTC_SPL_ABS_W16(freq_signal[i].imag);\n      tmp32no1 = tmp16no1 * tmp16no1;\n      tmp32no2 = tmp16no2 * tmp16no2;\n      tmp32no2 = WebRtcSpl_AddSatW32(tmp32no1, tmp32no2);\n#endif // WEBRTC_ARCH_ARM_V7\n      tmp32no1 = WebRtcSpl_SqrtFloor(tmp32no2);\n\n      freq_signal_abs[i] = (uint16_t)tmp32no1;\n#endif // AECM_WITH_ABS_APPROX\n    }\n    (*freq_signal_sum_abs) += (uint32_t)freq_signal_abs[i];\n  }\n\n  return time_signal_scaling;\n}\n\nint WebRtcAecm_ProcessBlock(AecmCore* aecm,\n                            const int16_t* farend,\n                            const int16_t* nearendNoisy,\n                            const int16_t* nearendClean,\n                            int16_t* output) {\n  int i;\n\n  uint32_t xfaSum;\n  uint32_t dfaNoisySum;\n  uint32_t dfaCleanSum;\n  uint32_t echoEst32Gained;\n  uint32_t tmpU32;\n\n  int32_t tmp32no1;\n\n  uint16_t xfa[PART_LEN1];\n  uint16_t dfaNoisy[PART_LEN1];\n  uint16_t dfaClean[PART_LEN1];\n  uint16_t* ptrDfaClean = dfaClean;\n  const uint16_t* far_spectrum_ptr = NULL;\n\n  // 32 byte aligned buffers (with +8 or +16).\n  // TODO(kma): define fft with ComplexInt16.\n  int16_t fft_buf[PART_LEN4 + 2 + 16]; // +2 to make a loop safe.\n  int32_t echoEst32_buf[PART_LEN1 + 8];\n  int32_t dfw_buf[PART_LEN2 + 8];\n  int32_t efw_buf[PART_LEN2 + 8];\n\n  int16_t* fft = (int16_t*) (((uintptr_t) fft_buf + 31) & ~ 31);\n  int32_t* echoEst32 = (int32_t*) (((uintptr_t) echoEst32_buf + 31) & ~ 31);\n  ComplexInt16* dfw = (ComplexInt16*)(((uintptr_t)dfw_buf + 31) & ~31);\n  ComplexInt16* efw = (ComplexInt16*)(((uintptr_t)efw_buf + 31) & ~31);\n\n  int16_t hnl[PART_LEN1];\n  int16_t numPosCoef = 0;\n  int16_t nlpGain = ONE_Q14;\n  int delay;\n  int16_t tmp16no1;\n  int16_t tmp16no2;\n  int16_t mu;\n  int16_t supGain;\n  int16_t zeros32, zeros16;\n  int16_t zerosDBufNoisy, zerosDBufClean, zerosXBuf;\n  int far_q;\n  int16_t resolutionDiff, qDomainDiff, dfa_clean_q_domain_diff;\n\n  const int kMinPrefBand = 4;\n  const int kMaxPrefBand = 24;\n  int32_t avgHnl32 = 0;\n\n  // Determine startup state. There are three states:\n  // (0) the first CONV_LEN blocks\n  // (1) another CONV_LEN blocks\n  // (2) the rest\n\n  if (aecm->startupState < 2)\n  {\n    aecm->startupState = (aecm->totCount >= CONV_LEN) +\n                         (aecm->totCount >= CONV_LEN2);\n  }\n  // END: Determine startup state\n\n  // Buffer near and far end signals\n  memcpy(aecm->xBuf + PART_LEN, farend, sizeof(int16_t) * PART_LEN);\n  memcpy(aecm->dBufNoisy + PART_LEN, nearendNoisy, sizeof(int16_t) * PART_LEN);\n  if (nearendClean != NULL)\n  {\n    memcpy(aecm->dBufClean + PART_LEN,\n           nearendClean,\n           sizeof(int16_t) * PART_LEN);\n  }\n\n  // Transform far end signal from time domain to frequency domain.\n  far_q = TimeToFrequencyDomain(aecm,\n                                aecm->xBuf,\n                                dfw,\n                                xfa,\n                                &xfaSum);\n\n  // Transform noisy near end signal from time domain to frequency domain.\n  zerosDBufNoisy = TimeToFrequencyDomain(aecm,\n                                         aecm->dBufNoisy,\n                                         dfw,\n                                         dfaNoisy,\n                                         &dfaNoisySum);\n  aecm->dfaNoisyQDomainOld = aecm->dfaNoisyQDomain;\n  aecm->dfaNoisyQDomain = (int16_t)zerosDBufNoisy;\n\n\n  if (nearendClean == NULL)\n  {\n    ptrDfaClean = dfaNoisy;\n    aecm->dfaCleanQDomainOld = aecm->dfaNoisyQDomainOld;\n    aecm->dfaCleanQDomain = aecm->dfaNoisyQDomain;\n    dfaCleanSum = dfaNoisySum;\n  } else\n  {\n    // Transform clean near end signal from time domain to frequency domain.\n    zerosDBufClean = TimeToFrequencyDomain(aecm,\n                                           aecm->dBufClean,\n                                           dfw,\n                                           dfaClean,\n                                           &dfaCleanSum);\n    aecm->dfaCleanQDomainOld = aecm->dfaCleanQDomain;\n    aecm->dfaCleanQDomain = (int16_t)zerosDBufClean;\n  }\n\n  // Get the delay\n  // Save far-end history and estimate delay\n  WebRtcAecm_UpdateFarHistory(aecm, xfa, far_q);\n  if (WebRtc_AddFarSpectrumFix(aecm->delay_estimator_farend,\n                               xfa,\n                               PART_LEN1,\n                               far_q) == -1) {\n    return -1;\n  }\n  delay = WebRtc_DelayEstimatorProcessFix(aecm->delay_estimator,\n                                          dfaNoisy,\n                                          PART_LEN1,\n                                          zerosDBufNoisy);\n  if (delay == -1)\n  {\n    return -1;\n  }\n  else if (delay == -2)\n  {\n    // If the delay is unknown, we assume zero.\n    // NOTE: this will have to be adjusted if we ever add lookahead.\n    delay = 0;\n  }\n\n  if (aecm->fixedDelay >= 0)\n  {\n    // Use fixed delay\n    delay = aecm->fixedDelay;\n  }\n\n  // Get aligned far end spectrum\n  far_spectrum_ptr = WebRtcAecm_AlignedFarend(aecm, &far_q, delay);\n  zerosXBuf = (int16_t) far_q;\n  if (far_spectrum_ptr == NULL)\n  {\n    return -1;\n  }\n\n  // Calculate log(energy) and update energy threshold levels\n  WebRtcAecm_CalcEnergies(aecm,\n                          far_spectrum_ptr,\n                          zerosXBuf,\n                          dfaNoisySum,\n                          echoEst32);\n\n  // Calculate stepsize\n  mu = WebRtcAecm_CalcStepSize(aecm);\n\n  // Update counters\n  aecm->totCount++;\n\n  // This is the channel estimation algorithm.\n  // It is base on NLMS but has a variable step length,\n  // which was calculated above.\n  WebRtcAecm_UpdateChannel(aecm,\n                           far_spectrum_ptr,\n                           zerosXBuf,\n                           dfaNoisy,\n                           mu,\n                           echoEst32);\n  supGain = WebRtcAecm_CalcSuppressionGain(aecm);\n\n\n  // Calculate Wiener filter hnl[]\n  for (i = 0; i < PART_LEN1; i++)\n  {\n    // Far end signal through channel estimate in Q8\n    // How much can we shift right to preserve resolution\n    tmp32no1 = echoEst32[i] - aecm->echoFilt[i];\n    aecm->echoFilt[i] += (tmp32no1 * 50) >> 8;\n\n    zeros32 = WebRtcSpl_NormW32(aecm->echoFilt[i]) + 1;\n    zeros16 = WebRtcSpl_NormW16(supGain) + 1;\n    if (zeros32 + zeros16 > 16)\n    {\n      // Multiplication is safe\n      // Result in\n      // Q(RESOLUTION_CHANNEL+RESOLUTION_SUPGAIN+\n      //   aecm->xfaQDomainBuf[diff])\n      echoEst32Gained = WEBRTC_SPL_UMUL_32_16((uint32_t)aecm->echoFilt[i],\n                                              (uint16_t)supGain);\n      resolutionDiff = 14 - RESOLUTION_CHANNEL16 - RESOLUTION_SUPGAIN;\n      resolutionDiff += (aecm->dfaCleanQDomain - zerosXBuf);\n    } else\n    {\n      tmp16no1 = 17 - zeros32 - zeros16;\n      resolutionDiff = 14 + tmp16no1 - RESOLUTION_CHANNEL16 -\n                       RESOLUTION_SUPGAIN;\n      resolutionDiff += (aecm->dfaCleanQDomain - zerosXBuf);\n      if (zeros32 > tmp16no1)\n      {\n        echoEst32Gained = WEBRTC_SPL_UMUL_32_16((uint32_t)aecm->echoFilt[i],\n                                                supGain >> tmp16no1);\n      } else\n      {\n        // Result in Q-(RESOLUTION_CHANNEL+RESOLUTION_SUPGAIN-16)\n        echoEst32Gained = (aecm->echoFilt[i] >> tmp16no1) * supGain;\n      }\n    }\n\n    zeros16 = WebRtcSpl_NormW16(aecm->nearFilt[i]);\n    RTC_DCHECK_GE(zeros16, 0);  // |zeros16| is a norm, hence non-negative.\n    dfa_clean_q_domain_diff = aecm->dfaCleanQDomain - aecm->dfaCleanQDomainOld;\n    if (zeros16 < dfa_clean_q_domain_diff && aecm->nearFilt[i]) {\n      tmp16no1 = aecm->nearFilt[i] << zeros16;\n      qDomainDiff = zeros16 - dfa_clean_q_domain_diff;\n      tmp16no2 = ptrDfaClean[i] >> -qDomainDiff;\n    } else {\n      tmp16no1 = dfa_clean_q_domain_diff < 0\n          ? aecm->nearFilt[i] >> -dfa_clean_q_domain_diff\n          : aecm->nearFilt[i] << dfa_clean_q_domain_diff;\n      qDomainDiff = 0;\n      tmp16no2 = ptrDfaClean[i];\n    }\n    tmp32no1 = (int32_t)(tmp16no2 - tmp16no1);\n    tmp16no2 = (int16_t)(tmp32no1 >> 4);\n    tmp16no2 += tmp16no1;\n    zeros16 = WebRtcSpl_NormW16(tmp16no2);\n    if ((tmp16no2) & (-qDomainDiff > zeros16)) {\n      aecm->nearFilt[i] = WEBRTC_SPL_WORD16_MAX;\n    } else {\n      aecm->nearFilt[i] = qDomainDiff < 0 ? tmp16no2 << -qDomainDiff\n                                          : tmp16no2 >> qDomainDiff;\n    }\n\n    // Wiener filter coefficients, resulting hnl in Q14\n    if (echoEst32Gained == 0)\n    {\n      hnl[i] = ONE_Q14;\n    } else if (aecm->nearFilt[i] == 0)\n    {\n      hnl[i] = 0;\n    } else\n    {\n      // Multiply the suppression gain\n      // Rounding\n      echoEst32Gained += (uint32_t)(aecm->nearFilt[i] >> 1);\n      tmpU32 = WebRtcSpl_DivU32U16(echoEst32Gained,\n                                   (uint16_t)aecm->nearFilt[i]);\n\n      // Current resolution is\n      // Q-(RESOLUTION_CHANNEL+RESOLUTION_SUPGAIN- max(0,17-zeros16- zeros32))\n      // Make sure we are in Q14\n      tmp32no1 = (int32_t)WEBRTC_SPL_SHIFT_W32(tmpU32, resolutionDiff);\n      if (tmp32no1 > ONE_Q14)\n      {\n        hnl[i] = 0;\n      } else if (tmp32no1 < 0)\n      {\n        hnl[i] = ONE_Q14;\n      } else\n      {\n        // 1-echoEst/dfa\n        hnl[i] = ONE_Q14 - (int16_t)tmp32no1;\n        if (hnl[i] < 0)\n        {\n          hnl[i] = 0;\n        }\n      }\n    }\n    if (hnl[i])\n    {\n      numPosCoef++;\n    }\n  }\n  // Only in wideband. Prevent the gain in upper band from being larger than\n  // in lower band.\n  if (aecm->mult == 2)\n  {\n    // TODO(bjornv): Investigate if the scaling of hnl[i] below can cause\n    //               speech distortion in double-talk.\n    for (i = 0; i < PART_LEN1; i++)\n    {\n      hnl[i] = (int16_t)((hnl[i] * hnl[i]) >> 14);\n    }\n\n    for (i = kMinPrefBand; i <= kMaxPrefBand; i++)\n    {\n      avgHnl32 += (int32_t)hnl[i];\n    }\n    RTC_DCHECK_GT(kMaxPrefBand - kMinPrefBand + 1, 0);\n    avgHnl32 /= (kMaxPrefBand - kMinPrefBand + 1);\n\n    for (i = kMaxPrefBand; i < PART_LEN1; i++)\n    {\n      if (hnl[i] > (int16_t)avgHnl32)\n      {\n        hnl[i] = (int16_t)avgHnl32;\n      }\n    }\n  }\n\n  // Calculate NLP gain, result is in Q14\n  if (aecm->nlpFlag)\n  {\n    for (i = 0; i < PART_LEN1; i++)\n    {\n      // Truncate values close to zero and one.\n      if (hnl[i] > NLP_COMP_HIGH)\n      {\n        hnl[i] = ONE_Q14;\n      } else if (hnl[i] < NLP_COMP_LOW)\n      {\n        hnl[i] = 0;\n      }\n\n      // Remove outliers\n      if (numPosCoef < 3)\n      {\n        nlpGain = 0;\n      } else\n      {\n        nlpGain = ONE_Q14;\n      }\n\n      // NLP\n      if ((hnl[i] == ONE_Q14) && (nlpGain == ONE_Q14))\n      {\n        hnl[i] = ONE_Q14;\n      } else\n      {\n        hnl[i] = (int16_t)((hnl[i] * nlpGain) >> 14);\n      }\n\n      // multiply with Wiener coefficients\n      efw[i].real = (int16_t)(WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].real,\n                                                                   hnl[i], 14));\n      efw[i].imag = (int16_t)(WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].imag,\n                                                                   hnl[i], 14));\n    }\n  }\n  else\n  {\n    // multiply with Wiener coefficients\n    for (i = 0; i < PART_LEN1; i++)\n    {\n      efw[i].real = (int16_t)(WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].real,\n                                                                   hnl[i], 14));\n      efw[i].imag = (int16_t)(WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].imag,\n                                                                   hnl[i], 14));\n    }\n  }\n\n  if (aecm->cngMode == AecmTrue)\n  {\n    ComfortNoise(aecm, ptrDfaClean, efw, hnl);\n  }\n\n  InverseFFTAndWindow(aecm, fft, efw, output, nearendClean);\n\n  return 0;\n}\n\nstatic void ComfortNoise(AecmCore* aecm,\n                         const uint16_t* dfa,\n                         ComplexInt16* out,\n                         const int16_t* lambda) {\n  int16_t i;\n  int16_t tmp16;\n  int32_t tmp32;\n\n  int16_t randW16[PART_LEN];\n  int16_t uReal[PART_LEN1];\n  int16_t uImag[PART_LEN1];\n  int32_t outLShift32;\n  int16_t noiseRShift16[PART_LEN1];\n\n  int16_t shiftFromNearToNoise = kNoiseEstQDomain - aecm->dfaCleanQDomain;\n  int16_t minTrackShift;\n\n  RTC_DCHECK_GE(shiftFromNearToNoise, 0);\n  RTC_DCHECK_LT(shiftFromNearToNoise, 16);\n\n  if (aecm->noiseEstCtr < 100)\n  {\n    // Track the minimum more quickly initially.\n    aecm->noiseEstCtr++;\n    minTrackShift = 6;\n  } else\n  {\n    minTrackShift = 9;\n  }\n\n  // Estimate noise power.\n  for (i = 0; i < PART_LEN1; i++)\n  {\n    // Shift to the noise domain.\n    tmp32 = (int32_t)dfa[i];\n    outLShift32 = tmp32 << shiftFromNearToNoise;\n\n    if (outLShift32 < aecm->noiseEst[i])\n    {\n      // Reset \"too low\" counter\n      aecm->noiseEstTooLowCtr[i] = 0;\n      // Track the minimum.\n      if (aecm->noiseEst[i] < (1 << minTrackShift))\n      {\n        // For small values, decrease noiseEst[i] every\n        // |kNoiseEstIncCount| block. The regular approach below can not\n        // go further down due to truncation.\n        aecm->noiseEstTooHighCtr[i]++;\n        if (aecm->noiseEstTooHighCtr[i] >= kNoiseEstIncCount)\n        {\n          aecm->noiseEst[i]--;\n          aecm->noiseEstTooHighCtr[i] = 0; // Reset the counter\n        }\n      }\n      else\n      {\n        aecm->noiseEst[i] -= ((aecm->noiseEst[i] - outLShift32)\n                              >> minTrackShift);\n      }\n    } else\n    {\n      // Reset \"too high\" counter\n      aecm->noiseEstTooHighCtr[i] = 0;\n      // Ramp slowly upwards until we hit the minimum again.\n      if ((aecm->noiseEst[i] >> 19) > 0)\n      {\n        // Avoid overflow.\n        // Multiplication with 2049 will cause wrap around. Scale\n        // down first and then multiply\n        aecm->noiseEst[i] >>= 11;\n        aecm->noiseEst[i] *= 2049;\n      }\n      else if ((aecm->noiseEst[i] >> 11) > 0)\n      {\n        // Large enough for relative increase\n        aecm->noiseEst[i] *= 2049;\n        aecm->noiseEst[i] >>= 11;\n      }\n      else\n      {\n        // Make incremental increases based on size every\n        // |kNoiseEstIncCount| block\n        aecm->noiseEstTooLowCtr[i]++;\n        if (aecm->noiseEstTooLowCtr[i] >= kNoiseEstIncCount)\n        {\n          aecm->noiseEst[i] += (aecm->noiseEst[i] >> 9) + 1;\n          aecm->noiseEstTooLowCtr[i] = 0; // Reset counter\n        }\n      }\n    }\n  }\n\n  for (i = 0; i < PART_LEN1; i++)\n  {\n    tmp32 = aecm->noiseEst[i] >> shiftFromNearToNoise;\n    if (tmp32 > 32767)\n    {\n      tmp32 = 32767;\n      aecm->noiseEst[i] = tmp32 << shiftFromNearToNoise;\n    }\n    noiseRShift16[i] = (int16_t)tmp32;\n\n    tmp16 = ONE_Q14 - lambda[i];\n    noiseRShift16[i] = (int16_t)((tmp16 * noiseRShift16[i]) >> 14);\n  }\n\n  // Generate a uniform random array on [0 2^15-1].\n  WebRtcSpl_RandUArray(randW16, PART_LEN, &aecm->seed);\n\n  // Generate noise according to estimated energy.\n  uReal[0] = 0; // Reject LF noise.\n  uImag[0] = 0;\n  for (i = 1; i < PART_LEN1; i++)\n  {\n    // Get a random index for the cos and sin tables over [0 359].\n    tmp16 = (int16_t)((359 * randW16[i - 1]) >> 15);\n\n    // Tables are in Q13.\n    uReal[i] = (int16_t)((noiseRShift16[i] * WebRtcAecm_kCosTable[tmp16]) >>\n        13);\n    uImag[i] = (int16_t)((-noiseRShift16[i] * WebRtcAecm_kSinTable[tmp16]) >>\n        13);\n  }\n  uImag[PART_LEN] = 0;\n\n  for (i = 0; i < PART_LEN1; i++)\n  {\n    out[i].real = WebRtcSpl_AddSatW16(out[i].real, uReal[i]);\n    out[i].imag = WebRtcSpl_AddSatW16(out[i].imag, uImag[i]);\n  }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/aecm/aecm_core.h\"\n\n#ifdef WEBRTC_ARCH_ARM_FAMILY\n\n#include <arm_neon.h>\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_audio/signal_processing/include/real_fft.h\"\n\n// TODO(kma): Re-write the corresponding assembly file, the offset\n// generating script and makefile, to replace these C functions.\n\nstatic inline void AddLanes(uint32_t* ptr, uint32x4_t v) {\n#if defined(WEBRTC_ARCH_ARM64)\n  *(ptr) = vaddvq_u32(v);\n#else\n  uint32x2_t tmp_v;\n  tmp_v = vadd_u32(vget_low_u32(v), vget_high_u32(v));\n  tmp_v = vpadd_u32(tmp_v, tmp_v);\n  *(ptr) = vget_lane_u32(tmp_v, 0);\n#endif\n}\n\nvoid WebRtcAecm_CalcLinearEnergiesNeon(AecmCore* aecm,\n                                       const uint16_t* far_spectrum,\n                                       int32_t* echo_est,\n                                       uint32_t* far_energy,\n                                       uint32_t* echo_energy_adapt,\n                                       uint32_t* echo_energy_stored) {\n  int16_t* start_stored_p = aecm->channelStored;\n  int16_t* start_adapt_p = aecm->channelAdapt16;\n  int32_t* echo_est_p = echo_est;\n  const int16_t* end_stored_p = aecm->channelStored + PART_LEN;\n  const uint16_t* far_spectrum_p = far_spectrum;\n  int16x8_t store_v, adapt_v;\n  uint16x8_t spectrum_v;\n  uint32x4_t echo_est_v_low, echo_est_v_high;\n  uint32x4_t far_energy_v, echo_stored_v, echo_adapt_v;\n\n  far_energy_v = vdupq_n_u32(0);\n  echo_adapt_v = vdupq_n_u32(0);\n  echo_stored_v = vdupq_n_u32(0);\n\n  // Get energy for the delayed far end signal and estimated\n  // echo using both stored and adapted channels.\n  // The C code:\n  //  for (i = 0; i < PART_LEN1; i++) {\n  //      echo_est[i] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i],\n  //                                         far_spectrum[i]);\n  //      (*far_energy) += (uint32_t)(far_spectrum[i]);\n  //      *echo_energy_adapt += aecm->channelAdapt16[i] * far_spectrum[i];\n  //      (*echo_energy_stored) += (uint32_t)echo_est[i];\n  //  }\n  while (start_stored_p < end_stored_p) {\n    spectrum_v = vld1q_u16(far_spectrum_p);\n    adapt_v = vld1q_s16(start_adapt_p);\n    store_v = vld1q_s16(start_stored_p);\n\n    far_energy_v = vaddw_u16(far_energy_v, vget_low_u16(spectrum_v));\n    far_energy_v = vaddw_u16(far_energy_v, vget_high_u16(spectrum_v));\n\n    echo_est_v_low = vmull_u16(vreinterpret_u16_s16(vget_low_s16(store_v)),\n                               vget_low_u16(spectrum_v));\n    echo_est_v_high = vmull_u16(vreinterpret_u16_s16(vget_high_s16(store_v)),\n                                vget_high_u16(spectrum_v));\n    vst1q_s32(echo_est_p, vreinterpretq_s32_u32(echo_est_v_low));\n    vst1q_s32(echo_est_p + 4, vreinterpretq_s32_u32(echo_est_v_high));\n\n    echo_stored_v = vaddq_u32(echo_est_v_low, echo_stored_v);\n    echo_stored_v = vaddq_u32(echo_est_v_high, echo_stored_v);\n\n    echo_adapt_v = vmlal_u16(echo_adapt_v,\n                             vreinterpret_u16_s16(vget_low_s16(adapt_v)),\n                             vget_low_u16(spectrum_v));\n    echo_adapt_v = vmlal_u16(echo_adapt_v,\n                             vreinterpret_u16_s16(vget_high_s16(adapt_v)),\n                             vget_high_u16(spectrum_v));\n\n    start_stored_p += 8;\n    start_adapt_p += 8;\n    far_spectrum_p += 8;\n    echo_est_p += 8;\n  }\n\n  AddLanes(far_energy, far_energy_v);\n  AddLanes(echo_energy_stored, echo_stored_v);\n  AddLanes(echo_energy_adapt, echo_adapt_v);\n\n  echo_est[PART_LEN] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[PART_LEN],\n                                             far_spectrum[PART_LEN]);\n  *echo_energy_stored += (uint32_t)echo_est[PART_LEN];\n  *far_energy += (uint32_t)far_spectrum[PART_LEN];\n  *echo_energy_adapt += aecm->channelAdapt16[PART_LEN] * far_spectrum[PART_LEN];\n}\n\nvoid WebRtcAecm_StoreAdaptiveChannelNeon(AecmCore* aecm,\n                                         const uint16_t* far_spectrum,\n                                         int32_t* echo_est) {\n  RTC_DCHECK_EQ(0u, (uintptr_t)echo_est % 32);\n  RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelStored % 16);\n  RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelAdapt16 % 16);\n\n  // This is C code of following optimized code.\n  // During startup we store the channel every block.\n  //  memcpy(aecm->channelStored,\n  //         aecm->channelAdapt16,\n  //         sizeof(int16_t) * PART_LEN1);\n  // Recalculate echo estimate\n  //  for (i = 0; i < PART_LEN; i += 4) {\n  //    echo_est[i] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i],\n  //                                        far_spectrum[i]);\n  //    echo_est[i + 1] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i + 1],\n  //                                            far_spectrum[i + 1]);\n  //    echo_est[i + 2] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i + 2],\n  //                                            far_spectrum[i + 2]);\n  //    echo_est[i + 3] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i + 3],\n  //                                            far_spectrum[i + 3]);\n  //  }\n  //  echo_est[i] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i],\n  //                                     far_spectrum[i]);\n  const uint16_t* far_spectrum_p = far_spectrum;\n  int16_t* start_adapt_p = aecm->channelAdapt16;\n  int16_t* start_stored_p = aecm->channelStored;\n  const int16_t* end_stored_p = aecm->channelStored + PART_LEN;\n  int32_t* echo_est_p = echo_est;\n\n  uint16x8_t far_spectrum_v;\n  int16x8_t adapt_v;\n  uint32x4_t echo_est_v_low, echo_est_v_high;\n\n  while (start_stored_p < end_stored_p) {\n    far_spectrum_v = vld1q_u16(far_spectrum_p);\n    adapt_v = vld1q_s16(start_adapt_p);\n\n    vst1q_s16(start_stored_p, adapt_v);\n\n    echo_est_v_low = vmull_u16(vget_low_u16(far_spectrum_v),\n                               vget_low_u16(vreinterpretq_u16_s16(adapt_v)));\n    echo_est_v_high = vmull_u16(vget_high_u16(far_spectrum_v),\n                                vget_high_u16(vreinterpretq_u16_s16(adapt_v)));\n\n    vst1q_s32(echo_est_p, vreinterpretq_s32_u32(echo_est_v_low));\n    vst1q_s32(echo_est_p + 4, vreinterpretq_s32_u32(echo_est_v_high));\n\n    far_spectrum_p += 8;\n    start_adapt_p += 8;\n    start_stored_p += 8;\n    echo_est_p += 8;\n  }\n  aecm->channelStored[PART_LEN] = aecm->channelAdapt16[PART_LEN];\n  echo_est[PART_LEN] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[PART_LEN],\n                                             far_spectrum[PART_LEN]);\n}\n\nvoid WebRtcAecm_ResetAdaptiveChannelNeon(AecmCore* aecm) {\n  RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelStored % 16);\n  RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelAdapt16 % 16);\n  RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelAdapt32 % 32);\n\n  // The C code of following optimized code.\n  // for (i = 0; i < PART_LEN1; i++) {\n  //   aecm->channelAdapt16[i] = aecm->channelStored[i];\n  //   aecm->channelAdapt32[i] = WEBRTC_SPL_LSHIFT_W32(\n  //              (int32_t)aecm->channelStored[i], 16);\n  // }\n\n  int16_t* start_stored_p = aecm->channelStored;\n  int16_t* start_adapt16_p = aecm->channelAdapt16;\n  int32_t* start_adapt32_p = aecm->channelAdapt32;\n  const int16_t* end_stored_p = start_stored_p + PART_LEN;\n\n  int16x8_t stored_v;\n  int32x4_t adapt32_v_low, adapt32_v_high;\n\n  while (start_stored_p < end_stored_p) {\n    stored_v = vld1q_s16(start_stored_p);\n    vst1q_s16(start_adapt16_p, stored_v);\n\n    adapt32_v_low = vshll_n_s16(vget_low_s16(stored_v), 16);\n    adapt32_v_high = vshll_n_s16(vget_high_s16(stored_v), 16);\n\n    vst1q_s32(start_adapt32_p, adapt32_v_low);\n    vst1q_s32(start_adapt32_p + 4, adapt32_v_high);\n\n    start_stored_p += 8;\n    start_adapt16_p += 8;\n    start_adapt32_p += 8;\n  }\n  aecm->channelAdapt16[PART_LEN] = aecm->channelStored[PART_LEN];\n  aecm->channelAdapt32[PART_LEN] = (int32_t)aecm->channelStored[PART_LEN] << 16;\n}\n\n#endif\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aecm/aecm_defines.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AECM_AECM_DEFINES_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_AECM_AECM_DEFINES_H_\n\n#define AECM_DYNAMIC_Q                 /* Turn on/off dynamic Q-domain. */\n\n/* Algorithm parameters */\n#define FRAME_LEN       80             /* Total frame length, 10 ms. */\n\n#define PART_LEN        64             /* Length of partition. */\n#define PART_LEN_SHIFT  7              /* Length of (PART_LEN * 2) in base 2. */\n\n#define PART_LEN1       (PART_LEN + 1)  /* Unique fft coefficients. */\n#define PART_LEN2       (PART_LEN << 1) /* Length of partition * 2. */\n#define PART_LEN4       (PART_LEN << 2) /* Length of partition * 4. */\n#define FAR_BUF_LEN     PART_LEN4       /* Length of buffers. */\n#define MAX_DELAY       100\n\n/* Counter parameters */\n#define CONV_LEN        512          /* Convergence length used at startup. */\n#define CONV_LEN2       (CONV_LEN << 1) /* Used at startup. */\n\n/* Energy parameters */\n#define MAX_BUF_LEN     64           /* History length of energy signals. */\n#define FAR_ENERGY_MIN  1025         /* Lowest Far energy level: At least 2 */\n                                     /* in energy. */\n#define FAR_ENERGY_DIFF 929          /* Allowed difference between max */\n                                     /* and min. */\n#define ENERGY_DEV_OFFSET       0    /* The energy error offset in Q8. */\n#define ENERGY_DEV_TOL  400          /* The energy estimation tolerance (Q8). */\n#define FAR_ENERGY_VAD_REGION   230  /* Far VAD tolerance region. */\n\n/* Stepsize parameters */\n#define MU_MIN          10          /* Min stepsize 2^-MU_MIN (far end energy */\n                                    /* dependent). */\n#define MU_MAX          1           /* Max stepsize 2^-MU_MAX (far end energy */\n                                    /* dependent). */\n#define MU_DIFF         9           /* MU_MIN - MU_MAX */\n\n/* Channel parameters */\n#define MIN_MSE_COUNT   20 /* Min number of consecutive blocks with enough */\n                           /* far end energy to compare channel estimates. */\n#define MIN_MSE_DIFF    29 /* The ratio between adapted and stored channel to */\n                           /* accept a new storage (0.8 in Q-MSE_RESOLUTION). */\n#define MSE_RESOLUTION  5           /* MSE parameter resolution. */\n#define RESOLUTION_CHANNEL16    12  /* W16 Channel in Q-RESOLUTION_CHANNEL16. */\n#define RESOLUTION_CHANNEL32    28  /* W32 Channel in Q-RESOLUTION_CHANNEL. */\n#define CHANNEL_VAD     16          /* Minimum energy in frequency band */\n                                    /* to update channel. */\n\n/* Suppression gain parameters: SUPGAIN parameters in Q-(RESOLUTION_SUPGAIN). */\n#define RESOLUTION_SUPGAIN      8     /* Channel in Q-(RESOLUTION_SUPGAIN). */\n#define SUPGAIN_DEFAULT (1 << RESOLUTION_SUPGAIN)  /* Default. */\n#define SUPGAIN_ERROR_PARAM_A   3072  /* Estimation error parameter */\n                                      /* (Maximum gain) (8 in Q8). */\n#define SUPGAIN_ERROR_PARAM_B   1536  /* Estimation error parameter */\n                                      /* (Gain before going down). */\n#define SUPGAIN_ERROR_PARAM_D   SUPGAIN_DEFAULT /* Estimation error parameter */\n                                /* (Should be the same as Default) (1 in Q8). */\n#define SUPGAIN_EPC_DT  200     /* SUPGAIN_ERROR_PARAM_C * ENERGY_DEV_TOL */\n\n/* Defines for \"check delay estimation\" */\n#define CORR_WIDTH      31      /* Number of samples to correlate over. */\n#define CORR_MAX        16      /* Maximum correlation offset. */\n#define CORR_MAX_BUF    63\n#define CORR_DEV        4\n#define CORR_MAX_LEVEL  20\n#define CORR_MAX_LOW    4\n#define CORR_BUF_LEN    (CORR_MAX << 1) + 1\n/* Note that CORR_WIDTH + 2*CORR_MAX <= MAX_BUF_LEN. */\n\n#define ONE_Q14         (1 << 14)\n\n/* NLP defines */\n#define NLP_COMP_LOW    3277    /* 0.2 in Q14 */\n#define NLP_COMP_HIGH   ONE_Q14 /* 1 in Q14 */\n\n#endif\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/aecm/echo_control_mobile.h\"\n\n#ifdef AEC_DEBUG\n#include <stdio.h>\n#endif\n#include <stdlib.h>\n\nextern \"C\" {\n#include \"webrtc/common_audio/ring_buffer.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n}\n#include \"webrtc/modules/audio_processing/aecm/aecm_core.h\"\n\n#define BUF_SIZE_FRAMES 50 // buffer size (frames)\n// Maximum length of resampled signal. Must be an integer multiple of frames\n// (ceil(1/(1 + MIN_SKEW)*2) + 1)*FRAME_LEN\n// The factor of 2 handles wb, and the + 1 is as a safety margin\n#define MAX_RESAMP_LEN (5 * FRAME_LEN)\n\nstatic const size_t kBufSizeSamp = BUF_SIZE_FRAMES * FRAME_LEN; // buffer size (samples)\nstatic const int kSampMsNb = 8; // samples per ms in nb\n// Target suppression levels for nlp modes\n// log{0.001, 0.00001, 0.00000001}\nstatic const int kInitCheck = 42;\n\ntypedef struct\n{\n    int sampFreq;\n    int scSampFreq;\n    short bufSizeStart;\n    int knownDelay;\n\n    // Stores the last frame added to the farend buffer\n    short farendOld[2][FRAME_LEN];\n    short initFlag; // indicates if AEC has been initialized\n\n    // Variables used for averaging far end buffer size\n    short counter;\n    short sum;\n    short firstVal;\n    short checkBufSizeCtr;\n\n    // Variables used for delay shifts\n    short msInSndCardBuf;\n    short filtDelay;\n    int timeForDelayChange;\n    int ECstartup;\n    int checkBuffSize;\n    int delayChange;\n    short lastDelayDiff;\n\n    int16_t echoMode;\n\n#ifdef AEC_DEBUG\n    FILE *bufFile;\n    FILE *delayFile;\n    FILE *preCompFile;\n    FILE *postCompFile;\n#endif // AEC_DEBUG\n    // Structures\n    RingBuffer *farendBuf;\n\n    AecmCore* aecmCore;\n} AecMobile;\n\n// Estimates delay to set the position of the farend buffer read pointer\n// (controlled by knownDelay)\nstatic int WebRtcAecm_EstBufDelay(AecMobile* aecmInst, short msInSndCardBuf);\n\n// Stuffs the farend buffer if the estimated delay is too large\nstatic int WebRtcAecm_DelayComp(AecMobile* aecmInst);\n\nvoid* WebRtcAecm_Create() {\n    AecMobile* aecm = static_cast<AecMobile*>(malloc(sizeof(AecMobile)));\n\n    WebRtcSpl_Init();\n\n    aecm->aecmCore = WebRtcAecm_CreateCore();\n    if (!aecm->aecmCore) {\n        WebRtcAecm_Free(aecm);\n        return NULL;\n    }\n\n    aecm->farendBuf = WebRtc_CreateBuffer(kBufSizeSamp,\n                                          sizeof(int16_t));\n    if (!aecm->farendBuf)\n    {\n        WebRtcAecm_Free(aecm);\n        return NULL;\n    }\n\n    aecm->initFlag = 0;\n\n#ifdef AEC_DEBUG\n    aecm->aecmCore->farFile = fopen(\"aecFar.pcm\",\"wb\");\n    aecm->aecmCore->nearFile = fopen(\"aecNear.pcm\",\"wb\");\n    aecm->aecmCore->outFile = fopen(\"aecOut.pcm\",\"wb\");\n    //aecm->aecmCore->outLpFile = fopen(\"aecOutLp.pcm\",\"wb\");\n\n    aecm->bufFile = fopen(\"aecBuf.dat\", \"wb\");\n    aecm->delayFile = fopen(\"aecDelay.dat\", \"wb\");\n    aecm->preCompFile = fopen(\"preComp.pcm\", \"wb\");\n    aecm->postCompFile = fopen(\"postComp.pcm\", \"wb\");\n#endif // AEC_DEBUG\n    return aecm;\n}\n\nvoid WebRtcAecm_Free(void* aecmInst) {\n  AecMobile* aecm = static_cast<AecMobile*>(aecmInst);\n\n    if (aecm == NULL) {\n      return;\n    }\n\n#ifdef AEC_DEBUG\n    fclose(aecm->aecmCore->farFile);\n    fclose(aecm->aecmCore->nearFile);\n    fclose(aecm->aecmCore->outFile);\n    //fclose(aecm->aecmCore->outLpFile);\n\n    fclose(aecm->bufFile);\n    fclose(aecm->delayFile);\n    fclose(aecm->preCompFile);\n    fclose(aecm->postCompFile);\n#endif // AEC_DEBUG\n    WebRtcAecm_FreeCore(aecm->aecmCore);\n    WebRtc_FreeBuffer(aecm->farendBuf);\n    free(aecm);\n}\n\nint32_t WebRtcAecm_Init(void *aecmInst, int32_t sampFreq)\n{\n    AecMobile* aecm = static_cast<AecMobile*>(aecmInst);\n    AecmConfig aecConfig;\n\n    if (aecm == NULL)\n    {\n        return -1;\n    }\n\n    /*if (sampFreq != 8000 && sampFreq != 16000)\n    {\n        return AECM_BAD_PARAMETER_ERROR;\n    }*/\n    aecm->sampFreq = sampFreq;\n\n    // Initialize AECM core\n    if (WebRtcAecm_InitCore(aecm->aecmCore, aecm->sampFreq) == -1)\n    {\n        return AECM_UNSPECIFIED_ERROR;\n    }\n\n    // Initialize farend buffer\n    WebRtc_InitBuffer(aecm->farendBuf);\n\n    aecm->initFlag = kInitCheck; // indicates that initialization has been done\n\n    aecm->delayChange = 1;\n\n    aecm->sum = 0;\n    aecm->counter = 0;\n    aecm->checkBuffSize = 1;\n    aecm->firstVal = 0;\n\n    aecm->ECstartup = 1;\n    aecm->bufSizeStart = 0;\n    aecm->checkBufSizeCtr = 0;\n    aecm->filtDelay = 0;\n    aecm->timeForDelayChange = 0;\n    aecm->knownDelay = 0;\n    aecm->lastDelayDiff = 0;\n\n    memset(&aecm->farendOld[0][0], 0, 160);\n\n    // Default settings.\n    aecConfig.cngMode = AecmTrue;\n    aecConfig.echoMode = 3;\n\n    if (WebRtcAecm_set_config(aecm, aecConfig) == -1)\n    {\n        return AECM_UNSPECIFIED_ERROR;\n    }\n\n    return 0;\n}\n\n// Returns any error that is caused when buffering the\n// farend signal.\nint32_t WebRtcAecm_GetBufferFarendError(void *aecmInst, const int16_t *farend,\n                                size_t nrOfSamples) {\n  AecMobile* aecm = static_cast<AecMobile*>(aecmInst);\n\n  if (aecm == NULL)\n    return -1;\n\n  if (farend == NULL)\n    return AECM_NULL_POINTER_ERROR;\n\n  if (aecm->initFlag != kInitCheck)\n    return AECM_UNINITIALIZED_ERROR;\n\n  if (nrOfSamples != 80*aecm->aecmCore->mult && nrOfSamples != 160*aecm->aecmCore->mult)\n    return AECM_BAD_PARAMETER_ERROR;\n\n  return 0;\n}\n\n\nint32_t WebRtcAecm_BufferFarend(void *aecmInst, const int16_t *farend,\n                                size_t nrOfSamples) {\n  AecMobile* aecm = static_cast<AecMobile*>(aecmInst);\n\n  const int32_t err =\n      WebRtcAecm_GetBufferFarendError(aecmInst, farend, nrOfSamples);\n\n  if (err != 0)\n    return err;\n\n  // TODO(unknown): Is this really a good idea?\n  if (!aecm->ECstartup)\n  {\n    WebRtcAecm_DelayComp(aecm);\n  }\n\n  WebRtc_WriteBuffer(aecm->farendBuf, farend, nrOfSamples);\n\n  return 0;\n}\n\nint32_t WebRtcAecm_Process(void *aecmInst, const int16_t *nearendNoisy,\n                           const int16_t *nearendClean, int16_t *out,\n                           size_t nrOfSamples, int16_t msInSndCardBuf)\n{\n    AecMobile* aecm = static_cast<AecMobile*>(aecmInst);\n    int32_t retVal = 0;\n    size_t i;\n    short nmbrOfFilledBuffers;\n    size_t nBlocks10ms;\n    size_t nFrames;\n#ifdef AEC_DEBUG\n    short msInAECBuf;\n#endif\n\n    if (aecm == NULL)\n    {\n        return -1;\n    }\n\n    if (nearendNoisy == NULL)\n    {\n        return AECM_NULL_POINTER_ERROR;\n    }\n\n    if (out == NULL)\n    {\n        return AECM_NULL_POINTER_ERROR;\n    }\n\n    if (aecm->initFlag != kInitCheck)\n    {\n        return AECM_UNINITIALIZED_ERROR;\n    }\n\n    if (nrOfSamples != 80*aecm->aecmCore->mult && nrOfSamples != 160*aecm->aecmCore->mult)\n    {\n        return AECM_BAD_PARAMETER_ERROR;\n    }\n\n    if (msInSndCardBuf < 0)\n    {\n        msInSndCardBuf = 0;\n        retVal = AECM_BAD_PARAMETER_WARNING;\n    } else if (msInSndCardBuf > 500)\n    {\n        msInSndCardBuf = 500;\n        retVal = AECM_BAD_PARAMETER_WARNING;\n    }\n    msInSndCardBuf += 10;\n    aecm->msInSndCardBuf = msInSndCardBuf;\n\n    nFrames = nrOfSamples / FRAME_LEN;\n    nBlocks10ms = nFrames / aecm->aecmCore->mult;\n\n    if (aecm->ECstartup)\n    {\n        if (nearendClean == NULL)\n        {\n            if (out != nearendNoisy)\n            {\n                memcpy(out, nearendNoisy, sizeof(short) * nrOfSamples);\n            }\n        } else if (out != nearendClean)\n        {\n            memcpy(out, nearendClean, sizeof(short) * nrOfSamples);\n        }\n\n        nmbrOfFilledBuffers =\n            (short) WebRtc_available_read(aecm->farendBuf) / FRAME_LEN;\n        // The AECM is in the start up mode\n        // AECM is disabled until the soundcard buffer and farend buffers are OK\n\n        // Mechanism to ensure that the soundcard buffer is reasonably stable.\n        if (aecm->checkBuffSize)\n        {\n            aecm->checkBufSizeCtr++;\n            // Before we fill up the far end buffer we require the amount of data on the\n            // sound card to be stable (+/-8 ms) compared to the first value. This\n            // comparison is made during the following 4 consecutive frames. If it seems\n            // to be stable then we start to fill up the far end buffer.\n\n            if (aecm->counter == 0)\n            {\n                aecm->firstVal = aecm->msInSndCardBuf;\n                aecm->sum = 0;\n            }\n\n            if (abs(aecm->firstVal - aecm->msInSndCardBuf)\n                    < WEBRTC_SPL_MAX(0.2 * aecm->msInSndCardBuf, kSampMsNb))\n            {\n                aecm->sum += aecm->msInSndCardBuf;\n                aecm->counter++;\n            } else\n            {\n                aecm->counter = 0;\n            }\n\n            if (aecm->counter * nBlocks10ms >= 6)\n            {\n                // The farend buffer size is determined in blocks of 80 samples\n                // Use 75% of the average value of the soundcard buffer\n                aecm->bufSizeStart\n                        = WEBRTC_SPL_MIN((3 * aecm->sum\n                                        * aecm->aecmCore->mult) / (aecm->counter * 40), BUF_SIZE_FRAMES);\n                // buffersize has now been determined\n                aecm->checkBuffSize = 0;\n            }\n\n            if (aecm->checkBufSizeCtr * nBlocks10ms > 50)\n            {\n                // for really bad sound cards, don't disable echocanceller for more than 0.5 sec\n                aecm->bufSizeStart = WEBRTC_SPL_MIN((3 * aecm->msInSndCardBuf\n                                * aecm->aecmCore->mult) / 40, BUF_SIZE_FRAMES);\n                aecm->checkBuffSize = 0;\n            }\n        }\n\n        // if checkBuffSize changed in the if-statement above\n        if (!aecm->checkBuffSize)\n        {\n            // soundcard buffer is now reasonably stable\n            // When the far end buffer is filled with approximately the same amount of\n            // data as the amount on the sound card we end the start up phase and start\n            // to cancel echoes.\n\n            if (nmbrOfFilledBuffers == aecm->bufSizeStart)\n            {\n                aecm->ECstartup = 0; // Enable the AECM\n            } else if (nmbrOfFilledBuffers > aecm->bufSizeStart)\n            {\n                WebRtc_MoveReadPtr(aecm->farendBuf,\n                                   (int) WebRtc_available_read(aecm->farendBuf)\n                                   - (int) aecm->bufSizeStart * FRAME_LEN);\n                aecm->ECstartup = 0;\n            }\n        }\n\n    } else\n    {\n        // AECM is enabled\n\n        // Note only 1 block supported for nb and 2 blocks for wb\n        for (i = 0; i < nFrames; i++)\n        {\n            int16_t farend[FRAME_LEN];\n            const int16_t* farend_ptr = NULL;\n\n            nmbrOfFilledBuffers =\n                (short) WebRtc_available_read(aecm->farendBuf) / FRAME_LEN;\n\n            // Check that there is data in the far end buffer\n            if (nmbrOfFilledBuffers > 0)\n            {\n                // Get the next 80 samples from the farend buffer\n                WebRtc_ReadBuffer(aecm->farendBuf, (void**) &farend_ptr, farend,\n                                  FRAME_LEN);\n\n                // Always store the last frame for use when we run out of data\n                memcpy(&(aecm->farendOld[i][0]), farend_ptr,\n                       FRAME_LEN * sizeof(short));\n            } else\n            {\n                // We have no data so we use the last played frame\n                memcpy(farend, &(aecm->farendOld[i][0]), FRAME_LEN * sizeof(short));\n                farend_ptr = farend;\n            }\n\n            // Call buffer delay estimator when all data is extracted,\n            // i,e. i = 0 for NB and i = 1 for WB\n            if ((i == 0 && aecm->sampFreq == 8000) || (i == 1 && aecm->sampFreq == 16000))\n            {\n                WebRtcAecm_EstBufDelay(aecm, aecm->msInSndCardBuf);\n            }\n\n            // Call the AECM\n            /*WebRtcAecm_ProcessFrame(aecm->aecmCore, farend, &nearend[FRAME_LEN * i],\n             &out[FRAME_LEN * i], aecm->knownDelay);*/\n            if (WebRtcAecm_ProcessFrame(aecm->aecmCore,\n                                        farend_ptr,\n                                        &nearendNoisy[FRAME_LEN * i],\n                                        (nearendClean\n                                         ? &nearendClean[FRAME_LEN * i]\n                                         : NULL),\n                                        &out[FRAME_LEN * i]) == -1)\n                return -1;\n        }\n    }\n\n#ifdef AEC_DEBUG\n    msInAECBuf = (short) WebRtc_available_read(aecm->farendBuf) /\n        (kSampMsNb * aecm->aecmCore->mult);\n    fwrite(&msInAECBuf, 2, 1, aecm->bufFile);\n    fwrite(&(aecm->knownDelay), sizeof(aecm->knownDelay), 1, aecm->delayFile);\n#endif\n\n    return retVal;\n}\n\nint32_t WebRtcAecm_set_config(void *aecmInst, AecmConfig config)\n{\n    AecMobile* aecm = static_cast<AecMobile*>(aecmInst);\n\n    if (aecm == NULL)\n    {\n        return -1;\n    }\n\n    if (aecm->initFlag != kInitCheck)\n    {\n        return AECM_UNINITIALIZED_ERROR;\n    }\n\n    if (config.cngMode != AecmFalse && config.cngMode != AecmTrue)\n    {\n        return AECM_BAD_PARAMETER_ERROR;\n    }\n    aecm->aecmCore->cngMode = config.cngMode;\n\n    if (config.echoMode < 0 || config.echoMode > 4)\n    {\n        return AECM_BAD_PARAMETER_ERROR;\n    }\n    aecm->echoMode = config.echoMode;\n\n    if (aecm->echoMode == 0)\n    {\n        aecm->aecmCore->supGain = SUPGAIN_DEFAULT >> 3;\n        aecm->aecmCore->supGainOld = SUPGAIN_DEFAULT >> 3;\n        aecm->aecmCore->supGainErrParamA = SUPGAIN_ERROR_PARAM_A >> 3;\n        aecm->aecmCore->supGainErrParamD = SUPGAIN_ERROR_PARAM_D >> 3;\n        aecm->aecmCore->supGainErrParamDiffAB = (SUPGAIN_ERROR_PARAM_A >> 3)\n                - (SUPGAIN_ERROR_PARAM_B >> 3);\n        aecm->aecmCore->supGainErrParamDiffBD = (SUPGAIN_ERROR_PARAM_B >> 3)\n                - (SUPGAIN_ERROR_PARAM_D >> 3);\n    } else if (aecm->echoMode == 1)\n    {\n        aecm->aecmCore->supGain = SUPGAIN_DEFAULT >> 2;\n        aecm->aecmCore->supGainOld = SUPGAIN_DEFAULT >> 2;\n        aecm->aecmCore->supGainErrParamA = SUPGAIN_ERROR_PARAM_A >> 2;\n        aecm->aecmCore->supGainErrParamD = SUPGAIN_ERROR_PARAM_D >> 2;\n        aecm->aecmCore->supGainErrParamDiffAB = (SUPGAIN_ERROR_PARAM_A >> 2)\n                - (SUPGAIN_ERROR_PARAM_B >> 2);\n        aecm->aecmCore->supGainErrParamDiffBD = (SUPGAIN_ERROR_PARAM_B >> 2)\n                - (SUPGAIN_ERROR_PARAM_D >> 2);\n    } else if (aecm->echoMode == 2)\n    {\n        aecm->aecmCore->supGain = SUPGAIN_DEFAULT >> 1;\n        aecm->aecmCore->supGainOld = SUPGAIN_DEFAULT >> 1;\n        aecm->aecmCore->supGainErrParamA = SUPGAIN_ERROR_PARAM_A >> 1;\n        aecm->aecmCore->supGainErrParamD = SUPGAIN_ERROR_PARAM_D >> 1;\n        aecm->aecmCore->supGainErrParamDiffAB = (SUPGAIN_ERROR_PARAM_A >> 1)\n                - (SUPGAIN_ERROR_PARAM_B >> 1);\n        aecm->aecmCore->supGainErrParamDiffBD = (SUPGAIN_ERROR_PARAM_B >> 1)\n                - (SUPGAIN_ERROR_PARAM_D >> 1);\n    } else if (aecm->echoMode == 3)\n    {\n        aecm->aecmCore->supGain = SUPGAIN_DEFAULT;\n        aecm->aecmCore->supGainOld = SUPGAIN_DEFAULT;\n        aecm->aecmCore->supGainErrParamA = SUPGAIN_ERROR_PARAM_A;\n        aecm->aecmCore->supGainErrParamD = SUPGAIN_ERROR_PARAM_D;\n        aecm->aecmCore->supGainErrParamDiffAB = SUPGAIN_ERROR_PARAM_A - SUPGAIN_ERROR_PARAM_B;\n        aecm->aecmCore->supGainErrParamDiffBD = SUPGAIN_ERROR_PARAM_B - SUPGAIN_ERROR_PARAM_D;\n    } else if (aecm->echoMode == 4)\n    {\n        aecm->aecmCore->supGain = SUPGAIN_DEFAULT << 1;\n        aecm->aecmCore->supGainOld = SUPGAIN_DEFAULT << 1;\n        aecm->aecmCore->supGainErrParamA = SUPGAIN_ERROR_PARAM_A << 1;\n        aecm->aecmCore->supGainErrParamD = SUPGAIN_ERROR_PARAM_D << 1;\n        aecm->aecmCore->supGainErrParamDiffAB = (SUPGAIN_ERROR_PARAM_A << 1)\n                - (SUPGAIN_ERROR_PARAM_B << 1);\n        aecm->aecmCore->supGainErrParamDiffBD = (SUPGAIN_ERROR_PARAM_B << 1)\n                - (SUPGAIN_ERROR_PARAM_D << 1);\n    }\n\n    return 0;\n}\n\nint32_t WebRtcAecm_InitEchoPath(void* aecmInst,\n                                const void* echo_path,\n                                size_t size_bytes)\n{\n    AecMobile* aecm = static_cast<AecMobile*>(aecmInst);\n    const int16_t* echo_path_ptr = static_cast<const int16_t*>(echo_path);\n\n    if (aecmInst == NULL) {\n      return -1;\n    }\n    if (echo_path == NULL) {\n      return AECM_NULL_POINTER_ERROR;\n    }\n    if (size_bytes != WebRtcAecm_echo_path_size_bytes())\n    {\n        // Input channel size does not match the size of AECM\n        return AECM_BAD_PARAMETER_ERROR;\n    }\n    if (aecm->initFlag != kInitCheck)\n    {\n        return AECM_UNINITIALIZED_ERROR;\n    }\n\n    WebRtcAecm_InitEchoPathCore(aecm->aecmCore, echo_path_ptr);\n\n    return 0;\n}\n\nint32_t WebRtcAecm_GetEchoPath(void* aecmInst,\n                               void* echo_path,\n                               size_t size_bytes)\n{\n    AecMobile* aecm = static_cast<AecMobile*>(aecmInst);\n    int16_t* echo_path_ptr = static_cast<int16_t*>(echo_path);\n\n    if (aecmInst == NULL) {\n      return -1;\n    }\n    if (echo_path == NULL) {\n      return AECM_NULL_POINTER_ERROR;\n    }\n    if (size_bytes != WebRtcAecm_echo_path_size_bytes())\n    {\n        // Input channel size does not match the size of AECM\n        return AECM_BAD_PARAMETER_ERROR;\n    }\n    if (aecm->initFlag != kInitCheck)\n    {\n        return AECM_UNINITIALIZED_ERROR;\n    }\n\n    memcpy(echo_path_ptr, aecm->aecmCore->channelStored, size_bytes);\n    return 0;\n}\n\nsize_t WebRtcAecm_echo_path_size_bytes()\n{\n    return (PART_LEN1 * sizeof(int16_t));\n}\n\n\nstatic int WebRtcAecm_EstBufDelay(AecMobile* aecm, short msInSndCardBuf) {\n    short delayNew, nSampSndCard;\n    short nSampFar = (short) WebRtc_available_read(aecm->farendBuf);\n    short diff;\n\n    nSampSndCard = msInSndCardBuf * kSampMsNb * aecm->aecmCore->mult;\n\n    delayNew = nSampSndCard - nSampFar;\n\n    if (delayNew < FRAME_LEN)\n    {\n        WebRtc_MoveReadPtr(aecm->farendBuf, FRAME_LEN);\n        delayNew += FRAME_LEN;\n    }\n\n    aecm->filtDelay = WEBRTC_SPL_MAX(0, (8 * aecm->filtDelay + 2 * delayNew) / 10);\n\n    diff = aecm->filtDelay - aecm->knownDelay;\n    if (diff > 224)\n    {\n        if (aecm->lastDelayDiff < 96)\n        {\n            aecm->timeForDelayChange = 0;\n        } else\n        {\n            aecm->timeForDelayChange++;\n        }\n    } else if (diff < 96 && aecm->knownDelay > 0)\n    {\n        if (aecm->lastDelayDiff > 224)\n        {\n            aecm->timeForDelayChange = 0;\n        } else\n        {\n            aecm->timeForDelayChange++;\n        }\n    } else\n    {\n        aecm->timeForDelayChange = 0;\n    }\n    aecm->lastDelayDiff = diff;\n\n    if (aecm->timeForDelayChange > 25)\n    {\n        aecm->knownDelay = WEBRTC_SPL_MAX((int)aecm->filtDelay - 160, 0);\n    }\n    return 0;\n}\n\nstatic int WebRtcAecm_DelayComp(AecMobile* aecm) {\n    int nSampFar = (int) WebRtc_available_read(aecm->farendBuf);\n    int nSampSndCard, delayNew, nSampAdd;\n    const int maxStuffSamp = 10 * FRAME_LEN;\n\n    nSampSndCard = aecm->msInSndCardBuf * kSampMsNb * aecm->aecmCore->mult;\n    delayNew = nSampSndCard - nSampFar;\n\n    if (delayNew > FAR_BUF_LEN - FRAME_LEN * aecm->aecmCore->mult)\n    {\n        // The difference of the buffer sizes is larger than the maximum\n        // allowed known delay. Compensate by stuffing the buffer.\n        nSampAdd = (int)(WEBRTC_SPL_MAX(((nSampSndCard >> 1) - nSampFar),\n                FRAME_LEN));\n        nSampAdd = WEBRTC_SPL_MIN(nSampAdd, maxStuffSamp);\n\n        WebRtc_MoveReadPtr(aecm->farendBuf, -nSampAdd);\n        aecm->delayChange = 1; // the delay needs to be updated\n    }\n\n    return 0;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/aecm/echo_control_mobile.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AECM_ECHO_CONTROL_MOBILE_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_AECM_ECHO_CONTROL_MOBILE_H_\n\n#include <stdlib.h>\n\n#include \"webrtc/typedefs.h\"\n\nenum {\n    AecmFalse = 0,\n    AecmTrue\n};\n\n// Errors\n#define AECM_UNSPECIFIED_ERROR           12000\n#define AECM_UNSUPPORTED_FUNCTION_ERROR  12001\n#define AECM_UNINITIALIZED_ERROR         12002\n#define AECM_NULL_POINTER_ERROR          12003\n#define AECM_BAD_PARAMETER_ERROR         12004\n\n// Warnings\n#define AECM_BAD_PARAMETER_WARNING       12100\n\ntypedef struct {\n    int16_t cngMode;            // AECM_FALSE, AECM_TRUE (default)\n    int16_t echoMode;           // 0, 1, 2, 3 (default), 4\n} AecmConfig;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * Allocates the memory needed by the AECM. The memory needs to be\n * initialized separately using the WebRtcAecm_Init() function.\n * Returns a pointer to the instance and a nullptr at failure.\n */\nvoid* WebRtcAecm_Create();\n\n/*\n * This function releases the memory allocated by WebRtcAecm_Create()\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*    aecmInst            Pointer to the AECM instance\n */\nvoid WebRtcAecm_Free(void* aecmInst);\n\n/*\n * Initializes an AECM instance.\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*          aecmInst      Pointer to the AECM instance\n * int32_t        sampFreq      Sampling frequency of data\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int32_t        return        0: OK\n *                              1200-12004,12100: error/warning\n */\nint32_t WebRtcAecm_Init(void* aecmInst, int32_t sampFreq);\n\n/*\n * Inserts an 80 or 160 sample block of data into the farend buffer.\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*          aecmInst      Pointer to the AECM instance\n * int16_t*       farend        In buffer containing one frame of\n *                              farend signal\n * int16_t        nrOfSamples   Number of samples in farend buffer\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int32_t        return        0: OK\n *                              1200-12004,12100: error/warning\n */\nint32_t WebRtcAecm_BufferFarend(void* aecmInst,\n                                const int16_t* farend,\n                                size_t nrOfSamples);\n\n/*\n * Reports any errors that would arise when buffering a farend buffer.\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*          aecmInst      Pointer to the AECM instance\n * int16_t*       farend        In buffer containing one frame of\n *                              farend signal\n * int16_t        nrOfSamples   Number of samples in farend buffer\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int32_t        return        0: OK\n *                              1200-12004,12100: error/warning\n */\nint32_t WebRtcAecm_GetBufferFarendError(void* aecmInst,\n                                        const int16_t* farend,\n                                        size_t nrOfSamples);\n\n/*\n * Runs the AECM on an 80 or 160 sample blocks of data.\n *\n * Inputs                        Description\n * -------------------------------------------------------------------\n * void*          aecmInst       Pointer to the AECM instance\n * int16_t*       nearendNoisy   In buffer containing one frame of\n *                               reference nearend+echo signal. If\n *                               noise reduction is active, provide\n *                               the noisy signal here.\n * int16_t*       nearendClean   In buffer containing one frame of\n *                               nearend+echo signal. If noise\n *                               reduction is active, provide the\n *                               clean signal here. Otherwise pass a\n *                               NULL pointer.\n * int16_t        nrOfSamples    Number of samples in nearend buffer\n * int16_t        msInSndCardBuf Delay estimate for sound card and\n *                               system buffers\n *\n * Outputs                       Description\n * -------------------------------------------------------------------\n * int16_t*       out            Out buffer, one frame of processed nearend\n * int32_t        return         0: OK\n *                               1200-12004,12100: error/warning\n */\nint32_t WebRtcAecm_Process(void* aecmInst,\n                           const int16_t* nearendNoisy,\n                           const int16_t* nearendClean,\n                           int16_t* out,\n                           size_t nrOfSamples,\n                           int16_t msInSndCardBuf);\n\n/*\n * This function enables the user to set certain parameters on-the-fly\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*          aecmInst      Pointer to the AECM instance\n * AecmConfig     config        Config instance that contains all\n *                              properties to be set\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int32_t        return        0: OK\n *                              1200-12004,12100: error/warning\n */\nint32_t WebRtcAecm_set_config(void* aecmInst, AecmConfig config);\n\n/*\n * This function enables the user to set the echo path on-the-fly.\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*        aecmInst        Pointer to the AECM instance\n * void*        echo_path       Pointer to the echo path to be set\n * size_t       size_bytes      Size in bytes of the echo path\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int32_t      return          0: OK\n *                              1200-12004,12100: error/warning\n */\nint32_t WebRtcAecm_InitEchoPath(void* aecmInst,\n                                const void* echo_path,\n                                size_t size_bytes);\n\n/*\n * This function enables the user to get the currently used echo path\n * on-the-fly\n *\n * Inputs                       Description\n * -------------------------------------------------------------------\n * void*        aecmInst        Pointer to the AECM instance\n * void*        echo_path       Pointer to echo path\n * size_t       size_bytes      Size in bytes of the echo path\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * int32_t      return          0: OK\n *                              1200-12004,12100: error/warning\n */\nint32_t WebRtcAecm_GetEchoPath(void* aecmInst,\n                               void* echo_path,\n                               size_t size_bytes);\n\n/*\n * This function enables the user to get the echo path size in bytes\n *\n * Outputs                      Description\n * -------------------------------------------------------------------\n * size_t       return          Size in bytes\n */\nsize_t WebRtcAecm_echo_path_size_bytes();\n\n\n#ifdef __cplusplus\n}\n#endif\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_AECM_ECHO_CONTROL_MOBILE_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/agc/legacy/analog_agc.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/* analog_agc.c\n *\n * Using a feedback system, determines an appropriate analog volume level\n * given an input signal and current volume level. Targets a conservative\n * signal level and is intended for use with a digital AGC to apply\n * additional gain.\n *\n */\n\n#include \"webrtc/modules/audio_processing/agc/legacy/analog_agc.h\"\n\n#include <stdlib.h>\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n#include <stdio.h>\n#endif\n\n#include \"webrtc/base/checks.h\"\n\n/* The slope of in Q13*/\nstatic const int16_t kSlope1[8] = {21793, 12517, 7189, 4129,\n                                   2372,  1362,  472,  78};\n\n/* The offset in Q14 */\nstatic const int16_t kOffset1[8] = {25395, 23911, 22206, 20737,\n                                    19612, 18805, 17951, 17367};\n\n/* The slope of in Q13*/\nstatic const int16_t kSlope2[8] = {2063, 1731, 1452, 1218, 1021, 857, 597, 337};\n\n/* The offset in Q14 */\nstatic const int16_t kOffset2[8] = {18432, 18379, 18290, 18177,\n                                    18052, 17920, 17670, 17286};\n\nstatic const int16_t kMuteGuardTimeMs = 8000;\nstatic const int16_t kInitCheck = 42;\nstatic const size_t kNumSubframes = 10;\n\n/* Default settings if config is not used */\n#define AGC_DEFAULT_TARGET_LEVEL 3\n#define AGC_DEFAULT_COMP_GAIN 9\n/* This is the target level for the analog part in ENV scale. To convert to RMS\n * scale you\n * have to add OFFSET_ENV_TO_RMS.\n */\n#define ANALOG_TARGET_LEVEL 11\n#define ANALOG_TARGET_LEVEL_2 5  // ANALOG_TARGET_LEVEL / 2\n/* Offset between RMS scale (analog part) and ENV scale (digital part). This\n * value actually\n * varies with the FIXED_ANALOG_TARGET_LEVEL, hence we should in the future\n * replace it with\n * a table.\n */\n#define OFFSET_ENV_TO_RMS 9\n/* The reference input level at which the digital part gives an output of\n * targetLevelDbfs\n * (desired level) if we have no compression gain. This level should be set high\n * enough not\n * to compress the peaks due to the dynamics.\n */\n#define DIGITAL_REF_AT_0_COMP_GAIN 4\n/* Speed of reference level decrease.\n */\n#define DIFF_REF_TO_ANALOG 5\n\n#ifdef MIC_LEVEL_FEEDBACK\n#define NUM_BLOCKS_IN_SAT_BEFORE_CHANGE_TARGET 7\n#endif\n/* Size of analog gain table */\n#define GAIN_TBL_LEN 32\n/* Matlab code:\n * fprintf(1, '\\t%i, %i, %i, %i,\\n', round(10.^(linspace(0,10,32)/20) * 2^12));\n */\n/* Q12 */\nstatic const uint16_t kGainTableAnalog[GAIN_TBL_LEN] = {\n    4096, 4251, 4412, 4579,  4752,  4932,  5118,  5312,  5513,  5722, 5938,\n    6163, 6396, 6638, 6889,  7150,  7420,  7701,  7992,  8295,  8609, 8934,\n    9273, 9623, 9987, 10365, 10758, 11165, 11587, 12025, 12480, 12953};\n\n/* Gain/Suppression tables for virtual Mic (in Q10) */\nstatic const uint16_t kGainTableVirtualMic[128] = {\n    1052,  1081,  1110,  1141,  1172,  1204,  1237,  1271,  1305,  1341,  1378,\n    1416,  1454,  1494,  1535,  1577,  1620,  1664,  1710,  1757,  1805,  1854,\n    1905,  1957,  2010,  2065,  2122,  2180,  2239,  2301,  2364,  2428,  2495,\n    2563,  2633,  2705,  2779,  2855,  2933,  3013,  3096,  3180,  3267,  3357,\n    3449,  3543,  3640,  3739,  3842,  3947,  4055,  4166,  4280,  4397,  4517,\n    4640,  4767,  4898,  5032,  5169,  5311,  5456,  5605,  5758,  5916,  6078,\n    6244,  6415,  6590,  6770,  6956,  7146,  7341,  7542,  7748,  7960,  8178,\n    8402,  8631,  8867,  9110,  9359,  9615,  9878,  10148, 10426, 10711, 11004,\n    11305, 11614, 11932, 12258, 12593, 12938, 13292, 13655, 14029, 14412, 14807,\n    15212, 15628, 16055, 16494, 16945, 17409, 17885, 18374, 18877, 19393, 19923,\n    20468, 21028, 21603, 22194, 22801, 23425, 24065, 24724, 25400, 26095, 26808,\n    27541, 28295, 29069, 29864, 30681, 31520, 32382};\nstatic const uint16_t kSuppressionTableVirtualMic[128] = {\n    1024, 1006, 988, 970, 952, 935, 918, 902, 886, 870, 854, 839, 824, 809, 794,\n    780,  766,  752, 739, 726, 713, 700, 687, 675, 663, 651, 639, 628, 616, 605,\n    594,  584,  573, 563, 553, 543, 533, 524, 514, 505, 496, 487, 478, 470, 461,\n    453,  445,  437, 429, 421, 414, 406, 399, 392, 385, 378, 371, 364, 358, 351,\n    345,  339,  333, 327, 321, 315, 309, 304, 298, 293, 288, 283, 278, 273, 268,\n    263,  258,  254, 249, 244, 240, 236, 232, 227, 223, 219, 215, 211, 208, 204,\n    200,  197,  193, 190, 186, 183, 180, 176, 173, 170, 167, 164, 161, 158, 155,\n    153,  150,  147, 145, 142, 139, 137, 134, 132, 130, 127, 125, 123, 121, 118,\n    116,  114,  112, 110, 108, 106, 104, 102};\n\n/* Table for target energy levels. Values in Q(-7)\n * Matlab code\n * targetLevelTable = fprintf('%d,\\t%d,\\t%d,\\t%d,\\n',\n * round((32767*10.^(-(0:63)'/20)).^2*16/2^7) */\n\nstatic const int32_t kTargetLevelTable[64] = {\n    134209536, 106606424, 84680493, 67264106, 53429779, 42440782, 33711911,\n    26778323,  21270778,  16895980, 13420954, 10660642, 8468049,  6726411,\n    5342978,   4244078,   3371191,  2677832,  2127078,  1689598,  1342095,\n    1066064,   846805,    672641,   534298,   424408,   337119,   267783,\n    212708,    168960,    134210,   106606,   84680,    67264,    53430,\n    42441,     33712,     26778,    21271,    16896,    13421,    10661,\n    8468,      6726,      5343,     4244,     3371,     2678,     2127,\n    1690,      1342,      1066,     847,      673,      534,      424,\n    337,       268,       213,      169,      134,      107,      85,\n    67};\n\nint WebRtcAgc_AddMic(void* state,\n                     int16_t* const* in_mic,\n                     size_t num_bands,\n                     size_t samples) {\n  int32_t nrg, max_nrg, sample, tmp32;\n  int32_t* ptr;\n  uint16_t targetGainIdx, gain;\n  size_t i;\n  int16_t n, L, tmp16, tmp_speech[16];\n  LegacyAgc* stt;\n  stt = (LegacyAgc*)state;\n\n  if (stt->fs == 8000) {\n    L = 8;\n    if (samples != 80) {\n      return -1;\n    }\n  } else {\n    L = 16;\n    if (samples != 160) {\n      return -1;\n    }\n  }\n\n  /* apply slowly varying digital gain */\n  if (stt->micVol > stt->maxAnalog) {\n    /* |maxLevel| is strictly >= |micVol|, so this condition should be\n     * satisfied here, ensuring there is no divide-by-zero. */\n    RTC_DCHECK_GT(stt->maxLevel, stt->maxAnalog);\n\n    /* Q1 */\n    tmp16 = (int16_t)(stt->micVol - stt->maxAnalog);\n    tmp32 = (GAIN_TBL_LEN - 1) * tmp16;\n    tmp16 = (int16_t)(stt->maxLevel - stt->maxAnalog);\n    targetGainIdx = tmp32 / tmp16;\n    RTC_DCHECK_LT(targetGainIdx, GAIN_TBL_LEN);\n\n    /* Increment through the table towards the target gain.\n     * If micVol drops below maxAnalog, we allow the gain\n     * to be dropped immediately. */\n    if (stt->gainTableIdx < targetGainIdx) {\n      stt->gainTableIdx++;\n    } else if (stt->gainTableIdx > targetGainIdx) {\n      stt->gainTableIdx--;\n    }\n\n    /* Q12 */\n    gain = kGainTableAnalog[stt->gainTableIdx];\n\n    for (i = 0; i < samples; i++) {\n      size_t j;\n      for (j = 0; j < num_bands; ++j) {\n        sample = (in_mic[j][i] * gain) >> 12;\n        if (sample > 32767) {\n          in_mic[j][i] = 32767;\n        } else if (sample < -32768) {\n          in_mic[j][i] = -32768;\n        } else {\n          in_mic[j][i] = (int16_t)sample;\n        }\n      }\n    }\n  } else {\n    stt->gainTableIdx = 0;\n  }\n\n  /* compute envelope */\n  if (stt->inQueue > 0) {\n    ptr = stt->env[1];\n  } else {\n    ptr = stt->env[0];\n  }\n\n  for (i = 0; i < kNumSubframes; i++) {\n    /* iterate over samples */\n    max_nrg = 0;\n    for (n = 0; n < L; n++) {\n      nrg = in_mic[0][i * L + n] * in_mic[0][i * L + n];\n      if (nrg > max_nrg) {\n        max_nrg = nrg;\n      }\n    }\n    ptr[i] = max_nrg;\n  }\n\n  /* compute energy */\n  if (stt->inQueue > 0) {\n    ptr = stt->Rxx16w32_array[1];\n  } else {\n    ptr = stt->Rxx16w32_array[0];\n  }\n\n  for (i = 0; i < kNumSubframes / 2; i++) {\n    if (stt->fs == 16000) {\n      WebRtcSpl_DownsampleBy2(&in_mic[0][i * 32], 32, tmp_speech,\n                              stt->filterState);\n    } else {\n      memcpy(tmp_speech, &in_mic[0][i * 16], 16 * sizeof(short));\n    }\n    /* Compute energy in blocks of 16 samples */\n    ptr[i] = WebRtcSpl_DotProductWithScale(tmp_speech, tmp_speech, 16, 4);\n  }\n\n  /* update queue information */\n  if (stt->inQueue == 0) {\n    stt->inQueue = 1;\n  } else {\n    stt->inQueue = 2;\n  }\n\n  /* call VAD (use low band only) */\n  WebRtcAgc_ProcessVad(&stt->vadMic, in_mic[0], samples);\n\n  return 0;\n}\n\nint WebRtcAgc_AddFarend(void* state, const int16_t* in_far, size_t samples) {\n  LegacyAgc* stt = (LegacyAgc*)state;\n\n  int err = WebRtcAgc_GetAddFarendError(state, samples);\n\n  if (err != 0)\n    return err;\n\n  return WebRtcAgc_AddFarendToDigital(&stt->digitalAgc, in_far, samples);\n}\n\nint WebRtcAgc_GetAddFarendError(void* state, size_t samples) {\n  LegacyAgc* stt;\n  stt = (LegacyAgc*)state;\n\n  if (stt == NULL)\n    return -1;\n\n  if (stt->fs == 8000) {\n    if (samples != 80)\n      return -1;\n  } else if (stt->fs == 16000 || stt->fs == 32000 || stt->fs == 48000) {\n    if (samples != 160)\n      return -1;\n  } else {\n    return -1;\n  }\n\n  return 0;\n}\n\nint WebRtcAgc_VirtualMic(void* agcInst,\n                         int16_t* const* in_near,\n                         size_t num_bands,\n                         size_t samples,\n                         int32_t micLevelIn,\n                         int32_t* micLevelOut) {\n  int32_t tmpFlt, micLevelTmp, gainIdx;\n  uint16_t gain;\n  size_t ii, j;\n  LegacyAgc* stt;\n\n  uint32_t nrg;\n  size_t sampleCntr;\n  uint32_t frameNrg = 0;\n  uint32_t frameNrgLimit = 5500;\n  int16_t numZeroCrossing = 0;\n  const int16_t kZeroCrossingLowLim = 15;\n  const int16_t kZeroCrossingHighLim = 20;\n\n  stt = (LegacyAgc*)agcInst;\n\n  /*\n   *  Before applying gain decide if this is a low-level signal.\n   *  The idea is that digital AGC will not adapt to low-level\n   *  signals.\n   */\n  if (stt->fs != 8000) {\n    frameNrgLimit = frameNrgLimit << 1;\n  }\n\n  frameNrg = (uint32_t)(in_near[0][0] * in_near[0][0]);\n  for (sampleCntr = 1; sampleCntr < samples; sampleCntr++) {\n    // increment frame energy if it is less than the limit\n    // the correct value of the energy is not important\n    if (frameNrg < frameNrgLimit) {\n      nrg = (uint32_t)(in_near[0][sampleCntr] * in_near[0][sampleCntr]);\n      frameNrg += nrg;\n    }\n\n    // Count the zero crossings\n    numZeroCrossing +=\n        ((in_near[0][sampleCntr] ^ in_near[0][sampleCntr - 1]) < 0);\n  }\n\n  if ((frameNrg < 500) || (numZeroCrossing <= 5)) {\n    stt->lowLevelSignal = 1;\n  } else if (numZeroCrossing <= kZeroCrossingLowLim) {\n    stt->lowLevelSignal = 0;\n  } else if (frameNrg <= frameNrgLimit) {\n    stt->lowLevelSignal = 1;\n  } else if (numZeroCrossing >= kZeroCrossingHighLim) {\n    stt->lowLevelSignal = 1;\n  } else {\n    stt->lowLevelSignal = 0;\n  }\n\n  micLevelTmp = micLevelIn << stt->scale;\n  /* Set desired level */\n  gainIdx = stt->micVol;\n  if (stt->micVol > stt->maxAnalog) {\n    gainIdx = stt->maxAnalog;\n  }\n  if (micLevelTmp != stt->micRef) {\n    /* Something has happened with the physical level, restart. */\n    stt->micRef = micLevelTmp;\n    stt->micVol = 127;\n    *micLevelOut = 127;\n    stt->micGainIdx = 127;\n    gainIdx = 127;\n  }\n  /* Pre-process the signal to emulate the microphone level. */\n  /* Take one step at a time in the gain table. */\n  if (gainIdx > 127) {\n    gain = kGainTableVirtualMic[gainIdx - 128];\n  } else {\n    gain = kSuppressionTableVirtualMic[127 - gainIdx];\n  }\n  for (ii = 0; ii < samples; ii++) {\n    tmpFlt = (in_near[0][ii] * gain) >> 10;\n    if (tmpFlt > 32767) {\n      tmpFlt = 32767;\n      gainIdx--;\n      if (gainIdx >= 127) {\n        gain = kGainTableVirtualMic[gainIdx - 127];\n      } else {\n        gain = kSuppressionTableVirtualMic[127 - gainIdx];\n      }\n    }\n    if (tmpFlt < -32768) {\n      tmpFlt = -32768;\n      gainIdx--;\n      if (gainIdx >= 127) {\n        gain = kGainTableVirtualMic[gainIdx - 127];\n      } else {\n        gain = kSuppressionTableVirtualMic[127 - gainIdx];\n      }\n    }\n    in_near[0][ii] = (int16_t)tmpFlt;\n    for (j = 1; j < num_bands; ++j) {\n      tmpFlt = (in_near[j][ii] * gain) >> 10;\n      if (tmpFlt > 32767) {\n        tmpFlt = 32767;\n      }\n      if (tmpFlt < -32768) {\n        tmpFlt = -32768;\n      }\n      in_near[j][ii] = (int16_t)tmpFlt;\n    }\n  }\n  /* Set the level we (finally) used */\n  stt->micGainIdx = gainIdx;\n  //    *micLevelOut = stt->micGainIdx;\n  *micLevelOut = stt->micGainIdx >> stt->scale;\n  /* Add to Mic as if it was the output from a true microphone */\n  if (WebRtcAgc_AddMic(agcInst, in_near, num_bands, samples) != 0) {\n    return -1;\n  }\n  return 0;\n}\n\nvoid WebRtcAgc_UpdateAgcThresholds(LegacyAgc* stt) {\n  int16_t tmp16;\n#ifdef MIC_LEVEL_FEEDBACK\n  int zeros;\n\n  if (stt->micLvlSat) {\n    /* Lower the analog target level since we have reached its maximum */\n    zeros = WebRtcSpl_NormW32(stt->Rxx160_LPw32);\n    stt->targetIdxOffset = (3 * zeros - stt->targetIdx - 2) / 4;\n  }\n#endif\n\n  /* Set analog target level in envelope dBOv scale */\n  tmp16 = (DIFF_REF_TO_ANALOG * stt->compressionGaindB) + ANALOG_TARGET_LEVEL_2;\n  tmp16 = WebRtcSpl_DivW32W16ResW16((int32_t)tmp16, ANALOG_TARGET_LEVEL);\n  stt->analogTarget = DIGITAL_REF_AT_0_COMP_GAIN + tmp16;\n  if (stt->analogTarget < DIGITAL_REF_AT_0_COMP_GAIN) {\n    stt->analogTarget = DIGITAL_REF_AT_0_COMP_GAIN;\n  }\n  if (stt->agcMode == kAgcModeFixedDigital) {\n    /* Adjust for different parameter interpretation in FixedDigital mode */\n    stt->analogTarget = stt->compressionGaindB;\n  }\n#ifdef MIC_LEVEL_FEEDBACK\n  stt->analogTarget += stt->targetIdxOffset;\n#endif\n  /* Since the offset between RMS and ENV is not constant, we should make this\n   * into a\n   * table, but for now, we'll stick with a constant, tuned for the chosen\n   * analog\n   * target level.\n   */\n  stt->targetIdx = ANALOG_TARGET_LEVEL + OFFSET_ENV_TO_RMS;\n#ifdef MIC_LEVEL_FEEDBACK\n  stt->targetIdx += stt->targetIdxOffset;\n#endif\n  /* Analog adaptation limits */\n  /* analogTargetLevel = round((32767*10^(-targetIdx/20))^2*16/2^7) */\n  stt->analogTargetLevel =\n      RXX_BUFFER_LEN * kTargetLevelTable[stt->targetIdx]; /* ex. -20 dBov */\n  stt->startUpperLimit =\n      RXX_BUFFER_LEN * kTargetLevelTable[stt->targetIdx - 1]; /* -19 dBov */\n  stt->startLowerLimit =\n      RXX_BUFFER_LEN * kTargetLevelTable[stt->targetIdx + 1]; /* -21 dBov */\n  stt->upperPrimaryLimit =\n      RXX_BUFFER_LEN * kTargetLevelTable[stt->targetIdx - 2]; /* -18 dBov */\n  stt->lowerPrimaryLimit =\n      RXX_BUFFER_LEN * kTargetLevelTable[stt->targetIdx + 2]; /* -22 dBov */\n  stt->upperSecondaryLimit =\n      RXX_BUFFER_LEN * kTargetLevelTable[stt->targetIdx - 5]; /* -15 dBov */\n  stt->lowerSecondaryLimit =\n      RXX_BUFFER_LEN * kTargetLevelTable[stt->targetIdx + 5]; /* -25 dBov */\n  stt->upperLimit = stt->startUpperLimit;\n  stt->lowerLimit = stt->startLowerLimit;\n}\n\nvoid WebRtcAgc_SaturationCtrl(LegacyAgc* stt,\n                              uint8_t* saturated,\n                              int32_t* env) {\n  int16_t i, tmpW16;\n\n  /* Check if the signal is saturated */\n  for (i = 0; i < 10; i++) {\n    tmpW16 = (int16_t)(env[i] >> 20);\n    if (tmpW16 > 875) {\n      stt->envSum += tmpW16;\n    }\n  }\n\n  if (stt->envSum > 25000) {\n    *saturated = 1;\n    stt->envSum = 0;\n  }\n\n  /* stt->envSum *= 0.99; */\n  stt->envSum = (int16_t)((stt->envSum * 32440) >> 15);\n}\n\nvoid WebRtcAgc_ZeroCtrl(LegacyAgc* stt, int32_t* inMicLevel, int32_t* env) {\n  int16_t i;\n  int64_t tmp = 0;\n  int32_t midVal;\n\n  /* Is the input signal zero? */\n  for (i = 0; i < 10; i++) {\n    tmp += env[i];\n  }\n\n  /* Each block is allowed to have a few non-zero\n   * samples.\n   */\n  if (tmp < 500) {\n    stt->msZero += 10;\n  } else {\n    stt->msZero = 0;\n  }\n\n  if (stt->muteGuardMs > 0) {\n    stt->muteGuardMs -= 10;\n  }\n\n  if (stt->msZero > 500) {\n    stt->msZero = 0;\n\n    /* Increase microphone level only if it's less than 50% */\n    midVal = (stt->maxAnalog + stt->minLevel + 1) / 2;\n    if (*inMicLevel < midVal) {\n      /* *inMicLevel *= 1.1; */\n      *inMicLevel = (1126 * *inMicLevel) >> 10;\n      /* Reduces risk of a muted mic repeatedly triggering excessive levels due\n       * to zero signal detection. */\n      *inMicLevel = WEBRTC_SPL_MIN(*inMicLevel, stt->zeroCtrlMax);\n      stt->micVol = *inMicLevel;\n    }\n\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n    fprintf(stt->fpt,\n            \"\\t\\tAGC->zeroCntrl, frame %d: 500 ms under threshold,\"\n            \" micVol: %d\\n\",\n            stt->fcount, stt->micVol);\n#endif\n\n    stt->activeSpeech = 0;\n    stt->Rxx16_LPw32Max = 0;\n\n    /* The AGC has a tendency (due to problems with the VAD parameters), to\n     * vastly increase the volume after a muting event. This timer prevents\n     * upwards adaptation for a short period. */\n    stt->muteGuardMs = kMuteGuardTimeMs;\n  }\n}\n\nvoid WebRtcAgc_SpeakerInactiveCtrl(LegacyAgc* stt) {\n  /* Check if the near end speaker is inactive.\n   * If that is the case the VAD threshold is\n   * increased since the VAD speech model gets\n   * more sensitive to any sound after a long\n   * silence.\n   */\n\n  int32_t tmp32;\n  int16_t vadThresh;\n\n  if (stt->vadMic.stdLongTerm < 2500) {\n    stt->vadThreshold = 1500;\n  } else {\n    vadThresh = kNormalVadThreshold;\n    if (stt->vadMic.stdLongTerm < 4500) {\n      /* Scale between min and max threshold */\n      vadThresh += (4500 - stt->vadMic.stdLongTerm) / 2;\n    }\n\n    /* stt->vadThreshold = (31 * stt->vadThreshold + vadThresh) / 32; */\n    tmp32 = vadThresh + 31 * stt->vadThreshold;\n    stt->vadThreshold = (int16_t)(tmp32 >> 5);\n  }\n}\n\nvoid WebRtcAgc_ExpCurve(int16_t volume, int16_t* index) {\n  // volume in Q14\n  // index in [0-7]\n  /* 8 different curves */\n  if (volume > 5243) {\n    if (volume > 7864) {\n      if (volume > 12124) {\n        *index = 7;\n      } else {\n        *index = 6;\n      }\n    } else {\n      if (volume > 6554) {\n        *index = 5;\n      } else {\n        *index = 4;\n      }\n    }\n  } else {\n    if (volume > 2621) {\n      if (volume > 3932) {\n        *index = 3;\n      } else {\n        *index = 2;\n      }\n    } else {\n      if (volume > 1311) {\n        *index = 1;\n      } else {\n        *index = 0;\n      }\n    }\n  }\n}\n\nint32_t WebRtcAgc_ProcessAnalog(void* state,\n                                int32_t inMicLevel,\n                                int32_t* outMicLevel,\n                                int16_t vadLogRatio,\n                                int16_t echo,\n                                uint8_t* saturationWarning) {\n  uint32_t tmpU32;\n  int32_t Rxx16w32, tmp32;\n  int32_t inMicLevelTmp, lastMicVol;\n  int16_t i;\n  uint8_t saturated = 0;\n  LegacyAgc* stt;\n\n  stt = (LegacyAgc*)state;\n  inMicLevelTmp = inMicLevel << stt->scale;\n\n  if (inMicLevelTmp > stt->maxAnalog) {\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n    fprintf(stt->fpt, \"\\tAGC->ProcessAnalog, frame %d: micLvl > maxAnalog\\n\",\n            stt->fcount);\n#endif\n    return -1;\n  } else if (inMicLevelTmp < stt->minLevel) {\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n    fprintf(stt->fpt, \"\\tAGC->ProcessAnalog, frame %d: micLvl < minLevel\\n\",\n            stt->fcount);\n#endif\n    return -1;\n  }\n\n  if (stt->firstCall == 0) {\n    int32_t tmpVol;\n    stt->firstCall = 1;\n    tmp32 = ((stt->maxLevel - stt->minLevel) * 51) >> 9;\n    tmpVol = (stt->minLevel + tmp32);\n\n    /* If the mic level is very low at start, increase it! */\n    if ((inMicLevelTmp < tmpVol) && (stt->agcMode == kAgcModeAdaptiveAnalog)) {\n      inMicLevelTmp = tmpVol;\n    }\n    stt->micVol = inMicLevelTmp;\n  }\n\n  /* Set the mic level to the previous output value if there is digital input\n   * gain */\n  if ((inMicLevelTmp == stt->maxAnalog) && (stt->micVol > stt->maxAnalog)) {\n    inMicLevelTmp = stt->micVol;\n  }\n\n  /* If the mic level was manually changed to a very low value raise it! */\n  if ((inMicLevelTmp != stt->micVol) && (inMicLevelTmp < stt->minOutput)) {\n    tmp32 = ((stt->maxLevel - stt->minLevel) * 51) >> 9;\n    inMicLevelTmp = (stt->minLevel + tmp32);\n    stt->micVol = inMicLevelTmp;\n#ifdef MIC_LEVEL_FEEDBACK\n// stt->numBlocksMicLvlSat = 0;\n#endif\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n    fprintf(stt->fpt,\n            \"\\tAGC->ProcessAnalog, frame %d: micLvl < minLevel by manual\"\n            \" decrease, raise vol\\n\",\n            stt->fcount);\n#endif\n  }\n\n  if (inMicLevelTmp != stt->micVol) {\n    if (inMicLevel == stt->lastInMicLevel) {\n      // We requested a volume adjustment, but it didn't occur. This is\n      // probably due to a coarse quantization of the volume slider.\n      // Restore the requested value to prevent getting stuck.\n      inMicLevelTmp = stt->micVol;\n    } else {\n      // As long as the value changed, update to match.\n      stt->micVol = inMicLevelTmp;\n    }\n  }\n\n  if (inMicLevelTmp > stt->maxLevel) {\n    // Always allow the user to raise the volume above the maxLevel.\n    stt->maxLevel = inMicLevelTmp;\n  }\n\n  // Store last value here, after we've taken care of manual updates etc.\n  stt->lastInMicLevel = inMicLevel;\n  lastMicVol = stt->micVol;\n\n  /* Checks if the signal is saturated. Also a check if individual samples\n   * are larger than 12000 is done. If they are the counter for increasing\n   * the volume level is set to -100ms\n   */\n  WebRtcAgc_SaturationCtrl(stt, &saturated, stt->env[0]);\n\n  /* The AGC is always allowed to lower the level if the signal is saturated */\n  if (saturated == 1) {\n    /* Lower the recording level\n     * Rxx160_LP is adjusted down because it is so slow it could\n     * cause the AGC to make wrong decisions. */\n    /* stt->Rxx160_LPw32 *= 0.875; */\n    stt->Rxx160_LPw32 = (stt->Rxx160_LPw32 / 8) * 7;\n\n    stt->zeroCtrlMax = stt->micVol;\n\n    /* stt->micVol *= 0.903; */\n    tmp32 = inMicLevelTmp - stt->minLevel;\n    tmpU32 = WEBRTC_SPL_UMUL(29591, (uint32_t)(tmp32));\n    stt->micVol = (tmpU32 >> 15) + stt->minLevel;\n    if (stt->micVol > lastMicVol - 2) {\n      stt->micVol = lastMicVol - 2;\n    }\n    inMicLevelTmp = stt->micVol;\n\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n    fprintf(stt->fpt,\n            \"\\tAGC->ProcessAnalog, frame %d: saturated, micVol = %d\\n\",\n            stt->fcount, stt->micVol);\n#endif\n\n    if (stt->micVol < stt->minOutput) {\n      *saturationWarning = 1;\n    }\n\n    /* Reset counter for decrease of volume level to avoid\n     * decreasing too much. The saturation control can still\n     * lower the level if needed. */\n    stt->msTooHigh = -100;\n\n    /* Enable the control mechanism to ensure that our measure,\n     * Rxx160_LP, is in the correct range. This must be done since\n     * the measure is very slow. */\n    stt->activeSpeech = 0;\n    stt->Rxx16_LPw32Max = 0;\n\n    /* Reset to initial values */\n    stt->msecSpeechInnerChange = kMsecSpeechInner;\n    stt->msecSpeechOuterChange = kMsecSpeechOuter;\n    stt->changeToSlowMode = 0;\n\n    stt->muteGuardMs = 0;\n\n    stt->upperLimit = stt->startUpperLimit;\n    stt->lowerLimit = stt->startLowerLimit;\n#ifdef MIC_LEVEL_FEEDBACK\n// stt->numBlocksMicLvlSat = 0;\n#endif\n  }\n\n  /* Check if the input speech is zero. If so the mic volume\n   * is increased. On some computers the input is zero up as high\n   * level as 17% */\n  WebRtcAgc_ZeroCtrl(stt, &inMicLevelTmp, stt->env[0]);\n\n  /* Check if the near end speaker is inactive.\n   * If that is the case the VAD threshold is\n   * increased since the VAD speech model gets\n   * more sensitive to any sound after a long\n   * silence.\n   */\n  WebRtcAgc_SpeakerInactiveCtrl(stt);\n\n  for (i = 0; i < 5; i++) {\n    /* Computed on blocks of 16 samples */\n\n    Rxx16w32 = stt->Rxx16w32_array[0][i];\n\n    /* Rxx160w32 in Q(-7) */\n    tmp32 = (Rxx16w32 - stt->Rxx16_vectorw32[stt->Rxx16pos]) >> 3;\n    stt->Rxx160w32 = stt->Rxx160w32 + tmp32;\n    stt->Rxx16_vectorw32[stt->Rxx16pos] = Rxx16w32;\n\n    /* Circular buffer */\n    stt->Rxx16pos++;\n    if (stt->Rxx16pos == RXX_BUFFER_LEN) {\n      stt->Rxx16pos = 0;\n    }\n\n    /* Rxx16_LPw32 in Q(-4) */\n    tmp32 = (Rxx16w32 - stt->Rxx16_LPw32) >> kAlphaShortTerm;\n    stt->Rxx16_LPw32 = (stt->Rxx16_LPw32) + tmp32;\n\n    if (vadLogRatio > stt->vadThreshold) {\n      /* Speech detected! */\n\n      /* Check if Rxx160_LP is in the correct range. If\n       * it is too high/low then we set it to the maximum of\n       * Rxx16_LPw32 during the first 200ms of speech.\n       */\n      if (stt->activeSpeech < 250) {\n        stt->activeSpeech += 2;\n\n        if (stt->Rxx16_LPw32 > stt->Rxx16_LPw32Max) {\n          stt->Rxx16_LPw32Max = stt->Rxx16_LPw32;\n        }\n      } else if (stt->activeSpeech == 250) {\n        stt->activeSpeech += 2;\n        tmp32 = stt->Rxx16_LPw32Max >> 3;\n        stt->Rxx160_LPw32 = tmp32 * RXX_BUFFER_LEN;\n      }\n\n      tmp32 = (stt->Rxx160w32 - stt->Rxx160_LPw32) >> kAlphaLongTerm;\n      stt->Rxx160_LPw32 = stt->Rxx160_LPw32 + tmp32;\n\n      if (stt->Rxx160_LPw32 > stt->upperSecondaryLimit) {\n        stt->msTooHigh += 2;\n        stt->msTooLow = 0;\n        stt->changeToSlowMode = 0;\n\n        if (stt->msTooHigh > stt->msecSpeechOuterChange) {\n          stt->msTooHigh = 0;\n\n          /* Lower the recording level */\n          /* Multiply by 0.828125 which corresponds to decreasing ~0.8dB */\n          tmp32 = stt->Rxx160_LPw32 >> 6;\n          stt->Rxx160_LPw32 = tmp32 * 53;\n\n          /* Reduce the max gain to avoid excessive oscillation\n           * (but never drop below the maximum analog level).\n           */\n          stt->maxLevel = (15 * stt->maxLevel + stt->micVol) / 16;\n          stt->maxLevel = WEBRTC_SPL_MAX(stt->maxLevel, stt->maxAnalog);\n\n          stt->zeroCtrlMax = stt->micVol;\n\n          /* 0.95 in Q15 */\n          tmp32 = inMicLevelTmp - stt->minLevel;\n          tmpU32 = WEBRTC_SPL_UMUL(31130, (uint32_t)(tmp32));\n          stt->micVol = (tmpU32 >> 15) + stt->minLevel;\n          if (stt->micVol > lastMicVol - 1) {\n            stt->micVol = lastMicVol - 1;\n          }\n          inMicLevelTmp = stt->micVol;\n\n          /* Enable the control mechanism to ensure that our measure,\n           * Rxx160_LP, is in the correct range.\n           */\n          stt->activeSpeech = 0;\n          stt->Rxx16_LPw32Max = 0;\n#ifdef MIC_LEVEL_FEEDBACK\n// stt->numBlocksMicLvlSat = 0;\n#endif\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n          fprintf(stt->fpt,\n                  \"\\tAGC->ProcessAnalog, frame %d: measure >\"\n                  \" 2ndUpperLim, micVol = %d, maxLevel = %d\\n\",\n                  stt->fcount, stt->micVol, stt->maxLevel);\n#endif\n        }\n      } else if (stt->Rxx160_LPw32 > stt->upperLimit) {\n        stt->msTooHigh += 2;\n        stt->msTooLow = 0;\n        stt->changeToSlowMode = 0;\n\n        if (stt->msTooHigh > stt->msecSpeechInnerChange) {\n          /* Lower the recording level */\n          stt->msTooHigh = 0;\n          /* Multiply by 0.828125 which corresponds to decreasing ~0.8dB */\n          stt->Rxx160_LPw32 = (stt->Rxx160_LPw32 / 64) * 53;\n\n          /* Reduce the max gain to avoid excessive oscillation\n           * (but never drop below the maximum analog level).\n           */\n          stt->maxLevel = (15 * stt->maxLevel + stt->micVol) / 16;\n          stt->maxLevel = WEBRTC_SPL_MAX(stt->maxLevel, stt->maxAnalog);\n\n          stt->zeroCtrlMax = stt->micVol;\n\n          /* 0.965 in Q15 */\n          tmp32 = inMicLevelTmp - stt->minLevel;\n          tmpU32 =\n              WEBRTC_SPL_UMUL(31621, (uint32_t)(inMicLevelTmp - stt->minLevel));\n          stt->micVol = (tmpU32 >> 15) + stt->minLevel;\n          if (stt->micVol > lastMicVol - 1) {\n            stt->micVol = lastMicVol - 1;\n          }\n          inMicLevelTmp = stt->micVol;\n\n#ifdef MIC_LEVEL_FEEDBACK\n// stt->numBlocksMicLvlSat = 0;\n#endif\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n          fprintf(stt->fpt,\n                  \"\\tAGC->ProcessAnalog, frame %d: measure >\"\n                  \" UpperLim, micVol = %d, maxLevel = %d\\n\",\n                  stt->fcount, stt->micVol, stt->maxLevel);\n#endif\n        }\n      } else if (stt->Rxx160_LPw32 < stt->lowerSecondaryLimit) {\n        stt->msTooHigh = 0;\n        stt->changeToSlowMode = 0;\n        stt->msTooLow += 2;\n\n        if (stt->msTooLow > stt->msecSpeechOuterChange) {\n          /* Raise the recording level */\n          int16_t index, weightFIX;\n          int16_t volNormFIX = 16384;  // =1 in Q14.\n\n          stt->msTooLow = 0;\n\n          /* Normalize the volume level */\n          tmp32 = (inMicLevelTmp - stt->minLevel) << 14;\n          if (stt->maxInit != stt->minLevel) {\n            volNormFIX = tmp32 / (stt->maxInit - stt->minLevel);\n          }\n\n          /* Find correct curve */\n          WebRtcAgc_ExpCurve(volNormFIX, &index);\n\n          /* Compute weighting factor for the volume increase, 32^(-2*X)/2+1.05\n           */\n          weightFIX =\n              kOffset1[index] - (int16_t)((kSlope1[index] * volNormFIX) >> 13);\n\n          /* stt->Rxx160_LPw32 *= 1.047 [~0.2 dB]; */\n          stt->Rxx160_LPw32 = (stt->Rxx160_LPw32 / 64) * 67;\n\n          tmp32 = inMicLevelTmp - stt->minLevel;\n          tmpU32 =\n              ((uint32_t)weightFIX * (uint32_t)(inMicLevelTmp - stt->minLevel));\n          stt->micVol = (tmpU32 >> 14) + stt->minLevel;\n          if (stt->micVol < lastMicVol + 2) {\n            stt->micVol = lastMicVol + 2;\n          }\n\n          inMicLevelTmp = stt->micVol;\n\n#ifdef MIC_LEVEL_FEEDBACK\n          /* Count ms in level saturation */\n          // if (stt->micVol > stt->maxAnalog) {\n          if (stt->micVol > 150) {\n            /* mic level is saturated */\n            stt->numBlocksMicLvlSat++;\n            fprintf(stderr, \"Sat mic Level: %d\\n\", stt->numBlocksMicLvlSat);\n          }\n#endif\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n          fprintf(stt->fpt,\n                  \"\\tAGC->ProcessAnalog, frame %d: measure <\"\n                  \" 2ndLowerLim, micVol = %d\\n\",\n                  stt->fcount, stt->micVol);\n#endif\n        }\n      } else if (stt->Rxx160_LPw32 < stt->lowerLimit) {\n        stt->msTooHigh = 0;\n        stt->changeToSlowMode = 0;\n        stt->msTooLow += 2;\n\n        if (stt->msTooLow > stt->msecSpeechInnerChange) {\n          /* Raise the recording level */\n          int16_t index, weightFIX;\n          int16_t volNormFIX = 16384;  // =1 in Q14.\n\n          stt->msTooLow = 0;\n\n          /* Normalize the volume level */\n          tmp32 = (inMicLevelTmp - stt->minLevel) << 14;\n          if (stt->maxInit != stt->minLevel) {\n            volNormFIX = tmp32 / (stt->maxInit - stt->minLevel);\n          }\n\n          /* Find correct curve */\n          WebRtcAgc_ExpCurve(volNormFIX, &index);\n\n          /* Compute weighting factor for the volume increase, (3.^(-2.*X))/8+1\n           */\n          weightFIX =\n              kOffset2[index] - (int16_t)((kSlope2[index] * volNormFIX) >> 13);\n\n          /* stt->Rxx160_LPw32 *= 1.047 [~0.2 dB]; */\n          stt->Rxx160_LPw32 = (stt->Rxx160_LPw32 / 64) * 67;\n\n          tmp32 = inMicLevelTmp - stt->minLevel;\n          tmpU32 =\n              ((uint32_t)weightFIX * (uint32_t)(inMicLevelTmp - stt->minLevel));\n          stt->micVol = (tmpU32 >> 14) + stt->minLevel;\n          if (stt->micVol < lastMicVol + 1) {\n            stt->micVol = lastMicVol + 1;\n          }\n\n          inMicLevelTmp = stt->micVol;\n\n#ifdef MIC_LEVEL_FEEDBACK\n          /* Count ms in level saturation */\n          // if (stt->micVol > stt->maxAnalog) {\n          if (stt->micVol > 150) {\n            /* mic level is saturated */\n            stt->numBlocksMicLvlSat++;\n            fprintf(stderr, \"Sat mic Level: %d\\n\", stt->numBlocksMicLvlSat);\n          }\n#endif\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n          fprintf(stt->fpt,\n                  \"\\tAGC->ProcessAnalog, frame %d: measure < LowerLim, micVol \"\n                  \"= %d\\n\",\n                  stt->fcount, stt->micVol);\n#endif\n        }\n      } else {\n        /* The signal is inside the desired range which is:\n         * lowerLimit < Rxx160_LP/640 < upperLimit\n         */\n        if (stt->changeToSlowMode > 4000) {\n          stt->msecSpeechInnerChange = 1000;\n          stt->msecSpeechOuterChange = 500;\n          stt->upperLimit = stt->upperPrimaryLimit;\n          stt->lowerLimit = stt->lowerPrimaryLimit;\n        } else {\n          stt->changeToSlowMode += 2;  // in milliseconds\n        }\n        stt->msTooLow = 0;\n        stt->msTooHigh = 0;\n\n        stt->micVol = inMicLevelTmp;\n      }\n#ifdef MIC_LEVEL_FEEDBACK\n      if (stt->numBlocksMicLvlSat > NUM_BLOCKS_IN_SAT_BEFORE_CHANGE_TARGET) {\n        stt->micLvlSat = 1;\n        fprintf(stderr, \"target before = %d (%d)\\n\", stt->analogTargetLevel,\n                stt->targetIdx);\n        WebRtcAgc_UpdateAgcThresholds(stt);\n        WebRtcAgc_CalculateGainTable(\n            &(stt->digitalAgc.gainTable[0]), stt->compressionGaindB,\n            stt->targetLevelDbfs, stt->limiterEnable, stt->analogTarget);\n        stt->numBlocksMicLvlSat = 0;\n        stt->micLvlSat = 0;\n        fprintf(stderr, \"target offset = %d\\n\", stt->targetIdxOffset);\n        fprintf(stderr, \"target after  = %d (%d)\\n\", stt->analogTargetLevel,\n                stt->targetIdx);\n      }\n#endif\n    }\n  }\n\n  /* Ensure gain is not increased in presence of echo or after a mute event\n   * (but allow the zeroCtrl() increase on the frame of a mute detection).\n   */\n  if (echo == 1 ||\n      (stt->muteGuardMs > 0 && stt->muteGuardMs < kMuteGuardTimeMs)) {\n    if (stt->micVol > lastMicVol) {\n      stt->micVol = lastMicVol;\n    }\n  }\n\n  /* limit the gain */\n  if (stt->micVol > stt->maxLevel) {\n    stt->micVol = stt->maxLevel;\n  } else if (stt->micVol < stt->minOutput) {\n    stt->micVol = stt->minOutput;\n  }\n\n  *outMicLevel = WEBRTC_SPL_MIN(stt->micVol, stt->maxAnalog) >> stt->scale;\n\n  return 0;\n}\n\nint WebRtcAgc_Process(void* agcInst,\n                      const int16_t* const* in_near,\n                      size_t num_bands,\n                      size_t samples,\n                      int16_t* const* out,\n                      int32_t inMicLevel,\n                      int32_t* outMicLevel,\n                      int16_t echo,\n                      uint8_t* saturationWarning) {\n  LegacyAgc* stt;\n\n  stt = (LegacyAgc*)agcInst;\n\n  //\n  if (stt == NULL) {\n    return -1;\n  }\n  //\n\n  if (stt->fs == 8000) {\n    if (samples != 80) {\n      return -1;\n    }\n  } else if (stt->fs == 16000 || stt->fs == 32000 || stt->fs == 48000) {\n    if (samples != 160) {\n      return -1;\n    }\n  } else {\n    return -1;\n  }\n\n  *saturationWarning = 0;\n  // TODO(minyue): PUT IN RANGE CHECKING FOR INPUT LEVELS\n  *outMicLevel = inMicLevel;\n\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n  stt->fcount++;\n#endif\n\n  if (WebRtcAgc_ProcessDigital(&stt->digitalAgc, in_near, num_bands, out,\n                               stt->fs, stt->lowLevelSignal) == -1) {\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n    fprintf(stt->fpt, \"AGC->Process, frame %d: Error from DigAGC\\n\\n\",\n            stt->fcount);\n#endif\n    return -1;\n  }\n  if (stt->agcMode < kAgcModeFixedDigital &&\n      (stt->lowLevelSignal == 0 || stt->agcMode != kAgcModeAdaptiveDigital)) {\n    if (WebRtcAgc_ProcessAnalog(agcInst, inMicLevel, outMicLevel,\n                                stt->vadMic.logRatio, echo,\n                                saturationWarning) == -1) {\n      return -1;\n    }\n  }\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n  fprintf(stt->agcLog, \"%5d\\t%d\\t%d\\t%d\\t%d\\n\", stt->fcount, inMicLevel,\n          *outMicLevel, stt->maxLevel, stt->micVol);\n#endif\n\n  /* update queue */\n  if (stt->inQueue > 1) {\n    memcpy(stt->env[0], stt->env[1], 10 * sizeof(int32_t));\n    memcpy(stt->Rxx16w32_array[0], stt->Rxx16w32_array[1], 5 * sizeof(int32_t));\n  }\n\n  if (stt->inQueue > 0) {\n    stt->inQueue--;\n  }\n\n  return 0;\n}\n\nint WebRtcAgc_set_config(void* agcInst, WebRtcAgcConfig agcConfig) {\n  LegacyAgc* stt;\n  stt = (LegacyAgc*)agcInst;\n\n  if (stt == NULL) {\n    return -1;\n  }\n\n  if (stt->initFlag != kInitCheck) {\n    stt->lastError = AGC_UNINITIALIZED_ERROR;\n    return -1;\n  }\n\n  if (agcConfig.limiterEnable != kAgcFalse &&\n      agcConfig.limiterEnable != kAgcTrue) {\n    stt->lastError = AGC_BAD_PARAMETER_ERROR;\n    return -1;\n  }\n  stt->limiterEnable = agcConfig.limiterEnable;\n  stt->compressionGaindB = agcConfig.compressionGaindB;\n  if ((agcConfig.targetLevelDbfs < 0) || (agcConfig.targetLevelDbfs > 31)) {\n    stt->lastError = AGC_BAD_PARAMETER_ERROR;\n    return -1;\n  }\n  stt->targetLevelDbfs = agcConfig.targetLevelDbfs;\n\n  if (stt->agcMode == kAgcModeFixedDigital) {\n    /* Adjust for different parameter interpretation in FixedDigital mode */\n    stt->compressionGaindB += agcConfig.targetLevelDbfs;\n  }\n\n  /* Update threshold levels for analog adaptation */\n  WebRtcAgc_UpdateAgcThresholds(stt);\n\n  /* Recalculate gain table */\n  if (WebRtcAgc_CalculateGainTable(\n          &(stt->digitalAgc.gainTable[0]), stt->compressionGaindB,\n          stt->targetLevelDbfs, stt->limiterEnable, stt->analogTarget) == -1) {\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n    fprintf(stt->fpt, \"AGC->set_config, frame %d: Error from calcGainTable\\n\\n\",\n            stt->fcount);\n#endif\n    return -1;\n  }\n  /* Store the config in a WebRtcAgcConfig */\n  stt->usedConfig.compressionGaindB = agcConfig.compressionGaindB;\n  stt->usedConfig.limiterEnable = agcConfig.limiterEnable;\n  stt->usedConfig.targetLevelDbfs = agcConfig.targetLevelDbfs;\n\n  return 0;\n}\n\nint WebRtcAgc_get_config(void* agcInst, WebRtcAgcConfig* config) {\n  LegacyAgc* stt;\n  stt = (LegacyAgc*)agcInst;\n\n  if (stt == NULL) {\n    return -1;\n  }\n\n  if (config == NULL) {\n    stt->lastError = AGC_NULL_POINTER_ERROR;\n    return -1;\n  }\n\n  if (stt->initFlag != kInitCheck) {\n    stt->lastError = AGC_UNINITIALIZED_ERROR;\n    return -1;\n  }\n\n  config->limiterEnable = stt->usedConfig.limiterEnable;\n  config->targetLevelDbfs = stt->usedConfig.targetLevelDbfs;\n  config->compressionGaindB = stt->usedConfig.compressionGaindB;\n\n  return 0;\n}\n\nvoid* WebRtcAgc_Create() {\n  LegacyAgc* stt = malloc(sizeof(LegacyAgc));\n\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n  stt->fpt = fopen(\"./agc_test_log.txt\", \"wt\");\n  stt->agcLog = fopen(\"./agc_debug_log.txt\", \"wt\");\n  stt->digitalAgc.logFile = fopen(\"./agc_log.txt\", \"wt\");\n#endif\n\n  stt->initFlag = 0;\n  stt->lastError = 0;\n\n  return stt;\n}\n\nvoid WebRtcAgc_Free(void* state) {\n  LegacyAgc* stt;\n\n  stt = (LegacyAgc*)state;\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n  fclose(stt->fpt);\n  fclose(stt->agcLog);\n  fclose(stt->digitalAgc.logFile);\n#endif\n  free(stt);\n}\n\n/* minLevel     - Minimum volume level\n * maxLevel     - Maximum volume level\n */\nint WebRtcAgc_Init(void* agcInst,\n                   int32_t minLevel,\n                   int32_t maxLevel,\n                   int16_t agcMode,\n                   uint32_t fs) {\n  int32_t max_add, tmp32;\n  int16_t i;\n  int tmpNorm;\n  LegacyAgc* stt;\n\n  /* typecast state pointer */\n  stt = (LegacyAgc*)agcInst;\n\n  if (WebRtcAgc_InitDigital(&stt->digitalAgc, agcMode) != 0) {\n    stt->lastError = AGC_UNINITIALIZED_ERROR;\n    return -1;\n  }\n\n  /* Analog AGC variables */\n  stt->envSum = 0;\n\n/* mode     = 0 - Only saturation protection\n *            1 - Analog Automatic Gain Control [-targetLevelDbfs (default -3\n * dBOv)]\n *            2 - Digital Automatic Gain Control [-targetLevelDbfs (default -3\n * dBOv)]\n *            3 - Fixed Digital Gain [compressionGaindB (default 8 dB)]\n */\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n  stt->fcount = 0;\n  fprintf(stt->fpt, \"AGC->Init\\n\");\n#endif\n  if (agcMode < kAgcModeUnchanged || agcMode > kAgcModeFixedDigital) {\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n    fprintf(stt->fpt, \"AGC->Init: error, incorrect mode\\n\\n\");\n#endif\n    return -1;\n  }\n  stt->agcMode = agcMode;\n  stt->fs = fs;\n\n  /* initialize input VAD */\n  WebRtcAgc_InitVad(&stt->vadMic);\n\n  /* If the volume range is smaller than 0-256 then\n   * the levels are shifted up to Q8-domain */\n  tmpNorm = WebRtcSpl_NormU32((uint32_t)maxLevel);\n  stt->scale = tmpNorm - 23;\n  if (stt->scale < 0) {\n    stt->scale = 0;\n  }\n  // TODO(bjornv): Investigate if we really need to scale up a small range now\n  // when we have\n  // a guard against zero-increments. For now, we do not support scale up (scale\n  // = 0).\n  stt->scale = 0;\n  maxLevel <<= stt->scale;\n  minLevel <<= stt->scale;\n\n  /* Make minLevel and maxLevel static in AdaptiveDigital */\n  if (stt->agcMode == kAgcModeAdaptiveDigital) {\n    minLevel = 0;\n    maxLevel = 255;\n    stt->scale = 0;\n  }\n  /* The maximum supplemental volume range is based on a vague idea\n   * of how much lower the gain will be than the real analog gain. */\n  max_add = (maxLevel - minLevel) / 4;\n\n  /* Minimum/maximum volume level that can be set */\n  stt->minLevel = minLevel;\n  stt->maxAnalog = maxLevel;\n  stt->maxLevel = maxLevel + max_add;\n  stt->maxInit = stt->maxLevel;\n\n  stt->zeroCtrlMax = stt->maxAnalog;\n  stt->lastInMicLevel = 0;\n\n  /* Initialize micVol parameter */\n  stt->micVol = stt->maxAnalog;\n  if (stt->agcMode == kAgcModeAdaptiveDigital) {\n    stt->micVol = 127; /* Mid-point of mic level */\n  }\n  stt->micRef = stt->micVol;\n  stt->micGainIdx = 127;\n#ifdef MIC_LEVEL_FEEDBACK\n  stt->numBlocksMicLvlSat = 0;\n  stt->micLvlSat = 0;\n#endif\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n  fprintf(stt->fpt, \"AGC->Init: minLevel = %d, maxAnalog = %d, maxLevel = %d\\n\",\n          stt->minLevel, stt->maxAnalog, stt->maxLevel);\n#endif\n\n  /* Minimum output volume is 4% higher than the available lowest volume level\n   */\n  tmp32 = ((stt->maxLevel - stt->minLevel) * 10) >> 8;\n  stt->minOutput = (stt->minLevel + tmp32);\n\n  stt->msTooLow = 0;\n  stt->msTooHigh = 0;\n  stt->changeToSlowMode = 0;\n  stt->firstCall = 0;\n  stt->msZero = 0;\n  stt->muteGuardMs = 0;\n  stt->gainTableIdx = 0;\n\n  stt->msecSpeechInnerChange = kMsecSpeechInner;\n  stt->msecSpeechOuterChange = kMsecSpeechOuter;\n\n  stt->activeSpeech = 0;\n  stt->Rxx16_LPw32Max = 0;\n\n  stt->vadThreshold = kNormalVadThreshold;\n  stt->inActive = 0;\n\n  for (i = 0; i < RXX_BUFFER_LEN; i++) {\n    stt->Rxx16_vectorw32[i] = (int32_t)1000; /* -54dBm0 */\n  }\n  stt->Rxx160w32 =\n      125 * RXX_BUFFER_LEN; /* (stt->Rxx16_vectorw32[0]>>3) = 125 */\n\n  stt->Rxx16pos = 0;\n  stt->Rxx16_LPw32 = (int32_t)16284; /* Q(-4) */\n\n  for (i = 0; i < 5; i++) {\n    stt->Rxx16w32_array[0][i] = 0;\n  }\n  for (i = 0; i < 10; i++) {\n    stt->env[0][i] = 0;\n    stt->env[1][i] = 0;\n  }\n  stt->inQueue = 0;\n\n#ifdef MIC_LEVEL_FEEDBACK\n  stt->targetIdxOffset = 0;\n#endif\n\n  WebRtcSpl_MemSetW32(stt->filterState, 0, 8);\n\n  stt->initFlag = kInitCheck;\n  // Default config settings.\n  stt->defaultConfig.limiterEnable = kAgcTrue;\n  stt->defaultConfig.targetLevelDbfs = AGC_DEFAULT_TARGET_LEVEL;\n  stt->defaultConfig.compressionGaindB = AGC_DEFAULT_COMP_GAIN;\n\n  if (WebRtcAgc_set_config(stt, stt->defaultConfig) == -1) {\n    stt->lastError = AGC_UNSPECIFIED_ERROR;\n    return -1;\n  }\n  stt->Rxx160_LPw32 = stt->analogTargetLevel;  // Initialize rms value\n\n  stt->lowLevelSignal = 0;\n\n  /* Only positive values are allowed that are not too large */\n  if ((minLevel >= maxLevel) || (maxLevel & 0xFC000000)) {\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n    fprintf(stt->fpt, \"minLevel, maxLevel value(s) are invalid\\n\\n\");\n#endif\n    return -1;\n  } else {\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n    fprintf(stt->fpt, \"\\n\");\n#endif\n    return 0;\n  }\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/agc/legacy/analog_agc.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_\n\n//#define MIC_LEVEL_FEEDBACK\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n#include <stdio.h>\n#endif\n\n#include \"webrtc/modules/audio_processing/agc/legacy/digital_agc.h\"\n#include \"webrtc/modules/audio_processing/agc/legacy/gain_control.h\"\n#include \"webrtc/typedefs.h\"\n\n/* Analog Automatic Gain Control variables:\n * Constant declarations (inner limits inside which no changes are done)\n * In the beginning the range is narrower to widen as soon as the measure\n * 'Rxx160_LP' is inside it. Currently the starting limits are -22.2+/-1dBm0\n * and the final limits -22.2+/-2.5dBm0. These levels makes the speech signal\n * go towards -25.4dBm0 (-31.4dBov). Tuned with wbfile-31.4dBov.pcm\n * The limits are created by running the AGC with a file having the desired\n * signal level and thereafter plotting Rxx160_LP in the dBm0-domain defined\n * by out=10*log10(in/260537279.7); Set the target level to the average level\n * of our measure Rxx160_LP. Remember that the levels are in blocks of 16 in\n * Q(-7). (Example matlab code: round(db2pow(-21.2)*16/2^7) )\n */\n#define RXX_BUFFER_LEN 10\n\nstatic const int16_t kMsecSpeechInner = 520;\nstatic const int16_t kMsecSpeechOuter = 340;\n\nstatic const int16_t kNormalVadThreshold = 400;\n\nstatic const int16_t kAlphaShortTerm = 6;  // 1 >> 6 = 0.0156\nstatic const int16_t kAlphaLongTerm = 10;  // 1 >> 10 = 0.000977\n\ntypedef struct {\n  // Configurable parameters/variables\n  uint32_t fs;                // Sampling frequency\n  int16_t compressionGaindB;  // Fixed gain level in dB\n  int16_t targetLevelDbfs;    // Target level in -dBfs of envelope (default -3)\n  int16_t agcMode;            // Hard coded mode (adaptAna/adaptDig/fixedDig)\n  uint8_t limiterEnable;      // Enabling limiter (on/off (default off))\n  WebRtcAgcConfig defaultConfig;\n  WebRtcAgcConfig usedConfig;\n\n  // General variables\n  int16_t initFlag;\n  int16_t lastError;\n\n  // Target level parameters\n  // Based on the above: analogTargetLevel = round((32767*10^(-22/20))^2*16/2^7)\n  int32_t analogTargetLevel;    // = RXX_BUFFER_LEN * 846805;       -22 dBfs\n  int32_t startUpperLimit;      // = RXX_BUFFER_LEN * 1066064;      -21 dBfs\n  int32_t startLowerLimit;      // = RXX_BUFFER_LEN * 672641;       -23 dBfs\n  int32_t upperPrimaryLimit;    // = RXX_BUFFER_LEN * 1342095;      -20 dBfs\n  int32_t lowerPrimaryLimit;    // = RXX_BUFFER_LEN * 534298;       -24 dBfs\n  int32_t upperSecondaryLimit;  // = RXX_BUFFER_LEN * 2677832;      -17 dBfs\n  int32_t lowerSecondaryLimit;  // = RXX_BUFFER_LEN * 267783;       -27 dBfs\n  uint16_t targetIdx;           // Table index for corresponding target level\n#ifdef MIC_LEVEL_FEEDBACK\n  uint16_t targetIdxOffset;  // Table index offset for level compensation\n#endif\n  int16_t analogTarget;  // Digital reference level in ENV scale\n\n  // Analog AGC specific variables\n  int32_t filterState[8];  // For downsampling wb to nb\n  int32_t upperLimit;      // Upper limit for mic energy\n  int32_t lowerLimit;      // Lower limit for mic energy\n  int32_t Rxx160w32;       // Average energy for one frame\n  int32_t Rxx16_LPw32;     // Low pass filtered subframe energies\n  int32_t Rxx160_LPw32;    // Low pass filtered frame energies\n  int32_t Rxx16_LPw32Max;  // Keeps track of largest energy subframe\n  int32_t Rxx16_vectorw32[RXX_BUFFER_LEN];  // Array with subframe energies\n  int32_t Rxx16w32_array[2][5];  // Energy values of microphone signal\n  int32_t env[2][10];            // Envelope values of subframes\n\n  int16_t Rxx16pos;          // Current position in the Rxx16_vectorw32\n  int16_t envSum;            // Filtered scaled envelope in subframes\n  int16_t vadThreshold;      // Threshold for VAD decision\n  int16_t inActive;          // Inactive time in milliseconds\n  int16_t msTooLow;          // Milliseconds of speech at a too low level\n  int16_t msTooHigh;         // Milliseconds of speech at a too high level\n  int16_t changeToSlowMode;  // Change to slow mode after some time at target\n  int16_t firstCall;         // First call to the process-function\n  int16_t msZero;            // Milliseconds of zero input\n  int16_t msecSpeechOuterChange;  // Min ms of speech between volume changes\n  int16_t msecSpeechInnerChange;  // Min ms of speech between volume changes\n  int16_t activeSpeech;           // Milliseconds of active speech\n  int16_t muteGuardMs;            // Counter to prevent mute action\n  int16_t inQueue;                // 10 ms batch indicator\n\n  // Microphone level variables\n  int32_t micRef;         // Remember ref. mic level for virtual mic\n  uint16_t gainTableIdx;  // Current position in virtual gain table\n  int32_t micGainIdx;     // Gain index of mic level to increase slowly\n  int32_t micVol;         // Remember volume between frames\n  int32_t maxLevel;       // Max possible vol level, incl dig gain\n  int32_t maxAnalog;      // Maximum possible analog volume level\n  int32_t maxInit;        // Initial value of \"max\"\n  int32_t minLevel;       // Minimum possible volume level\n  int32_t minOutput;      // Minimum output volume level\n  int32_t zeroCtrlMax;    // Remember max gain => don't amp low input\n  int32_t lastInMicLevel;\n\n  int16_t scale;  // Scale factor for internal volume levels\n#ifdef MIC_LEVEL_FEEDBACK\n  int16_t numBlocksMicLvlSat;\n  uint8_t micLvlSat;\n#endif\n  // Structs for VAD and digital_agc\n  AgcVad vadMic;\n  DigitalAgc digitalAgc;\n\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n  FILE* fpt;\n  FILE* agcLog;\n  int32_t fcount;\n#endif\n\n  int16_t lowLevelSignal;\n} LegacyAgc;\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/agc/legacy/digital_agc.c",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/* digital_agc.c\n *\n */\n\n#include \"webrtc/modules/audio_processing/agc/legacy/digital_agc.h\"\n\n#include <string.h>\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n#include <stdio.h>\n#endif\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/modules/audio_processing/agc/legacy/gain_control.h\"\n\n// To generate the gaintable, copy&paste the following lines to a Matlab window:\n// MaxGain = 6; MinGain = 0; CompRatio = 3; Knee = 1;\n// zeros = 0:31; lvl = 2.^(1-zeros);\n// A = -10*log10(lvl) * (CompRatio - 1) / CompRatio;\n// B = MaxGain - MinGain;\n// gains = round(2^16*10.^(0.05 * (MinGain + B * (\n// log(exp(-Knee*A)+exp(-Knee*B)) - log(1+exp(-Knee*B)) ) /\n// log(1/(1+exp(Knee*B))))));\n// fprintf(1, '\\t%i, %i, %i, %i,\\n', gains);\n// % Matlab code for plotting the gain and input/output level characteristic\n// (copy/paste the following 3 lines):\n// in = 10*log10(lvl); out = 20*log10(gains/65536);\n// subplot(121); plot(in, out); axis([-30, 0, -5, 20]); grid on; xlabel('Input\n// (dB)'); ylabel('Gain (dB)');\n// subplot(122); plot(in, in+out); axis([-30, 0, -30, 5]); grid on;\n// xlabel('Input (dB)'); ylabel('Output (dB)');\n// zoom on;\n\n// Generator table for y=log2(1+e^x) in Q8.\nenum { kGenFuncTableSize = 128 };\nstatic const uint16_t kGenFuncTable[kGenFuncTableSize] = {\n    256,   485,   786,   1126,  1484,  1849,  2217,  2586,  2955,  3324,  3693,\n    4063,  4432,  4801,  5171,  5540,  5909,  6279,  6648,  7017,  7387,  7756,\n    8125,  8495,  8864,  9233,  9603,  9972,  10341, 10711, 11080, 11449, 11819,\n    12188, 12557, 12927, 13296, 13665, 14035, 14404, 14773, 15143, 15512, 15881,\n    16251, 16620, 16989, 17359, 17728, 18097, 18466, 18836, 19205, 19574, 19944,\n    20313, 20682, 21052, 21421, 21790, 22160, 22529, 22898, 23268, 23637, 24006,\n    24376, 24745, 25114, 25484, 25853, 26222, 26592, 26961, 27330, 27700, 28069,\n    28438, 28808, 29177, 29546, 29916, 30285, 30654, 31024, 31393, 31762, 32132,\n    32501, 32870, 33240, 33609, 33978, 34348, 34717, 35086, 35456, 35825, 36194,\n    36564, 36933, 37302, 37672, 38041, 38410, 38780, 39149, 39518, 39888, 40257,\n    40626, 40996, 41365, 41734, 42104, 42473, 42842, 43212, 43581, 43950, 44320,\n    44689, 45058, 45428, 45797, 46166, 46536, 46905};\n\nstatic const int16_t kAvgDecayTime = 250;  // frames; < 3000\n\nint32_t WebRtcAgc_CalculateGainTable(int32_t* gainTable,       // Q16\n                                     int16_t digCompGaindB,    // Q0\n                                     int16_t targetLevelDbfs,  // Q0\n                                     uint8_t limiterEnable,\n                                     int16_t analogTarget)  // Q0\n{\n  // This function generates the compressor gain table used in the fixed digital\n  // part.\n  uint32_t tmpU32no1, tmpU32no2, absInLevel, logApprox;\n  int32_t inLevel, limiterLvl;\n  int32_t tmp32, tmp32no1, tmp32no2, numFIX, den, y32;\n  const uint16_t kLog10 = 54426;    // log2(10)     in Q14\n  const uint16_t kLog10_2 = 49321;  // 10*log10(2)  in Q14\n  const uint16_t kLogE_1 = 23637;   // log2(e)      in Q14\n  uint16_t constMaxGain;\n  uint16_t tmpU16, intPart, fracPart;\n  const int16_t kCompRatio = 3;\n  const int16_t kSoftLimiterLeft = 1;\n  int16_t limiterOffset = 0;  // Limiter offset\n  int16_t limiterIdx, limiterLvlX;\n  int16_t constLinApprox, zeroGainLvl, maxGain, diffGain;\n  int16_t i, tmp16, tmp16no1;\n  int zeros, zerosScale;\n\n  // Constants\n  //    kLogE_1 = 23637; // log2(e)      in Q14\n  //    kLog10 = 54426; // log2(10)     in Q14\n  //    kLog10_2 = 49321; // 10*log10(2)  in Q14\n\n  // Calculate maximum digital gain and zero gain level\n  tmp32no1 = (digCompGaindB - analogTarget) * (kCompRatio - 1);\n  tmp16no1 = analogTarget - targetLevelDbfs;\n  tmp16no1 +=\n      WebRtcSpl_DivW32W16ResW16(tmp32no1 + (kCompRatio >> 1), kCompRatio);\n  maxGain = WEBRTC_SPL_MAX(tmp16no1, (analogTarget - targetLevelDbfs));\n  tmp32no1 = maxGain * kCompRatio;\n  zeroGainLvl = digCompGaindB;\n  zeroGainLvl -= WebRtcSpl_DivW32W16ResW16(tmp32no1 + ((kCompRatio - 1) >> 1),\n                                           kCompRatio - 1);\n  if ((digCompGaindB <= analogTarget) && (limiterEnable)) {\n    zeroGainLvl += (analogTarget - digCompGaindB + kSoftLimiterLeft);\n    limiterOffset = 0;\n  }\n\n  // Calculate the difference between maximum gain and gain at 0dB0v:\n  //  diffGain = maxGain + (compRatio-1)*zeroGainLvl/compRatio\n  //           = (compRatio-1)*digCompGaindB/compRatio\n  tmp32no1 = digCompGaindB * (kCompRatio - 1);\n  diffGain =\n      WebRtcSpl_DivW32W16ResW16(tmp32no1 + (kCompRatio >> 1), kCompRatio);\n  if (diffGain < 0 || diffGain >= kGenFuncTableSize) {\n    RTC_DCHECK(0);\n    return -1;\n  }\n\n  // Calculate the limiter level and index:\n  //  limiterLvlX = analogTarget - limiterOffset\n  //  limiterLvl  = targetLevelDbfs + limiterOffset/compRatio\n  limiterLvlX = analogTarget - limiterOffset;\n  limiterIdx = 2 + WebRtcSpl_DivW32W16ResW16((int32_t)limiterLvlX * (1 << 13),\n                                             kLog10_2 / 2);\n  tmp16no1 =\n      WebRtcSpl_DivW32W16ResW16(limiterOffset + (kCompRatio >> 1), kCompRatio);\n  limiterLvl = targetLevelDbfs + tmp16no1;\n\n  // Calculate (through table lookup):\n  //  constMaxGain = log2(1+2^(log2(e)*diffGain)); (in Q8)\n  constMaxGain = kGenFuncTable[diffGain];  // in Q8\n\n  // Calculate a parameter used to approximate the fractional part of 2^x with a\n  // piecewise linear function in Q14:\n  //  constLinApprox = round(3/2*(4*(3-2*sqrt(2))/(log(2)^2)-0.5)*2^14);\n  constLinApprox = 22817;  // in Q14\n\n  // Calculate a denominator used in the exponential part to convert from dB to\n  // linear scale:\n  //  den = 20*constMaxGain (in Q8)\n  den = WEBRTC_SPL_MUL_16_U16(20, constMaxGain);  // in Q8\n\n  for (i = 0; i < 32; i++) {\n    // Calculate scaled input level (compressor):\n    //  inLevel =\n    //  fix((-constLog10_2*(compRatio-1)*(1-i)+fix(compRatio/2))/compRatio)\n    tmp16 = (int16_t)((kCompRatio - 1) * (i - 1));       // Q0\n    tmp32 = WEBRTC_SPL_MUL_16_U16(tmp16, kLog10_2) + 1;  // Q14\n    inLevel = WebRtcSpl_DivW32W16(tmp32, kCompRatio);    // Q14\n\n    // Calculate diffGain-inLevel, to map using the genFuncTable\n    inLevel = (int32_t)diffGain * (1 << 14) - inLevel;  // Q14\n\n    // Make calculations on abs(inLevel) and compensate for the sign afterwards.\n    absInLevel = (uint32_t)WEBRTC_SPL_ABS_W32(inLevel);  // Q14\n\n    // LUT with interpolation\n    intPart = (uint16_t)(absInLevel >> 14);\n    fracPart =\n        (uint16_t)(absInLevel & 0x00003FFF);  // extract the fractional part\n    tmpU16 = kGenFuncTable[intPart + 1] - kGenFuncTable[intPart];  // Q8\n    tmpU32no1 = tmpU16 * fracPart;                                 // Q22\n    tmpU32no1 += (uint32_t)kGenFuncTable[intPart] << 14;           // Q22\n    logApprox = tmpU32no1 >> 8;                                    // Q14\n    // Compensate for negative exponent using the relation:\n    //  log2(1 + 2^-x) = log2(1 + 2^x) - x\n    if (inLevel < 0) {\n      zeros = WebRtcSpl_NormU32(absInLevel);\n      zerosScale = 0;\n      if (zeros < 15) {\n        // Not enough space for multiplication\n        tmpU32no2 = absInLevel >> (15 - zeros);                 // Q(zeros-1)\n        tmpU32no2 = WEBRTC_SPL_UMUL_32_16(tmpU32no2, kLogE_1);  // Q(zeros+13)\n        if (zeros < 9) {\n          zerosScale = 9 - zeros;\n          tmpU32no1 >>= zerosScale;  // Q(zeros+13)\n        } else {\n          tmpU32no2 >>= zeros - 9;  // Q22\n        }\n      } else {\n        tmpU32no2 = WEBRTC_SPL_UMUL_32_16(absInLevel, kLogE_1);  // Q28\n        tmpU32no2 >>= 6;                                         // Q22\n      }\n      logApprox = 0;\n      if (tmpU32no2 < tmpU32no1) {\n        logApprox = (tmpU32no1 - tmpU32no2) >> (8 - zerosScale);  // Q14\n      }\n    }\n    numFIX = (maxGain * constMaxGain) * (1 << 6);  // Q14\n    numFIX -= (int32_t)logApprox * diffGain;       // Q14\n\n    // Calculate ratio\n    // Shift |numFIX| as much as possible.\n    // Ensure we avoid wrap-around in |den| as well.\n    if (numFIX > (den >> 8) || -numFIX > (den >> 8))  // |den| is Q8.\n    {\n      zeros = WebRtcSpl_NormW32(numFIX);\n    } else {\n      zeros = WebRtcSpl_NormW32(den) + 8;\n    }\n    numFIX *= 1 << zeros;  // Q(14+zeros)\n\n    // Shift den so we end up in Qy1\n    tmp32no1 = WEBRTC_SPL_SHIFT_W32(den, zeros - 9);  // Q(zeros - 1)\n    y32 = numFIX / tmp32no1;  // in Q15\n    // This is to do rounding in Q14.\n    y32 = y32 >= 0 ? (y32 + 1) >> 1 : -((-y32 + 1) >> 1);\n\n    if (limiterEnable && (i < limiterIdx)) {\n      tmp32 = WEBRTC_SPL_MUL_16_U16(i - 1, kLog10_2);  // Q14\n      tmp32 -= limiterLvl * (1 << 14);                 // Q14\n      y32 = WebRtcSpl_DivW32W16(tmp32 + 10, 20);\n    }\n    if (y32 > 39000) {\n      tmp32 = (y32 >> 1) * kLog10 + 4096;  // in Q27\n      tmp32 >>= 13;                        // In Q14.\n    } else {\n      tmp32 = y32 * kLog10 + 8192;  // in Q28\n      tmp32 >>= 14;                 // In Q14.\n    }\n    tmp32 += 16 << 14;  // in Q14 (Make sure final output is in Q16)\n\n    // Calculate power\n    if (tmp32 > 0) {\n      intPart = (int16_t)(tmp32 >> 14);\n      fracPart = (uint16_t)(tmp32 & 0x00003FFF);  // in Q14\n      if ((fracPart >> 13) != 0) {\n        tmp16 = (2 << 14) - constLinApprox;\n        tmp32no2 = (1 << 14) - fracPart;\n        tmp32no2 *= tmp16;\n        tmp32no2 >>= 13;\n        tmp32no2 = (1 << 14) - tmp32no2;\n      } else {\n        tmp16 = constLinApprox - (1 << 14);\n        tmp32no2 = (fracPart * tmp16) >> 13;\n      }\n      fracPart = (uint16_t)tmp32no2;\n      gainTable[i] =\n          (1 << intPart) + WEBRTC_SPL_SHIFT_W32(fracPart, intPart - 14);\n    } else {\n      gainTable[i] = 0;\n    }\n  }\n\n  return 0;\n}\n\nint32_t WebRtcAgc_InitDigital(DigitalAgc* stt, int16_t agcMode) {\n  if (agcMode == kAgcModeFixedDigital) {\n    // start at minimum to find correct gain faster\n    stt->capacitorSlow = 0;\n  } else {\n    // start out with 0 dB gain\n    stt->capacitorSlow = 134217728;  // (int32_t)(0.125f * 32768.0f * 32768.0f);\n  }\n  stt->capacitorFast = 0;\n  stt->gain = 65536;\n  stt->gatePrevious = 0;\n  stt->agcMode = agcMode;\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n  stt->frameCounter = 0;\n#endif\n\n  // initialize VADs\n  WebRtcAgc_InitVad(&stt->vadNearend);\n  WebRtcAgc_InitVad(&stt->vadFarend);\n\n  return 0;\n}\n\nint32_t WebRtcAgc_AddFarendToDigital(DigitalAgc* stt,\n                                     const int16_t* in_far,\n                                     size_t nrSamples) {\n  RTC_DCHECK(stt);\n  // VAD for far end\n  WebRtcAgc_ProcessVad(&stt->vadFarend, in_far, nrSamples);\n\n  return 0;\n}\n\nint32_t WebRtcAgc_ProcessDigital(DigitalAgc* stt,\n                                 const int16_t* const* in_near,\n                                 size_t num_bands,\n                                 int16_t* const* out,\n                                 uint32_t FS,\n                                 int16_t lowlevelSignal) {\n  // array for gains (one value per ms, incl start & end)\n  int32_t gains[11];\n\n  int32_t out_tmp, tmp32;\n  int32_t env[10];\n  int32_t max_nrg;\n  int32_t cur_level;\n  int32_t gain32, delta;\n  int16_t logratio;\n  int16_t lower_thr, upper_thr;\n  int16_t zeros = 0, zeros_fast, frac = 0;\n  int16_t decay;\n  int16_t gate, gain_adj;\n  int16_t k;\n  size_t n, i, L;\n  int16_t L2;  // samples/subframe\n\n  // determine number of samples per ms\n  if (FS == 8000) {\n    L = 8;\n    L2 = 3;\n  } else if (FS == 16000 || FS == 32000 || FS == 48000) {\n    L = 16;\n    L2 = 4;\n  } else {\n    return -1;\n  }\n\n  for (i = 0; i < num_bands; ++i) {\n    if (in_near[i] != out[i]) {\n      // Only needed if they don't already point to the same place.\n      memcpy(out[i], in_near[i], 10 * L * sizeof(in_near[i][0]));\n    }\n  }\n  // VAD for near end\n  logratio = WebRtcAgc_ProcessVad(&stt->vadNearend, out[0], L * 10);\n\n  // Account for far end VAD\n  if (stt->vadFarend.counter > 10) {\n    tmp32 = 3 * logratio;\n    logratio = (int16_t)((tmp32 - stt->vadFarend.logRatio) >> 2);\n  }\n\n  // Determine decay factor depending on VAD\n  //  upper_thr = 1.0f;\n  //  lower_thr = 0.25f;\n  upper_thr = 1024;  // Q10\n  lower_thr = 0;     // Q10\n  if (logratio > upper_thr) {\n    // decay = -2^17 / DecayTime;  ->  -65\n    decay = -65;\n  } else if (logratio < lower_thr) {\n    decay = 0;\n  } else {\n    // decay = (int16_t)(((lower_thr - logratio)\n    //       * (2^27/(DecayTime*(upper_thr-lower_thr)))) >> 10);\n    // SUBSTITUTED: 2^27/(DecayTime*(upper_thr-lower_thr))  ->  65\n    tmp32 = (lower_thr - logratio) * 65;\n    decay = (int16_t)(tmp32 >> 10);\n  }\n\n  // adjust decay factor for long silence (detected as low standard deviation)\n  // This is only done in the adaptive modes\n  if (stt->agcMode != kAgcModeFixedDigital) {\n    if (stt->vadNearend.stdLongTerm < 4000) {\n      decay = 0;\n    } else if (stt->vadNearend.stdLongTerm < 8096) {\n      // decay = (int16_t)(((stt->vadNearend.stdLongTerm - 4000) * decay) >>\n      // 12);\n      tmp32 = (stt->vadNearend.stdLongTerm - 4000) * decay;\n      decay = (int16_t)(tmp32 >> 12);\n    }\n\n    if (lowlevelSignal != 0) {\n      decay = 0;\n    }\n  }\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n  stt->frameCounter++;\n  fprintf(stt->logFile, \"%5.2f\\t%d\\t%d\\t%d\\t\", (float)(stt->frameCounter) / 100,\n          logratio, decay, stt->vadNearend.stdLongTerm);\n#endif\n  // Find max amplitude per sub frame\n  // iterate over sub frames\n  for (k = 0; k < 10; k++) {\n    // iterate over samples\n    max_nrg = 0;\n    for (n = 0; n < L; n++) {\n      int32_t nrg = out[0][k * L + n] * out[0][k * L + n];\n      if (nrg > max_nrg) {\n        max_nrg = nrg;\n      }\n    }\n    env[k] = max_nrg;\n  }\n\n  // Calculate gain per sub frame\n  gains[0] = stt->gain;\n  for (k = 0; k < 10; k++) {\n    // Fast envelope follower\n    //  decay time = -131000 / -1000 = 131 (ms)\n    stt->capacitorFast =\n        AGC_SCALEDIFF32(-1000, stt->capacitorFast, stt->capacitorFast);\n    if (env[k] > stt->capacitorFast) {\n      stt->capacitorFast = env[k];\n    }\n    // Slow envelope follower\n    if (env[k] > stt->capacitorSlow) {\n      // increase capacitorSlow\n      stt->capacitorSlow = AGC_SCALEDIFF32(500, (env[k] - stt->capacitorSlow),\n                                           stt->capacitorSlow);\n    } else {\n      // decrease capacitorSlow\n      stt->capacitorSlow =\n          AGC_SCALEDIFF32(decay, stt->capacitorSlow, stt->capacitorSlow);\n    }\n\n    // use maximum of both capacitors as current level\n    if (stt->capacitorFast > stt->capacitorSlow) {\n      cur_level = stt->capacitorFast;\n    } else {\n      cur_level = stt->capacitorSlow;\n    }\n    // Translate signal level into gain, using a piecewise linear approximation\n    // find number of leading zeros\n    zeros = WebRtcSpl_NormU32((uint32_t)cur_level);\n    if (cur_level == 0) {\n      zeros = 31;\n    }\n    tmp32 = (cur_level << zeros) & 0x7FFFFFFF;\n    frac = (int16_t)(tmp32 >> 19);  // Q12.\n    tmp32 = (stt->gainTable[zeros - 1] - stt->gainTable[zeros]) * frac;\n    gains[k + 1] = stt->gainTable[zeros] + (tmp32 >> 12);\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n    if (k == 0) {\n      fprintf(stt->logFile, \"%d\\t%d\\t%d\\t%d\\t%d\\n\", env[0], cur_level,\n              stt->capacitorFast, stt->capacitorSlow, zeros);\n    }\n#endif\n  }\n\n  // Gate processing (lower gain during absence of speech)\n  zeros = (zeros << 9) - (frac >> 3);\n  // find number of leading zeros\n  zeros_fast = WebRtcSpl_NormU32((uint32_t)stt->capacitorFast);\n  if (stt->capacitorFast == 0) {\n    zeros_fast = 31;\n  }\n  tmp32 = (stt->capacitorFast << zeros_fast) & 0x7FFFFFFF;\n  zeros_fast <<= 9;\n  zeros_fast -= (int16_t)(tmp32 >> 22);\n\n  gate = 1000 + zeros_fast - zeros - stt->vadNearend.stdShortTerm;\n\n  if (gate < 0) {\n    stt->gatePrevious = 0;\n  } else {\n    tmp32 = stt->gatePrevious * 7;\n    gate = (int16_t)((gate + tmp32) >> 3);\n    stt->gatePrevious = gate;\n  }\n  // gate < 0     -> no gate\n  // gate > 2500  -> max gate\n  if (gate > 0) {\n    if (gate < 2500) {\n      gain_adj = (2500 - gate) >> 5;\n    } else {\n      gain_adj = 0;\n    }\n    for (k = 0; k < 10; k++) {\n      if ((gains[k + 1] - stt->gainTable[0]) > 8388608) {\n        // To prevent wraparound\n        tmp32 = (gains[k + 1] - stt->gainTable[0]) >> 8;\n        tmp32 *= 178 + gain_adj;\n      } else {\n        tmp32 = (gains[k + 1] - stt->gainTable[0]) * (178 + gain_adj);\n        tmp32 >>= 8;\n      }\n      gains[k + 1] = stt->gainTable[0] + tmp32;\n    }\n  }\n\n  // Limit gain to avoid overload distortion\n  for (k = 0; k < 10; k++) {\n    // To prevent wrap around\n    zeros = 10;\n    if (gains[k + 1] > 47453132) {\n      zeros = 16 - WebRtcSpl_NormW32(gains[k + 1]);\n    }\n    gain32 = (gains[k + 1] >> zeros) + 1;\n    gain32 *= gain32;\n    // check for overflow\n    while (AGC_MUL32((env[k] >> 12) + 1, gain32) >\n           WEBRTC_SPL_SHIFT_W32((int32_t)32767, 2 * (1 - zeros + 10))) {\n      // multiply by 253/256 ==> -0.1 dB\n      if (gains[k + 1] > 8388607) {\n        // Prevent wrap around\n        gains[k + 1] = (gains[k + 1] / 256) * 253;\n      } else {\n        gains[k + 1] = (gains[k + 1] * 253) / 256;\n      }\n      gain32 = (gains[k + 1] >> zeros) + 1;\n      gain32 *= gain32;\n    }\n  }\n  // gain reductions should be done 1 ms earlier than gain increases\n  for (k = 1; k < 10; k++) {\n    if (gains[k] > gains[k + 1]) {\n      gains[k] = gains[k + 1];\n    }\n  }\n  // save start gain for next frame\n  stt->gain = gains[10];\n\n  // Apply gain\n  // handle first sub frame separately\n  delta = (gains[1] - gains[0]) * (1 << (4 - L2));\n  gain32 = gains[0] * (1 << 4);\n  // iterate over samples\n  for (n = 0; n < L; n++) {\n    for (i = 0; i < num_bands; ++i) {\n      tmp32 = out[i][n] * ((gain32 + 127) >> 7);\n      out_tmp = tmp32 >> 16;\n      if (out_tmp > 4095) {\n        out[i][n] = (int16_t)32767;\n      } else if (out_tmp < -4096) {\n        out[i][n] = (int16_t)-32768;\n      } else {\n        tmp32 = out[i][n] * (gain32 >> 4);\n        out[i][n] = (int16_t)(tmp32 >> 16);\n      }\n    }\n    //\n\n    gain32 += delta;\n  }\n  // iterate over subframes\n  for (k = 1; k < 10; k++) {\n    delta = (gains[k + 1] - gains[k]) * (1 << (4 - L2));\n    gain32 = gains[k] * (1 << 4);\n    // iterate over samples\n    for (n = 0; n < L; n++) {\n      for (i = 0; i < num_bands; ++i) {\n        tmp32 = out[i][k * L + n] * (gain32 >> 4);\n        out[i][k * L + n] = (int16_t)(tmp32 >> 16);\n      }\n      gain32 += delta;\n    }\n  }\n\n  return 0;\n}\n\nvoid WebRtcAgc_InitVad(AgcVad* state) {\n  int16_t k;\n\n  state->HPstate = 0;   // state of high pass filter\n  state->logRatio = 0;  // log( P(active) / P(inactive) )\n  // average input level (Q10)\n  state->meanLongTerm = 15 << 10;\n\n  // variance of input level (Q8)\n  state->varianceLongTerm = 500 << 8;\n\n  state->stdLongTerm = 0;  // standard deviation of input level in dB\n  // short-term average input level (Q10)\n  state->meanShortTerm = 15 << 10;\n\n  // short-term variance of input level (Q8)\n  state->varianceShortTerm = 500 << 8;\n\n  state->stdShortTerm =\n      0;               // short-term standard deviation of input level in dB\n  state->counter = 3;  // counts updates\n  for (k = 0; k < 8; k++) {\n    // downsampling filter\n    state->downState[k] = 0;\n  }\n}\n\nint16_t WebRtcAgc_ProcessVad(AgcVad* state,      // (i) VAD state\n                             const int16_t* in,  // (i) Speech signal\n                             size_t nrSamples)   // (i) number of samples\n{\n  int32_t out, nrg, tmp32, tmp32b;\n  uint16_t tmpU16;\n  int16_t k, subfr, tmp16;\n  int16_t buf1[8];\n  int16_t buf2[4];\n  int16_t HPstate;\n  int16_t zeros, dB;\n\n  // process in 10 sub frames of 1 ms (to save on memory)\n  nrg = 0;\n  HPstate = state->HPstate;\n  for (subfr = 0; subfr < 10; subfr++) {\n    // downsample to 4 kHz\n    if (nrSamples == 160) {\n      for (k = 0; k < 8; k++) {\n        tmp32 = (int32_t)in[2 * k] + (int32_t)in[2 * k + 1];\n        tmp32 >>= 1;\n        buf1[k] = (int16_t)tmp32;\n      }\n      in += 16;\n\n      WebRtcSpl_DownsampleBy2(buf1, 8, buf2, state->downState);\n    } else {\n      WebRtcSpl_DownsampleBy2(in, 8, buf2, state->downState);\n      in += 8;\n    }\n\n    // high pass filter and compute energy\n    for (k = 0; k < 4; k++) {\n      out = buf2[k] + HPstate;\n      tmp32 = 600 * out;\n      HPstate = (int16_t)((tmp32 >> 10) - buf2[k]);\n      nrg += (out * out) >> 6;\n    }\n  }\n  state->HPstate = HPstate;\n\n  // find number of leading zeros\n  if (!(0xFFFF0000 & nrg)) {\n    zeros = 16;\n  } else {\n    zeros = 0;\n  }\n  if (!(0xFF000000 & (nrg << zeros))) {\n    zeros += 8;\n  }\n  if (!(0xF0000000 & (nrg << zeros))) {\n    zeros += 4;\n  }\n  if (!(0xC0000000 & (nrg << zeros))) {\n    zeros += 2;\n  }\n  if (!(0x80000000 & (nrg << zeros))) {\n    zeros += 1;\n  }\n\n  // energy level (range {-32..30}) (Q10)\n  dB = (15 - zeros) << 11;\n\n  // Update statistics\n\n  if (state->counter < kAvgDecayTime) {\n    // decay time = AvgDecTime * 10 ms\n    state->counter++;\n  }\n\n  // update short-term estimate of mean energy level (Q10)\n  tmp32 = state->meanShortTerm * 15 + dB;\n  state->meanShortTerm = (int16_t)(tmp32 >> 4);\n\n  // update short-term estimate of variance in energy level (Q8)\n  tmp32 = (dB * dB) >> 12;\n  tmp32 += state->varianceShortTerm * 15;\n  state->varianceShortTerm = tmp32 / 16;\n\n  // update short-term estimate of standard deviation in energy level (Q10)\n  tmp32 = state->meanShortTerm * state->meanShortTerm;\n  tmp32 = (state->varianceShortTerm << 12) - tmp32;\n  state->stdShortTerm = (int16_t)WebRtcSpl_Sqrt(tmp32);\n\n  // update long-term estimate of mean energy level (Q10)\n  tmp32 = state->meanLongTerm * state->counter + dB;\n  state->meanLongTerm =\n      WebRtcSpl_DivW32W16ResW16(tmp32, WebRtcSpl_AddSatW16(state->counter, 1));\n\n  // update long-term estimate of variance in energy level (Q8)\n  tmp32 = (dB * dB) >> 12;\n  tmp32 += state->varianceLongTerm * state->counter;\n  state->varianceLongTerm =\n      WebRtcSpl_DivW32W16(tmp32, WebRtcSpl_AddSatW16(state->counter, 1));\n\n  // update long-term estimate of standard deviation in energy level (Q10)\n  tmp32 = state->meanLongTerm * state->meanLongTerm;\n  tmp32 = (state->varianceLongTerm << 12) - tmp32;\n  state->stdLongTerm = (int16_t)WebRtcSpl_Sqrt(tmp32);\n\n  // update voice activity measure (Q10)\n  tmp16 = 3 << 12;\n  // TODO(bjornv): (dB - state->meanLongTerm) can overflow, e.g., in\n  // ApmTest.Process unit test. Previously the macro WEBRTC_SPL_MUL_16_16()\n  // was used, which did an intermediate cast to (int16_t), hence losing\n  // significant bits. This cause logRatio to max out positive, rather than\n  // negative. This is a bug, but has very little significance.\n  tmp32 = tmp16 * (int16_t)(dB - state->meanLongTerm);\n  tmp32 = WebRtcSpl_DivW32W16(tmp32, state->stdLongTerm);\n  tmpU16 = (13 << 12);\n  tmp32b = WEBRTC_SPL_MUL_16_U16(state->logRatio, tmpU16);\n  tmp32 += tmp32b >> 10;\n\n  state->logRatio = (int16_t)(tmp32 >> 6);\n\n  // limit\n  if (state->logRatio > 2048) {\n    state->logRatio = 2048;\n  }\n  if (state->logRatio < -2048) {\n    state->logRatio = -2048;\n  }\n\n  return state->logRatio;  // Q10\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/agc/legacy/digital_agc.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_DIGITAL_AGC_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_DIGITAL_AGC_H_\n\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n#include <stdio.h>\n#endif\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n#include \"webrtc/typedefs.h\"\n\n// the 32 most significant bits of A(19) * B(26) >> 13\n#define AGC_MUL32(A, B) (((B) >> 13) * (A) + (((0x00001FFF & (B)) * (A)) >> 13))\n// C + the 32 most significant bits of A * B\n#define AGC_SCALEDIFF32(A, B, C) \\\n  ((C) + ((B) >> 16) * (A) + (((0x0000FFFF & (B)) * (A)) >> 16))\n\ntypedef struct {\n  int32_t downState[8];\n  int16_t HPstate;\n  int16_t counter;\n  int16_t logRatio;           // log( P(active) / P(inactive) ) (Q10)\n  int16_t meanLongTerm;       // Q10\n  int32_t varianceLongTerm;   // Q8\n  int16_t stdLongTerm;        // Q10\n  int16_t meanShortTerm;      // Q10\n  int32_t varianceShortTerm;  // Q8\n  int16_t stdShortTerm;       // Q10\n} AgcVad;                     // total = 54 bytes\n\ntypedef struct {\n  int32_t capacitorSlow;\n  int32_t capacitorFast;\n  int32_t gain;\n  int32_t gainTable[32];\n  int16_t gatePrevious;\n  int16_t agcMode;\n  AgcVad vadNearend;\n  AgcVad vadFarend;\n#ifdef WEBRTC_AGC_DEBUG_DUMP\n  FILE* logFile;\n  int frameCounter;\n#endif\n} DigitalAgc;\n\nint32_t WebRtcAgc_InitDigital(DigitalAgc* digitalAgcInst, int16_t agcMode);\n\nint32_t WebRtcAgc_ProcessDigital(DigitalAgc* digitalAgcInst,\n                                 const int16_t* const* inNear,\n                                 size_t num_bands,\n                                 int16_t* const* out,\n                                 uint32_t FS,\n                                 int16_t lowLevelSignal);\n\nint32_t WebRtcAgc_AddFarendToDigital(DigitalAgc* digitalAgcInst,\n                                     const int16_t* inFar,\n                                     size_t nrSamples);\n\nvoid WebRtcAgc_InitVad(AgcVad* vadInst);\n\nint16_t WebRtcAgc_ProcessVad(AgcVad* vadInst,    // (i) VAD state\n                             const int16_t* in,  // (i) Speech signal\n                             size_t nrSamples);  // (i) number of samples\n\nint32_t WebRtcAgc_CalculateGainTable(int32_t* gainTable,         // Q16\n                                     int16_t compressionGaindB,  // Q0 (in dB)\n                                     int16_t targetLevelDbfs,    // Q0 (in dB)\n                                     uint8_t limiterEnable,\n                                     int16_t analogTarget);\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_DIGITAL_AGC_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/agc/legacy/gain_control.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_\n\n#include \"webrtc/typedefs.h\"\n\n// Errors\n#define AGC_UNSPECIFIED_ERROR 18000\n#define AGC_UNSUPPORTED_FUNCTION_ERROR 18001\n#define AGC_UNINITIALIZED_ERROR 18002\n#define AGC_NULL_POINTER_ERROR 18003\n#define AGC_BAD_PARAMETER_ERROR 18004\n\n// Warnings\n#define AGC_BAD_PARAMETER_WARNING 18050\n\nenum {\n  kAgcModeUnchanged,\n  kAgcModeAdaptiveAnalog,\n  kAgcModeAdaptiveDigital,\n  kAgcModeFixedDigital\n};\n\nenum { kAgcFalse = 0, kAgcTrue };\n\ntypedef struct {\n  int16_t targetLevelDbfs;    // default 3 (-3 dBOv)\n  int16_t compressionGaindB;  // default 9 dB\n  uint8_t limiterEnable;      // default kAgcTrue (on)\n} WebRtcAgcConfig;\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\n/*\n * This function analyses the number of samples passed to\n * farend and produces any error code that could arise.\n *\n * Input:\n *      - agcInst           : AGC instance.\n *      - samples           : Number of samples in input vector.\n *\n * Return value:\n *                          :  0 - Normal operation.\n *                          : -1 - Error.\n */\nint WebRtcAgc_GetAddFarendError(void* state, size_t samples);\n\n/*\n * This function processes a 10 ms frame of far-end speech to determine\n * if there is active speech. The length of the input speech vector must be\n * given in samples (80 when FS=8000, and 160 when FS=16000, FS=32000 or\n * FS=48000).\n *\n * Input:\n *      - agcInst           : AGC instance.\n *      - inFar             : Far-end input speech vector\n *      - samples           : Number of samples in input vector\n *\n * Return value:\n *                          :  0 - Normal operation.\n *                          : -1 - Error\n */\nint WebRtcAgc_AddFarend(void* agcInst, const int16_t* inFar, size_t samples);\n\n/*\n * This function processes a 10 ms frame of microphone speech to determine\n * if there is active speech. The length of the input speech vector must be\n * given in samples (80 when FS=8000, and 160 when FS=16000, FS=32000 or\n * FS=48000). For very low input levels, the input signal is increased in level\n * by multiplying and overwriting the samples in inMic[].\n *\n * This function should be called before any further processing of the\n * near-end microphone signal.\n *\n * Input:\n *      - agcInst           : AGC instance.\n *      - inMic             : Microphone input speech vector for each band\n *      - num_bands         : Number of bands in input vector\n *      - samples           : Number of samples in input vector\n *\n * Return value:\n *                          :  0 - Normal operation.\n *                          : -1 - Error\n */\nint WebRtcAgc_AddMic(void* agcInst,\n                     int16_t* const* inMic,\n                     size_t num_bands,\n                     size_t samples);\n\n/*\n * This function replaces the analog microphone with a virtual one.\n * It is a digital gain applied to the input signal and is used in the\n * agcAdaptiveDigital mode where no microphone level is adjustable. The length\n * of the input speech vector must be given in samples (80 when FS=8000, and 160\n * when FS=16000, FS=32000 or FS=48000).\n *\n * Input:\n *      - agcInst           : AGC instance.\n *      - inMic             : Microphone input speech vector for each band\n *      - num_bands         : Number of bands in input vector\n *      - samples           : Number of samples in input vector\n *      - micLevelIn        : Input level of microphone (static)\n *\n * Output:\n *      - inMic             : Microphone output after processing (L band)\n *      - inMic_H           : Microphone output after processing (H band)\n *      - micLevelOut       : Adjusted microphone level after processing\n *\n * Return value:\n *                          :  0 - Normal operation.\n *                          : -1 - Error\n */\nint WebRtcAgc_VirtualMic(void* agcInst,\n                         int16_t* const* inMic,\n                         size_t num_bands,\n                         size_t samples,\n                         int32_t micLevelIn,\n                         int32_t* micLevelOut);\n\n/*\n * This function processes a 10 ms frame and adjusts (normalizes) the gain both\n * analog and digitally. The gain adjustments are done only during active\n * periods of speech. The length of the speech vectors must be given in samples\n * (80 when FS=8000, and 160 when FS=16000, FS=32000 or FS=48000). The echo\n * parameter can be used to ensure the AGC will not adjust upward in the\n * presence of echo.\n *\n * This function should be called after processing the near-end microphone\n * signal, in any case after any echo cancellation.\n *\n * Input:\n *      - agcInst           : AGC instance\n *      - inNear            : Near-end input speech vector for each band\n *      - num_bands         : Number of bands in input/output vector\n *      - samples           : Number of samples in input/output vector\n *      - inMicLevel        : Current microphone volume level\n *      - echo              : Set to 0 if the signal passed to add_mic is\n *                            almost certainly free of echo; otherwise set\n *                            to 1. If you have no information regarding echo\n *                            set to 0.\n *\n * Output:\n *      - outMicLevel       : Adjusted microphone volume level\n *      - out               : Gain-adjusted near-end speech vector\n *                          : May be the same vector as the input.\n *      - saturationWarning : A returned value of 1 indicates a saturation event\n *                            has occurred and the volume cannot be further\n *                            reduced. Otherwise will be set to 0.\n *\n * Return value:\n *                          :  0 - Normal operation.\n *                          : -1 - Error\n */\nint WebRtcAgc_Process(void* agcInst,\n                      const int16_t* const* inNear,\n                      size_t num_bands,\n                      size_t samples,\n                      int16_t* const* out,\n                      int32_t inMicLevel,\n                      int32_t* outMicLevel,\n                      int16_t echo,\n                      uint8_t* saturationWarning);\n\n/*\n * This function sets the config parameters (targetLevelDbfs,\n * compressionGaindB and limiterEnable).\n *\n * Input:\n *      - agcInst           : AGC instance\n *      - config            : config struct\n *\n * Output:\n *\n * Return value:\n *                          :  0 - Normal operation.\n *                          : -1 - Error\n */\nint WebRtcAgc_set_config(void* agcInst, WebRtcAgcConfig config);\n\n/*\n * This function returns the config parameters (targetLevelDbfs,\n * compressionGaindB and limiterEnable).\n *\n * Input:\n *      - agcInst           : AGC instance\n *\n * Output:\n *      - config            : config struct\n *\n * Return value:\n *                          :  0 - Normal operation.\n *                          : -1 - Error\n */\nint WebRtcAgc_get_config(void* agcInst, WebRtcAgcConfig* config);\n\n/*\n * This function creates and returns an AGC instance, which will contain the\n * state information for one (duplex) channel.\n */\nvoid* WebRtcAgc_Create();\n\n/*\n * This function frees the AGC instance created at the beginning.\n *\n * Input:\n *      - agcInst           : AGC instance.\n */\nvoid WebRtcAgc_Free(void* agcInst);\n\n/*\n * This function initializes an AGC instance.\n *\n * Input:\n *      - agcInst           : AGC instance.\n *      - minLevel          : Minimum possible mic level\n *      - maxLevel          : Maximum possible mic level\n *      - agcMode           : 0 - Unchanged\n *                          : 1 - Adaptive Analog Automatic Gain Control -3dBOv\n *                          : 2 - Adaptive Digital Automatic Gain Control -3dBOv\n *                          : 3 - Fixed Digital Gain 0dB\n *      - fs                : Sampling frequency\n *\n * Return value             :  0 - Ok\n *                            -1 - Error\n */\nint WebRtcAgc_Init(void* agcInst,\n                   int32_t minLevel,\n                   int32_t maxLevel,\n                   int16_t agcMode,\n                   uint32_t fs);\n\n#if defined(__cplusplus)\n}\n#endif\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/logging/apm_data_dumper.cc",
    "content": "/*\n *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/logging/apm_data_dumper.h\"\n\n#include <sstream>\n\n#include \"webrtc/base/stringutils.h\"\n\n// Check to verify that the define is properly set.\n#if !defined(WEBRTC_APM_DEBUG_DUMP) || \\\n    (WEBRTC_APM_DEBUG_DUMP != 0 && WEBRTC_APM_DEBUG_DUMP != 1)\n#error \"Set WEBRTC_APM_DEBUG_DUMP to either 0 or 1\"\n#endif\n\nnamespace webrtc {\n\nnamespace {\n\n#if WEBRTC_APM_DEBUG_DUMP == 1\nstd::string FormFileName(const char* name,\n                         int instance_index,\n                         int reinit_index,\n                         const std::string& suffix) {\n  std::stringstream ss;\n  ss << name << \"_\" << instance_index << \"-\" << reinit_index << suffix;\n  return ss.str();\n}\n#endif\n\n}  // namespace\n\n#if WEBRTC_APM_DEBUG_DUMP == 1\nApmDataDumper::ApmDataDumper(int instance_index)\n    : instance_index_(instance_index) {}\n#else\nApmDataDumper::ApmDataDumper(int instance_index) {}\n#endif\n\nApmDataDumper::~ApmDataDumper() {}\n\n#if WEBRTC_APM_DEBUG_DUMP == 1\nFILE* ApmDataDumper::GetRawFile(const char* name) {\n  std::string filename =\n      FormFileName(name, instance_index_, recording_set_index_, \".dat\");\n  auto& f = raw_files_[filename];\n  if (!f) {\n    f.reset(fopen(filename.c_str(), \"wb\"));\n  }\n  return f.get();\n}\n\nWavWriter* ApmDataDumper::GetWavFile(const char* name,\n                                     int sample_rate_hz,\n                                     int num_channels) {\n  std::string filename =\n      FormFileName(name, instance_index_, recording_set_index_, \".wav\");\n  auto& f = wav_files_[filename];\n  if (!f) {\n    f.reset(new WavWriter(filename.c_str(), sample_rate_hz, num_channels));\n  }\n  return f.get();\n}\n\n#endif\n\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/logging/apm_data_dumper.h",
    "content": "/*\n *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_\n\n#include <stdio.h>\n\n#include <memory>\n#include <string>\n#include <unordered_map>\n\n#include \"webrtc/base/array_view.h\"\n#include \"webrtc/base/constructormagic.h\"\n#include \"webrtc/common_audio/wav_file.h\"\n\n// Check to verify that the define is properly set.\n#if !defined(WEBRTC_APM_DEBUG_DUMP) || \\\n    (WEBRTC_APM_DEBUG_DUMP != 0 && WEBRTC_APM_DEBUG_DUMP != 1)\n#error \"Set WEBRTC_APM_DEBUG_DUMP to either 0 or 1\"\n#endif\n\nnamespace webrtc {\n\n#if WEBRTC_APM_DEBUG_DUMP == 1\n// Functor used to use as a custom deleter in the map of file pointers to raw\n// files.\nstruct RawFileCloseFunctor {\n  void operator()(FILE* f) const { fclose(f); }\n};\n#endif\n\n// Class that handles dumping of variables into files.\nclass ApmDataDumper {\n public:\n  // Constructor that takes an instance index that may\n  // be used to distinguish data dumped from different\n  // instances of the code.\n  explicit ApmDataDumper(int instance_index);\n\n  ~ApmDataDumper();\n\n  // Reinitializes the data dumping such that new versions\n  // of all files being dumped to are created.\n  void InitiateNewSetOfRecordings() {\n#if WEBRTC_APM_DEBUG_DUMP == 1\n    ++recording_set_index_;\n#endif\n  }\n\n  // Methods for performing dumping of data of various types into\n  // various formats.\n  void DumpRaw(const char* name, int v_length, const float* v) {\n#if WEBRTC_APM_DEBUG_DUMP == 1\n    FILE* file = GetRawFile(name);\n    fwrite(v, sizeof(v[0]), v_length, file);\n#endif\n  }\n\n  void DumpRaw(const char* name, rtc::ArrayView<const float> v) {\n#if WEBRTC_APM_DEBUG_DUMP == 1\n    DumpRaw(name, v.size(), v.data());\n#endif\n  }\n\n  void DumpRaw(const char* name, int v_length, const bool* v) {\n#if WEBRTC_APM_DEBUG_DUMP == 1\n    FILE* file = GetRawFile(name);\n    for (int k = 0; k < v_length; ++k) {\n      int16_t value = static_cast<int16_t>(v[k]);\n      fwrite(&value, sizeof(value), 1, file);\n    }\n#endif\n  }\n\n  void DumpRaw(const char* name, rtc::ArrayView<const bool> v) {\n#if WEBRTC_APM_DEBUG_DUMP == 1\n    DumpRaw(name, v.size(), v.data());\n#endif\n  }\n\n  void DumpRaw(const char* name, int v_length, const int16_t* v) {\n#if WEBRTC_APM_DEBUG_DUMP == 1\n    FILE* file = GetRawFile(name);\n    fwrite(v, sizeof(v[0]), v_length, file);\n#endif\n  }\n\n  void DumpRaw(const char* name, rtc::ArrayView<const int16_t> v) {\n#if WEBRTC_APM_DEBUG_DUMP == 1\n    DumpRaw(name, v.size(), v.data());\n#endif\n  }\n\n  void DumpRaw(const char* name, int v_length, const int32_t* v) {\n#if WEBRTC_APM_DEBUG_DUMP == 1\n    FILE* file = GetRawFile(name);\n    fwrite(v, sizeof(v[0]), v_length, file);\n#endif\n  }\n\n  void DumpRaw(const char* name, rtc::ArrayView<const int32_t> v) {\n#if WEBRTC_APM_DEBUG_DUMP == 1\n    DumpRaw(name, v.size(), v.data());\n#endif\n  }\n\n  void DumpWav(const char* name,\n               int v_length,\n               const float* v,\n               int sample_rate_hz,\n               int num_channels) {\n#if WEBRTC_APM_DEBUG_DUMP == 1\n    WavWriter* file = GetWavFile(name, sample_rate_hz, num_channels);\n    file->WriteSamples(v, v_length);\n#endif\n  }\n\n  void DumpWav(const char* name,\n               rtc::ArrayView<const float> v,\n               int sample_rate_hz,\n               int num_channels) {\n#if WEBRTC_APM_DEBUG_DUMP == 1\n    DumpWav(name, v.size(), v.data(), sample_rate_hz, num_channels);\n#endif\n  }\n\n private:\n#if WEBRTC_APM_DEBUG_DUMP == 1\n  const int instance_index_;\n  int recording_set_index_ = 0;\n  std::unordered_map<std::string, std::unique_ptr<FILE, RawFileCloseFunctor>>\n      raw_files_;\n  std::unordered_map<std::string, std::unique_ptr<WavWriter>> wav_files_;\n\n  FILE* GetRawFile(const char* name);\n  WavWriter* GetWavFile(const char* name, int sample_rate_hz, int num_channels);\n#endif\n  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(ApmDataDumper);\n};\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/defines.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_\n\n#define BLOCKL_MAX          160 // max processing block length: 160\n#define ANAL_BLOCKL_MAX     256 // max analysis block length: 256\n#define HALF_ANAL_BLOCKL    129 // half max analysis block length + 1\n#define NUM_HIGH_BANDS_MAX  2   // max number of high bands: 2\n\n#define QUANTILE            (float)0.25\n\n#define SIMULT              3\n#define END_STARTUP_LONG    200\n#define END_STARTUP_SHORT   50\n#define FACTOR              (float)40.0\n#define WIDTH               (float)0.01\n\n// Length of fft work arrays.\n#define IP_LENGTH (ANAL_BLOCKL_MAX >> 1) // must be at least ceil(2 + sqrt(ANAL_BLOCKL_MAX/2))\n#define W_LENGTH (ANAL_BLOCKL_MAX >> 1)\n\n//PARAMETERS FOR NEW METHOD\n#define DD_PR_SNR           (float)0.98 // DD update of prior SNR\n#define LRT_TAVG            (float)0.50 // tavg parameter for LRT (previously 0.90)\n#define SPECT_FL_TAVG       (float)0.30 // tavg parameter for spectral flatness measure\n#define SPECT_DIFF_TAVG     (float)0.30 // tavg parameter for spectral difference measure\n#define PRIOR_UPDATE        (float)0.10 // update parameter of prior model\n#define NOISE_UPDATE        (float)0.90 // update parameter for noise\n#define SPEECH_UPDATE       (float)0.99 // update parameter when likely speech\n#define WIDTH_PR_MAP        (float)4.0  // width parameter in sigmoid map for prior model\n#define LRT_FEATURE_THR     (float)0.5  // default threshold for LRT feature\n#define SF_FEATURE_THR      (float)0.5  // default threshold for Spectral Flatness feature\n#define SD_FEATURE_THR      (float)0.5  // default threshold for Spectral Difference feature\n#define PROB_RANGE          (float)0.20 // probability threshold for noise state in\n                                        // speech/noise likelihood\n#define HIST_PAR_EST         1000       // histogram size for estimation of parameters\n#define GAMMA_PAUSE         (float)0.05 // update for conservative noise estimate\n//\n#define B_LIM               (float)0.5  // threshold in final energy gain factor calculation\n#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/noise_suppression.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/ns/noise_suppression.h\"\n\n#include <stdlib.h>\n#include <string.h>\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n#include \"webrtc/modules/audio_processing/ns/defines.h\"\n#include \"webrtc/modules/audio_processing/ns/ns_core.h\"\n\nNsHandle* WebRtcNs_Create() {\n  NoiseSuppressionC* self = malloc(sizeof(NoiseSuppressionC));\n  self->initFlag = 0;\n  return (NsHandle*)self;\n}\n\nvoid WebRtcNs_Free(NsHandle* NS_inst) {\n  free(NS_inst);\n}\n\nint WebRtcNs_Init(NsHandle* NS_inst, uint32_t fs) {\n  return WebRtcNs_InitCore((NoiseSuppressionC*)NS_inst, fs);\n}\n\nint WebRtcNs_set_policy(NsHandle* NS_inst, int mode) {\n  return WebRtcNs_set_policy_core((NoiseSuppressionC*)NS_inst, mode);\n}\n\nvoid WebRtcNs_Analyze(NsHandle* NS_inst, const float* spframe) {\n  WebRtcNs_AnalyzeCore((NoiseSuppressionC*)NS_inst, spframe);\n}\n\nvoid WebRtcNs_Process(NsHandle* NS_inst,\n                      const float* const* spframe,\n                      size_t num_bands,\n                      float* const* outframe) {\n  WebRtcNs_ProcessCore((NoiseSuppressionC*)NS_inst, spframe, num_bands,\n                       outframe);\n}\n\nfloat WebRtcNs_prior_speech_probability(NsHandle* handle) {\n  NoiseSuppressionC* self = (NoiseSuppressionC*)handle;\n  if (handle == NULL) {\n    return -1;\n  }\n  if (self->initFlag == 0) {\n    return -1;\n  }\n  return self->priorSpeechProb;\n}\n\nconst float* WebRtcNs_noise_estimate(const NsHandle* handle) {\n  const NoiseSuppressionC* self = (const NoiseSuppressionC*)handle;\n  if (handle == NULL || self->initFlag == 0) {\n    return NULL;\n  }\n  return self->noise;\n}\n\nsize_t WebRtcNs_num_freq() {\n  return HALF_ANAL_BLOCKL;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/noise_suppression.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_H_\n\n#include <stddef.h>\n\n#include \"webrtc/typedefs.h\"\n\ntypedef struct NsHandleT NsHandle;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * This function creates an instance of the floating point Noise Suppression.\n */\nNsHandle* WebRtcNs_Create();\n\n/*\n * This function frees the dynamic memory of a specified noise suppression\n * instance.\n *\n * Input:\n *      - NS_inst       : Pointer to NS instance that should be freed\n */\nvoid WebRtcNs_Free(NsHandle* NS_inst);\n\n/*\n * This function initializes a NS instance and has to be called before any other\n * processing is made.\n *\n * Input:\n *      - NS_inst       : Instance that should be initialized\n *      - fs            : sampling frequency\n *\n * Output:\n *      - NS_inst       : Initialized instance\n *\n * Return value         :  0 - Ok\n *                        -1 - Error\n */\nint WebRtcNs_Init(NsHandle* NS_inst, uint32_t fs);\n\n/*\n * This changes the aggressiveness of the noise suppression method.\n *\n * Input:\n *      - NS_inst       : Noise suppression instance.\n *      - mode          : 0: Mild, 1: Medium , 2: Aggressive\n *\n * Output:\n *      - NS_inst       : Updated instance.\n *\n * Return value         :  0 - Ok\n *                        -1 - Error\n */\nint WebRtcNs_set_policy(NsHandle* NS_inst, int mode);\n\n/*\n * This functions estimates the background noise for the inserted speech frame.\n * The input and output signals should always be 10ms (80 or 160 samples).\n *\n * Input\n *      - NS_inst       : Noise suppression instance.\n *      - spframe       : Pointer to speech frame buffer for L band\n *\n * Output:\n *      - NS_inst       : Updated NS instance\n */\nvoid WebRtcNs_Analyze(NsHandle* NS_inst, const float* spframe);\n\n/*\n * This functions does Noise Suppression for the inserted speech frame. The\n * input and output signals should always be 10ms (80 or 160 samples).\n *\n * Input\n *      - NS_inst       : Noise suppression instance.\n *      - spframe       : Pointer to speech frame buffer for each band\n *      - num_bands     : Number of bands\n *\n * Output:\n *      - NS_inst       : Updated NS instance\n *      - outframe      : Pointer to output frame for each band\n */\nvoid WebRtcNs_Process(NsHandle* NS_inst,\n                     const float* const* spframe,\n                     size_t num_bands,\n                     float* const* outframe);\n\n/* Returns the internally used prior speech probability of the current frame.\n * There is a frequency bin based one as well, with which this should not be\n * confused.\n *\n * Input\n *      - handle        : Noise suppression instance.\n *\n * Return value         : Prior speech probability in interval [0.0, 1.0].\n *                        -1 - NULL pointer or uninitialized instance.\n */\nfloat WebRtcNs_prior_speech_probability(NsHandle* handle);\n\n/* Returns a pointer to the noise estimate per frequency bin. The number of\n * frequency bins can be provided using WebRtcNs_num_freq().\n *\n * Input\n *      - handle        : Noise suppression instance.\n *\n * Return value         : Pointer to the noise estimate per frequency bin.\n *                        Returns NULL if the input is a NULL pointer or an\n *                        uninitialized instance.\n */\nconst float* WebRtcNs_noise_estimate(const NsHandle* handle);\n\n/* Returns the number of frequency bins, which is the length of the noise\n * estimate for example.\n *\n * Return value         : Number of frequency bins.\n */\nsize_t WebRtcNs_num_freq();\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/noise_suppression_x.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/ns/noise_suppression_x.h\"\n\n#include <stdlib.h>\n\n#include \"webrtc/common_audio/signal_processing/include/real_fft.h\"\n#include \"webrtc/modules/audio_processing/ns/nsx_core.h\"\n#include \"webrtc/modules/audio_processing/ns/nsx_defines.h\"\n\nNsxHandle* WebRtcNsx_Create() {\n  NoiseSuppressionFixedC* self = malloc(sizeof(NoiseSuppressionFixedC));\n  WebRtcSpl_Init();\n  self->real_fft = NULL;\n  self->initFlag = 0;\n  return (NsxHandle*)self;\n}\n\nvoid WebRtcNsx_Free(NsxHandle* nsxInst) {\n  WebRtcSpl_FreeRealFFT(((NoiseSuppressionFixedC*)nsxInst)->real_fft);\n  free(nsxInst);\n}\n\nint WebRtcNsx_Init(NsxHandle* nsxInst, uint32_t fs) {\n  return WebRtcNsx_InitCore((NoiseSuppressionFixedC*)nsxInst, fs);\n}\n\nint WebRtcNsx_set_policy(NsxHandle* nsxInst, int mode) {\n  return WebRtcNsx_set_policy_core((NoiseSuppressionFixedC*)nsxInst, mode);\n}\n\nvoid WebRtcNsx_Process(NsxHandle* nsxInst,\n                      const short* const* speechFrame,\n                      int num_bands,\n                      short* const* outFrame) {\n  WebRtcNsx_ProcessCore((NoiseSuppressionFixedC*)nsxInst, speechFrame,\n                        num_bands, outFrame);\n}\n\nconst uint32_t* WebRtcNsx_noise_estimate(const NsxHandle* nsxInst,\n                                         int* q_noise) {\n  *q_noise = 11;\n  const NoiseSuppressionFixedC* self = (const NoiseSuppressionFixedC*)nsxInst;\n  if (nsxInst == NULL || self->initFlag == 0) {\n    return NULL;\n  }\n  *q_noise += self->prevQNoise;\n  return self->prevNoiseU32;\n}\n\nsize_t WebRtcNsx_num_freq() {\n  return HALF_ANAL_BLOCKL;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/noise_suppression_x.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_\n\n#include <stddef.h>\n\n#include \"webrtc/typedefs.h\"\n\ntypedef struct NsxHandleT NsxHandle;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * This function creates an instance of the fixed point Noise Suppression.\n */\nNsxHandle* WebRtcNsx_Create();\n\n/*\n * This function frees the dynamic memory of a specified Noise Suppression\n * instance.\n *\n * Input:\n *      - nsxInst       : Pointer to NS instance that should be freed\n */\nvoid WebRtcNsx_Free(NsxHandle* nsxInst);\n\n/*\n * This function initializes a NS instance\n *\n * Input:\n *      - nsxInst       : Instance that should be initialized\n *      - fs            : sampling frequency\n *\n * Output:\n *      - nsxInst       : Initialized instance\n *\n * Return value         :  0 - Ok\n *                        -1 - Error\n */\nint WebRtcNsx_Init(NsxHandle* nsxInst, uint32_t fs);\n\n/*\n * This changes the aggressiveness of the noise suppression method.\n *\n * Input:\n *      - nsxInst       : Instance that should be initialized\n *      - mode          : 0: Mild, 1: Medium , 2: Aggressive\n *\n * Output:\n *      - nsxInst       : Initialized instance\n *\n * Return value         :  0 - Ok\n *                        -1 - Error\n */\nint WebRtcNsx_set_policy(NsxHandle* nsxInst, int mode);\n\n/*\n * This functions does noise suppression for the inserted speech frame. The\n * input and output signals should always be 10ms (80 or 160 samples).\n *\n * Input\n *      - nsxInst       : NSx instance. Needs to be initiated before call.\n *      - speechFrame   : Pointer to speech frame buffer for each band\n *      - num_bands     : Number of bands\n *\n * Output:\n *      - nsxInst       : Updated NSx instance\n *      - outFrame      : Pointer to output frame for each band\n */\nvoid WebRtcNsx_Process(NsxHandle* nsxInst,\n                       const short* const* speechFrame,\n                       int num_bands,\n                       short* const* outFrame);\n\n/* Returns a pointer to the noise estimate per frequency bin. The number of\n * frequency bins can be provided using WebRtcNsx_num_freq().\n *\n * Input\n *      - nsxInst       : NSx instance. Needs to be initiated before call.\n *      - q_noise       : Q value of the noise estimate, which is the number of\n *                        bits that it needs to be right-shifted to be\n *                        normalized.\n *\n * Return value         : Pointer to the noise estimate per frequency bin.\n *                        Returns NULL if the input is a NULL pointer or an\n *                        uninitialized instance.\n */\nconst uint32_t* WebRtcNsx_noise_estimate(const NsxHandle* nsxInst,\n                                         int* q_noise);\n\n/* Returns the number of frequency bins, which is the length of the noise\n * estimate for example.\n *\n * Return value         : Number of frequency bins.\n */\nsize_t WebRtcNsx_num_freq();\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/ns_core.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include <math.h>\n#include <string.h>\n#include <stdlib.h>\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_audio/fft4g.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n#include \"webrtc/modules/audio_processing/ns/noise_suppression.h\"\n#include \"webrtc/modules/audio_processing/ns/ns_core.h\"\n#include \"webrtc/modules/audio_processing/ns/windows_private.h\"\n\n// Set Feature Extraction Parameters.\nstatic void set_feature_extraction_parameters(NoiseSuppressionC* self) {\n  // Bin size of histogram.\n  self->featureExtractionParams.binSizeLrt = 0.1f;\n  self->featureExtractionParams.binSizeSpecFlat = 0.05f;\n  self->featureExtractionParams.binSizeSpecDiff = 0.1f;\n\n  // Range of histogram over which LRT threshold is computed.\n  self->featureExtractionParams.rangeAvgHistLrt = 1.f;\n\n  // Scale parameters: multiply dominant peaks of the histograms by scale factor\n  // to obtain thresholds for prior model.\n  // For LRT and spectral difference.\n  self->featureExtractionParams.factor1ModelPars = 1.2f;\n  // For spectral_flatness: used when noise is flatter than speech.\n  self->featureExtractionParams.factor2ModelPars = 0.9f;\n\n  // Peak limit for spectral flatness (varies between 0 and 1).\n  self->featureExtractionParams.thresPosSpecFlat = 0.6f;\n\n  // Limit on spacing of two highest peaks in histogram: spacing determined by\n  // bin size.\n  self->featureExtractionParams.limitPeakSpacingSpecFlat =\n      2 * self->featureExtractionParams.binSizeSpecFlat;\n  self->featureExtractionParams.limitPeakSpacingSpecDiff =\n      2 * self->featureExtractionParams.binSizeSpecDiff;\n\n  // Limit on relevance of second peak.\n  self->featureExtractionParams.limitPeakWeightsSpecFlat = 0.5f;\n  self->featureExtractionParams.limitPeakWeightsSpecDiff = 0.5f;\n\n  // Fluctuation limit of LRT feature.\n  self->featureExtractionParams.thresFluctLrt = 0.05f;\n\n  // Limit on the max and min values for the feature thresholds.\n  self->featureExtractionParams.maxLrt = 1.f;\n  self->featureExtractionParams.minLrt = 0.2f;\n\n  self->featureExtractionParams.maxSpecFlat = 0.95f;\n  self->featureExtractionParams.minSpecFlat = 0.1f;\n\n  self->featureExtractionParams.maxSpecDiff = 1.f;\n  self->featureExtractionParams.minSpecDiff = 0.16f;\n\n  // Criteria of weight of histogram peak to accept/reject feature.\n  self->featureExtractionParams.thresWeightSpecFlat =\n      (int)(0.3 * (self->modelUpdatePars[1]));  // For spectral flatness.\n  self->featureExtractionParams.thresWeightSpecDiff =\n      (int)(0.3 * (self->modelUpdatePars[1]));  // For spectral difference.\n}\n\n// Initialize state.\nint WebRtcNs_InitCore(NoiseSuppressionC* self, uint32_t fs) {\n  int i;\n  // Check for valid pointer.\n  if (self == NULL) {\n    return -1;\n  }\n\n  // Initialization of struct.\n  if (fs == 8000 || fs == 16000 || fs == 32000 || fs == 48000) {\n    self->fs = fs;\n  } else {\n    return -1;\n  }\n  self->windShift = 0;\n  // We only support 10ms frames.\n  if (fs == 8000) {\n    self->blockLen = 80;\n    self->anaLen = 128;\n    self->window = kBlocks80w128;\n  } else {\n    self->blockLen = 160;\n    self->anaLen = 256;\n    self->window = kBlocks160w256;\n  }\n  self->magnLen = self->anaLen / 2 + 1;  // Number of frequency bins.\n\n  // Initialize FFT work arrays.\n  self->ip[0] = 0;  // Setting this triggers initialization.\n  memset(self->dataBuf, 0, sizeof(float) * ANAL_BLOCKL_MAX);\n  WebRtc_rdft(self->anaLen, 1, self->dataBuf, self->ip, self->wfft);\n\n  memset(self->analyzeBuf, 0, sizeof(float) * ANAL_BLOCKL_MAX);\n  memset(self->dataBuf, 0, sizeof(float) * ANAL_BLOCKL_MAX);\n  memset(self->syntBuf, 0, sizeof(float) * ANAL_BLOCKL_MAX);\n\n  // For HB processing.\n  memset(self->dataBufHB,\n         0,\n         sizeof(float) * NUM_HIGH_BANDS_MAX * ANAL_BLOCKL_MAX);\n\n  // For quantile noise estimation.\n  memset(self->quantile, 0, sizeof(float) * HALF_ANAL_BLOCKL);\n  for (i = 0; i < SIMULT * HALF_ANAL_BLOCKL; i++) {\n    self->lquantile[i] = 8.f;\n    self->density[i] = 0.3f;\n  }\n\n  for (i = 0; i < SIMULT; i++) {\n    self->counter[i] =\n        (int)floor((float)(END_STARTUP_LONG * (i + 1)) / (float)SIMULT);\n  }\n\n  self->updates = 0;\n\n  // Wiener filter initialization.\n  for (i = 0; i < HALF_ANAL_BLOCKL; i++) {\n    self->smooth[i] = 1.f;\n  }\n\n  // Set the aggressiveness: default.\n  self->aggrMode = 0;\n\n  // Initialize variables for new method.\n  self->priorSpeechProb = 0.5f;  // Prior prob for speech/noise.\n  // Previous analyze mag spectrum.\n  memset(self->magnPrevAnalyze, 0, sizeof(float) * HALF_ANAL_BLOCKL);\n  // Previous process mag spectrum.\n  memset(self->magnPrevProcess, 0, sizeof(float) * HALF_ANAL_BLOCKL);\n  // Current noise-spectrum.\n  memset(self->noise, 0, sizeof(float) * HALF_ANAL_BLOCKL);\n  // Previous noise-spectrum.\n  memset(self->noisePrev, 0, sizeof(float) * HALF_ANAL_BLOCKL);\n  // Conservative noise spectrum estimate.\n  memset(self->magnAvgPause, 0, sizeof(float) * HALF_ANAL_BLOCKL);\n  // For estimation of HB in second pass.\n  memset(self->speechProb, 0, sizeof(float) * HALF_ANAL_BLOCKL);\n  // Initial average magnitude spectrum.\n  memset(self->initMagnEst, 0, sizeof(float) * HALF_ANAL_BLOCKL);\n  for (i = 0; i < HALF_ANAL_BLOCKL; i++) {\n    // Smooth LR (same as threshold).\n    self->logLrtTimeAvg[i] = LRT_FEATURE_THR;\n  }\n\n  // Feature quantities.\n  // Spectral flatness (start on threshold).\n  self->featureData[0] = SF_FEATURE_THR;\n  self->featureData[1] = 0.f;  // Spectral entropy: not used in this version.\n  self->featureData[2] = 0.f;  // Spectral variance: not used in this version.\n  // Average LRT factor (start on threshold).\n  self->featureData[3] = LRT_FEATURE_THR;\n  // Spectral template diff (start on threshold).\n  self->featureData[4] = SF_FEATURE_THR;\n  self->featureData[5] = 0.f;  // Normalization for spectral difference.\n  // Window time-average of input magnitude spectrum.\n  self->featureData[6] = 0.f;\n\n  // Histogram quantities: used to estimate/update thresholds for features.\n  memset(self->histLrt, 0, sizeof(int) * HIST_PAR_EST);\n  memset(self->histSpecFlat, 0, sizeof(int) * HIST_PAR_EST);\n  memset(self->histSpecDiff, 0, sizeof(int) * HIST_PAR_EST);\n\n\n  self->blockInd = -1;  // Frame counter.\n  // Default threshold for LRT feature.\n  self->priorModelPars[0] = LRT_FEATURE_THR;\n  // Threshold for spectral flatness: determined on-line.\n  self->priorModelPars[1] = 0.5f;\n  // sgn_map par for spectral measure: 1 for flatness measure.\n  self->priorModelPars[2] = 1.f;\n  // Threshold for template-difference feature: determined on-line.\n  self->priorModelPars[3] = 0.5f;\n  // Default weighting parameter for LRT feature.\n  self->priorModelPars[4] = 1.f;\n  // Default weighting parameter for spectral flatness feature.\n  self->priorModelPars[5] = 0.f;\n  // Default weighting parameter for spectral difference feature.\n  self->priorModelPars[6] = 0.f;\n\n  // Update flag for parameters:\n  // 0 no update, 1 = update once, 2 = update every window.\n  self->modelUpdatePars[0] = 2;\n  self->modelUpdatePars[1] = 500;  // Window for update.\n  // Counter for update of conservative noise spectrum.\n  self->modelUpdatePars[2] = 0;\n  // Counter if the feature thresholds are updated during the sequence.\n  self->modelUpdatePars[3] = self->modelUpdatePars[1];\n\n  self->signalEnergy = 0.0;\n  self->sumMagn = 0.0;\n  self->whiteNoiseLevel = 0.0;\n  self->pinkNoiseNumerator = 0.0;\n  self->pinkNoiseExp = 0.0;\n\n  set_feature_extraction_parameters(self);\n\n  // Default mode.\n  WebRtcNs_set_policy_core(self, 0);\n\n  self->initFlag = 1;\n  return 0;\n}\n\n// Estimate noise.\nstatic void NoiseEstimation(NoiseSuppressionC* self,\n                            float* magn,\n                            float* noise) {\n  size_t i, s, offset;\n  float lmagn[HALF_ANAL_BLOCKL], delta;\n\n  if (self->updates < END_STARTUP_LONG) {\n    self->updates++;\n  }\n\n  for (i = 0; i < self->magnLen; i++) {\n    lmagn[i] = (float)log(magn[i]);\n  }\n\n  // Loop over simultaneous estimates.\n  for (s = 0; s < SIMULT; s++) {\n    offset = s * self->magnLen;\n\n    // newquantest(...)\n    for (i = 0; i < self->magnLen; i++) {\n      // Compute delta.\n      if (self->density[offset + i] > 1.0) {\n        delta = FACTOR * 1.f / self->density[offset + i];\n      } else {\n        delta = FACTOR;\n      }\n\n      // Update log quantile estimate.\n      if (lmagn[i] > self->lquantile[offset + i]) {\n        self->lquantile[offset + i] +=\n            QUANTILE * delta / (float)(self->counter[s] + 1);\n      } else {\n        self->lquantile[offset + i] -=\n            (1.f - QUANTILE) * delta / (float)(self->counter[s] + 1);\n      }\n\n      // Update density estimate.\n      if (fabs(lmagn[i] - self->lquantile[offset + i]) < WIDTH) {\n        self->density[offset + i] =\n            ((float)self->counter[s] * self->density[offset + i] +\n             1.f / (2.f * WIDTH)) /\n            (float)(self->counter[s] + 1);\n      }\n    }  // End loop over magnitude spectrum.\n\n    if (self->counter[s] >= END_STARTUP_LONG) {\n      self->counter[s] = 0;\n      if (self->updates >= END_STARTUP_LONG) {\n        for (i = 0; i < self->magnLen; i++) {\n          self->quantile[i] = (float)exp(self->lquantile[offset + i]);\n        }\n      }\n    }\n\n    self->counter[s]++;\n  }  // End loop over simultaneous estimates.\n\n  // Sequentially update the noise during startup.\n  if (self->updates < END_STARTUP_LONG) {\n    // Use the last \"s\" to get noise during startup that differ from zero.\n    for (i = 0; i < self->magnLen; i++) {\n      self->quantile[i] = (float)exp(self->lquantile[offset + i]);\n    }\n  }\n\n  for (i = 0; i < self->magnLen; i++) {\n    noise[i] = self->quantile[i];\n  }\n}\n\n// Extract thresholds for feature parameters.\n// Histograms are computed over some window size (given by\n// self->modelUpdatePars[1]).\n// Thresholds and weights are extracted every window.\n// |flag| = 0 updates histogram only, |flag| = 1 computes the threshold/weights.\n// Threshold and weights are returned in: self->priorModelPars.\nstatic void FeatureParameterExtraction(NoiseSuppressionC* self, int flag) {\n  int i, useFeatureSpecFlat, useFeatureSpecDiff, numHistLrt;\n  int maxPeak1, maxPeak2;\n  int weightPeak1SpecFlat, weightPeak2SpecFlat, weightPeak1SpecDiff,\n      weightPeak2SpecDiff;\n\n  float binMid, featureSum;\n  float posPeak1SpecFlat, posPeak2SpecFlat, posPeak1SpecDiff, posPeak2SpecDiff;\n  float fluctLrt, avgHistLrt, avgSquareHistLrt, avgHistLrtCompl;\n\n  // 3 features: LRT, flatness, difference.\n  // lrt_feature = self->featureData[3];\n  // flat_feature = self->featureData[0];\n  // diff_feature = self->featureData[4];\n\n  // Update histograms.\n  if (flag == 0) {\n    // LRT\n    if ((self->featureData[3] <\n         HIST_PAR_EST * self->featureExtractionParams.binSizeLrt) &&\n        (self->featureData[3] >= 0.0)) {\n      i = (int)(self->featureData[3] /\n                self->featureExtractionParams.binSizeLrt);\n      self->histLrt[i]++;\n    }\n    // Spectral flatness.\n    if ((self->featureData[0] <\n         HIST_PAR_EST * self->featureExtractionParams.binSizeSpecFlat) &&\n        (self->featureData[0] >= 0.0)) {\n      i = (int)(self->featureData[0] /\n                self->featureExtractionParams.binSizeSpecFlat);\n      self->histSpecFlat[i]++;\n    }\n    // Spectral difference.\n    if ((self->featureData[4] <\n         HIST_PAR_EST * self->featureExtractionParams.binSizeSpecDiff) &&\n        (self->featureData[4] >= 0.0)) {\n      i = (int)(self->featureData[4] /\n                self->featureExtractionParams.binSizeSpecDiff);\n      self->histSpecDiff[i]++;\n    }\n  }\n\n  // Extract parameters for speech/noise probability.\n  if (flag == 1) {\n    // LRT feature: compute the average over\n    // self->featureExtractionParams.rangeAvgHistLrt.\n    avgHistLrt = 0.0;\n    avgHistLrtCompl = 0.0;\n    avgSquareHistLrt = 0.0;\n    numHistLrt = 0;\n    for (i = 0; i < HIST_PAR_EST; i++) {\n      binMid = ((float)i + 0.5f) * self->featureExtractionParams.binSizeLrt;\n      if (binMid <= self->featureExtractionParams.rangeAvgHistLrt) {\n        avgHistLrt += self->histLrt[i] * binMid;\n        numHistLrt += self->histLrt[i];\n      }\n      avgSquareHistLrt += self->histLrt[i] * binMid * binMid;\n      avgHistLrtCompl += self->histLrt[i] * binMid;\n    }\n    if (numHistLrt > 0) {\n      avgHistLrt = avgHistLrt / ((float)numHistLrt);\n    }\n    avgHistLrtCompl = avgHistLrtCompl / ((float)self->modelUpdatePars[1]);\n    avgSquareHistLrt = avgSquareHistLrt / ((float)self->modelUpdatePars[1]);\n    fluctLrt = avgSquareHistLrt - avgHistLrt * avgHistLrtCompl;\n    // Get threshold for LRT feature.\n    if (fluctLrt < self->featureExtractionParams.thresFluctLrt) {\n      // Very low fluctuation, so likely noise.\n      self->priorModelPars[0] = self->featureExtractionParams.maxLrt;\n    } else {\n      self->priorModelPars[0] =\n          self->featureExtractionParams.factor1ModelPars * avgHistLrt;\n      // Check if value is within min/max range.\n      if (self->priorModelPars[0] < self->featureExtractionParams.minLrt) {\n        self->priorModelPars[0] = self->featureExtractionParams.minLrt;\n      }\n      if (self->priorModelPars[0] > self->featureExtractionParams.maxLrt) {\n        self->priorModelPars[0] = self->featureExtractionParams.maxLrt;\n      }\n    }\n    // Done with LRT feature.\n\n    // For spectral flatness and spectral difference: compute the main peaks of\n    // histogram.\n    maxPeak1 = 0;\n    maxPeak2 = 0;\n    posPeak1SpecFlat = 0.0;\n    posPeak2SpecFlat = 0.0;\n    weightPeak1SpecFlat = 0;\n    weightPeak2SpecFlat = 0;\n\n    // Peaks for flatness.\n    for (i = 0; i < HIST_PAR_EST; i++) {\n      binMid =\n          (i + 0.5f) * self->featureExtractionParams.binSizeSpecFlat;\n      if (self->histSpecFlat[i] > maxPeak1) {\n        // Found new \"first\" peak.\n        maxPeak2 = maxPeak1;\n        weightPeak2SpecFlat = weightPeak1SpecFlat;\n        posPeak2SpecFlat = posPeak1SpecFlat;\n\n        maxPeak1 = self->histSpecFlat[i];\n        weightPeak1SpecFlat = self->histSpecFlat[i];\n        posPeak1SpecFlat = binMid;\n      } else if (self->histSpecFlat[i] > maxPeak2) {\n        // Found new \"second\" peak.\n        maxPeak2 = self->histSpecFlat[i];\n        weightPeak2SpecFlat = self->histSpecFlat[i];\n        posPeak2SpecFlat = binMid;\n      }\n    }\n\n    // Compute two peaks for spectral difference.\n    maxPeak1 = 0;\n    maxPeak2 = 0;\n    posPeak1SpecDiff = 0.0;\n    posPeak2SpecDiff = 0.0;\n    weightPeak1SpecDiff = 0;\n    weightPeak2SpecDiff = 0;\n    // Peaks for spectral difference.\n    for (i = 0; i < HIST_PAR_EST; i++) {\n      binMid =\n          ((float)i + 0.5f) * self->featureExtractionParams.binSizeSpecDiff;\n      if (self->histSpecDiff[i] > maxPeak1) {\n        // Found new \"first\" peak.\n        maxPeak2 = maxPeak1;\n        weightPeak2SpecDiff = weightPeak1SpecDiff;\n        posPeak2SpecDiff = posPeak1SpecDiff;\n\n        maxPeak1 = self->histSpecDiff[i];\n        weightPeak1SpecDiff = self->histSpecDiff[i];\n        posPeak1SpecDiff = binMid;\n      } else if (self->histSpecDiff[i] > maxPeak2) {\n        // Found new \"second\" peak.\n        maxPeak2 = self->histSpecDiff[i];\n        weightPeak2SpecDiff = self->histSpecDiff[i];\n        posPeak2SpecDiff = binMid;\n      }\n    }\n\n    // For spectrum flatness feature.\n    useFeatureSpecFlat = 1;\n    // Merge the two peaks if they are close.\n    if ((fabs(posPeak2SpecFlat - posPeak1SpecFlat) <\n         self->featureExtractionParams.limitPeakSpacingSpecFlat) &&\n        (weightPeak2SpecFlat >\n         self->featureExtractionParams.limitPeakWeightsSpecFlat *\n             weightPeak1SpecFlat)) {\n      weightPeak1SpecFlat += weightPeak2SpecFlat;\n      posPeak1SpecFlat = 0.5f * (posPeak1SpecFlat + posPeak2SpecFlat);\n    }\n    // Reject if weight of peaks is not large enough, or peak value too small.\n    if (weightPeak1SpecFlat <\n            self->featureExtractionParams.thresWeightSpecFlat ||\n        posPeak1SpecFlat < self->featureExtractionParams.thresPosSpecFlat) {\n      useFeatureSpecFlat = 0;\n    }\n    // If selected, get the threshold.\n    if (useFeatureSpecFlat == 1) {\n      // Compute the threshold.\n      self->priorModelPars[1] =\n          self->featureExtractionParams.factor2ModelPars * posPeak1SpecFlat;\n      // Check if value is within min/max range.\n      if (self->priorModelPars[1] < self->featureExtractionParams.minSpecFlat) {\n        self->priorModelPars[1] = self->featureExtractionParams.minSpecFlat;\n      }\n      if (self->priorModelPars[1] > self->featureExtractionParams.maxSpecFlat) {\n        self->priorModelPars[1] = self->featureExtractionParams.maxSpecFlat;\n      }\n    }\n    // Done with flatness feature.\n\n    // For template feature.\n    useFeatureSpecDiff = 1;\n    // Merge the two peaks if they are close.\n    if ((fabs(posPeak2SpecDiff - posPeak1SpecDiff) <\n         self->featureExtractionParams.limitPeakSpacingSpecDiff) &&\n        (weightPeak2SpecDiff >\n         self->featureExtractionParams.limitPeakWeightsSpecDiff *\n             weightPeak1SpecDiff)) {\n      weightPeak1SpecDiff += weightPeak2SpecDiff;\n      posPeak1SpecDiff = 0.5f * (posPeak1SpecDiff + posPeak2SpecDiff);\n    }\n    // Get the threshold value.\n    self->priorModelPars[3] =\n        self->featureExtractionParams.factor1ModelPars * posPeak1SpecDiff;\n    // Reject if weight of peaks is not large enough.\n    if (weightPeak1SpecDiff <\n        self->featureExtractionParams.thresWeightSpecDiff) {\n      useFeatureSpecDiff = 0;\n    }\n    // Check if value is within min/max range.\n    if (self->priorModelPars[3] < self->featureExtractionParams.minSpecDiff) {\n      self->priorModelPars[3] = self->featureExtractionParams.minSpecDiff;\n    }\n    if (self->priorModelPars[3] > self->featureExtractionParams.maxSpecDiff) {\n      self->priorModelPars[3] = self->featureExtractionParams.maxSpecDiff;\n    }\n    // Done with spectral difference feature.\n\n    // Don't use template feature if fluctuation of LRT feature is very low:\n    // most likely just noise state.\n    if (fluctLrt < self->featureExtractionParams.thresFluctLrt) {\n      useFeatureSpecDiff = 0;\n    }\n\n    // Select the weights between the features.\n    // self->priorModelPars[4] is weight for LRT: always selected.\n    // self->priorModelPars[5] is weight for spectral flatness.\n    // self->priorModelPars[6] is weight for spectral difference.\n    featureSum = (float)(1 + useFeatureSpecFlat + useFeatureSpecDiff);\n    self->priorModelPars[4] = 1.f / featureSum;\n    self->priorModelPars[5] = ((float)useFeatureSpecFlat) / featureSum;\n    self->priorModelPars[6] = ((float)useFeatureSpecDiff) / featureSum;\n\n    // Set hists to zero for next update.\n    if (self->modelUpdatePars[0] >= 1) {\n      for (i = 0; i < HIST_PAR_EST; i++) {\n        self->histLrt[i] = 0;\n        self->histSpecFlat[i] = 0;\n        self->histSpecDiff[i] = 0;\n      }\n    }\n  }  // End of flag == 1.\n}\n\n// Compute spectral flatness on input spectrum.\n// |magnIn| is the magnitude spectrum.\n// Spectral flatness is returned in self->featureData[0].\nstatic void ComputeSpectralFlatness(NoiseSuppressionC* self,\n                                    const float* magnIn) {\n  size_t i;\n  size_t shiftLP = 1;  // Option to remove first bin(s) from spectral measures.\n  float avgSpectralFlatnessNum, avgSpectralFlatnessDen, spectralTmp;\n\n  // Compute spectral measures.\n  // For flatness.\n  avgSpectralFlatnessNum = 0.0;\n  avgSpectralFlatnessDen = self->sumMagn;\n  for (i = 0; i < shiftLP; i++) {\n    avgSpectralFlatnessDen -= magnIn[i];\n  }\n  // Compute log of ratio of the geometric to arithmetic mean: check for log(0)\n  // case.\n  for (i = shiftLP; i < self->magnLen; i++) {\n    if (magnIn[i] > 0.0) {\n      avgSpectralFlatnessNum += (float)log(magnIn[i]);\n    } else {\n      self->featureData[0] -= SPECT_FL_TAVG * self->featureData[0];\n      return;\n    }\n  }\n  // Normalize.\n  avgSpectralFlatnessDen = avgSpectralFlatnessDen / self->magnLen;\n  avgSpectralFlatnessNum = avgSpectralFlatnessNum / self->magnLen;\n\n  // Ratio and inverse log: check for case of log(0).\n  spectralTmp = (float)exp(avgSpectralFlatnessNum) / avgSpectralFlatnessDen;\n\n  // Time-avg update of spectral flatness feature.\n  self->featureData[0] += SPECT_FL_TAVG * (spectralTmp - self->featureData[0]);\n  // Done with flatness feature.\n}\n\n// Compute prior and post SNR based on quantile noise estimation.\n// Compute DD estimate of prior SNR.\n// Inputs:\n//   * |magn| is the signal magnitude spectrum estimate.\n//   * |noise| is the magnitude noise spectrum estimate.\n// Outputs:\n//   * |snrLocPrior| is the computed prior SNR.\n//   * |snrLocPost| is the computed post SNR.\nstatic void ComputeSnr(const NoiseSuppressionC* self,\n                       const float* magn,\n                       const float* noise,\n                       float* snrLocPrior,\n                       float* snrLocPost) {\n  size_t i;\n\n  for (i = 0; i < self->magnLen; i++) {\n    // Previous post SNR.\n    // Previous estimate: based on previous frame with gain filter.\n    float previousEstimateStsa = self->magnPrevAnalyze[i] /\n        (self->noisePrev[i] + 0.0001f) * self->smooth[i];\n    // Post SNR.\n    snrLocPost[i] = 0.f;\n    if (magn[i] > noise[i]) {\n      snrLocPost[i] = magn[i] / (noise[i] + 0.0001f) - 1.f;\n    }\n    // DD estimate is sum of two terms: current estimate and previous estimate.\n    // Directed decision update of snrPrior.\n    snrLocPrior[i] =\n        DD_PR_SNR * previousEstimateStsa + (1.f - DD_PR_SNR) * snrLocPost[i];\n  }  // End of loop over frequencies.\n}\n\n// Compute the difference measure between input spectrum and a template/learned\n// noise spectrum.\n// |magnIn| is the input spectrum.\n// The reference/template spectrum is self->magnAvgPause[i].\n// Returns (normalized) spectral difference in self->featureData[4].\nstatic void ComputeSpectralDifference(NoiseSuppressionC* self,\n                                      const float* magnIn) {\n  // avgDiffNormMagn = var(magnIn) - cov(magnIn, magnAvgPause)^2 /\n  // var(magnAvgPause)\n  size_t i;\n  float avgPause, avgMagn, covMagnPause, varPause, varMagn, avgDiffNormMagn;\n\n  avgPause = 0.0;\n  avgMagn = self->sumMagn;\n  // Compute average quantities.\n  for (i = 0; i < self->magnLen; i++) {\n    // Conservative smooth noise spectrum from pause frames.\n    avgPause += self->magnAvgPause[i];\n  }\n  avgPause /= self->magnLen;\n  avgMagn /= self->magnLen;\n\n  covMagnPause = 0.0;\n  varPause = 0.0;\n  varMagn = 0.0;\n  // Compute variance and covariance quantities.\n  for (i = 0; i < self->magnLen; i++) {\n    covMagnPause += (magnIn[i] - avgMagn) * (self->magnAvgPause[i] - avgPause);\n    varPause +=\n        (self->magnAvgPause[i] - avgPause) * (self->magnAvgPause[i] - avgPause);\n    varMagn += (magnIn[i] - avgMagn) * (magnIn[i] - avgMagn);\n  }\n  covMagnPause /= self->magnLen;\n  varPause /= self->magnLen;\n  varMagn /= self->magnLen;\n  // Update of average magnitude spectrum.\n  self->featureData[6] += self->signalEnergy;\n\n  avgDiffNormMagn =\n      varMagn - (covMagnPause * covMagnPause) / (varPause + 0.0001f);\n  // Normalize and compute time-avg update of difference feature.\n  avgDiffNormMagn = (float)(avgDiffNormMagn / (self->featureData[5] + 0.0001f));\n  self->featureData[4] +=\n      SPECT_DIFF_TAVG * (avgDiffNormMagn - self->featureData[4]);\n}\n\n// Compute speech/noise probability.\n// Speech/noise probability is returned in |probSpeechFinal|.\n// |magn| is the input magnitude spectrum.\n// |noise| is the noise spectrum.\n// |snrLocPrior| is the prior SNR for each frequency.\n// |snrLocPost| is the post SNR for each frequency.\nstatic void SpeechNoiseProb(NoiseSuppressionC* self,\n                            float* probSpeechFinal,\n                            const float* snrLocPrior,\n                            const float* snrLocPost) {\n  size_t i;\n  int sgnMap;\n  float invLrt, gainPrior, indPrior;\n  float logLrtTimeAvgKsum, besselTmp;\n  float indicator0, indicator1, indicator2;\n  float tmpFloat1, tmpFloat2;\n  float weightIndPrior0, weightIndPrior1, weightIndPrior2;\n  float threshPrior0, threshPrior1, threshPrior2;\n  float widthPrior, widthPrior0, widthPrior1, widthPrior2;\n\n  widthPrior0 = WIDTH_PR_MAP;\n  // Width for pause region: lower range, so increase width in tanh map.\n  widthPrior1 = 2.f * WIDTH_PR_MAP;\n  widthPrior2 = 2.f * WIDTH_PR_MAP;  // For spectral-difference measure.\n\n  // Threshold parameters for features.\n  threshPrior0 = self->priorModelPars[0];\n  threshPrior1 = self->priorModelPars[1];\n  threshPrior2 = self->priorModelPars[3];\n\n  // Sign for flatness feature.\n  sgnMap = (int)(self->priorModelPars[2]);\n\n  // Weight parameters for features.\n  weightIndPrior0 = self->priorModelPars[4];\n  weightIndPrior1 = self->priorModelPars[5];\n  weightIndPrior2 = self->priorModelPars[6];\n\n  // Compute feature based on average LR factor.\n  // This is the average over all frequencies of the smooth log LRT.\n  logLrtTimeAvgKsum = 0.0;\n  for (i = 0; i < self->magnLen; i++) {\n    tmpFloat1 = 1.f + 2.f * snrLocPrior[i];\n    tmpFloat2 = 2.f * snrLocPrior[i] / (tmpFloat1 + 0.0001f);\n    besselTmp = (snrLocPost[i] + 1.f) * tmpFloat2;\n    self->logLrtTimeAvg[i] +=\n        LRT_TAVG * (besselTmp - (float)log(tmpFloat1) - self->logLrtTimeAvg[i]);\n    logLrtTimeAvgKsum += self->logLrtTimeAvg[i];\n  }\n  logLrtTimeAvgKsum = (float)logLrtTimeAvgKsum / (self->magnLen);\n  self->featureData[3] = logLrtTimeAvgKsum;\n  // Done with computation of LR factor.\n\n  // Compute the indicator functions.\n  // Average LRT feature.\n  widthPrior = widthPrior0;\n  // Use larger width in tanh map for pause regions.\n  if (logLrtTimeAvgKsum < threshPrior0) {\n    widthPrior = widthPrior1;\n  }\n  // Compute indicator function: sigmoid map.\n  indicator0 =\n      0.5f *\n      ((float)tanh(widthPrior * (logLrtTimeAvgKsum - threshPrior0)) + 1.f);\n\n  // Spectral flatness feature.\n  tmpFloat1 = self->featureData[0];\n  widthPrior = widthPrior0;\n  // Use larger width in tanh map for pause regions.\n  if (sgnMap == 1 && (tmpFloat1 > threshPrior1)) {\n    widthPrior = widthPrior1;\n  }\n  if (sgnMap == -1 && (tmpFloat1 < threshPrior1)) {\n    widthPrior = widthPrior1;\n  }\n  // Compute indicator function: sigmoid map.\n  indicator1 =\n      0.5f *\n      ((float)tanh((float)sgnMap * widthPrior * (threshPrior1 - tmpFloat1)) +\n       1.f);\n\n  // For template spectrum-difference.\n  tmpFloat1 = self->featureData[4];\n  widthPrior = widthPrior0;\n  // Use larger width in tanh map for pause regions.\n  if (tmpFloat1 < threshPrior2) {\n    widthPrior = widthPrior2;\n  }\n  // Compute indicator function: sigmoid map.\n  indicator2 =\n      0.5f * ((float)tanh(widthPrior * (tmpFloat1 - threshPrior2)) + 1.f);\n\n  // Combine the indicator function with the feature weights.\n  indPrior = weightIndPrior0 * indicator0 + weightIndPrior1 * indicator1 +\n             weightIndPrior2 * indicator2;\n  // Done with computing indicator function.\n\n  // Compute the prior probability.\n  self->priorSpeechProb += PRIOR_UPDATE * (indPrior - self->priorSpeechProb);\n  // Make sure probabilities are within range: keep floor to 0.01.\n  if (self->priorSpeechProb > 1.f) {\n    self->priorSpeechProb = 1.f;\n  }\n  if (self->priorSpeechProb < 0.01f) {\n    self->priorSpeechProb = 0.01f;\n  }\n\n  // Final speech probability: combine prior model with LR factor:.\n  gainPrior = (1.f - self->priorSpeechProb) / (self->priorSpeechProb + 0.0001f);\n  for (i = 0; i < self->magnLen; i++) {\n    invLrt = (float)exp(-self->logLrtTimeAvg[i]);\n    invLrt = (float)gainPrior * invLrt;\n    probSpeechFinal[i] = 1.f / (1.f + invLrt);\n  }\n}\n\n// Update the noise features.\n// Inputs:\n//   * |magn| is the signal magnitude spectrum estimate.\n//   * |updateParsFlag| is an update flag for parameters.\nstatic void FeatureUpdate(NoiseSuppressionC* self,\n                          const float* magn,\n                          int updateParsFlag) {\n  // Compute spectral flatness on input spectrum.\n  ComputeSpectralFlatness(self, magn);\n  // Compute difference of input spectrum with learned/estimated noise spectrum.\n  ComputeSpectralDifference(self, magn);\n  // Compute histograms for parameter decisions (thresholds and weights for\n  // features).\n  // Parameters are extracted once every window time.\n  // (=self->modelUpdatePars[1])\n  if (updateParsFlag >= 1) {\n    // Counter update.\n    self->modelUpdatePars[3]--;\n    // Update histogram.\n    if (self->modelUpdatePars[3] > 0) {\n      FeatureParameterExtraction(self, 0);\n    }\n    // Compute model parameters.\n    if (self->modelUpdatePars[3] == 0) {\n      FeatureParameterExtraction(self, 1);\n      self->modelUpdatePars[3] = self->modelUpdatePars[1];\n      // If wish to update only once, set flag to zero.\n      if (updateParsFlag == 1) {\n        self->modelUpdatePars[0] = 0;\n      } else {\n        // Update every window:\n        // Get normalization for spectral difference for next window estimate.\n        self->featureData[6] =\n            self->featureData[6] / ((float)self->modelUpdatePars[1]);\n        self->featureData[5] =\n            0.5f * (self->featureData[6] + self->featureData[5]);\n        self->featureData[6] = 0.f;\n      }\n    }\n  }\n}\n\n// Update the noise estimate.\n// Inputs:\n//   * |magn| is the signal magnitude spectrum estimate.\n//   * |snrLocPrior| is the prior SNR.\n//   * |snrLocPost| is the post SNR.\n// Output:\n//   * |noise| is the updated noise magnitude spectrum estimate.\nstatic void UpdateNoiseEstimate(NoiseSuppressionC* self,\n                                const float* magn,\n                                const float* snrLocPrior,\n                                const float* snrLocPost,\n                                float* noise) {\n  size_t i;\n  float probSpeech, probNonSpeech;\n  // Time-avg parameter for noise update.\n  float gammaNoiseTmp = NOISE_UPDATE;\n  float gammaNoiseOld;\n  float noiseUpdateTmp;\n\n  for (i = 0; i < self->magnLen; i++) {\n    probSpeech = self->speechProb[i];\n    probNonSpeech = 1.f - probSpeech;\n    // Temporary noise update:\n    // Use it for speech frames if update value is less than previous.\n    noiseUpdateTmp = gammaNoiseTmp * self->noisePrev[i] +\n                     (1.f - gammaNoiseTmp) * (probNonSpeech * magn[i] +\n                                              probSpeech * self->noisePrev[i]);\n    // Time-constant based on speech/noise state.\n    gammaNoiseOld = gammaNoiseTmp;\n    gammaNoiseTmp = NOISE_UPDATE;\n    // Increase gamma (i.e., less noise update) for frame likely to be speech.\n    if (probSpeech > PROB_RANGE) {\n      gammaNoiseTmp = SPEECH_UPDATE;\n    }\n    // Conservative noise update.\n    if (probSpeech < PROB_RANGE) {\n      self->magnAvgPause[i] += GAMMA_PAUSE * (magn[i] - self->magnAvgPause[i]);\n    }\n    // Noise update.\n    if (gammaNoiseTmp == gammaNoiseOld) {\n      noise[i] = noiseUpdateTmp;\n    } else {\n      noise[i] = gammaNoiseTmp * self->noisePrev[i] +\n                 (1.f - gammaNoiseTmp) * (probNonSpeech * magn[i] +\n                                          probSpeech * self->noisePrev[i]);\n      // Allow for noise update downwards:\n      // If noise update decreases the noise, it is safe, so allow it to\n      // happen.\n      if (noiseUpdateTmp < noise[i]) {\n        noise[i] = noiseUpdateTmp;\n      }\n    }\n  }  // End of freq loop.\n}\n\n// Updates |buffer| with a new |frame|.\n// Inputs:\n//   * |frame| is a new speech frame or NULL for setting to zero.\n//   * |frame_length| is the length of the new frame.\n//   * |buffer_length| is the length of the buffer.\n// Output:\n//   * |buffer| is the updated buffer.\nstatic void UpdateBuffer(const float* frame,\n                         size_t frame_length,\n                         size_t buffer_length,\n                         float* buffer) {\n  RTC_DCHECK_LT(buffer_length, 2 * frame_length);\n\n  memcpy(buffer,\n         buffer + frame_length,\n         sizeof(*buffer) * (buffer_length - frame_length));\n  if (frame) {\n    memcpy(buffer + buffer_length - frame_length,\n           frame,\n           sizeof(*buffer) * frame_length);\n  } else {\n    memset(buffer + buffer_length - frame_length,\n           0,\n           sizeof(*buffer) * frame_length);\n  }\n}\n\n// Transforms the signal from time to frequency domain.\n// Inputs:\n//   * |time_data| is the signal in the time domain.\n//   * |time_data_length| is the length of the analysis buffer.\n//   * |magnitude_length| is the length of the spectrum magnitude, which equals\n//     the length of both |real| and |imag| (time_data_length / 2 + 1).\n// Outputs:\n//   * |time_data| is the signal in the frequency domain.\n//   * |real| is the real part of the frequency domain.\n//   * |imag| is the imaginary part of the frequency domain.\n//   * |magn| is the calculated signal magnitude in the frequency domain.\nstatic void FFT(NoiseSuppressionC* self,\n                float* time_data,\n                size_t time_data_length,\n                size_t magnitude_length,\n                float* real,\n                float* imag,\n                float* magn) {\n  size_t i;\n\n  RTC_DCHECK_EQ(magnitude_length, time_data_length / 2 + 1);\n\n  WebRtc_rdft(time_data_length, 1, time_data, self->ip, self->wfft);\n\n  imag[0] = 0;\n  real[0] = time_data[0];\n  magn[0] = fabsf(real[0]) + 1.f;\n  imag[magnitude_length - 1] = 0;\n  real[magnitude_length - 1] = time_data[1];\n  magn[magnitude_length - 1] = fabsf(real[magnitude_length - 1]) + 1.f;\n  for (i = 1; i < magnitude_length - 1; ++i) {\n    real[i] = time_data[2 * i];\n    imag[i] = time_data[2 * i + 1];\n    // Magnitude spectrum.\n    magn[i] = sqrtf(real[i] * real[i] + imag[i] * imag[i]) + 1.f;\n  }\n}\n\n// Transforms the signal from frequency to time domain.\n// Inputs:\n//   * |real| is the real part of the frequency domain.\n//   * |imag| is the imaginary part of the frequency domain.\n//   * |magnitude_length| is the length of the spectrum magnitude, which equals\n//     the length of both |real| and |imag|.\n//   * |time_data_length| is the length of the analysis buffer\n//     (2 * (magnitude_length - 1)).\n// Output:\n//   * |time_data| is the signal in the time domain.\nstatic void IFFT(NoiseSuppressionC* self,\n                 const float* real,\n                 const float* imag,\n                 size_t magnitude_length,\n                 size_t time_data_length,\n                 float* time_data) {\n  size_t i;\n\n  RTC_DCHECK_EQ(time_data_length, 2 * (magnitude_length - 1));\n\n  time_data[0] = real[0];\n  time_data[1] = real[magnitude_length - 1];\n  for (i = 1; i < magnitude_length - 1; ++i) {\n    time_data[2 * i] = real[i];\n    time_data[2 * i + 1] = imag[i];\n  }\n  WebRtc_rdft(time_data_length, -1, time_data, self->ip, self->wfft);\n\n  for (i = 0; i < time_data_length; ++i) {\n    time_data[i] *= 2.f / time_data_length;  // FFT scaling.\n  }\n}\n\n// Calculates the energy of a buffer.\n// Inputs:\n//   * |buffer| is the buffer over which the energy is calculated.\n//   * |length| is the length of the buffer.\n// Returns the calculated energy.\nstatic float Energy(const float* buffer, size_t length) {\n  size_t i;\n  float energy = 0.f;\n\n  for (i = 0; i < length; ++i) {\n    energy += buffer[i] * buffer[i];\n  }\n\n  return energy;\n}\n\n// Windows a buffer.\n// Inputs:\n//   * |window| is the window by which to multiply.\n//   * |data| is the data without windowing.\n//   * |length| is the length of the window and data.\n// Output:\n//   * |data_windowed| is the windowed data.\nstatic void Windowing(const float* window,\n                      const float* data,\n                      size_t length,\n                      float* data_windowed) {\n  size_t i;\n\n  for (i = 0; i < length; ++i) {\n    data_windowed[i] = window[i] * data[i];\n  }\n}\n\n// Estimate prior SNR decision-directed and compute DD based Wiener Filter.\n// Input:\n//   * |magn| is the signal magnitude spectrum estimate.\n// Output:\n//   * |theFilter| is the frequency response of the computed Wiener filter.\nstatic void ComputeDdBasedWienerFilter(const NoiseSuppressionC* self,\n                                       const float* magn,\n                                       float* theFilter) {\n  size_t i;\n  float snrPrior, previousEstimateStsa, currentEstimateStsa;\n\n  for (i = 0; i < self->magnLen; i++) {\n    // Previous estimate: based on previous frame with gain filter.\n    previousEstimateStsa = self->magnPrevProcess[i] /\n                           (self->noisePrev[i] + 0.0001f) * self->smooth[i];\n    // Post and prior SNR.\n    currentEstimateStsa = 0.f;\n    if (magn[i] > self->noise[i]) {\n      currentEstimateStsa = magn[i] / (self->noise[i] + 0.0001f) - 1.f;\n    }\n    // DD estimate is sum of two terms: current estimate and previous estimate.\n    // Directed decision update of |snrPrior|.\n    snrPrior = DD_PR_SNR * previousEstimateStsa +\n               (1.f - DD_PR_SNR) * currentEstimateStsa;\n    // Gain filter.\n    theFilter[i] = snrPrior / (self->overdrive + snrPrior);\n  }  // End of loop over frequencies.\n}\n\n// Changes the aggressiveness of the noise suppression method.\n// |mode| = 0 is mild (6dB), |mode| = 1 is medium (10dB) and |mode| = 2 is\n// aggressive (15dB).\n// Returns 0 on success and -1 otherwise.\nint WebRtcNs_set_policy_core(NoiseSuppressionC* self, int mode) {\n  // Allow for modes: 0, 1, 2, 3.\n  if (mode < 0 || mode > 3) {\n    return (-1);\n  }\n\n  self->aggrMode = mode;\n  if (mode == 0) {\n    self->overdrive = 1.f;\n    self->denoiseBound = 0.5f;\n    self->gainmap = 0;\n  } else if (mode == 1) {\n    // self->overdrive = 1.25f;\n    self->overdrive = 1.f;\n    self->denoiseBound = 0.25f;\n    self->gainmap = 1;\n  } else if (mode == 2) {\n    // self->overdrive = 1.25f;\n    self->overdrive = 1.1f;\n    self->denoiseBound = 0.125f;\n    self->gainmap = 1;\n  } else if (mode == 3) {\n    // self->overdrive = 1.3f;\n    self->overdrive = 1.25f;\n    self->denoiseBound = 0.09f;\n    self->gainmap = 1;\n  }\n  return 0;\n}\n\nvoid WebRtcNs_AnalyzeCore(NoiseSuppressionC* self, const float* speechFrame) {\n  size_t i;\n  const size_t kStartBand = 5;  // Skip first frequency bins during estimation.\n  int updateParsFlag;\n  float energy;\n  float signalEnergy = 0.f;\n  float sumMagn = 0.f;\n  float tmpFloat1, tmpFloat2, tmpFloat3;\n  float winData[ANAL_BLOCKL_MAX];\n  float magn[HALF_ANAL_BLOCKL], noise[HALF_ANAL_BLOCKL];\n  float snrLocPost[HALF_ANAL_BLOCKL], snrLocPrior[HALF_ANAL_BLOCKL];\n  float real[ANAL_BLOCKL_MAX], imag[HALF_ANAL_BLOCKL];\n  // Variables during startup.\n  float sum_log_i = 0.0;\n  float sum_log_i_square = 0.0;\n  float sum_log_magn = 0.0;\n  float sum_log_i_log_magn = 0.0;\n  float parametric_exp = 0.0;\n  float parametric_num = 0.0;\n\n  // Check that initiation has been done.\n  RTC_DCHECK_EQ(1, self->initFlag);\n  updateParsFlag = self->modelUpdatePars[0];\n\n  // Update analysis buffer for L band.\n  UpdateBuffer(speechFrame, self->blockLen, self->anaLen, self->analyzeBuf);\n\n  Windowing(self->window, self->analyzeBuf, self->anaLen, winData);\n  energy = Energy(winData, self->anaLen);\n  if (energy == 0.0) {\n    // We want to avoid updating statistics in this case:\n    // Updating feature statistics when we have zeros only will cause\n    // thresholds to move towards zero signal situations. This in turn has the\n    // effect that once the signal is \"turned on\" (non-zero values) everything\n    // will be treated as speech and there is no noise suppression effect.\n    // Depending on the duration of the inactive signal it takes a\n    // considerable amount of time for the system to learn what is noise and\n    // what is speech.\n    return;\n  }\n\n  self->blockInd++;  // Update the block index only when we process a block.\n\n  FFT(self, winData, self->anaLen, self->magnLen, real, imag, magn);\n\n  for (i = 0; i < self->magnLen; i++) {\n    signalEnergy += real[i] * real[i] + imag[i] * imag[i];\n    sumMagn += magn[i];\n    if (self->blockInd < END_STARTUP_SHORT) {\n      if (i >= kStartBand) {\n        tmpFloat2 = logf((float)i);\n        sum_log_i += tmpFloat2;\n        sum_log_i_square += tmpFloat2 * tmpFloat2;\n        tmpFloat1 = logf(magn[i]);\n        sum_log_magn += tmpFloat1;\n        sum_log_i_log_magn += tmpFloat2 * tmpFloat1;\n      }\n    }\n  }\n  signalEnergy /= self->magnLen;\n  self->signalEnergy = signalEnergy;\n  self->sumMagn = sumMagn;\n\n  // Quantile noise estimate.\n  NoiseEstimation(self, magn, noise);\n  // Compute simplified noise model during startup.\n  if (self->blockInd < END_STARTUP_SHORT) {\n    // Estimate White noise.\n    self->whiteNoiseLevel += sumMagn / self->magnLen * self->overdrive;\n    // Estimate Pink noise parameters.\n    tmpFloat1 = sum_log_i_square * (self->magnLen - kStartBand);\n    tmpFloat1 -= (sum_log_i * sum_log_i);\n    tmpFloat2 =\n        (sum_log_i_square * sum_log_magn - sum_log_i * sum_log_i_log_magn);\n    tmpFloat3 = tmpFloat2 / tmpFloat1;\n    // Constrain the estimated spectrum to be positive.\n    if (tmpFloat3 < 0.f) {\n      tmpFloat3 = 0.f;\n    }\n    self->pinkNoiseNumerator += tmpFloat3;\n    tmpFloat2 = (sum_log_i * sum_log_magn);\n    tmpFloat2 -= (self->magnLen - kStartBand) * sum_log_i_log_magn;\n    tmpFloat3 = tmpFloat2 / tmpFloat1;\n    // Constrain the pink noise power to be in the interval [0, 1].\n    if (tmpFloat3 < 0.f) {\n      tmpFloat3 = 0.f;\n    }\n    if (tmpFloat3 > 1.f) {\n      tmpFloat3 = 1.f;\n    }\n    self->pinkNoiseExp += tmpFloat3;\n\n    // Calculate frequency independent parts of parametric noise estimate.\n    if (self->pinkNoiseExp > 0.f) {\n      // Use pink noise estimate.\n      parametric_num =\n          expf(self->pinkNoiseNumerator / (float)(self->blockInd + 1));\n      parametric_num *= (float)(self->blockInd + 1);\n      parametric_exp = self->pinkNoiseExp / (float)(self->blockInd + 1);\n    }\n    for (i = 0; i < self->magnLen; i++) {\n      // Estimate the background noise using the white and pink noise\n      // parameters.\n      if (self->pinkNoiseExp == 0.f) {\n        // Use white noise estimate.\n        self->parametricNoise[i] = self->whiteNoiseLevel;\n      } else {\n        // Use pink noise estimate.\n        float use_band = (float)(i < kStartBand ? kStartBand : i);\n        self->parametricNoise[i] =\n            parametric_num / powf(use_band, parametric_exp);\n      }\n      // Weight quantile noise with modeled noise.\n      noise[i] *= (self->blockInd);\n      tmpFloat2 =\n          self->parametricNoise[i] * (END_STARTUP_SHORT - self->blockInd);\n      noise[i] += (tmpFloat2 / (float)(self->blockInd + 1));\n      noise[i] /= END_STARTUP_SHORT;\n    }\n  }\n  // Compute average signal during END_STARTUP_LONG time:\n  // used to normalize spectral difference measure.\n  if (self->blockInd < END_STARTUP_LONG) {\n    self->featureData[5] *= self->blockInd;\n    self->featureData[5] += signalEnergy;\n    self->featureData[5] /= (self->blockInd + 1);\n  }\n\n  // Post and prior SNR needed for SpeechNoiseProb.\n  ComputeSnr(self, magn, noise, snrLocPrior, snrLocPost);\n\n  FeatureUpdate(self, magn, updateParsFlag);\n  SpeechNoiseProb(self, self->speechProb, snrLocPrior, snrLocPost);\n  UpdateNoiseEstimate(self, magn, snrLocPrior, snrLocPost, noise);\n\n  // Keep track of noise spectrum for next frame.\n  memcpy(self->noise, noise, sizeof(*noise) * self->magnLen);\n  memcpy(self->magnPrevAnalyze, magn, sizeof(*magn) * self->magnLen);\n}\n\nvoid WebRtcNs_ProcessCore(NoiseSuppressionC* self,\n                          const float* const* speechFrame,\n                          size_t num_bands,\n                          float* const* outFrame) {\n  // Main routine for noise reduction.\n  int flagHB = 0;\n  size_t i, j;\n\n  float energy1, energy2, gain, factor, factor1, factor2;\n  float fout[BLOCKL_MAX];\n  float winData[ANAL_BLOCKL_MAX];\n  float magn[HALF_ANAL_BLOCKL];\n  float theFilter[HALF_ANAL_BLOCKL], theFilterTmp[HALF_ANAL_BLOCKL];\n  float real[ANAL_BLOCKL_MAX], imag[HALF_ANAL_BLOCKL];\n\n  // SWB variables.\n  int deltaBweHB = 1;\n  int deltaGainHB = 1;\n  float decayBweHB = 1.0;\n  float gainMapParHB = 1.0;\n  float gainTimeDomainHB = 1.0;\n  float avgProbSpeechHB, avgProbSpeechHBTmp, avgFilterGainHB, gainModHB;\n  float sumMagnAnalyze, sumMagnProcess;\n\n  // Check that initiation has been done.\n  RTC_DCHECK_EQ(1, self->initFlag);\n  RTC_DCHECK_LE(num_bands - 1, NUM_HIGH_BANDS_MAX);\n\n  const float* const* speechFrameHB = NULL;\n  float* const* outFrameHB = NULL;\n  size_t num_high_bands = 0;\n  if (num_bands > 1) {\n    speechFrameHB = &speechFrame[1];\n    outFrameHB = &outFrame[1];\n    num_high_bands = num_bands - 1;\n    flagHB = 1;\n    // Range for averaging low band quantities for H band gain.\n    deltaBweHB = (int)self->magnLen / 4;\n    deltaGainHB = deltaBweHB;\n  }\n\n  // Update analysis buffer for L band.\n  UpdateBuffer(speechFrame[0], self->blockLen, self->anaLen, self->dataBuf);\n\n  if (flagHB == 1) {\n    // Update analysis buffer for H bands.\n    for (i = 0; i < num_high_bands; ++i) {\n      UpdateBuffer(speechFrameHB[i],\n                   self->blockLen,\n                   self->anaLen,\n                   self->dataBufHB[i]);\n    }\n  }\n\n  Windowing(self->window, self->dataBuf, self->anaLen, winData);\n  energy1 = Energy(winData, self->anaLen);\n  if (energy1 == 0.0) {\n    // Synthesize the special case of zero input.\n    // Read out fully processed segment.\n    for (i = self->windShift; i < self->blockLen + self->windShift; i++) {\n      fout[i - self->windShift] = self->syntBuf[i];\n    }\n    // Update synthesis buffer.\n    UpdateBuffer(NULL, self->blockLen, self->anaLen, self->syntBuf);\n\n    for (i = 0; i < self->blockLen; ++i)\n      outFrame[0][i] =\n          WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX, fout[i], WEBRTC_SPL_WORD16_MIN);\n\n    // For time-domain gain of HB.\n    if (flagHB == 1) {\n      for (i = 0; i < num_high_bands; ++i) {\n        for (j = 0; j < self->blockLen; ++j) {\n          outFrameHB[i][j] = WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX,\n                                            self->dataBufHB[i][j],\n                                            WEBRTC_SPL_WORD16_MIN);\n        }\n      }\n    }\n\n    return;\n  }\n\n  FFT(self, winData, self->anaLen, self->magnLen, real, imag, magn);\n\n  if (self->blockInd < END_STARTUP_SHORT) {\n    for (i = 0; i < self->magnLen; i++) {\n      self->initMagnEst[i] += magn[i];\n    }\n  }\n\n  ComputeDdBasedWienerFilter(self, magn, theFilter);\n\n  for (i = 0; i < self->magnLen; i++) {\n    // Flooring bottom.\n    if (theFilter[i] < self->denoiseBound) {\n      theFilter[i] = self->denoiseBound;\n    }\n    // Flooring top.\n    if (theFilter[i] > 1.f) {\n      theFilter[i] = 1.f;\n    }\n    if (self->blockInd < END_STARTUP_SHORT) {\n      theFilterTmp[i] =\n          (self->initMagnEst[i] - self->overdrive * self->parametricNoise[i]);\n      theFilterTmp[i] /= (self->initMagnEst[i] + 0.0001f);\n      // Flooring bottom.\n      if (theFilterTmp[i] < self->denoiseBound) {\n        theFilterTmp[i] = self->denoiseBound;\n      }\n      // Flooring top.\n      if (theFilterTmp[i] > 1.f) {\n        theFilterTmp[i] = 1.f;\n      }\n      // Weight the two suppression filters.\n      theFilter[i] *= (self->blockInd);\n      theFilterTmp[i] *= (END_STARTUP_SHORT - self->blockInd);\n      theFilter[i] += theFilterTmp[i];\n      theFilter[i] /= (END_STARTUP_SHORT);\n    }\n\n    self->smooth[i] = theFilter[i];\n    real[i] *= self->smooth[i];\n    imag[i] *= self->smooth[i];\n  }\n  // Keep track of |magn| spectrum for next frame.\n  memcpy(self->magnPrevProcess, magn, sizeof(*magn) * self->magnLen);\n  memcpy(self->noisePrev, self->noise, sizeof(self->noise[0]) * self->magnLen);\n  // Back to time domain.\n  IFFT(self, real, imag, self->magnLen, self->anaLen, winData);\n\n  // Scale factor: only do it after END_STARTUP_LONG time.\n  factor = 1.f;\n  if (self->gainmap == 1 && self->blockInd > END_STARTUP_LONG) {\n    factor1 = 1.f;\n    factor2 = 1.f;\n\n    energy2 = Energy(winData, self->anaLen);\n    gain = (float)sqrt(energy2 / (energy1 + 1.f));\n\n    // Scaling for new version.\n    if (gain > B_LIM) {\n      factor1 = 1.f + 1.3f * (gain - B_LIM);\n      if (gain * factor1 > 1.f) {\n        factor1 = 1.f / gain;\n      }\n    }\n    if (gain < B_LIM) {\n      // Don't reduce scale too much for pause regions:\n      // attenuation here should be controlled by flooring.\n      if (gain <= self->denoiseBound) {\n        gain = self->denoiseBound;\n      }\n      factor2 = 1.f - 0.3f * (B_LIM - gain);\n    }\n    // Combine both scales with speech/noise prob:\n    // note prior (priorSpeechProb) is not frequency dependent.\n    factor = self->priorSpeechProb * factor1 +\n             (1.f - self->priorSpeechProb) * factor2;\n  }  // Out of self->gainmap == 1.\n\n  Windowing(self->window, winData, self->anaLen, winData);\n\n  // Synthesis.\n  for (i = 0; i < self->anaLen; i++) {\n    self->syntBuf[i] += factor * winData[i];\n  }\n  // Read out fully processed segment.\n  for (i = self->windShift; i < self->blockLen + self->windShift; i++) {\n    fout[i - self->windShift] = self->syntBuf[i];\n  }\n  // Update synthesis buffer.\n  UpdateBuffer(NULL, self->blockLen, self->anaLen, self->syntBuf);\n\n  for (i = 0; i < self->blockLen; ++i)\n    outFrame[0][i] =\n        WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX, fout[i], WEBRTC_SPL_WORD16_MIN);\n\n  // For time-domain gain of HB.\n  if (flagHB == 1) {\n    // Average speech prob from low band.\n    // Average over second half (i.e., 4->8kHz) of frequencies spectrum.\n    avgProbSpeechHB = 0.0;\n    for (i = self->magnLen - deltaBweHB - 1; i < self->magnLen - 1; i++) {\n      avgProbSpeechHB += self->speechProb[i];\n    }\n    avgProbSpeechHB = avgProbSpeechHB / ((float)deltaBweHB);\n    // If the speech was suppressed by a component between Analyze and\n    // Process, for example the AEC, then it should not be considered speech\n    // for high band suppression purposes.\n    sumMagnAnalyze = 0;\n    sumMagnProcess = 0;\n    for (i = 0; i < self->magnLen; ++i) {\n      sumMagnAnalyze += self->magnPrevAnalyze[i];\n      sumMagnProcess += self->magnPrevProcess[i];\n    }\n    avgProbSpeechHB *= sumMagnProcess / sumMagnAnalyze;\n    // Average filter gain from low band.\n    // Average over second half (i.e., 4->8kHz) of frequencies spectrum.\n    avgFilterGainHB = 0.0;\n    for (i = self->magnLen - deltaGainHB - 1; i < self->magnLen - 1; i++) {\n      avgFilterGainHB += self->smooth[i];\n    }\n    avgFilterGainHB = avgFilterGainHB / ((float)(deltaGainHB));\n    avgProbSpeechHBTmp = 2.f * avgProbSpeechHB - 1.f;\n    // Gain based on speech probability.\n    gainModHB = 0.5f * (1.f + (float)tanh(gainMapParHB * avgProbSpeechHBTmp));\n    // Combine gain with low band gain.\n    gainTimeDomainHB = 0.5f * gainModHB + 0.5f * avgFilterGainHB;\n    if (avgProbSpeechHB >= 0.5f) {\n      gainTimeDomainHB = 0.25f * gainModHB + 0.75f * avgFilterGainHB;\n    }\n    gainTimeDomainHB = gainTimeDomainHB * decayBweHB;\n    // Make sure gain is within flooring range.\n    // Flooring bottom.\n    if (gainTimeDomainHB < self->denoiseBound) {\n      gainTimeDomainHB = self->denoiseBound;\n    }\n    // Flooring top.\n    if (gainTimeDomainHB > 1.f) {\n      gainTimeDomainHB = 1.f;\n    }\n    // Apply gain.\n    for (i = 0; i < num_high_bands; ++i) {\n      for (j = 0; j < self->blockLen; j++) {\n        outFrameHB[i][j] =\n            WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX,\n                           gainTimeDomainHB * self->dataBufHB[i][j],\n                           WEBRTC_SPL_WORD16_MIN);\n      }\n    }\n  }  // End of H band gain computation.\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/ns_core.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_\n\n#include \"webrtc/modules/audio_processing/ns/defines.h\"\n\ntypedef struct NSParaExtract_ {\n  // Bin size of histogram.\n  float binSizeLrt;\n  float binSizeSpecFlat;\n  float binSizeSpecDiff;\n  // Range of histogram over which LRT threshold is computed.\n  float rangeAvgHistLrt;\n  // Scale parameters: multiply dominant peaks of the histograms by scale factor\n  // to obtain thresholds for prior model.\n  float factor1ModelPars;  // For LRT and spectral difference.\n  float factor2ModelPars;  // For spectral_flatness: used when noise is flatter\n                           // than speech.\n  // Peak limit for spectral flatness (varies between 0 and 1).\n  float thresPosSpecFlat;\n  // Limit on spacing of two highest peaks in histogram: spacing determined by\n  // bin size.\n  float limitPeakSpacingSpecFlat;\n  float limitPeakSpacingSpecDiff;\n  // Limit on relevance of second peak.\n  float limitPeakWeightsSpecFlat;\n  float limitPeakWeightsSpecDiff;\n  // Limit on fluctuation of LRT feature.\n  float thresFluctLrt;\n  // Limit on the max and min values for the feature thresholds.\n  float maxLrt;\n  float minLrt;\n  float maxSpecFlat;\n  float minSpecFlat;\n  float maxSpecDiff;\n  float minSpecDiff;\n  // Criteria of weight of histogram peak to accept/reject feature.\n  int thresWeightSpecFlat;\n  int thresWeightSpecDiff;\n\n} NSParaExtract;\n\ntypedef struct NoiseSuppressionC_ {\n  uint32_t fs;\n  size_t blockLen;\n  size_t windShift;\n  size_t anaLen;\n  size_t magnLen;\n  int aggrMode;\n  const float* window;\n  float analyzeBuf[ANAL_BLOCKL_MAX];\n  float dataBuf[ANAL_BLOCKL_MAX];\n  float syntBuf[ANAL_BLOCKL_MAX];\n\n  int initFlag;\n  // Parameters for quantile noise estimation.\n  float density[SIMULT * HALF_ANAL_BLOCKL];\n  float lquantile[SIMULT * HALF_ANAL_BLOCKL];\n  float quantile[HALF_ANAL_BLOCKL];\n  int counter[SIMULT];\n  int updates;\n  // Parameters for Wiener filter.\n  float smooth[HALF_ANAL_BLOCKL];\n  float overdrive;\n  float denoiseBound;\n  int gainmap;\n  // FFT work arrays.\n  size_t ip[IP_LENGTH];\n  float wfft[W_LENGTH];\n\n  // Parameters for new method: some not needed, will reduce/cleanup later.\n  int32_t blockInd;  // Frame index counter.\n  int modelUpdatePars[4];  // Parameters for updating or estimating.\n  // Thresholds/weights for prior model.\n  float priorModelPars[7];  // Parameters for prior model.\n  float noise[HALF_ANAL_BLOCKL];  // Noise spectrum from current frame.\n  float noisePrev[HALF_ANAL_BLOCKL];  // Noise spectrum from previous frame.\n  // Magnitude spectrum of previous analyze frame.\n  float magnPrevAnalyze[HALF_ANAL_BLOCKL];\n  // Magnitude spectrum of previous process frame.\n  float magnPrevProcess[HALF_ANAL_BLOCKL];\n  float logLrtTimeAvg[HALF_ANAL_BLOCKL];  // Log LRT factor with time-smoothing.\n  float priorSpeechProb;  // Prior speech/noise probability.\n  float featureData[7];\n  // Conservative noise spectrum estimate.\n  float magnAvgPause[HALF_ANAL_BLOCKL];\n  float signalEnergy;  // Energy of |magn|.\n  float sumMagn;\n  float whiteNoiseLevel;  // Initial noise estimate.\n  float initMagnEst[HALF_ANAL_BLOCKL];  // Initial magnitude spectrum estimate.\n  float pinkNoiseNumerator;  // Pink noise parameter: numerator.\n  float pinkNoiseExp;  // Pink noise parameter: power of frequencies.\n  float parametricNoise[HALF_ANAL_BLOCKL];\n  // Parameters for feature extraction.\n  NSParaExtract featureExtractionParams;\n  // Histograms for parameter estimation.\n  int histLrt[HIST_PAR_EST];\n  int histSpecFlat[HIST_PAR_EST];\n  int histSpecDiff[HIST_PAR_EST];\n  // Quantities for high band estimate.\n  float speechProb[HALF_ANAL_BLOCKL];  // Final speech/noise prob: prior + LRT.\n  // Buffering data for HB.\n  float dataBufHB[NUM_HIGH_BANDS_MAX][ANAL_BLOCKL_MAX];\n\n} NoiseSuppressionC;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/****************************************************************************\n * WebRtcNs_InitCore(...)\n *\n * This function initializes a noise suppression instance\n *\n * Input:\n *      - self          : Instance that should be initialized\n *      - fs            : Sampling frequency\n *\n * Output:\n *      - self          : Initialized instance\n *\n * Return value         :  0 - Ok\n *                        -1 - Error\n */\nint WebRtcNs_InitCore(NoiseSuppressionC* self, uint32_t fs);\n\n/****************************************************************************\n * WebRtcNs_set_policy_core(...)\n *\n * This changes the aggressiveness of the noise suppression method.\n *\n * Input:\n *      - self          : Instance that should be initialized\n *      - mode          : 0: Mild (6dB), 1: Medium (10dB), 2: Aggressive (15dB)\n *\n * Output:\n *      - self          : Initialized instance\n *\n * Return value         :  0 - Ok\n *                        -1 - Error\n */\nint WebRtcNs_set_policy_core(NoiseSuppressionC* self, int mode);\n\n/****************************************************************************\n * WebRtcNs_AnalyzeCore\n *\n * Estimate the background noise.\n *\n * Input:\n *      - self          : Instance that should be initialized\n *      - speechFrame   : Input speech frame for lower band\n *\n * Output:\n *      - self          : Updated instance\n */\nvoid WebRtcNs_AnalyzeCore(NoiseSuppressionC* self, const float* speechFrame);\n\n/****************************************************************************\n * WebRtcNs_ProcessCore\n *\n * Do noise suppression.\n *\n * Input:\n *      - self          : Instance that should be initialized\n *      - inFrame       : Input speech frame for each band\n *      - num_bands     : Number of bands\n *\n * Output:\n *      - self          : Updated instance\n *      - outFrame      : Output speech frame for each band\n */\nvoid WebRtcNs_ProcessCore(NoiseSuppressionC* self,\n                          const float* const* inFrame,\n                          size_t num_bands,\n                          float* const* outFrame);\n\n#ifdef __cplusplus\n}\n#endif\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_NS_NS_CORE_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/nsx_core.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/ns/noise_suppression_x.h\"\n\n#include <math.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_audio/signal_processing/include/real_fft.h\"\n#include \"webrtc/modules/audio_processing/ns/nsx_core.h\"\n#include \"webrtc/system_wrappers/include/cpu_features_wrapper.h\"\n\n#if defined(WEBRTC_HAS_NEON)\n/* Tables are defined in ARM assembly files. */\nextern const int16_t WebRtcNsx_kLogTable[9];\nextern const int16_t WebRtcNsx_kCounterDiv[201];\nextern const int16_t WebRtcNsx_kLogTableFrac[256];\n#else\nstatic const int16_t WebRtcNsx_kLogTable[9] = {\n  0, 177, 355, 532, 710, 887, 1065, 1242, 1420\n};\n\nstatic const int16_t WebRtcNsx_kCounterDiv[201] = {\n  32767, 16384, 10923, 8192, 6554, 5461, 4681, 4096, 3641, 3277, 2979, 2731,\n  2521, 2341, 2185, 2048, 1928, 1820, 1725, 1638, 1560, 1489, 1425, 1365, 1311,\n  1260, 1214, 1170, 1130, 1092, 1057, 1024, 993, 964, 936, 910, 886, 862, 840,\n  819, 799, 780, 762, 745, 728, 712, 697, 683, 669, 655, 643, 630, 618, 607,\n  596, 585, 575, 565, 555, 546, 537, 529, 520, 512, 504, 496, 489, 482, 475,\n  468, 462, 455, 449, 443, 437, 431, 426, 420, 415, 410, 405, 400, 395, 390,\n  386, 381, 377, 372, 368, 364, 360, 356, 352, 349, 345, 341, 338, 334, 331,\n  328, 324, 321, 318, 315, 312, 309, 306, 303, 301, 298, 295, 293, 290, 287,\n  285, 282, 280, 278, 275, 273, 271, 269, 266, 264, 262, 260, 258, 256, 254,\n  252, 250, 248, 246, 245, 243, 241, 239, 237, 236, 234, 232, 231, 229, 228,\n  226, 224, 223, 221, 220, 218, 217, 216, 214, 213, 211, 210, 209, 207, 206,\n  205, 204, 202, 201, 200, 199, 197, 196, 195, 194, 193, 192, 191, 189, 188,\n  187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173,\n  172, 172, 171, 170, 169, 168, 167, 166, 165, 165, 164, 163\n};\n\nstatic const int16_t WebRtcNsx_kLogTableFrac[256] = {\n  0,   1,   3,   4,   6,   7,   9,  10,  11,  13,  14,  16,  17,  18,  20,  21,\n  22,  24,  25,  26,  28,  29,  30,  32,  33,  34,  36,  37,  38,  40,  41,  42,\n  44,  45,  46,  47,  49,  50,  51,  52,  54,  55,  56,  57,  59,  60,  61,  62,\n  63,  65,  66,  67,  68,  69,  71,  72,  73,  74,  75,  77,  78,  79,  80,  81,\n  82,  84,  85,  86,  87,  88,  89,  90,  92,  93,  94,  95,  96,  97,  98,  99,\n  100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116,\n  117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,\n  132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,\n  147, 148, 149, 150, 151, 152, 153, 154, 155, 155, 156, 157, 158, 159, 160,\n  161, 162, 163, 164, 165, 166, 167, 168, 169, 169, 170, 171, 172, 173, 174,\n  175, 176, 177, 178, 178, 179, 180, 181, 182, 183, 184, 185, 185, 186, 187,\n  188, 189, 190, 191, 192, 192, 193, 194, 195, 196, 197, 198, 198, 199, 200,\n  201, 202, 203, 203, 204, 205, 206, 207, 208, 208, 209, 210, 211, 212, 212,\n  213, 214, 215, 216, 216, 217, 218, 219, 220, 220, 221, 222, 223, 224, 224,\n  225, 226, 227, 228, 228, 229, 230, 231, 231, 232, 233, 234, 234, 235, 236,\n  237, 238, 238, 239, 240, 241, 241, 242, 243, 244, 244, 245, 246, 247, 247,\n  248, 249, 249, 250, 251, 252, 252, 253, 254, 255, 255\n};\n#endif  // WEBRTC_HAS_NEON\n\n// Skip first frequency bins during estimation. (0 <= value < 64)\nstatic const size_t kStartBand = 5;\n\n// hybrib Hanning & flat window\nstatic const int16_t kBlocks80w128x[128] = {\n  0,    536,   1072,   1606,   2139,   2669,   3196,   3720,   4240,   4756,   5266,\n  5771,   6270,   6762,   7246,   7723,   8192,   8652,   9102,   9543,   9974,  10394,\n  10803,  11200,  11585,  11958,  12318,  12665,  12998,  13318,  13623,  13913,  14189,\n  14449,  14694,  14924,  15137,  15334,  15515,  15679,  15826,  15956,  16069,  16165,\n  16244,  16305,  16349,  16375,  16384,  16384,  16384,  16384,  16384,  16384,  16384,\n  16384,  16384,  16384,  16384,  16384,  16384,  16384,  16384,  16384,  16384,  16384,\n  16384,  16384,  16384,  16384,  16384,  16384,  16384,  16384,  16384,  16384,  16384,\n  16384,  16384,  16384,  16384,  16375,  16349,  16305,  16244,  16165,  16069,  15956,\n  15826,  15679,  15515,  15334,  15137,  14924,  14694,  14449,  14189,  13913,  13623,\n  13318,  12998,  12665,  12318,  11958,  11585,  11200,  10803,  10394,   9974,   9543,\n  9102,   8652,   8192,   7723,   7246,   6762,   6270,   5771,   5266,   4756,   4240,\n  3720,   3196,   2669,   2139,   1606,   1072,    536\n};\n\n// hybrib Hanning & flat window\nstatic const int16_t kBlocks160w256x[256] = {\n  0,   268,   536,   804,  1072,  1339,  1606,  1872,\n  2139,  2404,  2669,  2933,  3196,  3459,  3720,  3981,\n  4240,  4499,  4756,  5012,  5266,  5520,  5771,  6021,\n  6270,  6517,  6762,  7005,  7246,  7486,  7723,  7959,\n  8192,  8423,  8652,  8878,  9102,  9324,  9543,  9760,\n  9974, 10185, 10394, 10600, 10803, 11003, 11200, 11394,\n  11585, 11773, 11958, 12140, 12318, 12493, 12665, 12833,\n  12998, 13160, 13318, 13472, 13623, 13770, 13913, 14053,\n  14189, 14321, 14449, 14574, 14694, 14811, 14924, 15032,\n  15137, 15237, 15334, 15426, 15515, 15599, 15679, 15754,\n  15826, 15893, 15956, 16015, 16069, 16119, 16165, 16207,\n  16244, 16277, 16305, 16329, 16349, 16364, 16375, 16382,\n  16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,\n  16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,\n  16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,\n  16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,\n  16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,\n  16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,\n  16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,\n  16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,\n  16384, 16382, 16375, 16364, 16349, 16329, 16305, 16277,\n  16244, 16207, 16165, 16119, 16069, 16015, 15956, 15893,\n  15826, 15754, 15679, 15599, 15515, 15426, 15334, 15237,\n  15137, 15032, 14924, 14811, 14694, 14574, 14449, 14321,\n  14189, 14053, 13913, 13770, 13623, 13472, 13318, 13160,\n  12998, 12833, 12665, 12493, 12318, 12140, 11958, 11773,\n  11585, 11394, 11200, 11003, 10803, 10600, 10394, 10185,\n  9974,  9760,  9543,  9324,  9102,  8878,  8652,  8423,\n  8192,  7959,  7723,  7486,  7246,  7005,  6762,  6517,\n  6270,  6021,  5771,  5520,  5266,  5012,  4756,  4499,\n  4240,  3981,  3720,  3459,  3196,  2933,  2669,  2404,\n  2139,  1872,  1606,  1339,  1072,   804,   536,   268\n};\n\n// Gain factor1 table: Input value in Q8 and output value in Q13\n// original floating point code\n//  if (gain > blim) {\n//    factor1 = 1.0 + 1.3 * (gain - blim);\n//    if (gain * factor1 > 1.0) {\n//      factor1 = 1.0 / gain;\n//    }\n//  } else {\n//    factor1 = 1.0;\n//  }\nstatic const int16_t kFactor1Table[257] = {\n  8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8233, 8274, 8315, 8355, 8396, 8436, 8475, 8515, 8554, 8592, 8631, 8669,\n  8707, 8745, 8783, 8820, 8857, 8894, 8931, 8967, 9003, 9039, 9075, 9111, 9146, 9181,\n  9216, 9251, 9286, 9320, 9354, 9388, 9422, 9456, 9489, 9523, 9556, 9589, 9622, 9655,\n  9687, 9719, 9752, 9784, 9816, 9848, 9879, 9911, 9942, 9973, 10004, 10035, 10066,\n  10097, 10128, 10158, 10188, 10218, 10249, 10279, 10308, 10338, 10368, 10397, 10426,\n  10456, 10485, 10514, 10543, 10572, 10600, 10629, 10657, 10686, 10714, 10742, 10770,\n  10798, 10826, 10854, 10882, 10847, 10810, 10774, 10737, 10701, 10666, 10631, 10596,\n  10562, 10527, 10494, 10460, 10427, 10394, 10362, 10329, 10297, 10266, 10235, 10203,\n  10173, 10142, 10112, 10082, 10052, 10023, 9994, 9965, 9936, 9908, 9879, 9851, 9824,\n  9796, 9769, 9742, 9715, 9689, 9662, 9636, 9610, 9584, 9559, 9534, 9508, 9484, 9459,\n  9434, 9410, 9386, 9362, 9338, 9314, 9291, 9268, 9245, 9222, 9199, 9176, 9154, 9132,\n  9110, 9088, 9066, 9044, 9023, 9002, 8980, 8959, 8939, 8918, 8897, 8877, 8857, 8836,\n  8816, 8796, 8777, 8757, 8738, 8718, 8699, 8680, 8661, 8642, 8623, 8605, 8586, 8568,\n  8550, 8532, 8514, 8496, 8478, 8460, 8443, 8425, 8408, 8391, 8373, 8356, 8339, 8323,\n  8306, 8289, 8273, 8256, 8240, 8224, 8208, 8192\n};\n\n// For Factor2 tables\n// original floating point code\n// if (gain > blim) {\n//   factor2 = 1.0;\n// } else {\n//   factor2 = 1.0 - 0.3 * (blim - gain);\n//   if (gain <= inst->denoiseBound) {\n//     factor2 = 1.0 - 0.3 * (blim - inst->denoiseBound);\n//   }\n// }\n//\n// Gain factor table: Input value in Q8 and output value in Q13\nstatic const int16_t kFactor2Aggressiveness1[257] = {\n  7577, 7577, 7577, 7577, 7577, 7577,\n  7577, 7577, 7577, 7577, 7577, 7577, 7577, 7577, 7577, 7577, 7577, 7596, 7614, 7632,\n  7650, 7667, 7683, 7699, 7715, 7731, 7746, 7761, 7775, 7790, 7804, 7818, 7832, 7845,\n  7858, 7871, 7884, 7897, 7910, 7922, 7934, 7946, 7958, 7970, 7982, 7993, 8004, 8016,\n  8027, 8038, 8049, 8060, 8070, 8081, 8091, 8102, 8112, 8122, 8132, 8143, 8152, 8162,\n  8172, 8182, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192\n};\n\n// Gain factor table: Input value in Q8 and output value in Q13\nstatic const int16_t kFactor2Aggressiveness2[257] = {\n  7270, 7270, 7270, 7270, 7270, 7306,\n  7339, 7369, 7397, 7424, 7448, 7472, 7495, 7517, 7537, 7558, 7577, 7596, 7614, 7632,\n  7650, 7667, 7683, 7699, 7715, 7731, 7746, 7761, 7775, 7790, 7804, 7818, 7832, 7845,\n  7858, 7871, 7884, 7897, 7910, 7922, 7934, 7946, 7958, 7970, 7982, 7993, 8004, 8016,\n  8027, 8038, 8049, 8060, 8070, 8081, 8091, 8102, 8112, 8122, 8132, 8143, 8152, 8162,\n  8172, 8182, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192\n};\n\n// Gain factor table: Input value in Q8 and output value in Q13\nstatic const int16_t kFactor2Aggressiveness3[257] = {\n  7184, 7184, 7184, 7229, 7270, 7306,\n  7339, 7369, 7397, 7424, 7448, 7472, 7495, 7517, 7537, 7558, 7577, 7596, 7614, 7632,\n  7650, 7667, 7683, 7699, 7715, 7731, 7746, 7761, 7775, 7790, 7804, 7818, 7832, 7845,\n  7858, 7871, 7884, 7897, 7910, 7922, 7934, 7946, 7958, 7970, 7982, 7993, 8004, 8016,\n  8027, 8038, 8049, 8060, 8070, 8081, 8091, 8102, 8112, 8122, 8132, 8143, 8152, 8162,\n  8172, 8182, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,\n  8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192\n};\n\n// sum of log2(i) from table index to inst->anaLen2 in Q5\n// Note that the first table value is invalid, since log2(0) = -infinity\nstatic const int16_t kSumLogIndex[66] = {\n  0,  22917,  22917,  22885,  22834,  22770,  22696,  22613,\n  22524,  22428,  22326,  22220,  22109,  21994,  21876,  21754,\n  21629,  21501,  21370,  21237,  21101,  20963,  20822,  20679,\n  20535,  20388,  20239,  20089,  19937,  19783,  19628,  19470,\n  19312,  19152,  18991,  18828,  18664,  18498,  18331,  18164,\n  17994,  17824,  17653,  17480,  17306,  17132,  16956,  16779,\n  16602,  16423,  16243,  16063,  15881,  15699,  15515,  15331,\n  15146,  14960,  14774,  14586,  14398,  14209,  14019,  13829,\n  13637,  13445\n};\n\n// sum of log2(i)^2 from table index to inst->anaLen2 in Q2\n// Note that the first table value is invalid, since log2(0) = -infinity\nstatic const int16_t kSumSquareLogIndex[66] = {\n  0,  16959,  16959,  16955,  16945,  16929,  16908,  16881,\n  16850,  16814,  16773,  16729,  16681,  16630,  16575,  16517,\n  16456,  16392,  16325,  16256,  16184,  16109,  16032,  15952,\n  15870,  15786,  15700,  15612,  15521,  15429,  15334,  15238,\n  15140,  15040,  14938,  14834,  14729,  14622,  14514,  14404,\n  14292,  14179,  14064,  13947,  13830,  13710,  13590,  13468,\n  13344,  13220,  13094,  12966,  12837,  12707,  12576,  12444,\n  12310,  12175,  12039,  11902,  11763,  11624,  11483,  11341,\n  11198,  11054\n};\n\n// log2(table index) in Q12\n// Note that the first table value is invalid, since log2(0) = -infinity\nstatic const int16_t kLogIndex[129] = {\n  0,      0,   4096,   6492,   8192,   9511,  10588,  11499,\n  12288,  12984,  13607,  14170,  14684,  15157,  15595,  16003,\n  16384,  16742,  17080,  17400,  17703,  17991,  18266,  18529,\n  18780,  19021,  19253,  19476,  19691,  19898,  20099,  20292,\n  20480,  20662,  20838,  21010,  21176,  21338,  21496,  21649,\n  21799,  21945,  22087,  22226,  22362,  22495,  22625,  22752,\n  22876,  22998,  23117,  23234,  23349,  23462,  23572,  23680,\n  23787,  23892,  23994,  24095,  24195,  24292,  24388,  24483,\n  24576,  24668,  24758,  24847,  24934,  25021,  25106,  25189,\n  25272,  25354,  25434,  25513,  25592,  25669,  25745,  25820,\n  25895,  25968,  26041,  26112,  26183,  26253,  26322,  26390,\n  26458,  26525,  26591,  26656,  26721,  26784,  26848,  26910,\n  26972,  27033,  27094,  27154,  27213,  27272,  27330,  27388,\n  27445,  27502,  27558,  27613,  27668,  27722,  27776,  27830,\n  27883,  27935,  27988,  28039,  28090,  28141,  28191,  28241,\n  28291,  28340,  28388,  28437,  28484,  28532,  28579,  28626,\n  28672\n};\n\n// determinant of estimation matrix in Q0 corresponding to the log2 tables above\n// Note that the first table value is invalid, since log2(0) = -infinity\nstatic const int16_t kDeterminantEstMatrix[66] = {\n  0,  29814,  25574,  22640,  20351,  18469,  16873,  15491,\n  14277,  13199,  12233,  11362,  10571,   9851,   9192,   8587,\n  8030,   7515,   7038,   6596,   6186,   5804,   5448,   5115,\n  4805,   4514,   4242,   3988,   3749,   3524,   3314,   3116,\n  2930,   2755,   2590,   2435,   2289,   2152,   2022,   1900,\n  1785,   1677,   1575,   1478,   1388,   1302,   1221,   1145,\n  1073,   1005,    942,    881,    825,    771,    721,    674,\n  629,    587,    547,    510,    475,    442,    411,    382,\n  355,    330\n};\n\n// Update the noise estimation information.\nstatic void UpdateNoiseEstimate(NoiseSuppressionFixedC* inst, int offset) {\n  int32_t tmp32no1 = 0;\n  int32_t tmp32no2 = 0;\n  int16_t tmp16 = 0;\n  const int16_t kExp2Const = 11819; // Q13\n\n  size_t i = 0;\n\n  tmp16 = WebRtcSpl_MaxValueW16(inst->noiseEstLogQuantile + offset,\n                                   inst->magnLen);\n  // Guarantee a Q-domain as high as possible and still fit in int16\n  inst->qNoise = 14 - (int) WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(\n                   kExp2Const, tmp16, 21);\n  for (i = 0; i < inst->magnLen; i++) {\n    // inst->quantile[i]=exp(inst->lquantile[offset+i]);\n    // in Q21\n    tmp32no2 = kExp2Const * inst->noiseEstLogQuantile[offset + i];\n    tmp32no1 = (0x00200000 | (tmp32no2 & 0x001FFFFF)); // 2^21 + frac\n    tmp16 = (int16_t)(tmp32no2 >> 21);\n    tmp16 -= 21;// shift 21 to get result in Q0\n    tmp16 += (int16_t) inst->qNoise; //shift to get result in Q(qNoise)\n    if (tmp16 < 0) {\n      tmp32no1 >>= -tmp16;\n    } else {\n      tmp32no1 <<= tmp16;\n    }\n    inst->noiseEstQuantile[i] = WebRtcSpl_SatW32ToW16(tmp32no1);\n  }\n}\n\n// Noise Estimation\nstatic void NoiseEstimationC(NoiseSuppressionFixedC* inst,\n                             uint16_t* magn,\n                             uint32_t* noise,\n                             int16_t* q_noise) {\n  int16_t lmagn[HALF_ANAL_BLOCKL], counter, countDiv;\n  int16_t countProd, delta, zeros, frac;\n  int16_t log2, tabind, logval, tmp16, tmp16no1, tmp16no2;\n  const int16_t log2_const = 22713; // Q15\n  const int16_t width_factor = 21845;\n\n  size_t i, s, offset;\n\n  tabind = inst->stages - inst->normData;\n  RTC_DCHECK_LT(tabind, 9);\n  RTC_DCHECK_GT(tabind, -9);\n  if (tabind < 0) {\n    logval = -WebRtcNsx_kLogTable[-tabind];\n  } else {\n    logval = WebRtcNsx_kLogTable[tabind];\n  }\n\n  // lmagn(i)=log(magn(i))=log(2)*log2(magn(i))\n  // magn is in Q(-stages), and the real lmagn values are:\n  // real_lmagn(i)=log(magn(i)*2^stages)=log(magn(i))+log(2^stages)\n  // lmagn in Q8\n  for (i = 0; i < inst->magnLen; i++) {\n    if (magn[i]) {\n      zeros = WebRtcSpl_NormU32((uint32_t)magn[i]);\n      frac = (int16_t)((((uint32_t)magn[i] << zeros)\n                              & 0x7FFFFFFF) >> 23);\n      // log2(magn(i))\n      RTC_DCHECK_LT(frac, 256);\n      log2 = (int16_t)(((31 - zeros) << 8)\n                             + WebRtcNsx_kLogTableFrac[frac]);\n      // log2(magn(i))*log(2)\n      lmagn[i] = (int16_t)((log2 * log2_const) >> 15);\n      // + log(2^stages)\n      lmagn[i] += logval;\n    } else {\n      lmagn[i] = logval;//0;\n    }\n  }\n\n  // loop over simultaneous estimates\n  for (s = 0; s < SIMULT; s++) {\n    offset = s * inst->magnLen;\n\n    // Get counter values from state\n    counter = inst->noiseEstCounter[s];\n    RTC_DCHECK_LT(counter, 201);\n    countDiv = WebRtcNsx_kCounterDiv[counter];\n    countProd = (int16_t)(counter * countDiv);\n\n    // quant_est(...)\n    for (i = 0; i < inst->magnLen; i++) {\n      // compute delta\n      if (inst->noiseEstDensity[offset + i] > 512) {\n        // Get the value for delta by shifting intead of dividing.\n        int factor = WebRtcSpl_NormW16(inst->noiseEstDensity[offset + i]);\n        delta = (int16_t)(FACTOR_Q16 >> (14 - factor));\n      } else {\n        delta = FACTOR_Q7;\n        if (inst->blockIndex < END_STARTUP_LONG) {\n          // Smaller step size during startup. This prevents from using\n          // unrealistic values causing overflow.\n          delta = FACTOR_Q7_STARTUP;\n        }\n      }\n\n      // update log quantile estimate\n      tmp16 = (int16_t)((delta * countDiv) >> 14);\n      if (lmagn[i] > inst->noiseEstLogQuantile[offset + i]) {\n        // +=QUANTILE*delta/(inst->counter[s]+1) QUANTILE=0.25, =1 in Q2\n        // CounterDiv=1/(inst->counter[s]+1) in Q15\n        tmp16 += 2;\n        inst->noiseEstLogQuantile[offset + i] += tmp16 / 4;\n      } else {\n        tmp16 += 1;\n        // *(1-QUANTILE), in Q2 QUANTILE=0.25, 1-0.25=0.75=3 in Q2\n        // TODO(bjornv): investigate why we need to truncate twice.\n        tmp16no2 = (int16_t)((tmp16 / 2) * 3 / 2);\n        inst->noiseEstLogQuantile[offset + i] -= tmp16no2;\n        if (inst->noiseEstLogQuantile[offset + i] < logval) {\n          // This is the smallest fixed point representation we can\n          // have, hence we limit the output.\n          inst->noiseEstLogQuantile[offset + i] = logval;\n        }\n      }\n\n      // update density estimate\n      if (WEBRTC_SPL_ABS_W16(lmagn[i] - inst->noiseEstLogQuantile[offset + i])\n          < WIDTH_Q8) {\n        tmp16no1 = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(\n                     inst->noiseEstDensity[offset + i], countProd, 15);\n        tmp16no2 = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(\n                     width_factor, countDiv, 15);\n        inst->noiseEstDensity[offset + i] = tmp16no1 + tmp16no2;\n      }\n    }  // end loop over magnitude spectrum\n\n    if (counter >= END_STARTUP_LONG) {\n      inst->noiseEstCounter[s] = 0;\n      if (inst->blockIndex >= END_STARTUP_LONG) {\n        UpdateNoiseEstimate(inst, offset);\n      }\n    }\n    inst->noiseEstCounter[s]++;\n\n  }  // end loop over simultaneous estimates\n\n  // Sequentially update the noise during startup\n  if (inst->blockIndex < END_STARTUP_LONG) {\n    UpdateNoiseEstimate(inst, offset);\n  }\n\n  for (i = 0; i < inst->magnLen; i++) {\n    noise[i] = (uint32_t)(inst->noiseEstQuantile[i]); // Q(qNoise)\n  }\n  (*q_noise) = (int16_t)inst->qNoise;\n}\n\n// Filter the data in the frequency domain, and create spectrum.\nstatic void PrepareSpectrumC(NoiseSuppressionFixedC* inst, int16_t* freq_buf) {\n  size_t i = 0, j = 0;\n\n  for (i = 0; i < inst->magnLen; i++) {\n    inst->real[i] = (int16_t)((inst->real[i] *\n        (int16_t)(inst->noiseSupFilter[i])) >> 14);  // Q(normData-stages)\n    inst->imag[i] = (int16_t)((inst->imag[i] *\n        (int16_t)(inst->noiseSupFilter[i])) >> 14);  // Q(normData-stages)\n  }\n\n  freq_buf[0] = inst->real[0];\n  freq_buf[1] = -inst->imag[0];\n  for (i = 1, j = 2; i < inst->anaLen2; i += 1, j += 2) {\n    freq_buf[j] = inst->real[i];\n    freq_buf[j + 1] = -inst->imag[i];\n  }\n  freq_buf[inst->anaLen] = inst->real[inst->anaLen2];\n  freq_buf[inst->anaLen + 1] = -inst->imag[inst->anaLen2];\n}\n\n// Denormalize the real-valued signal |in|, the output from inverse FFT.\nstatic void DenormalizeC(NoiseSuppressionFixedC* inst,\n                         int16_t* in,\n                         int factor) {\n  size_t i = 0;\n  int32_t tmp32 = 0;\n  for (i = 0; i < inst->anaLen; i += 1) {\n    tmp32 = WEBRTC_SPL_SHIFT_W32((int32_t)in[i],\n                                 factor - inst->normData);\n    inst->real[i] = WebRtcSpl_SatW32ToW16(tmp32); // Q0\n  }\n}\n\n// For the noise supression process, synthesis, read out fully processed\n// segment, and update synthesis buffer.\nstatic void SynthesisUpdateC(NoiseSuppressionFixedC* inst,\n                             int16_t* out_frame,\n                             int16_t gain_factor) {\n  size_t i = 0;\n  int16_t tmp16a = 0;\n  int16_t tmp16b = 0;\n  int32_t tmp32 = 0;\n\n  // synthesis\n  for (i = 0; i < inst->anaLen; i++) {\n    tmp16a = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(\n                 inst->window[i], inst->real[i], 14); // Q0, window in Q14\n    tmp32 = WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(tmp16a, gain_factor, 13); // Q0\n    // Down shift with rounding\n    tmp16b = WebRtcSpl_SatW32ToW16(tmp32); // Q0\n    inst->synthesisBuffer[i] = WebRtcSpl_AddSatW16(inst->synthesisBuffer[i],\n                                                   tmp16b); // Q0\n  }\n\n  // read out fully processed segment\n  for (i = 0; i < inst->blockLen10ms; i++) {\n    out_frame[i] = inst->synthesisBuffer[i]; // Q0\n  }\n\n  // update synthesis buffer\n  memcpy(inst->synthesisBuffer, inst->synthesisBuffer + inst->blockLen10ms,\n      (inst->anaLen - inst->blockLen10ms) * sizeof(*inst->synthesisBuffer));\n  WebRtcSpl_ZerosArrayW16(inst->synthesisBuffer\n      + inst->anaLen - inst->blockLen10ms, inst->blockLen10ms);\n}\n\n// Update analysis buffer for lower band, and window data before FFT.\nstatic void AnalysisUpdateC(NoiseSuppressionFixedC* inst,\n                            int16_t* out,\n                            int16_t* new_speech) {\n  size_t i = 0;\n\n  // For lower band update analysis buffer.\n  memcpy(inst->analysisBuffer, inst->analysisBuffer + inst->blockLen10ms,\n      (inst->anaLen - inst->blockLen10ms) * sizeof(*inst->analysisBuffer));\n  memcpy(inst->analysisBuffer + inst->anaLen - inst->blockLen10ms, new_speech,\n      inst->blockLen10ms * sizeof(*inst->analysisBuffer));\n\n  // Window data before FFT.\n  for (i = 0; i < inst->anaLen; i++) {\n    out[i] = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(\n               inst->window[i], inst->analysisBuffer[i], 14); // Q0\n  }\n}\n\n// Normalize the real-valued signal |in|, the input to forward FFT.\nstatic void NormalizeRealBufferC(NoiseSuppressionFixedC* inst,\n                                 const int16_t* in,\n                                 int16_t* out) {\n  size_t i = 0;\n  RTC_DCHECK_GE(inst->normData, 0);\n  for (i = 0; i < inst->anaLen; ++i) {\n    out[i] = in[i] << inst->normData;  // Q(normData)\n  }\n}\n\n// Declare function pointers.\nNoiseEstimation WebRtcNsx_NoiseEstimation;\nPrepareSpectrum WebRtcNsx_PrepareSpectrum;\nSynthesisUpdate WebRtcNsx_SynthesisUpdate;\nAnalysisUpdate WebRtcNsx_AnalysisUpdate;\nDenormalize WebRtcNsx_Denormalize;\nNormalizeRealBuffer WebRtcNsx_NormalizeRealBuffer;\n\n#if defined(WEBRTC_HAS_NEON)\n// Initialize function pointers for ARM Neon platform.\nstatic void WebRtcNsx_InitNeon(void) {\n  WebRtcNsx_NoiseEstimation = WebRtcNsx_NoiseEstimationNeon;\n  WebRtcNsx_PrepareSpectrum = WebRtcNsx_PrepareSpectrumNeon;\n  WebRtcNsx_SynthesisUpdate = WebRtcNsx_SynthesisUpdateNeon;\n  WebRtcNsx_AnalysisUpdate = WebRtcNsx_AnalysisUpdateNeon;\n}\n#endif\n\n#if defined(MIPS32_LE)\n// Initialize function pointers for MIPS platform.\nstatic void WebRtcNsx_InitMips(void) {\n  WebRtcNsx_PrepareSpectrum = WebRtcNsx_PrepareSpectrum_mips;\n  WebRtcNsx_SynthesisUpdate = WebRtcNsx_SynthesisUpdate_mips;\n  WebRtcNsx_AnalysisUpdate = WebRtcNsx_AnalysisUpdate_mips;\n  WebRtcNsx_NormalizeRealBuffer = WebRtcNsx_NormalizeRealBuffer_mips;\n#if defined(MIPS_DSP_R1_LE)\n  WebRtcNsx_Denormalize = WebRtcNsx_Denormalize_mips;\n#endif\n}\n#endif\n\nvoid WebRtcNsx_CalcParametricNoiseEstimate(NoiseSuppressionFixedC* inst,\n                                           int16_t pink_noise_exp_avg,\n                                           int32_t pink_noise_num_avg,\n                                           int freq_index,\n                                           uint32_t* noise_estimate,\n                                           uint32_t* noise_estimate_avg) {\n  int32_t tmp32no1 = 0;\n  int32_t tmp32no2 = 0;\n\n  int16_t int_part = 0;\n  int16_t frac_part = 0;\n\n  // Use pink noise estimate\n  // noise_estimate = 2^(pinkNoiseNumerator + pinkNoiseExp * log2(j))\n  RTC_DCHECK_GE(freq_index, 0);\n  RTC_DCHECK_LT(freq_index, 129);\n  tmp32no2 = (pink_noise_exp_avg * kLogIndex[freq_index]) >> 15;  // Q11\n  tmp32no1 = pink_noise_num_avg - tmp32no2; // Q11\n\n  // Calculate output: 2^tmp32no1\n  // Output in Q(minNorm-stages)\n  tmp32no1 += (inst->minNorm - inst->stages) << 11;\n  if (tmp32no1 > 0) {\n    int_part = (int16_t)(tmp32no1 >> 11);\n    frac_part = (int16_t)(tmp32no1 & 0x000007ff); // Q11\n    // Piecewise linear approximation of 'b' in\n    // 2^(int_part+frac_part) = 2^int_part * (1 + b)\n    // 'b' is given in Q11 and below stored in frac_part.\n    if (frac_part >> 10) {\n      // Upper fractional part\n      tmp32no2 = (2048 - frac_part) * 1244;  // Q21\n      tmp32no2 = 2048 - (tmp32no2 >> 10);\n    } else {\n      // Lower fractional part\n      tmp32no2 = (frac_part * 804) >> 10;\n    }\n    // Shift fractional part to Q(minNorm-stages)\n    tmp32no2 = WEBRTC_SPL_SHIFT_W32(tmp32no2, int_part - 11);\n    *noise_estimate_avg = (1 << int_part) + (uint32_t)tmp32no2;\n    // Scale up to initMagnEst, which is not block averaged\n    *noise_estimate = (*noise_estimate_avg) * (uint32_t)(inst->blockIndex + 1);\n  }\n}\n\n// Initialize state\nint32_t WebRtcNsx_InitCore(NoiseSuppressionFixedC* inst, uint32_t fs) {\n  int i;\n\n  //check for valid pointer\n  if (inst == NULL) {\n    return -1;\n  }\n  //\n\n  // Initialization of struct\n  if (fs == 8000 || fs == 16000 || fs == 32000 || fs == 48000) {\n    inst->fs = fs;\n  } else {\n    return -1;\n  }\n\n  if (fs == 8000) {\n    inst->blockLen10ms = 80;\n    inst->anaLen = 128;\n    inst->stages = 7;\n    inst->window = kBlocks80w128x;\n    inst->thresholdLogLrt = 131072; //default threshold for LRT feature\n    inst->maxLrt = 0x0040000;\n    inst->minLrt = 52429;\n  } else {\n    inst->blockLen10ms = 160;\n    inst->anaLen = 256;\n    inst->stages = 8;\n    inst->window = kBlocks160w256x;\n    inst->thresholdLogLrt = 212644; //default threshold for LRT feature\n    inst->maxLrt = 0x0080000;\n    inst->minLrt = 104858;\n  }\n  inst->anaLen2 = inst->anaLen / 2;\n  inst->magnLen = inst->anaLen2 + 1;\n\n  if (inst->real_fft != NULL) {\n    WebRtcSpl_FreeRealFFT(inst->real_fft);\n  }\n  inst->real_fft = WebRtcSpl_CreateRealFFT(inst->stages);\n  if (inst->real_fft == NULL) {\n    return -1;\n  }\n\n  WebRtcSpl_ZerosArrayW16(inst->analysisBuffer, ANAL_BLOCKL_MAX);\n  WebRtcSpl_ZerosArrayW16(inst->synthesisBuffer, ANAL_BLOCKL_MAX);\n\n  // for HB processing\n  WebRtcSpl_ZerosArrayW16(inst->dataBufHBFX[0],\n                          NUM_HIGH_BANDS_MAX * ANAL_BLOCKL_MAX);\n  // for quantile noise estimation\n  WebRtcSpl_ZerosArrayW16(inst->noiseEstQuantile, HALF_ANAL_BLOCKL);\n  for (i = 0; i < SIMULT * HALF_ANAL_BLOCKL; i++) {\n    inst->noiseEstLogQuantile[i] = 2048; // Q8\n    inst->noiseEstDensity[i] = 153; // Q9\n  }\n  for (i = 0; i < SIMULT; i++) {\n    inst->noiseEstCounter[i] = (int16_t)(END_STARTUP_LONG * (i + 1)) / SIMULT;\n  }\n\n  // Initialize suppression filter with ones\n  WebRtcSpl_MemSetW16((int16_t*)inst->noiseSupFilter, 16384, HALF_ANAL_BLOCKL);\n\n  // Set the aggressiveness: default\n  inst->aggrMode = 0;\n\n  //initialize variables for new method\n  inst->priorNonSpeechProb = 8192; // Q14(0.5) prior probability for speech/noise\n  for (i = 0; i < HALF_ANAL_BLOCKL; i++) {\n    inst->prevMagnU16[i] = 0;\n    inst->prevNoiseU32[i] = 0; //previous noise-spectrum\n    inst->logLrtTimeAvgW32[i] = 0; //smooth LR ratio\n    inst->avgMagnPause[i] = 0; //conservative noise spectrum estimate\n    inst->initMagnEst[i] = 0; //initial average magnitude spectrum\n  }\n\n  //feature quantities\n  inst->thresholdSpecDiff = 50; //threshold for difference feature: determined on-line\n  inst->thresholdSpecFlat = 20480; //threshold for flatness: determined on-line\n  inst->featureLogLrt = inst->thresholdLogLrt; //average LRT factor (= threshold)\n  inst->featureSpecFlat = inst->thresholdSpecFlat; //spectral flatness (= threshold)\n  inst->featureSpecDiff = inst->thresholdSpecDiff; //spectral difference (= threshold)\n  inst->weightLogLrt = 6; //default weighting par for LRT feature\n  inst->weightSpecFlat = 0; //default weighting par for spectral flatness feature\n  inst->weightSpecDiff = 0; //default weighting par for spectral difference feature\n\n  inst->curAvgMagnEnergy = 0; //window time-average of input magnitude spectrum\n  inst->timeAvgMagnEnergy = 0; //normalization for spectral difference\n  inst->timeAvgMagnEnergyTmp = 0; //normalization for spectral difference\n\n  //histogram quantities: used to estimate/update thresholds for features\n  WebRtcSpl_ZerosArrayW16(inst->histLrt, HIST_PAR_EST);\n  WebRtcSpl_ZerosArrayW16(inst->histSpecDiff, HIST_PAR_EST);\n  WebRtcSpl_ZerosArrayW16(inst->histSpecFlat, HIST_PAR_EST);\n\n  inst->blockIndex = -1; //frame counter\n\n  //inst->modelUpdate    = 500;   //window for update\n  inst->modelUpdate = (1 << STAT_UPDATES); //window for update\n  inst->cntThresUpdate = 0; //counter feature thresholds updates\n\n  inst->sumMagn = 0;\n  inst->magnEnergy = 0;\n  inst->prevQMagn = 0;\n  inst->qNoise = 0;\n  inst->prevQNoise = 0;\n\n  inst->energyIn = 0;\n  inst->scaleEnergyIn = 0;\n\n  inst->whiteNoiseLevel = 0;\n  inst->pinkNoiseNumerator = 0;\n  inst->pinkNoiseExp = 0;\n  inst->minNorm = 15; // Start with full scale\n  inst->zeroInputSignal = 0;\n\n  //default mode\n  WebRtcNsx_set_policy_core(inst, 0);\n\n#ifdef NS_FILEDEBUG\n  inst->infile = fopen(\"indebug.pcm\", \"wb\");\n  inst->outfile = fopen(\"outdebug.pcm\", \"wb\");\n  inst->file1 = fopen(\"file1.pcm\", \"wb\");\n  inst->file2 = fopen(\"file2.pcm\", \"wb\");\n  inst->file3 = fopen(\"file3.pcm\", \"wb\");\n  inst->file4 = fopen(\"file4.pcm\", \"wb\");\n  inst->file5 = fopen(\"file5.pcm\", \"wb\");\n#endif\n\n  // Initialize function pointers.\n  WebRtcNsx_NoiseEstimation = NoiseEstimationC;\n  WebRtcNsx_PrepareSpectrum = PrepareSpectrumC;\n  WebRtcNsx_SynthesisUpdate = SynthesisUpdateC;\n  WebRtcNsx_AnalysisUpdate = AnalysisUpdateC;\n  WebRtcNsx_Denormalize = DenormalizeC;\n  WebRtcNsx_NormalizeRealBuffer = NormalizeRealBufferC;\n\n#if defined(WEBRTC_HAS_NEON)\n  WebRtcNsx_InitNeon();\n#endif\n\n#if defined(MIPS32_LE)\n  WebRtcNsx_InitMips();\n#endif\n\n  inst->initFlag = 1;\n\n  return 0;\n}\n\nint WebRtcNsx_set_policy_core(NoiseSuppressionFixedC* inst, int mode) {\n  // allow for modes:0,1,2,3\n  if (mode < 0 || mode > 3) {\n    return -1;\n  }\n\n  inst->aggrMode = mode;\n  if (mode == 0) {\n    inst->overdrive = 256; // Q8(1.0)\n    inst->denoiseBound = 8192; // Q14(0.5)\n    inst->gainMap = 0; // No gain compensation\n  } else if (mode == 1) {\n    inst->overdrive = 256; // Q8(1.0)\n    inst->denoiseBound = 4096; // Q14(0.25)\n    inst->factor2Table = kFactor2Aggressiveness1;\n    inst->gainMap = 1;\n  } else if (mode == 2) {\n    inst->overdrive = 282; // ~= Q8(1.1)\n    inst->denoiseBound = 2048; // Q14(0.125)\n    inst->factor2Table = kFactor2Aggressiveness2;\n    inst->gainMap = 1;\n  } else if (mode == 3) {\n    inst->overdrive = 320; // Q8(1.25)\n    inst->denoiseBound = 1475; // ~= Q14(0.09)\n    inst->factor2Table = kFactor2Aggressiveness3;\n    inst->gainMap = 1;\n  }\n  return 0;\n}\n\n// Extract thresholds for feature parameters\n// histograms are computed over some window_size (given by window_pars)\n// thresholds and weights are extracted every window\n// flag 0 means update histogram only, flag 1 means compute the thresholds/weights\n// threshold and weights are returned in: inst->priorModelPars\nvoid WebRtcNsx_FeatureParameterExtraction(NoiseSuppressionFixedC* inst,\n                                          int flag) {\n  uint32_t tmpU32;\n  uint32_t histIndex;\n  uint32_t posPeak1SpecFlatFX, posPeak2SpecFlatFX;\n  uint32_t posPeak1SpecDiffFX, posPeak2SpecDiffFX;\n\n  int32_t tmp32;\n  int32_t fluctLrtFX, thresFluctLrtFX;\n  int32_t avgHistLrtFX, avgSquareHistLrtFX, avgHistLrtComplFX;\n\n  int16_t j;\n  int16_t numHistLrt;\n\n  int i;\n  int useFeatureSpecFlat, useFeatureSpecDiff, featureSum;\n  int maxPeak1, maxPeak2;\n  int weightPeak1SpecFlat, weightPeak2SpecFlat;\n  int weightPeak1SpecDiff, weightPeak2SpecDiff;\n\n  //update histograms\n  if (!flag) {\n    // LRT\n    // Type casting to UWord32 is safe since negative values will not be wrapped to larger\n    // values than HIST_PAR_EST\n    histIndex = (uint32_t)(inst->featureLogLrt);\n    if (histIndex < HIST_PAR_EST) {\n      inst->histLrt[histIndex]++;\n    }\n    // Spectral flatness\n    // (inst->featureSpecFlat*20)>>10 = (inst->featureSpecFlat*5)>>8\n    histIndex = (inst->featureSpecFlat * 5) >> 8;\n    if (histIndex < HIST_PAR_EST) {\n      inst->histSpecFlat[histIndex]++;\n    }\n    // Spectral difference\n    histIndex = HIST_PAR_EST;\n    if (inst->timeAvgMagnEnergy > 0) {\n      // Guard against division by zero\n      // If timeAvgMagnEnergy == 0 we have no normalizing statistics and\n      // therefore can't update the histogram\n      histIndex = ((inst->featureSpecDiff * 5) >> inst->stages) /\n          inst->timeAvgMagnEnergy;\n    }\n    if (histIndex < HIST_PAR_EST) {\n      inst->histSpecDiff[histIndex]++;\n    }\n  }\n\n  // extract parameters for speech/noise probability\n  if (flag) {\n    useFeatureSpecDiff = 1;\n    //for LRT feature:\n    // compute the average over inst->featureExtractionParams.rangeAvgHistLrt\n    avgHistLrtFX = 0;\n    avgSquareHistLrtFX = 0;\n    numHistLrt = 0;\n    for (i = 0; i < BIN_SIZE_LRT; i++) {\n      j = (2 * i + 1);\n      tmp32 = inst->histLrt[i] * j;\n      avgHistLrtFX += tmp32;\n      numHistLrt += inst->histLrt[i];\n      avgSquareHistLrtFX += tmp32 * j;\n    }\n    avgHistLrtComplFX = avgHistLrtFX;\n    for (; i < HIST_PAR_EST; i++) {\n      j = (2 * i + 1);\n      tmp32 = inst->histLrt[i] * j;\n      avgHistLrtComplFX += tmp32;\n      avgSquareHistLrtFX += tmp32 * j;\n    }\n    fluctLrtFX = avgSquareHistLrtFX * numHistLrt -\n        avgHistLrtFX * avgHistLrtComplFX;\n    thresFluctLrtFX = THRES_FLUCT_LRT * numHistLrt;\n    // get threshold for LRT feature:\n    tmpU32 = (FACTOR_1_LRT_DIFF * (uint32_t)avgHistLrtFX);\n    if ((fluctLrtFX < thresFluctLrtFX) || (numHistLrt == 0) ||\n        (tmpU32 > (uint32_t)(100 * numHistLrt))) {\n      //very low fluctuation, so likely noise\n      inst->thresholdLogLrt = inst->maxLrt;\n    } else {\n      tmp32 = (int32_t)((tmpU32 << (9 + inst->stages)) / numHistLrt /\n                              25);\n      // check if value is within min/max range\n      inst->thresholdLogLrt = WEBRTC_SPL_SAT(inst->maxLrt,\n                                             tmp32,\n                                             inst->minLrt);\n    }\n    if (fluctLrtFX < thresFluctLrtFX) {\n      // Do not use difference feature if fluctuation of LRT feature is very low:\n      // most likely just noise state\n      useFeatureSpecDiff = 0;\n    }\n\n    // for spectral flatness and spectral difference: compute the main peaks of histogram\n    maxPeak1 = 0;\n    maxPeak2 = 0;\n    posPeak1SpecFlatFX = 0;\n    posPeak2SpecFlatFX = 0;\n    weightPeak1SpecFlat = 0;\n    weightPeak2SpecFlat = 0;\n\n    // peaks for flatness\n    for (i = 0; i < HIST_PAR_EST; i++) {\n      if (inst->histSpecFlat[i] > maxPeak1) {\n        // Found new \"first\" peak\n        maxPeak2 = maxPeak1;\n        weightPeak2SpecFlat = weightPeak1SpecFlat;\n        posPeak2SpecFlatFX = posPeak1SpecFlatFX;\n\n        maxPeak1 = inst->histSpecFlat[i];\n        weightPeak1SpecFlat = inst->histSpecFlat[i];\n        posPeak1SpecFlatFX = (uint32_t)(2 * i + 1);\n      } else if (inst->histSpecFlat[i] > maxPeak2) {\n        // Found new \"second\" peak\n        maxPeak2 = inst->histSpecFlat[i];\n        weightPeak2SpecFlat = inst->histSpecFlat[i];\n        posPeak2SpecFlatFX = (uint32_t)(2 * i + 1);\n      }\n    }\n\n    // for spectral flatness feature\n    useFeatureSpecFlat = 1;\n    // merge the two peaks if they are close\n    if ((posPeak1SpecFlatFX - posPeak2SpecFlatFX < LIM_PEAK_SPACE_FLAT_DIFF)\n        && (weightPeak2SpecFlat * LIM_PEAK_WEIGHT_FLAT_DIFF > weightPeak1SpecFlat)) {\n      weightPeak1SpecFlat += weightPeak2SpecFlat;\n      posPeak1SpecFlatFX = (posPeak1SpecFlatFX + posPeak2SpecFlatFX) >> 1;\n    }\n    //reject if weight of peaks is not large enough, or peak value too small\n    if (weightPeak1SpecFlat < THRES_WEIGHT_FLAT_DIFF || posPeak1SpecFlatFX\n        < THRES_PEAK_FLAT) {\n      useFeatureSpecFlat = 0;\n    } else { // if selected, get the threshold\n      // compute the threshold and check if value is within min/max range\n      inst->thresholdSpecFlat = WEBRTC_SPL_SAT(MAX_FLAT_Q10, FACTOR_2_FLAT_Q10\n                                               * posPeak1SpecFlatFX, MIN_FLAT_Q10); //Q10\n    }\n    // done with flatness feature\n\n    if (useFeatureSpecDiff) {\n      //compute two peaks for spectral difference\n      maxPeak1 = 0;\n      maxPeak2 = 0;\n      posPeak1SpecDiffFX = 0;\n      posPeak2SpecDiffFX = 0;\n      weightPeak1SpecDiff = 0;\n      weightPeak2SpecDiff = 0;\n      // peaks for spectral difference\n      for (i = 0; i < HIST_PAR_EST; i++) {\n        if (inst->histSpecDiff[i] > maxPeak1) {\n          // Found new \"first\" peak\n          maxPeak2 = maxPeak1;\n          weightPeak2SpecDiff = weightPeak1SpecDiff;\n          posPeak2SpecDiffFX = posPeak1SpecDiffFX;\n\n          maxPeak1 = inst->histSpecDiff[i];\n          weightPeak1SpecDiff = inst->histSpecDiff[i];\n          posPeak1SpecDiffFX = (uint32_t)(2 * i + 1);\n        } else if (inst->histSpecDiff[i] > maxPeak2) {\n          // Found new \"second\" peak\n          maxPeak2 = inst->histSpecDiff[i];\n          weightPeak2SpecDiff = inst->histSpecDiff[i];\n          posPeak2SpecDiffFX = (uint32_t)(2 * i + 1);\n        }\n      }\n\n      // merge the two peaks if they are close\n      if ((posPeak1SpecDiffFX - posPeak2SpecDiffFX < LIM_PEAK_SPACE_FLAT_DIFF)\n          && (weightPeak2SpecDiff * LIM_PEAK_WEIGHT_FLAT_DIFF > weightPeak1SpecDiff)) {\n        weightPeak1SpecDiff += weightPeak2SpecDiff;\n        posPeak1SpecDiffFX = (posPeak1SpecDiffFX + posPeak2SpecDiffFX) >> 1;\n      }\n      // get the threshold value and check if value is within min/max range\n      inst->thresholdSpecDiff = WEBRTC_SPL_SAT(MAX_DIFF, FACTOR_1_LRT_DIFF\n                                               * posPeak1SpecDiffFX, MIN_DIFF); //5x bigger\n      //reject if weight of peaks is not large enough\n      if (weightPeak1SpecDiff < THRES_WEIGHT_FLAT_DIFF) {\n        useFeatureSpecDiff = 0;\n      }\n      // done with spectral difference feature\n    }\n\n    // select the weights between the features\n    // inst->priorModelPars[4] is weight for LRT: always selected\n    featureSum = 6 / (1 + useFeatureSpecFlat + useFeatureSpecDiff);\n    inst->weightLogLrt = featureSum;\n    inst->weightSpecFlat = useFeatureSpecFlat * featureSum;\n    inst->weightSpecDiff = useFeatureSpecDiff * featureSum;\n\n    // set histograms to zero for next update\n    WebRtcSpl_ZerosArrayW16(inst->histLrt, HIST_PAR_EST);\n    WebRtcSpl_ZerosArrayW16(inst->histSpecDiff, HIST_PAR_EST);\n    WebRtcSpl_ZerosArrayW16(inst->histSpecFlat, HIST_PAR_EST);\n  }  // end of flag == 1\n}\n\n\n// Compute spectral flatness on input spectrum\n// magn is the magnitude spectrum\n// spectral flatness is returned in inst->featureSpecFlat\nvoid WebRtcNsx_ComputeSpectralFlatness(NoiseSuppressionFixedC* inst,\n                                       uint16_t* magn) {\n  uint32_t tmpU32;\n  uint32_t avgSpectralFlatnessNum, avgSpectralFlatnessDen;\n\n  int32_t tmp32;\n  int32_t currentSpectralFlatness, logCurSpectralFlatness;\n\n  int16_t zeros, frac, intPart;\n\n  size_t i;\n\n  // for flatness\n  avgSpectralFlatnessNum = 0;\n  avgSpectralFlatnessDen = inst->sumMagn - (uint32_t)magn[0]; // Q(normData-stages)\n\n  // compute log of ratio of the geometric to arithmetic mean: check for log(0) case\n  // flatness = exp( sum(log(magn[i]))/N - log(sum(magn[i])/N) )\n  //          = exp( sum(log(magn[i]))/N ) * N / sum(magn[i])\n  //          = 2^( sum(log2(magn[i]))/N - (log2(sum(magn[i])) - log2(N)) ) [This is used]\n  for (i = 1; i < inst->magnLen; i++) {\n    // First bin is excluded from spectrum measures. Number of bins is now a power of 2\n    if (magn[i]) {\n      zeros = WebRtcSpl_NormU32((uint32_t)magn[i]);\n      frac = (int16_t)(((uint32_t)((uint32_t)(magn[i]) << zeros)\n                              & 0x7FFFFFFF) >> 23);\n      // log2(magn(i))\n      RTC_DCHECK_LT(frac, 256);\n      tmpU32 = (uint32_t)(((31 - zeros) << 8)\n                                + WebRtcNsx_kLogTableFrac[frac]); // Q8\n      avgSpectralFlatnessNum += tmpU32; // Q8\n    } else {\n      //if at least one frequency component is zero, treat separately\n      tmpU32 = WEBRTC_SPL_UMUL_32_16(inst->featureSpecFlat, SPECT_FLAT_TAVG_Q14); // Q24\n      inst->featureSpecFlat -= tmpU32 >> 14;  // Q10\n      return;\n    }\n  }\n  //ratio and inverse log: check for case of log(0)\n  zeros = WebRtcSpl_NormU32(avgSpectralFlatnessDen);\n  frac = (int16_t)(((avgSpectralFlatnessDen << zeros) & 0x7FFFFFFF) >> 23);\n  // log2(avgSpectralFlatnessDen)\n  RTC_DCHECK_LT(frac, 256);\n  tmp32 = (int32_t)(((31 - zeros) << 8) + WebRtcNsx_kLogTableFrac[frac]); // Q8\n  logCurSpectralFlatness = (int32_t)avgSpectralFlatnessNum;\n  logCurSpectralFlatness += ((int32_t)(inst->stages - 1) << (inst->stages + 7)); // Q(8+stages-1)\n  logCurSpectralFlatness -= (tmp32 << (inst->stages - 1));\n  logCurSpectralFlatness <<= (10 - inst->stages);  // Q17\n  tmp32 = (int32_t)(0x00020000 | (WEBRTC_SPL_ABS_W32(logCurSpectralFlatness)\n                                        & 0x0001FFFF)); //Q17\n  intPart = 7 - (logCurSpectralFlatness >> 17);  // Add 7 for output in Q10.\n  if (intPart > 0) {\n    currentSpectralFlatness = tmp32 >> intPart;\n  } else {\n    currentSpectralFlatness = tmp32 << -intPart;\n  }\n\n  //time average update of spectral flatness feature\n  tmp32 = currentSpectralFlatness - (int32_t)inst->featureSpecFlat; // Q10\n  tmp32 *= SPECT_FLAT_TAVG_Q14;  // Q24\n  inst->featureSpecFlat += tmp32 >> 14;  // Q10\n  // done with flatness feature\n}\n\n\n// Compute the difference measure between input spectrum and a template/learned noise spectrum\n// magn_tmp is the input spectrum\n// the reference/template spectrum is  inst->magn_avg_pause[i]\n// returns (normalized) spectral difference in inst->featureSpecDiff\nvoid WebRtcNsx_ComputeSpectralDifference(NoiseSuppressionFixedC* inst,\n                                         uint16_t* magnIn) {\n  // This is to be calculated:\n  // avgDiffNormMagn = var(magnIn) - cov(magnIn, magnAvgPause)^2 / var(magnAvgPause)\n\n  uint32_t tmpU32no1, tmpU32no2;\n  uint32_t varMagnUFX, varPauseUFX, avgDiffNormMagnUFX;\n\n  int32_t tmp32no1, tmp32no2;\n  int32_t avgPauseFX, avgMagnFX, covMagnPauseFX;\n  int32_t maxPause, minPause;\n\n  int16_t tmp16no1;\n\n  size_t i;\n  int norm32, nShifts;\n\n  avgPauseFX = 0;\n  maxPause = 0;\n  minPause = inst->avgMagnPause[0]; // Q(prevQMagn)\n  // compute average quantities\n  for (i = 0; i < inst->magnLen; i++) {\n    // Compute mean of magn_pause\n    avgPauseFX += inst->avgMagnPause[i]; // in Q(prevQMagn)\n    maxPause = WEBRTC_SPL_MAX(maxPause, inst->avgMagnPause[i]);\n    minPause = WEBRTC_SPL_MIN(minPause, inst->avgMagnPause[i]);\n  }\n  // normalize by replacing div of \"inst->magnLen\" with \"inst->stages-1\" shifts\n  avgPauseFX >>= inst->stages - 1;\n  avgMagnFX = inst->sumMagn >> (inst->stages - 1);\n  // Largest possible deviation in magnPause for (co)var calculations\n  tmp32no1 = WEBRTC_SPL_MAX(maxPause - avgPauseFX, avgPauseFX - minPause);\n  // Get number of shifts to make sure we don't get wrap around in varPause\n  nShifts = WEBRTC_SPL_MAX(0, 10 + inst->stages - WebRtcSpl_NormW32(tmp32no1));\n\n  varMagnUFX = 0;\n  varPauseUFX = 0;\n  covMagnPauseFX = 0;\n  for (i = 0; i < inst->magnLen; i++) {\n    // Compute var and cov of magn and magn_pause\n    tmp16no1 = (int16_t)((int32_t)magnIn[i] - avgMagnFX);\n    tmp32no2 = inst->avgMagnPause[i] - avgPauseFX;\n    varMagnUFX += (uint32_t)(tmp16no1 * tmp16no1);  // Q(2*qMagn)\n    tmp32no1 = tmp32no2 * tmp16no1;  // Q(prevQMagn+qMagn)\n    covMagnPauseFX += tmp32no1; // Q(prevQMagn+qMagn)\n    tmp32no1 = tmp32no2 >> nShifts;  // Q(prevQMagn-minPause).\n    varPauseUFX += tmp32no1 * tmp32no1;  // Q(2*(prevQMagn-minPause))\n  }\n  //update of average magnitude spectrum: Q(-2*stages) and averaging replaced by shifts\n  inst->curAvgMagnEnergy +=\n      inst->magnEnergy >> (2 * inst->normData + inst->stages - 1);\n\n  avgDiffNormMagnUFX = varMagnUFX; // Q(2*qMagn)\n  if ((varPauseUFX) && (covMagnPauseFX)) {\n    tmpU32no1 = (uint32_t)WEBRTC_SPL_ABS_W32(covMagnPauseFX); // Q(prevQMagn+qMagn)\n    norm32 = WebRtcSpl_NormU32(tmpU32no1) - 16;\n    if (norm32 > 0) {\n      tmpU32no1 <<= norm32;  // Q(prevQMagn+qMagn+norm32)\n    } else {\n      tmpU32no1 >>= -norm32;  // Q(prevQMagn+qMagn+norm32)\n    }\n    tmpU32no2 = WEBRTC_SPL_UMUL(tmpU32no1, tmpU32no1); // Q(2*(prevQMagn+qMagn-norm32))\n\n    nShifts += norm32;\n    nShifts <<= 1;\n    if (nShifts < 0) {\n      varPauseUFX >>= (-nShifts); // Q(2*(qMagn+norm32+minPause))\n      nShifts = 0;\n    }\n    if (varPauseUFX > 0) {\n      // Q(2*(qMagn+norm32-16+minPause))\n      tmpU32no1 = tmpU32no2 / varPauseUFX;\n      tmpU32no1 >>= nShifts;\n\n      // Q(2*qMagn)\n      avgDiffNormMagnUFX -= WEBRTC_SPL_MIN(avgDiffNormMagnUFX, tmpU32no1);\n    } else {\n      avgDiffNormMagnUFX = 0;\n    }\n  }\n  //normalize and compute time average update of difference feature\n  tmpU32no1 = avgDiffNormMagnUFX >> (2 * inst->normData);\n  if (inst->featureSpecDiff > tmpU32no1) {\n    tmpU32no2 = WEBRTC_SPL_UMUL_32_16(inst->featureSpecDiff - tmpU32no1,\n                                      SPECT_DIFF_TAVG_Q8); // Q(8-2*stages)\n    inst->featureSpecDiff -= tmpU32no2 >> 8;  // Q(-2*stages)\n  } else {\n    tmpU32no2 = WEBRTC_SPL_UMUL_32_16(tmpU32no1 - inst->featureSpecDiff,\n                                      SPECT_DIFF_TAVG_Q8); // Q(8-2*stages)\n    inst->featureSpecDiff += tmpU32no2 >> 8;  // Q(-2*stages)\n  }\n}\n\n// Transform input (speechFrame) to frequency domain magnitude (magnU16)\nvoid WebRtcNsx_DataAnalysis(NoiseSuppressionFixedC* inst,\n                            short* speechFrame,\n                            uint16_t* magnU16) {\n  uint32_t tmpU32no1;\n\n  int32_t   tmp_1_w32 = 0;\n  int32_t   tmp_2_w32 = 0;\n  int32_t   sum_log_magn = 0;\n  int32_t   sum_log_i_log_magn = 0;\n\n  uint16_t  sum_log_magn_u16 = 0;\n  uint16_t  tmp_u16 = 0;\n\n  int16_t   sum_log_i = 0;\n  int16_t   sum_log_i_square = 0;\n  int16_t   frac = 0;\n  int16_t   log2 = 0;\n  int16_t   matrix_determinant = 0;\n  int16_t   maxWinData;\n\n  size_t i, j;\n  int zeros;\n  int net_norm = 0;\n  int right_shifts_in_magnU16 = 0;\n  int right_shifts_in_initMagnEst = 0;\n\n  int16_t winData_buff[ANAL_BLOCKL_MAX * 2 + 16];\n  int16_t realImag_buff[ANAL_BLOCKL_MAX * 2 + 16];\n\n  // Align the structures to 32-byte boundary for the FFT function.\n  int16_t* winData = (int16_t*) (((uintptr_t)winData_buff + 31) & ~31);\n  int16_t* realImag = (int16_t*) (((uintptr_t) realImag_buff + 31) & ~31);\n\n  // Update analysis buffer for lower band, and window data before FFT.\n  WebRtcNsx_AnalysisUpdate(inst, winData, speechFrame);\n\n  // Get input energy\n  inst->energyIn =\n      WebRtcSpl_Energy(winData, inst->anaLen, &inst->scaleEnergyIn);\n\n  // Reset zero input flag\n  inst->zeroInputSignal = 0;\n  // Acquire norm for winData\n  maxWinData = WebRtcSpl_MaxAbsValueW16(winData, inst->anaLen);\n  inst->normData = WebRtcSpl_NormW16(maxWinData);\n  if (maxWinData == 0) {\n    // Treat zero input separately.\n    inst->zeroInputSignal = 1;\n    return;\n  }\n\n  // Determine the net normalization in the frequency domain\n  net_norm = inst->stages - inst->normData;\n  // Track lowest normalization factor and use it to prevent wrap around in shifting\n  right_shifts_in_magnU16 = inst->normData - inst->minNorm;\n  right_shifts_in_initMagnEst = WEBRTC_SPL_MAX(-right_shifts_in_magnU16, 0);\n  inst->minNorm -= right_shifts_in_initMagnEst;\n  right_shifts_in_magnU16 = WEBRTC_SPL_MAX(right_shifts_in_magnU16, 0);\n\n  // create realImag as winData interleaved with zeros (= imag. part), normalize it\n  WebRtcNsx_NormalizeRealBuffer(inst, winData, realImag);\n\n  // FFT output will be in winData[].\n  WebRtcSpl_RealForwardFFT(inst->real_fft, realImag, winData);\n\n  inst->imag[0] = 0; // Q(normData-stages)\n  inst->imag[inst->anaLen2] = 0;\n  inst->real[0] = winData[0]; // Q(normData-stages)\n  inst->real[inst->anaLen2] = winData[inst->anaLen];\n  // Q(2*(normData-stages))\n  inst->magnEnergy = (uint32_t)(inst->real[0] * inst->real[0]);\n  inst->magnEnergy += (uint32_t)(inst->real[inst->anaLen2] *\n                                 inst->real[inst->anaLen2]);\n  magnU16[0] = (uint16_t)WEBRTC_SPL_ABS_W16(inst->real[0]); // Q(normData-stages)\n  magnU16[inst->anaLen2] = (uint16_t)WEBRTC_SPL_ABS_W16(inst->real[inst->anaLen2]);\n  inst->sumMagn = (uint32_t)magnU16[0]; // Q(normData-stages)\n  inst->sumMagn += (uint32_t)magnU16[inst->anaLen2];\n\n  if (inst->blockIndex >= END_STARTUP_SHORT) {\n    for (i = 1, j = 2; i < inst->anaLen2; i += 1, j += 2) {\n      inst->real[i] = winData[j];\n      inst->imag[i] = -winData[j + 1];\n      // magnitude spectrum\n      // energy in Q(2*(normData-stages))\n      tmpU32no1 = (uint32_t)(winData[j] * winData[j]);\n      tmpU32no1 += (uint32_t)(winData[j + 1] * winData[j + 1]);\n      inst->magnEnergy += tmpU32no1; // Q(2*(normData-stages))\n\n      magnU16[i] = (uint16_t)WebRtcSpl_SqrtFloor(tmpU32no1); // Q(normData-stages)\n      inst->sumMagn += (uint32_t)magnU16[i]; // Q(normData-stages)\n    }\n  } else {\n    //\n    // Gather information during startup for noise parameter estimation\n    //\n\n    // Switch initMagnEst to Q(minNorm-stages)\n    inst->initMagnEst[0] >>= right_shifts_in_initMagnEst;\n    inst->initMagnEst[inst->anaLen2] >>= right_shifts_in_initMagnEst;\n\n    // Update initMagnEst with magnU16 in Q(minNorm-stages).\n    inst->initMagnEst[0] += magnU16[0] >> right_shifts_in_magnU16;\n    inst->initMagnEst[inst->anaLen2] +=\n        magnU16[inst->anaLen2] >> right_shifts_in_magnU16;\n\n    log2 = 0;\n    if (magnU16[inst->anaLen2]) {\n      // Calculate log2(magnU16[inst->anaLen2])\n      zeros = WebRtcSpl_NormU32((uint32_t)magnU16[inst->anaLen2]);\n      frac = (int16_t)((((uint32_t)magnU16[inst->anaLen2] << zeros) &\n                              0x7FFFFFFF) >> 23); // Q8\n      // log2(magnU16(i)) in Q8\n      RTC_DCHECK_LT(frac, 256);\n      log2 = (int16_t)(((31 - zeros) << 8) + WebRtcNsx_kLogTableFrac[frac]);\n    }\n\n    sum_log_magn = (int32_t)log2; // Q8\n    // sum_log_i_log_magn in Q17\n    sum_log_i_log_magn = (kLogIndex[inst->anaLen2] * log2) >> 3;\n\n    for (i = 1, j = 2; i < inst->anaLen2; i += 1, j += 2) {\n      inst->real[i] = winData[j];\n      inst->imag[i] = -winData[j + 1];\n      // magnitude spectrum\n      // energy in Q(2*(normData-stages))\n      tmpU32no1 = (uint32_t)(winData[j] * winData[j]);\n      tmpU32no1 += (uint32_t)(winData[j + 1] * winData[j + 1]);\n      inst->magnEnergy += tmpU32no1; // Q(2*(normData-stages))\n\n      magnU16[i] = (uint16_t)WebRtcSpl_SqrtFloor(tmpU32no1); // Q(normData-stages)\n      inst->sumMagn += (uint32_t)magnU16[i]; // Q(normData-stages)\n\n      // Switch initMagnEst to Q(minNorm-stages)\n      inst->initMagnEst[i] >>= right_shifts_in_initMagnEst;\n\n      // Update initMagnEst with magnU16 in Q(minNorm-stages).\n      inst->initMagnEst[i] += magnU16[i] >> right_shifts_in_magnU16;\n\n      if (i >= kStartBand) {\n        // For pink noise estimation. Collect data neglecting lower frequency band\n        log2 = 0;\n        if (magnU16[i]) {\n          zeros = WebRtcSpl_NormU32((uint32_t)magnU16[i]);\n          frac = (int16_t)((((uint32_t)magnU16[i] << zeros) &\n                                  0x7FFFFFFF) >> 23);\n          // log2(magnU16(i)) in Q8\n          RTC_DCHECK_LT(frac, 256);\n          log2 = (int16_t)(((31 - zeros) << 8)\n                                 + WebRtcNsx_kLogTableFrac[frac]);\n        }\n        sum_log_magn += (int32_t)log2; // Q8\n        // sum_log_i_log_magn in Q17\n        sum_log_i_log_magn += (kLogIndex[i] * log2) >> 3;\n      }\n    }\n\n    //\n    //compute simplified noise model during startup\n    //\n\n    // Estimate White noise\n\n    // Switch whiteNoiseLevel to Q(minNorm-stages)\n    inst->whiteNoiseLevel >>= right_shifts_in_initMagnEst;\n\n    // Update the average magnitude spectrum, used as noise estimate.\n    tmpU32no1 = WEBRTC_SPL_UMUL_32_16(inst->sumMagn, inst->overdrive);\n    tmpU32no1 >>= inst->stages + 8;\n\n    // Replacing division above with 'stages' shifts\n    // Shift to same Q-domain as whiteNoiseLevel\n    tmpU32no1 >>= right_shifts_in_magnU16;\n    // This operation is safe from wrap around as long as END_STARTUP_SHORT < 128\n    RTC_DCHECK_LT(END_STARTUP_SHORT, 128);\n    inst->whiteNoiseLevel += tmpU32no1; // Q(minNorm-stages)\n\n    // Estimate Pink noise parameters\n    // Denominator used in both parameter estimates.\n    // The value is only dependent on the size of the frequency band (kStartBand)\n    // and to reduce computational complexity stored in a table (kDeterminantEstMatrix[])\n    RTC_DCHECK_LT(kStartBand, 66);\n    matrix_determinant = kDeterminantEstMatrix[kStartBand]; // Q0\n    sum_log_i = kSumLogIndex[kStartBand]; // Q5\n    sum_log_i_square = kSumSquareLogIndex[kStartBand]; // Q2\n    if (inst->fs == 8000) {\n      // Adjust values to shorter blocks in narrow band.\n      tmp_1_w32 = (int32_t)matrix_determinant;\n      tmp_1_w32 += (kSumLogIndex[65] * sum_log_i) >> 9;\n      tmp_1_w32 -= (kSumLogIndex[65] * kSumLogIndex[65]) >> 10;\n      tmp_1_w32 -= (int32_t)sum_log_i_square << 4;\n      tmp_1_w32 -= ((inst->magnLen - kStartBand) * kSumSquareLogIndex[65]) >> 2;\n      matrix_determinant = (int16_t)tmp_1_w32;\n      sum_log_i -= kSumLogIndex[65]; // Q5\n      sum_log_i_square -= kSumSquareLogIndex[65]; // Q2\n    }\n\n    // Necessary number of shifts to fit sum_log_magn in a word16\n    zeros = 16 - WebRtcSpl_NormW32(sum_log_magn);\n    if (zeros < 0) {\n      zeros = 0;\n    }\n    tmp_1_w32 = sum_log_magn << 1;  // Q9\n    sum_log_magn_u16 = (uint16_t)(tmp_1_w32 >> zeros);  // Q(9-zeros).\n\n    // Calculate and update pinkNoiseNumerator. Result in Q11.\n    tmp_2_w32 = WEBRTC_SPL_MUL_16_U16(sum_log_i_square, sum_log_magn_u16); // Q(11-zeros)\n    tmpU32no1 = sum_log_i_log_magn >> 12;  // Q5\n\n    // Shift the largest value of sum_log_i and tmp32no3 before multiplication\n    tmp_u16 = ((uint16_t)sum_log_i << 1);  // Q6\n    if ((uint32_t)sum_log_i > tmpU32no1) {\n      tmp_u16 >>= zeros;\n    } else {\n      tmpU32no1 >>= zeros;\n    }\n    tmp_2_w32 -= (int32_t)WEBRTC_SPL_UMUL_32_16(tmpU32no1, tmp_u16); // Q(11-zeros)\n    matrix_determinant >>= zeros;  // Q(-zeros)\n    tmp_2_w32 = WebRtcSpl_DivW32W16(tmp_2_w32, matrix_determinant); // Q11\n    tmp_2_w32 += (int32_t)net_norm << 11;  // Q11\n    if (tmp_2_w32 < 0) {\n      tmp_2_w32 = 0;\n    }\n    inst->pinkNoiseNumerator += tmp_2_w32; // Q11\n\n    // Calculate and update pinkNoiseExp. Result in Q14.\n    tmp_2_w32 = WEBRTC_SPL_MUL_16_U16(sum_log_i, sum_log_magn_u16); // Q(14-zeros)\n    tmp_1_w32 = sum_log_i_log_magn >> (3 + zeros);\n    tmp_1_w32 *= inst->magnLen - kStartBand;\n    tmp_2_w32 -= tmp_1_w32; // Q(14-zeros)\n    if (tmp_2_w32 > 0) {\n      // If the exponential parameter is negative force it to zero, which means a\n      // flat spectrum.\n      tmp_1_w32 = WebRtcSpl_DivW32W16(tmp_2_w32, matrix_determinant); // Q14\n      inst->pinkNoiseExp += WEBRTC_SPL_SAT(16384, tmp_1_w32, 0); // Q14\n    }\n  }\n}\n\nvoid WebRtcNsx_DataSynthesis(NoiseSuppressionFixedC* inst, short* outFrame) {\n  int32_t energyOut;\n\n  int16_t realImag_buff[ANAL_BLOCKL_MAX * 2 + 16];\n  int16_t rfft_out_buff[ANAL_BLOCKL_MAX * 2 + 16];\n\n  // Align the structures to 32-byte boundary for the FFT function.\n  int16_t* realImag = (int16_t*) (((uintptr_t)realImag_buff + 31) & ~31);\n  int16_t* rfft_out = (int16_t*) (((uintptr_t) rfft_out_buff + 31) & ~31);\n\n  int16_t tmp16no1, tmp16no2;\n  int16_t energyRatio;\n  int16_t gainFactor, gainFactor1, gainFactor2;\n\n  size_t i;\n  int outCIFFT;\n  int scaleEnergyOut = 0;\n\n  if (inst->zeroInputSignal) {\n    // synthesize the special case of zero input\n    // read out fully processed segment\n    for (i = 0; i < inst->blockLen10ms; i++) {\n      outFrame[i] = inst->synthesisBuffer[i]; // Q0\n    }\n    // update synthesis buffer\n    memcpy(inst->synthesisBuffer, inst->synthesisBuffer + inst->blockLen10ms,\n        (inst->anaLen - inst->blockLen10ms) * sizeof(*inst->synthesisBuffer));\n    WebRtcSpl_ZerosArrayW16(inst->synthesisBuffer + inst->anaLen - inst->blockLen10ms,\n                            inst->blockLen10ms);\n    return;\n  }\n\n  // Filter the data in the frequency domain, and create spectrum.\n  WebRtcNsx_PrepareSpectrum(inst, realImag);\n\n  // Inverse FFT output will be in rfft_out[].\n  outCIFFT = WebRtcSpl_RealInverseFFT(inst->real_fft, realImag, rfft_out);\n\n  WebRtcNsx_Denormalize(inst, rfft_out, outCIFFT);\n\n  //scale factor: only do it after END_STARTUP_LONG time\n  gainFactor = 8192; // 8192 = Q13(1.0)\n  if (inst->gainMap == 1 &&\n      inst->blockIndex > END_STARTUP_LONG &&\n      inst->energyIn > 0) {\n    // Q(-scaleEnergyOut)\n    energyOut = WebRtcSpl_Energy(inst->real, inst->anaLen, &scaleEnergyOut);\n    if (scaleEnergyOut == 0 && !(energyOut & 0x7f800000)) {\n      energyOut = WEBRTC_SPL_SHIFT_W32(energyOut, 8 + scaleEnergyOut\n                                       - inst->scaleEnergyIn);\n    } else {\n      // |energyIn| is currently in Q(|scaleEnergyIn|), but to later on end up\n      // with an |energyRatio| in Q8 we need to change the Q-domain to\n      // Q(-8-scaleEnergyOut).\n      inst->energyIn >>= 8 + scaleEnergyOut - inst->scaleEnergyIn;\n    }\n\n    RTC_DCHECK_GT(inst->energyIn, 0);\n    energyRatio = (energyOut + inst->energyIn / 2) / inst->energyIn;  // Q8\n    // Limit the ratio to [0, 1] in Q8, i.e., [0, 256]\n    energyRatio = WEBRTC_SPL_SAT(256, energyRatio, 0);\n\n    // all done in lookup tables now\n    RTC_DCHECK_LT(energyRatio, 257);\n    gainFactor1 = kFactor1Table[energyRatio]; // Q8\n    gainFactor2 = inst->factor2Table[energyRatio]; // Q8\n\n    //combine both scales with speech/noise prob: note prior (priorSpeechProb) is not frequency dependent\n\n    // factor = inst->priorSpeechProb*factor1 + (1.0-inst->priorSpeechProb)*factor2; // original code\n    tmp16no1 = (int16_t)(((16384 - inst->priorNonSpeechProb) * gainFactor1) >>\n        14);  // in Q13, where 16384 = Q14(1.0)\n    tmp16no2 = (int16_t)((inst->priorNonSpeechProb * gainFactor2) >> 14);\n    gainFactor = tmp16no1 + tmp16no2; // Q13\n  }  // out of flag_gain_map==1\n\n  // Synthesis, read out fully processed segment, and update synthesis buffer.\n  WebRtcNsx_SynthesisUpdate(inst, outFrame, gainFactor);\n}\n\nvoid WebRtcNsx_ProcessCore(NoiseSuppressionFixedC* inst,\n                           const short* const* speechFrame,\n                           int num_bands,\n                           short* const* outFrame) {\n  // main routine for noise suppression\n\n  uint32_t tmpU32no1, tmpU32no2, tmpU32no3;\n  uint32_t satMax, maxNoiseU32;\n  uint32_t tmpMagnU32, tmpNoiseU32;\n  uint32_t nearMagnEst;\n  uint32_t noiseUpdateU32;\n  uint32_t noiseU32[HALF_ANAL_BLOCKL];\n  uint32_t postLocSnr[HALF_ANAL_BLOCKL];\n  uint32_t priorLocSnr[HALF_ANAL_BLOCKL];\n  uint32_t prevNearSnr[HALF_ANAL_BLOCKL];\n  uint32_t curNearSnr;\n  uint32_t priorSnr;\n  uint32_t noise_estimate = 0;\n  uint32_t noise_estimate_avg = 0;\n  uint32_t numerator = 0;\n\n  int32_t tmp32no1, tmp32no2;\n  int32_t pink_noise_num_avg = 0;\n\n  uint16_t tmpU16no1;\n  uint16_t magnU16[HALF_ANAL_BLOCKL];\n  uint16_t prevNoiseU16[HALF_ANAL_BLOCKL];\n  uint16_t nonSpeechProbFinal[HALF_ANAL_BLOCKL];\n  uint16_t gammaNoise, prevGammaNoise;\n  uint16_t noiseSupFilterTmp[HALF_ANAL_BLOCKL];\n\n  int16_t qMagn, qNoise;\n  int16_t avgProbSpeechHB, gainModHB, avgFilterGainHB, gainTimeDomainHB;\n  int16_t pink_noise_exp_avg = 0;\n\n  size_t i, j;\n  int nShifts, postShifts;\n  int norm32no1, norm32no2;\n  int flag, sign;\n  int q_domain_to_use = 0;\n\n  // Code for ARMv7-Neon platform assumes the following:\n  RTC_DCHECK_GT(inst->anaLen, 0);\n  RTC_DCHECK_GT(inst->anaLen2, 0);\n  RTC_DCHECK_EQ(0, inst->anaLen % 16);\n  RTC_DCHECK_EQ(0, inst->anaLen2 % 8);\n  RTC_DCHECK_GT(inst->blockLen10ms, 0);\n  RTC_DCHECK_EQ(0, inst->blockLen10ms % 16);\n  RTC_DCHECK_EQ(inst->magnLen, inst->anaLen2 + 1);\n\n#ifdef NS_FILEDEBUG\n  if (fwrite(spframe, sizeof(short),\n             inst->blockLen10ms, inst->infile) != inst->blockLen10ms) {\n    RTC_DCHECK(false);\n  }\n#endif\n\n  // Check that initialization has been done\n  RTC_DCHECK_EQ(1, inst->initFlag);\n  RTC_DCHECK_LE(num_bands - 1, NUM_HIGH_BANDS_MAX);\n\n  const short* const* speechFrameHB = NULL;\n  short* const* outFrameHB = NULL;\n  size_t num_high_bands = 0;\n  if (num_bands > 1) {\n    speechFrameHB = &speechFrame[1];\n    outFrameHB = &outFrame[1];\n    num_high_bands = (size_t)(num_bands - 1);\n  }\n\n  // Store speechFrame and transform to frequency domain\n  WebRtcNsx_DataAnalysis(inst, (short*)speechFrame[0], magnU16);\n\n  if (inst->zeroInputSignal) {\n    WebRtcNsx_DataSynthesis(inst, outFrame[0]);\n\n    if (num_bands > 1) {\n      // update analysis buffer for H band\n      // append new data to buffer FX\n      for (i = 0; i < num_high_bands; ++i) {\n        int block_shift = inst->anaLen - inst->blockLen10ms;\n        memcpy(inst->dataBufHBFX[i], inst->dataBufHBFX[i] + inst->blockLen10ms,\n            block_shift * sizeof(*inst->dataBufHBFX[i]));\n        memcpy(inst->dataBufHBFX[i] + block_shift, speechFrameHB[i],\n            inst->blockLen10ms * sizeof(*inst->dataBufHBFX[i]));\n        for (j = 0; j < inst->blockLen10ms; j++) {\n          outFrameHB[i][j] = inst->dataBufHBFX[i][j]; // Q0\n        }\n      }\n    }  // end of H band gain computation\n    return;\n  }\n\n  // Update block index when we have something to process\n  inst->blockIndex++;\n  //\n\n  // Norm of magn\n  qMagn = inst->normData - inst->stages;\n\n  // Compute spectral flatness on input spectrum\n  WebRtcNsx_ComputeSpectralFlatness(inst, magnU16);\n\n  // quantile noise estimate\n  WebRtcNsx_NoiseEstimation(inst, magnU16, noiseU32, &qNoise);\n\n  //noise estimate from previous frame\n  for (i = 0; i < inst->magnLen; i++) {\n    prevNoiseU16[i] = (uint16_t)(inst->prevNoiseU32[i] >> 11);  // Q(prevQNoise)\n  }\n\n  if (inst->blockIndex < END_STARTUP_SHORT) {\n    // Noise Q-domain to be used later; see description at end of section.\n    q_domain_to_use = WEBRTC_SPL_MIN((int)qNoise, inst->minNorm - inst->stages);\n\n    // Calculate frequency independent parts in parametric noise estimate and calculate\n    // the estimate for the lower frequency band (same values for all frequency bins)\n    if (inst->pinkNoiseExp) {\n      pink_noise_exp_avg = (int16_t)WebRtcSpl_DivW32W16(inst->pinkNoiseExp,\n                                                              (int16_t)(inst->blockIndex + 1)); // Q14\n      pink_noise_num_avg = WebRtcSpl_DivW32W16(inst->pinkNoiseNumerator,\n                                               (int16_t)(inst->blockIndex + 1)); // Q11\n      WebRtcNsx_CalcParametricNoiseEstimate(inst,\n                                            pink_noise_exp_avg,\n                                            pink_noise_num_avg,\n                                            kStartBand,\n                                            &noise_estimate,\n                                            &noise_estimate_avg);\n    } else {\n      // Use white noise estimate if we have poor pink noise parameter estimates\n      noise_estimate = inst->whiteNoiseLevel; // Q(minNorm-stages)\n      noise_estimate_avg = noise_estimate / (inst->blockIndex + 1); // Q(minNorm-stages)\n    }\n    for (i = 0; i < inst->magnLen; i++) {\n      // Estimate the background noise using the pink noise parameters if permitted\n      if ((inst->pinkNoiseExp) && (i >= kStartBand)) {\n        // Reset noise_estimate\n        noise_estimate = 0;\n        noise_estimate_avg = 0;\n        // Calculate the parametric noise estimate for current frequency bin\n        WebRtcNsx_CalcParametricNoiseEstimate(inst,\n                                              pink_noise_exp_avg,\n                                              pink_noise_num_avg,\n                                              i,\n                                              &noise_estimate,\n                                              &noise_estimate_avg);\n      }\n      // Calculate parametric Wiener filter\n      noiseSupFilterTmp[i] = inst->denoiseBound;\n      if (inst->initMagnEst[i]) {\n        // numerator = (initMagnEst - noise_estimate * overdrive)\n        // Result in Q(8+minNorm-stages)\n        tmpU32no1 = WEBRTC_SPL_UMUL_32_16(noise_estimate, inst->overdrive);\n        numerator = inst->initMagnEst[i] << 8;\n        if (numerator > tmpU32no1) {\n          // Suppression filter coefficient larger than zero, so calculate.\n          numerator -= tmpU32no1;\n\n          // Determine number of left shifts in numerator for best accuracy after\n          // division\n          nShifts = WebRtcSpl_NormU32(numerator);\n          nShifts = WEBRTC_SPL_SAT(6, nShifts, 0);\n\n          // Shift numerator to Q(nShifts+8+minNorm-stages)\n          numerator <<= nShifts;\n\n          // Shift denominator to Q(nShifts-6+minNorm-stages)\n          tmpU32no1 = inst->initMagnEst[i] >> (6 - nShifts);\n          if (tmpU32no1 == 0) {\n            // This is only possible if numerator = 0, in which case\n            // we don't need any division.\n            tmpU32no1 = 1;\n          }\n          tmpU32no2 = numerator / tmpU32no1;  // Q14\n          noiseSupFilterTmp[i] = (uint16_t)WEBRTC_SPL_SAT(16384, tmpU32no2,\n              (uint32_t)(inst->denoiseBound)); // Q14\n        }\n      }\n      // Weight quantile noise 'noiseU32' with modeled noise 'noise_estimate_avg'\n      // 'noiseU32 is in Q(qNoise) and 'noise_estimate' in Q(minNorm-stages)\n      // To guarantee that we do not get wrap around when shifting to the same domain\n      // we use the lowest one. Furthermore, we need to save 6 bits for the weighting.\n      // 'noise_estimate_avg' can handle this operation by construction, but 'noiseU32'\n      // may not.\n\n      // Shift 'noiseU32' to 'q_domain_to_use'\n      tmpU32no1 = noiseU32[i] >> (qNoise - q_domain_to_use);\n      // Shift 'noise_estimate_avg' to 'q_domain_to_use'\n      tmpU32no2 = noise_estimate_avg >>\n          (inst->minNorm - inst->stages - q_domain_to_use);\n      // Make a simple check to see if we have enough room for weighting 'tmpU32no1'\n      // without wrap around\n      nShifts = 0;\n      if (tmpU32no1 & 0xfc000000) {\n        tmpU32no1 >>= 6;\n        tmpU32no2 >>= 6;\n        nShifts = 6;\n      }\n      tmpU32no1 *= inst->blockIndex;\n      tmpU32no2 *= (END_STARTUP_SHORT - inst->blockIndex);\n      // Add them together and divide by startup length\n      noiseU32[i] = WebRtcSpl_DivU32U16(tmpU32no1 + tmpU32no2, END_STARTUP_SHORT);\n      // Shift back if necessary\n      noiseU32[i] <<= nShifts;\n    }\n    // Update new Q-domain for 'noiseU32'\n    qNoise = q_domain_to_use;\n  }\n  // compute average signal during END_STARTUP_LONG time:\n  // used to normalize spectral difference measure\n  if (inst->blockIndex < END_STARTUP_LONG) {\n    // substituting division with shift ending up in Q(-2*stages)\n    inst->timeAvgMagnEnergyTmp +=\n        inst->magnEnergy >> (2 * inst->normData + inst->stages - 1);\n    inst->timeAvgMagnEnergy = WebRtcSpl_DivU32U16(inst->timeAvgMagnEnergyTmp,\n                                                  inst->blockIndex + 1);\n  }\n\n  //start processing at frames == converged+1\n  // STEP 1: compute prior and post SNR based on quantile noise estimates\n\n  // compute direct decision (DD) estimate of prior SNR: needed for new method\n  satMax = (uint32_t)1048575;// Largest possible value without getting overflow despite shifting 12 steps\n  postShifts = 6 + qMagn - qNoise;\n  nShifts = 5 - inst->prevQMagn + inst->prevQNoise;\n  for (i = 0; i < inst->magnLen; i++) {\n    // FLOAT:\n    // post SNR\n    // postLocSnr[i] = 0.0;\n    // if (magn[i] > noise[i])\n    // {\n    //   postLocSnr[i] = magn[i] / (noise[i] + 0.0001);\n    // }\n    // // previous post SNR\n    // // previous estimate: based on previous frame with gain filter (smooth is previous filter)\n    //\n    // prevNearSnr[i] = inst->prevMagnU16[i] / (inst->noisePrev[i] + 0.0001) * (inst->smooth[i]);\n    //\n    // // DD estimate is sum of two terms: current estimate and previous estimate\n    // // directed decision update of priorSnr (or we actually store [2*priorSnr+1])\n    //\n    // priorLocSnr[i] = DD_PR_SNR * prevNearSnr[i] + (1.0 - DD_PR_SNR) * (postLocSnr[i] - 1.0);\n\n    // calculate post SNR: output in Q11\n    postLocSnr[i] = 2048; // 1.0 in Q11\n    tmpU32no1 = (uint32_t)magnU16[i] << 6;  // Q(6+qMagn)\n    if (postShifts < 0) {\n      tmpU32no2 = noiseU32[i] >> -postShifts;  // Q(6+qMagn)\n    } else {\n      tmpU32no2 = noiseU32[i] << postShifts;  // Q(6+qMagn)\n    }\n    if (tmpU32no1 > tmpU32no2) {\n      // Current magnitude larger than noise\n      tmpU32no1 <<= 11;  // Q(17+qMagn)\n      if (tmpU32no2 > 0) {\n        tmpU32no1 /= tmpU32no2;  // Q11\n        postLocSnr[i] = WEBRTC_SPL_MIN(satMax, tmpU32no1); // Q11\n      } else {\n        postLocSnr[i] = satMax;\n      }\n    }\n\n    // calculate prevNearSnr[i] and save for later instead of recalculating it later\n    // |nearMagnEst| in Q(prevQMagn + 14)\n    nearMagnEst = inst->prevMagnU16[i] * inst->noiseSupFilter[i];\n    tmpU32no1 = nearMagnEst << 3;  // Q(prevQMagn+17)\n    tmpU32no2 = inst->prevNoiseU32[i] >> nShifts;  // Q(prevQMagn+6)\n\n    if (tmpU32no2 > 0) {\n      tmpU32no1 /= tmpU32no2;  // Q11\n      tmpU32no1 = WEBRTC_SPL_MIN(satMax, tmpU32no1); // Q11\n    } else {\n      tmpU32no1 = satMax; // Q11\n    }\n    prevNearSnr[i] = tmpU32no1; // Q11\n\n    //directed decision update of priorSnr\n    tmpU32no1 = WEBRTC_SPL_UMUL_32_16(prevNearSnr[i], DD_PR_SNR_Q11); // Q22\n    tmpU32no2 = WEBRTC_SPL_UMUL_32_16(postLocSnr[i] - 2048, ONE_MINUS_DD_PR_SNR_Q11); // Q22\n    priorSnr = tmpU32no1 + tmpU32no2 + 512; // Q22 (added 512 for rounding)\n    // priorLocSnr = 1 + 2*priorSnr\n    priorLocSnr[i] = 2048 + (priorSnr >> 10);  // Q11\n  }  // end of loop over frequencies\n  // done with step 1: DD computation of prior and post SNR\n\n  // STEP 2: compute speech/noise likelihood\n\n  //compute difference of input spectrum with learned/estimated noise spectrum\n  WebRtcNsx_ComputeSpectralDifference(inst, magnU16);\n  //compute histograms for determination of parameters (thresholds and weights for features)\n  //parameters are extracted once every window time (=inst->modelUpdate)\n  //counter update\n  inst->cntThresUpdate++;\n  flag = (int)(inst->cntThresUpdate == inst->modelUpdate);\n  //update histogram\n  WebRtcNsx_FeatureParameterExtraction(inst, flag);\n  //compute model parameters\n  if (flag) {\n    inst->cntThresUpdate = 0; // Reset counter\n    //update every window:\n    // get normalization for spectral difference for next window estimate\n\n    // Shift to Q(-2*stages)\n    inst->curAvgMagnEnergy >>= STAT_UPDATES;\n\n    tmpU32no1 = (inst->curAvgMagnEnergy + inst->timeAvgMagnEnergy + 1) >> 1; //Q(-2*stages)\n    // Update featureSpecDiff\n    if ((tmpU32no1 != inst->timeAvgMagnEnergy) && (inst->featureSpecDiff) &&\n        (inst->timeAvgMagnEnergy > 0)) {\n      norm32no1 = 0;\n      tmpU32no3 = tmpU32no1;\n      while (0xFFFF0000 & tmpU32no3) {\n        tmpU32no3 >>= 1;\n        norm32no1++;\n      }\n      tmpU32no2 = inst->featureSpecDiff;\n      while (0xFFFF0000 & tmpU32no2) {\n        tmpU32no2 >>= 1;\n        norm32no1++;\n      }\n      tmpU32no3 = WEBRTC_SPL_UMUL(tmpU32no3, tmpU32no2);\n      tmpU32no3 /= inst->timeAvgMagnEnergy;\n      if (WebRtcSpl_NormU32(tmpU32no3) < norm32no1) {\n        inst->featureSpecDiff = 0x007FFFFF;\n      } else {\n        inst->featureSpecDiff = WEBRTC_SPL_MIN(0x007FFFFF,\n                                               tmpU32no3 << norm32no1);\n      }\n    }\n\n    inst->timeAvgMagnEnergy = tmpU32no1; // Q(-2*stages)\n    inst->curAvgMagnEnergy = 0;\n  }\n\n  //compute speech/noise probability\n  WebRtcNsx_SpeechNoiseProb(inst, nonSpeechProbFinal, priorLocSnr, postLocSnr);\n\n  //time-avg parameter for noise update\n  gammaNoise = NOISE_UPDATE_Q8; // Q8\n\n  maxNoiseU32 = 0;\n  postShifts = inst->prevQNoise - qMagn;\n  nShifts = inst->prevQMagn - qMagn;\n  for (i = 0; i < inst->magnLen; i++) {\n    // temporary noise update: use it for speech frames if update value is less than previous\n    // the formula has been rewritten into:\n    // noiseUpdate = noisePrev[i] + (1 - gammaNoise) * nonSpeechProb * (magn[i] - noisePrev[i])\n\n    if (postShifts < 0) {\n      tmpU32no2 = magnU16[i] >> -postShifts;  // Q(prevQNoise)\n    } else {\n      tmpU32no2 = (uint32_t)magnU16[i] << postShifts;  // Q(prevQNoise)\n    }\n    if (prevNoiseU16[i] > tmpU32no2) {\n      sign = -1;\n      tmpU32no1 = prevNoiseU16[i] - tmpU32no2;\n    } else {\n      sign = 1;\n      tmpU32no1 = tmpU32no2 - prevNoiseU16[i];\n    }\n    noiseUpdateU32 = inst->prevNoiseU32[i]; // Q(prevQNoise+11)\n    tmpU32no3 = 0;\n    if ((tmpU32no1) && (nonSpeechProbFinal[i])) {\n      // This value will be used later, if gammaNoise changes\n      tmpU32no3 = WEBRTC_SPL_UMUL_32_16(tmpU32no1, nonSpeechProbFinal[i]); // Q(prevQNoise+8)\n      if (0x7c000000 & tmpU32no3) {\n        // Shifting required before multiplication\n        tmpU32no2 = (tmpU32no3 >> 5) * gammaNoise;  // Q(prevQNoise+11)\n      } else {\n        // We can do shifting after multiplication\n        tmpU32no2 = (tmpU32no3 * gammaNoise) >> 5;  // Q(prevQNoise+11)\n      }\n      if (sign > 0) {\n        noiseUpdateU32 += tmpU32no2; // Q(prevQNoise+11)\n      } else {\n        // This operation is safe. We can never get wrap around, since worst\n        // case scenario means magnU16 = 0\n        noiseUpdateU32 -= tmpU32no2; // Q(prevQNoise+11)\n      }\n    }\n\n    //increase gamma (i.e., less noise update) for frame likely to be speech\n    prevGammaNoise = gammaNoise;\n    gammaNoise = NOISE_UPDATE_Q8;\n    //time-constant based on speech/noise state\n    //increase gamma (i.e., less noise update) for frames likely to be speech\n    if (nonSpeechProbFinal[i] < ONE_MINUS_PROB_RANGE_Q8) {\n      gammaNoise = GAMMA_NOISE_TRANS_AND_SPEECH_Q8;\n    }\n\n    if (prevGammaNoise != gammaNoise) {\n      // new noise update\n      // this line is the same as above, only that the result is stored in a different variable and the gammaNoise\n      // has changed\n      //\n      // noiseUpdate = noisePrev[i] + (1 - gammaNoise) * nonSpeechProb * (magn[i] - noisePrev[i])\n\n      if (0x7c000000 & tmpU32no3) {\n        // Shifting required before multiplication\n        tmpU32no2 = (tmpU32no3 >> 5) * gammaNoise;  // Q(prevQNoise+11)\n      } else {\n        // We can do shifting after multiplication\n        tmpU32no2 = (tmpU32no3 * gammaNoise) >> 5;  // Q(prevQNoise+11)\n      }\n      if (sign > 0) {\n        tmpU32no1 = inst->prevNoiseU32[i] + tmpU32no2; // Q(prevQNoise+11)\n      } else {\n        tmpU32no1 = inst->prevNoiseU32[i] - tmpU32no2; // Q(prevQNoise+11)\n      }\n      if (noiseUpdateU32 > tmpU32no1) {\n        noiseUpdateU32 = tmpU32no1; // Q(prevQNoise+11)\n      }\n    }\n    noiseU32[i] = noiseUpdateU32; // Q(prevQNoise+11)\n    if (noiseUpdateU32 > maxNoiseU32) {\n      maxNoiseU32 = noiseUpdateU32;\n    }\n\n    // conservative noise update\n    // // original FLOAT code\n    // if (prob_speech < PROB_RANGE) {\n    // inst->avgMagnPause[i] = inst->avgMagnPause[i] + (1.0 - gamma_pause)*(magn[i] - inst->avgMagnPause[i]);\n    // }\n\n    tmp32no2 = WEBRTC_SPL_SHIFT_W32(inst->avgMagnPause[i], -nShifts);\n    if (nonSpeechProbFinal[i] > ONE_MINUS_PROB_RANGE_Q8) {\n      if (nShifts < 0) {\n        tmp32no1 = (int32_t)magnU16[i] - tmp32no2; // Q(qMagn)\n        tmp32no1 *= ONE_MINUS_GAMMA_PAUSE_Q8;  // Q(8+prevQMagn+nShifts)\n        tmp32no1 = (tmp32no1 + 128) >> 8;  // Q(qMagn).\n      } else {\n        // In Q(qMagn+nShifts)\n        tmp32no1 = ((int32_t)magnU16[i] << nShifts) - inst->avgMagnPause[i];\n        tmp32no1 *= ONE_MINUS_GAMMA_PAUSE_Q8;  // Q(8+prevQMagn+nShifts)\n        tmp32no1 = (tmp32no1 + (128 << nShifts)) >> (8 + nShifts);  // Q(qMagn).\n      }\n      tmp32no2 += tmp32no1; // Q(qMagn)\n    }\n    inst->avgMagnPause[i] = tmp32no2;\n  }  // end of frequency loop\n\n  norm32no1 = WebRtcSpl_NormU32(maxNoiseU32);\n  qNoise = inst->prevQNoise + norm32no1 - 5;\n  // done with step 2: noise update\n\n  // STEP 3: compute dd update of prior snr and post snr based on new noise estimate\n  nShifts = inst->prevQNoise + 11 - qMagn;\n  for (i = 0; i < inst->magnLen; i++) {\n    // FLOAT code\n    // // post and prior SNR\n    // curNearSnr = 0.0;\n    // if (magn[i] > noise[i])\n    // {\n    // curNearSnr = magn[i] / (noise[i] + 0.0001) - 1.0;\n    // }\n    // // DD estimate is sum of two terms: current estimate and previous estimate\n    // // directed decision update of snrPrior\n    // snrPrior = DD_PR_SNR * prevNearSnr[i] + (1.0 - DD_PR_SNR) * curNearSnr;\n    // // gain filter\n    // tmpFloat1 = inst->overdrive + snrPrior;\n    // tmpFloat2 = snrPrior / tmpFloat1;\n    // theFilter[i] = tmpFloat2;\n\n    // calculate curNearSnr again, this is necessary because a new noise estimate has been made since then. for the original\n    curNearSnr = 0; // Q11\n    if (nShifts < 0) {\n      // This case is equivalent with magn < noise which implies curNearSnr = 0;\n      tmpMagnU32 = (uint32_t)magnU16[i]; // Q(qMagn)\n      tmpNoiseU32 = noiseU32[i] << -nShifts;  // Q(qMagn)\n    } else if (nShifts > 17) {\n      tmpMagnU32 = (uint32_t)magnU16[i] << 17;  // Q(qMagn+17)\n      tmpNoiseU32 = noiseU32[i] >> (nShifts - 17);  // Q(qMagn+17)\n    } else {\n      tmpMagnU32 = (uint32_t)magnU16[i] << nShifts;  // Q(qNoise_prev+11)\n      tmpNoiseU32 = noiseU32[i]; // Q(qNoise_prev+11)\n    }\n    if (tmpMagnU32 > tmpNoiseU32) {\n      tmpU32no1 = tmpMagnU32 - tmpNoiseU32; // Q(qCur)\n      norm32no2 = WEBRTC_SPL_MIN(11, WebRtcSpl_NormU32(tmpU32no1));\n      tmpU32no1 <<= norm32no2;  // Q(qCur+norm32no2)\n      tmpU32no2 = tmpNoiseU32 >> (11 - norm32no2);  // Q(qCur+norm32no2-11)\n      if (tmpU32no2 > 0) {\n        tmpU32no1 /= tmpU32no2;  // Q11\n      }\n      curNearSnr = WEBRTC_SPL_MIN(satMax, tmpU32no1); // Q11\n    }\n\n    //directed decision update of priorSnr\n    // FLOAT\n    // priorSnr = DD_PR_SNR * prevNearSnr + (1.0-DD_PR_SNR) * curNearSnr;\n\n    tmpU32no1 = WEBRTC_SPL_UMUL_32_16(prevNearSnr[i], DD_PR_SNR_Q11); // Q22\n    tmpU32no2 = WEBRTC_SPL_UMUL_32_16(curNearSnr, ONE_MINUS_DD_PR_SNR_Q11); // Q22\n    priorSnr = tmpU32no1 + tmpU32no2; // Q22\n\n    //gain filter\n    tmpU32no1 = inst->overdrive + ((priorSnr + 8192) >> 14);  // Q8\n    RTC_DCHECK_GT(inst->overdrive, 0);\n    tmpU16no1 = (priorSnr + tmpU32no1 / 2) / tmpU32no1;  // Q14\n    inst->noiseSupFilter[i] = WEBRTC_SPL_SAT(16384, tmpU16no1, inst->denoiseBound); // 16384 = Q14(1.0) // Q14\n\n    // Weight in the parametric Wiener filter during startup\n    if (inst->blockIndex < END_STARTUP_SHORT) {\n      // Weight the two suppression filters\n      tmpU32no1 = inst->noiseSupFilter[i] * inst->blockIndex;\n      tmpU32no2 = noiseSupFilterTmp[i] *\n          (END_STARTUP_SHORT - inst->blockIndex);\n      tmpU32no1 += tmpU32no2;\n      inst->noiseSupFilter[i] = (uint16_t)WebRtcSpl_DivU32U16(tmpU32no1,\n                                                                    END_STARTUP_SHORT);\n    }\n  }  // end of loop over frequencies\n  //done with step3\n\n  // save noise and magnitude spectrum for next frame\n  inst->prevQNoise = qNoise;\n  inst->prevQMagn = qMagn;\n  if (norm32no1 > 5) {\n    for (i = 0; i < inst->magnLen; i++) {\n      inst->prevNoiseU32[i] = noiseU32[i] << (norm32no1 - 5);  // Q(qNoise+11)\n      inst->prevMagnU16[i] = magnU16[i]; // Q(qMagn)\n    }\n  } else {\n    for (i = 0; i < inst->magnLen; i++) {\n      inst->prevNoiseU32[i] = noiseU32[i] >> (5 - norm32no1);  // Q(qNoise+11)\n      inst->prevMagnU16[i] = magnU16[i]; // Q(qMagn)\n    }\n  }\n\n  WebRtcNsx_DataSynthesis(inst, outFrame[0]);\n#ifdef NS_FILEDEBUG\n  if (fwrite(outframe, sizeof(short),\n             inst->blockLen10ms, inst->outfile) != inst->blockLen10ms) {\n    RTC_DCHECK(false);\n  }\n#endif\n\n  //for H band:\n  // only update data buffer, then apply time-domain gain is applied derived from L band\n  if (num_bands > 1) {\n    // update analysis buffer for H band\n    // append new data to buffer FX\n    for (i = 0; i < num_high_bands; ++i) {\n      memcpy(inst->dataBufHBFX[i], inst->dataBufHBFX[i] + inst->blockLen10ms,\n          (inst->anaLen - inst->blockLen10ms) * sizeof(*inst->dataBufHBFX[i]));\n      memcpy(inst->dataBufHBFX[i] + inst->anaLen - inst->blockLen10ms,\n          speechFrameHB[i], inst->blockLen10ms * sizeof(*inst->dataBufHBFX[i]));\n    }\n    // range for averaging low band quantities for H band gain\n\n    gainTimeDomainHB = 16384; // 16384 = Q14(1.0)\n    //average speech prob from low band\n    //average filter gain from low band\n    //avg over second half (i.e., 4->8kHz) of freq. spectrum\n    tmpU32no1 = 0; // Q12\n    tmpU16no1 = 0; // Q8\n    for (i = inst->anaLen2 - (inst->anaLen2 >> 2); i < inst->anaLen2; i++) {\n      tmpU16no1 += nonSpeechProbFinal[i]; // Q8\n      tmpU32no1 += (uint32_t)(inst->noiseSupFilter[i]); // Q14\n    }\n    RTC_DCHECK_GE(inst->stages, 7);\n    avgProbSpeechHB = (4096 - (tmpU16no1 >> (inst->stages - 7)));  // Q12\n    avgFilterGainHB = (int16_t)(tmpU32no1 >> (inst->stages - 3));  // Q14\n\n    // // original FLOAT code\n    // // gain based on speech probability:\n    // avg_prob_speech_tt=(float)2.0*avg_prob_speech-(float)1.0;\n    // gain_mod=(float)0.5*((float)1.0+(float)tanh(avg_prob_speech_tt)); // between 0 and 1\n\n    // gain based on speech probability:\n    // original expression: \"0.5 * (1 + tanh(2x-1))\"\n    // avgProbSpeechHB has been anyway saturated to a value between 0 and 1 so the other cases don't have to be dealt with\n    // avgProbSpeechHB and gainModHB are in Q12, 3607 = Q12(0.880615234375) which is a zero point of\n    // |0.5 * (1 + tanh(2x-1)) - x| - |0.5 * (1 + tanh(2x-1)) - 0.880615234375| meaning that from that point the error of approximating\n    // the expression with f(x) = x would be greater than the error of approximating the expression with f(x) = 0.880615234375\n    // error: \"|0.5 * (1 + tanh(2x-1)) - x| from x=0 to 0.880615234375\" -> http://www.wolframalpha.com/input/?i=|0.5+*+(1+%2B+tanh(2x-1))+-+x|+from+x%3D0+to+0.880615234375\n    // and:  \"|0.5 * (1 + tanh(2x-1)) - 0.880615234375| from x=0.880615234375 to 1\" -> http://www.wolframalpha.com/input/?i=+|0.5+*+(1+%2B+tanh(2x-1))+-+0.880615234375|+from+x%3D0.880615234375+to+1\n    gainModHB = WEBRTC_SPL_MIN(avgProbSpeechHB, 3607);\n\n    // // original FLOAT code\n    // //combine gain with low band gain\n    // if (avg_prob_speech < (float)0.5) {\n    // gain_time_domain_HB=(float)0.5*gain_mod+(float)0.5*avg_filter_gain;\n    // }\n    // else {\n    // gain_time_domain_HB=(float)0.25*gain_mod+(float)0.75*avg_filter_gain;\n    // }\n\n\n    //combine gain with low band gain\n    if (avgProbSpeechHB < 2048) {\n      // 2048 = Q12(0.5)\n      // the next two lines in float are  \"gain_time_domain = 0.5 * gain_mod + 0.5 * avg_filter_gain\"; Q2(0.5) = 2 equals one left shift\n      gainTimeDomainHB = (gainModHB << 1) + (avgFilterGainHB >> 1); // Q14\n    } else {\n      // \"gain_time_domain = 0.25 * gain_mod + 0.75 * agv_filter_gain;\"\n      gainTimeDomainHB = (int16_t)((3 * avgFilterGainHB) >> 2);  // 3 = Q2(0.75)\n      gainTimeDomainHB += gainModHB; // Q14\n    }\n    //make sure gain is within flooring range\n    gainTimeDomainHB\n      = WEBRTC_SPL_SAT(16384, gainTimeDomainHB, (int16_t)(inst->denoiseBound)); // 16384 = Q14(1.0)\n\n\n    //apply gain\n    for (i = 0; i < num_high_bands; ++i) {\n      for (j = 0; j < inst->blockLen10ms; j++) {\n        outFrameHB[i][j] = (int16_t)((gainTimeDomainHB *\n            inst->dataBufHBFX[i][j]) >> 14);  // Q0\n      }\n    }\n  }  // end of H band gain computation\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/nsx_core.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_\n\n#ifdef NS_FILEDEBUG\n#include <stdio.h>\n#endif\n\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n#include \"webrtc/modules/audio_processing/ns/nsx_defines.h\"\n#include \"webrtc/typedefs.h\"\n\ntypedef struct NoiseSuppressionFixedC_ {\n  uint32_t                fs;\n\n  const int16_t*          window;\n  int16_t                 analysisBuffer[ANAL_BLOCKL_MAX];\n  int16_t                 synthesisBuffer[ANAL_BLOCKL_MAX];\n  uint16_t                noiseSupFilter[HALF_ANAL_BLOCKL];\n  uint16_t                overdrive; /* Q8 */\n  uint16_t                denoiseBound; /* Q14 */\n  const int16_t*          factor2Table;\n  int16_t                 noiseEstLogQuantile[SIMULT* HALF_ANAL_BLOCKL];\n  int16_t                 noiseEstDensity[SIMULT* HALF_ANAL_BLOCKL];\n  int16_t                 noiseEstCounter[SIMULT];\n  int16_t                 noiseEstQuantile[HALF_ANAL_BLOCKL];\n\n  size_t                  anaLen;\n  size_t                  anaLen2;\n  size_t                  magnLen;\n  int                     aggrMode;\n  int                     stages;\n  int                     initFlag;\n  int                     gainMap;\n\n  int32_t                 maxLrt;\n  int32_t                 minLrt;\n  // Log LRT factor with time-smoothing in Q8.\n  int32_t                 logLrtTimeAvgW32[HALF_ANAL_BLOCKL];\n  int32_t                 featureLogLrt;\n  int32_t                 thresholdLogLrt;\n  int16_t                 weightLogLrt;\n\n  uint32_t                featureSpecDiff;\n  uint32_t                thresholdSpecDiff;\n  int16_t                 weightSpecDiff;\n\n  uint32_t                featureSpecFlat;\n  uint32_t                thresholdSpecFlat;\n  int16_t                 weightSpecFlat;\n\n  // Conservative estimate of noise spectrum.\n  int32_t                 avgMagnPause[HALF_ANAL_BLOCKL];\n  uint32_t                magnEnergy;\n  uint32_t                sumMagn;\n  uint32_t                curAvgMagnEnergy;\n  uint32_t                timeAvgMagnEnergy;\n  uint32_t                timeAvgMagnEnergyTmp;\n\n  uint32_t                whiteNoiseLevel;  // Initial noise estimate.\n  // Initial magnitude spectrum estimate.\n  uint32_t                initMagnEst[HALF_ANAL_BLOCKL];\n  // Pink noise parameters:\n  int32_t                 pinkNoiseNumerator;  // Numerator.\n  int32_t                 pinkNoiseExp;  // Power of freq.\n  int                     minNorm;  // Smallest normalization factor.\n  int                     zeroInputSignal;  // Zero input signal flag.\n\n  // Noise spectrum from previous frame.\n  uint32_t                prevNoiseU32[HALF_ANAL_BLOCKL];\n  // Magnitude spectrum from previous frame.\n  uint16_t                prevMagnU16[HALF_ANAL_BLOCKL];\n  // Prior speech/noise probability in Q14.\n  int16_t                 priorNonSpeechProb;\n\n  int                     blockIndex;  // Frame index counter.\n  // Parameter for updating or estimating thresholds/weights for prior model.\n  int                     modelUpdate;\n  int                     cntThresUpdate;\n\n  // Histograms for parameter estimation.\n  int16_t                 histLrt[HIST_PAR_EST];\n  int16_t                 histSpecFlat[HIST_PAR_EST];\n  int16_t                 histSpecDiff[HIST_PAR_EST];\n\n  // Quantities for high band estimate.\n  int16_t                 dataBufHBFX[NUM_HIGH_BANDS_MAX][ANAL_BLOCKL_MAX];\n\n  int                     qNoise;\n  int                     prevQNoise;\n  int                     prevQMagn;\n  size_t                  blockLen10ms;\n\n  int16_t                 real[ANAL_BLOCKL_MAX];\n  int16_t                 imag[ANAL_BLOCKL_MAX];\n  int32_t                 energyIn;\n  int                     scaleEnergyIn;\n  int                     normData;\n\n  struct RealFFT* real_fft;\n} NoiseSuppressionFixedC;\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n/****************************************************************************\n * WebRtcNsx_InitCore(...)\n *\n * This function initializes a noise suppression instance\n *\n * Input:\n *      - inst          : Instance that should be initialized\n *      - fs            : Sampling frequency\n *\n * Output:\n *      - inst          : Initialized instance\n *\n * Return value         :  0 - Ok\n *                        -1 - Error\n */\nint32_t WebRtcNsx_InitCore(NoiseSuppressionFixedC* inst, uint32_t fs);\n\n/****************************************************************************\n * WebRtcNsx_set_policy_core(...)\n *\n * This changes the aggressiveness of the noise suppression method.\n *\n * Input:\n *      - inst       : Instance that should be initialized\n *      - mode       : 0: Mild (6 dB), 1: Medium (10 dB), 2: Aggressive (15 dB)\n *\n * Output:\n *      - inst       : Initialized instance\n *\n * Return value      :  0 - Ok\n *                     -1 - Error\n */\nint WebRtcNsx_set_policy_core(NoiseSuppressionFixedC* inst, int mode);\n\n/****************************************************************************\n * WebRtcNsx_ProcessCore\n *\n * Do noise suppression.\n *\n * Input:\n *      - inst          : Instance that should be initialized\n *      - inFrame       : Input speech frame for each band\n *      - num_bands     : Number of bands\n *\n * Output:\n *      - inst          : Updated instance\n *      - outFrame      : Output speech frame for each band\n */\nvoid WebRtcNsx_ProcessCore(NoiseSuppressionFixedC* inst,\n                           const short* const* inFrame,\n                           int num_bands,\n                           short* const* outFrame);\n\n/****************************************************************************\n * Some function pointers, for internal functions shared by ARM NEON and\n * generic C code.\n */\n// Noise Estimation.\ntypedef void (*NoiseEstimation)(NoiseSuppressionFixedC* inst,\n                                uint16_t* magn,\n                                uint32_t* noise,\n                                int16_t* q_noise);\nextern NoiseEstimation WebRtcNsx_NoiseEstimation;\n\n// Filter the data in the frequency domain, and create spectrum.\ntypedef void (*PrepareSpectrum)(NoiseSuppressionFixedC* inst,\n                                int16_t* freq_buff);\nextern PrepareSpectrum WebRtcNsx_PrepareSpectrum;\n\n// For the noise supression process, synthesis, read out fully processed\n// segment, and update synthesis buffer.\ntypedef void (*SynthesisUpdate)(NoiseSuppressionFixedC* inst,\n                                int16_t* out_frame,\n                                int16_t gain_factor);\nextern SynthesisUpdate WebRtcNsx_SynthesisUpdate;\n\n// Update analysis buffer for lower band, and window data before FFT.\ntypedef void (*AnalysisUpdate)(NoiseSuppressionFixedC* inst,\n                               int16_t* out,\n                               int16_t* new_speech);\nextern AnalysisUpdate WebRtcNsx_AnalysisUpdate;\n\n// Denormalize the real-valued signal |in|, the output from inverse FFT.\ntypedef void (*Denormalize)(NoiseSuppressionFixedC* inst,\n                            int16_t* in,\n                            int factor);\nextern Denormalize WebRtcNsx_Denormalize;\n\n// Normalize the real-valued signal |in|, the input to forward FFT.\ntypedef void (*NormalizeRealBuffer)(NoiseSuppressionFixedC* inst,\n                                    const int16_t* in,\n                                    int16_t* out);\nextern NormalizeRealBuffer WebRtcNsx_NormalizeRealBuffer;\n\n// Compute speech/noise probability.\n// Intended to be private.\nvoid WebRtcNsx_SpeechNoiseProb(NoiseSuppressionFixedC* inst,\n                               uint16_t* nonSpeechProbFinal,\n                               uint32_t* priorLocSnr,\n                               uint32_t* postLocSnr);\n\n#if defined(WEBRTC_HAS_NEON)\n// For the above function pointers, functions for generic platforms are declared\n// and defined as static in file nsx_core.c, while those for ARM Neon platforms\n// are declared below and defined in file nsx_core_neon.c.\nvoid WebRtcNsx_NoiseEstimationNeon(NoiseSuppressionFixedC* inst,\n                                   uint16_t* magn,\n                                   uint32_t* noise,\n                                   int16_t* q_noise);\nvoid WebRtcNsx_SynthesisUpdateNeon(NoiseSuppressionFixedC* inst,\n                                   int16_t* out_frame,\n                                   int16_t gain_factor);\nvoid WebRtcNsx_AnalysisUpdateNeon(NoiseSuppressionFixedC* inst,\n                                  int16_t* out,\n                                  int16_t* new_speech);\nvoid WebRtcNsx_PrepareSpectrumNeon(NoiseSuppressionFixedC* inst,\n                                   int16_t* freq_buff);\n#endif\n\n#if defined(MIPS32_LE)\n// For the above function pointers, functions for generic platforms are declared\n// and defined as static in file nsx_core.c, while those for MIPS platforms\n// are declared below and defined in file nsx_core_mips.c.\nvoid WebRtcNsx_SynthesisUpdate_mips(NoiseSuppressionFixedC* inst,\n                                    int16_t* out_frame,\n                                    int16_t gain_factor);\nvoid WebRtcNsx_AnalysisUpdate_mips(NoiseSuppressionFixedC* inst,\n                                   int16_t* out,\n                                   int16_t* new_speech);\nvoid WebRtcNsx_PrepareSpectrum_mips(NoiseSuppressionFixedC* inst,\n                                    int16_t* freq_buff);\nvoid WebRtcNsx_NormalizeRealBuffer_mips(NoiseSuppressionFixedC* inst,\n                                        const int16_t* in,\n                                        int16_t* out);\n#if defined(MIPS_DSP_R1_LE)\nvoid WebRtcNsx_Denormalize_mips(NoiseSuppressionFixedC* inst,\n                                int16_t* in,\n                                int factor);\n#endif\n\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_CORE_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/nsx_core_c.c",
    "content": "/*\n *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/modules/audio_processing/ns/noise_suppression_x.h\"\n#include \"webrtc/modules/audio_processing/ns/nsx_core.h\"\n#include \"webrtc/modules/audio_processing/ns/nsx_defines.h\"\n\nstatic const int16_t kIndicatorTable[17] = {\n  0, 2017, 3809, 5227, 6258, 6963, 7424, 7718,\n  7901, 8014, 8084, 8126, 8152, 8168, 8177, 8183, 8187\n};\n\n// Compute speech/noise probability\n// speech/noise probability is returned in: probSpeechFinal\n//snrLocPrior is the prior SNR for each frequency (in Q11)\n//snrLocPost is the post SNR for each frequency (in Q11)\nvoid WebRtcNsx_SpeechNoiseProb(NoiseSuppressionFixedC* inst,\n                               uint16_t* nonSpeechProbFinal,\n                               uint32_t* priorLocSnr,\n                               uint32_t* postLocSnr) {\n  uint32_t zeros, num, den, tmpU32no1, tmpU32no2, tmpU32no3;\n  int32_t invLrtFX, indPriorFX, tmp32, tmp32no1, tmp32no2, besselTmpFX32;\n  int32_t frac32, logTmp;\n  int32_t logLrtTimeAvgKsumFX;\n  int16_t indPriorFX16;\n  int16_t tmp16, tmp16no1, tmp16no2, tmpIndFX, tableIndex, frac, intPart;\n  size_t i;\n  int normTmp, normTmp2, nShifts;\n\n  // compute feature based on average LR factor\n  // this is the average over all frequencies of the smooth log LRT\n  logLrtTimeAvgKsumFX = 0;\n  for (i = 0; i < inst->magnLen; i++) {\n    besselTmpFX32 = (int32_t)postLocSnr[i]; // Q11\n    normTmp = WebRtcSpl_NormU32(postLocSnr[i]);\n    num = postLocSnr[i] << normTmp;  // Q(11+normTmp)\n    if (normTmp > 10) {\n      den = priorLocSnr[i] << (normTmp - 11);  // Q(normTmp)\n    } else {\n      den = priorLocSnr[i] >> (11 - normTmp);  // Q(normTmp)\n    }\n    if (den > 0) {\n      besselTmpFX32 -= num / den;  // Q11\n    } else {\n      besselTmpFX32 = 0;\n    }\n\n    // inst->logLrtTimeAvg[i] += LRT_TAVG * (besselTmp - log(snrLocPrior)\n    //                                       - inst->logLrtTimeAvg[i]);\n    // Here, LRT_TAVG = 0.5\n    zeros = WebRtcSpl_NormU32(priorLocSnr[i]);\n    frac32 = (int32_t)(((priorLocSnr[i] << zeros) & 0x7FFFFFFF) >> 19);\n    tmp32 = (frac32 * frac32 * -43) >> 19;\n    tmp32 += ((int16_t)frac32 * 5412) >> 12;\n    frac32 = tmp32 + 37;\n    // tmp32 = log2(priorLocSnr[i])\n    tmp32 = (int32_t)(((31 - zeros) << 12) + frac32) - (11 << 12); // Q12\n    logTmp = (tmp32 * 178) >> 8;  // log2(priorLocSnr[i])*log(2)\n    // tmp32no1 = LRT_TAVG * (log(snrLocPrior) + inst->logLrtTimeAvg[i]) in Q12.\n    tmp32no1 = (logTmp + inst->logLrtTimeAvgW32[i]) / 2;\n    inst->logLrtTimeAvgW32[i] += (besselTmpFX32 - tmp32no1); // Q12\n\n    logLrtTimeAvgKsumFX += inst->logLrtTimeAvgW32[i]; // Q12\n  }\n  inst->featureLogLrt = (logLrtTimeAvgKsumFX * BIN_SIZE_LRT) >>\n      (inst->stages + 11);\n\n  // done with computation of LR factor\n\n  //\n  //compute the indicator functions\n  //\n\n  // average LRT feature\n  // FLOAT code\n  // indicator0 = 0.5 * (tanh(widthPrior *\n  //                      (logLrtTimeAvgKsum - threshPrior0)) + 1.0);\n  tmpIndFX = 16384; // Q14(1.0)\n  tmp32no1 = logLrtTimeAvgKsumFX - inst->thresholdLogLrt; // Q12\n  nShifts = 7 - inst->stages; // WIDTH_PR_MAP_SHIFT - inst->stages + 5;\n  //use larger width in tanh map for pause regions\n  if (tmp32no1 < 0) {\n    tmpIndFX = 0;\n    tmp32no1 = -tmp32no1;\n    //widthPrior = widthPrior * 2.0;\n    nShifts++;\n  }\n  tmp32no1 = WEBRTC_SPL_SHIFT_W32(tmp32no1, nShifts); // Q14\n  // compute indicator function: sigmoid map\n  if (tmp32no1 < (16 << 14) && tmp32no1 >= 0) {\n    tableIndex = (int16_t)(tmp32no1 >> 14);\n    tmp16no2 = kIndicatorTable[tableIndex];\n    tmp16no1 = kIndicatorTable[tableIndex + 1] - kIndicatorTable[tableIndex];\n    frac = (int16_t)(tmp32no1 & 0x00003fff); // Q14\n    tmp16no2 += (int16_t)((tmp16no1 * frac) >> 14);\n    if (tmpIndFX == 0) {\n      tmpIndFX = 8192 - tmp16no2; // Q14\n    } else {\n      tmpIndFX = 8192 + tmp16no2; // Q14\n    }\n  }\n  indPriorFX = inst->weightLogLrt * tmpIndFX;  // 6*Q14\n\n  //spectral flatness feature\n  if (inst->weightSpecFlat) {\n    tmpU32no1 = WEBRTC_SPL_UMUL(inst->featureSpecFlat, 400); // Q10\n    tmpIndFX = 16384; // Q14(1.0)\n    //use larger width in tanh map for pause regions\n    tmpU32no2 = inst->thresholdSpecFlat - tmpU32no1; //Q10\n    nShifts = 4;\n    if (inst->thresholdSpecFlat < tmpU32no1) {\n      tmpIndFX = 0;\n      tmpU32no2 = tmpU32no1 - inst->thresholdSpecFlat;\n      //widthPrior = widthPrior * 2.0;\n      nShifts++;\n    }\n    tmpU32no1 = WebRtcSpl_DivU32U16(tmpU32no2 << nShifts, 25);  // Q14\n    // compute indicator function: sigmoid map\n    // FLOAT code\n    // indicator1 = 0.5 * (tanh(sgnMap * widthPrior *\n    //                          (threshPrior1 - tmpFloat1)) + 1.0);\n    if (tmpU32no1 < (16 << 14)) {\n      tableIndex = (int16_t)(tmpU32no1 >> 14);\n      tmp16no2 = kIndicatorTable[tableIndex];\n      tmp16no1 = kIndicatorTable[tableIndex + 1] - kIndicatorTable[tableIndex];\n      frac = (int16_t)(tmpU32no1 & 0x00003fff); // Q14\n      tmp16no2 += (int16_t)((tmp16no1 * frac) >> 14);\n      if (tmpIndFX) {\n        tmpIndFX = 8192 + tmp16no2; // Q14\n      } else {\n        tmpIndFX = 8192 - tmp16no2; // Q14\n      }\n    }\n    indPriorFX += inst->weightSpecFlat * tmpIndFX;  // 6*Q14\n  }\n\n  //for template spectral-difference\n  if (inst->weightSpecDiff) {\n    tmpU32no1 = 0;\n    if (inst->featureSpecDiff) {\n      normTmp = WEBRTC_SPL_MIN(20 - inst->stages,\n                               WebRtcSpl_NormU32(inst->featureSpecDiff));\n      RTC_DCHECK_GE(normTmp, 0);\n      tmpU32no1 = inst->featureSpecDiff << normTmp;  // Q(normTmp-2*stages)\n      tmpU32no2 = inst->timeAvgMagnEnergy >> (20 - inst->stages - normTmp);\n      if (tmpU32no2 > 0) {\n        // Q(20 - inst->stages)\n        tmpU32no1 /= tmpU32no2;\n      } else {\n        tmpU32no1 = (uint32_t)(0x7fffffff);\n      }\n    }\n    tmpU32no3 = (inst->thresholdSpecDiff << 17) / 25;\n    tmpU32no2 = tmpU32no1 - tmpU32no3;\n    nShifts = 1;\n    tmpIndFX = 16384; // Q14(1.0)\n    //use larger width in tanh map for pause regions\n    if (tmpU32no2 & 0x80000000) {\n      tmpIndFX = 0;\n      tmpU32no2 = tmpU32no3 - tmpU32no1;\n      //widthPrior = widthPrior * 2.0;\n      nShifts--;\n    }\n    tmpU32no1 = tmpU32no2 >> nShifts;\n    // compute indicator function: sigmoid map\n    /* FLOAT code\n     indicator2 = 0.5 * (tanh(widthPrior * (tmpFloat1 - threshPrior2)) + 1.0);\n     */\n    if (tmpU32no1 < (16 << 14)) {\n      tableIndex = (int16_t)(tmpU32no1 >> 14);\n      tmp16no2 = kIndicatorTable[tableIndex];\n      tmp16no1 = kIndicatorTable[tableIndex + 1] - kIndicatorTable[tableIndex];\n      frac = (int16_t)(tmpU32no1 & 0x00003fff); // Q14\n      tmp16no2 += (int16_t)WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(\n                    tmp16no1, frac, 14);\n      if (tmpIndFX) {\n        tmpIndFX = 8192 + tmp16no2;\n      } else {\n        tmpIndFX = 8192 - tmp16no2;\n      }\n    }\n    indPriorFX += inst->weightSpecDiff * tmpIndFX;  // 6*Q14\n  }\n\n  //combine the indicator function with the feature weights\n  // FLOAT code\n  // indPrior = 1 - (weightIndPrior0 * indicator0 + weightIndPrior1 *\n  //                 indicator1 + weightIndPrior2 * indicator2);\n  indPriorFX16 = WebRtcSpl_DivW32W16ResW16(98307 - indPriorFX, 6); // Q14\n  // done with computing indicator function\n\n  //compute the prior probability\n  // FLOAT code\n  // inst->priorNonSpeechProb += PRIOR_UPDATE *\n  //                             (indPriorNonSpeech - inst->priorNonSpeechProb);\n  tmp16 = indPriorFX16 - inst->priorNonSpeechProb; // Q14\n  inst->priorNonSpeechProb += (int16_t)((PRIOR_UPDATE_Q14 * tmp16) >> 14);\n\n  //final speech probability: combine prior model with LR factor:\n\n  memset(nonSpeechProbFinal, 0, sizeof(uint16_t) * inst->magnLen);\n\n  if (inst->priorNonSpeechProb > 0) {\n    for (i = 0; i < inst->magnLen; i++) {\n      // FLOAT code\n      // invLrt = exp(inst->logLrtTimeAvg[i]);\n      // invLrt = inst->priorSpeechProb * invLrt;\n      // nonSpeechProbFinal[i] = (1.0 - inst->priorSpeechProb) /\n      //                         (1.0 - inst->priorSpeechProb + invLrt);\n      // invLrt = (1.0 - inst->priorNonSpeechProb) * invLrt;\n      // nonSpeechProbFinal[i] = inst->priorNonSpeechProb /\n      //                         (inst->priorNonSpeechProb + invLrt);\n      if (inst->logLrtTimeAvgW32[i] < 65300) {\n        tmp32no1 = (inst->logLrtTimeAvgW32[i] * 23637) >> 14;  // Q12\n        intPart = (int16_t)(tmp32no1 >> 12);\n        if (intPart < -8) {\n          intPart = -8;\n        }\n        frac = (int16_t)(tmp32no1 & 0x00000fff); // Q12\n\n        // Quadratic approximation of 2^frac\n        tmp32no2 = (frac * frac * 44) >> 19;  // Q12.\n        tmp32no2 += (frac * 84) >> 7;  // Q12\n        invLrtFX = (1 << (8 + intPart)) +\n            WEBRTC_SPL_SHIFT_W32(tmp32no2, intPart - 4); // Q8\n\n        normTmp = WebRtcSpl_NormW32(invLrtFX);\n        normTmp2 = WebRtcSpl_NormW16((16384 - inst->priorNonSpeechProb));\n        if (normTmp + normTmp2 >= 7) {\n          if (normTmp + normTmp2 < 15) {\n            invLrtFX >>= 15 - normTmp2 - normTmp;\n            // Q(normTmp+normTmp2-7)\n            tmp32no1 = invLrtFX * (16384 - inst->priorNonSpeechProb);\n            // Q(normTmp+normTmp2+7)\n            invLrtFX = WEBRTC_SPL_SHIFT_W32(tmp32no1, 7 - normTmp - normTmp2);\n                                                                  // Q14\n          } else {\n            tmp32no1 = invLrtFX * (16384 - inst->priorNonSpeechProb);\n                                                                  // Q22\n            invLrtFX = tmp32no1 >> 8;  // Q14.\n          }\n\n          tmp32no1 = (int32_t)inst->priorNonSpeechProb << 8;  // Q22\n\n          nonSpeechProbFinal[i] = tmp32no1 /\n              (inst->priorNonSpeechProb + invLrtFX);  // Q8\n        }\n      }\n    }\n  }\n}\n\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/nsx_core_neon.c",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifdef WEBRTC_ARCH_ARM_FAMILY\n\n#include \"webrtc/modules/audio_processing/ns/nsx_core.h\"\n\n#include <arm_neon.h>\n\n#include \"webrtc/base/checks.h\"\n\n// Constants to compensate for shifting signal log(2^shifts).\nconst int16_t WebRtcNsx_kLogTable[9] = {\n  0, 177, 355, 532, 710, 887, 1065, 1242, 1420\n};\n\nconst int16_t WebRtcNsx_kCounterDiv[201] = {\n  32767, 16384, 10923, 8192, 6554, 5461, 4681, 4096, 3641, 3277, 2979, 2731,\n  2521, 2341, 2185, 2048, 1928, 1820, 1725, 1638, 1560, 1489, 1425, 1365, 1311,\n  1260, 1214, 1170, 1130, 1092, 1057, 1024, 993, 964, 936, 910, 886, 862, 840,\n  819, 799, 780, 762, 745, 728, 712, 697, 683, 669, 655, 643, 630, 618, 607,\n  596, 585, 575, 565, 555, 546, 537, 529, 520, 512, 504, 496, 489, 482, 475,\n  468, 462, 455, 449, 443, 437, 431, 426, 420, 415, 410, 405, 400, 395, 390,\n  386, 381, 377, 372, 368, 364, 360, 356, 352, 349, 345, 341, 338, 334, 331,\n  328, 324, 321, 318, 315, 312, 309, 306, 303, 301, 298, 295, 293, 290, 287,\n  285, 282, 280, 278, 275, 273, 271, 269, 266, 264, 262, 260, 258, 256, 254,\n  252, 250, 248, 246, 245, 243, 241, 239, 237, 236, 234, 232, 231, 229, 228,\n  226, 224, 223, 221, 220, 218, 217, 216, 214, 213, 211, 210, 209, 207, 206,\n  205, 204, 202, 201, 200, 199, 197, 196, 195, 194, 193, 192, 191, 189, 188,\n  187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173,\n  172, 172, 171, 170, 169, 168, 167, 166, 165, 165, 164, 163\n};\n\nconst int16_t WebRtcNsx_kLogTableFrac[256] = {\n  0, 1, 3, 4, 6, 7, 9, 10, 11, 13, 14, 16, 17, 18, 20, 21,\n  22, 24, 25, 26, 28, 29, 30, 32, 33, 34, 36, 37, 38, 40, 41, 42,\n  44, 45, 46, 47, 49, 50, 51, 52, 54, 55, 56, 57, 59, 60, 61, 62,\n  63, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81,\n  82, 84, 85, 86, 87, 88, 89, 90, 92, 93, 94, 95, 96, 97, 98, 99,\n  100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116,\n  117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,\n  132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,\n  147, 148, 149, 150, 151, 152, 153, 154, 155, 155, 156, 157, 158, 159, 160,\n  161, 162, 163, 164, 165, 166, 167, 168, 169, 169, 170, 171, 172, 173, 174,\n  175, 176, 177, 178, 178, 179, 180, 181, 182, 183, 184, 185, 185, 186, 187,\n  188, 189, 190, 191, 192, 192, 193, 194, 195, 196, 197, 198, 198, 199, 200,\n  201, 202, 203, 203, 204, 205, 206, 207, 208, 208, 209, 210, 211, 212, 212,\n  213, 214, 215, 216, 216, 217, 218, 219, 220, 220, 221, 222, 223, 224, 224,\n  225, 226, 227, 228, 228, 229, 230, 231, 231, 232, 233, 234, 234, 235, 236,\n  237, 238, 238, 239, 240, 241, 241, 242, 243, 244, 244, 245, 246, 247, 247,\n  248, 249, 249, 250, 251, 252, 252, 253, 254, 255, 255\n};\n\n// Update the noise estimation information.\nstatic void UpdateNoiseEstimateNeon(NoiseSuppressionFixedC* inst, int offset) {\n  const int16_t kExp2Const = 11819; // Q13\n  int16_t* ptr_noiseEstLogQuantile = NULL;\n  int16_t* ptr_noiseEstQuantile = NULL;\n  int16x4_t kExp2Const16x4 = vdup_n_s16(kExp2Const);\n  int32x4_t twentyOne32x4 = vdupq_n_s32(21);\n  int32x4_t constA32x4 = vdupq_n_s32(0x1fffff);\n  int32x4_t constB32x4 = vdupq_n_s32(0x200000);\n\n  int16_t tmp16 = WebRtcSpl_MaxValueW16(inst->noiseEstLogQuantile + offset,\n                                        inst->magnLen);\n\n  // Guarantee a Q-domain as high as possible and still fit in int16\n  inst->qNoise = 14 - (int) WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(kExp2Const,\n                                                                 tmp16,\n                                                                 21);\n\n  int32x4_t qNoise32x4 = vdupq_n_s32(inst->qNoise);\n\n  for (ptr_noiseEstLogQuantile = &inst->noiseEstLogQuantile[offset],\n       ptr_noiseEstQuantile = &inst->noiseEstQuantile[0];\n       ptr_noiseEstQuantile < &inst->noiseEstQuantile[inst->magnLen - 3];\n       ptr_noiseEstQuantile += 4, ptr_noiseEstLogQuantile += 4) {\n\n    // tmp32no2 = kExp2Const * inst->noiseEstLogQuantile[offset + i];\n    int16x4_t v16x4 = vld1_s16(ptr_noiseEstLogQuantile);\n    int32x4_t v32x4B = vmull_s16(v16x4, kExp2Const16x4);\n\n    // tmp32no1 = (0x00200000 | (tmp32no2 & 0x001FFFFF)); // 2^21 + frac\n    int32x4_t v32x4A = vandq_s32(v32x4B, constA32x4);\n    v32x4A = vorrq_s32(v32x4A, constB32x4);\n\n    // tmp16 = (int16_t)(tmp32no2 >> 21);\n    v32x4B = vshrq_n_s32(v32x4B, 21);\n\n    // tmp16 -= 21;// shift 21 to get result in Q0\n    v32x4B = vsubq_s32(v32x4B, twentyOne32x4);\n\n    // tmp16 += (int16_t) inst->qNoise;\n    // shift to get result in Q(qNoise)\n    v32x4B = vaddq_s32(v32x4B, qNoise32x4);\n\n    // if (tmp16 < 0) {\n    //   tmp32no1 >>= -tmp16;\n    // } else {\n    //   tmp32no1 <<= tmp16;\n    // }\n    v32x4B = vshlq_s32(v32x4A, v32x4B);\n\n    // tmp16 = WebRtcSpl_SatW32ToW16(tmp32no1);\n    v16x4 = vqmovn_s32(v32x4B);\n\n    //inst->noiseEstQuantile[i] = tmp16;\n    vst1_s16(ptr_noiseEstQuantile, v16x4);\n  }\n\n  // Last iteration:\n\n  // inst->quantile[i]=exp(inst->lquantile[offset+i]);\n  // in Q21\n  int32_t tmp32no2 = kExp2Const * *ptr_noiseEstLogQuantile;\n  int32_t tmp32no1 = (0x00200000 | (tmp32no2 & 0x001FFFFF)); // 2^21 + frac\n\n  tmp16 = (int16_t)(tmp32no2 >> 21);\n  tmp16 -= 21;// shift 21 to get result in Q0\n  tmp16 += (int16_t) inst->qNoise; //shift to get result in Q(qNoise)\n  if (tmp16 < 0) {\n    tmp32no1 >>= -tmp16;\n  } else {\n    tmp32no1 <<= tmp16;\n  }\n  *ptr_noiseEstQuantile = WebRtcSpl_SatW32ToW16(tmp32no1);\n}\n\n// Noise Estimation\nvoid WebRtcNsx_NoiseEstimationNeon(NoiseSuppressionFixedC* inst,\n                                   uint16_t* magn,\n                                   uint32_t* noise,\n                                   int16_t* q_noise) {\n  int16_t lmagn[HALF_ANAL_BLOCKL], counter, countDiv;\n  int16_t countProd, delta, zeros, frac;\n  int16_t log2, tabind, logval, tmp16, tmp16no1, tmp16no2;\n  const int16_t log2_const = 22713;\n  const int16_t width_factor = 21845;\n\n  size_t i, s, offset;\n\n  tabind = inst->stages - inst->normData;\n  RTC_DCHECK_LT(tabind, 9);\n  RTC_DCHECK_GT(tabind, -9);\n  if (tabind < 0) {\n    logval = -WebRtcNsx_kLogTable[-tabind];\n  } else {\n    logval = WebRtcNsx_kLogTable[tabind];\n  }\n\n  int16x8_t logval_16x8 = vdupq_n_s16(logval);\n\n  // lmagn(i)=log(magn(i))=log(2)*log2(magn(i))\n  // magn is in Q(-stages), and the real lmagn values are:\n  // real_lmagn(i)=log(magn(i)*2^stages)=log(magn(i))+log(2^stages)\n  // lmagn in Q8\n  for (i = 0; i < inst->magnLen; i++) {\n    if (magn[i]) {\n      zeros = WebRtcSpl_NormU32((uint32_t)magn[i]);\n      frac = (int16_t)((((uint32_t)magn[i] << zeros)\n                        & 0x7FFFFFFF) >> 23);\n      RTC_DCHECK_LT(frac, 256);\n      // log2(magn(i))\n      log2 = (int16_t)(((31 - zeros) << 8)\n                       + WebRtcNsx_kLogTableFrac[frac]);\n      // log2(magn(i))*log(2)\n      lmagn[i] = (int16_t)((log2 * log2_const) >> 15);\n      // + log(2^stages)\n      lmagn[i] += logval;\n    } else {\n      lmagn[i] = logval;\n    }\n  }\n\n  int16x4_t Q3_16x4  = vdup_n_s16(3);\n  int16x8_t WIDTHQ8_16x8 = vdupq_n_s16(WIDTH_Q8);\n  int16x8_t WIDTHFACTOR_16x8 = vdupq_n_s16(width_factor);\n\n  int16_t factor = FACTOR_Q7;\n  if (inst->blockIndex < END_STARTUP_LONG)\n    factor = FACTOR_Q7_STARTUP;\n\n  // Loop over simultaneous estimates\n  for (s = 0; s < SIMULT; s++) {\n    offset = s * inst->magnLen;\n\n    // Get counter values from state\n    counter = inst->noiseEstCounter[s];\n    RTC_DCHECK_LT(counter, 201);\n    countDiv = WebRtcNsx_kCounterDiv[counter];\n    countProd = (int16_t)(counter * countDiv);\n\n    // quant_est(...)\n    int16_t deltaBuff[8];\n    int16x4_t tmp16x4_0;\n    int16x4_t tmp16x4_1;\n    int16x4_t countDiv_16x4 = vdup_n_s16(countDiv);\n    int16x8_t countProd_16x8 = vdupq_n_s16(countProd);\n    int16x8_t tmp16x8_0 = vdupq_n_s16(countDiv);\n    int16x8_t prod16x8 = vqrdmulhq_s16(WIDTHFACTOR_16x8, tmp16x8_0);\n    int16x8_t tmp16x8_1;\n    int16x8_t tmp16x8_2;\n    int16x8_t tmp16x8_3;\n    uint16x8_t tmp16x8_4;\n    int32x4_t tmp32x4;\n\n    for (i = 0; i + 7 < inst->magnLen; i += 8) {\n      // Compute delta.\n      // Smaller step size during startup. This prevents from using\n      // unrealistic values causing overflow.\n      tmp16x8_0 = vdupq_n_s16(factor);\n      vst1q_s16(deltaBuff, tmp16x8_0);\n\n      int j;\n      for (j = 0; j < 8; j++) {\n        if (inst->noiseEstDensity[offset + i + j] > 512) {\n          // Get values for deltaBuff by shifting intead of dividing.\n          int factor = WebRtcSpl_NormW16(inst->noiseEstDensity[offset + i + j]);\n          deltaBuff[j] = (int16_t)(FACTOR_Q16 >> (14 - factor));\n        }\n      }\n\n      // Update log quantile estimate\n\n      // tmp16 = (int16_t)((delta * countDiv) >> 14);\n      tmp32x4 = vmull_s16(vld1_s16(&deltaBuff[0]), countDiv_16x4);\n      tmp16x4_1 = vshrn_n_s32(tmp32x4, 14);\n      tmp32x4 = vmull_s16(vld1_s16(&deltaBuff[4]), countDiv_16x4);\n      tmp16x4_0 = vshrn_n_s32(tmp32x4, 14);\n      tmp16x8_0 = vcombine_s16(tmp16x4_1, tmp16x4_0); // Keep for several lines.\n\n      // prepare for the \"if\" branch\n      // tmp16 += 2;\n      // tmp16_1 = (Word16)(tmp16>>2);\n      tmp16x8_1 = vrshrq_n_s16(tmp16x8_0, 2);\n\n      // inst->noiseEstLogQuantile[offset+i] + tmp16_1;\n      tmp16x8_2 = vld1q_s16(&inst->noiseEstLogQuantile[offset + i]); // Keep\n      tmp16x8_1 = vaddq_s16(tmp16x8_2, tmp16x8_1); // Keep for several lines\n\n      // Prepare for the \"else\" branch\n      // tmp16 += 1;\n      // tmp16_1 = (Word16)(tmp16>>1);\n      tmp16x8_0 = vrshrq_n_s16(tmp16x8_0, 1);\n\n      // tmp16_2 = (int16_t)((tmp16_1 * 3) >> 1);\n      tmp32x4 = vmull_s16(vget_low_s16(tmp16x8_0), Q3_16x4);\n      tmp16x4_1 = vshrn_n_s32(tmp32x4, 1);\n\n      // tmp16_2 = (int16_t)((tmp16_1 * 3) >> 1);\n      tmp32x4 = vmull_s16(vget_high_s16(tmp16x8_0), Q3_16x4);\n      tmp16x4_0 = vshrn_n_s32(tmp32x4, 1);\n\n      // inst->noiseEstLogQuantile[offset + i] - tmp16_2;\n      tmp16x8_0 = vcombine_s16(tmp16x4_1, tmp16x4_0); // keep\n      tmp16x8_0 = vsubq_s16(tmp16x8_2, tmp16x8_0);\n\n      // logval is the smallest fixed point representation we can have. Values\n      // below that will correspond to values in the interval [0, 1], which\n      // can't possibly occur.\n      tmp16x8_0 = vmaxq_s16(tmp16x8_0, logval_16x8);\n\n      // Do the if-else branches:\n      tmp16x8_3 = vld1q_s16(&lmagn[i]); // keep for several lines\n      tmp16x8_4 = vcgtq_s16(tmp16x8_3, tmp16x8_2);\n      tmp16x8_2 = vbslq_s16(tmp16x8_4, tmp16x8_1, tmp16x8_0);\n      vst1q_s16(&inst->noiseEstLogQuantile[offset + i], tmp16x8_2);\n\n      // Update density estimate\n      // tmp16_1 + tmp16_2\n      tmp16x8_1 = vld1q_s16(&inst->noiseEstDensity[offset + i]);\n      tmp16x8_0 = vqrdmulhq_s16(tmp16x8_1, countProd_16x8);\n      tmp16x8_0 = vaddq_s16(tmp16x8_0, prod16x8);\n\n      // lmagn[i] - inst->noiseEstLogQuantile[offset + i]\n      tmp16x8_3 = vsubq_s16(tmp16x8_3, tmp16x8_2);\n      tmp16x8_3 = vabsq_s16(tmp16x8_3);\n      tmp16x8_4 = vcgtq_s16(WIDTHQ8_16x8, tmp16x8_3);\n      tmp16x8_1 = vbslq_s16(tmp16x8_4, tmp16x8_0, tmp16x8_1);\n      vst1q_s16(&inst->noiseEstDensity[offset + i], tmp16x8_1);\n    }  // End loop over magnitude spectrum\n\n    // Last iteration over magnitude spectrum:\n    // compute delta\n    if (inst->noiseEstDensity[offset + i] > 512) {\n      // Get values for deltaBuff by shifting intead of dividing.\n      int factor = WebRtcSpl_NormW16(inst->noiseEstDensity[offset + i]);\n      delta = (int16_t)(FACTOR_Q16 >> (14 - factor));\n    } else {\n      delta = FACTOR_Q7;\n      if (inst->blockIndex < END_STARTUP_LONG) {\n        // Smaller step size during startup. This prevents from using\n        // unrealistic values causing overflow.\n        delta = FACTOR_Q7_STARTUP;\n      }\n    }\n    // update log quantile estimate\n    tmp16 = (int16_t)((delta * countDiv) >> 14);\n    if (lmagn[i] > inst->noiseEstLogQuantile[offset + i]) {\n      // +=QUANTILE*delta/(inst->counter[s]+1) QUANTILE=0.25, =1 in Q2\n      // CounterDiv=1/(inst->counter[s]+1) in Q15\n      tmp16 += 2;\n      inst->noiseEstLogQuantile[offset + i] += tmp16 / 4;\n    } else {\n      tmp16 += 1;\n      // *(1-QUANTILE), in Q2 QUANTILE=0.25, 1-0.25=0.75=3 in Q2\n      // TODO(bjornv): investigate why we need to truncate twice.\n      tmp16no2 = (int16_t)((tmp16 / 2) * 3 / 2);\n      inst->noiseEstLogQuantile[offset + i] -= tmp16no2;\n      if (inst->noiseEstLogQuantile[offset + i] < logval) {\n        // logval is the smallest fixed point representation we can have.\n        // Values below that will correspond to values in the interval\n        // [0, 1], which can't possibly occur.\n        inst->noiseEstLogQuantile[offset + i] = logval;\n      }\n    }\n\n    // update density estimate\n    if (WEBRTC_SPL_ABS_W16(lmagn[i] - inst->noiseEstLogQuantile[offset + i])\n        < WIDTH_Q8) {\n      tmp16no1 = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(\n                   inst->noiseEstDensity[offset + i], countProd, 15);\n      tmp16no2 = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(\n                   width_factor, countDiv, 15);\n      inst->noiseEstDensity[offset + i] = tmp16no1 + tmp16no2;\n    }\n\n\n    if (counter >= END_STARTUP_LONG) {\n      inst->noiseEstCounter[s] = 0;\n      if (inst->blockIndex >= END_STARTUP_LONG) {\n        UpdateNoiseEstimateNeon(inst, offset);\n      }\n    }\n    inst->noiseEstCounter[s]++;\n\n  }  // end loop over simultaneous estimates\n\n  // Sequentially update the noise during startup\n  if (inst->blockIndex < END_STARTUP_LONG) {\n    UpdateNoiseEstimateNeon(inst, offset);\n  }\n\n  for (i = 0; i < inst->magnLen; i++) {\n    noise[i] = (uint32_t)(inst->noiseEstQuantile[i]); // Q(qNoise)\n  }\n  (*q_noise) = (int16_t)inst->qNoise;\n}\n\n// Filter the data in the frequency domain, and create spectrum.\nvoid WebRtcNsx_PrepareSpectrumNeon(NoiseSuppressionFixedC* inst,\n                                   int16_t* freq_buf) {\n  RTC_DCHECK_EQ(1, inst->magnLen % 8);\n  RTC_DCHECK_EQ(0, inst->anaLen2 % 16);\n\n  // (1) Filtering.\n\n  // Fixed point C code for the next block is as follows:\n  // for (i = 0; i < inst->magnLen; i++) {\n  //   inst->real[i] = (int16_t)((inst->real[i] *\n  //      (int16_t)(inst->noiseSupFilter[i])) >> 14);  // Q(normData-stages)\n  //   inst->imag[i] = (int16_t)((inst->imag[i] *\n  //      (int16_t)(inst->noiseSupFilter[i])) >> 14);  // Q(normData-stages)\n  // }\n\n  int16_t* preal = &inst->real[0];\n  int16_t* pimag = &inst->imag[0];\n  int16_t* pns_filter = (int16_t*)&inst->noiseSupFilter[0];\n  int16_t* pimag_end = pimag + inst->magnLen - 4;\n\n  while (pimag < pimag_end) {\n    int16x8_t real = vld1q_s16(preal);\n    int16x8_t imag = vld1q_s16(pimag);\n    int16x8_t ns_filter = vld1q_s16(pns_filter);\n\n    int32x4_t tmp_r_0 = vmull_s16(vget_low_s16(real), vget_low_s16(ns_filter));\n    int32x4_t tmp_i_0 = vmull_s16(vget_low_s16(imag), vget_low_s16(ns_filter));\n    int32x4_t tmp_r_1 = vmull_s16(vget_high_s16(real),\n                                  vget_high_s16(ns_filter));\n    int32x4_t tmp_i_1 = vmull_s16(vget_high_s16(imag),\n                                  vget_high_s16(ns_filter));\n\n    int16x4_t result_r_0 = vshrn_n_s32(tmp_r_0, 14);\n    int16x4_t result_i_0 = vshrn_n_s32(tmp_i_0, 14);\n    int16x4_t result_r_1 = vshrn_n_s32(tmp_r_1, 14);\n    int16x4_t result_i_1 = vshrn_n_s32(tmp_i_1, 14);\n\n    vst1q_s16(preal, vcombine_s16(result_r_0, result_r_1));\n    vst1q_s16(pimag, vcombine_s16(result_i_0, result_i_1));\n    preal += 8;\n    pimag += 8;\n    pns_filter += 8;\n  }\n\n  // Filter the last element\n  *preal = (int16_t)((*preal * *pns_filter) >> 14);\n  *pimag = (int16_t)((*pimag * *pns_filter) >> 14);\n\n  // (2) Create spectrum.\n\n  // Fixed point C code for the rest of the function is as follows:\n  // freq_buf[0] = inst->real[0];\n  // freq_buf[1] = -inst->imag[0];\n  // for (i = 1, j = 2; i < inst->anaLen2; i += 1, j += 2) {\n  //   freq_buf[j] = inst->real[i];\n  //   freq_buf[j + 1] = -inst->imag[i];\n  // }\n  // freq_buf[inst->anaLen] = inst->real[inst->anaLen2];\n  // freq_buf[inst->anaLen + 1] = -inst->imag[inst->anaLen2];\n\n  preal = &inst->real[0];\n  pimag = &inst->imag[0];\n  pimag_end = pimag + inst->anaLen2;\n  int16_t * freq_buf_start = freq_buf;\n  while (pimag < pimag_end) {\n    // loop unroll\n    int16x8x2_t real_imag_0;\n    int16x8x2_t real_imag_1;\n    real_imag_0.val[1] = vld1q_s16(pimag);\n    real_imag_0.val[0] = vld1q_s16(preal);\n    preal += 8;\n    pimag += 8;\n    real_imag_1.val[1] = vld1q_s16(pimag);\n    real_imag_1.val[0] = vld1q_s16(preal);\n    preal += 8;\n    pimag += 8;\n\n    real_imag_0.val[1] = vnegq_s16(real_imag_0.val[1]);\n    real_imag_1.val[1] = vnegq_s16(real_imag_1.val[1]);\n    vst2q_s16(freq_buf_start, real_imag_0);\n    freq_buf_start += 16;\n    vst2q_s16(freq_buf_start, real_imag_1);\n    freq_buf_start += 16;\n  }\n  freq_buf[inst->anaLen] = inst->real[inst->anaLen2];\n  freq_buf[inst->anaLen + 1] = -inst->imag[inst->anaLen2];\n}\n\n// For the noise supress process, synthesis, read out fully processed segment,\n// and update synthesis buffer.\nvoid WebRtcNsx_SynthesisUpdateNeon(NoiseSuppressionFixedC* inst,\n                                   int16_t* out_frame,\n                                   int16_t gain_factor) {\n  RTC_DCHECK_EQ(0, inst->anaLen % 16);\n  RTC_DCHECK_EQ(0, inst->blockLen10ms % 16);\n\n  int16_t* preal_start = inst->real;\n  const int16_t* pwindow = inst->window;\n  int16_t* preal_end = preal_start + inst->anaLen;\n  int16_t* psynthesis_buffer = inst->synthesisBuffer;\n\n  while (preal_start < preal_end) {\n    // Loop unroll.\n    int16x8_t window_0 = vld1q_s16(pwindow);\n    int16x8_t real_0 = vld1q_s16(preal_start);\n    int16x8_t synthesis_buffer_0 = vld1q_s16(psynthesis_buffer);\n\n    int16x8_t window_1 = vld1q_s16(pwindow + 8);\n    int16x8_t real_1 = vld1q_s16(preal_start + 8);\n    int16x8_t synthesis_buffer_1 = vld1q_s16(psynthesis_buffer + 8);\n\n    int32x4_t tmp32a_0_low = vmull_s16(vget_low_s16(real_0),\n                                       vget_low_s16(window_0));\n    int32x4_t tmp32a_0_high = vmull_s16(vget_high_s16(real_0),\n                                        vget_high_s16(window_0));\n\n    int32x4_t tmp32a_1_low = vmull_s16(vget_low_s16(real_1),\n                                       vget_low_s16(window_1));\n    int32x4_t tmp32a_1_high = vmull_s16(vget_high_s16(real_1),\n                                        vget_high_s16(window_1));\n\n    int16x4_t tmp16a_0_low = vqrshrn_n_s32(tmp32a_0_low, 14);\n    int16x4_t tmp16a_0_high = vqrshrn_n_s32(tmp32a_0_high, 14);\n\n    int16x4_t tmp16a_1_low = vqrshrn_n_s32(tmp32a_1_low, 14);\n    int16x4_t tmp16a_1_high = vqrshrn_n_s32(tmp32a_1_high, 14);\n\n    int32x4_t tmp32b_0_low = vmull_n_s16(tmp16a_0_low, gain_factor);\n    int32x4_t tmp32b_0_high = vmull_n_s16(tmp16a_0_high, gain_factor);\n\n    int32x4_t tmp32b_1_low = vmull_n_s16(tmp16a_1_low, gain_factor);\n    int32x4_t tmp32b_1_high = vmull_n_s16(tmp16a_1_high, gain_factor);\n\n    int16x4_t tmp16b_0_low = vqrshrn_n_s32(tmp32b_0_low, 13);\n    int16x4_t tmp16b_0_high = vqrshrn_n_s32(tmp32b_0_high, 13);\n\n    int16x4_t tmp16b_1_low = vqrshrn_n_s32(tmp32b_1_low, 13);\n    int16x4_t tmp16b_1_high = vqrshrn_n_s32(tmp32b_1_high, 13);\n\n    synthesis_buffer_0 = vqaddq_s16(vcombine_s16(tmp16b_0_low, tmp16b_0_high),\n                                    synthesis_buffer_0);\n    synthesis_buffer_1 = vqaddq_s16(vcombine_s16(tmp16b_1_low, tmp16b_1_high),\n                                    synthesis_buffer_1);\n    vst1q_s16(psynthesis_buffer, synthesis_buffer_0);\n    vst1q_s16(psynthesis_buffer + 8, synthesis_buffer_1);\n\n    pwindow += 16;\n    preal_start += 16;\n    psynthesis_buffer += 16;\n  }\n\n  // Read out fully processed segment.\n  int16_t * p_start = inst->synthesisBuffer;\n  int16_t * p_end = inst->synthesisBuffer + inst->blockLen10ms;\n  int16_t * p_frame = out_frame;\n  while (p_start < p_end) {\n    int16x8_t frame_0 = vld1q_s16(p_start);\n    vst1q_s16(p_frame, frame_0);\n    p_start += 8;\n    p_frame += 8;\n  }\n\n  // Update synthesis buffer.\n  int16_t* p_start_src = inst->synthesisBuffer + inst->blockLen10ms;\n  int16_t* p_end_src = inst->synthesisBuffer + inst->anaLen;\n  int16_t* p_start_dst = inst->synthesisBuffer;\n  while (p_start_src < p_end_src) {\n    int16x8_t frame = vld1q_s16(p_start_src);\n    vst1q_s16(p_start_dst, frame);\n    p_start_src += 8;\n    p_start_dst += 8;\n  }\n\n  p_start = inst->synthesisBuffer + inst->anaLen - inst->blockLen10ms;\n  p_end = p_start + inst->blockLen10ms;\n  int16x8_t zero = vdupq_n_s16(0);\n  for (;p_start < p_end; p_start += 8) {\n    vst1q_s16(p_start, zero);\n  }\n}\n\n// Update analysis buffer for lower band, and window data before FFT.\nvoid WebRtcNsx_AnalysisUpdateNeon(NoiseSuppressionFixedC* inst,\n                                  int16_t* out,\n                                  int16_t* new_speech) {\n  RTC_DCHECK_EQ(0, inst->blockLen10ms % 16);\n  RTC_DCHECK_EQ(0, inst->anaLen % 16);\n\n  // For lower band update analysis buffer.\n  // memcpy(inst->analysisBuffer, inst->analysisBuffer + inst->blockLen10ms,\n  //     (inst->anaLen - inst->blockLen10ms) * sizeof(*inst->analysisBuffer));\n  int16_t* p_start_src = inst->analysisBuffer + inst->blockLen10ms;\n  int16_t* p_end_src = inst->analysisBuffer + inst->anaLen;\n  int16_t* p_start_dst = inst->analysisBuffer;\n  while (p_start_src < p_end_src) {\n    int16x8_t frame = vld1q_s16(p_start_src);\n    vst1q_s16(p_start_dst, frame);\n\n    p_start_src += 8;\n    p_start_dst += 8;\n  }\n\n  // memcpy(inst->analysisBuffer + inst->anaLen - inst->blockLen10ms,\n  //     new_speech, inst->blockLen10ms * sizeof(*inst->analysisBuffer));\n  p_start_src = new_speech;\n  p_end_src = new_speech + inst->blockLen10ms;\n  p_start_dst = inst->analysisBuffer + inst->anaLen - inst->blockLen10ms;\n  while (p_start_src < p_end_src) {\n    int16x8_t frame = vld1q_s16(p_start_src);\n    vst1q_s16(p_start_dst, frame);\n\n    p_start_src += 8;\n    p_start_dst += 8;\n  }\n\n  // Window data before FFT.\n  int16_t* p_start_window = (int16_t*) inst->window;\n  int16_t* p_start_buffer = inst->analysisBuffer;\n  int16_t* p_end_buffer = inst->analysisBuffer + inst->anaLen;\n  int16_t* p_start_out = out;\n\n  // Load the first element to reduce pipeline bubble.\n  int16x8_t window = vld1q_s16(p_start_window);\n  int16x8_t buffer = vld1q_s16(p_start_buffer);\n  p_start_window += 8;\n  p_start_buffer += 8;\n\n  while (p_start_buffer < p_end_buffer) {\n    // Unroll loop.\n    int32x4_t tmp32_low = vmull_s16(vget_low_s16(window), vget_low_s16(buffer));\n    int32x4_t tmp32_high = vmull_s16(vget_high_s16(window),\n                                     vget_high_s16(buffer));\n    window = vld1q_s16(p_start_window);\n    buffer = vld1q_s16(p_start_buffer);\n\n    int16x4_t result_low = vrshrn_n_s32(tmp32_low, 14);\n    int16x4_t result_high = vrshrn_n_s32(tmp32_high, 14);\n    vst1q_s16(p_start_out, vcombine_s16(result_low, result_high));\n\n    p_start_buffer += 8;\n    p_start_window += 8;\n    p_start_out += 8;\n  }\n  int32x4_t tmp32_low = vmull_s16(vget_low_s16(window), vget_low_s16(buffer));\n  int32x4_t tmp32_high = vmull_s16(vget_high_s16(window),\n                                   vget_high_s16(buffer));\n\n  int16x4_t result_low = vrshrn_n_s32(tmp32_low, 14);\n  int16x4_t result_high = vrshrn_n_s32(tmp32_high, 14);\n  vst1q_s16(p_start_out, vcombine_s16(result_low, result_high));\n}\n\n#endif\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/nsx_defines.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_\n\n#define ANAL_BLOCKL_MAX         256 /* Max analysis block length */\n#define HALF_ANAL_BLOCKL        129 /* Half max analysis block length + 1 */\n#define NUM_HIGH_BANDS_MAX      2   /* Max number of high bands */\n#define SIMULT                  3\n#define END_STARTUP_LONG        200\n#define END_STARTUP_SHORT       50\n#define FACTOR_Q16              2621440 /* 40 in Q16 */\n#define FACTOR_Q7               5120 /* 40 in Q7 */\n#define FACTOR_Q7_STARTUP       1024 /* 8 in Q7 */\n#define WIDTH_Q8                3 /* 0.01 in Q8 (or 25 ) */\n\n/* PARAMETERS FOR NEW METHOD */\n#define DD_PR_SNR_Q11           2007 /* ~= Q11(0.98) DD update of prior SNR */\n#define ONE_MINUS_DD_PR_SNR_Q11 41 /* DD update of prior SNR */\n#define SPECT_FLAT_TAVG_Q14     4915 /* (0.30) tavg parameter for spectral flatness measure */\n#define SPECT_DIFF_TAVG_Q8      77 /* (0.30) tavg parameter for spectral flatness measure */\n#define PRIOR_UPDATE_Q14        1638 /* Q14(0.1) Update parameter of prior model */\n#define NOISE_UPDATE_Q8         26 /* 26 ~= Q8(0.1) Update parameter for noise */\n\n/* Probability threshold for noise state in speech/noise likelihood. */\n#define ONE_MINUS_PROB_RANGE_Q8 205 /* 205 ~= Q8(0.8) */\n#define HIST_PAR_EST            1000 /* Histogram size for estimation of parameters */\n\n/* FEATURE EXTRACTION CONFIG  */\n/* Bin size of histogram */\n#define BIN_SIZE_LRT            10\n/* Scale parameters: multiply dominant peaks of the histograms by scale factor to obtain. */\n/* Thresholds for prior model */\n#define FACTOR_1_LRT_DIFF       6 /* For LRT and spectral difference (5 times bigger) */\n/* For spectral_flatness: used when noise is flatter than speech (10 times bigger). */\n#define FACTOR_2_FLAT_Q10       922\n/* Peak limit for spectral flatness (varies between 0 and 1) */\n#define THRES_PEAK_FLAT         24 /* * 2 * BIN_SIZE_FLAT_FX */\n/* Limit on spacing of two highest peaks in histogram: spacing determined by bin size. */\n#define LIM_PEAK_SPACE_FLAT_DIFF    4 /* * 2 * BIN_SIZE_DIFF_FX */\n/* Limit on relevance of second peak */\n#define LIM_PEAK_WEIGHT_FLAT_DIFF   2\n#define THRES_FLUCT_LRT         10240 /* = 20 * inst->modelUpdate; fluctuation limit of LRT feat. */\n/* Limit on the max and min values for the feature thresholds */\n#define MAX_FLAT_Q10            38912 /*  * 2 * BIN_SIZE_FLAT_FX */\n#define MIN_FLAT_Q10            4096 /*  * 2 * BIN_SIZE_FLAT_FX */\n#define MAX_DIFF                100 /* * 2 * BIN_SIZE_DIFF_FX */\n#define MIN_DIFF                16 /* * 2 * BIN_SIZE_DIFF_FX */\n/* Criteria of weight of histogram peak  to accept/reject feature */\n#define THRES_WEIGHT_FLAT_DIFF  154 /*(int)(0.3*(inst->modelUpdate)) for flatness and difference */\n\n#define STAT_UPDATES            9 /* Update every 512 = 1 << 9 block */\n#define ONE_MINUS_GAMMA_PAUSE_Q8    13 /* ~= Q8(0.05) Update for conservative noise estimate */\n#define GAMMA_NOISE_TRANS_AND_SPEECH_Q8 3 /* ~= Q8(0.01) Update for transition and noise region */\n\n#endif /* WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_NSX_DEFINES_H_ */\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/ns/windows_private.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_\n\n// Hanning window for 4ms 16kHz\nstatic const float kHanning64w128[128] = {\n  0.00000000000000f, 0.02454122852291f, 0.04906767432742f,\n  0.07356456359967f, 0.09801714032956f, 0.12241067519922f,\n  0.14673047445536f, 0.17096188876030f, 0.19509032201613f,\n  0.21910124015687f, 0.24298017990326f, 0.26671275747490f,\n  0.29028467725446f, 0.31368174039889f, 0.33688985339222f,\n  0.35989503653499f, 0.38268343236509f, 0.40524131400499f,\n  0.42755509343028f, 0.44961132965461f, 0.47139673682600f,\n  0.49289819222978f, 0.51410274419322f, 0.53499761988710f,\n  0.55557023301960f, 0.57580819141785f, 0.59569930449243f,\n  0.61523159058063f, 0.63439328416365f, 0.65317284295378f,\n  0.67155895484702f, 0.68954054473707f, 0.70710678118655f,\n  0.72424708295147f, 0.74095112535496f, 0.75720884650648f,\n  0.77301045336274f, 0.78834642762661f, 0.80320753148064f,\n  0.81758481315158f, 0.83146961230255f, 0.84485356524971f,\n  0.85772861000027f, 0.87008699110871f, 0.88192126434835f,\n  0.89322430119552f, 0.90398929312344f, 0.91420975570353f,\n  0.92387953251129f, 0.93299279883474f, 0.94154406518302f,\n  0.94952818059304f, 0.95694033573221f, 0.96377606579544f,\n  0.97003125319454f, 0.97570213003853f, 0.98078528040323f,\n  0.98527764238894f, 0.98917650996478f, 0.99247953459871f,\n  0.99518472667220f, 0.99729045667869f, 0.99879545620517f,\n  0.99969881869620f, 1.00000000000000f,\n  0.99969881869620f, 0.99879545620517f, 0.99729045667869f,\n  0.99518472667220f, 0.99247953459871f, 0.98917650996478f,\n  0.98527764238894f, 0.98078528040323f, 0.97570213003853f,\n  0.97003125319454f, 0.96377606579544f, 0.95694033573221f,\n  0.94952818059304f, 0.94154406518302f, 0.93299279883474f,\n  0.92387953251129f, 0.91420975570353f, 0.90398929312344f,\n  0.89322430119552f, 0.88192126434835f, 0.87008699110871f,\n  0.85772861000027f, 0.84485356524971f, 0.83146961230255f,\n  0.81758481315158f, 0.80320753148064f, 0.78834642762661f,\n  0.77301045336274f, 0.75720884650648f, 0.74095112535496f,\n  0.72424708295147f, 0.70710678118655f, 0.68954054473707f,\n  0.67155895484702f, 0.65317284295378f, 0.63439328416365f,\n  0.61523159058063f, 0.59569930449243f, 0.57580819141785f,\n  0.55557023301960f, 0.53499761988710f, 0.51410274419322f,\n  0.49289819222978f, 0.47139673682600f, 0.44961132965461f,\n  0.42755509343028f, 0.40524131400499f, 0.38268343236509f,\n  0.35989503653499f, 0.33688985339222f, 0.31368174039889f,\n  0.29028467725446f, 0.26671275747490f, 0.24298017990326f,\n  0.21910124015687f, 0.19509032201613f, 0.17096188876030f,\n  0.14673047445536f, 0.12241067519922f, 0.09801714032956f,\n  0.07356456359967f, 0.04906767432742f, 0.02454122852291f\n};\n\n\n\n// hybrib Hanning & flat window\nstatic const float kBlocks80w128[128] = {\n  (float)0.00000000, (float)0.03271908, (float)0.06540313, (float)0.09801714, (float)0.13052619,\n  (float)0.16289547, (float)0.19509032, (float)0.22707626, (float)0.25881905, (float)0.29028468,\n  (float)0.32143947, (float)0.35225005, (float)0.38268343, (float)0.41270703, (float)0.44228869,\n  (float)0.47139674, (float)0.50000000, (float)0.52806785, (float)0.55557023, (float)0.58247770,\n  (float)0.60876143, (float)0.63439328, (float)0.65934582, (float)0.68359230, (float)0.70710678,\n  (float)0.72986407, (float)0.75183981, (float)0.77301045, (float)0.79335334, (float)0.81284668,\n  (float)0.83146961, (float)0.84920218, (float)0.86602540, (float)0.88192126, (float)0.89687274,\n  (float)0.91086382, (float)0.92387953, (float)0.93590593, (float)0.94693013, (float)0.95694034,\n  (float)0.96592583, (float)0.97387698, (float)0.98078528, (float)0.98664333, (float)0.99144486,\n  (float)0.99518473, (float)0.99785892, (float)0.99946459, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)0.99946459, (float)0.99785892, (float)0.99518473, (float)0.99144486,\n  (float)0.98664333, (float)0.98078528, (float)0.97387698, (float)0.96592583, (float)0.95694034,\n  (float)0.94693013, (float)0.93590593, (float)0.92387953, (float)0.91086382, (float)0.89687274,\n  (float)0.88192126, (float)0.86602540, (float)0.84920218, (float)0.83146961, (float)0.81284668,\n  (float)0.79335334, (float)0.77301045, (float)0.75183981, (float)0.72986407, (float)0.70710678,\n  (float)0.68359230, (float)0.65934582, (float)0.63439328, (float)0.60876143, (float)0.58247770,\n  (float)0.55557023, (float)0.52806785, (float)0.50000000, (float)0.47139674, (float)0.44228869,\n  (float)0.41270703, (float)0.38268343, (float)0.35225005, (float)0.32143947, (float)0.29028468,\n  (float)0.25881905, (float)0.22707626, (float)0.19509032, (float)0.16289547, (float)0.13052619,\n  (float)0.09801714, (float)0.06540313, (float)0.03271908\n};\n\n// hybrib Hanning & flat window\nstatic const float kBlocks160w256[256] = {\n  (float)0.00000000, (float)0.01636173, (float)0.03271908, (float)0.04906767, (float)0.06540313,\n  (float)0.08172107, (float)0.09801714, (float)0.11428696, (float)0.13052619, (float)0.14673047,\n  (float)0.16289547, (float)0.17901686, (float)0.19509032, (float)0.21111155, (float)0.22707626,\n  (float)0.24298018, (float)0.25881905, (float)0.27458862, (float)0.29028468, (float)0.30590302,\n  (float)0.32143947, (float)0.33688985, (float)0.35225005, (float)0.36751594, (float)0.38268343,\n  (float)0.39774847, (float)0.41270703, (float)0.42755509, (float)0.44228869, (float)0.45690388,\n  (float)0.47139674, (float)0.48576339, (float)0.50000000, (float)0.51410274, (float)0.52806785,\n  (float)0.54189158, (float)0.55557023, (float)0.56910015, (float)0.58247770, (float)0.59569930,\n  (float)0.60876143, (float)0.62166057, (float)0.63439328, (float)0.64695615, (float)0.65934582,\n  (float)0.67155895, (float)0.68359230, (float)0.69544264, (float)0.70710678, (float)0.71858162,\n  (float)0.72986407, (float)0.74095113, (float)0.75183981, (float)0.76252720, (float)0.77301045,\n  (float)0.78328675, (float)0.79335334, (float)0.80320753, (float)0.81284668, (float)0.82226822,\n  (float)0.83146961, (float)0.84044840, (float)0.84920218, (float)0.85772861, (float)0.86602540,\n  (float)0.87409034, (float)0.88192126, (float)0.88951608, (float)0.89687274, (float)0.90398929,\n  (float)0.91086382, (float)0.91749450, (float)0.92387953, (float)0.93001722, (float)0.93590593,\n  (float)0.94154407, (float)0.94693013, (float)0.95206268, (float)0.95694034, (float)0.96156180,\n  (float)0.96592583, (float)0.97003125, (float)0.97387698, (float)0.97746197, (float)0.98078528,\n  (float)0.98384601, (float)0.98664333, (float)0.98917651, (float)0.99144486, (float)0.99344778,\n  (float)0.99518473, (float)0.99665524, (float)0.99785892, (float)0.99879546, (float)0.99946459,\n  (float)0.99986614, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)0.99986614, (float)0.99946459, (float)0.99879546, (float)0.99785892,\n  (float)0.99665524, (float)0.99518473, (float)0.99344778, (float)0.99144486, (float)0.98917651,\n  (float)0.98664333, (float)0.98384601, (float)0.98078528, (float)0.97746197, (float)0.97387698,\n  (float)0.97003125, (float)0.96592583, (float)0.96156180, (float)0.95694034, (float)0.95206268,\n  (float)0.94693013, (float)0.94154407, (float)0.93590593, (float)0.93001722, (float)0.92387953,\n  (float)0.91749450, (float)0.91086382, (float)0.90398929, (float)0.89687274, (float)0.88951608,\n  (float)0.88192126, (float)0.87409034, (float)0.86602540, (float)0.85772861, (float)0.84920218,\n  (float)0.84044840, (float)0.83146961, (float)0.82226822, (float)0.81284668, (float)0.80320753,\n  (float)0.79335334, (float)0.78328675, (float)0.77301045, (float)0.76252720, (float)0.75183981,\n  (float)0.74095113, (float)0.72986407, (float)0.71858162, (float)0.70710678, (float)0.69544264,\n  (float)0.68359230, (float)0.67155895, (float)0.65934582, (float)0.64695615, (float)0.63439328,\n  (float)0.62166057, (float)0.60876143, (float)0.59569930, (float)0.58247770, (float)0.56910015,\n  (float)0.55557023, (float)0.54189158, (float)0.52806785, (float)0.51410274, (float)0.50000000,\n  (float)0.48576339, (float)0.47139674, (float)0.45690388, (float)0.44228869, (float)0.42755509,\n  (float)0.41270703, (float)0.39774847, (float)0.38268343, (float)0.36751594, (float)0.35225005,\n  (float)0.33688985, (float)0.32143947, (float)0.30590302, (float)0.29028468, (float)0.27458862,\n  (float)0.25881905, (float)0.24298018, (float)0.22707626, (float)0.21111155, (float)0.19509032,\n  (float)0.17901686, (float)0.16289547, (float)0.14673047, (float)0.13052619, (float)0.11428696,\n  (float)0.09801714, (float)0.08172107, (float)0.06540313, (float)0.04906767, (float)0.03271908,\n  (float)0.01636173\n};\n\n// hybrib Hanning & flat window: for 20ms\nstatic const float kBlocks320w512[512] = {\n  (float)0.00000000, (float)0.00818114, (float)0.01636173, (float)0.02454123, (float)0.03271908,\n  (float)0.04089475, (float)0.04906767, (float)0.05723732, (float)0.06540313, (float)0.07356456,\n  (float)0.08172107, (float)0.08987211, (float)0.09801714, (float)0.10615561, (float)0.11428696,\n  (float)0.12241068, (float)0.13052619, (float)0.13863297, (float)0.14673047, (float)0.15481816,\n  (float)0.16289547, (float)0.17096189, (float)0.17901686, (float)0.18705985, (float)0.19509032,\n  (float)0.20310773, (float)0.21111155, (float)0.21910124, (float)0.22707626, (float)0.23503609,\n  (float)0.24298018, (float)0.25090801, (float)0.25881905, (float)0.26671276, (float)0.27458862,\n  (float)0.28244610, (float)0.29028468, (float)0.29810383, (float)0.30590302, (float)0.31368174,\n  (float)0.32143947, (float)0.32917568, (float)0.33688985, (float)0.34458148, (float)0.35225005,\n  (float)0.35989504, (float)0.36751594, (float)0.37511224, (float)0.38268343, (float)0.39022901,\n  (float)0.39774847, (float)0.40524131, (float)0.41270703, (float)0.42014512, (float)0.42755509,\n  (float)0.43493645, (float)0.44228869, (float)0.44961133, (float)0.45690388, (float)0.46416584,\n  (float)0.47139674, (float)0.47859608, (float)0.48576339, (float)0.49289819, (float)0.50000000,\n  (float)0.50706834, (float)0.51410274, (float)0.52110274, (float)0.52806785, (float)0.53499762,\n  (float)0.54189158, (float)0.54874927, (float)0.55557023, (float)0.56235401, (float)0.56910015,\n  (float)0.57580819, (float)0.58247770, (float)0.58910822, (float)0.59569930, (float)0.60225052,\n  (float)0.60876143, (float)0.61523159, (float)0.62166057, (float)0.62804795, (float)0.63439328,\n  (float)0.64069616, (float)0.64695615, (float)0.65317284, (float)0.65934582, (float)0.66547466,\n  (float)0.67155895, (float)0.67759830, (float)0.68359230, (float)0.68954054, (float)0.69544264,\n  (float)0.70129818, (float)0.70710678, (float)0.71286806, (float)0.71858162, (float)0.72424708,\n  (float)0.72986407, (float)0.73543221, (float)0.74095113, (float)0.74642045, (float)0.75183981,\n  (float)0.75720885, (float)0.76252720, (float)0.76779452, (float)0.77301045, (float)0.77817464,\n  (float)0.78328675, (float)0.78834643, (float)0.79335334, (float)0.79830715, (float)0.80320753,\n  (float)0.80805415, (float)0.81284668, (float)0.81758481, (float)0.82226822, (float)0.82689659,\n  (float)0.83146961, (float)0.83598698, (float)0.84044840, (float)0.84485357, (float)0.84920218,\n  (float)0.85349396, (float)0.85772861, (float)0.86190585, (float)0.86602540, (float)0.87008699,\n  (float)0.87409034, (float)0.87803519, (float)0.88192126, (float)0.88574831, (float)0.88951608,\n  (float)0.89322430, (float)0.89687274, (float)0.90046115, (float)0.90398929, (float)0.90745693,\n  (float)0.91086382, (float)0.91420976, (float)0.91749450, (float)0.92071783, (float)0.92387953,\n  (float)0.92697940, (float)0.93001722, (float)0.93299280, (float)0.93590593, (float)0.93875641,\n  (float)0.94154407, (float)0.94426870, (float)0.94693013, (float)0.94952818, (float)0.95206268,\n  (float)0.95453345, (float)0.95694034, (float)0.95928317, (float)0.96156180, (float)0.96377607,\n  (float)0.96592583, (float)0.96801094, (float)0.97003125, (float)0.97198664, (float)0.97387698,\n  (float)0.97570213, (float)0.97746197, (float)0.97915640, (float)0.98078528, (float)0.98234852,\n  (float)0.98384601, (float)0.98527764, (float)0.98664333, (float)0.98794298, (float)0.98917651,\n  (float)0.99034383, (float)0.99144486, (float)0.99247953, (float)0.99344778, (float)0.99434953,\n  (float)0.99518473, (float)0.99595331, (float)0.99665524, (float)0.99729046, (float)0.99785892,\n  (float)0.99836060, (float)0.99879546, (float)0.99916346, (float)0.99946459, (float)0.99969882,\n  (float)0.99986614, (float)0.99996653, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000, (float)1.00000000,\n  (float)1.00000000, (float)0.99996653, (float)0.99986614, (float)0.99969882, (float)0.99946459,\n  (float)0.99916346, (float)0.99879546, (float)0.99836060, (float)0.99785892, (float)0.99729046,\n  (float)0.99665524, (float)0.99595331, (float)0.99518473, (float)0.99434953, (float)0.99344778,\n  (float)0.99247953, (float)0.99144486, (float)0.99034383, (float)0.98917651, (float)0.98794298,\n  (float)0.98664333, (float)0.98527764, (float)0.98384601, (float)0.98234852, (float)0.98078528,\n  (float)0.97915640, (float)0.97746197, (float)0.97570213, (float)0.97387698, (float)0.97198664,\n  (float)0.97003125, (float)0.96801094, (float)0.96592583, (float)0.96377607, (float)0.96156180,\n  (float)0.95928317, (float)0.95694034, (float)0.95453345, (float)0.95206268, (float)0.94952818,\n  (float)0.94693013, (float)0.94426870, (float)0.94154407, (float)0.93875641, (float)0.93590593,\n  (float)0.93299280, (float)0.93001722, (float)0.92697940, (float)0.92387953, (float)0.92071783,\n  (float)0.91749450, (float)0.91420976, (float)0.91086382, (float)0.90745693, (float)0.90398929,\n  (float)0.90046115, (float)0.89687274, (float)0.89322430, (float)0.88951608, (float)0.88574831,\n  (float)0.88192126, (float)0.87803519, (float)0.87409034, (float)0.87008699, (float)0.86602540,\n  (float)0.86190585, (float)0.85772861, (float)0.85349396, (float)0.84920218, (float)0.84485357,\n  (float)0.84044840, (float)0.83598698, (float)0.83146961, (float)0.82689659, (float)0.82226822,\n  (float)0.81758481, (float)0.81284668, (float)0.80805415, (float)0.80320753, (float)0.79830715,\n  (float)0.79335334, (float)0.78834643, (float)0.78328675, (float)0.77817464, (float)0.77301045,\n  (float)0.76779452, (float)0.76252720, (float)0.75720885, (float)0.75183981, (float)0.74642045,\n  (float)0.74095113, (float)0.73543221, (float)0.72986407, (float)0.72424708, (float)0.71858162,\n  (float)0.71286806, (float)0.70710678, (float)0.70129818, (float)0.69544264, (float)0.68954054,\n  (float)0.68359230, (float)0.67759830, (float)0.67155895, (float)0.66547466, (float)0.65934582,\n  (float)0.65317284, (float)0.64695615, (float)0.64069616, (float)0.63439328, (float)0.62804795,\n  (float)0.62166057, (float)0.61523159, (float)0.60876143, (float)0.60225052, (float)0.59569930,\n  (float)0.58910822, (float)0.58247770, (float)0.57580819, (float)0.56910015, (float)0.56235401,\n  (float)0.55557023, (float)0.54874927, (float)0.54189158, (float)0.53499762, (float)0.52806785,\n  (float)0.52110274, (float)0.51410274, (float)0.50706834, (float)0.50000000, (float)0.49289819,\n  (float)0.48576339, (float)0.47859608, (float)0.47139674, (float)0.46416584, (float)0.45690388,\n  (float)0.44961133, (float)0.44228869, (float)0.43493645, (float)0.42755509, (float)0.42014512,\n  (float)0.41270703, (float)0.40524131, (float)0.39774847, (float)0.39022901, (float)0.38268343,\n  (float)0.37511224, (float)0.36751594, (float)0.35989504, (float)0.35225005, (float)0.34458148,\n  (float)0.33688985, (float)0.32917568, (float)0.32143947, (float)0.31368174, (float)0.30590302,\n  (float)0.29810383, (float)0.29028468, (float)0.28244610, (float)0.27458862, (float)0.26671276,\n  (float)0.25881905, (float)0.25090801, (float)0.24298018, (float)0.23503609, (float)0.22707626,\n  (float)0.21910124, (float)0.21111155, (float)0.20310773, (float)0.19509032, (float)0.18705985,\n  (float)0.17901686, (float)0.17096189, (float)0.16289547, (float)0.15481816, (float)0.14673047,\n  (float)0.13863297, (float)0.13052619, (float)0.12241068, (float)0.11428696, (float)0.10615561,\n  (float)0.09801714, (float)0.08987211, (float)0.08172107, (float)0.07356456, (float)0.06540313,\n  (float)0.05723732, (float)0.04906767, (float)0.04089475, (float)0.03271908, (float)0.02454123,\n  (float)0.01636173, (float)0.00818114\n};\n\n\n// Hanning window: for 15ms at 16kHz with symmetric zeros\nstatic const float kBlocks240w512[512] = {\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00654494, (float)0.01308960, (float)0.01963369,\n  (float)0.02617695, (float)0.03271908, (float)0.03925982, (float)0.04579887, (float)0.05233596,\n  (float)0.05887080, (float)0.06540313, (float)0.07193266, (float)0.07845910, (float)0.08498218,\n  (float)0.09150162, (float)0.09801714, (float)0.10452846, (float)0.11103531, (float)0.11753740,\n  (float)0.12403446, (float)0.13052620, (float)0.13701233, (float)0.14349262, (float)0.14996676,\n  (float)0.15643448, (float)0.16289547, (float)0.16934951, (float)0.17579629, (float)0.18223552,\n  (float)0.18866697, (float)0.19509032, (float)0.20150533, (float)0.20791170, (float)0.21430916,\n  (float)0.22069745, (float)0.22707628, (float)0.23344538, (float)0.23980446, (float)0.24615330,\n  (float)0.25249159, (float)0.25881904, (float)0.26513544, (float)0.27144045, (float)0.27773386,\n  (float)0.28401536, (float)0.29028466, (float)0.29654160, (float)0.30278578, (float)0.30901700,\n  (float)0.31523499, (float)0.32143945, (float)0.32763019, (float)0.33380687, (float)0.33996925,\n  (float)0.34611708, (float)0.35225007, (float)0.35836795, (float)0.36447051, (float)0.37055743,\n  (float)0.37662852, (float)0.38268346, (float)0.38872197, (float)0.39474389, (float)0.40074885,\n  (float)0.40673664, (float)0.41270703, (float)0.41865975, (float)0.42459452, (float)0.43051112,\n  (float)0.43640924, (float)0.44228873, (float)0.44814920, (float)0.45399052, (float)0.45981237,\n  (float)0.46561453, (float)0.47139674, (float)0.47715878, (float)0.48290035, (float)0.48862126,\n  (float)0.49432120, (float)0.50000000, (float)0.50565743, (float)0.51129311, (float)0.51690692,\n  (float)0.52249855, (float)0.52806789, (float)0.53361452, (float)0.53913832, (float)0.54463905,\n  (float)0.55011642, (float)0.55557024, (float)0.56100029, (float)0.56640625, (float)0.57178795,\n  (float)0.57714522, (float)0.58247769, (float)0.58778524, (float)0.59306765, (float)0.59832460,\n  (float)0.60355598, (float)0.60876143, (float)0.61394083, (float)0.61909395, (float)0.62422055,\n  (float)0.62932038, (float)0.63439333, (float)0.63943899, (float)0.64445734, (float)0.64944810,\n  (float)0.65441096, (float)0.65934587, (float)0.66425246, (float)0.66913062, (float)0.67398012,\n  (float)0.67880076, (float)0.68359232, (float)0.68835455, (float)0.69308740, (float)0.69779050,\n  (float)0.70246369, (float)0.70710677, (float)0.71171963, (float)0.71630198, (float)0.72085363,\n  (float)0.72537440, (float)0.72986406, (float)0.73432255, (float)0.73874950, (float)0.74314487,\n  (float)0.74750835, (float)0.75183982, (float)0.75613910, (float)0.76040596, (float)0.76464027,\n  (float)0.76884186, (float)0.77301043, (float)0.77714598, (float)0.78124821, (float)0.78531694,\n  (float)0.78935206, (float)0.79335338, (float)0.79732066, (float)0.80125386, (float)0.80515265,\n  (float)0.80901700, (float)0.81284672, (float)0.81664157, (float)0.82040149, (float)0.82412618,\n  (float)0.82781565, (float)0.83146966, (float)0.83508795, (float)0.83867061, (float)0.84221727,\n  (float)0.84572780, (float)0.84920216, (float)0.85264021, (float)0.85604161, (float)0.85940641,\n  (float)0.86273444, (float)0.86602545, (float)0.86927933, (float)0.87249607, (float)0.87567532,\n  (float)0.87881714, (float)0.88192129, (float)0.88498765, (float)0.88801610, (float)0.89100653,\n  (float)0.89395881, (float)0.89687276, (float)0.89974827, (float)0.90258533, (float)0.90538365,\n  (float)0.90814316, (float)0.91086388, (float)0.91354549, (float)0.91618794, (float)0.91879123,\n  (float)0.92135513, (float)0.92387950, (float)0.92636442, (float)0.92880958, (float)0.93121493,\n  (float)0.93358046, (float)0.93590593, (float)0.93819135, (float)0.94043654, (float)0.94264150,\n  (float)0.94480604, (float)0.94693011, (float)0.94901365, (float)0.95105654, (float)0.95305866,\n  (float)0.95501995, (float)0.95694035, (float)0.95881975, (float)0.96065807, (float)0.96245527,\n  (float)0.96421117, (float)0.96592581, (float)0.96759909, (float)0.96923089, (float)0.97082120,\n  (float)0.97236991, (float)0.97387701, (float)0.97534233, (float)0.97676587, (float)0.97814763,\n  (float)0.97948742, (float)0.98078531, (float)0.98204112, (float)0.98325491, (float)0.98442656,\n  (float)0.98555607, (float)0.98664331, (float)0.98768836, (float)0.98869103, (float)0.98965138,\n  (float)0.99056935, (float)0.99144489, (float)0.99227792, (float)0.99306846, (float)0.99381649,\n  (float)0.99452192, (float)0.99518472, (float)0.99580491, (float)0.99638247, (float)0.99691731,\n  (float)0.99740952, (float)0.99785894, (float)0.99826562, (float)0.99862951, (float)0.99895066,\n  (float)0.99922901, (float)0.99946457, (float)0.99965733, (float)0.99980724, (float)0.99991435,\n  (float)0.99997860, (float)1.00000000, (float)0.99997860, (float)0.99991435, (float)0.99980724,\n  (float)0.99965733, (float)0.99946457, (float)0.99922901, (float)0.99895066, (float)0.99862951,\n  (float)0.99826562, (float)0.99785894, (float)0.99740946, (float)0.99691731, (float)0.99638247,\n  (float)0.99580491, (float)0.99518472, (float)0.99452192, (float)0.99381644, (float)0.99306846,\n  (float)0.99227792, (float)0.99144489, (float)0.99056935, (float)0.98965138, (float)0.98869103,\n  (float)0.98768836, (float)0.98664331, (float)0.98555607, (float)0.98442656, (float)0.98325491,\n  (float)0.98204112, (float)0.98078525, (float)0.97948742, (float)0.97814757, (float)0.97676587,\n  (float)0.97534227, (float)0.97387695, (float)0.97236991, (float)0.97082120, (float)0.96923089,\n  (float)0.96759909, (float)0.96592581, (float)0.96421117, (float)0.96245521, (float)0.96065807,\n  (float)0.95881969, (float)0.95694029, (float)0.95501995, (float)0.95305860, (float)0.95105648,\n  (float)0.94901365, (float)0.94693011, (float)0.94480604, (float)0.94264150, (float)0.94043654,\n  (float)0.93819129, (float)0.93590593, (float)0.93358046, (float)0.93121493, (float)0.92880952,\n  (float)0.92636436, (float)0.92387950, (float)0.92135507, (float)0.91879123, (float)0.91618794,\n  (float)0.91354543, (float)0.91086382, (float)0.90814310, (float)0.90538365, (float)0.90258527,\n  (float)0.89974827, (float)0.89687276, (float)0.89395875, (float)0.89100647, (float)0.88801610,\n  (float)0.88498759, (float)0.88192123, (float)0.87881714, (float)0.87567532, (float)0.87249595,\n  (float)0.86927933, (float)0.86602539, (float)0.86273432, (float)0.85940641, (float)0.85604161,\n  (float)0.85264009, (float)0.84920216, (float)0.84572780, (float)0.84221715, (float)0.83867055,\n  (float)0.83508795, (float)0.83146954, (float)0.82781565, (float)0.82412612, (float)0.82040137,\n  (float)0.81664157, (float)0.81284660, (float)0.80901700, (float)0.80515265, (float)0.80125374,\n  (float)0.79732066, (float)0.79335332, (float)0.78935200, (float)0.78531694, (float)0.78124815,\n  (float)0.77714586, (float)0.77301049, (float)0.76884180, (float)0.76464021, (float)0.76040596,\n  (float)0.75613904, (float)0.75183970, (float)0.74750835, (float)0.74314481, (float)0.73874938,\n  (float)0.73432249, (float)0.72986400, (float)0.72537428, (float)0.72085363, (float)0.71630186,\n  (float)0.71171951, (float)0.70710677, (float)0.70246363, (float)0.69779032, (float)0.69308734,\n  (float)0.68835449, (float)0.68359220, (float)0.67880070, (float)0.67398006, (float)0.66913044,\n  (float)0.66425240, (float)0.65934575, (float)0.65441096, (float)0.64944804, (float)0.64445722,\n  (float)0.63943905, (float)0.63439327, (float)0.62932026, (float)0.62422055, (float)0.61909389,\n  (float)0.61394072, (float)0.60876143, (float)0.60355592, (float)0.59832448, (float)0.59306765,\n  (float)0.58778518, (float)0.58247757, (float)0.57714522, (float)0.57178789, (float)0.56640613,\n  (float)0.56100023, (float)0.55557019, (float)0.55011630, (float)0.54463905, (float)0.53913826,\n  (float)0.53361434, (float)0.52806783, (float)0.52249849, (float)0.51690674, (float)0.51129305,\n  (float)0.50565726, (float)0.50000006, (float)0.49432117, (float)0.48862115, (float)0.48290038,\n  (float)0.47715873, (float)0.47139663, (float)0.46561456, (float)0.45981231, (float)0.45399037,\n  (float)0.44814920, (float)0.44228864, (float)0.43640912, (float)0.43051112, (float)0.42459446,\n  (float)0.41865960, (float)0.41270703, (float)0.40673658, (float)0.40074870, (float)0.39474386,\n  (float)0.38872188, (float)0.38268328, (float)0.37662849, (float)0.37055734, (float)0.36447033,\n  (float)0.35836792, (float)0.35224995, (float)0.34611690, (float)0.33996922, (float)0.33380675,\n  (float)0.32763001, (float)0.32143945, (float)0.31523487, (float)0.30901679, (float)0.30278572,\n  (float)0.29654145, (float)0.29028472, (float)0.28401530, (float)0.27773371, (float)0.27144048,\n  (float)0.26513538, (float)0.25881892, (float)0.25249159, (float)0.24615324, (float)0.23980433,\n  (float)0.23344538, (float)0.22707619, (float)0.22069728, (float)0.21430916, (float)0.20791161,\n  (float)0.20150517, (float)0.19509031, (float)0.18866688, (float)0.18223536, (float)0.17579627,\n  (float)0.16934940, (float)0.16289529, (float)0.15643445, (float)0.14996666, (float)0.14349243,\n  (float)0.13701232, (float)0.13052608, (float)0.12403426, (float)0.11753736, (float)0.11103519,\n  (float)0.10452849, (float)0.09801710, (float)0.09150149, (float)0.08498220, (float)0.07845904,\n  (float)0.07193252, (float)0.06540315, (float)0.05887074, (float)0.05233581, (float)0.04579888,\n  (float)0.03925974, (float)0.03271893, (float)0.02617695, (float)0.01963361, (float)0.01308943,\n  (float)0.00654493, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000\n};\n\n\n// Hanning window: for 30ms with 1024 fft with symmetric zeros at 16kHz\nstatic const float kBlocks480w1024[1024] = {\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00327249, (float)0.00654494,\n  (float)0.00981732, (float)0.01308960, (float)0.01636173, (float)0.01963369, (float)0.02290544,\n  (float)0.02617695, (float)0.02944817, (float)0.03271908, (float)0.03598964, (float)0.03925982,\n  (float)0.04252957, (float)0.04579887, (float)0.04906768, (float)0.05233596, (float)0.05560368,\n  (float)0.05887080, (float)0.06213730, (float)0.06540313, (float)0.06866825, (float)0.07193266,\n  (float)0.07519628, (float)0.07845910, (float)0.08172107, (float)0.08498218, (float)0.08824237,\n  (float)0.09150162, (float)0.09475989, (float)0.09801714, (float)0.10127335, (float)0.10452846,\n  (float)0.10778246, (float)0.11103531, (float)0.11428697, (float)0.11753740, (float)0.12078657,\n  (float)0.12403446, (float)0.12728101, (float)0.13052620, (float)0.13376999, (float)0.13701233,\n  (float)0.14025325, (float)0.14349262, (float)0.14673047, (float)0.14996676, (float)0.15320145,\n  (float)0.15643448, (float)0.15966582, (float)0.16289547, (float)0.16612339, (float)0.16934951,\n  (float)0.17257382, (float)0.17579629, (float)0.17901687, (float)0.18223552, (float)0.18545224,\n  (float)0.18866697, (float)0.19187967, (float)0.19509032, (float)0.19829889, (float)0.20150533,\n  (float)0.20470962, (float)0.20791170, (float)0.21111156, (float)0.21430916, (float)0.21750447,\n  (float)0.22069745, (float)0.22388805, (float)0.22707628, (float)0.23026206, (float)0.23344538,\n  (float)0.23662618, (float)0.23980446, (float)0.24298020, (float)0.24615330, (float)0.24932377,\n  (float)0.25249159, (float)0.25565669, (float)0.25881904, (float)0.26197866, (float)0.26513544,\n  (float)0.26828939, (float)0.27144045, (float)0.27458861, (float)0.27773386, (float)0.28087610,\n  (float)0.28401536, (float)0.28715158, (float)0.29028466, (float)0.29341471, (float)0.29654160,\n  (float)0.29966527, (float)0.30278578, (float)0.30590302, (float)0.30901700, (float)0.31212768,\n  (float)0.31523499, (float)0.31833893, (float)0.32143945, (float)0.32453656, (float)0.32763019,\n  (float)0.33072028, (float)0.33380687, (float)0.33688986, (float)0.33996925, (float)0.34304500,\n  (float)0.34611708, (float)0.34918544, (float)0.35225007, (float)0.35531089, (float)0.35836795,\n  (float)0.36142117, (float)0.36447051, (float)0.36751595, (float)0.37055743, (float)0.37359497,\n  (float)0.37662852, (float)0.37965801, (float)0.38268346, (float)0.38570479, (float)0.38872197,\n  (float)0.39173502, (float)0.39474389, (float)0.39774847, (float)0.40074885, (float)0.40374491,\n  (float)0.40673664, (float)0.40972406, (float)0.41270703, (float)0.41568562, (float)0.41865975,\n  (float)0.42162940, (float)0.42459452, (float)0.42755508, (float)0.43051112, (float)0.43346250,\n  (float)0.43640924, (float)0.43935132, (float)0.44228873, (float)0.44522133, (float)0.44814920,\n  (float)0.45107228, (float)0.45399052, (float)0.45690390, (float)0.45981237, (float)0.46271592,\n  (float)0.46561453, (float)0.46850815, (float)0.47139674, (float)0.47428030, (float)0.47715878,\n  (float)0.48003215, (float)0.48290035, (float)0.48576337, (float)0.48862126, (float)0.49147385,\n  (float)0.49432120, (float)0.49716330, (float)0.50000000, (float)0.50283140, (float)0.50565743,\n  (float)0.50847799, (float)0.51129311, (float)0.51410276, (float)0.51690692, (float)0.51970553,\n  (float)0.52249855, (float)0.52528602, (float)0.52806789, (float)0.53084403, (float)0.53361452,\n  (float)0.53637928, (float)0.53913832, (float)0.54189163, (float)0.54463905, (float)0.54738063,\n  (float)0.55011642, (float)0.55284631, (float)0.55557024, (float)0.55828828, (float)0.56100029,\n  (float)0.56370628, (float)0.56640625, (float)0.56910014, (float)0.57178795, (float)0.57446963,\n  (float)0.57714522, (float)0.57981455, (float)0.58247769, (float)0.58513463, (float)0.58778524,\n  (float)0.59042960, (float)0.59306765, (float)0.59569931, (float)0.59832460, (float)0.60094351,\n  (float)0.60355598, (float)0.60616195, (float)0.60876143, (float)0.61135441, (float)0.61394083,\n  (float)0.61652070, (float)0.61909395, (float)0.62166059, (float)0.62422055, (float)0.62677383,\n  (float)0.62932038, (float)0.63186020, (float)0.63439333, (float)0.63691956, (float)0.63943899,\n  (float)0.64195162, (float)0.64445734, (float)0.64695615, (float)0.64944810, (float)0.65193301,\n  (float)0.65441096, (float)0.65688187, (float)0.65934587, (float)0.66180271, (float)0.66425246,\n  (float)0.66669512, (float)0.66913062, (float)0.67155898, (float)0.67398012, (float)0.67639405,\n  (float)0.67880076, (float)0.68120021, (float)0.68359232, (float)0.68597710, (float)0.68835455,\n  (float)0.69072467, (float)0.69308740, (float)0.69544262, (float)0.69779050, (float)0.70013082,\n  (float)0.70246369, (float)0.70478904, (float)0.70710677, (float)0.70941699, (float)0.71171963,\n  (float)0.71401459, (float)0.71630198, (float)0.71858168, (float)0.72085363, (float)0.72311789,\n  (float)0.72537440, (float)0.72762316, (float)0.72986406, (float)0.73209721, (float)0.73432255,\n  (float)0.73653996, (float)0.73874950, (float)0.74095118, (float)0.74314487, (float)0.74533057,\n  (float)0.74750835, (float)0.74967808, (float)0.75183982, (float)0.75399351, (float)0.75613910,\n  (float)0.75827658, (float)0.76040596, (float)0.76252723, (float)0.76464027, (float)0.76674515,\n  (float)0.76884186, (float)0.77093029, (float)0.77301043, (float)0.77508241, (float)0.77714598,\n  (float)0.77920127, (float)0.78124821, (float)0.78328675, (float)0.78531694, (float)0.78733873,\n  (float)0.78935206, (float)0.79135692, (float)0.79335338, (float)0.79534125, (float)0.79732066,\n  (float)0.79929149, (float)0.80125386, (float)0.80320752, (float)0.80515265, (float)0.80708915,\n  (float)0.80901700, (float)0.81093621, (float)0.81284672, (float)0.81474853, (float)0.81664157,\n  (float)0.81852591, (float)0.82040149, (float)0.82226825, (float)0.82412618, (float)0.82597536,\n  (float)0.82781565, (float)0.82964706, (float)0.83146966, (float)0.83328325, (float)0.83508795,\n  (float)0.83688378, (float)0.83867061, (float)0.84044838, (float)0.84221727, (float)0.84397703,\n  (float)0.84572780, (float)0.84746957, (float)0.84920216, (float)0.85092574, (float)0.85264021,\n  (float)0.85434544, (float)0.85604161, (float)0.85772866, (float)0.85940641, (float)0.86107504,\n  (float)0.86273444, (float)0.86438453, (float)0.86602545, (float)0.86765707, (float)0.86927933,\n  (float)0.87089235, (float)0.87249607, (float)0.87409031, (float)0.87567532, (float)0.87725097,\n  (float)0.87881714, (float)0.88037390, (float)0.88192129, (float)0.88345921, (float)0.88498765,\n  (float)0.88650668, (float)0.88801610, (float)0.88951612, (float)0.89100653, (float)0.89248741,\n  (float)0.89395881, (float)0.89542055, (float)0.89687276, (float)0.89831537, (float)0.89974827,\n  (float)0.90117162, (float)0.90258533, (float)0.90398932, (float)0.90538365, (float)0.90676826,\n  (float)0.90814316, (float)0.90950841, (float)0.91086388, (float)0.91220951, (float)0.91354549,\n  (float)0.91487163, (float)0.91618794, (float)0.91749454, (float)0.91879123, (float)0.92007810,\n  (float)0.92135513, (float)0.92262226, (float)0.92387950, (float)0.92512691, (float)0.92636442,\n  (float)0.92759192, (float)0.92880958, (float)0.93001723, (float)0.93121493, (float)0.93240267,\n  (float)0.93358046, (float)0.93474817, (float)0.93590593, (float)0.93705362, (float)0.93819135,\n  (float)0.93931901, (float)0.94043654, (float)0.94154406, (float)0.94264150, (float)0.94372880,\n  (float)0.94480604, (float)0.94587320, (float)0.94693011, (float)0.94797695, (float)0.94901365,\n  (float)0.95004016, (float)0.95105654, (float)0.95206273, (float)0.95305866, (float)0.95404440,\n  (float)0.95501995, (float)0.95598525, (float)0.95694035, (float)0.95788521, (float)0.95881975,\n  (float)0.95974404, (float)0.96065807, (float)0.96156180, (float)0.96245527, (float)0.96333838,\n  (float)0.96421117, (float)0.96507370, (float)0.96592581, (float)0.96676767, (float)0.96759909,\n  (float)0.96842021, (float)0.96923089, (float)0.97003126, (float)0.97082120, (float)0.97160077,\n  (float)0.97236991, (float)0.97312868, (float)0.97387701, (float)0.97461486, (float)0.97534233,\n  (float)0.97605932, (float)0.97676587, (float)0.97746199, (float)0.97814763, (float)0.97882277,\n  (float)0.97948742, (float)0.98014158, (float)0.98078531, (float)0.98141843, (float)0.98204112,\n  (float)0.98265332, (float)0.98325491, (float)0.98384601, (float)0.98442656, (float)0.98499662,\n  (float)0.98555607, (float)0.98610497, (float)0.98664331, (float)0.98717111, (float)0.98768836,\n  (float)0.98819500, (float)0.98869103, (float)0.98917651, (float)0.98965138, (float)0.99011570,\n  (float)0.99056935, (float)0.99101239, (float)0.99144489, (float)0.99186671, (float)0.99227792,\n  (float)0.99267852, (float)0.99306846, (float)0.99344778, (float)0.99381649, (float)0.99417448,\n  (float)0.99452192, (float)0.99485862, (float)0.99518472, (float)0.99550015, (float)0.99580491,\n  (float)0.99609905, (float)0.99638247, (float)0.99665523, (float)0.99691731, (float)0.99716878,\n  (float)0.99740952, (float)0.99763954, (float)0.99785894, (float)0.99806762, (float)0.99826562,\n  (float)0.99845290, (float)0.99862951, (float)0.99879545, (float)0.99895066, (float)0.99909520,\n  (float)0.99922901, (float)0.99935216, (float)0.99946457, (float)0.99956632, (float)0.99965733,\n  (float)0.99973762, (float)0.99980724, (float)0.99986613, (float)0.99991435, (float)0.99995178,\n  (float)0.99997860, (float)0.99999464, (float)1.00000000, (float)0.99999464, (float)0.99997860,\n  (float)0.99995178, (float)0.99991435, (float)0.99986613, (float)0.99980724, (float)0.99973762,\n  (float)0.99965733, (float)0.99956632, (float)0.99946457, (float)0.99935216, (float)0.99922901,\n  (float)0.99909520, (float)0.99895066, (float)0.99879545, (float)0.99862951, (float)0.99845290,\n  (float)0.99826562, (float)0.99806762, (float)0.99785894, (float)0.99763954, (float)0.99740946,\n  (float)0.99716872, (float)0.99691731, (float)0.99665523, (float)0.99638247, (float)0.99609905,\n  (float)0.99580491, (float)0.99550015, (float)0.99518472, (float)0.99485862, (float)0.99452192,\n  (float)0.99417448, (float)0.99381644, (float)0.99344778, (float)0.99306846, (float)0.99267852,\n  (float)0.99227792, (float)0.99186671, (float)0.99144489, (float)0.99101239, (float)0.99056935,\n  (float)0.99011564, (float)0.98965138, (float)0.98917651, (float)0.98869103, (float)0.98819494,\n  (float)0.98768836, (float)0.98717111, (float)0.98664331, (float)0.98610497, (float)0.98555607,\n  (float)0.98499656, (float)0.98442656, (float)0.98384601, (float)0.98325491, (float)0.98265326,\n  (float)0.98204112, (float)0.98141843, (float)0.98078525, (float)0.98014158, (float)0.97948742,\n  (float)0.97882277, (float)0.97814757, (float)0.97746193, (float)0.97676587, (float)0.97605932,\n  (float)0.97534227, (float)0.97461486, (float)0.97387695, (float)0.97312862, (float)0.97236991,\n  (float)0.97160077, (float)0.97082120, (float)0.97003126, (float)0.96923089, (float)0.96842015,\n  (float)0.96759909, (float)0.96676761, (float)0.96592581, (float)0.96507365, (float)0.96421117,\n  (float)0.96333838, (float)0.96245521, (float)0.96156180, (float)0.96065807, (float)0.95974404,\n  (float)0.95881969, (float)0.95788515, (float)0.95694029, (float)0.95598525, (float)0.95501995,\n  (float)0.95404440, (float)0.95305860, (float)0.95206267, (float)0.95105648, (float)0.95004016,\n  (float)0.94901365, (float)0.94797695, (float)0.94693011, (float)0.94587314, (float)0.94480604,\n  (float)0.94372880, (float)0.94264150, (float)0.94154406, (float)0.94043654, (float)0.93931895,\n  (float)0.93819129, (float)0.93705362, (float)0.93590593, (float)0.93474817, (float)0.93358046,\n  (float)0.93240267, (float)0.93121493, (float)0.93001723, (float)0.92880952, (float)0.92759192,\n  (float)0.92636436, (float)0.92512691, (float)0.92387950, (float)0.92262226, (float)0.92135507,\n  (float)0.92007804, (float)0.91879123, (float)0.91749448, (float)0.91618794, (float)0.91487157,\n  (float)0.91354543, (float)0.91220951, (float)0.91086382, (float)0.90950835, (float)0.90814310,\n  (float)0.90676820, (float)0.90538365, (float)0.90398932, (float)0.90258527, (float)0.90117157,\n  (float)0.89974827, (float)0.89831525, (float)0.89687276, (float)0.89542055, (float)0.89395875,\n  (float)0.89248741, (float)0.89100647, (float)0.88951600, (float)0.88801610, (float)0.88650662,\n  (float)0.88498759, (float)0.88345915, (float)0.88192123, (float)0.88037384, (float)0.87881714,\n  (float)0.87725091, (float)0.87567532, (float)0.87409031, (float)0.87249595, (float)0.87089223,\n  (float)0.86927933, (float)0.86765701, (float)0.86602539, (float)0.86438447, (float)0.86273432,\n  (float)0.86107504, (float)0.85940641, (float)0.85772860, (float)0.85604161, (float)0.85434544,\n  (float)0.85264009, (float)0.85092574, (float)0.84920216, (float)0.84746951, (float)0.84572780,\n  (float)0.84397697, (float)0.84221715, (float)0.84044844, (float)0.83867055, (float)0.83688372,\n  (float)0.83508795, (float)0.83328319, (float)0.83146954, (float)0.82964706, (float)0.82781565,\n  (float)0.82597530, (float)0.82412612, (float)0.82226813, (float)0.82040137, (float)0.81852591,\n  (float)0.81664157, (float)0.81474847, (float)0.81284660, (float)0.81093609, (float)0.80901700,\n  (float)0.80708915, (float)0.80515265, (float)0.80320752, (float)0.80125374, (float)0.79929143,\n  (float)0.79732066, (float)0.79534125, (float)0.79335332, (float)0.79135686, (float)0.78935200,\n  (float)0.78733861, (float)0.78531694, (float)0.78328675, (float)0.78124815, (float)0.77920121,\n  (float)0.77714586, (float)0.77508223, (float)0.77301049, (float)0.77093029, (float)0.76884180,\n  (float)0.76674509, (float)0.76464021, (float)0.76252711, (float)0.76040596, (float)0.75827658,\n  (float)0.75613904, (float)0.75399339, (float)0.75183970, (float)0.74967796, (float)0.74750835,\n  (float)0.74533057, (float)0.74314481, (float)0.74095106, (float)0.73874938, (float)0.73653996,\n  (float)0.73432249, (float)0.73209721, (float)0.72986400, (float)0.72762305, (float)0.72537428,\n  (float)0.72311789, (float)0.72085363, (float)0.71858162, (float)0.71630186, (float)0.71401453,\n  (float)0.71171951, (float)0.70941705, (float)0.70710677, (float)0.70478898, (float)0.70246363,\n  (float)0.70013070, (float)0.69779032, (float)0.69544268, (float)0.69308734, (float)0.69072461,\n  (float)0.68835449, (float)0.68597704, (float)0.68359220, (float)0.68120021, (float)0.67880070,\n  (float)0.67639399, (float)0.67398006, (float)0.67155886, (float)0.66913044, (float)0.66669512,\n  (float)0.66425240, (float)0.66180259, (float)0.65934575, (float)0.65688181, (float)0.65441096,\n  (float)0.65193301, (float)0.64944804, (float)0.64695609, (float)0.64445722, (float)0.64195150,\n  (float)0.63943905, (float)0.63691956, (float)0.63439327, (float)0.63186014, (float)0.62932026,\n  (float)0.62677372, (float)0.62422055, (float)0.62166059, (float)0.61909389, (float)0.61652064,\n  (float)0.61394072, (float)0.61135429, (float)0.60876143, (float)0.60616189, (float)0.60355592,\n  (float)0.60094339, (float)0.59832448, (float)0.59569913, (float)0.59306765, (float)0.59042960,\n  (float)0.58778518, (float)0.58513451, (float)0.58247757, (float)0.57981461, (float)0.57714522,\n  (float)0.57446963, (float)0.57178789, (float)0.56910002, (float)0.56640613, (float)0.56370628,\n  (float)0.56100023, (float)0.55828822, (float)0.55557019, (float)0.55284619, (float)0.55011630,\n  (float)0.54738069, (float)0.54463905, (float)0.54189152, (float)0.53913826, (float)0.53637916,\n  (float)0.53361434, (float)0.53084403, (float)0.52806783, (float)0.52528596, (float)0.52249849,\n  (float)0.51970541, (float)0.51690674, (float)0.51410276, (float)0.51129305, (float)0.50847787,\n  (float)0.50565726, (float)0.50283122, (float)0.50000006, (float)0.49716327, (float)0.49432117,\n  (float)0.49147379, (float)0.48862115, (float)0.48576325, (float)0.48290038, (float)0.48003212,\n  (float)0.47715873, (float)0.47428021, (float)0.47139663, (float)0.46850798, (float)0.46561456,\n  (float)0.46271589, (float)0.45981231, (float)0.45690379, (float)0.45399037, (float)0.45107210,\n  (float)0.44814920, (float)0.44522130, (float)0.44228864, (float)0.43935123, (float)0.43640912,\n  (float)0.43346232, (float)0.43051112, (float)0.42755505, (float)0.42459446, (float)0.42162928,\n  (float)0.41865960, (float)0.41568545, (float)0.41270703, (float)0.40972400, (float)0.40673658,\n  (float)0.40374479, (float)0.40074870, (float)0.39774850, (float)0.39474386, (float)0.39173496,\n  (float)0.38872188, (float)0.38570464, (float)0.38268328, (float)0.37965804, (float)0.37662849,\n  (float)0.37359491, (float)0.37055734, (float)0.36751580, (float)0.36447033, (float)0.36142117,\n  (float)0.35836792, (float)0.35531086, (float)0.35224995, (float)0.34918529, (float)0.34611690,\n  (float)0.34304500, (float)0.33996922, (float)0.33688980, (float)0.33380675, (float)0.33072016,\n  (float)0.32763001, (float)0.32453656, (float)0.32143945, (float)0.31833887, (float)0.31523487,\n  (float)0.31212750, (float)0.30901679, (float)0.30590302, (float)0.30278572, (float)0.29966521,\n  (float)0.29654145, (float)0.29341453, (float)0.29028472, (float)0.28715155, (float)0.28401530,\n  (float)0.28087601, (float)0.27773371, (float)0.27458847, (float)0.27144048, (float)0.26828936,\n  (float)0.26513538, (float)0.26197854, (float)0.25881892, (float)0.25565651, (float)0.25249159,\n  (float)0.24932374, (float)0.24615324, (float)0.24298008, (float)0.23980433, (float)0.23662600,\n  (float)0.23344538, (float)0.23026201, (float)0.22707619, (float)0.22388794, (float)0.22069728,\n  (float)0.21750426, (float)0.21430916, (float)0.21111152, (float)0.20791161, (float)0.20470949,\n  (float)0.20150517, (float)0.19829892, (float)0.19509031, (float)0.19187963, (float)0.18866688,\n  (float)0.18545210, (float)0.18223536, (float)0.17901689, (float)0.17579627, (float)0.17257376,\n  (float)0.16934940, (float)0.16612324, (float)0.16289529, (float)0.15966584, (float)0.15643445,\n  (float)0.15320137, (float)0.14996666, (float)0.14673033, (float)0.14349243, (float)0.14025325,\n  (float)0.13701232, (float)0.13376991, (float)0.13052608, (float)0.12728085, (float)0.12403426,\n  (float)0.12078657, (float)0.11753736, (float)0.11428688, (float)0.11103519, (float)0.10778230,\n  (float)0.10452849, (float)0.10127334, (float)0.09801710, (float)0.09475980, (float)0.09150149,\n  (float)0.08824220, (float)0.08498220, (float)0.08172106, (float)0.07845904, (float)0.07519618,\n  (float)0.07193252, (float)0.06866808, (float)0.06540315, (float)0.06213728, (float)0.05887074,\n  (float)0.05560357, (float)0.05233581, (float)0.04906749, (float)0.04579888, (float)0.04252954,\n  (float)0.03925974, (float)0.03598953, (float)0.03271893, (float)0.02944798, (float)0.02617695,\n  (float)0.02290541, (float)0.01963361, (float)0.01636161, (float)0.01308943, (float)0.00981712,\n  (float)0.00654493, (float)0.00327244, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000,\n  (float)0.00000000, (float)0.00000000, (float)0.00000000, (float)0.00000000\n};\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_WINDOWS_PRIVATE_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/splitting_filter.cc",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/splitting_filter.h\"\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_audio/signal_processing/include/signal_processing_library.h\"\n#include \"webrtc/common_audio/channel_buffer.h\"\n\nnamespace webrtc {\n\nSplittingFilter::SplittingFilter(size_t num_channels,\n                                 size_t num_bands,\n                                 size_t num_frames)\n    : num_bands_(num_bands) {\n  RTC_CHECK(num_bands_ == 2 || num_bands_ == 3);\n  if (num_bands_ == 2) {\n    two_bands_states_.resize(num_channels);\n  } else if (num_bands_ == 3) {\n    for (size_t i = 0; i < num_channels; ++i) {\n      three_band_filter_banks_.push_back(std::unique_ptr<ThreeBandFilterBank>(\n          new ThreeBandFilterBank(num_frames)));\n    }\n  }\n}\n\nSplittingFilter::~SplittingFilter() = default;\n\nvoid SplittingFilter::Analysis(const IFChannelBuffer* data,\n                               IFChannelBuffer* bands) {\n  RTC_DCHECK_EQ(num_bands_, bands->num_bands());\n  RTC_DCHECK_EQ(data->num_channels(), bands->num_channels());\n  RTC_DCHECK_EQ(data->num_frames(),\n                bands->num_frames_per_band() * bands->num_bands());\n  if (bands->num_bands() == 2) {\n    TwoBandsAnalysis(data, bands);\n  } else if (bands->num_bands() == 3) {\n    ThreeBandsAnalysis(data, bands);\n  }\n}\n\nvoid SplittingFilter::Synthesis(const IFChannelBuffer* bands,\n                                IFChannelBuffer* data) {\n  RTC_DCHECK_EQ(num_bands_, bands->num_bands());\n  RTC_DCHECK_EQ(data->num_channels(), bands->num_channels());\n  RTC_DCHECK_EQ(data->num_frames(),\n                bands->num_frames_per_band() * bands->num_bands());\n  if (bands->num_bands() == 2) {\n    TwoBandsSynthesis(bands, data);\n  } else if (bands->num_bands() == 3) {\n    ThreeBandsSynthesis(bands, data);\n  }\n}\n\nvoid SplittingFilter::TwoBandsAnalysis(const IFChannelBuffer* data,\n                                       IFChannelBuffer* bands) {\n  RTC_DCHECK_EQ(two_bands_states_.size(), data->num_channels());\n  for (size_t i = 0; i < two_bands_states_.size(); ++i) {\n    WebRtcSpl_AnalysisQMF(data->ibuf_const()->channels()[i],\n                          data->num_frames(),\n                          bands->ibuf()->channels(0)[i],\n                          bands->ibuf()->channels(1)[i],\n                          two_bands_states_[i].analysis_state1,\n                          two_bands_states_[i].analysis_state2);\n  }\n}\n\nvoid SplittingFilter::TwoBandsSynthesis(const IFChannelBuffer* bands,\n                                        IFChannelBuffer* data) {\n  RTC_DCHECK_LE(data->num_channels(), two_bands_states_.size());\n  for (size_t i = 0; i < data->num_channels(); ++i) {\n    WebRtcSpl_SynthesisQMF(bands->ibuf_const()->channels(0)[i],\n                           bands->ibuf_const()->channels(1)[i],\n                           bands->num_frames_per_band(),\n                           data->ibuf()->channels()[i],\n                           two_bands_states_[i].synthesis_state1,\n                           two_bands_states_[i].synthesis_state2);\n  }\n}\n\nvoid SplittingFilter::ThreeBandsAnalysis(const IFChannelBuffer* data,\n                                         IFChannelBuffer* bands) {\n  RTC_DCHECK_EQ(three_band_filter_banks_.size(), data->num_channels());\n  for (size_t i = 0; i < three_band_filter_banks_.size(); ++i) {\n    three_band_filter_banks_[i]->Analysis(data->fbuf_const()->channels()[i],\n                                          data->num_frames(),\n                                          bands->fbuf()->bands(i));\n  }\n}\n\nvoid SplittingFilter::ThreeBandsSynthesis(const IFChannelBuffer* bands,\n                                          IFChannelBuffer* data) {\n  RTC_DCHECK_LE(data->num_channels(), three_band_filter_banks_.size());\n  for (size_t i = 0; i < data->num_channels(); ++i) {\n    three_band_filter_banks_[i]->Synthesis(bands->fbuf_const()->bands(i),\n                                           bands->num_frames_per_band(),\n                                           data->fbuf()->channels()[i]);\n  }\n}\n\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/splitting_filter.h",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_SPLITTING_FILTER_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_SPLITTING_FILTER_H_\n\n#include <cstring>\n#include <memory>\n#include <vector>\n\n#include \"webrtc/modules/audio_processing/three_band_filter_bank.h\"\n\nnamespace webrtc {\n\nclass IFChannelBuffer;\n\nstruct TwoBandsStates {\n  TwoBandsStates() {\n    memset(analysis_state1, 0, sizeof(analysis_state1));\n    memset(analysis_state2, 0, sizeof(analysis_state2));\n    memset(synthesis_state1, 0, sizeof(synthesis_state1));\n    memset(synthesis_state2, 0, sizeof(synthesis_state2));\n  }\n\n  static const int kStateSize = 6;\n  int analysis_state1[kStateSize];\n  int analysis_state2[kStateSize];\n  int synthesis_state1[kStateSize];\n  int synthesis_state2[kStateSize];\n};\n\n// Splitting filter which is able to split into and merge from 2 or 3 frequency\n// bands. The number of channels needs to be provided at construction time.\n//\n// For each block, Analysis() is called to split into bands and then Synthesis()\n// to merge these bands again. The input and output signals are contained in\n// IFChannelBuffers and for the different bands an array of IFChannelBuffers is\n// used.\nclass SplittingFilter {\n public:\n  SplittingFilter(size_t num_channels, size_t num_bands, size_t num_frames);\n  ~SplittingFilter();\n\n  void Analysis(const IFChannelBuffer* data, IFChannelBuffer* bands);\n  void Synthesis(const IFChannelBuffer* bands, IFChannelBuffer* data);\n\n private:\n  // Two-band analysis and synthesis work for 640 samples or less.\n  void TwoBandsAnalysis(const IFChannelBuffer* data, IFChannelBuffer* bands);\n  void TwoBandsSynthesis(const IFChannelBuffer* bands, IFChannelBuffer* data);\n  void ThreeBandsAnalysis(const IFChannelBuffer* data, IFChannelBuffer* bands);\n  void ThreeBandsSynthesis(const IFChannelBuffer* bands, IFChannelBuffer* data);\n  void InitBuffers();\n\n  const size_t num_bands_;\n  std::vector<TwoBandsStates> two_bands_states_;\n  std::vector<std::unique_ptr<ThreeBandFilterBank>> three_band_filter_banks_;\n};\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_SPLITTING_FILTER_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/three_band_filter_bank.cc",
    "content": "/*\n *  Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// An implementation of a 3-band FIR filter-bank with DCT modulation, similar to\n// the proposed in \"Multirate Signal Processing for Communication Systems\" by\n// Fredric J Harris.\n//\n// The idea is to take a heterodyne system and change the order of the\n// components to get something which is efficient to implement digitally.\n//\n// It is possible to separate the filter using the noble identity as follows:\n//\n// H(z) = H0(z^3) + z^-1 * H1(z^3) + z^-2 * H2(z^3)\n//\n// This is used in the analysis stage to first downsample serial to parallel\n// and then filter each branch with one of these polyphase decompositions of the\n// lowpass prototype. Because each filter is only a modulation of the prototype,\n// it is enough to multiply each coefficient by the respective cosine value to\n// shift it to the desired band. But because the cosine period is 12 samples,\n// it requires separating the prototype even further using the noble identity.\n// After filtering and modulating for each band, the output of all filters is\n// accumulated to get the downsampled bands.\n//\n// A similar logic can be applied to the synthesis stage.\n\n// MSVC++ requires this to be set before any other includes to get M_PI.\n#define _USE_MATH_DEFINES\n\n#include \"webrtc/modules/audio_processing/three_band_filter_bank.h\"\n\n#include <cmath>\n\n#include \"webrtc/base/checks.h\"\n\nnamespace webrtc {\nnamespace {\n\nconst size_t kNumBands = 3;\nconst size_t kSparsity = 4;\n\n// Factors to take into account when choosing |kNumCoeffs|:\n//   1. Higher |kNumCoeffs|, means faster transition, which ensures less\n//      aliasing. This is especially important when there is non-linear\n//      processing between the splitting and merging.\n//   2. The delay that this filter bank introduces is\n//      |kNumBands| * |kSparsity| * |kNumCoeffs| / 2, so it increases linearly\n//      with |kNumCoeffs|.\n//   3. The computation complexity also increases linearly with |kNumCoeffs|.\nconst size_t kNumCoeffs = 4;\n\n// The Matlab code to generate these |kLowpassCoeffs| is:\n//\n// N = kNumBands * kSparsity * kNumCoeffs - 1;\n// h = fir1(N, 1 / (2 * kNumBands), kaiser(N + 1, 3.5));\n// reshape(h, kNumBands * kSparsity, kNumCoeffs);\n//\n// Because the total bandwidth of the lower and higher band is double the middle\n// one (because of the spectrum parity), the low-pass prototype is half the\n// bandwidth of 1 / (2 * |kNumBands|) and is then shifted with cosine modulation\n// to the right places.\n// A Kaiser window is used because of its flexibility and the alpha is set to\n// 3.5, since that sets a stop band attenuation of 40dB ensuring a fast\n// transition.\nconst float kLowpassCoeffs[kNumBands * kSparsity][kNumCoeffs] =\n    {{-0.00047749f, -0.00496888f, +0.16547118f, +0.00425496f},\n     {-0.00173287f, -0.01585778f, +0.14989004f, +0.00994113f},\n     {-0.00304815f, -0.02536082f, +0.12154542f, +0.01157993f},\n     {-0.00383509f, -0.02982767f, +0.08543175f, +0.00983212f},\n     {-0.00346946f, -0.02587886f, +0.04760441f, +0.00607594f},\n     {-0.00154717f, -0.01136076f, +0.01387458f, +0.00186353f},\n     {+0.00186353f, +0.01387458f, -0.01136076f, -0.00154717f},\n     {+0.00607594f, +0.04760441f, -0.02587886f, -0.00346946f},\n     {+0.00983212f, +0.08543175f, -0.02982767f, -0.00383509f},\n     {+0.01157993f, +0.12154542f, -0.02536082f, -0.00304815f},\n     {+0.00994113f, +0.14989004f, -0.01585778f, -0.00173287f},\n     {+0.00425496f, +0.16547118f, -0.00496888f, -0.00047749f}};\n\n// Downsamples |in| into |out|, taking one every |kNumbands| starting from\n// |offset|. |split_length| is the |out| length. |in| has to be at least\n// |kNumBands| * |split_length| long.\nvoid Downsample(const float* in,\n                size_t split_length,\n                size_t offset,\n                float* out) {\n  for (size_t i = 0; i < split_length; ++i) {\n    out[i] = in[kNumBands * i + offset];\n  }\n}\n\n// Upsamples |in| into |out|, scaling by |kNumBands| and accumulating it every\n// |kNumBands| starting from |offset|. |split_length| is the |in| length. |out|\n// has to be at least |kNumBands| * |split_length| long.\nvoid Upsample(const float* in, size_t split_length, size_t offset, float* out) {\n  for (size_t i = 0; i < split_length; ++i) {\n    out[kNumBands * i + offset] += kNumBands * in[i];\n  }\n}\n\n}  // namespace\n\n// Because the low-pass filter prototype has half bandwidth it is possible to\n// use a DCT to shift it in both directions at the same time, to the center\n// frequencies [1 / 12, 3 / 12, 5 / 12].\nThreeBandFilterBank::ThreeBandFilterBank(size_t length)\n    : in_buffer_(rtc::CheckedDivExact(length, kNumBands)),\n      out_buffer_(in_buffer_.size()) {\n  for (size_t i = 0; i < kSparsity; ++i) {\n    for (size_t j = 0; j < kNumBands; ++j) {\n      analysis_filters_.push_back(\n          std::unique_ptr<SparseFIRFilter>(new SparseFIRFilter(\n              kLowpassCoeffs[i * kNumBands + j], kNumCoeffs, kSparsity, i)));\n      synthesis_filters_.push_back(\n          std::unique_ptr<SparseFIRFilter>(new SparseFIRFilter(\n              kLowpassCoeffs[i * kNumBands + j], kNumCoeffs, kSparsity, i)));\n    }\n  }\n  dct_modulation_.resize(kNumBands * kSparsity);\n  for (size_t i = 0; i < dct_modulation_.size(); ++i) {\n    dct_modulation_[i].resize(kNumBands);\n    for (size_t j = 0; j < kNumBands; ++j) {\n      dct_modulation_[i][j] =\n          2.f * cos(2.f * M_PI * i * (2.f * j + 1.f) / dct_modulation_.size());\n    }\n  }\n}\n\nThreeBandFilterBank::~ThreeBandFilterBank() = default;\n\n// The analysis can be separated in these steps:\n//   1. Serial to parallel downsampling by a factor of |kNumBands|.\n//   2. Filtering of |kSparsity| different delayed signals with polyphase\n//      decomposition of the low-pass prototype filter and upsampled by a factor\n//      of |kSparsity|.\n//   3. Modulating with cosines and accumulating to get the desired band.\nvoid ThreeBandFilterBank::Analysis(const float* in,\n                                   size_t length,\n                                   float* const* out) {\n  RTC_CHECK_EQ(in_buffer_.size(), rtc::CheckedDivExact(length, kNumBands));\n  for (size_t i = 0; i < kNumBands; ++i) {\n    memset(out[i], 0, in_buffer_.size() * sizeof(*out[i]));\n  }\n  for (size_t i = 0; i < kNumBands; ++i) {\n    Downsample(in, in_buffer_.size(), kNumBands - i - 1, &in_buffer_[0]);\n    for (size_t j = 0; j < kSparsity; ++j) {\n      const size_t offset = i + j * kNumBands;\n      analysis_filters_[offset]->Filter(&in_buffer_[0],\n                                        in_buffer_.size(),\n                                        &out_buffer_[0]);\n      DownModulate(&out_buffer_[0], out_buffer_.size(), offset, out);\n    }\n  }\n}\n\n// The synthesis can be separated in these steps:\n//   1. Modulating with cosines.\n//   2. Filtering each one with a polyphase decomposition of the low-pass\n//      prototype filter upsampled by a factor of |kSparsity| and accumulating\n//      |kSparsity| signals with different delays.\n//   3. Parallel to serial upsampling by a factor of |kNumBands|.\nvoid ThreeBandFilterBank::Synthesis(const float* const* in,\n                                    size_t split_length,\n                                    float* out) {\n  RTC_CHECK_EQ(in_buffer_.size(), split_length);\n  memset(out, 0, kNumBands * in_buffer_.size() * sizeof(*out));\n  for (size_t i = 0; i < kNumBands; ++i) {\n    for (size_t j = 0; j < kSparsity; ++j) {\n      const size_t offset = i + j * kNumBands;\n      UpModulate(in, in_buffer_.size(), offset, &in_buffer_[0]);\n      synthesis_filters_[offset]->Filter(&in_buffer_[0],\n                                         in_buffer_.size(),\n                                         &out_buffer_[0]);\n      Upsample(&out_buffer_[0], out_buffer_.size(), i, out);\n    }\n  }\n}\n\n\n// Modulates |in| by |dct_modulation_| and accumulates it in each of the\n// |kNumBands| bands of |out|. |offset| is the index in the period of the\n// cosines used for modulation. |split_length| is the length of |in| and each\n// band of |out|.\nvoid ThreeBandFilterBank::DownModulate(const float* in,\n                                       size_t split_length,\n                                       size_t offset,\n                                       float* const* out) {\n  for (size_t i = 0; i < kNumBands; ++i) {\n    for (size_t j = 0; j < split_length; ++j) {\n      out[i][j] += dct_modulation_[offset][i] * in[j];\n    }\n  }\n}\n\n// Modulates each of the |kNumBands| bands of |in| by |dct_modulation_| and\n// accumulates them in |out|. |out| is cleared before starting to accumulate.\n// |offset| is the index in the period of the cosines used for modulation.\n// |split_length| is the length of each band of |in| and |out|.\nvoid ThreeBandFilterBank::UpModulate(const float* const* in,\n                                     size_t split_length,\n                                     size_t offset,\n                                     float* out) {\n  memset(out, 0, split_length * sizeof(*out));\n  for (size_t i = 0; i < kNumBands; ++i) {\n    for (size_t j = 0; j < split_length; ++j) {\n      out[j] += dct_modulation_[offset][i] * in[i][j];\n    }\n  }\n}\n\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/three_band_filter_bank.h",
    "content": "/*\n *  Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_\n\n#include <cstring>\n#include <memory>\n#include <vector>\n\n#include \"webrtc/common_audio/sparse_fir_filter.h\"\n\nnamespace webrtc {\n\n// An implementation of a 3-band FIR filter-bank with DCT modulation, similar to\n// the proposed in \"Multirate Signal Processing for Communication Systems\" by\n// Fredric J Harris.\n// The low-pass filter prototype has these characteristics:\n// * Pass-band ripple = 0.3dB\n// * Pass-band frequency = 0.147 (7kHz at 48kHz)\n// * Stop-band attenuation = 40dB\n// * Stop-band frequency = 0.192 (9.2kHz at 48kHz)\n// * Delay = 24 samples (500us at 48kHz)\n// * Linear phase\n// This filter bank does not satisfy perfect reconstruction. The SNR after\n// analysis and synthesis (with no processing in between) is approximately 9.5dB\n// depending on the input signal after compensating for the delay.\nclass ThreeBandFilterBank final {\n public:\n  explicit ThreeBandFilterBank(size_t length);\n  ~ThreeBandFilterBank();\n\n  // Splits |in| into 3 downsampled frequency bands in |out|.\n  // |length| is the |in| length. Each of the 3 bands of |out| has to have a\n  // length of |length| / 3.\n  void Analysis(const float* in, size_t length, float* const* out);\n\n  // Merges the 3 downsampled frequency bands in |in| into |out|.\n  // |split_length| is the length of each band of |in|. |out| has to have at\n  // least a length of 3 * |split_length|.\n  void Synthesis(const float* const* in, size_t split_length, float* out);\n\n private:\n  void DownModulate(const float* in,\n                    size_t split_length,\n                    size_t offset,\n                    float* const* out);\n  void UpModulate(const float* const* in,\n                  size_t split_length,\n                  size_t offset,\n                  float* out);\n\n  std::vector<float> in_buffer_;\n  std::vector<float> out_buffer_;\n  std::vector<std::unique_ptr<SparseFIRFilter>> analysis_filters_;\n  std::vector<std::unique_ptr<SparseFIRFilter>> synthesis_filters_;\n  std::vector<std::vector<float>> dct_modulation_;\n};\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/block_mean_calculator.cc",
    "content": "/*\n *  Copyright 2016 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/utility/block_mean_calculator.h\"\n\n#include \"webrtc/base/checks.h\"\n\nnamespace webrtc {\n\nBlockMeanCalculator::BlockMeanCalculator(size_t block_length)\n    : block_length_(block_length),\n      count_(0),\n      sum_(0.0),\n      mean_(0.0) {\n  RTC_DCHECK(block_length_ != 0);\n}\n\nvoid BlockMeanCalculator::Reset() {\n  Clear();\n  mean_ = 0.0;\n}\n\nvoid BlockMeanCalculator::AddValue(float value) {\n  sum_ += value;\n  ++count_;\n  if (count_ == block_length_) {\n    mean_ = sum_ / block_length_;\n    Clear();\n  }\n}\n\nbool BlockMeanCalculator::EndOfBlock() const {\n  return count_ == 0;\n}\n\nfloat BlockMeanCalculator::GetLatestMean() const {\n  return mean_;\n}\n\n// Flush all samples added.\nvoid BlockMeanCalculator::Clear() {\n  count_ = 0;\n  sum_ = 0.0;\n}\n\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/block_mean_calculator.h",
    "content": "/*\n *  Copyright 2016 The WebRTC Project Authors. All rights reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_BLOCK_MEAN_CALCULATOR_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_BLOCK_MEAN_CALCULATOR_H_\n\n#include <stddef.h>\n\n#include \"webrtc/base/constructormagic.h\"\n\nnamespace webrtc {\n\n// BlockMeanCalculator calculates the mean of a block of values. Values are\n// added one after another, and the mean is updated at the end of every block.\nclass BlockMeanCalculator {\n public:\n  explicit BlockMeanCalculator(size_t block_length);\n\n  // Reset.\n  void Reset();\n\n  // Add one value to the sequence.\n  void AddValue(float value);\n\n  // Return whether the latest added value was at the end of a block.\n  bool EndOfBlock() const;\n\n  // Return the latest mean.\n  float GetLatestMean() const;\n\n private:\n  // Clear all values added.\n  void Clear();\n\n  const size_t block_length_;\n  size_t count_;\n  float sum_;\n  float mean_;\n\n  RTC_DISALLOW_COPY_AND_ASSIGN(BlockMeanCalculator);\n};\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_BLOCK_MEAN_CALCULATOR_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/delay_estimator.cc",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/utility/delay_estimator.h\"\n\n#include <stdlib.h>\n#include <string.h>\n#include <algorithm>\n\n#include \"webrtc/base/checks.h\"\n\n// Number of right shifts for scaling is linearly depending on number of bits in\n// the far-end binary spectrum.\nstatic const int kShiftsAtZero = 13;  // Right shifts at zero binary spectrum.\nstatic const int kShiftsLinearSlope = 3;\n\nstatic const int32_t kProbabilityOffset = 1024;  // 2 in Q9.\nstatic const int32_t kProbabilityLowerLimit = 8704;  // 17 in Q9.\nstatic const int32_t kProbabilityMinSpread = 2816;  // 5.5 in Q9.\n\n// Robust validation settings\nstatic const float kHistogramMax = 3000.f;\nstatic const float kLastHistogramMax = 250.f;\nstatic const float kMinHistogramThreshold = 1.5f;\nstatic const int kMinRequiredHits = 10;\nstatic const int kMaxHitsWhenPossiblyNonCausal = 10;\nstatic const int kMaxHitsWhenPossiblyCausal = 1000;\nstatic const float kQ14Scaling = 1.f / (1 << 14);  // Scaling by 2^14 to get Q0.\nstatic const float kFractionSlope = 0.05f;\nstatic const float kMinFractionWhenPossiblyCausal = 0.5f;\nstatic const float kMinFractionWhenPossiblyNonCausal = 0.25f;\n\n// Counts and returns number of bits of a 32-bit word.\nstatic int BitCount(uint32_t u32) {\n  uint32_t tmp = u32 - ((u32 >> 1) & 033333333333) -\n      ((u32 >> 2) & 011111111111);\n  tmp = ((tmp + (tmp >> 3)) & 030707070707);\n  tmp = (tmp + (tmp >> 6));\n  tmp = (tmp + (tmp >> 12) + (tmp >> 24)) & 077;\n\n  return ((int) tmp);\n}\n\n// Compares the |binary_vector| with all rows of the |binary_matrix| and counts\n// per row the number of times they have the same value.\n//\n// Inputs:\n//      - binary_vector     : binary \"vector\" stored in a long\n//      - binary_matrix     : binary \"matrix\" stored as a vector of long\n//      - matrix_size       : size of binary \"matrix\"\n//\n// Output:\n//      - bit_counts        : \"Vector\" stored as a long, containing for each\n//                            row the number of times the matrix row and the\n//                            input vector have the same value\n//\nstatic void BitCountComparison(uint32_t binary_vector,\n                               const uint32_t* binary_matrix,\n                               int matrix_size,\n                               int32_t* bit_counts) {\n  int n = 0;\n\n  // Compare |binary_vector| with all rows of the |binary_matrix|\n  for (; n < matrix_size; n++) {\n    bit_counts[n] = (int32_t) BitCount(binary_vector ^ binary_matrix[n]);\n  }\n}\n\n// Collects necessary statistics for the HistogramBasedValidation().  This\n// function has to be called prior to calling HistogramBasedValidation().  The\n// statistics updated and used by the HistogramBasedValidation() are:\n//  1. the number of |candidate_hits|, which states for how long we have had the\n//     same |candidate_delay|\n//  2. the |histogram| of candidate delays over time.  This histogram is\n//     weighted with respect to a reliability measure and time-varying to cope\n//     with possible delay shifts.\n// For further description see commented code.\n//\n// Inputs:\n//  - candidate_delay   : The delay to validate.\n//  - valley_depth_q14  : The cost function has a valley/minimum at the\n//                        |candidate_delay| location.  |valley_depth_q14| is the\n//                        cost function difference between the minimum and\n//                        maximum locations.  The value is in the Q14 domain.\n//  - valley_level_q14  : Is the cost function value at the minimum, in Q14.\nstatic void UpdateRobustValidationStatistics(BinaryDelayEstimator* self,\n                                             int candidate_delay,\n                                             int32_t valley_depth_q14,\n                                             int32_t valley_level_q14) {\n  const float valley_depth = valley_depth_q14 * kQ14Scaling;\n  float decrease_in_last_set = valley_depth;\n  const int max_hits_for_slow_change = (candidate_delay < self->last_delay) ?\n      kMaxHitsWhenPossiblyNonCausal : kMaxHitsWhenPossiblyCausal;\n  int i = 0;\n\n  RTC_DCHECK_EQ(self->history_size, self->farend->history_size);\n  // Reset |candidate_hits| if we have a new candidate.\n  if (candidate_delay != self->last_candidate_delay) {\n    self->candidate_hits = 0;\n    self->last_candidate_delay = candidate_delay;\n  }\n  self->candidate_hits++;\n\n  // The |histogram| is updated differently across the bins.\n  // 1. The |candidate_delay| histogram bin is increased with the\n  //    |valley_depth|, which is a simple measure of how reliable the\n  //    |candidate_delay| is.  The histogram is not increased above\n  //    |kHistogramMax|.\n  self->histogram[candidate_delay] += valley_depth;\n  if (self->histogram[candidate_delay] > kHistogramMax) {\n    self->histogram[candidate_delay] = kHistogramMax;\n  }\n  // 2. The histogram bins in the neighborhood of |candidate_delay| are\n  //    unaffected.  The neighborhood is defined as x + {-2, -1, 0, 1}.\n  // 3. The histogram bins in the neighborhood of |last_delay| are decreased\n  //    with |decrease_in_last_set|.  This value equals the difference between\n  //    the cost function values at the locations |candidate_delay| and\n  //    |last_delay| until we reach |max_hits_for_slow_change| consecutive hits\n  //    at the |candidate_delay|.  If we exceed this amount of hits the\n  //    |candidate_delay| is a \"potential\" candidate and we start decreasing\n  //    these histogram bins more rapidly with |valley_depth|.\n  if (self->candidate_hits < max_hits_for_slow_change) {\n    decrease_in_last_set = (self->mean_bit_counts[self->compare_delay] -\n        valley_level_q14) * kQ14Scaling;\n  }\n  // 4. All other bins are decreased with |valley_depth|.\n  // TODO(bjornv): Investigate how to make this loop more efficient.  Split up\n  // the loop?  Remove parts that doesn't add too much.\n  for (i = 0; i < self->history_size; ++i) {\n    int is_in_last_set = (i >= self->last_delay - 2) &&\n        (i <= self->last_delay + 1) && (i != candidate_delay);\n    int is_in_candidate_set = (i >= candidate_delay - 2) &&\n        (i <= candidate_delay + 1);\n    self->histogram[i] -= decrease_in_last_set * is_in_last_set +\n        valley_depth * (!is_in_last_set && !is_in_candidate_set);\n    // 5. No histogram bin can go below 0.\n    if (self->histogram[i] < 0) {\n      self->histogram[i] = 0;\n    }\n  }\n}\n\n// Validates the |candidate_delay|, estimated in WebRtc_ProcessBinarySpectrum(),\n// based on a mix of counting concurring hits with a modified histogram\n// of recent delay estimates.  In brief a candidate is valid (returns 1) if it\n// is the most likely according to the histogram.  There are a couple of\n// exceptions that are worth mentioning:\n//  1. If the |candidate_delay| < |last_delay| it can be that we are in a\n//     non-causal state, breaking a possible echo control algorithm.  Hence, we\n//     open up for a quicker change by allowing the change even if the\n//     |candidate_delay| is not the most likely one according to the histogram.\n//  2. There's a minimum number of hits (kMinRequiredHits) and the histogram\n//     value has to reached a minimum (kMinHistogramThreshold) to be valid.\n//  3. The action is also depending on the filter length used for echo control.\n//     If the delay difference is larger than what the filter can capture, we\n//     also move quicker towards a change.\n// For further description see commented code.\n//\n// Input:\n//  - candidate_delay     : The delay to validate.\n//\n// Return value:\n//  - is_histogram_valid  : 1 - The |candidate_delay| is valid.\n//                          0 - Otherwise.\nstatic int HistogramBasedValidation(const BinaryDelayEstimator* self,\n                                    int candidate_delay) {\n  float fraction = 1.f;\n  float histogram_threshold = self->histogram[self->compare_delay];\n  const int delay_difference = candidate_delay - self->last_delay;\n  int is_histogram_valid = 0;\n\n  // The histogram based validation of |candidate_delay| is done by comparing\n  // the |histogram| at bin |candidate_delay| with a |histogram_threshold|.\n  // This |histogram_threshold| equals a |fraction| of the |histogram| at bin\n  // |last_delay|.  The |fraction| is a piecewise linear function of the\n  // |delay_difference| between the |candidate_delay| and the |last_delay|\n  // allowing for a quicker move if\n  //  i) a potential echo control filter can not handle these large differences.\n  // ii) keeping |last_delay| instead of updating to |candidate_delay| could\n  //     force an echo control into a non-causal state.\n  // We further require the histogram to have reached a minimum value of\n  // |kMinHistogramThreshold|.  In addition, we also require the number of\n  // |candidate_hits| to be more than |kMinRequiredHits| to remove spurious\n  // values.\n\n  // Calculate a comparison histogram value (|histogram_threshold|) that is\n  // depending on the distance between the |candidate_delay| and |last_delay|.\n  // TODO(bjornv): How much can we gain by turning the fraction calculation\n  // into tables?\n  if (delay_difference > self->allowed_offset) {\n    fraction = 1.f - kFractionSlope * (delay_difference - self->allowed_offset);\n    fraction = (fraction > kMinFractionWhenPossiblyCausal ? fraction :\n        kMinFractionWhenPossiblyCausal);\n  } else if (delay_difference < 0) {\n    fraction = kMinFractionWhenPossiblyNonCausal -\n        kFractionSlope * delay_difference;\n    fraction = (fraction > 1.f ? 1.f : fraction);\n  }\n  histogram_threshold *= fraction;\n  histogram_threshold = (histogram_threshold > kMinHistogramThreshold ?\n      histogram_threshold : kMinHistogramThreshold);\n\n  is_histogram_valid =\n      (self->histogram[candidate_delay] >= histogram_threshold) &&\n      (self->candidate_hits > kMinRequiredHits);\n\n  return is_histogram_valid;\n}\n\n// Performs a robust validation of the |candidate_delay| estimated in\n// WebRtc_ProcessBinarySpectrum().  The algorithm takes the\n// |is_instantaneous_valid| and the |is_histogram_valid| and combines them\n// into a robust validation.  The HistogramBasedValidation() has to be called\n// prior to this call.\n// For further description on how the combination is done, see commented code.\n//\n// Inputs:\n//  - candidate_delay         : The delay to validate.\n//  - is_instantaneous_valid  : The instantaneous validation performed in\n//                              WebRtc_ProcessBinarySpectrum().\n//  - is_histogram_valid      : The histogram based validation.\n//\n// Return value:\n//  - is_robust               : 1 - The candidate_delay is valid according to a\n//                                  combination of the two inputs.\n//                            : 0 - Otherwise.\nstatic int RobustValidation(const BinaryDelayEstimator* self,\n                            int candidate_delay,\n                            int is_instantaneous_valid,\n                            int is_histogram_valid) {\n  int is_robust = 0;\n\n  // The final robust validation is based on the two algorithms; 1) the\n  // |is_instantaneous_valid| and 2) the histogram based with result stored in\n  // |is_histogram_valid|.\n  //   i) Before we actually have a valid estimate (|last_delay| == -2), we say\n  //      a candidate is valid if either algorithm states so\n  //      (|is_instantaneous_valid| OR |is_histogram_valid|).\n  is_robust = (self->last_delay < 0) &&\n      (is_instantaneous_valid || is_histogram_valid);\n  //  ii) Otherwise, we need both algorithms to be certain\n  //      (|is_instantaneous_valid| AND |is_histogram_valid|)\n  is_robust |= is_instantaneous_valid && is_histogram_valid;\n  // iii) With one exception, i.e., the histogram based algorithm can overrule\n  //      the instantaneous one if |is_histogram_valid| = 1 and the histogram\n  //      is significantly strong.\n  is_robust |= is_histogram_valid &&\n      (self->histogram[candidate_delay] > self->last_delay_histogram);\n\n  return is_robust;\n}\n\nvoid WebRtc_FreeBinaryDelayEstimatorFarend(BinaryDelayEstimatorFarend* self) {\n\n  if (self == NULL) {\n    return;\n  }\n\n  free(self->binary_far_history);\n  self->binary_far_history = NULL;\n\n  free(self->far_bit_counts);\n  self->far_bit_counts = NULL;\n\n  free(self);\n}\n\nBinaryDelayEstimatorFarend* WebRtc_CreateBinaryDelayEstimatorFarend(\n    int history_size) {\n  BinaryDelayEstimatorFarend* self = NULL;\n\n  if (history_size > 1) {\n    // Sanity conditions fulfilled.\n    self = static_cast<BinaryDelayEstimatorFarend*>(\n        malloc(sizeof(BinaryDelayEstimatorFarend)));\n  }\n  if (self == NULL) {\n    return NULL;\n  }\n\n  self->history_size = 0;\n  self->binary_far_history = NULL;\n  self->far_bit_counts = NULL;\n  if (WebRtc_AllocateFarendBufferMemory(self, history_size) == 0) {\n    WebRtc_FreeBinaryDelayEstimatorFarend(self);\n    self = NULL;\n  }\n  return self;\n}\n\nint WebRtc_AllocateFarendBufferMemory(BinaryDelayEstimatorFarend* self,\n                                      int history_size) {\n  RTC_DCHECK(self);\n  // (Re-)Allocate memory for history buffers.\n  self->binary_far_history = static_cast<uint32_t*>(\n      realloc(self->binary_far_history,\n              history_size * sizeof(*self->binary_far_history)));\n  self->far_bit_counts = static_cast<int*>(\n      realloc(self->far_bit_counts,\n              history_size * sizeof(*self->far_bit_counts)));\n  if ((self->binary_far_history == NULL) || (self->far_bit_counts == NULL)) {\n    history_size = 0;\n  }\n  // Fill with zeros if we have expanded the buffers.\n  if (history_size > self->history_size) {\n    int size_diff = history_size - self->history_size;\n    memset(&self->binary_far_history[self->history_size],\n           0,\n           sizeof(*self->binary_far_history) * size_diff);\n    memset(&self->far_bit_counts[self->history_size],\n           0,\n           sizeof(*self->far_bit_counts) * size_diff);\n  }\n  self->history_size = history_size;\n\n  return self->history_size;\n}\n\nvoid WebRtc_InitBinaryDelayEstimatorFarend(BinaryDelayEstimatorFarend* self) {\n  RTC_DCHECK(self);\n  memset(self->binary_far_history, 0, sizeof(uint32_t) * self->history_size);\n  memset(self->far_bit_counts, 0, sizeof(int) * self->history_size);\n}\n\nvoid WebRtc_SoftResetBinaryDelayEstimatorFarend(\n    BinaryDelayEstimatorFarend* self, int delay_shift) {\n  int abs_shift = abs(delay_shift);\n  int shift_size = 0;\n  int dest_index = 0;\n  int src_index = 0;\n  int padding_index = 0;\n\n  RTC_DCHECK(self);\n  shift_size = self->history_size - abs_shift;\n  RTC_DCHECK_GT(shift_size, 0);\n  if (delay_shift == 0) {\n    return;\n  } else if (delay_shift > 0) {\n    dest_index = abs_shift;\n  } else if (delay_shift < 0) {\n    src_index = abs_shift;\n    padding_index = shift_size;\n  }\n\n  // Shift and zero pad buffers.\n  memmove(&self->binary_far_history[dest_index],\n          &self->binary_far_history[src_index],\n          sizeof(*self->binary_far_history) * shift_size);\n  memset(&self->binary_far_history[padding_index], 0,\n         sizeof(*self->binary_far_history) * abs_shift);\n  memmove(&self->far_bit_counts[dest_index],\n          &self->far_bit_counts[src_index],\n          sizeof(*self->far_bit_counts) * shift_size);\n  memset(&self->far_bit_counts[padding_index], 0,\n         sizeof(*self->far_bit_counts) * abs_shift);\n}\n\nvoid WebRtc_AddBinaryFarSpectrum(BinaryDelayEstimatorFarend* handle,\n                                 uint32_t binary_far_spectrum) {\n  RTC_DCHECK(handle);\n  // Shift binary spectrum history and insert current |binary_far_spectrum|.\n  memmove(&(handle->binary_far_history[1]), &(handle->binary_far_history[0]),\n          (handle->history_size - 1) * sizeof(uint32_t));\n  handle->binary_far_history[0] = binary_far_spectrum;\n\n  // Shift history of far-end binary spectrum bit counts and insert bit count\n  // of current |binary_far_spectrum|.\n  memmove(&(handle->far_bit_counts[1]), &(handle->far_bit_counts[0]),\n          (handle->history_size - 1) * sizeof(int));\n  handle->far_bit_counts[0] = BitCount(binary_far_spectrum);\n}\n\nvoid WebRtc_FreeBinaryDelayEstimator(BinaryDelayEstimator* self) {\n\n  if (self == NULL) {\n    return;\n  }\n\n  free(self->mean_bit_counts);\n  self->mean_bit_counts = NULL;\n\n  free(self->bit_counts);\n  self->bit_counts = NULL;\n\n  free(self->binary_near_history);\n  self->binary_near_history = NULL;\n\n  free(self->histogram);\n  self->histogram = NULL;\n\n  // BinaryDelayEstimator does not have ownership of |farend|, hence we do not\n  // free the memory here. That should be handled separately by the user.\n  self->farend = NULL;\n\n  free(self);\n}\n\nBinaryDelayEstimator* WebRtc_CreateBinaryDelayEstimator(\n    BinaryDelayEstimatorFarend* farend, int max_lookahead) {\n  BinaryDelayEstimator* self = NULL;\n\n  if ((farend != NULL) && (max_lookahead >= 0)) {\n    // Sanity conditions fulfilled.\n    self = static_cast<BinaryDelayEstimator*>(\n        malloc(sizeof(BinaryDelayEstimator)));\n  }\n  if (self == NULL) {\n    return NULL;\n  }\n\n  self->farend = farend;\n  self->near_history_size = max_lookahead + 1;\n  self->history_size = 0;\n  self->robust_validation_enabled = 0;  // Disabled by default.\n  self->allowed_offset = 0;\n\n  self->lookahead = max_lookahead;\n\n  // Allocate memory for spectrum and history buffers.\n  self->mean_bit_counts = NULL;\n  self->bit_counts = NULL;\n  self->histogram = NULL;\n  self->binary_near_history = static_cast<uint32_t*>(\n      malloc((max_lookahead + 1) * sizeof(*self->binary_near_history)));\n  if (self->binary_near_history == NULL ||\n      WebRtc_AllocateHistoryBufferMemory(self, farend->history_size) == 0) {\n    WebRtc_FreeBinaryDelayEstimator(self);\n    self = NULL;\n  }\n\n  return self;\n}\n\nint WebRtc_AllocateHistoryBufferMemory(BinaryDelayEstimator* self,\n                                       int history_size) {\n  BinaryDelayEstimatorFarend* far = self->farend;\n  // (Re-)Allocate memory for spectrum and history buffers.\n  if (history_size != far->history_size) {\n    // Only update far-end buffers if we need.\n    history_size = WebRtc_AllocateFarendBufferMemory(far, history_size);\n  }\n  // The extra array element in |mean_bit_counts| and |histogram| is a dummy\n  // element only used while |last_delay| == -2, i.e., before we have a valid\n  // estimate.\n  self->mean_bit_counts = static_cast<int32_t*>(\n      realloc(self->mean_bit_counts,\n              (history_size + 1) * sizeof(*self->mean_bit_counts)));\n  self->bit_counts = static_cast<int32_t*>(\n      realloc(self->bit_counts, history_size * sizeof(*self->bit_counts)));\n  self->histogram = static_cast<float*>(\n      realloc(self->histogram, (history_size + 1) * sizeof(*self->histogram)));\n\n  if ((self->mean_bit_counts == NULL) ||\n      (self->bit_counts == NULL) ||\n      (self->histogram == NULL)) {\n    history_size = 0;\n  }\n  // Fill with zeros if we have expanded the buffers.\n  if (history_size > self->history_size) {\n    int size_diff = history_size - self->history_size;\n    memset(&self->mean_bit_counts[self->history_size],\n           0,\n           sizeof(*self->mean_bit_counts) * size_diff);\n    memset(&self->bit_counts[self->history_size],\n           0,\n           sizeof(*self->bit_counts) * size_diff);\n    memset(&self->histogram[self->history_size],\n           0,\n           sizeof(*self->histogram) * size_diff);\n  }\n  self->history_size = history_size;\n\n  return self->history_size;\n}\n\nvoid WebRtc_InitBinaryDelayEstimator(BinaryDelayEstimator* self) {\n  int i = 0;\n  RTC_DCHECK(self);\n\n  memset(self->bit_counts, 0, sizeof(int32_t) * self->history_size);\n  memset(self->binary_near_history,\n         0,\n         sizeof(uint32_t) * self->near_history_size);\n  for (i = 0; i <= self->history_size; ++i) {\n    self->mean_bit_counts[i] = (20 << 9);  // 20 in Q9.\n    self->histogram[i] = 0.f;\n  }\n  self->minimum_probability = kMaxBitCountsQ9;  // 32 in Q9.\n  self->last_delay_probability = (int) kMaxBitCountsQ9;  // 32 in Q9.\n\n  // Default return value if we're unable to estimate. -1 is used for errors.\n  self->last_delay = -2;\n\n  self->last_candidate_delay = -2;\n  self->compare_delay = self->history_size;\n  self->candidate_hits = 0;\n  self->last_delay_histogram = 0.f;\n}\n\nint WebRtc_SoftResetBinaryDelayEstimator(BinaryDelayEstimator* self,\n                                         int delay_shift) {\n  int lookahead = 0;\n  RTC_DCHECK(self);\n  lookahead = self->lookahead;\n  self->lookahead -= delay_shift;\n  if (self->lookahead < 0) {\n    self->lookahead = 0;\n  }\n  if (self->lookahead > self->near_history_size - 1) {\n    self->lookahead = self->near_history_size - 1;\n  }\n  return lookahead - self->lookahead;\n}\n\nint WebRtc_ProcessBinarySpectrum(BinaryDelayEstimator* self,\n                                 uint32_t binary_near_spectrum) {\n  int i = 0;\n  int candidate_delay = -1;\n  int valid_candidate = 0;\n\n  int32_t value_best_candidate = kMaxBitCountsQ9;\n  int32_t value_worst_candidate = 0;\n  int32_t valley_depth = 0;\n\n  RTC_DCHECK(self);\n  if (self->farend->history_size != self->history_size) {\n    // Non matching history sizes.\n    return -1;\n  }\n  if (self->near_history_size > 1) {\n    // If we apply lookahead, shift near-end binary spectrum history. Insert\n    // current |binary_near_spectrum| and pull out the delayed one.\n    memmove(&(self->binary_near_history[1]), &(self->binary_near_history[0]),\n            (self->near_history_size - 1) * sizeof(uint32_t));\n    self->binary_near_history[0] = binary_near_spectrum;\n    binary_near_spectrum = self->binary_near_history[self->lookahead];\n  }\n\n  // Compare with delayed spectra and store the |bit_counts| for each delay.\n  BitCountComparison(binary_near_spectrum, self->farend->binary_far_history,\n                     self->history_size, self->bit_counts);\n\n  // Update |mean_bit_counts|, which is the smoothed version of |bit_counts|.\n  for (i = 0; i < self->history_size; i++) {\n    // |bit_counts| is constrained to [0, 32], meaning we can smooth with a\n    // factor up to 2^26. We use Q9.\n    int32_t bit_count = (self->bit_counts[i] << 9);  // Q9.\n\n    // Update |mean_bit_counts| only when far-end signal has something to\n    // contribute. If |far_bit_counts| is zero the far-end signal is weak and\n    // we likely have a poor echo condition, hence don't update.\n    if (self->farend->far_bit_counts[i] > 0) {\n      // Make number of right shifts piecewise linear w.r.t. |far_bit_counts|.\n      int shifts = kShiftsAtZero;\n      shifts -= (kShiftsLinearSlope * self->farend->far_bit_counts[i]) >> 4;\n      WebRtc_MeanEstimatorFix(bit_count, shifts, &(self->mean_bit_counts[i]));\n    }\n  }\n\n  // Find |candidate_delay|, |value_best_candidate| and |value_worst_candidate|\n  // of |mean_bit_counts|.\n  for (i = 0; i < self->history_size; i++) {\n    if (self->mean_bit_counts[i] < value_best_candidate) {\n      value_best_candidate = self->mean_bit_counts[i];\n      candidate_delay = i;\n    }\n    if (self->mean_bit_counts[i] > value_worst_candidate) {\n      value_worst_candidate = self->mean_bit_counts[i];\n    }\n  }\n  valley_depth = value_worst_candidate - value_best_candidate;\n\n  // The |value_best_candidate| is a good indicator on the probability of\n  // |candidate_delay| being an accurate delay (a small |value_best_candidate|\n  // means a good binary match). In the following sections we make a decision\n  // whether to update |last_delay| or not.\n  // 1) If the difference bit counts between the best and the worst delay\n  //    candidates is too small we consider the situation to be unreliable and\n  //    don't update |last_delay|.\n  // 2) If the situation is reliable we update |last_delay| if the value of the\n  //    best candidate delay has a value less than\n  //     i) an adaptive threshold |minimum_probability|, or\n  //    ii) this corresponding value |last_delay_probability|, but updated at\n  //        this time instant.\n\n  // Update |minimum_probability|.\n  if ((self->minimum_probability > kProbabilityLowerLimit) &&\n      (valley_depth > kProbabilityMinSpread)) {\n    // The \"hard\" threshold can't be lower than 17 (in Q9).\n    // The valley in the curve also has to be distinct, i.e., the\n    // difference between |value_worst_candidate| and |value_best_candidate| has\n    // to be large enough.\n    int32_t threshold = value_best_candidate + kProbabilityOffset;\n    if (threshold < kProbabilityLowerLimit) {\n      threshold = kProbabilityLowerLimit;\n    }\n    if (self->minimum_probability > threshold) {\n      self->minimum_probability = threshold;\n    }\n  }\n  // Update |last_delay_probability|.\n  // We use a Markov type model, i.e., a slowly increasing level over time.\n  self->last_delay_probability++;\n  // Validate |candidate_delay|.  We have a reliable instantaneous delay\n  // estimate if\n  //  1) The valley is distinct enough (|valley_depth| > |kProbabilityOffset|)\n  // and\n  //  2) The depth of the valley is deep enough\n  //      (|value_best_candidate| < |minimum_probability|)\n  //     and deeper than the best estimate so far\n  //      (|value_best_candidate| < |last_delay_probability|)\n  valid_candidate = ((valley_depth > kProbabilityOffset) &&\n      ((value_best_candidate < self->minimum_probability) ||\n          (value_best_candidate < self->last_delay_probability)));\n\n  // Check for nonstationary farend signal.\n  const bool non_stationary_farend =\n      std::any_of(self->farend->far_bit_counts,\n                  self->farend->far_bit_counts + self->history_size,\n                  [](int a) { return a > 0; });\n\n  if (non_stationary_farend) {\n    // Only update the validation statistics when the farend is nonstationary\n    // as the underlying estimates are otherwise frozen.\n    UpdateRobustValidationStatistics(self, candidate_delay, valley_depth,\n                                     value_best_candidate);\n  }\n\n  if (self->robust_validation_enabled) {\n    int is_histogram_valid = HistogramBasedValidation(self, candidate_delay);\n    valid_candidate = RobustValidation(self, candidate_delay, valid_candidate,\n                                       is_histogram_valid);\n\n  }\n\n  // Only update the delay estimate when the farend is nonstationary and when\n  // a valid delay candidate is available.\n  if (non_stationary_farend && valid_candidate) {\n    if (candidate_delay != self->last_delay) {\n      self->last_delay_histogram =\n          (self->histogram[candidate_delay] > kLastHistogramMax ?\n              kLastHistogramMax : self->histogram[candidate_delay]);\n      // Adjust the histogram if we made a change to |last_delay|, though it was\n      // not the most likely one according to the histogram.\n      if (self->histogram[candidate_delay] <\n          self->histogram[self->compare_delay]) {\n        self->histogram[self->compare_delay] = self->histogram[candidate_delay];\n      }\n    }\n    self->last_delay = candidate_delay;\n    if (value_best_candidate < self->last_delay_probability) {\n      self->last_delay_probability = value_best_candidate;\n    }\n    self->compare_delay = self->last_delay;\n  }\n\n  return self->last_delay;\n}\n\nint WebRtc_binary_last_delay(BinaryDelayEstimator* self) {\n  RTC_DCHECK(self);\n  return self->last_delay;\n}\n\nfloat WebRtc_binary_last_delay_quality(BinaryDelayEstimator* self) {\n  float quality = 0;\n  RTC_DCHECK(self);\n\n  if (self->robust_validation_enabled) {\n    // Simply a linear function of the histogram height at delay estimate.\n    quality = self->histogram[self->compare_delay] / kHistogramMax;\n  } else {\n    // Note that |last_delay_probability| states how deep the minimum of the\n    // cost function is, so it is rather an error probability.\n    quality = (float) (kMaxBitCountsQ9 - self->last_delay_probability) /\n        kMaxBitCountsQ9;\n    if (quality < 0) {\n      quality = 0;\n    }\n  }\n  return quality;\n}\n\nvoid WebRtc_MeanEstimatorFix(int32_t new_value,\n                             int factor,\n                             int32_t* mean_value) {\n  int32_t diff = new_value - *mean_value;\n\n  // mean_new = mean_value + ((new_value - mean_value) >> factor);\n  if (diff < 0) {\n    diff = -((-diff) >> factor);\n  } else {\n    diff = (diff >> factor);\n  }\n  *mean_value += diff;\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/delay_estimator.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// Performs delay estimation on binary converted spectra.\n// The return value is  0 - OK and -1 - Error, unless otherwise stated.\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_H_\n\n#include \"webrtc/typedefs.h\"\n\nstatic const int32_t kMaxBitCountsQ9 = (32 << 9);  // 32 matching bits in Q9.\n\ntypedef struct {\n  // Pointer to bit counts.\n  int* far_bit_counts;\n  // Binary history variables.\n  uint32_t* binary_far_history;\n  int history_size;\n} BinaryDelayEstimatorFarend;\n\ntypedef struct {\n  // Pointer to bit counts.\n  int32_t* mean_bit_counts;\n  // Array only used locally in ProcessBinarySpectrum() but whose size is\n  // determined at run-time.\n  int32_t* bit_counts;\n\n  // Binary history variables.\n  uint32_t* binary_near_history;\n  int near_history_size;\n  int history_size;\n\n  // Delay estimation variables.\n  int32_t minimum_probability;\n  int last_delay_probability;\n\n  // Delay memory.\n  int last_delay;\n\n  // Robust validation\n  int robust_validation_enabled;\n  int allowed_offset;\n  int last_candidate_delay;\n  int compare_delay;\n  int candidate_hits;\n  float* histogram;\n  float last_delay_histogram;\n\n  // For dynamically changing the lookahead when using SoftReset...().\n  int lookahead;\n\n  // Far-end binary spectrum history buffer etc.\n  BinaryDelayEstimatorFarend* farend;\n} BinaryDelayEstimator;\n\n// Releases the memory allocated by\n// WebRtc_CreateBinaryDelayEstimatorFarend(...).\n// Input:\n//    - self              : Pointer to the binary delay estimation far-end\n//                          instance which is the return value of\n//                          WebRtc_CreateBinaryDelayEstimatorFarend().\n//\nvoid WebRtc_FreeBinaryDelayEstimatorFarend(BinaryDelayEstimatorFarend* self);\n\n// Allocates the memory needed by the far-end part of the binary delay\n// estimation. The memory needs to be initialized separately through\n// WebRtc_InitBinaryDelayEstimatorFarend(...).\n//\n// Inputs:\n//      - history_size    : Size of the far-end binary spectrum history.\n//\n// Return value:\n//      - BinaryDelayEstimatorFarend*\n//                        : Created |handle|. If the memory can't be allocated\n//                          or if any of the input parameters are invalid NULL\n//                          is returned.\n//\nBinaryDelayEstimatorFarend* WebRtc_CreateBinaryDelayEstimatorFarend(\n    int history_size);\n\n// Re-allocates the buffers.\n//\n// Inputs:\n//      - self            : Pointer to the binary estimation far-end instance\n//                          which is the return value of\n//                          WebRtc_CreateBinaryDelayEstimatorFarend().\n//      - history_size    : Size of the far-end binary spectrum history.\n//\n// Return value:\n//      - history_size    : The history size allocated.\nint WebRtc_AllocateFarendBufferMemory(BinaryDelayEstimatorFarend* self,\n                                      int history_size);\n\n// Initializes the delay estimation far-end instance created with\n// WebRtc_CreateBinaryDelayEstimatorFarend(...).\n//\n// Input:\n//    - self              : Pointer to the delay estimation far-end instance.\n//\n// Output:\n//    - self              : Initialized far-end instance.\n//\nvoid WebRtc_InitBinaryDelayEstimatorFarend(BinaryDelayEstimatorFarend* self);\n\n// Soft resets the delay estimation far-end instance created with\n// WebRtc_CreateBinaryDelayEstimatorFarend(...).\n//\n// Input:\n//    - delay_shift   : The amount of blocks to shift history buffers.\n//\nvoid WebRtc_SoftResetBinaryDelayEstimatorFarend(\n    BinaryDelayEstimatorFarend* self, int delay_shift);\n\n// Adds the binary far-end spectrum to the internal far-end history buffer. This\n// spectrum is used as reference when calculating the delay using\n// WebRtc_ProcessBinarySpectrum().\n//\n// Inputs:\n//    - self                  : Pointer to the delay estimation far-end\n//                              instance.\n//    - binary_far_spectrum   : Far-end binary spectrum.\n//\n// Output:\n//    - self                  : Updated far-end instance.\n//\nvoid WebRtc_AddBinaryFarSpectrum(BinaryDelayEstimatorFarend* self,\n                                 uint32_t binary_far_spectrum);\n\n// Releases the memory allocated by WebRtc_CreateBinaryDelayEstimator(...).\n//\n// Note that BinaryDelayEstimator utilizes BinaryDelayEstimatorFarend, but does\n// not take ownership of it, hence the BinaryDelayEstimator has to be torn down\n// before the far-end.\n//\n// Input:\n//    - self              : Pointer to the binary delay estimation instance\n//                          which is the return value of\n//                          WebRtc_CreateBinaryDelayEstimator().\n//\nvoid WebRtc_FreeBinaryDelayEstimator(BinaryDelayEstimator* self);\n\n// Allocates the memory needed by the binary delay estimation. The memory needs\n// to be initialized separately through WebRtc_InitBinaryDelayEstimator(...).\n//\n// See WebRtc_CreateDelayEstimator(..) in delay_estimator_wrapper.c for detailed\n// description.\nBinaryDelayEstimator* WebRtc_CreateBinaryDelayEstimator(\n    BinaryDelayEstimatorFarend* farend, int max_lookahead);\n\n// Re-allocates |history_size| dependent buffers. The far-end buffers will be\n// updated at the same time if needed.\n//\n// Input:\n//      - self            : Pointer to the binary estimation instance which is\n//                          the return value of\n//                          WebRtc_CreateBinaryDelayEstimator().\n//      - history_size    : Size of the history buffers.\n//\n// Return value:\n//      - history_size    : The history size allocated.\nint WebRtc_AllocateHistoryBufferMemory(BinaryDelayEstimator* self,\n                                       int history_size);\n\n// Initializes the delay estimation instance created with\n// WebRtc_CreateBinaryDelayEstimator(...).\n//\n// Input:\n//    - self              : Pointer to the delay estimation instance.\n//\n// Output:\n//    - self              : Initialized instance.\n//\nvoid WebRtc_InitBinaryDelayEstimator(BinaryDelayEstimator* self);\n\n// Soft resets the delay estimation instance created with\n// WebRtc_CreateBinaryDelayEstimator(...).\n//\n// Input:\n//    - delay_shift   : The amount of blocks to shift history buffers.\n//\n// Return value:\n//    - actual_shifts : The actual number of shifts performed.\n//\nint WebRtc_SoftResetBinaryDelayEstimator(BinaryDelayEstimator* self,\n                                         int delay_shift);\n\n// Estimates and returns the delay between the binary far-end and binary near-\n// end spectra. It is assumed the binary far-end spectrum has been added using\n// WebRtc_AddBinaryFarSpectrum() prior to this call. The value will be offset by\n// the lookahead (i.e. the lookahead should be subtracted from the returned\n// value).\n//\n// Inputs:\n//    - self                  : Pointer to the delay estimation instance.\n//    - binary_near_spectrum  : Near-end binary spectrum of the current block.\n//\n// Output:\n//    - self                  : Updated instance.\n//\n// Return value:\n//    - delay                 :  >= 0 - Calculated delay value.\n//                              -2    - Insufficient data for estimation.\n//\nint WebRtc_ProcessBinarySpectrum(BinaryDelayEstimator* self,\n                                 uint32_t binary_near_spectrum);\n\n// Returns the last calculated delay updated by the function\n// WebRtc_ProcessBinarySpectrum(...).\n//\n// Input:\n//    - self                  : Pointer to the delay estimation instance.\n//\n// Return value:\n//    - delay                 :  >= 0 - Last calculated delay value\n//                              -2    - Insufficient data for estimation.\n//\nint WebRtc_binary_last_delay(BinaryDelayEstimator* self);\n\n// Returns the estimation quality of the last calculated delay updated by the\n// function WebRtc_ProcessBinarySpectrum(...). The estimation quality is a value\n// in the interval [0, 1].  The higher the value, the better the quality.\n//\n// Return value:\n//    - delay_quality         :  >= 0 - Estimation quality of last calculated\n//                                      delay value.\nfloat WebRtc_binary_last_delay_quality(BinaryDelayEstimator* self);\n\n// Updates the |mean_value| recursively with a step size of 2^-|factor|. This\n// function is used internally in the Binary Delay Estimator as well as the\n// Fixed point wrapper.\n//\n// Inputs:\n//    - new_value             : The new value the mean should be updated with.\n//    - factor                : The step size, in number of right shifts.\n//\n// Input/Output:\n//    - mean_value            : Pointer to the mean value.\n//\nvoid WebRtc_MeanEstimatorFix(int32_t new_value,\n                             int factor,\n                             int32_t* mean_value);\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/delay_estimator_internal.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// Header file including the delay estimator handle used for testing.\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_\n\n#include \"webrtc/modules/audio_processing/utility/delay_estimator.h\"\n#include \"webrtc/typedefs.h\"\n\ntypedef union {\n  float float_;\n  int32_t int32_;\n} SpectrumType;\n\ntypedef struct {\n  // Pointers to mean values of spectrum.\n  SpectrumType* mean_far_spectrum;\n  // |mean_far_spectrum| initialization indicator.\n  int far_spectrum_initialized;\n\n  int spectrum_size;\n\n  // Far-end part of binary spectrum based delay estimation.\n  BinaryDelayEstimatorFarend* binary_farend;\n} DelayEstimatorFarend;\n\ntypedef struct {\n  // Pointers to mean values of spectrum.\n  SpectrumType* mean_near_spectrum;\n  // |mean_near_spectrum| initialization indicator.\n  int near_spectrum_initialized;\n\n  int spectrum_size;\n\n  // Binary spectrum based delay estimator\n  BinaryDelayEstimator* binary_handle;\n} DelayEstimator;\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.cc",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h\"\n\n#include <stdlib.h>\n#include <string.h>\n\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/modules/audio_processing/utility/delay_estimator.h\"\n#include \"webrtc/modules/audio_processing/utility/delay_estimator_internal.h\"\n\n// Only bit |kBandFirst| through bit |kBandLast| are processed and\n// |kBandFirst| - |kBandLast| must be < 32.\nenum { kBandFirst = 12 };\nenum { kBandLast = 43 };\n\nstatic __inline uint32_t SetBit(uint32_t in, int pos) {\n  uint32_t mask = (1 << pos);\n  uint32_t out = (in | mask);\n\n  return out;\n}\n\n// Calculates the mean recursively. Same version as WebRtc_MeanEstimatorFix(),\n// but for float.\n//\n// Inputs:\n//    - new_value             : New additional value.\n//    - scale                 : Scale for smoothing (should be less than 1.0).\n//\n// Input/Output:\n//    - mean_value            : Pointer to the mean value for updating.\n//\nstatic void MeanEstimatorFloat(float new_value,\n                               float scale,\n                               float* mean_value) {\n  RTC_DCHECK_LT(scale, 1.0f);\n  *mean_value += (new_value - *mean_value) * scale;\n}\n\n// Computes the binary spectrum by comparing the input |spectrum| with a\n// |threshold_spectrum|. Float and fixed point versions.\n//\n// Inputs:\n//      - spectrum            : Spectrum of which the binary spectrum should be\n//                              calculated.\n//      - threshold_spectrum  : Threshold spectrum with which the input\n//                              spectrum is compared.\n// Return:\n//      - out                 : Binary spectrum.\n//\nstatic uint32_t BinarySpectrumFix(const uint16_t* spectrum,\n                                  SpectrumType* threshold_spectrum,\n                                  int q_domain,\n                                  int* threshold_initialized) {\n  int i = kBandFirst;\n  uint32_t out = 0;\n\n  RTC_DCHECK_LT(q_domain, 16);\n\n  if (!(*threshold_initialized)) {\n    // Set the |threshold_spectrum| to half the input |spectrum| as starting\n    // value. This speeds up the convergence.\n    for (i = kBandFirst; i <= kBandLast; i++) {\n      if (spectrum[i] > 0) {\n        // Convert input spectrum from Q(|q_domain|) to Q15.\n        int32_t spectrum_q15 = ((int32_t) spectrum[i]) << (15 - q_domain);\n        threshold_spectrum[i].int32_ = (spectrum_q15 >> 1);\n        *threshold_initialized = 1;\n      }\n    }\n  }\n  for (i = kBandFirst; i <= kBandLast; i++) {\n    // Convert input spectrum from Q(|q_domain|) to Q15.\n    int32_t spectrum_q15 = ((int32_t) spectrum[i]) << (15 - q_domain);\n    // Update the |threshold_spectrum|.\n    WebRtc_MeanEstimatorFix(spectrum_q15, 6, &(threshold_spectrum[i].int32_));\n    // Convert |spectrum| at current frequency bin to a binary value.\n    if (spectrum_q15 > threshold_spectrum[i].int32_) {\n      out = SetBit(out, i - kBandFirst);\n    }\n  }\n\n  return out;\n}\n\nstatic uint32_t BinarySpectrumFloat(const float* spectrum,\n                                    SpectrumType* threshold_spectrum,\n                                    int* threshold_initialized) {\n  int i = kBandFirst;\n  uint32_t out = 0;\n  const float kScale = 1 / 64.0;\n\n  if (!(*threshold_initialized)) {\n    // Set the |threshold_spectrum| to half the input |spectrum| as starting\n    // value. This speeds up the convergence.\n    for (i = kBandFirst; i <= kBandLast; i++) {\n      if (spectrum[i] > 0.0f) {\n        threshold_spectrum[i].float_ = (spectrum[i] / 2);\n        *threshold_initialized = 1;\n      }\n    }\n  }\n\n  for (i = kBandFirst; i <= kBandLast; i++) {\n    // Update the |threshold_spectrum|.\n    MeanEstimatorFloat(spectrum[i], kScale, &(threshold_spectrum[i].float_));\n    // Convert |spectrum| at current frequency bin to a binary value.\n    if (spectrum[i] > threshold_spectrum[i].float_) {\n      out = SetBit(out, i - kBandFirst);\n    }\n  }\n\n  return out;\n}\n\nvoid WebRtc_FreeDelayEstimatorFarend(void* handle) {\n  DelayEstimatorFarend* self = (DelayEstimatorFarend*) handle;\n\n  if (handle == NULL) {\n    return;\n  }\n\n  free(self->mean_far_spectrum);\n  self->mean_far_spectrum = NULL;\n\n  WebRtc_FreeBinaryDelayEstimatorFarend(self->binary_farend);\n  self->binary_farend = NULL;\n\n  free(self);\n}\n\nvoid* WebRtc_CreateDelayEstimatorFarend(int spectrum_size, int history_size) {\n  DelayEstimatorFarend* self = NULL;\n\n  // Check if the sub band used in the delay estimation is small enough to fit\n  // the binary spectra in a uint32_t.\n  static_assert(kBandLast - kBandFirst < 32, \"\");\n\n  if (spectrum_size >= kBandLast) {\n    self = static_cast<DelayEstimatorFarend*>(\n        malloc(sizeof(DelayEstimatorFarend)));\n  }\n\n  if (self != NULL) {\n    int memory_fail = 0;\n\n    // Allocate memory for the binary far-end spectrum handling.\n    self->binary_farend = WebRtc_CreateBinaryDelayEstimatorFarend(history_size);\n    memory_fail |= (self->binary_farend == NULL);\n\n    // Allocate memory for spectrum buffers.\n    self->mean_far_spectrum =\n        static_cast<SpectrumType*>(malloc(spectrum_size * sizeof(SpectrumType)));\n    memory_fail |= (self->mean_far_spectrum == NULL);\n\n    self->spectrum_size = spectrum_size;\n\n    if (memory_fail) {\n      WebRtc_FreeDelayEstimatorFarend(self);\n      self = NULL;\n    }\n  }\n\n  return self;\n}\n\nint WebRtc_InitDelayEstimatorFarend(void* handle) {\n  DelayEstimatorFarend* self = (DelayEstimatorFarend*) handle;\n\n  if (self == NULL) {\n    return -1;\n  }\n\n  // Initialize far-end part of binary delay estimator.\n  WebRtc_InitBinaryDelayEstimatorFarend(self->binary_farend);\n\n  // Set averaged far and near end spectra to zero.\n  memset(self->mean_far_spectrum, 0,\n         sizeof(SpectrumType) * self->spectrum_size);\n  // Reset initialization indicators.\n  self->far_spectrum_initialized = 0;\n\n  return 0;\n}\n\nvoid WebRtc_SoftResetDelayEstimatorFarend(void* handle, int delay_shift) {\n  DelayEstimatorFarend* self = (DelayEstimatorFarend*) handle;\n  RTC_DCHECK(self);\n  WebRtc_SoftResetBinaryDelayEstimatorFarend(self->binary_farend, delay_shift);\n}\n\nint WebRtc_AddFarSpectrumFix(void* handle,\n                             const uint16_t* far_spectrum,\n                             int spectrum_size,\n                             int far_q) {\n  DelayEstimatorFarend* self = (DelayEstimatorFarend*) handle;\n  uint32_t binary_spectrum = 0;\n\n  if (self == NULL) {\n    return -1;\n  }\n  if (far_spectrum == NULL) {\n    // Empty far end spectrum.\n    return -1;\n  }\n  if (spectrum_size != self->spectrum_size) {\n    // Data sizes don't match.\n    return -1;\n  }\n  if (far_q > 15) {\n    // If |far_q| is larger than 15 we cannot guarantee no wrap around.\n    return -1;\n  }\n\n  // Get binary spectrum.\n  binary_spectrum = BinarySpectrumFix(far_spectrum, self->mean_far_spectrum,\n                                      far_q, &(self->far_spectrum_initialized));\n  WebRtc_AddBinaryFarSpectrum(self->binary_farend, binary_spectrum);\n\n  return 0;\n}\n\nint WebRtc_AddFarSpectrumFloat(void* handle,\n                               const float* far_spectrum,\n                               int spectrum_size) {\n  DelayEstimatorFarend* self = (DelayEstimatorFarend*) handle;\n  uint32_t binary_spectrum = 0;\n\n  if (self == NULL) {\n    return -1;\n  }\n  if (far_spectrum == NULL) {\n    // Empty far end spectrum.\n    return -1;\n  }\n  if (spectrum_size != self->spectrum_size) {\n    // Data sizes don't match.\n    return -1;\n  }\n\n  // Get binary spectrum.\n  binary_spectrum = BinarySpectrumFloat(far_spectrum, self->mean_far_spectrum,\n                                        &(self->far_spectrum_initialized));\n  WebRtc_AddBinaryFarSpectrum(self->binary_farend, binary_spectrum);\n\n  return 0;\n}\n\nvoid WebRtc_FreeDelayEstimator(void* handle) {\n  DelayEstimator* self = (DelayEstimator*) handle;\n\n  if (handle == NULL) {\n    return;\n  }\n\n  free(self->mean_near_spectrum);\n  self->mean_near_spectrum = NULL;\n\n  WebRtc_FreeBinaryDelayEstimator(self->binary_handle);\n  self->binary_handle = NULL;\n\n  free(self);\n}\n\nvoid* WebRtc_CreateDelayEstimator(void* farend_handle, int max_lookahead) {\n  DelayEstimator* self = NULL;\n  DelayEstimatorFarend* farend = (DelayEstimatorFarend*) farend_handle;\n\n  if (farend_handle != NULL) {\n    self = static_cast<DelayEstimator*>(malloc(sizeof(DelayEstimator)));\n  }\n\n  if (self != NULL) {\n    int memory_fail = 0;\n\n    // Allocate memory for the farend spectrum handling.\n    self->binary_handle =\n        WebRtc_CreateBinaryDelayEstimator(farend->binary_farend, max_lookahead);\n    memory_fail |= (self->binary_handle == NULL);\n\n    // Allocate memory for spectrum buffers.\n    self->mean_near_spectrum = static_cast<SpectrumType*>(\n        malloc(farend->spectrum_size * sizeof(SpectrumType)));\n    memory_fail |= (self->mean_near_spectrum == NULL);\n\n    self->spectrum_size = farend->spectrum_size;\n\n    if (memory_fail) {\n      WebRtc_FreeDelayEstimator(self);\n      self = NULL;\n    }\n  }\n\n  return self;\n}\n\nint WebRtc_InitDelayEstimator(void* handle) {\n  DelayEstimator* self = (DelayEstimator*) handle;\n\n  if (self == NULL) {\n    return -1;\n  }\n\n  // Initialize binary delay estimator.\n  WebRtc_InitBinaryDelayEstimator(self->binary_handle);\n\n  // Set averaged far and near end spectra to zero.\n  memset(self->mean_near_spectrum, 0,\n         sizeof(SpectrumType) * self->spectrum_size);\n  // Reset initialization indicators.\n  self->near_spectrum_initialized = 0;\n\n  return 0;\n}\n\nint WebRtc_SoftResetDelayEstimator(void* handle, int delay_shift) {\n  DelayEstimator* self = (DelayEstimator*) handle;\n  RTC_DCHECK(self);\n  return WebRtc_SoftResetBinaryDelayEstimator(self->binary_handle, delay_shift);\n}\n\nint WebRtc_set_history_size(void* handle, int history_size) {\n  DelayEstimator* self = static_cast<DelayEstimator*>(handle);\n\n  if ((self == NULL) || (history_size <= 1)) {\n    return -1;\n  }\n  return WebRtc_AllocateHistoryBufferMemory(self->binary_handle, history_size);\n}\n\nint WebRtc_history_size(const void* handle) {\n  const DelayEstimator* self = static_cast<const DelayEstimator*>(handle);\n\n  if (self == NULL) {\n    return -1;\n  }\n  if (self->binary_handle->farend->history_size !=\n      self->binary_handle->history_size) {\n    // Non matching history sizes.\n    return -1;\n  }\n  return self->binary_handle->history_size;\n}\n\nint WebRtc_set_lookahead(void* handle, int lookahead) {\n  DelayEstimator* self = (DelayEstimator*) handle;\n  RTC_DCHECK(self);\n  RTC_DCHECK(self->binary_handle);\n  if ((lookahead > self->binary_handle->near_history_size - 1) ||\n      (lookahead < 0)) {\n    return -1;\n  }\n  self->binary_handle->lookahead = lookahead;\n  return self->binary_handle->lookahead;\n}\n\nint WebRtc_lookahead(void* handle) {\n  DelayEstimator* self = (DelayEstimator*) handle;\n  RTC_DCHECK(self);\n  RTC_DCHECK(self->binary_handle);\n  return self->binary_handle->lookahead;\n}\n\nint WebRtc_set_allowed_offset(void* handle, int allowed_offset) {\n  DelayEstimator* self = (DelayEstimator*) handle;\n\n  if ((self == NULL) || (allowed_offset < 0)) {\n    return -1;\n  }\n  self->binary_handle->allowed_offset = allowed_offset;\n  return 0;\n}\n\nint WebRtc_get_allowed_offset(const void* handle) {\n  const DelayEstimator* self = (const DelayEstimator*) handle;\n\n  if (self == NULL) {\n    return -1;\n  }\n  return self->binary_handle->allowed_offset;\n}\n\nint WebRtc_enable_robust_validation(void* handle, int enable) {\n  DelayEstimator* self = (DelayEstimator*) handle;\n\n  if (self == NULL) {\n    return -1;\n  }\n  if ((enable < 0) || (enable > 1)) {\n    return -1;\n  }\n  RTC_DCHECK(self->binary_handle);\n  self->binary_handle->robust_validation_enabled = enable;\n  return 0;\n}\n\nint WebRtc_is_robust_validation_enabled(const void* handle) {\n  const DelayEstimator* self = (const DelayEstimator*) handle;\n\n  if (self == NULL) {\n    return -1;\n  }\n  return self->binary_handle->robust_validation_enabled;\n}\n\nint WebRtc_DelayEstimatorProcessFix(void* handle,\n                                    const uint16_t* near_spectrum,\n                                    int spectrum_size,\n                                    int near_q) {\n  DelayEstimator* self = (DelayEstimator*) handle;\n  uint32_t binary_spectrum = 0;\n\n  if (self == NULL) {\n    return -1;\n  }\n  if (near_spectrum == NULL) {\n    // Empty near end spectrum.\n    return -1;\n  }\n  if (spectrum_size != self->spectrum_size) {\n    // Data sizes don't match.\n    return -1;\n  }\n  if (near_q > 15) {\n    // If |near_q| is larger than 15 we cannot guarantee no wrap around.\n    return -1;\n  }\n\n  // Get binary spectra.\n  binary_spectrum = BinarySpectrumFix(near_spectrum,\n                                      self->mean_near_spectrum,\n                                      near_q,\n                                      &(self->near_spectrum_initialized));\n\n  return WebRtc_ProcessBinarySpectrum(self->binary_handle, binary_spectrum);\n}\n\nint WebRtc_DelayEstimatorProcessFloat(void* handle,\n                                      const float* near_spectrum,\n                                      int spectrum_size) {\n  DelayEstimator* self = (DelayEstimator*) handle;\n  uint32_t binary_spectrum = 0;\n\n  if (self == NULL) {\n    return -1;\n  }\n  if (near_spectrum == NULL) {\n    // Empty near end spectrum.\n    return -1;\n  }\n  if (spectrum_size != self->spectrum_size) {\n    // Data sizes don't match.\n    return -1;\n  }\n\n  // Get binary spectrum.\n  binary_spectrum = BinarySpectrumFloat(near_spectrum, self->mean_near_spectrum,\n                                        &(self->near_spectrum_initialized));\n\n  return WebRtc_ProcessBinarySpectrum(self->binary_handle, binary_spectrum);\n}\n\nint WebRtc_last_delay(void* handle) {\n  DelayEstimator* self = (DelayEstimator*) handle;\n\n  if (self == NULL) {\n    return -1;\n  }\n\n  return WebRtc_binary_last_delay(self->binary_handle);\n}\n\nfloat WebRtc_last_delay_quality(void* handle) {\n  DelayEstimator* self = (DelayEstimator*) handle;\n  RTC_DCHECK(self);\n  return WebRtc_binary_last_delay_quality(self->binary_handle);\n}\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// Performs delay estimation on block by block basis.\n// The return value is  0 - OK and -1 - Error, unless otherwise stated.\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_WRAPPER_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_WRAPPER_H_\n\n#include \"webrtc/typedefs.h\"\n\n// Releases the memory allocated by WebRtc_CreateDelayEstimatorFarend(...)\nvoid WebRtc_FreeDelayEstimatorFarend(void* handle);\n\n// Allocates the memory needed by the far-end part of the delay estimation. The\n// memory needs to be initialized separately through\n// WebRtc_InitDelayEstimatorFarend(...).\n//\n// Inputs:\n//  - spectrum_size     : Size of the spectrum used both in far-end and\n//                        near-end. Used to allocate memory for spectrum\n//                        specific buffers.\n//  - history_size      : The far-end history buffer size. A change in buffer\n//                        size can be forced with WebRtc_set_history_size().\n//                        Note that the maximum delay which can be estimated is\n//                        determined together with WebRtc_set_lookahead().\n//\n// Return value:\n//  - void*             : Created |handle|. If the memory can't be allocated or\n//                        if any of the input parameters are invalid NULL is\n//                        returned.\nvoid* WebRtc_CreateDelayEstimatorFarend(int spectrum_size, int history_size);\n\n// Initializes the far-end part of the delay estimation instance returned by\n// WebRtc_CreateDelayEstimatorFarend(...)\nint WebRtc_InitDelayEstimatorFarend(void* handle);\n\n// Soft resets the far-end part of the delay estimation instance returned by\n// WebRtc_CreateDelayEstimatorFarend(...).\n// Input:\n//      - delay_shift   : The amount of blocks to shift history buffers.\nvoid WebRtc_SoftResetDelayEstimatorFarend(void* handle, int delay_shift);\n\n// Adds the far-end spectrum to the far-end history buffer. This spectrum is\n// used as reference when calculating the delay using\n// WebRtc_ProcessSpectrum().\n//\n// Inputs:\n//    - far_spectrum    : Far-end spectrum.\n//    - spectrum_size   : The size of the data arrays (same for both far- and\n//                        near-end).\n//    - far_q           : The Q-domain of the far-end data.\n//\n// Output:\n//    - handle          : Updated far-end instance.\n//\nint WebRtc_AddFarSpectrumFix(void* handle,\n                             const uint16_t* far_spectrum,\n                             int spectrum_size,\n                             int far_q);\n\n// See WebRtc_AddFarSpectrumFix() for description.\nint WebRtc_AddFarSpectrumFloat(void* handle,\n                               const float* far_spectrum,\n                               int spectrum_size);\n\n// Releases the memory allocated by WebRtc_CreateDelayEstimator(...)\nvoid WebRtc_FreeDelayEstimator(void* handle);\n\n// Allocates the memory needed by the delay estimation. The memory needs to be\n// initialized separately through WebRtc_InitDelayEstimator(...).\n//\n// Inputs:\n//      - farend_handle : Pointer to the far-end part of the delay estimation\n//                        instance created prior to this call using\n//                        WebRtc_CreateDelayEstimatorFarend().\n//\n//                        Note that WebRtc_CreateDelayEstimator does not take\n//                        ownership of |farend_handle|, which has to be torn\n//                        down properly after this instance.\n//\n//      - max_lookahead : Maximum amount of non-causal lookahead allowed. The\n//                        actual amount of lookahead used can be controlled by\n//                        WebRtc_set_lookahead(...). The default |lookahead| is\n//                        set to |max_lookahead| at create time. Use\n//                        WebRtc_set_lookahead(...) before start if a different\n//                        value is desired.\n//\n//                        Using lookahead can detect cases in which a near-end\n//                        signal occurs before the corresponding far-end signal.\n//                        It will delay the estimate for the current block by an\n//                        equal amount, and the returned values will be offset\n//                        by it.\n//\n//                        A value of zero is the typical no-lookahead case.\n//                        This also represents the minimum delay which can be\n//                        estimated.\n//\n//                        Note that the effective range of delay estimates is\n//                        [-|lookahead|,... ,|history_size|-|lookahead|)\n//                        where |history_size| is set through\n//                        WebRtc_set_history_size().\n//\n// Return value:\n//      - void*         : Created |handle|. If the memory can't be allocated or\n//                        if any of the input parameters are invalid NULL is\n//                        returned.\nvoid* WebRtc_CreateDelayEstimator(void* farend_handle, int max_lookahead);\n\n// Initializes the delay estimation instance returned by\n// WebRtc_CreateDelayEstimator(...)\nint WebRtc_InitDelayEstimator(void* handle);\n\n// Soft resets the delay estimation instance returned by\n// WebRtc_CreateDelayEstimator(...)\n// Input:\n//      - delay_shift   : The amount of blocks to shift history buffers.\n//\n// Return value:\n//      - actual_shifts : The actual number of shifts performed.\nint WebRtc_SoftResetDelayEstimator(void* handle, int delay_shift);\n\n// Sets the effective |history_size| used. Valid values from 2. We simply need\n// at least two delays to compare to perform an estimate. If |history_size| is\n// changed, buffers are reallocated filling in with zeros if necessary.\n// Note that changing the |history_size| affects both buffers in far-end and\n// near-end. Hence it is important to change all DelayEstimators that use the\n// same reference far-end, to the same |history_size| value.\n// Inputs:\n//  - handle            : Pointer to the delay estimation instance.\n//  - history_size      : Effective history size to be used.\n// Return value:\n//  - new_history_size  : The new history size used. If the memory was not able\n//                        to be allocated 0 is returned.\nint WebRtc_set_history_size(void* handle, int history_size);\n\n// Returns the history_size currently used.\n// Input:\n//      - handle        : Pointer to the delay estimation instance.\nint WebRtc_history_size(const void* handle);\n\n// Sets the amount of |lookahead| to use. Valid values are [0, max_lookahead]\n// where |max_lookahead| was set at create time through\n// WebRtc_CreateDelayEstimator(...).\n//\n// Input:\n//      - handle        : Pointer to the delay estimation instance.\n//      - lookahead     : The amount of lookahead to be used.\n//\n// Return value:\n//      - new_lookahead : The actual amount of lookahead set, unless |handle| is\n//                        a NULL pointer or |lookahead| is invalid, for which an\n//                        error is returned.\nint WebRtc_set_lookahead(void* handle, int lookahead);\n\n// Returns the amount of lookahead we currently use.\n// Input:\n//      - handle        : Pointer to the delay estimation instance.\nint WebRtc_lookahead(void* handle);\n\n// Sets the |allowed_offset| used in the robust validation scheme.  If the\n// delay estimator is used in an echo control component, this parameter is\n// related to the filter length.  In principle |allowed_offset| should be set to\n// the echo control filter length minus the expected echo duration, i.e., the\n// delay offset the echo control can handle without quality regression.  The\n// default value, used if not set manually, is zero.  Note that |allowed_offset|\n// has to be non-negative.\n// Inputs:\n//  - handle            : Pointer to the delay estimation instance.\n//  - allowed_offset    : The amount of delay offset, measured in partitions,\n//                        the echo control filter can handle.\nint WebRtc_set_allowed_offset(void* handle, int allowed_offset);\n\n// Returns the |allowed_offset| in number of partitions.\nint WebRtc_get_allowed_offset(const void* handle);\n\n// Enables/Disables a robust validation functionality in the delay estimation.\n// This is by default set to disabled at create time.  The state is preserved\n// over a reset.\n// Inputs:\n//      - handle        : Pointer to the delay estimation instance.\n//      - enable        : Enable (1) or disable (0) this feature.\nint WebRtc_enable_robust_validation(void* handle, int enable);\n\n// Returns 1 if robust validation is enabled and 0 if disabled.\nint WebRtc_is_robust_validation_enabled(const void* handle);\n\n// Estimates and returns the delay between the far-end and near-end blocks. The\n// value will be offset by the lookahead (i.e. the lookahead should be\n// subtracted from the returned value).\n// Inputs:\n//      - handle        : Pointer to the delay estimation instance.\n//      - near_spectrum : Pointer to the near-end spectrum data of the current\n//                        block.\n//      - spectrum_size : The size of the data arrays (same for both far- and\n//                        near-end).\n//      - near_q        : The Q-domain of the near-end data.\n//\n// Output:\n//      - handle        : Updated instance.\n//\n// Return value:\n//      - delay         :  >= 0 - Calculated delay value.\n//                        -1    - Error.\n//                        -2    - Insufficient data for estimation.\nint WebRtc_DelayEstimatorProcessFix(void* handle,\n                                    const uint16_t* near_spectrum,\n                                    int spectrum_size,\n                                    int near_q);\n\n// See WebRtc_DelayEstimatorProcessFix() for description.\nint WebRtc_DelayEstimatorProcessFloat(void* handle,\n                                      const float* near_spectrum,\n                                      int spectrum_size);\n\n// Returns the last calculated delay updated by the function\n// WebRtc_DelayEstimatorProcess(...).\n//\n// Input:\n//      - handle        : Pointer to the delay estimation instance.\n//\n// Return value:\n//      - delay         : >= 0  - Last calculated delay value.\n//                        -1    - Error.\n//                        -2    - Insufficient data for estimation.\nint WebRtc_last_delay(void* handle);\n\n// Returns the estimation quality/probability of the last calculated delay\n// updated by the function WebRtc_DelayEstimatorProcess(...). The estimation\n// quality is a value in the interval [0, 1]. The higher the value, the better\n// the quality.\n//\n// Return value:\n//      - delay_quality : >= 0  - Estimation quality of last calculated delay.\nfloat WebRtc_last_delay_quality(void* handle);\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_WRAPPER_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/ooura_fft.cc",
    "content": "/*\n * http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html\n * Copyright Takuya OOURA, 1996-2001\n *\n * You may use, copy, modify and distribute this code for any purpose (include\n * commercial use) and without fee. Please refer to this package when you modify\n * this code.\n *\n * Changes by the WebRTC authors:\n *    - Trivial type modifications.\n *    - Minimal code subset to do rdft of length 128.\n *    - Optimizations because of known length.\n *    - Removed the global variables by moving the code in to a class in order\n *      to make it thread safe.\n *\n *  All changes are covered by the WebRTC license and IP grant:\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing//utility/ooura_fft.h\"\n\n#include <math.h>\n\n#include \"webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h\"\n#include \"webrtc/system_wrappers/include/cpu_features_wrapper.h\"\n#include \"webrtc/typedefs.h\"\n\nnamespace webrtc {\n\nnamespace {\n\n#if !(defined(MIPS_FPU_LE) || defined(WEBRTC_HAS_NEON))\nstatic void cft1st_128_C(float* a) {\n  const int n = 128;\n  int j, k1, k2;\n  float wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;\n  float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n\n  // The processing of the first set of elements was simplified in C to avoid\n  // some operations (multiplication by zero or one, addition of two elements\n  // multiplied by the same weight, ...).\n  x0r = a[0] + a[2];\n  x0i = a[1] + a[3];\n  x1r = a[0] - a[2];\n  x1i = a[1] - a[3];\n  x2r = a[4] + a[6];\n  x2i = a[5] + a[7];\n  x3r = a[4] - a[6];\n  x3i = a[5] - a[7];\n  a[0] = x0r + x2r;\n  a[1] = x0i + x2i;\n  a[4] = x0r - x2r;\n  a[5] = x0i - x2i;\n  a[2] = x1r - x3i;\n  a[3] = x1i + x3r;\n  a[6] = x1r + x3i;\n  a[7] = x1i - x3r;\n  wk1r = rdft_w[2];\n  x0r = a[8] + a[10];\n  x0i = a[9] + a[11];\n  x1r = a[8] - a[10];\n  x1i = a[9] - a[11];\n  x2r = a[12] + a[14];\n  x2i = a[13] + a[15];\n  x3r = a[12] - a[14];\n  x3i = a[13] - a[15];\n  a[8] = x0r + x2r;\n  a[9] = x0i + x2i;\n  a[12] = x2i - x0i;\n  a[13] = x0r - x2r;\n  x0r = x1r - x3i;\n  x0i = x1i + x3r;\n  a[10] = wk1r * (x0r - x0i);\n  a[11] = wk1r * (x0r + x0i);\n  x0r = x3i + x1r;\n  x0i = x3r - x1i;\n  a[14] = wk1r * (x0i - x0r);\n  a[15] = wk1r * (x0i + x0r);\n  k1 = 0;\n  for (j = 16; j < n; j += 16) {\n    k1 += 2;\n    k2 = 2 * k1;\n    wk2r = rdft_w[k1 + 0];\n    wk2i = rdft_w[k1 + 1];\n    wk1r = rdft_w[k2 + 0];\n    wk1i = rdft_w[k2 + 1];\n    wk3r = rdft_wk3ri_first[k1 + 0];\n    wk3i = rdft_wk3ri_first[k1 + 1];\n    x0r = a[j + 0] + a[j + 2];\n    x0i = a[j + 1] + a[j + 3];\n    x1r = a[j + 0] - a[j + 2];\n    x1i = a[j + 1] - a[j + 3];\n    x2r = a[j + 4] + a[j + 6];\n    x2i = a[j + 5] + a[j + 7];\n    x3r = a[j + 4] - a[j + 6];\n    x3i = a[j + 5] - a[j + 7];\n    a[j + 0] = x0r + x2r;\n    a[j + 1] = x0i + x2i;\n    x0r -= x2r;\n    x0i -= x2i;\n    a[j + 4] = wk2r * x0r - wk2i * x0i;\n    a[j + 5] = wk2r * x0i + wk2i * x0r;\n    x0r = x1r - x3i;\n    x0i = x1i + x3r;\n    a[j + 2] = wk1r * x0r - wk1i * x0i;\n    a[j + 3] = wk1r * x0i + wk1i * x0r;\n    x0r = x1r + x3i;\n    x0i = x1i - x3r;\n    a[j + 6] = wk3r * x0r - wk3i * x0i;\n    a[j + 7] = wk3r * x0i + wk3i * x0r;\n    wk1r = rdft_w[k2 + 2];\n    wk1i = rdft_w[k2 + 3];\n    wk3r = rdft_wk3ri_second[k1 + 0];\n    wk3i = rdft_wk3ri_second[k1 + 1];\n    x0r = a[j + 8] + a[j + 10];\n    x0i = a[j + 9] + a[j + 11];\n    x1r = a[j + 8] - a[j + 10];\n    x1i = a[j + 9] - a[j + 11];\n    x2r = a[j + 12] + a[j + 14];\n    x2i = a[j + 13] + a[j + 15];\n    x3r = a[j + 12] - a[j + 14];\n    x3i = a[j + 13] - a[j + 15];\n    a[j + 8] = x0r + x2r;\n    a[j + 9] = x0i + x2i;\n    x0r -= x2r;\n    x0i -= x2i;\n    a[j + 12] = -wk2i * x0r - wk2r * x0i;\n    a[j + 13] = -wk2i * x0i + wk2r * x0r;\n    x0r = x1r - x3i;\n    x0i = x1i + x3r;\n    a[j + 10] = wk1r * x0r - wk1i * x0i;\n    a[j + 11] = wk1r * x0i + wk1i * x0r;\n    x0r = x1r + x3i;\n    x0i = x1i - x3r;\n    a[j + 14] = wk3r * x0r - wk3i * x0i;\n    a[j + 15] = wk3r * x0i + wk3i * x0r;\n  }\n}\n\nstatic void cftmdl_128_C(float* a) {\n  const int l = 8;\n  const int n = 128;\n  const int m = 32;\n  int j0, j1, j2, j3, k, k1, k2, m2;\n  float wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;\n  float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n\n  for (j0 = 0; j0 < l; j0 += 2) {\n    j1 = j0 + 8;\n    j2 = j0 + 16;\n    j3 = j0 + 24;\n    x0r = a[j0 + 0] + a[j1 + 0];\n    x0i = a[j0 + 1] + a[j1 + 1];\n    x1r = a[j0 + 0] - a[j1 + 0];\n    x1i = a[j0 + 1] - a[j1 + 1];\n    x2r = a[j2 + 0] + a[j3 + 0];\n    x2i = a[j2 + 1] + a[j3 + 1];\n    x3r = a[j2 + 0] - a[j3 + 0];\n    x3i = a[j2 + 1] - a[j3 + 1];\n    a[j0 + 0] = x0r + x2r;\n    a[j0 + 1] = x0i + x2i;\n    a[j2 + 0] = x0r - x2r;\n    a[j2 + 1] = x0i - x2i;\n    a[j1 + 0] = x1r - x3i;\n    a[j1 + 1] = x1i + x3r;\n    a[j3 + 0] = x1r + x3i;\n    a[j3 + 1] = x1i - x3r;\n  }\n  wk1r = rdft_w[2];\n  for (j0 = m; j0 < l + m; j0 += 2) {\n    j1 = j0 + 8;\n    j2 = j0 + 16;\n    j3 = j0 + 24;\n    x0r = a[j0 + 0] + a[j1 + 0];\n    x0i = a[j0 + 1] + a[j1 + 1];\n    x1r = a[j0 + 0] - a[j1 + 0];\n    x1i = a[j0 + 1] - a[j1 + 1];\n    x2r = a[j2 + 0] + a[j3 + 0];\n    x2i = a[j2 + 1] + a[j3 + 1];\n    x3r = a[j2 + 0] - a[j3 + 0];\n    x3i = a[j2 + 1] - a[j3 + 1];\n    a[j0 + 0] = x0r + x2r;\n    a[j0 + 1] = x0i + x2i;\n    a[j2 + 0] = x2i - x0i;\n    a[j2 + 1] = x0r - x2r;\n    x0r = x1r - x3i;\n    x0i = x1i + x3r;\n    a[j1 + 0] = wk1r * (x0r - x0i);\n    a[j1 + 1] = wk1r * (x0r + x0i);\n    x0r = x3i + x1r;\n    x0i = x3r - x1i;\n    a[j3 + 0] = wk1r * (x0i - x0r);\n    a[j3 + 1] = wk1r * (x0i + x0r);\n  }\n  k1 = 0;\n  m2 = 2 * m;\n  for (k = m2; k < n; k += m2) {\n    k1 += 2;\n    k2 = 2 * k1;\n    wk2r = rdft_w[k1 + 0];\n    wk2i = rdft_w[k1 + 1];\n    wk1r = rdft_w[k2 + 0];\n    wk1i = rdft_w[k2 + 1];\n    wk3r = rdft_wk3ri_first[k1 + 0];\n    wk3i = rdft_wk3ri_first[k1 + 1];\n    for (j0 = k; j0 < l + k; j0 += 2) {\n      j1 = j0 + 8;\n      j2 = j0 + 16;\n      j3 = j0 + 24;\n      x0r = a[j0 + 0] + a[j1 + 0];\n      x0i = a[j0 + 1] + a[j1 + 1];\n      x1r = a[j0 + 0] - a[j1 + 0];\n      x1i = a[j0 + 1] - a[j1 + 1];\n      x2r = a[j2 + 0] + a[j3 + 0];\n      x2i = a[j2 + 1] + a[j3 + 1];\n      x3r = a[j2 + 0] - a[j3 + 0];\n      x3i = a[j2 + 1] - a[j3 + 1];\n      a[j0 + 0] = x0r + x2r;\n      a[j0 + 1] = x0i + x2i;\n      x0r -= x2r;\n      x0i -= x2i;\n      a[j2 + 0] = wk2r * x0r - wk2i * x0i;\n      a[j2 + 1] = wk2r * x0i + wk2i * x0r;\n      x0r = x1r - x3i;\n      x0i = x1i + x3r;\n      a[j1 + 0] = wk1r * x0r - wk1i * x0i;\n      a[j1 + 1] = wk1r * x0i + wk1i * x0r;\n      x0r = x1r + x3i;\n      x0i = x1i - x3r;\n      a[j3 + 0] = wk3r * x0r - wk3i * x0i;\n      a[j3 + 1] = wk3r * x0i + wk3i * x0r;\n    }\n    wk1r = rdft_w[k2 + 2];\n    wk1i = rdft_w[k2 + 3];\n    wk3r = rdft_wk3ri_second[k1 + 0];\n    wk3i = rdft_wk3ri_second[k1 + 1];\n    for (j0 = k + m; j0 < l + (k + m); j0 += 2) {\n      j1 = j0 + 8;\n      j2 = j0 + 16;\n      j3 = j0 + 24;\n      x0r = a[j0 + 0] + a[j1 + 0];\n      x0i = a[j0 + 1] + a[j1 + 1];\n      x1r = a[j0 + 0] - a[j1 + 0];\n      x1i = a[j0 + 1] - a[j1 + 1];\n      x2r = a[j2 + 0] + a[j3 + 0];\n      x2i = a[j2 + 1] + a[j3 + 1];\n      x3r = a[j2 + 0] - a[j3 + 0];\n      x3i = a[j2 + 1] - a[j3 + 1];\n      a[j0 + 0] = x0r + x2r;\n      a[j0 + 1] = x0i + x2i;\n      x0r -= x2r;\n      x0i -= x2i;\n      a[j2 + 0] = -wk2i * x0r - wk2r * x0i;\n      a[j2 + 1] = -wk2i * x0i + wk2r * x0r;\n      x0r = x1r - x3i;\n      x0i = x1i + x3r;\n      a[j1 + 0] = wk1r * x0r - wk1i * x0i;\n      a[j1 + 1] = wk1r * x0i + wk1i * x0r;\n      x0r = x1r + x3i;\n      x0i = x1i - x3r;\n      a[j3 + 0] = wk3r * x0r - wk3i * x0i;\n      a[j3 + 1] = wk3r * x0i + wk3i * x0r;\n    }\n  }\n}\n\nstatic void rftfsub_128_C(float* a) {\n  const float* c = rdft_w + 32;\n  int j1, j2, k1, k2;\n  float wkr, wki, xr, xi, yr, yi;\n\n  for (j1 = 1, j2 = 2; j2 < 64; j1 += 1, j2 += 2) {\n    k2 = 128 - j2;\n    k1 = 32 - j1;\n    wkr = 0.5f - c[k1];\n    wki = c[j1];\n    xr = a[j2 + 0] - a[k2 + 0];\n    xi = a[j2 + 1] + a[k2 + 1];\n    yr = wkr * xr - wki * xi;\n    yi = wkr * xi + wki * xr;\n    a[j2 + 0] -= yr;\n    a[j2 + 1] -= yi;\n    a[k2 + 0] += yr;\n    a[k2 + 1] -= yi;\n  }\n}\n\nstatic void rftbsub_128_C(float* a) {\n  const float* c = rdft_w + 32;\n  int j1, j2, k1, k2;\n  float wkr, wki, xr, xi, yr, yi;\n\n  a[1] = -a[1];\n  for (j1 = 1, j2 = 2; j2 < 64; j1 += 1, j2 += 2) {\n    k2 = 128 - j2;\n    k1 = 32 - j1;\n    wkr = 0.5f - c[k1];\n    wki = c[j1];\n    xr = a[j2 + 0] - a[k2 + 0];\n    xi = a[j2 + 1] + a[k2 + 1];\n    yr = wkr * xr + wki * xi;\n    yi = wkr * xi - wki * xr;\n    a[j2 + 0] = a[j2 + 0] - yr;\n    a[j2 + 1] = yi - a[j2 + 1];\n    a[k2 + 0] = yr + a[k2 + 0];\n    a[k2 + 1] = yi - a[k2 + 1];\n  }\n  a[65] = -a[65];\n}\n#endif\n\n\n}  // namespace\n\nOouraFft::OouraFft() {\n#if defined(WEBRTC_ARCH_X86_FAMILY)\n  use_sse2_ = (WebRtc_GetCPUInfo(kSSE2) != 0);\n#else\n  use_sse2_ = false;\n#endif\n}\n\nOouraFft::~OouraFft() = default;\n\nvoid OouraFft::Fft(float* a) const {\n  float xi;\n  bitrv2_128(a);\n  cftfsub_128(a);\n  rftfsub_128(a);\n  xi = a[0] - a[1];\n  a[0] += a[1];\n  a[1] = xi;\n}\nvoid OouraFft::InverseFft(float* a) const {\n  a[1] = 0.5f * (a[0] - a[1]);\n  a[0] -= a[1];\n  rftbsub_128(a);\n  bitrv2_128(a);\n  cftbsub_128(a);\n}\n\nvoid OouraFft::cft1st_128(float* a) const {\n#if defined(MIPS_FPU_LE)\n  cft1st_128_mips(a);\n#elif defined(WEBRTC_HAS_NEON)\n  cft1st_128_neon(a);\n#elif defined(WEBRTC_ARCH_X86_FAMILY)\n  if (use_sse2_) {\n    cft1st_128_SSE2(a);\n  } else {\n    cft1st_128_C(a);\n  }\n#else\n  cft1st_128_C(a);\n#endif\n}\nvoid OouraFft::cftmdl_128(float* a) const {\n#if defined(MIPS_FPU_LE)\n  cftmdl_128_mips(a);\n#elif defined(WEBRTC_HAS_NEON)\n  cftmdl_128_neon(a);\n#elif defined(WEBRTC_ARCH_X86_FAMILY)\n  if (use_sse2_) {\n    cftmdl_128_SSE2(a);\n  } else {\n    cftmdl_128_C(a);\n  }\n#else\n  cftmdl_128_C(a);\n#endif\n}\nvoid OouraFft::rftfsub_128(float* a) const {\n#if defined(MIPS_FPU_LE)\n  rftfsub_128_mips(a);\n#elif defined(WEBRTC_HAS_NEON)\n  rftfsub_128_neon(a);\n#elif defined(WEBRTC_ARCH_X86_FAMILY)\n  if (use_sse2_) {\n    rftfsub_128_SSE2(a);\n  } else {\n    rftfsub_128_C(a);\n  }\n#else\n  rftfsub_128_C(a);\n#endif\n}\n\nvoid OouraFft::rftbsub_128(float* a) const {\n#if defined(MIPS_FPU_LE)\n  rftbsub_128_mips(a);\n#elif defined(WEBRTC_HAS_NEON)\n  rftbsub_128_neon(a);\n#elif defined(WEBRTC_ARCH_X86_FAMILY)\n  if (use_sse2_) {\n    rftbsub_128_SSE2(a);\n  } else {\n    rftbsub_128_C(a);\n  }\n#else\n  rftbsub_128_C(a);\n#endif\n}\n\nvoid OouraFft::cftbsub_128(float* a) const {\n  int j, j1, j2, j3, l;\n  float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n\n  cft1st_128(a);\n  cftmdl_128(a);\n  l = 32;\n\n  for (j = 0; j < l; j += 2) {\n    j1 = j + l;\n    j2 = j1 + l;\n    j3 = j2 + l;\n    x0r = a[j] + a[j1];\n    x0i = -a[j + 1] - a[j1 + 1];\n    x1r = a[j] - a[j1];\n    x1i = -a[j + 1] + a[j1 + 1];\n    x2r = a[j2] + a[j3];\n    x2i = a[j2 + 1] + a[j3 + 1];\n    x3r = a[j2] - a[j3];\n    x3i = a[j2 + 1] - a[j3 + 1];\n    a[j] = x0r + x2r;\n    a[j + 1] = x0i - x2i;\n    a[j2] = x0r - x2r;\n    a[j2 + 1] = x0i + x2i;\n    a[j1] = x1r - x3i;\n    a[j1 + 1] = x1i - x3r;\n    a[j3] = x1r + x3i;\n    a[j3 + 1] = x1i + x3r;\n  }\n}\n\nvoid OouraFft::cftfsub_128(float* a) const {\n  int j, j1, j2, j3, l;\n  float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n\n  cft1st_128(a);\n  cftmdl_128(a);\n  l = 32;\n  for (j = 0; j < l; j += 2) {\n    j1 = j + l;\n    j2 = j1 + l;\n    j3 = j2 + l;\n    x0r = a[j] + a[j1];\n    x0i = a[j + 1] + a[j1 + 1];\n    x1r = a[j] - a[j1];\n    x1i = a[j + 1] - a[j1 + 1];\n    x2r = a[j2] + a[j3];\n    x2i = a[j2 + 1] + a[j3 + 1];\n    x3r = a[j2] - a[j3];\n    x3i = a[j2 + 1] - a[j3 + 1];\n    a[j] = x0r + x2r;\n    a[j + 1] = x0i + x2i;\n    a[j2] = x0r - x2r;\n    a[j2 + 1] = x0i - x2i;\n    a[j1] = x1r - x3i;\n    a[j1 + 1] = x1i + x3r;\n    a[j3] = x1r + x3i;\n    a[j3 + 1] = x1i - x3r;\n  }\n}\n\nvoid OouraFft::bitrv2_128(float* a) const {\n  /*\n      Following things have been attempted but are no faster:\n      (a) Storing the swap indexes in a LUT (index calculations are done\n          for 'free' while waiting on memory/L1).\n      (b) Consolidate the load/store of two consecutive floats by a 64 bit\n          integer (execution is memory/L1 bound).\n      (c) Do a mix of floats and 64 bit integer to maximize register\n          utilization (execution is memory/L1 bound).\n      (d) Replacing ip[i] by ((k<<31)>>25) + ((k >> 1)<<5).\n      (e) Hard-coding of the offsets to completely eliminates index\n          calculations.\n  */\n\n  unsigned int j, j1, k, k1;\n  float xr, xi, yr, yi;\n\n  const int ip[4] = {0, 64, 32, 96};\n  for (k = 0; k < 4; k++) {\n    for (j = 0; j < k; j++) {\n      j1 = 2 * j + ip[k];\n      k1 = 2 * k + ip[j];\n      xr = a[j1 + 0];\n      xi = a[j1 + 1];\n      yr = a[k1 + 0];\n      yi = a[k1 + 1];\n      a[j1 + 0] = yr;\n      a[j1 + 1] = yi;\n      a[k1 + 0] = xr;\n      a[k1 + 1] = xi;\n      j1 += 8;\n      k1 += 16;\n      xr = a[j1 + 0];\n      xi = a[j1 + 1];\n      yr = a[k1 + 0];\n      yi = a[k1 + 1];\n      a[j1 + 0] = yr;\n      a[j1 + 1] = yi;\n      a[k1 + 0] = xr;\n      a[k1 + 1] = xi;\n      j1 += 8;\n      k1 -= 8;\n      xr = a[j1 + 0];\n      xi = a[j1 + 1];\n      yr = a[k1 + 0];\n      yi = a[k1 + 1];\n      a[j1 + 0] = yr;\n      a[j1 + 1] = yi;\n      a[k1 + 0] = xr;\n      a[k1 + 1] = xi;\n      j1 += 8;\n      k1 += 16;\n      xr = a[j1 + 0];\n      xi = a[j1 + 1];\n      yr = a[k1 + 0];\n      yi = a[k1 + 1];\n      a[j1 + 0] = yr;\n      a[j1 + 1] = yi;\n      a[k1 + 0] = xr;\n      a[k1 + 1] = xi;\n    }\n    j1 = 2 * k + 8 + ip[k];\n    k1 = j1 + 8;\n    xr = a[j1 + 0];\n    xi = a[j1 + 1];\n    yr = a[k1 + 0];\n    yi = a[k1 + 1];\n    a[j1 + 0] = yr;\n    a[j1 + 1] = yi;\n    a[k1 + 0] = xr;\n    a[k1 + 1] = xi;\n  }\n}\n\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/ooura_fft.h",
    "content": "/*\n *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_\n\n#include \"webrtc/typedefs.h\"\n\nnamespace webrtc {\n\n#if defined(WEBRTC_ARCH_X86_FAMILY)\nvoid cft1st_128_SSE2(float* a);\nvoid cftmdl_128_SSE2(float* a);\nvoid rftfsub_128_SSE2(float* a);\nvoid rftbsub_128_SSE2(float* a);\n#endif\n\n#if defined(MIPS_FPU_LE)\nvoid cft1st_128_mips(float* a);\nvoid cftmdl_128_mips(float* a);\nvoid rftfsub_128_mips(float* a);\nvoid rftbsub_128_mips(float* a);\n#endif\n\n#if defined(WEBRTC_HAS_NEON)\nvoid cft1st_128_neon(float* a);\nvoid cftmdl_128_neon(float* a);\nvoid rftfsub_128_neon(float* a);\nvoid rftbsub_128_neon(float* a);\n#endif\n\nclass OouraFft {\n public:\n  OouraFft();\n  ~OouraFft();\n  void Fft(float* a) const;\n  void InverseFft(float* a) const;\n\n private:\n  void cft1st_128(float* a) const;\n  void cftmdl_128(float* a) const;\n  void rftfsub_128(float* a) const;\n  void rftbsub_128(float* a) const;\n\n  void cftfsub_128(float* a) const;\n  void cftbsub_128(float* a) const;\n  void bitrv2_128(float* a) const;\n  bool use_sse2_;\n};\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/ooura_fft_neon.cc",
    "content": "/*\n *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n/*\n * The rdft AEC algorithm, neon version of speed-critical functions.\n *\n * Based on the sse2 version.\n */\n\n#include \"webrtc/modules/audio_processing/utility/ooura_fft.h\"\n\n#if defined(WEBRTC_HAS_NEON)\n#include <arm_neon.h>\n#endif\n\n#include \"webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h\"\n#include \"webrtc/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h\"\n\nnamespace webrtc {\n\n#if defined(WEBRTC_HAS_NEON)\nvoid cft1st_128_neon(float* a) {\n  const float32x4_t vec_swap_sign = vld1q_f32((float32_t*)k_swap_sign);\n  int j, k2;\n\n  for (k2 = 0, j = 0; j < 128; j += 16, k2 += 4) {\n    float32x4_t a00v = vld1q_f32(&a[j + 0]);\n    float32x4_t a04v = vld1q_f32(&a[j + 4]);\n    float32x4_t a08v = vld1q_f32(&a[j + 8]);\n    float32x4_t a12v = vld1q_f32(&a[j + 12]);\n    float32x4_t a01v = vcombine_f32(vget_low_f32(a00v), vget_low_f32(a08v));\n    float32x4_t a23v = vcombine_f32(vget_high_f32(a00v), vget_high_f32(a08v));\n    float32x4_t a45v = vcombine_f32(vget_low_f32(a04v), vget_low_f32(a12v));\n    float32x4_t a67v = vcombine_f32(vget_high_f32(a04v), vget_high_f32(a12v));\n    const float32x4_t wk1rv = vld1q_f32(&rdft_wk1r[k2]);\n    const float32x4_t wk1iv = vld1q_f32(&rdft_wk1i[k2]);\n    const float32x4_t wk2rv = vld1q_f32(&rdft_wk2r[k2]);\n    const float32x4_t wk2iv = vld1q_f32(&rdft_wk2i[k2]);\n    const float32x4_t wk3rv = vld1q_f32(&rdft_wk3r[k2]);\n    const float32x4_t wk3iv = vld1q_f32(&rdft_wk3i[k2]);\n    float32x4_t x0v = vaddq_f32(a01v, a23v);\n    const float32x4_t x1v = vsubq_f32(a01v, a23v);\n    const float32x4_t x2v = vaddq_f32(a45v, a67v);\n    const float32x4_t x3v = vsubq_f32(a45v, a67v);\n    const float32x4_t x3w = vrev64q_f32(x3v);\n    float32x4_t x0w;\n    a01v = vaddq_f32(x0v, x2v);\n    x0v = vsubq_f32(x0v, x2v);\n    x0w = vrev64q_f32(x0v);\n    a45v = vmulq_f32(wk2rv, x0v);\n    a45v = vmlaq_f32(a45v, wk2iv, x0w);\n    x0v = vmlaq_f32(x1v, x3w, vec_swap_sign);\n    x0w = vrev64q_f32(x0v);\n    a23v = vmulq_f32(wk1rv, x0v);\n    a23v = vmlaq_f32(a23v, wk1iv, x0w);\n    x0v = vmlsq_f32(x1v, x3w, vec_swap_sign);\n    x0w = vrev64q_f32(x0v);\n    a67v = vmulq_f32(wk3rv, x0v);\n    a67v = vmlaq_f32(a67v, wk3iv, x0w);\n    a00v = vcombine_f32(vget_low_f32(a01v), vget_low_f32(a23v));\n    a04v = vcombine_f32(vget_low_f32(a45v), vget_low_f32(a67v));\n    a08v = vcombine_f32(vget_high_f32(a01v), vget_high_f32(a23v));\n    a12v = vcombine_f32(vget_high_f32(a45v), vget_high_f32(a67v));\n    vst1q_f32(&a[j + 0], a00v);\n    vst1q_f32(&a[j + 4], a04v);\n    vst1q_f32(&a[j + 8], a08v);\n    vst1q_f32(&a[j + 12], a12v);\n  }\n}\n\nvoid cftmdl_128_neon(float* a) {\n  int j;\n  const int l = 8;\n  const float32x4_t vec_swap_sign = vld1q_f32((float32_t*)k_swap_sign);\n  float32x4_t wk1rv = vld1q_f32(cftmdl_wk1r);\n\n  for (j = 0; j < l; j += 2) {\n    const float32x2_t a_00 = vld1_f32(&a[j + 0]);\n    const float32x2_t a_08 = vld1_f32(&a[j + 8]);\n    const float32x2_t a_32 = vld1_f32(&a[j + 32]);\n    const float32x2_t a_40 = vld1_f32(&a[j + 40]);\n    const float32x4_t a_00_32 = vcombine_f32(a_00, a_32);\n    const float32x4_t a_08_40 = vcombine_f32(a_08, a_40);\n    const float32x4_t x0r0_0i0_0r1_x0i1 = vaddq_f32(a_00_32, a_08_40);\n    const float32x4_t x1r0_1i0_1r1_x1i1 = vsubq_f32(a_00_32, a_08_40);\n    const float32x2_t a_16 = vld1_f32(&a[j + 16]);\n    const float32x2_t a_24 = vld1_f32(&a[j + 24]);\n    const float32x2_t a_48 = vld1_f32(&a[j + 48]);\n    const float32x2_t a_56 = vld1_f32(&a[j + 56]);\n    const float32x4_t a_16_48 = vcombine_f32(a_16, a_48);\n    const float32x4_t a_24_56 = vcombine_f32(a_24, a_56);\n    const float32x4_t x2r0_2i0_2r1_x2i1 = vaddq_f32(a_16_48, a_24_56);\n    const float32x4_t x3r0_3i0_3r1_x3i1 = vsubq_f32(a_16_48, a_24_56);\n    const float32x4_t xx0 = vaddq_f32(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);\n    const float32x4_t xx1 = vsubq_f32(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);\n    const float32x4_t x3i0_3r0_3i1_x3r1 = vrev64q_f32(x3r0_3i0_3r1_x3i1);\n    const float32x4_t x1_x3_add =\n        vmlaq_f32(x1r0_1i0_1r1_x1i1, vec_swap_sign, x3i0_3r0_3i1_x3r1);\n    const float32x4_t x1_x3_sub =\n        vmlsq_f32(x1r0_1i0_1r1_x1i1, vec_swap_sign, x3i0_3r0_3i1_x3r1);\n    const float32x2_t yy0_a = vdup_lane_f32(vget_high_f32(x1_x3_add), 0);\n    const float32x2_t yy0_s = vdup_lane_f32(vget_high_f32(x1_x3_sub), 0);\n    const float32x4_t yy0_as = vcombine_f32(yy0_a, yy0_s);\n    const float32x2_t yy1_a = vdup_lane_f32(vget_high_f32(x1_x3_add), 1);\n    const float32x2_t yy1_s = vdup_lane_f32(vget_high_f32(x1_x3_sub), 1);\n    const float32x4_t yy1_as = vcombine_f32(yy1_a, yy1_s);\n    const float32x4_t yy0 = vmlaq_f32(yy0_as, vec_swap_sign, yy1_as);\n    const float32x4_t yy4 = vmulq_f32(wk1rv, yy0);\n    const float32x4_t xx1_rev = vrev64q_f32(xx1);\n    const float32x4_t yy4_rev = vrev64q_f32(yy4);\n\n    vst1_f32(&a[j + 0], vget_low_f32(xx0));\n    vst1_f32(&a[j + 32], vget_high_f32(xx0));\n    vst1_f32(&a[j + 16], vget_low_f32(xx1));\n    vst1_f32(&a[j + 48], vget_high_f32(xx1_rev));\n\n    a[j + 48] = -a[j + 48];\n\n    vst1_f32(&a[j + 8], vget_low_f32(x1_x3_add));\n    vst1_f32(&a[j + 24], vget_low_f32(x1_x3_sub));\n    vst1_f32(&a[j + 40], vget_low_f32(yy4));\n    vst1_f32(&a[j + 56], vget_high_f32(yy4_rev));\n  }\n\n  {\n    const int k = 64;\n    const int k1 = 2;\n    const int k2 = 2 * k1;\n    const float32x4_t wk2rv = vld1q_f32(&rdft_wk2r[k2 + 0]);\n    const float32x4_t wk2iv = vld1q_f32(&rdft_wk2i[k2 + 0]);\n    const float32x4_t wk1iv = vld1q_f32(&rdft_wk1i[k2 + 0]);\n    const float32x4_t wk3rv = vld1q_f32(&rdft_wk3r[k2 + 0]);\n    const float32x4_t wk3iv = vld1q_f32(&rdft_wk3i[k2 + 0]);\n    wk1rv = vld1q_f32(&rdft_wk1r[k2 + 0]);\n    for (j = k; j < l + k; j += 2) {\n      const float32x2_t a_00 = vld1_f32(&a[j + 0]);\n      const float32x2_t a_08 = vld1_f32(&a[j + 8]);\n      const float32x2_t a_32 = vld1_f32(&a[j + 32]);\n      const float32x2_t a_40 = vld1_f32(&a[j + 40]);\n      const float32x4_t a_00_32 = vcombine_f32(a_00, a_32);\n      const float32x4_t a_08_40 = vcombine_f32(a_08, a_40);\n      const float32x4_t x0r0_0i0_0r1_x0i1 = vaddq_f32(a_00_32, a_08_40);\n      const float32x4_t x1r0_1i0_1r1_x1i1 = vsubq_f32(a_00_32, a_08_40);\n      const float32x2_t a_16 = vld1_f32(&a[j + 16]);\n      const float32x2_t a_24 = vld1_f32(&a[j + 24]);\n      const float32x2_t a_48 = vld1_f32(&a[j + 48]);\n      const float32x2_t a_56 = vld1_f32(&a[j + 56]);\n      const float32x4_t a_16_48 = vcombine_f32(a_16, a_48);\n      const float32x4_t a_24_56 = vcombine_f32(a_24, a_56);\n      const float32x4_t x2r0_2i0_2r1_x2i1 = vaddq_f32(a_16_48, a_24_56);\n      const float32x4_t x3r0_3i0_3r1_x3i1 = vsubq_f32(a_16_48, a_24_56);\n      const float32x4_t xx = vaddq_f32(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);\n      const float32x4_t xx1 = vsubq_f32(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);\n      const float32x4_t x3i0_3r0_3i1_x3r1 = vrev64q_f32(x3r0_3i0_3r1_x3i1);\n      const float32x4_t x1_x3_add =\n          vmlaq_f32(x1r0_1i0_1r1_x1i1, vec_swap_sign, x3i0_3r0_3i1_x3r1);\n      const float32x4_t x1_x3_sub =\n          vmlsq_f32(x1r0_1i0_1r1_x1i1, vec_swap_sign, x3i0_3r0_3i1_x3r1);\n      float32x4_t xx4 = vmulq_f32(wk2rv, xx1);\n      float32x4_t xx12 = vmulq_f32(wk1rv, x1_x3_add);\n      float32x4_t xx22 = vmulq_f32(wk3rv, x1_x3_sub);\n      xx4 = vmlaq_f32(xx4, wk2iv, vrev64q_f32(xx1));\n      xx12 = vmlaq_f32(xx12, wk1iv, vrev64q_f32(x1_x3_add));\n      xx22 = vmlaq_f32(xx22, wk3iv, vrev64q_f32(x1_x3_sub));\n\n      vst1_f32(&a[j + 0], vget_low_f32(xx));\n      vst1_f32(&a[j + 32], vget_high_f32(xx));\n      vst1_f32(&a[j + 16], vget_low_f32(xx4));\n      vst1_f32(&a[j + 48], vget_high_f32(xx4));\n      vst1_f32(&a[j + 8], vget_low_f32(xx12));\n      vst1_f32(&a[j + 40], vget_high_f32(xx12));\n      vst1_f32(&a[j + 24], vget_low_f32(xx22));\n      vst1_f32(&a[j + 56], vget_high_f32(xx22));\n    }\n  }\n}\n\n__inline static float32x4_t reverse_order_f32x4(float32x4_t in) {\n  // A B C D -> C D A B\n  const float32x4_t rev = vcombine_f32(vget_high_f32(in), vget_low_f32(in));\n  // C D A B -> D C B A\n  return vrev64q_f32(rev);\n}\n\nvoid rftfsub_128_neon(float* a) {\n  const float* c = rdft_w + 32;\n  int j1, j2;\n  const float32x4_t mm_half = vdupq_n_f32(0.5f);\n\n  // Vectorized code (four at once).\n  // Note: commented number are indexes for the first iteration of the loop.\n  for (j1 = 1, j2 = 2; j2 + 7 < 64; j1 += 4, j2 += 8) {\n    // Load 'wk'.\n    const float32x4_t c_j1 = vld1q_f32(&c[j1]);          //  1,  2,  3,  4,\n    const float32x4_t c_k1 = vld1q_f32(&c[29 - j1]);     // 28, 29, 30, 31,\n    const float32x4_t wkrt = vsubq_f32(mm_half, c_k1);   // 28, 29, 30, 31,\n    const float32x4_t wkr_ = reverse_order_f32x4(wkrt);  // 31, 30, 29, 28,\n    const float32x4_t wki_ = c_j1;                       //  1,  2,  3,  4,\n    // Load and shuffle 'a'.\n    //   2,   4,   6,   8,   3,   5,   7,   9\n    float32x4x2_t a_j2_p = vld2q_f32(&a[0 + j2]);\n    // 120, 122, 124, 126, 121, 123, 125, 127,\n    const float32x4x2_t k2_0_4 = vld2q_f32(&a[122 - j2]);\n    // 126, 124, 122, 120\n    const float32x4_t a_k2_p0 = reverse_order_f32x4(k2_0_4.val[0]);\n    // 127, 125, 123, 121\n    const float32x4_t a_k2_p1 = reverse_order_f32x4(k2_0_4.val[1]);\n    // Calculate 'x'.\n    const float32x4_t xr_ = vsubq_f32(a_j2_p.val[0], a_k2_p0);\n    // 2-126, 4-124, 6-122, 8-120,\n    const float32x4_t xi_ = vaddq_f32(a_j2_p.val[1], a_k2_p1);\n    // 3-127, 5-125, 7-123, 9-121,\n    // Calculate product into 'y'.\n    //    yr = wkr * xr - wki * xi;\n    //    yi = wkr * xi + wki * xr;\n    const float32x4_t a_ = vmulq_f32(wkr_, xr_);\n    const float32x4_t b_ = vmulq_f32(wki_, xi_);\n    const float32x4_t c_ = vmulq_f32(wkr_, xi_);\n    const float32x4_t d_ = vmulq_f32(wki_, xr_);\n    const float32x4_t yr_ = vsubq_f32(a_, b_);  // 2-126, 4-124, 6-122, 8-120,\n    const float32x4_t yi_ = vaddq_f32(c_, d_);  // 3-127, 5-125, 7-123, 9-121,\n                                                // Update 'a'.\n                                                //    a[j2 + 0] -= yr;\n                                                //    a[j2 + 1] -= yi;\n                                                //    a[k2 + 0] += yr;\n                                                //    a[k2 + 1] -= yi;\n    // 126, 124, 122, 120,\n    const float32x4_t a_k2_p0n = vaddq_f32(a_k2_p0, yr_);\n    // 127, 125, 123, 121,\n    const float32x4_t a_k2_p1n = vsubq_f32(a_k2_p1, yi_);\n    // Shuffle in right order and store.\n    const float32x4_t a_k2_p0nr = vrev64q_f32(a_k2_p0n);\n    const float32x4_t a_k2_p1nr = vrev64q_f32(a_k2_p1n);\n    // 124, 125, 126, 127, 120, 121, 122, 123\n    const float32x4x2_t a_k2_n = vzipq_f32(a_k2_p0nr, a_k2_p1nr);\n    //   2,   4,   6,   8,\n    a_j2_p.val[0] = vsubq_f32(a_j2_p.val[0], yr_);\n    //   3,   5,   7,   9,\n    a_j2_p.val[1] = vsubq_f32(a_j2_p.val[1], yi_);\n    //   2,   3,   4,   5,   6,   7,   8,   9,\n    vst2q_f32(&a[0 + j2], a_j2_p);\n\n    vst1q_f32(&a[122 - j2], a_k2_n.val[1]);\n    vst1q_f32(&a[126 - j2], a_k2_n.val[0]);\n  }\n\n  // Scalar code for the remaining items.\n  for (; j2 < 64; j1 += 1, j2 += 2) {\n    const int k2 = 128 - j2;\n    const int k1 = 32 - j1;\n    const float wkr = 0.5f - c[k1];\n    const float wki = c[j1];\n    const float xr = a[j2 + 0] - a[k2 + 0];\n    const float xi = a[j2 + 1] + a[k2 + 1];\n    const float yr = wkr * xr - wki * xi;\n    const float yi = wkr * xi + wki * xr;\n    a[j2 + 0] -= yr;\n    a[j2 + 1] -= yi;\n    a[k2 + 0] += yr;\n    a[k2 + 1] -= yi;\n  }\n}\n\nvoid rftbsub_128_neon(float* a) {\n  const float* c = rdft_w + 32;\n  int j1, j2;\n  const float32x4_t mm_half = vdupq_n_f32(0.5f);\n\n  a[1] = -a[1];\n  // Vectorized code (four at once).\n  //    Note: commented number are indexes for the first iteration of the loop.\n  for (j1 = 1, j2 = 2; j2 + 7 < 64; j1 += 4, j2 += 8) {\n    // Load 'wk'.\n    const float32x4_t c_j1 = vld1q_f32(&c[j1]);          //  1,  2,  3,  4,\n    const float32x4_t c_k1 = vld1q_f32(&c[29 - j1]);     // 28, 29, 30, 31,\n    const float32x4_t wkrt = vsubq_f32(mm_half, c_k1);   // 28, 29, 30, 31,\n    const float32x4_t wkr_ = reverse_order_f32x4(wkrt);  // 31, 30, 29, 28,\n    const float32x4_t wki_ = c_j1;                       //  1,  2,  3,  4,\n    // Load and shuffle 'a'.\n    //   2,   4,   6,   8,   3,   5,   7,   9\n    float32x4x2_t a_j2_p = vld2q_f32(&a[0 + j2]);\n    // 120, 122, 124, 126, 121, 123, 125, 127,\n    const float32x4x2_t k2_0_4 = vld2q_f32(&a[122 - j2]);\n    // 126, 124, 122, 120\n    const float32x4_t a_k2_p0 = reverse_order_f32x4(k2_0_4.val[0]);\n    // 127, 125, 123, 121\n    const float32x4_t a_k2_p1 = reverse_order_f32x4(k2_0_4.val[1]);\n    // Calculate 'x'.\n    const float32x4_t xr_ = vsubq_f32(a_j2_p.val[0], a_k2_p0);\n    // 2-126, 4-124, 6-122, 8-120,\n    const float32x4_t xi_ = vaddq_f32(a_j2_p.val[1], a_k2_p1);\n    // 3-127, 5-125, 7-123, 9-121,\n    // Calculate product into 'y'.\n    //    yr = wkr * xr - wki * xi;\n    //    yi = wkr * xi + wki * xr;\n    const float32x4_t a_ = vmulq_f32(wkr_, xr_);\n    const float32x4_t b_ = vmulq_f32(wki_, xi_);\n    const float32x4_t c_ = vmulq_f32(wkr_, xi_);\n    const float32x4_t d_ = vmulq_f32(wki_, xr_);\n    const float32x4_t yr_ = vaddq_f32(a_, b_);  // 2-126, 4-124, 6-122, 8-120,\n    const float32x4_t yi_ = vsubq_f32(c_, d_);  // 3-127, 5-125, 7-123, 9-121,\n                                                // Update 'a'.\n                                                //    a[j2 + 0] -= yr;\n                                                //    a[j2 + 1] -= yi;\n                                                //    a[k2 + 0] += yr;\n                                                //    a[k2 + 1] -= yi;\n    // 126, 124, 122, 120,\n    const float32x4_t a_k2_p0n = vaddq_f32(a_k2_p0, yr_);\n    // 127, 125, 123, 121,\n    const float32x4_t a_k2_p1n = vsubq_f32(yi_, a_k2_p1);\n    // Shuffle in right order and store.\n    //   2,   3,   4,   5,   6,   7,   8,   9,\n    const float32x4_t a_k2_p0nr = vrev64q_f32(a_k2_p0n);\n    const float32x4_t a_k2_p1nr = vrev64q_f32(a_k2_p1n);\n    // 124, 125, 126, 127, 120, 121, 122, 123\n    const float32x4x2_t a_k2_n = vzipq_f32(a_k2_p0nr, a_k2_p1nr);\n    //   2,   4,   6,   8,\n    a_j2_p.val[0] = vsubq_f32(a_j2_p.val[0], yr_);\n    //   3,   5,   7,   9,\n    a_j2_p.val[1] = vsubq_f32(yi_, a_j2_p.val[1]);\n    //   2,   3,   4,   5,   6,   7,   8,   9,\n    vst2q_f32(&a[0 + j2], a_j2_p);\n\n    vst1q_f32(&a[122 - j2], a_k2_n.val[1]);\n    vst1q_f32(&a[126 - j2], a_k2_n.val[0]);\n  }\n\n  // Scalar code for the remaining items.\n  for (; j2 < 64; j1 += 1, j2 += 2) {\n    const int k2 = 128 - j2;\n    const int k1 = 32 - j1;\n    const float wkr = 0.5f - c[k1];\n    const float wki = c[j1];\n    const float xr = a[j2 + 0] - a[k2 + 0];\n    const float xi = a[j2 + 1] + a[k2 + 1];\n    const float yr = wkr * xr + wki * xi;\n    const float yi = wkr * xi - wki * xr;\n    a[j2 + 0] = a[j2 + 0] - yr;\n    a[j2 + 1] = yi - a[j2 + 1];\n    a[k2 + 0] = yr + a[k2 + 0];\n    a[k2 + 1] = yi - a[k2 + 1];\n  }\n  a[65] = -a[65];\n}\n#endif\n\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"webrtc/modules/audio_processing//utility/ooura_fft.h\"\n\n#if defined(WEBRTC_ARCH_X86_FAMILY)\n#include <emmintrin.h>\n#endif\n\n#include \"webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h\"\n#include \"webrtc/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h\"\n\nnamespace webrtc {\n\n#if defined(WEBRTC_ARCH_X86_FAMILY)\n\nnamespace {\n// These intrinsics were unavailable before VS 2008.\n// TODO(andrew): move to a common file.\n#if defined(_MSC_VER) && _MSC_VER < 1500\nstatic __inline __m128 _mm_castsi128_ps(__m128i a) {\n  return *(__m128*)&a;\n}\nstatic __inline __m128i _mm_castps_si128(__m128 a) {\n  return *(__m128i*)&a;\n}\n#endif\n\n}  // namespace\n\nvoid cft1st_128_SSE2(float* a) {\n  const __m128 mm_swap_sign = _mm_load_ps(k_swap_sign);\n  int j, k2;\n\n  for (k2 = 0, j = 0; j < 128; j += 16, k2 += 4) {\n    __m128 a00v = _mm_loadu_ps(&a[j + 0]);\n    __m128 a04v = _mm_loadu_ps(&a[j + 4]);\n    __m128 a08v = _mm_loadu_ps(&a[j + 8]);\n    __m128 a12v = _mm_loadu_ps(&a[j + 12]);\n    __m128 a01v = _mm_shuffle_ps(a00v, a08v, _MM_SHUFFLE(1, 0, 1, 0));\n    __m128 a23v = _mm_shuffle_ps(a00v, a08v, _MM_SHUFFLE(3, 2, 3, 2));\n    __m128 a45v = _mm_shuffle_ps(a04v, a12v, _MM_SHUFFLE(1, 0, 1, 0));\n    __m128 a67v = _mm_shuffle_ps(a04v, a12v, _MM_SHUFFLE(3, 2, 3, 2));\n\n    const __m128 wk1rv = _mm_load_ps(&rdft_wk1r[k2]);\n    const __m128 wk1iv = _mm_load_ps(&rdft_wk1i[k2]);\n    const __m128 wk2rv = _mm_load_ps(&rdft_wk2r[k2]);\n    const __m128 wk2iv = _mm_load_ps(&rdft_wk2i[k2]);\n    const __m128 wk3rv = _mm_load_ps(&rdft_wk3r[k2]);\n    const __m128 wk3iv = _mm_load_ps(&rdft_wk3i[k2]);\n    __m128 x0v = _mm_add_ps(a01v, a23v);\n    const __m128 x1v = _mm_sub_ps(a01v, a23v);\n    const __m128 x2v = _mm_add_ps(a45v, a67v);\n    const __m128 x3v = _mm_sub_ps(a45v, a67v);\n    __m128 x0w;\n    a01v = _mm_add_ps(x0v, x2v);\n    x0v = _mm_sub_ps(x0v, x2v);\n    x0w = _mm_shuffle_ps(x0v, x0v, _MM_SHUFFLE(2, 3, 0, 1));\n    {\n      const __m128 a45_0v = _mm_mul_ps(wk2rv, x0v);\n      const __m128 a45_1v = _mm_mul_ps(wk2iv, x0w);\n      a45v = _mm_add_ps(a45_0v, a45_1v);\n    }\n    {\n      __m128 a23_0v, a23_1v;\n      const __m128 x3w = _mm_shuffle_ps(x3v, x3v, _MM_SHUFFLE(2, 3, 0, 1));\n      const __m128 x3s = _mm_mul_ps(mm_swap_sign, x3w);\n      x0v = _mm_add_ps(x1v, x3s);\n      x0w = _mm_shuffle_ps(x0v, x0v, _MM_SHUFFLE(2, 3, 0, 1));\n      a23_0v = _mm_mul_ps(wk1rv, x0v);\n      a23_1v = _mm_mul_ps(wk1iv, x0w);\n      a23v = _mm_add_ps(a23_0v, a23_1v);\n\n      x0v = _mm_sub_ps(x1v, x3s);\n      x0w = _mm_shuffle_ps(x0v, x0v, _MM_SHUFFLE(2, 3, 0, 1));\n    }\n    {\n      const __m128 a67_0v = _mm_mul_ps(wk3rv, x0v);\n      const __m128 a67_1v = _mm_mul_ps(wk3iv, x0w);\n      a67v = _mm_add_ps(a67_0v, a67_1v);\n    }\n\n    a00v = _mm_shuffle_ps(a01v, a23v, _MM_SHUFFLE(1, 0, 1, 0));\n    a04v = _mm_shuffle_ps(a45v, a67v, _MM_SHUFFLE(1, 0, 1, 0));\n    a08v = _mm_shuffle_ps(a01v, a23v, _MM_SHUFFLE(3, 2, 3, 2));\n    a12v = _mm_shuffle_ps(a45v, a67v, _MM_SHUFFLE(3, 2, 3, 2));\n    _mm_storeu_ps(&a[j + 0], a00v);\n    _mm_storeu_ps(&a[j + 4], a04v);\n    _mm_storeu_ps(&a[j + 8], a08v);\n    _mm_storeu_ps(&a[j + 12], a12v);\n  }\n}\n\nvoid cftmdl_128_SSE2(float* a) {\n  const int l = 8;\n  const __m128 mm_swap_sign = _mm_load_ps(k_swap_sign);\n  int j0;\n\n  __m128 wk1rv = _mm_load_ps(cftmdl_wk1r);\n  for (j0 = 0; j0 < l; j0 += 2) {\n    const __m128i a_00 = _mm_loadl_epi64((__m128i*)&a[j0 + 0]);\n    const __m128i a_08 = _mm_loadl_epi64((__m128i*)&a[j0 + 8]);\n    const __m128i a_32 = _mm_loadl_epi64((__m128i*)&a[j0 + 32]);\n    const __m128i a_40 = _mm_loadl_epi64((__m128i*)&a[j0 + 40]);\n    const __m128 a_00_32 =\n        _mm_shuffle_ps(_mm_castsi128_ps(a_00), _mm_castsi128_ps(a_32),\n                       _MM_SHUFFLE(1, 0, 1, 0));\n    const __m128 a_08_40 =\n        _mm_shuffle_ps(_mm_castsi128_ps(a_08), _mm_castsi128_ps(a_40),\n                       _MM_SHUFFLE(1, 0, 1, 0));\n    __m128 x0r0_0i0_0r1_x0i1 = _mm_add_ps(a_00_32, a_08_40);\n    const __m128 x1r0_1i0_1r1_x1i1 = _mm_sub_ps(a_00_32, a_08_40);\n\n    const __m128i a_16 = _mm_loadl_epi64((__m128i*)&a[j0 + 16]);\n    const __m128i a_24 = _mm_loadl_epi64((__m128i*)&a[j0 + 24]);\n    const __m128i a_48 = _mm_loadl_epi64((__m128i*)&a[j0 + 48]);\n    const __m128i a_56 = _mm_loadl_epi64((__m128i*)&a[j0 + 56]);\n    const __m128 a_16_48 =\n        _mm_shuffle_ps(_mm_castsi128_ps(a_16), _mm_castsi128_ps(a_48),\n                       _MM_SHUFFLE(1, 0, 1, 0));\n    const __m128 a_24_56 =\n        _mm_shuffle_ps(_mm_castsi128_ps(a_24), _mm_castsi128_ps(a_56),\n                       _MM_SHUFFLE(1, 0, 1, 0));\n    const __m128 x2r0_2i0_2r1_x2i1 = _mm_add_ps(a_16_48, a_24_56);\n    const __m128 x3r0_3i0_3r1_x3i1 = _mm_sub_ps(a_16_48, a_24_56);\n\n    const __m128 xx0 = _mm_add_ps(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);\n    const __m128 xx1 = _mm_sub_ps(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);\n\n    const __m128 x3i0_3r0_3i1_x3r1 = _mm_castsi128_ps(_mm_shuffle_epi32(\n        _mm_castps_si128(x3r0_3i0_3r1_x3i1), _MM_SHUFFLE(2, 3, 0, 1)));\n    const __m128 x3_swapped = _mm_mul_ps(mm_swap_sign, x3i0_3r0_3i1_x3r1);\n    const __m128 x1_x3_add = _mm_add_ps(x1r0_1i0_1r1_x1i1, x3_swapped);\n    const __m128 x1_x3_sub = _mm_sub_ps(x1r0_1i0_1r1_x1i1, x3_swapped);\n\n    const __m128 yy0 =\n        _mm_shuffle_ps(x1_x3_add, x1_x3_sub, _MM_SHUFFLE(2, 2, 2, 2));\n    const __m128 yy1 =\n        _mm_shuffle_ps(x1_x3_add, x1_x3_sub, _MM_SHUFFLE(3, 3, 3, 3));\n    const __m128 yy2 = _mm_mul_ps(mm_swap_sign, yy1);\n    const __m128 yy3 = _mm_add_ps(yy0, yy2);\n    const __m128 yy4 = _mm_mul_ps(wk1rv, yy3);\n\n    _mm_storel_epi64((__m128i*)&a[j0 + 0], _mm_castps_si128(xx0));\n    _mm_storel_epi64(\n        (__m128i*)&a[j0 + 32],\n        _mm_shuffle_epi32(_mm_castps_si128(xx0), _MM_SHUFFLE(3, 2, 3, 2)));\n\n    _mm_storel_epi64((__m128i*)&a[j0 + 16], _mm_castps_si128(xx1));\n    _mm_storel_epi64(\n        (__m128i*)&a[j0 + 48],\n        _mm_shuffle_epi32(_mm_castps_si128(xx1), _MM_SHUFFLE(2, 3, 2, 3)));\n    a[j0 + 48] = -a[j0 + 48];\n\n    _mm_storel_epi64((__m128i*)&a[j0 + 8], _mm_castps_si128(x1_x3_add));\n    _mm_storel_epi64((__m128i*)&a[j0 + 24], _mm_castps_si128(x1_x3_sub));\n\n    _mm_storel_epi64((__m128i*)&a[j0 + 40], _mm_castps_si128(yy4));\n    _mm_storel_epi64(\n        (__m128i*)&a[j0 + 56],\n        _mm_shuffle_epi32(_mm_castps_si128(yy4), _MM_SHUFFLE(2, 3, 2, 3)));\n  }\n\n  {\n    int k = 64;\n    int k1 = 2;\n    int k2 = 2 * k1;\n    const __m128 wk2rv = _mm_load_ps(&rdft_wk2r[k2 + 0]);\n    const __m128 wk2iv = _mm_load_ps(&rdft_wk2i[k2 + 0]);\n    const __m128 wk1iv = _mm_load_ps(&rdft_wk1i[k2 + 0]);\n    const __m128 wk3rv = _mm_load_ps(&rdft_wk3r[k2 + 0]);\n    const __m128 wk3iv = _mm_load_ps(&rdft_wk3i[k2 + 0]);\n    wk1rv = _mm_load_ps(&rdft_wk1r[k2 + 0]);\n    for (j0 = k; j0 < l + k; j0 += 2) {\n      const __m128i a_00 = _mm_loadl_epi64((__m128i*)&a[j0 + 0]);\n      const __m128i a_08 = _mm_loadl_epi64((__m128i*)&a[j0 + 8]);\n      const __m128i a_32 = _mm_loadl_epi64((__m128i*)&a[j0 + 32]);\n      const __m128i a_40 = _mm_loadl_epi64((__m128i*)&a[j0 + 40]);\n      const __m128 a_00_32 =\n          _mm_shuffle_ps(_mm_castsi128_ps(a_00), _mm_castsi128_ps(a_32),\n                         _MM_SHUFFLE(1, 0, 1, 0));\n      const __m128 a_08_40 =\n          _mm_shuffle_ps(_mm_castsi128_ps(a_08), _mm_castsi128_ps(a_40),\n                         _MM_SHUFFLE(1, 0, 1, 0));\n      __m128 x0r0_0i0_0r1_x0i1 = _mm_add_ps(a_00_32, a_08_40);\n      const __m128 x1r0_1i0_1r1_x1i1 = _mm_sub_ps(a_00_32, a_08_40);\n\n      const __m128i a_16 = _mm_loadl_epi64((__m128i*)&a[j0 + 16]);\n      const __m128i a_24 = _mm_loadl_epi64((__m128i*)&a[j0 + 24]);\n      const __m128i a_48 = _mm_loadl_epi64((__m128i*)&a[j0 + 48]);\n      const __m128i a_56 = _mm_loadl_epi64((__m128i*)&a[j0 + 56]);\n      const __m128 a_16_48 =\n          _mm_shuffle_ps(_mm_castsi128_ps(a_16), _mm_castsi128_ps(a_48),\n                         _MM_SHUFFLE(1, 0, 1, 0));\n      const __m128 a_24_56 =\n          _mm_shuffle_ps(_mm_castsi128_ps(a_24), _mm_castsi128_ps(a_56),\n                         _MM_SHUFFLE(1, 0, 1, 0));\n      const __m128 x2r0_2i0_2r1_x2i1 = _mm_add_ps(a_16_48, a_24_56);\n      const __m128 x3r0_3i0_3r1_x3i1 = _mm_sub_ps(a_16_48, a_24_56);\n\n      const __m128 xx = _mm_add_ps(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);\n      const __m128 xx1 = _mm_sub_ps(x0r0_0i0_0r1_x0i1, x2r0_2i0_2r1_x2i1);\n      const __m128 xx2 = _mm_mul_ps(xx1, wk2rv);\n      const __m128 xx3 = _mm_mul_ps(\n          wk2iv, _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(xx1),\n                                                    _MM_SHUFFLE(2, 3, 0, 1))));\n      const __m128 xx4 = _mm_add_ps(xx2, xx3);\n\n      const __m128 x3i0_3r0_3i1_x3r1 = _mm_castsi128_ps(_mm_shuffle_epi32(\n          _mm_castps_si128(x3r0_3i0_3r1_x3i1), _MM_SHUFFLE(2, 3, 0, 1)));\n      const __m128 x3_swapped = _mm_mul_ps(mm_swap_sign, x3i0_3r0_3i1_x3r1);\n      const __m128 x1_x3_add = _mm_add_ps(x1r0_1i0_1r1_x1i1, x3_swapped);\n      const __m128 x1_x3_sub = _mm_sub_ps(x1r0_1i0_1r1_x1i1, x3_swapped);\n\n      const __m128 xx10 = _mm_mul_ps(x1_x3_add, wk1rv);\n      const __m128 xx11 = _mm_mul_ps(\n          wk1iv, _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(x1_x3_add),\n                                                    _MM_SHUFFLE(2, 3, 0, 1))));\n      const __m128 xx12 = _mm_add_ps(xx10, xx11);\n\n      const __m128 xx20 = _mm_mul_ps(x1_x3_sub, wk3rv);\n      const __m128 xx21 = _mm_mul_ps(\n          wk3iv, _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(x1_x3_sub),\n                                                    _MM_SHUFFLE(2, 3, 0, 1))));\n      const __m128 xx22 = _mm_add_ps(xx20, xx21);\n\n      _mm_storel_epi64((__m128i*)&a[j0 + 0], _mm_castps_si128(xx));\n      _mm_storel_epi64(\n          (__m128i*)&a[j0 + 32],\n          _mm_shuffle_epi32(_mm_castps_si128(xx), _MM_SHUFFLE(3, 2, 3, 2)));\n\n      _mm_storel_epi64((__m128i*)&a[j0 + 16], _mm_castps_si128(xx4));\n      _mm_storel_epi64(\n          (__m128i*)&a[j0 + 48],\n          _mm_shuffle_epi32(_mm_castps_si128(xx4), _MM_SHUFFLE(3, 2, 3, 2)));\n\n      _mm_storel_epi64((__m128i*)&a[j0 + 8], _mm_castps_si128(xx12));\n      _mm_storel_epi64(\n          (__m128i*)&a[j0 + 40],\n          _mm_shuffle_epi32(_mm_castps_si128(xx12), _MM_SHUFFLE(3, 2, 3, 2)));\n\n      _mm_storel_epi64((__m128i*)&a[j0 + 24], _mm_castps_si128(xx22));\n      _mm_storel_epi64(\n          (__m128i*)&a[j0 + 56],\n          _mm_shuffle_epi32(_mm_castps_si128(xx22), _MM_SHUFFLE(3, 2, 3, 2)));\n    }\n  }\n}\n\nvoid rftfsub_128_SSE2(float* a) {\n  const float* c = rdft_w + 32;\n  int j1, j2, k1, k2;\n  float wkr, wki, xr, xi, yr, yi;\n\n  static const ALIGN16_BEG float ALIGN16_END k_half[4] = {0.5f, 0.5f, 0.5f,\n                                                          0.5f};\n  const __m128 mm_half = _mm_load_ps(k_half);\n\n  // Vectorized code (four at once).\n  //    Note: commented number are indexes for the first iteration of the loop.\n  for (j1 = 1, j2 = 2; j2 + 7 < 64; j1 += 4, j2 += 8) {\n    // Load 'wk'.\n    const __m128 c_j1 = _mm_loadu_ps(&c[j1]);       //  1,  2,  3,  4,\n    const __m128 c_k1 = _mm_loadu_ps(&c[29 - j1]);  // 28, 29, 30, 31,\n    const __m128 wkrt = _mm_sub_ps(mm_half, c_k1);  // 28, 29, 30, 31,\n    const __m128 wkr_ =\n        _mm_shuffle_ps(wkrt, wkrt, _MM_SHUFFLE(0, 1, 2, 3));  // 31, 30, 29, 28,\n    const __m128 wki_ = c_j1;                                 //  1,  2,  3,  4,\n    // Load and shuffle 'a'.\n    const __m128 a_j2_0 = _mm_loadu_ps(&a[0 + j2]);    //   2,   3,   4,   5,\n    const __m128 a_j2_4 = _mm_loadu_ps(&a[4 + j2]);    //   6,   7,   8,   9,\n    const __m128 a_k2_0 = _mm_loadu_ps(&a[122 - j2]);  // 120, 121, 122, 123,\n    const __m128 a_k2_4 = _mm_loadu_ps(&a[126 - j2]);  // 124, 125, 126, 127,\n    const __m128 a_j2_p0 = _mm_shuffle_ps(\n        a_j2_0, a_j2_4, _MM_SHUFFLE(2, 0, 2, 0));  //   2,   4,   6,   8,\n    const __m128 a_j2_p1 = _mm_shuffle_ps(\n        a_j2_0, a_j2_4, _MM_SHUFFLE(3, 1, 3, 1));  //   3,   5,   7,   9,\n    const __m128 a_k2_p0 = _mm_shuffle_ps(\n        a_k2_4, a_k2_0, _MM_SHUFFLE(0, 2, 0, 2));  // 126, 124, 122, 120,\n    const __m128 a_k2_p1 = _mm_shuffle_ps(\n        a_k2_4, a_k2_0, _MM_SHUFFLE(1, 3, 1, 3));  // 127, 125, 123, 121,\n    // Calculate 'x'.\n    const __m128 xr_ = _mm_sub_ps(a_j2_p0, a_k2_p0);\n    // 2-126, 4-124, 6-122, 8-120,\n    const __m128 xi_ = _mm_add_ps(a_j2_p1, a_k2_p1);\n    // 3-127, 5-125, 7-123, 9-121,\n    // Calculate product into 'y'.\n    //    yr = wkr * xr - wki * xi;\n    //    yi = wkr * xi + wki * xr;\n    const __m128 a_ = _mm_mul_ps(wkr_, xr_);\n    const __m128 b_ = _mm_mul_ps(wki_, xi_);\n    const __m128 c_ = _mm_mul_ps(wkr_, xi_);\n    const __m128 d_ = _mm_mul_ps(wki_, xr_);\n    const __m128 yr_ = _mm_sub_ps(a_, b_);  // 2-126, 4-124, 6-122, 8-120,\n    const __m128 yi_ = _mm_add_ps(c_, d_);  // 3-127, 5-125, 7-123, 9-121,\n                                            // Update 'a'.\n                                            //    a[j2 + 0] -= yr;\n                                            //    a[j2 + 1] -= yi;\n                                            //    a[k2 + 0] += yr;\n    //    a[k2 + 1] -= yi;\n    const __m128 a_j2_p0n = _mm_sub_ps(a_j2_p0, yr_);  //   2,   4,   6,   8,\n    const __m128 a_j2_p1n = _mm_sub_ps(a_j2_p1, yi_);  //   3,   5,   7,   9,\n    const __m128 a_k2_p0n = _mm_add_ps(a_k2_p0, yr_);  // 126, 124, 122, 120,\n    const __m128 a_k2_p1n = _mm_sub_ps(a_k2_p1, yi_);  // 127, 125, 123, 121,\n    // Shuffle in right order and store.\n    const __m128 a_j2_0n = _mm_unpacklo_ps(a_j2_p0n, a_j2_p1n);\n    //   2,   3,   4,   5,\n    const __m128 a_j2_4n = _mm_unpackhi_ps(a_j2_p0n, a_j2_p1n);\n    //   6,   7,   8,   9,\n    const __m128 a_k2_0nt = _mm_unpackhi_ps(a_k2_p0n, a_k2_p1n);\n    // 122, 123, 120, 121,\n    const __m128 a_k2_4nt = _mm_unpacklo_ps(a_k2_p0n, a_k2_p1n);\n    // 126, 127, 124, 125,\n    const __m128 a_k2_0n = _mm_shuffle_ps(\n        a_k2_0nt, a_k2_0nt, _MM_SHUFFLE(1, 0, 3, 2));  // 120, 121, 122, 123,\n    const __m128 a_k2_4n = _mm_shuffle_ps(\n        a_k2_4nt, a_k2_4nt, _MM_SHUFFLE(1, 0, 3, 2));  // 124, 125, 126, 127,\n    _mm_storeu_ps(&a[0 + j2], a_j2_0n);\n    _mm_storeu_ps(&a[4 + j2], a_j2_4n);\n    _mm_storeu_ps(&a[122 - j2], a_k2_0n);\n    _mm_storeu_ps(&a[126 - j2], a_k2_4n);\n  }\n  // Scalar code for the remaining items.\n  for (; j2 < 64; j1 += 1, j2 += 2) {\n    k2 = 128 - j2;\n    k1 = 32 - j1;\n    wkr = 0.5f - c[k1];\n    wki = c[j1];\n    xr = a[j2 + 0] - a[k2 + 0];\n    xi = a[j2 + 1] + a[k2 + 1];\n    yr = wkr * xr - wki * xi;\n    yi = wkr * xi + wki * xr;\n    a[j2 + 0] -= yr;\n    a[j2 + 1] -= yi;\n    a[k2 + 0] += yr;\n    a[k2 + 1] -= yi;\n  }\n}\n\nvoid rftbsub_128_SSE2(float* a) {\n  const float* c = rdft_w + 32;\n  int j1, j2, k1, k2;\n  float wkr, wki, xr, xi, yr, yi;\n\n  static const ALIGN16_BEG float ALIGN16_END k_half[4] = {0.5f, 0.5f, 0.5f,\n                                                          0.5f};\n  const __m128 mm_half = _mm_load_ps(k_half);\n\n  a[1] = -a[1];\n  // Vectorized code (four at once).\n  //    Note: commented number are indexes for the first iteration of the loop.\n  for (j1 = 1, j2 = 2; j2 + 7 < 64; j1 += 4, j2 += 8) {\n    // Load 'wk'.\n    const __m128 c_j1 = _mm_loadu_ps(&c[j1]);       //  1,  2,  3,  4,\n    const __m128 c_k1 = _mm_loadu_ps(&c[29 - j1]);  // 28, 29, 30, 31,\n    const __m128 wkrt = _mm_sub_ps(mm_half, c_k1);  // 28, 29, 30, 31,\n    const __m128 wkr_ =\n        _mm_shuffle_ps(wkrt, wkrt, _MM_SHUFFLE(0, 1, 2, 3));  // 31, 30, 29, 28,\n    const __m128 wki_ = c_j1;                                 //  1,  2,  3,  4,\n    // Load and shuffle 'a'.\n    const __m128 a_j2_0 = _mm_loadu_ps(&a[0 + j2]);    //   2,   3,   4,   5,\n    const __m128 a_j2_4 = _mm_loadu_ps(&a[4 + j2]);    //   6,   7,   8,   9,\n    const __m128 a_k2_0 = _mm_loadu_ps(&a[122 - j2]);  // 120, 121, 122, 123,\n    const __m128 a_k2_4 = _mm_loadu_ps(&a[126 - j2]);  // 124, 125, 126, 127,\n    const __m128 a_j2_p0 = _mm_shuffle_ps(\n        a_j2_0, a_j2_4, _MM_SHUFFLE(2, 0, 2, 0));  //   2,   4,   6,   8,\n    const __m128 a_j2_p1 = _mm_shuffle_ps(\n        a_j2_0, a_j2_4, _MM_SHUFFLE(3, 1, 3, 1));  //   3,   5,   7,   9,\n    const __m128 a_k2_p0 = _mm_shuffle_ps(\n        a_k2_4, a_k2_0, _MM_SHUFFLE(0, 2, 0, 2));  // 126, 124, 122, 120,\n    const __m128 a_k2_p1 = _mm_shuffle_ps(\n        a_k2_4, a_k2_0, _MM_SHUFFLE(1, 3, 1, 3));  // 127, 125, 123, 121,\n    // Calculate 'x'.\n    const __m128 xr_ = _mm_sub_ps(a_j2_p0, a_k2_p0);\n    // 2-126, 4-124, 6-122, 8-120,\n    const __m128 xi_ = _mm_add_ps(a_j2_p1, a_k2_p1);\n    // 3-127, 5-125, 7-123, 9-121,\n    // Calculate product into 'y'.\n    //    yr = wkr * xr + wki * xi;\n    //    yi = wkr * xi - wki * xr;\n    const __m128 a_ = _mm_mul_ps(wkr_, xr_);\n    const __m128 b_ = _mm_mul_ps(wki_, xi_);\n    const __m128 c_ = _mm_mul_ps(wkr_, xi_);\n    const __m128 d_ = _mm_mul_ps(wki_, xr_);\n    const __m128 yr_ = _mm_add_ps(a_, b_);  // 2-126, 4-124, 6-122, 8-120,\n    const __m128 yi_ = _mm_sub_ps(c_, d_);  // 3-127, 5-125, 7-123, 9-121,\n                                            // Update 'a'.\n                                            //    a[j2 + 0] = a[j2 + 0] - yr;\n                                            //    a[j2 + 1] = yi - a[j2 + 1];\n                                            //    a[k2 + 0] = yr + a[k2 + 0];\n    //    a[k2 + 1] = yi - a[k2 + 1];\n    const __m128 a_j2_p0n = _mm_sub_ps(a_j2_p0, yr_);  //   2,   4,   6,   8,\n    const __m128 a_j2_p1n = _mm_sub_ps(yi_, a_j2_p1);  //   3,   5,   7,   9,\n    const __m128 a_k2_p0n = _mm_add_ps(a_k2_p0, yr_);  // 126, 124, 122, 120,\n    const __m128 a_k2_p1n = _mm_sub_ps(yi_, a_k2_p1);  // 127, 125, 123, 121,\n    // Shuffle in right order and store.\n    const __m128 a_j2_0n = _mm_unpacklo_ps(a_j2_p0n, a_j2_p1n);\n    //   2,   3,   4,   5,\n    const __m128 a_j2_4n = _mm_unpackhi_ps(a_j2_p0n, a_j2_p1n);\n    //   6,   7,   8,   9,\n    const __m128 a_k2_0nt = _mm_unpackhi_ps(a_k2_p0n, a_k2_p1n);\n    // 122, 123, 120, 121,\n    const __m128 a_k2_4nt = _mm_unpacklo_ps(a_k2_p0n, a_k2_p1n);\n    // 126, 127, 124, 125,\n    const __m128 a_k2_0n = _mm_shuffle_ps(\n        a_k2_0nt, a_k2_0nt, _MM_SHUFFLE(1, 0, 3, 2));  // 120, 121, 122, 123,\n    const __m128 a_k2_4n = _mm_shuffle_ps(\n        a_k2_4nt, a_k2_4nt, _MM_SHUFFLE(1, 0, 3, 2));  // 124, 125, 126, 127,\n    _mm_storeu_ps(&a[0 + j2], a_j2_0n);\n    _mm_storeu_ps(&a[4 + j2], a_j2_4n);\n    _mm_storeu_ps(&a[122 - j2], a_k2_0n);\n    _mm_storeu_ps(&a[126 - j2], a_k2_4n);\n  }\n  // Scalar code for the remaining items.\n  for (; j2 < 64; j1 += 1, j2 += 2) {\n    k2 = 128 - j2;\n    k1 = 32 - j1;\n    wkr = 0.5f - c[k1];\n    wki = c[j1];\n    xr = a[j2 + 0] - a[k2 + 0];\n    xi = a[j2 + 1] + a[k2 + 1];\n    yr = wkr * xr + wki * xi;\n    yi = wkr * xi - wki * xr;\n    a[j2 + 0] = a[j2 + 0] - yr;\n    a[j2 + 1] = yi - a[j2 + 1];\n    a[k2 + 0] = yr + a[k2 + 0];\n    a[k2 + 1] = yi - a[k2 + 1];\n  }\n  a[65] = -a[65];\n}\n#endif\n\n}  // namespace webrtc\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/ooura_fft_tables_common.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_COMMON_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_COMMON_H_\n\n#include \"webrtc/modules/audio_processing/utility/ooura_fft.h\"\n\nnamespace webrtc {\n\n// This tables used to be computed at run-time. For example, refer to:\n// https://code.google.com/p/webrtc/source/browse/trunk/webrtc/modules/audio_processing/utility/apm_rdft.c?r=6564\n// to see the initialization code.\n// Constants shared by all paths (C, SSE2, NEON).\nconst float rdft_w[64] = {\n    1.0000000000f, 0.0000000000f, 0.7071067691f, 0.7071067691f, 0.9238795638f,\n    0.3826834559f, 0.3826834559f, 0.9238795638f, 0.9807852507f, 0.1950903237f,\n    0.5555702448f, 0.8314695954f, 0.8314695954f, 0.5555702448f, 0.1950903237f,\n    0.9807852507f, 0.9951847196f, 0.0980171412f, 0.6343933344f, 0.7730104327f,\n    0.8819212914f, 0.4713967443f, 0.2902846634f, 0.9569403529f, 0.9569403529f,\n    0.2902846634f, 0.4713967443f, 0.8819212914f, 0.7730104327f, 0.6343933344f,\n    0.0980171412f, 0.9951847196f, 0.7071067691f, 0.4993977249f, 0.4975923598f,\n    0.4945882559f, 0.4903926253f, 0.4850156307f, 0.4784701765f, 0.4707720280f,\n    0.4619397819f, 0.4519946277f, 0.4409606457f, 0.4288643003f, 0.4157347977f,\n    0.4016037583f, 0.3865052164f, 0.3704755902f, 0.3535533845f, 0.3357794881f,\n    0.3171966672f, 0.2978496552f, 0.2777851224f, 0.2570513785f, 0.2356983721f,\n    0.2137775421f, 0.1913417280f, 0.1684449315f, 0.1451423317f, 0.1214900985f,\n    0.0975451618f, 0.0733652338f, 0.0490085706f, 0.0245338380f,\n};\n\n// Constants used by the C and MIPS paths.\nconst float rdft_wk3ri_first[16] = {\n    1.000000000f, 0.000000000f, 0.382683456f,  0.923879564f,\n    0.831469536f, 0.555570245f, -0.195090353f, 0.980785251f,\n    0.956940353f, 0.290284693f, 0.098017156f,  0.995184720f,\n    0.634393334f, 0.773010492f, -0.471396863f, 0.881921172f,\n};\nconst float rdft_wk3ri_second[16] = {\n    -0.707106769f, 0.707106769f,  -0.923879564f, -0.382683456f,\n    -0.980785251f, 0.195090353f,  -0.555570245f, -0.831469536f,\n    -0.881921172f, 0.471396863f,  -0.773010492f, -0.634393334f,\n    -0.995184720f, -0.098017156f, -0.290284693f, -0.956940353f,\n};\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_COMMON_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_NEON_SSE2_H_\n#define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_NEON_SSE2_H_\n\n#include \"webrtc/modules/audio_processing/utility/ooura_fft.h\"\n\n#ifdef _MSC_VER /* visual c++ */\n#define ALIGN16_BEG __declspec(align(16))\n#define ALIGN16_END\n#else /* gcc or icc */\n#define ALIGN16_BEG\n#define ALIGN16_END __attribute__((aligned(16)))\n#endif\n\nnamespace webrtc {\n\n// These tables used to be computed at run-time. For example, refer to:\n// https://code.google.com/p/webrtc/source/browse/trunk/webrtc/modules/audio_processing/utility/apm_rdft.c?r=6564\n// to see the initialization code.\n#if defined(WEBRTC_ARCH_X86_FAMILY) || defined(WEBRTC_HAS_NEON)\n// Constants used by SSE2 and NEON but initialized in the C path.\nconst ALIGN16_BEG float ALIGN16_END k_swap_sign[4] = {-1.f, 1.f, -1.f, 1.f};\n\nALIGN16_BEG const float ALIGN16_END rdft_wk1r[32] = {\n    1.000000000f, 1.000000000f, 0.707106769f, 0.707106769f, 0.923879564f,\n    0.923879564f, 0.382683456f, 0.382683456f, 0.980785251f, 0.980785251f,\n    0.555570245f, 0.555570245f, 0.831469595f, 0.831469595f, 0.195090324f,\n    0.195090324f, 0.995184720f, 0.995184720f, 0.634393334f, 0.634393334f,\n    0.881921291f, 0.881921291f, 0.290284663f, 0.290284663f, 0.956940353f,\n    0.956940353f, 0.471396744f, 0.471396744f, 0.773010433f, 0.773010433f,\n    0.098017141f, 0.098017141f,\n};\nALIGN16_BEG const float ALIGN16_END rdft_wk2r[32] = {\n    1.000000000f,  1.000000000f,  -0.000000000f, -0.000000000f, 0.707106769f,\n    0.707106769f,  -0.707106769f, -0.707106769f, 0.923879564f,  0.923879564f,\n    -0.382683456f, -0.382683456f, 0.382683456f,  0.382683456f,  -0.923879564f,\n    -0.923879564f, 0.980785251f,  0.980785251f,  -0.195090324f, -0.195090324f,\n    0.555570245f,  0.555570245f,  -0.831469595f, -0.831469595f, 0.831469595f,\n    0.831469595f,  -0.555570245f, -0.555570245f, 0.195090324f,  0.195090324f,\n    -0.980785251f, -0.980785251f,\n};\nALIGN16_BEG const float ALIGN16_END rdft_wk3r[32] = {\n    1.000000000f,  1.000000000f,  -0.707106769f, -0.707106769f, 0.382683456f,\n    0.382683456f,  -0.923879564f, -0.923879564f, 0.831469536f,  0.831469536f,\n    -0.980785251f, -0.980785251f, -0.195090353f, -0.195090353f, -0.555570245f,\n    -0.555570245f, 0.956940353f,  0.956940353f,  -0.881921172f, -0.881921172f,\n    0.098017156f,  0.098017156f,  -0.773010492f, -0.773010492f, 0.634393334f,\n    0.634393334f,  -0.995184720f, -0.995184720f, -0.471396863f, -0.471396863f,\n    -0.290284693f, -0.290284693f,\n};\nALIGN16_BEG const float ALIGN16_END rdft_wk1i[32] = {\n    -0.000000000f, 0.000000000f,  -0.707106769f, 0.707106769f,  -0.382683456f,\n    0.382683456f,  -0.923879564f, 0.923879564f,  -0.195090324f, 0.195090324f,\n    -0.831469595f, 0.831469595f,  -0.555570245f, 0.555570245f,  -0.980785251f,\n    0.980785251f,  -0.098017141f, 0.098017141f,  -0.773010433f, 0.773010433f,\n    -0.471396744f, 0.471396744f,  -0.956940353f, 0.956940353f,  -0.290284663f,\n    0.290284663f,  -0.881921291f, 0.881921291f,  -0.634393334f, 0.634393334f,\n    -0.995184720f, 0.995184720f,\n};\nALIGN16_BEG const float ALIGN16_END rdft_wk2i[32] = {\n    -0.000000000f, 0.000000000f,  -1.000000000f, 1.000000000f,  -0.707106769f,\n    0.707106769f,  -0.707106769f, 0.707106769f,  -0.382683456f, 0.382683456f,\n    -0.923879564f, 0.923879564f,  -0.923879564f, 0.923879564f,  -0.382683456f,\n    0.382683456f,  -0.195090324f, 0.195090324f,  -0.980785251f, 0.980785251f,\n    -0.831469595f, 0.831469595f,  -0.555570245f, 0.555570245f,  -0.555570245f,\n    0.555570245f,  -0.831469595f, 0.831469595f,  -0.980785251f, 0.980785251f,\n    -0.195090324f, 0.195090324f,\n};\nALIGN16_BEG const float ALIGN16_END rdft_wk3i[32] = {\n    -0.000000000f, 0.000000000f,  -0.707106769f, 0.707106769f,  -0.923879564f,\n    0.923879564f,  0.382683456f,  -0.382683456f, -0.555570245f, 0.555570245f,\n    -0.195090353f, 0.195090353f,  -0.980785251f, 0.980785251f,  0.831469536f,\n    -0.831469536f, -0.290284693f, 0.290284693f,  -0.471396863f, 0.471396863f,\n    -0.995184720f, 0.995184720f,  0.634393334f,  -0.634393334f, -0.773010492f,\n    0.773010492f,  0.098017156f,  -0.098017156f, -0.881921172f, 0.881921172f,\n    0.956940353f,  -0.956940353f,\n};\nALIGN16_BEG const float ALIGN16_END cftmdl_wk1r[4] = {\n    0.707106769f, 0.707106769f, 0.707106769f, -0.707106769f,\n};\n#endif\n\n}  // namespace webrtc\n\n#endif  // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_NEON_SSE2_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/system_wrappers/include/asm_defines.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_ASM_DEFINES_H_\n#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_ASM_DEFINES_H_\n\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,\"\",%progbits\n#endif\n\n// Define the macros used in ARM assembly code, so that for Mac or iOS builds\n// we add leading underscores for the function names.\n#ifdef __APPLE__\n.macro GLOBAL_FUNCTION name\n.global _\\name\n.private_extern _\\name\n.endm\n.macro DEFINE_FUNCTION name\n_\\name:\n.endm\n.macro CALL_FUNCTION name\nbl _\\name\n.endm\n.macro GLOBAL_LABEL name\n.global _\\name\n.private_extern _\\name\n.endm\n#else\n.macro GLOBAL_FUNCTION name\n.global \\name\n.hidden \\name\n.endm\n.macro DEFINE_FUNCTION name\n#if defined(__linux__) && defined(__ELF__)\n.type \\name,%function\n#endif\n\\name:\n.endm\n.macro CALL_FUNCTION name\nbl \\name\n.endm\n.macro GLOBAL_LABEL name\n.global \\name\n.hidden \\name\n.endm\n#endif\n\n// With Apple's clang compiler, for instructions ldrb, strh, etc.,\n// the condition code is after the width specifier. Here we define\n// only the ones that are actually used in the assembly files.\n#if (defined __llvm__) && (defined __APPLE__)\n.macro streqh reg1, reg2, num\nstrheq \\reg1, \\reg2, \\num\n.endm\n#endif\n\n.text\n\n#endif  // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_ASM_DEFINES_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/system_wrappers/include/compile_assert_c.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_COMPILE_ASSERT_H_\n#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_COMPILE_ASSERT_H_\n\n// Use this macro to verify at compile time that certain restrictions are met.\n// The argument is the boolean expression to evaluate.\n// Example:\n//   COMPILE_ASSERT(sizeof(foo) < 128);\n// Note: In C++, use static_assert instead!\n#define COMPILE_ASSERT(expression) switch (0) {case 0: case expression:;}\n\n#endif  // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_COMPILE_ASSERT_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/system_wrappers/include/cpu_features_wrapper.h",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CPU_FEATURES_WRAPPER_H_\n#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CPU_FEATURES_WRAPPER_H_\n\n#if defined(__cplusplus) || defined(c_plusplus)\nextern \"C\" {\n#endif\n\n#include \"webrtc/typedefs.h\"\n\n// List of features in x86.\ntypedef enum {\n  kSSE2,\n  kSSE3\n} CPUFeature;\n\n// List of features in ARM.\nenum {\n  kCPUFeatureARMv7       = (1 << 0),\n  kCPUFeatureVFPv3       = (1 << 1),\n  kCPUFeatureNEON        = (1 << 2),\n  kCPUFeatureLDREXSTREX  = (1 << 3)\n};\n\ntypedef int (*WebRtc_CPUInfo)(CPUFeature feature);\n\n// Returns true if the CPU supports the feature.\nextern WebRtc_CPUInfo WebRtc_GetCPUInfo;\n\n// No CPU feature is available => straight C path.\nextern WebRtc_CPUInfo WebRtc_GetCPUInfoNoASM;\n\n// Return the features in an ARM device.\n// It detects the features in the hardware platform, and returns supported\n// values in the above enum definition as a bitmask.\nextern uint64_t WebRtc_GetCPUFeaturesARM(void);\n\n#if defined(__cplusplus) || defined(c_plusplus)\n}  // extern \"C\"\n#endif\n\n#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CPU_FEATURES_WRAPPER_H_\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/system_wrappers/include/metrics.h",
    "content": "//\n// Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n//\n// Use of this source code is governed by a BSD-style license\n// that can be found in the LICENSE file in the root of the source\n// tree. An additional intellectual property rights grant can be found\n// in the file PATENTS.  All contributing project authors may\n// be found in the AUTHORS file in the root of the source tree.\n//\n\n#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_\n#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_\n\n#include <string>\n\n#include \"webrtc/base/atomicops.h\"\n#include \"webrtc/base/checks.h\"\n#include \"webrtc/common_types.h\"\n#include \"webrtc/system_wrappers/include/logging.h\"\n\n// Macros for allowing WebRTC clients (e.g. Chrome) to gather and aggregate\n// statistics.\n//\n// Histogram for counters.\n// RTC_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count);\n//\n// Histogram for enumerators.\n// The boundary should be above the max enumerator sample.\n// RTC_HISTOGRAM_ENUMERATION(name, sample, boundary);\n//\n//\n// The macros use the methods HistogramFactoryGetCounts,\n// HistogramFactoryGetEnumeration and HistogramAdd.\n//\n// Therefore, WebRTC clients must either:\n//\n// - provide implementations of\n//   Histogram* webrtc::metrics::HistogramFactoryGetCounts(\n//       const std::string& name, int sample, int min, int max,\n//       int bucket_count);\n//   Histogram* webrtc::metrics::HistogramFactoryGetEnumeration(\n//       const std::string& name, int sample, int boundary);\n//   void webrtc::metrics::HistogramAdd(\n//       Histogram* histogram_pointer, const std::string& name, int sample);\n//\n// - or link with the default implementations (i.e.\n//   system_wrappers/system_wrappers.gyp:metrics_default).\n//\n//\n// Example usage:\n//\n// RTC_HISTOGRAM_COUNTS(\"WebRTC.Video.NacksSent\", nacks_sent, 1, 100000, 100);\n//\n// enum Types {\n//   kTypeX,\n//   kTypeY,\n//   kBoundary,\n// };\n//\n// RTC_HISTOGRAM_ENUMERATION(\"WebRTC.Types\", kTypeX, kBoundary);\n//\n// NOTE: It is recommended to do the Chromium review for modifications to\n// histograms.xml before new metrics are committed to WebRTC.\n\n\n// Macros for adding samples to a named histogram.\n\n// Histogram for counters (exponentially spaced buckets).\n#define RTC_HISTOGRAM_COUNTS_100(name, sample) \\\n  RTC_HISTOGRAM_COUNTS(name, sample, 1, 100, 50)\n\n#define RTC_HISTOGRAM_COUNTS_200(name, sample) \\\n  RTC_HISTOGRAM_COUNTS(name, sample, 1, 200, 50)\n\n#define RTC_HISTOGRAM_COUNTS_500(name, sample) \\\n  RTC_HISTOGRAM_COUNTS(name, sample, 1, 500, 50)\n\n#define RTC_HISTOGRAM_COUNTS_1000(name, sample) \\\n  RTC_HISTOGRAM_COUNTS(name, sample, 1, 1000, 50)\n\n#define RTC_HISTOGRAM_COUNTS_10000(name, sample) \\\n  RTC_HISTOGRAM_COUNTS(name, sample, 1, 10000, 50)\n\n#define RTC_HISTOGRAM_COUNTS_100000(name, sample) \\\n  RTC_HISTOGRAM_COUNTS(name, sample, 1, 100000, 50)\n\n#define RTC_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count) \\\n  RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \\\n      webrtc::metrics::HistogramFactoryGetCounts(name, min, max, bucket_count))\n\n#define RTC_HISTOGRAM_COUNTS_LINEAR(name, sample, min, max, bucket_count)      \\\n  RTC_HISTOGRAM_COMMON_BLOCK(name, sample,                                     \\\n                             webrtc::metrics::HistogramFactoryGetCountsLinear( \\\n                                 name, min, max, bucket_count))\n\n// Deprecated.\n// TODO(asapersson): Remove.\n#define RTC_HISTOGRAM_COUNTS_SPARSE_100(name, sample) \\\n  RTC_HISTOGRAM_COUNTS_SPARSE(name, sample, 1, 100, 50)\n\n#define RTC_HISTOGRAM_COUNTS_SPARSE(name, sample, min, max, bucket_count) \\\n  RTC_HISTOGRAM_COMMON_BLOCK_SLOW(name, sample, \\\n      webrtc::metrics::HistogramFactoryGetCounts(name, min, max, bucket_count))\n\n// Histogram for percentage (evenly spaced buckets).\n#define RTC_HISTOGRAM_PERCENTAGE(name, sample) \\\n  RTC_HISTOGRAM_ENUMERATION(name, sample, 101)\n\n// Histogram for booleans.\n#define RTC_HISTOGRAM_BOOLEAN(name, sample) \\\n  RTC_HISTOGRAM_ENUMERATION(name, sample, 2)\n\n// Histogram for enumerators (evenly spaced buckets).\n// |boundary| should be above the max enumerator sample.\n#define RTC_HISTOGRAM_ENUMERATION(name, sample, boundary) \\\n  RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \\\n      webrtc::metrics::HistogramFactoryGetEnumeration(name, boundary))\n\n// The name of the histogram should not vary.\n// TODO(asapersson): Consider changing string to const char*.\n#define RTC_HISTOGRAM_COMMON_BLOCK(constant_name, sample,                  \\\n                                   factory_get_invocation)                 \\\n  do {                                                                     \\\n    static webrtc::metrics::Histogram* atomic_histogram_pointer = nullptr; \\\n    webrtc::metrics::Histogram* histogram_pointer =                        \\\n        rtc::AtomicOps::AcquireLoadPtr(&atomic_histogram_pointer);         \\\n    if (!histogram_pointer) {                                              \\\n      histogram_pointer = factory_get_invocation;                          \\\n      webrtc::metrics::Histogram* prev_pointer =                           \\\n          rtc::AtomicOps::CompareAndSwapPtr(                               \\\n              &atomic_histogram_pointer,                                   \\\n              static_cast<webrtc::metrics::Histogram*>(nullptr),           \\\n              histogram_pointer);                                          \\\n      RTC_DCHECK(prev_pointer == nullptr ||                                \\\n                 prev_pointer == histogram_pointer);                       \\\n    }                                                                      \\\n    if (histogram_pointer) {                                               \\\n      RTC_DCHECK_EQ(constant_name,                                         \\\n                    webrtc::metrics::GetHistogramName(histogram_pointer))  \\\n          << \"The name should not vary.\";                                  \\\n      webrtc::metrics::HistogramAdd(histogram_pointer, sample);            \\\n    }                                                                      \\\n  } while (0)\n\n// Deprecated.\n// The histogram is constructed/found for each call.\n// May be used for histograms with infrequent updates.`\n#define RTC_HISTOGRAM_COMMON_BLOCK_SLOW(name, sample, factory_get_invocation) \\\n  do {                                                                        \\\n    webrtc::metrics::Histogram* histogram_pointer = factory_get_invocation;   \\\n    if (histogram_pointer) {                                                  \\\n      webrtc::metrics::HistogramAdd(histogram_pointer, sample);               \\\n    }                                                                         \\\n  } while (0)\n\n// Helper macros.\n// Macros for calling a histogram with varying name (e.g. when using a metric\n// in different modes such as real-time vs screenshare).\n#define RTC_HISTOGRAMS_COUNTS_100(index, name, sample) \\\n  RTC_HISTOGRAMS_COMMON(index, name, sample, \\\n      RTC_HISTOGRAM_COUNTS(name, sample, 1, 100, 50))\n\n#define RTC_HISTOGRAMS_COUNTS_200(index, name, sample) \\\n  RTC_HISTOGRAMS_COMMON(index, name, sample, \\\n      RTC_HISTOGRAM_COUNTS(name, sample, 1, 200, 50))\n\n#define RTC_HISTOGRAMS_COUNTS_500(index, name, sample) \\\n  RTC_HISTOGRAMS_COMMON(index, name, sample, \\\n      RTC_HISTOGRAM_COUNTS(name, sample, 1, 500, 50))\n\n#define RTC_HISTOGRAMS_COUNTS_1000(index, name, sample) \\\n  RTC_HISTOGRAMS_COMMON(index, name, sample, \\\n      RTC_HISTOGRAM_COUNTS(name, sample, 1, 1000, 50))\n\n#define RTC_HISTOGRAMS_COUNTS_10000(index, name, sample) \\\n  RTC_HISTOGRAMS_COMMON(index, name, sample, \\\n      RTC_HISTOGRAM_COUNTS(name, sample, 1, 10000, 50))\n\n#define RTC_HISTOGRAMS_COUNTS_100000(index, name, sample) \\\n  RTC_HISTOGRAMS_COMMON(index, name, sample, \\\n      RTC_HISTOGRAM_COUNTS(name, sample, 1, 100000, 50))\n\n#define RTC_HISTOGRAMS_ENUMERATION(index, name, sample, boundary) \\\n  RTC_HISTOGRAMS_COMMON(index, name, sample, \\\n      RTC_HISTOGRAM_ENUMERATION(name, sample, boundary))\n\n#define RTC_HISTOGRAMS_PERCENTAGE(index, name, sample) \\\n  RTC_HISTOGRAMS_COMMON(index, name, sample, \\\n      RTC_HISTOGRAM_PERCENTAGE(name, sample))\n\n#define RTC_HISTOGRAMS_COMMON(index, name, sample, macro_invocation) \\\n  do { \\\n    switch (index) { \\\n      case 0: \\\n        macro_invocation; \\\n        break; \\\n      case 1: \\\n        macro_invocation; \\\n        break; \\\n      case 2: \\\n        macro_invocation; \\\n        break; \\\n      default: \\\n        RTC_NOTREACHED(); \\\n    } \\\n  } while (0)\n\n\nnamespace webrtc {\nnamespace metrics {\n\n// Time that should have elapsed for stats that are gathered once per call.\nenum { kMinRunTimeInSeconds = 10 };\n\nclass Histogram;\n\n// Functions for getting pointer to histogram (constructs or finds the named\n// histogram).\n\n// Get histogram for counters.\nHistogram* HistogramFactoryGetCounts(\n    const std::string& name, int min, int max, int bucket_count);\n\n// Get histogram for counters with linear bucket spacing.\nHistogram* HistogramFactoryGetCountsLinear(const std::string& name,\n                                           int min,\n                                           int max,\n                                           int bucket_count);\n\n// Get histogram for enumerators.\n// |boundary| should be above the max enumerator sample.\nHistogram* HistogramFactoryGetEnumeration(\n    const std::string& name, int boundary);\n\n// Returns name of the histogram.\nconst std::string& GetHistogramName(Histogram* histogram_pointer);\n\n// Function for adding a |sample| to a histogram.\nvoid HistogramAdd(Histogram* histogram_pointer, int sample);\n\n}  // namespace metrics\n}  // namespace webrtc\n\n#endif  // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_\n\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/system_wrappers/source/cpu_features.cc",
    "content": "/*\n *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// Parts of this file derived from Chromium's base/cpu.cc.\n\n#include \"webrtc/system_wrappers/include/cpu_features_wrapper.h\"\n\n#if defined(WEBRTC_ARCH_X86_FAMILY) && defined(_MSC_VER)\n#include <intrin.h>\n#endif\n\n#include \"webrtc/typedefs.h\"\n\n// No CPU feature is available => straight C path.\nint GetCPUInfoNoASM(CPUFeature feature) {\n  (void)feature;\n  return 0;\n}\n\n#if defined(WEBRTC_ARCH_X86_FAMILY)\n#ifndef _MSC_VER\n// Intrinsic for \"cpuid\".\n#if defined(__pic__) && defined(__i386__)\nstatic inline void __cpuid(int cpu_info[4], int info_type) {\n  __asm__ volatile(\n    \"mov %%ebx, %%edi\\n\"\n    \"cpuid\\n\"\n    \"xchg %%edi, %%ebx\\n\"\n    : \"=a\"(cpu_info[0]), \"=D\"(cpu_info[1]), \"=c\"(cpu_info[2]), \"=d\"(cpu_info[3])\n    : \"a\"(info_type));\n}\n#else\nstatic inline void __cpuid(int cpu_info[4], int info_type) {\n  __asm__ volatile(\n    \"cpuid\\n\"\n    : \"=a\"(cpu_info[0]), \"=b\"(cpu_info[1]), \"=c\"(cpu_info[2]), \"=d\"(cpu_info[3])\n    : \"a\"(info_type));\n}\n#endif\n#endif  // _MSC_VER\n#endif  // WEBRTC_ARCH_X86_FAMILY\n\n#if defined(WEBRTC_ARCH_X86_FAMILY)\n// Actual feature detection for x86.\nstatic int GetCPUInfo(CPUFeature feature) {\n  int cpu_info[4];\n  __cpuid(cpu_info, 1);\n  if (feature == kSSE2) {\n    return 0 != (cpu_info[3] & 0x04000000);\n  }\n  if (feature == kSSE3) {\n    return 0 != (cpu_info[2] & 0x00000001);\n  }\n  return 0;\n}\n#else\n// Default to straight C for other platforms.\nstatic int GetCPUInfo(CPUFeature feature) {\n  (void)feature;\n  return 0;\n}\n#endif\n\nWebRtc_CPUInfo WebRtc_GetCPUInfo = GetCPUInfo;\nWebRtc_CPUInfo WebRtc_GetCPUInfoNoASM = GetCPUInfoNoASM;\n"
  },
  {
    "path": "libtgvoip-public/webrtc_dsp/webrtc/typedefs.h",
    "content": "/*\n *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a BSD-style license\n *  that can be found in the LICENSE file in the root of the source\n *  tree. An additional intellectual property rights grant can be found\n *  in the file PATENTS.  All contributing project authors may\n *  be found in the AUTHORS file in the root of the source tree.\n */\n\n// This file contains platform-specific typedefs and defines.\n// Much of it is derived from Chromium's build/build_config.h.\n\n#ifndef WEBRTC_TYPEDEFS_H_\n#define WEBRTC_TYPEDEFS_H_\n\n// Processor architecture detection.  For more info on what's defined, see:\n//   http://msdn.microsoft.com/en-us/library/b0084kay.aspx\n//   http://www.agner.org/optimize/calling_conventions.pdf\n//   or with gcc, run: \"echo | gcc -E -dM -\"\n#if defined(_M_X64) || defined(__x86_64__)\n#define WEBRTC_ARCH_X86_FAMILY\n#define WEBRTC_ARCH_X86_64\n#define WEBRTC_ARCH_64_BITS\n#define WEBRTC_ARCH_LITTLE_ENDIAN\n#elif defined(__aarch64__)\n#define WEBRTC_ARCH_ARM_FAMILY\n#define WEBRTC_ARCH_64_BITS\n#define WEBRTC_ARCH_LITTLE_ENDIAN\n#elif defined(_M_IX86) || defined(__i386__)\n#define WEBRTC_ARCH_X86_FAMILY\n#define WEBRTC_ARCH_X86\n#define WEBRTC_ARCH_32_BITS\n#define WEBRTC_ARCH_LITTLE_ENDIAN\n#elif defined(__ARMEL__) || defined(_M_ARM)\n#define WEBRTC_ARCH_ARM_FAMILY\n#define WEBRTC_ARCH_32_BITS\n#define WEBRTC_ARCH_LITTLE_ENDIAN\n#elif defined(__MIPSEL__)\n#define WEBRTC_ARCH_MIPS_FAMILY\n#if defined(__LP64__)\n#define WEBRTC_ARCH_64_BITS\n#else\n#define WEBRTC_ARCH_32_BITS\n#endif\n#define WEBRTC_ARCH_LITTLE_ENDIAN\n#elif defined(__pnacl__)\n#define WEBRTC_ARCH_32_BITS\n#define WEBRTC_ARCH_LITTLE_ENDIAN\n#else\n#error Please add support for your architecture in typedefs.h\n#endif\n\n#if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN))\n#error Define either WEBRTC_ARCH_LITTLE_ENDIAN or WEBRTC_ARCH_BIG_ENDIAN\n#endif\n\n// TODO(zhongwei.yao): WEBRTC_CPU_DETECTION is only used in one place; we should\n// probably just remove it.\n#if (defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__))\n#define WEBRTC_CPU_DETECTION\n#endif\n\n// TODO(pbos): Use webrtc/base/basictypes.h instead to include fixed-size ints.\n#include <stdint.h>\n\n#if defined(_MSC_VER) && _MSC_VER<=1800 && !defined(__cplusplus)\n#define inline __inline\n#endif\n\n// Annotate a function indicating the caller must examine the return value.\n// Use like:\n//   int foo() WARN_UNUSED_RESULT;\n// To explicitly ignore a result, see |ignore_result()| in <base/macros.h>.\n// TODO(ajm): Hack to avoid multiple definitions until the base/ of webrtc and\n// libjingle are merged.\n#if !defined(WARN_UNUSED_RESULT)\n#if defined(__GNUC__) || defined(__clang__)\n#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))\n#else\n#define WARN_UNUSED_RESULT\n#endif\n#endif  // WARN_UNUSED_RESULT\n\n// Put after a variable that might not be used, to prevent compiler warnings:\n//   int result ATTRIBUTE_UNUSED = DoSomething();\n//   assert(result == 17);\n#ifndef ATTRIBUTE_UNUSED\n#if defined(__GNUC__) || defined(__clang__)\n#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))\n#else\n#define ATTRIBUTE_UNUSED\n#endif\n#endif\n\n// Macro to be used for switch-case fallthrough (required for enabling\n// -Wimplicit-fallthrough warning on Clang).\n#ifndef FALLTHROUGH\n#if defined(__clang__)\n#define FALLTHROUGH() [[clang::fallthrough]]\n#else\n#define FALLTHROUGH() do { } while (0)\n#endif\n#endif\n\n// Annotate a function that will not return control flow to the caller.\n#if defined(_MSC_VER)\n#define NO_RETURN __declspec(noreturn)\n#elif defined(__GNUC__)\n#define NO_RETURN __attribute__ ((__noreturn__))\n#else\n#define NO_RETURN\n#endif\n\n#endif  // WEBRTC_TYPEDEFS_H_\n"
  },
  {
    "path": "libtgvoipProxyStub/dlldata.c",
    "content": "/*********************************************************\r\n   DllData file -- generated by MIDL compiler \r\n\r\n        DO NOT ALTER THIS FILE\r\n\r\n   This file is regenerated by MIDL on every IDL file compile.\r\n\r\n   To completely reconstruct this file, delete it and rerun MIDL\r\n   on all the IDL files in this DLL, specifying this file for the\r\n   /dlldata command line option\r\n\r\n*********************************************************/\r\n\r\n#define PROXY_DELEGATION\r\n\r\n#include <rpcproxy.h>\r\n\r\n#ifdef __cplusplus\r\nextern \"C\"   {\r\n#endif\r\n\r\nEXTERN_PROXY_FILE( libtgvoip )\r\n\r\n\r\nPROXYFILE_LIST_START\r\n/* Start of list */\r\n  REFERENCE_PROXY_FILE( libtgvoip ),\r\n/* End of list */\r\nPROXYFILE_LIST_END\r\n\r\n\r\nDLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )\r\n\r\n#ifdef __cplusplus\r\n}  /*extern \"C\" */\r\n#endif\r\n\r\n/* end of generated dlldata file */\r\n"
  },
  {
    "path": "libtgvoipProxyStub/libtgvoip.h",
    "content": "\r\n\r\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r\n\r\n\r\n /* File created by MIDL compiler version 8.00.0603 */\r\n/* at Mon Jun 19 00:49:35 2017\r\n */\r\n/* Compiler settings for C:\\Users\\evgeny\\AppData\\Local\\Temp\\libtgvoip.idl-c4a72767:\r\n    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=ARM 8.00.0603 \r\n    protocol : dce , ms_ext, c_ext, robust\r\n    error checks: allocation ref bounds_check enum stub_data \r\n    VC __declspec() decoration level: \r\n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r\n         DECLSPEC_UUID(), MIDL_INTERFACE()\r\n*/\r\n/* @@MIDL_FILE_HEADING(  ) */\r\n\r\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\r\n\r\n\r\n/* verify that the <rpcndr.h> version is high enough to compile this file*/\r\n#ifndef __REQUIRED_RPCNDR_H_VERSION__\r\n#define __REQUIRED_RPCNDR_H_VERSION__ 475\r\n#endif\r\n\r\n#include \"rpc.h\"\r\n#include \"rpcndr.h\"\r\n\r\n#ifndef __RPCNDR_H_VERSION__\r\n#error this stub requires an updated version of <rpcndr.h>\r\n#endif // __RPCNDR_H_VERSION__\r\n\r\n#ifndef COM_NO_WINDOWS_H\r\n#include \"windows.h\"\r\n#include \"ole2.h\"\r\n#endif /*COM_NO_WINDOWS_H*/\r\n\r\n#ifndef __libtgvoip_h__\r\n#define __libtgvoip_h__\r\n\r\n#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r\n#pragma once\r\n#endif\r\n\r\n/* Forward Declarations */ \r\n\r\n#ifndef ____x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_FWD_DEFINED__\r\n#define ____x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_FWD_DEFINED__\r\ntypedef interface __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        interface __IEndpointPublicNonVirtuals;\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_Clibtgvoip_CIStateCallback_FWD_DEFINED__\r\n#define ____x_ABI_Clibtgvoip_CIStateCallback_FWD_DEFINED__\r\ntypedef interface __x_ABI_Clibtgvoip_CIStateCallback __x_ABI_Clibtgvoip_CIStateCallback;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        interface IStateCallback;\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_Clibtgvoip_CIStateCallback_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_FWD_DEFINED__\r\n#define ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_FWD_DEFINED__\r\ntypedef interface __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        interface __IVoIPControllerWrapperPublicNonVirtuals;\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_FWD_DEFINED__ */\r\n\r\n\r\n#ifndef ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_FWD_DEFINED__\r\n#define ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_FWD_DEFINED__\r\ntypedef interface __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics;\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        interface __IVoIPControllerWrapperStatics;\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\n#endif /* __cplusplus */\r\n\r\n#endif \t/* ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_FWD_DEFINED__ */\r\n\r\n\r\n/* header files for imported files */\r\n#include \"inspectable.h\"\r\n#include \"AsyncInfo.h\"\r\n#include \"EventToken.h\"\r\n#include \"Windows.Foundation.h\"\r\n\r\n#ifdef __cplusplus\r\nextern \"C\"{\r\n#endif \r\n\r\n\r\n/* interface __MIDL_itf_libtgvoip_0000_0000 */\r\n/* [local] */ \r\n\r\n#if defined(__cplusplus)\r\n}\r\n#endif // defined(__cplusplus)\r\n#include <Windows.Foundation.h>\r\n#if defined(__cplusplus)\r\nextern \"C\" {\r\n#endif // defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_Clibtgvoip_CCallState __x_ABI_Clibtgvoip_CCallState;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_Clibtgvoip_CError __x_ABI_Clibtgvoip_CError;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_Clibtgvoip_CNetworkType __x_ABI_Clibtgvoip_CNetworkType;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n#if !defined(__cplusplus)\r\n\r\ntypedef enum __x_ABI_Clibtgvoip_CDataSavingMode __x_ABI_Clibtgvoip_CDataSavingMode;\r\n\r\n\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n\r\n#endif\r\n\r\n\r\n\r\n\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\nnamespace libtgvoip {\r\nclass Endpoint;\r\n} /*libtgvoip*/\r\n}\r\n#endif\r\n#ifdef __cplusplus\r\nnamespace ABI {\r\nnamespace libtgvoip {\r\nclass VoIPControllerWrapper;\r\n} /*libtgvoip*/\r\n}\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_Clibtgvoip_CCallState\r\n    {\r\n        CallState_WaitInit\t= 1,\r\n        CallState_WaitInitAck\t= 2,\r\n        CallState_Established\t= 3,\r\n        CallState_Failed\t= 4\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_Clibtgvoip_CError\r\n    {\r\n        Error_Unknown\t= 0,\r\n        Error_Incompatible\t= 1,\r\n        Error_Timeout\t= 2,\r\n        Error_AudioIO\t= 3\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_Clibtgvoip_CNetworkType\r\n    {\r\n        NetworkType_Unknown\t= 0,\r\n        NetworkType_GPRS\t= 1,\r\n        NetworkType_EDGE\t= 2,\r\n        NetworkType_UMTS\t= 3,\r\n        NetworkType_HSPA\t= 4,\r\n        NetworkType_LTE\t= 5,\r\n        NetworkType_WiFi\t= 6,\r\n        NetworkType_Ethernet\t= 7,\r\n        NetworkType_OtherHighSpeed\t= 8,\r\n        NetworkType_OtherLowSpeed\t= 9,\r\n        NetworkType_Dialup\t= 10,\r\n        NetworkType_OtherMobile\t= 11\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(__cplusplus)\r\n\r\n#if !defined(__cplusplus)\r\n/* [v1_enum] */ \r\nenum __x_ABI_Clibtgvoip_CDataSavingMode\r\n    {\r\n        DataSavingMode_Never\t= 0,\r\n        DataSavingMode_MobileOnly\t= 1,\r\n        DataSavingMode_Always\t= 2\r\n    } ;\r\n#endif /* end if !defined(__cplusplus) */\r\n\r\n#endif\r\n#if !defined(____x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_libtgvoip___IEndpointPublicNonVirtuals[] = L\"libtgvoip.__IEndpointPublicNonVirtuals\";\r\n#endif /* !defined(____x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_libtgvoip_0000_0000 */\r\n/* [local] */ \r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        \r\n        typedef enum CallState CallState;\r\n        \r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        \r\n        typedef enum Error Error;\r\n        \r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        \r\n        typedef enum NetworkType NetworkType;\r\n        \r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        \r\n        typedef enum DataSavingMode DataSavingMode;\r\n        \r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n\r\n\r\n\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        \r\n        /* [v1_enum] */ \r\n        enum CallState\r\n            {\r\n                CallState_WaitInit\t= 1,\r\n                CallState_WaitInitAck\t= 2,\r\n                CallState_Established\t= 3,\r\n                CallState_Failed\t= 4\r\n            } ;\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        \r\n        /* [v1_enum] */ \r\n        enum Error\r\n            {\r\n                Error_Unknown\t= 0,\r\n                Error_Incompatible\t= 1,\r\n                Error_Timeout\t= 2,\r\n                Error_AudioIO\t= 3\r\n            } ;\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        \r\n        /* [v1_enum] */ \r\n        enum NetworkType\r\n            {\r\n                NetworkType_Unknown\t= 0,\r\n                NetworkType_GPRS\t= 1,\r\n                NetworkType_EDGE\t= 2,\r\n                NetworkType_UMTS\t= 3,\r\n                NetworkType_HSPA\t= 4,\r\n                NetworkType_LTE\t= 5,\r\n                NetworkType_WiFi\t= 6,\r\n                NetworkType_Ethernet\t= 7,\r\n                NetworkType_OtherHighSpeed\t= 8,\r\n                NetworkType_OtherLowSpeed\t= 9,\r\n                NetworkType_Dialup\t= 10,\r\n                NetworkType_OtherMobile\t= 11\r\n            } ;\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n#ifdef __cplusplus\r\n} /* end extern \"C\" */\r\nnamespace ABI {\r\n    namespace libtgvoip {\r\n        \r\n        /* [v1_enum] */ \r\n        enum DataSavingMode\r\n            {\r\n                DataSavingMode_Never\t= 0,\r\n                DataSavingMode_MobileOnly\t= 1,\r\n                DataSavingMode_Always\t= 2\r\n            } ;\r\n    } /* end namespace */\r\n} /* end namespace */\r\n\r\nextern \"C\" { \r\n#endif\r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_libtgvoip_0000_0000_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_libtgvoip_0000_0000_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_INTERFACE_DEFINED__\r\n#define ____x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::libtgvoip::__IEndpointPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace libtgvoip {\r\n            \r\n            MIDL_INTERFACE(\"95221757-DCCC-3C3B-A5AF-514FC208EAF2\")\r\n            __IEndpointPublicNonVirtuals : public IInspectable\r\n            {\r\n            public:\r\n                virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_id( \r\n                    /* [out][retval] */ INT64 *__returnValue) = 0;\r\n                \r\n                virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_id( \r\n                    /* [in] */ INT64 __set_formal) = 0;\r\n                \r\n                virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_port( \r\n                    /* [out][retval] */ UINT16 *__returnValue) = 0;\r\n                \r\n                virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_port( \r\n                    /* [in] */ UINT16 __set_formal) = 0;\r\n                \r\n                virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ipv4( \r\n                    /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                \r\n                virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ipv4( \r\n                    /* [in] */ HSTRING __set_formal) = 0;\r\n                \r\n                virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ipv6( \r\n                    /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                \r\n                virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ipv6( \r\n                    /* [in] */ HSTRING __set_formal) = 0;\r\n                \r\n                virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_peerTag( \r\n                    /* [out] */ UINT32 *____returnValueSize,\r\n                    /* [out][retval][size_is][size_is] */ BYTE **__returnValue) = 0;\r\n                \r\n                virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_peerTag( \r\n                    /* [in] */ UINT32 ____set_formalSize,\r\n                    /* [in][size_is] */ BYTE *__set_formal) = 0;\r\n                \r\n            };\r\n\r\n            extern const __declspec(selectany) IID & IID___IEndpointPublicNonVirtuals = __uuidof(__IEndpointPublicNonVirtuals);\r\n\r\n            \r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtualsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_id )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out][retval] */ INT64 *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_id )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ INT64 __set_formal);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_port )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out][retval] */ UINT16 *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_port )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ UINT16 __set_formal);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ipv4 )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ipv4 )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ HSTRING __set_formal);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ipv6 )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ipv6 )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ HSTRING __set_formal);\r\n        \r\n        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_peerTag )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [out] */ UINT32 *____returnValueSize,\r\n            /* [out][retval][size_is][size_is] */ BYTE **__returnValue);\r\n        \r\n        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_peerTag )( \r\n            __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals * This,\r\n            /* [in] */ UINT32 ____set_formalSize,\r\n            /* [in][size_is] */ BYTE *__set_formal);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtualsVtbl;\r\n\r\n    interface __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals\r\n    {\r\n        CONST_VTBL struct __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtualsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_get_id(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_id(This,__returnValue) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_put_id(This,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_id(This,__set_formal) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_get_port(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_port(This,__returnValue) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_put_port(This,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_port(This,__set_formal) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_get_ipv4(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_ipv4(This,__returnValue) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_put_ipv4(This,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_ipv4(This,__set_formal) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_get_ipv6(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_ipv6(This,__returnValue) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_put_ipv6(This,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_ipv6(This,__set_formal) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_get_peerTag(This,____returnValueSize,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> get_peerTag(This,____returnValueSize,__returnValue) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_put_peerTag(This,____set_formalSize,__set_formal)\t\\\r\n    ( (This)->lpVtbl -> put_peerTag(This,____set_formalSize,__set_formal) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_libtgvoip_0000_0001 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_Clibtgvoip_CIStateCallback_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_libtgvoip_IStateCallback[] = L\"libtgvoip.IStateCallback\";\r\n#endif /* !defined(____x_ABI_Clibtgvoip_CIStateCallback_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_libtgvoip_0000_0001 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_libtgvoip_0000_0001_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_libtgvoip_0000_0001_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_Clibtgvoip_CIStateCallback_INTERFACE_DEFINED__\r\n#define ____x_ABI_Clibtgvoip_CIStateCallback_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_Clibtgvoip_CIStateCallback */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::libtgvoip::IStateCallback */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_Clibtgvoip_CIStateCallback;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace libtgvoip {\r\n            \r\n            MIDL_INTERFACE(\"A11CB322-951E-3651-8AA4-EF42D1E142F3\")\r\n            IStateCallback : public IInspectable\r\n            {\r\n            public:\r\n                virtual HRESULT STDMETHODCALLTYPE OnCallStateChanged( \r\n                    /* [in] */ ABI::libtgvoip::CallState newState) = 0;\r\n                \r\n            };\r\n\r\n            extern const __declspec(selectany) IID & IID_IStateCallback = __uuidof(IStateCallback);\r\n\r\n            \r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_Clibtgvoip_CIStateCallbackVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_Clibtgvoip_CIStateCallback * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_Clibtgvoip_CIStateCallback * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_Clibtgvoip_CIStateCallback * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_Clibtgvoip_CIStateCallback * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_Clibtgvoip_CIStateCallback * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_Clibtgvoip_CIStateCallback * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *OnCallStateChanged )( \r\n            __x_ABI_Clibtgvoip_CIStateCallback * This,\r\n            /* [in] */ __x_ABI_Clibtgvoip_CCallState newState);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_Clibtgvoip_CIStateCallbackVtbl;\r\n\r\n    interface __x_ABI_Clibtgvoip_CIStateCallback\r\n    {\r\n        CONST_VTBL struct __x_ABI_Clibtgvoip_CIStateCallbackVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_Clibtgvoip_CIStateCallback_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_Clibtgvoip_CIStateCallback_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_Clibtgvoip_CIStateCallback_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_Clibtgvoip_CIStateCallback_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_Clibtgvoip_CIStateCallback_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_Clibtgvoip_CIStateCallback_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_Clibtgvoip_CIStateCallback_OnCallStateChanged(This,newState)\t\\\r\n    ( (This)->lpVtbl -> OnCallStateChanged(This,newState) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_Clibtgvoip_CIStateCallback_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_libtgvoip_0000_0002 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_libtgvoip___IVoIPControllerWrapperPublicNonVirtuals[] = L\"libtgvoip.__IVoIPControllerWrapperPublicNonVirtuals\";\r\n#endif /* !defined(____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_libtgvoip_0000_0002 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_libtgvoip_0000_0002_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_libtgvoip_0000_0002_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_INTERFACE_DEFINED__\r\n#define ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::libtgvoip::__IVoIPControllerWrapperPublicNonVirtuals */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace libtgvoip {\r\n            \r\n            MIDL_INTERFACE(\"A4312674-FAEC-3E92-B84B-631A08BEA963\")\r\n            __IVoIPControllerWrapperPublicNonVirtuals : public IInspectable\r\n            {\r\n            public:\r\n                virtual HRESULT STDMETHODCALLTYPE Start( void) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE Connect( void) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE SetPublicEndpoints( \r\n                    /* [in] */ UINT32 __endpointsSize,\r\n                    /* [in][size_is] */ ABI::libtgvoip::__IEndpointPublicNonVirtuals **endpoints,\r\n                    /* [in] */ boolean allowP2P) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE SetNetworkType( \r\n                    /* [in] */ ABI::libtgvoip::NetworkType type) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE SetStateCallback( \r\n                    /* [in] */ ABI::libtgvoip::IStateCallback *callback) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE SetMicMute( \r\n                    /* [in] */ boolean mute) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE SetEncryptionKey( \r\n                    /* [in] */ UINT32 __keySize,\r\n                    /* [in][size_is] */ BYTE *key,\r\n                    /* [in] */ boolean isOutgoing) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE SetConfig( \r\n                    /* [in] */ DOUBLE initTimeout,\r\n                    /* [in] */ DOUBLE recvTimeout,\r\n                    /* [in] */ ABI::libtgvoip::DataSavingMode dataSavingMode,\r\n                    /* [in] */ boolean enableAEC,\r\n                    /* [in] */ boolean enableNS,\r\n                    /* [in] */ boolean enableAGC,\r\n                    /* [in] */ HSTRING logFilePath,\r\n                    /* [in] */ HSTRING statsDumpFilePath) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE GetDebugString( \r\n                    /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE GetDebugLog( \r\n                    /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE GetLastError( \r\n                    /* [out][retval] */ ABI::libtgvoip::Error *__returnValue) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE GetPreferredRelayID( \r\n                    /* [out][retval] */ INT64 *__returnValue) = 0;\r\n                \r\n            };\r\n\r\n            extern const __declspec(selectany) IID & IID___IVoIPControllerWrapperPublicNonVirtuals = __uuidof(__IVoIPControllerWrapperPublicNonVirtuals);\r\n\r\n            \r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtualsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Start )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *Connect )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetPublicEndpoints )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [in] */ UINT32 __endpointsSize,\r\n            /* [in][size_is] */ __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals **endpoints,\r\n            /* [in] */ boolean allowP2P);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetNetworkType )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_Clibtgvoip_CNetworkType type);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetStateCallback )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [in] */ __x_ABI_Clibtgvoip_CIStateCallback *callback);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetMicMute )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [in] */ boolean mute);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetEncryptionKey )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [in] */ UINT32 __keySize,\r\n            /* [in][size_is] */ BYTE *key,\r\n            /* [in] */ boolean isOutgoing);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SetConfig )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [in] */ DOUBLE initTimeout,\r\n            /* [in] */ DOUBLE recvTimeout,\r\n            /* [in] */ __x_ABI_Clibtgvoip_CDataSavingMode dataSavingMode,\r\n            /* [in] */ boolean enableAEC,\r\n            /* [in] */ boolean enableNS,\r\n            /* [in] */ boolean enableAGC,\r\n            /* [in] */ HSTRING logFilePath,\r\n            /* [in] */ HSTRING statsDumpFilePath);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetDebugString )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetDebugLog )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetLastError )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [out][retval] */ __x_ABI_Clibtgvoip_CError *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetPreferredRelayID )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals * This,\r\n            /* [out][retval] */ INT64 *__returnValue);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtualsVtbl;\r\n\r\n    interface __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals\r\n    {\r\n        CONST_VTBL struct __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtualsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_Start(This)\t\\\r\n    ( (This)->lpVtbl -> Start(This) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_Connect(This)\t\\\r\n    ( (This)->lpVtbl -> Connect(This) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_SetPublicEndpoints(This,__endpointsSize,endpoints,allowP2P)\t\\\r\n    ( (This)->lpVtbl -> SetPublicEndpoints(This,__endpointsSize,endpoints,allowP2P) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_SetNetworkType(This,type)\t\\\r\n    ( (This)->lpVtbl -> SetNetworkType(This,type) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_SetStateCallback(This,callback)\t\\\r\n    ( (This)->lpVtbl -> SetStateCallback(This,callback) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_SetMicMute(This,mute)\t\\\r\n    ( (This)->lpVtbl -> SetMicMute(This,mute) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_SetEncryptionKey(This,__keySize,key,isOutgoing)\t\\\r\n    ( (This)->lpVtbl -> SetEncryptionKey(This,__keySize,key,isOutgoing) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_SetConfig(This,initTimeout,recvTimeout,dataSavingMode,enableAEC,enableNS,enableAGC,logFilePath,statsDumpFilePath)\t\\\r\n    ( (This)->lpVtbl -> SetConfig(This,initTimeout,recvTimeout,dataSavingMode,enableAEC,enableNS,enableAGC,logFilePath,statsDumpFilePath) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_GetDebugString(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetDebugString(This,__returnValue) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_GetDebugLog(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetDebugLog(This,__returnValue) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_GetLastError(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetLastError(This,__returnValue) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_GetPreferredRelayID(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetPreferredRelayID(This,__returnValue) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_libtgvoip_0000_0003 */\r\n/* [local] */ \r\n\r\n#if !defined(____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_INTERFACE_DEFINED__)\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR InterfaceName_libtgvoip___IVoIPControllerWrapperStatics[] = L\"libtgvoip.__IVoIPControllerWrapperStatics\";\r\n#endif /* !defined(____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_INTERFACE_DEFINED__) */\r\n\r\n\r\n/* interface __MIDL_itf_libtgvoip_0000_0003 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_libtgvoip_0000_0003_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_libtgvoip_0000_0003_v0_0_s_ifspec;\r\n\r\n#ifndef ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_INTERFACE_DEFINED__\r\n#define ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_INTERFACE_DEFINED__\r\n\r\n/* interface __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics */\r\n/* [uuid][object] */ \r\n\r\n\r\n\r\n/* interface ABI::libtgvoip::__IVoIPControllerWrapperStatics */\r\n/* [uuid][object] */ \r\n\r\n\r\nEXTERN_C const IID IID___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics;\r\n\r\n#if defined(__cplusplus) && !defined(CINTERFACE)\r\n    } /* end extern \"C\" */\r\n    namespace ABI {\r\n        namespace libtgvoip {\r\n            \r\n            MIDL_INTERFACE(\"B855DB3B-9FD9-3215-8F33-73173C2AD6CD\")\r\n            __IVoIPControllerWrapperStatics : public IInspectable\r\n            {\r\n            public:\r\n                virtual HRESULT STDMETHODCALLTYPE GetVersion( \r\n                    /* [out][retval] */ HSTRING *__returnValue) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE UpdateServerConfig( \r\n                    /* [in] */ HSTRING json) = 0;\r\n                \r\n                virtual HRESULT STDMETHODCALLTYPE SwitchSpeaker( \r\n                    /* [in] */ boolean external) = 0;\r\n                \r\n            };\r\n\r\n            extern const __declspec(selectany) IID & IID___IVoIPControllerWrapperStatics = __uuidof(__IVoIPControllerWrapperStatics);\r\n\r\n            \r\n        }  /* end namespace */\r\n    }  /* end namespace */\r\n    extern \"C\" { \r\n    \r\n#else \t/* C style interface */\r\n\r\n    typedef struct __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStaticsVtbl\r\n    {\r\n        BEGIN_INTERFACE\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics * This,\r\n            /* [in] */ REFIID riid,\r\n            /* [annotation][iid_is][out] */ \r\n            _COM_Outptr_  void **ppvObject);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *AddRef )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics * This);\r\n        \r\n        ULONG ( STDMETHODCALLTYPE *Release )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics * This);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetIids )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics * This,\r\n            /* [out] */ ULONG *iidCount,\r\n            /* [size_is][size_is][out] */ IID **iids);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetRuntimeClassName )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics * This,\r\n            /* [out] */ HSTRING *className);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics * This,\r\n            /* [out] */ TrustLevel *trustLevel);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *GetVersion )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics * This,\r\n            /* [out][retval] */ HSTRING *__returnValue);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *UpdateServerConfig )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics * This,\r\n            /* [in] */ HSTRING json);\r\n        \r\n        HRESULT ( STDMETHODCALLTYPE *SwitchSpeaker )( \r\n            __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics * This,\r\n            /* [in] */ boolean external);\r\n        \r\n        END_INTERFACE\r\n    } __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStaticsVtbl;\r\n\r\n    interface __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics\r\n    {\r\n        CONST_VTBL struct __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStaticsVtbl *lpVtbl;\r\n    };\r\n\r\n    \r\n\r\n#ifdef COBJMACROS\r\n\r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_QueryInterface(This,riid,ppvObject)\t\\\r\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_AddRef(This)\t\\\r\n    ( (This)->lpVtbl -> AddRef(This) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_Release(This)\t\\\r\n    ( (This)->lpVtbl -> Release(This) ) \r\n\r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_GetIids(This,iidCount,iids)\t\\\r\n    ( (This)->lpVtbl -> GetIids(This,iidCount,iids) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_GetRuntimeClassName(This,className)\t\\\r\n    ( (This)->lpVtbl -> GetRuntimeClassName(This,className) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_GetTrustLevel(This,trustLevel)\t\\\r\n    ( (This)->lpVtbl -> GetTrustLevel(This,trustLevel) ) \r\n\r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_GetVersion(This,__returnValue)\t\\\r\n    ( (This)->lpVtbl -> GetVersion(This,__returnValue) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_UpdateServerConfig(This,json)\t\\\r\n    ( (This)->lpVtbl -> UpdateServerConfig(This,json) ) \r\n\r\n#define __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_SwitchSpeaker(This,external)\t\\\r\n    ( (This)->lpVtbl -> SwitchSpeaker(This,external) ) \r\n\r\n#endif /* COBJMACROS */\r\n\r\n\r\n#endif \t/* C style interface */\r\n\r\n\r\n\r\n\r\n#endif \t/* ____x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_INTERFACE_DEFINED__ */\r\n\r\n\r\n/* interface __MIDL_itf_libtgvoip_0000_0004 */\r\n/* [local] */ \r\n\r\n#ifndef RUNTIMECLASS_libtgvoip_Endpoint_DEFINED\r\n#define RUNTIMECLASS_libtgvoip_Endpoint_DEFINED\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_libtgvoip_Endpoint[] = L\"libtgvoip.Endpoint\";\r\n#endif\r\n#ifndef RUNTIMECLASS_libtgvoip_VoIPControllerWrapper_DEFINED\r\n#define RUNTIMECLASS_libtgvoip_VoIPControllerWrapper_DEFINED\r\nextern const __declspec(selectany) _Null_terminated_ WCHAR RuntimeClass_libtgvoip_VoIPControllerWrapper[] = L\"libtgvoip.VoIPControllerWrapper\";\r\n#endif\r\n\r\n\r\n/* interface __MIDL_itf_libtgvoip_0000_0004 */\r\n/* [local] */ \r\n\r\n\r\n\r\nextern RPC_IF_HANDLE __MIDL_itf_libtgvoip_0000_0004_v0_0_c_ifspec;\r\nextern RPC_IF_HANDLE __MIDL_itf_libtgvoip_0000_0004_v0_0_s_ifspec;\r\n\r\n/* Additional Prototypes for ALL interfaces */\r\n\r\nunsigned long             __RPC_USER  HSTRING_UserSize(     unsigned long *, unsigned long            , HSTRING * ); \r\nunsigned char * __RPC_USER  HSTRING_UserMarshal(  unsigned long *, unsigned char *, HSTRING * ); \r\nunsigned char * __RPC_USER  HSTRING_UserUnmarshal(unsigned long *, unsigned char *, HSTRING * ); \r\nvoid                      __RPC_USER  HSTRING_UserFree(     unsigned long *, HSTRING * ); \r\n\r\n/* end of Additional Prototypes */\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif\r\n\r\n\r\n"
  },
  {
    "path": "libtgvoipProxyStub/libtgvoipProxyStub.def",
    "content": "EXPORTS\r\n    DllGetClassObject    PRIVATE\r\n    DllCanUnloadNow      PRIVATE\r\n    DllRegisterServer    PRIVATE\r\n    DllUnregisterServer  PRIVATE"
  },
  {
    "path": "libtgvoipProxyStub/libtgvoipProxyStub.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|ARM\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{4098757a-3589-4860-a29e-164ec614d221}</ProjectGuid>\r\n    <RootNamespace>libtgvoipProxyStub</RootNamespace>\r\n    <DefaultLanguage>en-US</DefaultLanguage>\r\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and '$(VisualStudioVersion)' == ''\">$(VCTargetsPath11)</VCTargetsPath>\r\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\r\n    <TargetPlatformIdentifier>Windows Phone</TargetPlatformIdentifier>\r\n    <TargetPlatformVersion>8.0</TargetPlatformVersion>\r\n    <ApplicationType>Windows Phone Silverlight</ApplicationType>\r\n    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <IgnoreImportLibrary>false</IgnoreImportLibrary>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <IgnoreImportLibrary>false</IgnoreImportLibrary>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <IgnoreImportLibrary>false</IgnoreImportLibrary>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n    <IgnoreImportLibrary>false</IgnoreImportLibrary>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup>\r\n    <GenerateManifest>false</GenerateManifest>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <TargetName>libtgvoip.$(ProjectName)</TargetName>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <TargetName>libtgvoip.$(ProjectName)</TargetName>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <TargetName>libtgvoip.$(ProjectName)</TargetName>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <TargetName>libtgvoip.$(ProjectName)</TargetName>\r\n    <OutDir>$(SolutionDir)$(PlatformTarget)\\$(Configuration)\\$(MSBuildProjectName)\\</OutDir>\r\n    <IntDir>$(PlatformTarget)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;WIN32;REGISTER_PROXY_DLL;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;WIN32;REGISTER_PROXY_DLL;_USRDLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;_ARM_;WIN32;REGISTER_PROXY_DLL;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;_ARM_;WIN32;REGISTER_PROXY_DLL;_USRDLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup>\r\n    <ClCompile>\r\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r\n      <CompileAsWinRT>false</CompileAsWinRT>\r\n      <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>\r\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <AdditionalDependencies>windowsphonecore.lib;runtimeobject.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\r\n      <ModuleDefinitionFile Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">$(ProjectName).def</ModuleDefinitionFile>\r\n      <ModuleDefinitionFile Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">$(ProjectName).def</ModuleDefinitionFile>\r\n      <ModuleDefinitionFile Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$(ProjectName).def</ModuleDefinitionFile>\r\n      <ModuleDefinitionFile Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$(ProjectName).def</ModuleDefinitionFile>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <Reference Include=\"Windows\">\r\n      <IsWinMDFile>true</IsWinMDFile>\r\n    </Reference>\r\n    <Reference Include=\"platform.winmd\">\r\n      <IsWinMDFile>true</IsWinMDFile>\r\n      <Private>false</Private>\r\n    </Reference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"dlldata.c\" />\r\n    <ClCompile Include=\"libtgvoip_i.c\" />\r\n    <ClCompile Include=\"libtgvoip_p.c\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"libtgvoip.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"libtgvoipProxyStub.def\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\WindowsPhone\\v$(TargetPlatformVersion)\\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "libtgvoipProxyStub/libtgvoip_i.c",
    "content": "\r\n\r\n/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */\r\n\r\n/* link this file in with the server and any clients */\r\n\r\n\r\n /* File created by MIDL compiler version 8.00.0603 */\r\n/* at Mon Jun 19 00:49:35 2017\r\n */\r\n/* Compiler settings for C:\\Users\\evgeny\\AppData\\Local\\Temp\\libtgvoip.idl-c4a72767:\r\n    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=ARM 8.00.0603 \r\n    protocol : dce , ms_ext, c_ext, robust\r\n    error checks: allocation ref bounds_check enum stub_data \r\n    VC __declspec() decoration level: \r\n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r\n         DECLSPEC_UUID(), MIDL_INTERFACE()\r\n*/\r\n/* @@MIDL_FILE_HEADING(  ) */\r\n\r\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\r\n\r\n\r\n#ifdef __cplusplus\r\nextern \"C\"{\r\n#endif \r\n\r\n\r\n#include <rpc.h>\r\n#include <rpcndr.h>\r\n\r\n#ifdef _MIDL_USE_GUIDDEF_\r\n\r\n#ifndef INITGUID\r\n#define INITGUID\r\n#include <guiddef.h>\r\n#undef INITGUID\r\n#else\r\n#include <guiddef.h>\r\n#endif\r\n\r\n#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\r\n        DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)\r\n\r\n#else // !_MIDL_USE_GUIDDEF_\r\n\r\n#ifndef __IID_DEFINED__\r\n#define __IID_DEFINED__\r\n\r\ntypedef struct _IID\r\n{\r\n    unsigned long x;\r\n    unsigned short s1;\r\n    unsigned short s2;\r\n    unsigned char  c[8];\r\n} IID;\r\n\r\n#endif // __IID_DEFINED__\r\n\r\n#ifndef CLSID_DEFINED\r\n#define CLSID_DEFINED\r\ntypedef IID CLSID;\r\n#endif // CLSID_DEFINED\r\n\r\n#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\r\n        const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\r\n\r\n#endif !_MIDL_USE_GUIDDEF_\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals,0x95221757,0xDCCC,0x3C3B,0xA5,0xAF,0x51,0x4F,0xC2,0x08,0xEA,0xF2);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_Clibtgvoip_CIStateCallback,0xA11CB322,0x951E,0x3651,0x8A,0xA4,0xEF,0x42,0xD1,0xE1,0x42,0xF3);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals,0xA4312674,0xFAEC,0x3E92,0xB8,0x4B,0x63,0x1A,0x08,0xBE,0xA9,0x63);\r\n\r\n\r\nMIDL_DEFINE_GUID(IID, IID___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics,0xB855DB3B,0x9FD9,0x3215,0x8F,0x33,0x73,0x17,0x3C,0x2A,0xD6,0xCD);\r\n\r\n#undef MIDL_DEFINE_GUID\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n\r\n\r\n"
  },
  {
    "path": "libtgvoipProxyStub/libtgvoip_p.c",
    "content": "\r\n\r\n/* this ALWAYS GENERATED file contains the proxy stub code */\r\n\r\n\r\n /* File created by MIDL compiler version 8.00.0603 */\r\n/* at Mon Jun 19 00:49:35 2017\r\n */\r\n/* Compiler settings for C:\\Users\\evgeny\\AppData\\Local\\Temp\\libtgvoip.idl-c4a72767:\r\n    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=ARM 8.00.0603 \r\n    protocol : dce , ms_ext, c_ext, robust\r\n    error checks: allocation ref bounds_check enum stub_data \r\n    VC __declspec() decoration level: \r\n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r\n         DECLSPEC_UUID(), MIDL_INTERFACE()\r\n*/\r\n/* @@MIDL_FILE_HEADING(  ) */\r\n\r\n#if defined(_ARM_)\r\n\r\n\r\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\r\n#if _MSC_VER >= 1200\r\n#pragma warning(push)\r\n#endif\r\n\r\n#pragma warning( disable: 4211 )  /* redefine extern to static */\r\n#pragma warning( disable: 4232 )  /* dllimport identity*/\r\n#pragma warning( disable: 4024 )  /* array to pointer mapping*/\r\n#pragma warning( disable: 4152 )  /* function/data pointer conversion in expression */\r\n\r\n#define USE_STUBLESS_PROXY\r\n\r\n\r\n/* verify that the <rpcproxy.h> version is high enough to compile this file*/\r\n#ifndef __REDQ_RPCPROXY_H_VERSION__\r\n#define __REQUIRED_RPCPROXY_H_VERSION__ 475\r\n#endif\r\n\r\n\r\n#include \"rpcproxy.h\"\r\n#ifndef __RPCPROXY_H_VERSION__\r\n#error this stub requires an updated version of <rpcproxy.h>\r\n#endif /* __RPCPROXY_H_VERSION__ */\r\n\r\n\r\n#include \"libtgvoip.h\"\r\n\r\n#define TYPE_FORMAT_STRING_SIZE   171                               \r\n#define PROC_FORMAT_STRING_SIZE   1171                              \r\n#define EXPR_FORMAT_STRING_SIZE   1                                 \r\n#define TRANSMIT_AS_TABLE_SIZE    0            \r\n#define WIRE_MARSHAL_TABLE_SIZE   1            \r\n\r\ntypedef struct _libtgvoip_MIDL_TYPE_FORMAT_STRING\r\n    {\r\n    short          Pad;\r\n    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];\r\n    } libtgvoip_MIDL_TYPE_FORMAT_STRING;\r\n\r\ntypedef struct _libtgvoip_MIDL_PROC_FORMAT_STRING\r\n    {\r\n    short          Pad;\r\n    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];\r\n    } libtgvoip_MIDL_PROC_FORMAT_STRING;\r\n\r\ntypedef struct _libtgvoip_MIDL_EXPR_FORMAT_STRING\r\n    {\r\n    long          Pad;\r\n    unsigned char  Format[ EXPR_FORMAT_STRING_SIZE ];\r\n    } libtgvoip_MIDL_EXPR_FORMAT_STRING;\r\n\r\n\r\nstatic const RPC_SYNTAX_IDENTIFIER  _RpcTransferSyntax = \r\n{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};\r\n\r\n\r\nextern const libtgvoip_MIDL_TYPE_FORMAT_STRING libtgvoip__MIDL_TypeFormatString;\r\nextern const libtgvoip_MIDL_PROC_FORMAT_STRING libtgvoip__MIDL_ProcFormatString;\r\nextern const libtgvoip_MIDL_EXPR_FORMAT_STRING libtgvoip__MIDL_ExprFormatString;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_Clibtgvoip_CIStateCallback_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_Clibtgvoip_CIStateCallback_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_ProxyInfo;\r\n\r\n\r\nextern const MIDL_STUB_DESC Object_StubDesc;\r\n\r\n\r\nextern const MIDL_SERVER_INFO __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_ServerInfo;\r\nextern const MIDL_STUBLESS_PROXY_INFO __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_ProxyInfo;\r\n\r\n\r\nextern const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[ WIRE_MARSHAL_TABLE_SIZE ];\r\n\r\n#if !defined(__RPC_ARM32__)\r\n#error  Invalid build platform for this stub.\r\n#endif\r\n\r\n#if !(TARGET_IS_NT50_OR_LATER)\r\n#error You need Windows 2000 or later to run this stub because it uses these features:\r\n#error   /robust command line switch.\r\n#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.\r\n#error This app will fail with the RPC_X_WRONG_STUB_VERSION error.\r\n#endif\r\n\r\n\r\nstatic const libtgvoip_MIDL_PROC_FORMAT_STRING libtgvoip__MIDL_ProcFormatString =\r\n    {\r\n        0,\r\n        {\r\n\r\n\t/* Procedure get_id */\r\n\r\n\t\t\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/*  2 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/*  6 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/*  8 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 10 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 12 */\tNdrFcShort( 0x2c ),\t/* 44 */\r\n/* 14 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 16 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 18 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 20 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 22 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 24 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 26 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 28 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 30 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 32 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 34 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 36 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 38 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 40 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_id */\r\n\r\n/* 42 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 44 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 48 */\tNdrFcShort( 0x7 ),\t/* 7 */\r\n/* 50 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 52 */\tNdrFcShort( 0x10 ),\t/* 16 */\r\n/* 54 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 56 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 58 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 60 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 62 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 64 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 66 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 68 */\t0x4,\t\t/* 4 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 70 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 72 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 74 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 76 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 78 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 80 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 82 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 84 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_port */\r\n\r\n/* 86 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 88 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 92 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 94 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 96 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 98 */\tNdrFcShort( 0x22 ),\t/* 34 */\r\n/* 100 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 102 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 104 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 106 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 108 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 110 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 112 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 114 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 116 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 118 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 120 */\t0x6,\t\t/* FC_SHORT */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 122 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 124 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 126 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_port */\r\n\r\n/* 128 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 130 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 134 */\tNdrFcShort( 0x9 ),\t/* 9 */\r\n/* 136 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 138 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 140 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 142 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 144 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 146 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 148 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 150 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 152 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 154 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 156 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 158 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 160 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 162 */\t0x6,\t\t/* FC_SHORT */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 164 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 166 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 168 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_ipv4 */\r\n\r\n/* 170 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 172 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 176 */\tNdrFcShort( 0xa ),\t/* 10 */\r\n/* 178 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 180 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 182 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 184 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 186 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 188 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 190 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 192 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 194 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 196 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 198 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 200 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 202 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 204 */\tNdrFcShort( 0x28 ),\t/* Type Offset=40 */\r\n\r\n\t/* Return value */\r\n\r\n/* 206 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 208 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 210 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_ipv4 */\r\n\r\n/* 212 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 214 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 218 */\tNdrFcShort( 0xb ),\t/* 11 */\r\n/* 220 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 222 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 224 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 226 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 228 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 230 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 232 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 234 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 236 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 238 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 240 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 242 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 244 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 246 */\tNdrFcShort( 0x36 ),\t/* Type Offset=54 */\r\n\r\n\t/* Return value */\r\n\r\n/* 248 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 250 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 252 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_ipv6 */\r\n\r\n/* 254 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 256 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 260 */\tNdrFcShort( 0xc ),\t/* 12 */\r\n/* 262 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 264 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 266 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 268 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 270 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 272 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 274 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 276 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 278 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 280 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 282 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 284 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 286 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 288 */\tNdrFcShort( 0x28 ),\t/* Type Offset=40 */\r\n\r\n\t/* Return value */\r\n\r\n/* 290 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 292 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 294 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_ipv6 */\r\n\r\n/* 296 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 298 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 302 */\tNdrFcShort( 0xd ),\t/* 13 */\r\n/* 304 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 306 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 308 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 310 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 312 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 314 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 316 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 318 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 320 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 322 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 324 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 326 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 328 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 330 */\tNdrFcShort( 0x36 ),\t/* Type Offset=54 */\r\n\r\n\t/* Return value */\r\n\r\n/* 332 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 334 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 336 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure get_peerTag */\r\n\r\n/* 338 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 340 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 344 */\tNdrFcShort( 0xe ),\t/* 14 */\r\n/* 346 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 348 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 350 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 352 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 354 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 356 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 358 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 360 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 362 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 364 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 366 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter ____returnValueSize */\r\n\r\n/* 368 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 370 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 372 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 374 */\tNdrFcShort( 0x2013 ),\t/* Flags:  must size, must free, out, srv alloc size=8 */\r\n/* 376 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 378 */\tNdrFcShort( 0x44 ),\t/* Type Offset=68 */\r\n\r\n\t/* Return value */\r\n\r\n/* 380 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 382 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 384 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure put_peerTag */\r\n\r\n/* 386 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 388 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 392 */\tNdrFcShort( 0xf ),\t/* 15 */\r\n/* 394 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 396 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 398 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 400 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 402 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 404 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 406 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 408 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 410 */\tNdrFcShort( 0x3 ),\t/* 3 */\r\n/* 412 */\t0x3,\t\t/* 3 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 414 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n\r\n\t/* Parameter ____set_formalSize */\r\n\r\n/* 416 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 418 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 420 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __set_formal */\r\n\r\n/* 422 */\tNdrFcShort( 0x10b ),\t/* Flags:  must size, must free, in, simple ref, */\r\n/* 424 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 426 */\tNdrFcShort( 0x5c ),\t/* Type Offset=92 */\r\n\r\n\t/* Return value */\r\n\r\n/* 428 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 430 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 432 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure OnCallStateChanged */\r\n\r\n/* 434 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 436 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 440 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 442 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 444 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 446 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 448 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 450 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 452 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 454 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 456 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 458 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 460 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 462 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter newState */\r\n\r\n/* 464 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 466 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 468 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 470 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 472 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 474 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure Start */\r\n\r\n/* 476 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 478 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 482 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 484 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 486 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 488 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 490 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x1,\t\t/* 1 */\r\n/* 492 */\t0xc,\t\t/* 12 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 494 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 496 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 498 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 500 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 502 */\t0x1,\t\t/* 1 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n\r\n\t/* Return value */\r\n\r\n/* 504 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 506 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 508 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure Connect */\r\n\r\n/* 510 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 512 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 516 */\tNdrFcShort( 0x7 ),\t/* 7 */\r\n/* 518 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 520 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 522 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 524 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x1,\t\t/* 1 */\r\n/* 526 */\t0xc,\t\t/* 12 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 528 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 530 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 532 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 534 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 536 */\t0x1,\t\t/* 1 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n\r\n\t/* Return value */\r\n\r\n/* 538 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 540 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 542 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetPublicEndpoints */\r\n\r\n/* 544 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 546 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 550 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 552 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 554 */\tNdrFcShort( 0xd ),\t/* 13 */\r\n/* 556 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 558 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x4,\t\t/* 4 */\r\n/* 560 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 562 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 564 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 566 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 568 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 570 */\t0x4,\t\t/* 4 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 572 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 574 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __endpointsSize */\r\n\r\n/* 576 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 578 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 580 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter endpoints */\r\n\r\n/* 582 */\tNdrFcShort( 0x10b ),\t/* Flags:  must size, must free, in, simple ref, */\r\n/* 584 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 586 */\tNdrFcShort( 0x7e ),\t/* Type Offset=126 */\r\n\r\n\t/* Parameter allowP2P */\r\n\r\n/* 588 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 590 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 592 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 594 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 596 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 598 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetNetworkType */\r\n\r\n/* 600 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 602 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 606 */\tNdrFcShort( 0x9 ),\t/* 9 */\r\n/* 608 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 610 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 612 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 614 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 616 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 618 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 620 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 622 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 624 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 626 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 628 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter type */\r\n\r\n/* 630 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 632 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 634 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 636 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 638 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 640 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetStateCallback */\r\n\r\n/* 642 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 644 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 648 */\tNdrFcShort( 0xa ),\t/* 10 */\r\n/* 650 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 652 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 654 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 656 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 658 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 660 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 662 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 664 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 666 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 668 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 670 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter callback */\r\n\r\n/* 672 */\tNdrFcShort( 0xb ),\t/* Flags:  must size, must free, in, */\r\n/* 674 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 676 */\tNdrFcShort( 0x94 ),\t/* Type Offset=148 */\r\n\r\n\t/* Return value */\r\n\r\n/* 678 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 680 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 682 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetMicMute */\r\n\r\n/* 684 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 686 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 690 */\tNdrFcShort( 0xb ),\t/* 11 */\r\n/* 692 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 694 */\tNdrFcShort( 0x5 ),\t/* 5 */\r\n/* 696 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 698 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 700 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 702 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 704 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 706 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 708 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 710 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 712 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter mute */\r\n\r\n/* 714 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 716 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 718 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 720 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 722 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 724 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetEncryptionKey */\r\n\r\n/* 726 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 728 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 732 */\tNdrFcShort( 0xc ),\t/* 12 */\r\n/* 734 */\tNdrFcShort( 0x14 ),\t/* ARM Stack size/offset = 20 */\r\n/* 736 */\tNdrFcShort( 0xd ),\t/* 13 */\r\n/* 738 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 740 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x4,\t\t/* 4 */\r\n/* 742 */\t0x10,\t\t/* 16 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 744 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 746 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 748 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 750 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 752 */\t0x4,\t\t/* 4 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 754 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x82,\t\t/* 130 */\r\n/* 756 */\t0x83,\t\t/* 131 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __keySize */\r\n\r\n/* 758 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 760 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 762 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter key */\r\n\r\n/* 764 */\tNdrFcShort( 0x10b ),\t/* Flags:  must size, must free, in, simple ref, */\r\n/* 766 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 768 */\tNdrFcShort( 0x5c ),\t/* Type Offset=92 */\r\n\r\n\t/* Parameter isOutgoing */\r\n\r\n/* 770 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 772 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 774 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 776 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 778 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 780 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SetConfig */\r\n\r\n/* 782 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 784 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 788 */\tNdrFcShort( 0xd ),\t/* 13 */\r\n/* 790 */\tNdrFcShort( 0x34 ),\t/* ARM Stack size/offset = 52 */\r\n/* 792 */\tNdrFcShort( 0x37 ),\t/* 55 */\r\n/* 794 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 796 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x9,\t\t/* 9 */\r\n/* 798 */\t0x18,\t\t/* 24 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 800 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 802 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 804 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 806 */\tNdrFcShort( 0xc ),\t/* 12 */\r\n/* 808 */\t0xc,\t\t/* 12 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 810 */\t0x9f,\t\t/* 159 */\r\n\t\t\t0x84,\t\t/* 132 */\r\n/* 812 */\t0x85,\t\t/* 133 */\r\n\t\t\t0x86,\t\t/* 134 */\r\n/* 814 */\t0x87,\t\t/* 135 */\r\n\t\t\t0x81,\t\t/* 129 */\r\n/* 816 */\t0x82,\t\t/* 130 */\r\n\t\t\t0x83,\t\t/* 131 */\r\n/* 818 */\t0xf7,\t\t/* 247 */\r\n\t\t\t0xf7,\t\t/* 247 */\r\n/* 820 */\t0xf7,\t\t/* 247 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter initTimeout */\r\n\r\n/* 822 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 824 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 826 */\t0xc,\t\t/* FC_DOUBLE */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter recvTimeout */\r\n\r\n/* 828 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 830 */\tNdrFcShort( 0x10 ),\t/* ARM Stack size/offset = 16 */\r\n/* 832 */\t0xc,\t\t/* FC_DOUBLE */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter dataSavingMode */\r\n\r\n/* 834 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 836 */\tNdrFcShort( 0x18 ),\t/* ARM Stack size/offset = 24 */\r\n/* 838 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter enableAEC */\r\n\r\n/* 840 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 842 */\tNdrFcShort( 0x1c ),\t/* ARM Stack size/offset = 28 */\r\n/* 844 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter enableNS */\r\n\r\n/* 846 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 848 */\tNdrFcShort( 0x20 ),\t/* ARM Stack size/offset = 32 */\r\n/* 850 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter enableAGC */\r\n\r\n/* 852 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 854 */\tNdrFcShort( 0x24 ),\t/* ARM Stack size/offset = 36 */\r\n/* 856 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter logFilePath */\r\n\r\n/* 858 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 860 */\tNdrFcShort( 0x28 ),\t/* ARM Stack size/offset = 40 */\r\n/* 862 */\tNdrFcShort( 0x36 ),\t/* Type Offset=54 */\r\n\r\n\t/* Parameter statsDumpFilePath */\r\n\r\n/* 864 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 866 */\tNdrFcShort( 0x2c ),\t/* ARM Stack size/offset = 44 */\r\n/* 868 */\tNdrFcShort( 0x36 ),\t/* Type Offset=54 */\r\n\r\n\t/* Return value */\r\n\r\n/* 870 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 872 */\tNdrFcShort( 0x30 ),\t/* ARM Stack size/offset = 48 */\r\n/* 874 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetDebugString */\r\n\r\n/* 876 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 878 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 882 */\tNdrFcShort( 0xe ),\t/* 14 */\r\n/* 884 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 886 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 888 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 890 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 892 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 894 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 896 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 898 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 900 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 902 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 904 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 906 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 908 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 910 */\tNdrFcShort( 0x28 ),\t/* Type Offset=40 */\r\n\r\n\t/* Return value */\r\n\r\n/* 912 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 914 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 916 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetDebugLog */\r\n\r\n/* 918 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 920 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 924 */\tNdrFcShort( 0xf ),\t/* 15 */\r\n/* 926 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 928 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 930 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 932 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 934 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 936 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 938 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 940 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 942 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 944 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 946 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 948 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 950 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 952 */\tNdrFcShort( 0x28 ),\t/* Type Offset=40 */\r\n\r\n\t/* Return value */\r\n\r\n/* 954 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 956 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 958 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetLastError */\r\n\r\n/* 960 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 962 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 966 */\tNdrFcShort( 0x10 ),\t/* 16 */\r\n/* 968 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 970 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 972 */\tNdrFcShort( 0x24 ),\t/* 36 */\r\n/* 974 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 976 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 978 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 980 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 982 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 984 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 986 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 988 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 990 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 992 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 994 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 996 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 998 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1000 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetPreferredRelayID */\r\n\r\n/* 1002 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1004 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1008 */\tNdrFcShort( 0x11 ),\t/* 17 */\r\n/* 1010 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1012 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1014 */\tNdrFcShort( 0x2c ),\t/* 44 */\r\n/* 1016 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1018 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1020 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1022 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1024 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1026 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1028 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1030 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 1032 */\tNdrFcShort( 0x2150 ),\t/* Flags:  out, base type, simple ref, srv alloc size=8 */\r\n/* 1034 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1036 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1038 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1040 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1042 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure GetVersion */\r\n\r\n/* 1044 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1046 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1050 */\tNdrFcShort( 0x6 ),\t/* 6 */\r\n/* 1052 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1054 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1056 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1058 */\t0x45,\t\t/* Oi2 Flags:  srv must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1060 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x3,\t\t/* Ext Flags:  new corr desc, clt corr check, */\r\n/* 1062 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1064 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1066 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1068 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1070 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1072 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter __returnValue */\r\n\r\n/* 1074 */\tNdrFcShort( 0x2113 ),\t/* Flags:  must size, must free, out, simple ref, srv alloc size=8 */\r\n/* 1076 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1078 */\tNdrFcShort( 0x28 ),\t/* Type Offset=40 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1080 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1082 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1084 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure UpdateServerConfig */\r\n\r\n/* 1086 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1088 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1092 */\tNdrFcShort( 0x7 ),\t/* 7 */\r\n/* 1094 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1096 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1098 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1100 */\t0x46,\t\t/* Oi2 Flags:  clt must size, has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1102 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x5,\t\t/* Ext Flags:  new corr desc, srv corr check, */\r\n/* 1104 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1106 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 1108 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1110 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1112 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1114 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter json */\r\n\r\n/* 1116 */\tNdrFcShort( 0x8b ),\t/* Flags:  must size, must free, in, by val, */\r\n/* 1118 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1120 */\tNdrFcShort( 0x36 ),\t/* Type Offset=54 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1122 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1124 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1126 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Procedure SwitchSpeaker */\r\n\r\n/* 1128 */\t0x33,\t\t/* FC_AUTO_HANDLE */\r\n\t\t\t0x6c,\t\t/* Old Flags:  object, Oi2 */\r\n/* 1130 */\tNdrFcLong( 0x0 ),\t/* 0 */\r\n/* 1134 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1136 */\tNdrFcShort( 0xc ),\t/* ARM Stack size/offset = 12 */\r\n/* 1138 */\tNdrFcShort( 0x5 ),\t/* 5 */\r\n/* 1140 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 1142 */\t0x44,\t\t/* Oi2 Flags:  has return, has ext, */\r\n\t\t\t0x2,\t\t/* 2 */\r\n/* 1144 */\t0xe,\t\t/* 14 */\r\n\t\t\t0x1,\t\t/* Ext Flags:  new corr desc, */\r\n/* 1146 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1148 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1150 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 1152 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 1154 */\t0x2,\t\t/* 2 */\r\n\t\t\t0x80,\t\t/* 128 */\r\n/* 1156 */\t0x81,\t\t/* 129 */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Parameter external */\r\n\r\n/* 1158 */\tNdrFcShort( 0x48 ),\t/* Flags:  in, base type, */\r\n/* 1160 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 1162 */\t0x3,\t\t/* FC_SMALL */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t/* Return value */\r\n\r\n/* 1164 */\tNdrFcShort( 0x70 ),\t/* Flags:  out, return, base type, */\r\n/* 1166 */\tNdrFcShort( 0x8 ),\t/* ARM Stack size/offset = 8 */\r\n/* 1168 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x0,\t\t/* 0 */\r\n\r\n\t\t\t0x0\r\n        }\r\n    };\r\n\r\nstatic const libtgvoip_MIDL_TYPE_FORMAT_STRING libtgvoip__MIDL_TypeFormatString =\r\n    {\r\n        0,\r\n        {\r\n\t\t\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/*  2 */\t\r\n\t\t\t0x11, 0xc,\t/* FC_RP [alloced_on_stack] [simple_pointer] */\r\n/*  4 */\t0xb,\t\t/* FC_HYPER */\r\n\t\t\t0x5c,\t\t/* FC_PAD */\r\n/*  6 */\t\r\n\t\t\t0x11, 0xc,\t/* FC_RP [alloced_on_stack] [simple_pointer] */\r\n/*  8 */\t0x6,\t\t/* FC_SHORT */\r\n\t\t\t0x5c,\t\t/* FC_PAD */\r\n/* 10 */\t\r\n\t\t\t0x11, 0x4,\t/* FC_RP [alloced_on_stack] */\r\n/* 12 */\tNdrFcShort( 0x1c ),\t/* Offset= 28 (40) */\r\n/* 14 */\t\r\n\t\t\t0x13, 0x0,\t/* FC_OP */\r\n/* 16 */\tNdrFcShort( 0xe ),\t/* Offset= 14 (30) */\r\n/* 18 */\t\r\n\t\t\t0x1b,\t\t/* FC_CARRAY */\r\n\t\t\t0x1,\t\t/* 1 */\r\n/* 20 */\tNdrFcShort( 0x2 ),\t/* 2 */\r\n/* 22 */\t0x9,\t\t/* Corr desc: FC_ULONG */\r\n\t\t\t0x0,\t\t/*  */\r\n/* 24 */\tNdrFcShort( 0xfffc ),\t/* -4 */\r\n/* 26 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 28 */\t0x6,\t\t/* FC_SHORT */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 30 */\t\r\n\t\t\t0x17,\t\t/* FC_CSTRUCT */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 32 */\tNdrFcShort( 0x8 ),\t/* 8 */\r\n/* 34 */\tNdrFcShort( 0xfff0 ),\t/* Offset= -16 (18) */\r\n/* 36 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x8,\t\t/* FC_LONG */\r\n/* 38 */\t0x5c,\t\t/* FC_PAD */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 40 */\t0xb4,\t\t/* FC_USER_MARSHAL */\r\n\t\t\t0x83,\t\t/* 131 */\r\n/* 42 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 44 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 46 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 48 */\tNdrFcShort( 0xffde ),\t/* Offset= -34 (14) */\r\n/* 50 */\t\r\n\t\t\t0x12, 0x0,\t/* FC_UP */\r\n/* 52 */\tNdrFcShort( 0xffea ),\t/* Offset= -22 (30) */\r\n/* 54 */\t0xb4,\t\t/* FC_USER_MARSHAL */\r\n\t\t\t0x83,\t\t/* 131 */\r\n/* 56 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 58 */\tNdrFcShort( 0x4 ),\t/* 4 */\r\n/* 60 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 62 */\tNdrFcShort( 0xfff4 ),\t/* Offset= -12 (50) */\r\n/* 64 */\t\r\n\t\t\t0x11, 0xc,\t/* FC_RP [alloced_on_stack] [simple_pointer] */\r\n/* 66 */\t0x8,\t\t/* FC_LONG */\r\n\t\t\t0x5c,\t\t/* FC_PAD */\r\n/* 68 */\t\r\n\t\t\t0x11, 0x14,\t/* FC_RP [alloced_on_stack] [pointer_deref] */\r\n/* 70 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (72) */\r\n/* 72 */\t\r\n\t\t\t0x13, 0x0,\t/* FC_OP */\r\n/* 74 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (76) */\r\n/* 76 */\t\r\n\t\t\t0x1b,\t\t/* FC_CARRAY */\r\n\t\t\t0x0,\t\t/* 0 */\r\n/* 78 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 80 */\t0x29,\t\t/* Corr desc:  parameter, FC_ULONG */\r\n\t\t\t0x54,\t\t/* FC_DEREFERENCE */\r\n/* 82 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 84 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 86 */\t0x1,\t\t/* FC_BYTE */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 88 */\t\r\n\t\t\t0x11, 0x0,\t/* FC_RP */\r\n/* 90 */\tNdrFcShort( 0x2 ),\t/* Offset= 2 (92) */\r\n/* 92 */\t\r\n\t\t\t0x1b,\t\t/* FC_CARRAY */\r\n\t\t\t0x0,\t\t/* 0 */\r\n/* 94 */\tNdrFcShort( 0x1 ),\t/* 1 */\r\n/* 96 */\t0x29,\t\t/* Corr desc:  parameter, FC_ULONG */\r\n\t\t\t0x0,\t\t/*  */\r\n/* 98 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 100 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 102 */\t0x1,\t\t/* FC_BYTE */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 104 */\t\r\n\t\t\t0x11, 0x0,\t/* FC_RP */\r\n/* 106 */\tNdrFcShort( 0x14 ),\t/* Offset= 20 (126) */\r\n/* 108 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 110 */\tNdrFcLong( 0x95221757 ),\t/* -1792927913 */\r\n/* 114 */\tNdrFcShort( 0xdccc ),\t/* -9012 */\r\n/* 116 */\tNdrFcShort( 0x3c3b ),\t/* 15419 */\r\n/* 118 */\t0xa5,\t\t/* 165 */\r\n\t\t\t0xaf,\t\t/* 175 */\r\n/* 120 */\t0x51,\t\t/* 81 */\r\n\t\t\t0x4f,\t\t/* 79 */\r\n/* 122 */\t0xc2,\t\t/* 194 */\r\n\t\t\t0x8,\t\t/* 8 */\r\n/* 124 */\t0xea,\t\t/* 234 */\r\n\t\t\t0xf2,\t\t/* 242 */\r\n/* 126 */\t\r\n\t\t\t0x21,\t\t/* FC_BOGUS_ARRAY */\r\n\t\t\t0x3,\t\t/* 3 */\r\n/* 128 */\tNdrFcShort( 0x0 ),\t/* 0 */\r\n/* 130 */\t0x29,\t\t/* Corr desc:  parameter, FC_ULONG */\r\n\t\t\t0x0,\t\t/*  */\r\n/* 132 */\tNdrFcShort( 0x4 ),\t/* ARM Stack size/offset = 4 */\r\n/* 134 */\tNdrFcShort( 0x1 ),\t/* Corr flags:  early, */\r\n/* 136 */\tNdrFcLong( 0xffffffff ),\t/* -1 */\r\n/* 140 */\tNdrFcShort( 0x0 ),\t/* Corr flags:  */\r\n/* 142 */\t0x4c,\t\t/* FC_EMBEDDED_COMPLEX */\r\n\t\t\t0x0,\t\t/* 0 */\r\n/* 144 */\tNdrFcShort( 0xffdc ),\t/* Offset= -36 (108) */\r\n/* 146 */\t0x5c,\t\t/* FC_PAD */\r\n\t\t\t0x5b,\t\t/* FC_END */\r\n/* 148 */\t\r\n\t\t\t0x2f,\t\t/* FC_IP */\r\n\t\t\t0x5a,\t\t/* FC_CONSTANT_IID */\r\n/* 150 */\tNdrFcLong( 0xa11cb322 ),\t/* -1591954654 */\r\n/* 154 */\tNdrFcShort( 0x951e ),\t/* -27362 */\r\n/* 156 */\tNdrFcShort( 0x3651 ),\t/* 13905 */\r\n/* 158 */\t0x8a,\t\t/* 138 */\r\n\t\t\t0xa4,\t\t/* 164 */\r\n/* 160 */\t0xef,\t\t/* 239 */\r\n\t\t\t0x42,\t\t/* 66 */\r\n/* 162 */\t0xd1,\t\t/* 209 */\r\n\t\t\t0xe1,\t\t/* 225 */\r\n/* 164 */\t0x42,\t\t/* 66 */\r\n\t\t\t0xf3,\t\t/* 243 */\r\n/* 166 */\t\r\n\t\t\t0x11, 0xc,\t/* FC_RP [alloced_on_stack] [simple_pointer] */\r\n/* 168 */\t0xe,\t\t/* FC_ENUM32 */\r\n\t\t\t0x5c,\t\t/* FC_PAD */\r\n\r\n\t\t\t0x0\r\n        }\r\n    };\r\n\r\nstatic const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[ WIRE_MARSHAL_TABLE_SIZE ] = \r\n        {\r\n            \r\n            {\r\n            HSTRING_UserSize\r\n            ,HSTRING_UserMarshal\r\n            ,HSTRING_UserUnmarshal\r\n            ,HSTRING_UserFree\r\n            }\r\n\r\n        };\r\n\r\n\r\n\r\n/* Standard interface: __MIDL_itf_libtgvoip_0000_0000, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: IUnknown, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */\r\n\r\n\r\n/* Object interface: IInspectable, ver. 0.0,\r\n   GUID={0xAF86E2E0,0xB12D,0x4c6a,{0x9C,0x5A,0xD7,0xAA,0x65,0x10,0x1E,0x90}} */\r\n\r\n\r\n/* Object interface: __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals, ver. 0.0,\r\n   GUID={0x95221757,0xDCCC,0x3C3B,{0xA5,0xAF,0x51,0x4F,0xC2,0x08,0xEA,0xF2}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    0,\r\n    42,\r\n    86,\r\n    128,\r\n    170,\r\n    212,\r\n    254,\r\n    296,\r\n    338,\r\n    386\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    libtgvoip__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    libtgvoip__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(16) ___x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtualsProxyVtbl = \r\n{\r\n    &__x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_ProxyInfo,\r\n    &IID___x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals::get_id */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals::put_id */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals::get_port */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals::put_port */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals::get_ipv4 */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals::put_ipv4 */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals::get_ipv6 */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals::put_ipv6 */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals::get_peerTag */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals::put_peerTag */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtualsStubVtbl =\r\n{\r\n    &IID___x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals,\r\n    &__x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_ServerInfo,\r\n    16,\r\n    &__x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_libtgvoip_0000_0001, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_Clibtgvoip_CIStateCallback, ver. 0.0,\r\n   GUID={0xA11CB322,0x951E,0x3651,{0x8A,0xA4,0xEF,0x42,0xD1,0xE1,0x42,0xF3}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_Clibtgvoip_CIStateCallback_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    434\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_Clibtgvoip_CIStateCallback_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    libtgvoip__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_Clibtgvoip_CIStateCallback_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_Clibtgvoip_CIStateCallback_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    libtgvoip__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_Clibtgvoip_CIStateCallback_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(7) ___x_ABI_Clibtgvoip_CIStateCallbackProxyVtbl = \r\n{\r\n    &__x_ABI_Clibtgvoip_CIStateCallback_ProxyInfo,\r\n    &IID___x_ABI_Clibtgvoip_CIStateCallback,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_CIStateCallback::OnCallStateChanged */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_Clibtgvoip_CIStateCallback_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_Clibtgvoip_CIStateCallbackStubVtbl =\r\n{\r\n    &IID___x_ABI_Clibtgvoip_CIStateCallback,\r\n    &__x_ABI_Clibtgvoip_CIStateCallback_ServerInfo,\r\n    7,\r\n    &__x_ABI_Clibtgvoip_CIStateCallback_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_libtgvoip_0000_0002, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals, ver. 0.0,\r\n   GUID={0xA4312674,0xFAEC,0x3E92,{0xB8,0x4B,0x63,0x1A,0x08,0xBE,0xA9,0x63}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    476,\r\n    510,\r\n    544,\r\n    600,\r\n    642,\r\n    684,\r\n    726,\r\n    782,\r\n    876,\r\n    918,\r\n    960,\r\n    1002\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    libtgvoip__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    libtgvoip__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(18) ___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtualsProxyVtbl = \r\n{\r\n    &__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_ProxyInfo,\r\n    &IID___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::Start */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::Connect */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::SetPublicEndpoints */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::SetNetworkType */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::SetStateCallback */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::SetMicMute */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::SetEncryptionKey */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::SetConfig */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::GetDebugString */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::GetDebugLog */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::GetLastError */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals::GetPreferredRelayID */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtualsStubVtbl =\r\n{\r\n    &IID___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals,\r\n    &__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_ServerInfo,\r\n    18,\r\n    &__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_libtgvoip_0000_0003, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\n\r\n/* Object interface: __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics, ver. 0.0,\r\n   GUID={0xB855DB3B,0x9FD9,0x3215,{0x8F,0x33,0x73,0x17,0x3C,0x2A,0xD6,0xCD}} */\r\n\r\n#pragma code_seg(\".orpc\")\r\nstatic const unsigned short __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_FormatStringOffsetTable[] =\r\n    {\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    (unsigned short) -1,\r\n    1044,\r\n    1086,\r\n    1128\r\n    };\r\n\r\nstatic const MIDL_STUBLESS_PROXY_INFO __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_ProxyInfo =\r\n    {\r\n    &Object_StubDesc,\r\n    libtgvoip__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0\r\n    };\r\n\r\n\r\nstatic const MIDL_SERVER_INFO __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_ServerInfo = \r\n    {\r\n    &Object_StubDesc,\r\n    0,\r\n    libtgvoip__MIDL_ProcFormatString.Format,\r\n    &__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_FormatStringOffsetTable[-3],\r\n    0,\r\n    0,\r\n    0,\r\n    0};\r\nCINTERFACE_PROXY_VTABLE(9) ___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStaticsProxyVtbl = \r\n{\r\n    &__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_ProxyInfo,\r\n    &IID___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics,\r\n    IUnknown_QueryInterface_Proxy,\r\n    IUnknown_AddRef_Proxy,\r\n    IUnknown_Release_Proxy ,\r\n    0 /* IInspectable::GetIids */ ,\r\n    0 /* IInspectable::GetRuntimeClassName */ ,\r\n    0 /* IInspectable::GetTrustLevel */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics::GetVersion */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics::UpdateServerConfig */ ,\r\n    (void *) (INT_PTR) -1 /* __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics::SwitchSpeaker */\r\n};\r\n\r\n\r\nstatic const PRPC_STUB_FUNCTION __x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_table[] =\r\n{\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    STUB_FORWARDING_FUNCTION,\r\n    NdrStubCall2,\r\n    NdrStubCall2,\r\n    NdrStubCall2\r\n};\r\n\r\nCInterfaceStubVtbl ___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStaticsStubVtbl =\r\n{\r\n    &IID___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics,\r\n    &__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_ServerInfo,\r\n    9,\r\n    &__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics_table[-3],\r\n    CStdStubBuffer_DELEGATING_METHODS\r\n};\r\n\r\n\r\n/* Standard interface: __MIDL_itf_libtgvoip_0000_0004, ver. 0.0,\r\n   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */\r\n\r\nstatic const MIDL_STUB_DESC Object_StubDesc = \r\n    {\r\n    0,\r\n    NdrOleAllocate,\r\n    NdrOleFree,\r\n    0,\r\n    0,\r\n    0,\r\n    0,\r\n    0,\r\n    libtgvoip__MIDL_TypeFormatString.Format,\r\n    1, /* -error bounds_check flag */\r\n    0x50002, /* Ndr library version */\r\n    0,\r\n    0x800025b, /* MIDL Version 8.0.603 */\r\n    0,\r\n    UserMarshalRoutines,\r\n    0,  /* notify & notify_flag routine table */\r\n    0x1, /* MIDL flag */\r\n    0, /* cs routines */\r\n    0,   /* proxy/server info */\r\n    0\r\n    };\r\n\r\nconst CInterfaceProxyVtbl * const _libtgvoip_ProxyVtblList[] = \r\n{\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_Clibtgvoip_CIStateCallbackProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStaticsProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtualsProxyVtbl,\r\n    ( CInterfaceProxyVtbl *) &___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtualsProxyVtbl,\r\n    0\r\n};\r\n\r\nconst CInterfaceStubVtbl * const _libtgvoip_StubVtblList[] = \r\n{\r\n    ( CInterfaceStubVtbl *) &___x_ABI_Clibtgvoip_CIStateCallbackStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStaticsStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtualsStubVtbl,\r\n    ( CInterfaceStubVtbl *) &___x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtualsStubVtbl,\r\n    0\r\n};\r\n\r\nPCInterfaceName const _libtgvoip_InterfaceNamesList[] = \r\n{\r\n    \"__x_ABI_Clibtgvoip_CIStateCallback\",\r\n    \"__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperStatics\",\r\n    \"__x_ABI_Clibtgvoip_C____IEndpointPublicNonVirtuals\",\r\n    \"__x_ABI_Clibtgvoip_C____IVoIPControllerWrapperPublicNonVirtuals\",\r\n    0\r\n};\r\n\r\nconst IID *  const _libtgvoip_BaseIIDList[] = \r\n{\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    &IID_IInspectable,\r\n    0\r\n};\r\n\r\n\r\n#define _libtgvoip_CHECK_IID(n)\tIID_GENERIC_CHECK_IID( _libtgvoip, pIID, n)\r\n\r\nint __stdcall _libtgvoip_IID_Lookup( const IID * pIID, int * pIndex )\r\n{\r\n    IID_BS_LOOKUP_SETUP\r\n\r\n    IID_BS_LOOKUP_INITIAL_TEST( _libtgvoip, 4, 2 )\r\n    IID_BS_LOOKUP_NEXT_TEST( _libtgvoip, 1 )\r\n    IID_BS_LOOKUP_RETURN_RESULT( _libtgvoip, 4, *pIndex )\r\n    \r\n}\r\n\r\nconst ExtendedProxyFileInfo libtgvoip_ProxyFileInfo = \r\n{\r\n    (PCInterfaceProxyVtblList *) & _libtgvoip_ProxyVtblList,\r\n    (PCInterfaceStubVtblList *) & _libtgvoip_StubVtblList,\r\n    (const PCInterfaceName * ) & _libtgvoip_InterfaceNamesList,\r\n    (const IID ** ) & _libtgvoip_BaseIIDList,\r\n    & _libtgvoip_IID_Lookup, \r\n    4,\r\n    2,\r\n    0, /* table of [async_uuid] interfaces */\r\n    0, /* Filler1 */\r\n    0, /* Filler2 */\r\n    0  /* Filler3 */\r\n};\r\n#if _MSC_VER >= 1200\r\n#pragma warning(pop)\r\n#endif\r\n\r\n\r\n#endif /* if defined(_ARM_) */\r\n\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/ARM/vc11/lib/OpenCVConfig.cmake",
    "content": "# ===================================================================================\r\n#  The OpenCV CMake configuration file\r\n#\r\n#             ** File generated automatically, do not modify **\r\n#\r\n#  Usage from an external project:\r\n#    In your CMakeLists.txt, add these lines:\r\n#\r\n#    find_package(OpenCV REQUIRED)\r\n#    include_directories(${OpenCV_INCLUDE_DIRS})\r\n#    target_link_libraries(MY_TARGET_NAME ${OpenCV_LIBS})\r\n#\r\n#    Or you can search for specific OpenCV modules:\r\n#\r\n#    find_package(OpenCV REQUIRED core videoio)\r\n#\r\n#    If the module is found then OPENCV_<MODULE>_FOUND is set to TRUE.\r\n#\r\n#    This file will define the following variables:\r\n#      - OpenCV_LIBS                     : The list of all imported targets for OpenCV modules.\r\n#      - OpenCV_INCLUDE_DIRS             : The OpenCV include directories.\r\n#      - OpenCV_COMPUTE_CAPABILITIES     : The version of compute capability.\r\n#      - OpenCV_ANDROID_NATIVE_API_LEVEL : Minimum required level of Android API.\r\n#      - OpenCV_VERSION                  : The version of this OpenCV build: \"3.0.0\"\r\n#      - OpenCV_VERSION_MAJOR            : Major version part of OpenCV_VERSION: \"3\"\r\n#      - OpenCV_VERSION_MINOR            : Minor version part of OpenCV_VERSION: \"0\"\r\n#      - OpenCV_VERSION_PATCH            : Patch version part of OpenCV_VERSION: \"0\"\r\n#      - OpenCV_VERSION_STATUS           : Development status of this build: \"\"\r\n#\r\n#    Advanced variables:\r\n#      - OpenCV_SHARED                   : Use OpenCV as shared library\r\n#      - OpenCV_CONFIG_PATH              : Path to this OpenCVConfig.cmake\r\n#      - OpenCV_INSTALL_PATH             : OpenCV location (not set on Windows)\r\n#      - OpenCV_LIB_COMPONENTS           : Present OpenCV modules list\r\n#      - OpenCV_USE_MANGLED_PATHS        : Mangled OpenCV path flag\r\n#      - OpenCV_MODULES_SUFFIX           : The suffix for OpenCVModules-XXX.cmake file\r\n#\r\n#    Deprecated variables:\r\n#      - OpenCV_VERSION_TWEAK            : Always \"0\"\r\n#\r\n# ===================================================================================\r\n\r\n# Search packages for host system instead of packages for target system.\r\n# in case of cross compilation thess macro should be defined by toolchain file\r\n\r\nif(NOT COMMAND find_host_package)\r\n    macro(find_host_package)\r\n        find_package(${ARGN})\r\n    endmacro()\r\nendif()\r\n\r\nif(NOT COMMAND find_host_program)\r\n    macro(find_host_program)\r\n        find_program(${ARGN})\r\n    endmacro()\r\nendif()\r\n\r\nif(NOT DEFINED OpenCV_MODULES_SUFFIX)\r\n  if(ANDROID)\r\n    string(REPLACE - _ OpenCV_MODULES_SUFFIX \"_${ANDROID_NDK_ABI_NAME}\")\r\n  else()\r\n    set(OpenCV_MODULES_SUFFIX \"\")\r\n  endif()\r\nendif()\r\n\r\nif(\"FALSE\" STREQUAL \"TRUE\") # value is defined by package builder (use STREQUAL to comply new CMake policy CMP0012)\r\n  if(NOT TARGET ippicv)\r\n    if(EXISTS \"${CMAKE_CURRENT_LIST_DIR}/non-existed-path\")\r\n      add_library(ippicv STATIC IMPORTED)\r\n      set_target_properties(ippicv PROPERTIES\r\n        IMPORTED_LINK_INTERFACE_LIBRARIES \"\"\r\n        IMPORTED_LOCATION \"${CMAKE_CURRENT_LIST_DIR}/non-existed-path\"\r\n      )\r\n    endif()\r\n  endif()\r\nendif()\r\n\r\nif(NOT TARGET opencv_core)\r\n  # Extract directory name from full path of the file currently being processed.\r\n  # Note that CMake 2.8.3 introduced CMAKE_CURRENT_LIST_DIR. We reimplement it\r\n  # for older versions of CMake to support these as well.\r\n  if(CMAKE_VERSION VERSION_LESS \"2.8.3\")\r\n    get_filename_component(CMAKE_CURRENT_LIST_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\r\n  endif()\r\n\r\n  include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules${OpenCV_MODULES_SUFFIX}.cmake)\r\nendif()\r\n\r\n# TODO All things below should be reviewed. What is about of moving this code into related modules (special vars/hooks/files)\r\n\r\n# Version Compute Capability from which OpenCV has been compiled is remembered\r\nset(OpenCV_COMPUTE_CAPABILITIES \"\")\r\n\r\nset(OpenCV_CUDA_VERSION )\r\nset(OpenCV_USE_CUBLAS   )\r\nset(OpenCV_USE_CUFFT    )\r\nset(OpenCV_USE_NVCUVID  )\r\n\r\n# Android API level from which OpenCV has been compiled is remembered\r\nif(ANDROID)\r\n  set(OpenCV_ANDROID_NATIVE_API_LEVEL 0)\r\nelse()\r\n  set(OpenCV_ANDROID_NATIVE_API_LEVEL 0)\r\nendif()\r\n\r\n# Some additional settings are required if OpenCV is built as static libs\r\nset(OpenCV_SHARED ON)\r\n\r\n# Enables mangled install paths, that help with side by side installs\r\nset(OpenCV_USE_MANGLED_PATHS FALSE)\r\n\r\n# Extract the directory where *this* file has been installed (determined at cmake run-time)\r\nget_filename_component(OpenCV_CONFIG_PATH \"${CMAKE_CURRENT_LIST_FILE}\" PATH CACHE)\r\n\r\nif(NOT WIN32 OR ANDROID)\r\n  if(ANDROID)\r\n    set(OpenCV_INSTALL_PATH \"${OpenCV_CONFIG_PATH}/../../..\")\r\n  else()\r\n    set(OpenCV_INSTALL_PATH \"${OpenCV_CONFIG_PATH}/../..\")\r\n  endif()\r\n  # Get the absolute path with no ../.. relative marks, to eliminate implicit linker warnings\r\n  if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 2.8)\r\n    get_filename_component(OpenCV_INSTALL_PATH \"${OpenCV_INSTALL_PATH}\" ABSOLUTE)\r\n  else()\r\n    get_filename_component(OpenCV_INSTALL_PATH \"${OpenCV_INSTALL_PATH}\" REALPATH)\r\n  endif()\r\nendif()\r\n\r\n# ======================================================\r\n# Include directories to add to the user project:\r\n# ======================================================\r\n\r\n# Provide the include directories to the caller\r\nset(OpenCV_INCLUDE_DIRS \"${OpenCV_CONFIG_PATH}/include\" \"${OpenCV_CONFIG_PATH}/include/opencv\")\r\n\r\n# ======================================================\r\n# Link directories to add to the user project:\r\n# ======================================================\r\n\r\n# Provide the libs directories to the caller\r\nset(OpenCV_LIB_DIR_OPT  CACHE PATH \"Path where release OpenCV libraries are located\")\r\nset(OpenCV_LIB_DIR_DBG  CACHE PATH \"Path where debug OpenCV libraries are located\")\r\nset(OpenCV_3RDPARTY_LIB_DIR_OPT \"${OpenCV_INSTALL_PATH}/ARM/vc11/staticlib\" CACHE PATH \"Path where release 3rdparty OpenCV dependencies are located\")\r\nset(OpenCV_3RDPARTY_LIB_DIR_DBG \"${OpenCV_INSTALL_PATH}/ARM/vc11/staticlib\" CACHE PATH \"Path where debug 3rdparty OpenCV dependencies are located\")\r\nmark_as_advanced(FORCE OpenCV_LIB_DIR_OPT OpenCV_LIB_DIR_DBG OpenCV_3RDPARTY_LIB_DIR_OPT OpenCV_3RDPARTY_LIB_DIR_DBG OpenCV_CONFIG_PATH)\r\n\r\n# ======================================================\r\n#  Version variables:\r\n# ======================================================\r\nSET(OpenCV_VERSION 3.0.0)\r\nSET(OpenCV_VERSION_MAJOR  3)\r\nSET(OpenCV_VERSION_MINOR  0)\r\nSET(OpenCV_VERSION_PATCH  0)\r\nSET(OpenCV_VERSION_TWEAK  0)\r\nSET(OpenCV_VERSION_STATUS \"\")\r\n\r\n# ====================================================================\r\n# Link libraries: e.g. opencv_core;opencv_imgproc; etc...\r\n# ====================================================================\r\n\r\nSET(OpenCV_LIB_COMPONENTS opencv_videostab;opencv_videoio;opencv_video;opencv_stitching;opencv_shape;opencv_photo;opencv_objdetect;opencv_ml;opencv_imgproc;opencv_imgcodecs;opencv_hal;opencv_flann;opencv_features2d;opencv_core;opencv_calib3d)\r\nSET(OpenCV_WORLD_COMPONENTS )\r\n\r\n# ==============================================================\r\n#  Extra include directories, needed by OpenCV 2 new structure\r\n# ==============================================================\r\nSET(OpenCV2_INCLUDE_DIRS \"\")\r\nif(OpenCV2_INCLUDE_DIRS)\r\n  list(APPEND OpenCV_INCLUDE_DIRS ${OpenCV2_INCLUDE_DIRS})\r\n\r\n  set(OpenCV_ADD_DEBUG_RELEASE TRUE)\r\n  if(OpenCV_ADD_DEBUG_RELEASE)\r\n    set(OpenCV_LIB_DIR_OPT \"${OpenCV_LIB_DIR_OPT}/Release\")\r\n    set(OpenCV_LIB_DIR_DBG \"${OpenCV_LIB_DIR_DBG}/Debug\")\r\n    set(OpenCV_3RDPARTY_LIB_DIR_OPT \"${OpenCV_3RDPARTY_LIB_DIR_OPT}/Release\")\r\n    set(OpenCV_3RDPARTY_LIB_DIR_DBG \"${OpenCV_3RDPARTY_LIB_DIR_DBG}/Debug\")\r\n  endif()\r\nendif()\r\n\r\n# ==============================================================\r\n#  Check OpenCV availability\r\n# ==============================================================\r\nif(ANDROID AND OpenCV_ANDROID_NATIVE_API_LEVEL GREATER ANDROID_NATIVE_API_LEVEL)\r\n  message(FATAL_ERROR \"Minimum required by OpenCV API level is android-${OpenCV_ANDROID_NATIVE_API_LEVEL}\")\r\n  #always FATAL_ERROR because we can't say to the caller that OpenCV is not found\r\n  #http://www.mail-archive.com/cmake@cmake.org/msg37831.html\r\n  if(OpenCV_FIND_REQUIRED)\r\n    message(FATAL_ERROR \"Minimum required by OpenCV API level is android-${OpenCV_ANDROID_NATIVE_API_LEVEL}\")\r\n  elseif(NOT OpenCV_FIND_QUIETLY)\r\n    message(WARNING \"Minimum required by OpenCV API level is android-${OpenCV_ANDROID_NATIVE_API_LEVEL}\")\r\n  endif()\r\n  set(OpenCV_FOUND \"OpenCV_FOUND-NOTFOUND\")\r\n  return()#Android toolchain requires CMake > 2.6\r\nendif()\r\n\r\n# ==============================================================\r\n#  Form list of modules (components) to find\r\n# ==============================================================\r\nif(NOT OpenCV_FIND_COMPONENTS)\r\n  set(OpenCV_FIND_COMPONENTS ${OpenCV_LIB_COMPONENTS})\r\n  list(REMOVE_ITEM OpenCV_FIND_COMPONENTS opencv_java)\r\n  if(GTest_FOUND OR GTEST_FOUND)\r\n    list(REMOVE_ITEM OpenCV_FIND_COMPONENTS opencv_ts)\r\n  endif()\r\nendif()\r\n\r\n# expand short module names and see if requested components exist\r\nset(OpenCV_FIND_COMPONENTS_ \"\")\r\nforeach(__cvcomponent ${OpenCV_FIND_COMPONENTS})\r\n  if(NOT __cvcomponent MATCHES \"^opencv_\")\r\n    set(__cvcomponent opencv_${__cvcomponent})\r\n  endif()\r\n  list(FIND OpenCV_LIB_COMPONENTS ${__cvcomponent} __cvcomponentIdx)\r\n  if(__cvcomponentIdx LESS 0)\r\n    #requested component is not found...\r\n    if(OpenCV_FIND_REQUIRED)\r\n      message(FATAL_ERROR \"${__cvcomponent} is required but was not found\")\r\n    elseif(NOT OpenCV_FIND_QUIETLY)\r\n      message(WARNING \"${__cvcomponent} is required but was not found\")\r\n    endif()\r\n    #indicate that module is NOT found\r\n    string(TOUPPER \"${__cvcomponent}\" __cvcomponentUP)\r\n    set(${__cvcomponentUP}_FOUND \"${__cvcomponentUP}_FOUND-NOTFOUND\")\r\n  else()\r\n    list(APPEND OpenCV_FIND_COMPONENTS_ ${__cvcomponent})\r\n    # Not using list(APPEND) here, because OpenCV_LIBS may not exist yet.\r\n    # Also not clearing OpenCV_LIBS anywhere, so that multiple calls\r\n    # to find_package(OpenCV) with different component lists add up.\r\n    set(OpenCV_LIBS ${OpenCV_LIBS} \"${__cvcomponent}\")\r\n    #indicate that module is found\r\n    string(TOUPPER \"${__cvcomponent}\" __cvcomponentUP)\r\n    set(${__cvcomponentUP}_FOUND 1)\r\n  endif()\r\n  if(OpenCV_SHARED AND \";${OpenCV_WORLD_COMPONENTS};\" MATCHES \";${__cvcomponent};\" AND NOT TARGET ${__cvcomponent})\r\n    get_target_property(__implib_dbg opencv_world IMPORTED_IMPLIB_DEBUG)\r\n    get_target_property(__implib_release opencv_world  IMPORTED_IMPLIB_RELEASE)\r\n    get_target_property(__location_dbg opencv_world IMPORTED_LOCATION_DEBUG)\r\n    get_target_property(__location_release opencv_world  IMPORTED_LOCATION_RELEASE)\r\n    add_library(${__cvcomponent} SHARED IMPORTED)\r\n    if(__location_dbg)\r\n      set_property(TARGET ${__cvcomponent} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\n      set_target_properties(${__cvcomponent} PROPERTIES\r\n        IMPORTED_IMPLIB_DEBUG \"${__implib_dbg}\"\r\n        IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"\"\r\n        IMPORTED_LOCATION_DEBUG \"${__location_dbg}\"\r\n      )\r\n    endif()\r\n    if(__location_release)\r\n      set_property(TARGET ${__cvcomponent} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\n      set_target_properties(${__cvcomponent} PROPERTIES\r\n        IMPORTED_IMPLIB_RELEASE \"${__implib_release}\"\r\n        IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"\"\r\n        IMPORTED_LOCATION_RELEASE \"${__location_release}\"\r\n      )\r\n    endif()\r\n  endif()\r\nendforeach()\r\nset(OpenCV_FIND_COMPONENTS ${OpenCV_FIND_COMPONENTS_})\r\n\r\n# ==============================================================\r\n#  Resolve dependencies\r\n# ==============================================================\r\nif(OpenCV_USE_MANGLED_PATHS)\r\n  set(OpenCV_LIB_SUFFIX \".${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH}\")\r\nelse()\r\n  set(OpenCV_LIB_SUFFIX \"\")\r\nendif()\r\n\r\nforeach(__opttype OPT DBG)\r\n  SET(OpenCV_LIBS_${__opttype} \"${OpenCV_LIBS}\")\r\n  SET(OpenCV_EXTRA_LIBS_${__opttype} \"\")\r\n\r\n  # CUDA\r\n  if(OpenCV_CUDA_VERSION)\r\n    if(NOT CUDA_FOUND)\r\n      find_host_package(CUDA ${OpenCV_CUDA_VERSION} EXACT REQUIRED)\r\n    else()\r\n      if(NOT CUDA_VERSION_STRING VERSION_EQUAL OpenCV_CUDA_VERSION)\r\n        message(FATAL_ERROR \"OpenCV static library was compiled with CUDA ${OpenCV_CUDA_VERSION} support. Please, use the same version or rebuild OpenCV with CUDA ${CUDA_VERSION_STRING}\")\r\n      endif()\r\n    endif()\r\n\r\n    set(OpenCV_CUDA_LIBS_ABSPATH ${CUDA_LIBRARIES})\r\n\r\n    if(${CUDA_VERSION} VERSION_LESS \"5.5\")\r\n      list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_npp_LIBRARY})\r\n    else()\r\n      find_cuda_helper_libs(nppc)\r\n      find_cuda_helper_libs(nppi)\r\n      find_cuda_helper_libs(npps)\r\n      list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nppc_LIBRARY} ${CUDA_nppi_LIBRARY} ${CUDA_npps_LIBRARY})\r\n    endif()\r\n\r\n    if(OpenCV_USE_CUBLAS)\r\n      list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_CUBLAS_LIBRARIES})\r\n    endif()\r\n\r\n    if(OpenCV_USE_CUFFT)\r\n      list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_CUFFT_LIBRARIES})\r\n    endif()\r\n\r\n    if(OpenCV_USE_NVCUVID)\r\n      list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nvcuvid_LIBRARIES})\r\n    endif()\r\n\r\n    if(WIN32)\r\n      list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nvcuvenc_LIBRARIES})\r\n    endif()\r\n\r\n    set(OpenCV_CUDA_LIBS_RELPATH \"\")\r\n    foreach(l ${OpenCV_CUDA_LIBS_ABSPATH})\r\n      get_filename_component(_tmp ${l} PATH)\r\n      if(NOT ${_tmp} MATCHES \"-Wl.*\")\r\n          list(APPEND OpenCV_CUDA_LIBS_RELPATH ${_tmp})\r\n      endif()\r\n    endforeach()\r\n\r\n    list(REMOVE_DUPLICATES OpenCV_CUDA_LIBS_RELPATH)\r\n    link_directories(${OpenCV_CUDA_LIBS_RELPATH})\r\n  endif()\r\nendforeach()\r\n\r\n# ==============================================================\r\n# Compatibility stuff\r\n# ==============================================================\r\nif(CMAKE_BUILD_TYPE MATCHES \"Debug\")\r\n  SET(OpenCV_LIB_DIR ${OpenCV_LIB_DIR_DBG} ${OpenCV_3RDPARTY_LIB_DIR_DBG})\r\nelse()\r\n  SET(OpenCV_LIB_DIR ${OpenCV_LIB_DIR_OPT} ${OpenCV_3RDPARTY_LIB_DIR_OPT})\r\nendif()\r\nset(OpenCV_LIBRARIES ${OpenCV_LIBS})\r\n\r\nif(CMAKE_CROSSCOMPILING AND OpenCV_SHARED AND (CMAKE_SYSTEM_NAME MATCHES \"Linux\"))\r\n  foreach(dir ${OpenCV_LIB_DIR})\r\n    set(CMAKE_EXE_LINKER_FLAGS    \"${CMAKE_EXE_LINKER_FLAGS}    -Wl,-rpath-link,${dir}\")\r\n    set(CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath-link,${dir}\")\r\n    set(CMAKE_MODULE_LINKER_FLAGS \"${CMAKE_MODULE_LINKER_FLAGS} -Wl,-rpath-link,${dir}\")\r\n  endforeach()\r\nendif()\r\n\r\n\r\n\r\n#\r\n# Some macroses for samples\r\n#\r\nmacro(ocv_check_dependencies)\r\n  set(OCV_DEPENDENCIES_FOUND TRUE)\r\n  foreach(d ${ARGN})\r\n    if(NOT TARGET ${d})\r\n      message(WARNING \"OpenCV: Can't resolve dependency: ${d}\")\r\n      set(OCV_DEPENDENCIES_FOUND FALSE)\r\n      break()\r\n    endif()\r\n  endforeach()\r\nendmacro()\r\n\r\n# adds include directories in such way that directories from the OpenCV source tree go first\r\nfunction(ocv_include_directories)\r\n  set(__add_before \"\")\r\n  file(TO_CMAKE_PATH \"${OpenCV_DIR}\" __baseDir)\r\n  foreach(dir ${ARGN})\r\n    get_filename_component(__abs_dir \"${dir}\" ABSOLUTE)\r\n    if(\"${__abs_dir}\" MATCHES \"^${__baseDir}\")\r\n      list(APPEND __add_before \"${dir}\")\r\n    else()\r\n      include_directories(AFTER SYSTEM \"${dir}\")\r\n    endif()\r\n  endforeach()\r\n  include_directories(BEFORE ${__add_before})\r\nendfunction()\r\n\r\nmacro(ocv_include_modules)\r\n  include_directories(BEFORE \"${OpenCV_INCLUDE_DIRS}\")\r\nendmacro()\r\n\r\nmacro(ocv_include_modules_recurse)\r\n  include_directories(BEFORE \"${OpenCV_INCLUDE_DIRS}\")\r\nendmacro()\r\n\r\nmacro(ocv_target_link_libraries)\r\n  target_link_libraries(${ARGN})\r\nendmacro()\r\n\r\n# remove all matching elements from the list\r\nmacro(ocv_list_filterout lst regex)\r\n  foreach(item ${${lst}})\r\n    if(item MATCHES \"${regex}\")\r\n      list(REMOVE_ITEM ${lst} \"${item}\")\r\n    endif()\r\n  endforeach()\r\nendmacro()\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/ARM/vc11/lib/OpenCVModules-debug.cmake",
    "content": "#----------------------------------------------------------------\r\n# Generated CMake target import file for configuration \"Debug\".\r\n#----------------------------------------------------------------\r\n\r\n# Commands may need to know the format version.\r\nset(CMAKE_IMPORT_FILE_VERSION 1)\r\n\r\n# Import target \"opencv_hal\" for configuration \"Debug\"\r\nset_property(TARGET opencv_hal APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_hal PROPERTIES\r\n  IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG \"CXX\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_hal300d.lib\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_hal )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_hal \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_hal300d.lib\" )\r\n\r\n# Import target \"opencv_core\" for configuration \"Debug\"\r\nset_property(TARGET opencv_core APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_core PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_core300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_core300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_core )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_core \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_core300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_core300d.dll\" )\r\n\r\n# Import target \"opencv_flann\" for configuration \"Debug\"\r\nset_property(TARGET opencv_flann APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_flann PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_flann300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_flann300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_flann )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_flann \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_flann300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_flann300d.dll\" )\r\n\r\n# Import target \"opencv_imgproc\" for configuration \"Debug\"\r\nset_property(TARGET opencv_imgproc APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_imgproc PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_imgproc300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_imgproc300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_imgproc )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_imgproc \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_imgproc300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_imgproc300d.dll\" )\r\n\r\n# Import target \"opencv_ml\" for configuration \"Debug\"\r\nset_property(TARGET opencv_ml APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_ml PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_ml300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_ml300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_ml )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_ml \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_ml300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_ml300d.dll\" )\r\n\r\n# Import target \"opencv_objdetect\" for configuration \"Debug\"\r\nset_property(TARGET opencv_objdetect APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_objdetect PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_objdetect300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core;opencv_imgproc;opencv_ml\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_objdetect300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_objdetect )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_objdetect \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_objdetect300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_objdetect300d.dll\" )\r\n\r\n# Import target \"opencv_photo\" for configuration \"Debug\"\r\nset_property(TARGET opencv_photo APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_photo PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_photo300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core;opencv_imgproc\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_photo300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_photo )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_photo \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_photo300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_photo300d.dll\" )\r\n\r\n# Import target \"opencv_video\" for configuration \"Debug\"\r\nset_property(TARGET opencv_video APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_video PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_video300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core;opencv_imgproc\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_video300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_video )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_video \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_video300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_video300d.dll\" )\r\n\r\n# Import target \"opencv_features2d\" for configuration \"Debug\"\r\nset_property(TARGET opencv_features2d APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_features2d PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_features2d300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core;opencv_flann;opencv_imgproc;opencv_ml\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_features2d300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_features2d )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_features2d \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_features2d300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_features2d300d.dll\" )\r\n\r\n# Import target \"opencv_imgcodecs\" for configuration \"Debug\"\r\nset_property(TARGET opencv_imgcodecs APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_imgcodecs PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_imgcodecs300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core;opencv_imgproc\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_imgcodecs300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_imgcodecs )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_imgcodecs \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_imgcodecs300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_imgcodecs300d.dll\" )\r\n\r\n# Import target \"opencv_shape\" for configuration \"Debug\"\r\nset_property(TARGET opencv_shape APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_shape PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_shape300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core;opencv_imgproc;opencv_video\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_shape300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_shape )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_shape \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_shape300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_shape300d.dll\" )\r\n\r\n# Import target \"opencv_videoio\" for configuration \"Debug\"\r\nset_property(TARGET opencv_videoio APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_videoio PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_videoio300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core;opencv_imgproc;opencv_imgcodecs\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_videoio300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_videoio )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_videoio \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_videoio300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_videoio300d.dll\" )\r\n\r\n# Import target \"opencv_calib3d\" for configuration \"Debug\"\r\nset_property(TARGET opencv_calib3d APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_calib3d PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_calib3d300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core;opencv_flann;opencv_imgproc;opencv_ml;opencv_features2d\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_calib3d300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_calib3d )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_calib3d \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_calib3d300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_calib3d300d.dll\" )\r\n\r\n# Import target \"opencv_stitching\" for configuration \"Debug\"\r\nset_property(TARGET opencv_stitching APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_stitching PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_stitching300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core;opencv_flann;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_features2d;opencv_calib3d\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_stitching300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_stitching )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_stitching \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_stitching300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_stitching300d.dll\" )\r\n\r\n# Import target \"opencv_videostab\" for configuration \"Debug\"\r\nset_property(TARGET opencv_videostab APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\r\nset_target_properties(opencv_videostab PROPERTIES\r\n  IMPORTED_IMPLIB_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_videostab300d.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG \"opencv_hal;opencv_core;opencv_flann;opencv_imgproc;opencv_ml;opencv_photo;opencv_video;opencv_features2d;opencv_imgcodecs;opencv_videoio;opencv_calib3d\"\r\n  IMPORTED_LOCATION_DEBUG \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_videostab300d.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_videostab )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_videostab \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_videostab300d.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_videostab300d.dll\" )\r\n\r\n# Commands beyond this point should not need to know the version.\r\nset(CMAKE_IMPORT_FILE_VERSION)\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/ARM/vc11/lib/OpenCVModules-release.cmake",
    "content": "#----------------------------------------------------------------\r\n# Generated CMake target import file for configuration \"Release\".\r\n#----------------------------------------------------------------\r\n\r\n# Commands may need to know the format version.\r\nset(CMAKE_IMPORT_FILE_VERSION 1)\r\n\r\n# Import target \"opencv_hal\" for configuration \"Release\"\r\nset_property(TARGET opencv_hal APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_hal PROPERTIES\r\n  IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE \"CXX\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_hal300.lib\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_hal )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_hal \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_hal300.lib\" )\r\n\r\n# Import target \"opencv_core\" for configuration \"Release\"\r\nset_property(TARGET opencv_core APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_core PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_core300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_core300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_core )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_core \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_core300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_core300.dll\" )\r\n\r\n# Import target \"opencv_flann\" for configuration \"Release\"\r\nset_property(TARGET opencv_flann APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_flann PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_flann300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal;opencv_core\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_flann300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_flann )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_flann \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_flann300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_flann300.dll\" )\r\n\r\n# Import target \"opencv_imgproc\" for configuration \"Release\"\r\nset_property(TARGET opencv_imgproc APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_imgproc PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_imgproc300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal;opencv_core\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_imgproc300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_imgproc )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_imgproc \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_imgproc300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_imgproc300.dll\" )\r\n\r\n# Import target \"opencv_ml\" for configuration \"Release\"\r\nset_property(TARGET opencv_ml APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_ml PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_ml300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal;opencv_core\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_ml300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_ml )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_ml \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_ml300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_ml300.dll\" )\r\n\r\n# Import target \"opencv_objdetect\" for configuration \"Release\"\r\nset_property(TARGET opencv_objdetect APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_objdetect PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_objdetect300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal;opencv_core;opencv_imgproc;opencv_ml\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_objdetect300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_objdetect )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_objdetect \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_objdetect300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_objdetect300.dll\" )\r\n\r\n# Import target \"opencv_photo\" for configuration \"Release\"\r\nset_property(TARGET opencv_photo APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_photo PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_photo300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal;opencv_core;opencv_imgproc\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_photo300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_photo )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_photo \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_photo300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_photo300.dll\" )\r\n\r\n# Import target \"opencv_video\" for configuration \"Release\"\r\nset_property(TARGET opencv_video APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_video PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_video300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal;opencv_core;opencv_imgproc\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_video300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_video )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_video \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_video300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_video300.dll\" )\r\n\r\n# Import target \"opencv_features2d\" for configuration \"Release\"\r\nset_property(TARGET opencv_features2d APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_features2d PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_features2d300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal;opencv_core;opencv_flann;opencv_imgproc;opencv_ml\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_features2d300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_features2d )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_features2d \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_features2d300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_features2d300.dll\" )\r\n\r\n# Import target \"opencv_imgcodecs\" for configuration \"Release\"\r\nset_property(TARGET opencv_imgcodecs APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_imgcodecs PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_imgcodecs300.lib\"\r\n  IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE \"opencv_core;opencv_imgproc\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_imgcodecs300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_imgcodecs )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_imgcodecs \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_imgcodecs300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_imgcodecs300.dll\" )\r\n\r\n# Import target \"opencv_shape\" for configuration \"Release\"\r\nset_property(TARGET opencv_shape APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_shape PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_shape300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal;opencv_core;opencv_imgproc;opencv_video\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_shape300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_shape )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_shape \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_shape300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_shape300.dll\" )\r\n\r\n# Import target \"opencv_videoio\" for configuration \"Release\"\r\nset_property(TARGET opencv_videoio APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_videoio PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_videoio300.lib\"\r\n  IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE \"opencv_core;opencv_imgproc;opencv_imgcodecs\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_videoio300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_videoio )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_videoio \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_videoio300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_videoio300.dll\" )\r\n\r\n# Import target \"opencv_calib3d\" for configuration \"Release\"\r\nset_property(TARGET opencv_calib3d APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_calib3d PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_calib3d300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal;opencv_core;opencv_flann;opencv_imgproc;opencv_ml;opencv_features2d\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_calib3d300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_calib3d )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_calib3d \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_calib3d300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_calib3d300.dll\" )\r\n\r\n# Import target \"opencv_stitching\" for configuration \"Release\"\r\nset_property(TARGET opencv_stitching APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_stitching PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_stitching300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal;opencv_core;opencv_flann;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_features2d;opencv_calib3d\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_stitching300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_stitching )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_stitching \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_stitching300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_stitching300.dll\" )\r\n\r\n# Import target \"opencv_videostab\" for configuration \"Release\"\r\nset_property(TARGET opencv_videostab APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\r\nset_target_properties(opencv_videostab PROPERTIES\r\n  IMPORTED_IMPLIB_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_videostab300.lib\"\r\n  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE \"opencv_hal;opencv_core;opencv_flann;opencv_imgproc;opencv_ml;opencv_photo;opencv_video;opencv_features2d;opencv_imgcodecs;opencv_videoio;opencv_calib3d\"\r\n  IMPORTED_LOCATION_RELEASE \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_videostab300.dll\"\r\n  )\r\n\r\nlist(APPEND _IMPORT_CHECK_TARGETS opencv_videostab )\r\nlist(APPEND _IMPORT_CHECK_FILES_FOR_opencv_videostab \"${_IMPORT_PREFIX}/ARM/vc11/lib/opencv_videostab300.lib\" \"${_IMPORT_PREFIX}/ARM/vc11/bin/opencv_videostab300.dll\" )\r\n\r\n# Commands beyond this point should not need to know the version.\r\nset(CMAKE_IMPORT_FILE_VERSION)\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/ARM/vc11/lib/OpenCVModules.cmake",
    "content": "# Generated by CMake\r\n\r\nif(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\r\n   message(FATAL_ERROR \"CMake >= 2.6.0 required\")\r\nendif()\r\ncmake_policy(PUSH)\r\ncmake_policy(VERSION 2.6)\r\n#----------------------------------------------------------------\r\n# Generated CMake target import file.\r\n#----------------------------------------------------------------\r\n\r\n# Commands may need to know the format version.\r\nset(CMAKE_IMPORT_FILE_VERSION 1)\r\n\r\n# Protect against multiple inclusion, which would fail when already imported targets are added once more.\r\nset(_targetsDefined)\r\nset(_targetsNotDefined)\r\nset(_expectedTargets)\r\nforeach(_expectedTarget opencv_hal opencv_core opencv_flann opencv_imgproc opencv_ml opencv_objdetect opencv_photo opencv_video opencv_features2d opencv_imgcodecs opencv_shape opencv_videoio opencv_calib3d opencv_stitching opencv_videostab)\r\n  list(APPEND _expectedTargets ${_expectedTarget})\r\n  if(NOT TARGET ${_expectedTarget})\r\n    list(APPEND _targetsNotDefined ${_expectedTarget})\r\n  endif()\r\n  if(TARGET ${_expectedTarget})\r\n    list(APPEND _targetsDefined ${_expectedTarget})\r\n  endif()\r\nendforeach()\r\nif(\"${_targetsDefined}\" STREQUAL \"${_expectedTargets}\")\r\n  unset(_targetsDefined)\r\n  unset(_targetsNotDefined)\r\n  unset(_expectedTargets)\r\n  set(CMAKE_IMPORT_FILE_VERSION)\r\n  cmake_policy(POP)\r\n  return()\r\nendif()\r\nif(NOT \"${_targetsDefined}\" STREQUAL \"\")\r\n  message(FATAL_ERROR \"Some (but not all) targets in this export set were already defined.\\nTargets Defined: ${_targetsDefined}\\nTargets not yet defined: ${_targetsNotDefined}\\n\")\r\nendif()\r\nunset(_targetsDefined)\r\nunset(_targetsNotDefined)\r\nunset(_expectedTargets)\r\n\r\n\r\n# Compute the installation prefix relative to this file.\r\nget_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\r\nget_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)\r\nget_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)\r\nget_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)\r\nif(_IMPORT_PREFIX STREQUAL \"/\")\r\n  set(_IMPORT_PREFIX \"\")\r\nendif()\r\n\r\n# Create imported target opencv_hal\r\nadd_library(opencv_hal STATIC IMPORTED)\r\n\r\n# Create imported target opencv_core\r\nadd_library(opencv_core SHARED IMPORTED)\r\n\r\n# Create imported target opencv_flann\r\nadd_library(opencv_flann SHARED IMPORTED)\r\n\r\n# Create imported target opencv_imgproc\r\nadd_library(opencv_imgproc SHARED IMPORTED)\r\n\r\n# Create imported target opencv_ml\r\nadd_library(opencv_ml SHARED IMPORTED)\r\n\r\n# Create imported target opencv_objdetect\r\nadd_library(opencv_objdetect SHARED IMPORTED)\r\n\r\n# Create imported target opencv_photo\r\nadd_library(opencv_photo SHARED IMPORTED)\r\n\r\n# Create imported target opencv_video\r\nadd_library(opencv_video SHARED IMPORTED)\r\n\r\n# Create imported target opencv_features2d\r\nadd_library(opencv_features2d SHARED IMPORTED)\r\n\r\n# Create imported target opencv_imgcodecs\r\nadd_library(opencv_imgcodecs SHARED IMPORTED)\r\n\r\n# Create imported target opencv_shape\r\nadd_library(opencv_shape SHARED IMPORTED)\r\n\r\n# Create imported target opencv_videoio\r\nadd_library(opencv_videoio SHARED IMPORTED)\r\n\r\n# Create imported target opencv_calib3d\r\nadd_library(opencv_calib3d SHARED IMPORTED)\r\n\r\n# Create imported target opencv_stitching\r\nadd_library(opencv_stitching SHARED IMPORTED)\r\n\r\n# Create imported target opencv_videostab\r\nadd_library(opencv_videostab SHARED IMPORTED)\r\n\r\n# Load information for each installed configuration.\r\nget_filename_component(_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\r\nfile(GLOB CONFIG_FILES \"${_DIR}/OpenCVModules-*.cmake\")\r\nforeach(f ${CONFIG_FILES})\r\n  include(${f})\r\nendforeach()\r\n\r\n# Cleanup temporary variables.\r\nset(_IMPORT_PREFIX)\r\n\r\n# Loop over all imported files and verify that they actually exist\r\nforeach(target ${_IMPORT_CHECK_TARGETS} )\r\n  foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )\r\n    if(NOT EXISTS \"${file}\" )\r\n      message(FATAL_ERROR \"The imported target \\\"${target}\\\" references the file\r\n   \\\"${file}\\\"\r\nbut this file does not exist.  Possible reasons include:\r\n* The file was deleted, renamed, or moved to another location.\r\n* An install or uninstall procedure did not complete successfully.\r\n* The installation package was faulty and contained\r\n   \\\"${CMAKE_CURRENT_LIST_FILE}\\\"\r\nbut not all the files it references.\r\n\")\r\n    endif()\r\n  endforeach()\r\n  unset(_IMPORT_CHECK_FILES_FOR_${target})\r\nendforeach()\r\nunset(_IMPORT_CHECK_TARGETS)\r\n\r\n# This file does not depend on other imported targets which have\r\n# been exported from the same project but in a separate export set.\r\n\r\n# Commands beyond this point should not need to know the version.\r\nset(CMAKE_IMPORT_FILE_VERSION)\r\ncmake_policy(POP)\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/LICENSE",
    "content": "By downloading, copying, installing or using the software you agree to this license.\nIf you do not agree to this license, do not download, install,\ncopy or use the software.\n\n\n                          License Agreement\n               For Open Source Computer Vision Library\n                       (3-clause BSD License)\n\nCopyright (C) 2000-2015, Intel Corporation, all rights reserved.\nCopyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\nCopyright (C) 2009-2015, NVIDIA Corporation, all rights reserved.\nCopyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.\nCopyright (C) 2015, OpenCV Foundation, all rights reserved.\nCopyright (C) 2015, Itseez Inc., all rights reserved.\nThird party copyrights are property of their respective owners.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice,\n    this list of conditions and the following disclaimer.\n\n  * 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  * Neither the names of the copyright holders nor the names of the contributors\n    may be used to endorse or promote products derived from this software\n    without specific prior written permission.\n\nThis software is provided by the copyright holders and contributors \"as is\" and\nany express or implied warranties, including, but not limited to, the implied\nwarranties of merchantability and fitness for a particular purpose are disclaimed.\nIn no event shall copyright holders or contributors be liable for any direct,\nindirect, incidental, special, exemplary, or consequential damages\n(including, but not limited to, procurement of substitute goods or services;\nloss of use, data, or profits; or business interruption) however caused\nand on any theory of liability, whether in contract, strict liability,\nor tort (including negligence or otherwise) arising in any way out of\nthe use of this software, even if advised of the possibility of such damage.\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/OpenCVConfig-version.cmake",
    "content": "set(OpenCV_VERSION 3.0.0)\r\nset(PACKAGE_VERSION ${OpenCV_VERSION})\r\n\r\nset(PACKAGE_VERSION_EXACT False)\r\nset(PACKAGE_VERSION_COMPATIBLE False)\r\n\r\nif(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)\r\n  set(PACKAGE_VERSION_EXACT True)\r\n  set(PACKAGE_VERSION_COMPATIBLE True)\r\nendif()\r\n\r\nif(PACKAGE_FIND_VERSION VERSION_LESS PACKAGE_VERSION)\r\n  set(PACKAGE_VERSION_COMPATIBLE True)\r\nendif()\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/OpenCVConfig.cmake",
    "content": "# ===================================================================================\n#  The OpenCV CMake configuration file\n#\n#             ** File generated automatically, do not modify **\n#\n#  Usage from an external project:\n#    In your CMakeLists.txt, add these lines:\n#\n#    FIND_PACKAGE(OpenCV REQUIRED)\n#    TARGET_LINK_LIBRARIES(MY_TARGET_NAME ${OpenCV_LIBS})\n#\n#    Or you can search for specific OpenCV modules:\n#\n#    FIND_PACKAGE(OpenCV REQUIRED core imgcodecs)\n#\n#    If the module is found then OPENCV_<MODULE>_FOUND is set to TRUE.\n#\n#    This file will define the following variables:\n#      - OpenCV_LIBS                     : The list of libraries to link against.\n#      - OpenCV_LIB_DIR                  : The directory(es) where lib files are. Calling LINK_DIRECTORIES\n#                                          with this path is NOT needed.\n#      - OpenCV_INCLUDE_DIRS             : The OpenCV include directories.\n#      - OpenCV_COMPUTE_CAPABILITIES     : The version of compute capability\n#      - OpenCV_ANDROID_NATIVE_API_LEVEL : Minimum required level of Android API\n#      - OpenCV_VERSION                  : The version of this OpenCV build. Example: \"2.4.0\"\n#      - OpenCV_VERSION_MAJOR            : Major version part of OpenCV_VERSION. Example: \"2\"\n#      - OpenCV_VERSION_MINOR            : Minor version part of OpenCV_VERSION. Example: \"4\"\n#      - OpenCV_VERSION_PATCH            : Patch version part of OpenCV_VERSION. Example: \"0\"\n#\n#    Advanced variables:\n#      - OpenCV_SHARED\n#      - OpenCV_CONFIG_PATH\n#      - OpenCV_LIB_COMPONENTS\n#\n# ===================================================================================\n#\n#    Windows pack specific options:\n#      - OpenCV_STATIC\n#      - OpenCV_CUDA\n\nif(CMAKE_VERSION VERSION_GREATER 2.6)\n  get_property(OpenCV_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)\n  if(NOT \";${OpenCV_LANGUAGES};\" MATCHES \";CXX;\")\n    enable_language(CXX)\n  endif()\nendif()\n\nif(NOT DEFINED OpenCV_STATIC)\n  # look for global setting\n  if(BUILD_SHARED_LIBS)\n    set(OpenCV_STATIC OFF)\n  else()\n    set(OpenCV_STATIC ON)\n  endif()\nendif()\n\nif(NOT DEFINED OpenCV_CUDA)\n  # if user' app uses CUDA, then it probably wants CUDA-enabled OpenCV binaries\n  if(CUDA_FOUND)\n    set(OpenCV_CUDA ON)\n  endif()\nendif()\n\nif(MSVC)\n  if(CMAKE_CL_64)\n    set(OpenCV_ARCH x64)\n    set(OpenCV_TBB_ARCH intel64)\n  elseif((CMAKE_GENERATOR MATCHES \"ARM\") OR (\"${arch_hint}\" STREQUAL \"ARM\") OR (CMAKE_VS_EFFECTIVE_PLATFORMS MATCHES \"ARM|arm\"))\n    # see Modules/CmakeGenericSystem.cmake\n    set(OpenCV_ARCH ARM)\n  else()\n    set(OpenCV_ARCH x86)\n    set(OpenCV_TBB_ARCH ia32)\n  endif()\n  if(MSVC_VERSION EQUAL 1400)\n    set(OpenCV_RUNTIME vc8)\n  elseif(MSVC_VERSION EQUAL 1500)\n    set(OpenCV_RUNTIME vc9)\n  elseif(MSVC_VERSION EQUAL 1600)\n    set(OpenCV_RUNTIME vc10)\n  elseif(MSVC_VERSION EQUAL 1700)\n    set(OpenCV_RUNTIME vc11)\n  elseif(MSVC_VERSION EQUAL 1800)\n    set(OpenCV_RUNTIME vc12)\n  elseif(MSVC_VERSION EQUAL 1900)\n    set(OpenCV_RUNTIME vc14)\n  endif()\nelseif(MINGW)\n  set(OpenCV_RUNTIME mingw)\n\n  execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine\n                  OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE\n                  OUTPUT_STRIP_TRAILING_WHITESPACE)\n  if(OPENCV_GCC_TARGET_MACHINE MATCHES \"amd64|x86_64|AMD64\")\n    set(MINGW64 1)\n    set(OpenCV_ARCH x64)\n  else()\n    set(OpenCV_ARCH x86)\n  endif()\nendif()\n\nif(CMAKE_VERSION VERSION_GREATER 2.6.2)\n  unset(OpenCV_CONFIG_PATH CACHE)\nendif()\n\nif(NOT OpenCV_FIND_QUIETLY)\n  message(STATUS \"OpenCV ARCH: ${OpenCV_ARCH}\")\n  message(STATUS \"OpenCV RUNTIME: ${OpenCV_RUNTIME}\")\n  message(STATUS \"OpenCV STATIC: ${OpenCV_STATIC}\")\nendif()\n\nget_filename_component(OpenCV_CONFIG_PATH \"${CMAKE_CURRENT_LIST_FILE}\" PATH CACHE)\nif(OpenCV_RUNTIME AND OpenCV_ARCH)\n  if(OpenCV_STATIC AND EXISTS \"${OpenCV_CONFIG_PATH}/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib/OpenCVConfig.cmake\")\n    if(OpenCV_CUDA AND EXISTS \"${OpenCV_CONFIG_PATH}/gpu/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib/OpenCVConfig.cmake\")\n      set(OpenCV_LIB_PATH \"${OpenCV_CONFIG_PATH}/gpu/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib\")\n    else()\n      set(OpenCV_LIB_PATH \"${OpenCV_CONFIG_PATH}/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib\")\n    endif()\n  elseif(EXISTS \"${OpenCV_CONFIG_PATH}/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVConfig.cmake\")\n    if(OpenCV_CUDA AND EXISTS \"${OpenCV_CONFIG_PATH}/gpu/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVConfig.cmake\")\n      set(OpenCV_LIB_PATH \"${OpenCV_CONFIG_PATH}/gpu/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib\")\n    else()\n      set(OpenCV_LIB_PATH \"${OpenCV_CONFIG_PATH}/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib\")\n    endif()\n  endif()\nendif()\n\nif(OpenCV_LIB_PATH AND EXISTS \"${OpenCV_LIB_PATH}/OpenCVConfig.cmake\")\n  set(OpenCV_LIB_DIR_OPT \"${OpenCV_LIB_PATH}\" CACHE PATH \"Path where release OpenCV libraries are located\" FORCE)\n  set(OpenCV_LIB_DIR_DBG \"${OpenCV_LIB_PATH}\" CACHE PATH \"Path where debug OpenCV libraries are located\" FORCE)\n  set(OpenCV_3RDPARTY_LIB_DIR_OPT \"${OpenCV_LIB_PATH}\" CACHE PATH \"Path where release 3rdparty OpenCV dependencies are located\" FORCE)\n  set(OpenCV_3RDPARTY_LIB_DIR_DBG \"${OpenCV_LIB_PATH}\" CACHE PATH \"Path where debug 3rdparty OpenCV dependencies are located\" FORCE)\n\n  include(\"${OpenCV_LIB_PATH}/OpenCVConfig.cmake\")\n\n  if(OpenCV_CUDA)\n    set(_OpenCV_LIBS \"\")\n    foreach(_lib ${OpenCV_LIBS})\n      string(REPLACE \"${OpenCV_CONFIG_PATH}/gpu/${OpenCV_ARCH}/${OpenCV_RUNTIME}\" \"${OpenCV_CONFIG_PATH}/${OpenCV_ARCH}/${OpenCV_RUNTIME}\" _lib2 \"${_lib}\")\n      if(NOT EXISTS \"${_lib}\" AND EXISTS \"${_lib2}\")\n        list(APPEND _OpenCV_LIBS \"${_lib2}\")\n      else()\n        list(APPEND _OpenCV_LIBS \"${_lib}\")\n      endif()\n    endforeach()\n    set(OpenCV_LIBS ${_OpenCV_LIBS})\n  endif()\n  set(OpenCV_FOUND TRUE CACHE BOOL \"\" FORCE)\n  set(OPENCV_FOUND TRUE CACHE BOOL \"\" FORCE)\n\n  if(NOT OpenCV_FIND_QUIETLY)\n    message(STATUS \"Found OpenCV ${OpenCV_VERSION} in ${OpenCV_LIB_PATH}\")\n    if(NOT OpenCV_LIB_PATH MATCHES \"/staticlib\")\n      get_filename_component(_OpenCV_LIB_PATH \"${OpenCV_LIB_PATH}/../bin\" ABSOLUTE)\n      file(TO_NATIVE_PATH \"${_OpenCV_LIB_PATH}\" _OpenCV_LIB_PATH)\n      message(STATUS \"You might need to add ${_OpenCV_LIB_PATH} to your PATH to be able to run your applications.\")\n      if(OpenCV_LIB_PATH MATCHES \"/gpu/\")\n        string(REPLACE \"\\\\gpu\" \"\" _OpenCV_LIB_PATH2 \"${_OpenCV_LIB_PATH}\")\n        message(STATUS \"GPU support is enabled so you might also need ${_OpenCV_LIB_PATH2} in your PATH (it must go after the ${_OpenCV_LIB_PATH}).\")\n      endif()\n    endif()\n  endif()\nelse()\n  if(NOT OpenCV_FIND_QUIETLY)\n    message(WARNING\n\"Found OpenCV Windows Pack but it has no binaries compatible with your configuration.\nYou should manually point CMake variable OpenCV_DIR to your build of OpenCV library.\"\n    )\n  endif()\n  set(OpenCV_FOUND FALSE CACHE BOOL \"\" FORCE)\n  set(OPENCV_FOUND FALSE CACHE BOOL \"\" FORCE)\nendif()\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_eye.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    Stump-based 20x20 frontal eye detector.\n    Created by Shameem Hameed (http://umich.edu/~shameem)\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's 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   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>20</height>\n  <width>20</width>\n  <stageParams>\n    <maxWeakCount>93</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>24</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>6</maxWeakCount>\n      <stageThreshold>-1.4562760591506958e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 1.2963959574699402e-01</internalNodes>\n          <leafValues>\n            -7.7304208278656006e-01 6.8350148200988770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 -4.6326808631420135e-02</internalNodes>\n          <leafValues>\n            5.7352751493453979e-01 -4.9097689986228943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 -1.6173090785741806e-02</internalNodes>\n          <leafValues>\n            6.0254341363906860e-01 -3.1610709428787231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3 -4.5828841626644135e-02</internalNodes>\n          <leafValues>\n            6.4177548885345459e-01 -1.5545040369033813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 -5.3759619593620300e-02</internalNodes>\n          <leafValues>\n            5.4219317436218262e-01 -2.0480829477310181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 3.4171190112829208e-02</internalNodes>\n          <leafValues>\n            -2.3388190567493439e-01 4.8410901427268982e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>12</maxWeakCount>\n      <stageThreshold>-1.2550230026245117e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 6 -2.1727620065212250e-01</internalNodes>\n          <leafValues>\n            7.1098899841308594e-01 -5.9360730648040771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 1.2071969918906689e-02</internalNodes>\n          <leafValues>\n            -2.8240481019020081e-01 5.9013551473617554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 -1.7854139208793640e-02</internalNodes>\n          <leafValues>\n            5.3137522935867310e-01 -2.2758960723876953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 2.2333610802888870e-02</internalNodes>\n          <leafValues>\n            -1.7556099593639374e-01 6.3356137275695801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 -9.1420017182826996e-02</internalNodes>\n          <leafValues>\n            6.1563092470169067e-01 -1.6899530589580536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 2.8973650187253952e-02</internalNodes>\n          <leafValues>\n            -1.2250079959630966e-01 7.4401170015335083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 7.8203463926911354e-03</internalNodes>\n          <leafValues>\n            1.6974370181560516e-01 -6.5441650152206421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 2.0340489223599434e-02</internalNodes>\n          <leafValues>\n            -1.2556649744510651e-01 8.2710450887680054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -1.1926149949431419e-02</internalNodes>\n          <leafValues>\n            3.8605681061744690e-01 -2.0992340147495270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 -9.7281101625412703e-04</internalNodes>\n          <leafValues>\n            -6.3761192560195923e-01 1.2952390313148499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 1.8322050891583785e-05</internalNodes>\n          <leafValues>\n            -3.4631478786468506e-01 2.2924269735813141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 -8.0854417756199837e-03</internalNodes>\n          <leafValues>\n            -6.3665801286697388e-01 1.3078659772872925e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-1.3728189468383789e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 18 -1.1812269687652588e-01</internalNodes>\n          <leafValues>\n            6.7844521999359131e-01 -5.0045782327651978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 -3.4332759678363800e-02</internalNodes>\n          <leafValues>\n            6.7186361551284790e-01 -3.5744878649711609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 -2.1530799567699432e-02</internalNodes>\n          <leafValues>\n            7.2220700979232788e-01 -1.8192419409751892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 -2.1909970790147781e-02</internalNodes>\n          <leafValues>\n            6.6529387235641479e-01 -2.7510228753089905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 -2.8713539242744446e-02</internalNodes>\n          <leafValues>\n            6.9955700635910034e-01 -1.9615580141544342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 -1.1467480100691319e-02</internalNodes>\n          <leafValues>\n            5.9267348051071167e-01 -2.2097350656986237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 -2.2611169144511223e-02</internalNodes>\n          <leafValues>\n            3.4483069181442261e-01 -3.8379558920860291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 -1.9308089977130294e-03</internalNodes>\n          <leafValues>\n            -7.9445719718933105e-01 1.5628659725189209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 5.6419910833938047e-05</internalNodes>\n          <leafValues>\n            -3.0896010994911194e-01 3.5431089997291565e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>16</maxWeakCount>\n      <stageThreshold>-1.2879480123519897e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 27 1.9886520504951477e-01</internalNodes>\n          <leafValues>\n            -5.2860701084136963e-01 3.5536721348762512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -3.6008939146995544e-02</internalNodes>\n          <leafValues>\n            4.2109689116477966e-01 -3.9348980784416199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 -7.7569849789142609e-02</internalNodes>\n          <leafValues>\n            4.7991541028022766e-01 -2.5122168660163879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 8.2630853285081685e-05</internalNodes>\n          <leafValues>\n            -3.8475489616394043e-01 3.1849220395088196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 3.2773229759186506e-04</internalNodes>\n          <leafValues>\n            -2.6427319645881653e-01 3.2547241449356079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 -1.8574850633740425e-02</internalNodes>\n          <leafValues>\n            4.6736589074134827e-01 -1.5067270398139954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -7.0008762122597545e-05</internalNodes>\n          <leafValues>\n            2.9313150048255920e-01 -2.5365099310874939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -1.8552130088210106e-02</internalNodes>\n          <leafValues>\n            4.6273660659790039e-01 -1.3148050010204315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 -1.3030420057475567e-02</internalNodes>\n          <leafValues>\n            4.1627219319343567e-01 -1.7751489579677582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 6.5694141085259616e-05</internalNodes>\n          <leafValues>\n            -2.8035101294517517e-01 2.6680740714073181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 1.7005260451696813e-04</internalNodes>\n          <leafValues>\n            -2.7027249336242676e-01 2.3981650173664093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 -3.3129199873656034e-03</internalNodes>\n          <leafValues>\n            4.4411438703536987e-01 -1.4428889751434326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 1.7583490116521716e-03</internalNodes>\n          <leafValues>\n            -1.6126190125942230e-01 4.2940768599510193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 -2.5194749236106873e-02</internalNodes>\n          <leafValues>\n            4.0687298774719238e-01 -1.8202580511569977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 1.4031709870323539e-03</internalNodes>\n          <leafValues>\n            8.4759786725044250e-02 -8.0018568038940430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 -7.3991729877889156e-03</internalNodes>\n          <leafValues>\n            5.5766099691390991e-01 -1.1843159794807434e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>23</maxWeakCount>\n      <stageThreshold>-1.2179850339889526e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 43 -2.9943080618977547e-02</internalNodes>\n          <leafValues>\n            3.5810810327529907e-01 -3.8487631082534790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 -1.2567380070686340e-01</internalNodes>\n          <leafValues>\n            3.9316931366920471e-01 -3.0012258887290955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 5.3635272197425365e-03</internalNodes>\n          <leafValues>\n            -4.3908619880676270e-01 1.9257010519504547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 -8.0971820279955864e-03</internalNodes>\n          <leafValues>\n            3.9906668663024902e-01 -2.3407870531082153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 -1.6597909852862358e-02</internalNodes>\n          <leafValues>\n            4.2095288634300232e-01 -2.2674840688705444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 -2.0199299324303865e-03</internalNodes>\n          <leafValues>\n            -7.4156731367111206e-01 1.2601189315319061e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 -1.5202340437099338e-03</internalNodes>\n          <leafValues>\n            -7.6154601573944092e-01 8.6373612284660339e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 -4.9663940444588661e-03</internalNodes>\n          <leafValues>\n            4.2182239890098572e-01 -1.7904919385910034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 -1.9207600504159927e-02</internalNodes>\n          <leafValues>\n            4.6894899010658264e-01 -1.4378750324249268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 -1.2222680263221264e-02</internalNodes>\n          <leafValues>\n            3.2842078804969788e-01 -2.1802149713039398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 5.7548668235540390e-02</internalNodes>\n          <leafValues>\n            -3.6768808960914612e-01 2.4357110261917114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 -9.5794079825282097e-03</internalNodes>\n          <leafValues>\n            -7.2245067358016968e-01 6.3664563000202179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 -2.9545740690082312e-03</internalNodes>\n          <leafValues>\n            3.5846439003944397e-01 -1.6696329414844513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 -4.2017991654574871e-03</internalNodes>\n          <leafValues>\n            3.9094808697700500e-01 -1.2041790038347244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 -1.3624990358948708e-02</internalNodes>\n          <leafValues>\n            -5.8767718076705933e-01 8.8404729962348938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 6.2853112467564642e-05</internalNodes>\n          <leafValues>\n            -2.6348459720611572e-01 2.1419279277324677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 -2.6782939676195383e-03</internalNodes>\n          <leafValues>\n            -7.8390169143676758e-01 8.0526962876319885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 -7.0597179234027863e-02</internalNodes>\n          <leafValues>\n            4.1469261050224304e-01 -1.3989959657192230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 9.2093646526336670e-02</internalNodes>\n          <leafValues>\n            -1.3055180013179779e-01 5.0435781478881836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 -8.8004386052489281e-03</internalNodes>\n          <leafValues>\n            3.6609750986099243e-01 -1.4036649465560913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 7.5080977694597095e-05</internalNodes>\n          <leafValues>\n            -2.9704439640045166e-01 2.0702940225601196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 -2.9870450962334871e-03</internalNodes>\n          <leafValues>\n            3.5615700483322144e-01 -1.5445969998836517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 -2.6441509835422039e-03</internalNodes>\n          <leafValues>\n            -5.4353517293930054e-01 1.0295110195875168e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>27</maxWeakCount>\n      <stageThreshold>-1.2905240058898926e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 66 -4.7862470149993896e-02</internalNodes>\n          <leafValues>\n            4.1528239846229553e-01 -3.4185820817947388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 8.7350532412528992e-02</internalNodes>\n          <leafValues>\n            -3.8749781250953674e-01 2.4204200506210327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -1.6849499195814133e-02</internalNodes>\n          <leafValues>\n            5.3082478046417236e-01 -1.7282910645008087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 -2.8870029374957085e-02</internalNodes>\n          <leafValues>\n            3.5843509435653687e-01 -2.2402590513229370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 2.5679389946162701e-03</internalNodes>\n          <leafValues>\n            1.4990499615669250e-01 -6.5609407424926758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 -2.4116659536957741e-02</internalNodes>\n          <leafValues>\n            5.5889678001403809e-01 -1.4810280501842499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 -3.2826658338308334e-02</internalNodes>\n          <leafValues>\n            4.6468681097030640e-01 -1.0785529762506485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 -1.5233060345053673e-02</internalNodes>\n          <leafValues>\n            -7.3954427242279053e-01 5.6236881762742996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 -3.0209511169232428e-04</internalNodes>\n          <leafValues>\n            -4.5548820495605469e-01 9.7069837152957916e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 7.5365108205005527e-04</internalNodes>\n          <leafValues>\n            9.5147296786308289e-02 -5.4895019531250000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 -1.0638950392603874e-02</internalNodes>\n          <leafValues>\n            4.0912970900535583e-01 -1.2308409810066223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 -7.5217830017209053e-03</internalNodes>\n          <leafValues>\n            4.0289148688316345e-01 -1.6048780083656311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 -1.0677099972963333e-01</internalNodes>\n          <leafValues>\n            6.1759322881698608e-01 -7.3091186583042145e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 1.6256919130682945e-02</internalNodes>\n          <leafValues>\n            -1.3103680312633514e-01 3.7453651428222656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 -2.0679360255599022e-02</internalNodes>\n          <leafValues>\n            -7.1402907371520996e-01 5.2390009164810181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 1.7052369192242622e-02</internalNodes>\n          <leafValues>\n            1.2822860479354858e-01 -3.1080681085586548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 -5.7122060097754002e-03</internalNodes>\n          <leafValues>\n            -6.0556507110595703e-01 8.1884756684303284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 2.0851430235779844e-05</internalNodes>\n          <leafValues>\n            -2.6812988519668579e-01 1.4453840255737305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 7.9284431412816048e-03</internalNodes>\n          <leafValues>\n            -7.8795351088047028e-02 5.6762582063674927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 -2.5217379443347454e-03</internalNodes>\n          <leafValues>\n            3.7068629264831543e-01 -1.3620570302009583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 -2.2426199167966843e-02</internalNodes>\n          <leafValues>\n            -6.8704998493194580e-01 5.1062859594821930e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 -7.6451441273093224e-03</internalNodes>\n          <leafValues>\n            2.3492220044136047e-01 -1.7905959486961365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 -1.1175329564139247e-03</internalNodes>\n          <leafValues>\n            -5.9869050979614258e-01 7.4324436485767365e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 1.9212789833545685e-02</internalNodes>\n          <leafValues>\n            -1.5702550113201141e-01 2.9737469553947449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 5.6293429806828499e-03</internalNodes>\n          <leafValues>\n            -9.9769018590450287e-02 4.2130270600318909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 -9.5671862363815308e-03</internalNodes>\n          <leafValues>\n            -6.0858798027038574e-01 7.3506258428096771e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 1.1217960156500340e-02</internalNodes>\n          <leafValues>\n            -1.0320810228586197e-01 4.1909849643707275e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>28</maxWeakCount>\n      <stageThreshold>-1.1600480079650879e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 93 -1.7486440017819405e-02</internalNodes>\n          <leafValues>\n            3.1307280063629150e-01 -3.3681181073188782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 3.0714649707078934e-02</internalNodes>\n          <leafValues>\n            -1.8766190111637115e-01 5.3780800104141235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 -2.2188719362020493e-02</internalNodes>\n          <leafValues>\n            3.6637881398200989e-01 -1.6124810278415680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 -5.0700771680567414e-05</internalNodes>\n          <leafValues>\n            2.1245710551738739e-01 -2.8444620966911316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -7.0170420221984386e-03</internalNodes>\n          <leafValues>\n            3.9543110132217407e-01 -1.3173590600490570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -6.8563609384000301e-03</internalNodes>\n          <leafValues>\n            3.0373859405517578e-01 -2.0657819509506226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 -1.4129259623587132e-02</internalNodes>\n          <leafValues>\n            -7.6503008604049683e-01 9.8213188350200653e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 -4.7915481030941010e-02</internalNodes>\n          <leafValues>\n            4.8307389020919800e-01 -1.3006809353828430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 4.7032979637151584e-05</internalNodes>\n          <leafValues>\n            -2.5216570496559143e-01 2.4386680126190186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 1.0221180273219943e-03</internalNodes>\n          <leafValues>\n            6.8857602775096893e-02 -6.5861141681671143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 -2.6056109927594662e-03</internalNodes>\n          <leafValues>\n            4.2942029237747192e-01 -1.3022460043430328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 5.4505340813193470e-05</internalNodes>\n          <leafValues>\n            -1.9288620352745056e-01 2.8958499431610107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 -6.6721157054416835e-05</internalNodes>\n          <leafValues>\n            3.0290710926055908e-01 -1.9854369759559631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 2.6281431317329407e-01</internalNodes>\n          <leafValues>\n            -2.3293940722942352e-01 2.3692460358142853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 -2.3569669574499130e-02</internalNodes>\n          <leafValues>\n            1.9401040673255920e-01 -2.8484618663787842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 -3.9120172150433064e-03</internalNodes>\n          <leafValues>\n            5.5378979444503784e-01 -9.5665678381919861e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 5.0788799853762612e-05</internalNodes>\n          <leafValues>\n            -2.3912659287452698e-01 2.1799489855766296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 -7.8732017427682877e-03</internalNodes>\n          <leafValues>\n            4.0697428584098816e-01 -1.2768040597438812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 -1.6778609715402126e-03</internalNodes>\n          <leafValues>\n            -5.7744657993316650e-01 9.7324788570404053e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 -2.6832430739887059e-04</internalNodes>\n          <leafValues>\n            2.9021880030632019e-01 -1.6831269860267639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 7.8687182394787669e-05</internalNodes>\n          <leafValues>\n            -1.9551570713520050e-01 2.7720969915390015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 1.2953500263392925e-02</internalNodes>\n          <leafValues>\n            -9.6838317811489105e-02 4.0323871374130249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -1.3043959625065327e-02</internalNodes>\n          <leafValues>\n            4.7198569774627686e-01 -8.9287549257278442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 3.0261781066656113e-03</internalNodes>\n          <leafValues>\n            -1.3623380661010742e-01 3.0686271190643311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 -6.0438038781285286e-03</internalNodes>\n          <leafValues>\n            -7.7954101562500000e-01 5.7316310703754425e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 -2.2507249377667904e-03</internalNodes>\n          <leafValues>\n            3.0877059698104858e-01 -1.5006309747695923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 1.5826810151338577e-02</internalNodes>\n          <leafValues>\n            6.4551889896392822e-02 -7.2455567121505737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 6.5864507632795721e-05</internalNodes>\n          <leafValues>\n            -1.7598840594291687e-01 2.3210389912128448e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>36</maxWeakCount>\n      <stageThreshold>-1.2257250547409058e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 121 -2.7854869142174721e-02</internalNodes>\n          <leafValues>\n            4.5518448948860168e-01 -1.8099910020828247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 1.2895040214061737e-01</internalNodes>\n          <leafValues>\n            -5.2565532922744751e-01 1.6188900172710419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 2.4403180927038193e-02</internalNodes>\n          <leafValues>\n            -1.4974960684776306e-01 4.2357379198074341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 -2.4458570405840874e-03</internalNodes>\n          <leafValues>\n            3.2948669791221619e-01 -1.7447690665721893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 -3.5336529836058617e-03</internalNodes>\n          <leafValues>\n            4.7426640987396240e-01 -7.3618359863758087e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 5.1358150813030079e-05</internalNodes>\n          <leafValues>\n            -3.0421930551528931e-01 1.5633270144462585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -1.6225680708885193e-02</internalNodes>\n          <leafValues>\n            2.3002180457115173e-01 -2.0359820127487183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 -4.6007009223103523e-03</internalNodes>\n          <leafValues>\n            4.0459269285202026e-01 -1.3485440611839294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 -2.1928999572992325e-02</internalNodes>\n          <leafValues>\n            -6.8724489212036133e-01 8.0684266984462738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 -2.8971210122108459e-03</internalNodes>\n          <leafValues>\n            -6.9619607925415039e-01 4.8545219004154205e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 -4.4074649922549725e-03</internalNodes>\n          <leafValues>\n            2.5166261196136475e-01 -1.6236649453639984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 2.8437169268727303e-02</internalNodes>\n          <leafValues>\n            6.0394261032342911e-02 -6.6744458675384521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 8.3212882280349731e-02</internalNodes>\n          <leafValues>\n            6.4357921481132507e-02 -5.3626042604446411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 -1.2419329956173897e-02</internalNodes>\n          <leafValues>\n            -7.0816862583160400e-01 5.7526610791683197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 -4.6992599964141846e-03</internalNodes>\n          <leafValues>\n            5.1254332065582275e-01 -8.7350800633430481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 -7.8025809489190578e-04</internalNodes>\n          <leafValues>\n            2.6687660813331604e-01 -1.7961509525775909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 -1.9724339246749878e-02</internalNodes>\n          <leafValues>\n            -6.7563730478286743e-01 7.2941906750202179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 1.0269250487908721e-03</internalNodes>\n          <leafValues>\n            5.3919319063425064e-02 -5.5540180206298828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -2.5957189500331879e-02</internalNodes>\n          <leafValues>\n            5.6362527608871460e-01 -7.1898393332958221e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 -1.2552699772641063e-03</internalNodes>\n          <leafValues>\n            -5.0346630811691284e-01 8.9691452682018280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 -4.9970578402280807e-02</internalNodes>\n          <leafValues>\n            1.7685119807720184e-01 -2.2301959991455078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 -2.9899610672146082e-03</internalNodes>\n          <leafValues>\n            3.9122420549392700e-01 -1.0149750113487244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 4.8546842299401760e-03</internalNodes>\n          <leafValues>\n            -1.1770179867744446e-01 4.2190939188003540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 1.0448860120959580e-04</internalNodes>\n          <leafValues>\n            -1.7333979904651642e-01 2.2344440221786499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 5.9689260524464771e-05</internalNodes>\n          <leafValues>\n            -2.3409630358219147e-01 1.6558240354061127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -1.3423919677734375e-02</internalNodes>\n          <leafValues>\n            4.3023818731307983e-01 -9.9723652005195618e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 2.2581999655812979e-03</internalNodes>\n          <leafValues>\n            7.2720989584922791e-02 -5.7501018047332764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 -1.2546280398964882e-02</internalNodes>\n          <leafValues>\n            3.6184579133987427e-01 -1.1457010358572006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 -2.8705769218504429e-03</internalNodes>\n          <leafValues>\n            2.8210538625717163e-01 -1.2367550283670425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 1.9785640761256218e-02</internalNodes>\n          <leafValues>\n            4.7876749187707901e-02 -8.0666238069534302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 4.7588930465281010e-03</internalNodes>\n          <leafValues>\n            -1.0925389826297760e-01 3.3746978640556335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 -6.9974269717931747e-03</internalNodes>\n          <leafValues>\n            -8.0295938253402710e-01 4.5706700533628464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 -1.3033480383455753e-02</internalNodes>\n          <leafValues>\n            1.8680439889431000e-01 -1.7688910663127899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 -1.3742579612880945e-03</internalNodes>\n          <leafValues>\n            2.7725479006767273e-01 -1.2809009850025177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 2.7657810132950544e-03</internalNodes>\n          <leafValues>\n            9.0758942067623138e-02 -4.2594739794731140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 2.8941841446794569e-04</internalNodes>\n          <leafValues>\n            -3.8816329836845398e-01 8.9267797768115997e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>47</maxWeakCount>\n      <stageThreshold>-1.2863140106201172e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 157 -1.4469229616224766e-02</internalNodes>\n          <leafValues>\n            3.7507829070091248e-01 -2.4928289651870728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 -1.3317629694938660e-01</internalNodes>\n          <leafValues>\n            3.0166378617286682e-01 -2.2414070367813110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 -1.0132160037755966e-02</internalNodes>\n          <leafValues>\n            3.6985591053962708e-01 -1.7850010097026825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 -7.8511182218790054e-03</internalNodes>\n          <leafValues>\n            4.6086761355400085e-01 -1.2931390106678009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 -1.4295839704573154e-02</internalNodes>\n          <leafValues>\n            4.4841429591178894e-01 -1.0226240009069443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -5.9606940485537052e-03</internalNodes>\n          <leafValues>\n            2.7927988767623901e-01 -1.5323829650878906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 1.0932769626379013e-02</internalNodes>\n          <leafValues>\n            -1.5141740441322327e-01 3.9889648556709290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 5.0430990086169913e-05</internalNodes>\n          <leafValues>\n            -2.2681570053100586e-01 2.1644389629364014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 -5.8431681245565414e-03</internalNodes>\n          <leafValues>\n            4.5420148968696594e-01 -1.2587159872055054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 -2.2346209734678268e-02</internalNodes>\n          <leafValues>\n            -6.2690192461013794e-01 8.2403123378753662e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 -4.8836669884622097e-03</internalNodes>\n          <leafValues>\n            2.6359251141548157e-01 -1.4686630666255951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 7.5506002758629620e-05</internalNodes>\n          <leafValues>\n            -2.4507020413875580e-01 1.6678880155086517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 -4.9026997294276953e-04</internalNodes>\n          <leafValues>\n            -4.2649960517883301e-01 8.9973561465740204e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 1.4861579984426498e-03</internalNodes>\n          <leafValues>\n            -1.2040250003337860e-01 3.0097651481628418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 -1.1988339945673943e-02</internalNodes>\n          <leafValues>\n            2.7852478623390198e-01 -1.2244340032339096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 1.0502239689230919e-02</internalNodes>\n          <leafValues>\n            4.0452759712934494e-02 -7.4050408601760864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 -3.0963009223341942e-02</internalNodes>\n          <leafValues>\n            -6.2842690944671631e-01 4.8013761639595032e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 1.1414520442485809e-02</internalNodes>\n          <leafValues>\n            3.9405211806297302e-02 -7.1674120426177979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 -1.2337000109255314e-02</internalNodes>\n          <leafValues>\n            1.9941329956054688e-01 -1.9274300336837769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 -5.9942267835140228e-03</internalNodes>\n          <leafValues>\n            5.1318162679672241e-01 -6.1658058315515518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 -1.1923230485990644e-03</internalNodes>\n          <leafValues>\n            -7.2605299949645996e-01 5.0652720034122467e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 -7.4582789093255997e-03</internalNodes>\n          <leafValues>\n            2.9603078961372375e-01 -1.1754789948463440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 2.7877509128302336e-03</internalNodes>\n          <leafValues>\n            4.5068711042404175e-02 -6.9535410404205322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 -2.2503209766000509e-04</internalNodes>\n          <leafValues>\n            2.0047250390052795e-01 -1.5775249898433685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 -5.0367889925837517e-03</internalNodes>\n          <leafValues>\n            2.9299819469451904e-01 -1.1700499802827835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 7.4742160737514496e-02</internalNodes>\n          <leafValues>\n            -1.1392319947481155e-01 3.0256620049476624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 2.0255519077181816e-02</internalNodes>\n          <leafValues>\n            -1.0515890270471573e-01 4.0670460462570190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 4.4214509427547455e-02</internalNodes>\n          <leafValues>\n            -2.7631640434265137e-01 1.2363869696855545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 -8.7259558495134115e-04</internalNodes>\n          <leafValues>\n            2.4355030059814453e-01 -1.3300949335098267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 -2.4453739169985056e-03</internalNodes>\n          <leafValues>\n            -5.3866171836853027e-01 6.2510646879673004e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 8.2725353422574699e-05</internalNodes>\n          <leafValues>\n            -2.0772209763526917e-01 1.6270439326763153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -3.6627110093832016e-02</internalNodes>\n          <leafValues>\n            3.6568409204483032e-01 -9.0330280363559723e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 3.0996399000287056e-03</internalNodes>\n          <leafValues>\n            -1.3183020055294037e-01 2.5354298949241638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 -2.4709280114620924e-03</internalNodes>\n          <leafValues>\n            -5.6853497028350830e-01 5.3505431860685349e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 -1.4114670455455780e-02</internalNodes>\n          <leafValues>\n            -4.8599010705947876e-01 5.8485250920057297e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 8.4537261864170432e-04</internalNodes>\n          <leafValues>\n            -8.0093637108802795e-02 4.0265649557113647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 -7.1098632179200649e-03</internalNodes>\n          <leafValues>\n            4.4703239202499390e-01 -6.2947437167167664e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 -1.9125960767269135e-02</internalNodes>\n          <leafValues>\n            -6.6422867774963379e-01 4.9822770059108734e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 -5.0773010589182377e-03</internalNodes>\n          <leafValues>\n            1.7379400134086609e-01 -1.6850599646568298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 -2.9198289848864079e-03</internalNodes>\n          <leafValues>\n            -6.0110282897949219e-01 5.7427939027547836e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 -2.4902150034904480e-02</internalNodes>\n          <leafValues>\n            2.3397980630397797e-01 -1.1818459630012512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 2.0147779956459999e-02</internalNodes>\n          <leafValues>\n            -8.9459821581840515e-02 3.6024400591850281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 1.7597640398889780e-03</internalNodes>\n          <leafValues>\n            4.9458440393209457e-02 -6.3102620840072632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 1.3812039978802204e-03</internalNodes>\n          <leafValues>\n            -1.5218059718608856e-01 1.8971739709377289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 -1.0904540307819843e-02</internalNodes>\n          <leafValues>\n            -5.8097380399703979e-01 4.4862728565931320e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 7.5157178798690438e-05</internalNodes>\n          <leafValues>\n            -1.3777349889278412e-01 1.9543160498142242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 3.8649770431220531e-03</internalNodes>\n          <leafValues>\n            -1.0302229970693588e-01 2.5374969840049744e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>48</maxWeakCount>\n      <stageThreshold>-1.1189440488815308e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 204 -1.0215889662504196e-01</internalNodes>\n          <leafValues>\n            4.1681259870529175e-01 -1.6655629873275757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 -5.1939819008111954e-02</internalNodes>\n          <leafValues>\n            3.3023950457572937e-01 -2.0715710520744324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 -4.2717780917882919e-02</internalNodes>\n          <leafValues>\n            2.6093730330467224e-01 -1.6013890504837036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 4.3890418601222336e-04</internalNodes>\n          <leafValues>\n            -3.4750530123710632e-01 1.3918919861316681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 2.4264389649033546e-02</internalNodes>\n          <leafValues>\n            -4.2552059888839722e-01 1.3578380644321442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 -2.3820599541068077e-02</internalNodes>\n          <leafValues>\n            3.1749808788299561e-01 -1.6652040183544159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -7.0518180727958679e-03</internalNodes>\n          <leafValues>\n            3.0947178602218628e-01 -1.3338300585746765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 -6.8517157342284918e-04</internalNodes>\n          <leafValues>\n            -6.0082262754440308e-01 8.7747000157833099e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 5.3705149330198765e-03</internalNodes>\n          <leafValues>\n            -1.2311449646949768e-01 3.8333550095558167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 -1.3403539545834064e-02</internalNodes>\n          <leafValues>\n            3.3877369761466980e-01 -1.0140489786863327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 -6.6856360062956810e-03</internalNodes>\n          <leafValues>\n            -6.1193597316741943e-01 4.7740221023559570e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 -4.2887418530881405e-03</internalNodes>\n          <leafValues>\n            2.5275790691375732e-01 -1.4434510469436646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 -1.0876749642193317e-02</internalNodes>\n          <leafValues>\n            5.4775732755661011e-01 -5.9455480426549911e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 3.7882640026509762e-04</internalNodes>\n          <leafValues>\n            8.3410300314426422e-02 -4.4226369261741638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 -2.4550149682909250e-03</internalNodes>\n          <leafValues>\n            2.3330999910831451e-01 -1.3964480161666870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 1.2721839593723416e-03</internalNodes>\n          <leafValues>\n            6.0480289161205292e-02 -4.9456089735031128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 -4.8933159559965134e-03</internalNodes>\n          <leafValues>\n            -6.6833269596099854e-01 4.6218499541282654e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 2.6449989527463913e-02</internalNodes>\n          <leafValues>\n            -7.3235362768173218e-02 4.4425961375236511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 -3.3706070389598608e-03</internalNodes>\n          <leafValues>\n            -4.2464339733123779e-01 6.8676561117172241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 -2.9559480026364326e-03</internalNodes>\n          <leafValues>\n            1.6218039393424988e-01 -1.8222999572753906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 3.0619909986853600e-02</internalNodes>\n          <leafValues>\n            -5.8643341064453125e-02 5.3263628482818604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 -9.5765907317399979e-03</internalNodes>\n          <leafValues>\n            -6.0562682151794434e-01 5.3345989435911179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 6.6372493165545166e-05</internalNodes>\n          <leafValues>\n            -1.6680839657783508e-01 1.9284160435199738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 5.0975950434803963e-03</internalNodes>\n          <leafValues>\n            4.4119510799646378e-02 -5.7458841800689697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 3.7112718564458191e-04</internalNodes>\n          <leafValues>\n            -1.1086399853229523e-01 2.3105390369892120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 -8.6607588455080986e-03</internalNodes>\n          <leafValues>\n            4.0456289052963257e-01 -6.2446091324090958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 8.7489158613607287e-04</internalNodes>\n          <leafValues>\n            6.4875148236751556e-02 -4.4871041178703308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 1.1120870476588607e-03</internalNodes>\n          <leafValues>\n            -9.3861460685729980e-02 3.0453911423683167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 -2.3837819695472717e-02</internalNodes>\n          <leafValues>\n            -5.8887428045272827e-01 4.6659421175718307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 2.2272899514064193e-04</internalNodes>\n          <leafValues>\n            -1.4898599684238434e-01 1.7701950669288635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 2.4467470124363899e-02</internalNodes>\n          <leafValues>\n            -5.5789601057767868e-02 4.9208301305770874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 -1.4239320158958435e-01</internalNodes>\n          <leafValues>\n            1.5192000567913055e-01 -1.8778899312019348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -2.0123120397329330e-02</internalNodes>\n          <leafValues>\n            2.1780100464820862e-01 -1.2081900238990784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 1.1513679783092812e-04</internalNodes>\n          <leafValues>\n            -1.6856589913368225e-01 1.6451929509639740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 -2.7556740678846836e-03</internalNodes>\n          <leafValues>\n            -6.9442039728164673e-01 3.9449468255043030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 -7.5843912782147527e-05</internalNodes>\n          <leafValues>\n            1.8941369652748108e-01 -1.5183840692043304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 -7.0697711780667305e-03</internalNodes>\n          <leafValues>\n            4.7064599394798279e-01 -5.7927619665861130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -3.7393178790807724e-02</internalNodes>\n          <leafValues>\n            -7.5892448425292969e-01 3.4116048365831375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 -1.5995610505342484e-02</internalNodes>\n          <leafValues>\n            3.0670469999313354e-01 -8.7525576353073120e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 -3.1183990649878979e-03</internalNodes>\n          <leafValues>\n            2.6195371150970459e-01 -9.1214887797832489e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 1.0651360498741269e-03</internalNodes>\n          <leafValues>\n            -1.7427560687065125e-01 1.5277640521526337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 -1.6029420075938106e-03</internalNodes>\n          <leafValues>\n            3.5612630844116211e-01 -7.6629996299743652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 4.3619908392429352e-03</internalNodes>\n          <leafValues>\n            4.9356970936059952e-02 -5.9228771924972534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 -1.0779909789562225e-02</internalNodes>\n          <leafValues>\n            -6.3922178745269775e-01 3.3204540610313416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 -4.3590869754552841e-03</internalNodes>\n          <leafValues>\n            1.6107389330863953e-01 -1.5221320092678070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 7.4596069753170013e-03</internalNodes>\n          <leafValues>\n            3.3172961324453354e-02 -7.5007742643356323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 8.1385448575019836e-03</internalNodes>\n          <leafValues>\n            2.6325279846787453e-02 -7.1731162071228027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 -3.3338490873575211e-02</internalNodes>\n          <leafValues>\n            3.3536610007286072e-01 -7.0803590118885040e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>55</maxWeakCount>\n      <stageThreshold>-1.1418989896774292e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 252 1.9553979858756065e-02</internalNodes>\n          <leafValues>\n            -1.0439720004796982e-01 5.3128951787948608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 2.2122919559478760e-02</internalNodes>\n          <leafValues>\n            -2.4747270345687866e-01 2.0847250521183014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 -4.1829389519989491e-03</internalNodes>\n          <leafValues>\n            3.8289439678192139e-01 -1.4711579680442810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 -8.6381728760898113e-04</internalNodes>\n          <leafValues>\n            -6.2632888555526733e-01 1.1993259936571121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 7.9958612332120538e-04</internalNodes>\n          <leafValues>\n            9.2573471367359161e-02 -5.5168831348419189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 9.1527570039033890e-03</internalNodes>\n          <leafValues>\n            -7.2929807007312775e-02 5.5512511730194092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 -3.9388681761920452e-03</internalNodes>\n          <leafValues>\n            2.0196039974689484e-01 -2.0912039279937744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 1.4613410166930407e-04</internalNodes>\n          <leafValues>\n            -2.7861818671226501e-01 1.3817410171031952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 -3.1691689509898424e-03</internalNodes>\n          <leafValues>\n            3.6685898900032043e-01 -7.6308242976665497e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 -2.2189389914274216e-02</internalNodes>\n          <leafValues>\n            3.9096599817276001e-01 -1.0971540212631226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 -7.4523608200252056e-03</internalNodes>\n          <leafValues>\n            1.2838590145111084e-01 -2.4159869551658630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 7.7997002517804503e-04</internalNodes>\n          <leafValues>\n            7.1978069841861725e-02 -4.3976500630378723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 -4.6783639118075371e-03</internalNodes>\n          <leafValues>\n            2.1569849550724030e-01 -1.4205920696258545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 -1.5188639983534813e-02</internalNodes>\n          <leafValues>\n            3.6458781361579895e-01 -8.2675926387310028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 5.0619798712432384e-03</internalNodes>\n          <leafValues>\n            -3.4380409121513367e-01 9.2068232595920563e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 -1.7351920250803232e-03</internalNodes>\n          <leafValues>\n            -6.1725497245788574e-01 4.9214478582143784e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 -1.2423450127243996e-02</internalNodes>\n          <leafValues>\n            -5.8558952808380127e-01 4.6112600713968277e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 -1.3031429611146450e-02</internalNodes>\n          <leafValues>\n            -5.9710788726806641e-01 4.0672458708286285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 -1.2369629694148898e-03</internalNodes>\n          <leafValues>\n            -6.8334168195724487e-01 3.3156178891658783e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 6.1022108420729637e-03</internalNodes>\n          <leafValues>\n            -9.4729237258434296e-02 3.0102241039276123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 6.6952849738299847e-04</internalNodes>\n          <leafValues>\n            8.1816866993904114e-02 -3.5196030139923096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 -1.7970580374822021e-03</internalNodes>\n          <leafValues>\n            2.3718979954719543e-01 -1.1768709868192673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 -7.1074528386816382e-04</internalNodes>\n          <leafValues>\n            -4.4763788580894470e-01 5.7682480663061142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 -5.9126471169292927e-03</internalNodes>\n          <leafValues>\n            4.3425410985946655e-01 -6.6868573427200317e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 -3.3132149837911129e-03</internalNodes>\n          <leafValues>\n            1.8150010704994202e-01 -1.4180320501327515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 -6.0814660042524338e-02</internalNodes>\n          <leafValues>\n            4.7221711277961731e-01 -6.1410639435052872e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 -9.6714183688163757e-02</internalNodes>\n          <leafValues>\n            2.7683168649673462e-01 -9.4490036368370056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 3.9073550142347813e-03</internalNodes>\n          <leafValues>\n            -1.2278530001640320e-01 2.1057400107383728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 -9.0431869029998779e-03</internalNodes>\n          <leafValues>\n            3.5641568899154663e-01 -7.7806226909160614e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 -4.8800031654536724e-03</internalNodes>\n          <leafValues>\n            -4.1034790873527527e-01 6.9694377481937408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 -4.3547428213059902e-03</internalNodes>\n          <leafValues>\n            -7.3017889261245728e-01 3.6655150353908539e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 -9.6500627696514130e-03</internalNodes>\n          <leafValues>\n            5.5181127786636353e-01 -5.3168080747127533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 -1.7397310584783554e-02</internalNodes>\n          <leafValues>\n            -5.7084232568740845e-01 5.0214089453220367e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 -6.8304329179227352e-03</internalNodes>\n          <leafValues>\n            -4.6180281043052673e-01 5.0202690064907074e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 3.3255619928240776e-04</internalNodes>\n          <leafValues>\n            -9.5362730324268341e-02 2.5983759760856628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -2.3100529797375202e-03</internalNodes>\n          <leafValues>\n            2.2872470319271088e-01 -1.0533530265092850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 -7.5426651164889336e-03</internalNodes>\n          <leafValues>\n            -5.6990510225296021e-01 4.8863459378480911e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -5.2723060362040997e-03</internalNodes>\n          <leafValues>\n            3.5145181417465210e-01 -8.2390107214450836e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 -4.8578968271613121e-03</internalNodes>\n          <leafValues>\n            -6.0417622327804565e-01 4.4539440423250198e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 1.5867310576140881e-03</internalNodes>\n          <leafValues>\n            -1.0340909659862518e-01 2.3282019793987274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 -4.7427811659872532e-03</internalNodes>\n          <leafValues>\n            2.8490281105041504e-01 -9.8090499639511108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 -1.3515240279957652e-03</internalNodes>\n          <leafValues>\n            2.3096430301666260e-01 -1.1361840367317200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 2.2526069078594446e-03</internalNodes>\n          <leafValues>\n            6.4478322863578796e-02 -4.2205891013145447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 -3.8038659840822220e-04</internalNodes>\n          <leafValues>\n            -3.8076201081275940e-01 6.0043290257453918e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 4.9043921753764153e-03</internalNodes>\n          <leafValues>\n            -7.6104998588562012e-02 3.3232170343399048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 -9.0969670563936234e-03</internalNodes>\n          <leafValues>\n            1.4287790656089783e-01 -1.6887800395488739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 -6.9317929446697235e-03</internalNodes>\n          <leafValues>\n            2.7255409955978394e-01 -9.2879563570022583e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 1.1471060570329428e-03</internalNodes>\n          <leafValues>\n            -1.5273059904575348e-01 1.9702400267124176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -3.7662889808416367e-02</internalNodes>\n          <leafValues>\n            -5.9320437908172607e-01 4.0738601237535477e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 -6.8165571428835392e-03</internalNodes>\n          <leafValues>\n            2.5494089722633362e-01 -9.4081960618495941e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 6.6205562325194478e-04</internalNodes>\n          <leafValues>\n            4.6795718371868134e-02 -4.8454371094703674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 -4.2202551849186420e-03</internalNodes>\n          <leafValues>\n            2.4682149291038513e-01 -9.4673976302146912e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 -6.8986512720584869e-02</internalNodes>\n          <leafValues>\n            -6.6514801979064941e-01 3.5926390439271927e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 6.1707608401775360e-03</internalNodes>\n          <leafValues>\n            2.5833319872617722e-02 -7.2686272859573364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 1.0536249727010727e-02</internalNodes>\n          <leafValues>\n            -8.1828996539115906e-02 2.9760798811912537e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>32</maxWeakCount>\n      <stageThreshold>-1.1255199909210205e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 307 -6.2758728861808777e-02</internalNodes>\n          <leafValues>\n            2.7899080514907837e-01 -2.9656109213829041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 3.4516479354351759e-03</internalNodes>\n          <leafValues>\n            -3.4635880589485168e-01 2.0903840661048889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 -7.8699486330151558e-03</internalNodes>\n          <leafValues>\n            2.4144889414310455e-01 -1.9205570220947266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 -3.4624869003891945e-03</internalNodes>\n          <leafValues>\n            -5.9151780605316162e-01 1.2486449629068375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 -9.4818761572241783e-03</internalNodes>\n          <leafValues>\n            1.8391540646553040e-01 -2.4858260154724121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 2.3226840130519122e-04</internalNodes>\n          <leafValues>\n            -3.3047258853912354e-01 1.0999260097742081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 1.8101120367646217e-03</internalNodes>\n          <leafValues>\n            9.8744012415409088e-02 -4.9634781479835510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -5.4422430694103241e-03</internalNodes>\n          <leafValues>\n            2.9344418644905090e-01 -1.3094750046730042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 7.4148122221231461e-03</internalNodes>\n          <leafValues>\n            -1.4762699604034424e-01 3.3277168869972229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 -1.5565140172839165e-02</internalNodes>\n          <leafValues>\n            -6.8404901027679443e-01 9.9872693419456482e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 2.8720520436763763e-02</internalNodes>\n          <leafValues>\n            -1.4833280444145203e-01 3.0902579426765442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 9.6687392215244472e-05</internalNodes>\n          <leafValues>\n            -1.7431040108203888e-01 2.1402959525585175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 5.2371058613061905e-02</internalNodes>\n          <leafValues>\n            -7.0156857371330261e-02 4.9222990870475769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 -8.6485691368579865e-02</internalNodes>\n          <leafValues>\n            5.0757247209548950e-01 -7.5294211506843567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 -4.2169868946075439e-02</internalNodes>\n          <leafValues>\n            4.5680961012840271e-01 -9.0219900012016296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 4.5369830331765115e-05</internalNodes>\n          <leafValues>\n            -2.6538279652595520e-01 1.6189539432525635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 5.2918000146746635e-03</internalNodes>\n          <leafValues>\n            7.4890151619911194e-02 -5.4054671525955200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 -7.5511651812121272e-04</internalNodes>\n          <leafValues>\n            -4.9261990189552307e-01 5.8723948895931244e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 7.5108138844370842e-05</internalNodes>\n          <leafValues>\n            -2.1432100236415863e-01 1.4077760279178619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 4.9981209449470043e-03</internalNodes>\n          <leafValues>\n            -9.0547338128089905e-02 3.5716068744659424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 -1.4929979806765914e-03</internalNodes>\n          <leafValues>\n            2.5623458623886108e-01 -1.4229069650173187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 2.7239411137998104e-03</internalNodes>\n          <leafValues>\n            -1.5649250149726868e-01 2.1088710427284241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 2.2218320518732071e-03</internalNodes>\n          <leafValues>\n            -1.5072989463806152e-01 2.6801869273185730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 -7.3993072146549821e-04</internalNodes>\n          <leafValues>\n            2.9546990990638733e-01 -1.0692390054464340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 2.0113459322601557e-03</internalNodes>\n          <leafValues>\n            5.0614349544048309e-02 -7.1683371067047119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 1.1452870443463326e-02</internalNodes>\n          <leafValues>\n            -1.2719069421291351e-01 2.4152779579162598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 -1.0782170575112104e-03</internalNodes>\n          <leafValues>\n            2.4813009798526764e-01 -1.3461199402809143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 3.3417691010981798e-03</internalNodes>\n          <leafValues>\n            5.3578309714794159e-02 -5.2274167537689209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 6.9398651248775423e-05</internalNodes>\n          <leafValues>\n            -2.1698740124702454e-01 1.2812179327011108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 -4.0982551872730255e-03</internalNodes>\n          <leafValues>\n            2.4401889741420746e-01 -1.1570589989423752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 -1.6289720078930259e-03</internalNodes>\n          <leafValues>\n            2.8261470794677734e-01 -1.0659469664096832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 1.3984859921038151e-02</internalNodes>\n          <leafValues>\n            4.2715899646282196e-02 -7.3646312952041626e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>30</maxWeakCount>\n      <stageThreshold>-1.1729990243911743e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 339 1.6416519880294800e-01</internalNodes>\n          <leafValues>\n            -4.8960301280021667e-01 1.7607709765434265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 8.3413062384352088e-04</internalNodes>\n          <leafValues>\n            -2.8220430016517639e-01 2.4199579656124115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 -1.7193210078403354e-03</internalNodes>\n          <leafValues>\n            -7.1485888957977295e-01 8.6162216961383820e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 -1.5654950402677059e-03</internalNodes>\n          <leafValues>\n            -7.2972381114959717e-01 9.4070672988891602e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 1.9124479731544852e-03</internalNodes>\n          <leafValues>\n            -3.1187158823013306e-01 1.8143390119075775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 -1.3512369990348816e-01</internalNodes>\n          <leafValues>\n            2.9577299952507019e-01 -2.2179250419139862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 -4.0300549007952213e-03</internalNodes>\n          <leafValues>\n            -6.6595137119293213e-01 8.5431016981601715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 -2.8640460222959518e-03</internalNodes>\n          <leafValues>\n            -6.2086361646652222e-01 5.3106021136045456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 -1.4065420255064964e-03</internalNodes>\n          <leafValues>\n            2.2346289455890656e-01 -2.0211009681224823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 -3.5820449702441692e-03</internalNodes>\n          <leafValues>\n            -5.4030400514602661e-01 6.8213619291782379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 4.1544470936059952e-02</internalNodes>\n          <leafValues>\n            -6.5215840935707092e-02 6.2109231948852539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 -9.1709550470113754e-03</internalNodes>\n          <leafValues>\n            -7.5553297996520996e-01 5.2640449255704880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 6.1552738770842552e-03</internalNodes>\n          <leafValues>\n            9.0939402580261230e-02 -4.4246131181716919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 -1.0043520014733076e-03</internalNodes>\n          <leafValues>\n            2.4292330443859100e-01 -1.8669790029525757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 1.1519829742610455e-02</internalNodes>\n          <leafValues>\n            -1.1763150244951248e-01 3.6723458766937256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 -8.9040733873844147e-03</internalNodes>\n          <leafValues>\n            -4.8931330442428589e-01 1.0897020250558853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 5.3973670583218336e-04</internalNodes>\n          <leafValues>\n            -2.1850399672985077e-01 1.8489989638328552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 1.3727260520681739e-03</internalNodes>\n          <leafValues>\n            -1.5072910487651825e-01 2.9173129796981812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 -1.0807390324771404e-02</internalNodes>\n          <leafValues>\n            4.2897450923919678e-01 -1.0280139744281769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 1.2670770520344377e-03</internalNodes>\n          <leafValues>\n            7.4192158877849579e-02 -6.4208251237869263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 2.2991129662841558e-03</internalNodes>\n          <leafValues>\n            4.7100279480218887e-02 -7.2335231304168701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 2.7187510859221220e-03</internalNodes>\n          <leafValues>\n            -1.7086869478225708e-01 2.3513509333133698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 -6.6619180142879486e-03</internalNodes>\n          <leafValues>\n            -7.8975427150726318e-01 4.5084670186042786e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 -4.8266649246215820e-02</internalNodes>\n          <leafValues>\n            -6.9579917192459106e-01 4.1976079344749451e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 1.5214690007269382e-02</internalNodes>\n          <leafValues>\n            -1.0818280279636383e-01 3.6460620164871216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 -6.0080131515860558e-03</internalNodes>\n          <leafValues>\n            3.0970990657806396e-01 -1.1359210312366486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 6.6127157770097256e-03</internalNodes>\n          <leafValues>\n            8.0665342509746552e-02 -4.6658530831336975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 -7.9607013612985611e-03</internalNodes>\n          <leafValues>\n            -8.7201941013336182e-01 3.6774590611457825e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 3.8847199175506830e-03</internalNodes>\n          <leafValues>\n            -1.1666289716959000e-01 3.3070269227027893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -1.0988810099661350e-03</internalNodes>\n          <leafValues>\n            2.3872570693492889e-01 -1.7656759917736053e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>-1.0368299484252930e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 369 3.5903379321098328e-03</internalNodes>\n          <leafValues>\n            -2.3688079416751862e-01 2.4631640315055847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 6.4815930090844631e-03</internalNodes>\n          <leafValues>\n            -3.1373620033264160e-01 1.8675759434700012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 7.3048402555286884e-05</internalNodes>\n          <leafValues>\n            -2.7644351124763489e-01 1.6496239602565765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 -3.8514640182256699e-03</internalNodes>\n          <leafValues>\n            -5.6014508008956909e-01 1.1294739693403244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 3.8588210009038448e-03</internalNodes>\n          <leafValues>\n            3.9848998188972473e-02 -5.8071857690811157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 -2.4651220068335533e-02</internalNodes>\n          <leafValues>\n            1.6755010187625885e-01 -2.5343671441078186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 4.7245521098375320e-02</internalNodes>\n          <leafValues>\n            -1.0662080347537994e-01 3.9451980590820312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 6.5964651294052601e-03</internalNodes>\n          <leafValues>\n            -1.7744250595569611e-01 2.7280190587043762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -1.3177490327507257e-03</internalNodes>\n          <leafValues>\n            -5.4272651672363281e-01 4.8606589436531067e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 -5.0261709839105606e-03</internalNodes>\n          <leafValues>\n            2.4394249916076660e-01 -1.3143649697303772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 3.4632768947631121e-03</internalNodes>\n          <leafValues>\n            6.9049343466758728e-02 -7.0336240530014038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 2.1692588925361633e-03</internalNodes>\n          <leafValues>\n            -1.3289460539817810e-01 2.2098529338836670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 2.9395870864391327e-02</internalNodes>\n          <leafValues>\n            -2.8530520200729370e-01 1.3543990254402161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 -9.6181448316201568e-04</internalNodes>\n          <leafValues>\n            -5.8041381835937500e-01 3.7450648844242096e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 -1.0820999741554260e-01</internalNodes>\n          <leafValues>\n            3.9467281103134155e-01 -7.8655943274497986e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 -1.8024869263172150e-02</internalNodes>\n          <leafValues>\n            2.7355629205703735e-01 -1.3415299355983734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 6.2509840354323387e-03</internalNodes>\n          <leafValues>\n            2.3388059809803963e-02 -8.0088591575622559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 -1.6088379779830575e-03</internalNodes>\n          <leafValues>\n            -5.6762522459030151e-01 4.1215669363737106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 7.7564752427861094e-04</internalNodes>\n          <leafValues>\n            -1.4891269803047180e-01 1.9086180627346039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 8.7122338300105184e-05</internalNodes>\n          <leafValues>\n            -1.5557530522346497e-01 1.9428220391273499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 -2.0755320787429810e-02</internalNodes>\n          <leafValues>\n            -6.3006532192230225e-01 3.6134380847215652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 -6.2931738793849945e-03</internalNodes>\n          <leafValues>\n            2.5609248876571655e-01 -1.0588269680738449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 1.0844149626791477e-02</internalNodes>\n          <leafValues>\n            -1.0124850273132324e-01 3.0322128534317017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 -6.3752777350600809e-05</internalNodes>\n          <leafValues>\n            1.9111579656600952e-01 -1.3849230110645294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 6.6480963141657412e-05</internalNodes>\n          <leafValues>\n            -1.5205250680446625e-01 2.1706309914588928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 1.3560829684138298e-03</internalNodes>\n          <leafValues>\n            4.9431789666414261e-02 -6.4279842376708984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 -9.0662558795884252e-04</internalNodes>\n          <leafValues>\n            1.7982010543346405e-01 -1.4044609665870667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 1.0473709553480148e-03</internalNodes>\n          <leafValues>\n            -1.0933549702167511e-01 2.4265940487384796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 -1.0243969736620784e-03</internalNodes>\n          <leafValues>\n            2.7162680029869080e-01 -1.1820919811725616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 -1.2024149764329195e-03</internalNodes>\n          <leafValues>\n            -7.0151102542877197e-01 3.9489898830652237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 7.6911649666726589e-03</internalNodes>\n          <leafValues>\n            -9.2218913137912750e-02 3.1046289205551147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 -1.3966549932956696e-01</internalNodes>\n          <leafValues>\n            6.8979388475418091e-01 -3.9706118404865265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 2.1276050247251987e-03</internalNodes>\n          <leafValues>\n            9.7277611494064331e-02 -2.8841799497604370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 -2.7594310231506824e-03</internalNodes>\n          <leafValues>\n            2.4168670177459717e-01 -1.1277820169925690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 5.2236132323741913e-03</internalNodes>\n          <leafValues>\n            -1.1430279910564423e-01 2.4256780743598938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 -1.2590440455824137e-03</internalNodes>\n          <leafValues>\n            -5.9679388999938965e-01 4.7663960605859756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 -3.7192099262028933e-03</internalNodes>\n          <leafValues>\n            -4.6414130926132202e-01 5.2847690880298615e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 5.9696151874959469e-03</internalNodes>\n          <leafValues>\n            -7.3244288563728333e-02 3.8743090629577637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 -5.1776720210909843e-03</internalNodes>\n          <leafValues>\n            -7.4193227291107178e-01 4.0496710687875748e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 5.0035100430250168e-03</internalNodes>\n          <leafValues>\n            -1.3888800144195557e-01 1.8767620623111725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 -5.2013457752764225e-04</internalNodes>\n          <leafValues>\n            -5.4940617084503174e-01 4.9417849630117416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 5.3168768063187599e-03</internalNodes>\n          <leafValues>\n            -8.2482978701591492e-02 3.1740561127662659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 -1.4774589799344540e-02</internalNodes>\n          <leafValues>\n            2.0816099643707275e-01 -1.2115559726953506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 -4.1416451334953308e-02</internalNodes>\n          <leafValues>\n            -8.2437807321548462e-01 3.3329188823699951e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>53</maxWeakCount>\n      <stageThreshold>-1.0492420196533203e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 413 9.0962520334869623e-04</internalNodes>\n          <leafValues>\n            8.4579966962337494e-02 -5.6118410825729370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 -5.6139789521694183e-02</internalNodes>\n          <leafValues>\n            1.5341749787330627e-01 -2.6967319846153259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 1.0292009683325887e-03</internalNodes>\n          <leafValues>\n            -2.0489980280399323e-01 2.0153179764747620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 2.8783010784536600e-03</internalNodes>\n          <leafValues>\n            -1.7351140081882477e-01 2.1297949552536011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 -7.4144392274320126e-03</internalNodes>\n          <leafValues>\n            -5.9624868631362915e-01 4.7077950090169907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 -1.4831849839538336e-03</internalNodes>\n          <leafValues>\n            1.9024610519409180e-01 -1.5986390411853790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 4.5968941412866116e-03</internalNodes>\n          <leafValues>\n            3.1447131186723709e-02 -6.8694341182708740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 2.4255330208688974e-03</internalNodes>\n          <leafValues>\n            -2.3609359562397003e-01 1.1036109924316406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 -8.4950566291809082e-02</internalNodes>\n          <leafValues>\n            2.3107160627841949e-01 -1.3776530325412750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 -5.0145681016147137e-03</internalNodes>\n          <leafValues>\n            3.8676109910011292e-01 -5.6217379868030548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 -2.1482061129063368e-03</internalNodes>\n          <leafValues>\n            1.8191599845886230e-01 -1.7615699768066406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 -1.0396770201623440e-02</internalNodes>\n          <leafValues>\n            -7.5351381301879883e-01 2.4091970175504684e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 -1.3466750271618366e-02</internalNodes>\n          <leafValues>\n            -7.2118860483169556e-01 3.4949369728565216e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 -8.4435477852821350e-02</internalNodes>\n          <leafValues>\n            -3.3792638778686523e-01 7.1113817393779755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 2.4771490134298801e-03</internalNodes>\n          <leafValues>\n            -1.1765109747648239e-01 2.2541989386081696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 1.5828050673007965e-02</internalNodes>\n          <leafValues>\n            -6.9536216557025909e-02 3.1395369768142700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 6.4916983246803284e-02</internalNodes>\n          <leafValues>\n            -7.5043588876724243e-02 4.0677338838577271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 2.9652469675056636e-04</internalNodes>\n          <leafValues>\n            7.3953360319137573e-02 -3.4544008970260620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 1.3129520229995251e-03</internalNodes>\n          <leafValues>\n            -1.6909439861774445e-01 1.5258370339870453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 -5.8032129891216755e-03</internalNodes>\n          <leafValues>\n            3.5260149836540222e-01 -8.3444066345691681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -1.4791679382324219e-01</internalNodes>\n          <leafValues>\n            4.3004658818244934e-01 -5.7309929281473160e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 -1.6584150493144989e-02</internalNodes>\n          <leafValues>\n            2.3432689905166626e-01 -1.0907640308141708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 3.0183270573616028e-03</internalNodes>\n          <leafValues>\n            -1.3600939512252808e-01 2.6409289240837097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 -3.6471918225288391e-02</internalNodes>\n          <leafValues>\n            -6.2809741497039795e-01 4.3545108288526535e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 -7.3119226726703346e-05</internalNodes>\n          <leafValues>\n            1.6470630466938019e-01 -1.6463780403137207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 -3.6719450727105141e-03</internalNodes>\n          <leafValues>\n            -4.7421360015869141e-01 4.8586919903755188e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 -4.0151178836822510e-03</internalNodes>\n          <leafValues>\n            1.8222180008888245e-01 -1.4097510278224945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 1.9948020577430725e-02</internalNodes>\n          <leafValues>\n            -6.9787658751010895e-02 3.6707460880279541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 7.6699437340721488e-04</internalNodes>\n          <leafValues>\n            5.5729299783706665e-02 -4.4585430622100830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 -1.1806039838120341e-03</internalNodes>\n          <leafValues>\n            -4.6876621246337891e-01 4.8902221024036407e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 1.5847349539399147e-02</internalNodes>\n          <leafValues>\n            -1.2120209634304047e-01 2.0566530525684357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 -1.1985700111836195e-03</internalNodes>\n          <leafValues>\n            2.0262099802494049e-01 -1.2823820114135742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 -1.0964959859848022e-01</internalNodes>\n          <leafValues>\n            -8.6619192361831665e-01 3.0351849272847176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 -9.2532606795430183e-03</internalNodes>\n          <leafValues>\n            2.9343119263648987e-01 -8.5361950099468231e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 1.4686530455946922e-02</internalNodes>\n          <leafValues>\n            3.2798621803522110e-02 -7.7556562423706055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 -1.3514430029317737e-03</internalNodes>\n          <leafValues>\n            2.4426999688148499e-01 -1.1503250151872635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 -4.3728090822696686e-03</internalNodes>\n          <leafValues>\n            2.1687670052051544e-01 -1.3984480500221252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 3.4263390116393566e-03</internalNodes>\n          <leafValues>\n            4.5614220201969147e-02 -5.4567712545394897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 -3.8404068909585476e-03</internalNodes>\n          <leafValues>\n            1.4949500560760498e-01 -1.5062509477138519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 3.7988980766385794e-03</internalNodes>\n          <leafValues>\n            -8.7301626801490784e-02 2.5481531023979187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 -2.0094281062483788e-03</internalNodes>\n          <leafValues>\n            1.7259070277214050e-01 -1.4288470149040222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -2.4370709434151649e-03</internalNodes>\n          <leafValues>\n            2.6848098635673523e-01 -8.1898219883441925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 1.0485399980098009e-03</internalNodes>\n          <leafValues>\n            4.6113260090351105e-02 -4.7243279218673706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 1.7460780218243599e-03</internalNodes>\n          <leafValues>\n            -1.1030430346727371e-01 2.0379729568958282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 5.8608627878129482e-03</internalNodes>\n          <leafValues>\n            -1.5619659423828125e-01 1.5927439928054810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 -2.7724979445338249e-02</internalNodes>\n          <leafValues>\n            1.1349119991064072e-01 -2.1885140240192413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 4.7080639749765396e-02</internalNodes>\n          <leafValues>\n            -4.1688729077577591e-02 5.3630048036575317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 -7.9283770173788071e-03</internalNodes>\n          <leafValues>\n            -5.3595131635665894e-01 4.4237509369850159e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 -1.2880540452897549e-02</internalNodes>\n          <leafValues>\n            2.3237949609756470e-01 -1.0246250033378601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 2.3604769259691238e-02</internalNodes>\n          <leafValues>\n            -8.8291436433792114e-02 3.0561059713363647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 1.5902200713753700e-02</internalNodes>\n          <leafValues>\n            -1.2238109856843948e-01 1.7849120497703552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 7.9939495772123337e-03</internalNodes>\n          <leafValues>\n            -8.3729006350040436e-02 3.2319590449333191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 5.7100867852568626e-03</internalNodes>\n          <leafValues>\n            3.8479208946228027e-02 -6.8138152360916138e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>51</maxWeakCount>\n      <stageThreshold>-1.1122100353240967e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 466 2.2480720654129982e-03</internalNodes>\n          <leafValues>\n            -1.6416870057582855e-01 4.1648530960083008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 4.5813550241291523e-03</internalNodes>\n          <leafValues>\n            -1.2465959787368774e-01 4.0385121107101440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 -1.6073239967226982e-03</internalNodes>\n          <leafValues>\n            2.6082459092140198e-01 -2.0282520353794098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 2.5205370038747787e-03</internalNodes>\n          <leafValues>\n            -1.0557229816913605e-01 3.6669111251831055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 2.4119189474731684e-03</internalNodes>\n          <leafValues>\n            -1.3877600431442261e-01 2.9959911108016968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 5.7156179100275040e-03</internalNodes>\n          <leafValues>\n            -7.7683463692665100e-02 4.8481920361518860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 3.1093840952962637e-03</internalNodes>\n          <leafValues>\n            -1.1229000240564346e-01 2.9215508699417114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 -8.6836628615856171e-02</internalNodes>\n          <leafValues>\n            -3.6779600381851196e-01 7.2597242891788483e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 5.2652182057499886e-03</internalNodes>\n          <leafValues>\n            -1.0890290141105652e-01 3.1791260838508606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 -1.9913529977202415e-02</internalNodes>\n          <leafValues>\n            -5.3373438119888306e-01 7.0585712790489197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 3.8297839928418398e-03</internalNodes>\n          <leafValues>\n            -1.3575910031795502e-01 2.2788879275321960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 1.0431859642267227e-02</internalNodes>\n          <leafValues>\n            8.8797912001609802e-02 -4.7958970069885254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 -2.0040439441800117e-02</internalNodes>\n          <leafValues>\n            1.5745539963245392e-01 -1.7771570384502411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 -5.2967290394008160e-03</internalNodes>\n          <leafValues>\n            -6.8434917926788330e-01 3.5671461373567581e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 -2.1624139044433832e-03</internalNodes>\n          <leafValues>\n            2.8318038582801819e-01 -9.8511278629302979e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 -3.5464888787828386e-04</internalNodes>\n          <leafValues>\n            -3.7077340483665466e-01 8.0932952463626862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -1.8152060511056334e-04</internalNodes>\n          <leafValues>\n            -3.2207030057907104e-01 7.7551059424877167e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 -2.7563021285459399e-04</internalNodes>\n          <leafValues>\n            -3.2441279292106628e-01 8.7949477136135101e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 6.3823810778558254e-03</internalNodes>\n          <leafValues>\n            -8.8924713432788849e-02 3.1727218627929688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 1.1150909587740898e-02</internalNodes>\n          <leafValues>\n            7.1019843220710754e-02 -4.0494039654731750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 -1.0593760525807738e-03</internalNodes>\n          <leafValues>\n            2.6050668954849243e-01 -1.1765640228986740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 2.3906480055302382e-03</internalNodes>\n          <leafValues>\n            -8.4388621151447296e-02 3.1230551004409790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 -1.1000749655067921e-02</internalNodes>\n          <leafValues>\n            1.9152249395847321e-01 -1.5210020542144775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 -2.4643228971399367e-04</internalNodes>\n          <leafValues>\n            -3.1765159964561462e-01 8.6582258343696594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 2.3053269833326340e-02</internalNodes>\n          <leafValues>\n            -1.0089760273694992e-01 2.5769290328025818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 -2.2135660983622074e-03</internalNodes>\n          <leafValues>\n            4.5689210295677185e-01 -5.2404791116714478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 -9.7139709396287799e-04</internalNodes>\n          <leafValues>\n            -3.5518380999565125e-01 8.0094382166862488e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 1.5676229959353805e-03</internalNodes>\n          <leafValues>\n            1.0091420263051987e-01 -2.1603040397167206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 7.5460801599547267e-04</internalNodes>\n          <leafValues>\n            5.7896178215742111e-02 -4.0461111068725586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 -2.0698970183730125e-02</internalNodes>\n          <leafValues>\n            3.1543630361557007e-01 -8.0713048577308655e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 -2.0619940012693405e-02</internalNodes>\n          <leafValues>\n            2.7181661128997803e-01 -7.6358616352081299e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 2.1611129865050316e-02</internalNodes>\n          <leafValues>\n            3.9493449032306671e-02 -5.9429651498794556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 6.5676742233335972e-03</internalNodes>\n          <leafValues>\n            -9.8353669047355652e-02 2.3649279773235321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 -8.8434796780347824e-03</internalNodes>\n          <leafValues>\n            -5.2523428201675415e-01 4.3099921196699142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 -9.4260741025209427e-03</internalNodes>\n          <leafValues>\n            2.4665130674839020e-01 -9.4130717217922211e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 -1.9830230157822371e-03</internalNodes>\n          <leafValues>\n            2.6743701100349426e-01 -9.0069316327571869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 -1.7358399927616119e-03</internalNodes>\n          <leafValues>\n            1.5940019488334656e-01 -1.5789410471916199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -1.3513869605958462e-02</internalNodes>\n          <leafValues>\n            4.0792331099510193e-01 -6.4223118126392365e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 -1.9394010305404663e-02</internalNodes>\n          <leafValues>\n            1.8015649914741516e-01 -1.3731400668621063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 -3.2684770412743092e-03</internalNodes>\n          <leafValues>\n            2.9080390930175781e-01 -8.0161906778812408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 4.1773589327931404e-04</internalNodes>\n          <leafValues>\n            -2.1412980556488037e-01 1.1273439973592758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 -7.6351119205355644e-03</internalNodes>\n          <leafValues>\n            -4.5365959405899048e-01 5.4625060409307480e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 -8.3652976900339127e-03</internalNodes>\n          <leafValues>\n            2.6472920179367065e-01 -9.4334110617637634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 2.7768449857831001e-02</internalNodes>\n          <leafValues>\n            -1.0136710107326508e-01 2.0743979513645172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 -5.4891228675842285e-02</internalNodes>\n          <leafValues>\n            2.8840309381484985e-01 -7.5312040746212006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 2.5793339591473341e-03</internalNodes>\n          <leafValues>\n            -1.1088529974222183e-01 2.1724960207939148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 6.6196516854688525e-05</internalNodes>\n          <leafValues>\n            -1.8872100114822388e-01 1.4440689980983734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 5.0907251425087452e-03</internalNodes>\n          <leafValues>\n            -7.7601231634616852e-02 2.9398378729820251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 -1.0444259643554688e-01</internalNodes>\n          <leafValues>\n            2.0133109390735626e-01 -1.0903970152139664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 -6.7273090826347470e-04</internalNodes>\n          <leafValues>\n            1.7945900559425354e-01 -1.2023670226335526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 3.2412849832326174e-03</internalNodes>\n          <leafValues>\n            4.0688131004571915e-02 -5.4600572586059570e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>-1.2529590129852295e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 517 5.2965320646762848e-03</internalNodes>\n          <leafValues>\n            -1.2154529988765717e-01 6.4420372247695923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 -2.5326260365545750e-03</internalNodes>\n          <leafValues>\n            5.1233220100402832e-01 -1.1108259856700897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 -2.9183230362832546e-03</internalNodes>\n          <leafValues>\n            -5.0615429878234863e-01 1.1501979827880859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 -2.3692339658737183e-02</internalNodes>\n          <leafValues>\n            3.7167280912399292e-01 -1.4672680199146271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 2.0177470520138741e-02</internalNodes>\n          <leafValues>\n            -1.7388840019702911e-01 4.7759491205215454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 -2.1723210811614990e-02</internalNodes>\n          <leafValues>\n            -4.3880090117454529e-01 1.3576899468898773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 2.8369780629873276e-03</internalNodes>\n          <leafValues>\n            -1.2512069940567017e-01 4.6789029240608215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 2.7148420922458172e-03</internalNodes>\n          <leafValues>\n            -8.8018856942653656e-02 3.6866518855094910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 3.2625689636915922e-03</internalNodes>\n          <leafValues>\n            -8.5335306823253632e-02 5.1644730567932129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 -3.5618850961327553e-03</internalNodes>\n          <leafValues>\n            -4.4503930211067200e-01 9.1738171875476837e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 1.9227749435231090e-03</internalNodes>\n          <leafValues>\n            -1.1077310144901276e-01 3.9416998624801636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 -3.5111969918943942e-04</internalNodes>\n          <leafValues>\n            -3.7775701284408569e-01 1.2166170030832291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 1.9121779769193381e-04</internalNodes>\n          <leafValues>\n            7.4816018342971802e-02 -4.0767100453376770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 -2.6525629800744355e-04</internalNodes>\n          <leafValues>\n            -3.3151718974113464e-01 1.1291120201349258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 2.0086700096726418e-02</internalNodes>\n          <leafValues>\n            -6.1598118394613266e-02 5.6128817796707153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 3.6783248186111450e-02</internalNodes>\n          <leafValues>\n            -6.0251388698816299e-02 5.2192491292953491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 1.3941619545221329e-03</internalNodes>\n          <leafValues>\n            -3.5503050684928894e-01 1.0863020271062851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 -1.5181669965386391e-02</internalNodes>\n          <leafValues>\n            2.2739650309085846e-01 -1.6252990067005157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 4.6796840615570545e-03</internalNodes>\n          <leafValues>\n            -5.7535041123628616e-02 4.8124238848686218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 -1.7988319450523704e-04</internalNodes>\n          <leafValues>\n            -3.0587670207023621e-01 1.0868159681558609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 -3.5850999411195517e-03</internalNodes>\n          <leafValues>\n            3.8596940040588379e-01 -9.2194072902202606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 1.0793360415846109e-03</internalNodes>\n          <leafValues>\n            -1.1190389841794968e-01 3.1125208735466003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 7.3285802500322461e-05</internalNodes>\n          <leafValues>\n            -2.0239910483360291e-01 1.5586680173873901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 1.3678739964962006e-01</internalNodes>\n          <leafValues>\n            -2.1672859787940979e-01 1.4420390129089355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 -1.1729259975254536e-02</internalNodes>\n          <leafValues>\n            4.3503770232200623e-01 -7.4886530637741089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 3.9230841211974621e-03</internalNodes>\n          <leafValues>\n            -5.0289329141378403e-02 5.8831161260604858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 -2.9819121118634939e-04</internalNodes>\n          <leafValues>\n            -3.8232401013374329e-01 9.2451132833957672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 -4.7992770560085773e-03</internalNodes>\n          <leafValues>\n            4.8488789796829224e-01 -7.3136523365974426e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 -3.0155890271998942e-04</internalNodes>\n          <leafValues>\n            -3.5757359862327576e-01 1.0581880062818527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 1.0390769690275192e-02</internalNodes>\n          <leafValues>\n            5.2920468151569366e-02 -5.7249659299850464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 -9.4488041941076517e-04</internalNodes>\n          <leafValues>\n            4.4966828823089600e-01 -8.3075523376464844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 1.2651870492845774e-03</internalNodes>\n          <leafValues>\n            -9.6695438027381897e-02 3.1302270293235779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 1.7094539478421211e-02</internalNodes>\n          <leafValues>\n            -8.1248976290225983e-02 3.6113831400871277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 2.5973359588533640e-03</internalNodes>\n          <leafValues>\n            -1.1338350176811218e-01 2.2233949601650238e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 1.4527440071105957e-03</internalNodes>\n          <leafValues>\n            6.9750443100929260e-02 -3.6720710992813110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 4.7638658434152603e-03</internalNodes>\n          <leafValues>\n            -6.5788961946964264e-02 3.8328540325164795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 -6.2501081265509129e-03</internalNodes>\n          <leafValues>\n            -7.0754468441009521e-01 3.8350198417901993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 -3.1765329185873270e-03</internalNodes>\n          <leafValues>\n            1.3755400478839874e-01 -2.3240029811859131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 3.2191169448196888e-03</internalNodes>\n          <leafValues>\n            -1.2935450673103333e-01 2.2737880051136017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -5.6365579366683960e-03</internalNodes>\n          <leafValues>\n            3.8067150115966797e-01 -6.7246839404106140e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 -2.3844049428589642e-04</internalNodes>\n          <leafValues>\n            -3.1122380495071411e-01 8.3838358521461487e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 -4.1017560288310051e-03</internalNodes>\n          <leafValues>\n            2.6067280769348145e-01 -1.0449740290641785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 1.3336989795789123e-03</internalNodes>\n          <leafValues>\n            -5.8250140398740768e-02 4.7682440280914307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 -1.2090239906683564e-03</internalNodes>\n          <leafValues>\n            1.4834509789943695e-01 -1.7329469323158264e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>72</maxWeakCount>\n      <stageThreshold>-1.1188739538192749e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 561 -3.1760931015014648e-03</internalNodes>\n          <leafValues>\n            3.3333331346511841e-01 -1.6642349958419800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 2.4858079850673676e-02</internalNodes>\n          <leafValues>\n            -7.2728872299194336e-02 5.6674581766128540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 -7.7597280032932758e-03</internalNodes>\n          <leafValues>\n            4.6258568763732910e-01 -9.3112178146839142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 7.8239021822810173e-03</internalNodes>\n          <leafValues>\n            -2.7414610981941223e-01 1.3243049383163452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 -1.0948839597404003e-02</internalNodes>\n          <leafValues>\n            2.2345480322837830e-01 -1.4965449273586273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 -3.4349008928984404e-03</internalNodes>\n          <leafValues>\n            3.8724988698959351e-01 -6.6121727228164673e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 -3.1156290322542191e-02</internalNodes>\n          <leafValues>\n            2.4078279733657837e-01 -1.1406909674406052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 1.1100519914180040e-03</internalNodes>\n          <leafValues>\n            -2.8207978606224060e-01 1.3275429606437683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 3.1762740109115839e-03</internalNodes>\n          <leafValues>\n            3.4585930407047272e-02 -5.1374310255050659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 -2.7977459132671356e-02</internalNodes>\n          <leafValues>\n            2.3926779627799988e-01 -1.3255919516086578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 -2.3097939789295197e-02</internalNodes>\n          <leafValues>\n            3.9019620418548584e-01 -7.8478008508682251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 -3.9731930010020733e-03</internalNodes>\n          <leafValues>\n            3.0691069364547729e-01 -7.0601403713226318e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 3.0335749033838511e-03</internalNodes>\n          <leafValues>\n            -1.4002190530300140e-01 1.9134859740734100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 -1.0844370350241661e-02</internalNodes>\n          <leafValues>\n            1.6548730432987213e-01 -1.5657779574394226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 -1.8150510266423225e-02</internalNodes>\n          <leafValues>\n            -6.3243591785430908e-01 3.9561819285154343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 7.1052298881113529e-04</internalNodes>\n          <leafValues>\n            -1.8515570461750031e-01 1.3408809900283813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 1.0893340222537518e-02</internalNodes>\n          <leafValues>\n            -2.6730230078101158e-02 6.0971802473068237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 -2.8780900174751878e-04</internalNodes>\n          <leafValues>\n            -3.0065140128135681e-01 7.3171459138393402e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 -3.5855069290846586e-03</internalNodes>\n          <leafValues>\n            2.6217609643936157e-01 -7.9714097082614899e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 -1.9759280607104301e-02</internalNodes>\n          <leafValues>\n            -5.9039229154586792e-01 4.0698971599340439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 -1.0845210403203964e-02</internalNodes>\n          <leafValues>\n            1.6364559531211853e-01 -1.2586060166358948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 -4.3183090165257454e-03</internalNodes>\n          <leafValues>\n            -5.7474881410598755e-01 3.7644311785697937e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 1.4913700288161635e-03</internalNodes>\n          <leafValues>\n            6.0913469642400742e-02 -3.0222928524017334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 1.5675699338316917e-02</internalNodes>\n          <leafValues>\n            -7.3145911097526550e-02 2.9379451274871826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 -1.1033560149371624e-02</internalNodes>\n          <leafValues>\n            3.9318808913230896e-01 -4.7084320336580276e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 8.8555756956338882e-03</internalNodes>\n          <leafValues>\n            3.7601381540298462e-02 -4.9108490347862244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 -8.9665671112015843e-04</internalNodes>\n          <leafValues>\n            1.7952020466327667e-01 -1.1086239665746689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 -3.0592409893870354e-03</internalNodes>\n          <leafValues>\n            -4.4429460167884827e-01 5.1005430519580841e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 6.3201179727911949e-03</internalNodes>\n          <leafValues>\n            -5.2841089665889740e-02 3.7197101116180420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 2.0682830363512039e-02</internalNodes>\n          <leafValues>\n            5.7667169719934464e-02 -3.6901599168777466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 9.9822662770748138e-02</internalNodes>\n          <leafValues>\n            -3.7377018481492996e-02 5.8165591955184937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 -6.5854229032993317e-03</internalNodes>\n          <leafValues>\n            2.8509441018104553e-01 -6.0978069901466370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 -6.0900300741195679e-02</internalNodes>\n          <leafValues>\n            -5.1031768321990967e-01 3.7787400186061859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 -2.9991709161549807e-03</internalNodes>\n          <leafValues>\n            -4.7943010926246643e-01 3.8833890110254288e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 -9.8906438797712326e-03</internalNodes>\n          <leafValues>\n            4.0609079599380493e-01 -4.7869648784399033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 596 -8.2688927650451660e-02</internalNodes>\n          <leafValues>\n            -7.0671182870864868e-01 2.7487749233841896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 5.0060399807989597e-03</internalNodes>\n          <leafValues>\n            2.8208440169692039e-02 -5.2909690141677856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 6.1695030890405178e-03</internalNodes>\n          <leafValues>\n            -5.4554861038923264e-02 3.2837980985641479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 -3.3914761152118444e-03</internalNodes>\n          <leafValues>\n            9.2117667198181152e-02 -2.1637110412120819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 -2.6131230406463146e-03</internalNodes>\n          <leafValues>\n            1.3651019334793091e-01 -1.3781130313873291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 8.0490659456700087e-04</internalNodes>\n          <leafValues>\n            -6.8637110292911530e-02 3.3581069111824036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 -3.8106508553028107e-02</internalNodes>\n          <leafValues>\n            2.9445430636405945e-01 -6.8239226937294006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 7.2450799052603543e-05</internalNodes>\n          <leafValues>\n            -1.6750130057334900e-01 1.2178230285644531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 1.5837959945201874e-03</internalNodes>\n          <leafValues>\n            -9.2042848467826843e-02 2.1348990499973297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 1.2924340553581715e-03</internalNodes>\n          <leafValues>\n            6.2917232513427734e-02 -3.6174508929252625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 9.9146775901317596e-03</internalNodes>\n          <leafValues>\n            1.9534060731530190e-02 -8.1015038490295410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 -1.7086310544982553e-03</internalNodes>\n          <leafValues>\n            2.5525239109992981e-01 -6.8229459226131439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 2.1844399161636829e-03</internalNodes>\n          <leafValues>\n            2.3314049467444420e-02 -8.4296780824661255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 -3.4244330599904060e-03</internalNodes>\n          <leafValues>\n            2.7213689684867859e-01 -7.6395228505134583e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 2.7591470279730856e-04</internalNodes>\n          <leafValues>\n            -1.0742840170860291e-01 2.2888970375061035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 -6.0005177510902286e-04</internalNodes>\n          <leafValues>\n            -2.9854211211204529e-01 6.3479736447334290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 -2.5001438916660845e-04</internalNodes>\n          <leafValues>\n            -2.7178969979286194e-01 6.9615006446838379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 6.8751391954720020e-03</internalNodes>\n          <leafValues>\n            -5.7185899466276169e-02 3.6695951223373413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 1.2761900201439857e-02</internalNodes>\n          <leafValues>\n            6.7955687642097473e-02 -2.8534150123596191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 -1.4752789866179228e-03</internalNodes>\n          <leafValues>\n            2.0680660009384155e-01 -1.0059390217065811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 1.2138819694519043e-01</internalNodes>\n          <leafValues>\n            -9.7126796841621399e-02 1.9789619743824005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 -5.0081279128789902e-02</internalNodes>\n          <leafValues>\n            2.8417178988456726e-01 -6.7879997193813324e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 3.1454950571060181e-02</internalNodes>\n          <leafValues>\n            -8.9468672871589661e-02 2.1298420429229736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 1.8878319533541799e-03</internalNodes>\n          <leafValues>\n            -1.1656440049409866e-01 1.6663520038127899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 -5.7211960665881634e-03</internalNodes>\n          <leafValues>\n            2.3702140152454376e-01 -9.0776607394218445e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 -1.8076719425152987e-04</internalNodes>\n          <leafValues>\n            1.7951929569244385e-01 -1.0793480277061462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 -1.9761849939823151e-01</internalNodes>\n          <leafValues>\n            4.5674291253089905e-01 -4.0480159223079681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 -2.3846809926908463e-04</internalNodes>\n          <leafValues>\n            -2.3733009397983551e-01 7.5922161340713501e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 2.1540730085689574e-04</internalNodes>\n          <leafValues>\n            8.1688016653060913e-02 -2.8685030341148376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 1.0163090191781521e-02</internalNodes>\n          <leafValues>\n            -4.1250020265579224e-02 4.8038348555564880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 -7.2184870950877666e-03</internalNodes>\n          <leafValues>\n            1.7458580434322357e-01 -1.0146500170230865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 2.4263170361518860e-01</internalNodes>\n          <leafValues>\n            5.3426481783390045e-02 -3.2318529486656189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 6.9304101634770632e-04</internalNodes>\n          <leafValues>\n            -1.1499179899692535e-01 1.4793939888477325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 3.5475199110805988e-03</internalNodes>\n          <leafValues>\n            -3.9424978196620941e-02 5.3126180171966553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 2.1403690334409475e-04</internalNodes>\n          <leafValues>\n            6.9753833115100861e-02 -2.7319580316543579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 -5.7119462871924043e-04</internalNodes>\n          <leafValues>\n            3.4369900822639465e-01 -5.7699009776115417e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 -6.6290069371461868e-03</internalNodes>\n          <leafValues>\n            1.1758489906787872e-01 -1.5020139515399933e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>66</maxWeakCount>\n      <stageThreshold>-1.0888810157775879e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 633 -2.6513449847698212e-02</internalNodes>\n          <leafValues>\n            2.0568640530109406e-01 -2.6473900675773621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 9.7727458924055099e-03</internalNodes>\n          <leafValues>\n            -1.1192840337753296e-01 3.2570549845695496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 3.2290350645780563e-02</internalNodes>\n          <leafValues>\n            -9.8574757575988770e-02 3.1779170036315918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 -2.8103240765631199e-03</internalNodes>\n          <leafValues>\n            1.5213899314403534e-01 -1.9686409831047058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 -1.0991429910063744e-02</internalNodes>\n          <leafValues>\n            5.1407659053802490e-01 -4.3707210570573807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 6.3133831135928631e-03</internalNodes>\n          <leafValues>\n            -9.2781022191047668e-02 3.4702470898628235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 8.7105982005596161e-02</internalNodes>\n          <leafValues>\n            3.0053649097681046e-02 -8.2814818620681763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 1.1799359926953912e-03</internalNodes>\n          <leafValues>\n            -1.2928420305252075e-01 2.0646120607852936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 -9.3056890182197094e-04</internalNodes>\n          <leafValues>\n            -5.0021439790725708e-01 9.3666993081569672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 -1.3687170110642910e-02</internalNodes>\n          <leafValues>\n            -7.9358148574829102e-01 -6.6733639687299728e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 -7.5917452573776245e-02</internalNodes>\n          <leafValues>\n            3.0469641089439392e-01 -7.9655893146991730e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 -2.8559709899127483e-03</internalNodes>\n          <leafValues>\n            2.0961460471153259e-01 -1.2732550501823425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 -4.0231510065495968e-03</internalNodes>\n          <leafValues>\n            -6.5817278623580933e-01 5.0683639943599701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 1.7558040097355843e-02</internalNodes>\n          <leafValues>\n            -8.5382692515850067e-02 3.6174559593200684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 2.1988239139318466e-02</internalNodes>\n          <leafValues>\n            6.2943696975708008e-02 -7.0896339416503906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 -2.8599589131772518e-03</internalNodes>\n          <leafValues>\n            1.4683780074119568e-01 -1.6465979814529419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 -1.0030849836766720e-02</internalNodes>\n          <leafValues>\n            4.9579939246177673e-01 -2.7188340201973915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 -6.9560329429805279e-03</internalNodes>\n          <leafValues>\n            2.7977779507637024e-01 -7.7953331172466278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 -3.8356808945536613e-03</internalNodes>\n          <leafValues>\n            -5.8163982629776001e-01 3.5739939659833908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 -3.2647319603711367e-03</internalNodes>\n          <leafValues>\n            -4.9945080280303955e-01 4.6986490488052368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 -7.8412350267171860e-03</internalNodes>\n          <leafValues>\n            3.4532830119132996e-01 -6.8810403347015381e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 -8.1718113506212831e-05</internalNodes>\n          <leafValues>\n            1.5041710436344147e-01 -1.4146679639816284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 -3.2448628917336464e-03</internalNodes>\n          <leafValues>\n            2.2724510729312897e-01 -9.2860206961631775e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 -7.8561151167377830e-04</internalNodes>\n          <leafValues>\n            -4.4319018721580505e-01 5.7812441140413284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 -6.2474247533828020e-04</internalNodes>\n          <leafValues>\n            1.3952389359474182e-01 -1.4668719470500946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 -3.2942948746494949e-04</internalNodes>\n          <leafValues>\n            -2.9901570081710815e-01 7.6066739857196808e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 1.2605739757418633e-03</internalNodes>\n          <leafValues>\n            -1.6125600039958954e-01 1.3953800499439240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 -5.1667019724845886e-02</internalNodes>\n          <leafValues>\n            -5.3142839670181274e-01 4.0719520300626755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 -1.5285619534552097e-02</internalNodes>\n          <leafValues>\n            -7.8206378221511841e-01 2.7183769270777702e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 6.9029822945594788e-02</internalNodes>\n          <leafValues>\n            -3.6427021026611328e-02 7.1102517843246460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 1.4522749697789550e-03</internalNodes>\n          <leafValues>\n            -9.6890516579151154e-02 2.1668420732021332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 -2.4765590205788612e-03</internalNodes>\n          <leafValues>\n            1.1645310372114182e-01 -1.8227979540824890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 -1.5134819550439715e-03</internalNodes>\n          <leafValues>\n            1.7863979935646057e-01 -1.2214969843626022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 -1.5099470037966967e-03</internalNodes>\n          <leafValues>\n            1.8086239695549011e-01 -1.1446069926023483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 -6.7054620012640953e-03</internalNodes>\n          <leafValues>\n            2.5106599926948547e-01 -9.1871462762355804e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 -1.4075200073421001e-02</internalNodes>\n          <leafValues>\n            1.3707509636878967e-01 -1.7333500087261200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 -2.2400720044970512e-03</internalNodes>\n          <leafValues>\n            4.0092980861663818e-01 -4.7576878219842911e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 1.9782369956374168e-02</internalNodes>\n          <leafValues>\n            -1.9040350615978241e-01 1.4923410117626190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 2.6002870872616768e-03</internalNodes>\n          <leafValues>\n            4.6971768140792847e-02 -4.3307659029960632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 -5.3445628145709634e-04</internalNodes>\n          <leafValues>\n            -4.3744230270385742e-01 4.1520189493894577e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 -1.7466509714722633e-02</internalNodes>\n          <leafValues>\n            6.5818172693252563e-01 -3.4447491168975830e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 -2.0425589755177498e-03</internalNodes>\n          <leafValues>\n            3.9657929539680481e-01 -4.4052429497241974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 2.6661779265850782e-03</internalNodes>\n          <leafValues>\n            5.8770958334207535e-02 -3.2806369662284851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 -5.5982369929552078e-02</internalNodes>\n          <leafValues>\n            -5.1735472679138184e-01 3.5791840404272079e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 -1.5066330088302493e-03</internalNodes>\n          <leafValues>\n            1.5123869478702545e-01 -1.2520180642604828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 678 -1.1472369544208050e-02</internalNodes>\n          <leafValues>\n            -6.2930530309677124e-01 3.4704331308603287e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 2.3409629240632057e-02</internalNodes>\n          <leafValues>\n            -5.8063350617885590e-02 3.8668221235275269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 -2.3243729956448078e-03</internalNodes>\n          <leafValues>\n            1.8754099309444427e-01 -9.8394669592380524e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 -2.9039299115538597e-02</internalNodes>\n          <leafValues>\n            -5.4486900568008423e-01 4.0926340967416763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 -1.4474649913609028e-02</internalNodes>\n          <leafValues>\n            -6.7248392105102539e-01 2.3128850385546684e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 -5.2086091600358486e-03</internalNodes>\n          <leafValues>\n            -4.3271440267562866e-01 4.3780650943517685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 4.9382899887859821e-03</internalNodes>\n          <leafValues>\n            -1.0878620296716690e-01 1.9342589378356934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 -4.3193930760025978e-03</internalNodes>\n          <leafValues>\n            2.4080930650234222e-01 -1.0380800068378448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 2.3705669445917010e-04</internalNodes>\n          <leafValues>\n            -8.7349072098731995e-02 2.0466239750385284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 4.7858079778961837e-04</internalNodes>\n          <leafValues>\n            4.5624580234289169e-02 -3.8854670524597168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 -8.5342838428914547e-04</internalNodes>\n          <leafValues>\n            -5.5077940225601196e-01 3.5825889557600021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 5.4772121075075120e-05</internalNodes>\n          <leafValues>\n            -1.1225239932537079e-01 1.7503519356250763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 -3.8445889949798584e-03</internalNodes>\n          <leafValues>\n            2.4526700377464294e-01 -8.1132568418979645e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 -4.0128458291292191e-02</internalNodes>\n          <leafValues>\n            -6.3122707605361938e-01 2.6972670108079910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 -1.7886360001284629e-04</internalNodes>\n          <leafValues>\n            1.9855099916458130e-01 -1.0333680361509323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 1.7668239888735116e-04</internalNodes>\n          <leafValues>\n            -9.1359011828899384e-02 1.9848720729351044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 7.2763383388519287e-02</internalNodes>\n          <leafValues>\n            5.0075579434633255e-02 -3.3852630853652954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 1.0181630030274391e-02</internalNodes>\n          <leafValues>\n            -9.3229979276657104e-02 2.0059590041637421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 2.4409969337284565e-03</internalNodes>\n          <leafValues>\n            6.4636632800102234e-02 -2.6921740174293518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 -3.6227488890290260e-03</internalNodes>\n          <leafValues>\n            1.3169890642166138e-01 -1.2514840066432953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 -1.3635610230267048e-03</internalNodes>\n          <leafValues>\n            1.6350460052490234e-01 -1.0665939748287201e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>69</maxWeakCount>\n      <stageThreshold>-1.0408929586410522e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 699 -9.6991164609789848e-03</internalNodes>\n          <leafValues>\n            6.1125320196151733e-01 -6.6225312650203705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 -9.6426531672477722e-03</internalNodes>\n          <leafValues>\n            -1. 2.7699959464371204e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 -9.6381865441799164e-03</internalNodes>\n          <leafValues>\n            1. -2.9904270195402205e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 -4.2553939856588840e-03</internalNodes>\n          <leafValues>\n            2.8464388847351074e-01 -1.5540120005607605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 -9.6223521977663040e-03</internalNodes>\n          <leafValues>\n            -1. 4.3999180197715759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 -9.1231241822242737e-03</internalNodes>\n          <leafValues>\n            8.6869341135025024e-01 -2.7267890982329845e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 -8.6240433156490326e-03</internalNodes>\n          <leafValues>\n            4.5352488756179810e-01 -8.6071379482746124e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 -8.9324144646525383e-03</internalNodes>\n          <leafValues>\n            1.3375559449195862e-01 -2.6012519001960754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 -1.4207810163497925e-02</internalNodes>\n          <leafValues>\n            3.2077640295028687e-01 -9.7226411104202271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 2.5911010801792145e-02</internalNodes>\n          <leafValues>\n            -1.2964080274105072e-01 2.6218649744987488e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 2.0531509653665125e-04</internalNodes>\n          <leafValues>\n            -1.2404280155897141e-01 2.1062959730625153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 -5.4795680625829846e-05</internalNodes>\n          <leafValues>\n            1.1974299699068069e-01 -2.3201279342174530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 711 6.8555199541151524e-03</internalNodes>\n          <leafValues>\n            -6.3276126980781555e-02 4.1044250130653381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 -1.2253040447831154e-02</internalNodes>\n          <leafValues>\n            5.4883331060409546e-01 -3.9731100201606750e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 -3.9058770053088665e-03</internalNodes>\n          <leafValues>\n            2.4190980195999146e-01 -9.7096011042594910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 2.7560980524867773e-03</internalNodes>\n          <leafValues>\n            -1.2569679319858551e-01 1.9456650316715240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 -7.7662160620093346e-03</internalNodes>\n          <leafValues>\n            2.9765701293945312e-01 -9.6818156540393829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 3.8997188676148653e-04</internalNodes>\n          <leafValues>\n            6.2188401818275452e-02 -4.2040899395942688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 3.3579880837351084e-03</internalNodes>\n          <leafValues>\n            4.7498140484094620e-02 -6.3216882944107056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 -1.6745539382100105e-02</internalNodes>\n          <leafValues>\n            7.1098130941390991e-01 -3.9157349616289139e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 -6.5409899689257145e-03</internalNodes>\n          <leafValues>\n            -3.5043171048164368e-01 7.0616953074932098e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 3.0016340315341949e-04</internalNodes>\n          <leafValues>\n            9.1902457177639008e-02 -2.4618670344352722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 1.4918990433216095e-02</internalNodes>\n          <leafValues>\n            -5.1909450441598892e-02 5.6636041402816772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 4.8153079114854336e-04</internalNodes>\n          <leafValues>\n            6.4659558236598969e-02 -3.6590608954429626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 -3.0211321427486837e-04</internalNodes>\n          <leafValues>\n            1.7926569283008575e-01 -1.1410660296678543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 3.8521419628523290e-04</internalNodes>\n          <leafValues>\n            1.0345619916915894e-01 -2.0072460174560547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 8.0837132409214973e-03</internalNodes>\n          <leafValues>\n            -6.6073462367057800e-02 3.0284249782562256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 -2.2804969921708107e-02</internalNodes>\n          <leafValues>\n            5.2962350845336914e-01 -4.0118999779224396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 1.9440450705587864e-04</internalNodes>\n          <leafValues>\n            8.1854820251464844e-02 -2.4663360416889191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 -1.2848090380430222e-02</internalNodes>\n          <leafValues>\n            -3.4973311424255371e-01 5.6916229426860809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 -1.0937290498986840e-03</internalNodes>\n          <leafValues>\n            2.3368680477142334e-01 -9.1604806482791901e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 1.0032650316134095e-03</internalNodes>\n          <leafValues>\n            1.1852180212736130e-01 -1.8469190597534180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -4.4688429683446884e-02</internalNodes>\n          <leafValues>\n            -6.4362460374832153e-01 3.0363269150257111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 8.1657543778419495e-03</internalNodes>\n          <leafValues>\n            4.3674658983945847e-02 -4.3002089858055115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 -1.1717810295522213e-02</internalNodes>\n          <leafValues>\n            4.1781479120254517e-01 -4.8233699053525925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 8.4277130663394928e-02</internalNodes>\n          <leafValues>\n            5.3461279720067978e-02 -3.7952190637588501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 1.4211839996278286e-02</internalNodes>\n          <leafValues>\n            4.4900938868522644e-02 -4.2981499433517456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 1.5028340276330709e-03</internalNodes>\n          <leafValues>\n            8.2227639853954315e-02 -2.4706399440765381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 1.0003579780459404e-02</internalNodes>\n          <leafValues>\n            -5.7221669703722000e-02 3.4609371423721313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 -9.0706320479512215e-03</internalNodes>\n          <leafValues>\n            4.5058089494705200e-01 -4.2795319110155106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 -3.3141620224341750e-04</internalNodes>\n          <leafValues>\n            1.8336910009384155e-01 -1.0759949684143066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 1.9723279774188995e-01</internalNodes>\n          <leafValues>\n            -3.0363829806447029e-02 6.6423428058624268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 -7.1258801035583019e-03</internalNodes>\n          <leafValues>\n            -8.9225047826766968e-01 2.5669990107417107e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 8.6921341717243195e-03</internalNodes>\n          <leafValues>\n            -7.0764370262622833e-02 2.8210529685020447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 8.9262127876281738e-03</internalNodes>\n          <leafValues>\n            7.1078233420848846e-02 -3.0232560634613037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 5.7286009192466736e-02</internalNodes>\n          <leafValues>\n            5.0974130630493164e-02 -3.9196950197219849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 745 3.7920880131423473e-03</internalNodes>\n          <leafValues>\n            3.3841941505670547e-02 -5.1016288995742798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 -1.4508679741993546e-03</internalNodes>\n          <leafValues>\n            3.0879148840904236e-01 -6.3845083117485046e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 9.8390132188796997e-04</internalNodes>\n          <leafValues>\n            -1.3029569387435913e-01 1.4604410529136658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 -1.7221809830516577e-03</internalNodes>\n          <leafValues>\n            2.9157009720802307e-01 -6.8549558520317078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 1.0948250070214272e-02</internalNodes>\n          <leafValues>\n            3.4351408481597900e-02 -4.7702258825302124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 -1.7176309484057128e-05</internalNodes>\n          <leafValues>\n            1.6055269539356232e-01 -1.1690840125083923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 -5.4884208366274834e-03</internalNodes>\n          <leafValues>\n            -4.3415889143943787e-01 4.6106241643428802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 -3.0975250992923975e-03</internalNodes>\n          <leafValues>\n            3.7943339347839355e-01 -5.6860551238059998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 6.4182081259787083e-03</internalNodes>\n          <leafValues>\n            -1.5858210623264313e-01 1.2335419654846191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 1.1831239797174931e-02</internalNodes>\n          <leafValues>\n            -4.0929291397333145e-02 4.5878958702087402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 1.3540499843657017e-02</internalNodes>\n          <leafValues>\n            -5.3725559264421463e-02 3.5056120157241821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 -2.5932150892913342e-03</internalNodes>\n          <leafValues>\n            1.1010520160198212e-01 -1.6752210259437561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 1.6856270376592875e-03</internalNodes>\n          <leafValues>\n            6.6574357450008392e-02 -3.0835020542144775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 2.6524690911173820e-03</internalNodes>\n          <leafValues>\n            6.6318482160568237e-02 -2.7861338853836060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 -7.7341729775071144e-03</internalNodes>\n          <leafValues>\n            1.9718359410762787e-01 -1.0782919824123383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 5.0944271497428417e-03</internalNodes>\n          <leafValues>\n            8.5337489843368530e-02 -2.4847009778022766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 -2.9162371065467596e-03</internalNodes>\n          <leafValues>\n            -4.7476351261138916e-01 3.3566489815711975e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 3.0121419113129377e-03</internalNodes>\n          <leafValues>\n            -4.7575380653142929e-02 4.2586800456047058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 3.1694869976490736e-03</internalNodes>\n          <leafValues>\n            -1.0519450157880783e-01 1.7163459956645966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 2.2327560186386108e-01</internalNodes>\n          <leafValues>\n            -1.4370209537446499e-02 9.2483651638031006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 -9.5585048198699951e-02</internalNodes>\n          <leafValues>\n            -7.4206638336181641e-01 2.7818970382213593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 3.4773729566950351e-05</internalNodes>\n          <leafValues>\n            -1.2765780091285706e-01 1.2926669418811798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 7.2459770308341831e-05</internalNodes>\n          <leafValues>\n            -1.6518579423427582e-01 1.0036809742450714e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>59</maxWeakCount>\n      <stageThreshold>-1.0566600561141968e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 768 -6.5778270363807678e-03</internalNodes>\n          <leafValues>\n            3.3815258741378784e-01 -1.5281909704208374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 -1.0922809597104788e-03</internalNodes>\n          <leafValues>\n            2.2282369434833527e-01 -1.9308499991893768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 -2.9759589582681656e-02</internalNodes>\n          <leafValues>\n            2.5959870219230652e-01 -1.5409409999847412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 -1.3147540390491486e-02</internalNodes>\n          <leafValues>\n            1.9033810496330261e-01 -1.6543999314308167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 -1.4396329643204808e-03</internalNodes>\n          <leafValues>\n            2.0071710646152496e-01 -1.2338940054178238e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 -3.5928250290453434e-03</internalNodes>\n          <leafValues>\n            2.3985520005226135e-01 -1.2922149896621704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 -1.5314699849113822e-03</internalNodes>\n          <leafValues>\n            -4.9014899134635925e-01 1.0275030136108398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 -6.2372139655053616e-03</internalNodes>\n          <leafValues>\n            3.1214639544487000e-01 -1.1405629664659500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 -3.3364649862051010e-02</internalNodes>\n          <leafValues>\n            -4.9520879983901978e-01 5.1328450441360474e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 -2.2827699780464172e-02</internalNodes>\n          <leafValues>\n            3.2558828592300415e-01 -6.5089307725429535e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 -8.6199097335338593e-02</internalNodes>\n          <leafValues>\n            -6.7646330595016479e-01 2.6985699310898781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 -2.1065981127321720e-03</internalNodes>\n          <leafValues>\n            2.2452430427074432e-01 -1.2610229849815369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 780 3.9120148867368698e-02</internalNodes>\n          <leafValues>\n            1.1329399794340134e-01 -2.6860630512237549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 3.5082739777863026e-03</internalNodes>\n          <leafValues>\n            -1.1359959840774536e-01 2.5649771094322205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 5.9289898490533233e-04</internalNodes>\n          <leafValues>\n            -1.4942969381809235e-01 1.6409839689731598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 7.1766850305721164e-04</internalNodes>\n          <leafValues>\n            9.9905692040920258e-02 -2.1967969834804535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 -2.1803600713610649e-02</internalNodes>\n          <leafValues>\n            -3.1711721420288086e-01 8.2889586687088013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 -3.2962779514491558e-03</internalNodes>\n          <leafValues>\n            -3.8048729300498962e-01 6.0819379985332489e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 2.4196270387619734e-03</internalNodes>\n          <leafValues>\n            -9.6013016998767853e-02 2.8540581464767456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 -4.4187481398694217e-04</internalNodes>\n          <leafValues>\n            2.2127939760684967e-01 -9.7434908151626587e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 3.4523929934948683e-03</internalNodes>\n          <leafValues>\n            3.7553120404481888e-02 -5.7969051599502563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 -2.1834600716829300e-02</internalNodes>\n          <leafValues>\n            2.9562139511108398e-01 -8.0048300325870514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 -2.1309500152710825e-04</internalNodes>\n          <leafValues>\n            2.2814509272575378e-01 -1.0114189982414246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 -1.6166249988600612e-03</internalNodes>\n          <leafValues>\n            -5.0541198253631592e-01 4.4764541089534760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 7.5959609821438789e-03</internalNodes>\n          <leafValues>\n            4.5986540615558624e-02 -4.1197681427001953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 3.8601809646934271e-03</internalNodes>\n          <leafValues>\n            -8.6563169956207275e-02 2.4809999763965607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 6.0622231103479862e-03</internalNodes>\n          <leafValues>\n            -7.5557373464107513e-02 2.8433260321617126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 -1.7097420059144497e-03</internalNodes>\n          <leafValues>\n            -3.5295820236206055e-01 5.8410499244928360e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 1.6515579074621201e-02</internalNodes>\n          <leafValues>\n            -8.0486953258514404e-02 2.3537430167198181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 4.8465100117027760e-03</internalNodes>\n          <leafValues>\n            4.1895218193531036e-02 -4.8443049192428589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 -3.1167170032858849e-02</internalNodes>\n          <leafValues>\n            1.9192309677600861e-01 -1.0268159955739975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 6.1892281519249082e-04</internalNodes>\n          <leafValues>\n            -2.1085770428180695e-01 9.3886926770210266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 1.1946310289204121e-02</internalNodes>\n          <leafValues>\n            3.9096169173717499e-02 -6.2248629331588745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 -7.5677200220525265e-03</internalNodes>\n          <leafValues>\n            1.5936839580535889e-01 -1.2250780314207077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 -5.3747411817312241e-02</internalNodes>\n          <leafValues>\n            -5.5622178316116333e-01 4.1190009564161301e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 1.5513530001044273e-02</internalNodes>\n          <leafValues>\n            -3.9826881140470505e-02 6.2400728464126587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 1.5246650436893106e-03</internalNodes>\n          <leafValues>\n            7.0138677954673767e-02 -3.0789071321487427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 -4.8315100139006972e-04</internalNodes>\n          <leafValues>\n            1.7887659370899200e-01 -1.0958620160818100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 2.7374739293009043e-03</internalNodes>\n          <leafValues>\n            2.7478590607643127e-02 -8.8489568233489990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 -6.5787717700004578e-02</internalNodes>\n          <leafValues>\n            -4.6432140469551086e-01 3.5037148743867874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 1.2409730115905404e-03</internalNodes>\n          <leafValues>\n            -9.6479237079620361e-02 2.8779220581054688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 8.1398809561505914e-04</internalNodes>\n          <leafValues>\n            1.1511719971895218e-01 -1.6766160726547241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 2.3901820182800293e-02</internalNodes>\n          <leafValues>\n            -3.2603189349174500e-02 6.0017347335815430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 2.7556600049138069e-02</internalNodes>\n          <leafValues>\n            -6.6137343645095825e-02 2.9994478821754456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 -3.8070970913395286e-04</internalNodes>\n          <leafValues>\n            -3.3881181478500366e-01 6.4450770616531372e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 -1.3335429830476642e-03</internalNodes>\n          <leafValues>\n            1.4588660001754761e-01 -1.3217620551586151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 -9.3507990241050720e-03</internalNodes>\n          <leafValues>\n            -5.1177829504013062e-01 3.4969471395015717e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 7.6215229928493500e-03</internalNodes>\n          <leafValues>\n            2.3249529302120209e-02 -6.9619411230087280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 -5.3407860832521692e-05</internalNodes>\n          <leafValues>\n            2.3727379739284515e-01 -8.6910709738731384e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 -1.5332329785451293e-03</internalNodes>\n          <leafValues>\n            1.9228410720825195e-01 -1.0422399640083313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 4.3135890737175941e-03</internalNodes>\n          <leafValues>\n            -9.6219547092914581e-02 2.5601211190223694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -2.3042880638968199e-04</internalNodes>\n          <leafValues>\n            -3.1564751267433167e-01 5.8838598430156708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 -7.8411828726530075e-03</internalNodes>\n          <leafValues>\n            -6.6340929269790649e-01 2.4500999599695206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 1.7103740572929382e-01</internalNodes>\n          <leafValues>\n            3.3831499516963959e-02 -4.5615941286087036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 -1.6011140542104840e-03</internalNodes>\n          <leafValues>\n            2.1574890613555908e-01 -8.3622530102729797e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 -1.0535780340433121e-02</internalNodes>\n          <leafValues>\n            2.4552319943904877e-01 -8.2384489476680756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 -5.8351638726890087e-03</internalNodes>\n          <leafValues>\n            -4.7807329893112183e-01 4.4086221605539322e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 -1.8706109374761581e-02</internalNodes>\n          <leafValues>\n            -6.0024029016494751e-01 2.1410040557384491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 -9.3307439237833023e-04</internalNodes>\n          <leafValues>\n            2.4323590099811554e-01 -7.4165716767311096e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>88</maxWeakCount>\n      <stageThreshold>-9.7693431377410889e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 827 1.0646229609847069e-02</internalNodes>\n          <leafValues>\n            -1.3861389458179474e-01 2.6494070887565613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 3.5298269242048264e-02</internalNodes>\n          <leafValues>\n            -7.5821727514266968e-02 3.9021068811416626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 7.5638387352228165e-04</internalNodes>\n          <leafValues>\n            -9.5521442592144012e-02 2.9061999917030334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 9.2497706413269043e-02</internalNodes>\n          <leafValues>\n            -2.7704238891601562e-01 7.9474702477455139e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 -2.9340879991650581e-03</internalNodes>\n          <leafValues>\n            2.2989539802074432e-01 -7.8550010919570923e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 -8.6535848677158356e-02</internalNodes>\n          <leafValues>\n            4.7744810581207275e-01 -6.8231220357120037e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 5.4699288739357144e-05</internalNodes>\n          <leafValues>\n            -2.2642609477043152e-01 8.8192112743854523e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 -3.6592520773410797e-02</internalNodes>\n          <leafValues>\n            2.7353870868682861e-01 -9.8606742918491364e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 2.6469118893146515e-03</internalNodes>\n          <leafValues>\n            -4.4083978980779648e-02 3.1445288658142090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 -4.4271810911595821e-03</internalNodes>\n          <leafValues>\n            2.3822729289531708e-01 -8.6784273386001587e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -5.1882481202483177e-03</internalNodes>\n          <leafValues>\n            1.5042769908905029e-01 -1.2672109901905060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 838 4.5530400238931179e-03</internalNodes>\n          <leafValues>\n            -5.5945020169019699e-02 3.6501631140708923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 1.4562410302460194e-02</internalNodes>\n          <leafValues>\n            3.6397770047187805e-02 -5.3559190034866333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 6.8677567469421774e-05</internalNodes>\n          <leafValues>\n            -1.7479629814624786e-01 1.1068709939718246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 -5.9744901955127716e-03</internalNodes>\n          <leafValues>\n            3.1077870726585388e-01 -6.6530227661132812e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 -5.8691250160336494e-03</internalNodes>\n          <leafValues>\n            -3.1901490688323975e-01 6.3931830227375031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 -1.1140310205519199e-02</internalNodes>\n          <leafValues>\n            2.4364790320396423e-01 -8.0935180187225342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 -5.8643531054258347e-02</internalNodes>\n          <leafValues>\n            -7.6083260774612427e-01 3.0809629708528519e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 -4.6097282320261002e-03</internalNodes>\n          <leafValues>\n            -4.5315021276473999e-01 2.9879059642553329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 -9.3032103031873703e-03</internalNodes>\n          <leafValues>\n            1.4513379335403442e-01 -1.1033169925212860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 1.3253629440441728e-03</internalNodes>\n          <leafValues>\n            -9.7698956727981567e-02 1.9646440446376801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 4.9800761044025421e-03</internalNodes>\n          <leafValues>\n            3.3648081123828888e-02 -3.9792209863662720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 -7.6542161405086517e-03</internalNodes>\n          <leafValues>\n            9.0841993689537048e-02 -1.5967549383640289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 -3.8920590281486511e-01</internalNodes>\n          <leafValues>\n            -6.6571092605590820e-01 1.9028829410672188e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 -1.0019669681787491e-01</internalNodes>\n          <leafValues>\n            -5.7559269666671753e-01 2.4282779544591904e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 7.3541211895644665e-04</internalNodes>\n          <leafValues>\n            8.7919801473617554e-02 -1.6195340454578400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 -3.4802639856934547e-03</internalNodes>\n          <leafValues>\n            2.6064491271972656e-01 -6.0200810432434082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 8.4000425413250923e-03</internalNodes>\n          <leafValues>\n            -1.0979729890823364e-01 1.5707309544086456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 2.3786011151969433e-03</internalNodes>\n          <leafValues>\n            3.6058239638805389e-02 -4.7277191281318665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 7.3831682093441486e-03</internalNodes>\n          <leafValues>\n            -3.5756360739469528e-02 4.9498590826988220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 3.2115620560944080e-03</internalNodes>\n          <leafValues>\n            -1.0125560313463211e-01 1.5747989714145660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 -7.8209668397903442e-02</internalNodes>\n          <leafValues>\n            -7.6627081632614136e-01 2.2965829819440842e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 5.3303989261621609e-05</internalNodes>\n          <leafValues>\n            -1.3414350152015686e-01 1.1114919930696487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 -9.6419155597686768e-03</internalNodes>\n          <leafValues>\n            2.5068029761314392e-01 -6.6608138382434845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 -7.1092672646045685e-02</internalNodes>\n          <leafValues>\n            -4.0056818723678589e-01 4.0297791361808777e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 3.5171560011804104e-04</internalNodes>\n          <leafValues>\n            4.1861180216073990e-02 -3.2961198687553406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 -3.3458150574006140e-04</internalNodes>\n          <leafValues>\n            -2.6029831171035767e-01 6.7892737686634064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 -4.1451421566307545e-03</internalNodes>\n          <leafValues>\n            2.3967699706554413e-01 -7.2093337774276733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 3.1754500232636929e-03</internalNodes>\n          <leafValues>\n            -7.1235269308090210e-02 2.4128450453281403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 -5.5184490047395229e-03</internalNodes>\n          <leafValues>\n            5.0320237874984741e-01 -2.9686680063605309e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 -3.0242869979701936e-04</internalNodes>\n          <leafValues>\n            2.4879050254821777e-01 -5.6758578866720200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 -1.3125919504091144e-03</internalNodes>\n          <leafValues>\n            3.1747800111770630e-01 -4.1845861822366714e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 -2.7123570907860994e-04</internalNodes>\n          <leafValues>\n            -2.7042070031166077e-01 5.6828990578651428e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 -7.3241777718067169e-03</internalNodes>\n          <leafValues>\n            2.7556678652763367e-01 -5.4252970963716507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 -1.6851710155606270e-02</internalNodes>\n          <leafValues>\n            -3.4852910041809082e-01 4.5368999242782593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 2.9902100563049316e-02</internalNodes>\n          <leafValues>\n            3.1621079891920090e-02 -4.3114370107650757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 2.8902660124003887e-03</internalNodes>\n          <leafValues>\n            3.8029961287975311e-02 -3.7027099728584290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 -1.9242949783802032e-03</internalNodes>\n          <leafValues>\n            2.4800279736518860e-01 -5.9333298355340958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 4.9354149959981441e-03</internalNodes>\n          <leafValues>\n            -8.3068400621414185e-02 2.2043809294700623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 8.2075603306293488e-02</internalNodes>\n          <leafValues>\n            -1.9413439556956291e-02 6.9089287519454956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 -2.4699489586055279e-04</internalNodes>\n          <leafValues>\n            -2.4660569429397583e-01 6.4776450395584106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 -1.8365769647061825e-03</internalNodes>\n          <leafValues>\n            2.8836160898208618e-01 -5.3390458226203918e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 -4.9553811550140381e-03</internalNodes>\n          <leafValues>\n            1.2740829586982727e-01 -1.2559419870376587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 -8.3086621016263962e-03</internalNodes>\n          <leafValues>\n            2.3478110134601593e-01 -7.1676492691040039e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 -1.0879919677972794e-01</internalNodes>\n          <leafValues>\n            -2.5992238521575928e-01 5.8689739555120468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 -9.6786450594663620e-03</internalNodes>\n          <leafValues>\n            -7.0720428228378296e-01 1.8749259412288666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 -2.7136830613017082e-02</internalNodes>\n          <leafValues>\n            -5.8384227752685547e-01 2.1684130653738976e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 -6.5389778465032578e-03</internalNodes>\n          <leafValues>\n            -5.9748911857604980e-01 2.1480310708284378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 -1.2095630168914795e-02</internalNodes>\n          <leafValues>\n            1.3269039988517761e-01 -9.9722720682621002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 -1.6776099801063538e-01</internalNodes>\n          <leafValues>\n            -5.6655067205429077e-01 3.2123088836669922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 -1.3262550346553326e-02</internalNodes>\n          <leafValues>\n            1.1495590209960938e-01 -1.1738389730453491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 7.6744519174098969e-02</internalNodes>\n          <leafValues>\n            -3.1413231045007706e-02 5.9935492277145386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 5.0785229541361332e-03</internalNodes>\n          <leafValues>\n            -5.2911940962076187e-02 2.3342399299144745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 3.1800279393792152e-03</internalNodes>\n          <leafValues>\n            -7.7734388411045074e-02 1.7652909457683563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 -1.7729829996824265e-03</internalNodes>\n          <leafValues>\n            1.9591629505157471e-01 -7.9752199351787567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 -4.8560940194875002e-04</internalNodes>\n          <leafValues>\n            -2.8800371289253235e-01 4.9047119915485382e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 3.6554320831783116e-04</internalNodes>\n          <leafValues>\n            6.7922897636890411e-02 -2.2499430179595947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 -2.6938671362586319e-04</internalNodes>\n          <leafValues>\n            1.6582170128822327e-01 -8.9744098484516144e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 7.8684233129024506e-02</internalNodes>\n          <leafValues>\n            2.6081679388880730e-02 -5.5693739652633667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 -7.3774810880422592e-04</internalNodes>\n          <leafValues>\n            1.4036870002746582e-01 -1.1800300329923630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 2.3957829922437668e-02</internalNodes>\n          <leafValues>\n            3.0470740050077438e-02 -4.6159979701042175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 -1.6239080578088760e-03</internalNodes>\n          <leafValues>\n            2.6327079534530640e-01 -5.6765370070934296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 -9.0819748584181070e-04</internalNodes>\n          <leafValues>\n            1.5462459623813629e-01 -1.1087069660425186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 3.9806248969398439e-04</internalNodes>\n          <leafValues>\n            5.5630370974540710e-02 -2.8331959247589111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 2.0506449509412050e-03</internalNodes>\n          <leafValues>\n            -9.1604836285114288e-02 1.7585539817810059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 2.6742549613118172e-02</internalNodes>\n          <leafValues>\n            6.2003031373023987e-02 -2.4487000703811646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 -2.1497008856385946e-03</internalNodes>\n          <leafValues>\n            2.9449298977851868e-01 -5.3218148648738861e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 5.6671658530831337e-03</internalNodes>\n          <leafValues>\n            -6.4298242330551147e-02 2.4905680119991302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 6.8317902332637459e-05</internalNodes>\n          <leafValues>\n            -1.6819630563259125e-01 9.6548579633235931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 1.7600439605303109e-04</internalNodes>\n          <leafValues>\n            6.5308012068271637e-02 -2.4267880618572235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 4.1861608624458313e-03</internalNodes>\n          <leafValues>\n            -9.7988583147525787e-02 1.8052889406681061e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 -2.1808340679854155e-03</internalNodes>\n          <leafValues>\n            1.9231270253658295e-01 -9.4123929738998413e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 2.1730400621891022e-02</internalNodes>\n          <leafValues>\n            3.5578511655330658e-02 -4.5088538527488708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 -1.4780269935727119e-02</internalNodes>\n          <leafValues>\n            -4.3927010893821716e-01 3.1735591590404510e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 -3.6145891062915325e-03</internalNodes>\n          <leafValues>\n            1.9811479747295380e-01 -7.7701419591903687e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 1.8892709631472826e-03</internalNodes>\n          <leafValues>\n            1.9962439313530922e-02 -7.2041720151901245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 -1.3822480104863644e-03</internalNodes>\n          <leafValues>\n            9.8466947674751282e-02 -1.4881080389022827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 -3.9505911991000175e-03</internalNodes>\n          <leafValues>\n            1.1593230068683624e-01 -1.2791970372200012e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>58</maxWeakCount>\n      <stageThreshold>-1.0129359960556030e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 915 -1.9395539537072182e-02</internalNodes>\n          <leafValues>\n            4.7474750876426697e-01 -1.1721090227365494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 1.3118919916450977e-02</internalNodes>\n          <leafValues>\n            -2.5552129745483398e-01 1.6378800570964813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 -5.1606801571324468e-04</internalNodes>\n          <leafValues>\n            1.9452619552612305e-01 -1.7448890209197998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 -1.3184159994125366e-02</internalNodes>\n          <leafValues>\n            4.4181451201438904e-01 -9.0048752725124359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 3.4657081123441458e-03</internalNodes>\n          <leafValues>\n            -1.3477090001106262e-01 1.8056340515613556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 6.2980200164020061e-03</internalNodes>\n          <leafValues>\n            -5.4164979606866837e-02 3.6033380031585693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 1.6879989998415112e-03</internalNodes>\n          <leafValues>\n            -1.9997949898242950e-01 1.2021599709987640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 3.6039709812030196e-04</internalNodes>\n          <leafValues>\n            1.0524140298366547e-01 -2.4116060137748718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 -1.5276849735528231e-03</internalNodes>\n          <leafValues>\n            2.8135529160499573e-01 -6.8964816629886627e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 3.5033570602536201e-03</internalNodes>\n          <leafValues>\n            -8.2519583404064178e-02 4.0713590383529663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -4.7337161377072334e-03</internalNodes>\n          <leafValues>\n            1.9727009534835815e-01 -1.1710140109062195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 -1.1557149700820446e-02</internalNodes>\n          <leafValues>\n            -5.6061112880706787e-01 6.8170957267284393e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 -2.7445720508694649e-02</internalNodes>\n          <leafValues>\n            4.9718621373176575e-01 -6.2380149960517883e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 -5.2825778722763062e-02</internalNodes>\n          <leafValues>\n            1.6921220719814301e-01 -1.3093550503253937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 -2.9849699139595032e-01</internalNodes>\n          <leafValues>\n            -6.4649671316146851e-01 4.0076818317174911e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 -2.6307269581593573e-04</internalNodes>\n          <leafValues>\n            2.5127941370010376e-01 -8.9494839310646057e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 2.3261709429789335e-04</internalNodes>\n          <leafValues>\n            -8.6843989789485931e-02 2.3831979930400848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 2.3631360090803355e-04</internalNodes>\n          <leafValues>\n            1.1554460227489471e-01 -1.8936349451541901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 2.0742209162563086e-03</internalNodes>\n          <leafValues>\n            -4.8594851046800613e-02 5.7485991716384888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 -7.0308889262378216e-03</internalNodes>\n          <leafValues>\n            -5.4120808839797974e-01 4.8743750900030136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 8.2652270793914795e-03</internalNodes>\n          <leafValues>\n            2.6494519785046577e-02 -6.1728459596633911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 2.0042760297656059e-04</internalNodes>\n          <leafValues>\n            -1.1768630146980286e-01 1.6333860158920288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 1.6470040427520871e-03</internalNodes>\n          <leafValues>\n            -5.9954918920993805e-02 3.5179701447486877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 -3.5642538568936288e-04</internalNodes>\n          <leafValues>\n            -3.4420299530029297e-01 6.4948253333568573e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 -3.0935870483517647e-02</internalNodes>\n          <leafValues>\n            1.9979700446128845e-01 -9.7693696618080139e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 -6.3578772824257612e-04</internalNodes>\n          <leafValues>\n            -3.1481391191482544e-01 5.9425041079521179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 -1.1862180195748806e-02</internalNodes>\n          <leafValues>\n            2.0043690502643585e-01 -8.9447543025016785e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 7.1508930996060371e-03</internalNodes>\n          <leafValues>\n            -3.9006061851978302e-02 5.3327161073684692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 -2.0059191156178713e-03</internalNodes>\n          <leafValues>\n            -2.8469720482826233e-01 7.0723608136177063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 3.6412389017641544e-03</internalNodes>\n          <leafValues>\n            -1.0660319775342941e-01 2.4944800138473511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 -1.3467429578304291e-01</internalNodes>\n          <leafValues>\n            4.9910080432891846e-01 -4.0332220494747162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 -2.2547659464180470e-03</internalNodes>\n          <leafValues>\n            1.6851690411567688e-01 -1.1119280010461807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 4.3842289596796036e-03</internalNodes>\n          <leafValues>\n            8.6139492690563202e-02 -2.7431771159172058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 -7.3361168615520000e-03</internalNodes>\n          <leafValues>\n            2.4875210225582123e-01 -9.5919162034988403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 6.4666912658140063e-04</internalNodes>\n          <leafValues>\n            6.7431576550006866e-02 -3.3754080533981323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 2.2983769304119051e-04</internalNodes>\n          <leafValues>\n            -8.3903051912784576e-02 2.4584099650382996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 6.7039071582257748e-03</internalNodes>\n          <leafValues>\n            2.9079329222440720e-02 -6.9055938720703125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 5.0734888645820320e-05</internalNodes>\n          <leafValues>\n            -1.5696719288825989e-01 1.1965429782867432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 -2.0335559546947479e-01</internalNodes>\n          <leafValues>\n            -6.9506347179412842e-01 2.7507519349455833e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 9.4939414411783218e-03</internalNodes>\n          <leafValues>\n            -8.7449371814727783e-02 2.3968330025672913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 -2.4055240210145712e-03</internalNodes>\n          <leafValues>\n            2.1150960028171539e-01 -1.3148930668830872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 -1.1342419747961685e-04</internalNodes>\n          <leafValues>\n            1.5233789384365082e-01 -1.2725900113582611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 1.4992210082709789e-02</internalNodes>\n          <leafValues>\n            -3.4127969294786453e-02 5.0624072551727295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 7.4068200774490833e-04</internalNodes>\n          <leafValues>\n            4.8764750361442566e-02 -4.0225321054458618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 -4.2459447868168354e-03</internalNodes>\n          <leafValues>\n            2.1554760634899139e-01 -8.7126992642879486e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 6.8655109498649836e-04</internalNodes>\n          <leafValues>\n            -7.5418718159198761e-02 2.6405909657478333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 -1.6751460731029510e-02</internalNodes>\n          <leafValues>\n            -6.7729032039642334e-01 3.2918728888034821e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 -2.6301678735762835e-04</internalNodes>\n          <leafValues>\n            2.2725869715213776e-01 -9.0534873306751251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 4.3398610432632267e-04</internalNodes>\n          <leafValues>\n            5.5894378572702408e-02 -3.5592669248580933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 -2.0150149241089821e-02</internalNodes>\n          <leafValues>\n            1.9162760674953461e-01 -9.4929970800876617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 -1.4452129602432251e-02</internalNodes>\n          <leafValues>\n            -6.8510341644287109e-01 2.5422170758247375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 -2.1149739623069763e-02</internalNodes>\n          <leafValues>\n            3.7533190846443176e-01 -5.1496580243110657e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 2.1137770265340805e-02</internalNodes>\n          <leafValues>\n            2.9083080589771271e-02 -8.9430367946624756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 1.1524349683895707e-03</internalNodes>\n          <leafValues>\n            -6.9694936275482178e-02 2.7299800515174866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 -1.9070580310653895e-04</internalNodes>\n          <leafValues>\n            1.8228119611740112e-01 -9.8367072641849518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 -3.6349631845951080e-02</internalNodes>\n          <leafValues>\n            -8.3693099021911621e-01 2.5055760517716408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 -9.0632075443863869e-03</internalNodes>\n          <leafValues>\n            4.1463500261306763e-01 -5.4413449019193649e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 -2.0535490475594997e-03</internalNodes>\n          <leafValues>\n            -1.9750310480594635e-01 1.0506899654865265e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>93</maxWeakCount>\n      <stageThreshold>-9.7747492790222168e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 973 -2.2717019543051720e-02</internalNodes>\n          <leafValues>\n            2.4288550019264221e-01 -1.4745520055294037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 2.5505950674414635e-02</internalNodes>\n          <leafValues>\n            -2.8551739454269409e-01 1.0837209969758987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 -2.6640091091394424e-03</internalNodes>\n          <leafValues>\n            2.9275730252265930e-01 -1.0372710227966309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 -3.8115289062261581e-03</internalNodes>\n          <leafValues>\n            2.1426899731159210e-01 -1.3811139762401581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 977 -1.6732690855860710e-02</internalNodes>\n          <leafValues>\n            2.6550260186195374e-01 -4.3911330401897430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 4.9277010839432478e-04</internalNodes>\n          <leafValues>\n            2.1104559302330017e-02 -4.2971360683441162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 -3.6691110581159592e-02</internalNodes>\n          <leafValues>\n            5.3992420434951782e-01 -4.3648801743984222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 1.2615970335900784e-03</internalNodes>\n          <leafValues>\n            -1.2933869659900665e-01 1.6638770699501038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 -8.4106856957077980e-03</internalNodes>\n          <leafValues>\n            -9.4698411226272583e-01 2.1465849131345749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 6.4902722835540771e-02</internalNodes>\n          <leafValues>\n            -7.1727760136127472e-02 2.6613479852676392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 3.0305000022053719e-02</internalNodes>\n          <leafValues>\n            -8.2782492041587830e-02 2.7694320678710938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 2.5875340215861797e-03</internalNodes>\n          <leafValues>\n            -1.2966169416904449e-01 1.7756630480289459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 -7.0240451022982597e-03</internalNodes>\n          <leafValues>\n            -6.4243179559707642e-01 3.9943210780620575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 -1.0099769569933414e-03</internalNodes>\n          <leafValues>\n            1.4176610112190247e-01 -1.1659970134496689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 -4.1179071558872238e-05</internalNodes>\n          <leafValues>\n            1.5687669813632965e-01 -1.1127340048551559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 -4.7293151146732271e-04</internalNodes>\n          <leafValues>\n            -3.3554559946060181e-01 4.5977730304002762e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 -1.7178079579025507e-03</internalNodes>\n          <leafValues>\n            1.6952909529209137e-01 -1.0578069835901260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 990 -1.3333169743418694e-02</internalNodes>\n          <leafValues>\n            -5.8257812261581421e-01 3.0978430062532425e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 991 -1.8783430568873882e-03</internalNodes>\n          <leafValues>\n            1.4266879856586456e-01 -1.1131259799003601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 992 -6.5765981562435627e-03</internalNodes>\n          <leafValues>\n            2.7561360597610474e-01 -5.3100328892469406e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 993 -7.7210381277836859e-05</internalNodes>\n          <leafValues>\n            1.3240240514278412e-01 -1.1167799681425095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 994 2.1968539804220200e-02</internalNodes>\n          <leafValues>\n            -2.6968160644173622e-02 5.0067168474197388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 995 -2.7445750311017036e-02</internalNodes>\n          <leafValues>\n            -2.4086740612983704e-01 6.0478270053863525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 996 7.8305849456228316e-05</internalNodes>\n          <leafValues>\n            -1.3334889709949493e-01 1.0123469680547714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 997 7.0190683007240295e-02</internalNodes>\n          <leafValues>\n            -5.4863780736923218e-02 2.4809940159320831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 998 -7.1902133524417877e-02</internalNodes>\n          <leafValues>\n            -3.7846690416336060e-01 4.2210999876260757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 999 -1.0780979692935944e-01</internalNodes>\n          <leafValues>\n            -3.7486588954925537e-01 4.2833440005779266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1000 1.4364200178533792e-03</internalNodes>\n          <leafValues>\n            8.0476358532905579e-02 -1.7263789474964142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1001 6.8289190530776978e-02</internalNodes>\n          <leafValues>\n            -3.5595789551734924e-02 4.0761318802833557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1002 -6.8037179298698902e-03</internalNodes>\n          <leafValues>\n            1.9233790040016174e-01 -8.2368023693561554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1003 -5.6193489581346512e-04</internalNodes>\n          <leafValues>\n            1.3057120144367218e-01 -1.4355149865150452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1004 -5.8276649564504623e-02</internalNodes>\n          <leafValues>\n            -3.0125439167022705e-01 5.2819650620222092e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1005 -6.1205718666315079e-03</internalNodes>\n          <leafValues>\n            2.2043900191783905e-01 -7.5691752135753632e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1006 -1.3594309799373150e-02</internalNodes>\n          <leafValues>\n            -3.9049360156059265e-01 4.1857108473777771e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1007 1.3626200379803777e-03</internalNodes>\n          <leafValues>\n            -9.5363423228263855e-02 1.4970320463180542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1008 -1.5074219845701009e-04</internalNodes>\n          <leafValues>\n            -2.3945580422878265e-01 6.4798332750797272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1009 -7.7414259314537048e-02</internalNodes>\n          <leafValues>\n            5.5941981077194214e-01 -2.4516880512237549e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1010 9.2117872554808855e-04</internalNodes>\n          <leafValues>\n            5.4928861558437347e-02 -2.7934810519218445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1011 1.0250780032947659e-03</internalNodes>\n          <leafValues>\n            -6.2167309224605560e-02 2.4976369738578796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1012 -8.1174750812351704e-04</internalNodes>\n          <leafValues>\n            2.3437939584255219e-01 -6.5725810825824738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1013 8.3431020379066467e-02</internalNodes>\n          <leafValues>\n            5.0954800099134445e-02 -3.1020981073379517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1014 -9.2014456167817116e-03</internalNodes>\n          <leafValues>\n            -3.9242538809776306e-01 3.2926950603723526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1015 -2.9086650465615094e-04</internalNodes>\n          <leafValues>\n            -3.1039750576019287e-01 4.9711819738149643e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1016 7.7576898038387299e-03</internalNodes>\n          <leafValues>\n            -4.4040750712156296e-02 3.6431351304054260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1017 -1.2466090172529221e-01</internalNodes>\n          <leafValues>\n            -8.1957077980041504e-01 1.9150640815496445e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1018 1.3242550194263458e-02</internalNodes>\n          <leafValues>\n            3.8988839834928513e-02 -3.3230680227279663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1019 -6.6770128905773163e-03</internalNodes>\n          <leafValues>\n            -3.5790139436721802e-01 4.0460210293531418e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1020 -2.7479929849505424e-03</internalNodes>\n          <leafValues>\n            2.5253900885581970e-01 -5.6427821516990662e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1021 8.2659651525318623e-04</internalNodes>\n          <leafValues>\n            -7.1988657116889954e-02 2.2780479490756989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1022 -5.0153400748968124e-02</internalNodes>\n          <leafValues>\n            -6.3036471605300903e-01 2.7462050318717957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1023 7.4203149415552616e-03</internalNodes>\n          <leafValues>\n            -6.6610716283321381e-02 2.7787339687347412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1024 -6.7951780511066318e-04</internalNodes>\n          <leafValues>\n            -3.6327061057090759e-01 4.2795430868864059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1025 -1.9305750029161572e-03</internalNodes>\n          <leafValues>\n            1.4196230471134186e-01 -1.0759980231523514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1026 -3.8132671033963561e-04</internalNodes>\n          <leafValues>\n            2.1591760218143463e-01 -7.0202663540840149e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1027 -7.0990346372127533e-02</internalNodes>\n          <leafValues>\n            4.5266601443290710e-01 -4.0750481188297272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1028 -5.3368080407381058e-02</internalNodes>\n          <leafValues>\n            -6.7674058675765991e-01 1.9288340583443642e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1029 -2.0064849406480789e-02</internalNodes>\n          <leafValues>\n            -4.3365430831909180e-01 3.1853288412094116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1030 1.1976360110566020e-03</internalNodes>\n          <leafValues>\n            -2.6559870690107346e-02 5.0797182321548462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1031 -2.2697300300933421e-04</internalNodes>\n          <leafValues>\n            1.8012599647045135e-01 -8.3606548607349396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1032 1.5262699685990810e-02</internalNodes>\n          <leafValues>\n            -2.0238929986953735e-01 6.7422017455101013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1033 -2.0811769366264343e-01</internalNodes>\n          <leafValues>\n            6.6943860054016113e-01 -2.2452110424637794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1034 1.5514369588345289e-03</internalNodes>\n          <leafValues>\n            -7.5121842324733734e-02 1.7326919734477997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1035 -5.2924010902643204e-02</internalNodes>\n          <leafValues>\n            2.4992519617080688e-01 -6.2879167497158051e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1036 -2.1648850291967392e-02</internalNodes>\n          <leafValues>\n            -2.9194280505180359e-01 5.2614491432905197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1037 -2.2905069636180997e-04</internalNodes>\n          <leafValues>\n            -2.2117300331592560e-01 6.3168339431285858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1038 5.0170070608146489e-05</internalNodes>\n          <leafValues>\n            -1.1510709673166275e-01 1.1611440032720566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1039 -1.6416069411206990e-04</internalNodes>\n          <leafValues>\n            1.5871520340442657e-01 -8.2600601017475128e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1040 -1.2003289535641670e-02</internalNodes>\n          <leafValues>\n            1.2218090146780014e-01 -1.1229699850082397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1041 -1.7784100025892258e-02</internalNodes>\n          <leafValues>\n            -3.5072788596153259e-01 3.1341921538114548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1042 -6.3457582145929337e-03</internalNodes>\n          <leafValues>\n            1.3078069686889648e-01 -1.0574410110712051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1043 -7.9523242311552167e-04</internalNodes>\n          <leafValues>\n            1.7204670608043671e-01 -8.6001992225646973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1044 -3.1029590172693133e-04</internalNodes>\n          <leafValues>\n            -2.8433170914649963e-01 5.1817119121551514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1045 -1.7053710296750069e-02</internalNodes>\n          <leafValues>\n            3.9242428541183472e-01 -4.0143270045518875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1046 4.6504959464073181e-03</internalNodes>\n          <leafValues>\n            -3.1837560236454010e-02 4.1237699985504150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1047 -1.0358760133385658e-02</internalNodes>\n          <leafValues>\n            -5.6993198394775391e-01 2.9248379170894623e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1048 -2.2196240723133087e-02</internalNodes>\n          <leafValues>\n            -4.5605289936065674e-01 2.6285989210009575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1049 -7.0536029525101185e-03</internalNodes>\n          <leafValues>\n            1.5998320281505585e-01 -9.1594859957695007e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1050 -5.7094299700111151e-04</internalNodes>\n          <leafValues>\n            -1.4076329767704010e-01 1.0287419706583023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1051 -2.2152599412947893e-03</internalNodes>\n          <leafValues>\n            1.6593599319458008e-01 -8.5273988544940948e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1052 -2.8084890916943550e-02</internalNodes>\n          <leafValues>\n            2.7022340893745422e-01 -5.5873811244964600e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1053 2.1515151020139456e-03</internalNodes>\n          <leafValues>\n            4.2472891509532928e-02 -3.2005849480628967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1054 -2.9733829433098435e-04</internalNodes>\n          <leafValues>\n            1.6177169978618622e-01 -8.5115589201450348e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1055 -1.6694780439138412e-02</internalNodes>\n          <leafValues>\n            -4.2858770489692688e-01 3.0541609972715378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1056 1.1982990056276321e-01</internalNodes>\n          <leafValues>\n            -1.6277290880680084e-02 7.9846781492233276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1057 -3.5499420482665300e-04</internalNodes>\n          <leafValues>\n            1.5935939550399780e-01 -8.3272881805896759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1058 -1.8226269632577896e-02</internalNodes>\n          <leafValues>\n            1.9527280330657959e-01 -7.3939889669418335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1059 -4.0238600922748446e-04</internalNodes>\n          <leafValues>\n            7.9101808369159698e-02 -2.0806129276752472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1060 4.0892060496844351e-04</internalNodes>\n          <leafValues>\n            1.0036630183458328e-01 -1.5128210186958313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1061 9.5368112670257688e-04</internalNodes>\n          <leafValues>\n            -7.3011666536331177e-02 2.1752020716667175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1062 4.3081799149513245e-01</internalNodes>\n          <leafValues>\n            -2.7450699359178543e-02 5.7061582803726196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1063 5.3564831614494324e-04</internalNodes>\n          <leafValues>\n            1.1587540060281754e-01 -1.2790560722351074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1064 2.4430730263702571e-05</internalNodes>\n          <leafValues>\n            -1.6816629469394684e-01 8.0449983477592468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1065 -5.5345650762319565e-02</internalNodes>\n          <leafValues>\n            4.5338949561119080e-01 -3.1222779303789139e-02</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          0 8 20 12 -1.</_>\n        <_>\n          0 14 20 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 15 -1.</_>\n        <_>\n          9 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 2 -1.</_>\n        <_>\n          9 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 9 -1.</_>\n        <_>\n          7 3 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 2 18 -1.</_>\n        <_>\n          12 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 6 -1.</_>\n        <_>\n          8 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 17 18 -1.</_>\n        <_>\n          2 6 17 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 1 8 -1.</_>\n        <_>\n          10 14 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 9 2 -1.</_>\n        <_>\n          10 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 6 -1.</_>\n        <_>\n          5 3 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 15 9 -1.</_>\n        <_>\n          3 4 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 9 6 -1.</_>\n        <_>\n          6 5 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 6 3 -1.</_>\n        <_>\n          10 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 9 1 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 11 -1.</_>\n        <_>\n          3 7 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 1 -1.</_>\n        <_>\n          10 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 2 -1.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 3 -1.</_>\n        <_>\n          11 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 5 18 -1.</_>\n        <_>\n          8 6 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 7 -1.</_>\n        <_>\n          9 7 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 10 -1.</_>\n        <_>\n          16 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 9 5 -1.</_>\n        <_>\n          12 8 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 9 6 -1.</_>\n        <_>\n          6 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 6 -1.</_>\n        <_>\n          3 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 18 -1.</_>\n        <_>\n          16 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 3 3 -1.</_>\n        <_>\n          0 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 1 -1.</_>\n        <_>\n          17 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 12 -1.</_>\n        <_>\n          0 14 20 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 8 -1.</_>\n        <_>\n          9 6 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 9 -1.</_>\n        <_>\n          5 6 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 1 2 -1.</_>\n        <_>\n          4 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 1 -1.</_>\n        <_>\n          19 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 5 -1.</_>\n        <_>\n          11 8 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 6 -1.</_>\n        <_>\n          8 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 7 -1.</_>\n        <_>\n          13 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 14 1 2 -1.</_>\n        <_>\n          19 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 1 2 -1.</_>\n        <_>\n          6 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 2 7 -1.</_>\n        <_>\n          15 7 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 4 -1.</_>\n        <_>\n          7 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 6 -1.</_>\n        <_>\n          5 10 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 1 3 -1.</_>\n        <_>\n          2 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 6 -1.</_>\n        <_>\n          7 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 12 -1.</_>\n        <_>\n          9 7 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 11 12 -1.</_>\n        <_>\n          6 6 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 5 8 -1.</_>\n        <_>\n          1 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 7 -1.</_>\n        <_>\n          16 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 6 -1.</_>\n        <_>\n          12 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 4 2 -1.</_>\n        <_>\n          16 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 3 -1.</_>\n        <_>\n          18 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 7 -1.</_>\n        <_>\n          10 7 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 8 -1.</_>\n        <_>\n          7 6 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 6 11 -1.</_>\n        <_>\n          4 6 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 12 8 -1.</_>\n        <_>\n          8 14 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 6 3 -1.</_>\n        <_>\n          9 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 3 3 -1.</_>\n        <_>\n          11 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 6 -1.</_>\n        <_>\n          9 8 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 5 -1.</_>\n        <_>\n          9 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 1 3 -1.</_>\n        <_>\n          6 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          0 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 11 9 -1.</_>\n        <_>\n          4 4 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 9 -1.</_>\n        <_>\n          3 4 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 4 -1.</_>\n        <_>\n          2 9 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 13 1 2 -1.</_>\n        <_>\n          18 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 3 11 -1.</_>\n        <_>\n          14 5 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 8 2 -1.</_>\n        <_>\n          0 18 4 1 2.</_>\n        <_>\n          4 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 5 -1.</_>\n        <_>\n          9 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 11 10 -1.</_>\n        <_>\n          4 12 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 4 -1.</_>\n        <_>\n          16 9 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 8 -1.</_>\n        <_>\n          3 7 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 3 3 -1.</_>\n        <_>\n          0 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 12 1 -1.</_>\n        <_>\n          11 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 9 4 -1.</_>\n        <_>\n          7 8 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 6 4 -1.</_>\n        <_>\n          7 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 10 -1.</_>\n        <_>\n          4 9 2 5 2.</_>\n        <_>\n          6 14 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 4 -1.</_>\n        <_>\n          6 8 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 2 18 -1.</_>\n        <_>\n          10 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 6 -1.</_>\n        <_>\n          0 5 4 3 2.</_>\n        <_>\n          4 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 5 -1.</_>\n        <_>\n          8 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 14 -1.</_>\n        <_>\n          18 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 4 2 -1.</_>\n        <_>\n          10 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 6 3 -1.</_>\n        <_>\n          1 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 5 -1.</_>\n        <_>\n          12 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 4 -1.</_>\n        <_>\n          12 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 5 -1.</_>\n        <_>\n          13 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 7 -1.</_>\n        <_>\n          3 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 1 3 -1.</_>\n        <_>\n          0 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 9 6 -1.</_>\n        <_>\n          3 4 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 9 2 -1.</_>\n        <_>\n          8 7 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 3 6 -1.</_>\n        <_>\n          0 16 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 4 -1.</_>\n        <_>\n          3 11 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 3 -1.</_>\n        <_>\n          9 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 6 -1.</_>\n        <_>\n          6 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 6 -1.</_>\n        <_>\n          8 7 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 2 1 -1.</_>\n        <_>\n          2 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 2 -1.</_>\n        <_>\n          12 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 6 -1.</_>\n        <_>\n          15 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 6 4 -1.</_>\n        <_>\n          8 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 9 -1.</_>\n        <_>\n          8 3 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 3 -1.</_>\n        <_>\n          8 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 2 -1.</_>\n        <_>\n          9 14 1 1 2.</_>\n        <_>\n          10 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 2 -1.</_>\n        <_>\n          9 14 1 1 2.</_>\n        <_>\n          10 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 19 12 -1.</_>\n        <_>\n          0 14 19 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 14 -1.</_>\n        <_>\n          10 6 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 4 -1.</_>\n        <_>\n          14 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 1 3 -1.</_>\n        <_>\n          4 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 3 -1.</_>\n        <_>\n          6 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 5 2 -1.</_>\n        <_>\n          2 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 2 -1.</_>\n        <_>\n          7 8 1 1 2.</_>\n        <_>\n          8 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 2 -1.</_>\n        <_>\n          7 8 1 1 2.</_>\n        <_>\n          8 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 13 2 -1.</_>\n        <_>\n          5 11 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 1 9 -1.</_>\n        <_>\n          10 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 2 12 -1.</_>\n        <_>\n          15 8 1 6 2.</_>\n        <_>\n          16 14 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 5 -1.</_>\n        <_>\n          5 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 7 -1.</_>\n        <_>\n          13 6 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 4 -1.</_>\n        <_>\n          9 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 1 -1.</_>\n        <_>\n          10 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 2 -1.</_>\n        <_>\n          9 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 15 14 -1.</_>\n        <_>\n          0 13 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 5 6 -1.</_>\n        <_>\n          9 3 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 3 4 -1.</_>\n        <_>\n          4 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 6 -1.</_>\n        <_>\n          6 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 1 2 -1.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 12 -1.</_>\n        <_>\n          11 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 1 -1.</_>\n        <_>\n          8 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 9 3 -1.</_>\n        <_>\n          10 17 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 6 2 -1.</_>\n        <_>\n          14 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 14 -1.</_>\n        <_>\n          10 5 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 9 4 -1.</_>\n        <_>\n          11 16 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 14 -1.</_>\n        <_>\n          0 7 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 3 -1.</_>\n        <_>\n          10 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 4 -1.</_>\n        <_>\n          7 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 4 -1.</_>\n        <_>\n          5 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 5 -1.</_>\n        <_>\n          7 1 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 1 2 -1.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 6 -1.</_>\n        <_>\n          7 2 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          0 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 8 12 -1.</_>\n        <_>\n          12 7 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 4 -1.</_>\n        <_>\n          13 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 5 -1.</_>\n        <_>\n          13 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 1 -1.</_>\n        <_>\n          17 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 1 3 -1.</_>\n        <_>\n          5 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 6 -1.</_>\n        <_>\n          10 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 2 3 -1.</_>\n        <_>\n          4 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 1 9 -1.</_>\n        <_>\n          12 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 9 -1.</_>\n        <_>\n          8 6 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 13 3 6 -1.</_>\n        <_>\n          17 15 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 8 -1.</_>\n        <_>\n          8 7 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 5 -1.</_>\n        <_>\n          6 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 8 -1.</_>\n        <_>\n          7 6 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 3 3 -1.</_>\n        <_>\n          3 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 4 2 -1.</_>\n        <_>\n          16 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 10 3 10 -1.</_>\n        <_>\n          17 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 4 -1.</_>\n        <_>\n          10 9 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 12 -1.</_>\n        <_>\n          5 6 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 3 -1.</_>\n        <_>\n          8 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 7 -1.</_>\n        <_>\n          12 7 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 4 -1.</_>\n        <_>\n          14 8 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 5 -1.</_>\n        <_>\n          16 8 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 4 -1.</_>\n        <_>\n          12 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 1 2 -1.</_>\n        <_>\n          3 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 4 -1.</_>\n        <_>\n          13 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 6 -1.</_>\n        <_>\n          12 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 3 8 -1.</_>\n        <_>\n          11 6 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 3 -1.</_>\n        <_>\n          16 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 1 2 -1.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 9 -1.</_>\n        <_>\n          5 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 9 1 -1.</_>\n        <_>\n          7 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 4 9 -1.</_>\n        <_>\n          0 14 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 3 -1.</_>\n        <_>\n          11 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 12 -1.</_>\n        <_>\n          9 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 4 -1.</_>\n        <_>\n          7 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 1 3 -1.</_>\n        <_>\n          3 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 4 -1.</_>\n        <_>\n          13 9 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 2 -1.</_>\n        <_>\n          7 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 1 -1.</_>\n        <_>\n          2 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 14 -1.</_>\n        <_>\n          1 0 1 7 2.</_>\n        <_>\n          2 7 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 11 8 -1.</_>\n        <_>\n          5 9 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 6 -1.</_>\n        <_>\n          9 5 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 5 10 -1.</_>\n        <_>\n          7 14 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 2 -1.</_>\n        <_>\n          16 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 8 2 -1.</_>\n        <_>\n          0 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 1 3 -1.</_>\n        <_>\n          7 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 11 6 -1.</_>\n        <_>\n          7 4 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 9 3 -1.</_>\n        <_>\n          8 4 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 2 2 -1.</_>\n        <_>\n          0 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 6 -1.</_>\n        <_>\n          0 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 2 -1.</_>\n        <_>\n          6 7 1 1 2.</_>\n        <_>\n          7 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 6 -1.</_>\n        <_>\n          8 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 4 -1.</_>\n        <_>\n          14 1 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 8 -1.</_>\n        <_>\n          11 11 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 15 3 3 -1.</_>\n        <_>\n          17 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 3 9 -1.</_>\n        <_>\n          6 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 6 -1.</_>\n        <_>\n          0 5 4 3 2.</_>\n        <_>\n          4 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 1 3 -1.</_>\n        <_>\n          0 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 6 -1.</_>\n        <_>\n          18 0 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 6 3 -1.</_>\n        <_>\n          12 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 2 2 -1.</_>\n        <_>\n          13 15 1 1 2.</_>\n        <_>\n          14 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 3 -1.</_>\n        <_>\n          4 1 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 9 -1.</_>\n        <_>\n          5 6 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 7 -1.</_>\n        <_>\n          10 7 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 9 6 -1.</_>\n        <_>\n          8 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 6 2 -1.</_>\n        <_>\n          0 17 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 7 14 -1.</_>\n        <_>\n          12 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 8 -1.</_>\n        <_>\n          15 7 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 3 -1.</_>\n        <_>\n          4 10 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 2 -1.</_>\n        <_>\n          7 2 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 4 -1.</_>\n        <_>\n          6 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 6 2 -1.</_>\n        <_>\n          10 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 5 2 -1.</_>\n        <_>\n          7 7 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 6 -1.</_>\n        <_>\n          7 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 1 2.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 7 -1.</_>\n        <_>\n          17 8 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 3 -1.</_>\n        <_>\n          0 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 19 6 1 -1.</_>\n        <_>\n          7 19 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          9 7 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 2 4 -1.</_>\n        <_>\n          0 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 3 -1.</_>\n        <_>\n          2 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 9 -1.</_>\n        <_>\n          3 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 2 -1.</_>\n        <_>\n          11 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 1 -1.</_>\n        <_>\n          15 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 1 4 -1.</_>\n        <_>\n          0 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 2 -1.</_>\n        <_>\n          15 6 1 1 2.</_>\n        <_>\n          16 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 6 -1.</_>\n        <_>\n          8 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 17 1 3 -1.</_>\n        <_>\n          19 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 1 -1.</_>\n        <_>\n          8 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 6 -1.</_>\n        <_>\n          14 1 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 2 1 -1.</_>\n        <_>\n          16 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 7 4 -1.</_>\n        <_>\n          8 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 15 -1.</_>\n        <_>\n          4 5 14 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 6 -1.</_>\n        <_>\n          9 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 1 3 -1.</_>\n        <_>\n          11 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 2 4 -1.</_>\n        <_>\n          12 16 1 2 2.</_>\n        <_>\n          13 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 1 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 3 -1.</_>\n        <_>\n          12 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 8 -1.</_>\n        <_>\n          4 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 6 -1.</_>\n        <_>\n          3 5 3 3 2.</_>\n        <_>\n          6 8 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 3 -1.</_>\n        <_>\n          11 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 4 2 -1.</_>\n        <_>\n          5 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 5 2 -1.</_>\n        <_>\n          8 17 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 3 -1.</_>\n        <_>\n          0 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 2 -1.</_>\n        <_>\n          8 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 9 3 -1.</_>\n        <_>\n          7 4 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 1 4 -1.</_>\n        <_>\n          0 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 8 3 -1.</_>\n        <_>\n          0 18 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 11 6 -1.</_>\n        <_>\n          6 3 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 2 -1.</_>\n        <_>\n          6 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 1 12 -1.</_>\n        <_>\n          10 14 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 4 -1.</_>\n        <_>\n          6 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 1 3 -1.</_>\n        <_>\n          0 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 1 3 -1.</_>\n        <_>\n          0 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 4 -1.</_>\n        <_>\n          14 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 5 4 -1.</_>\n        <_>\n          1 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 1 2 -1.</_>\n        <_>\n          18 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 2 4 -1.</_>\n        <_>\n          14 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 8 -1.</_>\n        <_>\n          12 6 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 10 -1.</_>\n        <_>\n          10 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 1 3 -1.</_>\n        <_>\n          17 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 2 10 -1.</_>\n        <_>\n          2 7 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 3 -1.</_>\n        <_>\n          7 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 12 -1.</_>\n        <_>\n          0 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 1 3 -1.</_>\n        <_>\n          0 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 6 4 -1.</_>\n        <_>\n          8 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 6 -1.</_>\n        <_>\n          0 8 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 2 1 -1.</_>\n        <_>\n          12 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 9 2 -1.</_>\n        <_>\n          5 2 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 2 -1.</_>\n        <_>\n          0 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 3 -1.</_>\n        <_>\n          16 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 1 3 -1.</_>\n        <_>\n          18 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 1 -1.</_>\n        <_>\n          13 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 4 -1.</_>\n        <_>\n          3 3 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 1 18 -1.</_>\n        <_>\n          11 8 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 5 12 -1.</_>\n        <_>\n          9 5 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 1 -1.</_>\n        <_>\n          16 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 10 -1.</_>\n        <_>\n          9 6 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 1 6 -1.</_>\n        <_>\n          19 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 2 -1.</_>\n        <_>\n          18 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 4 -1.</_>\n        <_>\n          8 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 5 -1.</_>\n        <_>\n          7 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 7 3 -1.</_>\n        <_>\n          0 4 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 1 -1.</_>\n        <_>\n          2 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 10 -1.</_>\n        <_>\n          4 8 1 5 2.</_>\n        <_>\n          5 13 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 18 2 -1.</_>\n        <_>\n          2 18 9 1 2.</_>\n        <_>\n          11 19 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 4 4 -1.</_>\n        <_>\n          2 7 2 2 2.</_>\n        <_>\n          4 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 4 -1.</_>\n        <_>\n          18 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 2 8 -1.</_>\n        <_>\n          16 9 1 4 2.</_>\n        <_>\n          17 13 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 1 6 -1.</_>\n        <_>\n          15 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 2 -1.</_>\n        <_>\n          14 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 3 -1.</_>\n        <_>\n          17 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 3 -1.</_>\n        <_>\n          10 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 6 -1.</_>\n        <_>\n          4 2 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 6 -1.</_>\n        <_>\n          7 16 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 2 -1.</_>\n        <_>\n          11 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 4 -1.</_>\n        <_>\n          10 1 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 7 -1.</_>\n        <_>\n          10 7 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 2 2 -1.</_>\n        <_>\n          6 17 1 1 2.</_>\n        <_>\n          7 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 9 -1.</_>\n        <_>\n          5 6 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 19 10 -1.</_>\n        <_>\n          0 15 19 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 6 1 -1.</_>\n        <_>\n          7 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 3 -1.</_>\n        <_>\n          3 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 5 -1.</_>\n        <_>\n          8 5 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 6 4 -1.</_>\n        <_>\n          1 17 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 6 -1.</_>\n        <_>\n          16 10 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 4 3 -1.</_>\n        <_>\n          0 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 11 -1.</_>\n        <_>\n          3 7 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 7 2 -1.</_>\n        <_>\n          13 18 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 2 3 -1.</_>\n        <_>\n          0 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 2 -1.</_>\n        <_>\n          3 0 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 3 -1.</_>\n        <_>\n          3 1 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 6 -1.</_>\n        <_>\n          0 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 14 -1.</_>\n        <_>\n          1 2 3 7 2.</_>\n        <_>\n          4 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 2 2 -1.</_>\n        <_>\n          17 5 1 1 2.</_>\n        <_>\n          18 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 9 4 -1.</_>\n        <_>\n          14 10 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 4 -1.</_>\n        <_>\n          6 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 12 2 -1.</_>\n        <_>\n          11 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 1 2 -1.</_>\n        <_>\n          2 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 3 -1.</_>\n        <_>\n          16 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 16 1 3 -1.</_>\n        <_>\n          19 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 11 1 2 -1.</_>\n        <_>\n          18 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 8 2 -1.</_>\n        <_>\n          12 7 4 1 2.</_>\n        <_>\n          16 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 2 4 -1.</_>\n        <_>\n          15 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 4 -1.</_>\n        <_>\n          14 2 3 2 2.</_>\n        <_>\n          17 4 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 1 -1.</_>\n        <_>\n          17 0 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 1 -1.</_>\n        <_>\n          4 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 1 -1.</_>\n        <_>\n          18 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 2 -1.</_>\n        <_>\n          7 16 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 8 1 -1.</_>\n        <_>\n          6 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 4 3 -1.</_>\n        <_>\n          1 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 13 1 2 -1.</_>\n        <_>\n          19 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 10 4 -1.</_>\n        <_>\n          9 16 5 2 2.</_>\n        <_>\n          14 18 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 2 4 -1.</_>\n        <_>\n          12 9 1 2 2.</_>\n        <_>\n          13 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 11 1 9 -1.</_>\n        <_>\n          19 14 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 14 -1.</_>\n        <_>\n          6 13 14 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 4 2 -1.</_>\n        <_>\n          2 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 3 -1.</_>\n        <_>\n          0 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 1 3 -1.</_>\n        <_>\n          0 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 4 4 -1.</_>\n        <_>\n          15 17 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 7 -1.</_>\n        <_>\n          8 5 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 5 3 -1.</_>\n        <_>\n          1 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 3 -1.</_>\n        <_>\n          0 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 6 -1.</_>\n        <_>\n          1 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 4 3 -1.</_>\n        <_>\n          16 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 0 5 3 2.</_>\n        <_>\n          5 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 3 6 -1.</_>\n        <_>\n          3 2 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 10 -1.</_>\n        <_>\n          3 0 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 2 -1.</_>\n        <_>\n          5 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 4 4 -1.</_>\n        <_>\n          12 8 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 7 3 -1.</_>\n        <_>\n          13 6 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 1 2 -1.</_>\n        <_>\n          10 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 4 2 -1.</_>\n        <_>\n          18 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 7 -1.</_>\n        <_>\n          18 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 3 -1.</_>\n        <_>\n          16 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 9 1 3 -1.</_>\n        <_>\n          19 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 6 -1.</_>\n        <_>\n          19 7 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 4 -1.</_>\n        <_>\n          9 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 10 2 -1.</_>\n        <_>\n          9 2 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 8 4 -1.</_>\n        <_>\n          2 12 4 2 2.</_>\n        <_>\n          6 14 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 3 -1.</_>\n        <_>\n          0 5 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 3 3 -1.</_>\n        <_>\n          15 14 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 3 -1.</_>\n        <_>\n          2 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 7 -1.</_>\n        <_>\n          2 0 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 4 4 -1.</_>\n        <_>\n          15 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 4 -1.</_>\n        <_>\n          5 10 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 1 2 -1.</_>\n        <_>\n          3 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 4 -1.</_>\n        <_>\n          7 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 4 -1.</_>\n        <_>\n          7 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 9 12 -1.</_>\n        <_>\n          9 8 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 6 -1.</_>\n        <_>\n          8 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 3 -1.</_>\n        <_>\n          17 2 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 1 3 -1.</_>\n        <_>\n          0 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 2 -1.</_>\n        <_>\n          15 0 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 2 -1.</_>\n        <_>\n          12 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 10 1 -1.</_>\n        <_>\n          8 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 16 -1.</_>\n        <_>\n          0 12 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 1 3 -1.</_>\n        <_>\n          2 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 12 6 -1.</_>\n        <_>\n          11 8 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 7 -1.</_>\n        <_>\n          16 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 6 1 -1.</_>\n        <_>\n          14 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 1 -1.</_>\n        <_>\n          17 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 8 2 -1.</_>\n        <_>\n          0 17 4 1 2.</_>\n        <_>\n          4 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 1 -1.</_>\n        <_>\n          18 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 5 -1.</_>\n        <_>\n          6 15 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 2 -1.</_>\n        <_>\n          7 3 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 8 4 -1.</_>\n        <_>\n          4 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 19 2 1 -1.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 19 2 1 -1.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 3 -1.</_>\n        <_>\n          16 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 2 3 -1.</_>\n        <_>\n          1 11 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 4 1 -1.</_>\n        <_>\n          2 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          2 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 1 3 -1.</_>\n        <_>\n          2 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 11 2 -1.</_>\n        <_>\n          5 8 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 10 -1.</_>\n        <_>\n          9 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 3 -1.</_>\n        <_>\n          0 3 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 19 10 1 -1.</_>\n        <_>\n          15 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 8 3 -1.</_>\n        <_>\n          15 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 19 3 1 -1.</_>\n        <_>\n          9 19 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 4 -1.</_>\n        <_>\n          15 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 3 -1.</_>\n        <_>\n          10 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 3 2 -1.</_>\n        <_>\n          0 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 3 6 -1.</_>\n        <_>\n          7 14 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 1 2 -1.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 4 4 -1.</_>\n        <_>\n          2 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 7 -1.</_>\n        <_>\n          3 8 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 5 -1.</_>\n        <_>\n          2 8 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 16 1 3 -1.</_>\n        <_>\n          19 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 6 -1.</_>\n        <_>\n          7 5 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 4 2 -1.</_>\n        <_>\n          2 16 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 11 -1.</_>\n        <_>\n          19 6 1 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 2 6 -1.</_>\n        <_>\n          0 14 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 2 -1.</_>\n        <_>\n          12 6 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 2 3 -1.</_>\n        <_>\n          1 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 4 4 -1.</_>\n        <_>\n          16 16 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 5 -1.</_>\n        <_>\n          10 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 7 -1.</_>\n        <_>\n          14 7 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 2 6 -1.</_>\n        <_>\n          2 8 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 7 -1.</_>\n        <_>\n          16 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 2 -1.</_>\n        <_>\n          6 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 9 -1.</_>\n        <_>\n          0 12 20 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 2 -1.</_>\n        <_>\n          10 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 10 4 -1.</_>\n        <_>\n          6 7 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 5 9 -1.</_>\n        <_>\n          6 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 2 4 -1.</_>\n        <_>\n          0 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 5 -1.</_>\n        <_>\n          11 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 7 -1.</_>\n        <_>\n          7 7 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 4 -1.</_>\n        <_>\n          3 0 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 8 -1.</_>\n        <_>\n          2 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 3 -1.</_>\n        <_>\n          0 1 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 4 -1.</_>\n        <_>\n          5 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 9 1 -1.</_>\n        <_>\n          5 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 1 3 -1.</_>\n        <_>\n          1 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 2 3 -1.</_>\n        <_>\n          0 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 16 3 -1.</_>\n        <_>\n          8 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 1 -1.</_>\n        <_>\n          2 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 20 -1.</_>\n        <_>\n          3 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 4 6 -1.</_>\n        <_>\n          2 5 2 3 2.</_>\n        <_>\n          4 8 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 3 -1.</_>\n        <_>\n          11 16 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 6 1 -1.</_>\n        <_>\n          14 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 15 2 -1.</_>\n        <_>\n          8 17 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 3 -1.</_>\n        <_>\n          18 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 4 -1.</_>\n        <_>\n          13 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 4 4 -1.</_>\n        <_>\n          13 6 2 2 2.</_>\n        <_>\n          15 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 4 -1.</_>\n        <_>\n          17 8 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 2 2 -1.</_>\n        <_>\n          15 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 3 -1.</_>\n        <_>\n          17 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 8 1 -1.</_>\n        <_>\n          7 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 3 6 -1.</_>\n        <_>\n          0 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 5 -1.</_>\n        <_>\n          9 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 5 -1.</_>\n        <_>\n          9 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 2 -1.</_>\n        <_>\n          10 1 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 2 -1.</_>\n        <_>\n          10 0 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 3 -1.</_>\n        <_>\n          12 0 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 6 -1.</_>\n        <_>\n          5 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 4 -1.</_>\n        <_>\n          8 5 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 2 3 -1.</_>\n        <_>\n          17 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 3 -1.</_>\n        <_>\n          5 3 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 6 -1.</_>\n        <_>\n          6 9 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 6 -1.</_>\n        <_>\n          15 10 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 3 -1.</_>\n        <_>\n          7 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 8 2 -1.</_>\n        <_>\n          12 4 4 1 2.</_>\n        <_>\n          16 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 1 6 -1.</_>\n        <_>\n          15 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 11 3 -1.</_>\n        <_>\n          4 18 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 20 -1.</_>\n        <_>\n          3 10 16 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 6 -1.</_>\n        <_>\n          12 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 6 -1.</_>\n        <_>\n          13 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 4 -1.</_>\n        <_>\n          13 1 3 2 2.</_>\n        <_>\n          16 3 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 4 -1.</_>\n        <_>\n          13 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 4 -1.</_>\n        <_>\n          8 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 14 2 -1.</_>\n        <_>\n          0 17 7 1 2.</_>\n        <_>\n          7 18 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 2 2 -1.</_>\n        <_>\n          6 18 1 1 2.</_>\n        <_>\n          7 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 2 2 -1.</_>\n        <_>\n          17 18 1 1 2.</_>\n        <_>\n          18 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 1 9 -1.</_>\n        <_>\n          5 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 4 -1.</_>\n        <_>\n          7 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 2 -1.</_>\n        <_>\n          1 9 3 1 2.</_>\n        <_>\n          4 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 3 -1.</_>\n        <_>\n          7 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 12 -1.</_>\n        <_>\n          8 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 2 2 -1.</_>\n        <_>\n          4 18 1 1 2.</_>\n        <_>\n          5 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 6 -1.</_>\n        <_>\n          9 3 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 6 2 -1.</_>\n        <_>\n          6 18 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 16 2 -1.</_>\n        <_>\n          3 19 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 11 -1.</_>\n        <_>\n          4 0 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 3 1 -1.</_>\n        <_>\n          14 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 6 -1.</_>\n        <_>\n          6 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 4 -1.</_>\n        <_>\n          1 2 6 2 2.</_>\n        <_>\n          7 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 4 -1.</_>\n        <_>\n          5 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 1 -1.</_>\n        <_>\n          16 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 2 -1.</_>\n        <_>\n          11 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 1 -1.</_>\n        <_>\n          9 3 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 2 -1.</_>\n        <_>\n          2 7 3 1 2.</_>\n        <_>\n          5 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 6 -1.</_>\n        <_>\n          0 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 7 -1.</_>\n        <_>\n          10 6 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 13 -1.</_>\n        <_>\n          11 6 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 6 1 -1.</_>\n        <_>\n          13 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 6 -1.</_>\n        <_>\n          18 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 9 -1.</_>\n        <_>\n          18 2 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 4 6 -1.</_>\n        <_>\n          13 8 2 3 2.</_>\n        <_>\n          15 11 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 6 -1.</_>\n        <_>\n          10 2 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 16 6 -1.</_>\n        <_>\n          12 14 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 19 10 1 -1.</_>\n        <_>\n          11 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 1 3 -1.</_>\n        <_>\n          6 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 10 3 -1.</_>\n        <_>\n          4 15 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 12 -1.</_>\n        <_>\n          6 4 12 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 2 -1.</_>\n        <_>\n          5 7 2 1 2.</_>\n        <_>\n          7 8 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 2 -1.</_>\n        <_>\n          18 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 6 3 -1.</_>\n        <_>\n          8 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 5 3 -1.</_>\n        <_>\n          8 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 1 18 -1.</_>\n        <_>\n          13 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 2 -1.</_>\n        <_>\n          9 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 7 4 -1.</_>\n        <_>\n          11 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 8 -1.</_>\n        <_>\n          3 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 3 -1.</_>\n        <_>\n          9 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 9 3 -1.</_>\n        <_>\n          9 18 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 3 3 -1.</_>\n        <_>\n          12 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 5 -1.</_>\n        <_>\n          5 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 3 -1.</_>\n        <_>\n          10 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 2 -1.</_>\n        <_>\n          18 17 1 1 2.</_>\n        <_>\n          19 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 1 2.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 1 2.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 9 1 -1.</_>\n        <_>\n          7 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 5 -1.</_>\n        <_>\n          5 9 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 1 12 -1.</_>\n        <_>\n          18 14 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 6 -1.</_>\n        <_>\n          0 2 4 3 2.</_>\n        <_>\n          4 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 3 -1.</_>\n        <_>\n          9 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 2 2 -1.</_>\n        <_>\n          3 18 1 1 2.</_>\n        <_>\n          4 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 3 -1.</_>\n        <_>\n          6 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 2 -1.</_>\n        <_>\n          16 7 2 1 2.</_>\n        <_>\n          18 8 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 1 3 -1.</_>\n        <_>\n          5 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 20 -1.</_>\n        <_>\n          2 10 15 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 4 -1.</_>\n        <_>\n          8 11 3 2 2.</_>\n        <_>\n          11 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 4 3 -1.</_>\n        <_>\n          8 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 2 2 -1.</_>\n        <_>\n          8 18 1 1 2.</_>\n        <_>\n          9 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 13 3 -1.</_>\n        <_>\n          2 17 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          16 16 1 1 2.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 3 -1.</_>\n        <_>\n          10 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 1 1 2.</_>\n        <_>\n          17 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 4 2 -1.</_>\n        <_>\n          14 7 2 1 2.</_>\n        <_>\n          16 8 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 1 -1.</_>\n        <_>\n          11 0 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 2 -1.</_>\n        <_>\n          10 4 4 1 2.</_>\n        <_>\n          14 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 2 -1.</_>\n        <_>\n          9 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 3 -1.</_>\n        <_>\n          12 12 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 1 4 -1.</_>\n        <_>\n          1 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 1 18 -1.</_>\n        <_>\n          1 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 3 2 -1.</_>\n        <_>\n          11 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 2 -1.</_>\n        <_>\n          0 1 6 1 2.</_>\n        <_>\n          6 2 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 2 2 -1.</_>\n        <_>\n          10 18 1 1 2.</_>\n        <_>\n          11 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 4 -1.</_>\n        <_>\n          4 5 2 2 2.</_>\n        <_>\n          6 7 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 1 3 -1.</_>\n        <_>\n          6 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 2 -1.</_>\n        <_>\n          16 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 6 -1.</_>\n        <_>\n          17 8 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 2 -1.</_>\n        <_>\n          6 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 7 -1.</_>\n        <_>\n          7 5 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 6 -1.</_>\n        <_>\n          0 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 1 9 -1.</_>\n        <_>\n          12 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 3 -1.</_>\n        <_>\n          6 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 13 -1.</_>\n        <_>\n          9 5 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 8 1 10 -1.</_>\n        <_>\n          19 13 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 6 1 -1.</_>\n        <_>\n          13 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 12 -1.</_>\n        <_>\n          11 7 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 6 6 -1.</_>\n        <_>\n          14 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 4 -1.</_>\n        <_>\n          16 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 4 2 -1.</_>\n        <_>\n          6 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 6 8 -1.</_>\n        <_>\n          3 6 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 6 5 -1.</_>\n        <_>\n          13 15 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 4 2 -1.</_>\n        <_>\n          15 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 1 -1.</_>\n        <_>\n          15 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 2 2 -1.</_>\n        <_>\n          5 18 1 1 2.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 4 4 -1.</_>\n        <_>\n          4 8 2 2 2.</_>\n        <_>\n          6 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 9 3 -1.</_>\n        <_>\n          11 8 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 10 4 -1.</_>\n        <_>\n          0 3 5 2 2.</_>\n        <_>\n          5 5 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 6 1 -1.</_>\n        <_>\n          9 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 3 3 -1.</_>\n        <_>\n          0 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 8 -1.</_>\n        <_>\n          0 0 3 4 2.</_>\n        <_>\n          3 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 8 -1.</_>\n        <_>\n          8 6 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 7 3 -1.</_>\n        <_>\n          13 8 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 2 2 -1.</_>\n        <_>\n          3 4 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 3 -1.</_>\n        <_>\n          0 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 2 -1.</_>\n        <_>\n          9 4 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 4 -1.</_>\n        <_>\n          9 5 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 12 3 -1.</_>\n        <_>\n          7 10 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 6 -1.</_>\n        <_>\n          9 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 5 -1.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 2 3 -1.</_>\n        <_>\n          0 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 4 -1.</_>\n        <_>\n          10 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 15 -1.</_>\n        <_>\n          3 0 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 5 -1.</_>\n        <_>\n          16 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 10 -1.</_>\n        <_>\n          10 2 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 12 -1.</_>\n        <_>\n          10 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 3 4 -1.</_>\n        <_>\n          16 6 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 1 1 2.</_>\n        <_>\n          17 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          13 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 1 3 -1.</_>\n        <_>\n          7 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 2 -1.</_>\n        <_>\n          12 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 1 3 -1.</_>\n        <_>\n          17 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 3 -1.</_>\n        <_>\n          0 17 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 4 -1.</_>\n        <_>\n          3 6 1 2 2.</_>\n        <_>\n          4 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 3 1 -1.</_>\n        <_>\n          14 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          2 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 2 1 -1.</_>\n        <_>\n          2 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          0 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 1 3 -1.</_>\n        <_>\n          2 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 5 -1.</_>\n        <_>\n          5 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 7 -1.</_>\n        <_>\n          4 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 8 -1.</_>\n        <_>\n          3 6 1 4 2.</_>\n        <_>\n          4 10 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 11 10 -1.</_>\n        <_>\n          4 10 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 2 -1.</_>\n        <_>\n          10 13 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 16 3 -1.</_>\n        <_>\n          9 13 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 4 -1.</_>\n        <_>\n          16 4 2 2 2.</_>\n        <_>\n          18 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 12 -1.</_>\n        <_>\n          16 0 2 6 2.</_>\n        <_>\n          18 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 3 1 -1.</_>\n        <_>\n          15 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 12 10 -1.</_>\n        <_>\n          3 9 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 2 2 -1.</_>\n        <_>\n          9 18 1 1 2.</_>\n        <_>\n          10 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 2 2 -1.</_>\n        <_>\n          9 18 1 1 2.</_>\n        <_>\n          10 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 14 -1.</_>\n        <_>\n          13 4 1 7 2.</_>\n        <_>\n          14 11 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 4 -1.</_>\n        <_>\n          7 2 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 20 -1.</_>\n        <_>\n          0 0 9 10 2.</_>\n        <_>\n          9 10 9 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 2 -1.</_>\n        <_>\n          15 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 2 4 -1.</_>\n        <_>\n          16 10 1 2 2.</_>\n        <_>\n          17 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 2 -1.</_>\n        <_>\n          18 17 1 1 2.</_>\n        <_>\n          19 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 1 2 -1.</_>\n        <_>\n          9 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 9 6 -1.</_>\n        <_>\n          11 4 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 10 -1.</_>\n        <_>\n          9 9 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 5 4 -1.</_>\n        <_>\n          5 2 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 11 4 -1.</_>\n        <_>\n          5 9 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 2 14 -1.</_>\n        <_>\n          3 4 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 5 -1.</_>\n        <_>\n          9 6 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 9 -1.</_>\n        <_>\n          9 4 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 6 -1.</_>\n        <_>\n          0 10 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 6 1 -1.</_>\n        <_>\n          17 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 2 2 -1.</_>\n        <_>\n          17 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 6 3 -1.</_>\n        <_>\n          10 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 9 15 -1.</_>\n        <_>\n          7 1 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 12 -1.</_>\n        <_>\n          12 5 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 4 3 -1.</_>\n        <_>\n          0 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 1 -1.</_>\n        <_>\n          5 0 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 4 -1.</_>\n        <_>\n          8 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 3 -1.</_>\n        <_>\n          5 0 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 3 7 -1.</_>\n        <_>\n          14 6 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 2 -1.</_>\n        <_>\n          7 7 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 6 1 -1.</_>\n        <_>\n          8 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 2 -1.</_>\n        <_>\n          18 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 7 3 -1.</_>\n        <_>\n          6 5 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 1 -1.</_>\n        <_>\n          13 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 2 10 -1.</_>\n        <_>\n          15 1 1 5 2.</_>\n        <_>\n          16 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 2 2 -1.</_>\n        <_>\n          0 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 1 8 -1.</_>\n        <_>\n          19 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 1 3 -1.</_>\n        <_>\n          1 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 6 4 -1.</_>\n        <_>\n          0 15 3 2 2.</_>\n        <_>\n          3 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 18 -1.</_>\n        <_>\n          19 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 2 -1.</_>\n        <_>\n          12 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 2 -1.</_>\n        <_>\n          6 8 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 1 -1.</_>\n        <_>\n          18 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 2 6 -1.</_>\n        <_>\n          8 7 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 2 10 -1.</_>\n        <_>\n          15 5 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 2 -1.</_>\n        <_>\n          13 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 6 -1.</_>\n        <_>\n          11 3 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 2 -1.</_>\n        <_>\n          10 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 4 2 -1.</_>\n        <_>\n          9 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 15 4 -1.</_>\n        <_>\n          5 16 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 8 -1.</_>\n        <_>\n          7 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 1 -1.</_>\n        <_>\n          6 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 1 6 -1.</_>\n        <_>\n          0 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 9 6 -1.</_>\n        <_>\n          14 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 4 -1.</_>\n        <_>\n          14 2 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 2 4 -1.</_>\n        <_>\n          1 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 4 -1.</_>\n        <_>\n          13 3 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 10 -1.</_>\n        <_>\n          4 10 1 5 2.</_>\n        <_>\n          5 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 9 3 -1.</_>\n        <_>\n          5 16 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 3 9 -1.</_>\n        <_>\n          2 2 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 7 1 4 -1.</_>\n        <_>\n          19 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 6 8 -1.</_>\n        <_>\n          14 11 3 4 2.</_>\n        <_>\n          17 15 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 4 6 -1.</_>\n        <_>\n          15 12 2 3 2.</_>\n        <_>\n          17 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 1 1 2.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 1 1 2.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 2 2 -1.</_>\n        <_>\n          2 3 1 1 2.</_>\n        <_>\n          3 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 3 -1.</_>\n        <_>\n          11 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 7 8 -1.</_>\n        <_>\n          5 13 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 2 -1.</_>\n        <_>\n          7 16 1 1 2.</_>\n        <_>\n          8 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 2 -1.</_>\n        <_>\n          7 16 1 1 2.</_>\n        <_>\n          8 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 3 -1.</_>\n        <_>\n          14 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 4 8 -1.</_>\n        <_>\n          6 7 2 4 2.</_>\n        <_>\n          8 11 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 3 -1.</_>\n        <_>\n          1 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 10 -1.</_>\n        <_>\n          8 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 6 -1.</_>\n        <_>\n          5 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 4 -1.</_>\n        <_>\n          3 10 2 2 2.</_>\n        <_>\n          5 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 4 -1.</_>\n        <_>\n          3 10 2 2 2.</_>\n        <_>\n          5 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 4 -1.</_>\n        <_>\n          3 10 2 2 2.</_>\n        <_>\n          5 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 2 6 -1.</_>\n        <_>\n          15 8 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 4 -1.</_>\n        <_>\n          3 10 2 2 2.</_>\n        <_>\n          5 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 4 -1.</_>\n        <_>\n          3 10 2 2 2.</_>\n        <_>\n          5 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 9 -1.</_>\n        <_>\n          13 4 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 1 12 -1.</_>\n        <_>\n          12 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 1 -1.</_>\n        <_>\n          8 0 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 6 -1.</_>\n        <_>\n          10 0 5 3 2.</_>\n        <_>\n          15 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 2 -1.</_>\n        <_>\n          3 5 2 1 2.</_>\n        <_>\n          5 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 3 -1.</_>\n        <_>\n          12 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 5 -1.</_>\n        <_>\n          12 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 15 1 -1.</_>\n        <_>\n          8 19 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 2 -1.</_>\n        <_>\n          8 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 8 4 -1.</_>\n        <_>\n          2 12 4 2 2.</_>\n        <_>\n          6 14 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          16 16 1 1 2.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 2 -1.</_>\n        <_>\n          8 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 5 -1.</_>\n        <_>\n          7 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 17 -1.</_>\n        <_>\n          19 0 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 3 -1.</_>\n        <_>\n          16 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 3 7 -1.</_>\n        <_>\n          15 8 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 2 2 -1.</_>\n        <_>\n          10 17 1 1 2.</_>\n        <_>\n          11 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 1 3 -1.</_>\n        <_>\n          4 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 3 -1.</_>\n        <_>\n          18 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 10 -1.</_>\n        <_>\n          13 1 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 9 1 -1.</_>\n        <_>\n          11 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 2 2 -1.</_>\n        <_>\n          5 18 1 1 2.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 6 1 9 -1.</_>\n        <_>\n          19 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 4 -1.</_>\n        <_>\n          4 7 1 2 2.</_>\n        <_>\n          5 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 14 -1.</_>\n        <_>\n          3 4 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 9 3 -1.</_>\n        <_>\n          13 5 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 6 -1.</_>\n        <_>\n          18 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 7 -1.</_>\n        <_>\n          6 6 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 8 -1.</_>\n        <_>\n          13 4 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 9 -1.</_>\n        <_>\n          0 11 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 5 3 -1.</_>\n        <_>\n          0 8 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 7 2 -1.</_>\n        <_>\n          8 2 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 5 -1.</_>\n        <_>\n          8 5 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 1 2 -1.</_>\n        <_>\n          19 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 11 -1.</_>\n        <_>\n          11 7 5 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 6 1 -1.</_>\n        <_>\n          11 19 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 1 -1.</_>\n        <_>\n          7 0 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 5 -1.</_>\n        <_>\n          6 1 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 12 6 -1.</_>\n        <_>\n          10 12 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 2 3 -1.</_>\n        <_>\n          16 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 4 2 -1.</_>\n        <_>\n          7 15 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 2 2 -1.</_>\n        <_>\n          7 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 2 4 -1.</_>\n        <_>\n          3 10 1 2 2.</_>\n        <_>\n          4 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 6 -1.</_>\n        <_>\n          0 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 2 2 -1.</_>\n        <_>\n          1 10 1 1 2.</_>\n        <_>\n          2 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 3 -1.</_>\n        <_>\n          16 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 4 -1.</_>\n        <_>\n          5 10 1 2 2.</_>\n        <_>\n          6 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 13 2 -1.</_>\n        <_>\n          5 12 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 11 -1.</_>\n        <_>\n          11 2 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 4 -1.</_>\n        <_>\n          10 4 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 2 -1.</_>\n        <_>\n          10 8 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 3 -1.</_>\n        <_>\n          12 2 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 14 2 -1.</_>\n        <_>\n          6 18 7 1 2.</_>\n        <_>\n          13 19 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 1 12 -1.</_>\n        <_>\n          17 11 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 10 3 -1.</_>\n        <_>\n          10 6 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 3 -1.</_>\n        <_>\n          7 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 1 -1.</_>\n        <_>\n          14 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 6 -1.</_>\n        <_>\n          10 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 14 -1.</_>\n        <_>\n          8 1 4 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 14 -1.</_>\n        <_>\n          16 1 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 2 -1.</_>\n        <_>\n          3 16 1 1 2.</_>\n        <_>\n          4 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 2 -1.</_>\n        <_>\n          0 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 6 -1.</_>\n        <_>\n          15 6 2 3 2.</_>\n        <_>\n          17 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 2 2 -1.</_>\n        <_>\n          12 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 13 -1.</_>\n        <_>\n          9 6 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 5 -1.</_>\n        <_>\n          3 9 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 4 -1.</_>\n        <_>\n          0 7 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 2 -1.</_>\n        <_>\n          4 1 8 1 2.</_>\n        <_>\n          12 2 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 4 2 -1.</_>\n        <_>\n          1 18 2 1 2.</_>\n        <_>\n          3 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 4 -1.</_>\n        <_>\n          8 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 9 3 -1.</_>\n        <_>\n          6 4 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 10 -1.</_>\n        <_>\n          6 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 10 -1.</_>\n        <_>\n          13 0 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 1 -1.</_>\n        <_>\n          12 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 16 -1.</_>\n        <_>\n          6 2 4 8 2.</_>\n        <_>\n          10 10 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 10 -1.</_>\n        <_>\n          14 10 1 5 2.</_>\n        <_>\n          15 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 2 -1.</_>\n        <_>\n          12 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 8 -1.</_>\n        <_>\n          17 0 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 5 -1.</_>\n        <_>\n          17 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 11 2 -1.</_>\n        <_>\n          4 6 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 1 -1.</_>\n        <_>\n          2 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 3 -1.</_>\n        <_>\n          0 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 11 -1.</_>\n        <_>\n          13 6 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 1 -1.</_>\n        <_>\n          15 0 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 7 1 2 -1.</_>\n        <_>\n          19 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 9 -1.</_>\n        <_>\n          18 0 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 4 -1.</_>\n        <_>\n          13 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 14 2 -1.</_>\n        <_>\n          0 1 7 1 2.</_>\n        <_>\n          7 2 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 3 2 -1.</_>\n        <_>\n          4 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 2 -1.</_>\n        <_>\n          9 0 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 1 -1.</_>\n        <_>\n          12 2 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 11 -1.</_>\n        <_>\n          11 4 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 2 4 -1.</_>\n        <_>\n          2 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 6 3 -1.</_>\n        <_>\n          8 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 2 -1.</_>\n        <_>\n          9 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 9 2 -1.</_>\n        <_>\n          9 8 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 10 -1.</_>\n        <_>\n          6 6 1 5 2.</_>\n        <_>\n          7 11 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 2 3 -1.</_>\n        <_>\n          0 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 4 1 -1.</_>\n        <_>\n          13 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 1 2 -1.</_>\n        <_>\n          6 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 20 -1.</_>\n        <_>\n          2 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 2 2 -1.</_>\n        <_>\n          4 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 5 -1.</_>\n        <_>\n          5 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 2 -1.</_>\n        <_>\n          5 12 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 1 1 2.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 16 -1.</_>\n        <_>\n          16 1 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 6 3 -1.</_>\n        <_>\n          8 16 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 3 2 -1.</_>\n        <_>\n          15 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 1 2 -1.</_>\n        <_>\n          12 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 4 -1.</_>\n        <_>\n          0 2 2 2 2.</_>\n        <_>\n          2 4 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 4 -1.</_>\n        <_>\n          1 1 3 2 2.</_>\n        <_>\n          4 3 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 1 2 -1.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 3 -1.</_>\n        <_>\n          4 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 9 14 -1.</_>\n        <_>\n          1 7 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 6 -1.</_>\n        <_>\n          4 9 1 3 2.</_>\n        <_>\n          5 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 4 3 -1.</_>\n        <_>\n          5 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 2 4 -1.</_>\n        <_>\n          0 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 3 10 -1.</_>\n        <_>\n          17 6 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 2 1 -1.</_>\n        <_>\n          17 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 4 -1.</_>\n        <_>\n          5 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 9 2 -1.</_>\n        <_>\n          13 11 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 2 -1.</_>\n        <_>\n          15 10 1 1 2.</_>\n        <_>\n          16 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 14 -1.</_>\n        <_>\n          10 13 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 5 -1.</_>\n        <_>\n          15 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 3 -1.</_>\n        <_>\n          10 11 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 1 2 -1.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 5 4 -1.</_>\n        <_>\n          8 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 2 -1.</_>\n        <_>\n          11 7 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 8 2 -1.</_>\n        <_>\n          3 4 4 1 2.</_>\n        <_>\n          7 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 6 -1.</_>\n        <_>\n          2 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 2 -1.</_>\n        <_>\n          7 5 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 3 -1.</_>\n        <_>\n          9 3 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 3 3 -1.</_>\n        <_>\n          2 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 1 -1.</_>\n        <_>\n          5 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 2 -1.</_>\n        <_>\n          9 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 9 1 -1.</_>\n        <_>\n          7 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 11 12 -1.</_>\n        <_>\n          7 13 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 4 -1.</_>\n        <_>\n          4 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 9 3 -1.</_>\n        <_>\n          12 7 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 6 -1.</_>\n        <_>\n          15 11 1 3 2.</_>\n        <_>\n          16 14 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 5 3 -1.</_>\n        <_>\n          0 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 12 -1.</_>\n        <_>\n          10 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 15 13 -1.</_>\n        <_>\n          8 7 5 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 9 9 -1.</_>\n        <_>\n          0 12 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 8 -1.</_>\n        <_>\n          17 0 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 2 -1.</_>\n        <_>\n          18 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 5 -1.</_>\n        <_>\n          16 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 2 -1.</_>\n        <_>\n          16 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 2 -1.</_>\n        <_>\n          12 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 2 12 -1.</_>\n        <_>\n          1 8 1 6 2.</_>\n        <_>\n          2 14 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 12 -1.</_>\n        <_>\n          2 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 17 1 3 -1.</_>\n        <_>\n          19 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 10 -1.</_>\n        <_>\n          12 3 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 8 -1.</_>\n        <_>\n          11 1 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 16 1 1 2.</_>\n        <_>\n          19 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 16 1 1 2.</_>\n        <_>\n          19 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 6 -1.</_>\n        <_>\n          6 15 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 2 -1.</_>\n        <_>\n          9 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 4 -1.</_>\n        <_>\n          14 10 1 2 2.</_>\n        <_>\n          15 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 2 2 -1.</_>\n        <_>\n          0 15 1 1 2.</_>\n        <_>\n          1 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 2 -1.</_>\n        <_>\n          6 7 1 1 2.</_>\n        <_>\n          7 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 2 2 -1.</_>\n        <_>\n          11 18 1 1 2.</_>\n        <_>\n          12 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 4 -1.</_>\n        <_>\n          0 0 3 2 2.</_>\n        <_>\n          3 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 6 -1.</_>\n        <_>\n          6 1 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 5 4 -1.</_>\n        <_>\n          15 15 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 6 1 -1.</_>\n        <_>\n          9 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 19 4 1 -1.</_>\n        <_>\n          18 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 4 4 -1.</_>\n        <_>\n          18 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 4 -1.</_>\n        <_>\n          10 8 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 2 4 -1.</_>\n        <_>\n          2 9 1 2 2.</_>\n        <_>\n          3 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 8 4 -1.</_>\n        <_>\n          0 3 4 2 2.</_>\n        <_>\n          4 5 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 1 -1.</_>\n        <_>\n          4 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 9 -1.</_>\n        <_>\n          4 5 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 6 2 -1.</_>\n        <_>\n          9 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 1 12 -1.</_>\n        <_>\n          0 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 13 1 6 -1.</_>\n        <_>\n          19 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 8 -1.</_>\n        <_>\n          4 8 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 17 -1.</_>\n        <_>\n          3 0 3 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 8 -1.</_>\n        <_>\n          9 9 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 9 4 -1.</_>\n        <_>\n          8 10 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 3 -1.</_>\n        <_>\n          5 1 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 4 -1.</_>\n        <_>\n          16 6 2 2 2.</_>\n        <_>\n          18 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 2 8 -1.</_>\n        <_>\n          17 4 1 4 2.</_>\n        <_>\n          18 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 1 3 -1.</_>\n        <_>\n          2 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 1 3 -1.</_>\n        <_>\n          2 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 1 3 -1.</_>\n        <_>\n          11 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 9 7 -1.</_>\n        <_>\n          14 2 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 6 -1.</_>\n        <_>\n          11 2 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 15 2 -1.</_>\n        <_>\n          5 10 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 6 2 -1.</_>\n        <_>\n          8 17 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 10 2 -1.</_>\n        <_>\n          9 16 5 1 2.</_>\n        <_>\n          14 17 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 2 2 -1.</_>\n        <_>\n          9 17 1 1 2.</_>\n        <_>\n          10 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 4 -1.</_>\n        <_>\n          10 15 3 2 2.</_>\n        <_>\n          13 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 15 12 -1.</_>\n        <_>\n          9 5 5 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 2 3 -1.</_>\n        <_>\n          11 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 7 3 -1.</_>\n        <_>\n          8 14 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 1 2 -1.</_>\n        <_>\n          1 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 18 1 -1.</_>\n        <_>\n          7 19 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 6 1 -1.</_>\n        <_>\n          4 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 1 12 -1.</_>\n        <_>\n          1 9 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 3 6 -1.</_>\n        <_>\n          0 11 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 10 -1.</_>\n        <_>\n          6 4 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 2 1 -1.</_>\n        <_>\n          7 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 12 -1.</_>\n        <_>\n          3 0 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 9 2 -1.</_>\n        <_>\n          7 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 9 1 -1.</_>\n        <_>\n          9 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 10 2 10 -1.</_>\n        <_>\n          17 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 10 -1.</_>\n        <_>\n          4 10 1 5 2.</_>\n        <_>\n          5 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 12 -1.</_>\n        <_>\n          13 3 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 4 6 -1.</_>\n        <_>\n          15 3 2 3 2.</_>\n        <_>\n          17 6 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 3 -1.</_>\n        <_>\n          13 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 2 4 -1.</_>\n        <_>\n          4 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 1 3 -1.</_>\n        <_>\n          6 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 2 3 -1.</_>\n        <_>\n          2 1 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 1 -1.</_>\n        <_>\n          2 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 12 3 -1.</_>\n        <_>\n          12 17 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 4 -1.</_>\n        <_>\n          11 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 6 -1.</_>\n        <_>\n          4 9 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 9 -1.</_>\n        <_>\n          6 5 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 20 -1.</_>\n        <_>\n          6 0 7 10 2.</_>\n        <_>\n          13 10 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 8 1 3 -1.</_>\n        <_>\n          19 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 2 -1.</_>\n        <_>\n          13 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 2 -1.</_>\n        <_>\n          0 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 6 -1.</_>\n        <_>\n          19 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 1 -1.</_>\n        <_>\n          17 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 1 3 -1.</_>\n        <_>\n          13 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 3 -1.</_>\n        <_>\n          17 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 8 8 -1.</_>\n        <_>\n          5 4 4 4 2.</_>\n        <_>\n          9 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 2 2 -1.</_>\n        <_>\n          1 2 1 1 2.</_>\n        <_>\n          2 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 6 -1.</_>\n        <_>\n          0 0 4 3 2.</_>\n        <_>\n          4 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 2 -1.</_>\n        <_>\n          6 4 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 3 -1.</_>\n        <_>\n          1 1 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 2 -1.</_>\n        <_>\n          6 2 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 12 6 -1.</_>\n        <_>\n          6 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 9 2 -1.</_>\n        <_>\n          4 16 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 4 -1.</_>\n        <_>\n          9 15 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 12 1 -1.</_>\n        <_>\n          12 15 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 3 -1.</_>\n        <_>\n          17 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 15 2 2 -1.</_>\n        <_>\n          17 15 1 1 2.</_>\n        <_>\n          18 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 3 -1.</_>\n        <_>\n          3 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 1 3 -1.</_>\n        <_>\n          10 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 8 -1.</_>\n        <_>\n          11 0 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 12 2 -1.</_>\n        <_>\n          6 0 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 3 -1.</_>\n        <_>\n          4 0 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 1 2 -1.</_>\n        <_>\n          13 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 6 -1.</_>\n        <_>\n          8 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 2 -1.</_>\n        <_>\n          18 2 1 1 2.</_>\n        <_>\n          19 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 2 14 -1.</_>\n        <_>\n          16 1 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 2 -1.</_>\n        <_>\n          15 6 1 1 2.</_>\n        <_>\n          16 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 3 -1.</_>\n        <_>\n          5 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 2 -1.</_>\n        <_>\n          7 16 1 1 2.</_>\n        <_>\n          8 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 2 2 -1.</_>\n        <_>\n          5 17 1 1 2.</_>\n        <_>\n          6 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 10 -1.</_>\n        <_>\n          11 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 6 3 -1.</_>\n        <_>\n          12 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 2 10 -1.</_>\n        <_>\n          14 10 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 6 2 -1.</_>\n        <_>\n          11 13 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 1 3 -1.</_>\n        <_>\n          8 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 2 2 -1.</_>\n        <_>\n          12 15 1 1 2.</_>\n        <_>\n          13 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 4 -1.</_>\n        <_>\n          6 8 3 2 2.</_>\n        <_>\n          9 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 5 -1.</_>\n        <_>\n          8 5 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 7 3 -1.</_>\n        <_>\n          0 6 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 6 -1.</_>\n        <_>\n          9 9 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 8 -1.</_>\n        <_>\n          5 11 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 6 -1.</_>\n        <_>\n          4 9 1 3 2.</_>\n        <_>\n          5 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 6 1 -1.</_>\n        <_>\n          12 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 6 11 -1.</_>\n        <_>\n          15 6 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 2 2 -1.</_>\n        <_>\n          8 17 1 1 2.</_>\n        <_>\n          9 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 1 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 3 2 -1.</_>\n        <_>\n          11 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 6 1 -1.</_>\n        <_>\n          10 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 6 -1.</_>\n        <_>\n          4 3 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 12 -1.</_>\n        <_>\n          14 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 3 2 -1.</_>\n        <_>\n          12 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 1 -1.</_>\n        <_>\n          8 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 1 -1.</_>\n        <_>\n          12 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 2 1 -1.</_>\n        <_>\n          4 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 16 1 1 2.</_>\n        <_>\n          19 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 7 -1.</_>\n        <_>\n          17 11 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 6 -1.</_>\n        <_>\n          19 8 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 3 -1.</_>\n        <_>\n          9 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 4 -1.</_>\n        <_>\n          16 8 2 2 2.</_>\n        <_>\n          18 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 2 2 -1.</_>\n        <_>\n          2 8 1 1 2.</_>\n        <_>\n          3 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 4 -1.</_>\n        <_>\n          3 5 3 2 2.</_>\n        <_>\n          6 7 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 8 16 -1.</_>\n        <_>\n          2 3 4 8 2.</_>\n        <_>\n          6 11 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 3 -1.</_>\n        <_>\n          17 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 11 -1.</_>\n        <_>\n          11 2 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 6 14 -1.</_>\n        <_>\n          16 3 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 2 -1.</_>\n        <_>\n          6 9 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 14 3 -1.</_>\n        <_>\n          6 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 9 3 -1.</_>\n        <_>\n          13 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 6 -1.</_>\n        <_>\n          3 5 2 3 2.</_>\n        <_>\n          5 8 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 7 -1.</_>\n        <_>\n          4 7 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 11 6 -1.</_>\n        <_>\n          2 10 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 3 -1.</_>\n        <_>\n          8 10 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 3 11 -1.</_>\n        <_>\n          4 3 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 6 1 -1.</_>\n        <_>\n          3 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 1 2 -1.</_>\n        <_>\n          18 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 6 -1.</_>\n        <_>\n          8 0 6 3 2.</_>\n        <_>\n          14 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 3 -1.</_>\n        <_>\n          19 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 1 -1.</_>\n        <_>\n          6 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 1 -1.</_>\n        <_>\n          14 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 15 13 -1.</_>\n        <_>\n          8 6 5 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 2 -1.</_>\n        <_>\n          6 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 1 2 -1.</_>\n        <_>\n          0 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 6 -1.</_>\n        <_>\n          8 8 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 19 -1.</_>\n        <_>\n          5 0 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 5 -1.</_>\n        <_>\n          5 1 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 14 3 6 -1.</_>\n        <_>\n          17 16 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 13 2 6 -1.</_>\n        <_>\n          18 13 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 2 2 -1.</_>\n        <_>\n          18 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 9 4 -1.</_>\n        <_>\n          14 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 4 6 -1.</_>\n        <_>\n          15 8 2 3 2.</_>\n        <_>\n          17 11 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 1 3 -1.</_>\n        <_>\n          1 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 14 -1.</_>\n        <_>\n          8 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 1 -1.</_>\n        <_>\n          13 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 5 -1.</_>\n        <_>\n          10 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 9 -1.</_>\n        <_>\n          17 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 6 -1.</_>\n        <_>\n          13 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 18 -1.</_>\n        <_>\n          13 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 10 -1.</_>\n        <_>\n          8 9 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 2 3 -1.</_>\n        <_>\n          8 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 9 -1.</_>\n        <_>\n          11 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 6 -1.</_>\n        <_>\n          15 6 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 2 2 -1.</_>\n        <_>\n          12 18 1 1 2.</_>\n        <_>\n          13 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 1 3 -1.</_>\n        <_>\n          1 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 19 2 1 -1.</_>\n        <_>\n          13 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 6 -1.</_>\n        <_>\n          10 10 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 5 -1.</_>\n        <_>\n          16 2 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          9 7 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 2 2 -1.</_>\n        <_>\n          2 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 6 -1.</_>\n        <_>\n          10 16 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 2 -1.</_>\n        <_>\n          10 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 2 -1.</_>\n        <_>\n          6 9 3 1 2.</_>\n        <_>\n          9 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 12 -1.</_>\n        <_>\n          0 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 1 -1.</_>\n        <_>\n          9 0 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 2 -1.</_>\n        <_>\n          9 0 4 1 2.</_>\n        <_>\n          13 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 8 1 -1.</_>\n        <_>\n          16 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 6 -1.</_>\n        <_>\n          7 3 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 3 -1.</_>\n        <_>\n          18 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 2 -1.</_>\n        <_>\n          4 12 1 1 2.</_>\n        <_>\n          5 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 2 -1.</_>\n        <_>\n          8 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 9 6 -1.</_>\n        <_>\n          3 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 2 2 -1.</_>\n        <_>\n          18 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 16 -1.</_>\n        <_>\n          13 2 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 15 13 -1.</_>\n        <_>\n          7 4 5 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 3 10 -1.</_>\n        <_>\n          17 2 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 1 -1.</_>\n        <_>\n          7 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 16 -1.</_>\n        <_>\n          10 1 9 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 3 15 -1.</_>\n        <_>\n          15 4 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 13 1 2 -1.</_>\n        <_>\n          19 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 5 8 -1.</_>\n        <_>\n          2 10 5 4 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_eye_tree_eyeglasses.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    Tree-based 20x20 frontal eye detector with better handling of eyeglasses.\n    Created by Shameem Hameed (http://umich.edu/~shameem)\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's 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   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>20</height>\n  <width>20</width>\n  <stageParams>\n    <maxWeakCount>47</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>30</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>5</maxWeakCount>\n      <stageThreshold>-1.6473180055618286e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            2 1 0 -2.6987109333276749e-02 0 -1 1 5.0670530647039413e-02\n            -2 -3 2 -1.2915390729904175e-01</internalNodes>\n          <leafValues>\n            -8.0395472049713135e-01 6.0491400957107544e-01\n            9.0544581413269043e-01 4.4070810079574585e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 3 8.8827736675739288e-02 0 -1 4 -2.0398240536451340e-02\n            -2 -3 5 -6.1261758208274841e-02</internalNodes>\n          <leafValues>\n            7.9218882322311401e-01 4.0692299604415894e-02\n            4.2585361003875732e-01 -7.0325207710266113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 6 -2.0490810275077820e-01 0 -1 7 9.4933047890663147e-02\n            -2 -3 8 1.2091030366718769e-03</internalNodes>\n          <leafValues>\n            -4.4017648696899414e-01 5.3640520572662354e-01\n            6.8776458501815796e-01 -5.5879348516464233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 9 9.2227972345426679e-04 -1 2 10 -7.2678289143368602e-04\n            -2 -3 11 6.8421510513871908e-04</internalNodes>\n          <leafValues>\n            -7.2684401273727417e-01 -5.8028000593185425e-01\n            5.6177532672882080e-01 -2.9834181070327759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 12 -5.1150590181350708e-02 2 -1 13\n            6.1622060835361481e-02 -2 -3 14 7.2873473167419434e-02</internalNodes>\n          <leafValues>\n            5.9840762615203857e-01 7.4743932485580444e-01\n            -4.9703779816627502e-01 2.8129258751869202e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>7</maxWeakCount>\n      <stageThreshold>-1.4257860183715820e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            2 1 15 -4.1994878649711609e-01 0 -1 16\n            -5.6186288595199585e-02 -2 -3 17 -2.3711109533905983e-02</internalNodes>\n          <leafValues>\n            2.7586200833320618e-01 -6.4623218774795532e-01\n            8.5241252183914185e-01 8.3703370764851570e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 18 4.0523439645767212e-02 -1 2 19 2.7388900518417358e-01\n            -2 -3 20 -1.4293800108134747e-02</internalNodes>\n          <leafValues>\n            7.4270218610763550e-01 -4.9286690354347229e-01\n            7.1784788370132446e-01 -4.2223978787660599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 21 -2.1144729107618332e-03 2 -1 22\n            1.0659949621185660e-03 -2 -3 23 1.0812469990924001e-03</internalNodes>\n          <leafValues>\n            -8.0196601152420044e-01 -6.6025912761688232e-01\n            4.7916370630264282e-01 -5.1645290851593018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 24 3.0198289081454277e-02 2 -1 25 4.0569551289081573e-02\n            -2 -3 26 7.0679739117622375e-02</internalNodes>\n          <leafValues>\n            5.1327562332153320e-01 6.6641497611999512e-01\n            -4.5298659801483154e-01 5.5480718612670898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 27 -7.8928138827905059e-04 2 -1 28\n            8.0574717139825225e-04 -2 -3 29 -2.0976560190320015e-02</internalNodes>\n          <leafValues>\n            -7.2526299953460693e-01 -5.6479871273040771e-01\n            6.9993537664413452e-01 6.8500466644763947e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 30 1.2794960290193558e-02 -1 2 31\n            -8.1120636314153671e-03 -2 -3 32 -1.5506530180573463e-02</internalNodes>\n          <leafValues>\n            -8.6409568786621094e-01 4.4448360800743103e-01\n            3.6675310134887695e-01 -2.9189071059226990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 33 -1.2915650382637978e-02 0 -1 34\n            6.6297221928834915e-03 -2 -3 35 -3.6532930098474026e-03</internalNodes>\n          <leafValues>\n            -4.7566780447959900e-01 1.0350350290536880e-01\n            -6.1723059415817261e-01 5.4382532835006714e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-1.4711019992828369e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 36 -7.8731971979141235e-01 -1 2 37\n            1.6908009350299835e-01 -2 -3 38 -4.0369689464569092e-02</internalNodes>\n          <leafValues>\n            7.1268838644027710e-01 -7.1908998489379883e-01\n            4.4148930907249451e-01 -4.2251929640769958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 39 1.9132360816001892e-02 2 -1 40 6.4184539951384068e-04\n            -2 -3 41 -7.8941037645563483e-04</internalNodes>\n          <leafValues>\n            6.9186228513717651e-01 -7.6116967201232910e-01\n            -6.8140429258346558e-01 1.6009919345378876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 42 -7.1503049694001675e-03 0 -1 43\n            -2.3156129755079746e-03 -2 -3 44 -4.1521269828081131e-02</internalNodes>\n          <leafValues>\n            -5.5916607379913330e-01 5.1284497976303101e-01\n            2.4422569572925568e-01 -4.6883401274681091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 45 9.1200548922643065e-04 -1 2 46\n            -1.5798299573361874e-03 -2 -3 47 -1.1573649942874908e-02</internalNodes>\n          <leafValues>\n            -6.9527888298034668e-01 -6.3509649038314819e-01\n            6.4686381816864014e-01 6.9198559504002333e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 48 2.1843519061803818e-03 0 -1 49 2.9345690272748470e-03\n            -2 -3 50 -5.8788150548934937e-02</internalNodes>\n          <leafValues>\n            4.5632898807525635e-01 -5.8841437101364136e-01\n            2.6704201102256775e-01 -3.8348990678787231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 51 -5.5392808280885220e-04 -1 2 52\n            -5.3035060409456491e-04 -2 -3 53 -6.8775108084082603e-03</internalNodes>\n          <leafValues>\n            -4.8913368582725525e-01 -3.8421550393104553e-01\n            6.6845697164535522e-01 9.3158259987831116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 54 1.6710379859432578e-03 2 -1 55 1.4162790030241013e-03\n            -2 -3 56 7.7876187860965729e-03</internalNodes>\n          <leafValues>\n            -6.0369372367858887e-01 -3.0418768525123596e-01\n            3.9699068665504456e-01 -6.6687589883804321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 57 -1.2916780076920986e-02 0 -1 58\n            -3.0156269203871489e-03 -2 -3 59 -1.9785940647125244e-02</internalNodes>\n          <leafValues>\n            -7.1239727735519409e-01 4.6252989768981934e-01\n            2.8338319063186646e-01 -3.5317930579185486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 60 3.3207770902663469e-03 2 -1 61 2.9606239870190620e-02\n            -2 -3 62 4.4614788144826889e-02</internalNodes>\n          <leafValues>\n            -7.3291397094726562e-01 4.9530759453773499e-01\n            -1.9502809643745422e-01 7.9816418886184692e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>12</maxWeakCount>\n      <stageThreshold>-1.3850779533386230e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 63 -9.2366141080856323e-01 2 -1 64\n            -4.8193939030170441e-02 -2 -3 65 2.8669878840446472e-01</internalNodes>\n          <leafValues>\n            7.6915800571441650e-01 -5.1361227035522461e-01\n            -2.9671901464462280e-01 6.2028187513351440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 66 -1.3038160279393196e-02 0 -1 67\n            -1.4749659458175302e-03 -2 -3 68 -4.6921748667955399e-02</internalNodes>\n          <leafValues>\n            -7.1294248104095459e-01 5.9115177392959595e-01\n            3.1303560733795166e-01 -3.6749690771102905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 69 2.4459899868816137e-03 -1 2 70\n            -2.5321498978883028e-03 -2 -3 71 1.4651260571554303e-03</internalNodes>\n          <leafValues>\n            -4.6930000185966492e-01 -7.7450162172317505e-01\n            3.6414781212806702e-01 -5.7445889711380005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 72 -1.1307420209050179e-02 0 -1 73\n            -1.2048849603161216e-03 -2 -3 74 -6.2752872705459595e-02</internalNodes>\n          <leafValues>\n            -5.5727648735046387e-01 4.7871670126914978e-01\n            2.2788530588150024e-01 -4.3667969107627869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 75 -4.0173111483454704e-03 2 -1 76\n            1.5160309849306941e-03 -2 -3 77 1.9954680465161800e-03</internalNodes>\n          <leafValues>\n            -7.3568779230117798e-01 -5.8480697870254517e-01\n            2.1544020622968674e-02 5.5875688791275024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 78 3.4435209818184376e-03 -1 2 79\n            -2.6550020556896925e-03 -2 -3 80 -1.1407690122723579e-02</internalNodes>\n          <leafValues>\n            -7.6565897464752197e-01 -6.5447497367858887e-01\n            5.3633081912994385e-01 -3.8849171251058578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 81 -2.3805440869182348e-03 0 -1 82\n            6.6475258208811283e-03 -2 -3 83 1.4018240571022034e-01</internalNodes>\n          <leafValues>\n            3.3984410762786865e-01 -6.5025091171264648e-01\n            -3.2491090893745422e-01 7.5067067146301270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 84 -6.2358360737562180e-02 2 -1 85\n            1.3628599699586630e-03 -2 -3 86 -4.4609848409891129e-03</internalNodes>\n          <leafValues>\n            4.5777168869972229e-01 -6.3202661275863647e-01\n            4.0597960352897644e-01 -2.0854069292545319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 87 -1.0046839714050293e-02 2 -1 88\n            -2.9274819418787956e-02 -2 -3 89 7.7389390207827091e-03</internalNodes>\n          <leafValues>\n            -7.4789828062057495e-01 -1.7995479702949524e-01\n            4.7782841324806213e-01 -6.5113341808319092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 90 1.4774020528420806e-03 -1 2 91 1.4989820308983326e-02\n            -2 -3 92 4.5073241926729679e-03</internalNodes>\n          <leafValues>\n            -6.6269898414611816e-01 -1.6695550084114075e-01\n            3.8702058792114258e-01 -7.3409372568130493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 93 1.4901049435138702e-03 2 -1 94 8.9141662465408444e-04\n            -2 -3 95 -1.1558219790458679e-02</internalNodes>\n          <leafValues>\n            -3.4280839562416077e-01 -2.8036740422248840e-01\n            -4.2523959279060364e-01 4.5259669423103333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 96 -2.0011950284242630e-02 -1 2 97\n            -1.7092300578951836e-02 -2 -3 98 -6.7685171961784363e-02</internalNodes>\n          <leafValues>\n            4.0133118629455566e-01 3.6970010399818420e-01\n            7.4438679218292236e-01 -3.8255840539932251e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>12</maxWeakCount>\n      <stageThreshold>-1.4432040452957153e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 99 -2.0911149680614471e-02 0 -1 100\n            1.4305709302425385e-01 -2 -3 101 1.1925029568374157e-02</internalNodes>\n          <leafValues>\n            -3.4965568780899048e-01 7.0134562253952026e-01\n            -6.0404628515243530e-01 8.5615903139114380e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 102 2.4742009118199348e-02 2 -1 103\n            4.5732118189334869e-02 -2 -3 104 4.3204430490732193e-02</internalNodes>\n          <leafValues>\n            8.5365587472915649e-01 4.1876411437988281e-01\n            -3.9094918966293335e-01 2.7387988567352295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 105 -7.2548422031104565e-04 2 -1 106\n            1.4243220211938024e-03 -2 -3 107 -5.3335479460656643e-03</internalNodes>\n          <leafValues>\n            -6.2011122703552246e-01 -6.1589437723159790e-01\n            6.0596448183059692e-01 1.5840480104088783e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 108 -7.1891010738909245e-03 2 -1 109\n            1.8233320442959666e-03 -2 -3 110 1.6109029529616237e-03</internalNodes>\n          <leafValues>\n            -2.0852829515933990e-01 -8.1338381767272949e-01\n            5.6780648231506348e-01 -8.7046259641647339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 111 -4.8350278288125992e-02 0 -1 112\n            3.1746171414852142e-02 -2 -3 113 1.9233829807490110e-03</internalNodes>\n          <leafValues>\n            -3.5335820913314819e-01 4.4076570868492126e-01\n            4.0730631351470947e-01 -5.9592568874359131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 114 1.3614529743790627e-03 -1 2 115\n            -3.6934199742972851e-03 -2 -3 116 -8.5378461517393589e-04</internalNodes>\n          <leafValues>\n            -5.5307251214981079e-01 -7.3163098096847534e-01\n            4.3890678882598877e-01 -6.3009172677993774e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 117 -1.0950770229101181e-02 -1 2 118\n            -7.2186449542641640e-03 -2 -3 119 1.8548289313912392e-02</internalNodes>\n          <leafValues>\n            3.9263078570365906e-01 2.7225250005722046e-01\n            -4.1208618879318237e-01 6.3790637254714966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 120 1.0859060566872358e-03 -1 2 121\n            -6.5618362277746201e-03 -2 -3 122 -6.1777420341968536e-02</internalNodes>\n          <leafValues>\n            -5.0857210159301758e-01 3.5386729240417480e-01\n            5.7568281888961792e-01 -2.8477248549461365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 123 4.9480778397992253e-04 2 -1 124\n            1.1606880463659763e-02 -2 -3 125 -1.6142609529197216e-03</internalNodes>\n          <leafValues>\n            -4.9583891034126282e-01 -5.1320201158523560e-01\n            5.2665728330612183e-01 3.0917160212993622e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 126 2.0437680650502443e-03 -1 2 127\n            -8.2394909113645554e-03 -2 -3 128 -3.9699211716651917e-02</internalNodes>\n          <leafValues>\n            -7.0948588848114014e-01 3.4189811348915100e-01\n            4.7383341193199158e-01 -2.5060850381851196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 129 -8.0377282574772835e-04 0 -1 130\n            -5.4273242130875587e-03 -2 -3 131 -5.2662738598883152e-03</internalNodes>\n          <leafValues>\n            -5.1384007930755615e-01 2.9752710461616516e-01\n            1.4577029645442963e-01 -4.6007528901100159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 132 6.3841522205621004e-04 -1 2 133\n            -1.5458120033144951e-03 -2 -3 134 1.1863360414281487e-03</internalNodes>\n          <leafValues>\n            -3.6412829160690308e-01 -5.8081609010696411e-01\n            2.9298609495162964e-01 -5.1420718431472778e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>12</maxWeakCount>\n      <stageThreshold>-1.5415630340576172e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 135 -2.7745011448860168e-01 0 -1 136\n            -3.1200000084936619e-03 -2 -3 137 -8.0280922353267670e-02</internalNodes>\n          <leafValues>\n            8.3265638351440430e-01 1.0233189910650253e-01\n            2.3773579299449921e-01 -6.4546662569046021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 138 -6.9391548633575439e-02 2 -1 139\n            5.3355181589722633e-03 -2 -3 140 -5.4189618676900864e-02</internalNodes>\n          <leafValues>\n            4.6008241176605225e-01 2.9137989878654480e-01\n            4.7026729583740234e-01 -5.7723402976989746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 141 1.8562959507107735e-02 -1 2 142\n            4.6305730938911438e-02 -2 -3 143 -8.8262781500816345e-03</internalNodes>\n          <leafValues>\n            7.0555502176284790e-01 -5.2839881181716919e-01\n            4.3953609466552734e-01 -1.3887490332126617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 144 -2.8772179502993822e-03 -1 2 145\n            -2.6457069907337427e-03 -2 -3 146 3.3441530540585518e-03</internalNodes>\n          <leafValues>\n            -2.7475830912590027e-01 -5.7746797800064087e-01\n            3.6615240573883057e-01 -6.3586741685867310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 147 -8.3742372691631317e-02 0 -1 148\n            1.0164769738912582e-01 -2 -3 149 -2.1541758906096220e-03</internalNodes>\n          <leafValues>\n            -2.9664519429206848e-01 5.6140047311782837e-01\n            -7.5446271896362305e-01 3.9601260423660278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 150 -1.7133549554273486e-03 2 -1 151\n            1.3899410143494606e-02 -2 -3 152 -2.8498120605945587e-02</internalNodes>\n          <leafValues>\n            -7.3741632699966431e-01 4.8247390985488892e-01\n            4.1971048712730408e-01 -2.0021289587020874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 153 -4.9728769809007645e-03 2 -1 154\n            -3.4751880913972855e-02 -2 -3 155 -8.7171117775142193e-04</internalNodes>\n          <leafValues>\n            3.7631350755691528e-01 -4.4797790050506592e-01\n            -6.9995099306106567e-01 1.5640909969806671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 156 -3.3666230738162994e-03 -1 2 157\n            -2.1378830075263977e-02 -2 -3 158 -1.1869249865412712e-02</internalNodes>\n          <leafValues>\n            -6.7721921205520630e-01 3.3951529860496521e-01\n            5.4050672054290771e-01 -2.4071580171585083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 159 -4.4268160127103329e-03 2 -1 160\n            4.1405398398637772e-02 -2 -3 161 -3.7884410470724106e-02</internalNodes>\n          <leafValues>\n            -7.3965507745742798e-01 8.2905638217926025e-01\n            1.7030739784240723e-01 -2.4498699605464935e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 162 3.7567419349215925e-04 -1 2 163\n            -3.7140299100428820e-03 -2 -3 164 -6.1806719750165939e-03</internalNodes>\n          <leafValues>\n            -4.5103698968887329e-01 3.8348129391670227e-01\n            3.6097520589828491e-01 -2.0644439756870270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 165 -1.2373559875413775e-03 -1 2 166\n            -2.1339580416679382e-03 -2 -3 167 2.8985869139432907e-03</internalNodes>\n          <leafValues>\n            -5.8166879415512085e-01 4.1669690608978271e-01\n            -2.4721260368824005e-01 3.5056841373443604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 168 -4.4636861421167850e-03 0 -1 169\n            1.6411510296165943e-03 -2 -3 170 -7.3051019571721554e-03</internalNodes>\n          <leafValues>\n            3.5625410079956055e-01 -4.1040098667144775e-01\n            2.0216129720211029e-01 -3.4234520792961121e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>13</maxWeakCount>\n      <stageThreshold>-1.4762729406356812e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 171 -5.1942609250545502e-02 0 -1 172\n            -4.7268528491258621e-02 -2 -3 173 -7.8969672322273254e-03</internalNodes>\n          <leafValues>\n            8.8198930025100708e-01 6.4829237759113312e-02\n            8.8662758469581604e-02 -5.9007811546325684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 174 9.0199249098077416e-04 2 -1 175\n            -1.7289820313453674e-01 -2 -3 176 -2.3374119773507118e-03</internalNodes>\n          <leafValues>\n            5.9040898084640503e-01 -5.2029031515121460e-01\n            5.2981728315353394e-01 -1.4985850453376770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 177 -1.7534950748085976e-02 -1 2 178\n            5.8875310060102493e-05 -2 -3 179 -3.2241028547286987e-01</internalNodes>\n          <leafValues>\n            5.3269028663635254e-01 -4.5709720253944397e-01\n            5.7380169630050659e-01 -1.2866480648517609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 180 8.3220787928439677e-05 0 -1 181\n            -1.1180160072399303e-04 -2 -3 182 -1.0344980284571648e-02</internalNodes>\n          <leafValues>\n            9.0006209909915924e-02 -5.6352388858795166e-01\n            6.3273417949676514e-01 5.0064269453287125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 183 -9.4440882094204426e-04 2 -1 184\n            -3.7474210839718580e-03 -2 -3 185 4.0574651211500168e-03</internalNodes>\n          <leafValues>\n            4.4386640191078186e-01 -3.4999918937683105e-01\n            -4.5298218727111816e-01 3.0920198559761047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 186 5.5205920943990350e-05 0 -1 187\n            -7.5678288936614990e-02 -2 -3 188 -3.0975368618965149e-01</internalNodes>\n          <leafValues>\n            3.5544091463088989e-01 -3.6047360301017761e-01\n            -6.4954018592834473e-01 3.0679279565811157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 189 -7.9595847637392581e-05 0 -1 190\n            4.0613119490444660e-03 -2 -3 191 4.3240871280431747e-02</internalNodes>\n          <leafValues>\n            3.3850470185279846e-01 -5.3271901607513428e-01\n            -3.2592329382896423e-01 5.5076271295547485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 192 -6.7015928216278553e-03 -1 2 193\n            -1.0451120324432850e-03 -2 -3 194 8.3967261016368866e-03</internalNodes>\n          <leafValues>\n            5.0109171867370605e-01 -5.8881980180740356e-01\n            -9.5237597823143005e-02 5.6516999006271362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 195 -6.5531006839592010e-05 0 -1 196\n            7.8218057751655579e-05 -2 -3 197 3.2988168299198151e-02</internalNodes>\n          <leafValues>\n            -4.6556711196899414e-01 5.4509781301021576e-02\n            3.5248789191246033e-01 -5.2722948789596558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 198 -1.4161449857056141e-02 2 -1 199\n            3.1500440090894699e-02 -2 -3 200 -2.1956730633974075e-03</internalNodes>\n          <leafValues>\n            3.6811780929565430e-01 5.2040421962738037e-01\n            1.1603529751300812e-01 -3.0985280871391296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 201 -4.0099889039993286e-02 -1 2 202\n            -3.2569639384746552e-02 -2 -3 203 -4.2014168575406075e-03</internalNodes>\n          <leafValues>\n            -4.5146378874778748e-01 -6.4392048120498657e-01\n            -8.2594501972198486e-01 1.9259540736675262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 204 2.0385689567774534e-03 0 -1 205\n            -1.6212540213018656e-03 -2 -3 206 -8.6220083758234978e-03</internalNodes>\n          <leafValues>\n            -3.7723371386528015e-01 3.3918830752372742e-01\n            4.8986920714378357e-01 -2.7532070875167847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 207 9.2185800895094872e-05 2 -1 208\n            -7.1932889113668352e-05 -2 -3 209 4.4952900498174131e-04</internalNodes>\n          <leafValues>\n            2.4223749339580536e-01 -4.2189198732376099e-01\n            2.9407840967178345e-01 -4.4028049707412720e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>15</maxWeakCount>\n      <stageThreshold>-1.4963719844818115e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 210 -1.9638450816273689e-02 0 -1 211\n            1.1364299803972244e-01 -2 -3 212 -1.0112149640917778e-02</internalNodes>\n          <leafValues>\n            -3.2444450259208679e-01 7.4602019786834717e-01\n            3.3333331346511841e-01 -5.6435650587081909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 213 1.2130879797041416e-02 2 -1 214\n            -1.5958850085735321e-01 -2 -3 215 -2.3524949792772532e-03</internalNodes>\n          <leafValues>\n            7.2214919328689575e-01 -3.9274591207504272e-01\n            5.6152492761611938e-01 -1.3768480718135834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 216 -4.1118920780718327e-03 -1 2 217\n            -1.7832900583744049e-01 -2 -3 218 -7.8500732779502869e-03</internalNodes>\n          <leafValues>\n            6.3556081056594849e-01 3.3373141288757324e-01\n            3.9536771178245544e-01 -3.3380430936813354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 219 -4.6880490117473528e-05 0 -1 220\n            5.2934719860786572e-05 -2 -3 221 2.0851430235779844e-05</internalNodes>\n          <leafValues>\n            -6.6118270158767700e-01 -4.8232190310955048e-02\n            -9.8838359117507935e-02 4.4528418779373169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 222 -1.8425289541482925e-02 -1 2 223\n            -7.6133902184665203e-03 -2 -3 224 -6.0353721491992474e-03</internalNodes>\n          <leafValues>\n            -6.5690898895263672e-01 5.3413677215576172e-01\n            3.6171048879623413e-01 -2.0478430390357971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 225 4.3712720071198419e-05 0 -1 226\n            -7.8823999501764774e-04 -2 -3 227 -4.5693209394812584e-03</internalNodes>\n          <leafValues>\n            -4.5326828956604004e-01 3.5517698526382446e-01\n            6.1721032857894897e-01 -2.9707700014114380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 228 -3.8058571517467499e-02 0 -1 229\n            -1.1797689646482468e-01 -2 -3 230 4.6841651201248169e-03</internalNodes>\n          <leafValues>\n            3.5003998875617981e-01 -2.7257668972015381e-01\n            -3.2559171319007874e-01 3.7737470865249634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 231 -2.6372840511612594e-04 0 -1 232\n            6.2580420635640621e-03 -2 -3 233 5.6767999922158197e-05</internalNodes>\n          <leafValues>\n            3.7421739101409912e-01 -5.8926701545715332e-01\n            -4.8859021067619324e-01 -1.8623730167746544e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 234 9.2742107808589935e-03 2 -1 235\n            -3.8514519110321999e-03 -2 -3 236 -5.3287498303689063e-05</internalNodes>\n          <leafValues>\n            3.0933541059494019e-01 -3.4513729810714722e-01\n            5.2340328693389893e-01 -9.1159403324127197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 237 9.8315975628793240e-04 2 -1 238\n            8.2858657697215676e-04 -2 -3 239 1.1229789815843105e-02</internalNodes>\n          <leafValues>\n            -5.0185352563858032e-01 -3.0529549717903137e-01\n            2.6219210028648376e-01 -4.7969821095466614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 240 -1.0327639989554882e-02 -1 2 241\n            -6.9197742268443108e-03 -2 -3 242 -5.0027170218527317e-03</internalNodes>\n          <leafValues>\n            -5.6315082311630249e-01 3.1225070357322693e-01\n            1.7820779979228973e-01 -3.0091148614883423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 243 -1.1156810069223866e-04 -1 2 244\n            4.2464961297810078e-03 -2 -3 245 -4.7280951548600569e-05</internalNodes>\n          <leafValues>\n            1.8883679807186127e-01 -4.0101578831672668e-01\n            4.6505901217460632e-01 -2.9863640666007996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 246 -1.8891280051320791e-03 -1 2 247\n            -5.8536308642942458e-05 -2 -3 248 2.0671950551331975e-05</internalNodes>\n          <leafValues>\n            5.6963747739791870e-01 1.8008249998092651e-01\n            -5.8659601211547852e-01 -5.4875258356332779e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 249 -1.1267509544268250e-03 2 -1 250\n            2.1378440782427788e-02 -2 -3 251 -1.2546040117740631e-02</internalNodes>\n          <leafValues>\n            -4.0261599421501160e-01 3.9230358600616455e-01\n            4.9474561214447021e-01 -1.7322529852390289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 252 -7.2257901774719357e-04 2 -1 253\n            6.4563672058284283e-03 -2 -3 254 4.9086650833487511e-03</internalNodes>\n          <leafValues>\n            -3.0380329489707947e-01 4.7173491120338440e-01\n            -1.6380549967288971e-01 3.7708491086959839e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>19</maxWeakCount>\n      <stageThreshold>-1.5243699550628662e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            2 1 255 -7.2617560625076294e-02 0 -1 256\n            -6.9059380330145359e-03 -2 -3 257 2.1727949380874634e-01</internalNodes>\n          <leafValues>\n            2.6602798700332642e-01 -4.9325171113014221e-01\n            -1.0769230127334595e-01 8.2661122083663940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 258 -2.0319509785622358e-03 0 -1 259\n            2.8931589797139168e-02 -2 -3 260 -4.6076569706201553e-03</internalNodes>\n          <leafValues>\n            -3.7963140755891800e-02 8.0230438709259033e-01\n            4.2468398809432983e-01 -2.9379379749298096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 261 6.9408868439495564e-03 0 -1 262\n            -5.9231962077319622e-03 -2 -3 263 5.1128160208463669e-02</internalNodes>\n          <leafValues>\n            4.1737049818038940e-01 -2.5552588701248169e-01\n            -3.8619861006736755e-01 4.7076860070228577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 264 1.5201330184936523e-02 -1 2 265\n            -1.8096340820193291e-02 -2 -3 266 7.9378951340913773e-05</internalNodes>\n          <leafValues>\n            5.4354798793792725e-01 2.6651141047477722e-01\n            -4.3927749991416931e-01 2.5831260718405247e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 267 -5.3462558425962925e-03 -1 2 268\n            -6.9701080210506916e-03 -2 -3 269 8.4738981968257576e-05</internalNodes>\n          <leafValues>\n            -6.6308969259262085e-01 -7.0310682058334351e-01\n            -1.7880809307098389e-01 2.5993299484252930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 270 -2.8513800352811813e-03 2 -1 271\n            2.2954840678721666e-03 -2 -3 272 -3.5036220215260983e-03</internalNodes>\n          <leafValues>\n            4.5053678750991821e-01 3.0560511350631714e-01\n            1.5040870010852814e-01 -3.3283078670501709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 273 -6.9570228457450867e-02 0 -1 274\n            5.9261121350573376e-05 -2 -3 275 -5.9058349579572678e-02</internalNodes>\n          <leafValues>\n            -3.6899719387292862e-02 4.0927308797836304e-01\n            1.3826370239257812e-01 -3.8214409351348877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 276 -8.9645627886056900e-03 -1 2 277\n            4.9211819714400917e-05 -2 -3 278 9.9640293046832085e-03</internalNodes>\n          <leafValues>\n            -5.8134728670120239e-01 -1.8481740355491638e-01\n            8.7685473263263702e-02 5.8509802818298340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 279 -1.9302699714899063e-02 -1 2 280\n            -4.3869198998436332e-04 -2 -3 281 6.5669846662785858e-05</internalNodes>\n          <leafValues>\n            5.3263461589813232e-01 2.8891131281852722e-01\n            -3.3493599295616150e-01 5.9566751122474670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 282 -2.0224519073963165e-02 -1 2 283\n            8.7082196841947734e-05 -2 -3 284 -1.6202719882130623e-02</internalNodes>\n          <leafValues>\n            -6.5536081790924072e-01 -1.2211789935827255e-01\n            -4.7076839208602905e-01 3.0990770459175110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 285 4.4353529810905457e-03 -1 2 286\n            -9.0544822160154581e-04 -2 -3 287 -1.4297979651018977e-03</internalNodes>\n          <leafValues>\n            -5.4039931297302246e-01 4.2878800630569458e-01\n            2.2322739660739899e-01 -1.8194420635700226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 288 3.2359519973397255e-03 0 -1 289\n            1.0716189717641100e-04 -2 -3 290 -5.8802281273528934e-04</internalNodes>\n          <leafValues>\n            -2.9218220710754395e-01 1.3910460472106934e-01\n            -4.6926081180572510e-01 3.8085499405860901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 291 -9.0546347200870514e-03 -1 2 292\n            -8.6048766970634460e-03 -2 -3 293 -1.2719300575554371e-03</internalNodes>\n          <leafValues>\n            -5.0426542758941650e-01 -2.7559030055999756e-01\n            3.6022108793258667e-01 -2.6484970003366470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 294 -3.9098240085877478e-04 -1 2 295\n            -3.6405251012183726e-04 -2 -3 296 -6.6685711499303579e-04</internalNodes>\n          <leafValues>\n            2.6651731133460999e-01 1.4721649885177612e-01\n            -4.9719738960266113e-01 -6.1579849570989609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 297 -2.4845570325851440e-02 -1 2 298\n            -1.5436399728059769e-02 -2 -3 299 -5.6572312116622925e-01</internalNodes>\n          <leafValues>\n            -7.0820981264114380e-01 -4.7206890583038330e-01\n            6.3965231180191040e-01 5.2069328725337982e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 300 -5.7480141520500183e-02 -1 2 301\n            -1.4613820239901543e-02 -2 -3 302 -3.3993738889694214e-01</internalNodes>\n          <leafValues>\n            2.9297390580177307e-01 6.0129672288894653e-01\n            1.9041299819946289e-02 -3.3254599571228027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 303 -3.1427140347659588e-03 0 -1 304\n            2.1966299973428249e-03 -2 -3 305 -2.4858590215444565e-02</internalNodes>\n          <leafValues>\n            -2.2972729802131653e-01 2.2367340326309204e-01\n            -5.6212967634201050e-01 3.9542859792709351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 306 -1.6135630430653691e-03 2 -1 307\n            1.1416019697207958e-04 -2 -3 308 1.3170539750717580e-04</internalNodes>\n          <leafValues>\n            -4.8256790637969971e-01 2.6877319812774658e-01\n            -3.9078921079635620e-01 1.7153440415859222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 309 -8.5256207967177033e-05 -1 2 310\n            6.4925159676931798e-05 -2 -3 311 -1.2689639814198017e-02</internalNodes>\n          <leafValues>\n            2.1754570305347443e-01 -4.7468620538711548e-01\n            -6.6538578271865845e-01 1.2347090244293213e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>27</maxWeakCount>\n      <stageThreshold>-1.3592849969863892e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            2 1 312 -2.9844639822840691e-02 0 -1 313\n            -4.5487660169601440e-01 -2 -3 314 2.7445149607956409e-03</internalNodes>\n          <leafValues>\n            3.9222040772438049e-01 -3.9314880967140198e-01\n            -1.5923570096492767e-01 8.2696700096130371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 315 -1.0584670118987560e-02 0 -1 316\n            -1.6308380290865898e-02 -2 -3 317 -4.8787441104650497e-02</internalNodes>\n          <leafValues>\n            4.5954689383506775e-01 -2.1620120108127594e-01\n            7.5103652477264404e-01 7.4557967483997345e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 318 -2.9621229041367769e-03 2 -1 319\n            1.7300529405474663e-02 -2 -3 320 -1.6731169074773788e-02</internalNodes>\n          <leafValues>\n            -2.4452270567417145e-01 -3.3090409636497498e-01\n            5.3751850128173828e-01 2.9153820127248764e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 321 1.2326180003583431e-02 -1 2 322\n            5.4928299039602280e-02 -2 -3 323 2.7763319667428732e-03</internalNodes>\n          <leafValues>\n            -5.4824811220169067e-01 -2.1952770650386810e-01\n            3.6463689059019089e-02 5.0633782148361206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 324 -4.5116998255252838e-02 2 -1 325\n            1.1207940056920052e-02 -2 -3 326 -5.7006389833986759e-03</internalNodes>\n          <leafValues>\n            4.2339310050010681e-01 3.9984008669853210e-01\n            -5.9729182720184326e-01 -9.8557651042938232e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 327 -5.3951311856508255e-03 0 -1 328\n            7.8587066382169724e-03 -2 -3 329 1.0666639544069767e-02</internalNodes>\n          <leafValues>\n            3.4734690189361572e-01 -4.7281920909881592e-01\n            -2.3315669596195221e-01 2.4360010027885437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 330 2.8001810424029827e-03 0 -1 331\n            -7.9198479652404785e-03 -2 -3 332 -2.3832279257476330e-03</internalNodes>\n          <leafValues>\n            -4.8354551196098328e-01 1.8321120738983154e-01\n            3.2168481498956680e-02 -5.0476258993148804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 333 -9.7674019634723663e-03 -1 2 334\n            -1.3897259719669819e-02 -2 -3 335 -6.4803068526089191e-03</internalNodes>\n          <leafValues>\n            -7.4415212869644165e-01 4.5425128936767578e-01\n            4.8292869329452515e-01 -1.0258570313453674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 336 9.4482619315385818e-03 -1 2 337\n            -7.0351187605410814e-04 -2 -3 338 -4.2770579457283020e-03</internalNodes>\n          <leafValues>\n            -5.3326022624969482e-01 2.9435831308364868e-01\n            1.5501999855041504e-01 -3.0867969989776611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 339 5.8752358891069889e-03 2 -1 340\n            9.5629561692476273e-03 -2 -3 341 -6.8425266363192350e-05</internalNodes>\n          <leafValues>\n            -6.0491317510604858e-01 4.4039881229400635e-01\n            1.0206270217895508e-01 -2.5624030828475952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 342 5.4002371616661549e-03 2 -1 343\n            2.9745819047093391e-03 -2 -3 344 -2.5536341127008200e-03</internalNodes>\n          <leafValues>\n            4.5371580123901367e-01 -6.0967987775802612e-01\n            2.2111609578132629e-01 -1.2801170349121094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 345 4.0425839833915234e-03 2 -1 346\n            7.6407291926443577e-03 -2 -3 347 -1.0939979692921042e-03</internalNodes>\n          <leafValues>\n            -1.9264020025730133e-01 6.1178821325302124e-01\n            -3.7973681092262268e-01 1.6438940167427063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 348 -1.1377089685993269e-04 0 -1 349\n            5.2979402244091034e-03 -2 -3 350 2.9510098975151777e-03</internalNodes>\n          <leafValues>\n            -2.7770480141043663e-02 4.3019628524780273e-01\n            -3.7912338972091675e-01 1.0130850225687027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 351 6.3235480338335037e-03 -1 2 352\n            3.9955950342118740e-03 -2 -3 353 -5.3595582721754909e-04</internalNodes>\n          <leafValues>\n            4.0413460135459900e-01 -1.5097740292549133e-01\n            5.9522801637649536e-01 -3.4380171447992325e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 354 3.6193430423736572e-03 2 -1 355\n            3.4626820124685764e-03 -2 -3 356 2.9030859470367432e-02</internalNodes>\n          <leafValues>\n            -7.4454522132873535e-01 2.8504610061645508e-01\n            -1.8565440177917480e-01 1.5829989314079285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 357 6.0747697716578841e-04 2 -1 358\n            9.4140451401472092e-03 -2 -3 359 -2.2230610251426697e-02</internalNodes>\n          <leafValues>\n            -3.3788970112800598e-01 -3.6750578880310059e-01\n            -6.4205718040466309e-01 1.7526410520076752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 360 -4.6881791204214096e-03 0 -1 361\n            -3.9184167981147766e-03 -2 -3 362 -6.3269808888435364e-03</internalNodes>\n          <leafValues>\n            1.6476869583129883e-01 -2.2729560732841492e-01\n            5.7388627529144287e-01 5.7931281626224518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 363 -3.7428940413519740e-04 2 -1 364\n            2.8672320768237114e-03 -2 -3 365 2.4337199283763766e-04</internalNodes>\n          <leafValues>\n            -3.5288140177726746e-01 -4.1419389843940735e-01\n            2.0027640461921692e-01 -2.8263148665428162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 366 -9.1555183753371239e-03 -1 2 367\n            -1.2892490485683084e-03 -2 -3 368 -1.6453899443149567e-03</internalNodes>\n          <leafValues>\n            -5.4508739709854126e-01 2.5321239233016968e-01\n            1.7635670304298401e-01 -2.3053619265556335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 369 -7.6485536992549896e-02 2 -1 370\n            3.8297360879369080e-04 -2 -3 371 -2.6448920834809542e-04</internalNodes>\n          <leafValues>\n            -7.0480287075042725e-01 2.2375050187110901e-01\n            1.4251540601253510e-01 -2.4608950316905975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 372 -7.9496540129184723e-03 -1 2 373\n            -7.7398279681801796e-03 -2 -3 374 -1.0467980057001114e-02</internalNodes>\n          <leafValues>\n            -4.2123699188232422e-01 -4.6475729346275330e-01\n            -4.7312980890274048e-01 1.3598929345607758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 375 9.4248689711093903e-03 2 -1 376\n            -3.7210211157798767e-03 -2 -3 377 -1.6539100557565689e-02</internalNodes>\n          <leafValues>\n            3.5587531328201294e-01 -1.5899239480495453e-01\n            -6.1142671108245850e-01 3.3778318762779236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 378 1.8258139491081238e-02 -1 2 379\n            -6.1498139984905720e-03 -2 -3 380 1.4396630227565765e-02</internalNodes>\n          <leafValues>\n            -7.0120972394943237e-01 3.8414189219474792e-01\n            2.2873559966683388e-02 -4.8029011487960815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 381 -4.8927508294582367e-02 -1 2 382\n            -4.9874751130118966e-04 -2 -3 383 -1.2338399887084961e-02</internalNodes>\n          <leafValues>\n            -1.2219530344009399e-01 4.4899681210517883e-01\n            5.8306622505187988e-01 -1.5592460334300995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 384 4.9237860366702080e-03 -1 2 385\n            6.4515617850702256e-05 -2 -3 386 -9.0754460543394089e-03</internalNodes>\n          <leafValues>\n            5.7889437675476074e-01 -2.2252050042152405e-01\n            2.5118181109428406e-01 -1.1915980279445648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 387 -2.2913129068911076e-03 2 -1 388\n            -1.1618229560554028e-02 -2 -3 389 -2.6231290772557259e-02</internalNodes>\n          <leafValues>\n            2.0203049480915070e-01 -2.4990449845790863e-01\n            -7.2858989238739014e-01 2.2483369708061218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 390 2.1525719785131514e-04 2 -1 391\n            5.4147760383784771e-03 -2 -3 392 -6.8281739950180054e-03</internalNodes>\n          <leafValues>\n            -3.0237621068954468e-01 -3.4467801451683044e-01\n            -5.1470118761062622e-01 1.8762029707431793e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>29</maxWeakCount>\n      <stageThreshold>-1.3664239645004272e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 393 8.8577903807163239e-03 0 -1 394\n            2.2660400718450546e-03 -2 -3 395 1.5509200282394886e-02</internalNodes>\n          <leafValues>\n            -3.6197811365127563e-01 3.4535628557205200e-01\n            -2.2814500331878662e-01 8.0521601438522339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 396 1.9730629399418831e-02 0 -1 397\n            -5.2804131060838699e-02 -2 -3 398 -3.4123551100492477e-02</internalNodes>\n          <leafValues>\n            2.2162230312824249e-01 -2.6307260990142822e-01\n            8.7687742710113525e-01 1.5147949755191803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 399 -4.4995918869972229e-03 -1 2 400\n            -3.8060150109231472e-03 -2 -3 401 -6.5935899328906089e-05</internalNodes>\n          <leafValues>\n            -5.1520478725433350e-01 3.1563198566436768e-01\n            1.1052650213241577e-01 -3.0016160011291504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 402 9.5838904380798340e-03 2 -1 403\n            4.2877299711108208e-03 -2 -3 404 3.2141651026904583e-03</internalNodes>\n          <leafValues>\n            5.2808177471160889e-01 -6.3694041967391968e-01\n            3.5910170525312424e-02 -5.4334390163421631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 405 -7.9250690760090947e-04 2 -1 406\n            -1.5514569822698832e-03 -2 -3 407 -1.7790550366044044e-02</internalNodes>\n          <leafValues>\n            -4.7867339849472046e-01 -9.1462276875972748e-02\n            4.5612779259681702e-01 1.0628259740769863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 408 -2.5881261099129915e-03 0 -1 409\n            -2.7412150520831347e-03 -2 -3 410 4.4753181282430887e-04</internalNodes>\n          <leafValues>\n            1.6198949515819550e-01 -2.9113239049911499e-01\n            -2.8482219576835632e-01 3.3902090787887573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 411 -3.6593680270016193e-03 2 -1 412\n            2.4432500358670950e-03 -2 -3 413 -1.3546410016715527e-02</internalNodes>\n          <leafValues>\n            -5.1089602708816528e-01 -3.2154849171638489e-01\n            2.7356979250907898e-01 -1.2062689661979675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 414 1.1241570115089417e-01 -1 2 415\n            -4.5845299027860165e-03 -2 -3 416 6.3416222110390663e-03</internalNodes>\n          <leafValues>\n            3.6505278944969177e-01 4.4773998856544495e-01\n            -9.7543753683567047e-02 -6.1698240041732788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 417 -9.1398190706968307e-03 0 -1 418\n            -8.2371473312377930e-02 -2 -3 419 3.1728888861835003e-03</internalNodes>\n          <leafValues>\n            6.1478227376937866e-01 -1.7612460255622864e-01\n            2.7462399005889893e-01 -5.3833961486816406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 420 8.2914117956534028e-04 0 -1 421\n            -1.7079230397939682e-02 -2 -3 422 -4.8665981739759445e-03</internalNodes>\n          <leafValues>\n            -4.3669781088829041e-01 1.7935889959335327e-01\n            -6.2017709016799927e-02 -5.9141248464584351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 423 -3.3614661078900099e-03 -1 2 424\n            -4.4482201337814331e-02 -2 -3 425 -1.8765870481729507e-03</internalNodes>\n          <leafValues>\n            -4.3437281250953674e-01 -6.8157917261123657e-01\n            -6.8667972087860107e-01 1.1657930165529251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 426 2.3192320019006729e-02 -1 2 427\n            -4.5041430741548538e-02 -2 -3 428 2.3778830654919147e-03</internalNodes>\n          <leafValues>\n            4.0776708722114563e-01 3.7137511372566223e-01\n            -7.1181386709213257e-02 -5.3898727893829346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 429 -1.3468379620462656e-03 0 -1 430\n            4.3169260025024414e-03 -2 -3 431 4.5682261697947979e-03</internalNodes>\n          <leafValues>\n            2.3184180259704590e-01 -3.8448938727378845e-01\n            -2.4857190251350403e-01 1.2519669532775879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 432 1.1057799682021141e-02 -1 2 433\n            -6.6700251772999763e-04 -2 -3 434 4.8536141548538581e-05</internalNodes>\n          <leafValues>\n            -3.8228470087051392e-01 -2.7387779951095581e-01\n            -2.9664589092135429e-02 2.8385889530181885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 435 -3.9972390979528427e-02 0 -1 436\n            -1.6880780458450317e-02 -2 -3 437 -5.6082051247358322e-02</internalNodes>\n          <leafValues>\n            6.3570600748062134e-01 -1.9189420342445374e-01\n            -9.0092360973358154e-01 1.9145509600639343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 438 3.4141261130571365e-03 2 -1 439\n            9.1075859963893890e-03 -2 -3 440 -1.3897320022806525e-03</internalNodes>\n          <leafValues>\n            4.2132571339607239e-01 5.5071562528610229e-01\n            -5.0447541475296021e-01 -4.0802270174026489e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 441 1.7231719568371773e-02 0 -1 442\n            -2.0052720792591572e-03 -2 -3 443 3.5111181205138564e-04</internalNodes>\n          <leafValues>\n            -3.1567269563674927e-01 5.5168247222900391e-01\n            5.6736338883638382e-02 -2.6553949713706970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 444 -2.0616729743778706e-03 -1 2 445\n            -1.0434100404381752e-03 -2 -3 446 2.0041360985487700e-03</internalNodes>\n          <leafValues>\n            -4.9637660384178162e-01 2.5625479221343994e-01\n            -2.3637770116329193e-01 1.2562820315361023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 447 -4.6680038794875145e-03 2 -1 448\n            1.0352090001106262e-02 -2 -3 449 2.9808359686285257e-03</internalNodes>\n          <leafValues>\n            -5.1331508159637451e-01 3.5214298963546753e-01\n            -1.6628879308700562e-01 1.6649410128593445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 450 1.0835190303623676e-02 -1 2 451\n            -3.8211939390748739e-03 -2 -3 452 -3.4161040093749762e-03</internalNodes>\n          <leafValues>\n            -3.8929209113121033e-01 3.5466459393501282e-01\n            -4.5814520120620728e-01 4.5853018760681152e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 453 -5.8807642199099064e-03 0 -1 454\n            -3.4913890063762665e-02 -2 -3 455 4.8959217965602875e-03</internalNodes>\n          <leafValues>\n            1.0240379720926285e-01 -2.5945249199867249e-01\n            2.6778548955917358e-01 -4.8959800601005554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 456 5.8120768517255783e-03 -1 2 457\n            3.5575949586927891e-03 -2 -3 458 2.5241500698029995e-03</internalNodes>\n          <leafValues>\n            3.0377060174942017e-01 -1.8064819276332855e-01\n            4.1480910778045654e-01 -1.9794499874114990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 459 1.5492970123887062e-02 2 -1 460\n            2.3261269961949438e-04 -2 -3 461 -2.1607619710266590e-03</internalNodes>\n          <leafValues>\n            4.7802209854125977e-01 -3.0891039967536926e-01\n            -4.0223160386085510e-01 1.1098849773406982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 462 3.5326189827173948e-03 -1 2 463\n            -3.3474999945610762e-03 -2 -3 464 2.9168210923671722e-02</internalNodes>\n          <leafValues>\n            2.2489060461521149e-01 1.6631869971752167e-01\n            -7.4026778340339661e-02 -4.5744699239730835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 465 -1.6242500394582748e-02 -1 2 466\n            -7.5024510733783245e-03 -2 -3 467 1.7816389445215464e-03</internalNodes>\n          <leafValues>\n            -4.3497189879417419e-01 1.6646090149879456e-01\n            -3.9155849814414978e-01 8.0571353435516357e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 468 -7.2545823059044778e-05 0 -1 469\n            6.1626458773389459e-05 -2 -3 470 -4.3781189015135169e-04</internalNodes>\n          <leafValues>\n            -4.1679731011390686e-01 6.0808397829532623e-03\n            3.1920549273490906e-01 -7.7506266534328461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 471 -3.0576970311813056e-04 0 -1 472\n            -1.3107899576425552e-02 -2 -3 473 -7.4203108670189977e-04</internalNodes>\n          <leafValues>\n            -3.6462840437889099e-01 2.2391660511493683e-01\n            6.8343617022037506e-02 -2.9597601294517517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 474 -7.7575328759849072e-03 2 -1 475\n            3.0043099541217089e-03 -2 -3 476 -5.8561760932207108e-02</internalNodes>\n          <leafValues>\n            4.5748728513717651e-01 1.8059000372886658e-01\n            2.6555559039115906e-01 -2.0381399989128113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 477 -2.5295289233326912e-02 -1 2 478\n            -4.9810659140348434e-02 -2 -3 479 -2.4564980994910002e-03</internalNodes>\n          <leafValues>\n            -5.8704811334609985e-01 -8.4442830085754395e-01\n            4.4017440080642700e-01 3.7946549709886312e-03</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>25</maxWeakCount>\n      <stageThreshold>-1.3621879816055298e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            2 1 480 -2.3795999586582184e-02 0 -1 481\n            -4.2916718870401382e-02 -2 -3 482 -9.9466904066503048e-04</internalNodes>\n          <leafValues>\n            2.1881549619138241e-03 -4.9640420079231262e-01\n            8.3718097209930420e-01 -3.0279759317636490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 483 1.3895650394260883e-02 2 -1 484\n            -2.2832138929516077e-03 -2 -3 485 -4.8447579145431519e-01</internalNodes>\n          <leafValues>\n            -3.9495769143104553e-01 -3.8689300417900085e-02\n            8.3933347463607788e-01 2.3111909627914429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 486 -7.3761418461799622e-03 2 -1 487\n            3.3793840557336807e-03 -2 -3 488 -3.3415269106626511e-02</internalNodes>\n          <leafValues>\n            2.3094999790191650e-01 9.1608531773090363e-02\n            1.1462929844856262e-01 -5.4809182882308960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 489 -7.6022851280868053e-03 2 -1 490\n            7.6229616999626160e-02 -2 -3 491 -3.7729479372501373e-03</internalNodes>\n          <leafValues>\n            -5.7959568500518799e-01 3.4666779637336731e-01\n            1.1899670213460922e-01 -2.7983540296554565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 492 -4.2590490193106234e-04 0 -1 493\n            -9.4475867226719856e-03 -2 -3 494 -8.0220031738281250e-01</internalNodes>\n          <leafValues>\n            1.4403289556503296e-01 -2.8053888678550720e-01\n            6.6430008411407471e-01 5.4834768176078796e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 495 -2.8851430397480726e-03 -1 2 496\n            -1.2341480469331145e-03 -2 -3 497 4.8669218813301995e-05</internalNodes>\n          <leafValues>\n            -3.8836699724197388e-01 -3.6734551191329956e-01\n            -7.8982323408126831e-02 3.0184748768806458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 498 -1.6491800546646118e-01 -1 2 499\n            1.0784890037029982e-03 -2 -3 500 -2.8511860873550177e-03</internalNodes>\n          <leafValues>\n            3.8886231184005737e-01 -2.4477399885654449e-01\n            4.5753139257431030e-01 -5.3499769419431686e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 501 -3.2212301157414913e-03 0 -1 502\n            3.4995030146092176e-03 -2 -3 503 -1.0098779574036598e-02</internalNodes>\n          <leafValues>\n            -2.4303850531578064e-01 1.5881340205669403e-01\n            -5.5816608667373657e-01 3.2196229696273804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 504 -6.6468201112002134e-04 -1 2 505\n            -3.6263898946344852e-03 -2 -3 506 -7.6791420578956604e-02</internalNodes>\n          <leafValues>\n            2.4572889506816864e-01 1.8094339966773987e-01\n            2.6634529232978821e-01 -3.5051029920578003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 507 -2.7685859240591526e-03 2 -1 508\n            2.5676529854536057e-02 -2 -3 509 -4.6753739006817341e-03</internalNodes>\n          <leafValues>\n            -4.3504360318183899e-01 -3.5143280029296875e-01\n            4.1049909591674805e-01 3.3144820481538773e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 510 6.7022559233009815e-03 -1 2 511\n            1.6208000481128693e-02 -2 -3 512 -1.1024869978427887e-02</internalNodes>\n          <leafValues>\n            -4.9738308787345886e-01 -1.7945469915866852e-01\n            4.0457150340080261e-01 -4.3077580630779266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 513 7.7911361586302519e-04 0 -1 514\n            -1.8139690160751343e-01 -2 -3 515 -1.2972550466656685e-03</internalNodes>\n          <leafValues>\n            5.1866638660430908e-01 -7.5364969670772552e-02\n            -5.0643932819366455e-01 -1.7226299270987511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 516 2.0431660115718842e-02 2 -1 517\n            1.6622639959678054e-03 -2 -3 518 -2.7155179996043444e-03</internalNodes>\n          <leafValues>\n            -7.0584601163864136e-01 -4.5102250576019287e-01\n            -4.4598218798637390e-01 1.3886100053787231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 519 4.2074210796272382e-05 2 -1 520\n            9.3489577993750572e-03 -2 -3 521 -1.3226609677076340e-02</internalNodes>\n          <leafValues>\n            -2.2170229256153107e-01 -4.6554449200630188e-01\n            5.4859870672225952e-01 6.7970179021358490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 522 -1.5071720117703080e-03 2 -1 523\n            8.7646767497062683e-03 -2 -3 524 -1.0542649775743484e-02</internalNodes>\n          <leafValues>\n            4.6481129527091980e-01 2.7992910146713257e-01\n            2.1239709854125977e-01 -2.2514510154724121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 525 -6.4357798546552658e-03 2 -1 526\n            7.8919027000665665e-03 -2 -3 527 -7.8666176705155522e-05</internalNodes>\n          <leafValues>\n            -4.1811630129814148e-01 -6.2211698293685913e-01\n            2.7184090018272400e-01 -4.2934559285640717e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 528 8.2855960354208946e-03 2 -1 529\n            5.4834279580973089e-05 -2 -3 530 2.4197530001401901e-03</internalNodes>\n          <leafValues>\n            3.4669309854507446e-01 7.2008788585662842e-02\n            -3.7774428725242615e-01 1.7871029675006866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 531 -6.7930121440440416e-04 0 -1 532\n            -5.6035388261079788e-03 -2 -3 533 8.4534510970115662e-03</internalNodes>\n          <leafValues>\n            1.6817240417003632e-01 -2.7659809589385986e-01\n            6.9586731493473053e-02 6.7284989356994629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 534 4.4707441702485085e-03 -1 2 535\n            -9.1664772480726242e-03 -2 -3 536 -7.1168012917041779e-02</internalNodes>\n          <leafValues>\n            -4.2183759808540344e-01 3.6319440603256226e-01\n            -5.9520107507705688e-01 2.3322079330682755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 537 -3.6344379186630249e-03 0 -1 538\n            -5.8278841897845268e-03 -2 -3 539 -2.5245670694857836e-03</internalNodes>\n          <leafValues>\n            -3.5108420252799988e-01 2.7366310358047485e-01\n            1.4989720284938812e-01 -2.4933290481567383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 540 5.6592230685055256e-03 2 -1 541\n            4.0714079514145851e-03 -2 -3 542 -1.1921550147235394e-02</internalNodes>\n          <leafValues>\n            -3.4733161330223083e-01 -4.7359859943389893e-01\n            -4.0016528964042664e-01 1.5767680108547211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 543 9.8874024115502834e-04 0 -1 544\n            1.4633700484409928e-03 -2 -3 545 -7.6617081649601460e-03</internalNodes>\n          <leafValues>\n            2.1033559739589691e-01 -1.5317709743976593e-01\n            2.3481769859790802e-01 -3.7187078595161438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 546 -1.7770569771528244e-02 0 -1 547\n            8.8388901203870773e-03 -2 -3 548 -1.0058529675006866e-02</internalNodes>\n          <leafValues>\n            -1.6414129734039307e-01 4.8245888948440552e-01\n            -5.4388159513473511e-01 2.8127178549766541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 549 2.8392190579324961e-03 -1 2 550\n            -7.8546267468482256e-04 -2 -3 551 4.2725168896140531e-05</internalNodes>\n          <leafValues>\n            -3.8577800989151001e-01 -3.2860949635505676e-01\n            -4.6654768288135529e-02 2.7741169929504395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 552 5.1506902091205120e-03 -1 2 553\n            -8.3640925586223602e-03 -2 -3 554 -8.8340323418378830e-03</internalNodes>\n          <leafValues>\n            2.7348038554191589e-01 1.4315670728683472e-01\n            5.4049361497163773e-02 -3.6266559362411499e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>16</maxWeakCount>\n      <stageThreshold>-1.3905019760131836e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 555 1.7114889621734619e-01 0 -1 556\n            3.2740959431976080e-03 -2 -3 557 4.8062200658023357e-03</internalNodes>\n          <leafValues>\n            -5.5645358562469482e-01 5.5018130689859390e-02\n            1.1190200224518776e-02 7.9551488161087036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 558 1.8143800552934408e-03 0 -1 559\n            -4.2795971035957336e-01 -2 -3 560 -6.3261981122195721e-03</internalNodes>\n          <leafValues>\n            5.8408319950103760e-01 -1.3940179720520973e-02\n            1.6659989953041077e-01 -5.0161522626876831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 561 1.0702019557356834e-02 0 -1 562\n            7.3792198672890663e-03 -2 -3 563 4.8895571380853653e-03</internalNodes>\n          <leafValues>\n            -4.0653520822525024e-01 1.2877050042152405e-01\n            4.3990871310234070e-01 -7.8997397422790527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 564 1.0012320242822170e-02 0 -1 565\n            3.4356310963630676e-01 -2 -3 566 -7.2859530337154865e-03</internalNodes>\n          <leafValues>\n            -2.5616368651390076e-01 4.6377441287040710e-01\n            5.8014488220214844e-01 -5.4609451442956924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 567 -1.5099609736353159e-03 2 -1 568\n            2.9597719549201429e-04 -2 -3 569 1.0984730033669621e-04</internalNodes>\n          <leafValues>\n            -6.4054518938064575e-01 3.8956710696220398e-01\n            -3.4113371372222900e-01 1.1111719906330109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 570 -3.2580990809947252e-03 -1 2 571\n            -3.8750080857425928e-03 -2 -3 572 1.4542469754815102e-02</internalNodes>\n          <leafValues>\n            -7.3414462804794312e-01 -6.3508582115173340e-01\n            1.7632520198822021e-01 -6.6695272922515869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 573 2.6616070419549942e-02 2 -1 574\n            5.2236141636967659e-03 -2 -3 575 5.8677811175584793e-03</internalNodes>\n          <leafValues>\n            -7.5831902027130127e-01 -6.2622100114822388e-01\n            -3.1810950487852097e-02 4.1031879186630249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 576 -1.0499180061742663e-03 0 -1 577\n            2.3986180312931538e-03 -2 -3 578 1.1009530164301395e-02</internalNodes>\n          <leafValues>\n            -5.2936470508575439e-01 2.2620279341936111e-02\n            3.0528450012207031e-01 -7.4659830331802368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 579 -2.3957889527082443e-02 -1 2 580\n            -3.6849190946668386e-03 -2 -3 581 3.4864700865000486e-03</internalNodes>\n          <leafValues>\n            -5.8027571439743042e-01 3.0985590815544128e-01\n            -3.1498908996582031e-01 1.3219730556011200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 582 -1.9150340557098389e-01 -1 2 583\n            -8.0496361479163170e-03 -2 -3 584 1.2236339971423149e-02</internalNodes>\n          <leafValues>\n            4.3646478652954102e-01 1.7165799438953400e-01\n            -3.6382019519805908e-01 2.3967529833316803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 585 -2.0347100216895342e-03 -1 2 586\n            -5.5528031662106514e-03 -2 -3 587 -3.2379259355366230e-03</internalNodes>\n          <leafValues>\n            -5.9768581390380859e-01 -5.4164600372314453e-01\n            -5.3870290517807007e-01 1.8444229662418365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 588 9.0606305748224258e-03 -1 2 589\n            -4.1239038109779358e-03 -2 -3 590 3.5246899351477623e-03</internalNodes>\n          <leafValues>\n            3.1039738655090332e-01 1.8052390217781067e-01\n            -4.7347640991210938e-01 1.5349459834396839e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 591 5.2378959953784943e-03 -1 2 592\n            -9.4280708581209183e-03 -2 -3 593 -7.9351589083671570e-03</internalNodes>\n          <leafValues>\n            -4.5859739184379578e-01 -6.3323330879211426e-01\n            -6.1539369821548462e-01 1.6920439898967743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 594 -7.7211041934788227e-03 2 -1 595\n            9.0800300240516663e-03 -2 -3 596 -4.3125250376760960e-03</internalNodes>\n          <leafValues>\n            -6.5861612558364868e-01 -7.1446138620376587e-01\n            3.4336578845977783e-01 -4.6265859156847000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 597 2.3179050534963608e-02 -1 2 598\n            -2.1390080451965332e-02 -2 -3 599 -2.3761409521102905e-01</internalNodes>\n          <leafValues>\n            3.6338710784912109e-01 1.8276840448379517e-01\n            6.1675137281417847e-01 -3.4261471033096313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 600 2.1705040708184242e-03 -1 2 601\n            7.8210679930634797e-05 -2 -3 602 5.5145919322967529e-03</internalNodes>\n          <leafValues>\n            3.0056789517402649e-01 -3.4116759896278381e-01\n            2.3386859893798828e-01 -4.2150521278381348e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>25</maxWeakCount>\n      <stageThreshold>-1.3378640413284302e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 603 -2.2743379697203636e-02 0 -1 604\n            1.8450849456712604e-03 -2 -3 605 1.3338179886341095e-01</internalNodes>\n          <leafValues>\n            -8.9552268385887146e-02 7.4778342247009277e-01\n            -4.4504231214523315e-01 -1.7580920830368996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 606 6.3608489930629730e-02 -1 2 607\n            -2.5199958682060242e-01 -2 -3 608 -1.2144230306148529e-01</internalNodes>\n          <leafValues>\n            -3.7739220261573792e-01 4.9088031053543091e-01\n            6.3825917243957520e-01 -1.1822170019149780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 609 2.6287150103598833e-03 2 -1 610\n            3.0568530783057213e-03 -2 -3 611 8.1901780504267663e-05</internalNodes>\n          <leafValues>\n            -4.6926748752593994e-01 -6.5101218223571777e-01\n            -1.1639259755611420e-01 3.0188819766044617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 612 -1.6189720481634140e-03 2 -1 613\n            1.8283469835296273e-03 -2 -3 614 -3.9073298685252666e-03</internalNodes>\n          <leafValues>\n            -2.0891909301280975e-01 -1.9859300553798676e-01\n            -3.4454259276390076e-01 3.7140819430351257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 615 8.3928240928798914e-04 2 -1 616\n            3.7175789475440979e-03 -2 -3 617 5.1694628782570362e-03</internalNodes>\n          <leafValues>\n            -1.5356570482254028e-01 -5.0904238224029541e-01\n            3.5618001222610474e-01 -5.5773228406906128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 618 2.5797619018703699e-03 -1 2 619\n            -6.0318140313029289e-03 -2 -3 620 6.4257727935910225e-03</internalNodes>\n          <leafValues>\n            -4.2096439003944397e-01 -4.3999868631362915e-01\n            1.8873579800128937e-01 -4.5191749930381775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 621 3.4354510717093945e-03 2 -1 622\n            2.3672808893024921e-03 -2 -3 623 -2.0294289570301771e-03</internalNodes>\n          <leafValues>\n            2.7395468950271606e-01 2.3808500170707703e-01\n            -4.7586150467395782e-02 -4.8159629106521606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 624 -4.8436429351568222e-03 2 -1 625\n            3.0318649951368570e-03 -2 -3 626 -1.1691249907016754e-02</internalNodes>\n          <leafValues>\n            -4.9325150251388550e-01 -4.7109460830688477e-01\n            -5.8763760328292847e-01 1.4840489625930786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 627 6.5642758272588253e-05 2 -1 628\n            -6.9199966674204916e-05 -2 -3 629 -2.8953890432603657e-04</internalNodes>\n          <leafValues>\n            2.0787779986858368e-01 -4.2199170589447021e-01\n            -3.4657689929008484e-01 2.4809280037879944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 630 4.0080421604216099e-03 0 -1 631\n            5.0496991025283933e-04 -2 -3 632 -8.1637818366289139e-03</internalNodes>\n          <leafValues>\n            -2.9731631278991699e-01 6.3133187592029572e-02\n            6.3499641418457031e-01 -1.4965349435806274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 633 4.9255997873842716e-03 -1 2 634\n            -1.9985990598797798e-02 -2 -3 635 6.5322928130626678e-03</internalNodes>\n          <leafValues>\n            -5.8709067106246948e-01 4.1946971416473389e-01\n            -1.3393980264663696e-01 2.6131281256675720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 636 5.1231118850409985e-03 2 -1 637\n            -4.0335211087949574e-04 -2 -3 638 2.9234900139272213e-03</internalNodes>\n          <leafValues>\n            -3.6397430300712585e-01 -1.1776120215654373e-01\n            -1.2529510073363781e-02 4.6132311224937439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 639 3.5967670381069183e-02 2 -1 640\n            6.5072569996118546e-03 -2 -3 641 -1.0821050032973289e-02</internalNodes>\n          <leafValues>\n            4.5991379022598267e-01 3.2189390063285828e-01\n            3.0423519015312195e-01 -2.0769970118999481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 642 -3.7279170937836170e-03 -1 2 643\n            -8.9352466166019440e-03 -2 -3 644 3.9792140014469624e-03</internalNodes>\n          <leafValues>\n            -4.7056239843368530e-01 3.1361898779869080e-01\n            -1.8559350073337555e-01 3.0811190605163574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 645 1.9110339926555753e-03 -1 2 646\n            -6.8130958825349808e-03 -2 -3 647 -6.4241990912705660e-04</internalNodes>\n          <leafValues>\n            -4.4997429847717285e-01 -4.4663950800895691e-01\n            2.5373989343643188e-01 -6.7794866859912872e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 648 4.8487721942365170e-03 -1 2 649\n            -2.2816660348325968e-03 -2 -3 650 -1.1166459880769253e-03</internalNodes>\n          <leafValues>\n            2.1777780354022980e-01 7.4151009321212769e-02\n            1.3762679696083069e-01 -4.5716550946235657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 651 -5.7191308587789536e-03 2 -1 652\n            1.9458220340311527e-03 -2 -3 653 1.7544110305607319e-03</internalNodes>\n          <leafValues>\n            -2.0206199586391449e-01 5.1613742113113403e-01\n            1.8209919333457947e-01 -2.4927709996700287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 654 6.5033212304115295e-03 2 -1 655\n            2.3260021116584539e-03 -2 -3 656 -5.0675291568040848e-03</internalNodes>\n          <leafValues>\n            -6.0831350088119507e-01 -4.5783790946006775e-01\n            -4.6264541149139404e-01 1.3114589452743530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 657 -1.4921430265530944e-03 0 -1 658\n            -1.3755200430750847e-02 -2 -3 659 6.3531019259244204e-04</internalNodes>\n          <leafValues>\n            -4.3485641479492188e-01 2.0381599664688110e-01\n            -3.2480859756469727e-01 1.9679710268974304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 660 -1.0971709853038192e-03 0 -1 661\n            2.1464130841195583e-03 -2 -3 662 1.0343589819967747e-02</internalNodes>\n          <leafValues>\n            2.2354440391063690e-01 -2.5036358833312988e-01\n            -2.7500569820404053e-01 3.2847368717193604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 663 -1.3076810538768768e-01 -1 2 664\n            -8.7650436908006668e-03 -2 -3 665 -3.0066180624999106e-04</internalNodes>\n          <leafValues>\n            -7.7974641323089600e-01 3.8356649875640869e-01\n            -3.0849298834800720e-01 5.5713050067424774e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 666 -1.0776310227811337e-02 2 -1 667\n            7.3227831162512302e-03 -2 -3 668 -2.1263879537582397e-01</internalNodes>\n          <leafValues>\n            -5.3079968690872192e-01 3.0776378512382507e-01\n            -6.5190672874450684e-01 2.3253040853887796e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 669 6.5717170946300030e-03 -1 2 670\n            -1.6367210075259209e-02 -2 -3 671 -1.5086789615452290e-02</internalNodes>\n          <leafValues>\n            2.4296599626541138e-01 4.0867790579795837e-01\n            1.5299239754676819e-01 -2.5561499595642090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 672 4.5563760213553905e-03 0 -1 673\n            7.2980518452823162e-03 -2 -3 674 2.3971209302544594e-02</internalNodes>\n          <leafValues>\n            8.6251303553581238e-02 -5.1425570249557495e-01\n            -6.8491697311401367e-01 3.9260080456733704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 675 3.5279770381748676e-03 -1 2 676\n            -5.4452237673103809e-03 -2 -3 677 8.1267702626064420e-04</internalNodes>\n          <leafValues>\n            -5.8989018201828003e-01 4.1997981071472168e-01\n            -2.5605329871177673e-01 7.9393006861209869e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>30</maxWeakCount>\n      <stageThreshold>-1.2140669822692871e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 678 -2.7691459283232689e-02 0 -1 679\n            1.3043059734627604e-03 -2 -3 680 -1.9430460408329964e-02</internalNodes>\n          <leafValues>\n            -1.3037249445915222e-01 7.8108358383178711e-01\n            1.4480729587376118e-02 -3.7184581160545349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 681 -1.2235040217638016e-01 0 -1 682\n            -9.8456647247076035e-03 -2 -3 683 -7.4350096285343170e-02</internalNodes>\n          <leafValues>\n            2.8437229990959167e-01 -2.3675830662250519e-01\n            5.8174878358840942e-01 -2.8041550889611244e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 684 5.4055661894381046e-03 -1 2 685\n            -3.7805580068379641e-03 -2 -3 686 -6.2997087836265564e-02</internalNodes>\n          <leafValues>\n            -3.3748638629913330e-01 -4.6232721209526062e-01\n            4.2070108652114868e-01 -1.6759809805080295e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 687 -5.5793630890548229e-03 -1 2 688\n            -2.2814329713582993e-03 -2 -3 689 3.9111520163714886e-03</internalNodes>\n          <leafValues>\n            -6.4612352848052979e-01 -4.6796101331710815e-01\n            -2.5594810023903847e-02 3.3460310101509094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 690 -3.5144959110766649e-03 0 -1 691\n            -5.8226250112056732e-03 -2 -3 692 -3.5309740342199802e-03</internalNodes>\n          <leafValues>\n            1.1143500357866287e-01 -3.0549728870391846e-01\n            -3.7789401412010193e-01 2.9324159026145935e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 693 -1.6653330530971289e-03 0 -1 694\n            -5.3326018154621124e-02 -2 -3 695 8.0891316756606102e-03</internalNodes>\n          <leafValues>\n            1.7236860096454620e-01 -3.9026060700416565e-01\n            -1.6290800645947456e-02 3.9434731006622314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 696 -3.7783260922878981e-03 2 -1 697\n            6.9123809225857258e-03 -2 -3 698 -2.1676100790500641e-02</internalNodes>\n          <leafValues>\n            -5.9947258234024048e-01 3.4755259752273560e-01\n            3.3966198563575745e-01 -1.2729069590568542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 699 4.8390422016382217e-03 -1 2 700\n            -8.3583313971757889e-03 -2 -3 701 3.7209360743872821e-04</internalNodes>\n          <leafValues>\n            -3.6860859394073486e-01 3.6083450913429260e-01\n            5.5149830877780914e-02 -3.8888710737228394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 702 2.4114940315485001e-03 -1 2 703\n            -2.2250239271670580e-03 -2 -3 704 5.9994249604642391e-03</internalNodes>\n          <leafValues>\n            -3.4846460819244385e-01 2.5639998912811279e-01\n            -3.3086439967155457e-01 6.3943088054656982e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 705 1.2653459794819355e-02 2 -1 706\n            9.6980258822441101e-03 -2 -3 707 4.6688161790370941e-02</internalNodes>\n          <leafValues>\n            -6.5382891893386841e-01 3.2730111479759216e-01\n            6.1174212023615837e-03 -5.0968867540359497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 708 1.7876239726319909e-03 2 -1 709\n            1.2315230444073677e-02 -2 -3 710 -5.9714429080486298e-03</internalNodes>\n          <leafValues>\n            2.5808030366897583e-01 1.8367570638656616e-01\n            9.3017883598804474e-02 -3.3489298820495605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 711 -4.6226778067648411e-03 -1 2 712\n            -1.8949989229440689e-02 -2 -3 713 -2.6787531375885010e-01</internalNodes>\n          <leafValues>\n            -6.0853439569473267e-01 -6.2188267707824707e-01\n            -4.4505828619003296e-01 1.1461599916219711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 714 5.3505371324717999e-03 0 -1 715\n            2.8202211251482368e-04 -2 -3 716 -2.1514539548661560e-04</internalNodes>\n          <leafValues>\n            -3.3214330673217773e-01 1.1352939903736115e-01\n            3.9949831366539001e-01 -7.2412580251693726e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 717 -7.1091961581259966e-04 -1 2 718\n            3.9453650970244780e-05 -2 -3 719 -1.5662070363759995e-02</internalNodes>\n          <leafValues>\n            -3.4575951099395752e-01 -1.4114260673522949e-01\n            4.7070771455764771e-01 8.7163902819156647e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 720 -2.9816610738635063e-02 0 -1 721\n            8.2333059981465340e-04 -2 -3 722 -4.9664578400552273e-03</internalNodes>\n          <leafValues>\n            -1.4977900311350822e-02 -4.1764840483665466e-01\n            4.4018781185150146e-01 -2.0097310189157724e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 723 9.6796536818146706e-03 0 -1 724\n            1.4388150302693248e-03 -2 -3 725 -6.5185758285224438e-04</internalNodes>\n          <leafValues>\n            -2.8451511263847351e-01 1.1680959910154343e-01\n            3.4258028864860535e-01 -2.7020359039306641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 726 -4.6871218830347061e-02 -1 2 727\n            -2.2867210209369659e-02 -2 -3 728 -1.1887500295415521e-03</internalNodes>\n          <leafValues>\n            -3.9659130573272705e-01 -3.4727048873901367e-01\n            2.6036709547042847e-01 -4.2848858982324600e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 729 4.3433779501356184e-04 -1 2 730\n            -2.0600060001015663e-02 -2 -3 731 3.2824440859258175e-03</internalNodes>\n          <leafValues>\n            -2.2835609316825867e-01 -5.0135952234268188e-01\n            1.6683070361614227e-01 -5.0252157449722290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 732 -1.9087310880422592e-02 -1 2 733\n            -1.1216020211577415e-02 -2 -3 734 7.7710166573524475e-02</internalNodes>\n          <leafValues>\n            4.1381299495697021e-01 1.5498070418834686e-01\n            -2.9895618557929993e-01 1.7541980743408203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 735 3.1873160041868687e-03 -1 2 736\n            -1.0656990110874176e-01 -2 -3 737 -5.1779888570308685e-02</internalNodes>\n          <leafValues>\n            -8.5479579865932465e-02 -5.1295292377471924e-01\n            -5.0179839134216309e-01 3.8466781377792358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 738 1.5107400249689817e-03 2 -1 739\n            3.1244980636984110e-03 -2 -3 740 -1.3240240514278412e-03</internalNodes>\n          <leafValues>\n            -3.3874571323394775e-01 -2.1653899550437927e-01\n            3.3594998717308044e-01 -1.2085800059139729e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 741 -1.6975030303001404e-02 2 -1 742\n            7.9635268775746226e-04 -2 -3 743 -8.4425378590822220e-03</internalNodes>\n          <leafValues>\n            5.1493197679519653e-01 -2.2367909550666809e-01\n            -5.4637181758880615e-01 1.2477649748325348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 744 1.4797519892454147e-02 2 -1 745\n            3.8537830114364624e-03 -2 -3 746 -2.5684939697384834e-02</internalNodes>\n          <leafValues>\n            4.0930178761482239e-01 2.5966641306877136e-01\n            4.6507820487022400e-02 -3.1387579441070557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 747 -1.9678380340337753e-03 2 -1 748\n            1.9392849644646049e-03 -2 -3 749 -5.7980217970907688e-03</internalNodes>\n          <leafValues>\n            -3.4348770976066589e-01 -2.3071029782295227e-01\n            -4.2302230000495911e-01 1.8470630049705505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 750 6.0432781465351582e-03 2 -1 751\n            2.2162510140333325e-04 -2 -3 752 -2.5901809567585588e-04</internalNodes>\n          <leafValues>\n            2.0985080301761627e-01 -3.4345629811286926e-01\n            -4.0245899558067322e-01 9.6283361315727234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 753 -4.6646450646221638e-03 -1 2 754\n            1.8331389874219894e-03 -2 -3 755 -5.4393261671066284e-03</internalNodes>\n          <leafValues>\n            -4.0147981047630310e-01 -7.4128046631813049e-02\n            -7.1304339170455933e-01 2.5141170620918274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 756 -4.2101307772099972e-03 0 -1 757\n            -8.6573585867881775e-03 -2 -3 758 -2.5619829073548317e-02</internalNodes>\n          <leafValues>\n            5.5250108242034912e-01 -8.8310241699218750e-02\n            4.0513488650321960e-01 -1.2086849659681320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 759 -9.3565601855516434e-03 -1 2 760\n            -9.7968382760882378e-04 -2 -3 761 4.5081991702318192e-02</internalNodes>\n          <leafValues>\n            1.4859180152416229e-01 1.5276379883289337e-01\n            -3.3007758855819702e-01 4.9553450942039490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 762 2.0435510668903589e-03 -1 2 763\n            -5.1532210782170296e-03 -2 -3 764 2.5609789881855249e-03</internalNodes>\n          <leafValues>\n            -5.4895031452178955e-01 -5.9945631027221680e-01\n            -3.6197409033775330e-02 2.5463849306106567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 765 -2.8830259107053280e-03 0 -1 766\n            2.4457499966956675e-04 -2 -3 767 3.4641250967979431e-03</internalNodes>\n          <leafValues>\n            3.6667680740356445e-01 -8.9348360896110535e-02\n            -2.2523890435695648e-01 1.6340459883213043e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>23</maxWeakCount>\n      <stageThreshold>-1.3826370239257812e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            2 1 768 6.3124410808086395e-03 0 -1 769\n            -2.9899911023676395e-03 -2 -3 770 -5.2643599919974804e-03</internalNodes>\n          <leafValues>\n            8.2071298360824585e-01 5.6462198495864868e-02\n            1.8240800499916077e-01 -4.2487311363220215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 771 2.4592089466750622e-03 0 -1 772\n            4.2719349265098572e-01 -2 -3 773 3.0295109376311302e-02</internalNodes>\n          <leafValues>\n            -3.3858558535575867e-01 1.5100230276584625e-01\n            7.8724241256713867e-01 -5.8373618125915527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 774 5.7569369673728943e-03 -1 2 775\n            -9.9140219390392303e-03 -2 -3 776 8.0783478915691376e-03</internalNodes>\n          <leafValues>\n            4.2810270190238953e-01 3.5321989655494690e-01\n            -4.0107539296150208e-01 1.2523290514945984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 777 -3.5829450935125351e-02 2 -1 778\n            3.0664550140500069e-02 -2 -3 779 -1.3575930148363113e-02</internalNodes>\n          <leafValues>\n            -3.8963070511817932e-01 6.7701917886734009e-01\n            3.0789810419082642e-01 -1.1214990168809891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 780 -3.1188609078526497e-02 -1 2 781\n            -1.7885420471429825e-02 -2 -3 782 2.3879480431787670e-04</internalNodes>\n          <leafValues>\n            -5.0550907850265503e-01 -5.2990978956222534e-01\n            2.6112490892410278e-01 -1.2882560491561890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 783 8.5746757686138153e-03 2 -1 784\n            2.3016470950096846e-03 -2 -3 785 4.6683140099048615e-03</internalNodes>\n          <leafValues>\n            4.8921179771423340e-01 1.5979060530662537e-01\n            -3.8685420155525208e-01 2.4002879858016968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 786 5.3485399112105370e-03 2 -1 787\n            2.3726709187030792e-02 -2 -3 788 -3.0209170654416084e-04</internalNodes>\n          <leafValues>\n            3.4825628995895386e-01 5.2329671382904053e-01\n            -4.4047841429710388e-01 -3.3358339220285416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 789 -1.6881260275840759e-01 -1 2 790\n            -1.8069280486088246e-04 -2 -3 791 -2.7342080138623714e-03</internalNodes>\n          <leafValues>\n            -6.5631157159805298e-01 -2.7557009458541870e-01\n            4.0996900200843811e-01 3.1245049089193344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 792 -3.1896680593490601e-03 0 -1 793\n            -1.6777559649199247e-03 -2 -3 794 7.5925810961052775e-04</internalNodes>\n          <leafValues>\n            3.1674280762672424e-01 -1.3047559559345245e-01\n            8.2382179796695709e-02 7.4721777439117432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 795 1.7604179680347443e-02 0 -1 796\n            -2.5936108827590942e-01 -2 -3 797 -2.4794649798423052e-03</internalNodes>\n          <leafValues>\n            2.6953551173210144e-01 -3.3992108702659607e-01\n            5.0643271207809448e-01 2.7994990348815918e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 798 -5.7244639843702316e-02 -1 2 799\n            -2.9133851057849824e-04 -2 -3 800 3.0808679759502411e-02</internalNodes>\n          <leafValues>\n            -6.9636821746826172e-01 -3.1919568777084351e-01\n            1.3237810134887695e-01 -7.6749938726425171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 801 2.8046660125255585e-02 2 -1 802\n            -3.7829200737178326e-03 -2 -3 803 -1.3911469839513302e-02</internalNodes>\n          <leafValues>\n            6.9832587242126465e-01 -2.1438920497894287e-01\n            3.3778458833694458e-01 -9.6943713724613190e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 804 -9.6410012338310480e-04 -1 2 805\n            -4.1028819978237152e-03 -2 -3 806 7.6512782834470272e-04</internalNodes>\n          <leafValues>\n            2.7303680777549744e-01 1.8931980431079865e-01\n            -3.2082849740982056e-01 8.1871077418327332e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 807 -2.2203559638001025e-04 -1 2 808\n            -2.5135980104096234e-04 -2 -3 809 -1.7842829402070493e-04</internalNodes>\n          <leafValues>\n            -2.9679200053215027e-01 -2.7259480953216553e-01\n            -2.2551620006561279e-01 2.9105350375175476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 810 2.2679679095745087e-02 -1 2 811\n            -1.4839429641142488e-03 -2 -3 812 -9.7775906324386597e-02</internalNodes>\n          <leafValues>\n            6.0594111680984497e-01 5.8346527814865112e-01\n            -5.1989138126373291e-01 -2.1351039409637451e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 813 -2.1942430175840855e-03 0 -1 814\n            9.6272170543670654e-02 -2 -3 815 2.5899629108607769e-03</internalNodes>\n          <leafValues>\n            -2.3860040307044983e-01 4.5208680629730225e-01\n            -3.2299709320068359e-01 2.3171809315681458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 816 5.4749320261180401e-03 -1 2 817\n            -1.4976410195231438e-02 -2 -3 818 -7.3499558493494987e-03</internalNodes>\n          <leafValues>\n            2.6661419868469238e-01 -4.7525641322135925e-01\n            3.6936700344085693e-01 -1.0437080264091492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 819 8.0258701927959919e-04 -1 2 820\n            -3.1779240816831589e-03 -2 -3 821 -1.6361019515898079e-04</internalNodes>\n          <leafValues>\n            -2.6545119285583496e-01 -2.6746180653572083e-01\n            -1.3902419805526733e-01 2.9700610041618347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 822 -3.0408808961510658e-03 -1 2 823\n            -1.2945629656314850e-02 -2 -3 824 -1.7983650788664818e-02</internalNodes>\n          <leafValues>\n            -1.0607139766216278e-01 -4.2864450812339783e-01\n            5.3250139951705933e-01 6.2068658880889416e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 825 3.5721210297197104e-03 2 -1 826\n            3.3481561113148928e-03 -2 -3 827 -2.7103780303150415e-04</internalNodes>\n          <leafValues>\n            2.8643238544464111e-01 5.2708417177200317e-01\n            -4.0083900094032288e-01 -1.1597709730267525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 828 -3.5315480083227158e-02 -1 2 829\n            -3.3448180183768272e-03 -2 -3 830 -3.6211799830198288e-02</internalNodes>\n          <leafValues>\n            -6.4248001575469971e-01 1.6799710690975189e-01\n            -4.4045579433441162e-01 7.2158249095082283e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 831 9.7624881891533732e-04 2 -1 832\n            3.9304429083131254e-04 -2 -3 833 -9.0960100293159485e-02</internalNodes>\n          <leafValues>\n            -3.3223769068717957e-01 -2.9518169164657593e-01\n            -2.6596671342849731e-01 1.9091020524501801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 834 -9.7260335460305214e-03 2 -1 835\n            6.3109961338341236e-03 -2 -3 836 -1.8113269470632076e-04</internalNodes>\n          <leafValues>\n            4.3416848778724670e-01 3.6779248714447021e-01\n            -3.8609200716018677e-01 -2.1463580429553986e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>33</maxWeakCount>\n      <stageThreshold>-1.2412749528884888e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            2 1 837 2.1084180101752281e-02 0 -1 838\n            -2.1115990821272135e-03 -2 -3 839 -3.7253301125019789e-03</internalNodes>\n          <leafValues>\n            7.7905070781707764e-01 -9.1717608273029327e-02\n            3.5618048161268234e-02 -3.5509699583053589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 840 -4.9224868416786194e-02 0 -1 841\n            -1.2256789952516556e-02 -2 -3 842 -1.7591969808563590e-03</internalNodes>\n          <leafValues>\n            2.3374380171298981e-01 -2.0726789534091949e-01\n            7.1231132745742798e-01 1.5468549728393555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 843 -1.3072569854557514e-02 -1 2 844\n            1.0713989846408367e-02 -2 -3 845 2.7589630335569382e-03</internalNodes>\n          <leafValues>\n            -1.7413349449634552e-01 -1.3037489354610443e-01\n            4.3284869194030762e-01 -6.6202241182327271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 846 -7.0322921965271235e-04 2 -1 847\n            3.2859561033546925e-03 -2 -3 848 -1.5731799649074674e-03</internalNodes>\n          <leafValues>\n            -4.2838820815086365e-01 -4.5926880836486816e-01\n            -4.6182459592819214e-01 1.7856159806251526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 849 -6.4174369908869267e-03 -1 2 850\n            1.6610589809715748e-03 -2 -3 851 1.5099810436367989e-02</internalNodes>\n          <leafValues>\n            -5.4262351989746094e-01 -6.4273983240127563e-02\n            4.0244659781455994e-01 -6.2330418825149536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 852 1.6554270405322313e-03 -1 2 853\n            -3.3705390524119139e-03 -2 -3 854 -1.0568870231509209e-02</internalNodes>\n          <leafValues>\n            -4.5953160524368286e-01 3.0769738554954529e-01\n            2.8306689858436584e-01 -1.5513870120048523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 855 -1.5460990369319916e-02 0 -1 856\n            1.0563080199062824e-02 -2 -3 857 -2.5313820224255323e-03</internalNodes>\n          <leafValues>\n            -2.3533730208873749e-01 1.7863610386848450e-01\n            -3.9789968729019165e-01 3.4673249721527100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 858 -1.1370539665222168e-02 0 -1 859\n            5.1206751959398389e-04 -2 -3 860 2.0633509848266840e-03</internalNodes>\n          <leafValues>\n            3.5862970352172852e-01 -2.6715761423110962e-01\n            -2.3807419836521149e-01 8.9544452726840973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 861 6.1831250786781311e-03 2 -1 862\n            -1.5297930222004652e-03 -2 -3 863 -1.4521819539368153e-03</internalNodes>\n          <leafValues>\n            -3.4589260816574097e-01 -5.7744260877370834e-02\n            -2.2643689811229706e-01 3.3492559194564819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 864 9.1494834050536156e-03 -1 2 865\n            -7.8258356079459190e-03 -2 -3 866 -9.1795083135366440e-03</internalNodes>\n          <leafValues>\n            -4.5102459192276001e-01 -2.0574240386486053e-01\n            2.8064918518066406e-01 -1.9400069490075111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 867 5.2864141762256622e-03 -1 2 868\n            -1.1895409785211086e-02 -2 -3 869 -2.9768719105049968e-04</internalNodes>\n          <leafValues>\n            3.8742628693580627e-01 3.3122861385345459e-01\n            -4.1473099589347839e-01 -4.6005301177501678e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 870 -9.9406214430928230e-03 -1 2 871\n            1.8322050891583785e-05 -2 -3 872 -8.9074727147817612e-03</internalNodes>\n          <leafValues>\n            -6.0510438680648804e-01 -1.5049360692501068e-01\n            4.3751770257949829e-01 4.4532001018524170e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 873 2.7458940166980028e-04 0 -1 874\n            -1.0605080024106428e-04 -2 -3 875 1.3431450352072716e-02</internalNodes>\n          <leafValues>\n            3.4243520349264145e-02 -3.1917920708656311e-01\n            5.4285280406475067e-02 5.1082128286361694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 876 1.7373449736624025e-05 2 -1 877\n            2.6647070626495406e-05 -2 -3 878 2.8135200409451500e-05</internalNodes>\n          <leafValues>\n            -1.3858599960803986e-01 2.9074499011039734e-01\n            -5.2693158388137817e-01 6.1677869409322739e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 879 -1.4079789980314672e-04 -1 2 880\n            -1.0311259888112545e-02 -2 -3 881 -2.7866840362548828e-02</internalNodes>\n          <leafValues>\n            -1.4329759776592255e-01 -4.7958651185035706e-01\n            3.8226899504661560e-01 1.0630049742758274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 882 5.8228662237524986e-03 2 -1 883\n            -8.7669547647237778e-03 -2 -3 884 -2.8466230724006891e-03</internalNodes>\n          <leafValues>\n            2.9776591062545776e-01 -1.8124760687351227e-01\n            -2.4237589538097382e-01 3.0139160156250000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 885 6.4540808089077473e-03 2 -1 886\n            6.9421119987964630e-03 -2 -3 887 -7.1991360746324062e-03</internalNodes>\n          <leafValues>\n            -4.7911441326141357e-01 -3.8983830809593201e-01\n            -3.8099661469459534e-01 1.3023279607295990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 888 1.3020260259509087e-02 -1 2 889\n            -1.0113810189068317e-02 -2 -3 890 -1.9183289259672165e-02</internalNodes>\n          <leafValues>\n            4.9582180380821228e-01 4.5563331246376038e-01\n            3.3518138527870178e-01 -1.1938130110502243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 891 1.0314499959349632e-03 0 -1 892\n            5.7669691159389913e-05 -2 -3 893 5.0447430461645126e-02</internalNodes>\n          <leafValues>\n            -3.5977721214294434e-01 2.6054680347442627e-02\n            1.6761170327663422e-01 -2.8970599174499512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 894 3.7453400436788797e-03 2 -1 895\n            4.7667181206634268e-05 -2 -3 896 -5.3708041377831250e-05</internalNodes>\n          <leafValues>\n            -4.6433079242706299e-01 1.8610210716724396e-01\n            5.6288938969373703e-02 -4.2427191138267517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 897 -6.5939482301473618e-03 -1 2 898\n            -2.1548079326748848e-02 -2 -3 899 1.3188139535486698e-02</internalNodes>\n          <leafValues>\n            -4.7423711419105530e-01 -4.2937740683555603e-01\n            1.1677609756588936e-02 4.2440900206565857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 900 1.2091189622879028e-02 2 -1 901\n            -6.2589373555965722e-05 -2 -3 902 1.9446300575509667e-03</internalNodes>\n          <leafValues>\n            2.3611229658126831e-01 -2.1822200715541840e-01\n            -2.5404209271073341e-02 4.2902240157127380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 903 7.7299331314861774e-03 -1 2 904\n            -3.7915860302746296e-03 -2 -3 905 4.3860040605068207e-03</internalNodes>\n          <leafValues>\n            -5.3524547815322876e-01 -4.3546271324157715e-01\n            1.2576849758625031e-01 -2.8148999810218811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 906 -9.4350852305069566e-04 -1 2 907\n            -1.1670179665088654e-03 -2 -3 908 2.9260620940476656e-03</internalNodes>\n          <leafValues>\n            -1.7022730410099030e-01 2.6141870021820068e-01\n            -1.7437639832496643e-01 3.8530299067497253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 909 1.4593300409615040e-02 2 -1 910\n            7.9177077859640121e-03 -2 -3 911 -3.1372120138257742e-03</internalNodes>\n          <leafValues>\n            -5.5104351043701172e-01 2.7703890204429626e-01\n            1.3093240559101105e-01 -1.6954340040683746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 912 -9.2021061573177576e-04 0 -1 913\n            -1.0446259751915932e-02 -2 -3 914 -8.3597414195537567e-03</internalNodes>\n          <leafValues>\n            4.4468599557876587e-01 -3.9477398991584778e-01\n            3.4909680485725403e-01 -1.0887180455029011e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 915 -9.7741633653640747e-03 -1 2 916\n            1.2587079778313637e-02 -2 -3 917 -1.4933859929442406e-03</internalNodes>\n          <leafValues>\n            2.1157720685005188e-01 -1.4542940258979797e-01\n            -1.5098230540752411e-01 5.0790101289749146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 918 -5.0530377775430679e-03 -1 2 919\n            -2.5890849065035582e-04 -2 -3 920 4.8418638471048325e-05</internalNodes>\n          <leafValues>\n            -2.3845790326595306e-01 -2.5153321027755737e-01\n            -2.4533210322260857e-02 3.0376350879669189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 921 2.3038890212774277e-03 2 -1 922\n            3.6540660075843334e-03 -2 -3 923 -3.3346249256283045e-03</internalNodes>\n          <leafValues>\n            2.8125861287117004e-01 -3.6965739727020264e-01\n            -3.0266079306602478e-01 8.8287420570850372e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 924 -1.1975349858403206e-02 -1 2 925\n            -1.8564870115369558e-03 -2 -3 926 1.5760740498080850e-03</internalNodes>\n          <leafValues>\n            -4.6360239386558533e-01 3.9942011237144470e-01\n            -1.1057750135660172e-01 1.6782909631729126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 927 4.1210349649190903e-02 2 -1 928\n            -1.0635109618306160e-02 -2 -3 929 -3.3335660118609667e-03</internalNodes>\n          <leafValues>\n            -6.8945991992950439e-01 -9.5825389027595520e-02\n            -4.6437320113182068e-01 2.2104820609092712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 930 -2.4082309100776911e-03 2 -1 931\n            5.5890781804919243e-03 -2 -3 932 1.2177750468254089e-03</internalNodes>\n          <leafValues>\n            2.0128449797630310e-01 -5.2314841747283936e-01\n            3.1367950141429901e-02 -4.1038578748703003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 933 8.6324941366910934e-03 2 -1 934\n            3.8473210297524929e-03 -2 -3 935 -1.8842349527403712e-03</internalNodes>\n          <leafValues>\n            3.1741571426391602e-01 -4.3851628899574280e-01\n            3.8140851259231567e-01 -6.0103170573711395e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>41</maxWeakCount>\n      <stageThreshold>-1.2084549665451050e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 936 -2.3675959557294846e-02 -1 2 937\n            -2.0480139646679163e-03 -2 -3 938 8.1840698840096593e-04</internalNodes>\n          <leafValues>\n            -3.5308888554573059e-01 6.9878387451171875e-01\n            -2.8367671370506287e-01 4.1667369008064270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 939 1.2784999562427402e-03 0 -1 940\n            -3.4423400647938251e-03 -2 -3 941 -7.4483961798250675e-03</internalNodes>\n          <leafValues>\n            3.3807888627052307e-01 -1.6657039523124695e-01\n            6.4591968059539795e-01 -2.2018529474735260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 942 1.1179470457136631e-02 2 -1 943\n            -2.3196099698543549e-01 -2 -3 944 -4.3133709579706192e-02</internalNodes>\n          <leafValues>\n            -3.2552671432495117e-01 -8.3167977631092072e-02\n            -1.6172540187835693e-01 4.6209758520126343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 945 -1.9728920597117394e-04 -1 2 946\n            -2.3259329609572887e-03 -2 -3 947 -1.0320080444216728e-02</internalNodes>\n          <leafValues>\n            -1.5667790174484253e-01 3.6914899945259094e-01\n            4.8015019297599792e-01 -8.9061602950096130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 948 -2.0040970295667648e-02 -1 2 949\n            -2.4495070101693273e-04 -2 -3 950 -1.1836830526590347e-03</internalNodes>\n          <leafValues>\n            -5.6967437267303467e-01 -2.3713299632072449e-01\n            -3.4671390056610107e-01 1.4475019276142120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 951 -2.6744368951767683e-03 2 -1 952\n            -5.1904888823628426e-03 -2 -3 953 -1.9888129085302353e-02</internalNodes>\n          <leafValues>\n            -1.2661710381507874e-01 -6.4648993313312531e-02\n            -4.5441371202468872e-01 3.9849451184272766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 954 -5.7462421245872974e-03 2 -1 955\n            4.4583589769899845e-03 -2 -3 956 -1.2518949806690216e-02</internalNodes>\n          <leafValues>\n            -3.6761870980262756e-01 3.8435870409011841e-01\n            -6.1902827024459839e-01 1.9050609320402145e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 957 -7.7734276652336121e-02 2 -1 958\n            6.7193829454481602e-03 -2 -3 959 1.6520710196346045e-03</internalNodes>\n          <leafValues>\n            5.5405282974243164e-01 -4.1308841109275818e-01\n            7.3280662298202515e-02 -2.8589090704917908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 960 2.1226350218057632e-02 2 -1 961\n            1.1231450363993645e-02 -2 -3 962 -1.8163130152970552e-04</internalNodes>\n          <leafValues>\n            3.6871838569641113e-01 3.5591110587120056e-01\n            -3.3781459927558899e-01 -8.1584807485342026e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 963 2.8726160526275635e-02 2 -1 964\n            5.0780461169779301e-03 -2 -3 965 -5.1352521404623985e-04</internalNodes>\n          <leafValues>\n            -7.2751021385192871e-01 2.6649999618530273e-01\n            1.1073680222034454e-01 -1.8206079304218292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 966 -3.8125980645418167e-03 2 -1 967\n            9.1425428399816155e-04 -2 -3 968 1.0090490104630589e-03</internalNodes>\n          <leafValues>\n            -2.8374129533767700e-01 2.4259260296821594e-01\n            6.0151178389787674e-02 -2.7039301395416260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 969 -7.8553140163421631e-02 -1 2 970\n            -6.5192081965506077e-03 -2 -3 971 2.0706290379166603e-03</internalNodes>\n          <leafValues>\n            -5.5804842710494995e-01 2.5557601451873779e-01\n            -1.0600800067186356e-01 2.7225118875503540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 972 1.3555780053138733e-02 -1 2 973\n            7.0873757067602128e-05 -2 -3 974 -1.4444560511037707e-03</internalNodes>\n          <leafValues>\n            -4.8073831200599670e-01 -1.3499049842357635e-01\n            4.3762150406837463e-01 4.8329260200262070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 975 -3.6353049799799919e-03 -1 2 976\n            -2.7163419872522354e-03 -2 -3 977 -7.4552530422806740e-03</internalNodes>\n          <leafValues>\n            -1.2743209302425385e-01 3.3708488941192627e-01\n            5.4894310235977173e-01 -1.0238330066204071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 978 1.8306199926882982e-03 0 -1 979\n            3.5198179539293051e-03 -2 -3 980 -3.0126908677630126e-04</internalNodes>\n          <leafValues>\n            -2.4612280726432800e-01 1.5894930064678192e-01\n            -2.7785000205039978e-01 2.3901990056037903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 981 3.1999459024518728e-03 0 -1 982\n            1.4862619573250413e-03 -2 -3 983 -1.3004139764234424e-03</internalNodes>\n          <leafValues>\n            4.7738438844680786e-01 -3.1345888972282410e-02\n            7.1047246456146240e-02 -2.1556860208511353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 984 1.5583000145852566e-02 2 -1 985\n            7.6356581412255764e-03 -2 -3 986 -1.4318820321932435e-03</internalNodes>\n          <leafValues>\n            2.7187249064445496e-01 -5.1074218750000000e-01\n            -1.5140180289745331e-01 1.4207449555397034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 987 -6.7814798094332218e-03 0 -1 988\n            -1.1809200048446655e-01 -2 -3 989 -2.8277190402150154e-02</internalNodes>\n          <leafValues>\n            -6.9562858343124390e-01 3.3270710706710815e-01\n            1.1135250329971313e-01 -1.7491710186004639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 990 -3.7033241242170334e-02 -1 2 991\n            -4.9177031032741070e-03 -2 -3 992 -2.7518879505805671e-04</internalNodes>\n          <leafValues>\n            2.8885498642921448e-01 -4.0966060757637024e-01\n            -3.1160330772399902e-01 6.0995019972324371e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 993 -2.3584270384162664e-03 -1 2 994\n            -3.5775059368461370e-03 -2 -3 995 -4.1078119538724422e-03</internalNodes>\n          <leafValues>\n            -5.9846490621566772e-01 2.4603059887886047e-01\n            8.5180006921291351e-02 -2.0629020035266876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 996 1.5300850383937359e-02 -1 2 997\n            -1.5483479946851730e-02 -2 -3 998 -5.7852710597217083e-03</internalNodes>\n          <leafValues>\n            3.0057510733604431e-01 -6.8350881338119507e-01\n            2.0100210607051849e-01 -9.0607739984989166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 999 1.4448310248553753e-02 -1 2 1000\n            -3.1330309808254242e-02 -2 -3 1001 -3.0594000127166510e-03</internalNodes>\n          <leafValues>\n            2.6733011007308960e-01 -5.2288150787353516e-01\n            4.0950208902359009e-01 -6.5823979675769806e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1002 -1.8781309481710196e-03 2 -1 1003\n            -5.8503728359937668e-03 -2 -3 1004 2.6462681125849485e-03</internalNodes>\n          <leafValues>\n            -2.5463208556175232e-01 -1.2269999831914902e-01\n            -7.9216457903385162e-02 2.9203468561172485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1005 1.3989449944347143e-03 2 -1 1006\n            9.7635984420776367e-03 -2 -3 1007 -9.4864349812269211e-03</internalNodes>\n          <leafValues>\n            1.2148520350456238e-01 2.7110511064529419e-01\n            1.0176890343427658e-01 -3.2153740525245667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1008 1.5739769442006946e-03 2 -1 1009\n            4.9365921877324581e-03 -2 -3 1010 -5.0848699174821377e-04</internalNodes>\n          <leafValues>\n            -5.9908610582351685e-01 -3.8752740621566772e-01\n            -1.3056530058383942e-01 1.2711940705776215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1011 -9.6375271677970886e-02 -1 2 1012\n            -8.0375596880912781e-02 -2 -3 1013 -5.4449690505862236e-03</internalNodes>\n          <leafValues>\n            -6.8821328878402710e-01 4.1428178548812866e-01\n            8.2179926335811615e-02 -1.8036940693855286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1014 -7.6126731000840664e-03 2 -1 1015\n            -3.1007949728518724e-03 -2 -3 1016 -2.0799610763788223e-02</internalNodes>\n          <leafValues>\n            1.7513050138950348e-01 -2.1534129977226257e-01\n            2.9026609659194946e-01 -2.1753519773483276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1017 -1.7213800549507141e-01 -1 2 1018\n            -1.7464880365878344e-03 -2 -3 1019 -6.8416520953178406e-02</internalNodes>\n          <leafValues>\n            2.2739590704441071e-01 1.3240070641040802e-01\n            -6.2430542707443237e-01 -1.0549639910459518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1020 -1.9070530310273170e-02 -1 2 1021\n            -2.8794098761864007e-04 -2 -3 1022 7.3958968278020620e-04</internalNodes>\n          <leafValues>\n            5.5033868551254272e-01 -3.4565579891204834e-01\n            1.8934780359268188e-01 -8.8741242885589600e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1023 -7.5153419747948647e-03 -1 2 1024\n            -1.2848030310124159e-03 -2 -3 1025 1.2194210430607200e-03</internalNodes>\n          <leafValues>\n            -4.5797100663185120e-01 1.2825480103492737e-01\n            -2.9630279541015625e-01 1.9254499673843384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1026 -1.6169670224189758e-01 0 -1 1027\n            1.4747560024261475e-02 -2 -3 1028 -8.4396981401368976e-04</internalNodes>\n          <leafValues>\n            -4.4868141412734985e-01 1.3941350579261780e-01\n            2.0387759804725647e-01 -5.6935109198093414e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1029 -1.2965890346094966e-04 -1 2 1030\n            -1.3776419684290886e-02 -2 -3 1031 -9.4375656917691231e-03</internalNodes>\n          <leafValues>\n            -1.4722099900245667e-01 2.4039970338344574e-01\n            5.5077737569808960e-01 -1.5877890586853027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1032 1.1291690316284075e-04 -1 2 1033\n            6.6032530739903450e-03 -2 -3 1034 2.0985701121389866e-03</internalNodes>\n          <leafValues>\n            1.3769179582595825e-01 -2.5903069972991943e-01\n            2.3297089338302612e-01 -3.7152260541915894e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1035 -1.8329389858990908e-03 0 -1 1036\n            -1.6420709434896708e-03 -2 -3 1037 6.7886798642575741e-03</internalNodes>\n          <leafValues>\n            3.5991749167442322e-01 -1.5401339530944824e-01\n            1.8581290543079376e-01 -6.7269998788833618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1038 1.6932019498199224e-03 -1 2 1039\n            -1.0055249556899071e-02 -2 -3 1040 -3.1679549720138311e-03</internalNodes>\n          <leafValues>\n            -1.3255499303340912e-01 3.8144260644912720e-01\n            3.2224041223526001e-01 -8.5345722734928131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1041 2.4724518880248070e-04 0 -1 1042\n            -2.4610899854451418e-03 -2 -3 1043 4.2370590381324291e-04</internalNodes>\n          <leafValues>\n            2.4504560232162476e-01 -4.2068049311637878e-01\n            9.6731372177600861e-02 -3.6695280671119690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1044 -2.3991330526769161e-03 0 -1 1045\n            -1.0543569922447205e-01 -2 -3 1046 -2.9867719858884811e-03</internalNodes>\n          <leafValues>\n            -7.3811298608779907e-01 2.8551021218299866e-01\n            1.9291989505290985e-01 -1.4805729687213898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1047 -4.0492648258805275e-03 2 -1 1048\n            -1.1622729944065213e-03 -2 -3 1049 -2.7857329696416855e-02</internalNodes>\n          <leafValues>\n            1.0766500234603882e-01 -2.7701449394226074e-01\n            3.9593660831451416e-01 -2.0954720675945282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1050 8.1511605530977249e-03 0 -1 1051\n            1.5126319602131844e-02 -2 -3 1052 -1.1020600050687790e-01</internalNodes>\n          <leafValues>\n            6.8626463413238525e-02 5.3772068023681641e-01\n            -4.9161431193351746e-01 -4.4780239462852478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1053 -1.6588929574936628e-03 0 -1 1054\n            -3.4530278295278549e-02 -2 -3 1055 1.0060180211439729e-03</internalNodes>\n          <leafValues>\n            3.6734369397163391e-01 -2.5586590170860291e-02\n            2.7465619146823883e-02 -3.4973311424255371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1056 -2.8843909502029419e-02 2 -1 1057\n            2.4647780810482800e-04 -2 -3 1058 -7.4189889710396528e-04</internalNodes>\n          <leafValues>\n            -6.5100878477096558e-01 -1.8410819768905640e-01\n            -9.0942107141017914e-02 2.2521719336509705e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>37</maxWeakCount>\n      <stageThreshold>-1.2229189872741699e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 1059 -1.2407599948346615e-02 0 -1 1060\n            -1.1902820318937302e-02 -2 -3 1061 -5.5238649249076843e-02</internalNodes>\n          <leafValues>\n            6.8965518474578857e-01 -1.3579159975051880e-01\n            -4.4337168335914612e-02 -4.5446300506591797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1062 3.3332619350403547e-03 0 -1 1063\n            4.8620607703924179e-03 -2 -3 1064 -3.1632129102945328e-03</internalNodes>\n          <leafValues>\n            -3.1873029470443726e-01 7.0181049406528473e-02\n            -3.2160758972167969e-01 7.0131868124008179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1065 1.8592040240764618e-01 -1 2 1066\n            3.1807690393179655e-03 -2 -3 1067 -9.4139128923416138e-03</internalNodes>\n          <leafValues>\n            3.4192711114883423e-01 -3.3313518762588501e-01\n            3.2091590762138367e-01 -1.2491060048341751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1068 6.5205397550016642e-04 2 -1 1069\n            -5.0521180965006351e-03 -2 -3 1070 7.6105687767267227e-03</internalNodes>\n          <leafValues>\n            -2.3811559379100800e-01 -1.4155420660972595e-01\n            3.2182168960571289e-01 -2.4797810614109039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1071 -1.6043110517784953e-03 -1 2 1072\n            -2.7449749410152435e-02 -2 -3 1073 5.6960887741297483e-04</internalNodes>\n          <leafValues>\n            1.9883860647678375e-01 -6.9581168889999390e-01\n            5.0723928958177567e-02 -2.9218611121177673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1074 2.7564789634197950e-03 2 -1 1075\n            -1.1058920063078403e-02 -2 -3 1076 5.1102549768984318e-03</internalNodes>\n          <leafValues>\n            2.0911119878292084e-01 -2.4516950547695160e-01\n            -1.0658439993858337e-01 4.0211549401283264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1077 4.5064617879688740e-03 2 -1 1078\n            4.2800018563866615e-03 -2 -3 1079 7.8124259598553181e-03</internalNodes>\n          <leafValues>\n            -4.6300640702247620e-01 -3.9396348595619202e-01\n            1.4130340516567230e-01 -2.8671020269393921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1080 4.4836059212684631e-02 2 -1 1081\n            1.7986740916967392e-02 -2 -3 1082 -6.0726520605385303e-03</internalNodes>\n          <leafValues>\n            -5.0257712602615356e-01 3.1318759918212891e-01\n            9.8504282534122467e-02 -2.2500780224800110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1083 -1.8578730523586273e-02 2 -1 1084\n            3.5717431455850601e-02 -2 -3 1085 -1.8269789870828390e-03</internalNodes>\n          <leafValues>\n            -5.1453977823257446e-01 3.1848269701004028e-01\n            1.4090469479560852e-01 -1.8669110536575317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1086 -5.4818098433315754e-03 -1 2 1087\n            -6.0164718888700008e-04 -2 -3 1088 9.9322739988565445e-03</internalNodes>\n          <leafValues>\n            1.9321410357952118e-01 -3.8167670369148254e-01\n            -5.8519419282674789e-02 4.8970058560371399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1089 1.4053160557523370e-03 0 -1 1090\n            5.2271760068833828e-03 -2 -3 1091 -1.4931050129234791e-02</internalNodes>\n          <leafValues>\n            2.5072118639945984e-01 -6.5754747390747070e-01\n            5.5669851601123810e-02 -2.4669079482555389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1092 -1.2826359830796719e-02 0 -1 1093\n            -2.7587350457906723e-02 -2 -3 1094 -4.7543710097670555e-03</internalNodes>\n          <leafValues>\n            -3.2225701212882996e-01 5.6484752893447876e-01\n            -4.9142929911613464e-01 -8.8634714484214783e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1095 -2.7212230488657951e-03 2 -1 1096\n            6.6132671199738979e-03 -2 -3 1097 -1.1435840278863907e-02</internalNodes>\n          <leafValues>\n            -5.7900500297546387e-01 4.5554360747337341e-01\n            1.5250509977340698e-01 -1.2167599797248840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1098 -1.9095990806818008e-02 2 -1 1099\n            -1.2672290205955505e-01 -2 -3 1100 -1.8373519182205200e-02</internalNodes>\n          <leafValues>\n            -4.4416400790214539e-01 1.1622429639101028e-01\n            4.1248679161071777e-01 -3.0303838849067688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1101 -3.2425698637962341e-01 -1 2 1102\n            -3.8764779455959797e-03 -2 -3 1103 -7.5138150714337826e-04</internalNodes>\n          <leafValues>\n            4.4721060991287231e-01 7.5931303203105927e-02\n            1.1976880021393299e-02 -3.6275759339332581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1104 6.7106341011822224e-03 -1 2 1105\n            -6.5366760827600956e-03 -2 -3 1106 -5.5684632388874888e-04</internalNodes>\n          <leafValues>\n            -3.9521178603172302e-01 -3.0311599373817444e-01\n            -1.5832960605621338e-01 1.7123879492282867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1107 -3.9269351400434971e-03 -1 2 1108\n            -1.6322469338774681e-02 -2 -3 1109 5.5038761347532272e-02</internalNodes>\n          <leafValues>\n            2.0034509897232056e-01 4.1271069645881653e-01\n            -1.7926050722599030e-01 2.6303529739379883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1110 1.0095089673995972e-03 0 -1 1111\n            -9.8581332713365555e-03 -2 -3 1112 -7.0780781097710133e-03</internalNodes>\n          <leafValues>\n            2.4884219467639923e-01 -3.9200861006975174e-02\n            3.7243181467056274e-01 -3.7739849090576172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1113 2.1169960964471102e-03 2 -1 1114\n            1.5883900225162506e-01 -2 -3 1115 -4.2488988488912582e-02</internalNodes>\n          <leafValues>\n            1.7665450274944305e-01 7.2631222009658813e-01\n            4.8568719625473022e-01 -1.4427030086517334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1116 -9.4166352937463671e-05 -1 2 1117\n            8.1764090282376856e-05 -2 -3 1118 5.4165818728506565e-03</internalNodes>\n          <leafValues>\n            1.7045879364013672e-01 -3.1940829753875732e-01\n            9.9846661090850830e-02 -4.1059550642967224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1119 -6.1865211464464664e-03 2 -1 1120\n            6.5089072450064123e-05 -2 -3 1121 -6.8352972448337823e-05</internalNodes>\n          <leafValues>\n            -3.8492518663406372e-01 1.6319459676742554e-01\n            2.1182140707969666e-01 -2.5311520695686340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1122 -4.0968839311972260e-04 0 -1 1123\n            3.5239830613136292e-03 -2 -3 1124 -8.3400387666188180e-05</internalNodes>\n          <leafValues>\n            -1.1859580129384995e-01 -7.9780608415603638e-01\n            2.2940699756145477e-01 -3.8782458752393723e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1125 -2.7096238918602467e-03 0 -1 1126\n            -6.8883160129189491e-03 -2 -3 1127 1.1571759823709726e-03</internalNodes>\n          <leafValues>\n            -5.9978920221328735e-01 3.4748208522796631e-01\n            -1.5406990051269531e-01 1.3573920726776123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1128 9.5913361292332411e-04 -1 2 1129\n            -1.8333569169044495e-02 -2 -3 1130 2.4258090183138847e-02</internalNodes>\n          <leafValues>\n            -1.0236030071973801e-01 -5.5400210618972778e-01\n            1.4270070195198059e-01 7.2077578306198120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1131 1.0541410185396671e-02 0 -1 1132\n            9.1231325641274452e-03 -2 -3 1133 -1.4598550042137504e-03</internalNodes>\n          <leafValues>\n            1.9214800000190735e-01 -3.6190611124038696e-01\n            2.8950750827789307e-01 -1.8767410516738892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1134 -1.1819070205092430e-02 -1 2 1135\n            -3.2446000725030899e-02 -2 -3 1136 -2.3319718893617392e-03</internalNodes>\n          <leafValues>\n            -5.3653758764266968e-01 -6.8713748455047607e-01\n            -8.8751368224620819e-02 1.5991990268230438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1137 -6.5151029266417027e-03 0 -1 1138\n            2.5015550199896097e-03 -2 -3 1139 7.8799802577123046e-04</internalNodes>\n          <leafValues>\n            6.8285889923572540e-02 5.7962691783905029e-01\n            -1.9128720462322235e-01 9.7289860248565674e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1140 6.0783070512115955e-03 -1 2 1141\n            -8.7201576679944992e-03 -2 -3 1142 3.5847601247951388e-04</internalNodes>\n          <leafValues>\n            -6.1147671937942505e-01 4.7648158669471741e-01\n            9.0117119252681732e-02 -1.6770669817924500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1143 -1.3178629800677299e-02 -1 2 1144\n            -8.5365071892738342e-02 -2 -3 1145 3.3002009149640799e-03</internalNodes>\n          <leafValues>\n            -1.2755720317363739e-01 2.6924338936805725e-01\n            -1.8480269610881805e-01 5.8760780096054077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1146 -1.1601460166275501e-02 2 -1 1147\n            9.9076535552740097e-03 -2 -3 1148 4.3782261200249195e-03</internalNodes>\n          <leafValues>\n            3.3849120140075684e-01 -5.5809050798416138e-01\n            -7.8933097422122955e-02 2.2385579347610474e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1149 -4.7082178294658661e-02 -1 2 1150\n            -3.2685339101590216e-04 -2 -3 1151 7.8715756535530090e-03</internalNodes>\n          <leafValues>\n            6.8917119503021240e-01 1.2139579653739929e-01\n            -7.5880296528339386e-02 -6.5191179513931274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1152 -3.9275310700759292e-04 0 -1 1153\n            -3.4211258753202856e-04 -2 -3 1154 5.6030962150543928e-04</internalNodes>\n          <leafValues>\n            -3.4082669019699097e-01 3.7230521440505981e-01\n            1.8275870010256767e-02 -2.7192598581314087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1155 -2.4439349770545959e-02 -1 2 1156\n            1.2128120288252831e-02 -2 -3 1157 2.2948130499571562e-03</internalNodes>\n          <leafValues>\n            -3.4894740581512451e-01 -4.1957078501582146e-03\n            -2.0841300487518311e-02 8.0151557922363281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1158 -3.6386020947247744e-03 0 -1 1159\n            -6.3949287869036198e-04 -2 -3 1160 2.0897389913443476e-04</internalNodes>\n          <leafValues>\n            -2.5389778614044189e-01 3.6606290936470032e-01\n            -1.4177979528903961e-01 1.4148280024528503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1161 -6.7888460762333125e-05 0 -1 1162\n            3.9580671000294387e-04 -2 -3 1163 1.2493260437622666e-03</internalNodes>\n          <leafValues>\n            -2.0807999372482300e-01 2.3690980672836304e-01\n            2.4679720401763916e-01 -2.2032499313354492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1164 -4.6679278602823615e-04 -1 2 1165\n            1.1740219779312611e-03 -2 -3 1166 -7.1949949488043785e-03</internalNodes>\n          <leafValues>\n            -3.3990928530693054e-01 1.2153220176696777e-01\n            3.3542940020561218e-01 -3.9178979396820068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1167 3.2422799267806113e-04 2 -1 1168\n            2.4374879896640778e-02 -2 -3 1169 2.6271429378539324e-03</internalNodes>\n          <leafValues>\n            -2.5593858957290649e-01 4.2434880137443542e-01\n            1.0237640142440796e-01 -2.6907420158386230e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>32</maxWeakCount>\n      <stageThreshold>-1.2001949548721313e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 1170 -1.8586540594696999e-02 -1 2 1171\n            -7.4109081178903580e-03 -2 -3 1172 -5.3711149841547012e-02</internalNodes>\n          <leafValues>\n            -3.6523258686065674e-01 7.7427452802658081e-01\n            2.4213680624961853e-01 -3.7803840637207031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1173 6.9198510609567165e-03 0 -1 1174\n            -3.0759189277887344e-02 -2 -3 1175 -8.9597534388303757e-03</internalNodes>\n          <leafValues>\n            1.3523690402507782e-01 -2.7957341074943542e-01\n            -6.0680317878723145e-01 6.9579082727432251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1176 7.1816287934780121e-02 2 -1 1177\n            -1.1622999794781208e-02 -2 -3 1178 -1.0627550072968006e-03</internalNodes>\n          <leafValues>\n            3.0647501349449158e-01 -2.2690390050411224e-01\n            4.4374391436576843e-01 -3.1824579834938049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1179 -7.3452957440167665e-04 -1 2 1180\n            -4.9303710460662842e-02 -2 -3 1181 -3.2011170405894518e-03</internalNodes>\n          <leafValues>\n            -2.2684609889984131e-01 3.4253200888633728e-01\n            3.0913218855857849e-01 -2.0078240334987640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1182 1.4706649817526340e-02 0 -1 1183\n            -1.1798519641160965e-01 -2 -3 1184 -1.6695359721779823e-02</internalNodes>\n          <leafValues>\n            -9.4517791271209717e-01 5.7428210973739624e-01\n            2.4567030370235443e-01 -1.1707650125026703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1185 -6.8853241391479969e-03 0 -1 1186\n            7.8145717270672321e-04 -2 -3 1187 2.7586790919303894e-01</internalNodes>\n          <leafValues>\n            3.9508721232414246e-01 -1.0023059695959091e-01\n            -1.4659850299358368e-01 7.7942031621932983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1188 -2.6423679664731026e-02 -1 2 1189\n            1.8955089617520571e-03 -2 -3 1190 -5.7396688498556614e-03</internalNodes>\n          <leafValues>\n            -3.2860249280929565e-01 1.5046370029449463e-01\n            -4.0492990612983704e-01 1.5257360041141510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1191 -7.8677870333194733e-03 -1 2 1192\n            -1.9029570103157312e-04 -2 -3 1193 2.9406580142676830e-04</internalNodes>\n          <leafValues>\n            2.2024929523468018e-01 -3.7222158908843994e-01\n            1.0350369662046432e-01 -3.6075070500373840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1194 -6.1921158339828253e-04 0 -1 1195\n            -4.6625699847936630e-02 -2 -3 1196 8.0430079833604395e-05</internalNodes>\n          <leafValues>\n            2.5249621272087097e-01 -3.2340309023857117e-01\n            -8.7712243199348450e-02 2.5224068760871887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1197 2.9532159678637981e-03 -1 2 1198\n            -4.5338911004364491e-03 -2 -3 1199 -1.1544080451130867e-02</internalNodes>\n          <leafValues>\n            4.8171079158782959e-01 -4.5188549160957336e-01\n            2.5434678792953491e-01 -8.4140419960021973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1200 1.3043760554865003e-03 -1 2 1201\n            -3.4115801099687815e-03 -2 -3 1202 -1.5855060191825032e-03</internalNodes>\n          <leafValues>\n            -1.0121349990367889e-01 5.2193498611450195e-01\n            6.8923211097717285e-01 -1.0570000112056732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1203 -2.9867749661207199e-02 2 -1 1204\n            -2.5652049225755036e-04 -2 -3 1205 -3.9234450086951256e-03</internalNodes>\n          <leafValues>\n            -4.3362548947334290e-01 -3.3430889248847961e-02\n            -2.5569188594818115e-01 4.4265130162239075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1206 4.6491571702063084e-03 -1 2 1207\n            -2.7727609872817993e-01 -2 -3 1208 -2.2448340058326721e-01</internalNodes>\n          <leafValues>\n            6.2878167629241943e-01 7.1006447076797485e-01\n            3.0520048737525940e-01 -9.2947281897068024e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1209 3.8704689592123032e-02 0 -1 1210\n            8.2667707465589046e-04 -2 -3 1211 3.5339579335413873e-04</internalNodes>\n          <leafValues>\n            -7.1300238370895386e-01 3.4036791324615479e-01\n            -2.7960309386253357e-01 4.1289128363132477e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1212 1.2603959999978542e-02 0 -1 1213\n            -5.5078358855098486e-05 -2 -3 1214 9.1213081032037735e-03</internalNodes>\n          <leafValues>\n            6.5844729542732239e-02 -2.0295199751853943e-01\n            5.0578397512435913e-01 -2.8807151317596436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1215 -4.0084728971123695e-03 2 -1 1216\n            4.4780140742659569e-03 -2 -3 1217 -4.7284600441344082e-04</internalNodes>\n          <leafValues>\n            2.1491059660911560e-01 2.1849650144577026e-01\n            -6.7471832036972046e-01 -1.0888069868087769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1218 -3.7310249172151089e-04 -1 2 1219\n            -1.0922510176897049e-02 -2 -3 1220 2.5496890768408775e-02</internalNodes>\n          <leafValues>\n            1.7151309549808502e-01 4.2335990071296692e-01\n            -2.3464329540729523e-01 1.9871939718723297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1221 7.0709688588976860e-03 -1 2 1222\n            3.5252509405836463e-04 -2 -3 1223 5.8937398716807365e-04</internalNodes>\n          <leafValues>\n            -4.3551680445671082e-01 -6.1764400452375412e-02\n            -7.9512260854244232e-02 4.0493848919868469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1224 -8.7519101798534393e-03 0 -1 1225\n            -9.4158039428293705e-04 -2 -3 1226 -8.8366247713565826e-02</internalNodes>\n          <leafValues>\n            7.1111567318439484e-02 -3.1814581155776978e-01\n            -5.9796679019927979e-01 1.9428940117359161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1227 4.5438520610332489e-03 0 -1 1228\n            -1.3041470199823380e-02 -2 -3 1229 3.2197220716625452e-03</internalNodes>\n          <leafValues>\n            -2.1855579316616058e-01 3.0563870072364807e-01\n            -1.9010399281978607e-01 1.8796740472316742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1230 3.2370660454034805e-02 2 -1 1231\n            8.7954197078943253e-03 -2 -3 1232 -8.5182236507534981e-03</internalNodes>\n          <leafValues>\n            -1.6135400533676147e-01 6.6259282827377319e-01\n            -3.8733869791030884e-01 1.3088770210742950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1233 -5.4210029542446136e-02 0 -1 1234\n            2.9004408861510456e-04 -2 -3 1235 -1.2670000083744526e-02</internalNodes>\n          <leafValues>\n            -1.8559680320322514e-03 5.0099188089370728e-01\n            2.9727068543434143e-01 -1.6530840098857880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1236 3.7995529174804688e-01 -1 2 1237\n            -4.8071850091218948e-02 -2 -3 1238 6.4968131482601166e-03</internalNodes>\n          <leafValues>\n            4.2289760708808899e-01 1.1011490225791931e-01\n            -2.6050418615341187e-01 1.7244240641593933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1239 -2.0901230163872242e-03 -1 2 1240\n            -6.2400829046964645e-03 -2 -3 1241 8.5770338773727417e-03</internalNodes>\n          <leafValues>\n            -1.4854459464550018e-01 3.5841208696365356e-01\n            -2.1481679379940033e-01 2.1504589915275574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1242 -6.6754068247973919e-03 0 -1 1243\n            -3.8183759897947311e-03 -2 -3 1244 5.5124791106209159e-04</internalNodes>\n          <leafValues>\n            -2.3905350267887115e-01 4.4719010591506958e-01\n            -2.5307258963584900e-01 3.4307420253753662e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1245 9.0955598279833794e-03 0 -1 1246\n            1.1171290278434753e-01 -2 -3 1247 -1.7274810234084725e-03</internalNodes>\n          <leafValues>\n            -6.5154308080673218e-01 -2.6602389290928841e-02\n            6.1791652441024780e-01 2.7143610641360283e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1248 7.5292278779670596e-04 0 -1 1249\n            -3.1208951259031892e-04 -2 -3 1250 1.3574779732152820e-03</internalNodes>\n          <leafValues>\n            -5.5061008781194687e-02 2.7939450740814209e-01\n            -2.9496839642524719e-01 2.3769420385360718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1251 2.6001129299402237e-02 2 -1 1252\n            -5.1486152224242687e-03 -2 -3 1253 -4.1137751191854477e-02</internalNodes>\n          <leafValues>\n            4.8369780182838440e-01 -1.4562819898128510e-01\n            -4.8423030972480774e-01 1.9624310731887817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1254 1.2921179644763470e-02 2 -1 1255\n            2.9845361132174730e-03 -2 -3 1256 1.2732800096273422e-02</internalNodes>\n          <leafValues>\n            6.0538208484649658e-01 -4.6820640563964844e-01\n            -2.9540339484810829e-02 3.6185088753700256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1257 -1.0869900143006817e-04 -1 2 1258\n            -8.9501799084246159e-04 -2 -3 1259 5.3637558594346046e-03</internalNodes>\n          <leafValues>\n            1.6606490314006805e-01 3.5517621785402298e-02\n            -3.5981449484825134e-01 4.2224168777465820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1260 1.4909369871020317e-02 -1 2 1261\n            -1.0603530099615455e-03 -2 -3 1262 -3.6916081444360316e-04</internalNodes>\n          <leafValues>\n            -6.6308712959289551e-01 -3.8903519511222839e-01\n            -1.1299440264701843e-01 1.6010889410972595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1263 -3.8595579098910093e-04 2 -1 1264\n            5.9791578678414226e-04 -2 -3 1265 1.0427299886941910e-02</internalNodes>\n          <leafValues>\n            1.9961580634117126e-01 -2.5480431318283081e-01\n            1.0820420086383820e-01 -5.4060971736907959e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>41</maxWeakCount>\n      <stageThreshold>-1.2273980379104614e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 1266 8.5305199027061462e-03 2 -1 1267\n            -7.0295208133757114e-03 -2 -3 1268 1.1181459762156010e-02</internalNodes>\n          <leafValues>\n            -2.3412899672985077e-01 -1.3273300230503082e-01\n            -1.0306409746408463e-01 8.1993848085403442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1269 -3.3347710967063904e-02 2 -1 1270\n            -5.7895448990166187e-03 -2 -3 1271 7.5207999907433987e-03</internalNodes>\n          <leafValues>\n            -2.0504109561443329e-01 -7.2138823568820953e-02\n            9.2525452375411987e-02 6.4616191387176514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1272 5.1975441165268421e-03 2 -1 1273\n            2.7103458996862173e-03 -2 -3 1274 -5.8099921792745590e-02</internalNodes>\n          <leafValues>\n            -3.6144751310348511e-01 -3.4319791197776794e-01\n            3.2151529192924500e-01 -3.0232580378651619e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1275 4.1742541361600161e-04 0 -1 1276\n            5.8975181309506297e-04 -2 -3 1277 1.3578129932284355e-02</internalNodes>\n          <leafValues>\n            -2.6612699031829834e-01 1.4442689716815948e-01\n            3.6293990910053253e-02 4.4277408719062805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1278 -3.9278618060052395e-03 -1 2 1279\n            -1.6465460881590843e-02 -2 -3 1280 -9.0516731142997742e-03</internalNodes>\n          <leafValues>\n            -4.2203828692436218e-01 -5.7036012411117554e-01\n            -2.4343970417976379e-01 1.2901119887828827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1281 -4.0202909149229527e-03 -1 2 1282\n            1.9786891061812639e-03 -2 -3 1283 -2.1167920902371407e-02</internalNodes>\n          <leafValues>\n            3.0336159467697144e-01 -1.1887379735708237e-01\n            -5.3209340572357178e-01 3.7618291378021240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1284 -1.3314959593117237e-02 2 -1 1285\n            -3.0734280124306679e-02 -2 -3 1286 -4.9376720190048218e-01</internalNodes>\n          <leafValues>\n            -4.7728979587554932e-01 -1.0171979665756226e-01\n            -4.9745380878448486e-01 1.9965989887714386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1287 -2.2439099848270416e-03 -1 2 1288\n            -4.3283861130475998e-02 -2 -3 1289 -9.8785851150751114e-05</internalNodes>\n          <leafValues>\n            -1.0817500203847885e-01 6.4580261707305908e-01\n            2.6985371112823486e-01 -1.5044610202312469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1290 2.8435129672288895e-02 -1 2 1291\n            2.7237860485911369e-03 -2 -3 1292 -4.7562850522808731e-04</internalNodes>\n          <leafValues>\n            2.9883900284767151e-01 -1.8797110021114349e-01\n            2.8433099389076233e-01 -1.2085639685392380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1293 3.8944541011005640e-03 2 -1 1294\n            4.3390938080847263e-03 -2 -3 1295 -2.0263839513063431e-02</internalNodes>\n          <leafValues>\n            -2.7473360300064087e-01 -3.7163880467414856e-01\n            -3.5409209132194519e-01 1.3197909295558929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1296 -5.5432569235563278e-02 2 -1 1297\n            5.4974798113107681e-03 -2 -3 1298 -4.8123318701982498e-03</internalNodes>\n          <leafValues>\n            -6.3836967945098877e-01 2.4118340015411377e-01\n            1.2418109923601151e-01 -1.8538869917392731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1299 1.4174300013110042e-03 0 -1 1300\n            -3.3114890102297068e-03 -2 -3 1301 -9.4083733856678009e-03</internalNodes>\n          <leafValues>\n            1.0947279632091522e-01 -3.1438231468200684e-01\n            -5.0812500715255737e-01 1.2708969414234161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1302 1.6073260456323624e-02 -1 2 1303\n            -3.9989468641579151e-03 -2 -3 1304 1.0122359963133931e-03</internalNodes>\n          <leafValues>\n            -3.2891270518302917e-01 2.3349060118198395e-01\n            -1.7827099561691284e-01 1.6806240379810333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1305 1.5654880553483963e-02 2 -1 1306\n            1.3416170142591000e-02 -2 -3 1307 2.4865430314093828e-03</internalNodes>\n          <leafValues>\n            6.6142809391021729e-01 -5.6725960969924927e-01\n            7.0396818220615387e-02 -2.1695409715175629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1308 -4.5016291551291943e-03 -1 2 1309\n            -2.0310489460825920e-02 -2 -3 1310 2.0448309369385242e-03</internalNodes>\n          <leafValues>\n            -2.9001921415328979e-01 -5.5471527576446533e-01\n            -7.5903441756963730e-03 3.0112549662590027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1311 3.3151761163026094e-03 0 -1 1312\n            -1.1767409741878510e-02 -2 -3 1313 -9.0457782149314880e-02</internalNodes>\n          <leafValues>\n            -6.5939038991928101e-01 1.9516299664974213e-01\n            2.3783689737319946e-01 -1.6133689880371094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1314 -9.4386242562904954e-04 -1 2 1315\n            -5.5300429463386536e-02 -2 -3 1316 1.8430839991196990e-03</internalNodes>\n          <leafValues>\n            2.0265130698680878e-01 1.3218100368976593e-01\n            -8.5232466459274292e-02 -5.0634711980819702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1317 -4.4628758914768696e-03 0 -1 1318\n            9.7493419889360666e-04 -2 -3 1319 -3.1454759300686419e-04</internalNodes>\n          <leafValues>\n            -2.7136290073394775e-01 1.5943349897861481e-01\n            2.7965110540390015e-01 -3.2671060413122177e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1320 -1.6447799280285835e-02 0 -1 1321\n            2.3777380585670471e-02 -2 -3 1322 2.8008338995277882e-03</internalNodes>\n          <leafValues>\n            -4.1435249149799347e-03 3.5191389918327332e-01\n            -2.2791029512882233e-01 1.8853689730167389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1323 1.7503320123068988e-04 -1 2 1324\n            1.3492659491021186e-04 -2 -3 1325 4.8691541451262310e-05</internalNodes>\n          <leafValues>\n            -2.1376720070838928e-01 -1.3506560027599335e-01\n            -2.7009880542755127e-01 3.2778948545455933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1326 2.4542049504816532e-03 -1 2 1327\n            -2.3232260718941689e-02 -2 -3 1328 5.2798539400100708e-03</internalNodes>\n          <leafValues>\n            2.6363280415534973e-01 -3.8305589556694031e-01\n            -7.7942140400409698e-02 2.4021050333976746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1329 7.0398352108895779e-03 2 -1 1330\n            4.0894638746976852e-02 -2 -3 1331 -7.9772479832172394e-02</internalNodes>\n          <leafValues>\n            2.0972409844398499e-01 -7.0987868309020996e-01\n            5.7007771730422974e-01 -6.9354712963104248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1332 6.4237392507493496e-04 -1 2 1333\n            1.8864229787141085e-03 -2 -3 1334 -2.5151949375867844e-03</internalNodes>\n          <leafValues>\n            -4.0321418642997742e-01 8.4503486752510071e-02\n            7.3963850736618042e-01 -3.7004008889198303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1335 9.2179048806428909e-04 0 -1 1336\n            -6.6281789913773537e-03 -2 -3 1337 -1.2447969987988472e-02</internalNodes>\n          <leafValues>\n            2.4241310358047485e-01 -2.5563749670982361e-01\n            4.5645469427108765e-01 3.5875100642442703e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1338 9.8073864355683327e-03 2 -1 1339\n            1.1752230115234852e-02 -2 -3 1340 -4.5835418859496713e-04</internalNodes>\n          <leafValues>\n            -3.5728690028190613e-01 2.2477920353412628e-01\n            9.2636883258819580e-02 -2.2759440541267395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1341 1.2521909549832344e-02 2 -1 1342\n            5.4397471249103546e-03 -2 -3 1343 -5.8840587735176086e-04</internalNodes>\n          <leafValues>\n            -5.0926029682159424e-01 4.6630910038948059e-01\n            -2.5326851010322571e-01 4.8585399985313416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1344 -8.6136013269424438e-03 2 -1 1345\n            4.8513390356674790e-04 -2 -3 1346 -5.7645072229206562e-04</internalNodes>\n          <leafValues>\n            -4.6801608800888062e-01 1.5412229299545288e-01\n            3.3526080846786499e-01 -1.3425140082836151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1347 1.5327259898185730e-03 2 -1 1348\n            1.6712940123397857e-04 -2 -3 1349 5.0148408627137542e-04</internalNodes>\n          <leafValues>\n            -8.4655933082103729e-02 -2.9512628912925720e-01\n            4.4228151440620422e-01 7.0311659947037697e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1350 -7.2751182597130537e-04 2 -1 1351\n            1.6298179980367422e-03 -2 -3 1352 -6.5518761985003948e-03</internalNodes>\n          <leafValues>\n            3.6965361237525940e-01 -3.1909099221229553e-01\n            -5.0437092781066895e-01 4.8704870045185089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1353 -1.8271349370479584e-02 2 -1 1354\n            -3.1057938933372498e-01 -2 -3 1355 8.6849008221179247e-04</internalNodes>\n          <leafValues>\n            2.6778510212898254e-01 -1.5646959841251373e-01\n            2.2130140662193298e-01 -2.3309649527072906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1356 -1.0790280066430569e-02 2 -1 1357\n            -6.7156221484765410e-04 -2 -3 1358 7.9050064086914062e-03</internalNodes>\n          <leafValues>\n            -4.1554379463195801e-01 -8.0280020833015442e-02\n            1.7470720410346985e-01 -7.7852571010589600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1359 1.2352660298347473e-02 0 -1 1360\n            6.2703549861907959e-02 -2 -3 1361 -7.1864388883113861e-03</internalNodes>\n          <leafValues>\n            4.3160900473594666e-01 -3.9224869012832642e-01\n            -5.8003968000411987e-01 -2.5838220492005348e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1362 -3.8558109663426876e-03 -1 2 1363\n            -1.5419459668919444e-03 -2 -3 1364 -2.2120370995253325e-03</internalNodes>\n          <leafValues>\n            1.5963500738143921e-01 1.6741840541362762e-01\n            2.9176110401749611e-02 -2.8822419047355652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1365 -2.1434590220451355e-02 2 -1 1366\n            -1.9107710104435682e-03 -2 -3 1367 3.5804428160190582e-02</internalNodes>\n          <leafValues>\n            -2.2613149881362915e-01 1.0307289659976959e-01\n            7.5381852686405182e-02 -6.3267099857330322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1368 1.4067400479689240e-03 -1 2 1369\n            9.6554737538099289e-03 -2 -3 1370 2.4058830738067627e-01</internalNodes>\n          <leafValues>\n            3.7057319283485413e-01 -2.0454670488834381e-01\n            2.0735639333724976e-01 -1.2661419808864594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1371 5.2541731856763363e-03 -1 2 1372\n            -1.1480560060590506e-03 -2 -3 1373 5.2387482719495893e-04</internalNodes>\n          <leafValues>\n            -2.3812450468540192e-01 -1.8807569518685341e-02\n            5.8435738086700439e-01 -7.0002108812332153e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1374 8.9346221648156643e-04 -1 2 1375\n            -1.4664779603481293e-01 -2 -3 1376 6.4734317129477859e-04</internalNodes>\n          <leafValues>\n            -2.0343719422817230e-01 4.2429131269454956e-01\n            -7.2510123252868652e-02 2.4216009676456451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1377 3.7285720463842154e-03 2 -1 1378\n            1.0364309855503961e-04 -2 -3 1379 -4.3523311614990234e-03</internalNodes>\n          <leafValues>\n            -4.1690871119499207e-01 1.7091989517211914e-01\n            3.1368499994277954e-01 -1.3387750089168549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1380 -8.2644030451774597e-02 0 -1 1381\n            -8.3868228830397129e-04 -2 -3 1382 -2.6123419404029846e-02</internalNodes>\n          <leafValues>\n            6.7182201147079468e-01 -4.5429998636245728e-01\n            2.1897830069065094e-01 -3.2377090305089951e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1383 5.2059517474845052e-04 0 -1 1384\n            -2.9154460877180099e-02 -2 -3 1385 -1.1165169999003410e-03</internalNodes>\n          <leafValues>\n            -3.6328500509262085e-01 1.6834139823913574e-01\n            1.5818840265274048e-01 -2.3134049773216248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1386 -1.1460180394351482e-03 2 -1 1387\n            2.0873030647635460e-02 -2 -3 1388 4.0476579219102859e-02</internalNodes>\n          <leafValues>\n            -1.2237170338630676e-01 4.0715441107749939e-01\n            -4.8719130456447601e-02 6.1359512805938721e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>42</maxWeakCount>\n      <stageThreshold>-1.1990439891815186e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            2 1 1389 2.3152550682425499e-02 0 -1 1390\n            9.4490228220820427e-03 -2 -3 1391 1.2632790021598339e-03</internalNodes>\n          <leafValues>\n            1.6217540204524994e-01 8.9458537101745605e-01\n            -2.9920589923858643e-01 2.4114310741424561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1392 -6.3288196921348572e-02 0 -1 1393\n            -5.4630772210657597e-03 -2 -3 1394 -5.3964817197993398e-04</internalNodes>\n          <leafValues>\n            5.8726388216018677e-01 2.8670629486441612e-02\n            2.1043429151177406e-02 -3.3096361160278320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1395 -4.3574950098991394e-01 -1 2 1396\n            -2.2997299674898386e-03 -2 -3 1397 2.8589849825948477e-03</internalNodes>\n          <leafValues>\n            2.9235550761222839e-01 1.0574100166559219e-01\n            -3.3370551466941833e-01 1.6990379989147186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1398 -2.1891849115490913e-02 -1 2 1399\n            -9.2662516981363297e-03 -2 -3 1400 -1.6625279560685158e-02</internalNodes>\n          <leafValues>\n            -6.2861520051956177e-01 -4.3969720602035522e-01\n            4.0394479036331177e-01 1.1343320365995169e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1401 2.4849560577422380e-03 0 -1 1402\n            -1.8093220889568329e-02 -2 -3 1403 -1.5609259717166424e-02</internalNodes>\n          <leafValues>\n            -1.5912850201129913e-01 4.4538548588752747e-01\n            6.9278262555599213e-02 -2.2655999660491943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1404 -4.3753669597208500e-03 -1 2 1405\n            -1.3602689432445914e-04 -2 -3 1406 3.8207470788620412e-04</internalNodes>\n          <leafValues>\n            -7.1104782819747925e-01 -1.6582900285720825e-01\n            2.1408109366893768e-01 -1.2310829758644104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1407 -5.7698809541761875e-03 -1 2 1408\n            -6.5253339707851410e-03 -2 -3 1409 -8.3149597048759460e-02</internalNodes>\n          <leafValues>\n            2.5808620452880859e-01 2.0068170130252838e-01\n            -6.4005237817764282e-01 -9.6292853355407715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1410 -1.7492580227553844e-03 -1 2 1411\n            -3.5885178949683905e-03 -2 -3 1412 2.8363720048218966e-03</internalNodes>\n          <leafValues>\n            -2.7996930480003357e-01 -4.2557060718536377e-01\n            1.7105630040168762e-01 -1.1548189818859100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1413 3.7369329947978258e-03 0 -1 1414\n            2.0398290827870369e-02 -2 -3 1415 -1.8605329096317291e-02</internalNodes>\n          <leafValues>\n            7.5142003595829010e-02 7.1449148654937744e-01\n            6.6745537519454956e-01 -1.3011719286441803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1416 1.2047400232404470e-03 -1 2 1417\n            -4.1799237951636314e-03 -2 -3 1418 5.3556780330836773e-03</internalNodes>\n          <leafValues>\n            1.9936279952526093e-01 2.0625339448451996e-01\n            -2.1847389638423920e-01 3.9184600114822388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1419 -2.3561089765280485e-03 0 -1 1420\n            -5.9740748256444931e-02 -2 -3 1421 1.4918210217729211e-03</internalNodes>\n          <leafValues>\n            6.4951920509338379e-01 -2.6147049665451050e-01\n            1.1800879985094070e-01 -3.6518579721450806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1422 -2.6466009020805359e-01 -1 2 1423\n            -6.3644978217780590e-04 -2 -3 1424 -1.0798840224742889e-01</internalNodes>\n          <leafValues>\n            -4.7007301449775696e-01 1.5393650531768799e-01\n            2.8167989850044250e-01 -1.9636960327625275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1425 -3.6950930370949209e-04 -1 2 1426\n            -7.9222144559025764e-03 -2 -3 1427 -7.1997018530964851e-03</internalNodes>\n          <leafValues>\n            -2.5694531202316284e-01 -3.6089059710502625e-01\n            2.1187220513820648e-01 -6.0304410755634308e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1428 2.7865950018167496e-02 -1 2 1429\n            1.0313779785064980e-04 -2 -3 1430 9.8026450723409653e-04</internalNodes>\n          <leafValues>\n            2.7542260289192200e-01 -2.1113120019435883e-01\n            1.2969830632209778e-01 -3.5925969481468201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1431 1.0869160294532776e-02 2 -1 1432\n            1.9162669777870178e-03 -2 -3 1433 -6.9466588320210576e-04</internalNodes>\n          <leafValues>\n            -2.8709220886230469e-01 1.9223760068416595e-01\n            2.6802310347557068e-01 -1.5893469750881195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1434 -1.5737100038677454e-03 2 -1 1435\n            2.8489651158452034e-03 -2 -3 1436 1.2300360249355435e-03</internalNodes>\n          <leafValues>\n            4.8450559377670288e-01 1.4732420444488525e-01\n            -2.2078629583120346e-02 -3.5363599658012390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1437 -1.7871359596028924e-03 -1 2 1438\n            -7.5124297291040421e-04 -2 -3 1439 -1.5810869634151459e-02</internalNodes>\n          <leafValues>\n            1.5130859613418579e-01 -2.5845149159431458e-01\n            3.9024001359939575e-01 -8.3249032497406006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1440 -8.5817109793424606e-03 0 -1 1441\n            1.4925940334796906e-01 -2 -3 1442 5.0973348319530487e-02</internalNodes>\n          <leafValues>\n            6.5285183489322662e-02 -4.4836780428886414e-01\n            -5.9802252054214478e-01 7.6314812898635864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1443 -1.4699130551889539e-03 0 -1 1444\n            1.8571510445326567e-03 -2 -3 1445 2.7572319377213717e-03</internalNodes>\n          <leafValues>\n            -1.5857130289077759e-01 2.0623469352722168e-01\n            -1.5369700267910957e-02 3.5741418600082397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1446 -1.2494870461523533e-02 -1 2 1447\n            -2.0542230457067490e-02 -2 -3 1448 9.8408637568354607e-03</internalNodes>\n          <leafValues>\n            2.1646310389041901e-01 3.5183259844779968e-01\n            -2.5107988715171814e-01 2.4597419425845146e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1449 7.5531061738729477e-03 2 -1 1450\n            8.6472760885953903e-03 -2 -3 1451 -2.3343270644545555e-02</internalNodes>\n          <leafValues>\n            -7.7170521020889282e-01 -2.6535108685493469e-01\n            -3.1102359294891357e-01 1.0751940310001373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1452 -2.3739689495414495e-03 2 -1 1453\n            4.5531010255217552e-03 -2 -3 1454 -1.7819739878177643e-02</internalNodes>\n          <leafValues>\n            2.4833559989929199e-01 1.2766610085964203e-01\n            -2.1538909524679184e-02 -3.3530569076538086e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1455 -1.8217710778117180e-02 -1 2 1456\n            -4.5768721029162407e-03 -2 -3 1457 -1.8008370534516871e-04</internalNodes>\n          <leafValues>\n            -4.1915500164031982e-01 -4.3936538696289062e-01\n            -1.2697519361972809e-01 1.3539279997348785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1458 -7.6008588075637817e-03 2 -1 1459\n            4.5034091453999281e-04 -2 -3 1460 2.7170981047675014e-04</internalNodes>\n          <leafValues>\n            -3.3822789788246155e-01 3.1599909067153931e-01\n            -7.5660146772861481e-02 2.3075099289417267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1461 -5.9739891439676285e-02 2 -1 1462\n            -2.4159778840839863e-03 -2 -3 1463 7.5702499598264694e-03</internalNodes>\n          <leafValues>\n            -3.9958238601684570e-01 -2.9177419841289520e-02\n            3.6201998591423035e-01 -7.8775990009307861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1464 4.8360861837863922e-03 -1 2 1465\n            -1.9794749096035957e-02 -2 -3 1466 -5.3176241926848888e-03</internalNodes>\n          <leafValues>\n            -4.7984561324119568e-01 3.1721720099449158e-01\n            2.1971449255943298e-01 -8.5302233695983887e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1467 3.5097550135105848e-03 0 -1 1468\n            -1.6063610091805458e-03 -2 -3 1469 1.8238229677081108e-03</internalNodes>\n          <leafValues>\n            3.4705808758735657e-01 -3.2198080420494080e-01\n            9.7573727369308472e-02 -4.1784769296646118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1470 2.2058039903640747e-03 0 -1 1471\n            2.5601179804652929e-03 -2 -3 1472 2.2490289993584156e-03</internalNodes>\n          <leafValues>\n            -2.9866018891334534e-01 3.2085859775543213e-01\n            1.0411229729652405e-01 -3.0941790342330933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1473 2.2417849395424128e-03 0 -1 1474\n            9.5781440904829651e-05 -2 -3 1475 -1.0199189931154251e-01</internalNodes>\n          <leafValues>\n            -1.9861190021038055e-01 8.0484487116336823e-02\n            -6.6573441028594971e-01 2.6545938849449158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1476 2.9278239235281944e-03 0 -1 1477\n            -2.3058110382407904e-03 -2 -3 1478 -3.5818710457533598e-03</internalNodes>\n          <leafValues>\n            4.6711549162864685e-01 -2.3293379694223404e-02\n            1.9756149500608444e-02 -2.5899839401245117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1479 4.8302081413567066e-03 0 -1 1480\n            -2.7483499143272638e-03 -2 -3 1481 -4.5970390783622861e-04</internalNodes>\n          <leafValues>\n            -3.6909970641136169e-01 2.9650568962097168e-01\n            1.0480040311813354e-01 -1.6184529662132263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1482 -1.0161349549889565e-02 0 -1 1483\n            3.2342320773750544e-03 -2 -3 1484 -1.1368689592927694e-03</internalNodes>\n          <leafValues>\n            -1.5523530542850494e-01 4.8816910386085510e-01\n            2.8159290552139282e-01 -6.2790401279926300e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1485 1.1411249870434403e-03 2 -1 1486\n            2.8695389628410339e-03 -2 -3 1487 2.4731169641017914e-01</internalNodes>\n          <leafValues>\n            1.2081749737262726e-01 2.0992599427700043e-01\n            -2.4197529256343842e-01 6.4990550279617310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1488 2.7829511091113091e-03 0 -1 1489\n            -1.3701720163226128e-02 -2 -3 1490 4.8768401145935059e-02</internalNodes>\n          <leafValues>\n            4.5538169145584106e-01 -3.3847901225090027e-01\n            8.9688122272491455e-02 -3.1576380133628845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1491 1.7329800873994827e-02 2 -1 1492\n            1.4899630099534988e-02 -2 -3 1493 -5.4528238251805305e-03</internalNodes>\n          <leafValues>\n            4.2558190226554871e-01 6.1711931228637695e-01\n            -4.0939989686012268e-01 -1.5215449966490269e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1494 -4.6164509840309620e-03 2 -1 1495\n            2.2072680294513702e-03 -2 -3 1496 1.1780969798564911e-03</internalNodes>\n          <leafValues>\n            -3.5992878675460815e-01 2.0051500201225281e-01\n            -1.7710399627685547e-01 1.3283580541610718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1497 -2.1226529497653246e-04 0 -1 1498\n            6.6969380713999271e-03 -2 -3 1499 4.8628589138388634e-03</internalNodes>\n          <leafValues>\n            -1.4558829367160797e-01 3.0319228768348694e-01\n            2.1147659420967102e-01 -6.5050870180130005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1500 1.2855669483542442e-03 -1 2 1501\n            -9.8538002930581570e-04 -2 -3 1502 3.6161120515316725e-03</internalNodes>\n          <leafValues>\n            -1.4253799617290497e-01 -4.9302369356155396e-02\n            4.5496350526809692e-01 -1.2398339807987213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1503 7.4739390984177589e-03 2 -1 1504\n            1.4764349907636642e-02 -2 -3 1505 5.4328311234712601e-03</internalNodes>\n          <leafValues>\n            2.5631210207939148e-01 5.8572351932525635e-01\n            3.2529931515455246e-02 -2.2187189757823944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1506 -2.7086320915259421e-04 0 -1 1507\n            4.2132260277867317e-03 -2 -3 1508 1.9583420362323523e-04</internalNodes>\n          <leafValues>\n            2.6175120472908020e-01 -5.9540379047393799e-01\n            -1.9159470498561859e-01 9.1520026326179504e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1509 -7.1442658081650734e-03 2 -1 1510\n            2.3744559439364821e-04 -2 -3 1511 -8.4380080807022750e-05</internalNodes>\n          <leafValues>\n            1.3012650609016418e-01 -3.8831448554992676e-01\n            2.1030910313129425e-01 -1.4587140083312988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1512 1.2161800265312195e-01 2 -1 1513\n            6.9275178248062730e-05 -2 -3 1514 -1.5904659405350685e-02</internalNodes>\n          <leafValues>\n            2.5583249330520630e-01 1.1272220313549042e-01\n            7.2112542390823364e-01 -1.9385160505771637e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>35</maxWeakCount>\n      <stageThreshold>-1.1545649766921997e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            2 1 1515 1.7899930477142334e-02 0 -1 1516\n            1.5925300540402532e-03 -2 -3 1517 1.8896949477493763e-03</internalNodes>\n          <leafValues>\n            4.6134639531373978e-02 8.3787131309509277e-01\n            -3.6899039149284363e-01 1.8707709386944771e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1518 -4.1336648166179657e-02 -1 2 1519\n            -4.0737599134445190e-02 -2 -3 1520 -1.4306500088423491e-03</internalNodes>\n          <leafValues>\n            -1.9983500242233276e-01 5.5203098058700562e-01\n            -5.4083228111267090e-01 1.3183380663394928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1521 1.4656609855592251e-03 0 -1 1522\n            -1.3589359587058425e-03 -2 -3 1523 -1.5437849797308445e-03</internalNodes>\n          <leafValues>\n            1.7477029561996460e-01 -4.5285460352897644e-01\n            2.2154679894447327e-01 -1.1437030136585236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1524 6.6659757867455482e-03 0 -1 1525\n            -1.7080729594454169e-03 -2 -3 1526 -3.6050159484148026e-02</internalNodes>\n          <leafValues>\n            5.6135451793670654e-01 -7.5875748880207539e-03\n            6.9391137361526489e-01 -1.3373179733753204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1527 -7.1983798407018185e-03 -1 2 1528\n            -6.5796967828646302e-04 -2 -3 1529 -1.2115390272811055e-03</internalNodes>\n          <leafValues>\n            1.8855899572372437e-01 -4.7130081057548523e-01\n            1.9381099939346313e-01 -1.4709189534187317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1530 -1.0272770188748837e-02 2 -1 1531\n            -7.0025851018726826e-03 -2 -3 1532 -2.4933859705924988e-02</internalNodes>\n          <leafValues>\n            -4.1135069727897644e-01 -8.8177748024463654e-02\n            -6.3464301824569702e-01 2.5403091311454773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1533 7.7693387866020203e-03 0 -1 1534\n            -4.4885549694299698e-02 -2 -3 1535 1.9916899036616087e-03</internalNodes>\n          <leafValues>\n            -4.5445719361305237e-01 3.3884489536285400e-01\n            -5.3012330085039139e-02 -5.7269239425659180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1536 -1.4783450402319431e-02 2 -1 1537\n            1.1688449885696173e-03 -2 -3 1538 -1.2033269740641117e-04</internalNodes>\n          <leafValues>\n            3.7365919351577759e-01 -3.0164909362792969e-01\n            1.4958509802818298e-01 -1.4014390110969543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1539 -4.3730039149522781e-02 -1 2 1540\n            -1.7855180427432060e-02 -2 -3 1541 8.3651271415874362e-04</internalNodes>\n          <leafValues>\n            -7.0078557729721069e-01 8.0032449960708618e-01\n            7.8825756907463074e-02 -2.0352110266685486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1542 -6.6671593231149018e-05 0 -1 1543\n            -9.8805947345681489e-05 -2 -3 1544 -2.7336759376339614e-04</internalNodes>\n          <leafValues>\n            -3.7201121449470520e-01 1.3640309683978558e-02\n            -1.6216109693050385e-01 2.6113900542259216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1545 4.2468630708754063e-03 2 -1 1546\n            -4.9197040498256683e-03 -2 -3 1547 -1.4116670005023479e-02</internalNodes>\n          <leafValues>\n            2.8842711448669434e-01 -1.0787279903888702e-01\n            -7.0104539394378662e-01 3.3659279346466064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1548 -4.4507419806905091e-04 0 -1 1549\n            -1.2075440026819706e-02 -2 -3 1550 -2.3437689524143934e-03</internalNodes>\n          <leafValues>\n            -7.0987367630004883e-01 1.5176150202751160e-01\n            -4.0890040993690491e-01 -1.7091540619730949e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1551 1.6248680651187897e-02 2 -1 1552\n            1.9177920185029507e-03 -2 -3 1553 -1.0359560139477253e-02</internalNodes>\n          <leafValues>\n            -6.0641109943389893e-01 3.6670050024986267e-01\n            1.9813629984855652e-01 -1.1020349711179733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1554 2.9234820976853371e-03 0 -1 1555\n            3.4323200583457947e-02 -2 -3 1556 1.8238219490740448e-04</internalNodes>\n          <leafValues>\n            -4.6382451057434082e-01 1.5469099581241608e-01\n            -2.5076579302549362e-02 2.7050849795341492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1557 -8.5055502131581306e-04 2 -1 1558\n            4.7644949518144131e-03 -2 -3 1559 -2.5098009500652552e-03</internalNodes>\n          <leafValues>\n            1.7459200322628021e-01 4.0942171216011047e-01\n            3.9601740241050720e-01 -1.7667229473590851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1560 -5.0978600047528744e-03 -1 2 1561\n            -5.2095171064138412e-02 -2 -3 1562 3.5293150693178177e-02</internalNodes>\n          <leafValues>\n            -4.4393861293792725e-01 -6.6363197565078735e-01\n            2.7801029384136200e-02 5.6744211912155151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1563 -3.6938309669494629e-01 2 -1 1564\n            5.7077431119978428e-03 -2 -3 1565 5.1315332530066371e-04</internalNodes>\n          <leafValues>\n            -5.4281282424926758e-01 -3.8007241487503052e-01\n            -7.5563162565231323e-02 1.8112689256668091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1566 -8.1165106967091560e-03 -1 2 1567\n            2.4742930690990761e-05 -2 -3 1568 -8.3282394334673882e-03</internalNodes>\n          <leafValues>\n            4.3757191300392151e-01 -1.6252890229225159e-01\n            2.9233780503273010e-01 -5.2530951797962189e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1569 -9.9733080714941025e-03 -1 2 1570\n            -1.6291439533233643e-03 -2 -3 1571 2.3081828840076923e-03</internalNodes>\n          <leafValues>\n            2.3018500208854675e-01 -3.8834458589553833e-01\n            1.5438289940357208e-01 -1.6248099505901337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1572 7.0326360873878002e-03 2 -1 1573\n            -8.7802913039922714e-03 -2 -3 1574 -1.1044350266456604e-01</internalNodes>\n          <leafValues>\n            -8.2522578537464142e-02 3.2759511470794678e-01\n            6.3194888830184937e-01 -2.1398690342903137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1575 6.3772657886147499e-03 -1 2 1576\n            -1.4427660405635834e-01 -2 -3 1577 5.2613671869039536e-03</internalNodes>\n          <leafValues>\n            -6.5774962306022644e-02 -5.2361601591110229e-01\n            3.7687599658966064e-01 -3.7297201156616211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1578 -9.3407719396054745e-04 2 -1 1579\n            7.0944131584838033e-04 -2 -3 1580 -2.0967289805412292e-02</internalNodes>\n          <leafValues>\n            -3.5960820317268372e-01 2.9923319816589355e-01\n            -3.0739480257034302e-01 4.0209449827671051e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1581 3.0113470274955034e-03 0 -1 1582\n            -1.6325850447174162e-04 -2 -3 1583 3.9222151972353458e-03</internalNodes>\n          <leafValues>\n            8.1960096955299377e-02 -2.3989020287990570e-01\n            3.2356649637222290e-01 -1.2140029668807983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1584 1.9476639572530985e-03 -1 2 1585\n            -1.1166670173406601e-01 -2 -3 1586 -8.8221747428178787e-03</internalNodes>\n          <leafValues>\n            -2.0126590132713318e-01 -3.1850230693817139e-01\n            -4.0777778625488281e-01 1.7498190701007843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1587 4.4771569082513452e-04 -1 2 1588\n            -1.5389479696750641e-01 -2 -3 1589 9.9520087242126465e-02</internalNodes>\n          <leafValues>\n            2.2826899588108063e-01 2.3346799612045288e-01\n            -1.9206780195236206e-01 1.9271479547023773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1590 -7.3821679688990116e-03 2 -1 1591\n            3.8805850781500340e-03 -2 -3 1592 1.6339759528636932e-01</internalNodes>\n          <leafValues>\n            -4.6257901191711426e-01 -2.3733510076999664e-01\n            5.5862568318843842e-02 6.1965280771255493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1593 -8.8077411055564880e-02 -1 2 1594\n            -3.5946018993854523e-02 -2 -3 1595 -1.6441620886325836e-02</internalNodes>\n          <leafValues>\n            -3.8033220171928406e-01 2.6925620436668396e-01\n            1.4508089423179626e-01 -1.6219359636306763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1596 -4.3592150323092937e-03 2 -1 1597\n            1.0485500097274780e-02 -2 -3 1598 -6.1118233134038746e-05</internalNodes>\n          <leafValues>\n            -5.1064497232437134e-01 2.8324770927429199e-01\n            7.6486147940158844e-02 -1.9800069928169250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1599 -4.7104779630899429e-02 2 -1 1600\n            4.4213151559233665e-03 -2 -3 1601 7.0402962155640125e-03</internalNodes>\n          <leafValues>\n            -7.2683817148208618e-01 3.9631149172782898e-01\n            1.8920229747891426e-02 -3.7019899487495422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1602 1.4250110089778900e-01 2 -1 1603\n            -5.7172770611941814e-03 -2 -3 1604 -4.6481531113386154e-02</internalNodes>\n          <leafValues>\n            8.8020402193069458e-01 4.3595671653747559e-02\n            7.6506501436233521e-01 -2.7619931101799011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1605 -4.4838748872280121e-02 2 -1 1606\n            3.0957909300923347e-02 -2 -3 1607 -8.7462607771158218e-03</internalNodes>\n          <leafValues>\n            -5.1540642976760864e-01 5.9068799018859863e-01\n            -2.2899469733238220e-01 6.3833296298980713e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1608 -1.5742169693112373e-02 0 -1 1609\n            -2.6640590280294418e-02 -2 -3 1610 1.8860519630834460e-03</internalNodes>\n          <leafValues>\n            7.8339278697967529e-01 -2.8742430731654167e-02\n            -5.8971941471099854e-03 -5.2254527807235718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1611 9.0017020702362061e-02 2 -1 1612\n            4.1232812218368053e-03 -2 -3 1613 -3.1369640491902828e-03</internalNodes>\n          <leafValues>\n            -2.7766749262809753e-01 -3.3485591411590576e-01\n            2.3297710716724396e-01 -2.5101479142904282e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1614 -1.9068670272827148e-01 -1 2 1615\n            -1.2578029930591583e-01 -2 -3 1616 -4.1931928717531264e-04</internalNodes>\n          <leafValues>\n            -4.9549269676208496e-01 -4.1263309121131897e-01\n            3.1464719772338867e-01 -1.8672699807211757e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1617 -3.2330630347132683e-03 -1 2 1618\n            1.7340299673378468e-03 -2 -3 1619 -2.2027179598808289e-02</internalNodes>\n          <leafValues>\n            1.2561239302158356e-01 -3.4801191091537476e-01\n            4.4815701246261597e-01 -7.2313196957111359e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>39</maxWeakCount>\n      <stageThreshold>-1.1791440248489380e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            2 1 1620 3.3422548323869705e-02 0 -1 1621\n            8.5403252160176635e-04 -2 -3 1622 -7.3585510253906250e-03</internalNodes>\n          <leafValues>\n            -1.3247360289096832e-01 7.6739120483398438e-01\n            1.3871429860591888e-01 -3.1415361166000366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1623 -1.0222700238227844e-01 2 -1 1624\n            3.4475249703973532e-03 -2 -3 1625 -1.7645580694079399e-02</internalNodes>\n          <leafValues>\n            -2.0302750170230865e-01 6.8434572219848633e-01\n            4.2404478788375854e-01 -4.3976809829473495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1626 3.2828699331730604e-03 -1 2 1627\n            -2.6843189261853695e-03 -2 -3 1628 2.6746080256998539e-03</internalNodes>\n          <leafValues>\n            -3.2990959286689758e-01 -3.5459449887275696e-01\n            2.0094729959964752e-01 -2.5637739896774292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1629 4.3111201375722885e-03 0 -1 1630\n            -1.0081959888339043e-02 -2 -3 1631 -1.2621459551155567e-02</internalNodes>\n          <leafValues>\n            6.3562941551208496e-01 7.2961407713592052e-03\n            -4.7962281107902527e-01 -2.3874230682849884e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1632 6.5851196646690369e-02 2 -1 1633\n            6.6091239452362061e-02 -2 -3 1634 1.0616159997880459e-02</internalNodes>\n          <leafValues>\n            -4.3995830416679382e-01 5.8817231655120850e-01\n            4.4144749641418457e-02 -5.2871602773666382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1635 -1.7077329754829407e-01 2 -1 1636\n            7.3064928874373436e-03 -2 -3 1637 -1.6232950612902641e-02</internalNodes>\n          <leafValues>\n            3.5454490780830383e-01 -4.8716691136360168e-01\n            5.1020520925521851e-01 -4.3431609869003296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1638 1.7457149922847748e-02 -1 2 1639\n            1.8004700905294158e-05 -2 -3 1640 -1.8200390331912786e-04</internalNodes>\n          <leafValues>\n            6.0515201091766357e-01 -1.7250029742717743e-01\n            -1.9305349886417389e-01 1.9700099527835846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1641 1.9662559498101473e-04 0 -1 1642\n            -1.1132629588246346e-02 -2 -3 1643 2.1626690868288279e-03</internalNodes>\n          <leafValues>\n            5.0847887992858887e-01 -1.9962939620018005e-01\n            1.6478070616722107e-01 -4.2688089609146118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1644 7.7909911051392555e-03 -1 2 1645\n            -1.7233919352293015e-02 -2 -3 1646 1.2938809581100941e-02</internalNodes>\n          <leafValues>\n            4.0679588913917542e-01 -3.7941160798072815e-01\n            5.0589919090270996e-02 -3.9163780212402344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1647 -1.7387060448527336e-02 -1 2 1648\n            -2.5230729952454567e-03 -2 -3 1649 6.4417538233101368e-03</internalNodes>\n          <leafValues>\n            3.1603300571441650e-01 -1.7287540435791016e-01\n            -9.0429611504077911e-02 3.1889480352401733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1650 -6.1783548444509506e-03 -1 2 1651\n            -6.8178442306816578e-03 -2 -3 1652 1.2576530571095645e-04</internalNodes>\n          <leafValues>\n            -8.6734527349472046e-01 -4.4892689585685730e-01\n            -9.1477192938327789e-02 1.5243050456047058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1653 3.7562008947134018e-03 2 -1 1654\n            -7.1173519827425480e-03 -2 -3 1655 -4.5744940871372819e-04</internalNodes>\n          <leafValues>\n            -3.9259639382362366e-01 -1.9343020394444466e-02\n            5.8565497398376465e-01 -3.0873420182615519e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1656 1.8661000067368150e-03 -1 2 1657\n            4.5793029130436480e-04 -2 -3 1658 -7.0905109168961644e-04</internalNodes>\n          <leafValues>\n            1.2924820184707642e-01 -3.0677530169487000e-01\n            -2.7637350559234619e-01 1.8316049873828888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1659 1.6472890274599195e-03 0 -1 1660\n            3.3973839599639177e-03 -2 -3 1661 1.0479029733687639e-03</internalNodes>\n          <leafValues>\n            3.3831808716058731e-02 5.3982901573181152e-01\n            -3.4972178936004639e-01 3.4049559384584427e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1662 -1.2611759593710303e-03 -1 2 1663\n            -1.3892400311306119e-03 -2 -3 1664 -2.3636990226805210e-03</internalNodes>\n          <leafValues>\n            -1.0801869630813599e-01 -5.8067310601472855e-02\n            -1.1870750039815903e-01 4.2690658569335938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1665 7.7976062893867493e-02 2 -1 1666\n            2.6837061159312725e-03 -2 -3 1667 -1.8215410411357880e-02</internalNodes>\n          <leafValues>\n            6.1271321773529053e-01 2.0893469452857971e-01\n            2.2027739882469177e-01 -1.4412580430507660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1668 -7.1908776590134948e-05 2 -1 1669\n            -4.8738159239292145e-02 -2 -3 1670 1.0442149825394154e-02</internalNodes>\n          <leafValues>\n            1.3836480677127838e-01 -1.8305869400501251e-01\n            2.6348349452018738e-01 -6.3504451513290405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1671 9.3731992819812149e-05 0 -1 1672\n            -8.5826592112425715e-05 -2 -3 1673 -8.0251938197761774e-04</internalNodes>\n          <leafValues>\n            1.4046959578990936e-01 -2.6721659302711487e-01\n            -1.2936100363731384e-01 2.3326739668846130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1674 -4.1836570017039776e-03 2 -1 1675\n            -7.2750613093376160e-02 -2 -3 1676 -2.1738439798355103e-01</internalNodes>\n          <leafValues>\n            -6.0153460502624512e-01 6.9707646965980530e-02\n            5.6727671623229980e-01 -4.5854389667510986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1677 1.1648099869489670e-02 0 -1 1678\n            -6.2701262533664703e-02 -2 -3 1679 2.1612979471683502e-02</internalNodes>\n          <leafValues>\n            7.8997617959976196e-01 -3.9388018846511841e-01\n            7.7059872448444366e-02 -3.8484179973602295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1680 1.4084950089454651e-02 0 -1 1681\n            -1.9548619166016579e-02 -2 -3 1682 -3.8142129778862000e-03</internalNodes>\n          <leafValues>\n            -8.6542218923568726e-01 3.0495870113372803e-01\n            9.0823858976364136e-02 -1.5859849750995636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1683 -1.0152840055525303e-02 -1 2 1684\n            -7.2696566581726074e-02 -2 -3 1685 6.2066782265901566e-03</internalNodes>\n          <leafValues>\n            4.4999830424785614e-02 -5.6914567947387695e-01\n            -2.0673969388008118e-01 9.0268892049789429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1686 6.9105483591556549e-02 -1 2 1687\n            -1.4375509927049279e-03 -2 -3 1688 -1.2960369931533933e-03</internalNodes>\n          <leafValues>\n            -5.9451812505722046e-01 4.0363711118698120e-01\n            -3.1941750645637512e-01 3.5984441637992859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1689 6.1866950243711472e-02 2 -1 1690\n            -1.2085740454494953e-02 -2 -3 1691 2.4474540259689093e-03</internalNodes>\n          <leafValues>\n            -2.7787050604820251e-01 -1.3511900603771210e-01\n            -1.1833719909191132e-02 3.7945300340652466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1692 -5.3315522382035851e-04 2 -1 1693\n            4.3831359595060349e-02 -2 -3 1694 3.1255939393304288e-04</internalNodes>\n          <leafValues>\n            -2.2559830546379089e-01 -4.7124490141868591e-01\n            1.7324599623680115e-01 -1.0789500176906586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1695 -3.2911780290305614e-03 2 -1 1696\n            -5.8774580247700214e-03 -2 -3 1697 1.7906239954754710e-03</internalNodes>\n          <leafValues>\n            7.7492022514343262e-01 -8.2756206393241882e-02\n            2.2471660748124123e-02 5.2061527967453003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1698 -2.8294209390878677e-02 0 -1 1699\n            -2.0737959071993828e-02 -2 -3 1700 6.0438051819801331e-02</internalNodes>\n          <leafValues>\n            -2.7196401357650757e-01 2.4411930143833160e-01\n            -1.8866230547428131e-01 1.2102810293436050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1701 1.0623940266668797e-02 -1 2 1702\n            -5.2178360521793365e-02 -2 -3 1703 -1.0080549865961075e-02</internalNodes>\n          <leafValues>\n            -4.3548050522804260e-01 5.5961382389068604e-01\n            -4.7012031078338623e-01 3.5867590457201004e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1704 -1.8482849700376391e-03 -1 2 1705\n            -1.9860679458361119e-04 -2 -3 1706 1.3552449643611908e-01</internalNodes>\n          <leafValues>\n            1.6979730129241943e-01 7.1132831275463104e-02\n            -2.6272559165954590e-01 6.1016607284545898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1707 -1.5910629183053970e-02 0 -1 1708\n            2.6022290810942650e-02 -2 -3 1709 4.9573001451790333e-03</internalNodes>\n          <leafValues>\n            -3.0872771143913269e-01 4.9954459071159363e-01\n            1.6577349603176117e-01 -9.6653968095779419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1710 -7.6060830906499177e-05 -1 2 1711\n            -7.5124457478523254e-02 -2 -3 1712 -1.2995740398764610e-03</internalNodes>\n          <leafValues>\n            1.4288060367107391e-01 2.5722241401672363e-01\n            5.3607620298862457e-02 -2.8598341345787048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1713 -2.2266160231083632e-03 0 -1 1714\n            -1.7864009365439415e-02 -2 -3 1715 -7.8721214085817337e-03</internalNodes>\n          <leafValues>\n            4.0117779374122620e-01 -1.5379750728607178e-01\n            -5.3092598915100098e-01 2.0486819744110107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1716 7.2514810599386692e-03 0 -1 1717\n            -3.3152610994875431e-03 -2 -3 1718 1.1477110092528164e-04</internalNodes>\n          <leafValues>\n            4.3453741073608398e-01 9.4297742471098900e-03\n            -2.5599750876426697e-01 8.4530018270015717e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1719 -8.1627883017063141e-02 -1 2 1720\n            -3.0422580894082785e-03 -2 -3 1721 9.5837161643430591e-04</internalNodes>\n          <leafValues>\n            6.3307619094848633e-01 1.4660899341106415e-01\n            -2.0023280382156372e-01 9.1823212802410126e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1722 -2.9197218827903271e-04 -1 2 1723\n            -4.1077801142819226e-04 -2 -3 1724 -3.4885460045188665e-03</internalNodes>\n          <leafValues>\n            1.1741080135107040e-01 -4.0920740365982056e-01\n            -3.9310920238494873e-01 9.1094776988029480e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1725 -8.0458387732505798e-02 2 -1 1726\n            1.4809619635343552e-02 -2 -3 1727 -2.5831649079918861e-02</internalNodes>\n          <leafValues>\n            -3.9728361368179321e-01 -6.7901968955993652e-01\n            -4.8431569337844849e-01 7.2864383459091187e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1728 -6.8509988486766815e-03 2 -1 1729\n            7.2365561500191689e-03 -2 -3 1730 -1.5076539712026715e-03</internalNodes>\n          <leafValues>\n            -6.2457418441772461e-01 -4.1250211000442505e-01\n            4.2033711075782776e-01 4.4630239717662334e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1731 3.1408321112394333e-02 -1 2 1732\n            -1.5178160369396210e-01 -2 -3 1733 -1.4014760032296181e-02</internalNodes>\n          <leafValues>\n            5.3995478153228760e-01 -3.0855739116668701e-01\n            -5.0550711154937744e-01 4.7526750713586807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1734 -1.4479519426822662e-01 2 -1 1735\n            -3.5547069273889065e-04 -2 -3 1736 3.9468570612370968e-03</internalNodes>\n          <leafValues>\n            -6.7499721050262451e-01 -6.9627217948436737e-02\n            2.0310120284557343e-01 -5.7640278339385986e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>46</maxWeakCount>\n      <stageThreshold>-1.0878429412841797e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 1737 -3.7029121071100235e-02 0 -1 1738\n            3.5863209050148726e-03 -2 -3 1739 2.0645149052143097e-03</internalNodes>\n          <leafValues>\n            9.5846345648169518e-03 7.9992657899856567e-01\n            -2.9247409105300903e-01 1.4642210304737091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1740 5.5934679694473743e-03 0 -1 1741\n            2.2176630795001984e-02 -2 -3 1742 4.8479600081918761e-05</internalNodes>\n          <leafValues>\n            -3.9403820037841797e-01 5.4291707277297974e-01\n            -2.4063709378242493e-01 9.0213976800441742e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1743 -1.2722389772534370e-02 2 -1 1744\n            1.1610349640250206e-02 -2 -3 1745 8.2520343363285065e-02</internalNodes>\n          <leafValues>\n            -1.7550089955329895e-01 -3.1787800788879395e-01\n            2.8798571228981018e-01 -4.4052869081497192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1746 -1.4208409935235977e-02 -1 2 1747\n            -8.1465748371556401e-04 -2 -3 1748 -5.5117108859121799e-03</internalNodes>\n          <leafValues>\n            -8.2584899663925171e-01 1.9521759450435638e-01\n            1.8622130155563354e-01 -1.9417479634284973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1749 1.0232779895886779e-03 -1 2 1750\n            -6.4967863261699677e-02 -2 -3 1751 2.5218280497938395e-03</internalNodes>\n          <leafValues>\n            -1.7564930021762848e-01 -6.9197070598602295e-01\n            6.9476373493671417e-02 6.7932087182998657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1752 1.5097549557685852e-01 -1 2 1753\n            4.3899910524487495e-03 -2 -3 1754 9.9906846880912781e-03</internalNodes>\n          <leafValues>\n            4.6142420172691345e-01 4.2842838913202286e-02\n            -4.2551028728485107e-01 3.2834030687808990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1755 -2.1895440295338631e-02 -1 2 1756\n            -7.6050527393817902e-02 -2 -3 1757 -9.6018705517053604e-03</internalNodes>\n          <leafValues>\n            -4.7627368569374084e-01 -3.6348098516464233e-01\n            2.4625270068645477e-01 -1.4736860059201717e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1758 6.1576829466503114e-05 -1 2 1759\n            -2.2094589658081532e-03 -2 -3 1760 -1.3034399598836899e-02</internalNodes>\n          <leafValues>\n            -1.2972380220890045e-01 3.2342359423637390e-01\n            4.9937328696250916e-01 -1.3894359767436981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1761 -2.0411429926753044e-02 2 -1 1762\n            -6.8360187113285065e-02 -2 -3 1763 -4.1714729741215706e-03</internalNodes>\n          <leafValues>\n            -4.5825520157814026e-01 -5.3202010691165924e-02\n            -3.3815470337867737e-01 2.8209799528121948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1764 -2.2963550873100758e-03 -1 2 1765\n            -7.3422670364379883e-02 -2 -3 1766 3.5119321197271347e-02</internalNodes>\n          <leafValues>\n            -8.7558113038539886e-02 5.8385127782821655e-01\n            -7.8373529016971588e-02 5.2284508943557739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1767 -2.3843089584261179e-03 2 -1 1768\n            5.8223021915182471e-04 -2 -3 1769 5.1109357737004757e-03</internalNodes>\n          <leafValues>\n            -3.6075130105018616e-01 2.1036569774150848e-01\n            -1.9436909258365631e-01 1.3681420683860779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1770 -6.9154787342995405e-04 2 -1 1771\n            -5.5549171520397067e-04 -2 -3 1772 -7.5950571335852146e-03</internalNodes>\n          <leafValues>\n            -2.3962910473346710e-01 -1.0858660191297531e-01\n            -9.1398581862449646e-02 2.7578109502792358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1773 2.8131629806011915e-03 -1 2 1774\n            -4.5272540301084518e-02 -2 -3 1775 -2.6697120629251003e-03</internalNodes>\n          <leafValues>\n            -7.3745496571063995e-02 3.9891231060028076e-01\n            3.7440070509910583e-01 -2.5978609919548035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1776 -1.0849219746887684e-02 0 -1 1777\n            -1.6776850447058678e-02 -2 -3 1778 -1.9630219787359238e-02</internalNodes>\n          <leafValues>\n            -6.7678660154342651e-01 -4.9237858504056931e-02\n            -4.7865530848503113e-01 2.2300049662590027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1779 7.0901170372962952e-02 -1 2 1780\n            7.0403231075033545e-04 -2 -3 1781 3.3363080583512783e-03</internalNodes>\n          <leafValues>\n            -2.8926369547843933e-01 -5.3575031459331512e-02\n            -8.7073008762672544e-04 4.0888670086860657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1782 9.3207405880093575e-03 2 -1 1783\n            1.1512059718370438e-02 -2 -3 1784 -1.8639869813341647e-04</internalNodes>\n          <leafValues>\n            -5.3399091958999634e-01 -5.2177387475967407e-01\n            -1.1254069954156876e-01 1.3096989691257477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1785 1.5442570438608527e-03 -1 2 1786\n            2.5775749236345291e-03 -2 -3 1787 -1.2664040550589561e-03</internalNodes>\n          <leafValues>\n            -8.3666101098060608e-02 3.2544130086898804e-01\n            3.0370441079139709e-01 -2.6052421331405640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1788 3.2941689714789391e-03 -1 2 1789\n            -2.3375200107693672e-03 -2 -3 1790 -7.7096500899642706e-04</internalNodes>\n          <leafValues>\n            2.1506890654563904e-01 1.9738529622554779e-01\n            6.9986172020435333e-02 -1.9839569926261902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1791 -2.7190460241399705e-04 -1 2 1792\n            2.7237389236688614e-02 -2 -3 1793 -1.5080779790878296e-02</internalNodes>\n          <leafValues>\n            8.3213888108730316e-02 -2.8429448604583740e-01\n            6.8940150737762451e-01 -5.7628151029348373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1794 -6.5730936825275421e-02 -1 2 1795\n            -7.4283648282289505e-03 -2 -3 1796 3.4652319736778736e-03</internalNodes>\n          <leafValues>\n            -5.2482831478118896e-01 3.9523449540138245e-01\n            -7.3690779507160187e-02 2.0800660550594330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1797 -1.2613019905984402e-02 2 -1 1798\n            2.3288120329380035e-01 -2 -3 1799 2.1903509274125099e-02</internalNodes>\n          <leafValues>\n            -6.8893492221832275e-01 7.0790272951126099e-01\n            -7.7761108987033367e-03 8.4372210502624512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1800 1.0629750322550535e-03 -1 2 1801\n            1.8193929281551391e-04 -2 -3 1802 1.4717869926244020e-03</internalNodes>\n          <leafValues>\n            -3.4246420860290527e-01 1.0657790303230286e-01\n            -3.1970989704132080e-01 7.0577569305896759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1803 7.5306659564375877e-03 0 -1 1804\n            1.7505730502307415e-03 -2 -3 1805 3.8401300553232431e-03</internalNodes>\n          <leafValues>\n            -1.5460279583930969e-01 2.1335080265998840e-01\n            2.3800070583820343e-01 -4.1055840253829956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1806 -2.5041550397872925e-01 0 -1 1807\n            -2.0444789528846741e-01 -2 -3 1808 -1.2383040040731430e-02</internalNodes>\n          <leafValues>\n            -3.7927308678627014e-01 4.9870368838310242e-01\n            4.6343478560447693e-01 -6.7613303661346436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1809 1.9026029622182250e-03 0 -1 1810\n            -1.6705439984798431e-01 -2 -3 1811 -8.6937591433525085e-02</internalNodes>\n          <leafValues>\n            3.5356861352920532e-01 -2.4803459644317627e-01\n            -5.6781381368637085e-01 1.0121189802885056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1812 -1.0314949788153172e-02 2 -1 1813\n            4.5044738799333572e-03 -2 -3 1814 1.5172120183706284e-02</internalNodes>\n          <leafValues>\n            -5.2530448883771896e-02 -9.0071156620979309e-02\n            7.1758699417114258e-01 -3.7740949541330338e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1815 -5.6233601644635201e-03 2 -1 1816\n            5.4567858576774597e-02 -2 -3 1817 9.7008212469518185e-04</internalNodes>\n          <leafValues>\n            2.3325720429420471e-01 4.8646458983421326e-01\n            -2.4600529670715332e-01 2.4224309250712395e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1818 -2.7179729659110308e-03 2 -1 1819\n            -2.0419640466570854e-02 -2 -3 1820 -3.3307760953903198e-02</internalNodes>\n          <leafValues>\n            -5.3633391857147217e-01 -1.1361650191247463e-02\n            6.7398411035537720e-01 -1.4063489437103271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1821 -2.5500180199742317e-02 -1 2 1822\n            -4.0629908442497253e-02 -2 -3 1823 -9.0600941330194473e-03</internalNodes>\n          <leafValues>\n            -3.6177828907966614e-01 -5.4579132795333862e-01\n            5.2202242612838745e-01 2.2736469283699989e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1824 -2.5635668635368347e-01 2 -1 1825\n            -9.5340751111507416e-02 -2 -3 1826 -5.9463721700012684e-03</internalNodes>\n          <leafValues>\n            -8.3328348398208618e-01 -1.6835439950227737e-02\n            5.6909567117691040e-01 -2.4973009526729584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1827 -9.2139927437528968e-04 0 -1 1828\n            -6.8437340669333935e-03 -2 -3 1829 -8.2487165927886963e-03</internalNodes>\n          <leafValues>\n            -3.6735090613365173e-01 1.6015109419822693e-01\n            5.2686601877212524e-01 -1.5151239931583405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1830 4.7555859200656414e-03 2 -1 1831\n            9.3567231670022011e-04 -2 -3 1832 -6.3907768344506621e-04</internalNodes>\n          <leafValues>\n            -4.2700308561325073e-01 1.7327770590782166e-01\n            1.3155570626258850e-01 -1.8646000325679779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1833 -5.6550311855971813e-03 -1 2 1834\n            -1.2212459929287434e-02 -2 -3 1835 -1.0550339706242085e-02</internalNodes>\n          <leafValues>\n            3.1297039985656738e-01 4.6750861406326294e-01\n            -2.4461230635643005e-01 1.6502030193805695e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1836 -7.5216998811811209e-04 2 -1 1837\n            3.0214080470614135e-04 -2 -3 1838 2.8510420816019177e-04</internalNodes>\n          <leafValues>\n            -1.0075300186872482e-01 -2.8865608572959900e-01\n            -1.1844499967992306e-02 3.6691731214523315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1839 -4.4020009227097034e-03 2 -1 1840\n            3.5568218678236008e-02 -2 -3 1841 6.4601990743540227e-05</internalNodes>\n          <leafValues>\n            -7.7167138457298279e-02 -4.4335851073265076e-01\n            1.3781660236418247e-02 4.5319119095802307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1842 9.3313469551503658e-04 -1 2 1843\n            -8.7838143110275269e-02 -2 -3 1844 2.8037109877914190e-03</internalNodes>\n          <leafValues>\n            -1.2059070169925690e-01 -4.6736609935760498e-01\n            7.1518830955028534e-02 4.4593128561973572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1845 2.3915059864521027e-03 2 -1 1846\n            -1.8183189677074552e-03 -2 -3 1847 1.9244100258219987e-04</internalNodes>\n          <leafValues>\n            -3.3277919888496399e-01 9.1478407382965088e-02\n            4.9121279269456863e-02 -4.5266890525817871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1848 2.1789909899234772e-01 -1 2 1849\n            1.0331439552828670e-03 -2 -3 1850 -1.4138330519199371e-01</internalNodes>\n          <leafValues>\n            7.4892401695251465e-01 -1.0637000203132629e-01\n            -4.2974629998207092e-01 1.6179689764976501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1851 -5.9106688946485519e-02 2 -1 1852\n            7.8279376029968262e-03 -2 -3 1853 -3.1304039293900132e-04</internalNodes>\n          <leafValues>\n            -4.0774118900299072e-01 3.9237990975379944e-01\n            1.3964369893074036e-01 -9.7562357783317566e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1854 -6.4937800168991089e-02 -1 2 1855\n            -2.1739810705184937e-01 -2 -3 1856 -2.0257150754332542e-02</internalNodes>\n          <leafValues>\n            2.2590440511703491e-01 -3.4484180808067322e-01\n            2.4723629653453827e-01 -6.6609263420104980e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1857 -1.1548499576747417e-02 0 -1 1858\n            -6.7811407148838043e-02 -2 -3 1859 -3.4953389316797256e-02</internalNodes>\n          <leafValues>\n            1.9427110254764557e-01 -5.8727997541427612e-01\n            7.8955358266830444e-01 1.5297190286219120e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1860 -1.7180469632148743e-01 2 -1 1861\n            -2.5918710161931813e-04 -2 -3 1862 1.2741640210151672e-02</internalNodes>\n          <leafValues>\n            -2.9612448811531067e-01 1.0281720012426376e-01\n            -3.0702060461044312e-01 2.1692450344562531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1863 -3.1258590519428253e-02 2 -1 1864\n            3.5533700138330460e-03 -2 -3 1865 -9.2502118786796927e-04</internalNodes>\n          <leafValues>\n            5.7348787784576416e-01 5.0475007295608521e-01\n            -2.6686659455299377e-01 9.2138834297657013e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1866 -1.2170480331405997e-03 -1 2 1867\n            -2.2023949772119522e-02 -2 -3 1868 2.9549229890108109e-02</internalNodes>\n          <leafValues>\n            -3.9172619581222534e-01 2.0690579712390900e-01\n            -6.0358341783285141e-02 6.9752788543701172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1869 -7.2058511432260275e-04 0 -1 1870\n            -2.5625678896903992e-01 -2 -3 1871 3.2817238569259644e-01</internalNodes>\n          <leafValues>\n            -3.3763760328292847e-01 5.7221870869398117e-02\n            1.8268160521984100e-02 4.5866298675537109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1872 -5.2478950470685959e-02 -1 2 1873\n            -7.2261072695255280e-02 -2 -3 1874 -1.0751239955425262e-02</internalNodes>\n          <leafValues>\n            -3.7492391467094421e-01 5.6878948211669922e-01\n            -3.2823160290718079e-01 5.0447538495063782e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>43</maxWeakCount>\n      <stageThreshold>-1.1713529825210571e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 1875 -3.6475598812103271e-02 0 -1 1876\n            1.2570239603519440e-02 -2 -3 1877 -5.3332238458096981e-03</internalNodes>\n          <leafValues>\n            7.8855842351913452e-01 -5.8355428278446198e-02\n            6.4850552007555962e-03 -3.8411408662796021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1878 -3.8449079729616642e-03 0 -1 1879\n            1.8065240001305938e-03 -2 -3 1880 4.4460720382630825e-03</internalNodes>\n          <leafValues>\n            -8.8380120694637299e-02 6.6356122493743896e-01\n            -2.2651070356369019e-01 1.2168529629707336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1881 -1.5441340208053589e-01 2 -1 1882\n            2.8965979814529419e-02 -2 -3 1883 -1.8112070858478546e-02</internalNodes>\n          <leafValues>\n            -1.7789100110530853e-01 3.8929471373558044e-01\n            4.2137289047241211e-01 -2.0651680231094360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1884 -3.0437670648097992e-03 -1 2 1885\n            -2.7257429901510477e-03 -2 -3 1886 -1.5535579994320869e-02</internalNodes>\n          <leafValues>\n            -4.5531120896339417e-01 2.5576180219650269e-01\n            2.9463219642639160e-01 -1.2572860717773438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1887 -1.4182399958372116e-02 -1 2 1888\n            2.8875279240310192e-03 -2 -3 1889 1.9505630480125546e-03</internalNodes>\n          <leafValues>\n            -4.7841429710388184e-01 -1.4739120006561279e-01\n            -1.1689100414514542e-02 3.8708359003067017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1890 -4.1997907683253288e-03 0 -1 1891\n            -1.2343189679086208e-02 -2 -3 1892 -6.5799211151897907e-03</internalNodes>\n          <leafValues>\n            2.1066769957542419e-01 -2.4238829314708710e-01\n            -4.1709339618682861e-01 1.9089350104331970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1893 2.0319439936429262e-03 -1 2 1894\n            -2.2653149440884590e-02 -2 -3 1895 -2.4583860067650676e-04</internalNodes>\n          <leafValues>\n            2.7525109052658081e-01 6.1857348680496216e-01\n            -3.7903881072998047e-01 -1.9395859912037849e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1896 -1.1686830548569560e-03 -1 2 1897\n            3.6638419260270894e-04 -2 -3 1898 -5.7184919569408521e-05</internalNodes>\n          <leafValues>\n            1.3913659751415253e-01 -2.6073169708251953e-01\n            3.0361440777778625e-01 -1.7147840559482574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1899 -2.3458409123122692e-03 0 -1 1900\n            -7.0121302269399166e-03 -2 -3 1901 2.3318149149417877e-02</internalNodes>\n          <leafValues>\n            1.7510280013084412e-01 -1.7132690548896790e-01\n            2.2869640588760376e-01 -3.7544658780097961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1902 2.7293559163808823e-02 -1 2 1903\n            -7.4272030033171177e-03 -2 -3 1904 -7.8977271914482117e-03</internalNodes>\n          <leafValues>\n            -2.8686890006065369e-01 -6.9167411327362061e-01\n            -4.1576528549194336e-01 1.0694450139999390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1905 -3.6563118919730186e-03 2 -1 1906\n            1.5060990117490292e-03 -2 -3 1907 -2.2211389616131783e-02</internalNodes>\n          <leafValues>\n            -4.2580971121788025e-01 2.3827329277992249e-01\n            -6.2818527221679688e-01 -1.2995249591767788e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1908 -1.0182500118389726e-03 0 -1 1909\n            2.7624370530247688e-02 -2 -3 1910 -3.0267149209976196e-02</internalNodes>\n          <leafValues>\n            2.0952360332012177e-01 -3.9603650569915771e-01\n            -2.9257088899612427e-01 1.6949739307165146e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1911 8.2686528563499451e-02 2 -1 1912\n            6.4655147492885590e-02 -2 -3 1913 2.7647409588098526e-03</internalNodes>\n          <leafValues>\n            3.3863779902458191e-01 6.1647278070449829e-01\n            -1.4266699552536011e-01 1.2386939674615860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1914 -3.1129099428653717e-02 2 -1 1915\n            -1.5587930101901293e-03 -2 -3 1916 -5.9767777565866709e-04</internalNodes>\n          <leafValues>\n            -3.7931808829307556e-01 -9.2908859252929688e-02\n            -1.0530649870634079e-01 2.9945549368858337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1917 -5.0103079527616501e-02 2 -1 1918\n            2.5710230693221092e-02 -2 -3 1919 -8.8613387197256088e-04</internalNodes>\n          <leafValues>\n            -4.4678428769111633e-01 -4.3549379706382751e-01\n            2.0978139340877533e-01 -3.8637928664684296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1920 -6.0174837708473206e-03 2 -1 1921\n            6.2055201269686222e-03 -2 -3 1922 2.7212419081479311e-04</internalNodes>\n          <leafValues>\n            2.9752719402313232e-01 6.6692227125167847e-01\n            2.1671950817108154e-02 -2.7139788866043091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1923 -1.3685439713299274e-02 -1 2 1924\n            -6.1648458242416382e-01 -2 -3 1925 -2.6253409683704376e-02</internalNodes>\n          <leafValues>\n            4.7005081176757812e-01 -5.2666938304901123e-01\n            1.3483020663261414e-01 -1.0639149695634842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1926 -4.1545720887370408e-04 0 -1 1927\n            -3.6237420863471925e-04 -2 -3 1928 5.5113807320594788e-04</internalNodes>\n          <leafValues>\n            -1.8588809669017792e-01 5.2727550268173218e-01\n            4.5380011200904846e-02 -2.3133419454097748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1929 -3.1878859736025333e-03 0 -1 1930\n            -6.2446491792798042e-03 -2 -3 1931 -2.1054609678685665e-03</internalNodes>\n          <leafValues>\n            2.8475400805473328e-01 -4.0583759546279907e-01\n            2.6000189781188965e-01 -1.6356609761714935e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1932 2.2513020667247474e-04 2 -1 1933\n            -5.1745050586760044e-03 -2 -3 1934 -2.7152549009770155e-03</internalNodes>\n          <leafValues>\n            -1.8777419626712799e-01 1.2812760472297668e-01\n            3.4431490302085876e-01 -4.2658099532127380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1935 2.7846530079841614e-02 2 -1 1936\n            4.3891910463571548e-03 -2 -3 1937 1.9749049097299576e-03</internalNodes>\n          <leafValues>\n            -2.8553798794746399e-01 6.4455038309097290e-01\n            -8.2864962518215179e-02 1.7122590541839600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1938 -3.1317298999056220e-04 -1 2 1939\n            -1.5486280433833599e-02 -2 -3 1940 9.5049021765589714e-03</internalNodes>\n          <leafValues>\n            -1.2443479895591736e-01 -1.8395289778709412e-01\n            3.4495291113853455e-01 -2.0286519080400467e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1941 -3.7190609145909548e-04 0 -1 1942\n            2.9666710179299116e-03 -2 -3 1943 -5.8068940415978432e-03</internalNodes>\n          <leafValues>\n            4.3022842146456242e-03 -3.4436589479446411e-01\n            -8.4134072065353394e-01 2.8392368555068970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 1944 -5.5204080417752266e-03 0 -1 1945\n            -1.3792069512419403e-04 -2 -3 1946 -3.7187319248914719e-02</internalNodes>\n          <leafValues>\n            -2.6300218701362610e-01 2.6706520467996597e-02\n            -2.9245018959045410e-01 4.0641939640045166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1947 -5.0016207387670875e-04 -1 2 1948\n            -1.5453010564669967e-03 -2 -3 1949 1.9056679448112845e-03</internalNodes>\n          <leafValues>\n            -1.1965669691562653e-01 -4.2565101385116577e-01\n            2.9724061489105225e-01 -4.7963049262762070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1950 7.2636879049241543e-03 2 -1 1951\n            1.9141070079058409e-03 -2 -3 1952 1.2875479296781123e-04</internalNodes>\n          <leafValues>\n            -6.4583316445350647e-02 -3.5147330164909363e-01\n            1.1196230351924896e-01 5.7284992933273315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1953 -1.0092630051076412e-02 -1 2 1954\n            -7.8368087997660041e-04 -2 -3 1955 -9.8703950643539429e-03</internalNodes>\n          <leafValues>\n            -3.7826448678970337e-01 2.3288239538669586e-01\n            2.1510779857635498e-01 -1.2697519361972809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1956 -1.0650960030034184e-03 -1 2 1957\n            8.5762650996912271e-05 -2 -3 1958 8.1163638969883323e-04</internalNodes>\n          <leafValues>\n            -3.2178428769111633e-01 -8.8832110166549683e-02\n            3.0365571379661560e-01 -8.3779007196426392e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1959 -4.8947618342936039e-03 2 -1 1960\n            5.5883510503917933e-04 -2 -3 1961 -1.9008320523425937e-03</internalNodes>\n          <leafValues>\n            1.6282820701599121e-01 -2.5395259261131287e-01\n            -1.3888220489025116e-01 2.9919460415840149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1962 -2.0215269178152084e-03 0 -1 1963\n            -4.4383360072970390e-03 -2 -3 1964 6.8489909172058105e-02</internalNodes>\n          <leafValues>\n            3.9251059293746948e-01 -4.3069578707218170e-02\n            2.4472021032124758e-03 -2.9618039727210999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1965 5.0306279212236404e-02 2 -1 1966\n            -5.6435600854456425e-03 -2 -3 1967 -8.9875478297472000e-03</internalNodes>\n          <leafValues>\n            4.2249730229377747e-01 -9.2901676893234253e-02\n            6.6785961389541626e-01 6.2985196709632874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1968 -7.9090101644396782e-04 0 -1 1969\n            -2.5300959125161171e-02 -2 -3 1970 7.8745762584730983e-04</internalNodes>\n          <leafValues>\n            3.0849850177764893e-01 -6.3608251512050629e-02\n            -1.4883120357990265e-01 2.6234000921249390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1971 7.6404176652431488e-02 -1 2 1972\n            -7.9231243580579758e-03 -2 -3 1973 1.9256339874118567e-03</internalNodes>\n          <leafValues>\n            -4.5977321267127991e-01 -3.9364838600158691e-01\n            -6.4516498241573572e-04 2.8573459386825562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1974 3.3896900713443756e-03 -1 2 1975\n            2.6566439191810787e-04 -2 -3 1976 -7.0364158600568771e-03</internalNodes>\n          <leafValues>\n            -4.1618600487709045e-01 8.7239697575569153e-02\n            5.4902660846710205e-01 -3.1658211350440979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1977 2.7734860777854919e-02 -1 2 1978\n            3.3155460841953754e-03 -2 -3 1979 5.4807748645544052e-02</internalNodes>\n          <leafValues>\n            3.5683360695838928e-01 2.0545400679111481e-02\n            -3.7979850172996521e-01 8.2199662923812866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1980 -3.1911249971017241e-04 -1 2 1981\n            -2.3244849580805749e-04 -2 -3 1982 2.4389199912548065e-02</internalNodes>\n          <leafValues>\n            2.3498380184173584e-01 1.5976969897747040e-01\n            -1.6952790319919586e-01 3.8837739825248718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1983 3.7521280348300934e-02 -1 2 1984\n            5.3981738165020943e-04 -2 -3 1985 -1.1914219940081239e-03</internalNodes>\n          <leafValues>\n            -5.3004390001296997e-01 -9.2949196696281433e-02\n            2.5772979855537415e-01 -1.2804870307445526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1986 -1.9628699868917465e-02 2 -1 1987\n            -2.6430340949445963e-03 -2 -3 1988 -1.0492499917745590e-02</internalNodes>\n          <leafValues>\n            -4.5749071240425110e-01 -6.6639073193073273e-02\n            3.7817710638046265e-01 -7.0677888579666615e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1989 -8.1244978355243802e-04 2 -1 1990\n            1.4308369718492031e-02 -2 -3 1991 -2.6346129016019404e-04</internalNodes>\n          <leafValues>\n            7.1544222533702850e-02 -4.6973049640655518e-01\n            3.2926559448242188e-01 -2.3322540521621704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1992 9.5907926559448242e-02 -1 2 1993\n            -1.2872040271759033e-01 -2 -3 1994 -3.1911451369524002e-02</internalNodes>\n          <leafValues>\n            9.9990457296371460e-01 5.7599371671676636e-01\n            -7.3348528146743774e-01 -1.8063450232148170e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1995 3.7128551048226655e-04 0 -1 1996\n            -2.8491979464888573e-03 -2 -3 1997 -4.2754760943353176e-04</internalNodes>\n          <leafValues>\n            -5.4329651594161987e-01 1.0755009949207306e-01\n            2.2071920335292816e-01 -2.6160699129104614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 1998 9.7452866612002254e-05 0 -1 1999\n            5.2659702487289906e-04 -2 -3 2000 5.9415772557258606e-04</internalNodes>\n          <leafValues>\n            -2.0488780736923218e-01 3.1935650110244751e-01\n            1.5211449563503265e-01 -2.8799989819526672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2001 -2.1307960560079664e-04 -1 2 2002\n            -1.2103560147807002e-03 -2 -3 2003 1.2572610285133123e-03</internalNodes>\n          <leafValues>\n            1.5206280350685120e-01 -2.3918260633945465e-01\n            3.7353378534317017e-01 -8.1597693264484406e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>46</maxWeakCount>\n      <stageThreshold>-1.0940879583358765e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 2 2004 -3.1007960438728333e-02 0 -1 2005\n            -3.1969440169632435e-03 -2 -3 2006 -2.0676921121776104e-03</internalNodes>\n          <leafValues>\n            6.8854278326034546e-01 -5.4836649447679520e-02\n            -3.5974439978599548e-01 -3.0973760411143303e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2007 -1.1122719943523407e-01 2 -1 2008\n            1.4844049699604511e-02 -2 -3 2009 -3.4631208982318640e-03</internalNodes>\n          <leafValues>\n            -1.5703879296779633e-01 -2.0413580536842346e-01\n            6.6245990991592407e-01 1.5534339845180511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2010 -1.2320470064878464e-01 2 -1 2011\n            1.1103290133178234e-02 -2 -3 2012 4.7404197975993156e-03</internalNodes>\n          <leafValues>\n            -5.2760660648345947e-01 -4.7932231426239014e-01\n            -1.0074780136346817e-01 1.6249769926071167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2013 -5.8416109532117844e-03 0 -1 2014\n            -5.1666028797626495e-02 -2 -3 2015 -3.9447061717510223e-03</internalNodes>\n          <leafValues>\n            -3.7591809034347534e-01 3.7338769435882568e-01\n            2.4347339570522308e-01 -1.4522999525070190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2016 -3.6320939660072327e-02 -1 2 2017\n            3.7123491056263447e-03 -2 -3 2018 -2.8242779895663261e-02</internalNodes>\n          <leafValues>\n            -3.6804199218750000e-01 1.0094779729843140e-01\n            4.2476901412010193e-01 -4.3828350305557251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2019 -2.0250169560313225e-02 0 -1 2020\n            3.0780840665102005e-02 -2 -3 2021 2.5205970741808414e-03</internalNodes>\n          <leafValues>\n            1.6355019807815552e-01 -6.3770228624343872e-01\n            -1.9899259507656097e-01 3.1258741021156311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2022 -4.2486261576414108e-02 2 -1 2023\n            3.0256640166044235e-02 -2 -3 2024 1.2559810420498252e-03</internalNodes>\n          <leafValues>\n            -6.1104768514633179e-01 7.7699762582778931e-01\n            6.8223267793655396e-02 -1.8402789533138275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2025 -1.8111230805516243e-02 2 -1 2026\n            -7.0966721978038549e-04 -2 -3 2027 2.0517550874501467e-03</internalNodes>\n          <leafValues>\n            3.7390831112861633e-01 7.1673221886157990e-02\n            -2.3723709583282471e-01 4.2304378747940063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2028 -6.6939830780029297e-02 -1 2 2029\n            -8.4355175495147705e-03 -2 -3 2030 -7.6646007597446442e-02</internalNodes>\n          <leafValues>\n            -6.4464849233627319e-01 -5.9667718410491943e-01\n            -3.5360890626907349e-01 7.6701030135154724e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2031 -1.8152770353481174e-03 -1 2 2032\n            -2.7247369289398193e-03 -2 -3 2033 -5.4963980801403522e-04</internalNodes>\n          <leafValues>\n            1.7099569737911224e-01 1.6262990236282349e-01\n            -4.4764471054077148e-01 -7.4255913496017456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2034 -4.1336409747600555e-02 -1 2 2035\n            -1.2627179920673370e-01 -2 -3 2036 -4.9632410518825054e-03</internalNodes>\n          <leafValues>\n            -3.0079290270805359e-01 -2.1949230134487152e-01\n            3.1715381145477295e-01 1.6522889956831932e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2037 -6.8255789577960968e-02 2 -1 2038\n            1.7256699502468109e-02 -2 -3 2039 1.8318969523534179e-03</internalNodes>\n          <leafValues>\n            3.7629279494285583e-01 6.0703051090240479e-01\n            4.4839300215244293e-02 -1.8284620344638824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2040 6.2703560106456280e-03 2 -1 2041\n            6.4142688643187284e-04 -2 -3 2042 -1.2087869690731168e-03</internalNodes>\n          <leafValues>\n            1.5012329816818237e-01 -2.4387939274311066e-01\n            -9.6486136317253113e-02 4.5252281427383423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2043 -1.3087630271911621e-02 0 -1 2044\n            -2.0685649942606688e-03 -2 -3 2045 -9.9608547985553741e-02</internalNodes>\n          <leafValues>\n            3.4508320689201355e-01 -4.1232489049434662e-02\n            -5.4945659637451172e-01 -5.1996659487485886e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2046 -3.6486559547483921e-03 0 -1 2047\n            -2.8182850219309330e-03 -2 -3 2048 5.5368460714817047e-02</internalNodes>\n          <leafValues>\n            -3.3460721373558044e-01 1.5438309311866760e-01\n            -2.0008920133113861e-01 2.6830759644508362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2049 -7.4223391711711884e-03 2 -1 2050\n            -4.4916807673871517e-03 -2 -3 2051 -6.0621831566095352e-02</internalNodes>\n          <leafValues>\n            -2.5990688800811768e-01 9.8559968173503876e-02\n            -3.5481810569763184e-01 4.1711899638175964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2052 2.3197410337161273e-04 0 -1 2053\n            -2.6323291240260005e-04 -2 -3 2054 1.8173559510614723e-04</internalNodes>\n          <leafValues>\n            1.1800730228424072e-01 -1.8469020724296570e-01\n            3.3645889163017273e-01 -1.6443650424480438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2055 -4.3080520117655396e-04 0 -1 2056\n            8.4635447710752487e-03 -2 -3 2057 3.2700230367481709e-03</internalNodes>\n          <leafValues>\n            -3.5056531429290771e-01 3.3979919552803040e-01\n            -1.9305050373077393e-01 1.0525429993867874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2058 1.2329599820077419e-02 0 -1 2059\n            3.2368130632676184e-04 -2 -3 2060 -7.1359151042997837e-03</internalNodes>\n          <leafValues>\n            -7.0782758295536041e-02 4.2691200971603394e-01\n            2.4507419764995575e-01 -1.1304569989442825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2061 -3.8914520293474197e-02 2 -1 2062\n            6.6584121668711305e-04 -2 -3 2063 -9.3276530969887972e-04</internalNodes>\n          <leafValues>\n            -4.1401219367980957e-01 -1.2954230606555939e-01\n            -2.8715679422020912e-02 2.9640379548072815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2064 9.1005821013823152e-04 0 -1 2065\n            7.4173710308969021e-03 -2 -3 2066 -5.9348379727452993e-04</internalNodes>\n          <leafValues>\n            1.5225520357489586e-02 5.1878088712692261e-01\n            6.3158690929412842e-02 -1.6790659725666046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2067 -1.6713090008124709e-03 2 -1 2068\n            -3.2247399212792516e-04 -2 -3 2069 -3.3846818841993809e-03</internalNodes>\n          <leafValues>\n            1.8846319615840912e-01 -2.2796130180358887e-01\n            3.0563241243362427e-01 -8.1067040562629700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2070 9.5189079642295837e-02 2 -1 2071\n            9.7679207101464272e-04 -2 -3 2072 -1.0893770307302475e-01</internalNodes>\n          <leafValues>\n            1.9821229577064514e-01 1.4671079814434052e-01\n            -6.9909930229187012e-01 -1.1488740146160126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2073 -1.7448779195547104e-02 0 -1 2074\n            -9.9434393632691354e-05 -2 -3 2075 6.4250029623508453e-02</internalNodes>\n          <leafValues>\n            2.4062860012054443e-01 -8.9487351477146149e-02\n            -1.7152050137519836e-01 5.1314127445220947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2076 5.9518171474337578e-03 -1 2 2077\n            -9.0886192629113793e-04 -2 -3 2078 -5.1080051343888044e-04</internalNodes>\n          <leafValues>\n            2.3301599919795990e-01 5.8810569345951080e-02\n            -5.0240808725357056e-01 -8.0962918698787689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2079 -1.5467169694602489e-02 2 -1 2080\n            2.3221820592880249e-02 -2 -3 2081 3.9248089888133109e-04</internalNodes>\n          <leafValues>\n            -4.4010490179061890e-01 5.1546990871429443e-01\n            -5.2290290594100952e-02 2.1555709838867188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2082 -1.1872940231114626e-03 -1 2 2083\n            -1.1692909756675363e-03 -2 -3 2084 -1.8374159699305892e-03</internalNodes>\n          <leafValues>\n            2.8682470321655273e-01 3.9871171116828918e-01\n            -2.4273440241813660e-01 2.5974079966545105e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2085 -3.9783148095011711e-03 2 -1 2086\n            -4.7793678822927177e-04 -2 -3 2087 5.3964089602231979e-04</internalNodes>\n          <leafValues>\n            -2.5224199891090393e-01 1.0499279946088791e-01\n            -4.1497600078582764e-01 1.0635569691658020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2088 -4.2262359056621790e-04 -1 2 2089\n            -1.0138460248708725e-01 -2 -3 2090 -9.2142065986990929e-03</internalNodes>\n          <leafValues>\n            2.1089179813861847e-01 -9.3101882934570312e-01\n            -8.2452338933944702e-01 -2.4682279676198959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2091 4.3104309588670731e-02 -1 2 2092\n            -5.3224200382828712e-03 -2 -3 2093 3.7746389862149954e-03</internalNodes>\n          <leafValues>\n            9.0424752235412598e-01 -2.7320840954780579e-01\n            -2.9543019831180573e-02 2.7356389164924622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2094 2.3850500583648682e-02 -1 2 2095\n            -8.8544972240924835e-03 -2 -3 2096 -1.3691160082817078e-01</internalNodes>\n          <leafValues>\n            -5.1007378101348877e-01 4.8890089988708496e-01\n            -5.5362242460250854e-01 2.5062739849090576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2097 -2.5274729356169701e-02 2 -1 2098\n            2.6481070090085268e-03 -2 -3 2099 -2.0161429711151868e-04</internalNodes>\n          <leafValues>\n            -7.3669922351837158e-01 2.6283189654350281e-01\n            -2.4148160219192505e-01 5.1645949482917786e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2100 -1.1898370459675789e-02 -1 2 2101\n            -1.9360600272193551e-03 -2 -3 2102 2.1037699189037085e-03</internalNodes>\n          <leafValues>\n            -6.3804662227630615e-01 3.9121028780937195e-01\n            -5.2923560142517090e-02 2.3925469815731049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2103 -1.3646620325744152e-02 -1 2 2104\n            -8.8408291339874268e-03 -2 -3 2105 3.7220980972051620e-02</internalNodes>\n          <leafValues>\n            4.5531919598579407e-01 -5.2776831388473511e-01\n            -5.2423689514398575e-02 2.1479150652885437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2106 -4.2580282315611839e-03 0 -1 2107\n            -4.6129771508276463e-03 -2 -3 2108 5.9317899867892265e-03</internalNodes>\n          <leafValues>\n            -5.8091402053833008e-01 9.2666886746883392e-02\n            -6.7499437136575580e-04 3.6766529083251953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2109 9.4187082722783089e-03 -1 2 2110\n            -4.1941772215068340e-03 -2 -3 2111 5.1073678769171238e-03</internalNodes>\n          <leafValues>\n            -6.1342322826385498e-01 -3.8310700654983521e-01\n            6.7254997789859772e-02 -3.9773949980735779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2112 -5.5304579436779022e-03 2 -1 2113\n            -6.0295849107205868e-04 -2 -3 2114 -7.0414398796856403e-03</internalNodes>\n          <leafValues>\n            -1.2926359474658966e-01 1.8724639713764191e-01\n            4.7651541233062744e-01 -2.3238509893417358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2115 -1.3096419861540198e-03 2 -1 2116\n            3.2035118783824146e-04 -2 -3 2117 -3.3677490428090096e-03</internalNodes>\n          <leafValues>\n            -8.3683609962463379e-02 4.4803410768508911e-01\n            2.6184868812561035e-01 -2.1176619827747345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2118 -1.3419929891824722e-02 2 -1 2119\n            4.5043388381600380e-03 -2 -3 2120 -7.8677892452105880e-04</internalNodes>\n          <leafValues>\n            -5.1725488901138306e-01 -2.4854829907417297e-01\n            2.2026860713958740e-01 -2.9989460483193398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2121 -4.0467849373817444e-01 -1 2 2122\n            -1.6472050547599792e-01 -2 -3 2123 -4.3211959302425385e-02</internalNodes>\n          <leafValues>\n            -8.6876207590103149e-01 -2.6331049203872681e-01\n            -1.2996859848499298e-01 1.2739099562168121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2124 -1.7417479539290071e-03 2 -1 2125\n            -8.3949731197208166e-04 -2 -3 2126 1.5101189492270350e-03</internalNodes>\n          <leafValues>\n            8.2801252603530884e-02 -3.8465818762779236e-01\n            1.3933099806308746e-01 -3.5602769255638123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2127 3.6241519264876842e-03 2 -1 2128\n            1.6943299851845950e-04 -2 -3 2129 -5.5435068905353546e-02</internalNodes>\n          <leafValues>\n            2.3847030103206635e-01 5.6582901626825333e-02\n            8.5272318124771118e-01 -1.9084540009498596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2130 -2.3511620238423347e-02 2 -1 2131\n            -2.2539960627909750e-04 -2 -3 2132 1.6610369086265564e-02</internalNodes>\n          <leafValues>\n            -1.3226120173931122e-01 -2.0941901020705700e-03\n            4.0792500972747803e-01 -2.9247689247131348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2133 -6.3177421689033508e-03 -1 2 2134\n            8.5653591668233275e-04 -2 -3 2135 -1.1638339608907700e-02</internalNodes>\n          <leafValues>\n            2.4937899410724640e-01 -1.5689609944820404e-01\n            4.2693111300468445e-01 -1.3493919745087624e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2136 -5.1630330272018909e-03 2 -1 2137\n            4.8902099952101707e-03 -2 -3 2138 -2.9903270304203033e-02</internalNodes>\n          <leafValues>\n            2.8233599662780762e-01 -2.2749769687652588e-01\n            -3.1318700313568115e-01 7.2451077401638031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2139 3.1764109735377133e-04 -1 2 2140\n            5.2735407371073961e-04 -2 -3 2141 3.4350980422459543e-04</internalNodes>\n          <leafValues>\n            -1.3494649529457092e-01 -9.4839558005332947e-02\n            -2.8737118840217590e-01 2.6408618688583374e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>47</maxWeakCount>\n      <stageThreshold>-1.1282010078430176e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 2142 2.0928289741277695e-03 2 -1 2143\n            -2.0667549222707748e-02 -2 -3 2144 4.1186730377376080e-03</internalNodes>\n          <leafValues>\n            -2.4059830605983734e-01 -8.3949699997901917e-02\n            7.5294119119644165e-01 -2.5010040402412415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2145 -7.7038057148456573e-02 0 -1 2146\n            6.8526387214660645e-02 -2 -3 2147 -9.1197844594717026e-03</internalNodes>\n          <leafValues>\n            -1.6047920286655426e-01 5.8060508966445923e-01\n            4.0888330340385437e-01 -2.3711539804935455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2148 3.8453419692814350e-03 0 -1 2149\n            -4.0648199617862701e-02 -2 -3 2150 -3.5154789686203003e-02</internalNodes>\n          <leafValues>\n            -3.6227381229400635e-01 2.8189870715141296e-01\n            -6.3932722806930542e-01 -8.8311180472373962e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2151 1.7193749547004700e-02 -1 2 2152\n            -3.1834539026021957e-02 -2 -3 2153 5.9677828103303909e-03</internalNodes>\n          <leafValues>\n            2.1619839966297150e-01 -6.1106377840042114e-01\n            -1.3163220137357712e-03 -6.7810398340225220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2154 1.7432730237487704e-04 -1 2 2155\n            -1.0427909903228283e-02 -2 -3 2156 -1.4324070070870221e-04</internalNodes>\n          <leafValues>\n            -1.6660380363464355e-01 3.0099079012870789e-01\n            -3.6957770586013794e-01 7.5943082571029663e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2157 -1.0312269441783428e-03 -1 2 2158\n            -8.9528188109397888e-03 -2 -3 2159 5.4365568794310093e-03</internalNodes>\n          <leafValues>\n            -8.3984650671482086e-02 3.3358749747276306e-01\n            -2.5666850805282593e-01 3.6911809444427490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2160 2.0321870688349009e-03 2 -1 2161\n            1.9954480230808258e-03 -2 -3 2162 1.6922239214181900e-02</internalNodes>\n          <leafValues>\n            -1.1628130078315735e-01 -2.2477209568023682e-01\n            3.6504098773002625e-01 1.8671670928597450e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2163 -1.4152450021356344e-03 0 -1 2164\n            8.0416322452947497e-04 -2 -3 2165 6.2191791832447052e-02</internalNodes>\n          <leafValues>\n            -4.4372379779815674e-02 2.6297140121459961e-01\n            -1.4997449517250061e-01 5.6759977340698242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2166 -4.4721928425133228e-03 -1 2 2167\n            -1.9247440621256828e-02 -2 -3 2168 5.2884127944707870e-03</internalNodes>\n          <leafValues>\n            -2.9525101184844971e-01 -7.0941370725631714e-01\n            4.9494709819555283e-03 3.6569160223007202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2169 9.1529808938503265e-02 -1 2 2170\n            -3.9309188723564148e-02 -2 -3 2171 -6.9177672266960144e-02</internalNodes>\n          <leafValues>\n            -4.7588708996772766e-01 -4.9558719992637634e-01\n            7.8180468082427979e-01 3.5177771002054214e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2172 1.9501270726323128e-02 -1 2 2173\n            -5.4460992105305195e-03 -2 -3 2174 1.0495989583432674e-02</internalNodes>\n          <leafValues>\n            4.5107740163803101e-01 9.5154292881488800e-02\n            -1.6815499961376190e-01 5.1015657186508179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2175 5.7117962278425694e-03 -1 2 2176\n            -2.7439638972282410e-01 -2 -3 2177 -4.5373341999948025e-03</internalNodes>\n          <leafValues>\n            -7.4655741453170776e-01 -6.0310351848602295e-01\n            2.3245190083980560e-01 -4.1262548416852951e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2178 4.7711891238577664e-04 -1 2 2179\n            -6.9821202196180820e-03 -2 -3 2180 -1.0556570291519165e+00</internalNodes>\n          <leafValues>\n            -1.5402629971504211e-01 -5.2603191137313843e-01\n            -5.0477248430252075e-01 1.4896139502525330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2181 -1.7868630588054657e-01 -1 2 2182\n            9.6028903499245644e-05 -2 -3 2183 1.4864769764244556e-03</internalNodes>\n          <leafValues>\n            6.1333847045898438e-01 -1.2570370733737946e-01\n            1.5855489671230316e-01 -3.2419750094413757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2184 -2.7532540843822062e-04 0 -1 2185\n            1.9395699491724372e-03 -2 -3 2186 -3.0006670858711004e-03</internalNodes>\n          <leafValues>\n            2.2301700711250305e-01 -1.4492830634117126e-01\n            2.5364619493484497e-01 -1.9060049951076508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2187 2.6949180755764246e-03 0 -1 2188\n            -2.7354890480637550e-02 -2 -3 2189 -2.6278549805283546e-02</internalNodes>\n          <leafValues>\n            -6.9697231054306030e-01 2.6986810564994812e-01\n            8.3400028944015503e-01 -8.1475183367729187e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2190 -1.1615309631451964e-03 -1 2 2191\n            -7.9284235835075378e-03 -2 -3 2192 -4.0769609622657299e-03</internalNodes>\n          <leafValues>\n            9.9186070263385773e-02 2.9844290018081665e-01\n            1.1436840146780014e-01 -3.5259690880775452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2193 1.3272130163386464e-03 0 -1 2194\n            9.6542192623019218e-03 -2 -3 2195 -1.8561830511316657e-03</internalNodes>\n          <leafValues>\n            1.8691679835319519e-01 -3.3289530873298645e-01\n            -4.8549610376358032e-01 -4.0883861482143402e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2196 8.5922293365001678e-02 -1 2 2197\n            -8.8873326778411865e-02 -2 -3 2198 -2.7235411107540131e-03</internalNodes>\n          <leafValues>\n            3.6382618546485901e-01 -3.3766660094261169e-01\n            2.4199460446834564e-01 -4.2081810534000397e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2199 -1.3049770146608353e-02 2 -1 2200\n            -3.2052190508693457e-03 -2 -3 2201 -3.4975090529769659e-03</internalNodes>\n          <leafValues>\n            -3.0092039704322815e-01 -1.0076750069856644e-01\n            -4.0278410911560059e-01 1.7511740326881409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2202 3.6366239655762911e-03 0 -1 2203\n            -1.1586080305278301e-02 -2 -3 2204 3.9760980871506035e-04</internalNodes>\n          <leafValues>\n            1.7796489596366882e-01 -1.6348969936370850e-01\n            6.7020449787378311e-03 4.4130641222000122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2205 -2.5880750268697739e-02 2 -1 2206\n            1.0445900261402130e-03 -2 -3 2207 -4.7445381060242653e-03</internalNodes>\n          <leafValues>\n            6.0719907283782959e-01 -3.2216680049896240e-01\n            1.8654330074787140e-01 -5.8600809425115585e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2208 7.0085371844470501e-03 -1 2 2209\n            -7.0238402113318443e-03 -2 -3 2210 8.1113204360008240e-03</internalNodes>\n          <leafValues>\n            3.1219249963760376e-01 -4.7851589322090149e-01\n            -1.1469169706106186e-01 1.4005890488624573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2211 -4.0908880531787872e-02 0 -1 2212\n            6.7115128040313721e-03 -2 -3 2213 4.7661857679486275e-03</internalNodes>\n          <leafValues>\n            1.1935690045356750e-01 -4.9553608894348145e-01\n            2.9291590908542275e-04 3.0523601174354553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2214 8.2969013601541519e-03 0 -1 2215\n            -1.4058559900149703e-03 -2 -3 2216 3.8165580481290817e-03</internalNodes>\n          <leafValues>\n            3.8395699858665466e-01 -5.8064288459718227e-03\n            8.5270447016227990e-05 -3.1768730282783508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2217 -1.5988849103450775e-02 2 -1 2218\n            -4.2525809258222580e-02 -2 -3 2219 1.0341469943523407e-01</internalNodes>\n          <leafValues>\n            5.8605968952178955e-01 1.5200969763100147e-02\n            -4.2698180675506592e-01 9.1076821088790894e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2220 1.5279020590241998e-04 -1 2 2221\n            4.4353670091368258e-04 -2 -3 2222 -2.1845809533260763e-04</internalNodes>\n          <leafValues>\n            -1.8349540233612061e-01 1.8386720120906830e-01\n            -3.0458870530128479e-01 9.6679449081420898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2223 -6.9333161227405071e-03 2 -1 2224\n            2.6824630796909332e-02 -2 -3 2225 2.8827119618654251e-02</internalNodes>\n          <leafValues>\n            1.9829869270324707e-01 5.7704108953475952e-01\n            -1.3593469560146332e-01 1.8093059957027435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2226 3.4493818879127502e-02 -1 2 2227\n            -3.9107841439545155e-03 -2 -3 2228 2.0955900254193693e-04</internalNodes>\n          <leafValues>\n            2.7782711386680603e-01 1.0099980235099792e-01\n            -1.6889050602912903e-02 -3.4672379493713379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2229 -1.1503810063004494e-02 0 -1 2230\n            -5.8503649197518826e-03 -2 -3 2231 -1.9477239402476698e-04</internalNodes>\n          <leafValues>\n            2.9069650173187256e-01 -5.7935047149658203e-01\n            -1.5547400712966919e-01 8.7707668542861938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2232 -2.4192599812522531e-04 0 -1 2233\n            -8.7722227908670902e-04 -2 -3 2234 -8.8649448007345200e-03</internalNodes>\n          <leafValues>\n            -4.9958980083465576e-01 2.2867499291896820e-01\n            1.4817740023136139e-01 -1.4039020240306854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2235 6.6976482048630714e-03 2 -1 2236\n            1.6602370305918157e-04 -2 -3 2237 5.6860040873289108e-02</internalNodes>\n          <leafValues>\n            -1.7738009989261627e-01 2.5650730729103088e-01\n            1.7361199483275414e-02 -7.4021261930465698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2238 2.4098889902234077e-02 2 -1 2239\n            8.0347352195531130e-04 -2 -3 2240 6.9724403321743011e-02</internalNodes>\n          <leafValues>\n            -5.3940677642822266e-01 1.4385139942169189e-01\n            -1.0675229877233505e-01 5.4217422008514404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2241 9.0714782709255815e-04 -1 2 2242\n            -7.3141716711688787e-05 -2 -3 2243 -1.5573799610137939e-03</internalNodes>\n          <leafValues>\n            2.4376200139522552e-01 7.3325037956237793e-02\n            4.9846198409795761e-02 -3.1094640493392944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2244 -1.3867990113794804e-02 -1 2 2245\n            1.1202249443158507e-03 -2 -3 2246 -3.7206329405307770e-02</internalNodes>\n          <leafValues>\n            -6.6426891088485718e-01 7.0658437907695770e-02\n            4.2091751098632812e-01 -2.5585201382637024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2247 -4.2576639680191875e-04 0 -1 2248\n            5.4934259504079819e-02 -2 -3 2249 9.6833100542426109e-04</internalNodes>\n          <leafValues>\n            -3.0530530214309692e-01 2.7118149399757385e-01\n            -6.7041292786598206e-02 1.7276880145072937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2250 7.9393703490495682e-03 -1 2 2251\n            5.0757948309183121e-02 -2 -3 2252 -3.2133560627698898e-02</internalNodes>\n          <leafValues>\n            -5.3697269409894943e-02 4.0109890699386597e-01\n            4.3551141023635864e-01 -4.1936281323432922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2253 9.9633932113647461e-02 -1 2 2254\n            -4.5324079692363739e-03 -2 -3 2255 7.6392642222344875e-04</internalNodes>\n          <leafValues>\n            -6.1999887228012085e-01 1.6984449326992035e-01\n            1.0533300042152405e-01 -2.1900549530982971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2256 -1.3120270334184170e-02 2 -1 2257\n            -1.2095270212739706e-03 -2 -3 2258 -6.0685798525810242e-03</internalNodes>\n          <leafValues>\n            -5.1372468471527100e-02 -1.2173540145158768e-01\n            -3.2418820261955261e-01 6.5560877323150635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2259 -4.4329889118671417e-02 -1 2 2260\n            -1.1334549635648727e-02 -2 -3 2261 -9.7028171876445413e-04</internalNodes>\n          <leafValues>\n            -2.6503491401672363e-01 -7.6205557584762573e-01\n            -9.5501512289047241e-02 1.5263360738754272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2262 -8.4918709471821785e-03 -1 2 2263\n            -6.9846503436565399e-02 -2 -3 2264 9.2466361820697784e-02</internalNodes>\n          <leafValues>\n            1.9973739981651306e-01 3.1325021386146545e-01\n            -1.1733359843492508e-01 7.7850347757339478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2265 -9.5799759030342102e-02 2 -1 2266\n            5.1276460289955139e-03 -2 -3 2267 6.1059608124196529e-03</internalNodes>\n          <leafValues>\n            7.8442037105560303e-01 1.5389220416545868e-01\n            -1.3577620685100555e-01 2.1575249731540680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2268 -5.5722601246088743e-04 0 -1 2269\n            5.2772291004657745e-02 -2 -3 2270 -3.7010889500379562e-03</internalNodes>\n          <leafValues>\n            -1.3534410297870636e-01 2.9378059506416321e-01\n            -1.7292410135269165e-01 2.3805269598960876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2271 -1.3051830464974046e-03 -1 2 2272\n            -4.0903348475694656e-02 -2 -3 2273 -6.3687269575893879e-03</internalNodes>\n          <leafValues>\n            -5.5020369589328766e-02 -3.0940970778465271e-01\n            6.5783101320266724e-01 9.2643633484840393e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2274 1.4673050027340651e-03 0 -1 2275\n            5.3080540150403976e-02 -2 -3 2276 4.5696222223341465e-03</internalNodes>\n          <leafValues>\n            1.1342869699001312e-01 -3.8801661133766174e-01\n            8.7235711514949799e-02 -5.5333012342453003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2277 2.7171480469405651e-03 0 -1 2278\n            -7.5547560118138790e-03 -2 -3 2279 2.1428259788081050e-04</internalNodes>\n          <leafValues>\n            4.6386051177978516e-01 2.2095510736107826e-02\n            -1.7482960224151611e-01 1.6784119606018066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2280 1.1644139885902405e-03 0 -1 2281\n            2.7417868841439486e-03 -2 -3 2282 5.1555588841438293e-02</internalNodes>\n          <leafValues>\n            -3.0654639005661011e-01 5.7464569807052612e-02\n            1.3891890645027161e-01 -4.4362550973892212e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>46</maxWeakCount>\n      <stageThreshold>-1.0841189622879028e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 2283 -1.9345199689269066e-03 -1 2 2284\n            5.4789008572697639e-03 -2 -3 2285 1.3723999727517366e-03</internalNodes>\n          <leafValues>\n            -2.9038429260253906e-01 -4.9600031226873398e-02\n            8.1412100791931152e-01 -4.1888630390167236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2286 2.6495110243558884e-02 0 -1 2287\n            -1.3697579503059387e-01 -2 -3 2288 -3.0566600617021322e-04</internalNodes>\n          <leafValues>\n            2.4463020265102386e-01 -1.4825659990310669e-01\n            6.5781980752944946e-01 -7.9236596822738647e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2289 -1.9925139844417572e-02 -1 2 2290\n            -1.3427959382534027e-01 -2 -3 2291 -1.0180550161749125e-03</internalNodes>\n          <leafValues>\n            -7.2399538755416870e-01 5.6490647792816162e-01\n            1.0791130363941193e-01 -1.4493170380592346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2292 -1.6956209437921643e-03 0 -1 2293\n            -3.9232008159160614e-02 -2 -3 2294 -1.1985700111836195e-03</internalNodes>\n          <leafValues>\n            2.0442679524421692e-01 -2.2484399378299713e-01\n            -9.8312400281429291e-02 2.5217679142951965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2295 5.6637298315763474e-02 -1 2 2296\n            -1.4088810421526432e-02 -2 -3 2297 1.9742019474506378e-02</internalNodes>\n          <leafValues>\n            4.2156541347503662e-01 -5.4424422979354858e-01\n            -4.3038509786128998e-02 3.9660850167274475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2298 -3.7790019065141678e-02 -1 2 2299\n            -2.1278490126132965e-01 -2 -3 2300 -7.5766840018332005e-04</internalNodes>\n          <leafValues>\n            -5.3746891021728516e-01 2.9742780327796936e-01\n            -1.7239089310169220e-01 9.4371169805526733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2301 1.0515520116314292e-03 -1 2 2302\n            -4.6967338770627975e-02 -2 -3 2303 -6.6702580079436302e-03</internalNodes>\n          <leafValues>\n            -9.4606198370456696e-02 3.8049909472465515e-01\n            -3.6735290288925171e-01 1.8134810030460358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2304 -8.8434442877769470e-03 -1 2 2305\n            -7.5162857770919800e-02 -2 -3 2306 6.0678281442960724e-05</internalNodes>\n          <leafValues>\n            1.9733619689941406e-01 2.8719368577003479e-01\n            -2.1481469273567200e-01 4.5404769480228424e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2307 -2.6157319545745850e-02 -1 2 2308\n            -2.5265390053391457e-02 -2 -3 2309 -5.3271669894456863e-03</internalNodes>\n          <leafValues>\n            -5.9915411472320557e-01 -3.2973399758338928e-01\n            4.3388798832893372e-01 1.2896250002086163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2310 -4.6350698918104172e-02 2 -1 2311\n            8.5780251538380980e-04 -2 -3 2312 8.7990947067737579e-03</internalNodes>\n          <leafValues>\n            -4.4396370649337769e-01 -1.0408560186624527e-01\n            2.6796650141477585e-02 3.4592410922050476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2313 -8.6540228221565485e-04 0 -1 2314\n            1.4915770152583718e-03 -2 -3 2315 -1.7994260415434837e-02</internalNodes>\n          <leafValues>\n            -3.0356478691101074e-01 2.4568190798163414e-02\n            -3.6277890205383301e-01 2.3864120244979858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2316 3.1142059713602066e-02 -1 2 2317\n            -1.3936620205640793e-02 -2 -3 2318 -2.1907410700805485e-04</internalNodes>\n          <leafValues>\n            3.8710731267929077e-01 5.2351367473602295e-01\n            -1.7730639874935150e-01 5.4297018796205521e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2319 -1.5399450203403831e-03 0 -1 2320\n            2.0680578891187906e-03 -2 -3 2321 6.5148430876433849e-03</internalNodes>\n          <leafValues>\n            -1.2532320618629456e-01 1.5583939850330353e-01\n            2.7854940295219421e-01 -6.9196671247482300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2322 3.9056401699781418e-02 2 -1 2323\n            -4.0204878896474838e-03 -2 -3 2324 2.9492459725588560e-03</internalNodes>\n          <leafValues>\n            -4.3681609630584717e-01 8.3736188709735870e-02\n            -2.3137259483337402e-01 5.8771818876266479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2325 4.0582148358225822e-03 0 -1 2326\n            5.4531730711460114e-02 -2 -3 2327 2.4824589490890503e-03</internalNodes>\n          <leafValues>\n            2.7056580781936646e-01 -3.6512500047683716e-01\n            -2.2614318877458572e-03 3.5627979040145874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2328 -4.5967500656843185e-02 -1 2 2329\n            -7.7245971187949181e-03 -2 -3 2330 1.0509139858186245e-02</internalNodes>\n          <leafValues>\n            -3.6472341418266296e-01 -3.5956159234046936e-01\n            -1.1801080545410514e-03 2.6658898591995239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2331 2.7509370818734169e-02 0 -1 2332\n            -3.8485318422317505e-02 -2 -3 2333 8.4051601588726044e-03</internalNodes>\n          <leafValues>\n            -5.8312857151031494e-01 2.4421650171279907e-01\n            -1.2067990005016327e-01 2.0528540015220642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2334 -4.0405229665338993e-03 0 -1 2335\n            1.5476900443900377e-04 -2 -3 2336 2.4814540665829554e-05</internalNodes>\n          <leafValues>\n            3.1298181414604187e-01 -2.5597780942916870e-01\n            -2.2016249597072601e-01 5.4762478917837143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2337 -2.0571500062942505e-03 0 -1 2338\n            -2.5400029495358467e-02 -2 -3 2339 -9.7940629348158836e-04</internalNodes>\n          <leafValues>\n            1.5875819325447083e-01 -2.5695261359214783e-01\n            -4.8633909225463867e-01 1.3700939714908600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2340 2.1806131117045879e-03 2 -1 2341\n            -3.5455688834190369e-02 -2 -3 2342 7.0310868322849274e-03</internalNodes>\n          <leafValues>\n            -1.5206259489059448e-01 2.2079099714756012e-01\n            -1.0352379828691483e-01 7.8391069173812866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2343 -1.9015279831364751e-03 0 -1 2344\n            -2.7523210272192955e-02 -2 -3 2345 1.1140380054712296e-02</internalNodes>\n          <leafValues>\n            2.2670629620552063e-01 -1.4048579335212708e-01\n            3.8015339523553848e-02 4.5577189326286316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2346 -1.4077059924602509e-02 -1 2 2347\n            -7.5063481926918030e-03 -2 -3 2348 3.4938179887831211e-03</internalNodes>\n          <leafValues>\n            -3.4491220116615295e-01 2.4528980255126953e-01\n            -1.3371880352497101e-01 1.5036830306053162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2349 5.0538990646600723e-02 -1 2 2350\n            5.9616268845275044e-04 -2 -3 2351 -2.0425749942660332e-02</internalNodes>\n          <leafValues>\n            3.9677879214286804e-01 -1.6664770245552063e-01\n            -3.4699028730392456e-01 1.3850739598274231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2352 -5.2063791081309319e-03 -1 2 2353\n            -7.5247389031574130e-04 -2 -3 2354 -5.4832808673381805e-02</internalNodes>\n          <leafValues>\n            -3.6672219634056091e-01 -2.6418569684028625e-01\n            2.7295270562171936e-01 -3.5999810788780451e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2355 1.7384309321641922e-02 0 -1 2356\n            8.1398971378803253e-03 -2 -3 2357 5.3603048436343670e-03</internalNodes>\n          <leafValues>\n            -9.5032609999179840e-02 3.2227438688278198e-01\n            -1.8586769700050354e-02 4.8577728867530823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2358 -6.7889019846916199e-03 -1 2 2359\n            -2.6219699066132307e-04 -2 -3 2360 -6.3086668960750103e-03</internalNodes>\n          <leafValues>\n            4.3564158678054810e-01 -1.8974490463733673e-01\n            -3.2145148515701294e-01 9.9988803267478943e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2361 -7.5333809945732355e-04 -1 2 2362\n            -5.1618018187582493e-04 -2 -3 2363 4.9971960484981537e-02</internalNodes>\n          <leafValues>\n            -6.4324781298637390e-02 4.0329611301422119e-01\n            -1.0619989782571793e-01 7.8842008113861084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2364 -1.6776630282402039e-01 2 -1 2365\n            1.5873169759288430e-03 -2 -3 2366 -1.5413289656862617e-03</internalNodes>\n          <leafValues>\n            8.3238917589187622e-01 -1.4161799848079681e-01\n            -1.1225470155477524e-01 2.1630200743675232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2367 -6.0930051840841770e-03 0 -1 2368\n            1.2093319557607174e-02 -2 -3 2369 -1.0354000143706799e-02</internalNodes>\n          <leafValues>\n            2.8332099318504333e-01 -7.5473171472549438e-01\n            3.1173440814018250e-01 -8.3147212862968445e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2370 -2.2508190572261810e-01 0 -1 2371\n            -3.9419779181480408e-01 -2 -3 2372 -7.0281741209328175e-03</internalNodes>\n          <leafValues>\n            7.2753679752349854e-01 -4.7205528616905212e-01\n            2.6742509007453918e-01 -2.3675439879298210e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2373 -1.0977389663457870e-01 -1 2 2374\n            -1.8981259316205978e-02 -2 -3 2375 -1.5975029673427343e-03</internalNodes>\n          <leafValues>\n            3.2995739579200745e-01 -4.1107800602912903e-01\n            3.9100599288940430e-01 -3.0054800212383270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2376 3.3699660561978817e-03 0 -1 2377\n            2.8608400374650955e-02 -2 -3 2378 1.1234980076551437e-02</internalNodes>\n          <leafValues>\n            -2.6757821440696716e-01 5.4922807216644287e-01\n            7.9798206686973572e-02 -4.9347519874572754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2379 1.0005270130932331e-02 0 -1 2380\n            -1.3333059847354889e-01 -2 -3 2381 1.0838189627975225e-03</internalNodes>\n          <leafValues>\n            4.3375509977340698e-01 1.4595700427889824e-02\n            9.0088322758674622e-03 -2.6673930883407593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2382 1.8866240279749036e-03 2 -1 2383\n            -1.9594319164752960e-02 -2 -3 2384 -4.0433141402900219e-03</internalNodes>\n          <leafValues>\n            1.6358950734138489e-01 2.3428240790963173e-02\n            1.8105390667915344e-01 -3.7628519535064697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2385 -1.3283960521221161e-01 0 -1 2386\n            3.8986348954495043e-05 -2 -3 2387 3.0710658757016063e-04</internalNodes>\n          <leafValues>\n            -4.7917541116476059e-02 5.7672798633575439e-01\n            -1.0200879722833633e-01 1.3613240420818329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2388 -4.0010150521993637e-02 -1 2 2389\n            -1.1752990540117025e-03 -2 -3 2390 -4.5838830992579460e-03</internalNodes>\n          <leafValues>\n            7.0342528820037842e-01 1.1457219719886780e-01\n            7.0621937513351440e-02 -2.1597090363502502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2391 5.3299739956855774e-02 2 -1 2392\n            1.9961010664701462e-02 -2 -3 2393 -1.4994270168244839e-02</internalNodes>\n          <leafValues>\n            -1.6445639729499817e-01 4.0419510006904602e-01\n            -4.9861040711402893e-01 6.1822768300771713e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2394 4.2854552157223225e-03 -1 2 2395\n            -1.3991270214319229e-02 -2 -3 2396 9.9598374217748642e-03</internalNodes>\n          <leafValues>\n            -7.2749477624893188e-01 1.5665039420127869e-01\n            -1.2152709811925888e-01 2.4375760555267334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2397 -6.1463691294193268e-02 2 -1 2398\n            8.1084080738946795e-04 -2 -3 2399 1.4836339978501201e-03</internalNodes>\n          <leafValues>\n            -4.9159640073776245e-01 4.0312820672988892e-01\n            5.2907239645719528e-02 -2.0971420407295227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2400 2.8651900356635451e-04 2 -1 2401\n            -4.9405667232349515e-04 -2 -3 2402 -1.3786340132355690e-03</internalNodes>\n          <leafValues>\n            -5.8905839920043945e-02 3.8144549727439880e-01\n            -4.4638028740882874e-01 4.1437059640884399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2403 9.0396329760551453e-03 2 -1 2404\n            1.5593219723086804e-04 -2 -3 2405 -1.1492449790239334e-02</internalNodes>\n          <leafValues>\n            -5.8979207277297974e-01 1.4469850063323975e-01\n            -6.2305951118469238e-01 -2.8079420328140259e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2406 -1.0058670304715633e-02 -1 2 2407\n            2.8506040107458830e-03 -2 -3 2408 -1.0550140403211117e-02</internalNodes>\n          <leafValues>\n            1.3063749670982361e-01 -1.5896910429000854e-01\n            -5.8578401803970337e-01 4.1516658663749695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2409 -2.6834249496459961e-02 -1 2 2410\n            -6.7446259781718254e-03 -2 -3 2411 -1.9539019558578730e-03</internalNodes>\n          <leafValues>\n            -2.3982690274715424e-01 -3.0731248855590820e-01\n            2.6545688509941101e-01 -2.7655568555928767e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2412 -1.5296439826488495e-01 0 -1 2413\n            1.3547400012612343e-02 -2 -3 2414 4.4966558925807476e-03</internalNodes>\n          <leafValues>\n            5.4796701669692993e-01 7.3741371743381023e-03\n            -3.9956450928002596e-04 -3.4183570742607117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2415 -9.6259176731109619e-02 2 -1 2416\n            6.0006431303918362e-03 -2 -3 2417 4.8557221889495850e-03</internalNodes>\n          <leafValues>\n            -3.4981849789619446e-01 4.8977410793304443e-01\n            9.2725560069084167e-02 -1.3060179352760315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2418 -1.2333790073171258e-03 0 -1 2419\n            -4.2365258559584618e-04 -2 -3 2420 8.3003565669059753e-03</internalNodes>\n          <leafValues>\n            2.4704679846763611e-01 -3.9149808883666992e-01\n            9.2340186238288879e-03 4.0348419547080994e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>-1.1084890365600586e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            2 1 2421 2.8592639137059450e-03 0 -1 2422\n            -1.5535679645836353e-02 -2 -3 2423 -2.3885839618742466e-03</internalNodes>\n          <leafValues>\n            8.2635468244552612e-01 2.2793740034103394e-02\n            6.7295722663402557e-02 -3.1476849317550659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2424 1.4029210433363914e-03 -1 2 2425\n            -4.5515298843383789e-03 -2 -3 2426 9.4592738896608353e-03</internalNodes>\n          <leafValues>\n            -1.0290689766407013e-01 -3.2368329167366028e-01\n            5.4250991344451904e-01 -3.0348530411720276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2427 5.4062008857727051e-03 -1 2 2428\n            -2.6852379087358713e-03 -2 -3 2429 -6.2019047618377954e-05</internalNodes>\n          <leafValues>\n            -2.8486549854278564e-01 2.6024919748306274e-01\n            1.6827000677585602e-01 -2.3859730362892151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2430 2.4147080257534981e-02 -1 2 2431\n            1.3977369526401162e-03 -2 -3 2432 2.0164279267191887e-02</internalNodes>\n          <leafValues>\n            4.8240968585014343e-01 -3.6230188608169556e-01\n            -3.6146581172943115e-02 5.0473397970199585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2433 -6.1244291067123413e-01 2 -1 2434\n            9.0631619095802307e-03 -2 -3 2435 1.7811909317970276e-01</internalNodes>\n          <leafValues>\n            -4.8220318555831909e-01 -5.7859402894973755e-01\n            8.5012361407279968e-02 -6.3362121582031250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2436 2.6881069061346352e-04 -1 2 2437\n            -1.2180560268461704e-02 -2 -3 2438 4.0606390684843063e-03</internalNodes>\n          <leafValues>\n            -1.6075380146503448e-01 -6.5734118223190308e-01\n            5.4012559354305267e-02 4.9817681312561035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2439 -3.6952861119061708e-03 -1 2 2440\n            -6.8888221867382526e-03 -2 -3 2441 2.7258940972387791e-03</internalNodes>\n          <leafValues>\n            -2.9826200008392334e-01 6.1437392234802246e-01\n            -8.3065047860145569e-02 1.8066459894180298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2442 9.8391417413949966e-03 0 -1 2443\n            1.4573390362784266e-03 -2 -3 2444 -2.3016060004010797e-04</internalNodes>\n          <leafValues>\n            -4.8802070319652557e-02 2.9650750756263733e-01\n            8.3583436906337738e-02 -2.4457779526710510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2445 -1.3347089989110827e-03 0 -1 2446\n            -2.3516249656677246e-01 -2 -3 2447 -3.1839110888540745e-03</internalNodes>\n          <leafValues>\n            -3.9780059456825256e-01 2.9200470447540283e-01\n            1.5484599769115448e-01 -1.3911180198192596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2448 -5.9498839080333710e-02 2 -1 2449\n            2.9865070246160030e-04 -2 -3 2450 -2.1592311095446348e-03</internalNodes>\n          <leafValues>\n            -8.0241578817367554e-01 -1.7932119965553284e-01\n            -1.9703079760074615e-01 1.5901389718055725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2451 -8.7727643549442291e-02 -1 2 2452\n            1.8073969986289740e-03 -2 -3 2453 -3.0411710031330585e-04</internalNodes>\n          <leafValues>\n            2.3391810059547424e-01 -1.9777239859104156e-01\n            -2.2787599265575409e-01 2.3480290174484253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2454 -3.6778930574655533e-02 -1 2 2455\n            -8.4806662052869797e-03 -2 -3 2456 4.4526819139719009e-02</internalNodes>\n          <leafValues>\n            6.3471937179565430e-01 3.4320148825645447e-01\n            -3.2206610776484013e-03 -3.3057790994644165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2457 -1.1732319835573435e-03 0 -1 2458\n            1.4339870540425181e-03 -2 -3 2459 7.7017117291688919e-04</internalNodes>\n          <leafValues>\n            -3.2894629240036011e-01 2.6812461018562317e-01\n            1.5722079575061798e-01 -1.2080919742584229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2460 5.0579622620716691e-04 -1 2 2461\n            -1.6109919548034668e-01 -2 -3 2462 -9.3872181605547667e-04</internalNodes>\n          <leafValues>\n            1.6917209327220917e-01 5.4838567972183228e-01\n            1.3432510197162628e-01 -1.8490299582481384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2463 1.0552279651165009e-02 2 -1 2464\n            4.1157208383083344e-02 -2 -3 2465 -1.3245060108602047e-03</internalNodes>\n          <leafValues>\n            -4.0745589137077332e-01 7.5326120853424072e-01\n            -1.1372119933366776e-01 1.1744459718465805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2466 -7.3126708157360554e-03 -1 2 2467\n            -1.5847360715270042e-02 -2 -3 2468 -5.2730008028447628e-03</internalNodes>\n          <leafValues>\n            -7.3187656700611115e-02 -4.7248768806457520e-01\n            -3.9433181285858154e-01 3.2054188847541809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2469 -1.0163930244743824e-02 -1 2 2470\n            -1.4269599691033363e-02 -2 -3 2471 -2.8677590307779610e-04</internalNodes>\n          <leafValues>\n            -5.2099817991256714e-01 4.4472008943557739e-01\n            1.0787820070981979e-01 -1.3239330053329468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2472 -4.4711050577461720e-04 0 -1 2473\n            6.9207558408379555e-03 -2 -3 2474 -4.7490649740211666e-04</internalNodes>\n          <leafValues>\n            -2.1184509992599487e-01 7.1038311719894409e-01\n            -9.0368412435054779e-02 1.9339320063591003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2475 -1.4192230068147182e-02 -1 2 2476\n            -5.9010402765125036e-04 -2 -3 2477 2.2904858924448490e-03</internalNodes>\n          <leafValues>\n            -3.8774991035461426e-01 4.2241969704627991e-01\n            -8.0403536558151245e-02 1.7335900664329529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2478 -2.5104399770498276e-02 -1 2 2479\n            -9.7052762284874916e-03 -2 -3 2480 2.7441041311249137e-04</internalNodes>\n          <leafValues>\n            -6.0312938690185547e-01 -6.5721738338470459e-01\n            -5.2042860537767410e-02 1.8078009784221649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2481 -2.6883379905484617e-04 -1 2 2482\n            8.5731758736073971e-04 -2 -3 2483 -7.1471570990979671e-03</internalNodes>\n          <leafValues>\n            1.8486160039901733e-01 3.6701809614896774e-02\n            3.8019171357154846e-01 -3.1314790248870850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2484 -5.9650279581546783e-03 2 -1 2485\n            6.5897651948034763e-03 -2 -3 2486 5.0898519111797214e-04</internalNodes>\n          <leafValues>\n            -3.7518349289894104e-01 2.1948930621147156e-01\n            5.8855868875980377e-02 -2.6831701397895813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2487 -1.9406380131840706e-02 2 -1 2488\n            1.0682499967515469e-02 -2 -3 2489 5.9157088398933411e-03</internalNodes>\n          <leafValues>\n            -4.0213540196418762e-01 6.6164708137512207e-01\n            3.6718819290399551e-02 -4.7886928915977478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2490 -4.9229031428694725e-03 -1 2 2491\n            -1.2417170219123363e-02 -2 -3 2492 5.5979369208216667e-03</internalNodes>\n          <leafValues>\n            2.2026430070400238e-01 -4.9814000725746155e-01\n            -4.0141601115465164e-02 7.9332500696182251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2493 -1.8435899913311005e-01 2 -1 2494\n            6.4280577003955841e-02 -2 -3 2495 -1.6670690383762121e-03</internalNodes>\n          <leafValues>\n            8.2392162084579468e-01 -5.1533687114715576e-01\n            -5.7897537946701050e-01 3.1020650640130043e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2496 4.7475788742303848e-02 2 -1 2497\n            2.5915699079632759e-03 -2 -3 2498 -6.8349228240549564e-04</internalNodes>\n          <leafValues>\n            1.5852110087871552e-01 -2.8132149577140808e-01\n            -8.4496207535266876e-02 3.4085351228713989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2499 -8.0965347588062286e-03 2 -1 2500\n            2.0750269293785095e-02 -2 -3 2501 2.0832920563407242e-04</internalNodes>\n          <leafValues>\n            6.4384061098098755e-01 4.5479089021682739e-01\n            -1.0736659914255142e-01 1.3257840275764465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2502 -3.6361071397550404e-04 -1 2 2503\n            -6.1230720020830631e-03 -2 -3 2504 -4.2420169338583946e-03</internalNodes>\n          <leafValues>\n            1.8995989859104156e-01 -5.5252599716186523e-01\n            2.9558050632476807e-01 -7.1881696581840515e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2505 -3.2453850144520402e-04 2 -1 2506\n            1.2140260078012943e-02 -2 -3 2507 -1.8192020070273429e-04</internalNodes>\n          <leafValues>\n            -2.1697629988193512e-01 -3.1753998994827271e-01\n            -1.1777029931545258e-01 1.7208409309387207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2508 -3.0392920598387718e-03 2 -1 2509\n            2.8347579063847661e-04 -2 -3 2510 -2.0839450880885124e-03</internalNodes>\n          <leafValues>\n            1.8131990730762482e-01 1.4752319455146790e-01\n            1.2602719664573669e-01 -2.3448009788990021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            2 1 2511 -1.5735890716314316e-02 0 -1 2512\n            -5.9783339500427246e-02 -2 -3 2513 8.1148296594619751e-02</internalNodes>\n          <leafValues>\n            -3.7624269723892212e-01 1.0452839732170105e-01\n            -4.6331068873405457e-01 1.4930450357496738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2514 5.8228247798979282e-03 2 -1 2515\n            -5.7364261010661721e-04 -2 -3 2516 -3.6678448668681085e-04</internalNodes>\n          <leafValues>\n            -7.1261131763458252e-01 -3.9293140172958374e-02\n            -1.0198889672756195e-01 4.7379100322723389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2517 -9.1290572891011834e-04 0 -1 2518\n            1.2561770156025887e-02 -2 -3 2519 -7.6223909854888916e-04</internalNodes>\n          <leafValues>\n            3.5364340990781784e-02 4.8163351416587830e-01\n            4.6516609191894531e-01 -1.5139210224151611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2520 1.8540889723226428e-03 -1 2 2521\n            -1.8188059329986572e-02 -2 -3 2522 2.5648679584264755e-02</internalNodes>\n          <leafValues>\n            1.1853530257940292e-01 5.0805187225341797e-01\n            -2.3640629649162292e-01 2.6991719007492065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2523 -2.5939470157027245e-02 2 -1 2524\n            9.7436201758682728e-04 -2 -3 2525 -1.2310179881751537e-03</internalNodes>\n          <leafValues>\n            -6.1304092407226562e-01 -1.6751369833946228e-01\n            -2.6179370284080505e-01 1.2718600034713745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2526 -7.0769861340522766e-02 2 -1 2527\n            6.8592047318816185e-04 -2 -3 2528 7.2288517840206623e-03</internalNodes>\n          <leafValues>\n            3.6499670147895813e-01 3.1916418671607971e-01\n            -1.1326509714126587e-01 2.3138450086116791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2529 -4.7549661248922348e-03 -1 2 2530\n            3.8560681045055389e-02 -2 -3 2531 3.3737360499799252e-03</internalNodes>\n          <leafValues>\n            1.2249550223350525e-01 -2.2969830036163330e-01\n            -2.9323069378733635e-02 7.3215091228485107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2532 -1.4671970158815384e-02 -1 2 2533\n            3.5087150172330439e-04 -2 -3 2534 -2.0783280488103628e-03</internalNodes>\n          <leafValues>\n            -5.2395147085189819e-01 9.8115980625152588e-02\n            4.0350338816642761e-01 -2.2959670424461365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2535 -3.7065339274704456e-03 2 -1 2536\n            4.0150329470634460e-02 -2 -3 2537 -6.1276711523532867e-02</internalNodes>\n          <leafValues>\n            -9.2062972486019135e-02 -7.1320801973342896e-01\n            4.4615340232849121e-01 5.8714438229799271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 2 2538 -9.9730096757411957e-02 0 -1 2539\n            -7.7125482494011521e-04 -2 -3 2540 1.3902420178055763e-03</internalNodes>\n          <leafValues>\n            -1.4246919751167297e-01 5.1187419891357422e-01\n            1.8041240051388741e-02 -2.5729590654373169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2541 -2.5304889306426048e-02 -1 2 2542\n            2.5176260620355606e-02 -2 -3 2543 -2.7789679169654846e-01</internalNodes>\n          <leafValues>\n            -3.9365610480308533e-01 -1.7298270016908646e-02\n            -5.1464182138442993e-01 4.1422238945960999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2544 4.6188719570636749e-02 -1 2 2545\n            -1.7873500473797321e-03 -2 -3 2546 -1.2076550163328648e-02</internalNodes>\n          <leafValues>\n            -4.1546550393104553e-01 2.9358920454978943e-01\n            3.0501538515090942e-01 -8.3189137279987335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2547 -5.4004848934710026e-03 -1 2 2548\n            -9.4532333314418793e-03 -2 -3 2549 -1.6526769613847136e-03</internalNodes>\n          <leafValues>\n            -4.8242959380149841e-01 -4.1864201426506042e-01\n            -4.7690790891647339e-01 6.9955162703990936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2550 -3.1153310090303421e-02 2 -1 2551\n            5.1554460078477859e-03 -2 -3 2552 -2.7182319900020957e-04</internalNodes>\n          <leafValues>\n            6.2633192539215088e-01 -2.2152930498123169e-01\n            -2.8926940634846687e-02 3.6499640345573425e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          8 7 12 1 -1.</_>\n        <_>\n          8 7 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 8 6 -1.</_>\n        <_>\n          6 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 12 -1.</_>\n        <_>\n          9 7 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 12 12 -1.</_>\n        <_>\n          1 14 12 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 5 -1.</_>\n        <_>\n          8 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 9 6 -1.</_>\n        <_>\n          8 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 15 -1.</_>\n        <_>\n          2 5 18 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 9 -1.</_>\n        <_>\n          7 4 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 19 3 1 -1.</_>\n        <_>\n          9 19 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 2 2 -1.</_>\n        <_>\n          5 17 1 1 2.</_>\n        <_>\n          6 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 2 2 -1.</_>\n        <_>\n          5 17 1 1 2.</_>\n        <_>\n          6 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 3 1 -1.</_>\n        <_>\n          11 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 7 -1.</_>\n        <_>\n          10 7 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 5 -1.</_>\n        <_>\n          9 8 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 7 -1.</_>\n        <_>\n          13 1 3 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 15 -1.</_>\n        <_>\n          9 7 4 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 14 1 -1.</_>\n        <_>\n          6 5 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 9 10 1 -1.</_>\n        <_>\n          9 9 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 9 3 -1.</_>\n        <_>\n          5 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 12 -1.</_>\n        <_>\n          0 14 20 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 13 -1.</_>\n        <_>\n          2 5 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 3 2 -1.</_>\n        <_>\n          12 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 3 1 -1.</_>\n        <_>\n          12 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 19 3 1 -1.</_>\n        <_>\n          12 19 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 9 3 -1.</_>\n        <_>\n          13 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 8 7 -1.</_>\n        <_>\n          7 8 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 9 8 -1.</_>\n        <_>\n          11 6 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 2 2 -1.</_>\n        <_>\n          4 18 1 1 2.</_>\n        <_>\n          5 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 2 2 -1.</_>\n        <_>\n          4 18 1 1 2.</_>\n        <_>\n          5 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 14 -1.</_>\n        <_>\n          9 6 4 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 4 3 -1.</_>\n        <_>\n          15 14 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 13 4 2 -1.</_>\n        <_>\n          16 13 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 14 -1.</_>\n        <_>\n          7 6 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 11 -1.</_>\n        <_>\n          2 7 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 7 -1.</_>\n        <_>\n          2 7 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 3 1 -1.</_>\n        <_>\n          3 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 18 -1.</_>\n        <_>\n          8 6 5 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 14 -1.</_>\n        <_>\n          0 13 20 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 7 -1.</_>\n        <_>\n          9 7 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 2 -1.</_>\n        <_>\n          5 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 1 1 2.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 1 1 2.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 5 -1.</_>\n        <_>\n          16 8 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 4 2 -1.</_>\n        <_>\n          16 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 9 12 -1.</_>\n        <_>\n          11 8 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 1 -1.</_>\n        <_>\n          9 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          9 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 11 -1.</_>\n        <_>\n          2 8 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 1 -1.</_>\n        <_>\n          15 0 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 3 -1.</_>\n        <_>\n          14 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 12 -1.</_>\n        <_>\n          6 8 4 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 1 2 -1.</_>\n        <_>\n          18 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 5 -1.</_>\n        <_>\n          10 10 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 3 2 -1.</_>\n        <_>\n          14 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 12 -1.</_>\n        <_>\n          0 8 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 4 -1.</_>\n        <_>\n          0 9 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 4 6 -1.</_>\n        <_>\n          14 7 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 3 2 -1.</_>\n        <_>\n          5 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 8 17 -1.</_>\n        <_>\n          13 2 4 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 3 -1.</_>\n        <_>\n          16 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 9 13 -1.</_>\n        <_>\n          13 5 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 8 6 -1.</_>\n        <_>\n          7 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 15 18 -1.</_>\n        <_>\n          8 7 5 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 8 -1.</_>\n        <_>\n          9 7 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 14 -1.</_>\n        <_>\n          0 13 20 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 7 -1.</_>\n        <_>\n          3 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 3 1 -1.</_>\n        <_>\n          10 19 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 7 -1.</_>\n        <_>\n          7 6 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 1 10 -1.</_>\n        <_>\n          18 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 2 4 -1.</_>\n        <_>\n          12 16 1 2 2.</_>\n        <_>\n          13 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 19 4 1 -1.</_>\n        <_>\n          13 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 15 -1.</_>\n        <_>\n          11 5 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 4 1 -1.</_>\n        <_>\n          11 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 16 -1.</_>\n        <_>\n          5 0 4 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 3 3 -1.</_>\n        <_>\n          0 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 1 3 -1.</_>\n        <_>\n          1 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 1 -1.</_>\n        <_>\n          17 0 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 3 -1.</_>\n        <_>\n          13 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 2 -1.</_>\n        <_>\n          13 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 13 -1.</_>\n        <_>\n          16 2 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 6 1 -1.</_>\n        <_>\n          14 6 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 6 5 2 -1.</_>\n        <_>\n          15 7 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 5 12 -1.</_>\n        <_>\n          9 4 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 13 9 -1.</_>\n        <_>\n          6 4 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 2 -1.</_>\n        <_>\n          17 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 2 -1.</_>\n        <_>\n          6 0 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 3 3 -1.</_>\n        <_>\n          3 3 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 6 -1.</_>\n        <_>\n          5 3 13 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 2 2 3 -1.</_>\n        <_>\n          2 3 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 1 -1.</_>\n        <_>\n          18 0 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 5 6 -1.</_>\n        <_>\n          1 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 3 1 -1.</_>\n        <_>\n          6 15 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 7 3 -1.</_>\n        <_>\n          0 8 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 4 -1.</_>\n        <_>\n          0 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 3 -1.</_>\n        <_>\n          6 3 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 10 -1.</_>\n        <_>\n          8 7 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 8 12 -1.</_>\n        <_>\n          4 5 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 4 -1.</_>\n        <_>\n          4 2 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 8 12 -1.</_>\n        <_>\n          9 8 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 11 14 -1.</_>\n        <_>\n          8 13 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 9 -1.</_>\n        <_>\n          18 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 6 2 -1.</_>\n        <_>\n          14 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 10 6 -1.</_>\n        <_>\n          6 3 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 5 -1.</_>\n        <_>\n          5 0 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 17 1 3 -1.</_>\n        <_>\n          2 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 1 3 -1.</_>\n        <_>\n          2 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 2 -1.</_>\n        <_>\n          12 0 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 5 -1.</_>\n        <_>\n          2 8 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 4 1 -1.</_>\n        <_>\n          9 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 2 1 -1.</_>\n        <_>\n          11 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 9 3 -1.</_>\n        <_>\n          10 5 3 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 3 5 6 -1.</_>\n        <_>\n          8 5 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 1 3 -1.</_>\n        <_>\n          0 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 3 2 -1.</_>\n        <_>\n          13 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 3 3 -1.</_>\n        <_>\n          13 17 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 1 4 -1.</_>\n        <_>\n          6 10 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 8 8 -1.</_>\n        <_>\n          14 7 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 4 6 -1.</_>\n        <_>\n          5 12 4 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 10 -1.</_>\n        <_>\n          2 6 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 9 1 3 -1.</_>\n        <_>\n          19 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 15 -1.</_>\n        <_>\n          17 2 2 15 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 7 -1.</_>\n        <_>\n          16 7 2 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 1 2.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 4 6 -1.</_>\n        <_>\n          0 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 4 -1.</_>\n        <_>\n          17 9 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 1 3 -1.</_>\n        <_>\n          0 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 10 3 -1.</_>\n        <_>\n          6 6 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 9 7 -1.</_>\n        <_>\n          12 7 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 8 -1.</_>\n        <_>\n          14 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 1 -1.</_>\n        <_>\n          18 7 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 1 3 8 -1.</_>\n        <_>\n          17 3 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 1 3 -1.</_>\n        <_>\n          0 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 1 -1.</_>\n        <_>\n          6 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 1 -1.</_>\n        <_>\n          6 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 15 -1.</_>\n        <_>\n          9 7 3 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 3 -1.</_>\n        <_>\n          2 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 9 2 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 9 -1.</_>\n        <_>\n          4 6 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 4 -1.</_>\n        <_>\n          8 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 17 8 -1.</_>\n        <_>\n          0 3 17 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 9 1 -1.</_>\n        <_>\n          5 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 9 8 -1.</_>\n        <_>\n          2 15 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 15 -1.</_>\n        <_>\n          16 0 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 2 9 -1.</_>\n        <_>\n          17 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 3 -1.</_>\n        <_>\n          15 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 2 -1.</_>\n        <_>\n          8 0 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 15 -1.</_>\n        <_>\n          10 0 4 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 12 6 -1.</_>\n        <_>\n          11 8 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 4 1 -1.</_>\n        <_>\n          12 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 4 1 -1.</_>\n        <_>\n          9 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 4 -1.</_>\n        <_>\n          7 2 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 8 -1.</_>\n        <_>\n          8 2 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 3 -1.</_>\n        <_>\n          6 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 9 12 -1.</_>\n        <_>\n          3 8 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 1 2 -1.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 2 -1.</_>\n        <_>\n          10 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 17 -1.</_>\n        <_>\n          8 1 4 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 4 -1.</_>\n        <_>\n          14 10 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 3 -1.</_>\n        <_>\n          8 1 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 4 -1.</_>\n        <_>\n          14 8 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 15 -1.</_>\n        <_>\n          13 6 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 2 2 -1.</_>\n        <_>\n          17 18 1 1 2.</_>\n        <_>\n          18 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 4 10 -1.</_>\n        <_>\n          4 6 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 11 -1.</_>\n        <_>\n          7 4 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 4 1 -1.</_>\n        <_>\n          8 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 2 -1.</_>\n        <_>\n          15 0 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 3 -1.</_>\n        <_>\n          8 1 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 3 -1.</_>\n        <_>\n          12 1 4 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 2 -1.</_>\n        <_>\n          17 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 6 -1.</_>\n        <_>\n          17 11 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 5 6 -1.</_>\n        <_>\n          9 6 5 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 6 10 -1.</_>\n        <_>\n          14 5 2 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 5 3 -1.</_>\n        <_>\n          8 8 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 1 -1.</_>\n        <_>\n          5 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 16 16 -1.</_>\n        <_>\n          4 6 16 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 4 6 -1.</_>\n        <_>\n          16 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 2 6 -1.</_>\n        <_>\n          15 7 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 17 1 2 -1.</_>\n        <_>\n          6 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 12 12 -1.</_>\n        <_>\n          11 8 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 1 2 -1.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 2 1 -1.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 6 -1.</_>\n        <_>\n          7 5 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 1 -1.</_>\n        <_>\n          5 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 9 -1.</_>\n        <_>\n          8 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 2 12 -1.</_>\n        <_>\n          1 14 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 1 -1.</_>\n        <_>\n          17 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 7 9 -1.</_>\n        <_>\n          8 5 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 20 -1.</_>\n        <_>\n          0 0 10 10 2.</_>\n        <_>\n          10 10 10 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 1 2 -1.</_>\n        <_>\n          18 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 1 -1.</_>\n        <_>\n          18 5 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 10 6 -1.</_>\n        <_>\n          7 6 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 3 -1.</_>\n        <_>\n          16 10 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 18 3 2 -1.</_>\n        <_>\n          17 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 2 -1.</_>\n        <_>\n          16 10 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 1 2 -1.</_>\n        <_>\n          1 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 20 1 -1.</_>\n        <_>\n          10 18 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 2 -1.</_>\n        <_>\n          9 7 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 5 -1.</_>\n        <_>\n          12 9 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 5 -1.</_>\n        <_>\n          12 8 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 18 -1.</_>\n        <_>\n          18 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 9 3 -1.</_>\n        <_>\n          6 16 3 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 3 -1.</_>\n        <_>\n          15 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 16 9 4 -1.</_>\n        <_>\n          2 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 5 2 -1.</_>\n        <_>\n          0 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 2 3 -1.</_>\n        <_>\n          16 8 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 17 2 1 -1.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 1 -1.</_>\n        <_>\n          17 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 1 2 -1.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 2 -1.</_>\n        <_>\n          9 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 18 12 -1.</_>\n        <_>\n          2 14 18 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 3 -1.</_>\n        <_>\n          11 7 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 3 -1.</_>\n        <_>\n          16 9 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 3 17 12 -1.</_>\n        <_>\n          2 6 17 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 4 9 -1.</_>\n        <_>\n          3 7 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 6 -1.</_>\n        <_>\n          4 9 1 3 2.</_>\n        <_>\n          5 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 12 9 -1.</_>\n        <_>\n          5 9 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 1 8 -1.</_>\n        <_>\n          8 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 1 -1.</_>\n        <_>\n          4 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 1 -1.</_>\n        <_>\n          4 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 1 3 -1.</_>\n        <_>\n          4 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 9 3 -1.</_>\n        <_>\n          9 17 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 3 4 -1.</_>\n        <_>\n          15 9 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 6 -1.</_>\n        <_>\n          18 9 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 3 -1.</_>\n        <_>\n          16 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 3 2 -1.</_>\n        <_>\n          14 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 3 -1.</_>\n        <_>\n          7 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 11 -1.</_>\n        <_>\n          7 0 8 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 20 -1.</_>\n        <_>\n          1 5 18 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 4 -1.</_>\n        <_>\n          15 5 2 2 2.</_>\n        <_>\n          17 7 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 1 -1.</_>\n        <_>\n          16 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 6 2 -1.</_>\n        <_>\n          9 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 1 -1.</_>\n        <_>\n          16 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 4 -1.</_>\n        <_>\n          2 1 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 4 -1.</_>\n        <_>\n          5 1 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 1 2 -1.</_>\n        <_>\n          0 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 2 -1.</_>\n        <_>\n          18 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 4 -1.</_>\n        <_>\n          17 0 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 3 4 -1.</_>\n        <_>\n          3 3 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 11 -1.</_>\n        <_>\n          2 4 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 8 4 -1.</_>\n        <_>\n          0 4 4 2 2.</_>\n        <_>\n          4 6 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 1 2 -1.</_>\n        <_>\n          4 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 4 -1.</_>\n        <_>\n          0 1 3 2 2.</_>\n        <_>\n          3 3 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 2 -1.</_>\n        <_>\n          3 5 2 1 2.</_>\n        <_>\n          5 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 1 -1.</_>\n        <_>\n          5 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 2 2 -1.</_>\n        <_>\n          8 15 1 1 2.</_>\n        <_>\n          9 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 2 2 -1.</_>\n        <_>\n          8 15 1 1 2.</_>\n        <_>\n          9 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 5 2 -1.</_>\n        <_>\n          2 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 10 8 -1.</_>\n        <_>\n          4 14 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 5 3 -1.</_>\n        <_>\n          8 8 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 18 6 2 -1.</_>\n        <_>\n          2 18 3 1 2.</_>\n        <_>\n          5 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 12 4 -1.</_>\n        <_>\n          6 17 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 1 4 -1.</_>\n        <_>\n          10 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 3 -1.</_>\n        <_>\n          9 10 4 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 8 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 19 14 -1.</_>\n        <_>\n          1 13 19 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 4 2 -1.</_>\n        <_>\n          16 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 8 -1.</_>\n        <_>\n          8 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 4 3 -1.</_>\n        <_>\n          7 8 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 4 -1.</_>\n        <_>\n          5 2 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 4 -1.</_>\n        <_>\n          8 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 10 -1.</_>\n        <_>\n          2 15 18 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 5 3 -1.</_>\n        <_>\n          7 9 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 7 2 -1.</_>\n        <_>\n          7 9 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 17 1 3 -1.</_>\n        <_>\n          5 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 13 2 -1.</_>\n        <_>\n          7 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          16 16 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 14 1 2 -1.</_>\n        <_>\n          3 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 4 -1.</_>\n        <_>\n          13 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 2 -1.</_>\n        <_>\n          13 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 2 3 -1.</_>\n        <_>\n          6 10 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 9 12 -1.</_>\n        <_>\n          10 7 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 2 1 -1.</_>\n        <_>\n          16 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 9 -1.</_>\n        <_>\n          1 3 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 2 3 -1.</_>\n        <_>\n          3 15 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 16 1 2 -1.</_>\n        <_>\n          2 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 8 4 -1.</_>\n        <_>\n          11 2 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 6 -1.</_>\n        <_>\n          7 6 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 2 -1.</_>\n        <_>\n          5 7 1 1 2.</_>\n        <_>\n          6 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 1 -1.</_>\n        <_>\n          18 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 5 -1.</_>\n        <_>\n          14 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 1 -1.</_>\n        <_>\n          18 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 5 -1.</_>\n        <_>\n          12 1 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 14 3 2 -1.</_>\n        <_>\n          17 14 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 1 -1.</_>\n        <_>\n          6 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 3 6 -1.</_>\n        <_>\n          4 8 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 5 4 -1.</_>\n        <_>\n          8 17 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 2 2 -1.</_>\n        <_>\n          14 15 1 1 2.</_>\n        <_>\n          15 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 1 2 -1.</_>\n        <_>\n          4 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 2 3 -1.</_>\n        <_>\n          8 15 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 20 -1.</_>\n        <_>\n          19 10 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 8 1 -1.</_>\n        <_>\n          9 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 3 1 -1.</_>\n        <_>\n          15 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 1 -1.</_>\n        <_>\n          16 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 11 2 8 -1.</_>\n        <_>\n          18 11 1 4 2.</_>\n        <_>\n          19 15 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 4 -1.</_>\n        <_>\n          8 1 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 5 4 -1.</_>\n        <_>\n          5 1 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 15 -1.</_>\n        <_>\n          10 10 4 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 9 -1.</_>\n        <_>\n          7 5 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 10 3 -1.</_>\n        <_>\n          2 2 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 15 12 -1.</_>\n        <_>\n          7 9 5 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 6 -1.</_>\n        <_>\n          8 8 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 7 -1.</_>\n        <_>\n          8 6 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 9 4 -1.</_>\n        <_>\n          7 16 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 18 5 2 -1.</_>\n        <_>\n          15 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 1 4 -1.</_>\n        <_>\n          15 17 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 2 2 -1.</_>\n        <_>\n          6 15 1 1 2.</_>\n        <_>\n          7 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 2 2 -1.</_>\n        <_>\n          6 15 1 1 2.</_>\n        <_>\n          7 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 8 3 -1.</_>\n        <_>\n          10 16 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 1 -1.</_>\n        <_>\n          9 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 15 -1.</_>\n        <_>\n          9 7 3 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 1 14 -1.</_>\n        <_>\n          17 13 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          8 8 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 3 -1.</_>\n        <_>\n          15 6 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 7 4 9 -1.</_>\n        <_>\n          13 7 2 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 2 2 -1.</_>\n        <_>\n          3 10 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 15 -1.</_>\n        <_>\n          0 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 6 -1.</_>\n        <_>\n          10 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 9 2 -1.</_>\n        <_>\n          8 17 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 18 -1.</_>\n        <_>\n          7 11 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 2 10 -1.</_>\n        <_>\n          15 9 1 5 2.</_>\n        <_>\n          16 14 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 6 4 -1.</_>\n        <_>\n          14 9 2 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 2 -1.</_>\n        <_>\n          14 9 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 2 -1.</_>\n        <_>\n          18 5 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 2 -1.</_>\n        <_>\n          10 6 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 2 -1.</_>\n        <_>\n          18 4 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 7 4 -1.</_>\n        <_>\n          7 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 6 4 -1.</_>\n        <_>\n          1 17 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 2 6 -1.</_>\n        <_>\n          0 15 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 4 2 -1.</_>\n        <_>\n          10 13 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 14 2 4 -1.</_>\n        <_>\n          15 15 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 4 -1.</_>\n        <_>\n          8 5 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 3 -1.</_>\n        <_>\n          6 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 4 -1.</_>\n        <_>\n          3 2 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 1 2 3 -1.</_>\n        <_>\n          3 1 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 4 -1.</_>\n        <_>\n          1 2 4 2 2.</_>\n        <_>\n          5 4 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 4 -1.</_>\n        <_>\n          7 0 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 5 -1.</_>\n        <_>\n          7 5 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 1 2 -1.</_>\n        <_>\n          3 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 3 -1.</_>\n        <_>\n          7 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 1 -1.</_>\n        <_>\n          6 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 4 -1.</_>\n        <_>\n          7 9 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 9 2 -1.</_>\n        <_>\n          9 12 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 7 2 -1.</_>\n        <_>\n          5 3 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 8 2 -1.</_>\n        <_>\n          12 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 4 -1.</_>\n        <_>\n          19 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 2 -1.</_>\n        <_>\n          17 1 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 4 -1.</_>\n        <_>\n          14 2 3 2 2.</_>\n        <_>\n          17 4 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 6 -1.</_>\n        <_>\n          8 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 5 4 -1.</_>\n        <_>\n          11 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 3 -1.</_>\n        <_>\n          18 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 1 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 4 -1.</_>\n        <_>\n          7 1 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 8 -1.</_>\n        <_>\n          6 3 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 2 -1.</_>\n        <_>\n          0 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 2 -1.</_>\n        <_>\n          2 0 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 5 -1.</_>\n        <_>\n          12 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 7 -1.</_>\n        <_>\n          8 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 8 -1.</_>\n        <_>\n          10 3 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 4 -1.</_>\n        <_>\n          7 2 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 1 2 -1.</_>\n        <_>\n          0 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 1 -1.</_>\n        <_>\n          18 3 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 1 2.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 13 3 4 -1.</_>\n        <_>\n          16 14 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 3 -1.</_>\n        <_>\n          4 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 5 -1.</_>\n        <_>\n          1 8 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 14 12 -1.</_>\n        <_>\n          4 14 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          17 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 4 2 -1.</_>\n        <_>\n          17 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 3 4 -1.</_>\n        <_>\n          18 2 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 7 -1.</_>\n        <_>\n          4 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 3 -1.</_>\n        <_>\n          8 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 4 4 -1.</_>\n        <_>\n          13 8 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 5 2 -1.</_>\n        <_>\n          6 2 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 5 12 -1.</_>\n        <_>\n          1 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 6 3 -1.</_>\n        <_>\n          10 18 2 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 12 -1.</_>\n        <_>\n          13 4 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 8 1 -1.</_>\n        <_>\n          5 13 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 9 6 -1.</_>\n        <_>\n          5 4 9 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 1 1 2 -1.</_>\n        <_>\n          14 1 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 1 -1.</_>\n        <_>\n          8 1 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 2 -1.</_>\n        <_>\n          9 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 1 2 -1.</_>\n        <_>\n          0 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 8 -1.</_>\n        <_>\n          11 7 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 3 -1.</_>\n        <_>\n          6 10 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 11 -1.</_>\n        <_>\n          2 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 14 -1.</_>\n        <_>\n          2 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 3 -1.</_>\n        <_>\n          17 1 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 4 -1.</_>\n        <_>\n          19 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 1 -1.</_>\n        <_>\n          5 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 1 -1.</_>\n        <_>\n          7 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 10 -1.</_>\n        <_>\n          8 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 6 2 -1.</_>\n        <_>\n          14 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 1 12 -1.</_>\n        <_>\n          14 7 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 3 2 8 -1.</_>\n        <_>\n          11 5 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 2 2 3 -1.</_>\n        <_>\n          2 3 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 4 -1.</_>\n        <_>\n          0 3 3 2 2.</_>\n        <_>\n          3 5 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 2 1 -1.</_>\n        <_>\n          4 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 5 -1.</_>\n        <_>\n          13 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 2 3 -1.</_>\n        <_>\n          14 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 3 2 -1.</_>\n        <_>\n          0 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 2 -1.</_>\n        <_>\n          5 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 16 2 -1.</_>\n        <_>\n          6 7 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 7 -1.</_>\n        <_>\n          17 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 4 5 -1.</_>\n        <_>\n          15 9 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 3 14 -1.</_>\n        <_>\n          0 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 1 -1.</_>\n        <_>\n          18 4 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 1 -1.</_>\n        <_>\n          18 5 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 18 -1.</_>\n        <_>\n          18 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 12 -1.</_>\n        <_>\n          4 3 13 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 4 2 -1.</_>\n        <_>\n          13 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 3 3 -1.</_>\n        <_>\n          3 3 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 3 -1.</_>\n        <_>\n          10 10 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 6 -1.</_>\n        <_>\n          11 5 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 2 -1.</_>\n        <_>\n          11 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 2 4 -1.</_>\n        <_>\n          4 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 8 2 -1.</_>\n        <_>\n          9 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 9 1 8 -1.</_>\n        <_>\n          19 9 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 15 5 3 -1.</_>\n        <_>\n          0 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 1 15 -1.</_>\n        <_>\n          19 9 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 19 4 1 -1.</_>\n        <_>\n          8 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 4 -1.</_>\n        <_>\n          6 3 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 11 6 -1.</_>\n        <_>\n          4 3 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 2 4 -1.</_>\n        <_>\n          0 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 4 5 -1.</_>\n        <_>\n          2 9 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 2 4 -1.</_>\n        <_>\n          3 6 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 17 6 3 -1.</_>\n        <_>\n          3 18 2 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 6 -1.</_>\n        <_>\n          13 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 3 2 -1.</_>\n        <_>\n          17 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 15 3 -1.</_>\n        <_>\n          8 8 5 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 3 -1.</_>\n        <_>\n          11 9 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 8 -1.</_>\n        <_>\n          0 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 3 -1.</_>\n        <_>\n          10 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 8 -1.</_>\n        <_>\n          11 7 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 1 -1.</_>\n        <_>\n          13 4 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 11 4 -1.</_>\n        <_>\n          2 2 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 4 -1.</_>\n        <_>\n          0 4 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 2 -1.</_>\n        <_>\n          17 1 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 14 1 4 -1.</_>\n        <_>\n          19 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 2 4 -1.</_>\n        <_>\n          2 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 3 -1.</_>\n        <_>\n          2 14 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 14 4 3 -1.</_>\n        <_>\n          0 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 4 -1.</_>\n        <_>\n          9 4 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 4 -1.</_>\n        <_>\n          12 1 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 5 -1.</_>\n        <_>\n          18 0 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 3 1 4 -1.</_>\n        <_>\n          14 5 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 3 2 -1.</_>\n        <_>\n          6 16 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 8 -1.</_>\n        <_>\n          10 7 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 1 12 -1.</_>\n        <_>\n          10 9 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 3 -1.</_>\n        <_>\n          4 1 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 2 -1.</_>\n        <_>\n          18 1 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 9 2 -1.</_>\n        <_>\n          6 9 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 4 -1.</_>\n        <_>\n          7 9 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 4 -1.</_>\n        <_>\n          7 8 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 18 2 2 -1.</_>\n        <_>\n          9 18 1 1 2.</_>\n        <_>\n          10 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 6 2 -1.</_>\n        <_>\n          6 18 3 1 2.</_>\n        <_>\n          9 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 4 -1.</_>\n        <_>\n          6 7 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 12 -1.</_>\n        <_>\n          5 8 1 6 2.</_>\n        <_>\n          6 14 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 8 -1.</_>\n        <_>\n          19 0 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 11 4 6 -1.</_>\n        <_>\n          1 13 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 4 -1.</_>\n        <_>\n          6 12 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 13 1 6 -1.</_>\n        <_>\n          18 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 4 4 -1.</_>\n        <_>\n          14 15 2 2 2.</_>\n        <_>\n          16 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 1 2 -1.</_>\n        <_>\n          4 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 4 -1.</_>\n        <_>\n          5 4 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 1 3 1 -1.</_>\n        <_>\n          3 2 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 5 -1.</_>\n        <_>\n          7 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 1 8 -1.</_>\n        <_>\n          8 11 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 4 4 -1.</_>\n        <_>\n          14 10 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 16 9 3 -1.</_>\n        <_>\n          8 16 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 6 6 -1.</_>\n        <_>\n          14 13 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 5 2 -1.</_>\n        <_>\n          9 17 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 1 -1.</_>\n        <_>\n          8 10 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 5 -1.</_>\n        <_>\n          7 5 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 2 3 -1.</_>\n        <_>\n          16 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 20 6 -1.</_>\n        <_>\n          0 17 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 6 -1.</_>\n        <_>\n          4 9 1 3 2.</_>\n        <_>\n          5 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 12 15 -1.</_>\n        <_>\n          9 6 4 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 1 -1.</_>\n        <_>\n          5 0 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 1 -1.</_>\n        <_>\n          6 0 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          5 0 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 3 -1.</_>\n        <_>\n          2 1 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 6 -1.</_>\n        <_>\n          7 2 5 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 4 -1.</_>\n        <_>\n          3 2 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 1 -1.</_>\n        <_>\n          15 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 9 -1.</_>\n        <_>\n          4 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 18 -1.</_>\n        <_>\n          6 6 5 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 1 3 -1.</_>\n        <_>\n          2 6 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 12 1 3 -1.</_>\n        <_>\n          19 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 13 1 2 -1.</_>\n        <_>\n          19 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 7 12 -1.</_>\n        <_>\n          7 8 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 2 -1.</_>\n        <_>\n          15 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 4 -1.</_>\n        <_>\n          17 9 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 9 2 -1.</_>\n        <_>\n          13 15 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 10 1 -1.</_>\n        <_>\n          7 15 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 4 3 -1.</_>\n        <_>\n          14 14 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 17 2 3 -1.</_>\n        <_>\n          4 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 8 2 -1.</_>\n        <_>\n          16 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 12 6 -1.</_>\n        <_>\n          12 7 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 1 2 -1.</_>\n        <_>\n          18 16 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 9 -1.</_>\n        <_>\n          17 14 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 2 -1.</_>\n        <_>\n          17 10 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          17 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 2 18 -1.</_>\n        <_>\n          5 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 8 9 -1.</_>\n        <_>\n          7 9 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 1 -1.</_>\n        <_>\n          6 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 15 9 -1.</_>\n        <_>\n          10 8 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          0 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 10 3 -1.</_>\n        <_>\n          0 13 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 1 2 -1.</_>\n        <_>\n          1 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 2 -1.</_>\n        <_>\n          6 1 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 1 2 -1.</_>\n        <_>\n          2 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 7 3 -1.</_>\n        <_>\n          0 14 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 3 5 -1.</_>\n        <_>\n          16 7 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 10 2 1 -1.</_>\n        <_>\n          14 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 5 -1.</_>\n        <_>\n          6 4 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 5 -1.</_>\n        <_>\n          6 4 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 2 -1.</_>\n        <_>\n          18 6 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 3 -1.</_>\n        <_>\n          3 1 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 2 1 -1.</_>\n        <_>\n          12 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 3 3 -1.</_>\n        <_>\n          15 7 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 16 1 4 -1.</_>\n        <_>\n          2 17 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 5 2 -1.</_>\n        <_>\n          2 13 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 1 2 -1.</_>\n        <_>\n          12 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 4 -1.</_>\n        <_>\n          10 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 4 6 -1.</_>\n        <_>\n          13 8 2 3 2.</_>\n        <_>\n          15 11 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 2 -1.</_>\n        <_>\n          7 16 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 3 -1.</_>\n        <_>\n          17 11 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 8 -1.</_>\n        <_>\n          4 2 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 1 -1.</_>\n        <_>\n          9 0 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 2 -1.</_>\n        <_>\n          15 13 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 1 -1.</_>\n        <_>\n          17 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 3 -1.</_>\n        <_>\n          16 1 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 1 -1.</_>\n        <_>\n          18 7 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 4 -1.</_>\n        <_>\n          3 4 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 4 -1.</_>\n        <_>\n          16 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 4 -1.</_>\n        <_>\n          6 5 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 14 4 6 -1.</_>\n        <_>\n          18 14 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 3 -1.</_>\n        <_>\n          9 10 2 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 4 -1.</_>\n        <_>\n          9 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 3 -1.</_>\n        <_>\n          10 0 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 3 3 -1.</_>\n        <_>\n          0 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 1 3 -1.</_>\n        <_>\n          18 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 3 -1.</_>\n        <_>\n          16 6 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 8 1 6 -1.</_>\n        <_>\n          10 10 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 12 -1.</_>\n        <_>\n          12 3 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 5 14 -1.</_>\n        <_>\n          8 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 19 2 -1.</_>\n        <_>\n          1 18 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 2 4 -1.</_>\n        <_>\n          14 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 4 -1.</_>\n        <_>\n          3 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 12 -1.</_>\n        <_>\n          7 6 6 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 5 -1.</_>\n        <_>\n          2 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 6 6 -1.</_>\n        <_>\n          17 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 16 3 -1.</_>\n        <_>\n          8 16 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 8 1 -1.</_>\n        <_>\n          10 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 4 -1.</_>\n        <_>\n          4 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 9 -1.</_>\n        <_>\n          6 3 6 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 2 -1.</_>\n        <_>\n          2 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 1 -1.</_>\n        <_>\n          16 0 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 1 -1.</_>\n        <_>\n          17 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 1 2 -1.</_>\n        <_>\n          18 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 2 -1.</_>\n        <_>\n          5 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 3 1 -1.</_>\n        <_>\n          7 15 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 3 -1.</_>\n        <_>\n          0 12 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 19 3 -1.</_>\n        <_>\n          1 15 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 5 -1.</_>\n        <_>\n          16 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 4 -1.</_>\n        <_>\n          14 2 3 2 2.</_>\n        <_>\n          17 4 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 2 -1.</_>\n        <_>\n          16 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 3 4 -1.</_>\n        <_>\n          14 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 15 -1.</_>\n        <_>\n          17 5 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 14 3 -1.</_>\n        <_>\n          6 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 12 3 -1.</_>\n        <_>\n          6 17 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 16 2 -1.</_>\n        <_>\n          4 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 16 -1.</_>\n        <_>\n          7 7 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 12 3 -1.</_>\n        <_>\n          10 1 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 4 -1.</_>\n        <_>\n          13 3 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 3 2 -1.</_>\n        <_>\n          7 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 3 5 -1.</_>\n        <_>\n          3 2 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 3 -1.</_>\n        <_>\n          11 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 4 -1.</_>\n        <_>\n          10 0 5 2 2.</_>\n        <_>\n          15 2 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 6 3 -1.</_>\n        <_>\n          3 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 3 -1.</_>\n        <_>\n          3 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 2 -1.</_>\n        <_>\n          17 2 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 3 -1.</_>\n        <_>\n          3 2 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 5 -1.</_>\n        <_>\n          7 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 3 3 -1.</_>\n        <_>\n          5 18 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 3 3 -1.</_>\n        <_>\n          5 16 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 1 -1.</_>\n        <_>\n          3 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 2 -1.</_>\n        <_>\n          5 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 15 4 -1.</_>\n        <_>\n          7 1 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 8 -1.</_>\n        <_>\n          10 10 9 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 1 4 -1.</_>\n        <_>\n          16 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 2 1 -1.</_>\n        <_>\n          18 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 7 -1.</_>\n        <_>\n          18 5 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 1 -1.</_>\n        <_>\n          8 10 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 2 6 -1.</_>\n        <_>\n          15 9 1 3 2.</_>\n        <_>\n          16 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 16 10 -1.</_>\n        <_>\n          1 11 16 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 19 8 -1.</_>\n        <_>\n          1 16 19 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 9 -1.</_>\n        <_>\n          8 7 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 9 9 -1.</_>\n        <_>\n          5 5 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 6 -1.</_>\n        <_>\n          14 0 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 16 1 3 -1.</_>\n        <_>\n          18 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 2 -1.</_>\n        <_>\n          17 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 2 -1.</_>\n        <_>\n          2 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 19 -1.</_>\n        <_>\n          4 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 4 1 -1.</_>\n        <_>\n          5 14 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 1 -1.</_>\n        <_>\n          18 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 4 -1.</_>\n        <_>\n          11 0 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 5 -1.</_>\n        <_>\n          10 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 1 3 -1.</_>\n        <_>\n          2 5 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 2 3 -1.</_>\n        <_>\n          2 5 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 14 3 3 -1.</_>\n        <_>\n          6 15 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 2 -1.</_>\n        <_>\n          2 0 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 1 -1.</_>\n        <_>\n          3 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 5 -1.</_>\n        <_>\n          2 2 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 4 -1.</_>\n        <_>\n          3 0 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 1 -1.</_>\n        <_>\n          7 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 2 -1.</_>\n        <_>\n          17 4 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 19 2 1 -1.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 2 1 -1.</_>\n        <_>\n          18 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 1 3 -1.</_>\n        <_>\n          17 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 3 -1.</_>\n        <_>\n          9 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 5 2 -1.</_>\n        <_>\n          2 18 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 3 -1.</_>\n        <_>\n          8 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 15 2 3 -1.</_>\n        <_>\n          16 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 5 2 -1.</_>\n        <_>\n          6 8 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 4 -1.</_>\n        <_>\n          11 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 3 -1.</_>\n        <_>\n          18 3 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 4 3 2 -1.</_>\n        <_>\n          16 5 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 3 2.</_>\n        <_>\n          17 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 10 4 -1.</_>\n        <_>\n          6 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 2 -1.</_>\n        <_>\n          5 7 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 3 -1.</_>\n        <_>\n          7 7 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 1 -1.</_>\n        <_>\n          18 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 2 -1.</_>\n        <_>\n          14 0 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 2 -1.</_>\n        <_>\n          18 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 4 1 -1.</_>\n        <_>\n          10 4 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 3 -1.</_>\n        <_>\n          4 5 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 8 -1.</_>\n        <_>\n          17 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 16 1 -1.</_>\n        <_>\n          9 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 12 1 -1.</_>\n        <_>\n          10 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 4 1 -1.</_>\n        <_>\n          4 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 2 8 -1.</_>\n        <_>\n          12 7 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 1 2 -1.</_>\n        <_>\n          8 10 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 3 3 12 -1.</_>\n        <_>\n          16 3 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 4 3 -1.</_>\n        <_>\n          16 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 2 -1.</_>\n        <_>\n          4 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 3 6 -1.</_>\n        <_>\n          14 13 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 2 2 -1.</_>\n        <_>\n          2 12 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 8 1 9 -1.</_>\n        <_>\n          1 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 2 2 -1.</_>\n        <_>\n          2 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 3 -1.</_>\n        <_>\n          12 10 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 6 -1.</_>\n        <_>\n          11 14 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 8 -1.</_>\n        <_>\n          12 6 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 14 -1.</_>\n        <_>\n          5 13 14 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 3 -1.</_>\n        <_>\n          6 5 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 1 3 -1.</_>\n        <_>\n          1 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 3 -1.</_>\n        <_>\n          4 2 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 3 -1.</_>\n        <_>\n          16 4 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 15 -1.</_>\n        <_>\n          15 8 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 4 6 -1.</_>\n        <_>\n          15 9 2 3 2.</_>\n        <_>\n          17 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 3 3 -1.</_>\n        <_>\n          15 8 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 6 9 -1.</_>\n        <_>\n          13 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 3 -1.</_>\n        <_>\n          15 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 17 7 3 -1.</_>\n        <_>\n          0 18 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 7 -1.</_>\n        <_>\n          17 9 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 16 1 3 -1.</_>\n        <_>\n          14 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 17 8 1 -1.</_>\n        <_>\n          16 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 2 4 -1.</_>\n        <_>\n          14 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 1 -1.</_>\n        <_>\n          8 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 2 -1.</_>\n        <_>\n          5 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 9 2 -1.</_>\n        <_>\n          10 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 13 9 -1.</_>\n        <_>\n          5 6 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 5 2 -1.</_>\n        <_>\n          6 8 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 14 -1.</_>\n        <_>\n          9 5 4 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 2 10 -1.</_>\n        <_>\n          18 13 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 4 -1.</_>\n        <_>\n          9 1 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 7 -1.</_>\n        <_>\n          5 0 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 4 -1.</_>\n        <_>\n          11 0 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 2 -1.</_>\n        <_>\n          14 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 1 -1.</_>\n        <_>\n          16 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 6 -1.</_>\n        <_>\n          0 3 2 3 2.</_>\n        <_>\n          2 6 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 5 -1.</_>\n        <_>\n          3 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 1 3 -1.</_>\n        <_>\n          3 6 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 14 4 2 -1.</_>\n        <_>\n          4 14 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 16 7 -1.</_>\n        <_>\n          11 13 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 9 4 -1.</_>\n        <_>\n          5 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 3 -1.</_>\n        <_>\n          5 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 1 -1.</_>\n        <_>\n          5 0 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 5 4 -1.</_>\n        <_>\n          7 7 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 2 -1.</_>\n        <_>\n          18 4 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 3 -1.</_>\n        <_>\n          12 8 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          16 16 1 1 2.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 1 3 -1.</_>\n        <_>\n          2 6 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 3 -1.</_>\n        <_>\n          6 11 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 5 2 14 -1.</_>\n        <_>\n          0 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 5 2 -1.</_>\n        <_>\n          14 13 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 5 -1.</_>\n        <_>\n          6 5 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 6 -1.</_>\n        <_>\n          0 10 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 2 -1.</_>\n        <_>\n          15 10 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 15 14 2 -1.</_>\n        <_>\n          8 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 4 5 -1.</_>\n        <_>\n          4 14 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 15 2 3 -1.</_>\n        <_>\n          16 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 4 -1.</_>\n        <_>\n          7 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 20 -1.</_>\n        <_>\n          6 10 14 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 1 9 -1.</_>\n        <_>\n          13 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 1 4 -1.</_>\n        <_>\n          15 1 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 2 2 -1.</_>\n        <_>\n          14 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 3 2 -1.</_>\n        <_>\n          16 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 2 3 -1.</_>\n        <_>\n          17 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 8 6 -1.</_>\n        <_>\n          4 6 4 3 2.</_>\n        <_>\n          8 9 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 18 3 -1.</_>\n        <_>\n          6 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 2 -1.</_>\n        <_>\n          17 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 3 -1.</_>\n        <_>\n          4 7 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 17 20 3 -1.</_>\n        <_>\n          5 17 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 4 2 -1.</_>\n        <_>\n          17 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 2 5 -1.</_>\n        <_>\n          5 13 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 8 10 1 -1.</_>\n        <_>\n          1 8 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 15 9 5 -1.</_>\n        <_>\n          12 15 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 4 7 -1.</_>\n        <_>\n          16 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 1 -1.</_>\n        <_>\n          13 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 4 11 -1.</_>\n        <_>\n          16 3 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 3 1 -1.</_>\n        <_>\n          4 16 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 4 -1.</_>\n        <_>\n          14 9 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 2 -1.</_>\n        <_>\n          10 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 7 -1.</_>\n        <_>\n          10 1 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 4 -1.</_>\n        <_>\n          12 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 10 12 -1.</_>\n        <_>\n          10 12 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 8 -1.</_>\n        <_>\n          17 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 2 -1.</_>\n        <_>\n          7 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 8 -1.</_>\n        <_>\n          5 1 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 6 2 -1.</_>\n        <_>\n          7 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 6 -1.</_>\n        <_>\n          8 0 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 1 3 14 -1.</_>\n        <_>\n          3 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 9 -1.</_>\n        <_>\n          18 0 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 5 -1.</_>\n        <_>\n          7 6 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 5 -1.</_>\n        <_>\n          7 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 9 11 -1.</_>\n        <_>\n          8 8 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 3 4 -1.</_>\n        <_>\n          8 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 6 -1.</_>\n        <_>\n          11 12 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 6 2 -1.</_>\n        <_>\n          10 17 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 4 -1.</_>\n        <_>\n          12 0 4 2 2.</_>\n        <_>\n          16 2 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 2 -1.</_>\n        <_>\n          19 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 1 -1.</_>\n        <_>\n          19 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 1 3 -1.</_>\n        <_>\n          4 7 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 1 -1.</_>\n        <_>\n          6 6 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 3 -1.</_>\n        <_>\n          0 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 2 5 -1.</_>\n        <_>\n          15 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 2 7 -1.</_>\n        <_>\n          16 5 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 8 4 6 -1.</_>\n        <_>\n          15 9 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 4 4 -1.</_>\n        <_>\n          4 8 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 2 -1.</_>\n        <_>\n          18 1 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 2 -1.</_>\n        <_>\n          14 0 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 1 -1.</_>\n        <_>\n          8 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 3 -1.</_>\n        <_>\n          18 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 4 4 -1.</_>\n        <_>\n          13 4 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 17 4 -1.</_>\n        <_>\n          0 9 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 1 4 -1.</_>\n        <_>\n          11 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 8 2 -1.</_>\n        <_>\n          12 8 4 1 2.</_>\n        <_>\n          16 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 6 1 -1.</_>\n        <_>\n          14 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 5 -1.</_>\n        <_>\n          5 8 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 9 2 1 -1.</_>\n        <_>\n          12 9 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 3 1 -1.</_>\n        <_>\n          6 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 14 -1.</_>\n        <_>\n          0 13 20 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 8 -1.</_>\n        <_>\n          9 5 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 1 9 2 -1.</_>\n        <_>\n          6 2 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 4 -1.</_>\n        <_>\n          7 2 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 4 -1.</_>\n        <_>\n          3 1 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 9 7 -1.</_>\n        <_>\n          3 1 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 3 -1.</_>\n        <_>\n          7 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 10 3 -1.</_>\n        <_>\n          5 5 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 7 -1.</_>\n        <_>\n          14 0 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 6 -1.</_>\n        <_>\n          10 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 4 1 -1.</_>\n        <_>\n          1 14 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 4 -1.</_>\n        <_>\n          6 10 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 17 10 3 -1.</_>\n        <_>\n          5 18 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 4 -1.</_>\n        <_>\n          7 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 7 3 -1.</_>\n        <_>\n          8 14 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 8 3 -1.</_>\n        <_>\n          7 8 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 16 1 1 2.</_>\n        <_>\n          19 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 9 6 -1.</_>\n        <_>\n          7 5 9 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 18 1 2 -1.</_>\n        <_>\n          18 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 4 1 -1.</_>\n        <_>\n          17 12 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 3 -1.</_>\n        <_>\n          5 1 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 4 1 -1.</_>\n        <_>\n          14 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 2 10 -1.</_>\n        <_>\n          15 7 1 5 2.</_>\n        <_>\n          16 12 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 20 -1.</_>\n        <_>\n          6 10 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 9 16 -1.</_>\n        <_>\n          4 8 9 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 3 3 -1.</_>\n        <_>\n          3 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 9 6 -1.</_>\n        <_>\n          6 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 1 2 -1.</_>\n        <_>\n          5 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 5 -1.</_>\n        <_>\n          6 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 7 -1.</_>\n        <_>\n          17 9 1 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 3 3 7 -1.</_>\n        <_>\n          16 4 1 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 3 1 15 -1.</_>\n        <_>\n          18 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 1 -1.</_>\n        <_>\n          6 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 12 -1.</_>\n        <_>\n          8 8 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 4 2 -1.</_>\n        <_>\n          14 6 2 1 2.</_>\n        <_>\n          16 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 2 2 -1.</_>\n        <_>\n          5 18 1 1 2.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 2 2 -1.</_>\n        <_>\n          8 18 1 1 2.</_>\n        <_>\n          9 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 2 2 -1.</_>\n        <_>\n          3 18 1 1 2.</_>\n        <_>\n          4 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 6 -1.</_>\n        <_>\n          7 5 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 1 1 2.</_>\n        <_>\n          17 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 3 -1.</_>\n        <_>\n          6 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 2 -1.</_>\n        <_>\n          11 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 9 8 -1.</_>\n        <_>\n          11 5 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 12 -1.</_>\n        <_>\n          16 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 10 4 -1.</_>\n        <_>\n          9 17 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 1 20 -1.</_>\n        <_>\n          12 10 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 3 -1.</_>\n        <_>\n          9 10 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 2 -1.</_>\n        <_>\n          6 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 5 -1.</_>\n        <_>\n          5 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 5 3 -1.</_>\n        <_>\n          3 11 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 12 -1.</_>\n        <_>\n          1 0 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 14 -1.</_>\n        <_>\n          9 1 4 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 7 3 -1.</_>\n        <_>\n          5 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 4 2 -1.</_>\n        <_>\n          15 7 2 1 2.</_>\n        <_>\n          17 8 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 1 -1.</_>\n        <_>\n          9 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 6 -1.</_>\n        <_>\n          1 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 5 3 -1.</_>\n        <_>\n          8 5 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 2 -1.</_>\n        <_>\n          14 6 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          9 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 2 -1.</_>\n        <_>\n          9 16 1 1 2.</_>\n        <_>\n          10 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 8 -1.</_>\n        <_>\n          0 10 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 4 7 -1.</_>\n        <_>\n          13 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 5 3 -1.</_>\n        <_>\n          5 7 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 2 2 -1.</_>\n        <_>\n          11 18 1 1 2.</_>\n        <_>\n          12 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 6 2 -1.</_>\n        <_>\n          14 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 2 -1.</_>\n        <_>\n          2 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 4 6 -1.</_>\n        <_>\n          3 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 10 4 -1.</_>\n        <_>\n          6 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 4 -1.</_>\n        <_>\n          9 7 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 2 2 -1.</_>\n        <_>\n          16 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 4 -1.</_>\n        <_>\n          5 15 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 1 8 -1.</_>\n        <_>\n          10 13 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 4 3 -1.</_>\n        <_>\n          9 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 1 3 -1.</_>\n        <_>\n          0 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 1 -1.</_>\n        <_>\n          18 6 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 15 1 4 -1.</_>\n        <_>\n          0 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 2 -1.</_>\n        <_>\n          9 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 3 1 -1.</_>\n        <_>\n          6 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 8 4 -1.</_>\n        <_>\n          6 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 1 3 -1.</_>\n        <_>\n          0 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 4 1 -1.</_>\n        <_>\n          2 8 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 1 8 -1.</_>\n        <_>\n          5 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 5 4 -1.</_>\n        <_>\n          7 3 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 5 4 -1.</_>\n        <_>\n          7 3 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 4 -1.</_>\n        <_>\n          18 1 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 3 -1.</_>\n        <_>\n          4 0 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 2 -1.</_>\n        <_>\n          0 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 1 -1.</_>\n        <_>\n          17 0 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 3 -1.</_>\n        <_>\n          5 3 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 2 -1.</_>\n        <_>\n          13 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 3 -1.</_>\n        <_>\n          18 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 4 -1.</_>\n        <_>\n          18 1 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 4 -1.</_>\n        <_>\n          17 2 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 9 -1.</_>\n        <_>\n          8 9 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 5 -1.</_>\n        <_>\n          7 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 4 -1.</_>\n        <_>\n          5 4 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 1 2 -1.</_>\n        <_>\n          0 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 5 4 -1.</_>\n        <_>\n          15 14 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 11 1 2 -1.</_>\n        <_>\n          19 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 2 -1.</_>\n        <_>\n          13 9 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 15 1 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 2 3 -1.</_>\n        <_>\n          15 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 4 3 -1.</_>\n        <_>\n          13 5 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 17 1 3 -1.</_>\n        <_>\n          3 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 6 2 -1.</_>\n        <_>\n          2 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 3 3 -1.</_>\n        <_>\n          2 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 19 -1.</_>\n        <_>\n          17 0 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 6 4 -1.</_>\n        <_>\n          7 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 6 -1.</_>\n        <_>\n          7 8 2 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 2 -1.</_>\n        <_>\n          17 0 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 2 -1.</_>\n        <_>\n          14 1 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 2 -1.</_>\n        <_>\n          0 1 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 2 -1.</_>\n        <_>\n          18 0 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 3 -1.</_>\n        <_>\n          18 3 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 3 -1.</_>\n        <_>\n          2 1 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 4 -1.</_>\n        <_>\n          13 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 1 6 -1.</_>\n        <_>\n          12 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 4 -1.</_>\n        <_>\n          7 5 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 2 -1.</_>\n        <_>\n          9 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 2 2 -1.</_>\n        <_>\n          16 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 5 6 -1.</_>\n        <_>\n          15 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 1 3 -1.</_>\n        <_>\n          2 2 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 14 2 2 -1.</_>\n        <_>\n          15 14 1 1 2.</_>\n        <_>\n          16 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 2 2 -1.</_>\n        <_>\n          15 14 1 1 2.</_>\n        <_>\n          16 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 2 -1.</_>\n        <_>\n          7 16 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 6 -1.</_>\n        <_>\n          15 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 3 -1.</_>\n        <_>\n          14 4 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 10 2 -1.</_>\n        <_>\n          10 15 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 1 -1.</_>\n        <_>\n          10 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 4 2 -1.</_>\n        <_>\n          2 14 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 14 3 3 -1.</_>\n        <_>\n          16 15 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 14 1 4 -1.</_>\n        <_>\n          17 15 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 13 5 3 -1.</_>\n        <_>\n          1 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 1 2 -1.</_>\n        <_>\n          3 12 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 4 -1.</_>\n        <_>\n          18 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 1 2 -1.</_>\n        <_>\n          18 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 14 8 2 -1.</_>\n        <_>\n          1 15 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 3 -1.</_>\n        <_>\n          15 3 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 2 2 4 -1.</_>\n        <_>\n          16 4 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 3 -1.</_>\n        <_>\n          19 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 6 -1.</_>\n        <_>\n          12 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 3 -1.</_>\n        <_>\n          5 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 4 12 -1.</_>\n        <_>\n          2 8 2 6 2.</_>\n        <_>\n          4 14 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 1 -1.</_>\n        <_>\n          12 5 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 12 5 -1.</_>\n        <_>\n          13 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 6 3 -1.</_>\n        <_>\n          13 10 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 18 1 2 -1.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 17 1 3 -1.</_>\n        <_>\n          19 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 2 4 -1.</_>\n        <_>\n          15 9 1 2 2.</_>\n        <_>\n          16 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 3 -1.</_>\n        <_>\n          16 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 3 -1.</_>\n        <_>\n          4 1 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 3 -1.</_>\n        <_>\n          12 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 3 1 -1.</_>\n        <_>\n          14 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 4 -1.</_>\n        <_>\n          0 2 3 2 2.</_>\n        <_>\n          3 4 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 19 4 -1.</_>\n        <_>\n          0 9 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 6 -1.</_>\n        <_>\n          8 7 1 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 1 3 -1.</_>\n        <_>\n          3 5 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 4 -1.</_>\n        <_>\n          0 2 2 2 2.</_>\n        <_>\n          2 4 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 3 -1.</_>\n        <_>\n          6 1 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 1 3 -1.</_>\n        <_>\n          19 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 5 3 -1.</_>\n        <_>\n          7 7 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 1 4 -1.</_>\n        <_>\n          6 6 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 1 -1.</_>\n        <_>\n          15 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 2 -1.</_>\n        <_>\n          9 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 2 6 -1.</_>\n        <_>\n          15 5 1 3 2.</_>\n        <_>\n          16 8 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 2 -1.</_>\n        <_>\n          6 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 2 -1.</_>\n        <_>\n          6 10 1 1 2.</_>\n        <_>\n          7 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 2 -1.</_>\n        <_>\n          6 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 4 -1.</_>\n        <_>\n          12 10 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 3 10 -1.</_>\n        <_>\n          0 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 15 9 -1.</_>\n        <_>\n          8 6 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 18 -1.</_>\n        <_>\n          8 1 4 9 2.</_>\n        <_>\n          12 10 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 3 11 -1.</_>\n        <_>\n          4 6 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 3 -1.</_>\n        <_>\n          12 8 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 2 3 -1.</_>\n        <_>\n          16 9 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 5 -1.</_>\n        <_>\n          5 1 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 2 2 -1.</_>\n        <_>\n          6 18 1 1 2.</_>\n        <_>\n          7 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 2 -1.</_>\n        <_>\n          10 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 9 -1.</_>\n        <_>\n          16 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 5 -1.</_>\n        <_>\n          8 9 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 3 15 -1.</_>\n        <_>\n          16 4 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 2 16 -1.</_>\n        <_>\n          14 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 2 -1.</_>\n        <_>\n          12 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 6 -1.</_>\n        <_>\n          19 8 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 6 -1.</_>\n        <_>\n          5 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 3 -1.</_>\n        <_>\n          5 4 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 1 -1.</_>\n        <_>\n          18 5 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 9 4 -1.</_>\n        <_>\n          8 6 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 3 -1.</_>\n        <_>\n          8 8 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 2 2 -1.</_>\n        <_>\n          0 18 1 1 2.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 4 -1.</_>\n        <_>\n          0 10 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 3 -1.</_>\n        <_>\n          16 9 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 3 16 -1.</_>\n        <_>\n          15 4 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 1 -1.</_>\n        <_>\n          16 5 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 6 4 2 -1.</_>\n        <_>\n          14 6 2 1 2.</_>\n        <_>\n          16 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 5 3 -1.</_>\n        <_>\n          15 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 20 -1.</_>\n        <_>\n          2 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 4 9 -1.</_>\n        <_>\n          2 7 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 4 1 -1.</_>\n        <_>\n          3 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 5 2 -1.</_>\n        <_>\n          2 0 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 16 1 2 -1.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 1 -1.</_>\n        <_>\n          8 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 1 8 -1.</_>\n        <_>\n          5 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 2 -1.</_>\n        <_>\n          10 10 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 7 -1.</_>\n        <_>\n          10 5 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 11 3 -1.</_>\n        <_>\n          0 18 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 5 4 -1.</_>\n        <_>\n          6 15 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 1 2 -1.</_>\n        <_>\n          3 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 11 2 -1.</_>\n        <_>\n          2 8 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 6 -1.</_>\n        <_>\n          7 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 3 -1.</_>\n        <_>\n          14 0 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 1 -1.</_>\n        <_>\n          10 2 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 3 -1.</_>\n        <_>\n          12 0 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 7 4 -1.</_>\n        <_>\n          11 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 3 -1.</_>\n        <_>\n          8 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 11 12 -1.</_>\n        <_>\n          5 12 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 3 -1.</_>\n        <_>\n          13 9 2 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 2 15 6 -1.</_>\n        <_>\n          3 4 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 9 -1.</_>\n        <_>\n          4 0 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 2 2 -1.</_>\n        <_>\n          8 18 1 1 2.</_>\n        <_>\n          9 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 1 -1.</_>\n        <_>\n          16 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 2 -1.</_>\n        <_>\n          17 0 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 9 6 -1.</_>\n        <_>\n          13 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 3 6 -1.</_>\n        <_>\n          16 7 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 7 5 3 -1.</_>\n        <_>\n          14 8 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 4 4 -1.</_>\n        <_>\n          17 12 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 5 -1.</_>\n        <_>\n          17 11 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 9 3 -1.</_>\n        <_>\n          13 4 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 4 -1.</_>\n        <_>\n          5 9 1 2 2.</_>\n        <_>\n          6 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 8 -1.</_>\n        <_>\n          19 6 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 1 15 -1.</_>\n        <_>\n          19 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 12 2 -1.</_>\n        <_>\n          14 9 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 10 -1.</_>\n        <_>\n          19 1 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 4 -1.</_>\n        <_>\n          6 5 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 4 3 -1.</_>\n        <_>\n          5 5 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 18 4 1 -1.</_>\n        <_>\n          11 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 3 -1.</_>\n        <_>\n          0 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 1 -1.</_>\n        <_>\n          9 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 8 8 -1.</_>\n        <_>\n          12 10 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 8 7 -1.</_>\n        <_>\n          11 7 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 4 4 -1.</_>\n        <_>\n          10 8 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 9 3 -1.</_>\n        <_>\n          4 6 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 3 -1.</_>\n        <_>\n          5 10 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 8 6 -1.</_>\n        <_>\n          10 6 8 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 3 10 5 -1.</_>\n        <_>\n          9 3 5 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 11 4 2 -1.</_>\n        <_>\n          16 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 8 10 -1.</_>\n        <_>\n          8 8 4 5 2.</_>\n        <_>\n          12 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 3 -1.</_>\n        <_>\n          15 1 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 18 1 2 -1.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 7 2 -1.</_>\n        <_>\n          13 19 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 1 4 -1.</_>\n        <_>\n          4 6 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 2 4 -1.</_>\n        <_>\n          2 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 4 -1.</_>\n        <_>\n          1 3 2 2 2.</_>\n        <_>\n          3 5 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 12 -1.</_>\n        <_>\n          0 6 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 4 -1.</_>\n        <_>\n          1 1 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 3 14 -1.</_>\n        <_>\n          15 3 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 16 1 2 -1.</_>\n        <_>\n          19 16 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 4 6 -1.</_>\n        <_>\n          3 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 5 3 -1.</_>\n        <_>\n          9 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 1 -1.</_>\n        <_>\n          18 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 12 3 -1.</_>\n        <_>\n          11 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 3 3 -1.</_>\n        <_>\n          1 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 8 2 -1.</_>\n        <_>\n          11 17 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 4 2 -1.</_>\n        <_>\n          13 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 6 3 -1.</_>\n        <_>\n          13 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 4 -1.</_>\n        <_>\n          6 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 6 -1.</_>\n        <_>\n          7 10 1 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 5 -1.</_>\n        <_>\n          8 4 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 1 -1.</_>\n        <_>\n          14 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 2 2 -1.</_>\n        <_>\n          16 17 1 1 2.</_>\n        <_>\n          17 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 1 -1.</_>\n        <_>\n          2 1 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 5 10 -1.</_>\n        <_>\n          3 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 3 2 -1.</_>\n        <_>\n          4 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 8 2 -1.</_>\n        <_>\n          10 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 2 3 -1.</_>\n        <_>\n          14 10 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 1 10 -1.</_>\n        <_>\n          11 6 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 2 -1.</_>\n        <_>\n          11 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 14 2 -1.</_>\n        <_>\n          6 3 14 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 10 -1.</_>\n        <_>\n          15 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 2 -1.</_>\n        <_>\n          18 10 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 8 3 -1.</_>\n        <_>\n          14 6 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 2 -1.</_>\n        <_>\n          2 0 8 1 2.</_>\n        <_>\n          10 1 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 4 8 -1.</_>\n        <_>\n          0 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 2 2 -1.</_>\n        <_>\n          8 16 1 1 2.</_>\n        <_>\n          9 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 2 -1.</_>\n        <_>\n          6 0 6 1 2.</_>\n        <_>\n          12 1 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 3 -1.</_>\n        <_>\n          2 8 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 13 2 -1.</_>\n        <_>\n          2 2 13 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 13 -1.</_>\n        <_>\n          5 7 10 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 4 2 -1.</_>\n        <_>\n          15 10 2 1 2.</_>\n        <_>\n          17 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 2 6 -1.</_>\n        <_>\n          16 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 1 3 -1.</_>\n        <_>\n          16 12 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 9 -1.</_>\n        <_>\n          0 3 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 6 4 -1.</_>\n        <_>\n          0 17 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 6 -1.</_>\n        <_>\n          14 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 5 -1.</_>\n        <_>\n          17 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 8 -1.</_>\n        <_>\n          9 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 5 4 -1.</_>\n        <_>\n          13 12 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 9 4 3 -1.</_>\n        <_>\n          15 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 1 -1.</_>\n        <_>\n          8 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 6 -1.</_>\n        <_>\n          17 1 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 10 2 -1.</_>\n        <_>\n          10 3 5 1 2.</_>\n        <_>\n          15 4 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 1 -1.</_>\n        <_>\n          8 1 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 5 4 -1.</_>\n        <_>\n          13 4 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 4 -1.</_>\n        <_>\n          5 0 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 5 -1.</_>\n        <_>\n          13 1 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 7 3 -1.</_>\n        <_>\n          9 10 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 1 16 -1.</_>\n        <_>\n          19 11 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 3 -1.</_>\n        <_>\n          8 0 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 3 -1.</_>\n        <_>\n          12 0 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 5 -1.</_>\n        <_>\n          13 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 5 8 -1.</_>\n        <_>\n          12 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 4 -1.</_>\n        <_>\n          5 10 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 3 -1.</_>\n        <_>\n          12 7 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 5 3 1 -1.</_>\n        <_>\n          11 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 5 -1.</_>\n        <_>\n          11 6 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 4 2 -1.</_>\n        <_>\n          17 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 7 3 6 -1.</_>\n        <_>\n          13 9 3 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 3 -1.</_>\n        <_>\n          4 1 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 3 -1.</_>\n        <_>\n          2 3 2 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 3 2 -1.</_>\n        <_>\n          3 16 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 8 1 2 -1.</_>\n        <_>\n          19 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 2 -1.</_>\n        <_>\n          8 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 9 2 -1.</_>\n        <_>\n          7 8 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 11 6 -1.</_>\n        <_>\n          6 13 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 5 -1.</_>\n        <_>\n          5 8 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 3 -1.</_>\n        <_>\n          10 12 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 14 18 -1.</_>\n        <_>\n          9 2 7 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 1 8 -1.</_>\n        <_>\n          8 5 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 2 -1.</_>\n        <_>\n          2 14 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 3 3 -1.</_>\n        <_>\n          7 14 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 3 -1.</_>\n        <_>\n          2 3 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 1 -1.</_>\n        <_>\n          6 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 9 1 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 3 -1.</_>\n        <_>\n          6 3 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 5 -1.</_>\n        <_>\n          5 0 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 2 -1.</_>\n        <_>\n          9 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 1 -1.</_>\n        <_>\n          5 0 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 4 -1.</_>\n        <_>\n          9 5 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 1 2 -1.</_>\n        <_>\n          18 4 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 4 -1.</_>\n        <_>\n          11 3 3 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 12 9 2 -1.</_>\n        <_>\n          8 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 2 2 -1.</_>\n        <_>\n          3 15 1 1 2.</_>\n        <_>\n          4 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 2 2 -1.</_>\n        <_>\n          3 15 1 1 2.</_>\n        <_>\n          4 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 4 -1.</_>\n        <_>\n          9 14 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 4 -1.</_>\n        <_>\n          9 14 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 17 1 3 -1.</_>\n        <_>\n          14 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 1 2 -1.</_>\n        <_>\n          15 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 3 2 -1.</_>\n        <_>\n          13 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 6 2 -1.</_>\n        <_>\n          13 18 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 19 2 1 -1.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 2 4 -1.</_>\n        <_>\n          2 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 3 -1.</_>\n        <_>\n          4 2 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 1 2 -1.</_>\n        <_>\n          3 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 2 -1.</_>\n        <_>\n          8 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 7 2 -1.</_>\n        <_>\n          2 6 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 3 -1.</_>\n        <_>\n          3 0 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 5 4 -1.</_>\n        <_>\n          12 5 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 1 3 17 -1.</_>\n        <_>\n          18 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 2 2 -1.</_>\n        <_>\n          7 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 1 8 -1.</_>\n        <_>\n          19 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 3 -1.</_>\n        <_>\n          14 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 2 -1.</_>\n        <_>\n          3 1 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 4 -1.</_>\n        <_>\n          15 3 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 2 2 -1.</_>\n        <_>\n          12 8 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 17 4 2 -1.</_>\n        <_>\n          9 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 1 -1.</_>\n        <_>\n          8 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 2 10 -1.</_>\n        <_>\n          13 3 1 5 2.</_>\n        <_>\n          14 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 4 -1.</_>\n        <_>\n          18 1 1 2 2.</_>\n        <_>\n          19 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 8 -1.</_>\n        <_>\n          16 3 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 14 -1.</_>\n        <_>\n          17 3 3 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 3 -1.</_>\n        <_>\n          9 7 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 3 -1.</_>\n        <_>\n          7 10 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 13 3 3 -1.</_>\n        <_>\n          11 14 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 15 7 4 -1.</_>\n        <_>\n          7 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 4 -1.</_>\n        <_>\n          6 1 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 3 1 -1.</_>\n        <_>\n          16 15 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 3 2 -1.</_>\n        <_>\n          4 11 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 2 -1.</_>\n        <_>\n          7 16 1 1 2.</_>\n        <_>\n          8 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 1 2 -1.</_>\n        <_>\n          0 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 4 -1.</_>\n        <_>\n          11 12 1 2 2.</_>\n        <_>\n          12 14 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 8 -1.</_>\n        <_>\n          11 9 1 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 3 -1.</_>\n        <_>\n          6 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 3 2 -1.</_>\n        <_>\n          11 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 14 2 -1.</_>\n        <_>\n          6 17 7 1 2.</_>\n        <_>\n          13 18 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 8 2 -1.</_>\n        <_>\n          2 18 4 1 2.</_>\n        <_>\n          6 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 4 2 -1.</_>\n        <_>\n          15 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          16 16 1 1 2.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 15 1 3 -1.</_>\n        <_>\n          18 16 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 6 -1.</_>\n        <_>\n          16 8 2 3 2.</_>\n        <_>\n          18 11 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 2 2 -1.</_>\n        <_>\n          6 17 1 1 2.</_>\n        <_>\n          7 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 3 -1.</_>\n        <_>\n          5 9 2 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 18 -1.</_>\n        <_>\n          4 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 10 4 -1.</_>\n        <_>\n          7 5 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 4 6 -1.</_>\n        <_>\n          3 9 2 3 2.</_>\n        <_>\n          5 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 8 7 -1.</_>\n        <_>\n          12 3 4 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 8 3 1 -1.</_>\n        <_>\n          15 9 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 12 -1.</_>\n        <_>\n          17 7 1 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 3 -1.</_>\n        <_>\n          6 13 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 17 6 -1.</_>\n        <_>\n          0 3 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 18 2 -1.</_>\n        <_>\n          6 18 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 3 2 -1.</_>\n        <_>\n          2 15 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 6 -1.</_>\n        <_>\n          19 1 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 4 -1.</_>\n        <_>\n          11 7 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 3 -1.</_>\n        <_>\n          7 11 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 8 -1.</_>\n        <_>\n          6 5 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 10 2 -1.</_>\n        <_>\n          2 8 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 6 5 -1.</_>\n        <_>\n          4 9 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 5 3 -1.</_>\n        <_>\n          7 8 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 3 10 -1.</_>\n        <_>\n          3 8 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 15 9 -1.</_>\n        <_>\n          4 5 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 9 3 -1.</_>\n        <_>\n          8 8 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 12 4 3 -1.</_>\n        <_>\n          2 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 1 -1.</_>\n        <_>\n          5 12 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 3 -1.</_>\n        <_>\n          10 10 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 1 2 -1.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 2 2 -1.</_>\n        <_>\n          0 18 1 1 2.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          8 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 9 6 -1.</_>\n        <_>\n          12 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 1 4 -1.</_>\n        <_>\n          5 17 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 4 1 -1.</_>\n        <_>\n          10 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 4 4 -1.</_>\n        <_>\n          15 1 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 3 -1.</_>\n        <_>\n          3 0 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 3 -1.</_>\n        <_>\n          2 0 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 2 -1.</_>\n        <_>\n          2 12 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 1 -1.</_>\n        <_>\n          6 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 9 3 -1.</_>\n        <_>\n          10 7 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 3 3 -1.</_>\n        <_>\n          15 15 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 1 3 -1.</_>\n        <_>\n          11 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 12 9 -1.</_>\n        <_>\n          0 9 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 10 -1.</_>\n        <_>\n          10 9 9 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 5 10 -1.</_>\n        <_>\n          12 8 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 12 14 -1.</_>\n        <_>\n          1 13 12 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 1 -1.</_>\n        <_>\n          13 5 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 3 -1.</_>\n        <_>\n          0 1 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 2 1 -1.</_>\n        <_>\n          1 11 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 5 -1.</_>\n        <_>\n          16 5 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 4 -1.</_>\n        <_>\n          16 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 4 -1.</_>\n        <_>\n          17 10 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 18 1 2 -1.</_>\n        <_>\n          18 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 1 -1.</_>\n        <_>\n          6 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 12 2 -1.</_>\n        <_>\n          7 2 6 1 2.</_>\n        <_>\n          13 3 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 6 -1.</_>\n        <_>\n          9 0 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 3 -1.</_>\n        <_>\n          3 1 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 19 4 1 -1.</_>\n        <_>\n          14 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 2 -1.</_>\n        <_>\n          12 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 2 -1.</_>\n        <_>\n          5 0 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 2 -1.</_>\n        <_>\n          15 0 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 3 12 -1.</_>\n        <_>\n          18 5 1 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 2 -1.</_>\n        <_>\n          5 0 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 12 2 -1.</_>\n        <_>\n          10 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 2 -1.</_>\n        <_>\n          10 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 15 6 -1.</_>\n        <_>\n          10 4 5 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 5 -1.</_>\n        <_>\n          8 6 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 3 3 -1.</_>\n        <_>\n          16 3 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 6 -1.</_>\n        <_>\n          4 4 9 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 9 2 1 -1.</_>\n        <_>\n          15 9 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 8 4 6 -1.</_>\n        <_>\n          3 8 2 3 2.</_>\n        <_>\n          5 11 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 16 10 -1.</_>\n        <_>\n          2 12 16 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 9 16 -1.</_>\n        <_>\n          10 3 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 1 6 -1.</_>\n        <_>\n          13 11 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 11 2 2 -1.</_>\n        <_>\n          2 11 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 4 3 -1.</_>\n        <_>\n          10 5 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 13 4 4 -1.</_>\n        <_>\n          13 15 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 4 3 -1.</_>\n        <_>\n          4 2 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 3 5 -1.</_>\n        <_>\n          1 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 6 -1.</_>\n        <_>\n          3 2 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 15 4 -1.</_>\n        <_>\n          4 10 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 20 -1.</_>\n        <_>\n          3 10 12 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 2 2 -1.</_>\n        <_>\n          1 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 8 -1.</_>\n        <_>\n          17 0 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 4 -1.</_>\n        <_>\n          17 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 6 -1.</_>\n        <_>\n          0 0 1 3 2.</_>\n        <_>\n          1 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 5 -1.</_>\n        <_>\n          17 11 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 14 12 3 -1.</_>\n        <_>\n          12 15 4 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 12 4 -1.</_>\n        <_>\n          8 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 4 3 -1.</_>\n        <_>\n          4 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 3 3 -1.</_>\n        <_>\n          0 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 1 14 -1.</_>\n        <_>\n          14 3 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 1 -1.</_>\n        <_>\n          10 0 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 8 1 -1.</_>\n        <_>\n          10 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 2 -1.</_>\n        <_>\n          17 9 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 4 -1.</_>\n        <_>\n          14 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 1 3 -1.</_>\n        <_>\n          0 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 1 3 -1.</_>\n        <_>\n          18 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 1 1 2.</_>\n        <_>\n          17 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 17 -1.</_>\n        <_>\n          16 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 6 4 -1.</_>\n        <_>\n          13 15 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 6 1 -1.</_>\n        <_>\n          14 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 1 4 -1.</_>\n        <_>\n          9 7 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 10 1 10 -1.</_>\n        <_>\n          9 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 14 -1.</_>\n        <_>\n          8 6 8 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 6 11 -1.</_>\n        <_>\n          3 6 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 6 -1.</_>\n        <_>\n          5 9 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 9 -1.</_>\n        <_>\n          15 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 3 6 -1.</_>\n        <_>\n          10 13 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 7 -1.</_>\n        <_>\n          13 5 2 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 12 1 2 -1.</_>\n        <_>\n          18 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 1 -1.</_>\n        <_>\n          18 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 15 3 -1.</_>\n        <_>\n          1 3 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 3 5 -1.</_>\n        <_>\n          4 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 3 -1.</_>\n        <_>\n          6 3 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 5 -1.</_>\n        <_>\n          9 1 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 5 -1.</_>\n        <_>\n          14 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 2 2 -1.</_>\n        <_>\n          8 10 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 10 12 4 -1.</_>\n        <_>\n          2 12 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 3 3 -1.</_>\n        <_>\n          2 6 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 6 -1.</_>\n        <_>\n          9 8 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 9 12 -1.</_>\n        <_>\n          7 9 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 1 3 -1.</_>\n        <_>\n          11 7 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 5 9 -1.</_>\n        <_>\n          11 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 1 -1.</_>\n        <_>\n          11 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 0 5 3 2.</_>\n        <_>\n          5 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 6 -1.</_>\n        <_>\n          2 2 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 3 -1.</_>\n        <_>\n          7 6 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 3 -1.</_>\n        <_>\n          4 1 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 15 2 3 -1.</_>\n        <_>\n          12 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 2 8 4 -1.</_>\n        <_>\n          12 2 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 6 -1.</_>\n        <_>\n          4 10 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 4 -1.</_>\n        <_>\n          17 1 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 2 -1.</_>\n        <_>\n          10 0 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 2 -1.</_>\n        <_>\n          2 0 9 1 2.</_>\n        <_>\n          11 1 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 2 -1.</_>\n        <_>\n          18 9 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 3 -1.</_>\n        <_>\n          4 3 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 20 -1.</_>\n        <_>\n          19 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 4 5 -1.</_>\n        <_>\n          17 12 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 1 -1.</_>\n        <_>\n          10 0 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 3 2 -1.</_>\n        <_>\n          16 12 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 2 -1.</_>\n        <_>\n          13 11 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 17 -1.</_>\n        <_>\n          1 1 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 2 3 -1.</_>\n        <_>\n          3 5 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 5 1 8 -1.</_>\n        <_>\n          18 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 1 -1.</_>\n        <_>\n          13 7 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 12 2 -1.</_>\n        <_>\n          7 4 6 1 2.</_>\n        <_>\n          13 5 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 6 2 -1.</_>\n        <_>\n          9 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 4 -1.</_>\n        <_>\n          5 1 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 1 -1.</_>\n        <_>\n          15 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 10 -1.</_>\n        <_>\n          10 4 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 1 3 -1.</_>\n        <_>\n          2 3 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 3 -1.</_>\n        <_>\n          3 13 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 19 4 1 -1.</_>\n        <_>\n          18 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 4 2 -1.</_>\n        <_>\n          4 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 3 -1.</_>\n        <_>\n          10 9 2 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 2 8 6 -1.</_>\n        <_>\n          12 4 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 1 -1.</_>\n        <_>\n          3 0 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 1 2.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 2 3 -1.</_>\n        <_>\n          17 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 1 2 -1.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 2 4 -1.</_>\n        <_>\n          15 9 1 2 2.</_>\n        <_>\n          16 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 16 4 -1.</_>\n        <_>\n          4 11 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 3 -1.</_>\n        <_>\n          15 6 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 4 -1.</_>\n        <_>\n          17 13 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 15 -1.</_>\n        <_>\n          18 8 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 12 -1.</_>\n        <_>\n          13 4 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 1 1 2.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 2 -1.</_>\n        <_>\n          0 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 1 2 -1.</_>\n        <_>\n          5 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 3 18 -1.</_>\n        <_>\n          3 2 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 2 3 -1.</_>\n        <_>\n          6 10 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 2 7 4 -1.</_>\n        <_>\n          8 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 1 -1.</_>\n        <_>\n          16 0 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 17 20 2 -1.</_>\n        <_>\n          5 17 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 6 1 -1.</_>\n        <_>\n          4 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 6 2 -1.</_>\n        <_>\n          8 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 2 -1.</_>\n        <_>\n          10 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 1 -1.</_>\n        <_>\n          12 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 20 2 -1.</_>\n        <_>\n          0 18 10 1 2.</_>\n        <_>\n          10 19 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 1 2 -1.</_>\n        <_>\n          15 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 2 1 -1.</_>\n        <_>\n          18 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 1 -1.</_>\n        <_>\n          17 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 2 -1.</_>\n        <_>\n          19 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 18 2 -1.</_>\n        <_>\n          2 18 9 1 2.</_>\n        <_>\n          11 19 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 1 3 -1.</_>\n        <_>\n          15 16 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 1 2 -1.</_>\n        <_>\n          2 9 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 3 -1.</_>\n        <_>\n          7 5 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 12 -1.</_>\n        <_>\n          7 9 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 3 4 -1.</_>\n        <_>\n          8 12 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 3 -1.</_>\n        <_>\n          18 5 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 1 -1.</_>\n        <_>\n          17 16 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 6 1 2 -1.</_>\n        <_>\n          7 6 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 1 -1.</_>\n        <_>\n          7 0 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 18 8 -1.</_>\n        <_>\n          6 7 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 4 6 -1.</_>\n        <_>\n          14 14 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 3 -1.</_>\n        <_>\n          5 11 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 2 -1.</_>\n        <_>\n          18 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 8 4 -1.</_>\n        <_>\n          13 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 20 -1.</_>\n        <_>\n          12 10 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 8 -1.</_>\n        <_>\n          19 0 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 14 -1.</_>\n        <_>\n          18 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 1 1 2.</_>\n        <_>\n          17 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 8 4 -1.</_>\n        <_>\n          9 15 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 14 10 -1.</_>\n        <_>\n          0 15 14 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 14 4 -1.</_>\n        <_>\n          1 9 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 11 4 -1.</_>\n        <_>\n          2 9 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 2 -1.</_>\n        <_>\n          4 0 3 1 2.</_>\n        <_>\n          7 1 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 4 2 -1.</_>\n        <_>\n          9 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 12 -1.</_>\n        <_>\n          7 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 10 2 6 -1.</_>\n        <_>\n          17 10 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 3 -1.</_>\n        <_>\n          8 0 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 1 -1.</_>\n        <_>\n          17 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 2 8 -1.</_>\n        <_>\n          17 3 1 4 2.</_>\n        <_>\n          18 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 8 -1.</_>\n        <_>\n          9 8 5 4 2.</_>\n        <_>\n          14 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 3 1 -1.</_>\n        <_>\n          10 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 14 -1.</_>\n        <_>\n          11 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 1 -1.</_>\n        <_>\n          12 12 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 14 9 6 -1.</_>\n        <_>\n          5 14 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 1 -1.</_>\n        <_>\n          17 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 9 2 -1.</_>\n        <_>\n          5 16 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 3 8 -1.</_>\n        <_>\n          4 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 7 4 -1.</_>\n        <_>\n          1 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 3 -1.</_>\n        <_>\n          5 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 2 -1.</_>\n        <_>\n          14 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 2 -1.</_>\n        <_>\n          7 10 1 1 2.</_>\n        <_>\n          8 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 4 7 -1.</_>\n        <_>\n          13 7 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 6 1 4 -1.</_>\n        <_>\n          18 7 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 14 4 2 -1.</_>\n        <_>\n          3 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 16 16 -1.</_>\n        <_>\n          0 6 16 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 1 -1.</_>\n        <_>\n          4 1 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 3 -1.</_>\n        <_>\n          7 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 9 -1.</_>\n        <_>\n          17 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 3 5 -1.</_>\n        <_>\n          8 13 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 4 -1.</_>\n        <_>\n          6 7 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 1 -1.</_>\n        <_>\n          18 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 16 -1.</_>\n        <_>\n          8 0 6 8 2.</_>\n        <_>\n          14 8 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 13 2 -1.</_>\n        <_>\n          4 5 13 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 2 -1.</_>\n        <_>\n          17 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 18 3 2 -1.</_>\n        <_>\n          17 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 3 3 -1.</_>\n        <_>\n          17 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 2 -1.</_>\n        <_>\n          11 5 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 4 -1.</_>\n        <_>\n          8 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 5 9 -1.</_>\n        <_>\n          14 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 9 2 -1.</_>\n        <_>\n          0 19 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 1 -1.</_>\n        <_>\n          18 4 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 12 5 3 -1.</_>\n        <_>\n          12 13 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 13 4 2 -1.</_>\n        <_>\n          10 14 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 3 -1.</_>\n        <_>\n          7 9 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 3 -1.</_>\n        <_>\n          15 4 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 18 4 1 -1.</_>\n        <_>\n          17 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 3 -1.</_>\n        <_>\n          5 0 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 2 -1.</_>\n        <_>\n          12 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 18 -1.</_>\n        <_>\n          0 2 1 9 2.</_>\n        <_>\n          1 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 8 7 -1.</_>\n        <_>\n          3 8 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 4 2 -1.</_>\n        <_>\n          12 18 2 1 2.</_>\n        <_>\n          14 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 16 12 -1.</_>\n        <_>\n          7 4 8 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 1 -1.</_>\n        <_>\n          7 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 12 8 -1.</_>\n        <_>\n          11 4 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 2 2 -1.</_>\n        <_>\n          8 16 1 1 2.</_>\n        <_>\n          9 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 3 3 -1.</_>\n        <_>\n          2 5 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 6 -1.</_>\n        <_>\n          9 7 1 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 2 -1.</_>\n        <_>\n          8 5 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 1 2 -1.</_>\n        <_>\n          14 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 1 -1.</_>\n        <_>\n          6 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 17 3 -1.</_>\n        <_>\n          1 10 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 9 3 -1.</_>\n        <_>\n          1 18 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 6 2 -1.</_>\n        <_>\n          4 17 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 2 2 -1.</_>\n        <_>\n          3 8 1 1 2.</_>\n        <_>\n          4 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 3 -1.</_>\n        <_>\n          16 9 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 2 -1.</_>\n        <_>\n          8 3 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 1 -1.</_>\n        <_>\n          4 9 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 4 -1.</_>\n        <_>\n          1 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 1 12 -1.</_>\n        <_>\n          6 9 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 4 2 -1.</_>\n        <_>\n          0 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 5 16 -1.</_>\n        <_>\n          2 8 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 6 -1.</_>\n        <_>\n          9 2 3 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 16 12 1 -1.</_>\n        <_>\n          8 16 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 2 -1.</_>\n        <_>\n          10 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 3 6 -1.</_>\n        <_>\n          15 9 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 8 4 7 -1.</_>\n        <_>\n          14 9 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 3 4 -1.</_>\n        <_>\n          15 8 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 1 1 16 -1.</_>\n        <_>\n          13 9 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 8 1 -1.</_>\n        <_>\n          9 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 5 -1.</_>\n        <_>\n          10 11 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 6 3 -1.</_>\n        <_>\n          6 13 2 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 16 1 2 -1.</_>\n        <_>\n          3 16 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 13 3 4 -1.</_>\n        <_>\n          4 14 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 8 8 -1.</_>\n        <_>\n          9 5 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 2 4 -1.</_>\n        <_>\n          17 5 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 14 3 4 -1.</_>\n        <_>\n          0 15 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          16 16 1 1 2.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 6 4 -1.</_>\n        <_>\n          8 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 2 1 -1.</_>\n        <_>\n          10 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 5 8 -1.</_>\n        <_>\n          14 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 8 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 7 -1.</_>\n        <_>\n          10 11 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 1 2 -1.</_>\n        <_>\n          2 5 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 11 3 -1.</_>\n        <_>\n          4 7 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 8 3 -1.</_>\n        <_>\n          5 5 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 3 -1.</_>\n        <_>\n          0 9 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 3 -1.</_>\n        <_>\n          15 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 3 1 -1.</_>\n        <_>\n          18 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 5 3 -1.</_>\n        <_>\n          15 7 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 8 2 -1.</_>\n        <_>\n          9 15 4 1 2.</_>\n        <_>\n          13 16 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 4 -1.</_>\n        <_>\n          0 4 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 2 -1.</_>\n        <_>\n          9 4 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 2 -1.</_>\n        <_>\n          15 3 1 1 2.</_>\n        <_>\n          16 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 12 -1.</_>\n        <_>\n          12 0 2 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 8 2 -1.</_>\n        <_>\n          10 7 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 13 -1.</_>\n        <_>\n          16 3 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 5 2 -1.</_>\n        <_>\n          11 11 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 2 -1.</_>\n        <_>\n          3 0 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 1 3 -1.</_>\n        <_>\n          3 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 1 -1.</_>\n        <_>\n          2 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 5 -1.</_>\n        <_>\n          7 0 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 1 2 -1.</_>\n        <_>\n          18 10 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 4 -1.</_>\n        <_>\n          4 7 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 1 -1.</_>\n        <_>\n          13 5 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 2 -1.</_>\n        <_>\n          0 5 4 1 2.</_>\n        <_>\n          4 6 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 10 13 -1.</_>\n        <_>\n          12 7 5 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 2 -1.</_>\n        <_>\n          18 4 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 2 -1.</_>\n        <_>\n          2 1 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 12 6 -1.</_>\n        <_>\n          4 10 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 2 -1.</_>\n        <_>\n          14 9 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 3 8 -1.</_>\n        <_>\n          11 9 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 4 6 -1.</_>\n        <_>\n          14 13 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 1 -1.</_>\n        <_>\n          9 0 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 2 -1.</_>\n        <_>\n          11 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 3 -1.</_>\n        <_>\n          13 1 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 2 1 -1.</_>\n        <_>\n          8 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 6 4 -1.</_>\n        <_>\n          6 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 2 3 -1.</_>\n        <_>\n          12 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 20 2 -1.</_>\n        <_>\n          0 18 10 1 2.</_>\n        <_>\n          10 19 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 18 2 -1.</_>\n        <_>\n          2 18 9 1 2.</_>\n        <_>\n          11 19 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 17 -1.</_>\n        <_>\n          5 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 4 -1.</_>\n        <_>\n          4 9 2 2 2.</_>\n        <_>\n          6 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 4 -1.</_>\n        <_>\n          5 11 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 2 2 12 -1.</_>\n        <_>\n          12 2 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 2 4 -1.</_>\n        <_>\n          1 9 1 2 2.</_>\n        <_>\n          2 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 2 1 -1.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 4 -1.</_>\n        <_>\n          15 7 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          16 16 1 1 2.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 2 1 -1.</_>\n        <_>\n          16 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 18 10 -1.</_>\n        <_>\n          2 3 9 5 2.</_>\n        <_>\n          11 8 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 2 2 -1.</_>\n        <_>\n          15 17 1 1 2.</_>\n        <_>\n          16 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 10 -1.</_>\n        <_>\n          7 1 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 2 -1.</_>\n        <_>\n          5 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 4 2 -1.</_>\n        <_>\n          15 10 2 1 2.</_>\n        <_>\n          17 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 1 4 -1.</_>\n        <_>\n          0 13 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 13 -1.</_>\n        <_>\n          10 7 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 11 6 -1.</_>\n        <_>\n          8 7 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 3 3 -1.</_>\n        <_>\n          8 15 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 2 11 -1.</_>\n        <_>\n          1 9 1 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 4 2 -1.</_>\n        <_>\n          5 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 1 -1.</_>\n        <_>\n          10 7 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 1 5 4 -1.</_>\n        <_>\n          5 2 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 4 3 -1.</_>\n        <_>\n          16 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 3 -1.</_>\n        <_>\n          0 2 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 3 -1.</_>\n        <_>\n          9 10 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 3 -1.</_>\n        <_>\n          18 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 4 6 -1.</_>\n        <_>\n          5 13 2 3 2.</_>\n        <_>\n          7 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 17 -1.</_>\n        <_>\n          1 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 3 -1.</_>\n        <_>\n          9 8 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 8 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 5 6 -1.</_>\n        <_>\n          7 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 2 9 -1.</_>\n        <_>\n          12 7 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 2 -1.</_>\n        <_>\n          15 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 3 -1.</_>\n        <_>\n          12 9 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 2 3 -1.</_>\n        <_>\n          4 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 14 3 -1.</_>\n        <_>\n          6 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 14 4 -1.</_>\n        <_>\n          0 11 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 4 -1.</_>\n        <_>\n          13 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 3 -1.</_>\n        <_>\n          4 2 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 2 2 -1.</_>\n        <_>\n          17 17 1 1 2.</_>\n        <_>\n          18 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 16 1 1 2.</_>\n        <_>\n          19 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 1 3 -1.</_>\n        <_>\n          17 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 1 -1.</_>\n        <_>\n          6 8 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 1 -1.</_>\n        <_>\n          9 8 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 1 -1.</_>\n        <_>\n          10 7 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 3 10 -1.</_>\n        <_>\n          4 9 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 6 3 -1.</_>\n        <_>\n          7 15 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 12 -1.</_>\n        <_>\n          0 4 1 6 2.</_>\n        <_>\n          1 10 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 10 -1.</_>\n        <_>\n          5 2 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 1 -1.</_>\n        <_>\n          5 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 4 6 -1.</_>\n        <_>\n          15 8 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 2 -1.</_>\n        <_>\n          18 6 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 5 -1.</_>\n        <_>\n          10 10 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 2 2 -1.</_>\n        <_>\n          7 17 1 1 2.</_>\n        <_>\n          8 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 4 1 -1.</_>\n        <_>\n          6 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 3 -1.</_>\n        <_>\n          9 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 1 4 -1.</_>\n        <_>\n          16 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 13 2 3 -1.</_>\n        <_>\n          16 14 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 8 13 10 -1.</_>\n        <_>\n          3 13 13 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 1 -1.</_>\n        <_>\n          12 9 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 5 15 6 -1.</_>\n        <_>\n          7 7 5 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 2 -1.</_>\n        <_>\n          17 1 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 3 -1.</_>\n        <_>\n          0 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 2 -1.</_>\n        <_>\n          11 1 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 2 2 -1.</_>\n        <_>\n          12 5 1 1 2.</_>\n        <_>\n          13 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 2 -1.</_>\n        <_>\n          12 0 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 3 3 -1.</_>\n        <_>\n          11 10 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 8 2 -1.</_>\n        <_>\n          12 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 9 2 -1.</_>\n        <_>\n          8 19 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 4 -1.</_>\n        <_>\n          6 1 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 12 4 -1.</_>\n        <_>\n          3 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 9 -1.</_>\n        <_>\n          10 7 2 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 4 -1.</_>\n        <_>\n          5 15 6 2 2.</_>\n        <_>\n          11 17 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 14 10 -1.</_>\n        <_>\n          13 3 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 2 -1.</_>\n        <_>\n          11 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 3 1 -1.</_>\n        <_>\n          12 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 4 -1.</_>\n        <_>\n          15 16 1 2 2.</_>\n        <_>\n          16 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 4 -1.</_>\n        <_>\n          3 11 7 2 2.</_>\n        <_>\n          10 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 16 1 -1.</_>\n        <_>\n          5 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 2 1 -1.</_>\n        <_>\n          4 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 1 8 -1.</_>\n        <_>\n          10 9 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 16 -1.</_>\n        <_>\n          18 3 1 8 2.</_>\n        <_>\n          19 11 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 3 -1.</_>\n        <_>\n          5 9 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 3 -1.</_>\n        <_>\n          7 15 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 2 2 -1.</_>\n        <_>\n          7 1 1 1 2.</_>\n        <_>\n          8 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 11 -1.</_>\n        <_>\n          9 5 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 14 -1.</_>\n        <_>\n          14 0 4 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 1 2 8 -1.</_>\n        <_>\n          16 1 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 3 4 -1.</_>\n        <_>\n          0 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 9 -1.</_>\n        <_>\n          8 12 3 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 6 -1.</_>\n        <_>\n          10 9 4 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 9 -1.</_>\n        <_>\n          7 5 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 16 2 -1.</_>\n        <_>\n          10 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 3 -1.</_>\n        <_>\n          8 1 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 3 -1.</_>\n        <_>\n          11 1 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 1 2 -1.</_>\n        <_>\n          18 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 2 -1.</_>\n        <_>\n          8 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 4 -1.</_>\n        <_>\n          5 7 1 2 2.</_>\n        <_>\n          6 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 9 1 -1.</_>\n        <_>\n          5 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 9 -1.</_>\n        <_>\n          5 13 2 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 7 3 -1.</_>\n        <_>\n          0 10 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 16 1 -1.</_>\n        <_>\n          8 9 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 3 -1.</_>\n        <_>\n          5 2 12 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 9 9 1 -1.</_>\n        <_>\n          12 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 10 -1.</_>\n        <_>\n          14 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 8 -1.</_>\n        <_>\n          5 10 2 4 2.</_>\n        <_>\n          7 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 10 -1.</_>\n        <_>\n          0 0 8 5 2.</_>\n        <_>\n          8 5 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 2 4 -1.</_>\n        <_>\n          5 15 1 2 2.</_>\n        <_>\n          6 17 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 16 -1.</_>\n        <_>\n          17 2 3 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 1 -1.</_>\n        <_>\n          9 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 12 2 2 -1.</_>\n        <_>\n          18 12 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 18 -1.</_>\n        <_>\n          17 6 1 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 3 -1.</_>\n        <_>\n          10 2 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 2 1 -1.</_>\n        <_>\n          2 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 3 -1.</_>\n        <_>\n          11 0 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 3 -1.</_>\n        <_>\n          11 0 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 1 6 -1.</_>\n        <_>\n          18 9 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 3 -1.</_>\n        <_>\n          5 10 2 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 2 6 -1.</_>\n        <_>\n          15 9 1 3 2.</_>\n        <_>\n          16 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 4 1 -1.</_>\n        <_>\n          13 7 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 14 -1.</_>\n        <_>\n          7 6 6 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 4 2 -1.</_>\n        <_>\n          15 10 2 1 2.</_>\n        <_>\n          17 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 7 -1.</_>\n        <_>\n          16 8 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 2 10 -1.</_>\n        <_>\n          1 10 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 12 -1.</_>\n        <_>\n          19 0 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 10 1 -1.</_>\n        <_>\n          4 7 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 2 -1.</_>\n        <_>\n          12 2 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 2 -1.</_>\n        <_>\n          8 8 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 4 3 -1.</_>\n        <_>\n          13 11 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 5 6 -1.</_>\n        <_>\n          10 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 5 8 -1.</_>\n        <_>\n          9 7 5 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 2 2 3 -1.</_>\n        <_>\n          16 2 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 13 9 -1.</_>\n        <_>\n          4 5 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 2 -1.</_>\n        <_>\n          11 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 2 -1.</_>\n        <_>\n          0 1 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 12 -1.</_>\n        <_>\n          12 2 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 17 1 3 -1.</_>\n        <_>\n          19 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 18 1 2 -1.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 4 -1.</_>\n        <_>\n          13 4 1 2 2.</_>\n        <_>\n          14 6 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 1 4 -1.</_>\n        <_>\n          13 8 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 10 3 1 -1.</_>\n        <_>\n          2 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 1 4 -1.</_>\n        <_>\n          17 10 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 4 -1.</_>\n        <_>\n          8 9 3 2 2.</_>\n        <_>\n          11 11 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 15 3 -1.</_>\n        <_>\n          0 10 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 3 -1.</_>\n        <_>\n          15 7 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 9 4 -1.</_>\n        <_>\n          11 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 1 6 -1.</_>\n        <_>\n          16 5 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 17 4 3 -1.</_>\n        <_>\n          8 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 1 4 -1.</_>\n        <_>\n          3 6 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 16 3 4 -1.</_>\n        <_>\n          17 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 4 3 -1.</_>\n        <_>\n          14 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 3 -1.</_>\n        <_>\n          6 4 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 1 8 -1.</_>\n        <_>\n          9 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 1 -1.</_>\n        <_>\n          17 0 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 1 -1.</_>\n        <_>\n          15 3 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 4 -1.</_>\n        <_>\n          17 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 2 4 -1.</_>\n        <_>\n          17 5 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 3 -1.</_>\n        <_>\n          12 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 7 -1.</_>\n        <_>\n          18 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 5 2 -1.</_>\n        <_>\n          15 8 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 3 1 -1.</_>\n        <_>\n          17 8 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 3 6 -1.</_>\n        <_>\n          1 10 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 13 -1.</_>\n        <_>\n          10 4 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 2 -1.</_>\n        <_>\n          6 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 3 -1.</_>\n        <_>\n          7 11 2 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 2 -1.</_>\n        <_>\n          6 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 3 -1.</_>\n        <_>\n          9 8 3 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 6 -1.</_>\n        <_>\n          1 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 1 3 -1.</_>\n        <_>\n          10 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 4 2 -1.</_>\n        <_>\n          8 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 10 2 -1.</_>\n        <_>\n          1 18 5 1 2.</_>\n        <_>\n          6 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 2 -1.</_>\n        <_>\n          6 0 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 3 -1.</_>\n        <_>\n          10 7 2 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 7 9 -1.</_>\n        <_>\n          6 8 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 2 4 -1.</_>\n        <_>\n          16 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 10 6 -1.</_>\n        <_>\n          9 7 5 3 2.</_>\n        <_>\n          14 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 8 4 -1.</_>\n        <_>\n          8 6 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 14 6 6 -1.</_>\n        <_>\n          3 16 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 6 6 -1.</_>\n        <_>\n          5 14 3 3 2.</_>\n        <_>\n          8 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 4 6 -1.</_>\n        <_>\n          3 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 20 -1.</_>\n        <_>\n          3 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 10 3 -1.</_>\n        <_>\n          4 7 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 10 4 6 -1.</_>\n        <_>\n          1 10 2 3 2.</_>\n        <_>\n          3 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 10 -1.</_>\n        <_>\n          4 14 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 2 -1.</_>\n        <_>\n          4 7 1 1 2.</_>\n        <_>\n          5 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 6 2 -1.</_>\n        <_>\n          0 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 10 -1.</_>\n        <_>\n          19 0 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 12 -1.</_>\n        <_>\n          9 5 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 2 4 -1.</_>\n        <_>\n          3 15 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 17 4 1 -1.</_>\n        <_>\n          9 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 10 4 -1.</_>\n        <_>\n          1 9 5 2 2.</_>\n        <_>\n          6 11 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 1 -1.</_>\n        <_>\n          6 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 2 2 -1.</_>\n        <_>\n          14 7 1 1 2.</_>\n        <_>\n          15 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 3 3 -1.</_>\n        <_>\n          14 8 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 1 -1.</_>\n        <_>\n          9 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 7 -1.</_>\n        <_>\n          12 0 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 4 -1.</_>\n        <_>\n          16 0 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 7 -1.</_>\n        <_>\n          10 0 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 2 -1.</_>\n        <_>\n          9 1 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 1 -1.</_>\n        <_>\n          7 9 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 17 6 3 -1.</_>\n        <_>\n          5 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 12 1 -1.</_>\n        <_>\n          4 19 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 8 1 -1.</_>\n        <_>\n          14 14 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 6 -1.</_>\n        <_>\n          8 12 4 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 8 6 -1.</_>\n        <_>\n          14 4 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 8 -1.</_>\n        <_>\n          9 2 1 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 18 19 2 -1.</_>\n        <_>\n          1 19 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 2 -1.</_>\n        <_>\n          10 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 8 3 -1.</_>\n        <_>\n          10 3 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 9 1 -1.</_>\n        <_>\n          7 0 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 8 1 -1.</_>\n        <_>\n          13 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 2 -1.</_>\n        <_>\n          7 2 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 3 3 -1.</_>\n        <_>\n          1 12 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 12 9 -1.</_>\n        <_>\n          4 10 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 3 -1.</_>\n        <_>\n          6 0 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 2 -1.</_>\n        <_>\n          18 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 4 4 -1.</_>\n        <_>\n          14 10 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 3 -1.</_>\n        <_>\n          6 11 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 1 2 -1.</_>\n        <_>\n          4 5 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 1 -1.</_>\n        <_>\n          2 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 3 2 -1.</_>\n        <_>\n          1 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 6 -1.</_>\n        <_>\n          0 2 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 12 10 -1.</_>\n        <_>\n          0 10 6 5 2.</_>\n        <_>\n          6 15 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 2 -1.</_>\n        <_>\n          7 16 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 3 -1.</_>\n        <_>\n          13 9 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 1 2 -1.</_>\n        <_>\n          6 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 1 2 2 -1.</_>\n        <_>\n          17 1 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 10 1 2 -1.</_>\n        <_>\n          15 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 3 6 -1.</_>\n        <_>\n          17 10 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 16 9 -1.</_>\n        <_>\n          6 8 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 3 -1.</_>\n        <_>\n          14 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 4 -1.</_>\n        <_>\n          9 6 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 17 2 2 -1.</_>\n        <_>\n          4 17 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 4 -1.</_>\n        <_>\n          0 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 1 -1.</_>\n        <_>\n          9 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 4 4 -1.</_>\n        <_>\n          15 9 2 2 2.</_>\n        <_>\n          17 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 1 -1.</_>\n        <_>\n          5 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 3 2 -1.</_>\n        <_>\n          14 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 13 8 -1.</_>\n        <_>\n          2 16 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 3 -1.</_>\n        <_>\n          16 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 6 -1.</_>\n        <_>\n          10 7 1 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 12 4 -1.</_>\n        <_>\n          1 10 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 17 -1.</_>\n        <_>\n          14 2 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 8 2 -1.</_>\n        <_>\n          10 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 4 2 -1.</_>\n        <_>\n          2 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 10 4 -1.</_>\n        <_>\n          10 15 5 2 2.</_>\n        <_>\n          15 17 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 14 -1.</_>\n        <_>\n          16 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 6 12 -1.</_>\n        <_>\n          3 14 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 1 2 -1.</_>\n        <_>\n          4 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 12 6 -1.</_>\n        <_>\n          7 10 4 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 7 -1.</_>\n        <_>\n          19 3 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 6 -1.</_>\n        <_>\n          14 7 4 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 9 2 4 -1.</_>\n        <_>\n          13 10 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 2 -1.</_>\n        <_>\n          10 1 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 5 -1.</_>\n        <_>\n          3 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 1 -1.</_>\n        <_>\n          19 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 1 3 -1.</_>\n        <_>\n          12 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 2 -1.</_>\n        <_>\n          10 12 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 6 -1.</_>\n        <_>\n          4 1 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 12 -1.</_>\n        <_>\n          4 4 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 2 3 -1.</_>\n        <_>\n          2 4 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 2 3 -1.</_>\n        <_>\n          6 10 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 5 -1.</_>\n        <_>\n          9 4 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 9 4 -1.</_>\n        <_>\n          13 3 3 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 15 3 3 -1.</_>\n        <_>\n          0 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 2 3 -1.</_>\n        <_>\n          5 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 2 8 -1.</_>\n        <_>\n          7 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 5 2 -1.</_>\n        <_>\n          3 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 1 2 -1.</_>\n        <_>\n          18 10 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 18 -1.</_>\n        <_>\n          0 9 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 2 -1.</_>\n        <_>\n          8 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 5 4 -1.</_>\n        <_>\n          10 8 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 4 12 -1.</_>\n        <_>\n          14 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 4 -1.</_>\n        <_>\n          1 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 6 3 -1.</_>\n        <_>\n          15 15 2 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 4 8 -1.</_>\n        <_>\n          10 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 2 -1.</_>\n        <_>\n          6 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 8 2 -1.</_>\n        <_>\n          7 15 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 2 2 -1.</_>\n        <_>\n          17 6 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 2 -1.</_>\n        <_>\n          5 1 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 3 -1.</_>\n        <_>\n          0 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 5 3 -1.</_>\n        <_>\n          7 1 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 2 -1.</_>\n        <_>\n          0 1 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 2 -1.</_>\n        <_>\n          5 8 2 1 2.</_>\n        <_>\n          7 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 2 -1.</_>\n        <_>\n          14 5 3 1 2.</_>\n        <_>\n          17 6 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 2 4 -1.</_>\n        <_>\n          3 1 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 1 2 -1.</_>\n        <_>\n          2 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 4 -1.</_>\n        <_>\n          0 0 1 2 2.</_>\n        <_>\n          1 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 10 -1.</_>\n        <_>\n          8 0 4 5 2.</_>\n        <_>\n          12 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 2 8 -1.</_>\n        <_>\n          3 5 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 9 2 -1.</_>\n        <_>\n          10 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 2 3 -1.</_>\n        <_>\n          6 3 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 13 2 2 -1.</_>\n        <_>\n          11 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 5 -1.</_>\n        <_>\n          17 2 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 12 6 -1.</_>\n        <_>\n          11 12 4 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 2 7 -1.</_>\n        <_>\n          15 6 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 1 3 -1.</_>\n        <_>\n          18 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 2 -1.</_>\n        <_>\n          18 9 1 1 2.</_>\n        <_>\n          19 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 4 -1.</_>\n        <_>\n          16 7 2 2 2.</_>\n        <_>\n          18 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 6 -1.</_>\n        <_>\n          14 10 3 3 2.</_>\n        <_>\n          17 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 2 4 -1.</_>\n        <_>\n          8 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 11 2 8 -1.</_>\n        <_>\n          18 11 1 4 2.</_>\n        <_>\n          19 15 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 12 -1.</_>\n        <_>\n          7 8 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 9 -1.</_>\n        <_>\n          5 7 10 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 4 -1.</_>\n        <_>\n          13 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 4 -1.</_>\n        <_>\n          5 4 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 3 3 12 -1.</_>\n        <_>\n          14 3 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 8 6 -1.</_>\n        <_>\n          11 7 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 5 -1.</_>\n        <_>\n          18 8 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 6 6 -1.</_>\n        <_>\n          5 13 2 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 5 -1.</_>\n        <_>\n          15 6 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 3 -1.</_>\n        <_>\n          7 10 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 2 -1.</_>\n        <_>\n          9 10 3 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 12 -1.</_>\n        <_>\n          7 8 1 6 2.</_>\n        <_>\n          8 14 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 3 2 -1.</_>\n        <_>\n          6 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 3 4 -1.</_>\n        <_>\n          5 6 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 10 -1.</_>\n        <_>\n          11 1 6 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 6 1 -1.</_>\n        <_>\n          2 6 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 6 1 6 -1.</_>\n        <_>\n          14 8 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 6 1 3 -1.</_>\n        <_>\n          13 7 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 3 -1.</_>\n        <_>\n          6 7 6 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 3 -1.</_>\n        <_>\n          14 7 3 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 3 -1.</_>\n        <_>\n          7 12 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 8 2 8 -1.</_>\n        <_>\n          18 8 1 4 2.</_>\n        <_>\n          19 12 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 4 2 -1.</_>\n        <_>\n          16 2 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 10 -1.</_>\n        <_>\n          14 0 1 5 2.</_>\n        <_>\n          15 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 2 6 -1.</_>\n        <_>\n          10 1 1 3 2.</_>\n        <_>\n          11 4 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 2 3 -1.</_>\n        <_>\n          17 2 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 1 -1.</_>\n        <_>\n          14 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 2 -1.</_>\n        <_>\n          0 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 3 4 -1.</_>\n        <_>\n          13 12 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 12 8 7 -1.</_>\n        <_>\n          10 12 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 8 -1.</_>\n        <_>\n          4 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 2 -1.</_>\n        <_>\n          18 17 1 1 2.</_>\n        <_>\n          19 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 1 2 -1.</_>\n        <_>\n          5 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 1 -1.</_>\n        <_>\n          3 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 12 -1.</_>\n        <_>\n          9 6 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 12 -1.</_>\n        <_>\n          18 2 1 6 2.</_>\n        <_>\n          19 8 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 9 3 -1.</_>\n        <_>\n          2 17 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 10 9 -1.</_>\n        <_>\n          10 12 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 3 4 -1.</_>\n        <_>\n          13 15 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 1 3 -1.</_>\n        <_>\n          8 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 5 3 -1.</_>\n        <_>\n          2 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 19 6 1 -1.</_>\n        <_>\n          13 19 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 15 -1.</_>\n        <_>\n          11 6 2 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 8 -1.</_>\n        <_>\n          15 10 1 4 2.</_>\n        <_>\n          16 14 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 12 -1.</_>\n        <_>\n          2 11 2 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 9 4 -1.</_>\n        <_>\n          11 2 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 3 -1.</_>\n        <_>\n          5 9 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 8 3 4 -1.</_>\n        <_>\n          15 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 4 -1.</_>\n        <_>\n          11 13 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 14 -1.</_>\n        <_>\n          10 0 10 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 11 -1.</_>\n        <_>\n          2 9 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 17 -1.</_>\n        <_>\n          3 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 7 -1.</_>\n        <_>\n          7 0 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 6 -1.</_>\n        <_>\n          9 3 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 20 -1.</_>\n        <_>\n          6 0 7 10 2.</_>\n        <_>\n          13 10 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 2 -1.</_>\n        <_>\n          18 6 1 1 2.</_>\n        <_>\n          19 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 3 -1.</_>\n        <_>\n          14 10 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 11 2 6 -1.</_>\n        <_>\n          8 13 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 15 2 1 -1.</_>\n        <_>\n          18 15 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 16 4 2 -1.</_>\n        <_>\n          9 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 4 1 -1.</_>\n        <_>\n          7 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 5 -1.</_>\n        <_>\n          10 0 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 9 3 -1.</_>\n        <_>\n          6 5 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 2 -1.</_>\n        <_>\n          15 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 20 -1.</_>\n        <_>\n          6 5 9 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 11 12 -1.</_>\n        <_>\n          0 13 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 10 1 -1.</_>\n        <_>\n          1 8 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 2 10 -1.</_>\n        <_>\n          12 6 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 1 6 -1.</_>\n        <_>\n          18 8 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 1 -1.</_>\n        <_>\n          9 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 9 4 -1.</_>\n        <_>\n          14 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 7 4 -1.</_>\n        <_>\n          11 9 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 6 -1.</_>\n        <_>\n          4 9 1 3 2.</_>\n        <_>\n          5 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 2 8 -1.</_>\n        <_>\n          15 8 1 4 2.</_>\n        <_>\n          16 12 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 9 2 -1.</_>\n        <_>\n          1 17 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 12 -1.</_>\n        <_>\n          5 5 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 2 10 -1.</_>\n        <_>\n          2 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 5 -1.</_>\n        <_>\n          5 0 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 2 -1.</_>\n        <_>\n          16 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 8 2 -1.</_>\n        <_>\n          12 1 4 1 2.</_>\n        <_>\n          16 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 8 6 -1.</_>\n        <_>\n          5 5 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 4 -1.</_>\n        <_>\n          4 2 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 1 14 -1.</_>\n        <_>\n          6 10 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 10 -1.</_>\n        <_>\n          15 10 1 5 2.</_>\n        <_>\n          16 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 9 4 -1.</_>\n        <_>\n          13 2 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 1 9 -1.</_>\n        <_>\n          15 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 2 -1.</_>\n        <_>\n          5 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 2 -1.</_>\n        <_>\n          15 5 2 1 2.</_>\n        <_>\n          17 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 4 -1.</_>\n        <_>\n          8 3 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 1 2 -1.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 6 3 -1.</_>\n        <_>\n          3 14 2 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 14 2 -1.</_>\n        <_>\n          2 16 7 1 2.</_>\n        <_>\n          9 17 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 3 -1.</_>\n        <_>\n          5 0 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 1 -1.</_>\n        <_>\n          9 7 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 3 -1.</_>\n        <_>\n          10 7 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 10 2 -1.</_>\n        <_>\n          4 12 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 15 6 -1.</_>\n        <_>\n          0 10 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 8 1 -1.</_>\n        <_>\n          5 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 3 2 -1.</_>\n        <_>\n          15 3 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 1 3 4 -1.</_>\n        <_>\n          18 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 4 2 -1.</_>\n        <_>\n          10 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 2 3 -1.</_>\n        <_>\n          11 9 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 2 -1.</_>\n        <_>\n          5 7 2 1 2.</_>\n        <_>\n          7 8 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 5 -1.</_>\n        <_>\n          6 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 10 6 -1.</_>\n        <_>\n          7 9 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 9 16 -1.</_>\n        <_>\n          7 3 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 8 -1.</_>\n        <_>\n          5 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 2 3 -1.</_>\n        <_>\n          17 7 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 1 12 -1.</_>\n        <_>\n          16 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 5 2 -1.</_>\n        <_>\n          13 5 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 3 -1.</_>\n        <_>\n          17 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 9 6 -1.</_>\n        <_>\n          13 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 13 4 -1.</_>\n        <_>\n          7 8 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 2 -1.</_>\n        <_>\n          13 11 3 1 2.</_>\n        <_>\n          16 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 5 3 -1.</_>\n        <_>\n          10 3 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 4 2 -1.</_>\n        <_>\n          1 8 2 1 2.</_>\n        <_>\n          3 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 8 1 4 -1.</_>\n        <_>\n          19 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 2 -1.</_>\n        <_>\n          5 10 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 15 9 -1.</_>\n        <_>\n          9 7 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 11 -1.</_>\n        <_>\n          11 0 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 3 -1.</_>\n        <_>\n          16 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 3 3 -1.</_>\n        <_>\n          14 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 4 6 -1.</_>\n        <_>\n          13 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 1 6 -1.</_>\n        <_>\n          8 12 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 19 12 1 -1.</_>\n        <_>\n          11 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 2 2 -1.</_>\n        <_>\n          14 16 1 1 2.</_>\n        <_>\n          15 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 1 4 -1.</_>\n        <_>\n          3 9 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 2 -1.</_>\n        <_>\n          6 9 2 1 2.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 1 -1.</_>\n        <_>\n          2 2 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 1 -1.</_>\n        <_>\n          13 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 2 6 -1.</_>\n        <_>\n          13 3 1 3 2.</_>\n        <_>\n          14 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 5 -1.</_>\n        <_>\n          8 9 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 2 17 -1.</_>\n        <_>\n          7 1 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 4 11 -1.</_>\n        <_>\n          17 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 2 1 -1.</_>\n        <_>\n          13 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 3 -1.</_>\n        <_>\n          15 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 4 -1.</_>\n        <_>\n          1 6 1 2 2.</_>\n        <_>\n          2 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 2 12 -1.</_>\n        <_>\n          3 7 1 6 2.</_>\n        <_>\n          4 13 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 2 2 -1.</_>\n        <_>\n          2 18 1 1 2.</_>\n        <_>\n          3 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 7 -1.</_>\n        <_>\n          8 9 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 4 -1.</_>\n        <_>\n          19 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 3 2 -1.</_>\n        <_>\n          5 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 8 5 -1.</_>\n        <_>\n          10 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 8 3 -1.</_>\n        <_>\n          4 16 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 1 4 -1.</_>\n        <_>\n          2 5 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 1 3 -1.</_>\n        <_>\n          0 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 8 3 -1.</_>\n        <_>\n          9 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 19 8 1 -1.</_>\n        <_>\n          9 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          0 0 3 3 2.</_>\n        <_>\n          3 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 2 -1.</_>\n        <_>\n          9 5 1 1 2.</_>\n        <_>\n          10 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 1 3 -1.</_>\n        <_>\n          8 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 12 2 -1.</_>\n        <_>\n          8 18 6 1 2.</_>\n        <_>\n          14 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 1 -1.</_>\n        <_>\n          10 9 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          8 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 18 -1.</_>\n        <_>\n          1 2 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 12 1 -1.</_>\n        <_>\n          3 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 1 -1.</_>\n        <_>\n          3 12 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 11 14 5 -1.</_>\n        <_>\n          13 11 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 10 -1.</_>\n        <_>\n          15 4 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 1 -1.</_>\n        <_>\n          3 0 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 1 12 -1.</_>\n        <_>\n          15 10 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 4 2 -1.</_>\n        <_>\n          15 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 11 -1.</_>\n        <_>\n          9 9 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 2 2 -1.</_>\n        <_>\n          12 10 1 1 2.</_>\n        <_>\n          13 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 6 13 -1.</_>\n        <_>\n          5 3 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 3 -1.</_>\n        <_>\n          16 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 6 -1.</_>\n        <_>\n          7 7 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 1 -1.</_>\n        <_>\n          18 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 16 1 1 2.</_>\n        <_>\n          19 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 8 2 -1.</_>\n        <_>\n          12 2 4 1 2.</_>\n        <_>\n          16 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 10 4 -1.</_>\n        <_>\n          4 2 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 3 -1.</_>\n        <_>\n          3 1 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 8 -1.</_>\n        <_>\n          10 9 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 15 2 2 -1.</_>\n        <_>\n          1 15 1 1 2.</_>\n        <_>\n          2 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 2 -1.</_>\n        <_>\n          7 16 1 1 2.</_>\n        <_>\n          8 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 12 -1.</_>\n        <_>\n          0 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 8 -1.</_>\n        <_>\n          10 6 2 4 2.</_>\n        <_>\n          12 10 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 2 4 -1.</_>\n        <_>\n          12 6 1 2 2.</_>\n        <_>\n          13 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 4 2 -1.</_>\n        <_>\n          3 12 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 8 1 -1.</_>\n        <_>\n          9 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 3 16 -1.</_>\n        <_>\n          4 1 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 9 -1.</_>\n        <_>\n          10 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 3 3 -1.</_>\n        <_>\n          17 14 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 12 -1.</_>\n        <_>\n          14 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 19 6 1 -1.</_>\n        <_>\n          16 19 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 8 5 -1.</_>\n        <_>\n          9 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 8 3 -1.</_>\n        <_>\n          11 5 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 10 -1.</_>\n        <_>\n          9 14 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 2 -1.</_>\n        <_>\n          17 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 2 -1.</_>\n        <_>\n          4 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 2 1 -1.</_>\n        <_>\n          14 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 2 3 -1.</_>\n        <_>\n          17 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 2 2 -1.</_>\n        <_>\n          15 14 1 1 2.</_>\n        <_>\n          16 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 4 2 -1.</_>\n        <_>\n          16 18 2 1 2.</_>\n        <_>\n          18 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 3 2 -1.</_>\n        <_>\n          5 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 11 2 -1.</_>\n        <_>\n          1 1 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 10 2 -1.</_>\n        <_>\n          2 1 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 1 -1.</_>\n        <_>\n          8 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 4 6 -1.</_>\n        <_>\n          2 9 2 3 2.</_>\n        <_>\n          4 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 14 -1.</_>\n        <_>\n          15 6 2 7 2.</_>\n        <_>\n          17 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 12 -1.</_>\n        <_>\n          12 6 2 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 15 -1.</_>\n        <_>\n          10 10 2 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 5 -1.</_>\n        <_>\n          18 9 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 6 -1.</_>\n        <_>\n          12 8 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 12 -1.</_>\n        <_>\n          18 8 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 4 -1.</_>\n        <_>\n          5 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 6 -1.</_>\n        <_>\n          16 0 2 3 2.</_>\n        <_>\n          18 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 10 -1.</_>\n        <_>\n          15 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 2 3 -1.</_>\n        <_>\n          15 8 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 3 -1.</_>\n        <_>\n          2 2 14 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 13 -1.</_>\n        <_>\n          1 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 12 -1.</_>\n        <_>\n          4 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 5 -1.</_>\n        <_>\n          10 9 2 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 8 1 12 -1.</_>\n        <_>\n          9 12 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 4 -1.</_>\n        <_>\n          2 0 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 2 -1.</_>\n        <_>\n          8 8 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 6 -1.</_>\n        <_>\n          5 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 6 -1.</_>\n        <_>\n          13 1 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 9 2 -1.</_>\n        <_>\n          3 0 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 2 -1.</_>\n        <_>\n          12 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 2 2 -1.</_>\n        <_>\n          14 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 8 4 -1.</_>\n        <_>\n          12 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 1 2 -1.</_>\n        <_>\n          4 11 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 9 6 -1.</_>\n        <_>\n          11 4 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 6 -1.</_>\n        <_>\n          5 10 1 3 2.</_>\n        <_>\n          6 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 3 -1.</_>\n        <_>\n          6 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 1 -1.</_>\n        <_>\n          13 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 6 -1.</_>\n        <_>\n          2 13 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 10 14 -1.</_>\n        <_>\n          8 6 5 7 2.</_>\n        <_>\n          13 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 12 2 -1.</_>\n        <_>\n          2 2 6 1 2.</_>\n        <_>\n          8 3 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 10 -1.</_>\n        <_>\n          10 7 3 5 2.</_>\n        <_>\n          13 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 4 4 -1.</_>\n        <_>\n          3 2 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 2 -1.</_>\n        <_>\n          3 1 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 11 3 -1.</_>\n        <_>\n          3 3 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 3 4 -1.</_>\n        <_>\n          14 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 4 -1.</_>\n        <_>\n          9 9 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 12 -1.</_>\n        <_>\n          8 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 3 -1.</_>\n        <_>\n          5 8 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 12 15 -1.</_>\n        <_>\n          4 5 6 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 8 2 -1.</_>\n        <_>\n          10 8 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 6 -1.</_>\n        <_>\n          19 0 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 5 -1.</_>\n        <_>\n          12 1 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 4 -1.</_>\n        <_>\n          10 1 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 2 -1.</_>\n        <_>\n          18 6 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 9 -1.</_>\n        <_>\n          8 4 6 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          16 16 1 1 2.</_>\n        <_>\n          17 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 1 3 -1.</_>\n        <_>\n          18 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 2 -1.</_>\n        <_>\n          9 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 1 16 -1.</_>\n        <_>\n          8 11 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 2 8 -1.</_>\n        <_>\n          17 2 1 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 2 -1.</_>\n        <_>\n          7 3 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 3 -1.</_>\n        <_>\n          15 7 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 8 9 -1.</_>\n        <_>\n          4 0 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 8 -1.</_>\n        <_>\n          17 0 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 8 -1.</_>\n        <_>\n          17 0 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 2 2 -1.</_>\n        <_>\n          18 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 4 -1.</_>\n        <_>\n          13 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 2 2 -1.</_>\n        <_>\n          17 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 4 3 -1.</_>\n        <_>\n          13 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 3 7 -1.</_>\n        <_>\n          16 7 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 4 6 -1.</_>\n        <_>\n          2 5 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 10 -1.</_>\n        <_>\n          2 2 9 5 2.</_>\n        <_>\n          11 7 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 2 3 -1.</_>\n        <_>\n          9 4 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 2 -1.</_>\n        <_>\n          6 6 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 6 -1.</_>\n        <_>\n          9 3 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 2 3 -1.</_>\n        <_>\n          15 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 6 -1.</_>\n        <_>\n          5 12 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 6 4 -1.</_>\n        <_>\n          1 15 3 2 2.</_>\n        <_>\n          4 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 2 6 -1.</_>\n        <_>\n          3 9 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 3 2 -1.</_>\n        <_>\n          1 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 3 2 -1.</_>\n        <_>\n          17 10 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 4 -1.</_>\n        <_>\n          6 11 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 1 1 2.</_>\n        <_>\n          17 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 2 2 -1.</_>\n        <_>\n          16 5 1 1 2.</_>\n        <_>\n          17 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 8 -1.</_>\n        <_>\n          0 1 1 4 2.</_>\n        <_>\n          1 5 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 6 3 -1.</_>\n        <_>\n          9 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 3 1 -1.</_>\n        <_>\n          2 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 2 6 -1.</_>\n        <_>\n          2 13 1 3 2.</_>\n        <_>\n          3 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 10 -1.</_>\n        <_>\n          2 15 16 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 4 2 -1.</_>\n        <_>\n          12 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 8 -1.</_>\n        <_>\n          7 6 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 1 -1.</_>\n        <_>\n          10 11 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 13 4 3 -1.</_>\n        <_>\n          3 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 7 2 -1.</_>\n        <_>\n          5 12 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 3 3 -1.</_>\n        <_>\n          1 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 6 -1.</_>\n        <_>\n          12 9 2 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 4 -1.</_>\n        <_>\n          4 8 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 4 -1.</_>\n        <_>\n          5 10 1 2 2.</_>\n        <_>\n          6 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 2 2 -1.</_>\n        <_>\n          14 16 1 1 2.</_>\n        <_>\n          15 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 2 10 -1.</_>\n        <_>\n          2 9 1 5 2.</_>\n        <_>\n          3 14 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 4 2 -1.</_>\n        <_>\n          14 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 1 3 -1.</_>\n        <_>\n          3 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 12 4 3 -1.</_>\n        <_>\n          14 13 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 1 -1.</_>\n        <_>\n          17 7 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 6 -1.</_>\n        <_>\n          11 3 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 3 3 -1.</_>\n        <_>\n          15 14 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 3 6 -1.</_>\n        <_>\n          1 9 1 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 7 2 -1.</_>\n        <_>\n          11 6 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 6 3 -1.</_>\n        <_>\n          6 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 3 3 -1.</_>\n        <_>\n          16 18 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 1 -1.</_>\n        <_>\n          9 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 3 -1.</_>\n        <_>\n          10 10 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 1 4 -1.</_>\n        <_>\n          1 6 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 1 4 -1.</_>\n        <_>\n          12 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 3 1 -1.</_>\n        <_>\n          3 7 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 1 2 -1.</_>\n        <_>\n          9 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 12 1 -1.</_>\n        <_>\n          8 2 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 4 -1.</_>\n        <_>\n          18 0 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 1 -1.</_>\n        <_>\n          1 6 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 1 4 -1.</_>\n        <_>\n          4 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 19 9 -1.</_>\n        <_>\n          1 6 19 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 20 -1.</_>\n        <_>\n          0 5 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 2 -1.</_>\n        <_>\n          6 9 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 11 -1.</_>\n        <_>\n          8 8 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 9 1 -1.</_>\n        <_>\n          12 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 8 -1.</_>\n        <_>\n          5 3 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 2 11 -1.</_>\n        <_>\n          8 3 1 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 1 -1.</_>\n        <_>\n          18 4 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 8 4 9 -1.</_>\n        <_>\n          5 8 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 1 12 -1.</_>\n        <_>\n          12 9 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 19 2 1 -1.</_>\n        <_>\n          3 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 6 -1.</_>\n        <_>\n          5 1 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 1 -1.</_>\n        <_>\n          15 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 1 -1.</_>\n        <_>\n          16 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 12 1 -1.</_>\n        <_>\n          11 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 8 2 -1.</_>\n        <_>\n          10 6 4 1 2.</_>\n        <_>\n          14 7 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 3 -1.</_>\n        <_>\n          5 1 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 6 -1.</_>\n        <_>\n          2 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 3 12 -1.</_>\n        <_>\n          3 8 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 7 3 -1.</_>\n        <_>\n          1 18 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 8 2 -1.</_>\n        <_>\n          1 17 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 2 6 -1.</_>\n        <_>\n          15 9 1 3 2.</_>\n        <_>\n          16 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 1 -1.</_>\n        <_>\n          8 10 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 3 -1.</_>\n        <_>\n          15 11 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 3 15 -1.</_>\n        <_>\n          3 7 1 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 3 9 -1.</_>\n        <_>\n          5 8 1 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 12 2 -1.</_>\n        <_>\n          7 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 4 5 -1.</_>\n        <_>\n          17 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 9 7 -1.</_>\n        <_>\n          13 13 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 5 3 -1.</_>\n        <_>\n          8 6 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 4 -1.</_>\n        <_>\n          9 2 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 2 6 -1.</_>\n        <_>\n          4 5 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 1 4 -1.</_>\n        <_>\n          10 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 5 3 -1.</_>\n        <_>\n          1 18 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 10 1 -1.</_>\n        <_>\n          2 4 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 18 1 2 -1.</_>\n        <_>\n          4 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 1 3 -1.</_>\n        <_>\n          5 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 4 3 -1.</_>\n        <_>\n          6 11 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 16 3 4 -1.</_>\n        <_>\n          17 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 11 4 -1.</_>\n        <_>\n          6 12 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 1 -1.</_>\n        <_>\n          8 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 12 2 8 -1.</_>\n        <_>\n          17 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 2 4 -1.</_>\n        <_>\n          17 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 2 -1.</_>\n        <_>\n          10 9 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 12 -1.</_>\n        <_>\n          5 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 7 1 4 -1.</_>\n        <_>\n          19 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 1 -1.</_>\n        <_>\n          3 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 2 -1.</_>\n        <_>\n          7 10 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 2 8 11 -1.</_>\n        <_>\n          6 2 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 7 -1.</_>\n        <_>\n          18 4 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 2 8 -1.</_>\n        <_>\n          11 7 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 3 3 -1.</_>\n        <_>\n          15 7 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 7 -1.</_>\n        <_>\n          11 9 1 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 9 2 6 -1.</_>\n        <_>\n          15 9 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 1 -1.</_>\n        <_>\n          11 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 9 9 -1.</_>\n        <_>\n          14 7 3 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 4 7 -1.</_>\n        <_>\n          15 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 3 6 -1.</_>\n        <_>\n          17 2 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 2 7 -1.</_>\n        <_>\n          15 13 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 18 12 -1.</_>\n        <_>\n          6 8 6 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 7 9 -1.</_>\n        <_>\n          3 9 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 4 -1.</_>\n        <_>\n          18 4 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 3 3 -1.</_>\n        <_>\n          6 15 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 2 1 -1.</_>\n        <_>\n          1 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 11 4 -1.</_>\n        <_>\n          5 9 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 7 -1.</_>\n        <_>\n          9 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 5 2 -1.</_>\n        <_>\n          7 8 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 14 3 -1.</_>\n        <_>\n          5 10 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 5 4 -1.</_>\n        <_>\n          15 10 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 4 4 -1.</_>\n        <_>\n          3 12 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 13 -1.</_>\n        <_>\n          14 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 5 2 -1.</_>\n        <_>\n          8 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 6 4 -1.</_>\n        <_>\n          7 14 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 1 -1.</_>\n        <_>\n          7 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 3 -1.</_>\n        <_>\n          7 1 6 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 15 -1.</_>\n        <_>\n          8 5 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 2 4 -1.</_>\n        <_>\n          13 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 9 4 -1.</_>\n        <_>\n          11 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 3 2 -1.</_>\n        <_>\n          2 11 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 1 3 -1.</_>\n        <_>\n          2 6 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 17 16 1 -1.</_>\n        <_>\n          8 17 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 8 3 -1.</_>\n        <_>\n          8 16 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 1 -1.</_>\n        <_>\n          6 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 9 3 -1.</_>\n        <_>\n          6 5 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 1 -1.</_>\n        <_>\n          7 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 7 3 -1.</_>\n        <_>\n          2 1 7 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 3 2 -1.</_>\n        <_>\n          7 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 10 -1.</_>\n        <_>\n          18 3 1 5 2.</_>\n        <_>\n          19 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 4 -1.</_>\n        <_>\n          0 9 5 2 2.</_>\n        <_>\n          5 11 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 8 6 -1.</_>\n        <_>\n          0 3 4 3 2.</_>\n        <_>\n          4 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 4 -1.</_>\n        <_>\n          14 10 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 1 2 -1.</_>\n        <_>\n          17 6 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 1 10 -1.</_>\n        <_>\n          14 9 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 1 -1.</_>\n        <_>\n          16 15 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 4 8 -1.</_>\n        <_>\n          5 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 8 1 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 11 -1.</_>\n        <_>\n          16 0 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 8 12 -1.</_>\n        <_>\n          10 4 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 1 2.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 2 4 -1.</_>\n        <_>\n          0 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 1 2 -1.</_>\n        <_>\n          16 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 10 4 -1.</_>\n        <_>\n          10 3 5 2 2.</_>\n        <_>\n          15 5 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 3 3 -1.</_>\n        <_>\n          15 8 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 6 -1.</_>\n        <_>\n          4 0 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 8 -1.</_>\n        <_>\n          10 0 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 3 -1.</_>\n        <_>\n          5 8 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 11 2 2 -1.</_>\n        <_>\n          16 11 1 1 2.</_>\n        <_>\n          17 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 12 -1.</_>\n        <_>\n          16 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 5 -1.</_>\n        <_>\n          15 2 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 1 2.</_>\n        <_>\n          19 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 2 2 -1.</_>\n        <_>\n          6 15 1 1 2.</_>\n        <_>\n          7 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 2 2 -1.</_>\n        <_>\n          4 16 1 1 2.</_>\n        <_>\n          5 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 3 -1.</_>\n        <_>\n          8 9 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 8 3 8 -1.</_>\n        <_>\n          3 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 2 -1.</_>\n        <_>\n          7 16 1 1 2.</_>\n        <_>\n          8 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 1 8 -1.</_>\n        <_>\n          17 4 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 15 10 4 -1.</_>\n        <_>\n          3 15 5 2 2.</_>\n        <_>\n          8 17 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 1 -1.</_>\n        <_>\n          15 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 7 -1.</_>\n        <_>\n          8 5 4 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 1 1 2.</_>\n        <_>\n          17 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 1 1 2.</_>\n        <_>\n          17 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 3 -1.</_>\n        <_>\n          14 11 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 9 2 3 -1.</_>\n        <_>\n          11 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 3 -1.</_>\n        <_>\n          17 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 12 -1.</_>\n        <_>\n          4 4 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 2 -1.</_>\n        <_>\n          11 6 1 1 2.</_>\n        <_>\n          12 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 9 12 -1.</_>\n        <_>\n          5 8 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 4 -1.</_>\n        <_>\n          13 5 3 2 2.</_>\n        <_>\n          16 7 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 3 -1.</_>\n        <_>\n          13 1 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 10 12 -1.</_>\n        <_>\n          3 5 5 6 2.</_>\n        <_>\n          8 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 9 6 -1.</_>\n        <_>\n          3 11 3 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 8 7 -1.</_>\n        <_>\n          5 4 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 4 5 -1.</_>\n        <_>\n          16 7 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 4 -1.</_>\n        <_>\n          19 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 2 3 -1.</_>\n        <_>\n          16 9 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 17 -1.</_>\n        <_>\n          4 2 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 10 -1.</_>\n        <_>\n          18 14 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 4 -1.</_>\n        <_>\n          5 1 14 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 1 -1.</_>\n        <_>\n          18 9 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          9 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 3 -1.</_>\n        <_>\n          5 9 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 10 1 -1.</_>\n        <_>\n          10 7 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 5 -1.</_>\n        <_>\n          12 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 1 12 -1.</_>\n        <_>\n          13 5 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 13 6 5 -1.</_>\n        <_>\n          4 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 3 -1.</_>\n        <_>\n          5 7 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 3 -1.</_>\n        <_>\n          4 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 5 4 -1.</_>\n        <_>\n          7 2 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 7 -1.</_>\n        <_>\n          4 13 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 1 3 -1.</_>\n        <_>\n          16 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 8 3 -1.</_>\n        <_>\n          5 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 3 4 -1.</_>\n        <_>\n          13 10 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 5 -1.</_>\n        <_>\n          9 10 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 13 6 -1.</_>\n        <_>\n          0 14 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 1 2 -1.</_>\n        <_>\n          2 3 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 15 12 4 -1.</_>\n        <_>\n          6 15 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 4 13 -1.</_>\n        <_>\n          7 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 15 2 2 -1.</_>\n        <_>\n          17 15 1 1 2.</_>\n        <_>\n          18 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 5 2 -1.</_>\n        <_>\n          12 16 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 1 6 -1.</_>\n        <_>\n          13 14 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 1 9 -1.</_>\n        <_>\n          12 3 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 6 -1.</_>\n        <_>\n          4 9 1 3 2.</_>\n        <_>\n          5 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 6 1 -1.</_>\n        <_>\n          14 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 3 -1.</_>\n        <_>\n          11 11 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 9 6 2 -1.</_>\n        <_>\n          14 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 2 12 -1.</_>\n        <_>\n          12 6 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 8 -1.</_>\n        <_>\n          11 11 1 4 2.</_>\n        <_>\n          12 15 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 3 -1.</_>\n        <_>\n          7 3 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 12 6 -1.</_>\n        <_>\n          8 9 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 1 2 -1.</_>\n        <_>\n          3 15 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 8 3 -1.</_>\n        <_>\n          14 1 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 7 -1.</_>\n        <_>\n          4 0 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 6 -1.</_>\n        <_>\n          18 2 1 3 2.</_>\n        <_>\n          19 5 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 16 -1.</_>\n        <_>\n          4 0 3 8 2.</_>\n        <_>\n          7 8 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 6 4 -1.</_>\n        <_>\n          5 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 3 -1.</_>\n        <_>\n          3 8 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 5 3 -1.</_>\n        <_>\n          10 7 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 8 -1.</_>\n        <_>\n          3 7 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 2 3 -1.</_>\n        <_>\n          12 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 2 -1.</_>\n        <_>\n          6 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 1 14 -1.</_>\n        <_>\n          17 4 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 10 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 9 -1.</_>\n        <_>\n          7 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 12 1 -1.</_>\n        <_>\n          7 5 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 16 2 2 -1.</_>\n        <_>\n          2 16 1 1 2.</_>\n        <_>\n          3 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 3 3 -1.</_>\n        <_>\n          16 6 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 8 -1.</_>\n        <_>\n          11 8 1 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 3 -1.</_>\n        <_>\n          7 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 5 6 -1.</_>\n        <_>\n          13 5 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 5 3 -1.</_>\n        <_>\n          0 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 18 1 -1.</_>\n        <_>\n          11 18 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 2 -1.</_>\n        <_>\n          13 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 7 2 -1.</_>\n        <_>\n          3 16 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 12 -1.</_>\n        <_>\n          14 1 1 12 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 5 -1.</_>\n        <_>\n          10 5 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 2 4 -1.</_>\n        <_>\n          18 14 1 2 2.</_>\n        <_>\n          19 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 19 4 1 -1.</_>\n        <_>\n          18 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 15 2 5 -1.</_>\n        <_>\n          18 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 3 -1.</_>\n        <_>\n          0 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 1 14 -1.</_>\n        <_>\n          0 11 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 5 -1.</_>\n        <_>\n          6 12 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 1 -1.</_>\n        <_>\n          13 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 7 -1.</_>\n        <_>\n          19 0 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 6 10 -1.</_>\n        <_>\n          3 13 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 5 -1.</_>\n        <_>\n          18 0 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 12 -1.</_>\n        <_>\n          18 0 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 1 3 2 -1.</_>\n        <_>\n          2 1 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 1 5 12 -1.</_>\n        <_>\n          1 4 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 1 14 -1.</_>\n        <_>\n          2 12 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 7 -1.</_>\n        <_>\n          9 0 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 6 -1.</_>\n        <_>\n          16 1 2 3 2.</_>\n        <_>\n          18 4 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 6 -1.</_>\n        <_>\n          16 0 2 3 2.</_>\n        <_>\n          18 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 1 2 -1.</_>\n        <_>\n          18 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 1 3 -1.</_>\n        <_>\n          17 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 3 4 -1.</_>\n        <_>\n          1 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 15 -1.</_>\n        <_>\n          8 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 1 3 -1.</_>\n        <_>\n          18 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 3 -1.</_>\n        <_>\n          5 8 2 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 12 -1.</_>\n        <_>\n          4 5 4 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 1 3 -1.</_>\n        <_>\n          13 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 2 2 -1.</_>\n        <_>\n          4 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 10 -1.</_>\n        <_>\n          6 9 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 14 -1.</_>\n        <_>\n          14 6 3 7 2.</_>\n        <_>\n          17 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 11 8 -1.</_>\n        <_>\n          6 11 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 5 -1.</_>\n        <_>\n          18 9 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 10 2 -1.</_>\n        <_>\n          10 4 5 1 2.</_>\n        <_>\n          15 5 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 8 -1.</_>\n        <_>\n          5 5 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 16 1 4 -1.</_>\n        <_>\n          19 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 10 -1.</_>\n        <_>\n          19 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 3 -1.</_>\n        <_>\n          17 1 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 1 -1.</_>\n        <_>\n          10 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 5 -1.</_>\n        <_>\n          8 0 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 9 -1.</_>\n        <_>\n          15 11 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 1 8 -1.</_>\n        <_>\n          13 13 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 8 3 -1.</_>\n        <_>\n          14 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 8 -1.</_>\n        <_>\n          7 8 1 4 2.</_>\n        <_>\n          8 12 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 4 2 -1.</_>\n        <_>\n          2 18 2 1 2.</_>\n        <_>\n          4 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          4 6 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 1 4 1 -1.</_>\n        <_>\n          17 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 3 -1.</_>\n        <_>\n          6 2 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 19 -1.</_>\n        <_>\n          6 1 3 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 5 8 -1.</_>\n        <_>\n          8 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 2 -1.</_>\n        <_>\n          0 0 10 1 2.</_>\n        <_>\n          10 1 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 2 -1.</_>\n        <_>\n          7 0 4 1 2.</_>\n        <_>\n          11 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 3 3 -1.</_>\n        <_>\n          4 7 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 8 -1.</_>\n        <_>\n          1 6 1 4 2.</_>\n        <_>\n          2 10 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 3 -1.</_>\n        <_>\n          17 10 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 12 -1.</_>\n        <_>\n          13 5 4 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 7 20 -1.</_>\n        <_>\n          8 5 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 3 -1.</_>\n        <_>\n          11 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 12 -1.</_>\n        <_>\n          12 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 7 4 -1.</_>\n        <_>\n          11 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 1 2 -1.</_>\n        <_>\n          2 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 5 3 -1.</_>\n        <_>\n          6 10 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 12 2 -1.</_>\n        <_>\n          12 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 4 4 -1.</_>\n        <_>\n          0 11 2 2 2.</_>\n        <_>\n          2 13 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 8 -1.</_>\n        <_>\n          0 9 2 4 2.</_>\n        <_>\n          2 13 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 10 -1.</_>\n        <_>\n          14 7 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 7 -1.</_>\n        <_>\n          1 1 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 2 -1.</_>\n        <_>\n          1 1 4 1 2.</_>\n        <_>\n          5 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 10 -1.</_>\n        <_>\n          2 2 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 4 9 -1.</_>\n        <_>\n          16 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 3 -1.</_>\n        <_>\n          8 1 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 3 6 -1.</_>\n        <_>\n          1 1 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 3 1 -1.</_>\n        <_>\n          3 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 11 3 -1.</_>\n        <_>\n          2 2 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 2 -1.</_>\n        <_>\n          6 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 3 -1.</_>\n        <_>\n          14 9 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 12 6 -1.</_>\n        <_>\n          4 5 4 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 9 3 -1.</_>\n        <_>\n          5 6 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 5 4 -1.</_>\n        <_>\n          1 6 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 2 -1.</_>\n        <_>\n          15 0 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 2 -1.</_>\n        <_>\n          10 0 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 1 -1.</_>\n        <_>\n          14 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 12 3 -1.</_>\n        <_>\n          4 16 4 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 1 -1.</_>\n        <_>\n          8 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 12 -1.</_>\n        <_>\n          1 8 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 2 -1.</_>\n        <_>\n          7 16 1 1 2.</_>\n        <_>\n          8 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 10 -1.</_>\n        <_>\n          11 2 1 5 2.</_>\n        <_>\n          12 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 2 13 -1.</_>\n        <_>\n          8 1 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 2 4 -1.</_>\n        <_>\n          14 15 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 1 -1.</_>\n        <_>\n          13 7 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 10 2 -1.</_>\n        <_>\n          6 8 5 1 2.</_>\n        <_>\n          11 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 4 -1.</_>\n        <_>\n          7 7 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 2 -1.</_>\n        <_>\n          9 6 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 10 2 -1.</_>\n        <_>\n          4 9 5 1 2.</_>\n        <_>\n          9 10 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 2 -1.</_>\n        <_>\n          16 6 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 2 -1.</_>\n        <_>\n          10 3 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 12 -1.</_>\n        <_>\n          15 1 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 14 -1.</_>\n        <_>\n          10 0 4 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 4 -1.</_>\n        <_>\n          16 5 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 3 -1.</_>\n        <_>\n          1 4 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 6 -1.</_>\n        <_>\n          9 5 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 2 -1.</_>\n        <_>\n          10 7 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 18 2 -1.</_>\n        <_>\n          0 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 16 2 -1.</_>\n        <_>\n          3 19 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 6 3 -1.</_>\n        <_>\n          13 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 17 3 -1.</_>\n        <_>\n          1 18 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 1 4 -1.</_>\n        <_>\n          15 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 6 -1.</_>\n        <_>\n          1 9 3 3 2.</_>\n        <_>\n          4 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 12 2 -1.</_>\n        <_>\n          12 15 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 1 -1.</_>\n        <_>\n          5 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 1 -1.</_>\n        <_>\n          5 11 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 17 -1.</_>\n        <_>\n          11 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 4 8 -1.</_>\n        <_>\n          4 1 2 4 2.</_>\n        <_>\n          6 5 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 2 -1.</_>\n        <_>\n          6 13 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 19 2 1 -1.</_>\n        <_>\n          3 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 19 3 -1.</_>\n        <_>\n          0 2 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 13 6 -1.</_>\n        <_>\n          4 11 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 10 3 -1.</_>\n        <_>\n          4 3 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 15 9 -1.</_>\n        <_>\n          9 7 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 2 -1.</_>\n        <_>\n          6 2 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 18 -1.</_>\n        <_>\n          8 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 1 3 -1.</_>\n        <_>\n          3 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 15 2 -1.</_>\n        <_>\n          3 13 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 6 4 -1.</_>\n        <_>\n          3 16 3 2 2.</_>\n        <_>\n          6 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 9 -1.</_>\n        <_>\n          17 0 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 2 3 -1.</_>\n        <_>\n          17 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 4 4 -1.</_>\n        <_>\n          13 5 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 6 -1.</_>\n        <_>\n          11 3 3 3 2.</_>\n        <_>\n          14 6 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 1 4 -1.</_>\n        <_>\n          3 17 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 1 -1.</_>\n        <_>\n          3 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 2 -1.</_>\n        <_>\n          5 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 9 -1.</_>\n        <_>\n          9 8 2 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 2 2 -1.</_>\n        <_>\n          11 7 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 5 9 -1.</_>\n        <_>\n          0 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 1 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 1 4 -1.</_>\n        <_>\n          3 4 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 12 -1.</_>\n        <_>\n          1 2 9 6 2.</_>\n        <_>\n          10 8 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 1 4 -1.</_>\n        <_>\n          5 2 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 2 -1.</_>\n        <_>\n          1 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 4 -1.</_>\n        <_>\n          4 3 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 3 -1.</_>\n        <_>\n          8 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 6 -1.</_>\n        <_>\n          6 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 3 -1.</_>\n        <_>\n          0 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 3 -1.</_>\n        <_>\n          17 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 9 -1.</_>\n        <_>\n          17 0 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 2 2 -1.</_>\n        <_>\n          14 1 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 9 -1.</_>\n        <_>\n          8 5 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 2 2 -1.</_>\n        <_>\n          11 0 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 4 -1.</_>\n        <_>\n          10 3 2 2 2.</_>\n        <_>\n          12 5 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 1 -1.</_>\n        <_>\n          7 2 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 12 -1.</_>\n        <_>\n          0 3 1 6 2.</_>\n        <_>\n          1 9 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 4 -1.</_>\n        <_>\n          4 9 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 1 12 -1.</_>\n        <_>\n          0 4 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 6 -1.</_>\n        <_>\n          16 14 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 1 3 -1.</_>\n        <_>\n          5 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 18 -1.</_>\n        <_>\n          14 0 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 2 -1.</_>\n        <_>\n          16 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 3 3 -1.</_>\n        <_>\n          15 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 1 -1.</_>\n        <_>\n          17 10 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 2 -1.</_>\n        <_>\n          4 0 4 1 2.</_>\n        <_>\n          8 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 8 4 -1.</_>\n        <_>\n          11 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 18 2 2 -1.</_>\n        <_>\n          15 18 1 1 2.</_>\n        <_>\n          16 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 4 -1.</_>\n        <_>\n          15 2 2 2 2.</_>\n        <_>\n          17 4 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 12 -1.</_>\n        <_>\n          19 8 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 5 3 -1.</_>\n        <_>\n          15 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 18 2 2 -1.</_>\n        <_>\n          16 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 18 2 1 -1.</_>\n        <_>\n          16 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 2 -1.</_>\n        <_>\n          0 0 9 1 2.</_>\n        <_>\n          9 1 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 4 -1.</_>\n        <_>\n          5 7 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 2 3 -1.</_>\n        <_>\n          15 12 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 7 -1.</_>\n        <_>\n          9 5 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 4 -1.</_>\n        <_>\n          5 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 2 -1.</_>\n        <_>\n          9 10 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 3 -1.</_>\n        <_>\n          12 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 5 -1.</_>\n        <_>\n          16 0 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 1 -1.</_>\n        <_>\n          5 9 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 1 4 -1.</_>\n        <_>\n          9 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 1 -1.</_>\n        <_>\n          13 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 10 -1.</_>\n        <_>\n          9 8 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 9 4 -1.</_>\n        <_>\n          4 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 2 1 -1.</_>\n        <_>\n          16 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 6 -1.</_>\n        <_>\n          7 3 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 2 -1.</_>\n        <_>\n          3 1 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 2 -1.</_>\n        <_>\n          4 1 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 2 4 -1.</_>\n        <_>\n          17 3 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 6 -1.</_>\n        <_>\n          5 6 2 3 2.</_>\n        <_>\n          7 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 13 2 -1.</_>\n        <_>\n          7 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 1 6 -1.</_>\n        <_>\n          16 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 1 1 2.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 5 2 -1.</_>\n        <_>\n          4 4 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 17 2 2 -1.</_>\n        <_>\n          14 17 1 1 2.</_>\n        <_>\n          15 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 2 2 -1.</_>\n        <_>\n          15 1 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 1 2 2 -1.</_>\n        <_>\n          15 1 1 1 2.</_>\n        <_>\n          16 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 7 -1.</_>\n        <_>\n          7 10 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 6 5 -1.</_>\n        <_>\n          15 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 6 -1.</_>\n        <_>\n          7 4 3 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 8 10 -1.</_>\n        <_>\n          2 11 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 3 -1.</_>\n        <_>\n          3 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 4 2 -1.</_>\n        <_>\n          1 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 15 4 -1.</_>\n        <_>\n          5 17 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 4 -1.</_>\n        <_>\n          15 7 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 3 -1.</_>\n        <_>\n          6 3 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 10 3 -1.</_>\n        <_>\n          8 3 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 2 4 -1.</_>\n        <_>\n          17 9 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 5 1 12 -1.</_>\n        <_>\n          2 11 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 13 3 6 -1.</_>\n        <_>\n          18 15 1 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 3 2 -1.</_>\n        <_>\n          14 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 2 -1.</_>\n        <_>\n          4 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 5 -1.</_>\n        <_>\n          7 4 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 2 2 -1.</_>\n        <_>\n          5 15 1 1 2.</_>\n        <_>\n          6 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 3 -1.</_>\n        <_>\n          12 0 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 6 -1.</_>\n        <_>\n          13 0 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 8 -1.</_>\n        <_>\n          10 1 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 3 -1.</_>\n        <_>\n          17 11 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 3 -1.</_>\n        <_>\n          14 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 1 3 -1.</_>\n        <_>\n          1 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 1 2 -1.</_>\n        <_>\n          10 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 13 1 4 -1.</_>\n        <_>\n          19 13 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 6 -1.</_>\n        <_>\n          9 9 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 10 -1.</_>\n        <_>\n          2 9 9 5 2.</_>\n        <_>\n          11 14 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 5 6 -1.</_>\n        <_>\n          11 4 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 4 -1.</_>\n        <_>\n          17 1 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 3 4 -1.</_>\n        <_>\n          3 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 10 -1.</_>\n        <_>\n          19 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 6 -1.</_>\n        <_>\n          1 7 3 3 2.</_>\n        <_>\n          4 10 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 3 12 -1.</_>\n        <_>\n          11 6 3 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 7 6 -1.</_>\n        <_>\n          3 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 1 3 -1.</_>\n        <_>\n          8 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 6 -1.</_>\n        <_>\n          4 15 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 4 3 -1.</_>\n        <_>\n          1 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 4 -1.</_>\n        <_>\n          7 1 2 2 2.</_>\n        <_>\n          9 3 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 2 2 -1.</_>\n        <_>\n          2 4 1 1 2.</_>\n        <_>\n          3 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 16 3 -1.</_>\n        <_>\n          2 5 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 17 3 -1.</_>\n        <_>\n          0 7 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 7 10 1 3.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_frontalcatface.xml",
    "content": "<?xml version=\"1.0\"?>\n<!----------------------------------------------------------------------------\n A frontal cat face detector using the basic set of Haar features, i.e.\n horizontal and vertical features but not diagonal features.\n\n Contributed by Joseph Howse (josephhowse@nummist.com).\n\n More information can be found in the following publications and\n presentations:\n\n Joseph Howse. OpenCV for Secret Agents (book). Packt Publishing, January\n   2015.\n Joseph Howse. \"Training Detectors and Recognizers in Python and OpenCV\"\n   (tutorial). ISMAR 2014. September 9, 2014.\n   http://nummist.com/opencv/Howse_ISMAR_20140909.pdf\n Joseph Howse. \"Training Intelligent Camera Systems with Python and OpenCV\"\n   (webcast). O’Reilly Media. June 17, 2014.\n   http://www.oreilly.com/pub/e/3077\n\n Build scripts and demo applications can be found in the following repository:\n https://bitbucket.org/Joe_Howse/angora-blue\n\n KNOWN LIMITATIONS:\n\n Sometimes, the detector mistakenly thinks that a human face is a cat face. In\n situations where either a human or a cat might be encountered, use both a\n human face detector and a cat face detector. Then, if a detected human face\n and a detected cat face intersect, reject the cat face.\n\n An upright subject is assumed. In situations where the cat's face might be\n sideways or upside down (e.g. the cat is rolling over), try various rotations\n of the input image.\n\n //////////////////////////////////////////////////////////////////////////\n | Contributors License Agreement\n | IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n |   By downloading, copying, installing or using the software you agree\n |   to this license.\n |   If you do not agree to this license, do not download, install,\n |   copy or use the software.\n |\n | Copyright (c) 2014, Joseph Howse (Nummist Media Corporation Limited,\n | Halifax, Nova Scotia, Canada). 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\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 |    * The name of Contributor may not used to endorse or promote products\n |      derived 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\n | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n | LIABILITY, 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.  Back to\n | Top\n //////////////////////////////////////////////////////////////////////////\n ---------------------------------------------------------------------------->\n<opencv_storage>\n<cascade>\n  <stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>24</height>\n  <width>24</width>\n  <stageParams>\n    <boostType>GAB</boostType>\n    <minHitRate>9.9900001287460327e-01</minHitRate>\n    <maxFalseAlarm>5.0000000000000000e-01</maxFalseAlarm>\n    <weightTrimRate>9.4999999999999996e-01</weightTrimRate>\n    <maxDepth>1</maxDepth>\n    <maxWeakCount>100</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount>\n    <featSize>1</featSize>\n    <mode>BASIC</mode></featureParams>\n  <stageNum>15</stageNum>\n  <stages>\n    <!-- stage 0 -->\n    <_>\n      <maxWeakCount>25</maxWeakCount>\n      <stageThreshold>-1.7760953903198242e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 445 -1.4772760681807995e-02</internalNodes>\n          <leafValues>\n            8.4035199880599976e-01 -1.2701500952243805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 4.5831585302948952e-03</internalNodes>\n          <leafValues>\n            -2.3791725933551788e-01 6.1978793144226074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 -1.5044892206788063e-02</internalNodes>\n          <leafValues>\n            5.7160794734954834e-01 -2.0493283867835999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 -1.2275323271751404e-02</internalNodes>\n          <leafValues>\n            5.7243120670318604e-01 -1.9821420311927795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 8.3929381798952818e-04</internalNodes>\n          <leafValues>\n            -2.7865329384803772e-01 4.3508478999137878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 1.5758406370878220e-02</internalNodes>\n          <leafValues>\n            -2.2696593403816223e-01 4.9478942155838013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 5.0025805830955505e-02</internalNodes>\n          <leafValues>\n            -1.5532729029655457e-01 6.8103748559951782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 1.3194808736443520e-02</internalNodes>\n          <leafValues>\n            -1.7704419791698456e-01 5.8701574802398682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 2.8080096468329430e-02</internalNodes>\n          <leafValues>\n            -1.6797901690006256e-01 5.7502186298370361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 2.1941341459751129e-02</internalNodes>\n          <leafValues>\n            -1.4689344167709351e-01 5.2395468950271606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 -4.7663945704698563e-02</internalNodes>\n          <leafValues>\n            6.5710687637329102e-01 -1.1819842457771301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 3.5373851656913757e-02</internalNodes>\n          <leafValues>\n            -9.7323395311832428e-02 7.4618083238601685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 1.4257467410061508e-04</internalNodes>\n          <leafValues>\n            -2.8882622718811035e-01 2.8288537263870239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 3.8169793784618378e-02</internalNodes>\n          <leafValues>\n            -1.4375060796737671e-01 4.9739924073219299e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 6.5595638006925583e-03</internalNodes>\n          <leafValues>\n            1.2217019498348236e-01 -6.4208990335464478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 -7.5260535813868046e-03</internalNodes>\n          <leafValues>\n            -7.7927684783935547e-01 8.4750138223171234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 1.1342750862240791e-02</internalNodes>\n          <leafValues>\n            -2.2101284563541412e-01 3.4454554319381714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 -1.8045576289296150e-03</internalNodes>\n          <leafValues>\n            -7.8645682334899902e-01 9.7392335534095764e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 -6.6228499636054039e-03</internalNodes>\n          <leafValues>\n            3.1783181428909302e-01 -2.0665900409221649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 1.0336233302950859e-02</internalNodes>\n          <leafValues>\n            9.1840714216232300e-02 -7.7336055040359497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 -2.4216776713728905e-02</internalNodes>\n          <leafValues>\n            3.6742198467254639e-01 -1.9339990615844727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 1.4514809474349022e-02</internalNodes>\n          <leafValues>\n            -1.3652153313159943e-01 4.2311781644821167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 2.1728668361902237e-03</internalNodes>\n          <leafValues>\n            7.9096116125583649e-02 -7.6427251100540161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 -3.9529249072074890e-02</internalNodes>\n          <leafValues>\n            5.7755863666534424e-01 -1.0801278799772263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 1.5566367655992508e-02</internalNodes>\n          <leafValues>\n            -1.0259374976158142e-01 4.9773094058036804e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 1 -->\n    <_>\n      <maxWeakCount>34</maxWeakCount>\n      <stageThreshold>-1.6417213678359985e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 699 8.2648023962974548e-03</internalNodes>\n          <leafValues>\n            -1.0913594812154770e-01 7.7392864227294922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 1.4094283804297447e-02</internalNodes>\n          <leafValues>\n            -1.4461971819400787e-01 7.1108609437942505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 6.3192001543939114e-03</internalNodes>\n          <leafValues>\n            -2.3035119473934174e-01 4.4546401500701904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 2.0388111472129822e-02</internalNodes>\n          <leafValues>\n            -2.6455581188201904e-01 3.6559283733367920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 1.4826779253780842e-02</internalNodes>\n          <leafValues>\n            -2.0881411433219910e-01 4.6142515540122986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 2.1515905857086182e-02</internalNodes>\n          <leafValues>\n            -1.4785310626029968e-01 6.4220702648162842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 1.4720780309289694e-03</internalNodes>\n          <leafValues>\n            -2.2546350955963135e-01 3.6676284670829773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 -2.6044776663184166e-02</internalNodes>\n          <leafValues>\n            4.1465434432029724e-01 -1.5356495976448059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 -1.0589402168989182e-02</internalNodes>\n          <leafValues>\n            4.1222676634788513e-01 -1.6899079084396362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 6.9683273322880268e-03</internalNodes>\n          <leafValues>\n            1.0854535549879074e-01 -7.1554762125015259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 1.1014346033334732e-02</internalNodes>\n          <leafValues>\n            -1.7490877211093903e-01 4.4723153114318848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 -1.1037060990929604e-02</internalNodes>\n          <leafValues>\n            4.4173675775527954e-01 -1.3834878802299500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 6.2014400959014893e-02</internalNodes>\n          <leafValues>\n            -1.1345938593149185e-01 6.1101204156875610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 6.0412874445319176e-03</internalNodes>\n          <leafValues>\n            1.0154686868190765e-01 -7.2787815332412720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 -5.8582504279911518e-03</internalNodes>\n          <leafValues>\n            -6.0382944345474243e-01 8.4109157323837280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 7.3200068436563015e-04</internalNodes>\n          <leafValues>\n            -1.6661356389522552e-01 3.7944686412811279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 1.9083185121417046e-02</internalNodes>\n          <leafValues>\n            -1.2449446320533752e-01 4.2328220605850220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 6.8236114457249641e-03</internalNodes>\n          <leafValues>\n            1.0009460896253586e-01 -5.7412278652191162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 -8.0357380211353302e-03</internalNodes>\n          <leafValues>\n            3.5114383697509766e-01 -1.5984705090522766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 5.3236715495586395e-02</internalNodes>\n          <leafValues>\n            -1.1999151855707169e-01 4.5052844285964966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 -2.5083746761083603e-02</internalNodes>\n          <leafValues>\n            4.2925071716308594e-01 -1.3847301900386810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 -7.7097099274396896e-03</internalNodes>\n          <leafValues>\n            4.2245966196060181e-01 -1.4710718393325806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 1.1426717042922974e-02</internalNodes>\n          <leafValues>\n            7.3091737926006317e-02 -7.6901757717132568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 -4.7868257388472557e-03</internalNodes>\n          <leafValues>\n            -5.4498624801635742e-01 8.9874587953090668e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 9.9204876460134983e-04</internalNodes>\n          <leafValues>\n            -1.5133780241012573e-01 3.5266080498695374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 -7.3156114667654037e-03</internalNodes>\n          <leafValues>\n            -7.7262216806411743e-01 7.4858717620372772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 5.6915655732154846e-03</internalNodes>\n          <leafValues>\n            5.7124871760606766e-02 -6.7257982492446899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 -9.5818340778350830e-03</internalNodes>\n          <leafValues>\n            3.5280853509902954e-01 -1.5295246243476868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 2.3029895499348640e-02</internalNodes>\n          <leafValues>\n            8.0654025077819824e-02 -6.6331261396408081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 8.3062853664159775e-03</internalNodes>\n          <leafValues>\n            -1.8261365592479706e-01 2.9241952300071716e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 1.2940693646669388e-02</internalNodes>\n          <leafValues>\n            6.2763690948486328e-02 -7.9858863353729248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 4.5793736353516579e-03</internalNodes>\n          <leafValues>\n            -1.6761651635169983e-01 2.8498283028602600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 3.1311963684856892e-03</internalNodes>\n          <leafValues>\n            6.4963281154632568e-02 -7.1869355440139771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 6.2793528195470572e-04</internalNodes>\n          <leafValues>\n            -1.4610730111598969e-01 3.1872764229774475e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 2 -->\n    <_>\n      <maxWeakCount>47</maxWeakCount>\n      <stageThreshold>-1.8195210695266724e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 389 2.8032548725605011e-02</internalNodes>\n          <leafValues>\n            3.9794921875000000e-02 7.6527571678161621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 -1.3777698390185833e-02</internalNodes>\n          <leafValues>\n            4.8011425137519836e-01 -2.0891545712947845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 -1.5191626735031605e-03</internalNodes>\n          <leafValues>\n            4.3561527132987976e-01 -1.9825626909732819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 5.4982006549835205e-02</internalNodes>\n          <leafValues>\n            -1.9595552980899811e-01 5.1033991575241089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 -3.8968096487224102e-03</internalNodes>\n          <leafValues>\n            3.6698764562606812e-01 -2.1704223752021790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 -1.0689822956919670e-02</internalNodes>\n          <leafValues>\n            5.7506144046783447e-01 -1.2323237210512161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 -3.6211537662893534e-03</internalNodes>\n          <leafValues>\n            3.9189809560775757e-01 -2.0496053993701935e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -5.6232484057545662e-03</internalNodes>\n          <leafValues>\n            -7.0911335945129395e-01 8.9780956506729126e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 7.6950237154960632e-02</internalNodes>\n          <leafValues>\n            -1.6086885333061218e-01 3.9858064055442810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 -9.4812046736478806e-03</internalNodes>\n          <leafValues>\n            4.4439849257469177e-01 -1.4388205111026764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 4.8636407591402531e-03</internalNodes>\n          <leafValues>\n            8.3068624138832092e-02 -7.4362516403198242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 -2.9443078674376011e-03</internalNodes>\n          <leafValues>\n            -6.1576569080352783e-01 8.1917040050029755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 -2.0938962697982788e-03</internalNodes>\n          <leafValues>\n            -5.7727062702178955e-01 9.1147974133491516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 2.7704227250069380e-03</internalNodes>\n          <leafValues>\n            -1.9285553693771362e-01 3.1007087230682373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 1.2979362159967422e-02</internalNodes>\n          <leafValues>\n            -1.4128974080085754e-01 3.8875201344490051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 -1.1832339689135551e-02</internalNodes>\n          <leafValues>\n            -7.8204095363616943e-01 7.2949714958667755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 3.3956445753574371e-02</internalNodes>\n          <leafValues>\n            -1.3892538845539093e-01 3.9772579073905945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 4.9063982442021370e-03</internalNodes>\n          <leafValues>\n            8.1131778657436371e-02 -7.2757917642593384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 -2.3896694183349609e-03</internalNodes>\n          <leafValues>\n            -6.3438212871551514e-01 7.6958425343036652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 2.7626976370811462e-02</internalNodes>\n          <leafValues>\n            -1.7219249904155731e-01 3.7336668372154236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 3.9899977855384350e-03</internalNodes>\n          <leafValues>\n            7.0482976734638214e-02 -6.6334074735641479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -1.3984958641231060e-03</internalNodes>\n          <leafValues>\n            4.2500507831573486e-01 -1.2214981764554977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 1.3496846659108996e-03</internalNodes>\n          <leafValues>\n            -1.1209741979837418e-01 4.0830954909324646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 -3.9141997694969177e-03</internalNodes>\n          <leafValues>\n            -5.3290998935699463e-01 9.4373866915702820e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 4.9622595310211182e-02</internalNodes>\n          <leafValues>\n            -9.4219848513603210e-02 4.9830704927444458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 -6.2201134860515594e-02</internalNodes>\n          <leafValues>\n            5.1749163866043091e-01 -9.4065755605697632e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 -9.0873138979077339e-03</internalNodes>\n          <leafValues>\n            -6.6816878318786621e-01 7.1877375245094299e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 7.8745372593402863e-03</internalNodes>\n          <leafValues>\n            6.2571905553340912e-02 -6.6562908887863159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 6.6907280124723911e-03</internalNodes>\n          <leafValues>\n            -1.0588129609823227e-01 4.0728682279586792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 8.9093092828989029e-03</internalNodes>\n          <leafValues>\n            -1.3461567461490631e-01 3.1837779283523560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 3.9681773632764816e-03</internalNodes>\n          <leafValues>\n            7.1942776441574097e-02 -6.0182863473892212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 1.1530296877026558e-02</internalNodes>\n          <leafValues>\n            -1.2775546312332153e-01 3.0782708525657654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 -3.0327122658491135e-02</internalNodes>\n          <leafValues>\n            3.6777910590171814e-01 -1.4219322800636292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 -8.5609289817512035e-04</internalNodes>\n          <leafValues>\n            2.3868902027606964e-01 -1.7458973824977875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 -8.7312739342451096e-03</internalNodes>\n          <leafValues>\n            -5.7229250669479370e-01 6.7568361759185791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 3.6238119006156921e-02</internalNodes>\n          <leafValues>\n            -9.3856818974018097e-02 4.3806123733520508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 -1.7243899405002594e-02</internalNodes>\n          <leafValues>\n            3.2672104239463806e-01 -1.2465524673461914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 3.0146117787808180e-03</internalNodes>\n          <leafValues>\n            8.4438301622867584e-02 -4.7965818643569946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 -6.5812864340841770e-03</internalNodes>\n          <leafValues>\n            -6.5075701475143433e-01 5.2506592124700546e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 -2.6519154198467731e-03</internalNodes>\n          <leafValues>\n            3.9998021721839905e-01 -1.2199153006076813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 2.2568926215171814e-03</internalNodes>\n          <leafValues>\n            -1.1875165253877640e-01 3.6033150553703308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 7.8723561018705368e-03</internalNodes>\n          <leafValues>\n            6.2930762767791748e-02 -7.2076427936553955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 5.7557085528969765e-04</internalNodes>\n          <leafValues>\n            -1.9064085185527802e-01 1.9888252019882202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 -4.9874491989612579e-02</internalNodes>\n          <leafValues>\n            3.3844900131225586e-01 -1.0514739900827408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 -5.1496019586920738e-03</internalNodes>\n          <leafValues>\n            2.3594251275062561e-01 -1.7097522318363190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 -4.2706914246082306e-03</internalNodes>\n          <leafValues>\n            3.9194715023040771e-01 -9.3349114060401917e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 -1.0737263411283493e-01</internalNodes>\n          <leafValues>\n            5.6014204025268555e-01 -6.5082974731922150e-02</leafValues></_></weakClassifiers></_>\n    <!-- stage 3 -->\n    <_>\n      <maxWeakCount>54</maxWeakCount>\n      <stageThreshold>-1.6577893495559692e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 508 -9.3684419989585876e-03</internalNodes>\n          <leafValues>\n            7.2173911333084106e-01 -1.8106427043676376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 1.2989062815904617e-03</internalNodes>\n          <leafValues>\n            -2.0532198250293732e-01 4.2473095655441284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 3.6645986139774323e-02</internalNodes>\n          <leafValues>\n            -1.6229844093322754e-01 5.1024991273880005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 7.4745947495102882e-03</internalNodes>\n          <leafValues>\n            -2.5622242689132690e-01 3.1706622242927551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 -6.4315330237150192e-03</internalNodes>\n          <leafValues>\n            3.1292220950126648e-01 -2.2839428484439850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 3.9290782064199448e-02</internalNodes>\n          <leafValues>\n            -1.3426035642623901e-01 5.8237910270690918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 7.8858569264411926e-02</internalNodes>\n          <leafValues>\n            -1.5872669219970703e-01 4.5478171110153198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 -2.8797138482332230e-02</internalNodes>\n          <leafValues>\n            5.3397864103317261e-01 -1.1107259988784790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 -1.0816241614520550e-02</internalNodes>\n          <leafValues>\n            4.7242766618728638e-01 -9.8347179591655731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 2.8447926044464111e-02</internalNodes>\n          <leafValues>\n            -1.5696190297603607e-01 3.9995491504669189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 -4.1472744196653366e-03</internalNodes>\n          <leafValues>\n            -6.5492427349090576e-01 8.9378200471401215e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 780 3.7436613347381353e-03</internalNodes>\n          <leafValues>\n            -1.6716095805168152e-01 2.9251593351364136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 6.8116746842861176e-03</internalNodes>\n          <leafValues>\n            8.5507057607173920e-02 -6.0906678438186646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 4.9823587760329247e-03</internalNodes>\n          <leafValues>\n            6.6678501665592194e-02 -5.8637374639511108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 4.1811540722846985e-03</internalNodes>\n          <leafValues>\n            -1.0231449455022812e-01 4.5615595579147339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -1.0445066727697849e-02</internalNodes>\n          <leafValues>\n            -7.6294642686843872e-01 5.7752605527639389e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 -6.1920420266687870e-03</internalNodes>\n          <leafValues>\n            -6.6523051261901855e-01 5.2041802555322647e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -2.3358925245702267e-03</internalNodes>\n          <leafValues>\n            3.2779076695442200e-01 -1.3041152060031891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -5.6658107787370682e-03</internalNodes>\n          <leafValues>\n            -6.8133842945098877e-01 5.6511644273996353e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -1.0911209508776665e-02</internalNodes>\n          <leafValues>\n            3.3160626888275146e-01 -1.2574554979801178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 -1.7958178650587797e-03</internalNodes>\n          <leafValues>\n            3.0492588877677917e-01 -1.5025834739208221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 -4.0859095752239227e-03</internalNodes>\n          <leafValues>\n            -5.3059929609298706e-01 7.3518328368663788e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 -2.0980034023523331e-02</internalNodes>\n          <leafValues>\n            3.0610927939414978e-01 -1.2851184606552124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 -7.3018344119191170e-03</internalNodes>\n          <leafValues>\n            3.7514328956604004e-01 -1.2826474010944366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 -2.9183469712734222e-02</internalNodes>\n          <leafValues>\n            4.8722788691520691e-01 -8.4734588861465454e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 4.1865529492497444e-03</internalNodes>\n          <leafValues>\n            7.4395999312400818e-02 -5.8252948522567749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 -1.3149678707122803e-02</internalNodes>\n          <leafValues>\n            2.9923921823501587e-01 -1.3687820732593536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 2.3594651371240616e-02</internalNodes>\n          <leafValues>\n            6.2197674065828323e-02 -6.3622504472732544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 -1.7678245902061462e-02</internalNodes>\n          <leafValues>\n            3.3281046152114868e-01 -1.2175620347261429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 -1.0656865313649178e-02</internalNodes>\n          <leafValues>\n            3.7733754515647888e-01 -1.0491474717855453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 5.6399200111627579e-03</internalNodes>\n          <leafValues>\n            5.4276369512081146e-02 -7.2659504413604736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 5.9759367257356644e-02</internalNodes>\n          <leafValues>\n            -9.3571089208126068e-02 4.3768402934074402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 1.5957858413457870e-03</internalNodes>\n          <leafValues>\n            -7.4856951832771301e-02 4.6114641427993774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 -3.4797050058841705e-02</internalNodes>\n          <leafValues>\n            4.3322169780731201e-01 -1.0314103215932846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 7.0810377597808838e-02</internalNodes>\n          <leafValues>\n            -1.3931407034397125e-01 2.7839028835296631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 1.0995890479534864e-03</internalNodes>\n          <leafValues>\n            8.2519724965095520e-02 -4.6114745736122131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 1.1323073413223028e-03</internalNodes>\n          <leafValues>\n            -1.1879909038543701e-01 3.1659367680549622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 2.5819817557930946e-02</internalNodes>\n          <leafValues>\n            -1.0563226789236069e-01 3.3343997597694397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -3.0109258368611336e-03</internalNodes>\n          <leafValues>\n            -4.3363004922866821e-01 9.0100899338722229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 6.4696911722421646e-03</internalNodes>\n          <leafValues>\n            4.3469883501529694e-02 -6.7987263202667236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 1.6815876588225365e-02</internalNodes>\n          <leafValues>\n            -9.4611480832099915e-02 3.5600626468658447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 -1.0637525469064713e-02</internalNodes>\n          <leafValues>\n            1.9808849692344666e-01 -1.5571328997612000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -4.1952659375965595e-03</internalNodes>\n          <leafValues>\n            -5.3476226329803467e-01 6.5039873123168945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 -1.5134566929191351e-03</internalNodes>\n          <leafValues>\n            4.2552566528320312e-01 -8.3483003079891205e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 -1.1657587019726634e-03</internalNodes>\n          <leafValues>\n            2.4901403486728668e-01 -1.2862072885036469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 5.2369404584169388e-03</internalNodes>\n          <leafValues>\n            5.4264735430479050e-02 -6.5448409318923950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 3.1857702415436506e-03</internalNodes>\n          <leafValues>\n            -1.0423248261213303e-01 3.4729331731796265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 3.2315873540937901e-03</internalNodes>\n          <leafValues>\n            7.3592320084571838e-02 -4.5663174986839294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 8.1546325236558914e-03</internalNodes>\n          <leafValues>\n            5.8343004435300827e-02 -4.7462043166160583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 1.2796278111636639e-02</internalNodes>\n          <leafValues>\n            -1.0276926308870316e-01 3.4186348319053650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 -2.3663226515054703e-02</internalNodes>\n          <leafValues>\n            2.8974771499633789e-01 -1.2335656583309174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 -1.9080806523561478e-03</internalNodes>\n          <leafValues>\n            -7.0497012138366699e-01 5.8831237256526947e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 3.0501103028655052e-03</internalNodes>\n          <leafValues>\n            5.1351051777601242e-02 -5.2438431978225708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 -4.1300453245639801e-02</internalNodes>\n          <leafValues>\n            -4.2261663079261780e-01 6.5464369952678680e-02</leafValues></_></weakClassifiers></_>\n    <!-- stage 4 -->\n    <_>\n      <maxWeakCount>66</maxWeakCount>\n      <stageThreshold>-1.6743642091751099e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 699 1.3901394791901112e-02</internalNodes>\n          <leafValues>\n            4.2875479906797409e-02 7.1057194471359253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 -1.0640731081366539e-02</internalNodes>\n          <leafValues>\n            5.9900563955307007e-01 -1.4475977420806885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 -4.2351996526122093e-03</internalNodes>\n          <leafValues>\n            4.9660456180572510e-01 -1.1618923395872116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 1.3073073700070381e-02</internalNodes>\n          <leafValues>\n            -1.6428959369659424e-01 5.0240677595138550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 -5.0384560599923134e-03</internalNodes>\n          <leafValues>\n            4.1822317242622375e-01 -1.4690572023391724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 1.2402677675709128e-03</internalNodes>\n          <leafValues>\n            -2.0295573770999908e-01 2.7518931031227112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 -1.8025336321443319e-03</internalNodes>\n          <leafValues>\n            -7.3610079288482666e-01 7.6008267700672150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 9.2999219894409180e-02</internalNodes>\n          <leafValues>\n            -1.4368277788162231e-01 3.3687326312065125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 2.1399226039648056e-02</internalNodes>\n          <leafValues>\n            -1.6605213284492493e-01 3.0147713422775269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 9.3348361551761627e-03</internalNodes>\n          <leafValues>\n            -1.6568347811698914e-01 3.0875685811042786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 -5.8921691961586475e-03</internalNodes>\n          <leafValues>\n            -5.6214910745620728e-01 8.5347160696983337e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 -1.4118023682385683e-03</internalNodes>\n          <leafValues>\n            2.6530963182449341e-01 -1.8439114093780518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 -1.1060921475291252e-02</internalNodes>\n          <leafValues>\n            2.5005301833152771e-01 -1.7930330336093903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 -3.8227883633226156e-03</internalNodes>\n          <leafValues>\n            -6.9963920116424561e-01 6.4229309558868408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 -8.4845684468746185e-03</internalNodes>\n          <leafValues>\n            -6.6004335880279541e-01 5.2848633378744125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 6.9843865931034088e-03</internalNodes>\n          <leafValues>\n            5.5426578968763351e-02 -6.1068946123123169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 4.8600544687360525e-04</internalNodes>\n          <leafValues>\n            -1.8981190025806427e-01 2.1059055626392365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 3.5324528813362122e-02</internalNodes>\n          <leafValues>\n            -8.3993434906005859e-02 5.1941823959350586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 3.9002462290227413e-03</internalNodes>\n          <leafValues>\n            7.6367795467376709e-02 -5.7813030481338501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 -4.5398771762847900e-03</internalNodes>\n          <leafValues>\n            3.3430457115173340e-01 -1.2331557273864746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 -3.1904221978038549e-03</internalNodes>\n          <leafValues>\n            -5.5545800924301147e-01 7.3627986013889313e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -7.7975630760192871e-02</internalNodes>\n          <leafValues>\n            4.8881098628044128e-01 -8.1377774477005005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 -1.1978685855865479e-02</internalNodes>\n          <leafValues>\n            2.7509516477584839e-01 -1.6613669693470001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 -8.3151785656809807e-03</internalNodes>\n          <leafValues>\n            -5.9314393997192383e-01 7.2014525532722473e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 1.3827871531248093e-02</internalNodes>\n          <leafValues>\n            -1.2803319096565247e-01 2.9465702176094055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 2.0103808492422104e-02</internalNodes>\n          <leafValues>\n            6.9175720214843750e-02 -5.6205666065216064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 -4.7183044254779816e-02</internalNodes>\n          <leafValues>\n            3.6449643969535828e-01 -1.0480687767267227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 9.7303036600351334e-03</internalNodes>\n          <leafValues>\n            -9.7578004002571106e-02 3.6821505427360535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 -3.9133569225668907e-03</internalNodes>\n          <leafValues>\n            -5.1443296670913696e-01 7.2868466377258301e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 3.0236630700528622e-03</internalNodes>\n          <leafValues>\n            5.5799212306737900e-02 -5.3572463989257812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 4.3436158448457718e-03</internalNodes>\n          <leafValues>\n            -1.5579865872859955e-01 2.0468661189079285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 1.4063127338886261e-02</internalNodes>\n          <leafValues>\n            3.6827385425567627e-02 -8.5656464099884033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 1.3388927327468991e-03</internalNodes>\n          <leafValues>\n            -1.2769578397274017e-01 2.8884974122047424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 -1.0684424778446555e-03</internalNodes>\n          <leafValues>\n            3.4348404407501221e-01 -9.6543140709400177e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 -2.3754546418786049e-03</internalNodes>\n          <leafValues>\n            -5.2730453014373779e-01 6.6801987588405609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 -4.5106699690222740e-03</internalNodes>\n          <leafValues>\n            -5.4066735506057739e-01 5.1074951887130737e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 5.6549627333879471e-03</internalNodes>\n          <leafValues>\n            -9.0248994529247284e-02 3.5249757766723633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 -3.3719413913786411e-03</internalNodes>\n          <leafValues>\n            2.8907671570777893e-01 -1.1475016921758652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 1.2221395969390869e-02</internalNodes>\n          <leafValues>\n            -1.0579165816307068e-01 3.0012521147727966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 3.2931473106145859e-03</internalNodes>\n          <leafValues>\n            7.7675424516201019e-02 -4.1641706228256226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 -3.7331613712012768e-03</internalNodes>\n          <leafValues>\n            -4.6958047151565552e-01 7.6012723147869110e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 -3.0090190470218658e-02</internalNodes>\n          <leafValues>\n            -6.2376546859741211e-01 4.4617597013711929e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 -1.1998139321804047e-02</internalNodes>\n          <leafValues>\n            3.4000751376152039e-01 -9.7472421824932098e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 2.5055123493075371e-02</internalNodes>\n          <leafValues>\n            -7.5190685689449310e-02 4.1993573307991028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 9.7161782905459404e-03</internalNodes>\n          <leafValues>\n            5.5982969701290131e-02 -6.0615026950836182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 -8.3486355841159821e-02</internalNodes>\n          <leafValues>\n            3.7426739931106567e-01 -8.7825424969196320e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 3.8952599279582500e-03</internalNodes>\n          <leafValues>\n            -1.3330259919166565e-01 2.6031884551048279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 -9.8262424580752850e-04</internalNodes>\n          <leafValues>\n            -3.9980980753898621e-01 8.2922257483005524e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 8.4215197712182999e-03</internalNodes>\n          <leafValues>\n            -1.3371372222900391e-01 2.4220858514308929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 1.2292047031223774e-03</internalNodes>\n          <leafValues>\n            -7.7718295156955719e-02 3.8342806696891785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 -1.2375478632748127e-02</internalNodes>\n          <leafValues>\n            2.3885957896709442e-01 -1.2220640480518341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 5.4268687963485718e-03</internalNodes>\n          <leafValues>\n            5.5337987840175629e-02 -5.6287312507629395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 -5.5062575265765190e-03</internalNodes>\n          <leafValues>\n            -5.7845181226730347e-01 4.2599424719810486e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 1.0439271107316017e-02</internalNodes>\n          <leafValues>\n            -8.1215575337409973e-02 3.8115817308425903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 -2.6399283669888973e-03</internalNodes>\n          <leafValues>\n            -4.5001742243766785e-01 6.7338116466999054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 2.6166734751313925e-03</internalNodes>\n          <leafValues>\n            5.5316500365734100e-02 -4.4958963990211487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 5.4496107622981071e-03</internalNodes>\n          <leafValues>\n            -8.1449449062347412e-02 3.8300925493240356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 3.4203347750008106e-03</internalNodes>\n          <leafValues>\n            -8.8027402758598328e-02 3.0551746487617493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 9.3909027054905891e-03</internalNodes>\n          <leafValues>\n            5.8738458901643753e-02 -4.9437648057937622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 9.6318572759628296e-03</internalNodes>\n          <leafValues>\n            -1.0816254466772079e-01 2.7723982930183411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 1.9004285335540771e-02</internalNodes>\n          <leafValues>\n            -8.2863554358482361e-02 3.1288793683052063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 -8.5283098742365837e-03</internalNodes>\n          <leafValues>\n            2.9951119422912598e-01 -8.9406743645668030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 6.2621399760246277e-02</internalNodes>\n          <leafValues>\n            -1.0106554627418518e-01 2.6782277226448059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 1.5604515559971333e-02</internalNodes>\n          <leafValues>\n            -1.0081429034471512e-01 2.9597061872482300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 1.3034233450889587e-01</internalNodes>\n          <leafValues>\n            -8.0539934337139130e-02 3.4444472193717957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 4.5186877250671387e-02</internalNodes>\n          <leafValues>\n            5.8131664991378784e-02 -5.4693692922592163e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 5 -->\n    <_>\n      <maxWeakCount>72</maxWeakCount>\n      <stageThreshold>-1.6700928211212158e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 763 -2.0017849747091532e-03</internalNodes>\n          <leafValues>\n            6.7056620121002197e-01 1.8883759155869484e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 -1.5712467953562737e-02</internalNodes>\n          <leafValues>\n            5.8154827356338501e-01 -1.4273743331432343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 2.4972280953079462e-03</internalNodes>\n          <leafValues>\n            -1.8454430997371674e-01 3.4281551837921143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 5.7405559346079826e-03</internalNodes>\n          <leafValues>\n            -1.7856663465499878e-01 5.1571351289749146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 8.1182969734072685e-04</internalNodes>\n          <leafValues>\n            -2.6075574755668640e-01 2.2161382436752319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 1.9957972690463066e-03</internalNodes>\n          <leafValues>\n            -1.6690193116664886e-01 3.1083983182907104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 7.9797822982072830e-03</internalNodes>\n          <leafValues>\n            -1.7903617024421692e-01 2.7573335170745850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 1.0206390172243118e-02</internalNodes>\n          <leafValues>\n            -9.3843363225460052e-02 5.3358590602874756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 3.4904260188341141e-02</internalNodes>\n          <leafValues>\n            -8.6874812841415405e-02 5.0340282917022705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 -3.8090778980404139e-03</internalNodes>\n          <leafValues>\n            2.3382174968719482e-01 -1.7857478559017181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 2.0690055098384619e-03</internalNodes>\n          <leafValues>\n            -1.8347945809364319e-01 2.1276330947875977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 -1.3203858397901058e-02</internalNodes>\n          <leafValues>\n            3.0799895524978638e-01 -1.0921970754861832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 1.6044422984123230e-02</internalNodes>\n          <leafValues>\n            -1.2722490727901459e-01 3.5042104125022888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 -2.8435707092285156e-02</internalNodes>\n          <leafValues>\n            -6.9257086515426636e-01 6.0832630842924118e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 -3.5719089210033417e-03</internalNodes>\n          <leafValues>\n            -6.1009460687637329e-01 5.5150210857391357e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 -3.3032532781362534e-02</internalNodes>\n          <leafValues>\n            3.9706656336784363e-01 -1.0905303061008453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 -3.4918042365461588e-03</internalNodes>\n          <leafValues>\n            2.2872641682624817e-01 -1.6809244453907013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 -1.2281725648790598e-03</internalNodes>\n          <leafValues>\n            2.8336051106452942e-01 -1.2107009440660477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 1.5130165964365005e-02</internalNodes>\n          <leafValues>\n            7.4081726372241974e-02 -5.0906944274902344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 -5.2624624222517014e-03</internalNodes>\n          <leafValues>\n            -5.1471787691116333e-01 5.6423079222440720e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 1.3198424130678177e-03</internalNodes>\n          <leafValues>\n            -9.7633212804794312e-02 3.6938476562500000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 -3.9102118462324142e-03</internalNodes>\n          <leafValues>\n            -7.5149536132812500e-01 5.1220502704381943e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 7.7746850438416004e-03</internalNodes>\n          <leafValues>\n            -1.6232925653457642e-01 2.0670217275619507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 -1.9946731626987457e-02</internalNodes>\n          <leafValues>\n            3.0092230439186096e-01 -9.9984362721443176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 -4.9132145941257477e-03</internalNodes>\n          <leafValues>\n            2.1954736113548279e-01 -1.6271042823791504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 -6.4505757763981819e-03</internalNodes>\n          <leafValues>\n            -4.9815052747726440e-01 6.7167595028877258e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 -6.7926600575447083e-02</internalNodes>\n          <leafValues>\n            4.3458208441734314e-01 -7.7230423688888550e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 -3.7927636876702309e-03</internalNodes>\n          <leafValues>\n            2.6469963788986206e-01 -1.2098944932222366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 -2.7826299890875816e-02</internalNodes>\n          <leafValues>\n            2.9173719882965088e-01 -1.0972167551517487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 6.0029705055058002e-03</internalNodes>\n          <leafValues>\n            -1.0543220490217209e-01 3.6175185441970825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 1.4797106850892305e-03</internalNodes>\n          <leafValues>\n            6.5247461199760437e-02 -5.3303873538970947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 9.7709074616432190e-03</internalNodes>\n          <leafValues>\n            3.5595752298831940e-02 -6.8972426652908325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 4.5413424959406257e-04</internalNodes>\n          <leafValues>\n            -1.7233507335186005e-01 1.6001893579959869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 -1.4395804610103369e-03</internalNodes>\n          <leafValues>\n            -5.1606172323226929e-01 5.5443800985813141e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 -2.4502794444561005e-01</internalNodes>\n          <leafValues>\n            -8.0270200967788696e-01 2.9995493590831757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 4.2062443681061268e-03</internalNodes>\n          <leafValues>\n            5.0134483724832535e-02 -4.9082162976264954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 1.4561998657882214e-02</internalNodes>\n          <leafValues>\n            -1.2065179646015167e-01 2.4143299460411072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 -3.3104062080383301e-02</internalNodes>\n          <leafValues>\n            3.6770820617675781e-01 -7.8033976256847382e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 3.2625906169414520e-02</internalNodes>\n          <leafValues>\n            -8.5231229662895203e-02 3.3994022011756897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 -1.1897137388586998e-02</internalNodes>\n          <leafValues>\n            2.6476562023162842e-01 -1.0443684458732605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 5.7352259755134583e-03</internalNodes>\n          <leafValues>\n            5.5395182222127914e-02 -5.1973640918731689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 -1.5062794089317322e-02</internalNodes>\n          <leafValues>\n            -7.5300645828247070e-01 3.0149688944220543e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 -7.9075228422880173e-03</internalNodes>\n          <leafValues>\n            2.8287026286125183e-01 -1.0227695107460022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 3.2159998081624508e-03</internalNodes>\n          <leafValues>\n            -6.5929308533668518e-02 3.6590230464935303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 -2.5269058533012867e-03</internalNodes>\n          <leafValues>\n            -4.7419819235801697e-01 5.8165557682514191e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 -1.8206760287284851e-03</internalNodes>\n          <leafValues>\n            2.5627982616424561e-01 -1.1308469623327255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 1.4899271540343761e-02</internalNodes>\n          <leafValues>\n            3.6266356706619263e-02 -7.6167815923690796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 3.8532419130206108e-03</internalNodes>\n          <leafValues>\n            2.6696149259805679e-02 -7.5058454275131226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 -6.1673661693930626e-03</internalNodes>\n          <leafValues>\n            3.5572922229766846e-01 -8.2323268055915833e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 -7.0832269266247749e-03</internalNodes>\n          <leafValues>\n            2.1490900218486786e-01 -1.3906964659690857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 3.5079419612884521e-03</internalNodes>\n          <leafValues>\n            4.7017443925142288e-02 -6.3156962394714355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 1.2706735869869590e-03</internalNodes>\n          <leafValues>\n            -1.0659208893775940e-01 3.1986060738563538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 -3.0069730710238218e-03</internalNodes>\n          <leafValues>\n            -7.9292476177215576e-01 3.8936499506235123e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3 2.5489944964647293e-03</internalNodes>\n          <leafValues>\n            -1.4662979543209076e-01 2.0257341861724854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 2.7439245022833347e-03</internalNodes>\n          <leafValues>\n            -9.1609120368957520e-02 3.0721578001976013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 -2.5972947478294373e-03</internalNodes>\n          <leafValues>\n            -4.2591169476509094e-01 6.7926779389381409e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 1.4116591773927212e-03</internalNodes>\n          <leafValues>\n            -1.2321621179580688e-01 2.4072754383087158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 -2.5579232722520828e-02</internalNodes>\n          <leafValues>\n            5.7537192106246948e-01 -4.9050308763980865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 -5.6264195591211319e-03</internalNodes>\n          <leafValues>\n            -5.2892494201660156e-01 6.0454059392213821e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 -1.8926127813756466e-03</internalNodes>\n          <leafValues>\n            2.4074989557266235e-01 -1.2150175124406815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 -1.0207362473011017e-02</internalNodes>\n          <leafValues>\n            -6.7782247066497803e-01 4.3572813272476196e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -3.1391347292810678e-03</internalNodes>\n          <leafValues>\n            1.9982162117958069e-01 -1.3408482074737549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 -3.1065782532095909e-03</internalNodes>\n          <leafValues>\n            2.2946853935718536e-01 -1.2754726409912109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 -5.2223210223019123e-03</internalNodes>\n          <leafValues>\n            -5.0463259220123291e-01 4.9872294068336487e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 -3.4163258969783783e-03</internalNodes>\n          <leafValues>\n            2.1628817915916443e-01 -1.1369658261537552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 5.1404302939772606e-03</internalNodes>\n          <leafValues>\n            -9.6477277576923370e-02 2.4602085351943970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 5.8603808283805847e-03</internalNodes>\n          <leafValues>\n            4.0628310292959213e-02 -6.3314515352249146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 -1.1338826734572649e-03</internalNodes>\n          <leafValues>\n            3.4083816409111023e-01 -7.9400509595870972e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 8.0572068691253662e-04</internalNodes>\n          <leafValues>\n            -9.5763482153415680e-02 3.2283502817153931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 -4.8957285471260548e-03</internalNodes>\n          <leafValues>\n            -5.3353887796401978e-01 4.9622885882854462e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 7.1027994155883789e-02</internalNodes>\n          <leafValues>\n            -6.2327813357114792e-02 4.5151355862617493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 -1.5200550667941570e-02</internalNodes>\n          <leafValues>\n            2.5859493017196655e-01 -1.0548926889896393e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 6 -->\n    <_>\n      <maxWeakCount>81</maxWeakCount>\n      <stageThreshold>-1.5793150663375854e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 562 -5.8624427765607834e-03</internalNodes>\n          <leafValues>\n            6.2237185239791870e-01 -1.5120165422558784e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 4.7948276624083519e-03</internalNodes>\n          <leafValues>\n            -1.8684723973274231e-01 4.3783110380172729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 2.4864529259502888e-03</internalNodes>\n          <leafValues>\n            -1.9763210415840149e-01 3.4098726511001587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -7.7013596892356873e-03</internalNodes>\n          <leafValues>\n            3.4580937027931213e-01 -2.2749660909175873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 -1.8182904459536076e-03</internalNodes>\n          <leafValues>\n            3.7125843763351440e-01 -1.4019212126731873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 -1.4325398951768875e-03</internalNodes>\n          <leafValues>\n            4.4040992856025696e-01 -1.0599569976329803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 5.4927580058574677e-03</internalNodes>\n          <leafValues>\n            8.4835931658744812e-02 -5.3435057401657104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -7.0448440965265036e-04</internalNodes>\n          <leafValues>\n            2.8704917430877686e-01 -1.4405579864978790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 -5.7945270091295242e-03</internalNodes>\n          <leafValues>\n            -5.1373738050460815e-01 8.3974525332450867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 -1.1944295838475227e-02</internalNodes>\n          <leafValues>\n            3.5980853438377380e-01 -1.0862441360950470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 3.4179994836449623e-03</internalNodes>\n          <leafValues>\n            -1.2899027764797211e-01 3.3064863085746765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 -7.2756269946694374e-03</internalNodes>\n          <leafValues>\n            2.3903866112232208e-01 -1.6133096814155579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 -8.5910838097333908e-03</internalNodes>\n          <leafValues>\n            -8.4211397171020508e-01 4.1614245623350143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 -3.7941135466098785e-02</internalNodes>\n          <leafValues>\n            2.4674071371555328e-01 -1.4177341759204865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 -3.6782763898372650e-02</internalNodes>\n          <leafValues>\n            3.1695553660392761e-01 -1.1061279475688934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 -1.1086702346801758e-01</internalNodes>\n          <leafValues>\n            -7.7248167991638184e-01 4.9090590327978134e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 -4.3419219553470612e-02</internalNodes>\n          <leafValues>\n            -6.3905894756317139e-01 4.7248683869838715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 7.1155801415443420e-03</internalNodes>\n          <leafValues>\n            5.5369954556226730e-02 -5.6675219535827637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 2.9427852481603622e-02</internalNodes>\n          <leafValues>\n            -1.0744783282279968e-01 3.1137129664421082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 -5.6870315223932266e-02</internalNodes>\n          <leafValues>\n            4.8549285531044006e-01 -8.4140487015247345e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 -2.1800836548209190e-03</internalNodes>\n          <leafValues>\n            3.0136430263519287e-01 -1.0869345813989639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 1.2336489744484425e-03</internalNodes>\n          <leafValues>\n            -8.9073576033115387e-02 3.3233630657196045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 2.7930366341024637e-03</internalNodes>\n          <leafValues>\n            -1.1784177273511887e-01 2.3968270421028137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -1.4338749647140503e-01</internalNodes>\n          <leafValues>\n            4.7303047776222229e-01 -5.1608867943286896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 7.9552028328180313e-03</internalNodes>\n          <leafValues>\n            6.0302641242742538e-02 -4.7011384367942810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 -4.6112807467579842e-03</internalNodes>\n          <leafValues>\n            -4.2084765434265137e-01 7.6558656990528107e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 7.8915785998106003e-03</internalNodes>\n          <leafValues>\n            -1.3884299993515015e-01 2.0495900511741638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 -2.9021099209785461e-02</internalNodes>\n          <leafValues>\n            3.3683353662490845e-01 -8.6431317031383514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 8.7932050228118896e-03</internalNodes>\n          <leafValues>\n            -1.2117365747690201e-01 2.3939569294452667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 -4.3326904997229576e-03</internalNodes>\n          <leafValues>\n            -6.3044422864913940e-01 4.8393115401268005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 -1.6151482705026865e-03</internalNodes>\n          <leafValues>\n            3.0203807353973389e-01 -9.2361047863960266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 -3.6242920905351639e-03</internalNodes>\n          <leafValues>\n            -4.0946927666664124e-01 7.3978066444396973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 -8.0828834325075150e-03</internalNodes>\n          <leafValues>\n            -6.1597609519958496e-01 4.0132850408554077e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 -1.8987425137311220e-03</internalNodes>\n          <leafValues>\n            2.5910443067550659e-01 -1.0553860664367676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 3.4845639020204544e-03</internalNodes>\n          <leafValues>\n            4.1376896202564240e-02 -6.4275610446929932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 -1.3704899698495865e-02</internalNodes>\n          <leafValues>\n            2.7235555648803711e-01 -1.0047114640474319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 -9.5059927552938461e-03</internalNodes>\n          <leafValues>\n            2.3305405676364899e-01 -1.2722322344779968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 -1.7753308638930321e-02</internalNodes>\n          <leafValues>\n            2.7121108770370483e-01 -9.8972275853157043e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 4.1816420853137970e-02</internalNodes>\n          <leafValues>\n            -8.6314909160137177e-02 2.9308396577835083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 -5.2781165577471256e-03</internalNodes>\n          <leafValues>\n            -4.3240407109260559e-01 6.6678449511528015e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 -3.5982416011393070e-03</internalNodes>\n          <leafValues>\n            -4.0664613246917725e-01 5.9939380735158920e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 -3.3817887306213379e-03</internalNodes>\n          <leafValues>\n            2.1198178827762604e-01 -1.2401402741670609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 -8.4468610584735870e-03</internalNodes>\n          <leafValues>\n            -5.0658410787582397e-01 5.6176334619522095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 -1.5873050317168236e-02</internalNodes>\n          <leafValues>\n            3.0237907171249390e-01 -8.9766949415206909e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 5.2925320342183113e-03</internalNodes>\n          <leafValues>\n            4.7194946557283401e-02 -5.8447927236557007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 -1.4822685159742832e-02</internalNodes>\n          <leafValues>\n            2.7581340074539185e-01 -1.0343603044748306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 678 -1.2328238226473331e-02</internalNodes>\n          <leafValues>\n            1.9257421791553497e-01 -1.3730424642562866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 5.4736144840717316e-02</internalNodes>\n          <leafValues>\n            -1.0764957219362259e-01 2.4070124328136444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 -2.0030699670314789e-03</internalNodes>\n          <leafValues>\n            2.8992170095443726e-01 -8.6155213415622711e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 4.9616778269410133e-03</internalNodes>\n          <leafValues>\n            3.7793070077896118e-02 -6.8241751194000244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 2.1582433953881264e-02</internalNodes>\n          <leafValues>\n            -9.2316769063472748e-02 2.6424714922904968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 -9.5060802996158600e-03</internalNodes>\n          <leafValues>\n            2.0518042147159576e-01 -1.1375468224287033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 7.4238084256649017e-02</internalNodes>\n          <leafValues>\n            -7.0650860667228699e-02 3.3061835169792175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 5.8014206588268280e-03</internalNodes>\n          <leafValues>\n            3.9557952433824539e-02 -6.0553658008575439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 8.3722146227955818e-03</internalNodes>\n          <leafValues>\n            -6.6242359578609467e-02 3.5559263825416565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 5.9322156012058258e-03</internalNodes>\n          <leafValues>\n            5.1374353468418121e-02 -4.4348692893981934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -1.5613199211657047e-03</internalNodes>\n          <leafValues>\n            3.3984366059303284e-01 -7.1964941918849945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 -1.6189547255635262e-02</internalNodes>\n          <leafValues>\n            2.0777270197868347e-01 -1.2065915018320084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 3.7794266827404499e-03</internalNodes>\n          <leafValues>\n            4.0290340781211853e-02 -5.5574357509613037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 -9.3125496059656143e-03</internalNodes>\n          <leafValues>\n            2.5648719072341919e-01 -9.4139434397220612e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 8.9797464897856116e-04</internalNodes>\n          <leafValues>\n            -1.0596609860658646e-01 3.0083754658699036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 4.1124280542135239e-03</internalNodes>\n          <leafValues>\n            4.3452557176351547e-02 -5.6017982959747314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 -5.7592550292611122e-03</internalNodes>\n          <leafValues>\n            -5.5715996026992798e-01 3.6530554294586182e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 -1.7109992913901806e-03</internalNodes>\n          <leafValues>\n            2.4350115656852722e-01 -9.9780716001987457e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 -1.9408876076340675e-02</internalNodes>\n          <leafValues>\n            -7.3736822605133057e-01 3.4421972930431366e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 -1.8505988642573357e-02</internalNodes>\n          <leafValues>\n            2.3959811031818390e-01 -1.0179302841424942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 -3.4968159161508083e-03</internalNodes>\n          <leafValues>\n            -4.5450085401535034e-01 5.2533198148012161e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 3.2340791076421738e-03</internalNodes>\n          <leafValues>\n            -9.7867593169212341e-02 2.5210717320442200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 -2.1103646140545607e-03</internalNodes>\n          <leafValues>\n            2.7718135714530945e-01 -8.3934187889099121e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 -6.0913376510143280e-03</internalNodes>\n          <leafValues>\n            -5.0269359350204468e-01 4.7654323279857635e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 -1.4657910168170929e-01</internalNodes>\n          <leafValues>\n            -5.8180803060531616e-01 3.7255339324474335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 -5.7285130023956299e-02</internalNodes>\n          <leafValues>\n            -8.1681364774703979e-01 2.3416126146912575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 -1.0855928063392639e-02</internalNodes>\n          <leafValues>\n            1.6488714516162872e-01 -1.3668881356716156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 1.4742083847522736e-02</internalNodes>\n          <leafValues>\n            3.0842842534184456e-02 -7.8335261344909668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 -1.8798124045133591e-02</internalNodes>\n          <leafValues>\n            3.1507465243339539e-01 -7.6406344771385193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 1.8614485859870911e-02</internalNodes>\n          <leafValues>\n            -8.0178938806056976e-02 3.0463775992393494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 -4.1011158376932144e-02</internalNodes>\n          <leafValues>\n            -6.7428815364837646e-01 3.5076040774583817e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 -1.5514190308749676e-03</internalNodes>\n          <leafValues>\n            1.9351305067539215e-01 -1.0952673852443695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 7.6966043561697006e-03</internalNodes>\n          <leafValues>\n            3.2414216548204422e-02 -6.0751897096633911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 -1.7850721254944801e-02</internalNodes>\n          <leafValues>\n            2.0461367070674896e-01 -1.0080502927303314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 2.3059733211994171e-03</internalNodes>\n          <leafValues>\n            -1.3565167784690857e-01 1.7179486155509949e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 7 -->\n    <_>\n      <maxWeakCount>88</maxWeakCount>\n      <stageThreshold>-1.6158927679061890e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 877 3.6321599036455154e-03</internalNodes>\n          <leafValues>\n            8.3464950323104858e-02 7.0313382148742676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -2.8561335057020187e-03</internalNodes>\n          <leafValues>\n            5.3444284200668335e-01 -1.4426039159297943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 -1.6910845879465342e-03</internalNodes>\n          <leafValues>\n            4.5417416095733643e-01 -1.4539502561092377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 2.4872912093997002e-02</internalNodes>\n          <leafValues>\n            -1.5180622041225433e-01 4.7290563583374023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 -1.3844612985849380e-02</internalNodes>\n          <leafValues>\n            4.3979367613792419e-01 -1.9149754941463470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 -2.0526167005300522e-02</internalNodes>\n          <leafValues>\n            3.5583654046058655e-01 -1.7526121437549591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 -1.0601939633488655e-02</internalNodes>\n          <leafValues>\n            2.1787860989570618e-01 -1.8377628922462463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 1.5976445749402046e-02</internalNodes>\n          <leafValues>\n            8.6497880518436432e-02 -4.3799200654029846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 -4.9493601545691490e-03</internalNodes>\n          <leafValues>\n            2.3401068150997162e-01 -1.5603557229042053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 2.8549194335937500e-02</internalNodes>\n          <leafValues>\n            -1.4324828982353210e-01 2.4674744904041290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 5.9233225882053375e-02</internalNodes>\n          <leafValues>\n            -1.0831536352634430e-01 3.3649173378944397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 9.5888428390026093e-02</internalNodes>\n          <leafValues>\n            -1.0589215904474258e-01 3.7052422761917114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 -7.5694853439927101e-03</internalNodes>\n          <leafValues>\n            2.3113159835338593e-01 -1.4907826483249664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 4.7857249155640602e-03</internalNodes>\n          <leafValues>\n            5.1639214158058167e-02 -6.2650465965270996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 5.4310320410877466e-04</internalNodes>\n          <leafValues>\n            -1.8886238336563110e-01 1.5287129580974579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 2.6117763482034206e-03</internalNodes>\n          <leafValues>\n            6.6002741456031799e-02 -4.4275501370429993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 -8.0328416079282761e-03</internalNodes>\n          <leafValues>\n            -5.1598960161209106e-01 5.6888539344072342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 1.2324389535933733e-03</internalNodes>\n          <leafValues>\n            -1.2387900799512863e-01 2.6769712567329407e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 -9.7260549664497375e-03</internalNodes>\n          <leafValues>\n            3.5000637173652649e-01 -1.0784699767827988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 8.6696096695959568e-04</internalNodes>\n          <leafValues>\n            -1.1435680836439133e-01 2.5563576817512512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 -3.4542869776487350e-02</internalNodes>\n          <leafValues>\n            -5.8313912153244019e-01 5.1875289529561996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 7.5529976747930050e-03</internalNodes>\n          <leafValues>\n            3.6179721355438232e-02 -6.9380182027816772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 4.0939049795269966e-03</internalNodes>\n          <leafValues>\n            4.1062511503696442e-02 -5.9848028421401978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 2.8113774023950100e-03</internalNodes>\n          <leafValues>\n            5.5211704224348068e-02 -4.7554171085357666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 -3.5045309923589230e-03</internalNodes>\n          <leafValues>\n            -3.9402753114700317e-01 6.9415092468261719e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 1.7898422665894032e-03</internalNodes>\n          <leafValues>\n            -7.6636046171188354e-02 4.0437600016593933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 4.0369415655732155e-03</internalNodes>\n          <leafValues>\n            -9.7471550107002258e-02 2.7784994244575500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 -8.5533969104290009e-03</internalNodes>\n          <leafValues>\n            3.3252051472663879e-01 -1.0098887234926224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 2.6041156053543091e-01</internalNodes>\n          <leafValues>\n            -4.3942935764789581e-02 5.0610113143920898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 1.4894269406795502e-03</internalNodes>\n          <leafValues>\n            -7.6404698193073273e-02 3.0335766077041626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 -4.8547232151031494e-01</internalNodes>\n          <leafValues>\n            6.1892670392990112e-01 -3.9150018244981766e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 -7.6227495446801186e-04</internalNodes>\n          <leafValues>\n            1.9151827692985535e-01 -1.2709514796733856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 -4.8853931948542595e-03</internalNodes>\n          <leafValues>\n            -5.6353646516799927e-01 4.4611949473619461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 1.8246687250211835e-03</internalNodes>\n          <leafValues>\n            6.3832193613052368e-02 -3.6079093813896179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 -3.7001366727054119e-03</internalNodes>\n          <leafValues>\n            1.9149990379810333e-01 -1.3052800297737122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 -5.1008379086852074e-03</internalNodes>\n          <leafValues>\n            4.0633511543273926e-01 -6.6167853772640228e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 -1.7046853899955750e-02</internalNodes>\n          <leafValues>\n            -3.5266619920730591e-01 7.1908973157405853e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 7.4824336916208267e-03</internalNodes>\n          <leafValues>\n            5.7628002017736435e-02 -4.6899631619453430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 -1.0255416855216026e-02</internalNodes>\n          <leafValues>\n            -5.3142738342285156e-01 4.1362568736076355e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 2.2401358000934124e-03</internalNodes>\n          <leafValues>\n            -7.4236951768398285e-02 3.2401573657989502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 -1.1338146403431892e-02</internalNodes>\n          <leafValues>\n            -5.8281844854354858e-01 4.3767549097537994e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 8.4229296771809459e-04</internalNodes>\n          <leafValues>\n            -1.2624698877334595e-01 1.8474358320236206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 2.7594935148954391e-02</internalNodes>\n          <leafValues>\n            4.2021647095680237e-02 -5.0711041688919067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 3.0329828150570393e-03</internalNodes>\n          <leafValues>\n            -7.0778228342533112e-02 3.3471760153770447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 -8.9767086319625378e-04</internalNodes>\n          <leafValues>\n            -2.8313115239143372e-01 8.4212802350521088e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 -4.3688914738595486e-03</internalNodes>\n          <leafValues>\n            -4.8104682564735413e-01 4.6536806970834732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 -6.5738772973418236e-03</internalNodes>\n          <leafValues>\n            1.8955506384372711e-01 -1.1803213506937027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 1.6207897569984198e-03</internalNodes>\n          <leafValues>\n            -6.5827853977680206e-02 3.2122904062271118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 4.8786089755594730e-03</internalNodes>\n          <leafValues>\n            3.4384466707706451e-02 -7.0796263217926025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 -7.3928516358137131e-03</internalNodes>\n          <leafValues>\n            -4.5154401659965515e-01 4.3622057884931564e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 2.2087101824581623e-03</internalNodes>\n          <leafValues>\n            -4.4949851930141449e-02 4.9991622567176819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 2.9001948423683643e-03</internalNodes>\n          <leafValues>\n            5.1781963557004929e-02 -4.2971140146255493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -9.9636090453714132e-04</internalNodes>\n          <leafValues>\n            3.0347472429275513e-01 -7.4883252382278442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 6.3986405730247498e-03</internalNodes>\n          <leafValues>\n            3.8914524018764496e-02 -5.6881076097488403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -5.2966945804655552e-03</internalNodes>\n          <leafValues>\n            -5.5442500114440918e-01 3.3734291791915894e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 9.2505104839801788e-03</internalNodes>\n          <leafValues>\n            -9.5525965094566345e-02 2.2353705763816833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 3.2701031304895878e-03</internalNodes>\n          <leafValues>\n            -8.7515957653522491e-02 2.7356430888175964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 -9.0824589133262634e-03</internalNodes>\n          <leafValues>\n            2.2333034873008728e-01 -9.6923373639583588e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 -3.0515873804688454e-03</internalNodes>\n          <leafValues>\n            -4.0757030248641968e-01 5.0947520881891251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 6.3385991379618645e-03</internalNodes>\n          <leafValues>\n            -6.0888923704624176e-02 3.5273307561874390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 -3.4346987958997488e-03</internalNodes>\n          <leafValues>\n            2.9356080293655396e-01 -8.1172131001949310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 -3.9428919553756714e-03</internalNodes>\n          <leafValues>\n            -4.9512249231338501e-01 4.4033303856849670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 -9.1780513525009155e-02</internalNodes>\n          <leafValues>\n            -3.9046007394790649e-01 5.0150144845247269e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 -6.6375046968460083e-02</internalNodes>\n          <leafValues>\n            -6.0851734876632690e-01 3.0974121764302254e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 -6.9266660138964653e-03</internalNodes>\n          <leafValues>\n            -7.3090195655822754e-01 2.3663638159632683e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 -3.5928614437580109e-02</internalNodes>\n          <leafValues>\n            1.8060323596000671e-01 -1.1467467248439789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 -4.6623144298791885e-03</internalNodes>\n          <leafValues>\n            2.3666681349277496e-01 -1.0607369244098663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 6.3546001911163330e-02</internalNodes>\n          <leafValues>\n            3.3510908484458923e-02 -6.6823011636734009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 1.0070858988910913e-03</internalNodes>\n          <leafValues>\n            -1.1336669325828552e-01 1.9138091802597046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 2.0964080467820168e-03</internalNodes>\n          <leafValues>\n            -1.3783766329288483e-01 1.6943521797657013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 -3.7955917418003082e-02</internalNodes>\n          <leafValues>\n            4.2277663946151733e-01 -5.3925208747386932e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 915 1.5981765463948250e-03</internalNodes>\n          <leafValues>\n            7.2201833128929138e-02 -2.9906082153320312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 -1.0036448948085308e-03</internalNodes>\n          <leafValues>\n            3.0661484599113464e-01 -7.1594037115573883e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 -8.7398784235119820e-03</internalNodes>\n          <leafValues>\n            -4.0562248229980469e-01 5.0554409623146057e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 3.8445743266493082e-03</internalNodes>\n          <leafValues>\n            3.0860245227813721e-02 -5.6328177452087402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 2.9180462006479502e-03</internalNodes>\n          <leafValues>\n            -9.4123579561710358e-02 2.1829530596733093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 -4.4532963074743748e-03</internalNodes>\n          <leafValues>\n            2.2356307506561279e-01 -1.0032130777835846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 2.8718812391161919e-03</internalNodes>\n          <leafValues>\n            5.8825947344303131e-02 -3.5275349020957947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 -9.6740125445649028e-04</internalNodes>\n          <leafValues>\n            2.2895433008670807e-01 -8.8445298373699188e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 6.3862642273306847e-03</internalNodes>\n          <leafValues>\n            -7.9845495522022247e-02 2.6533949375152588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 -1.8584533827379346e-03</internalNodes>\n          <leafValues>\n            -3.5019376873970032e-01 5.8831077069044113e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 -4.1777163743972778e-02</internalNodes>\n          <leafValues>\n            -7.5915527343750000e-01 2.5032732635736465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 1.7466493882238865e-03</internalNodes>\n          <leafValues>\n            -7.8535526990890503e-02 2.5856694579124451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 -1.7557941377162933e-02</internalNodes>\n          <leafValues>\n            1.5769363939762115e-01 -1.2735258042812347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 -2.0210664719343185e-02</internalNodes>\n          <leafValues>\n            2.4479819834232330e-01 -8.0905362963676453e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 -1.2817385140806437e-03</internalNodes>\n          <leafValues>\n            2.0145194232463837e-01 -1.1555081605911255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 -4.6622417867183685e-03</internalNodes>\n          <leafValues>\n            -5.7475388050079346e-01 3.5327285528182983e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 7.2181676514446735e-03</internalNodes>\n          <leafValues>\n            -6.5562173724174500e-02 2.9846385121345520e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 8 -->\n    <_>\n      <maxWeakCount>91</maxWeakCount>\n      <stageThreshold>-1.4331817626953125e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 508 -1.0981839150190353e-02</internalNodes>\n          <leafValues>\n            6.4476418495178223e-01 5.4893907159566879e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 4.4120610691606998e-03</internalNodes>\n          <leafValues>\n            -1.1835748702287674e-01 5.0045996904373169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 2.8575016185641289e-03</internalNodes>\n          <leafValues>\n            -1.3248406350612640e-01 4.2942702770233154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 2.0933073014020920e-02</internalNodes>\n          <leafValues>\n            -1.2826231122016907e-01 5.0430470705032349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 -1.4590121805667877e-02</internalNodes>\n          <leafValues>\n            3.1983098387718201e-01 -1.6088847815990448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 6.0559157282114029e-02</internalNodes>\n          <leafValues>\n            -7.2834797203540802e-02 4.6935465931892395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 3.3241603523492813e-02</internalNodes>\n          <leafValues>\n            -1.2657077610492706e-01 3.8025194406509399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -1.5009621158242226e-02</internalNodes>\n          <leafValues>\n            3.6463224887847900e-01 -9.8299026489257812e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 1.5744348056614399e-03</internalNodes>\n          <leafValues>\n            -1.1195008456707001e-01 3.1572943925857544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 -2.3936885409057140e-03</internalNodes>\n          <leafValues>\n            -4.7027668356895447e-01 7.1979902684688568e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 4.7012902796268463e-03</internalNodes>\n          <leafValues>\n            9.1855168342590332e-02 -3.6548766493797302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 3.9329114370048046e-03</internalNodes>\n          <leafValues>\n            4.4214393943548203e-02 -5.6691557168960571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 -2.8009498491883278e-03</internalNodes>\n          <leafValues>\n            -4.8461133241653442e-01 5.4654970765113831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 -4.2012645862996578e-03</internalNodes>\n          <leafValues>\n            1.9422210752964020e-01 -1.4497868716716766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 -8.7564159184694290e-03</internalNodes>\n          <leafValues>\n            -4.9580562114715576e-01 5.6972313672304153e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 3.0297664925456047e-03</internalNodes>\n          <leafValues>\n            -1.4587514102458954e-01 2.3592919111251831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 -1.1956840753555298e-02</internalNodes>\n          <leafValues>\n            3.6318615078926086e-01 -8.9037798345088959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 -9.4736125320196152e-03</internalNodes>\n          <leafValues>\n            -6.6952317953109741e-01 5.2261870354413986e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 -7.3966579511761665e-03</internalNodes>\n          <leafValues>\n            -5.5038225650787354e-01 4.5135255903005600e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 5.1108570769429207e-03</internalNodes>\n          <leafValues>\n            4.1587084531784058e-02 -5.5355554819107056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 2.1153174340724945e-02</internalNodes>\n          <leafValues>\n            -9.0628616511821747e-02 2.9272273182868958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 -4.0524005889892578e-03</internalNodes>\n          <leafValues>\n            -5.5750316381454468e-01 4.8259153962135315e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 -4.5195231214165688e-03</internalNodes>\n          <leafValues>\n            2.4507603049278259e-01 -1.1037164181470871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 2.9709473252296448e-02</internalNodes>\n          <leafValues>\n            -9.0624623000621796e-02 3.0535447597503662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 596 -2.4458598345518112e-02</internalNodes>\n          <leafValues>\n            3.8106867671012878e-01 -6.5381005406379700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 2.3627276532351971e-03</internalNodes>\n          <leafValues>\n            -8.9016206562519073e-02 2.7661785483360291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 2.5604534894227982e-03</internalNodes>\n          <leafValues>\n            4.9425628036260605e-02 -5.4407423734664917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 1.1583864688873291e-02</internalNodes>\n          <leafValues>\n            3.7279289215803146e-02 -6.2233042716979980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 745 -6.5262932330369949e-03</internalNodes>\n          <leafValues>\n            2.2733294963836670e-01 -1.1270135641098022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 -5.5729500018060207e-03</internalNodes>\n          <leafValues>\n            -5.2463114261627197e-01 4.3969567865133286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 2.7682324871420860e-03</internalNodes>\n          <leafValues>\n            -5.6408800184726715e-02 4.5612502098083496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 5.3484998643398285e-03</internalNodes>\n          <leafValues>\n            5.1867362111806870e-02 -4.8760178685188293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 5.3632212802767754e-03</internalNodes>\n          <leafValues>\n            4.4008553028106689e-02 -4.8531344532966614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 -4.5866379514336586e-03</internalNodes>\n          <leafValues>\n            -4.7415995597839355e-01 4.6904686838388443e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 -2.4732598103582859e-03</internalNodes>\n          <leafValues>\n            3.5594299435615540e-01 -6.6797487437725067e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 -1.3544519897550344e-03</internalNodes>\n          <leafValues>\n            2.5692245364189148e-01 -1.0549759119749069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 2.0623015239834785e-02</internalNodes>\n          <leafValues>\n            -1.2213230878114700e-01 1.8851162493228912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 -2.5555126368999481e-02</internalNodes>\n          <leafValues>\n            2.1115033328533173e-01 -1.1155050992965698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 -2.6123304851353168e-03</internalNodes>\n          <leafValues>\n            -4.3362092971801758e-01 5.9404496103525162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -2.0256865769624710e-02</internalNodes>\n          <leafValues>\n            2.3865076899528503e-01 -1.1111994832754135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 -1.3834737241268158e-02</internalNodes>\n          <leafValues>\n            2.4716469645500183e-01 -9.9341392517089844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 1.0408030357211828e-03</internalNodes>\n          <leafValues>\n            -8.5192345082759857e-02 2.8685340285301208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 -7.8561680857092142e-04</internalNodes>\n          <leafValues>\n            -3.1685733795166016e-01 7.3741830885410309e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 -3.1890799291431904e-03</internalNodes>\n          <leafValues>\n            2.8838813304901123e-01 -7.9454399645328522e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -1.8864404410123825e-02</internalNodes>\n          <leafValues>\n            -6.1039513349533081e-01 3.4549634903669357e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 1.9871932454407215e-03</internalNodes>\n          <leafValues>\n            -6.4915224909782410e-02 3.3199799060821533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 -4.4487272389233112e-03</internalNodes>\n          <leafValues>\n            -4.8411524295806885e-01 4.3471843004226685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 1.1506278999149799e-02</internalNodes>\n          <leafValues>\n            3.4361593425273895e-02 -5.1601499319076538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 -4.9164015799760818e-03</internalNodes>\n          <leafValues>\n            2.8029051423072815e-01 -7.6438650488853455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 6.8624541163444519e-03</internalNodes>\n          <leafValues>\n            -1.3434819877147675e-01 1.7164944112300873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 1.2513504363596439e-02</internalNodes>\n          <leafValues>\n            -8.2097627222537994e-02 2.6367199420928955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 2.5324244052171707e-02</internalNodes>\n          <leafValues>\n            -9.8793335258960724e-02 2.1438889205455780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 4.2827110737562180e-03</internalNodes>\n          <leafValues>\n            4.8010587692260742e-02 -5.3329360485076904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 -1.0588562116026878e-02</internalNodes>\n          <leafValues>\n            2.0557209849357605e-01 -1.1096615344285965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 7.3749665170907974e-03</internalNodes>\n          <leafValues>\n            4.2330745607614517e-02 -4.9726718664169312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 -1.0184315964579582e-02</internalNodes>\n          <leafValues>\n            2.2020325064659119e-01 -1.0080294311046600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 -3.1706739682704210e-03</internalNodes>\n          <leafValues>\n            -4.1845852136611938e-01 5.4482847452163696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 2.5342048611491919e-03</internalNodes>\n          <leafValues>\n            -6.9553844630718231e-02 3.2299628853797913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 -8.4150061011314392e-03</internalNodes>\n          <leafValues>\n            2.6279926300048828e-01 -9.3804508447647095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 4.0150225162506104e-02</internalNodes>\n          <leafValues>\n            2.9147522523999214e-02 -7.8112679719924927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 -4.3324208818376064e-03</internalNodes>\n          <leafValues>\n            -5.2339142560958862e-01 3.6419976502656937e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 -4.0873344987630844e-02</internalNodes>\n          <leafValues>\n            3.7220278382301331e-01 -6.1695497483015060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 5.9101730585098267e-02</internalNodes>\n          <leafValues>\n            -5.1950857043266296e-02 4.1701674461364746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 -3.1048480886965990e-03</internalNodes>\n          <leafValues>\n            2.1874889731407166e-01 -9.0781040489673615e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 3.5321055911481380e-03</internalNodes>\n          <leafValues>\n            -8.2859635353088379e-02 2.9276433587074280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 -1.2976058060303330e-03</internalNodes>\n          <leafValues>\n            -4.3279412388801575e-01 4.9447599798440933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 1.1339010670781136e-02</internalNodes>\n          <leafValues>\n            2.6531336829066277e-02 -6.9358879327774048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 8.8861025869846344e-03</internalNodes>\n          <leafValues>\n            2.6764476671814919e-02 -6.1700969934463501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 1.1916678398847580e-02</internalNodes>\n          <leafValues>\n            -9.7341567277908325e-02 2.0659063756465912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 1.2824826873838902e-02</internalNodes>\n          <leafValues>\n            -8.5851043462753296e-02 2.6430803537368774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 -4.0587522089481354e-03</internalNodes>\n          <leafValues>\n            1.8127168715000153e-01 -1.1241084337234497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 5.4964423179626465e-04</internalNodes>\n          <leafValues>\n            -9.1979973018169403e-02 2.1896743774414062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 1.5558412997052073e-03</internalNodes>\n          <leafValues>\n            -7.7465757727622986e-02 2.5980666279792786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 4.3281335383653641e-03</internalNodes>\n          <leafValues>\n            3.4584067761898041e-02 -6.2342578172683716e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -1.4533417299389839e-02</internalNodes>\n          <leafValues>\n            2.0229732990264893e-01 -1.0071664303541183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 5.6288111954927444e-03</internalNodes>\n          <leafValues>\n            3.9174310863018036e-02 -5.0741255283355713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 7.9474167432636023e-04</internalNodes>\n          <leafValues>\n            -8.0158397555351257e-02 2.3534512519836426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 -1.0926688089966774e-02</internalNodes>\n          <leafValues>\n            -5.9471416473388672e-01 3.1198443844914436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 -8.2422709092497826e-03</internalNodes>\n          <leafValues>\n            2.0226760208606720e-01 -1.1066834628582001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 -3.6351364105939865e-03</internalNodes>\n          <leafValues>\n            -6.4762312173843384e-01 2.9601249843835831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 -2.7860058471560478e-03</internalNodes>\n          <leafValues>\n            4.2289113998413086e-01 -4.8328761011362076e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 1.4032858889549971e-03</internalNodes>\n          <leafValues>\n            7.7722996473312378e-02 -2.5018605589866638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 -4.9225967377424240e-03</internalNodes>\n          <leafValues>\n            -5.3430163860321045e-01 3.4801222383975983e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 -1.2032099068164825e-02</internalNodes>\n          <leafValues>\n            2.3754563927650452e-01 -8.4349773824214935e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 5.9743728488683701e-03</internalNodes>\n          <leafValues>\n            -9.6527986228466034e-02 2.0883874595165253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 9.0228002518415451e-03</internalNodes>\n          <leafValues>\n            2.6527268812060356e-02 -7.1255648136138916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 -4.3231204152107239e-02</internalNodes>\n          <leafValues>\n            -4.5857131481170654e-01 3.5763122141361237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 1.9863661378622055e-02</internalNodes>\n          <leafValues>\n            3.8993570953607559e-02 -4.7274601459503174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 1.7278429004363716e-04</internalNodes>\n          <leafValues>\n            -1.2378288805484772e-01 1.5123386681079865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 8.4997266530990601e-03</internalNodes>\n          <leafValues>\n            3.8503456860780716e-02 -4.7635042667388916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 -1.3840992469340563e-03</internalNodes>\n          <leafValues>\n            2.4361917376518250e-01 -7.7643536031246185e-02</leafValues></_></weakClassifiers></_>\n    <!-- stage 9 -->\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.4933127164840698e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 769 -2.4473592638969421e-03</internalNodes>\n          <leafValues>\n            6.4225250482559204e-01 1.1617031693458557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 2.5613610632717609e-03</internalNodes>\n          <leafValues>\n            -1.4125512540340424e-01 4.1756254434585571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -3.6349727306514978e-03</internalNodes>\n          <leafValues>\n            4.2445364594459534e-01 -1.2421201914548874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 7.6568350195884705e-02</internalNodes>\n          <leafValues>\n            -2.0400929450988770e-01 2.4128499627113342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 4.6866592019796371e-03</internalNodes>\n          <leafValues>\n            7.2638466954231262e-02 -5.3155571222305298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 -3.9937674999237061e-02</internalNodes>\n          <leafValues>\n            4.3441477417945862e-01 -8.1894725561141968e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 -1.7270710319280624e-02</internalNodes>\n          <leafValues>\n            4.9218431115150452e-01 -8.1687144935131073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 1.0907177627086639e-01</internalNodes>\n          <leafValues>\n            -1.3829828798770905e-01 3.0388528108596802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 -8.6617004126310349e-03</internalNodes>\n          <leafValues>\n            2.4966995418071747e-01 -1.4650684595108032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 5.3433720022439957e-03</internalNodes>\n          <leafValues>\n            5.6382026523351669e-02 -4.7699481248855591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 -7.3083816096186638e-03</internalNodes>\n          <leafValues>\n            1.6508759558200836e-01 -1.8176083266735077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 -1.2855050154030323e-03</internalNodes>\n          <leafValues>\n            2.5566878914833069e-01 -1.1560125648975372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 1.6045335214585066e-03</internalNodes>\n          <leafValues>\n            -1.5024451911449432e-01 1.8980197608470917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 711 -3.2996428199112415e-03</internalNodes>\n          <leafValues>\n            -5.4483765363693237e-01 5.2060887217521667e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 -2.1930811926722527e-03</internalNodes>\n          <leafValues>\n            -5.0953930616378784e-01 4.9616143107414246e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 -1.3328871689736843e-02</internalNodes>\n          <leafValues>\n            3.2616052031517029e-01 -8.1101849675178528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 3.5710524767637253e-02</internalNodes>\n          <leafValues>\n            -9.0930387377738953e-02 3.1067803502082825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 6.7417006939649582e-03</internalNodes>\n          <leafValues>\n            -7.7294938266277313e-02 3.2216030359268188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 -8.1952005624771118e-02</internalNodes>\n          <leafValues>\n            5.3666585683822632e-01 -5.9473395347595215e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 9.2416517436504364e-03</internalNodes>\n          <leafValues>\n            -1.2617717683315277e-01 2.0812577009201050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 -2.0654057152569294e-03</internalNodes>\n          <leafValues>\n            -4.8568764328956604e-01 5.2649311721324921e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 -1.3702171854674816e-02</internalNodes>\n          <leafValues>\n            -6.6060936450958252e-01 3.5181287676095963e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 -3.0807605944573879e-03</internalNodes>\n          <leafValues>\n            -4.4769099354743958e-01 4.8634912818670273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 -1.2945728376507759e-02</internalNodes>\n          <leafValues>\n            -5.4323107004165649e-01 4.0633078664541245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 -1.3134386390447617e-02</internalNodes>\n          <leafValues>\n            -4.7699347138404846e-01 4.5706178992986679e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 1.6984546091407537e-03</internalNodes>\n          <leafValues>\n            -7.0986136794090271e-02 3.2597315311431885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 3.8461894728243351e-03</internalNodes>\n          <leafValues>\n            4.0658432990312576e-02 -5.7832121849060059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 -1.7426438629627228e-02</internalNodes>\n          <leafValues>\n            -4.3611589074134827e-01 4.5463379472494125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 -2.6193801313638687e-03</internalNodes>\n          <leafValues>\n            2.5506833195686340e-01 -8.7045751512050629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 -1.0474737733602524e-02</internalNodes>\n          <leafValues>\n            2.3522177338600159e-01 -9.5193855464458466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 -2.0476649515330791e-03</internalNodes>\n          <leafValues>\n            -4.0278571844100952e-01 5.3846791386604309e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 5.0511634908616543e-03</internalNodes>\n          <leafValues>\n            3.5829022526741028e-02 -5.8457142114639282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 -2.6015858165919781e-03</internalNodes>\n          <leafValues>\n            2.8992271423339844e-01 -7.7776394784450531e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 1.4678405132144690e-03</internalNodes>\n          <leafValues>\n            4.2822040617465973e-02 -5.0615262985229492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 3.4870039671659470e-03</internalNodes>\n          <leafValues>\n            -8.2636579871177673e-02 2.5724917650222778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 -1.9308419525623322e-01</internalNodes>\n          <leafValues>\n            3.6281177401542664e-01 -6.3503719866275787e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 1.9733399152755737e-02</internalNodes>\n          <leafValues>\n            -8.6004406213760376e-02 2.5530698895454407e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 -3.2536339014768600e-02</internalNodes>\n          <leafValues>\n            -5.8808100223541260e-01 3.7802245467901230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 8.8406521826982498e-03</internalNodes>\n          <leafValues>\n            2.5931548327207565e-02 -6.5399199724197388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 -1.0922113433480263e-03</internalNodes>\n          <leafValues>\n            2.0415900647640228e-01 -1.0292074084281921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 1.5520181041210890e-03</internalNodes>\n          <leafValues>\n            -8.4858812391757965e-02 3.0234101414680481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 3.6752538289874792e-03</internalNodes>\n          <leafValues>\n            3.9351969957351685e-02 -5.4435199499130249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 -1.7198601737618446e-02</internalNodes>\n          <leafValues>\n            -6.8883073329925537e-01 2.4503545835614204e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 -4.8199836164712906e-03</internalNodes>\n          <leafValues>\n            3.3481866121292114e-01 -6.0483735054731369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 838 8.6327344179153442e-03</internalNodes>\n          <leafValues>\n            2.9317237436771393e-02 -7.1339315176010132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 5.9000156819820404e-02</internalNodes>\n          <leafValues>\n            2.5574376806616783e-02 -6.3106632232666016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 1.0106523986905813e-03</internalNodes>\n          <leafValues>\n            -1.0588756203651428e-01 1.9086131453514099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 1.1946363374590874e-03</internalNodes>\n          <leafValues>\n            -8.1224068999290466e-02 2.6191043853759766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 8.8360151275992393e-03</internalNodes>\n          <leafValues>\n            -7.4570186436176300e-02 2.7295246720314026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 -3.8921819068491459e-03</internalNodes>\n          <leafValues>\n            -4.6577858924865723e-01 4.1507720947265625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 2.6258802972733974e-03</internalNodes>\n          <leafValues>\n            6.9952867925167084e-02 -2.7727422118186951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 4.6104520559310913e-02</internalNodes>\n          <leafValues>\n            2.8723197057843208e-02 -6.4130103588104248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 -2.3556766100227833e-03</internalNodes>\n          <leafValues>\n            1.6910773515701294e-01 -1.2073179334402084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 2.0879062358289957e-03</internalNodes>\n          <leafValues>\n            -6.1540558934211731e-02 3.1166607141494751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 -2.7457359246909618e-03</internalNodes>\n          <leafValues>\n            -4.3359285593032837e-01 4.4867228716611862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 -5.7035693898797035e-03</internalNodes>\n          <leafValues>\n            -6.3301932811737061e-01 2.7553720399737358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 -2.3487601429224014e-03</internalNodes>\n          <leafValues>\n            2.7741125226020813e-01 -7.1828551590442657e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 -1.2618269771337509e-02</internalNodes>\n          <leafValues>\n            -6.0198032855987549e-01 3.3369537442922592e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 -1.2911427766084671e-02</internalNodes>\n          <leafValues>\n            1.9097310304641724e-01 -9.6765249967575073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 2.5069573894143105e-02</internalNodes>\n          <leafValues>\n            2.9379865154623985e-02 -6.2714409828186035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 7.4739558622241020e-03</internalNodes>\n          <leafValues>\n            -6.2408778816461563e-02 3.2309064269065857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 -5.5288206785917282e-03</internalNodes>\n          <leafValues>\n            -4.4652014970779419e-01 4.4482827186584473e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 5.1614809781312943e-03</internalNodes>\n          <leafValues>\n            -1.0451946407556534e-01 1.8219007551670074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 -4.6268366277217865e-03</internalNodes>\n          <leafValues>\n            2.4900399148464203e-01 -7.5879700481891632e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 -5.0914911553263664e-03</internalNodes>\n          <leafValues>\n            -3.8135659694671631e-01 4.8699565231800079e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 1.3252631761133671e-03</internalNodes>\n          <leafValues>\n            -8.2675725221633911e-02 2.3466596007347107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 -2.9426435939967632e-03</internalNodes>\n          <leafValues>\n            -3.2485908269882202e-01 5.8781418949365616e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 7.1004321798682213e-03</internalNodes>\n          <leafValues>\n            -1.0710758715867996e-01 1.6876961290836334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 1.6454465221613646e-03</internalNodes>\n          <leafValues>\n            -6.8138562142848969e-02 2.6411062479019165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 -4.4519053772091866e-03</internalNodes>\n          <leafValues>\n            -6.5162777900695801e-01 3.1989157199859619e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 -5.6191058829426765e-03</internalNodes>\n          <leafValues>\n            2.2833730280399323e-01 -8.4053449332714081e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 -5.4375766776502132e-03</internalNodes>\n          <leafValues>\n            -4.2135429382324219e-01 4.7153089195489883e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 1.4303867937996984e-03</internalNodes>\n          <leafValues>\n            -8.1828169524669647e-02 2.2752483189105988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 5.3636888042092323e-03</internalNodes>\n          <leafValues>\n            4.6839229762554169e-02 -4.3641954660415649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 6.7459633573889732e-03</internalNodes>\n          <leafValues>\n            4.8482794314622879e-02 -3.7357741594314575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 1.8225495005026460e-03</internalNodes>\n          <leafValues>\n            -7.2007156908512115e-02 2.6155912876129150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 -6.8536788225173950e-02</internalNodes>\n          <leafValues>\n            2.3726168274879456e-01 -8.8266216218471527e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 8.4726633504033089e-03</internalNodes>\n          <leafValues>\n            3.0765017494559288e-02 -6.1803394556045532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 1.6150671988725662e-02</internalNodes>\n          <leafValues>\n            -6.9989733397960663e-02 2.7056843042373657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 7.6075509190559387e-02</internalNodes>\n          <leafValues>\n            -6.6986277699470520e-02 2.6545816659927368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 -2.4037770926952362e-03</internalNodes>\n          <leafValues>\n            2.0211938023567200e-01 -1.1674832552671432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 1.8187157809734344e-02</internalNodes>\n          <leafValues>\n            3.7632372230291367e-02 -5.2273052930831909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 -1.3952046632766724e-02</internalNodes>\n          <leafValues>\n            3.2746854424476624e-01 -6.3546165823936462e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 -2.6383304595947266e-01</internalNodes>\n          <leafValues>\n            -4.4734519720077515e-01 4.3956480920314789e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 3.7522446364164352e-03</internalNodes>\n          <leafValues>\n            3.8990244269371033e-02 -4.2726546525955200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 1.4125283341854811e-03</internalNodes>\n          <leafValues>\n            -5.6341815739870071e-02 3.3222517371177673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 4.1739037260413170e-03</internalNodes>\n          <leafValues>\n            -8.1689253449440002e-02 2.1681067347526550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 -6.1572249978780746e-03</internalNodes>\n          <leafValues>\n            -4.6595495939254761e-01 4.0940407663583755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -4.0140310302376747e-03</internalNodes>\n          <leafValues>\n            -4.4917678833007812e-01 3.6913067102432251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 5.7834591716527939e-03</internalNodes>\n          <leafValues>\n            3.7202619016170502e-02 -4.4926682114601135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 -2.7866717427968979e-03</internalNodes>\n          <leafValues>\n            2.3668289184570312e-01 -7.8896284103393555e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 -2.0863343961536884e-03</internalNodes>\n          <leafValues>\n            -3.1535735726356506e-01 5.4699663072824478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 -3.5249911248683929e-02</internalNodes>\n          <leafValues>\n            2.3871497809886932e-01 -7.4336178600788116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 1.9735466688871384e-02</internalNodes>\n          <leafValues>\n            -6.9253593683242798e-02 2.7050065994262695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 977 6.9166612811386585e-03</internalNodes>\n          <leafValues>\n            3.9671208709478378e-02 -4.5562696456909180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 1.2886511161923409e-02</internalNodes>\n          <leafValues>\n            -5.7705853134393692e-02 3.0492311716079712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 -4.3238401412963867e-02</internalNodes>\n          <leafValues>\n            -6.9368255138397217e-01 2.5768887251615524e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 5.2338346838951111e-02</internalNodes>\n          <leafValues>\n            -4.1087090969085693e-02 4.6693238615989685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 -3.8494272157549858e-03</internalNodes>\n          <leafValues>\n            1.6975462436676025e-01 -1.2150127440690994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 1.1914474889636040e-02</internalNodes>\n          <leafValues>\n            -7.7901296317577362e-02 2.2727672755718231e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 10 -->\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.5521451234817505e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 700 1.0511254891753197e-02</internalNodes>\n          <leafValues>\n            7.8954458236694336e-02 6.2691432237625122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 -4.5915953814983368e-03</internalNodes>\n          <leafValues>\n            4.8032283782958984e-01 -1.2750500440597534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 1.5926066553220153e-03</internalNodes>\n          <leafValues>\n            -2.2285957634449005e-01 2.5022059679031372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 4.7702826559543610e-02</internalNodes>\n          <leafValues>\n            -1.6401256620883942e-01 4.6663716435432434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 3.6355913616716862e-03</internalNodes>\n          <leafValues>\n            -9.0887933969497681e-02 4.3753233551979065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 -2.9029550496488810e-03</internalNodes>\n          <leafValues>\n            3.1178581714630127e-01 -1.4401906728744507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 6.0793287120759487e-03</internalNodes>\n          <leafValues>\n            -1.6874884068965912e-01 2.2609569132328033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 4.1879736818373203e-04</internalNodes>\n          <leafValues>\n            -1.9620604813098907e-01 1.5544828772544861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 2.2689576144330204e-04</internalNodes>\n          <leafValues>\n            -1.9928123056888580e-01 1.4717149734497070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 -8.1100836396217346e-02</internalNodes>\n          <leafValues>\n            -5.1434135437011719e-01 5.8547608554363251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 2.7355052530765533e-02</internalNodes>\n          <leafValues>\n            6.0101613402366638e-02 -4.1557094454765320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 -2.4958662688732147e-03</internalNodes>\n          <leafValues>\n            -5.0487858057022095e-01 5.1647525280714035e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 -1.5961761819198728e-03</internalNodes>\n          <leafValues>\n            2.1670737862586975e-01 -1.2691333889961243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 2.1885756403207779e-02</internalNodes>\n          <leafValues>\n            -8.3462193608283997e-02 3.1052881479263306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 -1.3334145769476891e-02</internalNodes>\n          <leafValues>\n            3.0464804172515869e-01 -8.8519357144832611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 -1.9117443589493632e-03</internalNodes>\n          <leafValues>\n            -6.8484777212142944e-01 4.3931856751441956e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 2.2813947871327400e-03</internalNodes>\n          <leafValues>\n            4.6766888350248337e-02 -4.8588466644287109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 -8.7422672659158707e-03</internalNodes>\n          <leafValues>\n            -4.9902194738388062e-01 4.8665110021829605e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 -4.0188119746744633e-03</internalNodes>\n          <leafValues>\n            2.2568543255329132e-01 -1.1153879016637802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 1.3594499323517084e-03</internalNodes>\n          <leafValues>\n            4.2799551039934158e-02 -5.6778526306152344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 -6.5033760620281100e-04</internalNodes>\n          <leafValues>\n            2.0394213497638702e-01 -1.1888848990201950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 -3.1412184238433838e-02</internalNodes>\n          <leafValues>\n            2.5797879695892334e-01 -9.3766883015632629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -9.2636439949274063e-03</internalNodes>\n          <leafValues>\n            -5.6845456361770630e-01 4.3344158679246902e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 -4.1950333863496780e-02</internalNodes>\n          <leafValues>\n            -3.3588516712188721e-01 6.3371837139129639e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 2.9165907762944698e-03</internalNodes>\n          <leafValues>\n            -6.9124616682529449e-02 3.5223892331123352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 -1.0271451901644468e-03</internalNodes>\n          <leafValues>\n            1.8418928980827332e-01 -1.1801387369632721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 2.6636901311576366e-03</internalNodes>\n          <leafValues>\n            -1.0614035278558731e-01 2.1366043388843536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 -1.8712934106588364e-02</internalNodes>\n          <leafValues>\n            2.4622038006782532e-01 -9.3236625194549561e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -4.8551969230175018e-03</internalNodes>\n          <leafValues>\n            3.0577266216278076e-01 -7.4214689433574677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 2.4788705632090569e-03</internalNodes>\n          <leafValues>\n            -8.6660243570804596e-02 2.9340657591819763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 -4.3734526261687279e-03</internalNodes>\n          <leafValues>\n            -5.0270831584930420e-01 4.9233034253120422e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 -4.9623926170170307e-03</internalNodes>\n          <leafValues>\n            -4.4072946906089783e-01 4.5711714774370193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 3.0696424655616283e-03</internalNodes>\n          <leafValues>\n            5.5255725979804993e-02 -3.7899428606033325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -8.1601645797491074e-03</internalNodes>\n          <leafValues>\n            2.6425153017044067e-01 -8.2545064389705658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 -1.4500592369586229e-03</internalNodes>\n          <leafValues>\n            1.8156392872333527e-01 -1.2637530267238617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 -3.7104606162756681e-03</internalNodes>\n          <leafValues>\n            1.9824002683162689e-01 -1.0828326642513275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 -8.7567782029509544e-03</internalNodes>\n          <leafValues>\n            2.8610706329345703e-01 -7.3251776397228241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 -1.8970356322824955e-03</internalNodes>\n          <leafValues>\n            -6.0897153615951538e-01 3.7743657827377319e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 3.8996827602386475e-01</internalNodes>\n          <leafValues>\n            -5.8310892432928085e-02 3.6127504706382751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 -4.9336552619934082e-03</internalNodes>\n          <leafValues>\n            3.0048343539237976e-01 -6.4242139458656311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 2.5108925998210907e-02</internalNodes>\n          <leafValues>\n            2.5090903043746948e-02 -8.1637203693389893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 4.2880335822701454e-03</internalNodes>\n          <leafValues>\n            -8.1443257629871368e-02 2.6617726683616638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 -5.6165808928199112e-05</internalNodes>\n          <leafValues>\n            1.4481364190578461e-01 -1.6212667524814606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 3.0591385439038277e-03</internalNodes>\n          <leafValues>\n            2.8733581304550171e-02 -7.0054715871810913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 -3.0338061042129993e-03</internalNodes>\n          <leafValues>\n            -8.2671564817428589e-01 1.9727285951375961e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 -2.1344989072531462e-03</internalNodes>\n          <leafValues>\n            1.6036525368690491e-01 -1.2014801055192947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 2.4434458464384079e-02</internalNodes>\n          <leafValues>\n            -1.0801825672388077e-01 2.0232307910919189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 -6.6356086172163486e-03</internalNodes>\n          <leafValues>\n            1.9015397131443024e-01 -1.0796815156936646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 -8.2725454121828079e-03</internalNodes>\n          <leafValues>\n            3.1057110428810120e-01 -8.6532585322856903e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 -7.1973735466599464e-03</internalNodes>\n          <leafValues>\n            -5.8514142036437988e-01 3.6453813314437866e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 -1.3809885131195188e-03</internalNodes>\n          <leafValues>\n            1.6234619915485382e-01 -1.2079101055860519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 1.2584345415234566e-02</internalNodes>\n          <leafValues>\n            -8.4917336702346802e-02 2.3094473779201508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 8.0425739288330078e-03</internalNodes>\n          <leafValues>\n            4.0869396179914474e-02 -5.2088880538940430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 4.0921196341514587e-02</internalNodes>\n          <leafValues>\n            -5.4803006350994110e-02 3.5920065641403198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 -3.6556557752192020e-03</internalNodes>\n          <leafValues>\n            3.0303934216499329e-01 -6.9975942373275757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 -2.6071248576045036e-03</internalNodes>\n          <leafValues>\n            1.7682927846908569e-01 -1.1164762824773788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -5.8146800845861435e-02</internalNodes>\n          <leafValues>\n            -3.7277954816818237e-01 5.6890588253736496e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 -2.2651627659797668e-01</internalNodes>\n          <leafValues>\n            4.0828245878219604e-01 -5.9184983372688293e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 5.7799168862402439e-03</internalNodes>\n          <leafValues>\n            4.0102362632751465e-02 -5.5016636848449707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 1.6304963501170278e-03</internalNodes>\n          <leafValues>\n            -1.2154985219240189e-01 1.5898743271827698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 2.0045600831508636e-03</internalNodes>\n          <leafValues>\n            2.9790198430418968e-02 -5.8250021934509277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 -2.0879322662949562e-02</internalNodes>\n          <leafValues>\n            2.1142369508743286e-01 -8.7382547557353973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 -7.2442064993083477e-04</internalNodes>\n          <leafValues>\n            2.3263402283191681e-01 -8.1574723124504089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 -7.4541047215461731e-03</internalNodes>\n          <leafValues>\n            -4.5152980089187622e-01 4.5829907059669495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 -8.5284758824855089e-04</internalNodes>\n          <leafValues>\n            2.1253970265388489e-01 -9.1697148978710175e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 2.0642249728552997e-04</internalNodes>\n          <leafValues>\n            -1.3943105936050415e-01 1.3452273607254028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 3.2144919969141483e-03</internalNodes>\n          <leafValues>\n            2.8089782223105431e-02 -6.4253503084182739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 -4.6502160839736462e-03</internalNodes>\n          <leafValues>\n            2.4156840145587921e-01 -7.5992465019226074e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 -7.9781133681535721e-03</internalNodes>\n          <leafValues>\n            -6.4584964513778687e-01 2.7661839500069618e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 5.7130996137857437e-03</internalNodes>\n          <leafValues>\n            3.4437701106071472e-02 -4.5668947696685791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 5.4299971088767052e-03</internalNodes>\n          <leafValues>\n            -8.4557615220546722e-02 2.4553726613521576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 2.3061740212142467e-03</internalNodes>\n          <leafValues>\n            3.6576978862285614e-02 -5.1891702413558960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 5.0157017540186644e-04</internalNodes>\n          <leafValues>\n            -1.1976727843284607e-01 1.6033935546875000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 -1.9801128655672073e-04</internalNodes>\n          <leafValues>\n            1.5492685139179230e-01 -1.1399404704570770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 2.1493299864232540e-03</internalNodes>\n          <leafValues>\n            -8.7143458425998688e-02 2.1080201864242554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 -1.0518108028918505e-03</internalNodes>\n          <leafValues>\n            1.7875078320503235e-01 -9.7399607300758362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 9.2383408918976784e-03</internalNodes>\n          <leafValues>\n            3.2961033284664154e-02 -5.5265057086944580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 3.6674018949270248e-02</internalNodes>\n          <leafValues>\n            -5.6394163519144058e-02 3.2619351148605347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 1.8489698413759470e-03</internalNodes>\n          <leafValues>\n            -7.7260658144950867e-02 2.3810040950775146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 -3.9793262258172035e-03</internalNodes>\n          <leafValues>\n            2.3499612510204315e-01 -8.8490329682826996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 3.7299278192222118e-03</internalNodes>\n          <leafValues>\n            3.1517989933490753e-02 -6.3558888435363770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 4.9755964428186417e-03</internalNodes>\n          <leafValues>\n            2.8343016281723976e-02 -5.1388341188430786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 2.8308688197284937e-03</internalNodes>\n          <leafValues>\n            -1.1687427759170532e-01 1.4075778424739838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 -4.3399848043918610e-02</internalNodes>\n          <leafValues>\n            3.3840376138687134e-01 -6.5363220870494843e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 4.4767763465642929e-03</internalNodes>\n          <leafValues>\n            5.3890492767095566e-02 -3.8843661546707153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 1.4579682610929012e-03</internalNodes>\n          <leafValues>\n            -9.5170073211193085e-02 1.7093485593795776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 4.3643731623888016e-03</internalNodes>\n          <leafValues>\n            -1.0353569686412811e-01 1.9202291965484619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 -6.4208358526229858e-03</internalNodes>\n          <leafValues>\n            -5.2469170093536377e-01 3.1174579635262489e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 -1.0310811921954155e-03</internalNodes>\n          <leafValues>\n            2.1713955700397491e-01 -8.0816701054573059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 -4.0359990671277046e-03</internalNodes>\n          <leafValues>\n            -5.2423858642578125e-01 3.4388832747936249e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 -5.9410361573100090e-03</internalNodes>\n          <leafValues>\n            2.1114565432071686e-01 -8.0375924706459045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 -4.7730140388011932e-02</internalNodes>\n          <leafValues>\n            -6.6018968820571899e-01 2.6816543191671371e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 -6.1359764076769352e-03</internalNodes>\n          <leafValues>\n            2.6270267367362976e-01 -7.4918255209922791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 -3.2268161885440350e-03</internalNodes>\n          <leafValues>\n            -3.3210110664367676e-01 5.3716354072093964e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 2.7645970694720745e-03</internalNodes>\n          <leafValues>\n            2.4829804897308350e-02 -6.3309198617935181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 6.1914063990116119e-03</internalNodes>\n          <leafValues>\n            -7.9355642199516296e-02 2.0996589958667755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 -6.0850339941680431e-03</internalNodes>\n          <leafValues>\n            1.8700407445430756e-01 -9.2255704104900360e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 3.8954569026827812e-03</internalNodes>\n          <leafValues>\n            -6.2000993639230728e-02 2.9947289824485779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 7.9390443861484528e-03</internalNodes>\n          <leafValues>\n            -4.7935441136360168e-02 3.3055123686790466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 -7.4474988505244255e-03</internalNodes>\n          <leafValues>\n            -2.7902829647064209e-01 5.9020437300205231e-02</leafValues></_></weakClassifiers></_>\n    <!-- stage 11 -->\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.5058170557022095e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 764 6.6398456692695618e-03</internalNodes>\n          <leafValues>\n            1.5219502151012421e-01 7.0482629537582397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 -7.4103027582168579e-03</internalNodes>\n          <leafValues>\n            4.4995731115341187e-01 -1.0949239879846573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 -1.2679899111390114e-02</internalNodes>\n          <leafValues>\n            3.1908708810806274e-01 -1.3895240426063538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 1.0303283110260963e-02</internalNodes>\n          <leafValues>\n            -1.7546384036540985e-01 2.9695376753807068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 -4.7976471483707428e-02</internalNodes>\n          <leafValues>\n            4.4112482666969299e-01 -1.1231642961502075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 3.2145732548087835e-03</internalNodes>\n          <leafValues>\n            -1.8380118906497955e-01 2.3316045105457306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 2.4557339493185282e-03</internalNodes>\n          <leafValues>\n            -1.4323309063911438e-01 2.3558256030082703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 -5.2055031061172485e-02</internalNodes>\n          <leafValues>\n            -4.4221264123916626e-01 7.0444636046886444e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 7.7533419243991375e-03</internalNodes>\n          <leafValues>\n            5.6696638464927673e-02 -5.1518803834915161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 4.7272985102608800e-04</internalNodes>\n          <leafValues>\n            -1.5081474184989929e-01 1.8353472650051117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 -1.7044700682163239e-02</internalNodes>\n          <leafValues>\n            -4.3840527534484863e-01 6.8837635219097137e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 -3.5762921907007694e-03</internalNodes>\n          <leafValues>\n            2.4851283431053162e-01 -1.0779865086078644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 -2.4369158782064915e-03</internalNodes>\n          <leafValues>\n            3.0688673257827759e-01 -8.9006565511226654e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 -3.6047215107828379e-03</internalNodes>\n          <leafValues>\n            2.7542102336883545e-01 -1.0634675621986389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 -1.1534212157130241e-02</internalNodes>\n          <leafValues>\n            -5.5281609296798706e-01 4.9770243465900421e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 2.7643658686429262e-03</internalNodes>\n          <leafValues>\n            2.9803691431879997e-02 -7.3425543308258057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 -2.6033269241452217e-03</internalNodes>\n          <leafValues>\n            -4.4093501567840576e-01 5.0419628620147705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 4.8673897981643677e-02</internalNodes>\n          <leafValues>\n            5.8146391063928604e-02 -3.7859597802162170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 -4.4065229594707489e-03</internalNodes>\n          <leafValues>\n            -6.9404369592666626e-01 3.1734105199575424e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 973 1.6997805796563625e-03</internalNodes>\n          <leafValues>\n            3.6800261586904526e-02 -5.4090088605880737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 1.8069827929139137e-03</internalNodes>\n          <leafValues>\n            -8.9325174689292908e-02 2.5629612803459167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 -4.4371248222887516e-03</internalNodes>\n          <leafValues>\n            2.3971243202686310e-01 -1.0280106216669083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 973 -2.2968063130974770e-03</internalNodes>\n          <leafValues>\n            -5.8439761400222778e-01 4.1789893060922623e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 1.4388319104909897e-03</internalNodes>\n          <leafValues>\n            -1.2928913533687592e-01 1.6424950957298279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 -6.5411212854087353e-03</internalNodes>\n          <leafValues>\n            1.7306149005889893e-01 -1.3702909648418427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 -9.8783060908317566e-02</internalNodes>\n          <leafValues>\n            4.2455860972404480e-01 -5.3996428847312927e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 -1.5466672182083130e-01</internalNodes>\n          <leafValues>\n            -4.6163687109947205e-01 5.4335389286279678e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 -2.3389626294374466e-03</internalNodes>\n          <leafValues>\n            -6.5777504444122314e-01 2.6686858385801315e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 5.0454838201403618e-03</internalNodes>\n          <leafValues>\n            4.9083609133958817e-02 -3.7508815526962280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 2.5655250996351242e-02</internalNodes>\n          <leafValues>\n            -5.0410125404596329e-02 4.6358433365821838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 2.6888975407928228e-03</internalNodes>\n          <leafValues>\n            -8.7988443672657013e-02 2.4659486114978790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 -3.9576226845383644e-03</internalNodes>\n          <leafValues>\n            -3.4467720985412598e-01 6.0443773865699768e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 3.9240214973688126e-03</internalNodes>\n          <leafValues>\n            -7.2165921330451965e-02 3.6404970288276672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 1.3846965739503503e-03</internalNodes>\n          <leafValues>\n            5.7182963937520981e-02 -3.8552245497703552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 -8.4817763417959213e-03</internalNodes>\n          <leafValues>\n            1.8708378076553345e-01 -1.1441195011138916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 2.6850812137126923e-03</internalNodes>\n          <leafValues>\n            3.1117379665374756e-02 -6.2151008844375610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 1.8728687427937984e-03</internalNodes>\n          <leafValues>\n            2.9517510905861855e-02 -5.8275890350341797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 -1.4214152470231056e-03</internalNodes>\n          <leafValues>\n            2.1085265278816223e-01 -8.4942653775215149e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 -1.4164925087243319e-03</internalNodes>\n          <leafValues>\n            -5.0255894660949707e-01 3.4562669694423676e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 2.7755820192396641e-03</internalNodes>\n          <leafValues>\n            -8.5956700146198273e-02 2.1839313209056854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 6.0641965828835964e-03</internalNodes>\n          <leafValues>\n            3.4184314310550690e-02 -5.6067311763763428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 -2.9663506429642439e-03</internalNodes>\n          <leafValues>\n            2.6388403773307800e-01 -7.4524797499179840e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 -1.7851786687970161e-02</internalNodes>\n          <leafValues>\n            -3.5538297891616821e-01 5.5470395833253860e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 -7.7814348042011261e-03</internalNodes>\n          <leafValues>\n            2.5654977560043335e-01 -7.7634811401367188e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 6.2794378027319908e-04</internalNodes>\n          <leafValues>\n            -1.1543263494968414e-01 1.7257589101791382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 -2.0482162944972515e-03</internalNodes>\n          <leafValues>\n            2.0133562386035919e-01 -9.2291958630084991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 -2.0528757013380527e-03</internalNodes>\n          <leafValues>\n            2.4054610729217529e-01 -9.5314949750900269e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 1.9264804432168603e-03</internalNodes>\n          <leafValues>\n            -8.8165275752544403e-02 2.1321870386600494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 1.0841939598321915e-02</internalNodes>\n          <leafValues>\n            3.4955434501171112e-02 -5.3944343328475952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 -7.5648901984095573e-03</internalNodes>\n          <leafValues>\n            -7.1435016393661499e-01 2.2735377773642540e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -7.4579543434083462e-04</internalNodes>\n          <leafValues>\n            2.0245671272277832e-01 -9.3201741576194763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 -1.2499685399234295e-03</internalNodes>\n          <leafValues>\n            1.4646218717098236e-01 -1.3543428480625153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 5.8323808480054140e-04</internalNodes>\n          <leafValues>\n            -9.3358881771564484e-02 2.0619191229343414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 1.9810695201158524e-02</internalNodes>\n          <leafValues>\n            2.7015892788767815e-02 -7.5727492570877075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 5.9376070275902748e-03</internalNodes>\n          <leafValues>\n            -1.2178353220224380e-01 1.6173928976058960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 1.5689490828663111e-03</internalNodes>\n          <leafValues>\n            3.1975947320461273e-02 -6.0493367910385132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 2.5749076157808304e-03</internalNodes>\n          <leafValues>\n            -9.0526103973388672e-02 2.2666496038436890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 7.9413484781980515e-03</internalNodes>\n          <leafValues>\n            5.1273416727781296e-02 -3.9284336566925049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 3.2074376940727234e-02</internalNodes>\n          <leafValues>\n            2.7649452909827232e-02 -6.5098905563354492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 -4.8892917111515999e-03</internalNodes>\n          <leafValues>\n            -4.7998306155204773e-01 3.3806797116994858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 -5.4039997048676014e-03</internalNodes>\n          <leafValues>\n            2.8928443789482117e-01 -6.7743733525276184e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 6.3710450194776058e-03</internalNodes>\n          <leafValues>\n            -9.2935405671596527e-02 1.9695936143398285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 -1.8336625071242452e-03</internalNodes>\n          <leafValues>\n            -3.5492643713951111e-01 5.1711678504943848e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 2.1252036094665527e-03</internalNodes>\n          <leafValues>\n            2.0353749394416809e-02 -7.2820025682449341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 1.1279534548521042e-02</internalNodes>\n          <leafValues>\n            2.5639204308390617e-02 -5.8714842796325684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 -1.1507571488618851e-01</internalNodes>\n          <leafValues>\n            -7.1453052759170532e-01 2.0069327205419540e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 -1.9626193679869175e-03</internalNodes>\n          <leafValues>\n            1.6723833978176117e-01 -1.0802425444126129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 4.7044735401868820e-03</internalNodes>\n          <leafValues>\n            -5.0709329545497894e-02 3.6821383237838745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 1.8476420082151890e-03</internalNodes>\n          <leafValues>\n            2.8631281107664108e-02 -6.8395125865936279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 -5.4538771510124207e-03</internalNodes>\n          <leafValues>\n            -6.8269199132919312e-01 2.0947692915797234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 -1.0074324905872345e-02</internalNodes>\n          <leafValues>\n            -5.0528079271316528e-01 2.8627410531044006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 -3.2069636508822441e-03</internalNodes>\n          <leafValues>\n            1.8038518726825714e-01 -9.3303814530372620e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 3.5637444816529751e-03</internalNodes>\n          <leafValues>\n            -6.5284818410873413e-02 3.2510238885879517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 2.1060477010905743e-03</internalNodes>\n          <leafValues>\n            3.0474457889795303e-02 -5.9379291534423828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 4.2934687808156013e-03</internalNodes>\n          <leafValues>\n            -7.1521542966365814e-02 2.4279323220252991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 8.2498760893940926e-03</internalNodes>\n          <leafValues>\n            3.7760157138109207e-02 -4.5278856158256531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 2.5047136005014181e-03</internalNodes>\n          <leafValues>\n            -7.9689919948577881e-02 2.0523649454116821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 -1.7786353128030896e-03</internalNodes>\n          <leafValues>\n            -6.7214471101760864e-01 2.7108855545520782e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 5.6851857900619507e-01</internalNodes>\n          <leafValues>\n            -2.9719989746809006e-02 6.2848883867263794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 -3.9951098151504993e-03</internalNodes>\n          <leafValues>\n            1.6902630031108856e-01 -9.6066430211067200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 -1.1912260204553604e-02</internalNodes>\n          <leafValues>\n            1.8001109361648560e-01 -1.0152278095483780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 -3.2837040722370148e-02</internalNodes>\n          <leafValues>\n            2.2790163755416870e-01 -7.5773715972900391e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 -9.5821768045425415e-03</internalNodes>\n          <leafValues>\n            2.8319683670997620e-01 -6.0501150786876678e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 -7.0154434069991112e-03</internalNodes>\n          <leafValues>\n            3.7711927294731140e-01 -4.5414235442876816e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 2.2930791601538658e-03</internalNodes>\n          <leafValues>\n            -9.7957342863082886e-02 1.8666461110115051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 3.6181495524942875e-03</internalNodes>\n          <leafValues>\n            -8.5584357380867004e-02 2.1272744238376617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 -3.5851418506354094e-03</internalNodes>\n          <leafValues>\n            -3.2166537642478943e-01 5.0518564879894257e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 2.0358990877866745e-03</internalNodes>\n          <leafValues>\n            -9.0195730328559875e-02 1.7850238084793091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 3.0855672433972359e-02</internalNodes>\n          <leafValues>\n            7.0852726697921753e-02 -2.3407098650932312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 -2.8650071471929550e-03</internalNodes>\n          <leafValues>\n            2.5149047374725342e-01 -7.0797137916088104e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 6.9189509376883507e-03</internalNodes>\n          <leafValues>\n            -7.6844424009323120e-02 2.2756692767143250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 3.2940365374088287e-02</internalNodes>\n          <leafValues>\n            -6.0664962977170944e-02 2.7875399589538574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 8.9268945157527924e-03</internalNodes>\n          <leafValues>\n            -8.5170723497867584e-02 2.3205895721912384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 -7.8886147821322083e-04</internalNodes>\n          <leafValues>\n            -2.9130771756172180e-01 6.2974251806735992e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 -5.6759864091873169e-03</internalNodes>\n          <leafValues>\n            -4.1244068741798401e-01 3.6539580672979355e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 1.2777841184288263e-03</internalNodes>\n          <leafValues>\n            -8.5783556103706360e-02 1.8866100907325745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 3.7156887352466583e-02</internalNodes>\n          <leafValues>\n            -1.0894140601158142e-01 1.4975252747535706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 -5.7424330711364746e-01</internalNodes>\n          <leafValues>\n            7.2750979661941528e-01 -2.4812746793031693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 -1.3634916394948959e-03</internalNodes>\n          <leafValues>\n            2.2405619919300079e-01 -6.9666981697082520e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 3.3075414597988129e-02</internalNodes>\n          <leafValues>\n            -5.6832231581211090e-02 3.0118697881698608e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 12 -->\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.5318367481231689e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 770 -2.2907990496605635e-03</internalNodes>\n          <leafValues>\n            5.9861046075820923e-01 8.8971912860870361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 3.1865492928773165e-03</internalNodes>\n          <leafValues>\n            -1.5604956448078156e-01 3.8612595200538635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 561 -8.0397585406899452e-03</internalNodes>\n          <leafValues>\n            2.8996115922927856e-01 -1.8175528943538666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 4.3595694005489349e-03</internalNodes>\n          <leafValues>\n            -8.0427564680576324e-02 5.0874835252761841e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 2.8643116354942322e-02</internalNodes>\n          <leafValues>\n            -1.7203453183174133e-01 3.2913634181022644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 -3.1282915733754635e-03</internalNodes>\n          <leafValues>\n            3.7550333142280579e-01 -9.1347120702266693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 1.4058926608413458e-03</internalNodes>\n          <leafValues>\n            -1.9007267057895660e-01 1.6663856804370880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 1.0209476575255394e-02</internalNodes>\n          <leafValues>\n            -1.2146373838186264e-01 2.3719595372676849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 6.0191084630787373e-03</internalNodes>\n          <leafValues>\n            5.1051452755928040e-02 -5.5820345878601074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 -4.7453744336962700e-03</internalNodes>\n          <leafValues>\n            1.6992042958736420e-01 -1.6199907660484314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 1.5875545796006918e-03</internalNodes>\n          <leafValues>\n            -1.0143589228391647e-01 2.6255446672439575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 -2.7861427515745163e-03</internalNodes>\n          <leafValues>\n            -4.0354993939399719e-01 6.7644119262695312e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 4.0722191333770752e-03</internalNodes>\n          <leafValues>\n            4.1441403329372406e-02 -5.5184590816497803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 1.0626179864630103e-03</internalNodes>\n          <leafValues>\n            -1.4222721755504608e-01 1.7192882299423218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 4.7259610146284103e-03</internalNodes>\n          <leafValues>\n            5.1823709160089493e-02 -3.9256933331489563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 -2.6500346139073372e-03</internalNodes>\n          <leafValues>\n            -3.5642188787460327e-01 6.6784784197807312e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 3.9345081895589828e-03</internalNodes>\n          <leafValues>\n            -6.1840496957302094e-02 3.9278426766395569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 8.9293124619871378e-04</internalNodes>\n          <leafValues>\n            -1.0518563538789749e-01 2.3271512985229492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 5.7920545339584351e-02</internalNodes>\n          <leafValues>\n            -6.8776324391365051e-02 3.3801963925361633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 -6.6577367484569550e-02</internalNodes>\n          <leafValues>\n            4.2277967929840088e-01 -6.3239939510822296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 -5.5271089076995850e-03</internalNodes>\n          <leafValues>\n            -4.1861197352409363e-01 6.0344558209180832e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 3.3537389244884253e-03</internalNodes>\n          <leafValues>\n            -1.5910768508911133e-01 1.7853063344955444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 -2.3959013633430004e-03</internalNodes>\n          <leafValues>\n            2.5072932243347168e-01 -8.5364922881126404e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 -2.1867034956812859e-03</internalNodes>\n          <leafValues>\n            -5.6374865770339966e-01 3.5474341362714767e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 2.4597872979938984e-03</internalNodes>\n          <leafValues>\n            3.1019955873489380e-02 -5.5415368080139160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 -2.9149088077247143e-03</internalNodes>\n          <leafValues>\n            -4.6299308538436890e-01 3.7638399749994278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 -1.5585927758365870e-03</internalNodes>\n          <leafValues>\n            1.4355151355266571e-01 -1.3060651719570160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 -3.1853761523962021e-02</internalNodes>\n          <leafValues>\n            -4.6954944729804993e-01 3.7520393729209900e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 -5.1449546590447426e-03</internalNodes>\n          <leafValues>\n            2.7591976523399353e-01 -6.6930308938026428e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 -1.7139092087745667e-03</internalNodes>\n          <leafValues>\n            -3.8028663396835327e-01 4.9521040171384811e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -1.0931883752346039e-01</internalNodes>\n          <leafValues>\n            -4.1068795323371887e-01 4.0003888309001923e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 -2.5099035352468491e-02</internalNodes>\n          <leafValues>\n            4.3478006124496460e-01 -5.5282033979892731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 8.1472359597682953e-03</internalNodes>\n          <leafValues>\n            -4.5095365494489670e-02 3.9842218160629272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 -1.9677784293889999e-03</internalNodes>\n          <leafValues>\n            1.8696348369121552e-01 -1.1214685440063477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 -2.6076552458107471e-03</internalNodes>\n          <leafValues>\n            2.2791831195354462e-01 -8.7665997445583344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 -4.1761510074138641e-03</internalNodes>\n          <leafValues>\n            -6.8348854780197144e-01 2.8925698250532150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 1.3159511610865593e-02</internalNodes>\n          <leafValues>\n            2.1792927756905556e-02 -7.0727092027664185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 -5.1895831711590290e-03</internalNodes>\n          <leafValues>\n            -6.6959971189498901e-01 2.1171124652028084e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 -1.5662111341953278e-02</internalNodes>\n          <leafValues>\n            -3.6895245313644409e-01 4.1785925626754761e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 0 -2.4020818527787924e-03</internalNodes>\n          <leafValues>\n            1.7773237824440002e-01 -1.0461435467004776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 1.9489541649818420e-02</internalNodes>\n          <leafValues>\n            3.1142184510827065e-02 -5.4499447345733643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 4.9672335386276245e-01</internalNodes>\n          <leafValues>\n            -2.4833207949995995e-02 7.6724356412887573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 3.2806373201310635e-03</internalNodes>\n          <leafValues>\n            -6.8504363298416138e-02 2.2050221264362335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 2.1590515971183777e-03</internalNodes>\n          <leafValues>\n            2.5587400421500206e-02 -6.2128585577011108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 5.2638887427747250e-04</internalNodes>\n          <leafValues>\n            -9.3414209783077240e-02 1.7369781434535980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 -2.1490573417395353e-03</internalNodes>\n          <leafValues>\n            -4.4394543766975403e-01 3.9975218474864960e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 1.9845911301672459e-03</internalNodes>\n          <leafValues>\n            -8.5414819419384003e-02 2.0132684707641602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 -3.2773464918136597e-03</internalNodes>\n          <leafValues>\n            2.4408425390720367e-01 -7.3116399347782135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 2.1245577372610569e-03</internalNodes>\n          <leafValues>\n            2.9403384774923325e-02 -5.7607394456863403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 1.4500851975753903e-03</internalNodes>\n          <leafValues>\n            -6.6218085587024689e-02 2.4264883995056152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 -4.5542549341917038e-03</internalNodes>\n          <leafValues>\n            -5.8058720827102661e-01 2.8668973594903946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 4.7045715153217316e-02</internalNodes>\n          <leafValues>\n            3.6376014351844788e-02 -4.1573047637939453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 7.7028926461935043e-03</internalNodes>\n          <leafValues>\n            -7.7403679490089417e-02 2.1597269177436829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 -4.1527286171913147e-02</internalNodes>\n          <leafValues>\n            -3.4835410118103027e-01 4.8530772328376770e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 -9.1361545491963625e-04</internalNodes>\n          <leafValues>\n            1.8357329070568085e-01 -9.0061083436012268e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 -5.0414498895406723e-02</internalNodes>\n          <leafValues>\n            2.5009948015213013e-01 -6.4314760267734528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 7.4737053364515305e-03</internalNodes>\n          <leafValues>\n            -5.7431813329458237e-02 2.8318390250205994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 2.3173280060291290e-03</internalNodes>\n          <leafValues>\n            3.7970397621393204e-02 -5.6861978769302368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 4.5855477219447494e-04</internalNodes>\n          <leafValues>\n            -1.3554716110229492e-01 1.1426483094692230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 1.8236173782497644e-03</internalNodes>\n          <leafValues>\n            2.6509260758757591e-02 -5.5975830554962158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 -1.3565555214881897e-02</internalNodes>\n          <leafValues>\n            3.5292169451713562e-01 -4.7534435987472534e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 -1.2756066862493753e-03</internalNodes>\n          <leafValues>\n            2.5920400023460388e-01 -5.7072717696428299e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 6.7418040707707405e-03</internalNodes>\n          <leafValues>\n            3.2604463398456573e-02 -4.5861816406250000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 827 6.5548229031264782e-04</internalNodes>\n          <leafValues>\n            -8.4788605570793152e-02 1.8131427466869354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 2.1027602255344391e-02</internalNodes>\n          <leafValues>\n            -6.9927647709846497e-02 2.4611653387546539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 1.8613610416650772e-02</internalNodes>\n          <leafValues>\n            -3.6128688603639603e-02 4.4170859456062317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 -4.9805632233619690e-01</internalNodes>\n          <leafValues>\n            5.9478044509887695e-01 -2.6719097048044205e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 -3.2723334152251482e-03</internalNodes>\n          <leafValues>\n            2.2165246307849884e-01 -6.8788610398769379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 -3.5375617444515228e-03</internalNodes>\n          <leafValues>\n            -6.1987191438674927e-01 2.6597078889608383e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 3.9524696767330170e-03</internalNodes>\n          <leafValues>\n            -7.5478851795196533e-02 2.1777774393558502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 -9.3436334282159805e-03</internalNodes>\n          <leafValues>\n            -8.0256491899490356e-01 2.2864339873194695e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 -1.0151248425245285e-03</internalNodes>\n          <leafValues>\n            -3.1884235143661499e-01 4.3938383460044861e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 -7.0278989151120186e-03</internalNodes>\n          <leafValues>\n            1.4721503853797913e-01 -1.1400235444307327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 -9.1165518388152122e-03</internalNodes>\n          <leafValues>\n            2.6830977201461792e-01 -6.4460486173629761e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 3.3993504941463470e-02</internalNodes>\n          <leafValues>\n            2.7748649939894676e-02 -5.5171352624893188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 -2.6347138918936253e-03</internalNodes>\n          <leafValues>\n            1.7853704094886780e-01 -8.4178321063518524e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 -1.3291095383465290e-03</internalNodes>\n          <leafValues>\n            -2.8526228666305542e-01 5.6452732533216476e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 1.2167419772595167e-03</internalNodes>\n          <leafValues>\n            -7.7132880687713623e-02 1.9538262486457825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 1.9806078635156155e-03</internalNodes>\n          <leafValues>\n            2.6976436376571655e-02 -5.4301941394805908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 5.0783145707100630e-04</internalNodes>\n          <leafValues>\n            -9.5295064151287079e-02 1.5398529171943665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 -5.0868269056081772e-02</internalNodes>\n          <leafValues>\n            -6.3152486085891724e-01 2.3585954681038857e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -1.4806092949584126e-03</internalNodes>\n          <leafValues>\n            2.6132494211196899e-01 -6.3322558999061584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -1.8584117293357849e-02</internalNodes>\n          <leafValues>\n            1.6097819805145264e-01 -1.1777820438146591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 2.7171591296792030e-02</internalNodes>\n          <leafValues>\n            -8.3719044923782349e-02 1.9814659655094147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 -6.8197408691048622e-03</internalNodes>\n          <leafValues>\n            -5.4431658983230591e-01 2.8722483664751053e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 -9.1905370354652405e-03</internalNodes>\n          <leafValues>\n            1.5037034451961517e-01 -1.0166583955287933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 -9.7952038049697876e-04</internalNodes>\n          <leafValues>\n            -2.9014238715171814e-01 4.9301091581583023e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 -2.1513784304261208e-03</internalNodes>\n          <leafValues>\n            2.4622270464897156e-01 -6.0794923454523087e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 -2.0869732834398746e-03</internalNodes>\n          <leafValues>\n            2.0386496186256409e-01 -8.8516488671302795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 -1.2946429662406445e-02</internalNodes>\n          <leafValues>\n            -5.2757191658020020e-01 2.9759777709841728e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 -3.5145760048180819e-03</internalNodes>\n          <leafValues>\n            -4.7929930686950684e-01 2.8995612636208534e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 2.4212854914367199e-03</internalNodes>\n          <leafValues>\n            -6.4840331673622131e-02 2.4126507341861725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 2.1736249327659607e-03</internalNodes>\n          <leafValues>\n            2.2003039717674255e-02 -7.0873755216598511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 -3.5567809827625751e-03</internalNodes>\n          <leafValues>\n            2.9770645499229431e-01 -5.5486857891082764e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 -1.9639974460005760e-02</internalNodes>\n          <leafValues>\n            -7.8722274303436279e-01 2.1807981655001640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 8.1145912408828735e-03</internalNodes>\n          <leafValues>\n            2.0471598953008652e-02 -5.9867942333221436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 1.2241180054843426e-02</internalNodes>\n          <leafValues>\n            1.6892330721020699e-02 -7.4894833564758301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 3.2565161585807800e-02</internalNodes>\n          <leafValues>\n            1.8086636438965797e-02 -6.3382810354232788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 1.2451345100998878e-02</internalNodes>\n          <leafValues>\n            -6.6715493798255920e-02 2.1516454219818115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 -2.9989825561642647e-02</internalNodes>\n          <leafValues>\n            2.0229698717594147e-01 -6.8314045667648315e-02</leafValues></_></weakClassifiers></_>\n    <!-- stage 13 -->\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.6178516149520874e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 499 -3.4503117203712463e-03</internalNodes>\n          <leafValues>\n            6.1788332462310791e-01 1.1437324434518814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 4.8226695507764816e-03</internalNodes>\n          <leafValues>\n            -1.0551112145185471e-01 4.8962607979774475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 5.1433052867650986e-03</internalNodes>\n          <leafValues>\n            -1.1823723465204239e-01 4.1509538888931274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 1.8649311736226082e-02</internalNodes>\n          <leafValues>\n            -1.4054079353809357e-01 4.4154295325279236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 -2.9543964192271233e-03</internalNodes>\n          <leafValues>\n            2.5874784588813782e-01 -1.4265626668930054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 3.1133145093917847e-03</internalNodes>\n          <leafValues>\n            -8.1695765256881714e-02 3.6735343933105469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 -3.0071800574660301e-03</internalNodes>\n          <leafValues>\n            -3.8455182313919067e-01 7.1067951619625092e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 -1.9453115761280060e-02</internalNodes>\n          <leafValues>\n            2.1075683832168579e-01 -1.2884819507598877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 -4.8584998585283756e-03</internalNodes>\n          <leafValues>\n            1.6113398969173431e-01 -1.7580857872962952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 8.2634367048740387e-02</internalNodes>\n          <leafValues>\n            -5.9177018702030182e-02 4.0204021334648132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 4.5589236542582512e-03</internalNodes>\n          <leafValues>\n            -1.5169224143028259e-01 2.1497711539268494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 5.7522351853549480e-03</internalNodes>\n          <leafValues>\n            -1.0400034487247467e-01 2.3692265152931213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 1.0916464030742645e-02</internalNodes>\n          <leafValues>\n            3.2482013106346130e-02 -6.6799944639205933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 1.2513624969869852e-03</internalNodes>\n          <leafValues>\n            -9.2966683208942413e-02 2.5203207135200500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 8.5552372038364410e-03</internalNodes>\n          <leafValues>\n            4.2838018387556076e-02 -5.4950177669525146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 1.9793706014752388e-03</internalNodes>\n          <leafValues>\n            -1.0328737646341324e-01 2.2137698531150818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 -2.3129612207412720e-02</internalNodes>\n          <leafValues>\n            -5.9918802976608276e-01 3.7120997905731201e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 -2.5169795844703913e-03</internalNodes>\n          <leafValues>\n            -4.0429180860519409e-01 4.7458905726671219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 -2.7680140919983387e-03</internalNodes>\n          <leafValues>\n            -4.1959136724472046e-01 4.7375876456499100e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 4.4881463982164860e-03</internalNodes>\n          <leafValues>\n            -5.3955338895320892e-02 4.0468615293502808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 1.1571742361411452e-03</internalNodes>\n          <leafValues>\n            6.1304513365030289e-02 -3.6215540766716003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 3.6775614134967327e-03</internalNodes>\n          <leafValues>\n            3.5641182214021683e-02 -5.1911950111389160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 2.4001342244446278e-03</internalNodes>\n          <leafValues>\n            -8.0022528767585754e-02 2.6706510782241821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 -1.4416232006624341e-03</internalNodes>\n          <leafValues>\n            2.5601235032081604e-01 -8.7470635771751404e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 5.0148535519838333e-03</internalNodes>\n          <leafValues>\n            5.7711403816938400e-02 -3.5666841268539429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 2.9201959259808064e-03</internalNodes>\n          <leafValues>\n            -7.3214575648307800e-02 2.7563962340354919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 -2.8012858820147812e-05</internalNodes>\n          <leafValues>\n            1.3044390082359314e-01 -1.5220497548580170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 2.6261559687554836e-03</internalNodes>\n          <leafValues>\n            6.3371658325195312e-02 -2.9989096522331238e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 -1.9985539838671684e-02</internalNodes>\n          <leafValues>\n            -7.0204716920852661e-01 2.5756308808922768e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 4.0448461659252644e-03</internalNodes>\n          <leafValues>\n            -9.9051415920257568e-02 2.0554924011230469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 7.6400241814553738e-03</internalNodes>\n          <leafValues>\n            4.8610400408506393e-02 -4.0662041306495667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 1.5262419357895851e-02</internalNodes>\n          <leafValues>\n            -9.2194251716136932e-02 2.0623819530010223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 -6.1596641317009926e-03</internalNodes>\n          <leafValues>\n            -5.0260418653488159e-01 3.7245232611894608e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 -2.5804866105318069e-02</internalNodes>\n          <leafValues>\n            -5.2190864086151123e-01 3.0063979327678680e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -4.6107484959065914e-03</internalNodes>\n          <leafValues>\n            -4.2041480541229248e-01 3.7473026663064957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 -1.6811741515994072e-03</internalNodes>\n          <leafValues>\n            3.3520191907882690e-01 -5.3664822131395340e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 1.0210975306108594e-03</internalNodes>\n          <leafValues>\n            -7.0165649056434631e-02 2.7230393886566162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 -2.7257478795945644e-03</internalNodes>\n          <leafValues>\n            -3.7600108981132507e-01 4.8897936940193176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 1.7022072570398450e-03</internalNodes>\n          <leafValues>\n            3.2578211277723312e-02 -4.8195156455039978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 2.0580790005624294e-03</internalNodes>\n          <leafValues>\n            -1.1316970735788345e-01 1.4754198491573334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 1.9031974952667952e-03</internalNodes>\n          <leafValues>\n            6.1289772391319275e-02 -2.7776253223419189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 -4.5437026768922806e-02</internalNodes>\n          <leafValues>\n            2.8187385201454163e-01 -6.1310045421123505e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 -2.0433391630649567e-01</internalNodes>\n          <leafValues>\n            -4.8491853475570679e-01 3.7197910249233246e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 -2.2007026709616184e-03</internalNodes>\n          <leafValues>\n            -4.8433649539947510e-01 2.8523173183202744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 2.4706670083105564e-03</internalNodes>\n          <leafValues>\n            -8.0774910748004913e-02 2.0636586844921112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 -1.1496900115162134e-03</internalNodes>\n          <leafValues>\n            2.0466096699237823e-01 -7.8325189650058746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 -4.3232389725744724e-03</internalNodes>\n          <leafValues>\n            -3.4593367576599121e-01 4.9537312239408493e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 -9.3772150576114655e-03</internalNodes>\n          <leafValues>\n            -5.5802655220031738e-01 2.5828598067164421e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 -1.6863006167113781e-03</internalNodes>\n          <leafValues>\n            1.9700750708580017e-01 -8.0926463007926941e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 5.5908015929162502e-03</internalNodes>\n          <leafValues>\n            -5.8355998247861862e-02 3.0854061245918274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 -4.9319159006699920e-04</internalNodes>\n          <leafValues>\n            1.3386693596839905e-01 -1.1287388950586319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 -5.3560961037874222e-02</internalNodes>\n          <leafValues>\n            3.3912947773933411e-01 -4.4598836451768875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 -2.4220649152994156e-02</internalNodes>\n          <leafValues>\n            -4.5232787728309631e-01 4.1364260017871857e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 1.2709838338196278e-03</internalNodes>\n          <leafValues>\n            -8.8080756366252899e-02 1.8180713057518005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -4.4361655600368977e-03</internalNodes>\n          <leafValues>\n            -4.2694598436355591e-01 3.6063931882381439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 -6.5719988197088242e-04</internalNodes>\n          <leafValues>\n            1.8804629147052765e-01 -8.5146181285381317e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 1.8579278141260147e-02</internalNodes>\n          <leafValues>\n            4.4604945927858353e-02 -3.7216106057167053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 3.0188630335032940e-03</internalNodes>\n          <leafValues>\n            -9.7823068499565125e-02 1.5584464371204376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 1.6309421043843031e-03</internalNodes>\n          <leafValues>\n            3.5910408943891525e-02 -4.3541318178176880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 1.3791467994451523e-02</internalNodes>\n          <leafValues>\n            1.7177715897560120e-02 -7.7653616666793823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 1.0393885895609856e-03</internalNodes>\n          <leafValues>\n            -1.2292464822530746e-01 1.1997509002685547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 -1.8992213299497962e-03</internalNodes>\n          <leafValues>\n            -5.8449220657348633e-01 2.3935828357934952e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 -4.4655447709374130e-04</internalNodes>\n          <leafValues>\n            1.8246568739414215e-01 -8.1576324999332428e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 1.1696915607899427e-03</internalNodes>\n          <leafValues>\n            4.1298836469650269e-02 -3.7100258469581604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 -8.9874223340302706e-04</internalNodes>\n          <leafValues>\n            1.3932932913303375e-01 -1.0641934722661972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 5.9534879401326180e-03</internalNodes>\n          <leafValues>\n            2.6781413704156876e-02 -6.1212611198425293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 -8.0954860895872116e-03</internalNodes>\n          <leafValues>\n            2.6603493094444275e-01 -5.9750139713287354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -8.2374701742082834e-04</internalNodes>\n          <leafValues>\n            2.1638387441635132e-01 -6.4249947667121887e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 -7.6250307029113173e-04</internalNodes>\n          <leafValues>\n            2.0882584154605865e-01 -8.5345618426799774e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 2.3917213547974825e-03</internalNodes>\n          <leafValues>\n            2.9081748798489571e-02 -5.5320137739181519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 -5.6062731891870499e-03</internalNodes>\n          <leafValues>\n            -3.1231331825256348e-01 4.6577330678701401e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 1.2068089097738266e-02</internalNodes>\n          <leafValues>\n            -6.9983117282390594e-02 2.1360129117965698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 -6.1361752450466156e-03</internalNodes>\n          <leafValues>\n            1.5866123139858246e-01 -8.9951172471046448e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 2.7342736721038818e-03</internalNodes>\n          <leafValues>\n            4.6424146741628647e-02 -3.2302507758140564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 2.5015277788043022e-02</internalNodes>\n          <leafValues>\n            -9.2339992523193359e-02 1.6995115578174591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 3.6676183342933655e-02</internalNodes>\n          <leafValues>\n            -8.1868082284927368e-02 2.0542381703853607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 2.9560746625065804e-03</internalNodes>\n          <leafValues>\n            4.2714115232229233e-02 -3.9473703503608704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 -5.4626376368105412e-04</internalNodes>\n          <leafValues>\n            1.7010760307312012e-01 -9.1078221797943115e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 3.5485455300658941e-03</internalNodes>\n          <leafValues>\n            -7.2080396115779877e-02 2.2900597751140594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 -3.1973507720977068e-03</internalNodes>\n          <leafValues>\n            2.0531810820102692e-01 -8.5912480950355530e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 -2.5095739401876926e-03</internalNodes>\n          <leafValues>\n            -3.3782237768173218e-01 5.3629480302333832e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 1.2365024536848068e-02</internalNodes>\n          <leafValues>\n            2.7145428583025932e-02 -5.5763113498687744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 2.0736612379550934e-02</internalNodes>\n          <leafValues>\n            -6.0063906013965607e-02 2.5700190663337708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 2.6504596695303917e-02</internalNodes>\n          <leafValues>\n            3.4878112375736237e-02 -4.7980275750160217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 -9.5798689872026443e-03</internalNodes>\n          <leafValues>\n            -6.1055964231491089e-01 2.1064205095171928e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 1.9744917750358582e-02</internalNodes>\n          <leafValues>\n            -4.9393177032470703e-02 3.0676594376564026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 3.0523580498993397e-03</internalNodes>\n          <leafValues>\n            4.1798073798418045e-02 -3.5442468523979187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 -4.3955976143479347e-03</internalNodes>\n          <leafValues>\n            2.5482681393623352e-01 -5.6209251284599304e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 2.2425290662795305e-03</internalNodes>\n          <leafValues>\n            -9.7824580967426300e-02 1.7274166643619537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 7.1967259049415588e-02</internalNodes>\n          <leafValues>\n            -3.9488561451435089e-02 3.6034339666366577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 8.4581580013036728e-03</internalNodes>\n          <leafValues>\n            3.5755772143602371e-02 -4.4762039184570312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 3.3080112189054489e-03</internalNodes>\n          <leafValues>\n            2.2785754874348640e-02 -5.3823727369308472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 -1.1890231398865581e-03</internalNodes>\n          <leafValues>\n            1.7143265902996063e-01 -8.1015840172767639e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 -1.7523975111544132e-03</internalNodes>\n          <leafValues>\n            2.5996673107147217e-01 -6.9269210100173950e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 5.4229743545874953e-04</internalNodes>\n          <leafValues>\n            -7.4078343808650970e-02 2.0903676748275757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 3.9791758172214031e-03</internalNodes>\n          <leafValues>\n            4.0985044091939926e-02 -3.6837655305862427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 -6.9316523149609566e-03</internalNodes>\n          <leafValues>\n            -4.1581609845161438e-01 3.2475329935550690e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 4.1018679738044739e-02</internalNodes>\n          <leafValues>\n            -6.6409081220626831e-02 2.3296032845973969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 3.3051387872546911e-03</internalNodes>\n          <leafValues>\n            -8.2739837467670441e-02 1.9939082860946655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 -1.3641032390296459e-02</internalNodes>\n          <leafValues>\n            1.6623613238334656e-01 -8.6717613041400909e-02</leafValues></_></weakClassifiers></_>\n    <!-- stage 14 -->\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.6119387149810791e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 508 -1.0795817710459232e-02</internalNodes>\n          <leafValues>\n            5.7589554786682129e-01 9.1795757412910461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 -1.4518407406285405e-03</internalNodes>\n          <leafValues>\n            3.8668358325958252e-01 -1.4567533135414124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 1.2619893066585064e-02</internalNodes>\n          <leafValues>\n            -1.3285328447818756e-01 3.8423144817352295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 -8.6567001417279243e-03</internalNodes>\n          <leafValues>\n            2.0455244183540344e-01 -1.9482232630252838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 8.7269591167569160e-03</internalNodes>\n          <leafValues>\n            -9.0128563344478607e-02 4.0668380260467529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 -4.8108389601111412e-03</internalNodes>\n          <leafValues>\n            4.0858918428421021e-01 -7.6686508953571320e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 2.7277414119453169e-05</internalNodes>\n          <leafValues>\n            -2.1661256253719330e-01 1.3865883648395538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 -9.6549151930958033e-04</internalNodes>\n          <leafValues>\n            1.9036890566349030e-01 -1.3512735068798065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 -1.1629101354628801e-03</internalNodes>\n          <leafValues>\n            2.7597144246101379e-01 -8.5875771939754486e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 3.2347193919122219e-03</internalNodes>\n          <leafValues>\n            -1.4792887866497040e-01 1.6230462491512299e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 -6.0261571779847145e-03</internalNodes>\n          <leafValues>\n            -5.2146345376968384e-01 3.9669245481491089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 3.7499368190765381e-03</internalNodes>\n          <leafValues>\n            4.7719169408082962e-02 -4.2560356855392456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 -2.2638911381363869e-02</internalNodes>\n          <leafValues>\n            2.7776387333869934e-01 -8.2894414663314819e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 2.8850757516920567e-03</internalNodes>\n          <leafValues>\n            -7.3187254369258881e-02 3.4045669436454773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 9.2617822811007500e-03</internalNodes>\n          <leafValues>\n            -6.1159532517194748e-02 3.4422287344932556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 4.7564059495925903e-03</internalNodes>\n          <leafValues>\n            4.2927626520395279e-02 -5.0712525844573975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 1.0375332832336426e-01</internalNodes>\n          <leafValues>\n            3.7820540368556976e-02 -5.4858410358428955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 -1.1948650702834129e-02</internalNodes>\n          <leafValues>\n            3.0298843979835510e-01 -7.0214085280895233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 1.7851736396551132e-02</internalNodes>\n          <leafValues>\n            -8.9291095733642578e-02 2.2659333050251007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 1.7700281459838152e-03</internalNodes>\n          <leafValues>\n            -9.0894356369972229e-02 2.3938187956809998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 1.0000608861446381e-02</internalNodes>\n          <leafValues>\n            5.4091196507215500e-02 -4.5715424418449402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 5.1841903477907181e-03</internalNodes>\n          <leafValues>\n            4.4081535190343857e-02 -4.0113139152526855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 1.9869320094585419e-03</internalNodes>\n          <leafValues>\n            -8.6456976830959320e-02 2.3278492689132690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 7.3318472132086754e-03</internalNodes>\n          <leafValues>\n            4.4677142053842545e-02 -4.3628835678100586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 5.3855171427130699e-03</internalNodes>\n          <leafValues>\n            3.1241770833730698e-02 -5.7641702890396118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -5.8841239660978317e-04</internalNodes>\n          <leafValues>\n            2.1748071908950806e-01 -9.8720036447048187e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 -4.6296482905745506e-03</internalNodes>\n          <leafValues>\n            -5.0439667701721191e-01 3.9307218044996262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 1.0425396263599396e-02</internalNodes>\n          <leafValues>\n            -6.9303810596466064e-02 2.8114342689514160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 3.4709304571151733e-02</internalNodes>\n          <leafValues>\n            -4.4065892696380615e-02 4.7260922193527222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 -1.9787646830081940e-02</internalNodes>\n          <leafValues>\n            -6.3054060935974121e-01 3.7138473242521286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 -1.0857213288545609e-02</internalNodes>\n          <leafValues>\n            -3.4433662891387939e-01 4.5778658241033554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 -3.3750114962458611e-03</internalNodes>\n          <leafValues>\n            -4.4760662317276001e-01 3.7368919700384140e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 7.1516213938593864e-04</internalNodes>\n          <leafValues>\n            -1.4026457071304321e-01 1.2475384026765823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 -3.0070471111685038e-03</internalNodes>\n          <leafValues>\n            -5.2588617801666260e-01 3.0897416174411774e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 -3.0869825277477503e-03</internalNodes>\n          <leafValues>\n            2.8596574068069458e-01 -6.7343741655349731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 -4.3112646788358688e-02</internalNodes>\n          <leafValues>\n            -7.0135027170181274e-01 2.6632267981767654e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 -1.2020026333630085e-03</internalNodes>\n          <leafValues>\n            -3.8874247670173645e-01 4.1288472712039948e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 -3.8164458237588406e-04</internalNodes>\n          <leafValues>\n            1.3130629062652588e-01 -1.3220198452472687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 -4.4994866475462914e-03</internalNodes>\n          <leafValues>\n            -2.8277575969696045e-01 6.8065464496612549e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 -4.2400006204843521e-03</internalNodes>\n          <leafValues>\n            -5.7234168052673340e-01 2.4768881499767303e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 3.3328742720186710e-03</internalNodes>\n          <leafValues>\n            -6.9700233638286591e-02 2.3259970545768738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 -1.4152936637401581e-02</internalNodes>\n          <leafValues>\n            -6.5485191345214844e-01 2.5028359144926071e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 -3.3239413052797318e-02</internalNodes>\n          <leafValues>\n            2.1122130751609802e-01 -8.0384172499179840e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 3.9529884234070778e-03</internalNodes>\n          <leafValues>\n            -7.4974447488784790e-02 2.7394378185272217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 2.0498572848737240e-03</internalNodes>\n          <leafValues>\n            3.5124473273754120e-02 -5.0805884599685669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 1.3978367205709219e-03</internalNodes>\n          <leafValues>\n            -8.5583955049514771e-02 1.9296622276306152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 3.1700683757662773e-03</internalNodes>\n          <leafValues>\n            4.6254437416791916e-02 -3.5503390431404114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 -1.0263657895848155e-03</internalNodes>\n          <leafValues>\n            1.3199952244758606e-01 -1.2064760923385620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 -4.1109144687652588e-02</internalNodes>\n          <leafValues>\n            1.7420990765094757e-01 -9.8242506384849548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 1.5759501606225967e-02</internalNodes>\n          <leafValues>\n            -7.5842045247554779e-02 2.3157498240470886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 -9.5934671116992831e-04</internalNodes>\n          <leafValues>\n            1.8444137275218964e-01 -9.2052407562732697e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 5.4162740707397461e-03</internalNodes>\n          <leafValues>\n            3.1357165426015854e-02 -5.3519624471664429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 3.4875022247433662e-03</internalNodes>\n          <leafValues>\n            4.8432532697916031e-02 -3.3630362153053284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 1.3441047631204128e-03</internalNodes>\n          <leafValues>\n            -8.3214677870273590e-02 2.0162117481231689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 -2.3109107278287411e-03</internalNodes>\n          <leafValues>\n            1.8354012072086334e-01 -8.8427804410457611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 5.1613273099064827e-03</internalNodes>\n          <leafValues>\n            -6.8671047687530518e-02 2.2440080344676971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 -2.3844663053750992e-02</internalNodes>\n          <leafValues>\n            -6.2796258926391602e-01 2.7813719585537910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 3.7013965193182230e-03</internalNodes>\n          <leafValues>\n            -6.7407652735710144e-02 2.7093955874443054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 3.9885155856609344e-03</internalNodes>\n          <leafValues>\n            3.4067343920469284e-02 -5.4420226812362671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 1.8910076469182968e-02</internalNodes>\n          <leafValues>\n            4.2769759893417358e-02 -3.3686736226081848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 1.2143498286604881e-02</internalNodes>\n          <leafValues>\n            1.9569551572203636e-02 -7.1214914321899414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -5.6570172309875488e-03</internalNodes>\n          <leafValues>\n            -3.6661344766616821e-01 3.4494820982217789e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 2.1571468096226454e-03</internalNodes>\n          <leafValues>\n            -8.9639738202095032e-02 1.5742646157741547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 1.8860616255551577e-03</internalNodes>\n          <leafValues>\n            -8.5441410541534424e-02 1.7696820199489594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 1.0152467293664813e-03</internalNodes>\n          <leafValues>\n            3.8969900459051132e-02 -3.7170857191085815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 -7.2436146438121796e-03</internalNodes>\n          <leafValues>\n            1.7777322232723236e-01 -8.3921253681182861e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 -3.7075001746416092e-03</internalNodes>\n          <leafValues>\n            1.8386960029602051e-01 -9.2291206121444702e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 -1.4369469135999680e-03</internalNodes>\n          <leafValues>\n            -2.7023202180862427e-01 5.5822439491748810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 -1.7798715271055698e-03</internalNodes>\n          <leafValues>\n            1.4900380373001099e-01 -9.8068036139011383e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 1.9487005192786455e-03</internalNodes>\n          <leafValues>\n            -7.6331101357936859e-02 1.8935331702232361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 2.8823004104197025e-03</internalNodes>\n          <leafValues>\n            4.2902354151010513e-02 -3.5214039683341980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 -5.6123267859220505e-03</internalNodes>\n          <leafValues>\n            -4.7632521390914917e-01 2.6048270985484123e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 1.6383089125156403e-02</internalNodes>\n          <leafValues>\n            -8.9606925845146179e-02 1.4743074774742126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 3.4455281496047974e-01</internalNodes>\n          <leafValues>\n            -2.0530648529529572e-02 7.2817444801330566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 2.7680541388690472e-03</internalNodes>\n          <leafValues>\n            -3.8598377257585526e-02 3.5294523835182190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 3.8404709193855524e-03</internalNodes>\n          <leafValues>\n            -8.0346472561359406e-02 1.8624457716941833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 -4.3602049350738525e-02</internalNodes>\n          <leafValues>\n            2.4986675381660461e-01 -7.1408227086067200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 -3.6010099574923515e-03</internalNodes>\n          <leafValues>\n            1.6942474246025085e-01 -1.0419391095638275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 -6.1740418896079063e-03</internalNodes>\n          <leafValues>\n            -4.6275594830513000e-01 3.1903993338346481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 3.4251257311552763e-03</internalNodes>\n          <leafValues>\n            2.5748182088136673e-02 -4.8371604084968567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 -3.9031119085848331e-03</internalNodes>\n          <leafValues>\n            1.6738632321357727e-01 -8.4549814462661743e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 -7.3322677053511143e-04</internalNodes>\n          <leafValues>\n            2.1091395616531372e-01 -7.2518013417720795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 2.7150693349540234e-03</internalNodes>\n          <leafValues>\n            -5.7143334299325943e-02 2.7224695682525635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 1.7057932913303375e-02</internalNodes>\n          <leafValues>\n            -6.3262723386287689e-02 2.4493633210659027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 2.2439109161496162e-03</internalNodes>\n          <leafValues>\n            6.1605937778949738e-02 -2.5090345740318298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 9.2767914757132530e-03</internalNodes>\n          <leafValues>\n            3.9061944931745529e-02 -3.7177914381027222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 -1.3303438900038600e-03</internalNodes>\n          <leafValues>\n            2.2685268521308899e-01 -6.3722826540470123e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 -2.8938084840774536e-02</internalNodes>\n          <leafValues>\n            -6.6085141897201538e-01 2.1666957065463066e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 -5.0926357507705688e-03</internalNodes>\n          <leafValues>\n            1.7695400118827820e-01 -7.9500846564769745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 5.3870421834290028e-03</internalNodes>\n          <leafValues>\n            -5.5856045335531235e-02 2.7346748113632202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 -8.0796808470040560e-04</internalNodes>\n          <leafValues>\n            -2.2386504709720612e-01 6.8852454423904419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 3.9214566349983215e-03</internalNodes>\n          <leafValues>\n            2.2929171100258827e-02 -5.9076148271560669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 -6.5161995589733124e-03</internalNodes>\n          <leafValues>\n            -5.5175542831420898e-01 2.0790172740817070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 -1.6703434521332383e-03</internalNodes>\n          <leafValues>\n            -3.5234490036964417e-01 3.4917417913675308e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 -3.2307719811797142e-03</internalNodes>\n          <leafValues>\n            1.5907490253448486e-01 -7.8541077673435211e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 5.0736088305711746e-03</internalNodes>\n          <leafValues>\n            -7.3796175420284271e-02 1.7231710255146027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -1.9738268107175827e-02</internalNodes>\n          <leafValues>\n            2.4731338024139404e-01 -5.3791344165802002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 6.9891922175884247e-03</internalNodes>\n          <leafValues>\n            -6.1806734651327133e-02 2.1923109889030457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 -2.6465239934623241e-03</internalNodes>\n          <leafValues>\n            2.8577965497970581e-01 -6.6506840288639069e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 3.3399839885532856e-03</internalNodes>\n          <leafValues>\n            3.4735739231109619e-02 -3.9448723196983337e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          0 0 6 1 -1.</_>\n        <_>\n          3 0 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 2 -1.</_>\n        <_>\n          3 0 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 1 -1.</_>\n        <_>\n          4 0 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 4 -1.</_>\n        <_>\n          0 0 4 2 2.</_>\n        <_>\n          4 2 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 6 -1.</_>\n        <_>\n          0 0 4 3 2.</_>\n        <_>\n          4 3 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 12 -1.</_>\n        <_>\n          0 0 4 6 2.</_>\n        <_>\n          4 6 4 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 16 -1.</_>\n        <_>\n          0 0 4 8 2.</_>\n        <_>\n          4 8 4 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 3 -1.</_>\n        <_>\n          5 0 5 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 0 5 3 2.</_>\n        <_>\n          5 3 5 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 10 -1.</_>\n        <_>\n          0 0 5 5 2.</_>\n        <_>\n          5 5 5 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 14 -1.</_>\n        <_>\n          6 0 6 14 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 10 -1.</_>\n        <_>\n          0 0 7 5 2.</_>\n        <_>\n          7 5 7 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 1 -1.</_>\n        <_>\n          8 0 8 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 8 -1.</_>\n        <_>\n          0 0 8 4 2.</_>\n        <_>\n          8 4 8 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 10 -1.</_>\n        <_>\n          0 0 8 5 2.</_>\n        <_>\n          8 5 8 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 1 -1.</_>\n        <_>\n          12 0 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 2 -1.</_>\n        <_>\n          8 1 8 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 8 -1.</_>\n        <_>\n          0 1 8 4 2.</_>\n        <_>\n          8 5 8 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 18 -1.</_>\n        <_>\n          0 7 16 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 2 -1.</_>\n        <_>\n          0 2 12 1 2.</_>\n        <_>\n          12 3 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 19 -1.</_>\n        <_>\n          12 2 12 19 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 8 3 -1.</_>\n        <_>\n          0 4 8 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 2 -1.</_>\n        <_>\n          0 3 12 1 2.</_>\n        <_>\n          12 4 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 9 -1.</_>\n        <_>\n          0 7 6 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 24 2 -1.</_>\n        <_>\n          0 4 12 1 2.</_>\n        <_>\n          12 5 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 13 15 -1.</_>\n        <_>\n          0 9 13 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 14 3 -1.</_>\n        <_>\n          0 5 14 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 23 6 -1.</_>\n        <_>\n          0 6 23 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 5 9 9 -1.</_>\n        <_>\n          0 8 9 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 5 24 2 -1.</_>\n        <_>\n          0 5 12 1 2.</_>\n        <_>\n          12 6 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 2 -1.</_>\n        <_>\n          0 6 12 1 2.</_>\n        <_>\n          12 7 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 8 -1.</_>\n        <_>\n          0 10 18 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 3 -1.</_>\n        <_>\n          0 7 24 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 2 -1.</_>\n        <_>\n          0 7 4 1 2.</_>\n        <_>\n          4 8 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 9 6 -1.</_>\n        <_>\n          0 9 9 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 22 4 -1.</_>\n        <_>\n          0 7 11 2 2.</_>\n        <_>\n          11 9 11 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 2 -1.</_>\n        <_>\n          0 7 12 1 2.</_>\n        <_>\n          12 8 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 4 -1.</_>\n        <_>\n          0 7 12 2 2.</_>\n        <_>\n          12 9 12 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 6 -1.</_>\n        <_>\n          0 9 20 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 14 -1.</_>\n        <_>\n          3 8 3 14 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 2 -1.</_>\n        <_>\n          0 8 4 1 2.</_>\n        <_>\n          4 9 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 24 1 -1.</_>\n        <_>\n          8 8 8 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 24 2 -1.</_>\n        <_>\n          0 8 12 1 2.</_>\n        <_>\n          12 9 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 24 4 -1.</_>\n        <_>\n          0 8 12 2 2.</_>\n        <_>\n          12 10 12 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 24 9 -1.</_>\n        <_>\n          12 8 12 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 1 -1.</_>\n        <_>\n          2 9 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 12 -1.</_>\n        <_>\n          0 9 3 6 2.</_>\n        <_>\n          3 15 3 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 9 -1.</_>\n        <_>\n          0 12 4 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 7 2 -1.</_>\n        <_>\n          0 10 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 11 2 -1.</_>\n        <_>\n          0 10 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 22 2 -1.</_>\n        <_>\n          0 9 11 1 2.</_>\n        <_>\n          11 10 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 24 2 -1.</_>\n        <_>\n          0 9 12 1 2.</_>\n        <_>\n          12 10 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 24 4 -1.</_>\n        <_>\n          0 9 12 2 2.</_>\n        <_>\n          12 11 12 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 24 6 -1.</_>\n        <_>\n          0 9 12 3 2.</_>\n        <_>\n          12 12 12 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 15 3 -1.</_>\n        <_>\n          0 10 15 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 2 2 -1.</_>\n        <_>\n          0 11 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 3 3 -1.</_>\n        <_>\n          0 11 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 3 6 -1.</_>\n        <_>\n          0 12 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 8 -1.</_>\n        <_>\n          0 10 3 4 2.</_>\n        <_>\n          3 14 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 8 10 -1.</_>\n        <_>\n          0 10 4 5 2.</_>\n        <_>\n          4 15 4 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 8 11 -1.</_>\n        <_>\n          4 10 4 11 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 24 2 -1.</_>\n        <_>\n          0 10 12 1 2.</_>\n        <_>\n          12 11 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 2 -1.</_>\n        <_>\n          3 11 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 8 -1.</_>\n        <_>\n          0 11 3 4 2.</_>\n        <_>\n          3 15 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 8 -1.</_>\n        <_>\n          0 11 4 4 2.</_>\n        <_>\n          4 15 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 13 -1.</_>\n        <_>\n          4 11 4 13 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 24 2 -1.</_>\n        <_>\n          0 11 12 1 2.</_>\n        <_>\n          12 12 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 21 10 -1.</_>\n        <_>\n          0 16 21 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 4 -1.</_>\n        <_>\n          4 12 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 12 24 9 -1.</_>\n        <_>\n          12 12 12 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 13 24 4 -1.</_>\n        <_>\n          0 13 12 2 2.</_>\n        <_>\n          12 15 12 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 14 3 7 -1.</_>\n        <_>\n          1 14 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 14 10 8 -1.</_>\n        <_>\n          5 14 5 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 15 8 8 -1.</_>\n        <_>\n          0 15 4 4 2.</_>\n        <_>\n          4 19 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 15 12 8 -1.</_>\n        <_>\n          0 15 6 4 2.</_>\n        <_>\n          6 19 6 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 16 3 8 -1.</_>\n        <_>\n          1 16 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 16 8 6 -1.</_>\n        <_>\n          0 18 8 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 3 -1.</_>\n        <_>\n          3 17 3 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 17 4 6 -1.</_>\n        <_>\n          0 19 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 3 6 -1.</_>\n        <_>\n          1 18 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 19 3 4 -1.</_>\n        <_>\n          1 19 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 19 9 3 -1.</_>\n        <_>\n          0 20 9 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 20 4 3 -1.</_>\n        <_>\n          0 21 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 20 6 3 -1.</_>\n        <_>\n          0 21 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 21 3 3 -1.</_>\n        <_>\n          0 22 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 22 1 2 -1.</_>\n        <_>\n          0 23 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 10 1 -1.</_>\n        <_>\n          6 0 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 6 -1.</_>\n        <_>\n          1 0 6 3 2.</_>\n        <_>\n          7 3 6 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 7 9 -1.</_>\n        <_>\n          1 3 7 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 14 10 -1.</_>\n        <_>\n          1 0 7 5 2.</_>\n        <_>\n          8 5 7 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 22 2 -1.</_>\n        <_>\n          1 0 11 1 2.</_>\n        <_>\n          12 1 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 10 -1.</_>\n        <_>\n          1 2 3 5 2.</_>\n        <_>\n          4 7 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 20 -1.</_>\n        <_>\n          12 2 11 20 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 21 -1.</_>\n        <_>\n          12 2 11 21 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 3 15 3 -1.</_>\n        <_>\n          6 3 5 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 3 -1.</_>\n        <_>\n          1 4 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 3 22 2 -1.</_>\n        <_>\n          1 3 11 1 2.</_>\n        <_>\n          12 4 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 4 3 -1.</_>\n        <_>\n          1 5 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 17 -1.</_>\n        <_>\n          5 4 4 17 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 20 20 -1.</_>\n        <_>\n          11 4 10 20 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 22 2 -1.</_>\n        <_>\n          1 4 11 1 2.</_>\n        <_>\n          12 5 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 22 19 -1.</_>\n        <_>\n          12 4 11 19 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 5 22 2 -1.</_>\n        <_>\n          1 5 11 1 2.</_>\n        <_>\n          12 6 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 2 -1.</_>\n        <_>\n          1 6 1 1 2.</_>\n        <_>\n          2 7 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 16 17 -1.</_>\n        <_>\n          9 6 8 17 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 21 9 -1.</_>\n        <_>\n          1 9 21 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 22 6 -1.</_>\n        <_>\n          1 8 22 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 23 9 -1.</_>\n        <_>\n          1 9 23 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 7 22 6 -1.</_>\n        <_>\n          1 7 11 3 2.</_>\n        <_>\n          12 10 11 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 8 19 12 -1.</_>\n        <_>\n          1 12 19 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 2 -1.</_>\n        <_>\n          4 9 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 9 12 3 -1.</_>\n        <_>\n          5 9 4 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 10 3 8 -1.</_>\n        <_>\n          2 10 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 10 20 2 -1.</_>\n        <_>\n          1 10 10 1 2.</_>\n        <_>\n          11 11 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 10 12 3 -1.</_>\n        <_>\n          1 11 12 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 11 3 8 -1.</_>\n        <_>\n          2 11 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 2 -1.</_>\n        <_>\n          1 11 10 1 2.</_>\n        <_>\n          11 12 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 11 22 4 -1.</_>\n        <_>\n          1 11 11 2 2.</_>\n        <_>\n          12 13 11 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 12 3 11 -1.</_>\n        <_>\n          2 12 1 11 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 12 6 1 -1.</_>\n        <_>\n          4 12 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 12 20 12 -1.</_>\n        <_>\n          11 12 10 12 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 13 3 5 -1.</_>\n        <_>\n          2 13 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 13 22 2 -1.</_>\n        <_>\n          1 13 11 1 2.</_>\n        <_>\n          12 14 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 14 4 4 -1.</_>\n        <_>\n          3 14 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 14 22 2 -1.</_>\n        <_>\n          1 14 11 1 2.</_>\n        <_>\n          12 15 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 14 23 6 -1.</_>\n        <_>\n          1 17 23 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 15 14 2 -1.</_>\n        <_>\n          1 15 7 1 2.</_>\n        <_>\n          8 16 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 17 3 5 -1.</_>\n        <_>\n          2 17 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 17 3 7 -1.</_>\n        <_>\n          2 17 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 18 10 6 -1.</_>\n        <_>\n          1 18 5 3 2.</_>\n        <_>\n          6 21 5 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 18 9 3 -1.</_>\n        <_>\n          1 19 9 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 21 12 3 -1.</_>\n        <_>\n          7 21 6 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 2 -1.</_>\n        <_>\n          3 0 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 1 -1.</_>\n        <_>\n          5 0 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 2 -1.</_>\n        <_>\n          5 0 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 21 1 -1.</_>\n        <_>\n          9 0 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 1 3 23 -1.</_>\n        <_>\n          3 1 1 23 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 2 -1.</_>\n        <_>\n          4 1 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 2 22 10 -1.</_>\n        <_>\n          2 2 11 5 2.</_>\n        <_>\n          13 7 11 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 3 22 2 -1.</_>\n        <_>\n          2 3 11 1 2.</_>\n        <_>\n          13 4 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 1 -1.</_>\n        <_>\n          5 4 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 3 3 -1.</_>\n        <_>\n          2 5 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 20 2 -1.</_>\n        <_>\n          2 4 10 1 2.</_>\n        <_>\n          12 5 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 22 16 -1.</_>\n        <_>\n          13 4 11 16 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 18 6 -1.</_>\n        <_>\n          2 6 18 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 3 3 -1.</_>\n        <_>\n          2 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 4 3 -1.</_>\n        <_>\n          2 7 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 20 2 -1.</_>\n        <_>\n          2 6 10 1 2.</_>\n        <_>\n          12 7 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 22 2 -1.</_>\n        <_>\n          2 6 11 1 2.</_>\n        <_>\n          13 7 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 7 21 6 -1.</_>\n        <_>\n          2 9 21 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 7 22 2 -1.</_>\n        <_>\n          2 8 22 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 2 -1.</_>\n        <_>\n          2 8 3 1 2.</_>\n        <_>\n          5 9 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 3 -1.</_>\n        <_>\n          2 9 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 21 2 -1.</_>\n        <_>\n          9 8 7 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 7 9 -1.</_>\n        <_>\n          2 11 7 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 22 4 -1.</_>\n        <_>\n          2 8 11 2 2.</_>\n        <_>\n          13 10 11 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 4 1 -1.</_>\n        <_>\n          4 9 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 9 1 -1.</_>\n        <_>\n          5 9 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 9 2 -1.</_>\n        <_>\n          5 9 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 6 4 -1.</_>\n        <_>\n          2 9 3 2 2.</_>\n        <_>\n          5 11 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 7 3 -1.</_>\n        <_>\n          2 10 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 2 -1.</_>\n        <_>\n          2 9 9 1 2.</_>\n        <_>\n          11 10 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 22 2 -1.</_>\n        <_>\n          2 9 11 1 2.</_>\n        <_>\n          13 10 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 21 3 -1.</_>\n        <_>\n          2 10 21 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 10 22 2 -1.</_>\n        <_>\n          2 10 11 1 2.</_>\n        <_>\n          13 11 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 11 3 6 -1.</_>\n        <_>\n          3 11 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 11 3 13 -1.</_>\n        <_>\n          3 11 1 13 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 11 22 2 -1.</_>\n        <_>\n          2 11 11 1 2.</_>\n        <_>\n          13 12 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 12 3 4 -1.</_>\n        <_>\n          3 12 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 12 3 5 -1.</_>\n        <_>\n          3 12 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 12 22 2 -1.</_>\n        <_>\n          2 12 11 1 2.</_>\n        <_>\n          13 13 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 13 10 10 -1.</_>\n        <_>\n          2 13 5 5 2.</_>\n        <_>\n          7 18 5 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 14 6 10 -1.</_>\n        <_>\n          2 14 3 5 2.</_>\n        <_>\n          5 19 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 15 2 6 -1.</_>\n        <_>\n          2 15 1 3 2.</_>\n        <_>\n          3 18 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 15 3 9 -1.</_>\n        <_>\n          3 15 1 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 15 6 4 -1.</_>\n        <_>\n          5 15 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 15 7 3 -1.</_>\n        <_>\n          2 16 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 17 3 4 -1.</_>\n        <_>\n          3 17 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 17 12 6 -1.</_>\n        <_>\n          2 17 6 3 2.</_>\n        <_>\n          8 20 6 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 21 14 3 -1.</_>\n        <_>\n          9 21 7 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 4 -1.</_>\n        <_>\n          3 0 6 2 2.</_>\n        <_>\n          9 2 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 2 -1.</_>\n        <_>\n          3 1 9 1 2.</_>\n        <_>\n          12 2 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 2 17 6 -1.</_>\n        <_>\n          3 5 17 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 3 3 3 -1.</_>\n        <_>\n          4 3 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 3 18 2 -1.</_>\n        <_>\n          3 3 9 1 2.</_>\n        <_>\n          12 4 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 1 3 -1.</_>\n        <_>\n          3 5 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 2 2 -1.</_>\n        <_>\n          3 4 1 1 2.</_>\n        <_>\n          4 5 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 3 3 -1.</_>\n        <_>\n          3 5 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 18 2 -1.</_>\n        <_>\n          3 4 9 1 2.</_>\n        <_>\n          12 5 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 18 4 -1.</_>\n        <_>\n          3 4 9 2 2.</_>\n        <_>\n          12 6 9 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 20 6 -1.</_>\n        <_>\n          3 6 20 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 2 1 -1.</_>\n        <_>\n          4 5 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 1 3 -1.</_>\n        <_>\n          3 6 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 2 2 -1.</_>\n        <_>\n          3 6 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 2 3 -1.</_>\n        <_>\n          3 6 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 20 2 -1.</_>\n        <_>\n          3 5 10 1 2.</_>\n        <_>\n          13 6 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 17 6 -1.</_>\n        <_>\n          3 7 17 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 17 9 -1.</_>\n        <_>\n          3 8 17 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 19 9 -1.</_>\n        <_>\n          3 8 19 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 2 -1.</_>\n        <_>\n          3 6 1 1 2.</_>\n        <_>\n          4 7 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 3 -1.</_>\n        <_>\n          3 7 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 9 6 -1.</_>\n        <_>\n          6 6 3 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 5 6 -1.</_>\n        <_>\n          3 8 5 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 2 -1.</_>\n        <_>\n          3 6 9 1 2.</_>\n        <_>\n          12 7 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 20 8 -1.</_>\n        <_>\n          3 6 10 4 2.</_>\n        <_>\n          13 10 10 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 3 -1.</_>\n        <_>\n          3 7 18 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 10 -1.</_>\n        <_>\n          3 7 3 5 2.</_>\n        <_>\n          6 12 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 5 2 -1.</_>\n        <_>\n          3 8 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 3 -1.</_>\n        <_>\n          3 8 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 4 -1.</_>\n        <_>\n          3 7 9 2 2.</_>\n        <_>\n          12 9 9 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 17 3 -1.</_>\n        <_>\n          3 8 17 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 2 -1.</_>\n        <_>\n          3 8 18 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 8 2 3 -1.</_>\n        <_>\n          4 8 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 8 18 3 -1.</_>\n        <_>\n          3 9 18 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 8 20 3 -1.</_>\n        <_>\n          3 9 20 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 3 1 -1.</_>\n        <_>\n          4 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 3 2 -1.</_>\n        <_>\n          4 9 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 4 6 -1.</_>\n        <_>\n          3 9 2 3 2.</_>\n        <_>\n          5 12 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 4 -1.</_>\n        <_>\n          3 11 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 8 9 -1.</_>\n        <_>\n          3 12 8 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 20 2 -1.</_>\n        <_>\n          3 9 10 1 2.</_>\n        <_>\n          13 10 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 19 3 -1.</_>\n        <_>\n          3 10 19 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 2 -1.</_>\n        <_>\n          3 10 2 1 2.</_>\n        <_>\n          5 11 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 18 6 -1.</_>\n        <_>\n          3 12 18 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 4 -1.</_>\n        <_>\n          4 11 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 5 -1.</_>\n        <_>\n          4 11 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 4 10 -1.</_>\n        <_>\n          3 16 4 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 7 8 -1.</_>\n        <_>\n          3 15 7 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 2 -1.</_>\n        <_>\n          4 12 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 10 -1.</_>\n        <_>\n          4 12 1 10 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 6 -1.</_>\n        <_>\n          3 15 3 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 12 4 8 -1.</_>\n        <_>\n          3 16 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 12 10 8 -1.</_>\n        <_>\n          3 12 5 4 2.</_>\n        <_>\n          8 16 5 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 12 18 2 -1.</_>\n        <_>\n          3 12 9 1 2.</_>\n        <_>\n          12 13 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 19 6 -1.</_>\n        <_>\n          3 16 19 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 14 4 9 -1.</_>\n        <_>\n          3 17 4 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 16 3 4 -1.</_>\n        <_>\n          4 16 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 16 4 3 -1.</_>\n        <_>\n          5 16 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 16 21 7 -1.</_>\n        <_>\n          10 16 7 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 18 3 6 -1.</_>\n        <_>\n          4 18 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 23 -1.</_>\n        <_>\n          5 0 1 23 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 5 -1.</_>\n        <_>\n          6 0 2 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 17 12 -1.</_>\n        <_>\n          4 4 17 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 12 -1.</_>\n        <_>\n          4 7 16 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 1 -1.</_>\n        <_>\n          5 3 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 10 -1.</_>\n        <_>\n          4 3 8 5 2.</_>\n        <_>\n          12 8 8 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 3 14 6 -1.</_>\n        <_>\n          4 6 14 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 1 3 -1.</_>\n        <_>\n          4 5 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 2 4 -1.</_>\n        <_>\n          4 6 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 2 -1.</_>\n        <_>\n          7 4 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 6 -1.</_>\n        <_>\n          4 7 13 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 4 -1.</_>\n        <_>\n          6 5 2 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 14 6 -1.</_>\n        <_>\n          4 7 14 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 6 -1.</_>\n        <_>\n          4 8 16 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 1 3 -1.</_>\n        <_>\n          4 7 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 3 -1.</_>\n        <_>\n          4 7 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 3 -1.</_>\n        <_>\n          4 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 2 -1.</_>\n        <_>\n          4 6 8 1 2.</_>\n        <_>\n          12 7 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 6 -1.</_>\n        <_>\n          4 6 8 3 2.</_>\n        <_>\n          12 9 8 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 8 -1.</_>\n        <_>\n          4 10 10 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 3 -1.</_>\n        <_>\n          4 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 5 6 -1.</_>\n        <_>\n          4 9 5 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 16 4 -1.</_>\n        <_>\n          4 7 8 2 2.</_>\n        <_>\n          12 9 8 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 18 2 -1.</_>\n        <_>\n          4 7 9 1 2.</_>\n        <_>\n          13 8 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 16 6 -1.</_>\n        <_>\n          4 9 16 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 17 6 -1.</_>\n        <_>\n          4 9 17 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 2 -1.</_>\n        <_>\n          4 8 1 1 2.</_>\n        <_>\n          5 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 2 -1.</_>\n        <_>\n          4 8 8 1 2.</_>\n        <_>\n          12 9 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 4 -1.</_>\n        <_>\n          4 8 8 2 2.</_>\n        <_>\n          12 10 8 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 15 6 -1.</_>\n        <_>\n          4 10 15 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 1 -1.</_>\n        <_>\n          5 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 1 -1.</_>\n        <_>\n          5 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 2 -1.</_>\n        <_>\n          5 9 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 4 -1.</_>\n        <_>\n          4 9 1 2 2.</_>\n        <_>\n          5 11 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 1 -1.</_>\n        <_>\n          6 9 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 6 -1.</_>\n        <_>\n          4 11 2 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 8 6 -1.</_>\n        <_>\n          4 9 4 3 2.</_>\n        <_>\n          8 12 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 5 3 -1.</_>\n        <_>\n          4 10 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 15 2 -1.</_>\n        <_>\n          9 9 5 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 15 4 -1.</_>\n        <_>\n          9 9 5 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 16 2 -1.</_>\n        <_>\n          4 9 8 1 2.</_>\n        <_>\n          12 10 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 18 2 -1.</_>\n        <_>\n          4 9 9 1 2.</_>\n        <_>\n          13 10 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 15 15 -1.</_>\n        <_>\n          4 14 15 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 17 9 -1.</_>\n        <_>\n          4 12 17 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 20 6 -1.</_>\n        <_>\n          4 11 20 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 1 -1.</_>\n        <_>\n          5 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 3 1 -1.</_>\n        <_>\n          5 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 2 -1.</_>\n        <_>\n          4 10 1 1 2.</_>\n        <_>\n          5 11 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 3 5 -1.</_>\n        <_>\n          5 10 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 16 10 -1.</_>\n        <_>\n          4 10 8 5 2.</_>\n        <_>\n          12 15 8 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 2 -1.</_>\n        <_>\n          5 11 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 3 -1.</_>\n        <_>\n          5 11 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 5 -1.</_>\n        <_>\n          5 11 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 10 -1.</_>\n        <_>\n          4 16 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 16 2 -1.</_>\n        <_>\n          4 11 8 1 2.</_>\n        <_>\n          12 12 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 3 1 -1.</_>\n        <_>\n          5 12 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 3 2 -1.</_>\n        <_>\n          5 12 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 1 6 -1.</_>\n        <_>\n          4 15 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 4 4 -1.</_>\n        <_>\n          6 12 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 4 4 -1.</_>\n        <_>\n          4 14 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 18 8 -1.</_>\n        <_>\n          13 12 9 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 13 9 5 -1.</_>\n        <_>\n          7 13 3 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 14 4 2 -1.</_>\n        <_>\n          6 14 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 16 4 1 -1.</_>\n        <_>\n          6 16 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 16 9 2 -1.</_>\n        <_>\n          7 16 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 19 3 4 -1.</_>\n        <_>\n          5 19 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 22 12 2 -1.</_>\n        <_>\n          4 23 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 3 -1.</_>\n        <_>\n          6 2 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 12 -1.</_>\n        <_>\n          5 2 2 6 2.</_>\n        <_>\n          7 8 2 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 12 -1.</_>\n        <_>\n          7 2 2 12 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 2 -1.</_>\n        <_>\n          5 2 7 1 2.</_>\n        <_>\n          12 3 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 16 10 -1.</_>\n        <_>\n          5 7 16 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 2 -1.</_>\n        <_>\n          7 3 2 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 3 14 2 -1.</_>\n        <_>\n          5 3 7 1 2.</_>\n        <_>\n          12 4 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 5 3 -1.</_>\n        <_>\n          5 5 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 14 2 -1.</_>\n        <_>\n          5 4 7 1 2.</_>\n        <_>\n          12 5 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 16 18 -1.</_>\n        <_>\n          5 4 8 9 2.</_>\n        <_>\n          13 13 8 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 2 -1.</_>\n        <_>\n          5 5 1 1 2.</_>\n        <_>\n          6 6 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 2 -1.</_>\n        <_>\n          5 5 7 1 2.</_>\n        <_>\n          12 6 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 6 -1.</_>\n        <_>\n          5 7 14 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 2 -1.</_>\n        <_>\n          5 6 7 1 2.</_>\n        <_>\n          12 7 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 6 19 6 -1.</_>\n        <_>\n          5 8 19 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 1 3 -1.</_>\n        <_>\n          5 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 6 -1.</_>\n        <_>\n          7 7 2 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 2 -1.</_>\n        <_>\n          5 8 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 3 -1.</_>\n        <_>\n          5 8 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 6 -1.</_>\n        <_>\n          5 9 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 5 2 -1.</_>\n        <_>\n          5 8 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 14 10 -1.</_>\n        <_>\n          5 7 7 5 2.</_>\n        <_>\n          12 12 7 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 14 2 -1.</_>\n        <_>\n          5 8 14 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 4 -1.</_>\n        <_>\n          5 9 15 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 6 -1.</_>\n        <_>\n          5 9 15 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 16 2 -1.</_>\n        <_>\n          5 8 16 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 16 6 -1.</_>\n        <_>\n          5 9 16 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 1 3 -1.</_>\n        <_>\n          5 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 4 -1.</_>\n        <_>\n          5 8 1 2 2.</_>\n        <_>\n          6 10 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 2 -1.</_>\n        <_>\n          5 9 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 1 -1.</_>\n        <_>\n          6 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 1 3 -1.</_>\n        <_>\n          5 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 1 9 -1.</_>\n        <_>\n          5 12 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 8 1 -1.</_>\n        <_>\n          9 9 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 15 2 -1.</_>\n        <_>\n          10 9 5 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 14 2 -1.</_>\n        <_>\n          5 9 7 1 2.</_>\n        <_>\n          12 10 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 14 8 -1.</_>\n        <_>\n          5 9 7 4 2.</_>\n        <_>\n          12 13 7 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 16 2 -1.</_>\n        <_>\n          5 9 8 1 2.</_>\n        <_>\n          13 10 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 2 -1.</_>\n        <_>\n          5 10 1 1 2.</_>\n        <_>\n          6 11 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 15 1 -1.</_>\n        <_>\n          10 10 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 2 -1.</_>\n        <_>\n          6 11 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 14 2 -1.</_>\n        <_>\n          5 12 14 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 12 17 2 -1.</_>\n        <_>\n          5 13 17 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 13 4 6 -1.</_>\n        <_>\n          5 13 2 3 2.</_>\n        <_>\n          7 16 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 13 18 10 -1.</_>\n        <_>\n          14 13 9 10 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 9 3 -1.</_>\n        <_>\n          8 15 3 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 17 3 7 -1.</_>\n        <_>\n          6 17 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 21 3 3 -1.</_>\n        <_>\n          6 21 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 6 -1.</_>\n        <_>\n          6 3 3 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 2 -1.</_>\n        <_>\n          12 0 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 12 -1.</_>\n        <_>\n          6 6 14 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 7 -1.</_>\n        <_>\n          8 1 2 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 11 -1.</_>\n        <_>\n          8 1 2 11 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 12 -1.</_>\n        <_>\n          8 2 2 12 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 4 -1.</_>\n        <_>\n          6 4 12 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 2 2 -1.</_>\n        <_>\n          6 4 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 14 18 -1.</_>\n        <_>\n          6 3 7 9 2.</_>\n        <_>\n          13 12 7 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 1 2 -1.</_>\n        <_>\n          6 5 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 3 -1.</_>\n        <_>\n          7 4 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 1 -1.</_>\n        <_>\n          7 5 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 9 -1.</_>\n        <_>\n          6 8 2 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 2 -1.</_>\n        <_>\n          6 5 6 1 2.</_>\n        <_>\n          12 6 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 6 -1.</_>\n        <_>\n          6 7 12 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 2 -1.</_>\n        <_>\n          6 6 5 1 2.</_>\n        <_>\n          11 7 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          6 8 12 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 4 -1.</_>\n        <_>\n          6 8 14 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 1 3 -1.</_>\n        <_>\n          6 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 1 6 -1.</_>\n        <_>\n          6 9 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 3 -1.</_>\n        <_>\n          6 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 6 -1.</_>\n        <_>\n          6 9 2 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 6 -1.</_>\n        <_>\n          6 9 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 4 -1.</_>\n        <_>\n          7 8 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 3 -1.</_>\n        <_>\n          6 9 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 9 6 -1.</_>\n        <_>\n          9 8 3 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 3 -1.</_>\n        <_>\n          10 8 4 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 2 -1.</_>\n        <_>\n          6 8 6 1 2.</_>\n        <_>\n          12 9 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 12 -1.</_>\n        <_>\n          6 14 8 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 6 -1.</_>\n        <_>\n          6 11 2 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 3 3 -1.</_>\n        <_>\n          6 10 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 3 6 -1.</_>\n        <_>\n          6 12 3 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 6 -1.</_>\n        <_>\n          6 9 3 3 2.</_>\n        <_>\n          9 12 3 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 2 -1.</_>\n        <_>\n          10 9 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 3 -1.</_>\n        <_>\n          10 9 4 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 2 -1.</_>\n        <_>\n          6 9 6 1 2.</_>\n        <_>\n          12 10 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 14 2 -1.</_>\n        <_>\n          6 9 7 1 2.</_>\n        <_>\n          13 10 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 1 3 -1.</_>\n        <_>\n          6 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 3 -1.</_>\n        <_>\n          7 10 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 3 -1.</_>\n        <_>\n          6 11 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 3 -1.</_>\n        <_>\n          8 10 2 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 3 -1.</_>\n        <_>\n          6 11 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 12 2 -1.</_>\n        <_>\n          6 10 6 1 2.</_>\n        <_>\n          12 11 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 13 3 -1.</_>\n        <_>\n          6 11 13 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 2 -1.</_>\n        <_>\n          6 12 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 3 -1.</_>\n        <_>\n          6 12 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 2 -1.</_>\n        <_>\n          6 12 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 3 -1.</_>\n        <_>\n          6 12 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 11 4 3 -1.</_>\n        <_>\n          6 12 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 11 16 3 -1.</_>\n        <_>\n          6 12 16 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 14 1 3 -1.</_>\n        <_>\n          6 15 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 16 1 3 -1.</_>\n        <_>\n          6 17 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 17 3 6 -1.</_>\n        <_>\n          7 17 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 17 11 4 -1.</_>\n        <_>\n          6 19 11 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 18 12 2 -1.</_>\n        <_>\n          6 19 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 19 3 5 -1.</_>\n        <_>\n          7 19 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 20 14 4 -1.</_>\n        <_>\n          6 22 14 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 1 -1.</_>\n        <_>\n          12 0 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 7 2 -1.</_>\n        <_>\n          7 1 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 11 10 -1.</_>\n        <_>\n          7 5 11 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 1 -1.</_>\n        <_>\n          12 1 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 2 -1.</_>\n        <_>\n          7 1 5 1 2.</_>\n        <_>\n          12 2 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 2 -1.</_>\n        <_>\n          7 2 1 1 2.</_>\n        <_>\n          8 3 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 10 2 -1.</_>\n        <_>\n          7 2 5 1 2.</_>\n        <_>\n          12 3 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 10 2 -1.</_>\n        <_>\n          7 3 5 1 2.</_>\n        <_>\n          12 4 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 4 -1.</_>\n        <_>\n          8 4 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 4 -1.</_>\n        <_>\n          8 4 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 7 -1.</_>\n        <_>\n          8 4 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 8 -1.</_>\n        <_>\n          8 4 1 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 9 7 -1.</_>\n        <_>\n          10 4 3 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 10 2 -1.</_>\n        <_>\n          7 4 5 1 2.</_>\n        <_>\n          12 5 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 2 2 -1.</_>\n        <_>\n          8 5 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 2 -1.</_>\n        <_>\n          8 5 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 6 -1.</_>\n        <_>\n          8 5 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 7 -1.</_>\n        <_>\n          8 5 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 6 -1.</_>\n        <_>\n          7 7 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 10 2 -1.</_>\n        <_>\n          7 5 5 1 2.</_>\n        <_>\n          12 6 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 11 6 -1.</_>\n        <_>\n          7 7 11 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 2 -1.</_>\n        <_>\n          7 6 5 1 2.</_>\n        <_>\n          12 7 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 1 3 -1.</_>\n        <_>\n          7 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 1 6 -1.</_>\n        <_>\n          7 9 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 15 -1.</_>\n        <_>\n          7 12 12 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 1 3 -1.</_>\n        <_>\n          7 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 2 -1.</_>\n        <_>\n          7 8 1 1 2.</_>\n        <_>\n          8 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 16 -1.</_>\n        <_>\n          8 8 1 16 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 16 -1.</_>\n        <_>\n          9 8 2 16 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 1 2 -1.</_>\n        <_>\n          7 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 2 2 -1.</_>\n        <_>\n          7 9 1 1 2.</_>\n        <_>\n          8 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 2 3 -1.</_>\n        <_>\n          7 10 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 4 6 -1.</_>\n        <_>\n          7 9 2 3 2.</_>\n        <_>\n          9 12 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 10 -1.</_>\n        <_>\n          7 9 3 5 2.</_>\n        <_>\n          10 14 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 12 2 -1.</_>\n        <_>\n          11 9 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 2 -1.</_>\n        <_>\n          7 9 5 1 2.</_>\n        <_>\n          12 10 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 1 -1.</_>\n        <_>\n          8 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 1 3 -1.</_>\n        <_>\n          7 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 3 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 4 4 -1.</_>\n        <_>\n          7 10 2 2 2.</_>\n        <_>\n          9 12 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 4 4 -1.</_>\n        <_>\n          9 10 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 5 -1.</_>\n        <_>\n          9 10 2 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 9 7 -1.</_>\n        <_>\n          10 10 3 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 10 2 -1.</_>\n        <_>\n          7 10 5 1 2.</_>\n        <_>\n          12 11 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 1 -1.</_>\n        <_>\n          8 11 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 11 6 4 -1.</_>\n        <_>\n          9 11 2 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 13 12 3 -1.</_>\n        <_>\n          11 13 4 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 10 -1.</_>\n        <_>\n          7 18 13 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 3 -1.</_>\n        <_>\n          9 15 2 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 16 1 6 -1.</_>\n        <_>\n          7 19 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 16 9 2 -1.</_>\n        <_>\n          10 16 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 17 11 6 -1.</_>\n        <_>\n          7 20 11 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 18 5 6 -1.</_>\n        <_>\n          7 20 5 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 18 9 6 -1.</_>\n        <_>\n          7 21 9 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 18 10 6 -1.</_>\n        <_>\n          7 20 10 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 18 11 6 -1.</_>\n        <_>\n          7 21 11 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 20 3 4 -1.</_>\n        <_>\n          8 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 20 9 3 -1.</_>\n        <_>\n          7 21 9 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 1 -1.</_>\n        <_>\n          12 0 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 1 -1.</_>\n        <_>\n          13 0 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 2 -1.</_>\n        <_>\n          8 1 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 16 8 -1.</_>\n        <_>\n          8 0 8 4 2.</_>\n        <_>\n          16 4 8 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 16 10 -1.</_>\n        <_>\n          8 0 8 5 2.</_>\n        <_>\n          16 5 8 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 2 -1.</_>\n        <_>\n          8 1 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 10 -1.</_>\n        <_>\n          8 6 9 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 10 -1.</_>\n        <_>\n          10 3 2 10 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 1 -1.</_>\n        <_>\n          9 4 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 5 -1.</_>\n        <_>\n          9 4 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 2 7 -1.</_>\n        <_>\n          9 4 1 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 9 -1.</_>\n        <_>\n          9 4 1 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 2 -1.</_>\n        <_>\n          8 4 4 1 2.</_>\n        <_>\n          12 5 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 1 4 -1.</_>\n        <_>\n          8 7 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 2 -1.</_>\n        <_>\n          9 5 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 5 -1.</_>\n        <_>\n          9 5 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 6 -1.</_>\n        <_>\n          9 5 1 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 6 -1.</_>\n        <_>\n          9 5 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 7 -1.</_>\n        <_>\n          9 5 1 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 7 -1.</_>\n        <_>\n          9 5 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 3 -1.</_>\n        <_>\n          8 6 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 3 -1.</_>\n        <_>\n          8 6 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 2 -1.</_>\n        <_>\n          8 5 4 1 2.</_>\n        <_>\n          12 6 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 19 -1.</_>\n        <_>\n          12 5 4 19 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 5 -1.</_>\n        <_>\n          9 6 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 2 -1.</_>\n        <_>\n          8 6 4 1 2.</_>\n        <_>\n          12 7 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 10 2 -1.</_>\n        <_>\n          8 6 5 1 2.</_>\n        <_>\n          13 7 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 12 6 -1.</_>\n        <_>\n          12 7 4 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 16 1 -1.</_>\n        <_>\n          16 7 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 8 1 6 -1.</_>\n        <_>\n          8 10 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 9 2 4 -1.</_>\n        <_>\n          8 9 1 2 2.</_>\n        <_>\n          9 11 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 9 2 6 -1.</_>\n        <_>\n          8 9 1 3 2.</_>\n        <_>\n          9 12 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 9 8 2 -1.</_>\n        <_>\n          8 9 4 1 2.</_>\n        <_>\n          12 10 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 2 1 -1.</_>\n        <_>\n          9 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 1 -1.</_>\n        <_>\n          9 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 2 -1.</_>\n        <_>\n          9 10 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 2 8 -1.</_>\n        <_>\n          8 10 1 4 2.</_>\n        <_>\n          9 14 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 2 -1.</_>\n        <_>\n          10 10 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 8 -1.</_>\n        <_>\n          8 10 2 4 2.</_>\n        <_>\n          10 14 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 8 -1.</_>\n        <_>\n          8 11 2 4 2.</_>\n        <_>\n          10 15 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 14 1 3 -1.</_>\n        <_>\n          8 15 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 14 3 10 -1.</_>\n        <_>\n          9 14 1 10 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 16 9 3 -1.</_>\n        <_>\n          11 16 3 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 16 9 4 -1.</_>\n        <_>\n          11 16 3 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 17 10 6 -1.</_>\n        <_>\n          8 19 10 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 17 10 6 -1.</_>\n        <_>\n          8 20 10 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 18 9 6 -1.</_>\n        <_>\n          11 18 3 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 19 3 5 -1.</_>\n        <_>\n          9 19 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 19 7 3 -1.</_>\n        <_>\n          8 20 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 20 3 3 -1.</_>\n        <_>\n          9 20 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 20 3 4 -1.</_>\n        <_>\n          9 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 20 7 4 -1.</_>\n        <_>\n          8 22 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 20 12 4 -1.</_>\n        <_>\n          8 22 12 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 22 3 1 -1.</_>\n        <_>\n          9 22 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 22 3 2 -1.</_>\n        <_>\n          9 22 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 1 2 -1.</_>\n        <_>\n          9 1 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 5 10 -1.</_>\n        <_>\n          9 5 5 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 4 -1.</_>\n        <_>\n          9 2 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 8 -1.</_>\n        <_>\n          9 4 6 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 7 10 -1.</_>\n        <_>\n          9 5 7 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 14 10 -1.</_>\n        <_>\n          9 0 7 5 2.</_>\n        <_>\n          16 5 7 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 4 -1.</_>\n        <_>\n          9 2 8 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 2 3 -1.</_>\n        <_>\n          10 1 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 15 15 -1.</_>\n        <_>\n          9 6 15 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 2 -1.</_>\n        <_>\n          10 2 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 1 -1.</_>\n        <_>\n          12 2 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 22 -1.</_>\n        <_>\n          12 2 3 22 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 8 -1.</_>\n        <_>\n          9 6 6 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 4 9 -1.</_>\n        <_>\n          11 4 2 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 3 -1.</_>\n        <_>\n          9 5 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 6 -1.</_>\n        <_>\n          9 7 3 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 18 -1.</_>\n        <_>\n          12 4 3 18 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 12 2 -1.</_>\n        <_>\n          13 4 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          10 5 1 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 5 -1.</_>\n        <_>\n          11 5 2 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 15 -1.</_>\n        <_>\n          11 5 2 15 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 3 -1.</_>\n        <_>\n          9 6 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 3 -1.</_>\n        <_>\n          9 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 3 -1.</_>\n        <_>\n          9 7 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 2 -1.</_>\n        <_>\n          9 7 3 1 2.</_>\n        <_>\n          12 8 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 8 6 -1.</_>\n        <_>\n          13 7 4 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 8 9 9 -1.</_>\n        <_>\n          12 8 3 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 3 -1.</_>\n        <_>\n          9 9 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 9 5 3 -1.</_>\n        <_>\n          9 10 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 10 9 5 -1.</_>\n        <_>\n          12 10 3 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 10 15 3 -1.</_>\n        <_>\n          9 11 15 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 5 -1.</_>\n        <_>\n          10 11 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 1 -1.</_>\n        <_>\n          11 15 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 2 -1.</_>\n        <_>\n          11 15 2 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 15 9 9 -1.</_>\n        <_>\n          12 15 3 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 3 -1.</_>\n        <_>\n          11 16 2 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 4 -1.</_>\n        <_>\n          11 16 2 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 7 -1.</_>\n        <_>\n          11 16 2 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 4 -1.</_>\n        <_>\n          11 17 2 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 17 5 3 -1.</_>\n        <_>\n          9 18 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 18 8 6 -1.</_>\n        <_>\n          9 20 8 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 19 3 5 -1.</_>\n        <_>\n          10 19 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 19 6 3 -1.</_>\n        <_>\n          9 20 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 19 6 4 -1.</_>\n        <_>\n          9 21 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 19 8 3 -1.</_>\n        <_>\n          9 20 8 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 20 3 4 -1.</_>\n        <_>\n          10 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 20 5 3 -1.</_>\n        <_>\n          9 21 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 21 3 2 -1.</_>\n        <_>\n          10 21 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 21 3 3 -1.</_>\n        <_>\n          10 21 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 21 6 2 -1.</_>\n        <_>\n          9 22 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 22 3 2 -1.</_>\n        <_>\n          10 22 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 1 -1.</_>\n        <_>\n          12 0 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 2 -1.</_>\n        <_>\n          10 0 2 1 2.</_>\n        <_>\n          12 1 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 4 -1.</_>\n        <_>\n          10 0 2 2 2.</_>\n        <_>\n          12 2 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 6 -1.</_>\n        <_>\n          10 3 3 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 14 10 -1.</_>\n        <_>\n          10 0 7 5 2.</_>\n        <_>\n          17 5 7 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 2 9 -1.</_>\n        <_>\n          11 1 1 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 2 -1.</_>\n        <_>\n          10 1 2 1 2.</_>\n        <_>\n          12 2 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 2 9 -1.</_>\n        <_>\n          11 3 1 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 9 1 -1.</_>\n        <_>\n          13 3 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 2 -1.</_>\n        <_>\n          10 3 3 1 2.</_>\n        <_>\n          13 4 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 3 3 -1.</_>\n        <_>\n          10 5 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 7 15 -1.</_>\n        <_>\n          10 9 7 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 5 3 3 -1.</_>\n        <_>\n          10 6 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 7 3 -1.</_>\n        <_>\n          10 7 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 2 3 -1.</_>\n        <_>\n          10 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 14 -1.</_>\n        <_>\n          12 7 2 14 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 3 -1.</_>\n        <_>\n          10 8 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 3 -1.</_>\n        <_>\n          10 8 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 8 12 -1.</_>\n        <_>\n          10 13 8 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 10 8 -1.</_>\n        <_>\n          10 9 5 4 2.</_>\n        <_>\n          15 13 5 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 8 -1.</_>\n        <_>\n          10 13 6 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 2 6 -1.</_>\n        <_>\n          11 10 1 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 2 3 -1.</_>\n        <_>\n          10 11 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 14 4 -1.</_>\n        <_>\n          10 12 14 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 11 2 3 -1.</_>\n        <_>\n          10 12 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 12 1 3 -1.</_>\n        <_>\n          10 13 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 15 8 3 -1.</_>\n        <_>\n          14 15 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 16 3 2 -1.</_>\n        <_>\n          11 16 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 17 4 3 -1.</_>\n        <_>\n          10 18 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 18 12 2 -1.</_>\n        <_>\n          10 18 6 1 2.</_>\n        <_>\n          16 19 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 3 2 -1.</_>\n        <_>\n          11 20 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 3 3 -1.</_>\n        <_>\n          11 20 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 3 4 -1.</_>\n        <_>\n          11 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 4 3 -1.</_>\n        <_>\n          10 21 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 4 4 -1.</_>\n        <_>\n          10 22 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 5 3 -1.</_>\n        <_>\n          10 21 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 5 4 -1.</_>\n        <_>\n          10 22 5 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 10 4 -1.</_>\n        <_>\n          10 20 5 2 2.</_>\n        <_>\n          15 22 5 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 14 4 -1.</_>\n        <_>\n          10 20 7 2 2.</_>\n        <_>\n          17 22 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 21 3 3 -1.</_>\n        <_>\n          11 21 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 21 2 2 -1.</_>\n        <_>\n          10 22 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 21 14 2 -1.</_>\n        <_>\n          17 21 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 22 3 2 -1.</_>\n        <_>\n          11 22 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 7 -1.</_>\n        <_>\n          12 1 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 1 -1.</_>\n        <_>\n          13 1 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 15 -1.</_>\n        <_>\n          13 1 2 15 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 4 -1.</_>\n        <_>\n          12 2 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 12 -1.</_>\n        <_>\n          12 2 1 12 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 13 -1.</_>\n        <_>\n          12 2 1 13 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 1 3 -1.</_>\n        <_>\n          11 4 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 5 -1.</_>\n        <_>\n          12 3 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 7 -1.</_>\n        <_>\n          12 3 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 12 -1.</_>\n        <_>\n          13 3 2 12 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 4 13 -1.</_>\n        <_>\n          13 3 2 13 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 9 2 -1.</_>\n        <_>\n          14 3 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 5 -1.</_>\n        <_>\n          12 4 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 3 -1.</_>\n        <_>\n          11 5 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 3 -1.</_>\n        <_>\n          12 5 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 4 -1.</_>\n        <_>\n          12 5 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 10 -1.</_>\n        <_>\n          13 5 2 10 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 3 -1.</_>\n        <_>\n          11 6 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 1 3 -1.</_>\n        <_>\n          11 7 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 3 -1.</_>\n        <_>\n          11 7 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 5 -1.</_>\n        <_>\n          13 6 2 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 3 -1.</_>\n        <_>\n          11 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 9 11 -1.</_>\n        <_>\n          14 6 3 11 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 3 -1.</_>\n        <_>\n          11 7 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 5 3 -1.</_>\n        <_>\n          11 7 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 7 1 3 -1.</_>\n        <_>\n          11 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 7 2 3 -1.</_>\n        <_>\n          11 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 7 5 3 -1.</_>\n        <_>\n          11 8 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 1 3 -1.</_>\n        <_>\n          11 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 2 3 -1.</_>\n        <_>\n          11 9 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 3 -1.</_>\n        <_>\n          11 9 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 9 2 2 -1.</_>\n        <_>\n          11 9 1 1 2.</_>\n        <_>\n          12 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 9 3 3 -1.</_>\n        <_>\n          11 10 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 3 -1.</_>\n        <_>\n          11 10 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 10 1 3 -1.</_>\n        <_>\n          11 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 4 -1.</_>\n        <_>\n          13 10 2 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 2 -1.</_>\n        <_>\n          11 10 4 1 2.</_>\n        <_>\n          15 11 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 11 1 3 -1.</_>\n        <_>\n          11 12 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 12 6 3 -1.</_>\n        <_>\n          13 12 2 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 14 9 3 -1.</_>\n        <_>\n          14 14 3 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 16 3 3 -1.</_>\n        <_>\n          11 17 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 18 5 6 -1.</_>\n        <_>\n          11 20 5 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 18 12 6 -1.</_>\n        <_>\n          11 18 6 3 2.</_>\n        <_>\n          17 21 6 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 19 2 4 -1.</_>\n        <_>\n          11 21 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 19 12 4 -1.</_>\n        <_>\n          11 19 6 2 2.</_>\n        <_>\n          17 21 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 20 3 2 -1.</_>\n        <_>\n          12 20 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 20 3 3 -1.</_>\n        <_>\n          12 20 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 20 3 4 -1.</_>\n        <_>\n          12 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 21 3 1 -1.</_>\n        <_>\n          12 21 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 21 2 2 -1.</_>\n        <_>\n          11 21 1 1 2.</_>\n        <_>\n          12 22 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 21 3 2 -1.</_>\n        <_>\n          11 22 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 22 3 1 -1.</_>\n        <_>\n          12 22 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 23 3 1 -1.</_>\n        <_>\n          12 23 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 12 1 -1.</_>\n        <_>\n          18 0 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 12 10 -1.</_>\n        <_>\n          12 0 6 5 2.</_>\n        <_>\n          18 5 6 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 12 12 -1.</_>\n        <_>\n          12 0 6 6 2.</_>\n        <_>\n          18 6 6 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 2 12 -1.</_>\n        <_>\n          13 1 1 12 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 7 -1.</_>\n        <_>\n          14 1 2 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 15 -1.</_>\n        <_>\n          14 1 2 15 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 9 13 -1.</_>\n        <_>\n          15 1 3 13 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 2 9 4 -1.</_>\n        <_>\n          15 2 3 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 6 1 -1.</_>\n        <_>\n          14 3 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 6 9 -1.</_>\n        <_>\n          14 3 2 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 6 3 -1.</_>\n        <_>\n          12 4 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 2 6 -1.</_>\n        <_>\n          13 4 1 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 8 6 -1.</_>\n        <_>\n          12 4 4 3 2.</_>\n        <_>\n          16 7 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 3 -1.</_>\n        <_>\n          12 6 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 1 3 -1.</_>\n        <_>\n          12 7 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 1 3 -1.</_>\n        <_>\n          12 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 3 -1.</_>\n        <_>\n          12 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 3 -1.</_>\n        <_>\n          12 8 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 3 -1.</_>\n        <_>\n          12 8 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 3 -1.</_>\n        <_>\n          12 9 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 9 1 3 -1.</_>\n        <_>\n          12 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 9 2 3 -1.</_>\n        <_>\n          12 10 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 9 4 6 -1.</_>\n        <_>\n          12 9 2 3 2.</_>\n        <_>\n          14 12 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 9 6 7 -1.</_>\n        <_>\n          14 9 2 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 9 6 6 -1.</_>\n        <_>\n          12 9 3 3 2.</_>\n        <_>\n          15 12 3 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 10 6 2 -1.</_>\n        <_>\n          14 10 2 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 10 -1.</_>\n        <_>\n          12 10 2 5 2.</_>\n        <_>\n          14 15 2 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 11 4 8 -1.</_>\n        <_>\n          12 11 2 4 2.</_>\n        <_>\n          14 15 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 10 -1.</_>\n        <_>\n          12 11 3 5 2.</_>\n        <_>\n          15 16 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 8 -1.</_>\n        <_>\n          12 11 4 4 2.</_>\n        <_>\n          16 15 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 12 9 3 -1.</_>\n        <_>\n          15 12 3 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 12 10 8 -1.</_>\n        <_>\n          12 12 5 4 2.</_>\n        <_>\n          17 16 5 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 13 4 8 -1.</_>\n        <_>\n          12 13 2 4 2.</_>\n        <_>\n          14 17 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 14 3 7 -1.</_>\n        <_>\n          13 14 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 14 8 4 -1.</_>\n        <_>\n          12 14 4 2 2.</_>\n        <_>\n          16 16 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 16 4 3 -1.</_>\n        <_>\n          14 16 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 19 3 5 -1.</_>\n        <_>\n          13 19 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 20 3 4 -1.</_>\n        <_>\n          13 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 21 3 3 -1.</_>\n        <_>\n          13 21 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 22 3 2 -1.</_>\n        <_>\n          13 22 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 0 1 10 -1.</_>\n        <_>\n          13 5 1 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 1 2 12 -1.</_>\n        <_>\n          14 1 1 12 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 8 -1.</_>\n        <_>\n          15 1 2 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 3 -1.</_>\n        <_>\n          14 2 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 6 -1.</_>\n        <_>\n          13 2 1 3 2.</_>\n        <_>\n          14 5 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 3 1 4 -1.</_>\n        <_>\n          13 5 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 3 2 4 -1.</_>\n        <_>\n          13 3 1 2 2.</_>\n        <_>\n          14 5 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 3 6 8 -1.</_>\n        <_>\n          15 3 2 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 9 -1.</_>\n        <_>\n          15 4 2 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 5 3 5 -1.</_>\n        <_>\n          14 5 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 5 3 6 -1.</_>\n        <_>\n          14 5 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 3 -1.</_>\n        <_>\n          13 7 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 4 -1.</_>\n        <_>\n          14 7 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 8 2 3 -1.</_>\n        <_>\n          13 9 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 8 -1.</_>\n        <_>\n          13 8 3 4 2.</_>\n        <_>\n          16 12 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 9 9 2 -1.</_>\n        <_>\n          16 9 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 10 3 1 -1.</_>\n        <_>\n          14 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 10 3 2 -1.</_>\n        <_>\n          14 10 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 10 2 3 -1.</_>\n        <_>\n          13 11 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 10 4 8 -1.</_>\n        <_>\n          13 10 2 4 2.</_>\n        <_>\n          15 14 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 10 9 1 -1.</_>\n        <_>\n          16 10 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 3 -1.</_>\n        <_>\n          13 12 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 11 4 2 -1.</_>\n        <_>\n          13 11 2 1 2.</_>\n        <_>\n          15 12 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 15 6 1 -1.</_>\n        <_>\n          15 15 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 17 8 1 -1.</_>\n        <_>\n          17 17 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 19 3 5 -1.</_>\n        <_>\n          14 19 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 20 3 2 -1.</_>\n        <_>\n          14 20 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 21 3 3 -1.</_>\n        <_>\n          14 21 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 0 1 2 -1.</_>\n        <_>\n          14 1 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 6 -1.</_>\n        <_>\n          14 0 5 3 2.</_>\n        <_>\n          19 3 5 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 1 1 8 -1.</_>\n        <_>\n          14 5 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 2 3 8 -1.</_>\n        <_>\n          15 2 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 2 3 12 -1.</_>\n        <_>\n          15 2 1 12 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 2 7 3 -1.</_>\n        <_>\n          14 3 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 3 -1.</_>\n        <_>\n          14 4 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 1 4 -1.</_>\n        <_>\n          14 6 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 3 6 -1.</_>\n        <_>\n          15 4 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 3 7 -1.</_>\n        <_>\n          15 4 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 3 3 -1.</_>\n        <_>\n          14 5 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 7 3 -1.</_>\n        <_>\n          14 5 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 8 3 -1.</_>\n        <_>\n          14 5 8 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 10 6 -1.</_>\n        <_>\n          14 6 10 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 2 -1.</_>\n        <_>\n          15 5 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 3 -1.</_>\n        <_>\n          15 5 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 4 -1.</_>\n        <_>\n          15 5 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 2 6 -1.</_>\n        <_>\n          15 5 1 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 6 -1.</_>\n        <_>\n          15 5 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 5 6 -1.</_>\n        <_>\n          14 7 5 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 16 -1.</_>\n        <_>\n          16 7 2 16 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 8 2 6 -1.</_>\n        <_>\n          14 8 1 3 2.</_>\n        <_>\n          15 11 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 9 2 3 -1.</_>\n        <_>\n          15 9 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 9 2 8 -1.</_>\n        <_>\n          14 9 1 4 2.</_>\n        <_>\n          15 13 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 9 4 1 -1.</_>\n        <_>\n          16 9 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 9 9 2 -1.</_>\n        <_>\n          14 10 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 1 -1.</_>\n        <_>\n          15 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 3 1 -1.</_>\n        <_>\n          15 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 2 -1.</_>\n        <_>\n          15 10 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 3 2 -1.</_>\n        <_>\n          15 10 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 3 -1.</_>\n        <_>\n          15 10 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 6 -1.</_>\n        <_>\n          14 10 1 3 2.</_>\n        <_>\n          15 13 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 8 -1.</_>\n        <_>\n          14 10 1 4 2.</_>\n        <_>\n          15 14 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 13 3 8 -1.</_>\n        <_>\n          15 13 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 18 8 6 -1.</_>\n        <_>\n          14 18 4 3 2.</_>\n        <_>\n          18 21 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 22 3 2 -1.</_>\n        <_>\n          15 22 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 11 -1.</_>\n        <_>\n          16 0 1 11 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 4 -1.</_>\n        <_>\n          15 4 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 3 -1.</_>\n        <_>\n          15 4 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 4 2 9 -1.</_>\n        <_>\n          16 4 1 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 4 6 6 -1.</_>\n        <_>\n          15 6 6 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 5 2 2 -1.</_>\n        <_>\n          16 5 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 5 3 3 -1.</_>\n        <_>\n          16 5 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 6 3 1 -1.</_>\n        <_>\n          16 6 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 6 3 8 -1.</_>\n        <_>\n          15 10 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 7 4 6 -1.</_>\n        <_>\n          15 9 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 7 6 3 -1.</_>\n        <_>\n          15 8 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 7 6 6 -1.</_>\n        <_>\n          15 9 6 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 7 7 3 -1.</_>\n        <_>\n          15 8 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 7 9 6 -1.</_>\n        <_>\n          15 9 9 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 8 2 2 -1.</_>\n        <_>\n          15 8 1 1 2.</_>\n        <_>\n          16 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 9 1 10 -1.</_>\n        <_>\n          15 14 1 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 5 -1.</_>\n        <_>\n          16 9 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 9 6 4 -1.</_>\n        <_>\n          18 9 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 15 -1.</_>\n        <_>\n          15 14 3 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 9 6 3 -1.</_>\n        <_>\n          15 10 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 1 -1.</_>\n        <_>\n          16 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 10 3 1 -1.</_>\n        <_>\n          16 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 10 3 4 -1.</_>\n        <_>\n          16 10 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 10 3 3 -1.</_>\n        <_>\n          15 11 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 11 3 2 -1.</_>\n        <_>\n          15 12 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 11 3 12 -1.</_>\n        <_>\n          15 15 3 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 11 9 6 -1.</_>\n        <_>\n          15 13 9 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 14 2 10 -1.</_>\n        <_>\n          15 19 2 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 14 8 3 -1.</_>\n        <_>\n          19 14 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 14 5 3 -1.</_>\n        <_>\n          15 15 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 16 6 8 -1.</_>\n        <_>\n          15 16 3 4 2.</_>\n        <_>\n          18 20 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 17 7 3 -1.</_>\n        <_>\n          15 18 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 19 9 3 -1.</_>\n        <_>\n          15 20 9 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 1 -1.</_>\n        <_>\n          20 0 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 2 -1.</_>\n        <_>\n          20 0 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 6 -1.</_>\n        <_>\n          16 0 4 3 2.</_>\n        <_>\n          20 3 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          20 4 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 12 -1.</_>\n        <_>\n          16 0 4 6 2.</_>\n        <_>\n          20 6 4 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 3 2 4 -1.</_>\n        <_>\n          16 3 1 2 2.</_>\n        <_>\n          17 5 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 3 7 3 -1.</_>\n        <_>\n          16 4 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 4 2 9 -1.</_>\n        <_>\n          16 7 2 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 10 -1.</_>\n        <_>\n          16 5 2 5 2.</_>\n        <_>\n          18 10 2 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 5 8 6 -1.</_>\n        <_>\n          16 5 4 3 2.</_>\n        <_>\n          20 8 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 6 2 6 -1.</_>\n        <_>\n          16 8 2 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 6 3 9 -1.</_>\n        <_>\n          16 9 3 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 6 6 6 -1.</_>\n        <_>\n          16 8 6 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 1 3 -1.</_>\n        <_>\n          16 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 1 6 -1.</_>\n        <_>\n          16 9 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 3 16 -1.</_>\n        <_>\n          17 7 1 16 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 1 -1.</_>\n        <_>\n          18 7 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 8 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 3 -1.</_>\n        <_>\n          16 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 2 -1.</_>\n        <_>\n          18 7 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 6 -1.</_>\n        <_>\n          16 9 2 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 15 -1.</_>\n        <_>\n          16 12 2 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 6 -1.</_>\n        <_>\n          18 7 2 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 3 3 -1.</_>\n        <_>\n          16 8 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 3 6 -1.</_>\n        <_>\n          16 9 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 6 -1.</_>\n        <_>\n          16 9 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 1 2 -1.</_>\n        <_>\n          16 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 2 2 -1.</_>\n        <_>\n          16 8 1 1 2.</_>\n        <_>\n          17 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 2 5 -1.</_>\n        <_>\n          17 8 1 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 2 2 -1.</_>\n        <_>\n          16 9 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 6 2 -1.</_>\n        <_>\n          16 8 3 1 2.</_>\n        <_>\n          19 9 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 6 3 -1.</_>\n        <_>\n          16 9 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 9 1 3 -1.</_>\n        <_>\n          16 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 9 6 3 -1.</_>\n        <_>\n          16 10 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 1 3 -1.</_>\n        <_>\n          16 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 2 3 -1.</_>\n        <_>\n          16 11 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 6 2 -1.</_>\n        <_>\n          16 10 3 1 2.</_>\n        <_>\n          19 11 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 2 -1.</_>\n        <_>\n          16 11 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 6 4 -1.</_>\n        <_>\n          16 12 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 2 -1.</_>\n        <_>\n          17 11 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 11 2 2 -1.</_>\n        <_>\n          16 12 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 11 2 3 -1.</_>\n        <_>\n          16 12 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 3 -1.</_>\n        <_>\n          16 12 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 11 4 2 -1.</_>\n        <_>\n          16 12 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 11 8 6 -1.</_>\n        <_>\n          16 11 4 3 2.</_>\n        <_>\n          20 14 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 8 -1.</_>\n        <_>\n          16 12 2 4 2.</_>\n        <_>\n          18 16 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 13 2 2 -1.</_>\n        <_>\n          16 13 1 1 2.</_>\n        <_>\n          17 14 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 13 4 6 -1.</_>\n        <_>\n          16 13 2 3 2.</_>\n        <_>\n          18 16 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 13 8 8 -1.</_>\n        <_>\n          20 13 4 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 14 8 5 -1.</_>\n        <_>\n          20 14 4 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 15 4 4 -1.</_>\n        <_>\n          18 15 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 15 4 8 -1.</_>\n        <_>\n          16 15 2 4 2.</_>\n        <_>\n          18 19 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 15 3 3 -1.</_>\n        <_>\n          16 16 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 15 6 3 -1.</_>\n        <_>\n          19 15 3 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 16 3 3 -1.</_>\n        <_>\n          16 17 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 18 3 3 -1.</_>\n        <_>\n          17 18 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 18 3 6 -1.</_>\n        <_>\n          17 18 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 20 3 4 -1.</_>\n        <_>\n          17 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 22 3 1 -1.</_>\n        <_>\n          17 22 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 0 1 8 -1.</_>\n        <_>\n          17 4 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 0 6 1 -1.</_>\n        <_>\n          20 0 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 3 -1.</_>\n        <_>\n          18 2 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 1 -1.</_>\n        <_>\n          18 3 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 3 4 15 -1.</_>\n        <_>\n          17 8 4 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 4 2 6 -1.</_>\n        <_>\n          17 4 1 3 2.</_>\n        <_>\n          18 7 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 5 1 9 -1.</_>\n        <_>\n          17 8 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 3 -1.</_>\n        <_>\n          17 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 6 4 3 -1.</_>\n        <_>\n          17 7 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 1 3 -1.</_>\n        <_>\n          17 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 1 6 -1.</_>\n        <_>\n          17 9 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 2 2 -1.</_>\n        <_>\n          17 8 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 2 3 -1.</_>\n        <_>\n          17 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 2 6 -1.</_>\n        <_>\n          17 9 2 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 3 -1.</_>\n        <_>\n          17 8 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 1 3 -1.</_>\n        <_>\n          17 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 2 2 -1.</_>\n        <_>\n          17 8 1 1 2.</_>\n        <_>\n          18 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 1 4 -1.</_>\n        <_>\n          17 10 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 5 14 -1.</_>\n        <_>\n          17 15 5 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 9 3 1 -1.</_>\n        <_>\n          18 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 9 1 4 -1.</_>\n        <_>\n          17 11 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 9 4 6 -1.</_>\n        <_>\n          17 11 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 9 7 2 -1.</_>\n        <_>\n          17 10 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 1 3 -1.</_>\n        <_>\n          17 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 3 14 -1.</_>\n        <_>\n          18 10 1 14 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 4 1 -1.</_>\n        <_>\n          19 10 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 2 3 -1.</_>\n        <_>\n          17 11 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 4 2 -1.</_>\n        <_>\n          17 10 2 1 2.</_>\n        <_>\n          19 11 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 6 5 -1.</_>\n        <_>\n          20 10 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 2 -1.</_>\n        <_>\n          18 11 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 3 -1.</_>\n        <_>\n          18 11 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 11 -1.</_>\n        <_>\n          18 11 1 11 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 4 -1.</_>\n        <_>\n          17 13 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 12 3 1 -1.</_>\n        <_>\n          18 12 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 13 4 5 -1.</_>\n        <_>\n          19 13 2 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 15 4 1 -1.</_>\n        <_>\n          19 15 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 15 4 3 -1.</_>\n        <_>\n          19 15 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 16 4 1 -1.</_>\n        <_>\n          19 16 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 18 7 3 -1.</_>\n        <_>\n          17 19 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 20 3 4 -1.</_>\n        <_>\n          18 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 3 4 -1.</_>\n        <_>\n          19 0 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 12 -1.</_>\n        <_>\n          18 0 3 6 2.</_>\n        <_>\n          21 6 3 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 14 -1.</_>\n        <_>\n          18 0 3 7 2.</_>\n        <_>\n          21 7 3 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 3 3 3 -1.</_>\n        <_>\n          19 3 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 9 -1.</_>\n        <_>\n          18 6 2 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 2 -1.</_>\n        <_>\n          18 4 1 1 2.</_>\n        <_>\n          19 5 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 4 3 2 -1.</_>\n        <_>\n          19 4 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 3 -1.</_>\n        <_>\n          18 5 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 2 -1.</_>\n        <_>\n          18 5 1 1 2.</_>\n        <_>\n          19 6 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 3 -1.</_>\n        <_>\n          18 7 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 3 3 -1.</_>\n        <_>\n          18 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 5 3 -1.</_>\n        <_>\n          18 7 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 1 2 -1.</_>\n        <_>\n          18 8 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 3 1 -1.</_>\n        <_>\n          19 7 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 2 -1.</_>\n        <_>\n          19 7 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 3 2 -1.</_>\n        <_>\n          19 7 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 3 -1.</_>\n        <_>\n          18 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 3 3 -1.</_>\n        <_>\n          18 8 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 8 1 3 -1.</_>\n        <_>\n          18 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 8 2 3 -1.</_>\n        <_>\n          18 9 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 8 6 8 -1.</_>\n        <_>\n          21 8 3 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 9 3 1 -1.</_>\n        <_>\n          19 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 2 -1.</_>\n        <_>\n          18 9 1 1 2.</_>\n        <_>\n          19 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 9 3 2 -1.</_>\n        <_>\n          19 9 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 9 4 2 -1.</_>\n        <_>\n          20 9 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 9 3 9 -1.</_>\n        <_>\n          18 12 3 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 1 -1.</_>\n        <_>\n          19 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 2 -1.</_>\n        <_>\n          18 10 1 1 2.</_>\n        <_>\n          19 11 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 8 -1.</_>\n        <_>\n          18 14 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 10 6 4 -1.</_>\n        <_>\n          21 10 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 11 3 2 -1.</_>\n        <_>\n          19 11 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 11 3 12 -1.</_>\n        <_>\n          19 11 1 12 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 12 3 3 -1.</_>\n        <_>\n          19 12 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 12 6 1 -1.</_>\n        <_>\n          21 12 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 12 3 6 -1.</_>\n        <_>\n          18 15 3 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 15 1 3 -1.</_>\n        <_>\n          18 16 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 15 6 5 -1.</_>\n        <_>\n          21 15 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 16 4 2 -1.</_>\n        <_>\n          20 16 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 17 3 6 -1.</_>\n        <_>\n          19 17 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 18 3 5 -1.</_>\n        <_>\n          19 18 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 0 3 1 -1.</_>\n        <_>\n          20 0 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 4 2 4 -1.</_>\n        <_>\n          19 6 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 5 2 2 -1.</_>\n        <_>\n          19 5 1 1 2.</_>\n        <_>\n          20 6 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 6 1 3 -1.</_>\n        <_>\n          19 7 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 6 2 3 -1.</_>\n        <_>\n          19 7 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 9 2 1 -1.</_>\n        <_>\n          20 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 10 3 14 -1.</_>\n        <_>\n          20 10 1 14 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 10 4 1 -1.</_>\n        <_>\n          21 10 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 11 3 12 -1.</_>\n        <_>\n          20 11 1 12 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 12 3 10 -1.</_>\n        <_>\n          20 12 1 10 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 13 3 1 -1.</_>\n        <_>\n          20 13 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 17 3 7 -1.</_>\n        <_>\n          20 17 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 18 3 5 -1.</_>\n        <_>\n          20 18 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 18 3 6 -1.</_>\n        <_>\n          20 18 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 20 4 3 -1.</_>\n        <_>\n          19 21 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 1 4 4 -1.</_>\n        <_>\n          22 1 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 4 2 3 -1.</_>\n        <_>\n          20 5 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 5 2 2 -1.</_>\n        <_>\n          20 5 1 1 2.</_>\n        <_>\n          21 6 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 5 2 3 -1.</_>\n        <_>\n          20 6 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 11 4 3 -1.</_>\n        <_>\n          20 12 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 12 3 8 -1.</_>\n        <_>\n          21 12 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 12 3 11 -1.</_>\n        <_>\n          21 12 1 11 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 12 3 12 -1.</_>\n        <_>\n          21 12 1 12 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 18 3 1 -1.</_>\n        <_>\n          21 18 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 4 1 3 -1.</_>\n        <_>\n          21 5 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 9 3 3 -1.</_>\n        <_>\n          21 10 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 9 3 6 -1.</_>\n        <_>\n          21 11 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 10 2 4 -1.</_>\n        <_>\n          21 12 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 12 3 9 -1.</_>\n        <_>\n          22 12 1 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 13 3 11 -1.</_>\n        <_>\n          22 13 1 11 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 15 3 4 -1.</_>\n        <_>\n          22 15 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 15 3 9 -1.</_>\n        <_>\n          22 15 1 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 16 3 3 -1.</_>\n        <_>\n          22 16 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 16 3 8 -1.</_>\n        <_>\n          22 16 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 20 3 4 -1.</_>\n        <_>\n          22 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 22 3 2 -1.</_>\n        <_>\n          22 22 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 10 2 3 -1.</_>\n        <_>\n          22 11 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 12 2 12 -1.</_>\n        <_>\n          22 16 2 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 20 2 3 -1.</_>\n        <_>\n          22 21 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          23 10 1 3 -1.</_>\n        <_>\n          23 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          23 17 1 6 -1.</_>\n        <_>\n          23 19 1 2 3.</_></rects>\n      <tilted>0</tilted></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_frontalcatface_extended.xml",
    "content": "<?xml version=\"1.0\"?>\n<!----------------------------------------------------------------------------\n A frontal cat face detector using the full set of Haar features, i.e.\n horizontal, vertical, and diagonal features.\n\n Contributed by Joseph Howse (josephhowse@nummist.com).\n\n More information can be found in the following publications and\n presentations:\n\n Joseph Howse. OpenCV for Secret Agents (book). Packt Publishing, January\n   2015.\n Joseph Howse. \"Training Detectors and Recognizers in Python and OpenCV\"\n   (tutorial). ISMAR 2014. September 9, 2014.\n   http://nummist.com/opencv/Howse_ISMAR_20140909.pdf\n Joseph Howse. \"Training Intelligent Camera Systems with Python and OpenCV\"\n   (webcast). O’Reilly Media. June 17, 2014.\n   http://www.oreilly.com/pub/e/3077\n\n Build scripts and demo applications can be found in the following repository:\n https://bitbucket.org/Joe_Howse/angora-blue\n\n KNOWN LIMITATIONS:\n\n Sometimes, the detector mistakenly thinks that a human face is a cat face. In\n situations where either a human or a cat might be encountered, use both a\n human face detector and a cat face detector. Then, if a detected human face\n and a detected cat face intersect, reject the cat face.\n\n An upright subject is assumed. In situations where the cat's face might be\n sideways or upside down (e.g. the cat is rolling over), try various rotations\n of the input image.\n\n //////////////////////////////////////////////////////////////////////////\n | Contributors License Agreement\n | IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n |   By downloading, copying, installing or using the software you agree\n |   to this license.\n |   If you do not agree to this license, do not download, install,\n |   copy or use the software.\n |\n | Copyright (c) 2014, Joseph Howse (Nummist Media Corporation Limited,\n | Halifax, Nova Scotia, Canada). 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\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 |    * The name of Contributor may not used to endorse or promote products\n |      derived 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\n | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n | LIABILITY, 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.  Back to\n | Top\n //////////////////////////////////////////////////////////////////////////\n ---------------------------------------------------------------------------->\n<opencv_storage>\n<cascade>\n  <stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>24</height>\n  <width>24</width>\n  <stageParams>\n    <boostType>GAB</boostType>\n    <minHitRate>9.9900001287460327e-01</minHitRate>\n    <maxFalseAlarm>5.0000000000000000e-01</maxFalseAlarm>\n    <weightTrimRate>9.4999999999999996e-01</weightTrimRate>\n    <maxDepth>1</maxDepth>\n    <maxWeakCount>100</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount>\n    <featSize>1</featSize>\n    <mode>ALL</mode></featureParams>\n  <stageNum>15</stageNum>\n  <stages>\n    <!-- stage 0 -->\n    <_>\n      <maxWeakCount>28</maxWeakCount>\n      <stageThreshold>-2.0972909927368164e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 388 -1.4772760681807995e-02</internalNodes>\n          <leafValues>\n            8.4035199880599976e-01 -1.2701500952243805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 4.5831585302948952e-03</internalNodes>\n          <leafValues>\n            -2.3791725933551788e-01 6.1978793144226074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 -1.5044892206788063e-02</internalNodes>\n          <leafValues>\n            5.7160794734954834e-01 -2.0493283867835999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 -1.5646889805793762e-02</internalNodes>\n          <leafValues>\n            7.6283878087997437e-01 -1.6358052194118500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 3.0781796202063560e-02</internalNodes>\n          <leafValues>\n            -1.8158669769763947e-01 7.5050812959671021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 1.8483418971300125e-02</internalNodes>\n          <leafValues>\n            -2.0087972283363342e-01 5.2843624353408813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 1.3191045261919498e-02</internalNodes>\n          <leafValues>\n            -1.5244702994823456e-01 5.8166426420211792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 5.3334265947341919e-02</internalNodes>\n          <leafValues>\n            -1.6860350966453552e-01 7.1358704566955566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 8.3916599396616220e-04</internalNodes>\n          <leafValues>\n            -2.1746076643466949e-01 4.2143425345420837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 1.7697989940643311e-02</internalNodes>\n          <leafValues>\n            -1.3514791429042816e-01 6.1385941505432129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 -2.8310909867286682e-02</internalNodes>\n          <leafValues>\n            5.3606474399566650e-01 -1.5554395318031311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 4.1034919559024274e-04</internalNodes>\n          <leafValues>\n            -2.8903219103813171e-01 3.1018218398094177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 3.9831817150115967e-02</internalNodes>\n          <leafValues>\n            -1.8419378995895386e-01 4.3500679731369019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 -5.2749719470739365e-03</internalNodes>\n          <leafValues>\n            -8.7773287296295166e-01 1.1703799664974213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 -3.6777660250663757e-02</internalNodes>\n          <leafValues>\n            4.1285938024520874e-01 -2.1606418490409851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 9.4376102089881897e-02</internalNodes>\n          <leafValues>\n            -1.0109311342239380e-01 6.0879749059677124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 -1.6132533550262451e-02</internalNodes>\n          <leafValues>\n            5.1245921850204468e-01 -1.5503944456577301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 -6.9251265376806259e-03</internalNodes>\n          <leafValues>\n            4.2284211516380310e-01 -1.5949958562850952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 -8.4776207804679871e-03</internalNodes>\n          <leafValues>\n            4.0007081627845764e-01 -1.6089719533920288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 -9.0452972799539566e-03</internalNodes>\n          <leafValues>\n            -7.6785671710968018e-01 9.3979701399803162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 3.0019454658031464e-02</internalNodes>\n          <leafValues>\n            -1.3505084812641144e-01 4.7249373793601990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 3.6142929457128048e-03</internalNodes>\n          <leafValues>\n            8.1217512488365173e-02 -7.7168470621109009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 -4.7642881982028484e-03</internalNodes>\n          <leafValues>\n            -7.8209573030471802e-01 6.2777772545814514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 3.0351843684911728e-02</internalNodes>\n          <leafValues>\n            -1.1295587569475174e-01 5.8056473731994629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -5.9288680553436279e-02</internalNodes>\n          <leafValues>\n            5.5029523372650146e-01 -1.1994160711765289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 2.2238820791244507e-02</internalNodes>\n          <leafValues>\n            -1.4121483266353607e-01 4.5770901441574097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 -4.1477128863334656e-02</internalNodes>\n          <leafValues>\n            5.7035386562347412e-01 -1.0164763778448105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 -1.1866136919707060e-03</internalNodes>\n          <leafValues>\n            3.4064662456512451e-01 -1.6186751425266266e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 1 -->\n    <_>\n      <maxWeakCount>30</maxWeakCount>\n      <stageThreshold>-1.5367478132247925e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 654 8.4006171673536301e-03</internalNodes>\n          <leafValues>\n            -1.0249307751655579e-01 7.6660197973251343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 -1.0703811421990395e-02</internalNodes>\n          <leafValues>\n            6.9929075241088867e-01 -1.6515852510929108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 6.3192001543939114e-03</internalNodes>\n          <leafValues>\n            -2.2415910661220551e-01 4.3903940916061401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 2.0642649382352829e-02</internalNodes>\n          <leafValues>\n            -1.8032769858837128e-01 5.8923733234405518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 4.0111690759658813e-03</internalNodes>\n          <leafValues>\n            -2.4117745459079742e-01 5.4825514554977417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 2.0640484988689423e-02</internalNodes>\n          <leafValues>\n            -2.4204613268375397e-01 4.0820708870887756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 -9.2923976480960846e-03</internalNodes>\n          <leafValues>\n            3.6315548419952393e-01 -2.0153710246086121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 3.5129714757204056e-02</internalNodes>\n          <leafValues>\n            -1.3475686311721802e-01 6.5953320264816284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 2.0278891548514366e-02</internalNodes>\n          <leafValues>\n            -1.0143157839775085e-01 5.9142571687698364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 6.4985908102244139e-04</internalNodes>\n          <leafValues>\n            -1.9716840982437134e-01 3.4134888648986816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -6.6223340108990669e-03</internalNodes>\n          <leafValues>\n            -6.9885939359664917e-01 9.7095526754856110e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 7.4231177568435669e-03</internalNodes>\n          <leafValues>\n            9.8552420735359192e-02 -6.5358603000640869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 -3.0081106349825859e-02</internalNodes>\n          <leafValues>\n            4.5352721214294434e-01 -1.4968612790107727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 -6.0633812099695206e-02</internalNodes>\n          <leafValues>\n            6.5072047710418701e-01 -9.9382333457469940e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 -5.1941806450486183e-03</internalNodes>\n          <leafValues>\n            3.9397239685058594e-01 -1.6142791509628296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 6.0986238531768322e-03</internalNodes>\n          <leafValues>\n            8.6411900818347931e-02 -7.3878693580627441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 -8.2402750849723816e-03</internalNodes>\n          <leafValues>\n            -7.4236625432968140e-01 6.7853815853595734e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 -3.0396101996302605e-02</internalNodes>\n          <leafValues>\n            4.9337482452392578e-01 -1.3200622797012329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 5.1566954702138901e-02</internalNodes>\n          <leafValues>\n            -1.3631668686866760e-01 4.2621469497680664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 -9.3598978128284216e-04</internalNodes>\n          <leafValues>\n            3.2463693618774414e-01 -2.0737074315547943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 7.0394594222307205e-03</internalNodes>\n          <leafValues>\n            8.9326366782188416e-02 -6.1088448762893677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 -6.5201576799154282e-03</internalNodes>\n          <leafValues>\n            3.7555626034736633e-01 -1.5273806452751160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 3.9127394556999207e-03</internalNodes>\n          <leafValues>\n            8.3254240453243256e-02 -7.3406547307968140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 9.5308097079396248e-03</internalNodes>\n          <leafValues>\n            -1.7045913636684418e-01 3.2230368256568909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 1.5843525528907776e-02</internalNodes>\n          <leafValues>\n            -1.4033445715904236e-01 3.9502236247062683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 5.9641832485795021e-03</internalNodes>\n          <leafValues>\n            6.4340040087699890e-02 -8.5145986080169678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 -4.8106643371284008e-03</internalNodes>\n          <leafValues>\n            -6.9040679931640625e-01 6.5658122301101685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -9.3304895563051105e-04</internalNodes>\n          <leafValues>\n            4.1242164373397827e-01 -1.4879603683948517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 4.1272714734077454e-03</internalNodes>\n          <leafValues>\n            -1.2624038755893707e-01 4.6513134241104126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 2.2929732222110033e-03</internalNodes>\n          <leafValues>\n            1.0915581136941910e-01 -5.1519250869750977e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 2 -->\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>-1.6336240768432617e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 334 2.5117650628089905e-02</internalNodes>\n          <leafValues>\n            3.5861257463693619e-02 8.1681501865386963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 -6.6137146204710007e-03</internalNodes>\n          <leafValues>\n            4.6177890896797180e-01 -2.3009553551673889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 -3.1423813197761774e-03</internalNodes>\n          <leafValues>\n            4.0471413731575012e-01 -2.0868653059005737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 0 -3.7308693863451481e-03</internalNodes>\n          <leafValues>\n            3.2831424474716187e-01 -2.6703229546546936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 7.8482955694198608e-02</internalNodes>\n          <leafValues>\n            -1.5199472010135651e-01 4.6242395043373108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 -2.6338286697864532e-03</internalNodes>\n          <leafValues>\n            3.1739279627799988e-01 -2.3944588005542755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 9.2347152531147003e-02</internalNodes>\n          <leafValues>\n            -1.5557752549648285e-01 6.0793381929397583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 -1.6786376014351845e-02</internalNodes>\n          <leafValues>\n            5.2824962139129639e-01 -1.1138658970594406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 -3.8150474429130554e-02</internalNodes>\n          <leafValues>\n            4.3382674455642700e-01 -1.4826944470405579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 4.3135927990078926e-03</internalNodes>\n          <leafValues>\n            1.1878431588411331e-01 -5.8886390924453735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 7.1479372680187225e-02</internalNodes>\n          <leafValues>\n            -1.0972832888364792e-01 5.7183718681335449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 7.3613431304693222e-03</internalNodes>\n          <leafValues>\n            9.7729764878749847e-02 -6.5627050399780273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 5.1306895911693573e-02</internalNodes>\n          <leafValues>\n            -1.6079875826835632e-01 4.0451571345329285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 -4.7303801402449608e-03</internalNodes>\n          <leafValues>\n            -6.5826851129531860e-01 8.7291486561298370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 -1.8283914541825652e-03</internalNodes>\n          <leafValues>\n            3.7762144207954407e-01 -1.4564067125320435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 5.1737688481807709e-03</internalNodes>\n          <leafValues>\n            8.7748050689697266e-02 -6.2685465812683105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 -3.2173446379601955e-03</internalNodes>\n          <leafValues>\n            -7.3641878366470337e-01 5.7915702462196350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -5.4384516552090645e-03</internalNodes>\n          <leafValues>\n            4.2479231953620911e-01 -1.2763169407844543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 2.6621888391673565e-03</internalNodes>\n          <leafValues>\n            -2.1836103498935699e-01 3.1271252036094666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 1.2338031083345413e-02</internalNodes>\n          <leafValues>\n            7.9128213226795197e-02 -8.1891500949859619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 -1.0976660996675491e-02</internalNodes>\n          <leafValues>\n            2.9887822270393372e-01 -1.8205311894416809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 1.4158659614622593e-03</internalNodes>\n          <leafValues>\n            8.9180864393711090e-02 -5.9163159132003784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 -2.0067330449819565e-02</internalNodes>\n          <leafValues>\n            2.6213398575782776e-01 -1.7981344461441040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 3.1120348721742630e-03</internalNodes>\n          <leafValues>\n            8.4207154810428619e-02 -5.7088595628738403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 -9.9351592361927032e-03</internalNodes>\n          <leafValues>\n            -7.2243571281433105e-01 5.1867216825485229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 1.3314767275005579e-03</internalNodes>\n          <leafValues>\n            -1.7091234028339386e-01 2.5805294513702393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 3.5102412104606628e-02</internalNodes>\n          <leafValues>\n            -1.1150742322206497e-01 4.2247176170349121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 780 2.4332102388143539e-02</internalNodes>\n          <leafValues>\n            -1.2760649621486664e-01 3.5613566637039185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 3.4916624426841736e-03</internalNodes>\n          <leafValues>\n            7.4707798659801483e-02 -6.2106835842132568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 3.1960286200046539e-02</internalNodes>\n          <leafValues>\n            -8.5123799741268158e-02 5.5780071020126343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 2.5646466761827469e-02</internalNodes>\n          <leafValues>\n            9.6616283059120178e-02 -4.8778736591339111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 4.8584854230284691e-03</internalNodes>\n          <leafValues>\n            5.4295353591442108e-02 -6.2732213735580444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 -4.3544219806790352e-03</internalNodes>\n          <leafValues>\n            -5.7990497350692749e-01 5.8335512876510620e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 1.5392700443044305e-03</internalNodes>\n          <leafValues>\n            -1.0273179411888123e-01 4.0286800265312195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 -3.5907807759940624e-03</internalNodes>\n          <leafValues>\n            -5.7972615957260132e-01 7.4733175337314606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 -2.6264857500791550e-02</internalNodes>\n          <leafValues>\n            3.9446443319320679e-01 -1.1581628769636154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 1.6059044748544693e-02</internalNodes>\n          <leafValues>\n            -1.0167770087718964e-01 3.6267307400703430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 -4.1905373334884644e-02</internalNodes>\n          <leafValues>\n            4.7364938259124756e-01 -8.8032789528369904e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 2.0880695432424545e-02</internalNodes>\n          <leafValues>\n            -1.2106557935476303e-01 3.8552695512771606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 3.2229241915047169e-03</internalNodes>\n          <leafValues>\n            6.9974288344383240e-02 -6.0391223430633545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 7.0135584101080894e-03</internalNodes>\n          <leafValues>\n            -1.0977950692176819e-01 3.7435680627822876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 -6.5330024808645248e-03</internalNodes>\n          <leafValues>\n            -6.9873285293579102e-01 5.8301825076341629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 -6.3728205859661102e-03</internalNodes>\n          <leafValues>\n            2.4119727313518524e-01 -1.5554191172122955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 -3.9798039942979813e-03</internalNodes>\n          <leafValues>\n            3.2675772905349731e-01 -1.1990765482187271e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 3 -->\n    <_>\n      <maxWeakCount>48</maxWeakCount>\n      <stageThreshold>-1.6315091848373413e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 398 -1.6997709870338440e-02</internalNodes>\n          <leafValues>\n            7.5603079795837402e-01 1.9442643970251083e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 -1.5086915343999863e-02</internalNodes>\n          <leafValues>\n            6.3829183578491211e-01 -1.4418891072273254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 7.5988154858350754e-03</internalNodes>\n          <leafValues>\n            -1.6574914753437042e-01 4.6998679637908936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 -7.5363442301750183e-03</internalNodes>\n          <leafValues>\n            4.4424122571945190e-01 -1.8298716843128204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 1.0129272937774658e-02</internalNodes>\n          <leafValues>\n            -2.0301033556461334e-01 5.5256271362304688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 3.0099015682935715e-02</internalNodes>\n          <leafValues>\n            -9.0159557759761810e-02 5.2430152893066406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 1.0154332034289837e-02</internalNodes>\n          <leafValues>\n            -2.1865487098693848e-01 3.7318554520606995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 -5.7211541570723057e-03</internalNodes>\n          <leafValues>\n            2.9541808366775513e-01 -2.3727707564830780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 -2.3081460967659950e-03</internalNodes>\n          <leafValues>\n            -6.5867960453033447e-01 8.6644835770130157e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 3.4120366908609867e-03</internalNodes>\n          <leafValues>\n            7.3793835937976837e-02 -6.1988431215286255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 1.1280932230874896e-03</internalNodes>\n          <leafValues>\n            -1.7844060063362122e-01 2.9092252254486084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 3.4356258809566498e-02</internalNodes>\n          <leafValues>\n            -1.4515927433967590e-01 3.3726382255554199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 4.2802840471267700e-02</internalNodes>\n          <leafValues>\n            -1.0719767957925797e-01 4.7673487663269043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 -2.2776997648179531e-03</internalNodes>\n          <leafValues>\n            3.6087805032730103e-01 -1.2924250960350037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 6.0573252849280834e-03</internalNodes>\n          <leafValues>\n            6.6139653325080872e-02 -7.4114394187927246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 -1.0843809694051743e-02</internalNodes>\n          <leafValues>\n            4.1086801886558533e-01 -1.3518220186233521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 2.5435941293835640e-02</internalNodes>\n          <leafValues>\n            -1.2997664511203766e-01 3.8705968856811523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 1.6918467590585351e-03</internalNodes>\n          <leafValues>\n            9.5908589661121368e-02 -6.5462106466293335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 2.5078756734728813e-03</internalNodes>\n          <leafValues>\n            5.6727513670921326e-02 -6.1011266708374023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 -1.0462226346135139e-02</internalNodes>\n          <leafValues>\n            3.6109340190887451e-01 -1.2214753031730652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -1.6778277233242989e-02</internalNodes>\n          <leafValues>\n            -5.3534448146820068e-01 8.2928635179996490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 -1.5040259808301926e-02</internalNodes>\n          <leafValues>\n            2.8428143262863159e-01 -1.4685547351837158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 -6.6617773845791817e-03</internalNodes>\n          <leafValues>\n            -5.6624877452850342e-01 7.8970976173877716e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 8.1638405099511147e-03</internalNodes>\n          <leafValues>\n            -1.6379712522029877e-01 2.6822853088378906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 1.9468305632472038e-02</internalNodes>\n          <leafValues>\n            -1.2091565877199173e-01 3.3373209834098816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 -6.4643016085028648e-03</internalNodes>\n          <leafValues>\n            -6.3222587108612061e-01 6.6180422902107239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 3.5924967378377914e-02</internalNodes>\n          <leafValues>\n            -1.0186699032783508e-01 4.2578670382499695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 1.6905765980482101e-02</internalNodes>\n          <leafValues>\n            -1.3217522203922272e-01 3.3241125941276550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 5.7176817208528519e-03</internalNodes>\n          <leafValues>\n            6.6569112241268158e-02 -6.5681034326553345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 -1.0900674387812614e-03</internalNodes>\n          <leafValues>\n            3.9689606428146362e-01 -1.1235479265451431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 -2.3833939805626869e-02</internalNodes>\n          <leafValues>\n            3.8570886850357056e-01 -1.0193232446908951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 -1.4802538789808750e-02</internalNodes>\n          <leafValues>\n            3.4205844998359680e-01 -1.4262656867504120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 3.9707131683826447e-02</internalNodes>\n          <leafValues>\n            -9.5635637640953064e-02 4.4075250625610352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 6.4531993120908737e-03</internalNodes>\n          <leafValues>\n            5.7593464851379395e-02 -7.0275545120239258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 -4.7811353579163551e-03</internalNodes>\n          <leafValues>\n            2.7453303337097168e-01 -1.3652370870113373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 3.3349171280860901e-03</internalNodes>\n          <leafValues>\n            5.8540347963571548e-02 -7.1738266944885254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -1.0832921601831913e-02</internalNodes>\n          <leafValues>\n            -6.2031352519989014e-01 4.7055520117282867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 -3.5385387018322945e-03</internalNodes>\n          <leafValues>\n            2.7126258611679077e-01 -1.3402579724788666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 -2.1408915519714355e-02</internalNodes>\n          <leafValues>\n            3.6707195639610291e-01 -1.0640451312065125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 6.6339373588562012e-02</internalNodes>\n          <leafValues>\n            -1.0504902899265289e-01 3.3936560153961182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 2.2766939364373684e-03</internalNodes>\n          <leafValues>\n            7.2598882019519806e-02 -5.3970605134963989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 1.6875732690095901e-03</internalNodes>\n          <leafValues>\n            8.7735749781131744e-02 -4.0284165740013123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 8.4530832245945930e-03</internalNodes>\n          <leafValues>\n            -9.3997113406658173e-02 4.1698867082595825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 5.5649573914706707e-03</internalNodes>\n          <leafValues>\n            -8.7597280740737915e-02 3.8827970623970032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 -3.5470342263579369e-03</internalNodes>\n          <leafValues>\n            3.3585703372955322e-01 -1.3658957183361053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 4.2132395319640636e-03</internalNodes>\n          <leafValues>\n            7.2930902242660522e-02 -5.1745194196701050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 3.4532562131062150e-04</internalNodes>\n          <leafValues>\n            -1.7970138788223267e-01 2.1011430025100708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 -4.0376763790845871e-03</internalNodes>\n          <leafValues>\n            2.7334249019622803e-01 -1.3640886545181274e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 4 -->\n    <_>\n      <maxWeakCount>57</maxWeakCount>\n      <stageThreshold>-1.5859905481338501e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 376 -1.5983805060386658e-02</internalNodes>\n          <leafValues>\n            7.4085760116577148e-01 5.4202862083911896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 1.4518834650516510e-02</internalNodes>\n          <leafValues>\n            -1.6582691669464111e-01 5.1249128580093384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 -1.0167414322495461e-02</internalNodes>\n          <leafValues>\n            4.5000806450843811e-01 -1.3064502179622650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 2.7079641819000244e-02</internalNodes>\n          <leafValues>\n            -1.6735902428627014e-01 6.3848841190338135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 1.9515088060870767e-03</internalNodes>\n          <leafValues>\n            -1.1798944324254990e-01 3.9749121665954590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 1.3693260028958321e-02</internalNodes>\n          <leafValues>\n            -8.5312500596046448e-02 5.4718613624572754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 6.0192337259650230e-03</internalNodes>\n          <leafValues>\n            5.7217631489038467e-02 -6.6589832305908203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -5.6810788810253143e-03</internalNodes>\n          <leafValues>\n            -5.7089996337890625e-01 8.1808418035507202e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 4.8240914475172758e-04</internalNodes>\n          <leafValues>\n            -2.2115968167781830e-01 2.1608626842498779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 699 -6.6948928870260715e-03</internalNodes>\n          <leafValues>\n            -6.5513664484024048e-01 7.3252275586128235e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 -1.4181779697537422e-02</internalNodes>\n          <leafValues>\n            3.2152280211448669e-01 -1.5524932742118835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 1.6027893871068954e-02</internalNodes>\n          <leafValues>\n            -1.3886103034019470e-01 3.2296729087829590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 3.8102023303508759e-02</internalNodes>\n          <leafValues>\n            -8.4586337208747864e-02 5.0823771953582764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 -6.8796845152974129e-03</internalNodes>\n          <leafValues>\n            2.8458747267723083e-01 -1.6626659035682678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 -5.7869823649525642e-03</internalNodes>\n          <leafValues>\n            -6.7561829090118408e-01 6.7125916481018066e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 -1.0403458960354328e-02</internalNodes>\n          <leafValues>\n            -6.8244606256484985e-01 5.5120140314102173e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 7.2765655815601349e-02</internalNodes>\n          <leafValues>\n            -1.2289700657129288e-01 3.4603855013847351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 -5.2832886576652527e-02</internalNodes>\n          <leafValues>\n            3.6294373869895935e-01 -1.1915811896324158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 -2.0185699686408043e-03</internalNodes>\n          <leafValues>\n            3.0245268344879150e-01 -1.5617357194423676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 -2.8552478179335594e-03</internalNodes>\n          <leafValues>\n            -6.5382599830627441e-01 6.9692179560661316e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 -3.6076260730624199e-03</internalNodes>\n          <leafValues>\n            -5.5573904514312744e-01 6.0684457421302795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 -1.2505692429840565e-03</internalNodes>\n          <leafValues>\n            2.2487366199493408e-01 -1.7713856697082520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 1.6213182359933853e-02</internalNodes>\n          <leafValues>\n            6.7865289747714996e-02 -5.5539685487747192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 -2.7728214859962463e-02</internalNodes>\n          <leafValues>\n            -5.8333241939544678e-01 5.7263575494289398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 -1.2375607620924711e-03</internalNodes>\n          <leafValues>\n            2.9786622524261475e-01 -1.2998357415199280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 2.4766498245298862e-03</internalNodes>\n          <leafValues>\n            8.8138826191425323e-02 -4.3225872516632080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 1.0034437291324139e-03</internalNodes>\n          <leafValues>\n            -1.1115902662277222e-01 3.2714295387268066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 -6.4956350252032280e-03</internalNodes>\n          <leafValues>\n            -7.0529288053512573e-01 6.1914756894111633e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 -1.2748142704367638e-02</internalNodes>\n          <leafValues>\n            3.6699298024177551e-01 -1.0546508431434631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 -5.6289080530405045e-03</internalNodes>\n          <leafValues>\n            -8.3690512180328369e-01 4.8901058733463287e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 -3.0219005420804024e-03</internalNodes>\n          <leafValues>\n            2.2210697829723358e-01 -1.6297030448913574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 2.9230308718979359e-03</internalNodes>\n          <leafValues>\n            8.0248229205608368e-02 -4.7586214542388916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 -1.6901228576898575e-02</internalNodes>\n          <leafValues>\n            3.2134863734245300e-01 -1.1946766823530197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 -1.6434368444606662e-03</internalNodes>\n          <leafValues>\n            3.5056352615356445e-01 -1.0065372288227081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 6.0744080692529678e-03</internalNodes>\n          <leafValues>\n            7.7158488333225250e-02 -5.0687175989151001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 -6.2521770596504211e-02</internalNodes>\n          <leafValues>\n            3.5145899653434753e-01 -1.0493072122335434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 1.4936760999262333e-03</internalNodes>\n          <leafValues>\n            -1.1596123874187469e-01 3.1784045696258545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 -4.6554272994399071e-03</internalNodes>\n          <leafValues>\n            -5.8499008417129517e-01 6.5426386892795563e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 5.1631154492497444e-03</internalNodes>\n          <leafValues>\n            4.6380143612623215e-02 -6.5920770168304443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 5.7699503377079964e-03</internalNodes>\n          <leafValues>\n            -1.0032630711793900e-01 3.4062737226486206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 -9.6255233511328697e-03</internalNodes>\n          <leafValues>\n            2.2360336780548096e-01 -1.5362788736820221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 -2.8061982244253159e-02</internalNodes>\n          <leafValues>\n            2.5125834345817566e-01 -1.2988410890102386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 7.1229478344321251e-03</internalNodes>\n          <leafValues>\n            5.3426012396812439e-02 -6.4893049001693726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 1.4473337680101395e-02</internalNodes>\n          <leafValues>\n            -1.2796792387962341e-01 2.5788536667823792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 -4.4487215578556061e-02</internalNodes>\n          <leafValues>\n            4.8267531394958496e-01 -7.5288593769073486e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 3.3553102985024452e-03</internalNodes>\n          <leafValues>\n            6.5222866833209991e-02 -5.3387296199798584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 2.6522833853960037e-02</internalNodes>\n          <leafValues>\n            4.7097213566303253e-02 -5.7117742300033569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 5.3791850805282593e-03</internalNodes>\n          <leafValues>\n            4.9663346260786057e-02 -5.0957924127578735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 -8.8640749454498291e-03</internalNodes>\n          <leafValues>\n            3.3878505229949951e-01 -8.6965307593345642e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 2.7605522423982620e-02</internalNodes>\n          <leafValues>\n            4.4678669422864914e-02 -6.9978964328765869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 -1.1171739548444748e-02</internalNodes>\n          <leafValues>\n            -7.3840415477752686e-01 3.0841451138257980e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -1.0616163490340114e-03</internalNodes>\n          <leafValues>\n            3.0718466639518738e-01 -9.7260892391204834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 -7.2728879749774933e-03</internalNodes>\n          <leafValues>\n            -7.1966600418090820e-01 4.3096855282783508e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 -1.1083125136792660e-02</internalNodes>\n          <leafValues>\n            3.8436344265937805e-01 -8.1930950284004211e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 -7.1662524715065956e-03</internalNodes>\n          <leafValues>\n            2.0970225334167480e-01 -1.5484949946403503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 8.2661323249340057e-03</internalNodes>\n          <leafValues>\n            5.9242360293865204e-02 -5.1503551006317139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 7.3844827711582184e-03</internalNodes>\n          <leafValues>\n            3.3728431910276413e-02 -7.2390365600585938e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 5 -->\n    <_>\n      <maxWeakCount>61</maxWeakCount>\n      <stageThreshold>-1.5647197961807251e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 443 -7.5000515207648277e-03</internalNodes>\n          <leafValues>\n            6.9735616445541382e-01 -7.0126228965818882e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 -2.5447460357099771e-03</internalNodes>\n          <leafValues>\n            5.4742383956909180e-01 -1.3766847550868988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 6.3486215658485889e-03</internalNodes>\n          <leafValues>\n            -1.5121677517890930e-01 6.0269719362258911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 2.5572092272341251e-03</internalNodes>\n          <leafValues>\n            -2.1577885746955872e-01 3.9897701144218445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 -6.5959235653281212e-03</internalNodes>\n          <leafValues>\n            3.2995587587356567e-01 -2.0266638696193695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 1.5824008733034134e-02</internalNodes>\n          <leafValues>\n            -1.4384938776493073e-01 5.4570239782333374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 3.4904260188341141e-02</internalNodes>\n          <leafValues>\n            -1.0439507663249969e-01 5.3645384311676025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 7.4804951436817646e-03</internalNodes>\n          <leafValues>\n            -1.7777608335018158e-01 3.0247840285301208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 -5.1247365772724152e-02</internalNodes>\n          <leafValues>\n            5.7459318637847900e-01 -1.0999230295419693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 -5.0416901707649231e-02</internalNodes>\n          <leafValues>\n            4.6202743053436279e-01 -8.9995197951793671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 1.2860384769737720e-02</internalNodes>\n          <leafValues>\n            -1.5580976009368896e-01 2.6711037755012512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 2.3457493633031845e-02</internalNodes>\n          <leafValues>\n            5.4399158805608749e-02 -7.5605469942092896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 -3.4703868441283703e-03</internalNodes>\n          <leafValues>\n            2.3663245141506195e-01 -1.6793093085289001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 4.2368983849883080e-03</internalNodes>\n          <leafValues>\n            6.2613829970359802e-02 -6.2294322252273560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 -8.7803313508629799e-03</internalNodes>\n          <leafValues>\n            3.0670607089996338e-01 -1.2937802076339722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 7.3221437633037567e-03</internalNodes>\n          <leafValues>\n            8.7675094604492188e-02 -4.8196199536323547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 5.7109566405415535e-03</internalNodes>\n          <leafValues>\n            -1.6586679220199585e-01 2.4693855643272400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 -1.0330275399610400e-03</internalNodes>\n          <leafValues>\n            2.8573888540267944e-01 -1.2924034893512726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 -4.1551878675818443e-03</internalNodes>\n          <leafValues>\n            -6.7751622200012207e-01 5.5871110409498215e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 -8.7040066719055176e-03</internalNodes>\n          <leafValues>\n            2.6861536502838135e-01 -1.4459304511547089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 3.9226360619068146e-02</internalNodes>\n          <leafValues>\n            -1.0390799492597580e-01 3.5152482986450195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -4.7440445050597191e-03</internalNodes>\n          <leafValues>\n            2.5985953211784363e-01 -1.4647118747234344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 -3.9255903102457523e-03</internalNodes>\n          <leafValues>\n            -5.1697838306427002e-01 7.4196860194206238e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 -1.0538822039961815e-02</internalNodes>\n          <leafValues>\n            3.7007546424865723e-01 -1.1099486052989960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 -6.4126476645469666e-03</internalNodes>\n          <leafValues>\n            -6.8768596649169922e-01 6.5695002675056458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 -6.6444426774978638e-03</internalNodes>\n          <leafValues>\n            2.3941572010517120e-01 -1.5043427050113678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 3.6154527217149734e-02</internalNodes>\n          <leafValues>\n            -9.1301433742046356e-02 4.3764653801918030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 2.0614354871213436e-03</internalNodes>\n          <leafValues>\n            -1.0028914362192154e-01 3.4935840964317322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 -2.6316416915506124e-03</internalNodes>\n          <leafValues>\n            -4.7376596927642822e-01 7.9684391617774963e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 -6.9046420976519585e-03</internalNodes>\n          <leafValues>\n            -5.4207211732864380e-01 5.3584035485982895e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 -7.9165250062942505e-03</internalNodes>\n          <leafValues>\n            2.3244017362594604e-01 -1.4517860114574432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 6.6963117569684982e-03</internalNodes>\n          <leafValues>\n            5.6810487061738968e-02 -6.3260114192962646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 -1.8640372902154922e-02</internalNodes>\n          <leafValues>\n            2.3912836611270905e-01 -1.4180511236190796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 -1.2744618579745293e-03</internalNodes>\n          <leafValues>\n            3.5026183724403381e-01 -9.4078496098518372e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 -6.6458717919886112e-03</internalNodes>\n          <leafValues>\n            -6.4737498760223389e-01 5.4980348795652390e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 5.5033955723047256e-03</internalNodes>\n          <leafValues>\n            3.6262378096580505e-02 -7.0103096961975098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 -6.0990457423031330e-03</internalNodes>\n          <leafValues>\n            3.1506294012069702e-01 -1.0298713296651840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 -9.5215532928705215e-04</internalNodes>\n          <leafValues>\n            -3.3243876695632935e-01 9.4536833465099335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 -4.8709083348512650e-03</internalNodes>\n          <leafValues>\n            -5.5286788940429688e-01 4.8858009278774261e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 -1.9530812278389931e-03</internalNodes>\n          <leafValues>\n            2.6475632190704346e-01 -1.2214422971010208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 -1.6108162701129913e-02</internalNodes>\n          <leafValues>\n            2.4747616052627563e-01 -1.4181286096572876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 -3.3051617443561554e-02</internalNodes>\n          <leafValues>\n            4.7526669502258301e-01 -6.3493676483631134e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 -2.0969051867723465e-02</internalNodes>\n          <leafValues>\n            3.7475255131721497e-01 -8.7978623807430267e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 -1.1976938694715500e-03</internalNodes>\n          <leafValues>\n            2.8161275386810303e-01 -1.0515356063842773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 3.0867555178701878e-03</internalNodes>\n          <leafValues>\n            6.1260223388671875e-02 -5.0152593851089478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 5.4881181567907333e-03</internalNodes>\n          <leafValues>\n            5.0317917019128799e-02 -5.4196691513061523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 -3.6943652667105198e-03</internalNodes>\n          <leafValues>\n            -5.8759558200836182e-01 4.4150535017251968e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 2.3760091513395309e-02</internalNodes>\n          <leafValues>\n            -1.0199809074401855e-01 3.0310767889022827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 -2.1728422492742538e-02</internalNodes>\n          <leafValues>\n            3.1364366412162781e-01 -1.0069291293621063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 -2.5134570896625519e-02</internalNodes>\n          <leafValues>\n            -5.1455682516098022e-01 5.5909216403961182e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 2.5713320821523666e-02</internalNodes>\n          <leafValues>\n            -1.2262356281280518e-01 2.5486063957214355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 3.4806665498763323e-03</internalNodes>\n          <leafValues>\n            4.3244410306215286e-02 -7.0197206735610962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 -3.8689947687089443e-03</internalNodes>\n          <leafValues>\n            -5.8558273315429688e-01 4.0547560900449753e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 -1.0773935355246067e-03</internalNodes>\n          <leafValues>\n            3.0767098069190979e-01 -9.5467783510684967e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 2.9714959673583508e-03</internalNodes>\n          <leafValues>\n            -7.1951679885387421e-02 3.9655500650405884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 -8.8994875550270081e-03</internalNodes>\n          <leafValues>\n            -6.3042962551116943e-01 4.7020766884088516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 6.7773810587823391e-03</internalNodes>\n          <leafValues>\n            -7.5779460370540619e-02 3.6968868970870972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 -8.9795496314764023e-03</internalNodes>\n          <leafValues>\n            2.2023639082908630e-01 -1.3685037195682526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 -1.4680022373795509e-02</internalNodes>\n          <leafValues>\n            2.9656830430030823e-01 -9.4061806797981262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 -9.5530468970537186e-03</internalNodes>\n          <leafValues>\n            2.9208987951278687e-01 -1.0542043298482895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 -1.4967216411605477e-03</internalNodes>\n          <leafValues>\n            2.1045146882534027e-01 -1.3942880928516388e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 6 -->\n    <_>\n      <maxWeakCount>67</maxWeakCount>\n      <stageThreshold>-1.5504211187362671e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 454 -1.0960219427943230e-02</internalNodes>\n          <leafValues>\n            6.5447217226028442e-01 5.0713799893856049e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 -1.1516783386468887e-02</internalNodes>\n          <leafValues>\n            4.6027910709381104e-01 -1.5864185988903046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 3.3400617539882660e-03</internalNodes>\n          <leafValues>\n            -2.1552324295043945e-01 3.4321418404579163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 -3.8353595882654190e-03</internalNodes>\n          <leafValues>\n            3.3496814966201782e-01 -2.3464411497116089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 -5.9523088857531548e-03</internalNodes>\n          <leafValues>\n            2.8272038698196411e-01 -2.0106634497642517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 -1.3916005846112967e-03</internalNodes>\n          <leafValues>\n            3.4103384613990784e-01 -1.5115562081336975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 -2.2318472620099783e-03</internalNodes>\n          <leafValues>\n            3.1695351004600525e-01 -1.6021527349948883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 8.3244532346725464e-02</internalNodes>\n          <leafValues>\n            -8.9079469442367554e-02 5.3136157989501953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 4.8591636121273041e-02</internalNodes>\n          <leafValues>\n            -1.0279218852519989e-01 3.9601847529411316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 9.5052458345890045e-03</internalNodes>\n          <leafValues>\n            5.5167526006698608e-02 -7.4528604745864868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 -3.7635704502463341e-03</internalNodes>\n          <leafValues>\n            -6.5434825420379639e-01 5.7055845856666565e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 1.7548685718793422e-04</internalNodes>\n          <leafValues>\n            -2.3401582241058350e-01 1.6428647935390472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 -5.4875545203685760e-02</internalNodes>\n          <leafValues>\n            2.5605452060699463e-01 -1.5396752953529358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 -6.1811439692974091e-02</internalNodes>\n          <leafValues>\n            4.2922756075859070e-01 -8.8362246751785278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 1.3979763025417924e-03</internalNodes>\n          <leafValues>\n            -7.3071695864200592e-02 4.5563563704490662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 -5.5876211263239384e-04</internalNodes>\n          <leafValues>\n            2.9506489634513855e-01 -1.2031728774309158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 -4.3148966506123543e-03</internalNodes>\n          <leafValues>\n            -5.7403188943862915e-01 6.6134005784988403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 -5.3551131859421730e-03</internalNodes>\n          <leafValues>\n            -5.2288484573364258e-01 6.9182172417640686e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 -3.6877401173114777e-02</internalNodes>\n          <leafValues>\n            3.3143782615661621e-01 -1.2777587771415710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 4.1612848639488220e-02</internalNodes>\n          <leafValues>\n            -1.4963860809803009e-01 2.9361200332641602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 6.6619878634810448e-04</internalNodes>\n          <leafValues>\n            -1.8005952239036560e-01 2.1171462535858154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 2.2130949422717094e-02</internalNodes>\n          <leafValues>\n            5.7936761528253555e-02 -5.9410941600799561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 1.2182788923382759e-02</internalNodes>\n          <leafValues>\n            -1.1940150707960129e-01 2.9696035385131836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 2.8001153841614723e-03</internalNodes>\n          <leafValues>\n            -1.4503511786460876e-01 2.2681860625743866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 2.8729443438351154e-03</internalNodes>\n          <leafValues>\n            6.5800048410892487e-02 -4.9987852573394775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 -5.0598740577697754e-01</internalNodes>\n          <leafValues>\n            6.1999630928039551e-01 -5.6771270930767059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 -9.6983816474676132e-03</internalNodes>\n          <leafValues>\n            3.2087686657905579e-01 -9.7375035285949707e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 3.0797901563346386e-03</internalNodes>\n          <leafValues>\n            -1.2448154389858246e-01 2.5827226042747498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 -1.5816848026588559e-03</internalNodes>\n          <leafValues>\n            4.1313612461090088e-01 -9.0998791158199310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 -9.5680113881826401e-03</internalNodes>\n          <leafValues>\n            -7.0231872797012329e-01 5.5185325443744659e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 3.1543439254164696e-03</internalNodes>\n          <leafValues>\n            4.8739165067672729e-02 -5.4295998811721802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 -7.8436743933707476e-04</internalNodes>\n          <leafValues>\n            3.0286926031112671e-01 -1.0217373818159103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 4.3993473052978516e-01</internalNodes>\n          <leafValues>\n            -4.0746804326772690e-02 7.4451828002929688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 -3.5277460701763630e-03</internalNodes>\n          <leafValues>\n            -4.5241990685462952e-01 7.3149621486663818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 8.3879064768552780e-03</internalNodes>\n          <leafValues>\n            3.3294096589088440e-02 -7.2618806362152100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 9.9020544439554214e-04</internalNodes>\n          <leafValues>\n            -1.0716802626848221e-01 2.8766462206840515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 -2.9110300820320845e-03</internalNodes>\n          <leafValues>\n            2.8586754202842712e-01 -1.1559913307428360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 -5.1425592973828316e-03</internalNodes>\n          <leafValues>\n            -6.1106848716735840e-01 4.6430643647909164e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 1.7738080024719238e-01</internalNodes>\n          <leafValues>\n            -7.0887565612792969e-02 4.1917768120765686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 -1.1850059032440186e-02</internalNodes>\n          <leafValues>\n            3.1747487187385559e-01 -1.0234380513429642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 -1.0039219632744789e-02</internalNodes>\n          <leafValues>\n            2.0376846194267273e-01 -1.4407536387443542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 1.9497467204928398e-02</internalNodes>\n          <leafValues>\n            4.7855406999588013e-02 -5.7639378309249878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 5.5466167628765106e-02</internalNodes>\n          <leafValues>\n            -7.4624486267566681e-02 4.1103851795196533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 -3.9324127137660980e-03</internalNodes>\n          <leafValues>\n            -5.5429047346115112e-01 5.0012629479169846e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 -8.9037272846326232e-04</internalNodes>\n          <leafValues>\n            2.0536813139915466e-01 -1.3225764036178589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3 4.6562731266021729e-02</internalNodes>\n          <leafValues>\n            -9.1293826699256897e-02 2.9735872149467468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 -1.5474244952201843e-01</internalNodes>\n          <leafValues>\n            -8.6353981494903564e-01 3.4763321280479431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 2.4359119124710560e-03</internalNodes>\n          <leafValues>\n            5.9721726924180984e-02 -4.1146609187126160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 1.3576634228229523e-02</internalNodes>\n          <leafValues>\n            -9.4201639294624329e-02 3.0719256401062012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 -9.8991915583610535e-03</internalNodes>\n          <leafValues>\n            2.6257899403572083e-01 -9.5683693885803223e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 -3.0812243930995464e-03</internalNodes>\n          <leafValues>\n            2.1774919331073761e-01 -1.1509665846824646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 -1.9958070479333401e-03</internalNodes>\n          <leafValues>\n            3.5399836301803589e-01 -7.2066798806190491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 3.0025159940123558e-03</internalNodes>\n          <leafValues>\n            4.2854189872741699e-02 -6.0343819856643677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 -1.1377423070371151e-03</internalNodes>\n          <leafValues>\n            2.0119668543338776e-01 -1.2889184057712555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 3.7626659031957388e-03</internalNodes>\n          <leafValues>\n            4.6901285648345947e-02 -5.7279956340789795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 -3.9297584444284439e-03</internalNodes>\n          <leafValues>\n            3.5875543951988220e-01 -7.3908790946006775e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 -2.5286607444286346e-02</internalNodes>\n          <leafValues>\n            3.5751584172248840e-01 -6.7418299615383148e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 -3.9539579302072525e-03</internalNodes>\n          <leafValues>\n            2.0609807968139648e-01 -1.4521332085132599e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 -5.7711899280548096e-03</internalNodes>\n          <leafValues>\n            -5.2898341417312622e-01 4.7179169952869415e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 -3.3264106605201960e-03</internalNodes>\n          <leafValues>\n            2.2409056127071381e-01 -1.1467082053422928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 6.1332453042268753e-02</internalNodes>\n          <leafValues>\n            3.7662509828805923e-02 -7.1230965852737427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 -1.4834193512797356e-02</internalNodes>\n          <leafValues>\n            -5.5149120092391968e-01 3.9850924164056778e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 -1.0773484408855438e-01</internalNodes>\n          <leafValues>\n            -4.9263399839401245e-01 4.9221854656934738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 -6.5140398219227791e-03</internalNodes>\n          <leafValues>\n            -6.7663580179214478e-01 3.3736269921064377e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 -2.4242542684078217e-02</internalNodes>\n          <leafValues>\n            -6.9796782732009888e-01 2.7110328897833824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 -1.7814380116760731e-03</internalNodes>\n          <leafValues>\n            2.9062062501907349e-01 -8.0135107040405273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 4.7076190821826458e-03</internalNodes>\n          <leafValues>\n            3.7101462483406067e-02 -6.7659527063369751e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 7 -->\n    <_>\n      <maxWeakCount>80</maxWeakCount>\n      <stageThreshold>-1.5639265775680542e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 561 -4.3974462896585464e-03</internalNodes>\n          <leafValues>\n            7.1587848663330078e-01 8.4948554635047913e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 1.8174322322010994e-03</internalNodes>\n          <leafValues>\n            -1.7691791057586670e-01 4.3212845921516418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 -5.5131856352090836e-03</internalNodes>\n          <leafValues>\n            4.5490756630897522e-01 -1.4189453423023224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 1.1955455876886845e-02</internalNodes>\n          <leafValues>\n            -2.0918996632099152e-01 4.3714949488639832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -3.4246121067553759e-03</internalNodes>\n          <leafValues>\n            3.5878163576126099e-01 -1.5395726263523102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 -4.3844994157552719e-02</internalNodes>\n          <leafValues>\n            4.3700152635574341e-01 -1.2767519056797028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 -6.3555962406098843e-03</internalNodes>\n          <leafValues>\n            2.9515129327774048e-01 -1.6441816091537476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 -2.6965860743075609e-03</internalNodes>\n          <leafValues>\n            1.9414065778255463e-01 -2.0237676799297333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 -1.3908351771533489e-02</internalNodes>\n          <leafValues>\n            2.5903883576393127e-01 -1.5587335824966431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 -1.4053133316338062e-02</internalNodes>\n          <leafValues>\n            5.4957073926925659e-01 -8.1244736909866333e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 -5.3004794754087925e-03</internalNodes>\n          <leafValues>\n            -5.8528614044189453e-01 7.3730856180191040e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 -3.1702318228781223e-03</internalNodes>\n          <leafValues>\n            1.9391658902168274e-01 -1.8859483301639557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 -4.5197797007858753e-03</internalNodes>\n          <leafValues>\n            -5.4193162918090820e-01 5.9990171343088150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 -5.4979130625724792e-02</internalNodes>\n          <leafValues>\n            4.7812277078628540e-01 -6.7818723618984222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 8.1017805496230721e-04</internalNodes>\n          <leafValues>\n            -9.5595575869083405e-02 3.1569144129753113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 -2.8012446127831936e-03</internalNodes>\n          <leafValues>\n            -4.9929830431938171e-01 6.8443782627582550e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 -6.0123754665255547e-03</internalNodes>\n          <leafValues>\n            3.8719713687896729e-01 -8.9717194437980652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 3.6350139416754246e-03</internalNodes>\n          <leafValues>\n            6.6413506865501404e-02 -4.8185935616493225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 -1.3544321991503239e-03</internalNodes>\n          <leafValues>\n            2.5372084975242615e-01 -1.2267075479030609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 827 -3.1020103488117456e-03</internalNodes>\n          <leafValues>\n            2.7389132976531982e-01 -1.1379010230302811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 1.5349574387073517e-03</internalNodes>\n          <leafValues>\n            -1.0861707478761673e-01 2.8958576917648315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 6.4284317195415497e-03</internalNodes>\n          <leafValues>\n            5.9735804796218872e-02 -5.6773471832275391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 -8.9295972138643265e-03</internalNodes>\n          <leafValues>\n            -6.7040807008743286e-01 3.8283705711364746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 -1.7896143253892660e-03</internalNodes>\n          <leafValues>\n            2.1716582775115967e-01 -1.4856858551502228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 6.2072295695543289e-03</internalNodes>\n          <leafValues>\n            -8.8489770889282227e-02 3.3571973443031311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 1.9034199649468064e-03</internalNodes>\n          <leafValues>\n            6.7696519196033478e-02 -4.5386880636215210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 -2.1953256800770760e-03</internalNodes>\n          <leafValues>\n            -4.2716285586357117e-01 6.5683454275131226e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 5.3394897840917110e-03</internalNodes>\n          <leafValues>\n            -1.0160661488771439e-01 2.9586192965507507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 2.0328685641288757e-03</internalNodes>\n          <leafValues>\n            -9.5586851239204407e-02 3.0505907535552979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 4.3488927185535431e-03</internalNodes>\n          <leafValues>\n            7.9764112830162048e-02 -3.8651520013809204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 -4.0209172293543816e-03</internalNodes>\n          <leafValues>\n            3.0502754449844360e-01 -8.9127995073795319e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 -4.8844739794731140e-02</internalNodes>\n          <leafValues>\n            4.2813199758529663e-01 -6.7647248506546021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 6.9915860891342163e-02</internalNodes>\n          <leafValues>\n            -8.3985306322574615e-02 3.2602414488792419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 4.9919363111257553e-02</internalNodes>\n          <leafValues>\n            -7.2998367249965668e-02 4.6169292926788330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 3.0068659689277411e-03</internalNodes>\n          <leafValues>\n            5.5069219321012497e-02 -6.1965858936309814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 1.7419853247702122e-03</internalNodes>\n          <leafValues>\n            -8.2020215690135956e-02 3.6006987094879150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 -4.1090780869126320e-03</internalNodes>\n          <leafValues>\n            -5.2174150943756104e-01 5.6436747312545776e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 -4.5902859419584274e-03</internalNodes>\n          <leafValues>\n            2.2742575407028198e-01 -1.2061754614114761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 -2.8690489009022713e-02</internalNodes>\n          <leafValues>\n            -3.5808193683624268e-01 7.5659923255443573e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 4.1000463068485260e-02</internalNodes>\n          <leafValues>\n            -6.2531292438507080e-02 4.5491513609886169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 -4.2531453073024750e-03</internalNodes>\n          <leafValues>\n            -6.1825770139694214e-01 4.9510892480611801e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 -1.4550488442182541e-02</internalNodes>\n          <leafValues>\n            -7.7191162109375000e-01 2.5961024686694145e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 -7.4881664477288723e-04</internalNodes>\n          <leafValues>\n            2.8547286987304688e-01 -8.8079601526260376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 1.3214498758316040e-03</internalNodes>\n          <leafValues>\n            -7.6633729040622711e-02 3.7057441473007202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 5.3907292895019054e-03</internalNodes>\n          <leafValues>\n            4.9379035830497742e-02 -5.7583230733871460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 838 -2.4113813415169716e-03</internalNodes>\n          <leafValues>\n            2.0829583704471588e-01 -1.3430447876453400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 1.1464932933449745e-02</internalNodes>\n          <leafValues>\n            4.9434442073106766e-02 -6.5971946716308594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 -1.3421529904007912e-02</internalNodes>\n          <leafValues>\n            -7.4524301290512085e-01 2.5121277198195457e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 2.8626890853047371e-03</internalNodes>\n          <leafValues>\n            6.1505425721406937e-02 -3.5306212306022644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 1.1442219838500023e-02</internalNodes>\n          <leafValues>\n            5.3547207266092300e-02 -4.0409806370735168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 5.7390062138438225e-03</internalNodes>\n          <leafValues>\n            -9.7106143832206726e-02 2.4726873636245728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 -1.3369014486670494e-02</internalNodes>\n          <leafValues>\n            3.4151887893676758e-01 -9.5434606075286865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 3.3499381970614195e-03</internalNodes>\n          <leafValues>\n            4.9335762858390808e-02 -4.9601793289184570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 1.2374855577945709e-02</internalNodes>\n          <leafValues>\n            -5.7205036282539368e-02 5.0581747293472290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 2.7577474713325500e-02</internalNodes>\n          <leafValues>\n            -8.7777808308601379e-02 2.9972809553146362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 2.1137124300003052e-01</internalNodes>\n          <leafValues>\n            -6.2023047357797623e-02 4.0350961685180664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 -3.5103857517242432e-02</internalNodes>\n          <leafValues>\n            2.9696103930473328e-01 -8.2776337862014771e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 -2.8949903789907694e-03</internalNodes>\n          <leafValues>\n            -3.7250569462776184e-01 6.6616289317607880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 3.6181407049298286e-03</internalNodes>\n          <leafValues>\n            -9.3407385051250458e-02 2.5402054190635681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 1.1848636902868748e-02</internalNodes>\n          <leafValues>\n            -8.2135058939456940e-02 2.9939675331115723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 -1.0207802988588810e-02</internalNodes>\n          <leafValues>\n            2.1719035506248474e-01 -1.1622364073991776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 3.0942540615797043e-02</internalNodes>\n          <leafValues>\n            4.5177377760410309e-02 -5.0523322820663452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 -3.1778869032859802e-01</internalNodes>\n          <leafValues>\n            -8.8358139991760254e-01 2.1195204928517342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 -1.0037058964371681e-02</internalNodes>\n          <leafValues>\n            -5.8986192941665649e-01 3.0863022431731224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 9.1691948473453522e-03</internalNodes>\n          <leafValues>\n            -6.4322948455810547e-02 3.7386918067932129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 1.3658402487635612e-02</internalNodes>\n          <leafValues>\n            -1.0158041864633560e-01 2.6782375574111938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 2.7183804195374250e-03</internalNodes>\n          <leafValues>\n            5.5635135620832443e-02 -3.9148023724555969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 1.3893332798033953e-03</internalNodes>\n          <leafValues>\n            -1.2399668246507645e-01 1.7072468996047974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 -1.8156928941607475e-02</internalNodes>\n          <leafValues>\n            -6.3868224620819092e-01 3.4263785928487778e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 6.4471308141946793e-03</internalNodes>\n          <leafValues>\n            1.8927905708551407e-02 -8.5299736261367798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 1.4844031073153019e-02</internalNodes>\n          <leafValues>\n            -1.2482391297817230e-01 1.7663741111755371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 -1.9531816244125366e-02</internalNodes>\n          <leafValues>\n            3.1519362330436707e-01 -8.2499116659164429e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 2.2133110091090202e-02</internalNodes>\n          <leafValues>\n            -9.0632885694503784e-02 2.2813312709331512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 -5.8851181529462337e-03</internalNodes>\n          <leafValues>\n            2.0633347332477570e-01 -1.1403661221265793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 1.4685674104839563e-03</internalNodes>\n          <leafValues>\n            -6.8528242409229279e-02 3.6765024065971375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 -5.6167589500546455e-03</internalNodes>\n          <leafValues>\n            2.1468248963356018e-01 -1.1975194513797760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 -1.0915055871009827e-01</internalNodes>\n          <leafValues>\n            4.9222618341445923e-01 -4.6790093183517456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 -4.3774135410785675e-03</internalNodes>\n          <leafValues>\n            2.6555654406547546e-01 -8.1355758011341095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -5.5184490047395229e-03</internalNodes>\n          <leafValues>\n            -4.7854590415954590e-01 4.9387764185667038e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 -1.8072805833071470e-03</internalNodes>\n          <leafValues>\n            -6.4401823282241821e-01 3.1085403636097908e-02</leafValues></_></weakClassifiers></_>\n    <!-- stage 8 -->\n    <_>\n      <maxWeakCount>91</maxWeakCount>\n      <stageThreshold>-1.5610778331756592e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 821 -1.1308195069432259e-02</internalNodes>\n          <leafValues>\n            6.4171379804611206e-01 6.3050843775272369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -1.6007030382752419e-02</internalNodes>\n          <leafValues>\n            4.6389564871788025e-01 -1.2460056692361832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 1.5086517669260502e-03</internalNodes>\n          <leafValues>\n            -1.4270767569541931e-01 3.3293032646179199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 -5.5297352373600006e-02</internalNodes>\n          <leafValues>\n            4.7708284854888916e-01 -1.1913372576236725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 1.3316229917109013e-02</internalNodes>\n          <leafValues>\n            -1.6993317008018494e-01 3.8821667432785034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 8.1390906125307083e-03</internalNodes>\n          <leafValues>\n            -1.5329377353191376e-01 2.8196957707405090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 -1.5794128412380815e-03</internalNodes>\n          <leafValues>\n            -4.3692907691001892e-01 1.1585860699415207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 -7.4164522811770439e-03</internalNodes>\n          <leafValues>\n            -7.0102095603942871e-01 3.1883224844932556e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 2.9237023554742336e-03</internalNodes>\n          <leafValues>\n            -1.2032959610223770e-01 3.1826072931289673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 8.3931483328342438e-02</internalNodes>\n          <leafValues>\n            -7.1062639355659485e-02 5.1401311159133911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 5.1326253451406956e-03</internalNodes>\n          <leafValues>\n            -1.5315851569175720e-01 2.3686404526233673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 1.2808490544557571e-02</internalNodes>\n          <leafValues>\n            -1.2817305326461792e-01 2.8131189942359924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 5.5591724812984467e-02</internalNodes>\n          <leafValues>\n            -9.7707554697990417e-02 3.7602767348289490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 -2.4632480926811695e-03</internalNodes>\n          <leafValues>\n            -5.5093276500701904e-01 6.5490268170833588e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 -3.1798938289284706e-03</internalNodes>\n          <leafValues>\n            -5.6288594007492065e-01 5.3227964788675308e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 -1.4345918316394091e-03</internalNodes>\n          <leafValues>\n            -5.1232701539993286e-01 5.7506360113620758e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 1.9692238420248032e-03</internalNodes>\n          <leafValues>\n            -1.6736923158168793e-01 1.8856795132160187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 -5.5519137531518936e-03</internalNodes>\n          <leafValues>\n            -5.2823477983474731e-01 5.2204202860593796e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 3.1600738875567913e-03</internalNodes>\n          <leafValues>\n            -8.0669216811656952e-02 3.6808264255523682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 7.3207332752645016e-03</internalNodes>\n          <leafValues>\n            5.4134551435709000e-02 -5.3350186347961426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 3.5804554354399443e-03</internalNodes>\n          <leafValues>\n            4.3425790965557098e-02 -5.3225243091583252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -3.4314931835979223e-03</internalNodes>\n          <leafValues>\n            3.3590000867843628e-01 -7.8590616583824158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 6.8407682701945305e-03</internalNodes>\n          <leafValues>\n            4.5175880193710327e-02 -6.1210322380065918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 -4.1379006579518318e-03</internalNodes>\n          <leafValues>\n            -5.3888756036758423e-01 4.4202055782079697e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 1.3155659660696983e-02</internalNodes>\n          <leafValues>\n            -7.9103693366050720e-02 3.3573821187019348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 3.1921269837766886e-03</internalNodes>\n          <leafValues>\n            5.7063572108745575e-02 -5.0549602508544922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 2.3588772863149643e-02</internalNodes>\n          <leafValues>\n            -8.3102487027645111e-02 3.0777907371520996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 -6.1599123291671276e-03</internalNodes>\n          <leafValues>\n            1.6074487566947937e-01 -1.5700389444828033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 6.4594233408570290e-03</internalNodes>\n          <leafValues>\n            -9.5241472125053406e-02 3.0516397953033447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 -2.0677673164755106e-03</internalNodes>\n          <leafValues>\n            -5.0822901725769043e-01 5.9834387153387070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 2.0666117779910564e-03</internalNodes>\n          <leafValues>\n            -7.2401538491249084e-02 3.5851547122001648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 5.3266487084329128e-03</internalNodes>\n          <leafValues>\n            5.4928623139858246e-02 -4.8396179080009460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 -7.7358852140605450e-03</internalNodes>\n          <leafValues>\n            -4.8261037468910217e-01 4.4207476079463959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 7.9007837921380997e-03</internalNodes>\n          <leafValues>\n            -9.4954080879688263e-02 2.7517431974411011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 4.0566008538007736e-03</internalNodes>\n          <leafValues>\n            4.3646700680255890e-02 -5.8921122550964355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 3.5946490243077278e-03</internalNodes>\n          <leafValues>\n            -1.3110473752021790e-01 1.8304315209388733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 -2.6677086949348450e-02</internalNodes>\n          <leafValues>\n            2.8980365395545959e-01 -8.3346247673034668e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 5.4062507115304470e-03</internalNodes>\n          <leafValues>\n            -9.1766953468322754e-02 2.9673796892166138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 -5.1793372258543968e-03</internalNodes>\n          <leafValues>\n            -6.1112493276596069e-01 4.3332517147064209e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 -9.1262701898813248e-03</internalNodes>\n          <leafValues>\n            2.1878185868263245e-01 -1.1105874925851822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 9.5943324267864227e-03</internalNodes>\n          <leafValues>\n            -8.7977558374404907e-02 3.2010060548782349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 -5.0256419926881790e-03</internalNodes>\n          <leafValues>\n            2.1040959656238556e-01 -1.0872460156679153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 3.0062482692301273e-03</internalNodes>\n          <leafValues>\n            -1.0699967294931412e-01 2.9316556453704834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 1.1852329596877098e-02</internalNodes>\n          <leafValues>\n            3.9550069719552994e-02 -6.0533910989761353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 -5.2753865718841553e-02</internalNodes>\n          <leafValues>\n            2.6370123028755188e-01 -9.2691496014595032e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 3.8847257383167744e-03</internalNodes>\n          <leafValues>\n            6.4825706183910370e-02 -4.1523045301437378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -2.6287192013114691e-03</internalNodes>\n          <leafValues>\n            -5.0846499204635620e-01 4.2991567403078079e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 2.2053448483347893e-03</internalNodes>\n          <leafValues>\n            -1.0581049323081970e-01 2.3079065978527069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 -3.7466879002749920e-03</internalNodes>\n          <leafValues>\n            -5.2957397699356079e-01 4.6158149838447571e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 -2.9029445722699165e-03</internalNodes>\n          <leafValues>\n            -4.1290035843849182e-01 5.1479596644639969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 3.7801317870616913e-02</internalNodes>\n          <leafValues>\n            -1.0680335760116577e-01 2.2418104112148285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 -8.4752835333347321e-02</internalNodes>\n          <leafValues>\n            -7.8421443700790405e-01 3.0642487108707428e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 9.6596507355570793e-03</internalNodes>\n          <leafValues>\n            -9.7389675676822662e-02 2.4497544765472412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 7.2564175352454185e-03</internalNodes>\n          <leafValues>\n            -9.8195895552635193e-02 2.9686492681503296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -1.0029030963778496e-02</internalNodes>\n          <leafValues>\n            -5.6505876779556274e-01 4.1911888867616653e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 -9.7039304673671722e-03</internalNodes>\n          <leafValues>\n            2.1148304641246796e-01 -1.0376640409231186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 -1.8890092615038157e-03</internalNodes>\n          <leafValues>\n            2.2384525835514069e-01 -1.0597650706768036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 -1.4225458726286888e-03</internalNodes>\n          <leafValues>\n            2.1189780533313751e-01 -1.1053096503019333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 4.3249968439340591e-03</internalNodes>\n          <leafValues>\n            4.1859358549118042e-02 -5.3136503696441650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 -2.5746987666934729e-03</internalNodes>\n          <leafValues>\n            -3.3480682969093323e-01 6.2653385102748871e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 1.9772505387663841e-02</internalNodes>\n          <leafValues>\n            -5.8535441756248474e-02 3.9204162359237671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 -9.6579845994710922e-03</internalNodes>\n          <leafValues>\n            2.2001895308494568e-01 -9.4623439013957977e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 1.5255061443895102e-03</internalNodes>\n          <leafValues>\n            -8.3463013172149658e-02 3.1410121917724609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 6.2276879325509071e-03</internalNodes>\n          <leafValues>\n            5.6847181171178818e-02 -4.1030114889144897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 9.0132874902337790e-04</internalNodes>\n          <leafValues>\n            -8.4593303501605988e-02 2.7151137590408325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 -4.6218577772378922e-03</internalNodes>\n          <leafValues>\n            -4.0008178353309631e-01 5.6437231600284576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 -1.5077156014740467e-02</internalNodes>\n          <leafValues>\n            2.3747061192989349e-01 -9.1518931090831757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 2.1273698657751083e-02</internalNodes>\n          <leafValues>\n            5.3466927260160446e-02 -4.5392176508903503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 -6.0164434835314751e-03</internalNodes>\n          <leafValues>\n            2.3596890270709991e-01 -1.2803076207637787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 8.9327711611986160e-03</internalNodes>\n          <leafValues>\n            4.2524505406618118e-02 -5.8664286136627197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 7.3118656873703003e-03</internalNodes>\n          <leafValues>\n            -6.9641888141632080e-02 3.3589112758636475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 2.6424862444400787e-03</internalNodes>\n          <leafValues>\n            3.4661941230297089e-02 -6.7860239744186401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 5.9287068434059620e-03</internalNodes>\n          <leafValues>\n            2.7298627421259880e-02 -6.5472942590713501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 -7.8424429520964622e-03</internalNodes>\n          <leafValues>\n            -6.3548064231872559e-01 2.7554484084248543e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 -2.1585542708635330e-03</internalNodes>\n          <leafValues>\n            2.2929325699806213e-01 -9.0029284358024597e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 1.5804420690983534e-03</internalNodes>\n          <leafValues>\n            -9.7765833139419556e-02 2.2442239522933960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 -1.2139983475208282e-02</internalNodes>\n          <leafValues>\n            2.9934337735176086e-01 -7.2730682790279388e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 2.2737295366823673e-03</internalNodes>\n          <leafValues>\n            4.6053361147642136e-02 -4.7994795441627502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 2.0574156660586596e-03</internalNodes>\n          <leafValues>\n            -4.9065478146076202e-02 4.6873793005943298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 5.9092035517096519e-03</internalNodes>\n          <leafValues>\n            3.3293012529611588e-02 -6.2421238422393799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 -2.0584808662533760e-02</internalNodes>\n          <leafValues>\n            2.6486057043075562e-01 -7.6441936194896698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 1.1120462790131569e-02</internalNodes>\n          <leafValues>\n            4.4590156525373459e-02 -5.2196294069290161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 -3.4440308809280396e-03</internalNodes>\n          <leafValues>\n            1.5679638087749481e-01 -1.3589784502983093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 -1.0556755587458611e-02</internalNodes>\n          <leafValues>\n            3.0609151721000671e-01 -7.2761178016662598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 8.1238988786935806e-03</internalNodes>\n          <leafValues>\n            4.4047191739082336e-02 -4.8989585041999817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 -1.1493992060422897e-02</internalNodes>\n          <leafValues>\n            2.0072945952415466e-01 -1.1034463346004486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 2.3690698668360710e-02</internalNodes>\n          <leafValues>\n            -1.2550449371337891e-01 1.8665367364883423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 1.5682559460401535e-02</internalNodes>\n          <leafValues>\n            -7.4671298265457153e-02 2.8130453824996948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 -3.3444758504629135e-02</internalNodes>\n          <leafValues>\n            2.6843747496604919e-01 -8.3811916410923004e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 3.0884463340044022e-02</internalNodes>\n          <leafValues>\n            -9.9225074052810669e-02 2.2484876215457916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 -4.0955815464258194e-02</internalNodes>\n          <leafValues>\n            1.8551258742809296e-01 -1.1869347840547562e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 9 -->\n    <_>\n      <maxWeakCount>90</maxWeakCount>\n      <stageThreshold>-1.4453492164611816e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 735 -4.5189578086137772e-03</internalNodes>\n          <leafValues>\n            6.7139738798141479e-01 9.2261902987957001e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 4.2574461549520493e-03</internalNodes>\n          <leafValues>\n            -1.1547925323247910e-01 4.7692731022834778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 -3.0073656234890223e-03</internalNodes>\n          <leafValues>\n            3.6661648750305176e-01 -1.3400055468082428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 2.0850619673728943e-01</internalNodes>\n          <leafValues>\n            -1.7360156774520874e-01 2.8776788711547852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 -3.3409267663955688e-02</internalNodes>\n          <leafValues>\n            4.2965263128280640e-01 -1.1280254274606705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 8.2403160631656647e-03</internalNodes>\n          <leafValues>\n            -1.3494767248630524e-01 3.0936670303344727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 -5.4142652079463005e-03</internalNodes>\n          <leafValues>\n            -5.0563532114028931e-01 6.3294559717178345e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 -1.3661640696227551e-02</internalNodes>\n          <leafValues>\n            2.6760646700859070e-01 -1.3282431662082672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 -6.6441677510738373e-02</internalNodes>\n          <leafValues>\n            4.2027309536933899e-01 -9.1117665171623230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 -3.6823814734816551e-03</internalNodes>\n          <leafValues>\n            -6.0496860742568970e-01 6.3766337931156158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 3.5007880069315434e-03</internalNodes>\n          <leafValues>\n            5.9523750096559525e-02 -5.4523044824600220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 1.5307647408917546e-03</internalNodes>\n          <leafValues>\n            -1.1713726073503494e-01 3.1415259838104248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 -1.7609039321541786e-02</internalNodes>\n          <leafValues>\n            3.9622062444686890e-01 -8.1705585122108459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 2.3612366989254951e-02</internalNodes>\n          <leafValues>\n            -1.1964736133813858e-01 2.8404179215431213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 -1.2014270760118961e-02</internalNodes>\n          <leafValues>\n            2.7746838331222534e-01 -1.1446747928857803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -4.6456828713417053e-03</internalNodes>\n          <leafValues>\n            -5.3870040178298950e-01 5.2098110318183899e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 5.3105363622307777e-03</internalNodes>\n          <leafValues>\n            -1.0284136235713959e-01 3.0061340332031250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 -3.2729478552937508e-03</internalNodes>\n          <leafValues>\n            1.9203263521194458e-01 -1.6125205159187317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 9.8467990756034851e-03</internalNodes>\n          <leafValues>\n            4.8938397318124771e-02 -5.1129150390625000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 3.2083394471555948e-03</internalNodes>\n          <leafValues>\n            -8.5019417107105255e-02 3.4343490004539490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 5.5270073935389519e-03</internalNodes>\n          <leafValues>\n            6.3495978713035583e-02 -4.8666983842849731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 -2.3475135676562786e-03</internalNodes>\n          <leafValues>\n            2.5843459367752075e-01 -1.1678623408079147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 -1.5939555596560240e-03</internalNodes>\n          <leafValues>\n            -3.2783389091491699e-01 8.0364800989627838e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 -4.1191074997186661e-03</internalNodes>\n          <leafValues>\n            -5.5736887454986572e-01 4.6545837074518204e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 1.7747837118804455e-03</internalNodes>\n          <leafValues>\n            -7.7934704720973969e-02 3.3011713624000549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 -1.6894178697839379e-03</internalNodes>\n          <leafValues>\n            2.2780518233776093e-01 -1.1316975951194763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 -2.0341284107416868e-03</internalNodes>\n          <leafValues>\n            -3.8829386234283447e-01 6.9249257445335388e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 -3.4458152949810028e-03</internalNodes>\n          <leafValues>\n            -4.0543556213378906e-01 5.8193698525428772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 -9.3588102608919144e-03</internalNodes>\n          <leafValues>\n            3.1281456351280212e-01 -7.8269012272357941e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 -4.9023423343896866e-03</internalNodes>\n          <leafValues>\n            -4.0507251024246216e-01 6.6911309957504272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -4.8415181040763855e-01</internalNodes>\n          <leafValues>\n            6.5363335609436035e-01 -4.0620740503072739e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 2.6781920343637466e-02</internalNodes>\n          <leafValues>\n            -1.0990447551012039e-01 2.1767459809780121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 -9.4280913472175598e-03</internalNodes>\n          <leafValues>\n            -7.4746483564376831e-01 2.9869174584746361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 -7.7869845554232597e-03</internalNodes>\n          <leafValues>\n            3.0222293734550476e-01 -8.3480700850486755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 3.5958206281065941e-03</internalNodes>\n          <leafValues>\n            -8.2547821104526520e-02 2.9035624861717224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 5.8124819770455360e-03</internalNodes>\n          <leafValues>\n            -9.7843483090400696e-02 2.6563084125518799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 -6.3764736987650394e-03</internalNodes>\n          <leafValues>\n            -4.6169018745422363e-01 5.5747114121913910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 -7.2099521756172180e-02</internalNodes>\n          <leafValues>\n            -7.3345041275024414e-01 2.8517069295048714e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 -8.2340046763420105e-02</internalNodes>\n          <leafValues>\n            -6.5312498807907104e-01 2.9036073014140129e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 -1.5001616440713406e-02</internalNodes>\n          <leafValues>\n            -6.3826096057891846e-01 3.2474573701620102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 1.1907238513231277e-03</internalNodes>\n          <leafValues>\n            -7.9208493232727051e-02 2.9137271642684937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 3.1184246763586998e-03</internalNodes>\n          <leafValues>\n            4.7656070441007614e-02 -4.7487255930900574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 8.2192681729793549e-03</internalNodes>\n          <leafValues>\n            2.6732290163636208e-02 -7.3682332038879395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 7.1536734700202942e-02</internalNodes>\n          <leafValues>\n            -6.6174156963825226e-02 3.4596624970436096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 -1.3247081078588963e-02</internalNodes>\n          <leafValues>\n            2.2122915089130402e-01 -1.1525890231132507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 6.4605651423335075e-03</internalNodes>\n          <leafValues>\n            5.1374625414609909e-02 -4.2834889888763428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 -1.9957395270466805e-03</internalNodes>\n          <leafValues>\n            2.8387853503227234e-01 -8.6039707064628601e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 2.5912611745297909e-03</internalNodes>\n          <leafValues>\n            6.0468357056379318e-02 -3.9721179008483887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 1.9276916980743408e-02</internalNodes>\n          <leafValues>\n            -8.2993559539318085e-02 3.0764940381050110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 -4.9096969887614250e-03</internalNodes>\n          <leafValues>\n            2.7268949151039124e-01 -8.6130671203136444e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 3.6836266517639160e-03</internalNodes>\n          <leafValues>\n            5.9468954801559448e-02 -3.9446946978569031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 3.0758073553442955e-03</internalNodes>\n          <leafValues>\n            -9.7390249371528625e-02 2.4346484243869781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 -4.2319851927459240e-03</internalNodes>\n          <leafValues>\n            3.0930569767951965e-01 -7.9394333064556122e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 7.2837145999073982e-03</internalNodes>\n          <leafValues>\n            4.7933470457792282e-02 -4.8675662279129028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 -6.2543689273297787e-03</internalNodes>\n          <leafValues>\n            -4.8621338605880737e-01 4.2082890868186951e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 -1.1530111078172922e-03</internalNodes>\n          <leafValues>\n            2.6954403519630432e-01 -8.6280718445777893e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 4.0323145687580109e-02</internalNodes>\n          <leafValues>\n            -9.4530344009399414e-02 2.3481069505214691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 -1.2282184325158596e-02</internalNodes>\n          <leafValues>\n            -7.2538161277770996e-01 3.0701907351613045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 678 3.7427488714456558e-02</internalNodes>\n          <leafValues>\n            2.9119925573468208e-02 -6.4663606882095337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 2.5721127167344093e-03</internalNodes>\n          <leafValues>\n            4.9338530749082565e-02 -4.0851938724517822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -2.0106829702854156e-02</internalNodes>\n          <leafValues>\n            -6.2753307819366455e-01 3.1198438256978989e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 2.5536534376442432e-03</internalNodes>\n          <leafValues>\n            2.3092683404684067e-02 -7.4033683538436890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 -1.3628168962895870e-03</internalNodes>\n          <leafValues>\n            3.4928113222122192e-01 -6.5548241138458252e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 -9.9153746850788593e-04</internalNodes>\n          <leafValues>\n            2.2522389888763428e-01 -9.1688700020313263e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 5.0148647278547287e-03</internalNodes>\n          <leafValues>\n            3.9175543934106827e-02 -5.5856782197952271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 9.1358053032308817e-04</internalNodes>\n          <leafValues>\n            -1.2273798882961273e-01 1.8954706192016602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 1.6373313963413239e-02</internalNodes>\n          <leafValues>\n            3.9829690009355545e-02 -5.7986593246459961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 1.4575564302504063e-02</internalNodes>\n          <leafValues>\n            -8.6225226521492004e-02 2.4198558926582336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 5.1754433661699295e-04</internalNodes>\n          <leafValues>\n            8.9498788118362427e-02 -2.1777628362178802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 -1.1098009534180164e-02</internalNodes>\n          <leafValues>\n            2.2925806045532227e-01 -8.3799630403518677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 2.4133864790201187e-02</internalNodes>\n          <leafValues>\n            -1.0102383792400360e-01 2.0877565443515778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 -3.7758771330118179e-02</internalNodes>\n          <leafValues>\n            4.3367731571197510e-01 -5.1683723926544189e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 9.0820249170064926e-03</internalNodes>\n          <leafValues>\n            4.0468864142894745e-02 -5.4790335893630981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 -3.8959060329943895e-03</internalNodes>\n          <leafValues>\n            -3.4300115704536438e-01 5.6340463459491730e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 -1.0297749191522598e-02</internalNodes>\n          <leafValues>\n            2.9084947705268860e-01 -8.1125274300575256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 8.3358399569988251e-03</internalNodes>\n          <leafValues>\n            -6.9515161216259003e-02 3.0880457162857056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 4.1338298469781876e-02</internalNodes>\n          <leafValues>\n            3.2240319997072220e-02 -6.5160977840423584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 2.6844158768653870e-02</internalNodes>\n          <leafValues>\n            -6.5987348556518555e-02 3.1071534752845764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 -4.4573536142706871e-03</internalNodes>\n          <leafValues>\n            -3.4222671389579773e-01 6.0962244868278503e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 -5.6259175762534142e-03</internalNodes>\n          <leafValues>\n            1.9679838418960571e-01 -9.9301390349864960e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 -3.4068014472723007e-02</internalNodes>\n          <leafValues>\n            -5.7343089580535889e-01 3.5370521247386932e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 -4.1321285068988800e-02</internalNodes>\n          <leafValues>\n            -5.4799556732177734e-01 3.2511439174413681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 -4.5842211693525314e-03</internalNodes>\n          <leafValues>\n            2.0696444809436798e-01 -9.3100592494010925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 -8.6525538936257362e-03</internalNodes>\n          <leafValues>\n            -5.2304923534393311e-01 4.0334302932024002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 -8.1807989627122879e-03</internalNodes>\n          <leafValues>\n            3.0393254756927490e-01 -6.9615311920642853e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 -6.2429648824036121e-03</internalNodes>\n          <leafValues>\n            -5.0806474685668945e-01 4.2720243334770203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 -4.3397732079029083e-03</internalNodes>\n          <leafValues>\n            -4.7173827886581421e-01 3.7593103945255280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 -2.4694669991731644e-03</internalNodes>\n          <leafValues>\n            3.4972354769706726e-01 -6.2289424240589142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 4.6105296351015568e-03</internalNodes>\n          <leafValues>\n            4.8353113234043121e-02 -3.9337757229804993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 1.5546558424830437e-03</internalNodes>\n          <leafValues>\n            -8.5152842104434967e-02 2.4539804458618164e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 10 -->\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.6321692466735840e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 443 -9.9800406023859978e-03</internalNodes>\n          <leafValues>\n            6.5110075473785400e-01 7.0068746805191040e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 1.2785504572093487e-02</internalNodes>\n          <leafValues>\n            -1.5662825107574463e-01 4.5551964640617371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 4.0613190503790975e-04</internalNodes>\n          <leafValues>\n            -2.3326659202575684e-01 2.4264821410179138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 0 -4.4671623036265373e-03</internalNodes>\n          <leafValues>\n            3.0027064681053162e-01 -1.7738959193229675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 7.1196053177118301e-03</internalNodes>\n          <leafValues>\n            -1.3141728937625885e-01 4.3263924121856689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 7.1185962297022343e-03</internalNodes>\n          <leafValues>\n            -1.5669579803943634e-01 3.3418005704879761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 4.5672003179788589e-03</internalNodes>\n          <leafValues>\n            -1.2860487401485443e-01 3.1136614084243774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 -1.0435921140015125e-03</internalNodes>\n          <leafValues>\n            1.9418887794017792e-01 -1.7872068285942078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 -8.6360834538936615e-03</internalNodes>\n          <leafValues>\n            -6.0729598999023438e-01 3.6422688513994217e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 6.4469715580344200e-03</internalNodes>\n          <leafValues>\n            -1.7270094156265259e-01 1.8412014842033386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 -3.2128435559570789e-03</internalNodes>\n          <leafValues>\n            -5.6947451829910278e-01 5.5858459323644638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 2.9547505080699921e-02</internalNodes>\n          <leafValues>\n            5.4511282593011856e-02 -4.9024525284767151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 -5.3524523973464966e-03</internalNodes>\n          <leafValues>\n            -4.3886002898216248e-01 5.9159737080335617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 2.2656358778476715e-03</internalNodes>\n          <leafValues>\n            -1.4958912134170532e-01 1.9237321615219116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 -1.7663020640611649e-02</internalNodes>\n          <leafValues>\n            3.4963962435722351e-01 -9.8792962729930878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 -1.4769199490547180e-01</internalNodes>\n          <leafValues>\n            3.8789209723472595e-01 -7.4754111468791962e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 -1.2649353593587875e-02</internalNodes>\n          <leafValues>\n            3.6447465419769287e-01 -7.8627258539199829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 -1.6667589545249939e-01</internalNodes>\n          <leafValues>\n            3.1024694442749023e-01 -9.8567992448806763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 1.5327525325119495e-03</internalNodes>\n          <leafValues>\n            -8.7889634072780609e-02 3.3739477396011353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 -4.9399482086300850e-03</internalNodes>\n          <leafValues>\n            -6.0582613945007324e-01 4.7072298824787140e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 1.6168793663382530e-03</internalNodes>\n          <leafValues>\n            -1.1102212965488434e-01 2.4625547230243683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 -7.9764677211642265e-03</internalNodes>\n          <leafValues>\n            -4.5467814803123474e-01 5.6168641895055771e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 2.1164701320230961e-03</internalNodes>\n          <leafValues>\n            3.9522409439086914e-02 -5.8244407176971436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 1.2181616621091962e-03</internalNodes>\n          <leafValues>\n            -1.1960548907518387e-01 1.8955740332603455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 6.2020774930715561e-02</internalNodes>\n          <leafValues>\n            -9.2262148857116699e-02 2.4536235630512238e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 1.5368127264082432e-02</internalNodes>\n          <leafValues>\n            -7.4950158596038818e-02 3.8813439011573792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 -3.6116694100201130e-03</internalNodes>\n          <leafValues>\n            -5.8402395248413086e-01 4.3880671262741089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 -5.4048337042331696e-03</internalNodes>\n          <leafValues>\n            2.7466323971748352e-01 -8.3315111696720123e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 -5.7541755959391594e-03</internalNodes>\n          <leafValues>\n            -4.8696601390838623e-01 5.0719954073429108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 -8.8466441957280040e-04</internalNodes>\n          <leafValues>\n            1.4997816085815430e-01 -1.4873522520065308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 -1.3690529391169548e-02</internalNodes>\n          <leafValues>\n            -4.2396122217178345e-01 5.1716264337301254e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 -9.2098396271467209e-03</internalNodes>\n          <leafValues>\n            -6.8742758035659790e-01 2.8357446193695068e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -1.0102453641593456e-02</internalNodes>\n          <leafValues>\n            3.0423650145530701e-01 -7.5886160135269165e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 -2.1283417008817196e-03</internalNodes>\n          <leafValues>\n            2.2551217675209045e-01 -9.5488928258419037e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 2.2938135080039501e-03</internalNodes>\n          <leafValues>\n            3.2833088189363480e-02 -6.4737302064895630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 -2.0679826848208904e-03</internalNodes>\n          <leafValues>\n            2.9072764515876770e-01 -8.1707596778869629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 1.8802012782543898e-03</internalNodes>\n          <leafValues>\n            -1.0236340761184692e-01 2.4278828501701355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 -1.5465463511645794e-03</internalNodes>\n          <leafValues>\n            -3.8903787732124329e-01 5.6320030242204666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 6.3281953334808350e-03</internalNodes>\n          <leafValues>\n            -9.9905796349048615e-02 2.2087195515632629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 3.3235952258110046e-02</internalNodes>\n          <leafValues>\n            5.0302099436521530e-02 -4.9443060159683228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 -1.9428483210504055e-03</internalNodes>\n          <leafValues>\n            -6.7564088106155396e-01 2.7948424220085144e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 1.1729343095794320e-03</internalNodes>\n          <leafValues>\n            -1.1950153112411499e-01 1.8506029248237610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 5.4220901802182198e-03</internalNodes>\n          <leafValues>\n            5.0924405455589294e-02 -4.3448522686958313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 3.0700212810188532e-03</internalNodes>\n          <leafValues>\n            -7.6845921576023102e-02 2.6929470896720886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 2.6065693236887455e-03</internalNodes>\n          <leafValues>\n            5.5169116705656052e-02 -3.9985677599906921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 2.6848190464079380e-03</internalNodes>\n          <leafValues>\n            2.7681041508913040e-02 -6.6643798351287842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 4.9525322392582893e-03</internalNodes>\n          <leafValues>\n            -7.8715771436691284e-02 2.6918828487396240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 -1.2217788025736809e-02</internalNodes>\n          <leafValues>\n            2.5042393803596497e-01 -9.2959709465503693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 -9.7617935389280319e-03</internalNodes>\n          <leafValues>\n            -5.8083361387252808e-01 4.1861489415168762e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 -3.0802208930253983e-03</internalNodes>\n          <leafValues>\n            -5.4920911788940430e-01 3.1410869210958481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 8.8869817554950714e-03</internalNodes>\n          <leafValues>\n            -5.7799737900495529e-02 3.5997068881988525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 -1.6894126310944557e-03</internalNodes>\n          <leafValues>\n            1.5611077845096588e-01 -1.3526220619678497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 1.1576576158404350e-02</internalNodes>\n          <leafValues>\n            2.6843478903174400e-02 -7.7421426773071289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 -1.0315187275409698e-02</internalNodes>\n          <leafValues>\n            -3.7911209464073181e-01 4.7785960137844086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 9.3458819901570678e-04</internalNodes>\n          <leafValues>\n            -1.0482961684465408e-01 1.9531208276748657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 -2.1154026035219431e-03</internalNodes>\n          <leafValues>\n            3.2437980175018311e-01 -7.0380724966526031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 7.0915305987000465e-03</internalNodes>\n          <leafValues>\n            3.1504381448030472e-02 -7.1498668193817139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 1.5262098750099540e-03</internalNodes>\n          <leafValues>\n            4.3178513646125793e-02 -4.1175857186317444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 -2.6456830091774464e-03</internalNodes>\n          <leafValues>\n            -6.6830241680145264e-01 2.7078842744231224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 1.3623384293168783e-03</internalNodes>\n          <leafValues>\n            -9.6260324120521545e-02 1.9846718013286591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 -3.4019351005554199e-03</internalNodes>\n          <leafValues>\n            1.3638894259929657e-01 -1.4331445097923279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 -4.2538799345493317e-02</internalNodes>\n          <leafValues>\n            -6.8543094396591187e-01 2.7219040319323540e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 5.1494771614670753e-03</internalNodes>\n          <leafValues>\n            -8.3506844937801361e-02 2.4553795158863068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 -1.3525998219847679e-03</internalNodes>\n          <leafValues>\n            2.0083853602409363e-01 -1.1441762000322342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 -4.7460300847887993e-03</internalNodes>\n          <leafValues>\n            -5.8234161138534546e-01 3.3193428069353104e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 -1.8419034779071808e-02</internalNodes>\n          <leafValues>\n            2.5098413228988647e-01 -7.8263558447360992e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -3.6029946058988571e-03</internalNodes>\n          <leafValues>\n            2.5004243850708008e-01 -7.8106440603733063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 1.0855928063392639e-02</internalNodes>\n          <leafValues>\n            3.8721837103366852e-02 -5.0439488887786865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 3.1823229044675827e-02</internalNodes>\n          <leafValues>\n            2.8006808832287788e-02 -6.5438795089721680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 9.0156495571136475e-02</internalNodes>\n          <leafValues>\n            3.6854032427072525e-02 -4.6750095486640930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 8.1275019329041243e-04</internalNodes>\n          <leafValues>\n            -8.1435337662696838e-02 2.3081797361373901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 -2.2238264791667461e-03</internalNodes>\n          <leafValues>\n            -4.6506562829017639e-01 4.2775552719831467e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 8.5265887901186943e-03</internalNodes>\n          <leafValues>\n            -9.9068634212017059e-02 1.8661868572235107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 5.0247795879840851e-03</internalNodes>\n          <leafValues>\n            3.5677276551723480e-02 -5.6390231847763062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 1.2137264013290405e-02</internalNodes>\n          <leafValues>\n            2.3600205779075623e-02 -6.9947057962417603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 5.8652815641835332e-04</internalNodes>\n          <leafValues>\n            -1.0546504706144333e-01 1.8301849067211151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 -1.2803040444850922e-02</internalNodes>\n          <leafValues>\n            2.4169570207595825e-01 -9.3701913952827454e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 1.9234570208936930e-03</internalNodes>\n          <leafValues>\n            4.1152808815240860e-02 -5.3527724742889404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 -5.1119372248649597e-02</internalNodes>\n          <leafValues>\n            2.0418803393840790e-01 -1.0016205906867981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 2.0427668467164040e-02</internalNodes>\n          <leafValues>\n            3.8303721696138382e-02 -5.6752574443817139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 1.0702429572120309e-03</internalNodes>\n          <leafValues>\n            -1.1941519379615784e-01 1.5449772775173187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 6.3908234238624573e-02</internalNodes>\n          <leafValues>\n            -8.0574154853820801e-02 2.4723786115646362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 -8.9891534298658371e-03</internalNodes>\n          <leafValues>\n            2.7232396602630615e-01 -7.9600028693675995e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 -7.4440538883209229e-03</internalNodes>\n          <leafValues>\n            1.7151834070682526e-01 -1.1733634769916534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 9.3747628852725029e-03</internalNodes>\n          <leafValues>\n            -5.8857422322034836e-02 3.3993646502494812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 3.9659179747104645e-03</internalNodes>\n          <leafValues>\n            3.7981141358613968e-02 -5.3772449493408203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 -2.7701430954039097e-03</internalNodes>\n          <leafValues>\n            2.1686923503875732e-01 -9.1246932744979858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 -3.0083605088293552e-03</internalNodes>\n          <leafValues>\n            -5.1033967733383179e-01 3.8351774215698242e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 5.2285091951489449e-03</internalNodes>\n          <leafValues>\n            6.6746503114700317e-02 -2.5510028004646301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 2.6635453104972839e-03</internalNodes>\n          <leafValues>\n            -8.8651068508625031e-02 2.1260604262351990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 -3.4417591989040375e-02</internalNodes>\n          <leafValues>\n            -6.6850775480270386e-01 3.1463332474231720e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 -9.7544072195887566e-04</internalNodes>\n          <leafValues>\n            2.0566202700138092e-01 -1.0702812671661377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 1.6097709536552429e-01</internalNodes>\n          <leafValues>\n            -4.7826759517192841e-02 3.8993999361991882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 1.0004348587244749e-03</internalNodes>\n          <leafValues>\n            -1.0796900838613510e-01 2.1362201869487762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 4.0136128664016724e-03</internalNodes>\n          <leafValues>\n            -8.1376187503337860e-02 2.2793699800968170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 3.2076346687972546e-03</internalNodes>\n          <leafValues>\n            -1.0031759738922119e-01 2.2700363397598267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 -4.1395910084247589e-03</internalNodes>\n          <leafValues>\n            -4.5727050304412842e-01 4.4953804463148117e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 4.9559203907847404e-03</internalNodes>\n          <leafValues>\n            3.0349666252732277e-02 -5.6468343734741211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 1.9516122993081808e-03</internalNodes>\n          <leafValues>\n            -8.4078930318355560e-02 2.1666139364242554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 2.8487551957368851e-02</internalNodes>\n          <leafValues>\n            -5.8517321944236755e-02 3.7208831310272217e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 11 -->\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.5313543081283569e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 865 -1.1964191682636738e-02</internalNodes>\n          <leafValues>\n            6.5611332654953003e-01 8.7084025144577026e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 -3.6326241679489613e-03</internalNodes>\n          <leafValues>\n            3.0753159523010254e-01 -2.0207116007804871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 1.6091932775452733e-03</internalNodes>\n          <leafValues>\n            -2.1601480245590210e-01 2.4574394524097443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 -1.0807140171527863e-01</internalNodes>\n          <leafValues>\n            5.8551537990570068e-01 -8.0984398722648621e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 6.6386028192937374e-03</internalNodes>\n          <leafValues>\n            -2.3309321701526642e-01 2.5712442398071289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 6.6436373163014650e-04</internalNodes>\n          <leafValues>\n            -1.7002807557582855e-01 2.2093741595745087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 5.9623841661959887e-04</internalNodes>\n          <leafValues>\n            -2.1071858704090118e-01 1.5259474515914917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 -2.1322746761143208e-03</internalNodes>\n          <leafValues>\n            -3.6114820837974548e-01 7.9649142920970917e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 -6.9360136985778809e-03</internalNodes>\n          <leafValues>\n            -5.2729552984237671e-01 5.9225857257843018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 7.2746481746435165e-03</internalNodes>\n          <leafValues>\n            -1.5284915268421173e-01 2.0500071346759796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 -2.4507325142621994e-03</internalNodes>\n          <leafValues>\n            -4.4374018907546997e-01 6.2125567346811295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 -1.1941835284233093e-01</internalNodes>\n          <leafValues>\n            5.9646230936050415e-01 -5.0393357872962952e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 2.4319710209965706e-03</internalNodes>\n          <leafValues>\n            -1.4628271758556366e-01 2.2020979225635529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 4.0825735777616501e-03</internalNodes>\n          <leafValues>\n            4.6519946306943893e-02 -6.0437613725662231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 3.3597379922866821e-02</internalNodes>\n          <leafValues>\n            5.5770415812730789e-02 -4.4832473993301392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 -4.1159454733133316e-02</internalNodes>\n          <leafValues>\n            -4.2802116274833679e-01 5.6050233542919159e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 -3.1343686860054731e-03</internalNodes>\n          <leafValues>\n            -4.5189481973648071e-01 4.5713383704423904e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 -3.9362995885312557e-03</internalNodes>\n          <leafValues>\n            2.6333171129226685e-01 -8.6672604084014893e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 -3.4228354692459106e-02</internalNodes>\n          <leafValues>\n            2.8555384278297424e-01 -8.0961830914020538e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 2.3194378241896629e-02</internalNodes>\n          <leafValues>\n            -1.0957508534193039e-01 2.6531192660331726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 1.1790241114795208e-03</internalNodes>\n          <leafValues>\n            -1.2578412890434265e-01 2.2350181639194489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 2.4525973945856094e-02</internalNodes>\n          <leafValues>\n            3.9447281509637833e-02 -6.4369696378707886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 -5.5821083486080170e-02</internalNodes>\n          <leafValues>\n            3.8404938578605652e-01 -6.1516307294368744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 8.5053090006113052e-03</internalNodes>\n          <leafValues>\n            -1.1682828515768051e-01 2.0639540255069733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -4.6913616359233856e-02</internalNodes>\n          <leafValues>\n            -3.3303919434547424e-01 6.8057745695114136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 -6.0622256249189377e-02</internalNodes>\n          <leafValues>\n            3.0634361505508423e-01 -8.0411903560161591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 3.3126091584563255e-03</internalNodes>\n          <leafValues>\n            6.4039744436740875e-02 -3.6264923214912415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 -6.2155202031135559e-03</internalNodes>\n          <leafValues>\n            2.6324889063835144e-01 -8.5208639502525330e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 -3.6174536217004061e-03</internalNodes>\n          <leafValues>\n            -6.3895624876022339e-01 3.7891831248998642e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 -3.0694848392158747e-03</internalNodes>\n          <leafValues>\n            2.7301403880119324e-01 -8.3168596029281616e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 -1.6663860296830535e-03</internalNodes>\n          <leafValues>\n            -4.9059715867042542e-01 4.4817935675382614e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 1.6716115176677704e-02</internalNodes>\n          <leafValues>\n            6.0621056705713272e-02 -3.4729966521263123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 1.3494723476469517e-02</internalNodes>\n          <leafValues>\n            3.1516350805759430e-02 -6.2451899051666260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 1.9665439613163471e-03</internalNodes>\n          <leafValues>\n            -8.6126960813999176e-02 2.5302976369857788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 -2.8690965846180916e-02</internalNodes>\n          <leafValues>\n            2.9214075207710266e-01 -6.8187572062015533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 5.4161301814019680e-03</internalNodes>\n          <leafValues>\n            -8.5594080388545990e-02 2.6200750470161438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 -3.6381594836711884e-02</internalNodes>\n          <leafValues>\n            -5.9561169147491455e-01 3.6925114691257477e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 -6.7269792780280113e-03</internalNodes>\n          <leafValues>\n            -7.9720497131347656e-01 2.4374464526772499e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 -7.4932668358087540e-03</internalNodes>\n          <leafValues>\n            -8.1190264225006104e-01 1.9826157018542290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 -5.5202767252922058e-03</internalNodes>\n          <leafValues>\n            1.8447315692901611e-01 -1.1608960479497910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 2.9039490036666393e-03</internalNodes>\n          <leafValues>\n            6.3957199454307556e-02 -3.0787152051925659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 2.4206712841987610e-01</internalNodes>\n          <leafValues>\n            -3.4878797829151154e-02 5.9678316116333008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 5.8509008958935738e-03</internalNodes>\n          <leafValues>\n            -8.4465004503726959e-02 2.3755706846714020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 1.1404031887650490e-02</internalNodes>\n          <leafValues>\n            -6.2884598970413208e-02 3.3538460731506348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 -6.4798449166119099e-03</internalNodes>\n          <leafValues>\n            2.6907229423522949e-01 -8.0378860235214233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 -1.5257325768470764e-01</internalNodes>\n          <leafValues>\n            3.7274152040481567e-01 -5.3593669086694717e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -7.8410096466541290e-03</internalNodes>\n          <leafValues>\n            3.5559067130088806e-01 -6.0485389083623886e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 4.6420615399256349e-04</internalNodes>\n          <leafValues>\n            -1.3953977823257446e-01 1.4700867235660553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 -2.7928948402404785e-03</internalNodes>\n          <leafValues>\n            -3.7794330716133118e-01 5.3649291396141052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 -6.2361196614801884e-03</internalNodes>\n          <leafValues>\n            2.3622865974903107e-01 -8.5419490933418274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 -1.0482727549970150e-02</internalNodes>\n          <leafValues>\n            -4.9808895587921143e-01 4.5149747282266617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 5.1559107378125191e-03</internalNodes>\n          <leafValues>\n            -8.4864191710948944e-02 2.6940858364105225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 1.3875829055905342e-02</internalNodes>\n          <leafValues>\n            -6.8634092807769775e-02 3.0264788866043091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 2.0931879989802837e-03</internalNodes>\n          <leafValues>\n            -8.1713855266571045e-02 2.2649072110652924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 2.2430280223488808e-03</internalNodes>\n          <leafValues>\n            3.2463703304529190e-02 -6.4346092939376831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 9.5147592946887016e-03</internalNodes>\n          <leafValues>\n            2.9569771140813828e-02 -5.5541282892227173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 -1.5026458539068699e-02</internalNodes>\n          <leafValues>\n            2.9199507832527161e-01 -6.7493163049221039e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 -3.0254235025495291e-03</internalNodes>\n          <leafValues>\n            -3.6120423674583435e-01 5.3320098668336868e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 -3.7556474562734365e-03</internalNodes>\n          <leafValues>\n            2.4651855230331421e-01 -7.6555579900741577e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 5.2875939756631851e-02</internalNodes>\n          <leafValues>\n            -6.2019556760787964e-02 3.0396047234535217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 915 -6.4307113643735647e-04</internalNodes>\n          <leafValues>\n            1.4872814714908600e-01 -1.2868101894855499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 -2.7651647105813026e-02</internalNodes>\n          <leafValues>\n            -4.7678905725479126e-01 4.2087376117706299e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 -2.5210313033312559e-03</internalNodes>\n          <leafValues>\n            -6.7401230335235596e-01 2.5271434336900711e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 -1.7504607094451785e-03</internalNodes>\n          <leafValues>\n            -6.6526460647583008e-01 2.3153429850935936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 -1.2022716924548149e-02</internalNodes>\n          <leafValues>\n            -6.5252929925918579e-01 2.4157531559467316e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 -1.6721414402127266e-02</internalNodes>\n          <leafValues>\n            2.0145316421985626e-01 -8.8073857128620148e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 -6.1156335286796093e-03</internalNodes>\n          <leafValues>\n            2.3662807047367096e-01 -8.2179009914398193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 4.1717891581356525e-03</internalNodes>\n          <leafValues>\n            3.0463650822639465e-02 -6.4868044853210449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 1.0461646597832441e-03</internalNodes>\n          <leafValues>\n            -1.0331799834966660e-01 1.7261520028114319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 -7.5713603291660547e-04</internalNodes>\n          <leafValues>\n            2.2451940178871155e-01 -9.4167023897171021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -5.1019098609685898e-03</internalNodes>\n          <leafValues>\n            1.7748890817165375e-01 -1.0525784641504288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 5.8564399369060993e-03</internalNodes>\n          <leafValues>\n            2.7441246435046196e-02 -6.8668657541275024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 3.8241008296608925e-03</internalNodes>\n          <leafValues>\n            -6.8950459361076355e-02 2.7575340867042542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 1.1478068307042122e-02</internalNodes>\n          <leafValues>\n            3.9409350603818893e-02 -5.4299759864807129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 -1.4753835275769234e-03</internalNodes>\n          <leafValues>\n            -4.5533245801925659e-01 3.6614906042814255e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 9.4340764917433262e-04</internalNodes>\n          <leafValues>\n            6.0544602572917938e-02 -2.9981470108032227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 -3.6590839736163616e-03</internalNodes>\n          <leafValues>\n            2.3720666766166687e-01 -8.0204457044601440e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 -3.1423069536685944e-02</internalNodes>\n          <leafValues>\n            -7.1167147159576416e-01 2.8132835403084755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 3.5741357132792473e-03</internalNodes>\n          <leafValues>\n            1.7519874498248100e-02 -8.3257293701171875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 -6.8605719134211540e-03</internalNodes>\n          <leafValues>\n            -6.9204151630401611e-01 2.0872814580798149e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 -8.8996449485421181e-03</internalNodes>\n          <leafValues>\n            1.8208101391792297e-01 -9.8315775394439697e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 6.5573323518037796e-03</internalNodes>\n          <leafValues>\n            -7.4690498411655426e-02 2.5062057375907898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 1.4275535941123962e-02</internalNodes>\n          <leafValues>\n            2.7385318651795387e-02 -6.8721151351928711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -2.1887188777327538e-03</internalNodes>\n          <leafValues>\n            -4.7836220264434814e-01 3.3499576151371002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 1.9212976098060608e-02</internalNodes>\n          <leafValues>\n            5.0344366580247879e-02 -3.3104887604713440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 1.0552004911005497e-02</internalNodes>\n          <leafValues>\n            -9.7779601812362671e-02 2.0047651231288910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 -4.9180793575942516e-04</internalNodes>\n          <leafValues>\n            1.4232192933559418e-01 -1.3171885907649994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 3.2934427261352539e-02</internalNodes>\n          <leafValues>\n            2.9324809089303017e-02 -5.8789533376693726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 -1.9249429460614920e-03</internalNodes>\n          <leafValues>\n            1.5106591582298279e-01 -1.2231025844812393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 -4.4266097247600555e-03</internalNodes>\n          <leafValues>\n            2.6083472371101379e-01 -7.3457822203636169e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 -3.5673312842845917e-02</internalNodes>\n          <leafValues>\n            -6.6919100284576416e-01 2.9960991814732552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 -8.5658043622970581e-02</internalNodes>\n          <leafValues>\n            -5.1538497209548950e-01 2.9327427968382835e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 -3.5126551985740662e-02</internalNodes>\n          <leafValues>\n            2.3199184238910675e-01 -7.9689562320709229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 5.8309547603130341e-03</internalNodes>\n          <leafValues>\n            3.0431609600782394e-02 -6.1856180429458618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 -4.4557070359587669e-03</internalNodes>\n          <leafValues>\n            2.6333442330360413e-01 -7.0679754018783569e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 1.2730281800031662e-02</internalNodes>\n          <leafValues>\n            -6.6051281988620758e-02 3.1401801109313965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 -4.6875262632966042e-03</internalNodes>\n          <leafValues>\n            1.9294278323650360e-01 -1.0184600949287415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 -2.9066612478345633e-03</internalNodes>\n          <leafValues>\n            1.9944235682487488e-01 -9.2275582253932953e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -3.1784668099135160e-03</internalNodes>\n          <leafValues>\n            -4.1009154915809631e-01 4.5929219573736191e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 -3.7226981949061155e-03</internalNodes>\n          <leafValues>\n            2.2945560514926910e-01 -7.6773315668106079e-02</leafValues></_></weakClassifiers></_>\n    <!-- stage 12 -->\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.6428810358047485e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 777 3.3433635253459215e-03</internalNodes>\n          <leafValues>\n            7.8417956829071045e-02 6.1746358871459961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 4.1375826112926006e-03</internalNodes>\n          <leafValues>\n            -1.0486003011465073e-01 4.9714615941047668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 -5.4358085617423058e-03</internalNodes>\n          <leafValues>\n            2.9817372560501099e-01 -1.8134090304374695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 5.7432046160101891e-03</internalNodes>\n          <leafValues>\n            -2.1621760725975037e-01 2.8316897153854370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 -2.2321434225887060e-03</internalNodes>\n          <leafValues>\n            2.0751045644283295e-01 -1.5781952440738678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 1.4339581131935120e-02</internalNodes>\n          <leafValues>\n            -9.7252883017063141e-02 4.0868076682090759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 -1.1081973090767860e-02</internalNodes>\n          <leafValues>\n            3.3920571208000183e-01 -1.0915800184011459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 1.4586398378014565e-02</internalNodes>\n          <leafValues>\n            -8.6110286414623260e-02 3.1800067424774170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 -1.6978669445961714e-03</internalNodes>\n          <leafValues>\n            2.5036969780921936e-01 -1.2437737733125687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 1.2829914689064026e-02</internalNodes>\n          <leafValues>\n            5.1119163632392883e-02 -5.4143118858337402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 -1.6196181531995535e-03</internalNodes>\n          <leafValues>\n            -5.3631567955017090e-01 4.6280529350042343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 -2.3190132342278957e-03</internalNodes>\n          <leafValues>\n            -4.3289941549301147e-01 6.0517251491546631e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 3.5206928849220276e-02</internalNodes>\n          <leafValues>\n            -9.1207198798656464e-02 3.1217202544212341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 3.1395033001899719e-03</internalNodes>\n          <leafValues>\n            -7.8746505081653595e-02 3.6259949207305908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 1.1297637596726418e-02</internalNodes>\n          <leafValues>\n            7.4857383966445923e-02 -3.7226554751396179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 4.6712577342987061e-02</internalNodes>\n          <leafValues>\n            -9.2495582997798920e-02 2.9710096120834351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 -6.8688929080963135e-02</internalNodes>\n          <leafValues>\n            -4.8226192593574524e-01 4.9391020089387894e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 -3.5051193553954363e-03</internalNodes>\n          <leafValues>\n            -4.8506668210029602e-01 4.1722387075424194e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 1.1046628467738628e-02</internalNodes>\n          <leafValues>\n            -5.4003205150365829e-02 4.2598679661750793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 -2.0021714270114899e-02</internalNodes>\n          <leafValues>\n            -4.3884435296058655e-01 4.9609564244747162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 1.1850561946630478e-02</internalNodes>\n          <leafValues>\n            -7.8088991343975067e-02 2.7602908015251160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 4.1900265961885452e-02</internalNodes>\n          <leafValues>\n            -9.9447727203369141e-02 2.0865923166275024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 -2.9064953327178955e-02</internalNodes>\n          <leafValues>\n            2.9170644283294678e-01 -7.3766425251960754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 -2.6618237607181072e-03</internalNodes>\n          <leafValues>\n            -3.2550674676895142e-01 7.5278282165527344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 3.2252955716103315e-03</internalNodes>\n          <leafValues>\n            -6.9696784019470215e-02 3.1337058544158936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 7.8913231845945120e-04</internalNodes>\n          <leafValues>\n            6.9301478564739227e-02 -3.2840612530708313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 6.6613638773560524e-03</internalNodes>\n          <leafValues>\n            4.5366134494543076e-02 -4.4648596644401550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 1.9416993018239737e-03</internalNodes>\n          <leafValues>\n            -1.3086521625518799e-01 1.5360382199287415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 6.0106818564236164e-03</internalNodes>\n          <leafValues>\n            4.8219148069620132e-02 -4.1355597972869873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 -6.8208400625735521e-04</internalNodes>\n          <leafValues>\n            1.6169321537017822e-01 -1.2492433935403824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 1.0027646087110043e-02</internalNodes>\n          <leafValues>\n            3.0267864465713501e-02 -6.4555937051773071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 -6.4138583838939667e-03</internalNodes>\n          <leafValues>\n            -6.9905740022659302e-01 2.3570762947201729e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 4.4392300769686699e-03</internalNodes>\n          <leafValues>\n            -5.8655023574829102e-02 3.3790254592895508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 3.8361353799700737e-03</internalNodes>\n          <leafValues>\n            3.1548105180263519e-02 -6.6295272111892700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 -1.0007477831095457e-03</internalNodes>\n          <leafValues>\n            2.2688214480876923e-01 -8.8843353092670441e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 4.7894790768623352e-03</internalNodes>\n          <leafValues>\n            3.0278960242867470e-02 -6.1569523811340332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 5.6278239935636520e-03</internalNodes>\n          <leafValues>\n            -7.8841529786586761e-02 2.4433708190917969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 -7.3229577392339706e-03</internalNodes>\n          <leafValues>\n            3.3265948295593262e-01 -6.7663870751857758e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 -4.5515028759837151e-03</internalNodes>\n          <leafValues>\n            -4.6472606062889099e-01 4.3983772397041321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 1.8201436614617705e-03</internalNodes>\n          <leafValues>\n            -8.1468850374221802e-02 2.3861412703990936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 -1.1703525483608246e-01</internalNodes>\n          <leafValues>\n            -6.7043519020080566e-01 2.9206298291683197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -5.0897812470793724e-03</internalNodes>\n          <leafValues>\n            5.1766836643218994e-01 -4.1514929383993149e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 -8.7873879820108414e-03</internalNodes>\n          <leafValues>\n            -5.2038532495498657e-01 4.0998894721269608e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 -5.6120483204722404e-03</internalNodes>\n          <leafValues>\n            -7.3375105857849121e-01 2.1229419857263565e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 1.0250378400087357e-02</internalNodes>\n          <leafValues>\n            2.5667199864983559e-02 -6.1355572938919067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 -4.8573492094874382e-03</internalNodes>\n          <leafValues>\n            1.6895917057991028e-01 -1.1120435595512390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 2.5750461965799332e-02</internalNodes>\n          <leafValues>\n            3.5605397075414658e-02 -5.4535841941833496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 4.1080308146774769e-03</internalNodes>\n          <leafValues>\n            5.0505056977272034e-02 -3.3836016058921814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 3.9434060454368591e-03</internalNodes>\n          <leafValues>\n            -8.8688671588897705e-02 2.0660057663917542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 6.5294457599520683e-03</internalNodes>\n          <leafValues>\n            -1.2931570410728455e-01 1.6514816880226135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 2.2269077599048615e-02</internalNodes>\n          <leafValues>\n            -4.7366518527269363e-02 3.8508006930351257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 3.5300105810165405e-03</internalNodes>\n          <leafValues>\n            5.3873997181653976e-02 -3.3755952119827271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 -2.4763222783803940e-02</internalNodes>\n          <leafValues>\n            -3.2349804043769836e-01 5.6731209158897400e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 3.1297234818339348e-03</internalNodes>\n          <leafValues>\n            -6.7191042006015778e-02 2.7804708480834961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 -1.7003760440275073e-03</internalNodes>\n          <leafValues>\n            -4.2539414763450623e-01 4.3875113129615784e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 8.3633856847882271e-03</internalNodes>\n          <leafValues>\n            3.0976327136158943e-02 -5.2819561958312988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 -8.7768933735787868e-04</internalNodes>\n          <leafValues>\n            1.9984373450279236e-01 -9.0307638049125671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 -9.2862239107489586e-03</internalNodes>\n          <leafValues>\n            -6.9824051856994629e-01 2.5733994320034981e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 -1.1124708689749241e-03</internalNodes>\n          <leafValues>\n            1.9901444017887115e-01 -9.2606224119663239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 -3.2134181819856167e-03</internalNodes>\n          <leafValues>\n            2.3832809925079346e-01 -7.1890726685523987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 5.9113521128892899e-03</internalNodes>\n          <leafValues>\n            -6.7413553595542908e-02 2.7445399761199951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 -4.5188870280981064e-03</internalNodes>\n          <leafValues>\n            -4.0147483348846436e-01 4.4757787138223648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 2.8254585340619087e-03</internalNodes>\n          <leafValues>\n            4.3743204325437546e-02 -3.7922030687332153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 -2.6064300909638405e-03</internalNodes>\n          <leafValues>\n            2.0811253786087036e-01 -8.2700952887535095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 1.0516709880903363e-03</internalNodes>\n          <leafValues>\n            -8.9635595679283142e-02 2.6205003261566162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 -1.2204772792756557e-03</internalNodes>\n          <leafValues>\n            2.0626722276210785e-01 -8.6367763578891754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 5.0495425239205360e-03</internalNodes>\n          <leafValues>\n            4.5425735414028168e-02 -4.1301593184471130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 -3.2243374735116959e-03</internalNodes>\n          <leafValues>\n            1.4690431952476501e-01 -1.2587989866733551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 -2.3263287730515003e-03</internalNodes>\n          <leafValues>\n            -4.1975629329681396e-01 4.7924898564815521e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 -5.4887672886252403e-03</internalNodes>\n          <leafValues>\n            -4.1799965500831604e-01 3.8171879947185516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 4.6792116016149521e-02</internalNodes>\n          <leafValues>\n            -5.7823952287435532e-02 3.2188871502876282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 2.3481161333620548e-03</internalNodes>\n          <leafValues>\n            -5.3754303604364395e-02 3.0415624380111694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 -3.5063792020082474e-03</internalNodes>\n          <leafValues>\n            -3.8483345508575439e-01 4.7024305909872055e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 1.6757374396547675e-03</internalNodes>\n          <leafValues>\n            -1.3115778565406799e-01 1.6631519794464111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 1.1546656489372253e-02</internalNodes>\n          <leafValues>\n            -5.0141811370849609e-02 3.1787791848182678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 1.8043547868728638e-02</internalNodes>\n          <leafValues>\n            2.5008214637637138e-02 -7.1255826950073242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 -3.1235523521900177e-02</internalNodes>\n          <leafValues>\n            2.1876916289329529e-01 -7.7429860830307007e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 9.7835529595613480e-03</internalNodes>\n          <leafValues>\n            -5.6040864437818527e-02 2.7669593691825867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 2.8905952349305153e-03</internalNodes>\n          <leafValues>\n            5.1800269633531570e-02 -3.1925117969512939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 7.8792851418256760e-03</internalNodes>\n          <leafValues>\n            -6.0856487601995468e-02 2.8146442770957947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 1.3523480854928493e-02</internalNodes>\n          <leafValues>\n            2.4503752589225769e-02 -7.2409152984619141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 3.1048720702528954e-03</internalNodes>\n          <leafValues>\n            4.5725930482149124e-02 -3.3751598000526428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 -1.0647572576999664e-02</internalNodes>\n          <leafValues>\n            -5.4894274473190308e-01 2.8428088873624802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 -4.8104384914040565e-03</internalNodes>\n          <leafValues>\n            2.0432402193546295e-01 -8.2248799502849579e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 2.7336277067661285e-02</internalNodes>\n          <leafValues>\n            -6.7068248987197876e-02 2.3702095448970795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 -1.7123305797576904e-01</internalNodes>\n          <leafValues>\n            5.2998173236846924e-01 -3.1578365713357925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 -4.3723154813051224e-03</internalNodes>\n          <leafValues>\n            2.8745722770690918e-01 -5.7618625462055206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 6.7968526855111122e-03</internalNodes>\n          <leafValues>\n            -6.3940502703189850e-02 2.5016403198242188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 -1.6302993753924966e-03</internalNodes>\n          <leafValues>\n            -2.6190960407257080e-01 6.1918053776025772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 1.7953850328922272e-03</internalNodes>\n          <leafValues>\n            -5.3176742047071457e-02 3.0019727349281311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 6.2259500846266747e-03</internalNodes>\n          <leafValues>\n            3.1048897653818130e-02 -5.6447005271911621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 -1.4370339922606945e-03</internalNodes>\n          <leafValues>\n            1.8240424990653992e-01 -8.9968219399452209e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 -9.0678166598081589e-03</internalNodes>\n          <leafValues>\n            -6.3961440324783325e-01 2.3404622450470924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 -8.2531813532114029e-03</internalNodes>\n          <leafValues>\n            -5.9389066696166992e-01 2.3573497310280800e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 -2.2232248447835445e-03</internalNodes>\n          <leafValues>\n            1.9480818510055542e-01 -8.3372615277767181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 -6.5612345933914185e-03</internalNodes>\n          <leafValues>\n            -4.2599579691886902e-01 3.7793021649122238e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 1.2282801326364279e-03</internalNodes>\n          <leafValues>\n            -8.5198581218719482e-02 1.9753733277320862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -1.0268764197826385e-01</internalNodes>\n          <leafValues>\n            -3.9634877443313599e-01 4.0690928697586060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 711 -1.5864435583353043e-02</internalNodes>\n          <leafValues>\n            1.9112223386764526e-01 -8.7620854377746582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 4.8304852680303156e-04</internalNodes>\n          <leafValues>\n            -1.2651769816875458e-01 1.5627197921276093e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 13 -->\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.5192077159881592e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 563 -7.2759687900543213e-03</internalNodes>\n          <leafValues>\n            6.4157706499099731e-01 1.0701754689216614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 -3.8208619225770235e-03</internalNodes>\n          <leafValues>\n            4.9172374606132507e-01 -9.4503603875637054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 3.4225741401314735e-03</internalNodes>\n          <leafValues>\n            -1.3255690038204193e-01 3.2899302244186401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 3.3628481905907393e-03</internalNodes>\n          <leafValues>\n            -1.6529263556003571e-01 3.8905930519104004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 4.2874794453382492e-03</internalNodes>\n          <leafValues>\n            6.4744032919406891e-02 -4.9827992916107178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 -3.3541000448167324e-03</internalNodes>\n          <leafValues>\n            1.6614496707916260e-01 -1.8601009249687195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 -1.8176173325628042e-03</internalNodes>\n          <leafValues>\n            2.6610982418060303e-01 -1.1267235130071640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 -2.2096108645200729e-02</internalNodes>\n          <leafValues>\n            3.2448813319206238e-01 -8.3371557295322418e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 5.8036940172314644e-03</internalNodes>\n          <leafValues>\n            -1.2335725873708725e-01 2.5443312525749207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 4.7676274552941322e-03</internalNodes>\n          <leafValues>\n            -1.4914961159229279e-01 1.8570756912231445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 2.7053440135205165e-05</internalNodes>\n          <leafValues>\n            -2.1181178092956543e-01 1.1339543759822845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 -2.5647766888141632e-03</internalNodes>\n          <leafValues>\n            -4.3090465664863586e-01 5.7283867150545120e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 -9.9645227193832397e-02</internalNodes>\n          <leafValues>\n            4.7573822736740112e-01 -5.1954109221696854e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 2.8423275798559189e-03</internalNodes>\n          <leafValues>\n            -7.9270146787166595e-02 3.1205773353576660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 -4.7821709886193275e-03</internalNodes>\n          <leafValues>\n            -4.4589859247207642e-01 5.0418782979249954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 1.6041981056332588e-02</internalNodes>\n          <leafValues>\n            -7.6039068400859833e-02 3.0843210220336914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 -3.6943168379366398e-03</internalNodes>\n          <leafValues>\n            2.7407246828079224e-01 -8.8150359690189362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 8.4026419790461659e-04</internalNodes>\n          <leafValues>\n            -1.5873835980892181e-01 1.3953365385532379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 -8.0992765724658966e-03</internalNodes>\n          <leafValues>\n            -5.3085809946060181e-01 3.9269823580980301e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 3.7676268257200718e-03</internalNodes>\n          <leafValues>\n            7.0321731269359589e-02 -3.0400907993316650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 -8.4449478890746832e-04</internalNodes>\n          <leafValues>\n            1.6032356023788452e-01 -1.2606577575206757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 1.9298447296023369e-03</internalNodes>\n          <leafValues>\n            -7.4880234897136688e-02 2.8130438923835754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 -3.1593129970133305e-03</internalNodes>\n          <leafValues>\n            -4.1825935244560242e-01 4.7720715403556824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 7.7791810035705566e-03</internalNodes>\n          <leafValues>\n            4.1349764913320541e-02 -4.5770570635795593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 -3.2682183664292097e-03</internalNodes>\n          <leafValues>\n            2.1473638713359833e-01 -9.5344312489032745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 -2.2884239442646503e-03</internalNodes>\n          <leafValues>\n            2.4062317609786987e-01 -9.0378150343894958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 2.5960609782487154e-03</internalNodes>\n          <leafValues>\n            3.4732636064291000e-02 -6.1617314815521240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 8.0937854945659637e-03</internalNodes>\n          <leafValues>\n            3.9185214787721634e-02 -4.7461858391761780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 5.6226095184683800e-03</internalNodes>\n          <leafValues>\n            3.3066269010305405e-02 -5.4723787307739258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 3.3066368196159601e-03</internalNodes>\n          <leafValues>\n            -1.0691711306571960e-01 1.8520861864089966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 -6.9545931182801723e-03</internalNodes>\n          <leafValues>\n            2.8144246339797974e-01 -6.7726366221904755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 2.0960648544132710e-03</internalNodes>\n          <leafValues>\n            6.5764650702476501e-02 -3.1323519349098206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 -2.9915343038737774e-03</internalNodes>\n          <leafValues>\n            2.4481751024723053e-01 -7.8186720609664917e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 9.8559018224477768e-03</internalNodes>\n          <leafValues>\n            2.9282161965966225e-02 -6.9216150045394897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 -9.9846869707107544e-03</internalNodes>\n          <leafValues>\n            3.1725984811782837e-01 -6.4144395291805267e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 4.0295444428920746e-02</internalNodes>\n          <leafValues>\n            -1.0545746237039566e-01 1.9351178407669067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 -4.5808870345354080e-03</internalNodes>\n          <leafValues>\n            -2.7045866847038269e-01 6.3011758029460907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 -3.4120261669158936e-02</internalNodes>\n          <leafValues>\n            -5.0046062469482422e-01 3.3663876354694366e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 5.9857115149497986e-02</internalNodes>\n          <leafValues>\n            -6.3651382923126221e-02 2.9614394903182983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 3.9175078272819519e-03</internalNodes>\n          <leafValues>\n            3.2706990838050842e-02 -5.7929420471191406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 1.1147339828312397e-02</internalNodes>\n          <leafValues>\n            -7.9590849578380585e-02 2.3456735908985138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 -2.5253929197788239e-03</internalNodes>\n          <leafValues>\n            -5.9936809539794922e-01 2.9250813648104668e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 -1.6680266708135605e-02</internalNodes>\n          <leafValues>\n            3.0521371960639954e-01 -5.8340109884738922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 7.4669495224952698e-03</internalNodes>\n          <leafValues>\n            3.1027967110276222e-02 -6.2497019767761230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 2.8406577184796333e-03</internalNodes>\n          <leafValues>\n            4.1042126715183258e-02 -4.1006734967231750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 -4.7403648495674133e-03</internalNodes>\n          <leafValues>\n            2.0529302954673767e-01 -8.8142603635787964e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 3.7362352013587952e-03</internalNodes>\n          <leafValues>\n            -6.1495106667280197e-02 3.4078758955001831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 -4.4546797871589661e-02</internalNodes>\n          <leafValues>\n            -8.9466398954391479e-01 2.2682141512632370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 9.0460591018199921e-03</internalNodes>\n          <leafValues>\n            4.8672281205654144e-02 -3.3261755108833313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 -3.9043920114636421e-03</internalNodes>\n          <leafValues>\n            2.2659721970558167e-01 -7.7551431953907013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 1.0861126706004143e-02</internalNodes>\n          <leafValues>\n            -7.7613808214664459e-02 2.2056312859058380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 -1.2531490065157413e-03</internalNodes>\n          <leafValues>\n            2.2868460416793823e-01 -8.1201769411563873e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 -5.6936070322990417e-03</internalNodes>\n          <leafValues>\n            -5.6885385513305664e-01 3.6236546933650970e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 1.4989164192229509e-03</internalNodes>\n          <leafValues>\n            3.5795394331216812e-02 -4.7115951776504517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 4.8389505594968796e-02</internalNodes>\n          <leafValues>\n            2.8578057885169983e-02 -5.6662684679031372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 -6.7009456455707550e-02</internalNodes>\n          <leafValues>\n            3.6811140179634094e-01 -4.8919521272182465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 -6.9928979501128197e-03</internalNodes>\n          <leafValues>\n            2.2268642485141754e-01 -8.1494621932506561e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 -5.0552012398838997e-03</internalNodes>\n          <leafValues>\n            -3.9911568164825439e-01 4.8226438462734222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 -1.6228569438681006e-03</internalNodes>\n          <leafValues>\n            2.0442382991313934e-01 -9.1497577726840973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 1.4232760295271873e-03</internalNodes>\n          <leafValues>\n            -8.9272662997245789e-02 1.9328704476356506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 1.4769298955798149e-02</internalNodes>\n          <leafValues>\n            4.3185703456401825e-02 -4.1162547469139099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 1.0630609467625618e-02</internalNodes>\n          <leafValues>\n            2.0712809637188911e-02 -7.4652433395385742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 -4.6220947988331318e-03</internalNodes>\n          <leafValues>\n            -2.6612642407417297e-01 6.2285874038934708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 -2.2310419008135796e-03</internalNodes>\n          <leafValues>\n            -6.4442801475524902e-01 2.2920599207282066e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 -7.5279012322425842e-02</internalNodes>\n          <leafValues>\n            -5.4105269908905029e-01 2.7185589075088501e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 6.8284743465483189e-03</internalNodes>\n          <leafValues>\n            -8.5639610886573792e-02 1.9920121133327484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 -7.6434519141912460e-03</internalNodes>\n          <leafValues>\n            2.4088086187839508e-01 -6.8174593150615692e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 -3.6089830100536346e-03</internalNodes>\n          <leafValues>\n            1.8979941308498383e-01 -9.1478735208511353e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 4.5644217729568481e-01</internalNodes>\n          <leafValues>\n            -3.5746987909078598e-02 5.1038581132888794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 4.3285787105560303e-03</internalNodes>\n          <leafValues>\n            5.0642926245927811e-02 -3.4335514903068542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 -3.0497182160615921e-03</internalNodes>\n          <leafValues>\n            1.5943552553653717e-01 -1.0838232934474945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 2.9164180159568787e-03</internalNodes>\n          <leafValues>\n            -6.2386274337768555e-02 2.6772892475128174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 -6.7837955430150032e-03</internalNodes>\n          <leafValues>\n            -2.8828456997871399e-01 5.4219286888837814e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 4.7922343946993351e-03</internalNodes>\n          <leafValues>\n            4.1374113410711288e-02 -3.9169260859489441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 1.1295514181256294e-02</internalNodes>\n          <leafValues>\n            -5.8489643037319183e-02 2.8171694278717041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 -1.9917660392820835e-03</internalNodes>\n          <leafValues>\n            1.6076046228408813e-01 -1.1378295719623566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 -1.5121680917218328e-03</internalNodes>\n          <leafValues>\n            -4.2076098918914795e-01 3.7524472922086716e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 -2.0562859252095222e-02</internalNodes>\n          <leafValues>\n            1.6639313101768494e-01 -9.5253549516201019e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 -2.3025400936603546e-02</internalNodes>\n          <leafValues>\n            -3.1259611248970032e-01 5.8197792619466782e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 -3.6875833757221699e-03</internalNodes>\n          <leafValues>\n            2.2967162728309631e-01 -7.0608235895633698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 1.2718647718429565e-02</internalNodes>\n          <leafValues>\n            4.4480670243501663e-02 -4.1392150521278381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 1.1408344144001603e-03</internalNodes>\n          <leafValues>\n            -8.0126009881496429e-02 2.2867898643016815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 2.8175862506031990e-02</internalNodes>\n          <leafValues>\n            -7.3071323335170746e-02 2.3685938119888306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 596 6.4620561897754669e-02</internalNodes>\n          <leafValues>\n            4.4116552919149399e-02 -4.2114758491516113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 -2.5126901455223560e-03</internalNodes>\n          <leafValues>\n            1.7448952794075012e-01 -9.9981509149074554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 -2.7390490286052227e-03</internalNodes>\n          <leafValues>\n            -3.7159797549247742e-01 4.5618161559104919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 4.5697823166847229e-02</internalNodes>\n          <leafValues>\n            2.5755234062671661e-02 -5.6903475522994995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 -8.8378116488456726e-03</internalNodes>\n          <leafValues>\n            1.5099802613258362e-01 -9.9460050463676453e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 3.5273849498480558e-03</internalNodes>\n          <leafValues>\n            4.6311099082231522e-02 -3.4411522746086121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 8.8435463840141892e-04</internalNodes>\n          <leafValues>\n            -6.9374859333038330e-02 2.2488924860954285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 -1.6139955259859562e-03</internalNodes>\n          <leafValues>\n            3.3221766352653503e-01 -5.1287319511175156e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 4.1209710761904716e-03</internalNodes>\n          <leafValues>\n            3.1247327104210854e-02 -5.1796287298202515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 6.8625092506408691e-02</internalNodes>\n          <leafValues>\n            -4.8976749181747437e-02 3.6052888631820679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 1.9539505243301392e-02</internalNodes>\n          <leafValues>\n            -3.5133589059114456e-02 4.0571358799934387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 1.0195776820182800e-02</internalNodes>\n          <leafValues>\n            2.9883516952395439e-02 -5.4385137557983398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 -9.7053672652691603e-04</internalNodes>\n          <leafValues>\n            1.7753951251506805e-01 -8.5428759455680847e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 7.0950109511613846e-03</internalNodes>\n          <leafValues>\n            2.6922283694148064e-02 -5.7553297281265259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 3.3868722617626190e-02</internalNodes>\n          <leafValues>\n            2.4893242865800858e-02 -5.1963424682617188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 8.9386161416769028e-03</internalNodes>\n          <leafValues>\n            -6.5781995654106140e-02 2.1598634123802185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 -1.1335080489516258e-03</internalNodes>\n          <leafValues>\n            1.3626587390899658e-01 -1.2551343441009521e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 14 -->\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.5342161655426025e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 442 6.4967479556798935e-03</internalNodes>\n          <leafValues>\n            9.2756643891334534e-02 6.3256287574768066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 -7.0229507982730865e-03</internalNodes>\n          <leafValues>\n            4.7454160451889038e-01 -9.1181516647338867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 -1.1249051894992590e-03</internalNodes>\n          <leafValues>\n            2.7701923251152039e-01 -1.5582662820816040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 2.1593673154711723e-02</internalNodes>\n          <leafValues>\n            -1.2302023172378540e-01 4.3630394339561462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 2.7066322509199381e-03</internalNodes>\n          <leafValues>\n            -1.9653171300888062e-01 1.8972468376159668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 1.9835126586258411e-03</internalNodes>\n          <leafValues>\n            -1.0700473189353943e-01 3.2027366757392883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 -2.2188067436218262e-02</internalNodes>\n          <leafValues>\n            -3.4057390689849854e-01 9.7314909100532532e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 6.6005333792418242e-04</internalNodes>\n          <leafValues>\n            -1.9594040513038635e-01 1.6130633652210236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 9.8964036442339420e-04</internalNodes>\n          <leafValues>\n            -1.6125436127185822e-01 1.5948192775249481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 5.2934061735868454e-02</internalNodes>\n          <leafValues>\n            -7.4111364781856537e-02 3.6531463265419006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 9.6504454268142581e-04</internalNodes>\n          <leafValues>\n            -1.4388854801654816e-01 1.8791662156581879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 -6.5498230978846550e-03</internalNodes>\n          <leafValues>\n            -5.1886290311813354e-01 4.9368891865015030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 -3.1677065417170525e-03</internalNodes>\n          <leafValues>\n            -4.5819568634033203e-01 4.6636309474706650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 -3.8453172892332077e-03</internalNodes>\n          <leafValues>\n            1.8924130499362946e-01 -1.2508736550807953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 1.0155377909541130e-02</internalNodes>\n          <leafValues>\n            -7.4480414390563965e-02 3.1350296735763550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 9.4711792189627886e-04</internalNodes>\n          <leafValues>\n            -1.0617389529943466e-01 2.3810641467571259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 -2.4116779677569866e-03</internalNodes>\n          <leafValues>\n            -3.9038985967636108e-01 6.1166737228631973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 -3.9347349666059017e-03</internalNodes>\n          <leafValues>\n            -5.7243233919143677e-01 3.4851558506488800e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 6.6558746621012688e-03</internalNodes>\n          <leafValues>\n            2.8953079134225845e-02 -6.2028181552886963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 -2.2842539474368095e-03</internalNodes>\n          <leafValues>\n            -3.3340734243392944e-01 5.2056297659873962e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 7.6677929610013962e-04</internalNodes>\n          <leafValues>\n            -9.4001799821853638e-02 2.0127503573894501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 -3.9554573595523834e-02</internalNodes>\n          <leafValues>\n            3.9717516303062439e-01 -5.0761125981807709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 -2.2336144000291824e-02</internalNodes>\n          <leafValues>\n            2.0378184318542480e-01 -1.0499230772256851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 4.1007921099662781e-03</internalNodes>\n          <leafValues>\n            3.9605572819709778e-02 -5.6042844057083130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 -6.3549563288688660e-02</internalNodes>\n          <leafValues>\n            5.9350001811981201e-01 -3.4742560237646103e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 3.7244942504912615e-03</internalNodes>\n          <leafValues>\n            -5.1448952406644821e-02 3.1930196285247803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 1.2377202510833740e-02</internalNodes>\n          <leafValues>\n            3.3052973449230194e-02 -6.5478527545928955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 -1.0786693543195724e-02</internalNodes>\n          <leafValues>\n            2.4589619040489197e-01 -7.2101429104804993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 -1.4055164530873299e-02</internalNodes>\n          <leafValues>\n            3.5272973775863647e-01 -5.8014977723360062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 -1.4940403401851654e-02</internalNodes>\n          <leafValues>\n            -4.5820471644401550e-01 4.5480247586965561e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 1.8285561818629503e-03</internalNodes>\n          <leafValues>\n            3.2248783856630325e-02 -4.9957463145256042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 1.8330020830035210e-02</internalNodes>\n          <leafValues>\n            4.6777416020631790e-02 -3.7174671888351440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 -1.1065398575738072e-03</internalNodes>\n          <leafValues>\n            -3.4255436062812805e-01 4.5848693698644638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 -2.7136057615280151e-03</internalNodes>\n          <leafValues>\n            2.4459818005561829e-01 -6.8955913186073303e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 3.5836829338222742e-03</internalNodes>\n          <leafValues>\n            3.9574686437845230e-02 -4.1517943143844604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 1.3739100657403469e-02</internalNodes>\n          <leafValues>\n            -6.2165945768356323e-02 2.8256937861442566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 -1.1374817695468664e-03</internalNodes>\n          <leafValues>\n            1.6939654946327209e-01 -1.0761212557554245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -1.1336053721606731e-03</internalNodes>\n          <leafValues>\n            2.4757325649261475e-01 -7.0519238710403442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 2.4884669110178947e-03</internalNodes>\n          <leafValues>\n            4.3731488287448883e-02 -4.3731775879859924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 9.1567426919937134e-02</internalNodes>\n          <leafValues>\n            -6.4225792884826660e-02 2.6794373989105225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 8.1775393337011337e-03</internalNodes>\n          <leafValues>\n            -6.9729812443256378e-02 2.7086481451988220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 -3.1169723719358444e-02</internalNodes>\n          <leafValues>\n            -5.1539027690887451e-01 4.1658539324998856e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 -1.8694017082452774e-02</internalNodes>\n          <leafValues>\n            2.1681772172451019e-01 -8.8622607290744781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 5.7301642373204231e-03</internalNodes>\n          <leafValues>\n            -7.2939246892929077e-02 2.3475584387779236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 1.6503074439242482e-03</internalNodes>\n          <leafValues>\n            6.9048069417476654e-02 -2.8440928459167480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 -7.0378202944993973e-03</internalNodes>\n          <leafValues>\n            -4.7214046120643616e-01 3.5182151943445206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 -2.3838514462113380e-03</internalNodes>\n          <leafValues>\n            1.9753867387771606e-01 -8.9424118399620056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 7.9844584688544273e-03</internalNodes>\n          <leafValues>\n            -7.4890352785587311e-02 2.3181028664112091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 1.3400901807472110e-03</internalNodes>\n          <leafValues>\n            -1.0847068578004837e-01 1.9428721070289612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 -2.9489169828593731e-03</internalNodes>\n          <leafValues>\n            -4.0673759579658508e-01 4.7985706478357315e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 -5.9452969580888748e-03</internalNodes>\n          <leafValues>\n            -4.5123618841171265e-01 3.6464843899011612e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 2.3310778196901083e-03</internalNodes>\n          <leafValues>\n            -8.0826595425605774e-02 2.1532072126865387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 -1.9684966653585434e-02</internalNodes>\n          <leafValues>\n            2.3020596802234650e-01 -8.1534743309020996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 -1.6875991132110357e-03</internalNodes>\n          <leafValues>\n            2.3354543745517731e-01 -7.0870727300643921e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 -1.5521588502451777e-03</internalNodes>\n          <leafValues>\n            1.7072069644927979e-01 -1.0233023017644882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 -3.8005404174327850e-02</internalNodes>\n          <leafValues>\n            -6.0487842559814453e-01 2.8272373601794243e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 -2.1617640741169453e-03</internalNodes>\n          <leafValues>\n            -5.5644184350967407e-01 2.5939555838704109e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 -2.6441088411957026e-03</internalNodes>\n          <leafValues>\n            -4.4886007905006409e-01 3.1817246228456497e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 -7.3187379166483879e-04</internalNodes>\n          <leafValues>\n            2.2164805233478546e-01 -7.6915167272090912e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 -3.4191065933555365e-03</internalNodes>\n          <leafValues>\n            -4.4704499840736389e-01 3.5689469426870346e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 1.4393313322216272e-03</internalNodes>\n          <leafValues>\n            -8.1237293779850006e-02 2.0022353529930115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 1.0892877355217934e-02</internalNodes>\n          <leafValues>\n            -5.9532187879085541e-02 2.6124969124794006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 2.5800592266023159e-03</internalNodes>\n          <leafValues>\n            5.3012363612651825e-02 -3.0210506916046143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 -3.7106748204678297e-03</internalNodes>\n          <leafValues>\n            -3.7514480948448181e-01 4.0868300944566727e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 -8.9250775054097176e-03</internalNodes>\n          <leafValues>\n            1.8222920596599579e-01 -8.4776028990745544e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 -4.4729106128215790e-02</internalNodes>\n          <leafValues>\n            2.5505220890045166e-01 -6.6192351281642914e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 -1.0527699440717697e-01</internalNodes>\n          <leafValues>\n            -4.8529133200645447e-01 3.4933239221572876e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 -6.5371848642826080e-02</internalNodes>\n          <leafValues>\n            3.7187507748603821e-01 -5.8592520654201508e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 5.1612589508295059e-02</internalNodes>\n          <leafValues>\n            -7.6325275003910065e-02 2.1536968648433685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 4.2564887553453445e-03</internalNodes>\n          <leafValues>\n            -7.7395483851432800e-02 2.1907977759838104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 -3.5104658454656601e-03</internalNodes>\n          <leafValues>\n            -4.1962492465972900e-01 4.1911821812391281e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 -9.5827406039461493e-04</internalNodes>\n          <leafValues>\n            1.7163562774658203e-01 -1.0379400104284286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 -3.3416904509067535e-02</internalNodes>\n          <leafValues>\n            -5.5419611930847168e-01 3.4831445664167404e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 7.4058589525520802e-03</internalNodes>\n          <leafValues>\n            -6.6642671823501587e-02 2.6589548587799072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 -7.3020011186599731e-03</internalNodes>\n          <leafValues>\n            1.7654685676097870e-01 -8.7743707001209259e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 -4.5689288526773453e-03</internalNodes>\n          <leafValues>\n            1.9193352758884430e-01 -8.0177433788776398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 -8.1814359873533249e-03</internalNodes>\n          <leafValues>\n            2.3826718330383301e-01 -6.4945526421070099e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 4.5117912814021111e-03</internalNodes>\n          <leafValues>\n            3.0824853107333183e-02 -5.3869700431823730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 2.8812256641685963e-03</internalNodes>\n          <leafValues>\n            -9.6859149634838104e-02 1.6199249029159546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 2.4804673157632351e-03</internalNodes>\n          <leafValues>\n            2.1523499861359596e-02 -7.0121616125106812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 6.8080224096775055e-02</internalNodes>\n          <leafValues>\n            2.1451909095048904e-02 -6.2823659181594849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 3.8525110576301813e-03</internalNodes>\n          <leafValues>\n            -8.2842335104942322e-02 1.9410280883312225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 -2.5594229809939861e-03</internalNodes>\n          <leafValues>\n            1.9102296233177185e-01 -8.5406452417373657e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 5.3212735801935196e-03</internalNodes>\n          <leafValues>\n            -7.8593194484710693e-02 2.2497585415840149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 3.1688171438872814e-03</internalNodes>\n          <leafValues>\n            3.6922473460435867e-02 -4.5733535289764404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 1.5939949080348015e-02</internalNodes>\n          <leafValues>\n            3.7862829864025116e-02 -3.9459064602851868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 2.3682378232479095e-03</internalNodes>\n          <leafValues>\n            3.5111214965581894e-02 -4.3085646629333496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 1.2975309044122696e-02</internalNodes>\n          <leafValues>\n            -7.1412295103073120e-02 2.1616001427173615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 -9.9381525069475174e-03</internalNodes>\n          <leafValues>\n            2.7434283494949341e-01 -5.9007227420806885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -4.4495373964309692e-02</internalNodes>\n          <leafValues>\n            -5.7859867811203003e-01 2.8963629156351089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 1.0330894030630589e-02</internalNodes>\n          <leafValues>\n            -6.5200082957744598e-02 2.6670095324516296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 745 -4.2830477468669415e-03</internalNodes>\n          <leafValues>\n            -5.2546054124832153e-01 3.3751774579286575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 1.5691295266151428e-02</internalNodes>\n          <leafValues>\n            2.9164802283048630e-02 -4.8206093907356262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 -1.2077906867489219e-03</internalNodes>\n          <leafValues>\n            2.4997046589851379e-01 -6.1069376766681671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 6.6226916387677193e-03</internalNodes>\n          <leafValues>\n            4.8671871423721313e-02 -3.4221932291984558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -5.1539484411478043e-03</internalNodes>\n          <leafValues>\n            -3.5398313403129578e-01 4.2696069926023483e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 -2.4832391645759344e-03</internalNodes>\n          <leafValues>\n            2.0646870136260986e-01 -7.5708754360675812e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 3.0503068119287491e-03</internalNodes>\n          <leafValues>\n            2.1991817280650139e-02 -6.9251579046249390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 9.2179588973522186e-03</internalNodes>\n          <leafValues>\n            1.7923980951309204e-02 -7.2638368606567383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 3.7863249890506268e-03</internalNodes>\n          <leafValues>\n            -6.6987045109272003e-02 2.2602997720241547e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          0 0 8 1 -1.</_>\n        <_>\n          4 0 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 6 -1.</_>\n        <_>\n          0 0 4 3 2.</_>\n        <_>\n          4 3 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 0 5 3 2.</_>\n        <_>\n          5 3 5 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 5 -1.</_>\n        <_>\n          6 0 12 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 6 -1.</_>\n        <_>\n          0 0 8 3 2.</_>\n        <_>\n          8 3 8 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 10 -1.</_>\n        <_>\n          0 0 8 5 2.</_>\n        <_>\n          8 5 8 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 1 -1.</_>\n        <_>\n          12 0 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 12 -1.</_>\n        <_>\n          0 0 12 6 2.</_>\n        <_>\n          12 6 12 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 10 -1.</_>\n        <_>\n          0 1 4 5 2.</_>\n        <_>\n          4 6 4 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 2 -1.</_>\n        <_>\n          5 1 5 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 6 -1.</_>\n        <_>\n          0 1 5 3 2.</_>\n        <_>\n          5 4 5 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 10 -1.</_>\n        <_>\n          0 1 5 5 2.</_>\n        <_>\n          5 6 5 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 2 -1.</_>\n        <_>\n          0 1 12 1 2.</_>\n        <_>\n          12 2 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 9 -1.</_>\n        <_>\n          0 5 18 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          0 6 6 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 2 -1.</_>\n        <_>\n          0 3 12 1 2.</_>\n        <_>\n          12 4 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 16 15 -1.</_>\n        <_>\n          0 9 16 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 22 6 -1.</_>\n        <_>\n          0 6 22 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 24 6 -1.</_>\n        <_>\n          0 6 24 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 5 24 2 -1.</_>\n        <_>\n          0 5 12 1 2.</_>\n        <_>\n          12 6 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 2 -1.</_>\n        <_>\n          0 6 12 1 2.</_>\n        <_>\n          12 7 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 3 -1.</_>\n        <_>\n          0 7 24 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 2 -1.</_>\n        <_>\n          0 7 4 1 2.</_>\n        <_>\n          4 8 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 1 -1.</_>\n        <_>\n          8 7 8 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 4 -1.</_>\n        <_>\n          0 7 12 2 2.</_>\n        <_>\n          12 9 12 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 22 4 -1.</_>\n        <_>\n          0 8 22 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 24 4 -1.</_>\n        <_>\n          0 8 12 2 2.</_>\n        <_>\n          12 10 12 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 24 6 -1.</_>\n        <_>\n          0 8 12 3 2.</_>\n        <_>\n          12 11 12 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 24 8 -1.</_>\n        <_>\n          0 8 12 4 2.</_>\n        <_>\n          12 12 12 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 3 -1.</_>\n        <_>\n          0 10 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 8 -1.</_>\n        <_>\n          0 11 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 7 2 -1.</_>\n        <_>\n          0 10 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 2 -1.</_>\n        <_>\n          0 9 10 1 2.</_>\n        <_>\n          10 10 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 22 2 -1.</_>\n        <_>\n          0 9 11 1 2.</_>\n        <_>\n          11 10 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 22 4 -1.</_>\n        <_>\n          0 9 11 2 2.</_>\n        <_>\n          11 11 11 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 22 10 -1.</_>\n        <_>\n          0 9 11 5 2.</_>\n        <_>\n          11 14 11 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 24 4 -1.</_>\n        <_>\n          0 9 12 2 2.</_>\n        <_>\n          12 11 12 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 3 3 -1.</_>\n        <_>\n          0 11 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 24 2 -1.</_>\n        <_>\n          0 10 12 1 2.</_>\n        <_>\n          12 11 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 8 -1.</_>\n        <_>\n          0 11 3 4 2.</_>\n        <_>\n          3 15 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 24 2 -1.</_>\n        <_>\n          0 11 12 1 2.</_>\n        <_>\n          12 12 12 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 24 7 -1.</_>\n        <_>\n          12 11 12 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 10 -1.</_>\n        <_>\n          3 12 3 10 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 13 22 10 -1.</_>\n        <_>\n          11 13 11 10 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          4 14 4 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 7 -1.</_>\n        <_>\n          9 15 9 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 16 10 3 -1.</_>\n        <_>\n          5 16 5 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 17 3 3 -1.</_>\n        <_>\n          1 17 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 17 3 4 -1.</_>\n        <_>\n          1 17 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 6 4 -1.</_>\n        <_>\n          3 18 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 10 4 -1.</_>\n        <_>\n          5 18 5 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 9 3 -1.</_>\n        <_>\n          0 19 9 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 18 6 -1.</_>\n        <_>\n          0 18 9 3 2.</_>\n        <_>\n          9 21 9 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 19 3 5 -1.</_>\n        <_>\n          1 19 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 20 24 2 -1.</_>\n        <_>\n          6 20 12 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 21 6 3 -1.</_>\n        <_>\n          0 22 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 1 -1.</_>\n        <_>\n          4 0 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 3 -1.</_>\n        <_>\n          4 0 6 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 1 -1.</_>\n        <_>\n          5 0 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 20 1 -1.</_>\n        <_>\n          6 0 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 14 4 -1.</_>\n        <_>\n          1 0 7 2 2.</_>\n        <_>\n          8 2 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 14 8 -1.</_>\n        <_>\n          1 0 7 4 2.</_>\n        <_>\n          8 4 7 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 14 10 -1.</_>\n        <_>\n          1 0 7 5 2.</_>\n        <_>\n          8 5 7 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 3 22 21 -1.</_>\n        <_>\n          12 3 11 21 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 3 14 12 -1.</_>\n        <_>\n          1 6 14 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 5 3 -1.</_>\n        <_>\n          1 5 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 9 3 -1.</_>\n        <_>\n          1 5 9 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 22 2 -1.</_>\n        <_>\n          1 4 11 1 2.</_>\n        <_>\n          12 5 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 22 18 -1.</_>\n        <_>\n          12 4 11 18 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 5 21 6 -1.</_>\n        <_>\n          8 7 7 2 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 5 22 2 -1.</_>\n        <_>\n          1 5 11 1 2.</_>\n        <_>\n          12 6 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 3 -1.</_>\n        <_>\n          1 7 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 22 2 -1.</_>\n        <_>\n          1 6 11 1 2.</_>\n        <_>\n          12 7 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 13 8 -1.</_>\n        <_>\n          1 10 13 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 2 -1.</_>\n        <_>\n          1 7 3 1 2.</_>\n        <_>\n          4 8 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 6 -1.</_>\n        <_>\n          5 9 4 2 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 7 4 9 -1.</_>\n        <_>\n          1 10 4 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 7 21 2 -1.</_>\n        <_>\n          1 8 21 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 8 20 4 -1.</_>\n        <_>\n          1 8 10 2 2.</_>\n        <_>\n          11 10 10 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 8 23 3 -1.</_>\n        <_>\n          1 9 23 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 9 20 2 -1.</_>\n        <_>\n          1 9 10 1 2.</_>\n        <_>\n          11 10 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 9 20 6 -1.</_>\n        <_>\n          1 9 10 3 2.</_>\n        <_>\n          11 12 10 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 9 22 2 -1.</_>\n        <_>\n          1 9 11 1 2.</_>\n        <_>\n          12 10 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 10 4 1 -1.</_>\n        <_>\n          3 10 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 10 22 2 -1.</_>\n        <_>\n          1 10 11 1 2.</_>\n        <_>\n          12 11 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 12 8 1 -1.</_>\n        <_>\n          3 12 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 12 8 12 -1.</_>\n        <_>\n          1 12 4 6 2.</_>\n        <_>\n          5 18 4 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 12 20 2 -1.</_>\n        <_>\n          1 12 10 1 2.</_>\n        <_>\n          11 13 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 13 3 11 -1.</_>\n        <_>\n          2 13 1 11 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 13 22 4 -1.</_>\n        <_>\n          1 13 11 2 2.</_>\n        <_>\n          12 15 11 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 13 19 4 -1.</_>\n        <_>\n          1 15 19 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 14 10 10 -1.</_>\n        <_>\n          1 14 5 5 2.</_>\n        <_>\n          6 19 5 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 14 22 2 -1.</_>\n        <_>\n          1 14 11 1 2.</_>\n        <_>\n          12 15 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 15 3 8 -1.</_>\n        <_>\n          2 15 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 16 3 1 -1.</_>\n        <_>\n          2 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 16 3 3 -1.</_>\n        <_>\n          2 16 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 17 3 1 -1.</_>\n        <_>\n          2 18 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 17 3 7 -1.</_>\n        <_>\n          2 17 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 20 1 -1.</_>\n        <_>\n          7 0 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 12 -1.</_>\n        <_>\n          2 0 7 6 2.</_>\n        <_>\n          9 6 7 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 22 1 -1.</_>\n        <_>\n          13 0 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 3 10 3 -1.</_>\n        <_>\n          2 4 10 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 3 20 2 -1.</_>\n        <_>\n          2 3 10 1 2.</_>\n        <_>\n          12 4 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 3 3 -1.</_>\n        <_>\n          2 5 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 20 2 -1.</_>\n        <_>\n          2 4 10 1 2.</_>\n        <_>\n          12 5 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 22 18 -1.</_>\n        <_>\n          13 4 11 18 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 5 1 3 -1.</_>\n        <_>\n          2 6 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 5 2 2 -1.</_>\n        <_>\n          2 5 1 1 2.</_>\n        <_>\n          3 6 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 5 20 2 -1.</_>\n        <_>\n          2 5 10 1 2.</_>\n        <_>\n          12 6 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 3 3 -1.</_>\n        <_>\n          2 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 20 2 -1.</_>\n        <_>\n          2 6 10 1 2.</_>\n        <_>\n          12 7 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 22 2 -1.</_>\n        <_>\n          2 6 11 1 2.</_>\n        <_>\n          13 7 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 22 6 -1.</_>\n        <_>\n          2 6 11 3 2.</_>\n        <_>\n          13 9 11 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 19 3 -1.</_>\n        <_>\n          2 7 19 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 7 7 3 -1.</_>\n        <_>\n          2 8 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 7 7 4 -1.</_>\n        <_>\n          2 8 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 7 21 4 -1.</_>\n        <_>\n          2 8 21 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 7 21 6 -1.</_>\n        <_>\n          2 9 21 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 5 2 -1.</_>\n        <_>\n          2 8 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 20 3 -1.</_>\n        <_>\n          2 9 20 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 20 8 -1.</_>\n        <_>\n          2 9 10 4 2.</_>\n        <_>\n          12 13 10 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 22 2 -1.</_>\n        <_>\n          2 9 11 1 2.</_>\n        <_>\n          13 10 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 19 3 -1.</_>\n        <_>\n          2 10 19 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 1 -1.</_>\n        <_>\n          3 11 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 10 4 1 -1.</_>\n        <_>\n          4 10 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 10 22 2 -1.</_>\n        <_>\n          2 10 11 1 2.</_>\n        <_>\n          13 11 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 11 3 1 -1.</_>\n        <_>\n          3 12 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 11 22 2 -1.</_>\n        <_>\n          2 11 11 1 2.</_>\n        <_>\n          13 12 11 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 11 11 2 -1.</_>\n        <_>\n          2 11 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 3 -1.</_>\n        <_>\n          2 12 18 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 13 20 4 -1.</_>\n        <_>\n          2 13 10 2 2.</_>\n        <_>\n          12 15 10 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 15 3 7 -1.</_>\n        <_>\n          3 15 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 16 4 1 -1.</_>\n        <_>\n          3 17 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 17 3 5 -1.</_>\n        <_>\n          3 17 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 9 16 -1.</_>\n        <_>\n          6 0 3 16 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 3 -1.</_>\n        <_>\n          3 0 9 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 2 18 2 -1.</_>\n        <_>\n          3 2 9 1 2.</_>\n        <_>\n          12 3 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 1 -1.</_>\n        <_>\n          6 3 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 3 20 3 -1.</_>\n        <_>\n          8 3 10 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 3 18 2 -1.</_>\n        <_>\n          3 3 9 1 2.</_>\n        <_>\n          12 4 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 1 3 -1.</_>\n        <_>\n          3 5 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 5 16 -1.</_>\n        <_>\n          3 8 5 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 18 8 -1.</_>\n        <_>\n          3 4 9 4 2.</_>\n        <_>\n          12 8 9 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 20 19 -1.</_>\n        <_>\n          13 4 10 19 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 20 2 -1.</_>\n        <_>\n          3 5 10 1 2.</_>\n        <_>\n          13 6 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 16 9 -1.</_>\n        <_>\n          3 8 16 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 20 9 -1.</_>\n        <_>\n          3 8 20 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 3 -1.</_>\n        <_>\n          3 7 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 2 -1.</_>\n        <_>\n          3 6 9 1 2.</_>\n        <_>\n          12 7 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 1 -1.</_>\n        <_>\n          4 7 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 2 -1.</_>\n        <_>\n          3 8 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 9 6 -1.</_>\n        <_>\n          6 9 3 2 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 20 2 -1.</_>\n        <_>\n          8 7 10 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 2 -1.</_>\n        <_>\n          3 8 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 7 3 -1.</_>\n        <_>\n          3 8 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 4 -1.</_>\n        <_>\n          3 7 9 2 2.</_>\n        <_>\n          12 9 9 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 19 12 -1.</_>\n        <_>\n          3 11 19 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 8 20 4 -1.</_>\n        <_>\n          3 8 10 2 2.</_>\n        <_>\n          13 10 10 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 3 1 -1.</_>\n        <_>\n          4 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 3 -1.</_>\n        <_>\n          3 10 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 16 2 -1.</_>\n        <_>\n          3 9 8 1 2.</_>\n        <_>\n          11 10 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 20 2 -1.</_>\n        <_>\n          3 9 10 1 2.</_>\n        <_>\n          13 10 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 20 12 -1.</_>\n        <_>\n          3 9 10 6 2.</_>\n        <_>\n          13 15 10 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 3 1 -1.</_>\n        <_>\n          4 11 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 3 2 -1.</_>\n        <_>\n          4 11 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 15 3 -1.</_>\n        <_>\n          3 11 15 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 20 8 -1.</_>\n        <_>\n          3 12 20 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 1 -1.</_>\n        <_>\n          4 12 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 3 -1.</_>\n        <_>\n          4 11 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 4 -1.</_>\n        <_>\n          4 11 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 7 -1.</_>\n        <_>\n          4 11 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 6 2 -1.</_>\n        <_>\n          3 11 3 1 2.</_>\n        <_>\n          6 12 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 8 -1.</_>\n        <_>\n          3 15 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 7 8 -1.</_>\n        <_>\n          3 15 7 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 20 2 -1.</_>\n        <_>\n          3 11 10 1 2.</_>\n        <_>\n          13 12 10 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 20 8 -1.</_>\n        <_>\n          13 11 10 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 12 4 8 -1.</_>\n        <_>\n          5 12 2 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 8 -1.</_>\n        <_>\n          3 16 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 12 18 8 -1.</_>\n        <_>\n          3 16 18 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 3 -1.</_>\n        <_>\n          4 13 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 19 6 -1.</_>\n        <_>\n          3 16 19 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 14 6 10 -1.</_>\n        <_>\n          3 14 3 5 2.</_>\n        <_>\n          6 19 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 2 -1.</_>\n        <_>\n          6 15 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 16 4 1 -1.</_>\n        <_>\n          4 17 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 20 3 3 -1.</_>\n        <_>\n          4 20 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 20 -1.</_>\n        <_>\n          4 10 16 10 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 8 13 -1.</_>\n        <_>\n          6 2 4 13 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 16 1 -1.</_>\n        <_>\n          4 2 8 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 8 -1.</_>\n        <_>\n          4 7 16 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 2 4 -1.</_>\n        <_>\n          4 6 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 2 -1.</_>\n        <_>\n          4 4 8 1 2.</_>\n        <_>\n          12 5 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 18 2 -1.</_>\n        <_>\n          4 4 9 1 2.</_>\n        <_>\n          13 5 9 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 10 6 -1.</_>\n        <_>\n          4 7 10 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 17 6 -1.</_>\n        <_>\n          4 7 17 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 1 3 -1.</_>\n        <_>\n          4 6 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 3 3 -1.</_>\n        <_>\n          5 6 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 17 6 -1.</_>\n        <_>\n          4 8 17 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 1 3 -1.</_>\n        <_>\n          4 7 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 3 -1.</_>\n        <_>\n          4 7 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 3 -1.</_>\n        <_>\n          4 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 9 -1.</_>\n        <_>\n          4 9 4 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 2 -1.</_>\n        <_>\n          4 6 8 1 2.</_>\n        <_>\n          12 7 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 6 -1.</_>\n        <_>\n          4 6 8 3 2.</_>\n        <_>\n          12 9 8 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 20 18 -1.</_>\n        <_>\n          14 6 10 18 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 15 6 -1.</_>\n        <_>\n          4 8 15 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 4 -1.</_>\n        <_>\n          4 7 16 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 4 -1.</_>\n        <_>\n          4 8 16 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 6 -1.</_>\n        <_>\n          6 9 2 2 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 5 4 -1.</_>\n        <_>\n          3 8 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 5 6 -1.</_>\n        <_>\n          4 9 5 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 16 6 -1.</_>\n        <_>\n          4 7 8 3 2.</_>\n        <_>\n          12 10 8 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 16 6 -1.</_>\n        <_>\n          4 9 16 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 17 6 -1.</_>\n        <_>\n          4 9 17 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 18 2 -1.</_>\n        <_>\n          4 8 18 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 2 -1.</_>\n        <_>\n          4 8 1 1 2.</_>\n        <_>\n          5 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 3 -1.</_>\n        <_>\n          5 9 1 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 3 -1.</_>\n        <_>\n          4 9 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 4 4 -1.</_>\n        <_>\n          3 9 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 14 2 -1.</_>\n        <_>\n          4 8 7 1 2.</_>\n        <_>\n          11 9 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 7 4 -1.</_>\n        <_>\n          3 9 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 2 -1.</_>\n        <_>\n          4 8 8 1 2.</_>\n        <_>\n          12 9 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 9 4 -1.</_>\n        <_>\n          4 8 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 19 12 -1.</_>\n        <_>\n          4 12 19 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 1 -1.</_>\n        <_>\n          5 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 2 -1.</_>\n        <_>\n          4 9 1 1 2.</_>\n        <_>\n          5 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 2 -1.</_>\n        <_>\n          5 9 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 2 -1.</_>\n        <_>\n          5 10 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 6 -1.</_>\n        <_>\n          4 11 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 16 2 -1.</_>\n        <_>\n          4 9 8 1 2.</_>\n        <_>\n          12 10 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 2 -1.</_>\n        <_>\n          4 10 1 1 2.</_>\n        <_>\n          5 11 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 3 1 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 3 2 -1.</_>\n        <_>\n          5 11 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 4 -1.</_>\n        <_>\n          3 11 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 9 4 -1.</_>\n        <_>\n          4 10 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 10 4 -1.</_>\n        <_>\n          4 10 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 2 -1.</_>\n        <_>\n          5 11 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 6 -1.</_>\n        <_>\n          5 11 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 2 -1.</_>\n        <_>\n          4 11 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 10 -1.</_>\n        <_>\n          4 16 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 7 2 -1.</_>\n        <_>\n          4 11 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 9 4 -1.</_>\n        <_>\n          4 11 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 3 1 -1.</_>\n        <_>\n          5 12 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 3 3 -1.</_>\n        <_>\n          5 12 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 6 -1.</_>\n        <_>\n          4 15 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 16 2 -1.</_>\n        <_>\n          4 12 8 1 2.</_>\n        <_>\n          12 13 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 13 4 4 -1.</_>\n        <_>\n          6 13 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 13 10 10 -1.</_>\n        <_>\n          4 13 5 5 2.</_>\n        <_>\n          9 18 5 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 14 4 2 -1.</_>\n        <_>\n          6 14 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 14 5 4 -1.</_>\n        <_>\n          3 15 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 15 4 3 -1.</_>\n        <_>\n          6 15 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 19 3 4 -1.</_>\n        <_>\n          5 19 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 1 -1.</_>\n        <_>\n          12 0 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 8 -1.</_>\n        <_>\n          5 5 10 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 1 12 10 -1.</_>\n        <_>\n          5 6 12 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 3 14 2 -1.</_>\n        <_>\n          5 3 7 1 2.</_>\n        <_>\n          12 4 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 3 7 4 -1.</_>\n        <_>\n          4 4 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 2 -1.</_>\n        <_>\n          5 4 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 14 6 -1.</_>\n        <_>\n          5 4 7 3 2.</_>\n        <_>\n          12 7 7 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 4 -1.</_>\n        <_>\n          4 5 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 18 8 -1.</_>\n        <_>\n          5 4 9 4 2.</_>\n        <_>\n          14 8 9 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 1 3 -1.</_>\n        <_>\n          4 6 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 2 -1.</_>\n        <_>\n          5 5 7 1 2.</_>\n        <_>\n          12 6 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 4 -1.</_>\n        <_>\n          5 5 7 2 2.</_>\n        <_>\n          12 7 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 6 -1.</_>\n        <_>\n          5 7 14 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 9 -1.</_>\n        <_>\n          5 8 14 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 6 15 8 -1.</_>\n        <_>\n          5 8 15 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 6 16 6 -1.</_>\n        <_>\n          5 8 16 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 1 3 -1.</_>\n        <_>\n          5 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 6 -1.</_>\n        <_>\n          6 9 1 2 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 7 -1.</_>\n        <_>\n          7 7 2 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 3 -1.</_>\n        <_>\n          5 8 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 6 -1.</_>\n        <_>\n          5 9 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 6 -1.</_>\n        <_>\n          5 9 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 5 4 -1.</_>\n        <_>\n          4 8 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 6 -1.</_>\n        <_>\n          5 9 15 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 1 3 -1.</_>\n        <_>\n          5 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 2 -1.</_>\n        <_>\n          5 8 1 1 2.</_>\n        <_>\n          6 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 3 -1.</_>\n        <_>\n          4 9 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 4 -1.</_>\n        <_>\n          5 9 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 3 -1.</_>\n        <_>\n          4 9 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 14 2 -1.</_>\n        <_>\n          5 8 7 1 2.</_>\n        <_>\n          12 9 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 13 2 -1.</_>\n        <_>\n          5 9 13 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 15 4 -1.</_>\n        <_>\n          5 9 15 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 4 -1.</_>\n        <_>\n          7 9 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 15 2 -1.</_>\n        <_>\n          10 9 5 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 14 2 -1.</_>\n        <_>\n          5 9 7 1 2.</_>\n        <_>\n          12 10 7 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 14 6 -1.</_>\n        <_>\n          5 9 7 3 2.</_>\n        <_>\n          12 12 7 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 16 2 -1.</_>\n        <_>\n          5 9 8 1 2.</_>\n        <_>\n          13 10 8 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 2 -1.</_>\n        <_>\n          5 10 1 1 2.</_>\n        <_>\n          6 11 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 4 -1.</_>\n        <_>\n          6 10 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 4 -1.</_>\n        <_>\n          9 10 4 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 17 4 -1.</_>\n        <_>\n          5 11 17 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          6 11 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 2 -1.</_>\n        <_>\n          5 12 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 9 4 -1.</_>\n        <_>\n          5 11 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 14 3 3 -1.</_>\n        <_>\n          6 15 1 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 4 2 -1.</_>\n        <_>\n          6 16 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 8 5 -1.</_>\n        <_>\n          7 15 4 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 5 3 -1.</_>\n        <_>\n          4 16 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 16 4 3 -1.</_>\n        <_>\n          5 17 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 16 6 2 -1.</_>\n        <_>\n          5 16 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 17 3 1 -1.</_>\n        <_>\n          6 18 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 20 3 1 -1.</_>\n        <_>\n          6 21 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 20 3 3 -1.</_>\n        <_>\n          6 20 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 20 8 3 -1.</_>\n        <_>\n          9 20 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 4 -1.</_>\n        <_>\n          6 1 10 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 11 -1.</_>\n        <_>\n          8 1 2 11 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 2 -1.</_>\n        <_>\n          6 1 6 1 2.</_>\n        <_>\n          12 2 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 2 7 8 -1.</_>\n        <_>\n          6 6 7 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 1 3 -1.</_>\n        <_>\n          5 4 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 1 -1.</_>\n        <_>\n          7 4 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 1 -1.</_>\n        <_>\n          8 3 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 4 -1.</_>\n        <_>\n          6 4 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 1 3 -1.</_>\n        <_>\n          5 6 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 2 -1.</_>\n        <_>\n          7 5 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 9 -1.</_>\n        <_>\n          6 8 2 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 2 -1.</_>\n        <_>\n          6 5 6 1 2.</_>\n        <_>\n          12 6 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 3 3 -1.</_>\n        <_>\n          5 7 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 2 -1.</_>\n        <_>\n          6 6 6 1 2.</_>\n        <_>\n          12 7 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 15 4 -1.</_>\n        <_>\n          6 7 15 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 2 -1.</_>\n        <_>\n          6 8 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 3 -1.</_>\n        <_>\n          6 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 2 -1.</_>\n        <_>\n          6 7 6 1 2.</_>\n        <_>\n          12 8 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 12 -1.</_>\n        <_>\n          6 13 9 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 13 15 -1.</_>\n        <_>\n          6 12 13 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 3 -1.</_>\n        <_>\n          6 9 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 2 -1.</_>\n        <_>\n          6 8 6 1 2.</_>\n        <_>\n          12 9 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 12 -1.</_>\n        <_>\n          6 11 12 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 2 -1.</_>\n        <_>\n          6 9 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 3 6 -1.</_>\n        <_>\n          7 10 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 3 -1.</_>\n        <_>\n          6 10 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 4 -1.</_>\n        <_>\n          6 10 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 1 -1.</_>\n        <_>\n          9 9 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 2 -1.</_>\n        <_>\n          9 9 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 3 -1.</_>\n        <_>\n          9 9 6 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 2 -1.</_>\n        <_>\n          10 9 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 2 -1.</_>\n        <_>\n          6 9 6 1 2.</_>\n        <_>\n          12 10 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 1 2 -1.</_>\n        <_>\n          6 11 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 1 3 -1.</_>\n        <_>\n          6 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 1 -1.</_>\n        <_>\n          7 11 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 2 -1.</_>\n        <_>\n          7 10 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 3 -1.</_>\n        <_>\n          7 10 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 3 -1.</_>\n        <_>\n          6 11 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 12 1 -1.</_>\n        <_>\n          9 10 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 4 -1.</_>\n        <_>\n          9 10 3 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 6 -1.</_>\n        <_>\n          4 12 4 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 12 2 -1.</_>\n        <_>\n          6 10 6 1 2.</_>\n        <_>\n          12 11 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 3 -1.</_>\n        <_>\n          6 12 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 6 -1.</_>\n        <_>\n          9 11 6 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 11 13 2 -1.</_>\n        <_>\n          6 12 13 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 14 6 4 -1.</_>\n        <_>\n          5 15 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 15 6 3 -1.</_>\n        <_>\n          6 15 3 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 15 5 4 -1.</_>\n        <_>\n          5 16 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 3 -1.</_>\n        <_>\n          7 17 1 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 16 11 8 -1.</_>\n        <_>\n          6 18 11 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 17 4 2 -1.</_>\n        <_>\n          7 18 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 19 3 3 -1.</_>\n        <_>\n          7 19 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 20 3 1 -1.</_>\n        <_>\n          7 21 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 20 7 4 -1.</_>\n        <_>\n          6 22 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 1 -1.</_>\n        <_>\n          12 0 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 10 -1.</_>\n        <_>\n          7 5 9 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 12 -1.</_>\n        <_>\n          10 5 3 4 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 1 3 -1.</_>\n        <_>\n          7 3 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 1 3 -1.</_>\n        <_>\n          6 3 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 11 10 -1.</_>\n        <_>\n          7 7 11 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 1 3 -1.</_>\n        <_>\n          6 4 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 1 6 -1.</_>\n        <_>\n          5 5 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 10 2 -1.</_>\n        <_>\n          7 4 5 1 2.</_>\n        <_>\n          12 5 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 2 -1.</_>\n        <_>\n          8 5 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 2 3 -1.</_>\n        <_>\n          8 5 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 3 -1.</_>\n        <_>\n          8 5 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 6 -1.</_>\n        <_>\n          8 5 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 9 17 -1.</_>\n        <_>\n          10 5 3 17 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 4 -1.</_>\n        <_>\n          6 6 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 5 3 -1.</_>\n        <_>\n          7 6 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 2 -1.</_>\n        <_>\n          7 6 5 1 2.</_>\n        <_>\n          12 7 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 4 -1.</_>\n        <_>\n          6 7 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 4 -1.</_>\n        <_>\n          8 8 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 2 4 -1.</_>\n        <_>\n          7 9 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 5 6 -1.</_>\n        <_>\n          5 9 5 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 4 -1.</_>\n        <_>\n          6 8 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 12 -1.</_>\n        <_>\n          7 13 6 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 2 -1.</_>\n        <_>\n          7 8 1 1 2.</_>\n        <_>\n          8 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 4 -1.</_>\n        <_>\n          8 8 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 4 -1.</_>\n        <_>\n          7 9 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 2 -1.</_>\n        <_>\n          7 8 5 1 2.</_>\n        <_>\n          12 9 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 1 2 -1.</_>\n        <_>\n          7 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 3 -1.</_>\n        <_>\n          9 9 2 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 10 -1.</_>\n        <_>\n          7 9 3 5 2.</_>\n        <_>\n          10 14 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 12 2 -1.</_>\n        <_>\n          11 9 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 2 -1.</_>\n        <_>\n          7 9 5 1 2.</_>\n        <_>\n          12 10 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 4 -1.</_>\n        <_>\n          7 9 5 2 2.</_>\n        <_>\n          12 11 5 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 1 -1.</_>\n        <_>\n          8 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 1 3 -1.</_>\n        <_>\n          7 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 4 3 -1.</_>\n        <_>\n          8 10 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 3 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 4 4 -1.</_>\n        <_>\n          9 10 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 4 -1.</_>\n        <_>\n          9 10 2 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 8 -1.</_>\n        <_>\n          7 10 3 4 2.</_>\n        <_>\n          10 14 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 12 5 -1.</_>\n        <_>\n          11 10 4 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 10 10 2 -1.</_>\n        <_>\n          7 10 5 1 2.</_>\n        <_>\n          12 11 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 11 3 12 -1.</_>\n        <_>\n          8 11 1 12 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 13 9 3 -1.</_>\n        <_>\n          10 13 3 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 14 1 3 -1.</_>\n        <_>\n          7 15 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 17 3 1 -1.</_>\n        <_>\n          8 18 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 17 4 2 -1.</_>\n        <_>\n          8 18 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 17 5 2 -1.</_>\n        <_>\n          7 17 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 18 3 6 -1.</_>\n        <_>\n          8 18 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 20 3 1 -1.</_>\n        <_>\n          8 21 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 20 7 4 -1.</_>\n        <_>\n          7 22 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 5 4 -1.</_>\n        <_>\n          8 2 5 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 7 10 -1.</_>\n        <_>\n          8 5 7 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 16 10 -1.</_>\n        <_>\n          8 0 8 5 2.</_>\n        <_>\n          16 5 8 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 16 12 -1.</_>\n        <_>\n          8 0 8 6 2.</_>\n        <_>\n          16 6 8 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 10 -1.</_>\n        <_>\n          8 5 9 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 6 -1.</_>\n        <_>\n          8 1 3 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 2 -1.</_>\n        <_>\n          12 1 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 16 6 -1.</_>\n        <_>\n          6 3 16 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 2 -1.</_>\n        <_>\n          8 2 4 1 2.</_>\n        <_>\n          12 3 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 3 2 6 -1.</_>\n        <_>\n          6 5 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 9 -1.</_>\n        <_>\n          9 4 1 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 3 -1.</_>\n        <_>\n          8 5 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 2 -1.</_>\n        <_>\n          8 4 4 1 2.</_>\n        <_>\n          12 5 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 1 -1.</_>\n        <_>\n          8 5 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 2 -1.</_>\n        <_>\n          9 5 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 3 -1.</_>\n        <_>\n          9 5 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 4 -1.</_>\n        <_>\n          9 5 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 5 -1.</_>\n        <_>\n          9 5 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 6 -1.</_>\n        <_>\n          9 5 1 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 6 -1.</_>\n        <_>\n          9 5 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 7 -1.</_>\n        <_>\n          9 5 1 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 7 -1.</_>\n        <_>\n          9 5 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 6 -1.</_>\n        <_>\n          6 7 4 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 5 3 -1.</_>\n        <_>\n          7 6 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 2 -1.</_>\n        <_>\n          8 6 2 1 2.</_>\n        <_>\n          10 7 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 2 -1.</_>\n        <_>\n          8 6 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 3 -1.</_>\n        <_>\n          7 7 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 4 -1.</_>\n        <_>\n          7 7 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 5 4 -1.</_>\n        <_>\n          7 7 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 10 2 -1.</_>\n        <_>\n          8 6 10 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          7 8 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 4 -1.</_>\n        <_>\n          7 8 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 2 -1.</_>\n        <_>\n          8 7 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 3 -1.</_>\n        <_>\n          7 8 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 5 2 -1.</_>\n        <_>\n          8 7 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 8 4 -1.</_>\n        <_>\n          7 8 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 8 2 2 -1.</_>\n        <_>\n          8 8 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 8 2 3 -1.</_>\n        <_>\n          7 9 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 8 8 5 -1.</_>\n        <_>\n          10 10 4 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 3 -1.</_>\n        <_>\n          9 9 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 9 10 2 -1.</_>\n        <_>\n          8 9 5 1 2.</_>\n        <_>\n          13 10 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 2 1 -1.</_>\n        <_>\n          9 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 1 -1.</_>\n        <_>\n          9 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 2 2 -1.</_>\n        <_>\n          9 10 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 8 -1.</_>\n        <_>\n          8 10 2 4 2.</_>\n        <_>\n          10 14 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 8 2 -1.</_>\n        <_>\n          8 10 4 1 2.</_>\n        <_>\n          12 11 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 5 -1.</_>\n        <_>\n          10 11 2 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 10 -1.</_>\n        <_>\n          8 11 2 5 2.</_>\n        <_>\n          10 16 2 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 13 7 4 -1.</_>\n        <_>\n          8 13 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 16 8 3 -1.</_>\n        <_>\n          10 16 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 16 9 3 -1.</_>\n        <_>\n          11 16 3 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 7 -1.</_>\n        <_>\n          9 17 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 17 8 2 -1.</_>\n        <_>\n          10 17 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 17 9 1 -1.</_>\n        <_>\n          11 17 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 17 9 7 -1.</_>\n        <_>\n          11 17 3 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 17 8 6 -1.</_>\n        <_>\n          8 20 8 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 17 9 6 -1.</_>\n        <_>\n          8 19 9 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          9 19 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 6 -1.</_>\n        <_>\n          9 18 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 18 8 6 -1.</_>\n        <_>\n          8 20 8 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 19 3 1 -1.</_>\n        <_>\n          9 20 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 19 8 3 -1.</_>\n        <_>\n          8 20 8 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 20 8 4 -1.</_>\n        <_>\n          8 21 8 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 2 -1.</_>\n        <_>\n          9 1 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 1 -1.</_>\n        <_>\n          12 0 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          9 0 3 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 2 -1.</_>\n        <_>\n          9 1 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 8 -1.</_>\n        <_>\n          9 4 6 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 7 4 -1.</_>\n        <_>\n          9 2 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 11 4 -1.</_>\n        <_>\n          9 1 11 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 2 3 -1.</_>\n        <_>\n          10 1 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 2 6 -1.</_>\n        <_>\n          9 1 1 3 2.</_>\n        <_>\n          10 4 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 2 -1.</_>\n        <_>\n          9 1 3 1 2.</_>\n        <_>\n          12 2 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 4 -1.</_>\n        <_>\n          8 2 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 4 -1.</_>\n        <_>\n          10 2 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 8 -1.</_>\n        <_>\n          11 2 2 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 3 1 6 -1.</_>\n        <_>\n          7 5 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 9 -1.</_>\n        <_>\n          10 4 1 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 8 2 -1.</_>\n        <_>\n          9 4 4 1 2.</_>\n        <_>\n          13 5 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 1 -1.</_>\n        <_>\n          9 5 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 4 -1.</_>\n        <_>\n          10 5 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 9 -1.</_>\n        <_>\n          10 6 1 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 3 -1.</_>\n        <_>\n          8 6 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 6 -1.</_>\n        <_>\n          7 8 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 3 -1.</_>\n        <_>\n          9 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 1 2 -1.</_>\n        <_>\n          9 7 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          9 7 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          9 7 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 4 -1.</_>\n        <_>\n          8 8 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          8 8 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 5 -1.</_>\n        <_>\n          11 10 2 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 3 -1.</_>\n        <_>\n          9 9 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 7 -1.</_>\n        <_>\n          10 9 1 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 3 -1.</_>\n        <_>\n          9 10 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 9 15 2 -1.</_>\n        <_>\n          9 10 15 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 10 4 8 -1.</_>\n        <_>\n          10 10 2 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 11 4 3 -1.</_>\n        <_>\n          9 12 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 12 4 8 -1.</_>\n        <_>\n          9 12 2 4 2.</_>\n        <_>\n          11 16 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 12 9 4 -1.</_>\n        <_>\n          12 12 3 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 16 4 1 -1.</_>\n        <_>\n          11 16 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 4 -1.</_>\n        <_>\n          11 16 2 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 4 -1.</_>\n        <_>\n          9 17 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 2 -1.</_>\n        <_>\n          11 17 2 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 3 -1.</_>\n        <_>\n          10 19 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 19 3 2 -1.</_>\n        <_>\n          10 20 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 19 3 5 -1.</_>\n        <_>\n          10 19 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 19 6 4 -1.</_>\n        <_>\n          9 20 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 20 3 1 -1.</_>\n        <_>\n          10 21 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 20 5 4 -1.</_>\n        <_>\n          9 21 5 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 20 5 4 -1.</_>\n        <_>\n          9 22 5 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 20 6 3 -1.</_>\n        <_>\n          9 21 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 20 12 2 -1.</_>\n        <_>\n          15 20 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 20 7 3 -1.</_>\n        <_>\n          9 21 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 20 7 4 -1.</_>\n        <_>\n          9 21 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 21 3 3 -1.</_>\n        <_>\n          10 21 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 21 4 3 -1.</_>\n        <_>\n          10 21 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 22 3 2 -1.</_>\n        <_>\n          10 22 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 1 2 -1.</_>\n        <_>\n          10 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 2 -1.</_>\n        <_>\n          10 0 2 1 2.</_>\n        <_>\n          12 1 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 8 -1.</_>\n        <_>\n          12 2 2 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 10 -1.</_>\n        <_>\n          10 0 3 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 14 10 -1.</_>\n        <_>\n          10 0 7 5 2.</_>\n        <_>\n          17 5 7 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 1 -1.</_>\n        <_>\n          12 1 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 9 9 -1.</_>\n        <_>\n          13 4 3 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 12 2 -1.</_>\n        <_>\n          14 1 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 14 8 -1.</_>\n        <_>\n          10 1 7 4 2.</_>\n        <_>\n          17 5 7 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 2 1 6 -1.</_>\n        <_>\n          8 4 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 2 10 10 -1.</_>\n        <_>\n          10 7 10 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 2 12 -1.</_>\n        <_>\n          11 3 1 12 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 9 3 -1.</_>\n        <_>\n          13 4 3 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 14 2 -1.</_>\n        <_>\n          17 3 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 3 4 -1.</_>\n        <_>\n          11 4 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 3 5 -1.</_>\n        <_>\n          11 4 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 3 6 -1.</_>\n        <_>\n          11 4 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 10 -1.</_>\n        <_>\n          12 4 2 10 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 9 3 -1.</_>\n        <_>\n          13 4 3 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 5 2 6 -1.</_>\n        <_>\n          11 5 1 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 3 -1.</_>\n        <_>\n          10 6 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 5 14 9 -1.</_>\n        <_>\n          10 8 14 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 3 3 -1.</_>\n        <_>\n          11 6 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 2 4 -1.</_>\n        <_>\n          11 6 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 2 3 -1.</_>\n        <_>\n          10 7 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 3 3 -1.</_>\n        <_>\n          10 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 3 4 -1.</_>\n        <_>\n          10 6 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 7 -1.</_>\n        <_>\n          13 6 3 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 3 -1.</_>\n        <_>\n          10 7 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 2 3 -1.</_>\n        <_>\n          10 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 6 -1.</_>\n        <_>\n          12 9 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 3 -1.</_>\n        <_>\n          10 8 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 4 -1.</_>\n        <_>\n          12 10 2 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 10 -1.</_>\n        <_>\n          12 10 2 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 1 3 -1.</_>\n        <_>\n          9 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 2 7 -1.</_>\n        <_>\n          11 9 1 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 2 3 -1.</_>\n        <_>\n          9 10 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 8 6 -1.</_>\n        <_>\n          12 9 4 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 3 -1.</_>\n        <_>\n          10 10 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 1 3 -1.</_>\n        <_>\n          10 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 4 5 -1.</_>\n        <_>\n          11 11 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 2 3 -1.</_>\n        <_>\n          10 11 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 7 -1.</_>\n        <_>\n          12 12 2 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 3 -1.</_>\n        <_>\n          9 11 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 15 4 2 -1.</_>\n        <_>\n          11 15 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 3 -1.</_>\n        <_>\n          12 15 2 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 15 5 3 -1.</_>\n        <_>\n          10 16 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 18 5 4 -1.</_>\n        <_>\n          10 19 5 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 19 4 4 -1.</_>\n        <_>\n          10 20 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 3 4 -1.</_>\n        <_>\n          11 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 3 4 -1.</_>\n        <_>\n          10 21 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 20 7 4 -1.</_>\n        <_>\n          10 22 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 21 3 1 -1.</_>\n        <_>\n          11 21 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 22 3 1 -1.</_>\n        <_>\n          11 22 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 22 3 2 -1.</_>\n        <_>\n          11 22 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 23 3 1 -1.</_>\n        <_>\n          11 23 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 12 10 -1.</_>\n        <_>\n          11 0 6 5 2.</_>\n        <_>\n          17 5 6 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 6 -1.</_>\n        <_>\n          12 1 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 1 -1.</_>\n        <_>\n          13 1 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 7 10 -1.</_>\n        <_>\n          11 6 7 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 4 -1.</_>\n        <_>\n          12 2 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 11 -1.</_>\n        <_>\n          12 2 1 11 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 14 -1.</_>\n        <_>\n          13 2 2 14 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 22 -1.</_>\n        <_>\n          13 2 2 22 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 5 -1.</_>\n        <_>\n          12 3 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 2 3 -1.</_>\n        <_>\n          11 4 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 9 -1.</_>\n        <_>\n          13 6 2 3 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 3 -1.</_>\n        <_>\n          11 5 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 3 -1.</_>\n        <_>\n          11 5 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 8 -1.</_>\n        <_>\n          11 4 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 2 -1.</_>\n        <_>\n          12 5 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 6 -1.</_>\n        <_>\n          12 5 2 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 5 -1.</_>\n        <_>\n          12 6 2 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 3 -1.</_>\n        <_>\n          11 7 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 3 -1.</_>\n        <_>\n          11 7 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 8 -1.</_>\n        <_>\n          11 6 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 5 3 -1.</_>\n        <_>\n          11 7 5 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 3 -1.</_>\n        <_>\n          11 7 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 7 1 3 -1.</_>\n        <_>\n          11 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 7 2 3 -1.</_>\n        <_>\n          11 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 9 -1.</_>\n        <_>\n          13 7 2 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 1 3 -1.</_>\n        <_>\n          11 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 2 3 -1.</_>\n        <_>\n          11 9 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 6 9 -1.</_>\n        <_>\n          13 10 2 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 2 -1.</_>\n        <_>\n          11 9 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 3 -1.</_>\n        <_>\n          11 9 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 9 1 3 -1.</_>\n        <_>\n          11 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 4 -1.</_>\n        <_>\n          13 10 2 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 3 -1.</_>\n        <_>\n          11 11 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 11 1 3 -1.</_>\n        <_>\n          11 12 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 12 9 9 -1.</_>\n        <_>\n          14 15 3 3 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 2 -1.</_>\n        <_>\n          13 14 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 16 4 8 -1.</_>\n        <_>\n          11 18 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 18 12 6 -1.</_>\n        <_>\n          11 18 6 3 2.</_>\n        <_>\n          17 21 6 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 20 3 1 -1.</_>\n        <_>\n          12 20 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 20 3 4 -1.</_>\n        <_>\n          12 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 20 4 4 -1.</_>\n        <_>\n          11 22 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 21 3 1 -1.</_>\n        <_>\n          12 21 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 21 3 3 -1.</_>\n        <_>\n          12 21 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 22 4 2 -1.</_>\n        <_>\n          12 22 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 12 2 -1.</_>\n        <_>\n          15 0 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 6 -1.</_>\n        <_>\n          12 0 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 12 10 -1.</_>\n        <_>\n          12 0 6 5 2.</_>\n        <_>\n          18 5 6 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 10 -1.</_>\n        <_>\n          13 1 2 10 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 2 2 3 -1.</_>\n        <_>\n          12 3 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 8 3 -1.</_>\n        <_>\n          14 3 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 9 3 -1.</_>\n        <_>\n          12 4 9 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 2 3 -1.</_>\n        <_>\n          12 5 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 2 2 -1.</_>\n        <_>\n          13 5 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 2 -1.</_>\n        <_>\n          13 5 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 2 5 -1.</_>\n        <_>\n          13 5 1 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 6 -1.</_>\n        <_>\n          13 5 2 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 7 -1.</_>\n        <_>\n          14 5 2 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 8 -1.</_>\n        <_>\n          12 5 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 1 4 -1.</_>\n        <_>\n          12 7 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 1 8 -1.</_>\n        <_>\n          12 6 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 2 10 -1.</_>\n        <_>\n          13 6 1 10 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 8 1 -1.</_>\n        <_>\n          12 6 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 1 3 -1.</_>\n        <_>\n          12 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 3 -1.</_>\n        <_>\n          12 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 3 -1.</_>\n        <_>\n          12 8 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 8 1 3 -1.</_>\n        <_>\n          12 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 8 2 3 -1.</_>\n        <_>\n          12 9 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 8 -1.</_>\n        <_>\n          12 8 3 4 2.</_>\n        <_>\n          15 12 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 9 1 3 -1.</_>\n        <_>\n          12 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 9 2 3 -1.</_>\n        <_>\n          12 10 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 10 -1.</_>\n        <_>\n          12 10 2 5 2.</_>\n        <_>\n          14 15 2 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 10 3 3 -1.</_>\n        <_>\n          12 11 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 11 4 8 -1.</_>\n        <_>\n          12 11 2 4 2.</_>\n        <_>\n          14 15 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 16 4 4 -1.</_>\n        <_>\n          14 16 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 17 6 6 -1.</_>\n        <_>\n          12 20 6 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 18 3 4 -1.</_>\n        <_>\n          12 19 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 19 3 4 -1.</_>\n        <_>\n          13 19 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 21 3 3 -1.</_>\n        <_>\n          13 21 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 2 -1.</_>\n        <_>\n          14 2 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 6 -1.</_>\n        <_>\n          13 2 1 3 2.</_>\n        <_>\n          14 5 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 10 -1.</_>\n        <_>\n          14 2 1 10 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 14 -1.</_>\n        <_>\n          14 2 1 14 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 8 6 -1.</_>\n        <_>\n          15 2 4 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 7 -1.</_>\n        <_>\n          15 2 2 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 3 4 8 -1.</_>\n        <_>\n          14 3 2 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 7 -1.</_>\n        <_>\n          14 4 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 4 8 2 -1.</_>\n        <_>\n          15 4 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 3 -1.</_>\n        <_>\n          13 5 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 6 -1.</_>\n        <_>\n          15 5 2 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 6 1 3 -1.</_>\n        <_>\n          13 7 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 6 6 6 -1.</_>\n        <_>\n          15 6 2 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 7 1 3 -1.</_>\n        <_>\n          13 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 7 1 8 -1.</_>\n        <_>\n          13 7 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 7 9 6 -1.</_>\n        <_>\n          16 9 3 2 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 2 -1.</_>\n        <_>\n          13 7 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 5 -1.</_>\n        <_>\n          15 8 2 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 8 -1.</_>\n        <_>\n          13 8 3 4 2.</_>\n        <_>\n          16 12 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 9 3 3 -1.</_>\n        <_>\n          14 9 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 3 -1.</_>\n        <_>\n          13 10 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 10 3 2 -1.</_>\n        <_>\n          14 10 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 11 4 8 -1.</_>\n        <_>\n          13 11 2 4 2.</_>\n        <_>\n          15 15 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 12 8 5 -1.</_>\n        <_>\n          15 12 4 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 13 7 3 -1.</_>\n        <_>\n          13 14 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 14 4 1 -1.</_>\n        <_>\n          14 14 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 17 3 7 -1.</_>\n        <_>\n          14 17 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 21 3 3 -1.</_>\n        <_>\n          14 21 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 22 3 2 -1.</_>\n        <_>\n          14 22 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 6 -1.</_>\n        <_>\n          14 0 5 3 2.</_>\n        <_>\n          19 3 5 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 10 -1.</_>\n        <_>\n          14 0 5 5 2.</_>\n        <_>\n          19 5 5 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 9 -1.</_>\n        <_>\n          11 3 10 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 1 1 8 -1.</_>\n        <_>\n          14 5 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 2 10 2 -1.</_>\n        <_>\n          19 2 5 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 3 2 8 -1.</_>\n        <_>\n          15 3 1 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 3 3 -1.</_>\n        <_>\n          15 4 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 3 4 -1.</_>\n        <_>\n          15 4 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 8 3 -1.</_>\n        <_>\n          14 5 8 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 3 -1.</_>\n        <_>\n          15 5 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 5 -1.</_>\n        <_>\n          15 5 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 5 -1.</_>\n        <_>\n          15 6 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 17 -1.</_>\n        <_>\n          16 6 2 17 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 6 8 2 -1.</_>\n        <_>\n          14 6 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 7 4 3 -1.</_>\n        <_>\n          15 7 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 6 -1.</_>\n        <_>\n          16 9 2 2 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 3 -1.</_>\n        <_>\n          16 9 2 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 1 -1.</_>\n        <_>\n          14 8 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 2 -1.</_>\n        <_>\n          14 8 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 9 4 1 -1.</_>\n        <_>\n          16 9 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 6 -1.</_>\n        <_>\n          12 11 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 3 1 -1.</_>\n        <_>\n          15 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 2 -1.</_>\n        <_>\n          15 10 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 6 -1.</_>\n        <_>\n          14 10 1 3 2.</_>\n        <_>\n          15 13 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 15 1 2 -1.</_>\n        <_>\n          14 15 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 16 8 8 -1.</_>\n        <_>\n          14 16 4 4 2.</_>\n        <_>\n          18 20 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 17 9 3 -1.</_>\n        <_>\n          14 18 9 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 20 3 4 -1.</_>\n        <_>\n          15 20 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 1 -1.</_>\n        <_>\n          16 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 13 -1.</_>\n        <_>\n          16 1 2 13 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 4 -1.</_>\n        <_>\n          15 3 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 2 -1.</_>\n        <_>\n          15 3 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 5 3 2 -1.</_>\n        <_>\n          16 5 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 5 3 3 -1.</_>\n        <_>\n          16 5 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 5 2 7 -1.</_>\n        <_>\n          16 5 1 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 2 -1.</_>\n        <_>\n          15 5 2 1 2.</_>\n        <_>\n          17 6 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 5 5 6 -1.</_>\n        <_>\n          15 7 5 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 6 3 2 -1.</_>\n        <_>\n          16 7 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 6 3 5 -1.</_>\n        <_>\n          16 6 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 7 5 6 -1.</_>\n        <_>\n          15 9 5 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 8 2 2 -1.</_>\n        <_>\n          15 8 1 1 2.</_>\n        <_>\n          16 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 16 -1.</_>\n        <_>\n          15 12 3 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 8 4 4 -1.</_>\n        <_>\n          15 9 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 3 -1.</_>\n        <_>\n          16 10 1 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 1 -1.</_>\n        <_>\n          16 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 9 1 10 -1.</_>\n        <_>\n          15 14 1 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 1 -1.</_>\n        <_>\n          16 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 10 3 1 -1.</_>\n        <_>\n          16 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 10 3 5 -1.</_>\n        <_>\n          16 10 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 10 4 4 -1.</_>\n        <_>\n          14 11 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 11 7 4 -1.</_>\n        <_>\n          14 12 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 12 6 6 -1.</_>\n        <_>\n          17 14 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 13 3 4 -1.</_>\n        <_>\n          16 14 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 13 3 11 -1.</_>\n        <_>\n          16 13 1 11 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 3 -1.</_>\n        <_>\n          15 14 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 14 1 8 -1.</_>\n        <_>\n          15 16 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 14 8 10 -1.</_>\n        <_>\n          15 14 4 5 2.</_>\n        <_>\n          19 19 4 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 15 4 3 -1.</_>\n        <_>\n          15 16 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 16 8 2 -1.</_>\n        <_>\n          19 16 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 16 6 3 -1.</_>\n        <_>\n          15 17 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 1 -1.</_>\n        <_>\n          20 0 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 2 -1.</_>\n        <_>\n          20 0 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 6 -1.</_>\n        <_>\n          16 0 4 3 2.</_>\n        <_>\n          20 3 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          20 4 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 16 -1.</_>\n        <_>\n          16 0 4 8 2.</_>\n        <_>\n          20 8 4 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 3 -1.</_>\n        <_>\n          17 2 1 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 1 6 2 -1.</_>\n        <_>\n          18 3 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 2 6 1 -1.</_>\n        <_>\n          18 4 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 3 -1.</_>\n        <_>\n          16 3 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 8 -1.</_>\n        <_>\n          14 4 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 6 3 3 -1.</_>\n        <_>\n          17 7 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 4 -1.</_>\n        <_>\n          18 6 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 3 -1.</_>\n        <_>\n          16 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 4 -1.</_>\n        <_>\n          16 8 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 10 -1.</_>\n        <_>\n          16 7 2 5 2.</_>\n        <_>\n          18 12 2 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 3 2 -1.</_>\n        <_>\n          16 8 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 3 3 -1.</_>\n        <_>\n          16 8 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 3 6 -1.</_>\n        <_>\n          16 9 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 6 -1.</_>\n        <_>\n          16 9 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 6 4 -1.</_>\n        <_>\n          16 8 6 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 7 7 4 -1.</_>\n        <_>\n          16 8 7 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 1 2 -1.</_>\n        <_>\n          16 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 1 4 -1.</_>\n        <_>\n          16 9 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 3 -1.</_>\n        <_>\n          17 9 1 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 1 -1.</_>\n        <_>\n          17 9 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 2 2 -1.</_>\n        <_>\n          16 8 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 2 4 -1.</_>\n        <_>\n          16 9 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 4 -1.</_>\n        <_>\n          16 9 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 16 -1.</_>\n        <_>\n          16 12 3 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 8 2 -1.</_>\n        <_>\n          16 8 4 1 2.</_>\n        <_>\n          20 9 4 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 9 1 3 -1.</_>\n        <_>\n          16 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 9 3 6 -1.</_>\n        <_>\n          14 11 3 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 9 5 6 -1.</_>\n        <_>\n          14 11 5 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 9 6 6 -1.</_>\n        <_>\n          14 11 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 9 8 6 -1.</_>\n        <_>\n          14 11 8 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 1 2 -1.</_>\n        <_>\n          16 11 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 1 3 -1.</_>\n        <_>\n          16 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 2 3 -1.</_>\n        <_>\n          16 11 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 3 3 -1.</_>\n        <_>\n          16 11 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 5 2 -1.</_>\n        <_>\n          16 11 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 6 8 -1.</_>\n        <_>\n          16 12 6 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 2 -1.</_>\n        <_>\n          17 11 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 11 2 2 -1.</_>\n        <_>\n          16 12 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 2 -1.</_>\n        <_>\n          16 12 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 14 8 10 -1.</_>\n        <_>\n          16 14 4 5 2.</_>\n        <_>\n          20 19 4 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 16 8 2 -1.</_>\n        <_>\n          20 16 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 18 3 6 -1.</_>\n        <_>\n          17 18 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 18 8 3 -1.</_>\n        <_>\n          20 18 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 19 2 3 -1.</_>\n        <_>\n          15 20 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 20 1 3 -1.</_>\n        <_>\n          15 21 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 1 6 2 -1.</_>\n        <_>\n          17 1 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 1 -1.</_>\n        <_>\n          18 3 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 3 2 3 -1.</_>\n        <_>\n          17 4 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 3 6 3 -1.</_>\n        <_>\n          19 5 2 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 3 -1.</_>\n        <_>\n          17 4 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 3 7 3 -1.</_>\n        <_>\n          17 4 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 4 4 2 -1.</_>\n        <_>\n          18 5 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 4 2 6 -1.</_>\n        <_>\n          17 4 1 3 2.</_>\n        <_>\n          18 7 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 4 6 5 -1.</_>\n        <_>\n          19 6 2 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 4 7 16 -1.</_>\n        <_>\n          17 8 7 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 5 1 2 -1.</_>\n        <_>\n          17 5 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 4 -1.</_>\n        <_>\n          18 6 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 6 1 9 -1.</_>\n        <_>\n          17 9 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 4 -1.</_>\n        <_>\n          18 7 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 6 6 3 -1.</_>\n        <_>\n          19 8 2 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 3 -1.</_>\n        <_>\n          17 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 1 3 -1.</_>\n        <_>\n          17 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 1 6 -1.</_>\n        <_>\n          17 9 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 3 -1.</_>\n        <_>\n          18 8 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 4 5 -1.</_>\n        <_>\n          18 8 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 4 9 -1.</_>\n        <_>\n          18 8 2 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 2 2 -1.</_>\n        <_>\n          17 8 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 2 -1.</_>\n        <_>\n          17 8 3 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 3 -1.</_>\n        <_>\n          17 8 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 2 -1.</_>\n        <_>\n          17 7 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 5 2 -1.</_>\n        <_>\n          17 8 5 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 5 4 -1.</_>\n        <_>\n          17 8 5 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 2 2 -1.</_>\n        <_>\n          17 8 1 1 2.</_>\n        <_>\n          18 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 3 -1.</_>\n        <_>\n          18 9 1 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 6 9 -1.</_>\n        <_>\n          20 8 3 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 7 8 -1.</_>\n        <_>\n          15 10 7 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 9 3 3 -1.</_>\n        <_>\n          18 10 1 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 1 3 -1.</_>\n        <_>\n          17 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 4 1 -1.</_>\n        <_>\n          19 10 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 2 4 -1.</_>\n        <_>\n          17 11 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 2 2 -1.</_>\n        <_>\n          17 10 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 4 4 -1.</_>\n        <_>\n          17 11 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 4 8 -1.</_>\n        <_>\n          17 12 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 11 2 2 -1.</_>\n        <_>\n          18 11 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 2 -1.</_>\n        <_>\n          18 11 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 3 -1.</_>\n        <_>\n          18 11 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 12 3 1 -1.</_>\n        <_>\n          18 12 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 14 1 3 -1.</_>\n        <_>\n          17 15 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 14 2 2 -1.</_>\n        <_>\n          17 14 1 1 2.</_>\n        <_>\n          18 15 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 14 4 4 -1.</_>\n        <_>\n          19 14 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 15 4 2 -1.</_>\n        <_>\n          19 15 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 17 2 4 -1.</_>\n        <_>\n          17 17 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 4 1 -1.</_>\n        <_>\n          20 0 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 3 3 1 -1.</_>\n        <_>\n          19 3 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 5 -1.</_>\n        <_>\n          20 6 2 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 19 -1.</_>\n        <_>\n          21 4 3 19 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 5 1 2 -1.</_>\n        <_>\n          18 5 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 5 4 9 -1.</_>\n        <_>\n          19 6 2 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 4 -1.</_>\n        <_>\n          18 6 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 3 4 -1.</_>\n        <_>\n          19 7 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 4 4 -1.</_>\n        <_>\n          19 7 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 4 5 -1.</_>\n        <_>\n          19 7 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 3 -1.</_>\n        <_>\n          17 7 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 3 3 -1.</_>\n        <_>\n          18 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 4 3 -1.</_>\n        <_>\n          18 7 4 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 1 3 -1.</_>\n        <_>\n          18 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 3 4 -1.</_>\n        <_>\n          19 8 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 3 5 -1.</_>\n        <_>\n          19 8 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 3 6 -1.</_>\n        <_>\n          19 8 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 3 -1.</_>\n        <_>\n          18 8 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 2 -1.</_>\n        <_>\n          18 7 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 7 3 3 -1.</_>\n        <_>\n          18 8 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 8 2 2 -1.</_>\n        <_>\n          18 8 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 8 3 9 -1.</_>\n        <_>\n          15 11 3 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 8 6 5 -1.</_>\n        <_>\n          21 8 3 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 9 3 1 -1.</_>\n        <_>\n          19 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 9 6 2 -1.</_>\n        <_>\n          18 10 6 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 9 6 3 -1.</_>\n        <_>\n          18 10 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 10 1 3 -1.</_>\n        <_>\n          18 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 2 -1.</_>\n        <_>\n          18 10 1 1 2.</_>\n        <_>\n          19 11 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 10 3 5 -1.</_>\n        <_>\n          19 10 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 11 4 8 -1.</_>\n        <_>\n          18 15 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 12 2 6 -1.</_>\n        <_>\n          18 15 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 12 2 8 -1.</_>\n        <_>\n          18 16 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 12 6 2 -1.</_>\n        <_>\n          21 12 3 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 12 6 8 -1.</_>\n        <_>\n          18 12 3 4 2.</_>\n        <_>\n          21 16 3 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 14 2 4 -1.</_>\n        <_>\n          19 14 1 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 15 1 3 -1.</_>\n        <_>\n          18 16 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 15 4 5 -1.</_>\n        <_>\n          18 15 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 15 3 6 -1.</_>\n        <_>\n          16 17 3 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 4 -1.</_>\n        <_>\n          18 17 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 5 -1.</_>\n        <_>\n          18 17 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 18 1 3 -1.</_>\n        <_>\n          17 19 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 20 1 3 -1.</_>\n        <_>\n          17 21 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 0 3 1 -1.</_>\n        <_>\n          20 0 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 2 3 1 -1.</_>\n        <_>\n          20 3 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 3 3 1 -1.</_>\n        <_>\n          20 4 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 4 2 2 -1.</_>\n        <_>\n          19 4 1 1 2.</_>\n        <_>\n          20 5 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 4 1 4 -1.</_>\n        <_>\n          19 6 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 4 2 3 -1.</_>\n        <_>\n          19 5 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 5 3 1 -1.</_>\n        <_>\n          20 6 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 6 1 3 -1.</_>\n        <_>\n          19 7 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 6 1 6 -1.</_>\n        <_>\n          19 6 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 6 3 3 -1.</_>\n        <_>\n          19 7 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 8 3 3 -1.</_>\n        <_>\n          20 9 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 8 4 11 -1.</_>\n        <_>\n          21 8 2 11 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 9 2 1 -1.</_>\n        <_>\n          20 9 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 10 2 4 -1.</_>\n        <_>\n          19 12 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 11 3 13 -1.</_>\n        <_>\n          20 11 1 13 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 12 4 8 -1.</_>\n        <_>\n          19 12 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 13 3 8 -1.</_>\n        <_>\n          20 13 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 13 4 7 -1.</_>\n        <_>\n          19 13 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 15 4 5 -1.</_>\n        <_>\n          20 16 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 17 3 6 -1.</_>\n        <_>\n          20 17 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 17 3 7 -1.</_>\n        <_>\n          20 17 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 17 3 4 -1.</_>\n        <_>\n          18 18 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 18 1 3 -1.</_>\n        <_>\n          18 19 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 19 1 3 -1.</_>\n        <_>\n          18 20 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 0 2 2 -1.</_>\n        <_>\n          20 0 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 3 1 4 -1.</_>\n        <_>\n          19 4 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 4 3 1 -1.</_>\n        <_>\n          21 5 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 4 3 2 -1.</_>\n        <_>\n          21 5 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 4 2 3 -1.</_>\n        <_>\n          20 5 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 5 3 1 -1.</_>\n        <_>\n          21 6 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 8 1 4 -1.</_>\n        <_>\n          20 8 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 8 4 3 -1.</_>\n        <_>\n          21 9 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 8 3 4 -1.</_>\n        <_>\n          21 9 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 8 4 4 -1.</_>\n        <_>\n          21 9 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 8 4 6 -1.</_>\n        <_>\n          20 10 4 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 9 4 10 -1.</_>\n        <_>\n          20 9 2 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 9 4 3 -1.</_>\n        <_>\n          19 10 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 10 1 3 -1.</_>\n        <_>\n          19 11 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 10 4 3 -1.</_>\n        <_>\n          21 11 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 10 3 10 -1.</_>\n        <_>\n          21 10 1 10 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 12 4 8 -1.</_>\n        <_>\n          21 13 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 13 3 8 -1.</_>\n        <_>\n          21 13 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 15 4 5 -1.</_>\n        <_>\n          21 16 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 15 4 4 -1.</_>\n        <_>\n          22 15 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 17 3 5 -1.</_>\n        <_>\n          21 17 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 18 3 1 -1.</_>\n        <_>\n          21 18 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 18 1 3 -1.</_>\n        <_>\n          19 19 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 19 3 4 -1.</_>\n        <_>\n          21 19 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 20 1 3 -1.</_>\n        <_>\n          19 21 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 2 3 16 -1.</_>\n        <_>\n          21 2 3 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 3 3 2 -1.</_>\n        <_>\n          22 4 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 8 3 3 -1.</_>\n        <_>\n          22 9 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 8 3 5 -1.</_>\n        <_>\n          22 9 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 9 3 3 -1.</_>\n        <_>\n          20 10 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 10 1 3 -1.</_>\n        <_>\n          20 11 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 10 2 5 -1.</_>\n        <_>\n          21 10 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 10 3 3 -1.</_>\n        <_>\n          21 11 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 11 1 3 -1.</_>\n        <_>\n          20 12 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 15 1 3 -1.</_>\n        <_>\n          20 16 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 15 3 6 -1.</_>\n        <_>\n          22 15 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 16 1 3 -1.</_>\n        <_>\n          20 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 16 3 7 -1.</_>\n        <_>\n          22 16 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 16 3 8 -1.</_>\n        <_>\n          22 16 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 19 3 5 -1.</_>\n        <_>\n          22 19 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 22 3 2 -1.</_>\n        <_>\n          22 22 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 2 1 18 -1.</_>\n        <_>\n          22 2 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 10 1 3 -1.</_>\n        <_>\n          21 11 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 10 2 3 -1.</_>\n        <_>\n          21 11 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 11 1 3 -1.</_>\n        <_>\n          21 12 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 11 2 6 -1.</_>\n        <_>\n          22 11 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 11 2 9 -1.</_>\n        <_>\n          22 11 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 12 2 3 -1.</_>\n        <_>\n          21 13 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 13 2 9 -1.</_>\n        <_>\n          22 13 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 13 2 8 -1.</_>\n        <_>\n          20 15 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 17 1 4 -1.</_>\n        <_>\n          21 18 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 18 1 4 -1.</_>\n        <_>\n          21 19 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          23 9 1 3 -1.</_>\n        <_>\n          23 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          23 10 1 3 -1.</_>\n        <_>\n          23 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          23 11 1 3 -1.</_>\n        <_>\n          22 12 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          23 12 1 3 -1.</_>\n        <_>\n          22 13 1 1 3.</_></rects>\n      <tilted>1</tilted></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_frontalface_alt.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    Stump-based 20x20 gentle adaboost frontal face detector.\n    Created by Rainer Lienhart.\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's 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   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>20</height>\n  <width>20</width>\n  <stageParams>\n    <maxWeakCount>213</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>22</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>3</maxWeakCount>\n      <stageThreshold>8.2268941402435303e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 4.0141958743333817e-03</internalNodes>\n          <leafValues>\n            3.3794190734624863e-02 8.3781069517135620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 1.5151339583098888e-02</internalNodes>\n          <leafValues>\n            1.5141320228576660e-01 7.4888122081756592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 4.2109931819140911e-03</internalNodes>\n          <leafValues>\n            9.0049281716346741e-02 6.3748198747634888e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>16</maxWeakCount>\n      <stageThreshold>6.9566087722778320e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 3 1.6227109590545297e-03</internalNodes>\n          <leafValues>\n            6.9308586418628693e-02 7.1109461784362793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 2.2906649392098188e-03</internalNodes>\n          <leafValues>\n            1.7958030104637146e-01 6.6686922311782837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 5.0025708042085171e-03</internalNodes>\n          <leafValues>\n            1.6936729848384857e-01 6.5540069341659546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 7.9659894108772278e-03</internalNodes>\n          <leafValues>\n            5.8663320541381836e-01 9.1414518654346466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 -3.5227010957896709e-03</internalNodes>\n          <leafValues>\n            1.4131669700145721e-01 6.0318958759307861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 3.6667689681053162e-02</internalNodes>\n          <leafValues>\n            3.6756721138954163e-01 7.9203182458877563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 9.3361474573612213e-03</internalNodes>\n          <leafValues>\n            6.1613857746124268e-01 2.0885099470615387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 8.6961314082145691e-03</internalNodes>\n          <leafValues>\n            2.8362309932708740e-01 6.3602739572525024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 1.1488880263641477e-03</internalNodes>\n          <leafValues>\n            2.2235809266567230e-01 5.8007007837295532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 -2.1484689787030220e-03</internalNodes>\n          <leafValues>\n            2.4064640700817108e-01 5.7870548963546753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 2.1219060290604830e-03</internalNodes>\n          <leafValues>\n            5.5596548318862915e-01 1.3622370362281799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -9.3949146568775177e-02</internalNodes>\n          <leafValues>\n            8.5027372837066650e-01 4.7177401185035706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 1.3777789426967502e-03</internalNodes>\n          <leafValues>\n            5.9936738014221191e-01 2.8345298767089844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 7.3063157498836517e-02</internalNodes>\n          <leafValues>\n            4.3418860435485840e-01 7.0600342750549316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 3.6767389974556863e-04</internalNodes>\n          <leafValues>\n            3.0278879404067993e-01 6.0515749454498291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 -6.0479710809886456e-03</internalNodes>\n          <leafValues>\n            1.7984339594841003e-01 5.6752568483352661e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>21</maxWeakCount>\n      <stageThreshold>9.4985427856445312e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 19 -1.6510689631104469e-02</internalNodes>\n          <leafValues>\n            6.6442251205444336e-01 1.4248579740524292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 2.7052499353885651e-03</internalNodes>\n          <leafValues>\n            6.3253521919250488e-01 1.2884770333766937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 2.8069869149476290e-03</internalNodes>\n          <leafValues>\n            1.2402880191802979e-01 6.1931931972503662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 -1.5402400167658925e-03</internalNodes>\n          <leafValues>\n            1.4321430027484894e-01 5.6700158119201660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 -5.6386279175058007e-04</internalNodes>\n          <leafValues>\n            1.6574330627918243e-01 5.9052079916000366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 1.9253729842603207e-03</internalNodes>\n          <leafValues>\n            2.6955071091651917e-01 5.7388240098953247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 -5.0214841030538082e-03</internalNodes>\n          <leafValues>\n            1.8935389816761017e-01 5.7827740907669067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 2.6365420781075954e-03</internalNodes>\n          <leafValues>\n            2.3093290627002716e-01 5.6954258680343628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 -1.5127769438549876e-03</internalNodes>\n          <leafValues>\n            2.7596020698547363e-01 5.9566420316696167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -1.0157439857721329e-02</internalNodes>\n          <leafValues>\n            1.7325380444526672e-01 5.5220472812652588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 -1.1953660286962986e-02</internalNodes>\n          <leafValues>\n            1.3394099473953247e-01 5.5590140819549561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 4.8859491944313049e-03</internalNodes>\n          <leafValues>\n            3.6287039518356323e-01 6.1888492107391357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 -8.0132916569709778e-02</internalNodes>\n          <leafValues>\n            9.1211050748825073e-02 5.4759448766708374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 1.0643280111253262e-03</internalNodes>\n          <leafValues>\n            3.7151429057121277e-01 5.7113999128341675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -1.3419450260698795e-03</internalNodes>\n          <leafValues>\n            5.9533137083053589e-01 3.3180978894233704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -5.4601140320301056e-02</internalNodes>\n          <leafValues>\n            1.8440659344196320e-01 5.6028461456298828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 2.9071690514683723e-03</internalNodes>\n          <leafValues>\n            3.5942441225051880e-01 6.1317151784896851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 7.4718717951327562e-04</internalNodes>\n          <leafValues>\n            5.9943532943725586e-01 3.4595629572868347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 4.3013808317482471e-03</internalNodes>\n          <leafValues>\n            4.1726520657539368e-01 6.9908452033996582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 4.5017572119832039e-03</internalNodes>\n          <leafValues>\n            4.5097151398658752e-01 7.8014570474624634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 2.4138500913977623e-02</internalNodes>\n          <leafValues>\n            5.4382127523422241e-01 1.3198269903659821e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>39</maxWeakCount>\n      <stageThreshold>1.8412969589233398e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 40 1.9212230108678341e-03</internalNodes>\n          <leafValues>\n            1.4152669906616211e-01 6.1998707056045532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 -1.2748669541906565e-04</internalNodes>\n          <leafValues>\n            6.1910742521286011e-01 1.8849289417266846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 5.1409931620582938e-04</internalNodes>\n          <leafValues>\n            1.4873969554901123e-01 5.8579277992248535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 4.1878609918057919e-03</internalNodes>\n          <leafValues>\n            2.7469098567962646e-01 6.3592398166656494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 5.1015717908740044e-03</internalNodes>\n          <leafValues>\n            5.8708512783050537e-01 2.1756289899349213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 -2.1448440384119749e-03</internalNodes>\n          <leafValues>\n            5.8809447288513184e-01 2.9795908927917480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 -2.8977119363844395e-03</internalNodes>\n          <leafValues>\n            2.3733270168304443e-01 5.8766472339630127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 -2.1610679104924202e-02</internalNodes>\n          <leafValues>\n            1.2206549942493439e-01 5.1942020654678345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 -4.6299318782985210e-03</internalNodes>\n          <leafValues>\n            2.6312309503555298e-01 5.8174091577529907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 5.9393711853772402e-04</internalNodes>\n          <leafValues>\n            3.6386200785636902e-01 5.6985449790954590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 5.3878661245107651e-02</internalNodes>\n          <leafValues>\n            4.3035310506820679e-01 7.5593662261962891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 1.8887349870055914e-03</internalNodes>\n          <leafValues>\n            2.1226030588150024e-01 5.6134271621704102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 -2.3635339457541704e-03</internalNodes>\n          <leafValues>\n            5.6318491697311401e-01 2.6427671313285828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 2.4017799645662308e-02</internalNodes>\n          <leafValues>\n            5.7971078157424927e-01 2.7517059445381165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 2.0543030404951423e-04</internalNodes>\n          <leafValues>\n            2.7052420377731323e-01 5.7525688409805298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 8.4790197433903813e-04</internalNodes>\n          <leafValues>\n            5.4356247186660767e-01 2.3348769545555115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 1.4091329649090767e-03</internalNodes>\n          <leafValues>\n            5.3194248676300049e-01 2.0631550252437592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 1.4642629539594054e-03</internalNodes>\n          <leafValues>\n            5.4189807176589966e-01 3.0688610672950745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 1.6352549428120255e-03</internalNodes>\n          <leafValues>\n            3.6953729391098022e-01 6.1128681898117065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 8.3172752056270838e-04</internalNodes>\n          <leafValues>\n            3.5650369524955750e-01 6.0252362489700317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 -2.0998890977352858e-03</internalNodes>\n          <leafValues>\n            1.9139820337295532e-01 5.3628271818161011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 -7.4213981861248612e-04</internalNodes>\n          <leafValues>\n            3.8355550169944763e-01 5.5293101072311401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 3.2655049581080675e-03</internalNodes>\n          <leafValues>\n            4.3128961324691772e-01 7.1018958091735840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 8.9134991867467761e-04</internalNodes>\n          <leafValues>\n            3.9848309755325317e-01 6.3919639587402344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 -1.5284179709851742e-02</internalNodes>\n          <leafValues>\n            2.3667329549789429e-01 5.4337137937545776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 4.8381411470472813e-03</internalNodes>\n          <leafValues>\n            5.8175009489059448e-01 3.2391890883445740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 -9.1093179071322083e-04</internalNodes>\n          <leafValues>\n            5.5405938625335693e-01 2.9118689894676208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 -6.1275060288608074e-03</internalNodes>\n          <leafValues>\n            1.7752550542354584e-01 5.1966291666030884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -4.4576259097084403e-04</internalNodes>\n          <leafValues>\n            3.0241701006889343e-01 5.5335938930511475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 2.2646540775895119e-02</internalNodes>\n          <leafValues>\n            4.4149309396743774e-01 6.9753772020339966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 -1.8804960418492556e-03</internalNodes>\n          <leafValues>\n            2.7913948893547058e-01 5.4979521036148071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 7.0889107882976532e-03</internalNodes>\n          <leafValues>\n            5.2631992101669312e-01 2.3855470120906830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 1.7318050377070904e-03</internalNodes>\n          <leafValues>\n            4.3193790316581726e-01 6.9836008548736572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 -6.8482700735330582e-03</internalNodes>\n          <leafValues>\n            3.0820429325103760e-01 5.3909200429916382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 -1.5062530110299122e-05</internalNodes>\n          <leafValues>\n            5.5219221115112305e-01 3.1203660368919373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 2.9475569725036621e-02</internalNodes>\n          <leafValues>\n            5.4013228416442871e-01 1.7706030607223511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 8.1387329846620560e-03</internalNodes>\n          <leafValues>\n            5.1786178350448608e-01 1.2110190093517303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 2.0942950621247292e-02</internalNodes>\n          <leafValues>\n            5.2902942895889282e-01 3.3112218976020813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 -9.5665529370307922e-03</internalNodes>\n          <leafValues>\n            7.4719941616058350e-01 4.4519689679145813e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>33</maxWeakCount>\n      <stageThreshold>1.5324139595031738e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 79 -2.8206960996612906e-04</internalNodes>\n          <leafValues>\n            2.0640860497951508e-01 6.0767322778701782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 1.6790600493550301e-03</internalNodes>\n          <leafValues>\n            5.8519971370697021e-01 1.2553839385509491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 6.9827912375330925e-04</internalNodes>\n          <leafValues>\n            9.4018429517745972e-02 5.7289612293243408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 7.8959012171253562e-04</internalNodes>\n          <leafValues>\n            1.7819879949092865e-01 5.6943088769912720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 -2.8560499195009470e-03</internalNodes>\n          <leafValues>\n            1.6383990645408630e-01 5.7886648178100586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 -3.8122469559311867e-03</internalNodes>\n          <leafValues>\n            2.0854400098323822e-01 5.5085647106170654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 1.5896620461717248e-03</internalNodes>\n          <leafValues>\n            5.7027608156204224e-01 1.8572150170803070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 1.0078339837491512e-02</internalNodes>\n          <leafValues>\n            5.1169431209564209e-01 2.1897700428962708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 -6.3526302576065063e-02</internalNodes>\n          <leafValues>\n            7.1313798427581787e-01 4.0438130497932434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 -9.1031491756439209e-03</internalNodes>\n          <leafValues>\n            2.5671818852424622e-01 5.4639732837677002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 -2.4035000242292881e-03</internalNodes>\n          <leafValues>\n            1.7006659507751465e-01 5.5909740924835205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 1.5226360410451889e-03</internalNodes>\n          <leafValues>\n            5.4105567932128906e-01 2.6190540194511414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 1.7997439950704575e-02</internalNodes>\n          <leafValues>\n            3.7324368953704834e-01 6.5352207422256470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 -6.4538191072642803e-03</internalNodes>\n          <leafValues>\n            2.6264819502830505e-01 5.5374461412429810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 -1.1880760081112385e-02</internalNodes>\n          <leafValues>\n            2.0037539303302765e-01 5.5447459220886230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 1.2713660253211856e-03</internalNodes>\n          <leafValues>\n            5.5919027328491211e-01 3.0319759249687195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 1.1376109905540943e-03</internalNodes>\n          <leafValues>\n            2.7304071187973022e-01 5.6465089321136475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 -4.2651998810470104e-03</internalNodes>\n          <leafValues>\n            1.4059090614318848e-01 5.4618209600448608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -2.9602861031889915e-03</internalNodes>\n          <leafValues>\n            1.7950350046157837e-01 5.4592901468276978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -8.8448226451873779e-03</internalNodes>\n          <leafValues>\n            5.7367831468582153e-01 2.8092199563980103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 -6.6430689767003059e-03</internalNodes>\n          <leafValues>\n            2.3706759512424469e-01 5.5038261413574219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 3.9997808635234833e-03</internalNodes>\n          <leafValues>\n            5.6081998348236084e-01 3.3042821288108826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 -4.1221720166504383e-03</internalNodes>\n          <leafValues>\n            1.6401059925556183e-01 5.3789931535720825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 1.5624909661710262e-02</internalNodes>\n          <leafValues>\n            5.2276492118835449e-01 2.2886039316654205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 -1.0356419719755650e-02</internalNodes>\n          <leafValues>\n            7.0161938667297363e-01 4.2529278993606567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 -8.7960809469223022e-03</internalNodes>\n          <leafValues>\n            2.7673470973968506e-01 5.3558301925659180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 1.6226939857006073e-01</internalNodes>\n          <leafValues>\n            4.3422400951385498e-01 7.4425792694091797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 4.5542530715465546e-03</internalNodes>\n          <leafValues>\n            5.7264858484268188e-01 2.5821250677108765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 -2.1309209987521172e-03</internalNodes>\n          <leafValues>\n            2.1068480610847473e-01 5.3610187768936157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 -1.3208420015871525e-02</internalNodes>\n          <leafValues>\n            7.5937908887863159e-01 4.5524680614471436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 -6.5996676683425903e-02</internalNodes>\n          <leafValues>\n            1.2524759769439697e-01 5.3440397977828979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 7.9142656177282333e-03</internalNodes>\n          <leafValues>\n            3.3153840899467468e-01 5.6010431051254272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 2.0894279703497887e-02</internalNodes>\n          <leafValues>\n            5.5060499906539917e-01 2.7688381075859070e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>2.1010639190673828e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 112 1.1961159761995077e-03</internalNodes>\n          <leafValues>\n            1.7626909911632538e-01 6.1562412977218628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 -1.8679830245673656e-03</internalNodes>\n          <leafValues>\n            6.1181068420410156e-01 1.8323999643325806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 -1.9579799845814705e-04</internalNodes>\n          <leafValues>\n            9.9044263362884521e-02 5.7238161563873291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -8.0255657667294145e-04</internalNodes>\n          <leafValues>\n            5.5798798799514771e-01 2.3772829771041870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 -2.4510810617357492e-03</internalNodes>\n          <leafValues>\n            2.2314579784870148e-01 5.8589351177215576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 5.0361850298941135e-04</internalNodes>\n          <leafValues>\n            2.6539939641952515e-01 5.7941037416458130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 4.0293349884450436e-03</internalNodes>\n          <leafValues>\n            5.8038270473480225e-01 2.4848650395870209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 -1.4451709575951099e-02</internalNodes>\n          <leafValues>\n            1.8303519487380981e-01 5.4842048883438110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 2.0380979403853416e-03</internalNodes>\n          <leafValues>\n            3.3635589480400085e-01 6.0510927438735962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 -1.6155190533027053e-03</internalNodes>\n          <leafValues>\n            2.2866420447826385e-01 5.4412460327148438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 3.3458340913057327e-03</internalNodes>\n          <leafValues>\n            5.6259131431579590e-01 2.3923380672931671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 1.6379579901695251e-03</internalNodes>\n          <leafValues>\n            3.9069938659667969e-01 5.9646219015121460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 3.0251210555434227e-02</internalNodes>\n          <leafValues>\n            5.2484822273254395e-01 1.5757469832897186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 3.7251990288496017e-02</internalNodes>\n          <leafValues>\n            4.1943109035491943e-01 6.7484188079833984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 -2.5109790265560150e-02</internalNodes>\n          <leafValues>\n            1.8825499713420868e-01 5.4734510183334351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -5.3099058568477631e-03</internalNodes>\n          <leafValues>\n            1.3399730622768402e-01 5.2271109819412231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 1.2086479691788554e-03</internalNodes>\n          <leafValues>\n            3.7620881199836731e-01 6.1096358299255371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 -2.1907679736614227e-02</internalNodes>\n          <leafValues>\n            2.6631429791450500e-01 5.4040068387985229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 5.4116579703986645e-03</internalNodes>\n          <leafValues>\n            5.3635787963867188e-01 2.2322730720043182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 6.9946326315402985e-02</internalNodes>\n          <leafValues>\n            5.3582328557968140e-01 2.4536980688571930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 3.4520021290518343e-04</internalNodes>\n          <leafValues>\n            2.4096719920635223e-01 5.3769302368164062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 1.2627709656953812e-03</internalNodes>\n          <leafValues>\n            5.4258567094802856e-01 3.1556931138038635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 2.2719509899616241e-02</internalNodes>\n          <leafValues>\n            4.1584059596061707e-01 6.5978652238845825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 -1.8111000536009669e-03</internalNodes>\n          <leafValues>\n            2.8112530708312988e-01 5.5052447319030762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 3.3469670452177525e-03</internalNodes>\n          <leafValues>\n            5.2600282430648804e-01 1.8914650380611420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 4.0791751234792173e-04</internalNodes>\n          <leafValues>\n            5.6735092401504517e-01 3.3442100882530212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 1.2734799645841122e-02</internalNodes>\n          <leafValues>\n            5.3435921669006348e-01 2.3956120014190674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -7.3119727894663811e-03</internalNodes>\n          <leafValues>\n            6.0108900070190430e-01 4.0222078561782837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 -5.6948751211166382e-02</internalNodes>\n          <leafValues>\n            8.1991511583328247e-01 4.5431908965110779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 -5.0116591155529022e-03</internalNodes>\n          <leafValues>\n            2.2002810239791870e-01 5.3577107191085815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 6.0334368608891964e-03</internalNodes>\n          <leafValues>\n            4.4130811095237732e-01 7.1817511320114136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 3.9437441155314445e-03</internalNodes>\n          <leafValues>\n            5.4788607358932495e-01 2.7917331457138062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 -3.6591119132936001e-03</internalNodes>\n          <leafValues>\n            6.3578677177429199e-01 3.9897239208221436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 -3.8456181064248085e-03</internalNodes>\n          <leafValues>\n            3.4936860203742981e-01 5.3006649017333984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -7.1926261298358440e-03</internalNodes>\n          <leafValues>\n            1.1196149885654449e-01 5.2296727895736694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 -5.2798941731452942e-02</internalNodes>\n          <leafValues>\n            2.3871029913425446e-01 5.4534512758255005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 -7.9537667334079742e-03</internalNodes>\n          <leafValues>\n            7.5869178771972656e-01 4.4393768906593323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 -2.7344180271029472e-03</internalNodes>\n          <leafValues>\n            2.5654768943786621e-01 5.4893219470977783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 -1.8507939530536532e-03</internalNodes>\n          <leafValues>\n            6.7343479394912720e-01 4.2524749040603638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 1.5918919816613197e-02</internalNodes>\n          <leafValues>\n            5.4883527755737305e-01 2.2926619648933411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 -1.2687679845839739e-03</internalNodes>\n          <leafValues>\n            6.1043310165405273e-01 4.0223899483680725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 6.2883910723030567e-03</internalNodes>\n          <leafValues>\n            5.3108531236648560e-01 1.5361930429935455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 -6.2259892001748085e-03</internalNodes>\n          <leafValues>\n            1.7291119694709778e-01 5.2416062355041504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 -1.2132599949836731e-02</internalNodes>\n          <leafValues>\n            6.5977597236633301e-01 4.3251821398735046e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>50</maxWeakCount>\n      <stageThreshold>2.3918790817260742e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 156 -3.9184908382594585e-03</internalNodes>\n          <leafValues>\n            6.1034351587295532e-01 1.4693309366703033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 1.5971299726516008e-03</internalNodes>\n          <leafValues>\n            2.6323631405830383e-01 5.8964669704437256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 1.7780110239982605e-02</internalNodes>\n          <leafValues>\n            5.8728742599487305e-01 1.7603619396686554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 6.5334769897162914e-04</internalNodes>\n          <leafValues>\n            1.5678019821643829e-01 5.5960661172866821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 -2.8353091329336166e-04</internalNodes>\n          <leafValues>\n            1.9131539762020111e-01 5.7320362329483032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 1.6104689566418529e-03</internalNodes>\n          <leafValues>\n            2.9149138927459717e-01 5.6230807304382324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -9.7750619053840637e-02</internalNodes>\n          <leafValues>\n            1.9434769451618195e-01 5.6482332944869995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 5.5182358482852578e-04</internalNodes>\n          <leafValues>\n            3.1346169114112854e-01 5.5046397447586060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 -1.2858220376074314e-02</internalNodes>\n          <leafValues>\n            2.5364819169044495e-01 5.7601428031921387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 4.1530239395797253e-03</internalNodes>\n          <leafValues>\n            5.7677221298217773e-01 3.6597740650177002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 1.7092459602281451e-03</internalNodes>\n          <leafValues>\n            2.8431910276412964e-01 5.9189391136169434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 7.5217359699308872e-03</internalNodes>\n          <leafValues>\n            4.0524271130561829e-01 6.1831092834472656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 2.2479810286313295e-03</internalNodes>\n          <leafValues>\n            5.7837551832199097e-01 3.1354010105133057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 5.2006211131811142e-02</internalNodes>\n          <leafValues>\n            5.5413120985031128e-01 1.9166369736194611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 1.2085529975593090e-02</internalNodes>\n          <leafValues>\n            4.0326559543609619e-01 6.6445910930633545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 1.4687820112158079e-05</internalNodes>\n          <leafValues>\n            3.5359779000282288e-01 5.7093828916549683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 7.1395188570022583e-06</internalNodes>\n          <leafValues>\n            3.0374449491500854e-01 5.6102699041366577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 -4.6001640148460865e-03</internalNodes>\n          <leafValues>\n            7.1810871362686157e-01 4.5803260803222656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 2.0058949012309313e-03</internalNodes>\n          <leafValues>\n            5.6219518184661865e-01 2.9536840319633484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 4.5050270855426788e-03</internalNodes>\n          <leafValues>\n            4.6153879165649414e-01 7.6190179586410522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 1.1746830306947231e-02</internalNodes>\n          <leafValues>\n            5.3438371419906616e-01 1.7725290358066559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 -5.8316338807344437e-02</internalNodes>\n          <leafValues>\n            1.6862459480762482e-01 5.3407722711563110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 2.3629379575140774e-04</internalNodes>\n          <leafValues>\n            3.7920561432838440e-01 6.0268038511276245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 -7.8156180679798126e-03</internalNodes>\n          <leafValues>\n            1.5128670632839203e-01 5.3243237733840942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 -1.0876160115003586e-02</internalNodes>\n          <leafValues>\n            2.0818220078945160e-01 5.3199452161788940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 -2.7745519764721394e-03</internalNodes>\n          <leafValues>\n            4.0982469916343689e-01 5.2103281021118164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 -7.8276381827890873e-04</internalNodes>\n          <leafValues>\n            5.6932741403579712e-01 3.4788420796394348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 1.3870409689843655e-02</internalNodes>\n          <leafValues>\n            5.3267508745193481e-01 2.2576980292797089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 -2.3674910888075829e-02</internalNodes>\n          <leafValues>\n            1.5513050556182861e-01 5.2007079124450684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 -1.4879409718560055e-05</internalNodes>\n          <leafValues>\n            5.5005669593811035e-01 3.8201761245727539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 3.6190641112625599e-03</internalNodes>\n          <leafValues>\n            4.2386838793754578e-01 6.6397482156753540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 -1.9817110151052475e-02</internalNodes>\n          <leafValues>\n            2.1500380337238312e-01 5.3823578357696533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -3.8154039066284895e-03</internalNodes>\n          <leafValues>\n            6.6757112741470337e-01 4.2152971029281616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 -4.9775829538702965e-03</internalNodes>\n          <leafValues>\n            2.2672890126705170e-01 5.3863281011581421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 2.2441020701080561e-03</internalNodes>\n          <leafValues>\n            4.3086910247802734e-01 6.8557357788085938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 1.2282459996640682e-02</internalNodes>\n          <leafValues>\n            5.8366149663925171e-01 3.4674790501594543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 -2.8548699337989092e-03</internalNodes>\n          <leafValues>\n            7.0169448852539062e-01 4.3114539980888367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 -3.7875669077038765e-03</internalNodes>\n          <leafValues>\n            2.8953450918197632e-01 5.2249461412429810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 -1.2201230274513364e-03</internalNodes>\n          <leafValues>\n            2.9755708575248718e-01 5.4816448688507080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 1.0160599835216999e-02</internalNodes>\n          <leafValues>\n            4.8888179659843445e-01 8.1826978921890259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 -1.6174569725990295e-02</internalNodes>\n          <leafValues>\n            1.4814929664134979e-01 5.2399927377700806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 1.9292460754513741e-02</internalNodes>\n          <leafValues>\n            4.7863098978996277e-01 7.3781907558441162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 -3.2479539513587952e-03</internalNodes>\n          <leafValues>\n            7.3742228746414185e-01 4.4706439971923828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 -9.3803480267524719e-03</internalNodes>\n          <leafValues>\n            3.4891548752784729e-01 5.5379962921142578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 -1.2606129981577396e-02</internalNodes>\n          <leafValues>\n            2.3796869814395905e-01 5.3154432773590088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 -2.5621930137276649e-02</internalNodes>\n          <leafValues>\n            1.9646880030632019e-01 5.1387697458267212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 -7.5741496402770281e-05</internalNodes>\n          <leafValues>\n            5.5905228853225708e-01 3.3658531308174133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 -8.9210882782936096e-02</internalNodes>\n          <leafValues>\n            6.3404656946659088e-02 5.1626348495483398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 -2.7670480776578188e-03</internalNodes>\n          <leafValues>\n            7.3234677314758301e-01 4.4907060265541077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 2.7152578695677221e-04</internalNodes>\n          <leafValues>\n            4.1148349642753601e-01 5.9855180978775024e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>51</maxWeakCount>\n      <stageThreshold>2.4527879714965820e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 206 1.4786219689995050e-03</internalNodes>\n          <leafValues>\n            2.6635450124740601e-01 6.6433167457580566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 -1.8741659587249160e-03</internalNodes>\n          <leafValues>\n            6.1438488960266113e-01 2.5185129046440125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 -1.7151009524241090e-03</internalNodes>\n          <leafValues>\n            5.7663410902023315e-01 2.3974630236625671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 -1.8939269939437509e-03</internalNodes>\n          <leafValues>\n            5.6820458173751831e-01 2.5291448831558228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -5.3006052039563656e-03</internalNodes>\n          <leafValues>\n            1.6406759619712830e-01 5.5560797452926636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 -4.6662531793117523e-02</internalNodes>\n          <leafValues>\n            6.1231541633605957e-01 4.7628301382064819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 -7.9431332414969802e-04</internalNodes>\n          <leafValues>\n            5.7078588008880615e-01 2.8394040465354919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 1.4891670085489750e-02</internalNodes>\n          <leafValues>\n            4.0896728634834290e-01 6.0063672065734863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 -1.2046529445797205e-03</internalNodes>\n          <leafValues>\n            5.7124507427215576e-01 2.7052891254425049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 6.0619381256401539e-03</internalNodes>\n          <leafValues>\n            5.2625042200088501e-01 3.2622259855270386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 -2.5286648888140917e-03</internalNodes>\n          <leafValues>\n            6.8538308143615723e-01 4.1992568969726562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 -5.9010218828916550e-03</internalNodes>\n          <leafValues>\n            3.2662820816040039e-01 5.4348129034042358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 5.6702760048210621e-03</internalNodes>\n          <leafValues>\n            5.4684108495712280e-01 2.3190039396286011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 -3.0304100364446640e-03</internalNodes>\n          <leafValues>\n            5.5706679821014404e-01 2.7082380652427673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 2.9803649522364140e-03</internalNodes>\n          <leafValues>\n            3.7005689740180969e-01 5.8906257152557373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 -7.5840510427951813e-02</internalNodes>\n          <leafValues>\n            2.1400700509548187e-01 5.4199481010437012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 1.9262539222836494e-02</internalNodes>\n          <leafValues>\n            5.5267721414566040e-01 2.7265900373458862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 1.8888259364757687e-04</internalNodes>\n          <leafValues>\n            3.9580118656158447e-01 6.0172098875045776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 2.9369549825787544e-02</internalNodes>\n          <leafValues>\n            5.2413737773895264e-01 1.4357580244541168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 1.0417619487270713e-03</internalNodes>\n          <leafValues>\n            3.3854091167449951e-01 5.9299832582473755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 2.6125640142709017e-03</internalNodes>\n          <leafValues>\n            5.4853779077529907e-01 3.0215978622436523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 9.6977467183023691e-04</internalNodes>\n          <leafValues>\n            3.3752760291099548e-01 5.5320328474044800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 5.9512659208849072e-04</internalNodes>\n          <leafValues>\n            5.6317430734634399e-01 3.3593991398811340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 -1.0156559944152832e-01</internalNodes>\n          <leafValues>\n            6.3735038042068481e-02 5.2304250001907349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 3.6156699061393738e-02</internalNodes>\n          <leafValues>\n            5.1369631290435791e-01 1.0295289754867554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 3.4624140243977308e-03</internalNodes>\n          <leafValues>\n            3.8793200254440308e-01 5.5582892894744873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 1.9554980099201202e-02</internalNodes>\n          <leafValues>\n            5.2500867843627930e-01 1.8758599460124969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 -2.3121440317481756e-03</internalNodes>\n          <leafValues>\n            6.6720288991928101e-01 4.6796411275863647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 -1.8605289515107870e-03</internalNodes>\n          <leafValues>\n            7.1633791923522949e-01 4.3346709012985229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 -9.4026362057775259e-04</internalNodes>\n          <leafValues>\n            3.0213609337806702e-01 5.6502032279968262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -5.2418331615626812e-03</internalNodes>\n          <leafValues>\n            1.8200090527534485e-01 5.2502560615539551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 1.1729019752237946e-04</internalNodes>\n          <leafValues>\n            3.3891880512237549e-01 5.4459732770919800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 1.1878840159624815e-03</internalNodes>\n          <leafValues>\n            4.0853491425514221e-01 6.2535631656646729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 -1.0881359688937664e-02</internalNodes>\n          <leafValues>\n            3.3783990144729614e-01 5.7000827789306641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 1.7354859737679362e-03</internalNodes>\n          <leafValues>\n            4.2046359181404114e-01 6.5230387449264526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -6.5119052305817604e-03</internalNodes>\n          <leafValues>\n            2.5952160358428955e-01 5.4281437397003174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 -1.2136430013924837e-03</internalNodes>\n          <leafValues>\n            6.1651438474655151e-01 3.9778938889503479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 -1.0354240424931049e-02</internalNodes>\n          <leafValues>\n            1.6280280053615570e-01 5.2195048332214355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 5.5858830455690622e-04</internalNodes>\n          <leafValues>\n            3.1996509432792664e-01 5.5035740137100220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 1.5299649909138680e-02</internalNodes>\n          <leafValues>\n            4.1039940714836121e-01 6.1223882436752319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 -2.1588210016489029e-02</internalNodes>\n          <leafValues>\n            1.0349129885435104e-01 5.1973849534988403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 -1.2834629416465759e-01</internalNodes>\n          <leafValues>\n            8.4938651323318481e-01 4.8931029438972473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 -2.2927189711481333e-03</internalNodes>\n          <leafValues>\n            3.1301578879356384e-01 5.4715752601623535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 7.9915106296539307e-02</internalNodes>\n          <leafValues>\n            4.8563209176063538e-01 6.0739892721176147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 -7.9441092908382416e-02</internalNodes>\n          <leafValues>\n            8.3946740627288818e-01 4.6245330572128296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 -5.2800010889768600e-03</internalNodes>\n          <leafValues>\n            1.8816959857940674e-01 5.3066980838775635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 1.0463109938427806e-03</internalNodes>\n          <leafValues>\n            5.2712291479110718e-01 2.5830659270286560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 2.6317298761568964e-04</internalNodes>\n          <leafValues>\n            4.2353048920631409e-01 5.7354408502578735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 -3.6173160187900066e-03</internalNodes>\n          <leafValues>\n            6.9343960285186768e-01 4.4954448938369751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 1.1421879753470421e-02</internalNodes>\n          <leafValues>\n            5.9009212255477905e-01 4.1381931304931641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 -1.9963278900831938e-03</internalNodes>\n          <leafValues>\n            6.4663827419281006e-01 4.3272399902343750e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>56</maxWeakCount>\n      <stageThreshold>2.7153350830078125e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 257 -9.9691245704889297e-03</internalNodes>\n          <leafValues>\n            6.1423242092132568e-01 2.4822120368480682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 7.3073059320449829e-04</internalNodes>\n          <leafValues>\n            5.7049518823623657e-01 2.3219659924507141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 6.4045301405712962e-04</internalNodes>\n          <leafValues>\n            2.1122519671916962e-01 5.8149331808090210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 4.5424019917845726e-03</internalNodes>\n          <leafValues>\n            2.9504820704460144e-01 5.8663117885589600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 9.2477443104144186e-05</internalNodes>\n          <leafValues>\n            2.9909908771514893e-01 5.7913267612457275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 -8.6603146046400070e-03</internalNodes>\n          <leafValues>\n            2.8130298852920532e-01 5.6355422735214233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 8.0515816807746887e-03</internalNodes>\n          <leafValues>\n            3.5353690385818481e-01 6.0547572374343872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 4.3835240649059415e-04</internalNodes>\n          <leafValues>\n            5.5965322256088257e-01 2.7315109968185425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 -9.8168973636347800e-05</internalNodes>\n          <leafValues>\n            5.9780317544937134e-01 3.6385610699653625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 -1.1298790341243148e-03</internalNodes>\n          <leafValues>\n            2.7552521228790283e-01 5.4327291250228882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 6.4356150105595589e-03</internalNodes>\n          <leafValues>\n            4.3056419491767883e-01 7.0698332786560059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 -5.6829329580068588e-02</internalNodes>\n          <leafValues>\n            2.4952429533004761e-01 5.2949970960617065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 4.0668169967830181e-03</internalNodes>\n          <leafValues>\n            5.4785531759262085e-01 2.4977239966392517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 4.8164798499783501e-05</internalNodes>\n          <leafValues>\n            3.9386010169982910e-01 5.7063561677932739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 6.1795017682015896e-03</internalNodes>\n          <leafValues>\n            4.4076061248779297e-01 7.3947668075561523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 6.4985752105712891e-03</internalNodes>\n          <leafValues>\n            5.4452431201934814e-01 2.4791529774665833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 -1.0211090557277203e-03</internalNodes>\n          <leafValues>\n            2.5447669625282288e-01 5.3389710187911987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 -5.4247528314590454e-03</internalNodes>\n          <leafValues>\n            2.7188581228256226e-01 5.3240692615509033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 -1.0559899965301156e-03</internalNodes>\n          <leafValues>\n            3.1782880425453186e-01 5.5345088243484497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 6.6465808777138591e-04</internalNodes>\n          <leafValues>\n            4.2842191457748413e-01 6.5581941604614258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 -2.7524109464138746e-04</internalNodes>\n          <leafValues>\n            5.9028607606887817e-01 3.8102629780769348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 4.2293202131986618e-03</internalNodes>\n          <leafValues>\n            3.8164898753166199e-01 5.7093858718872070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 -3.2868210691958666e-03</internalNodes>\n          <leafValues>\n            1.7477439343929291e-01 5.2595442533493042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 1.5611879643984139e-04</internalNodes>\n          <leafValues>\n            3.6017221212387085e-01 5.7256120443344116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 -7.3621381488919724e-06</internalNodes>\n          <leafValues>\n            5.4018580913543701e-01 3.0444970726966858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 -1.4767250046133995e-02</internalNodes>\n          <leafValues>\n            3.2207700610160828e-01 5.5734348297119141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 2.4489590898156166e-02</internalNodes>\n          <leafValues>\n            4.3015280365943909e-01 6.5188127756118774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 -3.7652091123163700e-04</internalNodes>\n          <leafValues>\n            3.5645830631256104e-01 5.5982369184494019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 7.3657688517414499e-06</internalNodes>\n          <leafValues>\n            3.4907829761505127e-01 5.5618977546691895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 -1.5099939890205860e-02</internalNodes>\n          <leafValues>\n            1.7762720584869385e-01 5.3352999687194824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -3.8316650316119194e-03</internalNodes>\n          <leafValues>\n            6.1496877670288086e-01 4.2213940620422363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 1.6925400123000145e-02</internalNodes>\n          <leafValues>\n            5.4130148887634277e-01 2.1665850281715393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -3.0477850232273340e-03</internalNodes>\n          <leafValues>\n            6.4494907855987549e-01 4.3546178936958313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 3.2140589319169521e-03</internalNodes>\n          <leafValues>\n            5.4001551866531372e-01 3.5232171416282654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 -4.0023201145231724e-03</internalNodes>\n          <leafValues>\n            2.7745240926742554e-01 5.3384172916412354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 7.4182129465043545e-03</internalNodes>\n          <leafValues>\n            5.6767392158508301e-01 3.7028178572654724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 -8.8764587417244911e-03</internalNodes>\n          <leafValues>\n            7.7492219209671021e-01 4.5836889743804932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 2.7311739977449179e-03</internalNodes>\n          <leafValues>\n            5.3387218713760376e-01 3.9966610074043274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 -2.5082379579544067e-03</internalNodes>\n          <leafValues>\n            5.6119632720947266e-01 3.7774989008903503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 -8.0541074275970459e-03</internalNodes>\n          <leafValues>\n            2.9152289032936096e-01 5.1791828870773315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 -9.7938813269138336e-04</internalNodes>\n          <leafValues>\n            5.5364328622817993e-01 3.7001928687095642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 -5.8745909482240677e-03</internalNodes>\n          <leafValues>\n            3.7543910741806030e-01 5.6793761253356934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 -4.4936719350516796e-03</internalNodes>\n          <leafValues>\n            7.0196992158889771e-01 4.4809499382972717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -5.4389229044318199e-03</internalNodes>\n          <leafValues>\n            2.3103649914264679e-01 5.3133869171142578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 -7.5094640487805009e-04</internalNodes>\n          <leafValues>\n            5.8648687601089478e-01 4.1293430328369141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 1.4528800420521293e-05</internalNodes>\n          <leafValues>\n            3.7324070930480957e-01 5.6196212768554688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 4.0758069604635239e-02</internalNodes>\n          <leafValues>\n            5.3120911121368408e-01 2.7205219864845276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 6.6505931317806244e-03</internalNodes>\n          <leafValues>\n            4.7100159525871277e-01 6.6934937238693237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 4.5759351924061775e-03</internalNodes>\n          <leafValues>\n            5.1678192615509033e-01 1.6372759640216827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 6.5269311890006065e-03</internalNodes>\n          <leafValues>\n            5.3976088762283325e-01 2.9385319352149963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 -1.3660379685461521e-02</internalNodes>\n          <leafValues>\n            7.0864880084991455e-01 4.5322000980377197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 2.7358869090676308e-02</internalNodes>\n          <leafValues>\n            5.2064812183380127e-01 3.5892319679260254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 6.2197551596909761e-04</internalNodes>\n          <leafValues>\n            3.5070759057998657e-01 5.4411232471466064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 -3.3077080734074116e-03</internalNodes>\n          <leafValues>\n            5.8595228195190430e-01 4.0248918533325195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 -1.0631109587848186e-02</internalNodes>\n          <leafValues>\n            6.7432671785354614e-01 4.4226029515266418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 1.9441649317741394e-02</internalNodes>\n          <leafValues>\n            5.2827161550521851e-01 1.7979049682617188e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>71</maxWeakCount>\n      <stageThreshold>3.4554111480712891e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 313 -5.5052167735993862e-03</internalNodes>\n          <leafValues>\n            5.9147310256958008e-01 2.6265591382980347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 1.9562279339879751e-03</internalNodes>\n          <leafValues>\n            2.3125819861888885e-01 5.7416272163391113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 -8.8924784213304520e-03</internalNodes>\n          <leafValues>\n            1.6565300524234772e-01 5.6266540288925171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 8.3638377487659454e-02</internalNodes>\n          <leafValues>\n            5.4234498739242554e-01 1.9572949409484863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 1.2282270472496748e-03</internalNodes>\n          <leafValues>\n            3.4179040789604187e-01 5.9925037622451782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 5.7629169896245003e-03</internalNodes>\n          <leafValues>\n            3.7195819616317749e-01 6.0799038410186768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 -1.6417410224676132e-03</internalNodes>\n          <leafValues>\n            2.5774860382080078e-01 5.5769157409667969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 3.4113149158656597e-03</internalNodes>\n          <leafValues>\n            2.9507490992546082e-01 5.5141717195510864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 -1.1069320142269135e-02</internalNodes>\n          <leafValues>\n            7.5693589448928833e-01 4.4770789146423340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 3.4865971654653549e-02</internalNodes>\n          <leafValues>\n            5.5837088823318481e-01 2.6696211099624634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 6.5701099811121821e-04</internalNodes>\n          <leafValues>\n            5.6273132562637329e-01 2.9888901114463806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 -2.4339130148291588e-02</internalNodes>\n          <leafValues>\n            2.7711850404739380e-01 5.1088631153106689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 5.9435202274471521e-04</internalNodes>\n          <leafValues>\n            5.5806517601013184e-01 3.1203418970108032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 2.2971509024500847e-03</internalNodes>\n          <leafValues>\n            3.3302500844001770e-01 5.6790757179260254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 -3.7801829166710377e-03</internalNodes>\n          <leafValues>\n            2.9905349016189575e-01 5.3448081016540527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 -1.3420669734477997e-01</internalNodes>\n          <leafValues>\n            1.4638589322566986e-01 5.3925681114196777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 7.5224548345431685e-04</internalNodes>\n          <leafValues>\n            3.7469539046287537e-01 5.6927347183227539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 -4.0545541793107986e-02</internalNodes>\n          <leafValues>\n            2.7547478675842285e-01 5.4842978715896606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 1.2572970008477569e-03</internalNodes>\n          <leafValues>\n            3.7445840239524841e-01 5.7560759782791138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 -7.4249948374927044e-03</internalNodes>\n          <leafValues>\n            7.5138592720031738e-01 4.7282311320304871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 5.0908129196614027e-04</internalNodes>\n          <leafValues>\n            5.4048967361450195e-01 2.9323211312294006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 -1.2808450264856219e-03</internalNodes>\n          <leafValues>\n            6.1697798967361450e-01 4.2733490467071533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 -1.8348860321566463e-03</internalNodes>\n          <leafValues>\n            2.0484960079193115e-01 5.2064722776412964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 2.7484869584441185e-02</internalNodes>\n          <leafValues>\n            5.2529847621917725e-01 1.6755220293998718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 2.2372419480234385e-03</internalNodes>\n          <leafValues>\n            5.2677828073501587e-01 2.7776581048965454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 -8.8635291904211044e-03</internalNodes>\n          <leafValues>\n            6.9545578956604004e-01 4.8120489716529846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 4.1753971017897129e-03</internalNodes>\n          <leafValues>\n            4.2918878793716431e-01 6.3491958379745483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 -1.7098189564421773e-03</internalNodes>\n          <leafValues>\n            2.9305368661880493e-01 5.3612488508224487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 6.5328548662364483e-03</internalNodes>\n          <leafValues>\n            4.4953250885009766e-01 7.4096941947937012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 -9.5372907817363739e-03</internalNodes>\n          <leafValues>\n            3.1491199135780334e-01 5.4165017604827881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 2.5310989469289780e-02</internalNodes>\n          <leafValues>\n            5.1218920946121216e-01 1.3117079436779022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 3.6460969597101212e-02</internalNodes>\n          <leafValues>\n            5.1759117841720581e-01 2.5913399457931519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 2.0854329690337181e-02</internalNodes>\n          <leafValues>\n            5.1371401548385620e-01 1.5823160111904144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 -8.7207747856155038e-04</internalNodes>\n          <leafValues>\n            5.5743098258972168e-01 4.3989789485931396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 -1.5227000403683633e-05</internalNodes>\n          <leafValues>\n            5.5489408969879150e-01 3.7080699205398560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 -8.4316509310156107e-04</internalNodes>\n          <leafValues>\n            3.3874198794364929e-01 5.5542111396789551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 3.6037859972566366e-03</internalNodes>\n          <leafValues>\n            5.3580617904663086e-01 3.4111711382865906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 -6.8057891912758350e-03</internalNodes>\n          <leafValues>\n            6.1252027750015259e-01 4.3458628654479980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 -4.7021660953760147e-02</internalNodes>\n          <leafValues>\n            2.3581659793853760e-01 5.1937389373779297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 -3.6954108625650406e-02</internalNodes>\n          <leafValues>\n            7.3231112957000732e-01 4.7609439492225647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 1.0439479956403375e-03</internalNodes>\n          <leafValues>\n            5.4194551706314087e-01 3.4113308787345886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 -2.1050689974799752e-04</internalNodes>\n          <leafValues>\n            2.8216940164566040e-01 5.5549472570419312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 -8.0831587314605713e-02</internalNodes>\n          <leafValues>\n            9.1299301385879517e-01 4.6974349021911621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 -3.6579059087671340e-04</internalNodes>\n          <leafValues>\n            6.0226702690124512e-01 3.9782929420471191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 -1.2545920617412776e-04</internalNodes>\n          <leafValues>\n            5.6132131814956665e-01 3.8455399870872498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 -6.8786486983299255e-02</internalNodes>\n          <leafValues>\n            2.2616119682788849e-01 5.3004968166351318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 1.2415789999067783e-02</internalNodes>\n          <leafValues>\n            4.0756919980049133e-01 5.8288121223449707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 -4.7174817882478237e-03</internalNodes>\n          <leafValues>\n            2.8272539377212524e-01 5.2677577733993530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 3.8136858493089676e-02</internalNodes>\n          <leafValues>\n            5.0747412443161011e-01 1.0236159712076187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 -2.8168049175292253e-03</internalNodes>\n          <leafValues>\n            6.1690068244934082e-01 4.3596929311752319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 8.1303603947162628e-03</internalNodes>\n          <leafValues>\n            4.5244330167770386e-01 7.6060950756072998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 6.0056019574403763e-03</internalNodes>\n          <leafValues>\n            5.2404087781906128e-01 1.8597120046615601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 1.9139319658279419e-02</internalNodes>\n          <leafValues>\n            5.2093791961669922e-01 2.3320719599723816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 1.6445759683847427e-02</internalNodes>\n          <leafValues>\n            5.4507029056549072e-01 3.2642349600791931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 -3.7356890738010406e-02</internalNodes>\n          <leafValues>\n            6.9990468025207520e-01 4.5332419872283936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -1.9727900624275208e-02</internalNodes>\n          <leafValues>\n            2.6536649465560913e-01 5.4128098487854004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 6.6972579807043076e-03</internalNodes>\n          <leafValues>\n            4.4805660843849182e-01 7.1386522054672241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 7.4457528535276651e-04</internalNodes>\n          <leafValues>\n            4.2313501238822937e-01 5.4713201522827148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 1.1790640419349074e-03</internalNodes>\n          <leafValues>\n            5.3417021036148071e-01 3.1304550170898438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 3.4980610013008118e-02</internalNodes>\n          <leafValues>\n            5.1186597347259521e-01 3.4305301308631897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 5.6859792675822973e-04</internalNodes>\n          <leafValues>\n            3.5321870446205139e-01 5.4686397314071655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 -1.1340649798512459e-02</internalNodes>\n          <leafValues>\n            2.8423538804054260e-01 5.3487008810043335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 -6.6228108480572701e-03</internalNodes>\n          <leafValues>\n            6.8836402893066406e-01 4.4926649332046509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 -8.0160330981016159e-03</internalNodes>\n          <leafValues>\n            1.7098939418792725e-01 5.2243089675903320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 1.4206819469109178e-03</internalNodes>\n          <leafValues>\n            5.2908462285995483e-01 2.9933831095695496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 -2.7801711112260818e-03</internalNodes>\n          <leafValues>\n            6.4988541603088379e-01 4.4604998826980591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 -1.4747589593753219e-03</internalNodes>\n          <leafValues>\n            3.2604381442070007e-01 5.3881132602691650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 -2.3830339312553406e-02</internalNodes>\n          <leafValues>\n            7.5289410352706909e-01 4.8012199997901917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 6.9369790144264698e-03</internalNodes>\n          <leafValues>\n            5.3351658582687378e-01 3.2614278793334961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 8.2806255668401718e-03</internalNodes>\n          <leafValues>\n            4.5803940296173096e-01 5.7378298044204712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 -1.0439500212669373e-02</internalNodes>\n          <leafValues>\n            2.5923201441764832e-01 5.2338278293609619e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>80</maxWeakCount>\n      <stageThreshold>3.9107288360595703e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 384 7.2006587870419025e-03</internalNodes>\n          <leafValues>\n            3.2588860392570496e-01 6.8498080968856812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 -2.8593589086085558e-03</internalNodes>\n          <leafValues>\n            5.8388811349868774e-01 2.5378298759460449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 6.8580528022721410e-04</internalNodes>\n          <leafValues>\n            5.7080817222595215e-01 2.8124240040779114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 7.9580191522836685e-03</internalNodes>\n          <leafValues>\n            2.5010511279106140e-01 5.5442607402801514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 -1.2124150525778532e-03</internalNodes>\n          <leafValues>\n            2.3853680491447449e-01 5.4333502054214478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 7.9426132142543793e-03</internalNodes>\n          <leafValues>\n            3.9550709724426270e-01 6.2207579612731934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 2.4630590341985226e-03</internalNodes>\n          <leafValues>\n            5.6397080421447754e-01 2.9923579096794128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 -6.0396599583327770e-03</internalNodes>\n          <leafValues>\n            2.1865129470825195e-01 5.4116767644882202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 -1.2988339876756072e-03</internalNodes>\n          <leafValues>\n            2.3507060110569000e-01 5.3645849227905273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 2.2299369447864592e-04</internalNodes>\n          <leafValues>\n            3.8041129708290100e-01 5.7296061515808105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 1.4654280385002494e-03</internalNodes>\n          <leafValues>\n            2.5101679563522339e-01 5.2582687139511108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 -8.1210042117163539e-04</internalNodes>\n          <leafValues>\n            5.9928238391876221e-01 3.8511589169502258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 -1.3836020370945334e-03</internalNodes>\n          <leafValues>\n            5.6813961267471313e-01 3.6365869641304016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 -2.7936449274420738e-02</internalNodes>\n          <leafValues>\n            1.4913170039653778e-01 5.3775602579116821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 -4.6919551095925272e-04</internalNodes>\n          <leafValues>\n            3.6924299597740173e-01 5.5724847316741943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 -4.9829659983515739e-03</internalNodes>\n          <leafValues>\n            6.7585092782974243e-01 4.5325040817260742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 1.8815309740602970e-03</internalNodes>\n          <leafValues>\n            5.3680229187011719e-01 2.9325398802757263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 -1.9067550078034401e-02</internalNodes>\n          <leafValues>\n            1.6493770480155945e-01 5.3300672769546509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 -4.6906559728085995e-03</internalNodes>\n          <leafValues>\n            1.9639259576797485e-01 5.1193618774414062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 5.9777139686048031e-03</internalNodes>\n          <leafValues>\n            4.6711719036102295e-01 7.0083981752395630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 -3.3303130418062210e-02</internalNodes>\n          <leafValues>\n            1.1554169654846191e-01 5.1041620969772339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 9.0744107961654663e-02</internalNodes>\n          <leafValues>\n            5.1496601104736328e-01 1.3061730563640594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 9.3555898638442159e-04</internalNodes>\n          <leafValues>\n            3.6054810881614685e-01 5.4398590326309204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 1.4901650138199329e-02</internalNodes>\n          <leafValues>\n            4.8862120509147644e-01 7.6875698566436768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 6.1594118596985936e-04</internalNodes>\n          <leafValues>\n            5.3568130731582642e-01 3.2409390807151794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 -5.0670988857746124e-02</internalNodes>\n          <leafValues>\n            1.8486219644546509e-01 5.2304041385650635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 6.8665749859064817e-04</internalNodes>\n          <leafValues>\n            3.8405799865722656e-01 5.5179458856582642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 8.3712432533502579e-03</internalNodes>\n          <leafValues>\n            4.2885640263557434e-01 6.1317539215087891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 -1.2953069526702166e-03</internalNodes>\n          <leafValues>\n            2.9136741161346436e-01 5.2807378768920898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 -4.1941680014133453e-02</internalNodes>\n          <leafValues>\n            7.5547999143600464e-01 4.8560309410095215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 -2.3529380559921265e-02</internalNodes>\n          <leafValues>\n            2.8382799029350281e-01 5.2560812234878540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 4.0857449173927307e-02</internalNodes>\n          <leafValues>\n            4.8709350824356079e-01 6.2772971391677856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 -2.5406869128346443e-02</internalNodes>\n          <leafValues>\n            7.0997077226638794e-01 4.5750290155410767e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 -4.1415440500713885e-04</internalNodes>\n          <leafValues>\n            4.0308868885040283e-01 5.4694122076034546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 2.1824119612574577e-02</internalNodes>\n          <leafValues>\n            4.5020240545272827e-01 6.7687010765075684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 1.4114039950072765e-02</internalNodes>\n          <leafValues>\n            5.4428607225418091e-01 3.7917000055313110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 6.7214590671937913e-05</internalNodes>\n          <leafValues>\n            4.2004638910293579e-01 5.8734762668609619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 -7.9417638480663300e-03</internalNodes>\n          <leafValues>\n            3.7925618886947632e-01 5.5852657556533813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 -7.2144409641623497e-03</internalNodes>\n          <leafValues>\n            7.2531038522720337e-01 4.6035489439964294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 2.5817339774221182e-03</internalNodes>\n          <leafValues>\n            4.6933019161224365e-01 5.9002387523651123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 1.3409319519996643e-01</internalNodes>\n          <leafValues>\n            5.1492130756378174e-01 1.8088449537754059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 2.2962710354477167e-03</internalNodes>\n          <leafValues>\n            5.3997439146041870e-01 3.7178671360015869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 -2.1575849968940020e-03</internalNodes>\n          <leafValues>\n            2.4084959924221039e-01 5.1488637924194336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 -4.9196188338100910e-03</internalNodes>\n          <leafValues>\n            6.5735882520675659e-01 4.7387400269508362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 1.6267469618469477e-03</internalNodes>\n          <leafValues>\n            4.1928219795227051e-01 6.3031142950057983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 3.3413388882763684e-04</internalNodes>\n          <leafValues>\n            5.5402982234954834e-01 3.7021011114120483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 -2.6698080822825432e-02</internalNodes>\n          <leafValues>\n            1.7109179496765137e-01 5.1014107465744019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 -3.0561879277229309e-02</internalNodes>\n          <leafValues>\n            1.9042180478572845e-01 5.1687937974929810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 2.8511548880487680e-03</internalNodes>\n          <leafValues>\n            4.4475069642066956e-01 6.3138538599014282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -3.6211479455232620e-02</internalNodes>\n          <leafValues>\n            2.4907270073890686e-01 5.3773492574691772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 -2.4115189444273710e-03</internalNodes>\n          <leafValues>\n            5.3812432289123535e-01 3.6642369627952576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 -7.7253201743587852e-04</internalNodes>\n          <leafValues>\n            5.5302321910858154e-01 3.5415500402450562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 2.9481729143299162e-04</internalNodes>\n          <leafValues>\n            4.1326990723609924e-01 5.6672430038452148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 -6.2334560789167881e-03</internalNodes>\n          <leafValues>\n            9.8787233233451843e-02 5.1986688375473022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 -2.6274729520082474e-02</internalNodes>\n          <leafValues>\n            9.1127492487430573e-02 5.0281071662902832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 5.3212260827422142e-03</internalNodes>\n          <leafValues>\n            4.7266489267349243e-01 6.2227207422256470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 -4.1129058226943016e-03</internalNodes>\n          <leafValues>\n            2.1574570238590240e-01 5.1378047466278076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 3.2457809429615736e-03</internalNodes>\n          <leafValues>\n            5.4107707738876343e-01 3.7217769026756287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 -1.6359709203243256e-02</internalNodes>\n          <leafValues>\n            7.7878749370574951e-01 4.6852919459342957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 3.2166109303943813e-04</internalNodes>\n          <leafValues>\n            5.4789870977401733e-01 4.2403739690780640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 6.4452440710738301e-04</internalNodes>\n          <leafValues>\n            5.3305608034133911e-01 3.5013249516487122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 -7.8909732401371002e-03</internalNodes>\n          <leafValues>\n            6.9235211610794067e-01 4.7265690565109253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 4.8336211591959000e-02</internalNodes>\n          <leafValues>\n            5.0559002161026001e-01 7.5749203562736511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 -7.5178127735853195e-04</internalNodes>\n          <leafValues>\n            3.7837418913841248e-01 5.5385738611221313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 -2.4953910615295172e-03</internalNodes>\n          <leafValues>\n            3.0816510319709778e-01 5.3596121072769165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 -2.2385010961443186e-03</internalNodes>\n          <leafValues>\n            6.6339588165283203e-01 4.6493428945541382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -1.7988430336117744e-03</internalNodes>\n          <leafValues>\n            6.5968447923660278e-01 4.3471878767013550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 8.7860915809869766e-03</internalNodes>\n          <leafValues>\n            5.2318328619003296e-01 2.3155799508094788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 3.6715380847454071e-03</internalNodes>\n          <leafValues>\n            5.2042502164840698e-01 2.9773768782615662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 -3.5336449742317200e-02</internalNodes>\n          <leafValues>\n            7.2388780117034912e-01 4.8615050315856934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -6.9189240457490087e-04</internalNodes>\n          <leafValues>\n            3.1050220131874084e-01 5.2298247814178467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 -3.3946109469980001e-03</internalNodes>\n          <leafValues>\n            3.1389680504798889e-01 5.2101737260818481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 9.8569283727556467e-04</internalNodes>\n          <leafValues>\n            4.5365801453590393e-01 6.5850979089736938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 -5.0163101404905319e-02</internalNodes>\n          <leafValues>\n            1.8044540286064148e-01 5.1989167928695679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 -2.2367259953171015e-03</internalNodes>\n          <leafValues>\n            7.2557020187377930e-01 4.6513590216636658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 7.4326287722215056e-04</internalNodes>\n          <leafValues>\n            4.4129210710525513e-01 5.8985459804534912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 -9.3485182151198387e-04</internalNodes>\n          <leafValues>\n            3.5000529885292053e-01 5.3660178184509277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 1.7497939988970757e-02</internalNodes>\n          <leafValues>\n            4.9121949076652527e-01 8.3152848482131958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 -1.5200000489130616e-03</internalNodes>\n          <leafValues>\n            3.5702759027481079e-01 5.3705602884292603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 7.8003940870985389e-04</internalNodes>\n          <leafValues>\n            4.3537721037864685e-01 5.9673351049423218e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>103</maxWeakCount>\n      <stageThreshold>5.0610481262207031e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 464 -9.9945552647113800e-03</internalNodes>\n          <leafValues>\n            6.1625832319259644e-01 3.0545330047607422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 -1.1085229925811291e-03</internalNodes>\n          <leafValues>\n            5.8182948827743530e-01 3.1555780768394470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 1.0364380432292819e-03</internalNodes>\n          <leafValues>\n            2.5520521402359009e-01 5.6929117441177368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 6.8211311008781195e-04</internalNodes>\n          <leafValues>\n            3.6850899457931519e-01 5.9349310398101807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 -6.8057340104132891e-04</internalNodes>\n          <leafValues>\n            2.3323920369148254e-01 5.4747921228408813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 2.6068789884448051e-04</internalNodes>\n          <leafValues>\n            3.2574570178985596e-01 5.6675457954406738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 5.1607372006401420e-04</internalNodes>\n          <leafValues>\n            3.7447169423103333e-01 5.8454728126525879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 8.5007521556690335e-04</internalNodes>\n          <leafValues>\n            3.4203711152076721e-01 5.5228072404861450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 -1.8607829697430134e-03</internalNodes>\n          <leafValues>\n            2.8044199943542480e-01 5.3754240274429321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 -1.5033970121294260e-03</internalNodes>\n          <leafValues>\n            2.5790509581565857e-01 5.4989522695541382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 2.3478909861296415e-03</internalNodes>\n          <leafValues>\n            4.1751560568809509e-01 6.3137108087539673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 -2.8880240279249847e-04</internalNodes>\n          <leafValues>\n            5.8651697635650635e-01 4.0526661276817322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 8.9405477046966553e-03</internalNodes>\n          <leafValues>\n            5.2111411094665527e-01 2.3186540603637695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 -1.9327739253640175e-02</internalNodes>\n          <leafValues>\n            2.7534329891204834e-01 5.2415257692337036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 -2.0202060113660991e-04</internalNodes>\n          <leafValues>\n            5.7229787111282349e-01 3.6771959066390991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 2.1179069299250841e-03</internalNodes>\n          <leafValues>\n            4.4661080837249756e-01 5.5424308776855469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 -1.7743760254234076e-03</internalNodes>\n          <leafValues>\n            2.8132531046867371e-01 5.3009599447250366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 4.2234458960592747e-03</internalNodes>\n          <leafValues>\n            4.3997099995613098e-01 5.7954281568527222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -1.4375220052897930e-02</internalNodes>\n          <leafValues>\n            2.9811179637908936e-01 5.2920591831207275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 -1.5349180437624454e-02</internalNodes>\n          <leafValues>\n            7.7052152156829834e-01 4.7481718659400940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 1.5152279956964776e-05</internalNodes>\n          <leafValues>\n            3.7188440561294556e-01 5.5768972635269165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 -9.1293919831514359e-03</internalNodes>\n          <leafValues>\n            3.6151960492134094e-01 5.2867668867111206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 2.2512159775942564e-03</internalNodes>\n          <leafValues>\n            5.3647047281265259e-01 3.4862980246543884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 -4.9696918576955795e-03</internalNodes>\n          <leafValues>\n            6.9276517629623413e-01 4.6768361330032349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 -1.2829010374844074e-02</internalNodes>\n          <leafValues>\n            7.7121537923812866e-01 4.6607351303100586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 -9.3660065904259682e-03</internalNodes>\n          <leafValues>\n            3.3749839663505554e-01 5.3512877225875854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 3.2452319283038378e-03</internalNodes>\n          <leafValues>\n            5.3251898288726807e-01 3.2896101474761963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 -1.1723560281097889e-02</internalNodes>\n          <leafValues>\n            6.8376529216766357e-01 4.7543001174926758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 2.9257940695970319e-05</internalNodes>\n          <leafValues>\n            3.5720878839492798e-01 5.3605020046234131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 -2.2244219508138485e-05</internalNodes>\n          <leafValues>\n            5.5414271354675293e-01 3.5520640015602112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 5.0881509669125080e-03</internalNodes>\n          <leafValues>\n            5.0708442926406860e-01 1.2564620375633240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 2.7429679408669472e-02</internalNodes>\n          <leafValues>\n            5.2695602178573608e-01 1.6258180141448975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 -6.4142867922782898e-03</internalNodes>\n          <leafValues>\n            7.1455889940261841e-01 4.5841971039772034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 3.3479959238320589e-03</internalNodes>\n          <leafValues>\n            5.3986120223999023e-01 3.4946969151496887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 -8.2635492086410522e-02</internalNodes>\n          <leafValues>\n            2.4391929805278778e-01 5.1602262258529663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 1.0261740535497665e-03</internalNodes>\n          <leafValues>\n            3.8868919014930725e-01 5.7679080963134766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 -1.6307090409100056e-03</internalNodes>\n          <leafValues>\n            3.3894580602645874e-01 5.3477007150650024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 2.4546680506318808e-03</internalNodes>\n          <leafValues>\n            4.6014139056205750e-01 6.3872468471527100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 -9.9476519972085953e-04</internalNodes>\n          <leafValues>\n            5.7698792219161987e-01 4.1203960776329041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 1.5409190207719803e-02</internalNodes>\n          <leafValues>\n            4.8787090182304382e-01 7.0898222923278809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 1.1784400558099151e-03</internalNodes>\n          <leafValues>\n            5.2635532617568970e-01 2.8952449560165405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 -2.7701919898390770e-02</internalNodes>\n          <leafValues>\n            1.4988289773464203e-01 5.2196067571640015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 -2.9505399987101555e-02</internalNodes>\n          <leafValues>\n            2.4893319234251976e-02 4.9998161196708679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 4.5159430010244250e-04</internalNodes>\n          <leafValues>\n            5.4646229743957520e-01 4.0296629071235657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 7.1772639639675617e-03</internalNodes>\n          <leafValues>\n            4.2710569500923157e-01 5.8662968873977661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 -7.4182048439979553e-02</internalNodes>\n          <leafValues>\n            6.8741792440414429e-01 4.9190279841423035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 -1.7254160717129707e-02</internalNodes>\n          <leafValues>\n            3.3706760406494141e-01 5.3487390279769897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 1.4851559884846210e-02</internalNodes>\n          <leafValues>\n            4.6267929673194885e-01 6.1299049854278564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 1.0002000257372856e-02</internalNodes>\n          <leafValues>\n            5.3461229801177979e-01 3.4234538674354553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 2.0138120744377375e-03</internalNodes>\n          <leafValues>\n            4.6438300609588623e-01 5.8243042230606079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 1.5135470312088728e-03</internalNodes>\n          <leafValues>\n            5.1963961124420166e-01 2.8561499714851379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 3.1381431035697460e-03</internalNodes>\n          <leafValues>\n            4.8381629586219788e-01 5.9585297107696533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 -5.1450440660119057e-03</internalNodes>\n          <leafValues>\n            8.9203029870986938e-01 4.7414121031761169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 -4.4736708514392376e-03</internalNodes>\n          <leafValues>\n            2.0339429378509521e-01 5.3372788429260254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 1.9628470763564110e-03</internalNodes>\n          <leafValues>\n            4.5716339349746704e-01 6.7258632183074951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 5.4260450415313244e-03</internalNodes>\n          <leafValues>\n            5.2711081504821777e-01 2.8456708788871765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 4.9611460417509079e-04</internalNodes>\n          <leafValues>\n            4.1383129358291626e-01 5.7185977697372437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 9.3728788197040558e-03</internalNodes>\n          <leafValues>\n            5.2251511812210083e-01 2.8048470616340637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 6.0500897234305739e-04</internalNodes>\n          <leafValues>\n            5.2367687225341797e-01 3.3145239949226379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 5.6792551185935736e-04</internalNodes>\n          <leafValues>\n            4.5310598611831665e-01 6.2769711017608643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 2.4644339457154274e-02</internalNodes>\n          <leafValues>\n            5.1308518648147583e-01 2.0171439647674561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 -1.0290450416505337e-02</internalNodes>\n          <leafValues>\n            7.7865952253341675e-01 4.8766410350799561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 2.0629419013857841e-03</internalNodes>\n          <leafValues>\n            4.2885988950729370e-01 5.8812642097473145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 -5.0519481301307678e-03</internalNodes>\n          <leafValues>\n            3.5239779949188232e-01 5.2860087156295776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 -5.7692620903253555e-03</internalNodes>\n          <leafValues>\n            6.8410861492156982e-01 4.5880940556526184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 -4.5789941214025021e-04</internalNodes>\n          <leafValues>\n            3.5655200481414795e-01 5.4859781265258789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 -7.5918837683275342e-04</internalNodes>\n          <leafValues>\n            3.3687931299209595e-01 5.2541971206665039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 -1.7737259622663260e-03</internalNodes>\n          <leafValues>\n            3.4221610426902771e-01 5.4540151357650757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 -8.5610467940568924e-03</internalNodes>\n          <leafValues>\n            6.5336120128631592e-01 4.4858568906784058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 1.7277270089834929e-03</internalNodes>\n          <leafValues>\n            5.3075802326202393e-01 3.9253529906272888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 -2.8199609369039536e-02</internalNodes>\n          <leafValues>\n            6.8574589490890503e-01 4.5885840058326721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 -1.7781109781935811e-03</internalNodes>\n          <leafValues>\n            4.0378510951995850e-01 5.3698569536209106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 3.3177141449414194e-04</internalNodes>\n          <leafValues>\n            5.3997987508773804e-01 3.7057501077651978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 2.6385399978607893e-03</internalNodes>\n          <leafValues>\n            4.6654370427131653e-01 6.4527308940887451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 -2.1183069329708815e-03</internalNodes>\n          <leafValues>\n            5.9147810935974121e-01 4.0646770596504211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 -1.4773289673030376e-02</internalNodes>\n          <leafValues>\n            3.6420381069183350e-01 5.2947628498077393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 -1.6815440729260445e-02</internalNodes>\n          <leafValues>\n            2.6642319560050964e-01 5.1449728012084961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 -6.3370140269398689e-03</internalNodes>\n          <leafValues>\n            6.7795312404632568e-01 4.8520979285240173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 -4.4560048991115764e-05</internalNodes>\n          <leafValues>\n            5.6139647960662842e-01 4.1530540585517883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 -1.0240620467811823e-03</internalNodes>\n          <leafValues>\n            5.9644782543182373e-01 4.5663040876388550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 -2.3161689750850201e-03</internalNodes>\n          <leafValues>\n            2.9761150479316711e-01 5.1881599426269531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 5.3217571973800659e-01</internalNodes>\n          <leafValues>\n            5.1878392696380615e-01 2.2026319801807404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 -1.6643050312995911e-01</internalNodes>\n          <leafValues>\n            1.8660229444503784e-01 5.0603431463241577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 1.1253529787063599e-01</internalNodes>\n          <leafValues>\n            5.2121251821517944e-01 1.1850229650735855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 9.3046864494681358e-03</internalNodes>\n          <leafValues>\n            4.5899370312690735e-01 6.8261492252349854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 -4.6255099587142467e-03</internalNodes>\n          <leafValues>\n            3.0799409747123718e-01 5.2250087261199951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 -1.1116469651460648e-01</internalNodes>\n          <leafValues>\n            2.1010440587997437e-01 5.0808018445968628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 -1.0888439603149891e-02</internalNodes>\n          <leafValues>\n            5.7653552293777466e-01 4.7904640436172485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 5.8564301580190659e-03</internalNodes>\n          <leafValues>\n            5.0651001930236816e-01 1.5635989606380463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 5.4854389280080795e-02</internalNodes>\n          <leafValues>\n            4.9669149518013000e-01 7.2305107116699219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 -1.1197339743375778e-02</internalNodes>\n          <leafValues>\n            2.1949790418148041e-01 5.0987982749938965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 4.4069071300327778e-03</internalNodes>\n          <leafValues>\n            4.7784018516540527e-01 6.7709028720855713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -6.3665293157100677e-02</internalNodes>\n          <leafValues>\n            1.9363629817962646e-01 5.0810241699218750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 -9.8081491887569427e-03</internalNodes>\n          <leafValues>\n            5.9990632534027100e-01 4.8103410005569458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 -2.1717099007219076e-03</internalNodes>\n          <leafValues>\n            3.3383339643478394e-01 5.2354729175567627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 -1.3315520249307156e-02</internalNodes>\n          <leafValues>\n            6.6170698404312134e-01 4.9192130565643311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 2.5442079640924931e-03</internalNodes>\n          <leafValues>\n            4.4887441396713257e-01 6.0821849107742310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 561 1.2037839740514755e-02</internalNodes>\n          <leafValues>\n            5.4093921184539795e-01 3.2924321293830872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 -2.0701050758361816e-02</internalNodes>\n          <leafValues>\n            6.8191200494766235e-01 4.5949959754943848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 2.7608279138803482e-02</internalNodes>\n          <leafValues>\n            4.6307921409606934e-01 5.7672828435897827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 1.2370620388537645e-03</internalNodes>\n          <leafValues>\n            5.1653790473937988e-01 2.6350161433219910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 -3.7669338285923004e-02</internalNodes>\n          <leafValues>\n            2.5363931059837341e-01 5.2789801359176636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 -1.8057259730994701e-03</internalNodes>\n          <leafValues>\n            3.9851561188697815e-01 5.5175000429153442e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>111</maxWeakCount>\n      <stageThreshold>5.4620071411132812e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 567 4.4299028813838959e-03</internalNodes>\n          <leafValues>\n            2.8910180926322937e-01 6.3352262973785400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 -2.3813319858163595e-03</internalNodes>\n          <leafValues>\n            6.2117892503738403e-01 3.4774878621101379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 2.2915711160749197e-03</internalNodes>\n          <leafValues>\n            2.2544120252132416e-01 5.5821180343627930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 9.9457940086722374e-04</internalNodes>\n          <leafValues>\n            3.7117108702659607e-01 5.9300708770751953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 7.7164667891338468e-04</internalNodes>\n          <leafValues>\n            5.6517201662063599e-01 3.3479958772659302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 -1.1386410333216190e-03</internalNodes>\n          <leafValues>\n            3.0691260099411011e-01 5.5086308717727661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 -1.6403039626311511e-04</internalNodes>\n          <leafValues>\n            5.7628279924392700e-01 3.6990478634834290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 2.9793529392918572e-05</internalNodes>\n          <leafValues>\n            2.6442441344261169e-01 5.4379111528396606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 8.5774902254343033e-03</internalNodes>\n          <leafValues>\n            5.0511389970779419e-01 1.7957249283790588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 -2.6032689493149519e-04</internalNodes>\n          <leafValues>\n            5.8269691467285156e-01 4.4468268752098083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 -6.1404630541801453e-03</internalNodes>\n          <leafValues>\n            3.1138521432876587e-01 5.3469717502593994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 -2.3086950182914734e-02</internalNodes>\n          <leafValues>\n            3.2779461145401001e-01 5.3311979770660400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 -1.4243650250136852e-02</internalNodes>\n          <leafValues>\n            7.3817098140716553e-01 4.5880630612373352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 1.9487129524350166e-02</internalNodes>\n          <leafValues>\n            5.2566307783126831e-01 2.2744719684123993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 -9.6681108698248863e-04</internalNodes>\n          <leafValues>\n            5.5112308263778687e-01 3.8150069117546082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 3.1474709976464510e-03</internalNodes>\n          <leafValues>\n            5.4256367683410645e-01 2.5437268614768982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 -1.8026070029009134e-04</internalNodes>\n          <leafValues>\n            5.3801918029785156e-01 3.4063041210174561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 -6.0266260989010334e-03</internalNodes>\n          <leafValues>\n            3.0358019471168518e-01 5.4205721616744995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 4.4462960795499384e-04</internalNodes>\n          <leafValues>\n            3.9909970760345459e-01 5.6601101160049438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 2.2609760053455830e-03</internalNodes>\n          <leafValues>\n            5.5628067255020142e-01 3.9406880736351013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 5.1133058965206146e-02</internalNodes>\n          <leafValues>\n            4.6096539497375488e-01 7.1185618638992310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 -1.7786309123039246e-02</internalNodes>\n          <leafValues>\n            2.3161660134792328e-01 5.3221440315246582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 -4.9679628573358059e-03</internalNodes>\n          <leafValues>\n            2.3307719826698303e-01 5.1220291852951050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 2.0667689386755228e-03</internalNodes>\n          <leafValues>\n            4.6574440598487854e-01 6.4554882049560547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 7.4413768015801907e-03</internalNodes>\n          <leafValues>\n            5.1543921232223511e-01 2.3616339266300201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 -3.6277279723435640e-03</internalNodes>\n          <leafValues>\n            6.2197732925415039e-01 4.4766610860824585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 -5.3530759178102016e-03</internalNodes>\n          <leafValues>\n            1.8373550474643707e-01 5.1022082567214966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 1.4530919492244720e-01</internalNodes>\n          <leafValues>\n            5.1459872722625732e-01 1.5359309315681458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 2.4394490756094456e-03</internalNodes>\n          <leafValues>\n            5.3436601161956787e-01 3.6246618628501892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 596 -3.1283390708267689e-03</internalNodes>\n          <leafValues>\n            6.2150079011917114e-01 4.8455920815467834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 1.7940260004252195e-03</internalNodes>\n          <leafValues>\n            4.2992618680000305e-01 5.8241981267929077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 3.6253821104764938e-02</internalNodes>\n          <leafValues>\n            5.2603340148925781e-01 1.4394679665565491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 -5.1746722310781479e-03</internalNodes>\n          <leafValues>\n            3.5065388679504395e-01 5.2870452404022217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 6.5383297624066472e-04</internalNodes>\n          <leafValues>\n            4.8096409440040588e-01 6.1220401525497437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 -2.6480229571461678e-02</internalNodes>\n          <leafValues>\n            1.1393620073795319e-01 5.0455862283706665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 -3.0440660193562508e-03</internalNodes>\n          <leafValues>\n            6.3520950078964233e-01 4.7947341203689575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 3.6993520334362984e-03</internalNodes>\n          <leafValues>\n            5.1311182975769043e-01 2.4985109269618988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 -3.6762931267730892e-04</internalNodes>\n          <leafValues>\n            5.4213947057723999e-01 3.7095320224761963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 -4.1382260620594025e-02</internalNodes>\n          <leafValues>\n            1.8949599564075470e-01 5.0816917419433594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 -1.0532729793339968e-03</internalNodes>\n          <leafValues>\n            6.4543670415878296e-01 4.7836089134216309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 -2.1648600231856108e-03</internalNodes>\n          <leafValues>\n            6.2150311470031738e-01 4.4998261332511902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 -5.6747748749330640e-04</internalNodes>\n          <leafValues>\n            3.7126109004020691e-01 5.4193347692489624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 1.7375840246677399e-01</internalNodes>\n          <leafValues>\n            5.0236439704895020e-01 1.2157420068979263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 -2.9049699660390615e-03</internalNodes>\n          <leafValues>\n            3.2402679324150085e-01 5.3818839788436890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 1.2299539521336555e-03</internalNodes>\n          <leafValues>\n            4.1655078530311584e-01 5.7034862041473389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 -5.4329237900674343e-04</internalNodes>\n          <leafValues>\n            3.8540428876876831e-01 5.5475491285324097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 -8.3297258242964745e-03</internalNodes>\n          <leafValues>\n            2.2044940292835236e-01 5.0970828533172607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 -1.0417630255687982e-04</internalNodes>\n          <leafValues>\n            5.6070661544799805e-01 4.3030360341072083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 3.1204700469970703e-02</internalNodes>\n          <leafValues>\n            4.6216571331024170e-01 6.9820040464401245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 7.8943502157926559e-03</internalNodes>\n          <leafValues>\n            5.2695941925048828e-01 2.2690680623054504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 -4.3645310215651989e-03</internalNodes>\n          <leafValues>\n            6.3592231273651123e-01 4.5379561185836792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 7.6793059706687927e-03</internalNodes>\n          <leafValues>\n            5.2747678756713867e-01 2.7404838800430298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 -2.5431139394640923e-02</internalNodes>\n          <leafValues>\n            2.0385199785232544e-01 5.0717329978942871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 8.2000601105391979e-04</internalNodes>\n          <leafValues>\n            4.5874550938606262e-01 6.1198681592941284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 2.9284600168466568e-03</internalNodes>\n          <leafValues>\n            5.0712740421295166e-01 2.0282049477100372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 4.5256470912136137e-05</internalNodes>\n          <leafValues>\n            4.8121041059494019e-01 5.4308217763900757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 1.3158309739083052e-03</internalNodes>\n          <leafValues>\n            4.6258139610290527e-01 6.7793232202529907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 1.5870389761403203e-03</internalNodes>\n          <leafValues>\n            5.3862917423248291e-01 3.4314650297164917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 -2.1539660170674324e-02</internalNodes>\n          <leafValues>\n            2.5942500680685043e-02 5.0032228231430054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 1.4334480278193951e-02</internalNodes>\n          <leafValues>\n            5.2028447389602661e-01 1.5906329452991486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 -8.3881383761763573e-03</internalNodes>\n          <leafValues>\n            7.2824811935424805e-01 4.6480441093444824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 9.1906841844320297e-03</internalNodes>\n          <leafValues>\n            5.5623567104339600e-01 3.9231911301612854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 -5.8453059755265713e-03</internalNodes>\n          <leafValues>\n            6.8033927679061890e-01 4.6291279792785645e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 -5.4707799106836319e-02</internalNodes>\n          <leafValues>\n            2.5616711378097534e-01 5.2061259746551514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 9.1142775490880013e-03</internalNodes>\n          <leafValues>\n            5.1896202564239502e-01 3.0538770556449890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 -1.5575000084936619e-02</internalNodes>\n          <leafValues>\n            1.2950749695301056e-01 5.1690948009490967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 -1.2050600344082341e-04</internalNodes>\n          <leafValues>\n            5.7350981235504150e-01 4.2308250069618225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 1.2273970060050488e-03</internalNodes>\n          <leafValues>\n            5.2898782491683960e-01 4.0797919034957886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 -1.2186600361019373e-03</internalNodes>\n          <leafValues>\n            6.5756398439407349e-01 4.5744091272354126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 -3.3256649039685726e-03</internalNodes>\n          <leafValues>\n            3.6280471086502075e-01 5.1950198411941528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 -1.3288309797644615e-02</internalNodes>\n          <leafValues>\n            1.2842659652233124e-01 5.0434887409210205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 -3.3839771058410406e-03</internalNodes>\n          <leafValues>\n            6.2922400236129761e-01 4.7575059533119202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 -2.1954220533370972e-01</internalNodes>\n          <leafValues>\n            1.4877319335937500e-01 5.0650137662887573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 4.9111708067357540e-03</internalNodes>\n          <leafValues>\n            4.2561021447181702e-01 5.6658387184143066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 -1.8744950648397207e-04</internalNodes>\n          <leafValues>\n            4.0041440725326538e-01 5.5868571996688843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 -5.2178641781210899e-03</internalNodes>\n          <leafValues>\n            6.0091161727905273e-01 4.8127061128616333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 -1.1111519997939467e-03</internalNodes>\n          <leafValues>\n            3.5149338841438293e-01 5.2870899438858032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 4.4036400504410267e-03</internalNodes>\n          <leafValues>\n            4.6422758698463440e-01 5.9240859746932983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 1.2299499660730362e-01</internalNodes>\n          <leafValues>\n            5.0255292654037476e-01 6.9152481853961945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 -1.2313510291278362e-02</internalNodes>\n          <leafValues>\n            5.8845919370651245e-01 4.9340128898620605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 4.1471039876341820e-03</internalNodes>\n          <leafValues>\n            4.3722391128540039e-01 5.8934777975082397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 -3.5502649843692780e-03</internalNodes>\n          <leafValues>\n            4.3275511264801025e-01 5.3962701559066772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 -1.9224269315600395e-02</internalNodes>\n          <leafValues>\n            1.9131340086460114e-01 5.0683307647705078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 1.4395059552043676e-03</internalNodes>\n          <leafValues>\n            5.3081780672073364e-01 4.2435330152511597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 -6.7751999013125896e-03</internalNodes>\n          <leafValues>\n            6.3653957843780518e-01 4.5400860905647278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 7.0119630545377731e-03</internalNodes>\n          <leafValues>\n            5.1898342370986938e-01 3.0261999368667603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 5.4014651104807854e-03</internalNodes>\n          <leafValues>\n            5.1050621271133423e-01 2.5576829910278320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 9.0274988906458020e-04</internalNodes>\n          <leafValues>\n            4.6969148516654968e-01 5.8618277311325073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 1.1474450118839741e-02</internalNodes>\n          <leafValues>\n            5.0536459684371948e-01 1.5271779894828796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 -6.7023430019617081e-03</internalNodes>\n          <leafValues>\n            6.5089809894561768e-01 4.8906040191650391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 -2.0462959073483944e-03</internalNodes>\n          <leafValues>\n            6.2418168783187866e-01 4.5146000385284424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 -9.9951568990945816e-03</internalNodes>\n          <leafValues>\n            3.4327811002731323e-01 5.4009538888931274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 -3.5700708627700806e-02</internalNodes>\n          <leafValues>\n            1.8780590593814850e-01 5.0740778446197510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 4.5584561303257942e-04</internalNodes>\n          <leafValues>\n            3.8052770495414734e-01 5.4025697708129883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 -5.4260600358247757e-02</internalNodes>\n          <leafValues>\n            6.8437147140502930e-01 4.5950970053672791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 6.0600461438298225e-03</internalNodes>\n          <leafValues>\n            5.5029052495956421e-01 4.5005279779434204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 -6.4791832119226456e-03</internalNodes>\n          <leafValues>\n            3.3688580989837646e-01 5.3107571601867676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 -1.4939469983801246e-03</internalNodes>\n          <leafValues>\n            6.4876401424407959e-01 4.7561758756637573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 1.4610530342906713e-05</internalNodes>\n          <leafValues>\n            4.0345790982246399e-01 5.4510641098022461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 -7.2321938350796700e-03</internalNodes>\n          <leafValues>\n            6.3868737220764160e-01 4.8247399926185608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 -4.0645818226039410e-03</internalNodes>\n          <leafValues>\n            2.9864218831062317e-01 5.1573359966278076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 3.0463080853223801e-02</internalNodes>\n          <leafValues>\n            5.0221997499465942e-01 7.1599560976028442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 -8.0544911324977875e-03</internalNodes>\n          <leafValues>\n            6.4924520254135132e-01 4.6192750334739685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 3.9505138993263245e-02</internalNodes>\n          <leafValues>\n            5.1505708694458008e-01 2.4506139755249023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 8.4530208259820938e-03</internalNodes>\n          <leafValues>\n            4.5736691355705261e-01 6.3940370082855225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 -1.1688120430335402e-03</internalNodes>\n          <leafValues>\n            3.8655120134353638e-01 5.4836612939834595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 2.8070670086890459e-03</internalNodes>\n          <leafValues>\n            5.1285791397094727e-01 2.7014800906181335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 4.7365209320560098e-04</internalNodes>\n          <leafValues>\n            4.0515819191932678e-01 5.3874611854553223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 1.1741080321371555e-02</internalNodes>\n          <leafValues>\n            5.2959501743316650e-01 3.7194138765335083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 3.1833238899707794e-03</internalNodes>\n          <leafValues>\n            4.7894069552421570e-01 6.8951261043548584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 7.0241501089185476e-04</internalNodes>\n          <leafValues>\n            5.3844892978668213e-01 3.9180809259414673e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>102</maxWeakCount>\n      <stageThreshold>5.0169731140136719e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 678 1.7059929668903351e-02</internalNodes>\n          <leafValues>\n            3.9485278725624084e-01 7.1425348520278931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 2.1840840578079224e-02</internalNodes>\n          <leafValues>\n            3.3703160285949707e-01 6.0900169610977173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 2.4520049919374287e-04</internalNodes>\n          <leafValues>\n            3.5005760192871094e-01 5.9879022836685181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 8.3272606134414673e-03</internalNodes>\n          <leafValues>\n            3.2675281167030334e-01 5.6972408294677734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 5.7148298947140574e-04</internalNodes>\n          <leafValues>\n            3.0445998907089233e-01 5.5316567420959473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 6.7373987985774875e-04</internalNodes>\n          <leafValues>\n            3.6500120162963867e-01 5.6726312637329102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 3.4681590477703139e-05</internalNodes>\n          <leafValues>\n            3.3135411143302917e-01 5.3887271881103516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 -5.8563398197293282e-03</internalNodes>\n          <leafValues>\n            2.6979428529739380e-01 5.4987788200378418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 8.5102273151278496e-03</internalNodes>\n          <leafValues>\n            5.2693581581115723e-01 2.7628791332244873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 -6.9817207753658295e-02</internalNodes>\n          <leafValues>\n            2.9096031188964844e-01 5.2592468261718750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 -8.6113670840859413e-04</internalNodes>\n          <leafValues>\n            5.8925771713256836e-01 4.0736979246139526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 9.7149249631911516e-04</internalNodes>\n          <leafValues>\n            3.5235640406608582e-01 5.4158622026443481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 -1.4727490452060010e-05</internalNodes>\n          <leafValues>\n            5.4230177402496338e-01 3.5031560063362122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 4.8420291393995285e-02</internalNodes>\n          <leafValues>\n            5.1939457654953003e-01 3.4111958742141724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 1.3257140526548028e-03</internalNodes>\n          <leafValues>\n            3.1577691435813904e-01 5.3353762626647949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 1.4922149603080470e-05</internalNodes>\n          <leafValues>\n            4.4512999057769775e-01 5.5365538597106934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 -2.7173398993909359e-03</internalNodes>\n          <leafValues>\n            3.0317419767379761e-01 5.2480888366699219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 2.9219500720500946e-03</internalNodes>\n          <leafValues>\n            4.7814530134201050e-01 6.6060417890548706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 -1.9804988987743855e-03</internalNodes>\n          <leafValues>\n            3.1863081455230713e-01 5.2876251935958862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 -4.0012109093368053e-03</internalNodes>\n          <leafValues>\n            6.4135968685150146e-01 4.7499281167984009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 -4.3491991236805916e-03</internalNodes>\n          <leafValues>\n            1.5074980258941650e-01 5.0989967584609985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 699 1.3490889687091112e-03</internalNodes>\n          <leafValues>\n            4.3161588907241821e-01 5.8811670541763306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 1.8597070127725601e-02</internalNodes>\n          <leafValues>\n            4.7355538606643677e-01 9.0897941589355469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 -1.8562379991635680e-03</internalNodes>\n          <leafValues>\n            3.5531890392303467e-01 5.5778372287750244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 2.2940430790185928e-03</internalNodes>\n          <leafValues>\n            4.5000949501991272e-01 6.5808779001235962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 2.9982850537635386e-04</internalNodes>\n          <leafValues>\n            5.6292420625686646e-01 3.9758789539337158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 3.5455459728837013e-03</internalNodes>\n          <leafValues>\n            5.3815472126007080e-01 3.6054858565330505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 9.6104722470045090e-03</internalNodes>\n          <leafValues>\n            5.2559971809387207e-01 1.7967459559440613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 -6.2783220782876015e-03</internalNodes>\n          <leafValues>\n            2.2728569805622101e-01 5.1140302419662476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 3.4598479978740215e-03</internalNodes>\n          <leafValues>\n            4.6263080835342407e-01 6.6082191467285156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 -1.3112019514665008e-03</internalNodes>\n          <leafValues>\n            6.3175398111343384e-01 4.4368579983711243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 2.6876179035753012e-03</internalNodes>\n          <leafValues>\n            5.4211097955703735e-01 4.0540221333503723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 3.9118169806897640e-03</internalNodes>\n          <leafValues>\n            5.3584778308868408e-01 3.2734549045562744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 711 -1.4206450432538986e-02</internalNodes>\n          <leafValues>\n            7.7935767173767090e-01 4.9757811427116394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 7.1705528534948826e-04</internalNodes>\n          <leafValues>\n            5.2973198890686035e-01 3.5609039664268494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 1.6635019565001130e-03</internalNodes>\n          <leafValues>\n            4.6780940890312195e-01 5.8164817094802856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 3.3686188980937004e-03</internalNodes>\n          <leafValues>\n            5.2767342329025269e-01 3.4464201331138611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 1.2799530290067196e-02</internalNodes>\n          <leafValues>\n            4.8346799612045288e-01 7.4721592664718628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 3.3901201095432043e-03</internalNodes>\n          <leafValues>\n            4.5118591189384460e-01 6.4017212390899658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 4.7070779837667942e-03</internalNodes>\n          <leafValues>\n            5.3356587886810303e-01 3.5552209615707397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 1.4819339849054813e-03</internalNodes>\n          <leafValues>\n            4.2507070302963257e-01 5.7727241516113281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 -6.9995759986341000e-03</internalNodes>\n          <leafValues>\n            3.0033200979232788e-01 5.2929002046585083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 1.5939010307192802e-02</internalNodes>\n          <leafValues>\n            5.0673192739486694e-01 1.6755819320678711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 7.6377349905669689e-03</internalNodes>\n          <leafValues>\n            4.7950699925422668e-01 7.0856010913848877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 6.7334040068089962e-03</internalNodes>\n          <leafValues>\n            5.1331132650375366e-01 2.1624700725078583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 -1.2858809903264046e-02</internalNodes>\n          <leafValues>\n            1.9388419389724731e-01 5.2513718605041504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 -6.2270800117403269e-04</internalNodes>\n          <leafValues>\n            5.6865382194519043e-01 4.1978681087493896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 -5.2651681471616030e-04</internalNodes>\n          <leafValues>\n            4.2241689562797546e-01 5.4296958446502686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 1.1075099930167198e-02</internalNodes>\n          <leafValues>\n            5.1137751340866089e-01 2.5145179033279419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 -3.6728251725435257e-02</internalNodes>\n          <leafValues>\n            7.1946620941162109e-01 4.8496189713478088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 -2.8207109426148236e-04</internalNodes>\n          <leafValues>\n            3.8402619957923889e-01 5.3944462537765503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 -2.7489690110087395e-03</internalNodes>\n          <leafValues>\n            5.9370887279510498e-01 4.5691820979118347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 1.0047519579529762e-02</internalNodes>\n          <leafValues>\n            5.1385760307312012e-01 2.8022980690002441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -8.1497840583324432e-03</internalNodes>\n          <leafValues>\n            6.0900372266769409e-01 4.6361210942268372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 -6.8833888508379459e-03</internalNodes>\n          <leafValues>\n            3.4586110711097717e-01 5.2546602487564087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 -1.4039360394235700e-05</internalNodes>\n          <leafValues>\n            5.6931042671203613e-01 4.0820831060409546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 1.5498419525101781e-03</internalNodes>\n          <leafValues>\n            4.3505370616912842e-01 5.8065170049667358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 -6.7841499112546444e-03</internalNodes>\n          <leafValues>\n            1.4688730239868164e-01 5.1827752590179443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 2.1705629478674382e-04</internalNodes>\n          <leafValues>\n            5.2935242652893066e-01 3.4561741352081299e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 3.1198898795992136e-04</internalNodes>\n          <leafValues>\n            4.6524509787559509e-01 5.9424138069152832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 5.4507530294358730e-03</internalNodes>\n          <leafValues>\n            4.6535089612007141e-01 7.0248460769653320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 -2.5818689027801156e-04</internalNodes>\n          <leafValues>\n            5.4972952604293823e-01 3.7689670920372009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 -1.7442539334297180e-02</internalNodes>\n          <leafValues>\n            3.9190879464149475e-01 5.4574978351593018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 -4.5343529433012009e-02</internalNodes>\n          <leafValues>\n            1.6313570737838745e-01 5.1549088954925537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 1.9190689781680703e-03</internalNodes>\n          <leafValues>\n            5.1458978652954102e-01 2.7918958663940430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 -6.0177869163453579e-03</internalNodes>\n          <leafValues>\n            6.5176361799240112e-01 4.7563329339027405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 -4.0720738470554352e-03</internalNodes>\n          <leafValues>\n            5.5146527290344238e-01 4.0926858782768250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 745 3.9855059003457427e-04</internalNodes>\n          <leafValues>\n            3.1652408838272095e-01 5.2855509519577026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 -6.5418570302426815e-03</internalNodes>\n          <leafValues>\n            6.8533778190612793e-01 4.6528089046478271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 3.4845089539885521e-03</internalNodes>\n          <leafValues>\n            5.4845881462097168e-01 4.5027598738670349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 -1.3696780428290367e-02</internalNodes>\n          <leafValues>\n            6.3957798480987549e-01 4.5725551247596741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 -1.7347140237689018e-02</internalNodes>\n          <leafValues>\n            2.7510729432106018e-01 5.1816147565841675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 -4.0885428898036480e-03</internalNodes>\n          <leafValues>\n            3.3256360888481140e-01 5.1949840784072876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 -9.4687901437282562e-03</internalNodes>\n          <leafValues>\n            5.9422808885574341e-01 4.8518198728561401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 1.7084840219467878e-03</internalNodes>\n          <leafValues>\n            4.1671109199523926e-01 5.5198061466217041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 9.4809094443917274e-03</internalNodes>\n          <leafValues>\n            5.4338949918746948e-01 4.2085149884223938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 -4.7389650717377663e-03</internalNodes>\n          <leafValues>\n            6.4071899652481079e-01 4.5606550574302673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 6.5761050209403038e-03</internalNodes>\n          <leafValues>\n            5.2145552635192871e-01 2.2582270205020905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 -2.1690549328923225e-03</internalNodes>\n          <leafValues>\n            3.1515279412269592e-01 5.1567047834396362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 1.4660170301795006e-02</internalNodes>\n          <leafValues>\n            4.8708370327949524e-01 6.6899412870407104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 1.7231999663636088e-04</internalNodes>\n          <leafValues>\n            3.5697489976882935e-01 5.2510780096054077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 -2.1803760901093483e-02</internalNodes>\n          <leafValues>\n            8.8259208202362061e-01 4.9663299322128296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 -9.4736106693744659e-02</internalNodes>\n          <leafValues>\n            1.4461620151996613e-01 5.0611138343811035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 5.5825551971793175e-03</internalNodes>\n          <leafValues>\n            5.3964787721633911e-01 4.2380660772323608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 1.9517090404406190e-03</internalNodes>\n          <leafValues>\n            4.1704109311103821e-01 5.4977869987487793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 1.2149900197982788e-02</internalNodes>\n          <leafValues>\n            4.6983671188354492e-01 5.6642740964889526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 -7.5169620104134083e-03</internalNodes>\n          <leafValues>\n            6.2677729129791260e-01 4.4631358981132507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 -7.1667909622192383e-02</internalNodes>\n          <leafValues>\n            3.0970111489295959e-01 5.2210032939910889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 -8.8292419910430908e-02</internalNodes>\n          <leafValues>\n            8.1123888492584229e-02 5.0063651800155640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 3.1063079833984375e-02</internalNodes>\n          <leafValues>\n            5.1555037498474121e-01 1.2822559475898743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 4.6621840447187424e-02</internalNodes>\n          <leafValues>\n            4.6997779607772827e-01 7.3639607429504395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 -1.2189489789307117e-02</internalNodes>\n          <leafValues>\n            3.9205300807952881e-01 5.5189967155456543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 1.3016110286116600e-02</internalNodes>\n          <leafValues>\n            5.2606582641601562e-01 3.6851361393928528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 -3.4952899441123009e-03</internalNodes>\n          <leafValues>\n            6.3392949104309082e-01 4.7162809967994690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 -4.4015039748046547e-05</internalNodes>\n          <leafValues>\n            5.3330272436141968e-01 3.7761849164962769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 -1.0966490209102631e-01</internalNodes>\n          <leafValues>\n            1.7653420567512512e-01 5.1983469724655151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 -9.0279558207839727e-04</internalNodes>\n          <leafValues>\n            5.3241598606109619e-01 3.8389080762863159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 7.1126641705632210e-04</internalNodes>\n          <leafValues>\n            4.6479299664497375e-01 5.7552242279052734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 -3.1250279862433672e-03</internalNodes>\n          <leafValues>\n            3.2367089390754700e-01 5.1667708158493042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 2.4144679773598909e-03</internalNodes>\n          <leafValues>\n            4.7874391078948975e-01 6.4597177505493164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 4.4391240226104856e-04</internalNodes>\n          <leafValues>\n            4.4093081355094910e-01 6.0102558135986328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 -2.2611189342569560e-04</internalNodes>\n          <leafValues>\n            4.0381139516830444e-01 5.4932558536529541e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>135</maxWeakCount>\n      <stageThreshold>6.6669120788574219e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 780 -4.6901289373636246e-02</internalNodes>\n          <leafValues>\n            6.6001719236373901e-01 3.7438011169433594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 -1.4568349579349160e-03</internalNodes>\n          <leafValues>\n            5.7839912176132202e-01 3.4377971291542053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 5.5598369799554348e-03</internalNodes>\n          <leafValues>\n            3.6222669482231140e-01 5.9082162380218506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 7.3170487303286791e-04</internalNodes>\n          <leafValues>\n            5.5004191398620605e-01 2.8735581040382385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 1.3318009441718459e-03</internalNodes>\n          <leafValues>\n            2.6731699705123901e-01 5.4310190677642822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 2.4347059661522508e-04</internalNodes>\n          <leafValues>\n            3.8550278544425964e-01 5.7413887977600098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 -3.0512469820678234e-03</internalNodes>\n          <leafValues>\n            5.5032098293304443e-01 3.4628450870513916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 -6.8657199153676629e-04</internalNodes>\n          <leafValues>\n            3.2912218570709229e-01 5.4295092821121216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 1.4668200165033340e-03</internalNodes>\n          <leafValues>\n            3.5883820056915283e-01 5.3518110513687134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 3.2021870720200241e-04</internalNodes>\n          <leafValues>\n            4.2968419194221497e-01 5.7002341747283936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 7.4122188379988074e-04</internalNodes>\n          <leafValues>\n            5.2821648120880127e-01 3.3668708801269531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 3.8330298848450184e-03</internalNodes>\n          <leafValues>\n            4.5595678687095642e-01 6.2573361396789551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 -1.5456439927220345e-02</internalNodes>\n          <leafValues>\n            2.3501169681549072e-01 5.1294529438018799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 2.6796779129654169e-03</internalNodes>\n          <leafValues>\n            5.3294152021408081e-01 4.1550621390342712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 2.8296569362282753e-03</internalNodes>\n          <leafValues>\n            4.2730879783630371e-01 5.8045381307601929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 -3.9444249123334885e-03</internalNodes>\n          <leafValues>\n            2.9126119613647461e-01 5.2026861906051636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 2.7179559692740440e-03</internalNodes>\n          <leafValues>\n            5.3076881170272827e-01 3.5856771469116211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 5.9077627956867218e-03</internalNodes>\n          <leafValues>\n            4.7037750482559204e-01 5.9415858983993530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 -4.2240349575877190e-03</internalNodes>\n          <leafValues>\n            2.1415670216083527e-01 5.0887960195541382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 4.0725888684391975e-03</internalNodes>\n          <leafValues>\n            4.7664138674736023e-01 6.8410611152648926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 1.0149530135095119e-02</internalNodes>\n          <leafValues>\n            5.3607988357543945e-01 3.7484970688819885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 -1.8864999583456665e-04</internalNodes>\n          <leafValues>\n            5.7201302051544189e-01 3.8538050651550293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 -4.8864358104765415e-03</internalNodes>\n          <leafValues>\n            3.6931228637695312e-01 5.3409588336944580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 2.6158479973673820e-02</internalNodes>\n          <leafValues>\n            4.9623748660087585e-01 6.0599899291992188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 4.8560759751126170e-04</internalNodes>\n          <leafValues>\n            4.4389459490776062e-01 6.0124689340591431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 1.1268709786236286e-02</internalNodes>\n          <leafValues>\n            5.2442502975463867e-01 1.8403880298137665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 -2.8114619199186563e-03</internalNodes>\n          <leafValues>\n            6.0602837800979614e-01 4.4098970293998718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 -5.6112729944288731e-03</internalNodes>\n          <leafValues>\n            3.8911709189414978e-01 5.5892372131347656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 8.5680093616247177e-03</internalNodes>\n          <leafValues>\n            5.0693458318710327e-01 2.0626190304756165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 -3.8172779022715986e-04</internalNodes>\n          <leafValues>\n            5.8822017908096313e-01 4.1926109790802002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 -1.7680290329735726e-04</internalNodes>\n          <leafValues>\n            5.5336058139801025e-01 4.0033689141273499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 6.5112537704408169e-03</internalNodes>\n          <leafValues>\n            3.3101469278335571e-01 5.4441910982131958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 -6.5948683186434209e-05</internalNodes>\n          <leafValues>\n            5.4338318109512329e-01 3.9449059963226318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 6.9939051754772663e-03</internalNodes>\n          <leafValues>\n            5.6003582477569580e-01 4.1927140951156616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 -4.6744439750909805e-03</internalNodes>\n          <leafValues>\n            6.6854667663574219e-01 4.6049609780311584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 1.1589850299060345e-02</internalNodes>\n          <leafValues>\n            5.3571212291717529e-01 2.9268300533294678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 1.3007840141654015e-02</internalNodes>\n          <leafValues>\n            4.6798178553581238e-01 7.3074632883071899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 -1.1008579749614000e-03</internalNodes>\n          <leafValues>\n            3.9375010132789612e-01 5.4150652885437012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 6.0472649056464434e-04</internalNodes>\n          <leafValues>\n            4.2423760890960693e-01 5.6040412187576294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -1.4494840055704117e-02</internalNodes>\n          <leafValues>\n            3.6312100291252136e-01 5.2931827306747437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 -5.3056948818266392e-03</internalNodes>\n          <leafValues>\n            6.8604522943496704e-01 4.6218210458755493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 -8.1829127157106996e-04</internalNodes>\n          <leafValues>\n            3.9440968632698059e-01 5.4204392433166504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 -1.9077520817518234e-02</internalNodes>\n          <leafValues>\n            1.9626219570636749e-01 5.0378918647766113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 3.5549470339901745e-04</internalNodes>\n          <leafValues>\n            4.0862590074539185e-01 5.6139731407165527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 1.9679730758070946e-03</internalNodes>\n          <leafValues>\n            4.4891211390495300e-01 5.9261232614517212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 6.9189141504466534e-03</internalNodes>\n          <leafValues>\n            5.3359258174896240e-01 3.7283858656883240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 2.9872779268771410e-03</internalNodes>\n          <leafValues>\n            5.1113212108612061e-01 2.9756438732147217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 827 -6.2264618463814259e-03</internalNodes>\n          <leafValues>\n            5.5414897203445435e-01 4.8245379328727722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 1.3353300280869007e-02</internalNodes>\n          <leafValues>\n            4.5864239335060120e-01 6.4147979021072388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 3.3505238592624664e-02</internalNodes>\n          <leafValues>\n            5.3924250602722168e-01 3.4299948811531067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 -2.5294460356235504e-03</internalNodes>\n          <leafValues>\n            1.7037139832973480e-01 5.0133150815963745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 -1.2801629491150379e-03</internalNodes>\n          <leafValues>\n            5.3054618835449219e-01 4.6974050998687744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 7.0687388069927692e-03</internalNodes>\n          <leafValues>\n            4.6155458688735962e-01 6.4365047216415405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 9.6880499040707946e-04</internalNodes>\n          <leafValues>\n            4.8335990309715271e-01 6.0438942909240723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 3.9647659286856651e-03</internalNodes>\n          <leafValues>\n            5.1876372098922729e-01 3.2318168878555298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 -2.2057730704545975e-02</internalNodes>\n          <leafValues>\n            4.0792569518089294e-01 5.2009809017181396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 -6.6906312713399529e-04</internalNodes>\n          <leafValues>\n            5.3316092491149902e-01 3.8156008720397949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -6.7009328631684184e-04</internalNodes>\n          <leafValues>\n            5.6554222106933594e-01 4.6889019012451172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 838 7.4284552829340100e-04</internalNodes>\n          <leafValues>\n            4.5343810319900513e-01 6.2874001264572144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 2.2227810695767403e-03</internalNodes>\n          <leafValues>\n            5.3506332635879517e-01 3.3036559820175171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 -5.4130521602928638e-03</internalNodes>\n          <leafValues>\n            1.1136870086193085e-01 5.0054347515106201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 -1.4520040167553816e-05</internalNodes>\n          <leafValues>\n            5.6287378072738647e-01 4.3251338601112366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 2.3369169502984732e-04</internalNodes>\n          <leafValues>\n            4.1658350825309753e-01 5.4477912187576294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 4.2894547805190086e-03</internalNodes>\n          <leafValues>\n            4.8603910207748413e-01 6.7786490917205811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 5.9103150852024555e-03</internalNodes>\n          <leafValues>\n            5.2623051404953003e-01 3.6121138930320740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 1.2900539673864841e-02</internalNodes>\n          <leafValues>\n            5.3193771839141846e-01 3.2502880692481995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 4.6982979401946068e-03</internalNodes>\n          <leafValues>\n            4.6182450652122498e-01 6.6659259796142578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 1.0439859703183174e-02</internalNodes>\n          <leafValues>\n            5.5056709051132202e-01 3.8836041092872620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 3.0443191062659025e-03</internalNodes>\n          <leafValues>\n            4.6978530287742615e-01 7.3018449544906616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 -6.1593751888722181e-04</internalNodes>\n          <leafValues>\n            3.8308390974998474e-01 5.4649841785430908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 -3.4247159492224455e-03</internalNodes>\n          <leafValues>\n            2.5663000345230103e-01 5.0895309448242188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 -9.3538565561175346e-03</internalNodes>\n          <leafValues>\n            6.4699661731719971e-01 4.9407958984375000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 5.2338998764753342e-02</internalNodes>\n          <leafValues>\n            4.7459828853607178e-01 7.8787708282470703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 3.5765620414167643e-03</internalNodes>\n          <leafValues>\n            5.3066647052764893e-01 2.7484980225563049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 7.1555317845195532e-04</internalNodes>\n          <leafValues>\n            5.4131257534027100e-01 4.0419089794158936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 -1.0516679845750332e-02</internalNodes>\n          <leafValues>\n            6.1585122346878052e-01 4.8152831196784973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 7.7347927726805210e-03</internalNodes>\n          <leafValues>\n            4.6958059072494507e-01 7.0289808511734009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 -4.3226778507232666e-03</internalNodes>\n          <leafValues>\n            2.8495660424232483e-01 5.3046840429306030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 -2.5534399319440126e-03</internalNodes>\n          <leafValues>\n            7.0569849014282227e-01 4.6888920664787292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 1.0268510231981054e-04</internalNodes>\n          <leafValues>\n            3.9029321074485779e-01 5.5734640359878540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 7.1395188570022583e-06</internalNodes>\n          <leafValues>\n            3.6842319369316101e-01 5.2639877796173096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 -1.6711989883333445e-03</internalNodes>\n          <leafValues>\n            3.8491758704185486e-01 5.3872710466384888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 4.9260449595749378e-03</internalNodes>\n          <leafValues>\n            4.7297719120979309e-01 7.4472510814666748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 4.3908702209591866e-03</internalNodes>\n          <leafValues>\n            4.8091810941696167e-01 5.5919218063354492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 -1.7793629318475723e-02</internalNodes>\n          <leafValues>\n            6.9036781787872314e-01 4.6769270300865173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 2.0469669252634048e-03</internalNodes>\n          <leafValues>\n            5.3706902265548706e-01 3.3081620931625366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 2.9891489073634148e-02</internalNodes>\n          <leafValues>\n            5.1398652791976929e-01 3.3090591430664062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 1.5494900289922953e-03</internalNodes>\n          <leafValues>\n            4.6602371335029602e-01 6.0783427953720093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 1.4956969534978271e-03</internalNodes>\n          <leafValues>\n            4.4048359990119934e-01 5.8639198541641235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 9.5885928021743894e-04</internalNodes>\n          <leafValues>\n            5.4359710216522217e-01 4.2085230350494385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 4.9643701640889049e-04</internalNodes>\n          <leafValues>\n            5.3705781698226929e-01 4.0006220340728760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 -2.7280810754746199e-03</internalNodes>\n          <leafValues>\n            5.6594127416610718e-01 4.2596429586410522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 2.3026480339467525e-03</internalNodes>\n          <leafValues>\n            5.1616579294204712e-01 3.3508691191673279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 2.5151631236076355e-01</internalNodes>\n          <leafValues>\n            4.8696619272232056e-01 7.1473097801208496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 -4.6328022144734859e-03</internalNodes>\n          <leafValues>\n            2.7274489402770996e-01 5.0837898254394531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 -4.0434490889310837e-02</internalNodes>\n          <leafValues>\n            6.8514388799667358e-01 5.0217670202255249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 1.4972220014897175e-05</internalNodes>\n          <leafValues>\n            4.2844650149345398e-01 5.5225551128387451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 -2.4050309730228037e-04</internalNodes>\n          <leafValues>\n            4.2261189222335815e-01 5.3900748491287231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 2.3657839745283127e-02</internalNodes>\n          <leafValues>\n            4.7446319460868835e-01 7.5043660402297974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 -8.1449104472994804e-03</internalNodes>\n          <leafValues>\n            4.2450588941574097e-01 5.5383628606796265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 -3.6992130335420370e-03</internalNodes>\n          <leafValues>\n            5.9523570537567139e-01 4.5297130942344666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 -6.7718601785600185e-03</internalNodes>\n          <leafValues>\n            4.1377940773963928e-01 5.4733997583389282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 4.2669530957937241e-03</internalNodes>\n          <leafValues>\n            4.4841149449348450e-01 5.7979941368103027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 1.7791989957913756e-03</internalNodes>\n          <leafValues>\n            5.6248587369918823e-01 4.4324448704719543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 1.6774770338088274e-03</internalNodes>\n          <leafValues>\n            4.6377518773078918e-01 6.3642418384552002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 1.1732629500329494e-03</internalNodes>\n          <leafValues>\n            4.5445030927658081e-01 5.9144157171249390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 8.6998171173036098e-04</internalNodes>\n          <leafValues>\n            5.3347527980804443e-01 3.8859179615974426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 7.6378340600058436e-04</internalNodes>\n          <leafValues>\n            5.3985852003097534e-01 3.7449419498443604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 1.5684569370932877e-04</internalNodes>\n          <leafValues>\n            4.3178731203079224e-01 5.6146162748336792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 -2.1511370316147804e-02</internalNodes>\n          <leafValues>\n            1.7859250307083130e-01 5.1855427026748657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 1.3081369979772717e-04</internalNodes>\n          <leafValues>\n            4.3424990773200989e-01 5.6828498840332031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 2.1992040798068047e-02</internalNodes>\n          <leafValues>\n            5.1617169380187988e-01 2.3793940246105194e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 -8.0136500764638186e-04</internalNodes>\n          <leafValues>\n            5.9867632389068604e-01 4.4664269685745239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 -8.2736099138855934e-03</internalNodes>\n          <leafValues>\n            4.1082179546356201e-01 5.2510571479797363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 3.6831789184361696e-03</internalNodes>\n          <leafValues>\n            5.1738142967224121e-01 3.3975180983543396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 -7.9525681212544441e-03</internalNodes>\n          <leafValues>\n            6.8889832496643066e-01 4.8459240794181824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 1.5382299898192286e-03</internalNodes>\n          <leafValues>\n            5.1785671710968018e-01 3.4541139006614685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 -1.4043530449271202e-02</internalNodes>\n          <leafValues>\n            1.6784210503101349e-01 5.1886677742004395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 1.4315890148282051e-03</internalNodes>\n          <leafValues>\n            4.3682569265365601e-01 5.6557738780975342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 -3.4014228731393814e-02</internalNodes>\n          <leafValues>\n            7.8022962808609009e-01 4.9592170119285583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 -1.2027299962937832e-02</internalNodes>\n          <leafValues>\n            1.5851010382175446e-01 5.0322318077087402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 1.3316619396209717e-01</internalNodes>\n          <leafValues>\n            5.1633048057556152e-01 2.7551281452178955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 -1.5221949433907866e-03</internalNodes>\n          <leafValues>\n            3.7283179163932800e-01 5.2145522832870483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 -9.3929271679371595e-04</internalNodes>\n          <leafValues>\n            5.8383792638778687e-01 4.5111650228500366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 2.7719739824533463e-02</internalNodes>\n          <leafValues>\n            4.7282868623733521e-01 7.3315447568893433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 3.1030150130391121e-03</internalNodes>\n          <leafValues>\n            5.3022021055221558e-01 4.1015630960464478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 7.7861219644546509e-02</internalNodes>\n          <leafValues>\n            4.9983340501785278e-01 1.2729619443416595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 -1.5854939818382263e-02</internalNodes>\n          <leafValues>\n            5.0833359360694885e-02 5.1656562089920044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 -4.9725300632417202e-03</internalNodes>\n          <leafValues>\n            6.7981338500976562e-01 4.6842318773269653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 -9.7676506265997887e-04</internalNodes>\n          <leafValues>\n            6.0107719898223877e-01 4.7889319062232971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 -2.4647710379213095e-03</internalNodes>\n          <leafValues>\n            3.3933979272842407e-01 5.2205038070678711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 -6.7937700077891350e-03</internalNodes>\n          <leafValues>\n            4.3651369214057922e-01 5.2396631240844727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 3.2608021050691605e-02</internalNodes>\n          <leafValues>\n            5.0527238845825195e-01 2.4252149462699890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 -5.8514421107247472e-04</internalNodes>\n          <leafValues>\n            5.7339739799499512e-01 4.7585740685462952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 -2.9632600024342537e-02</internalNodes>\n          <leafValues>\n            3.8922891020774841e-01 5.2635979652404785e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>137</maxWeakCount>\n      <stageThreshold>6.7698921203613281e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 915 4.6550851315259933e-02</internalNodes>\n          <leafValues>\n            3.2769501209259033e-01 6.2405228614807129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 7.9537127166986465e-03</internalNodes>\n          <leafValues>\n            4.2564851045608521e-01 6.9429391622543335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 6.8221561377868056e-04</internalNodes>\n          <leafValues>\n            3.7114870548248291e-01 5.9007328748703003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 -1.9348249770700932e-04</internalNodes>\n          <leafValues>\n            2.0411339402198792e-01 5.3005450963973999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 -2.6710508973337710e-04</internalNodes>\n          <leafValues>\n            5.4161262512207031e-01 3.1031790375709534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 2.7818060480058193e-03</internalNodes>\n          <leafValues>\n            5.2778327465057373e-01 3.4670698642730713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 -4.6779078547842801e-04</internalNodes>\n          <leafValues>\n            5.3082311153411865e-01 3.2944920659065247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 -3.0335160772665404e-05</internalNodes>\n          <leafValues>\n            5.7738727331161499e-01 3.8520970940589905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 7.8038009814918041e-04</internalNodes>\n          <leafValues>\n            4.3174389004707336e-01 6.1500579118728638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 -4.2553851380944252e-03</internalNodes>\n          <leafValues>\n            2.9339039325714111e-01 5.3242927789688110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -2.4735610350035131e-04</internalNodes>\n          <leafValues>\n            5.4688447713851929e-01 3.8430300354957581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 -1.4724259381182492e-04</internalNodes>\n          <leafValues>\n            4.2815428972244263e-01 5.7555872201919556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 1.1864770203828812e-03</internalNodes>\n          <leafValues>\n            3.7473011016845703e-01 5.4714661836624146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 2.3936580400913954e-03</internalNodes>\n          <leafValues>\n            4.5377838611602783e-01 6.1115288734436035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 -1.5390539774671197e-03</internalNodes>\n          <leafValues>\n            2.9713419079780579e-01 5.1895380020141602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 -7.1968790143728256e-03</internalNodes>\n          <leafValues>\n            6.6990667581558228e-01 4.7264769673347473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 -4.1499789222143590e-04</internalNodes>\n          <leafValues>\n            3.3849540352821350e-01 5.2603179216384888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 4.4359830208122730e-03</internalNodes>\n          <leafValues>\n            5.3991222381591797e-01 3.9201408624649048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 2.6606200262904167e-03</internalNodes>\n          <leafValues>\n            4.4825780391693115e-01 6.1196178197860718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 -1.5287200221791863e-03</internalNodes>\n          <leafValues>\n            3.7112379074096680e-01 5.3402662277221680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 -4.7397250309586525e-03</internalNodes>\n          <leafValues>\n            6.0310882329940796e-01 4.4551450014114380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 -1.4829129911959171e-02</internalNodes>\n          <leafValues>\n            2.8387540578842163e-01 5.3418618440628052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 9.2275557108223438e-04</internalNodes>\n          <leafValues>\n            5.2095472812652588e-01 3.3616539835929871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 8.3529807627201080e-02</internalNodes>\n          <leafValues>\n            5.1199698448181152e-01 8.1164449453353882e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 -7.5633148662745953e-04</internalNodes>\n          <leafValues>\n            3.3171200752258301e-01 5.1898312568664551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 9.8403859883546829e-03</internalNodes>\n          <leafValues>\n            5.2475982904434204e-01 2.3349590599536896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 -1.5953830443322659e-03</internalNodes>\n          <leafValues>\n            5.7500940561294556e-01 4.2956221103668213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 3.4766020689858124e-05</internalNodes>\n          <leafValues>\n            4.3424451351165771e-01 5.5640292167663574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 2.9862910509109497e-02</internalNodes>\n          <leafValues>\n            4.5791471004486084e-01 6.5791881084442139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 1.1325590312480927e-02</internalNodes>\n          <leafValues>\n            5.2743119001388550e-01 3.6738881468772888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 -8.7828645482659340e-03</internalNodes>\n          <leafValues>\n            7.1003687381744385e-01 4.6421670913696289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 4.3639959767460823e-03</internalNodes>\n          <leafValues>\n            5.2792161703109741e-01 2.7058771252632141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 4.1804728098213673e-03</internalNodes>\n          <leafValues>\n            5.0725251436233521e-01 2.4490830302238464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 -4.5668511302210391e-04</internalNodes>\n          <leafValues>\n            4.2831051349639893e-01 5.5486911535263062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 -3.7140368949621916e-03</internalNodes>\n          <leafValues>\n            5.5193877220153809e-01 4.1036531329154968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 -2.5304289534687996e-02</internalNodes>\n          <leafValues>\n            6.8670022487640381e-01 4.8698890209197998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 -3.4454080741852522e-04</internalNodes>\n          <leafValues>\n            3.7288740277290344e-01 5.2876931428909302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 -8.3935231668874621e-04</internalNodes>\n          <leafValues>\n            6.0601520538330078e-01 4.6160620450973511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 1.7280049622058868e-02</internalNodes>\n          <leafValues>\n            5.0496357679367065e-01 1.8198239803314209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 -6.3595077954232693e-03</internalNodes>\n          <leafValues>\n            1.6312399506568909e-01 5.2327787876129150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 1.0298109846189618e-03</internalNodes>\n          <leafValues>\n            4.4632780551910400e-01 6.1765491962432861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 1.0117109632119536e-03</internalNodes>\n          <leafValues>\n            5.4733848571777344e-01 4.3006989359855652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 -1.0308800265192986e-02</internalNodes>\n          <leafValues>\n            1.1669850349426270e-01 5.0008672475814819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 5.4682018235325813e-03</internalNodes>\n          <leafValues>\n            4.7692871093750000e-01 6.7192137241363525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 -9.1696460731327534e-04</internalNodes>\n          <leafValues>\n            3.4710898995399475e-01 5.1781648397445679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 2.3922820109874010e-03</internalNodes>\n          <leafValues>\n            4.7852361202239990e-01 6.2163108587265015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 -7.5573818758130074e-03</internalNodes>\n          <leafValues>\n            5.8147960901260376e-01 4.4100850820541382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 -7.7024032361805439e-04</internalNodes>\n          <leafValues>\n            3.8780000805854797e-01 5.4657220840454102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 -8.7125990539789200e-03</internalNodes>\n          <leafValues>\n            1.6600510478019714e-01 4.9958360195159912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 -1.0306320153176785e-02</internalNodes>\n          <leafValues>\n            4.0933910012245178e-01 5.2742338180541992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 -2.0940979011356831e-03</internalNodes>\n          <leafValues>\n            6.2061947584152222e-01 4.5722800493240356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 6.8099051713943481e-03</internalNodes>\n          <leafValues>\n            5.5677592754364014e-01 4.1556000709533691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 -1.0746059706434608e-03</internalNodes>\n          <leafValues>\n            5.6389278173446655e-01 4.3530249595642090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 2.1550289820879698e-03</internalNodes>\n          <leafValues>\n            4.8262658715248108e-01 6.7497581243515015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 3.1742319464683533e-02</internalNodes>\n          <leafValues>\n            5.0483798980712891e-01 1.8832489848136902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 -7.8382723033428192e-02</internalNodes>\n          <leafValues>\n            2.3695489764213562e-01 5.2601581811904907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 5.7415119372308254e-03</internalNodes>\n          <leafValues>\n            5.0488287210464478e-01 2.7764698863029480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 -2.9014600440859795e-03</internalNodes>\n          <leafValues>\n            6.2386047840118408e-01 4.6933171153068542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 973 -2.6427931152284145e-03</internalNodes>\n          <leafValues>\n            3.3141419291496277e-01 5.1697772741317749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 -1.0949660092592239e-01</internalNodes>\n          <leafValues>\n            2.3800450563430786e-01 5.1834410429000854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 7.4075913289561868e-05</internalNodes>\n          <leafValues>\n            4.0696358680725098e-01 5.3621500730514526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 -5.0593802006915212e-04</internalNodes>\n          <leafValues>\n            5.5067062377929688e-01 4.3745940923690796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 977 -8.2131777890026569e-04</internalNodes>\n          <leafValues>\n            5.5257099866867065e-01 4.2093759775161743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 -6.0276539443293586e-05</internalNodes>\n          <leafValues>\n            5.4554748535156250e-01 4.7482660412788391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 6.8065142259001732e-03</internalNodes>\n          <leafValues>\n            5.1579958200454712e-01 3.4245771169662476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 1.7202789895236492e-03</internalNodes>\n          <leafValues>\n            5.0132077932357788e-01 6.3312637805938721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 -1.3016929733566940e-04</internalNodes>\n          <leafValues>\n            5.5397182703018188e-01 4.2268699407577515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 -4.8016388900578022e-03</internalNodes>\n          <leafValues>\n            4.4250950217247009e-01 5.4307800531387329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 -2.5399310979992151e-03</internalNodes>\n          <leafValues>\n            7.1457821130752563e-01 4.6976050734519958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 -1.4278929447755218e-03</internalNodes>\n          <leafValues>\n            4.0704450011253357e-01 5.3996050357818604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 -2.5142550468444824e-02</internalNodes>\n          <leafValues>\n            7.8846907615661621e-01 4.7473520040512085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 -3.8899609353393316e-03</internalNodes>\n          <leafValues>\n            4.2961919307708740e-01 5.5771100521087646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 4.3947459198534489e-03</internalNodes>\n          <leafValues>\n            4.6931621432304382e-01 7.0239442586898804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 2.4678420275449753e-02</internalNodes>\n          <leafValues>\n            5.2423220872879028e-01 3.8125100731849670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 3.8047678768634796e-02</internalNodes>\n          <leafValues>\n            5.0117397308349609e-01 1.6878280043601990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 990 7.9424865543842316e-03</internalNodes>\n          <leafValues>\n            4.8285821080207825e-01 6.3695681095123291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 991 -1.5110049862414598e-03</internalNodes>\n          <leafValues>\n            5.9064859151840210e-01 4.4876679778099060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 992 6.4201741479337215e-03</internalNodes>\n          <leafValues>\n            5.2410978078842163e-01 2.9905700683593750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 993 -2.9802159406244755e-03</internalNodes>\n          <leafValues>\n            3.0414658784866333e-01 5.0784897804260254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 994 -7.4580078944563866e-04</internalNodes>\n          <leafValues>\n            4.1281390190124512e-01 5.2568262815475464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 995 -1.0470950044691563e-02</internalNodes>\n          <leafValues>\n            5.8083951473236084e-01 4.4942960143089294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 996 9.3369204550981522e-03</internalNodes>\n          <leafValues>\n            5.2465528249740601e-01 2.6589488983154297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 997 2.7936900034546852e-02</internalNodes>\n          <leafValues>\n            4.6749550104141235e-01 7.0872569084167480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 998 7.4277678504586220e-03</internalNodes>\n          <leafValues>\n            5.4094868898391724e-01 3.7585180997848511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 999 -2.3584509268403053e-02</internalNodes>\n          <leafValues>\n            3.7586399912834167e-01 5.2385509014129639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1000 1.1452640173956752e-03</internalNodes>\n          <leafValues>\n            4.3295788764953613e-01 5.8042472600936890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1001 -4.3468660442158580e-04</internalNodes>\n          <leafValues>\n            5.2806180715560913e-01 3.8730698823928833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1002 1.0648540221154690e-02</internalNodes>\n          <leafValues>\n            4.9021130800247192e-01 5.6812518835067749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1003 -3.9418050437234342e-04</internalNodes>\n          <leafValues>\n            5.5708801746368408e-01 4.3182510137557983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1004 -1.3270479394122958e-04</internalNodes>\n          <leafValues>\n            5.6584399938583374e-01 4.3435549736022949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1005 -2.0125510636717081e-03</internalNodes>\n          <leafValues>\n            6.0567390918731689e-01 4.5375239849090576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1006 2.4854319635778666e-03</internalNodes>\n          <leafValues>\n            5.3904771804809570e-01 4.1380101442337036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1007 1.8237880431115627e-03</internalNodes>\n          <leafValues>\n            4.3548288941383362e-01 5.7171887159347534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1008 -1.6656659543514252e-02</internalNodes>\n          <leafValues>\n            3.0109131336212158e-01 5.2161228656768799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1009 8.0349558265879750e-04</internalNodes>\n          <leafValues>\n            5.3001511096954346e-01 3.8183969259262085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1010 3.4170378930866718e-03</internalNodes>\n          <leafValues>\n            5.3280287981033325e-01 4.2414000630378723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1011 -3.6222729249857366e-04</internalNodes>\n          <leafValues>\n            5.4917281866073608e-01 4.1869771480560303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1012 -1.1630020290613174e-01</internalNodes>\n          <leafValues>\n            1.4407220482826233e-01 5.2264511585235596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1013 -1.4695010147988796e-02</internalNodes>\n          <leafValues>\n            7.7477252483367920e-01 4.7157171368598938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1014 2.1972130052745342e-03</internalNodes>\n          <leafValues>\n            5.3554338216781616e-01 3.3156448602676392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1015 -4.6965209185145795e-04</internalNodes>\n          <leafValues>\n            5.7672351598739624e-01 4.4581368565559387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1016 6.5144998952746391e-03</internalNodes>\n          <leafValues>\n            5.2156740427017212e-01 3.6478888988494873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1017 2.1300060674548149e-02</internalNodes>\n          <leafValues>\n            4.9942049384117126e-01 1.5679509937763214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1018 3.1881409231573343e-03</internalNodes>\n          <leafValues>\n            4.7422000765800476e-01 6.2872701883316040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1019 9.0019777417182922e-04</internalNodes>\n          <leafValues>\n            5.3479540348052979e-01 3.9437520503997803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1020 -5.1772277802228928e-03</internalNodes>\n          <leafValues>\n            6.7271918058395386e-01 5.0131380558013916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1021 -4.3764649890363216e-03</internalNodes>\n          <leafValues>\n            3.1066751480102539e-01 5.1287931203842163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1022 2.6299960445612669e-03</internalNodes>\n          <leafValues>\n            4.8863101005554199e-01 5.7552158832550049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1023 -2.0458688959479332e-03</internalNodes>\n          <leafValues>\n            6.0257941484451294e-01 4.5580768585205078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1024 6.9482706487178802e-02</internalNodes>\n          <leafValues>\n            5.2407479286193848e-01 2.1852590143680573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1025 2.4048939347267151e-02</internalNodes>\n          <leafValues>\n            5.0118672847747803e-01 2.0906220376491547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1026 3.1095340382307768e-03</internalNodes>\n          <leafValues>\n            4.8667120933532715e-01 7.1085482835769653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1027 -1.2503260513767600e-03</internalNodes>\n          <leafValues>\n            3.4078910946846008e-01 5.1561951637268066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1028 -1.0281190043315291e-03</internalNodes>\n          <leafValues>\n            5.5755722522735596e-01 4.4394320249557495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1029 -8.8893622159957886e-03</internalNodes>\n          <leafValues>\n            6.4020007848739624e-01 4.6204420924186707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1030 -6.1094801640138030e-04</internalNodes>\n          <leafValues>\n            3.7664419412612915e-01 5.4488998651504517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1031 -5.7686357758939266e-03</internalNodes>\n          <leafValues>\n            3.3186489343643188e-01 5.1336771249771118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1032 1.8506490159779787e-03</internalNodes>\n          <leafValues>\n            4.9035701155662537e-01 6.4069348573684692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1033 -9.9799469113349915e-02</internalNodes>\n          <leafValues>\n            1.5360510349273682e-01 5.0155621767044067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1034 -3.5128349065780640e-01</internalNodes>\n          <leafValues>\n            5.8823131024837494e-02 5.1743787527084351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1035 -4.5244570821523666e-02</internalNodes>\n          <leafValues>\n            6.9614887237548828e-01 4.6778729557991028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1036 7.1481578052043915e-02</internalNodes>\n          <leafValues>\n            5.1679861545562744e-01 1.0380929708480835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1037 2.1895780228078365e-03</internalNodes>\n          <leafValues>\n            4.2730781435966492e-01 5.5320608615875244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1038 -5.9242651332169771e-04</internalNodes>\n          <leafValues>\n            4.6389439702033997e-01 5.2763891220092773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1039 1.6788389766588807e-03</internalNodes>\n          <leafValues>\n            5.3016489744186401e-01 3.9320349693298340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1040 -2.2163488902151585e-03</internalNodes>\n          <leafValues>\n            5.6306940317153931e-01 4.7570338845252991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1041 1.1568699846975505e-04</internalNodes>\n          <leafValues>\n            4.3075358867645264e-01 5.5357027053833008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1042 -7.2017288766801357e-03</internalNodes>\n          <leafValues>\n            1.4448820054531097e-01 5.1930642127990723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1043 8.9081272017210722e-04</internalNodes>\n          <leafValues>\n            4.3844321370124817e-01 5.5936211347579956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1044 1.9605009583756328e-04</internalNodes>\n          <leafValues>\n            5.3404158353805542e-01 4.7059568762779236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1045 5.2022142335772514e-04</internalNodes>\n          <leafValues>\n            5.2138561010360718e-01 3.8100790977478027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1046 9.4588572392240167e-04</internalNodes>\n          <leafValues>\n            4.7694149613380432e-01 6.1307388544082642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1047 9.1698471806012094e-05</internalNodes>\n          <leafValues>\n            4.2450091242790222e-01 5.4293632507324219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1048 2.1833200007677078e-03</internalNodes>\n          <leafValues>\n            5.4577308893203735e-01 4.1910758614540100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1049 -8.6039671441540122e-04</internalNodes>\n          <leafValues>\n            5.7645887136459351e-01 4.4716599583625793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1050 -1.3236239552497864e-02</internalNodes>\n          <leafValues>\n            6.3728231191635132e-01 4.6950098872184753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1051 4.3376701069064438e-04</internalNodes>\n          <leafValues>\n            5.3178739547729492e-01 3.9458298683166504e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>140</maxWeakCount>\n      <stageThreshold>6.9229873657226562e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1052 -2.4847149848937988e-02</internalNodes>\n          <leafValues>\n            6.5555167198181152e-01 3.8733118772506714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1053 6.1348611488938332e-03</internalNodes>\n          <leafValues>\n            3.7480720877647400e-01 5.9739977121353149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1054 6.4498498104512691e-03</internalNodes>\n          <leafValues>\n            5.4254919290542603e-01 2.5488111376762390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1055 6.3491211039945483e-04</internalNodes>\n          <leafValues>\n            2.4624420702457428e-01 5.3872537612915039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1056 1.4023890253156424e-03</internalNodes>\n          <leafValues>\n            5.5943220853805542e-01 3.5286578536033630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1057 3.0044000595808029e-04</internalNodes>\n          <leafValues>\n            3.9585039019584656e-01 5.7659381628036499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1058 1.0042409849120304e-04</internalNodes>\n          <leafValues>\n            3.6989969015121460e-01 5.5349981784820557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1059 -5.0841490738093853e-03</internalNodes>\n          <leafValues>\n            3.7110909819602966e-01 5.5478000640869141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1060 -1.9537260755896568e-02</internalNodes>\n          <leafValues>\n            7.4927550554275513e-01 4.5792970061302185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1061 -7.4532740654831287e-06</internalNodes>\n          <leafValues>\n            5.6497871875762939e-01 3.9040699601173401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1062 -3.6079459823668003e-03</internalNodes>\n          <leafValues>\n            3.3810880780220032e-01 5.2678012847900391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1063 2.0697501022368670e-03</internalNodes>\n          <leafValues>\n            5.5192911624908447e-01 3.7143889069557190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1064 -4.6463840408250690e-04</internalNodes>\n          <leafValues>\n            5.6082147359848022e-01 4.1135668754577637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1065 7.5490452582016587e-04</internalNodes>\n          <leafValues>\n            3.5592061281204224e-01 5.3293561935424805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1066 -9.8322238773107529e-04</internalNodes>\n          <leafValues>\n            5.4147958755493164e-01 3.7632051110267639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1067 -1.9940640777349472e-02</internalNodes>\n          <leafValues>\n            6.3479030132293701e-01 4.7052991390228271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1068 3.7680300883948803e-03</internalNodes>\n          <leafValues>\n            3.9134898781776428e-01 5.5637162923812866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1069 -9.4528505578637123e-03</internalNodes>\n          <leafValues>\n            2.5548928976058960e-01 5.2151167392730713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1070 2.9560849070549011e-03</internalNodes>\n          <leafValues>\n            5.1746791601181030e-01 3.0639201402664185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1071 9.1078737750649452e-03</internalNodes>\n          <leafValues>\n            5.3884482383728027e-01 2.8859630227088928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1072 1.8219229532405734e-03</internalNodes>\n          <leafValues>\n            4.3360430002212524e-01 5.8521968126296997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1073 1.4688739553093910e-02</internalNodes>\n          <leafValues>\n            5.2873617410659790e-01 2.8700059652328491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1074 -1.4387990348041058e-02</internalNodes>\n          <leafValues>\n            7.0194488763809204e-01 4.6473708748817444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1075 -1.8986649811267853e-02</internalNodes>\n          <leafValues>\n            2.9865521192550659e-01 5.2470117807388306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1076 1.1527639580890536e-03</internalNodes>\n          <leafValues>\n            4.3234738707542419e-01 5.9316617250442505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1077 1.0933670215308666e-02</internalNodes>\n          <leafValues>\n            5.2868640422821045e-01 3.1303191184997559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1078 -1.4932730235159397e-02</internalNodes>\n          <leafValues>\n            2.6584190130233765e-01 5.0840771198272705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1079 -2.9970539617352188e-04</internalNodes>\n          <leafValues>\n            5.4635268449783325e-01 3.7407240271568298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1080 4.1677621193230152e-03</internalNodes>\n          <leafValues>\n            4.7034969925880432e-01 7.4357217550277710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1081 -6.3905320130288601e-03</internalNodes>\n          <leafValues>\n            2.0692589879035950e-01 5.2805382013320923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1082 4.5029609464108944e-03</internalNodes>\n          <leafValues>\n            5.1826488971710205e-01 3.4835430979728699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1083 -9.2040365561842918e-03</internalNodes>\n          <leafValues>\n            6.8037772178649902e-01 4.9323600530624390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1084 8.1327259540557861e-02</internalNodes>\n          <leafValues>\n            5.0583988428115845e-01 2.2530519962310791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1085 -1.5079280734062195e-01</internalNodes>\n          <leafValues>\n            2.9634249210357666e-01 5.2646797895431519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1086 3.3179009333252907e-03</internalNodes>\n          <leafValues>\n            4.6554958820343018e-01 7.0729321241378784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1087 7.7402801252901554e-04</internalNodes>\n          <leafValues>\n            4.7803479433059692e-01 5.6682378053665161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1088 6.8199541419744492e-04</internalNodes>\n          <leafValues>\n            4.2869961261749268e-01 5.7221567630767822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1089 5.3671570494771004e-03</internalNodes>\n          <leafValues>\n            5.2993071079254150e-01 3.1146219372749329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1090 9.7018666565418243e-05</internalNodes>\n          <leafValues>\n            3.6746388673782349e-01 5.2694618701934814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1091 -1.2534089386463165e-01</internalNodes>\n          <leafValues>\n            2.3514920473098755e-01 5.2457910776138306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1092 -5.2516269497573376e-03</internalNodes>\n          <leafValues>\n            7.1159368753433228e-01 4.6937671303749084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1093 -7.8342109918594360e-03</internalNodes>\n          <leafValues>\n            4.4626510143280029e-01 5.4090857505798340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1094 -1.1310069821774960e-03</internalNodes>\n          <leafValues>\n            5.9456187486648560e-01 4.4176620244979858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1095 1.7601120052859187e-03</internalNodes>\n          <leafValues>\n            5.3532499074935913e-01 3.9734530448913574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1096 -8.1581249833106995e-04</internalNodes>\n          <leafValues>\n            3.7602680921554565e-01 5.2647268772125244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1097 -3.8687589112669230e-03</internalNodes>\n          <leafValues>\n            6.3099128007888794e-01 4.7498199343681335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1098 1.5207129763439298e-03</internalNodes>\n          <leafValues>\n            5.2301818132400513e-01 3.3612239360809326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1099 5.4586738348007202e-01</internalNodes>\n          <leafValues>\n            5.1671397686004639e-01 1.1726350337266922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1100 1.5650190412998199e-02</internalNodes>\n          <leafValues>\n            4.9794390797615051e-01 1.3932949304580688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1101 -1.1731860227882862e-02</internalNodes>\n          <leafValues>\n            7.1296507120132446e-01 4.9211961030960083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1102 -6.1765122227370739e-03</internalNodes>\n          <leafValues>\n            2.2881029546260834e-01 5.0497019290924072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1103 2.2457661107182503e-03</internalNodes>\n          <leafValues>\n            4.6324339509010315e-01 6.0487258434295654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1104 -5.1915869116783142e-03</internalNodes>\n          <leafValues>\n            6.4674210548400879e-01 4.6021929383277893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1105 -2.3827880620956421e-02</internalNodes>\n          <leafValues>\n            1.4820009469985962e-01 5.2260792255401611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1106 1.0284580057486892e-03</internalNodes>\n          <leafValues>\n            5.1354891061782837e-01 3.3759570121765137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1107 -1.0078850202262402e-02</internalNodes>\n          <leafValues>\n            2.7405610680580139e-01 5.3035670518875122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1108 2.6168930344283581e-03</internalNodes>\n          <leafValues>\n            5.3326708078384399e-01 3.9724540710449219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1109 5.4385367548093200e-04</internalNodes>\n          <leafValues>\n            5.3656041622161865e-01 4.0634119510650635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1110 5.3510512225329876e-03</internalNodes>\n          <leafValues>\n            4.6537590026855469e-01 6.8890458345413208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1111 -1.5274790348485112e-03</internalNodes>\n          <leafValues>\n            5.4495012760162354e-01 3.6247238516807556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1112 -8.0624416470527649e-02</internalNodes>\n          <leafValues>\n            1.6560870409011841e-01 5.0002872943878174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1113 2.2192029282450676e-02</internalNodes>\n          <leafValues>\n            5.1327311992645264e-01 2.0028080046176910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1114 7.3100631125271320e-03</internalNodes>\n          <leafValues>\n            4.6179479360580444e-01 6.3665360212326050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1115 -6.4063072204589844e-03</internalNodes>\n          <leafValues>\n            5.9162509441375732e-01 4.8678609728813171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1116 -7.6415040530264378e-04</internalNodes>\n          <leafValues>\n            3.8884091377258301e-01 5.3157979249954224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1117 7.6734489994123578e-04</internalNodes>\n          <leafValues>\n            4.1590648889541626e-01 5.6052798032760620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1118 6.1474501853808761e-04</internalNodes>\n          <leafValues>\n            3.0890220403671265e-01 5.1201480627059937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1119 -5.0105270929634571e-03</internalNodes>\n          <leafValues>\n            3.9721998572349548e-01 5.2073061466217041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1120 -8.6909132078289986e-03</internalNodes>\n          <leafValues>\n            6.2574082612991333e-01 4.6085759997367859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1121 -1.6391459852457047e-02</internalNodes>\n          <leafValues>\n            2.0852099359035492e-01 5.2422660589218140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1122 4.0973909199237823e-04</internalNodes>\n          <leafValues>\n            5.2224272489547729e-01 3.7803208827972412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1123 -2.5242289993911982e-03</internalNodes>\n          <leafValues>\n            5.8039271831512451e-01 4.6118900179862976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1124 5.0945312250405550e-04</internalNodes>\n          <leafValues>\n            4.4012719392776489e-01 5.8460158109664917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1125 1.9656419754028320e-03</internalNodes>\n          <leafValues>\n            5.3223252296447754e-01 4.1845908761024475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1126 5.6298897834494710e-04</internalNodes>\n          <leafValues>\n            3.7418448925018311e-01 5.2345657348632812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1127 -6.7946797935292125e-04</internalNodes>\n          <leafValues>\n            4.6310418844223022e-01 5.3564780950546265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1128 7.2856349870562553e-03</internalNodes>\n          <leafValues>\n            5.0446701049804688e-01 2.3775640130043030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1129 -1.7459489405155182e-02</internalNodes>\n          <leafValues>\n            7.2891211509704590e-01 5.0504350662231445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1130 -2.5421749800443649e-02</internalNodes>\n          <leafValues>\n            6.6671347618103027e-01 4.6781000494956970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1131 -1.5647639520466328e-03</internalNodes>\n          <leafValues>\n            4.3917590379714966e-01 5.3236269950866699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1132 1.1444360017776489e-02</internalNodes>\n          <leafValues>\n            4.3464401364326477e-01 5.6800121068954468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1133 -6.7352550104260445e-04</internalNodes>\n          <leafValues>\n            4.4771409034729004e-01 5.2968120574951172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1134 9.3194209039211273e-03</internalNodes>\n          <leafValues>\n            4.7402000427246094e-01 7.4626070261001587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1135 1.3328490604180843e-04</internalNodes>\n          <leafValues>\n            5.3650617599487305e-01 4.7521349787712097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1136 -7.8815799206495285e-03</internalNodes>\n          <leafValues>\n            1.7522190511226654e-01 5.0152552127838135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1137 -5.7985680177807808e-03</internalNodes>\n          <leafValues>\n            7.2712367773056030e-01 4.8962008953094482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1138 -3.8922499516047537e-04</internalNodes>\n          <leafValues>\n            4.0039089322090149e-01 5.3449410200119019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1139 -1.9288610201328993e-03</internalNodes>\n          <leafValues>\n            5.6056129932403564e-01 4.8039558529853821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1140 8.4214154630899429e-03</internalNodes>\n          <leafValues>\n            4.7532469034194946e-01 7.6236087083816528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1141 8.1655876711010933e-03</internalNodes>\n          <leafValues>\n            5.3932619094848633e-01 4.1916438937187195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1142 4.8280550981871784e-04</internalNodes>\n          <leafValues>\n            4.2408001422882080e-01 5.3998219966888428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1143 -2.7186630759388208e-03</internalNodes>\n          <leafValues>\n            4.2445999383926392e-01 5.4249238967895508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1144 -1.2507230043411255e-02</internalNodes>\n          <leafValues>\n            5.8958417177200317e-01 4.5504111051559448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1145 -2.4286519736051559e-02</internalNodes>\n          <leafValues>\n            2.6471349596977234e-01 5.1891797780990601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1146 -2.9676330741494894e-03</internalNodes>\n          <leafValues>\n            7.3476827144622803e-01 4.7497498989105225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1147 -1.2528999708592892e-02</internalNodes>\n          <leafValues>\n            2.7560499310493469e-01 5.1775997877120972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1148 -1.0104000102728605e-03</internalNodes>\n          <leafValues>\n            3.5105609893798828e-01 5.1447242498397827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1149 -2.1348530426621437e-03</internalNodes>\n          <leafValues>\n            5.6379258632659912e-01 4.6673199534416199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1150 1.9564259797334671e-02</internalNodes>\n          <leafValues>\n            4.6145731210708618e-01 6.1376398801803589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1151 -9.7146347165107727e-02</internalNodes>\n          <leafValues>\n            2.9983788728713989e-01 5.1935559511184692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1152 4.5014568604528904e-03</internalNodes>\n          <leafValues>\n            5.0778847932815552e-01 3.0457559227943420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1153 6.3706971704959869e-03</internalNodes>\n          <leafValues>\n            4.8610189557075500e-01 6.8875008821487427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1154 -9.0721528977155685e-03</internalNodes>\n          <leafValues>\n            1.6733959317207336e-01 5.0175631046295166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1155 -5.3537208586931229e-03</internalNodes>\n          <leafValues>\n            2.6927569508552551e-01 5.2426332235336304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1156 -1.0932840406894684e-02</internalNodes>\n          <leafValues>\n            7.1838641166687012e-01 4.7360289096832275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1157 8.2356072962284088e-03</internalNodes>\n          <leafValues>\n            5.2239668369293213e-01 2.3898629844188690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1158 -1.0038160253316164e-03</internalNodes>\n          <leafValues>\n            5.7193559408187866e-01 4.4339430332183838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1159 4.0859128348529339e-03</internalNodes>\n          <leafValues>\n            5.4728418588638306e-01 4.1488361358642578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1160 1.5485419332981110e-01</internalNodes>\n          <leafValues>\n            4.9738121032714844e-01 6.1061598360538483e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1161 2.0897459762636572e-04</internalNodes>\n          <leafValues>\n            4.7091740369796753e-01 5.4238891601562500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1162 3.3316991175524890e-04</internalNodes>\n          <leafValues>\n            4.0896269679069519e-01 5.3009921312332153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1163 -1.0813400149345398e-02</internalNodes>\n          <leafValues>\n            6.1043697595596313e-01 4.9573341012001038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1164 4.5656010508537292e-02</internalNodes>\n          <leafValues>\n            5.0696891546249390e-01 2.8666600584983826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1165 1.2569549726322293e-03</internalNodes>\n          <leafValues>\n            4.8469170928001404e-01 6.3181710243225098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1166 -1.2015070021152496e-01</internalNodes>\n          <leafValues>\n            6.0526140034198761e-02 4.9809598922729492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1167 -1.0533799650147557e-04</internalNodes>\n          <leafValues>\n            5.3631097078323364e-01 4.7080421447753906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1168 -2.0703190565109253e-01</internalNodes>\n          <leafValues>\n            5.9660330414772034e-02 4.9790981411933899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1169 1.2909180077258497e-04</internalNodes>\n          <leafValues>\n            4.7129771113395691e-01 5.3779977560043335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1170 3.8818528992123902e-04</internalNodes>\n          <leafValues>\n            4.3635380268096924e-01 5.5341911315917969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1171 -2.9243610333651304e-03</internalNodes>\n          <leafValues>\n            5.8111858367919922e-01 4.8252159357070923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1172 8.3882332546636462e-04</internalNodes>\n          <leafValues>\n            5.3117001056671143e-01 4.0381389856338501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1173 -1.9061550265178084e-03</internalNodes>\n          <leafValues>\n            3.7707018852233887e-01 5.2600151300430298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1174 8.9514348655939102e-03</internalNodes>\n          <leafValues>\n            4.7661679983139038e-01 7.6821839809417725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1175 1.3083459809422493e-02</internalNodes>\n          <leafValues>\n            5.2644628286361694e-01 3.0622220039367676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1176 -2.1159330010414124e-01</internalNodes>\n          <leafValues>\n            6.7371982336044312e-01 4.6958100795745850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1177 3.1493250280618668e-03</internalNodes>\n          <leafValues>\n            5.6448352336883545e-01 4.3869531154632568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1178 3.9754100725986063e-04</internalNodes>\n          <leafValues>\n            4.5260611176490784e-01 5.8956301212310791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1179 -1.3814480043947697e-03</internalNodes>\n          <leafValues>\n            6.0705822706222534e-01 4.9424138665199280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1180 -5.8122188784182072e-04</internalNodes>\n          <leafValues>\n            5.9982132911682129e-01 4.5082521438598633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1181 -2.3905329871922731e-03</internalNodes>\n          <leafValues>\n            4.2055889964103699e-01 5.2238482236862183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1182 2.7268929407000542e-02</internalNodes>\n          <leafValues>\n            5.2064472436904907e-01 3.5633018612861633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1183 -3.7658358924090862e-03</internalNodes>\n          <leafValues>\n            3.1447041034698486e-01 5.2188140153884888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1184 -1.4903489500284195e-03</internalNodes>\n          <leafValues>\n            3.3801960945129395e-01 5.1244372129440308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1185 -1.7428230494260788e-02</internalNodes>\n          <leafValues>\n            5.8299607038497925e-01 4.9197259545326233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1186 -1.5278030186891556e-02</internalNodes>\n          <leafValues>\n            6.1631447076797485e-01 4.6178871393203735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1187 3.1995609402656555e-02</internalNodes>\n          <leafValues>\n            5.1663571596145630e-01 1.7127640545368195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1188 -3.8256710395216942e-03</internalNodes>\n          <leafValues>\n            3.4080120921134949e-01 5.1313877105712891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1189 -8.5186436772346497e-03</internalNodes>\n          <leafValues>\n            6.1055189371109009e-01 4.9979418516159058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1190 9.0641621500253677e-04</internalNodes>\n          <leafValues>\n            4.3272709846496582e-01 5.5823111534118652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1191 1.0344849899411201e-02</internalNodes>\n          <leafValues>\n            4.8556530475616455e-01 5.4524201154708862e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>160</maxWeakCount>\n      <stageThreshold>7.9249076843261719e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1192 7.8981826081871986e-03</internalNodes>\n          <leafValues>\n            3.3325248956680298e-01 5.9464621543884277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1193 1.6170160379260778e-03</internalNodes>\n          <leafValues>\n            3.4906411170959473e-01 5.5778688192367554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1194 -5.5449741194024682e-04</internalNodes>\n          <leafValues>\n            5.5425661802291870e-01 3.2915300130844116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1195 1.5428980113938451e-03</internalNodes>\n          <leafValues>\n            3.6125791072845459e-01 5.5459791421890259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1196 -1.0329450014978647e-03</internalNodes>\n          <leafValues>\n            3.5301390290260315e-01 5.5761402845382690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1197 7.7698158565908670e-04</internalNodes>\n          <leafValues>\n            3.9167788624763489e-01 5.6453210115432739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1198 1.4320300519466400e-01</internalNodes>\n          <leafValues>\n            4.6674820780754089e-01 7.0236331224441528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1199 -7.3866490274667740e-03</internalNodes>\n          <leafValues>\n            3.0736848711967468e-01 5.2892577648162842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1200 -6.2936742324382067e-04</internalNodes>\n          <leafValues>\n            5.6221181154251099e-01 4.0370491147041321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1201 7.8893528552725911e-04</internalNodes>\n          <leafValues>\n            5.2676612138748169e-01 3.5578748583793640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1202 -1.2228050269186497e-02</internalNodes>\n          <leafValues>\n            6.6683208942413330e-01 4.6255499124526978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1203 3.5420239437371492e-03</internalNodes>\n          <leafValues>\n            5.5214381217956543e-01 3.8696730136871338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1204 -1.0585320414975286e-03</internalNodes>\n          <leafValues>\n            3.6286780238151550e-01 5.3209269046783447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1205 1.4935660146875307e-05</internalNodes>\n          <leafValues>\n            4.6324449777603149e-01 5.3633230924606323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1206 5.2537708543241024e-03</internalNodes>\n          <leafValues>\n            5.1322317123413086e-01 3.2657089829444885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1207 -8.2338023930788040e-03</internalNodes>\n          <leafValues>\n            6.6936898231506348e-01 4.7741401195526123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1208 2.1866810129722580e-05</internalNodes>\n          <leafValues>\n            4.0538620948791504e-01 5.4579311609268188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1209 -3.8150229956954718e-03</internalNodes>\n          <leafValues>\n            6.4549958705902100e-01 4.7931781411170959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1210 1.1105879675596952e-03</internalNodes>\n          <leafValues>\n            5.2704071998596191e-01 3.5296788811683655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1211 -5.7707689702510834e-03</internalNodes>\n          <leafValues>\n            3.8035470247268677e-01 5.3529578447341919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1212 -3.0158339068293571e-03</internalNodes>\n          <leafValues>\n            5.3394031524658203e-01 3.8871330022811890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1213 -8.5453689098358154e-04</internalNodes>\n          <leafValues>\n            3.5646161437034607e-01 5.2736037969589233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1214 1.1050510220229626e-02</internalNodes>\n          <leafValues>\n            4.6719071269035339e-01 6.8497377634048462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1215 4.2605839669704437e-02</internalNodes>\n          <leafValues>\n            5.1514732837677002e-01 7.0220090448856354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1216 -3.0781750101596117e-03</internalNodes>\n          <leafValues>\n            3.0416610836982727e-01 5.1526021957397461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1217 -5.4815728217363358e-03</internalNodes>\n          <leafValues>\n            6.4302957057952881e-01 4.8972299695014954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1218 3.1881860923022032e-03</internalNodes>\n          <leafValues>\n            5.3074932098388672e-01 3.8262099027633667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1219 3.5947180003859103e-04</internalNodes>\n          <leafValues>\n            4.6500471234321594e-01 5.4219049215316772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1220 -4.0705031715333462e-03</internalNodes>\n          <leafValues>\n            2.8496798872947693e-01 5.0791162252426147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1221 -1.4594170264899731e-02</internalNodes>\n          <leafValues>\n            2.9716458916664124e-01 5.1284617185592651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1222 -1.1947689927183092e-04</internalNodes>\n          <leafValues>\n            5.6310981512069702e-01 4.3430820107460022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1223 -6.9344649091362953e-04</internalNodes>\n          <leafValues>\n            4.4035780429840088e-01 5.3599590063095093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1224 1.4834799912932795e-05</internalNodes>\n          <leafValues>\n            3.4210088849067688e-01 5.1646977663040161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1225 9.0296985581517220e-03</internalNodes>\n          <leafValues>\n            4.6393430233001709e-01 6.1140751838684082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1226 -8.0640818923711777e-03</internalNodes>\n          <leafValues>\n            2.8201588988304138e-01 5.0754940509796143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1227 2.6062119752168655e-02</internalNodes>\n          <leafValues>\n            5.2089059352874756e-01 2.6887780427932739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1228 1.7314659431576729e-02</internalNodes>\n          <leafValues>\n            4.6637138724327087e-01 6.7385399341583252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1229 2.2666640579700470e-02</internalNodes>\n          <leafValues>\n            5.2093499898910522e-01 2.2127239406108856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1230 -2.1965929772704840e-03</internalNodes>\n          <leafValues>\n            6.0631012916564941e-01 4.5381900668144226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1231 -9.5282476395368576e-03</internalNodes>\n          <leafValues>\n            4.6352049708366394e-01 5.2474308013916016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1232 8.0943619832396507e-03</internalNodes>\n          <leafValues>\n            5.2894401550292969e-01 3.9138820767402649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1233 -7.2877332568168640e-02</internalNodes>\n          <leafValues>\n            7.7520018815994263e-01 4.9902349710464478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1234 -6.9009521976113319e-03</internalNodes>\n          <leafValues>\n            2.4280390143394470e-01 5.0480902194976807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1235 -1.1308239772915840e-02</internalNodes>\n          <leafValues>\n            5.7343649864196777e-01 4.8423761129379272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1236 5.9613201767206192e-02</internalNodes>\n          <leafValues>\n            5.0298362970352173e-01 2.5249770283699036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1237 -2.8624620754271746e-03</internalNodes>\n          <leafValues>\n            6.0730451345443726e-01 4.8984599113464355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1238 4.4781449250876904e-03</internalNodes>\n          <leafValues>\n            5.0152891874313354e-01 2.2203169763088226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1239 -1.7513240454718471e-03</internalNodes>\n          <leafValues>\n            6.6144287586212158e-01 4.9338689446449280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1240 4.0163420140743256e-02</internalNodes>\n          <leafValues>\n            5.1808780431747437e-01 3.7410449981689453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1241 3.4768949262797832e-04</internalNodes>\n          <leafValues>\n            4.7204169631004333e-01 5.8180320262908936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1242 2.6551650371402502e-03</internalNodes>\n          <leafValues>\n            3.8050109148025513e-01 5.2213358879089355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1243 -8.7706279009580612e-03</internalNodes>\n          <leafValues>\n            2.9441660642623901e-01 5.2312952280044556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1244 -5.5122091434895992e-03</internalNodes>\n          <leafValues>\n            7.3461771011352539e-01 4.7228169441223145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1245 6.8672042107209563e-04</internalNodes>\n          <leafValues>\n            5.4528760910034180e-01 4.2424130439758301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1246 5.6019669864326715e-04</internalNodes>\n          <leafValues>\n            4.3988621234893799e-01 5.6012850999832153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1247 2.4143769405782223e-03</internalNodes>\n          <leafValues>\n            4.7416868805885315e-01 6.1366218328475952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1248 -1.5680900542065501e-03</internalNodes>\n          <leafValues>\n            6.0445529222488403e-01 4.5164099335670471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1249 -3.6827491130679846e-03</internalNodes>\n          <leafValues>\n            2.4524590373039246e-01 5.2949821949005127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1250 -2.9409190756268799e-04</internalNodes>\n          <leafValues>\n            3.7328380346298218e-01 5.2514511346817017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1251 4.2847759323194623e-04</internalNodes>\n          <leafValues>\n            5.4988098144531250e-01 4.0655350685119629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1252 -4.8817070201039314e-03</internalNodes>\n          <leafValues>\n            2.1399089694023132e-01 4.9999570846557617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1253 2.7272020815871656e-04</internalNodes>\n          <leafValues>\n            4.6502870321273804e-01 5.8134287595748901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1254 2.0947199664078653e-04</internalNodes>\n          <leafValues>\n            4.3874868750572205e-01 5.5727928876876831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1255 4.8501189798116684e-02</internalNodes>\n          <leafValues>\n            5.2449727058410645e-01 3.2128891348838806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1256 -4.5166411437094212e-03</internalNodes>\n          <leafValues>\n            6.0568130016326904e-01 4.5458820462226868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1257 -1.2291680090129375e-02</internalNodes>\n          <leafValues>\n            2.0409290492534637e-01 5.1522141695022583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1258 4.8549679922871292e-04</internalNodes>\n          <leafValues>\n            5.2376049757003784e-01 3.7395030260086060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1259 3.0556049197912216e-02</internalNodes>\n          <leafValues>\n            4.9605339765548706e-01 5.9382462501525879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1260 -1.5105320198927075e-04</internalNodes>\n          <leafValues>\n            5.3513038158416748e-01 4.1452041268348694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1261 2.4937440175563097e-03</internalNodes>\n          <leafValues>\n            4.6933668851852417e-01 5.5149412155151367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1262 -1.2382130138576031e-02</internalNodes>\n          <leafValues>\n            6.7913967370986938e-01 4.6816679835319519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1263 -5.1333461888134480e-03</internalNodes>\n          <leafValues>\n            3.6087390780448914e-01 5.2291601896286011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1264 5.1919277757406235e-04</internalNodes>\n          <leafValues>\n            5.3000730276107788e-01 3.6336138844490051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1265 1.5060420334339142e-01</internalNodes>\n          <leafValues>\n            5.1573169231414795e-01 2.2117820382118225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1266 7.7144149690866470e-03</internalNodes>\n          <leafValues>\n            4.4104969501495361e-01 5.7766091823577881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1267 9.4443522393703461e-03</internalNodes>\n          <leafValues>\n            5.4018551111221313e-01 3.7566500902175903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1268 2.5006249779835343e-04</internalNodes>\n          <leafValues>\n            4.3682709336280823e-01 5.6073749065399170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1269 -3.3077150583267212e-03</internalNodes>\n          <leafValues>\n            4.2447990179061890e-01 5.5182307958602905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1270 7.4048910755664110e-04</internalNodes>\n          <leafValues>\n            4.4969621300697327e-01 5.9005767107009888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1271 4.4092051684856415e-02</internalNodes>\n          <leafValues>\n            5.2934932708740234e-01 3.1563550233840942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1272 3.3639909233897924e-03</internalNodes>\n          <leafValues>\n            4.4832968711853027e-01 5.8486622571945190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1273 -3.9760079234838486e-03</internalNodes>\n          <leafValues>\n            4.5595070719718933e-01 5.4836392402648926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1274 2.7716930489987135e-03</internalNodes>\n          <leafValues>\n            5.3417861461639404e-01 3.7924841046333313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1275 -2.4123019829858094e-04</internalNodes>\n          <leafValues>\n            5.6671887636184692e-01 4.5769730210304260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1276 4.9425667384639382e-04</internalNodes>\n          <leafValues>\n            4.4212448596954346e-01 5.6287872791290283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1277 -3.8876468897797167e-04</internalNodes>\n          <leafValues>\n            4.2883709073066711e-01 5.3910630941390991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1278 -5.0048898905515671e-02</internalNodes>\n          <leafValues>\n            6.8995130062103271e-01 4.7037428617477417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1279 -3.6635480821132660e-02</internalNodes>\n          <leafValues>\n            2.2177790105342865e-01 5.1918262243270874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1280 2.4273579474538565e-03</internalNodes>\n          <leafValues>\n            5.1362240314483643e-01 3.4973978996276855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1281 1.9558030180633068e-03</internalNodes>\n          <leafValues>\n            4.8261928558349609e-01 6.4083808660507202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1282 -1.7494610510766506e-03</internalNodes>\n          <leafValues>\n            3.9228358864784241e-01 5.2726852893829346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1283 1.3955079950392246e-02</internalNodes>\n          <leafValues>\n            5.0782018899917603e-01 8.4165048599243164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1284 -2.1896739781368524e-04</internalNodes>\n          <leafValues>\n            5.5204898118972778e-01 4.3142348527908325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1285 -1.5131309628486633e-03</internalNodes>\n          <leafValues>\n            3.9346051216125488e-01 5.3825712203979492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1286 -4.3622800149023533e-03</internalNodes>\n          <leafValues>\n            7.3706287145614624e-01 4.7364759445190430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1287 6.5160587430000305e-02</internalNodes>\n          <leafValues>\n            5.1592797040939331e-01 3.2815951108932495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1288 -2.3567399475723505e-03</internalNodes>\n          <leafValues>\n            3.6728268861770630e-01 5.1728862524032593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1289 1.5146659687161446e-02</internalNodes>\n          <leafValues>\n            5.0314939022064209e-01 6.6876041889190674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1290 -2.2850960493087769e-02</internalNodes>\n          <leafValues>\n            6.7675197124481201e-01 4.7095969319343567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1291 4.8867650330066681e-03</internalNodes>\n          <leafValues>\n            5.2579981088638306e-01 4.0598788857460022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1292 1.7619599821045995e-03</internalNodes>\n          <leafValues>\n            4.6962729096412659e-01 6.6882789134979248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1293 -1.2942519970238209e-03</internalNodes>\n          <leafValues>\n            4.3207129836082458e-01 5.3442817926406860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1294 1.0929949581623077e-02</internalNodes>\n          <leafValues>\n            4.9977061152458191e-01 1.6374860703945160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1295 2.9958489903947338e-05</internalNodes>\n          <leafValues>\n            4.2824178934097290e-01 5.6332242488861084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1296 -6.5884361974895000e-03</internalNodes>\n          <leafValues>\n            6.7721211910247803e-01 4.7005268931388855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1297 3.2527779694646597e-03</internalNodes>\n          <leafValues>\n            5.3133970499038696e-01 4.5361489057540894e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1298 -4.0435739792883396e-03</internalNodes>\n          <leafValues>\n            5.6600618362426758e-01 4.4133889675140381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1299 -1.2523540062829852e-03</internalNodes>\n          <leafValues>\n            3.7319138646125793e-01 5.3564518690109253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1300 1.9246719602961093e-04</internalNodes>\n          <leafValues>\n            5.1899862289428711e-01 3.7388110160827637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1301 -3.8589671254158020e-02</internalNodes>\n          <leafValues>\n            2.9563739895820618e-01 5.1888108253479004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1302 1.5489870565943420e-04</internalNodes>\n          <leafValues>\n            4.3471351265907288e-01 5.5095332860946655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1303 -3.3763848245143890e-02</internalNodes>\n          <leafValues>\n            3.2303300499916077e-01 5.1954758167266846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1304 -8.2657067105174065e-03</internalNodes>\n          <leafValues>\n            5.9754890203475952e-01 4.5521140098571777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1305 1.4481440302915871e-05</internalNodes>\n          <leafValues>\n            4.7456780076026917e-01 5.4974269866943359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1306 1.4951299817766994e-05</internalNodes>\n          <leafValues>\n            4.3244731426239014e-01 5.4806441068649292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1307 -1.8741799518465996e-02</internalNodes>\n          <leafValues>\n            1.5800529718399048e-01 5.1785331964492798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1308 1.7572239739820361e-03</internalNodes>\n          <leafValues>\n            4.5176368951797485e-01 5.7737642526626587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1309 -3.1391119118779898e-03</internalNodes>\n          <leafValues>\n            4.1496479511260986e-01 5.4608422517776489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1310 6.6656779381446540e-05</internalNodes>\n          <leafValues>\n            4.0390908718109131e-01 5.2930849790573120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1311 6.7743421532213688e-03</internalNodes>\n          <leafValues>\n            4.7676518559455872e-01 6.1219561100006104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1312 -7.3868161998689175e-03</internalNodes>\n          <leafValues>\n            3.5862588882446289e-01 5.1872807741165161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1313 1.4040930196642876e-02</internalNodes>\n          <leafValues>\n            4.7121399641036987e-01 5.5761557817459106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1314 -5.5258329957723618e-03</internalNodes>\n          <leafValues>\n            2.6610270142555237e-01 5.0392812490463257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1315 3.8684239983558655e-01</internalNodes>\n          <leafValues>\n            5.1443397998809814e-01 2.5258991122245789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1316 1.1459240340627730e-04</internalNodes>\n          <leafValues>\n            4.2849949002265930e-01 5.4233711957931519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1317 -1.8467569723725319e-02</internalNodes>\n          <leafValues>\n            3.8858351111412048e-01 5.2130621671676636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1318 -4.5907011372037232e-04</internalNodes>\n          <leafValues>\n            5.4125630855560303e-01 4.2359098792076111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1319 1.2527540093287826e-03</internalNodes>\n          <leafValues>\n            4.8993051052093506e-01 6.6240912675857544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1320 1.4910609461367130e-03</internalNodes>\n          <leafValues>\n            5.2867782115936279e-01 4.0400519967079163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1321 -7.5435562757775187e-04</internalNodes>\n          <leafValues>\n            6.0329902172088623e-01 4.7951200604438782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1322 -6.9478838704526424e-03</internalNodes>\n          <leafValues>\n            4.0844011306762695e-01 5.3735041618347168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1323 2.8092920547351241e-04</internalNodes>\n          <leafValues>\n            4.8460629582405090e-01 5.7593822479248047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1324 9.6073717577382922e-04</internalNodes>\n          <leafValues>\n            5.1647412776947021e-01 3.5549798607826233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1325 -2.6883929967880249e-04</internalNodes>\n          <leafValues>\n            5.6775820255279541e-01 4.7317659854888916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1326 2.1599370520561934e-03</internalNodes>\n          <leafValues>\n            4.7314870357513428e-01 7.0705670118331909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1327 5.6235301308333874e-03</internalNodes>\n          <leafValues>\n            5.2402430772781372e-01 2.7817919850349426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1328 -5.0243991427123547e-03</internalNodes>\n          <leafValues>\n            2.8370139002799988e-01 5.0623041391372681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1329 -9.7611639648675919e-03</internalNodes>\n          <leafValues>\n            7.4007177352905273e-01 4.9345690011978149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1330 4.1515100747346878e-03</internalNodes>\n          <leafValues>\n            5.1191312074661255e-01 3.4070080518722534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1331 6.2465080991387367e-03</internalNodes>\n          <leafValues>\n            4.9237880110740662e-01 6.5790587663650513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1332 -7.0597478188574314e-03</internalNodes>\n          <leafValues>\n            2.4347110092639923e-01 5.0328421592712402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1333 -2.0587709732353687e-03</internalNodes>\n          <leafValues>\n            5.9003108739852905e-01 4.6950870752334595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1334 -2.4146060459315777e-03</internalNodes>\n          <leafValues>\n            3.6473178863525391e-01 5.1892018318176270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1335 -1.4817609917372465e-03</internalNodes>\n          <leafValues>\n            6.0349482297897339e-01 4.9401280283927917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1336 -6.3016400672495365e-03</internalNodes>\n          <leafValues>\n            5.8189898729324341e-01 4.5604279637336731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1337 3.4763428848236799e-03</internalNodes>\n          <leafValues>\n            5.2174758911132812e-01 3.4839931130409241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1338 -2.2250870242714882e-02</internalNodes>\n          <leafValues>\n            2.3607000708580017e-01 5.0320827960968018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1339 -3.0612550675868988e-02</internalNodes>\n          <leafValues>\n            6.4991867542266846e-01 4.9149191379547119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1340 1.3057479634881020e-02</internalNodes>\n          <leafValues>\n            4.4133231043815613e-01 5.6837642192840576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1341 -6.0095742810517550e-04</internalNodes>\n          <leafValues>\n            4.3597310781478882e-01 5.3334832191467285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1342 -4.1514250915497541e-04</internalNodes>\n          <leafValues>\n            5.5040627717971802e-01 4.3260601162910461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1343 -1.3776290230453014e-02</internalNodes>\n          <leafValues>\n            4.0641129016876221e-01 5.2015489339828491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1344 -3.2296508550643921e-02</internalNodes>\n          <leafValues>\n            4.7351971268653870e-02 4.9771949648857117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1345 5.3556978702545166e-02</internalNodes>\n          <leafValues>\n            4.8817330598831177e-01 6.6669392585754395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1346 8.1889545544981956e-03</internalNodes>\n          <leafValues>\n            5.4000371694564819e-01 4.2408201098442078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1347 2.1055320394225419e-04</internalNodes>\n          <leafValues>\n            4.8020479083061218e-01 5.5638527870178223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1348 -2.4382730480283499e-03</internalNodes>\n          <leafValues>\n            7.3877930641174316e-01 4.7736850380897522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1349 3.2835570164024830e-03</internalNodes>\n          <leafValues>\n            5.2885460853576660e-01 3.1712919473648071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1350 2.3729570675641298e-03</internalNodes>\n          <leafValues>\n            4.7508129477500916e-01 7.0601707696914673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1351 -1.4541699783876538e-03</internalNodes>\n          <leafValues>\n            3.8117301464080811e-01 5.3307390213012695e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>177</maxWeakCount>\n      <stageThreshold>8.7696029663085938e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1352 5.5755238980054855e-02</internalNodes>\n          <leafValues>\n            4.0191569924354553e-01 6.8060368299484253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1353 2.4730248842388391e-03</internalNodes>\n          <leafValues>\n            3.3511489629745483e-01 5.9657198190689087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1354 -3.5031698644161224e-04</internalNodes>\n          <leafValues>\n            5.5577081441879272e-01 3.4822869300842285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1355 5.4167630150914192e-04</internalNodes>\n          <leafValues>\n            4.2608588933944702e-01 5.6933808326721191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1356 7.7193678589537740e-04</internalNodes>\n          <leafValues>\n            3.4942400455474854e-01 5.4336887598037720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1357 -1.5999219613149762e-03</internalNodes>\n          <leafValues>\n            4.0284991264343262e-01 5.4843592643737793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1358 -1.1832080053864047e-04</internalNodes>\n          <leafValues>\n            3.8069018721580505e-01 5.4254651069641113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1359 3.2909031142480671e-04</internalNodes>\n          <leafValues>\n            2.6201000809669495e-01 5.4295217990875244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1360 2.9518108931370080e-04</internalNodes>\n          <leafValues>\n            3.7997689843177795e-01 5.3992640972137451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1361 9.0466710389591753e-05</internalNodes>\n          <leafValues>\n            4.4336450099945068e-01 5.4402261972427368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1362 1.5007190086180344e-05</internalNodes>\n          <leafValues>\n            3.7196549773216248e-01 5.4091197252273560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1363 1.3935610651969910e-01</internalNodes>\n          <leafValues>\n            5.5253958702087402e-01 4.4790428876876831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1364 1.6461990308016539e-03</internalNodes>\n          <leafValues>\n            4.2645010352134705e-01 5.7721698284149170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1365 4.9984431825578213e-04</internalNodes>\n          <leafValues>\n            4.3595260381698608e-01 5.6858712434768677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1366 -1.0971280280500650e-03</internalNodes>\n          <leafValues>\n            3.3901369571685791e-01 5.2054089307785034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1367 6.6919892560690641e-04</internalNodes>\n          <leafValues>\n            4.5574560761451721e-01 5.9806597232818604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1368 8.6471042595803738e-04</internalNodes>\n          <leafValues>\n            5.1348412036895752e-01 2.9440331459045410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1369 -2.7182599296793342e-04</internalNodes>\n          <leafValues>\n            3.9065781235694885e-01 5.3771811723709106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1370 3.0249499104684219e-05</internalNodes>\n          <leafValues>\n            3.6796098947525024e-01 5.2256888151168823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1371 -8.5225896909832954e-03</internalNodes>\n          <leafValues>\n            7.2931021451950073e-01 4.8923650383949280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1372 1.6705560265108943e-03</internalNodes>\n          <leafValues>\n            4.3453249335289001e-01 5.6961381435394287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1373 -7.1433838456869125e-03</internalNodes>\n          <leafValues>\n            2.5912800431251526e-01 5.2256238460540771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1374 -1.6319369897246361e-02</internalNodes>\n          <leafValues>\n            6.9222790002822876e-01 4.6515759825706482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1375 4.8034260980784893e-03</internalNodes>\n          <leafValues>\n            5.3522628545761108e-01 3.2863029837608337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1376 -7.5421929359436035e-03</internalNodes>\n          <leafValues>\n            2.0405440032482147e-01 5.0345462560653687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1377 -1.4363110065460205e-02</internalNodes>\n          <leafValues>\n            6.8048888444900513e-01 4.8890590667724609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1378 8.9063588529825211e-04</internalNodes>\n          <leafValues>\n            5.3106957674026489e-01 3.8954809308052063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1379 -4.4060191139578819e-03</internalNodes>\n          <leafValues>\n            5.7415628433227539e-01 4.3724268674850464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1380 -1.8862540309783071e-04</internalNodes>\n          <leafValues>\n            2.8317859768867493e-01 5.0982052087783813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1381 -3.7979281041771173e-03</internalNodes>\n          <leafValues>\n            3.3725079894065857e-01 5.2465802431106567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1382 1.4627049677073956e-04</internalNodes>\n          <leafValues>\n            5.3066742420196533e-01 3.9117100834846497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1383 -4.9164638767251745e-05</internalNodes>\n          <leafValues>\n            5.4624962806701660e-01 3.9427208900451660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1384 -3.3582501113414764e-02</internalNodes>\n          <leafValues>\n            2.1578240394592285e-01 5.0482118129730225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1385 -3.5339309833943844e-03</internalNodes>\n          <leafValues>\n            6.4653122425079346e-01 4.8726969957351685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1386 5.0144111737608910e-03</internalNodes>\n          <leafValues>\n            4.6176680922508240e-01 6.2480747699737549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1387 1.8817370757460594e-02</internalNodes>\n          <leafValues>\n            5.2206891775131226e-01 2.0000520348548889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1388 -1.3434339780360460e-03</internalNodes>\n          <leafValues>\n            4.0145379304885864e-01 5.3016197681427002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1389 1.7557960236445069e-03</internalNodes>\n          <leafValues>\n            4.7940391302108765e-01 5.6531697511672974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1390 -9.5637463033199310e-02</internalNodes>\n          <leafValues>\n            2.0341950654983521e-01 5.0067067146301270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1391 -2.2241229191422462e-02</internalNodes>\n          <leafValues>\n            7.6724731922149658e-01 5.0463402271270752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1392 -1.5575819648802280e-02</internalNodes>\n          <leafValues>\n            7.4903422594070435e-01 4.7558510303497314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1393 5.3599118255078793e-03</internalNodes>\n          <leafValues>\n            5.3653037548065186e-01 4.0046709775924683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1394 -2.1763499826192856e-02</internalNodes>\n          <leafValues>\n            7.4015498161315918e-02 4.9641749262809753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1395 -1.6561590135097504e-01</internalNodes>\n          <leafValues>\n            2.8591030836105347e-01 5.2180862426757812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1396 1.6461320046801120e-04</internalNodes>\n          <leafValues>\n            4.1916158795356750e-01 5.3807932138442993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1397 -8.9077502489089966e-03</internalNodes>\n          <leafValues>\n            6.2731927633285522e-01 4.8774048686027527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1398 8.6346449097618461e-04</internalNodes>\n          <leafValues>\n            5.1599407196044922e-01 3.6710259318351746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1399 -1.3751760125160217e-03</internalNodes>\n          <leafValues>\n            5.8843767642974854e-01 4.5790839195251465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1400 -1.4081239933148026e-03</internalNodes>\n          <leafValues>\n            3.5605099797248840e-01 5.1399451494216919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1401 -3.9342888630926609e-03</internalNodes>\n          <leafValues>\n            5.9942889213562012e-01 4.6642720699310303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1402 -3.1966928392648697e-02</internalNodes>\n          <leafValues>\n            3.3454620838165283e-01 5.1441830396652222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1403 -1.5089280168467667e-05</internalNodes>\n          <leafValues>\n            5.5826562643051147e-01 4.4140571355819702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1404 5.1994470413774252e-04</internalNodes>\n          <leafValues>\n            4.6236801147460938e-01 6.1689937114715576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1405 -3.4220460802316666e-03</internalNodes>\n          <leafValues>\n            6.5570747852325439e-01 4.9748051166534424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1406 1.7723299970384687e-04</internalNodes>\n          <leafValues>\n            5.2695018053054810e-01 3.9019080996513367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1407 1.5716759953647852e-03</internalNodes>\n          <leafValues>\n            4.6333730220794678e-01 5.7904577255249023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1408 -8.9041329920291901e-03</internalNodes>\n          <leafValues>\n            2.6896080374717712e-01 5.0535911321640015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1409 4.0677518700249493e-04</internalNodes>\n          <leafValues>\n            5.4566031694412231e-01 4.3298989534378052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1410 6.7604780197143555e-03</internalNodes>\n          <leafValues>\n            4.6489939093589783e-01 6.6897618770599365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1411 2.9100088868290186e-03</internalNodes>\n          <leafValues>\n            5.3097039461135864e-01 3.3778399229049683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1412 1.3885459629818797e-03</internalNodes>\n          <leafValues>\n            4.0747389197349548e-01 5.3491330146789551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1413 -7.6764263212680817e-02</internalNodes>\n          <leafValues>\n            1.9921760261058807e-01 5.2282422780990601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1414 -2.2688310127705336e-04</internalNodes>\n          <leafValues>\n            5.4385018348693848e-01 4.2530721426010132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1415 -6.3094152137637138e-03</internalNodes>\n          <leafValues>\n            4.2591789364814758e-01 5.3789097070693970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1416 -1.1007279902696609e-01</internalNodes>\n          <leafValues>\n            6.9041568040847778e-01 4.7217491269111633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1417 2.8619659133255482e-04</internalNodes>\n          <leafValues>\n            4.5249149203300476e-01 5.5483061075210571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1418 2.9425329557852820e-05</internalNodes>\n          <leafValues>\n            5.3703737258911133e-01 4.2364639043807983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1419 -2.4886570870876312e-02</internalNodes>\n          <leafValues>\n            6.4235579967498779e-01 4.9693039059638977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1420 3.3148851245641708e-02</internalNodes>\n          <leafValues>\n            4.9884751439094543e-01 1.6138119995594025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1421 7.8491691965609789e-04</internalNodes>\n          <leafValues>\n            5.4160261154174805e-01 4.2230090498924255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1422 4.7087189741432667e-03</internalNodes>\n          <leafValues>\n            4.5763289928436279e-01 6.0275578498840332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1423 2.4144479539245367e-03</internalNodes>\n          <leafValues>\n            5.3089731931686401e-01 4.4224989414215088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1424 1.9523180089890957e-03</internalNodes>\n          <leafValues>\n            4.7056341171264648e-01 6.6633248329162598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1425 1.3031980488449335e-03</internalNodes>\n          <leafValues>\n            4.4061261415481567e-01 5.5269622802734375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1426 4.4735497795045376e-03</internalNodes>\n          <leafValues>\n            5.1290237903594971e-01 3.3014988899230957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1427 -2.6652868837118149e-03</internalNodes>\n          <leafValues>\n            3.1354710459709167e-01 5.1750361919403076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1428 1.3666770246345550e-04</internalNodes>\n          <leafValues>\n            4.1193708777427673e-01 5.3068768978118896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1429 -1.7126450315117836e-02</internalNodes>\n          <leafValues>\n            6.1778062582015991e-01 4.8365789651870728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1430 -2.6601430727168918e-04</internalNodes>\n          <leafValues>\n            3.6543309688568115e-01 5.1697367429733276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1431 -2.2932380437850952e-02</internalNodes>\n          <leafValues>\n            3.4909150004386902e-01 5.1639920473098755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1432 2.3316550068557262e-03</internalNodes>\n          <leafValues>\n            5.1662999391555786e-01 3.7093898653984070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1433 1.6925660893321037e-02</internalNodes>\n          <leafValues>\n            5.0147360563278198e-01 8.0539882183074951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1434 -8.9858826249837875e-03</internalNodes>\n          <leafValues>\n            6.4707887172698975e-01 4.6570208668708801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1435 -1.1874699965119362e-02</internalNodes>\n          <leafValues>\n            3.2463788986206055e-01 5.2587550878524780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1436 1.9350569345988333e-04</internalNodes>\n          <leafValues>\n            5.1919418573379517e-01 3.8396438956260681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1437 5.8713490143418312e-03</internalNodes>\n          <leafValues>\n            4.9181339144706726e-01 6.1870431900024414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1438 -2.4838790297508240e-01</internalNodes>\n          <leafValues>\n            1.8368029594421387e-01 4.9881500005722046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1439 1.2256000190973282e-02</internalNodes>\n          <leafValues>\n            5.2270537614822388e-01 3.6320298910140991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1440 8.3990179700776935e-04</internalNodes>\n          <leafValues>\n            4.4902500510215759e-01 5.7741481065750122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1441 2.5407369248569012e-03</internalNodes>\n          <leafValues>\n            4.8047870397567749e-01 5.8582991361618042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1442 -1.4822429977357388e-02</internalNodes>\n          <leafValues>\n            2.5210499763488770e-01 5.0235372781753540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1443 -5.7973959483206272e-03</internalNodes>\n          <leafValues>\n            5.9966957569122314e-01 4.8537150025367737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1444 7.2662148158997297e-04</internalNodes>\n          <leafValues>\n            5.1537168025970459e-01 3.6717799305915833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1445 -1.7232580110430717e-02</internalNodes>\n          <leafValues>\n            6.6217190027236938e-01 4.9946561455726624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1446 7.8624086454510689e-03</internalNodes>\n          <leafValues>\n            4.6333950757980347e-01 6.2561017274856567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1447 -4.7343620099127293e-03</internalNodes>\n          <leafValues>\n            3.6155730485916138e-01 5.2818852663040161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1448 8.3048478700220585e-04</internalNodes>\n          <leafValues>\n            4.4428890943527222e-01 5.5509579181671143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1449 7.6602199114859104e-03</internalNodes>\n          <leafValues>\n            5.1629352569580078e-01 2.6133549213409424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1450 -4.1048377752304077e-03</internalNodes>\n          <leafValues>\n            2.7896320819854736e-01 5.0190317630767822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1451 4.8512578941881657e-03</internalNodes>\n          <leafValues>\n            4.9689841270446777e-01 5.6616681814193726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1452 9.9896453320980072e-04</internalNodes>\n          <leafValues>\n            4.4456079602241516e-01 5.5518132448196411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1453 -2.7023631334304810e-01</internalNodes>\n          <leafValues>\n            2.9388209804892540e-02 5.1513141393661499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1454 -1.3090680353343487e-02</internalNodes>\n          <leafValues>\n            5.6993997097015381e-01 4.4474598765373230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1455 -9.4342790544033051e-03</internalNodes>\n          <leafValues>\n            4.3054661154747009e-01 5.4878950119018555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1456 -1.5482039889320731e-03</internalNodes>\n          <leafValues>\n            3.6803171038627625e-01 5.1280808448791504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1457 5.3746132180094719e-03</internalNodes>\n          <leafValues>\n            4.8389169573783875e-01 6.1015558242797852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1458 1.5786769799888134e-03</internalNodes>\n          <leafValues>\n            5.3252232074737549e-01 4.1185480356216431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1459 3.6856050137430429e-03</internalNodes>\n          <leafValues>\n            4.8109480738639832e-01 6.2523031234741211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1460 9.3887019902467728e-03</internalNodes>\n          <leafValues>\n            5.2002298831939697e-01 3.6294108629226685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1461 1.2792630121111870e-02</internalNodes>\n          <leafValues>\n            4.9617099761962891e-01 6.7380160093307495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1462 -3.3661040943115950e-03</internalNodes>\n          <leafValues>\n            4.0602791309356689e-01 5.2835988998413086e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1463 3.9771420415490866e-04</internalNodes>\n          <leafValues>\n            4.6741139888763428e-01 5.9007751941680908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1464 1.4868030557408929e-03</internalNodes>\n          <leafValues>\n            4.5191168785095215e-01 6.0820537805557251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1465 -8.8686749339103699e-02</internalNodes>\n          <leafValues>\n            2.8078991174697876e-01 5.1809918880462646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1466 -7.4296112870797515e-05</internalNodes>\n          <leafValues>\n            5.2955842018127441e-01 4.0876251459121704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1467 -1.4932939848222304e-05</internalNodes>\n          <leafValues>\n            5.4614001512527466e-01 4.5385429263114929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1468 5.9162238612771034e-03</internalNodes>\n          <leafValues>\n            5.3291612863540649e-01 4.1921341419219971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1469 1.1141640134155750e-03</internalNodes>\n          <leafValues>\n            4.5120179653167725e-01 5.7062172889709473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1470 8.9249362645205110e-05</internalNodes>\n          <leafValues>\n            4.5778059959411621e-01 5.8976382017135620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1471 2.5319510605186224e-03</internalNodes>\n          <leafValues>\n            5.2996039390563965e-01 3.3576390147209167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1472 1.2426200322806835e-02</internalNodes>\n          <leafValues>\n            4.9590590596199036e-01 1.3466019928455353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1473 2.8335750102996826e-02</internalNodes>\n          <leafValues>\n            5.1170790195465088e-01 6.1043637106195092e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1474 6.6165882162749767e-03</internalNodes>\n          <leafValues>\n            4.7363498806953430e-01 7.0116281509399414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1475 8.0468766391277313e-03</internalNodes>\n          <leafValues>\n            5.2164179086685181e-01 3.2828199863433838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1476 -1.1193980462849140e-03</internalNodes>\n          <leafValues>\n            5.8098608255386353e-01 4.5637390017509460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1477 1.3277590274810791e-02</internalNodes>\n          <leafValues>\n            5.3983622789382935e-01 4.1039010882377625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1478 4.8794739996083081e-04</internalNodes>\n          <leafValues>\n            4.2492860555648804e-01 5.4105907678604126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1479 1.1243170127272606e-02</internalNodes>\n          <leafValues>\n            5.2699637413024902e-01 3.4382158517837524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1480 -8.9896668214350939e-04</internalNodes>\n          <leafValues>\n            5.6330758333206177e-01 4.4566130638122559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1481 6.6677159629762173e-03</internalNodes>\n          <leafValues>\n            5.3128892183303833e-01 4.3626791238784790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1482 2.8947299346327782e-02</internalNodes>\n          <leafValues>\n            4.7017949819564819e-01 6.5757977962493896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1483 -2.3400049656629562e-02</internalNodes>\n          <leafValues>\n            0. 5.1373988389968872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1484 -8.9117050170898438e-02</internalNodes>\n          <leafValues>\n            2.3745279759168625e-02 4.9424308538436890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1485 -1.4054600149393082e-02</internalNodes>\n          <leafValues>\n            3.1273230910301208e-01 5.1175111532211304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1486 8.1239398568868637e-03</internalNodes>\n          <leafValues>\n            5.0090491771697998e-01 2.5200259685516357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1487 -4.9964650534093380e-03</internalNodes>\n          <leafValues>\n            6.3871437311172485e-01 4.9278119206428528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1488 3.1253970228135586e-03</internalNodes>\n          <leafValues>\n            5.1368498802185059e-01 3.6804521083831787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1489 6.7669642157852650e-03</internalNodes>\n          <leafValues>\n            5.5098438262939453e-01 4.3636319041252136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1490 -2.3711440153419971e-03</internalNodes>\n          <leafValues>\n            6.1623352766036987e-01 4.5869469642639160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1491 -5.3522791713476181e-03</internalNodes>\n          <leafValues>\n            6.1854577064514160e-01 4.9204909801483154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1492 -1.5968859195709229e-02</internalNodes>\n          <leafValues>\n            1.3826179504394531e-01 4.9832528829574585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1493 4.7676060348749161e-03</internalNodes>\n          <leafValues>\n            4.6880578994750977e-01 5.4900461435317993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1494 -2.4714691098779440e-03</internalNodes>\n          <leafValues>\n            2.3685149848461151e-01 5.0039529800415039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1495 -7.1033788844943047e-04</internalNodes>\n          <leafValues>\n            5.8563941717147827e-01 4.7215330600738525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1496 -1.4117559790611267e-01</internalNodes>\n          <leafValues>\n            8.6900062859058380e-02 4.9615910649299622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1497 1.0651809722185135e-01</internalNodes>\n          <leafValues>\n            5.1388370990753174e-01 1.7410050332546234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1498 -5.2744749933481216e-02</internalNodes>\n          <leafValues>\n            7.3536360263824463e-01 4.7728818655014038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1499 -4.7431760467588902e-03</internalNodes>\n          <leafValues>\n            3.8844060897827148e-01 5.2927017211914062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1500 9.9676765967160463e-04</internalNodes>\n          <leafValues>\n            5.2234929800033569e-01 4.0034240484237671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1501 8.0284131690859795e-03</internalNodes>\n          <leafValues>\n            4.9591061472892761e-01 7.2129642963409424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1502 8.6025858763605356e-04</internalNodes>\n          <leafValues>\n            4.4448840618133545e-01 5.5384761095046997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1503 9.3191501218825579e-04</internalNodes>\n          <leafValues>\n            5.3983712196350098e-01 4.1632440686225891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1504 -2.5082060601562262e-03</internalNodes>\n          <leafValues>\n            5.8542650938034058e-01 4.5625001192092896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1505 -2.1378761157393456e-03</internalNodes>\n          <leafValues>\n            4.6080690622329712e-01 5.2802592515945435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1506 -2.1546049974858761e-03</internalNodes>\n          <leafValues>\n            3.7911269068717957e-01 5.2559971809387207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1507 -7.6214009895920753e-03</internalNodes>\n          <leafValues>\n            5.9986090660095215e-01 4.9520739912986755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1508 2.2055360022932291e-03</internalNodes>\n          <leafValues>\n            4.4842061400413513e-01 5.5885308980941772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1509 1.2586950324475765e-03</internalNodes>\n          <leafValues>\n            5.4507470130920410e-01 4.4238409399986267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1510 -5.0926720723509789e-03</internalNodes>\n          <leafValues>\n            4.1182750463485718e-01 5.2630358934402466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1511 -2.5095739401876926e-03</internalNodes>\n          <leafValues>\n            5.7879078388214111e-01 4.9984949827194214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1512 -7.7327556908130646e-02</internalNodes>\n          <leafValues>\n            8.3978658914566040e-01 4.8111200332641602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1513 -4.1485819965600967e-02</internalNodes>\n          <leafValues>\n            2.4086110293865204e-01 5.1769930124282837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1514 1.0355669655837119e-04</internalNodes>\n          <leafValues>\n            4.3553608655929565e-01 5.4170542955398560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1515 1.3255809899419546e-03</internalNodes>\n          <leafValues>\n            5.4539710283279419e-01 4.8940950632095337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1516 -8.0598732456564903e-03</internalNodes>\n          <leafValues>\n            5.7710242271423340e-01 4.5779189467430115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1517 1.9058620557188988e-02</internalNodes>\n          <leafValues>\n            5.1698678731918335e-01 3.4004750847816467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1518 -3.5057891160249710e-02</internalNodes>\n          <leafValues>\n            2.2032439708709717e-01 5.0005030632019043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1519 5.7296059094369411e-03</internalNodes>\n          <leafValues>\n            5.0434082746505737e-01 6.5975707769393921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1520 -1.1648329906165600e-02</internalNodes>\n          <leafValues>\n            2.1862849593162537e-01 4.9966529011726379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1521 1.4544479781761765e-03</internalNodes>\n          <leafValues>\n            5.0076818466186523e-01 5.5037277936935425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1522 -2.5030909455381334e-04</internalNodes>\n          <leafValues>\n            4.1298410296440125e-01 5.2416700124740601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1523 -8.2907272735610604e-04</internalNodes>\n          <leafValues>\n            5.4128682613372803e-01 4.9744960665702820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1524 1.0862209601327777e-03</internalNodes>\n          <leafValues>\n            4.6055299043655396e-01 5.8792287111282349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1525 2.0000500080641359e-04</internalNodes>\n          <leafValues>\n            5.2788549661636353e-01 4.7052091360092163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1526 2.9212920926511288e-03</internalNodes>\n          <leafValues>\n            5.1296097040176392e-01 3.7555369734764099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1527 2.5387400761246681e-02</internalNodes>\n          <leafValues>\n            4.8226919770240784e-01 5.7907682657241821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1528 -3.1968469265848398e-03</internalNodes>\n          <leafValues>\n            5.2483952045440674e-01 3.9628401398658752e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>182</maxWeakCount>\n      <stageThreshold>9.0253349304199219e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1529 5.8031738735735416e-03</internalNodes>\n          <leafValues>\n            3.4989839792251587e-01 5.9619832038879395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1530 -9.0003069490194321e-03</internalNodes>\n          <leafValues>\n            6.8166369199752808e-01 4.4785520434379578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1531 -1.1549659539014101e-03</internalNodes>\n          <leafValues>\n            5.5857062339782715e-01 3.5782510042190552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1532 -1.1069850297644734e-03</internalNodes>\n          <leafValues>\n            5.3650361299514771e-01 3.0504280328750610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1533 1.0308309720130637e-04</internalNodes>\n          <leafValues>\n            3.6390951275825500e-01 5.3446358442306519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1534 -5.0984839908778667e-03</internalNodes>\n          <leafValues>\n            2.8591570258140564e-01 5.5042648315429688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1535 8.2572200335562229e-04</internalNodes>\n          <leafValues>\n            5.2365237474441528e-01 3.4760418534278870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1536 9.9783325567841530e-03</internalNodes>\n          <leafValues>\n            4.7503221035003662e-01 6.2196469306945801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1537 -3.7402529269456863e-02</internalNodes>\n          <leafValues>\n            3.3433759212493896e-01 5.2780628204345703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1538 4.8548257909715176e-03</internalNodes>\n          <leafValues>\n            5.1921808719635010e-01 3.7004441022872925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1539 -1.8664470408111811e-03</internalNodes>\n          <leafValues>\n            2.9298439621925354e-01 5.0919449329376221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1540 1.6888890415430069e-02</internalNodes>\n          <leafValues>\n            3.6868458986282349e-01 5.4312258958816528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1541 -5.8372621424496174e-03</internalNodes>\n          <leafValues>\n            3.6321839690208435e-01 5.2213358879089355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1542 -1.4713739510625601e-03</internalNodes>\n          <leafValues>\n            5.8706837892532349e-01 4.7006508708000183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1543 -1.1522950371727347e-03</internalNodes>\n          <leafValues>\n            3.1958949565887451e-01 5.1409542560577393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1544 -4.2560300789773464e-03</internalNodes>\n          <leafValues>\n            6.3018590211868286e-01 4.8149210214614868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1545 -6.7378291860222816e-03</internalNodes>\n          <leafValues>\n            1.9770480692386627e-01 5.0258082151412964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1546 1.1382670141756535e-02</internalNodes>\n          <leafValues>\n            4.9541321396827698e-01 6.8670457601547241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1547 5.1794708706438541e-03</internalNodes>\n          <leafValues>\n            5.1644277572631836e-01 3.3506479859352112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1548 -1.1743789911270142e-01</internalNodes>\n          <leafValues>\n            2.3152460157871246e-01 5.2344137430191040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1549 2.8703449293971062e-02</internalNodes>\n          <leafValues>\n            4.6642971038818359e-01 6.7225211858749390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1550 4.8231030814349651e-03</internalNodes>\n          <leafValues>\n            5.2208751440048218e-01 2.7235329151153564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1551 2.6798530016094446e-03</internalNodes>\n          <leafValues>\n            5.0792771577835083e-01 2.9069489240646362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1552 8.0504082143306732e-03</internalNodes>\n          <leafValues>\n            4.8859509825706482e-01 6.3950210809707642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1553 4.8054959625005722e-03</internalNodes>\n          <leafValues>\n            5.1972568035125732e-01 3.6566638946533203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1554 -2.2420159075409174e-03</internalNodes>\n          <leafValues>\n            6.1534678936004639e-01 4.7637018561363220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1555 -1.3757710345089436e-02</internalNodes>\n          <leafValues>\n            2.6373448967933655e-01 5.0309032201766968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1556 -1.0338299721479416e-01</internalNodes>\n          <leafValues>\n            2.2875219583511353e-01 5.1824611425399780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1557 -9.4432085752487183e-03</internalNodes>\n          <leafValues>\n            6.9533038139343262e-01 4.6949490904808044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1558 8.0271181650459766e-04</internalNodes>\n          <leafValues>\n            5.4506552219390869e-01 4.2687839269638062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1559 -4.1945669800043106e-03</internalNodes>\n          <leafValues>\n            6.0913878679275513e-01 4.5716428756713867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1560 1.0942210443317890e-02</internalNodes>\n          <leafValues>\n            5.2410632371902466e-01 3.2845470309257507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1561 -5.7841069065034389e-04</internalNodes>\n          <leafValues>\n            5.3879290819168091e-01 4.1793689131736755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1562 -2.0888620056211948e-03</internalNodes>\n          <leafValues>\n            4.2926910519599915e-01 5.3017157316207886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1563 3.2383969519287348e-03</internalNodes>\n          <leafValues>\n            3.7923479080200195e-01 5.2207440137863159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1564 4.9075027927756310e-03</internalNodes>\n          <leafValues>\n            5.2372831106185913e-01 4.1267579793930054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1565 -3.2277941703796387e-02</internalNodes>\n          <leafValues>\n            1.9476559758186340e-01 4.9945020675659180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1566 -8.9711230248212814e-03</internalNodes>\n          <leafValues>\n            6.0112851858139038e-01 4.9290320277214050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1567 1.5321089886128902e-02</internalNodes>\n          <leafValues>\n            5.0097537040710449e-01 2.0398220419883728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1568 2.0855569746345282e-03</internalNodes>\n          <leafValues>\n            4.8621898889541626e-01 5.7216948270797729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1569 5.0615021027624607e-03</internalNodes>\n          <leafValues>\n            5.0002187490463257e-01 1.8018059432506561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1570 -3.7174751050770283e-03</internalNodes>\n          <leafValues>\n            5.5301171541213989e-01 4.8975929617881775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1571 -1.2170500122010708e-02</internalNodes>\n          <leafValues>\n            4.1786059737205505e-01 5.3837239742279053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1572 4.6248398721218109e-03</internalNodes>\n          <leafValues>\n            4.9971699714660645e-01 5.7613271474838257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1573 -2.1040429419372231e-04</internalNodes>\n          <leafValues>\n            5.3318071365356445e-01 4.0976810455322266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1574 -1.4641780406236649e-02</internalNodes>\n          <leafValues>\n            5.7559251785278320e-01 5.0517761707305908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1575 3.3199489116668701e-03</internalNodes>\n          <leafValues>\n            4.5769768953323364e-01 6.0318058729171753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1576 3.7236879579722881e-03</internalNodes>\n          <leafValues>\n            4.3803969025611877e-01 5.4158830642700195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1577 8.2951161311939359e-04</internalNodes>\n          <leafValues>\n            5.1630318164825439e-01 3.7022191286087036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1578 -1.1408490128815174e-02</internalNodes>\n          <leafValues>\n            6.0729467868804932e-01 4.8625651001930237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1579 -4.5320121571421623e-03</internalNodes>\n          <leafValues>\n            3.2924759387969971e-01 5.0889629125595093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1580 5.1276017911732197e-03</internalNodes>\n          <leafValues>\n            4.8297679424285889e-01 6.1227089166641235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1581 9.8583158105611801e-03</internalNodes>\n          <leafValues>\n            4.6606799960136414e-01 6.5561771392822266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1582 3.6985918879508972e-02</internalNodes>\n          <leafValues>\n            5.2048492431640625e-01 1.6904720664024353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1583 4.6491161920130253e-03</internalNodes>\n          <leafValues>\n            5.1673221588134766e-01 3.7252250313758850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1584 -4.2664702050387859e-03</internalNodes>\n          <leafValues>\n            6.4064931869506836e-01 4.9873429536819458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1585 -4.7956590424291790e-04</internalNodes>\n          <leafValues>\n            5.8972930908203125e-01 4.4648739695549011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1586 3.6827160511165857e-03</internalNodes>\n          <leafValues>\n            5.4415607452392578e-01 3.4726628661155701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1587 -1.0059880092740059e-02</internalNodes>\n          <leafValues>\n            2.1431629359722137e-01 5.0048297643661499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1588 -3.0361840617842972e-04</internalNodes>\n          <leafValues>\n            5.3864240646362305e-01 4.5903238654136658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1589 -1.4545479789376259e-03</internalNodes>\n          <leafValues>\n            5.7511842250823975e-01 4.4970950484275818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1590 1.6515209572389722e-03</internalNodes>\n          <leafValues>\n            5.4219377040863037e-01 4.2385208606719971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1591 -7.8468639403581619e-03</internalNodes>\n          <leafValues>\n            4.0779209136962891e-01 5.2581572532653809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1592 -5.1259850151836872e-03</internalNodes>\n          <leafValues>\n            4.2292758822441101e-01 5.4794532060623169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1593 -3.6890961229801178e-02</internalNodes>\n          <leafValues>\n            6.5963757038116455e-01 4.6746781468391418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1594 2.4035639944486320e-04</internalNodes>\n          <leafValues>\n            4.2511358857154846e-01 5.5732029676437378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1595 -1.5150169929256663e-05</internalNodes>\n          <leafValues>\n            5.2592468261718750e-01 4.0741148591041565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1596 2.2108471021056175e-03</internalNodes>\n          <leafValues>\n            4.6717229485511780e-01 5.8863520622253418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1597 -1.1568620102480054e-03</internalNodes>\n          <leafValues>\n            5.7110661268234253e-01 4.4871619343757629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1598 4.9996292218565941e-03</internalNodes>\n          <leafValues>\n            5.2641981840133667e-01 2.8983271121978760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1599 -1.4656189596280456e-03</internalNodes>\n          <leafValues>\n            3.8917380571365356e-01 5.1978719234466553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1600 -1.1975039960816503e-03</internalNodes>\n          <leafValues>\n            5.7958728075027466e-01 4.9279558658599854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1601 -4.4954330660402775e-03</internalNodes>\n          <leafValues>\n            2.3776030540466309e-01 5.0125551223754883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1602 1.4997160178609192e-04</internalNodes>\n          <leafValues>\n            4.8766261339187622e-01 5.6176078319549561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1603 2.6391509454697371e-03</internalNodes>\n          <leafValues>\n            5.1680880784988403e-01 3.7655091285705566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1604 -2.9368131072260439e-04</internalNodes>\n          <leafValues>\n            5.4466491937637329e-01 4.8746308684349060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1605 1.4211760135367513e-03</internalNodes>\n          <leafValues>\n            4.6878978610038757e-01 6.6913318634033203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1606 7.9427637159824371e-02</internalNodes>\n          <leafValues>\n            5.1934438943862915e-01 2.7329459786415100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1607 7.9937502741813660e-02</internalNodes>\n          <leafValues>\n            4.9717310070991516e-01 1.7820839583873749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1608 1.1089259758591652e-02</internalNodes>\n          <leafValues>\n            5.1659947633743286e-01 3.2094758749008179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1609 1.6560709627810866e-04</internalNodes>\n          <leafValues>\n            4.0584719181060791e-01 5.3072762489318848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1610 -5.3354292176663876e-03</internalNodes>\n          <leafValues>\n            3.4450569748878479e-01 5.1581299304962158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1611 1.1287260567769408e-03</internalNodes>\n          <leafValues>\n            4.5948630571365356e-01 6.0755330324172974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1612 -2.1969219669699669e-02</internalNodes>\n          <leafValues>\n            1.6804009675979614e-01 5.2285957336425781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1613 -2.1775320055894554e-04</internalNodes>\n          <leafValues>\n            3.8615968823432922e-01 5.2156728506088257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1614 2.0200149447191507e-04</internalNodes>\n          <leafValues>\n            5.5179792642593384e-01 4.3630391359329224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1615 -2.1733149886131287e-02</internalNodes>\n          <leafValues>\n            7.9994601011276245e-01 4.7898510098457336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1616 -8.4399932529777288e-04</internalNodes>\n          <leafValues>\n            4.0859758853912354e-01 5.3747731447219849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1617 -4.3895249837078154e-04</internalNodes>\n          <leafValues>\n            5.4704052209854126e-01 4.3661430478096008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1618 1.5092400135472417e-03</internalNodes>\n          <leafValues>\n            4.9889969825744629e-01 5.8421492576599121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1619 -3.5547839943319559e-03</internalNodes>\n          <leafValues>\n            6.7536902427673340e-01 4.7210058569908142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1620 4.8191400128416717e-04</internalNodes>\n          <leafValues>\n            5.4158538579940796e-01 4.3571090698242188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1621 -6.0264398343861103e-03</internalNodes>\n          <leafValues>\n            2.2585099935531616e-01 4.9918809533119202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1622 -1.1668140068650246e-02</internalNodes>\n          <leafValues>\n            6.2565547227859497e-01 4.9274989962577820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1623 -2.8718370012938976e-03</internalNodes>\n          <leafValues>\n            3.9477849006652832e-01 5.2458018064498901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1624 1.7051169648766518e-02</internalNodes>\n          <leafValues>\n            4.7525110840797424e-01 5.7942241430282593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1625 -1.3352080248296261e-02</internalNodes>\n          <leafValues>\n            6.0411047935485840e-01 4.5445358753204346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1626 -3.9301801007241011e-04</internalNodes>\n          <leafValues>\n            4.2582759261131287e-01 5.5449050664901733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1627 3.0483349692076445e-03</internalNodes>\n          <leafValues>\n            5.2334201335906982e-01 3.7802729010581970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1628 -4.3579288758337498e-03</internalNodes>\n          <leafValues>\n            6.3718891143798828e-01 4.8386740684509277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1629 5.6661018170416355e-03</internalNodes>\n          <leafValues>\n            5.3747057914733887e-01 4.1636660695075989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1630 6.0677339206449687e-05</internalNodes>\n          <leafValues>\n            4.6387958526611328e-01 5.3116250038146973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1631 3.6738160997629166e-02</internalNodes>\n          <leafValues>\n            4.6886560320854187e-01 6.4665240049362183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1632 8.6528137326240540e-03</internalNodes>\n          <leafValues>\n            5.2043187618255615e-01 2.1886579692363739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1633 -1.5371359884738922e-01</internalNodes>\n          <leafValues>\n            1.6303719580173492e-01 4.9588400125503540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1634 -4.1560421232134104e-04</internalNodes>\n          <leafValues>\n            5.7744592428207397e-01 4.6964588761329651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1635 -1.2640169588848948e-03</internalNodes>\n          <leafValues>\n            3.9771759510040283e-01 5.2171981334686279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1636 -3.5473341122269630e-03</internalNodes>\n          <leafValues>\n            6.0465282201766968e-01 4.8083150386810303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1637 3.0019069527043030e-05</internalNodes>\n          <leafValues>\n            3.9967238903045654e-01 5.2282011508941650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1638 1.3113019522279501e-03</internalNodes>\n          <leafValues>\n            4.7121581435203552e-01 5.7659977674484253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1639 -1.3374709524214268e-03</internalNodes>\n          <leafValues>\n            4.1095849871635437e-01 5.2531701326370239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1640 2.0876709371805191e-02</internalNodes>\n          <leafValues>\n            5.2029937505722046e-01 1.7579819262027740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1641 -7.5497948564589024e-03</internalNodes>\n          <leafValues>\n            6.5666097402572632e-01 4.6949750185012817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1642 2.4188550189137459e-02</internalNodes>\n          <leafValues>\n            5.1286739110946655e-01 3.3702209591865540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1643 -2.9358828905969858e-03</internalNodes>\n          <leafValues>\n            6.5807867050170898e-01 4.6945410966873169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1644 5.7557929307222366e-02</internalNodes>\n          <leafValues>\n            5.1464450359344482e-01 2.7752599120140076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1645 -1.1343370424583554e-03</internalNodes>\n          <leafValues>\n            3.8366019725799561e-01 5.1926672458648682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1646 1.6816999763250351e-02</internalNodes>\n          <leafValues>\n            5.0855928659439087e-01 6.1772608757019043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1647 5.0535178743302822e-03</internalNodes>\n          <leafValues>\n            5.1387631893157959e-01 3.6847919225692749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1648 -4.5874710194766521e-03</internalNodes>\n          <leafValues>\n            5.9896552562713623e-01 4.8352020978927612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1649 1.6882460331544280e-03</internalNodes>\n          <leafValues>\n            4.5094868540763855e-01 5.7230567932128906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1650 -1.6554000321775675e-03</internalNodes>\n          <leafValues>\n            3.4967708587646484e-01 5.2433192729949951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1651 -1.9373800605535507e-02</internalNodes>\n          <leafValues>\n            1.1205369979143143e-01 4.9687129259109497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1652 1.0374450124800205e-02</internalNodes>\n          <leafValues>\n            5.1481968164443970e-01 4.3952131271362305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1653 1.4973050565458834e-04</internalNodes>\n          <leafValues>\n            4.0849998593330383e-01 5.2698868513107300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1654 -4.2981930077075958e-02</internalNodes>\n          <leafValues>\n            6.3941049575805664e-01 5.0185042619705200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1655 8.3065936341881752e-03</internalNodes>\n          <leafValues>\n            4.7075539827346802e-01 6.6983532905578613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1656 -4.1285790503025055e-03</internalNodes>\n          <leafValues>\n            4.5413690805435181e-01 5.3236472606658936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1657 1.7399420030415058e-03</internalNodes>\n          <leafValues>\n            4.3339619040489197e-01 5.4398661851882935e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1658 1.1739750334527344e-04</internalNodes>\n          <leafValues>\n            4.5796871185302734e-01 5.5434262752532959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1659 1.8585780344437808e-04</internalNodes>\n          <leafValues>\n            4.3246439099311829e-01 5.4267549514770508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1660 5.5587692186236382e-03</internalNodes>\n          <leafValues>\n            5.2572208642959595e-01 3.5506111383438110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1661 -7.9851560294628143e-03</internalNodes>\n          <leafValues>\n            6.0430181026458740e-01 4.6306359767913818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1662 6.0594122624024749e-04</internalNodes>\n          <leafValues>\n            4.5982548594474792e-01 5.5331951379776001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1663 -2.2983040253166109e-04</internalNodes>\n          <leafValues>\n            4.1307520866394043e-01 5.3224611282348633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1664 4.3740210821852088e-04</internalNodes>\n          <leafValues>\n            4.0430399775505066e-01 5.4092890024185181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1665 2.9482020181603730e-04</internalNodes>\n          <leafValues>\n            4.4949638843536377e-01 5.6288522481918335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1666 1.0312659665942192e-02</internalNodes>\n          <leafValues>\n            5.1775109767913818e-01 2.7043169736862183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1667 -7.7241109684109688e-03</internalNodes>\n          <leafValues>\n            1.9880190491676331e-01 4.9805539846420288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1668 -4.6797208487987518e-03</internalNodes>\n          <leafValues>\n            6.6447502374649048e-01 5.0182962417602539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1669 -5.0755459815263748e-03</internalNodes>\n          <leafValues>\n            3.8983049988746643e-01 5.1852691173553467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1670 2.2479740437120199e-03</internalNodes>\n          <leafValues>\n            4.8018088936805725e-01 5.6603360176086426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1671 8.3327008178457618e-04</internalNodes>\n          <leafValues>\n            5.2109199762344360e-01 3.9571881294250488e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1672 -4.1279330849647522e-02</internalNodes>\n          <leafValues>\n            6.1545419692993164e-01 5.0070542097091675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1673 -5.0930189900100231e-04</internalNodes>\n          <leafValues>\n            3.9759421348571777e-01 5.2284038066864014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1674 1.2568780221045017e-03</internalNodes>\n          <leafValues>\n            4.9791380763053894e-01 5.9391832351684570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1675 8.0048497766256332e-03</internalNodes>\n          <leafValues>\n            4.9844971299171448e-01 1.6333660483360291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1676 -1.1879300000146031e-03</internalNodes>\n          <leafValues>\n            5.9049648046493530e-01 4.9426248669624329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1677 6.1948952497914433e-04</internalNodes>\n          <leafValues>\n            4.1995579004287720e-01 5.3287261724472046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1678 6.6829859279096127e-03</internalNodes>\n          <leafValues>\n            5.4186028242111206e-01 4.9058890342712402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1679 -3.7062340416014194e-03</internalNodes>\n          <leafValues>\n            3.7259390950202942e-01 5.1380002498626709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1680 -3.9739411324262619e-02</internalNodes>\n          <leafValues>\n            6.4789611101150513e-01 5.0503468513488770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1681 1.4085009461268783e-03</internalNodes>\n          <leafValues>\n            4.6823391318321228e-01 6.3778841495513916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1682 3.9322688826359808e-04</internalNodes>\n          <leafValues>\n            5.4585301876068115e-01 4.1504821181297302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1683 -1.8979819724336267e-03</internalNodes>\n          <leafValues>\n            3.6901599168777466e-01 5.1497042179107666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1684 -1.3970440253615379e-02</internalNodes>\n          <leafValues>\n            6.0505628585815430e-01 4.8113578557968140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1685 -1.0100819915533066e-01</internalNodes>\n          <leafValues>\n            2.0170800387859344e-01 4.9923619627952576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1686 -1.7346920445561409e-02</internalNodes>\n          <leafValues>\n            5.7131487131118774e-01 4.8994860053062439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1687 1.5619759506080300e-04</internalNodes>\n          <leafValues>\n            4.2153888940811157e-01 5.3926420211791992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1688 1.3438929617404938e-01</internalNodes>\n          <leafValues>\n            5.1361519098281860e-01 3.7676128745079041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1689 -2.4582240730524063e-02</internalNodes>\n          <leafValues>\n            7.0273578166961670e-01 4.7479069232940674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1690 -3.8553720805794001e-03</internalNodes>\n          <leafValues>\n            4.3174090981483459e-01 5.4277169704437256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1691 -2.3165249731391668e-03</internalNodes>\n          <leafValues>\n            5.9426987171173096e-01 4.6186479926109314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1692 -4.8518120311200619e-03</internalNodes>\n          <leafValues>\n            6.1915689706802368e-01 4.8848950862884521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1693 2.4699938949197531e-03</internalNodes>\n          <leafValues>\n            5.2566647529602051e-01 4.0171998739242554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1694 4.5496959239244461e-02</internalNodes>\n          <leafValues>\n            5.2378678321838379e-01 2.6857739686965942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1695 -2.0319599658250809e-02</internalNodes>\n          <leafValues>\n            2.1304459869861603e-01 4.9797388911247253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1696 2.6994998916052282e-04</internalNodes>\n          <leafValues>\n            4.8140418529510498e-01 5.5431222915649414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1697 -1.8232699949294329e-03</internalNodes>\n          <leafValues>\n            6.4825797080993652e-01 4.7099891304969788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1698 -6.3015790656208992e-03</internalNodes>\n          <leafValues>\n            4.5819279551506042e-01 5.3062361478805542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1699 -2.4139499873854220e-04</internalNodes>\n          <leafValues>\n            5.2320867776870728e-01 4.0517631173133850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1700 -1.0330369696021080e-03</internalNodes>\n          <leafValues>\n            5.5562019348144531e-01 4.7891938686370850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1701 1.8041160365100950e-04</internalNodes>\n          <leafValues>\n            5.2294427156448364e-01 4.0118101239204407e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1702 -6.1407860368490219e-02</internalNodes>\n          <leafValues>\n            6.2986820936203003e-01 5.0107032060623169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1703 -6.9543913006782532e-02</internalNodes>\n          <leafValues>\n            7.2282809019088745e-01 4.7731840610504150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1704 -7.0542663335800171e-02</internalNodes>\n          <leafValues>\n            2.2695130109786987e-01 5.1825290918350220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1705 2.4423799477517605e-03</internalNodes>\n          <leafValues>\n            5.2370971441268921e-01 4.0981510281562805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1706 1.5494349645450711e-03</internalNodes>\n          <leafValues>\n            4.7737509012222290e-01 5.4680430889129639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1707 -2.3914219811558723e-02</internalNodes>\n          <leafValues>\n            7.1469759941101074e-01 4.7838249802589417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1708 -1.2453690171241760e-02</internalNodes>\n          <leafValues>\n            2.6352968811988831e-01 5.2411228418350220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1709 -2.0760179904755205e-04</internalNodes>\n          <leafValues>\n            3.6237570643424988e-01 5.1136088371276855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1710 2.9781080229440704e-05</internalNodes>\n          <leafValues>\n            4.7059321403503418e-01 5.4328018426895142e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>211</maxWeakCount>\n      <stageThreshold>1.0474919891357422e+02</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1711 1.1772749945521355e-02</internalNodes>\n          <leafValues>\n            3.8605189323425293e-01 6.4211672544479370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1712 2.7037570253014565e-02</internalNodes>\n          <leafValues>\n            4.3856549263000488e-01 6.7540389299392700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1713 -3.6419500247575343e-05</internalNodes>\n          <leafValues>\n            5.4871010780334473e-01 3.4233158826828003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1714 1.9995409529656172e-03</internalNodes>\n          <leafValues>\n            3.2305321097373962e-01 5.4003179073333740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1715 4.5278300531208515e-03</internalNodes>\n          <leafValues>\n            5.0916397571563721e-01 2.9350438714027405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1716 4.7890920541249216e-04</internalNodes>\n          <leafValues>\n            4.1781538724899292e-01 5.3440642356872559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1717 1.1720920447260141e-03</internalNodes>\n          <leafValues>\n            2.8991821408271790e-01 5.1320707798004150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1718 9.5305702416226268e-04</internalNodes>\n          <leafValues>\n            4.2801249027252197e-01 5.5608451366424561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1719 1.5099150004971307e-05</internalNodes>\n          <leafValues>\n            4.0448719263076782e-01 5.4047602415084839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1720 -6.0817901976406574e-04</internalNodes>\n          <leafValues>\n            4.2717689275741577e-01 5.5034661293029785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1721 3.3224520739167929e-03</internalNodes>\n          <leafValues>\n            3.9627239108085632e-01 5.3697347640991211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1722 -1.1037490330636501e-03</internalNodes>\n          <leafValues>\n            4.7271779179573059e-01 5.2377498149871826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1723 -1.4350269921123981e-03</internalNodes>\n          <leafValues>\n            5.6030082702636719e-01 4.2235091328620911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1724 2.0767399109899998e-03</internalNodes>\n          <leafValues>\n            5.2259171009063721e-01 4.7327259182929993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1725 -1.6412809782195836e-04</internalNodes>\n          <leafValues>\n            3.9990758895874023e-01 5.4327398538589478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1726 8.8302437216043472e-03</internalNodes>\n          <leafValues>\n            4.6783858537673950e-01 6.0273271799087524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1727 -1.0552070103585720e-02</internalNodes>\n          <leafValues>\n            3.4939670562744141e-01 5.2139747142791748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1728 -2.2731600329279900e-03</internalNodes>\n          <leafValues>\n            6.1858189105987549e-01 4.7490629553794861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1729 -8.4786332445219159e-04</internalNodes>\n          <leafValues>\n            5.2853411436080933e-01 3.8434821367263794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1730 1.2081359745934606e-03</internalNodes>\n          <leafValues>\n            5.3606408834457397e-01 3.4473359584808350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1731 2.6512730401009321e-03</internalNodes>\n          <leafValues>\n            4.5582920312881470e-01 6.1939620971679688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1732 -1.1012479662895203e-03</internalNodes>\n          <leafValues>\n            3.6802300810813904e-01 5.3276282548904419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1733 4.9561518244445324e-04</internalNodes>\n          <leafValues>\n            3.9605951309204102e-01 5.2749407291412354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1734 -4.3901771306991577e-02</internalNodes>\n          <leafValues>\n            7.0204448699951172e-01 4.9928390979766846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1735 3.4690350294113159e-02</internalNodes>\n          <leafValues>\n            5.0491642951965332e-01 2.7666029334068298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1736 -2.7442190330475569e-03</internalNodes>\n          <leafValues>\n            2.6726329326629639e-01 5.2749711275100708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1737 3.3316588960587978e-03</internalNodes>\n          <leafValues>\n            4.5794829726219177e-01 6.0011017322540283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1738 -2.0044570788741112e-02</internalNodes>\n          <leafValues>\n            3.1715941429138184e-01 5.2357178926467896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1739 1.3492030557245016e-03</internalNodes>\n          <leafValues>\n            5.2653628587722778e-01 4.0343248844146729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1740 2.9702018946409225e-03</internalNodes>\n          <leafValues>\n            5.3324568271636963e-01 4.5719841122627258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1741 6.3039981760084629e-03</internalNodes>\n          <leafValues>\n            4.5933109521865845e-01 6.0346359014511108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1742 -1.2936590239405632e-02</internalNodes>\n          <leafValues>\n            4.4379639625549316e-01 5.3729712963104248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1743 4.0148729458451271e-03</internalNodes>\n          <leafValues>\n            4.6803238987922668e-01 6.4378339052200317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1744 -2.6401679497212172e-03</internalNodes>\n          <leafValues>\n            3.7096318602561951e-01 5.3143328428268433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1745 1.3918439857661724e-02</internalNodes>\n          <leafValues>\n            4.7235551476478577e-01 7.1308088302612305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1746 -4.5087869511917233e-04</internalNodes>\n          <leafValues>\n            4.4923940300941467e-01 5.3704041242599487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1747 2.5384349282830954e-04</internalNodes>\n          <leafValues>\n            4.4068640470504761e-01 5.5144029855728149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1748 2.2710000630468130e-03</internalNodes>\n          <leafValues>\n            4.6824169158935547e-01 5.9679841995239258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1749 2.4120779708027840e-03</internalNodes>\n          <leafValues>\n            5.0793921947479248e-01 3.0185988545417786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1750 -3.6025670851813629e-05</internalNodes>\n          <leafValues>\n            5.6010371446609497e-01 4.4710969924926758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1751 -7.4905529618263245e-03</internalNodes>\n          <leafValues>\n            2.2075350582599640e-01 4.9899441003799438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1752 -1.7513120546936989e-02</internalNodes>\n          <leafValues>\n            6.5312159061431885e-01 5.0176489353179932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1753 1.4281630516052246e-01</internalNodes>\n          <leafValues>\n            4.9679630994796753e-01 1.4820620417594910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1754 5.5345268920063972e-03</internalNodes>\n          <leafValues>\n            4.8989468812942505e-01 5.9542238712310791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1755 -9.6323591424152255e-04</internalNodes>\n          <leafValues>\n            3.9271169900894165e-01 5.1960742473602295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1756 -2.0370010752230883e-03</internalNodes>\n          <leafValues>\n            5.6133252382278442e-01 4.8848581314086914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1757 1.6614829655736685e-03</internalNodes>\n          <leafValues>\n            4.4728800654411316e-01 5.5788809061050415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1758 -3.1188090797513723e-03</internalNodes>\n          <leafValues>\n            3.8405328989028931e-01 5.3974777460098267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1759 -6.4000617712736130e-03</internalNodes>\n          <leafValues>\n            5.8439838886260986e-01 4.5332181453704834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1760 3.1319601112045348e-04</internalNodes>\n          <leafValues>\n            5.4392218589782715e-01 4.2347279191017151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1761 -1.8222099170088768e-02</internalNodes>\n          <leafValues>\n            1.2884649634361267e-01 4.9584048986434937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1762 8.7969247251749039e-03</internalNodes>\n          <leafValues>\n            4.9512979388237000e-01 7.1534800529479980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1763 -4.2395070195198059e-03</internalNodes>\n          <leafValues>\n            3.9465999603271484e-01 5.1949369907379150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1764 9.7086271271109581e-03</internalNodes>\n          <leafValues>\n            4.8975038528442383e-01 6.0649001598358154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1765 -3.9934171363711357e-03</internalNodes>\n          <leafValues>\n            3.2454401254653931e-01 5.0608289241790771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1766 -1.6785059124231339e-02</internalNodes>\n          <leafValues>\n            1.5819530189037323e-01 5.2037787437438965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1767 1.8272090703248978e-02</internalNodes>\n          <leafValues>\n            4.6809351444244385e-01 6.6269791126251221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1768 5.6872838176786900e-03</internalNodes>\n          <leafValues>\n            5.2116978168487549e-01 3.5121849179267883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1769 -1.0739039862528443e-03</internalNodes>\n          <leafValues>\n            5.7683861255645752e-01 4.5298451185226440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1770 -3.7093870341777802e-03</internalNodes>\n          <leafValues>\n            4.5077630877494812e-01 5.3135812282562256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1771 -2.1110709349159151e-04</internalNodes>\n          <leafValues>\n            5.4608201980590820e-01 4.3333768844604492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1772 1.0670139454305172e-03</internalNodes>\n          <leafValues>\n            5.3718560934066772e-01 4.0783908963203430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1773 3.5943021066486835e-03</internalNodes>\n          <leafValues>\n            4.4712871313095093e-01 5.6438362598419189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1774 -5.1776031032204628e-03</internalNodes>\n          <leafValues>\n            4.4993931055068970e-01 5.2803301811218262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1775 -2.5414369883947074e-04</internalNodes>\n          <leafValues>\n            5.5161732435226440e-01 4.4077080488204956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1776 6.3522560521960258e-03</internalNodes>\n          <leafValues>\n            5.1941901445388794e-01 2.4652279913425446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1777 -4.4205080484971404e-04</internalNodes>\n          <leafValues>\n            3.8307058811187744e-01 5.1396822929382324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1778 7.4488727841526270e-04</internalNodes>\n          <leafValues>\n            4.8910909891128540e-01 5.9747868776321411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1779 -3.5116379149258137e-03</internalNodes>\n          <leafValues>\n            7.4136817455291748e-01 4.7687649726867676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1780 -1.2540910392999649e-02</internalNodes>\n          <leafValues>\n            3.6488190293312073e-01 5.2528268098831177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1781 9.4931852072477341e-03</internalNodes>\n          <leafValues>\n            5.1004928350448608e-01 3.6295869946479797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1782 1.2961150147020817e-02</internalNodes>\n          <leafValues>\n            5.2324420213699341e-01 4.3335610628128052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1783 4.7209449112415314e-03</internalNodes>\n          <leafValues>\n            4.6481490135192871e-01 6.3310527801513672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1784 -2.3119079414755106e-03</internalNodes>\n          <leafValues>\n            5.9303098917007446e-01 4.5310580730438232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1785 -2.8262299019843340e-03</internalNodes>\n          <leafValues>\n            3.8704779744148254e-01 5.2571010589599609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1786 -1.4311339473351836e-03</internalNodes>\n          <leafValues>\n            5.5225032567977905e-01 4.5618548989295959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1787 1.9378310535103083e-03</internalNodes>\n          <leafValues>\n            4.5462208986282349e-01 5.7369667291641235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1788 2.6343559147790074e-04</internalNodes>\n          <leafValues>\n            5.3457391262054443e-01 4.5718750357627869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1789 7.8257522545754910e-04</internalNodes>\n          <leafValues>\n            3.9678159356117249e-01 5.2201879024505615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1790 -1.9550440832972527e-02</internalNodes>\n          <leafValues>\n            2.8296428918838501e-01 5.2435082197189331e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1791 4.3914958951063454e-04</internalNodes>\n          <leafValues>\n            4.5900669693946838e-01 5.8990901708602905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1792 2.1452000364661217e-02</internalNodes>\n          <leafValues>\n            5.2314108610153198e-01 2.8553789854049683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1793 5.8973580598831177e-04</internalNodes>\n          <leafValues>\n            4.3972569704055786e-01 5.5064219236373901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1794 -2.6157610118389130e-02</internalNodes>\n          <leafValues>\n            3.1350791454315186e-01 5.1891750097274780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1795 -1.3959860429167747e-02</internalNodes>\n          <leafValues>\n            3.2132729887962341e-01 5.0407177209854126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1796 -6.3699018210172653e-03</internalNodes>\n          <leafValues>\n            6.3875448703765869e-01 4.8495069146156311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1797 -8.5613820701837540e-03</internalNodes>\n          <leafValues>\n            2.7591320872306824e-01 5.0320190191268921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1798 9.6622901037335396e-04</internalNodes>\n          <leafValues>\n            4.6856409311294556e-01 5.8348792791366577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1799 7.6550268568098545e-04</internalNodes>\n          <leafValues>\n            5.1752072572708130e-01 3.8964220881462097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1800 -8.1833340227603912e-03</internalNodes>\n          <leafValues>\n            2.0691369473934174e-01 5.2081221342086792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1801 -9.3976939097046852e-03</internalNodes>\n          <leafValues>\n            6.1340910196304321e-01 4.6412229537963867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1802 4.8028980381786823e-03</internalNodes>\n          <leafValues>\n            5.4541081190109253e-01 4.3952199816703796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1803 -3.5680569708347321e-03</internalNodes>\n          <leafValues>\n            6.3444852828979492e-01 4.6810939908027649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1804 4.0733120404183865e-03</internalNodes>\n          <leafValues>\n            5.2926832437515259e-01 4.0156200528144836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1805 1.2568129459396005e-03</internalNodes>\n          <leafValues>\n            4.3929880857467651e-01 5.4528248310089111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1806 -2.9065010603517294e-03</internalNodes>\n          <leafValues>\n            5.8988320827484131e-01 4.8633798956871033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1807 -2.4409340694546700e-03</internalNodes>\n          <leafValues>\n            4.0693649649620056e-01 5.2474218606948853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1808 2.4830700829625130e-02</internalNodes>\n          <leafValues>\n            5.1827257871627808e-01 3.6825248599052429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1809 -4.8854008316993713e-02</internalNodes>\n          <leafValues>\n            1.3075779378414154e-01 4.9612811207771301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1810 -1.6110379947349429e-03</internalNodes>\n          <leafValues>\n            6.4210057258605957e-01 4.8726621270179749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1811 -9.7009479999542236e-02</internalNodes>\n          <leafValues>\n            4.7769349068403244e-02 4.9509888887405396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1812 1.1209240183234215e-03</internalNodes>\n          <leafValues>\n            4.6162670850753784e-01 5.3547459840774536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1813 -1.3064090162515640e-03</internalNodes>\n          <leafValues>\n            6.2618541717529297e-01 4.6388059854507446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1814 4.5771620352752507e-04</internalNodes>\n          <leafValues>\n            5.3844177722930908e-01 4.6466401219367981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1815 -6.3149951165542006e-04</internalNodes>\n          <leafValues>\n            3.8040471076965332e-01 5.1302570104598999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1816 1.4505970466416329e-04</internalNodes>\n          <leafValues>\n            4.5543101429939270e-01 5.6644618511199951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1817 -1.6474550589919090e-02</internalNodes>\n          <leafValues>\n            6.5969580411911011e-01 4.7158598899841309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1818 1.3369579799473286e-02</internalNodes>\n          <leafValues>\n            5.1954662799835205e-01 3.0359649658203125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1819 1.0271780047332868e-04</internalNodes>\n          <leafValues>\n            5.2291762828826904e-01 4.1070660948753357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1820 -5.5311559699475765e-03</internalNodes>\n          <leafValues>\n            6.3528877496719360e-01 4.9609071016311646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1821 -2.6187049224972725e-03</internalNodes>\n          <leafValues>\n            3.8245460391044617e-01 5.1409840583801270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1822 5.0834268331527710e-03</internalNodes>\n          <leafValues>\n            4.9504399299621582e-01 6.2208187580108643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1823 7.9818159341812134e-02</internalNodes>\n          <leafValues>\n            4.9523359537124634e-01 1.3224759697914124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1824 -9.9226586520671844e-02</internalNodes>\n          <leafValues>\n            7.5427287817001343e-01 5.0084167718887329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1825 -6.5174017800018191e-04</internalNodes>\n          <leafValues>\n            3.6993029713630676e-01 5.1301211118698120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1826 -1.8996849656105042e-02</internalNodes>\n          <leafValues>\n            6.6891789436340332e-01 4.9212029576301575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1827 1.7346899956464767e-02</internalNodes>\n          <leafValues>\n            4.9833008646965027e-01 1.8591980636119843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1828 5.5082101607695222e-04</internalNodes>\n          <leafValues>\n            4.5744240283966064e-01 5.5221217870712280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1829 2.0056050270795822e-03</internalNodes>\n          <leafValues>\n            5.1317447423934937e-01 3.8564699888229370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1830 -7.7688191086053848e-03</internalNodes>\n          <leafValues>\n            4.3617001175880432e-01 5.4343092441558838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1831 5.0878278911113739e-02</internalNodes>\n          <leafValues>\n            4.6827208995819092e-01 6.8406397104263306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1832 -2.2901780903339386e-03</internalNodes>\n          <leafValues>\n            4.3292450904846191e-01 5.3060990571975708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1833 -1.5715380141045898e-04</internalNodes>\n          <leafValues>\n            5.3700572252273560e-01 4.3781641125679016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1834 1.0519240051507950e-01</internalNodes>\n          <leafValues>\n            5.1372742652893066e-01 6.7361466586589813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1835 2.7198919560760260e-03</internalNodes>\n          <leafValues>\n            4.1120609641075134e-01 5.2556651830673218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1836 4.8337779939174652e-02</internalNodes>\n          <leafValues>\n            5.4046237468719482e-01 4.4389671087265015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1837 9.5703761326149106e-04</internalNodes>\n          <leafValues>\n            4.3559691309928894e-01 5.3995108604431152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1838 -2.5371259078383446e-02</internalNodes>\n          <leafValues>\n            5.9951752424240112e-01 5.0310248136520386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1839 5.2457951009273529e-02</internalNodes>\n          <leafValues>\n            4.9502879381179810e-01 1.3983510434627533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1840 -1.2365629896521568e-02</internalNodes>\n          <leafValues>\n            6.3972991704940796e-01 4.9641060829162598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1841 -1.4589719474315643e-01</internalNodes>\n          <leafValues>\n            1.0016699880361557e-01 4.9463221430778503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1842 -1.5908600762486458e-02</internalNodes>\n          <leafValues>\n            3.3123299479484558e-01 5.2083408832550049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1843 3.9486068999394774e-04</internalNodes>\n          <leafValues>\n            4.4063639640808105e-01 5.4261028766632080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1844 -5.2454001270234585e-03</internalNodes>\n          <leafValues>\n            2.7995899319648743e-01 5.1899671554565430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1845 -5.0421799533069134e-03</internalNodes>\n          <leafValues>\n            6.9875800609588623e-01 4.7521421313285828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1846 2.9812189750373363e-03</internalNodes>\n          <leafValues>\n            4.9832889437675476e-01 6.3074797391891479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1847 -7.2884308174252510e-03</internalNodes>\n          <leafValues>\n            2.9823330044746399e-01 5.0268697738647461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1848 1.5094350092113018e-03</internalNodes>\n          <leafValues>\n            5.3084421157836914e-01 3.8329708576202393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1849 -9.3340799212455750e-03</internalNodes>\n          <leafValues>\n            2.0379640161991119e-01 4.9698171019554138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1850 2.8667140752077103e-02</internalNodes>\n          <leafValues>\n            5.0256967544555664e-01 6.9280272722244263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1851 1.7019680142402649e-01</internalNodes>\n          <leafValues>\n            4.9600529670715332e-01 1.4764429628849030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1852 -3.2614478841423988e-03</internalNodes>\n          <leafValues>\n            5.6030637025833130e-01 4.8260560631752014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1853 5.5769277969375253e-04</internalNodes>\n          <leafValues>\n            5.2055621147155762e-01 4.1296330094337463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1854 3.6258339881896973e-01</internalNodes>\n          <leafValues>\n            5.2216529846191406e-01 3.7686121463775635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1855 -1.1615130119025707e-02</internalNodes>\n          <leafValues>\n            6.0226827859878540e-01 4.6374899148941040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1856 -4.0795197710394859e-03</internalNodes>\n          <leafValues>\n            4.0704470872879028e-01 5.3374791145324707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1857 5.7204300537705421e-04</internalNodes>\n          <leafValues>\n            4.6018350124359131e-01 5.9003931283950806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1858 6.7543348995968699e-04</internalNodes>\n          <leafValues>\n            5.3982520103454590e-01 4.3454289436340332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1859 6.3295697327703238e-04</internalNodes>\n          <leafValues>\n            5.2015632390975952e-01 4.0513589978218079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1860 1.2435320531949401e-03</internalNodes>\n          <leafValues>\n            4.6423879265785217e-01 5.5474412441253662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1861 -4.7363857738673687e-03</internalNodes>\n          <leafValues>\n            6.1985671520233154e-01 4.6725520491600037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1862 -6.4658462069928646e-03</internalNodes>\n          <leafValues>\n            6.8373328447341919e-01 5.0190007686614990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1863 3.5017321351915598e-04</internalNodes>\n          <leafValues>\n            4.3448030948638916e-01 5.3636229038238525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1864 1.5754920605104417e-04</internalNodes>\n          <leafValues>\n            4.7600790858268738e-01 5.7320207357406616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1865 9.9774366244673729e-03</internalNodes>\n          <leafValues>\n            5.0909858942031860e-01 3.6350399255752563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1866 -4.1464529931545258e-04</internalNodes>\n          <leafValues>\n            5.5700647830963135e-01 4.5938020944595337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1867 -3.5888899583369493e-04</internalNodes>\n          <leafValues>\n            5.3568458557128906e-01 4.3391349911689758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1868 4.0463250479660928e-04</internalNodes>\n          <leafValues>\n            4.4398030638694763e-01 5.4367768764495850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1869 -8.2184787606820464e-04</internalNodes>\n          <leafValues>\n            4.0422949194908142e-01 5.1762992143630981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1870 5.9467419050633907e-03</internalNodes>\n          <leafValues>\n            4.9276518821716309e-01 5.6337797641754150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1871 -2.1753389388322830e-02</internalNodes>\n          <leafValues>\n            8.0062937736511230e-01 4.8008409142494202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1872 -1.4540379866957664e-02</internalNodes>\n          <leafValues>\n            3.9460548758506775e-01 5.1822227239608765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1873 -4.0510769933462143e-02</internalNodes>\n          <leafValues>\n            2.1324990317225456e-02 4.9357929825782776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1874 -5.8458268176764250e-04</internalNodes>\n          <leafValues>\n            4.0127959847450256e-01 5.3140252828598022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1875 5.5151800625026226e-03</internalNodes>\n          <leafValues>\n            4.6424189209938049e-01 5.8962607383728027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1876 -6.0626221820712090e-03</internalNodes>\n          <leafValues>\n            6.5021592378616333e-01 5.0164777040481567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1877 9.4535842537879944e-02</internalNodes>\n          <leafValues>\n            5.2647089958190918e-01 4.1268271207809448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1878 4.7315051779150963e-03</internalNodes>\n          <leafValues>\n            4.8791998624801636e-01 5.8924478292465210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1879 -5.2571471314877272e-04</internalNodes>\n          <leafValues>\n            3.9172801375389099e-01 5.1894128322601318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1880 -2.5464049540460110e-03</internalNodes>\n          <leafValues>\n            5.8375990390777588e-01 4.9857059121131897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1881 -2.6075689122080803e-02</internalNodes>\n          <leafValues>\n            1.2619839608669281e-01 4.9558219313621521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1882 -5.4779709316790104e-03</internalNodes>\n          <leafValues>\n            5.7225137948989868e-01 5.0102657079696655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1883 5.1337741315364838e-03</internalNodes>\n          <leafValues>\n            5.2732622623443604e-01 4.2263761162757874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1884 4.7944980906322598e-04</internalNodes>\n          <leafValues>\n            4.4500669836997986e-01 5.8195871114730835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1885 -2.1114079281687737e-03</internalNodes>\n          <leafValues>\n            5.7576531171798706e-01 4.5117148756980896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1886 -1.3179990462958813e-02</internalNodes>\n          <leafValues>\n            1.8843810260295868e-01 5.1607340574264526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1887 -4.7968099825084209e-03</internalNodes>\n          <leafValues>\n            6.5897899866104126e-01 4.7361189126968384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1888 6.7483168095350266e-03</internalNodes>\n          <leafValues>\n            5.2594298124313354e-01 3.3563950657844543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1889 1.4623369788751006e-03</internalNodes>\n          <leafValues>\n            5.3552711009979248e-01 4.2640921473503113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1890 4.7645159065723419e-03</internalNodes>\n          <leafValues>\n            5.0344067811965942e-01 5.7868278026580811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1891 6.8066660314798355e-03</internalNodes>\n          <leafValues>\n            4.7566050291061401e-01 6.6778290271759033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1892 3.6608621012419462e-03</internalNodes>\n          <leafValues>\n            5.3696119785308838e-01 4.3115469813346863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1893 2.1449640393257141e-02</internalNodes>\n          <leafValues>\n            4.9686419963836670e-01 1.8888160586357117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1894 4.1678901761770248e-03</internalNodes>\n          <leafValues>\n            4.9307331442832947e-01 5.8153688907623291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1895 8.6467564105987549e-03</internalNodes>\n          <leafValues>\n            5.2052050828933716e-01 4.1325950622558594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1896 -3.6114078829996288e-04</internalNodes>\n          <leafValues>\n            5.4835551977157593e-01 4.8009279370307922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1897 1.0808729566633701e-03</internalNodes>\n          <leafValues>\n            4.6899020671844482e-01 6.0414212942123413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1898 5.7719959877431393e-03</internalNodes>\n          <leafValues>\n            5.1711422204971313e-01 3.0532771348953247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1899 1.5720770461484790e-03</internalNodes>\n          <leafValues>\n            5.2199780941009521e-01 4.1788038611412048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1900 -1.9307859474793077e-03</internalNodes>\n          <leafValues>\n            5.8603698015213013e-01 4.8129200935363770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1901 -7.8926272690296173e-03</internalNodes>\n          <leafValues>\n            1.7492769658565521e-01 4.9717339873313904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1902 -2.2224679123610258e-03</internalNodes>\n          <leafValues>\n            4.3425890803337097e-01 5.2128481864929199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1903 1.9011989934369922e-03</internalNodes>\n          <leafValues>\n            4.7651869058609009e-01 6.8920552730560303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1904 2.7576119173318148e-03</internalNodes>\n          <leafValues>\n            5.2621912956237793e-01 4.3374860286712646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1905 5.1787449046969414e-03</internalNodes>\n          <leafValues>\n            4.8040691018104553e-01 7.8437292575836182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1906 -9.0273341629654169e-04</internalNodes>\n          <leafValues>\n            4.1208469867706299e-01 5.3534239530563354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1907 5.1797959022223949e-03</internalNodes>\n          <leafValues>\n            4.7403728961944580e-01 6.4259600639343262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1908 -1.0114000178873539e-02</internalNodes>\n          <leafValues>\n            2.4687920510768890e-01 5.1750177145004272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1909 -1.8617060035467148e-02</internalNodes>\n          <leafValues>\n            5.7562941312789917e-01 4.6289789676666260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1910 5.9225959703326225e-03</internalNodes>\n          <leafValues>\n            5.1696258783340454e-01 3.2142710685729980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1911 -6.2945079989731312e-03</internalNodes>\n          <leafValues>\n            3.8720148801803589e-01 5.1416367292404175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1912 6.5353019163012505e-03</internalNodes>\n          <leafValues>\n            4.8530489206314087e-01 6.3104897737503052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1913 1.0878399480134249e-03</internalNodes>\n          <leafValues>\n            5.1173150539398193e-01 3.7232589721679688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1914 -2.2542240098118782e-02</internalNodes>\n          <leafValues>\n            5.6927400827407837e-01 4.8871129751205444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1915 -3.0065660830587149e-03</internalNodes>\n          <leafValues>\n            2.5560128688812256e-01 5.0039929151535034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1916 7.4741272255778313e-03</internalNodes>\n          <leafValues>\n            4.8108729720115662e-01 5.6759268045425415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1917 2.6162320747971535e-02</internalNodes>\n          <leafValues>\n            4.9711948633193970e-01 1.7772370576858521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1918 9.4352738233283162e-04</internalNodes>\n          <leafValues>\n            4.9400109052658081e-01 5.4912507534027100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1919 3.3363241702318192e-02</internalNodes>\n          <leafValues>\n            5.0076121091842651e-01 2.7907240390777588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1920 -1.5118650160729885e-02</internalNodes>\n          <leafValues>\n            7.0595788955688477e-01 4.9730318784713745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1921 9.8648946732282639e-04</internalNodes>\n          <leafValues>\n            5.1286202669143677e-01 3.7767618894577026e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>213</maxWeakCount>\n      <stageThreshold>1.0576110076904297e+02</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1922 -9.5150798559188843e-02</internalNodes>\n          <leafValues>\n            6.4707571268081665e-01 4.0172868967056274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1923 6.2702340073883533e-03</internalNodes>\n          <leafValues>\n            3.9998221397399902e-01 5.7464492321014404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1924 3.0018089455552399e-04</internalNodes>\n          <leafValues>\n            3.5587701201438904e-01 5.5388098955154419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1925 1.1757409665733576e-03</internalNodes>\n          <leafValues>\n            4.2565348744392395e-01 5.3826177120208740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1926 4.4235268433112651e-05</internalNodes>\n          <leafValues>\n            3.6829081177711487e-01 5.5899268388748169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1927 -2.9936920327600092e-05</internalNodes>\n          <leafValues>\n            5.4524701833724976e-01 4.0203678607940674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1928 3.0073199886828661e-03</internalNodes>\n          <leafValues>\n            5.2390581369400024e-01 3.3178439736366272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1929 -1.0513889603316784e-02</internalNodes>\n          <leafValues>\n            4.3206891417503357e-01 5.3079837560653687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1930 8.3476826548576355e-03</internalNodes>\n          <leafValues>\n            4.5046371221542358e-01 6.4532989263534546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1931 -3.1492270063608885e-03</internalNodes>\n          <leafValues>\n            4.3134251236915588e-01 5.3705251216888428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1932 -1.4435649973165710e-05</internalNodes>\n          <leafValues>\n            5.3266030550003052e-01 3.8179719448089600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1933 -4.2855090578086674e-04</internalNodes>\n          <leafValues>\n            4.3051639199256897e-01 5.3820097446441650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1934 1.5062429883982986e-04</internalNodes>\n          <leafValues>\n            4.2359709739685059e-01 5.5449652671813965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1935 7.1559831500053406e-02</internalNodes>\n          <leafValues>\n            5.3030598163604736e-01 2.6788029074668884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1936 8.4095180500298738e-04</internalNodes>\n          <leafValues>\n            3.5571089386940002e-01 5.2054339647293091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1937 6.2986500561237335e-02</internalNodes>\n          <leafValues>\n            5.2253627777099609e-01 2.8613761067390442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1938 -3.3798629883676767e-03</internalNodes>\n          <leafValues>\n            3.6241859197616577e-01 5.2016979455947876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1939 -1.1810739670181647e-04</internalNodes>\n          <leafValues>\n            5.4744768142700195e-01 3.9598938822746277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1940 -5.4505601292476058e-04</internalNodes>\n          <leafValues>\n            3.7404221296310425e-01 5.2157157659530640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1941 -1.8454910023137927e-03</internalNodes>\n          <leafValues>\n            5.8930522203445435e-01 4.5844489336013794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1942 -4.3832371011376381e-04</internalNodes>\n          <leafValues>\n            4.0845820307731628e-01 5.3853511810302734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1943 -2.4000830017030239e-03</internalNodes>\n          <leafValues>\n            3.7774550914764404e-01 5.2935802936553955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1944 -9.8795741796493530e-02</internalNodes>\n          <leafValues>\n            2.9636120796203613e-01 5.0700891017913818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1945 3.1798239797353745e-03</internalNodes>\n          <leafValues>\n            4.8776328563690186e-01 6.7264437675476074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1946 3.2406419632025063e-04</internalNodes>\n          <leafValues>\n            4.3669110536575317e-01 5.5611097812652588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1947 -3.2547250390052795e-02</internalNodes>\n          <leafValues>\n            3.1281578540802002e-01 5.3086161613464355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1948 -7.7561130747199059e-03</internalNodes>\n          <leafValues>\n            6.5602248907089233e-01 4.6398720145225525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1949 1.6027249395847321e-02</internalNodes>\n          <leafValues>\n            5.1726800203323364e-01 3.1418979167938232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1950 7.1002350523485802e-06</internalNodes>\n          <leafValues>\n            4.0844461321830750e-01 5.3362947702407837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1951 7.3422808200120926e-03</internalNodes>\n          <leafValues>\n            4.9669221043586731e-01 6.6034650802612305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1952 -1.6970280557870865e-03</internalNodes>\n          <leafValues>\n            5.9082370996475220e-01 4.5001828670501709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1953 2.4118260480463505e-03</internalNodes>\n          <leafValues>\n            5.3151607513427734e-01 3.5997208952903748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1954 -5.5300937965512276e-03</internalNodes>\n          <leafValues>\n            2.3340409994125366e-01 4.9968141317367554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1955 -2.6478730142116547e-03</internalNodes>\n          <leafValues>\n            5.8809357881546021e-01 4.6847340464591980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1956 1.1295629665255547e-02</internalNodes>\n          <leafValues>\n            4.9837771058082581e-01 1.8845909833908081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1957 -6.6952878842130303e-04</internalNodes>\n          <leafValues>\n            5.8721381425857544e-01 4.7990199923515320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1958 1.4410680159926414e-03</internalNodes>\n          <leafValues>\n            5.1311892271041870e-01 3.5010111331939697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1959 2.4637870956212282e-03</internalNodes>\n          <leafValues>\n            5.3393721580505371e-01 4.1176390647888184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1960 3.3114518737420440e-04</internalNodes>\n          <leafValues>\n            4.3133831024169922e-01 5.3982460498809814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1961 -3.3557269722223282e-02</internalNodes>\n          <leafValues>\n            2.6753368973731995e-01 5.1791548728942871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1962 1.8539419397711754e-02</internalNodes>\n          <leafValues>\n            4.9738699197769165e-01 2.3171770572662354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1963 -2.9698139405809343e-04</internalNodes>\n          <leafValues>\n            5.5297082662582397e-01 4.6436640620231628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1964 -4.5577259152196348e-04</internalNodes>\n          <leafValues>\n            5.6295841932296753e-01 4.4691911339759827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1965 -1.0158980265259743e-02</internalNodes>\n          <leafValues>\n            6.7062127590179443e-01 4.9259188771247864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1966 -2.2413829356082715e-05</internalNodes>\n          <leafValues>\n            5.2394217252731323e-01 3.9129018783569336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1967 7.2034963523037732e-05</internalNodes>\n          <leafValues>\n            4.7994381189346313e-01 5.5017888545989990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1968 -6.9267209619283676e-03</internalNodes>\n          <leafValues>\n            6.9300097227096558e-01 4.6980848908424377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1969 -7.6997838914394379e-03</internalNodes>\n          <leafValues>\n            4.0996238589286804e-01 5.4808831214904785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1970 -7.3130549862980843e-03</internalNodes>\n          <leafValues>\n            3.2834759354591370e-01 5.0578862428665161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1971 1.9650589674711227e-03</internalNodes>\n          <leafValues>\n            4.9780470132827759e-01 6.3982498645782471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1972 7.1647600270807743e-03</internalNodes>\n          <leafValues>\n            4.6611601114273071e-01 6.2221372127532959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1973 -2.4078639224171638e-02</internalNodes>\n          <leafValues>\n            2.3346449434757233e-01 5.2221620082855225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1974 -2.1027969196438789e-02</internalNodes>\n          <leafValues>\n            1.1836539953947067e-01 4.9382260441780090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1975 3.6017020465806127e-04</internalNodes>\n          <leafValues>\n            5.3250199556350708e-01 4.1167110204696655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1976 -1.7219729721546173e-02</internalNodes>\n          <leafValues>\n            6.2787622213363647e-01 4.6642690896987915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1977 -7.8672142699360847e-03</internalNodes>\n          <leafValues>\n            3.4034150838851929e-01 5.2497369050979614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1978 -4.4777389848604798e-04</internalNodes>\n          <leafValues>\n            3.6104118824005127e-01 5.0862592458724976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1979 5.5486010387539864e-03</internalNodes>\n          <leafValues>\n            4.8842659592628479e-01 6.2034982442855835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1980 -6.9461148232221603e-03</internalNodes>\n          <leafValues>\n            2.6259300112724304e-01 5.0110971927642822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1981 1.3569870498031378e-04</internalNodes>\n          <leafValues>\n            4.3407949805259705e-01 5.6283122301101685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1982 -4.5880250632762909e-02</internalNodes>\n          <leafValues>\n            6.5079987049102783e-01 4.6962749958038330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1983 -2.1582560613751411e-02</internalNodes>\n          <leafValues>\n            3.8265028595924377e-01 5.2876168489456177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1984 -2.0209539681673050e-02</internalNodes>\n          <leafValues>\n            3.2333680987358093e-01 5.0744771957397461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1985 5.8496710844337940e-03</internalNodes>\n          <leafValues>\n            5.1776039600372314e-01 4.4896709918975830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1986 -5.7476379879517481e-05</internalNodes>\n          <leafValues>\n            4.0208509564399719e-01 5.2463638782501221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1987 -1.1513100471347570e-03</internalNodes>\n          <leafValues>\n            6.3150721788406372e-01 4.9051541090011597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1988 1.9862831104546785e-03</internalNodes>\n          <leafValues>\n            4.7024598717689514e-01 6.4971512556076050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1989 -5.2719512023031712e-03</internalNodes>\n          <leafValues>\n            3.6503839492797852e-01 5.2276527881622314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1990 1.2662699446082115e-03</internalNodes>\n          <leafValues>\n            5.1661008596420288e-01 3.8776180148124695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1991 -6.2919440679252148e-03</internalNodes>\n          <leafValues>\n            7.3758941888809204e-01 5.0238478183746338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1992 6.7360111279413104e-04</internalNodes>\n          <leafValues>\n            4.4232261180877686e-01 5.4955857992172241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1993 -1.0523450328037143e-03</internalNodes>\n          <leafValues>\n            5.9763962030410767e-01 4.8595830798149109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1994 -4.4216238893568516e-04</internalNodes>\n          <leafValues>\n            5.9559392929077148e-01 4.3989309668540955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1995 1.1747940443456173e-03</internalNodes>\n          <leafValues>\n            5.3498882055282593e-01 4.6050581336021423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1996 5.2457437850534916e-03</internalNodes>\n          <leafValues>\n            5.0491911172866821e-01 2.9415771365165710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1997 -2.4539720267057419e-02</internalNodes>\n          <leafValues>\n            2.5501778721809387e-01 5.2185869216918945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1998 7.3793041519820690e-04</internalNodes>\n          <leafValues>\n            4.4248610734939575e-01 5.4908162355422974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1999 1.4233799884095788e-03</internalNodes>\n          <leafValues>\n            5.3195142745971680e-01 4.0813559293746948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2000 -2.4149110540747643e-03</internalNodes>\n          <leafValues>\n            4.0876591205596924e-01 5.2389502525329590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2001 -1.2165299849584699e-03</internalNodes>\n          <leafValues>\n            5.6745791435241699e-01 4.9080529808998108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2002 -1.2438809499144554e-03</internalNodes>\n          <leafValues>\n            4.1294258832931519e-01 5.2561181783676147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2003 6.1942739412188530e-03</internalNodes>\n          <leafValues>\n            5.0601941347122192e-01 7.3136532306671143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2004 -1.6607169527560472e-03</internalNodes>\n          <leafValues>\n            5.9796321392059326e-01 4.5963698625564575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2005 -2.7316259220242500e-02</internalNodes>\n          <leafValues>\n            4.1743651032447815e-01 5.3088420629501343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2006 -1.5845570014789701e-03</internalNodes>\n          <leafValues>\n            5.6158047914505005e-01 4.5194861292839050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2007 -1.5514739789068699e-03</internalNodes>\n          <leafValues>\n            4.0761870145797729e-01 5.3607851266860962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2008 3.8446558755822480e-04</internalNodes>\n          <leafValues>\n            4.3472939729690552e-01 5.4304420948028564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2009 -1.4672259800136089e-02</internalNodes>\n          <leafValues>\n            1.6593049466609955e-01 5.1460939645767212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2010 8.1608882173895836e-03</internalNodes>\n          <leafValues>\n            4.9618190526962280e-01 1.8847459554672241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2011 1.1121659772470593e-03</internalNodes>\n          <leafValues>\n            4.8682639002799988e-01 6.0938161611557007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2012 -7.2603770531713963e-03</internalNodes>\n          <leafValues>\n            6.2843251228332520e-01 4.6903759241104126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2013 -2.4046430189628154e-04</internalNodes>\n          <leafValues>\n            5.5750000476837158e-01 4.0460440516471863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2014 -2.3348190006799996e-04</internalNodes>\n          <leafValues>\n            4.1157621145248413e-01 5.2528482675552368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2015 5.5736480280756950e-03</internalNodes>\n          <leafValues>\n            4.7300729155540466e-01 5.6901007890701294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2016 3.0623769387602806e-02</internalNodes>\n          <leafValues>\n            4.9718868732452393e-01 1.7400950193405151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2017 9.2074798885732889e-04</internalNodes>\n          <leafValues>\n            5.3721177577972412e-01 4.3548721075057983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2018 -4.3550739064812660e-05</internalNodes>\n          <leafValues>\n            5.3668838739395142e-01 4.3473169207572937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2019 -6.6452710889279842e-03</internalNodes>\n          <leafValues>\n            3.4355181455612183e-01 5.1605331897735596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2020 4.3221998959779739e-02</internalNodes>\n          <leafValues>\n            4.7667920589447021e-01 7.2936528921127319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2021 2.2331769578158855e-03</internalNodes>\n          <leafValues>\n            5.0293159484863281e-01 5.6331712007522583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2022 3.1829739455133677e-03</internalNodes>\n          <leafValues>\n            4.0160921216011047e-01 5.1921367645263672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2023 -1.8027749320026487e-04</internalNodes>\n          <leafValues>\n            4.0883159637451172e-01 5.4179197549819946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2024 -5.2934689447283745e-03</internalNodes>\n          <leafValues>\n            4.0756770968437195e-01 5.2435618638992310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2025 1.2750959722325206e-03</internalNodes>\n          <leafValues>\n            4.9132829904556274e-01 6.3870108127593994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2026 4.3385322205722332e-03</internalNodes>\n          <leafValues>\n            5.0316721200942993e-01 2.9473468661308289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2027 8.5250744596123695e-03</internalNodes>\n          <leafValues>\n            4.9497890472412109e-01 6.3088691234588623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2028 -9.4266352243721485e-04</internalNodes>\n          <leafValues>\n            5.3283667564392090e-01 4.2856499552726746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2029 1.3609660090878606e-03</internalNodes>\n          <leafValues>\n            4.9915251135826111e-01 5.9415012598037720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2030 4.4782509212382138e-04</internalNodes>\n          <leafValues>\n            4.5735040307044983e-01 5.8544808626174927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2031 1.3360050506889820e-03</internalNodes>\n          <leafValues>\n            4.6043589711189270e-01 5.8490520715713501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2032 -6.0967548051849008e-04</internalNodes>\n          <leafValues>\n            3.9693889021873474e-01 5.2294230461120605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2033 -2.3656780831515789e-03</internalNodes>\n          <leafValues>\n            5.8083200454711914e-01 4.8983570933341980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2034 1.0734340175986290e-03</internalNodes>\n          <leafValues>\n            4.3512108922004700e-01 5.4700392484664917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2035 2.1923359017819166e-03</internalNodes>\n          <leafValues>\n            5.3550601005554199e-01 3.8429039716720581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2036 5.4968618787825108e-03</internalNodes>\n          <leafValues>\n            5.0181388854980469e-01 2.8271919488906860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2037 -7.5368821620941162e-02</internalNodes>\n          <leafValues>\n            1.2250760197639465e-01 5.1488268375396729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2038 2.5134470313787460e-02</internalNodes>\n          <leafValues>\n            4.7317668795585632e-01 7.0254462957382202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2039 -2.9358599931583740e-05</internalNodes>\n          <leafValues>\n            5.4305320978164673e-01 4.6560868620872498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2040 -5.8355910005047917e-04</internalNodes>\n          <leafValues>\n            4.0310400724411011e-01 5.1901197433471680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2041 -2.6639450807124376e-03</internalNodes>\n          <leafValues>\n            4.3081268668174744e-01 5.1617711782455444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2042 -1.3804089976474643e-03</internalNodes>\n          <leafValues>\n            6.2198299169540405e-01 4.6955159306526184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2043 1.2313219485804439e-03</internalNodes>\n          <leafValues>\n            5.3793638944625854e-01 4.4258311390876770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2044 -1.4644179827882908e-05</internalNodes>\n          <leafValues>\n            5.2816402912139893e-01 4.2225030064582825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2045 -1.2818809598684311e-02</internalNodes>\n          <leafValues>\n            2.5820928812026978e-01 5.1799327135086060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2046 2.2852189838886261e-02</internalNodes>\n          <leafValues>\n            4.7786930203437805e-01 7.6092642545700073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2047 8.2305970136076212e-04</internalNodes>\n          <leafValues>\n            5.3409922122955322e-01 4.6717241406440735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2048 1.2770120054483414e-02</internalNodes>\n          <leafValues>\n            4.9657610058784485e-01 1.4723660051822662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2049 -5.0051510334014893e-02</internalNodes>\n          <leafValues>\n            6.4149940013885498e-01 5.0165921449661255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2050 1.5775270760059357e-02</internalNodes>\n          <leafValues>\n            4.5223200321197510e-01 5.6853622198104858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2051 -1.8501620739698410e-02</internalNodes>\n          <leafValues>\n            2.7647489309310913e-01 5.1379591226577759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2052 2.4626250378787518e-03</internalNodes>\n          <leafValues>\n            5.1419419050216675e-01 3.7954080104827881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2053 6.2916167080402374e-02</internalNodes>\n          <leafValues>\n            5.0606489181518555e-01 6.5804338455200195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2054 -2.1648500478477217e-05</internalNodes>\n          <leafValues>\n            5.1953881978988647e-01 4.0198868513107300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2055 2.1180990152060986e-03</internalNodes>\n          <leafValues>\n            4.9623650312423706e-01 5.9544587135314941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2056 -1.6634890809655190e-02</internalNodes>\n          <leafValues>\n            3.7579330801963806e-01 5.1754468679428101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2057 -2.8899470344185829e-03</internalNodes>\n          <leafValues>\n            6.6240137815475464e-01 5.0571787357330322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2058 7.6783262193202972e-02</internalNodes>\n          <leafValues>\n            4.7957968711853027e-01 8.0477148294448853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2059 3.9170677773654461e-03</internalNodes>\n          <leafValues>\n            4.9378821253776550e-01 5.7199418544769287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2060 -7.2670601308345795e-02</internalNodes>\n          <leafValues>\n            5.3894560784101486e-02 4.9439039826393127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2061 5.4039502143859863e-01</internalNodes>\n          <leafValues>\n            5.1297742128372192e-01 1.1433389782905579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2062 2.9510019812732935e-03</internalNodes>\n          <leafValues>\n            4.5283439755439758e-01 5.6985741853713989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2063 3.4508369863033295e-03</internalNodes>\n          <leafValues>\n            5.3577268123626709e-01 4.2187309265136719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2064 -4.2077939724549651e-04</internalNodes>\n          <leafValues>\n            5.9161728620529175e-01 4.6379259228706360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2065 3.3051050268113613e-03</internalNodes>\n          <leafValues>\n            5.2733850479125977e-01 4.3820428848266602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2066 4.7735060798004270e-04</internalNodes>\n          <leafValues>\n            4.0465280413627625e-01 5.1818847656250000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2067 -2.5928510352969170e-02</internalNodes>\n          <leafValues>\n            7.4522358179092407e-01 5.0893861055374146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2068 -2.9729790985584259e-03</internalNodes>\n          <leafValues>\n            3.2954359054565430e-01 5.0587952136993408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2069 5.8508329093456268e-03</internalNodes>\n          <leafValues>\n            4.8571440577507019e-01 5.7930248975753784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2070 -4.5967519283294678e-02</internalNodes>\n          <leafValues>\n            4.3127310276031494e-01 5.3806531429290771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2071 1.5585960447788239e-01</internalNodes>\n          <leafValues>\n            5.1961702108383179e-01 1.6847139596939087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2072 1.5164829790592194e-02</internalNodes>\n          <leafValues>\n            4.7357571125030518e-01 6.7350268363952637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2073 -1.0604249546304345e-03</internalNodes>\n          <leafValues>\n            5.8229267597198486e-01 4.7757029533386230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2074 6.6476291976869106e-03</internalNodes>\n          <leafValues>\n            4.9991989135742188e-01 2.3195350170135498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2075 -1.2231130152940750e-02</internalNodes>\n          <leafValues>\n            4.7508931159973145e-01 5.2629822492599487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2076 5.6528882123529911e-03</internalNodes>\n          <leafValues>\n            5.0697678327560425e-01 3.5618188977241516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2077 1.2977829901501536e-03</internalNodes>\n          <leafValues>\n            4.8756939172744751e-01 5.6190627813339233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2078 1.0781589895486832e-02</internalNodes>\n          <leafValues>\n            4.7507700324058533e-01 6.7823082208633423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2079 2.8654779307544231e-03</internalNodes>\n          <leafValues>\n            5.3054618835449219e-01 4.2907360196113586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2080 2.8663428965955973e-03</internalNodes>\n          <leafValues>\n            4.5184791088104248e-01 5.5393511056900024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2081 -5.1983320154249668e-03</internalNodes>\n          <leafValues>\n            4.1491198539733887e-01 5.4341888427734375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2082 5.3739990107715130e-03</internalNodes>\n          <leafValues>\n            4.7178968787193298e-01 6.5076571702957153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2083 -1.4641529880464077e-02</internalNodes>\n          <leafValues>\n            2.1721640229225159e-01 5.1617771387100220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2084 -1.5042580344015732e-05</internalNodes>\n          <leafValues>\n            5.3373837471008301e-01 4.2988368868827820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2085 -1.1875660129589960e-04</internalNodes>\n          <leafValues>\n            4.6045941114425659e-01 5.5824470520019531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2086 1.6995530575513840e-02</internalNodes>\n          <leafValues>\n            4.9458950757980347e-01 7.3880076408386230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2087 -3.5095941275358200e-02</internalNodes>\n          <leafValues>\n            7.0055091381072998e-01 4.9775910377502441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2088 2.4217350874096155e-03</internalNodes>\n          <leafValues>\n            4.4662651419639587e-01 5.4776942729949951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2089 -9.6340337768197060e-04</internalNodes>\n          <leafValues>\n            4.7140988707542419e-01 5.3133380413055420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2090 1.6391130338888615e-04</internalNodes>\n          <leafValues>\n            4.3315461277961731e-01 5.3422421216964722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2091 -2.1141460165381432e-02</internalNodes>\n          <leafValues>\n            2.6447001099586487e-01 5.2044987678527832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2092 8.7775202700868249e-04</internalNodes>\n          <leafValues>\n            5.2083498239517212e-01 4.1527429223060608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2093 -2.7943920344114304e-02</internalNodes>\n          <leafValues>\n            6.3441252708435059e-01 5.0188118219375610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2094 6.7297378554940224e-03</internalNodes>\n          <leafValues>\n            5.0504380464553833e-01 3.5008639097213745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2095 2.3281039670109749e-02</internalNodes>\n          <leafValues>\n            4.9663180112838745e-01 6.9686770439147949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2096 -1.1644979938864708e-02</internalNodes>\n          <leafValues>\n            3.3002600073814392e-01 5.0496298074722290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2097 1.5764309093356133e-02</internalNodes>\n          <leafValues>\n            4.9915981292724609e-01 7.3211538791656494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2098 -1.3611479662358761e-03</internalNodes>\n          <leafValues>\n            3.9117351174354553e-01 5.1606708765029907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2099 -8.1522337859496474e-04</internalNodes>\n          <leafValues>\n            5.6289112567901611e-01 4.9497190117835999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2100 -6.0066272271797061e-04</internalNodes>\n          <leafValues>\n            5.8535951375961304e-01 4.5505958795547485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2101 4.9715518252924085e-04</internalNodes>\n          <leafValues>\n            4.2714700102806091e-01 5.4435992240905762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2102 2.3475370835512877e-03</internalNodes>\n          <leafValues>\n            5.1431107521057129e-01 3.8876569271087646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2103 -8.9261569082736969e-03</internalNodes>\n          <leafValues>\n            6.0445022583007812e-01 4.9717208743095398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2104 -1.3919910416007042e-02</internalNodes>\n          <leafValues>\n            2.5831609964370728e-01 5.0003677606582642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2105 1.0209949687123299e-03</internalNodes>\n          <leafValues>\n            4.8573741316795349e-01 5.5603581666946411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2106 -2.7441629208624363e-03</internalNodes>\n          <leafValues>\n            5.9368848800659180e-01 4.6457770466804504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2107 -1.6200130805373192e-02</internalNodes>\n          <leafValues>\n            3.1630149483680725e-01 5.1934951543807983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2108 4.3331980705261230e-03</internalNodes>\n          <leafValues>\n            5.0612241029739380e-01 3.4588789939880371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2109 5.8497930876910686e-04</internalNodes>\n          <leafValues>\n            4.7790178656578064e-01 5.8701777458190918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2110 -2.2466450463980436e-03</internalNodes>\n          <leafValues>\n            4.2978510260581970e-01 5.3747731447219849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2111 2.3146099410951138e-03</internalNodes>\n          <leafValues>\n            5.4386717081069946e-01 4.6409699320793152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2112 8.7679121643304825e-03</internalNodes>\n          <leafValues>\n            4.7268930077552795e-01 6.7717897891998291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2113 -2.2448020172305405e-04</internalNodes>\n          <leafValues>\n            4.2291730642318726e-01 5.4280489683151245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2114 -7.4336021207273006e-03</internalNodes>\n          <leafValues>\n            6.0988807678222656e-01 4.6836739778518677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2115 -2.3189240600913763e-03</internalNodes>\n          <leafValues>\n            5.6894367933273315e-01 4.4242420792579651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2116 -2.1042178850620985e-03</internalNodes>\n          <leafValues>\n            3.7622210383415222e-01 5.1870870590209961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2117 4.6034841216169298e-04</internalNodes>\n          <leafValues>\n            4.6994051337242126e-01 5.7712072134017944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2118 1.0547629790380597e-03</internalNodes>\n          <leafValues>\n            4.4652169942855835e-01 5.6017017364501953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2119 8.7148818420246243e-04</internalNodes>\n          <leafValues>\n            5.4498052597045898e-01 3.9147090911865234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2120 3.3364820410497487e-04</internalNodes>\n          <leafValues>\n            4.5640090107917786e-01 5.6457388401031494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2121 -1.4853250468149781e-03</internalNodes>\n          <leafValues>\n            5.7473778724670410e-01 4.6927788853645325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2122 3.0251620337367058e-03</internalNodes>\n          <leafValues>\n            5.1661968231201172e-01 3.7628141045570374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2123 5.0280741415917873e-03</internalNodes>\n          <leafValues>\n            5.0021117925643921e-01 6.1515271663665771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2124 -5.8164511574432254e-04</internalNodes>\n          <leafValues>\n            5.3945982456207275e-01 4.3907511234283447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2125 4.5141529291868210e-02</internalNodes>\n          <leafValues>\n            5.1883268356323242e-01 2.0630359649658203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2126 -1.0795620037242770e-03</internalNodes>\n          <leafValues>\n            3.9046850800514221e-01 5.1379072666168213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2127 1.5995999274309725e-04</internalNodes>\n          <leafValues>\n            4.8953229188919067e-01 5.4275041818618774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2128 -1.9359270110726357e-02</internalNodes>\n          <leafValues>\n            6.9752287864685059e-01 4.7735071182250977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2129 2.0725509524345398e-01</internalNodes>\n          <leafValues>\n            5.2336359024047852e-01 3.0349919199943542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2130 -4.1953290929086506e-04</internalNodes>\n          <leafValues>\n            5.4193967580795288e-01 4.4601860642433167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2131 2.2582069505006075e-03</internalNodes>\n          <leafValues>\n            4.8157641291618347e-01 6.0274088382720947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2132 -6.7811207845807076e-03</internalNodes>\n          <leafValues>\n            3.9802789688110352e-01 5.1833057403564453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2133 1.1154309846460819e-02</internalNodes>\n          <leafValues>\n            5.4312318563461304e-01 4.1887599229812622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2134 4.3162431567907333e-02</internalNodes>\n          <leafValues>\n            4.7382280230522156e-01 6.5229612588882446e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          3 7 14 4 -1.</_>\n        <_>\n          3 9 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 4 -1.</_>\n        <_>\n          7 2 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 15 9 -1.</_>\n        <_>\n          1 10 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 6 -1.</_>\n        <_>\n          5 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 3 -1.</_>\n        <_>\n          9 5 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 9 -1.</_>\n        <_>\n          4 3 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 10 8 -1.</_>\n        <_>\n          6 13 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 8 -1.</_>\n        <_>\n          3 10 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 10 -1.</_>\n        <_>\n          14 1 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 5 12 -1.</_>\n        <_>\n          7 12 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 3 -1.</_>\n        <_>\n          7 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 17 2 -1.</_>\n        <_>\n          1 9 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 2 -1.</_>\n        <_>\n          16 7 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 2 2 -1.</_>\n        <_>\n          5 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 12 -1.</_>\n        <_>\n          14 2 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 12 -1.</_>\n        <_>\n          4 0 2 6 2.</_>\n        <_>\n          6 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 8 -1.</_>\n        <_>\n          8 11 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 2 -1.</_>\n        <_>\n          5 8 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 5 3 -1.</_>\n        <_>\n          15 12 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 9 -1.</_>\n        <_>\n          5 6 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 14 -1.</_>\n        <_>\n          9 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 12 -1.</_>\n        <_>\n          3 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 5 -1.</_>\n        <_>\n          8 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 8 -1.</_>\n        <_>\n          5 10 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          8 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 1 8 -1.</_>\n        <_>\n          9 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 6 -1.</_>\n        <_>\n          0 9 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 17 -1.</_>\n        <_>\n          9 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 4 -1.</_>\n        <_>\n          11 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 4 -1.</_>\n        <_>\n          7 1 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 16 -1.</_>\n        <_>\n          14 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 8 -1.</_>\n        <_>\n          0 5 9 4 2.</_>\n        <_>\n          9 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 10 4 -1.</_>\n        <_>\n          13 15 5 2 2.</_>\n        <_>\n          8 17 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 4 8 -1.</_>\n        <_>\n          3 1 2 4 2.</_>\n        <_>\n          5 5 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 10 -1.</_>\n        <_>\n          10 6 7 5 2.</_>\n        <_>\n          3 11 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 16 -1.</_>\n        <_>\n          4 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 20 2 -1.</_>\n        <_>\n          0 19 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 9 6 -1.</_>\n        <_>\n          0 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 4 -1.</_>\n        <_>\n          5 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 16 -1.</_>\n        <_>\n          9 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 13 8 -1.</_>\n        <_>\n          3 10 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 8 2 -1.</_>\n        <_>\n          12 3 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 12 -1.</_>\n        <_>\n          8 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 6 -1.</_>\n        <_>\n          15 3 4 3 2.</_>\n        <_>\n          11 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 19 -1.</_>\n        <_>\n          9 1 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 4 -1.</_>\n        <_>\n          11 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 9 3 -1.</_>\n        <_>\n          6 1 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 10 4 -1.</_>\n        <_>\n          13 15 5 2 2.</_>\n        <_>\n          8 17 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 10 -1.</_>\n        <_>\n          3 3 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 15 15 -1.</_>\n        <_>\n          3 9 15 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 6 -1.</_>\n        <_>\n          6 7 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 10 -1.</_>\n        <_>\n          10 4 6 5 2.</_>\n        <_>\n          4 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 4 -1.</_>\n        <_>\n          8 4 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 2 -1.</_>\n        <_>\n          15 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 2 2 -1.</_>\n        <_>\n          3 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 1 3 -1.</_>\n        <_>\n          16 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 4 -1.</_>\n        <_>\n          3 15 3 2 2.</_>\n        <_>\n          6 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 2 -1.</_>\n        <_>\n          6 8 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 1 3 -1.</_>\n        <_>\n          3 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 2 -1.</_>\n        <_>\n          6 1 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 2 -1.</_>\n        <_>\n          7 16 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 6 -1.</_>\n        <_>\n          0 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 2 -1.</_>\n        <_>\n          8 12 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 1 9 -1.</_>\n        <_>\n          6 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 3 2 -1.</_>\n        <_>\n          11 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 4 -1.</_>\n        <_>\n          9 6 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 3 2 -1.</_>\n        <_>\n          8 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 3 3 -1.</_>\n        <_>\n          11 17 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 2 -1.</_>\n        <_>\n          8 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 2 -1.</_>\n        <_>\n          11 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 4 -1.</_>\n        <_>\n          3 13 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 4 -1.</_>\n        <_>\n          10 10 9 2 2.</_>\n        <_>\n          1 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 3 3 -1.</_>\n        <_>\n          0 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 6 -1.</_>\n        <_>\n          11 1 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 6 -1.</_>\n        <_>\n          9 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 9 -1.</_>\n        <_>\n          1 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 2 6 -1.</_>\n        <_>\n          12 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 19 8 -1.</_>\n        <_>\n          0 9 19 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 1 -1.</_>\n        <_>\n          7 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 1 -1.</_>\n        <_>\n          13 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 6 -1.</_>\n        <_>\n          5 13 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 1 -1.</_>\n        <_>\n          13 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 6 -1.</_>\n        <_>\n          4 6 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 6 -1.</_>\n        <_>\n          15 14 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 2 -1.</_>\n        <_>\n          10 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 3 1 -1.</_>\n        <_>\n          10 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 4 14 -1.</_>\n        <_>\n          3 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 4 -1.</_>\n        <_>\n          11 0 2 2 2.</_>\n        <_>\n          9 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 1 14 -1.</_>\n        <_>\n          7 12 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 4 -1.</_>\n        <_>\n          19 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 4 -1.</_>\n        <_>\n          8 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 2 -1.</_>\n        <_>\n          10 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          9 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          4 7 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 6 -1.</_>\n        <_>\n          3 14 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 12 -1.</_>\n        <_>\n          10 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 3 2 -1.</_>\n        <_>\n          8 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 2 -1.</_>\n        <_>\n          11 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 9 3 -1.</_>\n        <_>\n          5 12 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 2 -1.</_>\n        <_>\n          11 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 5 -1.</_>\n        <_>\n          7 1 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 4 -1.</_>\n        <_>\n          10 0 2 2 2.</_>\n        <_>\n          8 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 1 3 -1.</_>\n        <_>\n          3 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 5 3 -1.</_>\n        <_>\n          8 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 12 -1.</_>\n        <_>\n          5 4 5 6 2.</_>\n        <_>\n          10 10 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 12 -1.</_>\n        <_>\n          9 10 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 12 14 -1.</_>\n        <_>\n          2 2 6 7 2.</_>\n        <_>\n          8 9 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 4 -1.</_>\n        <_>\n          7 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 11 8 -1.</_>\n        <_>\n          4 9 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 4 -1.</_>\n        <_>\n          3 12 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 2 -1.</_>\n        <_>\n          0 1 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 2 -1.</_>\n        <_>\n          9 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 15 -1.</_>\n        <_>\n          10 10 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 8 6 -1.</_>\n        <_>\n          3 14 4 3 2.</_>\n        <_>\n          7 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 2 -1.</_>\n        <_>\n          14 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 7 6 -1.</_>\n        <_>\n          1 13 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 3 -1.</_>\n        <_>\n          15 4 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 14 6 -1.</_>\n        <_>\n          2 9 7 3 2.</_>\n        <_>\n          9 12 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 4 -1.</_>\n        <_>\n          5 9 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          6 9 4 4 2.</_>\n        <_>\n          10 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 2 -1.</_>\n        <_>\n          14 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 4 2 -1.</_>\n        <_>\n          3 4 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 8 -1.</_>\n        <_>\n          11 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 3 -1.</_>\n        <_>\n          0 1 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 8 -1.</_>\n        <_>\n          11 5 9 4 2.</_>\n        <_>\n          2 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 6 -1.</_>\n        <_>\n          6 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 1 3 -1.</_>\n        <_>\n          19 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 6 -1.</_>\n        <_>\n          9 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 1 3 -1.</_>\n        <_>\n          19 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 3 -1.</_>\n        <_>\n          3 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 12 -1.</_>\n        <_>\n          12 4 4 6 2.</_>\n        <_>\n          8 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 3 -1.</_>\n        <_>\n          7 2 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 9 10 -1.</_>\n        <_>\n          6 6 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 12 -1.</_>\n        <_>\n          2 4 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 3 -1.</_>\n        <_>\n          15 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 5 3 -1.</_>\n        <_>\n          7 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 3 3 -1.</_>\n        <_>\n          15 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 8 3 -1.</_>\n        <_>\n          6 15 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 3 3 -1.</_>\n        <_>\n          15 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 3 3 -1.</_>\n        <_>\n          2 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 12 -1.</_>\n        <_>\n          10 7 6 6 2.</_>\n        <_>\n          4 13 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 6 -1.</_>\n        <_>\n          10 7 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 5 2 -1.</_>\n        <_>\n          8 10 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 4 -1.</_>\n        <_>\n          9 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 8 -1.</_>\n        <_>\n          9 10 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 6 -1.</_>\n        <_>\n          8 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 3 -1.</_>\n        <_>\n          12 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 1 -1.</_>\n        <_>\n          7 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 7 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 9 -1.</_>\n        <_>\n          7 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 1 -1.</_>\n        <_>\n          9 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 16 8 -1.</_>\n        <_>\n          2 12 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 2 6 -1.</_>\n        <_>\n          14 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 15 -1.</_>\n        <_>\n          1 10 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          10 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 7 14 -1.</_>\n        <_>\n          6 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 3 6 -1.</_>\n        <_>\n          13 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 4 -1.</_>\n        <_>\n          6 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 10 -1.</_>\n        <_>\n          11 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 4 6 -1.</_>\n        <_>\n          3 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 6 10 -1.</_>\n        <_>\n          15 3 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 10 -1.</_>\n        <_>\n          5 7 4 5 2.</_>\n        <_>\n          9 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 12 -1.</_>\n        <_>\n          10 4 6 6 2.</_>\n        <_>\n          4 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 9 -1.</_>\n        <_>\n          3 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 2 5 -1.</_>\n        <_>\n          11 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 2 5 -1.</_>\n        <_>\n          8 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 3 -1.</_>\n        <_>\n          10 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 2 -1.</_>\n        <_>\n          8 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 12 6 -1.</_>\n        <_>\n          4 14 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 5 9 -1.</_>\n        <_>\n          11 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 2 -1.</_>\n        <_>\n          6 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 5 -1.</_>\n        <_>\n          12 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          8 5 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 1 9 -1.</_>\n        <_>\n          13 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 8 -1.</_>\n        <_>\n          3 2 2 4 2.</_>\n        <_>\n          5 6 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 4 6 -1.</_>\n        <_>\n          13 14 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 4 6 -1.</_>\n        <_>\n          3 14 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 4 -1.</_>\n        <_>\n          13 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 4 3 -1.</_>\n        <_>\n          4 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 11 8 -1.</_>\n        <_>\n          7 9 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 4 -1.</_>\n        <_>\n          8 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 1 -1.</_>\n        <_>\n          11 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 3 -1.</_>\n        <_>\n          5 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 6 -1.</_>\n        <_>\n          10 9 10 3 2.</_>\n        <_>\n          0 12 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 5 -1.</_>\n        <_>\n          9 6 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 1 3 -1.</_>\n        <_>\n          11 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 2 -1.</_>\n        <_>\n          4 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 4 3 -1.</_>\n        <_>\n          12 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 4 -1.</_>\n        <_>\n          7 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 8 -1.</_>\n        <_>\n          10 7 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 4 -1.</_>\n        <_>\n          13 7 7 2 2.</_>\n        <_>\n          6 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 6 -1.</_>\n        <_>\n          0 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 4 -1.</_>\n        <_>\n          13 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 4 -1.</_>\n        <_>\n          4 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 8 -1.</_>\n        <_>\n          11 9 6 4 2.</_>\n        <_>\n          5 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 1 3 -1.</_>\n        <_>\n          9 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 2 4 -1.</_>\n        <_>\n          10 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 1 -1.</_>\n        <_>\n          9 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 6 6 -1.</_>\n        <_>\n          15 3 3 3 2.</_>\n        <_>\n          12 6 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 10 6 -1.</_>\n        <_>\n          0 6 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 8 14 -1.</_>\n        <_>\n          12 3 4 7 2.</_>\n        <_>\n          8 10 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 7 15 -1.</_>\n        <_>\n          4 9 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 8 -1.</_>\n        <_>\n          15 2 3 4 2.</_>\n        <_>\n          12 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 8 -1.</_>\n        <_>\n          2 2 3 4 2.</_>\n        <_>\n          5 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 7 -1.</_>\n        <_>\n          8 13 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 8 14 -1.</_>\n        <_>\n          4 3 4 7 2.</_>\n        <_>\n          8 10 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 6 -1.</_>\n        <_>\n          18 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 6 -1.</_>\n        <_>\n          18 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 6 -1.</_>\n        <_>\n          0 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 6 -1.</_>\n        <_>\n          1 7 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 7 -1.</_>\n        <_>\n          3 2 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 14 -1.</_>\n        <_>\n          7 10 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 13 10 -1.</_>\n        <_>\n          3 12 13 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 2 -1.</_>\n        <_>\n          11 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 4 -1.</_>\n        <_>\n          2 11 8 2 2.</_>\n        <_>\n          10 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 9 -1.</_>\n        <_>\n          6 13 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 1 6 -1.</_>\n        <_>\n          14 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 1 -1.</_>\n        <_>\n          7 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 15 5 -1.</_>\n        <_>\n          8 8 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 5 4 -1.</_>\n        <_>\n          1 8 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 17 6 -1.</_>\n        <_>\n          3 3 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 2 -1.</_>\n        <_>\n          10 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 2 -1.</_>\n        <_>\n          10 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 2 -1.</_>\n        <_>\n          9 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 2 -1.</_>\n        <_>\n          8 10 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 4 -1.</_>\n        <_>\n          9 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 6 -1.</_>\n        <_>\n          10 7 6 3 2.</_>\n        <_>\n          4 10 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          9 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 8 -1.</_>\n        <_>\n          8 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 6 -1.</_>\n        <_>\n          11 0 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 8 -1.</_>\n        <_>\n          8 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 13 -1.</_>\n        <_>\n          14 3 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 6 -1.</_>\n        <_>\n          8 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 13 -1.</_>\n        <_>\n          14 3 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 10 4 -1.</_>\n        <_>\n          0 7 5 2 2.</_>\n        <_>\n          5 9 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 13 -1.</_>\n        <_>\n          14 3 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 13 -1.</_>\n        <_>\n          3 3 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 1 -1.</_>\n        <_>\n          9 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 1 -1.</_>\n        <_>\n          9 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 4 4 -1.</_>\n        <_>\n          12 16 2 2 2.</_>\n        <_>\n          10 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 3 -1.</_>\n        <_>\n          10 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 2 -1.</_>\n        <_>\n          8 5 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 6 -1.</_>\n        <_>\n          6 6 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 12 -1.</_>\n        <_>\n          9 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 8 -1.</_>\n        <_>\n          4 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 8 5 -1.</_>\n        <_>\n          12 2 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 3 -1.</_>\n        <_>\n          0 9 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 5 -1.</_>\n        <_>\n          4 2 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 4 -1.</_>\n        <_>\n          13 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 1 -1.</_>\n        <_>\n          12 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 5 3 -1.</_>\n        <_>\n          7 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 7 6 -1.</_>\n        <_>\n          11 14 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 7 6 -1.</_>\n        <_>\n          2 14 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 2 6 -1.</_>\n        <_>\n          12 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 3 3 -1.</_>\n        <_>\n          8 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 5 -1.</_>\n        <_>\n          12 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 9 -1.</_>\n        <_>\n          8 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 1 -1.</_>\n        <_>\n          12 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 4 -1.</_>\n        <_>\n          8 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 4 2 -1.</_>\n        <_>\n          5 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 6 -1.</_>\n        <_>\n          2 3 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 2 -1.</_>\n        <_>\n          7 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 2 -1.</_>\n        <_>\n          16 8 3 1 2.</_>\n        <_>\n          13 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 6 -1.</_>\n        <_>\n          6 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 4 -1.</_>\n        <_>\n          10 13 10 2 2.</_>\n        <_>\n          0 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 5 -1.</_>\n        <_>\n          9 7 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 2 -1.</_>\n        <_>\n          11 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 2 -1.</_>\n        <_>\n          1 8 3 1 2.</_>\n        <_>\n          4 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 2 -1.</_>\n        <_>\n          10 2 10 1 2.</_>\n        <_>\n          0 3 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 5 3 -1.</_>\n        <_>\n          7 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 6 -1.</_>\n        <_>\n          10 13 3 3 2.</_>\n        <_>\n          7 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 1 6 -1.</_>\n        <_>\n          16 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 1 6 -1.</_>\n        <_>\n          3 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 14 12 -1.</_>\n        <_>\n          11 4 7 6 2.</_>\n        <_>\n          4 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 3 -1.</_>\n        <_>\n          13 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 7 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 3 -1.</_>\n        <_>\n          13 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 4 10 -1.</_>\n        <_>\n          3 1 2 5 2.</_>\n        <_>\n          5 6 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 2 -1.</_>\n        <_>\n          5 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 3 -1.</_>\n        <_>\n          15 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 4 -1.</_>\n        <_>\n          8 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 12 -1.</_>\n        <_>\n          13 10 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 12 -1.</_>\n        <_>\n          4 5 6 6 2.</_>\n        <_>\n          10 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 7 3 -1.</_>\n        <_>\n          7 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 3 -1.</_>\n        <_>\n          3 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 2 -1.</_>\n        <_>\n          10 2 7 1 2.</_>\n        <_>\n          3 3 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 3 10 -1.</_>\n        <_>\n          1 1 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 5 -1.</_>\n        <_>\n          11 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 2 -1.</_>\n        <_>\n          8 7 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 10 -1.</_>\n        <_>\n          7 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 3 -1.</_>\n        <_>\n          7 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 6 -1.</_>\n        <_>\n          16 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 7 6 -1.</_>\n        <_>\n          6 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 17 10 -1.</_>\n        <_>\n          0 9 17 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 15 16 -1.</_>\n        <_>\n          3 12 15 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 4 -1.</_>\n        <_>\n          7 17 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 9 -1.</_>\n        <_>\n          15 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 3 2 -1.</_>\n        <_>\n          2 4 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 7 9 -1.</_>\n        <_>\n          13 9 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 3 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 6 -1.</_>\n        <_>\n          10 2 10 3 2.</_>\n        <_>\n          0 5 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 3 4 -1.</_>\n        <_>\n          13 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 3 4 -1.</_>\n        <_>\n          4 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 3 -1.</_>\n        <_>\n          9 5 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 8 -1.</_>\n        <_>\n          7 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 6 -1.</_>\n        <_>\n          0 14 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 4 6 -1.</_>\n        <_>\n          4 13 2 3 2.</_>\n        <_>\n          6 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          10 0 4 6 2.</_>\n        <_>\n          6 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 2 -1.</_>\n        <_>\n          2 1 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 1 2 -1.</_>\n        <_>\n          3 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 1 -1.</_>\n        <_>\n          8 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 6 -1.</_>\n        <_>\n          17 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 2 -1.</_>\n        <_>\n          8 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 5 3 -1.</_>\n        <_>\n          11 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 5 3 -1.</_>\n        <_>\n          4 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 1 2 -1.</_>\n        <_>\n          19 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 3 -1.</_>\n        <_>\n          5 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 6 -1.</_>\n        <_>\n          17 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 3 6 -1.</_>\n        <_>\n          0 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 5 6 -1.</_>\n        <_>\n          0 6 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 2 -1.</_>\n        <_>\n          12 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 2 -1.</_>\n        <_>\n          6 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 6 -1.</_>\n        <_>\n          8 3 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 6 -1.</_>\n        <_>\n          0 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 7 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 15 -1.</_>\n        <_>\n          16 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 3 2 -1.</_>\n        <_>\n          1 11 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 1 10 -1.</_>\n        <_>\n          14 9 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 12 -1.</_>\n        <_>\n          2 1 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 2 -1.</_>\n        <_>\n          11 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 2 -1.</_>\n        <_>\n          7 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 15 5 -1.</_>\n        <_>\n          8 8 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 10 -1.</_>\n        <_>\n          3 0 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 2 -1.</_>\n        <_>\n          12 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 8 -1.</_>\n        <_>\n          8 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 5 3 -1.</_>\n        <_>\n          8 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 4 3 -1.</_>\n        <_>\n          7 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 2 -1.</_>\n        <_>\n          12 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 4 -1.</_>\n        <_>\n          3 15 7 2 2.</_>\n        <_>\n          10 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 4 -1.</_>\n        <_>\n          10 2 8 2 2.</_>\n        <_>\n          2 4 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 12 -1.</_>\n        <_>\n          3 8 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 2 -1.</_>\n        <_>\n          5 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 5 -1.</_>\n        <_>\n          10 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 2 -1.</_>\n        <_>\n          0 14 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 4 -1.</_>\n        <_>\n          1 7 3 2 2.</_>\n        <_>\n          4 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 1 12 -1.</_>\n        <_>\n          12 12 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          10 5 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 3 -1.</_>\n        <_>\n          14 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 3 -1.</_>\n        <_>\n          4 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 3 -1.</_>\n        <_>\n          8 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 2 4 -1.</_>\n        <_>\n          5 2 1 2 2.</_>\n        <_>\n          6 4 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 11 3 -1.</_>\n        <_>\n          5 6 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 12 -1.</_>\n        <_>\n          7 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 8 5 -1.</_>\n        <_>\n          12 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 1 12 -1.</_>\n        <_>\n          7 12 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 3 -1.</_>\n        <_>\n          4 2 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 10 -1.</_>\n        <_>\n          12 5 3 5 2.</_>\n        <_>\n          9 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 12 -1.</_>\n        <_>\n          5 5 4 6 2.</_>\n        <_>\n          9 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 6 -1.</_>\n        <_>\n          0 9 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 2 -1.</_>\n        <_>\n          4 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 12 2 -1.</_>\n        <_>\n          8 18 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 16 -1.</_>\n        <_>\n          7 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 7 8 -1.</_>\n        <_>\n          7 10 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 1 -1.</_>\n        <_>\n          7 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 4 -1.</_>\n        <_>\n          11 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 8 -1.</_>\n        <_>\n          3 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 12 -1.</_>\n        <_>\n          7 7 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 2 -1.</_>\n        <_>\n          6 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 6 -1.</_>\n        <_>\n          16 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 5 2 -1.</_>\n        <_>\n          3 4 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 4 2 -1.</_>\n        <_>\n          2 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 6 -1.</_>\n        <_>\n          10 13 3 3 2.</_>\n        <_>\n          7 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 4 -1.</_>\n        <_>\n          8 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 6 -1.</_>\n        <_>\n          0 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 3 -1.</_>\n        <_>\n          9 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 14 -1.</_>\n        <_>\n          9 6 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 4 -1.</_>\n        <_>\n          6 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 7 6 -1.</_>\n        <_>\n          10 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 2 -1.</_>\n        <_>\n          1 1 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 1 -1.</_>\n        <_>\n          6 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 10 -1.</_>\n        <_>\n          0 8 20 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 15 1 2 -1.</_>\n        <_>\n          19 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 8 -1.</_>\n        <_>\n          2 2 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 4 -1.</_>\n        <_>\n          11 1 9 2 2.</_>\n        <_>\n          2 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 1 2 -1.</_>\n        <_>\n          8 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 6 -1.</_>\n        <_>\n          10 2 5 3 2.</_>\n        <_>\n          5 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 4 -1.</_>\n        <_>\n          10 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 8 -1.</_>\n        <_>\n          8 5 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 4 3 -1.</_>\n        <_>\n          15 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 1 -1.</_>\n        <_>\n          9 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 4 3 -1.</_>\n        <_>\n          9 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 4 3 -1.</_>\n        <_>\n          7 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 15 1 2 -1.</_>\n        <_>\n          19 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 8 4 -1.</_>\n        <_>\n          0 17 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 4 -1.</_>\n        <_>\n          11 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 6 -1.</_>\n        <_>\n          3 16 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 6 -1.</_>\n        <_>\n          6 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 6 -1.</_>\n        <_>\n          5 14 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 3 4 -1.</_>\n        <_>\n          4 10 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 2 -1.</_>\n        <_>\n          13 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 4 -1.</_>\n        <_>\n          7 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 2 3 -1.</_>\n        <_>\n          2 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 12 -1.</_>\n        <_>\n          9 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 4 6 -1.</_>\n        <_>\n          3 14 2 3 2.</_>\n        <_>\n          5 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 2 2 -1.</_>\n        <_>\n          2 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 3 -1.</_>\n        <_>\n          8 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 1 -1.</_>\n        <_>\n          10 7 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 3 -1.</_>\n        <_>\n          7 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 2 -1.</_>\n        <_>\n          9 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 5 -1.</_>\n        <_>\n          10 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 5 -1.</_>\n        <_>\n          12 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 6 -1.</_>\n        <_>\n          7 2 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 6 5 -1.</_>\n        <_>\n          14 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 2 -1.</_>\n        <_>\n          9 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 1 3 -1.</_>\n        <_>\n          10 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 2 -1.</_>\n        <_>\n          6 6 1 1 2.</_>\n        <_>\n          7 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 4 -1.</_>\n        <_>\n          11 11 9 2 2.</_>\n        <_>\n          2 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 2 -1.</_>\n        <_>\n          6 6 1 1 2.</_>\n        <_>\n          7 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 2 -1.</_>\n        <_>\n          0 16 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 2 3 -1.</_>\n        <_>\n          4 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 3 -1.</_>\n        <_>\n          8 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 3 -1.</_>\n        <_>\n          9 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 4 -1.</_>\n        <_>\n          5 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 4 -1.</_>\n        <_>\n          12 7 3 2 2.</_>\n        <_>\n          9 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 6 -1.</_>\n        <_>\n          4 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 4 4 -1.</_>\n        <_>\n          13 15 2 2 2.</_>\n        <_>\n          11 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 2 -1.</_>\n        <_>\n          7 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 3 -1.</_>\n        <_>\n          13 1 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 4 4 -1.</_>\n        <_>\n          5 15 2 2 2.</_>\n        <_>\n          7 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 7 -1.</_>\n        <_>\n          9 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 3 -1.</_>\n        <_>\n          9 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 5 3 -1.</_>\n        <_>\n          7 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 3 -1.</_>\n        <_>\n          11 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 10 -1.</_>\n        <_>\n          6 14 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 6 2 -1.</_>\n        <_>\n          10 11 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 6 2 -1.</_>\n        <_>\n          7 11 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 1 -1.</_>\n        <_>\n          11 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 2 -1.</_>\n        <_>\n          7 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 5 -1.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 2 12 -1.</_>\n        <_>\n          7 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 3 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 3 -1.</_>\n        <_>\n          5 1 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 6 -1.</_>\n        <_>\n          18 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 6 -1.</_>\n        <_>\n          0 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 4 3 -1.</_>\n        <_>\n          7 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 6 -1.</_>\n        <_>\n          18 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 6 -1.</_>\n        <_>\n          0 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 3 -1.</_>\n        <_>\n          8 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 4 -1.</_>\n        <_>\n          8 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 6 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 2 -1.</_>\n        <_>\n          7 4 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 4 -1.</_>\n        <_>\n          10 14 7 2 2.</_>\n        <_>\n          3 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 6 2 -1.</_>\n        <_>\n          6 15 3 1 2.</_>\n        <_>\n          9 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 2 -1.</_>\n        <_>\n          14 16 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 12 8 -1.</_>\n        <_>\n          2 16 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 7 2 -1.</_>\n        <_>\n          7 8 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 2 -1.</_>\n        <_>\n          0 3 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 5 -1.</_>\n        <_>\n          9 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 8 -1.</_>\n        <_>\n          8 5 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 4 -1.</_>\n        <_>\n          10 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 3 2 -1.</_>\n        <_>\n          4 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 3 -1.</_>\n        <_>\n          11 4 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 3 -1.</_>\n        <_>\n          7 4 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 5 2 -1.</_>\n        <_>\n          14 12 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 9 -1.</_>\n        <_>\n          3 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 13 -1.</_>\n        <_>\n          14 6 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 8 -1.</_>\n        <_>\n          3 6 7 4 2.</_>\n        <_>\n          10 10 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 11 -1.</_>\n        <_>\n          16 0 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 12 12 -1.</_>\n        <_>\n          3 4 6 6 2.</_>\n        <_>\n          9 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 5 3 -1.</_>\n        <_>\n          11 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 4 2 -1.</_>\n        <_>\n          4 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 2 -1.</_>\n        <_>\n          9 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 3 -1.</_>\n        <_>\n          5 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 3 -1.</_>\n        <_>\n          11 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 2 -1.</_>\n        <_>\n          5 6 3 1 2.</_>\n        <_>\n          8 7 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 4 3 -1.</_>\n        <_>\n          12 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 2 -1.</_>\n        <_>\n          3 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 2 -1.</_>\n        <_>\n          9 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 16 4 -1.</_>\n        <_>\n          1 11 8 2 2.</_>\n        <_>\n          9 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 5 3 -1.</_>\n        <_>\n          4 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 4 3 -1.</_>\n        <_>\n          12 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 2 -1.</_>\n        <_>\n          9 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 2 -1.</_>\n        <_>\n          8 10 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 3 -1.</_>\n        <_>\n          2 13 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 3 2 -1.</_>\n        <_>\n          16 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 18 2 -1.</_>\n        <_>\n          7 18 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 3 2 -1.</_>\n        <_>\n          16 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 3 2 -1.</_>\n        <_>\n          1 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          7 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 8 3 -1.</_>\n        <_>\n          5 15 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 14 -1.</_>\n        <_>\n          10 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 14 -1.</_>\n        <_>\n          8 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 3 -1.</_>\n        <_>\n          13 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 1 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          9 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 3 -1.</_>\n        <_>\n          8 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 18 -1.</_>\n        <_>\n          4 9 16 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 14 -1.</_>\n        <_>\n          1 8 16 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 15 4 -1.</_>\n        <_>\n          8 9 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 7 3 -1.</_>\n        <_>\n          6 13 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 2 3 -1.</_>\n        <_>\n          14 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 16 14 -1.</_>\n        <_>\n          2 3 8 7 2.</_>\n        <_>\n          10 10 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 18 -1.</_>\n        <_>\n          18 2 2 9 2.</_>\n        <_>\n          16 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 2 3 -1.</_>\n        <_>\n          4 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 18 -1.</_>\n        <_>\n          18 2 2 9 2.</_>\n        <_>\n          16 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 3 -1.</_>\n        <_>\n          1 2 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 3 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 5 9 -1.</_>\n        <_>\n          5 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 11 -1.</_>\n        <_>\n          16 0 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 1 -1.</_>\n        <_>\n          9 0 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 7 -1.</_>\n        <_>\n          17 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 3 7 -1.</_>\n        <_>\n          2 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 12 -1.</_>\n        <_>\n          7 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 11 -1.</_>\n        <_>\n          2 0 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 20 -1.</_>\n        <_>\n          14 0 3 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 2 -1.</_>\n        <_>\n          0 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 8 -1.</_>\n        <_>\n          10 5 5 4 2.</_>\n        <_>\n          5 9 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 4 -1.</_>\n        <_>\n          4 7 6 2 2.</_>\n        <_>\n          10 9 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 4 -1.</_>\n        <_>\n          5 1 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 4 -1.</_>\n        <_>\n          12 7 3 2 2.</_>\n        <_>\n          9 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 6 -1.</_>\n        <_>\n          5 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 4 -1.</_>\n        <_>\n          12 16 3 2 2.</_>\n        <_>\n          9 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 12 -1.</_>\n        <_>\n          9 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 18 -1.</_>\n        <_>\n          9 1 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 2 -1.</_>\n        <_>\n          8 12 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 2 -1.</_>\n        <_>\n          8 9 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 6 -1.</_>\n        <_>\n          9 0 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 3 2 -1.</_>\n        <_>\n          11 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 17 4 -1.</_>\n        <_>\n          1 3 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 12 -1.</_>\n        <_>\n          11 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 2 17 -1.</_>\n        <_>\n          12 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 1 -1.</_>\n        <_>\n          6 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 3 -1.</_>\n        <_>\n          18 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 4 -1.</_>\n        <_>\n          8 6 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 10 -1.</_>\n        <_>\n          4 10 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 4 2 -1.</_>\n        <_>\n          7 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 6 -1.</_>\n        <_>\n          17 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 6 -1.</_>\n        <_>\n          9 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 6 -1.</_>\n        <_>\n          17 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 4 -1.</_>\n        <_>\n          9 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 3 -1.</_>\n        <_>\n          0 13 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 3 -1.</_>\n        <_>\n          3 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 7 -1.</_>\n        <_>\n          9 6 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 6 -1.</_>\n        <_>\n          0 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 1 3 -1.</_>\n        <_>\n          14 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 14 -1.</_>\n        <_>\n          3 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 5 6 -1.</_>\n        <_>\n          12 16 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 5 6 -1.</_>\n        <_>\n          4 16 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 2 -1.</_>\n        <_>\n          12 10 1 1 2.</_>\n        <_>\n          11 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 14 -1.</_>\n        <_>\n          6 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 2 3 -1.</_>\n        <_>\n          10 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 3 -1.</_>\n        <_>\n          0 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 6 -1.</_>\n        <_>\n          5 14 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 9 -1.</_>\n        <_>\n          6 14 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 2 -1.</_>\n        <_>\n          12 10 1 1 2.</_>\n        <_>\n          11 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 1 3 -1.</_>\n        <_>\n          5 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 13 3 -1.</_>\n        <_>\n          4 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 15 6 -1.</_>\n        <_>\n          6 7 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          8 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 3 -1.</_>\n        <_>\n          8 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 1 3 -1.</_>\n        <_>\n          15 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 5 3 -1.</_>\n        <_>\n          1 12 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 7 12 -1.</_>\n        <_>\n          7 7 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 10 -1.</_>\n        <_>\n          0 1 3 5 2.</_>\n        <_>\n          3 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 3 -1.</_>\n        <_>\n          16 2 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          5 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 3 5 -1.</_>\n        <_>\n          13 2 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 6 -1.</_>\n        <_>\n          0 5 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 1 -1.</_>\n        <_>\n          9 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 2 -1.</_>\n        <_>\n          12 10 1 1 2.</_>\n        <_>\n          11 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 2 -1.</_>\n        <_>\n          7 10 1 1 2.</_>\n        <_>\n          8 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 4 -1.</_>\n        <_>\n          11 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 8 -1.</_>\n        <_>\n          9 12 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 3 -1.</_>\n        <_>\n          13 1 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 4 -1.</_>\n        <_>\n          9 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 10 -1.</_>\n        <_>\n          10 7 5 5 2.</_>\n        <_>\n          5 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 8 2 -1.</_>\n        <_>\n          3 18 4 1 2.</_>\n        <_>\n          7 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 8 -1.</_>\n        <_>\n          12 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 8 -1.</_>\n        <_>\n          6 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 7 -1.</_>\n        <_>\n          12 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 1 -1.</_>\n        <_>\n          8 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 1 3 -1.</_>\n        <_>\n          15 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 2 -1.</_>\n        <_>\n          7 15 1 1 2.</_>\n        <_>\n          8 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 1 3 -1.</_>\n        <_>\n          15 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 7 -1.</_>\n        <_>\n          7 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 7 -1.</_>\n        <_>\n          18 1 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 8 20 -1.</_>\n        <_>\n          2 10 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 6 -1.</_>\n        <_>\n          3 2 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 2 -1.</_>\n        <_>\n          4 4 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 5 -1.</_>\n        <_>\n          16 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 4 -1.</_>\n        <_>\n          8 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 5 -1.</_>\n        <_>\n          16 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 13 -1.</_>\n        <_>\n          3 7 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 5 -1.</_>\n        <_>\n          16 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 5 -1.</_>\n        <_>\n          2 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 3 6 -1.</_>\n        <_>\n          14 14 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 6 -1.</_>\n        <_>\n          3 14 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 3 -1.</_>\n        <_>\n          16 2 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 10 -1.</_>\n        <_>\n          8 7 1 5 2.</_>\n        <_>\n          9 12 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 4 -1.</_>\n        <_>\n          11 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 3 -1.</_>\n        <_>\n          0 2 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 3 -1.</_>\n        <_>\n          13 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 3 5 -1.</_>\n        <_>\n          8 15 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 5 -1.</_>\n        <_>\n          10 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 14 -1.</_>\n        <_>\n          10 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 5 6 -1.</_>\n        <_>\n          0 7 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 4 -1.</_>\n        <_>\n          9 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 10 -1.</_>\n        <_>\n          6 0 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 14 -1.</_>\n        <_>\n          10 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 14 -1.</_>\n        <_>\n          8 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 3 -1.</_>\n        <_>\n          13 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 2 3 -1.</_>\n        <_>\n          6 1 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 18 -1.</_>\n        <_>\n          19 1 1 9 2.</_>\n        <_>\n          18 10 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 3 -1.</_>\n        <_>\n          2 2 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 18 -1.</_>\n        <_>\n          19 1 1 9 2.</_>\n        <_>\n          18 10 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 4 6 -1.</_>\n        <_>\n          1 14 2 3 2.</_>\n        <_>\n          3 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 7 6 -1.</_>\n        <_>\n          10 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          0 10 3 5 2.</_>\n        <_>\n          3 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 4 -1.</_>\n        <_>\n          12 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 5 6 -1.</_>\n        <_>\n          5 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 1 8 -1.</_>\n        <_>\n          14 10 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 6 -1.</_>\n        <_>\n          1 7 9 3 2.</_>\n        <_>\n          10 10 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          9 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 5 -1.</_>\n        <_>\n          7 9 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 3 -1.</_>\n        <_>\n          9 6 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 4 -1.</_>\n        <_>\n          7 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 19 9 -1.</_>\n        <_>\n          1 3 19 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 6 -1.</_>\n        <_>\n          3 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 4 4 -1.</_>\n        <_>\n          15 7 2 2 2.</_>\n        <_>\n          13 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 4 4 -1.</_>\n        <_>\n          3 7 2 2 2.</_>\n        <_>\n          5 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 10 8 -1.</_>\n        <_>\n          9 10 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 12 -1.</_>\n        <_>\n          3 14 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 10 12 -1.</_>\n        <_>\n          11 5 5 6 2.</_>\n        <_>\n          6 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 5 -1.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 4 -1.</_>\n        <_>\n          9 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 5 -1.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 5 -1.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 1 -1.</_>\n        <_>\n          13 2 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 1 -1.</_>\n        <_>\n          5 2 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 3 -1.</_>\n        <_>\n          13 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 1 4 -1.</_>\n        <_>\n          0 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 3 -1.</_>\n        <_>\n          13 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          9 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 9 2 -1.</_>\n        <_>\n          6 16 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 4 -1.</_>\n        <_>\n          18 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          5 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 3 2 -1.</_>\n        <_>\n          15 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 9 -1.</_>\n        <_>\n          0 3 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          9 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          8 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          9 5 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 4 -1.</_>\n        <_>\n          9 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 12 -1.</_>\n        <_>\n          11 6 4 6 2.</_>\n        <_>\n          7 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 12 -1.</_>\n        <_>\n          5 6 4 6 2.</_>\n        <_>\n          9 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 3 2 -1.</_>\n        <_>\n          2 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 6 -1.</_>\n        <_>\n          2 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 6 3 -1.</_>\n        <_>\n          6 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 5 3 -1.</_>\n        <_>\n          14 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 5 3 -1.</_>\n        <_>\n          14 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 2 -1.</_>\n        <_>\n          7 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 5 3 -1.</_>\n        <_>\n          1 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          10 13 2 3 2.</_>\n        <_>\n          8 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 3 -1.</_>\n        <_>\n          8 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 5 4 -1.</_>\n        <_>\n          12 2 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 2 -1.</_>\n        <_>\n          0 2 10 1 2.</_>\n        <_>\n          10 3 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 1 -1.</_>\n        <_>\n          6 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 13 2 -1.</_>\n        <_>\n          4 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 6 -1.</_>\n        <_>\n          2 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 8 -1.</_>\n        <_>\n          17 12 3 4 2.</_>\n        <_>\n          14 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 10 6 -1.</_>\n        <_>\n          4 13 5 3 2.</_>\n        <_>\n          9 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 1 2 -1.</_>\n        <_>\n          14 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 2 -1.</_>\n        <_>\n          14 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 2 -1.</_>\n        <_>\n          4 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 9 2 -1.</_>\n        <_>\n          8 13 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 6 -1.</_>\n        <_>\n          11 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 12 -1.</_>\n        <_>\n          5 12 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 6 -1.</_>\n        <_>\n          11 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 6 -1.</_>\n        <_>\n          6 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 11 3 -1.</_>\n        <_>\n          5 5 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 5 10 -1.</_>\n        <_>\n          7 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 18 2 -1.</_>\n        <_>\n          2 9 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 5 3 -1.</_>\n        <_>\n          7 18 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 1 -1.</_>\n        <_>\n          9 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 6 6 -1.</_>\n        <_>\n          0 14 3 3 2.</_>\n        <_>\n          3 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 1 -1.</_>\n        <_>\n          9 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 12 1 -1.</_>\n        <_>\n          7 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 7 -1.</_>\n        <_>\n          14 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 2 -1.</_>\n        <_>\n          1 1 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 10 9 -1.</_>\n        <_>\n          10 12 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 2 -1.</_>\n        <_>\n          5 1 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 2 3 -1.</_>\n        <_>\n          17 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 2 3 -1.</_>\n        <_>\n          1 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 6 -1.</_>\n        <_>\n          10 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 3 -1.</_>\n        <_>\n          8 5 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 6 -1.</_>\n        <_>\n          9 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 12 12 -1.</_>\n        <_>\n          3 4 6 6 2.</_>\n        <_>\n          9 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 15 -1.</_>\n        <_>\n          11 2 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 17 -1.</_>\n        <_>\n          4 2 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 7 -1.</_>\n        <_>\n          14 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 7 -1.</_>\n        <_>\n          3 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 15 -1.</_>\n        <_>\n          11 2 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 15 -1.</_>\n        <_>\n          7 2 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 3 6 -1.</_>\n        <_>\n          17 11 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 6 -1.</_>\n        <_>\n          8 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 6 -1.</_>\n        <_>\n          10 10 9 3 2.</_>\n        <_>\n          1 13 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 9 -1.</_>\n        <_>\n          0 12 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 4 -1.</_>\n        <_>\n          5 14 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 16 12 -1.</_>\n        <_>\n          3 9 16 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 12 -1.</_>\n        <_>\n          1 1 6 6 2.</_>\n        <_>\n          7 7 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 2 4 -1.</_>\n        <_>\n          11 4 1 2 2.</_>\n        <_>\n          10 6 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 2 -1.</_>\n        <_>\n          0 9 5 1 2.</_>\n        <_>\n          5 10 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 3 -1.</_>\n        <_>\n          9 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 9 2 -1.</_>\n        <_>\n          3 13 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 13 6 -1.</_>\n        <_>\n          3 6 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 4 -1.</_>\n        <_>\n          12 7 3 2 2.</_>\n        <_>\n          9 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 8 -1.</_>\n        <_>\n          4 0 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 12 -1.</_>\n        <_>\n          9 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 10 -1.</_>\n        <_>\n          4 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 8 3 -1.</_>\n        <_>\n          6 18 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 6 -1.</_>\n        <_>\n          0 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 3 2 -1.</_>\n        <_>\n          13 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 5 -1.</_>\n        <_>\n          9 5 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 3 6 -1.</_>\n        <_>\n          12 16 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 8 2 -1.</_>\n        <_>\n          1 12 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 6 -1.</_>\n        <_>\n          0 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 3 2 -1.</_>\n        <_>\n          13 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 4 6 -1.</_>\n        <_>\n          4 14 2 3 2.</_>\n        <_>\n          6 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 3 2 -1.</_>\n        <_>\n          13 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 8 -1.</_>\n        <_>\n          17 0 3 4 2.</_>\n        <_>\n          14 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 3 2 -1.</_>\n        <_>\n          8 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          6 0 4 6 2.</_>\n        <_>\n          10 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 10 -1.</_>\n        <_>\n          15 0 1 5 2.</_>\n        <_>\n          14 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 8 6 -1.</_>\n        <_>\n          5 3 4 3 2.</_>\n        <_>\n          9 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 1 2 -1.</_>\n        <_>\n          9 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 4 3 -1.</_>\n        <_>\n          15 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 2 3 -1.</_>\n        <_>\n          8 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 4 -1.</_>\n        <_>\n          10 13 7 2 2.</_>\n        <_>\n          3 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 4 3 -1.</_>\n        <_>\n          1 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 1 -1.</_>\n        <_>\n          11 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 16 15 -1.</_>\n        <_>\n          3 10 16 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 2 -1.</_>\n        <_>\n          8 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 10 -1.</_>\n        <_>\n          10 4 6 5 2.</_>\n        <_>\n          4 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 4 -1.</_>\n        <_>\n          9 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          10 12 2 4 2.</_>\n        <_>\n          8 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 3 2 -1.</_>\n        <_>\n          13 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 3 2 -1.</_>\n        <_>\n          8 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 14 -1.</_>\n        <_>\n          9 0 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 3 -1.</_>\n        <_>\n          10 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 3 -1.</_>\n        <_>\n          10 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 6 -1.</_>\n        <_>\n          0 11 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 2 -1.</_>\n        <_>\n          6 1 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 7 3 -1.</_>\n        <_>\n          6 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 8 9 -1.</_>\n        <_>\n          8 13 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 2 -1.</_>\n        <_>\n          6 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 8 -1.</_>\n        <_>\n          17 1 3 4 2.</_>\n        <_>\n          14 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 8 -1.</_>\n        <_>\n          0 1 3 4 2.</_>\n        <_>\n          3 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 6 -1.</_>\n        <_>\n          10 2 9 3 2.</_>\n        <_>\n          1 5 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 1 -1.</_>\n        <_>\n          10 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 6 -1.</_>\n        <_>\n          15 2 2 3 2.</_>\n        <_>\n          13 5 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 1 3 -1.</_>\n        <_>\n          13 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 5 3 -1.</_>\n        <_>\n          2 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 6 -1.</_>\n        <_>\n          15 2 2 3 2.</_>\n        <_>\n          13 5 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 6 -1.</_>\n        <_>\n          3 2 2 3 2.</_>\n        <_>\n          5 5 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 1 2 -1.</_>\n        <_>\n          13 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 2 -1.</_>\n        <_>\n          5 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 2 -1.</_>\n        <_>\n          13 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 2 -1.</_>\n        <_>\n          6 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 3 2 -1.</_>\n        <_>\n          13 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 4 4 -1.</_>\n        <_>\n          6 16 2 2 2.</_>\n        <_>\n          8 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 3 -1.</_>\n        <_>\n          9 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 9 6 -1.</_>\n        <_>\n          0 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 6 -1.</_>\n        <_>\n          9 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 2 3 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 6 -1.</_>\n        <_>\n          1 12 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 2 -1.</_>\n        <_>\n          8 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 2 -1.</_>\n        <_>\n          7 10 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 2 3 -1.</_>\n        <_>\n          8 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 4 -1.</_>\n        <_>\n          18 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 18 1 -1.</_>\n        <_>\n          7 19 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 2 -1.</_>\n        <_>\n          10 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 1 6 -1.</_>\n        <_>\n          1 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 8 3 -1.</_>\n        <_>\n          12 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 4 -1.</_>\n        <_>\n          1 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 2 -1.</_>\n        <_>\n          7 11 1 1 2.</_>\n        <_>\n          8 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 2 5 -1.</_>\n        <_>\n          11 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 2 5 -1.</_>\n        <_>\n          8 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 3 -1.</_>\n        <_>\n          15 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 3 -1.</_>\n        <_>\n          5 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 15 1 -1.</_>\n        <_>\n          9 19 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 15 1 -1.</_>\n        <_>\n          6 19 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 3 -1.</_>\n        <_>\n          15 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 15 -1.</_>\n        <_>\n          7 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 5 -1.</_>\n        <_>\n          9 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 7 -1.</_>\n        <_>\n          10 5 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 3 -1.</_>\n        <_>\n          16 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 3 3 -1.</_>\n        <_>\n          1 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 7 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 6 2 -1.</_>\n        <_>\n          0 16 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 6 -1.</_>\n        <_>\n          7 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 4 -1.</_>\n        <_>\n          7 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 4 10 -1.</_>\n        <_>\n          16 10 2 5 2.</_>\n        <_>\n          14 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 2 -1.</_>\n        <_>\n          4 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 2 -1.</_>\n        <_>\n          11 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 4 10 -1.</_>\n        <_>\n          2 10 2 5 2.</_>\n        <_>\n          4 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 6 -1.</_>\n        <_>\n          10 13 10 3 2.</_>\n        <_>\n          0 16 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 2 15 -1.</_>\n        <_>\n          1 5 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 4 -1.</_>\n        <_>\n          10 7 9 2 2.</_>\n        <_>\n          1 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 17 -1.</_>\n        <_>\n          1 0 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 6 -1.</_>\n        <_>\n          10 6 8 3 2.</_>\n        <_>\n          2 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 1 3 -1.</_>\n        <_>\n          8 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 2 -1.</_>\n        <_>\n          8 16 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 2 -1.</_>\n        <_>\n          5 2 4 1 2.</_>\n        <_>\n          9 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 6 -1.</_>\n        <_>\n          6 14 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 2 -1.</_>\n        <_>\n          9 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 6 -1.</_>\n        <_>\n          18 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 2 -1.</_>\n        <_>\n          9 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 6 -1.</_>\n        <_>\n          18 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 1 3 -1.</_>\n        <_>\n          9 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 6 -1.</_>\n        <_>\n          18 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 6 -1.</_>\n        <_>\n          0 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          9 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 3 -1.</_>\n        <_>\n          3 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 4 3 -1.</_>\n        <_>\n          13 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 6 -1.</_>\n        <_>\n          5 4 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 3 -1.</_>\n        <_>\n          3 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 15 5 -1.</_>\n        <_>\n          8 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 2 -1.</_>\n        <_>\n          7 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 3 9 -1.</_>\n        <_>\n          11 3 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 6 -1.</_>\n        <_>\n          10 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 3 -1.</_>\n        <_>\n          9 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 9 -1.</_>\n        <_>\n          2 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 3 5 -1.</_>\n        <_>\n          10 13 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 3 -1.</_>\n        <_>\n          9 7 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 5 -1.</_>\n        <_>\n          10 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 2 -1.</_>\n        <_>\n          9 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 2 -1.</_>\n        <_>\n          9 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          10 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 1 -1.</_>\n        <_>\n          11 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 11 15 -1.</_>\n        <_>\n          0 6 11 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 6 -1.</_>\n        <_>\n          7 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 1 -1.</_>\n        <_>\n          9 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 6 4 -1.</_>\n        <_>\n          5 16 3 2 2.</_>\n        <_>\n          8 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 8 -1.</_>\n        <_>\n          6 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 6 -1.</_>\n        <_>\n          5 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 10 -1.</_>\n        <_>\n          11 6 4 5 2.</_>\n        <_>\n          7 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 10 -1.</_>\n        <_>\n          5 6 4 5 2.</_>\n        <_>\n          9 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 2 -1.</_>\n        <_>\n          9 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 8 2 -1.</_>\n        <_>\n          5 13 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 8 2 -1.</_>\n        <_>\n          10 3 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 10 -1.</_>\n        <_>\n          4 0 1 5 2.</_>\n        <_>\n          5 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 2 -1.</_>\n        <_>\n          9 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 15 3 -1.</_>\n        <_>\n          2 9 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 2 -1.</_>\n        <_>\n          8 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 6 -1.</_>\n        <_>\n          17 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 3 4 -1.</_>\n        <_>\n          2 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 4 6 -1.</_>\n        <_>\n          14 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 3 8 -1.</_>\n        <_>\n          2 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          8 16 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 2 2 -1.</_>\n        <_>\n          3 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 4 6 -1.</_>\n        <_>\n          14 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 4 6 -1.</_>\n        <_>\n          2 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 6 -1.</_>\n        <_>\n          10 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 6 -1.</_>\n        <_>\n          8 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 6 -1.</_>\n        <_>\n          12 2 1 3 2.</_>\n        <_>\n          11 5 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 5 -1.</_>\n        <_>\n          8 6 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 3 6 -1.</_>\n        <_>\n          17 3 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 2 -1.</_>\n        <_>\n          10 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          9 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 5 2 -1.</_>\n        <_>\n          12 4 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 5 12 -1.</_>\n        <_>\n          7 7 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 2 -1.</_>\n        <_>\n          4 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 2 -1.</_>\n        <_>\n          13 14 2 1 2.</_>\n        <_>\n          11 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 6 -1.</_>\n        <_>\n          0 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 1 3 -1.</_>\n        <_>\n          5 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 1 -1.</_>\n        <_>\n          10 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 1 -1.</_>\n        <_>\n          7 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 3 -1.</_>\n        <_>\n          9 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 1 3 -1.</_>\n        <_>\n          4 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 3 -1.</_>\n        <_>\n          12 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 3 -1.</_>\n        <_>\n          4 6 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 3 -1.</_>\n        <_>\n          9 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 3 -1.</_>\n        <_>\n          5 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 17 -1.</_>\n        <_>\n          9 0 3 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 1 3 -1.</_>\n        <_>\n          9 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 15 -1.</_>\n        <_>\n          9 10 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 2 3 -1.</_>\n        <_>\n          8 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 3 -1.</_>\n        <_>\n          10 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 5 -1.</_>\n        <_>\n          9 1 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 2 -1.</_>\n        <_>\n          0 0 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 5 3 -1.</_>\n        <_>\n          2 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 9 15 -1.</_>\n        <_>\n          2 10 9 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 10 -1.</_>\n        <_>\n          11 0 6 5 2.</_>\n        <_>\n          5 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 2 3 -1.</_>\n        <_>\n          6 1 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 1 -1.</_>\n        <_>\n          12 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 2 10 -1.</_>\n        <_>\n          3 1 1 5 2.</_>\n        <_>\n          4 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 1 -1.</_>\n        <_>\n          13 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 4 6 -1.</_>\n        <_>\n          4 15 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 1 -1.</_>\n        <_>\n          13 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 1 -1.</_>\n        <_>\n          6 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 4 -1.</_>\n        <_>\n          11 12 9 2 2.</_>\n        <_>\n          2 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 2 -1.</_>\n        <_>\n          5 7 1 1 2.</_>\n        <_>\n          6 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 2 -1.</_>\n        <_>\n          16 4 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 18 -1.</_>\n        <_>\n          0 2 1 9 2.</_>\n        <_>\n          1 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 4 -1.</_>\n        <_>\n          10 2 9 2 2.</_>\n        <_>\n          1 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 1 3 -1.</_>\n        <_>\n          9 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 4 -1.</_>\n        <_>\n          11 12 9 2 2.</_>\n        <_>\n          2 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 18 4 -1.</_>\n        <_>\n          0 12 9 2 2.</_>\n        <_>\n          9 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 5 3 -1.</_>\n        <_>\n          11 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 7 3 -1.</_>\n        <_>\n          6 5 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 3 3 -1.</_>\n        <_>\n          13 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 4 -1.</_>\n        <_>\n          9 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 2 4 -1.</_>\n        <_>\n          11 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 9 3 -1.</_>\n        <_>\n          3 17 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 8 -1.</_>\n        <_>\n          12 0 1 4 2.</_>\n        <_>\n          11 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 12 -1.</_>\n        <_>\n          0 8 3 6 2.</_>\n        <_>\n          3 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 12 -1.</_>\n        <_>\n          10 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 8 14 -1.</_>\n        <_>\n          5 10 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 1 -1.</_>\n        <_>\n          14 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 10 4 -1.</_>\n        <_>\n          0 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 5 8 -1.</_>\n        <_>\n          10 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 8 -1.</_>\n        <_>\n          8 1 2 4 2.</_>\n        <_>\n          10 5 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 1 -1.</_>\n        <_>\n          11 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 4 -1.</_>\n        <_>\n          9 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 6 -1.</_>\n        <_>\n          18 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 4 -1.</_>\n        <_>\n          9 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 1 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 3 6 -1.</_>\n        <_>\n          12 13 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 10 -1.</_>\n        <_>\n          10 4 9 5 2.</_>\n        <_>\n          1 9 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 9 -1.</_>\n        <_>\n          8 9 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 3 -1.</_>\n        <_>\n          8 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 4 3 -1.</_>\n        <_>\n          14 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 3 10 -1.</_>\n        <_>\n          6 10 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 1 6 -1.</_>\n        <_>\n          0 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 1 3 -1.</_>\n        <_>\n          10 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 4 3 -1.</_>\n        <_>\n          2 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 8 -1.</_>\n        <_>\n          19 3 1 4 2.</_>\n        <_>\n          18 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 8 -1.</_>\n        <_>\n          0 3 1 4 2.</_>\n        <_>\n          1 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 10 -1.</_>\n        <_>\n          10 7 7 5 2.</_>\n        <_>\n          3 12 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 19 3 -1.</_>\n        <_>\n          0 8 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 3 -1.</_>\n        <_>\n          12 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 1 3 -1.</_>\n        <_>\n          0 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 3 -1.</_>\n        <_>\n          12 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 3 -1.</_>\n        <_>\n          5 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 2 -1.</_>\n        <_>\n          8 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 12 -1.</_>\n        <_>\n          8 3 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 3 -1.</_>\n        <_>\n          13 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 4 -1.</_>\n        <_>\n          0 12 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 17 14 -1.</_>\n        <_>\n          2 7 17 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 10 -1.</_>\n        <_>\n          0 0 3 5 2.</_>\n        <_>\n          3 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 4 -1.</_>\n        <_>\n          14 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 4 -1.</_>\n        <_>\n          3 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 7 2 -1.</_>\n        <_>\n          13 3 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 7 2 -1.</_>\n        <_>\n          0 3 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 14 2 -1.</_>\n        <_>\n          13 11 7 1 2.</_>\n        <_>\n          6 12 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 2 -1.</_>\n        <_>\n          8 5 1 1 2.</_>\n        <_>\n          9 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 3 -1.</_>\n        <_>\n          13 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 3 12 -1.</_>\n        <_>\n          2 1 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 1 3 -1.</_>\n        <_>\n          17 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 1 3 -1.</_>\n        <_>\n          2 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 1 3 -1.</_>\n        <_>\n          14 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 3 -1.</_>\n        <_>\n          7 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          10 13 2 3 2.</_>\n        <_>\n          8 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 1 3 -1.</_>\n        <_>\n          5 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 20 -1.</_>\n        <_>\n          16 0 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 2 6 -1.</_>\n        <_>\n          5 1 1 3 2.</_>\n        <_>\n          6 4 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 4 -1.</_>\n        <_>\n          5 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 12 -1.</_>\n        <_>\n          15 2 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 12 -1.</_>\n        <_>\n          7 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 1 8 -1.</_>\n        <_>\n          14 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 14 10 -1.</_>\n        <_>\n          1 4 7 5 2.</_>\n        <_>\n          8 9 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 14 -1.</_>\n        <_>\n          14 6 3 7 2.</_>\n        <_>\n          11 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 14 -1.</_>\n        <_>\n          3 6 3 7 2.</_>\n        <_>\n          6 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 15 2 -1.</_>\n        <_>\n          9 9 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          7 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 14 4 -1.</_>\n        <_>\n          13 3 7 2 2.</_>\n        <_>\n          6 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 15 2 -1.</_>\n        <_>\n          6 9 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 9 -1.</_>\n        <_>\n          6 14 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 8 -1.</_>\n        <_>\n          8 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 2 6 -1.</_>\n        <_>\n          14 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 4 -1.</_>\n        <_>\n          5 7 3 2 2.</_>\n        <_>\n          8 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 19 -1.</_>\n        <_>\n          7 1 6 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 5 -1.</_>\n        <_>\n          4 2 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 6 2 -1.</_>\n        <_>\n          12 18 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 6 2 -1.</_>\n        <_>\n          2 18 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 6 -1.</_>\n        <_>\n          17 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 3 -1.</_>\n        <_>\n          8 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 6 -1.</_>\n        <_>\n          10 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 6 -1.</_>\n        <_>\n          17 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 2 3 -1.</_>\n        <_>\n          8 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 2 -1.</_>\n        <_>\n          11 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 6 -1.</_>\n        <_>\n          0 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 6 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 2 -1.</_>\n        <_>\n          5 6 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 4 -1.</_>\n        <_>\n          11 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 5 9 -1.</_>\n        <_>\n          1 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 3 -1.</_>\n        <_>\n          13 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 14 3 -1.</_>\n        <_>\n          7 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 8 -1.</_>\n        <_>\n          2 15 18 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 3 -1.</_>\n        <_>\n          5 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 2 -1.</_>\n        <_>\n          12 6 2 1 2.</_>\n        <_>\n          10 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 2 -1.</_>\n        <_>\n          6 6 2 1 2.</_>\n        <_>\n          8 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 4 -1.</_>\n        <_>\n          11 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 2 7 -1.</_>\n        <_>\n          8 1 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 15 14 -1.</_>\n        <_>\n          4 9 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 2 -1.</_>\n        <_>\n          9 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 18 4 -1.</_>\n        <_>\n          11 3 9 2 2.</_>\n        <_>\n          2 5 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 3 -1.</_>\n        <_>\n          13 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 2 -1.</_>\n        <_>\n          7 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 7 -1.</_>\n        <_>\n          9 5 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 3 -1.</_>\n        <_>\n          6 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 18 -1.</_>\n        <_>\n          6 9 14 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 6 3 -1.</_>\n        <_>\n          2 17 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 6 -1.</_>\n        <_>\n          10 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 3 -1.</_>\n        <_>\n          7 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 3 -1.</_>\n        <_>\n          7 13 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 2 -1.</_>\n        <_>\n          9 12 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 6 -1.</_>\n        <_>\n          5 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 7 2 -1.</_>\n        <_>\n          11 13 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 6 -1.</_>\n        <_>\n          6 10 4 3 2.</_>\n        <_>\n          10 13 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 4 -1.</_>\n        <_>\n          11 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 3 -1.</_>\n        <_>\n          9 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 1 9 -1.</_>\n        <_>\n          13 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 14 6 -1.</_>\n        <_>\n          1 15 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 1 6 -1.</_>\n        <_>\n          13 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 8 -1.</_>\n        <_>\n          1 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 18 -1.</_>\n        <_>\n          18 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 6 2 -1.</_>\n        <_>\n          2 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 6 -1.</_>\n        <_>\n          9 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 6 -1.</_>\n        <_>\n          6 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 3 -1.</_>\n        <_>\n          14 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 18 -1.</_>\n        <_>\n          1 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 18 2 -1.</_>\n        <_>\n          10 18 9 1 2.</_>\n        <_>\n          1 19 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 2 2 -1.</_>\n        <_>\n          3 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 5 3 -1.</_>\n        <_>\n          8 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 2 3 -1.</_>\n        <_>\n          8 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 3 -1.</_>\n        <_>\n          13 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 2 -1.</_>\n        <_>\n          9 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 5 2 -1.</_>\n        <_>\n          15 6 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 5 2 -1.</_>\n        <_>\n          0 6 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 14 1 6 -1.</_>\n        <_>\n          17 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 9 3 -1.</_>\n        <_>\n          5 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 3 -1.</_>\n        <_>\n          13 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 18 -1.</_>\n        <_>\n          2 0 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 1 3 -1.</_>\n        <_>\n          17 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 1 6 -1.</_>\n        <_>\n          2 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 8 1 2 -1.</_>\n        <_>\n          19 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 3 -1.</_>\n        <_>\n          6 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 3 -1.</_>\n        <_>\n          9 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 1 3 -1.</_>\n        <_>\n          2 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 8 2 -1.</_>\n        <_>\n          16 4 4 1 2.</_>\n        <_>\n          12 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 8 2 -1.</_>\n        <_>\n          0 4 4 1 2.</_>\n        <_>\n          4 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 18 4 -1.</_>\n        <_>\n          2 18 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 4 -1.</_>\n        <_>\n          7 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 3 -1.</_>\n        <_>\n          4 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 20 -1.</_>\n        <_>\n          2 0 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 8 -1.</_>\n        <_>\n          14 4 2 4 2.</_>\n        <_>\n          12 8 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 2 -1.</_>\n        <_>\n          6 7 1 1 2.</_>\n        <_>\n          7 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 2 3 -1.</_>\n        <_>\n          10 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 2 -1.</_>\n        <_>\n          8 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 12 -1.</_>\n        <_>\n          8 8 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 11 12 -1.</_>\n        <_>\n          4 4 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 11 -1.</_>\n        <_>\n          16 9 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 4 3 -1.</_>\n        <_>\n          0 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 3 -1.</_>\n        <_>\n          9 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 2 -1.</_>\n        <_>\n          5 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 3 -1.</_>\n        <_>\n          10 15 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 4 -1.</_>\n        <_>\n          9 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 3 -1.</_>\n        <_>\n          10 15 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 2 -1.</_>\n        <_>\n          8 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 4 -1.</_>\n        <_>\n          10 10 8 2 2.</_>\n        <_>\n          2 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 4 17 -1.</_>\n        <_>\n          4 3 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 7 -1.</_>\n        <_>\n          15 13 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 1 -1.</_>\n        <_>\n          5 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 4 -1.</_>\n        <_>\n          9 2 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          6 0 4 6 2.</_>\n        <_>\n          10 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 2 -1.</_>\n        <_>\n          14 7 1 1 2.</_>\n        <_>\n          13 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 6 -1.</_>\n        <_>\n          0 14 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 2 3 -1.</_>\n        <_>\n          14 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 12 -1.</_>\n        <_>\n          3 8 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 2 -1.</_>\n        <_>\n          3 0 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 3 -1.</_>\n        <_>\n          6 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 3 -1.</_>\n        <_>\n          8 16 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 1 6 -1.</_>\n        <_>\n          0 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 3 -1.</_>\n        <_>\n          10 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 2 3 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 1 -1.</_>\n        <_>\n          5 7 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 19 -1.</_>\n        <_>\n          10 0 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 6 -1.</_>\n        <_>\n          10 6 10 3 2.</_>\n        <_>\n          0 9 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 2 -1.</_>\n        <_>\n          3 6 1 1 2.</_>\n        <_>\n          4 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 2 -1.</_>\n        <_>\n          16 6 1 1 2.</_>\n        <_>\n          15 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 2 -1.</_>\n        <_>\n          3 6 1 1 2.</_>\n        <_>\n          4 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 1 12 -1.</_>\n        <_>\n          14 10 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 10 -1.</_>\n        <_>\n          2 5 8 5 2.</_>\n        <_>\n          10 10 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 2 2 -1.</_>\n        <_>\n          1 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 5 -1.</_>\n        <_>\n          10 0 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 5 -1.</_>\n        <_>\n          5 0 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 17 -1.</_>\n        <_>\n          11 2 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 17 -1.</_>\n        <_>\n          8 2 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 9 -1.</_>\n        <_>\n          15 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 2 9 -1.</_>\n        <_>\n          4 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 14 4 -1.</_>\n        <_>\n          5 16 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 1 -1.</_>\n        <_>\n          7 4 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 12 -1.</_>\n        <_>\n          9 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 6 -1.</_>\n        <_>\n          12 3 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 6 -1.</_>\n        <_>\n          5 2 3 3 2.</_>\n        <_>\n          8 5 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 4 -1.</_>\n        <_>\n          12 16 3 2 2.</_>\n        <_>\n          9 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 3 -1.</_>\n        <_>\n          7 2 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 9 10 -1.</_>\n        <_>\n          7 9 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 4 -1.</_>\n        <_>\n          7 9 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 6 -1.</_>\n        <_>\n          11 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 5 3 -1.</_>\n        <_>\n          7 12 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 6 6 -1.</_>\n        <_>\n          10 11 3 3 2.</_>\n        <_>\n          7 14 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 9 -1.</_>\n        <_>\n          0 3 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 1 6 -1.</_>\n        <_>\n          13 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 6 -1.</_>\n        <_>\n          0 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 1 6 -1.</_>\n        <_>\n          6 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 2 3 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 3 -1.</_>\n        <_>\n          7 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 11 3 -1.</_>\n        <_>\n          9 1 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 3 -1.</_>\n        <_>\n          0 7 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 1 2 -1.</_>\n        <_>\n          10 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 6 -1.</_>\n        <_>\n          10 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 1 -1.</_>\n        <_>\n          9 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 12 1 -1.</_>\n        <_>\n          7 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 5 -1.</_>\n        <_>\n          10 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 2 -1.</_>\n        <_>\n          6 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 1 -1.</_>\n        <_>\n          9 0 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 1 -1.</_>\n        <_>\n          8 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 9 13 -1.</_>\n        <_>\n          9 4 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 4 2 -1.</_>\n        <_>\n          6 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 6 -1.</_>\n        <_>\n          16 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 3 -1.</_>\n        <_>\n          0 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 10 -1.</_>\n        <_>\n          10 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 3 -1.</_>\n        <_>\n          10 4 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 8 -1.</_>\n        <_>\n          9 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 13 -1.</_>\n        <_>\n          9 6 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          6 0 4 6 2.</_>\n        <_>\n          10 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 8 -1.</_>\n        <_>\n          16 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 6 -1.</_>\n        <_>\n          7 0 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 8 -1.</_>\n        <_>\n          16 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 2 -1.</_>\n        <_>\n          12 12 3 1 2.</_>\n        <_>\n          9 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 2 -1.</_>\n        <_>\n          9 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 2 -1.</_>\n        <_>\n          12 6 1 1 2.</_>\n        <_>\n          11 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 2 -1.</_>\n        <_>\n          7 9 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 2 -1.</_>\n        <_>\n          12 6 1 1 2.</_>\n        <_>\n          11 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 12 8 -1.</_>\n        <_>\n          7 4 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 5 3 -1.</_>\n        <_>\n          13 12 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 3 -1.</_>\n        <_>\n          9 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 2 3 -1.</_>\n        <_>\n          14 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 1 3 -1.</_>\n        <_>\n          5 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 3 -1.</_>\n        <_>\n          13 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 3 -1.</_>\n        <_>\n          5 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 3 -1.</_>\n        <_>\n          9 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 2 2 -1.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 1 4 -1.</_>\n        <_>\n          15 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 2 -1.</_>\n        <_>\n          3 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 2 2 -1.</_>\n        <_>\n          13 15 1 1 2.</_>\n        <_>\n          12 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 2 -1.</_>\n        <_>\n          9 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 14 9 -1.</_>\n        <_>\n          4 14 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 4 3 -1.</_>\n        <_>\n          7 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 1 4 -1.</_>\n        <_>\n          15 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 1 4 -1.</_>\n        <_>\n          4 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 13 -1.</_>\n        <_>\n          16 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 12 -1.</_>\n        <_>\n          4 1 1 6 2.</_>\n        <_>\n          5 7 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 6 -1.</_>\n        <_>\n          14 14 3 3 2.</_>\n        <_>\n          11 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 6 6 -1.</_>\n        <_>\n          3 14 3 3 2.</_>\n        <_>\n          6 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 3 2 -1.</_>\n        <_>\n          14 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 3 2 -1.</_>\n        <_>\n          3 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 13 -1.</_>\n        <_>\n          16 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 13 -1.</_>\n        <_>\n          2 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 7 6 -1.</_>\n        <_>\n          10 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 2 2 -1.</_>\n        <_>\n          6 15 1 1 2.</_>\n        <_>\n          7 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 6 -1.</_>\n        <_>\n          10 11 4 3 2.</_>\n        <_>\n          6 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 2 2 -1.</_>\n        <_>\n          7 6 1 1 2.</_>\n        <_>\n          8 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 6 -1.</_>\n        <_>\n          10 2 8 3 2.</_>\n        <_>\n          2 5 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 10 -1.</_>\n        <_>\n          11 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 10 -1.</_>\n        <_>\n          6 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 2 -1.</_>\n        <_>\n          11 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 1 3 -1.</_>\n        <_>\n          10 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 4 18 -1.</_>\n        <_>\n          1 2 2 9 2.</_>\n        <_>\n          3 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 12 -1.</_>\n        <_>\n          12 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 6 -1.</_>\n        <_>\n          0 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 3 -1.</_>\n        <_>\n          8 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 2 -1.</_>\n        <_>\n          11 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 2 -1.</_>\n        <_>\n          8 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 1 -1.</_>\n        <_>\n          11 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 3 -1.</_>\n        <_>\n          9 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 8 6 -1.</_>\n        <_>\n          16 7 4 3 2.</_>\n        <_>\n          12 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 6 -1.</_>\n        <_>\n          0 7 4 3 2.</_>\n        <_>\n          4 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 10 -1.</_>\n        <_>\n          19 2 1 5 2.</_>\n        <_>\n          18 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 4 -1.</_>\n        <_>\n          3 2 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 1 -1.</_>\n        <_>\n          11 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 2 -1.</_>\n        <_>\n          7 15 1 1 2.</_>\n        <_>\n          8 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 1 6 -1.</_>\n        <_>\n          11 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 1 6 -1.</_>\n        <_>\n          8 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 2 1 -1.</_>\n        <_>\n          14 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 2 3 -1.</_>\n        <_>\n          8 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 7 4 -1.</_>\n        <_>\n          12 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 3 -1.</_>\n        <_>\n          4 15 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 3 2 -1.</_>\n        <_>\n          11 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 2 -1.</_>\n        <_>\n          4 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 4 6 -1.</_>\n        <_>\n          10 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 2 -1.</_>\n        <_>\n          7 13 1 1 2.</_>\n        <_>\n          8 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 14 4 -1.</_>\n        <_>\n          11 11 7 2 2.</_>\n        <_>\n          4 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 18 2 -1.</_>\n        <_>\n          7 18 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 2 2 -1.</_>\n        <_>\n          12 18 1 1 2.</_>\n        <_>\n          11 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 2 2 -1.</_>\n        <_>\n          7 18 1 1 2.</_>\n        <_>\n          8 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 8 2 -1.</_>\n        <_>\n          12 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 2 -1.</_>\n        <_>\n          7 15 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          10 12 2 4 2.</_>\n        <_>\n          8 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 3 -1.</_>\n        <_>\n          4 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 2 -1.</_>\n        <_>\n          9 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 15 -1.</_>\n        <_>\n          7 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 12 14 -1.</_>\n        <_>\n          12 6 4 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 3 -1.</_>\n        <_>\n          5 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 19 -1.</_>\n        <_>\n          12 1 4 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 2 -1.</_>\n        <_>\n          3 1 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 4 5 -1.</_>\n        <_>\n          10 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 5 -1.</_>\n        <_>\n          8 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 6 -1.</_>\n        <_>\n          0 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 10 -1.</_>\n        <_>\n          7 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 5 2 -1.</_>\n        <_>\n          2 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 2 -1.</_>\n        <_>\n          7 11 1 1 2.</_>\n        <_>\n          8 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 3 3 -1.</_>\n        <_>\n          14 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 3 -1.</_>\n        <_>\n          3 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          8 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 3 3 -1.</_>\n        <_>\n          13 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 3 -1.</_>\n        <_>\n          0 10 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 3 3 -1.</_>\n        <_>\n          13 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 8 -1.</_>\n        <_>\n          9 12 1 4 2.</_>\n        <_>\n          10 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 2 2 -1.</_>\n        <_>\n          12 7 1 1 2.</_>\n        <_>\n          11 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 6 4 -1.</_>\n        <_>\n          3 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 2 3 -1.</_>\n        <_>\n          10 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          9 7 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 8 4 -1.</_>\n        <_>\n          12 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          4 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 2 -1.</_>\n        <_>\n          10 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 4 2 -1.</_>\n        <_>\n          6 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 13 -1.</_>\n        <_>\n          13 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 13 -1.</_>\n        <_>\n          6 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 9 -1.</_>\n        <_>\n          9 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 7 12 -1.</_>\n        <_>\n          4 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 2 -1.</_>\n        <_>\n          13 12 1 1 2.</_>\n        <_>\n          12 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 2 -1.</_>\n        <_>\n          6 12 1 1 2.</_>\n        <_>\n          7 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 2 -1.</_>\n        <_>\n          10 9 2 1 2.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 2 -1.</_>\n        <_>\n          3 6 1 1 2.</_>\n        <_>\n          4 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 3 2 -1.</_>\n        <_>\n          16 7 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 19 4 -1.</_>\n        <_>\n          0 9 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 10 1 -1.</_>\n        <_>\n          10 2 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 12 -1.</_>\n        <_>\n          9 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 4 1 -1.</_>\n        <_>\n          12 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 4 -1.</_>\n        <_>\n          1 7 3 2 2.</_>\n        <_>\n          4 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 13 -1.</_>\n        <_>\n          14 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 13 -1.</_>\n        <_>\n          4 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 8 -1.</_>\n        <_>\n          10 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 2 5 -1.</_>\n        <_>\n          9 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 9 1 -1.</_>\n        <_>\n          11 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 9 1 -1.</_>\n        <_>\n          6 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 10 -1.</_>\n        <_>\n          7 0 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 5 3 -1.</_>\n        <_>\n          7 18 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 6 1 -1.</_>\n        <_>\n          9 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 3 2 -1.</_>\n        <_>\n          2 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 6 -1.</_>\n        <_>\n          6 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 2 4 -1.</_>\n        <_>\n          11 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 4 -1.</_>\n        <_>\n          8 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 4 -1.</_>\n        <_>\n          9 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 8 3 -1.</_>\n        <_>\n          6 14 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 4 -1.</_>\n        <_>\n          10 15 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 17 -1.</_>\n        <_>\n          10 2 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 1 -1.</_>\n        <_>\n          9 0 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 3 4 -1.</_>\n        <_>\n          9 15 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 7 3 -1.</_>\n        <_>\n          7 14 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 3 3 -1.</_>\n        <_>\n          9 16 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 10 -1.</_>\n        <_>\n          6 7 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 8 8 -1.</_>\n        <_>\n          2 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 2 2 -1.</_>\n        <_>\n          14 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 2 2 -1.</_>\n        <_>\n          4 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 4 6 -1.</_>\n        <_>\n          10 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 4 6 -1.</_>\n        <_>\n          6 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 3 -1.</_>\n        <_>\n          10 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 6 -1.</_>\n        <_>\n          12 0 2 3 2.</_>\n        <_>\n          10 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 2 -1.</_>\n        <_>\n          0 4 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 2 -1.</_>\n        <_>\n          16 0 4 1 2.</_>\n        <_>\n          12 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 10 8 -1.</_>\n        <_>\n          2 16 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 2 10 -1.</_>\n        <_>\n          18 7 1 5 2.</_>\n        <_>\n          17 12 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 2 10 -1.</_>\n        <_>\n          1 7 1 5 2.</_>\n        <_>\n          2 12 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 3 6 -1.</_>\n        <_>\n          15 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 2 -1.</_>\n        <_>\n          6 4 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 6 -1.</_>\n        <_>\n          0 7 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 2 -1.</_>\n        <_>\n          0 0 4 1 2.</_>\n        <_>\n          4 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 6 2 -1.</_>\n        <_>\n          1 14 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 4 -1.</_>\n        <_>\n          11 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 1 -1.</_>\n        <_>\n          8 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 2 -1.</_>\n        <_>\n          10 6 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 2 -1.</_>\n        <_>\n          15 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 1 2 -1.</_>\n        <_>\n          6 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 3 -1.</_>\n        <_>\n          13 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 1 2 -1.</_>\n        <_>\n          2 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 3 -1.</_>\n        <_>\n          12 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 3 -1.</_>\n        <_>\n          0 1 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 2 -1.</_>\n        <_>\n          9 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 3 -1.</_>\n        <_>\n          5 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 3 -1.</_>\n        <_>\n          18 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 6 -1.</_>\n        <_>\n          3 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 6 -1.</_>\n        <_>\n          10 2 10 3 2.</_>\n        <_>\n          0 5 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 4 -1.</_>\n        <_>\n          5 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 15 2 -1.</_>\n        <_>\n          8 10 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 11 -1.</_>\n        <_>\n          9 0 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 6 -1.</_>\n        <_>\n          13 0 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 2 1 -1.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 10 -1.</_>\n        <_>\n          18 10 2 5 2.</_>\n        <_>\n          16 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 10 3 -1.</_>\n        <_>\n          4 9 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 3 3 -1.</_>\n        <_>\n          14 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 4 10 -1.</_>\n        <_>\n          0 10 2 5 2.</_>\n        <_>\n          2 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 6 -1.</_>\n        <_>\n          18 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 3 -1.</_>\n        <_>\n          6 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 7 2 -1.</_>\n        <_>\n          7 8 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 6 -1.</_>\n        <_>\n          0 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 1 -1.</_>\n        <_>\n          12 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 6 -1.</_>\n        <_>\n          6 0 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 14 -1.</_>\n        <_>\n          7 1 6 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 8 3 -1.</_>\n        <_>\n          8 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 2 -1.</_>\n        <_>\n          9 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 2 -1.</_>\n        <_>\n          8 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 5 -1.</_>\n        <_>\n          11 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 5 -1.</_>\n        <_>\n          8 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 10 -1.</_>\n        <_>\n          14 0 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 2 -1.</_>\n        <_>\n          4 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 6 -1.</_>\n        <_>\n          18 3 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 10 -1.</_>\n        <_>\n          1 13 18 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 10 -1.</_>\n        <_>\n          14 0 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 7 -1.</_>\n        <_>\n          17 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 10 -1.</_>\n        <_>\n          5 0 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 7 -1.</_>\n        <_>\n          17 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 1 2 -1.</_>\n        <_>\n          0 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 10 -1.</_>\n        <_>\n          18 1 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 10 -1.</_>\n        <_>\n          1 1 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 3 4 -1.</_>\n        <_>\n          11 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 3 3 -1.</_>\n        <_>\n          3 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 6 -1.</_>\n        <_>\n          12 0 1 3 2.</_>\n        <_>\n          11 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 6 -1.</_>\n        <_>\n          7 0 1 3 2.</_>\n        <_>\n          8 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 7 -1.</_>\n        <_>\n          17 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 3 7 -1.</_>\n        <_>\n          2 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 16 -1.</_>\n        <_>\n          16 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 16 -1.</_>\n        <_>\n          2 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 8 -1.</_>\n        <_>\n          10 0 8 4 2.</_>\n        <_>\n          2 4 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 5 3 -1.</_>\n        <_>\n          6 9 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 4 -1.</_>\n        <_>\n          9 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 15 1 -1.</_>\n        <_>\n          5 7 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 7 9 -1.</_>\n        <_>\n          8 5 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 16 4 -1.</_>\n        <_>\n          1 7 8 2 2.</_>\n        <_>\n          9 9 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 8 2 -1.</_>\n        <_>\n          6 13 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 3 -1.</_>\n        <_>\n          8 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 14 10 -1.</_>\n        <_>\n          11 5 7 5 2.</_>\n        <_>\n          4 10 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 3 2 -1.</_>\n        <_>\n          4 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 1 -1.</_>\n        <_>\n          11 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 7 6 -1.</_>\n        <_>\n          4 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 3 -1.</_>\n        <_>\n          7 11 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 2 -1.</_>\n        <_>\n          9 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 6 -1.</_>\n        <_>\n          0 7 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 1 -1.</_>\n        <_>\n          8 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 1 -1.</_>\n        <_>\n          11 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 3 4 -1.</_>\n        <_>\n          11 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 8 -1.</_>\n        <_>\n          2 16 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 15 2 -1.</_>\n        <_>\n          0 16 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 6 -1.</_>\n        <_>\n          15 6 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 4 -1.</_>\n        <_>\n          10 5 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 9 6 -1.</_>\n        <_>\n          8 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 15 1 -1.</_>\n        <_>\n          7 19 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 3 4 -1.</_>\n        <_>\n          11 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 4 -1.</_>\n        <_>\n          0 17 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 3 4 -1.</_>\n        <_>\n          11 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 3 4 -1.</_>\n        <_>\n          8 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 3 -1.</_>\n        <_>\n          9 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 6 -1.</_>\n        <_>\n          8 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 12 -1.</_>\n        <_>\n          9 10 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 4 3 -1.</_>\n        <_>\n          8 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 8 2 -1.</_>\n        <_>\n          13 18 4 1 2.</_>\n        <_>\n          9 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 8 2 -1.</_>\n        <_>\n          1 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 15 -1.</_>\n        <_>\n          15 5 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 2 -1.</_>\n        <_>\n          9 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 3 -1.</_>\n        <_>\n          9 5 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 15 -1.</_>\n        <_>\n          3 5 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 8 -1.</_>\n        <_>\n          11 1 7 4 2.</_>\n        <_>\n          4 5 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 4 16 -1.</_>\n        <_>\n          2 4 2 8 2.</_>\n        <_>\n          4 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 12 -1.</_>\n        <_>\n          12 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 12 -1.</_>\n        <_>\n          4 5 5 6 2.</_>\n        <_>\n          9 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 3 -1.</_>\n        <_>\n          5 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 10 -1.</_>\n        <_>\n          14 2 2 5 2.</_>\n        <_>\n          12 7 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 7 3 -1.</_>\n        <_>\n          6 5 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 2 -1.</_>\n        <_>\n          11 0 9 1 2.</_>\n        <_>\n          2 1 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 2 -1.</_>\n        <_>\n          0 0 9 1 2.</_>\n        <_>\n          9 1 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 4 6 -1.</_>\n        <_>\n          15 13 2 3 2.</_>\n        <_>\n          13 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 6 -1.</_>\n        <_>\n          3 13 2 3 2.</_>\n        <_>\n          5 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 6 -1.</_>\n        <_>\n          10 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 10 -1.</_>\n        <_>\n          5 9 5 5 2.</_>\n        <_>\n          10 14 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 2 -1.</_>\n        <_>\n          13 4 2 1 2.</_>\n        <_>\n          11 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 8 -1.</_>\n        <_>\n          10 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 10 -1.</_>\n        <_>\n          14 2 2 5 2.</_>\n        <_>\n          12 7 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 2 1 -1.</_>\n        <_>\n          9 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 1 12 -1.</_>\n        <_>\n          10 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 9 -1.</_>\n        <_>\n          3 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 10 -1.</_>\n        <_>\n          14 2 2 5 2.</_>\n        <_>\n          12 7 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 10 -1.</_>\n        <_>\n          4 2 2 5 2.</_>\n        <_>\n          6 7 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 2 -1.</_>\n        <_>\n          13 4 2 1 2.</_>\n        <_>\n          11 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 6 3 -1.</_>\n        <_>\n          0 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 2 -1.</_>\n        <_>\n          13 4 2 1 2.</_>\n        <_>\n          11 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 2 -1.</_>\n        <_>\n          7 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 2 -1.</_>\n        <_>\n          13 4 2 1 2.</_>\n        <_>\n          11 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 2 -1.</_>\n        <_>\n          5 4 2 1 2.</_>\n        <_>\n          7 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 12 -1.</_>\n        <_>\n          14 0 1 6 2.</_>\n        <_>\n          13 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 10 -1.</_>\n        <_>\n          7 0 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 8 -1.</_>\n        <_>\n          3 4 17 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 4 -1.</_>\n        <_>\n          0 6 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 8 2 -1.</_>\n        <_>\n          4 3 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 3 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 4 -1.</_>\n        <_>\n          5 7 3 2 2.</_>\n        <_>\n          8 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 9 -1.</_>\n        <_>\n          8 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 1 4 -1.</_>\n        <_>\n          8 17 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 7 -1.</_>\n        <_>\n          8 5 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 10 -1.</_>\n        <_>\n          4 2 2 5 2.</_>\n        <_>\n          6 7 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 2 -1.</_>\n        <_>\n          3 1 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 15 -1.</_>\n        <_>\n          2 7 16 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 2 -1.</_>\n        <_>\n          15 3 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 2 -1.</_>\n        <_>\n          10 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 15 -1.</_>\n        <_>\n          4 10 16 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 5 6 -1.</_>\n        <_>\n          7 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 2 -1.</_>\n        <_>\n          11 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 1 -1.</_>\n        <_>\n          9 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 3 -1.</_>\n        <_>\n          9 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 2 -1.</_>\n        <_>\n          0 3 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 1 -1.</_>\n        <_>\n          5 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 14 -1.</_>\n        <_>\n          7 12 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 10 -1.</_>\n        <_>\n          0 0 4 5 2.</_>\n        <_>\n          4 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 2 -1.</_>\n        <_>\n          10 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 2 -1.</_>\n        <_>\n          9 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 16 -1.</_>\n        <_>\n          7 12 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 2 6 -1.</_>\n        <_>\n          2 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          5 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 6 -1.</_>\n        <_>\n          13 13 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 2 6 -1.</_>\n        <_>\n          3 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 2 -1.</_>\n        <_>\n          14 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 16 2 -1.</_>\n        <_>\n          0 9 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 2 -1.</_>\n        <_>\n          14 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 6 -1.</_>\n        <_>\n          0 2 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 6 -1.</_>\n        <_>\n          4 13 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 1 3 -1.</_>\n        <_>\n          9 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 12 -1.</_>\n        <_>\n          6 12 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 9 2 -1.</_>\n        <_>\n          8 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 3 -1.</_>\n        <_>\n          4 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 2 -1.</_>\n        <_>\n          9 6 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 1 3 -1.</_>\n        <_>\n          4 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 6 -1.</_>\n        <_>\n          14 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 7 -1.</_>\n        <_>\n          8 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 3 -1.</_>\n        <_>\n          10 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 3 -1.</_>\n        <_>\n          9 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 11 3 -1.</_>\n        <_>\n          5 11 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 1 -1.</_>\n        <_>\n          10 7 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 2 -1.</_>\n        <_>\n          10 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 2 -1.</_>\n        <_>\n          9 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 2 -1.</_>\n        <_>\n          11 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 2 -1.</_>\n        <_>\n          7 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 4 -1.</_>\n        <_>\n          14 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 2 -1.</_>\n        <_>\n          8 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 6 3 -1.</_>\n        <_>\n          14 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 12 -1.</_>\n        <_>\n          4 5 6 6 2.</_>\n        <_>\n          10 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          10 9 4 4 2.</_>\n        <_>\n          6 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 15 4 -1.</_>\n        <_>\n          5 4 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 1 -1.</_>\n        <_>\n          13 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 2 -1.</_>\n        <_>\n          4 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 3 -1.</_>\n        <_>\n          9 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 3 -1.</_>\n        <_>\n          13 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 4 -1.</_>\n        <_>\n          7 12 2 2 2.</_>\n        <_>\n          9 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 2 2 -1.</_>\n        <_>\n          11 11 1 1 2.</_>\n        <_>\n          10 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 2 -1.</_>\n        <_>\n          9 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 2 2 -1.</_>\n        <_>\n          11 11 1 1 2.</_>\n        <_>\n          10 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 3 -1.</_>\n        <_>\n          0 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 2 2 -1.</_>\n        <_>\n          11 11 1 1 2.</_>\n        <_>\n          10 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 2 2 -1.</_>\n        <_>\n          8 11 1 1 2.</_>\n        <_>\n          9 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 8 4 -1.</_>\n        <_>\n          12 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 4 -1.</_>\n        <_>\n          4 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 1 -1.</_>\n        <_>\n          13 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 1 -1.</_>\n        <_>\n          5 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 2 -1.</_>\n        <_>\n          12 0 2 1 2.</_>\n        <_>\n          10 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 3 1 -1.</_>\n        <_>\n          8 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 8 -1.</_>\n        <_>\n          10 11 2 4 2.</_>\n        <_>\n          8 15 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 15 2 -1.</_>\n        <_>\n          3 19 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 2 12 -1.</_>\n        <_>\n          2 6 1 6 2.</_>\n        <_>\n          3 12 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 3 -1.</_>\n        <_>\n          9 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 2 -1.</_>\n        <_>\n          8 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 3 1 -1.</_>\n        <_>\n          12 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 1 -1.</_>\n        <_>\n          7 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 2 -1.</_>\n        <_>\n          11 2 2 1 2.</_>\n        <_>\n          9 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 3 -1.</_>\n        <_>\n          4 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 3 -1.</_>\n        <_>\n          8 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 14 -1.</_>\n        <_>\n          7 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 12 3 -1.</_>\n        <_>\n          8 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          7 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 6 -1.</_>\n        <_>\n          9 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 1 8 -1.</_>\n        <_>\n          9 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 12 -1.</_>\n        <_>\n          9 10 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 8 -1.</_>\n        <_>\n          2 1 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 2 -1.</_>\n        <_>\n          12 1 3 1 2.</_>\n        <_>\n          9 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 14 -1.</_>\n        <_>\n          1 10 12 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          10 12 2 1 2.</_>\n        <_>\n          8 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 10 2 -1.</_>\n        <_>\n          1 9 5 1 2.</_>\n        <_>\n          6 10 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 3 -1.</_>\n        <_>\n          6 9 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 5 3 -1.</_>\n        <_>\n          9 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 3 -1.</_>\n        <_>\n          8 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 2 -1.</_>\n        <_>\n          7 8 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 2 -1.</_>\n        <_>\n          5 7 4 1 2.</_>\n        <_>\n          9 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 2 -1.</_>\n        <_>\n          4 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 3 -1.</_>\n        <_>\n          5 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 6 -1.</_>\n        <_>\n          18 3 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 6 -1.</_>\n        <_>\n          1 3 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 14 1 2 -1.</_>\n        <_>\n          17 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 3 -1.</_>\n        <_>\n          6 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          12 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 3 -1.</_>\n        <_>\n          5 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 8 -1.</_>\n        <_>\n          12 5 3 4 2.</_>\n        <_>\n          9 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 8 -1.</_>\n        <_>\n          5 5 3 4 2.</_>\n        <_>\n          8 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 6 -1.</_>\n        <_>\n          16 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 20 -1.</_>\n        <_>\n          3 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 3 2 -1.</_>\n        <_>\n          13 11 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 2 -1.</_>\n        <_>\n          6 11 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 1 -1.</_>\n        <_>\n          11 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 3 -1.</_>\n        <_>\n          4 0 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 5 -1.</_>\n        <_>\n          15 0 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 2 -1.</_>\n        <_>\n          5 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 15 -1.</_>\n        <_>\n          9 0 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 1 -1.</_>\n        <_>\n          7 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 4 -1.</_>\n        <_>\n          13 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 1 -1.</_>\n        <_>\n          7 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 2 -1.</_>\n        <_>\n          12 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 6 -1.</_>\n        <_>\n          0 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 2 -1.</_>\n        <_>\n          12 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 3 3 -1.</_>\n        <_>\n          2 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 10 -1.</_>\n        <_>\n          16 8 3 5 2.</_>\n        <_>\n          13 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 2 -1.</_>\n        <_>\n          0 10 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 2 -1.</_>\n        <_>\n          13 11 1 1 2.</_>\n        <_>\n          12 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 3 3 -1.</_>\n        <_>\n          3 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 2 -1.</_>\n        <_>\n          12 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 2 -1.</_>\n        <_>\n          5 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 9 -1.</_>\n        <_>\n          9 8 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 7 -1.</_>\n        <_>\n          6 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 5 -1.</_>\n        <_>\n          9 2 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 2 -1.</_>\n        <_>\n          6 11 1 1 2.</_>\n        <_>\n          7 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 3 2 -1.</_>\n        <_>\n          15 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 3 2 -1.</_>\n        <_>\n          2 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 8 -1.</_>\n        <_>\n          17 12 3 4 2.</_>\n        <_>\n          14 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 15 6 -1.</_>\n        <_>\n          7 8 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 17 -1.</_>\n        <_>\n          8 2 6 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 1 -1.</_>\n        <_>\n          7 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 5 -1.</_>\n        <_>\n          9 2 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 5 -1.</_>\n        <_>\n          7 2 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 4 -1.</_>\n        <_>\n          10 9 6 2 2.</_>\n        <_>\n          4 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 6 2 -1.</_>\n        <_>\n          5 15 3 1 2.</_>\n        <_>\n          8 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 3 -1.</_>\n        <_>\n          10 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 2 -1.</_>\n        <_>\n          0 13 10 1 2.</_>\n        <_>\n          10 14 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 8 -1.</_>\n        <_>\n          10 9 6 4 2.</_>\n        <_>\n          4 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 6 -1.</_>\n        <_>\n          8 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 2 -1.</_>\n        <_>\n          10 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 2 -1.</_>\n        <_>\n          9 12 1 1 2.</_>\n        <_>\n          10 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 14 4 -1.</_>\n        <_>\n          11 11 7 2 2.</_>\n        <_>\n          4 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 2 -1.</_>\n        <_>\n          8 6 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 3 -1.</_>\n        <_>\n          12 10 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 1 2 -1.</_>\n        <_>\n          2 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 12 -1.</_>\n        <_>\n          16 8 3 6 2.</_>\n        <_>\n          13 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 12 -1.</_>\n        <_>\n          1 8 3 6 2.</_>\n        <_>\n          4 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 10 -1.</_>\n        <_>\n          12 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 8 4 -1.</_>\n        <_>\n          5 11 4 2 2.</_>\n        <_>\n          9 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 8 4 -1.</_>\n        <_>\n          14 16 4 2 2.</_>\n        <_>\n          10 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 6 -1.</_>\n        <_>\n          9 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 10 -1.</_>\n        <_>\n          10 2 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 9 -1.</_>\n        <_>\n          8 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 19 2 1 -1.</_>\n        <_>\n          12 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 4 9 -1.</_>\n        <_>\n          3 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 4 -1.</_>\n        <_>\n          9 5 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 4 -1.</_>\n        <_>\n          9 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 2 8 -1.</_>\n        <_>\n          14 9 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 5 12 -1.</_>\n        <_>\n          7 12 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 2 6 -1.</_>\n        <_>\n          14 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 6 -1.</_>\n        <_>\n          4 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 10 4 -1.</_>\n        <_>\n          13 15 5 2 2.</_>\n        <_>\n          8 17 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 2 2 -1.</_>\n        <_>\n          7 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 2 -1.</_>\n        <_>\n          11 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 6 -1.</_>\n        <_>\n          2 2 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 2 -1.</_>\n        <_>\n          11 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 10 3 -1.</_>\n        <_>\n          4 12 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 2 -1.</_>\n        <_>\n          11 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 2 -1.</_>\n        <_>\n          3 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          16 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 3 -1.</_>\n        <_>\n          9 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 2 -1.</_>\n        <_>\n          6 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 3 -1.</_>\n        <_>\n          15 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          5 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 2 2 -1.</_>\n        <_>\n          10 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 4 3 -1.</_>\n        <_>\n          5 1 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          16 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 1 -1.</_>\n        <_>\n          10 0 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 3 -1.</_>\n        <_>\n          15 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 4 -1.</_>\n        <_>\n          1 4 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 6 -1.</_>\n        <_>\n          16 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 3 6 -1.</_>\n        <_>\n          1 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 6 -1.</_>\n        <_>\n          12 2 6 3 2.</_>\n        <_>\n          6 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 3 -1.</_>\n        <_>\n          8 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 14 6 -1.</_>\n        <_>\n          11 2 7 3 2.</_>\n        <_>\n          4 5 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 3 -1.</_>\n        <_>\n          15 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 3 -1.</_>\n        <_>\n          8 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 3 -1.</_>\n        <_>\n          15 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 5 2 -1.</_>\n        <_>\n          7 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 3 -1.</_>\n        <_>\n          7 13 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 4 -1.</_>\n        <_>\n          5 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 3 -1.</_>\n        <_>\n          12 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 3 -1.</_>\n        <_>\n          7 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 6 -1.</_>\n        <_>\n          17 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 7 -1.</_>\n        <_>\n          7 6 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 6 -1.</_>\n        <_>\n          17 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 3 -1.</_>\n        <_>\n          3 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 6 -1.</_>\n        <_>\n          17 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 3 6 -1.</_>\n        <_>\n          2 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 1 -1.</_>\n        <_>\n          7 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 8 7 -1.</_>\n        <_>\n          4 9 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 2 -1.</_>\n        <_>\n          12 12 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 2 -1.</_>\n        <_>\n          0 12 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 3 -1.</_>\n        <_>\n          9 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 4 -1.</_>\n        <_>\n          4 10 6 2 2.</_>\n        <_>\n          10 12 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 3 7 -1.</_>\n        <_>\n          10 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 5 -1.</_>\n        <_>\n          8 2 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 4 6 -1.</_>\n        <_>\n          11 12 2 3 2.</_>\n        <_>\n          9 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 6 -1.</_>\n        <_>\n          9 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 2 -1.</_>\n        <_>\n          15 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 4 -1.</_>\n        <_>\n          14 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 1 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 3 -1.</_>\n        <_>\n          15 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 10 -1.</_>\n        <_>\n          9 7 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 6 -1.</_>\n        <_>\n          11 12 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 1 -1.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 2 2 -1.</_>\n        <_>\n          10 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 2 2 -1.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 2 -1.</_>\n        <_>\n          13 7 1 1 2.</_>\n        <_>\n          12 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 2 -1.</_>\n        <_>\n          5 7 1 1 2.</_>\n        <_>\n          6 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 14 -1.</_>\n        <_>\n          14 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 14 -1.</_>\n        <_>\n          5 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 14 -1.</_>\n        <_>\n          14 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 3 16 -1.</_>\n        <_>\n          5 2 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 10 -1.</_>\n        <_>\n          7 7 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 7 3 -1.</_>\n        <_>\n          6 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 10 12 -1.</_>\n        <_>\n          14 2 5 6 2.</_>\n        <_>\n          9 8 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 2 -1.</_>\n        <_>\n          6 8 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          8 16 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 3 -1.</_>\n        <_>\n          6 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 6 -1.</_>\n        <_>\n          16 4 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 2 -1.</_>\n        <_>\n          6 6 2 1 2.</_>\n        <_>\n          8 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 6 -1.</_>\n        <_>\n          16 4 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 6 -1.</_>\n        <_>\n          0 4 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 6 -1.</_>\n        <_>\n          9 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 10 -1.</_>\n        <_>\n          3 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          9 5 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 3 -1.</_>\n        <_>\n          3 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 3 2 -1.</_>\n        <_>\n          13 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 10 4 -1.</_>\n        <_>\n          2 16 5 2 2.</_>\n        <_>\n          7 18 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 6 -1.</_>\n        <_>\n          10 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 1 3 -1.</_>\n        <_>\n          7 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 6 3 -1.</_>\n        <_>\n          14 17 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 10 3 -1.</_>\n        <_>\n          7 5 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 5 4 -1.</_>\n        <_>\n          0 6 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 9 -1.</_>\n        <_>\n          13 14 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 9 -1.</_>\n        <_>\n          4 14 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 1 -1.</_>\n        <_>\n          9 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 17 -1.</_>\n        <_>\n          7 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 3 -1.</_>\n        <_>\n          10 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 4 -1.</_>\n        <_>\n          7 2 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 2 -1.</_>\n        <_>\n          12 2 4 1 2.</_>\n        <_>\n          8 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 6 -1.</_>\n        <_>\n          8 3 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 2 2 -1.</_>\n        <_>\n          9 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 14 -1.</_>\n        <_>\n          1 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 7 3 -1.</_>\n        <_>\n          12 1 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 1 2 -1.</_>\n        <_>\n          1 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 8 -1.</_>\n        <_>\n          15 12 1 4 2.</_>\n        <_>\n          14 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 7 3 -1.</_>\n        <_>\n          1 1 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 8 -1.</_>\n        <_>\n          15 12 1 4 2.</_>\n        <_>\n          14 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          6 0 4 6 2.</_>\n        <_>\n          10 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 9 -1.</_>\n        <_>\n          6 4 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 2 2 -1.</_>\n        <_>\n          5 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 6 6 -1.</_>\n        <_>\n          16 14 3 3 2.</_>\n        <_>\n          13 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 20 2 -1.</_>\n        <_>\n          0 17 10 1 2.</_>\n        <_>\n          10 18 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 2 6 -1.</_>\n        <_>\n          11 3 1 3 2.</_>\n        <_>\n          10 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 2 -1.</_>\n        <_>\n          8 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 13 -1.</_>\n        <_>\n          10 7 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 10 5 -1.</_>\n        <_>\n          10 15 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 10 -1.</_>\n        <_>\n          10 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 1 -1.</_>\n        <_>\n          6 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 7 -1.</_>\n        <_>\n          10 3 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 7 -1.</_>\n        <_>\n          7 3 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 5 -1.</_>\n        <_>\n          7 7 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 4 3 -1.</_>\n        <_>\n          5 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 12 6 -1.</_>\n        <_>\n          14 14 6 3 2.</_>\n        <_>\n          8 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 4 -1.</_>\n        <_>\n          0 13 10 2 2.</_>\n        <_>\n          10 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 14 2 -1.</_>\n        <_>\n          11 5 7 1 2.</_>\n        <_>\n          4 6 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 10 12 -1.</_>\n        <_>\n          1 2 5 6 2.</_>\n        <_>\n          6 8 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 14 3 -1.</_>\n        <_>\n          6 2 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 2 3 -1.</_>\n        <_>\n          8 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 4 2 -1.</_>\n        <_>\n          5 15 2 1 2.</_>\n        <_>\n          7 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 1 3 -1.</_>\n        <_>\n          10 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 4 4 -1.</_>\n        <_>\n          8 16 2 2 2.</_>\n        <_>\n          10 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 6 -1.</_>\n        <_>\n          6 14 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 5 2 -1.</_>\n        <_>\n          2 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 6 6 -1.</_>\n        <_>\n          16 14 3 3 2.</_>\n        <_>\n          13 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 4 -1.</_>\n        <_>\n          7 9 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 6 6 -1.</_>\n        <_>\n          16 14 3 3 2.</_>\n        <_>\n          13 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 6 -1.</_>\n        <_>\n          0 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 20 -1.</_>\n        <_>\n          5 10 15 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 6 -1.</_>\n        <_>\n          1 14 3 3 2.</_>\n        <_>\n          4 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 6 -1.</_>\n        <_>\n          10 14 2 3 2.</_>\n        <_>\n          8 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 1 -1.</_>\n        <_>\n          8 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 2 -1.</_>\n        <_>\n          9 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 4 6 -1.</_>\n        <_>\n          14 14 2 3 2.</_>\n        <_>\n          12 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 4 6 -1.</_>\n        <_>\n          4 14 2 3 2.</_>\n        <_>\n          6 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 2 6 -1.</_>\n        <_>\n          14 14 1 3 2.</_>\n        <_>\n          13 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 2 6 -1.</_>\n        <_>\n          5 14 1 3 2.</_>\n        <_>\n          6 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 12 -1.</_>\n        <_>\n          7 4 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 2 -1.</_>\n        <_>\n          4 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 3 13 -1.</_>\n        <_>\n          11 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 13 -1.</_>\n        <_>\n          8 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 3 -1.</_>\n        <_>\n          10 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 2 -1.</_>\n        <_>\n          4 11 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 8 -1.</_>\n        <_>\n          16 12 3 4 2.</_>\n        <_>\n          13 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 5 -1.</_>\n        <_>\n          9 6 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 2 7 -1.</_>\n        <_>\n          17 11 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 8 2 -1.</_>\n        <_>\n          7 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 3 -1.</_>\n        <_>\n          6 10 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 4 3 -1.</_>\n        <_>\n          4 4 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 4 3 -1.</_>\n        <_>\n          11 4 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 17 12 -1.</_>\n        <_>\n          1 8 17 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 4 3 -1.</_>\n        <_>\n          11 4 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 3 -1.</_>\n        <_>\n          4 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 5 3 -1.</_>\n        <_>\n          12 4 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 2 7 -1.</_>\n        <_>\n          2 11 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 8 -1.</_>\n        <_>\n          16 12 1 4 2.</_>\n        <_>\n          15 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 11 3 -1.</_>\n        <_>\n          4 9 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 2 -1.</_>\n        <_>\n          12 13 3 1 2.</_>\n        <_>\n          9 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 4 3 -1.</_>\n        <_>\n          6 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          10 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 3 -1.</_>\n        <_>\n          5 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 3 -1.</_>\n        <_>\n          9 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 16 3 -1.</_>\n        <_>\n          0 3 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 8 -1.</_>\n        <_>\n          16 12 1 4 2.</_>\n        <_>\n          15 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 8 -1.</_>\n        <_>\n          3 12 1 4 2.</_>\n        <_>\n          4 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 3 6 -1.</_>\n        <_>\n          14 15 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 6 -1.</_>\n        <_>\n          3 15 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 10 2 -1.</_>\n        <_>\n          11 5 5 1 2.</_>\n        <_>\n          6 6 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 14 6 -1.</_>\n        <_>\n          2 17 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 3 -1.</_>\n        <_>\n          10 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 2 2 -1.</_>\n        <_>\n          4 16 1 1 2.</_>\n        <_>\n          5 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 2 3 -1.</_>\n        <_>\n          10 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 20 2 -1.</_>\n        <_>\n          0 17 10 1 2.</_>\n        <_>\n          10 18 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 1 3 -1.</_>\n        <_>\n          13 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 2 -1.</_>\n        <_>\n          9 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 3 3 -1.</_>\n        <_>\n          13 2 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 2 2 -1.</_>\n        <_>\n          3 18 1 1 2.</_>\n        <_>\n          4 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 4 -1.</_>\n        <_>\n          10 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 3 -1.</_>\n        <_>\n          6 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 5 2 -1.</_>\n        <_>\n          13 2 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 2 -1.</_>\n        <_>\n          7 14 3 1 2.</_>\n        <_>\n          10 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 4 -1.</_>\n        <_>\n          12 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 12 6 -1.</_>\n        <_>\n          5 13 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 5 2 -1.</_>\n        <_>\n          14 12 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 14 4 -1.</_>\n        <_>\n          2 15 7 2 2.</_>\n        <_>\n          9 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 2 -1.</_>\n        <_>\n          10 7 7 1 2.</_>\n        <_>\n          3 8 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 4 2 -1.</_>\n        <_>\n          1 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 14 -1.</_>\n        <_>\n          16 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 1 3 -1.</_>\n        <_>\n          4 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 14 -1.</_>\n        <_>\n          16 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 3 7 -1.</_>\n        <_>\n          2 10 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 9 2 -1.</_>\n        <_>\n          8 13 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 1 -1.</_>\n        <_>\n          10 6 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 4 -1.</_>\n        <_>\n          8 4 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 2 -1.</_>\n        <_>\n          0 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 9 -1.</_>\n        <_>\n          5 6 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 10 -1.</_>\n        <_>\n          15 2 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 2 7 -1.</_>\n        <_>\n          9 2 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 12 1 -1.</_>\n        <_>\n          11 4 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 9 1 -1.</_>\n        <_>\n          6 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 1 4 -1.</_>\n        <_>\n          15 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 4 -1.</_>\n        <_>\n          7 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 1 6 -1.</_>\n        <_>\n          15 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 6 3 -1.</_>\n        <_>\n          7 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 2 16 -1.</_>\n        <_>\n          15 3 1 8 2.</_>\n        <_>\n          14 11 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 1 6 -1.</_>\n        <_>\n          4 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 5 2 -1.</_>\n        <_>\n          12 2 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 4 2 -1.</_>\n        <_>\n          6 18 2 1 2.</_>\n        <_>\n          8 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 16 10 -1.</_>\n        <_>\n          10 4 8 5 2.</_>\n        <_>\n          2 9 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 1 10 -1.</_>\n        <_>\n          6 10 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 15 2 -1.</_>\n        <_>\n          9 8 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 2 -1.</_>\n        <_>\n          6 8 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 6 -1.</_>\n        <_>\n          9 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 2 -1.</_>\n        <_>\n          9 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 3 -1.</_>\n        <_>\n          1 1 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 7 2 -1.</_>\n        <_>\n          11 3 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 18 -1.</_>\n        <_>\n          5 7 10 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 2 -1.</_>\n        <_>\n          18 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 1 3 -1.</_>\n        <_>\n          8 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 6 -1.</_>\n        <_>\n          3 16 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 4 -1.</_>\n        <_>\n          1 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 5 2 -1.</_>\n        <_>\n          12 2 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 5 2 -1.</_>\n        <_>\n          3 2 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 3 -1.</_>\n        <_>\n          10 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 2 3 -1.</_>\n        <_>\n          8 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 3 -1.</_>\n        <_>\n          14 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 3 -1.</_>\n        <_>\n          7 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 4 -1.</_>\n        <_>\n          10 6 5 2 2.</_>\n        <_>\n          5 8 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 1 6 -1.</_>\n        <_>\n          9 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 2 -1.</_>\n        <_>\n          11 12 1 1 2.</_>\n        <_>\n          10 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 3 -1.</_>\n        <_>\n          4 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 6 -1.</_>\n        <_>\n          14 6 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 2 3 -1.</_>\n        <_>\n          8 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 6 -1.</_>\n        <_>\n          16 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 6 -1.</_>\n        <_>\n          0 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 2 3 -1.</_>\n        <_>\n          14 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 8 1 -1.</_>\n        <_>\n          8 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 3 -1.</_>\n        <_>\n          8 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 10 6 -1.</_>\n        <_>\n          5 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 2 -1.</_>\n        <_>\n          8 16 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          10 9 4 4 2.</_>\n        <_>\n          6 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 6 -1.</_>\n        <_>\n          7 12 2 3 2.</_>\n        <_>\n          9 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 3 1 -1.</_>\n        <_>\n          11 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 10 -1.</_>\n        <_>\n          9 7 1 5 2.</_>\n        <_>\n          10 12 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 6 -1.</_>\n        <_>\n          10 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 2 6 -1.</_>\n        <_>\n          3 13 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 1 2 -1.</_>\n        <_>\n          16 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 6 -1.</_>\n        <_>\n          1 14 3 3 2.</_>\n        <_>\n          4 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 6 -1.</_>\n        <_>\n          14 1 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 2 2 -1.</_>\n        <_>\n          8 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 3 -1.</_>\n        <_>\n          10 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          8 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 3 -1.</_>\n        <_>\n          14 0 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 9 -1.</_>\n        <_>\n          7 0 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 15 -1.</_>\n        <_>\n          11 5 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 15 -1.</_>\n        <_>\n          7 5 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 3 -1.</_>\n        <_>\n          14 0 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 3 -1.</_>\n        <_>\n          5 0 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 2 -1.</_>\n        <_>\n          12 12 1 1 2.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 2 2 -1.</_>\n        <_>\n          7 12 1 1 2.</_>\n        <_>\n          8 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 4 -1.</_>\n        <_>\n          13 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 3 -1.</_>\n        <_>\n          4 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 2 -1.</_>\n        <_>\n          12 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 2 -1.</_>\n        <_>\n          9 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 2 -1.</_>\n        <_>\n          10 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 2 -1.</_>\n        <_>\n          9 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 4 -1.</_>\n        <_>\n          13 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 4 -1.</_>\n        <_>\n          6 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 4 -1.</_>\n        <_>\n          10 14 6 2 2.</_>\n        <_>\n          4 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 2 3 -1.</_>\n        <_>\n          8 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 8 -1.</_>\n        <_>\n          10 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 8 -1.</_>\n        <_>\n          8 10 2 4 2.</_>\n        <_>\n          10 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 1 -1.</_>\n        <_>\n          11 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 1 6 -1.</_>\n        <_>\n          9 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 1 -1.</_>\n        <_>\n          11 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 1 -1.</_>\n        <_>\n          8 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 15 14 -1.</_>\n        <_>\n          5 9 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 2 10 -1.</_>\n        <_>\n          2 1 1 5 2.</_>\n        <_>\n          3 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 2 3 -1.</_>\n        <_>\n          14 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 3 3 -1.</_>\n        <_>\n          3 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 3 -1.</_>\n        <_>\n          17 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 3 -1.</_>\n        <_>\n          0 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 2 -1.</_>\n        <_>\n          16 5 3 1 2.</_>\n        <_>\n          13 6 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 12 1 -1.</_>\n        <_>\n          8 19 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 4 -1.</_>\n        <_>\n          12 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 1 3 -1.</_>\n        <_>\n          3 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 6 4 -1.</_>\n        <_>\n          11 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 10 -1.</_>\n        <_>\n          3 10 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 2 4 -1.</_>\n        <_>\n          12 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 4 -1.</_>\n        <_>\n          7 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 3 -1.</_>\n        <_>\n          10 14 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 3 -1.</_>\n        <_>\n          10 1 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 2 -1.</_>\n        <_>\n          11 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 2 -1.</_>\n        <_>\n          8 6 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 2 -1.</_>\n        <_>\n          9 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 6 -1.</_>\n        <_>\n          2 11 8 3 2.</_>\n        <_>\n          10 14 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 2 -1.</_>\n        <_>\n          13 7 1 1 2.</_>\n        <_>\n          12 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 3 -1.</_>\n        <_>\n          9 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 2 -1.</_>\n        <_>\n          10 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 12 -1.</_>\n        <_>\n          5 7 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 2 -1.</_>\n        <_>\n          13 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 2 -1.</_>\n        <_>\n          5 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 2 3 -1.</_>\n        <_>\n          4 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 6 -1.</_>\n        <_>\n          10 14 1 3 2.</_>\n        <_>\n          9 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 3 2 -1.</_>\n        <_>\n          9 14 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          11 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 6 -1.</_>\n        <_>\n          7 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 1 2 -1.</_>\n        <_>\n          13 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 10 2 -1.</_>\n        <_>\n          0 3 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 1 2 -1.</_>\n        <_>\n          13 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 2 -1.</_>\n        <_>\n          5 7 1 1 2.</_>\n        <_>\n          6 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 7 -1.</_>\n        <_>\n          13 5 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 1 2 -1.</_>\n        <_>\n          6 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 7 -1.</_>\n        <_>\n          12 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 16 -1.</_>\n        <_>\n          0 3 1 8 2.</_>\n        <_>\n          1 11 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 7 -1.</_>\n        <_>\n          12 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 7 -1.</_>\n        <_>\n          7 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 8 4 -1.</_>\n        <_>\n          11 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 8 4 -1.</_>\n        <_>\n          5 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 7 -1.</_>\n        <_>\n          13 5 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 7 -1.</_>\n        <_>\n          6 5 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 14 -1.</_>\n        <_>\n          18 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 4 -1.</_>\n        <_>\n          6 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 1 2 -1.</_>\n        <_>\n          14 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 6 -1.</_>\n        <_>\n          0 1 9 3 2.</_>\n        <_>\n          9 4 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 1 2 -1.</_>\n        <_>\n          14 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 14 -1.</_>\n        <_>\n          0 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 12 -1.</_>\n        <_>\n          18 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 3 -1.</_>\n        <_>\n          0 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 16 -1.</_>\n        <_>\n          6 8 14 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 12 -1.</_>\n        <_>\n          1 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 7 -1.</_>\n        <_>\n          14 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 1 2 -1.</_>\n        <_>\n          5 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 6 -1.</_>\n        <_>\n          14 6 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 7 2 -1.</_>\n        <_>\n          5 8 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          8 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 1 -1.</_>\n        <_>\n          7 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 4 -1.</_>\n        <_>\n          16 0 3 2 2.</_>\n        <_>\n          13 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 12 -1.</_>\n        <_>\n          1 6 18 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 17 12 -1.</_>\n        <_>\n          3 6 17 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 7 3 -1.</_>\n        <_>\n          5 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 3 -1.</_>\n        <_>\n          10 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 3 3 -1.</_>\n        <_>\n          3 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 6 -1.</_>\n        <_>\n          14 6 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 6 -1.</_>\n        <_>\n          0 6 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 3 -1.</_>\n        <_>\n          12 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 3 -1.</_>\n        <_>\n          4 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 6 -1.</_>\n        <_>\n          18 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 9 -1.</_>\n        <_>\n          10 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 2 -1.</_>\n        <_>\n          6 6 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 2 -1.</_>\n        <_>\n          6 5 2 1 2.</_>\n        <_>\n          8 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 2 3 -1.</_>\n        <_>\n          10 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 1 3 -1.</_>\n        <_>\n          9 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 2 -1.</_>\n        <_>\n          9 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 3 -1.</_>\n        <_>\n          0 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 6 -1.</_>\n        <_>\n          6 3 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 4 -1.</_>\n        <_>\n          1 0 3 2 2.</_>\n        <_>\n          4 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 7 -1.</_>\n        <_>\n          14 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 2 -1.</_>\n        <_>\n          9 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 10 -1.</_>\n        <_>\n          11 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 19 2 -1.</_>\n        <_>\n          0 11 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 8 9 -1.</_>\n        <_>\n          9 8 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 7 -1.</_>\n        <_>\n          5 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 12 -1.</_>\n        <_>\n          10 6 2 6 2.</_>\n        <_>\n          8 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 4 -1.</_>\n        <_>\n          0 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 7 -1.</_>\n        <_>\n          9 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 4 -1.</_>\n        <_>\n          10 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 4 -1.</_>\n        <_>\n          9 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 1 -1.</_>\n        <_>\n          9 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 4 4 -1.</_>\n        <_>\n          7 14 2 2 2.</_>\n        <_>\n          9 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 4 6 -1.</_>\n        <_>\n          15 14 2 3 2.</_>\n        <_>\n          13 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 1 8 -1.</_>\n        <_>\n          7 12 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 8 -1.</_>\n        <_>\n          17 0 1 4 2.</_>\n        <_>\n          16 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 8 -1.</_>\n        <_>\n          2 0 1 4 2.</_>\n        <_>\n          3 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 14 3 -1.</_>\n        <_>\n          6 2 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 10 -1.</_>\n        <_>\n          7 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 2 -1.</_>\n        <_>\n          9 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 8 -1.</_>\n        <_>\n          7 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 6 -1.</_>\n        <_>\n          9 10 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 3 3 -1.</_>\n        <_>\n          7 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 2 -1.</_>\n        <_>\n          6 1 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 14 -1.</_>\n        <_>\n          7 8 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 1 -1.</_>\n        <_>\n          7 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          9 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 9 -1.</_>\n        <_>\n          10 3 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 2 3 -1.</_>\n        <_>\n          18 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 3 1 -1.</_>\n        <_>\n          8 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 4 -1.</_>\n        <_>\n          11 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 3 6 -1.</_>\n        <_>\n          8 14 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 4 -1.</_>\n        <_>\n          11 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 4 -1.</_>\n        <_>\n          8 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 9 -1.</_>\n        <_>\n          7 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 2 3 -1.</_>\n        <_>\n          0 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 8 3 -1.</_>\n        <_>\n          8 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 6 -1.</_>\n        <_>\n          0 4 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 1 3 -1.</_>\n        <_>\n          9 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 14 4 -1.</_>\n        <_>\n          0 17 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 6 -1.</_>\n        <_>\n          1 17 18 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 0 5 3 2.</_>\n        <_>\n          5 3 5 3 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_frontalface_alt2.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    Tree-based 20x20 gentle adaboost frontal face detector.\n    Created by Rainer Lienhart.\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's 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   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>20</height>\n  <width>20</width>\n  <stageParams>\n    <maxWeakCount>109</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>20</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>3</maxWeakCount>\n      <stageThreshold>3.5069230198860168e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 0 4.3272329494357109e-03 -1 -2 1 1.3076160103082657e-02</internalNodes>\n          <leafValues>\n            3.8381900638341904e-02 8.9652568101882935e-01\n            2.6293140649795532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2 5.2434601821005344e-04 -1 -2 3 4.4573000632226467e-03</internalNodes>\n          <leafValues>\n            1.0216630250215530e-01 1.2384019792079926e-01\n            6.9103831052780151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 4 -9.2708261217921972e-04 -1 -2 5 3.3989109215326607e-04</internalNodes>\n          <leafValues>\n            1.9536970555782318e-01 2.1014410257339478e-01\n            8.2586747407913208e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>3.4721779823303223e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 6 2.3025739938020706e-03 -1 -2 7 4.4174338690936565e-03</internalNodes>\n          <leafValues>\n            1.0183759778738022e-01 8.2190579175949097e-01\n            1.9565549492835999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 8 2.2203210741281509e-02 -1 -2 9 -1.7283110355492681e-04</internalNodes>\n          <leafValues>\n            2.2054070234298706e-01 7.3263257741928101e-02\n            5.9314841032028198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 10 4.3567270040512085e-03 -1 -2 11\n            -2.6032889727503061e-03</internalNodes>\n          <leafValues>\n            1.8441149592399597e-01 4.0322139859199524e-01\n            8.0665212869644165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 12 1.7309630056843162e-03 -1 -2 13\n            -7.8146401792764664e-03</internalNodes>\n          <leafValues>\n            2.5483280420303345e-01 6.0570698976516724e-01\n            2.7790638804435730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 14 -8.7343417108058929e-03 -1 -2 15\n            9.4522320432588458e-04</internalNodes>\n          <leafValues>\n            2.8899800777435303e-01 7.6165872812271118e-01\n            3.4956431388854980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 16 4.9414858222007751e-02 -1 -2 17\n            4.4891750440001488e-03</internalNodes>\n          <leafValues>\n            8.1516528129577637e-01 2.8087830543518066e-01\n            6.0277748107910156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 18 6.0313619673252106e-02 -1 -2 19\n            -1.0762850288301706e-03</internalNodes>\n          <leafValues>\n            7.6075017452239990e-01 4.4440358877182007e-01\n            1.4373120665550232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 20 -9.5083238556981087e-03 -1 -2 21\n            7.6601309701800346e-03</internalNodes>\n          <leafValues>\n            5.3181701898574829e-01 5.4110521078109741e-01\n            2.1806870400905609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 22 7.6467678882181644e-03 -1 -2 23\n            -8.4662932204082608e-04</internalNodes>\n          <leafValues>\n            1.1589600145816803e-01 2.3406790196895599e-01\n            5.9903818368911743e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>14</maxWeakCount>\n      <stageThreshold>5.9844889640808105e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 24 -4.8506218008697033e-03 -1 -2 25\n            -4.6141650527715683e-03</internalNodes>\n          <leafValues>\n            1.8054960668087006e-01 2.1778939664363861e-01\n            8.0182367563247681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 26 -2.4301309604197741e-03 -1 -2 27\n            4.1787960799410939e-04</internalNodes>\n          <leafValues>\n            1.1413549631834030e-01 1.2030939757823944e-01\n            6.1085307598114014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 28 1.0010929545387626e-03 -1 -2 29\n            1.0577100329101086e-03</internalNodes>\n          <leafValues>\n            2.0799599587917328e-01 3.3020541071891785e-01\n            7.5110942125320435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 30 1.2376549420878291e-03 -1 -2 31\n            3.5315038985572755e-04</internalNodes>\n          <leafValues>\n            2.7682220935821533e-01 1.6682930290699005e-01\n            5.8294767141342163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 32 -1.1953660286962986e-02 -1 -2 33\n            1.4182999730110168e-03</internalNodes>\n          <leafValues>\n            1.5087880194187164e-01 4.3912279605865479e-01\n            7.6465952396392822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 34 3.4642980899661779e-03 -1 -2 35\n            -1.4948950149118900e-02</internalNodes>\n          <leafValues>\n            2.6515561342239380e-01 2.2980530560016632e-01\n            5.4421657323837280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 36 -1.0506849503144622e-03 -1 -2 37\n            -4.0782918222248554e-03</internalNodes>\n          <leafValues>\n            3.6228439211845398e-01 2.6012599468231201e-01\n            7.2336578369140625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 38 5.4242828628048301e-04 -1 -2 39\n            -7.3204059153795242e-03</internalNodes>\n          <leafValues>\n            3.8496789336204529e-01 2.9655128717422485e-01\n            5.4803091287612915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 40 1.1421289527788758e-03 -1 -2 41\n            1.1783400550484657e-03</internalNodes>\n          <leafValues>\n            4.1047701239585876e-01 7.2390240430831909e-01\n            2.7872839570045471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 42 4.4077109545469284e-02 -1 -2 43\n            3.7900090683251619e-03</internalNodes>\n          <leafValues>\n            5.6405162811279297e-01 5.9475481510162354e-01\n            3.3120200037956238e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 44 -2.4291418958455324e-03 -1 -2 45\n            9.4262324273586273e-03</internalNodes>\n          <leafValues>\n            6.6032320261001587e-01 4.6806651353836060e-01\n            2.0643380284309387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 46 8.0630257725715637e-03 -1 -2 47\n            5.2240812219679356e-03</internalNodes>\n          <leafValues>\n            5.2988511323928833e-01 5.2816027402877808e-01\n            1.9095499813556671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 48 -7.0630568079650402e-03 -1 -2 49\n            5.6897541508078575e-03</internalNodes>\n          <leafValues>\n            1.3806459307670593e-01 5.4906368255615234e-01\n            1.2602810561656952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 50 1.2472929665818810e-03 -1 -2 51\n            4.9543488770723343e-02</internalNodes>\n          <leafValues>\n            2.3726630210876465e-01 5.2401661872863770e-01\n            1.7692160606384277e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>19</maxWeakCount>\n      <stageThreshold>8.5117864608764648e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 52 -4.9326149746775627e-03 -1 -2 53\n            2.7918140403926373e-05</internalNodes>\n          <leafValues>\n            1.9980649650096893e-01 2.2993800044059753e-01\n            7.3932111263275146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 54 3.0876200180500746e-03 -1 -2 55\n            7.4669660534709692e-06</internalNodes>\n          <leafValues>\n            1.5338400006294250e-01 2.0368589460849762e-01\n            5.8549159765243530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 56 1.8739729421213269e-03 -1 -2 57\n            9.3380251200869679e-04</internalNodes>\n          <leafValues>\n            2.0498959720134735e-01 3.2341998815536499e-01\n            7.3230141401290894e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 58 1.9151850137859583e-03 -1 -2 59\n            -5.9683797881007195e-03</internalNodes>\n          <leafValues>\n            3.0451491475105286e-01 2.9321339726448059e-01\n            5.6212961673736572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 60 -7.2115601506084204e-04 -1 -2 61\n            -5.9663117863237858e-03</internalNodes>\n          <leafValues>\n            3.6580368876457214e-01 2.7121558785438538e-01\n            7.2263348102569580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 62 3.0874179676175117e-02 -1 -2 63\n            -1.1099710129201412e-02</internalNodes>\n          <leafValues>\n            4.4198378920555115e-01 3.6129769682884216e-01\n            5.2514511346817017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 64 2.1164179779589176e-03 -1 -2 65\n            -9.4317439943552017e-03</internalNodes>\n          <leafValues>\n            3.6286169290542603e-01 1.6010950505733490e-01\n            7.0522767305374146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 66 -3.5266019403934479e-03 -1 -2 67\n            -1.6907559474930167e-03</internalNodes>\n          <leafValues>\n            1.3012880086898804e-01 1.7863239347934723e-01\n            5.5215299129486084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 68 4.6470930101349950e-04 -1 -2 69\n            -1.0215570218861103e-02</internalNodes>\n          <leafValues>\n            3.4873831272125244e-01 2.6739910244941711e-01\n            6.6679191589355469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 70 1.2634709710255265e-03 -1 -2 71\n            -1.1875299736857414e-02</internalNodes>\n          <leafValues>\n            3.4378638863563538e-01 5.9953361749649048e-01\n            3.4977179765701294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 72 -1.0732339695096016e-02 -1 -2 73\n            7.1836481802165508e-03</internalNodes>\n          <leafValues>\n            2.1504899859428406e-01 6.2714362144470215e-01\n            2.5195419788360596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 74 -2.8340889140963554e-02 -1 -2 75\n            -4.5813230099156499e-04</internalNodes>\n          <leafValues>\n            8.2411892712116241e-02 5.9100568294525146e-01\n            3.7052011489868164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 76 4.2940340936183929e-03 -1 -2 77\n            1.0751079767942429e-02</internalNodes>\n          <leafValues>\n            1.5947279334068298e-01 5.9804809093475342e-01\n            2.8325080871582031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 78 2.2465119138360023e-02 -1 -2 79\n            -5.7988539338111877e-02</internalNodes>\n          <leafValues>\n            7.8770911693572998e-01 1.5557409822940826e-01\n            5.2396571636199951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 80 7.2110891342163086e-03 -1 -2 81\n            -4.8367571085691452e-02</internalNodes>\n          <leafValues>\n            6.6203659772872925e-01 1.4247199892997742e-01\n            4.4298338890075684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 82 -1.4418059960007668e-02 -1 -2 83\n            -2.3156389594078064e-02</internalNodes>\n          <leafValues>\n            1.5885409712791443e-01 2.3757989704608917e-01\n            5.2171349525451660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 84 7.6985340565443039e-03 -1 -2 85\n            -5.6248619221150875e-03</internalNodes>\n          <leafValues>\n            1.9417250156402588e-01 6.2784057855606079e-01\n            3.7460449337959290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 86 -7.2936748620122671e-04 -1 -2 87\n            6.1783898854628205e-04</internalNodes>\n          <leafValues>\n            3.8409221172332764e-01 3.1064930558204651e-01\n            5.5378472805023193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 88 -4.5803939428878948e-05 -1 -2 89\n            -1.4719359569426160e-05</internalNodes>\n          <leafValues>\n            3.4444490075111389e-01 2.7295520901679993e-01\n            6.4289510250091553e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>19</maxWeakCount>\n      <stageThreshold>8.4680156707763672e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 90 -1.3469370314851403e-03 -1 -2 91\n            -2.4774789344519377e-03</internalNodes>\n          <leafValues>\n            1.6570860147476196e-01 2.2738510370254517e-01\n            6.9893497228622437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 92 5.2632777951657772e-03 -1 -2 93\n            4.9075339920818806e-03</internalNodes>\n          <leafValues>\n            1.5120740234851837e-01 5.5644702911376953e-01\n            1.6054420173168182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 94 -2.3254349362105131e-03 -1 -2 95\n            -1.4665479538962245e-03</internalNodes>\n          <leafValues>\n            1.8802590668201447e-01 3.1224989891052246e-01\n            7.1653962135314941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 96 -1.2311690300703049e-01 -1 -2 97\n            2.2108340635895729e-03</internalNodes>\n          <leafValues>\n            3.8595831394195557e-01 2.4552939832210541e-01\n            5.6957101821899414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 98 2.0661531016230583e-03 -1 -2 99\n            3.6130280932411551e-04</internalNodes>\n          <leafValues>\n            2.7165201306343079e-01 2.2933620214462280e-01\n            7.2086298465728760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 100 7.9957872629165649e-02 -1 -2 101\n            2.6064720004796982e-03</internalNodes>\n          <leafValues>\n            7.8336209058761597e-01 5.5452322959899902e-01\n            2.5506898760795593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 102 6.5699010156095028e-03 -1 -2 103\n            1.6259610420092940e-03</internalNodes>\n          <leafValues>\n            1.8193900585174561e-01 3.5298758745193481e-01\n            6.5528190135955811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 104 3.6204981151968241e-03 -1 -2 105\n            -4.4391951523721218e-03</internalNodes>\n          <leafValues>\n            5.4623097181320190e-01 1.3598430156707764e-01\n            5.4158151149749756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 106 -9.0540945529937744e-03 -1 -2 107\n            -4.6067481162026525e-04</internalNodes>\n          <leafValues>\n            1.1151199787855148e-01 5.8467197418212891e-01\n            2.5983488559722900e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 108 -5.6621041148900986e-03 -1 -2 109\n            5.1165837794542313e-03</internalNodes>\n          <leafValues>\n            1.6105690598487854e-01 5.3766787052154541e-01\n            1.7394550144672394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 110 -2.1362339612096548e-03 -1 -2 111\n            -5.4809921421110630e-03</internalNodes>\n          <leafValues>\n            1.9020730257034302e-01 3.2720080018043518e-01\n            6.3648408651351929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 112 -8.1061907112598419e-03 -1 -2 113\n            6.0048708692193031e-03</internalNodes>\n          <leafValues>\n            6.9148528575897217e-01 4.3273261189460754e-01\n            6.9638431072235107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 114 -8.7028548121452332e-02 -1 -2 115\n            -4.7809639945626259e-03</internalNodes>\n          <leafValues>\n            8.5941338539123535e-01 9.7394466400146484e-02\n            4.5870301127433777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 116 -2.2166660055518150e-03 -1 -2 117\n            1.3642730191349983e-03</internalNodes>\n          <leafValues>\n            2.5546258687973022e-01 3.3190909028053284e-01\n            5.9641027450561523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 118 -9.0077864006161690e-03 -1 -2 119\n            -1.5494120307266712e-02</internalNodes>\n          <leafValues>\n            2.6665949821472168e-01 1.8481859564781189e-01\n            6.2459707260131836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 120 -4.2165028862655163e-03 -1 -2 121\n            4.3249759823083878e-02</internalNodes>\n          <leafValues>\n            5.3799271583557129e-01 5.1830291748046875e-01\n            2.1704199910163879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 122 2.8786511393263936e-04 -1 -2 123\n            1.2373150093480945e-03</internalNodes>\n          <leafValues>\n            2.6133841276168823e-01 2.7865320444107056e-01\n            5.9089881181716919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 124 1.9528300035744905e-03 -1 -2 125\n            -1.4947060262784362e-03</internalNodes>\n          <leafValues>\n            2.6128691434860229e-01 5.9154129028320312e-01\n            3.4557819366455078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 126 3.5878680646419525e-03 -1 -2 127\n            -2.5938691105693579e-03</internalNodes>\n          <leafValues>\n            1.5870520472526550e-01 1.2704110145568848e-01\n            5.9794288873672485e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>27</maxWeakCount>\n      <stageThreshold>1.2578499794006348e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 128 3.5810680128633976e-03 -1 -2 129\n            -2.8552350122481585e-03</internalNodes>\n          <leafValues>\n            1.9951049983501434e-01 7.3730701208114624e-01\n            2.9217371344566345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 130 1.9758539274334908e-03 -1 -2 131\n            3.2583118882030249e-03</internalNodes>\n          <leafValues>\n            1.9564199447631836e-01 5.6920468807220459e-01\n            1.8390649557113647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 132 2.3711679386906326e-04 -1 -2 133\n            2.5942500215023756e-03</internalNodes>\n          <leafValues>\n            2.1716670691967010e-01 2.7199891209602356e-01\n            7.1502441167831421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 134 -2.5032449513673782e-02 -1 -2 135\n            6.3087949529290199e-03</internalNodes>\n          <leafValues>\n            1.8251839280128479e-01 5.6998378038406372e-01\n            3.5098528861999512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 136 -3.2494920305907726e-03 -1 -2 137\n            -1.4885730110108852e-02</internalNodes>\n          <leafValues>\n            4.0239268541336060e-01 3.6040958762168884e-01\n            7.2919952869415283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 138 8.0623216927051544e-03 -1 -2 139\n            2.7405679225921631e-02</internalNodes>\n          <leafValues>\n            6.4914900064468384e-01 5.5189931392669678e-01\n            2.6596811413764954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 140 3.4368600696325302e-02 -1 -2 141\n            -2.7292970567941666e-02</internalNodes>\n          <leafValues>\n            6.7125129699707031e-01 1.6913780570030212e-01\n            4.3262779712677002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 142 7.4452121043577790e-04 -1 -2 143\n            7.0336280623450875e-04</internalNodes>\n          <leafValues>\n            3.4051001071929932e-01 5.5167931318283081e-01\n            3.3113878965377808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 144 -1.2275460362434387e-01 -1 -2 145\n            3.2559928949922323e-03</internalNodes>\n          <leafValues>\n            1.6753150522708893e-01 3.6157518625259399e-01\n            6.4207828044891357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 146 -3.2090399414300919e-02 -1 -2 147\n            3.2957999501377344e-03</internalNodes>\n          <leafValues>\n            2.9210790991783142e-01 5.6130319833755493e-01\n            3.3578601479530334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 148 -3.2273170072585344e-03 -1 -2 149\n            1.1171669466421008e-03</internalNodes>\n          <leafValues>\n            6.9706428050994873e-01 3.5411500930786133e-01\n            6.1440062522888184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 150 -1.7279950901865959e-02 -1 -2 151\n            1.1741200461983681e-02</internalNodes>\n          <leafValues>\n            5.5371809005737305e-01 5.3419572114944458e-01\n            2.7571049332618713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 152 4.6405228786170483e-03 -1 -2 153\n            -1.6913030296564102e-02</internalNodes>\n          <leafValues>\n            2.4895210564136505e-01 1.7119289934635162e-01\n            5.5239528417587280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 154 1.0060169734060764e-02 -1 -2 155\n            -6.0715491417795420e-04</internalNodes>\n          <leafValues>\n            8.2734507322311401e-01 3.7793910503387451e-01\n            5.4762518405914307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 156 -1.0865400545299053e-03 -1 -2 157\n            8.9362077414989471e-03</internalNodes>\n          <leafValues>\n            3.2965409755706787e-01 6.0628837347030640e-01\n            2.4342200160026550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 158 -2.6372660067863762e-04 -1 -2 159\n            1.3110050000250340e-02</internalNodes>\n          <leafValues>\n            3.8140949606895447e-01 5.5176162719726562e-01\n            3.7268930673599243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 160 -2.9806280508637428e-03 -1 -2 161\n            -4.1619571857154369e-03</internalNodes>\n          <leafValues>\n            1.2296640127897263e-01 7.2522747516632080e-01\n            4.9734550714492798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 162 3.3842328935861588e-02 -1 -2 163\n            -1.2564560165628791e-03</internalNodes>\n          <leafValues>\n            5.3483128547668457e-01 5.8519148826599121e-01\n            4.3841668963432312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 164 -1.9635230302810669e-02 -1 -2 165\n            -9.9625496659427881e-04</internalNodes>\n          <leafValues>\n            2.2978340089321136e-01 6.2959378957748413e-01\n            4.1315990686416626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 166 -2.3127110674977303e-02 -1 -2 167\n            2.3525709286332130e-02</internalNodes>\n          <leafValues>\n            1.6954590380191803e-01 5.1741302013397217e-01\n            5.9519391506910324e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 168 -1.9356520846486092e-02 -1 -2 169\n            -4.1787112131714821e-03</internalNodes>\n          <leafValues>\n            1.3572479784488678e-01 2.9966288805007935e-01\n            5.7916951179504395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 170 3.1488779932260513e-03 -1 -2 171\n            7.3972279205918312e-03</internalNodes>\n          <leafValues>\n            6.5925890207290649e-01 5.3071719408035278e-01\n            3.7951210141181946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 172 7.1955118983169086e-06 -1 -2 173\n            4.7114409506320953e-02</internalNodes>\n          <leafValues>\n            3.1283149123191833e-01 5.5378931760787964e-01\n            1.0273090004920959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 174 7.2878710925579071e-03 -1 -2 175\n            -6.1887511983513832e-03</internalNodes>\n          <leafValues>\n            4.6608591079711914e-01 7.1588581800460815e-01\n            4.7244489192962646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 176 2.9757320880889893e-03 -1 -2 177\n            -1.8449809867888689e-03</internalNodes>\n          <leafValues>\n            5.9345688670873642e-02 7.0273017883300781e-01\n            4.7187310457229614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 178 1.0239540279144421e-04 -1 -2 179\n            2.4277009069919586e-03</internalNodes>\n          <leafValues>\n            5.8947342634201050e-01 4.8623558878898621e-01\n            5.2475881576538086e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 180 -6.4751312136650085e-02 -1 -2 181\n            3.9380151429213583e-04</internalNodes>\n          <leafValues>\n            6.9174712896347046e-01 4.6696171164512634e-01\n            2.3824059963226318e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>31</maxWeakCount>\n      <stageThreshold>1.4546750068664551e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 182 1.4397440245375037e-03 -1 -2 183\n            -5.4068560712039471e-04</internalNodes>\n          <leafValues>\n            2.7734708786010742e-01 7.4271547794342041e-01\n            2.4797350168228149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 184 -7.1237959673453588e-06 -1 -2 185\n            -2.3661039303988218e-03</internalNodes>\n          <leafValues>\n            2.1995030343532562e-01 5.8899897336959839e-01\n            2.5957161188125610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 186 1.7343269428238273e-03 -1 -2 187\n            1.5874590026214719e-03</internalNodes>\n          <leafValues>\n            1.8601259589195251e-01 4.1518709063529968e-01\n            7.1034741401672363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 188 3.7285638973116875e-03 -1 -2 189\n            -1.2883819639682770e-01</internalNodes>\n          <leafValues>\n            2.5279670953750610e-01 1.3930009305477142e-01\n            5.2545148134231567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 190 7.9412180930376053e-03 -1 -2 191\n            -1.2661729939281940e-02</internalNodes>\n          <leafValues>\n            2.4877290427684784e-01 2.7107000350952148e-01\n            6.6188377141952515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 192 3.0146789868013002e-05 -1 -2 193\n            -1.6330160200595856e-02</internalNodes>\n          <leafValues>\n            3.8128259778022766e-01 2.3264320194721222e-01\n            5.2630108594894409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 194 1.4622770322603174e-05 -1 -2 195\n            -2.0858660340309143e-02</internalNodes>\n          <leafValues>\n            4.2933320999145508e-01 1.6004039347171783e-01\n            6.7823147773742676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 196 2.8194559272378683e-03 -1 -2 197\n            3.7899368908256292e-03</internalNodes>\n          <leafValues>\n            6.6792941093444824e-01 4.5877051353454590e-01\n            7.1762388944625854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 198 3.5344641655683517e-02 -1 -2 199\n            -1.1571600334718823e-03</internalNodes>\n          <leafValues>\n            1.8640750646591187e-01 5.5382597446441650e-01\n            3.1504508852958679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 200 -5.8742752298712730e-03 -1 -2 201\n            -1.5201780115603469e-05</internalNodes>\n          <leafValues>\n            2.8287911415100098e-01 5.8702242374420166e-01\n            3.7048238515853882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 202 -2.2681879636365920e-04 -1 -2 203\n            3.7845689803361893e-03</internalNodes>\n          <leafValues>\n            4.2189309000968933e-01 6.6670012474060059e-01\n            2.4611820280551910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 204 -8.5295992903411388e-05 -1 -2 205\n            -4.4394891709089279e-02</internalNodes>\n          <leafValues>\n            3.5575878620147705e-01 1.6655470430850983e-01\n            5.2348488569259644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 206 1.0126030538231134e-03 -1 -2 207\n            -7.6327780261635780e-03</internalNodes>\n          <leafValues>\n            2.8846129775047302e-01 2.9693400859832764e-01\n            6.0801112651824951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 208 4.0330411866307259e-03 -1 -2 209\n            1.3676689565181732e-01</internalNodes>\n          <leafValues>\n            4.5363900065422058e-01 5.1772642135620117e-01\n            1.4491820335388184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 210 -5.0060478970408440e-03 -1 -2 211\n            -1.2475839816033840e-02</internalNodes>\n          <leafValues>\n            7.6169097423553467e-01 2.1597060561180115e-01\n            5.4601877927780151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 212 -9.4012258341535926e-04 -1 -2 213\n            -1.2191980145871639e-02</internalNodes>\n          <leafValues>\n            3.9262959361076355e-01 3.4788811206817627e-01\n            5.5426627397537231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 214 -5.4959481349214911e-04 -1 -2 215\n            -2.1802430273965001e-04</internalNodes>\n          <leafValues>\n            6.0642760992050171e-01 5.6974071264266968e-01\n            1.7797139286994934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 216 6.9115799851715565e-03 -1 -2 217\n            -9.7631698008626699e-04</internalNodes>\n          <leafValues>\n            5.3793722391128540e-01 3.3278390765190125e-01\n            5.4615312814712524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 218 -8.7870173156261444e-03 -1 -2 219\n            -1.6761029837653041e-03</internalNodes>\n          <leafValues>\n            2.1161609888076782e-01 6.6358232498168945e-01\n            4.3658590316772461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 220 -5.5694948881864548e-02 -1 -2 221\n            -1.9844379276037216e-02</internalNodes>\n          <leafValues>\n            5.3874248266220093e-01 1.6028049588203430e-01\n            5.3304588794708252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 222 -7.4751611100509763e-04 -1 -2 223\n            2.3032890632748604e-02</internalNodes>\n          <leafValues>\n            2.9174768924713135e-01 5.6081241369247437e-01\n            1.9979810714721680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 224 -3.0700280331075191e-03 -1 -2 225\n            -1.1636839481070638e-03</internalNodes>\n          <leafValues>\n            3.9383140206336975e-01 5.7574361562728882e-01\n            4.2394569516181946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 226 2.2464339435100555e-01 -1 -2 227\n            1.4412109740078449e-03</internalNodes>\n          <leafValues>\n            7.6765531301498413e-01 5.3538662195205688e-01\n            2.5147768855094910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 228 -3.0011249706149101e-02 -1 -2 229\n            -5.3078960627317429e-02</internalNodes>\n          <leafValues>\n            2.3649039864540100e-01 2.3858639597892761e-01\n            5.4146647453308105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 230 2.0800929050892591e-03 -1 -2 231\n            -4.0738182142376900e-03</internalNodes>\n          <leafValues>\n            6.5116149187088013e-01 6.0304141044616699e-01\n            3.5877010226249695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 232 -1.9529370591044426e-02 -1 -2 233\n            -5.3309470415115356e-02</internalNodes>\n          <leafValues>\n            5.4235929250717163e-01 2.3609539866447449e-01\n            5.4017579555511475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 234 -3.4849561750888824e-02 -1 -2 235\n            -1.2658450007438660e-01</internalNodes>\n          <leafValues>\n            2.8369858860969543e-01 1.8135160207748413e-01\n            5.4210460186004639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 236 7.3325118137290701e-06 -1 -2 237\n            -1.1843870393931866e-02</internalNodes>\n          <leafValues>\n            3.9803659915924072e-01 2.6163849234580994e-01\n            5.2377301454544067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 238 -4.8470678739249706e-03 -1 -2 239\n            8.1693977117538452e-03</internalNodes>\n          <leafValues>\n            2.4381080269813538e-01 5.3271460533142090e-01\n            8.1903767585754395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 240 -6.4716790802776814e-03 -1 -2 241\n            -1.5188479665084742e-05</internalNodes>\n          <leafValues>\n            4.6796938776969910e-01 5.5639117956161499e-01\n            4.3675860762596130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 242 3.0696711037307978e-03 -1 -2 243\n            -1.6296720423270017e-04</internalNodes>\n          <leafValues>\n            6.6643488407135010e-01 5.5946111679077148e-01\n            3.0427119135856628e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>39</maxWeakCount>\n      <stageThreshold>1.8572250366210938e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 244 -9.8275858908891678e-03 -1 -2 245\n            -4.1693858802318573e-03</internalNodes>\n          <leafValues>\n            2.1160189807415009e-01 6.9246852397918701e-01\n            3.0437770485877991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 246 3.5341319744475186e-04 -1 -2 247\n            4.8054549843072891e-03</internalNodes>\n          <leafValues>\n            3.1832858920097351e-01 5.4565590620040894e-01\n            2.5222688913345337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 248 2.1071180526632816e-04 -1 -2 249\n            -2.8318869881331921e-03</internalNodes>\n          <leafValues>\n            2.9026180505752563e-01 3.1304559111595154e-01\n            6.8849372863769531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 250 -7.5633679443853907e-06 -1 -2 251\n            -8.2888139877468348e-04</internalNodes>\n          <leafValues>\n            2.9624658823013306e-01 3.0996260046958923e-01\n            5.7525151968002319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 252 1.6209259629249573e-03 -1 -2 253\n            9.1338958591222763e-03</internalNodes>\n          <leafValues>\n            3.9931958913803101e-01 4.8273721337318420e-01\n            7.5378328561782837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 254 -4.1212290525436401e-03 -1 -2 255\n            -2.5447290390729904e-03</internalNodes>\n          <leafValues>\n            2.6169270277023315e-01 3.1087028980255127e-01\n            5.4912358522415161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 256 -6.2652782071381807e-04 -1 -2 257\n            -3.6596331483451650e-05</internalNodes>\n          <leafValues>\n            3.2396918535232544e-01 6.5174108743667603e-01\n            4.1789120435714722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 258 1.3882719911634922e-02 -1 -2 259\n            1.0493700392544270e-03</internalNodes>\n          <leafValues>\n            6.7712038755416870e-01 4.1595110297203064e-01\n            5.6528919935226440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 260 1.8215360119938850e-02 -1 -2 261\n            -1.1334580369293690e-02</internalNodes>\n          <leafValues>\n            7.6896011829376221e-01 2.8733238577842712e-01\n            4.9889329075813293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 262 -4.1097560897469521e-03 -1 -2 263\n            4.2612891411408782e-04</internalNodes>\n          <leafValues>\n            5.4630082845687866e-01 3.6312350630760193e-01\n            5.5125522613525391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 264 6.0301548801362514e-03 -1 -2 265\n            3.3587709185667336e-04</internalNodes>\n          <leafValues>\n            1.1437670141458511e-01 2.8910788893699646e-01\n            5.4473417997360229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 266 6.2279507983475924e-04 -1 -2 267\n            -2.5837119668722153e-02</internalNodes>\n          <leafValues>\n            3.0234318971633911e-01 2.1670059859752655e-01\n            5.2781528234481812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 268 2.1774910390377045e-02 -1 -2 269\n            1.7682299949228764e-03</internalNodes>\n          <leafValues>\n            3.2548341155052185e-01 5.2630507946014404e-01\n            7.5263291597366333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 270 -1.3793810270726681e-02 -1 -2 271\n            -5.0852829590439796e-03</internalNodes>\n          <leafValues>\n            7.4103301763534546e-01 6.8366098403930664e-01\n            4.5790711045265198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 272 6.1795017682015896e-03 -1 -2 273\n            1.0030319914221764e-02</internalNodes>\n          <leafValues>\n            7.4499362707138062e-01 4.8607799410820007e-01\n            2.3614570498466492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 274 -6.4201927743852139e-03 -1 -2 275\n            -5.6961281225085258e-03</internalNodes>\n          <leafValues>\n            1.4673270285129547e-01 2.3478199541568756e-01\n            5.3233772516250610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 276 -7.1498160250484943e-03 -1 -2 277\n            2.4450740311294794e-03</internalNodes>\n          <leafValues>\n            1.4770570397377014e-01 3.4985339641571045e-01\n            5.8035618066787720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 278 -3.7503410130739212e-02 -1 -2 279\n            4.7799441381357610e-04</internalNodes>\n          <leafValues>\n            5.2595508098602295e-01 4.3628829717636108e-01\n            6.2089228630065918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 280 -7.0806080475449562e-03 -1 -2 281\n            3.2818000763654709e-02</internalNodes>\n          <leafValues>\n            2.0394609868526459e-01 5.1983588933944702e-01\n            1.3711960613727570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 282 6.5188988810405135e-04 -1 -2 283\n            4.6485587954521179e-03</internalNodes>\n          <leafValues>\n            6.3234299421310425e-01 4.7201630473136902e-01\n            6.5670871734619141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 284 -1.9827929791063070e-03 -1 -2 285\n            -1.6011310508474708e-03</internalNodes>\n          <leafValues>\n            6.0530602931976318e-01 5.0905191898345947e-01\n            3.1169331073760986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 286 -3.0539939180016518e-03 -1 -2 287\n            4.3212040327489376e-04</internalNodes>\n          <leafValues>\n            3.4298041462898254e-01 3.8384029269218445e-01\n            5.7755982875823975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 288 -2.7452120557427406e-02 -1 -2 289\n            9.3099439982324839e-04</internalNodes>\n          <leafValues>\n            2.1434690058231354e-01 5.9529662132263184e-01\n            3.7601581215858459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 290 6.7144189961254597e-03 -1 -2 291\n            -3.3701690845191479e-03</internalNodes>\n          <leafValues>\n            5.6926268339157104e-01 5.7843041419982910e-01\n            3.9742821455001831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 292 -1.8903959542512894e-02 -1 -2 293\n            -6.5850871615111828e-03</internalNodes>\n          <leafValues>\n            1.8188929557800293e-01 6.8491101264953613e-01\n            4.3515840172767639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 294 5.8810501359403133e-03 -1 -2 295\n            8.0092082498595119e-04</internalNodes>\n          <leafValues>\n            2.7266609668731689e-01 4.2364311218261719e-01\n            5.8446758985519409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 296 1.8510579830035567e-03 -1 -2 297\n            6.3273650594055653e-03</internalNodes>\n          <leafValues>\n            3.3713209629058838e-01 5.2702218294143677e-01\n            8.0536508560180664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 298 -3.3820930402725935e-03 -1 -2 299\n            -1.9292969955131412e-03</internalNodes>\n          <leafValues>\n            2.8660181164741516e-01 5.8889460563659668e-01\n            3.8957870006561279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 300 1.4995220117270947e-02 -1 -2 301\n            -2.6330750435590744e-02</internalNodes>\n          <leafValues>\n            2.1778169274330139e-01 1.7753170430660248e-01\n            5.6714701652526855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 302 -4.1734222322702408e-03 -1 -2 303\n            2.7268350124359131e-02</internalNodes>\n          <leafValues>\n            4.6529620885848999e-01 4.7683110833168030e-01\n            5.6952387094497681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 304 9.8880263976752758e-04 -1 -2 305\n            -1.0528849670663476e-03</internalNodes>\n          <leafValues>\n            3.3974018692970276e-01 6.2500411272048950e-01\n            4.2884120345115662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 306 5.2288072183728218e-03 -1 -2 307\n            3.0395459383726120e-02</internalNodes>\n          <leafValues>\n            5.3477621078491211e-01 4.1155189275741577e-01\n            5.6607538461685181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 308 -7.9113930463790894e-02 -1 -2 309\n            1.8231669440865517e-02</internalNodes>\n          <leafValues>\n            7.8813230991363525e-01 3.6043399572372437e-01\n            5.5695050954818726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 310 5.2288072183728218e-03 -1 -2 311\n            4.3922828626818955e-04</internalNodes>\n          <leafValues>\n            5.4166442155838013e-01 5.5071568489074707e-01\n            3.8822770118713379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 312 -8.6501962505280972e-04 -1 -2 313\n            1.0326979681849480e-03</internalNodes>\n          <leafValues>\n            3.1858509778976440e-01 5.5783641338348389e-01\n            3.2192459702491760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 314 -7.2997747920453548e-03 -1 -2 315\n            -9.3629042385146022e-04</internalNodes>\n          <leafValues>\n            7.0732331275939941e-01 5.5580157041549683e-01\n            4.6138420701026917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 316 -6.0483231209218502e-03 -1 -2 317\n            6.7529221996665001e-03</internalNodes>\n          <leafValues>\n            6.8692898750305176e-01 4.8703178763389587e-01\n            2.6503708958625793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 318 5.3078029304742813e-02 -1 -2 319\n            -1.0225810110569000e-03</internalNodes>\n          <leafValues>\n            5.2815151214599609e-01 6.0858821868896484e-01\n            4.3048679828643799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 320 3.1270649284124374e-02 -1 -2 321\n            -6.3522169366478920e-03</internalNodes>\n          <leafValues>\n            5.4458320140838623e-01 5.3283357620239258e-01\n            2.3643240332603455e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>45</maxWeakCount>\n      <stageThreshold>2.1578119277954102e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 322 -6.2215630896389484e-03 -1 -2 323\n            2.1097389981150627e-03</internalNodes>\n          <leafValues>\n            2.6255810260772705e-01 1.5649929642677307e-01\n            6.7928832769393921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 324 1.0845859535038471e-02 -1 -2 325\n            6.4230401767417789e-04</internalNodes>\n          <leafValues>\n            3.4858089685440063e-01 3.6982551217079163e-01\n            5.9216582775115967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 326 7.3311722371727228e-04 -1 -2 327\n            1.0134200565516949e-03</internalNodes>\n          <leafValues>\n            3.0070841312408447e-01 3.6249229311943054e-01\n            7.0724260807037354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 328 1.1093559674918652e-02 -1 -2 329\n            -7.9127531498670578e-03</internalNodes>\n          <leafValues>\n            4.4167020916938782e-01 3.0287081003189087e-01\n            5.4173761606216431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 330 1.2905309908092022e-02 -1 -2 331\n            -4.2430912144482136e-03</internalNodes>\n          <leafValues>\n            4.3745040893554688e-01 4.4015899300575256e-01\n            7.5651907920837402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 332 -2.1304309484548867e-04 -1 -2 333\n            -2.2308640182018280e-03</internalNodes>\n          <leafValues>\n            2.3107869923114777e-01 3.5681959986686707e-01\n            5.7499992847442627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 334 2.6400520000606775e-03 -1 -2 335\n            7.5101032853126526e-02</internalNodes>\n          <leafValues>\n            3.5936889052391052e-01 6.3635677099227905e-01\n            2.3270289599895477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 336 -7.7012968249619007e-03 -1 -2 337\n            1.5588370151817799e-03</internalNodes>\n          <leafValues>\n            7.0746237039566040e-01 5.7002371549606323e-01\n            3.5904508829116821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 338 -4.7687938786111772e-04 -1 -2 339\n            8.4234727546572685e-04</internalNodes>\n          <leafValues>\n            2.8054410219192505e-01 4.1254189610481262e-01\n            6.1779958009719849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 340 -1.2825109995901585e-02 -1 -2 341\n            -6.5156567143276334e-04</internalNodes>\n          <leafValues>\n            5.4030781984329224e-01 5.6336438655853271e-01\n            3.3565390110015869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 342 -1.2006159871816635e-02 -1 -2 343\n            1.3213419588282704e-03</internalNodes>\n          <leafValues>\n            7.1095108985900879e-01 4.9038508534431458e-01\n            2.8245830535888672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 344 -2.0307440310716629e-02 -1 -2 345\n            4.0180929936468601e-03</internalNodes>\n          <leafValues>\n            1.8913699686527252e-01 5.3779661655426025e-01\n            3.1194949150085449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 346 4.5315311290323734e-03 -1 -2 347\n            -4.4381739571690559e-03</internalNodes>\n          <leafValues>\n            7.2067582607269287e-01 1.8546679615974426e-01\n            4.9817329645156860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 348 1.5692010056227446e-03 -1 -2 349\n            -4.9516442231833935e-03</internalNodes>\n          <leafValues>\n            2.6382741332054138e-01 6.8710672855377197e-01\n            4.7146868705749512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 350 -2.7429679408669472e-02 -1 -2 351\n            1.4181969454512000e-03</internalNodes>\n          <leafValues>\n            1.5482850372791290e-01 4.3768429756164551e-01\n            6.3273680210113525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 352 -1.3078940100967884e-02 -1 -2 353\n            -3.5092779435217381e-03</internalNodes>\n          <leafValues>\n            3.1668141484260559e-01 6.1997437477111816e-01\n            4.3796870112419128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 354 1.8920730799436569e-02 -1 -2 355\n            2.1683350205421448e-03</internalNodes>\n          <leafValues>\n            1.4707140624523163e-01 5.8094590902328491e-01\n            3.4319490194320679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 356 1.6401590546593070e-03 -1 -2 357\n            1.4005920093040913e-04</internalNodes>\n          <leafValues>\n            3.9594578742980957e-01 3.2400250434875488e-01\n            5.6466472148895264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 358 -3.3137591090053320e-03 -1 -2 359\n            -2.9459029901772738e-03</internalNodes>\n          <leafValues>\n            4.2745280265808105e-01 3.3416679501533508e-01\n            6.6279602050781250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 360 1.3612229668069631e-04 -1 -2 361\n            6.0512032359838486e-04</internalNodes>\n          <leafValues>\n            4.0469279885292053e-01 5.4840582609176636e-01\n            3.5699409246444702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 362 -1.7513990402221680e-02 -1 -2 363\n            -1.8735030665993690e-02</internalNodes>\n          <leafValues>\n            1.8241509795188904e-01 7.9718202352523804e-01\n            5.0685691833496094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 364 1.2065649963915348e-02 -1 -2 365\n            -2.6544178836047649e-03</internalNodes>\n          <leafValues>\n            2.1670070290565491e-01 6.5841788053512573e-01\n            4.6282431483268738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 366 1.4501289697363973e-03 -1 -2 367\n            1.0954019613564014e-02</internalNodes>\n          <leafValues>\n            2.0902520418167114e-01 5.1123052835464478e-01\n            7.7845758199691772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 368 1.5771709382534027e-02 -1 -2 369\n            -1.4252689667046070e-02</internalNodes>\n          <leafValues>\n            5.1323592662811279e-01 1.7424149811267853e-01\n            5.2671480178833008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 370 3.0411860279855318e-05 -1 -2 371\n            2.3486299440264702e-02</internalNodes>\n          <leafValues>\n            3.4184479713439941e-01 5.6312650442123413e-01\n            2.0063939690589905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 372 5.2205449901521206e-03 -1 -2 373\n            -2.5812430307269096e-02</internalNodes>\n          <leafValues>\n            6.2496489286422729e-01 3.2032281160354614e-01\n            5.1993298530578613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 374 -1.9526650430634618e-03 -1 -2 375\n            -8.1470049917697906e-03</internalNodes>\n          <leafValues>\n            6.1407059431076050e-01 6.5928959846496582e-01\n            3.7111249566078186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 376 3.2962448894977570e-03 -1 -2 377\n            -1.3961310032755136e-03</internalNodes>\n          <leafValues>\n            2.9521119594573975e-01 3.3208039402961731e-01\n            5.5284148454666138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 378 -4.1055441834032536e-03 -1 -2 379\n            -1.0888779535889626e-02</internalNodes>\n          <leafValues>\n            1.7105500400066376e-01 3.3594349026679993e-01\n            5.6749051809310913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 380 -7.6768421567976475e-03 -1 -2 381\n            -9.7729787230491638e-03</internalNodes>\n          <leafValues>\n            4.7732418775558472e-01 8.0810451507568359e-01\n            4.8458281159400940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 382 6.0439710505306721e-03 -1 -2 383\n            -4.6134641161188483e-04</internalNodes>\n          <leafValues>\n            6.7840021848678589e-01 5.5146390199661255e-01\n            3.6423599720001221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 384 5.7992361485958099e-02 -1 -2 385\n            5.9384980704635382e-04</internalNodes>\n          <leafValues>\n            1.2544350326061249e-01 4.4248789548873901e-01\n            5.7284617424011230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 386 -6.2353480607271194e-03 -1 -2 387\n            -1.2784929946064949e-02</internalNodes>\n          <leafValues>\n            2.8050419688224792e-01 1.9509120285511017e-01\n            5.6529247760772705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 388 4.1973669431172311e-04 -1 -2 389\n            8.0646801507100463e-04</internalNodes>\n          <leafValues>\n            6.1664837598800659e-01 4.5265799760818481e-01\n            5.9444868564605713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 390 -1.6339010326191783e-03 -1 -2 391\n            -4.8299999907612801e-03</internalNodes>\n          <leafValues>\n            4.0869420766830444e-01 2.7935269474983215e-01\n            6.4449352025985718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 392 -6.3992068171501160e-03 -1 -2 393\n            1.0819199681282043e-01</internalNodes>\n          <leafValues>\n            5.6716561317443848e-01 5.3118121623992920e-01\n            2.6143568754196167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 394 6.5056560561060905e-04 -1 -2 395\n            2.0611250773072243e-02</internalNodes>\n          <leafValues>\n            2.9967740178108215e-01 4.4899430871009827e-01\n            6.8882799148559570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 396 -2.5129050016403198e-02 -1 -2 397\n            1.7922939732670784e-03</internalNodes>\n          <leafValues>\n            5.1968640089035034e-01 3.4669959545135498e-01\n            5.5335879325866699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 398 1.5626220265403390e-03 -1 -2 399\n            -6.1898730928078294e-04</internalNodes>\n          <leafValues>\n            3.0814400315284729e-01 2.6938709616661072e-01\n            5.5444890260696411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 400 4.8111421056091785e-03 -1 -2 401\n            2.2484229411929846e-03</internalNodes>\n          <leafValues>\n            5.5878478288650513e-01 4.6721130609512329e-01\n            6.0908252000808716e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 402 -3.0147239565849304e-02 -1 -2 403\n            2.7548679709434509e-01</internalNodes>\n          <leafValues>\n            9.0275919437408447e-01 4.7198349237442017e-01\n            2.1969200670719147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 404 3.6894630175083876e-03 -1 -2 405\n            7.2957701049745083e-03</internalNodes>\n          <leafValues>\n            6.2730091810226440e-01 4.8392179608345032e-01\n            6.9090622663497925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 406 -5.6211069226264954e-02 -1 -2 407\n            -2.6478560175746679e-03</internalNodes>\n          <leafValues>\n            1.7384879291057587e-01 6.3041448593139648e-01\n            4.4743019342422485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 408 -1.4534000074490905e-03 -1 -2 409\n            2.8540920466184616e-03</internalNodes>\n          <leafValues>\n            5.3025382757186890e-01 5.3383970260620117e-01\n            3.7968829274177551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 410 5.8243022067472339e-04 -1 -2 411\n            9.2509482055902481e-04</internalNodes>\n          <leafValues>\n            3.2698369026184082e-01 4.5548120141029358e-01\n            6.3583481311798096e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>47</maxWeakCount>\n      <stageThreshold>2.2585290908813477e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 412 1.9806440919637680e-02 -1 -2 413\n            7.0395611692219973e-04</internalNodes>\n          <leafValues>\n            2.8097251057624817e-01 3.1198260188102722e-01\n            7.0903062820434570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 414 2.5563780218362808e-03 -1 -2 415\n            1.0824160417541862e-03</internalNodes>\n          <leafValues>\n            2.9819479584693909e-01 3.0205601453781128e-01\n            5.8088111877441406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 416 -9.2893769033253193e-04 -1 -2 417\n            -1.8009729683399200e-02</internalNodes>\n          <leafValues>\n            3.7381029129028320e-01 2.1631260216236115e-01\n            6.6192537546157837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 418 2.3500190582126379e-03 -1 -2 419\n            8.1822491483762860e-04</internalNodes>\n          <leafValues>\n            2.9104039072990417e-01 5.5786228179931641e-01\n            3.3666279911994934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 420 6.2095321482047439e-04 -1 -2 421\n            9.6780969761312008e-04</internalNodes>\n          <leafValues>\n            4.0724259614944458e-01 6.8595957756042480e-01\n            3.1054618954658508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 422 4.8000211245380342e-04 -1 -2 423\n            9.0538640506565571e-05</internalNodes>\n          <leafValues>\n            3.3373329043388367e-01 3.3709588646888733e-01\n            5.4512107372283936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 424 -4.3914798647165298e-02 -1 -2 425\n            -5.6501338258385658e-03</internalNodes>\n          <leafValues>\n            2.6256701350212097e-01 6.0504627227783203e-01\n            3.2324150204658508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 426 3.8661491125822067e-03 -1 -2 427\n            -6.3069426687434316e-05</internalNodes>\n          <leafValues>\n            3.2626131176948547e-01 5.8173078298568726e-01\n            4.1643899679183960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 428 5.2533738315105438e-02 -1 -2 429\n            1.3818660518154502e-03</internalNodes>\n          <leafValues>\n            7.0953989028930664e-01 5.2928757667541504e-01\n            2.5413888692855835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 430 -8.9264067355543375e-04 -1 -2 431\n            8.5579507052898407e-02</internalNodes>\n          <leafValues>\n            4.0853410959243774e-01 5.2632361650466919e-01\n            3.0032029747962952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 432 -1.8343339615967125e-04 -1 -2 433\n            -9.7924815490841866e-03</internalNodes>\n          <leafValues>\n            4.0292051434516907e-01 3.5213199257850647e-01\n            6.6640049219131470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 434 1.4428620226681232e-02 -1 -2 435\n            -4.5687001198530197e-02</internalNodes>\n          <leafValues>\n            4.5935660600662231e-01 1.4747560024261475e-01\n            5.1786321401596069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 436 -2.5763090234249830e-03 -1 -2 437\n            -3.8301859050989151e-02</internalNodes>\n          <leafValues>\n            1.8372780084609985e-01 8.0826580524444580e-01\n            5.1666879653930664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 438 2.8978290501981974e-03 -1 -2 439\n            -2.5165060069411993e-03</internalNodes>\n          <leafValues>\n            4.7980138659477234e-01 3.3462959527969360e-01\n            5.4444491863250732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 440 5.6281982688233256e-04 -1 -2 441\n            3.6684391088783741e-03</internalNodes>\n          <leafValues>\n            3.5890269279479980e-01 5.9831297397613525e-01\n            2.9839640855789185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 442 2.1319789811968803e-03 -1 -2 443\n            7.6037310063838959e-03</internalNodes>\n          <leafValues>\n            6.1632239818572998e-01 5.2171301841735840e-01\n            2.0541590452194214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 444 -1.1668079969240353e-04 -1 -2 445\n            3.1659509986639023e-03</internalNodes>\n          <leafValues>\n            3.4466689825057983e-01 5.5974847078323364e-01\n            2.6737868785858154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 446 -2.2569499909877777e-02 -1 -2 447\n            2.7129601221531630e-04</internalNodes>\n          <leafValues>\n            6.9002681970596313e-01 4.4866389036178589e-01\n            5.5087852478027344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 448 -1.5434459783136845e-02 -1 -2 449\n            -8.4861656650900841e-03</internalNodes>\n          <leafValues>\n            2.0483230054378510e-01 1.2549529969692230e-01\n            5.0603562593460083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 450 -1.1807470023632050e-01 -1 -2 451\n            -1.2300079688429832e-03</internalNodes>\n          <leafValues>\n            6.7633062601089478e-02 5.6607007980346680e-01\n            4.2922011017799377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 452 -7.0290351286530495e-03 -1 -2 453\n            8.9325206354260445e-03</internalNodes>\n          <leafValues>\n            7.1364039182662964e-01 4.3388760089874268e-01\n            7.0608752965927124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 454 -4.7735981643199921e-02 -1 -2 455\n            -4.4155579060316086e-02</internalNodes>\n          <leafValues>\n            5.2686852216720581e-01 2.5805801153182983e-01\n            5.4069608449935913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 456 -2.5983480736613274e-02 -1 -2 457\n            -4.7885831445455551e-03</internalNodes>\n          <leafValues>\n            1.9050540030002594e-01 2.5518929958343506e-01\n            5.3390771150588989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 458 6.7423451691865921e-03 -1 -2 459\n            1.1654750443994999e-02</internalNodes>\n          <leafValues>\n            4.6933099627494812e-01 5.2619642019271851e-01\n            3.1454348564147949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 460 -5.6982729583978653e-03 -1 -2 461\n            -7.2983349673449993e-03</internalNodes>\n          <leafValues>\n            1.7568530142307281e-01 7.7747297286987305e-01\n            5.1242929697036743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 462 7.9091778025031090e-03 -1 -2 463\n            -1.5874979726504534e-04</internalNodes>\n          <leafValues>\n            5.2845597267150879e-01 3.8878020644187927e-01\n            5.5011737346649170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 464 -6.2235877849161625e-03 -1 -2 465\n            1.3308860361576080e-03</internalNodes>\n          <leafValues>\n            2.4898290634155273e-01 4.2621460556983948e-01\n            5.9350621700286865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 466 5.2055278792977333e-03 -1 -2 467\n            1.4065169729292393e-02</internalNodes>\n          <leafValues>\n            2.5452229380607605e-01 4.8519900441169739e-01\n            7.0214188098907471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 468 -6.7384149879217148e-03 -1 -2 469\n            3.3406780567020178e-03</internalNodes>\n          <leafValues>\n            7.1432709693908691e-01 5.1757252216339111e-01\n            2.8086438775062561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 470 -1.1880699545145035e-02 -1 -2 471\n            1.4226379571482539e-03</internalNodes>\n          <leafValues>\n            5.1732218265533447e-01 4.5028659701347351e-01\n            5.7956951856613159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 472 2.9858129564672709e-03 -1 -2 473\n            -2.0481580868363380e-03</internalNodes>\n          <leafValues>\n            1.9151160120964050e-01 6.5024322271347046e-01\n            4.5593151450157166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 474 1.7122729914262891e-03 -1 -2 475\n            -1.6980869695544243e-02</internalNodes>\n          <leafValues>\n            5.3762471675872803e-01 7.0562332868576050e-01\n            4.9146059155464172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 476 -1.1290470138192177e-03 -1 -2 477\n            2.8620059601962566e-03</internalNodes>\n          <leafValues>\n            2.6787060499191284e-01 4.4108539819717407e-01\n            6.3683199882507324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 478 -3.8065758999437094e-03 -1 -2 479\n            5.9090270660817623e-03</internalNodes>\n          <leafValues>\n            2.7635639905929565e-01 4.8673018813133240e-01\n            6.7287760972976685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 480 1.1004370171576738e-03 -1 -2 481\n            -2.3396299220621586e-03</internalNodes>\n          <leafValues>\n            4.0705141425132751e-01 2.6049488782882690e-01\n            6.1548602581024170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 482 -3.6068160552531481e-03 -1 -2 483\n            4.0831189602613449e-02</internalNodes>\n          <leafValues>\n            5.7319998741149902e-01 4.9733769893646240e-01\n            7.3870068788528442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 484 -7.1082250215113163e-03 -1 -2 485\n            -9.3759730225428939e-04</internalNodes>\n          <leafValues>\n            6.9847512245178223e-01 2.6911678910255432e-01\n            4.7417798638343811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 486 -1.6740820137783885e-03 -1 -2 487\n            8.8287703692913055e-02</internalNodes>\n          <leafValues>\n            3.5510140657424927e-01 5.2446138858795166e-01\n            2.0966500043869019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 488 8.2009629113599658e-04 -1 -2 489\n            -7.6624617213383317e-04</internalNodes>\n          <leafValues>\n            4.1310968995094299e-01 4.6202930808067322e-01\n            6.7754101753234863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 490 6.5769668435677886e-04 -1 -2 491\n            -2.1304790861904621e-03</internalNodes>\n          <leafValues>\n            5.6282752752304077e-01 5.5768597126007080e-01\n            4.5776501297950745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 492 -3.7317050737328827e-04 -1 -2 493\n            -1.1172230355441570e-02</internalNodes>\n          <leafValues>\n            4.9592560529708862e-01 5.6256359815597534e-01\n            2.0471079647541046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 494 4.3435219675302505e-02 -1 -2 495\n            9.6736161503940821e-04</internalNodes>\n          <leafValues>\n            2.2421480715274811e-01 4.5333439111709595e-01\n            6.1999320983886719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 496 -3.1452889088541269e-03 -1 -2 497\n            1.5233129961416125e-03</internalNodes>\n          <leafValues>\n            6.6627562046051025e-01 5.0079882144927979e-01\n            2.3849929869174957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 498 2.0854279864579439e-03 -1 -2 499\n            3.6098200827836990e-02</internalNodes>\n          <leafValues>\n            3.7535008788108826e-01 5.1771712303161621e-01\n            1.6344930231571198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 500 1.6179570229724050e-03 -1 -2 501\n            -6.2132300809025764e-04</internalNodes>\n          <leafValues>\n            2.5873818993568420e-01 6.2995338439941406e-01\n            4.6587899327278137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 502 7.1878539165481925e-04 -1 -2 503\n            -3.9339520037174225e-02</internalNodes>\n          <leafValues>\n            3.3540761470794678e-01 2.1541289985179901e-01\n            5.2357137203216553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 504 -1.0988829890266061e-03 -1 -2 505\n            2.1191420964896679e-03</internalNodes>\n          <leafValues>\n            6.4688968658447266e-01 2.8930890560150146e-01\n            5.2548158168792725e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>53</maxWeakCount>\n      <stageThreshold>2.5609300613403320e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 506 5.2359891124069691e-03 -1 -2 507\n            -2.2169889416545630e-03</internalNodes>\n          <leafValues>\n            3.2997110486030579e-01 7.0415931940078735e-01\n            3.2354658842086792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 508 -8.2303592935204506e-03 -1 -2 509\n            -8.2303592935204506e-03</internalNodes>\n          <leafValues>\n            4.9611708521842957e-01 7.1280431747436523e-01\n            4.9611708521842957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 510 4.5343261444941163e-04 -1 -2 511\n            -4.1777061414904892e-04</internalNodes>\n          <leafValues>\n            3.2084721326828003e-01 6.6139167547225952e-01\n            3.5513329505920410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 512 2.7823769487440586e-03 -1 -2 513\n            -6.0361868236213923e-05</internalNodes>\n          <leafValues>\n            3.7101349234580994e-01 5.7463937997817993e-01\n            3.8948801159858704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 514 3.5061789676547050e-03 -1 -2 515\n            1.7013119941111654e-04</internalNodes>\n          <leafValues>\n            3.0541029572486877e-01 2.8855779767036438e-01\n            6.4877450466156006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 516 -2.3378930054605007e-03 -1 -2 517\n            -2.1369170863181353e-03</internalNodes>\n          <leafValues>\n            3.1744310259819031e-01 3.8209199905395508e-01\n            5.2328932285308838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 518 1.0250400518998504e-03 -1 -2 519\n            -4.4726220949087292e-05</internalNodes>\n          <leafValues>\n            3.6227950453758240e-01 6.5389591455459595e-01\n            4.0036809444427490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 520 5.7102291611954570e-04 -1 -2 521\n            5.7743012439459562e-04</internalNodes>\n          <leafValues>\n            3.8931730389595032e-01 5.6145328283309937e-01\n            3.6876440048217773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 522 7.9692091094329953e-04 -1 -2 523\n            3.5945948911830783e-04</internalNodes>\n          <leafValues>\n            6.4430278539657593e-01 3.3808529376983643e-01\n            5.8246481418609619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 524 4.3973900028504431e-04 -1 -2 525\n            -8.9061429025605321e-04</internalNodes>\n          <leafValues>\n            3.9387670159339905e-01 3.4279710054397583e-01\n            5.5156987905502319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 526 5.4110242053866386e-03 -1 -2 527\n            -8.5764907998964190e-04</internalNodes>\n          <leafValues>\n            3.8035380840301514e-01 6.4395052194595337e-01\n            4.1683459281921387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 528 -2.2000649943947792e-02 -1 -2 529\n            -7.8731682151556015e-03</internalNodes>\n          <leafValues>\n            6.6546010971069336e-01 4.1827228665351868e-01\n            5.6047242879867554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 530 -2.7444459497928619e-02 -1 -2 531\n            1.9792269449681044e-03</internalNodes>\n          <leafValues>\n            6.5868628025054932e-01 3.2449120283126831e-01\n            4.8828700184822083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 532 -5.6783691979944706e-03 -1 -2 533\n            1.5057219570735469e-05</internalNodes>\n          <leafValues>\n            2.2290790081024170e-01 4.1072851419448853e-01\n            5.7475912570953369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 534 -5.4136710241436958e-03 -1 -2 535\n            5.3679239936172962e-03</internalNodes>\n          <leafValues>\n            2.0657970011234283e-01 4.9264231324195862e-01\n            7.1394848823547363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 536 -3.1426660716533661e-03 -1 -2 537\n            1.0907390154898167e-02</internalNodes>\n          <leafValues>\n            6.7800867557525635e-01 5.2149301767349243e-01\n            1.1439959704875946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 538 5.8436761610209942e-03 -1 -2 539\n            9.0507230197545141e-05</internalNodes>\n          <leafValues>\n            1.9375260174274445e-01 3.8125771284103394e-01\n            5.5141878128051758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 540 -1.6345789656043053e-02 -1 -2 541\n            1.5987500082701445e-03</internalNodes>\n          <leafValues>\n            2.4740239977836609e-01 4.8177829384803772e-01\n            5.9230798482894897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 542 -4.0257978253066540e-03 -1 -2 543\n            -6.7750471644103527e-03</internalNodes>\n          <leafValues>\n            7.5082087516784668e-01 2.8798109292984009e-01\n            5.1996952295303345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 544 -3.2470689620822668e-03 -1 -2 545\n            1.5409620245918632e-03</internalNodes>\n          <leafValues>\n            3.0449101328849792e-01 4.0634828805923462e-01\n            5.6765627861022949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 546 -1.2858119793236256e-02 -1 -2 547\n            -1.4824670506641269e-04</internalNodes>\n          <leafValues>\n            9.6717558801174164e-02 4.5378330349922180e-01\n            6.1153751611709595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 548 -9.0210810303688049e-03 -1 -2 549\n            -2.8795029968023300e-02</internalNodes>\n          <leafValues>\n            4.8077508807182312e-01 3.4037950634956360e-01\n            5.2555292844772339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 550 9.0210810303688049e-03 -1 -2 551\n            7.4121179059147835e-03</internalNodes>\n          <leafValues>\n            7.5058358907699585e-01 5.4554468393325806e-01\n            3.2260689139366150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 552 -3.7217529024928808e-03 -1 -2 553\n            1.9865889847278595e-01</internalNodes>\n          <leafValues>\n            2.3118489980697632e-01 5.2710479497909546e-01\n            1.4699299633502960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 554 1.5208719560177997e-05 -1 -2 555\n            -3.9089918136596680e-03</internalNodes>\n          <leafValues>\n            3.6781388521194458e-01 7.1319299936294556e-01\n            4.9938669800758362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 556 2.5106288958340883e-03 -1 -2 557\n            2.3921660613268614e-04</internalNodes>\n          <leafValues>\n            5.3120541572570801e-01 4.6893781423568726e-01\n            5.7140219211578369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 558 6.9443131797015667e-03 -1 -2 559\n            1.2065629707649350e-03</internalNodes>\n          <leafValues>\n            6.9487977027893066e-01 4.0045049786567688e-01\n            5.8748817443847656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 560 2.5106288958340883e-03 -1 -2 561\n            1.7514040227979422e-03</internalNodes>\n          <leafValues>\n            5.3295719623565674e-01 5.5458492040634155e-01\n            3.4495818614959717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 562 -4.1978210210800171e-03 -1 -2 563\n            1.3092850567772985e-03</internalNodes>\n          <leafValues>\n            1.2171830236911774e-01 5.3750497102737427e-01\n            3.4156250953674316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 564 6.7396182566881180e-04 -1 -2 565\n            -1.0530710220336914e-02</internalNodes>\n          <leafValues>\n            4.1951790452003479e-01 3.4607538580894470e-01\n            5.1558601856231689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 566 -4.0672299265861511e-01 -1 -2 567\n            -2.6314549148082733e-02</internalNodes>\n          <leafValues>\n            5.8065678924322128e-02 1.4734490215778351e-01\n            5.5593782663345337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 568 2.2557149641215801e-03 -1 -2 569\n            1.2154860422015190e-02</internalNodes>\n          <leafValues>\n            5.4777151346206665e-01 4.2077910900115967e-01\n            5.6218808889389038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 570 -1.8436539918184280e-02 -1 -2 571\n            5.3676147945225239e-04</internalNodes>\n          <leafValues>\n            6.4471471309661865e-01 2.7651271224021912e-01\n            4.8885959386825562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 572 -2.6265541091561317e-03 -1 -2 573\n            -5.1119807176291943e-04</internalNodes>\n          <leafValues>\n            5.2646911144256592e-01 5.7853102684020996e-01\n            4.2911028861999512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 574 4.1454841266386211e-04 -1 -2 575\n            -5.5028748465701938e-04</internalNodes>\n          <leafValues>\n            3.4554108977317810e-01 6.0269188880920410e-01\n            4.1438931226730347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 576 -1.0347720235586166e-03 -1 -2 577\n            -3.3966631162911654e-03</internalNodes>\n          <leafValues>\n            6.0952937602996826e-01 6.1082822084426880e-01\n            4.7077208757400513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 578 3.1795909162610769e-03 -1 -2 579\n            -1.6528950072824955e-04</internalNodes>\n          <leafValues>\n            3.2443669438362122e-01 3.8307571411132812e-01\n            5.7343262434005737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 580 8.3725210279226303e-03 -1 -2 581\n            -2.5799809955060482e-03</internalNodes>\n          <leafValues>\n            6.6109192371368408e-01 6.1393070220947266e-01\n            4.6861499547958374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 582 9.0194388758391142e-04 -1 -2 583\n            3.6952210939489305e-04</internalNodes>\n          <leafValues>\n            3.5200220346450806e-01 2.5787541270256042e-01\n            5.4672420024871826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 584 9.9746137857437134e-04 -1 -2 585\n            -3.6688039544969797e-03</internalNodes>\n          <leafValues>\n            4.8201468586921692e-01 5.7101500034332275e-01\n            4.8319110274314880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 586 -8.9501030743122101e-04 -1 -2 587\n            5.1904921419918537e-03</internalNodes>\n          <leafValues>\n            6.1336791515350342e-01 4.9285829067230225e-01\n            2.5813090801239014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 588 4.2274440056644380e-04 -1 -2 589\n            8.5176713764667511e-03</internalNodes>\n          <leafValues>\n            4.4711241126060486e-01 5.1610249280929565e-01\n            3.3165338635444641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 590 -3.6623608320951462e-02 -1 -2 591\n            -4.1103712283074856e-03</internalNodes>\n          <leafValues>\n            9.2606216669082642e-02 8.5221147537231445e-01\n            5.1379078626632690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 592 -6.6017331555485725e-03 -1 -2 593\n            2.5578640401363373e-02</internalNodes>\n          <leafValues>\n            5.4590600728988647e-01 5.2193528413772583e-01\n            1.9271859526634216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 594 1.1447439901530743e-02 -1 -2 595\n            7.2427501436322927e-04</internalNodes>\n          <leafValues>\n            1.9160020351409912e-01 5.2315711975097656e-01\n            3.5353401303291321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 596 9.7127500921487808e-03 -1 -2 597\n            -1.1337569914758205e-02</internalNodes>\n          <leafValues>\n            6.4641010761260986e-01 7.3830378055572510e-01\n            4.9647438526153564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 598 -8.1453882157802582e-03 -1 -2 599\n            -8.5570756345987320e-03</internalNodes>\n          <leafValues>\n            3.6117058992385864e-01 3.4219071269035339e-01\n            5.9435117244720459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 600 2.2993308957666159e-03 -1 -2 601\n            3.8430930580943823e-03</internalNodes>\n          <leafValues>\n            4.5501041412353516e-01 4.7168621420860291e-01\n            6.6561907529830933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 602 -9.9116540513932705e-04 -1 -2 603\n            2.5496469810605049e-02</internalNodes>\n          <leafValues>\n            4.5927169919013977e-01 6.5634012222290039e-01\n            1.2588350474834442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 604 -1.5748359262943268e-02 -1 -2 605\n            -1.8046120181679726e-02</internalNodes>\n          <leafValues>\n            5.2395021915435791e-01 8.0158519744873047e-01\n            5.0079578161239624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 606 1.0323390364646912e-02 -1 -2 607\n            1.6452240524813533e-03</internalNodes>\n          <leafValues>\n            2.2748200595378876e-01 4.3519461154937744e-01\n            5.8676278591156006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 608 1.5881149098277092e-02 -1 -2 609\n            1.0586519725620747e-02</internalNodes>\n          <leafValues>\n            4.4650518894195557e-01 4.5444580912590027e-01\n            5.7071107625961304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 610 -2.1531689912080765e-02 -1 -2 611\n            5.2480469457805157e-03</internalNodes>\n          <leafValues>\n            6.5276437997817993e-01 3.4447279572486877e-01\n            5.3246361017227173e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>67</maxWeakCount>\n      <stageThreshold>3.2647129058837891e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 612 1.8219340126961470e-03 -1 -2 613\n            8.1313941627740860e-03</internalNodes>\n          <leafValues>\n            3.1087881326675415e-01 3.1332370638847351e-01\n            6.6458672285079956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 614 1.7055979697033763e-03 -1 -2 615\n            -7.4483548814896494e-05</internalNodes>\n          <leafValues>\n            2.6401311159133911e-01 5.6472051143646240e-01\n            3.4853729605674744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 616 3.8342390325851738e-04 -1 -2 617\n            3.1868910882622004e-03</internalNodes>\n          <leafValues>\n            3.1406548619270325e-01 6.4891988039016724e-01\n            3.8877290487289429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 618 1.6044320166110992e-01 -1 -2 619\n            -6.7285560071468353e-03</internalNodes>\n          <leafValues>\n            7.2165298461914062e-01 1.6531379520893097e-01\n            5.1398259401321411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 620 7.2638481469766703e-06 -1 -2 621\n            5.5551197146996856e-04</internalNodes>\n          <leafValues>\n            3.1406199932098389e-01 5.9936988353729248e-01\n            3.3173981308937073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 622 -1.0822320356965065e-02 -1 -2 623\n            -4.5834020711481571e-03</internalNodes>\n          <leafValues>\n            2.6529380679130554e-01 1.8495689332485199e-01\n            5.3139579296112061e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 624 -3.0205070506781340e-03 -1 -2 625\n            7.7864617109298706e-02</internalNodes>\n          <leafValues>\n            4.0400999784469604e-01 6.1581897735595703e-01\n            1.7864869534969330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 626 2.6494380086660385e-02 -1 -2 627\n            3.6912109702825546e-02</internalNodes>\n          <leafValues>\n            4.5110899209976196e-01 4.5282199978828430e-01\n            5.9722828865051270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 628 5.7857790961861610e-03 -1 -2 629\n            9.3849771656095982e-04</internalNodes>\n          <leafValues>\n            2.5338920950889587e-01 3.4104120731353760e-01\n            5.9236437082290649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 630 -1.1003199964761734e-02 -1 -2 631\n            -1.1737640015780926e-03</internalNodes>\n          <leafValues>\n            6.9580441713333130e-01 3.8510841131210327e-01\n            5.4081892967224121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 632 -3.6596669815480709e-03 -1 -2 633\n            -2.4822750128805637e-03</internalNodes>\n          <leafValues>\n            2.0093089342117310e-01 6.2953931093215942e-01\n            4.3950408697128296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 634 -4.4606071896851063e-03 -1 -2 635\n            -3.5969649907201529e-03</internalNodes>\n          <leafValues>\n            2.4052999913692474e-01 5.4501742124557495e-01\n            3.7823578715324402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 636 -3.6222559865564108e-03 -1 -2 637\n            1.2059339787811041e-03</internalNodes>\n          <leafValues>\n            3.0338969826698303e-01 4.6337789297103882e-01\n            6.3359522819519043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 638 4.3124938383698463e-03 -1 -2 639\n            -4.4961250387132168e-03</internalNodes>\n          <leafValues>\n            6.5988260507583618e-01 6.6216969490051270e-01\n            4.7552469372749329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 640 -1.3860689941793680e-03 -1 -2 641\n            -5.1588460337370634e-04</internalNodes>\n          <leafValues>\n            2.8012010455131531e-01 3.8294890522956848e-01\n            5.6236267089843750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 642 7.0330002927221358e-05 -1 -2 643\n            -2.0976549421902746e-04</internalNodes>\n          <leafValues>\n            4.5363429188728333e-01 5.6081390380859375e-01\n            4.2657798528671265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 644 1.3642259873449802e-03 -1 -2 645\n            1.5483660390600562e-03</internalNodes>\n          <leafValues>\n            2.6370918750762939e-01 4.1707509756088257e-01\n            5.9329879283905029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 646 1.9179609417915344e-01 -1 -2 647\n            -4.4776909053325653e-03</internalNodes>\n          <leafValues>\n            5.2567642927169800e-01 6.6326218843460083e-01\n            4.8925888538360596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 648 -1.2649179995059967e-01 -1 -2 649\n            6.5253327193204314e-05</internalNodes>\n          <leafValues>\n            1.4997789263725281e-01 4.2333200573921204e-01\n            5.7560402154922485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 650 4.1856421157717705e-03 -1 -2 651\n            2.7478230185806751e-04</internalNodes>\n          <leafValues>\n            5.2888268232345581e-01 4.5240178704261780e-01\n            5.6041252613067627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 652 -2.2906810045242310e-03 -1 -2 653\n            1.6744500026106834e-03</internalNodes>\n          <leafValues>\n            5.5782741308212280e-01 3.3230578899383545e-01\n            5.5587881803512573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 654 1.2349759927019477e-03 -1 -2 655\n            -8.7158754467964172e-03</internalNodes>\n          <leafValues>\n            3.6539471149444580e-01 1.9245339930057526e-01\n            5.3136497735977173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 656 4.6613621525466442e-03 -1 -2 657\n            -8.5815992206335068e-03</internalNodes>\n          <leafValues>\n            2.0277309417724609e-01 7.6360601186752319e-01\n            5.1408261060714722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 658 1.4352120459079742e-02 -1 -2 659\n            -7.7948719263076782e-03</internalNodes>\n          <leafValues>\n            5.2529758214950562e-01 2.6329371333122253e-01\n            5.3286892175674438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 660 -3.4155680332332850e-03 -1 -2 661\n            -4.2639090679585934e-03</internalNodes>\n          <leafValues>\n            2.4160879850387573e-01 3.9365449547767639e-01\n            5.4787421226501465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 662 8.7177697569131851e-03 -1 -2 663\n            -3.2232629600912333e-03</internalNodes>\n          <leafValues>\n            4.7881990671157837e-01 3.6316120624542236e-01\n            5.2883160114288330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 664 -4.2188368737697601e-02 -1 -2 665\n            1.9875749945640564e-02</internalNodes>\n          <leafValues>\n            6.9311392307281494e-01 4.5201000571250916e-01\n            6.8550550937652588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 666 -3.1134510412812233e-02 -1 -2 667\n            5.7032387703657150e-03</internalNodes>\n          <leafValues>\n            5.3004240989685059e-01 5.6068921089172363e-01\n            4.2306229472160339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 668 5.2733682096004486e-03 -1 -2 669\n            -3.1231069006025791e-03</internalNodes>\n          <leafValues>\n            3.2472288608551025e-01 1.9856959581375122e-01\n            5.3498727083206177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 670 4.6453849063254893e-04 -1 -2 671\n            3.0355889350175858e-02</internalNodes>\n          <leafValues>\n            4.2075088620185852e-01 5.1534587144851685e-01\n            3.1181010603904724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 672 -4.2992769740521908e-03 -1 -2 673\n            1.9509199773892760e-04</internalNodes>\n          <leafValues>\n            3.2745069265365601e-01 5.9530782699584961e-01\n            4.2255210876464844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 674 -7.7784480527043343e-03 -1 -2 675\n            1.6917599365115166e-02</internalNodes>\n          <leafValues>\n            7.2111797332763672e-01 4.9365919828414917e-01\n            7.0302772521972656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 676 -5.1948569715023041e-02 -1 -2 677\n            -5.4751220159232616e-03</internalNodes>\n          <leafValues>\n            1.4255349338054657e-01 6.0593318939208984e-01\n            4.3939951062202454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 678 1.5210839592327829e-05 -1 -2 679\n            1.0235579684376717e-03</internalNodes>\n          <leafValues>\n            4.4888499379158020e-01 4.2565500736236572e-01\n            5.7954382896423340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 680 -1.0427719826111570e-04 -1 -2 681\n            8.7853781878948212e-03</internalNodes>\n          <leafValues>\n            4.2460399866104126e-01 4.9580091238021851e-01\n            6.7594307661056519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 682 3.4012699034065008e-03 -1 -2 683\n            5.8582378551363945e-04</internalNodes>\n          <leafValues>\n            5.4234808683395386e-01 3.6365428566932678e-01\n            5.4643487930297852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 684 -2.2973360028117895e-03 -1 -2 685\n            -1.4330189675092697e-02</internalNodes>\n          <leafValues>\n            2.5488188862800598e-01 6.5876567363739014e-01\n            4.5328021049499512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 686 9.8565965890884399e-04 -1 -2 687\n            -4.6640761196613312e-02</internalNodes>\n          <leafValues>\n            3.8227710127830505e-01 3.0773219466209412e-01\n            5.2441328763961792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 688 -1.1907300353050232e-01 -1 -2 689\n            1.9333280622959137e-02</internalNodes>\n          <leafValues>\n            1.0338629782199860e-01 5.5547451972961426e-01\n            3.2213169336318970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 690 3.1427849084138870e-02 -1 -2 691\n            2.0082130504306406e-04</internalNodes>\n          <leafValues>\n            4.6823790669441223e-01 5.3730702400207520e-01\n            3.8006669282913208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 692 -6.2584900297224522e-03 -1 -2 693\n            8.2861045375466347e-03</internalNodes>\n          <leafValues>\n            1.7992070317268372e-01 5.0950688123703003e-01\n            7.5446051359176636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 694 2.0529709290713072e-03 -1 -2 695\n            3.2524869311600924e-03</internalNodes>\n          <leafValues>\n            5.6286448240280151e-01 4.8016890883445740e-01\n            5.8021020889282227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 696 -3.1884901225566864e-02 -1 -2 697\n            1.8379340181127191e-03</internalNodes>\n          <leafValues>\n            1.7427450418472290e-01 3.4665969014167786e-01\n            5.1071548461914062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 698 -4.8512680223211646e-04 -1 -2 699\n            -2.5407879147678614e-03</internalNodes>\n          <leafValues>\n            5.3260862827301025e-01 6.3427752256393433e-01\n            4.9926930665969849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 700 -5.1559060811996460e-03 -1 -2 701\n            -4.4968750327825546e-02</internalNodes>\n          <leafValues>\n            3.4334290027618408e-01 1.8681369721889496e-01\n            5.2154648303985596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 702 5.8984281495213509e-03 -1 -2 703\n            3.2763120252639055e-03</internalNodes>\n          <leafValues>\n            6.2293052673339844e-01 4.9357721209526062e-01\n            7.2179448604583740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 704 -1.0161520185647532e-04 -1 -2 705\n            -1.6290300118271261e-04</internalNodes>\n          <leafValues>\n            5.0079762935638428e-01 6.0241490602493286e-01\n            2.3295080661773682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 706 9.0541364625096321e-03 -1 -2 707\n            3.5398490726947784e-02</internalNodes>\n          <leafValues>\n            4.5104169845581055e-01 5.1419967412948608e-01\n            2.8602918982505798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 708 5.6469351984560490e-03 -1 -2 709\n            -2.4807190056890249e-03</internalNodes>\n          <leafValues>\n            4.7049251198768616e-01 4.1798511147499084e-01\n            6.7266470193862915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 710 -4.1088787838816643e-03 -1 -2 711\n            -2.0714469719678164e-03</internalNodes>\n          <leafValues>\n            5.8098018169403076e-01 6.0747838020324707e-01\n            4.5240598917007446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 712 -2.8939060866832733e-03 -1 -2 713\n            1.3467279495671391e-03</internalNodes>\n          <leafValues>\n            3.3835199475288391e-01 5.6969100236892700e-01\n            3.9708450436592102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 714 -9.0779133141040802e-02 -1 -2 715\n            -8.3171762526035309e-02</internalNodes>\n          <leafValues>\n            1.5027019381523132e-01 7.5736707448959351e-01\n            4.9364370107650757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 716 -1.4107000315561891e-03 -1 -2 717\n            5.5668760091066360e-02</internalNodes>\n          <leafValues>\n            3.3909329771995544e-01 5.0250971317291260e-01\n            7.4220830202102661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 718 5.7701539248228073e-02 -1 -2 719\n            -4.2503291368484497e-01</internalNodes>\n          <leafValues>\n            5.1973718404769897e-01 9.7346916794776917e-02\n            5.1857399940490723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 720 -4.4380719191394746e-04 -1 -2 721\n            1.7924769781529903e-04</internalNodes>\n          <leafValues>\n            3.6493501067161560e-01 5.6192791461944580e-01\n            3.7602970004081726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 722 5.0382469780743122e-03 -1 -2 723\n            1.5191170386970043e-02</internalNodes>\n          <leafValues>\n            6.3284450769424438e-01 4.9360820651054382e-01\n            7.4265247583389282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 724 -1.2300389818847179e-02 -1 -2 725\n            1.5168030513450503e-03</internalNodes>\n          <leafValues>\n            1.3893499970436096e-01 5.0919622182846069e-01\n            3.4826481342315674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 726 9.5754547510296106e-04 -1 -2 727\n            -1.8962200731039047e-02</internalNodes>\n          <leafValues>\n            6.0363167524337769e-01 2.3191730678081512e-01\n            5.1166528463363647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 728 -2.2272260859608650e-02 -1 -2 729\n            -2.5145230814814568e-02</internalNodes>\n          <leafValues>\n            6.5550220012664795e-01 1.3260710239410400e-01\n            4.6740341186523438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 730 1.9533900544047356e-02 -1 -2 731\n            -1.1231349781155586e-03</internalNodes>\n          <leafValues>\n            5.1820272207260132e-01 6.3182431459426880e-01\n            4.8255190253257751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 732 -1.4861139934509993e-03 -1 -2 733\n            3.5002888762392104e-04</internalNodes>\n          <leafValues>\n            2.9186710715293884e-01 5.6213712692260742e-01\n            4.2492130398750305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 734 -1.1231349781155586e-03 -1 -2 735\n            1.0409739799797535e-02</internalNodes>\n          <leafValues>\n            4.8137450218200684e-01 5.1840060949325562e-01\n            2.0512230694293976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 736 -8.7832562625408173e-02 -1 -2 737\n            1.6584879485890269e-03</internalNodes>\n          <leafValues>\n            1.1799219995737076e-01 4.9878111481666565e-01\n            6.9737559556961060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 738 -2.3008750285953283e-03 -1 -2 739\n            3.3026169985532761e-02</internalNodes>\n          <leafValues>\n            5.3398311138153076e-01 5.0332891941070557e-01\n            6.8519067764282227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 740 -1.3585069682449102e-03 -1 -2 741\n            7.8067491995170712e-04</internalNodes>\n          <leafValues>\n            3.0028221011161804e-01 4.5930838584899902e-01\n            6.4400452375411987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 742 -1.8025759607553482e-02 -1 -2 743\n            1.2354910140857100e-03</internalNodes>\n          <leafValues>\n            5.3112912178039551e-01 4.7291061282157898e-01\n            5.7214611768722534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 744 -9.2583027435466647e-04 -1 -2 745\n            8.0123997759073973e-04</internalNodes>\n          <leafValues>\n            3.6623328924179077e-01 5.3619897365570068e-01\n            3.0086329579353333e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>63</maxWeakCount>\n      <stageThreshold>3.0672130584716797e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 746 2.4914839304983616e-03 -1 -2 747\n            -5.0488598644733429e-02</internalNodes>\n          <leafValues>\n            3.4223890304565430e-01 7.7034580707550049e-01\n            4.5163908600807190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 748 -7.7838351717218757e-04 -1 -2 749\n            2.3572890495415777e-04</internalNodes>\n          <leafValues>\n            3.2563421130180359e-01 3.4065559506416321e-01\n            5.8970272541046143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 750 4.5575071126222610e-03 -1 -2 751\n            8.1241987645626068e-03</internalNodes>\n          <leafValues>\n            4.3065789341926575e-01 7.1495872735977173e-01\n            4.3456849455833435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 752 -4.4612158671952784e-04 -1 -2 753\n            -2.8972938889637589e-04</internalNodes>\n          <leafValues>\n            3.2959741353988647e-01 5.8456200361251831e-01\n            3.5266879200935364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 754 7.1604831646254752e-06 -1 -2 755\n            -3.8497708737850189e-04</internalNodes>\n          <leafValues>\n            4.0819549560546875e-01 4.2031130194664001e-01\n            6.6341269016265869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 756 1.9489860278554261e-04 -1 -2 757\n            -1.7083849757909775e-02</internalNodes>\n          <leafValues>\n            3.9424669742584229e-01 2.2940720617771149e-01\n            5.2389609813690186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 758 8.3513697609305382e-04 -1 -2 759\n            7.5499608647078276e-04</internalNodes>\n          <leafValues>\n            3.0260318517684937e-01 6.0321962833404541e-01\n            3.4124588966369629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 760 8.0216713249683380e-03 -1 -2 761\n            -3.8930509239435196e-02</internalNodes>\n          <leafValues>\n            7.3062407970428467e-01 3.5993251204490662e-01\n            5.2343809604644775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 762 -7.0348767621908337e-05 -1 -2 763\n            -8.5350573062896729e-03</internalNodes>\n          <leafValues>\n            3.4937581419944763e-01 2.7461090683937073e-01\n            5.6265860795974731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 764 1.0854450054466724e-02 -1 -2 765\n            4.5329501153901219e-04</internalNodes>\n          <leafValues>\n            5.2822262048721313e-01 4.5220491290092468e-01\n            6.0543018579483032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 766 1.8117150466423482e-04 -1 -2 767\n            4.6641560038551688e-04</internalNodes>\n          <leafValues>\n            3.3068621158599854e-01 1.4550000429153442e-01\n            5.3849279880523682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 768 -8.4854792803525925e-03 -1 -2 769\n            -1.8934309482574463e-02</internalNodes>\n          <leafValues>\n            4.8141559958457947e-01 3.5637411475181580e-01\n            5.4051452875137329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 770 4.9814549274742603e-03 -1 -2 771\n            3.4286780282855034e-03</internalNodes>\n          <leafValues>\n            6.9577431678771973e-01 5.0508928298950195e-01\n            2.3169949650764465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 772 4.4203791185282171e-04 -1 -2 773\n            2.3822550429031253e-04</internalNodes>\n          <leafValues>\n            6.0185819864273071e-01 4.7550821304321289e-01\n            5.5852377414703369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 774 -6.4261639490723610e-03 -1 -2 775\n            9.9637769162654877e-03</internalNodes>\n          <leafValues>\n            2.2824659943580627e-01 4.0405881404876709e-01\n            5.6501698493957520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 776 1.3654050417244434e-02 -1 -2 777\n            -9.9892877042293549e-03</internalNodes>\n          <leafValues>\n            5.2677392959594727e-01 6.7940497398376465e-01\n            4.7970339655876160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 778 3.6558631807565689e-02 -1 -2 779\n            4.8999379941960797e-05</internalNodes>\n          <leafValues>\n            8.8425733149051666e-02 4.0207880735397339e-01\n            5.4573321342468262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 780 1.3654050417244434e-02 -1 -2 781\n            1.8802779959514737e-03</internalNodes>\n          <leafValues>\n            5.2676129341125488e-01 4.8060521483421326e-01\n            6.3943648338317871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 782 -1.3654050417244434e-02 -1 -2 783\n            1.2778700329363346e-03</internalNodes>\n          <leafValues>\n            1.7248100042343140e-01 4.4798240065574646e-01\n            6.3100087642669678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 784 9.8843395244330168e-04 -1 -2 785\n            1.4511500012304168e-05</internalNodes>\n          <leafValues>\n            5.9481692314147949e-01 4.8541748523712158e-01\n            5.3093612194061279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 786 -2.2775429533794522e-04 -1 -2 787\n            -1.4753740280866623e-02</internalNodes>\n          <leafValues>\n            3.1836318969726562e-01 3.0849760770797729e-01\n            5.3520262241363525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 788 -3.4148250706493855e-03 -1 -2 789\n            7.5806681998074055e-03</internalNodes>\n          <leafValues>\n            6.1153268814086914e-01 4.9516460299491882e-01\n            7.0613312721252441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 790 -5.7734688743948936e-03 -1 -2 791\n            7.4033669079653919e-05</internalNodes>\n          <leafValues>\n            3.7542209029197693e-01 4.1155171394348145e-01\n            5.8894449472427368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 792 -8.2278084009885788e-03 -1 -2 793\n            5.3380909375846386e-03</internalNodes>\n          <leafValues>\n            9.5610566437244415e-02 5.3005087375640869e-01\n            3.9618980884552002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 794 -2.7049109339714050e-03 -1 -2 795\n            7.7341338619589806e-03</internalNodes>\n          <leafValues>\n            6.4818692207336426e-01 5.1104402542114258e-01\n            3.1215190887451172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 796 1.0886609554290771e-02 -1 -2 797\n            1.1038660071790218e-02</internalNodes>\n          <leafValues>\n            4.8014289140701294e-01 5.4297101497650146e-01\n            4.1623631119728088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 798 -1.0054199956357479e-02 -1 -2 799\n            7.7072880230844021e-03</internalNodes>\n          <leafValues>\n            7.3293352127075195e-01 5.3568720817565918e-01\n            3.4555470943450928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 800 -5.8278098003938794e-04 -1 -2 801\n            -2.5739220436662436e-03</internalNodes>\n          <leafValues>\n            3.6550220847129822e-01 3.7767601013183594e-01\n            5.3917747735977173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 802 -7.0167761296033859e-03 -1 -2 803\n            -1.7727289814502001e-03</internalNodes>\n          <leafValues>\n            4.0393048524856567e-01 6.9504439830780029e-01\n            4.9811169505119324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 804 -1.6318289563059807e-02 -1 -2 805\n            -1.1663000099360943e-02</internalNodes>\n          <leafValues>\n            5.2967327833175659e-01 5.8426398038864136e-01\n            4.7895029187202454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 806 2.5881489273160696e-03 -1 -2 807\n            -3.7328999023884535e-03</internalNodes>\n          <leafValues>\n            6.0921788215637207e-01 6.7217427492141724e-01\n            4.0668940544128418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 808 -1.4355930034071207e-03 -1 -2 809\n            1.8340899841859937e-03</internalNodes>\n          <leafValues>\n            3.5850879549980164e-01 5.3711581230163574e-01\n            4.0335071086883545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 810 1.2280289828777313e-01 -1 -2 811\n            5.0228700041770935e-02</internalNodes>\n          <leafValues>\n            1.5475720167160034e-01 5.4338437318801880e-01\n            8.4292672574520111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 812 -2.1437000483274460e-02 -1 -2 813\n            -3.1009620055556297e-02</internalNodes>\n          <leafValues>\n            4.8600539565086365e-01 1.8330100178718567e-01\n            5.2075541019439697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 814 -1.2973720207810402e-02 -1 -2 815\n            1.5818020328879356e-03</internalNodes>\n          <leafValues>\n            7.0482409000396729e-01 4.1705870628356934e-01\n            5.8651638031005859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 816 -9.7806248813867569e-03 -1 -2 817\n            1.1735740117728710e-03</internalNodes>\n          <leafValues>\n            5.3079181909561157e-01 5.5224531888961792e-01\n            3.5071650147438049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 818 1.4651629608124495e-03 -1 -2 819\n            2.3532148916274309e-03</internalNodes>\n          <leafValues>\n            3.0426511168479919e-01 5.3393232822418213e-01\n            2.8062361478805542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 820 -6.1809681355953217e-03 -1 -2 821\n            6.5688649192452431e-04</internalNodes>\n          <leafValues>\n            6.4101332426071167e-01 5.6208711862564087e-01\n            4.3903189897537231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 822 2.6228010654449463e-02 -1 -2 823\n            -1.7958110198378563e-02</internalNodes>\n          <leafValues>\n            6.4455568790435791e-01 2.0027139782905579e-01\n            4.6246650815010071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 824 -7.6468721963465214e-03 -1 -2 825\n            -2.7482809964567423e-03</internalNodes>\n          <leafValues>\n            5.2632009983062744e-01 5.8739811182022095e-01\n            4.8366001248359680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 826 1.3851850293576717e-02 -1 -2 827\n            2.6369190309196711e-03</internalNodes>\n          <leafValues>\n            1.5661309659481049e-01 4.2701789736747742e-01\n            5.8066600561141968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 828 -3.1513599678874016e-03 -1 -2 829\n            -1.4788460248382762e-05</internalNodes>\n          <leafValues>\n            6.2158662080764771e-01 5.5766427516937256e-01\n            4.1220021247863770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 830 -7.3676988482475281e-02 -1 -2 831\n            -3.0912780202925205e-03</internalNodes>\n          <leafValues>\n            1.5367099642753601e-01 6.3442689180374146e-01\n            4.5074120163917542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 832 7.9240966588258743e-03 -1 -2 833\n            8.5778040811419487e-03</internalNodes>\n          <leafValues>\n            5.4579752683639526e-01 5.4016572237014771e-01\n            3.8907998800277710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 834 5.5403169244527817e-03 -1 -2 835\n            -1.1886510037584230e-04</internalNodes>\n          <leafValues>\n            3.5556110739707947e-01 5.8367502689361572e-01\n            4.2743161320686340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 836 -1.8408369272947311e-02 -1 -2 837\n            -2.3490579333156347e-03</internalNodes>\n          <leafValues>\n            5.8604401350021362e-01 4.4989579916000366e-01\n            5.4981988668441772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 838 -7.6157399453222752e-03 -1 -2 839\n            -3.3190969843417406e-03</internalNodes>\n          <leafValues>\n            4.1009929776191711e-01 6.7013788223266602e-01\n            4.3530011177062988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 840 -9.4642979092895985e-04 -1 -2 841\n            8.7858550250530243e-03</internalNodes>\n          <leafValues>\n            5.3911769390106201e-01 5.5040502548217773e-01\n            3.9909350872039795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 842 1.6395459533669055e-04 -1 -2 843\n            -2.3508940357714891e-03</internalNodes>\n          <leafValues>\n            3.5929331183433533e-01 4.0341728925704956e-01\n            5.8060771226882935e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 844 7.5449963333085179e-05 -1 -2 845\n            2.7018489316105843e-02</internalNodes>\n          <leafValues>\n            5.4123848676681519e-01 4.9449229240417480e-01\n            5.5894362926483154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 846 8.4561208495870233e-04 -1 -2 847\n            -1.1687109945341945e-03</internalNodes>\n          <leafValues>\n            5.8092182874679565e-01 4.7469571232795715e-01\n            2.8458958864212036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 848 2.2897500544786453e-02 -1 -2 849\n            7.0879262685775757e-01</internalNodes>\n          <leafValues>\n            2.4144110083580017e-01 5.1957648992538452e-01\n            1.0300920158624649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 850 3.7483830004930496e-02 -1 -2 851\n            1.2827500468119979e-03</internalNodes>\n          <leafValues>\n            1.8146389722824097e-01 4.2460718750953674e-01\n            5.7079732418060303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 852 -5.1718312315642834e-03 -1 -2 853\n            2.7545939665287733e-03</internalNodes>\n          <leafValues>\n            6.1433231830596924e-01 5.2056711912155151e-01\n            4.2204418778419495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 854 -3.6072919610887766e-03 -1 -2 855\n            -2.5258748792111874e-04</internalNodes>\n          <leafValues>\n            3.1825920939445496e-01 5.7104682922363281e-01\n            4.2260938882827759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 856 -7.0514748804271221e-03 -1 -2 857\n            -5.4323761723935604e-03</internalNodes>\n          <leafValues>\n            5.1628297567367554e-01 2.6662889122962952e-01\n            5.2146798372268677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 858 -1.4652940080850385e-05 -1 -2 859\n            -1.8556920113041997e-03</internalNodes>\n          <leafValues>\n            3.9817610383033752e-01 3.3227631449699402e-01\n            5.7058340311050415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 860 4.7609540633857250e-03 -1 -2 861\n            1.5676260227337480e-03</internalNodes>\n          <leafValues>\n            6.6365581750869751e-01 5.5055677890777588e-01\n            4.4206619262695312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 862 5.4239919409155846e-03 -1 -2 863\n            -6.4692399464547634e-03</internalNodes>\n          <leafValues>\n            5.9599381685256958e-01 5.3695940971374512e-01\n            3.7443399429321289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 864 -7.8038539504632354e-04 -1 -2 865\n            4.5086450874805450e-02</internalNodes>\n          <leafValues>\n            4.1035950183868408e-01 5.1775068044662476e-01\n            1.8781000375747681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 866 -5.1405387930572033e-03 -1 -2 867\n            -2.1236129105091095e-02</internalNodes>\n          <leafValues>\n            2.3528920114040375e-01 1.7087510228157043e-01\n            5.4249739646911621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 868 -2.3763340432196856e-03 -1 -2 869\n            5.4122589528560638e-02</internalNodes>\n          <leafValues>\n            5.8365309238433838e-01 5.1174330711364746e-01\n            1.8659310042858124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 870 -5.3492980077862740e-04 -1 -2 871\n            -5.8454048121348023e-04</internalNodes>\n          <leafValues>\n            5.1086932420730591e-01 4.7754910588264465e-01\n            2.4398539960384369e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>71</maxWeakCount>\n      <stageThreshold>3.4677078247070312e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 872 3.0031939968466759e-03 -1 -2 873\n            6.9161207647994161e-04</internalNodes>\n          <leafValues>\n            3.3496499061584473e-01 4.5183679461479187e-01\n            7.2893542051315308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 874 1.1212790384888649e-02 -1 -2 875\n            -7.6108198845759034e-04</internalNodes>\n          <leafValues>\n            2.9508009552955627e-01 5.6690549850463867e-01\n            2.8308510780334473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 876 1.1984579759882763e-04 -1 -2 877\n            -1.9725349557120353e-04</internalNodes>\n          <leafValues>\n            4.0905779600143433e-01 6.9514942169189453e-01\n            4.6378681063652039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 878 -5.5180420167744160e-03 -1 -2 879\n            1.2148249661549926e-03</internalNodes>\n          <leafValues>\n            3.1676751375198364e-01 3.3167061209678650e-01\n            5.3963977098464966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 880 -4.2497441172599792e-03 -1 -2 881\n            -9.4915721565485001e-03</internalNodes>\n          <leafValues>\n            2.6005738973617554e-01 7.4842947721481323e-01\n            5.0731921195983887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 882 6.5378600265830755e-04 -1 -2 883\n            -4.9741100519895554e-04</internalNodes>\n          <leafValues>\n            3.9520108699798584e-01 5.8802747726440430e-01\n            3.5521200299263000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 884 -4.3079249560832977e-02 -1 -2 885\n            -5.1999092102050781e-04</internalNodes>\n          <leafValues>\n            2.4348780512809753e-01 3.1955629587173462e-01\n            5.5854547023773193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 886 -4.5451628975570202e-03 -1 -2 887\n            -7.9610403627157211e-03</internalNodes>\n          <leafValues>\n            4.8452898859977722e-01 3.8011810183525085e-01\n            5.3585118055343628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 888 -3.1919340835884213e-04 -1 -2 889\n            -1.9223889335989952e-02</internalNodes>\n          <leafValues>\n            4.3563291430473328e-01 2.6130661368370056e-01\n            6.1554962396621704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 890 -1.3076990144327283e-03 -1 -2 891\n            1.9825039431452751e-02</internalNodes>\n          <leafValues>\n            5.9420621395111084e-01 4.9454280734062195e-01\n            7.3848551511764526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 892 -2.2013280540704727e-03 -1 -2 893\n            -7.8596705570816994e-03</internalNodes>\n          <leafValues>\n            2.2144819796085358e-01 3.6009770631790161e-01\n            5.2985501289367676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 894 1.4142199652269483e-03 -1 -2 895\n            -1.1232759803533554e-02</internalNodes>\n          <leafValues>\n            5.7765662670135498e-01 6.9344568252563477e-01\n            4.8272070288658142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 896 2.9746301006525755e-03 -1 -2 897\n            5.3283828310668468e-04</internalNodes>\n          <leafValues>\n            3.2166770100593567e-01 3.9625000953674316e-01\n            5.6803637742996216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 898 1.0105259716510773e-02 -1 -2 899\n            -1.1653699912130833e-02</internalNodes>\n          <leafValues>\n            7.5674182176589966e-01 6.5235567092895508e-01\n            5.0270539522171021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 900 -7.0609981194138527e-03 -1 -2 901\n            2.2343141026794910e-03</internalNodes>\n          <leafValues>\n            2.5387701392173767e-01 4.3872770667076111e-01\n            6.1776322126388550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 902 -2.9802279546856880e-02 -1 -2 903\n            1.1611840454861522e-03</internalNodes>\n          <leafValues>\n            5.2011400461196899e-01 4.6479099988937378e-01\n            6.1842548847198486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 904 9.4824447296559811e-04 -1 -2 905\n            4.1284630424343050e-04</internalNodes>\n          <leafValues>\n            3.0409941077232361e-01 4.5188081264495850e-01\n            6.2457829713821411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 906 -3.1203540042042732e-02 -1 -2 907\n            2.7652881108224392e-03</internalNodes>\n          <leafValues>\n            2.7889358997344971e-01 4.6985000371932983e-01\n            6.5024542808532715e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 908 2.5644779205322266e-02 -1 -2 909\n            -7.5331530533730984e-03</internalNodes>\n          <leafValues>\n            1.8051710724830627e-01 3.2080689072608948e-01\n            5.5220228433609009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 910 3.2047149725258350e-03 -1 -2 911\n            -2.4282479716930538e-04</internalNodes>\n          <leafValues>\n            6.4369338750839233e-01 5.6767052412033081e-01\n            4.5091038942337036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 912 -6.1979342717677355e-04 -1 -2 913\n            -8.0101029016077518e-04</internalNodes>\n          <leafValues>\n            3.1221461296081543e-01 2.9651939868927002e-01\n            5.2304947376251221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 914 -9.1816839994862676e-04 -1 -2 915\n            1.2239529751241207e-03</internalNodes>\n          <leafValues>\n            5.4647117853164673e-01 4.6185028553009033e-01\n            5.6795489788055420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 916 -6.8743730662390590e-04 -1 -2 917\n            -1.8252469599246979e-03</internalNodes>\n          <leafValues>\n            5.4308801889419556e-01 5.4336231946945190e-01\n            3.3852210640907288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 918 -7.4570789001882076e-03 -1 -2 919\n            5.3775748237967491e-03</internalNodes>\n          <leafValues>\n            5.2655947208404541e-01 4.8572158813476562e-01\n            6.8151241540908813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 920 3.7602309603244066e-03 -1 -2 921\n            8.7752222316339612e-04</internalNodes>\n          <leafValues>\n            2.8321608901023865e-01 3.9668309688568115e-01\n            5.5124807357788086e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 922 5.5084479972720146e-03 -1 -2 923\n            -7.5949047459289432e-04</internalNodes>\n          <leafValues>\n            6.7846202850341797e-01 3.9065030217170715e-01\n            5.4572027921676636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 924 1.6352660022675991e-03 -1 -2 925\n            -1.2750849418807775e-04</internalNodes>\n          <leafValues>\n            3.6402040719985962e-01 5.8297240734100342e-01\n            4.1949799656867981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 926 2.2067610174417496e-02 -1 -2 927\n            -1.9203789532184601e-02</internalNodes>\n          <leafValues>\n            4.6067029237747192e-01 3.2614830136299133e-01\n            5.2360808849334717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 928 -1.2998109683394432e-02 -1 -2 929\n            -3.1332690268754959e-03</internalNodes>\n          <leafValues>\n            7.0221120119094849e-01 2.8704708814620972e-01\n            5.0764769315719604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 930 -5.2937557920813560e-03 -1 -2 931\n            2.1857069805264473e-03</internalNodes>\n          <leafValues>\n            4.7095209360122681e-01 4.7082918882369995e-01\n            6.1698418855667114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 932 -4.5750709250569344e-03 -1 -2 933\n            -4.5152138918638229e-02</internalNodes>\n          <leafValues>\n            3.1142529845237732e-01 1.8514350056648254e-01\n            5.5048149824142456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 934 -2.7783559635281563e-03 -1 -2 935\n            -2.5752480141818523e-03</internalNodes>\n          <leafValues>\n            4.9373480677604675e-01 6.1529481410980225e-01\n            4.7354999184608459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 936 1.1614130344241858e-03 -1 -2 937\n            2.3350189439952374e-03</internalNodes>\n          <leafValues>\n            6.5105718374252319e-01 4.0883418917655945e-01\n            5.6841522455215454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 938 3.8499289657920599e-03 -1 -2 939\n            2.4529630318284035e-03</internalNodes>\n          <leafValues>\n            3.0258288979530334e-01 5.2325028181076050e-01\n            2.0176209509372711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 940 3.6731390282511711e-03 -1 -2 941\n            2.1937100682407618e-03</internalNodes>\n          <leafValues>\n            6.4284259080886841e-01 4.3288651108741760e-01\n            6.4205098152160645e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 942 -6.4666871912777424e-03 -1 -2 943\n            -5.7186251506209373e-03</internalNodes>\n          <leafValues>\n            5.2540659904479980e-01 2.4909840524196625e-01\n            5.2876192331314087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 944 9.9941878579556942e-04 -1 -2 945\n            -7.8276498243212700e-04</internalNodes>\n          <leafValues>\n            3.3297958970069885e-01 3.5983449220657349e-01\n            5.4983407258987427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 946 4.3231188319623470e-03 -1 -2 947\n            4.0838290005922318e-03</internalNodes>\n          <leafValues>\n            4.8187050223350525e-01 5.2663302421569824e-01\n            3.1057891249656677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 948 3.0515898833982646e-04 -1 -2 949\n            1.2640280183404684e-03</internalNodes>\n          <leafValues>\n            3.9952918887138367e-01 3.2284379005432129e-01\n            5.8192151784896851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 950 -1.0152660310268402e-02 -1 -2 951\n            -2.6863690000027418e-03</internalNodes>\n          <leafValues>\n            8.0260711908340454e-01 3.8756170868873596e-01\n            5.4665708541870117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 952 -9.0515613555908203e-03 -1 -2 953\n            -6.3204211182892323e-03</internalNodes>\n          <leafValues>\n            4.3720579147338867e-01 1.1265510320663452e-01\n            6.3954162597656250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 954 2.6117300149053335e-03 -1 -2 955\n            1.4339019544422626e-02</internalNodes>\n          <leafValues>\n            5.4239892959594727e-01 4.9792730808258057e-01\n            6.0422360897064209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 956 2.8452780097723007e-03 -1 -2 957\n            1.4783289771003183e-05</internalNodes>\n          <leafValues>\n            3.4910920262336731e-01 4.1950678825378418e-01\n            5.7759660482406616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 958 8.1814555451273918e-03 -1 -2 959\n            6.6321990452706814e-03</internalNodes>\n          <leafValues>\n            4.8859870433807373e-01 5.4444682598114014e-01\n            4.4209951162338257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 960 -2.2483461070805788e-03 -1 -2 961\n            1.2374560348689556e-02</internalNodes>\n          <leafValues>\n            6.6997921466827393e-01 4.4786059856414795e-01\n            6.5648937225341797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 962 -6.6516688093543053e-03 -1 -2 963\n            -8.5750613361597061e-03</internalNodes>\n          <leafValues>\n            5.5118787288665771e-01 4.0174451470375061e-01\n            5.4055362939834595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 964 6.5078441984951496e-03 -1 -2 965\n            2.8675209730863571e-02</internalNodes>\n          <leafValues>\n            2.2943930327892303e-01 5.1779001951217651e-01\n            3.5677561163902283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 966 7.0673860609531403e-03 -1 -2 967\n            1.2367829913273454e-03</internalNodes>\n          <leafValues>\n            5.5646997690200806e-01 3.6276981234550476e-01\n            5.5724138021469116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 968 7.4818679131567478e-03 -1 -2 969\n            4.7109839506447315e-03</internalNodes>\n          <leafValues>\n            6.7849111557006836e-01 4.1212528944015503e-01\n            6.0722357034683228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 970 -6.9405790418386459e-03 -1 -2 971\n            3.3302098512649536e-02</internalNodes>\n          <leafValues>\n            5.4597669839859009e-01 5.2767068147659302e-01\n            2.3749159276485443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 972 3.6104630678892136e-02 -1 -2 973\n            1.9674649462103844e-02</internalNodes>\n          <leafValues>\n            7.2492793202400208e-02 4.6263459324836731e-01\n            8.2089632749557495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 974 3.4766150638461113e-03 -1 -2 975\n            1.3987369602546096e-03</internalNodes>\n          <leafValues>\n            5.2087318897247314e-01 5.4844141006469727e-01\n            4.2300349473953247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 976 4.0974249131977558e-03 -1 -2 977\n            2.6973790954798460e-03</internalNodes>\n          <leafValues>\n            2.7805531024932861e-01 5.4038310050964355e-01\n            3.7909889221191406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 978 -5.6591699831187725e-03 -1 -2 979\n            3.9460969856008887e-04</internalNodes>\n          <leafValues>\n            4.7983360290527344e-01 3.7669500708580017e-01\n            5.4292291402816772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 980 2.1750570740550756e-03 -1 -2 981\n            1.4614439569413662e-03</internalNodes>\n          <leafValues>\n            6.2071627378463745e-01 3.3579450845718384e-01\n            5.1426321268081665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 982 -5.3006567759439349e-04 -1 -2 983\n            1.4869309961795807e-01</internalNodes>\n          <leafValues>\n            5.3446400165557861e-01 5.1596081256866455e-01\n            2.5618231296539307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 984 -5.8816498494707048e-05 -1 -2 985\n            -1.6275369562208652e-03</internalNodes>\n          <leafValues>\n            5.1230919361114502e-01 6.0176461935043335e-01\n            3.1093719601631165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 986 -1.2881809845566750e-02 -1 -2 987\n            9.4982917653396726e-04</internalNodes>\n          <leafValues>\n            2.7122870087623596e-01 5.4424422979354858e-01\n            4.0288880467414856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 988 -1.2315999716520309e-02 -1 -2 989\n            9.0286601334810257e-03</internalNodes>\n          <leafValues>\n            4.7360658645629883e-01 7.4514347314834595e-01\n            3.4879919886589050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 990 -8.6876116693019867e-02 -1 -2 991\n            -1.5107560102478601e-05</internalNodes>\n          <leafValues>\n            2.2903330624103546e-01 5.5178898572921753e-01\n            4.3931490182876587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 992 -1.7457660287618637e-02 -1 -2 993\n            -2.5219470262527466e-03</internalNodes>\n          <leafValues>\n            9.0167902410030365e-02 6.2335401773452759e-01\n            4.7894591093063354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 994 1.0656520025804639e-03 -1 -2 995\n            -4.2540300637483597e-03</internalNodes>\n          <leafValues>\n            5.4896962642669678e-01 5.5798089504241943e-01\n            4.3758779764175415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 996 -9.0349102392792702e-03 -1 -2 997\n            -1.5230999561026692e-03</internalNodes>\n          <leafValues>\n            3.5791561007499695e-01 5.6136602163314819e-01\n            3.9390438795089722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 998 2.8441150207072496e-03 -1 -2 999\n            -3.2824429217725992e-03</internalNodes>\n          <leafValues>\n            3.9015549421310425e-01 4.5286190509796143e-01\n            5.4413431882858276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1000 3.2161718991119415e-05 -1 -2 1001\n            3.0118400900391862e-05</internalNodes>\n          <leafValues>\n            5.8031117916107178e-01 3.3368501067161560e-01\n            5.5048561096191406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1002 -5.6150099262595177e-03 -1 -2 1003\n            -1.7389209941029549e-02</internalNodes>\n          <leafValues>\n            6.1247891187667847e-01 8.7271630764007568e-02\n            5.2045881748199463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1004 -4.4361080654198304e-05 -1 -2 1005\n            1.0354899859521538e-04</internalNodes>\n          <leafValues>\n            3.9353290200233459e-01 5.9188538789749146e-01\n            4.1196140646934509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1006 1.5939630102366209e-03 -1 -2 1007\n            2.5440789759159088e-03</internalNodes>\n          <leafValues>\n            4.8396238684654236e-01 4.7873649001121521e-01\n            6.3606631755828857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1008 1.5083180187502876e-05 -1 -2 1009\n            -9.9282202427275479e-05</internalNodes>\n          <leafValues>\n            4.2311170697212219e-01 4.2745891213417053e-01\n            6.0940480232238770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1010 5.5371708003804088e-04 -1 -2 1011\n            1.9186759600415826e-03</internalNodes>\n          <leafValues>\n            4.2719879746437073e-01 4.4971078634262085e-01\n            5.5491220951080322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1012 -5.0764222396537662e-04 -1 -2 1013\n            1.7236480489373207e-03</internalNodes>\n          <leafValues>\n            5.4771959781646729e-01 2.8829228878021240e-01\n            5.6151270866394043e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>75</maxWeakCount>\n      <stageThreshold>3.6726501464843750e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 1014 1.3092169538140297e-02 -1 -2 1015\n            4.1446479735895991e-04</internalNodes>\n          <leafValues>\n            3.3388701081275940e-01 3.0993521213531494e-01\n            6.6774922609329224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1016 2.1835729479789734e-02 -1 -2 1017\n            4.8323940485715866e-02</internalNodes>\n          <leafValues>\n            4.3690490722656250e-01 4.3017241358757019e-01\n            6.1538851261138916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1018 1.6091950237751007e-03 -1 -2 1019\n            1.3469760306179523e-03</internalNodes>\n          <leafValues>\n            3.3873260021209717e-01 6.2487137317657471e-01\n            3.5941308736801147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1020 1.7729059618432075e-04 -1 -2 1021\n            3.6743620876222849e-04</internalNodes>\n          <leafValues>\n            3.8684248924255371e-01 4.4093450903892517e-01\n            5.4764741659164429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1022 -1.2352119665592909e-03 -1 -2 1023\n            1.1705530341714621e-03</internalNodes>\n          <leafValues>\n            3.2601711153984070e-01 4.1113489866256714e-01\n            6.0881638526916504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1024 -2.9695429475395940e-05 -1 -2 1025\n            2.7050738572143018e-04</internalNodes>\n          <leafValues>\n            4.2694228887557983e-01 4.3064668774604797e-01\n            5.8105140924453735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1026 -7.9626210208516568e-05 -1 -2 1027\n            3.3152441028505564e-04</internalNodes>\n          <leafValues>\n            3.6691430211067200e-01 4.6106639504432678e-01\n            6.2905901670455933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1028 -5.2305828779935837e-02 -1 -2 1029\n            2.6880469173192978e-02</internalNodes>\n          <leafValues>\n            5.3286898136138916e-01 5.2132612466812134e-01\n            3.2312199473381042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1030 -2.4203000066336244e-04 -1 -2 1031\n            -1.6424639616161585e-03</internalNodes>\n          <leafValues>\n            3.5685700178146362e-01 3.4406611323356628e-01\n            5.6256049871444702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1032 -2.6830288697965443e-04 -1 -2 1033\n            -2.2649629972875118e-03</internalNodes>\n          <leafValues>\n            4.5611730217933655e-01 5.3213518857955933e-01\n            3.6741548776626587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1034 1.5627209097146988e-02 -1 -2 1035\n            1.6211320459842682e-01</internalNodes>\n          <leafValues>\n            2.0293539762496948e-01 5.5630332231521606e-01\n            2.6188498735427856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1036 -3.7391691002994776e-03 -1 -2 1037\n            -2.0878419745713472e-03</internalNodes>\n          <leafValues>\n            6.0621947050094604e-01 5.9507638216018677e-01\n            4.5451170206069946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1038 2.3334210272878408e-03 -1 -2 1039\n            6.5116386394947767e-05</internalNodes>\n          <leafValues>\n            6.4355242252349854e-01 3.5207340121269226e-01\n            5.1797789335250854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1040 7.4625718407332897e-03 -1 -2 1041\n            -2.2032689303159714e-02</internalNodes>\n          <leafValues>\n            5.3266882896423340e-01 3.4919810295104980e-01\n            5.4292368888854980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1042 -8.3081610500812531e-03 -1 -2 1043\n            -4.3259368976578116e-04</internalNodes>\n          <leafValues>\n            2.0840230584144592e-01 3.9652720093727112e-01\n            5.4254537820816040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1044 -3.2209228724241257e-02 -1 -2 1045\n            -9.0424838708713651e-04</internalNodes>\n          <leafValues>\n            5.3064119815826416e-01 5.4503858089447021e-01\n            4.2566969990730286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1046 2.2727500181645155e-03 -1 -2 1047\n            5.9820008464157581e-03</internalNodes>\n          <leafValues>\n            5.9686112403869629e-01 4.7581401467323303e-01\n            3.1509441137313843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1048 -5.8856618124991655e-04 -1 -2 1049\n            -8.8227191008627415e-04</internalNodes>\n          <leafValues>\n            4.8477488756179810e-01 5.4263162612915039e-01\n            4.3383410573005676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1050 -7.4473457061685622e-05 -1 -2 1051\n            3.9148979703895748e-04</internalNodes>\n          <leafValues>\n            4.2875099182128906e-01 6.3451850414276123e-01\n            4.1018518805503845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1052 -3.6939629353582859e-03 -1 -2 1053\n            -1.1207849718630314e-02</internalNodes>\n          <leafValues>\n            4.8491048812866211e-01 4.1463369131088257e-01\n            5.4712641239166260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1054 -1.0337409563362598e-02 -1 -2 1055\n            3.6883640568703413e-03</internalNodes>\n          <leafValues>\n            2.8771838545799255e-01 5.1019018888473511e-01\n            7.2169512510299683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1056 -3.8984280545264482e-03 -1 -2 1057\n            -5.9986729174852371e-03</internalNodes>\n          <leafValues>\n            5.2761822938919067e-01 6.6184598207473755e-01\n            4.8416310548782349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1058 4.5043681748211384e-03 -1 -2 1059\n            1.7799530178308487e-02</internalNodes>\n          <leafValues>\n            1.8741579353809357e-01 4.6169349551200867e-01\n            7.0889657735824585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1060 -1.8462570384144783e-02 -1 -2 1061\n            1.4931300029275008e-05</internalNodes>\n          <leafValues>\n            3.0019798874855042e-01 4.5618081092834473e-01\n            5.6107878684997559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1062 -8.6021229624748230e-02 -1 -2 1063\n            -6.0818758356617764e-05</internalNodes>\n          <leafValues>\n            2.3417009413242340e-01 5.6722861528396606e-01\n            4.1999641060829163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1064 1.2670679716393352e-03 -1 -2 1065\n            1.3699879636988044e-03</internalNodes>\n          <leafValues>\n            6.2074822187423706e-01 5.3949588537216187e-01\n            3.8238629698753357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1066 3.3162781037390232e-03 -1 -2 1067\n            -1.4532039640471339e-03</internalNodes>\n          <leafValues>\n            7.0616811513900757e-01 3.0655130743980408e-01\n            4.8273730278015137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1068 -7.1492061018943787e-02 -1 -2 1069\n            1.9857978913933039e-03</internalNodes>\n          <leafValues>\n            5.1931220293045044e-01 4.6424350142478943e-01\n            5.8076947927474976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1070 6.2516499310731888e-03 -1 -2 1071\n            2.7005500160157681e-03</internalNodes>\n          <leafValues>\n            2.9498139023780823e-01 4.5858868956565857e-01\n            6.0223537683486938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1072 1.1130389757454395e-02 -1 -2 1073\n            1.5092849731445312e-02</internalNodes>\n          <leafValues>\n            4.3578410148620605e-01 4.5615398883819580e-01\n            6.1190617084503174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1074 -2.7943300083279610e-02 -1 -2 1075\n            4.4036991312168539e-05</internalNodes>\n          <leafValues>\n            6.5371441841125488e-01 3.4747231006622314e-01\n            5.3369677066802979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1076 -1.2232770211994648e-02 -1 -2 1077\n            -6.8591412855312228e-04</internalNodes>\n          <leafValues>\n            3.7316760420799255e-01 5.7172292470932007e-01\n            4.7933790087699890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1078 -3.8992990739643574e-03 -1 -2 1079\n            4.9113907152786851e-04</internalNodes>\n          <leafValues>\n            4.0564361214637756e-01 6.1740481853485107e-01\n            4.4717541337013245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1080 8.2117747515439987e-03 -1 -2 1081\n            -4.5564480125904083e-02</internalNodes>\n          <leafValues>\n            6.1796981096267700e-01 2.2854949533939362e-01\n            5.2495658397674561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1082 -5.3631910122931004e-03 -1 -2 1083\n            -1.2274970300495625e-02</internalNodes>\n          <leafValues>\n            1.7849500477313995e-01 7.2619527578353882e-01\n            4.5503988862037659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1084 5.4185991175472736e-03 -1 -2 1085\n            8.1846961984410882e-04</internalNodes>\n          <leafValues>\n            5.2529907226562500e-01 5.4452222585678101e-01\n            3.2722181081771851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1086 4.1358140297234058e-03 -1 -2 1087\n            3.9578010910190642e-04</internalNodes>\n          <leafValues>\n            7.0138317346572876e-01 4.9659439921379089e-01\n            3.2955980300903320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1088 4.6887691132724285e-03 -1 -2 1089\n            -1.8255440518260002e-02</internalNodes>\n          <leafValues>\n            5.3626418113708496e-01 6.4961087703704834e-01\n            4.7571370005607605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1090 -6.2736468389630318e-03 -1 -2 1091\n            2.4320168886333704e-03</internalNodes>\n          <leafValues>\n            2.3437410593032837e-01 4.6201181411743164e-01\n            6.8984192609786987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1092 -4.9617629498243332e-02 -1 -2 1093\n            1.1701210169121623e-03</internalNodes>\n          <leafValues>\n            2.1007199585437775e-01 4.6215289831161499e-01\n            5.7971358299255371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1094 -4.5237291604280472e-02 -1 -2 1095\n            4.7563421539962292e-03</internalNodes>\n          <leafValues>\n            2.1182620525360107e-01 4.8846149444580078e-01\n            6.8724989891052246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1096 -1.4835969544947147e-02 -1 -2 1097\n            7.7436608262360096e-04</internalNodes>\n          <leafValues>\n            5.2751058340072632e-01 4.1723209619522095e-01\n            5.4911398887634277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1098 1.4835969544947147e-02 -1 -2 1099\n            -8.0892542609944940e-04</internalNodes>\n          <leafValues>\n            2.1248769760131836e-01 5.4952150583267212e-01\n            4.2077958583831787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1100 7.7517668250948191e-04 -1 -2 1101\n            -6.7618978209793568e-03</internalNodes>\n          <leafValues>\n            3.3219420909881592e-01 2.2129580378532410e-01\n            5.2326530218124390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1102 -4.0135860443115234e-02 -1 -2 1103\n            -3.3651469275355339e-03</internalNodes>\n          <leafValues>\n            1.1017960309982300e-01 3.8101008534431458e-01\n            5.6172919273376465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1104 7.4713007779791951e-04 -1 -2 1105\n            -4.2727389372885227e-03</internalNodes>\n          <leafValues>\n            5.7950568199157715e-01 6.3922691345214844e-01\n            4.7114381194114685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1106 3.6202510818839073e-03 -1 -2 1107\n            4.7307618660852313e-04</internalNodes>\n          <leafValues>\n            3.4098839759826660e-01 3.6593028903007507e-01\n            5.3881710767745972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1108 3.3094909042119980e-02 -1 -2 1109\n            -1.1544119566679001e-02</internalNodes>\n          <leafValues>\n            7.1703857183456421e-01 6.3868182897567749e-01\n            4.6813040971755981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1110 -7.4234469793736935e-03 -1 -2 1111\n            -4.2252950370311737e-03</internalNodes>\n          <leafValues>\n            3.2637009024620056e-01 5.7678192853927612e-01\n            4.3464180827140808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1112 1.8133109435439110e-02 -1 -2 1113\n            7.0903049781918526e-03</internalNodes>\n          <leafValues>\n            4.6978279948234558e-01 4.4373890757560730e-01\n            6.0616689920425415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1114 -1.3272940181195736e-02 -1 -2 1115\n            1.4632199599873275e-04</internalNodes>\n          <leafValues>\n            6.5585112571716309e-01 3.3763539791107178e-01\n            5.0916552543640137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1116 -3.5790191031992435e-03 -1 -2 1117\n            -4.6997101162560284e-04</internalNodes>\n          <leafValues>\n            2.9478839039802551e-01 5.5569821596145630e-01\n            4.6654561161994934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1118 -4.8179440200328827e-02 -1 -2 1119\n            -9.2581362696364522e-04</internalNodes>\n          <leafValues>\n            7.3383557796478271e-01 3.5438719391822815e-01\n            5.2851498126983643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1120 -1.4780730009078979e-02 -1 -2 1121\n            -1.0027450323104858e-01</internalNodes>\n          <leafValues>\n            1.9444419443607330e-01 9.9049292504787445e-02\n            5.1398539543151855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1122 -9.3848101096227765e-04 -1 -2 1123\n            -2.8861360624432564e-03</internalNodes>\n          <leafValues>\n            5.8271098136901855e-01 3.4414279460906982e-01\n            5.1488387584686279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1124 -4.3682761490345001e-02 -1 -2 1125\n            2.6115700602531433e-03</internalNodes>\n          <leafValues>\n            5.2079981565475464e-01 4.8355031013488770e-01\n            6.3222199678421021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1126 4.3682761490345001e-02 -1 -2 1127\n            1.7179530113935471e-03</internalNodes>\n          <leafValues>\n            1.3645380735397339e-01 4.5373201370239258e-01\n            6.0667508840560913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1128 -3.3964909613132477e-02 -1 -2 1129\n            -1.0993590112775564e-03</internalNodes>\n          <leafValues>\n            4.9683749675750732e-01 5.8316808938980103e-01\n            4.6882399916648865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1130 5.4301079362630844e-02 -1 -2 1131\n            1.0993590112775564e-03</internalNodes>\n          <leafValues>\n            7.5682890415191650e-01 4.3301481008529663e-01\n            5.7684689760208130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1132 -1.4954120160837192e-05 -1 -2 1133\n            3.1415868550539017e-02</internalNodes>\n          <leafValues>\n            4.4432818889617920e-01 5.2744728326797485e-01\n            3.0378559231758118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1134 1.0831849649548531e-02 -1 -2 1135\n            8.6545711383223534e-04</internalNodes>\n          <leafValues>\n            3.5817208886146545e-01 5.9375840425491333e-01\n            4.2946299910545349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1136 2.2743160370737314e-03 -1 -2 1137\n            3.9340821094810963e-03</internalNodes>\n          <leafValues>\n            5.9545767307281494e-01 4.7922229766845703e-01\n            5.8561331033706665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1138 8.1451907753944397e-03 -1 -2 1139\n            -5.2763288840651512e-03</internalNodes>\n          <leafValues>\n            3.5734778642654419e-01 4.0260228514671326e-01\n            5.7647430896759033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1140 -8.3787851035594940e-03 -1 -2 1141\n            1.5621910570189357e-03</internalNodes>\n          <leafValues>\n            4.9813330173492432e-01 4.7365880012512207e-01\n            5.5836081504821777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1142 3.2318739686161280e-03 -1 -2 1143\n            6.6804019734263420e-03</internalNodes>\n          <leafValues>\n            6.1674368381500244e-01 4.1314241290092468e-01\n            6.2806951999664307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1144 -3.3396480139344931e-03 -1 -2 1145\n            -2.0933480560779572e-01</internalNodes>\n          <leafValues>\n            3.4463581442832947e-01 1.0386580228805542e-01\n            5.2044892311096191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1146 6.3805822283029556e-03 -1 -2 1147\n            -6.0137799009680748e-03</internalNodes>\n          <leafValues>\n            2.1674020588397980e-01 6.7383992671966553e-01\n            4.8966509103775024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1148 -8.1756077706813812e-03 -1 -2 1149\n            6.3951779156923294e-04</internalNodes>\n          <leafValues>\n            5.1779150962829590e-01 4.8196458816528320e-01\n            5.4644381999969482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1150 1.0127760469913483e-03 -1 -2 1151\n            4.9784599104896188e-04</internalNodes>\n          <leafValues>\n            3.4235960245132446e-01 4.4884610176086426e-01\n            5.9126710891723633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1152 1.3596490316558629e-04 -1 -2 1153\n            1.3571660034358501e-02</internalNodes>\n          <leafValues>\n            5.5688631534576416e-01 5.1610678434371948e-01\n            1.7130009829998016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1154 3.0259079721872695e-05 -1 -2 1155\n            -3.2625840976834297e-03</internalNodes>\n          <leafValues>\n            4.9162039160728455e-01 6.4046627283096313e-01\n            2.8590849041938782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1156 -1.9217010412830859e-04 -1 -2 1157\n            2.1993879228830338e-02</internalNodes>\n          <leafValues>\n            5.4592829942703247e-01 4.7157138586044312e-01\n            5.6900751590728760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1158 7.8907777788117528e-04 -1 -2 1159\n            5.0893891602754593e-04</internalNodes>\n          <leafValues>\n            3.2798269391059875e-01 4.3020078539848328e-01\n            5.6960451602935791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1160 1.1662710312521085e-04 -1 -2 1161\n            8.0604078248143196e-03</internalNodes>\n          <leafValues>\n            5.3872352838516235e-01 5.0214231014251709e-01\n            5.9653222560882568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1162 9.5925969071686268e-04 -1 -2 1163\n            -1.9526129588484764e-02</internalNodes>\n          <leafValues>\n            3.4734940528869629e-01 6.4755451679229736e-01\n            4.6437820792198181e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>78</maxWeakCount>\n      <stageThreshold>3.8236038208007812e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 1164 4.1242439299821854e-02 -1 -2 1165\n            1.5626709908246994e-02</internalNodes>\n          <leafValues>\n            3.3933150768280029e-01 5.1041001081466675e-01\n            7.7728152275085449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1166 2.9947189614176750e-04 -1 -2 1167\n            -1.0037609608843923e-03</internalNodes>\n          <leafValues>\n            3.6646738648414612e-01 5.4056507349014282e-01\n            3.9262050390243530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1168 6.8128242855891585e-04 -1 -2 1169\n            1.3098999625071883e-04</internalNodes>\n          <leafValues>\n            4.2515191435813904e-01 4.1351449489593506e-01\n            6.9257462024688721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1170 3.1696720980107784e-03 -1 -2 1171\n            -2.0587369799613953e-03</internalNodes>\n          <leafValues>\n            3.4558731317520142e-01 2.2341939806938171e-01\n            5.2861189842224121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1172 -4.6395038953050971e-04 -1 -2 1173\n            3.5089480224996805e-03</internalNodes>\n          <leafValues>\n            4.2065200209617615e-01 6.5029817819595337e-01\n            4.1175979375839233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1174 -2.3975980002433062e-03 -1 -2 1175\n            1.0901279747486115e-03</internalNodes>\n          <leafValues>\n            3.6733010411262512e-01 2.9062381386756897e-01\n            5.4451119899749756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1176 -1.6524370585102588e-04 -1 -2 1177\n            -4.1602319106459618e-04</internalNodes>\n          <leafValues>\n            4.2335158586502075e-01 3.8863611221313477e-01\n            6.2691658735275269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1178 -2.3739910102449358e-04 -1 -2 1179\n            2.4739760905504227e-02</internalNodes>\n          <leafValues>\n            5.5244511365890503e-01 4.9600958824157715e-01\n            5.3734910488128662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1180 -1.5342839993536472e-02 -1 -2 1181\n            1.1540469713509083e-02</internalNodes>\n          <leafValues>\n            6.8494051694869995e-01 4.0372350811958313e-01\n            6.7869400978088379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1182 6.4230621792376041e-03 -1 -2 1183\n            1.2977809645235538e-02</internalNodes>\n          <leafValues>\n            3.8146761059761047e-01 5.5270588397979736e-01\n            3.7449559569358826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1184 1.1063399724662304e-03 -1 -2 1185\n            1.3743690215051174e-03</internalNodes>\n          <leafValues>\n            3.5209289193153381e-01 5.6419032812118530e-01\n            3.0750259757041931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1186 1.6233779489994049e-02 -1 -2 1187\n            -8.1519351806491613e-04</internalNodes>\n          <leafValues>\n            4.8888280987739563e-01 5.4563212394714355e-01\n            4.7435501217842102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1188 -9.0782493352890015e-02 -1 -2 1189\n            1.1665210127830505e-02</internalNodes>\n          <leafValues>\n            2.9252481460571289e-01 4.6884548664093018e-01\n            6.2303477525711060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1190 -2.3286409676074982e-02 -1 -2 1191\n            2.1559339947998524e-03</internalNodes>\n          <leafValues>\n            6.8958431482315063e-01 5.3558021783828735e-01\n            3.4234660863876343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1192 -4.3167220428586006e-03 -1 -2 1193\n            1.5610599657520652e-03</internalNodes>\n          <leafValues>\n            5.9370762109756470e-01 4.7086599469184875e-01\n            2.7369970083236694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1194 1.4076639898121357e-02 -1 -2 1195\n            7.1018589660525322e-03</internalNodes>\n          <leafValues>\n            5.2871561050415039e-01 5.3361928462982178e-01\n            3.2248139381408691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1196 -4.8221647739410400e-03 -1 -2 1197\n            -5.3852899000048637e-03</internalNodes>\n          <leafValues>\n            2.9839101433753967e-01 5.6239992380142212e-01\n            4.2959120869636536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1198 7.3483278974890709e-03 -1 -2 1199\n            -3.5707519855350256e-03</internalNodes>\n          <leafValues>\n            6.8139612674713135e-01 5.8579689264297485e-01\n            4.6034291386604309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1200 2.3340100888162851e-03 -1 -2 1201\n            4.7432780265808105e-03</internalNodes>\n          <leafValues>\n            2.7448511123657227e-01 5.0475269556045532e-01\n            2.3627419769763947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1202 6.5055489540100098e-03 -1 -2 1203\n            1.2589249759912491e-02</internalNodes>\n          <leafValues>\n            5.2422481775283813e-01 4.8236909508705139e-01\n            6.7525368928909302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1204 -6.3358368352055550e-03 -1 -2 1205\n            -5.7639651931822300e-03</internalNodes>\n          <leafValues>\n            1.7346349358558655e-01 6.3543808460235596e-01\n            4.5874750614166260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1206 1.3599749654531479e-03 -1 -2 1207\n            2.8404260054230690e-02</internalNodes>\n          <leafValues>\n            4.5803809165954590e-01 5.1763808727264404e-01\n            1.2043850123882294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1208 -9.2958156019449234e-03 -1 -2 1209\n            -1.1800320353358984e-03</internalNodes>\n          <leafValues>\n            2.3379570245742798e-01 3.9028140902519226e-01\n            5.6529301404953003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1210 -2.0948140881955624e-03 -1 -2 1211\n            4.1679958812892437e-03</internalNodes>\n          <leafValues>\n            5.5120289325714111e-01 5.4559761285781860e-01\n            4.7989490628242493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1212 5.4458891972899437e-03 -1 -2 1213\n            -1.2766510481014848e-03</internalNodes>\n          <leafValues>\n            6.1270868778228760e-01 5.3171318769454956e-01\n            3.8509321212768555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1214 5.9404270723462105e-04 -1 -2 1215\n            4.2309608310461044e-02</internalNodes>\n          <leafValues>\n            5.4464370012283325e-01 5.2346438169479370e-01\n            2.2130440175533295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1216 5.6189671158790588e-03 -1 -2 1217\n            7.2401198558509350e-03</internalNodes>\n          <leafValues>\n            4.9161979556083679e-01 1.4714759588241577e-01\n            4.8528939485549927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1218 -4.5610670931637287e-03 -1 -2 1219\n            4.5506159949582070e-05</internalNodes>\n          <leafValues>\n            2.7737739682197571e-01 4.6264618635177612e-01\n            5.7680791616439819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1220 -6.1903791502118111e-03 -1 -2 1221\n            8.1186462193727493e-04</internalNodes>\n          <leafValues>\n            1.6442899405956268e-01 4.7785910964012146e-01\n            6.2618649005889893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1222 1.3779809698462486e-02 -1 -2 1223\n            1.1290319962427020e-03</internalNodes>\n          <leafValues>\n            5.2573078870773315e-01 5.4980480670928955e-01\n            3.9831069111824036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1224 -1.0610350000206381e-04 -1 -2 1225\n            1.6695790691301227e-04</internalNodes>\n          <leafValues>\n            4.0335190296173096e-01 4.1493400931358337e-01\n            5.7953411340713501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1226 1.1290319962427020e-03 -1 -2 1227\n            -1.2019349634647369e-01</internalNodes>\n          <leafValues>\n            3.9341148734092712e-01 7.3400482535362244e-02\n            5.2025860548019409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1228 -1.5230740420520306e-02 -1 -2 1229\n            3.5759829916059971e-03</internalNodes>\n          <leafValues>\n            3.7495058774948120e-01 5.0781500339508057e-01\n            6.6060662269592285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1230 1.3479460030794144e-02 -1 -2 1231\n            -2.1162950433790684e-03</internalNodes>\n          <leafValues>\n            4.5477110147476196e-01 3.3110061287879944e-01\n            5.3842592239379883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1232 -1.7877709120512009e-02 -1 -2 1233\n            1.0931970318779349e-03</internalNodes>\n          <leafValues>\n            6.5132528543472290e-01 5.2647650241851807e-01\n            3.4569910168647766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1234 -3.0553159303963184e-03 -1 -2 1235\n            3.6365049891173840e-03</internalNodes>\n          <leafValues>\n            6.2686139345169067e-01 5.3992128372192383e-01\n            4.3453970551490784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1236 9.7896481747739017e-05 -1 -2 1237\n            -3.2714448752813041e-04</internalNodes>\n          <leafValues>\n            3.8356059789657593e-01 3.3376678824424744e-01\n            5.5391657352447510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1238 4.3425030889920890e-04 -1 -2 1239\n            1.4005579985678196e-02</internalNodes>\n          <leafValues>\n            5.7882702350616455e-01 5.2750778198242188e-01\n            2.7011251449584961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1240 -9.2654931358993053e-04 -1 -2 1241\n            3.9504268206655979e-03</internalNodes>\n          <leafValues>\n            5.8522802591323853e-01 4.7283369302749634e-01\n            3.3139181137084961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1242 -5.8086868375539780e-04 -1 -2 1243\n            -1.2018020264804363e-02</internalNodes>\n          <leafValues>\n            4.2588108777999878e-01 5.6097871065139771e-01\n            4.8951920866966248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1244 -1.4521540701389313e-01 -1 -2 1245\n            -6.6049019806087017e-03</internalNodes>\n          <leafValues>\n            4.3894480913877487e-02 4.2291709780693054e-01\n            5.6162929534912109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1246 -3.4909751266241074e-02 -1 -2 1247\n            3.7478420417755842e-03</internalNodes>\n          <leafValues>\n            4.7881281375885010e-01 4.8002821207046509e-01\n            5.8013892173767090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1248 3.3038031309843063e-02 -1 -2 1249\n            3.6872599739581347e-03</internalNodes>\n          <leafValues>\n            7.0781761407852173e-01 4.4496241211891174e-01\n            5.9577310085296631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1250 -4.5311939902603626e-03 -1 -2 1251\n            4.1058510541915894e-03</internalNodes>\n          <leafValues>\n            4.1770470142364502e-01 5.3729480504989624e-01\n            3.7369269132614136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1252 -8.7599847465753555e-03 -1 -2 1253\n            -2.3003309965133667e-02</internalNodes>\n          <leafValues>\n            6.6588079929351807e-01 2.6479220390319824e-01\n            5.1018178462982178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1254 5.3664818406105042e-03 -1 -2 1255\n            3.8971770554780960e-02</internalNodes>\n          <leafValues>\n            4.5486348867416382e-01 5.1570618152618408e-01\n            3.4364390373229980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1256 -2.7767190709710121e-02 -1 -2 1257\n            -9.8894089460372925e-03</internalNodes>\n          <leafValues>\n            2.3543910682201385e-01 6.8877410888671875e-01\n            5.1110517978668213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1258 -3.2073140610009432e-03 -1 -2 1259\n            -6.7484978353604674e-04</internalNodes>\n          <leafValues>\n            5.4388678073883057e-01 5.4511487483978271e-01\n            4.8313531279563904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1260 -5.1947520114481449e-03 -1 -2 1261\n            -2.6169899501837790e-04</internalNodes>\n          <leafValues>\n            2.1134190261363983e-01 5.2736818790435791e-01\n            3.9925870299339294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1262 2.2421479225158691e-03 -1 -2 1263\n            -1.2139769969508052e-03</internalNodes>\n          <leafValues>\n            4.6882608532905579e-01 5.5042350292205811e-01\n            4.3848711252212524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1264 -2.9469770379364491e-03 -1 -2 1265\n            -3.9291830034926534e-04</internalNodes>\n          <leafValues>\n            3.8928470015525818e-01 6.0017228126525879e-01\n            4.5616629719734192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1266 6.2550729513168335e-01 -1 -2 1267\n            9.7744520753622055e-03</internalNodes>\n          <leafValues>\n            6.8125613033771515e-02 4.8130258917808533e-01\n            5.6206572055816650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1268 9.4378247857093811e-02 -1 -2 1269\n            -1.9560910295695066e-03</internalNodes>\n          <leafValues>\n            6.6632293164730072e-02 3.5882329940795898e-01\n            5.2954071760177612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1270 9.0652769431471825e-03 -1 -2 1271\n            4.2138071148656309e-04</internalNodes>\n          <leafValues>\n            4.8226881027221680e-01 4.6703329682350159e-01\n            5.6831127405166626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1272 -4.4220191193744540e-04 -1 -2 1273\n            -4.7313501127064228e-03</internalNodes>\n          <leafValues>\n            5.3607952594757080e-01 6.1372458934783936e-01\n            3.1880891323089600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1274 1.5395509544759989e-03 -1 -2 1275\n            2.4315000046044588e-03</internalNodes>\n          <leafValues>\n            4.4877201318740845e-01 4.8941668868064880e-01\n            6.7166537046432495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1276 -1.5581619925796986e-02 -1 -2 1277\n            1.0816920548677444e-03</internalNodes>\n          <leafValues>\n            3.3367419242858887e-01 4.7182199358940125e-01\n            5.9606271982192993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1278 -2.2197659127414227e-03 -1 -2 1279\n            -9.3048671260476112e-04</internalNodes>\n          <leafValues>\n            3.5885548591613770e-01 6.2187129259109497e-01\n            4.8173001408576965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1280 -4.7418707981705666e-03 -1 -2 1281\n            -6.2950369901955128e-03</internalNodes>\n          <leafValues>\n            2.5500270724296570e-01 6.7280787229537964e-01\n            5.0510638952255249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1282 3.5216049291193485e-03 -1 -2 1283\n            -2.4289379362016916e-03</internalNodes>\n          <leafValues>\n            5.4019099473953247e-01 5.4194617271423340e-01\n            4.3471428751945496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1284 -2.5261470582336187e-03 -1 -2 1285\n            -1.4817339833825827e-03</internalNodes>\n          <leafValues>\n            6.9706249237060547e-01 3.2634168863296509e-01\n            4.9178731441497803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1286 -2.2474530339241028e-01 -1 -2 1287\n            2.8342509176582098e-03</internalNodes>\n          <leafValues>\n            7.2937291115522385e-03 4.5792299509048462e-01\n            5.3798812627792358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1288 -2.0821610465645790e-02 -1 -2 1289\n            1.4896340144332498e-04</internalNodes>\n          <leafValues>\n            6.0240888595581055e-01 3.3361440896987915e-01\n            4.9628159403800964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1290 -3.3524499740451574e-03 -1 -2 1291\n            -3.7279881536960602e-02</internalNodes>\n          <leafValues>\n            3.5587510466575623e-01 1.6985629498958588e-01\n            5.2089858055114746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1292 1.3896770542487502e-04 -1 -2 1293\n            -3.1912620761431754e-04</internalNodes>\n          <leafValues>\n            5.5906862020492554e-01 5.8487337827682495e-01\n            3.7958368659019470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1294 5.4003461264073849e-04 -1 -2 1295\n            3.8956850767135620e-03</internalNodes>\n          <leafValues>\n            5.6702882051467896e-01 5.1826947927474976e-01\n            3.3277091383934021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1296 1.6084529925137758e-03 -1 -2 1297\n            -5.7474587811157107e-04</internalNodes>\n          <leafValues>\n            5.4104858636856079e-01 6.0226422548294067e-01\n            3.6446440219879150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1298 1.3435039669275284e-02 -1 -2 1299\n            2.1368139423429966e-03</internalNodes>\n          <leafValues>\n            3.4412819147109985e-01 5.2924340963363647e-01\n            2.7470758557319641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1300 1.4157629571855068e-02 -1 -2 1301\n            5.3884391672909260e-03</internalNodes>\n          <leafValues>\n            8.0278682708740234e-01 5.2223151922225952e-01\n            3.5867279767990112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1302 8.8013410568237305e-03 -1 -2 1303\n            3.8858849438838661e-04</internalNodes>\n          <leafValues>\n            4.9003869295120239e-01 4.6810561418533325e-01\n            5.7219529151916504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1304 -2.2143588867038488e-03 -1 -2 1305\n            -8.4642972797155380e-03</internalNodes>\n          <leafValues>\n            5.3888058662414551e-01 6.6755378246307373e-01\n            3.4484419226646423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1306 1.5044390223920345e-02 -1 -2 1307\n            7.6346402056515217e-03</internalNodes>\n          <leafValues>\n            9.2396140098571777e-01 4.8848968744277954e-01\n            6.3060528039932251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1308 3.3895121305249631e-04 -1 -2 1309\n            2.1157610171940178e-04</internalNodes>\n          <leafValues>\n            3.9974310994148254e-01 5.6639820337295532e-01\n            3.9729809761047363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1310 -2.7514949440956116e-02 -1 -2 1311\n            5.1603060215711594e-02</internalNodes>\n          <leafValues>\n            5.2010637521743774e-01 5.1407301425933838e-01\n            1.2451309710741043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1312 3.7510651163756847e-03 -1 -2 1313\n            -2.1457639522850513e-03</internalNodes>\n          <leafValues>\n            3.8020950555801392e-01 3.3094480633735657e-01\n            5.4745388031005859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1314 -5.8178009930998087e-04 -1 -2 1315\n            -9.3638541875407100e-04</internalNodes>\n          <leafValues>\n            4.8926019668579102e-01 5.9373992681503296e-01\n            4.6646690368652344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1316 4.1667491197586060e-02 -1 -2 1317\n            -6.7763780243694782e-03</internalNodes>\n          <leafValues>\n            7.0213532447814941e-01 3.2227510213851929e-01\n            5.0683951377868652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1318 -2.9170580673962831e-03 -1 -2 1319\n            3.2789530814625323e-04</internalNodes>\n          <leafValues>\n            4.7177010774612427e-01 4.5093831419944763e-01\n            5.6511628627777100e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>91</maxWeakCount>\n      <stageThreshold>4.4682968139648438e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 1320 1.1729800142347813e-02 -1 -2 1321\n            1.1712179984897375e-03</internalNodes>\n          <leafValues>\n            3.8052248954772949e-01 3.1400179862976074e-01\n            6.8581461906433105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1322 9.3555096536874771e-03 -1 -2 1323\n            1.6570610459893942e-03</internalNodes>\n          <leafValues>\n            6.8346732854843140e-01 2.9924729466438293e-01\n            5.4756778478622437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1324 -1.3387809740379453e-03 -1 -2 1325\n            1.7580550047568977e-04</internalNodes>\n          <leafValues>\n            2.9414069652557373e-01 3.8969779014587402e-01\n            5.8729708194732666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1326 -2.9473248869180679e-03 -1 -2 1327\n            8.3220899105072021e-03</internalNodes>\n          <leafValues>\n            3.5765719413757324e-01 5.2324008941650391e-01\n            3.2310879230499268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1328 7.4366689659655094e-03 -1 -2 1329\n            -2.1322889369912446e-04</internalNodes>\n          <leafValues>\n            6.7156732082366943e-01 5.4705417156219482e-01\n            3.8633960485458374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1330 -7.8024631366133690e-03 -1 -2 1331\n            5.6611228501424193e-04</internalNodes>\n          <leafValues>\n            2.7714601159095764e-01 4.6891361474990845e-01\n            5.8519637584686279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1332 -9.2346500605344772e-03 -1 -2 1333\n            -1.4676499631605111e-05</internalNodes>\n          <leafValues>\n            2.7043971419334412e-01 5.6225502490997314e-01\n            3.5793170332908630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1334 9.7007937729358673e-03 -1 -2 1335\n            -3.5320650786161423e-03</internalNodes>\n          <leafValues>\n            4.1738718748092651e-01 4.1950130462646484e-01\n            5.5494689941406250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1336 2.1616410464048386e-02 -1 -2 1337\n            3.4567608963698149e-03</internalNodes>\n          <leafValues>\n            2.8573909401893616e-01 6.0245329141616821e-01\n            4.3775078654289246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1338 2.2914320230484009e-02 -1 -2 1339\n            3.4328910987824202e-03</internalNodes>\n          <leafValues>\n            4.6893501281738281e-01 4.6646049618721008e-01\n            5.7625621557235718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1340 -8.6510833352804184e-03 -1 -2 1341\n            1.4510039472952485e-03</internalNodes>\n          <leafValues>\n            6.3817399740219116e-01 3.7114879488945007e-01\n            5.5307507514953613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1342 7.8191719949245453e-03 -1 -2 1343\n            2.0798550394829363e-04</internalNodes>\n          <leafValues>\n            5.2643620967864990e-01 3.7305128574371338e-01\n            5.4457312822341919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1344 -3.9962218143045902e-03 -1 -2 1345\n            -1.5010139577498194e-05</internalNodes>\n          <leafValues>\n            2.4381700158119202e-01 5.3246712684631348e-01\n            3.6829888820648193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1346 -4.2428788729012012e-03 -1 -2 1347\n            9.1374982148408890e-03</internalNodes>\n          <leafValues>\n            6.4814740419387817e-01 4.8961588740348816e-01\n            6.5588432550430298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1348 8.8254585862159729e-03 -1 -2 1349\n            9.4092212384566665e-04</internalNodes>\n          <leafValues>\n            3.6138701438903809e-01 5.5028957128524780e-01\n            3.6325180530548096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1350 -1.2503350153565407e-02 -1 -2 1351\n            8.6759645491838455e-03</internalNodes>\n          <leafValues>\n            2.2611320018768311e-01 4.9878901243209839e-01\n            6.8471962213516235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1352 -1.0416760109364986e-02 -1 -2 1353\n            2.7432460337877274e-03</internalNodes>\n          <leafValues>\n            2.4462990462779999e-01 3.5115250945091248e-01\n            5.3998267650604248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1354 -4.2385691776871681e-03 -1 -2 1355\n            1.8325870856642723e-02</internalNodes>\n          <leafValues>\n            6.8236732482910156e-01 4.8915800452232361e-01\n            7.1356189250946045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1356 -2.4334540590643883e-02 -1 -2 1357\n            4.6469361404888332e-04</internalNodes>\n          <leafValues>\n            3.5225218534469604e-01 4.0498688817024231e-01\n            5.5158257484436035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1358 3.4260009415447712e-03 -1 -2 1359\n            -2.5827318895608187e-03</internalNodes>\n          <leafValues>\n            4.1267699003219604e-01 2.8994289040565491e-01\n            5.3864318132400513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1360 1.0545699624344707e-03 -1 -2 1361\n            -9.1257691383361816e-04</internalNodes>\n          <leafValues>\n            3.7713441252708435e-01 5.8273869752883911e-01\n            4.2675569653511047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1362 2.6589010376483202e-03 -1 -2 1363\n            4.8598358407616615e-03</internalNodes>\n          <leafValues>\n            4.6881249547004700e-01 4.8539221286773682e-01\n            6.1636447906494141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1364 8.0638676881790161e-03 -1 -2 1365\n            -7.5898370705544949e-03</internalNodes>\n          <leafValues>\n            1.7491950094699860e-01 6.8261897563934326e-01\n            4.8940700292587280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1366 3.6368070868775249e-04 -1 -2 1367\n            6.2594950199127197e-02</internalNodes>\n          <leafValues>\n            4.6145960688591003e-01 5.1830172538757324e-01\n            2.6866960525512695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1368 -4.9753207713365555e-03 -1 -2 1369\n            -2.0880119409412146e-03</internalNodes>\n          <leafValues>\n            1.7584669589996338e-01 6.3693821430206299e-01\n            4.9300441145896912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1370 9.5644511748105288e-04 -1 -2 1371\n            -3.1721461564302444e-02</internalNodes>\n          <leafValues>\n            4.1393989324569702e-01 6.0455572605133057e-01\n            4.8163640499114990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1372 1.2898689601570368e-03 -1 -2 1373\n            9.8405163735151291e-03</internalNodes>\n          <leafValues>\n            5.4508107900619507e-01 2.9240009188652039e-01\n            6.6996061801910400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1374 1.2237089686095715e-03 -1 -2 1375\n            -8.4232585504651070e-03</internalNodes>\n          <leafValues>\n            6.2828367948532104e-01 5.9865701198577881e-01\n            4.8525801301002502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1376 -7.2726322105154395e-04 -1 -2 1377\n            4.6842931769788265e-03</internalNodes>\n          <leafValues>\n            3.3400490880012512e-01 5.1689237356185913e-01\n            2.6794800162315369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1378 -1.0379579616710544e-03 -1 -2 1379\n            9.1342730447649956e-03</internalNodes>\n          <leafValues>\n            5.9257918596267700e-01 5.4377281665802002e-01\n            4.3468001484870911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1380 1.4971119817346334e-03 -1 -2 1381\n            1.5762320253998041e-03</internalNodes>\n          <leafValues>\n            4.1295009851455688e-01 4.5228740572929382e-01\n            6.5562921762466431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1382 8.7496247142553329e-03 -1 -2 1383\n            -8.5103599121794105e-04</internalNodes>\n          <leafValues>\n            4.5320340991020203e-01 3.7859839200973511e-01\n            5.4169750213623047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1384 -1.7325570806860924e-02 -1 -2 1385\n            -8.3266440778970718e-03</internalNodes>\n          <leafValues>\n            6.8842482566833496e-01 3.0913260579109192e-01\n            5.2436548471450806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1386 1.5157909729168750e-05 -1 -2 1387\n            1.8041470320895314e-03</internalNodes>\n          <leafValues>\n            4.7657939791679382e-01 4.7253859043121338e-01\n            5.7165551185607910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1388 3.0691560823470354e-03 -1 -2 1389\n            -5.2225510444259271e-05</internalNodes>\n          <leafValues>\n            2.1433599293231964e-01 5.6532102823257446e-01\n            4.3851110339164734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1390 1.0072169970953837e-04 -1 -2 1391\n            1.3573700562119484e-04</internalNodes>\n          <leafValues>\n            5.9247761964797974e-01 4.5734488964080811e-01\n            5.7693827152252197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1392 9.2137878527864814e-04 -1 -2 1393\n            3.0316581251099706e-04</internalNodes>\n          <leafValues>\n            5.9926092624664307e-01 3.6100810766220093e-01\n            5.0493258237838745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1394 3.9582479745149612e-02 -1 -2 1395\n            4.7519680112600327e-02</internalNodes>\n          <leafValues>\n            1.5384890139102936e-01 5.2161407470703125e-01\n            1.4283910393714905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1396 1.8871759995818138e-02 -1 -2 1397\n            -3.9876459049992263e-04</internalNodes>\n          <leafValues>\n            2.8255069255828857e-01 4.0350168943405151e-01\n            5.4377931356430054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1398 4.6556600136682391e-04 -1 -2 1399\n            6.7090610973536968e-03</internalNodes>\n          <leafValues>\n            4.6689969301223755e-01 5.3313547372817993e-01\n            4.1365718841552734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1400 -1.8931160448119044e-03 -1 -2 1401\n            -1.3056949712336063e-02</internalNodes>\n          <leafValues>\n            7.1551632881164551e-01 3.1178998947143555e-01\n            5.2084398269653320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1402 -1.9484119547996670e-04 -1 -2 1403\n            1.5093220099515747e-05</internalNodes>\n          <leafValues>\n            4.6376588940620422e-01 4.5616531372070312e-01\n            5.4452341794967651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1404 -7.1617960202274844e-06 -1 -2 1405\n            3.0164679628796875e-04</internalNodes>\n          <leafValues>\n            4.1931080818176270e-01 5.9662377834320068e-01\n            4.1005000472068787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1406 4.4195181690156460e-03 -1 -2 1407\n            -7.3984181508421898e-03</internalNodes>\n          <leafValues>\n            4.8450559377670288e-01 6.2068462371826172e-01\n            4.9312090873718262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1408 -7.8031201846897602e-03 -1 -2 1409\n            -1.0731429792940617e-02</internalNodes>\n          <leafValues>\n            5.2824628353118896e-01 9.1048341989517212e-01\n            3.4559220075607300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1410 1.4246780192479491e-03 -1 -2 1411\n            -8.2717568147927523e-05</internalNodes>\n          <leafValues>\n            4.7085541486740112e-01 5.6516230106353760e-01\n            4.7310239076614380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1412 4.4803409837186337e-03 -1 -2 1413\n            3.0789140146225691e-03</internalNodes>\n          <leafValues>\n            6.1758869886398315e-01 5.1395332813262939e-01\n            3.4230878949165344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1414 -1.1310289846733212e-03 -1 -2 1415\n            -1.0410690447315574e-03</internalNodes>\n          <leafValues>\n            4.9182820320129395e-01 5.9420871734619141e-01\n            4.9230429530143738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1416 1.1648540385067463e-03 -1 -2 1417\n            9.0057362103834748e-04</internalNodes>\n          <leafValues>\n            6.4052718877792358e-01 4.5043969154357910e-01\n            6.1920768022537231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1418 6.8781538866460323e-03 -1 -2 1419\n            -3.5283900797367096e-02</internalNodes>\n          <leafValues>\n            5.3748130798339844e-01 2.2471010684967041e-01\n            5.2171707153320312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1420 -1.3320200378075242e-03 -1 -2 1421\n            -2.3177571129053831e-03</internalNodes>\n          <leafValues>\n            2.5547030568122864e-01 3.7925159931182861e-01\n            5.2432268857955933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1422 2.1332940377760679e-04 -1 -2 1423\n            1.3467900454998016e-02</internalNodes>\n          <leafValues>\n            3.8603371381759644e-01 5.3806877136230469e-01\n            4.1783639788627625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1424 -1.2829169863834977e-03 -1 -2 1425\n            5.1571638323366642e-04</internalNodes>\n          <leafValues>\n            6.1336231231689453e-01 4.0285378694534302e-01\n            5.5368518829345703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1426 3.9254198782145977e-03 -1 -2 1427\n            -3.3780589699745178e-02</internalNodes>\n          <leafValues>\n            5.2799212932586670e-01 2.3346750438213348e-01\n            5.1759117841720581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1428 -3.7853721529245377e-02 -1 -2 1429\n            -4.0752900531515479e-04</internalNodes>\n          <leafValues>\n            1.0748530179262161e-01 5.3459298610687256e-01\n            4.1989380121231079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1430 -3.1193809118121862e-03 -1 -2 1431\n            -1.5714969485998154e-02</internalNodes>\n          <leafValues>\n            3.8558250665664673e-01 3.3351901173591614e-01\n            5.2632021903991699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1432 -7.8525702701881528e-04 -1 -2 1433\n            -2.8750501223839819e-04</internalNodes>\n          <leafValues>\n            5.8603972196578979e-01 5.4377847909927368e-01\n            3.7161049246788025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1434 2.8016859665513039e-02 -1 -2 1435\n            -1.9018839811906219e-03</internalNodes>\n          <leafValues>\n            3.3307549357414246e-01 5.3665977716445923e-01\n            4.6937939524650574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1436 2.0647559314966202e-02 -1 -2 1437\n            4.3002571910619736e-03</internalNodes>\n          <leafValues>\n            1.0069560259580612e-01 4.8160359263420105e-01\n            6.2156772613525391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1438 1.3459140434861183e-02 -1 -2 1439\n            -1.0320040397346020e-02</internalNodes>\n          <leafValues>\n            5.4619538784027100e-01 4.5784530043601990e-01\n            5.4193097352981567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1440 3.1990748643875122e-01 -1 -2 1441\n            9.2198798665776849e-04</internalNodes>\n          <leafValues>\n            2.0080469548702240e-01 5.1932811737060547e-01\n            3.9121940732002258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1442 4.1852539288811386e-04 -1 -2 1443\n            3.5891108564101160e-04</internalNodes>\n          <leafValues>\n            4.2997440695762634e-01 4.3445029854774475e-01\n            5.5319738388061523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1444 -2.0992439985275269e-01 -1 -2 1445\n            -4.9328152090311050e-03</internalNodes>\n          <leafValues>\n            1.0757210105657578e-01 5.7627969980239868e-01\n            4.5746439695358276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1446 2.3409130517393351e-03 -1 -2 1447\n            4.7120270319283009e-03</internalNodes>\n          <leafValues>\n            7.4768078327178955e-01 5.2617651224136353e-01\n            4.5055508613586426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1448 2.8713190928101540e-02 -1 -2 1449\n            -2.6156550738960505e-03</internalNodes>\n          <leafValues>\n            4.4071030616760254e-01 4.2442709207534790e-01\n            6.8929767608642578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1450 -1.3558969832956791e-02 -1 -2 1451\n            -3.0331799644045532e-04</internalNodes>\n          <leafValues>\n            1.2522679567337036e-01 4.0777918696403503e-01\n            5.4428178071975708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1452 -5.5601762142032385e-04 -1 -2 1453\n            2.4025330785661936e-03</internalNodes>\n          <leafValues>\n            5.3780037164688110e-01 3.1665799021720886e-01\n            5.2857381105422974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1454 -3.4089901018887758e-03 -1 -2 1455\n            8.0019602319225669e-04</internalNodes>\n          <leafValues>\n            4.9052149057388306e-01 4.5227360725402832e-01\n            5.5806142091751099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1456 2.1901070140302181e-03 -1 -2 1457\n            3.3745369873940945e-03</internalNodes>\n          <leafValues>\n            6.6126817464828491e-01 5.1077651977539062e-01\n            3.3869299292564392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1458 8.0019602319225669e-04 -1 -2 1459\n            1.7346069216728210e-02</internalNodes>\n          <leafValues>\n            5.7075601816177368e-01 5.0160211324691772e-01\n            6.3064599037170410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1460 -1.9568449351936579e-03 -1 -2 1461\n            -1.1229019612073898e-02</internalNodes>\n          <leafValues>\n            3.0178061127662659e-01 6.2938511371612549e-01\n            4.5204889774322510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1462 -2.6608388870954514e-03 -1 -2 1463\n            -1.1615100316703320e-02</internalNodes>\n          <leafValues>\n            3.3440071344375610e-01 2.8253790736198425e-01\n            5.1509708166122437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1464 -9.5248602330684662e-02 -1 -2 1465\n            7.3701781220734119e-03</internalNodes>\n          <leafValues>\n            1.3982650637626648e-01 5.2939987182617188e-01\n            2.3317280411720276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1466 -1.4953900128602982e-02 -1 -2 1467\n            5.7038792874664068e-04</internalNodes>\n          <leafValues>\n            4.9404659867286682e-01 5.4665708541870117e-01\n            4.6267679333686829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1468 5.8516198769211769e-03 -1 -2 1469\n            2.1150549582671374e-04</internalNodes>\n          <leafValues>\n            6.2700408697128296e-01 5.5081409215927124e-01\n            4.0618729591369629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1470 -6.9679190346505493e-06 -1 -2 1471\n            -7.9677387839183211e-04</internalNodes>\n          <leafValues>\n            4.0965679287910461e-01 5.6155568361282349e-01\n            4.6668860316276550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1472 1.9459480419754982e-02 -1 -2 1473\n            -1.1160830035805702e-02</internalNodes>\n          <leafValues>\n            2.3114809393882751e-01 3.0870118737220764e-01\n            5.5146622657775879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1474 1.4056149870157242e-02 -1 -2 1475\n            -3.2958350493572652e-04</internalNodes>\n          <leafValues>\n            7.0050561428070068e-01 5.7974857091903687e-01\n            4.6916508674621582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1476 -5.4636420682072639e-03 -1 -2 1477\n            5.8881669247057289e-05</internalNodes>\n          <leafValues>\n            5.9285950660705566e-01 3.7413978576660156e-01\n            5.1701688766479492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1478 6.6343429498374462e-03 -1 -2 1479\n            4.5263409614562988e-02</internalNodes>\n          <leafValues>\n            5.4149878025054932e-01 5.1803272962570190e-01\n            1.5296840667724609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1480 -8.0646127462387085e-03 -1 -2 1481\n            4.7389548853971064e-04</internalNodes>\n          <leafValues>\n            2.5154680013656616e-01 5.1219987869262695e-01\n            3.7259489297866821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1482 1.4877359717502259e-05 -1 -2 1483\n            2.4321159347891808e-02</internalNodes>\n          <leafValues>\n            5.5324357748031616e-01 4.9607661366462708e-01\n            5.9833151102066040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1484 6.9931396865285933e-05 -1 -2 1485\n            2.6287760119885206e-03</internalNodes>\n          <leafValues>\n            4.1639530658721924e-01 5.8801448345184326e-01\n            3.3996629714965820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1486 3.8190539926290512e-03 -1 -2 1487\n            -2.5989150628447533e-02</internalNodes>\n          <leafValues>\n            7.8466212749481201e-01 3.2881140708923340e-01\n            5.1550877094268799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1488 1.2062400346621871e-03 -1 -2 1489\n            -1.5557400183752179e-03</internalNodes>\n          <leafValues>\n            4.5960599184036255e-01 3.1269869208335876e-01\n            7.1833992004394531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1490 -2.2691930644214153e-03 -1 -2 1491\n            2.3287249496206641e-04</internalNodes>\n          <leafValues>\n            5.2740061283111572e-01 4.8786661028862000e-01\n            5.6151527166366577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1492 -5.5999699980020523e-03 -1 -2 1493\n            -1.0496189817786217e-02</internalNodes>\n          <leafValues>\n            5.1608121395111084e-01 5.7016140222549438e-01\n            3.2048508524894714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1494 -1.4814930182183161e-05 -1 -2 1495\n            -6.4287078566849232e-04</internalNodes>\n          <leafValues>\n            5.5388379096984863e-01 5.3494292497634888e-01\n            4.4721511006355286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1496 -1.8891949730459601e-04 -1 -2 1497\n            -9.0413521975278854e-03</internalNodes>\n          <leafValues>\n            5.0128370523452759e-01 2.5629359483718872e-01\n            4.5033830404281616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1498 7.9534705728292465e-03 -1 -2 1499\n            -2.7908999472856522e-03</internalNodes>\n          <leafValues>\n            2.6304998993873596e-01 5.7565087080001831e-01\n            4.8548638820648193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1500 3.2857100013643503e-03 -1 -2 1501\n            7.7063008211553097e-04</internalNodes>\n          <leafValues>\n            4.0847519040107727e-01 4.0733560919761658e-01\n            5.9202408790588379e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>97</maxWeakCount>\n      <stageThreshold>4.7763450622558594e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 1502 6.3021942973136902e-02 -1 -2 1503\n            -2.8374609537422657e-03</internalNodes>\n          <leafValues>\n            3.4193828701972961e-01 6.8295639753341675e-01\n            4.4045230746269226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1504 4.6461950987577438e-02 -1 -2 1505\n            2.9152540490031242e-02</internalNodes>\n          <leafValues>\n            4.3917450308799744e-01 4.6010631322860718e-01\n            6.3579368591308594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1506 -1.4000290320836939e-05 -1 -2 1507\n            -1.2757079675793648e-03</internalNodes>\n          <leafValues>\n            3.7300100922584534e-01 3.0938240885734558e-01\n            5.9013700485229492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1508 1.3596529606729746e-03 -1 -2 1509\n            1.7991929780691862e-04</internalNodes>\n          <leafValues>\n            4.3375650048255920e-01 4.2175039649009705e-01\n            5.8468478918075562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1510 -1.4166639630275313e-05 -1 -2 1511\n            6.0252390539972112e-05</internalNodes>\n          <leafValues>\n            4.0846911072731018e-01 5.0872868299484253e-01\n            7.2771841287612915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1512 6.4320368692278862e-03 -1 -2 1513\n            4.6682319953106344e-04</internalNodes>\n          <leafValues>\n            2.9679030179977417e-01 4.1104629635810852e-01\n            5.5812197923660278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1514 5.7436279021203518e-03 -1 -2 1515\n            3.2019240316003561e-03</internalNodes>\n          <leafValues>\n            4.2873099446296692e-01 4.2661958932876587e-01\n            6.4440459012985229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1516 -5.7637941790744662e-04 -1 -2 1517\n            -3.7901920732110739e-03</internalNodes>\n          <leafValues>\n            4.0848249197006226e-01 3.1819209456443787e-01\n            5.2306932210922241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1518 4.8914109356701374e-03 -1 -2 1519\n            4.6459292061626911e-03</internalNodes>\n          <leafValues>\n            3.5483568906784058e-01 5.6105977296829224e-01\n            2.6938489079475403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1520 -6.8799369037151337e-03 -1 -2 1521\n            -1.8147470429539680e-02</internalNodes>\n          <leafValues>\n            6.2354081869125366e-01 2.8619819879531860e-01\n            5.2268481254577637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1522 1.1409220314817503e-04 -1 -2 1523\n            -5.4334272863343358e-04</internalNodes>\n          <leafValues>\n            3.2578331232070923e-01 3.8829690217971802e-01\n            5.3411662578582764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1524 -2.7602489572018385e-03 -1 -2 1525\n            -1.9730569329112768e-03</internalNodes>\n          <leafValues>\n            6.3539659976959229e-01 5.8807611465454102e-01\n            4.5930901169776917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1526 2.4565239436924458e-03 -1 -2 1527\n            1.9392010290175676e-04</internalNodes>\n          <leafValues>\n            3.1340101361274719e-01 5.2771317958831787e-01\n            3.6041069030761719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1528 7.8643016517162323e-02 -1 -2 1529\n            6.5276869572699070e-03</internalNodes>\n          <leafValues>\n            5.2903419733047485e-01 4.6544799208641052e-01\n            6.0449051856994629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1530 -7.8716799616813660e-02 -1 -2 1531\n            5.7298499159514904e-03</internalNodes>\n          <leafValues>\n            2.5411269068717957e-01 4.3669191002845764e-01\n            5.8228862285614014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1532 6.2386557692661881e-04 -1 -2 1533\n            -8.5267230868339539e-02</internalNodes>\n          <leafValues>\n            5.4726922512054443e-01 1.4616079628467560e-01\n            5.1818108558654785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1534 4.0981110185384750e-02 -1 -2 1535\n            7.7135749161243439e-03</internalNodes>\n          <leafValues>\n            1.2701350450515747e-01 4.8326849937438965e-01\n            2.2235789895057678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1536 -6.8663940764963627e-03 -1 -2 1537\n            1.4559639617800713e-02</internalNodes>\n          <leafValues>\n            5.9189289808273315e-01 4.7615069150924683e-01\n            5.7272237539291382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1538 -1.0064310394227505e-02 -1 -2 1539\n            3.6274080630391836e-03</internalNodes>\n          <leafValues>\n            3.6367309093475342e-01 5.2717310190200806e-01\n            2.7405250072479248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1540 -2.3421540390700102e-03 -1 -2 1541\n            -2.4686409160494804e-02</internalNodes>\n          <leafValues>\n            5.4977840185165405e-01 6.0598951578140259e-01\n            4.9603140354156494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1542 1.9456120207905769e-04 -1 -2 1543\n            3.1714211218059063e-04</internalNodes>\n          <leafValues>\n            3.7694650888442993e-01 4.0623620152473450e-01\n            5.6682151556015015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1544 2.0793990697711706e-03 -1 -2 1545\n            1.7982709687203169e-03</internalNodes>\n          <leafValues>\n            4.6186569333076477e-01 4.8675051331520081e-01\n            6.5184497833251953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1546 -2.2287059982772917e-04 -1 -2 1547\n            3.2623921288177371e-04</internalNodes>\n          <leafValues>\n            5.6775957345962524e-01 3.7107339501380920e-01\n            5.6766051054000854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1548 -6.6792681813240051e-02 -1 -2 1549\n            -1.4869889710098505e-03</internalNodes>\n          <leafValues>\n            2.5115218758583069e-01 3.8867509365081787e-01\n            5.2622538805007935e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1550 -5.0454870797693729e-03 -1 -2 1551\n            -4.8297587782144547e-03</internalNodes>\n          <leafValues>\n            6.5574729442596436e-01 5.9341061115264893e-01\n            4.2859220504760742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1552 -1.0722599690780044e-03 -1 -2 1553\n            8.7901195511221886e-03</internalNodes>\n          <leafValues>\n            5.4260587692260742e-01 5.3513032197952271e-01\n            4.8342779278755188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1554 -7.1750381030142307e-03 -1 -2 1555\n            1.1251230025663972e-03</internalNodes>\n          <leafValues>\n            2.0671689510345459e-01 5.1122522354125977e-01\n            3.4687140583992004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1556 1.0634710080921650e-02 -1 -2 1557\n            -1.1763219721615314e-02</internalNodes>\n          <leafValues>\n            4.4790080189704895e-01 6.2539017200469971e-01\n            4.9689871072769165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1558 9.2324063181877136e-02 -1 -2 1559\n            1.8991080578416586e-03</internalNodes>\n          <leafValues>\n            2.0313039422035217e-01 5.6187218427658081e-01\n            4.0465721487998962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1560 -1.0510340332984924e-02 -1 -2 1561\n            -7.4531312566250563e-04</internalNodes>\n          <leafValues>\n            4.9432641267776489e-01 5.6134277582168579e-01\n            3.8453319668769836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1562 8.0041000619530678e-03 -1 -2 1563\n            5.8110528625547886e-03</internalNodes>\n          <leafValues>\n            7.7598422765731812e-01 4.6247330307960510e-01\n            6.2862771749496460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1564 -2.7918580919504166e-02 -1 -2 1565\n            2.1739399526268244e-03</internalNodes>\n          <leafValues>\n            2.4093140661716461e-01 5.3455048799514771e-01\n            3.5079580545425415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1566 -4.0639587678015232e-03 -1 -2 1567\n            6.0017139185220003e-04</internalNodes>\n          <leafValues>\n            6.6471010446548462e-01 4.9985098838806152e-01\n            3.0221650004386902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1568 1.9214770291000605e-03 -1 -2 1569\n            -1.3860830105841160e-02</internalNodes>\n          <leafValues>\n            5.9191507101058960e-01 6.3517677783966064e-01\n            4.9933108687400818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1570 2.3006850853562355e-02 -1 -2 1571\n            -1.3857929734513164e-03</internalNodes>\n          <leafValues>\n            1.9023360311985016e-01 5.2533692121505737e-01\n            3.9858600497245789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1572 1.2637410545721650e-03 -1 -2 1573\n            -1.4675210230052471e-02</internalNodes>\n          <leafValues>\n            4.6661040186882019e-01 3.8231649994850159e-01\n            5.3266328573226929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1574 -2.9535070061683655e-03 -1 -2 1575\n            -1.7189770005643368e-03</internalNodes>\n          <leafValues>\n            7.0636558532714844e-01 3.8134628534317017e-01\n            5.2467352151870728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1576 -4.2484089499339461e-04 -1 -2 1577\n            -8.5248658433556557e-04</internalNodes>\n          <leafValues>\n            4.7916388511657715e-01 4.4912180304527283e-01\n            5.3709012269973755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1578 8.9034568518400192e-03 -1 -2 1579\n            1.4895649655954912e-05</internalNodes>\n          <leafValues>\n            2.0764739811420441e-01 4.4476351141929626e-01\n            5.6671631336212158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1580 -4.7091601300053298e-04 -1 -2 1581\n            4.3084810022264719e-04</internalNodes>\n          <leafValues>\n            5.4650712013244629e-01 5.4932618141174316e-01\n            4.5807081460952759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1582 -6.3893961487337947e-04 -1 -2 1583\n            -7.3733746830839664e-05</internalNodes>\n          <leafValues>\n            5.5015718936920166e-01 5.0857907533645630e-01\n            3.3056980371475220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1584 -8.8991485536098480e-03 -1 -2 1585\n            -1.0253350250422955e-02</internalNodes>\n          <leafValues>\n            4.2764690518379211e-01 1.1232180148363113e-01\n            5.1527231931686401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1586 -5.9637490659952164e-02 -1 -2 1587\n            2.1707199513912201e-02</internalNodes>\n          <leafValues>\n            7.3867720365524292e-01 4.9962919950485229e-01\n            1.3394139707088470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1588 9.9107045680284500e-03 -1 -2 1589\n            -1.0998300276696682e-02</internalNodes>\n          <leafValues>\n            4.6790120005607605e-01 6.9286561012268066e-01\n            5.0120681524276733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1590 7.4608891736716032e-04 -1 -2 1591\n            2.9539171373471618e-04</internalNodes>\n          <leafValues>\n            5.8335822820663452e-01 3.8263911008834839e-01\n            5.5663508176803589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1592 5.0054129213094711e-02 -1 -2 1593\n            -7.2330660186707973e-03</internalNodes>\n          <leafValues>\n            3.0027210712432861e-01 5.9080427885055542e-01\n            5.0008708238601685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1594 -2.6863380335271358e-03 -1 -2 1595\n            -1.0195849463343620e-03</internalNodes>\n          <leafValues>\n            3.9750349521636963e-01 3.6976858973503113e-01\n            5.7561928033828735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1596 -2.0204920321702957e-02 -1 -2 1597\n            2.1340379025787115e-03</internalNodes>\n          <leafValues>\n            6.3752681016921997e-01 5.3632658720016479e-01\n            4.4331708550453186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1598 -1.8348889425396919e-03 -1 -2 1599\n            -5.9489468112587929e-03</internalNodes>\n          <leafValues>\n            5.8289992809295654e-01 2.6806709170341492e-01\n            4.6428859233856201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1600 -2.3030120064504445e-04 -1 -2 1601\n            5.0581009127199650e-03</internalNodes>\n          <leafValues>\n            5.4753202199935913e-01 5.3208339214324951e-01\n            4.6464928984642029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1602 -5.1950011402368546e-04 -1 -2 1603\n            -6.8620947422459722e-04</internalNodes>\n          <leafValues>\n            5.2327448129653931e-01 4.9350860714912415e-01\n            3.1031179428100586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1604 -7.4936267919838428e-03 -1 -2 1605\n            -1.5682930126786232e-02</internalNodes>\n          <leafValues>\n            2.8830468654632568e-01 3.6403131484985352e-01\n            5.3687548637390137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1606 -3.2649750355631113e-03 -1 -2 1607\n            3.8463930832222104e-04</internalNodes>\n          <leafValues>\n            6.4686310291290283e-01 5.2596598863601685e-01\n            3.8314279913902283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1608 4.4492390006780624e-03 -1 -2 1609\n            2.3118320852518082e-02</internalNodes>\n          <leafValues>\n            2.0868189632892609e-01 4.9785330891609192e-01\n            5.9612572193145752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1610 2.0835159812122583e-03 -1 -2 1611\n            1.1513150529935956e-03</internalNodes>\n          <leafValues>\n            5.7464218139648438e-01 3.5868450999259949e-01\n            5.3634738922119141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1612 3.6104708909988403e-02 -1 -2 1613\n            3.6256198654882610e-04</internalNodes>\n          <leafValues>\n            2.8331369161605835e-01 5.4777222871780396e-01\n            4.1105321049690247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1614 -3.4635469783097506e-03 -1 -2 1615\n            -2.8796829283237457e-03</internalNodes>\n          <leafValues>\n            5.9903860092163086e-01 5.7252532243728638e-01\n            4.1495120525360107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1616 -8.1119500100612640e-03 -1 -2 1617\n            4.5932079665362835e-03</internalNodes>\n          <leafValues>\n            5.3963518142700195e-01 5.3797042369842529e-01\n            3.8913029432296753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1618 7.0014740340411663e-03 -1 -2 1619\n            8.0169539432972670e-04</internalNodes>\n          <leafValues>\n            3.7146711349487305e-01 5.5295670032501221e-01\n            3.7558048963546753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1620 -8.6652329191565514e-03 -1 -2 1621\n            -2.7315050829201937e-03</internalNodes>\n          <leafValues>\n            5.0257730484008789e-01 5.8503222465515137e-01\n            4.6175739169120789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1622 1.3301590224727988e-03 -1 -2 1623\n            -4.2648240923881531e-03</internalNodes>\n          <leafValues>\n            5.9377008676528931e-01 5.6453680992126465e-01\n            3.9376249909400940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1624 6.3251499086618423e-03 -1 -2 1625\n            -3.0753740575164557e-03</internalNodes>\n          <leafValues>\n            5.1821058988571167e-01 3.0074161291122437e-01\n            5.1964038610458374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1626 -7.3622138006612659e-04 -1 -2 1627\n            3.0082479497650638e-05</internalNodes>\n          <leafValues>\n            3.6975800991058350e-01 4.3275931477546692e-01\n            5.7158088684082031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1628 -3.8722730241715908e-03 -1 -2 1629\n            6.2879058532416821e-04</internalNodes>\n          <leafValues>\n            3.4737130999565125e-01 5.4382592439651489e-01\n            4.4539061188697815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1630 1.3411579420790076e-03 -1 -2 1631\n            -8.3681922405958176e-03</internalNodes>\n          <leafValues>\n            6.5117138624191284e-01 1.4432950317859650e-01\n            4.8881998658180237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1632 9.3305751215666533e-04 -1 -2 1633\n            -1.0746510233730078e-03</internalNodes>\n          <leafValues>\n            3.9511090517044067e-01 3.9102658629417419e-01\n            5.3495037555694580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1634 -1.8610050901770592e-02 -1 -2 1635\n            1.3651419430971146e-03</internalNodes>\n          <leafValues>\n            1.2757439911365509e-01 5.0382888317108154e-01\n            6.9513040781021118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1636 7.3744421824812889e-03 -1 -2 1637\n            8.4163323044776917e-03</internalNodes>\n          <leafValues>\n            5.2534431219100952e-01 5.0112438201904297e-01\n            7.3113328218460083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1638 5.1413988694548607e-03 -1 -2 1639\n            4.5847031287848949e-03</internalNodes>\n          <leafValues>\n            4.9535360932350159e-01 2.5355559587478638e-01\n            6.4624428749084473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1640 2.8565239161252975e-02 -1 -2 1641\n            4.3958800961263478e-04</internalNodes>\n          <leafValues>\n            2.3307220637798309e-01 4.7022441029548645e-01\n            5.5445492267608643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1642 3.1459458172321320e-02 -1 -2 1643\n            5.6011630222201347e-03</internalNodes>\n          <leafValues>\n            3.3689688891172409e-02 4.7871211171150208e-01\n            6.3383519649505615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1644 7.1835669223219156e-04 -1 -2 1645\n            -5.5303089320659637e-03</internalNodes>\n          <leafValues>\n            5.4314869642257690e-01 4.1058328747749329e-01\n            5.4039907455444336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1646 1.4129279879853129e-03 -1 -2 1647\n            2.5530709535814822e-04</internalNodes>\n          <leafValues>\n            3.1055399775505066e-01 4.2544719576835632e-01\n            5.4471540451049805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1648 3.1966410460881889e-04 -1 -2 1649\n            5.0411392003297806e-03</internalNodes>\n          <leafValues>\n            6.1183619499206543e-01 5.2900421619415283e-01\n            4.2247870564460754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1650 7.7617880888283253e-03 -1 -2 1651\n            2.9374631121754646e-03</internalNodes>\n          <leafValues>\n            4.3153458833694458e-01 6.6292631626129150e-01\n            3.0289649963378906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1652 -1.6497720498591661e-03 -1 -2 1653\n            -5.8834417723119259e-03</internalNodes>\n          <leafValues>\n            5.4918527603149414e-01 3.1885540485382080e-01\n            5.1842892169952393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1654 8.7459187489002943e-04 -1 -2 1655\n            -1.5308779664337635e-02</internalNodes>\n          <leafValues>\n            3.3288308978080750e-01 3.9236080646514893e-01\n            5.2351391315460205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1656 3.2292451709508896e-02 -1 -2 1657\n            -4.3842519517056644e-04</internalNodes>\n          <leafValues>\n            5.9776467084884644e-01 4.5416879653930664e-01\n            5.3694289922714233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1658 1.5429529594257474e-03 -1 -2 1659\n            -2.4733028840273619e-03</internalNodes>\n          <leafValues>\n            6.3181412220001221e-01 3.4906330704689026e-01\n            4.7590249776840210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1660 2.0994939841330051e-03 -1 -2 1661\n            -5.7541108690202236e-03</internalNodes>\n          <leafValues>\n            5.8871978521347046e-01 5.9613317251205444e-01\n            4.8419830203056335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1662 -1.0233130306005478e-02 -1 -2 1663\n            2.2554509341716766e-01</internalNodes>\n          <leafValues>\n            1.7054040729999542e-01 4.7793799638748169e-01\n            9.7879663109779358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1664 2.9666559770703316e-02 -1 -2 1665\n            -2.8518449980765581e-03</internalNodes>\n          <leafValues>\n            5.8222240209579468e-01 5.4596269130706787e-01\n            4.6100661158561707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1666 9.7465328872203827e-04 -1 -2 1667\n            1.4044740055396687e-05</internalNodes>\n          <leafValues>\n            3.6703228950500488e-01 4.3023860454559326e-01\n            5.6917107105255127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1668 -1.7579430714249611e-02 -1 -2 1669\n            -5.2381679415702820e-02</internalNodes>\n          <leafValues>\n            6.9173210859298706e-01 7.1100401878356934e-01\n            5.0601547956466675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1670 -1.1242110282182693e-02 -1 -2 1671\n            -3.6728400737047195e-03</internalNodes>\n          <leafValues>\n            8.7691891193389893e-01 6.5191918611526489e-01\n            4.5460689067840576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1672 3.5082760732620955e-03 -1 -2 1673\n            6.1679710634052753e-03</internalNodes>\n          <leafValues>\n            5.3298658132553101e-01 5.2204591035842896e-01\n            2.9535189270973206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1674 -9.7009900491684675e-04 -1 -2 1675\n            -1.0957010090351105e-02</internalNodes>\n          <leafValues>\n            5.0486332178115845e-01 5.8373582363128662e-01\n            3.0200859904289246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1676 -8.3272513002157211e-03 -1 -2 1677\n            2.9798380637657829e-05</internalNodes>\n          <leafValues>\n            3.1580638885498047e-01 4.3863898515701294e-01\n            5.4432111978530884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1678 2.8244039276614785e-04 -1 -2 1679\n            -8.1364117795601487e-04</internalNodes>\n          <leafValues>\n            5.6253957748413086e-01 5.2811980247497559e-01\n            3.4014078974723816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1680 1.8008040497079492e-03 -1 -2 1681\n            -6.9944779388606548e-03</internalNodes>\n          <leafValues>\n            3.4716591238975525e-01 4.4816970825195312e-01\n            5.3857702016830444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1682 4.5625398342963308e-05 -1 -2 1683\n            -7.3189922841265798e-04</internalNodes>\n          <leafValues>\n            4.4925129413604736e-01 4.1673120856285095e-01\n            6.0211020708084106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1684 -2.9980219551362097e-04 -1 -2 1685\n            -2.9060940505587496e-05</internalNodes>\n          <leafValues>\n            4.1484281420707703e-01 5.5920898914337158e-01\n            4.0732109546661377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1686 -5.9742690064013004e-04 -1 -2 1687\n            1.4831830048933625e-04</internalNodes>\n          <leafValues>\n            6.0889142751693726e-01 5.2983051538467407e-01\n            3.7619501352310181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1688 -2.9441029764711857e-03 -1 -2 1689\n            1.3741210103034973e-01</internalNodes>\n          <leafValues>\n            4.7160848975181580e-01 5.1013368368148804e-01\n            4.6746801584959030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1690 -8.8414177298545837e-02 -1 -2 1691\n            7.0610277354717255e-02</internalNodes>\n          <leafValues>\n            1.1818689852952957e-01 5.1190632581710815e-01\n            7.7784419059753418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1692 -7.7188978902995586e-03 -1 -2 1693\n            1.5115399844944477e-02</internalNodes>\n          <leafValues>\n            1.8741349875926971e-01 4.9800279736518860e-01\n            7.0058178901672363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1694 1.0671879863366485e-03 -1 -2 1695\n            7.0487911580130458e-04</internalNodes>\n          <leafValues>\n            4.4822388887405396e-01 6.2657529115676880e-01\n            4.4026550650596619e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>90</maxWeakCount>\n      <stageThreshold>4.4251281738281250e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 1696 -9.8690733313560486e-02 -1 -2 1697\n            6.2373418360948563e-02</internalNodes>\n          <leafValues>\n            3.9994749426841736e-01 5.2477848529815674e-01\n            8.1935757398605347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1698 1.9496519817039371e-03 -1 -2 1699\n            -8.9139147894456983e-04</internalNodes>\n          <leafValues>\n            3.5298168659210205e-01 5.8527278900146484e-01\n            3.2459780573844910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1700 -5.5150408297777176e-04 -1 -2 1701\n            -1.1721949558705091e-03</internalNodes>\n          <leafValues>\n            3.8928169012069702e-01 4.3350520730018616e-01\n            6.5206241607666016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1702 -7.4480642797425389e-04 -1 -2 1703\n            -2.6264840271323919e-03</internalNodes>\n          <leafValues>\n            4.0411350131034851e-01 5.6249821186065674e-01\n            3.9675250649452209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1704 -3.9712688885629177e-04 -1 -2 1705\n            3.5984949208796024e-03</internalNodes>\n          <leafValues>\n            3.8561120629310608e-01 5.9978890419006348e-01\n            4.2416140437126160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1706 5.3080618381500244e-03 -1 -2 1707\n            9.6319877775385976e-04</internalNodes>\n          <leafValues>\n            6.6601687669754028e-01 4.4813790917396545e-01\n            5.5834877490997314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1708 5.0776469288393855e-04 -1 -2 1709\n            3.6223160568624735e-03</internalNodes>\n          <leafValues>\n            3.5354590415954590e-01 3.4098070859909058e-01\n            5.4206877946853638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1710 -6.2061410397291183e-02 -1 -2 1711\n            6.4387189922854304e-04</internalNodes>\n          <leafValues>\n            1.9340839982032776e-01 4.0836268663406372e-01\n            5.4902219772338867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1712 2.6239909231662750e-02 -1 -2 1713\n            8.1940297968685627e-04</internalNodes>\n          <leafValues>\n            2.2857080399990082e-01 4.6486678719520569e-01\n            6.0173559188842773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1714 2.3833119485061616e-04 -1 -2 1715\n            -1.5869759954512119e-03</internalNodes>\n          <leafValues>\n            3.5980388522148132e-01 4.2596510052680969e-01\n            5.4764348268508911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1716 -6.7263417877256870e-03 -1 -2 1717\n            1.1006110347807407e-02</internalNodes>\n          <leafValues>\n            6.5072381496429443e-01 5.1494097709655762e-01\n            3.3629849553108215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1718 7.1445819921791553e-03 -1 -2 1719\n            -4.7233798541128635e-03</internalNodes>\n          <leafValues>\n            2.6729300618171692e-01 5.6521821022033691e-01\n            4.2981448769569397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1720 9.8437406122684479e-03 -1 -2 1721\n            1.5124640412977897e-05</internalNodes>\n          <leafValues>\n            1.1518859863281250e-01 4.3735980987548828e-01\n            5.6121289730072021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1722 3.9908871054649353e-02 -1 -2 1723\n            5.3903679363429546e-03</internalNodes>\n          <leafValues>\n            5.2046489715576172e-01 4.8134678602218628e-01\n            6.3612091541290283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1724 -3.9908871054649353e-02 -1 -2 1725\n            5.3903679363429546e-03</internalNodes>\n          <leafValues>\n            1.5068709850311279e-01 4.5816949009895325e-01\n            6.2002408504486084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1726 6.7005190066993237e-03 -1 -2 1727\n            -1.2623789720237255e-02</internalNodes>\n          <leafValues>\n            3.4322351217269897e-01 3.0882269144058228e-01\n            5.2267378568649292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1728 1.1806610040366650e-02 -1 -2 1729\n            -3.4257229417562485e-03</internalNodes>\n          <leafValues>\n            7.1879392862319946e-01 3.1208148598670959e-01\n            5.0658440589904785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1730 3.9385299896821380e-04 -1 -2 1731\n            3.4388188272714615e-02</internalNodes>\n          <leafValues>\n            4.7545841336250305e-01 5.2616578340530396e-01\n            3.3501741290092468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1732 -7.5009986758232117e-02 -1 -2 1733\n            4.9022492021322250e-04</internalNodes>\n          <leafValues>\n            1.7134809494018555e-01 4.7258019447326660e-01\n            5.9564691781997681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1734 -8.5525289177894592e-03 -1 -2 1735\n            1.3135520566720515e-04</internalNodes>\n          <leafValues>\n            6.5582227706909180e-01 4.8354008793830872e-01\n            5.5869138240814209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1736 4.7948658466339111e-03 -1 -2 1737\n            2.0124691072851419e-03</internalNodes>\n          <leafValues>\n            2.6457059383392334e-01 3.6579450964927673e-01\n            5.1247721910476685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1738 -1.1785479635000229e-01 -1 -2 1739\n            1.5575019642710686e-03</internalNodes>\n          <leafValues>\n            2.3856540024280548e-01 5.4904741048812866e-01\n            4.2747479677200317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1740 -1.5573759563267231e-02 -1 -2 1741\n            -2.1854790393263102e-03</internalNodes>\n          <leafValues>\n            6.9389009475708008e-01 3.6459881067276001e-01\n            5.0925260782241821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1742 2.9272339306771755e-03 -1 -2 1743\n            6.4663668163120747e-03</internalNodes>\n          <leafValues>\n            4.6858081221580505e-01 4.9734100699424744e-01\n            7.7260971069335938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1744 -7.6140360906720161e-03 -1 -2 1745\n            4.1512572206556797e-03</internalNodes>\n          <leafValues>\n            6.8774658441543579e-01 4.7885251045227051e-01\n            6.9216579198837280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1746 2.7711640577763319e-03 -1 -2 1747\n            -1.2836109846830368e-02</internalNodes>\n          <leafValues>\n            5.4818397760391235e-01 3.8001629710197449e-01\n            5.2044928073883057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1748 -2.4380050599575043e-03 -1 -2 1749\n            2.1713329479098320e-03</internalNodes>\n          <leafValues>\n            2.5824350118637085e-01 4.9611631035804749e-01\n            3.2152029871940613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1750 6.2800728483125567e-04 -1 -2 1751\n            -9.7982389852404594e-03</internalNodes>\n          <leafValues>\n            5.4604238271713257e-01 6.0465437173843384e-01\n            4.9399220943450928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1752 7.3543828912079334e-03 -1 -2 1753\n            -1.4665040187537670e-02</internalNodes>\n          <leafValues>\n            5.2910941839218140e-01 5.4461228847503662e-01\n            3.5673621296882629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1754 3.0244510620832443e-02 -1 -2 1755\n            -5.6660208851099014e-02</internalNodes>\n          <leafValues>\n            5.5183291435241699e-01 6.9309788942337036e-01\n            5.0933879613876343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1756 -5.6967479176819324e-03 -1 -2 1757\n            3.0806770548224449e-02</internalNodes>\n          <leafValues>\n            3.2015261054039001e-01 4.9892461299896240e-01\n            2.2770540416240692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1758 2.2748769260942936e-03 -1 -2 1759\n            2.0436900667846203e-03</internalNodes>\n          <leafValues>\n            4.8109310865402222e-01 5.2838671207427979e-01\n            3.2559248805046082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1760 -8.6277956143021584e-03 -1 -2 1761\n            6.5113382879644632e-04</internalNodes>\n          <leafValues>\n            6.2665361166000366e-01 5.0971370935440063e-01\n            3.1919100880622864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1762 8.8188261725008488e-04 -1 -2 1763\n            -1.4594909735023975e-02</internalNodes>\n          <leafValues>\n            4.5495858788490295e-01 2.6450389623641968e-01\n            5.1538681983947754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1764 -1.2304580304771662e-03 -1 -2 1765\n            -2.1867299801670015e-04</internalNodes>\n          <leafValues>\n            6.1975848674774170e-01 5.4691988229751587e-01\n            4.2068558931350708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1766 -1.0909959673881531e-03 -1 -2 1767\n            3.5210378700867295e-04</internalNodes>\n          <leafValues>\n            4.1407600045204163e-01 5.4766088724136353e-01\n            4.1550210118293762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1768 -7.2563779540359974e-03 -1 -2 1769\n            1.4701850013807416e-03</internalNodes>\n          <leafValues>\n            7.1604692935943604e-01 5.2408081293106079e-01\n            3.7296628952026367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1770 1.1472719779703766e-04 -1 -2 1771\n            3.0506469774991274e-03</internalNodes>\n          <leafValues>\n            4.0337988734245300e-01 5.2639859914779663e-01\n            3.5600930452346802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1772 2.6269949739798903e-04 -1 -2 1773\n            -3.6365550477057695e-03</internalNodes>\n          <leafValues>\n            4.5697999000549316e-01 3.0425709486007690e-01\n            5.8682537078857422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1774 -8.4893293678760529e-03 -1 -2 1775\n            5.8107408694922924e-03</internalNodes>\n          <leafValues>\n            4.9141570925712585e-01 4.9185299873352051e-01\n            6.2669628858566284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1776 7.5583951547741890e-04 -1 -2 1777\n            -2.2017690353095531e-03</internalNodes>\n          <leafValues>\n            5.6332361698150635e-01 5.5539160966873169e-01\n            3.8276460766792297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1778 2.7908938936889172e-03 -1 -2 1779\n            -1.8228569533675909e-03</internalNodes>\n          <leafValues>\n            5.4986977577209473e-01 4.3822830915451050e-01\n            5.4240328073501587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1780 -7.2495508939027786e-03 -1 -2 1781\n            -6.8744522286579013e-04</internalNodes>\n          <leafValues>\n            2.8881219029426575e-01 3.4726551175117493e-01\n            5.0763708353042603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1782 2.5174440816044807e-03 -1 -2 1783\n            -1.0151379741728306e-02</internalNodes>\n          <leafValues>\n            4.6612051129341125e-01 3.7447750568389893e-01\n            5.2940011024475098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1784 -4.1399952024221420e-03 -1 -2 1785\n            -4.7078551724553108e-03</internalNodes>\n          <leafValues>\n            4.6604850888252258e-01 4.1750618815422058e-01\n            6.9163060188293457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1786 4.1981041431427002e-02 -1 -2 1787\n            -1.4272999949753284e-02</internalNodes>\n          <leafValues>\n            2.0182150602340698e-01 7.5111979246139526e-01\n            5.0320839881896973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1788 4.0869521908462048e-03 -1 -2 1789\n            1.7606799956411123e-03</internalNodes>\n          <leafValues>\n            2.5045138597488403e-01 3.3014011383056641e-01\n            5.2183371782302856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1790 1.2550549581646919e-04 -1 -2 1791\n            -2.9503209516406059e-03</internalNodes>\n          <leafValues>\n            4.6144428849220276e-01 4.6199500560760498e-01\n            5.2470302581787109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1792 -1.1312420247122645e-03 -1 -2 1793\n            -1.6983180539682508e-03</internalNodes>\n          <leafValues>\n            6.3143682479858398e-01 3.4013068675994873e-01\n            5.0555270910263062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1794 -1.1457820422947407e-02 -1 -2 1795\n            -8.4962565451860428e-03</internalNodes>\n          <leafValues>\n            4.9399960041046143e-01 2.9654508829116821e-01\n            5.1943677663803101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1796 1.1919089592993259e-02 -1 -2 1797\n            6.4416420646011829e-03</internalNodes>\n          <leafValues>\n            7.8869980573654175e-01 5.1069867610931396e-01\n            2.9671460390090942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1798 -8.7857811013236642e-04 -1 -2 1799\n            -2.0312711130827665e-03</internalNodes>\n          <leafValues>\n            5.7143712043762207e-01 4.4812008738517761e-01\n            5.3849118947982788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1800 -1.5262430533766747e-03 -1 -2 1801\n            4.2860880494117737e-03</internalNodes>\n          <leafValues>\n            6.1935687065124512e-01 4.3398851156234741e-01\n            7.6972991228103638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1802 3.5010920837521553e-03 -1 -2 1803\n            1.2587670236825943e-02</internalNodes>\n          <leafValues>\n            3.1713891029357910e-01 5.2466988563537598e-01\n            4.2412081360816956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1804 2.6207490009255707e-04 -1 -2 1805\n            4.4701730075757951e-05</internalNodes>\n          <leafValues>\n            4.2318999767303467e-01 4.1741389036178589e-01\n            5.9196037054061890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1806 7.8084698179736733e-04 -1 -2 1807\n            8.8851212058216333e-04</internalNodes>\n          <leafValues>\n            4.2773890495300293e-01 3.7201610207557678e-01\n            5.2268189191818237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1808 2.3369069676846266e-03 -1 -2 1809\n            1.6688359901309013e-03</internalNodes>\n          <leafValues>\n            5.4780668020248413e-01 3.6286789178848267e-01\n            6.1500048637390137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1810 3.0844469438306987e-04 -1 -2 1811\n            3.4617560449987650e-03</internalNodes>\n          <leafValues>\n            4.7470751404762268e-01 4.5801380276679993e-01\n            5.5856817960739136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1812 1.8961310386657715e-02 -1 -2 1813\n            1.7347310483455658e-01</internalNodes>\n          <leafValues>\n            5.2988010644912720e-01 3.6983850598335266e-01\n            8.4986197948455811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1814 2.0020549709443003e-04 -1 -2 1815\n            1.0967060225084424e-03</internalNodes>\n          <leafValues>\n            5.5656617879867554e-01 4.7957131266593933e-01\n            6.2862598896026611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1816 1.5107099898159504e-04 -1 -2 1817\n            -3.4463501069694757e-03</internalNodes>\n          <leafValues>\n            4.0524059534072876e-01 6.1730152368545532e-01\n            4.4142639636993408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1818 8.5176620632410049e-03 -1 -2 1819\n            -3.5812109708786011e-02</internalNodes>\n          <leafValues>\n            3.5705709457397461e-01 3.1513288617134094e-01\n            5.2527028322219849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1820 -2.1155400201678276e-02 -1 -2 1821\n            8.9890940580517054e-04</internalNodes>\n          <leafValues>\n            6.1247211694717407e-01 5.1699757575988770e-01\n            3.5962718725204468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1822 -1.5613760333508253e-03 -1 -2 1823\n            6.7120860330760479e-04</internalNodes>\n          <leafValues>\n            4.9149879813194275e-01 4.5462110638618469e-01\n            5.3958117961883545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1824 -2.1597029641270638e-02 -1 -2 1825\n            -2.4947229772806168e-02</internalNodes>\n          <leafValues>\n            1.9031339883804321e-01 6.9740772247314453e-01\n            4.9677160382270813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1826 1.8725979607552290e-03 -1 -2 1827\n            6.3912719488143921e-03</internalNodes>\n          <leafValues>\n            4.7489479184150696e-01 5.1801782846450806e-01\n            2.9243218898773193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1828 -9.1552399098873138e-03 -1 -2 1829\n            2.1715660113841295e-03</internalNodes>\n          <leafValues>\n            7.6658701896667480e-01 5.2155512571334839e-01\n            3.3657190203666687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1830 1.2330369791015983e-03 -1 -2 1831\n            -4.0785901364870369e-04</internalNodes>\n          <leafValues>\n            6.2609577178955078e-01 4.5335099101066589e-01\n            5.3864890336990356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1832 4.6437609125860035e-04 -1 -2 1833\n            -1.1600199650274590e-04</internalNodes>\n          <leafValues>\n            4.1034960746765137e-01 5.8303910493850708e-01\n            4.3041059374809265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1834 -1.2718720361590385e-02 -1 -2 1835\n            8.9431880041956902e-05</internalNodes>\n          <leafValues>\n            2.1325829625129700e-01 4.8728910088539124e-01\n            5.4589152336120605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1836 -3.3913689549081028e-04 -1 -2 1837\n            -1.8026340752840042e-02</internalNodes>\n          <leafValues>\n            3.9743649959564209e-01 7.5685507059097290e-01\n            5.0456118583679199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1838 6.9179181009531021e-03 -1 -2 1839\n            -1.1839679791592062e-04</internalNodes>\n          <leafValues>\n            3.9662998914718628e-01 4.1980829834938049e-01\n            5.4358041286468506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1840 -3.9474181830883026e-03 -1 -2 1841\n            6.0050919273635373e-05</internalNodes>\n          <leafValues>\n            6.3694578409194946e-01 5.2695667743682861e-01\n            3.8122430443763733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1842 9.1423643752932549e-03 -1 -2 1843\n            2.1305440168362111e-04</internalNodes>\n          <leafValues>\n            4.1567629575729370e-01 3.5235330462455750e-01\n            5.3494542837142944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1844 -2.0855850016232580e-04 -1 -2 1845\n            1.3130389852449298e-03</internalNodes>\n          <leafValues>\n            4.4033220410346985e-01 6.0581612586975098e-01\n            4.4682189822196960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1846 -2.9134768992662430e-03 -1 -2 1847\n            2.9645769391208887e-03</internalNodes>\n          <leafValues>\n            4.8257058858871460e-01 4.8359981179237366e-01\n            6.0392779111862183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1848 1.7772549763321877e-03 -1 -2 1849\n            -7.7136349864304066e-03</internalNodes>\n          <leafValues>\n            6.8718272447586060e-01 2.8422209620475769e-01\n            5.1454281806945801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1850 5.1027478184551001e-04 -1 -2 1851\n            1.7460630042478442e-03</internalNodes>\n          <leafValues>\n            6.0244262218475342e-01 4.7566100955009460e-01\n            5.7211542129516602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1852 3.8068278809078038e-04 -1 -2 1853\n            2.8228890150785446e-03</internalNodes>\n          <leafValues>\n            4.9310690164566040e-01 3.3116981387138367e-01\n            6.2275981903076172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1854 -5.3000478073954582e-03 -1 -2 1855\n            4.4951299059903249e-05</internalNodes>\n          <leafValues>\n            5.2320927381515503e-01 3.9952319860458374e-01\n            5.3147977590560913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1856 3.2752458937466145e-03 -1 -2 1857\n            -2.8162579983472824e-03</internalNodes>\n          <leafValues>\n            4.4816198945045471e-01 3.9079719781875610e-01\n            6.6716408729553223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1858 1.4112279750406742e-03 -1 -2 1859\n            8.3062034100294113e-03</internalNodes>\n          <leafValues>\n            5.3570109605789185e-01 4.7709658741950989e-01\n            5.5700999498367310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1860 2.2164839319884777e-03 -1 -2 1861\n            -4.9868631176650524e-03</internalNodes>\n          <leafValues>\n            4.9471241235733032e-01 5.2413070201873779e-01\n            2.5126549601554871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1862 -3.6664260551333427e-03 -1 -2 1863\n            -1.0581229813396931e-02</internalNodes>\n          <leafValues>\n            4.6195539832115173e-01 6.3017189502716064e-01\n            4.9730318784713745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1864 7.3366491124033928e-03 -1 -2 1865\n            -3.9318940252996981e-04</internalNodes>\n          <leafValues>\n            2.8709700703620911e-01 4.2528051137924194e-01\n            5.5792468786239624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1866 -8.1375334411859512e-03 -1 -2 1867\n            2.4809150490909815e-03</internalNodes>\n          <leafValues>\n            5.7473158836364746e-01 5.2033740282058716e-01\n            3.9035668969154358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1868 8.8749779388308525e-04 -1 -2 1869\n            -4.2194919660687447e-04</internalNodes>\n          <leafValues>\n            5.5343210697174072e-01 5.3380441665649414e-01\n            3.9258408546447754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1870 -7.9790111631155014e-03 -1 -2 1871\n            1.1439629597589374e-03</internalNodes>\n          <leafValues>\n            4.1443160176277161e-01 4.7013729810714722e-01\n            5.2817362546920776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1872 7.5542130507528782e-03 -1 -2 1873\n            1.0288399644196033e-03</internalNodes>\n          <leafValues>\n            2.5272560119628906e-01 5.6051462888717651e-01\n            4.2978560924530029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1874 -1.7234670231118798e-03 -1 -2 1875\n            5.7586699724197388e-01</internalNodes>\n          <leafValues>\n            4.8396828770637512e-01 5.1105028390884399e-01\n            8.0489329993724823e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>109</maxWeakCount>\n      <stageThreshold>5.3755569458007812e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 1876 6.6640521399676800e-03 -1 -2 1877\n            8.9905522763729095e-03</internalNodes>\n          <leafValues>\n            3.8289201259613037e-01 4.8584291338920593e-01\n            7.3549592494964600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1878 5.7154200039803982e-03 -1 -2 1879\n            1.1257929727435112e-03</internalNodes>\n          <leafValues>\n            6.7232239246368408e-01 4.4295778870582581e-01\n            6.0707777738571167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1880 -9.1789010912179947e-04 -1 -2 1881\n            -1.0492859873920679e-03</internalNodes>\n          <leafValues>\n            3.0763450264930725e-01 5.5936437845230103e-01\n            3.6510229110717773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1882 3.5453929740469903e-05 -1 -2 1883\n            2.9015709878876805e-04</internalNodes>\n          <leafValues>\n            4.2779681086540222e-01 4.5835450291633606e-01\n            5.2846831083297729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1884 1.6071660502348095e-04 -1 -2 1885\n            -5.2961107576265931e-04</internalNodes>\n          <leafValues>\n            3.7981921434402466e-01 3.8504371047019958e-01\n            5.9396880865097046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1886 2.6682569296099246e-04 -1 -2 1887\n            -1.3492540165316314e-04</internalNodes>\n          <leafValues>\n            4.1230249404907227e-01 5.7605999708175659e-01\n            4.2376458644866943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1888 -1.0841679759323597e-02 -1 -2 1889\n            1.2077829800546169e-02</internalNodes>\n          <leafValues>\n            3.9299210906028748e-01 5.7619231939315796e-01\n            2.7804449200630188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1890 2.2128869313746691e-03 -1 -2 1891\n            -1.5266190283000469e-02</internalNodes>\n          <leafValues>\n            4.7945070266723633e-01 7.4055880308151245e-02\n            5.1535779237747192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1892 6.7929533543065190e-05 -1 -2 1893\n            1.7633590323384851e-04</internalNodes>\n          <leafValues>\n            5.8587378263473511e-01 3.5676109790802002e-01\n            5.5989629030227661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1894 8.1311381654813886e-04 -1 -2 1895\n            3.2630451023578644e-03</internalNodes>\n          <leafValues>\n            5.3468507528305054e-01 4.7825369238853455e-01\n            5.4567539691925049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1896 -3.9503918960690498e-03 -1 -2 1897\n            -3.9864578866399825e-04</internalNodes>\n          <leafValues>\n            2.8318119049072266e-01 5.4852157831192017e-01\n            4.1596978902816772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1898 -1.1432520113885403e-02 -1 -2 1899\n            5.3339172154664993e-03</internalNodes>\n          <leafValues>\n            5.6391012668609619e-01 4.5969840884208679e-01\n            5.9312427043914795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1900 8.3193257451057434e-03 -1 -2 1901\n            -4.2479918920435011e-04</internalNodes>\n          <leafValues>\n            3.2306200265884399e-01 3.7952938675880432e-01\n            5.4086112976074219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1902 -1.1189430207014084e-01 -1 -2 1903\n            -7.5553781352937222e-03</internalNodes>\n          <leafValues>\n            1.1322979629039764e-01 6.3393700122833252e-01\n            4.8387709259986877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1904 -7.0337029173970222e-03 -1 -2 1905\n            -1.4833680354058743e-02</internalNodes>\n          <leafValues>\n            5.6652551889419556e-01 6.7514181137084961e-01\n            4.1409450769424438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1906 8.7506724521517754e-03 -1 -2 1907\n            1.6645010327920318e-03</internalNodes>\n          <leafValues>\n            3.5612589120864868e-01 5.3472799062728882e-01\n            3.6497798562049866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1908 9.4900820404291153e-03 -1 -2 1909\n            1.1133110383525491e-03</internalNodes>\n          <leafValues>\n            2.7546560764312744e-01 4.2259928584098816e-01\n            5.6291788816452026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1910 9.4940755516290665e-03 -1 -2 1911\n            -1.5396620146930218e-03</internalNodes>\n          <leafValues>\n            4.9060368537902832e-01 4.0070518851280212e-01\n            5.3807091712951660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1912 1.3434959948062897e-01 -1 -2 1913\n            -9.4940755516290665e-03</internalNodes>\n          <leafValues>\n            2.2146719694137573e-01 7.3531562089920044e-01\n            5.0050330162048340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1914 2.0011790096759796e-02 -1 -2 1915\n            -1.8875009845942259e-03</internalNodes>\n          <leafValues>\n            3.3279061317443848e-01 3.9152890443801880e-01\n            5.4018497467041016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1916 7.1842782199382782e-03 -1 -2 1917\n            1.6976969782263041e-03</internalNodes>\n          <leafValues>\n            7.1766048669815063e-01 4.5269781351089478e-01\n            6.0769128799438477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1918 4.9219978973269463e-03 -1 -2 1919\n            1.1803199537098408e-02</internalNodes>\n          <leafValues>\n            2.5698339939117432e-01 4.9996379017829895e-01\n            5.9582281112670898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1920 -9.7703449428081512e-03 -1 -2 1921\n            2.1174899302423000e-03</internalNodes>\n          <leafValues>\n            3.4590938687324524e-01 4.5151269435882568e-01\n            5.8297157287597656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1922 9.4801411032676697e-03 -1 -2 1923\n            -2.6078789960592985e-03</internalNodes>\n          <leafValues>\n            4.8073920607566833e-01 3.4622168540954590e-01\n            5.2015948295593262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1924 -5.7252747938036919e-03 -1 -2 1925\n            -8.2325618714094162e-03</internalNodes>\n          <leafValues>\n            6.5998530387878418e-01 2.8218281269073486e-01\n            5.1252847909927368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1926 8.9571950957179070e-04 -1 -2 1927\n            -1.5021569561213255e-04</internalNodes>\n          <leafValues>\n            4.8838189244270325e-01 4.8299181461334229e-01\n            5.4287171363830566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1928 4.8489659093320370e-04 -1 -2 1929\n            -9.6192650496959686e-02</internalNodes>\n          <leafValues>\n            4.4345989823341370e-01 2.2566360235214233e-01\n            5.9562277793884277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1930 -1.1053519556298852e-03 -1 -2 1931\n            -1.0215040296316147e-01</internalNodes>\n          <leafValues>\n            4.5272240042686462e-01 2.8443491458892822e-01\n            5.1864528656005859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1932 3.0147889629006386e-03 -1 -2 1933\n            7.6131648384034634e-03</internalNodes>\n          <leafValues>\n            3.8089990615844727e-01 5.7186990976333618e-01\n            4.2625638842582703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1934 1.5197630273178220e-03 -1 -2 1935\n            -1.4197279699146748e-02</internalNodes>\n          <leafValues>\n            5.9427189826965332e-01 7.7311038970947266e-01\n            4.9976539611816406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1936 -1.3818879611790180e-02 -1 -2 1937\n            -5.0701329018920660e-04</internalNodes>\n          <leafValues>\n            6.6811382770538330e-01 3.3056080341339111e-01\n            4.7499749064445496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1938 -9.3537531793117523e-03 -1 -2 1939\n            -9.4771059229969978e-03</internalNodes>\n          <leafValues>\n            2.8609329462051392e-01 6.1888831853866577e-01\n            4.8421001434326172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1940 1.6923650400713086e-03 -1 -2 1941\n            5.8652542065829039e-04</internalNodes>\n          <leafValues>\n            6.0702490806579590e-01 3.7826898694038391e-01\n            5.3681969642639160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1942 -2.5826620403677225e-03 -1 -2 1943\n            -2.7307639829814434e-03</internalNodes>\n          <leafValues>\n            3.6902099847793579e-01 3.8571149110794067e-01\n            5.3181087970733643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1944 2.1871570497751236e-02 -1 -2 1945\n            -1.5010299648565706e-05</internalNodes>\n          <leafValues>\n            2.3270089924335480e-01 5.5607229471206665e-01\n            4.3014100193977356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1946 5.3583700209856033e-03 -1 -2 1947\n            5.0057549960911274e-03</internalNodes>\n          <leafValues>\n            6.7676377296447754e-01 5.1949042081832886e-01\n            3.6128538846969604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1948 -1.9030070398002863e-03 -1 -2 1949\n            -7.8506693243980408e-03</internalNodes>\n          <leafValues>\n            3.2378450036048889e-01 1.1948519945144653e-01\n            4.9917238950729370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1950 -2.7093670796602964e-03 -1 -2 1951\n            1.4138079714030027e-03</internalNodes>\n          <leafValues>\n            4.8549601435661316e-01 4.8723229765892029e-01\n            5.9035778045654297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1952 9.0300198644399643e-03 -1 -2 1953\n            -9.7925681620836258e-04</internalNodes>\n          <leafValues>\n            6.5473157167434692e-01 5.8492732048034668e-01\n            4.5542308688163757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1954 1.3984439428895712e-03 -1 -2 1955\n            8.3372107474133372e-04</internalNodes>\n          <leafValues>\n            4.0646260976791382e-01 5.3995430469512939e-01\n            4.1528099775314331e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1956 1.0551059618592262e-02 -1 -2 1957\n            8.8344102550763637e-05</internalNodes>\n          <leafValues>\n            1.7966809868812561e-01 4.2518630623817444e-01\n            5.4135227203369141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1958 -4.1022308170795441e-02 -1 -2 1959\n            7.5065628625452518e-03</internalNodes>\n          <leafValues>\n            5.2281248569488525e-01 4.8537430167198181e-01\n            6.0934442281723022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1960 4.1022308170795441e-02 -1 -2 1961\n            -5.3961377125233412e-04</internalNodes>\n          <leafValues>\n            2.2050240635871887e-01 5.6927317380905151e-01\n            4.4687569141387939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1962 -6.8696036934852600e-02 -1 -2 1963\n            -1.8447940237820148e-03</internalNodes>\n          <leafValues>\n            1.4833140373229980e-01 6.2112838029861450e-01\n            4.9666011333465576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1964 -6.0959919355809689e-03 -1 -2 1965\n            -4.2068301700055599e-03</internalNodes>\n          <leafValues>\n            2.2946719825267792e-01 6.4070910215377808e-01\n            4.7485628724098206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1966 -7.1332789957523346e-04 -1 -2 1967\n            1.1756779998540878e-01</internalNodes>\n          <leafValues>\n            5.3549361228942871e-01 5.1369780302047729e-01\n            1.0595739819109440e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1968 5.9354289987822995e-05 -1 -2 1969\n            -6.3173691742122173e-03</internalNodes>\n          <leafValues>\n            3.7118038535118103e-01 1.7120739817619324e-01\n            5.0617581605911255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1970 1.4941499568521976e-02 -1 -2 1971\n            -2.0789399277418852e-03</internalNodes>\n          <leafValues>\n            6.7291188240051270e-01 4.4106459617614746e-01\n            5.4440277814865112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1972 -7.0736219640821218e-04 -1 -2 1973\n            -3.1247111037373543e-03</internalNodes>\n          <leafValues>\n            5.5689108371734619e-01 5.0238692760467529e-01\n            3.5624051094055176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1974 -7.8919378574937582e-04 -1 -2 1975\n            1.0179580189287663e-02</internalNodes>\n          <leafValues>\n            5.4567861557006836e-01 5.5451387166976929e-01\n            4.6223109960556030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1976 -2.7506109327077866e-03 -1 -2 1977\n            1.0601329617202282e-02</internalNodes>\n          <leafValues>\n            4.9425360560417175e-01 2.9612338542938232e-01\n            5.9643387794494629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1978 5.1466780714690685e-03 -1 -2 1979\n            7.6321147382259369e-02</internalNodes>\n          <leafValues>\n            5.4952287673950195e-01 5.1739591360092163e-01\n            2.9402169585227966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1980 -1.5027689514681697e-03 -1 -2 1981\n            1.2266670353710651e-02</internalNodes>\n          <leafValues>\n            3.1062999367713928e-01 4.6511501073837280e-01\n            6.8466138839721680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1982 -3.1118579208850861e-02 -1 -2 1983\n            2.8905589133501053e-02</internalNodes>\n          <leafValues>\n            5.2260571718215942e-01 5.1822441816329956e-01\n            2.7054280042648315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1984 4.7598380595445633e-02 -1 -2 1985\n            3.0808549374341965e-02</internalNodes>\n          <leafValues>\n            1.1095120012760162e-01 4.9386250972747803e-01\n            1.4041109383106232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1986 -2.1277810446918011e-04 -1 -2 1987\n            7.8969962894916534e-02</internalNodes>\n          <leafValues>\n            4.3923568725585938e-01 5.2165520191192627e-01\n            2.2941139340400696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1988 -1.0257950052618980e-02 -1 -2 1989\n            1.2604889925569296e-03</internalNodes>\n          <leafValues>\n            6.1766529083251953e-01 5.2362227439880371e-01\n            3.3289659023284912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1990 -3.3490460366010666e-02 -1 -2 1991\n            -5.9202767442911863e-04</internalNodes>\n          <leafValues>\n            4.8661869764328003e-01 4.1164070367813110e-01\n            5.3956401348114014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1992 3.0320750738610514e-05 -1 -2 1993\n            -5.4369680583477020e-04</internalNodes>\n          <leafValues>\n            5.6107360124588013e-01 5.6213891506195068e-01\n            3.4612038731575012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1994 -3.3490460366010666e-02 -1 -2 1995\n            -5.9202767442911863e-04</internalNodes>\n          <leafValues>\n            4.8967620730400085e-01 4.3054041266441345e-01\n            5.3407138586044312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 1996 2.0550889894366264e-03 -1 -2 1997\n            -4.4353571720421314e-03</internalNodes>\n          <leafValues>\n            5.5449998378753662e-01 6.0385400056838989e-01\n            3.7465929985046387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 1998 -8.4170423448085785e-02 -1 -2 1999\n            6.7419027909636497e-03</internalNodes>\n          <leafValues>\n            5.0073480606079102e-01 5.2980971336364746e-01\n            4.7161450982093811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2000 1.0278150439262390e-02 -1 -2 2001\n            5.8800862170755863e-03</internalNodes>\n          <leafValues>\n            6.2693750858306885e-01 5.1548278331756592e-01\n            3.8130408525466919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2002 -6.9679190346505493e-06 -1 -2 2003\n            8.2419527461752295e-04</internalNodes>\n          <leafValues>\n            4.4402399659156799e-01 4.6975341439247131e-01\n            5.4855042695999146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2004 -5.5268318392336369e-03 -1 -2 2005\n            9.6128671430051327e-04</internalNodes>\n          <leafValues>\n            5.5136048793792725e-01 3.6186391115188599e-01\n            5.8384567499160767e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2006 2.4810510221868753e-03 -1 -2 2007\n            -1.0480589699000120e-03</internalNodes>\n          <leafValues>\n            2.5232228636741638e-01 4.1172578930854797e-01\n            5.3929960727691650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2008 -6.1287907883524895e-03 -1 -2 2009\n            1.1682329932227731e-04</internalNodes>\n          <leafValues>\n            6.7263299226760864e-01 5.0411927700042725e-01\n            3.6077290773391724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2010 -3.9909478276968002e-02 -1 -2 2011\n            1.5859459526836872e-03</internalNodes>\n          <leafValues>\n            1.5637390315532684e-01 4.8919808864593506e-01\n            5.7798451185226440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2012 -2.2690229117870331e-02 -1 -2 2013\n            2.0916070789098740e-03</internalNodes>\n          <leafValues>\n            2.1868790686130524e-01 4.7715771198272705e-01\n            6.0992312431335449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2014 -2.4715419858694077e-02 -1 -2 2015\n            -1.3419450260698795e-02</internalNodes>\n          <leafValues>\n            3.4639969468116760e-01 3.6306929588317871e-01\n            5.2521961927413940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2016 -6.0629472136497498e-03 -1 -2 2017\n            -2.0921030081808567e-03</internalNodes>\n          <leafValues>\n            6.6663217544555664e-01 3.3995470404624939e-01\n            5.0356978178024292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2018 2.5961859151721001e-02 -1 -2 2019\n            1.7908669542521238e-04</internalNodes>\n          <leafValues>\n            5.0368028879165649e-01 5.4185307025909424e-01\n            4.3189769983291626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2020 -3.1546850223094225e-03 -1 -2 2021\n            -1.1397759662941098e-03</internalNodes>\n          <leafValues>\n            7.2210252285003662e-01 3.3209729194641113e-01\n            5.0244337320327759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2022 -4.7840211540460587e-02 -1 -2 2023\n            4.1577088995836675e-04</internalNodes>\n          <leafValues>\n            1.9387650489807129e-01 4.8021888732910156e-01\n            5.7307147979736328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2024 -4.4247039477340877e-04 -1 -2 2025\n            1.4479350065812469e-03</internalNodes>\n          <leafValues>\n            4.2625150084495544e-01 5.7191711664199829e-01\n            4.0641531348228455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2026 1.5701510012149811e-02 -1 -2 2027\n            2.7805729769170284e-04</internalNodes>\n          <leafValues>\n            4.9957260489463806e-01 5.2892869710922241e-01\n            4.5817288756370544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2028 -2.9010509606450796e-03 -1 -2 2029\n            2.0830519497394562e-04</internalNodes>\n          <leafValues>\n            6.0121482610702515e-01 5.0579768419265747e-01\n            3.5994321107864380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2030 -5.1530029624700546e-02 -1 -2 2031\n            1.7163449956569821e-04</internalNodes>\n          <leafValues>\n            4.9917969107627869e-01 4.6754699945449829e-01\n            5.3747731447219849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2032 2.3614279925823212e-02 -1 -2 2033\n            -5.6427798699587584e-04</internalNodes>\n          <leafValues>\n            6.5864789485931396e-01 3.8532960414886475e-01\n            5.1960402727127075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2034 6.6903959959745407e-03 -1 -2 2035\n            -4.8789530992507935e-03</internalNodes>\n          <leafValues>\n            6.0042357444763184e-01 3.2932278513908386e-01\n            5.2452367544174194e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2036 -6.8537332117557526e-03 -1 -2 2037\n            9.9893810693174601e-04</internalNodes>\n          <leafValues>\n            2.5659140944480896e-01 4.6154940128326416e-01\n            5.9424322843551636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2038 -1.3354700058698654e-04 -1 -2 2039\n            1.0165109997615218e-03</internalNodes>\n          <leafValues>\n            5.4873758554458618e-01 4.5783591270446777e-01\n            5.4269278049468994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2040 9.1216771397739649e-04 -1 -2 2041\n            1.0080259526148438e-03</internalNodes>\n          <leafValues>\n            3.9394611120223999e-01 4.0497899055480957e-01\n            5.5207037925720215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2042 -1.3102490629535168e-04 -1 -2 2043\n            5.5228749988600612e-04</internalNodes>\n          <leafValues>\n            4.8790889978408813e-01 4.8449438810348511e-01\n            5.5128258466720581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2044 -1.2130969844292849e-04 -1 -2 2045\n            -1.5112989785848185e-05</internalNodes>\n          <leafValues>\n            4.3679711222648621e-01 6.4259552955627441e-01\n            4.8818269371986389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2046 -4.0125829400494695e-04 -1 -2 2047\n            -6.5766851184889674e-04</internalNodes>\n          <leafValues>\n            5.3720992803573608e-01 5.8345532417297363e-01\n            4.8690780997276306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2048 6.2220421386882663e-04 -1 -2 2049\n            1.4663359615951777e-03</internalNodes>\n          <leafValues>\n            3.8246369361877441e-01 4.8134881258010864e-01\n            6.9667392969131470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2050 -4.9547709524631500e-02 -1 -2 2051\n            1.3017569435760379e-03</internalNodes>\n          <leafValues>\n            5.3927659988403320e-02 5.3374558687210083e-01\n            4.1607481241226196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2052 -4.4914530590176582e-03 -1 -2 2053\n            1.6592369647696614e-03</internalNodes>\n          <leafValues>\n            5.9974372386932373e-01 3.7271851301193237e-01\n            5.1156342029571533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2054 6.4695458859205246e-03 -1 -2 2055\n            4.9810269847512245e-03</internalNodes>\n          <leafValues>\n            5.2520352602005005e-01 5.2567178010940552e-01\n            3.9344060420989990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2056 -3.8536980748176575e-02 -1 -2 2057\n            -2.8275650739669800e-01</internalNodes>\n          <leafValues>\n            2.0619249343872070e-01 6.1883211135864258e-02\n            4.9250578880310059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2058 -9.0301828458905220e-03 -1 -2 2059\n            -4.3866269290447235e-02</internalNodes>\n          <leafValues>\n            3.1575900316238403e-01 2.0336820185184479e-01\n            5.1647698879241943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2060 -4.5701069757342339e-03 -1 -2 2061\n            -2.3362410720437765e-03</internalNodes>\n          <leafValues>\n            6.6111832857131958e-01 2.8077891469001770e-01\n            4.9628761410713196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2062 5.3960331715643406e-03 -1 -2 2063\n            -2.6297608856111765e-03</internalNodes>\n          <leafValues>\n            5.1463878154754639e-01 6.2844878435134888e-01\n            4.9555888772010803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2064 -3.8577478844672441e-03 -1 -2 2065\n            1.3963800156489015e-03</internalNodes>\n          <leafValues>\n            1.4867480099201202e-01 4.7013381123542786e-01\n            6.3209718465805054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2066 -8.8699469342827797e-03 -1 -2 2067\n            -7.0626288652420044e-04</internalNodes>\n          <leafValues>\n            5.2868181467056274e-01 4.6483701467514038e-01\n            5.3332102298736572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2068 4.2645810171961784e-03 -1 -2 2069\n            6.1572100967168808e-02</internalNodes>\n          <leafValues>\n            5.0848782062530518e-01 3.6296251416206360e-01\n            8.7571567296981812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2070 -4.5381980016827583e-03 -1 -2 2071\n            -4.0877899155020714e-03</internalNodes>\n          <leafValues>\n            4.8566961288452148e-01 4.5841160416603088e-01\n            5.4202407598495483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2072 6.4308601431548595e-03 -1 -2 2073\n            7.0455260574817657e-03</internalNodes>\n          <leafValues>\n            2.7073028683662415e-01 5.0574868917465210e-01\n            7.0265239477157593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2074 -2.3246440105140209e-03 -1 -2 2075\n            6.0276601288933307e-05</internalNodes>\n          <leafValues>\n            4.8272788524627686e-01 4.2472490668296814e-01\n            5.5087631940841675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2076 1.8084559589624405e-02 -1 -2 2077\n            8.4693520329892635e-04</internalNodes>\n          <leafValues>\n            8.1048011779785156e-01 5.1546192169189453e-01\n            3.5143798589706421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2078 -2.6931039988994598e-02 -1 -2 2079\n            -4.2346641421318054e-03</internalNodes>\n          <leafValues>\n            4.8868888616561890e-01 4.6223780512809753e-01\n            5.3824782371520996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2080 2.6947110891342163e-02 -1 -2 2081\n            4.6446882188320160e-03</internalNodes>\n          <leafValues>\n            6.3665962219238281e-01 5.3685069084167480e-01\n            3.7654298543930054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2082 -6.9577661342918873e-03 -1 -2 2083\n            8.7609712500125170e-04</internalNodes>\n          <leafValues>\n            4.2346870899200439e-01 4.6724060177803040e-01\n            5.3506839275360107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2084 1.6103329835459590e-03 -1 -2 2085\n            -1.2848590267822146e-03</internalNodes>\n          <leafValues>\n            5.7327628135681152e-01 5.4817992448806763e-01\n            3.7845930457115173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2086 1.0243539698421955e-02 -1 -2 2087\n            2.6889349101111293e-04</internalNodes>\n          <leafValues>\n            5.1559072732925415e-01 5.3531897068023682e-01\n            4.3871539831161499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2088 3.7903659977018833e-03 -1 -2 2089\n            -2.9369680210947990e-02</internalNodes>\n          <leafValues>\n            5.0320029258728027e-01 5.8735388517379761e-01\n            2.2154450416564941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 2090 6.0743088833987713e-03 -1 -2 2091\n            -1.2710720300674438e-02</internalNodes>\n          <leafValues>\n            5.4170298576354980e-01 6.0565119981765747e-01\n            4.9851819872856140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2092 -5.9445449151098728e-03 -1 -2 2093\n            -2.8927479870617390e-03</internalNodes>\n          <leafValues>\n            3.3520698547363281e-01 6.9292408227920532e-01\n            4.7782200574874878e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          2 7 16 4 -1.</_>\n        <_>\n          2 9 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 14 -1.</_>\n        <_>\n          8 11 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 1 6 -1.</_>\n        <_>\n          13 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 8 -1.</_>\n        <_>\n          8 2 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 1 9 -1.</_>\n        <_>\n          6 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 9 -1.</_>\n        <_>\n          3 10 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 4 -1.</_>\n        <_>\n          4 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 16 -1.</_>\n        <_>\n          9 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 5 -1.</_>\n        <_>\n          7 1 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 13 8 -1.</_>\n        <_>\n          4 9 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 16 9 -1.</_>\n        <_>\n          1 10 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 4 -1.</_>\n        <_>\n          2 2 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 4 -1.</_>\n        <_>\n          9 5 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 9 -1.</_>\n        <_>\n          6 6 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 8 -1.</_>\n        <_>\n          8 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 2 -1.</_>\n        <_>\n          3 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 12 -1.</_>\n        <_>\n          14 1 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 6 -1.</_>\n        <_>\n          8 4 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 15 -1.</_>\n        <_>\n          3 2 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 6 -1.</_>\n        <_>\n          5 6 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 3 -1.</_>\n        <_>\n          13 12 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 4 -1.</_>\n        <_>\n          12 14 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 3 -1.</_>\n        <_>\n          1 12 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 5 8 -1.</_>\n        <_>\n          2 9 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 4 -1.</_>\n        <_>\n          5 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 16 12 -1.</_>\n        <_>\n          2 8 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          8 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 9 -1.</_>\n        <_>\n          13 10 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 9 -1.</_>\n        <_>\n          5 10 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 8 -1.</_>\n        <_>\n          9 1 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 12 -1.</_>\n        <_>\n          14 0 2 6 2.</_>\n        <_>\n          12 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 10 2 -1.</_>\n        <_>\n          5 9 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 4 -1.</_>\n        <_>\n          7 1 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 9 12 -1.</_>\n        <_>\n          3 3 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 12 -1.</_>\n        <_>\n          9 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 15 -1.</_>\n        <_>\n          0 10 20 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 8 -1.</_>\n        <_>\n          2 2 3 4 2.</_>\n        <_>\n          5 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 2 -1.</_>\n        <_>\n          2 2 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 4 -1.</_>\n        <_>\n          13 15 3 2 2.</_>\n        <_>\n          10 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 2 6 -1.</_>\n        <_>\n          12 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 4 4 -1.</_>\n        <_>\n          5 15 2 2 2.</_>\n        <_>\n          7 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 1 2 -1.</_>\n        <_>\n          7 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 10 -1.</_>\n        <_>\n          10 5 6 5 2.</_>\n        <_>\n          4 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 8 12 -1.</_>\n        <_>\n          11 4 4 6 2.</_>\n        <_>\n          7 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 12 -1.</_>\n        <_>\n          3 3 6 6 2.</_>\n        <_>\n          9 9 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 5 3 -1.</_>\n        <_>\n          15 12 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 3 2 -1.</_>\n        <_>\n          11 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 5 3 -1.</_>\n        <_>\n          0 12 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 3 2 -1.</_>\n        <_>\n          8 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 16 2 -1.</_>\n        <_>\n          2 9 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 5 12 -1.</_>\n        <_>\n          9 12 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 6 -1.</_>\n        <_>\n          6 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 8 -1.</_>\n        <_>\n          10 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 10 -1.</_>\n        <_>\n          12 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 9 -1.</_>\n        <_>\n          4 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 4 -1.</_>\n        <_>\n          9 4 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 8 3 -1.</_>\n        <_>\n          12 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 6 -1.</_>\n        <_>\n          15 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 10 8 -1.</_>\n        <_>\n          2 12 5 4 2.</_>\n        <_>\n          7 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 8 -1.</_>\n        <_>\n          5 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 8 3 -1.</_>\n        <_>\n          12 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 6 -1.</_>\n        <_>\n          15 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 8 3 -1.</_>\n        <_>\n          4 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 4 -1.</_>\n        <_>\n          2 3 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 2 -1.</_>\n        <_>\n          11 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 3 1 -1.</_>\n        <_>\n          11 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 3 4 -1.</_>\n        <_>\n          7 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 3 6 -1.</_>\n        <_>\n          4 15 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 1 14 -1.</_>\n        <_>\n          10 12 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 6 -1.</_>\n        <_>\n          5 6 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 3 -1.</_>\n        <_>\n          7 0 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 5 -1.</_>\n        <_>\n          7 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 5 -1.</_>\n        <_>\n          9 15 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 6 -1.</_>\n        <_>\n          9 12 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 2 -1.</_>\n        <_>\n          9 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 7 6 -1.</_>\n        <_>\n          1 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 7 -1.</_>\n        <_>\n          10 6 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 9 -1.</_>\n        <_>\n          16 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 7 -1.</_>\n        <_>\n          9 6 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 8 -1.</_>\n        <_>\n          0 5 9 4 2.</_>\n        <_>\n          9 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 10 -1.</_>\n        <_>\n          13 10 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 2 6 -1.</_>\n        <_>\n          12 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 5 -1.</_>\n        <_>\n          8 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 6 -1.</_>\n        <_>\n          6 7 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 14 -1.</_>\n        <_>\n          13 3 3 7 2.</_>\n        <_>\n          10 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 1 8 -1.</_>\n        <_>\n          13 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 14 -1.</_>\n        <_>\n          4 3 3 7 2.</_>\n        <_>\n          7 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 1 8 -1.</_>\n        <_>\n          6 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 1 6 -1.</_>\n        <_>\n          8 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 2 -1.</_>\n        <_>\n          2 1 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 6 -1.</_>\n        <_>\n          0 9 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 8 -1.</_>\n        <_>\n          10 14 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 3 2 -1.</_>\n        <_>\n          8 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 2 2 -1.</_>\n        <_>\n          9 1 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 9 -1.</_>\n        <_>\n          4 6 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 5 -1.</_>\n        <_>\n          9 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 9 5 -1.</_>\n        <_>\n          8 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 12 -1.</_>\n        <_>\n          4 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 18 -1.</_>\n        <_>\n          13 0 3 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 1 12 -1.</_>\n        <_>\n          10 12 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 4 6 -1.</_>\n        <_>\n          3 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 2 -1.</_>\n        <_>\n          10 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 3 2 -1.</_>\n        <_>\n          11 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 2 6 -1.</_>\n        <_>\n          2 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 6 -1.</_>\n        <_>\n          7 7 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 19 6 1 -1.</_>\n        <_>\n          9 19 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 3 2 -1.</_>\n        <_>\n          11 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 1 -1.</_>\n        <_>\n          9 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 2 -1.</_>\n        <_>\n          2 2 8 1 2.</_>\n        <_>\n          10 3 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 5 3 -1.</_>\n        <_>\n          8 12 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 15 -1.</_>\n        <_>\n          2 1 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 2 3 -1.</_>\n        <_>\n          2 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 1 3 -1.</_>\n        <_>\n          16 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 3 6 -1.</_>\n        <_>\n          7 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 1 14 -1.</_>\n        <_>\n          7 12 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 3 -1.</_>\n        <_>\n          15 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 3 14 -1.</_>\n        <_>\n          10 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 6 -1.</_>\n        <_>\n          6 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 1 8 -1.</_>\n        <_>\n          6 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 1 -1.</_>\n        <_>\n          13 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 10 -1.</_>\n        <_>\n          15 1 3 5 2.</_>\n        <_>\n          12 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 3 -1.</_>\n        <_>\n          3 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 2 1 -1.</_>\n        <_>\n          10 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 17 9 -1.</_>\n        <_>\n          1 3 17 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 8 -1.</_>\n        <_>\n          1 2 4 4 2.</_>\n        <_>\n          5 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 4 -1.</_>\n        <_>\n          9 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 7 10 -1.</_>\n        <_>\n          10 14 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 4 -1.</_>\n        <_>\n          8 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 6 -1.</_>\n        <_>\n          0 9 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 10 -1.</_>\n        <_>\n          6 10 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 12 -1.</_>\n        <_>\n          8 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 7 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 10 6 -1.</_>\n        <_>\n          3 13 5 3 2.</_>\n        <_>\n          8 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 4 11 -1.</_>\n        <_>\n          15 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 10 -1.</_>\n        <_>\n          10 7 5 5 2.</_>\n        <_>\n          5 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 4 11 -1.</_>\n        <_>\n          3 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 8 12 -1.</_>\n        <_>\n          1 11 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 7 4 -1.</_>\n        <_>\n          11 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 12 -1.</_>\n        <_>\n          0 4 10 6 2.</_>\n        <_>\n          10 10 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 15 -1.</_>\n        <_>\n          1 10 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 8 -1.</_>\n        <_>\n          11 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 7 6 -1.</_>\n        <_>\n          11 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 4 -1.</_>\n        <_>\n          10 14 7 2 2.</_>\n        <_>\n          3 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 4 -1.</_>\n        <_>\n          18 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 6 -1.</_>\n        <_>\n          3 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 6 -1.</_>\n        <_>\n          0 6 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 3 3 -1.</_>\n        <_>\n          9 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 10 4 -1.</_>\n        <_>\n          15 7 5 2 2.</_>\n        <_>\n          10 9 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 8 -1.</_>\n        <_>\n          7 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 2 -1.</_>\n        <_>\n          8 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 3 5 -1.</_>\n        <_>\n          11 6 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 19 -1.</_>\n        <_>\n          11 0 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 1 2 -1.</_>\n        <_>\n          3 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 5 3 -1.</_>\n        <_>\n          7 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 4 -1.</_>\n        <_>\n          11 1 9 2 2.</_>\n        <_>\n          2 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 3 8 -1.</_>\n        <_>\n          11 5 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 4 -1.</_>\n        <_>\n          0 1 9 2 2.</_>\n        <_>\n          9 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 8 -1.</_>\n        <_>\n          8 5 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          9 7 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 5 2 -1.</_>\n        <_>\n          10 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 15 1 -1.</_>\n        <_>\n          7 10 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 2 6 -1.</_>\n        <_>\n          2 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 3 3 -1.</_>\n        <_>\n          9 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 10 -1.</_>\n        <_>\n          9 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 2 -1.</_>\n        <_>\n          0 8 4 1 2.</_>\n        <_>\n          4 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 8 -1.</_>\n        <_>\n          5 9 5 4 2.</_>\n        <_>\n          10 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 4 -1.</_>\n        <_>\n          9 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 4 -1.</_>\n        <_>\n          10 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 2 1 -1.</_>\n        <_>\n          9 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 4 -1.</_>\n        <_>\n          9 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 14 -1.</_>\n        <_>\n          14 0 2 7 2.</_>\n        <_>\n          12 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 9 -1.</_>\n        <_>\n          12 5 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 16 -1.</_>\n        <_>\n          3 2 3 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 4 2 -1.</_>\n        <_>\n          1 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 1 -1.</_>\n        <_>\n          9 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 9 -1.</_>\n        <_>\n          8 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 6 -1.</_>\n        <_>\n          12 13 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 16 -1.</_>\n        <_>\n          12 1 4 8 2.</_>\n        <_>\n          8 9 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 6 -1.</_>\n        <_>\n          4 9 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 2 -1.</_>\n        <_>\n          4 3 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 12 -1.</_>\n        <_>\n          9 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 7 10 -1.</_>\n        <_>\n          10 14 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 7 10 -1.</_>\n        <_>\n          3 14 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 1 14 -1.</_>\n        <_>\n          7 12 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 1 6 -1.</_>\n        <_>\n          13 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 3 6 -1.</_>\n        <_>\n          14 14 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 1 6 -1.</_>\n        <_>\n          6 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 6 -1.</_>\n        <_>\n          3 14 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 5 3 -1.</_>\n        <_>\n          8 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 8 -1.</_>\n        <_>\n          5 1 5 4 2.</_>\n        <_>\n          10 5 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 5 4 -1.</_>\n        <_>\n          6 6 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 1 -1.</_>\n        <_>\n          7 10 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 3 -1.</_>\n        <_>\n          11 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 3 -1.</_>\n        <_>\n          3 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 3 4 -1.</_>\n        <_>\n          12 14 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 5 6 -1.</_>\n        <_>\n          11 12 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 16 2 -1.</_>\n        <_>\n          0 9 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 3 4 -1.</_>\n        <_>\n          2 3 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 6 -1.</_>\n        <_>\n          9 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 6 -1.</_>\n        <_>\n          7 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 5 -1.</_>\n        <_>\n          12 5 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 2 -1.</_>\n        <_>\n          5 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 5 -1.</_>\n        <_>\n          6 5 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 10 -1.</_>\n        <_>\n          9 8 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 16 2 -1.</_>\n        <_>\n          11 1 8 1 2.</_>\n        <_>\n          3 2 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 2 -1.</_>\n        <_>\n          9 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 2 -1.</_>\n        <_>\n          1 1 8 1 2.</_>\n        <_>\n          9 2 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 1 3 -1.</_>\n        <_>\n          8 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 10 -1.</_>\n        <_>\n          10 5 6 5 2.</_>\n        <_>\n          4 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 6 -1.</_>\n        <_>\n          10 13 3 3 2.</_>\n        <_>\n          7 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 2 -1.</_>\n        <_>\n          8 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 4 -1.</_>\n        <_>\n          9 2 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 3 -1.</_>\n        <_>\n          6 7 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 1 -1.</_>\n        <_>\n          12 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 6 -1.</_>\n        <_>\n          6 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 6 -1.</_>\n        <_>\n          6 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 6 -1.</_>\n        <_>\n          11 15 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 12 -1.</_>\n        <_>\n          10 4 6 6 2.</_>\n        <_>\n          4 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 3 6 -1.</_>\n        <_>\n          2 2 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 3 7 -1.</_>\n        <_>\n          2 5 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 12 4 -1.</_>\n        <_>\n          10 13 6 2 2.</_>\n        <_>\n          4 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 17 12 -1.</_>\n        <_>\n          3 9 17 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 12 -1.</_>\n        <_>\n          3 3 7 6 2.</_>\n        <_>\n          10 9 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 9 -1.</_>\n        <_>\n          2 14 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 3 6 -1.</_>\n        <_>\n          9 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 6 -1.</_>\n        <_>\n          10 14 2 3 2.</_>\n        <_>\n          8 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 1 -1.</_>\n        <_>\n          8 2 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 5 -1.</_>\n        <_>\n          10 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 5 -1.</_>\n        <_>\n          10 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 1 -1.</_>\n        <_>\n          9 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 5 -1.</_>\n        <_>\n          9 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 3 -1.</_>\n        <_>\n          8 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 6 -1.</_>\n        <_>\n          0 6 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 8 6 -1.</_>\n        <_>\n          1 3 4 3 2.</_>\n        <_>\n          5 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 4 -1.</_>\n        <_>\n          7 17 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 14 10 -1.</_>\n        <_>\n          3 15 14 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 4 -1.</_>\n        <_>\n          8 4 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 10 -1.</_>\n        <_>\n          0 9 20 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 14 -1.</_>\n        <_>\n          9 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 4 -1.</_>\n        <_>\n          2 2 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 6 8 -1.</_>\n        <_>\n          4 12 3 4 2.</_>\n        <_>\n          7 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 7 -1.</_>\n        <_>\n          3 5 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 10 4 -1.</_>\n        <_>\n          15 7 5 2 2.</_>\n        <_>\n          10 9 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 1 -1.</_>\n        <_>\n          9 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 4 -1.</_>\n        <_>\n          9 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 6 -1.</_>\n        <_>\n          10 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 6 4 -1.</_>\n        <_>\n          15 7 3 2 2.</_>\n        <_>\n          12 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 6 -1.</_>\n        <_>\n          9 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 6 -1.</_>\n        <_>\n          1 6 9 3 2.</_>\n        <_>\n          10 9 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 3 -1.</_>\n        <_>\n          10 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 5 2 -1.</_>\n        <_>\n          10 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 3 -1.</_>\n        <_>\n          9 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 5 2 -1.</_>\n        <_>\n          5 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 8 -1.</_>\n        <_>\n          12 6 4 4 2.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 2 -1.</_>\n        <_>\n          5 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 10 -1.</_>\n        <_>\n          4 5 6 5 2.</_>\n        <_>\n          10 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          5 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          7 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 3 3 -1.</_>\n        <_>\n          9 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 3 3 -1.</_>\n        <_>\n          8 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 8 9 -1.</_>\n        <_>\n          1 13 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 3 -1.</_>\n        <_>\n          13 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 3 -1.</_>\n        <_>\n          6 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 12 -1.</_>\n        <_>\n          5 10 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 18 4 -1.</_>\n        <_>\n          10 11 9 2 2.</_>\n        <_>\n          1 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 2 -1.</_>\n        <_>\n          7 13 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 6 -1.</_>\n        <_>\n          7 0 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 18 4 -1.</_>\n        <_>\n          0 11 9 2 2.</_>\n        <_>\n          9 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 2 -1.</_>\n        <_>\n          7 13 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          9 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 3 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 4 2 -1.</_>\n        <_>\n          13 4 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 2 -1.</_>\n        <_>\n          4 1 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          6 9 4 4 2.</_>\n        <_>\n          10 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 2 -1.</_>\n        <_>\n          1 12 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 8 -1.</_>\n        <_>\n          11 5 9 4 2.</_>\n        <_>\n          2 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 10 -1.</_>\n        <_>\n          7 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 6 -1.</_>\n        <_>\n          0 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 3 -1.</_>\n        <_>\n          4 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 1 6 -1.</_>\n        <_>\n          19 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 2 -1.</_>\n        <_>\n          6 16 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 6 -1.</_>\n        <_>\n          0 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 3 -1.</_>\n        <_>\n          5 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 3 -1.</_>\n        <_>\n          12 6 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 2 6 -1.</_>\n        <_>\n          8 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 8 -1.</_>\n        <_>\n          9 15 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 3 -1.</_>\n        <_>\n          12 6 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 15 5 -1.</_>\n        <_>\n          10 15 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 2 2 -1.</_>\n        <_>\n          2 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 2 -1.</_>\n        <_>\n          6 7 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 1 -1.</_>\n        <_>\n          10 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 12 -1.</_>\n        <_>\n          7 0 6 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          4 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 15 5 -1.</_>\n        <_>\n          5 15 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 1 -1.</_>\n        <_>\n          10 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 3 6 -1.</_>\n        <_>\n          11 14 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 1 -1.</_>\n        <_>\n          8 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 6 -1.</_>\n        <_>\n          6 14 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 4 -1.</_>\n        <_>\n          10 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 7 -1.</_>\n        <_>\n          12 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 4 -1.</_>\n        <_>\n          9 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 7 -1.</_>\n        <_>\n          6 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 12 -1.</_>\n        <_>\n          10 3 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 4 -1.</_>\n        <_>\n          11 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 14 -1.</_>\n        <_>\n          7 0 6 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 11 -1.</_>\n        <_>\n          5 8 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 15 4 -1.</_>\n        <_>\n          1 6 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 8 -1.</_>\n        <_>\n          5 9 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 8 -1.</_>\n        <_>\n          14 2 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 14 -1.</_>\n        <_>\n          14 6 3 7 2.</_>\n        <_>\n          11 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 12 -1.</_>\n        <_>\n          9 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 4 6 -1.</_>\n        <_>\n          3 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 6 -1.</_>\n        <_>\n          14 3 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 4 -1.</_>\n        <_>\n          15 4 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 7 -1.</_>\n        <_>\n          3 2 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 14 -1.</_>\n        <_>\n          3 6 3 7 2.</_>\n        <_>\n          6 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 8 -1.</_>\n        <_>\n          4 10 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 8 -1.</_>\n        <_>\n          10 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 20 -1.</_>\n        <_>\n          9 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 16 12 -1.</_>\n        <_>\n          1 7 8 6 2.</_>\n        <_>\n          9 13 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 3 -1.</_>\n        <_>\n          9 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 5 -1.</_>\n        <_>\n          11 9 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 1 2 -1.</_>\n        <_>\n          3 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 5 3 -1.</_>\n        <_>\n          7 18 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          10 12 2 4 2.</_>\n        <_>\n          8 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 10 12 -1.</_>\n        <_>\n          12 4 5 6 2.</_>\n        <_>\n          7 10 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 5 -1.</_>\n        <_>\n          7 9 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 8 2 -1.</_>\n        <_>\n          9 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 5 2 -1.</_>\n        <_>\n          14 16 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 8 4 -1.</_>\n        <_>\n          1 7 4 2 2.</_>\n        <_>\n          5 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 1 2 -1.</_>\n        <_>\n          19 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 4 -1.</_>\n        <_>\n          3 14 7 2 2.</_>\n        <_>\n          10 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 2 -1.</_>\n        <_>\n          5 1 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 6 -1.</_>\n        <_>\n          11 16 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          7 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 6 -1.</_>\n        <_>\n          7 13 3 3 2.</_>\n        <_>\n          10 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 6 -1.</_>\n        <_>\n          0 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 2 -1.</_>\n        <_>\n          6 8 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 1 -1.</_>\n        <_>\n          9 7 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 10 -1.</_>\n        <_>\n          7 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 2 -1.</_>\n        <_>\n          0 3 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 2 4 -1.</_>\n        <_>\n          11 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 6 -1.</_>\n        <_>\n          11 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 8 2 -1.</_>\n        <_>\n          7 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 6 -1.</_>\n        <_>\n          2 0 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 2 -1.</_>\n        <_>\n          9 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 2 3 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 1 2 -1.</_>\n        <_>\n          3 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 11 3 -1.</_>\n        <_>\n          4 6 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 2 4 -1.</_>\n        <_>\n          11 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 3 -1.</_>\n        <_>\n          10 3 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 4 -1.</_>\n        <_>\n          8 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 3 -1.</_>\n        <_>\n          8 3 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 3 -1.</_>\n        <_>\n          11 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 2 8 -1.</_>\n        <_>\n          11 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 5 -1.</_>\n        <_>\n          10 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 1 6 -1.</_>\n        <_>\n          14 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 2 -1.</_>\n        <_>\n          0 4 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 5 6 -1.</_>\n        <_>\n          4 16 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 3 -1.</_>\n        <_>\n          11 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 3 -1.</_>\n        <_>\n          5 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 4 2 -1.</_>\n        <_>\n          7 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 3 -1.</_>\n        <_>\n          9 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 6 -1.</_>\n        <_>\n          1 8 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 8 15 -1.</_>\n        <_>\n          2 9 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 2 -1.</_>\n        <_>\n          9 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          9 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 5 -1.</_>\n        <_>\n          8 6 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 2 -1.</_>\n        <_>\n          7 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 10 -1.</_>\n        <_>\n          10 1 4 5 2.</_>\n        <_>\n          6 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 10 -1.</_>\n        <_>\n          10 0 10 5 2.</_>\n        <_>\n          0 5 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 1 -1.</_>\n        <_>\n          7 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 8 -1.</_>\n        <_>\n          2 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 4 -1.</_>\n        <_>\n          11 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 8 -1.</_>\n        <_>\n          12 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 4 -1.</_>\n        <_>\n          6 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 8 -1.</_>\n        <_>\n          5 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 18 6 -1.</_>\n        <_>\n          11 6 9 3 2.</_>\n        <_>\n          2 9 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 7 3 -1.</_>\n        <_>\n          7 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 12 -1.</_>\n        <_>\n          1 0 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 16 -1.</_>\n        <_>\n          1 10 18 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 5 3 -1.</_>\n        <_>\n          9 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 6 -1.</_>\n        <_>\n          0 6 9 3 2.</_>\n        <_>\n          9 9 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 1 3 -1.</_>\n        <_>\n          17 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 9 -1.</_>\n        <_>\n          12 14 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 1 3 -1.</_>\n        <_>\n          2 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 3 -1.</_>\n        <_>\n          5 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 3 -1.</_>\n        <_>\n          7 2 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 6 -1.</_>\n        <_>\n          0 3 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 3 -1.</_>\n        <_>\n          9 5 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 4 10 -1.</_>\n        <_>\n          3 1 2 5 2.</_>\n        <_>\n          5 6 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 19 10 -1.</_>\n        <_>\n          0 9 19 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 12 -1.</_>\n        <_>\n          9 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 5 2 -1.</_>\n        <_>\n          11 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 6 4 -1.</_>\n        <_>\n          5 16 3 2 2.</_>\n        <_>\n          8 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 3 2 -1.</_>\n        <_>\n          5 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 2 -1.</_>\n        <_>\n          13 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 4 -1.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 6 -1.</_>\n        <_>\n          1 2 9 3 2.</_>\n        <_>\n          10 5 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 14 6 -1.</_>\n        <_>\n          3 7 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 6 -1.</_>\n        <_>\n          18 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 1 -1.</_>\n        <_>\n          11 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 11 -1.</_>\n        <_>\n          3 2 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 3 -1.</_>\n        <_>\n          4 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 9 2 -1.</_>\n        <_>\n          9 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 15 -1.</_>\n        <_>\n          9 4 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 15 -1.</_>\n        <_>\n          8 4 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 7 -1.</_>\n        <_>\n          14 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 9 -1.</_>\n        <_>\n          18 6 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 1 -1.</_>\n        <_>\n          9 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 7 -1.</_>\n        <_>\n          3 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          16 7 3 2 2.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 2 -1.</_>\n        <_>\n          8 1 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 4 -1.</_>\n        <_>\n          1 7 3 2 2.</_>\n        <_>\n          4 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 3 3 -1.</_>\n        <_>\n          1 3 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 4 3 -1.</_>\n        <_>\n          9 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 7 2 -1.</_>\n        <_>\n          12 14 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 9 2 -1.</_>\n        <_>\n          8 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 8 -1.</_>\n        <_>\n          6 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 5 2 -1.</_>\n        <_>\n          12 1 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 1 12 -1.</_>\n        <_>\n          7 13 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 4 -1.</_>\n        <_>\n          7 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 6 -1.</_>\n        <_>\n          0 15 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 2 -1.</_>\n        <_>\n          14 5 6 1 2.</_>\n        <_>\n          8 6 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 2 3 -1.</_>\n        <_>\n          8 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 7 6 -1.</_>\n        <_>\n          12 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          10 0 4 6 2.</_>\n        <_>\n          6 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 4 -1.</_>\n        <_>\n          0 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 5 -1.</_>\n        <_>\n          10 0 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          9 5 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 6 -1.</_>\n        <_>\n          17 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 2 3 -1.</_>\n        <_>\n          3 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 3 3 -1.</_>\n        <_>\n          7 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 5 3 -1.</_>\n        <_>\n          14 13 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 14 3 -1.</_>\n        <_>\n          4 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 5 3 -1.</_>\n        <_>\n          1 13 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 2 -1.</_>\n        <_>\n          1 15 6 1 2.</_>\n        <_>\n          7 16 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 4 2 -1.</_>\n        <_>\n          12 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 5 -1.</_>\n        <_>\n          10 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 6 -1.</_>\n        <_>\n          10 5 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 6 -1.</_>\n        <_>\n          0 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 4 2 -1.</_>\n        <_>\n          12 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 5 -1.</_>\n        <_>\n          10 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 4 2 -1.</_>\n        <_>\n          4 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 5 -1.</_>\n        <_>\n          9 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 3 1 -1.</_>\n        <_>\n          10 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 8 -1.</_>\n        <_>\n          17 5 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 1 -1.</_>\n        <_>\n          9 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 3 8 -1.</_>\n        <_>\n          2 5 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 3 -1.</_>\n        <_>\n          11 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 2 4 -1.</_>\n        <_>\n          17 5 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 14 3 -1.</_>\n        <_>\n          2 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 1 3 -1.</_>\n        <_>\n          9 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 10 -1.</_>\n        <_>\n          6 6 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 8 -1.</_>\n        <_>\n          16 0 3 4 2.</_>\n        <_>\n          13 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 2 4 -1.</_>\n        <_>\n          2 5 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 2 -1.</_>\n        <_>\n          4 3 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 4 -1.</_>\n        <_>\n          8 10 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 4 -1.</_>\n        <_>\n          9 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 1 -1.</_>\n        <_>\n          5 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 10 -1.</_>\n        <_>\n          3 1 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 2 -1.</_>\n        <_>\n          8 6 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 6 -1.</_>\n        <_>\n          12 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 8 2 -1.</_>\n        <_>\n          8 6 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 6 -1.</_>\n        <_>\n          6 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 16 4 -1.</_>\n        <_>\n          3 16 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 3 -1.</_>\n        <_>\n          8 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 1 -1.</_>\n        <_>\n          8 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 3 -1.</_>\n        <_>\n          18 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 6 -1.</_>\n        <_>\n          16 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 2 1 -1.</_>\n        <_>\n          9 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 3 9 -1.</_>\n        <_>\n          8 1 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 11 6 -1.</_>\n        <_>\n          5 14 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 3 14 -1.</_>\n        <_>\n          12 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 5 -1.</_>\n        <_>\n          7 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 3 -1.</_>\n        <_>\n          4 2 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 10 -1.</_>\n        <_>\n          5 5 3 5 2.</_>\n        <_>\n          8 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 2 2 -1.</_>\n        <_>\n          16 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 2 5 -1.</_>\n        <_>\n          9 4 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 1 4 -1.</_>\n        <_>\n          8 6 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 12 4 -1.</_>\n        <_>\n          13 15 6 2 2.</_>\n        <_>\n          7 17 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 6 2 -1.</_>\n        <_>\n          11 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 10 -1.</_>\n        <_>\n          7 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 8 -1.</_>\n        <_>\n          5 10 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 12 -1.</_>\n        <_>\n          14 1 3 6 2.</_>\n        <_>\n          11 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 1 -1.</_>\n        <_>\n          9 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 6 -1.</_>\n        <_>\n          4 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 4 -1.</_>\n        <_>\n          4 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 2 2 -1.</_>\n        <_>\n          14 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 2 2 -1.</_>\n        <_>\n          15 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 2 -1.</_>\n        <_>\n          7 13 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 2 -1.</_>\n        <_>\n          8 14 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 12 -1.</_>\n        <_>\n          14 1 3 6 2.</_>\n        <_>\n          11 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 2 -1.</_>\n        <_>\n          12 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 12 6 -1.</_>\n        <_>\n          3 10 6 3 2.</_>\n        <_>\n          9 13 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 12 -1.</_>\n        <_>\n          3 1 3 6 2.</_>\n        <_>\n          6 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 14 -1.</_>\n        <_>\n          18 6 2 7 2.</_>\n        <_>\n          16 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 8 -1.</_>\n        <_>\n          10 1 5 4 2.</_>\n        <_>\n          5 5 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 14 -1.</_>\n        <_>\n          0 6 2 7 2.</_>\n        <_>\n          2 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 4 -1.</_>\n        <_>\n          1 15 6 2 2.</_>\n        <_>\n          7 17 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 3 3 -1.</_>\n        <_>\n          11 17 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 6 -1.</_>\n        <_>\n          12 2 1 3 2.</_>\n        <_>\n          11 5 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 3 3 -1.</_>\n        <_>\n          8 17 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 4 2 -1.</_>\n        <_>\n          12 15 2 1 2.</_>\n        <_>\n          10 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 4 3 -1.</_>\n        <_>\n          13 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 3 -1.</_>\n        <_>\n          3 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 6 -1.</_>\n        <_>\n          7 2 1 3 2.</_>\n        <_>\n          8 5 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 3 -1.</_>\n        <_>\n          2 2 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 4 2 -1.</_>\n        <_>\n          12 15 2 1 2.</_>\n        <_>\n          10 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 4 2 -1.</_>\n        <_>\n          6 15 2 1 2.</_>\n        <_>\n          8 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 3 -1.</_>\n        <_>\n          3 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 3 -1.</_>\n        <_>\n          0 10 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 2 -1.</_>\n        <_>\n          6 8 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 3 6 -1.</_>\n        <_>\n          9 14 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 2 -1.</_>\n        <_>\n          9 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 5 -1.</_>\n        <_>\n          9 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 5 -1.</_>\n        <_>\n          10 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          10 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 2 -1.</_>\n        <_>\n          13 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 11 -1.</_>\n        <_>\n          8 3 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 2 7 -1.</_>\n        <_>\n          8 1 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 8 -1.</_>\n        <_>\n          8 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 2 -1.</_>\n        <_>\n          13 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 2 -1.</_>\n        <_>\n          12 6 1 1 2.</_>\n        <_>\n          11 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 3 -1.</_>\n        <_>\n          5 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 1 3 -1.</_>\n        <_>\n          6 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 2 -1.</_>\n        <_>\n          13 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 3 3 -1.</_>\n        <_>\n          16 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 2 -1.</_>\n        <_>\n          6 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 3 3 -1.</_>\n        <_>\n          1 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 1 6 -1.</_>\n        <_>\n          13 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 7 2 -1.</_>\n        <_>\n          13 4 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 14 -1.</_>\n        <_>\n          0 13 20 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 6 -1.</_>\n        <_>\n          0 6 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 9 6 -1.</_>\n        <_>\n          10 3 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 5 -1.</_>\n        <_>\n          8 0 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 5 -1.</_>\n        <_>\n          6 0 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 9 6 -1.</_>\n        <_>\n          1 3 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 2 2 -1.</_>\n        <_>\n          15 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 16 3 4 -1.</_>\n        <_>\n          13 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 2 2 -1.</_>\n        <_>\n          3 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 3 4 -1.</_>\n        <_>\n          4 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 1 3 -1.</_>\n        <_>\n          11 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 5 3 -1.</_>\n        <_>\n          9 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 6 -1.</_>\n        <_>\n          0 2 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 3 -1.</_>\n        <_>\n          6 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 4 3 -1.</_>\n        <_>\n          9 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 5 3 -1.</_>\n        <_>\n          8 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 2 -1.</_>\n        <_>\n          9 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 2 -1.</_>\n        <_>\n          1 9 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 1 3 -1.</_>\n        <_>\n          11 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 6 3 -1.</_>\n        <_>\n          8 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 1 3 -1.</_>\n        <_>\n          8 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 12 4 -1.</_>\n        <_>\n          4 13 6 2 2.</_>\n        <_>\n          10 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 8 -1.</_>\n        <_>\n          14 4 1 4 2.</_>\n        <_>\n          13 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 6 -1.</_>\n        <_>\n          0 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 2 -1.</_>\n        <_>\n          9 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 7 -1.</_>\n        <_>\n          14 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 14 -1.</_>\n        <_>\n          11 2 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 7 -1.</_>\n        <_>\n          5 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 12 -1.</_>\n        <_>\n          5 5 4 6 2.</_>\n        <_>\n          9 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 3 -1.</_>\n        <_>\n          11 5 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 4 3 -1.</_>\n        <_>\n          12 4 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 12 -1.</_>\n        <_>\n          5 5 5 6 2.</_>\n        <_>\n          10 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 3 -1.</_>\n        <_>\n          9 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 7 -1.</_>\n        <_>\n          9 6 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 4 -1.</_>\n        <_>\n          9 5 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 4 -1.</_>\n        <_>\n          7 1 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 16 7 3 -1.</_>\n        <_>\n          13 17 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 7 3 -1.</_>\n        <_>\n          0 17 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 8 10 -1.</_>\n        <_>\n          12 9 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 12 5 -1.</_>\n        <_>\n          12 10 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 8 10 -1.</_>\n        <_>\n          4 9 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 12 5 -1.</_>\n        <_>\n          4 10 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 6 2 -1.</_>\n        <_>\n          5 3 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 17 9 -1.</_>\n        <_>\n          0 3 17 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 4 -1.</_>\n        <_>\n          12 4 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 4 -1.</_>\n        <_>\n          0 12 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 5 -1.</_>\n        <_>\n          6 3 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 3 -1.</_>\n        <_>\n          13 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 4 2 -1.</_>\n        <_>\n          3 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 8 10 -1.</_>\n        <_>\n          9 9 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 8 -1.</_>\n        <_>\n          8 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 12 -1.</_>\n        <_>\n          3 4 7 6 2.</_>\n        <_>\n          10 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 4 -1.</_>\n        <_>\n          9 7 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 4 -1.</_>\n        <_>\n          6 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 3 -1.</_>\n        <_>\n          2 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 9 -1.</_>\n        <_>\n          4 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 3 -1.</_>\n        <_>\n          9 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 15 2 -1.</_>\n        <_>\n          3 2 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 3 -1.</_>\n        <_>\n          9 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 5 -1.</_>\n        <_>\n          10 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 10 -1.</_>\n        <_>\n          4 15 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 4 2 -1.</_>\n        <_>\n          0 11 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 9 2 -1.</_>\n        <_>\n          5 16 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 3 -1.</_>\n        <_>\n          8 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 4 3 -1.</_>\n        <_>\n          8 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 2 -1.</_>\n        <_>\n          8 10 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 2 -1.</_>\n        <_>\n          3 4 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 1 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 2 -1.</_>\n        <_>\n          0 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 6 -1.</_>\n        <_>\n          9 4 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 14 -1.</_>\n        <_>\n          10 2 10 7 2.</_>\n        <_>\n          0 9 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 1 3 -1.</_>\n        <_>\n          14 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 12 -1.</_>\n        <_>\n          0 4 10 6 2.</_>\n        <_>\n          10 10 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 1 2 -1.</_>\n        <_>\n          8 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 2 -1.</_>\n        <_>\n          10 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 2 -1.</_>\n        <_>\n          11 17 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 3 -1.</_>\n        <_>\n          5 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 3 2 -1.</_>\n        <_>\n          14 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 4 -1.</_>\n        <_>\n          12 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 3 2 -1.</_>\n        <_>\n          3 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 3 7 -1.</_>\n        <_>\n          10 13 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 5 3 -1.</_>\n        <_>\n          12 13 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          9 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 4 -1.</_>\n        <_>\n          4 7 6 2 2.</_>\n        <_>\n          10 9 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 19 14 1 -1.</_>\n        <_>\n          6 19 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 3 2 -1.</_>\n        <_>\n          16 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 10 -1.</_>\n        <_>\n          1 0 3 5 2.</_>\n        <_>\n          4 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 10 -1.</_>\n        <_>\n          1 0 2 5 2.</_>\n        <_>\n          3 5 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 6 -1.</_>\n        <_>\n          15 5 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 15 -1.</_>\n        <_>\n          9 10 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 5 6 -1.</_>\n        <_>\n          0 5 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 2 -1.</_>\n        <_>\n          7 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 8 2 -1.</_>\n        <_>\n          16 8 4 1 2.</_>\n        <_>\n          12 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 1 -1.</_>\n        <_>\n          9 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 3 -1.</_>\n        <_>\n          3 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 3 2 -1.</_>\n        <_>\n          5 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 3 -1.</_>\n        <_>\n          9 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 7 3 -1.</_>\n        <_>\n          7 16 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 11 6 -1.</_>\n        <_>\n          3 16 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 14 1 -1.</_>\n        <_>\n          7 19 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 2 -1.</_>\n        <_>\n          11 17 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 2 -1.</_>\n        <_>\n          14 11 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 6 2 -1.</_>\n        <_>\n          7 17 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 9 10 -1.</_>\n        <_>\n          3 1 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 3 -1.</_>\n        <_>\n          11 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 4 -1.</_>\n        <_>\n          9 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 3 3 -1.</_>\n        <_>\n          8 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 11 -1.</_>\n        <_>\n          2 4 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 4 -1.</_>\n        <_>\n          9 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 10 -1.</_>\n        <_>\n          10 0 4 5 2.</_>\n        <_>\n          6 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 5 14 -1.</_>\n        <_>\n          6 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 14 -1.</_>\n        <_>\n          8 12 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 5 -1.</_>\n        <_>\n          9 7 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 3 9 -1.</_>\n        <_>\n          9 6 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 3 -1.</_>\n        <_>\n          9 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 4 -1.</_>\n        <_>\n          10 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 9 -1.</_>\n        <_>\n          10 8 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 3 8 -1.</_>\n        <_>\n          17 4 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 6 -1.</_>\n        <_>\n          5 9 5 3 2.</_>\n        <_>\n          10 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 4 -1.</_>\n        <_>\n          8 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 2 -1.</_>\n        <_>\n          9 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 2 2 -1.</_>\n        <_>\n          11 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 12 2 4 2.</_>\n        <_>\n          10 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 9 -1.</_>\n        <_>\n          0 4 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 3 -1.</_>\n        <_>\n          9 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 2 -1.</_>\n        <_>\n          8 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 2 -1.</_>\n        <_>\n          7 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 1 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 9 -1.</_>\n        <_>\n          16 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 6 -1.</_>\n        <_>\n          16 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 9 -1.</_>\n        <_>\n          2 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 6 -1.</_>\n        <_>\n          1 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 9 -1.</_>\n        <_>\n          11 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 3 6 -1.</_>\n        <_>\n          11 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 2 -1.</_>\n        <_>\n          1 2 9 1 2.</_>\n        <_>\n          10 3 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 8 -1.</_>\n        <_>\n          7 8 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 16 -1.</_>\n        <_>\n          11 0 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 18 -1.</_>\n        <_>\n          17 1 3 9 2.</_>\n        <_>\n          14 10 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 2 3 -1.</_>\n        <_>\n          2 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 18 -1.</_>\n        <_>\n          0 1 3 9 2.</_>\n        <_>\n          3 10 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 12 -1.</_>\n        <_>\n          11 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 18 -1.</_>\n        <_>\n          2 10 18 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 1 -1.</_>\n        <_>\n          7 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 2 -1.</_>\n        <_>\n          4 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 5 3 -1.</_>\n        <_>\n          8 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 5 3 -1.</_>\n        <_>\n          3 13 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 4 -1.</_>\n        <_>\n          7 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 2 -1.</_>\n        <_>\n          12 10 1 1 2.</_>\n        <_>\n          11 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 1 -1.</_>\n        <_>\n          9 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 8 -1.</_>\n        <_>\n          10 4 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 5 -1.</_>\n        <_>\n          10 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 4 -1.</_>\n        <_>\n          12 4 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 2 -1.</_>\n        <_>\n          13 7 1 1 2.</_>\n        <_>\n          12 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 10 8 -1.</_>\n        <_>\n          3 9 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 2 12 -1.</_>\n        <_>\n          7 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 2 -1.</_>\n        <_>\n          13 7 1 1 2.</_>\n        <_>\n          12 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 1 6 -1.</_>\n        <_>\n          11 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 15 -1.</_>\n        <_>\n          7 1 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 2 -1.</_>\n        <_>\n          6 7 1 1 2.</_>\n        <_>\n          7 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 2 2 -1.</_>\n        <_>\n          17 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 10 -1.</_>\n        <_>\n          12 3 2 5 2.</_>\n        <_>\n          10 8 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 2 2 -1.</_>\n        <_>\n          1 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 2 -1.</_>\n        <_>\n          7 10 1 1 2.</_>\n        <_>\n          8 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 14 4 -1.</_>\n        <_>\n          10 12 7 2 2.</_>\n        <_>\n          3 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 2 -1.</_>\n        <_>\n          9 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 3 3 -1.</_>\n        <_>\n          1 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 2 -1.</_>\n        <_>\n          0 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 1 -1.</_>\n        <_>\n          9 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 16 6 -1.</_>\n        <_>\n          0 6 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 14 -1.</_>\n        <_>\n          9 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 3 -1.</_>\n        <_>\n          12 0 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 12 2 -1.</_>\n        <_>\n          8 18 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 4 -1.</_>\n        <_>\n          8 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 8 -1.</_>\n        <_>\n          15 1 1 4 2.</_>\n        <_>\n          14 5 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 9 1 -1.</_>\n        <_>\n          6 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 4 2 -1.</_>\n        <_>\n          3 4 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 4 -1.</_>\n        <_>\n          11 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 2 6 -1.</_>\n        <_>\n          14 15 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 1 6 -1.</_>\n        <_>\n          6 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          6 14 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 4 8 -1.</_>\n        <_>\n          10 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 10 -1.</_>\n        <_>\n          8 4 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 3 -1.</_>\n        <_>\n          14 3 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 2 -1.</_>\n        <_>\n          9 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 6 -1.</_>\n        <_>\n          8 3 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 8 -1.</_>\n        <_>\n          3 9 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 5 3 -1.</_>\n        <_>\n          12 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 15 6 -1.</_>\n        <_>\n          5 16 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 5 3 -1.</_>\n        <_>\n          3 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 6 -1.</_>\n        <_>\n          9 14 1 3 2.</_>\n        <_>\n          10 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 2 -1.</_>\n        <_>\n          9 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 3 2 -1.</_>\n        <_>\n          9 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 3 -1.</_>\n        <_>\n          0 3 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 9 11 -1.</_>\n        <_>\n          3 1 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          10 13 2 3 2.</_>\n        <_>\n          8 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 14 4 -1.</_>\n        <_>\n          3 12 7 2 2.</_>\n        <_>\n          10 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 1 4 -1.</_>\n        <_>\n          7 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          10 13 2 3 2.</_>\n        <_>\n          8 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 3 -1.</_>\n        <_>\n          10 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          8 13 2 3 2.</_>\n        <_>\n          10 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 1 3 -1.</_>\n        <_>\n          9 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 2 3 -1.</_>\n        <_>\n          10 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 1 2 -1.</_>\n        <_>\n          11 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 2 -1.</_>\n        <_>\n          9 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 8 -1.</_>\n        <_>\n          0 5 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 3 -1.</_>\n        <_>\n          10 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 3 -1.</_>\n        <_>\n          10 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 16 6 -1.</_>\n        <_>\n          0 6 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 2 -1.</_>\n        <_>\n          5 1 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 12 -1.</_>\n        <_>\n          10 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 8 -1.</_>\n        <_>\n          7 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 6 -1.</_>\n        <_>\n          10 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 10 8 -1.</_>\n        <_>\n          8 16 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 6 -1.</_>\n        <_>\n          9 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          10 7 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 3 -1.</_>\n        <_>\n          8 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 3 3 -1.</_>\n        <_>\n          16 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 3 -1.</_>\n        <_>\n          10 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 5 -1.</_>\n        <_>\n          8 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 2 -1.</_>\n        <_>\n          10 10 10 1 2.</_>\n        <_>\n          0 11 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 9 4 -1.</_>\n        <_>\n          14 16 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 4 -1.</_>\n        <_>\n          1 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 2 -1.</_>\n        <_>\n          8 15 2 1 2.</_>\n        <_>\n          10 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 19 3 -1.</_>\n        <_>\n          1 9 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 3 3 -1.</_>\n        <_>\n          15 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 10 -1.</_>\n        <_>\n          0 4 10 5 2.</_>\n        <_>\n          10 9 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 7 6 -1.</_>\n        <_>\n          2 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 6 -1.</_>\n        <_>\n          10 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 6 -1.</_>\n        <_>\n          16 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 4 3 -1.</_>\n        <_>\n          7 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 6 2 -1.</_>\n        <_>\n          13 14 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 3 -1.</_>\n        <_>\n          14 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 6 2 -1.</_>\n        <_>\n          1 14 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 3 -1.</_>\n        <_>\n          4 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 5 -1.</_>\n        <_>\n          18 4 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 8 -1.</_>\n        <_>\n          12 5 7 4 2.</_>\n        <_>\n          5 9 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 5 -1.</_>\n        <_>\n          8 8 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 6 -1.</_>\n        <_>\n          0 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 6 -1.</_>\n        <_>\n          10 1 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 3 -1.</_>\n        <_>\n          10 5 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 6 -1.</_>\n        <_>\n          9 1 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 3 -1.</_>\n        <_>\n          4 5 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 4 2 -1.</_>\n        <_>\n          12 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 6 -1.</_>\n        <_>\n          0 2 10 3 2.</_>\n        <_>\n          10 5 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 4 -1.</_>\n        <_>\n          10 10 8 2 2.</_>\n        <_>\n          2 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 6 -1.</_>\n        <_>\n          11 10 8 3 2.</_>\n        <_>\n          3 13 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 16 6 -1.</_>\n        <_>\n          1 10 8 3 2.</_>\n        <_>\n          9 13 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 4 -1.</_>\n        <_>\n          5 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 9 4 -1.</_>\n        <_>\n          14 16 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 14 4 -1.</_>\n        <_>\n          10 16 7 2 2.</_>\n        <_>\n          3 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 4 -1.</_>\n        <_>\n          3 16 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 6 -1.</_>\n        <_>\n          1 14 3 3 2.</_>\n        <_>\n          4 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 1 -1.</_>\n        <_>\n          9 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 10 -1.</_>\n        <_>\n          10 7 4 5 2.</_>\n        <_>\n          6 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 1 2 -1.</_>\n        <_>\n          2 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 7 6 -1.</_>\n        <_>\n          0 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 2 -1.</_>\n        <_>\n          7 9 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 15 -1.</_>\n        <_>\n          9 7 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 2 -1.</_>\n        <_>\n          5 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 7 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 5 6 -1.</_>\n        <_>\n          12 15 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 18 -1.</_>\n        <_>\n          0 9 20 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 6 -1.</_>\n        <_>\n          7 1 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 9 -1.</_>\n        <_>\n          7 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 18 1 -1.</_>\n        <_>\n          7 19 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 5 2 -1.</_>\n        <_>\n          14 17 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 15 10 -1.</_>\n        <_>\n          0 10 15 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 4 2 -1.</_>\n        <_>\n          7 15 2 1 2.</_>\n        <_>\n          9 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 2 2 -1.</_>\n        <_>\n          14 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 3 -1.</_>\n        <_>\n          9 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 2 2 -1.</_>\n        <_>\n          4 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 3 -1.</_>\n        <_>\n          8 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 3 -1.</_>\n        <_>\n          9 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 4 10 -1.</_>\n        <_>\n          1 9 2 5 2.</_>\n        <_>\n          3 14 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 8 -1.</_>\n        <_>\n          2 12 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 2 -1.</_>\n        <_>\n          11 1 2 1 2.</_>\n        <_>\n          9 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 7 6 -1.</_>\n        <_>\n          12 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 3 -1.</_>\n        <_>\n          7 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          9 14 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 4 -1.</_>\n        <_>\n          11 6 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 8 3 -1.</_>\n        <_>\n          8 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 3 -1.</_>\n        <_>\n          8 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 5 -1.</_>\n        <_>\n          7 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 8 1 -1.</_>\n        <_>\n          4 4 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 2 6 -1.</_>\n        <_>\n          8 2 1 3 2.</_>\n        <_>\n          9 5 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 6 -1.</_>\n        <_>\n          0 9 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 3 6 -1.</_>\n        <_>\n          12 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 1 4 -1.</_>\n        <_>\n          8 17 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 2 4 -1.</_>\n        <_>\n          5 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 12 -1.</_>\n        <_>\n          6 6 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 1 -1.</_>\n        <_>\n          9 0 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 3 -1.</_>\n        <_>\n          8 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 3 6 -1.</_>\n        <_>\n          12 14 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 10 -1.</_>\n        <_>\n          14 2 3 5 2.</_>\n        <_>\n          11 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 12 -1.</_>\n        <_>\n          5 7 5 6 2.</_>\n        <_>\n          10 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 2 10 -1.</_>\n        <_>\n          4 9 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 2 -1.</_>\n        <_>\n          11 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 2 -1.</_>\n        <_>\n          5 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 6 -1.</_>\n        <_>\n          0 4 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 3 4 -1.</_>\n        <_>\n          11 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 5 -1.</_>\n        <_>\n          10 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 1 3 -1.</_>\n        <_>\n          9 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 16 6 -1.</_>\n        <_>\n          0 6 8 3 2.</_>\n        <_>\n          8 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 3 3 -1.</_>\n        <_>\n          10 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 4 3 -1.</_>\n        <_>\n          9 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 2 -1.</_>\n        <_>\n          3 1 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 3 3 -1.</_>\n        <_>\n          9 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 3 3 -1.</_>\n        <_>\n          10 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 6 -1.</_>\n        <_>\n          9 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 3 6 -1.</_>\n        <_>\n          12 14 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 5 2 -1.</_>\n        <_>\n          8 13 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 6 -1.</_>\n        <_>\n          5 14 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 2 -1.</_>\n        <_>\n          8 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 7 6 -1.</_>\n        <_>\n          11 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          7 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 4 -1.</_>\n        <_>\n          3 13 7 2 2.</_>\n        <_>\n          10 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 6 -1.</_>\n        <_>\n          8 14 2 3 2.</_>\n        <_>\n          10 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 2 -1.</_>\n        <_>\n          9 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 2 -1.</_>\n        <_>\n          7 8 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 13 3 -1.</_>\n        <_>\n          3 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 4 -1.</_>\n        <_>\n          9 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 3 -1.</_>\n        <_>\n          8 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 4 -1.</_>\n        <_>\n          8 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 5 -1.</_>\n        <_>\n          9 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 4 -1.</_>\n        <_>\n          13 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 4 -1.</_>\n        <_>\n          6 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 1 -1.</_>\n        <_>\n          7 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 3 -1.</_>\n        <_>\n          12 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 2 -1.</_>\n        <_>\n          11 3 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 2 -1.</_>\n        <_>\n          3 2 7 1 2.</_>\n        <_>\n          10 3 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 14 -1.</_>\n        <_>\n          6 8 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 5 -1.</_>\n        <_>\n          8 0 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 1 -1.</_>\n        <_>\n          7 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 5 -1.</_>\n        <_>\n          5 0 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 8 15 -1.</_>\n        <_>\n          2 10 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 3 -1.</_>\n        <_>\n          12 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 3 -1.</_>\n        <_>\n          13 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 4 3 -1.</_>\n        <_>\n          2 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          10 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 2 -1.</_>\n        <_>\n          12 6 1 1 2.</_>\n        <_>\n          11 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 3 -1.</_>\n        <_>\n          12 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 2 2 -1.</_>\n        <_>\n          7 6 1 1 2.</_>\n        <_>\n          8 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 4 3 -1.</_>\n        <_>\n          4 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 3 -1.</_>\n        <_>\n          12 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 1 -1.</_>\n        <_>\n          9 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 5 3 -1.</_>\n        <_>\n          4 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 3 -1.</_>\n        <_>\n          4 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 3 -1.</_>\n        <_>\n          12 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 3 -1.</_>\n        <_>\n          7 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 1 3 -1.</_>\n        <_>\n          4 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 2 -1.</_>\n        <_>\n          17 1 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 2 9 -1.</_>\n        <_>\n          8 13 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 2 -1.</_>\n        <_>\n          0 9 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 2 3 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 3 -1.</_>\n        <_>\n          8 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 6 -1.</_>\n        <_>\n          1 14 3 3 2.</_>\n        <_>\n          4 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 6 2 -1.</_>\n        <_>\n          0 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 4 3 -1.</_>\n        <_>\n          12 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 8 -1.</_>\n        <_>\n          10 8 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 3 -1.</_>\n        <_>\n          6 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 6 1 -1.</_>\n        <_>\n          6 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 2 -1.</_>\n        <_>\n          10 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 12 -1.</_>\n        <_>\n          10 7 4 6 2.</_>\n        <_>\n          6 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 2 -1.</_>\n        <_>\n          9 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 6 -1.</_>\n        <_>\n          9 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 14 4 -1.</_>\n        <_>\n          10 16 7 2 2.</_>\n        <_>\n          3 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 4 -1.</_>\n        <_>\n          10 14 9 2 2.</_>\n        <_>\n          1 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          8 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 12 -1.</_>\n        <_>\n          0 4 10 6 2.</_>\n        <_>\n          10 10 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 12 -1.</_>\n        <_>\n          10 5 5 6 2.</_>\n        <_>\n          5 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 7 -1.</_>\n        <_>\n          10 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 3 -1.</_>\n        <_>\n          8 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 3 -1.</_>\n        <_>\n          8 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 5 6 -1.</_>\n        <_>\n          13 15 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 6 -1.</_>\n        <_>\n          9 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 5 6 -1.</_>\n        <_>\n          2 15 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 12 -1.</_>\n        <_>\n          0 4 1 6 2.</_>\n        <_>\n          1 10 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 3 1 -1.</_>\n        <_>\n          10 19 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 6 -1.</_>\n        <_>\n          18 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 6 -1.</_>\n        <_>\n          0 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 6 -1.</_>\n        <_>\n          0 2 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 7 -1.</_>\n        <_>\n          18 2 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 7 -1.</_>\n        <_>\n          10 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 7 -1.</_>\n        <_>\n          1 2 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 8 -1.</_>\n        <_>\n          8 2 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 1 4 -1.</_>\n        <_>\n          13 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 12 5 -1.</_>\n        <_>\n          9 1 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 1 4 -1.</_>\n        <_>\n          6 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 12 5 -1.</_>\n        <_>\n          7 1 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 8 -1.</_>\n        <_>\n          10 12 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 1 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          7 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 7 3 -1.</_>\n        <_>\n          5 17 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 6 -1.</_>\n        <_>\n          0 14 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 14 2 -1.</_>\n        <_>\n          4 19 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 8 -1.</_>\n        <_>\n          9 12 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 3 3 -1.</_>\n        <_>\n          7 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 10 -1.</_>\n        <_>\n          11 5 6 5 2.</_>\n        <_>\n          5 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 5 10 -1.</_>\n        <_>\n          8 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 12 -1.</_>\n        <_>\n          5 10 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 6 -1.</_>\n        <_>\n          7 15 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 5 16 -1.</_>\n        <_>\n          8 12 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 6 -1.</_>\n        <_>\n          8 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 2 -1.</_>\n        <_>\n          7 13 1 1 2.</_>\n        <_>\n          8 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 2 2 -1.</_>\n        <_>\n          7 12 1 1 2.</_>\n        <_>\n          8 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 14 -1.</_>\n        <_>\n          18 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 2 -1.</_>\n        <_>\n          12 12 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 1 2 -1.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 1 2 -1.</_>\n        <_>\n          2 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 1 -1.</_>\n        <_>\n          9 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 3 -1.</_>\n        <_>\n          9 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 2 2 -1.</_>\n        <_>\n          4 1 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 2 -1.</_>\n        <_>\n          3 1 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 3 4 -1.</_>\n        <_>\n          12 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 8 2 -1.</_>\n        <_>\n          7 8 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 4 -1.</_>\n        <_>\n          8 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 3 -1.</_>\n        <_>\n          7 13 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 10 3 -1.</_>\n        <_>\n          5 2 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 6 -1.</_>\n        <_>\n          0 3 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 3 -1.</_>\n        <_>\n          9 6 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 4 -1.</_>\n        <_>\n          3 9 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 6 -1.</_>\n        <_>\n          5 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 12 -1.</_>\n        <_>\n          8 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 2 -1.</_>\n        <_>\n          12 17 3 1 2.</_>\n        <_>\n          9 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 4 3 -1.</_>\n        <_>\n          10 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 2 -1.</_>\n        <_>\n          4 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 14 -1.</_>\n        <_>\n          9 3 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 1 6 -1.</_>\n        <_>\n          15 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 2 6 -1.</_>\n        <_>\n          13 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 5 6 -1.</_>\n        <_>\n          4 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 4 2 -1.</_>\n        <_>\n          6 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 2 -1.</_>\n        <_>\n          0 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 10 12 -1.</_>\n        <_>\n          11 5 5 6 2.</_>\n        <_>\n          6 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 12 -1.</_>\n        <_>\n          4 0 1 6 2.</_>\n        <_>\n          5 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 2 -1.</_>\n        <_>\n          6 1 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 1 -1.</_>\n        <_>\n          13 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 15 6 -1.</_>\n        <_>\n          5 7 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 2 -1.</_>\n        <_>\n          1 10 9 1 2.</_>\n        <_>\n          10 11 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 15 7 -1.</_>\n        <_>\n          6 6 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 3 3 -1.</_>\n        <_>\n          9 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 2 -1.</_>\n        <_>\n          8 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 5 3 -1.</_>\n        <_>\n          15 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 20 1 -1.</_>\n        <_>\n          0 14 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 6 3 -1.</_>\n        <_>\n          0 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 2 -1.</_>\n        <_>\n          5 4 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 1 -1.</_>\n        <_>\n          0 6 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 10 14 -1.</_>\n        <_>\n          11 3 5 7 2.</_>\n        <_>\n          6 10 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 6 -1.</_>\n        <_>\n          6 3 4 3 2.</_>\n        <_>\n          10 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 1 -1.</_>\n        <_>\n          13 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 10 14 -1.</_>\n        <_>\n          11 3 5 7 2.</_>\n        <_>\n          6 10 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 1 -1.</_>\n        <_>\n          6 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 10 14 -1.</_>\n        <_>\n          4 3 5 7 2.</_>\n        <_>\n          9 10 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          9 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 1 -1.</_>\n        <_>\n          0 3 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 10 3 -1.</_>\n        <_>\n          2 2 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 6 -1.</_>\n        <_>\n          10 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 2 -1.</_>\n        <_>\n          9 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 6 -1.</_>\n        <_>\n          9 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 6 -1.</_>\n        <_>\n          16 5 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 12 -1.</_>\n        <_>\n          16 6 1 6 2.</_>\n        <_>\n          15 12 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 10 -1.</_>\n        <_>\n          1 4 9 5 2.</_>\n        <_>\n          10 9 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 4 -1.</_>\n        <_>\n          9 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 2 -1.</_>\n        <_>\n          12 6 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 10 4 -1.</_>\n        <_>\n          5 14 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 2 -1.</_>\n        <_>\n          5 6 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 6 -1.</_>\n        <_>\n          8 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 6 -1.</_>\n        <_>\n          14 6 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 6 -1.</_>\n        <_>\n          18 0 2 3 2.</_>\n        <_>\n          16 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 6 -1.</_>\n        <_>\n          0 6 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 6 -1.</_>\n        <_>\n          0 0 2 3 2.</_>\n        <_>\n          2 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 5 -1.</_>\n        <_>\n          12 0 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 17 -1.</_>\n        <_>\n          16 0 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 20 -1.</_>\n        <_>\n          7 0 6 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 5 -1.</_>\n        <_>\n          7 0 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 1 -1.</_>\n        <_>\n          0 6 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 4 -1.</_>\n        <_>\n          10 7 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 4 -1.</_>\n        <_>\n          1 1 8 2 2.</_>\n        <_>\n          9 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 2 -1.</_>\n        <_>\n          7 2 2 1 2.</_>\n        <_>\n          9 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 9 3 -1.</_>\n        <_>\n          7 5 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 5 12 -1.</_>\n        <_>\n          10 10 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 3 -1.</_>\n        <_>\n          3 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 5 -1.</_>\n        <_>\n          9 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 3 -1.</_>\n        <_>\n          13 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 2 -1.</_>\n        <_>\n          15 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 3 -1.</_>\n        <_>\n          5 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 6 2 -1.</_>\n        <_>\n          2 12 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 4 3 -1.</_>\n        <_>\n          15 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 17 -1.</_>\n        <_>\n          16 0 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 4 3 -1.</_>\n        <_>\n          1 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 1 3 -1.</_>\n        <_>\n          9 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 7 -1.</_>\n        <_>\n          10 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 2 -1.</_>\n        <_>\n          8 16 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 7 -1.</_>\n        <_>\n          7 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 2 -1.</_>\n        <_>\n          10 2 10 1 2.</_>\n        <_>\n          0 3 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 2 -1.</_>\n        <_>\n          6 8 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 2 -1.</_>\n        <_>\n          0 2 10 1 2.</_>\n        <_>\n          10 3 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 2 10 -1.</_>\n        <_>\n          3 1 1 5 2.</_>\n        <_>\n          4 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 1 10 -1.</_>\n        <_>\n          13 9 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 3 -1.</_>\n        <_>\n          9 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 4 -1.</_>\n        <_>\n          2 11 8 2 2.</_>\n        <_>\n          10 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 5 -1.</_>\n        <_>\n          6 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 3 -1.</_>\n        <_>\n          9 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 2 -1.</_>\n        <_>\n          9 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 2 -1.</_>\n        <_>\n          0 11 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 4 -1.</_>\n        <_>\n          1 7 3 2 2.</_>\n        <_>\n          4 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 4 -1.</_>\n        <_>\n          16 1 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 2 14 -1.</_>\n        <_>\n          6 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 12 -1.</_>\n        <_>\n          6 7 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 5 -1.</_>\n        <_>\n          10 0 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 10 -1.</_>\n        <_>\n          15 0 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 3 -1.</_>\n        <_>\n          7 0 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 17 2 -1.</_>\n        <_>\n          0 1 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 3 -1.</_>\n        <_>\n          11 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 12 -1.</_>\n        <_>\n          11 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 16 -1.</_>\n        <_>\n          1 3 2 8 2.</_>\n        <_>\n          3 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 3 -1.</_>\n        <_>\n          8 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 6 -1.</_>\n        <_>\n          9 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 13 -1.</_>\n        <_>\n          11 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 2 -1.</_>\n        <_>\n          8 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 1 12 -1.</_>\n        <_>\n          8 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 6 -1.</_>\n        <_>\n          10 10 6 3 2.</_>\n        <_>\n          4 13 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 3 -1.</_>\n        <_>\n          13 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 6 -1.</_>\n        <_>\n          4 10 6 3 2.</_>\n        <_>\n          10 13 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          5 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 4 -1.</_>\n        <_>\n          9 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 4 -1.</_>\n        <_>\n          10 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 2 3 -1.</_>\n        <_>\n          12 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 1 -1.</_>\n        <_>\n          0 6 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 2 -1.</_>\n        <_>\n          10 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 4 3 -1.</_>\n        <_>\n          1 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 5 3 -1.</_>\n        <_>\n          10 4 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 14 8 -1.</_>\n        <_>\n          3 9 7 4 2.</_>\n        <_>\n          10 13 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 10 -1.</_>\n        <_>\n          6 8 4 5 2.</_>\n        <_>\n          10 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 5 3 -1.</_>\n        <_>\n          10 4 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 5 3 -1.</_>\n        <_>\n          5 4 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 16 2 3 -1.</_>\n        <_>\n          13 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 6 -1.</_>\n        <_>\n          0 7 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 3 3 -1.</_>\n        <_>\n          3 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 5 3 -1.</_>\n        <_>\n          7 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 2 3 -1.</_>\n        <_>\n          12 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 6 -1.</_>\n        <_>\n          15 13 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 3 -1.</_>\n        <_>\n          7 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 6 -1.</_>\n        <_>\n          4 13 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 2 4 -1.</_>\n        <_>\n          11 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 5 -1.</_>\n        <_>\n          13 4 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 4 -1.</_>\n        <_>\n          8 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 5 -1.</_>\n        <_>\n          6 4 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 6 1 2 -1.</_>\n        <_>\n          19 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 8 13 -1.</_>\n        <_>\n          12 7 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 1 2 -1.</_>\n        <_>\n          0 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 4 3 -1.</_>\n        <_>\n          6 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 2 2 -1.</_>\n        <_>\n          11 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 2 4 -1.</_>\n        <_>\n          11 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 2 3 -1.</_>\n        <_>\n          4 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          6 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 5 -1.</_>\n        <_>\n          7 0 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 4 -1.</_>\n        <_>\n          5 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 2 2 -1.</_>\n        <_>\n          10 6 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 14 4 -1.</_>\n        <_>\n          13 4 7 2 2.</_>\n        <_>\n          6 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 6 4 -1.</_>\n        <_>\n          5 16 3 2 2.</_>\n        <_>\n          8 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 4 -1.</_>\n        <_>\n          7 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 5 14 -1.</_>\n        <_>\n          8 12 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 7 -1.</_>\n        <_>\n          8 5 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 9 -1.</_>\n        <_>\n          0 3 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 8 -1.</_>\n        <_>\n          12 6 4 4 2.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 13 2 -1.</_>\n        <_>\n          4 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 1 -1.</_>\n        <_>\n          6 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 2 6 -1.</_>\n        <_>\n          9 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 4 -1.</_>\n        <_>\n          12 5 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 12 -1.</_>\n        <_>\n          9 9 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 3 -1.</_>\n        <_>\n          8 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 7 -1.</_>\n        <_>\n          12 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 6 -1.</_>\n        <_>\n          3 12 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 10 -1.</_>\n        <_>\n          5 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 6 -1.</_>\n        <_>\n          6 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 2 12 -1.</_>\n        <_>\n          17 2 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 2 14 -1.</_>\n        <_>\n          16 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 12 9 -1.</_>\n        <_>\n          3 14 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 12 -1.</_>\n        <_>\n          2 2 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 18 -1.</_>\n        <_>\n          18 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 3 2 -1.</_>\n        <_>\n          16 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 15 -1.</_>\n        <_>\n          1 2 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 2 4 -1.</_>\n        <_>\n          1 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 18 -1.</_>\n        <_>\n          11 1 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 2 -1.</_>\n        <_>\n          10 2 7 1 2.</_>\n        <_>\n          3 3 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 2 18 -1.</_>\n        <_>\n          8 1 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 12 -1.</_>\n        <_>\n          6 7 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 3 -1.</_>\n        <_>\n          8 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          7 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 5 2 -1.</_>\n        <_>\n          0 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 6 -1.</_>\n        <_>\n          9 0 1 3 2.</_>\n        <_>\n          10 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 6 -1.</_>\n        <_>\n          10 0 1 3 2.</_>\n        <_>\n          9 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 6 -1.</_>\n        <_>\n          10 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 6 -1.</_>\n        <_>\n          9 0 1 3 2.</_>\n        <_>\n          10 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 6 -1.</_>\n        <_>\n          9 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 6 -1.</_>\n        <_>\n          9 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 4 3 -1.</_>\n        <_>\n          9 4 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 3 -1.</_>\n        <_>\n          0 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 2 -1.</_>\n        <_>\n          8 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 3 -1.</_>\n        <_>\n          12 6 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 12 -1.</_>\n        <_>\n          9 10 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 3 -1.</_>\n        <_>\n          5 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 1 3 -1.</_>\n        <_>\n          5 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 2 -1.</_>\n        <_>\n          0 8 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 7 -1.</_>\n        <_>\n          6 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 10 -1.</_>\n        <_>\n          5 10 3 5 2.</_>\n        <_>\n          8 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 2 -1.</_>\n        <_>\n          9 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 2 -1.</_>\n        <_>\n          9 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 1 3 -1.</_>\n        <_>\n          5 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 2 -1.</_>\n        <_>\n          10 1 10 1 2.</_>\n        <_>\n          0 2 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 2 -1.</_>\n        <_>\n          5 4 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 2 -1.</_>\n        <_>\n          7 4 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 6 -1.</_>\n        <_>\n          0 14 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 4 -1.</_>\n        <_>\n          2 2 8 2 2.</_>\n        <_>\n          10 4 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 5 3 -1.</_>\n        <_>\n          7 13 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 10 -1.</_>\n        <_>\n          14 9 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 3 2 -1.</_>\n        <_>\n          16 7 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 10 -1.</_>\n        <_>\n          3 9 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 5 2 -1.</_>\n        <_>\n          0 17 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 12 -1.</_>\n        <_>\n          9 11 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 2 -1.</_>\n        <_>\n          5 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 1 2 -1.</_>\n        <_>\n          4 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 1 2 -1.</_>\n        <_>\n          11 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 16 2 -1.</_>\n        <_>\n          11 1 8 1 2.</_>\n        <_>\n          3 2 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 2 -1.</_>\n        <_>\n          3 6 1 1 2.</_>\n        <_>\n          4 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 6 -1.</_>\n        <_>\n          5 11 5 3 2.</_>\n        <_>\n          10 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 4 6 -1.</_>\n        <_>\n          10 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 11 -1.</_>\n        <_>\n          16 9 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 11 -1.</_>\n        <_>\n          2 9 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 6 -1.</_>\n        <_>\n          2 11 8 3 2.</_>\n        <_>\n          10 14 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 10 -1.</_>\n        <_>\n          16 0 4 5 2.</_>\n        <_>\n          12 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 4 -1.</_>\n        <_>\n          16 2 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 10 -1.</_>\n        <_>\n          0 0 4 5 2.</_>\n        <_>\n          4 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 4 -1.</_>\n        <_>\n          2 2 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 15 2 -1.</_>\n        <_>\n          9 9 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 4 8 -1.</_>\n        <_>\n          14 3 2 4 2.</_>\n        <_>\n          12 7 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 9 -1.</_>\n        <_>\n          10 2 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 1 -1.</_>\n        <_>\n          10 2 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 5 -1.</_>\n        <_>\n          16 1 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 6 -1.</_>\n        <_>\n          16 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 4 -1.</_>\n        <_>\n          6 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 5 -1.</_>\n        <_>\n          6 0 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 14 -1.</_>\n        <_>\n          12 2 6 7 2.</_>\n        <_>\n          6 9 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 5 -1.</_>\n        <_>\n          12 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 2 2 -1.</_>\n        <_>\n          5 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 3 -1.</_>\n        <_>\n          7 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 15 2 -1.</_>\n        <_>\n          9 9 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 2 -1.</_>\n        <_>\n          12 7 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 15 2 -1.</_>\n        <_>\n          6 9 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 10 -1.</_>\n        <_>\n          5 0 1 5 2.</_>\n        <_>\n          6 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 14 -1.</_>\n        <_>\n          0 7 20 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 8 4 -1.</_>\n        <_>\n          12 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 4 -1.</_>\n        <_>\n          4 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 3 -1.</_>\n        <_>\n          9 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 4 -1.</_>\n        <_>\n          10 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 1 -1.</_>\n        <_>\n          10 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 2 -1.</_>\n        <_>\n          8 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 2 8 -1.</_>\n        <_>\n          8 4 1 4 2.</_>\n        <_>\n          9 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 3 -1.</_>\n        <_>\n          5 9 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 1 3 -1.</_>\n        <_>\n          11 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 6 -1.</_>\n        <_>\n          6 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 8 3 -1.</_>\n        <_>\n          4 18 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 2 3 -1.</_>\n        <_>\n          17 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 2 -1.</_>\n        <_>\n          10 12 1 1 2.</_>\n        <_>\n          9 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 4 -1.</_>\n        <_>\n          9 13 1 2 2.</_>\n        <_>\n          10 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 10 -1.</_>\n        <_>\n          11 5 6 5 2.</_>\n        <_>\n          5 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 12 -1.</_>\n        <_>\n          12 3 6 6 2.</_>\n        <_>\n          6 9 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 2 -1.</_>\n        <_>\n          5 7 1 1 2.</_>\n        <_>\n          6 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 2 -1.</_>\n        <_>\n          5 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 14 -1.</_>\n        <_>\n          12 2 6 7 2.</_>\n        <_>\n          6 9 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 3 -1.</_>\n        <_>\n          9 2 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 17 -1.</_>\n        <_>\n          7 1 6 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 1 -1.</_>\n        <_>\n          5 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 3 -1.</_>\n        <_>\n          16 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 6 -1.</_>\n        <_>\n          7 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 1 6 -1.</_>\n        <_>\n          6 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 4 2 -1.</_>\n        <_>\n          6 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 6 2 -1.</_>\n        <_>\n          13 18 3 1 2.</_>\n        <_>\n          10 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 1 3 -1.</_>\n        <_>\n          16 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 1 2 -1.</_>\n        <_>\n          9 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 12 -1.</_>\n        <_>\n          14 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 1 3 -1.</_>\n        <_>\n          15 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 3 3 -1.</_>\n        <_>\n          8 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 12 -1.</_>\n        <_>\n          5 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 1 -1.</_>\n        <_>\n          10 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 12 14 -1.</_>\n        <_>\n          2 2 6 7 2.</_>\n        <_>\n          8 9 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 3 -1.</_>\n        <_>\n          8 2 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 8 -1.</_>\n        <_>\n          18 2 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 2 2 -1.</_>\n        <_>\n          1 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 6 -1.</_>\n        <_>\n          6 14 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 5 6 -1.</_>\n        <_>\n          13 12 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 15 3 -1.</_>\n        <_>\n          5 9 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 5 6 -1.</_>\n        <_>\n          2 12 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 15 3 -1.</_>\n        <_>\n          0 9 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 3 1 -1.</_>\n        <_>\n          17 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 2 -1.</_>\n        <_>\n          18 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 12 -1.</_>\n        <_>\n          0 8 4 6 2.</_>\n        <_>\n          4 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 8 6 -1.</_>\n        <_>\n          1 7 4 3 2.</_>\n        <_>\n          5 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 2 -1.</_>\n        <_>\n          16 1 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 4 -1.</_>\n        <_>\n          17 0 2 2 2.</_>\n        <_>\n          15 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 4 11 -1.</_>\n        <_>\n          3 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 1 8 -1.</_>\n        <_>\n          5 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 1 -1.</_>\n        <_>\n          9 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 4 -1.</_>\n        <_>\n          8 6 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 9 1 -1.</_>\n        <_>\n          5 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 8 -1.</_>\n        <_>\n          9 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 12 -1.</_>\n        <_>\n          3 14 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 7 3 -1.</_>\n        <_>\n          6 14 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 3 -1.</_>\n        <_>\n          7 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 3 -1.</_>\n        <_>\n          12 2 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 2 -1.</_>\n        <_>\n          8 13 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 2 -1.</_>\n        <_>\n          0 2 9 1 2.</_>\n        <_>\n          9 3 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 6 -1.</_>\n        <_>\n          6 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 8 -1.</_>\n        <_>\n          15 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 4 -1.</_>\n        <_>\n          9 16 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 14 4 -1.</_>\n        <_>\n          2 11 7 2 2.</_>\n        <_>\n          9 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          14 10 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 12 -1.</_>\n        <_>\n          14 8 5 6 2.</_>\n        <_>\n          9 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          3 10 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 10 12 -1.</_>\n        <_>\n          1 8 5 6 2.</_>\n        <_>\n          6 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 1 -1.</_>\n        <_>\n          11 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 3 -1.</_>\n        <_>\n          9 4 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 1 -1.</_>\n        <_>\n          7 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 3 -1.</_>\n        <_>\n          6 5 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 3 -1.</_>\n        <_>\n          9 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 3 -1.</_>\n        <_>\n          8 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          6 0 4 6 2.</_>\n        <_>\n          10 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 3 -1.</_>\n        <_>\n          4 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 6 3 -1.</_>\n        <_>\n          12 17 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 7 2 -1.</_>\n        <_>\n          7 13 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 6 3 -1.</_>\n        <_>\n          2 17 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 16 6 -1.</_>\n        <_>\n          0 10 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 5 -1.</_>\n        <_>\n          10 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 10 -1.</_>\n        <_>\n          0 5 10 5 2.</_>\n        <_>\n          10 10 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 4 2 -1.</_>\n        <_>\n          5 1 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 10 -1.</_>\n        <_>\n          11 6 4 5 2.</_>\n        <_>\n          7 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 2 -1.</_>\n        <_>\n          17 7 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 10 -1.</_>\n        <_>\n          5 6 4 5 2.</_>\n        <_>\n          9 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 10 6 -1.</_>\n        <_>\n          5 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 2 6 -1.</_>\n        <_>\n          11 3 1 3 2.</_>\n        <_>\n          10 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 3 -1.</_>\n        <_>\n          0 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 8 4 -1.</_>\n        <_>\n          3 16 4 2 2.</_>\n        <_>\n          7 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 5 2 -1.</_>\n        <_>\n          8 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 12 -1.</_>\n        <_>\n          8 11 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 2 -1.</_>\n        <_>\n          6 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 2 3 -1.</_>\n        <_>\n          9 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 3 -1.</_>\n        <_>\n          13 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 17 -1.</_>\n        <_>\n          16 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 2 -1.</_>\n        <_>\n          6 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 9 1 -1.</_>\n        <_>\n          5 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 3 -1.</_>\n        <_>\n          9 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 6 3 -1.</_>\n        <_>\n          7 12 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 3 2 -1.</_>\n        <_>\n          0 7 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 1 -1.</_>\n        <_>\n          9 0 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 3 -1.</_>\n        <_>\n          9 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 17 6 -1.</_>\n        <_>\n          2 16 17 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 3 7 -1.</_>\n        <_>\n          2 3 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 4 -1.</_>\n        <_>\n          3 1 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 5 -1.</_>\n        <_>\n          14 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 3 2 -1.</_>\n        <_>\n          13 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 5 -1.</_>\n        <_>\n          3 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 2 6 -1.</_>\n        <_>\n          2 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 2 -1.</_>\n        <_>\n          9 11 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 1 -1.</_>\n        <_>\n          7 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 12 -1.</_>\n        <_>\n          8 6 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 2 -1.</_>\n        <_>\n          12 12 1 1 2.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 2 -1.</_>\n        <_>\n          5 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 1 3 -1.</_>\n        <_>\n          5 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 16 4 -1.</_>\n        <_>\n          11 11 8 2 2.</_>\n        <_>\n          3 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 3 -1.</_>\n        <_>\n          0 11 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 16 4 -1.</_>\n        <_>\n          1 11 8 2 2.</_>\n        <_>\n          9 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 2 -1.</_>\n        <_>\n          4 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 2 2 -1.</_>\n        <_>\n          13 6 1 1 2.</_>\n        <_>\n          12 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 6 -1.</_>\n        <_>\n          12 13 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 2 -1.</_>\n        <_>\n          6 6 1 1 2.</_>\n        <_>\n          7 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 16 -1.</_>\n        <_>\n          8 4 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 3 2 -1.</_>\n        <_>\n          11 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 2 -1.</_>\n        <_>\n          12 17 3 1 2.</_>\n        <_>\n          9 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 5 2 -1.</_>\n        <_>\n          2 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 2 2 -1.</_>\n        <_>\n          3 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 3 -1.</_>\n        <_>\n          10 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 6 -1.</_>\n        <_>\n          9 6 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 7 6 -1.</_>\n        <_>\n          1 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 2 11 -1.</_>\n        <_>\n          9 1 1 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 4 -1.</_>\n        <_>\n          9 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 1 -1.</_>\n        <_>\n          11 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 9 -1.</_>\n        <_>\n          1 3 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 6 -1.</_>\n        <_>\n          0 5 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 2 -1.</_>\n        <_>\n          12 15 1 1 2.</_>\n        <_>\n          11 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 2 2 -1.</_>\n        <_>\n          12 14 1 1 2.</_>\n        <_>\n          11 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 2 -1.</_>\n        <_>\n          7 15 1 1 2.</_>\n        <_>\n          8 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 2 2 -1.</_>\n        <_>\n          7 14 1 1 2.</_>\n        <_>\n          8 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 6 -1.</_>\n        <_>\n          10 13 2 3 2.</_>\n        <_>\n          8 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 16 4 -1.</_>\n        <_>\n          10 14 8 2 2.</_>\n        <_>\n          2 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 2 -1.</_>\n        <_>\n          9 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 5 3 -1.</_>\n        <_>\n          7 8 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 2 -1.</_>\n        <_>\n          9 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 18 -1.</_>\n        <_>\n          11 1 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 4 -1.</_>\n        <_>\n          9 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 4 -1.</_>\n        <_>\n          8 5 1 2 2.</_>\n        <_>\n          9 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 6 -1.</_>\n        <_>\n          10 13 1 3 2.</_>\n        <_>\n          9 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 18 -1.</_>\n        <_>\n          12 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 18 -1.</_>\n        <_>\n          7 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 4 2 -1.</_>\n        <_>\n          7 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 1 -1.</_>\n        <_>\n          7 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 4 -1.</_>\n        <_>\n          10 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 2 -1.</_>\n        <_>\n          8 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 1 -1.</_>\n        <_>\n          0 7 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 5 4 -1.</_>\n        <_>\n          11 5 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 1 -1.</_>\n        <_>\n          10 7 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 3 -1.</_>\n        <_>\n          8 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 8 -1.</_>\n        <_>\n          10 0 8 4 2.</_>\n        <_>\n          2 4 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 10 -1.</_>\n        <_>\n          11 5 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 18 -1.</_>\n        <_>\n          4 2 4 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 6 -1.</_>\n        <_>\n          0 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 2 -1.</_>\n        <_>\n          6 1 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 2 -1.</_>\n        <_>\n          4 2 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 14 -1.</_>\n        <_>\n          2 8 16 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 12 -1.</_>\n        <_>\n          5 7 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 2 2 -1.</_>\n        <_>\n          9 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 5 6 -1.</_>\n        <_>\n          9 12 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 8 -1.</_>\n        <_>\n          3 4 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 5 8 -1.</_>\n        <_>\n          6 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 3 -1.</_>\n        <_>\n          9 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 3 -1.</_>\n        <_>\n          6 9 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 7 6 -1.</_>\n        <_>\n          2 5 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 14 4 -1.</_>\n        <_>\n          2 1 7 2 2.</_>\n        <_>\n          9 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 1 3 -1.</_>\n        <_>\n          11 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 2 -1.</_>\n        <_>\n          6 16 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 1 3 -1.</_>\n        <_>\n          8 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 2 8 -1.</_>\n        <_>\n          8 15 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 2 -1.</_>\n        <_>\n          6 16 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 8 3 -1.</_>\n        <_>\n          7 17 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 2 -1.</_>\n        <_>\n          0 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 8 4 -1.</_>\n        <_>\n          1 16 4 2 2.</_>\n        <_>\n          5 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 3 -1.</_>\n        <_>\n          2 10 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 4 -1.</_>\n        <_>\n          13 11 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 16 6 -1.</_>\n        <_>\n          0 15 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 4 -1.</_>\n        <_>\n          6 11 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 18 -1.</_>\n        <_>\n          19 2 1 9 2.</_>\n        <_>\n          18 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 7 1 9 -1.</_>\n        <_>\n          19 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 18 -1.</_>\n        <_>\n          0 2 1 9 2.</_>\n        <_>\n          1 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 1 9 -1.</_>\n        <_>\n          0 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 2 -1.</_>\n        <_>\n          14 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 2 3 -1.</_>\n        <_>\n          11 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 2 -1.</_>\n        <_>\n          7 9 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 6 -1.</_>\n        <_>\n          7 12 2 3 2.</_>\n        <_>\n          9 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 5 3 -1.</_>\n        <_>\n          8 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 2 2 -1.</_>\n        <_>\n          13 14 1 1 2.</_>\n        <_>\n          12 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 5 2 -1.</_>\n        <_>\n          7 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 4 -1.</_>\n        <_>\n          10 10 8 2 2.</_>\n        <_>\n          2 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 6 -1.</_>\n        <_>\n          9 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 3 -1.</_>\n        <_>\n          7 2 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 2 -1.</_>\n        <_>\n          0 13 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 11 2 -1.</_>\n        <_>\n          6 4 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 6 -1.</_>\n        <_>\n          16 0 4 3 2.</_>\n        <_>\n          12 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 1 2 -1.</_>\n        <_>\n          8 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 1 12 -1.</_>\n        <_>\n          8 12 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 13 -1.</_>\n        <_>\n          13 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 2 -1.</_>\n        <_>\n          7 11 1 1 2.</_>\n        <_>\n          8 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 1 3 -1.</_>\n        <_>\n          3 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 3 2 -1.</_>\n        <_>\n          11 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 1 -1.</_>\n        <_>\n          11 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 5 9 -1.</_>\n        <_>\n          1 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 4 -1.</_>\n        <_>\n          6 8 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 1 4 -1.</_>\n        <_>\n          13 14 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 4 14 -1.</_>\n        <_>\n          13 3 2 7 2.</_>\n        <_>\n          11 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 1 4 -1.</_>\n        <_>\n          6 14 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 14 -1.</_>\n        <_>\n          5 3 2 7 2.</_>\n        <_>\n          7 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 3 2 -1.</_>\n        <_>\n          11 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          9 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 12 6 -1.</_>\n        <_>\n          2 2 6 3 2.</_>\n        <_>\n          8 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 2 -1.</_>\n        <_>\n          9 6 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 12 -1.</_>\n        <_>\n          7 0 6 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 4 -1.</_>\n        <_>\n          5 7 3 2 2.</_>\n        <_>\n          8 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 4 -1.</_>\n        <_>\n          5 9 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 4 -1.</_>\n        <_>\n          9 7 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 2 -1.</_>\n        <_>\n          9 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 8 3 -1.</_>\n        <_>\n          6 18 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 2 -1.</_>\n        <_>\n          12 17 3 1 2.</_>\n        <_>\n          9 18 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 2 -1.</_>\n        <_>\n          4 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 9 2 -1.</_>\n        <_>\n          3 13 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 1 -1.</_>\n        <_>\n          10 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 6 -1.</_>\n        <_>\n          11 3 2 3 2.</_>\n        <_>\n          9 6 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 5 -1.</_>\n        <_>\n          3 3 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 18 -1.</_>\n        <_>\n          2 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 4 9 -1.</_>\n        <_>\n          14 5 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 3 2 -1.</_>\n        <_>\n          11 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 4 9 -1.</_>\n        <_>\n          2 5 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 3 2 -1.</_>\n        <_>\n          8 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 3 3 -1.</_>\n        <_>\n          10 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 6 -1.</_>\n        <_>\n          10 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 6 -1.</_>\n        <_>\n          7 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 2 -1.</_>\n        <_>\n          3 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 7 3 -1.</_>\n        <_>\n          8 5 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 3 -1.</_>\n        <_>\n          13 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 2 12 -1.</_>\n        <_>\n          8 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 8 14 -1.</_>\n        <_>\n          5 4 4 7 2.</_>\n        <_>\n          9 11 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 8 -1.</_>\n        <_>\n          10 1 10 4 2.</_>\n        <_>\n          0 5 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 2 -1.</_>\n        <_>\n          4 1 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 8 -1.</_>\n        <_>\n          0 1 10 4 2.</_>\n        <_>\n          10 5 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 2 -1.</_>\n        <_>\n          4 1 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 3 -1.</_>\n        <_>\n          9 5 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 10 6 -1.</_>\n        <_>\n          8 15 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 3 -1.</_>\n        <_>\n          8 5 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 1 -1.</_>\n        <_>\n          8 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 9 2 -1.</_>\n        <_>\n          14 18 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 7 -1.</_>\n        <_>\n          13 11 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 10 -1.</_>\n        <_>\n          4 6 6 5 2.</_>\n        <_>\n          10 11 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 3 -1.</_>\n        <_>\n          9 17 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 9 2 -1.</_>\n        <_>\n          14 18 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 8 -1.</_>\n        <_>\n          13 11 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 2 2 -1.</_>\n        <_>\n          4 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 4 4 -1.</_>\n        <_>\n          7 17 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 3 -1.</_>\n        <_>\n          13 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 1 -1.</_>\n        <_>\n          7 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 1 -1.</_>\n        <_>\n          8 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 4 -1.</_>\n        <_>\n          0 14 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 2 -1.</_>\n        <_>\n          10 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 3 -1.</_>\n        <_>\n          5 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 2 12 -1.</_>\n        <_>\n          10 8 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 3 -1.</_>\n        <_>\n          0 4 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 2 3 -1.</_>\n        <_>\n          1 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 11 -1.</_>\n        <_>\n          16 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 16 -1.</_>\n        <_>\n          19 2 1 8 2.</_>\n        <_>\n          18 10 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 12 -1.</_>\n        <_>\n          3 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 2 -1.</_>\n        <_>\n          7 2 3 1 2.</_>\n        <_>\n          10 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 8 2 -1.</_>\n        <_>\n          16 4 4 1 2.</_>\n        <_>\n          12 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 2 -1.</_>\n        <_>\n          12 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 8 2 -1.</_>\n        <_>\n          0 4 4 1 2.</_>\n        <_>\n          4 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 3 5 -1.</_>\n        <_>\n          2 3 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 6 -1.</_>\n        <_>\n          16 5 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 3 -1.</_>\n        <_>\n          8 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 1 3 -1.</_>\n        <_>\n          8 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 1 2 -1.</_>\n        <_>\n          4 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 3 -1.</_>\n        <_>\n          8 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 7 3 -1.</_>\n        <_>\n          7 16 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 8 -1.</_>\n        <_>\n          9 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 2 -1.</_>\n        <_>\n          6 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 2 -1.</_>\n        <_>\n          12 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 13 10 -1.</_>\n        <_>\n          5 8 13 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 2 -1.</_>\n        <_>\n          4 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 16 2 -1.</_>\n        <_>\n          0 8 8 1 2.</_>\n        <_>\n          8 9 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 2 5 -1.</_>\n        <_>\n          11 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 13 -1.</_>\n        <_>\n          10 0 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 2 -1.</_>\n        <_>\n          1 7 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 2 1 -1.</_>\n        <_>\n          5 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 2 5 -1.</_>\n        <_>\n          11 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 8 -1.</_>\n        <_>\n          12 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 5 -1.</_>\n        <_>\n          8 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 8 -1.</_>\n        <_>\n          6 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 12 -1.</_>\n        <_>\n          9 7 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 2 3 -1.</_>\n        <_>\n          11 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          10 10 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 8 -1.</_>\n        <_>\n          8 11 2 4 2.</_>\n        <_>\n          10 15 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 11 -1.</_>\n        <_>\n          16 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 4 -1.</_>\n        <_>\n          18 2 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 2 -1.</_>\n        <_>\n          5 6 3 1 2.</_>\n        <_>\n          8 7 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 1 3 -1.</_>\n        <_>\n          5 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 14 -1.</_>\n        <_>\n          11 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 3 -1.</_>\n        <_>\n          8 2 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 14 -1.</_>\n        <_>\n          7 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 2 -1.</_>\n        <_>\n          9 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 4 -1.</_>\n        <_>\n          8 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 10 -1.</_>\n        <_>\n          9 10 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 4 -1.</_>\n        <_>\n          9 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 9 11 -1.</_>\n        <_>\n          8 5 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 3 5 -1.</_>\n        <_>\n          11 6 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 5 -1.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 5 -1.</_>\n        <_>\n          8 6 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 3 -1.</_>\n        <_>\n          9 10 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 7 -1.</_>\n        <_>\n          11 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 12 -1.</_>\n        <_>\n          0 9 20 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 1 -1.</_>\n        <_>\n          7 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 3 2 -1.</_>\n        <_>\n          13 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 6 -1.</_>\n        <_>\n          16 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 3 -1.</_>\n        <_>\n          7 16 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 7 3 -1.</_>\n        <_>\n          6 17 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 9 6 -1.</_>\n        <_>\n          11 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 14 1 3 -1.</_>\n        <_>\n          19 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 6 -1.</_>\n        <_>\n          3 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 9 1 -1.</_>\n        <_>\n          3 19 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 9 6 -1.</_>\n        <_>\n          11 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 6 -1.</_>\n        <_>\n          12 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 8 6 -1.</_>\n        <_>\n          1 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 2 -1.</_>\n        <_>\n          9 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 4 -1.</_>\n        <_>\n          18 2 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 3 -1.</_>\n        <_>\n          16 0 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 4 -1.</_>\n        <_>\n          1 2 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 3 -1.</_>\n        <_>\n          2 0 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 2 -1.</_>\n        <_>\n          10 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 2 2 -1.</_>\n        <_>\n          12 1 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 2 -1.</_>\n        <_>\n          9 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 2 2 -1.</_>\n        <_>\n          7 1 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 3 -1.</_>\n        <_>\n          10 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 6 2 -1.</_>\n        <_>\n          13 16 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 2 2 -1.</_>\n        <_>\n          8 12 1 1 2.</_>\n        <_>\n          9 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 3 5 -1.</_>\n        <_>\n          9 15 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 12 -1.</_>\n        <_>\n          8 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 7 8 -1.</_>\n        <_>\n          7 10 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 2 -1.</_>\n        <_>\n          0 12 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 2 2 -1.</_>\n        <_>\n          8 11 1 1 2.</_>\n        <_>\n          9 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 1 -1.</_>\n        <_>\n          11 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 2 -1.</_>\n        <_>\n          11 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 1 -1.</_>\n        <_>\n          5 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 2 -1.</_>\n        <_>\n          6 5 4 1 2.</_>\n        <_>\n          10 6 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 10 -1.</_>\n        <_>\n          10 10 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 4 -1.</_>\n        <_>\n          16 0 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 10 -1.</_>\n        <_>\n          9 10 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 2 3 -1.</_>\n        <_>\n          9 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 2 -1.</_>\n        <_>\n          10 9 2 1 2.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 6 -1.</_>\n        <_>\n          12 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 1 -1.</_>\n        <_>\n          7 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 4 -1.</_>\n        <_>\n          3 0 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 6 -1.</_>\n        <_>\n          12 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 10 -1.</_>\n        <_>\n          1 0 3 5 2.</_>\n        <_>\n          4 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 2 9 -1.</_>\n        <_>\n          3 3 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 3 2 -1.</_>\n        <_>\n          14 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 3 2 -1.</_>\n        <_>\n          15 3 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 5 2 -1.</_>\n        <_>\n          2 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 12 10 -1.</_>\n        <_>\n          3 4 6 5 2.</_>\n        <_>\n          9 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 14 6 -1.</_>\n        <_>\n          5 3 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 3 2 -1.</_>\n        <_>\n          15 4 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 2 -1.</_>\n        <_>\n          7 11 1 1 2.</_>\n        <_>\n          8 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 6 6 -1.</_>\n        <_>\n          2 16 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 8 3 -1.</_>\n        <_>\n          6 14 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 18 1 -1.</_>\n        <_>\n          7 19 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 1 6 -1.</_>\n        <_>\n          8 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 15 -1.</_>\n        <_>\n          0 5 14 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 8 -1.</_>\n        <_>\n          3 4 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 12 -1.</_>\n        <_>\n          6 7 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 3 -1.</_>\n        <_>\n          6 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 4 -1.</_>\n        <_>\n          6 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 4 6 -1.</_>\n        <_>\n          17 14 2 3 2.</_>\n        <_>\n          15 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 8 -1.</_>\n        <_>\n          15 11 3 4 2.</_>\n        <_>\n          12 15 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 4 -1.</_>\n        <_>\n          9 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 1 -1.</_>\n        <_>\n          7 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 2 14 -1.</_>\n        <_>\n          12 3 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 2 -1.</_>\n        <_>\n          15 11 3 1 2.</_>\n        <_>\n          12 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 2 -1.</_>\n        <_>\n          0 3 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 1 -1.</_>\n        <_>\n          5 0 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 2 -1.</_>\n        <_>\n          15 11 3 1 2.</_>\n        <_>\n          12 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 2 2 -1.</_>\n        <_>\n          10 5 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 10 -1.</_>\n        <_>\n          9 0 1 5 2.</_>\n        <_>\n          10 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 2 2 -1.</_>\n        <_>\n          18 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 4 9 -1.</_>\n        <_>\n          13 14 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 2 2 -1.</_>\n        <_>\n          8 13 1 1 2.</_>\n        <_>\n          9 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 3 -1.</_>\n        <_>\n          7 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 2 -1.</_>\n        <_>\n          8 10 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 4 2 -1.</_>\n        <_>\n          13 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 2 2 -1.</_>\n        <_>\n          6 14 1 1 2.</_>\n        <_>\n          7 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 2 2 -1.</_>\n        <_>\n          0 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 6 -1.</_>\n        <_>\n          7 11 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 4 -1.</_>\n        <_>\n          6 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 11 -1.</_>\n        <_>\n          10 9 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 4 3 -1.</_>\n        <_>\n          9 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 3 17 -1.</_>\n        <_>\n          3 3 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 3 -1.</_>\n        <_>\n          0 12 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 11 9 -1.</_>\n        <_>\n          4 6 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 11 -1.</_>\n        <_>\n          3 2 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 5 -1.</_>\n        <_>\n          13 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 4 -1.</_>\n        <_>\n          12 7 3 2 2.</_>\n        <_>\n          9 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 2 -1.</_>\n        <_>\n          9 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 1 -1.</_>\n        <_>\n          6 8 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 2 -1.</_>\n        <_>\n          8 12 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 10 -1.</_>\n        <_>\n          15 0 2 5 2.</_>\n        <_>\n          13 5 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 2 -1.</_>\n        <_>\n          6 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 4 3 -1.</_>\n        <_>\n          8 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 9 2 -1.</_>\n        <_>\n          11 3 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 9 2 -1.</_>\n        <_>\n          6 3 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 14 -1.</_>\n        <_>\n          8 0 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 7 10 -1.</_>\n        <_>\n          7 8 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 13 3 -1.</_>\n        <_>\n          4 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 14 4 -1.</_>\n        <_>\n          3 12 7 2 2.</_>\n        <_>\n          10 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 2 -1.</_>\n        <_>\n          8 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 8 -1.</_>\n        <_>\n          6 14 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 8 -1.</_>\n        <_>\n          9 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 3 -1.</_>\n        <_>\n          8 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 10 -1.</_>\n        <_>\n          7 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 3 3 -1.</_>\n        <_>\n          14 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 13 3 -1.</_>\n        <_>\n          4 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 3 3 -1.</_>\n        <_>\n          3 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 4 2 -1.</_>\n        <_>\n          3 9 2 1 2.</_>\n        <_>\n          5 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 4 -1.</_>\n        <_>\n          10 11 10 2 2.</_>\n        <_>\n          0 13 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 4 -1.</_>\n        <_>\n          0 11 10 2 2.</_>\n        <_>\n          10 13 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 1 6 -1.</_>\n        <_>\n          10 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 2 -1.</_>\n        <_>\n          11 1 9 1 2.</_>\n        <_>\n          2 2 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 3 3 -1.</_>\n        <_>\n          8 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 1 -1.</_>\n        <_>\n          6 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 1 3 -1.</_>\n        <_>\n          11 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 12 -1.</_>\n        <_>\n          13 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 6 -1.</_>\n        <_>\n          1 16 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 1 3 -1.</_>\n        <_>\n          8 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          7 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 2 -1.</_>\n        <_>\n          9 11 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 3 -1.</_>\n        <_>\n          6 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 5 -1.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 14 -1.</_>\n        <_>\n          7 12 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 2 -1.</_>\n        <_>\n          9 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 12 -1.</_>\n        <_>\n          1 2 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 5 3 -1.</_>\n        <_>\n          1 1 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 3 -1.</_>\n        <_>\n          12 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 3 -1.</_>\n        <_>\n          5 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 3 -1.</_>\n        <_>\n          5 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          10 12 2 4 2.</_>\n        <_>\n          8 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 2 -1.</_>\n        <_>\n          11 17 9 1 2.</_>\n        <_>\n          2 18 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 2 -1.</_>\n        <_>\n          9 4 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 6 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 6 -1.</_>\n        <_>\n          9 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 8 -1.</_>\n        <_>\n          2 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 9 -1.</_>\n        <_>\n          2 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 2 -1.</_>\n        <_>\n          7 4 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 12 4 -1.</_>\n        <_>\n          14 16 6 2 2.</_>\n        <_>\n          8 18 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 2 -1.</_>\n        <_>\n          0 0 9 1 2.</_>\n        <_>\n          9 1 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 18 -1.</_>\n        <_>\n          4 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 4 7 -1.</_>\n        <_>\n          14 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 2 2 -1.</_>\n        <_>\n          15 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 4 7 -1.</_>\n        <_>\n          4 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 2 2 -1.</_>\n        <_>\n          3 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 6 -1.</_>\n        <_>\n          11 2 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 6 -1.</_>\n        <_>\n          15 0 1 3 2.</_>\n        <_>\n          14 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 2 -1.</_>\n        <_>\n          7 11 1 1 2.</_>\n        <_>\n          8 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 2 -1.</_>\n        <_>\n          8 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 6 -1.</_>\n        <_>\n          9 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 4 2 -1.</_>\n        <_>\n          12 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 4 3 -1.</_>\n        <_>\n          8 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 8 2 -1.</_>\n        <_>\n          2 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 3 -1.</_>\n        <_>\n          2 10 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 2 -1.</_>\n        <_>\n          9 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 2 4 -1.</_>\n        <_>\n          5 14 1 2 2.</_>\n        <_>\n          6 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 2 -1.</_>\n        <_>\n          8 9 2 1 2.</_>\n        <_>\n          10 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 5 -1.</_>\n        <_>\n          9 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 2 -1.</_>\n        <_>\n          10 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 2 -1.</_>\n        <_>\n          9 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 6 -1.</_>\n        <_>\n          9 8 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          10 12 2 4 2.</_>\n        <_>\n          8 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 16 2 -1.</_>\n        <_>\n          10 17 8 1 2.</_>\n        <_>\n          2 18 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 8 -1.</_>\n        <_>\n          9 12 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 1 3 -1.</_>\n        <_>\n          3 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 10 6 -1.</_>\n        <_>\n          14 14 5 3 2.</_>\n        <_>\n          9 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 3 6 -1.</_>\n        <_>\n          14 15 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 18 1 -1.</_>\n        <_>\n          7 19 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 15 2 -1.</_>\n        <_>\n          7 10 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 16 3 -1.</_>\n        <_>\n          4 18 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 9 -1.</_>\n        <_>\n          8 9 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 4 -1.</_>\n        <_>\n          9 16 1 2 2.</_>\n        <_>\n          10 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 8 -1.</_>\n        <_>\n          5 9 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 2 -1.</_>\n        <_>\n          13 1 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 6 -1.</_>\n        <_>\n          14 2 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 2 -1.</_>\n        <_>\n          6 7 1 1 2.</_>\n        <_>\n          7 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 1 -1.</_>\n        <_>\n          9 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 3 -1.</_>\n        <_>\n          9 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 3 -1.</_>\n        <_>\n          13 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 3 -1.</_>\n        <_>\n          8 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 3 -1.</_>\n        <_>\n          6 9 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 1 3 -1.</_>\n        <_>\n          10 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 4 -1.</_>\n        <_>\n          10 9 3 2 2.</_>\n        <_>\n          7 11 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 2 -1.</_>\n        <_>\n          4 7 1 1 2.</_>\n        <_>\n          5 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 1 -1.</_>\n        <_>\n          6 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 3 -1.</_>\n        <_>\n          18 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 2 -1.</_>\n        <_>\n          13 1 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 4 2 -1.</_>\n        <_>\n          5 1 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 5 2 -1.</_>\n        <_>\n          3 1 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 4 -1.</_>\n        <_>\n          17 7 3 2 2.</_>\n        <_>\n          14 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 2 -1.</_>\n        <_>\n          4 9 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 5 6 -1.</_>\n        <_>\n          2 13 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 2 4 -1.</_>\n        <_>\n          5 16 1 2 2.</_>\n        <_>\n          6 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 12 -1.</_>\n        <_>\n          16 6 1 6 2.</_>\n        <_>\n          15 12 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 6 16 -1.</_>\n        <_>\n          15 3 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 12 -1.</_>\n        <_>\n          4 5 6 6 2.</_>\n        <_>\n          10 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 13 -1.</_>\n        <_>\n          10 1 5 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 2 2 -1.</_>\n        <_>\n          12 5 1 1 2.</_>\n        <_>\n          11 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 1 3 -1.</_>\n        <_>\n          13 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 4 -1.</_>\n        <_>\n          7 4 1 2 2.</_>\n        <_>\n          8 6 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 4 -1.</_>\n        <_>\n          10 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 6 -1.</_>\n        <_>\n          14 4 2 3 2.</_>\n        <_>\n          12 7 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 6 -1.</_>\n        <_>\n          12 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 6 -1.</_>\n        <_>\n          7 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 2 -1.</_>\n        <_>\n          9 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 2 -1.</_>\n        <_>\n          16 6 1 1 2.</_>\n        <_>\n          15 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 4 4 -1.</_>\n        <_>\n          16 7 2 2 2.</_>\n        <_>\n          14 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 2 -1.</_>\n        <_>\n          7 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 18 1 -1.</_>\n        <_>\n          7 19 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 3 -1.</_>\n        <_>\n          12 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 3 -1.</_>\n        <_>\n          16 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 3 -1.</_>\n        <_>\n          5 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 3 -1.</_>\n        <_>\n          2 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 2 -1.</_>\n        <_>\n          16 6 1 1 2.</_>\n        <_>\n          15 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 1 6 -1.</_>\n        <_>\n          10 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 10 2 -1.</_>\n        <_>\n          0 7 5 1 2.</_>\n        <_>\n          5 8 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 2 -1.</_>\n        <_>\n          3 11 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 4 2 -1.</_>\n        <_>\n          12 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 2 2 -1.</_>\n        <_>\n          13 18 1 1 2.</_>\n        <_>\n          12 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 19 2 1 -1.</_>\n        <_>\n          7 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 16 -1.</_>\n        <_>\n          0 4 1 8 2.</_>\n        <_>\n          1 12 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 9 -1.</_>\n        <_>\n          16 4 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 1 2 -1.</_>\n        <_>\n          10 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 4 6 -1.</_>\n        <_>\n          4 14 2 3 2.</_>\n        <_>\n          6 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 1 4 -1.</_>\n        <_>\n          4 17 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 4 -1.</_>\n        <_>\n          10 2 10 2 2.</_>\n        <_>\n          0 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 2 8 -1.</_>\n        <_>\n          14 9 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 5 -1.</_>\n        <_>\n          7 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 9 6 -1.</_>\n        <_>\n          0 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 11 3 -1.</_>\n        <_>\n          9 15 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 7 3 -1.</_>\n        <_>\n          7 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 2 -1.</_>\n        <_>\n          3 6 1 1 2.</_>\n        <_>\n          4 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 7 -1.</_>\n        <_>\n          7 7 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 1 3 -1.</_>\n        <_>\n          14 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 3 -1.</_>\n        <_>\n          13 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 4 4 -1.</_>\n        <_>\n          2 7 2 2 2.</_>\n        <_>\n          4 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 13 6 -1.</_>\n        <_>\n          2 12 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 4 -1.</_>\n        <_>\n          11 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 5 2 -1.</_>\n        <_>\n          9 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 11 3 -1.</_>\n        <_>\n          0 15 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 2 8 -1.</_>\n        <_>\n          8 15 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 6 -1.</_>\n        <_>\n          5 14 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 15 5 -1.</_>\n        <_>\n          10 13 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 1 10 -1.</_>\n        <_>\n          8 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 6 2 -1.</_>\n        <_>\n          6 14 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 7 3 -1.</_>\n        <_>\n          7 15 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 9 3 -1.</_>\n        <_>\n          7 17 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          8 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 1 6 -1.</_>\n        <_>\n          3 8 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 11 2 -1.</_>\n        <_>\n          6 6 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 2 -1.</_>\n        <_>\n          10 0 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 1 3 -1.</_>\n        <_>\n          5 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 2 -1.</_>\n        <_>\n          9 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 6 -1.</_>\n        <_>\n          10 2 5 3 2.</_>\n        <_>\n          5 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 4 -1.</_>\n        <_>\n          8 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 3 4 -1.</_>\n        <_>\n          9 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 6 -1.</_>\n        <_>\n          9 13 1 3 2.</_>\n        <_>\n          10 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 1 -1.</_>\n        <_>\n          10 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 15 -1.</_>\n        <_>\n          2 10 18 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 2 -1.</_>\n        <_>\n          4 3 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 2 -1.</_>\n        <_>\n          9 6 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 4 3 -1.</_>\n        <_>\n          8 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 3 -1.</_>\n        <_>\n          10 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 4 -1.</_>\n        <_>\n          0 12 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 4 -1.</_>\n        <_>\n          5 7 3 2 2.</_>\n        <_>\n          8 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 2 3 -1.</_>\n        <_>\n          10 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 2 -1.</_>\n        <_>\n          9 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 1 10 -1.</_>\n        <_>\n          4 9 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 4 2 -1.</_>\n        <_>\n          11 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 3 2 -1.</_>\n        <_>\n          12 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 16 6 -1.</_>\n        <_>\n          0 6 8 3 2.</_>\n        <_>\n          8 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 12 -1.</_>\n        <_>\n          7 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 4 2 -1.</_>\n        <_>\n          11 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 3 2 -1.</_>\n        <_>\n          12 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 1 2 -1.</_>\n        <_>\n          8 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 1 3 -1.</_>\n        <_>\n          8 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 4 2 -1.</_>\n        <_>\n          11 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 6 -1.</_>\n        <_>\n          14 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 4 -1.</_>\n        <_>\n          7 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 8 -1.</_>\n        <_>\n          4 0 1 4 2.</_>\n        <_>\n          5 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 9 3 -1.</_>\n        <_>\n          14 17 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 5 -1.</_>\n        <_>\n          16 2 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 2 -1.</_>\n        <_>\n          8 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 9 3 -1.</_>\n        <_>\n          14 17 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 5 -1.</_>\n        <_>\n          16 2 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 9 3 -1.</_>\n        <_>\n          3 17 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 5 -1.</_>\n        <_>\n          2 2 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 9 -1.</_>\n        <_>\n          5 14 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 3 -1.</_>\n        <_>\n          9 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 5 3 -1.</_>\n        <_>\n          3 18 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 7 -1.</_>\n        <_>\n          9 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 5 -1.</_>\n        <_>\n          9 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 2 -1.</_>\n        <_>\n          2 3 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 15 6 -1.</_>\n        <_>\n          7 8 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 5 -1.</_>\n        <_>\n          10 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 6 -1.</_>\n        <_>\n          12 12 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 2 -1.</_>\n        <_>\n          14 4 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 3 -1.</_>\n        <_>\n          5 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 3 -1.</_>\n        <_>\n          4 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 3 3 -1.</_>\n        <_>\n          14 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 11 3 -1.</_>\n        <_>\n          6 13 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 3 6 -1.</_>\n        <_>\n          1 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 7 -1.</_>\n        <_>\n          3 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 4 -1.</_>\n        <_>\n          10 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 2 2 -1.</_>\n        <_>\n          10 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 4 -1.</_>\n        <_>\n          9 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 10 10 -1.</_>\n        <_>\n          4 9 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 2 -1.</_>\n        <_>\n          10 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 2 -1.</_>\n        <_>\n          9 11 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 2 -1.</_>\n        <_>\n          9 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 12 -1.</_>\n        <_>\n          2 4 7 6 2.</_>\n        <_>\n          9 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 1 6 -1.</_>\n        <_>\n          10 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 8 16 -1.</_>\n        <_>\n          11 3 4 8 2.</_>\n        <_>\n          7 11 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 10 -1.</_>\n        <_>\n          5 6 4 5 2.</_>\n        <_>\n          9 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 8 -1.</_>\n        <_>\n          6 2 4 4 2.</_>\n        <_>\n          10 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 2 -1.</_>\n        <_>\n          12 5 2 1 2.</_>\n        <_>\n          10 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 3 -1.</_>\n        <_>\n          12 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 12 1 -1.</_>\n        <_>\n          8 19 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 1 -1.</_>\n        <_>\n          9 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 4 3 -1.</_>\n        <_>\n          13 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          7 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 3 -1.</_>\n        <_>\n          7 16 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 3 2 -1.</_>\n        <_>\n          11 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 3 -1.</_>\n        <_>\n          14 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 6 -1.</_>\n        <_>\n          4 12 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 3 2 -1.</_>\n        <_>\n          4 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 3 -1.</_>\n        <_>\n          9 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 3 2 -1.</_>\n        <_>\n          11 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 3 2 -1.</_>\n        <_>\n          8 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 4 2 -1.</_>\n        <_>\n          1 11 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 6 3 -1.</_>\n        <_>\n          12 5 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 1 3 -1.</_>\n        <_>\n          14 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 3 -1.</_>\n        <_>\n          2 5 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 1 3 -1.</_>\n        <_>\n          5 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 3 3 -1.</_>\n        <_>\n          14 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 3 -1.</_>\n        <_>\n          15 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 4 3 -1.</_>\n        <_>\n          3 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 2 -1.</_>\n        <_>\n          8 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 1 -1.</_>\n        <_>\n          0 0 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 4 -1.</_>\n        <_>\n          10 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 1 -1.</_>\n        <_>\n          10 0 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 4 -1.</_>\n        <_>\n          9 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 19 3 -1.</_>\n        <_>\n          1 7 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 2 -1.</_>\n        <_>\n          12 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 3 -1.</_>\n        <_>\n          7 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 3 -1.</_>\n        <_>\n          8 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 3 -1.</_>\n        <_>\n          2 10 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 12 -1.</_>\n        <_>\n          9 8 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 2 5 -1.</_>\n        <_>\n          8 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 4 3 -1.</_>\n        <_>\n          9 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 4 -1.</_>\n        <_>\n          10 8 3 2 2.</_>\n        <_>\n          7 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 2 -1.</_>\n        <_>\n          10 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 6 -1.</_>\n        <_>\n          7 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 6 -1.</_>\n        <_>\n          10 1 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 2 -1.</_>\n        <_>\n          8 5 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 4 -1.</_>\n        <_>\n          6 2 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 8 2 -1.</_>\n        <_>\n          4 8 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 6 -1.</_>\n        <_>\n          10 6 7 3 2.</_>\n        <_>\n          3 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 3 -1.</_>\n        <_>\n          3 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 2 2 -1.</_>\n        <_>\n          0 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 3 -1.</_>\n        <_>\n          8 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 20 -1.</_>\n        <_>\n          14 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 10 3 -1.</_>\n        <_>\n          10 9 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 20 -1.</_>\n        <_>\n          5 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 10 3 -1.</_>\n        <_>\n          0 9 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 4 -1.</_>\n        <_>\n          13 5 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 4 -1.</_>\n        <_>\n          10 7 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 6 -1.</_>\n        <_>\n          1 14 3 3 2.</_>\n        <_>\n          4 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 6 2 -1.</_>\n        <_>\n          1 18 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 12 -1.</_>\n        <_>\n          17 8 3 6 2.</_>\n        <_>\n          14 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 2 -1.</_>\n        <_>\n          18 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 4 2 -1.</_>\n        <_>\n          3 16 2 1 2.</_>\n        <_>\n          5 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 6 2 -1.</_>\n        <_>\n          4 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 12 -1.</_>\n        <_>\n          17 8 3 6 2.</_>\n        <_>\n          14 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 2 -1.</_>\n        <_>\n          18 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 9 2 -1.</_>\n        <_>\n          8 16 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 6 6 -1.</_>\n        <_>\n          3 14 3 3 2.</_>\n        <_>\n          6 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 12 -1.</_>\n        <_>\n          17 8 3 6 2.</_>\n        <_>\n          14 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 2 12 -1.</_>\n        <_>\n          11 11 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 12 -1.</_>\n        <_>\n          0 8 3 6 2.</_>\n        <_>\n          3 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 2 12 -1.</_>\n        <_>\n          7 11 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 1 2 -1.</_>\n        <_>\n          14 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 8 1 -1.</_>\n        <_>\n          12 13 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 16 6 -1.</_>\n        <_>\n          0 6 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 8 2 -1.</_>\n        <_>\n          1 4 4 1 2.</_>\n        <_>\n          5 5 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 1 2 -1.</_>\n        <_>\n          14 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 3 -1.</_>\n        <_>\n          15 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 3 3 -1.</_>\n        <_>\n          8 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 1 2 -1.</_>\n        <_>\n          5 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 15 -1.</_>\n        <_>\n          14 4 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 2 6 -1.</_>\n        <_>\n          18 3 1 3 2.</_>\n        <_>\n          17 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 15 -1.</_>\n        <_>\n          5 4 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 2 6 -1.</_>\n        <_>\n          1 3 1 3 2.</_>\n        <_>\n          2 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 12 4 -1.</_>\n        <_>\n          7 17 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 19 3 -1.</_>\n        <_>\n          1 1 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 10 2 -1.</_>\n        <_>\n          3 17 5 1 2.</_>\n        <_>\n          8 18 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 10 15 -1.</_>\n        <_>\n          2 10 10 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 4 -1.</_>\n        <_>\n          13 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 13 1 2 -1.</_>\n        <_>\n          19 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 4 -1.</_>\n        <_>\n          4 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 1 2 -1.</_>\n        <_>\n          0 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 12 -1.</_>\n        <_>\n          12 13 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 2 2 -1.</_>\n        <_>\n          15 7 1 1 2.</_>\n        <_>\n          14 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 8 2 -1.</_>\n        <_>\n          5 4 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 6 -1.</_>\n        <_>\n          0 4 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 12 -1.</_>\n        <_>\n          19 2 1 6 2.</_>\n        <_>\n          18 8 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 1 2 -1.</_>\n        <_>\n          18 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 12 -1.</_>\n        <_>\n          0 2 1 6 2.</_>\n        <_>\n          1 8 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 1 2 -1.</_>\n        <_>\n          1 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 14 -1.</_>\n        <_>\n          18 4 2 7 2.</_>\n        <_>\n          16 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 6 -1.</_>\n        <_>\n          10 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 14 -1.</_>\n        <_>\n          0 4 2 7 2.</_>\n        <_>\n          2 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 1 6 -1.</_>\n        <_>\n          9 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 4 3 -1.</_>\n        <_>\n          9 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          8 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 3 -1.</_>\n        <_>\n          0 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 2 -1.</_>\n        <_>\n          4 7 1 1 2.</_>\n        <_>\n          5 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 1 -1.</_>\n        <_>\n          13 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 5 -1.</_>\n        <_>\n          11 4 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 3 -1.</_>\n        <_>\n          5 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 8 1 -1.</_>\n        <_>\n          4 3 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 1 -1.</_>\n        <_>\n          13 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 2 -1.</_>\n        <_>\n          15 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 1 -1.</_>\n        <_>\n          6 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 2 -1.</_>\n        <_>\n          4 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 2 -1.</_>\n        <_>\n          18 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 2 2 -1.</_>\n        <_>\n          13 14 1 1 2.</_>\n        <_>\n          12 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 2 2 -1.</_>\n        <_>\n          0 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 2 2 -1.</_>\n        <_>\n          6 14 1 1 2.</_>\n        <_>\n          7 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 5 -1.</_>\n        <_>\n          9 12 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 5 2 -1.</_>\n        <_>\n          12 18 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 3 -1.</_>\n        <_>\n          4 11 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 3 -1.</_>\n        <_>\n          4 9 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 12 -1.</_>\n        <_>\n          12 13 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 5 3 -1.</_>\n        <_>\n          8 8 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 12 -1.</_>\n        <_>\n          6 13 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 9 18 -1.</_>\n        <_>\n          4 2 3 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 5 2 -1.</_>\n        <_>\n          12 18 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          4 7 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 1 -1.</_>\n        <_>\n          8 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 2 -1.</_>\n        <_>\n          8 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 1 -1.</_>\n        <_>\n          10 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 3 1 -1.</_>\n        <_>\n          12 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 1 -1.</_>\n        <_>\n          9 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 1 -1.</_>\n        <_>\n          7 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 6 6 -1.</_>\n        <_>\n          12 15 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 1 6 -1.</_>\n        <_>\n          14 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 6 6 -1.</_>\n        <_>\n          2 15 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 1 -1.</_>\n        <_>\n          7 5 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 2 -1.</_>\n        <_>\n          10 7 6 1 2.</_>\n        <_>\n          4 8 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 10 -1.</_>\n        <_>\n          10 1 4 5 2.</_>\n        <_>\n          6 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 3 -1.</_>\n        <_>\n          3 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 4 3 -1.</_>\n        <_>\n          6 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 4 3 -1.</_>\n        <_>\n          9 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 2 3 -1.</_>\n        <_>\n          12 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 4 3 -1.</_>\n        <_>\n          7 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 1 -1.</_>\n        <_>\n          10 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 5 -1.</_>\n        <_>\n          5 0 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 7 -1.</_>\n        <_>\n          6 6 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 5 -1.</_>\n        <_>\n          10 0 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 7 -1.</_>\n        <_>\n          10 6 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 8 -1.</_>\n        <_>\n          10 9 5 4 2.</_>\n        <_>\n          5 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 10 -1.</_>\n        <_>\n          12 0 2 5 2.</_>\n        <_>\n          10 5 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 8 3 -1.</_>\n        <_>\n          1 5 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 8 3 -1.</_>\n        <_>\n          4 5 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 3 -1.</_>\n        <_>\n          9 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 12 -1.</_>\n        <_>\n          12 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 3 -1.</_>\n        <_>\n          7 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 12 -1.</_>\n        <_>\n          5 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 7 6 -1.</_>\n        <_>\n          10 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 1 -1.</_>\n        <_>\n          8 1 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 8 -1.</_>\n        <_>\n          6 0 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 2 -1.</_>\n        <_>\n          4 8 4 1 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_frontalface_alt_tree.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    Stump-based 20x20 gentle adaboost frontal face detector.\n    This detector uses tree of stage classifiers instead of a cascade\n    Created by Rainer Lienhart.\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's 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   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>20</height>\n  <width>20</width>\n  <stageParams>\n    <maxWeakCount>406</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>47</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>3</maxWeakCount>\n      <stageThreshold>-1.3442519903182983e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 3.7895569112151861e-03</internalNodes>\n          <leafValues>\n            -9.2945802211761475e-01 6.4119851589202881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 1.2098110280930996e-02</internalNodes>\n          <leafValues>\n            -7.1810090541839600e-01 4.7141009569168091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 1.2138449819758534e-03</internalNodes>\n          <leafValues>\n            -7.2831612825393677e-01 3.0330690741539001e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-1.6378560066223145e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 3 8.7510552257299423e-03</internalNodes>\n          <leafValues>\n            -8.5947072505950928e-01 3.6881381273269653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 2.1986700594425201e-02</internalNodes>\n          <leafValues>\n            -6.0180151462554932e-01 3.2897830009460449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 6.4913398819044232e-04</internalNodes>\n          <leafValues>\n            -7.9431951045989990e-01 2.5493299961090088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 -1.0192029876634479e-03</internalNodes>\n          <leafValues>\n            2.2729329764842987e-01 -6.3627982139587402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 1.3674780493602157e-03</internalNodes>\n          <leafValues>\n            -6.0014182329177856e-01 2.4118369817733765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 1.0245250305160880e-03</internalNodes>\n          <leafValues>\n            -5.8542472124099731e-01 1.2550109624862671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 1.8465859815478325e-02</internalNodes>\n          <leafValues>\n            1.9563560187816620e-01 -6.7630231380462646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 4.0901508182287216e-03</internalNodes>\n          <leafValues>\n            -4.4916498661041260e-01 2.6677688956260681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 1.1358099989593029e-02</internalNodes>\n          <leafValues>\n            1.8783229589462280e-01 -6.1379361152648926e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>16</maxWeakCount>\n      <stageThreshold>-1.7317579984664917e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 12 -1.1588949710130692e-02</internalNodes>\n          <leafValues>\n            3.4567040205001831e-01 -7.6478981971740723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 5.1809530705213547e-03</internalNodes>\n          <leafValues>\n            2.4104920029640198e-01 -6.9623559713363647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 2.1468549966812134e-03</internalNodes>\n          <leafValues>\n            -8.0553662776947021e-01 1.9838610291481018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 -3.6556499544531107e-03</internalNodes>\n          <leafValues>\n            -7.1833139657974243e-01 1.2305679917335510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 -1.9701640121638775e-03</internalNodes>\n          <leafValues>\n            2.2777689993381500e-01 -4.7520169615745544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 -3.3645539078861475e-03</internalNodes>\n          <leafValues>\n            -4.6095049381256104e-01 2.0394650101661682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 -7.4126059189438820e-05</internalNodes>\n          <leafValues>\n            1.8213239312171936e-01 -4.7829270362854004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 -1.7571110278367996e-02</internalNodes>\n          <leafValues>\n            -7.1737551689147949e-01 1.1311130225658417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 6.3840472139418125e-03</internalNodes>\n          <leafValues>\n            -4.0205681324005127e-01 2.0730289816856384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 -1.4723399654030800e-02</internalNodes>\n          <leafValues>\n            -6.7558771371841431e-01 6.8973086774349213e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 -5.2889222279191017e-03</internalNodes>\n          <leafValues>\n            -6.2105172872543335e-01 1.3349360227584839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 2.7743630111217499e-02</internalNodes>\n          <leafValues>\n            1.1760850250720978e-01 -5.4641121625900269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 3.9427559822797775e-02</internalNodes>\n          <leafValues>\n            -2.1134279668331146e-01 3.9452999830245972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 8.6949411779642105e-03</internalNodes>\n          <leafValues>\n            1.2580950558185577e-01 -4.7989100217819214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 2.8245279099792242e-03</internalNodes>\n          <leafValues>\n            1.9653140008449554e-01 -4.0256679058074951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 -2.8915189206600189e-02</internalNodes>\n          <leafValues>\n            -8.0616527795791626e-01 8.1882260739803314e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>29</maxWeakCount>\n      <stageThreshold>-1.9308480024337769e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 28 8.0171944573521614e-03</internalNodes>\n          <leafValues>\n            -6.8981552124023438e-01 2.4136860668659210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 -2.4478728882968426e-03</internalNodes>\n          <leafValues>\n            2.1353200078010559e-01 -6.4146691560745239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 1.7917619552463293e-03</internalNodes>\n          <leafValues>\n            -6.1445468664169312e-01 1.9236929714679718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 4.3905500206165016e-04</internalNodes>\n          <leafValues>\n            -7.5360429286956787e-01 1.5696890652179718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 -3.6769549478776753e-04</internalNodes>\n          <leafValues>\n            1.7380510270595551e-01 -5.8404499292373657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -4.2802388779819012e-03</internalNodes>\n          <leafValues>\n            -6.6968989372253418e-01 1.1289729923009872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 3.5238768905401230e-03</internalNodes>\n          <leafValues>\n            1.2501940131187439e-01 -7.3299217224121094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 7.9299701610580087e-04</internalNodes>\n          <leafValues>\n            -4.4966199994087219e-01 2.1590930223464966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 4.4371088733896613e-04</internalNodes>\n          <leafValues>\n            -3.8909769058227539e-01 2.1181149780750275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 -2.7145470958203077e-03</internalNodes>\n          <leafValues>\n            -4.6716868877410889e-01 1.5038399398326874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 -6.9272058317437768e-04</internalNodes>\n          <leafValues>\n            -5.8596551418304443e-01 1.1714380234479904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 4.9261808395385742e-02</internalNodes>\n          <leafValues>\n            -1.3800150156021118e-01 4.9366238713264465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 -2.2837519645690918e-02</internalNodes>\n          <leafValues>\n            -6.3743507862091064e-01 1.2324090301990509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 4.8372112214565277e-03</internalNodes>\n          <leafValues>\n            -1.2391629815101624e-01 1.0620889812707901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 1.0256259702146053e-02</internalNodes>\n          <leafValues>\n            -1.8767049908638000e-01 2.9824170470237732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 1.0618680156767368e-02</internalNodes>\n          <leafValues>\n            1.0612460225820541e-01 -3.3244881033897400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 2.4113139137625694e-02</internalNodes>\n          <leafValues>\n            8.7200611829757690e-02 -6.6846621036529541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 -3.6754710599780083e-03</internalNodes>\n          <leafValues>\n            1.1043280363082886e-01 -4.4581958651542664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 -3.8996201008558273e-02</internalNodes>\n          <leafValues>\n            -7.0228111743927002e-01 8.1809490919113159e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 1.5777100343257189e-03</internalNodes>\n          <leafValues>\n            1.5954199433326721e-01 -3.2860770821571350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 9.1089410707354546e-03</internalNodes>\n          <leafValues>\n            1.0326369851827621e-01 -4.4402560591697693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 -1.7051609233021736e-02</internalNodes>\n          <leafValues>\n            -5.5853348970413208e-01 6.2711499631404877e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 1.3652660418301821e-03</internalNodes>\n          <leafValues>\n            -5.3934460878372192e-01 7.0839896798133850e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 -1.1186149902641773e-02</internalNodes>\n          <leafValues>\n            -4.7260180115699768e-01 8.1019416451454163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 -1.1705270037055016e-02</internalNodes>\n          <leafValues>\n            2.4750089645385742e-01 -1.7778989672660828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 -9.7736932337284088e-02</internalNodes>\n          <leafValues>\n            -5.6177508831024170e-01 8.0921821296215057e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 -8.5228063166141510e-02</internalNodes>\n          <leafValues>\n            -5.2233248949050903e-01 7.2821393609046936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 -3.6733459681272507e-02</internalNodes>\n          <leafValues>\n            4.3623578548431396e-01 -9.9339507520198822e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 -3.6704430822283030e-03</internalNodes>\n          <leafValues>\n            1.4834220707416534e-01 -2.7119669318199158e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>36</maxWeakCount>\n      <stageThreshold>-2.0711259841918945e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 57 -1.1610370129346848e-03</internalNodes>\n          <leafValues>\n            -5.6377887725830078e-01 2.3568780720233917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 1.1830299627035856e-03</internalNodes>\n          <leafValues>\n            1.5724280476570129e-01 -6.7728179693222046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 -2.1273950114846230e-03</internalNodes>\n          <leafValues>\n            -6.6150152683258057e-01 1.4943139255046844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 -1.1893469840288162e-01</internalNodes>\n          <leafValues>\n            5.3225821256637573e-01 -2.2968369722366333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 -1.3624870218336582e-02</internalNodes>\n          <leafValues>\n            -6.0635501146316528e-01 1.7001089453697205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 -6.3198682619258761e-04</internalNodes>\n          <leafValues>\n            -6.8972241878509521e-01 1.1584629863500595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 -4.4108428992331028e-03</internalNodes>\n          <leafValues>\n            -6.2967002391815186e-01 1.2430600076913834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 -2.2982239723205566e-02</internalNodes>\n          <leafValues>\n            -5.0497251749038696e-01 1.6636120155453682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 -2.3721898905932903e-03</internalNodes>\n          <leafValues>\n            -6.2462240457534790e-01 1.3793750107288361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 8.7364763021469116e-03</internalNodes>\n          <leafValues>\n            1.3996620476245880e-01 -5.4822951555252075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 6.7737072706222534e-02</internalNodes>\n          <leafValues>\n            -1.9172480702400208e-01 5.4700487852096558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -4.0138149634003639e-03</internalNodes>\n          <leafValues>\n            -5.5429118871688843e-01 1.4517059922218323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 1.2857170077040792e-04</internalNodes>\n          <leafValues>\n            -5.1031237840652466e-01 1.1023940145969391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 -3.9688948541879654e-02</internalNodes>\n          <leafValues>\n            -6.1830729246139526e-01 9.6676096320152283e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 -1.6646150033921003e-03</internalNodes>\n          <leafValues>\n            1.6449889540672302e-01 -3.7186318635940552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 5.3499247878789902e-03</internalNodes>\n          <leafValues>\n            1.1145050078630447e-01 -3.7441021203994751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 -2.2904010489583015e-02</internalNodes>\n          <leafValues>\n            -5.8097589015960693e-01 1.1077260226011276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 1.0703450068831444e-02</internalNodes>\n          <leafValues>\n            4.4733259826898575e-02 -5.8116632699966431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 -4.2331559234298766e-04</internalNodes>\n          <leafValues>\n            -5.4423791170120239e-01 8.7089292705059052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 1.5554429963231087e-02</internalNodes>\n          <leafValues>\n            5.6884340941905975e-02 -3.7645170092582703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 -2.0539449527859688e-02</internalNodes>\n          <leafValues>\n            -3.8714569807052612e-01 1.1833839863538742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 -3.1234358903020620e-03</internalNodes>\n          <leafValues>\n            8.3635427057743073e-02 -1.9862389564514160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 2.3932829499244690e-02</internalNodes>\n          <leafValues>\n            7.9600542783737183e-02 -6.5370100736618042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 8.3920456469058990e-02</internalNodes>\n          <leafValues>\n            -1.0653129965066910e-01 4.8772820830345154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 1.6003159806132317e-02</internalNodes>\n          <leafValues>\n            8.3643212914466858e-02 -5.9207731485366821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 5.8071441017091274e-03</internalNodes>\n          <leafValues>\n            8.7997503578662872e-02 -3.3279138803482056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 -8.1104427576065063e-02</internalNodes>\n          <leafValues>\n            6.3775187730789185e-01 -6.7692361772060394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 4.5403029769659042e-02</internalNodes>\n          <leafValues>\n            -5.1510389894247055e-02 3.0225670337677002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 1.3877229765057564e-02</internalNodes>\n          <leafValues>\n            9.9967628717422485e-02 -4.6520909667015076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 3.4590709954500198e-02</internalNodes>\n          <leafValues>\n            -9.7614437341690063e-02 3.4678751230239868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 1.5704549849033356e-02</internalNodes>\n          <leafValues>\n            7.6344117522239685e-02 -5.3356319665908813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 -1.0420549660921097e-01</internalNodes>\n          <leafValues>\n            6.1890971660614014e-01 -4.4259760528802872e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 1.3443189859390259e-01</internalNodes>\n          <leafValues>\n            -5.9853021055459976e-02 6.3635712862014771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 -2.5646309368312359e-03</internalNodes>\n          <leafValues>\n            -5.3600472211837769e-01 7.3116026818752289e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 1.8647089600563049e-02</internalNodes>\n          <leafValues>\n            6.9856151938438416e-02 -5.6878322362899780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 1.5159539878368378e-02</internalNodes>\n          <leafValues>\n            1.8206339329481125e-02 -2.7663159370422363e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>7</maxWeakCount>\n      <stageThreshold>-2.1360809803009033e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 93 1.4778429269790649e-01</internalNodes>\n          <leafValues>\n            -8.9933121204376221e-01 5.7035928964614868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 2.9984670877456665e-01</internalNodes>\n          <leafValues>\n            -6.5394151210784912e-01 3.5054451227188110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 -7.9061716794967651e-02</internalNodes>\n          <leafValues>\n            4.4085291028022766e-01 -6.5087568759918213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 5.8428961783647537e-02</internalNodes>\n          <leafValues>\n            -4.2665359377861023e-01 5.8410567045211792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -1.4664280228316784e-02</internalNodes>\n          <leafValues>\n            3.2435241341590881e-01 -5.9659618139266968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 3.9517199993133545e-01</internalNodes>\n          <leafValues>\n            -7.5798347592353821e-02 4.8659950494766235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 1.1040589958429337e-01</internalNodes>\n          <leafValues>\n            -8.4556102752685547e-01 2.1374569833278656e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>50</maxWeakCount>\n      <stageThreshold>-1.8755869865417480e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 100 3.7777079269289970e-03</internalNodes>\n          <leafValues>\n            1.8744400143623352e-01 -6.5354061126708984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 5.3003188222646713e-03</internalNodes>\n          <leafValues>\n            9.3951843678951263e-02 -5.6917887926101685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 -5.5426009930670261e-03</internalNodes>\n          <leafValues>\n            1.6031709313392639e-01 -5.1822239160537720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 -9.1971885412931442e-03</internalNodes>\n          <leafValues>\n            -5.7420462369918823e-01 1.4791400730609894e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 5.3701602155342698e-04</internalNodes>\n          <leafValues>\n            -7.0449697971343994e-01 1.0752149671316147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 -2.2125479299575090e-03</internalNodes>\n          <leafValues>\n            -5.0877428054809570e-01 1.1367189884185791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 1.1675730347633362e-02</internalNodes>\n          <leafValues>\n            8.4258683025836945e-02 -6.7384701967239380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 -2.0404369570314884e-03</internalNodes>\n          <leafValues>\n            1.6251119971275330e-01 -4.1435649991035461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 -7.6540438458323479e-03</internalNodes>\n          <leafValues>\n            -4.2833179235458374e-01 1.3060709834098816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 2.9370479285717010e-02</internalNodes>\n          <leafValues>\n            5.4651051759719849e-02 -3.4795379638671875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 -9.5828901976346970e-03</internalNodes>\n          <leafValues>\n            -4.8620718717575073e-01 1.1706890165805817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 6.0666278004646301e-03</internalNodes>\n          <leafValues>\n            -3.6553880572319031e-01 8.7813600897789001e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 1.7992249922826886e-03</internalNodes>\n          <leafValues>\n            1.6035990417003632e-01 -3.0859109759330750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 -1.0092309676110744e-02</internalNodes>\n          <leafValues>\n            -3.9505869150161743e-01 1.1514779925346375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 2.5171819142997265e-03</internalNodes>\n          <leafValues>\n            -3.0043110251426697e-01 1.8256050348281860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -1.7089240252971649e-02</internalNodes>\n          <leafValues>\n            -5.2173590660095215e-01 9.7457267343997955e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 -5.5856268852949142e-02</internalNodes>\n          <leafValues>\n            5.3540021181106567e-01 -8.9221552014350891e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 -2.3930610623210669e-03</internalNodes>\n          <leafValues>\n            -4.7012439370155334e-01 8.6141407489776611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 3.6918919067829847e-03</internalNodes>\n          <leafValues>\n            -2.7755591273307800e-01 1.5186099708080292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 2.1945969201624393e-03</internalNodes>\n          <leafValues>\n            -1.6867069900035858e-01 1.1952520161867142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 2.9675459954887629e-03</internalNodes>\n          <leafValues>\n            -3.8940680027008057e-01 1.0388910025358200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 1.9976729527115822e-03</internalNodes>\n          <leafValues>\n            9.1141343116760254e-02 -4.1050049662590027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 -2.0369699224829674e-02</internalNodes>\n          <leafValues>\n            -5.9968769550323486e-01 6.9301806390285492e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 2.3318571038544178e-03</internalNodes>\n          <leafValues>\n            6.1892550438642502e-02 -3.2886800169944763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 -4.2863588780164719e-02</internalNodes>\n          <leafValues>\n            -7.3844969272613525e-01 5.7071659713983536e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 1.1471749749034643e-03</internalNodes>\n          <leafValues>\n            -5.1379621028900146e-01 7.1196496486663818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 -1.3735669665038586e-02</internalNodes>\n          <leafValues>\n            -5.3785508871078491e-01 6.5542042255401611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 4.7165591269731522e-02</internalNodes>\n          <leafValues>\n            4.5389361679553986e-02 -6.8944799900054932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 -1.1204879730939865e-02</internalNodes>\n          <leafValues>\n            1.6932639479637146e-01 -2.3061719536781311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 -1.5478420257568359e-01</internalNodes>\n          <leafValues>\n            -7.7705371379852295e-01 1.2142470106482506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 5.8086342178285122e-03</internalNodes>\n          <leafValues>\n            1.1318100243806839e-01 -3.3206319808959961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 -2.8529569506645203e-02</internalNodes>\n          <leafValues>\n            -5.6747281551361084e-01 4.8734560608863831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 -3.8758948445320129e-02</internalNodes>\n          <leafValues>\n            5.9423100948333740e-01 -7.5139336287975311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 3.1037809327244759e-02</internalNodes>\n          <leafValues>\n            5.1973540335893631e-02 -5.8552652597427368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 7.4786080404010136e-06</internalNodes>\n          <leafValues>\n            -2.7623200416564941e-01 1.4088490605354309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 3.1000260263681412e-02</internalNodes>\n          <leafValues>\n            3.1331729143857956e-02 -5.6860172748565674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 -4.9860659986734390e-02</internalNodes>\n          <leafValues>\n            -8.2924622297286987e-01 3.8801580667495728e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 -4.2323280125856400e-02</internalNodes>\n          <leafValues>\n            -4.3062108755111694e-01 1.6579480841755867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 9.1987219639122486e-04</internalNodes>\n          <leafValues>\n            -2.1154449880123138e-01 1.5517529845237732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 2.0559869706630707e-01</internalNodes>\n          <leafValues>\n            -6.2403179705142975e-02 3.2229611277580261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 2.9118418693542480e-01</internalNodes>\n          <leafValues>\n            3.9228469133377075e-02 -9.4128221273422241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 7.8337509185075760e-03</internalNodes>\n          <leafValues>\n            -1.4806599915027618e-01 1.7849209904670715e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 1.1393319815397263e-02</internalNodes>\n          <leafValues>\n            7.7987723052501678e-02 -4.2424258589744568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 -9.1807022690773010e-02</internalNodes>\n          <leafValues>\n            3.3689481019973755e-01 -5.6174129247665405e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 -1.6038250178098679e-02</internalNodes>\n          <leafValues>\n            -2.4954010546207428e-01 1.4570869505405426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 5.4830290377140045e-02</internalNodes>\n          <leafValues>\n            -1.5496000647544861e-01 2.0329600572586060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 2.4449700489640236e-02</internalNodes>\n          <leafValues>\n            6.0974378138780594e-02 -6.3072341680526733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 2.9260670766234398e-02</internalNodes>\n          <leafValues>\n            4.6833608299493790e-02 -3.7985381484031677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 3.9965552277863026e-03</internalNodes>\n          <leafValues>\n            -1.6927300393581390e-01 1.9100320339202881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 -6.9938853383064270e-02</internalNodes>\n          <leafValues>\n            5.4655587673187256e-01 -5.4965749382972717e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>25</maxWeakCount>\n      <stageThreshold>-1.9646480083465576e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 150 4.5835621654987335e-02</internalNodes>\n          <leafValues>\n            -4.9982848763465881e-01 4.0961080789566040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 2.6363100856542587e-02</internalNodes>\n          <leafValues>\n            -3.9193201065063477e-01 5.1567757129669189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 1.5189830213785172e-02</internalNodes>\n          <leafValues>\n            -5.2216362953186035e-01 3.1368219852447510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 -2.0805280655622482e-02</internalNodes>\n          <leafValues>\n            3.7614479660987854e-01 -4.7375538945198059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 -7.4902721680700779e-03</internalNodes>\n          <leafValues>\n            1.6283489763736725e-01 -7.0384472608566284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 2.7719369530677795e-01</internalNodes>\n          <leafValues>\n            -1.6404120624065399e-01 3.3481580018997192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 6.4188443124294281e-02</internalNodes>\n          <leafValues>\n            -8.0176621675491333e-01 1.2763829529285431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 4.0668170899152756e-02</internalNodes>\n          <leafValues>\n            -3.3386930823326111e-01 2.8456181287765503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 7.4888020753860474e-03</internalNodes>\n          <leafValues>\n            -3.7188920378684998e-01 2.5932261347770691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 6.4942672848701477e-02</internalNodes>\n          <leafValues>\n            1.0372909903526306e-01 -7.1671068668365479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 -2.1149769891053438e-03</internalNodes>\n          <leafValues>\n            -7.5683927536010742e-01 7.9019591212272644e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 -4.8293141298927367e-04</internalNodes>\n          <leafValues>\n            -4.9852079153060913e-01 8.1111326813697815e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 1.3996459543704987e-01</internalNodes>\n          <leafValues>\n            8.7497599422931671e-02 -7.6389372348785400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 5.2211988717317581e-02</internalNodes>\n          <leafValues>\n            3.1640481203794479e-02 -5.3281372785568237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 3.0680459458380938e-03</internalNodes>\n          <leafValues>\n            -6.2458527088165283e-01 1.3869540393352509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 5.0478860735893250e-02</internalNodes>\n          <leafValues>\n            7.9063497483730316e-02 -7.4017041921615601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 -8.5122063755989075e-03</internalNodes>\n          <leafValues>\n            -4.9971660971641541e-01 1.1132259666919708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 7.0091806352138519e-02</internalNodes>\n          <leafValues>\n            9.7081907093524933e-02 -6.1879187822341919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 -2.7261190116405487e-03</internalNodes>\n          <leafValues>\n            9.7546629607677460e-02 -5.7760041952133179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 1.0676559992134571e-02</internalNodes>\n          <leafValues>\n            -2.9058128595352173e-01 1.8426120281219482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 6.3848652644082904e-04</internalNodes>\n          <leafValues>\n            1.3869750499725342e-01 -4.2546540498733521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 -4.7957260161638260e-02</internalNodes>\n          <leafValues>\n            -7.3249137401580811e-01 4.1188109666109085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 1.7140049487352371e-02</internalNodes>\n          <leafValues>\n            -3.1973451375961304e-01 1.6840089857578278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 7.8544542193412781e-02</internalNodes>\n          <leafValues>\n            5.0053231418132782e-02 -7.1410048007965088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 -1.1342849582433701e-02</internalNodes>\n          <leafValues>\n            -3.8810971379280090e-01 1.2976409494876862e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>53</maxWeakCount>\n      <stageThreshold>-2.1222629547119141e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 175 -8.6751781054772437e-05</internalNodes>\n          <leafValues>\n            2.5179910659790039e-01 -6.7723119258880615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 2.0550179481506348e-01</internalNodes>\n          <leafValues>\n            2.0217150449752808e-02 -3.3618199825286865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 1.3893260061740875e-01</internalNodes>\n          <leafValues>\n            1.0678269714117050e-01 -8.6710119247436523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 2.6432450395077467e-03</internalNodes>\n          <leafValues>\n            -4.1057088971138000e-01 2.5603920221328735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 -1.6145260306075215e-03</internalNodes>\n          <leafValues>\n            1.7448160052299500e-01 -5.0290131568908691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 -4.6492749825119972e-03</internalNodes>\n          <leafValues>\n            -8.3960932493209839e-01 1.0409969836473465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 -5.5983918718993664e-03</internalNodes>\n          <leafValues>\n            -5.2673357725143433e-01 1.2114489823579788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 2.1482799202203751e-03</internalNodes>\n          <leafValues>\n            8.6831927299499512e-02 -5.2384740114212036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 -2.2942349314689636e-03</internalNodes>\n          <leafValues>\n            1.5666730701923370e-01 -3.9387580752372742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 -1.0809659725055099e-03</internalNodes>\n          <leafValues>\n            9.4777546823024750e-02 -5.7967597246170044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 -1.8739879131317139e-02</internalNodes>\n          <leafValues>\n            -4.3780770897865295e-01 1.2754319608211517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 -2.0956669468432665e-03</internalNodes>\n          <leafValues>\n            2.1275860071182251e-01 -1.7645539343357086e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 -6.1370119452476501e-02</internalNodes>\n          <leafValues>\n            -6.7007988691329956e-01 8.5291177034378052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -4.5074969530105591e-02</internalNodes>\n          <leafValues>\n            -4.7614151239395142e-01 3.8384389132261276e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 4.5961341820657253e-03</internalNodes>\n          <leafValues>\n            9.0776696801185608e-02 -5.3642177581787109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 -5.6205179542303085e-02</internalNodes>\n          <leafValues>\n            -4.4128128886222839e-01 2.6340639218688011e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 -1.7070030793547630e-02</internalNodes>\n          <leafValues>\n            3.1962528824806213e-01 -1.5699079632759094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 1.3778540305793285e-02</internalNodes>\n          <leafValues>\n            -4.1468238830566406e-01 1.0832040011882782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 5.6932470761239529e-03</internalNodes>\n          <leafValues>\n            1.0973270237445831e-01 -4.1420969367027283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 1.1573060182854533e-03</internalNodes>\n          <leafValues>\n            -4.6996459364891052e-01 1.4088229835033417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 -4.3259391532046720e-05</internalNodes>\n          <leafValues>\n            -5.9117478132247925e-01 7.2208836674690247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 -1.4467669825535268e-04</internalNodes>\n          <leafValues>\n            1.4340500533580780e-01 -2.0809020102024078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 -3.0667539685964584e-02</internalNodes>\n          <leafValues>\n            -6.4181727170944214e-01 7.6316222548484802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 6.4002368599176407e-03</internalNodes>\n          <leafValues>\n            -1.5426200628280640e-01 2.0618820190429688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 2.7318780776113272e-03</internalNodes>\n          <leafValues>\n            -1.8429130315780640e-01 2.2046269476413727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 -4.1759859770536423e-02</internalNodes>\n          <leafValues>\n            5.1284658908843994e-01 -4.3097220361232758e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 -3.0174419283866882e-02</internalNodes>\n          <leafValues>\n            -3.6134809255599976e-01 1.1633390188217163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 6.8081771023571491e-03</internalNodes>\n          <leafValues>\n            -2.5953280925750732e-01 1.4927390217781067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 4.3430369347333908e-02</internalNodes>\n          <leafValues>\n            6.8601243197917938e-02 -5.8221191167831421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 2.1121300756931305e-02</internalNodes>\n          <leafValues>\n            -8.5372917354106903e-02 8.0498583614826202e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 9.9840283393859863e-02</internalNodes>\n          <leafValues>\n            5.3292520344257355e-02 -7.1819657087326050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 5.6953770108520985e-03</internalNodes>\n          <leafValues>\n            -8.8976107537746429e-02 1.3483940064907074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 -5.9984568506479263e-02</internalNodes>\n          <leafValues>\n            6.8324291706085205e-01 -5.1916271448135376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 5.9353262186050415e-03</internalNodes>\n          <leafValues>\n            1.0305190086364746e-01 -2.5361439585685730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 -7.4867930379696190e-05</internalNodes>\n          <leafValues>\n            1.3340729475021362e-01 -2.9323559999465942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -2.5437519070692360e-04</internalNodes>\n          <leafValues>\n            1.5335780382156372e-01 -1.9387570023536682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 7.7576987678185105e-04</internalNodes>\n          <leafValues>\n            -3.1155571341514587e-01 1.0632509738206863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 5.4478500038385391e-02</internalNodes>\n          <leafValues>\n            2.6277480646967888e-02 -6.6687411069869995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 1.2692850083112717e-02</internalNodes>\n          <leafValues>\n            9.3613043427467346e-02 -3.9152190089225769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 -3.0766960233449936e-02</internalNodes>\n          <leafValues>\n            -5.9238088130950928e-01 4.8314999788999557e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 -1.9366150721907616e-02</internalNodes>\n          <leafValues>\n            4.3661609292030334e-01 -8.8672943413257599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 -2.8705620206892490e-03</internalNodes>\n          <leafValues>\n            1.5244780480861664e-01 -1.3861170411109924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 4.0003698319196701e-02</internalNodes>\n          <leafValues>\n            5.8748051524162292e-02 -6.9119709730148315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 -8.1130467355251312e-02</internalNodes>\n          <leafValues>\n            -7.8684318065643311e-01 2.0421498920768499e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 -2.1017501130700111e-03</internalNodes>\n          <leafValues>\n            1.9100449979305267e-01 -1.9659680128097534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 8.6481617763638496e-03</internalNodes>\n          <leafValues>\n            8.8689289987087250e-02 -3.7414151430130005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 -5.2429020404815674e-02</internalNodes>\n          <leafValues>\n            -7.2615998983383179e-01 3.9465688169002533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 3.4464800264686346e-03</internalNodes>\n          <leafValues>\n            -1.1640899628400803e-01 2.7386268973350525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 -7.0581152103841305e-03</internalNodes>\n          <leafValues>\n            -3.6283940076828003e-01 9.2023678123950958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 -5.7412259280681610e-02</internalNodes>\n          <leafValues>\n            -8.8839381933212280e-01 2.6647759601473808e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 3.3479030244052410e-03</internalNodes>\n          <leafValues>\n            -1.4884050190448761e-01 1.8366430699825287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 -5.3958419710397720e-02</internalNodes>\n          <leafValues>\n            3.8098138570785522e-01 -4.4046580791473389e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 -2.5719689205288887e-02</internalNodes>\n          <leafValues>\n            3.2570821046829224e-01 -1.0078220069408417e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>-2.1038460731506348e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 228 1.2441220134496689e-01</internalNodes>\n          <leafValues>\n            -3.8573729991912842e-01 3.9273661375045776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 3.7802878767251968e-02</internalNodes>\n          <leafValues>\n            -4.7028678655624390e-01 3.5786831378936768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 3.0441429466009140e-02</internalNodes>\n          <leafValues>\n            -3.9460399746894836e-01 3.2518500089645386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 3.9223438943736255e-04</internalNodes>\n          <leafValues>\n            -4.5166510343551636e-01 1.9672380387783051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 3.9077710360288620e-02</internalNodes>\n          <leafValues>\n            -2.1073329448699951e-01 4.3864768743515015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 -8.9118082541972399e-05</internalNodes>\n          <leafValues>\n            1.5196959674358368e-01 -5.9563517570495605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 8.8415127247571945e-03</internalNodes>\n          <leafValues>\n            -4.9292489886283875e-01 1.7406579852104187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 1.3666059821844101e-02</internalNodes>\n          <leafValues>\n            9.2861749231815338e-02 -5.5182307958602905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -6.1203300952911377e-02</internalNodes>\n          <leafValues>\n            -6.7985290288925171e-01 1.0049080103635788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 5.7719892356544733e-04</internalNodes>\n          <leafValues>\n            -5.8301997184753418e-01 1.1089629679918289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 2.8370460495352745e-04</internalNodes>\n          <leafValues>\n            -5.9793341159820557e-01 9.3898378312587738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 1.7665980383753777e-02</internalNodes>\n          <leafValues>\n            -2.2015470266342163e-01 3.4533089399337769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 2.5697330012917519e-02</internalNodes>\n          <leafValues>\n            -3.6195701360702515e-01 1.6877350211143494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -4.0316689759492874e-02</internalNodes>\n          <leafValues>\n            2.2964400053024292e-01 -2.9301440715789795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 4.6522719785571098e-03</internalNodes>\n          <leafValues>\n            -5.8995968103408813e-01 1.0466910153627396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 -1.3406000100076199e-02</internalNodes>\n          <leafValues>\n            -3.9572098851203918e-01 8.3528116345405579e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 3.6127280443906784e-02</internalNodes>\n          <leafValues>\n            9.4165802001953125e-02 -5.4097181558609009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 2.2792080417275429e-03</internalNodes>\n          <leafValues>\n            1.2819069623947144e-01 -3.6514538526535034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 1.4454070478677750e-03</internalNodes>\n          <leafValues>\n            -2.3281599581241608e-01 1.9829919934272766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 5.7482529431581497e-02</internalNodes>\n          <leafValues>\n            7.5042396783828735e-02 -5.7704979181289673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 3.3360819797962904e-03</internalNodes>\n          <leafValues>\n            8.8012017309665680e-02 -4.6779251098632812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 3.7225749343633652e-02</internalNodes>\n          <leafValues>\n            3.2155111432075500e-02 -6.6346621513366699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 1.6612760722637177e-02</internalNodes>\n          <leafValues>\n            9.1689839959144592e-02 -5.2128171920776367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 2.0543249323964119e-02</internalNodes>\n          <leafValues>\n            -2.8753378987312317e-01 1.4261309802532196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 -1.5633470320608467e-04</internalNodes>\n          <leafValues>\n            2.0246730744838715e-01 -2.2424469888210297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 1.2188810110092163e-01</internalNodes>\n          <leafValues>\n            -1.6461309790611267e-01 1.7583920061588287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 4.6413440257310867e-02</internalNodes>\n          <leafValues>\n            -6.8978017568588257e-01 6.4349927008152008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 1.4946439862251282e-01</internalNodes>\n          <leafValues>\n            3.9805840700864792e-02 -7.0177328586578369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 1.4346869662404060e-02</internalNodes>\n          <leafValues>\n            9.2628777027130127e-02 -4.6314170956611633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 3.6158718168735504e-02</internalNodes>\n          <leafValues>\n            6.4412936568260193e-02 -6.5277212858200073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 -5.5098228156566620e-02</internalNodes>\n          <leafValues>\n            -6.1021989583969116e-01 6.6034287214279175e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 -3.2978600356727839e-03</internalNodes>\n          <leafValues>\n            8.6579866707324982e-02 -2.1844820678234100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 4.1257790289819241e-03</internalNodes>\n          <leafValues>\n            -4.4980299472808838e-01 9.3251250684261322e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 3.3465269953012466e-02</internalNodes>\n          <leafValues>\n            1.4524499885737896e-02 -4.0200001001358032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 -2.2584630176424980e-02</internalNodes>\n          <leafValues>\n            -6.0067617893218994e-01 6.4416721463203430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 -7.1505038067698479e-03</internalNodes>\n          <leafValues>\n            6.7139469087123871e-02 -1.2947300076484680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 -5.1440041512250900e-02</internalNodes>\n          <leafValues>\n            -4.8466479778289795e-01 8.2093752920627594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 -1.9100949168205261e-02</internalNodes>\n          <leafValues>\n            -3.5394379496574402e-01 1.0851690173149109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 6.9468282163143158e-03</internalNodes>\n          <leafValues>\n            1.5407569706439972e-01 -2.3040190339088440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 -2.3886600509285927e-02</internalNodes>\n          <leafValues>\n            4.9007979035377502e-01 -5.9650428593158722e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 -1.3964619720354676e-03</internalNodes>\n          <leafValues>\n            -3.3704701066017151e-01 1.1569459736347198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 2.6320600882172585e-02</internalNodes>\n          <leafValues>\n            -3.9132680743932724e-02 3.7615358829498291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 5.0336541607975960e-03</internalNodes>\n          <leafValues>\n            -3.5457020998001099e-01 1.0786720365285873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 -1.1523960158228874e-02</internalNodes>\n          <leafValues>\n            3.5148641467094421e-01 -1.1373709887266159e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>72</maxWeakCount>\n      <stageThreshold>-1.9109580516815186e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 272 -5.6698019616305828e-03</internalNodes>\n          <leafValues>\n            2.5299090147018433e-01 -5.5377197265625000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 1.2186550302430987e-03</internalNodes>\n          <leafValues>\n            9.1723538935184479e-02 -6.5661650896072388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 3.1903409399092197e-03</internalNodes>\n          <leafValues>\n            1.2116809934377670e-01 -5.4405361413955688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 -1.2117680162191391e-02</internalNodes>\n          <leafValues>\n            -6.8211251497268677e-01 1.1178220063447952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 2.2634069900959730e-03</internalNodes>\n          <leafValues>\n            -5.6313961744308472e-01 9.9629260599613190e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 2.2871519904583693e-03</internalNodes>\n          <leafValues>\n            -5.0227242708206177e-01 1.1288029700517654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 -7.4018500745296478e-03</internalNodes>\n          <leafValues>\n            -5.0622308254241943e-01 1.0325270146131516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 6.5725757740437984e-03</internalNodes>\n          <leafValues>\n            3.1603671610355377e-02 -4.5879349112510681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 -1.7237069085240364e-02</internalNodes>\n          <leafValues>\n            -3.6556100845336914e-01 1.4122049510478973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 -1.7646619817242026e-03</internalNodes>\n          <leafValues>\n            1.8962210416793823e-01 -3.4349760413169861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 2.6085950434207916e-02</internalNodes>\n          <leafValues>\n            8.7369233369827271e-02 -5.3332161903381348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 8.5357967764139175e-03</internalNodes>\n          <leafValues>\n            -3.7360730767250061e-01 1.4508520066738129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 -6.2934341840445995e-03</internalNodes>\n          <leafValues>\n            -4.5775079727172852e-01 1.0016269981861115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 9.7081549465656281e-02</internalNodes>\n          <leafValues>\n            3.3761640079319477e-03 -8.4679859876632690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 -9.9455721676349640e-02</internalNodes>\n          <leafValues>\n            7.7892357110977173e-01 -5.4456088691949844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 3.9128549396991730e-02</internalNodes>\n          <leafValues>\n            3.9479929953813553e-02 -4.6620211005210876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 6.8423762917518616e-02</internalNodes>\n          <leafValues>\n            4.8163410276174545e-02 -8.1910741329193115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -1.7304550856351852e-02</internalNodes>\n          <leafValues>\n            -4.6001830697059631e-01 2.1781340241432190e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 4.5203989429865032e-05</internalNodes>\n          <leafValues>\n            1.5590970218181610e-01 -2.5734600424766541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 -5.3720749914646149e-02</internalNodes>\n          <leafValues>\n            -7.3984587192535400e-01 2.3658139631152153e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 -2.1576840663328767e-04</internalNodes>\n          <leafValues>\n            1.1803720146417618e-01 -3.5380458831787109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 1.2613219441846013e-03</internalNodes>\n          <leafValues>\n            -1.8313080072402954e-01 1.6306960582733154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 2.2714029997587204e-02</internalNodes>\n          <leafValues>\n            -9.5647342503070831e-02 3.8062781095504761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 2.0958330482244492e-02</internalNodes>\n          <leafValues>\n            6.1185598373413086e-02 -5.2644938230514526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 1.5458449721336365e-02</internalNodes>\n          <leafValues>\n            6.4466789364814758e-02 -4.7441288828849792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 -5.0828810781240463e-03</internalNodes>\n          <leafValues>\n            1.0018830001354218e-01 -3.6397251486778259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 1.1842510430142283e-03</internalNodes>\n          <leafValues>\n            -2.0603519678115845e-01 1.7129589617252350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 5.0187770277261734e-02</internalNodes>\n          <leafValues>\n            -7.0924967527389526e-02 1.0435319691896439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 1.7535200715065002e-01</internalNodes>\n          <leafValues>\n            3.7766210734844208e-02 -8.0802738666534424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 -6.8425558507442474e-02</internalNodes>\n          <leafValues>\n            -5.0214898586273193e-01 5.4671119898557663e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 2.2496099118143320e-03</internalNodes>\n          <leafValues>\n            -2.8013509511947632e-01 1.0950099676847458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 8.5355632007122040e-02</internalNodes>\n          <leafValues>\n            3.3376980572938919e-02 -7.3676842451095581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 -2.8825979679822922e-02</internalNodes>\n          <leafValues>\n            -4.8528099060058594e-01 4.9596078693866730e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 -1.3562700478360057e-03</internalNodes>\n          <leafValues>\n            1.8493090569972992e-01 -1.6541489958763123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 1.5731659950688481e-03</internalNodes>\n          <leafValues>\n            9.0431816875934601e-02 -3.0193880200386047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 -5.2912188693881035e-03</internalNodes>\n          <leafValues>\n            -4.3963611125946045e-01 4.6880699694156647e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 4.2200140655040741e-02</internalNodes>\n          <leafValues>\n            -7.5348012149333954e-02 3.7712809443473816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 3.1030770391225815e-02</internalNodes>\n          <leafValues>\n            6.6053368151187897e-02 -4.7378420829772949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 8.0451928079128265e-03</internalNodes>\n          <leafValues>\n            -7.7326983213424683e-02 3.4898889064788818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 2.3791180923581123e-02</internalNodes>\n          <leafValues>\n            4.8629928380250931e-02 -5.8155477046966553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 -2.6884680613875389e-02</internalNodes>\n          <leafValues>\n            7.3852258920669556e-01 -4.0025118738412857e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 -1.7013859469443560e-03</internalNodes>\n          <leafValues>\n            1.4116409420967102e-01 -1.8305079638957977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -3.2258979976177216e-02</internalNodes>\n          <leafValues>\n            -6.4598697423934937e-01 4.1774179786443710e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 -9.1719552874565125e-02</internalNodes>\n          <leafValues>\n            6.3651692867279053e-01 -4.4406279921531677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 1.1253220029175282e-02</internalNodes>\n          <leafValues>\n            -1.0398969799280167e-01 2.4386499822139740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 9.1702006757259369e-03</internalNodes>\n          <leafValues>\n            -1.0142300277948380e-01 1.7325720191001892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 -3.7584431469440460e-02</internalNodes>\n          <leafValues>\n            -6.5999048948287964e-01 3.5357259213924408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 1.4904039562679827e-04</internalNodes>\n          <leafValues>\n            -1.2504950165748596e-01 1.0161379724740982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 5.6240631965920329e-04</internalNodes>\n          <leafValues>\n            -2.1511219441890717e-01 1.0537440329790115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 -1.7314270138740540e-02</internalNodes>\n          <leafValues>\n            -1.6798290610313416e-01 6.1207499355077744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 -1.5429870225489140e-02</internalNodes>\n          <leafValues>\n            2.5674480199813843e-01 -9.7193486988544464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 -1.5612079761922359e-02</internalNodes>\n          <leafValues>\n            -3.5797500610351562e-01 6.9260068237781525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 7.4424187187105417e-04</internalNodes>\n          <leafValues>\n            -1.5740460157394409e-01 1.4921070635318756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 7.9008340835571289e-02</internalNodes>\n          <leafValues>\n            3.5924728959798813e-02 -6.4907592535018921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 -3.3477540127933025e-03</internalNodes>\n          <leafValues>\n            -2.5794708728790283e-01 8.1626862287521362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 3.5589419305324554e-02</internalNodes>\n          <leafValues>\n            -4.6870049089193344e-02 5.3945267200469971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 7.6168961822986603e-04</internalNodes>\n          <leafValues>\n            8.0409869551658630e-02 -2.8045970201492310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 9.6126887947320938e-03</internalNodes>\n          <leafValues>\n            9.2715777456760406e-02 -2.2755210101604462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 3.4582789987325668e-02</internalNodes>\n          <leafValues>\n            -9.5495507121086121e-02 2.8116491436958313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 -8.2031842321157455e-03</internalNodes>\n          <leafValues>\n            -3.3162289857864380e-01 4.0629711002111435e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 2.5540109723806381e-02</internalNodes>\n          <leafValues>\n            7.0458933711051941e-02 -3.2799351215362549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 -3.1389920040965080e-03</internalNodes>\n          <leafValues>\n            1.2529349327087402e-01 -6.0766801238059998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 4.5892409980297089e-03</internalNodes>\n          <leafValues>\n            -9.5335446298122406e-02 2.4738679826259613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 -2.3260030895471573e-02</internalNodes>\n          <leafValues>\n            -2.3823159933090210e-01 3.3502969890832901e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 1.7964519793167710e-03</internalNodes>\n          <leafValues>\n            8.9843861758708954e-02 -2.8049159049987793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 -1.0952910035848618e-01</internalNodes>\n          <leafValues>\n            -4.6206548810005188e-01 7.4333418160676956e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 6.8442770279943943e-03</internalNodes>\n          <leafValues>\n            7.3520109057426453e-02 -3.6190700531005859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 -7.3719851672649384e-02</internalNodes>\n          <leafValues>\n            4.1131800413131714e-01 -6.8293057382106781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 9.4485012814402580e-03</internalNodes>\n          <leafValues>\n            -1.2132299691438675e-01 2.1491959691047668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 -7.4686057865619659e-02</internalNodes>\n          <leafValues>\n            2.4292010068893433e-01 -3.8520719856023788e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 -1.8958229571580887e-02</internalNodes>\n          <leafValues>\n            -3.7263819575309753e-01 6.8381950259208679e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 -8.3170487778261304e-04</internalNodes>\n          <leafValues>\n            9.5785446465015411e-02 -1.0169020295143127e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>54</maxWeakCount>\n      <stageThreshold>-2.0048389434814453e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 344 1.5233230590820312e-01</internalNodes>\n          <leafValues>\n            -3.1805351376533508e-01 4.7039988636970520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 8.8482722640037537e-03</internalNodes>\n          <leafValues>\n            -3.6134269833564758e-01 2.7332958579063416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 2.9788410291075706e-02</internalNodes>\n          <leafValues>\n            -2.8059279918670654e-01 3.6270239949226379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 5.2725639194250107e-02</internalNodes>\n          <leafValues>\n            -1.9320569932460785e-01 3.5507258772850037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 2.6077419519424438e-02</internalNodes>\n          <leafValues>\n            -3.7120199203491211e-01 2.7038440108299255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 -4.4878520071506500e-02</internalNodes>\n          <leafValues>\n            2.9119300842285156e-01 -3.5178241133689880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 -9.3984341947361827e-04</internalNodes>\n          <leafValues>\n            -6.0143661499023438e-01 1.1815790086984634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 3.1817350536584854e-03</internalNodes>\n          <leafValues>\n            -6.1632722616195679e-01 1.0581470280885696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 -6.2214181525632739e-04</internalNodes>\n          <leafValues>\n            1.1701049655675888e-01 -6.1873781681060791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 5.4993429221212864e-03</internalNodes>\n          <leafValues>\n            7.1740642189979553e-02 -3.2122710347175598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 7.0621701888740063e-03</internalNodes>\n          <leafValues>\n            -3.0814599990844727e-01 1.8299129605293274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 -3.4492298960685730e-02</internalNodes>\n          <leafValues>\n            -3.6952570080757141e-01 1.1142779886722565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 -5.3783431649208069e-02</internalNodes>\n          <leafValues>\n            -6.6689962148666382e-01 8.4863640367984772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 -2.0194910466670990e-02</internalNodes>\n          <leafValues>\n            -4.2300069332122803e-01 5.6325469166040421e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 -7.6839578105136752e-04</internalNodes>\n          <leafValues>\n            1.3547450304031372e-01 -3.5696288943290710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 6.6877179779112339e-03</internalNodes>\n          <leafValues>\n            -3.4379830956459045e-01 1.3302099704742432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 1.1147409677505493e-01</internalNodes>\n          <leafValues>\n            -4.9523550271987915e-01 9.7303003072738647e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 -8.5021732375025749e-03</internalNodes>\n          <leafValues>\n            -5.1778990030288696e-01 6.7188903689384460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 -1.8897019326686859e-02</internalNodes>\n          <leafValues>\n            -4.7064769268035889e-01 9.0873777866363525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 5.7387170381844044e-03</internalNodes>\n          <leafValues>\n            -1.4860689640045166e-01 3.0976840853691101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 3.2604049891233444e-02</internalNodes>\n          <leafValues>\n            7.8677706420421600e-02 -5.4713827371597290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 1.8975350030814297e-05</internalNodes>\n          <leafValues>\n            -2.4359850585460663e-01 9.8908931016921997e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 -1.9267159514129162e-03</internalNodes>\n          <leafValues>\n            -5.0522977113723755e-01 7.5119331479072571e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 -7.7145430259406567e-03</internalNodes>\n          <leafValues>\n            -2.5014960765838623e-01 1.0211499780416489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -1.8806649371981621e-02</internalNodes>\n          <leafValues>\n            -4.3269169330596924e-01 1.1147680133581161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 2.9912199825048447e-02</internalNodes>\n          <leafValues>\n            4.6748448163270950e-02 -5.8818292617797852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 -7.4260600376874208e-04</internalNodes>\n          <leafValues>\n            1.8389309942722321e-01 -2.0138260722160339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 4.0662181563675404e-03</internalNodes>\n          <leafValues>\n            -4.4948458671569824e-01 8.6881376802921295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 1.8681669607758522e-02</internalNodes>\n          <leafValues>\n            -1.7103520035743713e-01 2.2931230068206787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 4.6580690890550613e-02</internalNodes>\n          <leafValues>\n            4.3874379247426987e-02 -6.6704601049423218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 -1.5030739828944206e-02</internalNodes>\n          <leafValues>\n            -7.6569449901580811e-01 4.2524490505456924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 6.3602820038795471e-02</internalNodes>\n          <leafValues>\n            3.3629488199949265e-02 -8.6777329444885254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 -3.3613100647926331e-02</internalNodes>\n          <leafValues>\n            -6.7464047670364380e-01 4.5196920633316040e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -4.4314529746770859e-02</internalNodes>\n          <leafValues>\n            -4.7056430578231812e-01 2.0987950265407562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 2.9175819829106331e-02</internalNodes>\n          <leafValues>\n            5.6036490947008133e-02 -6.5745961666107178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 8.4737781435251236e-03</internalNodes>\n          <leafValues>\n            -1.2312129884958267e-01 3.6037188768386841e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 -2.6930740103125572e-02</internalNodes>\n          <leafValues>\n            -6.5255117416381836e-01 6.0726620256900787e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 3.7930138409137726e-02</internalNodes>\n          <leafValues>\n            -1.5491360425949097e-01 2.1770450472831726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 1.6430050134658813e-02</internalNodes>\n          <leafValues>\n            -2.5250691175460815e-01 1.5458230674266815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 5.1079809665679932e-02</internalNodes>\n          <leafValues>\n            3.0773499980568886e-02 -6.4929312467575073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 1.6663300339132547e-03</internalNodes>\n          <leafValues>\n            -3.7425559759140015e-01 8.1392176449298859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 -9.0896980836987495e-03</internalNodes>\n          <leafValues>\n            1.7854049801826477e-01 -7.6578080654144287e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 2.0629199221730232e-02</internalNodes>\n          <leafValues>\n            7.2373263537883759e-02 -4.2050579190254211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 8.2410024479031563e-03</internalNodes>\n          <leafValues>\n            3.2896678894758224e-02 -3.7325268983840942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 -4.6126499772071838e-02</internalNodes>\n          <leafValues>\n            -3.7356421351432800e-01 7.7336780726909637e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 -8.3484929054975510e-03</internalNodes>\n          <leafValues>\n            1.8690130114555359e-01 -1.5126839280128479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 -4.7689080238342285e-02</internalNodes>\n          <leafValues>\n            -4.0730020403862000e-01 8.7598368525505066e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 -5.0166220171377063e-04</internalNodes>\n          <leafValues>\n            1.2036769837141037e-01 -2.4717660248279572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 2.1794239728478715e-05</internalNodes>\n          <leafValues>\n            -2.9800811409950256e-01 1.2065000087022781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 -7.0597290992736816e-02</internalNodes>\n          <leafValues>\n            -6.8116611242294312e-01 6.4198948442935944e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 -6.4999358728528023e-03</internalNodes>\n          <leafValues>\n            2.6219159364700317e-01 -1.4015009999275208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 5.3664338774979115e-03</internalNodes>\n          <leafValues>\n            -3.4273180365562439e-01 9.2048570513725281e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 -1.3341950252652168e-02</internalNodes>\n          <leafValues>\n            4.0258079767227173e-01 -7.2052307426929474e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 1.2243090197443962e-02</internalNodes>\n          <leafValues>\n            -8.2426831126213074e-02 3.8369199633598328e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>100</maxWeakCount>\n      <stageThreshold>-1.8743180036544800e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 398 -2.8617910575121641e-03</internalNodes>\n          <leafValues>\n            2.1443170309066772e-01 -5.1532137393951416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 1.9125089747831225e-03</internalNodes>\n          <leafValues>\n            1.4483030140399933e-01 -6.1175411939620972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 4.8059499822556973e-03</internalNodes>\n          <leafValues>\n            -4.4235628843307495e-01 1.3466580212116241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 -9.5777623355388641e-02</internalNodes>\n          <leafValues>\n            -4.8914781212806702e-01 1.3169640302658081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 -8.9395968243479729e-03</internalNodes>\n          <leafValues>\n            1.4790549874305725e-01 -4.6696281433105469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 8.1128235906362534e-03</internalNodes>\n          <leafValues>\n            5.0671331584453583e-02 -4.0227508544921875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 2.2638900554738939e-04</internalNodes>\n          <leafValues>\n            -5.0928252935409546e-01 8.2113206386566162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 -6.1516009736806154e-04</internalNodes>\n          <leafValues>\n            -3.8136801123619080e-01 1.0157950222492218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 -3.2050691079348326e-03</internalNodes>\n          <leafValues>\n            -5.8352458477020264e-01 6.2385398894548416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 5.4250762332230806e-04</internalNodes>\n          <leafValues>\n            -2.5548499822616577e-01 1.4832200109958649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 1.0713520459830761e-03</internalNodes>\n          <leafValues>\n            -3.5334318876266479e-01 1.1791589856147766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 -1.7755989683791995e-03</internalNodes>\n          <leafValues>\n            -3.4087279438972473e-01 9.4740107655525208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 -9.3014203011989594e-02</internalNodes>\n          <leafValues>\n            7.4685460329055786e-01 -5.2443340420722961e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 -1.4192130416631699e-02</internalNodes>\n          <leafValues>\n            -3.1433999538421631e-01 9.0452186763286591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 -5.3375191055238247e-04</internalNodes>\n          <leafValues>\n            1.4119710028171539e-01 -2.0296710729598999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 9.4844609498977661e-02</internalNodes>\n          <leafValues>\n            1.4625679701566696e-02 -6.2215209007263184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 1.1853160103783011e-03</internalNodes>\n          <leafValues>\n            -2.5984010100364685e-01 1.2153120338916779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 -2.4541220627725124e-03</internalNodes>\n          <leafValues>\n            7.1894593536853790e-02 -3.9803519845008850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 6.8703000433743000e-03</internalNodes>\n          <leafValues>\n            6.8626098334789276e-02 -3.8565808534622192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 -6.0411270707845688e-02</internalNodes>\n          <leafValues>\n            -4.8482391238212585e-01 2.0706020295619965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 -4.6826168545521796e-04</internalNodes>\n          <leafValues>\n            9.5856241881847382e-02 -3.1230351328849792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 -3.3507338957861066e-04</internalNodes>\n          <leafValues>\n            7.8128658235073090e-02 -9.4751000404357910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 3.6313060671091080e-02</internalNodes>\n          <leafValues>\n            4.4824421405792236e-02 -6.3693147897720337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 3.8052719901315868e-04</internalNodes>\n          <leafValues>\n            -2.1931269764900208e-01 1.1780519783496857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 -5.0964631140232086e-02</internalNodes>\n          <leafValues>\n            5.5783379077911377e-01 -4.3869689106941223e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 -7.6198756694793701e-02</internalNodes>\n          <leafValues>\n            6.7789608240127563e-01 -1.7935890704393387e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 -1.2677020393311977e-02</internalNodes>\n          <leafValues>\n            -6.0731011629104614e-01 4.9086190760135651e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 -3.6766629200428724e-03</internalNodes>\n          <leafValues>\n            1.5226639807224274e-01 -1.9953680038452148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 -3.8846738636493683e-02</internalNodes>\n          <leafValues>\n            -7.7045238018035889e-01 3.3732470124959946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 9.4217229634523392e-03</internalNodes>\n          <leafValues>\n            -6.9929488003253937e-02 1.3669140636920929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 7.3391180485486984e-03</internalNodes>\n          <leafValues>\n            -1.2133339792490005e-01 2.1175499260425568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 1.2211379595100880e-02</internalNodes>\n          <leafValues>\n            6.7636847496032715e-02 -4.3353718519210815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 -9.3064550310373306e-03</internalNodes>\n          <leafValues>\n            -3.4682491421699524e-01 6.4062312245368958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 5.2111309021711349e-02</internalNodes>\n          <leafValues>\n            -3.4146990627050400e-02 3.8904741406440735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 -4.3582019861787558e-04</internalNodes>\n          <leafValues>\n            1.3956509530544281e-01 -1.8289420008659363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -1.0575359687209129e-02</internalNodes>\n          <leafValues>\n            -2.7782461047172546e-01 8.5667066276073456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 1.4794029993936419e-03</internalNodes>\n          <leafValues>\n            -2.3154720664024353e-01 1.1765889823436737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 9.4746891409158707e-03</internalNodes>\n          <leafValues>\n            -1.3345280289649963e-01 1.8066969513893127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 8.3355188369750977e-02</internalNodes>\n          <leafValues>\n            3.3563960343599319e-02 -7.2860741615295410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 -6.6629007458686829e-02</internalNodes>\n          <leafValues>\n            3.8058251142501831e-01 -3.3490750938653946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 5.0287488847970963e-03</internalNodes>\n          <leafValues>\n            -1.1418010294437408e-01 2.1534989774227142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 5.1222002506256104e-01</internalNodes>\n          <leafValues>\n            7.6377480290830135e-03 -6.5067559480667114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 1.2300059944391251e-01</internalNodes>\n          <leafValues>\n            3.8879081606864929e-02 -5.9420442581176758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 -1.1227129725739360e-03</internalNodes>\n          <leafValues>\n            1.0235410183668137e-01 -1.1207509785890579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 -6.2220949679613113e-02</internalNodes>\n          <leafValues>\n            -5.1173472404479980e-01 4.1879799216985703e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 -2.6323389261960983e-02</internalNodes>\n          <leafValues>\n            3.4005990624427795e-01 -5.0624471157789230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 -1.8875019624829292e-02</internalNodes>\n          <leafValues>\n            -5.4550838470458984e-01 4.1524920612573624e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 -3.4034788608551025e-01</internalNodes>\n          <leafValues>\n            -9.1541802883148193e-01 1.6561320051550865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 -8.0456008436158299e-04</internalNodes>\n          <leafValues>\n            1.4270770549774170e-01 -1.2901450693607330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 -3.9579509757459164e-03</internalNodes>\n          <leafValues>\n            -3.3408370614051819e-01 5.8637548238039017e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 1.8336549401283264e-02</internalNodes>\n          <leafValues>\n            -4.5632220804691315e-02 5.2696329355239868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 -5.7686101645231247e-02</internalNodes>\n          <leafValues>\n            -5.7604360580444336e-01 3.9550099521875381e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -8.6881890892982483e-03</internalNodes>\n          <leafValues>\n            2.0929679274559021e-01 -1.0309000313282013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 2.0318549871444702e-01</internalNodes>\n          <leafValues>\n            9.4080818817019463e-03 -9.9389547109603882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 2.0097799599170685e-02</internalNodes>\n          <leafValues>\n            5.6577399373054504e-02 -3.7819018959999084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 1.3217139989137650e-02</internalNodes>\n          <leafValues>\n            -7.4322126805782318e-02 1.7874650657176971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -9.1346688568592072e-03</internalNodes>\n          <leafValues>\n            -4.9356880784034729e-01 3.7799369543790817e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 8.7239191634580493e-04</internalNodes>\n          <leafValues>\n            -1.3848680257797241e-01 1.1516919732093811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 -3.4609009162522852e-04</internalNodes>\n          <leafValues>\n            -1.6371829807758331e-01 1.1949790269136429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 -9.8570866975933313e-04</internalNodes>\n          <leafValues>\n            -5.4642897844314575e-01 4.4689279049634933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 1.0218559764325619e-02</internalNodes>\n          <leafValues>\n            -1.1570169776678085e-01 1.6723839938640594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 2.6702679693698883e-02</internalNodes>\n          <leafValues>\n            4.3922040611505508e-02 -4.5120438933372498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 -2.0299260504543781e-03</internalNodes>\n          <leafValues>\n            1.1932279914617538e-01 -1.6979490220546722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 -8.8023602962493896e-02</internalNodes>\n          <leafValues>\n            -8.0279791355133057e-01 9.4295190647244453e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 -1.3109110295772552e-02</internalNodes>\n          <leafValues>\n            -3.0865308642387390e-01 6.0802049934864044e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 -9.9501870572566986e-03</internalNodes>\n          <leafValues>\n            1.8400619924068451e-01 -4.6465478837490082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 -3.4293539356440306e-03</internalNodes>\n          <leafValues>\n            2.6682999730110168e-01 -9.9338643252849579e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 5.4729141294956207e-02</internalNodes>\n          <leafValues>\n            2.8731130063533783e-02 -7.7745848894119263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 7.2012972086668015e-03</internalNodes>\n          <leafValues>\n            4.4892478734254837e-02 -3.8289341330528259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 4.2047120630741119e-02</internalNodes>\n          <leafValues>\n            -2.2562339901924133e-02 4.0646651387214661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 4.4444389641284943e-03</internalNodes>\n          <leafValues>\n            9.1204106807708740e-02 -1.8748210370540619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 2.8441840782761574e-02</internalNodes>\n          <leafValues>\n            4.0668040513992310e-02 -4.0552121400833130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 -1.5141829848289490e-02</internalNodes>\n          <leafValues>\n            2.4799869954586029e-01 -8.3607338368892670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 3.9388090372085571e-02</internalNodes>\n          <leafValues>\n            2.4279279634356499e-02 -7.6827299594879150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 6.1649468261748552e-04</internalNodes>\n          <leafValues>\n            -1.7249910533428192e-01 1.0311610251665115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 2.6001650840044022e-02</internalNodes>\n          <leafValues>\n            2.2825349122285843e-02 -7.7545452117919922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 1.4940380351617932e-03</internalNodes>\n          <leafValues>\n            -1.1028409749269485e-01 1.6966749727725983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 -1.3777149841189384e-02</internalNodes>\n          <leafValues>\n            -3.8424721360206604e-01 3.0320269986987114e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 9.9619822576642036e-03</internalNodes>\n          <leafValues>\n            -5.3764659911394119e-02 3.7887129187583923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 3.2952039036899805e-03</internalNodes>\n          <leafValues>\n            9.4384163618087769e-02 -3.2762721180915833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 5.7747410610318184e-03</internalNodes>\n          <leafValues>\n            5.7114940136671066e-02 -3.0719769001007080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 -4.8392590135335922e-02</internalNodes>\n          <leafValues>\n            1.7021059989929199e-01 -8.7045513093471527e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 5.6376052089035511e-04</internalNodes>\n          <leafValues>\n            -9.3816302716732025e-02 2.0642310380935669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 -2.3873809725046158e-02</internalNodes>\n          <leafValues>\n            -3.0082350969314575e-01 1.7477719113230705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -1.0526900179684162e-02</internalNodes>\n          <leafValues>\n            -3.4418928623199463e-01 5.7995639741420746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 2.2288670763373375e-02</internalNodes>\n          <leafValues>\n            -5.7179849594831467e-02 1.9739510118961334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 -1.4589070342481136e-02</internalNodes>\n          <leafValues>\n            -4.5168799161911011e-01 4.1490409523248672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 -4.6936370432376862e-02</internalNodes>\n          <leafValues>\n            2.0457950234413147e-01 -5.1769189536571503e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 5.3777720313519239e-04</internalNodes>\n          <leafValues>\n            -3.9481449127197266e-01 4.5076690614223480e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 -2.2181039676070213e-03</internalNodes>\n          <leafValues>\n            -2.4575619399547577e-01 1.0261219739913940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 3.5076549649238586e-01</internalNodes>\n          <leafValues>\n            1.9791129976511002e-02 -9.5161467790603638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 -2.6712059974670410e-02</internalNodes>\n          <leafValues>\n            2.2393140196800232e-01 -4.5580100268125534e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 -3.9627091027796268e-03</internalNodes>\n          <leafValues>\n            -2.4207019805908203e-01 7.6588593423366547e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 -4.7878702171146870e-03</internalNodes>\n          <leafValues>\n            1.2655270099639893e-01 -1.1964710056781769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 7.1042939089238644e-03</internalNodes>\n          <leafValues>\n            -9.2130422592163086e-02 2.1519139409065247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 -2.2581929442822002e-05</internalNodes>\n          <leafValues>\n            6.0634609311819077e-02 -1.5848989784717560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 -7.8060641884803772e-02</internalNodes>\n          <leafValues>\n            3.4822109341621399e-01 -5.3173709660768509e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 2.7555850148200989e-01</internalNodes>\n          <leafValues>\n            7.4112107977271080e-03 -1.0000040531158447e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 1.9652329385280609e-01</internalNodes>\n          <leafValues>\n            2.0131109282374382e-02 -8.5326671600341797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 -1.6801860183477402e-03</internalNodes>\n          <leafValues>\n            7.7082179486751556e-02 -2.2620369493961334e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>71</maxWeakCount>\n      <stageThreshold>-1.9982930421829224e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 498 -1.8814710900187492e-02</internalNodes>\n          <leafValues>\n            3.7744289636611938e-01 -4.0770640969276428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 -2.3191049695014954e-02</internalNodes>\n          <leafValues>\n            3.4049031138420105e-01 -3.6144611239433289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 3.1333088874816895e-02</internalNodes>\n          <leafValues>\n            -4.3613511323928833e-01 1.9668689370155334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 -1.1318700388073921e-02</internalNodes>\n          <leafValues>\n            1.1685170233249664e-01 -5.6359791755676270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 -3.1084290822036564e-04</internalNodes>\n          <leafValues>\n            -4.3396338820457458e-01 1.4264069497585297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 8.7350063025951385e-02</internalNodes>\n          <leafValues>\n            -1.9952809810638428e-01 3.3043611049652100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 -2.9018519446253777e-02</internalNodes>\n          <leafValues>\n            3.2315209507942200e-01 -2.1707040071487427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 5.9860680252313614e-02</internalNodes>\n          <leafValues>\n            -1.8764750659465790e-01 2.7651038765907288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 -2.9682170599699020e-02</internalNodes>\n          <leafValues>\n            -4.6436330676078796e-01 1.1129009723663330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 -2.2648361045867205e-03</internalNodes>\n          <leafValues>\n            -2.7163028717041016e-01 8.6916759610176086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 -1.6869819955900311e-03</internalNodes>\n          <leafValues>\n            1.7998990416526794e-01 -2.7152928709983826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 1.0256370296701789e-03</internalNodes>\n          <leafValues>\n            -4.3248209357261658e-01 1.0256689786911011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 -3.1762920320034027e-02</internalNodes>\n          <leafValues>\n            -6.4419168233871460e-01 6.7505106329917908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 -8.5913296788930893e-03</internalNodes>\n          <leafValues>\n            -3.7672510743141174e-01 7.2900757193565369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 -2.1636451128870249e-03</internalNodes>\n          <leafValues>\n            -4.2209509015083313e-01 1.0724630206823349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 6.0111237689852715e-04</internalNodes>\n          <leafValues>\n            6.1302110552787781e-02 -3.8004979491233826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 -6.1244412790983915e-05</internalNodes>\n          <leafValues>\n            7.4765786528587341e-02 -5.2644491195678711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 -2.3666430264711380e-02</internalNodes>\n          <leafValues>\n            -5.6801301240921021e-01 3.6377541720867157e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 -1.4256609603762627e-02</internalNodes>\n          <leafValues>\n            -5.3446692228317261e-01 6.2768869102001190e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 -1.5713909640908241e-02</internalNodes>\n          <leafValues>\n            3.1898561120033264e-01 -1.1541239917278290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 -5.9286020696163177e-02</internalNodes>\n          <leafValues>\n            -5.7135957479476929e-01 8.1775680184364319e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 -4.4122908264398575e-02</internalNodes>\n          <leafValues>\n            -7.0591008663177490e-01 2.0833099260926247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 -7.2728260420262814e-04</internalNodes>\n          <leafValues>\n            1.0819850116968155e-01 -3.8077458739280701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 -6.6653728485107422e-02</internalNodes>\n          <leafValues>\n            -6.0824638605117798e-01 4.3248821049928665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 2.3679709993302822e-03</internalNodes>\n          <leafValues>\n            -2.9793098568916321e-01 1.2091939896345139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 3.3566180616617203e-02</internalNodes>\n          <leafValues>\n            3.6464620381593704e-02 -5.5766987800598145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 -5.3138811141252518e-02</internalNodes>\n          <leafValues>\n            -5.6245392560958862e-01 6.5296277403831482e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 -2.9401908977888525e-04</internalNodes>\n          <leafValues>\n            -5.8417952060699463e-01 5.0005510449409485e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 -4.8085048911161721e-04</internalNodes>\n          <leafValues>\n            1.4018669724464417e-01 -2.4792720377445221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 4.7777060419321060e-02</internalNodes>\n          <leafValues>\n            5.5672798305749893e-02 -5.9540742635726929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 3.3423870801925659e-02</internalNodes>\n          <leafValues>\n            -1.4370389282703400e-01 2.3300980031490326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 2.0432810485363007e-01</internalNodes>\n          <leafValues>\n            4.5327048748731613e-02 -7.4164307117462158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 1.4106060564517975e-01</internalNodes>\n          <leafValues>\n            -3.9674291014671326e-01 8.1692866981029510e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 1.0005939839174971e-04</internalNodes>\n          <leafValues>\n            -2.2317939996719360e-01 1.3917629420757294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 6.0689389705657959e-02</internalNodes>\n          <leafValues>\n            3.4324988722801208e-02 -8.2796847820281982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 -3.6456179805099964e-03</internalNodes>\n          <leafValues>\n            1.5286439657211304e-01 -1.4005979895591736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 3.1945340335369110e-02</internalNodes>\n          <leafValues>\n            6.5343692898750305e-02 -4.4296088814735413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 2.3428380489349365e-02</internalNodes>\n          <leafValues>\n            2.5527309626340866e-02 -6.3270658254623413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 4.6067949384450912e-02</internalNodes>\n          <leafValues>\n            4.3579101562500000e-02 -6.4929872751235962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 -5.8055151253938675e-02</internalNodes>\n          <leafValues>\n            -6.3957542181015015e-01 1.4028750360012054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 3.8783740252256393e-02</internalNodes>\n          <leafValues>\n            5.1233518868684769e-02 -5.4144388437271118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 -1.2765520252287388e-02</internalNodes>\n          <leafValues>\n            2.7082890272140503e-01 -9.1927766799926758e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 -3.1400551088154316e-03</internalNodes>\n          <leafValues>\n            -3.4679821133613586e-01 8.3973668515682220e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 -1.9719999283552170e-02</internalNodes>\n          <leafValues>\n            -2.0476959645748138e-01 6.3232198357582092e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 3.2241051085293293e-03</internalNodes>\n          <leafValues>\n            9.6259713172912598e-02 -2.8098219633102417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 -5.9271860867738724e-02</internalNodes>\n          <leafValues>\n            -2.6686909794807434e-01 3.2907258719205856e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 1.5636639669537544e-02</internalNodes>\n          <leafValues>\n            6.9188073277473450e-02 -4.1761711239814758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 -8.8900122791528702e-03</internalNodes>\n          <leafValues>\n            1.9603550434112549e-01 -1.1249750107526779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 2.4458909407258034e-02</internalNodes>\n          <leafValues>\n            5.6988969445228577e-02 -5.1025021076202393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 1.0101319849491119e-01</internalNodes>\n          <leafValues>\n            9.4210049137473106e-03 -3.6691328883171082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 9.0739831328392029e-02</internalNodes>\n          <leafValues>\n            5.3999878466129303e-02 -5.1181477308273315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 -4.9557868391275406e-02</internalNodes>\n          <leafValues>\n            -6.2467038631439209e-01 4.0988270193338394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 2.6558348536491394e-01</internalNodes>\n          <leafValues>\n            -8.6136549711227417e-02 3.2438439130783081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 1.8632459687069058e-03</internalNodes>\n          <leafValues>\n            -5.4563361406326294e-01 5.8684051036834717e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 1.1804940178990364e-02</internalNodes>\n          <leafValues>\n            -2.0603899657726288e-01 1.4167340099811554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 6.8137067137286067e-04</internalNodes>\n          <leafValues>\n            -2.0806470513343811e-01 9.2627376317977905e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 5.7278381427749991e-04</internalNodes>\n          <leafValues>\n            -4.3170881271362305e-01 6.3360363245010376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 -1.1041999794542789e-02</internalNodes>\n          <leafValues>\n            1.8144379556179047e-01 -4.1707839816808701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 9.5696747303009033e-03</internalNodes>\n          <leafValues>\n            -1.2098339945077896e-01 2.1607619524002075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 7.4274197220802307e-02</internalNodes>\n          <leafValues>\n            2.6399549096822739e-02 -7.7601867914199829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 -2.5815829634666443e-02</internalNodes>\n          <leafValues>\n            5.3497368097305298e-01 -5.2025150507688522e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 -6.3314691185951233e-02</internalNodes>\n          <leafValues>\n            5.1900321245193481e-01 -1.9329590722918510e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 -6.6432490944862366e-02</internalNodes>\n          <leafValues>\n            7.2140932083129883e-01 -3.2882031053304672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 561 -7.5749039649963379e-02</internalNodes>\n          <leafValues>\n            4.1485249996185303e-01 -5.5451728403568268e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 -2.0296040922403336e-02</internalNodes>\n          <leafValues>\n            -3.3250689506530762e-01 8.2397893071174622e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 2.2172650322318077e-02</internalNodes>\n          <leafValues>\n            -1.4419150352478027e-01 1.7280860245227814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 4.2085880413651466e-03</internalNodes>\n          <leafValues>\n            -3.0237489938735962e-01 8.6699083447456360e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 6.8267330527305603e-02</internalNodes>\n          <leafValues>\n            8.7291244417428970e-03 -3.6955729126930237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 5.1220320165157318e-03</internalNodes>\n          <leafValues>\n            -2.0824980735778809e-01 1.4530059695243835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 -5.3114328533411026e-02</internalNodes>\n          <leafValues>\n            -5.5142301321029663e-01 4.3421190232038498e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 -4.9739979207515717e-02</internalNodes>\n          <leafValues>\n            4.4077101349830627e-01 -6.4349673688411713e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>94</maxWeakCount>\n      <stageThreshold>-1.8377989530563354e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 569 -3.3883380820043385e-04</internalNodes>\n          <leafValues>\n            1.8997849524021149e-01 -4.6184849739074707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 -1.5632030554115772e-03</internalNodes>\n          <leafValues>\n            1.9381409883499146e-01 -4.3518841266632080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 1.5552520053461194e-03</internalNodes>\n          <leafValues>\n            -4.7420310974121094e-01 1.2137629836797714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 -3.1417120248079300e-02</internalNodes>\n          <leafValues>\n            -3.9096689224243164e-01 1.0951930284500122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 -3.2835190650075674e-03</internalNodes>\n          <leafValues>\n            1.6428950428962708e-01 -3.2751929759979248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 5.8749080635607243e-03</internalNodes>\n          <leafValues>\n            7.6225973665714264e-02 -4.3470710515975952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 4.4846539385616779e-03</internalNodes>\n          <leafValues>\n            1.2197560071945190e-01 -4.4872379302978516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 1.9835829734802246e-03</internalNodes>\n          <leafValues>\n            -6.2911021709442139e-01 1.0122530162334442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 1.2609469704329967e-02</internalNodes>\n          <leafValues>\n            1.0438250005245209e-01 -3.5015499591827393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 -4.7475768951699138e-04</internalNodes>\n          <leafValues>\n            1.1008159816265106e-01 -3.0429539084434509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 3.2356760930269957e-03</internalNodes>\n          <leafValues>\n            -2.7057901024818420e-01 1.2746180593967438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 9.9898613989353180e-03</internalNodes>\n          <leafValues>\n            6.3906982541084290e-02 -4.7118431329727173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 5.6069239508360624e-04</internalNodes>\n          <leafValues>\n            -3.1783330440521240e-01 1.0404340177774429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 -5.7694699615240097e-02</internalNodes>\n          <leafValues>\n            -5.1342570781707764e-01 2.6394980028271675e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 5.5947788059711456e-03</internalNodes>\n          <leafValues>\n            7.6774753630161285e-02 -4.3374261260032654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 -3.8770840037614107e-03</internalNodes>\n          <leafValues>\n            1.3988199830055237e-01 -2.0221559703350067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 -4.7874201089143753e-02</internalNodes>\n          <leafValues>\n            -4.7928389906883240e-01 6.8043030798435211e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 2.5817550718784332e-02</internalNodes>\n          <leafValues>\n            -4.5524198561906815e-02 3.9452901482582092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 1.6696650709491223e-04</internalNodes>\n          <leafValues>\n            -3.0880719423294067e-01 1.0875239968299866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 9.8888948559761047e-04</internalNodes>\n          <leafValues>\n            6.8699032068252563e-02 -4.1813009977340698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 -3.4260770771652460e-03</internalNodes>\n          <leafValues>\n            -2.8929701447486877e-01 1.1479649692773819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 6.6044367849826813e-02</internalNodes>\n          <leafValues>\n            1.6809269785881042e-02 -3.3534801006317139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 2.8318059630692005e-03</internalNodes>\n          <leafValues>\n            -3.9482170343399048e-01 8.5598722100257874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 4.2680549621582031e-01</internalNodes>\n          <leafValues>\n            5.0977780483663082e-03 -5.9331178665161133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 1.1960650235414505e-01</internalNodes>\n          <leafValues>\n            2.7437770739197731e-02 -7.6616281270980835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 1.9571319222450256e-02</internalNodes>\n          <leafValues>\n            -1.1966180056333542e-01 2.3962239921092987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 -1.7432469874620438e-02</internalNodes>\n          <leafValues>\n            -5.8530348539352417e-01 5.6400340050458908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 596 -1.1196629703044891e-01</internalNodes>\n          <leafValues>\n            -6.7248320579528809e-01 2.9150659218430519e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 -4.5747519470751286e-03</internalNodes>\n          <leafValues>\n            -4.7730261087417603e-01 5.6612998247146606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 -5.1501519046723843e-03</internalNodes>\n          <leafValues>\n            1.1510629951953888e-01 -1.0732329636812210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 2.9034249484539032e-02</internalNodes>\n          <leafValues>\n            -5.3368709981441498e-02 6.4226460456848145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 -1.8050910439342260e-03</internalNodes>\n          <leafValues>\n            1.2795349955558777e-01 -1.2329389899969101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 -2.4374839849770069e-03</internalNodes>\n          <leafValues>\n            -3.5312348604202271e-01 8.7703153491020203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 -1.9070079550147057e-02</internalNodes>\n          <leafValues>\n            -4.0662440657615662e-01 4.3273188173770905e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 -5.0454240292310715e-02</internalNodes>\n          <leafValues>\n            -8.1198102235794067e-01 2.8289109468460083e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 1.6544000245630741e-03</internalNodes>\n          <leafValues>\n            -1.6964040696620941e-01 1.2194740027189255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 -4.6791311353445053e-02</internalNodes>\n          <leafValues>\n            4.0614441037178040e-01 -6.1174858361482620e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 -5.5953849107027054e-02</internalNodes>\n          <leafValues>\n            -8.2662910223007202e-01 2.7774749323725700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 1.4469559537246823e-03</internalNodes>\n          <leafValues>\n            -1.4953869581222534e-01 1.5966990590095520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 -1.2529050000011921e-02</internalNodes>\n          <leafValues>\n            -4.2504650354385376e-01 2.1658079698681831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 1.1086500016972423e-03</internalNodes>\n          <leafValues>\n            -3.6006990075111389e-01 6.4415097236633301e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 3.9361778646707535e-02</internalNodes>\n          <leafValues>\n            8.2419048994779587e-03 -7.5303071737289429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 1.8823929131031036e-02</internalNodes>\n          <leafValues>\n            4.4821120798587799e-02 -5.0604110956192017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 -3.2083000987768173e-02</internalNodes>\n          <leafValues>\n            3.1431311368942261e-01 -3.9181869477033615e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 -3.1081929802894592e-02</internalNodes>\n          <leafValues>\n            -7.6903742551803589e-01 3.0742960050702095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 2.3218210786581039e-02</internalNodes>\n          <leafValues>\n            -5.7748749852180481e-02 2.8955349326133728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 -1.1492100311443210e-03</internalNodes>\n          <leafValues>\n            1.1501409858465195e-01 -1.9310690462589264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 -1.6593940556049347e-02</internalNodes>\n          <leafValues>\n            -4.2298540472984314e-01 4.3738979846239090e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 -1.0146570391952991e-02</internalNodes>\n          <leafValues>\n            2.5579848885536194e-01 -9.1966241598129272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 -1.3054019771516323e-02</internalNodes>\n          <leafValues>\n            1.8339529633522034e-01 -4.0160831063985825e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 3.7463540211319923e-03</internalNodes>\n          <leafValues>\n            -1.2586769461631775e-01 2.2247019410133362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 -4.8463590443134308e-02</internalNodes>\n          <leafValues>\n            -5.8155900239944458e-01 2.9713390395045280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 6.4649381674826145e-03</internalNodes>\n          <leafValues>\n            9.3169108033180237e-02 -2.9046580195426941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 1.5607809647917747e-02</internalNodes>\n          <leafValues>\n            4.7331970185041428e-02 -4.4805559515953064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 -5.8314641937613487e-03</internalNodes>\n          <leafValues>\n            9.8941758275032043e-02 -2.2056859731674194e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 7.3607802391052246e-02</internalNodes>\n          <leafValues>\n            1.6780460253357887e-02 -5.4953122138977051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 -6.4223129302263260e-03</internalNodes>\n          <leafValues>\n            -2.9647961258888245e-01 7.3539912700653076e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 2.2267029635258950e-05</internalNodes>\n          <leafValues>\n            -3.4211820363998413e-01 4.1858270764350891e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 3.7273630499839783e-02</internalNodes>\n          <leafValues>\n            2.7458079159259796e-02 -7.8551971912384033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 4.2738770134747028e-03</internalNodes>\n          <leafValues>\n            -8.2514517009258270e-02 1.0404880344867706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 1.1906049912795424e-03</internalNodes>\n          <leafValues>\n            -1.6300439834594727e-01 1.5300649404525757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 8.7800435721874237e-03</internalNodes>\n          <leafValues>\n            -9.2885948717594147e-02 1.3147510588169098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 2.4151368997991085e-03</internalNodes>\n          <leafValues>\n            4.7598559409379959e-02 -4.4829669594764709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 -2.7428340166807175e-02</internalNodes>\n          <leafValues>\n            1.9811069965362549e-01 -5.5979698896408081e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 -1.4117059763520956e-03</internalNodes>\n          <leafValues>\n            -2.1138970553874969e-01 1.0409740358591080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 -2.0210200548171997e-01</internalNodes>\n          <leafValues>\n            -7.7120232582092285e-01 7.0582218468189240e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 -4.1451320052146912e-02</internalNodes>\n          <leafValues>\n            2.8295141458511353e-01 -7.1323528885841370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 4.8561887815594673e-03</internalNodes>\n          <leafValues>\n            8.6693897843360901e-02 -2.3541820049285889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 -4.4662880100077018e-05</internalNodes>\n          <leafValues>\n            1.3257139921188354e-01 -2.0168599486351013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 3.7671580910682678e-02</internalNodes>\n          <leafValues>\n            -7.4952289462089539e-02 3.3843380212783813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 7.4343256652355194e-02</internalNodes>\n          <leafValues>\n            3.2905030995607376e-02 -7.3536777496337891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 -1.0186419822275639e-02</internalNodes>\n          <leafValues>\n            -3.1277081370353699e-01 4.4163990765810013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 -2.4506879970431328e-02</internalNodes>\n          <leafValues>\n            -6.1346518993377686e-01 2.9692139476537704e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 -3.8238149136304855e-02</internalNodes>\n          <leafValues>\n            3.5583540797233582e-01 -4.8388618975877762e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 1.7983660101890564e-01</internalNodes>\n          <leafValues>\n            1.9501589238643646e-02 -9.8485881090164185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 8.4765878273174167e-04</internalNodes>\n          <leafValues>\n            -2.7960330247879028e-01 7.8323036432266235e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 3.7178809288889170e-03</internalNodes>\n          <leafValues>\n            7.2525441646575928e-02 -2.4067409336566925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 -9.0932317078113556e-02</internalNodes>\n          <leafValues>\n            -7.1539151668548584e-01 8.8080493733286858e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 -8.0087810754776001e-02</internalNodes>\n          <leafValues>\n            -6.7830717563629150e-01 2.4904320016503334e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 7.6924148015677929e-03</internalNodes>\n          <leafValues>\n            -5.0967499613761902e-02 1.1952529847621918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 4.1485231369733810e-02</internalNodes>\n          <leafValues>\n            -4.9493920058012009e-02 3.5386860370635986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 3.4051608294248581e-02</internalNodes>\n          <leafValues>\n            4.2200978845357895e-02 -5.0110721588134766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 -2.6235830038785934e-02</internalNodes>\n          <leafValues>\n            4.4934839010238647e-01 -4.1851200163364410e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 -5.1373958587646484e-02</internalNodes>\n          <leafValues>\n            -9.5942801237106323e-01 1.7192790284752846e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 -2.6742739602923393e-02</internalNodes>\n          <leafValues>\n            -6.5632241964340210e-01 2.1778080612421036e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 -1.3730529462918639e-03</internalNodes>\n          <leafValues>\n            -1.8638509511947632e-01 4.1139349341392517e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 1.0963230160996318e-03</internalNodes>\n          <leafValues>\n            -1.4219370484352112e-01 1.3832019269466400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 -4.5011811889708042e-03</internalNodes>\n          <leafValues>\n            -1.8468600511550903e-01 9.1024190187454224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 4.4253250234760344e-04</internalNodes>\n          <leafValues>\n            -1.2736940383911133e-01 1.3655360043048859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 3.0500710010528564e-02</internalNodes>\n          <leafValues>\n            -5.8146148920059204e-02 2.4189910292625427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 -1.1691919714212418e-01</internalNodes>\n          <leafValues>\n            -5.5466407537460327e-01 3.0249029397964478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 -9.5684931147843599e-04</internalNodes>\n          <leafValues>\n            5.1899868994951248e-02 -1.4152799546718597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 1.3096149777993560e-03</internalNodes>\n          <leafValues>\n            -1.4248229563236237e-01 1.2227780371904373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 3.4988880157470703e-02</internalNodes>\n          <leafValues>\n            2.7653129771351814e-02 -6.1738812923431396e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>82</maxWeakCount>\n      <stageThreshold>-1.9031070470809937e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 663 1.6489429771900177e-01</internalNodes>\n          <leafValues>\n            -2.5657209753990173e-01 4.1277718544006348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 2.0584860816597939e-02</internalNodes>\n          <leafValues>\n            -5.2442210912704468e-01 1.4910830557346344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 8.8764587417244911e-04</internalNodes>\n          <leafValues>\n            1.3334700465202332e-01 -5.2259522676467896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 -1.3320889556780457e-03</internalNodes>\n          <leafValues>\n            -3.6568748950958252e-01 2.0482279360294342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 7.7916197478771210e-02</internalNodes>\n          <leafValues>\n            -2.1557159721851349e-01 3.1069579720497131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 2.4321360979229212e-03</internalNodes>\n          <leafValues>\n            -4.4742551445960999e-01 1.0638339817523956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 -5.8699389919638634e-03</internalNodes>\n          <leafValues>\n            -3.8800778985023499e-01 1.4410589635372162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 6.9754302501678467e-02</internalNodes>\n          <leafValues>\n            1.3224910013377666e-02 -8.0096632242202759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 3.8338101003319025e-03</internalNodes>\n          <leafValues>\n            -4.3139308691024780e-01 1.4253990352153778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 -1.5829030424356461e-02</internalNodes>\n          <leafValues>\n            3.0954799056053162e-01 -1.2232720106840134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 6.6198296844959259e-02</internalNodes>\n          <leafValues>\n            -2.0558249950408936e-01 1.9531220197677612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 1.7639519646763802e-02</internalNodes>\n          <leafValues>\n            1.0770589858293533e-01 -4.3488320708274841e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 -1.1082629673182964e-02</internalNodes>\n          <leafValues>\n            -3.6149570345878601e-01 1.1327210068702698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 -3.6515299230813980e-02</internalNodes>\n          <leafValues>\n            -4.3912211060523987e-01 5.5279448628425598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 -3.3373299986124039e-02</internalNodes>\n          <leafValues>\n            -5.6869208812713623e-01 8.4043957293033600e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 678 8.1395559012889862e-02</internalNodes>\n          <leafValues>\n            -1.4235010743141174e-01 2.8748288750648499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 -4.3892292305827141e-03</internalNodes>\n          <leafValues>\n            -3.4859830141067505e-01 1.1650340259075165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 -6.3558202236890793e-03</internalNodes>\n          <leafValues>\n            -3.3823049068450928e-01 1.1005490273237228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 2.0912459120154381e-02</internalNodes>\n          <leafValues>\n            7.8197829425334930e-02 -4.6337550878524780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 1.1600360274314880e-01</internalNodes>\n          <leafValues>\n            -2.0528669655323029e-01 1.5923389792442322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 1.6316600143909454e-02</internalNodes>\n          <leafValues>\n            -1.0633999854326248e-01 3.3453521132469177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 -2.8488141298294067e-01</internalNodes>\n          <leafValues>\n            5.1638001203536987e-01 -3.9357859641313553e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 2.4155430495738983e-02</internalNodes>\n          <leafValues>\n            -7.1670228242874146e-01 5.0031550228595734e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 1.1413260363042355e-02</internalNodes>\n          <leafValues>\n            5.9236031025648117e-02 -3.8141900300979614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 -2.4304199963808060e-02</internalNodes>\n          <leafValues>\n            4.3475851416587830e-01 -8.6574159562587738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 -1.5267609851434827e-03</internalNodes>\n          <leafValues>\n            -6.4307600259780884e-01 5.1642779260873795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 1.0073349811136723e-02</internalNodes>\n          <leafValues>\n            7.5743027031421661e-02 -4.2902961373329163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 -8.1224881112575531e-02</internalNodes>\n          <leafValues>\n            -4.0827330946922302e-01 5.5444631725549698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 1.5149010345339775e-02</internalNodes>\n          <leafValues>\n            5.3084861487150192e-02 -5.4495412111282349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 -5.3490739315748215e-02</internalNodes>\n          <leafValues>\n            -4.7422149777412415e-01 3.9420779794454575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 -4.0884271264076233e-02</internalNodes>\n          <leafValues>\n            -8.8557797670364380e-01 3.2042708247900009e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 -4.2768509592860937e-04</internalNodes>\n          <leafValues>\n            -3.0554470419883728e-01 5.1432881504297256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 1.8441269174218178e-02</internalNodes>\n          <leafValues>\n            8.0688089132308960e-02 -3.5884049534797668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 -4.7630790621042252e-02</internalNodes>\n          <leafValues>\n            -4.6131908893585205e-01 6.0592770576477051e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 8.2442145794630051e-03</internalNodes>\n          <leafValues>\n            8.9793607592582703e-02 -3.7605780363082886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 1.0003759711980820e-01</internalNodes>\n          <leafValues>\n            -8.3760380744934082e-02 3.9221811294555664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 699 -2.8420550748705864e-02</internalNodes>\n          <leafValues>\n            -6.9483548402786255e-01 4.9100410193204880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 5.6485999375581741e-02</internalNodes>\n          <leafValues>\n            4.4795661233365536e-03 -7.5373399257659912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 1.0085420217365026e-03</internalNodes>\n          <leafValues>\n            -3.7881261110305786e-01 7.8376993536949158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 -1.2643639929592609e-03</internalNodes>\n          <leafValues>\n            7.5486026704311371e-02 -3.1015640497207642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 1.4146340079605579e-02</internalNodes>\n          <leafValues>\n            -8.1805020570755005e-02 3.7313848733901978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 -3.1549399718642235e-03</internalNodes>\n          <leafValues>\n            -2.1241660416126251e-01 8.9129790663719177e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 1.4796239556744695e-03</internalNodes>\n          <leafValues>\n            -2.1479040384292603e-01 1.3543279469013214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 -3.1343609094619751e-02</internalNodes>\n          <leafValues>\n            -5.8114588260650635e-01 4.8576328903436661e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 -7.6149761676788330e-02</internalNodes>\n          <leafValues>\n            -5.3774517774581909e-01 4.8339068889617920e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 -6.1668939888477325e-02</internalNodes>\n          <leafValues>\n            -8.4525662660598755e-01 1.7448999278713018e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 -2.7084920555353165e-02</internalNodes>\n          <leafValues>\n            -5.0659137964248657e-01 4.7709420323371887e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 -2.4240929633378983e-02</internalNodes>\n          <leafValues>\n            -3.8534450531005859e-01 5.0300780683755875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 711 4.1979398578405380e-02</internalNodes>\n          <leafValues>\n            -1.0378009825944901e-01 2.6236268877983093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 2.3717690259218216e-02</internalNodes>\n          <leafValues>\n            5.6897271424531937e-02 -2.8959441184997559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 -1.8669789656996727e-02</internalNodes>\n          <leafValues>\n            -3.9924529194831848e-01 7.3442213237285614e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 -1.4987000264227390e-02</internalNodes>\n          <leafValues>\n            -3.2296919822692871e-01 4.1676748543977737e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 8.7209865450859070e-03</internalNodes>\n          <leafValues>\n            1.3521389663219452e-01 -1.8224580585956573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 -1.2239219620823860e-02</internalNodes>\n          <leafValues>\n            1.5540809929370880e-01 -1.5208069980144501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 -4.8744980245828629e-02</internalNodes>\n          <leafValues>\n            -3.6606758832931519e-01 6.3152566552162170e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 -3.8249569479376078e-03</internalNodes>\n          <leafValues>\n            8.3472989499568939e-02 -2.4186329543590546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 1.5581659972667694e-01</internalNodes>\n          <leafValues>\n            3.1953960657119751e-02 -6.7813181877136230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 6.8241581320762634e-02</internalNodes>\n          <leafValues>\n            1.5478439629077911e-02 -4.2029750347137451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 -9.5974646508693695e-02</internalNodes>\n          <leafValues>\n            -9.5647841691970825e-01 2.1444590762257576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 -1.2618429958820343e-02</internalNodes>\n          <leafValues>\n            -5.0544857978820801e-01 3.0875260010361671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 7.2727642953395844e-02</internalNodes>\n          <leafValues>\n            4.7215349972248077e-02 -4.5075151324272156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 2.9923219233751297e-02</internalNodes>\n          <leafValues>\n            -8.1444352865219116e-02 3.1656229496002197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 1.9138090312480927e-02</internalNodes>\n          <leafValues>\n            6.8187400698661804e-02 -3.4876790642738342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 -3.4314721822738647e-02</internalNodes>\n          <leafValues>\n            -5.5220371484756470e-01 3.7325009703636169e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 5.2559198811650276e-03</internalNodes>\n          <leafValues>\n            6.4786978065967560e-02 -3.6363509297370911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 1.4092399738729000e-02</internalNodes>\n          <leafValues>\n            -4.8704359680414200e-02 2.7677831053733826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 -9.0101473033428192e-03</internalNodes>\n          <leafValues>\n            2.3452599346637726e-01 -1.3140350580215454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 9.6720218658447266e-02</internalNodes>\n          <leafValues>\n            2.6661360636353493e-02 -7.7422797679901123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 8.5365071892738342e-02</internalNodes>\n          <leafValues>\n            2.3529909551143646e-02 -7.0710861682891846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 2.4384429678320885e-02</internalNodes>\n          <leafValues>\n            -6.2648482620716095e-02 3.7251880764961243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 3.6380778998136520e-02</internalNodes>\n          <leafValues>\n            4.3358739465475082e-02 -6.0222417116165161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 -5.3780268877744675e-02</internalNodes>\n          <leafValues>\n            -3.3441001176834106e-01 3.5700578242540359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 -1.4787100255489349e-02</internalNodes>\n          <leafValues>\n            2.9136168956756592e-01 -7.4075296521186829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 1.2491010129451752e-03</internalNodes>\n          <leafValues>\n            4.1654240339994431e-02 -9.3758836388587952e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 -2.7572909370064735e-02</internalNodes>\n          <leafValues>\n            -3.1398218870162964e-01 7.2411999106407166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 -7.8866451978683472e-02</internalNodes>\n          <leafValues>\n            6.0655838251113892e-01 -2.3838050663471222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 -6.9339312613010406e-02</internalNodes>\n          <leafValues>\n            7.1137732267379761e-01 -2.9814269393682480e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 9.4372592866420746e-02</internalNodes>\n          <leafValues>\n            3.3579438924789429e-02 -5.9774041175842285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 -2.6048649102449417e-02</internalNodes>\n          <leafValues>\n            -4.0574911236763000e-01 5.5603530257940292e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 -7.3630206286907196e-02</internalNodes>\n          <leafValues>\n            -6.0780352354049683e-01 2.5251649320125580e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 -1.8610449507832527e-02</internalNodes>\n          <leafValues>\n            2.4013559520244598e-01 -9.5389783382415771e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 1.3329629600048065e-01</internalNodes>\n          <leafValues>\n            -6.9742381572723389e-02 1.3323000073432922e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>112</maxWeakCount>\n      <stageThreshold>-1.6909840106964111e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 745 -4.1724857874214649e-03</internalNodes>\n          <leafValues>\n            1.9310890138149261e-01 -4.9630740284919739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 9.6606701845303178e-04</internalNodes>\n          <leafValues>\n            -5.4340302944183350e-01 1.2434119731187820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 1.0261629940941930e-03</internalNodes>\n          <leafValues>\n            -4.6321579813957214e-01 1.1160290241241455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 3.6368470173329115e-03</internalNodes>\n          <leafValues>\n            8.2918949425220490e-02 -3.6662510037422180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 -2.8364539612084627e-03</internalNodes>\n          <leafValues>\n            -6.7365992069244385e-01 6.5546013414859772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 -1.0111520532518625e-03</internalNodes>\n          <leafValues>\n            1.4055189490318298e-01 -3.5270330309867859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 -2.5434889830648899e-03</internalNodes>\n          <leafValues>\n            1.4191180467605591e-01 -2.8350821137428284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 3.3014779910445213e-03</internalNodes>\n          <leafValues>\n            4.6553891152143478e-02 -4.8537290096282959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 -1.1802930384874344e-02</internalNodes>\n          <leafValues>\n            -3.7958830595016479e-01 9.2071913182735443e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 -1.3293370138853788e-03</internalNodes>\n          <leafValues>\n            1.7311429977416992e-01 -1.6890439391136169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 1.4958450198173523e-01</internalNodes>\n          <leafValues>\n            3.7626601755619049e-02 -8.0016881227493286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 1.6352189704775810e-03</internalNodes>\n          <leafValues>\n            -2.0858129858970642e-01 1.5985429286956787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 1.5483440365642309e-03</internalNodes>\n          <leafValues>\n            -1.7578269541263580e-01 1.7560100555419922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 -3.5674259066581726e-02</internalNodes>\n          <leafValues>\n            -4.6057531237602234e-01 4.3983791023492813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 -1.4558699913322926e-02</internalNodes>\n          <leafValues>\n            -3.3587411046028137e-01 8.3965480327606201e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 5.2891410887241364e-03</internalNodes>\n          <leafValues>\n            -3.5635179281234741e-01 9.4101972877979279e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 -9.8066125065088272e-04</internalNodes>\n          <leafValues>\n            -4.4301840662956238e-01 6.4368210732936859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 -4.0704999119043350e-02</internalNodes>\n          <leafValues>\n            -5.9700322151184082e-01 1.7846770584583282e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 2.9682040214538574e-02</internalNodes>\n          <leafValues>\n            3.8127020001411438e-02 -6.6795140504837036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 -1.7841320368461311e-04</internalNodes>\n          <leafValues>\n            7.4118576943874359e-02 -3.2121241092681885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 1.0050840210169554e-03</internalNodes>\n          <leafValues>\n            -2.0642249286174774e-01 1.2194109708070755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 -1.6711819916963577e-03</internalNodes>\n          <leafValues>\n            -2.6586419343948364e-01 7.1882687509059906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 -6.9955319166183472e-02</internalNodes>\n          <leafValues>\n            5.0097060203552246e-01 -5.2172549068927765e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 8.3406828343868256e-03</internalNodes>\n          <leafValues>\n            -6.9546110928058624e-02 1.6949440538883209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 1.5483159571886063e-02</internalNodes>\n          <leafValues>\n            -9.5865622162818909e-02 2.8736731410026550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 -4.2621988803148270e-02</internalNodes>\n          <leafValues>\n            -2.5160768628120422e-01 1.1381790041923523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 3.6459038965404034e-03</internalNodes>\n          <leafValues>\n            7.0138469338417053e-02 -4.0376278758049011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 -1.8889949424192309e-03</internalNodes>\n          <leafValues>\n            1.4695550501346588e-01 -1.7879849672317505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 -3.4749018959701061e-03</internalNodes>\n          <leafValues>\n            -2.4985860288143158e-01 1.0349679738283157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 -3.7792209535837173e-02</internalNodes>\n          <leafValues>\n            -6.5756058692932129e-01 2.3007599636912346e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 -4.0167139377444983e-04</internalNodes>\n          <leafValues>\n            1.4987960457801819e-01 -1.4527609944343567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 3.4890990704298019e-02</internalNodes>\n          <leafValues>\n            -4.5207828283309937e-02 5.1295852661132812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 -9.5964537467807531e-04</internalNodes>\n          <leafValues>\n            1.4688290655612946e-01 -1.7244540154933929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 -9.6461333334445953e-02</internalNodes>\n          <leafValues>\n            -7.1814310550689697e-01 3.2587919384241104e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 -1.1924919672310352e-03</internalNodes>\n          <leafValues>\n            1.3805310428142548e-01 -1.4162309467792511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 780 -1.6420070081949234e-02</internalNodes>\n          <leafValues>\n            -4.1954740881919861e-01 4.3040689080953598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 -6.1112269759178162e-02</internalNodes>\n          <leafValues>\n            3.7761390209197998e-01 -5.6264769285917282e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 -3.1682170927524567e-02</internalNodes>\n          <leafValues>\n            2.1038809418678284e-01 -5.4475009441375732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 -7.4058552272617817e-03</internalNodes>\n          <leafValues>\n            -1.8709950149059296e-01 1.0876149684190750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 -2.8892440604977310e-04</internalNodes>\n          <leafValues>\n            6.9734372198581696e-02 -2.4516759812831879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 -7.9921782016754150e-03</internalNodes>\n          <leafValues>\n            -2.4069899320602417e-01 8.8012270629405975e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 -6.4670671708881855e-03</internalNodes>\n          <leafValues>\n            2.0819950103759766e-01 -6.9062210619449615e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 -5.3345328196883202e-03</internalNodes>\n          <leafValues>\n            3.2469388842582703e-01 -7.4058808386325836e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 -6.7914440296590328e-03</internalNodes>\n          <leafValues>\n            -1.7014460265636444e-01 3.7378448992967606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 1.6337619721889496e-01</internalNodes>\n          <leafValues>\n            1.9682100042700768e-02 -9.1652041673660278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 1.1759659647941589e-01</internalNodes>\n          <leafValues>\n            8.8446342851966619e-04 -7.8050827980041504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 -1.1682280153036118e-01</internalNodes>\n          <leafValues>\n            -9.6009898185729980e-01 1.7070280387997627e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 4.6899251639842987e-02</internalNodes>\n          <leafValues>\n            4.7891899943351746e-02 -3.2044771313667297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 -4.0058898739516735e-03</internalNodes>\n          <leafValues>\n            1.1414390057325363e-01 -1.5711469948291779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 -4.4986438297200948e-05</internalNodes>\n          <leafValues>\n            2.9008099436759949e-01 -4.2413331568241119e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 2.1421080455183983e-03</internalNodes>\n          <leafValues>\n            -3.3137580752372742e-01 5.3943689912557602e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 -7.1408763527870178e-02</internalNodes>\n          <leafValues>\n            -8.8519471883773804e-01 9.3488330021500587e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 -1.3733670115470886e-01</internalNodes>\n          <leafValues>\n            -8.3241897821426392e-01 1.7800329253077507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 6.1765720602124929e-04</internalNodes>\n          <leafValues>\n            -1.9419220089912415e-01 6.8034619092941284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 -6.7170798778533936e-02</internalNodes>\n          <leafValues>\n            -5.7243210077285767e-01 3.0333630740642548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 2.4611391127109528e-03</internalNodes>\n          <leafValues>\n            -1.0570179671049118e-01 1.8801900744438171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 5.0573959015309811e-03</internalNodes>\n          <leafValues>\n            -6.5921753644943237e-02 2.9868951439857483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 1.4213779941201210e-02</internalNodes>\n          <leafValues>\n            6.3767880201339722e-02 -2.1217249333858490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 -2.0629619248211384e-03</internalNodes>\n          <leafValues>\n            -2.6714050769805908e-01 7.6817572116851807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 3.3787779510021210e-02</internalNodes>\n          <leafValues>\n            2.1774150431156158e-02 -7.4938130378723145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 -2.7371870353817940e-02</internalNodes>\n          <leafValues>\n            3.2008060812950134e-01 -5.9622511267662048e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 2.8310349211096764e-02</internalNodes>\n          <leafValues>\n            4.4150609523057938e-02 -4.4278699159622192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 3.7205279804766178e-03</internalNodes>\n          <leafValues>\n            -1.3136489689350128e-01 1.5447700023651123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 2.3320990148931742e-03</internalNodes>\n          <leafValues>\n            -1.0849229991436005e-01 2.2682890295982361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 7.6775359921157360e-03</internalNodes>\n          <leafValues>\n            4.9520388245582581e-02 -3.8854768872261047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 -2.9863099916838109e-04</internalNodes>\n          <leafValues>\n            -1.9632560014724731e-01 8.3448931574821472e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 6.1346050351858139e-03</internalNodes>\n          <leafValues>\n            5.1433250308036804e-02 -3.0831611156463623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 3.1090779229998589e-02</internalNodes>\n          <leafValues>\n            2.4180799722671509e-02 -6.0184460878372192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 2.9320400953292847e-01</internalNodes>\n          <leafValues>\n            1.1811030097305775e-02 -9.6253931522369385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 -6.6321907797828317e-04</internalNodes>\n          <leafValues>\n            1.0245270282030106e-01 -1.4200760424137115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 4.4736359268426895e-02</internalNodes>\n          <leafValues>\n            -1.1238799989223480e-01 1.7392039299011230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 -1.5153390355408192e-02</internalNodes>\n          <leafValues>\n            -1.6100360453128815e-01 3.1116949394345284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 -1.1029309825971723e-03</internalNodes>\n          <leafValues>\n            1.2128510326147079e-01 -1.6182290017604828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 -2.8973959852010012e-03</internalNodes>\n          <leafValues>\n            1.0827620327472687e-01 -5.3621310740709305e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -9.5785204321146011e-03</internalNodes>\n          <leafValues>\n            -1.6808320581912994e-01 8.5053622722625732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 9.9092386662960052e-02</internalNodes>\n          <leafValues>\n            -1.5469879843294621e-02 4.1138508915901184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 3.7229780107736588e-02</internalNodes>\n          <leafValues>\n            -5.2865970879793167e-02 3.1804299354553223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 -2.4716049432754517e-02</internalNodes>\n          <leafValues>\n            -4.0339410305023193e-01 2.9964840039610863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 -9.8965302109718323e-02</internalNodes>\n          <leafValues>\n            5.8510482311248779e-01 -2.6924170553684235e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 -9.6337851136922836e-03</internalNodes>\n          <leafValues>\n            -1.7467470467090607e-01 7.5126871466636658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 1.0483879595994949e-03</internalNodes>\n          <leafValues>\n            -1.3728469610214233e-01 1.0684580355882645e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 4.2523849755525589e-02</internalNodes>\n          <leafValues>\n            1.6578629612922668e-02 -5.6332737207412720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 827 -3.0866260640323162e-03</internalNodes>\n          <leafValues>\n            7.5264893472194672e-02 -1.9476540386676788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 2.8643399477005005e-02</internalNodes>\n          <leafValues>\n            -6.7578136920928955e-02 2.5766220688819885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 -1.0627339594066143e-02</internalNodes>\n          <leafValues>\n            -2.2384619712829590e-01 7.2172448039054871e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 4.6080970205366611e-03</internalNodes>\n          <leafValues>\n            5.0876080989837646e-02 -1.4076329767704010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 2.9914160259068012e-03</internalNodes>\n          <leafValues>\n            -9.7337983548641205e-02 1.7665959894657135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 -7.7902628108859062e-03</internalNodes>\n          <leafValues>\n            -9.8008237779140472e-02 3.7403069436550140e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 -6.1339238891378045e-04</internalNodes>\n          <leafValues>\n            9.9036023020744324e-02 -1.6265949606895447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 -1.0234319604933262e-02</internalNodes>\n          <leafValues>\n            2.3654979467391968e-01 -3.7817131727933884e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 -1.1867409572005272e-02</internalNodes>\n          <leafValues>\n            -8.5035067796707153e-01 1.9063299521803856e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 4.1437768377363682e-03</internalNodes>\n          <leafValues>\n            8.7878346443176270e-02 -9.4404630362987518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -5.1355729810893536e-03</internalNodes>\n          <leafValues>\n            -3.5699799656867981e-01 4.1546490043401718e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 838 -1.5296200290322304e-03</internalNodes>\n          <leafValues>\n            7.7694572508335114e-02 -4.3186578899621964e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 -2.7581020258367062e-03</internalNodes>\n          <leafValues>\n            1.9065889716148376e-01 -8.0679900944232941e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 2.8375169634819031e-01</internalNodes>\n          <leafValues>\n            6.2291761860251427e-03 -8.8578152656555176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 -2.4612499773502350e-01</internalNodes>\n          <leafValues>\n            -7.0548111200332642e-01 2.1798960864543915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 -3.9965631440281868e-03</internalNodes>\n          <leafValues>\n            -1.9710969924926758e-01 8.0300606787204742e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 -8.4951231256127357e-03</internalNodes>\n          <leafValues>\n            2.1296609938144684e-01 -8.2974627614021301e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 4.7206480056047440e-02</internalNodes>\n          <leafValues>\n            9.7466083243489265e-03 -7.0066297054290771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 3.7802560254931450e-03</internalNodes>\n          <leafValues>\n            7.7478893101215363e-02 -2.3372000455856323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 4.4631671160459518e-02</internalNodes>\n          <leafValues>\n            -2.1464770659804344e-02 3.2136338949203491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 6.8157288478687406e-04</internalNodes>\n          <leafValues>\n            1.2177070230245590e-01 -1.2063200026750565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 -6.9712452590465546e-02</internalNodes>\n          <leafValues>\n            -9.4828051328659058e-01 1.2017440050840378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 -4.8821792006492615e-03</internalNodes>\n          <leafValues>\n            -2.1774840354919434e-01 7.7113322913646698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 3.4387600608170033e-03</internalNodes>\n          <leafValues>\n            -1.8093569576740265e-01 9.3595556914806366e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 -2.5215700268745422e-02</internalNodes>\n          <leafValues>\n            -5.5714958906173706e-01 2.7420820668339729e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 7.4309771880507469e-03</internalNodes>\n          <leafValues>\n            -4.6630490571260452e-02 2.1024890244007111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 -1.5789959579706192e-02</internalNodes>\n          <leafValues>\n            -3.3443140983581543e-01 4.6291690319776535e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 3.5080160014331341e-03</internalNodes>\n          <leafValues>\n            -6.4612612128257751e-02 2.2737669944763184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 4.4291261583566666e-02</internalNodes>\n          <leafValues>\n            2.2642729803919792e-02 -7.0683121681213379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 1.9108189269900322e-02</internalNodes>\n          <leafValues>\n            -3.5893321037292480e-02 1.4613699913024902e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>99</maxWeakCount>\n      <stageThreshold>-1.8724700212478638e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 857 -1.6636669635772705e-02</internalNodes>\n          <leafValues>\n            2.5966519117355347e-01 -4.1162249445915222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 2.9865810647606850e-02</internalNodes>\n          <leafValues>\n            -3.3182668685913086e-01 2.0545999705791473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 9.1892024502158165e-03</internalNodes>\n          <leafValues>\n            -3.4481799602508545e-01 1.8148690462112427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 2.8450509998947382e-03</internalNodes>\n          <leafValues>\n            -3.2904830574989319e-01 9.4392292201519012e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 3.4257639199495316e-02</internalNodes>\n          <leafValues>\n            -3.2212799787521362e-01 1.7332050204277039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 3.4367710351943970e-02</internalNodes>\n          <leafValues>\n            -3.2593810558319092e-01 1.7473269999027252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 9.0881884098052979e-03</internalNodes>\n          <leafValues>\n            1.0527010262012482e-01 -4.8131370544433594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 -5.0939731299877167e-03</internalNodes>\n          <leafValues>\n            1.7374989390373230e-01 -2.7883121371269226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 1.1773620499297976e-03</internalNodes>\n          <leafValues>\n            -4.2217200994491577e-01 1.0231760144233704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 3.6797609180212021e-02</internalNodes>\n          <leafValues>\n            1.1229369789361954e-01 -3.8409191370010376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 -7.2484882548451424e-04</internalNodes>\n          <leafValues>\n            -4.4795128703117371e-01 8.5079587996006012e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 1.2603210285305977e-02</internalNodes>\n          <leafValues>\n            6.0475040227174759e-02 -3.5327509045600891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 5.1925552543252707e-04</internalNodes>\n          <leafValues>\n            -3.1916388869285583e-01 1.1903370171785355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 -1.3244180008769035e-02</internalNodes>\n          <leafValues>\n            2.1975730359554291e-01 -9.5025591552257538e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 -2.7882310096174479e-03</internalNodes>\n          <leafValues>\n            -2.7294808626174927e-01 1.2419769912958145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 2.6591470465064049e-02</internalNodes>\n          <leafValues>\n            6.0452010482549667e-02 -3.9637029170989990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 1.2505210004746914e-02</internalNodes>\n          <leafValues>\n            7.8631103038787842e-02 -4.0303888916969299e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 -1.3857340440154076e-02</internalNodes>\n          <leafValues>\n            2.5759750604629517e-01 -1.0351459681987762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 7.2099752724170685e-02</internalNodes>\n          <leafValues>\n            -5.5193781852722168e-01 6.0020800679922104e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 -9.8338630050420761e-04</internalNodes>\n          <leafValues>\n            -3.1915199756622314e-01 8.7977647781372070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 -5.8390170335769653e-02</internalNodes>\n          <leafValues>\n            -5.5988979339599609e-01 5.2990190684795380e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 4.2504342272877693e-03</internalNodes>\n          <leafValues>\n            -2.8897258639335632e-01 9.2816516757011414e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 -3.2332520931959152e-02</internalNodes>\n          <leafValues>\n            -4.8713520169258118e-01 6.0787629336118698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 4.7365639358758926e-02</internalNodes>\n          <leafValues>\n            -1.0111550241708755e-01 3.2597780227661133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 -3.8943330291658640e-03</internalNodes>\n          <leafValues>\n            1.9173160195350647e-01 -1.6729380190372467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 5.7729199528694153e-02</internalNodes>\n          <leafValues>\n            3.6343291401863098e-02 -7.3161131143569946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 -1.8925540149211884e-02</internalNodes>\n          <leafValues>\n            3.2471498847007751e-01 -8.6188063025474548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 -3.9679601788520813e-02</internalNodes>\n          <leafValues>\n            -4.1826680302619934e-01 5.3354211151599884e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 -2.0733650773763657e-02</internalNodes>\n          <leafValues>\n            -4.1205188632011414e-01 6.3596852123737335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 1.5387910604476929e-01</internalNodes>\n          <leafValues>\n            1.9954150542616844e-02 -5.7643288373947144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 1.2131260335445404e-01</internalNodes>\n          <leafValues>\n            4.4516459107398987e-02 -5.9093242883682251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 2.7478559786686674e-05</internalNodes>\n          <leafValues>\n            -4.0688499808311462e-01 5.2828099578619003e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 8.8893681764602661e-02</internalNodes>\n          <leafValues>\n            5.1985241472721100e-02 -5.0228989124298096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 2.8169099241495132e-03</internalNodes>\n          <leafValues>\n            6.7726433277130127e-02 -1.3582049310207367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 -1.7215269326698035e-04</internalNodes>\n          <leafValues>\n            8.9616917073726654e-02 -2.9589369893074036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 -3.1830620020627975e-02</internalNodes>\n          <leafValues>\n            -5.6433600187301636e-01 2.2822249680757523e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 -6.3334330916404724e-02</internalNodes>\n          <leafValues>\n            -8.2371699810028076e-01 2.7576120570302010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 -6.9032818078994751e-02</internalNodes>\n          <leafValues>\n            -6.9788217544555664e-01 3.3770920708775520e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 2.1021519787609577e-03</internalNodes>\n          <leafValues>\n            -2.7244049310684204e-01 8.6922891438007355e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 3.4065779298543930e-02</internalNodes>\n          <leafValues>\n            1.7670579254627228e-02 -4.3001320958137512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 8.1215314567089081e-03</internalNodes>\n          <leafValues>\n            -1.5942670404911041e-01 1.6256070137023926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 -1.6329119680449367e-03</internalNodes>\n          <leafValues>\n            4.2009588330984116e-02 -3.2923451066017151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 -3.9110329002141953e-02</internalNodes>\n          <leafValues>\n            -6.0666251182556152e-01 4.1248850524425507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 -2.3188870400190353e-02</internalNodes>\n          <leafValues>\n            -5.5365419387817383e-01 1.7315510660409927e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 -6.2944158911705017e-02</internalNodes>\n          <leafValues>\n            -5.3853708505630493e-01 4.1758351027965546e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 -8.5414372384548187e-02</internalNodes>\n          <leafValues>\n            -9.3122452497482300e-01 -9.1123272432014346e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 -4.1963338851928711e-02</internalNodes>\n          <leafValues>\n            -5.6720697879791260e-01 3.9175700396299362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 1.1165619827806950e-02</internalNodes>\n          <leafValues>\n            -6.7815810441970825e-02 2.9003840684890747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 -1.3730769976973534e-02</internalNodes>\n          <leafValues>\n            3.2328099012374878e-01 -1.0592839866876602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 -7.5793050229549408e-02</internalNodes>\n          <leafValues>\n            5.5545729398727417e-01 -3.2934208866208792e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 2.7008100878447294e-03</internalNodes>\n          <leafValues>\n            1.5311180055141449e-01 -1.6604180634021759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 1.0164660401642323e-02</internalNodes>\n          <leafValues>\n            7.6404631137847900e-02 -2.8745749592781067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 -5.9808149933815002e-02</internalNodes>\n          <leafValues>\n            -7.3486739397048950e-01 3.0370820313692093e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 9.6447616815567017e-02</internalNodes>\n          <leafValues>\n            2.6198839768767357e-02 -6.6001427173614502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 3.2350219786167145e-02</internalNodes>\n          <leafValues>\n            4.1407719254493713e-02 -4.7442498803138733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 2.3717279732227325e-01</internalNodes>\n          <leafValues>\n            -9.5941081643104553e-02 2.4070499837398529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 -4.0942471474409103e-02</internalNodes>\n          <leafValues>\n            -4.0582120418548584e-01 6.4327560365200043e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 -3.4409161657094955e-02</internalNodes>\n          <leafValues>\n            -7.4849551916122437e-01 2.2520760074257851e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 915 1.3847379386425018e-01</internalNodes>\n          <leafValues>\n            2.8472309932112694e-02 -7.0612120628356934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 4.6567160636186600e-02</internalNodes>\n          <leafValues>\n            -4.1168119758367538e-02 6.9962567090988159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 -3.0492639169096947e-02</internalNodes>\n          <leafValues>\n            -6.5116977691650391e-01 3.9995279163122177e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 8.6345896124839783e-03</internalNodes>\n          <leafValues>\n            -1.1207970231771469e-01 7.7241696417331696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 3.1845968216657639e-02</internalNodes>\n          <leafValues>\n            -1.1552079766988754e-01 1.7539389431476593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 1.7124590277671814e-01</internalNodes>\n          <leafValues>\n            5.0687979906797409e-02 -4.7042238712310791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 5.2879499271512032e-03</internalNodes>\n          <leafValues>\n            6.5041497349739075e-02 -2.8894019126892090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 1.0060779750347137e-02</internalNodes>\n          <leafValues>\n            6.3689216971397400e-02 -2.6081889867782593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 3.3330768346786499e-02</internalNodes>\n          <leafValues>\n            3.4809298813343048e-02 -5.7845467329025269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 -5.2802279591560364e-02</internalNodes>\n          <leafValues>\n            -6.8521040678024292e-01 1.7583779990673065e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -1.5452199615538120e-02</internalNodes>\n          <leafValues>\n            3.1395891308784485e-01 -7.7611543238162994e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 -6.5528601408004761e-04</internalNodes>\n          <leafValues>\n            5.6181360036134720e-02 -1.5184390544891357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 3.7062149494886398e-02</internalNodes>\n          <leafValues>\n            2.8928549960255623e-02 -7.0487600564956665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 -5.7728089392185211e-02</internalNodes>\n          <leafValues>\n            -4.3192410469055176e-01 9.2153800651431084e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 -2.2813139948993921e-03</internalNodes>\n          <leafValues>\n            1.0200300067663193e-01 -2.1657040715217590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 2.6513230055570602e-02</internalNodes>\n          <leafValues>\n            -8.3650946617126465e-02 3.0740359425544739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 7.3622196912765503e-02</internalNodes>\n          <leafValues>\n            3.0683049932122231e-02 -7.1910232305526733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 -1.3022350147366524e-02</internalNodes>\n          <leafValues>\n            -3.6386561393737793e-01 2.5367209687829018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 -1.3319820165634155e-02</internalNodes>\n          <leafValues>\n            -5.1884061098098755e-01 3.5935029387474060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 2.3190369829535484e-03</internalNodes>\n          <leafValues>\n            -6.1515200883150101e-02 7.1100451052188873e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 -2.1372830495238304e-02</internalNodes>\n          <leafValues>\n            -5.0247579813003540e-01 3.9844810962677002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 2.4474589154124260e-02</internalNodes>\n          <leafValues>\n            -4.7960858792066574e-02 2.6931110024452209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 -1.0679869912564754e-02</internalNodes>\n          <leafValues>\n            3.1474280357360840e-01 -8.4758952260017395e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 4.8961799591779709e-02</internalNodes>\n          <leafValues>\n            2.7358099818229675e-02 -3.8229361176490784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 3.2376348972320557e-02</internalNodes>\n          <leafValues>\n            -4.7090999782085419e-02 4.5985230803489685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 -1.0995220392942429e-02</internalNodes>\n          <leafValues>\n            -1.8544240295886993e-01 3.6006979644298553e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 1.7626030743122101e-01</internalNodes>\n          <leafValues>\n            2.4375159293413162e-02 -7.7686601877212524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 7.9778492450714111e-02</internalNodes>\n          <leafValues>\n            3.3787339925765991e-03 -7.2928887605667114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 -1.1329210363328457e-02</internalNodes>\n          <leafValues>\n            -4.6397671103477478e-01 3.9380829781293869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 6.3431300222873688e-02</internalNodes>\n          <leafValues>\n            -9.7074061632156372e-02 1.0118869692087173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 -1.2691849842667580e-02</internalNodes>\n          <leafValues>\n            2.8142300248146057e-01 -7.2105713188648224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 -7.8238412737846375e-02</internalNodes>\n          <leafValues>\n            5.7400637865066528e-01 -1.8400549888610840e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 3.9532519876956940e-02</internalNodes>\n          <leafValues>\n            4.3154988437891006e-02 -5.2327841520309448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 1.5355779789388180e-02</internalNodes>\n          <leafValues>\n            -4.7316178679466248e-02 4.6925771236419678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 -6.4018620178103447e-03</internalNodes>\n          <leafValues>\n            1.3297230005264282e-01 -1.4365619421005249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 -1.0567340254783630e-01</internalNodes>\n          <leafValues>\n            2.0206320285797119e-01 -1.4406460337340832e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 2.8163839131593704e-02</internalNodes>\n          <leafValues>\n            7.1180991828441620e-02 -3.1034231185913086e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 1.1702980101108551e-01</internalNodes>\n          <leafValues>\n            1.1619930155575275e-02 -7.1530961990356445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 -3.8921568542718887e-02</internalNodes>\n          <leafValues>\n            2.4412679672241211e-01 -8.2244850695133209e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 -2.8435489162802696e-02</internalNodes>\n          <leafValues>\n            -3.6785170435905457e-01 3.8488820195198059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 -3.6393549293279648e-02</internalNodes>\n          <leafValues>\n            5.2206730842590332e-01 -4.7079380601644516e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>139</maxWeakCount>\n      <stageThreshold>-1.7121059894561768e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 956 -2.1428510546684265e-02</internalNodes>\n          <leafValues>\n            1.9014079868793488e-01 -5.0612741708755493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 2.0596129819750786e-02</internalNodes>\n          <leafValues>\n            -2.9283228516578674e-01 2.4655179679393768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 2.7893469668924809e-03</internalNodes>\n          <leafValues>\n            1.1085920035839081e-01 -4.6909829974174500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 4.4722640886902809e-03</internalNodes>\n          <leafValues>\n            -2.8250780701637268e-01 1.4564670622348785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 -1.0463190264999866e-03</internalNodes>\n          <leafValues>\n            -2.6603269577026367e-01 1.2815919518470764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 1.5831940108910203e-03</internalNodes>\n          <leafValues>\n            -6.3467299938201904e-01 7.1003831923007965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 -7.3153319135599304e-06</internalNodes>\n          <leafValues>\n            1.0248930007219315e-01 -3.4815961122512817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 5.4208859801292419e-03</internalNodes>\n          <leafValues>\n            5.9830531477928162e-02 -3.1387779116630554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 1.2645759852603078e-03</internalNodes>\n          <leafValues>\n            -2.2709150612354279e-01 1.3160009682178497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 3.0235300073400140e-05</internalNodes>\n          <leafValues>\n            -2.6413309574127197e-01 2.8918080031871796e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 1.5345469582825899e-03</internalNodes>\n          <leafValues>\n            -4.0711951255798340e-01 6.9787837564945221e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 6.8222070112824440e-03</internalNodes>\n          <leafValues>\n            -1.5069720149040222e-01 2.1888419985771179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 -9.8558319732546806e-03</internalNodes>\n          <leafValues>\n            -3.5441368818283081e-01 8.6026392877101898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 -2.9890429228544235e-02</internalNodes>\n          <leafValues>\n            2.2117440402507782e-01 -2.8611009940505028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 -2.6285760104656219e-03</internalNodes>\n          <leafValues>\n            9.8204180598258972e-02 -2.7149739861488342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 3.2039839425124228e-04</internalNodes>\n          <leafValues>\n            -9.8540462553501129e-02 1.8785539269447327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 1.1079469695687294e-03</internalNodes>\n          <leafValues>\n            6.4034536480903625e-02 -4.3082669377326965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 973 -9.1538369655609131e-02</internalNodes>\n          <leafValues>\n            -5.2440929412841797e-01 1.2250489555299282e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 4.3205898255109787e-02</internalNodes>\n          <leafValues>\n            9.6655867993831635e-02 -2.6809310913085938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 9.1920839622616768e-04</internalNodes>\n          <leafValues>\n            -1.3260160386562347e-01 1.2358319759368896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 8.9521165937185287e-03</internalNodes>\n          <leafValues>\n            8.6445420980453491e-02 -2.3219430446624756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 977 5.6190020404756069e-03</internalNodes>\n          <leafValues>\n            -6.0304049402475357e-02 1.5070669353008270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 3.7380240391939878e-03</internalNodes>\n          <leafValues>\n            -1.8652540445327759e-01 1.3011780381202698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 -4.4416960328817368e-02</internalNodes>\n          <leafValues>\n            1.9036759436130524e-01 -1.7527159303426743e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 1.9832739606499672e-02</internalNodes>\n          <leafValues>\n            -5.3527630865573883e-02 4.0238130092620850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 1.2155610136687756e-02</internalNodes>\n          <leafValues>\n            9.1288566589355469e-02 -2.6862761378288269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 5.0532341003417969e-02</internalNodes>\n          <leafValues>\n            3.1295180320739746e-02 -6.2836539745330811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 -1.7635909607633948e-03</internalNodes>\n          <leafValues>\n            5.6185219436883926e-02 -2.1861009299755096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 4.9412921071052551e-03</internalNodes>\n          <leafValues>\n            5.5915899574756622e-02 -3.5954388976097107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 -1.1536119878292084e-01</internalNodes>\n          <leafValues>\n            -5.3168737888336182e-01 7.9654296860098839e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 -2.0473708864301443e-03</internalNodes>\n          <leafValues>\n            7.9633012413978577e-02 -2.5389900803565979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 4.7814860008656979e-03</internalNodes>\n          <leafValues>\n            -9.4149880111217499e-02 1.1631009727716446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 2.1274939179420471e-02</internalNodes>\n          <leafValues>\n            -4.7486610710620880e-02 3.7564519047737122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 5.1177050918340683e-03</internalNodes>\n          <leafValues>\n            7.4936643242835999e-02 -2.6105350255966187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 990 -1.3952000066637993e-02</internalNodes>\n          <leafValues>\n            2.3960170149803162e-01 -9.6836768090724945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 991 -1.3828179799020290e-02</internalNodes>\n          <leafValues>\n            -3.9605268836021423e-01 5.8639749884605408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 992 -4.7117020934820175e-02</internalNodes>\n          <leafValues>\n            -5.5717539787292480e-01 3.1678650528192520e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 993 1.0515590198338032e-02</internalNodes>\n          <leafValues>\n            -4.3930530548095703e-02 8.5277959704399109e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 994 4.0591089054942131e-03</internalNodes>\n          <leafValues>\n            -1.0774219781160355e-01 1.6283099353313446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 995 -3.0376210808753967e-02</internalNodes>\n          <leafValues>\n            2.0997379720211029e-01 -9.9417790770530701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 996 -6.6932791378349066e-04</internalNodes>\n          <leafValues>\n            -3.4863340854644775e-01 5.9148021042346954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 997 -1.4665089547634125e-02</internalNodes>\n          <leafValues>\n            -4.3786540627479553e-01 2.8008179739117622e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 998 -3.5847770050168037e-03</internalNodes>\n          <leafValues>\n            9.6611537039279938e-02 -1.7948310077190399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 999 -5.5043050087988377e-03</internalNodes>\n          <leafValues>\n            -3.3546659350395203e-01 7.5057849287986755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1000 1.0141800157725811e-03</internalNodes>\n          <leafValues>\n            -1.8602859973907471e-01 8.6880050599575043e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1001 1.4642399735748768e-02</internalNodes>\n          <leafValues>\n            2.6652090251445770e-02 -2.6002681255340576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1002 -5.8538499288260937e-03</internalNodes>\n          <leafValues>\n            -1.4993189275264740e-01 1.2684640288352966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1003 -5.3472168743610382e-02</internalNodes>\n          <leafValues>\n            5.2131122350692749e-01 -2.0375749096274376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1004 -7.6695926487445831e-02</internalNodes>\n          <leafValues>\n            4.5817071199417114e-01 -3.4876950085163116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1005 -5.9094227617606521e-04</internalNodes>\n          <leafValues>\n            1.1570499837398529e-01 -1.2966969609260559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1006 -4.3543361127376556e-02</internalNodes>\n          <leafValues>\n            -8.2132732868194580e-01 2.0535599440336227e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1007 5.0691701471805573e-02</internalNodes>\n          <leafValues>\n            -3.6280639469623566e-02 4.0212449431419373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1008 1.3124669902026653e-02</internalNodes>\n          <leafValues>\n            -8.3614267408847809e-02 2.0441520214080811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1009 3.5445049405097961e-01</internalNodes>\n          <leafValues>\n            1.4580509625375271e-02 -5.6883698701858521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1010 -2.1929910406470299e-02</internalNodes>\n          <leafValues>\n            1.6368280351161957e-01 -1.0018540173768997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1011 3.8168739527463913e-02</internalNodes>\n          <leafValues>\n            3.5331390798091888e-02 -5.3782612085342407e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1012 6.3126571476459503e-03</internalNodes>\n          <leafValues>\n            5.6145761162042618e-02 -2.8158029913902283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1013 -4.3002668768167496e-02</internalNodes>\n          <leafValues>\n            -6.4804542064666748e-01 1.7478020861744881e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1014 2.4681850336492062e-03</internalNodes>\n          <leafValues>\n            -1.1719709634780884e-01 1.3693059980869293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1015 4.5261289924383163e-02</internalNodes>\n          <leafValues>\n            1.5927750617265701e-02 -7.1915590763092041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1016 -4.2067110538482666e-02</internalNodes>\n          <leafValues>\n            -6.4201879501342773e-01 2.0196499302983284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1017 3.9601750904694200e-04</internalNodes>\n          <leafValues>\n            -3.1774568557739258e-01 7.6843477785587311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1018 -1.2469319626688957e-02</internalNodes>\n          <leafValues>\n            1.9531419873237610e-01 -7.8799232840538025e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1019 7.9188523814082146e-03</internalNodes>\n          <leafValues>\n            5.6721080094575882e-02 -2.6906439661979675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1020 -6.2929331324994564e-03</internalNodes>\n          <leafValues>\n            1.5688340365886688e-01 -9.9287010729312897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1021 2.2974120453000069e-02</internalNodes>\n          <leafValues>\n            -6.6930226981639862e-02 2.4427099525928497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1022 -9.1710267588496208e-03</internalNodes>\n          <leafValues>\n            -2.9078531265258789e-01 5.9312019497156143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1023 -9.5892272889614105e-02</internalNodes>\n          <leafValues>\n            -6.3700878620147705e-01 1.3278760015964508e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1024 5.6696119718253613e-03</internalNodes>\n          <leafValues>\n            5.6131001561880112e-02 -2.9535120725631714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1025 -1.3495329767465591e-02</internalNodes>\n          <leafValues>\n            2.0205779373645782e-01 -6.3128583133220673e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1026 1.6108239069581032e-02</internalNodes>\n          <leafValues>\n            4.5092061161994934e-02 -3.6163818836212158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1027 1.1768710101023316e-03</internalNodes>\n          <leafValues>\n            -1.9879919290542603e-01 1.3078540563583374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1028 1.4128970215097070e-03</internalNodes>\n          <leafValues>\n            -2.0856089890003204e-01 8.1473708152770996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1029 -4.3028060346841812e-02</internalNodes>\n          <leafValues>\n            -2.8687548637390137e-01 2.9704660177230835e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1030 -1.0961409658193588e-02</internalNodes>\n          <leafValues>\n            4.8846191167831421e-01 -3.5002779215574265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1031 -4.5575079275295138e-04</internalNodes>\n          <leafValues>\n            1.0644569993019104e-01 -1.0506340116262436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1032 -5.0013329833745956e-02</internalNodes>\n          <leafValues>\n            -8.2039457559585571e-01 1.8604470416903496e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1033 -4.6841200441122055e-02</internalNodes>\n          <leafValues>\n            -8.6972111463546753e-01 3.9388639852404594e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1034 -8.0362131120637059e-04</internalNodes>\n          <leafValues>\n            1.4196899533271790e-01 -1.2184119969606400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1035 1.9802400842308998e-02</internalNodes>\n          <leafValues>\n            4.0857948362827301e-02 -3.6116421222686768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1036 2.1874029189348221e-02</internalNodes>\n          <leafValues>\n            -5.8230601251125336e-02 2.4490930140018463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1037 3.2371848821640015e-02</internalNodes>\n          <leafValues>\n            2.6172259822487831e-02 -4.0803569555282593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1038 -7.0319771766662598e-03</internalNodes>\n          <leafValues>\n            -2.5175130367279053e-01 6.0090810060501099e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1039 2.6019799988716841e-03</internalNodes>\n          <leafValues>\n            -7.0827886462211609e-02 2.0735129714012146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1040 -3.1531439162790775e-03</internalNodes>\n          <leafValues>\n            1.7268289625644684e-01 -1.1326900124549866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1041 5.8357551693916321e-02</internalNodes>\n          <leafValues>\n            1.4668770134449005e-02 -9.2907238006591797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1042 3.6941959988325834e-03</internalNodes>\n          <leafValues>\n            6.6812008619308472e-02 -2.0454549789428711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1043 1.8183739855885506e-02</internalNodes>\n          <leafValues>\n            -3.5921659320592880e-02 2.3765130341053009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1044 -4.4514648616313934e-03</internalNodes>\n          <leafValues>\n            -1.8156670033931732e-01 8.0072969198226929e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1045 3.5554010421037674e-02</internalNodes>\n          <leafValues>\n            1.1413309723138809e-02 -3.9503180980682373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1046 1.6067499294877052e-02</internalNodes>\n          <leafValues>\n            -4.9147009849548340e-02 3.0306708812713623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1047 3.6372188478708267e-02</internalNodes>\n          <leafValues>\n            2.3675160482525826e-02 -6.8069261312484741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1048 -7.4834008701145649e-03</internalNodes>\n          <leafValues>\n            2.4146680533885956e-01 -5.8301728218793869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1049 -7.2762509807944298e-03</internalNodes>\n          <leafValues>\n            -2.2373069822788239e-01 5.0284590572118759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1050 -4.7946218401193619e-03</internalNodes>\n          <leafValues>\n            -2.1922710537910461e-01 6.6698201000690460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1051 -1.3066439889371395e-02</internalNodes>\n          <leafValues>\n            2.2604539990425110e-01 -3.7037428468465805e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1052 2.3257338907569647e-03</internalNodes>\n          <leafValues>\n            -8.1509239971637726e-02 2.3270750045776367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1053 -1.1436239816248417e-02</internalNodes>\n          <leafValues>\n            6.7732691764831543e-02 -3.3069651573896408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1054 6.7957569845020771e-03</internalNodes>\n          <leafValues>\n            9.3188859522342682e-02 -1.8542419373989105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1055 -5.2705928683280945e-02</internalNodes>\n          <leafValues>\n            4.0707829594612122e-01 -2.5846559554338455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1056 1.2774269282817841e-01</internalNodes>\n          <leafValues>\n            1.7207339406013489e-02 -8.8952672481536865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1057 -2.7999880909919739e-01</internalNodes>\n          <leafValues>\n            -9.1963422298431396e-01 2.5054879370145500e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1058 1.2669020332396030e-02</internalNodes>\n          <leafValues>\n            -7.3152393102645874e-02 2.0872280001640320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1059 -1.5894599258899689e-02</internalNodes>\n          <leafValues>\n            1.1266420036554337e-01 -4.0140561759471893e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1060 5.3938169032335281e-02</internalNodes>\n          <leafValues>\n            3.0137389898300171e-02 -5.0454300642013550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1061 7.3805922875180840e-04</internalNodes>\n          <leafValues>\n            -3.5923779010772705e-01 3.3418480306863785e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1062 4.7065159305930138e-03</internalNodes>\n          <leafValues>\n            4.4195190072059631e-01 -3.9396088570356369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1063 3.0945870094001293e-03</internalNodes>\n          <leafValues>\n            -7.1224376559257507e-02 1.2306260317564011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1064 -3.2640039920806885e-02</internalNodes>\n          <leafValues>\n            -4.4644719362258911e-01 3.4509830176830292e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1065 -7.8390557318925858e-03</internalNodes>\n          <leafValues>\n            -9.9895596504211426e-02 3.3491879701614380e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1066 7.6504289172589779e-03</internalNodes>\n          <leafValues>\n            5.5107340216636658e-02 -2.4002109467983246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1067 3.8153179921209812e-03</internalNodes>\n          <leafValues>\n            -5.7143520563840866e-02 1.7120680212974548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1068 1.4295349828898907e-02</internalNodes>\n          <leafValues>\n            -5.5747661739587784e-02 2.6719009876251221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1069 -1.8241480574943125e-04</internalNodes>\n          <leafValues>\n            4.7362379729747772e-02 -2.1473219990730286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1070 -3.1916480511426926e-02</internalNodes>\n          <leafValues>\n            -1.4398300647735596e-01 9.2526309192180634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1071 -7.6755490154027939e-03</internalNodes>\n          <leafValues>\n            1.2513080239295959e-01 -5.2855581045150757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1072 1.4152109622955322e-02</internalNodes>\n          <leafValues>\n            -5.8198999613523483e-02 2.4444380402565002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1073 -1.6701059415936470e-02</internalNodes>\n          <leafValues>\n            -3.0269339680671692e-01 2.5713469833135605e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1074 3.5869849380105734e-03</internalNodes>\n          <leafValues>\n            -1.1999790370464325e-01 1.2468840181827545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1075 3.7683059927076101e-03</internalNodes>\n          <leafValues>\n            5.0271350890398026e-02 -2.0477029681205750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1076 9.9043175578117371e-04</internalNodes>\n          <leafValues>\n            -8.5413850843906403e-02 1.6316239535808563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1077 9.3151312321424484e-03</internalNodes>\n          <leafValues>\n            9.4177378341555595e-03 -3.5209101438522339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1078 -1.5002860163804144e-04</internalNodes>\n          <leafValues>\n            8.3480976521968842e-02 -1.7047779262065887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1079 8.7790598627179861e-04</internalNodes>\n          <leafValues>\n            -1.1054719984531403e-01 1.1750820279121399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1080 -3.7630271166563034e-02</internalNodes>\n          <leafValues>\n            5.0325840711593628e-01 -2.6165060698986053e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1081 5.6488867849111557e-03</internalNodes>\n          <leafValues>\n            7.4713237583637238e-02 -1.4058519899845123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1082 -1.4621330192312598e-03</internalNodes>\n          <leafValues>\n            6.7465327680110931e-02 -2.0143230259418488e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1083 5.3189881145954132e-03</internalNodes>\n          <leafValues>\n            -3.5997938364744186e-02 3.7376481294631958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1084 2.1019520238041878e-02</internalNodes>\n          <leafValues>\n            2.7063809335231781e-02 -5.0199657678604126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1085 -1.1328969895839691e-01</internalNodes>\n          <leafValues>\n            -7.4395442008972168e-01 1.3778089545667171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1086 -6.1144838109612465e-03</internalNodes>\n          <leafValues>\n            1.4044840633869171e-01 -8.7939672172069550e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1087 -7.7648349106311798e-03</internalNodes>\n          <leafValues>\n            -1.4341640472412109e-01 4.3061099946498871e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1088 -9.1335996985435486e-02</internalNodes>\n          <leafValues>\n            -6.3246071338653564e-01 2.0902950316667557e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1089 -1.6339610517024994e-01</internalNodes>\n          <leafValues>\n            -7.7071088552474976e-01 1.3627690263092518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1090 5.3004521131515503e-01</internalNodes>\n          <leafValues>\n            1.2292830273509026e-02 -7.9708522558212280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1091 -3.0609068926423788e-03</internalNodes>\n          <leafValues>\n            5.7478528469800949e-02 -8.8626816868782043e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1092 1.3204859569668770e-03</internalNodes>\n          <leafValues>\n            -1.0473939776420593e-01 1.2416320294141769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1093 -6.6045127809047699e-02</internalNodes>\n          <leafValues>\n            -7.0403701066970825e-01 7.2672651149332523e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1094 5.2080051973462105e-03</internalNodes>\n          <leafValues>\n            7.3289416730403900e-02 -1.6105780005455017e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>106</maxWeakCount>\n      <stageThreshold>-1.8098859786987305e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1095 -2.4040700867772102e-02</internalNodes>\n          <leafValues>\n            2.4318559467792511e-01 -3.8189288973808289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1096 2.6374191045761108e-01</internalNodes>\n          <leafValues>\n            -2.5091141462326050e-01 2.7231940627098083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1097 3.3161949831992388e-03</internalNodes>\n          <leafValues>\n            -2.8115370869636536e-01 2.2977580130100250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1098 2.5751669891178608e-03</internalNodes>\n          <leafValues>\n            -6.4815878868103027e-01 8.3049327135086060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1099 1.2843149714171886e-02</internalNodes>\n          <leafValues>\n            -5.4388070106506348e-01 8.6304552853107452e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1100 1.3005360029637814e-02</internalNodes>\n          <leafValues>\n            -2.6411589980125427e-01 2.2107879817485809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1101 2.6304060593247414e-02</internalNodes>\n          <leafValues>\n            -2.2276160120964050e-01 2.2458629310131073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1102 -6.8887993693351746e-02</internalNodes>\n          <leafValues>\n            4.4677790999412537e-01 -1.8398750573396683e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1103 1.5864400193095207e-02</internalNodes>\n          <leafValues>\n            -3.3532321453094482e-01 1.6380620002746582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1104 -7.1481592021882534e-03</internalNodes>\n          <leafValues>\n            -3.5999459028244019e-01 1.0679650306701660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1105 -1.2002130039036274e-02</internalNodes>\n          <leafValues>\n            -3.7498581409454346e-01 9.6759349107742310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1106 -2.6663220487535000e-03</internalNodes>\n          <leafValues>\n            -3.8941639661788940e-01 5.9776391834020615e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1107 5.2618351764976978e-04</internalNodes>\n          <leafValues>\n            -3.0557510256767273e-01 1.0778070241212845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1108 -4.0705721825361252e-02</internalNodes>\n          <leafValues>\n            -5.8572947978973389e-01 4.0660858154296875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1109 -8.7929163128137589e-03</internalNodes>\n          <leafValues>\n            2.3699410259723663e-01 -1.3827539980411530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1110 -2.2475840523838997e-03</internalNodes>\n          <leafValues>\n            -3.5475319623947144e-01 8.9079782366752625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1111 5.8501982130110264e-03</internalNodes>\n          <leafValues>\n            9.1695636510848999e-02 -3.3329799771308899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1112 -3.9623910561203957e-03</internalNodes>\n          <leafValues>\n            -1.9845740497112274e-01 1.2363869696855545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1113 -1.7685770289972425e-03</internalNodes>\n          <leafValues>\n            7.3684811592102051e-02 -4.5862528681755066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1114 6.3303880393505096e-02</internalNodes>\n          <leafValues>\n            4.8690151423215866e-02 -5.7301318645477295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1115 7.9875197261571884e-03</internalNodes>\n          <leafValues>\n            -8.1072300672531128e-01 2.7054410427808762e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1116 -1.3520400039851665e-02</internalNodes>\n          <leafValues>\n            1.6274809837341309e-01 -1.6841860115528107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1117 4.8139609396457672e-02</internalNodes>\n          <leafValues>\n            4.5234218239784241e-02 -5.7300239801406860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1118 5.0355647690594196e-03</internalNodes>\n          <leafValues>\n            6.5225511789321899e-02 -2.5856611132621765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1119 1.9625260028988123e-04</internalNodes>\n          <leafValues>\n            1.4221550524234772e-01 -1.8481519818305969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1120 2.5747891049832106e-03</internalNodes>\n          <leafValues>\n            -3.5904300212860107e-01 7.5663506984710693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1121 -4.0524629876017570e-03</internalNodes>\n          <leafValues>\n            -2.1212129294872284e-01 1.1840210109949112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1122 5.6920260190963745e-02</internalNodes>\n          <leafValues>\n            -4.3657299131155014e-02 3.8774600625038147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1123 3.7986990064382553e-02</internalNodes>\n          <leafValues>\n            -8.1706330180168152e-02 3.9529800415039062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1124 -2.2731529548764229e-02</internalNodes>\n          <leafValues>\n            -3.4693419933319092e-01 6.8438567221164703e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1125 9.9069473799318075e-04</internalNodes>\n          <leafValues>\n            -3.6681869626045227e-01 6.1036650091409683e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1126 -4.3086782097816467e-03</internalNodes>\n          <leafValues>\n            1.4361980557441711e-01 -9.6160076558589935e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1127 -2.5202209129929543e-02</internalNodes>\n          <leafValues>\n            -4.6109348535537720e-01 5.9420660138130188e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1128 -3.3597718924283981e-02</internalNodes>\n          <leafValues>\n            -4.7127521038055420e-01 9.6356319263577461e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1129 -4.6891071833670139e-03</internalNodes>\n          <leafValues>\n            1.9676209986209869e-01 -1.1853359639644623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1130 2.4549920111894608e-02</internalNodes>\n          <leafValues>\n            -4.5542590320110321e-02 2.8717058897018433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1131 -1.8802500562742352e-03</internalNodes>\n          <leafValues>\n            -2.9892438650131226e-01 8.0199889838695526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1132 2.0160999894142151e-01</internalNodes>\n          <leafValues>\n            3.0502580106258392e-02 -4.8414209485054016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1133 -6.9803953170776367e-02</internalNodes>\n          <leafValues>\n            -6.2382811307907104e-01 3.5180661827325821e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1134 9.1318902559578419e-04</internalNodes>\n          <leafValues>\n            -1.9935069978237152e-01 6.8270348012447357e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1135 1.4578959904611111e-02</internalNodes>\n          <leafValues>\n            1.0063359886407852e-01 -2.5353130698204041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1136 5.0130348652601242e-02</internalNodes>\n          <leafValues>\n            5.7192109525203705e-02 -4.1628059744834900e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1137 -1.8048109486699104e-02</internalNodes>\n          <leafValues>\n            -4.4572651386260986e-01 5.0399489700794220e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1138 1.4818160235881805e-01</internalNodes>\n          <leafValues>\n            1.6779610887169838e-02 -4.5810478925704956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1139 -2.6285950094461441e-02</internalNodes>\n          <leafValues>\n            3.5442620515823364e-01 -6.1184428632259369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1140 -1.8414109945297241e-02</internalNodes>\n          <leafValues>\n            -3.2132109999656677e-01 7.6148152351379395e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1141 6.1610070988535881e-03</internalNodes>\n          <leafValues>\n            8.7946079671382904e-02 -2.5913208723068237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1142 -2.5900160893797874e-02</internalNodes>\n          <leafValues>\n            3.0681431293487549e-01 -6.5600410103797913e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1143 1.5014899894595146e-02</internalNodes>\n          <leafValues>\n            -5.6076969951391220e-02 3.8661429286003113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1144 -4.3112158775329590e-02</internalNodes>\n          <leafValues>\n            5.5926108360290527e-01 -3.9232630282640457e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1145 -2.1485170349478722e-02</internalNodes>\n          <leafValues>\n            -4.6384871006011963e-01 4.8264618963003159e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1146 -2.5131789967417717e-02</internalNodes>\n          <leafValues>\n            -4.8091739416122437e-01 4.1346170008182526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1147 4.1451459401287138e-04</internalNodes>\n          <leafValues>\n            4.4691830873489380e-02 -4.2174011468887329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1148 1.0218570008873940e-02</internalNodes>\n          <leafValues>\n            5.3744480013847351e-02 -1.9395479559898376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1149 -2.0342700183391571e-02</internalNodes>\n          <leafValues>\n            2.9722499847412109e-01 -7.1297563612461090e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1150 -3.0666049569845200e-02</internalNodes>\n          <leafValues>\n            -3.9920780062675476e-01 4.5510981231927872e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1151 -3.2767441123723984e-02</internalNodes>\n          <leafValues>\n            -5.0248539447784424e-01 4.4888608157634735e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1152 -5.4365001618862152e-02</internalNodes>\n          <leafValues>\n            -4.7751170396804810e-01 4.1882470250129700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1153 -2.9916359111666679e-02</internalNodes>\n          <leafValues>\n            3.5793611407279968e-01 -6.1831939965486526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1154 1.0144179686903954e-02</internalNodes>\n          <leafValues>\n            -1.5790919959545135e-01 5.7373359799385071e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1155 1.5639010071754456e-01</internalNodes>\n          <leafValues>\n            3.2949700951576233e-02 -6.4462232589721680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1156 5.4447978734970093e-02</internalNodes>\n          <leafValues>\n            -4.1508059948682785e-02 1.2866689264774323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1157 -3.9772719144821167e-02</internalNodes>\n          <leafValues>\n            -6.8962317705154419e-01 2.9046570882201195e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1158 6.9650667719542980e-03</internalNodes>\n          <leafValues>\n            -9.4761677086353302e-02 1.8257130682468414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1159 -5.1617428660392761e-02</internalNodes>\n          <leafValues>\n            -4.4907289743423462e-01 4.3913140892982483e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1160 -2.6814609766006470e-02</internalNodes>\n          <leafValues>\n            -2.2568839788436890e-01 5.4928071796894073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1161 1.3181920163333416e-02</internalNodes>\n          <leafValues>\n            8.0101907253265381e-02 -2.8673300147056580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1162 1.4241590164601803e-02</internalNodes>\n          <leafValues>\n            -8.4264412522315979e-02 2.1000739932060242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1163 3.1410539522767067e-03</internalNodes>\n          <leafValues>\n            1.3257560133934021e-01 -1.5610539913177490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1164 1.0995150357484818e-01</internalNodes>\n          <leafValues>\n            1.2388270348310471e-02 -4.0302368998527527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1165 1.7845850437879562e-02</internalNodes>\n          <leafValues>\n            5.2870228886604309e-02 -3.7930241227149963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1166 1.0851990431547165e-02</internalNodes>\n          <leafValues>\n            -5.4071258753538132e-02 3.5186240077018738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1167 -2.5958200916647911e-02</internalNodes>\n          <leafValues>\n            4.1978350281715393e-01 -4.0477428585290909e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1168 4.0990379638969898e-03</internalNodes>\n          <leafValues>\n            5.0911288708448410e-02 -3.5974949598312378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1169 1.4909840188920498e-02</internalNodes>\n          <leafValues>\n            -6.1437230557203293e-02 2.8947550058364868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1170 4.0265037678182125e-03</internalNodes>\n          <leafValues>\n            1.0686399787664413e-01 -1.2979680299758911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1171 3.9495688676834106e-01</internalNodes>\n          <leafValues>\n            -2.8920559212565422e-02 6.3535267114639282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1172 1.2874379754066467e-02</internalNodes>\n          <leafValues>\n            -1.1910410225391388e-01 1.2068430334329605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1173 -4.8598181456327438e-02</internalNodes>\n          <leafValues>\n            4.6885690093040466e-01 -4.2797289788722992e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1174 1.5357979573309422e-03</internalNodes>\n          <leafValues>\n            -3.0882269144058228e-01 6.3154831528663635e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1175 3.5379750188440084e-03</internalNodes>\n          <leafValues>\n            1.0132449865341187e-01 -1.7726400494575500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1176 -1.9441220909357071e-02</internalNodes>\n          <leafValues>\n            2.3254390060901642e-01 -5.3732268512248993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1177 2.5940369814634323e-03</internalNodes>\n          <leafValues>\n            -3.5682299733161926e-01 5.0598859786987305e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1178 5.9910379350185394e-02</internalNodes>\n          <leafValues>\n            -2.4030869826674461e-02 1.7003220319747925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1179 -1.1181759648025036e-02</internalNodes>\n          <leafValues>\n            3.4869500994682312e-01 -6.2812417745590210e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1180 4.9201812362298369e-04</internalNodes>\n          <leafValues>\n            -1.2642909586429596e-01 3.6503899842500687e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1181 6.7902177572250366e-02</internalNodes>\n          <leafValues>\n            -4.2887088656425476e-01 4.6336911618709564e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1182 1.5728829428553581e-02</internalNodes>\n          <leafValues>\n            -6.3028946518898010e-02 1.6275769472122192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1183 -1.4824390411376953e-02</internalNodes>\n          <leafValues>\n            -5.3391677141189575e-01 3.2132621854543686e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1184 -1.9706260412931442e-02</internalNodes>\n          <leafValues>\n            2.5455629825592041e-01 -3.0816650018095970e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1185 9.6607124432921410e-03</internalNodes>\n          <leafValues>\n            9.2674352228641510e-02 -1.7940239608287811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1186 -4.9929421395063400e-02</internalNodes>\n          <leafValues>\n            2.6743340492248535e-01 -2.5595119222998619e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1187 7.3459640145301819e-02</internalNodes>\n          <leafValues>\n            -5.8698959648609161e-02 2.8898829221725464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1188 -8.6538150208070874e-04</internalNodes>\n          <leafValues>\n            -1.4318460226058960e-01 6.5386183559894562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1189 -1.0462219826877117e-02</internalNodes>\n          <leafValues>\n            -3.2498508691787720e-01 5.4955318570137024e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1190 -6.3478751108050346e-03</internalNodes>\n          <leafValues>\n            -1.0396370291709900e-01 4.0321409702301025e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1191 1.1406400054693222e-01</internalNodes>\n          <leafValues>\n            2.6192039251327515e-02 -6.6177910566329956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1192 -2.6893770322203636e-02</internalNodes>\n          <leafValues>\n            -3.5338699817657471e-01 1.9753590226173401e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1193 8.0600962042808533e-02</internalNodes>\n          <leafValues>\n            2.8878480195999146e-02 -5.4975187778472900e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1194 -7.4676960706710815e-02</internalNodes>\n          <leafValues>\n            -3.4416058659553528e-01 2.6990719139575958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1195 -7.7004089951515198e-02</internalNodes>\n          <leafValues>\n            4.0045699477195740e-01 -4.5340269804000854e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1196 -8.6920477449893951e-02</internalNodes>\n          <leafValues>\n            -3.4687021374702454e-01 3.9195980876684189e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1197 -4.3200692161917686e-03</internalNodes>\n          <leafValues>\n            7.5932569801807404e-02 -2.3720650374889374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1198 -3.4127760678529739e-02</internalNodes>\n          <leafValues>\n            -4.1994720697402954e-01 4.3633870780467987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1199 2.1845370531082153e-02</internalNodes>\n          <leafValues>\n            -5.8681700378656387e-02 3.2972678542137146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1200 1.0037229955196381e-01</internalNodes>\n          <leafValues>\n            4.2507208883762360e-02 -4.3366080522537231e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>157</maxWeakCount>\n      <stageThreshold>-1.5512030124664307e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1201 -2.8922120109200478e-03</internalNodes>\n          <leafValues>\n            1.4381329715251923e-01 -4.0896520018577576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1202 -3.2057950738817453e-03</internalNodes>\n          <leafValues>\n            -3.3472418785095215e-01 1.2834690511226654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1203 -1.4795559764024802e-05</internalNodes>\n          <leafValues>\n            1.0139170289039612e-01 -4.4680911302566528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1204 3.7529919063672423e-04</internalNodes>\n          <leafValues>\n            -2.8604930639266968e-01 1.5357840061187744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1205 4.9170467536896467e-04</internalNodes>\n          <leafValues>\n            -2.8404960036277771e-01 1.3163900375366211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1206 1.6417380422353745e-02</internalNodes>\n          <leafValues>\n            7.9901106655597687e-02 -2.8092819452285767e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1207 1.0119860060513020e-02</internalNodes>\n          <leafValues>\n            1.0026869922876358e-01 -4.0932568907737732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1208 -6.5251751802861691e-03</internalNodes>\n          <leafValues>\n            -3.3101710677146912e-01 9.6044629812240601e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1209 6.1215078458189964e-03</internalNodes>\n          <leafValues>\n            -3.5483101010322571e-01 8.4309920668601990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1210 2.5817379355430603e-03</internalNodes>\n          <leafValues>\n            8.3384357392787933e-02 -2.8031709790229797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1211 -1.3406439684331417e-03</internalNodes>\n          <leafValues>\n            1.5083800256252289e-01 -1.4946520328521729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1212 3.3681320492178202e-03</internalNodes>\n          <leafValues>\n            4.2112700641155243e-02 -2.2309710085391998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1213 2.8937528841197491e-03</internalNodes>\n          <leafValues>\n            8.2953810691833496e-02 -2.9152309894561768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1214 3.3696501050144434e-03</internalNodes>\n          <leafValues>\n            4.8548549413681030e-02 -1.9542780518531799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1215 -7.1538880467414856e-02</internalNodes>\n          <leafValues>\n            5.2008682489395142e-01 -4.2644441127777100e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1216 7.6072360388934612e-03</internalNodes>\n          <leafValues>\n            -8.5208661854267120e-02 1.1523310095071793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1217 1.9313229713588953e-03</internalNodes>\n          <leafValues>\n            8.9357398450374603e-02 -2.3614349961280823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1218 9.0475968318060040e-04</internalNodes>\n          <leafValues>\n            -7.7408589422702789e-02 1.6829580068588257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1219 1.1103670112788677e-02</internalNodes>\n          <leafValues>\n            -9.5963977277278900e-02 2.0391720533370972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1220 -3.1021970789879560e-03</internalNodes>\n          <leafValues>\n            -3.8605719804763794e-01 4.6329721808433533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1221 1.1446890421211720e-03</internalNodes>\n          <leafValues>\n            -2.8306689858436584e-01 5.8978211134672165e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1222 7.7077788300812244e-03</internalNodes>\n          <leafValues>\n            1.0474249720573425e-01 -1.7146070301532745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1223 4.9893710762262344e-02</internalNodes>\n          <leafValues>\n            -6.4692601561546326e-02 3.0140951275825500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1224 -1.4937819913029671e-02</internalNodes>\n          <leafValues>\n            -2.7854371070861816e-01 7.0895470678806305e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1225 -2.5303829461336136e-03</internalNodes>\n          <leafValues>\n            1.2108519673347473e-01 -1.4635290205478668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1226 2.8611259534955025e-02</internalNodes>\n          <leafValues>\n            -5.0357531756162643e-02 4.0651878714561462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1227 3.6244060844182968e-02</internalNodes>\n          <leafValues>\n            4.4577218592166901e-02 -5.6234288215637207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1228 -3.0544339679181576e-03</internalNodes>\n          <leafValues>\n            1.1526989936828613e-01 -2.7371090650558472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1229 -1.3101019430905581e-03</internalNodes>\n          <leafValues>\n            -2.6798000931739807e-01 5.9726651757955551e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1230 1.0702989529818296e-03</internalNodes>\n          <leafValues>\n            -1.5439410507678986e-01 1.1206989735364914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1231 -2.3467160761356354e-02</internalNodes>\n          <leafValues>\n            -6.2424921989440918e-01 2.6010479778051376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1232 -2.2787749767303467e-02</internalNodes>\n          <leafValues>\n            1.7903989553451538e-01 -6.8230852484703064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1233 7.5017688795924187e-03</internalNodes>\n          <leafValues>\n            5.2637178450822830e-02 -3.3333471417427063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1234 1.3881090097129345e-02</internalNodes>\n          <leafValues>\n            6.5118886530399323e-02 -2.4152719974517822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1235 -8.7769115343689919e-03</internalNodes>\n          <leafValues>\n            1.9925190508365631e-01 -8.8063232600688934e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1236 2.6523560285568237e-02</internalNodes>\n          <leafValues>\n            4.6574778854846954e-02 -3.6550509929656982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1237 7.2263809852302074e-03</internalNodes>\n          <leafValues>\n            -1.0806850343942642e-01 1.5131799876689911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1238 2.3426050320267677e-03</internalNodes>\n          <leafValues>\n            -1.5072929859161377e-01 9.9945023655891418e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1239 -2.8811080483137630e-05</internalNodes>\n          <leafValues>\n            6.1413038522005081e-02 -2.4344439804553986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1240 -1.3911900110542774e-02</internalNodes>\n          <leafValues>\n            -3.1010839343070984e-01 2.4895850569009781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1241 2.4768780916929245e-02</internalNodes>\n          <leafValues>\n            2.3218030110001564e-02 -6.5071028470993042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1242 -6.0916407965123653e-03</internalNodes>\n          <leafValues>\n            5.9768490493297577e-02 -2.5360348820686340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1243 -9.7264908254146576e-03</internalNodes>\n          <leafValues>\n            -2.5584441423416138e-01 5.5554620921611786e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1244 9.7499042749404907e-02</internalNodes>\n          <leafValues>\n            5.3867488168179989e-03 -7.3567670583724976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1245 3.0411418993026018e-03</internalNodes>\n          <leafValues>\n            -1.3759210705757141e-01 1.2143649905920029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1246 2.7967148926109076e-03</internalNodes>\n          <leafValues>\n            1.8048660457134247e-01 -8.4527000784873962e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1247 1.0707279667258263e-02</internalNodes>\n          <leafValues>\n            -4.3970860540866852e-02 3.1042009592056274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1248 1.7561139538884163e-03</internalNodes>\n          <leafValues>\n            5.1866840571165085e-02 -2.2768710553646088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1249 -3.0384738929569721e-03</internalNodes>\n          <leafValues>\n            7.1652042865753174e-01 -2.2465929388999939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1250 -9.4161480665206909e-02</internalNodes>\n          <leafValues>\n            -7.9338562488555908e-01 1.3117490336298943e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1251 -2.3869009688496590e-02</internalNodes>\n          <leafValues>\n            4.9338179826736450e-01 -3.2169021666049957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1252 -3.9958588778972626e-02</internalNodes>\n          <leafValues>\n            -1.8914769589900970e-01 2.8500700369477272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1253 6.9391070865094662e-03</internalNodes>\n          <leafValues>\n            3.9777211844921112e-02 -3.9105901122093201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1254 -3.3596780151128769e-02</internalNodes>\n          <leafValues>\n            -5.6830072402954102e-01 2.1618509665131569e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1255 -1.4079840481281281e-01</internalNodes>\n          <leafValues>\n            -7.9014372825622559e-01 1.4884609729051590e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1256 -5.7346289977431297e-03</internalNodes>\n          <leafValues>\n            -1.5512639284133911e-01 4.2879570275545120e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1257 -5.2841830998659134e-02</internalNodes>\n          <leafValues>\n            3.0823838710784912e-01 -5.0709690898656845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1258 1.5207099728286266e-02</internalNodes>\n          <leafValues>\n            -2.5789769366383553e-02 3.3292320370674133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1259 -5.8392022037878633e-04</internalNodes>\n          <leafValues>\n            8.8900387287139893e-02 -1.6297949850559235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1260 -3.3715530298650265e-03</internalNodes>\n          <leafValues>\n            -1.7890229821205139e-01 7.5376607477664948e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1261 -1.2047060299664736e-03</internalNodes>\n          <leafValues>\n            1.0491970181465149e-01 -1.2970739603042603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1262 5.5276479572057724e-02</internalNodes>\n          <leafValues>\n            -4.3197508901357651e-02 3.7212029099464417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1263 3.9330609142780304e-02</internalNodes>\n          <leafValues>\n            3.0416399240493774e-02 -4.9076101183891296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1264 -9.7229599487036467e-04</internalNodes>\n          <leafValues>\n            -2.1895459294319153e-01 3.9032708853483200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1265 -5.6048069149255753e-02</internalNodes>\n          <leafValues>\n            4.1632568836212158e-01 -3.3747311681509018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1266 7.1376740932464600e-02</internalNodes>\n          <leafValues>\n            1.2129209935665131e-02 -6.4814078807830811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1267 1.4940260443836451e-03</internalNodes>\n          <leafValues>\n            -2.1393610537052155e-01 8.4887221455574036e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1268 -3.2299170270562172e-03</internalNodes>\n          <leafValues>\n            9.0792432427406311e-02 -9.5816053450107574e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1269 4.2182870209217072e-02</internalNodes>\n          <leafValues>\n            -6.6914401948451996e-02 2.5217619538307190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1270 -6.5001910552382469e-03</internalNodes>\n          <leafValues>\n            -1.2149559706449509e-01 3.7367988377809525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1271 1.9457129761576653e-02</internalNodes>\n          <leafValues>\n            5.0163779407739639e-02 -2.8700378537178040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1272 3.7291388958692551e-02</internalNodes>\n          <leafValues>\n            2.9608439654111862e-02 -5.7222497463226318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1273 -2.5571519508957863e-02</internalNodes>\n          <leafValues>\n            4.3941849470138550e-01 -3.6532308906316757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1274 -7.9122912138700485e-03</internalNodes>\n          <leafValues>\n            -2.9618510603904724e-01 3.5483270883560181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1275 3.0267490074038506e-03</internalNodes>\n          <leafValues>\n            -1.2113779783248901e-01 1.1271420121192932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1276 -2.1035820245742798e-02</internalNodes>\n          <leafValues>\n            2.9206061363220215e-01 -3.1001489609479904e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1277 -1.2911420315504074e-02</internalNodes>\n          <leafValues>\n            -5.4194331169128418e-01 2.6756240054965019e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1278 5.5096071213483810e-02</internalNodes>\n          <leafValues>\n            8.4169982001185417e-03 -6.2873458862304688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1279 -6.3893562182784081e-03</internalNodes>\n          <leafValues>\n            -2.0784839987754822e-01 6.0436788946390152e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1280 1.0858760215342045e-02</internalNodes>\n          <leafValues>\n            -7.8497253358364105e-02 1.2957990169525146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1281 -1.5859620645642281e-02</internalNodes>\n          <leafValues>\n            1.5772910416126251e-01 -1.0143510252237320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1282 1.5203879773616791e-01</internalNodes>\n          <leafValues>\n            2.1721320226788521e-02 -3.1713140010833740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1283 1.7942039296030998e-02</internalNodes>\n          <leafValues>\n            -8.4816932678222656e-02 1.7697300016880035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1284 8.8212518021464348e-03</internalNodes>\n          <leafValues>\n            5.1800601184368134e-02 -2.1443609893321991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1285 1.5715289860963821e-02</internalNodes>\n          <leafValues>\n            4.2525820434093475e-02 -3.2278341054916382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1286 -2.4744209367781878e-03</internalNodes>\n          <leafValues>\n            1.0828550159931183e-01 -1.2953069806098938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1287 1.2597530148923397e-02</internalNodes>\n          <leafValues>\n            -6.0251701623201370e-02 2.7512151002883911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1288 -1.0955630568787456e-03</internalNodes>\n          <leafValues>\n            -5.4244071245193481e-01 2.8166439384222031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1289 -1.4035019557923079e-03</internalNodes>\n          <leafValues>\n            -2.3625169694423676e-01 6.1887249350547791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1290 -7.7294543385505676e-02</internalNodes>\n          <leafValues>\n            -5.2141982316970825e-01 1.1844149790704250e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1291 -7.5442157685756683e-02</internalNodes>\n          <leafValues>\n            -7.1588802337646484e-01 1.7151419073343277e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1292 -6.5148338675498962e-02</internalNodes>\n          <leafValues>\n            2.4099840223789215e-01 -5.0278738141059875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1293 -1.0481229983270168e-03</internalNodes>\n          <leafValues>\n            6.5461628139019012e-02 -1.9198420643806458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1294 2.0919230300933123e-03</internalNodes>\n          <leafValues>\n            4.8702161759138107e-02 -2.0062549412250519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1295 -4.2849369347095490e-02</internalNodes>\n          <leafValues>\n            -4.6154209971427917e-01 2.9137039557099342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1296 -4.5563629828393459e-03</internalNodes>\n          <leafValues>\n            1.3732179999351501e-01 -7.3871016502380371e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1297 6.7648440599441528e-03</internalNodes>\n          <leafValues>\n            -6.3866026699542999e-02 2.7578699588775635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1298 4.2252071201801300e-02</internalNodes>\n          <leafValues>\n            1.3583010062575340e-02 -6.2714421749114990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1299 -3.5438220947980881e-02</internalNodes>\n          <leafValues>\n            -5.2436131238937378e-01 2.1047530695796013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1300 -5.3693209774792194e-03</internalNodes>\n          <leafValues>\n            1.8366709351539612e-01 -6.6432453691959381e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1301 1.3521539513021708e-03</internalNodes>\n          <leafValues>\n            5.8834321796894073e-02 -2.2455100715160370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1302 -3.2204028218984604e-02</internalNodes>\n          <leafValues>\n            -4.8017048835754395e-01 9.2976661399006844e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1303 4.0550291305407882e-04</internalNodes>\n          <leafValues>\n            -8.5948407649993896e-02 2.0100370049476624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1304 -3.8419410120695829e-03</internalNodes>\n          <leafValues>\n            2.0595569908618927e-01 -6.6863708198070526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1305 -4.5518199913203716e-03</internalNodes>\n          <leafValues>\n            -2.2908920049667358e-01 5.8954399079084396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1306 -4.9340371042490005e-02</internalNodes>\n          <leafValues>\n            -3.8995718955993652e-01 1.6714079305529594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1307 8.6456492543220520e-02</internalNodes>\n          <leafValues>\n            -3.2278828322887421e-02 3.6371639370918274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1308 5.1636258140206337e-03</internalNodes>\n          <leafValues>\n            -1.7399039864540100e-01 5.6017149239778519e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1309 3.5364869982004166e-03</internalNodes>\n          <leafValues>\n            -7.9630948603153229e-02 1.6313460469245911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1310 -4.3170839548110962e-02</internalNodes>\n          <leafValues>\n            -3.7036859989166260e-01 1.9841130822896957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1311 6.1772209592163563e-03</internalNodes>\n          <leafValues>\n            5.9052169322967529e-02 -2.3701970279216766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1312 -2.2244770079851151e-02</internalNodes>\n          <leafValues>\n            2.5762718915939331e-01 -2.2968450561165810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1313 5.0163730978965759e-02</internalNodes>\n          <leafValues>\n            1.7468400299549103e-02 -6.8128740787506104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1314 -3.0043811420910060e-04</internalNodes>\n          <leafValues>\n            5.5781401693820953e-02 -1.2685780227184296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1315 1.9783550500869751e-01</internalNodes>\n          <leafValues>\n            1.2211419641971588e-02 -8.6064267158508301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1316 6.5362468361854553e-02</internalNodes>\n          <leafValues>\n            4.1287927888333797e-03 -6.2948238849639893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1317 -1.8684990704059601e-02</internalNodes>\n          <leafValues>\n            -2.4377359449863434e-01 4.3232489377260208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1318 -7.5593511573970318e-03</internalNodes>\n          <leafValues>\n            1.7254440486431122e-01 -1.6871780157089233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1319 1.4699660241603851e-03</internalNodes>\n          <leafValues>\n            -1.5561489760875702e-01 6.9231852889060974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1320 1.1925940215587616e-01</internalNodes>\n          <leafValues>\n            -2.6341190561652184e-02 4.4847229123115540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1321 1.3763479888439178e-02</internalNodes>\n          <leafValues>\n            3.1852710992097855e-02 -3.8184550404548645e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1322 1.2966440059244633e-02</internalNodes>\n          <leafValues>\n            -3.9391368627548218e-02 1.9092699885368347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1323 -1.1041419580578804e-02</internalNodes>\n          <leafValues>\n            -2.7309378981590271e-01 4.7777820378541946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1324 6.8364411592483521e-01</internalNodes>\n          <leafValues>\n            9.6240043640136719e-03 -9.7447502613067627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1325 -2.4255160242319107e-03</internalNodes>\n          <leafValues>\n            -2.5439569354057312e-01 4.0732551366090775e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1326 6.4529682276770473e-04</internalNodes>\n          <leafValues>\n            -1.3824179768562317e-01 7.4660047888755798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1327 -2.2386180236935616e-02</internalNodes>\n          <leafValues>\n            3.9404779672622681e-01 -4.2591951787471771e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1328 -6.4325161278247833e-02</internalNodes>\n          <leafValues>\n            -9.6853357553482056e-01 5.4289568215608597e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1329 4.0803711861371994e-02</internalNodes>\n          <leafValues>\n            1.4779980294406414e-02 -7.5445967912673950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1330 -2.4066439364105463e-03</internalNodes>\n          <leafValues>\n            7.6213918626308441e-02 -8.1325337290763855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1331 -4.9865059554576874e-02</internalNodes>\n          <leafValues>\n            -7.8447979688644409e-01 1.5130150131881237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1332 -8.9749991893768311e-02</internalNodes>\n          <leafValues>\n            -9.0076518058776855e-01 4.0898341685533524e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1333 2.1489290520548820e-03</internalNodes>\n          <leafValues>\n            -7.7873408794403076e-02 1.4538989961147308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1334 1.8653910374268889e-03</internalNodes>\n          <leafValues>\n            -5.1264639943838120e-02 1.4514209330081940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1335 5.4189950227737427e-02</internalNodes>\n          <leafValues>\n            1.6740569844841957e-02 -7.2964847087860107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1336 -3.7668810691684484e-03</internalNodes>\n          <leafValues>\n            1.5345999598503113e-01 -5.9867210686206818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1337 -1.5151940286159515e-01</internalNodes>\n          <leafValues>\n            -8.2612198591232300e-01 1.4488279819488525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1338 1.0246659629046917e-02</internalNodes>\n          <leafValues>\n            -6.3145689666271210e-02 1.8994790315628052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1339 1.0578270070254803e-02</internalNodes>\n          <leafValues>\n            5.9726748615503311e-02 -1.9162079691886902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1340 1.5032970346510410e-02</internalNodes>\n          <leafValues>\n            -7.3868520557880402e-02 1.5511709451675415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1341 -4.2136289179325104e-02</internalNodes>\n          <leafValues>\n            -6.8733322620391846e-01 1.6604630276560783e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1342 1.8628799589350820e-03</internalNodes>\n          <leafValues>\n            -1.5732850134372711e-01 7.5714908540248871e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1343 2.4659639224410057e-02</internalNodes>\n          <leafValues>\n            9.7081139683723450e-02 -1.6045799851417542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1344 1.9145730137825012e-01</internalNodes>\n          <leafValues>\n            7.1056559681892395e-03 -7.5537341833114624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1345 -3.0167160555720329e-02</internalNodes>\n          <leafValues>\n            1.7002609372138977e-01 -8.6163826286792755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1346 9.2923697084188461e-03</internalNodes>\n          <leafValues>\n            4.3352611362934113e-02 -1.9533480703830719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1347 -1.9069829722866416e-03</internalNodes>\n          <leafValues>\n            8.2421518862247467e-02 -1.4644089341163635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1348 3.1027841032482684e-04</internalNodes>\n          <leafValues>\n            -1.1879319697618484e-01 9.4635762274265289e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1349 4.4492271263152361e-04</internalNodes>\n          <leafValues>\n            -1.5645760297775269e-01 6.8512812256813049e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1350 -1.2095469981431961e-02</internalNodes>\n          <leafValues>\n            -9.0144127607345581e-02 3.0050620436668396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1351 -2.0358909387141466e-03</internalNodes>\n          <leafValues>\n            1.3586470484733582e-01 -7.2631262242794037e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1352 -9.3594277277588844e-03</internalNodes>\n          <leafValues>\n            1.1376120150089264e-01 -3.9632719010114670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1353 4.2418478988111019e-03</internalNodes>\n          <leafValues>\n            -8.1519439816474915e-02 1.5766209363937378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1354 -5.9963759034872055e-02</internalNodes>\n          <leafValues>\n            -2.3273150622844696e-01 2.0836880430579185e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1355 4.6651167795062065e-03</internalNodes>\n          <leafValues>\n            1.3135330379009247e-01 -1.2394910305738449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1356 6.2358117429539561e-04</internalNodes>\n          <leafValues>\n            -1.2920179963111877e-01 6.5220557153224945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1357 2.0561330020427704e-03</internalNodes>\n          <leafValues>\n            -6.2910877168178558e-02 1.6288000345230103e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>127</maxWeakCount>\n      <stageThreshold>-1.7598799467086792e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1358 1.1216440051794052e-01</internalNodes>\n          <leafValues>\n            -2.9065090417861938e-01 3.1510210037231445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1359 2.7850609272718430e-02</internalNodes>\n          <leafValues>\n            -3.9972350001335144e-01 1.7894990742206573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1360 4.0804240852594376e-02</internalNodes>\n          <leafValues>\n            -2.4171060323715210e-01 2.2376739978790283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1361 1.3134710025042295e-03</internalNodes>\n          <leafValues>\n            -4.2230761051177979e-01 6.9066837430000305e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1362 3.9736120961606503e-03</internalNodes>\n          <leafValues>\n            -5.5243992805480957e-01 1.0362079739570618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1363 -9.7877913503907621e-05</internalNodes>\n          <leafValues>\n            7.0300459861755371e-02 -4.1970318555831909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1364 6.2921550124883652e-03</internalNodes>\n          <leafValues>\n            -3.0629968643188477e-01 1.3072040677070618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1365 -8.7216142565011978e-03</internalNodes>\n          <leafValues>\n            -4.1267630457878113e-01 7.2738148272037506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1366 -5.8611109852790833e-02</internalNodes>\n          <leafValues>\n            1.9491520524024963e-01 -1.9737449288368225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1367 -4.6104468405246735e-02</internalNodes>\n          <leafValues>\n            -2.6274758577346802e-01 2.4362189695239067e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1368 -5.2685278933495283e-04</internalNodes>\n          <leafValues>\n            7.9876311123371124e-02 -4.4358581304550171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1369 -2.5521939620375633e-02</internalNodes>\n          <leafValues>\n            -4.4183689355850220e-01 1.0705660097301006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1370 -6.8350387737154961e-03</internalNodes>\n          <leafValues>\n            -3.9501190185546875e-01 7.8441992402076721e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1371 6.1055209487676620e-02</internalNodes>\n          <leafValues>\n            3.5330320242792368e-03 -6.0677450895309448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1372 4.7110877931118011e-03</internalNodes>\n          <leafValues>\n            -1.9310380518436432e-01 1.5259410440921783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1373 3.7552498281002045e-02</internalNodes>\n          <leafValues>\n            6.9572687149047852e-02 -4.1588190197944641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1374 4.0887430310249329e-02</internalNodes>\n          <leafValues>\n            -1.3596929609775543e-01 2.4894300103187561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1375 2.6306639483664185e-05</internalNodes>\n          <leafValues>\n            -2.5603210926055908e-01 1.1001589894294739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1376 9.4716809689998627e-03</internalNodes>\n          <leafValues>\n            -2.2197020053863525e-01 1.3640490174293518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1377 3.4596489276736975e-03</internalNodes>\n          <leafValues>\n            1.5568970143795013e-01 -1.8454350531101227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1378 -8.1670414656400681e-03</internalNodes>\n          <leafValues>\n            -3.7346610426902771e-01 8.2206420600414276e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1379 4.7045178711414337e-02</internalNodes>\n          <leafValues>\n            1.2655580416321754e-02 -6.9167500734329224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1380 -1.9954189192503691e-03</internalNodes>\n          <leafValues>\n            -4.2871651053428650e-01 6.0119848698377609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1381 -3.2797679305076599e-02</internalNodes>\n          <leafValues>\n            -5.8513718843460083e-01 3.9739210158586502e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1382 4.3516121804714203e-02</internalNodes>\n          <leafValues>\n            3.6311239004135132e-02 -5.8556967973709106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1383 -1.3213600032031536e-02</internalNodes>\n          <leafValues>\n            2.1160380542278290e-01 -8.9618362486362457e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1384 -3.8574080914258957e-02</internalNodes>\n          <leafValues>\n            -5.9375947713851929e-01 3.7297870963811874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1385 -1.5351839363574982e-01</internalNodes>\n          <leafValues>\n            4.4116440415382385e-01 -5.9058368206024170e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1386 -1.4133240096271038e-02</internalNodes>\n          <leafValues>\n            -3.4045210480690002e-01 6.6277496516704559e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1387 1.4061010442674160e-02</internalNodes>\n          <leafValues>\n            1.1312460154294968e-01 -1.9001239538192749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1388 3.5457469522953033e-02</internalNodes>\n          <leafValues>\n            3.7297818809747696e-02 -5.3568178415298462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1389 -1.2931039556860924e-02</internalNodes>\n          <leafValues>\n            -2.8593328595161438e-01 5.8341801166534424e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1390 -1.1986999772489071e-02</internalNodes>\n          <leafValues>\n            -4.0216270089149475e-01 4.7841191291809082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1391 -1.3723289594054222e-02</internalNodes>\n          <leafValues>\n            2.0238439738750458e-01 -8.9290492236614227e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1392 1.5990810468792915e-02</internalNodes>\n          <leafValues>\n            -6.1742551624774933e-02 3.9387008547782898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1393 -1.4505759812891483e-02</internalNodes>\n          <leafValues>\n            -3.5829049348831177e-01 4.3789908289909363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1394 3.1443528831005096e-02</internalNodes>\n          <leafValues>\n            -6.7374527454376221e-02 2.8779721260070801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1395 3.4287340939044952e-02</internalNodes>\n          <leafValues>\n            5.6390259414911270e-02 -3.3407160639762878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1396 8.8674569269642234e-05</internalNodes>\n          <leafValues>\n            -2.8655600547790527e-01 7.0318557322025299e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1397 1.8266469240188599e-02</internalNodes>\n          <leafValues>\n            -5.2221570163965225e-02 1.7026390135288239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1398 6.1769630759954453e-02</internalNodes>\n          <leafValues>\n            -6.8800583481788635e-02 2.7483311295509338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1399 -2.3383310064673424e-02</internalNodes>\n          <leafValues>\n            -2.7845630049705505e-01 2.4131359532475471e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1400 -1.1182860285043716e-01</internalNodes>\n          <leafValues>\n            4.5687168836593628e-01 -4.3217949569225311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1401 -6.4386896789073944e-02</internalNodes>\n          <leafValues>\n            -3.4228751063346863e-01 6.4063712954521179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1402 2.1763430535793304e-01</internalNodes>\n          <leafValues>\n            -6.0564499348402023e-02 3.6352708935737610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1403 -4.9456087872385979e-03</internalNodes>\n          <leafValues>\n            -1.6526390612125397e-01 4.6035580337047577e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1404 -1.2704910477623343e-03</internalNodes>\n          <leafValues>\n            -2.5035798549652100e-01 8.2336440682411194e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1405 2.6536729186773300e-02</internalNodes>\n          <leafValues>\n            -1.3919049501419067e-01 1.9524000585079193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1406 -2.0027440041303635e-02</internalNodes>\n          <leafValues>\n            -3.7472829222679138e-01 5.3981021046638489e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1407 -6.1987549066543579e-02</internalNodes>\n          <leafValues>\n            -1.4436429738998413e-01 1.5863290056586266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1408 2.3037059232592583e-02</internalNodes>\n          <leafValues>\n            3.8429230451583862e-02 -4.8479309678077698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1409 5.7958271354436874e-02</internalNodes>\n          <leafValues>\n            2.0750140771269798e-02 -7.6776617765426636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1410 5.4419268853962421e-03</internalNodes>\n          <leafValues>\n            7.2074413299560547e-02 -2.4254220724105835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1411 7.2400430217385292e-03</internalNodes>\n          <leafValues>\n            -8.2432948052883148e-02 1.8463499844074249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1412 1.4847779646515846e-02</internalNodes>\n          <leafValues>\n            5.6245408952236176e-02 -3.6297059059143066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1413 1.2084879912436008e-02</internalNodes>\n          <leafValues>\n            -6.3536256551742554e-02 2.8614228963851929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1414 8.0831356346607208e-02</internalNodes>\n          <leafValues>\n            4.7143958508968353e-02 -4.9968090653419495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1415 1.9218639936298132e-03</internalNodes>\n          <leafValues>\n            -4.0469148755073547e-01 2.2093040868639946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1416 -1.4179679565131664e-02</internalNodes>\n          <leafValues>\n            -1.8520280718803406e-01 8.6823917925357819e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1417 -2.9600440029753372e-05</internalNodes>\n          <leafValues>\n            7.4054829776287079e-02 -1.9331359863281250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1418 1.7121590208262205e-03</internalNodes>\n          <leafValues>\n            -4.9954649806022644e-01 3.8273740559816360e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1419 -1.3207949697971344e-01</internalNodes>\n          <leafValues>\n            5.2964788675308228e-01 -1.0363499633967876e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1420 3.6922071129083633e-02</internalNodes>\n          <leafValues>\n            1.9587470218539238e-02 -8.8954067230224609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1421 -7.3079409048659727e-06</internalNodes>\n          <leafValues>\n            6.4993053674697876e-02 -1.7331290245056152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1422 -3.5222709178924561e-02</internalNodes>\n          <leafValues>\n            -3.6849930882453918e-01 5.0565738230943680e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1423 -5.5531110614538193e-02</internalNodes>\n          <leafValues>\n            3.1555691361427307e-01 -4.5015729963779449e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1424 1.8762869760394096e-02</internalNodes>\n          <leafValues>\n            -1.9359070062637329e-01 7.9093530774116516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1425 2.4971760809421539e-02</internalNodes>\n          <leafValues>\n            -8.1862196326255798e-02 2.1014890074729919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1426 -2.0817129407078028e-03</internalNodes>\n          <leafValues>\n            -1.7723660171031952e-01 9.1757282614707947e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1427 -1.1499860137701035e-01</internalNodes>\n          <leafValues>\n            5.0862562656402588e-01 -1.8267450854182243e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1428 3.2068958878517151e-01</internalNodes>\n          <leafValues>\n            2.1651009097695351e-02 -7.6685470342636108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1429 -8.1451296806335449e-02</internalNodes>\n          <leafValues>\n            -4.6331760287284851e-01 2.9383579269051552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1430 -1.5007940120995045e-02</internalNodes>\n          <leafValues>\n            -3.9308649301528931e-01 3.6867558956146240e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1431 2.3795820772647858e-02</internalNodes>\n          <leafValues>\n            -3.2482311129570007e-02 1.6764250397682190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1432 -8.8508807122707367e-02</internalNodes>\n          <leafValues>\n            7.2103458642959595e-01 -2.1140210330486298e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1433 4.5011121779680252e-02</internalNodes>\n          <leafValues>\n            -2.5326130911707878e-02 2.8062760829925537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1434 1.9286990165710449e-02</internalNodes>\n          <leafValues>\n            6.5771162509918213e-02 -2.5697788596153259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1435 2.2137619554996490e-02</internalNodes>\n          <leafValues>\n            3.9154991507530212e-02 -1.9145630300045013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1436 2.9847979545593262e-02</internalNodes>\n          <leafValues>\n            -1.2521019577980042e-01 1.4867870509624481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1437 -6.8392023444175720e-02</internalNodes>\n          <leafValues>\n            2.6023870706558228e-01 -4.7525301575660706e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1438 6.8003371357917786e-02</internalNodes>\n          <leafValues>\n            -4.5898560434579849e-02 4.0107101202011108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1439 5.6098159402608871e-02</internalNodes>\n          <leafValues>\n            2.3277789354324341e-02 -8.4457129240036011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1440 -1.3024089857935905e-02</internalNodes>\n          <leafValues>\n            -3.8348990678787231e-01 3.8314189761877060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1441 1.2594680301845074e-02</internalNodes>\n          <leafValues>\n            -6.7616842687129974e-02 2.9852440953254700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1442 -4.9063879996538162e-02</internalNodes>\n          <leafValues>\n            -5.5862659215927124e-01 2.8511619195342064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1443 -1.5734169632196426e-02</internalNodes>\n          <leafValues>\n            2.5611931085586548e-01 -5.9407141059637070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1444 1.4674849808216095e-02</internalNodes>\n          <leafValues>\n            -6.3001021742820740e-02 2.7854999899864197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1445 2.5068029761314392e-02</internalNodes>\n          <leafValues>\n            -7.8861348330974579e-02 1.0577370226383209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1446 7.4170758016407490e-03</internalNodes>\n          <leafValues>\n            -3.5775899887084961e-01 4.8707701265811920e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1447 -7.7149281278252602e-03</internalNodes>\n          <leafValues>\n            -1.8049560487270355e-01 9.7531601786613464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1448 4.9982070922851562e-02</internalNodes>\n          <leafValues>\n            2.1009320393204689e-02 -7.6537537574768066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1449 -1.6759630292654037e-02</internalNodes>\n          <leafValues>\n            -5.9045380353927612e-01 2.6948049664497375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1450 3.7632828950881958e-01</internalNodes>\n          <leafValues>\n            2.1989850327372551e-02 -6.1461311578750610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1451 5.2720829844474792e-02</internalNodes>\n          <leafValues>\n            -3.9074160158634186e-02 2.6600670814514160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1452 2.6270199567079544e-02</internalNodes>\n          <leafValues>\n            -9.3863986432552338e-02 2.2280269861221313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1453 -2.5664661079645157e-03</internalNodes>\n          <leafValues>\n            -1.8621809780597687e-01 9.8519712686538696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1454 5.3800269961357117e-03</internalNodes>\n          <leafValues>\n            1.2816059589385986e-01 -1.3671700656414032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1455 2.5200050324201584e-02</internalNodes>\n          <leafValues>\n            3.0875589698553085e-02 -2.9681420326232910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1456 2.5444060564041138e-02</internalNodes>\n          <leafValues>\n            4.3978411704301834e-02 -4.0505328774452209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1457 -2.4715809151530266e-02</internalNodes>\n          <leafValues>\n            -5.8492290973663330e-01 2.3179760202765465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1458 -1.6159649938344955e-02</internalNodes>\n          <leafValues>\n            -3.1950500607490540e-01 4.4603530317544937e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1459 6.5401610918343067e-03</internalNodes>\n          <leafValues>\n            -5.8575991541147232e-02 7.4016787111759186e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1460 -4.3940648436546326e-02</internalNodes>\n          <leafValues>\n            -7.7211838960647583e-01 1.9352979958057404e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1461 -4.5612620306201279e-04</internalNodes>\n          <leafValues>\n            3.0397420749068260e-02 -2.6982998847961426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1462 2.8633379843086004e-03</internalNodes>\n          <leafValues>\n            -1.6874340176582336e-01 8.8886268436908722e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1463 -5.9488460421562195e-02</internalNodes>\n          <leafValues>\n            -3.4058949351310730e-01 2.4625880643725395e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1464 3.0714470893144608e-02</internalNodes>\n          <leafValues>\n            3.1796399503946304e-02 -4.1572770476341248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1465 -2.2330379113554955e-02</internalNodes>\n          <leafValues>\n            1.2896050512790680e-01 -2.4232570081949234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1466 2.3971609771251678e-02</internalNodes>\n          <leafValues>\n            -7.6858058571815491e-02 2.0360720157623291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1467 -6.0696780681610107e-02</internalNodes>\n          <leafValues>\n            -7.2060132026672363e-01 1.1617880314588547e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1468 -6.8362243473529816e-02</internalNodes>\n          <leafValues>\n            3.5825181007385254e-01 -4.4807899743318558e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1469 1.3451039791107178e-01</internalNodes>\n          <leafValues>\n            2.6008069515228271e-02 -2.5077620148658752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1470 1.3341170549392700e-01</internalNodes>\n          <leafValues>\n            4.7138180583715439e-02 -3.9661580324172974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1471 2.0524330437183380e-02</internalNodes>\n          <leafValues>\n            4.3894171714782715e-02 -2.8501969575881958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1472 4.1543610394001007e-02</internalNodes>\n          <leafValues>\n            2.5452220812439919e-02 -5.9377658367156982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1473 -7.1573443710803986e-02</internalNodes>\n          <leafValues>\n            -7.8743761777877808e-01 1.3979320414364338e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1474 6.6264629364013672e-02</internalNodes>\n          <leafValues>\n            2.2939130663871765e-02 -5.4304981231689453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1475 4.4609569013118744e-03</internalNodes>\n          <leafValues>\n            5.0688140094280243e-02 -2.0599000155925751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1476 1.4859540387988091e-02</internalNodes>\n          <leafValues>\n            -7.3408462107181549e-02 1.9902250170707703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1477 -3.9625339210033417e-02</internalNodes>\n          <leafValues>\n            -5.3522932529449463e-01 9.3211038038134575e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1478 -9.6143726259469986e-03</internalNodes>\n          <leafValues>\n            2.7664861083030701e-01 -6.3087522983551025e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1479 5.4589830338954926e-02</internalNodes>\n          <leafValues>\n            2.4962859228253365e-02 -5.8171188831329346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1480 1.3770899735391140e-02</internalNodes>\n          <leafValues>\n            -2.2891749441623688e-01 6.9963671267032623e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1481 8.6862340569496155e-02</internalNodes>\n          <leafValues>\n            2.4058010429143906e-02 -5.8642482757568359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1482 -2.2433010861277580e-02</internalNodes>\n          <leafValues>\n            -9.2169362306594849e-01 1.3281799852848053e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1483 -7.3779597878456116e-02</internalNodes>\n          <leafValues>\n            3.8463789224624634e-01 -8.5962712764739990e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1484 2.9300490859895945e-04</internalNodes>\n          <leafValues>\n            -1.7170579731464386e-01 8.8520109653472900e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>178</maxWeakCount>\n      <stageThreshold>-1.5360039472579956e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1485 5.3288340568542480e-03</internalNodes>\n          <leafValues>\n            -2.6616770029067993e-01 1.7760449647903442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1486 -4.0987450629472733e-03</internalNodes>\n          <leafValues>\n            1.2358420342206955e-01 -3.0805110931396484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1487 -5.5853058584034443e-03</internalNodes>\n          <leafValues>\n            -5.0533992052078247e-01 6.2050119042396545e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1488 -5.1797390915453434e-04</internalNodes>\n          <leafValues>\n            6.9178067147731781e-02 -3.4831359982490540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1489 5.3605018183588982e-03</internalNodes>\n          <leafValues>\n            6.5158672630786896e-02 -4.6262231469154358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1490 3.0114270746707916e-02</internalNodes>\n          <leafValues>\n            -6.4132362604141235e-02 7.1070060133934021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1491 8.9014291763305664e-02</internalNodes>\n          <leafValues>\n            4.2987130582332611e-02 -6.0177898406982422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1492 1.5248140553012490e-03</internalNodes>\n          <leafValues>\n            -3.3071789145469666e-01 7.1408301591873169e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1493 1.8556410213932395e-03</internalNodes>\n          <leafValues>\n            -3.4727120399475098e-01 7.0630677044391632e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1494 -1.6151620075106621e-02</internalNodes>\n          <leafValues>\n            -2.5611770153045654e-01 7.1255698800086975e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1495 -3.1278008827939630e-04</internalNodes>\n          <leafValues>\n            7.3420330882072449e-02 -2.9594621062278748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1496 -6.0263078921707347e-05</internalNodes>\n          <leafValues>\n            6.6566191613674164e-02 -2.1802450716495514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1497 7.6520902803167701e-04</internalNodes>\n          <leafValues>\n            7.5537197291851044e-02 -3.7677881121635437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1498 -6.9589070975780487e-02</internalNodes>\n          <leafValues>\n            3.9810648560523987e-01 -2.5841819122433662e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1499 -9.8529577255249023e-02</internalNodes>\n          <leafValues>\n            6.7321968078613281e-01 -3.3925469964742661e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1500 4.9950059503316879e-02</internalNodes>\n          <leafValues>\n            6.1660569161176682e-02 -3.7851110100746155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1501 3.9009240572340786e-04</internalNodes>\n          <leafValues>\n            -9.6428610384464264e-02 2.1700200438499451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1502 -7.1598717477172613e-04</internalNodes>\n          <leafValues>\n            -1.8358109891414642e-01 1.0587400197982788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1503 3.8064830005168915e-03</internalNodes>\n          <leafValues>\n            -1.7527610063552856e-01 1.1430399864912033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1504 6.5288757905364037e-03</internalNodes>\n          <leafValues>\n            6.7994527518749237e-02 -3.0726119875907898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1505 2.2182099055498838e-03</internalNodes>\n          <leafValues>\n            -2.7935230731964111e-01 5.8790720999240875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1506 1.7800349451135844e-04</internalNodes>\n          <leafValues>\n            9.9489107728004456e-02 -2.6616880297660828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1507 -3.2656680792570114e-02</internalNodes>\n          <leafValues>\n            5.8734762668609619e-01 -2.6545880362391472e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1508 2.6773350313305855e-02</internalNodes>\n          <leafValues>\n            3.6414410918951035e-02 -3.7188830971717834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1509 1.2780309654772282e-02</internalNodes>\n          <leafValues>\n            -8.4540523588657379e-02 1.7853260040283203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1510 5.5374070070683956e-03</internalNodes>\n          <leafValues>\n            -1.0892049968242645e-01 1.4403919875621796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1511 -7.1258977986872196e-03</internalNodes>\n          <leafValues>\n            1.9850020110607147e-01 -8.3359397947788239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1512 8.0109452828764915e-03</internalNodes>\n          <leafValues>\n            4.8844348639249802e-02 -2.8590029478073120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1513 -2.7231130748987198e-02</internalNodes>\n          <leafValues>\n            -6.8558162450790405e-01 2.1877769380807877e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1514 -2.0928949117660522e-02</internalNodes>\n          <leafValues>\n            -2.0820230245590210e-01 2.6585230603814125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1515 3.9801741950213909e-03</internalNodes>\n          <leafValues>\n            6.7004777491092682e-02 -2.3015810549259186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1516 2.1598068997263908e-03</internalNodes>\n          <leafValues>\n            -9.3109019100666046e-02 1.7235539853572845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1517 9.9411439150571823e-03</internalNodes>\n          <leafValues>\n            -4.4999819248914719e-02 3.1830498576164246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1518 -1.7938859760761261e-02</internalNodes>\n          <leafValues>\n            -2.1515959501266479e-01 7.2462916374206543e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1519 -1.5030350368760992e-05</internalNodes>\n          <leafValues>\n            9.1437973082065582e-02 -1.6706299781799316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1520 4.2446260340511799e-03</internalNodes>\n          <leafValues>\n            6.4810760319232941e-02 -1.0556270182132721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1521 7.4575991675374098e-06</internalNodes>\n          <leafValues>\n            -2.6309689879417419e-01 5.6588400155305862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1522 -1.0457210242748260e-02</internalNodes>\n          <leafValues>\n            1.6078880429267883e-01 -7.2708033025264740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1523 -1.2225599493831396e-03</internalNodes>\n          <leafValues>\n            1.1558330059051514e-01 -1.2233489751815796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1524 1.6061630100011826e-02</internalNodes>\n          <leafValues>\n            2.8201790526509285e-02 -5.0996178388595581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1525 -1.6162030398845673e-02</internalNodes>\n          <leafValues>\n            -3.3857521414756775e-01 3.5924781113862991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1526 7.2181350551545620e-03</internalNodes>\n          <leafValues>\n            -7.2706200182437897e-02 1.0624659806489944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1527 -1.0416660457849503e-02</internalNodes>\n          <leafValues>\n            1.6205810010433197e-01 -9.4567760825157166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1528 1.3946600258350372e-02</internalNodes>\n          <leafValues>\n            5.4169639945030212e-02 -3.2068040966987610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1529 1.2734119780361652e-02</internalNodes>\n          <leafValues>\n            -8.6066111922264099e-02 1.9648639857769012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1530 -2.7858370915055275e-02</internalNodes>\n          <leafValues>\n            -2.8409239649772644e-01 2.6706550270318985e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1531 -9.8931521177291870e-02</internalNodes>\n          <leafValues>\n            5.8457607030868530e-01 -2.1955510601401329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1532 2.3434299509972334e-03</internalNodes>\n          <leafValues>\n            9.6475467085838318e-02 -1.2095340341329575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1533 -2.3025700356811285e-03</internalNodes>\n          <leafValues>\n            7.3297969996929169e-02 -2.2309069335460663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1534 3.0791079625487328e-02</internalNodes>\n          <leafValues>\n            1.1463879607617855e-02 -2.4034079909324646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1535 -8.4339501336216927e-03</internalNodes>\n          <leafValues>\n            2.9611539840698242e-01 -4.2663689702749252e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1536 -3.4617669880390167e-03</internalNodes>\n          <leafValues>\n            -2.1257869899272919e-01 4.2709458619356155e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1537 -3.3371929079294205e-02</internalNodes>\n          <leafValues>\n            3.5299271345138550e-01 -3.5570569336414337e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1538 -3.7238128483295441e-02</internalNodes>\n          <leafValues>\n            -5.9177130460739136e-01 2.6775840669870377e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1539 -2.0860069990158081e-01</internalNodes>\n          <leafValues>\n            -5.7595241069793701e-01 1.9763559103012085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1540 -6.8279817700386047e-02</internalNodes>\n          <leafValues>\n            3.4582608938217163e-01 -3.7861179560422897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1541 1.1600320227444172e-02</internalNodes>\n          <leafValues>\n            5.7685580104589462e-02 -2.6008209586143494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1542 -6.7218959331512451e-02</internalNodes>\n          <leafValues>\n            -4.5048278570175171e-01 1.2495189905166626e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1543 -5.1632397808134556e-03</internalNodes>\n          <leafValues>\n            1.6146700084209442e-01 -7.6975770294666290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1544 4.0113311260938644e-02</internalNodes>\n          <leafValues>\n            1.3131230138242245e-02 -4.5731449127197266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1545 3.7837740033864975e-02</internalNodes>\n          <leafValues>\n            2.3001920431852341e-02 -5.3636288642883301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1546 2.6023429818451405e-03</internalNodes>\n          <leafValues>\n            -6.1007440090179443e-02 1.7084220051765442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1547 -7.1841642260551453e-02</internalNodes>\n          <leafValues>\n            -5.8330380916595459e-01 2.0075250416994095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1548 -8.2885712618008256e-04</internalNodes>\n          <leafValues>\n            5.3465340286493301e-02 -1.9092260301113129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1549 -8.1979477545246482e-04</internalNodes>\n          <leafValues>\n            -2.3775930702686310e-01 4.5844908803701401e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1550 1.0474859736859798e-02</internalNodes>\n          <leafValues>\n            -4.0103420615196228e-02 2.4948400259017944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1551 -6.3726361840963364e-03</internalNodes>\n          <leafValues>\n            -1.7087849974632263e-01 7.2894603013992310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1552 -3.6113489419221878e-02</internalNodes>\n          <leafValues>\n            -3.6879929900169373e-01 1.8331730738282204e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1553 5.4730800911784172e-04</internalNodes>\n          <leafValues>\n            7.2073057293891907e-02 -1.8893779814243317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1554 1.7547659575939178e-02</internalNodes>\n          <leafValues>\n            -9.4452597200870514e-02 1.3311000168323517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1555 6.3078789971768856e-03</internalNodes>\n          <leafValues>\n            7.6223470270633698e-02 -1.6668230295181274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1556 2.5120719801634550e-03</internalNodes>\n          <leafValues>\n            5.0375527143478394e-01 -2.2624349221587181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1557 4.5274170115590096e-03</internalNodes>\n          <leafValues>\n            -1.3446590304374695e-01 9.9167577922344208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1558 -1.4772829308640212e-04</internalNodes>\n          <leafValues>\n            3.9675179868936539e-02 -6.0015488415956497e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1559 1.4728739857673645e-02</internalNodes>\n          <leafValues>\n            3.9208918809890747e-02 -3.0560019612312317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1560 -5.6161261163651943e-03</internalNodes>\n          <leafValues>\n            -1.0845050215721130e-01 4.7754660248756409e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1561 -9.8265614360570908e-03</internalNodes>\n          <leafValues>\n            1.6729339957237244e-01 -7.6756693422794342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1562 1.7972329631447792e-02</internalNodes>\n          <leafValues>\n            -5.9147968888282776e-02 1.2773279845714569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1563 1.1233139783143997e-02</internalNodes>\n          <leafValues>\n            -9.2626020312309265e-02 1.5735739469528198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1564 1.3678249670192599e-03</internalNodes>\n          <leafValues>\n            -5.6156760454177856e-01 2.1800750866532326e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1565 -4.1535100899636745e-03</internalNodes>\n          <leafValues>\n            -2.6951169967651367e-01 4.1213478893041611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1566 -6.7194692790508270e-02</internalNodes>\n          <leafValues>\n            5.6008362770080566e-01 -2.0973740145564079e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1567 -8.0572411417961121e-02</internalNodes>\n          <leafValues>\n            -7.5846642255783081e-01 1.6614310443401337e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1568 -9.7504993900656700e-03</internalNodes>\n          <leafValues>\n            2.2781279683113098e-01 -4.0246330201625824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1569 5.6034037843346596e-03</internalNodes>\n          <leafValues>\n            -7.5519852340221405e-02 1.6372010111808777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1570 -1.0232060216367245e-02</internalNodes>\n          <leafValues>\n            -3.5803198814392090e-01 4.6331088989973068e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1571 2.8616760391741991e-03</internalNodes>\n          <leafValues>\n            6.7746236920356750e-02 -1.6429120302200317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1572 7.7214869670569897e-03</internalNodes>\n          <leafValues>\n            3.4494820982217789e-02 -1.7762580513954163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1573 -7.0147789083421230e-03</internalNodes>\n          <leafValues>\n            1.7282240092754364e-01 -6.5176323056221008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1574 5.0470869988203049e-02</internalNodes>\n          <leafValues>\n            -2.7071960270404816e-02 3.5509440302848816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1575 -5.7124681770801544e-03</internalNodes>\n          <leafValues>\n            -1.5901079773902893e-01 7.9559110105037689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1576 8.7470682337880135e-03</internalNodes>\n          <leafValues>\n            3.7789858877658844e-02 -1.9156649708747864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1577 2.0058929920196533e-02</internalNodes>\n          <leafValues>\n            2.7415299788117409e-02 -3.8070109486579895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1578 -1.8094859551638365e-03</internalNodes>\n          <leafValues>\n            1.0538379848003387e-01 -1.4996549487113953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1579 -7.3339277878403664e-03</internalNodes>\n          <leafValues>\n            2.9203268885612488e-01 -6.1218190938234329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1580 4.4179419055581093e-03</internalNodes>\n          <leafValues>\n            1.8868620693683624e-01 -5.8132741600275040e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1581 -1.3543309643864632e-02</internalNodes>\n          <leafValues>\n            -4.9409559369087219e-01 2.2855930030345917e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1582 3.6197271198034286e-02</internalNodes>\n          <leafValues>\n            -2.6089120656251907e-02 3.0890250205993652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1583 -1.1831840127706528e-01</internalNodes>\n          <leafValues>\n            -5.9094661474227905e-01 1.8215280026197433e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1584 7.5656071305274963e-02</internalNodes>\n          <leafValues>\n            -3.5965580493211746e-02 3.0386120080947876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1585 -1.3134519569575787e-02</internalNodes>\n          <leafValues>\n            -2.6306131482124329e-01 4.2262919247150421e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1586 1.8981160596013069e-02</internalNodes>\n          <leafValues>\n            -2.6483630761504173e-02 1.9371989369392395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1587 -4.6003229916095734e-02</internalNodes>\n          <leafValues>\n            4.0513500571250916e-01 -2.4454200640320778e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1588 -1.3232730329036713e-02</internalNodes>\n          <leafValues>\n            -2.9721269011497498e-01 4.7959219664335251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1589 1.9586850702762604e-01</internalNodes>\n          <leafValues>\n            1.0540399700403214e-02 -8.6647927761077881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1590 9.6459556370973587e-03</internalNodes>\n          <leafValues>\n            -7.1334943175315857e-02 1.1469510197639465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1591 -3.9044579025357962e-03</internalNodes>\n          <leafValues>\n            1.0740319639444351e-01 -9.8514996469020844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1592 1.6896370798349380e-02</internalNodes>\n          <leafValues>\n            -7.6805070042610168e-02 1.9533200562000275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1593 -5.5025662295520306e-03</internalNodes>\n          <leafValues>\n            5.0643190741539001e-02 -2.0898430049419403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1594 -1.9621569663286209e-02</internalNodes>\n          <leafValues>\n            -2.9651358723640442e-01 3.2955050468444824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1595 7.7158107887953520e-04</internalNodes>\n          <leafValues>\n            4.6017099171876907e-02 -1.9982999563217163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1596 -1.1102840304374695e-01</internalNodes>\n          <leafValues>\n            5.7578712701797485e-01 -1.7741529271006584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1597 1.4945500297471881e-03</internalNodes>\n          <leafValues>\n            4.7335729002952576e-02 -2.0898909866809845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1598 5.0667919218540192e-02</internalNodes>\n          <leafValues>\n            -1.8657619133591652e-02 3.4070459008216858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1599 1.6073169186711311e-02</internalNodes>\n          <leafValues>\n            -3.6449488252401352e-02 2.6568078994750977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1600 -2.6536740362644196e-02</internalNodes>\n          <leafValues>\n            -3.6141690611839294e-01 2.9734270647168159e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1601 -5.2550169639289379e-03</internalNodes>\n          <leafValues>\n            -1.3104499876499176e-01 8.2153528928756714e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1602 -1.6678560525178909e-02</internalNodes>\n          <leafValues>\n            3.1324890255928040e-01 -4.5052528381347656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1603 3.4808400087058544e-03</internalNodes>\n          <leafValues>\n            8.2945778965950012e-02 -1.5753500163555145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1604 -8.0889053642749786e-02</internalNodes>\n          <leafValues>\n            -6.4314198493957520e-01 7.1740332059562206e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1605 -5.4260632023215294e-03</internalNodes>\n          <leafValues>\n            1.3533130288124084e-01 -1.0547909885644913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1606 1.6630839556455612e-02</internalNodes>\n          <leafValues>\n            4.1602101176977158e-02 -2.6668208837509155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1607 1.7991060158237815e-03</internalNodes>\n          <leafValues>\n            5.9531088918447495e-02 -1.8355309963226318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1608 2.7219969779253006e-02</internalNodes>\n          <leafValues>\n            -2.6586830615997314e-02 2.2722280025482178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1609 -9.6450755372643471e-03</internalNodes>\n          <leafValues>\n            -2.1428169310092926e-01 4.9515731632709503e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1610 8.3123803138732910e-02</internalNodes>\n          <leafValues>\n            -4.2176891118288040e-02 3.0793419480323792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1611 1.4406450092792511e-02</internalNodes>\n          <leafValues>\n            -2.9500020667910576e-02 3.2144379615783691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1612 4.7938730567693710e-03</internalNodes>\n          <leafValues>\n            5.1244091242551804e-02 -1.0931850224733353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1613 -2.8978011105209589e-03</internalNodes>\n          <leafValues>\n            -1.4344370365142822e-01 6.6597223281860352e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1614 -4.5887690037488937e-02</internalNodes>\n          <leafValues>\n            1.8003830313682556e-01 -1.5642790123820305e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1615 -5.4717700928449631e-02</internalNodes>\n          <leafValues>\n            -3.5110801458358765e-01 3.0438890680670738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1616 -1.9787369295954704e-02</internalNodes>\n          <leafValues>\n            9.3385331332683563e-02 -4.9382571130990982e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1617 2.5110379792749882e-03</internalNodes>\n          <leafValues>\n            -6.6672600805759430e-02 1.4406199753284454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1618 5.3660150617361069e-02</internalNodes>\n          <leafValues>\n            1.4468840323388577e-02 -6.7007470130920410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1619 -8.1825470551848412e-03</internalNodes>\n          <leafValues>\n            1.1510120332241058e-01 -8.0932617187500000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1620 -3.5225939936935902e-03</internalNodes>\n          <leafValues>\n            -1.4181140065193176e-01 6.1330620199441910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1621 2.8271550312638283e-02</internalNodes>\n          <leafValues>\n            -2.8353890404105186e-02 3.7045130133628845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1622 -6.4923018217086792e-02</internalNodes>\n          <leafValues>\n            -4.6481159329414368e-01 2.2807259112596512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1623 -3.5065850615501404e-01</internalNodes>\n          <leafValues>\n            -8.2529050111770630e-01 1.1031460016965866e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1624 5.1821782253682613e-03</internalNodes>\n          <leafValues>\n            3.6583270877599716e-02 -2.4567179381847382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1625 9.2609220882877707e-04</internalNodes>\n          <leafValues>\n            -6.1898738145828247e-02 1.9307570159435272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1626 2.5952830910682678e-03</internalNodes>\n          <leafValues>\n            4.3015718460083008e-02 -1.9770270586013794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1627 3.4880579914897680e-03</internalNodes>\n          <leafValues>\n            -6.8296536803245544e-02 1.5725280344486237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1628 2.4002529680728912e-03</internalNodes>\n          <leafValues>\n            -6.8618178367614746e-02 6.8551987409591675e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1629 1.2020230060443282e-03</internalNodes>\n          <leafValues>\n            -1.2073139846324921e-01 9.5026522874832153e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1630 -2.0470360293984413e-02</internalNodes>\n          <leafValues>\n            -1.2891639769077301e-01 7.9386599361896515e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1631 -5.9516180306673050e-02</internalNodes>\n          <leafValues>\n            2.4869689345359802e-01 -4.9729160964488983e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1632 -1.0568950325250626e-02</internalNodes>\n          <leafValues>\n            -1.8583840131759644e-01 2.0700320601463318e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1633 -1.4192920178174973e-02</internalNodes>\n          <leafValues>\n            -3.8137429952621460e-01 2.9879279434680939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1634 -2.4968578945845366e-03</internalNodes>\n          <leafValues>\n            9.1516681015491486e-02 -5.0178311765193939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1635 1.7714010027702898e-04</internalNodes>\n          <leafValues>\n            -1.1470019817352295e-01 9.9245697259902954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1636 7.8318670392036438e-02</internalNodes>\n          <leafValues>\n            3.6057420074939728e-03 -9.9996072053909302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1637 1.5502399764955044e-03</internalNodes>\n          <leafValues>\n            -1.2888610363006592e-01 7.9822011291980743e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1638 -6.6678877919912338e-03</internalNodes>\n          <leafValues>\n            -8.8244557380676270e-02 2.8102599084377289e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1639 -4.0497239679098129e-03</internalNodes>\n          <leafValues>\n            -1.4427180588245392e-01 8.7126396596431732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1640 -3.5481531172990799e-02</internalNodes>\n          <leafValues>\n            -4.4681170582771301e-01 1.4808270148932934e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1641 -1.2597720138728619e-02</internalNodes>\n          <leafValues>\n            8.9324191212654114e-02 -1.2518140673637390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1642 7.4662449769675732e-03</internalNodes>\n          <leafValues>\n            7.4888199567794800e-02 -1.3587780296802521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1643 -6.7536987364292145e-02</internalNodes>\n          <leafValues>\n            2.3416820168495178e-01 -4.0952268987894058e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1644 8.2704171538352966e-02</internalNodes>\n          <leafValues>\n            7.6422439888119698e-03 -8.5177552700042725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1645 -7.1595138870179653e-03</internalNodes>\n          <leafValues>\n            -1.8738010525703430e-01 5.5288419127464294e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1646 -1.0481069795787334e-02</internalNodes>\n          <leafValues>\n            1.8271109461784363e-01 -5.9641968458890915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1647 4.5238467864692211e-03</internalNodes>\n          <leafValues>\n            -8.3817601203918457e-02 1.4822180569171906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1648 -2.6731120306067169e-04</internalNodes>\n          <leafValues>\n            -2.0896770060062408e-01 4.5835729688405991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1649 3.3838581293821335e-02</internalNodes>\n          <leafValues>\n            4.2582869529724121e-02 -2.1883819997310638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1650 2.2287720348685980e-03</internalNodes>\n          <leafValues>\n            -1.3284230232238770e-01 8.1795319914817810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1651 -5.4200361482799053e-03</internalNodes>\n          <leafValues>\n            -1.3896510004997253e-01 7.1154713630676270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1652 -4.9642968922853470e-02</internalNodes>\n          <leafValues>\n            4.8901641368865967e-01 -1.1556959711015224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1653 3.3323399256914854e-03</internalNodes>\n          <leafValues>\n            5.1426161080598831e-02 -1.8269440531730652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1654 2.4343939498066902e-02</internalNodes>\n          <leafValues>\n            -3.1839560717344284e-02 1.2758859992027283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1655 -2.3774489760398865e-02</internalNodes>\n          <leafValues>\n            3.2773551344871521e-01 -2.7216760441660881e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1656 3.6809889134019613e-03</internalNodes>\n          <leafValues>\n            5.2922040224075317e-02 -1.2880720198154449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1657 -3.2609070185571909e-03</internalNodes>\n          <leafValues>\n            -1.4948120713233948e-01 6.5733537077903748e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1658 1.0793889872729778e-02</internalNodes>\n          <leafValues>\n            -3.2969951629638672e-02 3.2955420017242432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1659 5.4287910461425781e-04</internalNodes>\n          <leafValues>\n            -1.0678680241107941e-01 9.8564229905605316e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1660 1.1902759782969952e-02</internalNodes>\n          <leafValues>\n            3.5682920366525650e-02 -3.1317448616027832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1661 2.4277849588543177e-03</internalNodes>\n          <leafValues>\n            -6.2080658972263336e-02 1.7598509788513184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1662 -4.4930889271199703e-03</internalNodes>\n          <leafValues>\n            1.1790850013494492e-01 -1.0593199729919434e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>143</maxWeakCount>\n      <stageThreshold>-1.7262409925460815e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1663 -2.0656470209360123e-02</internalNodes>\n          <leafValues>\n            2.5365149974822998e-01 -3.1044611334800720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1664 -3.6518350243568420e-02</internalNodes>\n          <leafValues>\n            2.4484130740165710e-01 -2.3221190273761749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1665 4.9312350153923035e-01</internalNodes>\n          <leafValues>\n            -1.6275240480899811e-01 2.8116190433502197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1666 2.0970099285477772e-05</internalNodes>\n          <leafValues>\n            -3.0840009450912476e-01 1.7317549884319305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1667 1.3082929886877537e-02</internalNodes>\n          <leafValues>\n            -2.5983220338821411e-01 1.5675869584083557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1668 -4.3061940232291818e-04</internalNodes>\n          <leafValues>\n            7.8543603420257568e-02 -3.9016070961952209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1669 -1.6367400065064430e-02</internalNodes>\n          <leafValues>\n            -4.3000039458274841e-01 7.4141636490821838e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1670 3.6269389092922211e-02</internalNodes>\n          <leafValues>\n            -1.7073200643062592e-01 1.8045969307422638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1671 1.2340269982814789e-02</internalNodes>\n          <leafValues>\n            8.8775381445884705e-02 -3.4402659535408020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1672 -7.3516286909580231e-02</internalNodes>\n          <leafValues>\n            -4.1623479127883911e-01 -2.9528199229389429e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1673 4.6191830188035965e-04</internalNodes>\n          <leafValues>\n            6.5629899501800537e-02 -4.1018250584602356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1674 -1.4744039624929428e-02</internalNodes>\n          <leafValues>\n            2.2775030136108398e-01 -7.9184867441654205e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1675 4.2559150606393814e-03</internalNodes>\n          <leafValues>\n            -2.4004960060119629e-01 1.1321090161800385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1676 -3.6180280148983002e-03</internalNodes>\n          <leafValues>\n            -2.7612069249153137e-01 1.0118050128221512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1677 4.6012919396162033e-02</internalNodes>\n          <leafValues>\n            4.5763589441776276e-02 -5.4713648557662964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1678 -1.6181809827685356e-02</internalNodes>\n          <leafValues>\n            1.9489669799804688e-01 -7.3955342173576355e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1679 -2.3682719984208234e-05</internalNodes>\n          <leafValues>\n            1.1729680001735687e-01 -1.9396829605102539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1680 -2.1599140018224716e-03</internalNodes>\n          <leafValues>\n            -4.5654550194740295e-01 4.2699530720710754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1681 -7.9827345907688141e-03</internalNodes>\n          <leafValues>\n            -5.4107201099395752e-01 4.0036130696535110e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1682 -8.1530469469726086e-04</internalNodes>\n          <leafValues>\n            -2.0640519261360168e-01 6.6795073449611664e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1683 -4.7501060180366039e-03</internalNodes>\n          <leafValues>\n            -3.6572128534317017e-01 7.5665749609470367e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1684 -3.4870140254497528e-02</internalNodes>\n          <leafValues>\n            -8.0093812942504883e-01 2.2356539964675903e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1685 -1.9949559122323990e-02</internalNodes>\n          <leafValues>\n            -3.9110630750656128e-01 4.6844650059938431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1686 -5.9008211828768253e-03</internalNodes>\n          <leafValues>\n            9.0756498277187347e-02 -1.7600280046463013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1687 -1.4019970549270511e-03</internalNodes>\n          <leafValues>\n            -2.9260930418968201e-01 6.4894109964370728e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1688 -2.2886939346790314e-02</internalNodes>\n          <leafValues>\n            -4.8391869664192200e-01 5.0514958798885345e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1689 -1.0039290413260460e-02</internalNodes>\n          <leafValues>\n            2.6921668648719788e-01 -7.5274370610713959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1690 1.6729189082980156e-02</internalNodes>\n          <leafValues>\n            -7.3217533528804779e-02 2.2045159339904785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1691 -2.0423909649252892e-02</internalNodes>\n          <leafValues>\n            -4.5161980390548706e-01 4.5858111232519150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1692 -3.5104680806398392e-02</internalNodes>\n          <leafValues>\n            -5.5169981718063354e-01 2.3118300363421440e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1693 1.0697999969124794e-02</internalNodes>\n          <leafValues>\n            3.3516589552164078e-02 -5.2482652664184570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1694 -3.8978241384029388e-02</internalNodes>\n          <leafValues>\n            -6.2331187725067139e-01 2.6838419958949089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1695 4.8226700164377689e-03</internalNodes>\n          <leafValues>\n            -1.1215549707412720e-01 1.5613789856433868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1696 3.6878231167793274e-01</internalNodes>\n          <leafValues>\n            1.9857980310916901e-02 -6.1260747909545898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1697 -7.7059920877218246e-03</internalNodes>\n          <leafValues>\n            -3.7371110916137695e-01 4.3724238872528076e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1698 -6.6843323409557343e-02</internalNodes>\n          <leafValues>\n            -5.0772088766098022e-01 2.4401089176535606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1699 3.7273049354553223e-02</internalNodes>\n          <leafValues>\n            3.6522880196571350e-02 -4.3735611438751221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1700 -3.3105209469795227e-02</internalNodes>\n          <leafValues>\n            -3.4438988566398621e-01 3.2440148293972015e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1701 5.3402669727802277e-03</internalNodes>\n          <leafValues>\n            9.2385761439800262e-02 -1.7823779582977295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1702 2.1542439237236977e-02</internalNodes>\n          <leafValues>\n            -1.9848670065402985e-01 5.1953200250864029e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1703 3.3289310336112976e-01</internalNodes>\n          <leafValues>\n            -6.0750268399715424e-02 2.8925099968910217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1704 -6.6301261540502310e-04</internalNodes>\n          <leafValues>\n            3.3636718988418579e-02 -2.8510418534278870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1705 4.6686761081218719e-02</internalNodes>\n          <leafValues>\n            -4.9883669614791870e-01 3.3776078373193741e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1706 -2.2452229168266058e-03</internalNodes>\n          <leafValues>\n            -1.9685390591621399e-01 9.5161177217960358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1707 -1.1499020271003246e-02</internalNodes>\n          <leafValues>\n            -3.2423889636993408e-01 5.2468359470367432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1708 1.3134529814124107e-02</internalNodes>\n          <leafValues>\n            -6.7538492381572723e-02 2.7605938911437988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1709 -1.5978980809450150e-02</internalNodes>\n          <leafValues>\n            3.1496050953865051e-01 -7.6657392084598541e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1710 2.4199750274419785e-02</internalNodes>\n          <leafValues>\n            5.5836521089076996e-02 -3.6609899997711182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1711 4.0229028090834618e-03</internalNodes>\n          <leafValues>\n            -1.3053479790687561e-01 1.3470110297203064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1712 -1.4172590337693691e-02</internalNodes>\n          <leafValues>\n            -8.8616542518138885e-02 5.5053278803825378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1713 1.8967399373650551e-02</internalNodes>\n          <leafValues>\n            5.1348548382520676e-02 -3.1439921259880066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1714 2.6502970606088638e-02</internalNodes>\n          <leafValues>\n            -1.1065970361232758e-01 8.8080927729606628e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1715 -3.9654489606618881e-02</internalNodes>\n          <leafValues>\n            -5.0742971897125244e-01 3.2999441027641296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1716 -8.9988503605127335e-03</internalNodes>\n          <leafValues>\n            1.2830139696598053e-01 -7.3064133524894714e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1717 7.4613288044929504e-02</internalNodes>\n          <leafValues>\n            3.1729809939861298e-02 -5.3899657726287842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1718 3.3414870500564575e-02</internalNodes>\n          <leafValues>\n            -6.1130590736865997e-02 2.4669900536537170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1719 9.6071150619536638e-04</internalNodes>\n          <leafValues>\n            1.2528179585933685e-01 -1.4304199814796448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1720 -8.6224973201751709e-03</internalNodes>\n          <leafValues>\n            -2.2081799805164337e-01 4.7569438815116882e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1721 3.9893008768558502e-02</internalNodes>\n          <leafValues>\n            -5.1774360239505768e-02 3.1735679507255554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1722 8.5388116538524628e-02</internalNodes>\n          <leafValues>\n            -3.5584390163421631e-02 4.1974198818206787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1723 6.3205747865140438e-03</internalNodes>\n          <leafValues>\n            6.9412536919116974e-02 -2.9979988932609558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1724 -5.8932311832904816e-02</internalNodes>\n          <leafValues>\n            -4.6194219589233398e-01 2.2290540859103203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1725 -1.0054419748485088e-02</internalNodes>\n          <leafValues>\n            2.3649129271507263e-01 -6.6811926662921906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1726 -2.5194720365107059e-05</internalNodes>\n          <leafValues>\n            7.8815452754497528e-02 -1.1585489660501480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1727 -5.9346649795770645e-02</internalNodes>\n          <leafValues>\n            -5.8799749612808228e-01 3.0486419796943665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1728 2.0421659573912621e-02</internalNodes>\n          <leafValues>\n            3.9184041321277618e-02 -2.6986798644065857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1729 -4.0381640195846558e-02</internalNodes>\n          <leafValues>\n            -6.1601102352142334e-01 2.5353100150823593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1730 1.7877650260925293e-01</internalNodes>\n          <leafValues>\n            -5.7135760784149170e-02 1.7361579835414886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1731 -2.2120740264654160e-02</internalNodes>\n          <leafValues>\n            -3.7697589397430420e-01 4.2690049856901169e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1732 1.1585020273923874e-01</internalNodes>\n          <leafValues>\n            9.8102567717432976e-03 -6.1380887031555176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1733 9.7944810986518860e-02</internalNodes>\n          <leafValues>\n            3.6329559981822968e-02 -4.5240780711174011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1734 -2.9123030602931976e-02</internalNodes>\n          <leafValues>\n            -6.5607357025146484e-01 8.4500880911946297e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1735 -1.3053599745035172e-02</internalNodes>\n          <leafValues>\n            -3.4685650467872620e-01 4.6511679887771606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1736 1.3451489619910717e-02</internalNodes>\n          <leafValues>\n            3.4420430660247803e-02 -1.0168869793415070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1737 -2.3957140743732452e-02</internalNodes>\n          <leafValues>\n            -8.4189480543136597e-01 1.9317319616675377e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1738 -1.3450190424919128e-01</internalNodes>\n          <leafValues>\n            3.9132338762283325e-01 -2.1901259198784828e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1739 -1.0342430323362350e-01</internalNodes>\n          <leafValues>\n            6.0790222883224487e-01 -2.5869879871606827e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1740 -4.1464429348707199e-02</internalNodes>\n          <leafValues>\n            -3.9631319046020508e-01 3.7771981209516525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1741 -3.4945748746395111e-02</internalNodes>\n          <leafValues>\n            -4.5746931433677673e-01 3.2913569360971451e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1742 1.4289909973740578e-02</internalNodes>\n          <leafValues>\n            -5.0757531076669693e-02 3.1772908568382263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1743 -5.4311589337885380e-03</internalNodes>\n          <leafValues>\n            2.4708689749240875e-01 -7.8526623547077179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1744 2.6972589548677206e-03</internalNodes>\n          <leafValues>\n            -3.4061861038208008e-01 5.0948519259691238e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1745 -4.3831961229443550e-03</internalNodes>\n          <leafValues>\n            8.0095797777175903e-02 -2.0902189612388611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1746 -1.5958329662680626e-02</internalNodes>\n          <leafValues>\n            -2.4625590443611145e-01 5.8348231017589569e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1747 4.5252371579408646e-02</internalNodes>\n          <leafValues>\n            4.1630141437053680e-02 -3.5550931096076965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1748 -1.8278149887919426e-02</internalNodes>\n          <leafValues>\n            3.0804929137229919e-01 -4.7184839844703674e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1749 2.5277629494667053e-02</internalNodes>\n          <leafValues>\n            2.9698649421334267e-02 -5.3776097297668457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1750 7.2078350931406021e-03</internalNodes>\n          <leafValues>\n            -1.2820510566234589e-01 1.1753190308809280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1751 -1.4014700055122375e-01</internalNodes>\n          <leafValues>\n            -4.5020869374275208e-01 3.2753791660070419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1752 -4.5832369476556778e-02</internalNodes>\n          <leafValues>\n            -4.2000839114189148e-01 2.4114929139614105e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1753 -4.3976899236440659e-02</internalNodes>\n          <leafValues>\n            -4.5973241329193115e-01 3.3604741096496582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1754 -1.0124820284545422e-02</internalNodes>\n          <leafValues>\n            1.6260810196399689e-01 -6.6449157893657684e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1755 -1.3071260182186961e-03</internalNodes>\n          <leafValues>\n            1.1608310043811798e-01 -1.3168659806251526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1756 4.5284889638423920e-02</internalNodes>\n          <leafValues>\n            3.5751760005950928e-02 -4.4795739650726318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1757 -2.0851079374551773e-02</internalNodes>\n          <leafValues>\n            2.4665319919586182e-01 -6.5854541957378387e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1758 2.6742550544440746e-03</internalNodes>\n          <leafValues>\n            5.1683109253644943e-02 -1.3699389994144440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1759 1.3148089637979865e-03</internalNodes>\n          <leafValues>\n            7.7798873186111450e-02 -2.1064509451389313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1760 -1.8174739554524422e-02</internalNodes>\n          <leafValues>\n            1.7355039715766907e-01 -7.2417192161083221e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1761 1.4314319938421249e-02</internalNodes>\n          <leafValues>\n            8.1756986677646637e-02 -1.7111450433731079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1762 -1.6486430540680885e-02</internalNodes>\n          <leafValues>\n            2.2809509932994843e-01 -6.5906368196010590e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1763 3.0756060034036636e-02</internalNodes>\n          <leafValues>\n            3.8717139512300491e-02 -4.0505141019821167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1764 2.6106089353561401e-02</internalNodes>\n          <leafValues>\n            3.0850199982523918e-02 -2.7759250998497009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1765 8.0401107668876648e-02</internalNodes>\n          <leafValues>\n            2.9792500659823418e-02 -4.4742569327354431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1766 -1.8350789323449135e-02</internalNodes>\n          <leafValues>\n            1.1515419930219650e-01 -2.8744319453835487e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1767 3.4827049821615219e-02</internalNodes>\n          <leafValues>\n            2.8738139197230339e-02 -4.8401808738708496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1768 -8.8250182569026947e-02</internalNodes>\n          <leafValues>\n            -4.2635539174079895e-01 3.0173489823937416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1769 1.4836989343166351e-01</internalNodes>\n          <leafValues>\n            2.2089749574661255e-02 -5.5364227294921875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1770 -1.8949609249830246e-02</internalNodes>\n          <leafValues>\n            -2.3020160198211670e-01 3.9267301559448242e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1771 -5.6775949895381927e-02</internalNodes>\n          <leafValues>\n            3.5013529658317566e-01 -4.0862828493118286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1772 6.2286540865898132e-02</internalNodes>\n          <leafValues>\n            2.2344540804624557e-02 -7.1082341670989990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1773 -3.8629550486803055e-02</internalNodes>\n          <leafValues>\n            -3.2933491468429565e-01 3.8508068770170212e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1774 2.8154330328106880e-02</internalNodes>\n          <leafValues>\n            -7.3690913617610931e-02 1.8824370205402374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1775 -1.0570179671049118e-02</internalNodes>\n          <leafValues>\n            -2.7806881070137024e-01 4.7679189592599869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1776 5.6604571640491486e-02</internalNodes>\n          <leafValues>\n            2.4767610430717468e-01 -5.6830938905477524e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1777 -2.8522670269012451e-01</internalNodes>\n          <leafValues>\n            5.2345401048660278e-01 -2.3652829229831696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1778 3.4807138144969940e-02</internalNodes>\n          <leafValues>\n            2.4819910526275635e-02 -4.3205270171165466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1779 -2.3218799382448196e-02</internalNodes>\n          <leafValues>\n            2.9929161071777344e-01 -4.4712670147418976e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1780 -6.3094392418861389e-02</internalNodes>\n          <leafValues>\n            3.3279260993003845e-01 -1.6075499355792999e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1781 3.0182430148124695e-01</internalNodes>\n          <leafValues>\n            -7.5196906924247742e-02 1.9139809906482697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1782 2.3077869787812233e-02</internalNodes>\n          <leafValues>\n            3.6844979971647263e-02 -2.8761258721351624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1783 1.0964149981737137e-01</internalNodes>\n          <leafValues>\n            3.7548121064901352e-02 -4.1763558983802795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1784 2.9672039672732353e-02</internalNodes>\n          <leafValues>\n            -7.8409820795059204e-02 1.3064210116863251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1785 6.3356538303196430e-03</internalNodes>\n          <leafValues>\n            6.7014321684837341e-02 -2.0481500029563904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1786 -1.9940949976444244e-02</internalNodes>\n          <leafValues>\n            8.4663636982440948e-02 -4.2069409042596817e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1787 -4.7988001257181168e-02</internalNodes>\n          <leafValues>\n            -6.1099517345428467e-01 2.2842260077595711e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1788 4.8280019313097000e-02</internalNodes>\n          <leafValues>\n            7.4727279134094715e-03 -7.5153297185897827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1789 -2.5825301418080926e-04</internalNodes>\n          <leafValues>\n            3.5517089068889618e-02 -3.2686069607734680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1790 -4.8175308853387833e-02</internalNodes>\n          <leafValues>\n            -5.8099460601806641e-01 1.9760759547352791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1791 -2.8606340289115906e-02</internalNodes>\n          <leafValues>\n            3.2096970081329346e-01 -4.0734320878982544e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1792 -4.3328531086444855e-02</internalNodes>\n          <leafValues>\n            -3.3021429181098938e-01 3.1527239829301834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1793 2.2753410041332245e-02</internalNodes>\n          <leafValues>\n            3.7327829748392105e-02 -3.6291739344596863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1794 1.8975350030814297e-05</internalNodes>\n          <leafValues>\n            -1.1503349989652634e-01 4.1816640645265579e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1795 1.8077540397644043e-01</internalNodes>\n          <leafValues>\n            -5.5751871317625046e-02 2.2424830496311188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1796 -1.2539149820804596e-01</internalNodes>\n          <leafValues>\n            -8.8098400831222534e-01 3.8788339588791132e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1797 -8.0908974632620811e-03</internalNodes>\n          <leafValues>\n            2.6210701465606689e-01 -5.3706649690866470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1798 9.9102966487407684e-03</internalNodes>\n          <leafValues>\n            -1.2978099286556244e-01 8.3635807037353516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1799 2.4792920798063278e-02</internalNodes>\n          <leafValues>\n            -1.4584439992904663e-01 9.2305660247802734e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1800 4.5074880123138428e-02</internalNodes>\n          <leafValues>\n            -7.2375498712062836e-02 2.6057431101799011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1801 -7.9205513000488281e-02</internalNodes>\n          <leafValues>\n            -6.2073522806167603e-01 2.1323349326848984e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1802 -4.4725250452756882e-02</internalNodes>\n          <leafValues>\n            -6.4248198270797729e-01 9.5317112281918526e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1803 -3.4065779298543930e-02</internalNodes>\n          <leafValues>\n            3.0759710073471069e-01 -4.2296990752220154e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1804 -2.9756739735603333e-02</internalNodes>\n          <leafValues>\n            2.5211650133132935e-01 -3.1183030456304550e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1805 -3.2026950269937515e-02</internalNodes>\n          <leafValues>\n            -5.5300801992416382e-01 2.8021570295095444e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>193</maxWeakCount>\n      <stageThreshold>-1.4976780414581299e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1806 2.8652619570493698e-02</internalNodes>\n          <leafValues>\n            -2.1822139620780945e-01 2.2675579786300659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1807 4.3320041149854660e-03</internalNodes>\n          <leafValues>\n            -2.8597879409790039e-01 1.0589209944009781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1808 5.6604119017720222e-03</internalNodes>\n          <leafValues>\n            8.8295452296733856e-02 -3.8920480012893677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1809 2.4440148845314980e-03</internalNodes>\n          <leafValues>\n            -3.5482680797576904e-01 9.9362373352050781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1810 2.2643520496785641e-03</internalNodes>\n          <leafValues>\n            -2.8858441114425659e-01 8.8367857038974762e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1811 5.3952648304402828e-03</internalNodes>\n          <leafValues>\n            8.5537381470203400e-02 -3.0366399884223938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1812 -7.2699488373473287e-04</internalNodes>\n          <leafValues>\n            7.4840240180492401e-02 -3.4039780497550964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1813 -9.7503658616915345e-04</internalNodes>\n          <leafValues>\n            1.2008629739284515e-01 -2.5634410977363586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1814 4.0540988557040691e-03</internalNodes>\n          <leafValues>\n            6.7266032099723816e-02 -3.5701939463615417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1815 2.5258921086788177e-03</internalNodes>\n          <leafValues>\n            -4.1966471076011658e-01 5.5665798485279083e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1816 -1.2021360453218222e-03</internalNodes>\n          <leafValues>\n            1.0004480183124542e-01 -2.1932320296764374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1817 7.7549100387841463e-04</internalNodes>\n          <leafValues>\n            -1.3562729954719543e-01 1.1973659694194794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1818 -5.0699848681688309e-02</internalNodes>\n          <leafValues>\n            4.5418289303779602e-01 -3.9030350744724274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1819 1.3364490121603012e-02</internalNodes>\n          <leafValues>\n            1.1166039854288101e-01 -1.7938789725303650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1820 -1.5418980270624161e-02</internalNodes>\n          <leafValues>\n            -3.5180059075355530e-01 4.7354999929666519e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1821 -4.2981099337339401e-02</internalNodes>\n          <leafValues>\n            3.9232799410820007e-01 -4.5337028801441193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1822 6.2867929227650166e-03</internalNodes>\n          <leafValues>\n            6.4331822097301483e-02 -2.2239510715007782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1823 -3.5951940808445215e-03</internalNodes>\n          <leafValues>\n            9.5404297113418579e-02 -1.5338289737701416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1824 -7.6760917901992798e-02</internalNodes>\n          <leafValues>\n            -6.5099817514419556e-01 1.7283650115132332e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1825 4.6225200640037656e-04</internalNodes>\n          <leafValues>\n            -4.3415609002113342e-01 2.5241859257221222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1826 7.5868278509005904e-04</internalNodes>\n          <leafValues>\n            -1.4624330401420593e-01 9.6319071948528290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1827 -5.0252641085535288e-04</internalNodes>\n          <leafValues>\n            1.3584020733833313e-01 -2.3181040585041046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1828 9.7315143793821335e-03</internalNodes>\n          <leafValues>\n            -8.5155591368675232e-02 2.0156989991664886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1829 -2.6432229205965996e-02</internalNodes>\n          <leafValues>\n            -3.7002518773078918e-01 2.4616630747914314e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1830 -4.4683468877337873e-04</internalNodes>\n          <leafValues>\n            1.0048960149288177e-01 -1.8588609993457794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1831 1.9872789271175861e-03</internalNodes>\n          <leafValues>\n            5.3223919123411179e-02 -3.1603801250457764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1832 3.1368629424832761e-04</internalNodes>\n          <leafValues>\n            -1.3213190436363220e-01 9.5771767199039459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1833 5.9834700077772141e-03</internalNodes>\n          <leafValues>\n            -7.5681813061237335e-02 1.5230950713157654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1834 -5.0965389236807823e-03</internalNodes>\n          <leafValues>\n            -1.8477819859981537e-01 7.6022140681743622e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1835 -1.9187610596418381e-02</internalNodes>\n          <leafValues>\n            2.1431809663772583e-01 -4.9764219671487808e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1836 2.3320479318499565e-02</internalNodes>\n          <leafValues>\n            -4.8689320683479309e-02 2.6578998565673828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1837 -6.9449091097339988e-04</internalNodes>\n          <leafValues>\n            -1.5433350205421448e-01 8.7410651147365570e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1838 4.8893648199737072e-03</internalNodes>\n          <leafValues>\n            5.1342789083719254e-02 -2.6165360212326050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1839 -2.7428869158029556e-02</internalNodes>\n          <leafValues>\n            -3.7972038984298706e-01 3.1821161508560181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1840 -1.7734549939632416e-02</internalNodes>\n          <leafValues>\n            1.9976620376110077e-01 -6.2318049371242523e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1841 1.5148259699344635e-01</internalNodes>\n          <leafValues>\n            7.4510741978883743e-03 -5.8031332492828369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1842 1.5324390260502696e-03</internalNodes>\n          <leafValues>\n            -1.2510550022125244e-01 1.0431899875402451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1843 -1.2310810387134552e-02</internalNodes>\n          <leafValues>\n            -2.3539729416370392e-01 5.3646210581064224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1844 -1.1210800148546696e-02</internalNodes>\n          <leafValues>\n            1.0759239643812180e-01 -1.2055230140686035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1845 2.7532500680536032e-03</internalNodes>\n          <leafValues>\n            -6.6479906439781189e-02 1.7321150004863739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1846 -8.4678819403052330e-03</internalNodes>\n          <leafValues>\n            -3.1850680708885193e-01 4.2280819267034531e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1847 -7.3283319361507893e-03</internalNodes>\n          <leafValues>\n            -1.6369259357452393e-01 3.1772349029779434e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1848 4.7156549990177155e-02</internalNodes>\n          <leafValues>\n            -6.1667099595069885e-02 1.7410990595817566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1849 8.2125868648290634e-03</internalNodes>\n          <leafValues>\n            6.7069798707962036e-02 -2.2030070424079895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1850 7.6550841331481934e-03</internalNodes>\n          <leafValues>\n            6.1422310769557953e-02 -1.9357620179653168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1851 -4.5372851192951202e-02</internalNodes>\n          <leafValues>\n            -4.7565659880638123e-01 2.2869469597935677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1852 3.7434820551425219e-03</internalNodes>\n          <leafValues>\n            -9.0940922498703003e-02 1.3841210305690765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1853 2.3490150924772024e-03</internalNodes>\n          <leafValues>\n            6.3291497528553009e-02 -1.5506389737129211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1854 -2.4149749428033829e-02</internalNodes>\n          <leafValues>\n            3.4588441252708435e-01 -3.1525820493698120e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1855 1.4878350310027599e-02</internalNodes>\n          <leafValues>\n            2.4215059354901314e-02 -3.2387629151344299e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1856 2.9843160882592201e-02</internalNodes>\n          <leafValues>\n            -2.7817690744996071e-02 4.0939471125602722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1857 7.1600051596760750e-03</internalNodes>\n          <leafValues>\n            -4.6596240252256393e-02 7.4547067284584045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1858 5.6267209351062775e-02</internalNodes>\n          <leafValues>\n            2.9551850631833076e-02 -4.0098059177398682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1859 -4.5356149785220623e-03</internalNodes>\n          <leafValues>\n            8.1820577383041382e-02 -1.0619299858808517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1860 -1.3697359710931778e-02</internalNodes>\n          <leafValues>\n            -1.9359089434146881e-01 7.0917747914791107e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1861 -1.5458730049431324e-03</internalNodes>\n          <leafValues>\n            -2.1987679600715637e-01 2.8396489098668098e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1862 2.9332858975976706e-03</internalNodes>\n          <leafValues>\n            -7.6153233647346497e-02 1.6460180282592773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1863 3.4973609726876020e-03</internalNodes>\n          <leafValues>\n            -6.8196080625057220e-02 1.6717350482940674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1864 -1.8307069316506386e-02</internalNodes>\n          <leafValues>\n            -1.8867099285125732e-01 6.9932736456394196e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1865 -1.7092080414295197e-01</internalNodes>\n          <leafValues>\n            -5.0067770481109619e-01 7.8164357692003250e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1866 4.1620130650699139e-03</internalNodes>\n          <leafValues>\n            5.5900041013956070e-02 -2.2972549498081207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1867 -1.9724309444427490e-02</internalNodes>\n          <leafValues>\n            3.2998558878898621e-01 -3.6602400243282318e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1868 5.3331600502133369e-03</internalNodes>\n          <leafValues>\n            -1.4134259521961212e-01 8.8277637958526611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1869 -4.2182218283414841e-02</internalNodes>\n          <leafValues>\n            -6.6718780994415283e-01 1.5770509839057922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1870 -5.2826730534434319e-03</internalNodes>\n          <leafValues>\n            1.7025630176067352e-01 -6.8491317331790924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1871 -2.3227441124618053e-03</internalNodes>\n          <leafValues>\n            7.2378590703010559e-02 -1.0066709667444229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1872 -1.6239390242844820e-03</internalNodes>\n          <leafValues>\n            -2.2501319646835327e-01 5.5898498743772507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1873 5.6083410978317261e-02</internalNodes>\n          <leafValues>\n            1.3646169565618038e-02 -4.9306789040565491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1874 -3.0199930071830750e-02</internalNodes>\n          <leafValues>\n            2.3070830106735229e-01 -5.3645938634872437e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1875 1.9157670438289642e-02</internalNodes>\n          <leafValues>\n            3.6830320954322815e-02 -3.9522978663444519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1876 3.5853029694408178e-03</internalNodes>\n          <leafValues>\n            -6.1893220990896225e-02 1.7583209276199341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1877 -2.8775330632925034e-02</internalNodes>\n          <leafValues>\n            -3.1838440895080566e-01 2.3103740066289902e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1878 2.5611401069909334e-03</internalNodes>\n          <leafValues>\n            -1.0484419763088226e-01 9.7152568399906158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1879 -3.1554490327835083e-02</internalNodes>\n          <leafValues>\n            2.9366511106491089e-01 -2.4189069867134094e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1880 -7.3520588921383023e-04</internalNodes>\n          <leafValues>\n            9.7711041569709778e-02 -1.5248039364814758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1881 -4.7993879765272141e-02</internalNodes>\n          <leafValues>\n            -9.4587820768356323e-01 9.0406481176614761e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1882 5.2936570718884468e-03</internalNodes>\n          <leafValues>\n            3.3320371061563492e-02 -3.1268939375877380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1883 1.6903249546885490e-02</internalNodes>\n          <leafValues>\n            -2.4132709950208664e-02 2.8483408689498901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1884 -7.0723611861467361e-03</internalNodes>\n          <leafValues>\n            -1.7524200677871704e-01 7.2713881731033325e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1885 6.4191617071628571e-02</internalNodes>\n          <leafValues>\n            -2.0969670265913010e-02 3.5402628779411316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1886 2.9694940894842148e-03</internalNodes>\n          <leafValues>\n            -7.5086936354637146e-02 1.4321349561214447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1887 -2.0105259492993355e-02</internalNodes>\n          <leafValues>\n            6.0784012079238892e-01 -1.8104499205946922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1888 -1.3169869780540466e-02</internalNodes>\n          <leafValues>\n            -5.4678368568420410e-01 2.4742240086197853e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1889 -1.4226729981601238e-02</internalNodes>\n          <leafValues>\n            -4.6722590923309326e-01 3.1489629298448563e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1890 3.7746191024780273e-02</internalNodes>\n          <leafValues>\n            -3.8495831191539764e-02 3.5333481431007385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1891 -3.8704369217157364e-03</internalNodes>\n          <leafValues>\n            1.4984290301799774e-01 -5.6549768894910812e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1892 -1.1565440334379673e-02</internalNodes>\n          <leafValues>\n            -1.5227930247783661e-01 7.6062962412834167e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1893 -8.8854476809501648e-02</internalNodes>\n          <leafValues>\n            -7.2967928647994995e-01 4.8231678083539009e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1894 -2.0447981078177691e-03</internalNodes>\n          <leafValues>\n            1.4148180186748505e-01 -8.3200357854366302e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1895 -1.1762860231101513e-02</internalNodes>\n          <leafValues>\n            -4.0200519561767578e-01 2.6679439470171928e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1896 -1.7539029940962791e-02</internalNodes>\n          <leafValues>\n            -3.7316259741783142e-01 3.0171979218721390e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1897 3.8314110133796930e-03</internalNodes>\n          <leafValues>\n            -9.3409948050975800e-02 7.9503498971462250e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1898 -1.4472359791398048e-02</internalNodes>\n          <leafValues>\n            3.4333580732345581e-01 -4.3657060712575912e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1899 -2.6516690850257874e-02</internalNodes>\n          <leafValues>\n            -4.8230230808258057e-01 1.6811650246381760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1900 -3.3194791525602341e-02</internalNodes>\n          <leafValues>\n            -4.3580260872840881e-01 2.2644890472292900e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1901 4.4987560249865055e-03</internalNodes>\n          <leafValues>\n            -3.2281540334224701e-02 8.9946307241916656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1902 3.6823831032961607e-03</internalNodes>\n          <leafValues>\n            -6.8755462765693665e-02 1.4339810609817505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1903 -1.1184140294790268e-01</internalNodes>\n          <leafValues>\n            -7.7756762504577637e-01 5.2246451377868652e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1904 -7.3255039751529694e-02</internalNodes>\n          <leafValues>\n            -5.5630749464035034e-01 1.9127149134874344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1905 2.9855769127607346e-02</internalNodes>\n          <leafValues>\n            2.1178830415010452e-02 -4.0850040316581726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1906 -7.3472231626510620e-02</internalNodes>\n          <leafValues>\n            8.2820487022399902e-01 -1.2452909722924232e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1907 -7.2046648710966110e-04</internalNodes>\n          <leafValues>\n            9.9630527198314667e-02 -9.5278859138488770e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1908 -3.8003330701030791e-04</internalNodes>\n          <leafValues>\n            1.0231109708547592e-01 -1.0351389646530151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1909 -4.5453108847141266e-02</internalNodes>\n          <leafValues>\n            -6.4885061979293823e-01 1.1966000311076641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1910 -5.1456969231367111e-04</internalNodes>\n          <leafValues>\n            -1.5083299577236176e-01 6.6544473171234131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1911 2.7949180454015732e-02</internalNodes>\n          <leafValues>\n            1.7186399549245834e-02 -3.7501189112663269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1912 6.3039876520633698e-02</internalNodes>\n          <leafValues>\n            -4.3821588158607483e-02 2.4789440631866455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1913 -2.2690258920192719e-03</internalNodes>\n          <leafValues>\n            7.4712008237838745e-02 -1.1131580173969269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1914 -3.8063840474933386e-03</internalNodes>\n          <leafValues>\n            -1.5530909597873688e-01 6.5264508128166199e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1915 3.7190090864896774e-02</internalNodes>\n          <leafValues>\n            -2.9698630794882774e-02 2.3071870207786560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1916 2.1895840764045715e-02</internalNodes>\n          <leafValues>\n            1.5778519213199615e-02 -6.3006269931793213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1917 -3.1993988901376724e-02</internalNodes>\n          <leafValues>\n            2.6250898838043213e-01 -2.4627109989523888e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1918 -1.6778679564595222e-02</internalNodes>\n          <leafValues>\n            -4.2436981201171875e-01 2.2607849910855293e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1919 5.2477661520242691e-02</internalNodes>\n          <leafValues>\n            -1.6188420355319977e-02 3.1766140460968018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1920 1.0443729907274246e-01</internalNodes>\n          <leafValues>\n            1.1290200054645538e-02 -8.6021018028259277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1921 -6.5574781037867069e-03</internalNodes>\n          <leafValues>\n            1.2225849926471710e-01 -5.6091431528329849e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1922 1.6797389835119247e-02</internalNodes>\n          <leafValues>\n            3.5811539739370346e-02 -3.1163010001182556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1923 5.0427159294486046e-03</internalNodes>\n          <leafValues>\n            -5.0439529120922089e-02 6.3930332660675049e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1924 -3.4571789205074310e-02</internalNodes>\n          <leafValues>\n            -5.6278371810913086e-01 1.6692740842700005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1925 3.7999521009624004e-03</internalNodes>\n          <leafValues>\n            -6.8566747009754181e-02 9.6017867326736450e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1926 -1.1995599605143070e-02</internalNodes>\n          <leafValues>\n            1.3819910585880280e-01 -7.1510016918182373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1927 1.1098429560661316e-02</internalNodes>\n          <leafValues>\n            5.3506620228290558e-02 -1.0482089966535568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1928 -1.2905290722846985e-01</internalNodes>\n          <leafValues>\n            -6.7262178659439087e-01 1.5195850282907486e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1929 6.3130040653049946e-03</internalNodes>\n          <leafValues>\n            -6.1030130833387375e-02 1.0355649888515472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1930 4.0955888107419014e-03</internalNodes>\n          <leafValues>\n            7.0534646511077881e-02 -1.4484269917011261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1931 -1.0530550032854080e-02</internalNodes>\n          <leafValues>\n            9.8569639027118683e-02 -3.7973210215568542e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1932 3.6035990342497826e-03</internalNodes>\n          <leafValues>\n            5.1277790218591690e-02 -1.8671560287475586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1933 1.1999369598925114e-03</internalNodes>\n          <leafValues>\n            -6.3231408596038818e-02 1.0446310043334961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1934 -1.9585370318964124e-04</internalNodes>\n          <leafValues>\n            8.6044862866401672e-02 -1.1856850236654282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1935 -1.2213560193777084e-01</internalNodes>\n          <leafValues>\n            -8.8419800996780396e-01 6.3145011663436890e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1936 -7.7650691382586956e-03</internalNodes>\n          <leafValues>\n            1.3725960254669189e-01 -8.0412857234477997e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1937 1.5734319388866425e-01</internalNodes>\n          <leafValues>\n            1.2743320316076279e-02 -6.5401297807693481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1938 -7.6066371984779835e-03</internalNodes>\n          <leafValues>\n            -1.3797719776630402e-01 7.6062493026256561e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1939 -4.3096300214529037e-03</internalNodes>\n          <leafValues>\n            1.1195199936628342e-01 -3.2390709966421127e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1940 -3.2239840365946293e-03</internalNodes>\n          <leafValues>\n            2.1420599520206451e-01 -5.8244630694389343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1941 8.3754826337099075e-03</internalNodes>\n          <leafValues>\n            4.7615598887205124e-02 -2.4216049909591675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1942 3.0904430896043777e-03</internalNodes>\n          <leafValues>\n            -9.0418681502342224e-02 9.9244832992553711e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1943 9.8243616521358490e-03</internalNodes>\n          <leafValues>\n            -4.4643919914960861e-02 1.0423039644956589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1944 -3.2808810938149691e-03</internalNodes>\n          <leafValues>\n            -1.9123159348964691e-01 6.3141517341136932e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1945 3.6370379384607077e-03</internalNodes>\n          <leafValues>\n            3.6944739520549774e-02 -1.1988619714975357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1946 7.8952945768833160e-03</internalNodes>\n          <leafValues>\n            -7.1313530206680298e-02 1.6107399761676788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1947 -3.3853040076792240e-03</internalNodes>\n          <leafValues>\n            -1.1704929918050766e-01 2.5579249486327171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1948 -2.6786550879478455e-03</internalNodes>\n          <leafValues>\n            -1.7064009606838226e-01 6.0627460479736328e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1949 -4.5887688174843788e-03</internalNodes>\n          <leafValues>\n            3.4779790788888931e-02 -6.8817831575870514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1950 -6.1642300337553024e-02</internalNodes>\n          <leafValues>\n            5.1108109951019287e-01 -1.9752239808440208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1951 2.5235159322619438e-02</internalNodes>\n          <leafValues>\n            2.0203070715069771e-02 -3.4359911084175110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1952 -2.1312809549272060e-03</internalNodes>\n          <leafValues>\n            5.4698210209608078e-02 -1.6512370109558105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1953 -8.2598842680454254e-02</internalNodes>\n          <leafValues>\n            3.3804669976234436e-01 -2.8026569634675980e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1954 -5.6678601540625095e-03</internalNodes>\n          <leafValues>\n            -3.3786231279373169e-01 2.9727049171924591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1955 -9.3317396938800812e-02</internalNodes>\n          <leafValues>\n            -6.7238032817840576e-01 2.0025020930916071e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1956 9.2052231775596738e-04</internalNodes>\n          <leafValues>\n            -1.3974259793758392e-01 6.3175596296787262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1957 5.1411538152024150e-04</internalNodes>\n          <leafValues>\n            -8.1585250794887543e-02 5.9324279427528381e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1958 -6.7130490206182003e-03</internalNodes>\n          <leafValues>\n            -1.6645990312099457e-01 6.1560809612274170e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1959 3.1578689813613892e-03</internalNodes>\n          <leafValues>\n            -1.0710070282220840e-01 6.6695116460323334e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1960 1.2202030047774315e-02</internalNodes>\n          <leafValues>\n            -2.4845300242304802e-02 4.2458030581474304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1961 -2.8585169464349747e-02</internalNodes>\n          <leafValues>\n            2.3526839911937714e-01 -2.1121440455317497e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1962 2.3390499409288168e-03</internalNodes>\n          <leafValues>\n            6.4441107213497162e-02 -1.4063580334186554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1963 3.5900938510894775e-01</internalNodes>\n          <leafValues>\n            1.2122919782996178e-02 -7.3121142387390137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1964 7.6048658229410648e-03</internalNodes>\n          <leafValues>\n            -4.0700931102037430e-02 2.3581039905548096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1965 4.4263368472456932e-03</internalNodes>\n          <leafValues>\n            5.3039629012346268e-02 -1.5912020206451416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1966 8.5811351891607046e-04</internalNodes>\n          <leafValues>\n            -8.5265956819057465e-02 1.0489220172166824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1967 -4.2959367856383324e-03</internalNodes>\n          <leafValues>\n            -1.2851840257644653e-01 6.2752753496170044e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1968 4.4881720095872879e-03</internalNodes>\n          <leafValues>\n            6.4671441912651062e-02 -1.8789650499820709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1969 -4.9869619309902191e-02</internalNodes>\n          <leafValues>\n            2.1496759355068207e-01 -3.5577021539211273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1970 -1.1942230165004730e-01</internalNodes>\n          <leafValues>\n            -6.7953938245773315e-01 1.5091570094227791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1971 6.2965508550405502e-04</internalNodes>\n          <leafValues>\n            -9.2145420610904694e-02 6.1806648969650269e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1972 2.9381969943642616e-03</internalNodes>\n          <leafValues>\n            1.7903240025043488e-01 -4.9355998635292053e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1973 -2.2860679775476456e-02</internalNodes>\n          <leafValues>\n            2.0976249873638153e-01 -3.1370889395475388e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1974 4.3369621038436890e-02</internalNodes>\n          <leafValues>\n            1.8286330625414848e-02 -5.1288998126983643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1975 1.9932509958744049e-01</internalNodes>\n          <leafValues>\n            6.7204708466306329e-04 -8.9769357442855835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1976 8.0751203000545502e-02</internalNodes>\n          <leafValues>\n            -2.0869649946689606e-02 4.3768700957298279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1977 1.5349129680544138e-03</internalNodes>\n          <leafValues>\n            3.6761760711669922e-02 -2.2203999757766724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1978 -3.6580949090421200e-03</internalNodes>\n          <leafValues>\n            -1.5471710264682770e-01 6.7229896783828735e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1979 2.4743290618062019e-02</internalNodes>\n          <leafValues>\n            -5.5474709719419479e-02 1.7429579794406891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1980 -1.6451500356197357e-02</internalNodes>\n          <leafValues>\n            1.8817320466041565e-01 -5.5719010531902313e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1981 -8.4505761042237282e-03</internalNodes>\n          <leafValues>\n            -3.2943668961524963e-01 2.2743720561265945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1982 2.9369179159402847e-02</internalNodes>\n          <leafValues>\n            1.5479310415685177e-02 -5.9099632501602173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1983 1.0524799674749374e-01</internalNodes>\n          <leafValues>\n            2.1177560556679964e-03 -4.9212720990180969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1984 -2.7816150337457657e-02</internalNodes>\n          <leafValues>\n            3.6421439051628113e-01 -2.5163119658827782e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1985 5.3339339792728424e-03</internalNodes>\n          <leafValues>\n            -4.8402350395917892e-02 3.9851561188697815e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1986 1.1682730168104172e-02</internalNodes>\n          <leafValues>\n            2.4898340925574303e-02 -3.5719999670982361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1987 8.9094992727041245e-03</internalNodes>\n          <leafValues>\n            4.6579260379076004e-02 -1.5088100731372833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1988 7.3203681968152523e-03</internalNodes>\n          <leafValues>\n            7.0891879498958588e-02 -1.3278549909591675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1989 -2.0311130210757256e-02</internalNodes>\n          <leafValues>\n            1.7783379554748535e-01 -3.7538051605224609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1990 1.3689160114154220e-03</internalNodes>\n          <leafValues>\n            -1.2096449732780457e-01 7.8017823398113251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1991 7.6994091272354126e-02</internalNodes>\n          <leafValues>\n            -8.7762605398893356e-03 3.2993561029434204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1992 8.8949268683791161e-03</internalNodes>\n          <leafValues>\n            -5.5553250014781952e-02 1.6372109949588776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1993 -1.8518440425395966e-02</internalNodes>\n          <leafValues>\n            -1.4479570090770721e-01 3.0250260606408119e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1994 -4.0174879133701324e-02</internalNodes>\n          <leafValues>\n            -2.4990509450435638e-01 4.0788788348436356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1995 6.5176486968994141e-02</internalNodes>\n          <leafValues>\n            -1.4393090270459652e-02 3.7707069516181946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1996 -1.4845930039882660e-02</internalNodes>\n          <leafValues>\n            2.7375608682632446e-01 -3.3898409456014633e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1997 -6.1434650421142578e-01</internalNodes>\n          <leafValues>\n            -6.9167751073837280e-01 4.0905540809035301e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1998 1.4119890332221985e-01</internalNodes>\n          <leafValues>\n            1.6643870621919632e-02 -5.8944582939147949e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>157</maxWeakCount>\n      <stageThreshold>-1.5337220430374146e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1999 2.1962670609354973e-02</internalNodes>\n          <leafValues>\n            -3.0903491377830505e-01 2.1529789268970490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2000 5.1272530108690262e-02</internalNodes>\n          <leafValues>\n            -2.2286629676818848e-01 2.9869711399078369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2001 4.1870009154081345e-02</internalNodes>\n          <leafValues>\n            -2.7849119901657104e-01 2.0416070520877838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2002 6.7551871761679649e-03</internalNodes>\n          <leafValues>\n            -2.1988549828529358e-01 7.3887020349502563e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2003 1.7311690375208855e-02</internalNodes>\n          <leafValues>\n            -3.4227430820465088e-01 1.3190160691738129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2004 1.5399109572172165e-02</internalNodes>\n          <leafValues>\n            -2.3149499297142029e-01 1.8828059732913971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2005 -1.0792730376124382e-02</internalNodes>\n          <leafValues>\n            -3.0813691020011902e-01 1.1191529780626297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2006 8.5879449034109712e-04</internalNodes>\n          <leafValues>\n            7.2238206863403320e-02 -4.4624349474906921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2007 9.2791311908513308e-04</internalNodes>\n          <leafValues>\n            -2.9247429966926575e-01 9.3132883310317993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2008 -8.5785696282982826e-03</internalNodes>\n          <leafValues>\n            2.0642790198326111e-01 -1.1203339695930481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2009 -1.8951490521430969e-02</internalNodes>\n          <leafValues>\n            -3.9317628741264343e-01 6.7260466516017914e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2010 3.4939948469400406e-02</internalNodes>\n          <leafValues>\n            2.8045989573001862e-02 -5.7410031557083130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2011 -4.2870659381151199e-02</internalNodes>\n          <leafValues>\n            -5.9856891632080078e-01 3.4607890993356705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2012 5.4958608234301209e-04</internalNodes>\n          <leafValues>\n            -4.1193041205406189e-01 6.7322418093681335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2013 2.2494920995086432e-03</internalNodes>\n          <leafValues>\n            1.3482889533042908e-01 -1.9777689874172211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2014 -9.2442613095045090e-03</internalNodes>\n          <leafValues>\n            -1.7850719392299652e-01 7.6734513044357300e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2015 1.2210760032758117e-03</internalNodes>\n          <leafValues>\n            -3.4616300463676453e-01 7.5431950390338898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2016 1.3654090464115143e-02</internalNodes>\n          <leafValues>\n            7.7861636877059937e-02 -4.3963378667831421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2017 1.7332829535007477e-02</internalNodes>\n          <leafValues>\n            4.8317600041627884e-02 -4.1461798548698425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2018 -1.6807779669761658e-02</internalNodes>\n          <leafValues>\n            2.3211599886417389e-01 -8.2342058420181274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2019 3.2203171402215958e-02</internalNodes>\n          <leafValues>\n            3.4065268933773041e-02 -5.9796607494354248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2020 1.6777820885181427e-02</internalNodes>\n          <leafValues>\n            -5.9402968734502792e-02 1.6782909631729126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2021 1.3074859976768494e-02</internalNodes>\n          <leafValues>\n            -1.0592609643936157e-01 2.3796890676021576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2022 9.4082832336425781e-02</internalNodes>\n          <leafValues>\n            1.0573189705610275e-02 -5.3249269723892212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2023 -7.6036658138036728e-03</internalNodes>\n          <leafValues>\n            -2.3031429946422577e-01 1.0104469954967499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2024 8.2368071889504790e-04</internalNodes>\n          <leafValues>\n            4.6598970890045166e-02 -1.0087580233812332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2025 -7.6875449158251286e-03</internalNodes>\n          <leafValues>\n            -2.6123398542404175e-01 7.3543973267078400e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2026 -3.3729180693626404e-02</internalNodes>\n          <leafValues>\n            2.1907149255275726e-01 -2.1958939731121063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2027 1.3204690068960190e-02</internalNodes>\n          <leafValues>\n            -1.4203189313411713e-01 1.5107029676437378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2028 8.5354369366541505e-04</internalNodes>\n          <leafValues>\n            -2.4303670227527618e-01 8.3283171057701111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2029 -1.4071330428123474e-02</internalNodes>\n          <leafValues>\n            -3.6977100372314453e-01 5.5142328143119812e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2030 -1.1115919798612595e-02</internalNodes>\n          <leafValues>\n            -4.6575489640235901e-01 2.7285559102892876e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2031 1.3858900405466557e-02</internalNodes>\n          <leafValues>\n            -9.1722346842288971e-02 1.9947899878025055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2032 8.5548251867294312e-02</internalNodes>\n          <leafValues>\n            2.6189789175987244e-02 -3.6603820323944092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2033 -1.9484929740428925e-02</internalNodes>\n          <leafValues>\n            1.7259980738162994e-01 -8.9445300400257111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2034 2.1631179377436638e-02</internalNodes>\n          <leafValues>\n            -5.6183289736509323e-02 6.7707277834415436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2035 1.9267840310931206e-02</internalNodes>\n          <leafValues>\n            5.5609680712223053e-02 -2.9480481147766113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2036 1.1855900287628174e-02</internalNodes>\n          <leafValues>\n            6.8580061197280884e-02 -2.7094689011573792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2037 1.7135039670392871e-03</internalNodes>\n          <leafValues>\n            -1.5590840578079224e-01 9.4477489590644836e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2038 6.2993362545967102e-02</internalNodes>\n          <leafValues>\n            2.9042679816484451e-02 -2.5151410698890686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2039 1.7328880727291107e-02</internalNodes>\n          <leafValues>\n            -4.3562661856412888e-02 3.4017661213874817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2040 2.4053089320659637e-02</internalNodes>\n          <leafValues>\n            3.7450179457664490e-02 -2.8990021347999573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2041 2.1294029429554939e-02</internalNodes>\n          <leafValues>\n            4.8889711499214172e-02 -3.6390760540962219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2042 9.2860676348209381e-02</internalNodes>\n          <leafValues>\n            -3.6604419350624084e-02 3.2365238666534424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2043 2.1167730446904898e-03</internalNodes>\n          <leafValues>\n            8.7506070733070374e-02 -1.8339939415454865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2044 -8.7125040590763092e-02</internalNodes>\n          <leafValues>\n            -4.6162751317024231e-01 3.1342040747404099e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2045 1.9298809766769409e-01</internalNodes>\n          <leafValues>\n            2.9041619971394539e-02 -4.4543629884719849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2046 -2.4475890313624404e-05</internalNodes>\n          <leafValues>\n            5.9352759271860123e-02 -2.0239880681037903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2047 -3.4894149750471115e-02</internalNodes>\n          <leafValues>\n            -4.5676550269126892e-01 3.5249751061201096e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2048 1.9192209839820862e-01</internalNodes>\n          <leafValues>\n            -4.0733739733695984e-02 1.5444849431514740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2049 -2.3085139691829681e-02</internalNodes>\n          <leafValues>\n            7.1740321815013885e-02 -2.0493650436401367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2050 2.9535569250583649e-02</internalNodes>\n          <leafValues>\n            4.0762118995189667e-02 -3.6926439404487610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2051 -3.6492519080638885e-02</internalNodes>\n          <leafValues>\n            -5.4941332340240479e-01 2.5431329384446144e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2052 4.0696229785680771e-02</internalNodes>\n          <leafValues>\n            1.0515309870243073e-02 -4.9906229972839355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2053 -3.6384560167789459e-02</internalNodes>\n          <leafValues>\n            -2.4736070632934570e-01 5.3187850862741470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2054 3.7000048905611038e-02</internalNodes>\n          <leafValues>\n            -4.6731691807508469e-02 3.0095300078392029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2055 3.7872981280088425e-02</internalNodes>\n          <leafValues>\n            4.5600850135087967e-02 -3.3789730072021484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2056 -1.6164340078830719e-02</internalNodes>\n          <leafValues>\n            1.9655610620975494e-01 -5.6567810475826263e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2057 2.4253420531749725e-01</internalNodes>\n          <leafValues>\n            3.7772599607706070e-02 -3.6190840601921082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2058 -1.7429869621992111e-02</internalNodes>\n          <leafValues>\n            7.8519687056541443e-02 -1.9835950806736946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2059 1.4150669798254967e-02</internalNodes>\n          <leafValues>\n            -1.5143400430679321e-01 1.2028410285711288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2060 6.3771687448024750e-02</internalNodes>\n          <leafValues>\n            6.8969810381531715e-03 -8.0511492490768433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2061 1.1273720301687717e-03</internalNodes>\n          <leafValues>\n            -2.6931971311569214e-01 5.2550218999385834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2062 -3.8293499499559402e-02</internalNodes>\n          <leafValues>\n            2.0563830435276031e-01 -2.1474370732903481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2063 5.0103109329938889e-02</internalNodes>\n          <leafValues>\n            2.3352440446615219e-02 -5.4645192623138428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2064 -4.0057931095361710e-02</internalNodes>\n          <leafValues>\n            2.4553330242633820e-01 -3.3474709838628769e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2065 1.8415290862321854e-02</internalNodes>\n          <leafValues>\n            -7.5977481901645660e-02 1.8510019779205322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2066 1.0548150166869164e-02</internalNodes>\n          <leafValues>\n            6.6050186753273010e-02 -6.4367741346359253e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2067 7.3007687926292419e-02</internalNodes>\n          <leafValues>\n            -2.6471909135580063e-02 4.6508520841598511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2068 -3.4658040851354599e-02</internalNodes>\n          <leafValues>\n            2.7848151326179504e-01 -4.6662889420986176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2069 1.6924630850553513e-02</internalNodes>\n          <leafValues>\n            1.1554700136184692e-01 -1.1504360288381577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2070 -7.4245870113372803e-02</internalNodes>\n          <leafValues>\n            -4.3072721362113953e-01 1.6461249440908432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2071 -7.3406308889389038e-02</internalNodes>\n          <leafValues>\n            -5.6626558303833008e-01 2.3453989997506142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2072 1.2397419661283493e-01</internalNodes>\n          <leafValues>\n            -5.4616708308458328e-02 1.0024350136518478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2073 -1.6235560178756714e-02</internalNodes>\n          <leafValues>\n            -1.9912120699882507e-01 6.8537697196006775e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2074 -3.0137969180941582e-02</internalNodes>\n          <leafValues>\n            -3.3398950099945068e-01 2.2806070744991302e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2075 -8.1836536526679993e-02</internalNodes>\n          <leafValues>\n            4.0628650784492493e-01 -3.7828210741281509e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2076 5.2240878343582153e-01</internalNodes>\n          <leafValues>\n            1.8094440922141075e-02 -4.3477010726928711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2077 1.4845579862594604e-02</internalNodes>\n          <leafValues>\n            -7.0279222726821899e-01 1.9977509975433350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2078 -5.5507790297269821e-02</internalNodes>\n          <leafValues>\n            5.1214778423309326e-01 -2.8097610920667648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2079 -2.7078049257397652e-02</internalNodes>\n          <leafValues>\n            3.0834761261940002e-01 -4.0676809847354889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2080 -2.4416339583694935e-03</internalNodes>\n          <leafValues>\n            -1.2054579704999924e-01 5.9857279062271118e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2081 1.5043720602989197e-01</internalNodes>\n          <leafValues>\n            -6.0036379843950272e-02 2.2021989524364471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2082 -4.1030261665582657e-02</internalNodes>\n          <leafValues>\n            -3.3254709839820862e-01 2.5029130280017853e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2083 1.4609499834477901e-02</internalNodes>\n          <leafValues>\n            5.1357660442590714e-02 -2.8190329670906067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2084 1.2588420510292053e-01</internalNodes>\n          <leafValues>\n            6.7158509045839310e-03 -4.9155730009078979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2085 -3.7784978747367859e-02</internalNodes>\n          <leafValues>\n            5.1675951480865479e-01 -2.7236010879278183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2086 -1.8090210855007172e-02</internalNodes>\n          <leafValues>\n            -3.5778409242630005e-01 3.5485059022903442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2087 -3.9881139993667603e-02</internalNodes>\n          <leafValues>\n            -4.8079541325569153e-01 2.7166770771145821e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2088 7.3324372060596943e-03</internalNodes>\n          <leafValues>\n            -5.3297691047191620e-02 1.1757290363311768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2089 -6.9262558827176690e-04</internalNodes>\n          <leafValues>\n            -1.4501209557056427e-01 9.2885218560695648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2090 -8.2166977226734161e-02</internalNodes>\n          <leafValues>\n            2.3127609491348267e-01 -5.6990649551153183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2091 3.8556379731744528e-03</internalNodes>\n          <leafValues>\n            9.5330670475959778e-02 -1.5586289763450623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2092 -7.4245668947696686e-03</internalNodes>\n          <leafValues>\n            -2.7692940831184387e-01 3.5343449562788010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2093 2.2808350622653961e-02</internalNodes>\n          <leafValues>\n            4.6904660761356354e-02 -3.3659911155700684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2094 8.2916222512722015e-02</internalNodes>\n          <leafValues>\n            2.8655149508267641e-03 -5.2691662311553955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2095 -5.2402060478925705e-02</internalNodes>\n          <leafValues>\n            -6.9835901260375977e-01 1.8587840721011162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2096 1.5193739905953407e-02</internalNodes>\n          <leafValues>\n            -6.0126390308141708e-02 2.5917008519172668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2097 -1.4240809716284275e-02</internalNodes>\n          <leafValues>\n            2.7056190371513367e-01 -6.4629502594470978e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2098 -3.2158840913325548e-03</internalNodes>\n          <leafValues>\n            -9.3549117445945740e-02 2.8090029954910278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2099 4.7198659740388393e-03</internalNodes>\n          <leafValues>\n            -1.8783959746360779e-01 7.1021787822246552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2100 -2.5415599346160889e-02</internalNodes>\n          <leafValues>\n            -3.3236810564994812e-01 4.0915489196777344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2101 4.2758490890264511e-02</internalNodes>\n          <leafValues>\n            2.6150930672883987e-02 -5.1128530502319336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2102 4.2231049388647079e-02</internalNodes>\n          <leafValues>\n            -2.1398520097136497e-02 1.7453899979591370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2103 -2.0674670115113258e-02</internalNodes>\n          <leafValues>\n            2.5898760557174683e-01 -5.6440889835357666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2104 2.8976969420909882e-02</internalNodes>\n          <leafValues>\n            -2.0763730630278587e-02 9.6909962594509125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2105 3.4173950552940369e-03</internalNodes>\n          <leafValues>\n            9.3572951853275299e-02 -1.5996080636978149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2106 6.7922919988632202e-02</internalNodes>\n          <leafValues>\n            1.6243519261479378e-02 -7.4624717235565186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2107 -9.0270619839429855e-03</internalNodes>\n          <leafValues>\n            3.3382698893547058e-01 -3.8774389773607254e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2108 -2.8317999094724655e-02</internalNodes>\n          <leafValues>\n            -3.6276119947433472e-01 2.3800129070878029e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2109 -1.5302050160244107e-03</internalNodes>\n          <leafValues>\n            -1.8413589894771576e-01 7.0150263607501984e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2110 8.4196459501981735e-03</internalNodes>\n          <leafValues>\n            9.0586692094802856e-02 -6.1134628951549530e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2111 4.4346109032630920e-02</internalNodes>\n          <leafValues>\n            6.1388049274682999e-02 -2.1231949329376221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2112 2.5921100750565529e-02</internalNodes>\n          <leafValues>\n            -3.5028610378503799e-02 2.2107489407062531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2113 -6.0503371059894562e-03</internalNodes>\n          <leafValues>\n            -3.2179000973701477e-01 3.9333820343017578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2114 -2.5171019136905670e-02</internalNodes>\n          <leafValues>\n            6.9517672061920166e-01 -1.8360199406743050e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2115 -5.2073050290346146e-02</internalNodes>\n          <leafValues>\n            -7.4727028608322144e-01 1.9030340015888214e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2116 -1.3639439828693867e-02</internalNodes>\n          <leafValues>\n            -6.2003239989280701e-02 4.1589640080928802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2117 -3.8377299904823303e-02</internalNodes>\n          <leafValues>\n            3.8518410921096802e-01 -3.1509511172771454e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2118 -1.4677719771862030e-01</internalNodes>\n          <leafValues>\n            -6.0099261999130249e-01 1.0989420115947723e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2119 2.0508460700511932e-02</internalNodes>\n          <leafValues>\n            5.6464750319719315e-02 -2.5149369239807129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2120 2.3784590885043144e-02</internalNodes>\n          <leafValues>\n            5.8459620922803879e-02 -2.2233340144157410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2121 1.8658170476555824e-02</internalNodes>\n          <leafValues>\n            -7.3706217110157013e-02 1.8556639552116394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2122 -2.6653500273823738e-02</internalNodes>\n          <leafValues>\n            2.1061730384826660e-01 -6.8629503250122070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2123 -7.5975798070430756e-02</internalNodes>\n          <leafValues>\n            -4.8535370826721191e-01 2.7239590883255005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2124 5.3205721080303192e-02</internalNodes>\n          <leafValues>\n            5.1950141787528992e-03 -4.7940468788146973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2125 4.1206479072570801e-02</internalNodes>\n          <leafValues>\n            1.9166460260748863e-02 -6.4439648389816284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2126 2.2624490782618523e-02</internalNodes>\n          <leafValues>\n            1.7490459606051445e-02 -2.0645530521869659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2127 2.1147429943084717e-02</internalNodes>\n          <leafValues>\n            -3.2944951206445694e-02 3.5154509544372559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2128 1.3374770060181618e-02</internalNodes>\n          <leafValues>\n            4.0784850716590881e-02 -1.9725930690765381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2129 4.2831092141568661e-03</internalNodes>\n          <leafValues>\n            -8.5159152746200562e-02 1.4025710523128510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2130 6.3718900084495544e-02</internalNodes>\n          <leafValues>\n            -4.9198199994862080e-03 4.5491519570350647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2131 1.2082169763743877e-02</internalNodes>\n          <leafValues>\n            5.3176809102296829e-02 -2.6156601309776306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2132 1.8195409327745438e-02</internalNodes>\n          <leafValues>\n            -3.8999419659376144e-02 3.3412361145019531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2133 2.8948329389095306e-02</internalNodes>\n          <leafValues>\n            3.9750248193740845e-02 -3.4182530641555786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2134 -9.3633607029914856e-02</internalNodes>\n          <leafValues>\n            -9.4571298360824585e-01 3.0850030016154051e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2135 3.4850560128688812e-02</internalNodes>\n          <leafValues>\n            3.1342729926109314e-02 -3.5700461268424988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2136 1.2895749509334564e-01</internalNodes>\n          <leafValues>\n            -3.9653491228818893e-02 3.7412929534912109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2137 2.3297289386391640e-02</internalNodes>\n          <leafValues>\n            2.5941710919141769e-02 -4.7231191396713257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2138 1.5667669475078583e-02</internalNodes>\n          <leafValues>\n            -8.1445790827274323e-02 1.5750789642333984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2139 1.1425570119172335e-03</internalNodes>\n          <leafValues>\n            6.3901476562023163e-02 -2.0547799766063690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2140 -5.5744551122188568e-02</internalNodes>\n          <leafValues>\n            -3.4481841325759888e-01 1.1300710029900074e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2141 -9.2509537935256958e-02</internalNodes>\n          <leafValues>\n            8.9074200391769409e-01 -1.5398530289530754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2142 -5.5660872021690011e-04</internalNodes>\n          <leafValues>\n            8.7056189775466919e-02 -5.1321998238563538e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2143 -1.4538520015776157e-02</internalNodes>\n          <leafValues>\n            -4.5140060782432556e-01 2.8146119788289070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2144 -3.7515729665756226e-02</internalNodes>\n          <leafValues>\n            -7.3286539316177368e-01 6.7265569232404232e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2145 -1.5516959829255939e-03</internalNodes>\n          <leafValues>\n            9.1213479638099670e-02 -1.3395330309867859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2146 -9.5461420714855194e-02</internalNodes>\n          <leafValues>\n            -9.5529359579086304e-01 2.3820339702069759e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2147 -1.2917599640786648e-02</internalNodes>\n          <leafValues>\n            2.7040511369705200e-01 -4.6904701739549637e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2148 7.9802395775914192e-03</internalNodes>\n          <leafValues>\n            5.5390980094671249e-02 -2.0667399466037750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2149 6.6025177948176861e-03</internalNodes>\n          <leafValues>\n            6.6448308527469635e-02 -1.9922210276126862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2150 1.7824679613113403e-02</internalNodes>\n          <leafValues>\n            -1.4532490074634552e-01 8.9904323220252991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2151 -2.3261539638042450e-02</internalNodes>\n          <leafValues>\n            4.8062869906425476e-01 -2.7084289118647575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2152 -5.3659449331462383e-03</internalNodes>\n          <leafValues>\n            -1.9143599271774292e-01 7.0398069918155670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2153 -2.0775340497493744e-02</internalNodes>\n          <leafValues>\n            1.6774240136146545e-01 -8.9455418288707733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2154 6.2107890844345093e-02</internalNodes>\n          <leafValues>\n            1.2815490365028381e-02 -6.4452892541885376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2155 -4.4327871873974800e-03</internalNodes>\n          <leafValues>\n            1.3405950367450714e-01 -1.0231850296258926e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>210</maxWeakCount>\n      <stageThreshold>-1.4604519605636597e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2156 -4.6693067997694016e-03</internalNodes>\n          <leafValues>\n            1.4297600090503693e-01 -3.5293748974800110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2157 -5.8510829694569111e-04</internalNodes>\n          <leafValues>\n            -2.2447289526462555e-01 7.3556646704673767e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2158 -3.4788011107593775e-03</internalNodes>\n          <leafValues>\n            1.0603249818086624e-01 -2.5625610351562500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2159 6.2952568987384439e-04</internalNodes>\n          <leafValues>\n            4.1076458990573883e-02 -3.6061421036720276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2160 2.1010650380048901e-04</internalNodes>\n          <leafValues>\n            -2.4425220489501953e-01 1.0942090302705765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2161 -2.6671579107642174e-03</internalNodes>\n          <leafValues>\n            8.4581501781940460e-02 -2.7449008822441101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2162 7.1533219888806343e-03</internalNodes>\n          <leafValues>\n            -1.2603819370269775e-01 2.0079800486564636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2163 -2.3616119287908077e-03</internalNodes>\n          <leafValues>\n            1.6627199947834015e-01 -1.3186289370059967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2164 3.9599660784006119e-02</internalNodes>\n          <leafValues>\n            5.5119238793849945e-02 -3.4003400802612305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2165 1.9385309424251318e-03</internalNodes>\n          <leafValues>\n            -2.0686650276184082e-01 1.0400419682264328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2166 4.3686539866030216e-03</internalNodes>\n          <leafValues>\n            6.4766593277454376e-02 -2.7426311373710632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2167 -3.9834968629293144e-04</internalNodes>\n          <leafValues>\n            5.2820999175310135e-02 -2.2684779763221741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2168 -5.2277399227023125e-03</internalNodes>\n          <leafValues>\n            -2.5515750050544739e-01 7.6405368745326996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2169 -1.0445619933307171e-02</internalNodes>\n          <leafValues>\n            1.3513970375061035e-01 -5.0032071769237518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2170 -2.0478919614106417e-03</internalNodes>\n          <leafValues>\n            -2.7669870853424072e-01 5.4732039570808411e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2171 9.1795288026332855e-03</internalNodes>\n          <leafValues>\n            -1.2642470002174377e-01 1.9979229569435120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2172 9.4128772616386414e-04</internalNodes>\n          <leafValues>\n            -4.0286481380462646e-01 3.8918491452932358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2173 -4.0410319343209267e-03</internalNodes>\n          <leafValues>\n            -2.0108319818973541e-01 5.1456429064273834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2174 -1.2742569670081139e-02</internalNodes>\n          <leafValues>\n            2.2716869413852692e-01 -6.8204790353775024e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2175 -4.6246009878814220e-03</internalNodes>\n          <leafValues>\n            -2.5854289531707764e-01 7.8878343105316162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2176 -6.4845927990972996e-03</internalNodes>\n          <leafValues>\n            -3.1391140818595886e-01 7.1605153381824493e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2177 -4.8291690647602081e-02</internalNodes>\n          <leafValues>\n            2.5488480925559998e-01 -2.1891580894589424e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2178 8.4315962158143520e-04</internalNodes>\n          <leafValues>\n            -1.6529269516468048e-01 8.9575611054897308e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2179 -1.0773389786481857e-01</internalNodes>\n          <leafValues>\n            -6.0115939378738403e-01 3.3779250225052238e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2180 -4.5969419181346893e-02</internalNodes>\n          <leafValues>\n            3.6489740014076233e-01 -3.9942290633916855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2181 -1.6649639233946800e-02</internalNodes>\n          <leafValues>\n            -1.1858119815587997e-01 1.0585139691829681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2182 -1.4521550387144089e-02</internalNodes>\n          <leafValues>\n            -3.7954211235046387e-01 3.4867148846387863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2183 1.3591590104624629e-03</internalNodes>\n          <leafValues>\n            -2.3180609941482544e-01 5.0401471555233002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2184 -5.8343587443232536e-04</internalNodes>\n          <leafValues>\n            -2.8496581315994263e-01 4.0894281119108200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2185 7.9833306372165680e-03</internalNodes>\n          <leafValues>\n            -3.6992359906435013e-02 1.6985300183296204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2186 9.9762203171849251e-04</internalNodes>\n          <leafValues>\n            6.4871042966842651e-02 -1.8648339807987213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2187 -4.6869087964296341e-03</internalNodes>\n          <leafValues>\n            7.6987423002719879e-02 -8.1482626497745514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2188 3.0047740787267685e-02</internalNodes>\n          <leafValues>\n            -2.9839929193258286e-02 4.3676841259002686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2189 1.8069539219141006e-02</internalNodes>\n          <leafValues>\n            2.7509700506925583e-02 -4.2724269628524780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2190 -1.5088430047035217e-01</internalNodes>\n          <leafValues>\n            -6.7918521165847778e-01 1.8012860789895058e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2191 -2.5836290791630745e-02</internalNodes>\n          <leafValues>\n            2.5797989964485168e-01 -3.5906858742237091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2192 1.8183529376983643e-02</internalNodes>\n          <leafValues>\n            3.5895019769668579e-02 -3.7197691202163696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2193 6.3127309083938599e-02</internalNodes>\n          <leafValues>\n            -7.3392972350120544e-02 1.2563429772853851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2194 -6.6507689189165831e-04</internalNodes>\n          <leafValues>\n            8.5442617535591125e-02 -1.5228550136089325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2195 1.0104980319738388e-02</internalNodes>\n          <leafValues>\n            3.4569118171930313e-02 -2.2657699882984161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2196 -1.2355949729681015e-02</internalNodes>\n          <leafValues>\n            1.5785010159015656e-01 -7.4710778892040253e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2197 1.5728179365396500e-02</internalNodes>\n          <leafValues>\n            6.8844422698020935e-02 -1.6961769759654999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2198 1.5084549886523746e-05</internalNodes>\n          <leafValues>\n            -1.3695539534091949e-01 9.0837597846984863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2199 2.9634479433298111e-02</internalNodes>\n          <leafValues>\n            4.9822349101305008e-02 -2.6809689402580261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2200 2.8015200048685074e-02</internalNodes>\n          <leafValues>\n            -8.1799760460853577e-02 1.7842799425125122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2201 2.3299450986087322e-03</internalNodes>\n          <leafValues>\n            6.9535210728645325e-02 -1.8205040693283081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2202 1.3453120365738869e-02</internalNodes>\n          <leafValues>\n            -7.0231497287750244e-02 1.8492579460144043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2203 1.4049040153622627e-02</internalNodes>\n          <leafValues>\n            7.6328299939632416e-02 -1.7219689488410950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2204 -1.4648989774286747e-02</internalNodes>\n          <leafValues>\n            3.4281060099601746e-01 -4.3134819716215134e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2205 1.4879769878461957e-04</internalNodes>\n          <leafValues>\n            -2.7614209055900574e-01 7.3140732944011688e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2206 -6.8892319686710835e-03</internalNodes>\n          <leafValues>\n            -1.8386749923229218e-01 6.5872021019458771e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2207 1.2898260029032826e-03</internalNodes>\n          <leafValues>\n            -1.1688020080327988e-01 1.1173330247402191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2208 -2.5763860321603715e-04</internalNodes>\n          <leafValues>\n            8.9391976594924927e-02 -1.4183540642261505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2209 1.3652349822223186e-02</internalNodes>\n          <leafValues>\n            2.5085829198360443e-02 -1.7959770560264587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2210 -5.7484027929604053e-03</internalNodes>\n          <leafValues>\n            1.6128179430961609e-01 -7.9023167490959167e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2211 -1.1682719923555851e-02</internalNodes>\n          <leafValues>\n            -1.8493950366973877e-01 4.5419961214065552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2212 2.7498970739543438e-03</internalNodes>\n          <leafValues>\n            -6.5800942480564117e-02 1.9426700472831726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2213 -1.1797569459304214e-03</internalNodes>\n          <leafValues>\n            5.3563870489597321e-02 -5.5225171148777008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2214 -3.7005849182605743e-02</internalNodes>\n          <leafValues>\n            -5.1369887590408325e-01 2.4779239669442177e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2215 2.3432020097970963e-02</internalNodes>\n          <leafValues>\n            1.4517559669911861e-02 -3.2621389627456665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2216 -2.4803660809993744e-02</internalNodes>\n          <leafValues>\n            4.1374489665031433e-01 -3.1516589224338531e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2217 -9.1133005917072296e-03</internalNodes>\n          <leafValues>\n            -2.3262369632720947e-01 6.5307170152664185e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2218 -7.2223007678985596e-02</internalNodes>\n          <leafValues>\n            3.1365010142326355e-01 -4.0287811309099197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2219 6.4163007773458958e-03</internalNodes>\n          <leafValues>\n            4.4151920825242996e-02 -1.4439010620117188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2220 5.4361939430236816e-02</internalNodes>\n          <leafValues>\n            -4.9821659922599792e-02 2.6239651441574097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2221 -5.9238062240183353e-03</internalNodes>\n          <leafValues>\n            7.4054516851902008e-02 -7.2215773165225983e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2222 -3.4175089094787836e-03</internalNodes>\n          <leafValues>\n            -3.0714958906173706e-01 3.9461899548768997e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2223 1.1367879807949066e-02</internalNodes>\n          <leafValues>\n            -4.8698928207159042e-02 1.0077890008687973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2224 2.3361030034720898e-03</internalNodes>\n          <leafValues>\n            4.9539480358362198e-02 -2.3815050721168518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2225 -7.2044372791424394e-04</internalNodes>\n          <leafValues>\n            9.6084482967853546e-02 -9.8123528063297272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2226 -3.4777939436025918e-04</internalNodes>\n          <leafValues>\n            1.0546120256185532e-01 -1.0600890219211578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2227 -6.6456091590225697e-03</internalNodes>\n          <leafValues>\n            -1.7471200227737427e-01 4.7264128923416138e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2228 4.4261440634727478e-02</internalNodes>\n          <leafValues>\n            -4.0742669254541397e-02 2.8637731075286865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2229 3.4959740936756134e-02</internalNodes>\n          <leafValues>\n            1.3479149900376797e-02 -4.4233149290084839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2230 -2.5971820577979088e-02</internalNodes>\n          <leafValues>\n            -4.6334660053253174e-01 2.5301979854702950e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2231 1.8818200333043933e-03</internalNodes>\n          <leafValues>\n            -7.2344467043876648e-02 1.5579940378665924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2232 3.2623678445816040e-02</internalNodes>\n          <leafValues>\n            1.8171060830354691e-02 -6.3472539186477661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2233 1.5041300095617771e-02</internalNodes>\n          <leafValues>\n            -5.3582038730382919e-02 1.8320439755916595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2234 -5.5875489488244057e-03</internalNodes>\n          <leafValues>\n            1.5442819893360138e-01 -6.9521442055702209e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2235 3.9029030594974756e-03</internalNodes>\n          <leafValues>\n            7.2893843054771423e-02 -1.3542290031909943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2236 4.5964889228343964e-02</internalNodes>\n          <leafValues>\n            2.1482560783624649e-02 -5.4532879590988159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2237 -7.4338473379611969e-02</internalNodes>\n          <leafValues>\n            -7.1795612573623657e-01 3.5341270267963409e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2238 2.0902850665152073e-03</internalNodes>\n          <leafValues>\n            4.3308760970830917e-02 -2.5078159570693970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2239 -7.5608417391777039e-02</internalNodes>\n          <leafValues>\n            2.7488818764686584e-01 -3.4967329353094101e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2240 5.1200888119637966e-03</internalNodes>\n          <leafValues>\n            4.7384329140186310e-02 -2.6794269680976868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2241 -2.0140670239925385e-02</internalNodes>\n          <leafValues>\n            7.2039432823657990e-02 -4.4537059962749481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2242 2.6719279587268829e-02</internalNodes>\n          <leafValues>\n            -6.0671631246805191e-02 2.4019980430603027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2243 -2.3299809545278549e-03</internalNodes>\n          <leafValues>\n            -1.4848700165748596e-01 6.3779368996620178e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2244 1.4248250052332878e-02</internalNodes>\n          <leafValues>\n            3.9471931755542755e-02 -2.7790299057960510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2245 -6.8691447377204895e-02</internalNodes>\n          <leafValues>\n            3.1307551264762878e-01 -2.2111769765615463e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2246 -6.5213128924369812e-02</internalNodes>\n          <leafValues>\n            3.6191588640213013e-01 -3.1089780852198601e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2247 -1.4469860121607780e-02</internalNodes>\n          <leafValues>\n            -1.9942939281463623e-01 2.6489760726690292e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2248 -9.4575136899948120e-03</internalNodes>\n          <leafValues>\n            -2.9698899388313293e-01 3.6693658679723740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2249 -1.8222700059413910e-01</internalNodes>\n          <leafValues>\n            -4.0887731313705444e-01 7.3904348537325859e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2250 -2.3991869390010834e-01</internalNodes>\n          <leafValues>\n            -9.5519691705703735e-01 1.0895749554038048e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2251 -1.4964600093662739e-02</internalNodes>\n          <leafValues>\n            1.3325509428977966e-01 -6.4146116375923157e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2252 1.1056339740753174e-01</internalNodes>\n          <leafValues>\n            -2.1147079765796661e-02 5.2262008190155029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2253 -1.1857460252940655e-02</internalNodes>\n          <leafValues>\n            -2.6103261113166809e-01 2.4917129427194595e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2254 1.7032399773597717e-02</internalNodes>\n          <leafValues>\n            -4.2655009776353836e-02 2.4324589967727661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2255 -6.6315201111137867e-03</internalNodes>\n          <leafValues>\n            -2.7996608614921570e-01 4.7972209751605988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2256 -1.3527619885280728e-03</internalNodes>\n          <leafValues>\n            -1.7117640376091003e-01 6.8423986434936523e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2257 5.8159399777650833e-02</internalNodes>\n          <leafValues>\n            1.4452300034463406e-02 -3.6640700697898865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2258 9.6522513777017593e-03</internalNodes>\n          <leafValues>\n            6.4102686941623688e-02 -1.9386090338230133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2259 4.6681659296154976e-03</internalNodes>\n          <leafValues>\n            -6.4305387437343597e-02 1.2191460281610489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2260 4.8228199593722820e-03</internalNodes>\n          <leafValues>\n            4.2306859046220779e-02 -2.5486230850219727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2261 7.2615491226315498e-03</internalNodes>\n          <leafValues>\n            -4.4169031083583832e-02 1.9888080656528473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2262 2.7650638949126005e-03</internalNodes>\n          <leafValues>\n            5.6748721748590469e-02 -1.8802900612354279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2263 -1.2599739711731672e-03</internalNodes>\n          <leafValues>\n            2.9681721329689026e-01 -3.0795339494943619e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2264 -1.4079749584197998e-02</internalNodes>\n          <leafValues>\n            1.2790699303150177e-01 -7.7078782021999359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2265 4.1978028602898121e-03</internalNodes>\n          <leafValues>\n            -3.2651171088218689e-02 4.4282011687755585e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2266 7.4891891563311219e-04</internalNodes>\n          <leafValues>\n            -1.1801239848136902e-01 1.0196279734373093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2267 3.9699498564004898e-02</internalNodes>\n          <leafValues>\n            1.6263889148831367e-02 -3.2391819357872009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2268 2.9685199260711670e-03</internalNodes>\n          <leafValues>\n            5.0729360431432724e-02 -2.2522340714931488e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2269 3.0207540839910507e-03</internalNodes>\n          <leafValues>\n            -6.4312063157558441e-02 6.3618481159210205e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2270 -1.0064570233225822e-03</internalNodes>\n          <leafValues>\n            -2.2469790279865265e-01 4.3256420642137527e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2271 1.6607339493930340e-03</internalNodes>\n          <leafValues>\n            -5.8126531541347504e-02 5.9540931135416031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2272 4.9640638753771782e-03</internalNodes>\n          <leafValues>\n            -4.8804368823766708e-02 1.8437810242176056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2273 1.7194069921970367e-01</internalNodes>\n          <leafValues>\n            3.6377978976815939e-03 -1.0000029802322388e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2274 -2.0992290228605270e-03</internalNodes>\n          <leafValues>\n            1.1951360106468201e-01 -8.8613957166671753e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2275 -4.0529989637434483e-03</internalNodes>\n          <leafValues>\n            -2.0199899375438690e-01 5.3564589470624924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2276 1.5536800492554903e-03</internalNodes>\n          <leafValues>\n            -9.6797212958335876e-02 9.5135137438774109e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2277 2.2837040014564991e-03</internalNodes>\n          <leafValues>\n            -4.5535419136285782e-02 1.4682759344577789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2278 -1.0094629600644112e-02</internalNodes>\n          <leafValues>\n            -1.8853099644184113e-01 4.8864368349313736e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2279 -7.0200799964368343e-03</internalNodes>\n          <leafValues>\n            1.4628750085830688e-01 -4.2158648371696472e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2280 3.4074939321726561e-03</internalNodes>\n          <leafValues>\n            -7.7149718999862671e-02 1.3702009618282318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2281 3.9907437749207020e-03</internalNodes>\n          <leafValues>\n            -6.4178831875324249e-02 8.5484616458415985e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2282 2.0611559972167015e-02</internalNodes>\n          <leafValues>\n            3.7988938391208649e-02 -2.9359170794487000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2283 -1.9768020138144493e-03</internalNodes>\n          <leafValues>\n            6.0499001294374466e-02 -1.6910280287265778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2284 -2.4783300235867500e-02</internalNodes>\n          <leafValues>\n            -5.5052608251571655e-01 1.5831759199500084e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2285 -1.5710920095443726e-02</internalNodes>\n          <leafValues>\n            1.9716830551624298e-01 -3.1884010881185532e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2286 1.0070169810205698e-03</internalNodes>\n          <leafValues>\n            4.6532750129699707e-02 -2.1853099763393402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2287 -3.7466569337993860e-03</internalNodes>\n          <leafValues>\n            -2.5379389524459839e-01 3.9463929831981659e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2288 4.5849520713090897e-02</internalNodes>\n          <leafValues>\n            1.3636340387165546e-02 -6.2976127862930298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2289 -1.1040110141038895e-02</internalNodes>\n          <leafValues>\n            2.4939639866352081e-01 -3.8895469158887863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2290 -4.2415689677000046e-03</internalNodes>\n          <leafValues>\n            -2.1564769744873047e-01 4.5613430440425873e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2291 -3.1175611075013876e-03</internalNodes>\n          <leafValues>\n            1.0641460120677948e-01 -1.2268310040235519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2292 -2.3725910577923059e-03</internalNodes>\n          <leafValues>\n            2.0573639869689941e-01 -6.6338561475276947e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2293 -3.6906299646943808e-03</internalNodes>\n          <leafValues>\n            -1.5802620351314545e-01 6.6760621964931488e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2294 1.0908120311796665e-03</internalNodes>\n          <leafValues>\n            -1.7830020189285278e-01 5.7181321084499359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2295 -1.3929420150816441e-02</internalNodes>\n          <leafValues>\n            -1.4185859262943268e-01 5.8131370693445206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2296 -2.8283370658755302e-02</internalNodes>\n          <leafValues>\n            2.6451000571250916e-01 -4.5332599431276321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2297 -3.9213709533214569e-04</internalNodes>\n          <leafValues>\n            7.6039716601371765e-02 -8.4666326642036438e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2298 -2.0424809772521257e-03</internalNodes>\n          <leafValues>\n            -1.6393850743770599e-01 5.7595171034336090e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2299 -6.0634050518274307e-02</internalNodes>\n          <leafValues>\n            2.4343550205230713e-01 -1.3630810193717480e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2300 5.5472988635301590e-02</internalNodes>\n          <leafValues>\n            1.2274630367755890e-02 -7.6161897182464600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2301 2.6451710611581802e-02</internalNodes>\n          <leafValues>\n            -1.6103159636259079e-02 1.4696520566940308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2302 -6.5615847706794739e-02</internalNodes>\n          <leafValues>\n            -6.6936880350112915e-01 1.2788389809429646e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2303 -2.9287360608577728e-02</internalNodes>\n          <leafValues>\n            3.8422039151191711e-01 -2.0979570224881172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2304 -8.7814256548881531e-02</internalNodes>\n          <leafValues>\n            -5.5386292934417725e-01 1.6540929675102234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2305 4.0213011205196381e-02</internalNodes>\n          <leafValues>\n            5.5229798890650272e-03 -1.5169410407543182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2306 7.5501110404729843e-03</internalNodes>\n          <leafValues>\n            -5.3081061691045761e-02 1.6791249811649323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2307 7.5557199306786060e-03</internalNodes>\n          <leafValues>\n            4.9213249236345291e-02 -1.8097420036792755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2308 4.2264759540557861e-02</internalNodes>\n          <leafValues>\n            9.8954448476433754e-03 -8.7265938520431519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2309 -1.5821179375052452e-02</internalNodes>\n          <leafValues>\n            -4.9515271186828613e-01 1.0424910113215446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2310 4.4557699002325535e-03</internalNodes>\n          <leafValues>\n            -5.2823610603809357e-02 1.7409110069274902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2311 -6.3567152246832848e-03</internalNodes>\n          <leafValues>\n            1.0278800129890442e-01 -9.4062283635139465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2312 2.1308339200913906e-03</internalNodes>\n          <leafValues>\n            -5.7343449443578720e-02 1.5747800469398499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2313 6.4157308079302311e-03</internalNodes>\n          <leafValues>\n            4.1112188249826431e-02 -2.6482531428337097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2314 -1.0572739690542221e-01</internalNodes>\n          <leafValues>\n            -9.2719399929046631e-01 8.6396038532257080e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2315 6.1298489570617676e-02</internalNodes>\n          <leafValues>\n            1.1242480017244816e-02 -5.2976250648498535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2316 1.0018650442361832e-02</internalNodes>\n          <leafValues>\n            -6.1801191419363022e-02 1.5441860258579254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2317 2.3613891098648310e-03</internalNodes>\n          <leafValues>\n            -3.9282340556383133e-02 8.8061779737472534e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2318 -4.7975129564292729e-04</internalNodes>\n          <leafValues>\n            -1.0663200169801712e-01 8.3887517452239990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2319 7.3982410132884979e-02</internalNodes>\n          <leafValues>\n            4.7058681957423687e-03 -6.0129082202911377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2320 6.3821911811828613e-02</internalNodes>\n          <leafValues>\n            1.1372390203177929e-02 -7.4044847488403320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2321 4.6818208647891879e-04</internalNodes>\n          <leafValues>\n            -7.6545506715774536e-02 5.3563810884952545e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2322 4.3877989053726196e-01</internalNodes>\n          <leafValues>\n            1.2420959770679474e-02 -6.8776041269302368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2323 2.8831470757722855e-02</internalNodes>\n          <leafValues>\n            1.5150110237300396e-02 -1.3229629397392273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2324 6.7726813256740570e-02</internalNodes>\n          <leafValues>\n            -1.8901329487562180e-02 4.8799818754196167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2325 9.5125466585159302e-02</internalNodes>\n          <leafValues>\n            1.2518660165369511e-02 -7.4607741832733154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2326 3.4629011061042547e-03</internalNodes>\n          <leafValues>\n            -6.4396522939205170e-02 1.3450330495834351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2327 -1.0220340453088284e-02</internalNodes>\n          <leafValues>\n            -1.2102399766445160e-01 3.5081598907709122e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2328 -2.5227791070938110e-01</internalNodes>\n          <leafValues>\n            5.3186398744583130e-01 -1.7373610287904739e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2329 4.7006108798086643e-03</internalNodes>\n          <leafValues>\n            2.6264479383826256e-02 -1.6305670142173767e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2330 8.0487072467803955e-02</internalNodes>\n          <leafValues>\n            -1.1193430051207542e-02 7.3598998785018921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2331 -3.8025099784135818e-03</internalNodes>\n          <leafValues>\n            -1.1756920069456100e-01 6.4899243414402008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2332 -5.1970399916172028e-02</internalNodes>\n          <leafValues>\n            2.1764869987964630e-01 -4.6299580484628677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2333 -1.2381119653582573e-02</internalNodes>\n          <leafValues>\n            -1.3483320176601410e-01 7.0956252515316010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2334 4.6567008830606937e-03</internalNodes>\n          <leafValues>\n            8.4818847477436066e-02 -1.0850810259580612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2335 2.4520549923181534e-02</internalNodes>\n          <leafValues>\n            -5.6512400507926941e-02 2.0845490694046021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2336 -6.0728159733116627e-03</internalNodes>\n          <leafValues>\n            1.0253319889307022e-01 -1.0739710181951523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2337 1.3803950278088450e-03</internalNodes>\n          <leafValues>\n            -1.2355019897222519e-01 3.8523931056261063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2338 8.3129312843084335e-03</internalNodes>\n          <leafValues>\n            5.0441969186067581e-02 -1.7901860177516937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2339 6.8436772562563419e-04</internalNodes>\n          <leafValues>\n            -6.1334688216447830e-02 4.9543838948011398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2340 7.1589440107345581e-02</internalNodes>\n          <leafValues>\n            1.1258729733526707e-02 -7.2902548313140869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2341 -3.9251110865734518e-04</internalNodes>\n          <leafValues>\n            -2.9022648930549622e-01 1.3908719643950462e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2342 -1.6948020085692406e-02</internalNodes>\n          <leafValues>\n            1.4616020023822784e-01 -5.6298948824405670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2343 2.3180670104920864e-03</internalNodes>\n          <leafValues>\n            2.0289139449596405e-01 -4.3649390339851379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2344 7.9764174297451973e-03</internalNodes>\n          <leafValues>\n            -4.8768021166324615e-02 1.8070909380912781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2345 -1.1533150449395180e-02</internalNodes>\n          <leafValues>\n            -1.4238800108432770e-01 5.6691840291023254e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2346 -5.4723728680983186e-04</internalNodes>\n          <leafValues>\n            -2.3844610154628754e-01 3.2061301171779633e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2347 -1.1751300189644098e-03</internalNodes>\n          <leafValues>\n            2.5394979864358902e-02 -8.9872613549232483e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2348 1.3655239716172218e-02</internalNodes>\n          <leafValues>\n            -2.7230219915509224e-02 3.3419778943061829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2349 4.1803810745477676e-03</internalNodes>\n          <leafValues>\n            2.6914540678262711e-02 -1.2557040154933929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2350 3.1565671088173985e-04</internalNodes>\n          <leafValues>\n            6.2177520245313644e-02 -1.3345809280872345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2351 7.4048307724297047e-03</internalNodes>\n          <leafValues>\n            3.1548298895359039e-02 -2.8247129917144775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2352 -1.3977429829537868e-02</internalNodes>\n          <leafValues>\n            1.2342610210180283e-01 -8.0493018031120300e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2353 -1.4240520074963570e-02</internalNodes>\n          <leafValues>\n            -2.3979499936103821e-01 1.8016669899225235e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2354 -2.2901569306850433e-01</internalNodes>\n          <leafValues>\n            -4.2895668745040894e-01 2.0032370463013649e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2355 2.6522560045123100e-02</internalNodes>\n          <leafValues>\n            -2.9899509623646736e-02 3.1195539236068726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2356 5.0723659805953503e-03</internalNodes>\n          <leafValues>\n            6.2117800116539001e-02 -1.5442310273647308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2357 2.2340700961649418e-03</internalNodes>\n          <leafValues>\n            3.0717259272933006e-02 -1.4656220376491547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2358 -4.6348381787538528e-02</internalNodes>\n          <leafValues>\n            -6.7844080924987793e-01 1.2258620001375675e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2359 -3.0467000324279070e-03</internalNodes>\n          <leafValues>\n            1.0547509789466858e-01 -5.4426789283752441e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2360 7.0065702311694622e-03</internalNodes>\n          <leafValues>\n            -5.2537959069013596e-02 2.4259300529956818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2361 -2.7783720288425684e-03</internalNodes>\n          <leafValues>\n            -1.0732100158929825e-01 7.4064619839191437e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2362 -4.2294961167499423e-04</internalNodes>\n          <leafValues>\n            6.8151466548442841e-02 -1.4117160439491272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2363 -8.7614007294178009e-02</internalNodes>\n          <leafValues>\n            -6.5271192789077759e-01 3.3460480626672506e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2364 1.2552930042147636e-02</internalNodes>\n          <leafValues>\n            3.3235169947147369e-02 -2.6571980118751526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2365 -2.1863510832190514e-02</internalNodes>\n          <leafValues>\n            1.5599909424781799e-01 -3.7561919540166855e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>189</maxWeakCount>\n      <stageThreshold>-1.6477719545364380e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2366 1.9715659320354462e-02</internalNodes>\n          <leafValues>\n            -4.0786159038543701e-01 1.6317300498485565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2367 4.9977540969848633e-02</internalNodes>\n          <leafValues>\n            -2.5753161311149597e-01 2.3471170663833618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2368 3.4774339292198420e-04</internalNodes>\n          <leafValues>\n            -2.7148011326789856e-01 1.5202049911022186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2369 8.2787703722715378e-03</internalNodes>\n          <leafValues>\n            8.6229562759399414e-02 -4.2272651195526123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2370 1.2891810387372971e-02</internalNodes>\n          <leafValues>\n            -2.7589491009712219e-01 9.9677331745624542e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2371 -5.2444688044488430e-03</internalNodes>\n          <leafValues>\n            1.4687310159206390e-01 -1.8090559542179108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2372 4.7363140038214624e-04</internalNodes>\n          <leafValues>\n            1.1544570326805115e-01 -2.3242090642452240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2373 1.0767930187284946e-02</internalNodes>\n          <leafValues>\n            -2.3256160318851471e-01 5.7885929942131042e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2374 -2.0576089154928923e-03</internalNodes>\n          <leafValues>\n            -4.0554818511009216e-01 6.1086129397153854e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2375 1.2648279964923859e-01</internalNodes>\n          <leafValues>\n            2.5926080998033285e-03 -6.0955828428268433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2376 2.2029090672731400e-02</internalNodes>\n          <leafValues>\n            -2.3835970461368561e-01 1.1523839831352234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2377 8.6279091192409396e-04</internalNodes>\n          <leafValues>\n            -2.4382559955120087e-01 4.8174999654293060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2378 6.1232252046465874e-03</internalNodes>\n          <leafValues>\n            -3.3293130993843079e-01 7.3860548436641693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2379 1.8321570241823792e-03</internalNodes>\n          <leafValues>\n            7.4964806437492371e-02 -3.6050680279731750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2380 1.3176959939301014e-02</internalNodes>\n          <leafValues>\n            7.8650407493114471e-02 -3.0009350180625916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2381 -1.5092800371348858e-02</internalNodes>\n          <leafValues>\n            -4.5663359761238098e-01 4.5359719544649124e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2382 -3.9765550754964352e-03</internalNodes>\n          <leafValues>\n            -3.7404119968414307e-01 5.7276591658592224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2383 -1.2558099813759327e-02</internalNodes>\n          <leafValues>\n            1.8079389631748199e-01 -9.0798392891883850e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2384 1.1346530169248581e-02</internalNodes>\n          <leafValues>\n            6.7842416465282440e-02 -3.3354648947715759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2385 3.0938379932194948e-03</internalNodes>\n          <leafValues>\n            -6.4362257719039917e-02 1.6250990331172943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2386 -7.9837916418910027e-03</internalNodes>\n          <leafValues>\n            -2.8237259387969971e-01 6.4243227243423462e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2387 5.3257539868354797e-02</internalNodes>\n          <leafValues>\n            -1.1842279881238937e-01 1.5403720736503601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2388 -3.2308440655469894e-02</internalNodes>\n          <leafValues>\n            -3.8174659013748169e-01 4.6444781124591827e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2389 7.4837519787251949e-03</internalNodes>\n          <leafValues>\n            1.0087630152702332e-01 -1.7848369479179382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2390 1.4075540006160736e-02</internalNodes>\n          <leafValues>\n            -1.3612699508666992e-01 1.2589199841022491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2391 1.1945860460400581e-02</internalNodes>\n          <leafValues>\n            -4.6452131122350693e-02 3.1823348999023438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2392 4.9774140119552612e-02</internalNodes>\n          <leafValues>\n            3.7373390048742294e-02 -4.3919241428375244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2393 1.1070669861510396e-03</internalNodes>\n          <leafValues>\n            3.3163610845804214e-02 -1.8855419754981995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2394 -2.8594989329576492e-02</internalNodes>\n          <leafValues>\n            -3.6906918883323669e-01 4.1930228471755981e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2395 -7.6013091020286083e-03</internalNodes>\n          <leafValues>\n            5.2191480994224548e-02 -2.4689050018787384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2396 1.3114510476589203e-01</internalNodes>\n          <leafValues>\n            -5.7957381010055542e-02 2.7318599820137024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2397 -7.4186350502714049e-06</internalNodes>\n          <leafValues>\n            1.1802060157060623e-01 -1.0745350271463394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2398 3.1472120434045792e-02</internalNodes>\n          <leafValues>\n            -7.1733877062797546e-02 2.5617578625679016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2399 3.8700491189956665e-02</internalNodes>\n          <leafValues>\n            4.2863689363002777e-02 -6.0855817794799805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2400 -3.9322520606219769e-03</internalNodes>\n          <leafValues>\n            -2.2127309441566467e-01 6.5617948770523071e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2401 2.3144779726862907e-02</internalNodes>\n          <leafValues>\n            -6.8200387060642242e-02 1.6107009351253510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2402 4.4043041765689850e-02</internalNodes>\n          <leafValues>\n            -5.4092731326818466e-02 2.7009010314941406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2403 1.6363389790058136e-02</internalNodes>\n          <leafValues>\n            -6.7165039479732513e-02 1.4292019605636597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2404 4.0575690567493439e-02</internalNodes>\n          <leafValues>\n            2.7095599099993706e-02 -5.1922810077667236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2405 -8.1591978669166565e-02</internalNodes>\n          <leafValues>\n            3.6290401220321655e-01 -5.0641149282455444e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2406 9.6564572304487228e-03</internalNodes>\n          <leafValues>\n            -6.5868496894836426e-02 2.0459869503974915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2407 4.3875370174646378e-02</internalNodes>\n          <leafValues>\n            2.8287120163440704e-02 -4.7316759824752808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2408 -5.3375590592622757e-02</internalNodes>\n          <leafValues>\n            -6.3912391662597656e-01 1.9213579595088959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2409 -4.2789369821548462e-02</internalNodes>\n          <leafValues>\n            3.7414470314979553e-01 -3.6020539700984955e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2410 -1.4193350449204445e-02</internalNodes>\n          <leafValues>\n            -3.0562171339988708e-01 5.1724649965763092e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2411 -5.2947051823139191e-02</internalNodes>\n          <leafValues>\n            2.2203849256038666e-01 -2.7123190462589264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2412 3.0441719293594360e-01</internalNodes>\n          <leafValues>\n            2.8107000514864922e-02 -5.1486051082611084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2413 9.6917577087879181e-02</internalNodes>\n          <leafValues>\n            7.5603500008583069e-03 -5.4642218351364136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2414 4.5469900942407548e-04</internalNodes>\n          <leafValues>\n            -2.2257779538631439e-01 5.9663061052560806e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2415 6.4785419963300228e-03</internalNodes>\n          <leafValues>\n            7.0507273077964783e-02 -8.6525917053222656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2416 9.5442440360784531e-03</internalNodes>\n          <leafValues>\n            1.1858390271663666e-01 -1.2846529483795166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2417 1.0664040222764015e-02</internalNodes>\n          <leafValues>\n            6.0251180082559586e-02 -2.3454129695892334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2418 -5.9601400047540665e-02</internalNodes>\n          <leafValues>\n            -4.9083110690116882e-01 3.1179970130324364e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2419 -1.4810609631240368e-02</internalNodes>\n          <leafValues>\n            1.7928470671176910e-01 -5.3788300603628159e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2420 2.4988459423184395e-02</internalNodes>\n          <leafValues>\n            4.5585051178932190e-02 -3.1542968750000000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2421 3.7159871309995651e-02</internalNodes>\n          <leafValues>\n            -2.5552989915013313e-02 1.2824480235576630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2422 -3.6023799329996109e-02</internalNodes>\n          <leafValues>\n            3.0338558554649353e-01 -5.0723869353532791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2423 -4.0073681622743607e-02</internalNodes>\n          <leafValues>\n            -3.5327419638633728e-01 2.5542749091982841e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2424 1.0118799656629562e-01</internalNodes>\n          <leafValues>\n            1.4954050071537495e-02 -8.5275518894195557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2425 1.2551939487457275e-01</internalNodes>\n          <leafValues>\n            -5.5777598172426224e-02 3.5162329673767090e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2426 -1.0094200260937214e-02</internalNodes>\n          <leafValues>\n            -7.9517722129821777e-01 1.6658289358019829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2427 2.7957880869507790e-02</internalNodes>\n          <leafValues>\n            3.0823230743408203e-02 -2.9073038697242737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2428 3.6360241472721100e-02</internalNodes>\n          <leafValues>\n            2.7960959821939468e-02 -4.7691631317138672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2429 -9.9100463092327118e-02</internalNodes>\n          <leafValues>\n            -3.0804800987243652e-01 4.2725458741188049e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2430 -5.8572040870785713e-04</internalNodes>\n          <leafValues>\n            5.9227660298347473e-02 -2.3531119525432587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2431 -5.1202569156885147e-02</internalNodes>\n          <leafValues>\n            -5.2199620008468628e-01 1.4952239580452442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2432 -6.7564798519015312e-03</internalNodes>\n          <leafValues>\n            1.4085020124912262e-01 -9.0452179312705994e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2433 -4.8959780484437943e-02</internalNodes>\n          <leafValues>\n            -6.6878128051757812e-01 2.0590359345078468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2434 1.4971289783716202e-04</internalNodes>\n          <leafValues>\n            -1.8641050159931183e-01 6.5254852175712585e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2435 -3.4409679472446442e-02</internalNodes>\n          <leafValues>\n            -6.5235960483551025e-01 1.4693650417029858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2436 6.4725689589977264e-02</internalNodes>\n          <leafValues>\n            1.2329719960689545e-02 -8.4077721834182739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2437 1.7888710135594010e-03</internalNodes>\n          <leafValues>\n            -3.3088308572769165e-01 2.3944050073623657e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2438 7.4999839067459106e-02</internalNodes>\n          <leafValues>\n            2.6347629725933075e-02 -4.4841340184211731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2439 -1.3695800304412842e-01</internalNodes>\n          <leafValues>\n            -5.7192331552505493e-01 1.2316530337557197e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2440 8.7679617106914520e-02</internalNodes>\n          <leafValues>\n            9.1852411627769470e-02 -1.4714670181274414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2441 -1.4691170305013657e-02</internalNodes>\n          <leafValues>\n            -2.7389299869537354e-01 5.5910948663949966e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2442 1.8059760332107544e-01</internalNodes>\n          <leafValues>\n            1.8475739285349846e-02 -6.2247991561889648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2443 -6.9349152036011219e-03</internalNodes>\n          <leafValues>\n            -1.6723890602588654e-01 4.2348120361566544e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2444 -4.5395728200674057e-02</internalNodes>\n          <leafValues>\n            5.6401878595352173e-01 -2.0763039588928223e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2445 -3.7714779376983643e-02</internalNodes>\n          <leafValues>\n            -4.9726399779319763e-01 1.3457749970257282e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2446 -6.6780918277800083e-03</internalNodes>\n          <leafValues>\n            1.5654189884662628e-01 -7.9254247248172760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2447 -3.5693418234586716e-02</internalNodes>\n          <leafValues>\n            3.2214561104774475e-01 -2.7933960780501366e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2448 2.0231369417160749e-03</internalNodes>\n          <leafValues>\n            -2.0472900569438934e-01 6.0136921703815460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2449 7.7706989832222462e-03</internalNodes>\n          <leafValues>\n            -6.2275718897581100e-02 1.3619600236415863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2450 -2.3846060037612915e-02</internalNodes>\n          <leafValues>\n            -6.4280962944030762e-01 1.9216870889067650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2451 3.8112789392471313e-02</internalNodes>\n          <leafValues>\n            1.6926249489188194e-02 -3.2001879811286926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2452 -8.1509854644536972e-03</internalNodes>\n          <leafValues>\n            -1.8527400493621826e-01 6.7431643605232239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2453 3.0041670799255371e-01</internalNodes>\n          <leafValues>\n            -3.4997869282960892e-02 3.7719568610191345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2454 3.2188769546337426e-04</internalNodes>\n          <leafValues>\n            -4.3860068917274475e-01 3.1008180230855942e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2455 9.9805131554603577e-02</internalNodes>\n          <leafValues>\n            2.1043010056018829e-02 -2.4182139337062836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2456 -1.3132029771804810e-01</internalNodes>\n          <leafValues>\n            -6.0744529962539673e-01 1.9127229228615761e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2457 -4.4457878917455673e-02</internalNodes>\n          <leafValues>\n            -2.8207719326019287e-01 1.6199590638279915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2458 -5.3282459266483784e-03</internalNodes>\n          <leafValues>\n            1.9118839502334595e-01 -6.4483523368835449e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2459 4.0367528796195984e-02</internalNodes>\n          <leafValues>\n            1.6362620517611504e-02 -5.5463272333145142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2460 -8.7769925594329834e-03</internalNodes>\n          <leafValues>\n            -3.8903188705444336e-01 3.1277969479560852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2461 -1.5031780116260052e-02</internalNodes>\n          <leafValues>\n            4.4966968894004822e-01 -1.8708650022745132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2462 -3.2085120677947998e-02</internalNodes>\n          <leafValues>\n            2.2872669994831085e-01 -5.2647799253463745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2463 1.7735429573804140e-03</internalNodes>\n          <leafValues>\n            1.0644569993019104e-01 -1.1970230191946030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2464 5.9195980429649353e-02</internalNodes>\n          <leafValues>\n            -6.4485557377338409e-02 1.8440729379653931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2465 1.1976130306720734e-02</internalNodes>\n          <leafValues>\n            -4.6655338257551193e-02 2.2750610113143921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2466 -7.3619361501187086e-04</internalNodes>\n          <leafValues>\n            6.4427956938743591e-02 -1.9669359922409058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2467 1.1274980008602142e-01</internalNodes>\n          <leafValues>\n            -3.2603729516267776e-02 2.6165801286697388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2468 -2.9639130458235741e-02</internalNodes>\n          <leafValues>\n            -2.4286089837551117e-01 5.2550770342350006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2469 -4.8972599208354950e-02</internalNodes>\n          <leafValues>\n            2.9013419151306152e-01 -3.9936609566211700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2470 -2.0732060074806213e-03</internalNodes>\n          <leafValues>\n            6.6728956997394562e-02 -1.8385919928550720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2471 1.8652489781379700e-01</internalNodes>\n          <leafValues>\n            2.5788070634007454e-02 -3.0477121472358704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2472 -6.4846210181713104e-02</internalNodes>\n          <leafValues>\n            5.8964151144027710e-01 -2.1531870588660240e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2473 5.9668030589818954e-02</internalNodes>\n          <leafValues>\n            9.0434495359659195e-03 -8.9928478002548218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2474 -2.2810790687799454e-02</internalNodes>\n          <leafValues>\n            -5.5689752101898193e-01 2.1036420017480850e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2475 -4.3924558907747269e-02</internalNodes>\n          <leafValues>\n            -7.7569800615310669e-01 1.3244120404124260e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2476 -8.1411283463239670e-03</internalNodes>\n          <leafValues>\n            -1.6145749390125275e-01 6.3869751989841461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2477 -1.7681140452623367e-02</internalNodes>\n          <leafValues>\n            -1.7088229954242706e-01 4.4323820620775223e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2478 3.5615780949592590e-01</internalNodes>\n          <leafValues>\n            1.3911530375480652e-02 -8.2366949319839478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2479 8.9791387319564819e-02</internalNodes>\n          <leafValues>\n            -3.3068671822547913e-02 3.9501950144767761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2480 -5.1039960235357285e-02</internalNodes>\n          <leafValues>\n            -4.9687319993972778e-01 2.4911910295486450e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2481 4.4502970576286316e-01</internalNodes>\n          <leafValues>\n            1.3085749931633472e-02 -7.1374338865280151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2482 -3.1571299768984318e-03</internalNodes>\n          <leafValues>\n            -2.3235230147838593e-01 4.5422729104757309e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2483 2.2295509278774261e-01</internalNodes>\n          <leafValues>\n            2.5272920727729797e-02 -4.5817920565605164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2484 8.1787049770355225e-02</internalNodes>\n          <leafValues>\n            -5.6966669857501984e-02 2.0633119344711304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2485 1.2290639802813530e-02</internalNodes>\n          <leafValues>\n            1.0433530062437057e-01 -1.4129990339279175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2486 3.2738980371505022e-03</internalNodes>\n          <leafValues>\n            -1.9929160177707672e-01 5.7900499552488327e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2487 3.1915940344333649e-03</internalNodes>\n          <leafValues>\n            -2.8649568557739258e-01 3.8445938378572464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2488 -6.9429136812686920e-02</internalNodes>\n          <leafValues>\n            3.9995300769805908e-01 -2.9228420928120613e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2489 3.0896291136741638e-01</internalNodes>\n          <leafValues>\n            4.5684990473091602e-03 -9.7593581676483154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2490 6.0547169297933578e-02</internalNodes>\n          <leafValues>\n            -1.7227350175380707e-01 7.3367759585380554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2491 8.0296747386455536e-02</internalNodes>\n          <leafValues>\n            1.2790890410542488e-02 -2.9636448621749878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2492 9.8309047520160675e-02</internalNodes>\n          <leafValues>\n            1.7421530559659004e-02 -7.3428112268447876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2493 -6.0651078820228577e-02</internalNodes>\n          <leafValues>\n            -8.9268088340759277e-01 9.2950398102402687e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2494 -1.1067830026149750e-02</internalNodes>\n          <leafValues>\n            3.6940470337867737e-01 -3.2281860709190369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2495 -1.7252689227461815e-02</internalNodes>\n          <leafValues>\n            2.0163689553737640e-01 -3.0649609863758087e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2496 1.1417149752378464e-01</internalNodes>\n          <leafValues>\n            -7.2567440569400787e-02 1.4580799639225006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2497 -1.1878489749506116e-04</internalNodes>\n          <leafValues>\n            6.6703669726848602e-02 -1.2044110149145126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2498 4.2538821697235107e-02</internalNodes>\n          <leafValues>\n            1.4235669374465942e-01 -9.3128196895122528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2499 4.6220790594816208e-02</internalNodes>\n          <leafValues>\n            -4.5348118990659714e-02 2.6667690277099609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2500 -1.2598860263824463e-01</internalNodes>\n          <leafValues>\n            -6.2195998430252075e-01 1.9361790269613266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2501 1.4336410164833069e-01</internalNodes>\n          <leafValues>\n            1.5602460131049156e-02 -3.4269729256629944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2502 1.4853400178253651e-02</internalNodes>\n          <leafValues>\n            -1.9399890303611755e-01 5.9365049004554749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2503 2.9607299715280533e-02</internalNodes>\n          <leafValues>\n            2.9370859265327454e-02 -1.1840560287237167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2504 4.5151200145483017e-02</internalNodes>\n          <leafValues>\n            -3.1025370582938194e-02 4.2335650324821472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2505 1.7347050830721855e-02</internalNodes>\n          <leafValues>\n            5.2468661218881607e-02 -1.7071889340877533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2506 4.8696789890527725e-02</internalNodes>\n          <leafValues>\n            1.3757590204477310e-02 -7.3853892087936401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2507 -2.5120940059423447e-02</internalNodes>\n          <leafValues>\n            -2.6077219843864441e-01 3.6249000579118729e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2508 -1.4412039890885353e-02</internalNodes>\n          <leafValues>\n            1.8435400724411011e-01 -5.5376049131155014e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2509 1.6011130064725876e-02</internalNodes>\n          <leafValues>\n            -3.3822190016508102e-02 9.8490990698337555e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2510 -6.3778877258300781e-02</internalNodes>\n          <leafValues>\n            3.9596658945083618e-01 -2.6605289429426193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2511 -1.2431790120899677e-02</internalNodes>\n          <leafValues>\n            -2.7103281021118164e-01 5.1153909415006638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2512 1.5430289506912231e-01</internalNodes>\n          <leafValues>\n            -2.9742069542407990e-02 3.6223879456520081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2513 6.8953618407249451e-02</internalNodes>\n          <leafValues>\n            1.4560540206730366e-02 -7.1308761835098267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2514 2.6809390634298325e-02</internalNodes>\n          <leafValues>\n            3.0903020873665810e-02 -3.1453761458396912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2515 -5.4339639842510223e-02</internalNodes>\n          <leafValues>\n            -5.7081592082977295e-01 6.3606691546738148e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2516 -7.4291341006755829e-03</internalNodes>\n          <leafValues>\n            -2.1167820692062378e-01 5.4728411138057709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2517 1.5004719607532024e-02</internalNodes>\n          <leafValues>\n            -1.3576979935169220e-01 3.6672618240118027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2518 2.3438859730958939e-02</internalNodes>\n          <leafValues>\n            -6.2095177173614502e-01 1.7451370134949684e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2519 2.1869429945945740e-01</internalNodes>\n          <leafValues>\n            -2.5175819173455238e-02 2.4256730079650879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2520 7.2554901242256165e-02</internalNodes>\n          <leafValues>\n            3.0378310009837151e-02 -3.5316839814186096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2521 -6.0775190591812134e-02</internalNodes>\n          <leafValues>\n            6.1231142282485962e-01 -2.9397750273346901e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2522 1.0405359789729118e-02</internalNodes>\n          <leafValues>\n            -4.8925351351499557e-02 2.0042200386524200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2523 -4.4559161178767681e-03</internalNodes>\n          <leafValues>\n            -1.8175999820232391e-01 5.1460109651088715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2524 5.3141661919653416e-03</internalNodes>\n          <leafValues>\n            1.0836429893970490e-01 -1.1464370042085648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2525 2.8129909187555313e-02</internalNodes>\n          <leafValues>\n            4.8452459275722504e-02 -1.0588149726390839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2526 -1.0029030032455921e-02</internalNodes>\n          <leafValues>\n            -2.8854200243949890e-01 4.6509381383657455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2527 4.1623760014772415e-02</internalNodes>\n          <leafValues>\n            -5.2424181252717972e-02 2.4638059735298157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2528 1.7407029867172241e-02</internalNodes>\n          <leafValues>\n            -5.9511799365282059e-02 2.2489009797573090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2529 -9.1012917459011078e-02</internalNodes>\n          <leafValues>\n            3.8434851169586182e-01 -2.6776079088449478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2530 -5.5964559316635132e-02</internalNodes>\n          <leafValues>\n            3.3512559533119202e-01 -3.7086669355630875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2531 -2.3191609978675842e-01</internalNodes>\n          <leafValues>\n            -7.9937142133712769e-01 1.6157710924744606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2532 1.5095779672265053e-02</internalNodes>\n          <leafValues>\n            1.9562739878892899e-02 -4.7588780522346497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2533 -6.3537202775478363e-02</internalNodes>\n          <leafValues>\n            5.5103862285614014e-01 -9.9191991612315178e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2534 5.0780471414327621e-02</internalNodes>\n          <leafValues>\n            -5.0766121596097946e-02 1.9856730103492737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2535 3.3435709774494171e-02</internalNodes>\n          <leafValues>\n            1.7100030556321144e-02 -3.9106050133705139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2536 2.7236310765147209e-02</internalNodes>\n          <leafValues>\n            1.9491130486130714e-02 -4.9955821037292480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2537 3.6144461482763290e-02</internalNodes>\n          <leafValues>\n            1.9712809473276138e-02 -4.7714808583259583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2538 -3.7110898643732071e-02</internalNodes>\n          <leafValues>\n            -7.1080970764160156e-01 1.3297240249812603e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2539 -1.6986919799819589e-03</internalNodes>\n          <leafValues>\n            -1.1454039812088013e-01 5.3833190351724625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2540 7.0956937270238996e-04</internalNodes>\n          <leafValues>\n            -1.1852429807186127e-01 8.6146153509616852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2541 -3.9854459464550018e-02</internalNodes>\n          <leafValues>\n            -2.1784169971942902e-01 7.9314615577459335e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2542 -2.6265300810337067e-02</internalNodes>\n          <leafValues>\n            5.1828277111053467e-01 -1.9502539187669754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2543 1.5767179429531097e-03</internalNodes>\n          <leafValues>\n            -9.0025149285793304e-02 4.3614149093627930e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2544 8.4500849246978760e-02</internalNodes>\n          <leafValues>\n            1.9108800217509270e-02 -5.8049428462982178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2545 5.8061029762029648e-02</internalNodes>\n          <leafValues>\n            5.1128780469298363e-03 -3.6629718542098999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2546 -8.6446420755237341e-04</internalNodes>\n          <leafValues>\n            9.8551221191883087e-02 -9.9286876618862152e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2547 -1.6358779743313789e-02</internalNodes>\n          <leafValues>\n            -2.2353939712047577e-01 4.5100010931491852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2548 1.2069500051438808e-02</internalNodes>\n          <leafValues>\n            -3.0885580927133560e-02 3.5933670401573181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2549 6.4932592213153839e-02</internalNodes>\n          <leafValues>\n            8.9946594089269638e-03 -6.5505272150039673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2550 -1.6384720802307129e-02</internalNodes>\n          <leafValues>\n            1.8374380469322205e-01 -5.8319728821516037e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2551 3.6467831581830978e-02</internalNodes>\n          <leafValues>\n            3.3053800463676453e-02 -3.1176608800888062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2552 -4.8026088625192642e-03</internalNodes>\n          <leafValues>\n            -1.3096930086612701e-01 8.8815420866012573e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2553 -9.7134411334991455e-03</internalNodes>\n          <leafValues>\n            1.2485890090465546e-01 -4.5851919800043106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2554 -3.6871319753117859e-04</internalNodes>\n          <leafValues>\n            1.0798580199480057e-01 -1.0795330256223679e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>248</maxWeakCount>\n      <stageThreshold>-1.3472950458526611e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2555 4.8573319800198078e-03</internalNodes>\n          <leafValues>\n            -2.2165919840335846e-01 2.0661990344524384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2556 -9.0601091505959630e-04</internalNodes>\n          <leafValues>\n            9.2684216797351837e-02 -3.4692689776420593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2557 3.8109601009637117e-03</internalNodes>\n          <leafValues>\n            -4.7693979740142822e-01 7.2208866477012634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2558 -1.9349349895492196e-03</internalNodes>\n          <leafValues>\n            -2.3474289476871490e-01 1.0308369994163513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2559 4.6932199038565159e-03</internalNodes>\n          <leafValues>\n            -2.1755599975585938e-01 1.0297770053148270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2560 -4.5681721530854702e-03</internalNodes>\n          <leafValues>\n            -3.2979539036750793e-01 6.2108699232339859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2561 2.0976159721612930e-03</internalNodes>\n          <leafValues>\n            -2.7585551142692566e-01 7.4447788298130035e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2562 -2.3434460163116455e-02</internalNodes>\n          <leafValues>\n            -2.4517090618610382e-01 2.0888300612568855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2563 -7.5489659793674946e-03</internalNodes>\n          <leafValues>\n            -2.3539499938488007e-01 8.0594792962074280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2564 -1.3637889642268419e-03</internalNodes>\n          <leafValues>\n            1.2462289631366730e-01 -1.4383980631828308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2565 2.0881770178675652e-02</internalNodes>\n          <leafValues>\n            -2.5486978888511658e-01 7.0480130612850189e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2566 -1.6712560318410397e-03</internalNodes>\n          <leafValues>\n            -1.4747080206871033e-01 9.3597747385501862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2567 -5.8552708476781845e-02</internalNodes>\n          <leafValues>\n            3.7929660081863403e-01 -3.7892241030931473e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2568 -4.7591641545295715e-02</internalNodes>\n          <leafValues>\n            3.4769389033317566e-01 -2.9484409838914871e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2569 5.7788072153925896e-03</internalNodes>\n          <leafValues>\n            4.1627179831266403e-02 -3.8012310862541199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2570 6.1923051252961159e-03</internalNodes>\n          <leafValues>\n            -7.9854242503643036e-02 1.4662300050258636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2571 8.6211357265710831e-03</internalNodes>\n          <leafValues>\n            -7.9052597284317017e-02 1.9707180559635162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2572 3.8787689805030823e-01</internalNodes>\n          <leafValues>\n            9.9500510841608047e-03 -5.4955279827117920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2573 1.2184830009937286e-01</internalNodes>\n          <leafValues>\n            2.1560879424214363e-02 -7.1182191371917725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2574 5.6779510341584682e-03</internalNodes>\n          <leafValues>\n            5.0778731703758240e-02 -1.9817540049552917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2575 -3.2407268881797791e-02</internalNodes>\n          <leafValues>\n            -6.5776360034942627e-01 1.8930230289697647e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2576 2.3834649473428726e-03</internalNodes>\n          <leafValues>\n            3.5910621285438538e-02 -1.9386079907417297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2577 4.4861159403808415e-04</internalNodes>\n          <leafValues>\n            6.3049189746379852e-02 -2.3067280650138855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2578 2.8381360694766045e-02</internalNodes>\n          <leafValues>\n            1.3798769563436508e-02 -2.0287990570068359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2579 -2.7084869798272848e-03</internalNodes>\n          <leafValues>\n            -1.6455270349979401e-01 8.1182733178138733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2580 -1.3218579813838005e-02</internalNodes>\n          <leafValues>\n            1.2929069995880127e-01 -4.9410581588745117e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2581 1.8623949727043509e-03</internalNodes>\n          <leafValues>\n            -2.7398198843002319e-01 4.5746099203824997e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2582 -6.6727721132338047e-03</internalNodes>\n          <leafValues>\n            -1.5167540311813354e-01 5.5587619543075562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2583 1.9492399878799915e-03</internalNodes>\n          <leafValues>\n            -8.5547126829624176e-02 1.3712610304355621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2584 -7.0978812873363495e-02</internalNodes>\n          <leafValues>\n            -7.7429318428039551e-01 5.5506629869341850e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2585 5.7003321126103401e-03</internalNodes>\n          <leafValues>\n            6.0299661010503769e-02 -2.3000110685825348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2586 6.6310778260231018e-02</internalNodes>\n          <leafValues>\n            -8.5690699517726898e-02 1.5169920027256012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2587 -8.5291899740695953e-03</internalNodes>\n          <leafValues>\n            1.4297589659690857e-01 -9.1805547475814819e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2588 5.1141469739377499e-03</internalNodes>\n          <leafValues>\n            4.6917989850044250e-02 -1.3319849967956543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2589 1.9523530500009656e-03</internalNodes>\n          <leafValues>\n            -1.4177489280700684e-01 1.0524170100688934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2590 1.9558310508728027e-01</internalNodes>\n          <leafValues>\n            1.4478860422968864e-02 -7.9985427856445312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2591 5.3029200062155724e-03</internalNodes>\n          <leafValues>\n            3.7237700074911118e-02 -2.6131349802017212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2592 6.4814360812306404e-03</internalNodes>\n          <leafValues>\n            -4.9092698842287064e-02 2.5681778788566589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2593 -6.1802868731319904e-03</internalNodes>\n          <leafValues>\n            -2.1317920088768005e-01 6.1390031129121780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2594 1.9895739387720823e-03</internalNodes>\n          <leafValues>\n            -7.1335382759571075e-02 1.3002429902553558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2595 -4.2928531183861196e-04</internalNodes>\n          <leafValues>\n            7.2383478283882141e-02 -1.5643799304962158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2596 -4.5690318802371621e-04</internalNodes>\n          <leafValues>\n            7.5732357800006866e-02 -1.0932859778404236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2597 -1.3333739340305328e-01</internalNodes>\n          <leafValues>\n            -5.4889208078384399e-01 1.9494550302624702e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2598 8.2705507520586252e-04</internalNodes>\n          <leafValues>\n            -1.8739989399909973e-01 5.7498261332511902e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2599 -1.6954699531197548e-03</internalNodes>\n          <leafValues>\n            -1.4100700616836548e-01 8.6548388004302979e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2600 9.8944529891014099e-03</internalNodes>\n          <leafValues>\n            1.7898159101605415e-02 -3.1395688652992249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2601 6.0766572132706642e-03</internalNodes>\n          <leafValues>\n            -1.3120110332965851e-01 9.1578528285026550e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2602 -3.5680279135704041e-02</internalNodes>\n          <leafValues>\n            -3.8880988955497742e-01 1.1377809569239616e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2603 8.7540567619726062e-04</internalNodes>\n          <leafValues>\n            5.3022928535938263e-02 -2.1509949862957001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2604 1.9438719609752297e-03</internalNodes>\n          <leafValues>\n            -8.1035703420639038e-02 1.3382309675216675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2605 5.6398138403892517e-02</internalNodes>\n          <leafValues>\n            1.4857930131256580e-02 -6.9551151990890503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2606 -1.0274930391460657e-03</internalNodes>\n          <leafValues>\n            -1.9196349382400513e-01 4.7596029937267303e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2607 -3.3568819053471088e-03</internalNodes>\n          <leafValues>\n            1.0466050356626511e-01 -1.0170979797840118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2608 1.1734040081501007e-01</internalNodes>\n          <leafValues>\n            -4.6565439552068710e-02 2.0878739655017853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2609 8.8005866855382919e-03</internalNodes>\n          <leafValues>\n            9.1754652559757233e-02 -1.2221500277519226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2610 2.4095149710774422e-03</internalNodes>\n          <leafValues>\n            -3.6752160638570786e-02 2.3443439602851868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2611 -2.8434590785764158e-04</internalNodes>\n          <leafValues>\n            -1.9996729493141174e-01 4.7353159636259079e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2612 1.7623709514737129e-02</internalNodes>\n          <leafValues>\n            -2.2765519097447395e-02 2.5646668672561646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2613 1.4121740125119686e-02</internalNodes>\n          <leafValues>\n            2.2659989073872566e-02 -4.2449080944061279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2614 -1.5290649607777596e-02</internalNodes>\n          <leafValues>\n            2.4445760250091553e-01 -4.3145630508661270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2615 -2.5426879525184631e-02</internalNodes>\n          <leafValues>\n            4.1280931234359741e-01 -2.5002820417284966e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2616 8.7438793852925301e-03</internalNodes>\n          <leafValues>\n            4.1931539773941040e-02 -1.2433040142059326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2617 4.1642960160970688e-02</internalNodes>\n          <leafValues>\n            2.1535869687795639e-02 -4.9062231183052063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2618 7.0692330598831177e-02</internalNodes>\n          <leafValues>\n            -2.4307090789079666e-02 3.3606329560279846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2619 -7.7690348029136658e-02</internalNodes>\n          <leafValues>\n            -7.3883998394012451e-01 1.3576829805970192e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2620 3.7781539140269160e-04</internalNodes>\n          <leafValues>\n            -9.6697732806205750e-02 9.4690509140491486e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2621 -1.1192850070074201e-03</internalNodes>\n          <leafValues>\n            -2.1631820499897003e-01 4.4235199689865112e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2622 5.9772249311208725e-02</internalNodes>\n          <leafValues>\n            -3.2024260610342026e-02 3.0602660775184631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2623 -1.5417120419442654e-02</internalNodes>\n          <leafValues>\n            -3.4087839722633362e-01 2.8097979724407196e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2624 -6.3111339695751667e-03</internalNodes>\n          <leafValues>\n            1.5327680110931396e-01 -4.7901459038257599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2625 -1.8826499581336975e-02</internalNodes>\n          <leafValues>\n            -1.5269599854946136e-01 6.0955628752708435e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2626 -3.9223838597536087e-02</internalNodes>\n          <leafValues>\n            2.6624131202697754e-01 -7.6400930993258953e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2627 -4.8653159290552139e-02</internalNodes>\n          <leafValues>\n            -4.5488500595092773e-01 1.9853049889206886e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2628 6.7260518670082092e-02</internalNodes>\n          <leafValues>\n            1.0999150108546019e-03 -7.5273478031158447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2629 1.2728190049529076e-03</internalNodes>\n          <leafValues>\n            -7.8121297061443329e-02 1.1816550046205521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2630 -9.4147026538848877e-02</internalNodes>\n          <leafValues>\n            -5.2153587341308594e-01 1.4973170123994350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2631 -4.7454461455345154e-02</internalNodes>\n          <leafValues>\n            2.6547148823738098e-01 -3.0587410554289818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2632 -5.6014367146417499e-04</internalNodes>\n          <leafValues>\n            -1.0506449639797211e-01 6.0161281377077103e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2633 -2.9601220740005374e-04</internalNodes>\n          <leafValues>\n            6.2257450073957443e-02 -1.3126540184020996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2634 -2.0918490365147591e-02</internalNodes>\n          <leafValues>\n            -2.0831510424613953e-01 2.6843119412660599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2635 -7.2696260176599026e-03</internalNodes>\n          <leafValues>\n            -1.6227640211582184e-01 6.1937049031257629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2636 7.2555372025817633e-04</internalNodes>\n          <leafValues>\n            -1.0315939784049988e-01 6.8040877580642700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2637 2.0828839391469955e-02</internalNodes>\n          <leafValues>\n            -4.4557690620422363e-02 2.2167469561100006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2638 8.7201192975044250e-02</internalNodes>\n          <leafValues>\n            9.5432223752140999e-03 -5.8706420660018921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2639 4.1596628725528717e-02</internalNodes>\n          <leafValues>\n            -3.0774539336562157e-02 2.8809019923210144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2640 -2.6154879480600357e-02</internalNodes>\n          <leafValues>\n            -5.9353542327880859e-01 1.4388410374522209e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2641 2.7175429463386536e-01</internalNodes>\n          <leafValues>\n            1.3717720285058022e-02 -5.4619067907333374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2642 2.1811699494719505e-02</internalNodes>\n          <leafValues>\n            -1.6798110678792000e-02 2.9062330722808838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2643 -1.9965929910540581e-02</internalNodes>\n          <leafValues>\n            -4.3052119016647339e-01 1.8917759880423546e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2644 -1.1561929713934660e-03</internalNodes>\n          <leafValues>\n            8.8031537830829620e-02 -1.9590209424495697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2645 -1.6627550357952714e-03</internalNodes>\n          <leafValues>\n            8.9111559092998505e-02 -9.0959653258323669e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2646 -1.7325150547549129e-03</internalNodes>\n          <leafValues>\n            -1.1540830135345459e-01 5.3636670112609863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2647 -3.9231408387422562e-02</internalNodes>\n          <leafValues>\n            6.2471270561218262e-01 -1.3666920363903046e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2648 1.0423580184578896e-02</internalNodes>\n          <leafValues>\n            2.4711130186915398e-02 -1.6751749813556671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2649 2.2725639864802361e-03</internalNodes>\n          <leafValues>\n            -5.5126778781414032e-02 1.4781460165977478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2650 -3.9644641801714897e-03</internalNodes>\n          <leafValues>\n            1.1337990313768387e-01 -6.8672053515911102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2651 4.0544760413467884e-03</internalNodes>\n          <leafValues>\n            4.0180210024118423e-02 -2.3837350308895111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2652 2.0538640674203634e-03</internalNodes>\n          <leafValues>\n            3.2863691449165344e-02 -1.2495829910039902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2653 2.9705381020903587e-03</internalNodes>\n          <leafValues>\n            4.1810061782598495e-02 -2.0539659261703491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2654 -8.3381328731775284e-03</internalNodes>\n          <leafValues>\n            9.2258736491203308e-02 -3.8435179740190506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2655 1.5640279743820429e-03</internalNodes>\n          <leafValues>\n            -9.6661567687988281e-02 8.5594817996025085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2656 -3.7052970379590988e-02</internalNodes>\n          <leafValues>\n            -7.7915471792221069e-01 1.0418290272355080e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2657 -1.0109930299222469e-02</internalNodes>\n          <leafValues>\n            1.2499059736728668e-01 -6.4437836408615112e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2658 -7.9335980117321014e-02</internalNodes>\n          <leafValues>\n            7.0784372091293335e-01 -3.1601081136614084e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2659 -2.5811919476836920e-03</internalNodes>\n          <leafValues>\n            -1.6802759468555450e-01 6.7257612943649292e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2660 1.8863540142774582e-02</internalNodes>\n          <leafValues>\n            -5.2749298512935638e-02 1.4578150212764740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2661 6.1697891214862466e-04</internalNodes>\n          <leafValues>\n            -9.6527166664600372e-02 9.3077242374420166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2662 -9.9242655560374260e-03</internalNodes>\n          <leafValues>\n            1.2164440006017685e-01 -2.6439830660820007e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2663 -4.7382008284330368e-02</internalNodes>\n          <leafValues>\n            -3.7194240093231201e-01 2.4884449318051338e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2664 3.8585590664297342e-03</internalNodes>\n          <leafValues>\n            -4.2420830577611923e-02 1.1997900158166885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2665 2.3721279576420784e-03</internalNodes>\n          <leafValues>\n            -7.2769053280353546e-02 1.3027629256248474e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2666 -3.1968571245670319e-02</internalNodes>\n          <leafValues>\n            -4.7088149189949036e-01 1.8863039091229439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2667 -7.2849751450121403e-04</internalNodes>\n          <leafValues>\n            2.8128319978713989e-01 -3.0785139650106430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2668 -1.2096880003809929e-02</internalNodes>\n          <leafValues>\n            -7.0163071155548096e-01 1.3336709700524807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2669 -1.7658369615674019e-02</internalNodes>\n          <leafValues>\n            1.9193160533905029e-01 -4.7951001673936844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2670 -1.0974059812724590e-02</internalNodes>\n          <leafValues>\n            -2.7307328581809998e-01 2.8784489259123802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2671 -1.8560180440545082e-02</internalNodes>\n          <leafValues>\n            -4.4306761026382446e-01 2.0472019910812378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2672 1.3861100189387798e-02</internalNodes>\n          <leafValues>\n            -3.7471339106559753e-02 1.0929849743843079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2673 5.6243170052766800e-02</internalNodes>\n          <leafValues>\n            1.3322129845619202e-02 -6.1972159147262573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2674 -1.3746799901127815e-02</internalNodes>\n          <leafValues>\n            1.8980909883975983e-01 -4.3810151517391205e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2675 -2.0494889758992940e-04</internalNodes>\n          <leafValues>\n            -1.4809520542621613e-01 5.9458550065755844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2676 1.1416030116379261e-02</internalNodes>\n          <leafValues>\n            4.5111801475286484e-02 -1.7277219891548157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2677 4.1169788688421249e-02</internalNodes>\n          <leafValues>\n            -2.3442840203642845e-02 3.3413231372833252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2678 -9.6223354339599609e-03</internalNodes>\n          <leafValues>\n            -1.6086310148239136e-01 3.3183149993419647e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2679 1.5951909590512514e-03</internalNodes>\n          <leafValues>\n            -6.3590511679649353e-02 1.3396669924259186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2680 -6.3169049099087715e-03</internalNodes>\n          <leafValues>\n            -1.6365319490432739e-01 5.1552049815654755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2681 4.6467378735542297e-02</internalNodes>\n          <leafValues>\n            -2.5627709925174713e-02 3.8097569346427917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2682 9.1598592698574066e-02</internalNodes>\n          <leafValues>\n            4.2748241685330868e-03 -5.9740132093429565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2683 -1.0416290024295449e-03</internalNodes>\n          <leafValues>\n            -1.4733889698982239e-01 5.5105950683355331e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2684 -2.3334469646215439e-02</internalNodes>\n          <leafValues>\n            9.2266462743282318e-02 -5.3653880953788757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2685 -6.3067381270229816e-03</internalNodes>\n          <leafValues>\n            -1.6974699497222900e-01 6.0046479105949402e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2686 5.2549671381711960e-03</internalNodes>\n          <leafValues>\n            -8.8989406824111938e-02 4.7306548804044724e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2687 -1.0699460282921791e-02</internalNodes>\n          <leafValues>\n            -1.5823520720005035e-01 5.1100831478834152e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2688 -5.4387808777391911e-03</internalNodes>\n          <leafValues>\n            1.2524560093879700e-01 -3.9472699165344238e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2689 3.4613600000739098e-03</internalNodes>\n          <leafValues>\n            -6.8892680108547211e-02 1.7920389771461487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2690 -1.7894359305500984e-02</internalNodes>\n          <leafValues>\n            -9.4599656760692596e-02 6.2322728335857391e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2691 -2.1147909760475159e-01</internalNodes>\n          <leafValues>\n            -8.6275768280029297e-01 9.4653964042663574e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2692 1.4149859780445695e-03</internalNodes>\n          <leafValues>\n            -8.6214788258075714e-02 4.0635921061038971e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2693 -1.5357299707829952e-03</internalNodes>\n          <leafValues>\n            9.9525436758995056e-02 -7.7558159828186035e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2694 2.8714749496430159e-03</internalNodes>\n          <leafValues>\n            -6.3778772950172424e-02 1.1251030117273331e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2695 1.8400069326162338e-02</internalNodes>\n          <leafValues>\n            2.3700669407844543e-02 -3.5953688621520996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2696 -7.3078006505966187e-02</internalNodes>\n          <leafValues>\n            -8.3836638927459717e-01 2.1687510889023542e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2697 9.8323542624711990e-03</internalNodes>\n          <leafValues>\n            -5.3899969905614853e-02 1.6186970472335815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2698 2.2987959906458855e-02</internalNodes>\n          <leafValues>\n            1.5955159440636635e-02 -3.3074310421943665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2699 -5.4363980889320374e-03</internalNodes>\n          <leafValues>\n            -1.3372650742530823e-01 5.8162450790405273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2700 1.0177739895880222e-02</internalNodes>\n          <leafValues>\n            -5.7901948690414429e-02 4.0789060294628143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2701 -5.1690369844436646e-02</internalNodes>\n          <leafValues>\n            4.7881290316581726e-01 -2.0051179453730583e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2702 -4.6395331621170044e-02</internalNodes>\n          <leafValues>\n            3.5422900319099426e-01 -1.6692889854311943e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2703 4.0920148603618145e-04</internalNodes>\n          <leafValues>\n            -5.8872789144515991e-02 1.3617689907550812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2704 3.0743801034986973e-03</internalNodes>\n          <leafValues>\n            3.1892731785774231e-02 -2.9396781325340271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2705 1.3438959419727325e-01</internalNodes>\n          <leafValues>\n            1.5018840320408344e-02 -5.1557308435440063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2706 -4.4954590499401093e-02</internalNodes>\n          <leafValues>\n            -6.5404319763183594e-01 5.8901738375425339e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2707 -4.1479051113128662e-02</internalNodes>\n          <leafValues>\n            -5.6925541162490845e-01 1.3012220151722431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2708 2.9117099940776825e-02</internalNodes>\n          <leafValues>\n            -1.9148029386997223e-02 1.8318380415439606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2709 5.1073249429464340e-02</internalNodes>\n          <leafValues>\n            1.5260309912264347e-02 -4.9480628967285156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2710 7.0886377943679690e-04</internalNodes>\n          <leafValues>\n            8.7698653340339661e-02 -7.3333673179149628e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2711 1.1835389770567417e-02</internalNodes>\n          <leafValues>\n            -3.9189878851175308e-02 2.0834849774837494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2712 -4.2260489426553249e-03</internalNodes>\n          <leafValues>\n            -1.8733769655227661e-01 7.4666850268840790e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2713 3.4847799688577652e-02</internalNodes>\n          <leafValues>\n            -3.0572960153222084e-02 2.6511108875274658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2714 1.2932980433106422e-02</internalNodes>\n          <leafValues>\n            2.2224349901080132e-02 -2.3204100131988525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2715 -3.4806900657713413e-03</internalNodes>\n          <leafValues>\n            6.0548238456249237e-02 -1.3034850358963013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2716 1.7225079238414764e-02</internalNodes>\n          <leafValues>\n            -6.7219920456409454e-03 1.1128149926662445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2717 -2.4316289927810431e-03</internalNodes>\n          <leafValues>\n            -1.8720659613609314e-01 4.1284140199422836e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2718 -1.1786689981818199e-02</internalNodes>\n          <leafValues>\n            1.5917420387268066e-01 -3.0763400718569756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2719 -5.3132520988583565e-03</internalNodes>\n          <leafValues>\n            -1.3786070048809052e-01 5.4246630519628525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2720 -2.0012039691209793e-02</internalNodes>\n          <leafValues>\n            2.9359638690948486e-01 -2.6866350322961807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2721 2.0955558866262436e-03</internalNodes>\n          <leafValues>\n            6.7963063716888428e-02 -1.2520860135555267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2722 -3.9648640900850296e-02</internalNodes>\n          <leafValues>\n            -5.8195388317108154e-01 1.3146690092980862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2723 -3.4485850483179092e-02</internalNodes>\n          <leafValues>\n            4.5559158921241760e-01 -1.8659429624676704e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2724 -4.4569540768861771e-02</internalNodes>\n          <leafValues>\n            -9.2067569494247437e-01 5.3931041620671749e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2725 -1.1394550092518330e-03</internalNodes>\n          <leafValues>\n            -2.1932439506053925e-01 3.6249380558729172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2726 -3.7044081836938858e-02</internalNodes>\n          <leafValues>\n            1.6192549467086792e-01 -4.7661919146776199e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2727 1.9300490617752075e-02</internalNodes>\n          <leafValues>\n            -5.4432831704616547e-02 1.4432109892368317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2728 -1.4382150257006288e-03</internalNodes>\n          <leafValues>\n            -6.7343980073928833e-02 4.2511381208896637e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2729 3.8761008530855179e-02</internalNodes>\n          <leafValues>\n            1.4171930029988289e-02 -5.3382647037506104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2730 -1.5265800058841705e-01</internalNodes>\n          <leafValues>\n            -9.1533327102661133e-01 2.1413750946521759e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2731 -8.4089813753962517e-03</internalNodes>\n          <leafValues>\n            1.7705249786376953e-01 -4.3753430247306824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2732 -1.6673170030117035e-01</internalNodes>\n          <leafValues>\n            -5.6390452384948730e-01 7.5904577970504761e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2733 -7.3619261384010315e-03</internalNodes>\n          <leafValues>\n            -1.9691839814186096e-01 3.9698500186204910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2734 -9.9920090287923813e-03</internalNodes>\n          <leafValues>\n            -1.3419510424137115e-01 6.3489198684692383e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2735 -2.2656610235571861e-03</internalNodes>\n          <leafValues>\n            7.9676061868667603e-02 -1.0685960203409195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2736 -1.3868820667266846e-01</internalNodes>\n          <leafValues>\n            -4.7306931018829346e-01 1.5354130417108536e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2737 -1.3284240663051605e-01</internalNodes>\n          <leafValues>\n            -8.7984371185302734e-01 7.0595988072454929e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2738 -2.4882299825549126e-02</internalNodes>\n          <leafValues>\n            1.3333520293235779e-01 -4.0933601558208466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2739 -6.6814320161938667e-03</internalNodes>\n          <leafValues>\n            -1.0295540094375610e-01 7.4870042502880096e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2740 6.0326699167490005e-02</internalNodes>\n          <leafValues>\n            1.3355839997529984e-02 -3.7602999806404114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2741 -8.5582301020622253e-02</internalNodes>\n          <leafValues>\n            2.1200770139694214e-01 -3.8742028176784515e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2742 -1.2076400220394135e-02</internalNodes>\n          <leafValues>\n            -8.2457520067691803e-02 6.7780442535877228e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2743 2.0311089232563972e-02</internalNodes>\n          <leafValues>\n            -1.1817990243434906e-01 6.4830578863620758e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2744 -3.9900741539895535e-03</internalNodes>\n          <leafValues>\n            -1.5723599493503571e-01 5.3033929318189621e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2745 -1.4961370034143329e-03</internalNodes>\n          <leafValues>\n            2.4392129480838776e-01 -3.1170839443802834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2746 1.8568099767435342e-04</internalNodes>\n          <leafValues>\n            -1.9409550726413727e-01 4.5490209013223648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2747 1.4796480536460876e-01</internalNodes>\n          <leafValues>\n            6.2650348991155624e-03 -9.9987298250198364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2748 1.6918669641017914e-01</internalNodes>\n          <leafValues>\n            4.2962608858942986e-04 -3.5496100783348083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2749 -1.9380000594537705e-04</internalNodes>\n          <leafValues>\n            -1.3056799769401550e-01 5.4877169430255890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2750 -6.2729098135605454e-04</internalNodes>\n          <leafValues>\n            4.1053570806980133e-02 -8.3174988627433777e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2751 -2.6877908967435360e-03</internalNodes>\n          <leafValues>\n            1.5513989329338074e-01 -5.5573899298906326e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2752 -7.6885253190994263e-02</internalNodes>\n          <leafValues>\n            -6.1440211534500122e-01 3.2789220567792654e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2753 -1.6956549370661378e-04</internalNodes>\n          <leafValues>\n            6.0934148728847504e-02 -1.4717090129852295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2754 3.7390850484371185e-02</internalNodes>\n          <leafValues>\n            8.8595114648342133e-03 -2.3843410611152649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2755 -3.7611280567944050e-03</internalNodes>\n          <leafValues>\n            -1.1896059662103653e-01 5.4526679217815399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2756 -7.5538672506809235e-02</internalNodes>\n          <leafValues>\n            1. -2.8170819859951735e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2757 5.1163119496777654e-04</internalNodes>\n          <leafValues>\n            -1.1333829909563065e-01 6.8293251097202301e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2758 -5.4373521357774734e-02</internalNodes>\n          <leafValues>\n            5.6772488355636597e-01 -5.5303489789366722e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2759 -1.2200759723782539e-02</internalNodes>\n          <leafValues>\n            2.6310768723487854e-01 -3.5334069281816483e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2760 6.5340757369995117e-02</internalNodes>\n          <leafValues>\n            8.2145677879452705e-03 -9.7914510965347290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2761 -9.7028106451034546e-02</internalNodes>\n          <leafValues>\n            -7.5845307111740112e-01 6.8704010918736458e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2762 -4.9768280237913132e-02</internalNodes>\n          <leafValues>\n            -8.0786317586898804e-01 1.3162019895389676e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2763 -2.9802118660882115e-04</internalNodes>\n          <leafValues>\n            8.5099622607231140e-02 -9.1054826974868774e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2764 1.0124569758772850e-02</internalNodes>\n          <leafValues>\n            -8.9172579348087311e-02 7.7402189373970032e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2765 8.1574246287345886e-03</internalNodes>\n          <leafValues>\n            -6.4016029238700867e-02 1.2462829798460007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2766 -1.2093920260667801e-02</internalNodes>\n          <leafValues>\n            -1.8433560431003571e-01 4.9659188836812973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2767 -1.1906909756362438e-02</internalNodes>\n          <leafValues>\n            2.6277810335159302e-01 -2.9921159148216248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2768 -8.1438422203063965e-02</internalNodes>\n          <leafValues>\n            -6.4389252662658691e-01 1.7232710495591164e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2769 1.4961180277168751e-03</internalNodes>\n          <leafValues>\n            -1.2228660285472870e-01 5.7763870805501938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2770 -2.2651249542832375e-02</internalNodes>\n          <leafValues>\n            -1.1090759932994843e-01 7.0385642349720001e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2771 -2.3789770901203156e-02</internalNodes>\n          <leafValues>\n            2.9644450545310974e-01 -2.5997739285230637e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2772 1.4299990143626928e-03</internalNodes>\n          <leafValues>\n            -8.9716851711273193e-02 5.6030821055173874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2773 -4.1593458503484726e-02</internalNodes>\n          <leafValues>\n            -5.8160471916198730e-01 1.1599930003285408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2774 -2.5586199481040239e-03</internalNodes>\n          <leafValues>\n            6.2241408973932266e-02 -1.1328329890966415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2775 -1.0252290219068527e-01</internalNodes>\n          <leafValues>\n            -8.5185718536376953e-01 8.2774916663765907e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2776 -3.1799520365893841e-03</internalNodes>\n          <leafValues>\n            -1.3918060064315796e-01 5.3719218820333481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2777 -3.9835860952734947e-03</internalNodes>\n          <leafValues>\n            1.5531490743160248e-01 -5.3399000316858292e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2778 1.0895960032939911e-02</internalNodes>\n          <leafValues>\n            3.9084900170564651e-02 -2.1268959343433380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2779 1.7865100875496864e-02</internalNodes>\n          <leafValues>\n            -2.5146210566163063e-02 3.3581560850143433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2780 5.5075511336326599e-03</internalNodes>\n          <leafValues>\n            2.3314310237765312e-02 -9.3666307628154755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2781 2.0092551130801439e-03</internalNodes>\n          <leafValues>\n            5.7231310755014420e-02 -1.4091749489307404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2782 -1.2218699790537357e-02</internalNodes>\n          <leafValues>\n            1.9243550300598145e-01 -2.4631109088659286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2783 1.8039119895547628e-03</internalNodes>\n          <leafValues>\n            5.5793199688196182e-02 -1.2940339744091034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2784 2.2159840911626816e-02</internalNodes>\n          <leafValues>\n            -9.0001197531819344e-03 5.2156221866607666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2785 -3.5827290266752243e-02</internalNodes>\n          <leafValues>\n            -6.2905979156494141e-01 1.1712389998137951e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2786 8.9478418231010437e-03</internalNodes>\n          <leafValues>\n            -3.7455581128597260e-02 1.0906309634447098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2787 -1.2861900031566620e-01</internalNodes>\n          <leafValues>\n            -3.9527180790901184e-01 1.8151529133319855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2788 1.8464029999449849e-03</internalNodes>\n          <leafValues>\n            -3.3952530473470688e-02 9.6596188843250275e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2789 2.8246780857443810e-03</internalNodes>\n          <leafValues>\n            -6.2633261084556580e-02 1.1198879778385162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2790 6.9075852632522583e-02</internalNodes>\n          <leafValues>\n            1.3590560294687748e-02 -5.2598261833190918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2791 -8.0794151872396469e-03</internalNodes>\n          <leafValues>\n            1.3081569969654083e-01 -5.0100728869438171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2792 -3.7193649914115667e-03</internalNodes>\n          <leafValues>\n            -1.4887580275535583e-01 5.1823489367961884e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2793 2.0610638894140720e-03</internalNodes>\n          <leafValues>\n            -6.5545938909053802e-02 1.1345130205154419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2794 -6.0795281082391739e-02</internalNodes>\n          <leafValues>\n            -7.8219258785247803e-01 4.5540397986769676e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2795 -7.3096780106425285e-03</internalNodes>\n          <leafValues>\n            -1.9586810469627380e-01 3.5591870546340942e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2796 -2.3796008899807930e-03</internalNodes>\n          <leafValues>\n            4.3329920619726181e-02 -6.0119420289993286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2797 -3.7874478846788406e-02</internalNodes>\n          <leafValues>\n            1.6700419783592224e-01 -4.1082471609115601e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2798 -1.1011550202965736e-02</internalNodes>\n          <leafValues>\n            -7.9715803265571594e-02 3.2247040420770645e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2799 -1.5278880018740892e-03</internalNodes>\n          <leafValues>\n            9.7541913390159607e-02 -9.4694830477237701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2800 3.7144418805837631e-02</internalNodes>\n          <leafValues>\n            -4.4054100289940834e-03 4.4159731268882751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2801 -4.9948949366807938e-02</internalNodes>\n          <leafValues>\n            -8.0400061607360840e-01 9.0302517637610435e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2802 -1.8558859825134277e-02</internalNodes>\n          <leafValues>\n            1.8556900322437286e-01 -2.6648480445146561e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>208</maxWeakCount>\n      <stageThreshold>-1.5900419950485229e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2803 5.9106469154357910e-02</internalNodes>\n          <leafValues>\n            -1.9395799934864044e-01 2.7272081375122070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2804 2.6784019544720650e-02</internalNodes>\n          <leafValues>\n            -4.2093229293823242e-01 1.2330240011215210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2805 8.6407009512186050e-03</internalNodes>\n          <leafValues>\n            -3.0236870050430298e-01 1.3153509795665741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2806 -1.1792869772762060e-03</internalNodes>\n          <leafValues>\n            8.2713536918163300e-02 -3.5140541195869446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2807 -2.2481461055576801e-03</internalNodes>\n          <leafValues>\n            -5.1323968172073364e-01 5.4614610970020294e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2808 5.7527530007064342e-03</internalNodes>\n          <leafValues>\n            -1.9243009388446808e-01 1.3872030377388000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2809 1.0034020058810711e-02</internalNodes>\n          <leafValues>\n            6.0773681849241257e-02 -3.1631371378898621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2810 -3.2057110220193863e-03</internalNodes>\n          <leafValues>\n            1.3471069931983948e-01 -1.6333019733428955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2811 1.3803630135953426e-02</internalNodes>\n          <leafValues>\n            7.4590288102626801e-02 -2.7751418948173523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2812 -1.9213010370731354e-01</internalNodes>\n          <leafValues>\n            2.6890340447425842e-01 -6.6552907228469849e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2813 -7.0279821753501892e-02</internalNodes>\n          <leafValues>\n            -3.2870158553123474e-01 4.9912039190530777e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2814 3.1519670039415359e-02</internalNodes>\n          <leafValues>\n            3.5865701735019684e-02 -5.0489199161529541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2815 -1.1164420284330845e-02</internalNodes>\n          <leafValues>\n            -2.7422958612442017e-01 7.3949173092842102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2816 6.1416681855916977e-03</internalNodes>\n          <leafValues>\n            -8.7944798171520233e-02 1.5492740273475647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2817 2.5183141231536865e-01</internalNodes>\n          <leafValues>\n            -9.3605853617191315e-02 1.8827579915523529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2818 -1.9524399191141129e-02</internalNodes>\n          <leafValues>\n            -2.8733500838279724e-01 4.9147769808769226e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2819 -2.1689489483833313e-02</internalNodes>\n          <leafValues>\n            -3.3415651321411133e-01 4.8450991511344910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2820 3.4099910408258438e-02</internalNodes>\n          <leafValues>\n            -1.4776800572872162e-01 1.1322359740734100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2821 -2.0377550274133682e-02</internalNodes>\n          <leafValues>\n            -2.9778409004211426e-01 5.6795541197061539e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2822 2.3986540734767914e-02</internalNodes>\n          <leafValues>\n            -5.5139839649200439e-02 3.5672488808631897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2823 -1.4578890055418015e-02</internalNodes>\n          <leafValues>\n            -3.3595868945121765e-01 4.9776330590248108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2824 -5.4530607303604484e-04</internalNodes>\n          <leafValues>\n            1.4906319975852966e-01 -1.2674619257450104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2825 3.0076410621404648e-03</internalNodes>\n          <leafValues>\n            -3.8654258847236633e-01 3.7338510155677795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2826 6.1654142336919904e-04</internalNodes>\n          <leafValues>\n            7.0350617170333862e-02 -2.7769538760185242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2827 5.1461078226566315e-02</internalNodes>\n          <leafValues>\n            2.7613859623670578e-02 -4.9107590317726135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2828 5.5607639253139496e-02</internalNodes>\n          <leafValues>\n            2.7626939117908478e-02 -2.9615479707717896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2829 2.9709029942750931e-02</internalNodes>\n          <leafValues>\n            6.5961636602878571e-02 -2.0508719980716705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2830 3.4046828746795654e-02</internalNodes>\n          <leafValues>\n            -3.8902580738067627e-02 2.4681000411510468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2831 2.4807849898934364e-02</internalNodes>\n          <leafValues>\n            3.5015519708395004e-02 -4.1401639580726624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2832 4.0748160332441330e-02</internalNodes>\n          <leafValues>\n            4.2967729270458221e-02 -3.2043859362602234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2833 1.0664659552276134e-02</internalNodes>\n          <leafValues>\n            5.6952890008687973e-02 -2.4745999276638031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2834 -6.3090369105339050e-02</internalNodes>\n          <leafValues>\n            1.6899240016937256e-01 -1.8692910671234131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2835 3.4371189773082733e-02</internalNodes>\n          <leafValues>\n            -4.7546751797199249e-02 3.2781639695167542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2836 -1.2518119812011719e-01</internalNodes>\n          <leafValues>\n            -5.6282979249954224e-01 1.3721459545195103e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2837 -2.2273709997534752e-02</internalNodes>\n          <leafValues>\n            2.8452938795089722e-01 -4.7334741801023483e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2838 3.1560619827359915e-03</internalNodes>\n          <leafValues>\n            6.7093066871166229e-02 -1.5777610242366791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2839 -8.5235182195901871e-03</internalNodes>\n          <leafValues>\n            -4.5404490828514099e-01 3.0238900333642960e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2840 9.4529008492827415e-03</internalNodes>\n          <leafValues>\n            -5.5023040622472763e-02 1.4025360345840454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2841 -1.5268090181052685e-02</internalNodes>\n          <leafValues>\n            -4.1039389371871948e-01 3.3160910010337830e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2842 1.0665830224752426e-02</internalNodes>\n          <leafValues>\n            -1.1716780066490173e-01 9.5943398773670197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2843 -1.8211569637060165e-02</internalNodes>\n          <leafValues>\n            -2.4850100278854370e-01 6.7713633179664612e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2844 2.9094598721712828e-04</internalNodes>\n          <leafValues>\n            4.9981009215116501e-02 -2.2298039495944977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2845 1.2524049961939454e-03</internalNodes>\n          <leafValues>\n            -2.3567390441894531e-01 6.0058139264583588e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2846 -1.0200130194425583e-01</internalNodes>\n          <leafValues>\n            4.6817669272422791e-01 -1.4046870172023773e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2847 -5.3803320974111557e-02</internalNodes>\n          <leafValues>\n            -3.8875138759613037e-01 3.8533151149749756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2848 3.5919819027185440e-02</internalNodes>\n          <leafValues>\n            1.7687749117612839e-02 -6.3149172067642212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2849 -9.9846003577113152e-03</internalNodes>\n          <leafValues>\n            2.3914399743080139e-01 -5.8490000665187836e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2850 2.2157909348607063e-02</internalNodes>\n          <leafValues>\n            -4.4814221560955048e-02 1.9423240423202515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2851 -1.4240739867091179e-02</internalNodes>\n          <leafValues>\n            -3.7670499086380005e-01 3.4929048269987106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2852 -5.9150479733943939e-02</internalNodes>\n          <leafValues>\n            1.6816680133342743e-01 -3.5232000052928925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2853 3.6074228584766388e-02</internalNodes>\n          <leafValues>\n            2.2868489846587181e-02 -5.7828897237777710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2854 5.7692300528287888e-02</internalNodes>\n          <leafValues>\n            -2.1003179252147675e-02 3.0750969052314758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2855 -5.6619398295879364e-02</internalNodes>\n          <leafValues>\n            2.3383679986000061e-01 -5.5003248155117035e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2856 -1.0697569698095322e-02</internalNodes>\n          <leafValues>\n            -1.3236419856548309e-01 9.1536827385425568e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2857 4.2940411367453635e-04</internalNodes>\n          <leafValues>\n            5.2362058311700821e-02 -2.3470179736614227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2858 3.9490307681262493e-03</internalNodes>\n          <leafValues>\n            5.8583620935678482e-02 -8.2533597946166992e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2859 2.9810430482029915e-02</internalNodes>\n          <leafValues>\n            7.1684047579765320e-02 -1.6931280493736267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2860 -1.1462910100817680e-02</internalNodes>\n          <leafValues>\n            -2.6410359144210815e-01 4.4687580317258835e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2861 2.2996390238404274e-02</internalNodes>\n          <leafValues>\n            3.2992180436849594e-02 -3.4358990192413330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2862 -5.6792609393596649e-02</internalNodes>\n          <leafValues>\n            -7.5760507583618164e-01 2.4003670550882816e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2863 -4.4709402136504650e-03</internalNodes>\n          <leafValues>\n            1.6277609765529633e-01 -6.8193063139915466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2864 -1.2394989840686321e-02</internalNodes>\n          <leafValues>\n            -4.3603330850601196e-01 2.8416140004992485e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2865 2.9185590147972107e-01</internalNodes>\n          <leafValues>\n            -3.3300530165433884e-02 3.9866968989372253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2866 3.3633329439908266e-03</internalNodes>\n          <leafValues>\n            -1.0972090065479279e-01 5.6931249797344208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2867 -3.5175260156393051e-02</internalNodes>\n          <leafValues>\n            -5.7213717699050903e-01 2.0903490483760834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2868 -1.2044839560985565e-02</internalNodes>\n          <leafValues>\n            9.1090522706508636e-02 -1.1947949975728989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2869 6.5466752275824547e-03</internalNodes>\n          <leafValues>\n            2.2512340545654297e-01 -5.8309450745582581e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2870 -3.3635019790381193e-03</internalNodes>\n          <leafValues>\n            8.3123452961444855e-02 -1.6144299507141113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2871 -2.3451250046491623e-02</internalNodes>\n          <leafValues>\n            2.5118809938430786e-01 -4.8030331730842590e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2872 1.9356099888682365e-02</internalNodes>\n          <leafValues>\n            5.8134589344263077e-02 -2.0791250467300415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2873 -8.9994952082633972e-02</internalNodes>\n          <leafValues>\n            -7.5068491697311401e-01 1.4169859699904919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2874 1.2888260185718536e-02</internalNodes>\n          <leafValues>\n            3.3752571791410446e-02 -2.5715011358261108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2875 1.8961170688271523e-02</internalNodes>\n          <leafValues>\n            3.4717381000518799e-02 -3.6027848720550537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2876 -2.0835550501942635e-02</internalNodes>\n          <leafValues>\n            5.7851308584213257e-01 -2.2111309692263603e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2877 1.0018779896199703e-02</internalNodes>\n          <leafValues>\n            -3.9775848388671875e-02 2.6814839243888855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2878 -8.7516820058226585e-03</internalNodes>\n          <leafValues>\n            1.1257819831371307e-01 -4.8538278788328171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2879 -6.2366750091314316e-02</internalNodes>\n          <leafValues>\n            -6.6089111566543579e-01 1.6852140426635742e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2880 -1.9582180306315422e-02</internalNodes>\n          <leafValues>\n            -2.1182540059089661e-01 3.5702988505363464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2881 2.2675599902868271e-03</internalNodes>\n          <leafValues>\n            6.1212919652462006e-02 -2.0048849284648895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2882 -4.6558458358049393e-02</internalNodes>\n          <leafValues>\n            -5.6454938650131226e-01 9.2866625636816025e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2883 -7.7152079902589321e-03</internalNodes>\n          <leafValues>\n            1.5039919316768646e-01 -8.3328150212764740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2884 4.1551668196916580e-02</internalNodes>\n          <leafValues>\n            2.6247739791870117e-02 -3.2347521185874939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2885 -2.1789079532027245e-02</internalNodes>\n          <leafValues>\n            -3.2375821471214294e-01 3.1726188957691193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2886 1.9698198884725571e-03</internalNodes>\n          <leafValues>\n            -9.2564247548580170e-02 1.0823410004377365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2887 -5.2744988352060318e-03</internalNodes>\n          <leafValues>\n            -1.3990330696105957e-01 7.7120877802371979e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2888 5.6007660925388336e-02</internalNodes>\n          <leafValues>\n            -1.0328499972820282e-01 1.1455559730529785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2889 2.2741030156612396e-01</internalNodes>\n          <leafValues>\n            1.6028450801968575e-02 -6.8145108222961426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2890 5.1362380385398865e-02</internalNodes>\n          <leafValues>\n            -2.3025810718536377e-02 1.5446029603481293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2891 -1.3017069548368454e-02</internalNodes>\n          <leafValues>\n            -3.2606399059295654e-01 3.2892610877752304e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2892 1.5782029926776886e-01</internalNodes>\n          <leafValues>\n            -3.9765262044966221e-03 7.7765262126922607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2893 -9.9805086851119995e-02</internalNodes>\n          <leafValues>\n            6.8609541654586792e-01 -1.4648180454969406e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2894 3.7506350874900818e-01</internalNodes>\n          <leafValues>\n            1.4925800263881683e-02 -8.3105468750000000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2895 -7.9828302841633558e-04</internalNodes>\n          <leafValues>\n            -2.0161899924278259e-01 4.7897689044475555e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2896 -2.1241609752178192e-01</internalNodes>\n          <leafValues>\n            -3.4409451484680176e-01 1.0950430296361446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2897 3.9451681077480316e-02</internalNodes>\n          <leafValues>\n            1.3966959901154041e-02 -7.2163110971450806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2898 -2.9185509309172630e-02</internalNodes>\n          <leafValues>\n            -2.7462458610534668e-01 3.5496920347213745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2899 2.7055600658059120e-02</internalNodes>\n          <leafValues>\n            -4.6995740383863449e-02 2.9289430379867554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2900 -2.6052350178360939e-02</internalNodes>\n          <leafValues>\n            2.0752039551734924e-01 -3.6353081464767456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2901 5.7216219604015350e-02</internalNodes>\n          <leafValues>\n            1.8895739689469337e-02 -5.7143908739089966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2902 -1.7151840031147003e-02</internalNodes>\n          <leafValues>\n            -3.3009570837020874e-01 3.8528628647327423e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2903 -1.2304399907588959e-01</internalNodes>\n          <leafValues>\n            -7.8316390514373779e-01 1.1679390445351601e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2904 5.6786160916090012e-02</internalNodes>\n          <leafValues>\n            1.1063819751143456e-02 -5.3526097536087036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2905 1.1942840367555618e-01</internalNodes>\n          <leafValues>\n            9.5137851312756538e-03 -9.0637218952178955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2906 6.7707143723964691e-02</internalNodes>\n          <leafValues>\n            -3.9227519184350967e-02 2.8176560997962952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2907 -5.4918881505727768e-02</internalNodes>\n          <leafValues>\n            -6.2061691284179688e-01 1.6072269529104233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2908 9.2878006398677826e-03</internalNodes>\n          <leafValues>\n            -5.0339490175247192e-02 1.9040100276470184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2909 -1.3141489587724209e-02</internalNodes>\n          <leafValues>\n            1.8629829585552216e-01 -7.5528547167778015e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2910 2.9876120970584452e-04</internalNodes>\n          <leafValues>\n            -1.6163469851016998e-01 5.3589500486850739e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2911 1.0153599828481674e-01</internalNodes>\n          <leafValues>\n            1.8458279967308044e-01 -6.2570616602897644e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2912 2.7205729484558105e-01</internalNodes>\n          <leafValues>\n            1.3762479647994041e-02 -4.9364060163497925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2913 5.8730211108922958e-02</internalNodes>\n          <leafValues>\n            -2.3933680355548859e-01 7.9166807234287262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2914 1.9694259390234947e-02</internalNodes>\n          <leafValues>\n            3.7195280194282532e-02 -2.6109260320663452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2915 -1.0566900164121762e-04</internalNodes>\n          <leafValues>\n            6.7052997648715973e-02 -1.6515819728374481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2916 -1.9761279225349426e-02</internalNodes>\n          <leafValues>\n            8.6443692445755005e-02 -6.8657971918582916e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2917 5.3168509155511856e-02</internalNodes>\n          <leafValues>\n            2.9767790809273720e-02 -3.5225778818130493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2918 2.6071069762110710e-02</internalNodes>\n          <leafValues>\n            2.5216359645128250e-02 -1.4159369468688965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2919 -2.8720689937472343e-02</internalNodes>\n          <leafValues>\n            3.5941401124000549e-01 -2.9199620708823204e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2920 1.2989250011742115e-02</internalNodes>\n          <leafValues>\n            4.0009770542383194e-02 -1.9973039627075195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2921 -5.8176040649414062e-02</internalNodes>\n          <leafValues>\n            2.9345899820327759e-01 -4.3967530131340027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2922 2.8285140171647072e-02</internalNodes>\n          <leafValues>\n            3.7457428872585297e-02 -3.1361749768257141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2923 4.2701218277215958e-02</internalNodes>\n          <leafValues>\n            -2.0987769588828087e-02 5.0845777988433838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2924 2.4763600900769234e-02</internalNodes>\n          <leafValues>\n            -1.1869250237941742e-01 9.4457350671291351e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2925 -2.8076129965484142e-03</internalNodes>\n          <leafValues>\n            -2.3249779641628265e-01 4.5222718268632889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2926 -7.5583919882774353e-02</internalNodes>\n          <leafValues>\n            -4.5907029509544373e-01 1.2932280078530312e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2927 8.3796821534633636e-02</internalNodes>\n          <leafValues>\n            -1.5801630914211273e-02 6.8670481443405151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2928 -3.7072401493787766e-02</internalNodes>\n          <leafValues>\n            5.4146029055118561e-02 -4.2207449674606323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2929 2.4691069498658180e-02</internalNodes>\n          <leafValues>\n            2.6097679510712624e-02 -3.7760400772094727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2930 -2.7743929997086525e-02</internalNodes>\n          <leafValues>\n            -7.8631508350372314e-01 4.7534159384667873e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2931 1.9119970500469208e-02</internalNodes>\n          <leafValues>\n            2.6497760787606239e-02 -3.6489969491958618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2932 3.3773269969969988e-03</internalNodes>\n          <leafValues>\n            3.1966090202331543e-02 -3.2346761226654053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2933 1.9876819103956223e-02</internalNodes>\n          <leafValues>\n            -3.5128418356180191e-02 2.9078298807144165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2934 1.0035640001296997e-01</internalNodes>\n          <leafValues>\n            1.4607840217649937e-02 -5.2812242507934570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2935 -1.6163289546966553e-02</internalNodes>\n          <leafValues>\n            -1.0158140212297440e-01 1.1796499788761139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2936 1.0253380052745342e-02</internalNodes>\n          <leafValues>\n            3.6024410277605057e-02 -1.6520780324935913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2937 9.0665705502033234e-03</internalNodes>\n          <leafValues>\n            -3.4731701016426086e-02 3.7327200174331665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2938 3.0124900862574577e-02</internalNodes>\n          <leafValues>\n            5.1758479326963425e-02 -2.3582160472869873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2939 -6.6870311275124550e-03</internalNodes>\n          <leafValues>\n            4.3394241482019424e-02 -2.5202989578247070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2940 -2.0257479045540094e-03</internalNodes>\n          <leafValues>\n            -1.2479010224342346e-01 3.9309531450271606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2941 2.3254070430994034e-02</internalNodes>\n          <leafValues>\n            -4.7446910291910172e-02 2.3287700116634369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2942 2.3867199197411537e-02</internalNodes>\n          <leafValues>\n            -2.7421670034527779e-02 1.4630970358848572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2943 -4.0523000061511993e-02</internalNodes>\n          <leafValues>\n            -4.0472960472106934e-01 3.0415959656238556e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2944 1.9958209991455078e-01</internalNodes>\n          <leafValues>\n            2.2049469873309135e-02 -4.6558481454849243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2945 -1.2990590184926987e-02</internalNodes>\n          <leafValues>\n            -1.7970620095729828e-01 5.8874938637018204e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2946 2.5623949244618416e-02</internalNodes>\n          <leafValues>\n            9.9402610212564468e-03 -2.6575279235839844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2947 -3.2004870474338531e-02</internalNodes>\n          <leafValues>\n            2.5087380409240723e-01 -4.6291470527648926e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2948 1.8758419901132584e-02</internalNodes>\n          <leafValues>\n            -2.2038230672478676e-02 9.4407431781291962e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2949 4.5425668358802795e-02</internalNodes>\n          <leafValues>\n            2.3371569812297821e-02 -4.8393398523330688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2950 1.5670580789446831e-02</internalNodes>\n          <leafValues>\n            -5.5109858512878418e-02 1.9907830655574799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2951 5.1336981356143951e-02</internalNodes>\n          <leafValues>\n            2.6425419375300407e-02 -4.4082790613174438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2952 4.0884170681238174e-02</internalNodes>\n          <leafValues>\n            2.0071209967136383e-01 -3.4887779504060745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2953 6.9165557622909546e-02</internalNodes>\n          <leafValues>\n            -2.9303310438990593e-02 3.4936821460723877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2954 4.7967158257961273e-02</internalNodes>\n          <leafValues>\n            -2.4416960775852203e-02 2.7018651366233826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2955 4.4068440794944763e-02</internalNodes>\n          <leafValues>\n            -4.0497269481420517e-02 2.4382269382476807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2956 -1.0287550091743469e-01</internalNodes>\n          <leafValues>\n            7.1105289459228516e-01 -9.9055245518684387e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2957 2.2407740354537964e-01</internalNodes>\n          <leafValues>\n            -5.4946999996900558e-02 1.9853439927101135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2958 -9.6570551395416260e-03</internalNodes>\n          <leafValues>\n            -2.5050228834152222e-01 3.7410989403724670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2959 7.9199701547622681e-02</internalNodes>\n          <leafValues>\n            -2.2147569805383682e-02 4.8771071434020996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2960 4.5983199030160904e-02</internalNodes>\n          <leafValues>\n            8.2229733467102051e-02 -3.9335750043392181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2961 4.2670449614524841e-01</internalNodes>\n          <leafValues>\n            1.7132800072431564e-02 -5.3996258974075317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2962 1.5413990616798401e-01</internalNodes>\n          <leafValues>\n            1.1902350001037121e-02 -6.8533718585968018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2963 -1.7699889838695526e-01</internalNodes>\n          <leafValues>\n            -6.3113832473754883e-01 1.2545200064778328e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2964 -2.3769829422235489e-02</internalNodes>\n          <leafValues>\n            -1.4281429350376129e-01 1.4284349977970123e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2965 -8.3290286362171173e-02</internalNodes>\n          <leafValues>\n            3.6433398723602295e-01 -2.5287430733442307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2966 -3.0276349280029535e-03</internalNodes>\n          <leafValues>\n            -1.7501260340213776e-01 3.5528600215911865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2967 9.3518232461065054e-04</internalNodes>\n          <leafValues>\n            -3.4317269921302795e-01 2.8196020051836967e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2968 8.6792530491948128e-03</internalNodes>\n          <leafValues>\n            9.1854788362979889e-02 -1.1349800229072571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2969 -4.3289531022310257e-03</internalNodes>\n          <leafValues>\n            7.6560527086257935e-02 -1.2850379943847656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2970 6.1485089361667633e-02</internalNodes>\n          <leafValues>\n            4.0065501816570759e-03 -4.2798730731010437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2971 -2.3108569905161858e-02</internalNodes>\n          <leafValues>\n            -3.2999789714813232e-01 3.1228100880980492e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2972 -6.3490739557892084e-04</internalNodes>\n          <leafValues>\n            5.3318761289119720e-02 -6.0307938605546951e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2973 -4.1278889402747154e-03</internalNodes>\n          <leafValues>\n            1.5029670298099518e-01 -8.9805796742439270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2974 1.5408970415592194e-01</internalNodes>\n          <leafValues>\n            -2.3309229873120785e-03 9.6946477890014648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2975 1.8083740025758743e-02</internalNodes>\n          <leafValues>\n            -4.6674519777297974e-02 2.1941949427127838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2976 -6.0022968798875809e-02</internalNodes>\n          <leafValues>\n            3.7283098697662354e-01 -1.3637940399348736e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2977 -1.6025049984455109e-01</internalNodes>\n          <leafValues>\n            3.9442360401153564e-01 -2.4808609858155251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2978 -2.3220200091600418e-02</internalNodes>\n          <leafValues>\n            -2.8352069854736328e-01 3.8456469774246216e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2979 3.2353829592466354e-02</internalNodes>\n          <leafValues>\n            3.0197540298104286e-02 -3.5371699929237366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2980 -1.2930749915540218e-02</internalNodes>\n          <leafValues>\n            -1.8275280296802521e-01 4.0219429880380630e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2981 -2.9022840317338705e-03</internalNodes>\n          <leafValues>\n            5.7583440095186234e-02 -1.8175080418586731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2982 3.7042409181594849e-02</internalNodes>\n          <leafValues>\n            2.3471569642424583e-02 -3.7222048640251160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2983 -1.4371460676193237e-01</internalNodes>\n          <leafValues>\n            -6.7353278398513794e-01 1.3768459670245647e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2984 -1.0714099742472172e-02</internalNodes>\n          <leafValues>\n            2.3074600100517273e-01 -5.9898581355810165e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2985 1.1370699852705002e-02</internalNodes>\n          <leafValues>\n            -5.5859100073575974e-02 2.1604159474372864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2986 -3.3829350024461746e-02</internalNodes>\n          <leafValues>\n            -3.2868561148643494e-01 1.6743719577789307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2987 3.6406058818101883e-02</internalNodes>\n          <leafValues>\n            2.3512810468673706e-02 -4.7999539971351624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2988 -3.9853308349847794e-02</internalNodes>\n          <leafValues>\n            3.0388408899307251e-01 -2.2388210520148277e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2989 2.3857640102505684e-02</internalNodes>\n          <leafValues>\n            -4.3960139155387878e-02 2.5021830201148987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2990 -8.6149327456951141e-02</internalNodes>\n          <leafValues>\n            -9.2641222476959229e-01 1.0180849581956863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2991 -2.7360459789633751e-02</internalNodes>\n          <leafValues>\n            -4.5331078767776489e-01 1.8517250195145607e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2992 4.6891667880117893e-03</internalNodes>\n          <leafValues>\n            1.4983110129833221e-02 -9.8690867424011230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2993 3.6140959709882736e-02</internalNodes>\n          <leafValues>\n            2.1240329369902611e-02 -4.2275610566139221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2994 1.0714419931173325e-01</internalNodes>\n          <leafValues>\n            -4.1592169553041458e-02 2.4880869686603546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2995 -1.2024450115859509e-02</internalNodes>\n          <leafValues>\n            -1.8906030058860779e-01 5.5290900170803070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2996 2.1671090275049210e-02</internalNodes>\n          <leafValues>\n            -3.7164088338613510e-02 2.9896330833435059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2997 -3.3205719664692879e-03</internalNodes>\n          <leafValues>\n            -9.1837689280509949e-02 1.1810839921236038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2998 -8.4256403148174286e-02</internalNodes>\n          <leafValues>\n            -5.4935282468795776e-01 4.6934271231293678e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2999 -2.7107410132884979e-03</internalNodes>\n          <leafValues>\n            5.2301179617643356e-02 -2.1932560205459595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3000 -1.9661630503833294e-03</internalNodes>\n          <leafValues>\n            6.9522850215435028e-02 -1.2369599938392639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3001 1.0835859924554825e-01</internalNodes>\n          <leafValues>\n            -1.6028439626097679e-02 6.7538297176361084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3002 -4.0661569684743881e-02</internalNodes>\n          <leafValues>\n            2.8239870071411133e-01 -1.8643079325556755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3003 9.4869043678045273e-03</internalNodes>\n          <leafValues>\n            -1.4204730093479156e-01 7.4218176305294037e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3004 -8.1196203827857971e-03</internalNodes>\n          <leafValues>\n            1.2733109295368195e-01 -7.5325429439544678e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3005 -3.6718908697366714e-02</internalNodes>\n          <leafValues>\n            2.5209701061248779e-01 -3.8642361760139465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3006 4.2515851557254791e-02</internalNodes>\n          <leafValues>\n            3.4613508731126785e-02 -3.1406149268150330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3007 -1.6484249383211136e-02</internalNodes>\n          <leafValues>\n            -3.4622931480407715e-01 2.6470340788364410e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3008 1.8608599901199341e-02</internalNodes>\n          <leafValues>\n            3.1125839799642563e-02 -2.3837919533252716e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3009 -1.0872060433030128e-02</internalNodes>\n          <leafValues>\n            2.3061220347881317e-01 -4.3469380587339401e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3010 -4.0728081017732620e-02</internalNodes>\n          <leafValues>\n            1.3258880376815796e-01 -3.8833290338516235e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>240</maxWeakCount>\n      <stageThreshold>-1.3404430150985718e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 3011 2.7802670374512672e-02</internalNodes>\n          <leafValues>\n            -1.8535159528255463e-01 2.3777860403060913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3012 1.6392730176448822e-03</internalNodes>\n          <leafValues>\n            -2.6787629723548889e-01 1.1733309924602509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3013 -3.0419689137488604e-03</internalNodes>\n          <leafValues>\n            1.9552859663963318e-01 -1.3240019977092743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3014 -2.7744288672693074e-04</internalNodes>\n          <leafValues>\n            6.0701820999383926e-02 -3.0465421080589294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3015 -2.7942769229412079e-03</internalNodes>\n          <leafValues>\n            -2.5370940566062927e-01 7.6147846877574921e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3016 7.4005699716508389e-03</internalNodes>\n          <leafValues>\n            6.5623492002487183e-02 -3.0128520727157593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3017 1.1316470336169004e-03</internalNodes>\n          <leafValues>\n            -1.3232930004596710e-01 1.3622519373893738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3018 -8.7306648492813110e-03</internalNodes>\n          <leafValues>\n            -1.0246229916810989e-01 1.0649880394339561e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3019 -6.4327879808843136e-03</internalNodes>\n          <leafValues>\n            -2.1301789581775665e-01 7.7425397932529449e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3020 -1.3303949963301420e-03</internalNodes>\n          <leafValues>\n            9.6234247088432312e-02 -1.7086009681224823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3021 -2.3770590778440237e-03</internalNodes>\n          <leafValues>\n            1.1657089740037918e-01 -1.5135769546031952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3022 -5.3865360096096992e-03</internalNodes>\n          <leafValues>\n            -1.6851960122585297e-01 4.4324558228254318e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3023 -5.6973858736455441e-03</internalNodes>\n          <leafValues>\n            -2.4702399969100952e-01 7.7735342085361481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3024 4.5654520392417908e-02</internalNodes>\n          <leafValues>\n            -1.6687670722603798e-02 1.4222119748592377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3025 -1.4929420103726443e-05</internalNodes>\n          <leafValues>\n            -3.2725390791893005e-01 4.8142101615667343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3026 -1.7635900294408202e-03</internalNodes>\n          <leafValues>\n            7.0115849375724792e-02 -1.6864499077200890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3027 1.9133860478177667e-03</internalNodes>\n          <leafValues>\n            -1.9570820033550262e-01 9.0169131755828857e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3028 -1.9309469498693943e-03</internalNodes>\n          <leafValues>\n            1.1824289709329605e-01 -1.2146709859371185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3029 9.7775761969387531e-04</internalNodes>\n          <leafValues>\n            1.1657200008630753e-01 -1.2770849466323853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3030 -5.2643800154328346e-03</internalNodes>\n          <leafValues>\n            1.9958360493183136e-01 -6.2928676605224609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3031 -2.2730689961463213e-03</internalNodes>\n          <leafValues>\n            -2.1804699301719666e-01 6.6565290093421936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3032 -3.5128789022564888e-03</internalNodes>\n          <leafValues>\n            8.1114247441291809e-02 -1.4230330288410187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3033 2.8102330397814512e-03</internalNodes>\n          <leafValues>\n            6.0884710401296616e-02 -2.2008429467678070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3034 -2.3211359977722168e-02</internalNodes>\n          <leafValues>\n            2.3182259500026703e-01 -3.4014280885457993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3035 -8.7068388238549232e-03</internalNodes>\n          <leafValues>\n            -2.0691269636154175e-01 6.8004116415977478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3036 7.0584798231720924e-03</internalNodes>\n          <leafValues>\n            -1.0500799864530563e-01 1.2610189616680145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3037 -6.8878240883350372e-02</internalNodes>\n          <leafValues>\n            4.2687618732452393e-01 -3.1305618584156036e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3038 -1.2785149738192558e-02</internalNodes>\n          <leafValues>\n            -2.0268030464649200e-01 3.2005790621042252e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3039 -4.2242300696671009e-03</internalNodes>\n          <leafValues>\n            -2.1619689464569092e-01 7.5660832226276398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3040 -4.1660640388727188e-02</internalNodes>\n          <leafValues>\n            3.5601380467414856e-01 -3.6500900983810425e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3041 1.4983239583671093e-02</internalNodes>\n          <leafValues>\n            3.3663559705018997e-02 -4.3016681075096130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3042 1.8940219888463616e-03</internalNodes>\n          <leafValues>\n            -7.7785640954971313e-02 1.4130039513111115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3043 -1.0271830251440406e-03</internalNodes>\n          <leafValues>\n            6.1292048543691635e-02 -1.8569129705429077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3044 -1.0491760447621346e-02</internalNodes>\n          <leafValues>\n            -2.1280039846897125e-01 4.6641569584608078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3045 4.1263508610427380e-03</internalNodes>\n          <leafValues>\n            -6.3113473355770111e-02 2.1683399379253387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3046 2.1284529939293861e-02</internalNodes>\n          <leafValues>\n            -1.9541380926966667e-02 4.0555500984191895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3047 6.0370927676558495e-03</internalNodes>\n          <leafValues>\n            6.1322800815105438e-02 -1.7558750510215759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3048 2.8550080023705959e-03</internalNodes>\n          <leafValues>\n            -3.7402968853712082e-02 8.6794376373291016e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3049 -3.0839299783110619e-02</internalNodes>\n          <leafValues>\n            4.5826399326324463e-01 -2.2824319079518318e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3050 -1.2664640322327614e-02</internalNodes>\n          <leafValues>\n            -1.5179179608821869e-01 3.8325909525156021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3051 8.4788333624601364e-03</internalNodes>\n          <leafValues>\n            -7.9164452850818634e-02 1.3821309804916382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3052 -9.0271160006523132e-03</internalNodes>\n          <leafValues>\n            2.0483429729938507e-01 -5.8428239077329636e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3053 -5.3999028168618679e-03</internalNodes>\n          <leafValues>\n            -1.9563870131969452e-01 6.2881819903850555e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3054 4.8698568716645241e-03</internalNodes>\n          <leafValues>\n            4.7269448637962341e-02 -2.0357230305671692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3055 -5.6715728715062141e-03</internalNodes>\n          <leafValues>\n            1.6232620179653168e-01 -7.2473183274269104e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3056 -6.3621107256039977e-04</internalNodes>\n          <leafValues>\n            -1.7648829519748688e-01 6.1553929001092911e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3057 -5.7404721155762672e-03</internalNodes>\n          <leafValues>\n            -2.3773890733718872e-01 4.8493091017007828e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3058 2.3313059937208891e-03</internalNodes>\n          <leafValues>\n            -9.8087467253208160e-02 7.6705731451511383e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3059 2.6579289697110653e-03</internalNodes>\n          <leafValues>\n            -1.0429590195417404e-01 1.3275440037250519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3060 -1.2426489964127541e-02</internalNodes>\n          <leafValues>\n            -1.7686119675636292e-01 7.8797861933708191e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3061 3.7596069741994143e-03</internalNodes>\n          <leafValues>\n            5.8028500527143478e-02 -2.0235699415206909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3062 -1.3941819779574871e-02</internalNodes>\n          <leafValues>\n            2.9365628957748413e-01 -3.1069029122591019e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3063 2.4605529382824898e-02</internalNodes>\n          <leafValues>\n            -4.9767840653657913e-02 2.0446600019931793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3064 1.1572279781103134e-01</internalNodes>\n          <leafValues>\n            5.7542040012776852e-03 -5.5789208412170410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3065 1.4880299568176270e-03</internalNodes>\n          <leafValues>\n            -1.2870499491691589e-01 8.6191363632678986e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3066 -1.0085869580507278e-02</internalNodes>\n          <leafValues>\n            -1.8718029558658600e-01 2.7143789455294609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3067 -4.0125781670212746e-03</internalNodes>\n          <leafValues>\n            -1.4843569695949554e-01 6.1482351273298264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3068 4.5241288840770721e-02</internalNodes>\n          <leafValues>\n            -2.2187199443578720e-02 4.9022749066352844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3069 -5.4588477360084653e-04</internalNodes>\n          <leafValues>\n            1.0740750283002853e-01 -9.4784751534461975e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3070 1.0822109878063202e-02</internalNodes>\n          <leafValues>\n            -1.1820139735937119e-01 8.4009647369384766e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3071 6.4339267555624247e-04</internalNodes>\n          <leafValues>\n            -1.1072149872779846e-01 8.4126397967338562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3072 9.3544989824295044e-02</internalNodes>\n          <leafValues>\n            6.1726439744234085e-03 -3.8121530413627625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3073 -3.9214221760630608e-03</internalNodes>\n          <leafValues>\n            1.2969920039176941e-01 -7.5530029833316803e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3074 -4.5141312293708324e-03</internalNodes>\n          <leafValues>\n            -2.1222509443759918e-01 5.0941351801156998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3075 5.1563870161771774e-02</internalNodes>\n          <leafValues>\n            1.1215999722480774e-02 -8.4125047922134399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3076 -3.7086829543113708e-02</internalNodes>\n          <leafValues>\n            -3.3443790674209595e-01 1.2198350392282009e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3077 -1.5274320030584931e-03</internalNodes>\n          <leafValues>\n            1.7022849619388580e-01 -5.3171109408140182e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3078 -3.3183719497174025e-03</internalNodes>\n          <leafValues>\n            1.4972689747810364e-01 -3.9522700011730194e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3079 -1.0695139877498150e-02</internalNodes>\n          <leafValues>\n            -2.0767690241336823e-01 4.8223540186882019e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3080 8.0909933894872665e-03</internalNodes>\n          <leafValues>\n            -5.5572569370269775e-02 8.1361941993236542e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3081 8.9193560415878892e-04</internalNodes>\n          <leafValues>\n            -1.4888229966163635e-01 5.6974019855260849e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3082 2.1180939802434295e-04</internalNodes>\n          <leafValues>\n            -1.8776890635490417e-01 4.5087080448865891e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3083 6.8865409120917320e-03</internalNodes>\n          <leafValues>\n            -7.4651539325714111e-02 1.1806459724903107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3084 3.8009819388389587e-01</internalNodes>\n          <leafValues>\n            9.6241412684321404e-03 -5.0257128477096558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3085 9.4844900071620941e-02</internalNodes>\n          <leafValues>\n            2.0284110680222511e-02 -3.9478880167007446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3086 -1.1133160296594724e-04</internalNodes>\n          <leafValues>\n            5.3717028349637985e-02 -1.5433239936828613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3087 3.5911630839109421e-02</internalNodes>\n          <leafValues>\n            -2.4374049156904221e-02 3.5077759623527527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3088 -2.9291780665516853e-02</internalNodes>\n          <leafValues>\n            -4.9002739787101746e-01 2.1694840863347054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3089 -2.4277189746499062e-02</internalNodes>\n          <leafValues>\n            -5.0206911563873291e-01 1.5807420015335083e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3090 1.2620110064744949e-02</internalNodes>\n          <leafValues>\n            -4.8637848347425461e-02 2.1370050311088562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3091 -4.1045118123292923e-03</internalNodes>\n          <leafValues>\n            -1.6757939755916595e-01 6.2675923109054565e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3092 -2.3477169871330261e-01</internalNodes>\n          <leafValues>\n            6.2205511331558228e-01 -1.3949319720268250e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3093 -6.7914247512817383e-02</internalNodes>\n          <leafValues>\n            -9.7014141082763672e-01 1.0490460321307182e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3094 1.4207609929144382e-03</internalNodes>\n          <leafValues>\n            -6.0801118612289429e-02 1.3500739634037018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3095 -5.0894408486783504e-03</internalNodes>\n          <leafValues>\n            -1.6992169618606567e-01 5.0795670598745346e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3096 -1.9226800650358200e-02</internalNodes>\n          <leafValues>\n            9.8861172795295715e-02 -3.3686220645904541e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3097 1.0590540245175362e-02</internalNodes>\n          <leafValues>\n            5.9616900980472565e-02 -1.6495449841022491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3098 3.3726880792528391e-03</internalNodes>\n          <leafValues>\n            -3.8652341812849045e-02 5.5400568991899490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3099 -8.9012801647186279e-02</internalNodes>\n          <leafValues>\n            4.0750509500503540e-01 -2.4150330573320389e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3100 -2.3359079658985138e-01</internalNodes>\n          <leafValues>\n            -7.2641909122467041e-01 6.5185138955712318e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3101 -2.2732259333133698e-01</internalNodes>\n          <leafValues>\n            -8.9977008104324341e-01 9.1146891936659813e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3102 -2.9601769521832466e-02</internalNodes>\n          <leafValues>\n            -4.3270850181579590e-01 1.6021190211176872e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3103 -6.9494689814746380e-03</internalNodes>\n          <leafValues>\n            1.5218999981880188e-01 -6.1896830797195435e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3104 -1.9150479929521680e-03</internalNodes>\n          <leafValues>\n            7.2570547461509705e-02 -1.3121089339256287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3105 8.5106380283832550e-03</internalNodes>\n          <leafValues>\n            -5.7326089590787888e-02 1.5743100643157959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3106 -2.4363139644265175e-02</internalNodes>\n          <leafValues>\n            9.5700822770595551e-02 -5.8364428579807281e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3107 -2.2522659972310066e-02</internalNodes>\n          <leafValues>\n            -4.6943131089210510e-01 2.0241359248757362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3108 -4.4660381972789764e-03</internalNodes>\n          <leafValues>\n            7.6211109757423401e-02 -8.1844657659530640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3109 -4.2101819999516010e-03</internalNodes>\n          <leafValues>\n            -2.2083589434623718e-01 4.7010198235511780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3110 5.7130381464958191e-03</internalNodes>\n          <leafValues>\n            -6.2254000455141068e-02 5.2705820649862289e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3111 -5.6021669879555702e-03</internalNodes>\n          <leafValues>\n            -1.8985760211944580e-01 5.0114821642637253e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3112 -2.2042069584131241e-02</internalNodes>\n          <leafValues>\n            8.7683752179145813e-02 -2.4777179583907127e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3113 -2.1817081142216921e-03</internalNodes>\n          <leafValues>\n            1.6766600310802460e-01 -6.6771760582923889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3114 2.4545300751924515e-02</internalNodes>\n          <leafValues>\n            4.9205120652914047e-02 -2.2503720223903656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3115 -2.4728688877075911e-03</internalNodes>\n          <leafValues>\n            1.3539670407772064e-01 -6.2330130487680435e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3116 2.3717728909105062e-03</internalNodes>\n          <leafValues>\n            5.7926058769226074e-02 -1.3325250148773193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3117 -3.8999661803245544e-02</internalNodes>\n          <leafValues>\n            2.9875481128692627e-01 -3.0257239937782288e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3118 -1.7835620092228055e-03</internalNodes>\n          <leafValues>\n            9.2680282890796661e-02 -7.4350588023662567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3119 1.9984450191259384e-02</internalNodes>\n          <leafValues>\n            2.2409349679946899e-02 -4.1501939296722412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3120 4.1170548647642136e-03</internalNodes>\n          <leafValues>\n            5.3432278335094452e-02 -1.5092259645462036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3121 4.3995600193738937e-02</internalNodes>\n          <leafValues>\n            1.1389889754354954e-02 -6.6494518518447876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3122 -3.5350578837096691e-03</internalNodes>\n          <leafValues>\n            1.1005590111017227e-01 -7.6377056539058685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3123 1.4632029924541712e-03</internalNodes>\n          <leafValues>\n            -5.6962151080369949e-02 1.3184599578380585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3124 -4.9925539642572403e-03</internalNodes>\n          <leafValues>\n            -1.4675070345401764e-01 5.5129978805780411e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3125 -7.8646428883075714e-02</internalNodes>\n          <leafValues>\n            -5.2768182754516602e-01 1.3662739656865597e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3126 -4.3559111654758453e-03</internalNodes>\n          <leafValues>\n            9.1798119246959686e-02 -5.7598169893026352e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3127 8.2531487569212914e-03</internalNodes>\n          <leafValues>\n            -6.5613977611064911e-02 1.3083070516586304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3128 -3.5033349413424730e-03</internalNodes>\n          <leafValues>\n            -1.2742599844932556e-01 6.0875169932842255e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3129 3.9662471972405910e-03</internalNodes>\n          <leafValues>\n            -5.5715151131153107e-02 1.4783249795436859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3130 -1.0260219685733318e-02</internalNodes>\n          <leafValues>\n            -1.3472290337085724e-01 4.4514350593090057e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3131 3.6724930396303535e-04</internalNodes>\n          <leafValues>\n            -1.3727700710296631e-01 6.1179649084806442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3132 1.9500199705362320e-02</internalNodes>\n          <leafValues>\n            -5.9033330529928207e-02 1.5589320659637451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3133 1.4041420072317123e-02</internalNodes>\n          <leafValues>\n            2.2140439599752426e-02 -4.2831090092658997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3134 3.8459740579128265e-02</internalNodes>\n          <leafValues>\n            1.6875730827450752e-02 -5.2425742149353027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3135 -2.5901539251208305e-02</internalNodes>\n          <leafValues>\n            2.5163099169731140e-01 -3.2579511404037476e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3136 2.8264479711651802e-02</internalNodes>\n          <leafValues>\n            2.1297719329595566e-02 -2.3978309333324432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3137 -5.3067881613969803e-02</internalNodes>\n          <leafValues>\n            7.6594692468643188e-01 -1.0163240134716034e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3138 1.6842440236359835e-03</internalNodes>\n          <leafValues>\n            4.0168728679418564e-02 -2.1810980141162872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3139 6.5255112713202834e-04</internalNodes>\n          <leafValues>\n            -3.2155249267816544e-02 2.6028048992156982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3140 -1.5381099283695221e-01</internalNodes>\n          <leafValues>\n            -7.9570180177688599e-01 9.9420538172125816e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3141 -1.7530319746583700e-04</internalNodes>\n          <leafValues>\n            6.1257161200046539e-02 -1.1830890178680420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3142 1.1829809518530965e-03</internalNodes>\n          <leafValues>\n            -8.2589529454708099e-02 5.8234758675098419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3143 1.4753890223801136e-02</internalNodes>\n          <leafValues>\n            4.6728778630495071e-02 -1.9874340295791626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3144 1.0592579841613770e-02</internalNodes>\n          <leafValues>\n            -5.7157158851623535e-02 1.2261729687452316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3145 -4.6638969331979752e-02</internalNodes>\n          <leafValues>\n            3.9221999049186707e-01 -1.8770450726151466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3146 -2.2761020809412003e-03</internalNodes>\n          <leafValues>\n            -1.9819819927215576e-01 3.2669950276613235e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3147 -8.9252636826131493e-05</internalNodes>\n          <leafValues>\n            -1.7795699834823608e-01 4.5088160783052444e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3148 -4.8888921737670898e-03</internalNodes>\n          <leafValues>\n            3.7973329424858093e-01 -2.5622500106692314e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3149 -4.7039450146257877e-03</internalNodes>\n          <leafValues>\n            -1.4075440168380737e-01 5.1885869354009628e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3150 6.8887867964804173e-03</internalNodes>\n          <leafValues>\n            -6.0707900673151016e-02 6.7318782210350037e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3151 9.4449967145919800e-02</internalNodes>\n          <leafValues>\n            -4.3975159525871277e-02 1.6885830461978912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3152 5.1520671695470810e-02</internalNodes>\n          <leafValues>\n            3.8239071145653725e-03 -6.3077712059020996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3153 6.3957129605114460e-03</internalNodes>\n          <leafValues>\n            4.4094309210777283e-02 -1.8156020343303680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3154 -4.9659270793199539e-02</internalNodes>\n          <leafValues>\n            1.1174239963293076e-01 -5.5821210145950317e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3155 -6.9081829860806465e-03</internalNodes>\n          <leafValues>\n            -1.4038950204849243e-01 5.9535760432481766e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3156 9.2546567320823669e-03</internalNodes>\n          <leafValues>\n            -3.3587910234928131e-02 5.8593101799488068e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3157 5.0454521551728249e-03</internalNodes>\n          <leafValues>\n            5.3777661174535751e-02 -1.3626030087471008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3158 -3.3333420753479004e-02</internalNodes>\n          <leafValues>\n            2.4641269445419312e-01 -3.1888678669929504e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3159 6.1201080679893494e-02</internalNodes>\n          <leafValues>\n            2.0013030618429184e-02 -3.9326569437980652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3160 -1.0175120085477829e-02</internalNodes>\n          <leafValues>\n            7.5324602425098419e-02 -3.9622548967599869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3161 1.0271370410919189e-02</internalNodes>\n          <leafValues>\n            -5.2234519273042679e-02 1.7939470708370209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3162 -5.1337860524654388e-02</internalNodes>\n          <leafValues>\n            -3.1097239255905151e-01 2.1656470373272896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3163 2.3615739773958921e-03</internalNodes>\n          <leafValues>\n            -6.4843319356441498e-02 1.1771979928016663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3164 -2.7691819705069065e-03</internalNodes>\n          <leafValues>\n            1.4682589471340179e-01 -5.7794518768787384e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3165 2.1457809954881668e-02</internalNodes>\n          <leafValues>\n            2.5269350036978722e-02 -3.3404821157455444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3166 -5.9619098901748657e-03</internalNodes>\n          <leafValues>\n            9.9241338670253754e-02 -3.5371959209442139e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3167 7.5217390060424805e-01</internalNodes>\n          <leafValues>\n            7.7095897868275642e-03 -8.6434108018875122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3168 -9.2514551943168044e-04</internalNodes>\n          <leafValues>\n            3.8251910358667374e-02 -7.5597628951072693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3169 4.0818289853632450e-03</internalNodes>\n          <leafValues>\n            6.6699139773845673e-02 -1.1289499700069427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3170 1.6256010159850121e-02</internalNodes>\n          <leafValues>\n            -1.8782900646328926e-02 1.8875749409198761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3171 -9.3405954539775848e-03</internalNodes>\n          <leafValues>\n            -1.6462349891662598e-01 4.6859718859195709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3172 -3.8136378861963749e-04</internalNodes>\n          <leafValues>\n            6.0498170554637909e-02 -1.0089360177516937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3173 -2.3470960557460785e-02</internalNodes>\n          <leafValues>\n            1.8546760082244873e-01 -3.9577301591634750e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3174 -7.8684352338314056e-02</internalNodes>\n          <leafValues>\n            -6.0540008544921875e-01 1.3162979856133461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3175 1.0616140067577362e-01</internalNodes>\n          <leafValues>\n            9.4080185517668724e-03 -7.2416877746582031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3176 -6.9211378693580627e-02</internalNodes>\n          <leafValues>\n            -9.2819648981094360e-01 5.4140980355441570e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3177 -4.3828289955854416e-02</internalNodes>\n          <leafValues>\n            5.4933768510818481e-01 -1.5516829676926136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3178 5.6881271302700043e-03</internalNodes>\n          <leafValues>\n            3.7328861653804779e-02 -1.2019480019807816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3179 3.6933881044387817e-01</internalNodes>\n          <leafValues>\n            -9.9545158445835114e-03 8.1607538461685181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3180 -1.0447519831359386e-02</internalNodes>\n          <leafValues>\n            1.4190499484539032e-01 -4.9798399209976196e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3181 1.5151320025324821e-02</internalNodes>\n          <leafValues>\n            2.2705320268869400e-02 -3.4523698687553406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3182 1.2503850460052490e-01</internalNodes>\n          <leafValues>\n            -2.7150910347700119e-02 3.0379050970077515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3183 -9.1995187103748322e-03</internalNodes>\n          <leafValues>\n            -1.7020559310913086e-01 4.4314298778772354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3184 7.1795531548559666e-03</internalNodes>\n          <leafValues>\n            -7.8971788287162781e-02 6.3919156789779663e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3185 -1.8217830359935760e-01</internalNodes>\n          <leafValues>\n            -9.7598892450332642e-01 7.1003441698849201e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3186 1.5047369743115269e-05</internalNodes>\n          <leafValues>\n            -9.8960377275943756e-02 3.9371099323034286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3187 -3.8763400167226791e-02</internalNodes>\n          <leafValues>\n            -5.9095138311386108e-01 1.0429039597511292e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3188 -4.3799880892038345e-02</internalNodes>\n          <leafValues>\n            2.5290209054946899e-01 -9.5704924315214157e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3189 -5.6705519556999207e-02</internalNodes>\n          <leafValues>\n            -7.2466772794723511e-01 9.0332692489027977e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3190 7.5183928012847900e-02</internalNodes>\n          <leafValues>\n            -6.7565650679171085e-03 7.3075437545776367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3191 -6.4183590002357960e-03</internalNodes>\n          <leafValues>\n            8.5421830415725708e-02 -7.6056882739067078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3192 1.3349299551919103e-03</internalNodes>\n          <leafValues>\n            6.9977663457393646e-02 -9.2187918722629547e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3193 2.8028399683535099e-03</internalNodes>\n          <leafValues>\n            -5.0953198224306107e-02 1.2934680283069611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3194 -6.4196899533271790e-02</internalNodes>\n          <leafValues>\n            -6.1751341819763184e-01 8.7323756888508797e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3195 1.7879910301417112e-03</internalNodes>\n          <leafValues>\n            -5.9445429593324661e-02 1.1325009912252426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3196 2.3370790295302868e-03</internalNodes>\n          <leafValues>\n            2.2643320262432098e-02 -1.7427070438861847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3197 2.1500359289348125e-03</internalNodes>\n          <leafValues>\n            -5.1846258342266083e-02 1.5027989447116852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3198 -2.9744949191808701e-02</internalNodes>\n          <leafValues>\n            -1.7235560715198517e-01 1.6160540282726288e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3199 -2.9182229191064835e-03</internalNodes>\n          <leafValues>\n            -1.1646019667387009e-01 5.3380940109491348e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3200 -5.2581899799406528e-03</internalNodes>\n          <leafValues>\n            -8.4262102842330933e-02 3.6880351603031158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3201 2.0302489399909973e-02</internalNodes>\n          <leafValues>\n            -5.3297229111194611e-02 1.6949890553951263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3202 3.1120770145207644e-03</internalNodes>\n          <leafValues>\n            4.4630430638790131e-02 -1.4054660499095917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3203 -7.7524736523628235e-02</internalNodes>\n          <leafValues>\n            -6.5038281679153442e-01 1.0468889959156513e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3204 2.0978450775146484e-02</internalNodes>\n          <leafValues>\n            -3.0001569539308548e-02 1.9233350455760956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3205 2.0581670105457306e-03</internalNodes>\n          <leafValues>\n            5.1535431295633316e-02 -1.3114020228385925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3206 -7.8407032415270805e-03</internalNodes>\n          <leafValues>\n            -1.3882939517498016e-01 5.0657931715250015e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3207 -7.1894749999046326e-02</internalNodes>\n          <leafValues>\n            2.1866980195045471e-01 -3.3615190535783768e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3208 1.4218500256538391e-01</internalNodes>\n          <leafValues>\n            1.2880220077931881e-02 -5.8853518962860107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3209 4.4800378382205963e-03</internalNodes>\n          <leafValues>\n            -5.5522039532661438e-02 1.1976230144500732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3210 -9.4673000276088715e-03</internalNodes>\n          <leafValues>\n            -1.2036380171775818e-01 3.0232360586524010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3211 -1.2275399640202522e-03</internalNodes>\n          <leafValues>\n            8.3563826978206635e-02 -8.7046720087528229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3212 -6.2556960619986057e-03</internalNodes>\n          <leafValues>\n            6.9355137646198273e-02 -3.5146340727806091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3213 6.4953900873661041e-02</internalNodes>\n          <leafValues>\n            -1.9296510145068169e-02 3.4898158907890320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3214 -3.2067541033029556e-03</internalNodes>\n          <leafValues>\n            -1.5205690264701843e-01 5.5897928774356842e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3215 -4.8260089010000229e-02</internalNodes>\n          <leafValues>\n            -6.0309630632400513e-01 1.0463859885931015e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3216 -4.2638331651687622e-03</internalNodes>\n          <leafValues>\n            -1.5278290212154388e-01 1.8424319103360176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3217 4.9363691359758377e-02</internalNodes>\n          <leafValues>\n            -2.5442009791731834e-02 3.9227759838104248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3218 2.3624610621482134e-03</internalNodes>\n          <leafValues>\n            3.8519620895385742e-01 -1.7071360722184181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3219 2.5921489577740431e-03</internalNodes>\n          <leafValues>\n            -1.5459729731082916e-01 4.3975789099931717e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3220 1.1510170064866543e-02</internalNodes>\n          <leafValues>\n            6.0740210115909576e-02 -9.8671890795230865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3221 3.9182868786156178e-03</internalNodes>\n          <leafValues>\n            2.6165749877691269e-02 -2.9697629809379578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3222 7.3265641927719116e-02</internalNodes>\n          <leafValues>\n            5.5715530179440975e-03 -3.0474159121513367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3223 -4.8912810161709785e-03</internalNodes>\n          <leafValues>\n            1.2753780186176300e-01 -6.6236838698387146e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3224 -1.3187030330300331e-02</internalNodes>\n          <leafValues>\n            -2.0257690548896790e-01 3.0369829386472702e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3225 1.8196239834651351e-03</internalNodes>\n          <leafValues>\n            4.9198139458894730e-02 -1.3782709836959839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3226 -1.0299400426447392e-02</internalNodes>\n          <leafValues>\n            1.3534359633922577e-01 -2.9193470254540443e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3227 1.7157079279422760e-01</internalNodes>\n          <leafValues>\n            -9.5548974350094795e-03 7.1399718523025513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3228 -3.4571110736578703e-03</internalNodes>\n          <leafValues>\n            6.1094630509614944e-02 -7.6816998422145844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3229 3.3349241130053997e-04</internalNodes>\n          <leafValues>\n            -1.8768610060214996e-01 3.9411719888448715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3230 5.6019209325313568e-02</internalNodes>\n          <leafValues>\n            8.5914824157953262e-03 -7.3577058315277100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3231 6.2299368437379599e-04</internalNodes>\n          <leafValues>\n            -9.4062000513076782e-02 6.7965887486934662e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3232 -1.4288679696619511e-02</internalNodes>\n          <leafValues>\n            2.4144929647445679e-01 -2.7025459334254265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3233 -9.9114552140235901e-03</internalNodes>\n          <leafValues>\n            -1.5346029400825500e-01 5.3243361413478851e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3234 -7.0727966725826263e-02</internalNodes>\n          <leafValues>\n            -7.1243101358413696e-01 7.4889077804982662e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3235 1.6112169250845909e-02</internalNodes>\n          <leafValues>\n            -3.5437509417533875e-02 2.2026020288467407e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3236 2.9938609804958105e-03</internalNodes>\n          <leafValues>\n            1.1530820280313492e-02 -9.2017240822315216e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3237 1.4030840247869492e-03</internalNodes>\n          <leafValues>\n            5.4302141070365906e-02 -1.1777610331773758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3238 -8.9894913136959076e-02</internalNodes>\n          <leafValues>\n            -6.7658591270446777e-01 1.5741019742563367e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3239 2.7459259144961834e-03</internalNodes>\n          <leafValues>\n            2.9860800132155418e-02 -2.2091430425643921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3240 2.2225940600037575e-02</internalNodes>\n          <leafValues>\n            -4.6592909842729568e-02 8.0418691039085388e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3241 4.4512529857456684e-03</internalNodes>\n          <leafValues>\n            1.0706499963998795e-01 -6.5101496875286102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3242 -2.1191150881350040e-03</internalNodes>\n          <leafValues>\n            3.9871860295534134e-02 -5.2555959671735764e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3243 1.0229589790105820e-01</internalNodes>\n          <leafValues>\n            1.3386270031332970e-02 -4.5546561479568481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3244 -6.8260570988059044e-03</internalNodes>\n          <leafValues>\n            1.2695349752902985e-01 -5.9704031795263290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3245 -5.6890580803155899e-02</internalNodes>\n          <leafValues>\n            4.0180799365043640e-01 -1.6048269346356392e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3246 -1.8590029329061508e-02</internalNodes>\n          <leafValues>\n            -4.0374109148979187e-01 1.3502580113708973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3247 3.3882200717926025e-02</internalNodes>\n          <leafValues>\n            7.8824451193213463e-03 -7.9268622398376465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3248 1.8759339582175016e-03</internalNodes>\n          <leafValues>\n            -3.4521240741014481e-02 1.8177880346775055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3249 1.5652549918740988e-03</internalNodes>\n          <leafValues>\n            4.8419889062643051e-02 -1.5185169875621796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3250 3.9563868194818497e-03</internalNodes>\n          <leafValues>\n            -4.2162090539932251e-02 7.8943721950054169e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>199</maxWeakCount>\n      <stageThreshold>-1.4275209903717041e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 3251 8.8487491011619568e-02</internalNodes>\n          <leafValues>\n            -2.2935929894447327e-01 2.4001109600067139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3252 4.3344359844923019e-02</internalNodes>\n          <leafValues>\n            -1.9927449524402618e-01 2.0298740267753601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3253 1.5985079109668732e-02</internalNodes>\n          <leafValues>\n            -1.9890889525413513e-01 1.9233879446983337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3254 9.8411232233047485e-02</internalNodes>\n          <leafValues>\n            -9.4830892980098724e-02 2.4474050104618073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3255 1.0079979896545410e-02</internalNodes>\n          <leafValues>\n            -4.8000910878181458e-01 5.9808451682329178e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3256 6.2629938125610352e-02</internalNodes>\n          <leafValues>\n            -1.5902659296989441e-01 1.5163069963455200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3257 1.3623869977891445e-02</internalNodes>\n          <leafValues>\n            -2.7451339364051819e-01 9.0433366596698761e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3258 -3.8067731074988842e-03</internalNodes>\n          <leafValues>\n            -2.9342180490493774e-01 7.3020830750465393e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3259 -1.4649610035121441e-02</internalNodes>\n          <leafValues>\n            2.6059079170227051e-01 -9.5248378813266754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3260 -4.9288192531093955e-04</internalNodes>\n          <leafValues>\n            5.9352219104766846e-02 -2.8081470727920532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3261 -5.1220930181443691e-03</internalNodes>\n          <leafValues>\n            -2.4218030273914337e-01 8.1701509654521942e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3262 3.3120220177806914e-04</internalNodes>\n          <leafValues>\n            -4.0093910694122314e-01 3.4026090055704117e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3263 -7.4724480509757996e-04</internalNodes>\n          <leafValues>\n            6.0560788959264755e-02 -2.9127869009971619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3264 4.8829670995473862e-02</internalNodes>\n          <leafValues>\n            -7.2298422455787659e-02 2.6132971048355103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3265 2.6994010433554649e-02</internalNodes>\n          <leafValues>\n            9.5457129180431366e-02 -2.6758649945259094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3266 -2.1151660475879908e-03</internalNodes>\n          <leafValues>\n            -2.5773069262504578e-01 5.3247869014739990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3267 2.2652999177807942e-05</internalNodes>\n          <leafValues>\n            -3.0092310905456543e-01 5.9096790850162506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3268 1.1034930124878883e-02</internalNodes>\n          <leafValues>\n            -7.4277937412261963e-02 1.9048790633678436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3269 -1.0275219567120075e-02</internalNodes>\n          <leafValues>\n            -3.2835999131202698e-01 4.9218688160181046e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3270 -8.3319991827011108e-03</internalNodes>\n          <leafValues>\n            -2.9651468992233276e-01 3.9428789168596268e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3271 5.0808671861886978e-02</internalNodes>\n          <leafValues>\n            -4.7661241143941879e-02 3.7404251098632812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3272 -1.2126479996368289e-03</internalNodes>\n          <leafValues>\n            -1.2148889899253845e-01 6.5059438347816467e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3273 4.1254470124840736e-03</internalNodes>\n          <leafValues>\n            -1.4912040531635284e-01 1.1146119982004166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3274 -1.8284359946846962e-02</internalNodes>\n          <leafValues>\n            -2.8573518991470337e-01 5.9268131852149963e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3275 1.4156280457973480e-01</internalNodes>\n          <leafValues>\n            -3.4436151385307312e-02 4.6374419331550598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3276 -3.6982420831918716e-02</internalNodes>\n          <leafValues>\n            -5.0853198766708374e-01 2.5087080895900726e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3277 5.0303530879318714e-03</internalNodes>\n          <leafValues>\n            9.4626903533935547e-02 -1.6120310127735138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3278 -4.6149080991744995e-01</internalNodes>\n          <leafValues>\n            4.5096570253372192e-01 -3.1209290027618408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3279 -1.9794689491391182e-02</internalNodes>\n          <leafValues>\n            -4.1046530008316040e-01 3.8790289312601089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3280 -2.3872030898928642e-02</internalNodes>\n          <leafValues>\n            -1.5252740681171417e-01 9.2825219035148621e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3281 1.8736299825832248e-03</internalNodes>\n          <leafValues>\n            -1.9186599552631378e-01 6.9048486649990082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3282 5.8244299143552780e-02</internalNodes>\n          <leafValues>\n            -2.2612230852246284e-02 2.1975080668926239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3283 1.5281150117516518e-02</internalNodes>\n          <leafValues>\n            5.6379750370979309e-02 -2.4171100556850433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3284 1.3347120583057404e-01</internalNodes>\n          <leafValues>\n            -4.1846349835395813e-02 1.3641799986362457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3285 -1.8359240144491196e-02</internalNodes>\n          <leafValues>\n            1.3650700449943542e-01 -1.0537090152502060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3286 -1.1236529797315598e-02</internalNodes>\n          <leafValues>\n            -2.1045160293579102e-01 6.1872761696577072e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3287 -7.2013743221759796e-02</internalNodes>\n          <leafValues>\n            -3.8488849997520447e-01 3.6731179803609848e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3288 -1.9893420860171318e-02</internalNodes>\n          <leafValues>\n            1.9913719594478607e-01 -5.4470948874950409e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3289 -8.1342989578843117e-03</internalNodes>\n          <leafValues>\n            -2.7529388666152954e-01 4.7152820974588394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3290 -1.3614459894597530e-02</internalNodes>\n          <leafValues>\n            1.9248710572719574e-01 -6.0025930404663086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3291 -6.4553669653832912e-03</internalNodes>\n          <leafValues>\n            -2.1480080485343933e-01 6.2654919922351837e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3292 -7.2288706898689270e-02</internalNodes>\n          <leafValues>\n            -5.3200727701187134e-01 2.2132480517029762e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3293 -7.0425979793071747e-02</internalNodes>\n          <leafValues>\n            -3.2588490843772888e-01 3.7150900810956955e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3294 -1.2219670228660107e-02</internalNodes>\n          <leafValues>\n            -6.5945722162723541e-02 2.8728110715746880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3295 6.9816941395401955e-03</internalNodes>\n          <leafValues>\n            -2.8508388996124268e-01 4.2512468993663788e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3296 -2.1437550894916058e-03</internalNodes>\n          <leafValues>\n            -1.0019320249557495e-01 7.1198999881744385e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3297 -1.5813990030437708e-03</internalNodes>\n          <leafValues>\n            -1.2926709651947021e-01 9.5332272350788116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3298 2.1735160771640949e-05</internalNodes>\n          <leafValues>\n            -1.9246159493923187e-01 5.3724698722362518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3299 -1.0075280070304871e-01</internalNodes>\n          <leafValues>\n            5.8181059360504150e-01 -2.1155519410967827e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3300 8.0153037561103702e-04</internalNodes>\n          <leafValues>\n            -1.6752170026302338e-01 6.1912689357995987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3301 -1.3424370437860489e-02</internalNodes>\n          <leafValues>\n            1.7007820308208466e-01 -6.5821729600429535e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3302 2.5006510317325592e-02</internalNodes>\n          <leafValues>\n            3.1838789582252502e-02 -3.5664460062980652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3303 -2.3061310872435570e-02</internalNodes>\n          <leafValues>\n            -5.3446078300476074e-01 2.0500430837273598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3304 -8.1409228732809424e-04</internalNodes>\n          <leafValues>\n            7.3716811835765839e-02 -9.8385728895664215e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3305 -1.3083440251648426e-02</internalNodes>\n          <leafValues>\n            2.3585100471973419e-01 -4.7893758863210678e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3306 1.0480909608304501e-02</internalNodes>\n          <leafValues>\n            -6.7725770175457001e-02 1.1783230304718018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3307 -4.3198268860578537e-02</internalNodes>\n          <leafValues>\n            -4.3816858530044556e-01 2.5101570412516594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3308 -3.2453269232064486e-03</internalNodes>\n          <leafValues>\n            -2.2451759874820709e-01 4.3056890368461609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3309 -1.6294110100716352e-03</internalNodes>\n          <leafValues>\n            -2.3388780653476715e-01 4.5073401182889938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3310 -3.2911408692598343e-02</internalNodes>\n          <leafValues>\n            2.1012680232524872e-01 -2.1296700462698936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3311 1.4785619896429125e-05</internalNodes>\n          <leafValues>\n            -7.0854157209396362e-02 1.4696949720382690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3312 -6.0208540409803391e-02</internalNodes>\n          <leafValues>\n            -5.2135831117630005e-01 1.9577400758862495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3313 1.1327289976179600e-03</internalNodes>\n          <leafValues>\n            4.4817470014095306e-02 -2.4390450119972229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3314 8.3639882504940033e-03</internalNodes>\n          <leafValues>\n            -5.6976079940795898e-02 1.1684290319681168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3315 1.4313389547169209e-02</internalNodes>\n          <leafValues>\n            4.7445211559534073e-02 -2.2202989459037781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3316 -1.1530060321092606e-01</internalNodes>\n          <leafValues>\n            8.6662977933883667e-01 -4.2397230863571167e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3317 -2.0798090845346451e-02</internalNodes>\n          <leafValues>\n            2.8666529059410095e-01 -4.0919508785009384e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3318 -1.8268700689077377e-02</internalNodes>\n          <leafValues>\n            1.3087140023708344e-01 -4.5348200947046280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3319 -2.5494489073753357e-01</internalNodes>\n          <leafValues>\n            -3.2410839200019836e-01 4.0496330708265305e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3320 -2.1786570549011230e-02</internalNodes>\n          <leafValues>\n            3.3126661181449890e-01 -3.7021800875663757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3321 4.2743898928165436e-02</internalNodes>\n          <leafValues>\n            3.2316859811544418e-02 -3.5259619355201721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3322 3.4730590879917145e-02</internalNodes>\n          <leafValues>\n            3.4049548208713531e-02 -2.1393370628356934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3323 -8.8458160462323576e-05</internalNodes>\n          <leafValues>\n            -3.1134480237960815e-01 3.9364520460367203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3324 2.2288469970226288e-01</internalNodes>\n          <leafValues>\n            -8.7889749556779861e-03 8.6566871404647827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3325 2.7045139670372009e-01</internalNodes>\n          <leafValues>\n            -5.2694901823997498e-02 1.8746510148048401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3326 -2.4789940565824509e-02</internalNodes>\n          <leafValues>\n            2.7650299668312073e-01 -2.7306249365210533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3327 -3.5731170326471329e-02</internalNodes>\n          <leafValues>\n            4.1157469153404236e-01 -2.2886089980602264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3328 4.7842580825090408e-02</internalNodes>\n          <leafValues>\n            2.2989360615611076e-02 -4.1287249326705933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3329 -3.1846091151237488e-02</internalNodes>\n          <leafValues>\n            3.8073039054870605e-01 -2.9582230374217033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3330 -6.9219218567013741e-03</internalNodes>\n          <leafValues>\n            -1.3741379976272583e-01 4.8710118979215622e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3331 4.1339758783578873e-02</internalNodes>\n          <leafValues>\n            4.4119630008935928e-02 -2.3561610281467438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3332 -3.4157071262598038e-02</internalNodes>\n          <leafValues>\n            -2.4877929687500000e-01 1.1872059665620327e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3333 -1.2198990210890770e-02</internalNodes>\n          <leafValues>\n            -2.1426199376583099e-01 5.1533300429582596e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3334 -7.9321218654513359e-03</internalNodes>\n          <leafValues>\n            8.1553332507610321e-02 -6.9921717047691345e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3335 -4.2665388435125351e-02</internalNodes>\n          <leafValues>\n            -5.0616562366485596e-01 1.9237969070672989e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3336 3.5445880144834518e-02</internalNodes>\n          <leafValues>\n            -1.6394840553402901e-02 1.7057849466800690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3337 4.5686280727386475e-01</internalNodes>\n          <leafValues>\n            1.9264170899987221e-02 -5.4413592815399170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3338 3.1118420884013176e-02</internalNodes>\n          <leafValues>\n            -3.0776979401707649e-02 1.3581100106239319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3339 -1.6103679314255714e-02</internalNodes>\n          <leafValues>\n            2.1244280040264130e-01 -4.8341780900955200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3340 5.7916441000998020e-03</internalNodes>\n          <leafValues>\n            -7.3984377086162567e-02 3.5749029368162155e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3341 -6.5660297870635986e-02</internalNodes>\n          <leafValues>\n            2.6183378696441650e-01 -4.1004821658134460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3342 8.1464983522891998e-02</internalNodes>\n          <leafValues>\n            1.2928999960422516e-02 -3.5362771153450012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3343 1.2561170384287834e-02</internalNodes>\n          <leafValues>\n            -1.9108769297599792e-01 6.9965943694114685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3344 7.8783802688121796e-02</internalNodes>\n          <leafValues>\n            -5.4801939986646175e-03 3.9217329025268555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3345 3.3984828740358353e-02</internalNodes>\n          <leafValues>\n            8.4328763186931610e-02 -1.2477640062570572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3346 1.7718339338898659e-02</internalNodes>\n          <leafValues>\n            4.4793829321861267e-02 -1.9760879874229431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3347 -9.8835285753011703e-03</internalNodes>\n          <leafValues>\n            -1.5149329602718353e-01 6.7348048090934753e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3348 2.3850230500102043e-02</internalNodes>\n          <leafValues>\n            -3.3219821751117706e-02 1.6131630539894104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3349 -3.9590701460838318e-02</internalNodes>\n          <leafValues>\n            3.9903929829597473e-01 -2.8885990381240845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3350 3.4961920231580734e-02</internalNodes>\n          <leafValues>\n            2.2103229537606239e-02 -5.2885407209396362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3351 9.4825841486454010e-02</internalNodes>\n          <leafValues>\n            9.5985615625977516e-03 -8.2035672664642334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3352 -1.0215540230274200e-01</internalNodes>\n          <leafValues>\n            -2.0551559329032898e-01 3.0388559680432081e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3353 -9.3128867447376251e-03</internalNodes>\n          <leafValues>\n            3.6827068775892258e-02 -2.4656419456005096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3354 -5.4135788232088089e-03</internalNodes>\n          <leafValues>\n            -2.3878090083599091e-01 4.1015189141035080e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3355 -2.6281980797648430e-02</internalNodes>\n          <leafValues>\n            2.7853861451148987e-01 -3.6868080496788025e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3356 -9.9223516881465912e-03</internalNodes>\n          <leafValues>\n            -2.5322121381759644e-01 3.3522550016641617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3357 -1.7109709978103638e-01</internalNodes>\n          <leafValues>\n            -2.9404911398887634e-01 3.2432679086923599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3358 -8.7599586695432663e-03</internalNodes>\n          <leafValues>\n            6.8787500262260437e-02 -1.0647170245647430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3359 1.2942530214786530e-01</internalNodes>\n          <leafValues>\n            1.3241300359368324e-02 -6.8923670053482056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3360 -4.7723919153213501e-02</internalNodes>\n          <leafValues>\n            2.2214810550212860e-01 -2.8517080470919609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3361 1.0812310129404068e-01</internalNodes>\n          <leafValues>\n            1.1902020312845707e-02 -7.7915120124816895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3362 -2.7494689449667931e-02</internalNodes>\n          <leafValues>\n            -3.0192640423774719e-01 2.8540210798382759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3363 -4.9534138292074203e-02</internalNodes>\n          <leafValues>\n            -3.0015140771865845e-01 3.1750950962305069e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3364 -1.0358350351452827e-02</internalNodes>\n          <leafValues>\n            1.2287119776010513e-01 -3.9123039692640305e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3365 -3.2705869525671005e-02</internalNodes>\n          <leafValues>\n            -3.3354911208152771e-01 2.7965290471911430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3366 -1.3580479659140110e-02</internalNodes>\n          <leafValues>\n            1.1192899942398071e-01 -4.9471028149127960e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3367 5.5075851269066334e-03</internalNodes>\n          <leafValues>\n            -1.3118129968643188e-01 6.9403477013111115e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3368 7.5508110225200653e-02</internalNodes>\n          <leafValues>\n            -2.9019629582762718e-02 3.9413800835609436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3369 5.6811410933732986e-02</internalNodes>\n          <leafValues>\n            2.6788659393787384e-02 -4.1989549994468689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3370 5.0004580989480019e-03</internalNodes>\n          <leafValues>\n            4.6239160001277924e-02 -6.7620649933815002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3371 1.9717490300536156e-02</internalNodes>\n          <leafValues>\n            -6.0402508825063705e-02 1.6632139682769775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3372 -6.4729452133178711e-02</internalNodes>\n          <leafValues>\n            -5.2484118938446045e-01 2.7922600507736206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3373 -3.0683130025863647e-02</internalNodes>\n          <leafValues>\n            2.1945460140705109e-01 -4.8111628741025925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3374 8.1467535346746445e-03</internalNodes>\n          <leafValues>\n            6.0279220342636108e-02 -1.1600890010595322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3375 7.9492190852761269e-03</internalNodes>\n          <leafValues>\n            8.3563491702079773e-02 -1.6053000092506409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3376 -2.2406199946999550e-02</internalNodes>\n          <leafValues>\n            2.8271418809890747e-01 -2.8184479102492332e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3377 8.2993790507316589e-02</internalNodes>\n          <leafValues>\n            1.0475059971213341e-02 -9.6875292062759399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3378 -7.0176632143557072e-03</internalNodes>\n          <leafValues>\n            -1.3753229379653931e-01 6.8205498158931732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3379 -9.7560193389654160e-03</internalNodes>\n          <leafValues>\n            -1.3707080483436584e-01 7.2890587151050568e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3380 -5.2217379212379456e-02</internalNodes>\n          <leafValues>\n            -6.4300441741943359e-01 1.4492220245301723e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3381 -7.8029942233115435e-04</internalNodes>\n          <leafValues>\n            -2.6479271054267883e-01 3.3517841249704361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3382 3.7919931113719940e-02</internalNodes>\n          <leafValues>\n            -8.4846787154674530e-02 1.1260589957237244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3383 3.0561289750039577e-03</internalNodes>\n          <leafValues>\n            4.8086941242218018e-02 -1.9009250402450562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3384 6.5862268209457397e-02</internalNodes>\n          <leafValues>\n            -5.2452040836215019e-03 9.1280621290206909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3385 1.5568210184574127e-01</internalNodes>\n          <leafValues>\n            2.0884050056338310e-02 -4.9580439925193787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3386 -1.9058469915762544e-03</internalNodes>\n          <leafValues>\n            1.8305900692939758e-01 -4.9756310880184174e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3387 -9.8356999456882477e-02</internalNodes>\n          <leafValues>\n            4.8020449280738831e-01 -2.0384309813380241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3388 4.2754490859806538e-03</internalNodes>\n          <leafValues>\n            4.0095929056406021e-02 -1.4071129262447357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3389 -1.4033010229468346e-02</internalNodes>\n          <leafValues>\n            -2.0791560411453247e-01 5.2576299756765366e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3390 8.0179408192634583e-02</internalNodes>\n          <leafValues>\n            -2.5790559127926826e-02 3.7651219964027405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3391 1.8175759911537170e-01</internalNodes>\n          <leafValues>\n            1.1428649537265301e-02 -8.3382111787796021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3392 -1.9141690805554390e-02</internalNodes>\n          <leafValues>\n            -5.0522857904434204e-01 1.2605519965291023e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3393 -5.1260828971862793e-02</internalNodes>\n          <leafValues>\n            5.8292531967163086e-01 -1.6109749674797058e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3394 6.4478136599063873e-02</internalNodes>\n          <leafValues>\n            1.0237329639494419e-02 -6.0302352905273438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3395 3.1238300725817680e-02</internalNodes>\n          <leafValues>\n            2.0845850929617882e-02 -3.9785829186439514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3396 -5.0772321410477161e-03</internalNodes>\n          <leafValues>\n            1.2331540137529373e-01 -3.5224981606006622e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3397 -1.9385579507797956e-03</internalNodes>\n          <leafValues>\n            1.5726689994335175e-01 -7.3316320776939392e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3398 2.4099789559841156e-02</internalNodes>\n          <leafValues>\n            -1.1178609728813171e-01 1.0738980025053024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3399 -8.8700000196695328e-03</internalNodes>\n          <leafValues>\n            -3.6048200726509094e-01 2.7034249156713486e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3400 -3.7424121052026749e-02</internalNodes>\n          <leafValues>\n            -3.5229408740997314e-01 1.6786530613899231e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3401 -2.0067069679498672e-02</internalNodes>\n          <leafValues>\n            -2.7460938692092896e-01 3.9532590657472610e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3402 6.5169870853424072e-02</internalNodes>\n          <leafValues>\n            1.1402159929275513e-02 -2.4819959700107574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3403 3.8157470524311066e-02</internalNodes>\n          <leafValues>\n            4.6323310583829880e-02 -2.0989510416984558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3404 1.1075180023908615e-02</internalNodes>\n          <leafValues>\n            3.4411158412694931e-02 -5.1256500184535980e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3405 1.1583480238914490e-01</internalNodes>\n          <leafValues>\n            4.2282830923795700e-02 -2.1705499291419983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3406 -4.6720780432224274e-02</internalNodes>\n          <leafValues>\n            2.3093520104885101e-01 -8.3234477788209915e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3407 1.2567450106143951e-01</internalNodes>\n          <leafValues>\n            -4.9882501363754272e-02 2.1018449962139130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3408 1.8088010256178677e-04</internalNodes>\n          <leafValues>\n            -1.1836589872837067e-01 8.4278896450996399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3409 1.0470690205693245e-02</internalNodes>\n          <leafValues>\n            -8.6210608482360840e-02 1.1760850250720978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3410 5.8065719902515411e-02</internalNodes>\n          <leafValues>\n            1.5582700259983540e-02 -7.4217921495437622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3411 2.2783069871366024e-03</internalNodes>\n          <leafValues>\n            -1.9151380658149719e-01 4.7990638762712479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3412 -6.9596558809280396e-02</internalNodes>\n          <leafValues>\n            -7.3241692781448364e-01 1.1130559723824263e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3413 5.8907870203256607e-02</internalNodes>\n          <leafValues>\n            1.6878390684723854e-02 -5.4400408267974854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3414 -8.0658823251724243e-02</internalNodes>\n          <leafValues>\n            2.9922959208488464e-01 -1.8570570275187492e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3415 1.7686929553747177e-02</internalNodes>\n          <leafValues>\n            4.2936161160469055e-02 -2.2591550648212433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3416 -1.6319070011377335e-02</internalNodes>\n          <leafValues>\n            1.8889640271663666e-01 -4.7047398984432220e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3417 -3.9527568966150284e-02</internalNodes>\n          <leafValues>\n            -3.2657331228256226e-01 2.8762219473719597e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3418 1.9769819919019938e-03</internalNodes>\n          <leafValues>\n            -8.8217496871948242e-02 5.7402729988098145e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3419 -3.0272029340267181e-02</internalNodes>\n          <leafValues>\n            -5.1177912950515747e-01 1.7359249293804169e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3420 5.3786419332027435e-02</internalNodes>\n          <leafValues>\n            1.2071570381522179e-02 -4.0201959013938904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3421 -9.4136483967304230e-03</internalNodes>\n          <leafValues>\n            2.4728150665760040e-01 -3.6734741181135178e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3422 -5.9014528989791870e-02</internalNodes>\n          <leafValues>\n            -1.3277289271354675e-01 1.5220739878714085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3423 8.9417606592178345e-02</internalNodes>\n          <leafValues>\n            -2.5917148590087891e-01 3.7563629448413849e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3424 -8.7996140122413635e-02</internalNodes>\n          <leafValues>\n            4.9200880527496338e-01 -2.1210839971899986e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3425 -5.0747569650411606e-02</internalNodes>\n          <leafValues>\n            -4.8567768931388855e-01 2.0005319267511368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3426 -3.8918260484933853e-02</internalNodes>\n          <leafValues>\n            -8.9558547735214233e-01 7.8960238024592400e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3427 2.0968139171600342e-02</internalNodes>\n          <leafValues>\n            -5.4431710392236710e-02 1.6123360395431519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3428 -3.2103069126605988e-02</internalNodes>\n          <leafValues>\n            -3.6822700500488281e-01 1.9163349643349648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3429 5.5592609569430351e-03</internalNodes>\n          <leafValues>\n            7.8368440270423889e-02 -1.1842489987611771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3430 5.9554249048233032e-02</internalNodes>\n          <leafValues>\n            -5.2290938794612885e-02 3.6194879561662674e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3431 -1.0973160155117512e-02</internalNodes>\n          <leafValues>\n            1.5855990350246429e-01 -5.5804491043090820e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3432 -1.1934650130569935e-02</internalNodes>\n          <leafValues>\n            -2.5717508792877197e-01 3.2829850912094116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3433 6.0441631823778152e-02</internalNodes>\n          <leafValues>\n            -3.8720801472663879e-02 2.2971870005130768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3434 -8.2118069985881448e-04</internalNodes>\n          <leafValues>\n            6.9738790392875671e-02 -1.5992000699043274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3435 2.0469389855861664e-02</internalNodes>\n          <leafValues>\n            -8.4349267184734344e-02 1.0139500349760056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3436 -7.6305761933326721e-02</internalNodes>\n          <leafValues>\n            8.3174228668212891e-01 -5.0806580111384392e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3437 6.0551889240741730e-02</internalNodes>\n          <leafValues>\n            -3.7971161305904388e-02 2.1850149333477020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3438 -4.1085779666900635e-03</internalNodes>\n          <leafValues>\n            -1.1496649682521820e-01 3.6647479981184006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3439 1.2399969622492790e-02</internalNodes>\n          <leafValues>\n            6.2838301062583923e-02 -1.4144660532474518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3440 -7.1455702185630798e-02</internalNodes>\n          <leafValues>\n            -4.2673790454864502e-01 1.3947109691798687e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3441 3.3709030598402023e-02</internalNodes>\n          <leafValues>\n            -1.2713599950075150e-02 7.4775099754333496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3442 3.4742768853902817e-02</internalNodes>\n          <leafValues>\n            2.0969500765204430e-02 -1.4630280435085297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3443 -4.3705299496650696e-02</internalNodes>\n          <leafValues>\n            1.8064750730991364e-01 -5.2335180342197418e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3444 8.4926873445510864e-02</internalNodes>\n          <leafValues>\n            6.9014527834951878e-03 -2.6073959469795227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3445 -1.7119079828262329e-02</internalNodes>\n          <leafValues>\n            -1.4590080082416534e-01 6.7484676837921143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3446 3.3630719780921936e-01</internalNodes>\n          <leafValues>\n            7.8989071771502495e-03 -8.3852928876876831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3447 1.2371230125427246e-01</internalNodes>\n          <leafValues>\n            -2.5482710450887680e-02 3.9098039269447327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3448 -1.1195900291204453e-01</internalNodes>\n          <leafValues>\n            -3.8317111134529114e-01 6.0780011117458344e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3449 -1.0881890356540680e-01</internalNodes>\n          <leafValues>\n            -7.1362990140914917e-01 1.2700069695711136e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>268</maxWeakCount>\n      <stageThreshold>-1.3290590047836304e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 3450 9.6844611689448357e-03</internalNodes>\n          <leafValues>\n            -1.9455039501190186e-01 2.0048019289970398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3451 -6.6196201369166374e-03</internalNodes>\n          <leafValues>\n            9.2211641371250153e-02 -3.4824401140213013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3452 5.6163137778639793e-03</internalNodes>\n          <leafValues>\n            6.6767610609531403e-02 -4.1172260046005249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3453 -1.6882510390132666e-03</internalNodes>\n          <leafValues>\n            7.2629712522029877e-02 -2.0694479346275330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3454 -2.9599820263683796e-03</internalNodes>\n          <leafValues>\n            -2.0635899901390076e-01 7.7335417270660400e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3455 1.7798959743231535e-03</internalNodes>\n          <leafValues>\n            -3.2149469852447510e-01 6.4107127487659454e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3456 -4.0264189010486007e-04</internalNodes>\n          <leafValues>\n            7.9512253403663635e-02 -2.4051089584827423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3457 -5.0024548545479774e-04</internalNodes>\n          <leafValues>\n            8.6675606667995453e-02 -2.0504170656204224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3458 -2.0284270867705345e-03</internalNodes>\n          <leafValues>\n            1.4322499930858612e-01 -1.2220569700002670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3459 6.0648359358310699e-03</internalNodes>\n          <leafValues>\n            3.7860579788684845e-02 -2.4375459551811218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3460 9.6257496625185013e-03</internalNodes>\n          <leafValues>\n            5.7141840457916260e-02 -2.8827920556068420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3461 2.5888499803841114e-03</internalNodes>\n          <leafValues>\n            -1.8906019628047943e-01 8.6430206894874573e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3462 2.9090950265526772e-03</internalNodes>\n          <leafValues>\n            -8.3108469843864441e-02 1.7618839442729950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3463 2.2233440540730953e-03</internalNodes>\n          <leafValues>\n            2.0150169730186462e-02 -2.4882750213146210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3464 -9.8997671157121658e-03</internalNodes>\n          <leafValues>\n            -2.0639769732952118e-01 6.0985010117292404e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3465 1.9689390435814857e-02</internalNodes>\n          <leafValues>\n            -3.4452438354492188e-02 2.0069779455661774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3466 2.1106770262122154e-02</internalNodes>\n          <leafValues>\n            4.3886858969926834e-02 -2.6610890030860901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3467 -7.2028310969471931e-03</internalNodes>\n          <leafValues>\n            1.7015519738197327e-01 -5.4639339447021484e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3468 4.0647671557962894e-03</internalNodes>\n          <leafValues>\n            5.2182808518409729e-02 -2.1304030716419220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3469 -2.8419198933988810e-03</internalNodes>\n          <leafValues>\n            5.3180210292339325e-02 -1.7669560015201569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3470 -4.9461819231510162e-02</internalNodes>\n          <leafValues>\n            3.7221330404281616e-01 -3.3969849348068237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3471 4.3024159967899323e-02</internalNodes>\n          <leafValues>\n            3.1251549720764160e-02 -3.1831890344619751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3472 -7.0111698005348444e-04</internalNodes>\n          <leafValues>\n            -2.0340210199356079e-01 5.8964170515537262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3473 5.7489587925374508e-04</internalNodes>\n          <leafValues>\n            -9.4937190413475037e-02 1.0538189858198166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3474 -1.4911209291312844e-04</internalNodes>\n          <leafValues>\n            6.8423688411712646e-02 -1.8207779526710510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3475 8.7993890047073364e-03</internalNodes>\n          <leafValues>\n            3.3866070210933685e-02 -1.1625579744577408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3476 -8.7150773033499718e-03</internalNodes>\n          <leafValues>\n            1.8041290342807770e-01 -6.5721526741981506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3477 -1.3727629557251930e-02</internalNodes>\n          <leafValues>\n            -1.3337810337543488e-01 3.5966601222753525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3478 -2.3620850406587124e-03</internalNodes>\n          <leafValues>\n            -1.9088070094585419e-01 6.1849810183048248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3479 1.7863539978861809e-03</internalNodes>\n          <leafValues>\n            -8.3071537315845490e-02 9.8926126956939697e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3480 -9.4514712691307068e-03</internalNodes>\n          <leafValues>\n            -1.8024919927120209e-01 6.0146760195493698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3481 4.8195280134677887e-02</internalNodes>\n          <leafValues>\n            -2.6617299765348434e-02 3.0134469270706177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3482 -1.2248229468241334e-03</internalNodes>\n          <leafValues>\n            -2.3560139536857605e-01 4.5572910457849503e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3483 -4.2851101607084274e-02</internalNodes>\n          <leafValues>\n            1.6086329519748688e-01 -2.3455940186977386e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3484 3.4798709675669670e-03</internalNodes>\n          <leafValues>\n            7.6882630586624146e-02 -1.3299170136451721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3485 -3.9859190583229065e-03</internalNodes>\n          <leafValues>\n            4.3115191161632538e-02 -2.3132759332656860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3486 4.3139848858118057e-02</internalNodes>\n          <leafValues>\n            -3.6780070513486862e-02 2.3883450031280518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3487 -1.7436629161238670e-02</internalNodes>\n          <leafValues>\n            -1.4046260714530945e-01 5.9077050536870956e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3488 -7.5254887342453003e-02</internalNodes>\n          <leafValues>\n            3.6328521370887756e-01 -3.1380280852317810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3489 6.0125540941953659e-02</internalNodes>\n          <leafValues>\n            8.2496693357825279e-03 -2.3485200107097626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3490 1.2755369534716010e-03</internalNodes>\n          <leafValues>\n            -1.2268169969320297e-01 9.0071536600589752e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3491 -1.3465109514072537e-03</internalNodes>\n          <leafValues>\n            -1.4554239809513092e-01 7.0761166512966156e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3492 2.3758469149470329e-02</internalNodes>\n          <leafValues>\n            -5.1834989339113235e-02 1.7583900690078735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3493 2.2376580163836479e-03</internalNodes>\n          <leafValues>\n            9.1763339936733246e-02 -1.1206050217151642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3494 3.8662939332425594e-03</internalNodes>\n          <leafValues>\n            6.2390189617872238e-02 -1.5142339468002319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3495 7.6868042349815369e-02</internalNodes>\n          <leafValues>\n            -2.7640199288725853e-02 3.7636131048202515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3496 1.6617199406027794e-02</internalNodes>\n          <leafValues>\n            3.3067818731069565e-02 -3.0950650572776794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3497 -4.6145029366016388e-02</internalNodes>\n          <leafValues>\n            1.0798139870166779e-01 -5.8277439326047897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3498 9.8206609487533569e-02</internalNodes>\n          <leafValues>\n            1.7502160742878914e-02 -5.0861918926239014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3499 4.7838049940764904e-03</internalNodes>\n          <leafValues>\n            -1.0207810252904892e-01 5.7796850800514221e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3500 2.0467689260840416e-02</internalNodes>\n          <leafValues>\n            -2.0362010225653648e-02 4.5001450181007385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3501 1.5141700394451618e-02</internalNodes>\n          <leafValues>\n            2.8140379115939140e-02 -8.5130028426647186e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3502 5.2229189313948154e-03</internalNodes>\n          <leafValues>\n            -5.7789258658885956e-02 1.5580329298973083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3503 1.8871299922466278e-02</internalNodes>\n          <leafValues>\n            2.7053799480199814e-02 -1.2046360224485397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3504 4.5608580112457275e-03</internalNodes>\n          <leafValues>\n            -7.9567588865756989e-02 1.1571010202169418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3505 -1.2172549962997437e-02</internalNodes>\n          <leafValues>\n            -1.6149179637432098e-01 2.4571539834141731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3506 -1.6468809545040131e-01</internalNodes>\n          <leafValues>\n            -6.5712791681289673e-01 1.2428689748048782e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3507 1.8241419456899166e-03</internalNodes>\n          <leafValues>\n            -9.1526739299297333e-02 8.7851390242576599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3508 -5.4591207299381495e-04</internalNodes>\n          <leafValues>\n            -1.2581209838390350e-01 6.6968381404876709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3509 2.1177160087972879e-03</internalNodes>\n          <leafValues>\n            1.4261330664157867e-01 -6.1729468405246735e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3510 1.1853260220959783e-03</internalNodes>\n          <leafValues>\n            -9.1425627470016479e-02 9.2089362442493439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3511 7.9899299889802933e-03</internalNodes>\n          <leafValues>\n            -6.3119217753410339e-02 1.5446299314498901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3512 4.5044990256428719e-03</internalNodes>\n          <leafValues>\n            4.0920298546552658e-02 -2.2475910186767578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3513 7.4563547968864441e-03</internalNodes>\n          <leafValues>\n            -3.9540700614452362e-02 2.4208679795265198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3514 6.3897971995174885e-03</internalNodes>\n          <leafValues>\n            5.2900739014148712e-02 -1.7378969490528107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3515 -5.9052068740129471e-02</internalNodes>\n          <leafValues>\n            -4.7957658767700195e-01 8.3919316530227661e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3516 -5.3746208548545837e-02</internalNodes>\n          <leafValues>\n            -5.0854432582855225e-01 1.6880670562386513e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3517 -9.1852366924285889e-02</internalNodes>\n          <leafValues>\n            1.9466249644756317e-01 -1.1129629798233509e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3518 1.5038819611072540e-01</internalNodes>\n          <leafValues>\n            -2.0112350583076477e-02 4.4738510251045227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3519 -2.1317429840564728e-02</internalNodes>\n          <leafValues>\n            2.9676139354705811e-01 -2.8231840580701828e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3520 1.2711419723927975e-02</internalNodes>\n          <leafValues>\n            3.3570941537618637e-02 -2.8972589969635010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3521 -9.3287907540798187e-02</internalNodes>\n          <leafValues>\n            6.4380300045013428e-01 -1.4923879876732826e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3522 -4.5716729946434498e-03</internalNodes>\n          <leafValues>\n            -2.6994249224662781e-01 3.3246111124753952e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3523 -3.4010890522040427e-04</internalNodes>\n          <leafValues>\n            8.1715546548366547e-02 -1.0642260313034058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3524 -2.6096890214830637e-03</internalNodes>\n          <leafValues>\n            1.8403419852256775e-01 -6.4724236726760864e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3525 4.6332611236721277e-04</internalNodes>\n          <leafValues>\n            -1.4283409714698792e-01 4.2033299803733826e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3526 1.4095300436019897e-01</internalNodes>\n          <leafValues>\n            9.4516919925808907e-03 -7.7727228403091431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3527 2.0406199619174004e-03</internalNodes>\n          <leafValues>\n            -6.6505432128906250e-02 1.1805409938097000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3528 -2.2302009165287018e-02</internalNodes>\n          <leafValues>\n            -1.0419870167970657e-01 8.9387677609920502e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3529 3.9168349467217922e-03</internalNodes>\n          <leafValues>\n            2.5769380852580070e-02 -1.6625499725341797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3530 6.1153857968747616e-03</internalNodes>\n          <leafValues>\n            -6.2531687319278717e-02 1.4075349271297455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3531 -2.9564529540948570e-05</internalNodes>\n          <leafValues>\n            4.6978309750556946e-02 -1.0862989723682404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3532 1.4300559996627271e-04</internalNodes>\n          <leafValues>\n            -1.0005149990320206e-01 8.0335728824138641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3533 1.1430789716541767e-02</internalNodes>\n          <leafValues>\n            2.3201359435915947e-02 -3.1366908550262451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3534 -1.3724610209465027e-02</internalNodes>\n          <leafValues>\n            1.2814410030841827e-01 -6.1290029436349869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3535 -4.5548770576715469e-02</internalNodes>\n          <leafValues>\n            -4.7528308629989624e-01 1.3631340116262436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3536 7.6914107194170356e-04</internalNodes>\n          <leafValues>\n            -8.9416027069091797e-02 9.6091486513614655e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3537 6.3840910792350769e-02</internalNodes>\n          <leafValues>\n            1.6064060851931572e-02 -3.8221898674964905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3538 -7.2662779130041599e-03</internalNodes>\n          <leafValues>\n            -2.1940490603446960e-01 3.8170509040355682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3539 -1.2828599661588669e-02</internalNodes>\n          <leafValues>\n            1.4705429971218109e-01 -5.5832669138908386e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3540 -9.1467969119548798e-02</internalNodes>\n          <leafValues>\n            -7.9265332221984863e-01 1.0404639877378941e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3541 -2.7164160273969173e-03</internalNodes>\n          <leafValues>\n            -1.7725169658660889e-01 5.6455809623003006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3542 -1.0097579658031464e-01</internalNodes>\n          <leafValues>\n            -5.9372657537460327e-01 1.3162240386009216e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3543 -3.7983559072017670e-02</internalNodes>\n          <leafValues>\n            -1.5072999894618988e-01 1.9557390362024307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3544 5.3728191414847970e-04</internalNodes>\n          <leafValues>\n            5.2257049828767776e-02 -1.7996260523796082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3545 1.2443910352885723e-02</internalNodes>\n          <leafValues>\n            -2.8953019529581070e-02 2.5448489189147949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3546 -1.8171280622482300e-02</internalNodes>\n          <leafValues>\n            3.2203981280326843e-01 -3.1395100057125092e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3547 -3.0619159340858459e-02</internalNodes>\n          <leafValues>\n            -1.2817279994487762e-01 6.0485020279884338e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3548 2.8726200107485056e-03</internalNodes>\n          <leafValues>\n            -1.4807400107383728e-01 5.3796000778675079e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3549 -2.8772678971290588e-01</internalNodes>\n          <leafValues>\n            -8.3234447240829468e-01 3.6127590574324131e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3550 4.1057071089744568e-01</internalNodes>\n          <leafValues>\n            8.3212452009320259e-03 -8.2476407289505005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3551 1.6370510682463646e-02</internalNodes>\n          <leafValues>\n            -2.4849100038409233e-02 1.6309140622615814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3552 5.3615570068359375e-02</internalNodes>\n          <leafValues>\n            1.8034080043435097e-02 -4.6126970648765564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3553 -1.0296109830960631e-03</internalNodes>\n          <leafValues>\n            3.8824349641799927e-02 -7.3625981807708740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3554 -6.3063339330255985e-03</internalNodes>\n          <leafValues>\n            1.3288870453834534e-01 -5.5812060832977295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3555 6.8714357912540436e-03</internalNodes>\n          <leafValues>\n            6.9562442600727081e-02 -1.1383140087127686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3556 -8.3098851609975100e-04</internalNodes>\n          <leafValues>\n            1.0002700239419937e-01 -8.5704028606414795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3557 1.3288210146129131e-02</internalNodes>\n          <leafValues>\n            4.2606260627508163e-02 -1.1729510128498077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3558 1.7035039141774178e-02</internalNodes>\n          <leafValues>\n            -4.2757850140333176e-02 2.2400109469890594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3559 3.2128300517797470e-02</internalNodes>\n          <leafValues>\n            1.5296909958124161e-02 -5.3317558765411377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3560 1.1440330184996128e-02</internalNodes>\n          <leafValues>\n            -5.8955609798431396e-02 1.2842489778995514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3561 2.5446009822189808e-03</internalNodes>\n          <leafValues>\n            4.6037770807743073e-02 -1.4760190248489380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3562 -3.5062368959188461e-02</internalNodes>\n          <leafValues>\n            -3.4721338748931885e-01 2.4020459502935410e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3563 4.6889069490134716e-03</internalNodes>\n          <leafValues>\n            -8.2460209727287292e-02 7.6254382729530334e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3564 -1.5067459571582731e-05</internalNodes>\n          <leafValues>\n            5.8223988860845566e-02 -1.3496190309524536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3565 -6.5259548136964440e-04</internalNodes>\n          <leafValues>\n            3.6780450493097305e-02 -7.0881396532058716e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3566 4.5456850784830749e-04</internalNodes>\n          <leafValues>\n            5.9895541518926620e-02 -1.4553959667682648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3567 -1.0570470243692398e-01</internalNodes>\n          <leafValues>\n            1.3766160607337952e-01 -2.2337099537253380e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3568 -4.6019242145121098e-03</internalNodes>\n          <leafValues>\n            -3.3811721205711365e-01 2.2578509524464607e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3569 5.5374279618263245e-03</internalNodes>\n          <leafValues>\n            -4.1250869631767273e-02 9.4750680029392242e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3570 -2.7569069061428308e-03</internalNodes>\n          <leafValues>\n            1.7380860447883606e-01 -4.5417640358209610e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3571 4.1876680916175246e-04</internalNodes>\n          <leafValues>\n            -5.5233258754014969e-02 5.8342628180980682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3572 -2.4587850202806294e-04</internalNodes>\n          <leafValues>\n            -8.9373029768466949e-02 8.1158749759197235e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3573 -7.4991412460803986e-02</internalNodes>\n          <leafValues>\n            -5.9057062864303589e-01 6.7846179008483887e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3574 1.7898950027301908e-03</internalNodes>\n          <leafValues>\n            5.2262220531702042e-02 -1.5884269773960114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3575 -3.2704160548746586e-03</internalNodes>\n          <leafValues>\n            1.1216899752616882e-01 -6.2488421797752380e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3576 -1.7803650349378586e-02</internalNodes>\n          <leafValues>\n            -4.5739078521728516e-01 1.6650289297103882e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3577 -3.3537930250167847e-01</internalNodes>\n          <leafValues>\n            -8.2564651966094971e-01 7.1495971642434597e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3578 1.1451829969882965e-01</internalNodes>\n          <leafValues>\n            -1.8937719985842705e-02 4.1076439619064331e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3579 6.5141052007675171e-02</internalNodes>\n          <leafValues>\n            1.1196400038897991e-02 -7.6225310564041138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3580 -1.8442489206790924e-02</internalNodes>\n          <leafValues>\n            1.4006440341472626e-01 -5.1568318158388138e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3581 2.0362680777907372e-02</internalNodes>\n          <leafValues>\n            2.7635680511593819e-02 -2.2622610628604889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3582 -5.4255980066955090e-03</internalNodes>\n          <leafValues>\n            -1.4688220620155334e-01 5.1294069737195969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3583 -1.4608480036258698e-02</internalNodes>\n          <leafValues>\n            2.8014749288558960e-01 -3.2668899744749069e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3584 1.2462410377338529e-03</internalNodes>\n          <leafValues>\n            -2.0888839662075043e-01 3.3212959766387939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3585 -5.1487259566783905e-02</internalNodes>\n          <leafValues>\n            1.9872699677944183e-01 -1.0376259684562683e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3586 -1.4138059690594673e-02</internalNodes>\n          <leafValues>\n            -1.6193750500679016e-01 4.6604789793491364e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3587 -8.3356946706771851e-03</internalNodes>\n          <leafValues>\n            1.6429559886455536e-01 -4.2695630341768265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3588 9.5129031687974930e-03</internalNodes>\n          <leafValues>\n            4.4999569654464722e-02 -1.5971189737319946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3589 -7.0411129854619503e-03</internalNodes>\n          <leafValues>\n            7.0638000965118408e-01 -9.1527765616774559e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3590 -4.0637628990225494e-04</internalNodes>\n          <leafValues>\n            7.0747792720794678e-02 -1.0194250196218491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3591 4.2529408819973469e-03</internalNodes>\n          <leafValues>\n            3.1937479972839355e-02 -1.0357219725847244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3592 -1.9221140246372670e-04</internalNodes>\n          <leafValues>\n            1.0241460055112839e-01 -8.9996367692947388e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3593 -1.3621139805763960e-03</internalNodes>\n          <leafValues>\n            -1.8157319724559784e-01 2.3933520540595055e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3594 -9.3250330537557602e-03</internalNodes>\n          <leafValues>\n            1.5883359313011169e-01 -4.5317139476537704e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3595 -3.4641081094741821e-01</internalNodes>\n          <leafValues>\n            -3.5901129245758057e-01 9.8646534606814384e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3596 1.7026960849761963e-02</internalNodes>\n          <leafValues>\n            -5.9731051325798035e-02 1.2576000392436981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3597 -3.9226989611051977e-04</internalNodes>\n          <leafValues>\n            6.4828976988792419e-02 -9.2051766812801361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3598 7.0719248615205288e-03</internalNodes>\n          <leafValues>\n            3.7144500762224197e-02 -1.9167420268058777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3599 2.9001249931752682e-03</internalNodes>\n          <leafValues>\n            -6.2633208930492401e-02 5.3248930722475052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3600 -2.4164669215679169e-02</internalNodes>\n          <leafValues>\n            3.0798891186714172e-01 -2.6505900546908379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3601 -7.5509406626224518e-02</internalNodes>\n          <leafValues>\n            -6.1827278137207031e-01 7.8803002834320068e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3602 -2.6605799212120473e-04</internalNodes>\n          <leafValues>\n            6.9619670510292053e-02 -9.9268868565559387e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3603 2.3389840498566628e-03</internalNodes>\n          <leafValues>\n            4.2269691824913025e-02 -1.6290849447250366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3604 -1.2518429430201650e-03</internalNodes>\n          <leafValues>\n            9.0814828872680664e-02 -7.9618006944656372e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3605 -1.9330839859321713e-03</internalNodes>\n          <leafValues>\n            7.6956093311309814e-02 -6.5234251320362091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3606 2.3863440379500389e-02</internalNodes>\n          <leafValues>\n            -7.7985651791095734e-02 9.7926571965217590e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3607 -5.1995079964399338e-02</internalNodes>\n          <leafValues>\n            -2.0676060020923615e-01 1.2264530174434185e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3608 -9.4953901134431362e-04</internalNodes>\n          <leafValues>\n            7.2090931236743927e-02 -1.2452449649572372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3609 -9.0458765625953674e-03</internalNodes>\n          <leafValues>\n            -1.0756769776344299e-01 2.6017999276518822e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3610 3.2019101083278656e-02</internalNodes>\n          <leafValues>\n            -4.4689521193504333e-02 1.6712300479412079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3611 -7.1996808983385563e-03</internalNodes>\n          <leafValues>\n            -1.2065560370683670e-01 5.3329549729824066e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3612 9.7247883677482605e-02</internalNodes>\n          <leafValues>\n            -2.0059280097484589e-02 4.1321530938148499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3613 1.7411670414730906e-03</internalNodes>\n          <leafValues>\n            2.5265200063586235e-02 -1.1400379985570908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3614 -1.5694150328636169e-01</internalNodes>\n          <leafValues>\n            -9.6121889352798462e-01 7.4661090038716793e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3615 -2.0573820918798447e-02</internalNodes>\n          <leafValues>\n            1.3207539916038513e-01 -5.3688809275627136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3616 2.0626350305974483e-03</internalNodes>\n          <leafValues>\n            3.7869140505790710e-02 -2.0333750545978546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3617 1.2381599843502045e-01</internalNodes>\n          <leafValues>\n            2.3662589956074953e-03 -4.8794668912887573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3618 3.1255739741027355e-03</internalNodes>\n          <leafValues>\n            -6.4476020634174347e-02 1.5053239464759827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3619 1.8766360357403755e-02</internalNodes>\n          <leafValues>\n            1.2639230117201805e-02 -1.9121849536895752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3620 -8.6109619587659836e-03</internalNodes>\n          <leafValues>\n            -1.1916559934616089e-01 6.6547170281410217e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3621 1.4604110270738602e-02</internalNodes>\n          <leafValues>\n            -2.1980939432978630e-02 2.6832428574562073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3622 1.8387939780950546e-03</internalNodes>\n          <leafValues>\n            -1.1506830155849457e-01 6.0840509831905365e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3623 -5.7930707931518555e-01</internalNodes>\n          <leafValues>\n            -1. 3.7629920989274979e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3624 1.8690739572048187e-01</internalNodes>\n          <leafValues>\n            6.2871198169887066e-03 -9.2426669597625732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3625 1.8341749906539917e-02</internalNodes>\n          <leafValues>\n            1.7516769468784332e-02 -1.6519400477409363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3626 -1.4776510186493397e-02</internalNodes>\n          <leafValues>\n            2.5068140029907227e-01 -2.6199640706181526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3627 4.4032301753759384e-02</internalNodes>\n          <leafValues>\n            1.1479279957711697e-02 -6.4663171768188477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3628 3.5362939815968275e-03</internalNodes>\n          <leafValues>\n            4.8670079559087753e-02 -1.3171669840812683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3629 -4.5765978284180164e-03</internalNodes>\n          <leafValues>\n            1.2401209771633148e-01 -5.3882170468568802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3630 3.0529699288308620e-03</internalNodes>\n          <leafValues>\n            -5.2538860589265823e-02 1.2860049307346344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3631 -1.1333939619362354e-02</internalNodes>\n          <leafValues>\n            -1.6732269525527954e-01 1.2890639714896679e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3632 2.7712888550013304e-04</internalNodes>\n          <leafValues>\n            6.5776027739048004e-02 -9.4573900103569031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3633 5.4571928922086954e-04</internalNodes>\n          <leafValues>\n            -5.9766601771116257e-02 1.3265900313854218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3634 6.2958751805126667e-03</internalNodes>\n          <leafValues>\n            2.8854750096797943e-02 -2.4328909814357758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3635 1.5611880226060748e-03</internalNodes>\n          <leafValues>\n            -5.6346539407968521e-02 8.0620631575584412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3636 1.0501279681921005e-01</internalNodes>\n          <leafValues>\n            -1.4052099548280239e-02 5.5927920341491699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3637 3.6907300353050232e-02</internalNodes>\n          <leafValues>\n            1.5443010255694389e-02 -2.0881450176239014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3638 -4.0569249540567398e-02</internalNodes>\n          <leafValues>\n            1.5851789712905884e-01 -4.3176181614398956e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3639 -7.2549749165773392e-03</internalNodes>\n          <leafValues>\n            -2.6104170083999634e-01 1.7242910340428352e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3640 4.5905262231826782e-03</internalNodes>\n          <leafValues>\n            -3.8419000804424286e-02 1.7464800179004669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3641 -4.2836060747504234e-03</internalNodes>\n          <leafValues>\n            -1.2006240338087082e-01 4.1917610913515091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3642 -1.0835780203342438e-01</internalNodes>\n          <leafValues>\n            5.4927551746368408e-01 -1.2255569919943810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3643 6.4851208589971066e-03</internalNodes>\n          <leafValues>\n            4.4952411204576492e-02 -1.6583940386772156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3644 -2.3725129663944244e-02</internalNodes>\n          <leafValues>\n            5.7158672809600830e-01 -1.2361500412225723e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3645 -3.0070519074797630e-02</internalNodes>\n          <leafValues>\n            -3.0609959363937378e-01 1.1695429682731628e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3646 -7.9774633049964905e-03</internalNodes>\n          <leafValues>\n            -1.8185980618000031e-01 3.6925770342350006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3647 -1.7213199287652969e-02</internalNodes>\n          <leafValues>\n            1.2317930161952972e-01 -3.6632679402828217e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3648 -1.4119789702817798e-03</internalNodes>\n          <leafValues>\n            -5.0499087572097778e-01 1.3695210218429565e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3649 2.9909020289778709e-02</internalNodes>\n          <leafValues>\n            -2.3535439744591713e-02 1.4312979578971863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3650 -1.1660479940474033e-02</internalNodes>\n          <leafValues>\n            -1.7822280526161194e-01 4.0250599384307861e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3651 -8.9040184393525124e-03</internalNodes>\n          <leafValues>\n            3.5567161440849304e-01 -2.4783140048384666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3652 -1.1394720058888197e-03</internalNodes>\n          <leafValues>\n            -1.4268599450588226e-01 4.9102801829576492e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3653 2.9107509180903435e-03</internalNodes>\n          <leafValues>\n            -5.4471809417009354e-02 1.3025890290737152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3654 1.7640810459852219e-02</internalNodes>\n          <leafValues>\n            2.0184019580483437e-02 -4.1954588890075684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3655 5.0001900643110275e-02</internalNodes>\n          <leafValues>\n            1.1975940316915512e-02 -5.1889878511428833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3656 2.7523660100996494e-03</internalNodes>\n          <leafValues>\n            -6.0628410428762436e-02 1.1169119924306870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3657 -3.1753338873386383e-02</internalNodes>\n          <leafValues>\n            -2.2611990571022034e-01 1.5267389826476574e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3658 -1.2823809869587421e-02</internalNodes>\n          <leafValues>\n            2.3027139902114868e-01 -2.9404800385236740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3659 5.2626157412305474e-04</internalNodes>\n          <leafValues>\n            -1.5677809715270996e-01 4.9938481301069260e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3660 1.2779150158166885e-02</internalNodes>\n          <leafValues>\n            -5.8851849287748337e-02 1.2255299836397171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3661 7.7667668461799622e-02</internalNodes>\n          <leafValues>\n            4.6644411049783230e-03 -5.0614321231842041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3662 -5.2286800928413868e-03</internalNodes>\n          <leafValues>\n            -1.8939809501171112e-01 4.4714428484439850e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3663 8.4478305652737617e-03</internalNodes>\n          <leafValues>\n            3.9108898490667343e-02 -1.4809159934520721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3664 5.5970861576497555e-03</internalNodes>\n          <leafValues>\n            5.4664470255374908e-02 -1.4698089659214020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3665 1.6882989555597305e-02</internalNodes>\n          <leafValues>\n            -4.6449739485979080e-02 1.4121970534324646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3666 -6.1205658130347729e-04</internalNodes>\n          <leafValues>\n            -1.3906019926071167e-01 5.2586868405342102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3667 -3.6216019652783871e-03</internalNodes>\n          <leafValues>\n            5.3345881402492523e-02 -3.8361679762601852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3668 -1.4149090275168419e-03</internalNodes>\n          <leafValues>\n            2.0082549750804901e-01 -3.5985361784696579e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3669 2.4758750805631280e-04</internalNodes>\n          <leafValues>\n            -1.8205779790878296e-01 1.5915339812636375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3670 1.3457840681076050e-01</internalNodes>\n          <leafValues>\n            9.7890906035900116e-03 -7.2879707813262939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3671 1.1352010071277618e-02</internalNodes>\n          <leafValues>\n            -3.5553149878978729e-02 6.3222207129001617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3672 -7.9044885933399200e-03</internalNodes>\n          <leafValues>\n            9.0774089097976685e-02 -9.8796442151069641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3673 7.9050168395042419e-02</internalNodes>\n          <leafValues>\n            4.7087217681109905e-03 -6.0529369115829468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3674 8.9114397997036576e-04</internalNodes>\n          <leafValues>\n            -9.0216107666492462e-02 8.4293842315673828e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3675 4.1404040530323982e-03</internalNodes>\n          <leafValues>\n            6.0314171016216278e-02 -1.2171939760446548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3676 -9.2683091759681702e-02</internalNodes>\n          <leafValues>\n            6.7853301763534546e-01 -1.0615170001983643e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3677 4.2872380465269089e-02</internalNodes>\n          <leafValues>\n            7.3283850215375423e-03 -5.2321487665176392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3678 -3.0652560293674469e-02</internalNodes>\n          <leafValues>\n            -6.5578341484069824e-01 9.7402445971965790e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3679 7.5054399669170380e-02</internalNodes>\n          <leafValues>\n            -1.1660519987344742e-02 3.7559139728546143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3680 9.3033112585544586e-02</internalNodes>\n          <leafValues>\n            7.4912221170961857e-03 -8.1748551130294800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3681 -4.0522208437323570e-03</internalNodes>\n          <leafValues>\n            3.6431130766868591e-01 -1.8015889450907707e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3682 1.0411429684609175e-03</internalNodes>\n          <leafValues>\n            -1.9623729586601257e-01 3.4336969256401062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3683 4.0790800005197525e-02</internalNodes>\n          <leafValues>\n            1.7464859411120415e-02 -3.8497269153594971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3684 -1.8009789346251637e-04</internalNodes>\n          <leafValues>\n            5.2157621830701828e-02 -1.2038189917802811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3685 -3.5496380180120468e-02</internalNodes>\n          <leafValues>\n            2.1371629834175110e-01 -9.4601595774292946e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3686 -1.2321450049057603e-03</internalNodes>\n          <leafValues>\n            -1.2999939918518066e-01 4.8752531409263611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3687 -6.6326446831226349e-02</internalNodes>\n          <leafValues>\n            -5.0795209407806396e-01 5.8305650018155575e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3688 -2.7689670678228140e-03</internalNodes>\n          <leafValues>\n            1.2596920132637024e-01 -5.5794779211282730e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3689 3.9610429666936398e-03</internalNodes>\n          <leafValues>\n            -8.4471739828586578e-02 6.2092550098896027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3690 -7.5474479235708714e-03</internalNodes>\n          <leafValues>\n            -2.0992270112037659e-01 3.1419910490512848e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3691 -3.2456999178975821e-03</internalNodes>\n          <leafValues>\n            5.6223601102828979e-02 -3.6774989217519760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3692 -5.0519341602921486e-03</internalNodes>\n          <leafValues>\n            9.4136670231819153e-02 -8.0893777310848236e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3693 2.1375959739089012e-02</internalNodes>\n          <leafValues>\n            4.9529589712619781e-02 -4.7989148646593094e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3694 -1.6724619269371033e-01</internalNodes>\n          <leafValues>\n            -9.3551367521286011e-01 7.4155409820377827e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3695 6.4946119673550129e-03</internalNodes>\n          <leafValues>\n            -3.6735821515321732e-02 1.0955040156841278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3696 -5.5810972116887569e-03</internalNodes>\n          <leafValues>\n            -1.2764470279216766e-01 5.8691799640655518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3697 -7.0414197398349643e-04</internalNodes>\n          <leafValues>\n            3.9361558854579926e-02 -7.4844732880592346e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3698 -7.3160971514880657e-03</internalNodes>\n          <leafValues>\n            2.1767179667949677e-01 -3.8703199476003647e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3699 -5.4676099680364132e-03</internalNodes>\n          <leafValues>\n            -5.3973350673913956e-02 5.5032800883054733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3700 4.3309312313795090e-03</internalNodes>\n          <leafValues>\n            5.7104710489511490e-02 -1.2603929638862610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3701 2.8189779259264469e-03</internalNodes>\n          <leafValues>\n            -3.9729248732328415e-02 9.2701591551303864e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3702 -4.7759278677403927e-03</internalNodes>\n          <leafValues>\n            -1.2856410443782806e-01 6.1216689646244049e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3703 6.3424631953239441e-02</internalNodes>\n          <leafValues>\n            -4.8541268333792686e-03 5.9883451461791992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3704 -3.5035109613090754e-03</internalNodes>\n          <leafValues>\n            1.0191550105810165e-01 -9.8801277577877045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3705 -4.1303951293230057e-03</internalNodes>\n          <leafValues>\n            1.0890380293130875e-01 -3.8225919008255005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3706 -2.2271529305726290e-03</internalNodes>\n          <leafValues>\n            -1.3501960039138794e-01 5.1316611468791962e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3707 -1.0730850044637918e-03</internalNodes>\n          <leafValues>\n            5.1526721566915512e-02 -7.4171036481857300e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3708 -7.7973678708076477e-04</internalNodes>\n          <leafValues>\n            7.0857577025890350e-02 -1.1204849928617477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3709 -5.5701348930597305e-02</internalNodes>\n          <leafValues>\n            3.9836230874061584e-01 -5.2183559164404869e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3710 1.0608229786157608e-02</internalNodes>\n          <leafValues>\n            -3.2323788851499557e-02 2.1950970590114594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3711 -9.8208207637071609e-03</internalNodes>\n          <leafValues>\n            -1.6507670283317566e-01 4.2444411665201187e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3712 1.4465330168604851e-03</internalNodes>\n          <leafValues>\n            -7.8392669558525085e-02 8.1393733620643616e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3713 -4.4582188129425049e-03</internalNodes>\n          <leafValues>\n            -9.2314578592777252e-02 3.8734171539545059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3714 5.6474958546459675e-03</internalNodes>\n          <leafValues>\n            3.9651289582252502e-02 -1.7495639622211456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3715 4.2097918689250946e-02</internalNodes>\n          <leafValues>\n            -1.1850739829242229e-02 1.2762710452079773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3716 6.9958101958036423e-03</internalNodes>\n          <leafValues>\n            -4.7668740153312683e-02 1.4204859733581543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3717 3.8686778396368027e-02</internalNodes>\n          <leafValues>\n            1.3582780025899410e-02 -4.7315898537635803e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>238</maxWeakCount>\n      <stageThreshold>-1.4597640037536621e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 3718 3.5009320825338364e-02</internalNodes>\n          <leafValues>\n            -2.7020230889320374e-01 2.0429250597953796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3719 -3.6780539900064468e-02</internalNodes>\n          <leafValues>\n            1.5254889428615570e-01 -2.6741871237754822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3720 5.6993318721652031e-03</internalNodes>\n          <leafValues>\n            1.6803050041198730e-01 -2.3068240284919739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3721 7.5601637363433838e-02</internalNodes>\n          <leafValues>\n            -1.5271709859371185e-01 1.9510839879512787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3722 -1.7248390242457390e-02</internalNodes>\n          <leafValues>\n            2.9379200935363770e-01 -9.8869532346725464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3723 2.8574180323630571e-03</internalNodes>\n          <leafValues>\n            -1.9790470600128174e-01 8.3361737430095673e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3724 3.1029269099235535e-02</internalNodes>\n          <leafValues>\n            -2.1582309901714325e-01 1.1695130169391632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3725 -7.1099428460001945e-03</internalNodes>\n          <leafValues>\n            -2.5206819176673889e-01 3.6116510629653931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3726 4.5894421637058258e-03</internalNodes>\n          <leafValues>\n            -2.9707619547843933e-01 1.0743969678878784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3727 -7.0509258657693863e-03</internalNodes>\n          <leafValues>\n            -4.5635029673576355e-01 4.1864778846502304e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3728 6.6762260394170880e-04</internalNodes>\n          <leafValues>\n            -1.7432719469070435e-01 1.2306489795446396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3729 -3.6481819115579128e-03</internalNodes>\n          <leafValues>\n            -4.0347629785537720e-01 4.9114771187305450e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3730 2.2194240242242813e-02</internalNodes>\n          <leafValues>\n            6.1241529881954193e-02 -3.4557360410690308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3731 -1.1259679449722171e-03</internalNodes>\n          <leafValues>\n            5.2013769745826721e-02 -2.8461641073226929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3732 -1.5913739800453186e-02</internalNodes>\n          <leafValues>\n            -2.7667850255966187e-01 7.5852021574974060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3733 5.7643437758088112e-03</internalNodes>\n          <leafValues>\n            -2.7182090282440186e-01 6.6790662705898285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3734 -4.2196471244096756e-02</internalNodes>\n          <leafValues>\n            1.5786080062389374e-01 -1.0557679831981659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3735 -1.8624680116772652e-02</internalNodes>\n          <leafValues>\n            -2.5504299998283386e-01 4.7586869448423386e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3736 -9.5020089065656066e-04</internalNodes>\n          <leafValues>\n            4.9903839826583862e-02 -2.9068550467491150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3737 2.0823240280151367e-02</internalNodes>\n          <leafValues>\n            2.6825139299035072e-02 -2.0558500289916992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3738 -1.3118459843099117e-02</internalNodes>\n          <leafValues>\n            -2.2395209968090057e-01 6.9013498723506927e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3739 -8.6902417242527008e-03</internalNodes>\n          <leafValues>\n            1.9493189454078674e-01 -3.7850689142942429e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3740 4.5589819550514221e-02</internalNodes>\n          <leafValues>\n            2.5170389562845230e-02 -5.7766669988632202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3741 -4.8458490520715714e-02</internalNodes>\n          <leafValues>\n            9.5191553235054016e-02 -1.4320190250873566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3742 -7.2761103510856628e-02</internalNodes>\n          <leafValues>\n            -6.5967410802841187e-01 2.1175239235162735e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3743 -5.3840368986129761e-02</internalNodes>\n          <leafValues>\n            -3.6426779627799988e-01 2.4827929213643074e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3744 2.3190240608528256e-04</internalNodes>\n          <leafValues>\n            -1.4767690002918243e-01 8.3764038980007172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3745 -3.4166979603469372e-03</internalNodes>\n          <leafValues>\n            -1.7865709960460663e-01 6.0721088200807571e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3746 4.9744218587875366e-02</internalNodes>\n          <leafValues>\n            1.8918199464678764e-02 -6.6629868745803833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3747 6.6813439130783081e-02</internalNodes>\n          <leafValues>\n            -2.8286559507250786e-02 1.7401529848575592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3748 3.1445559114217758e-02</internalNodes>\n          <leafValues>\n            5.2556060254573822e-02 -3.0884549021720886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3749 3.9593618363142014e-02</internalNodes>\n          <leafValues>\n            -6.4875252544879913e-02 2.5706759095191956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3750 1.8663380295038223e-02</internalNodes>\n          <leafValues>\n            -5.9568431228399277e-02 2.1532599627971649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3751 4.0150571614503860e-02</internalNodes>\n          <leafValues>\n            1.9589129835367203e-02 -3.5392150282859802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3752 -1.8263690173625946e-02</internalNodes>\n          <leafValues>\n            -3.1224039196968079e-01 4.1845381259918213e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3753 -2.2579960525035858e-02</internalNodes>\n          <leafValues>\n            -1.4898709952831268e-01 1.7757140100002289e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3754 8.5281759500503540e-02</internalNodes>\n          <leafValues>\n            2.4866759777069092e-02 -5.2197951078414917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3755 4.9491669051349163e-03</internalNodes>\n          <leafValues>\n            4.0433339774608612e-02 -1.1230610311031342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3756 -2.7419520542025566e-02</internalNodes>\n          <leafValues>\n            -4.1119968891143799e-01 3.0549079179763794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3757 3.8277640938758850e-02</internalNodes>\n          <leafValues>\n            1.2211250141263008e-02 -8.1860828399658203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3758 -2.1632280200719833e-02</internalNodes>\n          <leafValues>\n            2.2030480206012726e-01 -5.5459130555391312e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3759 -2.4522699415683746e-01</internalNodes>\n          <leafValues>\n            4.1013330221176147e-01 -2.7000149711966515e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3760 3.9314631372690201e-02</internalNodes>\n          <leafValues>\n            -3.1242560595273972e-02 3.6714181303977966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3761 1.3630360364913940e-02</internalNodes>\n          <leafValues>\n            -1.3902300596237183e-01 9.5946237444877625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3762 -6.7042862065136433e-03</internalNodes>\n          <leafValues>\n            7.8772000968456268e-02 -1.4522729814052582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3763 2.3312810808420181e-02</internalNodes>\n          <leafValues>\n            2.2815790027379990e-02 -4.4990560412406921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3764 3.0621029436588287e-02</internalNodes>\n          <leafValues>\n            -6.9781273603439331e-02 1.5422509610652924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3765 5.2047189325094223e-02</internalNodes>\n          <leafValues>\n            -1.7720200121402740e-02 4.4397410750389099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3766 2.0850539207458496e-02</internalNodes>\n          <leafValues>\n            -5.2309051156044006e-02 2.0608800649642944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3767 8.2694664597511292e-03</internalNodes>\n          <leafValues>\n            7.7132821083068848e-02 -1.9474139809608459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3768 5.5706288665533066e-02</internalNodes>\n          <leafValues>\n            3.3715151250362396e-02 -3.5783401131629944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3769 -2.5406919419765472e-02</internalNodes>\n          <leafValues>\n            -2.1424999833106995e-01 5.3813599050045013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3770 3.7127479445189238e-03</internalNodes>\n          <leafValues>\n            5.7478290051221848e-02 -1.7734010517597198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3771 9.8399087786674500e-02</internalNodes>\n          <leafValues>\n            -3.5304271150380373e-03 7.7086448669433594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3772 -7.0944158360362053e-03</internalNodes>\n          <leafValues>\n            -1.3782690465450287e-01 7.0290572941303253e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3773 -7.8213073313236237e-02</internalNodes>\n          <leafValues>\n            4.6844071149826050e-01 -4.8642340116202831e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3774 3.0407020822167397e-02</internalNodes>\n          <leafValues>\n            -2.8489479795098305e-02 3.4157308936119080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3775 1.7667879583314061e-03</internalNodes>\n          <leafValues>\n            -1.4614230394363403e-01 2.3572970181703568e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3776 7.1991011500358582e-02</internalNodes>\n          <leafValues>\n            -3.5075180232524872e-02 2.8865718841552734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3777 5.0020869821310043e-02</internalNodes>\n          <leafValues>\n            2.4096360430121422e-02 -3.3890551328659058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3778 -1.7998270690441132e-02</internalNodes>\n          <leafValues>\n            2.9191690683364868e-01 -4.1259169578552246e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3779 -8.6585222743451595e-04</internalNodes>\n          <leafValues>\n            -1.2248259782791138e-01 5.9690121561288834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3780 5.7470470666885376e-02</internalNodes>\n          <leafValues>\n            2.1541740745306015e-02 -4.7508370876312256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3781 -1.6517810523509979e-02</internalNodes>\n          <leafValues>\n            1.6598740220069885e-01 -3.9656970649957657e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3782 2.1703030914068222e-02</internalNodes>\n          <leafValues>\n            -3.8327228277921677e-02 3.3476251363754272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3783 -6.1237839981913567e-03</internalNodes>\n          <leafValues>\n            -1.4342689514160156e-01 2.6313329115509987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3784 -1.0893509723246098e-02</internalNodes>\n          <leafValues>\n            -7.9468882083892822e-01 1.2403479777276516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3785 -3.8589738309383392e-02</internalNodes>\n          <leafValues>\n            3.3763501048088074e-01 -1.8747940659523010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3786 1.3378040166571736e-03</internalNodes>\n          <leafValues>\n            -3.6288881301879883e-01 2.9460189864039421e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3787 2.7590300305746496e-04</internalNodes>\n          <leafValues>\n            7.6419189572334290e-02 -8.6953632533550262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3788 7.9552736133337021e-03</internalNodes>\n          <leafValues>\n            5.2696179598569870e-02 -1.9200770556926727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3789 -1.2174629606306553e-02</internalNodes>\n          <leafValues>\n            8.4013037383556366e-02 -2.1740090101957321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3790 -1.6361070796847343e-02</internalNodes>\n          <leafValues>\n            -2.5493758916854858e-01 3.8582589477300644e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3791 -3.4992128610610962e-02</internalNodes>\n          <leafValues>\n            2.5760510563850403e-01 -1.5727080404758453e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3792 -7.6113208197057247e-03</internalNodes>\n          <leafValues>\n            1.9114670157432556e-01 -5.2980780601501465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3793 5.0110749900341034e-02</internalNodes>\n          <leafValues>\n            2.4265250191092491e-02 -5.1509189605712891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3794 -9.1486647725105286e-03</internalNodes>\n          <leafValues>\n            -3.3170440793037415e-01 2.6774439960718155e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3795 8.3293259143829346e-02</internalNodes>\n          <leafValues>\n            4.2860410176217556e-03 -3.0381551384925842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3796 -1.9334359094500542e-02</internalNodes>\n          <leafValues>\n            3.8916379213333130e-01 -2.4908309802412987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3797 -7.2061046957969666e-02</internalNodes>\n          <leafValues>\n            4.1184291243553162e-01 -2.5687059387564659e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3798 2.2506359964609146e-02</internalNodes>\n          <leafValues>\n            -2.1196739375591278e-01 5.3825020790100098e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3799 5.5772401392459869e-02</internalNodes>\n          <leafValues>\n            -2.3104140534996986e-02 9.1578252613544464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3800 -2.6210390031337738e-02</internalNodes>\n          <leafValues>\n            3.3509409427642822e-01 -3.4225810319185257e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3801 -4.6085331588983536e-02</internalNodes>\n          <leafValues>\n            -5.3006750345230103e-01 1.9083080813288689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3802 -3.2998260110616684e-02</internalNodes>\n          <leafValues>\n            3.0701389908790588e-01 -3.1638059765100479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3803 1.0677659884095192e-02</internalNodes>\n          <leafValues>\n            3.8186781108379364e-02 -2.0256699621677399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3804 3.7972650025039911e-03</internalNodes>\n          <leafValues>\n            7.8951433300971985e-02 -1.3040140271186829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3805 -2.4965009652078152e-03</internalNodes>\n          <leafValues>\n            -1.9799210131168365e-01 3.0743129551410675e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3806 1.4203139580786228e-02</internalNodes>\n          <leafValues>\n            -4.5443460345268250e-02 2.1806409955024719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3807 7.7012999099679291e-05</internalNodes>\n          <leafValues>\n            -2.5858289003372192e-01 4.2508359998464584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3808 2.3724909406155348e-03</internalNodes>\n          <leafValues>\n            -1.5815889835357666e-01 6.1494071036577225e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3809 -8.4086082875728607e-02</internalNodes>\n          <leafValues>\n            -9.3704527616500854e-01 8.3687662845477462e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3810 -2.2892290726304054e-02</internalNodes>\n          <leafValues>\n            4.2960539460182190e-01 -2.7215819805860519e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3811 -1.1238969862461090e-01</internalNodes>\n          <leafValues>\n            -2.0607289671897888e-01 1.7798800021409988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3812 6.8175032734870911e-02</internalNodes>\n          <leafValues>\n            -4.2019781470298767e-01 2.5051090866327286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3813 -1.0620189830660820e-02</internalNodes>\n          <leafValues>\n            -2.1870230138301849e-01 2.4231420829892159e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3814 2.9390859417617321e-03</internalNodes>\n          <leafValues>\n            8.8470183312892914e-02 -1.1958040297031403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3815 5.6766260415315628e-02</internalNodes>\n          <leafValues>\n            -5.8820329606533051e-02 1.7845800518989563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3816 -7.3099520523101091e-04</internalNodes>\n          <leafValues>\n            3.0122080445289612e-01 -3.4890830516815186e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3817 3.4174978733062744e-02</internalNodes>\n          <leafValues>\n            1.9614150747656822e-02 -1.7419980466365814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3818 3.3152099698781967e-02</internalNodes>\n          <leafValues>\n            2.9344469308853149e-02 -3.5163739323616028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3819 1.7158590257167816e-02</internalNodes>\n          <leafValues>\n            -4.7744009643793106e-02 2.0690310001373291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3820 -3.3270310610532761e-02</internalNodes>\n          <leafValues>\n            -3.6818051338195801e-01 3.0547879636287689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3821 -7.5228337664157152e-04</internalNodes>\n          <leafValues>\n            -1.0068210214376450e-01 3.7446059286594391e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3822 -5.7363631203770638e-03</internalNodes>\n          <leafValues>\n            -2.9704639315605164e-01 3.0889809131622314e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3823 3.4203678369522095e-02</internalNodes>\n          <leafValues>\n            3.2694388180971146e-02 -1.9386410713195801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3824 1.1759670078754425e-01</internalNodes>\n          <leafValues>\n            2.8010509908199310e-02 -3.4469729661941528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3825 3.5684760659933090e-02</internalNodes>\n          <leafValues>\n            1.4612049795687199e-02 -3.2323908805847168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3826 -1.4562480151653290e-01</internalNodes>\n          <leafValues>\n            -4.3703469634056091e-01 2.0697519183158875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3827 8.0413380637764931e-03</internalNodes>\n          <leafValues>\n            1.8440550193190575e-02 -3.2272771000862122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3828 5.3446288220584393e-03</internalNodes>\n          <leafValues>\n            5.0503399223089218e-02 -1.8428540229797363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3829 8.6473226547241211e-02</internalNodes>\n          <leafValues>\n            6.2484769150614738e-03 -9.3612897396087646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3830 6.6168710589408875e-02</internalNodes>\n          <leafValues>\n            -5.9868391603231430e-02 1.5810599923133850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3831 2.8978990390896797e-02</internalNodes>\n          <leafValues>\n            2.8844339773058891e-02 -2.8269919753074646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3832 1.8636519089341164e-02</internalNodes>\n          <leafValues>\n            -5.1709290593862534e-02 1.7777459323406219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3833 -2.6881769299507141e-02</internalNodes>\n          <leafValues>\n            7.3635026812553406e-02 -3.6229219287633896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3834 -1.3696019537746906e-02</internalNodes>\n          <leafValues>\n            1.8215629458427429e-01 -5.9880878776311874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3835 -4.1931979358196259e-03</internalNodes>\n          <leafValues>\n            -9.3321792781352997e-02 2.7901070192456245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3836 2.2784220054745674e-02</internalNodes>\n          <leafValues>\n            3.0631329864263535e-02 -2.8531938791275024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3837 -8.3819748833775520e-03</internalNodes>\n          <leafValues>\n            -2.3251660168170929e-01 5.0801441073417664e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3838 -6.4928620122373104e-03</internalNodes>\n          <leafValues>\n            1.1060830205678940e-01 -8.3281010389328003e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3839 5.5866848677396774e-02</internalNodes>\n          <leafValues>\n            2.3439039289951324e-01 -4.5191779732704163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3840 -1.0926710441708565e-02</internalNodes>\n          <leafValues>\n            2.0532840490341187e-01 -5.0775919109582901e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3841 1.7515379935503006e-02</internalNodes>\n          <leafValues>\n            3.6728449165821075e-02 -3.0638590455055237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3842 1.4543980360031128e-02</internalNodes>\n          <leafValues>\n            4.4784490019083023e-02 -2.0757840573787689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3843 1.7274370184168220e-03</internalNodes>\n          <leafValues>\n            2.3706600069999695e-02 -1.8639369308948517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3844 2.0160499960184097e-02</internalNodes>\n          <leafValues>\n            4.1744660586118698e-02 -2.1943749487400055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3845 -5.5732231587171555e-02</internalNodes>\n          <leafValues>\n            -3.7666681408882141e-01 7.3045571334660053e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3846 -4.2138090357184410e-03</internalNodes>\n          <leafValues>\n            1.1314260214567184e-01 -8.4451928734779358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3847 -5.7113498449325562e-02</internalNodes>\n          <leafValues>\n            -4.1903460025787354e-01 4.2158551514148712e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3848 -3.3385161310434341e-02</internalNodes>\n          <leafValues>\n            -3.9007860422134399e-01 2.5290969759225845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3849 -8.5305999964475632e-03</internalNodes>\n          <leafValues>\n            5.3572379052639008e-02 -1.2238460034132004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3850 -1.5144890174269676e-02</internalNodes>\n          <leafValues>\n            4.5743760466575623e-01 -2.5002999231219292e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3851 7.5857941992580891e-03</internalNodes>\n          <leafValues>\n            2.6268539950251579e-02 -9.8890319466590881e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3852 -6.4347468316555023e-02</internalNodes>\n          <leafValues>\n            2.2607059776782990e-01 -4.1821580380201340e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3853 6.5772183239459991e-02</internalNodes>\n          <leafValues>\n            2.4147959426045418e-02 -4.0227779746055603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3854 -1.0496930032968521e-01</internalNodes>\n          <leafValues>\n            -4.6343261003494263e-01 1.9134109839797020e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3855 9.6320390701293945e-02</internalNodes>\n          <leafValues>\n            8.7147848680615425e-03 -3.5269328951835632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3856 1.6651069745421410e-02</internalNodes>\n          <leafValues>\n            -2.3842410743236542e-01 3.8928661495447159e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3857 5.8829918503761292e-02</internalNodes>\n          <leafValues>\n            -1.6538100317120552e-02 3.3465591073036194e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3858 5.2411198616027832e-02</internalNodes>\n          <leafValues>\n            -1.9688919186592102e-02 4.6966078877449036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3859 1.2325269635766745e-03</internalNodes>\n          <leafValues>\n            -1.2056189775466919e-01 5.0563529133796692e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3860 -2.4530949071049690e-02</internalNodes>\n          <leafValues>\n            -3.9168059825897217e-01 2.3108620196580887e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3861 3.5507690161466599e-02</internalNodes>\n          <leafValues>\n            2.0499339327216148e-02 -3.6233830451965332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3862 -1.5282739885151386e-02</internalNodes>\n          <leafValues>\n            -2.4604129791259766e-01 3.4749999642372131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3863 6.0466449707746506e-02</internalNodes>\n          <leafValues>\n            -5.5071748793125153e-02 2.0428660511970520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3864 6.5809831023216248e-02</internalNodes>\n          <leafValues>\n            -7.1466080844402313e-02 1.2002970278263092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3865 -7.9543672502040863e-02</internalNodes>\n          <leafValues>\n            4.9044218659400940e-01 -7.8059309162199497e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3866 7.1057200431823730e-02</internalNodes>\n          <leafValues>\n            4.4219430536031723e-02 -2.1077010035514832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3867 1.2412209762260318e-03</internalNodes>\n          <leafValues>\n            9.9759846925735474e-02 -7.4065141379833221e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3868 4.3900560587644577e-02</internalNodes>\n          <leafValues>\n            2.0245339721441269e-02 -4.7800138592720032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3869 1.3814829289913177e-01</internalNodes>\n          <leafValues>\n            -3.4169729799032211e-02 2.0662400126457214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3870 6.4026713371276855e-02</internalNodes>\n          <leafValues>\n            1.7396930605173111e-02 -5.7749879360198975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3871 -1.2456770054996014e-02</internalNodes>\n          <leafValues>\n            -1.6710869967937469e-01 1.2106380425393581e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3872 3.7183608859777451e-02</internalNodes>\n          <leafValues>\n            -1.9024299457669258e-02 4.4476169347763062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3873 -3.4905251115560532e-02</internalNodes>\n          <leafValues>\n            -1.4648060500621796e-01 2.0895779132843018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3874 6.1689559370279312e-02</internalNodes>\n          <leafValues>\n            1.2428649701178074e-02 -7.1737641096115112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3875 -2.7358489111065865e-02</internalNodes>\n          <leafValues>\n            -2.4311469495296478e-01 2.6138730347156525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3876 6.3740741461515427e-03</internalNodes>\n          <leafValues>\n            -8.2593016326427460e-02 1.1356580257415771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3877 -1.0299839824438095e-01</internalNodes>\n          <leafValues>\n            4.5398610830307007e-01 -1.6315529122948647e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3878 -1.4695020392537117e-02</internalNodes>\n          <leafValues>\n            -1.8050310015678406e-01 4.8061780631542206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3879 6.0288330132607371e-05</internalNodes>\n          <leafValues>\n            -9.8974503576755524e-02 3.8105670362710953e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3880 -1.3763650320470333e-02</internalNodes>\n          <leafValues>\n            4.5689401030540466e-01 -2.0808599889278412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3881 5.1598600111901760e-03</internalNodes>\n          <leafValues>\n            2.8479820117354393e-02 -1.9778659939765930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3882 6.6321617923676968e-03</internalNodes>\n          <leafValues>\n            -6.1560358852148056e-02 1.4045900106430054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3883 -1.1073590256273746e-02</internalNodes>\n          <leafValues>\n            1.1272329837083817e-01 -3.8423039019107819e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3884 7.3836948722600937e-03</internalNodes>\n          <leafValues>\n            2.4575280025601387e-02 -3.3994451165199280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3885 -1.9277689978480339e-02</internalNodes>\n          <leafValues>\n            1.5732249617576599e-01 -5.8382220566272736e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3886 -2.6209199801087379e-02</internalNodes>\n          <leafValues>\n            -3.2575431466102600e-01 3.5296149551868439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3887 1.3872079551219940e-02</internalNodes>\n          <leafValues>\n            2.7504689991474152e-02 -2.0510050654411316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3888 2.5171930901706219e-03</internalNodes>\n          <leafValues>\n            6.9805637001991272e-02 -1.1518660187721252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3889 6.7753292620182037e-02</internalNodes>\n          <leafValues>\n            -3.7268139421939850e-02 2.3363080620765686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3890 -2.4352179840207100e-02</internalNodes>\n          <leafValues>\n            -2.1191249787807465e-01 4.2971581220626831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3891 -1.5085450373589993e-02</internalNodes>\n          <leafValues>\n            1.4743280410766602e-01 -3.8589131087064743e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3892 3.0052060261368752e-02</internalNodes>\n          <leafValues>\n            4.3882489204406738e-02 -2.0401340723037720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3893 -7.9878583550453186e-02</internalNodes>\n          <leafValues>\n            7.1355827152729034e-02 -3.5806309431791306e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3894 -4.9845650792121887e-02</internalNodes>\n          <leafValues>\n            2.8991028666496277e-01 -2.9193209484219551e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3895 6.0983549803495407e-02</internalNodes>\n          <leafValues>\n            1.1078090406954288e-02 -8.0549037456512451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3896 -2.4187229573726654e-02</internalNodes>\n          <leafValues>\n            2.0816670358181000e-01 -4.0332991629838943e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3897 2.9581909999251366e-02</internalNodes>\n          <leafValues>\n            1.7189880833029747e-02 -3.0174249410629272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3898 -9.6158936619758606e-02</internalNodes>\n          <leafValues>\n            -3.6115181446075439e-01 2.1451879292726517e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3899 1.1087789898738265e-03</internalNodes>\n          <leafValues>\n            6.0711268335580826e-02 -1.2995730340480804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3900 3.6577019840478897e-02</internalNodes>\n          <leafValues>\n            -1.5757689252495766e-02 6.1568331718444824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3901 8.9887566864490509e-02</internalNodes>\n          <leafValues>\n            7.5012152083218098e-03 -8.4639918804168701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3902 5.2048689685761929e-03</internalNodes>\n          <leafValues>\n            -5.0408910959959030e-02 1.5618799626827240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3903 3.4727361053228378e-02</internalNodes>\n          <leafValues>\n            2.1034790202975273e-02 -2.1834190189838409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3904 -5.4695051163434982e-02</internalNodes>\n          <leafValues>\n            -8.3126282691955566e-01 8.9029762893915176e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3905 1.5987730026245117e-01</internalNodes>\n          <leafValues>\n            8.5425339639186859e-03 -6.9280862808227539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3906 -3.8558691740036011e-02</internalNodes>\n          <leafValues>\n            -2.7078241109848022e-01 2.7025369927287102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3907 -7.1866370737552643e-02</internalNodes>\n          <leafValues>\n            -3.9044618606567383e-01 1.0923280380666256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3908 1.9590340554714203e-01</internalNodes>\n          <leafValues>\n            1.3423370197415352e-02 -5.4260522127151489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3909 -2.2330079227685928e-02</internalNodes>\n          <leafValues>\n            -1.7275239527225494e-01 2.9058510437607765e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3910 5.1018559932708740e-01</internalNodes>\n          <leafValues>\n            1.1418639682233334e-02 -6.7876529693603516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3911 -1.1239909566938877e-02</internalNodes>\n          <leafValues>\n            1.1462499946355820e-01 -5.6867629289627075e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3912 1.7486160621047020e-02</internalNodes>\n          <leafValues>\n            5.2641868591308594e-02 -1.6195179522037506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3913 -1.4517609961330891e-03</internalNodes>\n          <leafValues>\n            -1.0877469927072525e-01 5.6960400193929672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3914 3.7016559392213821e-02</internalNodes>\n          <leafValues>\n            1.7460089176893234e-02 -4.6505320072174072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3915 -8.6366441100835800e-03</internalNodes>\n          <leafValues>\n            7.3076270520687103e-02 -1.0616590082645416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3916 1.9361129961907864e-03</internalNodes>\n          <leafValues>\n            -1.4585369825363159e-01 5.9394489973783493e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3917 -2.3119550198316574e-02</internalNodes>\n          <leafValues>\n            -9.4876237213611603e-02 3.0387479811906815e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3918 6.3178739510476589e-03</internalNodes>\n          <leafValues>\n            -1.0537099838256836e-01 7.7892847359180450e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3919 1.0961949825286865e-02</internalNodes>\n          <leafValues>\n            -6.6041983664035797e-02 1.0566339641809464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3920 -4.2129520326852798e-02</internalNodes>\n          <leafValues>\n            2.4344080686569214e-01 -5.1573678851127625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3921 4.5132819563150406e-02</internalNodes>\n          <leafValues>\n            1.0772050358355045e-02 -7.6156777143478394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3922 9.4924736768007278e-03</internalNodes>\n          <leafValues>\n            4.5273378491401672e-02 -1.8770030140876770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3923 -1.1573860049247742e-01</internalNodes>\n          <leafValues>\n            4.4831728935241699e-01 -8.6225848644971848e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3924 1.5801179688423872e-03</internalNodes>\n          <leafValues>\n            -1.0931409895420074e-01 7.9391218721866608e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3925 -4.4442281126976013e-02</internalNodes>\n          <leafValues>\n            3.3827048540115356e-01 -2.6649719104170799e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3926 -6.5993092954158783e-02</internalNodes>\n          <leafValues>\n            -5.3106492757797241e-01 1.7543010413646698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3927 -1.0968820191919804e-02</internalNodes>\n          <leafValues>\n            -1.6612820327281952e-01 4.9488350749015808e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3928 3.8149021565914154e-02</internalNodes>\n          <leafValues>\n            -4.1509900242090225e-02 2.0616669952869415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3929 4.0625538676977158e-03</internalNodes>\n          <leafValues>\n            4.8925049602985382e-02 -8.4866181015968323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3930 3.2693019602447748e-03</internalNodes>\n          <leafValues>\n            -1.1883019655942917e-01 8.6803138256072998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3931 -1.2488859938457608e-03</internalNodes>\n          <leafValues>\n            -1.4354729652404785e-01 2.1422969177365303e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3932 -1.7064889892935753e-02</internalNodes>\n          <leafValues>\n            -5.2316349744796753e-01 1.6529040411114693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3933 -2.3354699835181236e-02</internalNodes>\n          <leafValues>\n            -1.9698520004749298e-01 2.1972300484776497e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3934 2.7899529784917831e-02</internalNodes>\n          <leafValues>\n            3.8033228367567062e-02 -2.2323200106620789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3935 -6.7869402468204498e-02</internalNodes>\n          <leafValues>\n            -4.2076128721237183e-01 1.0559639893472195e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3936 5.7542059570550919e-02</internalNodes>\n          <leafValues>\n            -4.2111430317163467e-02 2.3515710234642029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3937 -2.1877309679985046e-01</internalNodes>\n          <leafValues>\n            6.9553351402282715e-01 -9.9031934514641762e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3938 3.7776291370391846e-01</internalNodes>\n          <leafValues>\n            -2.4721829220652580e-02 3.0367389321327209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3939 4.1029900312423706e-02</internalNodes>\n          <leafValues>\n            2.1999280899763107e-02 -2.4707089364528656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3940 2.5587070733308792e-02</internalNodes>\n          <leafValues>\n            4.2045179754495621e-02 -2.2333100438117981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3941 6.7200772464275360e-02</internalNodes>\n          <leafValues>\n            -1.6648389399051666e-02 2.4265660345554352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3942 2.8230389580130577e-02</internalNodes>\n          <leafValues>\n            2.9572259634733200e-02 -3.0128848552703857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3943 2.4588680267333984e-01</internalNodes>\n          <leafValues>\n            1.9440819742158055e-03 -4.2153918743133545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3944 -9.5752447843551636e-02</internalNodes>\n          <leafValues>\n            -6.4711397886276245e-01 1.3180449604988098e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3945 -1.0596579872071743e-02</internalNodes>\n          <leafValues>\n            -2.0484970510005951e-01 2.8054440394043922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3946 6.7103967070579529e-02</internalNodes>\n          <leafValues>\n            2.9053989797830582e-02 -2.6770511269569397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3947 -7.9280838370323181e-02</internalNodes>\n          <leafValues>\n            2.1911109983921051e-01 -1.5684010460972786e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3948 -4.0710358880460262e-03</internalNodes>\n          <leafValues>\n            2.2031579911708832e-01 -4.0581289678812027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3949 3.7690360099077225e-02</internalNodes>\n          <leafValues>\n            -1.2946240603923798e-01 6.1921589076519012e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3950 1.8453929573297501e-02</internalNodes>\n          <leafValues>\n            -3.2800889015197754e-01 2.9745969921350479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3951 1.5218369662761688e-01</internalNodes>\n          <leafValues>\n            1.1928870342671871e-02 -4.3678689002990723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3952 1.0948959738016129e-01</internalNodes>\n          <leafValues>\n            2.4663779884576797e-02 -3.1567180156707764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3953 -4.4906709343194962e-02</internalNodes>\n          <leafValues>\n            2.3082759976387024e-01 -2.2163389250636101e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3954 1.4668619632720947e-01</internalNodes>\n          <leafValues>\n            1.8490659072995186e-02 -4.6669480204582214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3955 -4.0597580373287201e-02</internalNodes>\n          <leafValues>\n            2.0691379904747009e-01 -4.1412089020013809e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>293</maxWeakCount>\n      <stageThreshold>-1.3393770456314087e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 3956 2.5723339058458805e-03</internalNodes>\n          <leafValues>\n            -2.4097059667110443e-01 1.5659730136394501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3957 5.7603712193667889e-03</internalNodes>\n          <leafValues>\n            -4.3601021170616150e-01 8.0516032874584198e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3958 -1.0138600319623947e-01</internalNodes>\n          <leafValues>\n            3.9704030752182007e-01 -6.5761536359786987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3959 1.3221249682828784e-03</internalNodes>\n          <leafValues>\n            -4.2382979393005371e-01 2.8659680858254433e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3960 5.4164527682587504e-04</internalNodes>\n          <leafValues>\n            6.7418687045574188e-02 -3.1019261479377747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3961 2.4447739124298096e-03</internalNodes>\n          <leafValues>\n            1.3928419910371304e-02 -2.4488939344882965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3962 1.4049450401216745e-03</internalNodes>\n          <leafValues>\n            -1.5040999650955200e-01 1.2638579308986664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3963 1.1241709580644965e-03</internalNodes>\n          <leafValues>\n            -2.7436348795890808e-01 7.1175657212734222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3964 -1.3413740089163184e-03</internalNodes>\n          <leafValues>\n            -3.7685438990592957e-01 5.0038158893585205e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3965 4.1714560240507126e-02</internalNodes>\n          <leafValues>\n            1.1733000166714191e-02 -5.4509437084197998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3966 2.1810019388794899e-03</internalNodes>\n          <leafValues>\n            -2.0847110450267792e-01 8.4929227828979492e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3967 1.9655700773000717e-02</internalNodes>\n          <leafValues>\n            2.9568189755082130e-02 -2.4840490520000458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3968 4.9905799096450210e-04</internalNodes>\n          <leafValues>\n            -1.7222259938716888e-01 9.3910522758960724e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3969 3.3110571093857288e-03</internalNodes>\n          <leafValues>\n            7.9480826854705811e-02 -1.8249939382076263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3970 3.4921199548989534e-03</internalNodes>\n          <leafValues>\n            6.0159709304571152e-02 -2.3041090369224548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3971 1.3379369629547000e-03</internalNodes>\n          <leafValues>\n            -7.8347019851207733e-02 1.5814539790153503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3972 -3.4234288614243269e-04</internalNodes>\n          <leafValues>\n            -1.5121580660343170e-01 9.5998182892799377e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3973 -7.2008459828794003e-03</internalNodes>\n          <leafValues>\n            1.0716210305690765e-01 -1.2086699903011322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3974 -3.3037480898201466e-03</internalNodes>\n          <leafValues>\n            -1.9142769277095795e-01 7.1347109973430634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3975 -8.1909723579883575e-02</internalNodes>\n          <leafValues>\n            -8.5086518526077271e-01 6.6832960583269596e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3976 -5.2563002100214362e-04</internalNodes>\n          <leafValues>\n            7.1854703128337860e-02 -2.3162660002708435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3977 -2.1477319300174713e-02</internalNodes>\n          <leafValues>\n            2.2399149835109711e-01 -3.2982278615236282e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3978 -5.6700430810451508e-02</internalNodes>\n          <leafValues>\n            5.1475530862808228e-01 -2.3378230631351471e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3979 1.8419699743390083e-02</internalNodes>\n          <leafValues>\n            1.8853360787034035e-02 -4.4701090455055237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3980 -8.8926553726196289e-03</internalNodes>\n          <leafValues>\n            1.8497599661350250e-01 -6.6978506743907928e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3981 1.2642369605600834e-02</internalNodes>\n          <leafValues>\n            8.6571149528026581e-02 -1.4233930408954620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3982 8.0502573400735855e-03</internalNodes>\n          <leafValues>\n            -7.7052421867847443e-02 2.1340900659561157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3983 -6.9165248423814774e-03</internalNodes>\n          <leafValues>\n            -1.7848269641399384e-01 5.6415598839521408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3984 -1.4194440096616745e-02</internalNodes>\n          <leafValues>\n            1.8763299286365509e-01 -6.7588217556476593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3985 3.5530389286577702e-03</internalNodes>\n          <leafValues>\n            3.8925249129533768e-02 -1.4981240034103394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3986 4.8001301474869251e-03</internalNodes>\n          <leafValues>\n            4.4963311403989792e-02 -2.4595139920711517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3987 9.0420730412006378e-03</internalNodes>\n          <leafValues>\n            -5.3614400327205658e-02 1.3824699819087982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3988 4.3342178687453270e-03</internalNodes>\n          <leafValues>\n            -8.6166441440582275e-02 1.2793409824371338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3989 1.2264699675142765e-02</internalNodes>\n          <leafValues>\n            3.6203060299158096e-02 -3.7494099140167236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3990 4.9155529588460922e-02</internalNodes>\n          <leafValues>\n            -9.1319262981414795e-02 1.2587989866733551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3991 -5.8642931981012225e-04</internalNodes>\n          <leafValues>\n            9.3702591955661774e-02 -1.0736119747161865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3992 3.2971050590276718e-02</internalNodes>\n          <leafValues>\n            2.7238529175519943e-02 -4.5005699992179871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3993 1.6174600459635258e-03</internalNodes>\n          <leafValues>\n            3.2863009721040726e-02 -1.4241309463977814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3994 1.0178020456805825e-03</internalNodes>\n          <leafValues>\n            6.9898538291454315e-02 -1.7507210373878479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3995 3.4081579651683569e-03</internalNodes>\n          <leafValues>\n            -7.7970616519451141e-02 5.8423690497875214e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3996 -6.9078300148248672e-03</internalNodes>\n          <leafValues>\n            1.1711090058088303e-01 -9.5380999147891998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3997 -7.8317627776414156e-04</internalNodes>\n          <leafValues>\n            6.3730940222740173e-02 -8.8190883398056030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3998 -1.3578870333731174e-02</internalNodes>\n          <leafValues>\n            -2.7168250083923340e-01 3.9688158780336380e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3999 -8.0021530389785767e-02</internalNodes>\n          <leafValues>\n            6.0115522146224976e-01 -2.4968839716166258e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4000 -1.7085570143535733e-03</internalNodes>\n          <leafValues>\n            1.0888680070638657e-01 -1.0520359873771667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4001 8.5700387135148048e-03</internalNodes>\n          <leafValues>\n            -4.1784621775150299e-02 1.4857980608940125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4002 1.5518560074269772e-02</internalNodes>\n          <leafValues>\n            2.1855160593986511e-02 -4.5708781480789185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4003 -1.5739940572530031e-03</internalNodes>\n          <leafValues>\n            5.0655461847782135e-02 -6.9658473134040833e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4004 -1.0979890357702971e-03</internalNodes>\n          <leafValues>\n            7.9917587339878082e-02 -1.1895059794187546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4005 -2.6248019188642502e-02</internalNodes>\n          <leafValues>\n            7.0614987611770630e-01 -1.3660780154168606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4006 -1.0281460359692574e-02</internalNodes>\n          <leafValues>\n            -1.8412110209465027e-01 6.6442340612411499e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4007 -3.6530280485749245e-03</internalNodes>\n          <leafValues>\n            1.2995550036430359e-01 -5.8351561427116394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4008 7.8363716602325439e-03</internalNodes>\n          <leafValues>\n            2.7073230594396591e-02 -3.3601909875869751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4009 -1.5283710323274136e-02</internalNodes>\n          <leafValues>\n            2.5562399625778198e-01 -3.5940971225500107e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4010 -6.7279259674251080e-03</internalNodes>\n          <leafValues>\n            2.4661159515380859e-01 -4.8673499375581741e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4011 1.7807850241661072e-01</internalNodes>\n          <leafValues>\n            6.0471030883491039e-03 -7.2566151618957520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4012 -1.0486179962754250e-03</internalNodes>\n          <leafValues>\n            -1.9335940480232239e-01 5.0940699875354767e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4013 8.9163314551115036e-03</internalNodes>\n          <leafValues>\n            3.3024791628122330e-02 -1.6986289620399475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4014 4.0643039392307401e-04</internalNodes>\n          <leafValues>\n            -1.3117119669914246e-01 6.6818282008171082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4015 -4.7499048709869385e-01</internalNodes>\n          <leafValues>\n            -4.0152749419212341e-01 6.3146720640361309e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4016 1.0430049896240234e-01</internalNodes>\n          <leafValues>\n            2.4024970829486847e-02 -3.2695800065994263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4017 -5.1650121808052063e-02</internalNodes>\n          <leafValues>\n            1.6934829950332642e-01 -1.5539200045168400e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4018 4.0506269782781601e-02</internalNodes>\n          <leafValues>\n            -2.2082980722188950e-02 3.9694729447364807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4019 2.4179749190807343e-02</internalNodes>\n          <leafValues>\n            2.1926779299974442e-02 -4.3460670113563538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4020 -3.0531319789588451e-03</internalNodes>\n          <leafValues>\n            -1.4108030498027802e-01 5.6175179779529572e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4021 -1.7123650759458542e-02</internalNodes>\n          <leafValues>\n            -6.3341897726058960e-01 9.8466947674751282e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4022 4.1705969721078873e-02</internalNodes>\n          <leafValues>\n            1.0977629572153091e-02 -6.7681282758712769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4023 4.3895491398870945e-03</internalNodes>\n          <leafValues>\n            -5.7781290262937546e-02 1.5501640737056732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4024 -4.4786250218749046e-03</internalNodes>\n          <leafValues>\n            -1.6706019639968872e-01 4.6572938561439514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4025 4.8733421135693789e-04</internalNodes>\n          <leafValues>\n            -1.5037140250205994e-01 4.6920441091060638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4026 1.5530640259385109e-02</internalNodes>\n          <leafValues>\n            2.2556010633707047e-02 -3.2370451092720032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4027 4.5443180948495865e-02</internalNodes>\n          <leafValues>\n            -9.8806591704487801e-03 6.0815322399139404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4028 -7.7960297465324402e-02</internalNodes>\n          <leafValues>\n            4.0743818879127502e-01 -1.8391529098153114e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4029 -4.5014719944447279e-04</internalNodes>\n          <leafValues>\n            -3.8319730758666992e-01 1.3420820236206055e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4030 -2.1852780133485794e-02</internalNodes>\n          <leafValues>\n            -4.4697651267051697e-01 1.5379330143332481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4031 -6.3410878181457520e-02</internalNodes>\n          <leafValues>\n            3.9926728606224060e-01 -2.2168820723891258e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4032 -6.6417120397090912e-03</internalNodes>\n          <leafValues>\n            -1.4594499766826630e-01 5.1541730761528015e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4033 2.0355410873889923e-02</internalNodes>\n          <leafValues>\n            -2.3113679140806198e-02 1.8792650103569031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4034 9.2754261568188667e-03</internalNodes>\n          <leafValues>\n            -5.5808931589126587e-02 1.3504269719123840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4035 -6.4075283706188202e-02</internalNodes>\n          <leafValues>\n            2.6259770989418030e-01 -3.1913250684738159e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4036 5.7537898421287537e-02</internalNodes>\n          <leafValues>\n            3.4703690558671951e-02 -2.7203989028930664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4037 -1.3369999825954437e-02</internalNodes>\n          <leafValues>\n            -1.0251790285110474e-01 2.0719829946756363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4038 2.9637520201504230e-03</internalNodes>\n          <leafValues>\n            -5.7579819113016129e-02 1.3346299529075623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4039 -4.7313207760453224e-03</internalNodes>\n          <leafValues>\n            -1.4229220151901245e-01 5.3106248378753662e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4040 1.2967540323734283e-01</internalNodes>\n          <leafValues>\n            -2.1926470100879669e-02 3.3583769202232361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4041 -2.8757948894053698e-03</internalNodes>\n          <leafValues>\n            7.4970930814743042e-02 -1.0183060169219971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4042 -1.3546359725296497e-02</internalNodes>\n          <leafValues>\n            -1.5313720703125000e-01 5.2247390151023865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4043 6.3532173633575439e-02</internalNodes>\n          <leafValues>\n            9.1543495655059814e-03 -7.4869108200073242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4044 -1.0261409915983677e-02</internalNodes>\n          <leafValues>\n            1.2742519378662109e-01 -5.6786071509122849e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4045 -4.3331928551197052e-02</internalNodes>\n          <leafValues>\n            -6.1829072237014771e-01 8.0406935885548592e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4046 4.0195342153310776e-03</internalNodes>\n          <leafValues>\n            -5.4130308330059052e-02 1.4864480495452881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4047 6.7003332078456879e-03</internalNodes>\n          <leafValues>\n            3.7507299333810806e-02 -1.9986230134963989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4048 -1.1208239942789078e-02</internalNodes>\n          <leafValues>\n            -1.4704710245132446e-01 5.7189401239156723e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4049 -3.7890970706939697e-03</internalNodes>\n          <leafValues>\n            1.5529400110244751e-01 -3.7930488586425781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4050 -1.1098479852080345e-02</internalNodes>\n          <leafValues>\n            1.7850440740585327e-01 -4.5689649879932404e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4051 -7.3761218227446079e-03</internalNodes>\n          <leafValues>\n            -1.0891640186309814e-01 7.4425593018531799e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4052 -3.2149269245564938e-03</internalNodes>\n          <leafValues>\n            9.0641707181930542e-02 -9.4377033412456512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4053 -3.5010059364140034e-03</internalNodes>\n          <leafValues>\n            -1.3498190045356750e-01 6.6652722656726837e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4054 -1.4920319699740503e-05</internalNodes>\n          <leafValues>\n            -1.0505480319261551e-01 8.4583170711994171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4055 9.5882397145032883e-03</internalNodes>\n          <leafValues>\n            1.9421499222517014e-02 -2.4732840061187744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4056 5.7274959981441498e-02</internalNodes>\n          <leafValues>\n            8.1852423027157784e-03 -7.9508548974990845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4057 2.4549640715122223e-02</internalNodes>\n          <leafValues>\n            -1.5515980310738087e-02 4.8995479941368103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4058 -4.6792559325695038e-02</internalNodes>\n          <leafValues>\n            -8.4720087051391602e-01 9.0526090934872627e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4059 3.1038739252835512e-03</internalNodes>\n          <leafValues>\n            -5.3271029144525528e-02 7.8815557062625885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4060 -3.4241031855344772e-02</internalNodes>\n          <leafValues>\n            -4.8161220550537109e-01 1.3654340058565140e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4061 4.4056270271539688e-03</internalNodes>\n          <leafValues>\n            -4.9280438572168350e-02 7.8709162771701813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4062 2.3878510110080242e-03</internalNodes>\n          <leafValues>\n            -7.6887659728527069e-02 8.4614582359790802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4063 -1.1621230281889439e-02</internalNodes>\n          <leafValues>\n            -2.3086050152778625e-01 2.2584810853004456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4064 2.5225759018212557e-03</internalNodes>\n          <leafValues>\n            -5.0813131034374237e-02 1.3810400664806366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4065 1.3507470488548279e-01</internalNodes>\n          <leafValues>\n            7.5730998069047928e-03 -4.7955051064491272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4066 -2.2317951079457998e-03</internalNodes>\n          <leafValues>\n            -9.0258792042732239e-02 8.3118766546249390e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4067 -3.0061710625886917e-02</internalNodes>\n          <leafValues>\n            -5.1799142360687256e-01 1.2881710194051266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4068 -4.5464351773262024e-02</internalNodes>\n          <leafValues>\n            2.0660980045795441e-01 -3.4860398620367050e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4069 -9.2374589294195175e-03</internalNodes>\n          <leafValues>\n            -1.4695020020008087e-01 3.1320258975028992e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4070 6.0185948386788368e-03</internalNodes>\n          <leafValues>\n            6.3885621726512909e-02 -1.1779619753360748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4071 -1.0322810150682926e-02</internalNodes>\n          <leafValues>\n            1.7958350479602814e-01 -4.6830028295516968e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4072 -1.7961780540645123e-03</internalNodes>\n          <leafValues>\n            -1.1374049633741379e-01 6.1730381101369858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4073 7.1363700553774834e-03</internalNodes>\n          <leafValues>\n            3.3574521541595459e-02 -1.5472589433193207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4074 6.9487772881984711e-02</internalNodes>\n          <leafValues>\n            -5.9162009507417679e-02 1.3841110467910767e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4075 -3.8321871310472488e-02</internalNodes>\n          <leafValues>\n            1.5628719329833984e-01 -3.1815651804208755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4076 3.9706169627606869e-03</internalNodes>\n          <leafValues>\n            5.1252529025077820e-02 -1.7615999281406403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4077 -3.9275288581848145e-03</internalNodes>\n          <leafValues>\n            7.8947998583316803e-02 -5.1486730575561523e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4078 1.9882800988852978e-03</internalNodes>\n          <leafValues>\n            -5.0474651157855988e-02 1.3366329669952393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4079 -1.6472870483994484e-03</internalNodes>\n          <leafValues>\n            4.9180198460817337e-02 -5.3437490016222000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4080 -1.1580109596252441e-02</internalNodes>\n          <leafValues>\n            -1.3224309682846069e-01 5.8321509510278702e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4081 4.3496791273355484e-02</internalNodes>\n          <leafValues>\n            -2.3527380079030991e-02 1.2179140001535416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4082 1.8956169951707125e-03</internalNodes>\n          <leafValues>\n            5.6072939187288284e-02 -1.1997289955615997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4083 2.4906420148909092e-03</internalNodes>\n          <leafValues>\n            -1.2799920141696930e-01 3.5218570381402969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4084 -6.0253150761127472e-02</internalNodes>\n          <leafValues>\n            -7.8707909584045410e-01 7.7965850941836834e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4085 -1.5306809917092323e-02</internalNodes>\n          <leafValues>\n            -1.2276060134172440e-01 4.2537391185760498e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4086 3.6899570841342211e-04</internalNodes>\n          <leafValues>\n            -1.2192569673061371e-01 5.9650231152772903e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4087 3.0398070812225342e-03</internalNodes>\n          <leafValues>\n            -6.3023842871189117e-02 5.0918091088533401e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4088 -3.5760499304160476e-04</internalNodes>\n          <leafValues>\n            -7.6859332621097565e-02 8.6624316871166229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4089 -2.7939230203628540e-03</internalNodes>\n          <leafValues>\n            1.3074369728565216e-01 -4.6912711113691330e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4090 4.2060539126396179e-03</internalNodes>\n          <leafValues>\n            -5.3119719028472900e-02 1.2866240739822388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4091 5.1448699086904526e-02</internalNodes>\n          <leafValues>\n            1.1080370284616947e-02 -4.1434210538864136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4092 3.2859880477190018e-02</internalNodes>\n          <leafValues>\n            1.7495309934020042e-02 -3.7538790702819824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4093 -4.8408061265945435e-02</internalNodes>\n          <leafValues>\n            1.7011879384517670e-01 -2.3726450279355049e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4094 1.4061340130865574e-02</internalNodes>\n          <leafValues>\n            2.5981390848755836e-02 -2.7635771036148071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4095 5.2196439355611801e-02</internalNodes>\n          <leafValues>\n            -9.5534622669219971e-03 1.0973469913005829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4096 4.4780261814594269e-02</internalNodes>\n          <leafValues>\n            -2.7032930403947830e-02 2.7434709668159485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4097 -3.7703409325331450e-03</internalNodes>\n          <leafValues>\n            -1.4412869513034821e-01 5.2342470735311508e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4098 -4.1479258798062801e-03</internalNodes>\n          <leafValues>\n            -1.3706830143928528e-01 4.9621090292930603e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4099 1.4685150235891342e-02</internalNodes>\n          <leafValues>\n            -4.9949668347835541e-02 1.3658650219440460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4100 1.0325849987566471e-02</internalNodes>\n          <leafValues>\n            8.3659462630748749e-02 -1.0378009825944901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4101 -1.7972270143218338e-04</internalNodes>\n          <leafValues>\n            -8.6658917367458344e-02 2.2592369467020035e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4102 2.0081000402569771e-02</internalNodes>\n          <leafValues>\n            -1.9589949399232864e-02 3.4358739852905273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4103 -2.2905580699443817e-02</internalNodes>\n          <leafValues>\n            -4.2482820153236389e-01 1.5416770242154598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4104 -5.5506028234958649e-02</internalNodes>\n          <leafValues>\n            7.3143810033798218e-01 -9.4347409904003143e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4105 -1.7899540252983570e-03</internalNodes>\n          <leafValues>\n            -8.1951782107353210e-02 3.5823788493871689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4106 -8.0740358680486679e-04</internalNodes>\n          <leafValues>\n            8.6620979011058807e-02 -7.8758612275123596e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4107 2.4445019662380219e-02</internalNodes>\n          <leafValues>\n            -2.2004250437021255e-02 9.4158843159675598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4108 -7.5640110298991203e-03</internalNodes>\n          <leafValues>\n            1.2011729925870895e-01 -7.2349771857261658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4109 2.3397218901664019e-03</internalNodes>\n          <leafValues>\n            -8.1034347414970398e-02 9.8173618316650391e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4110 -3.1817611306905746e-02</internalNodes>\n          <leafValues>\n            -3.5730469226837158e-01 1.9601309671998024e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4111 1.0028080083429813e-02</internalNodes>\n          <leafValues>\n            -2.4160459637641907e-02 3.1340339779853821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4112 9.0504523541312665e-05</internalNodes>\n          <leafValues>\n            5.8050628751516342e-02 -1.1760439723730087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4113 -2.1010750904679298e-02</internalNodes>\n          <leafValues>\n            -2.0346039533615112e-01 3.4145411103963852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4114 -7.1200268575921655e-04</internalNodes>\n          <leafValues>\n            6.3303150236606598e-02 -1.0497389733791351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4115 -7.6272932346910238e-04</internalNodes>\n          <leafValues>\n            -7.4432566761970520e-02 3.4912228584289551e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4116 -5.8506328612565994e-02</internalNodes>\n          <leafValues>\n            5.5758380889892578e-01 -1.2666489928960800e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4117 2.4057500995695591e-03</internalNodes>\n          <leafValues>\n            4.4605068862438202e-02 -1.1581590026617050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4118 -1.9729519262909889e-02</internalNodes>\n          <leafValues>\n            -4.7550109028816223e-01 1.5548559837043285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4119 -2.2645130753517151e-02</internalNodes>\n          <leafValues>\n            1.1828950047492981e-01 -2.2170929238200188e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4120 -1.3123790267854929e-03</internalNodes>\n          <leafValues>\n            5.0635538995265961e-02 -1.3423310220241547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4121 -5.9856739826500416e-03</internalNodes>\n          <leafValues>\n            5.4273821413516998e-02 -6.9639056921005249e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4122 5.2245449274778366e-02</internalNodes>\n          <leafValues>\n            -1.8341360613703728e-02 4.1689381003379822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4123 -4.6837949194014072e-03</internalNodes>\n          <leafValues>\n            -1.2121260166168213e-01 3.9187919348478317e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4124 -1.5208399854600430e-02</internalNodes>\n          <leafValues>\n            -9.6487842500209808e-02 6.5325021743774414e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4125 -5.7328920811414719e-03</internalNodes>\n          <leafValues>\n            2.1023470163345337e-01 -3.1721260398626328e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4126 -3.7612610030919313e-03</internalNodes>\n          <leafValues>\n            1.0085880011320114e-01 -6.1392951756715775e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4127 -1.0980520397424698e-02</internalNodes>\n          <leafValues>\n            -1.8342439830303192e-01 1.7121249809861183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4128 2.7213071007281542e-03</internalNodes>\n          <leafValues>\n            -5.8404140174388885e-02 1.0729049891233444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4129 -1.8969269469380379e-02</internalNodes>\n          <leafValues>\n            7.4764728546142578e-02 -3.4056201577186584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4130 -7.1104627568274736e-04</internalNodes>\n          <leafValues>\n            -1.4749570190906525e-01 5.2447158843278885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4131 9.4774961471557617e-03</internalNodes>\n          <leafValues>\n            -2.5232490152120590e-02 1.0677599906921387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4132 1.0275880247354507e-01</internalNodes>\n          <leafValues>\n            1.0039360262453556e-02 -6.4630568027496338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4133 -1.1228179931640625e-01</internalNodes>\n          <leafValues>\n            -5.7247608900070190e-01 6.3971187919378281e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4134 -2.5683579966425896e-02</internalNodes>\n          <leafValues>\n            -3.2004079222679138e-01 1.7239449545741081e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4135 2.5494299829006195e-02</internalNodes>\n          <leafValues>\n            -2.2127779200673103e-02 1.1838120222091675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4136 -3.0458789318799973e-02</internalNodes>\n          <leafValues>\n            -5.8747881650924683e-01 9.8222652450203896e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4137 -2.7816120535135269e-02</internalNodes>\n          <leafValues>\n            3.6785709857940674e-01 -1.2260340154170990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4138 -1.2768269516527653e-03</internalNodes>\n          <leafValues>\n            2.4150429666042328e-01 -2.4503409862518311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4139 -7.6435826718807220e-02</internalNodes>\n          <leafValues>\n            -6.3471722602844238e-01 2.7080429717898369e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4140 3.7574430461972952e-04</internalNodes>\n          <leafValues>\n            -1.3316820561885834e-01 4.6189591288566589e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4141 1.3193810358643532e-02</internalNodes>\n          <leafValues>\n            2.6501480489969254e-02 -6.8515978753566742e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4142 -6.3689619302749634e-02</internalNodes>\n          <leafValues>\n            4.1126638650894165e-01 -1.5647120773792267e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4143 -8.0426287604495883e-04</internalNodes>\n          <leafValues>\n            -9.4006098806858063e-02 3.1002070754766464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4144 8.2476891111582518e-04</internalNodes>\n          <leafValues>\n            -1.5928819775581360e-01 3.7096790969371796e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4145 4.8443409614264965e-03</internalNodes>\n          <leafValues>\n            -2.5698879733681679e-02 1.5079009532928467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4146 2.2941319271922112e-02</internalNodes>\n          <leafValues>\n            2.2941149771213531e-02 -2.7759069204330444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4147 5.6285588070750237e-03</internalNodes>\n          <leafValues>\n            2.0121619105339050e-02 -6.3584417104721069e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4148 -8.1927451537922025e-04</internalNodes>\n          <leafValues>\n            5.5934138596057892e-02 -1.0776060074567795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4149 5.1910132169723511e-03</internalNodes>\n          <leafValues>\n            -2.6781970635056496e-02 5.5094171315431595e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4150 -2.0220499485731125e-02</internalNodes>\n          <leafValues>\n            -1.2501780688762665e-01 5.9274829924106598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4151 -3.6798599176108837e-03</internalNodes>\n          <leafValues>\n            6.0474321246147156e-02 -5.9632349759340286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4152 1.0483860038220882e-02</internalNodes>\n          <leafValues>\n            -5.3652260452508926e-02 1.2906110286712646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4153 1.7904460430145264e-02</internalNodes>\n          <leafValues>\n            1.4318290166556835e-02 -2.7349731326103210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4154 3.3693820238113403e-01</internalNodes>\n          <leafValues>\n            -8.6311781778931618e-03 7.3288571834564209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4155 -1.0807479918003082e-01</internalNodes>\n          <leafValues>\n            -5.0707489252090454e-01 6.7152627743780613e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4156 -1.2219610065221786e-01</internalNodes>\n          <leafValues>\n            -7.9352718591690063e-01 7.4890498071908951e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4157 -3.7357630208134651e-03</internalNodes>\n          <leafValues>\n            -1.5436430275440216e-01 1.9933359697461128e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4158 4.7283530235290527e-02</internalNodes>\n          <leafValues>\n            -3.2180741429328918e-02 2.2332429885864258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4159 -4.8949089832603931e-03</internalNodes>\n          <leafValues>\n            -1.4440849423408508e-01 2.7687419205904007e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4160 -4.6767960302531719e-03</internalNodes>\n          <leafValues>\n            4.2589519172906876e-02 -1.3181249797344208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4161 -4.0526568889617920e-02</internalNodes>\n          <leafValues>\n            1.5155360102653503e-01 -1.3137400150299072e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4162 5.1309340633451939e-03</internalNodes>\n          <leafValues>\n            -4.2436398565769196e-02 1.9428129494190216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4163 4.9947341904044151e-03</internalNodes>\n          <leafValues>\n            2.0656300708651543e-02 -1.8332560360431671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4164 -1.0946449823677540e-02</internalNodes>\n          <leafValues>\n            -1.1576370149850845e-01 6.1964198946952820e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4165 -6.7135482095181942e-03</internalNodes>\n          <leafValues>\n            1.5796749293804169e-01 -3.5399619489908218e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4166 -3.0990630388259888e-02</internalNodes>\n          <leafValues>\n            -1.7271049320697784e-01 3.7916570901870728e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4167 -2.7503890451043844e-03</internalNodes>\n          <leafValues>\n            4.1495159268379211e-02 -5.5152788758277893e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4168 -2.4700429290533066e-02</internalNodes>\n          <leafValues>\n            2.9076111316680908e-01 -2.0552640780806541e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4169 -1.7607269808650017e-02</internalNodes>\n          <leafValues>\n            -9.8671503365039825e-02 3.2800450921058655e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4170 8.7928329594433308e-04</internalNodes>\n          <leafValues>\n            3.6442421376705170e-02 -1.7518040537834167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4171 6.9036949425935745e-03</internalNodes>\n          <leafValues>\n            2.1444270387291908e-02 -1.1997299641370773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4172 -2.2592858877032995e-03</internalNodes>\n          <leafValues>\n            9.5944248139858246e-02 -8.1264480948448181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4173 1.5885939821600914e-02</internalNodes>\n          <leafValues>\n            -3.1494110822677612e-02 8.7531946599483490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4174 1.9379710778594017e-02</internalNodes>\n          <leafValues>\n            -3.5075489431619644e-02 1.6199189424514771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4175 -2.3565329611301422e-02</internalNodes>\n          <leafValues>\n            9.9367812275886536e-02 -5.0409961491823196e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4176 -6.2582190148532391e-03</internalNodes>\n          <leafValues>\n            -1.5962609648704529e-01 5.6871950626373291e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4177 1.0289040394127369e-02</internalNodes>\n          <leafValues>\n            3.2422259449958801e-02 -1.1825840175151825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4178 -5.8485912159085274e-03</internalNodes>\n          <leafValues>\n            1.9107459485530853e-01 -3.7084739655256271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4179 -8.5805162787437439e-02</internalNodes>\n          <leafValues>\n            -4.0877249836921692e-01 1.2781100347638130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4180 -2.4852859787642956e-03</internalNodes>\n          <leafValues>\n            -1.0116399824619293e-01 5.6311480700969696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4181 -7.1535720489919186e-03</internalNodes>\n          <leafValues>\n            -4.4118609279394150e-02 2.2217169404029846e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4182 1.2644700473174453e-03</internalNodes>\n          <leafValues>\n            6.5305598080158234e-02 -1.2273000180721283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4183 3.9825689047574997e-02</internalNodes>\n          <leafValues>\n            -5.0402980297803879e-02 1.4424259960651398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4184 1.3322670012712479e-02</internalNodes>\n          <leafValues>\n            2.3235419392585754e-01 -2.8198169544339180e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4185 2.1017350256443024e-02</internalNodes>\n          <leafValues>\n            -1.9653260707855225e-02 1.0432569682598114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4186 2.4515210092067719e-01</internalNodes>\n          <leafValues>\n            8.4479590877890587e-03 -7.4833422899246216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4187 4.3030278757214546e-03</internalNodes>\n          <leafValues>\n            3.1172480434179306e-02 -9.4183586537837982e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4188 2.2224480286240578e-02</internalNodes>\n          <leafValues>\n            -3.9602920413017273e-02 1.5614870190620422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4189 -8.5019748657941818e-03</internalNodes>\n          <leafValues>\n            -1.0852319747209549e-01 2.8045600280165672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4190 1.0845540091395378e-02</internalNodes>\n          <leafValues>\n            -6.5594159066677094e-02 1.0217399895191193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4191 1.7696369905024767e-03</internalNodes>\n          <leafValues>\n            7.5369141995906830e-02 -9.5298826694488525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4192 1.0289049893617630e-01</internalNodes>\n          <leafValues>\n            -1.1767229996621609e-02 4.8167210817337036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4193 -3.5074170678853989e-02</internalNodes>\n          <leafValues>\n            -2.6299050450325012e-01 1.0002779774367809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4194 3.8302998989820480e-02</internalNodes>\n          <leafValues>\n            1.0883949697017670e-02 -5.8092927932739258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4195 1.2183119542896748e-02</internalNodes>\n          <leafValues>\n            3.1098999083042145e-02 -5.4257929325103760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4196 2.0388139411807060e-02</internalNodes>\n          <leafValues>\n            -3.7379540503025055e-02 1.8725450336933136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4197 6.5857400186359882e-03</internalNodes>\n          <leafValues>\n            -4.4194780290126801e-02 6.0033790767192841e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4198 5.8739529922604561e-03</internalNodes>\n          <leafValues>\n            3.9219710975885391e-02 -1.5857939422130585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4199 -7.8279033303260803e-02</internalNodes>\n          <leafValues>\n            2.1789179742336273e-01 -1.0094420053064823e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4200 1.5336579643189907e-02</internalNodes>\n          <leafValues>\n            -3.1219519674777985e-02 2.2452400624752045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4201 1.4171670190989971e-03</internalNodes>\n          <leafValues>\n            -1.6625450551509857e-01 2.7684109285473824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4202 -3.4021309111267328e-03</internalNodes>\n          <leafValues>\n            -2.8452378511428833e-01 2.2661060094833374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4203 -1.9340340048074722e-02</internalNodes>\n          <leafValues>\n            5.2300518751144409e-01 -5.0734821707010269e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4204 -1.6514319926500320e-02</internalNodes>\n          <leafValues>\n            7.0619380474090576e-01 -8.2714930176734924e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4205 -6.4589809626340866e-03</internalNodes>\n          <leafValues>\n            -1.2104330211877823e-01 3.8718421012163162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4206 -4.3003219179809093e-03</internalNodes>\n          <leafValues>\n            -1.2103659659624100e-01 5.5335890501737595e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4207 1.0784200392663479e-02</internalNodes>\n          <leafValues>\n            -3.8975819945335388e-02 1.9870519638061523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4208 -1.1527650058269501e-03</internalNodes>\n          <leafValues>\n            9.3596100807189941e-02 -6.4248889684677124e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4209 -4.2101260274648666e-02</internalNodes>\n          <leafValues>\n            -3.0032190680503845e-01 1.5909299254417419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4210 3.0202090274542570e-03</internalNodes>\n          <leafValues>\n            -6.5310478210449219e-02 9.4754762947559357e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4211 2.9999990016222000e-02</internalNodes>\n          <leafValues>\n            1.7673229798674583e-02 -2.2457149624824524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4212 -1.3678170507773757e-03</internalNodes>\n          <leafValues>\n            1.3394910097122192e-01 -5.0086550414562225e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4213 -2.3151950910687447e-02</internalNodes>\n          <leafValues>\n            -1.8310110270977020e-01 1.9103579223155975e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4214 6.3826322555541992e-02</internalNodes>\n          <leafValues>\n            7.5651248916983604e-03 -8.3116590976715088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4215 -1.4831620454788208e-01</internalNodes>\n          <leafValues>\n            -1. 3.4445689525455236e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4216 1.3207890151534230e-04</internalNodes>\n          <leafValues>\n            5.1135819405317307e-02 -1.1863200366497040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4217 6.6078707575798035e-02</internalNodes>\n          <leafValues>\n            7.1528651751577854e-03 -4.2906388640403748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4218 6.1758249066770077e-03</internalNodes>\n          <leafValues>\n            -5.9010580182075500e-02 1.0781309753656387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4219 -3.3506110310554504e-02</internalNodes>\n          <leafValues>\n            -3.7636739015579224e-01 1.7037799581885338e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4220 -9.7032980993390083e-03</internalNodes>\n          <leafValues>\n            1.3820339739322662e-01 -4.3922200798988342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4221 -7.2475131601095200e-03</internalNodes>\n          <leafValues>\n            -2.2192749381065369e-01 1.2801939621567726e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4222 -5.3309328854084015e-02</internalNodes>\n          <leafValues>\n            -4.5594760775566101e-01 1.2495010159909725e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4223 1.0387069545686245e-02</internalNodes>\n          <leafValues>\n            -5.1624130457639694e-02 1.2236239761114120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4224 6.7208573222160339e-02</internalNodes>\n          <leafValues>\n            3.1655121594667435e-02 -2.1086180210113525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4225 -1.5143319964408875e-02</internalNodes>\n          <leafValues>\n            1.7224070429801941e-01 -2.9209939762949944e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4226 -3.9284970611333847e-02</internalNodes>\n          <leafValues>\n            -4.8226779699325562e-01 1.4366200193762779e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4227 -5.1000402309000492e-03</internalNodes>\n          <leafValues>\n            1.3700410723686218e-01 -4.3541591614484787e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4228 4.7284159809350967e-03</internalNodes>\n          <leafValues>\n            6.5495520830154419e-02 -1.2913839519023895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4229 -1.1877629905939102e-02</internalNodes>\n          <leafValues>\n            2.0146130025386810e-01 -2.3640049621462822e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4230 -4.5396368950605392e-03</internalNodes>\n          <leafValues>\n            -1.6872450709342957e-01 4.4881179928779602e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4231 -8.0548608675599098e-03</internalNodes>\n          <leafValues>\n            6.5916322171688080e-02 -4.5184228569269180e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4232 -4.3037731200456619e-02</internalNodes>\n          <leafValues>\n            1.2817430496215820e-01 -6.3021719455718994e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4233 1.0952279716730118e-01</internalNodes>\n          <leafValues>\n            6.0560060665011406e-03 -5.1614511013031006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4234 -7.0019549457356334e-04</internalNodes>\n          <leafValues>\n            -1.2845410406589508e-01 4.9936100840568542e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4235 -2.9595570595120080e-05</internalNodes>\n          <leafValues>\n            6.7076332867145538e-02 -9.0397119522094727e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4236 1.7749640345573425e-01</internalNodes>\n          <leafValues>\n            -7.6472861692309380e-03 8.9716571569442749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4237 -5.5364448577165604e-02</internalNodes>\n          <leafValues>\n            -6.5513938665390015e-01 6.7208600230515003e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4238 -5.1461409777402878e-02</internalNodes>\n          <leafValues>\n            -6.5337532758712769e-01 8.9703118428587914e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4239 -2.6581719517707825e-02</internalNodes>\n          <leafValues>\n            -2.8116428852081299e-01 1.7766090109944344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4240 -6.9034337997436523e-02</internalNodes>\n          <leafValues>\n            9.2583978176116943e-01 -6.2460578046739101e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4241 -3.0205730348825455e-02</internalNodes>\n          <leafValues>\n            2.3784290254116058e-01 -1.6295459121465683e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4242 -9.1226873919367790e-03</internalNodes>\n          <leafValues>\n            -1.4569890499114990e-01 4.5654390007257462e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4243 -2.1233780682086945e-01</internalNodes>\n          <leafValues>\n            1.6472199559211731e-01 -1.4758829958736897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4244 -2.6254689320921898e-02</internalNodes>\n          <leafValues>\n            3.0381628870964050e-01 -2.0108530297875404e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4245 3.0262209475040436e-03</internalNodes>\n          <leafValues>\n            -1.5298280119895935e-01 2.6878539472818375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4246 8.3838596940040588e-02</internalNodes>\n          <leafValues>\n            1.0042349807918072e-02 -5.9345102310180664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4247 1.8845759332180023e-02</internalNodes>\n          <leafValues>\n            -4.5260541141033173e-02 8.4220200777053833e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4248 -4.8671411350369453e-03</internalNodes>\n          <leafValues>\n            -1.1234840005636215e-01 5.6676398962736130e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>243</maxWeakCount>\n      <stageThreshold>-1.4994510412216187e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 4249 1.1900869756937027e-01</internalNodes>\n          <leafValues>\n            -2.0186680555343628e-01 2.4417600035667419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4250 2.1277489140629768e-02</internalNodes>\n          <leafValues>\n            -2.3454399406909943e-01 1.6303069889545441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4251 3.7066950462758541e-03</internalNodes>\n          <leafValues>\n            -2.0559909939765930e-01 1.4982059597969055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4252 3.2929550856351852e-02</internalNodes>\n          <leafValues>\n            7.8803077340126038e-02 -3.3688440918922424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4253 2.5057960301637650e-02</internalNodes>\n          <leafValues>\n            -1.5932090580463409e-01 1.6405050456523895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4254 6.5863109193742275e-04</internalNodes>\n          <leafValues>\n            -2.7804228663444519e-01 8.3028919994831085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4255 -6.6210910677909851e-02</internalNodes>\n          <leafValues>\n            -3.6402150988578796e-01 6.0067348182201385e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4256 4.2186300270259380e-03</internalNodes>\n          <leafValues>\n            -1.8551510572433472e-01 1.2828220427036285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4257 1.7119459807872772e-03</internalNodes>\n          <leafValues>\n            -2.1572509407997131e-01 8.6879499256610870e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4258 -2.1390480920672417e-02</internalNodes>\n          <leafValues>\n            1.1124739795923233e-01 -1.4486509561538696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4259 5.5712480098009109e-03</internalNodes>\n          <leafValues>\n            6.2546879053115845e-02 -3.1598201394081116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4260 4.5709838159382343e-03</internalNodes>\n          <leafValues>\n            -2.3647899925708771e-01 3.8399569690227509e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4261 -1.7086030915379524e-02</internalNodes>\n          <leafValues>\n            2.0653559267520905e-01 -8.6405612528324127e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4262 -3.0640950426459312e-02</internalNodes>\n          <leafValues>\n            4.1523000597953796e-01 -2.5601850822567940e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4263 2.5803469121456146e-02</internalNodes>\n          <leafValues>\n            4.0156230330467224e-02 -3.7444010376930237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4264 2.6425920426845551e-02</internalNodes>\n          <leafValues>\n            4.2625781148672104e-02 -4.1888910531997681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4265 -1.1849730275571346e-02</internalNodes>\n          <leafValues>\n            -3.0619880557060242e-01 5.1505949348211288e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4266 -1.6269849613308907e-02</internalNodes>\n          <leafValues>\n            -1.9878490269184113e-01 4.2683240026235580e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4267 -2.4036159738898277e-02</internalNodes>\n          <leafValues>\n            -3.3211991190910339e-01 4.6091418713331223e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4268 7.3583971243351698e-04</internalNodes>\n          <leafValues>\n            -2.0677410066127777e-01 5.7418260723352432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4269 -2.0423160865902901e-02</internalNodes>\n          <leafValues>\n            -2.6922059059143066e-01 4.4893719255924225e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4270 1.9533000886440277e-03</internalNodes>\n          <leafValues>\n            4.3481849133968353e-02 -1.4295850694179535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4271 3.3202540129423141e-02</internalNodes>\n          <leafValues>\n            6.1112720519304276e-02 -2.0773139595985413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4272 2.1049549803137779e-02</internalNodes>\n          <leafValues>\n            -5.5196329951286316e-02 1.7273330688476562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4273 -4.2487941682338715e-03</internalNodes>\n          <leafValues>\n            -3.1202110648155212e-01 3.5714551806449890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4274 1.4544890262186527e-02</internalNodes>\n          <leafValues>\n            -1.2891520559787750e-01 1.0874609649181366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4275 4.4858800247311592e-03</internalNodes>\n          <leafValues>\n            5.0264850258827209e-02 -2.2729620337486267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4276 -7.2019517421722412e-02</internalNodes>\n          <leafValues>\n            -5.0357151031494141e-01 2.4909170344471931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4277 7.4088312685489655e-02</internalNodes>\n          <leafValues>\n            -2.6110179722309113e-02 4.6904951333999634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4278 -1.9376210868358612e-02</internalNodes>\n          <leafValues>\n            -8.7742328643798828e-02 5.2696809172630310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4279 -1.5192059800028801e-02</internalNodes>\n          <leafValues>\n            -1.6470350325107574e-01 7.4841916561126709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4280 6.7975218407809734e-03</internalNodes>\n          <leafValues>\n            -1.2512689828872681e-01 8.2092992961406708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4281 -1.9816169515252113e-03</internalNodes>\n          <leafValues>\n            6.1259880661964417e-02 -1.9138810038566589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4282 -4.0343839675188065e-02</internalNodes>\n          <leafValues>\n            -3.4634640812873840e-01 3.3814091235399246e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4283 -9.7851715981960297e-03</internalNodes>\n          <leafValues>\n            2.4771960079669952e-01 -5.1031429320573807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4284 1.3061050325632095e-02</internalNodes>\n          <leafValues>\n            -5.9378169476985931e-02 1.4298720657825470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4285 1.2519969604909420e-02</internalNodes>\n          <leafValues>\n            -1.0087440162897110e-01 2.0617449283599854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4286 6.1620049178600311e-02</internalNodes>\n          <leafValues>\n            1.0850620456039906e-02 -4.9976751208305359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4287 1.5351610258221626e-02</internalNodes>\n          <leafValues>\n            3.0459180474281311e-02 -4.0248531103134155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4288 6.7390319891273975e-03</internalNodes>\n          <leafValues>\n            -1.5230870246887207e-01 3.4763731062412262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4289 2.7166040614247322e-02</internalNodes>\n          <leafValues>\n            3.2465178519487381e-02 -3.7905651330947876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4290 -4.9443650990724564e-02</internalNodes>\n          <leafValues>\n            -4.1042488813400269e-01 1.5265700407326221e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4291 3.2999709248542786e-02</internalNodes>\n          <leafValues>\n            2.8922239318490028e-02 -4.3119680881500244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4292 3.7604149430990219e-02</internalNodes>\n          <leafValues>\n            2.0920699462294579e-02 -3.5471540689468384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4293 1.7311640083789825e-02</internalNodes>\n          <leafValues>\n            -1.5490870177745819e-01 7.3543228209018707e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4294 -1.7037079669535160e-03</internalNodes>\n          <leafValues>\n            -9.5346920192241669e-02 5.1517289131879807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4295 -1.5008790418505669e-02</internalNodes>\n          <leafValues>\n            2.1057499945163727e-01 -5.2197169512510300e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4296 -4.1283361613750458e-02</internalNodes>\n          <leafValues>\n            -4.8727679252624512e-01 1.6686370596289635e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4297 -1.7190299928188324e-02</internalNodes>\n          <leafValues>\n            2.3070749640464783e-01 -5.7094439864158630e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4298 3.9707008749246597e-02</internalNodes>\n          <leafValues>\n            1.7016230151057243e-02 -3.8233861327171326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4299 4.7051470726728439e-02</internalNodes>\n          <leafValues>\n            4.2239248752593994e-02 -2.8050369024276733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4300 -1.1948949657380581e-02</internalNodes>\n          <leafValues>\n            -2.3056490719318390e-01 2.6532189920544624e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4301 -7.9857409000396729e-02</internalNodes>\n          <leafValues>\n            -8.4963917732238770e-01 1.2582180090248585e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4302 2.5627639144659042e-02</internalNodes>\n          <leafValues>\n            2.3311240598559380e-02 -2.4923819303512573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4303 -3.1094370409846306e-02</internalNodes>\n          <leafValues>\n            -2.3769870400428772e-01 4.6116128563880920e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4304 4.6573221683502197e-02</internalNodes>\n          <leafValues>\n            2.8770290315151215e-02 -5.3739601373672485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4305 -5.4066929966211319e-02</internalNodes>\n          <leafValues>\n            2.7794760465621948e-01 -4.7770768404006958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4306 1.8918470013886690e-03</internalNodes>\n          <leafValues>\n            -9.8254829645156860e-02 4.7856420278549194e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4307 3.3229328691959381e-02</internalNodes>\n          <leafValues>\n            -5.2595350891351700e-02 2.3564100265502930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4308 1.1775200255215168e-03</internalNodes>\n          <leafValues>\n            -2.3401489853858948e-01 2.6142070069909096e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4309 1.9482020288705826e-03</internalNodes>\n          <leafValues>\n            -1.5223619341850281e-01 7.8751467168331146e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4310 5.5945508182048798e-02</internalNodes>\n          <leafValues>\n            1.1540699750185013e-02 -1.9889539480209351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4311 2.9455369338393211e-02</internalNodes>\n          <leafValues>\n            3.3315770328044891e-02 -3.2850489020347595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4312 4.0880320593714714e-03</internalNodes>\n          <leafValues>\n            -8.6178407073020935e-02 7.9575799405574799e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4313 -5.9127728454768658e-03</internalNodes>\n          <leafValues>\n            -1.7738300561904907e-01 6.0648940503597260e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4314 -6.2419679015874863e-02</internalNodes>\n          <leafValues>\n            2.4396699666976929e-01 -3.3243889920413494e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4315 -3.7195120006799698e-02</internalNodes>\n          <leafValues>\n            2.6807048916816711e-01 -3.9979271590709686e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4316 -1.4324760437011719e-01</internalNodes>\n          <leafValues>\n            2.9332828521728516e-01 -2.6897290721535683e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4317 -4.2845219373703003e-02</internalNodes>\n          <leafValues>\n            -2.5283750891685486e-01 4.1232049465179443e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4318 1.1560089886188507e-01</internalNodes>\n          <leafValues>\n            -1.4965849928557873e-02 2.4187250435352325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4319 5.0169471651315689e-02</internalNodes>\n          <leafValues>\n            8.8590547442436218e-02 -1.2442570179700851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4320 1.0200110077857971e-01</internalNodes>\n          <leafValues>\n            1.2396319769322872e-02 -3.6982178688049316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4321 -5.2397060208022594e-03</internalNodes>\n          <leafValues>\n            -2.5912949442863464e-01 4.0550298988819122e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4322 -1.9227810204029083e-02</internalNodes>\n          <leafValues>\n            2.0064230263233185e-01 -6.5223582088947296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4323 -1.1133120395243168e-02</internalNodes>\n          <leafValues>\n            -4.6262189745903015e-01 2.4428030475974083e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4324 9.7551010549068451e-02</internalNodes>\n          <leafValues>\n            1.2901189737021923e-02 -7.4022471904754639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4325 4.6071741729974747e-02</internalNodes>\n          <leafValues>\n            1.8453989177942276e-02 -4.8419821262359619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4326 -8.3533532917499542e-02</internalNodes>\n          <leafValues>\n            -8.8434767723083496e-01 1.6764779575169086e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4327 6.0535832308232784e-03</internalNodes>\n          <leafValues>\n            -1.5865640342235565e-01 6.7758671939373016e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4328 -1.3178240042179823e-03</internalNodes>\n          <leafValues>\n            -8.7943129241466522e-02 6.6591359674930573e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4329 -2.0939730107784271e-02</internalNodes>\n          <leafValues>\n            2.3358969390392303e-01 -5.2145671099424362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4330 -8.8145419955253601e-02</internalNodes>\n          <leafValues>\n            4.8081308603286743e-01 -1.1917640455067158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4331 1.6344599425792694e-02</internalNodes>\n          <leafValues>\n            -5.3838059306144714e-02 2.2349910438060760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4332 -2.2833999991416931e-01</internalNodes>\n          <leafValues>\n            3.6013820767402649e-01 -1.8727909773588181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4333 8.4737362340092659e-03</internalNodes>\n          <leafValues>\n            -5.6207131594419479e-02 1.6089470684528351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4334 -9.8505034111440182e-04</internalNodes>\n          <leafValues>\n            1.0108830034732819e-01 -1.0455229878425598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4335 4.9648447893559933e-03</internalNodes>\n          <leafValues>\n            -7.9359367489814758e-02 1.3140240311622620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4336 -1.3171610422432423e-02</internalNodes>\n          <leafValues>\n            -1.2099819630384445e-01 3.7730131298303604e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4337 8.2112876698374748e-03</internalNodes>\n          <leafValues>\n            -5.3597409278154373e-02 2.2156579792499542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4338 -4.8930559307336807e-02</internalNodes>\n          <leafValues>\n            -3.9349249005317688e-01 1.9850309938192368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4339 7.4527352117002010e-03</internalNodes>\n          <leafValues>\n            5.8218438178300858e-02 -2.5317558646202087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4340 7.7388651669025421e-02</internalNodes>\n          <leafValues>\n            -5.7724680751562119e-02 2.0154540240764618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4341 4.9968929961323738e-03</internalNodes>\n          <leafValues>\n            8.9260630309581757e-02 -1.3082459568977356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4342 -4.0977269411087036e-02</internalNodes>\n          <leafValues>\n            -1.7190429568290710e-01 2.2051449865102768e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4343 3.0041709542274475e-03</internalNodes>\n          <leafValues>\n            4.5379869639873505e-02 -2.4130369722843170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4344 1.5435700118541718e-01</internalNodes>\n          <leafValues>\n            -3.2916471362113953e-02 3.2090398669242859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4345 1.5153509564697742e-02</internalNodes>\n          <leafValues>\n            5.3576458245515823e-02 -1.6273179650306702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4346 9.5209293067455292e-02</internalNodes>\n          <leafValues>\n            1.3132530264556408e-02 -4.3389630317687988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4347 -2.2066019475460052e-02</internalNodes>\n          <leafValues>\n            1.8358850479125977e-01 -5.3995680063962936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4348 -4.0623430162668228e-02</internalNodes>\n          <leafValues>\n            -4.5687249302864075e-01 1.1119400151073933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4349 -2.1428579930216074e-03</internalNodes>\n          <leafValues>\n            9.5221467316150665e-02 -1.0431689769029617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4350 -9.6598910167813301e-03</internalNodes>\n          <leafValues>\n            -2.8121781349182129e-01 3.1387180089950562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4351 -1.7860020697116852e-01</internalNodes>\n          <leafValues>\n            4.6675390005111694e-01 -2.2296290844678879e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4352 -2.0536049269139767e-03</internalNodes>\n          <leafValues>\n            -8.8460110127925873e-02 2.5863479822874069e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4353 -4.6333461068570614e-03</internalNodes>\n          <leafValues>\n            6.0720779001712799e-02 -1.6562700271606445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4354 4.6847991645336151e-02</internalNodes>\n          <leafValues>\n            -4.0696758776903152e-02 1.0598970204591751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4355 -9.0538233518600464e-02</internalNodes>\n          <leafValues>\n            -6.3367050886154175e-01 1.6277700662612915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4356 -6.6260926425457001e-02</internalNodes>\n          <leafValues>\n            -2.8792759776115417e-01 6.1133177950978279e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4357 2.4731729179620743e-02</internalNodes>\n          <leafValues>\n            4.0057931095361710e-02 -2.3272530734539032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4358 -1.3736580312252045e-01</internalNodes>\n          <leafValues>\n            4.7250029444694519e-01 -8.2997139543294907e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4359 -6.3414901494979858e-02</internalNodes>\n          <leafValues>\n            4.3039301037788391e-01 -2.1049000322818756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4360 -3.3071819692850113e-02</internalNodes>\n          <leafValues>\n            -1.1073499917984009e-01 3.3718731254339218e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4361 1.0934790223836899e-01</internalNodes>\n          <leafValues>\n            1.3508499599993229e-02 -6.5502017736434937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4362 1.5925880521535873e-02</internalNodes>\n          <leafValues>\n            3.3672690391540527e-02 -7.0779062807559967e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4363 -7.4891438707709312e-03</internalNodes>\n          <leafValues>\n            -2.6472839713096619e-01 3.8183860480785370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4364 9.8611623980104923e-04</internalNodes>\n          <leafValues>\n            -1.6149909794330597e-01 2.9475390911102295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4365 2.5206479430198669e-01</internalNodes>\n          <leafValues>\n            -3.2382488250732422e-02 3.1068611145019531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4366 -2.8892729431390762e-02</internalNodes>\n          <leafValues>\n            -4.9116641283035278e-01 1.4923149719834328e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4367 -5.5389881134033203e-02</internalNodes>\n          <leafValues>\n            5.7543408870697021e-01 -1.8582839518785477e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4368 3.1414598226547241e-02</internalNodes>\n          <leafValues>\n            2.0720759406685829e-02 -9.4729647040367126e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4369 2.8307519387453794e-03</internalNodes>\n          <leafValues>\n            -2.2519350051879883e-01 4.1564159095287323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4370 -3.3751260489225388e-02</internalNodes>\n          <leafValues>\n            -1.6646580398082733e-01 7.2693623602390289e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4371 -3.8290288299322128e-02</internalNodes>\n          <leafValues>\n            7.9213732481002808e-01 -1.1434529908001423e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4372 -1.7989480867981911e-02</internalNodes>\n          <leafValues>\n            1.1361669749021530e-01 -4.4032510370016098e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4373 1.8146529793739319e-02</internalNodes>\n          <leafValues>\n            3.4219540655612946e-02 -2.5041630864143372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4374 -6.9133192300796509e-02</internalNodes>\n          <leafValues>\n            -2.9793199896812439e-01 4.9929767847061157e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4375 1.2525920569896698e-01</internalNodes>\n          <leafValues>\n            1.0709079913794994e-02 -7.6342308521270752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4376 3.7683561444282532e-02</internalNodes>\n          <leafValues>\n            -3.4866910427808762e-02 1.9532379508018494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4377 -7.6676071621477604e-03</internalNodes>\n          <leafValues>\n            1.7114819586277008e-01 -5.1101781427860260e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4378 3.5654550883919001e-03</internalNodes>\n          <leafValues>\n            -6.9071911275386810e-02 6.5724693238735199e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4379 -1.8968600779771805e-02</internalNodes>\n          <leafValues>\n            -4.0976929664611816e-01 2.0560229197144508e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4380 -2.0211370661854744e-02</internalNodes>\n          <leafValues>\n            3.3508920669555664e-01 -2.7907410636544228e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4381 -1.9064599648118019e-02</internalNodes>\n          <leafValues>\n            1.9361929595470428e-01 -4.8648219555616379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4382 1.0313340276479721e-01</internalNodes>\n          <leafValues>\n            1.9382460042834282e-02 -1.1198680102825165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4383 9.8863355815410614e-03</internalNodes>\n          <leafValues>\n            -2.4043160676956177e-01 4.4305600225925446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4384 4.3293699622154236e-02</internalNodes>\n          <leafValues>\n            1.0728780180215836e-02 -6.4660537242889404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4385 6.1878331005573273e-02</internalNodes>\n          <leafValues>\n            1.0291899554431438e-02 -7.2967112064361572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4386 9.7703160718083382e-03</internalNodes>\n          <leafValues>\n            3.1311180442571640e-02 -1.5605080127716064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4387 -8.3175063133239746e-02</internalNodes>\n          <leafValues>\n            -3.3045348525047302e-01 2.3997390642762184e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4388 -3.1724658608436584e-01</internalNodes>\n          <leafValues>\n            5.4760771989822388e-01 -1.7853379249572754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4389 6.7434520460665226e-03</internalNodes>\n          <leafValues>\n            -6.6969439387321472e-02 1.2657959759235382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4390 4.0886890143156052e-02</internalNodes>\n          <leafValues>\n            4.3191551230847836e-03 -2.2032399475574493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4391 6.4959921874105930e-03</internalNodes>\n          <leafValues>\n            5.4097741842269897e-02 -1.5504899621009827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4392 -3.2832350581884384e-02</internalNodes>\n          <leafValues>\n            3.0770578980445862e-01 -2.4346910417079926e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4393 -1.6127960756421089e-02</internalNodes>\n          <leafValues>\n            -1.0477919876575470e-01 9.1267466545104980e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4394 3.4646671265363693e-02</internalNodes>\n          <leafValues>\n            1.4030230231583118e-02 -1.8207600712776184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4395 -3.3005408942699432e-02</internalNodes>\n          <leafValues>\n            3.8698929548263550e-01 -2.1859629079699516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4396 -4.3908338993787766e-02</internalNodes>\n          <leafValues>\n            -3.0621778964996338e-01 2.2774800658226013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4397 2.4842899292707443e-02</internalNodes>\n          <leafValues>\n            3.2077241688966751e-02 -2.5279021263122559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4398 1.0331260040402412e-02</internalNodes>\n          <leafValues>\n            -6.0551200062036514e-02 1.2119130045175552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4399 -6.7832246422767639e-02</internalNodes>\n          <leafValues>\n            -5.5833387374877930e-01 1.5336999669671059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4400 3.4947868436574936e-02</internalNodes>\n          <leafValues>\n            1.1647179722785950e-02 -2.5563651323318481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4401 -2.5261789560317993e-02</internalNodes>\n          <leafValues>\n            3.2832020521163940e-01 -2.3357210680842400e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4402 7.5701558962464333e-03</internalNodes>\n          <leafValues>\n            7.1183882653713226e-02 -8.3878181874752045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4403 1.1809100210666656e-01</internalNodes>\n          <leafValues>\n            -4.1809991002082825e-02 2.2083349525928497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4404 3.6332231014966965e-02</internalNodes>\n          <leafValues>\n            1.7415270209312439e-01 -5.1788080483675003e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4405 1.3216850347816944e-02</internalNodes>\n          <leafValues>\n            -4.7699850797653198e-01 1.8878389149904251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4406 1.4325110241770744e-02</internalNodes>\n          <leafValues>\n            2.1834760904312134e-02 -1.3961690664291382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4407 1.3779220171272755e-03</internalNodes>\n          <leafValues>\n            -2.0156779885292053e-01 3.9925381541252136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4408 1.4492850005626678e-01</internalNodes>\n          <leafValues>\n            -3.3947311341762543e-02 1.4805939793586731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4409 2.0336720347404480e-01</internalNodes>\n          <leafValues>\n            -2.8280159458518028e-02 3.0469599366188049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4410 -3.0550520867109299e-02</internalNodes>\n          <leafValues>\n            1.5751589834690094e-01 -3.4339658915996552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4411 -1.1067859828472137e-02</internalNodes>\n          <leafValues>\n            2.4688349664211273e-01 -3.7554491311311722e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4412 2.5981210172176361e-02</internalNodes>\n          <leafValues>\n            2.1994030103087425e-02 -1.4765749871730804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4413 -4.8331938683986664e-02</internalNodes>\n          <leafValues>\n            -2.5580298900604248e-01 3.2857868820428848e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4414 1.5268280170857906e-02</internalNodes>\n          <leafValues>\n            6.2162041664123535e-02 -5.1811810582876205e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4415 -2.4390730261802673e-01</internalNodes>\n          <leafValues>\n            5.0339847803115845e-01 -1.6864169389009476e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4416 -3.2398870680481195e-03</internalNodes>\n          <leafValues>\n            -1.3850170373916626e-01 6.3738316297531128e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4417 6.1450928449630737e-02</internalNodes>\n          <leafValues>\n            -5.6962829083204269e-02 1.4706780016422272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4418 4.3161489069461823e-02</internalNodes>\n          <leafValues>\n            2.3441100493073463e-02 -2.6922780275344849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4419 -1.1370860040187836e-02</internalNodes>\n          <leafValues>\n            -2.6135998964309692e-01 3.3624760806560516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4420 -1.5418549999594688e-02</internalNodes>\n          <leafValues>\n            2.2153179347515106e-01 -4.0866490453481674e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4421 4.5487228780984879e-02</internalNodes>\n          <leafValues>\n            -3.1598750501871109e-02 2.5687301158905029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4422 -1.5879619866609573e-02</internalNodes>\n          <leafValues>\n            -2.9981338977813721e-01 2.7006199583411217e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4423 5.7012498378753662e-02</internalNodes>\n          <leafValues>\n            1.5179580077528954e-02 -5.2078807353973389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4424 -1.5038490295410156e-01</internalNodes>\n          <leafValues>\n            2.5164321064949036e-01 -4.0796510875225067e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4425 -4.2246039956808090e-02</internalNodes>\n          <leafValues>\n            -4.8303580284118652e-01 1.9222039729356766e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4426 -7.4928469955921173e-02</internalNodes>\n          <leafValues>\n            -9.5458990335464478e-01 4.4229729101061821e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4427 -2.1251840516924858e-02</internalNodes>\n          <leafValues>\n            3.1850698590278625e-01 -2.8021970763802528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4428 5.3983781486749649e-02</internalNodes>\n          <leafValues>\n            2.7037480846047401e-02 -3.4430688619613647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4429 3.3572580665349960e-02</internalNodes>\n          <leafValues>\n            -7.6545879244804382e-02 1.4255550503730774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4430 -6.7975879646837711e-03</internalNodes>\n          <leafValues>\n            1.7748320102691650e-01 -4.3155338615179062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4431 -1.3311849907040596e-03</internalNodes>\n          <leafValues>\n            1.5498100221157074e-01 -7.6261833310127258e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4432 3.9364699274301529e-02</internalNodes>\n          <leafValues>\n            3.6991588771343231e-02 -2.4243550002574921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4433 -6.8364520557224751e-03</internalNodes>\n          <leafValues>\n            1.0743640363216400e-01 -9.3058176338672638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4434 1.6118010506033897e-02</internalNodes>\n          <leafValues>\n            -3.5690911114215851e-02 2.4185790121555328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4435 -7.0620089769363403e-02</internalNodes>\n          <leafValues>\n            6.3363391160964966e-01 -1.2438289821147919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4436 4.4361630082130432e-01</internalNodes>\n          <leafValues>\n            -3.7221789360046387e-02 1.1892700195312500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4437 -8.1899233162403107e-02</internalNodes>\n          <leafValues>\n            3.4853339195251465e-01 -2.5211019441485405e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4438 -8.2997446879744530e-03</internalNodes>\n          <leafValues>\n            -3.0899089574813843e-01 2.5778239592909813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4439 -2.9730390757322311e-02</internalNodes>\n          <leafValues>\n            -3.0759811401367188e-01 2.5530820712447166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4440 -2.6014490053057671e-02</internalNodes>\n          <leafValues>\n            -1.2162390351295471e-01 1.8338350579142570e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4441 4.5121149742044508e-04</internalNodes>\n          <leafValues>\n            -5.4737848043441772e-01 1.3564749620854855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4442 1.8679940700531006e-01</internalNodes>\n          <leafValues>\n            7.8039847314357758e-02 -5.8137271553277969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4443 3.1894310377538204e-03</internalNodes>\n          <leafValues>\n            -2.4976019561290741e-01 3.0865840613842010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4444 -2.9449069872498512e-02</internalNodes>\n          <leafValues>\n            1.0489200055599213e-01 -4.8869129270315170e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4445 2.9614970088005066e-02</internalNodes>\n          <leafValues>\n            -2.2261720150709152e-02 3.4992438554763794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4446 3.9882060140371323e-02</internalNodes>\n          <leafValues>\n            9.6727507188916206e-03 -6.7914432287216187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4447 -2.4404419586062431e-02</internalNodes>\n          <leafValues>\n            -2.6743829250335693e-01 3.0360370874404907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4448 4.3481849133968353e-02</internalNodes>\n          <leafValues>\n            -2.3372199386358261e-02 2.1356420218944550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4449 -4.8128370195627213e-02</internalNodes>\n          <leafValues>\n            -3.6890029907226562e-01 2.2832820191979408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4450 -1.3142440002411604e-03</internalNodes>\n          <leafValues>\n            5.6764688342809677e-02 -1.3795310258865356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4451 2.1767991129308939e-03</internalNodes>\n          <leafValues>\n            8.2446262240409851e-02 -1.0511689633131027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4452 -2.7471050620079041e-02</internalNodes>\n          <leafValues>\n            9.6438340842723846e-02 -5.1520779728889465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4453 5.2003171294927597e-02</internalNodes>\n          <leafValues>\n            -2.3240759968757629e-02 3.5900598764419556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4454 2.9681740328669548e-02</internalNodes>\n          <leafValues>\n            1.4641559682786465e-02 -2.1500889956951141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4455 -4.7545950859785080e-02</internalNodes>\n          <leafValues>\n            -3.8834908604621887e-01 2.2062640637159348e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4456 -9.6900813281536102e-02</internalNodes>\n          <leafValues>\n            -4.3412810564041138e-01 6.4087379723787308e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4457 -3.8218989968299866e-01</internalNodes>\n          <leafValues>\n            -9.0176671743392944e-01 7.9825157299637794e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4458 -3.4389309585094452e-02</internalNodes>\n          <leafValues>\n            -3.1850269436836243e-01 9.1135511174798012e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4459 3.9068788290023804e-02</internalNodes>\n          <leafValues>\n            2.8420960530638695e-02 -2.6570749282836914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4460 1.0031700134277344e-01</internalNodes>\n          <leafValues>\n            -1.6155399382114410e-02 1.2212689965963364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4461 -1.0857210308313370e-01</internalNodes>\n          <leafValues>\n            3.7742871046066284e-01 -2.4014420807361603e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4462 -4.3303978600306436e-05</internalNodes>\n          <leafValues>\n            2.0308060571551323e-02 -1.3060510158538818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4463 -3.8757279515266418e-02</internalNodes>\n          <leafValues>\n            -1.5826420485973358e-01 4.9129229038953781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4464 6.8668089807033539e-02</internalNodes>\n          <leafValues>\n            5.5041261948645115e-03 -7.2222518920898438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4465 -4.4268090277910233e-03</internalNodes>\n          <leafValues>\n            8.2263059914112091e-02 -1.0354729741811752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4466 -3.1016240245662630e-04</internalNodes>\n          <leafValues>\n            9.0432256460189819e-02 -1.0348629951477051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4467 3.7703070789575577e-02</internalNodes>\n          <leafValues>\n            6.0126338154077530e-02 -1.6111390292644501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4468 4.1672129184007645e-02</internalNodes>\n          <leafValues>\n            8.5145309567451477e-03 -2.4217429757118225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4469 -6.6434321925044060e-03</internalNodes>\n          <leafValues>\n            -2.7172479033470154e-01 3.1463291496038437e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4470 -4.0658649057149887e-02</internalNodes>\n          <leafValues>\n            -1.1673620343208313e-01 1.4849590137600899e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4471 -3.0082110315561295e-03</internalNodes>\n          <leafValues>\n            4.0028568357229233e-02 -2.3079049587249756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4472 -4.4187769293785095e-02</internalNodes>\n          <leafValues>\n            -1.7888109385967255e-01 1.7313620075583458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4473 -1.1813719756901264e-02</internalNodes>\n          <leafValues>\n            1.5633359551429749e-01 -5.4751630872488022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4474 -2.4433450400829315e-01</internalNodes>\n          <leafValues>\n            4.0716889500617981e-01 -3.8216509856283665e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4475 4.7230181097984314e-01</internalNodes>\n          <leafValues>\n            -5.5454619228839874e-02 1.6410639882087708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4476 1.7955109942704439e-03</internalNodes>\n          <leafValues>\n            9.5228001475334167e-02 -1.2934769690036774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4477 -5.0934039056301117e-02</internalNodes>\n          <leafValues>\n            2.2153440117835999e-01 -3.7975560873746872e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4478 -5.9531718492507935e-02</internalNodes>\n          <leafValues>\n            -4.2974939942359924e-01 1.3196409679949284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4479 -3.5149399191141129e-02</internalNodes>\n          <leafValues>\n            -2.1232509613037109e-01 3.6872539669275284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4480 -8.2134327385574579e-04</internalNodes>\n          <leafValues>\n            7.4890241026878357e-02 -6.9701731204986572e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4481 6.3945869915187359e-03</internalNodes>\n          <leafValues>\n            8.0602109432220459e-02 -1.0488619655370712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4482 6.3735827803611755e-02</internalNodes>\n          <leafValues>\n            1.1988660320639610e-02 -5.9508371353149414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4483 6.6942021250724792e-02</internalNodes>\n          <leafValues>\n            1.0711859911680222e-02 -7.0240277051925659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4484 3.5445358604192734e-02</internalNodes>\n          <leafValues>\n            8.8395569473505020e-03 -2.0588539540767670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4485 8.2025423645973206e-02</internalNodes>\n          <leafValues>\n            1.1511360295116901e-02 -6.7081338167190552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4486 -1.2151840329170227e-01</internalNodes>\n          <leafValues>\n            3.9124768972396851e-01 -6.0432488098740578e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4487 1.3732859492301941e-01</internalNodes>\n          <leafValues>\n            -1.6136020421981812e-02 4.6182548999786377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4488 -1.6075259447097778e-01</internalNodes>\n          <leafValues>\n            -1. 2.4232869036495686e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4489 6.3080438412725925e-03</internalNodes>\n          <leafValues>\n            4.3026689440011978e-02 -1.9072249531745911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4490 -8.5772968828678131e-02</internalNodes>\n          <leafValues>\n            -5.3327548503875732e-01 1.4197999611496925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4491 5.5853448808193207e-02</internalNodes>\n          <leafValues>\n            4.0535259991884232e-02 -2.0816819369792938e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>350</maxWeakCount>\n      <stageThreshold>-1.3171190023422241e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 4492 -1.1009960435330868e-02</internalNodes>\n          <leafValues>\n            1.6106800734996796e-01 -2.3270499706268311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4493 5.6892321445047855e-03</internalNodes>\n          <leafValues>\n            -2.2233660519123077e-01 1.2257739901542664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4494 4.3932348489761353e-03</internalNodes>\n          <leafValues>\n            -1.5293380618095398e-01 1.5888489782810211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4495 -5.0024059601128101e-04</internalNodes>\n          <leafValues>\n            6.1716180294752121e-02 -2.3175540566444397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4496 4.2015648796223104e-04</internalNodes>\n          <leafValues>\n            -3.0259498953819275e-01 6.1093948781490326e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4497 -4.2626978829503059e-03</internalNodes>\n          <leafValues>\n            -2.4387679994106293e-01 6.9513782858848572e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4498 6.5330968936905265e-04</internalNodes>\n          <leafValues>\n            -3.7112379074096680e-01 4.6169780194759369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4499 -1.0163539648056030e-01</internalNodes>\n          <leafValues>\n            4.5089960098266602e-01 -1.4424510300159454e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4500 -1.3200199464336038e-03</internalNodes>\n          <leafValues>\n            7.5765132904052734e-02 -1.9461849331855774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4501 -9.8261423408985138e-03</internalNodes>\n          <leafValues>\n            -2.7440890669822693e-01 5.2373219281435013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4502 -6.6574551165103912e-02</internalNodes>\n          <leafValues>\n            4.2804849147796631e-01 -3.2640948891639709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4503 -9.1772843152284622e-03</internalNodes>\n          <leafValues>\n            -2.5876390933990479e-01 6.1596788465976715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4504 -2.5353950913995504e-03</internalNodes>\n          <leafValues>\n            1.1473689973354340e-01 -1.0097979754209518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4505 4.9194418825209141e-03</internalNodes>\n          <leafValues>\n            4.0027469396591187e-02 -1.6378170251846313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4506 -1.6810640227049589e-03</internalNodes>\n          <leafValues>\n            -1.3706670701503754e-01 8.0321729183197021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4507 2.1476070396602154e-03</internalNodes>\n          <leafValues>\n            -2.3408600687980652e-01 4.3113950639963150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4508 -3.3502440899610519e-02</internalNodes>\n          <leafValues>\n            -2.4204289913177490e-01 4.9100209027528763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4509 1.4241789281368256e-01</internalNodes>\n          <leafValues>\n            -2.8680980205535889e-02 4.7807058691978455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4510 5.8733951300382614e-04</internalNodes>\n          <leafValues>\n            -2.1685610711574554e-01 4.8530109226703644e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4511 -1.2295519700273871e-03</internalNodes>\n          <leafValues>\n            9.3180246651172638e-02 -1.0158210247755051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4512 1.1210669763386250e-02</internalNodes>\n          <leafValues>\n            3.6210179328918457e-02 -2.3106449842453003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4513 -2.5235990062355995e-02</internalNodes>\n          <leafValues>\n            8.5747621953487396e-02 -5.4415158927440643e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4514 -1.0014030151069164e-02</internalNodes>\n          <leafValues>\n            -1.9362440705299377e-01 5.0274729728698730e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4515 -4.5554949901998043e-03</internalNodes>\n          <leafValues>\n            8.8674992322921753e-02 -1.4237509667873383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4516 -9.5264799892902374e-03</internalNodes>\n          <leafValues>\n            2.6754239201545715e-01 -3.7632450461387634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4517 2.3753349669277668e-03</internalNodes>\n          <leafValues>\n            3.9261918514966965e-02 -1.4199909567832947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4518 1.2389000039547682e-03</internalNodes>\n          <leafValues>\n            6.8643912672996521e-02 -1.8060870468616486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4519 -1.5835729427635670e-03</internalNodes>\n          <leafValues>\n            -1.3684159517288208e-01 5.7875689119100571e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4520 6.5202586352825165e-02</internalNodes>\n          <leafValues>\n            -3.4448388963937759e-02 2.5318139791488647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4521 6.6306376538705081e-05</internalNodes>\n          <leafValues>\n            -8.4601633250713348e-02 9.1657586395740509e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4522 1.5117590010049753e-05</internalNodes>\n          <leafValues>\n            -9.3343816697597504e-02 1.1079390347003937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4523 -2.2637350484728813e-03</internalNodes>\n          <leafValues>\n            -1.9531199336051941e-01 3.8263510912656784e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4524 6.5463641658425331e-04</internalNodes>\n          <leafValues>\n            4.7860879451036453e-02 -1.6354900598526001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4525 5.0345290452241898e-02</internalNodes>\n          <leafValues>\n            -1.5618369914591312e-02 5.2660512924194336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4526 8.5375197231769562e-03</internalNodes>\n          <leafValues>\n            3.3894728869199753e-02 -2.7040940523147583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4527 -6.1621618270874023e-01</internalNodes>\n          <leafValues>\n            -9.3156081438064575e-01 2.6866910047829151e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4528 -2.6742840185761452e-02</internalNodes>\n          <leafValues>\n            1.2415560334920883e-01 -8.1576861441135406e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4529 -1.4756740070879459e-02</internalNodes>\n          <leafValues>\n            -4.4224148988723755e-01 2.4418739601969719e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4530 1.2045809999108315e-02</internalNodes>\n          <leafValues>\n            -8.4552876651287079e-02 9.2735297977924347e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4531 -4.0131900459527969e-02</internalNodes>\n          <leafValues>\n            -2.5734719634056091e-01 1.0692110285162926e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4532 -1.0760580189526081e-03</internalNodes>\n          <leafValues>\n            2.8027180582284927e-02 -2.6805961132049561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4533 7.7456878498196602e-03</internalNodes>\n          <leafValues>\n            -3.6401689052581787e-02 2.6165041327476501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4534 1.3539849780499935e-02</internalNodes>\n          <leafValues>\n            2.8945919126272202e-02 -2.8003379702568054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4535 -1.2464780360460281e-02</internalNodes>\n          <leafValues>\n            -3.6258488893508911e-01 1.3006039895117283e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4536 3.5297829657793045e-02</internalNodes>\n          <leafValues>\n            1.2918749824166298e-02 -5.6460797786712646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4537 -5.5710550397634506e-02</internalNodes>\n          <leafValues>\n            1.2794859707355499e-01 -3.8257118314504623e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4538 -4.5230439864099026e-03</internalNodes>\n          <leafValues>\n            -9.9410563707351685e-02 7.8997522592544556e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4539 2.9874469619244337e-03</internalNodes>\n          <leafValues>\n            -4.8509139567613602e-02 1.1298680305480957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4540 -6.3613310456275940e-02</internalNodes>\n          <leafValues>\n            -6.6647279262542725e-01 1.1221170425415039e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4541 1.3244490139186382e-02</internalNodes>\n          <leafValues>\n            -6.1976868659257889e-02 1.3122899830341339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4542 -3.6382430698722601e-04</internalNodes>\n          <leafValues>\n            4.3054241687059402e-02 -1.6996359825134277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4543 -2.1500189602375031e-01</internalNodes>\n          <leafValues>\n            -4.6784079074859619e-01 1.2286320328712463e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4544 6.0248938389122486e-03</internalNodes>\n          <leafValues>\n            -5.1475919783115387e-02 1.5234859287738800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4545 4.3000571429729462e-02</internalNodes>\n          <leafValues>\n            3.8120739627629519e-03 -7.5349187850952148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4546 8.5592586547136307e-03</internalNodes>\n          <leafValues>\n            2.4470439180731773e-02 -3.2796609401702881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4547 2.9510160675272346e-04</internalNodes>\n          <leafValues>\n            -7.6456926763057709e-02 6.8010047078132629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4548 9.9761411547660828e-04</internalNodes>\n          <leafValues>\n            -8.4680661559104919e-02 9.6316136419773102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4549 5.0175599753856659e-03</internalNodes>\n          <leafValues>\n            -3.9048101752996445e-02 1.0983789712190628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4550 5.5693010799586773e-03</internalNodes>\n          <leafValues>\n            4.0719300508499146e-02 -1.8395960330963135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4551 1.0486049577593803e-03</internalNodes>\n          <leafValues>\n            -4.4622048735618591e-02 7.0918112993240356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4552 3.2043100800365210e-03</internalNodes>\n          <leafValues>\n            -5.8839108794927597e-02 1.2777310609817505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4553 -1.0644660145044327e-01</internalNodes>\n          <leafValues>\n            4.3339949846267700e-01 -1.2449969537556171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4554 -8.9908082736656070e-04</internalNodes>\n          <leafValues>\n            -1.1510500311851501e-01 6.3306562602519989e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4555 2.9652470257133245e-03</internalNodes>\n          <leafValues>\n            -3.1290680170059204e-02 7.2845660150051117e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4556 8.9800870046019554e-04</internalNodes>\n          <leafValues>\n            -8.6840502917766571e-02 1.0022729635238647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4557 -2.1874029189348221e-02</internalNodes>\n          <leafValues>\n            7.6143169403076172e-01 -4.5735938474535942e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4558 1.4919589739292860e-03</internalNodes>\n          <leafValues>\n            8.2724168896675110e-02 -9.6837893128395081e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4559 -2.4136069696396589e-03</internalNodes>\n          <leafValues>\n            6.2480941414833069e-02 -5.0549559295177460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4560 1.2893830426037312e-02</internalNodes>\n          <leafValues>\n            -3.3901989459991455e-02 2.8036591410636902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4561 -1.9992720335721970e-03</internalNodes>\n          <leafValues>\n            -1.7152810096740723e-01 4.0084149688482285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4562 1.3713949592784047e-03</internalNodes>\n          <leafValues>\n            -1.2216719985008240e-01 6.2122181057929993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4563 -8.9740045368671417e-03</internalNodes>\n          <leafValues>\n            -1.7094230651855469e-01 4.4032000005245209e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4564 -2.9300691094249487e-03</internalNodes>\n          <leafValues>\n            1.2364040315151215e-01 -6.3765726983547211e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4565 -8.0555928871035576e-03</internalNodes>\n          <leafValues>\n            1.1552560329437256e-01 -4.4458869844675064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4566 6.4662001095712185e-03</internalNodes>\n          <leafValues>\n            7.5147427618503571e-02 -1.1281009763479233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4567 -1.9541789591312408e-01</internalNodes>\n          <leafValues>\n            -8.6494231224060059e-01 3.1826570630073547e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4568 -1.5740759670734406e-01</internalNodes>\n          <leafValues>\n            -7.2405809164047241e-01 9.4235781580209732e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4569 -3.1526461243629456e-02</internalNodes>\n          <leafValues>\n            -3.8218951225280762e-01 1.6386790201067924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4570 5.0439048558473587e-02</internalNodes>\n          <leafValues>\n            -2.7623040601611137e-02 2.7306279540061951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4571 -5.5078428704291582e-04</internalNodes>\n          <leafValues>\n            4.9623548984527588e-02 -5.4462801665067673e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4572 1.5047970227897167e-03</internalNodes>\n          <leafValues>\n            -6.2058940529823303e-02 1.2204010039567947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4573 -4.5796841382980347e-02</internalNodes>\n          <leafValues>\n            -9.3314772844314575e-01 6.8162381649017334e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4574 -9.3235643580555916e-03</internalNodes>\n          <leafValues>\n            -2.7436700463294983e-01 2.7820749208331108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4575 1.0689129680395126e-01</internalNodes>\n          <leafValues>\n            4.7212988138198853e-03 -4.4037041068077087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4576 1.1234519770368934e-03</internalNodes>\n          <leafValues>\n            -1.4162249863147736e-01 4.7511368989944458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4577 6.7312899045646191e-03</internalNodes>\n          <leafValues>\n            -4.5881479978561401e-02 1.1342740058898926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4578 4.1264150291681290e-02</internalNodes>\n          <leafValues>\n            1.1406780220568180e-02 -6.2894171476364136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4579 -7.3788799345493317e-02</internalNodes>\n          <leafValues>\n            -4.1924831271171570e-01 7.9344836995005608e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4580 -3.2669529318809509e-02</internalNodes>\n          <leafValues>\n            2.2224910557270050e-01 -3.0845979228615761e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4581 -5.9001590125262737e-03</internalNodes>\n          <leafValues>\n            -1.5003520250320435e-01 4.5819710940122604e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4582 -7.4141867458820343e-02</internalNodes>\n          <leafValues>\n            5.6236612796783447e-01 -1.1184119619429111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4583 -1.7110589891672134e-02</internalNodes>\n          <leafValues>\n            -3.0888330936431885e-01 1.7340350896120071e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4584 2.4508470669388771e-03</internalNodes>\n          <leafValues>\n            -5.7074081152677536e-02 1.1306890100240707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4585 -2.1157979965209961e-02</internalNodes>\n          <leafValues>\n            2.0264630019664764e-01 -1.4705169945955276e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4586 7.1819419972598553e-03</internalNodes>\n          <leafValues>\n            2.9788199812173843e-02 -2.2308370471000671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4587 5.0557879731059074e-03</internalNodes>\n          <leafValues>\n            -2.6257280260324478e-02 1.2028290331363678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4588 1.2610659934580326e-02</internalNodes>\n          <leafValues>\n            2.5965299457311630e-02 -2.5755238533020020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4589 3.0165250791469589e-05</internalNodes>\n          <leafValues>\n            -1.1994919925928116e-01 2.8916500508785248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4590 -1.3415860012173653e-03</internalNodes>\n          <leafValues>\n            2.0592840015888214e-01 -3.2803039997816086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4591 5.9342157328501344e-04</internalNodes>\n          <leafValues>\n            4.9788691103458405e-02 -7.0998527109622955e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4592 -1.5428929589688778e-02</internalNodes>\n          <leafValues>\n            3.2733771204948425e-01 -2.0239489153027534e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4593 -1.1928460298804566e-04</internalNodes>\n          <leafValues>\n            2.6405010372400284e-02 -1.4666070044040680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4594 -2.1726880222558975e-02</internalNodes>\n          <leafValues>\n            -4.4014349579811096e-01 1.4264649711549282e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4595 -3.0710769817233086e-02</internalNodes>\n          <leafValues>\n            1.3549150526523590e-01 -1.7586210742592812e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4596 4.3861479498445988e-03</internalNodes>\n          <leafValues>\n            5.4423790425062180e-02 -1.1234579980373383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4597 4.7966800630092621e-03</internalNodes>\n          <leafValues>\n            -4.3494079262018204e-02 1.3108870387077332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4598 2.2497470490634441e-03</internalNodes>\n          <leafValues>\n            5.9489808976650238e-02 -1.0955479741096497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4599 4.3578739278018475e-03</internalNodes>\n          <leafValues>\n            5.9186179190874100e-02 -1.3026049733161926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4600 2.0433720201253891e-03</internalNodes>\n          <leafValues>\n            -5.1625490188598633e-02 1.3787810504436493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4601 -2.0268680527806282e-03</internalNodes>\n          <leafValues>\n            8.8105127215385437e-02 -8.5867561399936676e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4602 -6.5703789005056024e-04</internalNodes>\n          <leafValues>\n            7.1044988930225372e-02 -9.0751543641090393e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4603 4.4309969991445541e-02</internalNodes>\n          <leafValues>\n            -1.1522290296852589e-02 2.2733740508556366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4604 4.6578957699239254e-03</internalNodes>\n          <leafValues>\n            -4.6123549342155457e-02 1.5277029573917389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4605 -4.0960058569908142e-02</internalNodes>\n          <leafValues>\n            -5.5988901853561401e-01 1.2064740061759949e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4606 -6.7416871897876263e-03</internalNodes>\n          <leafValues>\n            1.0484070330858231e-01 -6.5152801573276520e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4607 -2.9713090043514967e-04</internalNodes>\n          <leafValues>\n            3.2221201807260513e-02 -8.4709979593753815e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4608 -8.0926045775413513e-03</internalNodes>\n          <leafValues>\n            -1.6476640105247498e-01 4.5700121670961380e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4609 4.0710348635911942e-02</internalNodes>\n          <leafValues>\n            1.0099260136485100e-02 -1.0893329977989197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4610 -1.1402929667383432e-03</internalNodes>\n          <leafValues>\n            -1.9269819557666779e-01 4.4590830802917480e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4611 -2.0306430757045746e-02</internalNodes>\n          <leafValues>\n            6.8668061494827271e-01 -9.8533723503351212e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4612 4.8631370067596436e-02</internalNodes>\n          <leafValues>\n            1.1991590261459351e-02 -6.4770907163619995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4613 -5.4414950311183929e-02</internalNodes>\n          <leafValues>\n            3.4730699658393860e-01 -1.1940590105950832e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4614 -5.9532530605792999e-02</internalNodes>\n          <leafValues>\n            3.6410269141197205e-01 -1.6050819307565689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4615 -3.5089451819658279e-02</internalNodes>\n          <leafValues>\n            -1.9252899289131165e-01 2.3598629981279373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4616 5.7658711448311806e-03</internalNodes>\n          <leafValues>\n            -4.6293850988149643e-02 1.5287970006465912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4617 -2.3687579669058323e-03</internalNodes>\n          <leafValues>\n            5.7345230132341385e-02 -8.8195472955703735e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4618 -2.7341600507497787e-03</internalNodes>\n          <leafValues>\n            -2.3896160721778870e-01 2.5761809200048447e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4619 -9.1599775478243828e-03</internalNodes>\n          <leafValues>\n            1.0037499666213989e-01 -2.6731979101896286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4620 -5.0623171031475067e-02</internalNodes>\n          <leafValues>\n            4.6908378601074219e-01 -1.3880429789423943e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4621 -4.3487590737640858e-03</internalNodes>\n          <leafValues>\n            -1.4812940359115601e-01 5.2115358412265778e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4622 4.0859800577163696e-01</internalNodes>\n          <leafValues>\n            1.5454529784619808e-02 -4.6494269371032715e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4623 5.3104009479284286e-02</internalNodes>\n          <leafValues>\n            7.8609427437186241e-03 -5.3555142879486084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4624 -4.1035288013517857e-03</internalNodes>\n          <leafValues>\n            -1.3777880370616913e-01 4.6847809106111526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4625 -2.7622529305517673e-03</internalNodes>\n          <leafValues>\n            5.2303940057754517e-02 -9.4970837235450745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4626 9.3903020024299622e-03</internalNodes>\n          <leafValues>\n            -2.3493729531764984e-02 3.6259791254997253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4627 2.3771630600094795e-02</internalNodes>\n          <leafValues>\n            8.0746166408061981e-02 -8.2893602550029755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4628 2.8008709196001291e-03</internalNodes>\n          <leafValues>\n            -2.6595699787139893e-01 2.8534680604934692e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4629 -6.3013769686222076e-03</internalNodes>\n          <leafValues>\n            8.0481633543968201e-02 -2.9016179963946342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4630 -5.1433448679745197e-03</internalNodes>\n          <leafValues>\n            -1.1473509669303894e-01 5.8448631316423416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4631 1.0679479455575347e-03</internalNodes>\n          <leafValues>\n            -3.1661890447139740e-02 5.4522778838872910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4632 1.5213950537145138e-03</internalNodes>\n          <leafValues>\n            -6.2172550708055496e-02 9.7601316869258881e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4633 -3.3779911696910858e-02</internalNodes>\n          <leafValues>\n            -4.9582698941230774e-01 1.2093319557607174e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4634 -1.0505370050668716e-01</internalNodes>\n          <leafValues>\n            -9.8738801479339600e-01 5.1499558612704277e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4635 1.9685840234160423e-02</internalNodes>\n          <leafValues>\n            -5.6189429014921188e-02 9.1260537505149841e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4636 6.6470399498939514e-02</internalNodes>\n          <leafValues>\n            1.4097889885306358e-02 -4.5731648802757263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4637 -1.5898099169135094e-02</internalNodes>\n          <leafValues>\n            -2.3317760229110718e-01 1.1369620449841022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4638 4.0450799278914928e-03</internalNodes>\n          <leafValues>\n            4.3345049023628235e-02 -1.5908020734786987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4639 -3.3486548811197281e-02</internalNodes>\n          <leafValues>\n            1.3086590170860291e-01 -3.4327559173107147e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4640 2.1458480507135391e-02</internalNodes>\n          <leafValues>\n            -5.0213351845741272e-02 1.1467009782791138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4641 1.1672739684581757e-01</internalNodes>\n          <leafValues>\n            -3.4590030554682016e-03 4.4156730175018311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4642 -5.0386278890073299e-03</internalNodes>\n          <leafValues>\n            -1.3995400071144104e-01 4.0854398161172867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4643 3.7261120975017548e-02</internalNodes>\n          <leafValues>\n            -1.6399189829826355e-02 2.3627850413322449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4644 -1.7991460859775543e-02</internalNodes>\n          <leafValues>\n            -5.6703627109527588e-01 1.0185079649090767e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4645 1.0748039931058884e-01</internalNodes>\n          <leafValues>\n            1.8287489656358957e-03 -7.8705781698226929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4646 -2.1439619362354279e-02</internalNodes>\n          <leafValues>\n            1.8347090482711792e-01 -3.2410789281129837e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4647 6.8095367169007659e-04</internalNodes>\n          <leafValues>\n            4.1675068438053131e-02 -8.9301638305187225e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4648 -6.8581351079046726e-03</internalNodes>\n          <leafValues>\n            -1.4511869847774506e-01 5.1585499197244644e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4649 1.5318280458450317e-01</internalNodes>\n          <leafValues>\n            3.1881679315119982e-03 -4.4190090894699097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4650 2.2777369245886803e-02</internalNodes>\n          <leafValues>\n            -4.3234121054410934e-02 1.7477220296859741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4651 6.6160550341010094e-03</internalNodes>\n          <leafValues>\n            4.3140821158885956e-02 -1.7188510298728943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4652 -8.8224448263645172e-03</internalNodes>\n          <leafValues>\n            1.3203169405460358e-01 -4.7509200870990753e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4653 -5.1209977827966213e-03</internalNodes>\n          <leafValues>\n            -1.8979160487651825e-01 5.7657308876514435e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4654 -1.0311880148947239e-02</internalNodes>\n          <leafValues>\n            3.2286819815635681e-01 -1.9725019112229347e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4655 -2.5065759196877480e-02</internalNodes>\n          <leafValues>\n            -3.6572399735450745e-01 1.8344869837164879e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4656 -1.4318429864943027e-02</internalNodes>\n          <leafValues>\n            1.5795469284057617e-01 -3.8276918232440948e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4657 -5.7383939623832703e-02</internalNodes>\n          <leafValues>\n            -3.6835289001464844e-01 1.6900209710001945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4658 -4.3680299073457718e-02</internalNodes>\n          <leafValues>\n            4.4766798615455627e-01 -1.3710459694266319e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4659 -2.4289099872112274e-01</internalNodes>\n          <leafValues>\n            -7.5490927696228027e-01 8.9195184409618378e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4660 3.8089449517428875e-03</internalNodes>\n          <leafValues>\n            -6.2916718423366547e-02 9.4282902777194977e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4661 8.9389752247370780e-05</internalNodes>\n          <leafValues>\n            -1.1253400146961212e-01 9.9447913467884064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4662 2.7378369122743607e-03</internalNodes>\n          <leafValues>\n            7.4880510568618774e-02 -9.9257610738277435e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4663 2.3680560290813446e-02</internalNodes>\n          <leafValues>\n            1.2105870060622692e-02 -1.1780750006437302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4664 -4.6060070395469666e-02</internalNodes>\n          <leafValues>\n            3.9799740910530090e-01 -1.7129369080066681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4665 2.1130219101905823e-03</internalNodes>\n          <leafValues>\n            -6.0906849801540375e-02 4.9974281340837479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4666 1.4753149822354317e-02</internalNodes>\n          <leafValues>\n            1.6629729419946671e-02 -3.7806668877601624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4667 3.5430908203125000e-02</internalNodes>\n          <leafValues>\n            -2.3844370618462563e-02 2.6354551315307617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4668 -5.0745099782943726e-02</internalNodes>\n          <leafValues>\n            -2.3141309618949890e-01 2.8320349752902985e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4669 8.9874058961868286e-02</internalNodes>\n          <leafValues>\n            -1.0191249661147594e-02 2.6277700066566467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4670 -2.7411670889705420e-03</internalNodes>\n          <leafValues>\n            -1.3828440010547638e-01 4.6966280788183212e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4671 8.7385937571525574e-02</internalNodes>\n          <leafValues>\n            1.7351199639961123e-03 -8.0810409784317017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4672 -2.9055110644549131e-03</internalNodes>\n          <leafValues>\n            6.6193267703056335e-02 -9.5981188118457794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4673 -5.1255577802658081e-01</internalNodes>\n          <leafValues>\n            -1. 8.6886010831221938e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4674 -1.3281259685754776e-02</internalNodes>\n          <leafValues>\n            1.0134270042181015e-01 -6.4344279468059540e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4675 5.3660940378904343e-02</internalNodes>\n          <leafValues>\n            3.2843649387359619e-03 -8.0011987686157227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4676 3.9290629327297211e-02</internalNodes>\n          <leafValues>\n            9.0429633855819702e-03 -6.7074328660964966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4677 6.5197132527828217e-02</internalNodes>\n          <leafValues>\n            4.4964649714529514e-03 -9.7931307554244995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4678 3.2505281269550323e-02</internalNodes>\n          <leafValues>\n            -1.2679249979555607e-02 4.9774479866027832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4679 -6.5749078989028931e-02</internalNodes>\n          <leafValues>\n            -3.7844368815422058e-01 5.9391320683062077e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4680 -6.0045070946216583e-02</internalNodes>\n          <leafValues>\n            -3.9957770705223083e-01 1.4155699871480465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4681 -4.6631351113319397e-02</internalNodes>\n          <leafValues>\n            1.6843810677528381e-01 -3.7634961307048798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4682 1.8095660198014230e-04</internalNodes>\n          <leafValues>\n            -1.0198330134153366e-01 7.2940513491630554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4683 -3.7607289850711823e-03</internalNodes>\n          <leafValues>\n            4.5154098421335220e-02 -5.4370220750570297e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4684 -5.0964287947863340e-04</internalNodes>\n          <leafValues>\n            1.6106060147285461e-01 -5.4398071020841599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4685 -1.6095000319182873e-03</internalNodes>\n          <leafValues>\n            -2.1058610081672668e-01 3.0864259228110313e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4686 -5.4673491977155209e-03</internalNodes>\n          <leafValues>\n            1.9076080620288849e-01 -3.2738618552684784e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4687 4.1697090491652489e-03</internalNodes>\n          <leafValues>\n            2.0009849220514297e-02 -6.8173840641975403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4688 3.2709140796214342e-03</internalNodes>\n          <leafValues>\n            -1.1110019683837891e-01 5.8211889117956161e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4689 -5.1663857884705067e-03</internalNodes>\n          <leafValues>\n            -8.5210792720317841e-02 3.3905100077390671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4690 -1.2914719991385937e-02</internalNodes>\n          <leafValues>\n            -1.3726939260959625e-01 4.8348769545555115e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4691 -3.8130749017000198e-03</internalNodes>\n          <leafValues>\n            -1.1084940284490585e-01 3.2373629510402679e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4692 -5.7762481272220612e-02</internalNodes>\n          <leafValues>\n            2.1701450645923615e-01 -2.9828049242496490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4693 -2.2619909141212702e-03</internalNodes>\n          <leafValues>\n            3.5641018301248550e-02 -5.5289078503847122e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4694 5.2979849278926849e-02</internalNodes>\n          <leafValues>\n            7.7050398103892803e-03 -7.2121208906173706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4695 -3.3839911222457886e-01</internalNodes>\n          <leafValues>\n            -9.4540262222290039e-01 4.5049181208014488e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4696 5.2918092114850879e-04</internalNodes>\n          <leafValues>\n            4.1633930057287216e-02 -1.3283179700374603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4697 2.8239609673619270e-03</internalNodes>\n          <leafValues>\n            1.3815909624099731e-01 -1.1371930129826069e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4698 -2.1569489035755396e-03</internalNodes>\n          <leafValues>\n            6.3553653657436371e-02 -8.4683336317539215e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4699 4.1426848620176315e-03</internalNodes>\n          <leafValues>\n            4.1431330144405365e-02 -9.1413199901580811e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4700 -1.1016559787094593e-02</internalNodes>\n          <leafValues>\n            8.0382406711578369e-02 -8.3978570997714996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4701 -6.5561989322304726e-03</internalNodes>\n          <leafValues>\n            -1.3563759624958038e-01 3.4514341503381729e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4702 -2.2384698968380690e-03</internalNodes>\n          <leafValues>\n            -1.2900340557098389e-01 6.0718830674886703e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4703 -1.2789719738066196e-02</internalNodes>\n          <leafValues>\n            2.6254388689994812e-01 -2.5295289233326912e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4704 -1.1028759926557541e-01</internalNodes>\n          <leafValues>\n            -4.0324538946151733e-01 1.3996849767863750e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4705 2.9025289695709944e-03</internalNodes>\n          <leafValues>\n            -6.0133900493383408e-02 4.0657509118318558e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4706 1.3041580095887184e-03</internalNodes>\n          <leafValues>\n            -1.1271840333938599e-01 5.3001549094915390e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4707 4.8518911004066467e-02</internalNodes>\n          <leafValues>\n            9.9352700635790825e-03 -3.3844459056854248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4708 -5.0848070532083511e-03</internalNodes>\n          <leafValues>\n            -1.3072639703750610e-01 4.7106929123401642e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4709 5.7023460976779461e-03</internalNodes>\n          <leafValues>\n            -5.2840489894151688e-02 1.2418749928474426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4710 -2.7858179528266191e-03</internalNodes>\n          <leafValues>\n            -9.6685640513896942e-02 6.6828437149524689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4711 -3.0082210432738066e-03</internalNodes>\n          <leafValues>\n            7.1778140962123871e-02 -3.8511540740728378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4712 6.9350451231002808e-03</internalNodes>\n          <leafValues>\n            -5.7932149618864059e-02 1.0691670328378677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4713 -4.7064341604709625e-02</internalNodes>\n          <leafValues>\n            1.0284499824047089e-01 -2.7998289093375206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4714 -8.2645736634731293e-02</internalNodes>\n          <leafValues>\n            -8.5849452018737793e-01 6.3560227863490582e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4715 8.9476434513926506e-03</internalNodes>\n          <leafValues>\n            -3.9904471486806870e-02 6.6897280514240265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4716 3.0593979358673096e-01</internalNodes>\n          <leafValues>\n            7.2277039289474487e-03 -7.9749721288681030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4717 -5.8336472138762474e-03</internalNodes>\n          <leafValues>\n            -1.9526490569114685e-01 2.4196550250053406e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4718 -5.3784619085490704e-03</internalNodes>\n          <leafValues>\n            7.1967631578445435e-02 -9.1547563672065735e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4719 9.2504899948835373e-03</internalNodes>\n          <leafValues>\n            3.6146361380815506e-02 -7.4494920670986176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4720 3.7581291049718857e-02</internalNodes>\n          <leafValues>\n            -2.0222729071974754e-02 3.3224269747734070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4721 -4.6818740665912628e-02</internalNodes>\n          <leafValues>\n            -5.0513672828674316e-01 1.2870309874415398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4722 3.3507939428091049e-02</internalNodes>\n          <leafValues>\n            -1.8688799813389778e-02 3.0542388558387756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4723 6.8437248468399048e-02</internalNodes>\n          <leafValues>\n            -6.2482542125508189e-04 8.3963787555694580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4724 1.0151940397918224e-02</internalNodes>\n          <leafValues>\n            2.5653729215264320e-02 -2.1830080449581146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4725 -1.3866250216960907e-01</internalNodes>\n          <leafValues>\n            5.7341670989990234e-01 -6.0921781696379185e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4726 -1.1214310070499778e-03</internalNodes>\n          <leafValues>\n            7.0692487061023712e-02 -8.2995750010013580e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4727 1.4782310463488102e-03</internalNodes>\n          <leafValues>\n            -3.5161279141902924e-02 5.8569159358739853e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4728 -2.3407500702887774e-03</internalNodes>\n          <leafValues>\n            1.2667399644851685e-01 -7.7700607478618622e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4729 4.3265568092465401e-03</internalNodes>\n          <leafValues>\n            3.1229879707098007e-02 -1.1680649966001511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4730 -3.2252248376607895e-02</internalNodes>\n          <leafValues>\n            -5.4395800828933716e-01 1.0386509820818901e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4731 -7.1836792631074786e-04</internalNodes>\n          <leafValues>\n            -6.3850082457065582e-02 4.8989679664373398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4732 1.1035969946533442e-03</internalNodes>\n          <leafValues>\n            -7.1095839142799377e-02 8.3087973296642303e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4733 -1.0265519842505455e-02</internalNodes>\n          <leafValues>\n            1.1647050082683563e-01 -2.8178630396723747e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4734 7.2632037103176117e-02</internalNodes>\n          <leafValues>\n            7.5578331016004086e-03 -7.1635490655899048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4735 1.2232369929552078e-01</internalNodes>\n          <leafValues>\n            -3.9898478426039219e-03 6.0708892345428467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4736 -1.4398260414600372e-01</internalNodes>\n          <leafValues>\n            8.5836321115493774e-01 -5.8769038878381252e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4737 5.9525449760258198e-03</internalNodes>\n          <leafValues>\n            2.1712759509682655e-02 -1.5896700322628021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4738 -1.3158279471099377e-03</internalNodes>\n          <leafValues>\n            8.3239771425724030e-02 -7.1944266557693481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4739 -3.5782668739557266e-02</internalNodes>\n          <leafValues>\n            -3.1888490915298462e-01 6.7262151278555393e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4740 1.4122560387477279e-03</internalNodes>\n          <leafValues>\n            -6.9247573614120483e-02 8.8037729263305664e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4741 -1.6188029199838638e-02</internalNodes>\n          <leafValues>\n            -6.0439001768827438e-02 6.7530423402786255e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4742 -2.8433150146156549e-03</internalNodes>\n          <leafValues>\n            6.4466439187526703e-02 -1.0504409670829773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4743 -1.5944750048220158e-03</internalNodes>\n          <leafValues>\n            -5.1919359713792801e-02 5.3710401058197021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4744 1.8808269500732422e-01</internalNodes>\n          <leafValues>\n            -8.1325937062501907e-03 7.0354807376861572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4745 -3.3552229404449463e-02</internalNodes>\n          <leafValues>\n            -3.1318250298500061e-01 2.4297190830111504e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4746 -1.5341060236096382e-02</internalNodes>\n          <leafValues>\n            2.3687170445919037e-01 -2.8020450845360756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4747 -1.3534810394048691e-02</internalNodes>\n          <leafValues>\n            -3.1544640660285950e-01 2.3011740297079086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4748 3.2969659660011530e-03</internalNodes>\n          <leafValues>\n            3.2923359423875809e-02 -1.5933570265769958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4749 -4.4846888631582260e-02</internalNodes>\n          <leafValues>\n            1.2876190245151520e-01 -1.7795780673623085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4750 5.1291137933731079e-03</internalNodes>\n          <leafValues>\n            3.2709009945392609e-02 -1.7871360480785370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4751 1.1287770466879010e-03</internalNodes>\n          <leafValues>\n            -7.6234400272369385e-02 7.1267232298851013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4752 1.2759109959006310e-02</internalNodes>\n          <leafValues>\n            -5.1268041133880615e-02 1.2901780009269714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4753 5.3586461581289768e-04</internalNodes>\n          <leafValues>\n            6.6144347190856934e-02 -6.8021528422832489e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4754 5.8012880617752671e-04</internalNodes>\n          <leafValues>\n            7.5946256518363953e-02 -7.2426833212375641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4755 9.8113536834716797e-02</internalNodes>\n          <leafValues>\n            4.4115697965025902e-03 -5.7646822929382324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4756 3.2547891139984131e-01</internalNodes>\n          <leafValues>\n            -2.8849789872765541e-02 2.3245050013065338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4757 1.6109529882669449e-02</internalNodes>\n          <leafValues>\n            2.6149509474635124e-02 -2.2507910430431366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4758 1.6630800440907478e-02</internalNodes>\n          <leafValues>\n            -5.6001648306846619e-02 1.0011140257120132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4759 1.2567469850182533e-02</internalNodes>\n          <leafValues>\n            1.1760590225458145e-01 -2.5833690539002419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4760 2.4531960487365723e-02</internalNodes>\n          <leafValues>\n            2.1979559212923050e-02 -2.4158330261707306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4761 5.1343659870326519e-03</internalNodes>\n          <leafValues>\n            -1.3964179903268814e-02 1.0398290306329727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4762 -1.1144300224259496e-03</internalNodes>\n          <leafValues>\n            -8.1608608365058899e-02 6.4991973340511322e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4763 -6.8641006946563721e-02</internalNodes>\n          <leafValues>\n            3.7113350629806519e-01 -1.7774619162082672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4764 8.8211498223245144e-04</internalNodes>\n          <leafValues>\n            -8.4080681204795837e-02 6.2524639070034027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4765 1.0471940040588379e-03</internalNodes>\n          <leafValues>\n            6.9488562643527985e-02 -8.3000160753726959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4766 1.6197249293327332e-02</internalNodes>\n          <leafValues>\n            1.6007730737328529e-02 -3.4216699004173279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4767 -2.2690620273351669e-02</internalNodes>\n          <leafValues>\n            1.3959160447120667e-01 -4.2305570095777512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4768 -4.1030000895261765e-02</internalNodes>\n          <leafValues>\n            -3.4669420123100281e-01 1.7233539372682571e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4769 8.5194930434226990e-02</internalNodes>\n          <leafValues>\n            -8.8493460789322853e-03 6.0639351606369019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4770 3.9775099605321884e-02</internalNodes>\n          <leafValues>\n            6.5457229502499104e-03 -9.3794268369674683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4771 -1.8673250451683998e-02</internalNodes>\n          <leafValues>\n            8.4701649844646454e-02 -2.1742990240454674e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4772 -1.1632209643721581e-02</internalNodes>\n          <leafValues>\n            -1.6503639519214630e-01 3.2852791249752045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4773 -2.1068679634481668e-03</internalNodes>\n          <leafValues>\n            2.5774169713258743e-02 -1.0540559887886047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4774 -1.0474229929968715e-03</internalNodes>\n          <leafValues>\n            5.3470570594072342e-02 -1.0844449698925018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4775 6.6169992089271545e-02</internalNodes>\n          <leafValues>\n            2.6304489001631737e-03 -4.3908849358558655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4776 -1.2816500384360552e-03</internalNodes>\n          <leafValues>\n            -8.8744208216667175e-02 6.7286081612110138e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4777 -1.2601809576153755e-02</internalNodes>\n          <leafValues>\n            2.3047180473804474e-01 -1.4204639941453934e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4778 3.1882619950920343e-03</internalNodes>\n          <leafValues>\n            -6.0790609568357468e-02 9.3256607651710510e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4779 -4.4821877963840961e-03</internalNodes>\n          <leafValues>\n            -7.4911139905452728e-02 3.5563640296459198e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4780 1.3803370529785752e-03</internalNodes>\n          <leafValues>\n            -6.5355330705642700e-02 8.9660577476024628e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4781 9.3855522572994232e-03</internalNodes>\n          <leafValues>\n            2.2601179778575897e-02 -1.6038919985294342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4782 -3.3057469408959150e-03</internalNodes>\n          <leafValues>\n            -9.3390651047229767e-02 5.6599788367748260e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4783 -1.4823249541223049e-02</internalNodes>\n          <leafValues>\n            6.3946582376956940e-02 -3.7617258727550507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4784 -2.4304309859871864e-02</internalNodes>\n          <leafValues>\n            1.1825300008058548e-01 -5.3607080131769180e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4785 -2.6398031041026115e-03</internalNodes>\n          <leafValues>\n            -7.8462429344654083e-02 4.7125939279794693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4786 -6.6844499669969082e-03</internalNodes>\n          <leafValues>\n            -1.4298090338706970e-01 5.4876580834388733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4787 -1.8713249592110515e-03</internalNodes>\n          <leafValues>\n            6.5964557230472565e-02 -5.9726029634475708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4788 -5.0526339560747147e-02</internalNodes>\n          <leafValues>\n            5.2933692932128906e-01 -1.0625099763274193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4789 -7.1036286652088165e-02</internalNodes>\n          <leafValues>\n            -3.3027708530426025e-01 5.6759058497846127e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4790 -5.4212540388107300e-02</internalNodes>\n          <leafValues>\n            3.7536340951919556e-01 -1.6479549929499626e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4791 1.4903850387781858e-04</internalNodes>\n          <leafValues>\n            -5.2896250039339066e-02 1.0646480321884155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4792 1.0254220105707645e-03</internalNodes>\n          <leafValues>\n            -5.1714900881052017e-02 1.0771189630031586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4793 7.6022921130061150e-03</internalNodes>\n          <leafValues>\n            2.4376839399337769e-02 -1.2493179738521576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4794 6.8572920281440020e-04</internalNodes>\n          <leafValues>\n            7.1341581642627716e-02 -7.6490812003612518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4795 -1.3697240501642227e-03</internalNodes>\n          <leafValues>\n            -1.5173940360546112e-01 3.9827719330787659e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4796 -2.4336120113730431e-03</internalNodes>\n          <leafValues>\n            6.5315209329128265e-02 -7.9230897128582001e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4797 -1.4390869997441769e-02</internalNodes>\n          <leafValues>\n            -2.3706260323524475e-01 1.6740530729293823e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4798 7.8907981514930725e-02</internalNodes>\n          <leafValues>\n            -4.2810469865798950e-02 1.4248989522457123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4799 1.0681129992008209e-01</internalNodes>\n          <leafValues>\n            3.4115819726139307e-03 -7.7656471729278564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4800 5.1377359777688980e-02</internalNodes>\n          <leafValues>\n            1.0703410021960735e-02 -5.3400570154190063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4801 -8.6883217096328735e-02</internalNodes>\n          <leafValues>\n            1. -3.0740019865334034e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4802 -2.4080339353531599e-03</internalNodes>\n          <leafValues>\n            -1.0685530304908752e-01 4.9721568822860718e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4803 -1.5590289607644081e-02</internalNodes>\n          <leafValues>\n            1.0636159777641296e-01 -2.4414319545030594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4804 2.3770150728523731e-03</internalNodes>\n          <leafValues>\n            3.9840381592512131e-02 -1.4689840376377106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4805 -9.0648621320724487e-02</internalNodes>\n          <leafValues>\n            1.8861660361289978e-01 -1.2951680459082127e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4806 4.4955732300877571e-03</internalNodes>\n          <leafValues>\n            -2.6563400402665138e-02 2.3943750560283661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4807 -6.4725756645202637e-02</internalNodes>\n          <leafValues>\n            -5.4622077941894531e-01 9.2595359310507774e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4808 2.1703580394387245e-02</internalNodes>\n          <leafValues>\n            -8.8741881772875786e-03 6.4019817113876343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4809 6.1110239475965500e-02</internalNodes>\n          <leafValues>\n            9.5075201243162155e-03 -4.3702909350395203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4810 2.0086880773305893e-02</internalNodes>\n          <leafValues>\n            2.2985199466347694e-02 -2.2840890288352966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4811 4.1216641664505005e-02</internalNodes>\n          <leafValues>\n            -1.4420590363442898e-02 1.3452969491481781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4812 -2.3712279275059700e-02</internalNodes>\n          <leafValues>\n            -2.9533639550209045e-01 1.8435720354318619e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4813 -6.8324371241033077e-03</internalNodes>\n          <leafValues>\n            1.2094250321388245e-01 -4.3016240000724792e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4814 1.0880210250616074e-01</internalNodes>\n          <leafValues>\n            -1.0228149592876434e-02 5.2824842929840088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4815 9.8231732845306396e-03</internalNodes>\n          <leafValues>\n            4.1886411607265472e-02 -1.3665479421615601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4816 -1.5005770139396191e-02</internalNodes>\n          <leafValues>\n            1.8148930370807648e-01 -3.0691139400005341e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4817 -4.4110611081123352e-01</internalNodes>\n          <leafValues>\n            -1. 1.4937899541109800e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4818 -3.4122800827026367e-01</internalNodes>\n          <leafValues>\n            -4.9184858798980713e-01 1.0096929967403412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4819 9.3225948512554169e-03</internalNodes>\n          <leafValues>\n            -2.2894829511642456e-02 7.0796586573123932e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4820 7.3594371788203716e-03</internalNodes>\n          <leafValues>\n            1.3842869549989700e-02 -3.6142700910568237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4821 -8.4109082818031311e-02</internalNodes>\n          <leafValues>\n            -6.2284982204437256e-01 7.3129259981215000e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4822 1.0704870335757732e-02</internalNodes>\n          <leafValues>\n            -4.2617131024599075e-02 1.1360719799995422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4823 1.1478140018880367e-02</internalNodes>\n          <leafValues>\n            3.6586448550224304e-02 -9.6474952995777130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4824 1.6416399739682674e-03</internalNodes>\n          <leafValues>\n            -9.8777309060096741e-02 5.5158369243144989e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4825 -1.5731199528090656e-04</internalNodes>\n          <leafValues>\n            -6.1207920312881470e-02 5.6053601205348969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4826 4.1953278705477715e-03</internalNodes>\n          <leafValues>\n            5.0657391548156738e-02 -1.0238680243492126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4827 -1.6238249838352203e-02</internalNodes>\n          <leafValues>\n            1.1267519742250443e-01 -1.3786830008029938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4828 3.2428819686174393e-02</internalNodes>\n          <leafValues>\n            -2.5513019412755966e-02 2.3171940445899963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4829 -8.3901472389698029e-03</internalNodes>\n          <leafValues>\n            -6.2842369079589844e-02 2.3776959627866745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4830 4.9057020805776119e-03</internalNodes>\n          <leafValues>\n            5.7676758617162704e-02 -1.2715479731559753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4831 1.4458860270678997e-02</internalNodes>\n          <leafValues>\n            -5.0932768732309341e-02 6.2239319086074829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4832 1.2484519928693771e-01</internalNodes>\n          <leafValues>\n            -1.1612229980528355e-02 4.9361020326614380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4833 4.8587709665298462e-01</internalNodes>\n          <leafValues>\n            4.8130601644515991e-03 -5.5395811796188354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4834 1.6886210441589355e-01</internalNodes>\n          <leafValues>\n            7.8053288161754608e-03 -7.3394978046417236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4835 -2.1220340568106622e-04</internalNodes>\n          <leafValues>\n            3.1656648963689804e-02 -1.0314700007438660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4836 1.9249629694968462e-03</internalNodes>\n          <leafValues>\n            5.5135779082775116e-02 -1.0309369862079620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4837 -2.8178339824080467e-02</internalNodes>\n          <leafValues>\n            1.1637330055236816e-01 -3.4630060195922852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4838 -1.4069500379264355e-02</internalNodes>\n          <leafValues>\n            -1.4737719297409058e-01 4.4723790138959885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4839 -1.2483589816838503e-03</internalNodes>\n          <leafValues>\n            -1.1185120046138763e-01 6.8806178867816925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4840 5.3278112318366766e-04</internalNodes>\n          <leafValues>\n            -9.3908883631229401e-02 6.7072838544845581e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4841 1.1722769588232040e-02</internalNodes>\n          <leafValues>\n            -1.9012469798326492e-02 1.8834389746189117e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>249</maxWeakCount>\n      <stageThreshold>-1.4526200294494629e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 4842 5.8254651725292206e-02</internalNodes>\n          <leafValues>\n            -2.3232789337635040e-01 2.1454159915447235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4843 3.4433450549840927e-02</internalNodes>\n          <leafValues>\n            -2.6520681381225586e-01 1.3274359703063965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4844 1.4937009662389755e-02</internalNodes>\n          <leafValues>\n            -2.3927900195121765e-01 1.5786519646644592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4845 3.1153639778494835e-02</internalNodes>\n          <leafValues>\n            -1.5004000067710876e-01 1.6116039454936981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4846 2.6988480240106583e-03</internalNodes>\n          <leafValues>\n            -2.3409889638423920e-01 9.9983781576156616e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4847 9.2046073405072093e-05</internalNodes>\n          <leafValues>\n            -2.9268169403076172e-01 4.7872740775346756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4848 5.0020251364912838e-05</internalNodes>\n          <leafValues>\n            -3.6815708875656128e-01 5.8189608156681061e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4849 -1.4902159571647644e-02</internalNodes>\n          <leafValues>\n            -3.8818851113319397e-01 2.6158519089221954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4850 2.0448720082640648e-02</internalNodes>\n          <leafValues>\n            6.0846891254186630e-02 -3.0645281076431274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4851 6.2656581576447934e-05</internalNodes>\n          <leafValues>\n            -1.7161040008068085e-01 1.0800299793481827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4852 -7.0627559907734394e-03</internalNodes>\n          <leafValues>\n            -2.3428949713706970e-01 7.6327130198478699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4853 -2.9078179504722357e-03</internalNodes>\n          <leafValues>\n            -2.1010600030422211e-01 7.8605473041534424e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4854 -3.6554310470819473e-02</internalNodes>\n          <leafValues>\n            1.7013889551162720e-01 -1.2837870419025421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4855 -1.3991629704833031e-02</internalNodes>\n          <leafValues>\n            -1.5198560059070587e-01 3.1168300658464432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4856 7.4681073427200317e-02</internalNodes>\n          <leafValues>\n            3.6079999059438705e-02 -4.6322378516197205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4857 -1.0407929867506027e-01</internalNodes>\n          <leafValues>\n            -3.1802299618721008e-01 2.0612560212612152e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4858 1.2444700114428997e-02</internalNodes>\n          <leafValues>\n            7.7818617224693298e-02 -1.6825589537620544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4859 3.4679330885410309e-02</internalNodes>\n          <leafValues>\n            3.2584380358457565e-02 -2.6884159445762634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4860 -2.9028469696640968e-02</internalNodes>\n          <leafValues>\n            -4.4522678852081299e-01 2.9661040753126144e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4861 2.3345749650616199e-04</internalNodes>\n          <leafValues>\n            -1.3071049749851227e-01 6.1756659299135208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4862 3.6993178725242615e-01</internalNodes>\n          <leafValues>\n            1.7400909215211868e-02 -7.0418548583984375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4863 -2.1505730226635933e-02</internalNodes>\n          <leafValues>\n            -2.4095299839973450e-01 2.8891649097204208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4864 5.4181810468435287e-02</internalNodes>\n          <leafValues>\n            -8.4053620696067810e-02 1.3876989483833313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4865 -3.2677378505468369e-02</internalNodes>\n          <leafValues>\n            -2.9904881119728088e-01 2.8195250779390335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4866 1.1804300360381603e-02</internalNodes>\n          <leafValues>\n            4.9124121665954590e-02 -2.5538289546966553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4867 -9.5703108236193657e-03</internalNodes>\n          <leafValues>\n            1.1865220218896866e-01 -7.9305157065391541e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4868 -8.5534068057313561e-04</internalNodes>\n          <leafValues>\n            -9.0315766632556915e-02 1.2984269857406616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4869 7.1445330977439880e-02</internalNodes>\n          <leafValues>\n            1.4396210201084614e-02 -5.3161299228668213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4870 6.1263251118361950e-03</internalNodes>\n          <leafValues>\n            -2.4559390544891357e-01 4.8353280872106552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4871 -4.8277149908244610e-03</internalNodes>\n          <leafValues>\n            -2.3828850686550140e-01 7.5664043426513672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4872 -2.6015359908342361e-03</internalNodes>\n          <leafValues>\n            4.5826680958271027e-02 -2.4928370118141174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4873 -4.7515620826743543e-04</internalNodes>\n          <leafValues>\n            3.8604840636253357e-02 -1.3118830323219299e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4874 -5.4591469466686249e-02</internalNodes>\n          <leafValues>\n            5.5260437726974487e-01 -1.9622489809989929e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4875 5.3931411355733871e-02</internalNodes>\n          <leafValues>\n            -4.8285599797964096e-02 2.2110609710216522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4876 -9.1672148555517197e-03</internalNodes>\n          <leafValues>\n            -2.5744551420211792e-01 4.0833171457052231e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4877 -2.9818129260092974e-03</internalNodes>\n          <leafValues>\n            -7.5891457498073578e-02 6.0899209231138229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4878 7.4697382748126984e-02</internalNodes>\n          <leafValues>\n            3.6657888442277908e-02 -2.6946181058883667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4879 -2.7006270363926888e-02</internalNodes>\n          <leafValues>\n            1.8391659855842590e-01 -5.5832479149103165e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4880 -6.0810879804193974e-03</internalNodes>\n          <leafValues>\n            -3.2777228951454163e-01 3.5269659012556076e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4881 3.8182068616151810e-02</internalNodes>\n          <leafValues>\n            -5.6075371801853180e-02 2.1839509904384613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4882 9.5723047852516174e-03</internalNodes>\n          <leafValues>\n            8.4293976426124573e-02 -1.1767770349979401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4883 7.8028216958045959e-02</internalNodes>\n          <leafValues>\n            5.6959469802677631e-03 -8.1442731618881226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4884 -3.2862029969692230e-02</internalNodes>\n          <leafValues>\n            -4.7212830185890198e-01 1.9418969750404358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4885 4.2359679937362671e-02</internalNodes>\n          <leafValues>\n            -1.7929280176758766e-02 3.1368249654769897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4886 -2.1030420437455177e-02</internalNodes>\n          <leafValues>\n            1.4199249446392059e-01 -6.7171506583690643e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4887 -4.6487968415021896e-02</internalNodes>\n          <leafValues>\n            -3.0455109477043152e-01 3.1824499368667603e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4888 -8.5280627012252808e-02</internalNodes>\n          <leafValues>\n            2.4725529551506042e-01 -4.0726520121097565e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4889 4.7598700039088726e-03</internalNodes>\n          <leafValues>\n            -6.4076490700244904e-02 1.0103560239076614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4890 6.0733199119567871e-02</internalNodes>\n          <leafValues>\n            -8.8772647082805634e-02 1.1654719710350037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4891 5.4770488291978836e-02</internalNodes>\n          <leafValues>\n            2.2390449419617653e-02 -4.9855118989944458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4892 -3.7478970625670627e-05</internalNodes>\n          <leafValues>\n            6.2433928251266479e-02 -1.6515359282493591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4893 -2.3898750543594360e-02</internalNodes>\n          <leafValues>\n            -1.9021050631999969e-01 1.4979549683630466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4894 -1.8465859815478325e-02</internalNodes>\n          <leafValues>\n            2.3008669912815094e-01 -4.5363288372755051e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4895 -3.8619639817625284e-03</internalNodes>\n          <leafValues>\n            -1.1168369650840759e-01 7.9550966620445251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4896 6.0682989656925201e-02</internalNodes>\n          <leafValues>\n            2.5401040911674500e-02 -4.1787821054458618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4897 -6.1235381290316582e-03</internalNodes>\n          <leafValues>\n            -2.4201570451259613e-01 1.9984690472483635e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4898 -2.7558460831642151e-02</internalNodes>\n          <leafValues>\n            -4.5678210258483887e-01 2.0328069105744362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4899 2.4938629940152168e-02</internalNodes>\n          <leafValues>\n            -3.8399018347263336e-02 1.3205289840698242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4900 -4.7081429511308670e-02</internalNodes>\n          <leafValues>\n            3.1839731335639954e-01 -3.2127480953931808e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4901 6.2321990728378296e-02</internalNodes>\n          <leafValues>\n            1.7846960574388504e-02 -5.0114768743515015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4902 -5.5789871839806437e-04</internalNodes>\n          <leafValues>\n            1.0673029720783234e-01 -9.0454310178756714e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4903 -2.0528730005025864e-02</internalNodes>\n          <leafValues>\n            2.2777000069618225e-01 -4.6683758497238159e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4904 1.4043749542906880e-03</internalNodes>\n          <leafValues>\n            -2.0688509941101074e-01 6.7320853471755981e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4905 3.1474549323320389e-02</internalNodes>\n          <leafValues>\n            2.5873050093650818e-02 -3.1385809183120728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4906 -3.1364340335130692e-02</internalNodes>\n          <leafValues>\n            -3.5079669952392578e-01 2.4890480563044548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4907 -1.0076019912958145e-01</internalNodes>\n          <leafValues>\n            -2.2738389670848846e-01 1.0731879621744156e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4908 1.4409960247576237e-02</internalNodes>\n          <leafValues>\n            2.4001860618591309e-01 -3.8389049470424652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4909 5.6410171091556549e-02</internalNodes>\n          <leafValues>\n            -4.0667269378900528e-02 1.9880810379981995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4910 -1.4310100115835667e-02</internalNodes>\n          <leafValues>\n            -2.2484239935874939e-01 5.1415968686342239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4911 3.8093481212854385e-02</internalNodes>\n          <leafValues>\n            1.0602000169456005e-02 -6.5031349658966064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4912 7.3483381420373917e-03</internalNodes>\n          <leafValues>\n            3.7624299526214600e-02 -2.3660179972648621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4913 1.5990389883518219e-01</internalNodes>\n          <leafValues>\n            -3.1958691775798798e-02 7.8257188200950623e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4914 7.5298376381397247e-02</internalNodes>\n          <leafValues>\n            -2.2225739434361458e-02 4.7734829783439636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4915 1.0515630245208740e-02</internalNodes>\n          <leafValues>\n            2.4979539215564728e-02 -4.3517309427261353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4916 1.1720249801874161e-01</internalNodes>\n          <leafValues>\n            -3.7235978990793228e-02 2.6529499888420105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4917 1.5799700122443028e-05</internalNodes>\n          <leafValues>\n            -1.0837449878454208e-01 7.2809703648090363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4918 1.2115119956433773e-02</internalNodes>\n          <leafValues>\n            6.5032199025154114e-02 -1.4378160238265991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4919 -1.7766270786523819e-02</internalNodes>\n          <leafValues>\n            1.0095430165529251e-01 -2.4499140679836273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4920 4.2227920144796371e-02</internalNodes>\n          <leafValues>\n            -3.6625079810619354e-02 2.8341490030288696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4921 2.4346679449081421e-02</internalNodes>\n          <leafValues>\n            2.4560010060667992e-02 -1.9787840545177460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4922 3.1748838722705841e-02</internalNodes>\n          <leafValues>\n            2.9603859409689903e-02 -3.0412709712982178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4923 -5.2616238594055176e-02</internalNodes>\n          <leafValues>\n            1.7751359939575195e-01 -3.1825721263885498e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4924 -5.4358910769224167e-02</internalNodes>\n          <leafValues>\n            2.2886650264263153e-01 -4.0221411734819412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4925 1.1845750268548727e-03</internalNodes>\n          <leafValues>\n            6.1528120189905167e-02 -1.2204740196466446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4926 -3.6325298249721527e-02</internalNodes>\n          <leafValues>\n            -2.9528170824050903e-01 3.3452831208705902e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4927 1.5100809931755066e-01</internalNodes>\n          <leafValues>\n            -2.5661900639533997e-02 3.8788089156150818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4928 2.8278939425945282e-02</internalNodes>\n          <leafValues>\n            -3.5951491445302963e-02 2.5251358747482300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4929 -8.3803251385688782e-02</internalNodes>\n          <leafValues>\n            -7.2599482536315918e-01 4.1993269696831703e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4930 -2.9865629039704800e-04</internalNodes>\n          <leafValues>\n            5.5302988737821579e-02 -1.6678869724273682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4931 -1.6872739419341087e-02</internalNodes>\n          <leafValues>\n            -1.9040539860725403e-01 5.2307758480310440e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4932 -5.9451311826705933e-02</internalNodes>\n          <leafValues>\n            -4.7634351253509521e-01 2.0981209352612495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4933 -1.8378829583525658e-02</internalNodes>\n          <leafValues>\n            6.6858462989330292e-02 -6.0389090329408646e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4934 4.8198848962783813e-02</internalNodes>\n          <leafValues>\n            4.2580351233482361e-02 -2.6010730862617493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4935 -4.3217130005359650e-02</internalNodes>\n          <leafValues>\n            -2.5067010521888733e-01 1.7225300893187523e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4936 -6.3647949136793613e-03</internalNodes>\n          <leafValues>\n            -1.6788710653781891e-01 6.8857319653034210e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4937 2.4770569801330566e-01</internalNodes>\n          <leafValues>\n            -3.3154450356960297e-02 1.4794079959392548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4938 -1.1216869950294495e-01</internalNodes>\n          <leafValues>\n            5.1129728555679321e-01 -1.7360100522637367e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4939 3.6601010710000992e-02</internalNodes>\n          <leafValues>\n            -4.3869979679584503e-02 1.9755239784717560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4940 -7.2332553565502167e-02</internalNodes>\n          <leafValues>\n            -8.2932412624359131e-01 1.1810120195150375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4941 7.7837951481342316e-02</internalNodes>\n          <leafValues>\n            2.4520579725503922e-02 -2.7260521054267883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4942 7.2094596922397614e-02</internalNodes>\n          <leafValues>\n            3.7606250494718552e-02 -2.7291780710220337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4943 -8.7373353540897369e-02</internalNodes>\n          <leafValues>\n            -9.5344787836074829e-01 3.2734218984842300e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4944 -3.6240059882402420e-02</internalNodes>\n          <leafValues>\n            -3.2300001382827759e-01 2.6389310136437416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4945 -8.7862694635987282e-03</internalNodes>\n          <leafValues>\n            -1.4808210730552673e-01 4.6761561185121536e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4946 6.5432381816208363e-03</internalNodes>\n          <leafValues>\n            6.0071479529142380e-02 -1.5036399662494659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4947 2.7910009957849979e-03</internalNodes>\n          <leafValues>\n            -7.9585656523704529e-02 6.4064942300319672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4948 2.9471930116415024e-02</internalNodes>\n          <leafValues>\n            3.6904528737068176e-02 -2.7659609913825989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4949 -4.4924151152372360e-02</internalNodes>\n          <leafValues>\n            3.5313630104064941e-01 -2.7219140902161598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4950 7.8969523310661316e-02</internalNodes>\n          <leafValues>\n            1.0873800143599510e-02 -9.3217527866363525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4951 -3.1053030863404274e-02</internalNodes>\n          <leafValues>\n            2.4087889492511749e-01 -2.7155969291925430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4952 5.0429090857505798e-02</internalNodes>\n          <leafValues>\n            -5.4164800792932510e-02 2.0343920588493347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4953 -3.7637658417224884e-02</internalNodes>\n          <leafValues>\n            3.2998979091644287e-01 -3.4573089331388474e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4954 -1.7269999952986836e-03</internalNodes>\n          <leafValues>\n            -1.2339779734611511e-01 7.5958393514156342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4955 1.2604339979588985e-02</internalNodes>\n          <leafValues>\n            3.6150000989437103e-02 -2.1591770648956299e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4956 1.1010640300810337e-02</internalNodes>\n          <leafValues>\n            -1.4330290257930756e-01 6.3043266534805298e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4957 1.3539699837565422e-02</internalNodes>\n          <leafValues>\n            -7.8418523073196411e-02 1.8389409780502319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4958 -3.8949768990278244e-02</internalNodes>\n          <leafValues>\n            3.4183630347251892e-01 -2.9505429789423943e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4959 -4.9093078821897507e-02</internalNodes>\n          <leafValues>\n            -3.6278200149536133e-01 1.7093619331717491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4960 4.2306110262870789e-03</internalNodes>\n          <leafValues>\n            5.8190550655126572e-02 -1.8383790552616119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4961 8.9376904070377350e-03</internalNodes>\n          <leafValues>\n            -5.1576498895883560e-02 1.9376990199089050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4962 4.0846280753612518e-02</internalNodes>\n          <leafValues>\n            1.3241729699075222e-02 -7.0892220735549927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4963 -3.6945961415767670e-02</internalNodes>\n          <leafValues>\n            -3.4456318616867065e-01 7.1702878922224045e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4964 -1.2924180366098881e-02</internalNodes>\n          <leafValues>\n            -1.9354179501533508e-01 4.8157788813114166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4965 3.3079650253057480e-02</internalNodes>\n          <leafValues>\n            -5.1704820245504379e-02 1.3492329418659210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4966 2.2233519703149796e-02</internalNodes>\n          <leafValues>\n            5.2919991314411163e-02 -1.7628639936447144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4967 -1.4483500272035599e-02</internalNodes>\n          <leafValues>\n            1.5105240046977997e-01 -3.9817798882722855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4968 1.5934909880161285e-01</internalNodes>\n          <leafValues>\n            -3.3422928303480148e-02 2.8085818886756897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4969 1.2470430135726929e-01</internalNodes>\n          <leafValues>\n            1.1225829832255840e-02 -4.5520108938217163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4970 7.0243299007415771e-02</internalNodes>\n          <leafValues>\n            2.6213169097900391e-02 -3.4778589010238647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4971 6.1747688055038452e-01</internalNodes>\n          <leafValues>\n            9.0320473536849022e-03 -5.5216097831726074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4972 7.7007927000522614e-02</internalNodes>\n          <leafValues>\n            9.3850009143352509e-03 -6.9495117664337158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4973 4.2874120175838470e-02</internalNodes>\n          <leafValues>\n            -3.3166319131851196e-02 1.3550239801406860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4974 -2.4558259174227715e-02</internalNodes>\n          <leafValues>\n            3.8989260792732239e-01 -2.0506320521235466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4975 1.0723150335252285e-02</internalNodes>\n          <leafValues>\n            -5.1526758819818497e-02 8.9461207389831543e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4976 3.8331970572471619e-02</internalNodes>\n          <leafValues>\n            -3.9952859282493591e-02 1.8591549992561340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4977 1.2556019425392151e-01</internalNodes>\n          <leafValues>\n            5.1561538130044937e-03 -8.4782391786575317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4978 1.1590070277452469e-01</internalNodes>\n          <leafValues>\n            9.7828712314367294e-03 -7.6437431573867798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4979 -1.5016060322523117e-02</internalNodes>\n          <leafValues>\n            -1.8328569829463959e-01 3.2125338912010193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4980 -4.1521931998431683e-03</internalNodes>\n          <leafValues>\n            9.8160982131958008e-02 -8.2769006490707397e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4981 1.4998050173744559e-03</internalNodes>\n          <leafValues>\n            4.1228689253330231e-02 -8.4460526704788208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4982 3.8117531687021255e-02</internalNodes>\n          <leafValues>\n            1.9691960886120796e-02 -3.9931151270866394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4983 9.4391452148556709e-04</internalNodes>\n          <leafValues>\n            -1.9674700498580933e-01 5.6476209312677383e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4984 2.4907960323616862e-04</internalNodes>\n          <leafValues>\n            9.2797473073005676e-02 -1.0708689689636230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4985 2.5447670370340347e-02</internalNodes>\n          <leafValues>\n            -2.5304390117526054e-02 1.0032439976930618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4986 -2.8884090483188629e-02</internalNodes>\n          <leafValues>\n            -1.7259830236434937e-01 4.9671061336994171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4987 1.2102840095758438e-01</internalNodes>\n          <leafValues>\n            -5.5194748565554619e-03 9.5438259840011597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4988 -7.9245921224355698e-03</internalNodes>\n          <leafValues>\n            6.4903482794761658e-02 -1.2671549618244171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4989 -6.5536066889762878e-02</internalNodes>\n          <leafValues>\n            -3.7892189621925354e-01 1.6463089734315872e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4990 -1.6883460804820061e-02</internalNodes>\n          <leafValues>\n            5.8534818887710571e-01 -1.4671769924461842e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4991 6.7252418957650661e-03</internalNodes>\n          <leafValues>\n            2.7604229748249054e-02 -3.4817421436309814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4992 -6.3783898949623108e-02</internalNodes>\n          <leafValues>\n            -3.9567160606384277e-01 1.9867889583110809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4993 1.8600550293922424e-01</internalNodes>\n          <leafValues>\n            -4.5898579061031342e-02 7.3586076498031616e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4994 4.9724031239748001e-02</internalNodes>\n          <leafValues>\n            -2.0517630502581596e-02 4.3107840418815613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4995 1.5011380426585674e-02</internalNodes>\n          <leafValues>\n            4.0192149579524994e-02 -1.0242489725351334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4996 -1.5085030347108841e-02</internalNodes>\n          <leafValues>\n            2.3888920247554779e-01 -3.5642918199300766e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4997 -1.2931490316987038e-02</internalNodes>\n          <leafValues>\n            -3.6863088607788086e-01 1.7377890646457672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4998 -1.3186899945139885e-02</internalNodes>\n          <leafValues>\n            -4.3170270323753357e-01 1.7947910353541374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4999 -6.6814959049224854e-02</internalNodes>\n          <leafValues>\n            4.1336119174957275e-01 -2.0904310047626495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5000 4.4064331799745560e-02</internalNodes>\n          <leafValues>\n            -3.8615190982818604e-01 2.1414510905742645e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5001 4.1341730952262878e-01</internalNodes>\n          <leafValues>\n            1.0130990296602249e-02 -4.7053098678588867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5002 2.4443659931421280e-02</internalNodes>\n          <leafValues>\n            9.3184120953083038e-02 -8.6774162948131561e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5003 1.5779680013656616e-01</internalNodes>\n          <leafValues>\n            4.8137311823666096e-03 -5.8746212720870972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5004 -2.0141510292887688e-02</internalNodes>\n          <leafValues>\n            2.2643919289112091e-01 -4.6824630349874496e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5005 3.8796770386397839e-03</internalNodes>\n          <leafValues>\n            -7.7155217528343201e-02 3.6106169223785400e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5006 1.5064960345625877e-02</internalNodes>\n          <leafValues>\n            -5.6656859815120697e-02 1.4758649468421936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5007 1.2925310060381889e-02</internalNodes>\n          <leafValues>\n            3.5308018326759338e-02 -1.1645320057868958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5008 -1.4788310043513775e-02</internalNodes>\n          <leafValues>\n            -1.1459939926862717e-01 7.5000070035457611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5009 -2.0497168879956007e-03</internalNodes>\n          <leafValues>\n            4.2067401111125946e-02 -7.0409573614597321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5010 8.9428946375846863e-03</internalNodes>\n          <leafValues>\n            5.3989838808774948e-02 -1.5380840003490448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5011 1.0064999759197235e-01</internalNodes>\n          <leafValues>\n            -2.9709249734878540e-02 3.1293758749961853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5012 -4.6580079942941666e-02</internalNodes>\n          <leafValues>\n            -7.2227877378463745e-01 1.3004340231418610e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5013 -3.8618590682744980e-02</internalNodes>\n          <leafValues>\n            3.3867758512496948e-01 -2.1726610139012337e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5014 8.5657741874456406e-03</internalNodes>\n          <leafValues>\n            7.0621289312839508e-02 -1.3055880367755890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5015 -1.0986299812793732e-01</internalNodes>\n          <leafValues>\n            3.7974509596824646e-01 -5.1755867898464203e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5016 3.0184251070022583e-01</internalNodes>\n          <leafValues>\n            -2.4274839088320732e-02 3.6632651090621948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5017 -5.3246088325977325e-02</internalNodes>\n          <leafValues>\n            -5.5290502309799194e-01 6.2071220017969608e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5018 3.6629870533943176e-02</internalNodes>\n          <leafValues>\n            2.3161249235272408e-02 -3.5514861345291138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5019 6.9993197917938232e-02</internalNodes>\n          <leafValues>\n            8.9623704552650452e-03 -8.2245421409606934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5020 -8.7623577564954758e-03</internalNodes>\n          <leafValues>\n            -2.8028720617294312e-01 2.6217460632324219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5021 1.5275989659130573e-02</internalNodes>\n          <leafValues>\n            -5.0123069435358047e-02 1.5774080157279968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5022 1.8836189806461334e-01</internalNodes>\n          <leafValues>\n            1.1483459733426571e-02 -7.4004447460174561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5023 -1.4518629759550095e-02</internalNodes>\n          <leafValues>\n            8.2921922206878662e-02 -5.2536141127347946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5024 1.9221989437937737e-02</internalNodes>\n          <leafValues>\n            4.0790341794490814e-02 -2.0889760553836823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5025 -3.1274989247322083e-02</internalNodes>\n          <leafValues>\n            8.0864340066909790e-01 -1.0754980146884918e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5026 -4.9813431687653065e-03</internalNodes>\n          <leafValues>\n            -1.9617860019207001e-01 4.1330069303512573e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5027 3.7296909838914871e-02</internalNodes>\n          <leafValues>\n            3.0313879251480103e-02 -2.7336311340332031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5028 -1.9014550372958183e-02</internalNodes>\n          <leafValues>\n            1.3439440727233887e-01 -6.0782499611377716e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5029 -7.9229613766074181e-03</internalNodes>\n          <leafValues>\n            -7.9689770936965942e-02 4.0497440844774246e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5030 9.6371799707412720e-02</internalNodes>\n          <leafValues>\n            -2.5576870888471603e-02 3.2440510392189026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5031 -1.7210310325026512e-02</internalNodes>\n          <leafValues>\n            2.9772299528121948e-01 -3.0994139611721039e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5032 1.0736179538071156e-02</internalNodes>\n          <leafValues>\n            -7.0299342274665833e-02 1.2448900192975998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5033 -4.0398869663476944e-02</internalNodes>\n          <leafValues>\n            -6.4470887184143066e-01 6.9025149568915367e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5034 -3.1870428472757339e-02</internalNodes>\n          <leafValues>\n            -5.3339338302612305e-01 1.5221790410578251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5035 3.6518078297376633e-02</internalNodes>\n          <leafValues>\n            -7.7875651419162750e-02 1.4458900690078735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5036 1.2330260127782822e-01</internalNodes>\n          <leafValues>\n            1.7689300701022148e-02 -5.1895797252655029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5037 1.0086199641227722e-01</internalNodes>\n          <leafValues>\n            6.6002830862998962e-03 -5.5289500951766968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5038 1.0026770085096359e-01</internalNodes>\n          <leafValues>\n            1.0175090283155441e-02 -7.1554392576217651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5039 3.6956761032342911e-02</internalNodes>\n          <leafValues>\n            2.2131860256195068e-02 -3.1452280282974243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5040 8.5017476230859756e-03</internalNodes>\n          <leafValues>\n            4.9146678298711777e-02 -1.5193499624729156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5041 5.3833048790693283e-02</internalNodes>\n          <leafValues>\n            2.5698679964989424e-03 -5.0750207901000977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5042 4.8958938568830490e-02</internalNodes>\n          <leafValues>\n            9.2353876680135727e-03 -7.9371142387390137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5043 4.0810879319906235e-02</internalNodes>\n          <leafValues>\n            -4.6270430088043213e-02 1.9726410508155823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5044 -3.3165120985358953e-03</internalNodes>\n          <leafValues>\n            -2.1495009958744049e-01 3.8868401199579239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5045 4.8434760537929833e-04</internalNodes>\n          <leafValues>\n            -1.7870649695396423e-01 5.7129681110382080e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5046 7.9494096338748932e-02</internalNodes>\n          <leafValues>\n            -2.2463550791144371e-02 3.6770978569984436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5047 -8.8844364508986473e-03</internalNodes>\n          <leafValues>\n            -3.3796560764312744e-01 2.5869650766253471e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5048 -1.0575620457530022e-02</internalNodes>\n          <leafValues>\n            1.2438619881868362e-01 -6.8147383630275726e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5049 7.3358109220862389e-03</internalNodes>\n          <leafValues>\n            -4.3375171720981598e-02 1.5483480691909790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5050 4.2306821793317795e-02</internalNodes>\n          <leafValues>\n            1.0016439855098724e-01 -8.8011689484119415e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5051 7.1759216487407684e-02</internalNodes>\n          <leafValues>\n            -8.9269876480102539e-03 2.3254199326038361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5052 -2.2478280588984489e-02</internalNodes>\n          <leafValues>\n            -5.4057407379150391e-01 1.4396119862794876e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5053 -2.5606580078601837e-02</internalNodes>\n          <leafValues>\n            -4.3508179485797882e-02 6.4285047352313995e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5054 2.5733409449458122e-02</internalNodes>\n          <leafValues>\n            2.3084849119186401e-02 -3.4278741478919983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5055 -7.0163339376449585e-02</internalNodes>\n          <leafValues>\n            4.0744331479072571e-01 -1.1836090125143528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5056 -1.2527329847216606e-02</internalNodes>\n          <leafValues>\n            9.1184526681900024e-02 -8.7035633623600006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5057 5.9983458369970322e-02</internalNodes>\n          <leafValues>\n            3.6528799682855606e-03 -8.0261522531509399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5058 -5.2271911408752203e-04</internalNodes>\n          <leafValues>\n            6.9573827087879181e-02 -1.2091639637947083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5059 -2.0996539294719696e-01</internalNodes>\n          <leafValues>\n            -4.6747279167175293e-01 9.4682360067963600e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5060 -1.8358640372753143e-02</internalNodes>\n          <leafValues>\n            1.4919880032539368e-01 -5.7198900729417801e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5061 -1.3342049904167652e-02</internalNodes>\n          <leafValues>\n            1.4447879791259766e-01 -2.2494640201330185e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5062 -3.0613059177994728e-02</internalNodes>\n          <leafValues>\n            -3.3590090274810791e-01 2.4433709681034088e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5063 -1.9018750637769699e-02</internalNodes>\n          <leafValues>\n            1.5518119931221008e-01 -2.5613630190491676e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5064 -4.5201808214187622e-02</internalNodes>\n          <leafValues>\n            4.8730811476707458e-01 -1.7641659826040268e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5065 6.3432596623897552e-02</internalNodes>\n          <leafValues>\n            -5.1946818828582764e-02 1.2361440062522888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5066 3.4017860889434814e-03</internalNodes>\n          <leafValues>\n            -1.7030030488967896e-01 5.4143410176038742e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5067 -8.5307076573371887e-02</internalNodes>\n          <leafValues>\n            -7.1878427267074585e-01 1.0392259806394577e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5068 -5.3066499531269073e-02</internalNodes>\n          <leafValues>\n            5.2359157800674438e-01 -1.8369760364294052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5069 -2.8319370001554489e-02</internalNodes>\n          <leafValues>\n            -1.1979889869689941e-01 5.8951549232006073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5070 -8.7353803217411041e-02</internalNodes>\n          <leafValues>\n            2.7089080214500427e-01 -2.9345329850912094e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5071 2.7152231335639954e-01</internalNodes>\n          <leafValues>\n            -1.1648589745163918e-02 5.5842977762222290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5072 1.9388480111956596e-02</internalNodes>\n          <leafValues>\n            5.0895590335130692e-02 -1.7962279915809631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5073 2.1159179508686066e-02</internalNodes>\n          <leafValues>\n            -4.8424899578094482e-02 9.5020256936550140e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5074 1.2039250135421753e-01</internalNodes>\n          <leafValues>\n            9.2587787657976151e-03 -8.7804621458053589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5075 5.0090719014406204e-02</internalNodes>\n          <leafValues>\n            -2.1926950663328171e-02 2.0202030241489410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5076 -5.5227670818567276e-03</internalNodes>\n          <leafValues>\n            2.1560280025005341e-01 -3.6554779857397079e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5077 2.7551440522074699e-02</internalNodes>\n          <leafValues>\n            -3.2782018184661865e-02 1.6503919661045074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5078 -2.5543190538883209e-02</internalNodes>\n          <leafValues>\n            -3.6424461007118225e-01 2.1275209262967110e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5079 -2.6791828870773315e-01</internalNodes>\n          <leafValues>\n            4.8525270819664001e-01 -4.7535290941596031e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5080 -1.6798110306262970e-01</internalNodes>\n          <leafValues>\n            3.9280641078948975e-01 -1.9414989277720451e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5081 4.5900348573923111e-02</internalNodes>\n          <leafValues>\n            -3.6706160753965378e-02 2.0677609741687775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5082 3.6797890788875520e-04</internalNodes>\n          <leafValues>\n            -8.7039902806282043e-02 9.2830970883369446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5083 -9.9194556474685669e-02</internalNodes>\n          <leafValues>\n            -3.6096671223640442e-01 2.1962769329547882e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5084 8.0924080975819379e-05</internalNodes>\n          <leafValues>\n            -7.9007692635059357e-02 9.5904067158699036e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5085 7.0894961245357990e-03</internalNodes>\n          <leafValues>\n            3.7076078355312347e-02 -5.0917111337184906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5086 -1.2181960046291351e-03</internalNodes>\n          <leafValues>\n            4.9094028770923615e-02 -1.5975970029830933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5087 -9.2138662934303284e-02</internalNodes>\n          <leafValues>\n            5.5284732580184937e-01 -1.3595860451459885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5088 6.2209279276430607e-03</internalNodes>\n          <leafValues>\n            4.6889189630746841e-02 -1.8105800449848175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5089 6.5014839172363281e-02</internalNodes>\n          <leafValues>\n            9.4407051801681519e-03 -5.1224017143249512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5090 5.4055921733379364e-02</internalNodes>\n          <leafValues>\n            1.6289059072732925e-02 -4.2684501409530640e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>368</maxWeakCount>\n      <stageThreshold>-1.3073990345001221e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 5091 3.7594079971313477e-02</internalNodes>\n          <leafValues>\n            -1.5953080356121063e-01 2.4245350062847137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5092 4.0349629707634449e-03</internalNodes>\n          <leafValues>\n            -2.5617128610610962e-01 8.0420561134815216e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5093 2.1681638900190592e-03</internalNodes>\n          <leafValues>\n            -2.8089070320129395e-01 7.0903629064559937e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5094 -7.4014628808072302e-06</internalNodes>\n          <leafValues>\n            4.9326181411743164e-02 -1.9688490033149719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5095 -2.2384349722415209e-03</internalNodes>\n          <leafValues>\n            6.8618856370449066e-02 -2.1775339543819427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5096 2.9939650557935238e-03</internalNodes>\n          <leafValues>\n            -2.4257700145244598e-01 2.9716130346059799e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5097 4.5135850086808205e-03</internalNodes>\n          <leafValues>\n            8.9443869888782501e-02 -1.9461549818515778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5098 3.8457550108432770e-03</internalNodes>\n          <leafValues>\n            5.0935801118612289e-02 -2.7721929550170898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5099 4.0572669240646064e-04</internalNodes>\n          <leafValues>\n            -8.5517741739749908e-02 1.6446280479431152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5100 -7.0624578256683890e-06</internalNodes>\n          <leafValues>\n            7.8454487025737762e-02 -1.2395980209112167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5101 -2.8428720543161035e-04</internalNodes>\n          <leafValues>\n            1.0774250328540802e-01 -1.2222009897232056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5102 7.3404680006206036e-03</internalNodes>\n          <leafValues>\n            4.7837160527706146e-02 -2.4441170692443848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5103 3.6235509905964136e-03</internalNodes>\n          <leafValues>\n            -3.1533789634704590e-01 3.5066880285739899e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5104 -1.5671759610995650e-03</internalNodes>\n          <leafValues>\n            -1.7147080600261688e-01 6.5121836960315704e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5105 4.2834067717194557e-03</internalNodes>\n          <leafValues>\n            -1.3190010190010071e-01 9.2709146440029144e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5106 -8.9772082865238190e-03</internalNodes>\n          <leafValues>\n            1.2469480186700821e-01 -2.8118500486016273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5107 5.5919871665537357e-03</internalNodes>\n          <leafValues>\n            4.8671621829271317e-02 -2.2460219264030457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5108 1.1782390065491199e-02</internalNodes>\n          <leafValues>\n            3.1041109934449196e-02 -2.9882109165191650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5109 -5.5568912066519260e-03</internalNodes>\n          <leafValues>\n            1.3689100742340088e-01 -7.7152192592620850e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5110 1.7162049189209938e-02</internalNodes>\n          <leafValues>\n            -4.0298670530319214e-02 1.1232800036668777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5111 3.5631000064313412e-03</internalNodes>\n          <leafValues>\n            5.6056100875139236e-02 -1.9608840346336365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5112 2.2586699575185776e-02</internalNodes>\n          <leafValues>\n            1.1250300332903862e-02 -5.0490778684616089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5113 2.6307879015803337e-03</internalNodes>\n          <leafValues>\n            4.1528269648551941e-02 -2.2185860574245453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5114 -1.0008380049839616e-03</internalNodes>\n          <leafValues>\n            5.9657059609889984e-02 -1.5395790338516235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5115 -7.1316999383270741e-03</internalNodes>\n          <leafValues>\n            1.0590689629316330e-01 -8.9700952172279358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5116 -6.1685360968112946e-02</internalNodes>\n          <leafValues>\n            1.2677849829196930e-01 -2.2709969431161880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5117 1.3120709918439388e-02</internalNodes>\n          <leafValues>\n            -6.3731230795383453e-02 1.5842080116271973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5118 3.2676599919795990e-02</internalNodes>\n          <leafValues>\n            2.5724250823259354e-02 -3.3406201004981995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5119 1.8886770308017731e-01</internalNodes>\n          <leafValues>\n            -1.7100410535931587e-02 5.3700131177902222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5120 -1.6522880468983203e-04</internalNodes>\n          <leafValues>\n            5.4908581078052521e-02 -1.1608000099658966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5121 -1.4789770357310772e-03</internalNodes>\n          <leafValues>\n            7.7602192759513855e-02 -1.0971190035343170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5122 -1.2441210448741913e-02</internalNodes>\n          <leafValues>\n            -1.4090730249881744e-01 6.8732522428035736e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5123 1.9457910209894180e-02</internalNodes>\n          <leafValues>\n            -3.7276178598403931e-02 2.6319879293441772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5124 -2.9123809654265642e-03</internalNodes>\n          <leafValues>\n            -1.8960340321063995e-01 2.9360920190811157e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5125 -2.3870699107646942e-02</internalNodes>\n          <leafValues>\n            2.5528749823570251e-01 -3.1279411166906357e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5126 -2.6912079192698002e-03</internalNodes>\n          <leafValues>\n            -1.4431649446487427e-01 4.8498779535293579e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5127 -1.7636029515415430e-03</internalNodes>\n          <leafValues>\n            -1.3328640162944794e-01 5.4250828921794891e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5128 -1.8844179809093475e-02</internalNodes>\n          <leafValues>\n            1.1653099954128265e-01 -3.8028150796890259e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5129 3.8752850145101547e-02</internalNodes>\n          <leafValues>\n            -3.6811299622058868e-02 2.1002089977264404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5130 9.4316434115171432e-03</internalNodes>\n          <leafValues>\n            5.7964589446783066e-02 -1.8342800438404083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5131 -1.1705379933118820e-02</internalNodes>\n          <leafValues>\n            1.7905050516128540e-01 -4.9799650907516479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5132 -4.4072889722883701e-03</internalNodes>\n          <leafValues>\n            -1.9810500741004944e-01 4.4608719646930695e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5133 -4.7192219644784927e-03</internalNodes>\n          <leafValues>\n            -1.8307499587535858e-01 4.2252171784639359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5134 -4.5182029716670513e-03</internalNodes>\n          <leafValues>\n            9.5572151243686676e-02 -6.0799460858106613e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5135 -5.4851798340678215e-03</internalNodes>\n          <leafValues>\n            -1.7556129395961761e-01 4.0092539042234421e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5136 -9.9079031497240067e-04</internalNodes>\n          <leafValues>\n            -1.3978339731693268e-01 4.8252910375595093e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5137 -5.0425329245626926e-03</internalNodes>\n          <leafValues>\n            -8.8625833392143250e-02 7.9794026911258698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5138 -6.3926707953214645e-03</internalNodes>\n          <leafValues>\n            3.5854909569025040e-02 -8.5030712187290192e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5139 -1.1408809572458267e-02</internalNodes>\n          <leafValues>\n            7.7756106853485107e-02 -1.0200379788875580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5140 5.9286449104547501e-02</internalNodes>\n          <leafValues>\n            6.4652841538190842e-03 -4.9082350730895996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5141 -5.7389298453927040e-03</internalNodes>\n          <leafValues>\n            -1.6221189498901367e-01 5.9541791677474976e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5142 4.4626160524785519e-03</internalNodes>\n          <leafValues>\n            -2.4659389629960060e-02 2.8509560227394104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5143 -7.4683688580989838e-04</internalNodes>\n          <leafValues>\n            5.5159430950880051e-02 -1.4510269463062286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5144 7.5665451586246490e-03</internalNodes>\n          <leafValues>\n            -3.0510440468788147e-02 9.2685796320438385e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5145 8.1203378736972809e-02</internalNodes>\n          <leafValues>\n            8.3315223455429077e-03 -8.8626891374588013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5146 2.5454829446971416e-03</internalNodes>\n          <leafValues>\n            -5.4131258279085159e-02 1.6551689803600311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5147 5.6319180876016617e-02</internalNodes>\n          <leafValues>\n            1.5744749456644058e-02 -4.6605950593948364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5148 -2.7670960873365402e-02</internalNodes>\n          <leafValues>\n            2.7910009026527405e-01 -2.1267570555210114e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5149 5.7495549321174622e-02</internalNodes>\n          <leafValues>\n            1.3765430077910423e-02 -5.6881892681121826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5150 1.1847530258819461e-03</internalNodes>\n          <leafValues>\n            6.3452966511249542e-02 -1.6044929623603821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5151 4.2551690712571144e-03</internalNodes>\n          <leafValues>\n            6.3017703592777252e-02 -1.3584609329700470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5152 -2.1190859377384186e-02</internalNodes>\n          <leafValues>\n            1.9623500108718872e-01 -2.8249129652976990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5153 8.3922911435365677e-03</internalNodes>\n          <leafValues>\n            -6.2064249068498611e-02 1.1225070059299469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5154 -3.5534579306840897e-02</internalNodes>\n          <leafValues>\n            1.8565779924392700e-01 -2.1027710288763046e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5155 -9.2783384025096893e-03</internalNodes>\n          <leafValues>\n            -1.6255140304565430e-01 5.3493771702051163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5156 -7.4480189941823483e-03</internalNodes>\n          <leafValues>\n            5.6045979261398315e-02 -2.7357129380106926e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5157 3.4573610872030258e-02</internalNodes>\n          <leafValues>\n            2.7872329577803612e-02 -2.5443691015243530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5158 1.0644230060279369e-02</internalNodes>\n          <leafValues>\n            -2.5041149929165840e-02 1.2895500659942627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5159 -6.9164121523499489e-03</internalNodes>\n          <leafValues>\n            5.5145461112260818e-02 -1.4286629855632782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5160 4.0446728467941284e-02</internalNodes>\n          <leafValues>\n            4.3409019708633423e-03 -3.0095139145851135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5161 -2.1182280033826828e-02</internalNodes>\n          <leafValues>\n            2.3987750709056854e-01 -3.0267970636487007e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5162 -1.8278649076819420e-02</internalNodes>\n          <leafValues>\n            -2.8024369478225708e-01 2.0352259278297424e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5163 -6.0500060208141804e-03</internalNodes>\n          <leafValues>\n            -1.5138089656829834e-01 4.5843418687582016e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5164 -7.4632540345191956e-03</internalNodes>\n          <leafValues>\n            7.3087826371192932e-02 -3.9645120501518250e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5165 -3.1640689820051193e-02</internalNodes>\n          <leafValues>\n            3.8544759154319763e-01 -1.8987689167261124e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5166 -4.9488719552755356e-02</internalNodes>\n          <leafValues>\n            -3.7455439567565918e-01 4.6011591330170631e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5167 -2.4384791031479836e-03</internalNodes>\n          <leafValues>\n            -1.0864440351724625e-01 7.0171296596527100e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5168 7.4253929778933525e-03</internalNodes>\n          <leafValues>\n            -4.4223289936780930e-02 7.5678370893001556e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5169 -5.3592741489410400e-02</internalNodes>\n          <leafValues>\n            1.9981780648231506e-01 -3.8047380745410919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5170 -2.1555580198764801e-02</internalNodes>\n          <leafValues>\n            -5.2737689018249512e-01 7.7934260480105877e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5171 4.1731819510459900e-03</internalNodes>\n          <leafValues>\n            3.8742069154977798e-02 -1.6946560144424438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5172 4.1882280260324478e-02</internalNodes>\n          <leafValues>\n            -1.1853899806737900e-02 2.9235321283340454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5173 -2.2035069763660431e-02</internalNodes>\n          <leafValues>\n            -1.3629269599914551e-01 4.7323219478130341e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5174 1.6916249878704548e-03</internalNodes>\n          <leafValues>\n            -4.9461908638477325e-02 7.4048481881618500e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5175 -1.9994638860225677e-03</internalNodes>\n          <leafValues>\n            9.3016393482685089e-02 -7.5230561196804047e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5176 -8.7527623400092125e-03</internalNodes>\n          <leafValues>\n            8.4076300263404846e-02 -3.7777189165353775e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5177 2.8121439740061760e-02</internalNodes>\n          <leafValues>\n            3.8471631705760956e-02 -1.9039680063724518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5178 2.4713769555091858e-02</internalNodes>\n          <leafValues>\n            -1.1225669644773006e-02 1.3408440351486206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5179 2.1718820556998253e-02</internalNodes>\n          <leafValues>\n            -1.7361419275403023e-02 3.4876769781112671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5180 -4.3202299624681473e-02</internalNodes>\n          <leafValues>\n            -5.1877439022064209e-01 1.2914709746837616e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5181 -1.6658119857311249e-03</internalNodes>\n          <leafValues>\n            -3.0727219581604004e-01 1.9104089587926865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5182 -3.2269109040498734e-02</internalNodes>\n          <leafValues>\n            3.1825730204582214e-01 -6.1126789078116417e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5183 -9.6689872443675995e-03</internalNodes>\n          <leafValues>\n            3.3182978630065918e-01 -1.8409479409456253e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5184 1.7683519981801510e-03</internalNodes>\n          <leafValues>\n            3.1587228178977966e-02 -1.1481689661741257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5185 3.4618038684129715e-02</internalNodes>\n          <leafValues>\n            -1.8013959750533104e-02 3.4668689966201782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5186 -9.3643896281719208e-02</internalNodes>\n          <leafValues>\n            -5.1143682003021240e-01 1.4282460324466228e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5187 4.3095857836306095e-03</internalNodes>\n          <leafValues>\n            2.4471389129757881e-02 -2.3517690598964691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5188 6.6311933100223541e-02</internalNodes>\n          <leafValues>\n            -1.5711139887571335e-02 2.4676759541034698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5189 -9.2896772548556328e-03</internalNodes>\n          <leafValues>\n            -1.3924039900302887e-01 4.8822149634361267e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5190 -3.3214599825441837e-03</internalNodes>\n          <leafValues>\n            1.3379609584808350e-01 -3.6818679422140121e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5191 4.0180981159210205e-02</internalNodes>\n          <leafValues>\n            -1.2793520465493202e-02 5.2580958604812622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5192 8.7590962648391724e-02</internalNodes>\n          <leafValues>\n            1.2522599659860134e-02 -5.5810731649398804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5193 3.5475298762321472e-02</internalNodes>\n          <leafValues>\n            2.3128280416131020e-02 -2.7402919530868530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5194 5.2033789455890656e-02</internalNodes>\n          <leafValues>\n            -6.1640930362045765e-03 1.9052730500698090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5195 -1.3046549260616302e-01</internalNodes>\n          <leafValues>\n            2.5712540745735168e-01 -2.3529190570116043e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5196 2.8882310725748539e-03</internalNodes>\n          <leafValues>\n            -6.0755409300327301e-02 6.0243420302867889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5197 1.5083160251379013e-02</internalNodes>\n          <leafValues>\n            2.1192179992794991e-02 -2.8479540348052979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5198 8.0875161802396178e-04</internalNodes>\n          <leafValues>\n            -8.5497900843620300e-02 5.4305519908666611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5199 1.4947880059480667e-02</internalNodes>\n          <leafValues>\n            -5.7983450591564178e-02 1.0115720331668854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5200 -4.5683588832616806e-02</internalNodes>\n          <leafValues>\n            -3.9345711469650269e-01 1.7556620761752129e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5201 -9.4226107466965914e-04</internalNodes>\n          <leafValues>\n            1.3064099848270416e-01 -5.1675319671630859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5202 -2.8342329896986485e-03</internalNodes>\n          <leafValues>\n            1.5992760658264160e-01 -3.4787811338901520e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5203 -1.8812920898199081e-02</internalNodes>\n          <leafValues>\n            -2.9807311296463013e-01 2.2536030039191246e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5204 1.9601570442318916e-02</internalNodes>\n          <leafValues>\n            1.3461099937558174e-02 -1.6885930299758911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5205 -6.4929589629173279e-02</internalNodes>\n          <leafValues>\n            -7.1198761463165283e-01 8.5184276103973389e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5206 -1.4283999800682068e-02</internalNodes>\n          <leafValues>\n            -7.8602321445941925e-02 4.2226359248161316e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5207 2.5105919688940048e-02</internalNodes>\n          <leafValues>\n            -2.9744949191808701e-02 2.2586929798126221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5208 3.8459669798612595e-02</internalNodes>\n          <leafValues>\n            1.7592959105968475e-02 -3.4457311034202576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5209 2.9701360035687685e-03</internalNodes>\n          <leafValues>\n            -5.2914209663867950e-02 1.1567460000514984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5210 -3.5584170836955309e-03</internalNodes>\n          <leafValues>\n            1.2957760691642761e-01 -6.1714299023151398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5211 5.5475500412285328e-03</internalNodes>\n          <leafValues>\n            4.9168299883604050e-02 -1.2925429642200470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5212 7.1379862725734711e-02</internalNodes>\n          <leafValues>\n            -1.1528199538588524e-02 3.2423359155654907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5213 -1.1731989681720734e-01</internalNodes>\n          <leafValues>\n            -9.0184438228607178e-01 6.3025541603565216e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5214 2.2931929677724838e-02</internalNodes>\n          <leafValues>\n            -1.1425419710576534e-02 4.1168990731239319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5215 3.6658400204032660e-03</internalNodes>\n          <leafValues>\n            2.8030570596456528e-02 -2.0567989349365234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5216 -7.0796072483062744e-02</internalNodes>\n          <leafValues>\n            -2.1817129850387573e-01 1.2820649892091751e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5217 6.7239440977573395e-03</internalNodes>\n          <leafValues>\n            -4.2305160313844681e-02 1.4150319993495941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5218 -2.0242671016603708e-03</internalNodes>\n          <leafValues>\n            9.1976962983608246e-02 -4.6815071254968643e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5219 2.3123170249164104e-03</internalNodes>\n          <leafValues>\n            -7.1074202656745911e-02 9.8617300391197205e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5220 2.7525359764695168e-03</internalNodes>\n          <leafValues>\n            -5.0785668194293976e-02 7.5282126665115356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5221 -3.4460208844393492e-03</internalNodes>\n          <leafValues>\n            9.6368476748466492e-02 -7.8051783144474030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5222 -1.1416469700634480e-02</internalNodes>\n          <leafValues>\n            -1.1313349753618240e-01 7.5080856680870056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5223 3.0283999876701273e-05</internalNodes>\n          <leafValues>\n            -1.3886189460754395e-01 4.3761149048805237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5224 -1.4150349888950586e-03</internalNodes>\n          <leafValues>\n            3.7164621055126190e-02 -1.1095599830150604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5225 -1.9245060393586755e-03</internalNodes>\n          <leafValues>\n            7.0604592561721802e-02 -9.4269059598445892e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5226 3.0031649395823479e-02</internalNodes>\n          <leafValues>\n            -5.1407739520072937e-02 1.6337560117244720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5227 -2.5132829323410988e-03</internalNodes>\n          <leafValues>\n            -1.4933520555496216e-01 5.1749840378761292e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5228 1.9437290029600263e-04</internalNodes>\n          <leafValues>\n            -4.8553969711065292e-02 1.0562740266323090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5229 2.9679399449378252e-03</internalNodes>\n          <leafValues>\n            3.6664169281721115e-02 -1.5650020539760590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5230 3.2629880588501692e-03</internalNodes>\n          <leafValues>\n            4.2934000492095947e-02 -1.4514559507369995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5231 2.9959511011838913e-03</internalNodes>\n          <leafValues>\n            -6.3821822404861450e-02 9.3514777719974518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5232 -1.5483190305531025e-02</internalNodes>\n          <leafValues>\n            -2.0184549689292908e-01 3.1191380694508553e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5233 -2.3956559598445892e-02</internalNodes>\n          <leafValues>\n            3.6116409301757812e-01 -2.4698240682482719e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5234 -1.7136270180344582e-02</internalNodes>\n          <leafValues>\n            -2.6252090930938721e-01 2.4616269394755363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5235 -6.2233610078692436e-03</internalNodes>\n          <leafValues>\n            1.1059129983186722e-01 -5.7947199791669846e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5236 2.9878519475460052e-02</internalNodes>\n          <leafValues>\n            7.8794546425342560e-03 -2.8504589200019836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5237 -9.6910241991281509e-03</internalNodes>\n          <leafValues>\n            -1.5696419775485992e-01 3.8263391703367233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5238 -1.2825420498847961e-01</internalNodes>\n          <leafValues>\n            2.8350758552551270e-01 -2.7224350720643997e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5239 -3.9670959813520312e-04</internalNodes>\n          <leafValues>\n            -1.3316330313682556e-01 5.3896941244602203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5240 -8.2217011367902160e-04</internalNodes>\n          <leafValues>\n            -1.3680179417133331e-01 7.7957339584827423e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5241 7.4795359978452325e-05</internalNodes>\n          <leafValues>\n            -9.0496443212032318e-02 6.8528160452842712e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5242 9.3816556036472321e-03</internalNodes>\n          <leafValues>\n            -9.9184580147266388e-02 6.4078651368618011e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5243 -6.6485297866165638e-03</internalNodes>\n          <leafValues>\n            1.4783580601215363e-01 -4.6988330781459808e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5244 -5.5821631103754044e-03</internalNodes>\n          <leafValues>\n            -1.3562120497226715e-01 5.5308390408754349e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5245 -3.0224759131669998e-02</internalNodes>\n          <leafValues>\n            3.4760668873786926e-01 -1.6698839142918587e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5246 -2.7506949380040169e-02</internalNodes>\n          <leafValues>\n            2.8031051158905029e-01 -1.0123490355908871e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5247 1.5043930150568485e-02</internalNodes>\n          <leafValues>\n            1.5279079787433147e-02 -3.9506959915161133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5248 9.2139653861522675e-03</internalNodes>\n          <leafValues>\n            2.6678409427404404e-02 -1.4255590736865997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5249 6.3955582678318024e-02</internalNodes>\n          <leafValues>\n            6.2569188885390759e-03 -8.8076668977737427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5250 3.0171850085025653e-05</internalNodes>\n          <leafValues>\n            -1.1047919839620590e-01 5.1936849951744080e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5251 -5.1049161702394485e-03</internalNodes>\n          <leafValues>\n            2.1350729465484619e-01 -2.7889270335435867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5252 -9.1436346992850304e-03</internalNodes>\n          <leafValues>\n            -1.9197109341621399e-01 3.0341459438204765e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5253 -7.6746046543121338e-02</internalNodes>\n          <leafValues>\n            -7.2468912601470947e-01 7.1879802271723747e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5254 4.8780560493469238e-02</internalNodes>\n          <leafValues>\n            -2.1447779610753059e-02 3.0364468693733215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5255 4.2551410198211670e-01</internalNodes>\n          <leafValues>\n            6.3504311256110668e-03 -9.4783991575241089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5256 2.2590209264308214e-03</internalNodes>\n          <leafValues>\n            1.8893169239163399e-02 -1.9443869590759277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5257 -3.8309961091727018e-03</internalNodes>\n          <leafValues>\n            -1.2813219428062439e-01 4.7748729586601257e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5258 7.5495108030736446e-03</internalNodes>\n          <leafValues>\n            -6.7982822656631470e-02 7.6470799744129181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5259 1.4784730039536953e-02</internalNodes>\n          <leafValues>\n            -3.4885041415691376e-02 1.7936830222606659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5260 5.6762639433145523e-02</internalNodes>\n          <leafValues>\n            1.2816789560019970e-02 -4.8105829954147339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5261 -2.5854599662125111e-03</internalNodes>\n          <leafValues>\n            1.2653970718383789e-01 -4.7761850059032440e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5262 -5.5542518384754658e-03</internalNodes>\n          <leafValues>\n            7.2126902639865875e-02 -3.8657661527395248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5263 2.6672501116991043e-03</internalNodes>\n          <leafValues>\n            -6.1485260725021362e-02 1.2647840380668640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5264 -2.2879959642887115e-01</internalNodes>\n          <leafValues>\n            -4.8435351252555847e-01 4.5618140138685703e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5265 3.7851329892873764e-02</internalNodes>\n          <leafValues>\n            1.8769560381770134e-02 -3.0806949734687805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5266 2.4275709874927998e-03</internalNodes>\n          <leafValues>\n            -7.1589171886444092e-02 8.1694543361663818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5267 -7.9000797122716904e-03</internalNodes>\n          <leafValues>\n            -1.2589320540428162e-01 4.7421310096979141e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5268 -6.7925411276519299e-03</internalNodes>\n          <leafValues>\n            6.1758730560541153e-02 -5.3803559392690659e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5269 -1.7522360384464264e-01</internalNodes>\n          <leafValues>\n            3.3726111054420471e-01 -1.7961960285902023e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5270 6.6033959388732910e-02</internalNodes>\n          <leafValues>\n            4.4206557795405388e-03 -5.5819147825241089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5271 5.1699979230761528e-03</internalNodes>\n          <leafValues>\n            5.3349301218986511e-02 -1.2245289981365204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5272 1.2047989666461945e-01</internalNodes>\n          <leafValues>\n            -6.9788158871233463e-03 7.9341912269592285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5273 -4.2617730796337128e-03</internalNodes>\n          <leafValues>\n            7.8014120459556580e-02 -6.8260386586189270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5274 3.0685370787978172e-02</internalNodes>\n          <leafValues>\n            9.3320813030004501e-03 -2.7420249581336975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5275 -6.8651121109724045e-03</internalNodes>\n          <leafValues>\n            -1.3084979355335236e-01 4.7273408621549606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5276 -3.9284229278564453e-03</internalNodes>\n          <leafValues>\n            1.1553719639778137e-01 -5.5044289678335190e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5277 -4.2112590745091438e-03</internalNodes>\n          <leafValues>\n            1.3730779290199280e-01 -5.2514389157295227e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5278 -7.6999869197607040e-03</internalNodes>\n          <leafValues>\n            -3.4011191129684448e-01 1.7478680238127708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5279 -1.1867909692227840e-02</internalNodes>\n          <leafValues>\n            2.5731179118156433e-01 -2.5691770017147064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5280 5.3619472309947014e-03</internalNodes>\n          <leafValues>\n            1.1936780065298080e-02 -2.8930050134658813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5281 -2.3130229674279690e-03</internalNodes>\n          <leafValues>\n            -1.0821309685707092e-01 5.3640749305486679e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5282 -2.2222870588302612e-01</internalNodes>\n          <leafValues>\n            3.1654310226440430e-01 -1.4542319811880589e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5283 6.2593920156359673e-03</internalNodes>\n          <leafValues>\n            3.7795171141624451e-02 -1.5100699663162231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5284 3.4754760563373566e-03</internalNodes>\n          <leafValues>\n            -6.3047468662261963e-02 8.5025683045387268e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5285 -2.8249478782527149e-04</internalNodes>\n          <leafValues>\n            -1.1442869901657104e-01 5.6041400879621506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5286 4.8107700422406197e-04</internalNodes>\n          <leafValues>\n            -9.6898466348648071e-02 2.8347050771117210e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5287 2.4178959429264069e-02</internalNodes>\n          <leafValues>\n            -2.1033059805631638e-02 2.5629448890686035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5288 2.9526960104703903e-02</internalNodes>\n          <leafValues>\n            1.6122579574584961e-02 -3.4472090005874634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5289 -3.0501780565828085e-03</internalNodes>\n          <leafValues>\n            -1.3633529841899872e-01 4.0983788669109344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5290 1.0082300286740065e-03</internalNodes>\n          <leafValues>\n            -6.0927029699087143e-02 4.0717199444770813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5291 -3.0384280253201723e-03</internalNodes>\n          <leafValues>\n            6.1883278191089630e-02 -9.7887121140956879e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5292 3.2816259190440178e-03</internalNodes>\n          <leafValues>\n            -4.7950621694326401e-02 6.2675401568412781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5293 1.3182610273361206e-02</internalNodes>\n          <leafValues>\n            2.2476239502429962e-01 -2.5649169459939003e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5294 -2.3278119042515755e-03</internalNodes>\n          <leafValues>\n            7.3735602200031281e-02 -5.1023889333009720e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5295 -1.0695509612560272e-02</internalNodes>\n          <leafValues>\n            -7.5625538825988770e-01 7.3301601223647594e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5296 7.8046746551990509e-02</internalNodes>\n          <leafValues>\n            1.8139410531148314e-03 -6.2067931890487671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5297 5.6678339838981628e-02</internalNodes>\n          <leafValues>\n            6.2128840945661068e-03 -7.8200930356979370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5298 7.2442921809852123e-03</internalNodes>\n          <leafValues>\n            -4.8852469772100449e-02 1.0644549876451492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5299 -6.6754333674907684e-02</internalNodes>\n          <leafValues>\n            -6.4796060323715210e-01 8.7654050439596176e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5300 -3.4662630409002304e-02</internalNodes>\n          <leafValues>\n            3.3293959498405457e-01 -1.7286069691181183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5301 -1.5084750019013882e-02</internalNodes>\n          <leafValues>\n            -1.2696580588817596e-01 4.5507699251174927e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5302 -2.3421730846166611e-02</internalNodes>\n          <leafValues>\n            -2.5279340147972107e-01 1.5818970277905464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5303 2.5689320638775826e-02</internalNodes>\n          <leafValues>\n            -3.7194628268480301e-02 1.6223169863224030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5304 6.3883140683174133e-03</internalNodes>\n          <leafValues>\n            3.0617009848356247e-02 -1.3695000112056732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5305 -1.0519590228796005e-01</internalNodes>\n          <leafValues>\n            -8.4453481435775757e-01 6.6635669209063053e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5306 1.8773669376969337e-02</internalNodes>\n          <leafValues>\n            4.6610347926616669e-03 -1.7115519940853119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5307 -1.3318320270627737e-03</internalNodes>\n          <leafValues>\n            6.5780423581600189e-02 -8.7241567671298981e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5308 -2.1417330205440521e-01</internalNodes>\n          <leafValues>\n            4.7866639494895935e-01 -3.0801231041550636e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5309 -5.5097872018814087e-01</internalNodes>\n          <leafValues>\n            -6.3633698225021362e-01 8.8994754478335381e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5310 -3.3415539655834436e-03</internalNodes>\n          <leafValues>\n            1.2846040725708008e-01 -3.2317079603672028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5311 1.0858159512281418e-03</internalNodes>\n          <leafValues>\n            -1.1438050121068954e-01 4.7090869396924973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5312 4.2784498073160648e-03</internalNodes>\n          <leafValues>\n            4.3842699378728867e-02 -8.0856688320636749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5313 -2.0054390188306570e-03</internalNodes>\n          <leafValues>\n            1.0532370209693909e-01 -5.0866328179836273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5314 -3.4336079843342304e-03</internalNodes>\n          <leafValues>\n            -7.9986043274402618e-02 4.2570270597934723e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5315 -1.2204749509692192e-03</internalNodes>\n          <leafValues>\n            4.1162941604852676e-02 -1.3378110527992249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5316 -1.3440379500389099e-01</internalNodes>\n          <leafValues>\n            -5.2044588327407837e-01 2.9635489918291569e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5317 1.4581819996237755e-02</internalNodes>\n          <leafValues>\n            -1.9067969173192978e-02 4.0065661072731018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5318 -2.8450360987335443e-03</internalNodes>\n          <leafValues>\n            -5.8998711407184601e-02 3.1797751784324646e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5319 4.8618339933454990e-03</internalNodes>\n          <leafValues>\n            3.9754759520292282e-02 -1.4741879701614380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5320 5.6295008398592472e-03</internalNodes>\n          <leafValues>\n            -4.2094878852367401e-02 4.1394129395484924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5321 -4.5936359092593193e-03</internalNodes>\n          <leafValues>\n            2.0751099288463593e-01 -2.7909379452466965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5322 -3.0693739652633667e-02</internalNodes>\n          <leafValues>\n            -3.4029048681259155e-01 5.0333337858319283e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5323 3.1476689036935568e-04</internalNodes>\n          <leafValues>\n            -8.8118873536586761e-02 6.3354291021823883e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5324 -3.4313879441469908e-03</internalNodes>\n          <leafValues>\n            5.9088770300149918e-02 -6.7773580551147461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5325 -3.4075058647431433e-04</internalNodes>\n          <leafValues>\n            -9.8268762230873108e-02 5.8783698827028275e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5326 -3.7829359062016010e-03</internalNodes>\n          <leafValues>\n            1.7841720581054688e-01 -4.6912178397178650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5327 -4.6322058886289597e-02</internalNodes>\n          <leafValues>\n            -1.6307410597801208e-01 3.9191931486129761e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5328 1.8471380695700645e-02</internalNodes>\n          <leafValues>\n            1.5975039452314377e-02 -2.8808701038360596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5329 9.0416809543967247e-03</internalNodes>\n          <leafValues>\n            -3.1815830618143082e-02 1.6392929852008820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5330 -3.1387940049171448e-02</internalNodes>\n          <leafValues>\n            1.5696319937705994e-01 -1.5333149582147598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5331 -7.5614887464325875e-05</internalNodes>\n          <leafValues>\n            7.4591353535652161e-02 -8.4359541535377502e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5332 -2.3939300328493118e-02</internalNodes>\n          <leafValues>\n            -1.1604589968919754e-01 3.0868789181113243e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5333 2.2537580225616693e-03</internalNodes>\n          <leafValues>\n            4.0261909365653992e-02 -1.6604030132293701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5334 -5.3389810025691986e-02</internalNodes>\n          <leafValues>\n            1.0318890213966370e-01 -2.0877240225672722e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5335 5.6420508772134781e-03</internalNodes>\n          <leafValues>\n            -4.6839520335197449e-02 1.1634089797735214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5336 4.2355400510132313e-03</internalNodes>\n          <leafValues>\n            2.5631250813603401e-02 -9.3193583190441132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5337 -2.1929260343313217e-02</internalNodes>\n          <leafValues>\n            -3.5141220688819885e-01 1.5704020857810974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5338 1.3050789944827557e-02</internalNodes>\n          <leafValues>\n            -7.6834131032228470e-03 1.3095930218696594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5339 2.2426109760999680e-02</internalNodes>\n          <leafValues>\n            6.3964631408452988e-03 -8.0513131618499756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5340 -8.8755652308464050e-02</internalNodes>\n          <leafValues>\n            3.9323249459266663e-01 -1.0365420021116734e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5341 1.1768270283937454e-02</internalNodes>\n          <leafValues>\n            -7.5270563364028931e-02 7.1183227002620697e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5342 2.1221570670604706e-02</internalNodes>\n          <leafValues>\n            2.4082770571112633e-02 -1.6292670369148254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5343 -5.2887611091136932e-02</internalNodes>\n          <leafValues>\n            3.3231079578399658e-01 -1.5548040159046650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5344 2.5847768783569336e-01</internalNodes>\n          <leafValues>\n            9.5278248190879822e-03 -6.3773447275161743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5345 -2.8695159126073122e-03</internalNodes>\n          <leafValues>\n            -9.8719991743564606e-02 5.5244650691747665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5346 1.2492690235376358e-01</internalNodes>\n          <leafValues>\n            1.9365450134500861e-03 -9.9999272823333740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5347 4.3900720775127411e-02</internalNodes>\n          <leafValues>\n            -1.6385570168495178e-02 3.7183851003646851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5348 5.2520469762384892e-03</internalNodes>\n          <leafValues>\n            4.7758270055055618e-02 -1.3461829721927643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5349 -2.0031959284096956e-03</internalNodes>\n          <leafValues>\n            8.3587102591991425e-02 -6.7750580608844757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5350 4.4535310007631779e-03</internalNodes>\n          <leafValues>\n            -8.9202463626861572e-02 4.6748258173465729e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5351 1.5174630284309387e-01</internalNodes>\n          <leafValues>\n            5.6481529027223587e-03 -8.2450437545776367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5352 -6.1992209404706955e-02</internalNodes>\n          <leafValues>\n            -4.3334591388702393e-01 5.3922580555081367e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5353 -9.3085348606109619e-02</internalNodes>\n          <leafValues>\n            5.2169102430343628e-01 -9.9382782354950905e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5354 -4.9394429661333561e-03</internalNodes>\n          <leafValues>\n            -2.0004139840602875e-01 2.7710979804396629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5355 -1.3681269483640790e-03</internalNodes>\n          <leafValues>\n            8.5065416991710663e-02 -7.4542969465255737e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5356 -2.7988219517283142e-04</internalNodes>\n          <leafValues>\n            -7.6987631618976593e-02 6.8912938237190247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5357 -3.2129848841577768e-03</internalNodes>\n          <leafValues>\n            1.5940999984741211e-01 -3.4221589565277100e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5358 3.9533369243144989e-02</internalNodes>\n          <leafValues>\n            3.1095379963517189e-03 -8.5460907220840454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5359 2.0442719105631113e-03</internalNodes>\n          <leafValues>\n            -6.4074553549289703e-02 7.8644759953022003e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5360 -2.0770760253071785e-02</internalNodes>\n          <leafValues>\n            -3.1129410862922668e-01 4.3864948675036430e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5361 -4.7200381755828857e-02</internalNodes>\n          <leafValues>\n            1.0526890307664871e-01 -5.1456131041049957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5362 1.3096869923174381e-02</internalNodes>\n          <leafValues>\n            9.9430568516254425e-03 -1.4253680408000946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5363 -1.0935390368103981e-02</internalNodes>\n          <leafValues>\n            -1.6756610572338104e-01 3.5863548517227173e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5364 -1.6354349255561829e-01</internalNodes>\n          <leafValues>\n            -8.2129329442977905e-01 1.9741130527108908e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5365 3.8668718189001083e-02</internalNodes>\n          <leafValues>\n            -1.1329679749906063e-02 4.7532460093498230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5366 6.0949958860874176e-02</internalNodes>\n          <leafValues>\n            1.1516530066728592e-02 -5.7472079992294312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5367 -1.2101690284907818e-02</internalNodes>\n          <leafValues>\n            1.5505610406398773e-01 -3.2629158347845078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5368 -1.0064270347356796e-02</internalNodes>\n          <leafValues>\n            -9.2389531433582306e-02 3.2318059355020523e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5369 -5.8900681324303150e-03</internalNodes>\n          <leafValues>\n            -2.6503130793571472e-01 1.9127139821648598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5370 -3.1361039727926254e-02</internalNodes>\n          <leafValues>\n            5.6730771064758301e-01 -9.6010044217109680e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5371 -4.7777321189641953e-02</internalNodes>\n          <leafValues>\n            5.9038662910461426e-01 -7.4091539718210697e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5372 -1.0792270302772522e-02</internalNodes>\n          <leafValues>\n            -1.2814930081367493e-01 4.0264949202537537e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5373 -1.4374120160937309e-02</internalNodes>\n          <leafValues>\n            2.0772540569305420e-01 -2.9854990541934967e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5374 5.2079811692237854e-02</internalNodes>\n          <leafValues>\n            -3.8335260469466448e-03 7.5818628072738647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5375 6.1354418285191059e-03</internalNodes>\n          <leafValues>\n            3.0476450920104980e-02 -1.7281690239906311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5376 -3.0654598958790302e-03</internalNodes>\n          <leafValues>\n            5.8025300502777100e-02 -7.9617038369178772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5377 5.7721929624676704e-03</internalNodes>\n          <leafValues>\n            -3.6747518926858902e-02 1.6319790482521057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5378 2.7028471231460571e-01</internalNodes>\n          <leafValues>\n            -3.9847781881690025e-03 4.9476540088653564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5379 -1.5034529566764832e-01</internalNodes>\n          <leafValues>\n            -5.2624911069869995e-01 1.0567910037934780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5380 7.6101601123809814e-02</internalNodes>\n          <leafValues>\n            -2.3525250144302845e-03 9.1819989681243896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5381 -5.5953811854124069e-02</internalNodes>\n          <leafValues>\n            -7.8321272134780884e-01 6.8363421596586704e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5382 -2.4320950731635094e-02</internalNodes>\n          <leafValues>\n            2.2739610075950623e-01 -1.1622290126979351e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5383 1.6274319961667061e-02</internalNodes>\n          <leafValues>\n            1.4024170115590096e-02 -3.4222239255905151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5384 7.7015208080410957e-04</internalNodes>\n          <leafValues>\n            -4.4768709689378738e-02 5.7412229478359222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5385 1.3995269546285272e-03</internalNodes>\n          <leafValues>\n            -6.0614239424467087e-02 8.4398999810218811e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5386 -2.0544769242405891e-02</internalNodes>\n          <leafValues>\n            -1.8160410225391388e-01 2.0795119926333427e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5387 -3.6872550845146179e-02</internalNodes>\n          <leafValues>\n            2.6817229390144348e-01 -1.9921269267797470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5388 -2.5466610677540302e-03</internalNodes>\n          <leafValues>\n            -1.3361929357051849e-01 1.9191939383745193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5389 3.3513590693473816e-02</internalNodes>\n          <leafValues>\n            9.8206587135791779e-03 -5.2659887075424194e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5390 -5.5437661707401276e-02</internalNodes>\n          <leafValues>\n            4.5292490720748901e-01 -9.3475803732872009e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5391 -5.3564338013529778e-03</internalNodes>\n          <leafValues>\n            -1.4787580072879791e-01 3.3617950975894928e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5392 1.1551200412213802e-02</internalNodes>\n          <leafValues>\n            -3.2851058989763260e-02 6.3716597855091095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5393 7.2917826473712921e-02</internalNodes>\n          <leafValues>\n            -1.6388719901442528e-02 3.1580808758735657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5394 -8.9563012123107910e-02</internalNodes>\n          <leafValues>\n            7.5366562604904175e-01 -2.0717559382319450e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5395 -2.2225419525057077e-03</internalNodes>\n          <leafValues>\n            -9.2733852565288544e-02 6.0395851731300354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5396 -1.7847110331058502e-01</internalNodes>\n          <leafValues>\n            4.7988530993461609e-01 -1.0481510311365128e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5397 6.7723011597990990e-03</internalNodes>\n          <leafValues>\n            5.2660830318927765e-02 -1.0471290349960327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5398 2.8399130329489708e-02</internalNodes>\n          <leafValues>\n            -2.2862000390887260e-02 2.5348138809204102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5399 -7.0053818635642529e-03</internalNodes>\n          <leafValues>\n            -1.3017000257968903e-01 4.3448921293020248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5400 -5.1440461538732052e-03</internalNodes>\n          <leafValues>\n            -1.4800100028514862e-01 4.5171629637479782e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5401 -1.1269059963524342e-02</internalNodes>\n          <leafValues>\n            1.1185359954833984e-01 -5.4867088794708252e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5402 2.2866109386086464e-02</internalNodes>\n          <leafValues>\n            -1.5563690103590488e-02 2.1705490350723267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5403 5.1559228450059891e-02</internalNodes>\n          <leafValues>\n            1.0421809740364552e-02 -5.3233247995376587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5404 1.8902059644460678e-02</internalNodes>\n          <leafValues>\n            -3.0878869816660881e-02 5.5574499070644379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5405 5.5700382217764854e-03</internalNodes>\n          <leafValues>\n            5.3661361336708069e-02 -9.4876497983932495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5406 -2.3021729663014412e-02</internalNodes>\n          <leafValues>\n            1.2766240537166595e-01 -2.2307910025119781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5407 7.1334750391542912e-03</internalNodes>\n          <leafValues>\n            3.1089689582586288e-02 -1.6293430328369141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5408 -2.9335260391235352e-02</internalNodes>\n          <leafValues>\n            1.0503090173006058e-01 -2.6008550077676773e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5409 4.6253278851509094e-02</internalNodes>\n          <leafValues>\n            7.8362170606851578e-03 -6.6226661205291748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5410 3.9622580516152084e-04</internalNodes>\n          <leafValues>\n            -9.4567127525806427e-02 2.6796899735927582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5411 -1.1323750019073486e-02</internalNodes>\n          <leafValues>\n            7.4313652515411377e-01 -6.7432140931487083e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5412 -1.7217209935188293e-01</internalNodes>\n          <leafValues>\n            -7.1483498811721802e-01 8.1747565418481827e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5413 1.8156579462811351e-03</internalNodes>\n          <leafValues>\n            4.8135720193386078e-02 -1.0678470134735107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5414 5.8022491633892059e-02</internalNodes>\n          <leafValues>\n            -7.4218288064002991e-03 3.8226440548896790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5415 1.4357370091602206e-03</internalNodes>\n          <leafValues>\n            -2.2542880475521088e-01 2.1576719358563423e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5416 5.5960440076887608e-03</internalNodes>\n          <leafValues>\n            2.5731930136680603e-01 -2.1246509626507759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5417 2.5314849335700274e-03</internalNodes>\n          <leafValues>\n            -3.6227720975875854e-01 1.5138260088860989e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5418 -4.2207110673189163e-03</internalNodes>\n          <leafValues>\n            -4.6638991683721542e-02 2.6125539094209671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5419 -5.4260431788861752e-03</internalNodes>\n          <leafValues>\n            1.0110379755496979e-01 -5.2066121250391006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5420 1.6170790186151862e-03</internalNodes>\n          <leafValues>\n            -4.1680540889501572e-02 9.6459351480007172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5421 -3.2414530869573355e-03</internalNodes>\n          <leafValues>\n            -1.2638680636882782e-01 3.9169210940599442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5422 4.5421482063829899e-03</internalNodes>\n          <leafValues>\n            -2.9149880632758141e-02 6.9948889315128326e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5423 5.3024510852992535e-03</internalNodes>\n          <leafValues>\n            -7.9129062592983246e-02 6.1111859977245331e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5424 -4.6412080526351929e-02</internalNodes>\n          <leafValues>\n            3.1127449870109558e-01 -6.2580788508057594e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5425 -6.2991487793624401e-03</internalNodes>\n          <leafValues>\n            -8.3928130567073822e-02 6.6761530935764313e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5426 7.9948090016841888e-02</internalNodes>\n          <leafValues>\n            2.6887101121246815e-03 -5.6553709506988525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5427 9.9693494848906994e-04</internalNodes>\n          <leafValues>\n            -7.2051003575325012e-02 9.2260897159576416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5428 -2.1847949828952551e-03</internalNodes>\n          <leafValues>\n            8.3864517509937286e-02 -6.6099606454372406e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5429 -1.5286840498447418e-01</internalNodes>\n          <leafValues>\n            6.1705768108367920e-01 -8.1674018874764442e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5430 1.7121130600571632e-02</internalNodes>\n          <leafValues>\n            2.6676440611481667e-02 -1.4158309996128082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5431 1.8799189710989594e-03</internalNodes>\n          <leafValues>\n            -7.7865563333034515e-02 6.7955218255519867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5432 5.5029629729688168e-03</internalNodes>\n          <leafValues>\n            -7.9979859292507172e-02 6.4055956900119781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5433 2.7474550530314445e-02</internalNodes>\n          <leafValues>\n            6.0482721775770187e-02 -8.8957548141479492e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5434 2.7708879113197327e-01</internalNodes>\n          <leafValues>\n            4.4098719954490662e-03 -1.0000040531158447e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5435 -4.9538668245077133e-03</internalNodes>\n          <leafValues>\n            1.4720940589904785e-01 -3.5671569406986237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5436 4.7095369547605515e-02</internalNodes>\n          <leafValues>\n            -6.0950522311031818e-03 2.4319580197334290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5437 -3.1939700711518526e-03</internalNodes>\n          <leafValues>\n            -1.3417580723762512e-01 3.9335511624813080e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5438 3.5586568992584944e-03</internalNodes>\n          <leafValues>\n            2.1399470046162605e-02 -4.3609801679849625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5439 -1.0028639808297157e-02</internalNodes>\n          <leafValues>\n            1.6288889944553375e-01 -3.1448449939489365e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5440 -2.9802629724144936e-03</internalNodes>\n          <leafValues>\n            -7.0220857858657837e-02 3.7910789251327515e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5441 1.7347529530525208e-02</internalNodes>\n          <leafValues>\n            1.1053959839046001e-02 -4.5107790827751160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5442 -4.4207129627466202e-02</internalNodes>\n          <leafValues>\n            1.4115320146083832e-01 -6.2362072058022022e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5443 -3.2249989453703165e-03</internalNodes>\n          <leafValues>\n            -1.0305760055780411e-01 4.9647849053144455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5444 7.5196991674602032e-03</internalNodes>\n          <leafValues>\n            -2.8604390099644661e-02 9.8367802798748016e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5445 -6.1209458857774734e-02</internalNodes>\n          <leafValues>\n            2.2113859653472900e-01 -2.9835490509867668e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5446 2.0107250660657883e-02</internalNodes>\n          <leafValues>\n            1.6412479802966118e-02 -1.2316829711198807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5447 -1.6578679904341698e-02</internalNodes>\n          <leafValues>\n            -2.3395630717277527e-01 3.0250690877437592e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5448 -6.0900870710611343e-02</internalNodes>\n          <leafValues>\n            3.1688570976257324e-01 -1.8433200195431709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5449 4.2772209271788597e-03</internalNodes>\n          <leafValues>\n            -4.3859448283910751e-02 1.2858760356903076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5450 6.6130697727203369e-02</internalNodes>\n          <leafValues>\n            2.0941190421581268e-02 -2.0549100637435913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5451 2.5896991137415171e-03</internalNodes>\n          <leafValues>\n            -8.2597322762012482e-02 7.7048726379871368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5452 -1.7113700509071350e-02</internalNodes>\n          <leafValues>\n            -9.9560201168060303e-02 2.0174279808998108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5453 6.2078679911792278e-03</internalNodes>\n          <leafValues>\n            -1.5074240043759346e-02 3.5393691062927246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5454 -3.3676949143409729e-01</internalNodes>\n          <leafValues>\n            -4.9838671088218689e-01 7.4067250825464725e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5455 5.0239380449056625e-02</internalNodes>\n          <leafValues>\n            -1.8589239567518234e-02 2.8223350644111633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5456 1.1036300100386143e-02</internalNodes>\n          <leafValues>\n            2.9623959213495255e-02 -2.0078790187835693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5457 6.0965020209550858e-02</internalNodes>\n          <leafValues>\n            -1.1036460287868977e-02 5.0334519147872925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5458 1.5966590493917465e-02</internalNodes>\n          <leafValues>\n            1.3941870070993900e-02 -2.4742470681667328e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>243</maxWeakCount>\n      <stageThreshold>-1.4138590097427368e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 5459 -3.8829419761896133e-02</internalNodes>\n          <leafValues>\n            3.1823828816413879e-01 -1.4062009751796722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5460 -6.7771300673484802e-02</internalNodes>\n          <leafValues>\n            2.0526969432830811e-01 -1.7867469787597656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5461 9.3152940273284912e-02</internalNodes>\n          <leafValues>\n            -1.3293810188770294e-01 2.3252120614051819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5462 -6.0846367850899696e-03</internalNodes>\n          <leafValues>\n            1.9817650318145752e-01 -1.5535140037536621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5463 -1.7230149358510971e-02</internalNodes>\n          <leafValues>\n            2.5784310698509216e-01 -9.0387366712093353e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5464 4.1907798498868942e-02</internalNodes>\n          <leafValues>\n            6.2066148966550827e-02 -3.2303139567375183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5465 -3.4084350336343050e-03</internalNodes>\n          <leafValues>\n            -3.1667909026145935e-01 6.0275040566921234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5466 3.4909289330244064e-02</internalNodes>\n          <leafValues>\n            -1.2456309795379639e-01 1.6099859774112701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5467 1.1676900088787079e-02</internalNodes>\n          <leafValues>\n            -1.8025660514831543e-01 1.2234430015087128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5468 -1.2773449998348951e-03</internalNodes>\n          <leafValues>\n            -2.4735580384731293e-01 6.2129739671945572e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5469 1.6917299479246140e-02</internalNodes>\n          <leafValues>\n            6.9671042263507843e-02 -2.5292581319808960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5470 2.5656640529632568e-02</internalNodes>\n          <leafValues>\n            2.6212580502033234e-02 -1.6348999738693237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5471 1.9884048961102962e-03</internalNodes>\n          <leafValues>\n            -3.1018510460853577e-01 5.0259251147508621e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5472 4.2548488825559616e-02</internalNodes>\n          <leafValues>\n            1.7065819352865219e-02 -4.7830620408058167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5473 6.0466718859970570e-03</internalNodes>\n          <leafValues>\n            -2.2118049860000610e-01 7.2842411696910858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5474 -8.0229081213474274e-03</internalNodes>\n          <leafValues>\n            -1.4530059695243835e-01 4.9906261265277863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5475 3.7937261164188385e-02</internalNodes>\n          <leafValues>\n            -3.4007780253887177e-02 4.3715330958366394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5476 -5.2960298955440521e-02</internalNodes>\n          <leafValues>\n            -2.8856590390205383e-01 1.8457209691405296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5477 7.5578060932457447e-03</internalNodes>\n          <leafValues>\n            -2.3534600436687469e-01 6.0302570462226868e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5478 -1.5554980374872684e-02</internalNodes>\n          <leafValues>\n            -2.6567730307579041e-01 5.5279370397329330e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5479 3.4035260323435068e-03</internalNodes>\n          <leafValues>\n            4.6175889670848846e-02 -3.3651891350746155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5480 -1.9370270892977715e-02</internalNodes>\n          <leafValues>\n            1.9603839516639709e-01 -8.0186828970909119e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5481 2.1719569340348244e-02</internalNodes>\n          <leafValues>\n            4.1932079941034317e-02 -3.4327590465545654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5482 -3.8787510129623115e-04</internalNodes>\n          <leafValues>\n            -2.5382238626480103e-01 4.5200780034065247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5483 3.3794559538364410e-02</internalNodes>\n          <leafValues>\n            -6.4901560544967651e-02 2.1238659322261810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5484 -9.1701336205005646e-03</internalNodes>\n          <leafValues>\n            -2.3874589800834656e-01 4.0796380490064621e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5485 -1.3741330476477742e-03</internalNodes>\n          <leafValues>\n            -1.6430020332336426e-01 8.1496283411979675e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5486 -1.2352719902992249e-02</internalNodes>\n          <leafValues>\n            1.6805070638656616e-01 -5.7883970439434052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5487 -1.1177700012922287e-02</internalNodes>\n          <leafValues>\n            -1.9775860011577606e-01 6.3408702611923218e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5488 2.5044390931725502e-03</internalNodes>\n          <leafValues>\n            -1.2900459766387939e-01 5.8973610401153564e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5489 2.1939110010862350e-03</internalNodes>\n          <leafValues>\n            1.4937159419059753e-01 -7.9897291958332062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5490 -4.6443499624729156e-02</internalNodes>\n          <leafValues>\n            -4.4332349300384521e-01 2.0691359415650368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5491 -3.8867309689521790e-02</internalNodes>\n          <leafValues>\n            -5.3450870513916016e-01 2.1435650065541267e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5492 -2.0838780328631401e-03</internalNodes>\n          <leafValues>\n            5.3876239806413651e-02 -1.6674530506134033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5493 -1.7784969881176949e-02</internalNodes>\n          <leafValues>\n            2.5898349285125732e-01 -6.5794423222541809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5494 -9.9478460848331451e-02</internalNodes>\n          <leafValues>\n            -7.2332090139389038e-01 6.1601991765201092e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5495 -2.5733250658959150e-03</internalNodes>\n          <leafValues>\n            7.2027653455734253e-02 -1.7522309720516205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5496 6.9977439939975739e-02</internalNodes>\n          <leafValues>\n            -3.0238330364227295e-02 3.9809378981590271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5497 -1.0880780406296253e-02</internalNodes>\n          <leafValues>\n            -3.0606269836425781e-01 4.5210558921098709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5498 4.8081401735544205e-02</internalNodes>\n          <leafValues>\n            4.3911099433898926e-02 -2.5686219334602356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5499 7.9688243567943573e-02</internalNodes>\n          <leafValues>\n            -3.3741600811481476e-02 3.6532700061798096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5500 -1.5404020436108112e-02</internalNodes>\n          <leafValues>\n            -1.7731459438800812e-01 2.3800730705261230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5501 -3.6643899977207184e-02</internalNodes>\n          <leafValues>\n            -6.3931107521057129e-01 1.7518630251288414e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5502 -1.3072500005364418e-02</internalNodes>\n          <leafValues>\n            -2.4119360744953156e-01 5.8876950293779373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5503 -2.5379280559718609e-03</internalNodes>\n          <leafValues>\n            -2.0509210228919983e-01 5.8915760368108749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5504 4.7491278499364853e-02</internalNodes>\n          <leafValues>\n            2.2842779755592346e-02 -3.9453479647636414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5505 -2.1489640697836876e-02</internalNodes>\n          <leafValues>\n            -3.1091120839118958e-01 3.8020871579647064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5506 1.3841330073773861e-02</internalNodes>\n          <leafValues>\n            -5.6039519608020782e-02 2.1308979392051697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5507 4.9399589188396931e-03</internalNodes>\n          <leafValues>\n            -1.8838630616664886e-01 6.2171839177608490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5508 1.3483439572155476e-02</internalNodes>\n          <leafValues>\n            3.6875329911708832e-02 -2.4952369928359985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5509 -8.4225656464695930e-03</internalNodes>\n          <leafValues>\n            7.1501091122627258e-02 -1.3996620476245880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5510 -4.3786991387605667e-02</internalNodes>\n          <leafValues>\n            2.0128419995307922e-01 -5.3744260221719742e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5511 -1.0068439878523350e-02</internalNodes>\n          <leafValues>\n            -1.6707019507884979e-01 6.1345089226961136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5512 2.4383061099797487e-03</internalNodes>\n          <leafValues>\n            -1.2105459719896317e-01 4.9807701259851456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5513 3.2083820551633835e-03</internalNodes>\n          <leafValues>\n            -5.6045360863208771e-02 1.7955709993839264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5514 -2.0389519631862640e-02</internalNodes>\n          <leafValues>\n            -3.1983590126037598e-01 3.4141618758440018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5515 -2.2914420813322067e-02</internalNodes>\n          <leafValues>\n            -3.9454650878906250e-01 2.3838970810174942e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5516 1.8566900864243507e-02</internalNodes>\n          <leafValues>\n            3.8432560861110687e-02 -2.2991999983787537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5517 -1.0277030058205128e-02</internalNodes>\n          <leafValues>\n            2.2557449340820312e-01 -4.9223229289054871e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5518 -9.7914133220911026e-03</internalNodes>\n          <leafValues>\n            1.9327880442142487e-01 -3.6139059811830521e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5519 1.2699839659035206e-02</internalNodes>\n          <leafValues>\n            5.6297991424798965e-02 -2.0981599390506744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5520 3.9867468178272247e-02</internalNodes>\n          <leafValues>\n            9.4982674345374107e-03 -4.7686201333999634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5521 3.3704519271850586e-02</internalNodes>\n          <leafValues>\n            1.8848460167646408e-02 -5.3707981109619141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5522 -3.3695269376039505e-02</internalNodes>\n          <leafValues>\n            -2.7003350853919983e-01 3.8956340402364731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5523 2.3961249738931656e-02</internalNodes>\n          <leafValues>\n            -9.5000430941581726e-02 1.0282819718122482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5524 8.2990229129791260e-02</internalNodes>\n          <leafValues>\n            3.7828568369150162e-02 -3.0267751216888428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5525 1.6537210345268250e-01</internalNodes>\n          <leafValues>\n            2.3912150412797928e-02 -4.1214409470558167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5526 1.8202569335699081e-02</internalNodes>\n          <leafValues>\n            2.6127459481358528e-02 -6.9227010011672974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5527 -4.5322380959987640e-02</internalNodes>\n          <leafValues>\n            -4.4437649846076965e-01 2.1279569715261459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5528 4.7620609402656555e-02</internalNodes>\n          <leafValues>\n            -3.4070000052452087e-02 2.1065680682659149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5529 1.0596530046314001e-03</internalNodes>\n          <leafValues>\n            9.8347820341587067e-02 -9.2732593417167664e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5530 3.2028049230575562e-02</internalNodes>\n          <leafValues>\n            2.3833949118852615e-02 -4.3276590108871460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5531 -1.3764370232820511e-02</internalNodes>\n          <leafValues>\n            -4.1726619005203247e-01 2.1883359178900719e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5532 3.6652158945798874e-02</internalNodes>\n          <leafValues>\n            -2.6851410046219826e-02 1.0051230341196060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5533 -1.5507760457694530e-02</internalNodes>\n          <leafValues>\n            4.8519268631935120e-01 -2.4900710210204124e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5534 7.1460101753473282e-03</internalNodes>\n          <leafValues>\n            5.7906471192836761e-02 -5.1613971590995789e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5535 2.4280229583382607e-02</internalNodes>\n          <leafValues>\n            -3.7341829389333725e-02 2.9201799631118774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5536 -8.3522319793701172e-02</internalNodes>\n          <leafValues>\n            3.7447971105575562e-01 -3.4602559171617031e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5537 3.1485721468925476e-02</internalNodes>\n          <leafValues>\n            2.4092009291052818e-02 -3.9594879746437073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5538 9.4820279628038406e-03</internalNodes>\n          <leafValues>\n            -7.3714673519134521e-02 1.3066330552101135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5539 4.0116958320140839e-02</internalNodes>\n          <leafValues>\n            3.0453719198703766e-02 -3.0641159415245056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5540 -5.2815478295087814e-02</internalNodes>\n          <leafValues>\n            4.5792409777641296e-01 -2.3906230926513672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5541 4.6821571886539459e-03</internalNodes>\n          <leafValues>\n            -8.8395930826663971e-02 1.2858130037784576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5542 -1.3448280096054077e-01</internalNodes>\n          <leafValues>\n            -2.7471750974655151e-01 1.5970310196280479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5543 5.4646627977490425e-03</internalNodes>\n          <leafValues>\n            -2.1628439426422119e-01 4.3035320937633514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5544 -3.5996358841657639e-02</internalNodes>\n          <leafValues>\n            -4.8524090647697449e-01 1.0563749819993973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5545 2.5235998630523682e-01</internalNodes>\n          <leafValues>\n            9.3745701014995575e-03 -8.8613390922546387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5546 -2.5067269802093506e-02</internalNodes>\n          <leafValues>\n            -2.2364640235900879e-01 3.7146601825952530e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5547 -1.4150329865515232e-02</internalNodes>\n          <leafValues>\n            3.7856650352478027e-01 -2.7817489579319954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5548 1.0049570351839066e-01</internalNodes>\n          <leafValues>\n            1.1244839988648891e-02 -7.1869522333145142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5549 1.9989080727100372e-02</internalNodes>\n          <leafValues>\n            2.6056809350848198e-02 -3.2147800922393799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5550 -4.9160558730363846e-02</internalNodes>\n          <leafValues>\n            -2.3164880275726318e-01 1.6317559406161308e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5551 2.2118790075182915e-02</internalNodes>\n          <leafValues>\n            -5.0569478422403336e-02 1.7572580277919769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5552 -7.6390360482037067e-03</internalNodes>\n          <leafValues>\n            2.2264319658279419e-01 -4.3685391545295715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5553 -1.6813250258564949e-03</internalNodes>\n          <leafValues>\n            5.5582441389560699e-02 -1.7739319801330566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5554 -1.6619000583887100e-02</internalNodes>\n          <leafValues>\n            -2.7812969684600830e-01 1.9737830385565758e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5555 -3.2801620662212372e-02</internalNodes>\n          <leafValues>\n            -2.3325189948081970e-01 3.6663819104433060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5556 2.4526590108871460e-01</internalNodes>\n          <leafValues>\n            -2.9738940298557281e-02 3.1338408589363098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5557 -1.7271770164370537e-02</internalNodes>\n          <leafValues>\n            5.2818918228149414e-01 -1.4151779934763908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5558 2.0111909136176109e-02</internalNodes>\n          <leafValues>\n            2.7173580601811409e-02 -8.3122722804546356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5559 1.6076749190688133e-02</internalNodes>\n          <leafValues>\n            5.6346639990806580e-02 -1.5893140435218811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5560 -1.0179769992828369e-01</internalNodes>\n          <leafValues>\n            6.0448008775711060e-01 -7.6062050648033619e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5561 -4.4865649193525314e-02</internalNodes>\n          <leafValues>\n            3.3077031373977661e-01 -2.5329189375042915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5562 2.7094980701804161e-02</internalNodes>\n          <leafValues>\n            -6.9251723587512970e-02 1.5350599586963654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5563 -3.7675891071557999e-02</internalNodes>\n          <leafValues>\n            -3.1949838995933533e-01 2.9909679666161537e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5564 -8.2310457946732640e-04</internalNodes>\n          <leafValues>\n            6.0612969100475311e-02 -1.0531579703092575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5565 5.5686049163341522e-02</internalNodes>\n          <leafValues>\n            -4.0920350700616837e-02 2.2959649562835693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5566 -1.6866069927345961e-04</internalNodes>\n          <leafValues>\n            -7.7643588185310364e-02 2.9549270868301392e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5567 -2.3873209953308105e-02</internalNodes>\n          <leafValues>\n            2.7944079041481018e-01 -3.1888458877801895e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5568 -1.5003600157797337e-02</internalNodes>\n          <leafValues>\n            2.5077390670776367e-01 -4.5932788401842117e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5569 -1.4522319659590721e-02</internalNodes>\n          <leafValues>\n            -1.6453540325164795e-01 5.5180910974740982e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5570 -7.4650160968303680e-03</internalNodes>\n          <leafValues>\n            -1.2690469622612000e-01 7.1543112397193909e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5571 5.4984640330076218e-02</internalNodes>\n          <leafValues>\n            -1.3730799779295921e-02 6.5119642019271851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5572 -8.8030762970447540e-02</internalNodes>\n          <leafValues>\n            2.5416490435600281e-01 -1.2233870103955269e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5573 -3.6195501685142517e-02</internalNodes>\n          <leafValues>\n            -4.4917309284210205e-01 2.1093770861625671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5574 3.7063211202621460e-02</internalNodes>\n          <leafValues>\n            -6.6644148901104927e-03 2.4940170347690582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5575 -1.0568380355834961e-02</internalNodes>\n          <leafValues>\n            -4.1061571240425110e-01 2.1398089826107025e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5576 1.2662780284881592e-01</internalNodes>\n          <leafValues>\n            5.2506178617477417e-03 -3.3240249752998352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5577 -8.7341770995408297e-04</internalNodes>\n          <leafValues>\n            3.2687219977378845e-01 -2.7704829350113869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5578 -1.0967969428747892e-03</internalNodes>\n          <leafValues>\n            -2.7710831165313721e-01 3.6352828145027161e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5579 -7.9738020896911621e-02</internalNodes>\n          <leafValues>\n            -5.8329159021377563e-01 1.4061779715120792e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5580 -3.8278030697256327e-03</internalNodes>\n          <leafValues>\n            3.5459451377391815e-02 -1.3996809720993042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5581 2.0333999767899513e-02</internalNodes>\n          <leafValues>\n            -2.1421350538730621e-02 5.1610380411148071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5582 7.5564032886177301e-04</internalNodes>\n          <leafValues>\n            -1.0803470015525818e-01 3.3538289368152618e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5583 1.7855849862098694e-01</internalNodes>\n          <leafValues>\n            9.4842249527573586e-03 -8.1858187913894653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5584 -3.4745071083307266e-02</internalNodes>\n          <leafValues>\n            -5.8172190189361572e-01 1.1315549723803997e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5585 5.1304209046065807e-03</internalNodes>\n          <leafValues>\n            -1.0659860074520111e-01 7.4440896511077881e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5586 -3.3936198800802231e-02</internalNodes>\n          <leafValues>\n            -4.5997759699821472e-01 1.5264419838786125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5587 -1.0171560570597649e-03</internalNodes>\n          <leafValues>\n            1.0301309823989868e-01 -8.9842960238456726e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5588 6.3489019870758057e-02</internalNodes>\n          <leafValues>\n            6.8669100292026997e-03 -7.6022517681121826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5589 2.4077939987182617e-01</internalNodes>\n          <leafValues>\n            -2.1571479737758636e-02 4.1113030910491943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5590 -5.1963441073894501e-02</internalNodes>\n          <leafValues>\n            -2.8517320752143860e-01 4.0943060070276260e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5591 3.6408171057701111e-02</internalNodes>\n          <leafValues>\n            -5.0460960716009140e-02 1.6671819984912872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5592 9.6712149679660797e-03</internalNodes>\n          <leafValues>\n            -4.8915110528469086e-02 1.8224430084228516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5593 2.2268150001764297e-02</internalNodes>\n          <leafValues>\n            6.1390981078147888e-02 -1.5445849299430847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5594 -7.0929281413555145e-02</internalNodes>\n          <leafValues>\n            5.0010168552398682e-01 -3.9896317757666111e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5595 2.0806699467357248e-04</internalNodes>\n          <leafValues>\n            -1.4475630223751068e-01 6.3607528805732727e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5596 -9.2365043237805367e-03</internalNodes>\n          <leafValues>\n            -2.1817289292812347e-01 3.8856260478496552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5597 2.2781990468502045e-02</internalNodes>\n          <leafValues>\n            2.0108619704842567e-02 -3.8452360033988953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5598 -7.0844120346009731e-03</internalNodes>\n          <leafValues>\n            -4.8885490745306015e-02 4.6367339789867401e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5599 -8.4006279706954956e-02</internalNodes>\n          <leafValues>\n            3.5921669006347656e-01 -2.2461889311671257e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5600 -7.0446580648422241e-02</internalNodes>\n          <leafValues>\n            -8.8395321369171143e-01 2.9730550013482571e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5601 4.8899810761213303e-02</internalNodes>\n          <leafValues>\n            2.3936219513416290e-02 -3.6770141124725342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5602 2.9677329584956169e-02</internalNodes>\n          <leafValues>\n            1.6608120873570442e-02 -2.2972689568996429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5603 2.5721399579197168e-03</internalNodes>\n          <leafValues>\n            -3.2572209835052490e-01 2.4146009236574173e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5604 1.6117929480969906e-03</internalNodes>\n          <leafValues>\n            2.9355300590395927e-02 -3.7541579455137253e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5605 1.7546640709042549e-02</internalNodes>\n          <leafValues>\n            -5.0879240036010742e-02 1.5283130109310150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5606 -4.6326398849487305e-02</internalNodes>\n          <leafValues>\n            -2.2843320667743683e-01 1.4442530460655689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5607 -3.3205670118331909e-01</internalNodes>\n          <leafValues>\n            7.4457818269729614e-01 -1.0856879875063896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5608 -4.2317830026149750e-02</internalNodes>\n          <leafValues>\n            -1.4666019380092621e-01 5.7799231261014938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5609 3.2436659093946218e-03</internalNodes>\n          <leafValues>\n            5.4021451622247696e-02 -1.7029410600662231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5610 -2.0900890231132507e-02</internalNodes>\n          <leafValues>\n            -4.0789291262626648e-01 2.5334810838103294e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5611 2.0325010642409325e-02</internalNodes>\n          <leafValues>\n            3.3015929162502289e-02 -2.4503390491008759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5612 -4.6341929584741592e-02</internalNodes>\n          <leafValues>\n            1.5976649522781372e-01 -4.1177939623594284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5613 -3.4356329590082169e-02</internalNodes>\n          <leafValues>\n            1.6021409630775452e-01 -6.2500953674316406e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5614 2.4465970695018768e-02</internalNodes>\n          <leafValues>\n            -3.7487599998712540e-02 2.2807280719280243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5615 -1.8139539286494255e-02</internalNodes>\n          <leafValues>\n            -1.5909589827060699e-01 6.0539811849594116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5616 6.4394161105155945e-02</internalNodes>\n          <leafValues>\n            6.6441670060157776e-03 -7.4860227108001709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5617 9.6367759397253394e-04</internalNodes>\n          <leafValues>\n            -9.0620808303356171e-02 9.4118133187294006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5618 2.0024490356445312e-01</internalNodes>\n          <leafValues>\n            5.9731658548116684e-03 -8.2521688938140869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5619 -6.3498668372631073e-02</internalNodes>\n          <leafValues>\n            -6.9635838270187378e-01 9.3487137928605080e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5620 -1.9232399761676788e-02</internalNodes>\n          <leafValues>\n            1.1236680299043655e-01 -2.9199739918112755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5621 2.5418749451637268e-01</internalNodes>\n          <leafValues>\n            1.3959039933979511e-02 -5.1584947109222412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5622 1.0437460243701935e-01</internalNodes>\n          <leafValues>\n            -2.7743030339479446e-02 2.7373430132865906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5623 8.5034370422363281e-03</internalNodes>\n          <leafValues>\n            5.4144650697708130e-02 -1.3029509782791138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5624 5.2647730335593224e-03</internalNodes>\n          <leafValues>\n            -4.8077501356601715e-02 1.0371380299329758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5625 -2.4193519726395607e-02</internalNodes>\n          <leafValues>\n            1.9932989776134491e-01 -3.7111040204763412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5626 -4.6968772076070309e-03</internalNodes>\n          <leafValues>\n            -6.5797090530395508e-02 3.3837348222732544e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5627 -2.3464579135179520e-02</internalNodes>\n          <leafValues>\n            -2.6043030619621277e-01 3.0933089554309845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5628 -2.9029840603470802e-02</internalNodes>\n          <leafValues>\n            2.0683619379997253e-01 -2.7628650888800621e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5629 7.9100236296653748e-02</internalNodes>\n          <leafValues>\n            7.7356752008199692e-03 -9.1816711425781250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5630 6.2152887694537640e-03</internalNodes>\n          <leafValues>\n            -7.3988027870655060e-02 8.7727412581443787e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5631 -6.7013278603553772e-02</internalNodes>\n          <leafValues>\n            3.7628298997879028e-01 -2.0892709493637085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5632 -7.9359989613294601e-03</internalNodes>\n          <leafValues>\n            -8.9532703161239624e-02 6.6559307277202606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5633 1.3035970041528344e-03</internalNodes>\n          <leafValues>\n            -6.6657140851020813e-02 1.1399099975824356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5634 -1.1964319646358490e-01</internalNodes>\n          <leafValues>\n            -6.0656189918518066e-01 7.3508038185536861e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5635 -2.2869240492582321e-03</internalNodes>\n          <leafValues>\n            7.3336817324161530e-02 -1.1889570206403732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5636 -1.1462569981813431e-01</internalNodes>\n          <leafValues>\n            2.9288530349731445e-01 -6.7763519473373890e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5637 4.8477489501237869e-02</internalNodes>\n          <leafValues>\n            -1.7062950879335403e-02 4.2953211069107056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5638 -1.3129960279911757e-03</internalNodes>\n          <leafValues>\n            -7.4319638311862946e-02 6.2149789184331894e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5639 -6.6344782710075378e-02</internalNodes>\n          <leafValues>\n            -5.8945667743682861e-01 1.3225819915533066e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5640 -4.6543189091607928e-04</internalNodes>\n          <leafValues>\n            5.7886548340320587e-02 -6.4295299351215363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5641 -1.3286540284752846e-02</internalNodes>\n          <leafValues>\n            1.4123329520225525e-01 -6.1506468802690506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5642 7.3928399942815304e-03</internalNodes>\n          <leafValues>\n            -7.2719991207122803e-02 4.2179141193628311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5643 -4.7434169799089432e-02</internalNodes>\n          <leafValues>\n            3.2672271132469177e-01 -2.9001530259847641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5644 1.3546790182590485e-01</internalNodes>\n          <leafValues>\n            1.0393570177257061e-02 -4.5354479551315308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5645 -2.5216810405254364e-02</internalNodes>\n          <leafValues>\n            -1.9075979292392731e-01 4.1522741317749023e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5646 -4.9431398510932922e-02</internalNodes>\n          <leafValues>\n            -9.4192171096801758e-01 3.5473550669848919e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5647 -4.8375181853771210e-02</internalNodes>\n          <leafValues>\n            -8.3028668165206909e-01 7.2369067929685116e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5648 -1.4348509721457958e-02</internalNodes>\n          <leafValues>\n            -2.1860499680042267e-01 3.1486429274082184e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5649 -5.5373171344399452e-03</internalNodes>\n          <leafValues>\n            -2.1521030366420746e-01 4.4235888868570328e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5650 2.1771800518035889e-01</internalNodes>\n          <leafValues>\n            -5.0501842051744461e-03 4.9025520682334900e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5651 1.7441399395465851e-01</internalNodes>\n          <leafValues>\n            -9.7074145451188087e-03 7.4196231365203857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5652 8.8840499520301819e-02</internalNodes>\n          <leafValues>\n            -5.8005251921713352e-03 3.3403220772743225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5653 -3.8012791424989700e-02</internalNodes>\n          <leafValues>\n            5.0677591562271118e-01 -1.3809430412948132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5654 -6.3611388206481934e-02</internalNodes>\n          <leafValues>\n            -5.6696820259094238e-01 7.9266652464866638e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5655 9.8358482122421265e-02</internalNodes>\n          <leafValues>\n            3.4634899348020554e-02 -1.9651760160923004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5656 2.2929610684514046e-02</internalNodes>\n          <leafValues>\n            -4.4682640582323074e-02 6.0062419623136520e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5657 -3.9763651788234711e-02</internalNodes>\n          <leafValues>\n            -2.8310349583625793e-01 2.6087069883942604e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5658 1.1215689778327942e-01</internalNodes>\n          <leafValues>\n            -4.3225709348917007e-02 1.5505640208721161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5659 -1.4957940578460693e-01</internalNodes>\n          <leafValues>\n            4.1476088762283325e-01 -2.5112669914960861e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5660 1.4239370357245207e-03</internalNodes>\n          <leafValues>\n            -2.2813330590724945e-01 2.2414619103074074e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5661 -1.1346139945089817e-02</internalNodes>\n          <leafValues>\n            -2.6083931326866150e-01 2.6456480845808983e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5662 -9.0518407523632050e-02</internalNodes>\n          <leafValues>\n            6.0067182779312134e-01 -1.2559159658849239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5663 3.6097481846809387e-02</internalNodes>\n          <leafValues>\n            1.9451009109616280e-02 -4.0998241305351257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5664 -2.5657469406723976e-02</internalNodes>\n          <leafValues>\n            2.3453080654144287e-01 -3.2354518771171570e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5665 -9.2462729662656784e-03</internalNodes>\n          <leafValues>\n            1.4458569884300232e-01 -5.7280141860246658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5666 6.1006739735603333e-02</internalNodes>\n          <leafValues>\n            1.9963319599628448e-01 -3.5018790513277054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5667 -2.2736669052392244e-03</internalNodes>\n          <leafValues>\n            -2.7180460095405579e-01 3.5324309021234512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5668 -1.1173350363969803e-01</internalNodes>\n          <leafValues>\n            2.6010888814926147e-01 -8.4183625876903534e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5669 1.4601589739322662e-01</internalNodes>\n          <leafValues>\n            -4.3707858771085739e-02 1.9343809783458710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5670 -3.9008598774671555e-02</internalNodes>\n          <leafValues>\n            -2.4021549522876740e-01 1.9324809312820435e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5671 -3.2065149396657944e-02</internalNodes>\n          <leafValues>\n            -1.4616030454635620e-01 5.0410438328981400e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5672 -3.9755292236804962e-03</internalNodes>\n          <leafValues>\n            8.6786061525344849e-02 -7.5101003050804138e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5673 -2.2264609113335609e-02</internalNodes>\n          <leafValues>\n            -1.7820209264755249e-01 4.2221881449222565e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5674 -6.0096651315689087e-02</internalNodes>\n          <leafValues>\n            3.3062270283699036e-01 -1.3347219675779343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5675 -8.3170406520366669e-02</internalNodes>\n          <leafValues>\n            6.9863271713256836e-01 -1.1014309711754322e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5676 -7.7182397246360779e-02</internalNodes>\n          <leafValues>\n            -2.5630331039428711e-01 8.8049499318003654e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5677 6.8902172148227692e-02</internalNodes>\n          <leafValues>\n            1.0996440425515175e-02 -6.3520067930221558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5678 -5.0353281199932098e-02</internalNodes>\n          <leafValues>\n            2.2927890717983246e-01 -3.2763719558715820e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5679 2.4320879019796848e-03</internalNodes>\n          <leafValues>\n            -1.3213059306144714e-01 7.1088582277297974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5680 -1.4196460135281086e-02</internalNodes>\n          <leafValues>\n            7.1845069527626038e-02 -4.5263659209012985e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5681 -4.5774779282510281e-03</internalNodes>\n          <leafValues>\n            -2.5832280516624451e-01 2.9419040307402611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5682 -1.4008210273459554e-03</internalNodes>\n          <leafValues>\n            4.4636521488428116e-02 -1.2310150265693665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5683 3.5062711685895920e-02</internalNodes>\n          <leafValues>\n            -1.8722500652074814e-02 4.5533668994903564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5684 3.9364919066429138e-02</internalNodes>\n          <leafValues>\n            -3.8776830770075321e-03 4.8229390382766724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5685 2.9430290684103966e-02</internalNodes>\n          <leafValues>\n            -5.6632690131664276e-02 1.3604450225830078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5686 7.9320840537548065e-02</internalNodes>\n          <leafValues>\n            -4.0827351622283459e-03 9.9998551607131958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5687 4.2696330696344376e-02</internalNodes>\n          <leafValues>\n            2.3583339527249336e-02 -3.7798878550529480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5688 2.5937719270586967e-02</internalNodes>\n          <leafValues>\n            5.0283338874578476e-02 -6.7249342799186707e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5689 2.7053659781813622e-02</internalNodes>\n          <leafValues>\n            1.0406839847564697e-01 -1.0069710016250610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5690 3.0322301387786865e-01</internalNodes>\n          <leafValues>\n            -5.1615409553050995e-02 1.2398669868707657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5691 7.4373193085193634e-02</internalNodes>\n          <leafValues>\n            -2.9979649931192398e-02 2.5944980978965759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5692 4.6059768646955490e-02</internalNodes>\n          <leafValues>\n            6.1678960919380188e-03 -7.0887911319732666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5693 3.6883510649204254e-02</internalNodes>\n          <leafValues>\n            1.5985019505023956e-02 -4.4436019659042358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5694 1.3493379950523376e-01</internalNodes>\n          <leafValues>\n            8.8313389569520950e-03 -7.3426938056945801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5695 1.4799199998378754e-01</internalNodes>\n          <leafValues>\n            6.9719799794256687e-03 -8.2078450918197632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5696 3.9690379053354263e-02</internalNodes>\n          <leafValues>\n            -1.8247799947857857e-02 2.6955920457839966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5697 -5.3511280566453934e-02</internalNodes>\n          <leafValues>\n            2.0000250637531281e-01 -3.9136700332164764e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5698 6.3795700669288635e-02</internalNodes>\n          <leafValues>\n            1.1616130359470844e-02 -2.5315120816230774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5699 -8.1078916788101196e-02</internalNodes>\n          <leafValues>\n            -7.7582788467407227e-01 9.7084697335958481e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5700 -4.8272658139467239e-02</internalNodes>\n          <leafValues>\n            -3.0734309554100037e-01 1.1298010125756264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5701 4.3912570923566818e-02</internalNodes>\n          <leafValues>\n            -3.9403300732374191e-02 1.9216950237751007e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>394</maxWeakCount>\n      <stageThreshold>-1.2940989732742310e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 5702 1.9188739359378815e-02</internalNodes>\n          <leafValues>\n            -2.1150399744510651e-01 1.3286529481410980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5703 -8.1222038716077805e-03</internalNodes>\n          <leafValues>\n            9.2491082847118378e-02 -1.7585119605064392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5704 1.5851219650357962e-03</internalNodes>\n          <leafValues>\n            -2.8565698862075806e-01 6.6710568964481354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5705 -4.3140850029885769e-03</internalNodes>\n          <leafValues>\n            -1.3885229825973511e-01 5.2694689482450485e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5706 -1.7131429631263018e-03</internalNodes>\n          <leafValues>\n            1.3135610520839691e-01 -1.3149109482765198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5707 6.8447366356849670e-02</internalNodes>\n          <leafValues>\n            9.3052154406905174e-03 -2.5063261389732361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5708 -2.4445978924632072e-03</internalNodes>\n          <leafValues>\n            -1.7205530405044556e-01 9.8322823643684387e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5709 1.0310600046068430e-03</internalNodes>\n          <leafValues>\n            2.3039160296320915e-02 -2.7527621388435364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5710 7.4603251414373517e-04</internalNodes>\n          <leafValues>\n            -2.3276780545711517e-01 5.2693009376525879e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5711 -6.6399492789059877e-04</internalNodes>\n          <leafValues>\n            6.8990781903266907e-02 -8.4687709808349609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5712 -4.0997468749992549e-04</internalNodes>\n          <leafValues>\n            1.0501380264759064e-01 -1.0819009691476822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5713 -1.8094549886882305e-03</internalNodes>\n          <leafValues>\n            -1.8178839981555939e-01 4.4184140861034393e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5714 9.3385757645592093e-04</internalNodes>\n          <leafValues>\n            -1.4622689783573151e-01 7.2726443409919739e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5715 -3.8197741378098726e-04</internalNodes>\n          <leafValues>\n            2.4009939283132553e-02 -1.7295800149440765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5716 -1.4950280310586095e-03</internalNodes>\n          <leafValues>\n            -1.9403380155563354e-01 4.8807919025421143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5717 -1.0159100405871868e-02</internalNodes>\n          <leafValues>\n            1.9173899292945862e-01 -5.2749071270227432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5718 5.9903519286308438e-05</internalNodes>\n          <leafValues>\n            -1.0791549831628799e-01 9.0988166630268097e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5719 -3.1967550516128540e-02</internalNodes>\n          <leafValues>\n            4.1109889745712280e-01 -2.2650640457868576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5720 1.4343270100653172e-02</internalNodes>\n          <leafValues>\n            2.4315539747476578e-02 -4.2680150270462036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5721 1.1039529927074909e-02</internalNodes>\n          <leafValues>\n            -6.2717013061046600e-02 1.1330530047416687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5722 -8.4228850901126862e-03</internalNodes>\n          <leafValues>\n            -2.1369309723377228e-01 4.2059201747179031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5723 -2.0549839362502098e-02</internalNodes>\n          <leafValues>\n            1.5161630511283875e-01 -2.4594139307737350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5724 -6.5411031246185303e-03</internalNodes>\n          <leafValues>\n            1.4883629977703094e-01 -6.1179339885711670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5725 -1.3324400410056114e-02</internalNodes>\n          <leafValues>\n            -2.0791970193386078e-01 4.8333309590816498e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5726 7.0111267268657684e-02</internalNodes>\n          <leafValues>\n            -2.6863219216465950e-02 3.6322259902954102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5727 -2.6973750209435821e-04</internalNodes>\n          <leafValues>\n            6.0876660048961639e-02 -1.1272370070219040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5728 -1.3509000418707728e-03</internalNodes>\n          <leafValues>\n            -1.8552079796791077e-01 5.2154958248138428e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5729 -2.8083190321922302e-02</internalNodes>\n          <leafValues>\n            3.5111880302429199e-01 -2.3596329614520073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5730 -1.0003290139138699e-02</internalNodes>\n          <leafValues>\n            -2.9058480262756348e-01 3.2125689089298248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5731 -1.6111029544845223e-03</internalNodes>\n          <leafValues>\n            9.8113670945167542e-02 -5.2203711122274399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5732 -1.8411900848150253e-02</internalNodes>\n          <leafValues>\n            -1.8082669377326965e-01 5.4536700248718262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5733 -7.1738816797733307e-02</internalNodes>\n          <leafValues>\n            -7.6654988527297974e-01 3.3518690615892410e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5734 -2.7943260502070189e-03</internalNodes>\n          <leafValues>\n            1.5871369838714600e-01 -6.4271800220012665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5735 -1.6874749958515167e-01</internalNodes>\n          <leafValues>\n            -6.9956189393997192e-01 4.8861699178814888e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5736 -1.2672400334849954e-03</internalNodes>\n          <leafValues>\n            3.1616039574146271e-02 -2.4953269958496094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5737 2.0807750523090363e-02</internalNodes>\n          <leafValues>\n            1.7053410410881042e-02 -2.4331410229206085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5738 -1.5869849594309926e-03</internalNodes>\n          <leafValues>\n            9.3171089887619019e-02 -8.1361927092075348e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5739 -1.0014690458774567e-02</internalNodes>\n          <leafValues>\n            -2.7789619565010071e-01 2.6569239795207977e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5740 -5.7948171161115170e-03</internalNodes>\n          <leafValues>\n            -2.2287739813327789e-01 3.5975661128759384e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5741 2.7189950924366713e-03</internalNodes>\n          <leafValues>\n            -9.0631909668445587e-02 5.6820400059223175e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5742 3.8845159113407135e-02</internalNodes>\n          <leafValues>\n            1.2280859984457493e-02 -5.8521348237991333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5743 -1.4158680103719234e-02</internalNodes>\n          <leafValues>\n            1.8153870105743408e-01 -3.1109429895877838e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5744 -1.8278600275516510e-01</internalNodes>\n          <leafValues>\n            -9.0013808012008667e-01 7.6544750481843948e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5745 2.7588419616222382e-02</internalNodes>\n          <leafValues>\n            -1.2460039928555489e-02 2.0069369673728943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5746 -1.4784430153667927e-02</internalNodes>\n          <leafValues>\n            -8.9910492300987244e-02 8.1648677587509155e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5747 1.1625719815492630e-01</internalNodes>\n          <leafValues>\n            2.3692469112575054e-03 -9.9998068809509277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5748 3.5341090988367796e-03</internalNodes>\n          <leafValues>\n            -6.1760541051626205e-02 1.3490639626979828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5749 5.1878788508474827e-03</internalNodes>\n          <leafValues>\n            1.8745860084891319e-02 -1.7449170351028442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5750 7.9457357525825500e-02</internalNodes>\n          <leafValues>\n            -2.3402990773320198e-02 3.3502200245857239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5751 2.7684379369020462e-02</internalNodes>\n          <leafValues>\n            2.3663910105824471e-02 -3.3256360888481140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5752 -4.4806320220232010e-03</internalNodes>\n          <leafValues>\n            -1.4658750593662262e-01 4.7376811504364014e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5753 5.6939688511192799e-03</internalNodes>\n          <leafValues>\n            -5.6776121258735657e-02 6.7580856382846832e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5754 7.7299480326473713e-03</internalNodes>\n          <leafValues>\n            -3.1156649813055992e-02 2.3102590441703796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5755 3.9786100387573242e-03</internalNodes>\n          <leafValues>\n            -5.6882441043853760e-02 1.3271529972553253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5756 -1.1275880038738251e-02</internalNodes>\n          <leafValues>\n            -2.0938649773597717e-01 3.5291459411382675e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5757 -2.4308220017701387e-03</internalNodes>\n          <leafValues>\n            -2.0176360011100769e-01 3.4513931721448898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5758 5.7369591668248177e-03</internalNodes>\n          <leafValues>\n            -5.5607158690690994e-02 1.1532089859247208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5759 4.6170800924301147e-03</internalNodes>\n          <leafValues>\n            -5.6083500385284424e-02 8.1762917339801788e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5760 -4.7089671716094017e-03</internalNodes>\n          <leafValues>\n            -1.3351219892501831e-01 5.6296080350875854e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5761 -3.2688070088624954e-02</internalNodes>\n          <leafValues>\n            2.7922388911247253e-01 -1.0867659933865070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5762 8.8686197996139526e-02</internalNodes>\n          <leafValues>\n            1.8268220126628876e-02 -3.5637390613555908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5763 4.5751677826046944e-03</internalNodes>\n          <leafValues>\n            -5.1558461040258408e-02 6.3948810100555420e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5764 4.9765850417315960e-03</internalNodes>\n          <leafValues>\n            -5.4684590548276901e-02 1.1907110363245010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5765 -6.4881290309131145e-03</internalNodes>\n          <leafValues>\n            -9.9121123552322388e-02 2.6508849114179611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5766 2.4523450993001461e-03</internalNodes>\n          <leafValues>\n            -9.5045946538448334e-02 6.6802926361560822e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5767 7.0354789495468140e-03</internalNodes>\n          <leafValues>\n            1.0705590248107910e-01 -6.2395099550485611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5768 4.2746789753437042e-02</internalNodes>\n          <leafValues>\n            -1.6092179343104362e-02 4.3256199359893799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5769 -4.5301730278879404e-04</internalNodes>\n          <leafValues>\n            3.6420568823814392e-02 -9.9322892725467682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5770 -5.2631930448114872e-03</internalNodes>\n          <leafValues>\n            -1.1416749656200409e-01 5.7260219007730484e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5771 1.0581909446045756e-03</internalNodes>\n          <leafValues>\n            3.3220488578081131e-02 -1.1831220239400864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5772 2.5088949128985405e-02</internalNodes>\n          <leafValues>\n            -6.0655020177364349e-02 1.2601740658283234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5773 2.4252159893512726e-01</internalNodes>\n          <leafValues>\n            2.2060840856283903e-03 -1.0000120401382446e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5774 -1.4393079280853271e-01</internalNodes>\n          <leafValues>\n            3.7419798970222473e-01 -2.2252110764384270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5775 -6.0972762294113636e-03</internalNodes>\n          <leafValues>\n            -1.1038099974393845e-01 4.5996960252523422e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5776 6.1375470831990242e-03</internalNodes>\n          <leafValues>\n            3.8307808339595795e-02 -1.8086770176887512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5777 -3.6617079749703407e-03</internalNodes>\n          <leafValues>\n            3.8439918309450150e-02 -6.2540791928768158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5778 -1.5854850411415100e-01</internalNodes>\n          <leafValues>\n            3.4469398856163025e-01 -1.9837500527501106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5779 6.7219287157058716e-02</internalNodes>\n          <leafValues>\n            9.5165139064192772e-03 -5.0206458568572998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5780 2.2499680053442717e-03</internalNodes>\n          <leafValues>\n            -1.3063929975032806e-01 6.4832933247089386e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5781 8.4626786410808563e-02</internalNodes>\n          <leafValues>\n            5.9339799918234348e-03 -4.1516590118408203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5782 -9.5411221263930202e-04</internalNodes>\n          <leafValues>\n            -9.3790747225284576e-02 7.5486607849597931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5783 -7.6813949272036552e-03</internalNodes>\n          <leafValues>\n            -1.4821960031986237e-01 2.9010580852627754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5784 -2.5593319907784462e-02</internalNodes>\n          <leafValues>\n            1.4859579503536224e-01 -4.7195930033922195e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5785 2.1508369594812393e-02</internalNodes>\n          <leafValues>\n            2.3782620206475258e-02 -9.6659287810325623e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5786 3.4463100135326385e-02</internalNodes>\n          <leafValues>\n            -3.7410069257020950e-02 2.2015300393104553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5787 -3.7860300391912460e-02</internalNodes>\n          <leafValues>\n            -5.0047469139099121e-01 1.4059869572520256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5788 1.2028450146317482e-03</internalNodes>\n          <leafValues>\n            -6.5087057650089264e-02 8.9583486318588257e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5789 1.6753520816564560e-02</internalNodes>\n          <leafValues>\n            4.9179811030626297e-03 -4.3030908703804016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5790 1.6640779795125127e-03</internalNodes>\n          <leafValues>\n            4.0807429701089859e-02 -1.4469960331916809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5791 3.4473428968340158e-03</internalNodes>\n          <leafValues>\n            -3.9910178631544113e-02 1.5272960066795349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5792 8.9918142184615135e-03</internalNodes>\n          <leafValues>\n            7.1071267127990723e-02 -8.6169913411140442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5793 8.3185202674940228e-04</internalNodes>\n          <leafValues>\n            -2.5739189982414246e-01 1.7941089347004890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5794 -6.8142730742692947e-03</internalNodes>\n          <leafValues>\n            1.3823160529136658e-01 -5.3994540125131607e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5795 2.9746210202574730e-03</internalNodes>\n          <leafValues>\n            -4.1550260037183762e-02 3.9839770644903183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5796 2.5836620479822159e-03</internalNodes>\n          <leafValues>\n            -7.0656493306159973e-02 9.5045506954193115e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5797 2.7143809711560607e-04</internalNodes>\n          <leafValues>\n            5.8070071041584015e-02 -1.2781760096549988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5798 3.5418298840522766e-01</internalNodes>\n          <leafValues>\n            5.4909070022404194e-03 -9.7960698604583740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5799 2.5318650528788567e-02</internalNodes>\n          <leafValues>\n            -1.4410969801247120e-02 2.6219129562377930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5800 -2.2658439411316067e-04</internalNodes>\n          <leafValues>\n            5.2997849881649017e-02 -1.1629349738359451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5801 6.8859090097248554e-03</internalNodes>\n          <leafValues>\n            1.6437310725450516e-02 -2.0349490642547607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5802 1.1607459746301174e-02</internalNodes>\n          <leafValues>\n            -3.6651011556386948e-02 1.5184010565280914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5803 -4.8253959976136684e-03</internalNodes>\n          <leafValues>\n            -2.3476150631904602e-01 3.7914011627435684e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5804 2.5656020734459162e-03</internalNodes>\n          <leafValues>\n            3.5185638815164566e-02 -1.8540710210800171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5805 1.2601399421691895e-01</internalNodes>\n          <leafValues>\n            -9.8542850464582443e-03 2.5520691275596619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5806 2.7164958883076906e-03</internalNodes>\n          <leafValues>\n            -2.1748440340161324e-02 2.5467529892921448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5807 3.2356029748916626e-01</internalNodes>\n          <leafValues>\n            8.8657345622777939e-03 -7.0383572578430176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5808 -8.4016058826819062e-04</internalNodes>\n          <leafValues>\n            3.6831360310316086e-02 -1.4953260123729706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5809 3.3291990403085947e-03</internalNodes>\n          <leafValues>\n            4.8185840249061584e-02 -1.2290470302104950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5810 2.1130539476871490e-01</internalNodes>\n          <leafValues>\n            6.5245870500802994e-03 -8.8293862342834473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5811 5.0388509407639503e-03</internalNodes>\n          <leafValues>\n            -6.7079946398735046e-02 3.7849709391593933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5812 -2.7862399816513062e-02</internalNodes>\n          <leafValues>\n            3.3469489216804504e-01 -1.8816500902175903e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5813 3.8636629469692707e-03</internalNodes>\n          <leafValues>\n            4.3644730001688004e-02 -1.7481489479541779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5814 1.0480300337076187e-01</internalNodes>\n          <leafValues>\n            -1.5737529844045639e-02 4.2094239592552185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5815 -3.4130848944187164e-03</internalNodes>\n          <leafValues>\n            -1.0835570096969604e-01 4.3717790395021439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5816 -4.6396970748901367e-02</internalNodes>\n          <leafValues>\n            -7.5680077075958252e-01 8.6701400578022003e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5817 5.3708078339695930e-03</internalNodes>\n          <leafValues>\n            -4.1797801852226257e-02 1.4824719727039337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5818 -6.1126388609409332e-03</internalNodes>\n          <leafValues>\n            1.8673719465732574e-01 -4.3387491255998611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5819 4.2509321123361588e-02</internalNodes>\n          <leafValues>\n            1.1690679937601089e-02 -4.3740659952163696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5820 1.0473020374774933e-02</internalNodes>\n          <leafValues>\n            4.3143630027770996e-02 -1.5654399991035461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5821 -4.7223959118127823e-02</internalNodes>\n          <leafValues>\n            -7.4483537673950195e-01 3.4918629098683596e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5822 5.3090360015630722e-02</internalNodes>\n          <leafValues>\n            1.0408150032162666e-02 -5.3499448299407959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5823 -7.0432561915367842e-04</internalNodes>\n          <leafValues>\n            3.3384170383214951e-02 -7.3706030845642090e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5824 7.5942431576550007e-03</internalNodes>\n          <leafValues>\n            -2.9107049107551575e-02 1.9468860328197479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5825 2.2676989436149597e-02</internalNodes>\n          <leafValues>\n            3.3803820610046387e-02 -2.7627611160278320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5826 6.6533521749079227e-03</internalNodes>\n          <leafValues>\n            -2.6578240096569061e-02 2.4283319711685181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5827 3.7712270859628916e-03</internalNodes>\n          <leafValues>\n            2.6554299518465996e-02 -6.4952917397022247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5828 -2.0740530453622341e-03</internalNodes>\n          <leafValues>\n            -1.7968970537185669e-01 3.1532160937786102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5829 -1.5632519498467445e-03</internalNodes>\n          <leafValues>\n            5.3109679371118546e-02 -8.7415628135204315e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5830 1.2540889903903008e-02</internalNodes>\n          <leafValues>\n            -3.4136459231376648e-02 2.2097539901733398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5831 -3.2660199794918299e-03</internalNodes>\n          <leafValues>\n            -5.5261608213186264e-02 3.2669559121131897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5832 -8.2185603678226471e-03</internalNodes>\n          <leafValues>\n            -1.4478379487991333e-01 5.5743928998708725e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5833 -5.5811040103435516e-02</internalNodes>\n          <leafValues>\n            1.7237940430641174e-01 -1.4456519857048988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5834 -1.4723159372806549e-01</internalNodes>\n          <leafValues>\n            -8.1392312049865723e-01 7.4356291443109512e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5835 -5.8468529023230076e-03</internalNodes>\n          <leafValues>\n            -6.9043442606925964e-02 1.9456790760159492e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5836 1.9462220370769501e-02</internalNodes>\n          <leafValues>\n            -3.5472229123115540e-02 1.6666300594806671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5837 5.8353468775749207e-02</internalNodes>\n          <leafValues>\n            3.0551329255104065e-03 -3.9289128780364990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5838 4.3785829097032547e-02</internalNodes>\n          <leafValues>\n            1.3574630022048950e-02 -4.6152359247207642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5839 -5.1904350519180298e-02</internalNodes>\n          <leafValues>\n            6.3802438974380493e-01 -9.6664745360612869e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5840 -7.7811058145016432e-04</internalNodes>\n          <leafValues>\n            -9.9303223192691803e-02 5.6094601750373840e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5841 4.9657518975436687e-03</internalNodes>\n          <leafValues>\n            4.1419368237257004e-02 -1.1274819821119308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5842 -5.4516079835593700e-03</internalNodes>\n          <leafValues>\n            1.7399060726165771e-01 -4.1147731244564056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5843 5.0428751856088638e-03</internalNodes>\n          <leafValues>\n            -4.1255220770835876e-02 1.3794229924678802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5844 -1.6985220136120915e-03</internalNodes>\n          <leafValues>\n            -2.2874790430068970e-01 2.5274980813264847e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5845 8.2764238119125366e-02</internalNodes>\n          <leafValues>\n            3.3066510222852230e-03 -6.9113439321517944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5846 3.9285849779844284e-03</internalNodes>\n          <leafValues>\n            -7.9043358564376831e-02 6.6218852996826172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5847 -3.0601240694522858e-02</internalNodes>\n          <leafValues>\n            -2.6517450809478760e-01 1.6467850655317307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5848 -1.9941160455346107e-02</internalNodes>\n          <leafValues>\n            1.5431809425354004e-01 -3.6100689321756363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5849 8.0520063638687134e-02</internalNodes>\n          <leafValues>\n            1.7015919089317322e-02 -3.3448880910873413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5850 7.0323847234249115e-02</internalNodes>\n          <leafValues>\n            1.7122440040111542e-02 -3.3302140235900879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5851 -5.2850939333438873e-02</internalNodes>\n          <leafValues>\n            6.2421400099992752e-02 -1.4690199866890907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5852 -7.1594159817323089e-04</internalNodes>\n          <leafValues>\n            -1.1335150152444839e-01 5.2260790020227432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5853 2.1469970047473907e-01</internalNodes>\n          <leafValues>\n            9.9299731664359570e-04 -9.9997580051422119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5854 8.7042592465877533e-02</internalNodes>\n          <leafValues>\n            -1.2329760007560253e-02 5.0260668992996216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5855 -5.8731262106448412e-04</internalNodes>\n          <leafValues>\n            -9.9346466362476349e-02 5.1705610007047653e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5856 -4.4215220957994461e-02</internalNodes>\n          <leafValues>\n            -3.9368900656700134e-01 1.3920850120484829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5857 -8.7676227092742920e-02</internalNodes>\n          <leafValues>\n            3.0157440900802612e-01 -6.8702381104230881e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5858 -4.8453990370035172e-02</internalNodes>\n          <leafValues>\n            2.5477871298789978e-01 -2.2457750514149666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5859 -2.1567570511251688e-03</internalNodes>\n          <leafValues>\n            -1.3562899827957153e-01 3.1725399196147919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5860 3.9050900377333164e-03</internalNodes>\n          <leafValues>\n            4.9100890755653381e-02 -1.1861059814691544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5861 -3.9808028377592564e-03</internalNodes>\n          <leafValues>\n            4.8333909362554550e-02 -5.5897079408168793e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5862 2.9744929634034634e-03</internalNodes>\n          <leafValues>\n            -6.4802452921867371e-02 9.3583501875400543e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5863 2.5875229388475418e-02</internalNodes>\n          <leafValues>\n            1.8487609922885895e-02 -3.3436349034309387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5864 -1.9373580580577254e-03</internalNodes>\n          <leafValues>\n            2.2000649571418762e-01 -2.5404980406165123e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5865 -2.0171629264950752e-02</internalNodes>\n          <leafValues>\n            -7.8228309750556946e-02 4.5462790876626968e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5866 -2.6088140904903412e-02</internalNodes>\n          <leafValues>\n            1.7637069523334503e-01 -4.5097298920154572e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5867 -2.6868300512433052e-02</internalNodes>\n          <leafValues>\n            -3.2656419277191162e-01 1.7994230613112450e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5868 -7.0211151614785194e-04</internalNodes>\n          <leafValues>\n            3.9671998471021652e-02 -1.4533540606498718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5869 8.3507681265473366e-03</internalNodes>\n          <leafValues>\n            -2.3051729425787926e-02 1.8850760161876678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5870 4.6823569573462009e-03</internalNodes>\n          <leafValues>\n            2.9996560886502266e-02 -2.0701029896736145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5871 3.3109660726040602e-03</internalNodes>\n          <leafValues>\n            5.6536730378866196e-02 -1.6835589706897736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5872 7.6425541192293167e-03</internalNodes>\n          <leafValues>\n            -4.1423950344324112e-02 1.2557519972324371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5873 -2.4713110178709030e-03</internalNodes>\n          <leafValues>\n            7.2156153619289398e-02 -1.0767730325460434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5874 -9.9495360627770424e-03</internalNodes>\n          <leafValues>\n            -1.8187619745731354e-01 3.3567231148481369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5875 1.9820800516754389e-03</internalNodes>\n          <leafValues>\n            -5.6488718837499619e-02 1.0741490125656128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5876 2.3254439234733582e-02</internalNodes>\n          <leafValues>\n            -1.6543349251151085e-02 3.6466678977012634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5877 -5.4177921265363693e-02</internalNodes>\n          <leafValues>\n            -1. 3.3418419770896435e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5878 6.1567849479615688e-04</internalNodes>\n          <leafValues>\n            4.0159329771995544e-02 -1.6460220515727997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5879 -4.2699510231614113e-03</internalNodes>\n          <leafValues>\n            -5.6978620588779449e-02 4.4480901211500168e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5880 1.9749389030039310e-03</internalNodes>\n          <leafValues>\n            5.9283681213855743e-02 -1.0791260004043579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5881 -5.8583128266036510e-03</internalNodes>\n          <leafValues>\n            1.3734050095081329e-01 -3.4231521189212799e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5882 -7.2995189111679792e-04</internalNodes>\n          <leafValues>\n            -1.0075060278177261e-01 5.4733160883188248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5883 -2.9930740594863892e-02</internalNodes>\n          <leafValues>\n            6.3882559537887573e-02 -4.1027020663022995e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5884 -5.1738750189542770e-02</internalNodes>\n          <leafValues>\n            -7.2713458538055420e-01 7.4993381276726723e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5885 2.4021189659833908e-02</internalNodes>\n          <leafValues>\n            7.8491801396012306e-03 -5.5794471502304077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5886 -3.7574321031570435e-03</internalNodes>\n          <leafValues>\n            -1.6086879372596741e-01 3.1015990301966667e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5887 -6.2635682523250580e-02</internalNodes>\n          <leafValues>\n            9.0577863156795502e-02 -2.9033770784735680e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5888 1.9363429397344589e-02</internalNodes>\n          <leafValues>\n            -4.9920588731765747e-02 1.2835779786109924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5889 -3.5072889178991318e-02</internalNodes>\n          <leafValues>\n            2.1391840279102325e-01 -8.8168960064649582e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5890 -1.3243310153484344e-02</internalNodes>\n          <leafValues>\n            2.3349699378013611e-01 -2.3088019341230392e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5891 -3.1290829181671143e-02</internalNodes>\n          <leafValues>\n            -6.9495099782943726e-01 9.3020889908075333e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5892 7.2391419671475887e-03</internalNodes>\n          <leafValues>\n            2.8485849499702454e-02 -1.8310770392417908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5893 6.6785318776965141e-03</internalNodes>\n          <leafValues>\n            -4.9132950603961945e-02 5.4181691259145737e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5894 -3.6825571209192276e-02</internalNodes>\n          <leafValues>\n            3.3120208978652954e-01 -2.1359929814934731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5895 -4.5507341623306274e-02</internalNodes>\n          <leafValues>\n            -1.2893490493297577e-01 4.9545988440513611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5896 7.7639957889914513e-03</internalNodes>\n          <leafValues>\n            -3.6255620419979095e-02 1.5321409702301025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5897 6.0417611151933670e-02</internalNodes>\n          <leafValues>\n            4.5740022324025631e-03 -6.7541092634201050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5898 2.4624960497021675e-03</internalNodes>\n          <leafValues>\n            5.3674161434173584e-02 -1.1326540261507034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5899 7.3594506829977036e-05</internalNodes>\n          <leafValues>\n            -3.5648930817842484e-02 2.5458969175815582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5900 -4.0958370082080364e-03</internalNodes>\n          <leafValues>\n            1.5562909841537476e-01 -3.9390601217746735e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5901 2.8689370083156973e-05</internalNodes>\n          <leafValues>\n            -8.4823302924633026e-02 3.8254238665103912e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5902 -4.6220528893172741e-03</internalNodes>\n          <leafValues>\n            -1.8994529545307159e-01 3.3508758991956711e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5903 -8.5343196988105774e-03</internalNodes>\n          <leafValues>\n            1.1212539672851562e-01 -3.3968489617109299e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5904 -5.8803848922252655e-02</internalNodes>\n          <leafValues>\n            -5.1244312524795532e-01 1.0789549909532070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5905 6.0719929635524750e-02</internalNodes>\n          <leafValues>\n            -1.2555030174553394e-02 2.2509759664535522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5906 1.1038020020350814e-03</internalNodes>\n          <leafValues>\n            -9.6294492483139038e-02 5.6727480143308640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5907 -3.8484560791403055e-03</internalNodes>\n          <leafValues>\n            4.0573459118604660e-02 -2.5326859205961227e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5908 -1.0771050117909908e-02</internalNodes>\n          <leafValues>\n            8.8735632598400116e-02 -5.5628679692745209e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5909 1.2016809545457363e-02</internalNodes>\n          <leafValues>\n            2.3566279560327530e-02 -2.4590580165386200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5910 -1.1656560236588120e-03</internalNodes>\n          <leafValues>\n            -3.7417300045490265e-02 1.6503289341926575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5911 3.2137628644704819e-02</internalNodes>\n          <leafValues>\n            1.4245970174670219e-02 -2.6480850577354431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5912 2.3331670090556145e-02</internalNodes>\n          <leafValues>\n            -3.5288721323013306e-02 1.8447829782962799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5913 -1.2685320340096951e-02</internalNodes>\n          <leafValues>\n            -1.1757309734821320e-01 1.6436910256743431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5914 7.3903938755393028e-05</internalNodes>\n          <leafValues>\n            -1.0271479934453964e-01 7.4301436543464661e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5915 -1.0925470292568207e-01</internalNodes>\n          <leafValues>\n            -8.3165317773818970e-01 5.6438110768795013e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5916 -1.3324350118637085e-01</internalNodes>\n          <leafValues>\n            7.7729821205139160e-01 -8.3403270691633224e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5917 8.9381448924541473e-04</internalNodes>\n          <leafValues>\n            -5.9524301439523697e-02 4.1173089295625687e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5918 1.0318649932742119e-02</internalNodes>\n          <leafValues>\n            1.5926430001854897e-02 -3.1637790799140930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5919 -5.2297548390924931e-03</internalNodes>\n          <leafValues>\n            -7.1166560053825378e-02 3.3489290624856949e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5920 1.6409620642662048e-02</internalNodes>\n          <leafValues>\n            -2.6454120874404907e-02 1.9589969515800476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5921 1.4068709686398506e-02</internalNodes>\n          <leafValues>\n            -3.9364140480756760e-02 1.3977420330047607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5922 6.6486410796642303e-03</internalNodes>\n          <leafValues>\n            6.4070828258991241e-02 -1.0493399947881699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5923 -1.8030619248747826e-02</internalNodes>\n          <leafValues>\n            8.3942912518978119e-02 -1.3399159535765648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5924 -4.4034369289875031e-02</internalNodes>\n          <leafValues>\n            -5.5825459957122803e-01 9.7633162513375282e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5925 -8.0966893583536148e-03</internalNodes>\n          <leafValues>\n            -2.0489789545536041e-01 2.6520200073719025e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5926 5.0180461257696152e-03</internalNodes>\n          <leafValues>\n            -1.1661209911108017e-01 4.5791670680046082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5927 -1.7064629122614861e-02</internalNodes>\n          <leafValues>\n            2.6282730698585510e-01 -2.0390639081597328e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5928 7.1850173175334930e-02</internalNodes>\n          <leafValues>\n            -6.9503681734204292e-03 6.7032539844512939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5929 -5.6914370507001877e-02</internalNodes>\n          <leafValues>\n            -1.3477900624275208e-01 1.8399080261588097e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5930 -3.2365729566663504e-03</internalNodes>\n          <leafValues>\n            6.9673851132392883e-02 -7.2314530611038208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5931 4.1818909347057343e-02</internalNodes>\n          <leafValues>\n            1.1151459999382496e-02 -5.1680111885070801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5932 -6.1106588691473007e-03</internalNodes>\n          <leafValues>\n            -1.3163940608501434e-01 4.3796509504318237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5933 -3.5560909658670425e-02</internalNodes>\n          <leafValues>\n            6.8005502223968506e-02 -3.6331020295619965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5934 6.8789169192314148e-02</internalNodes>\n          <leafValues>\n            1.4698959887027740e-02 -3.8212299346923828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5935 -7.8313373029232025e-02</internalNodes>\n          <leafValues>\n            2.0296069979667664e-01 -8.6810020729899406e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5936 3.9626220241189003e-03</internalNodes>\n          <leafValues>\n            -3.5797890275716782e-02 1.3905510306358337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5937 -3.3874038606882095e-02</internalNodes>\n          <leafValues>\n            -2.2253429889678955e-01 7.5455638580024242e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5938 -6.4755856990814209e-02</internalNodes>\n          <leafValues>\n            4.7521549463272095e-01 -1.0970680043101311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5939 2.6647940278053284e-02</internalNodes>\n          <leafValues>\n            1.5445309691131115e-02 -2.6785778999328613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5940 -3.0731109902262688e-02</internalNodes>\n          <leafValues>\n            -4.7668689489364624e-01 9.6429884433746338e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5941 -2.4022700265049934e-02</internalNodes>\n          <leafValues>\n            -1.0633960366249084e-01 1.2849040329456329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5942 -1.3036349555477500e-03</internalNodes>\n          <leafValues>\n            7.3524177074432373e-02 -6.8074919283390045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5943 -9.8344050347805023e-03</internalNodes>\n          <leafValues>\n            -1.1843550205230713e-01 4.2866699397563934e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5944 8.7102197110652924e-02</internalNodes>\n          <leafValues>\n            -4.0088258683681488e-02 1.7804540693759918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5945 2.0411569625139236e-02</internalNodes>\n          <leafValues>\n            1.6849989071488380e-02 -3.8953658938407898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5946 9.5875263214111328e-02</internalNodes>\n          <leafValues>\n            5.9905550442636013e-03 -8.1525659561157227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5947 6.4893220551311970e-03</internalNodes>\n          <leafValues>\n            -2.4039229378104210e-02 5.3871169686317444e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5948 -9.6279237186536193e-04</internalNodes>\n          <leafValues>\n            9.4299189746379852e-02 -6.4436018466949463e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5949 -3.7659960798919201e-04</internalNodes>\n          <leafValues>\n            -6.2296878546476364e-02 4.1251849383115768e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5950 6.5272641368210316e-03</internalNodes>\n          <leafValues>\n            5.1325131207704544e-02 -1.3037790358066559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5951 2.1429110318422318e-02</internalNodes>\n          <leafValues>\n            -1.1989659629762173e-02 2.6280459761619568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5952 -5.0938720814883709e-03</internalNodes>\n          <leafValues>\n            6.3418947160243988e-02 -9.0566337108612061e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5953 -2.5309680495411158e-03</internalNodes>\n          <leafValues>\n            6.0297761112451553e-02 -2.5049470365047455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5954 -1.5915350522845984e-03</internalNodes>\n          <leafValues>\n            -1.2171190232038498e-01 3.7737991660833359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5955 -3.4030709415674210e-02</internalNodes>\n          <leafValues>\n            4.6413430571556091e-01 -3.5409750416874886e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5956 5.1074200309813023e-03</internalNodes>\n          <leafValues>\n            3.9823830127716064e-02 -1.2645539641380310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5957 -9.6449116244912148e-03</internalNodes>\n          <leafValues>\n            3.3464258909225464e-01 -6.6040740348398685e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5958 1.1422860436141491e-02</internalNodes>\n          <leafValues>\n            -3.6080420017242432e-02 1.3714550435543060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5959 -5.1042139530181885e-03</internalNodes>\n          <leafValues>\n            -9.3986809253692627e-02 2.8844779357314110e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5960 -2.6332271099090576e-01</internalNodes>\n          <leafValues>\n            4.9980929493904114e-01 -1.0173249989748001e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5961 -2.4556639790534973e-01</internalNodes>\n          <leafValues>\n            -8.1778347492218018e-01 6.9596339017152786e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5962 -2.1419329941272736e-01</internalNodes>\n          <leafValues>\n            -5.1040518283843994e-01 9.4540230929851532e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5963 -1.4363219961524010e-02</internalNodes>\n          <leafValues>\n            -9.1000981628894806e-02 2.4646669626235962e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5964 -1.2388969771564007e-03</internalNodes>\n          <leafValues>\n            1.1544570326805115e-01 -4.9565620720386505e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5965 2.1015120670199394e-02</internalNodes>\n          <leafValues>\n            -1.7765879631042480e-02 1.9577859342098236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5966 -4.1783051565289497e-03</internalNodes>\n          <leafValues>\n            -1.1172860115766525e-01 4.4625449925661087e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5967 2.0896939095109701e-03</internalNodes>\n          <leafValues>\n            -3.3988729119300842e-02 6.5539501607418060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5968 1.6410060226917267e-02</internalNodes>\n          <leafValues>\n            -2.0373269915580750e-02 2.5331538915634155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5969 -6.4266882836818695e-02</internalNodes>\n          <leafValues>\n            -6.5880149602890015e-01 3.4550630953162909e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5970 6.8898178869858384e-04</internalNodes>\n          <leafValues>\n            6.7643247544765472e-02 -8.7556242942810059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5971 5.6662331335246563e-03</internalNodes>\n          <leafValues>\n            3.0638309195637703e-02 -1.1895540356636047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5972 -4.3778121471405029e-02</internalNodes>\n          <leafValues>\n            -2.8309130668640137e-01 1.7713630571961403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5973 3.4748481120914221e-03</internalNodes>\n          <leafValues>\n            -9.5787122845649719e-02 4.2630400508642197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5974 -1.1673940345644951e-02</internalNodes>\n          <leafValues>\n            -1.0502570122480392e-01 5.0903890281915665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5975 -3.4004659391939640e-03</internalNodes>\n          <leafValues>\n            1.0470719635486603e-01 -4.0939141064882278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5976 2.7091780211776495e-03</internalNodes>\n          <leafValues>\n            -6.0524601489305496e-02 1.3978950679302216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5977 -1.7439300194382668e-02</internalNodes>\n          <leafValues>\n            -3.2391169667243958e-01 1.4630249701440334e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5978 -1.2598330155014992e-02</internalNodes>\n          <leafValues>\n            -2.0682629942893982e-01 2.5501869618892670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5979 1.8755869939923286e-02</internalNodes>\n          <leafValues>\n            -4.7925960272550583e-02 1.0864380002021790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5980 -4.2074159719049931e-03</internalNodes>\n          <leafValues>\n            -8.2077808678150177e-02 6.3647769391536713e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5981 -1.6427719674538821e-04</internalNodes>\n          <leafValues>\n            1.0120390355587006e-01 -3.4067928791046143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5982 4.3847691267728806e-02</internalNodes>\n          <leafValues>\n            6.0980222187936306e-03 -8.3685982227325439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5983 -3.9284680038690567e-02</internalNodes>\n          <leafValues>\n            2.8250560164451599e-01 -2.2389259189367294e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5984 3.8550909608602524e-02</internalNodes>\n          <leafValues>\n            1.5570489689707756e-02 -3.3978620171546936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5985 -6.9177031517028809e-02</internalNodes>\n          <leafValues>\n            1.2258320301771164e-01 -1.7850179225206375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5986 -1.9251030171290040e-03</internalNodes>\n          <leafValues>\n            -1.0687749832868576e-01 4.6379510313272476e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5987 -8.6635202169418335e-03</internalNodes>\n          <leafValues>\n            9.6412748098373413e-02 -1.7563249915838242e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5988 1.3393509387969971e-01</internalNodes>\n          <leafValues>\n            6.3692941330373287e-03 -7.0170587301254272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5989 4.1082348674535751e-02</internalNodes>\n          <leafValues>\n            -1.1077569797635078e-02 1.3463750481605530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5990 1.4911450445652008e-01</internalNodes>\n          <leafValues>\n            9.5263421535491943e-03 -5.0872552394866943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5991 -5.2500818856060505e-03</internalNodes>\n          <leafValues>\n            7.0025578141212463e-02 -4.2880270630121231e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5992 2.2823570296168327e-02</internalNodes>\n          <leafValues>\n            -4.1884049773216248e-02 1.1770319938659668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5993 -8.5306530818343163e-03</internalNodes>\n          <leafValues>\n            6.1222139745950699e-02 -2.4944549426436424e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5994 1.1971729807555676e-02</internalNodes>\n          <leafValues>\n            3.9662770926952362e-02 -1.6267740726470947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5995 -3.8938269019126892e-02</internalNodes>\n          <leafValues>\n            2.5743520259857178e-01 -1.6356239095330238e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5996 -2.1706389263272285e-02</internalNodes>\n          <leafValues>\n            -3.1998679041862488e-01 1.7135290428996086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5997 6.6900630481541157e-03</internalNodes>\n          <leafValues>\n            2.6101849973201752e-02 -1.0980729758739471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5998 -7.2270832955837250e-02</internalNodes>\n          <leafValues>\n            1.9431130588054657e-01 -2.6044359430670738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5999 -6.7073688842356205e-03</internalNodes>\n          <leafValues>\n            -1.7747850716114044e-01 4.5862998813390732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6000 5.5019360035657883e-02</internalNodes>\n          <leafValues>\n            -8.3471573889255524e-03 6.0511541366577148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6001 1.3142649829387665e-01</internalNodes>\n          <leafValues>\n            -5.7535418309271336e-03 2.9167538881301880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6002 -1.6564460238441825e-03</internalNodes>\n          <leafValues>\n            7.0003032684326172e-02 -6.2690876424312592e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6003 1.5445409715175629e-01</internalNodes>\n          <leafValues>\n            6.1896732077002525e-03 -7.4323302507400513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6004 -5.0357519648969173e-03</internalNodes>\n          <leafValues>\n            -1.1333289742469788e-01 3.8741771131753922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6005 2.2772569209337234e-03</internalNodes>\n          <leafValues>\n            -1.1340530216693878e-01 2.1319400519132614e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6006 3.3173530828207731e-03</internalNodes>\n          <leafValues>\n            4.4273331761360168e-02 -1.0459829866886139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6007 -2.9692800715565681e-02</internalNodes>\n          <leafValues>\n            9.2483766376972198e-02 -2.3342609405517578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6008 6.2937840819358826e-02</internalNodes>\n          <leafValues>\n            -1.2998280115425587e-02 3.8887938857078552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6009 3.6641359329223633e-03</internalNodes>\n          <leafValues>\n            3.2099820673465729e-02 -3.9647988975048065e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6010 4.4782999902963638e-03</internalNodes>\n          <leafValues>\n            -4.5701328665018082e-02 1.0697010159492493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6011 1.8147319788113236e-03</internalNodes>\n          <leafValues>\n            -3.2871820032596588e-02 1.0647939890623093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6012 4.8941639252007008e-03</internalNodes>\n          <leafValues>\n            2.7911009266972542e-02 -2.1725590527057648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6013 -4.4425828382372856e-03</internalNodes>\n          <leafValues>\n            -1.3470150530338287e-01 1.0781410150229931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6014 -2.5493400171399117e-02</internalNodes>\n          <leafValues>\n            6.8371468782424927e-01 -7.7452720142900944e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6015 2.7835449203848839e-02</internalNodes>\n          <leafValues>\n            2.4144299328327179e-02 -1.5170599520206451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6016 7.5548859313130379e-03</internalNodes>\n          <leafValues>\n            -4.7643400728702545e-02 1.1925770342350006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6017 1.0329609736800194e-02</internalNodes>\n          <leafValues>\n            1.8646810203790665e-02 -1.6122570633888245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6018 -1.2393389828503132e-02</internalNodes>\n          <leafValues>\n            6.0304921865463257e-01 -7.7566630207002163e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6019 1.3833769597113132e-02</internalNodes>\n          <leafValues>\n            -2.7617299929261208e-02 5.1266878843307495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6020 -2.5669319555163383e-02</internalNodes>\n          <leafValues>\n            2.3801359534263611e-01 -2.3971909657120705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6021 -5.2043660543859005e-03</internalNodes>\n          <leafValues>\n            -1.0721790045499802e-01 2.6645049452781677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6022 3.4628969151526690e-03</internalNodes>\n          <leafValues>\n            5.4313410073518753e-02 -1.3458320498466492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6023 -1.9220679998397827e-02</internalNodes>\n          <leafValues>\n            7.2996392846107483e-02 -4.0652111172676086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6024 -2.5009829550981522e-03</internalNodes>\n          <leafValues>\n            -7.7671296894550323e-02 5.9096541255712509e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6025 -8.5285156965255737e-03</internalNodes>\n          <leafValues>\n            4.9050811678171158e-02 -6.4078353345394135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6026 4.3327538296580315e-03</internalNodes>\n          <leafValues>\n            2.5221010670065880e-02 -1.9358980655670166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6027 3.6595970392227173e-02</internalNodes>\n          <leafValues>\n            -1.6262590885162354e-02 1.5651239454746246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6028 -1.1795730097219348e-03</internalNodes>\n          <leafValues>\n            -7.2468072175979614e-02 7.0449486374855042e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6029 -1.3975829817354679e-02</internalNodes>\n          <leafValues>\n            -1.1789470165967941e-01 2.1292049437761307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6030 -1.3828700175508857e-03</internalNodes>\n          <leafValues>\n            7.9283542931079865e-02 -9.5104120671749115e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6031 -2.9435830656439066e-03</internalNodes>\n          <leafValues>\n            7.0368431508541107e-02 -3.3217910677194595e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6032 9.5262555405497551e-03</internalNodes>\n          <leafValues>\n            -2.9733620584011078e-02 1.6670459508895874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6033 -9.0114273130893707e-02</internalNodes>\n          <leafValues>\n            -1.6625370085239410e-01 8.6199166253209114e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6034 -1.2089919764548540e-03</internalNodes>\n          <leafValues>\n            8.1083856523036957e-02 -7.3029123246669769e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6035 -1.4199960231781006e-01</internalNodes>\n          <leafValues>\n            -1. 2.2284830920398235e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6036 8.0690719187259674e-03</internalNodes>\n          <leafValues>\n            4.7412220388650894e-02 -1.0178930312395096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6037 -4.7410889528691769e-03</internalNodes>\n          <leafValues>\n            1.2051119655370712e-01 -4.9957480281591415e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6038 -1.6977200284600258e-03</internalNodes>\n          <leafValues>\n            -2.4171440303325653e-01 1.9534369930624962e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6039 -2.8892089612782001e-03</internalNodes>\n          <leafValues>\n            2.5727990269660950e-01 -1.1625059880316257e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6040 -1.5177440363913774e-03</internalNodes>\n          <leafValues>\n            -9.8784193396568298e-02 4.6706128865480423e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6041 1.4197319746017456e-01</internalNodes>\n          <leafValues>\n            -2.5096370372921228e-03 7.5450611114501953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6042 9.7517937421798706e-02</internalNodes>\n          <leafValues>\n            -6.9059049710631371e-03 6.5184432268142700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6043 1.3567379675805569e-02</internalNodes>\n          <leafValues>\n            -7.6325193047523499e-02 8.8054582476615906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6044 8.0981463193893433e-02</internalNodes>\n          <leafValues>\n            1.5558109618723392e-02 -3.4601628780364990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6045 -4.7192731872200966e-03</internalNodes>\n          <leafValues>\n            8.1620022654533386e-02 -4.6072289347648621e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6046 2.0368969999253750e-03</internalNodes>\n          <leafValues>\n            -4.4817630201578140e-02 1.2861390411853790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6047 -1.7878509825095534e-03</internalNodes>\n          <leafValues>\n            4.3731331825256348e-02 -4.4995948672294617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6048 -7.1685528382658958e-03</internalNodes>\n          <leafValues>\n            -1.3597999513149261e-01 3.8796991109848022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6049 -6.7460887134075165e-02</internalNodes>\n          <leafValues>\n            -2.9265740513801575e-01 3.5135280340909958e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6050 -1.5598500147461891e-02</internalNodes>\n          <leafValues>\n            2.3105660080909729e-01 -2.2405069321393967e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6051 -2.1026479080319405e-02</internalNodes>\n          <leafValues>\n            -1.5283830463886261e-01 3.1531449407339096e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6052 -1.0558360069990158e-01</internalNodes>\n          <leafValues>\n            -6.8366038799285889e-01 6.8997950293123722e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6053 -3.6966579500585794e-03</internalNodes>\n          <leafValues>\n            3.4315150231122971e-02 -4.8922799527645111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6054 -6.0826627304777503e-04</internalNodes>\n          <leafValues>\n            -5.2638430148363113e-02 8.9546948671340942e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6055 -2.8936540707945824e-02</internalNodes>\n          <leafValues>\n            4.1818480938673019e-02 -1.3818169943988323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6056 -5.8082528412342072e-03</internalNodes>\n          <leafValues>\n            6.7874796688556671e-02 -8.5578799247741699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6057 -4.6095378696918488e-02</internalNodes>\n          <leafValues>\n            -1.2584780156612396e-01 2.0466970279812813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6058 5.2972920238971710e-02</internalNodes>\n          <leafValues>\n            -1.2453259900212288e-02 3.4565049409866333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6059 4.9351599067449570e-02</internalNodes>\n          <leafValues>\n            1.0901239700615406e-02 -4.8506981134414673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6060 4.4377800077199936e-02</internalNodes>\n          <leafValues>\n            9.9294837564229965e-03 -4.3877899646759033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6061 -1.1464890092611313e-01</internalNodes>\n          <leafValues>\n            2.6874598860740662e-01 -9.2000560835003853e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6062 1.6887830197811127e-01</internalNodes>\n          <leafValues>\n            5.7101310230791569e-03 -8.5972881317138672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6063 5.1198098808526993e-02</internalNodes>\n          <leafValues>\n            -8.5723921656608582e-03 1.3395169377326965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6064 -3.0789880547672510e-03</internalNodes>\n          <leafValues>\n            -1.0338760167360306e-01 4.3459478765726089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6065 4.7223128378391266e-02</internalNodes>\n          <leafValues>\n            8.1934239715337753e-03 -4.3803408741950989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6066 -7.6270569115877151e-03</internalNodes>\n          <leafValues>\n            1.8713890016078949e-01 -2.4660250172019005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6067 5.4106907919049263e-03</internalNodes>\n          <leafValues>\n            4.1099831461906433e-02 -7.8868232667446136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6068 -1.4900229871273041e-03</internalNodes>\n          <leafValues>\n            -2.0115040242671967e-01 3.1898159533739090e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6069 -8.3831608295440674e-02</internalNodes>\n          <leafValues>\n            5.8017939329147339e-01 -5.2973427809774876e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6070 6.2233800999820232e-03</internalNodes>\n          <leafValues>\n            -3.9786059409379959e-02 1.2283950299024582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6071 1.1475080251693726e-01</internalNodes>\n          <leafValues>\n            -1.1975419707596302e-02 2.1586710214614868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6072 -1.5253260498866439e-03</internalNodes>\n          <leafValues>\n            1.3804529607295990e-01 -3.9941880851984024e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6073 -5.2878521382808685e-03</internalNodes>\n          <leafValues>\n            -1.2790650129318237e-01 3.2893560826778412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6074 8.9670647867023945e-04</internalNodes>\n          <leafValues>\n            -1.2481059879064560e-01 4.4544249773025513e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6075 3.8421660661697388e-02</internalNodes>\n          <leafValues>\n            7.7155791223049164e-03 -6.5575468540191650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6076 -9.3785318313166499e-04</internalNodes>\n          <leafValues>\n            5.5608510971069336e-02 -8.9876912534236908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6077 1.9965849351137877e-03</internalNodes>\n          <leafValues>\n            -2.5297610089182854e-02 1.9413180649280548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6078 4.5782068627886474e-04</internalNodes>\n          <leafValues>\n            3.9089199155569077e-02 -1.2908570468425751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6079 3.8373940624296665e-03</internalNodes>\n          <leafValues>\n            -2.8748869895935059e-02 1.9429750740528107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6080 3.7142829387448728e-04</internalNodes>\n          <leafValues>\n            3.8272358477115631e-02 -1.3759189844131470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6081 7.5116259977221489e-03</internalNodes>\n          <leafValues>\n            -1.4461129903793335e-02 1.2656949460506439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6082 -5.0362840294837952e-02</internalNodes>\n          <leafValues>\n            3.5183578729629517e-01 -1.4051860198378563e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6083 3.9921641349792480e-02</internalNodes>\n          <leafValues>\n            2.7280429378151894e-02 -1.9958199560642242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6084 2.2605259716510773e-01</internalNodes>\n          <leafValues>\n            -6.8001961335539818e-03 7.3006898164749146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6085 1.1081779748201370e-01</internalNodes>\n          <leafValues>\n            4.3370737694203854e-03 -8.6829161643981934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6086 -9.7494889050722122e-03</internalNodes>\n          <leafValues>\n            -6.3740663230419159e-02 8.4537997841835022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6087 -2.2887689992785454e-03</internalNodes>\n          <leafValues>\n            9.9654018878936768e-02 -4.1565418243408203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6088 2.0008319988846779e-03</internalNodes>\n          <leafValues>\n            -5.5650699883699417e-02 1.0709869861602783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6089 -1.5160050243139267e-02</internalNodes>\n          <leafValues>\n            -1.4098760485649109e-01 3.8741599768400192e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6090 -6.3132969662547112e-03</internalNodes>\n          <leafValues>\n            -1. 4.4605308212339878e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6091 -1.3970009982585907e-02</internalNodes>\n          <leafValues>\n            1.2481089681386948e-01 -2.1425830200314522e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6092 -4.4321279972791672e-02</internalNodes>\n          <leafValues>\n            -5.3340071439743042e-01 1.0165239684283733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6093 1.4885979471728206e-03</internalNodes>\n          <leafValues>\n            -4.8868600279092789e-02 3.6077901721000671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6094 6.5139681100845337e-02</internalNodes>\n          <leafValues>\n            7.6331058517098427e-03 -5.8781641721725464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6095 -2.0741410553455353e-02</internalNodes>\n          <leafValues>\n            -2.9658278822898865e-01 1.8622800707817078e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>394</maxWeakCount>\n      <stageThreshold>-1.2940989732742310e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 6096 1.9188739359378815e-02</internalNodes>\n          <leafValues>\n            -2.1150399744510651e-01 1.3286529481410980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6097 -8.1222038716077805e-03</internalNodes>\n          <leafValues>\n            9.2491082847118378e-02 -1.7585119605064392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6098 1.5851219650357962e-03</internalNodes>\n          <leafValues>\n            -2.8565698862075806e-01 6.6710568964481354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6099 -4.3140850029885769e-03</internalNodes>\n          <leafValues>\n            -1.3885229825973511e-01 5.2694689482450485e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6100 -1.7131429631263018e-03</internalNodes>\n          <leafValues>\n            1.3135610520839691e-01 -1.3149109482765198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6101 6.8447366356849670e-02</internalNodes>\n          <leafValues>\n            9.3052154406905174e-03 -2.5063261389732361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6102 -2.4445978924632072e-03</internalNodes>\n          <leafValues>\n            -1.7205530405044556e-01 9.8322823643684387e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6103 1.0310600046068430e-03</internalNodes>\n          <leafValues>\n            2.3039160296320915e-02 -2.7527621388435364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6104 7.4603251414373517e-04</internalNodes>\n          <leafValues>\n            -2.3276780545711517e-01 5.2693009376525879e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6105 -6.6399492789059877e-04</internalNodes>\n          <leafValues>\n            6.8990781903266907e-02 -8.4687709808349609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6106 -4.0997468749992549e-04</internalNodes>\n          <leafValues>\n            1.0501380264759064e-01 -1.0819009691476822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6107 -1.8094549886882305e-03</internalNodes>\n          <leafValues>\n            -1.8178839981555939e-01 4.4184140861034393e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6108 9.3385757645592093e-04</internalNodes>\n          <leafValues>\n            -1.4622689783573151e-01 7.2726443409919739e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6109 -3.8197741378098726e-04</internalNodes>\n          <leafValues>\n            2.4009939283132553e-02 -1.7295800149440765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6110 -1.4950280310586095e-03</internalNodes>\n          <leafValues>\n            -1.9403380155563354e-01 4.8807919025421143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6111 -1.0159100405871868e-02</internalNodes>\n          <leafValues>\n            1.9173899292945862e-01 -5.2749071270227432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6112 5.9903519286308438e-05</internalNodes>\n          <leafValues>\n            -1.0791549831628799e-01 9.0988166630268097e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6113 -3.1967550516128540e-02</internalNodes>\n          <leafValues>\n            4.1109889745712280e-01 -2.2650640457868576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6114 1.4343270100653172e-02</internalNodes>\n          <leafValues>\n            2.4315539747476578e-02 -4.2680150270462036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6115 1.1039529927074909e-02</internalNodes>\n          <leafValues>\n            -6.2717013061046600e-02 1.1330530047416687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6116 -8.4228850901126862e-03</internalNodes>\n          <leafValues>\n            -2.1369309723377228e-01 4.2059201747179031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6117 -2.0549839362502098e-02</internalNodes>\n          <leafValues>\n            1.5161630511283875e-01 -2.4594139307737350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6118 -6.5411031246185303e-03</internalNodes>\n          <leafValues>\n            1.4883629977703094e-01 -6.1179339885711670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6119 -1.3324400410056114e-02</internalNodes>\n          <leafValues>\n            -2.0791970193386078e-01 4.8333309590816498e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6120 7.0111267268657684e-02</internalNodes>\n          <leafValues>\n            -2.6863219216465950e-02 3.6322259902954102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6121 -2.6973750209435821e-04</internalNodes>\n          <leafValues>\n            6.0876660048961639e-02 -1.1272370070219040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6122 -1.3509000418707728e-03</internalNodes>\n          <leafValues>\n            -1.8552079796791077e-01 5.2154958248138428e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6123 -2.8083190321922302e-02</internalNodes>\n          <leafValues>\n            3.5111880302429199e-01 -2.3596329614520073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6124 -1.0003290139138699e-02</internalNodes>\n          <leafValues>\n            -2.9058480262756348e-01 3.2125689089298248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6125 -1.6111029544845223e-03</internalNodes>\n          <leafValues>\n            9.8113670945167542e-02 -5.2203711122274399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6126 -1.8411900848150253e-02</internalNodes>\n          <leafValues>\n            -1.8082669377326965e-01 5.4536700248718262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6127 -7.1738816797733307e-02</internalNodes>\n          <leafValues>\n            -7.6654988527297974e-01 3.3518690615892410e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6128 -2.7943260502070189e-03</internalNodes>\n          <leafValues>\n            1.5871369838714600e-01 -6.4271800220012665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6129 -1.6874749958515167e-01</internalNodes>\n          <leafValues>\n            -6.9956189393997192e-01 4.8861699178814888e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6130 -1.2672400334849954e-03</internalNodes>\n          <leafValues>\n            3.1616039574146271e-02 -2.4953269958496094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6131 2.0807750523090363e-02</internalNodes>\n          <leafValues>\n            1.7053410410881042e-02 -2.4331410229206085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6132 -1.5869849594309926e-03</internalNodes>\n          <leafValues>\n            9.3171089887619019e-02 -8.1361927092075348e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6133 -1.0014690458774567e-02</internalNodes>\n          <leafValues>\n            -2.7789619565010071e-01 2.6569239795207977e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6134 -5.7948171161115170e-03</internalNodes>\n          <leafValues>\n            -2.2287739813327789e-01 3.5975661128759384e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6135 2.7189950924366713e-03</internalNodes>\n          <leafValues>\n            -9.0631909668445587e-02 5.6820400059223175e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6136 3.8845159113407135e-02</internalNodes>\n          <leafValues>\n            1.2280859984457493e-02 -5.8521348237991333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6137 -1.4158680103719234e-02</internalNodes>\n          <leafValues>\n            1.8153870105743408e-01 -3.1109429895877838e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6138 -1.8278600275516510e-01</internalNodes>\n          <leafValues>\n            -9.0013808012008667e-01 7.6544750481843948e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6139 2.7588419616222382e-02</internalNodes>\n          <leafValues>\n            -1.2460039928555489e-02 2.0069369673728943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6140 -1.4784430153667927e-02</internalNodes>\n          <leafValues>\n            -8.9910492300987244e-02 8.1648677587509155e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6141 1.1625719815492630e-01</internalNodes>\n          <leafValues>\n            2.3692469112575054e-03 -9.9998068809509277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6142 3.5341090988367796e-03</internalNodes>\n          <leafValues>\n            -6.1760541051626205e-02 1.3490639626979828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6143 5.1878788508474827e-03</internalNodes>\n          <leafValues>\n            1.8745860084891319e-02 -1.7449170351028442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6144 7.9457357525825500e-02</internalNodes>\n          <leafValues>\n            -2.3402990773320198e-02 3.3502200245857239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6145 2.7684379369020462e-02</internalNodes>\n          <leafValues>\n            2.3663910105824471e-02 -3.3256360888481140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6146 -4.4806320220232010e-03</internalNodes>\n          <leafValues>\n            -1.4658750593662262e-01 4.7376811504364014e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6147 5.6939688511192799e-03</internalNodes>\n          <leafValues>\n            -5.6776121258735657e-02 6.7580856382846832e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6148 7.7299480326473713e-03</internalNodes>\n          <leafValues>\n            -3.1156649813055992e-02 2.3102590441703796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6149 3.9786100387573242e-03</internalNodes>\n          <leafValues>\n            -5.6882441043853760e-02 1.3271529972553253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6150 -1.1275880038738251e-02</internalNodes>\n          <leafValues>\n            -2.0938649773597717e-01 3.5291459411382675e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6151 -2.4308220017701387e-03</internalNodes>\n          <leafValues>\n            -2.0176360011100769e-01 3.4513931721448898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6152 5.7369591668248177e-03</internalNodes>\n          <leafValues>\n            -5.5607158690690994e-02 1.1532089859247208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6153 4.6170800924301147e-03</internalNodes>\n          <leafValues>\n            -5.6083500385284424e-02 8.1762917339801788e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6154 -4.7089671716094017e-03</internalNodes>\n          <leafValues>\n            -1.3351219892501831e-01 5.6296080350875854e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6155 -3.2688070088624954e-02</internalNodes>\n          <leafValues>\n            2.7922388911247253e-01 -1.0867659933865070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6156 8.8686197996139526e-02</internalNodes>\n          <leafValues>\n            1.8268220126628876e-02 -3.5637390613555908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6157 4.5751677826046944e-03</internalNodes>\n          <leafValues>\n            -5.1558461040258408e-02 6.3948810100555420e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6158 4.9765850417315960e-03</internalNodes>\n          <leafValues>\n            -5.4684590548276901e-02 1.1907110363245010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6159 -6.4881290309131145e-03</internalNodes>\n          <leafValues>\n            -9.9121123552322388e-02 2.6508849114179611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6160 2.4523450993001461e-03</internalNodes>\n          <leafValues>\n            -9.5045946538448334e-02 6.6802926361560822e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6161 7.0354789495468140e-03</internalNodes>\n          <leafValues>\n            1.0705590248107910e-01 -6.2395099550485611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6162 4.2746789753437042e-02</internalNodes>\n          <leafValues>\n            -1.6092179343104362e-02 4.3256199359893799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6163 -4.5301730278879404e-04</internalNodes>\n          <leafValues>\n            3.6420568823814392e-02 -9.9322892725467682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6164 -5.2631930448114872e-03</internalNodes>\n          <leafValues>\n            -1.1416749656200409e-01 5.7260219007730484e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6165 1.0581909446045756e-03</internalNodes>\n          <leafValues>\n            3.3220488578081131e-02 -1.1831220239400864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6166 2.5088949128985405e-02</internalNodes>\n          <leafValues>\n            -6.0655020177364349e-02 1.2601740658283234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6167 2.4252159893512726e-01</internalNodes>\n          <leafValues>\n            2.2060840856283903e-03 -1.0000120401382446e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6168 -1.4393079280853271e-01</internalNodes>\n          <leafValues>\n            3.7419798970222473e-01 -2.2252110764384270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6169 -6.0972762294113636e-03</internalNodes>\n          <leafValues>\n            -1.1038099974393845e-01 4.5996960252523422e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6170 6.1375470831990242e-03</internalNodes>\n          <leafValues>\n            3.8307808339595795e-02 -1.8086770176887512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6171 -3.6617079749703407e-03</internalNodes>\n          <leafValues>\n            3.8439918309450150e-02 -6.2540791928768158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6172 -1.5854850411415100e-01</internalNodes>\n          <leafValues>\n            3.4469398856163025e-01 -1.9837500527501106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6173 6.7219287157058716e-02</internalNodes>\n          <leafValues>\n            9.5165139064192772e-03 -5.0206458568572998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6174 2.2499680053442717e-03</internalNodes>\n          <leafValues>\n            -1.3063929975032806e-01 6.4832933247089386e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6175 8.4626786410808563e-02</internalNodes>\n          <leafValues>\n            5.9339799918234348e-03 -4.1516590118408203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6176 -9.5411221263930202e-04</internalNodes>\n          <leafValues>\n            -9.3790747225284576e-02 7.5486607849597931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6177 -7.6813949272036552e-03</internalNodes>\n          <leafValues>\n            -1.4821960031986237e-01 2.9010580852627754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6178 -2.5593319907784462e-02</internalNodes>\n          <leafValues>\n            1.4859579503536224e-01 -4.7195930033922195e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6179 2.1508369594812393e-02</internalNodes>\n          <leafValues>\n            2.3782620206475258e-02 -9.6659287810325623e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6180 3.4463100135326385e-02</internalNodes>\n          <leafValues>\n            -3.7410069257020950e-02 2.2015300393104553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6181 -3.7860300391912460e-02</internalNodes>\n          <leafValues>\n            -5.0047469139099121e-01 1.4059869572520256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6182 1.2028450146317482e-03</internalNodes>\n          <leafValues>\n            -6.5087057650089264e-02 8.9583486318588257e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6183 1.6753520816564560e-02</internalNodes>\n          <leafValues>\n            4.9179811030626297e-03 -4.3030908703804016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6184 1.6640779795125127e-03</internalNodes>\n          <leafValues>\n            4.0807429701089859e-02 -1.4469960331916809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6185 3.4473428968340158e-03</internalNodes>\n          <leafValues>\n            -3.9910178631544113e-02 1.5272960066795349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6186 8.9918142184615135e-03</internalNodes>\n          <leafValues>\n            7.1071267127990723e-02 -8.6169913411140442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6187 8.3185202674940228e-04</internalNodes>\n          <leafValues>\n            -2.5739189982414246e-01 1.7941089347004890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6188 -6.8142730742692947e-03</internalNodes>\n          <leafValues>\n            1.3823160529136658e-01 -5.3994540125131607e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6189 2.9746210202574730e-03</internalNodes>\n          <leafValues>\n            -4.1550260037183762e-02 3.9839770644903183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6190 2.5836620479822159e-03</internalNodes>\n          <leafValues>\n            -7.0656493306159973e-02 9.5045506954193115e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6191 2.7143809711560607e-04</internalNodes>\n          <leafValues>\n            5.8070071041584015e-02 -1.2781760096549988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6192 3.5418298840522766e-01</internalNodes>\n          <leafValues>\n            5.4909070022404194e-03 -9.7960698604583740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6193 2.5318650528788567e-02</internalNodes>\n          <leafValues>\n            -1.4410969801247120e-02 2.6219129562377930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6194 -2.2658439411316067e-04</internalNodes>\n          <leafValues>\n            5.2997849881649017e-02 -1.1629349738359451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6195 6.8859090097248554e-03</internalNodes>\n          <leafValues>\n            1.6437310725450516e-02 -2.0349490642547607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6196 1.1607459746301174e-02</internalNodes>\n          <leafValues>\n            -3.6651011556386948e-02 1.5184010565280914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6197 -4.8253959976136684e-03</internalNodes>\n          <leafValues>\n            -2.3476150631904602e-01 3.7914011627435684e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6198 2.5656020734459162e-03</internalNodes>\n          <leafValues>\n            3.5185638815164566e-02 -1.8540710210800171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6199 1.2601399421691895e-01</internalNodes>\n          <leafValues>\n            -9.8542850464582443e-03 2.5520691275596619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6200 2.7164958883076906e-03</internalNodes>\n          <leafValues>\n            -2.1748440340161324e-02 2.5467529892921448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6201 3.2356029748916626e-01</internalNodes>\n          <leafValues>\n            8.8657345622777939e-03 -7.0383572578430176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6202 -8.4016058826819062e-04</internalNodes>\n          <leafValues>\n            3.6831360310316086e-02 -1.4953260123729706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6203 3.3291990403085947e-03</internalNodes>\n          <leafValues>\n            4.8185840249061584e-02 -1.2290470302104950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6204 2.1130539476871490e-01</internalNodes>\n          <leafValues>\n            6.5245870500802994e-03 -8.8293862342834473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6205 5.0388509407639503e-03</internalNodes>\n          <leafValues>\n            -6.7079946398735046e-02 3.7849709391593933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6206 -2.7862399816513062e-02</internalNodes>\n          <leafValues>\n            3.3469489216804504e-01 -1.8816500902175903e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6207 3.8636629469692707e-03</internalNodes>\n          <leafValues>\n            4.3644730001688004e-02 -1.7481489479541779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6208 1.0480300337076187e-01</internalNodes>\n          <leafValues>\n            -1.5737529844045639e-02 4.2094239592552185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6209 -3.4130848944187164e-03</internalNodes>\n          <leafValues>\n            -1.0835570096969604e-01 4.3717790395021439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6210 -4.6396970748901367e-02</internalNodes>\n          <leafValues>\n            -7.5680077075958252e-01 8.6701400578022003e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6211 5.3708078339695930e-03</internalNodes>\n          <leafValues>\n            -4.1797801852226257e-02 1.4824719727039337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6212 -6.1126388609409332e-03</internalNodes>\n          <leafValues>\n            1.8673719465732574e-01 -4.3387491255998611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6213 4.2509321123361588e-02</internalNodes>\n          <leafValues>\n            1.1690679937601089e-02 -4.3740659952163696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6214 1.0473020374774933e-02</internalNodes>\n          <leafValues>\n            4.3143630027770996e-02 -1.5654399991035461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6215 -4.7223959118127823e-02</internalNodes>\n          <leafValues>\n            -7.4483537673950195e-01 3.4918629098683596e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6216 5.3090360015630722e-02</internalNodes>\n          <leafValues>\n            1.0408150032162666e-02 -5.3499448299407959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6217 -7.0432561915367842e-04</internalNodes>\n          <leafValues>\n            3.3384170383214951e-02 -7.3706030845642090e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6218 7.5942431576550007e-03</internalNodes>\n          <leafValues>\n            -2.9107049107551575e-02 1.9468860328197479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6219 2.2676989436149597e-02</internalNodes>\n          <leafValues>\n            3.3803820610046387e-02 -2.7627611160278320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6220 6.6533521749079227e-03</internalNodes>\n          <leafValues>\n            -2.6578240096569061e-02 2.4283319711685181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6221 3.7712270859628916e-03</internalNodes>\n          <leafValues>\n            2.6554299518465996e-02 -6.4952917397022247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6222 -2.0740530453622341e-03</internalNodes>\n          <leafValues>\n            -1.7968970537185669e-01 3.1532160937786102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6223 -1.5632519498467445e-03</internalNodes>\n          <leafValues>\n            5.3109679371118546e-02 -8.7415628135204315e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6224 1.2540889903903008e-02</internalNodes>\n          <leafValues>\n            -3.4136459231376648e-02 2.2097539901733398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6225 -3.2660199794918299e-03</internalNodes>\n          <leafValues>\n            -5.5261608213186264e-02 3.2669559121131897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6226 -8.2185603678226471e-03</internalNodes>\n          <leafValues>\n            -1.4478379487991333e-01 5.5743928998708725e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6227 -5.5811040103435516e-02</internalNodes>\n          <leafValues>\n            1.7237940430641174e-01 -1.4456519857048988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6228 -1.4723159372806549e-01</internalNodes>\n          <leafValues>\n            -8.1392312049865723e-01 7.4356291443109512e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6229 -5.8468529023230076e-03</internalNodes>\n          <leafValues>\n            -6.9043442606925964e-02 1.9456790760159492e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6230 1.9462220370769501e-02</internalNodes>\n          <leafValues>\n            -3.5472229123115540e-02 1.6666300594806671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6231 5.8353468775749207e-02</internalNodes>\n          <leafValues>\n            3.0551329255104065e-03 -3.9289128780364990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6232 4.3785829097032547e-02</internalNodes>\n          <leafValues>\n            1.3574630022048950e-02 -4.6152359247207642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6233 -5.1904350519180298e-02</internalNodes>\n          <leafValues>\n            6.3802438974380493e-01 -9.6664745360612869e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6234 -7.7811058145016432e-04</internalNodes>\n          <leafValues>\n            -9.9303223192691803e-02 5.6094601750373840e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6235 4.9657518975436687e-03</internalNodes>\n          <leafValues>\n            4.1419368237257004e-02 -1.1274819821119308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6236 -5.4516079835593700e-03</internalNodes>\n          <leafValues>\n            1.7399060726165771e-01 -4.1147731244564056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6237 5.0428751856088638e-03</internalNodes>\n          <leafValues>\n            -4.1255220770835876e-02 1.3794229924678802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6238 -1.6985220136120915e-03</internalNodes>\n          <leafValues>\n            -2.2874790430068970e-01 2.5274980813264847e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6239 8.2764238119125366e-02</internalNodes>\n          <leafValues>\n            3.3066510222852230e-03 -6.9113439321517944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6240 3.9285849779844284e-03</internalNodes>\n          <leafValues>\n            -7.9043358564376831e-02 6.6218852996826172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6241 -3.0601240694522858e-02</internalNodes>\n          <leafValues>\n            -2.6517450809478760e-01 1.6467850655317307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6242 -1.9941160455346107e-02</internalNodes>\n          <leafValues>\n            1.5431809425354004e-01 -3.6100689321756363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6243 8.0520063638687134e-02</internalNodes>\n          <leafValues>\n            1.7015919089317322e-02 -3.3448880910873413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6244 7.0323847234249115e-02</internalNodes>\n          <leafValues>\n            1.7122440040111542e-02 -3.3302140235900879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6245 -5.2850939333438873e-02</internalNodes>\n          <leafValues>\n            6.2421400099992752e-02 -1.4690199866890907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6246 -7.1594159817323089e-04</internalNodes>\n          <leafValues>\n            -1.1335150152444839e-01 5.2260790020227432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6247 2.1469970047473907e-01</internalNodes>\n          <leafValues>\n            9.9299731664359570e-04 -9.9997580051422119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6248 8.7042592465877533e-02</internalNodes>\n          <leafValues>\n            -1.2329760007560253e-02 5.0260668992996216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6249 -5.8731262106448412e-04</internalNodes>\n          <leafValues>\n            -9.9346466362476349e-02 5.1705610007047653e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6250 -4.4215220957994461e-02</internalNodes>\n          <leafValues>\n            -3.9368900656700134e-01 1.3920850120484829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6251 -8.7676227092742920e-02</internalNodes>\n          <leafValues>\n            3.0157440900802612e-01 -6.8702381104230881e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6252 -4.8453990370035172e-02</internalNodes>\n          <leafValues>\n            2.5477871298789978e-01 -2.2457750514149666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6253 -2.1567570511251688e-03</internalNodes>\n          <leafValues>\n            -1.3562899827957153e-01 3.1725399196147919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6254 3.9050900377333164e-03</internalNodes>\n          <leafValues>\n            4.9100890755653381e-02 -1.1861059814691544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6255 -3.9808028377592564e-03</internalNodes>\n          <leafValues>\n            4.8333909362554550e-02 -5.5897079408168793e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6256 2.9744929634034634e-03</internalNodes>\n          <leafValues>\n            -6.4802452921867371e-02 9.3583501875400543e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6257 2.5875229388475418e-02</internalNodes>\n          <leafValues>\n            1.8487609922885895e-02 -3.3436349034309387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6258 -1.9373580580577254e-03</internalNodes>\n          <leafValues>\n            2.2000649571418762e-01 -2.5404980406165123e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6259 -2.0171629264950752e-02</internalNodes>\n          <leafValues>\n            -7.8228309750556946e-02 4.5462790876626968e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6260 -2.6088140904903412e-02</internalNodes>\n          <leafValues>\n            1.7637069523334503e-01 -4.5097298920154572e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6261 -2.6868300512433052e-02</internalNodes>\n          <leafValues>\n            -3.2656419277191162e-01 1.7994230613112450e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6262 -7.0211151614785194e-04</internalNodes>\n          <leafValues>\n            3.9671998471021652e-02 -1.4533540606498718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6263 8.3507681265473366e-03</internalNodes>\n          <leafValues>\n            -2.3051729425787926e-02 1.8850760161876678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6264 4.6823569573462009e-03</internalNodes>\n          <leafValues>\n            2.9996560886502266e-02 -2.0701029896736145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6265 3.3109660726040602e-03</internalNodes>\n          <leafValues>\n            5.6536730378866196e-02 -1.6835589706897736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6266 7.6425541192293167e-03</internalNodes>\n          <leafValues>\n            -4.1423950344324112e-02 1.2557519972324371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6267 -2.4713110178709030e-03</internalNodes>\n          <leafValues>\n            7.2156153619289398e-02 -1.0767730325460434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6268 -9.9495360627770424e-03</internalNodes>\n          <leafValues>\n            -1.8187619745731354e-01 3.3567231148481369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6269 1.9820800516754389e-03</internalNodes>\n          <leafValues>\n            -5.6488718837499619e-02 1.0741490125656128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6270 2.3254439234733582e-02</internalNodes>\n          <leafValues>\n            -1.6543349251151085e-02 3.6466678977012634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6271 -5.4177921265363693e-02</internalNodes>\n          <leafValues>\n            -1. 3.3418419770896435e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6272 6.1567849479615688e-04</internalNodes>\n          <leafValues>\n            4.0159329771995544e-02 -1.6460220515727997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6273 -4.2699510231614113e-03</internalNodes>\n          <leafValues>\n            -5.6978620588779449e-02 4.4480901211500168e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6274 1.9749389030039310e-03</internalNodes>\n          <leafValues>\n            5.9283681213855743e-02 -1.0791260004043579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6275 -5.8583128266036510e-03</internalNodes>\n          <leafValues>\n            1.3734050095081329e-01 -3.4231521189212799e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6276 -7.2995189111679792e-04</internalNodes>\n          <leafValues>\n            -1.0075060278177261e-01 5.4733160883188248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6277 -2.9930740594863892e-02</internalNodes>\n          <leafValues>\n            6.3882559537887573e-02 -4.1027020663022995e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6278 -5.1738750189542770e-02</internalNodes>\n          <leafValues>\n            -7.2713458538055420e-01 7.4993381276726723e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6279 2.4021189659833908e-02</internalNodes>\n          <leafValues>\n            7.8491801396012306e-03 -5.5794471502304077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6280 -3.7574321031570435e-03</internalNodes>\n          <leafValues>\n            -1.6086879372596741e-01 3.1015990301966667e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6281 -6.2635682523250580e-02</internalNodes>\n          <leafValues>\n            9.0577863156795502e-02 -2.9033770784735680e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6282 1.9363429397344589e-02</internalNodes>\n          <leafValues>\n            -4.9920588731765747e-02 1.2835779786109924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6283 -3.5072889178991318e-02</internalNodes>\n          <leafValues>\n            2.1391840279102325e-01 -8.8168960064649582e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6284 -1.3243310153484344e-02</internalNodes>\n          <leafValues>\n            2.3349699378013611e-01 -2.3088019341230392e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6285 -3.1290829181671143e-02</internalNodes>\n          <leafValues>\n            -6.9495099782943726e-01 9.3020889908075333e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6286 7.2391419671475887e-03</internalNodes>\n          <leafValues>\n            2.8485849499702454e-02 -1.8310770392417908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6287 6.6785318776965141e-03</internalNodes>\n          <leafValues>\n            -4.9132950603961945e-02 5.4181691259145737e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6288 -3.6825571209192276e-02</internalNodes>\n          <leafValues>\n            3.3120208978652954e-01 -2.1359929814934731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6289 -4.5507341623306274e-02</internalNodes>\n          <leafValues>\n            -1.2893490493297577e-01 4.9545988440513611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6290 7.7639957889914513e-03</internalNodes>\n          <leafValues>\n            -3.6255620419979095e-02 1.5321409702301025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6291 6.0417611151933670e-02</internalNodes>\n          <leafValues>\n            4.5740022324025631e-03 -6.7541092634201050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6292 2.4624960497021675e-03</internalNodes>\n          <leafValues>\n            5.3674161434173584e-02 -1.1326540261507034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6293 7.3594506829977036e-05</internalNodes>\n          <leafValues>\n            -3.5648930817842484e-02 2.5458969175815582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6294 -4.0958370082080364e-03</internalNodes>\n          <leafValues>\n            1.5562909841537476e-01 -3.9390601217746735e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6295 2.8689370083156973e-05</internalNodes>\n          <leafValues>\n            -8.4823302924633026e-02 3.8254238665103912e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6296 -4.6220528893172741e-03</internalNodes>\n          <leafValues>\n            -1.8994529545307159e-01 3.3508758991956711e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6297 -8.5343196988105774e-03</internalNodes>\n          <leafValues>\n            1.1212539672851562e-01 -3.3968489617109299e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6298 -5.8803848922252655e-02</internalNodes>\n          <leafValues>\n            -5.1244312524795532e-01 1.0789549909532070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6299 6.0719929635524750e-02</internalNodes>\n          <leafValues>\n            -1.2555030174553394e-02 2.2509759664535522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6300 1.1038020020350814e-03</internalNodes>\n          <leafValues>\n            -9.6294492483139038e-02 5.6727480143308640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6301 -3.8484560791403055e-03</internalNodes>\n          <leafValues>\n            4.0573459118604660e-02 -2.5326859205961227e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6302 -1.0771050117909908e-02</internalNodes>\n          <leafValues>\n            8.8735632598400116e-02 -5.5628679692745209e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6303 1.2016809545457363e-02</internalNodes>\n          <leafValues>\n            2.3566279560327530e-02 -2.4590580165386200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6304 -1.1656560236588120e-03</internalNodes>\n          <leafValues>\n            -3.7417300045490265e-02 1.6503289341926575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6305 3.2137628644704819e-02</internalNodes>\n          <leafValues>\n            1.4245970174670219e-02 -2.6480850577354431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6306 2.3331670090556145e-02</internalNodes>\n          <leafValues>\n            -3.5288721323013306e-02 1.8447829782962799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6307 -1.2685320340096951e-02</internalNodes>\n          <leafValues>\n            -1.1757309734821320e-01 1.6436910256743431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6308 7.3903938755393028e-05</internalNodes>\n          <leafValues>\n            -1.0271479934453964e-01 7.4301436543464661e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6309 -1.0925470292568207e-01</internalNodes>\n          <leafValues>\n            -8.3165317773818970e-01 5.6438110768795013e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6310 -1.3324350118637085e-01</internalNodes>\n          <leafValues>\n            7.7729821205139160e-01 -8.3403270691633224e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6311 8.9381448924541473e-04</internalNodes>\n          <leafValues>\n            -5.9524301439523697e-02 4.1173089295625687e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6312 1.0318649932742119e-02</internalNodes>\n          <leafValues>\n            1.5926430001854897e-02 -3.1637790799140930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6313 -5.2297548390924931e-03</internalNodes>\n          <leafValues>\n            -7.1166560053825378e-02 3.3489290624856949e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6314 1.6409620642662048e-02</internalNodes>\n          <leafValues>\n            -2.6454120874404907e-02 1.9589969515800476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6315 1.4068709686398506e-02</internalNodes>\n          <leafValues>\n            -3.9364140480756760e-02 1.3977420330047607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6316 6.6486410796642303e-03</internalNodes>\n          <leafValues>\n            6.4070828258991241e-02 -1.0493399947881699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6317 -1.8030619248747826e-02</internalNodes>\n          <leafValues>\n            8.3942912518978119e-02 -1.3399159535765648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6318 -4.4034369289875031e-02</internalNodes>\n          <leafValues>\n            -5.5825459957122803e-01 9.7633162513375282e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6319 -8.0966893583536148e-03</internalNodes>\n          <leafValues>\n            -2.0489789545536041e-01 2.6520200073719025e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6320 5.0180461257696152e-03</internalNodes>\n          <leafValues>\n            -1.1661209911108017e-01 4.5791670680046082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6321 -1.7064629122614861e-02</internalNodes>\n          <leafValues>\n            2.6282730698585510e-01 -2.0390639081597328e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6322 7.1850173175334930e-02</internalNodes>\n          <leafValues>\n            -6.9503681734204292e-03 6.7032539844512939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6323 -5.6914370507001877e-02</internalNodes>\n          <leafValues>\n            -1.3477900624275208e-01 1.8399080261588097e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6324 -3.2365729566663504e-03</internalNodes>\n          <leafValues>\n            6.9673851132392883e-02 -7.2314530611038208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6325 4.1818909347057343e-02</internalNodes>\n          <leafValues>\n            1.1151459999382496e-02 -5.1680111885070801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6326 -6.1106588691473007e-03</internalNodes>\n          <leafValues>\n            -1.3163940608501434e-01 4.3796509504318237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6327 -3.5560909658670425e-02</internalNodes>\n          <leafValues>\n            6.8005502223968506e-02 -3.6331020295619965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6328 6.8789169192314148e-02</internalNodes>\n          <leafValues>\n            1.4698959887027740e-02 -3.8212299346923828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6329 -7.8313373029232025e-02</internalNodes>\n          <leafValues>\n            2.0296069979667664e-01 -8.6810020729899406e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6330 3.9626220241189003e-03</internalNodes>\n          <leafValues>\n            -3.5797890275716782e-02 1.3905510306358337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6331 -3.3874038606882095e-02</internalNodes>\n          <leafValues>\n            -2.2253429889678955e-01 7.5455638580024242e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6332 -6.4755856990814209e-02</internalNodes>\n          <leafValues>\n            4.7521549463272095e-01 -1.0970680043101311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6333 2.6647940278053284e-02</internalNodes>\n          <leafValues>\n            1.5445309691131115e-02 -2.6785778999328613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6334 -3.0731109902262688e-02</internalNodes>\n          <leafValues>\n            -4.7668689489364624e-01 9.6429884433746338e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6335 -2.4022700265049934e-02</internalNodes>\n          <leafValues>\n            -1.0633960366249084e-01 1.2849040329456329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6336 -1.3036349555477500e-03</internalNodes>\n          <leafValues>\n            7.3524177074432373e-02 -6.8074919283390045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6337 -9.8344050347805023e-03</internalNodes>\n          <leafValues>\n            -1.1843550205230713e-01 4.2866699397563934e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6338 8.7102197110652924e-02</internalNodes>\n          <leafValues>\n            -4.0088258683681488e-02 1.7804540693759918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6339 2.0411569625139236e-02</internalNodes>\n          <leafValues>\n            1.6849989071488380e-02 -3.8953658938407898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6340 9.5875263214111328e-02</internalNodes>\n          <leafValues>\n            5.9905550442636013e-03 -8.1525659561157227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6341 6.4893220551311970e-03</internalNodes>\n          <leafValues>\n            -2.4039229378104210e-02 5.3871169686317444e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6342 -9.6279237186536193e-04</internalNodes>\n          <leafValues>\n            9.4299189746379852e-02 -6.4436018466949463e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6343 -3.7659960798919201e-04</internalNodes>\n          <leafValues>\n            -6.2296878546476364e-02 4.1251849383115768e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6344 6.5272641368210316e-03</internalNodes>\n          <leafValues>\n            5.1325131207704544e-02 -1.3037790358066559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6345 2.1429110318422318e-02</internalNodes>\n          <leafValues>\n            -1.1989659629762173e-02 2.6280459761619568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6346 -5.0938720814883709e-03</internalNodes>\n          <leafValues>\n            6.3418947160243988e-02 -9.0566337108612061e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6347 -2.5309680495411158e-03</internalNodes>\n          <leafValues>\n            6.0297761112451553e-02 -2.5049470365047455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6348 -1.5915350522845984e-03</internalNodes>\n          <leafValues>\n            -1.2171190232038498e-01 3.7737991660833359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6349 -3.4030709415674210e-02</internalNodes>\n          <leafValues>\n            4.6413430571556091e-01 -3.5409750416874886e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6350 5.1074200309813023e-03</internalNodes>\n          <leafValues>\n            3.9823830127716064e-02 -1.2645539641380310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6351 -9.6449116244912148e-03</internalNodes>\n          <leafValues>\n            3.3464258909225464e-01 -6.6040740348398685e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6352 1.1422860436141491e-02</internalNodes>\n          <leafValues>\n            -3.6080420017242432e-02 1.3714550435543060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6353 -5.1042139530181885e-03</internalNodes>\n          <leafValues>\n            -9.3986809253692627e-02 2.8844779357314110e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6354 -2.6332271099090576e-01</internalNodes>\n          <leafValues>\n            4.9980929493904114e-01 -1.0173249989748001e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6355 -2.4556639790534973e-01</internalNodes>\n          <leafValues>\n            -8.1778347492218018e-01 6.9596339017152786e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6356 -2.1419329941272736e-01</internalNodes>\n          <leafValues>\n            -5.1040518283843994e-01 9.4540230929851532e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6357 -1.4363219961524010e-02</internalNodes>\n          <leafValues>\n            -9.1000981628894806e-02 2.4646669626235962e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6358 -1.2388969771564007e-03</internalNodes>\n          <leafValues>\n            1.1544570326805115e-01 -4.9565620720386505e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6359 2.1015120670199394e-02</internalNodes>\n          <leafValues>\n            -1.7765879631042480e-02 1.9577859342098236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6360 -4.1783051565289497e-03</internalNodes>\n          <leafValues>\n            -1.1172860115766525e-01 4.4625449925661087e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6361 2.0896939095109701e-03</internalNodes>\n          <leafValues>\n            -3.3988729119300842e-02 6.5539501607418060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6362 1.6410060226917267e-02</internalNodes>\n          <leafValues>\n            -2.0373269915580750e-02 2.5331538915634155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6363 -6.4266882836818695e-02</internalNodes>\n          <leafValues>\n            -6.5880149602890015e-01 3.4550630953162909e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6364 6.8898178869858384e-04</internalNodes>\n          <leafValues>\n            6.7643247544765472e-02 -8.7556242942810059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6365 5.6662331335246563e-03</internalNodes>\n          <leafValues>\n            3.0638309195637703e-02 -1.1895540356636047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6366 -4.3778121471405029e-02</internalNodes>\n          <leafValues>\n            -2.8309130668640137e-01 1.7713630571961403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6367 3.4748481120914221e-03</internalNodes>\n          <leafValues>\n            -9.5787122845649719e-02 4.2630400508642197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6368 -1.1673940345644951e-02</internalNodes>\n          <leafValues>\n            -1.0502570122480392e-01 5.0903890281915665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6369 -3.4004659391939640e-03</internalNodes>\n          <leafValues>\n            1.0470719635486603e-01 -4.0939141064882278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6370 2.7091780211776495e-03</internalNodes>\n          <leafValues>\n            -6.0524601489305496e-02 1.3978950679302216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6371 -1.7439300194382668e-02</internalNodes>\n          <leafValues>\n            -3.2391169667243958e-01 1.4630249701440334e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6372 -1.2598330155014992e-02</internalNodes>\n          <leafValues>\n            -2.0682629942893982e-01 2.5501869618892670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6373 1.8755869939923286e-02</internalNodes>\n          <leafValues>\n            -4.7925960272550583e-02 1.0864380002021790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6374 -4.2074159719049931e-03</internalNodes>\n          <leafValues>\n            -8.2077808678150177e-02 6.3647769391536713e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6375 -1.6427719674538821e-04</internalNodes>\n          <leafValues>\n            1.0120390355587006e-01 -3.4067928791046143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6376 4.3847691267728806e-02</internalNodes>\n          <leafValues>\n            6.0980222187936306e-03 -8.3685982227325439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6377 -3.9284680038690567e-02</internalNodes>\n          <leafValues>\n            2.8250560164451599e-01 -2.2389259189367294e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6378 3.8550909608602524e-02</internalNodes>\n          <leafValues>\n            1.5570489689707756e-02 -3.3978620171546936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6379 -6.9177031517028809e-02</internalNodes>\n          <leafValues>\n            1.2258320301771164e-01 -1.7850179225206375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6380 -1.9251030171290040e-03</internalNodes>\n          <leafValues>\n            -1.0687749832868576e-01 4.6379510313272476e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6381 -8.6635202169418335e-03</internalNodes>\n          <leafValues>\n            9.6412748098373413e-02 -1.7563249915838242e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6382 1.3393509387969971e-01</internalNodes>\n          <leafValues>\n            6.3692941330373287e-03 -7.0170587301254272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6383 4.1082348674535751e-02</internalNodes>\n          <leafValues>\n            -1.1077569797635078e-02 1.3463750481605530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6384 1.4911450445652008e-01</internalNodes>\n          <leafValues>\n            9.5263421535491943e-03 -5.0872552394866943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6385 -5.2500818856060505e-03</internalNodes>\n          <leafValues>\n            7.0025578141212463e-02 -4.2880270630121231e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6386 2.2823570296168327e-02</internalNodes>\n          <leafValues>\n            -4.1884049773216248e-02 1.1770319938659668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6387 -8.5306530818343163e-03</internalNodes>\n          <leafValues>\n            6.1222139745950699e-02 -2.4944549426436424e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6388 1.1971729807555676e-02</internalNodes>\n          <leafValues>\n            3.9662770926952362e-02 -1.6267740726470947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6389 -3.8938269019126892e-02</internalNodes>\n          <leafValues>\n            2.5743520259857178e-01 -1.6356239095330238e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6390 -2.1706389263272285e-02</internalNodes>\n          <leafValues>\n            -3.1998679041862488e-01 1.7135290428996086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6391 6.6900630481541157e-03</internalNodes>\n          <leafValues>\n            2.6101849973201752e-02 -1.0980729758739471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6392 -7.2270832955837250e-02</internalNodes>\n          <leafValues>\n            1.9431130588054657e-01 -2.6044359430670738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6393 -6.7073688842356205e-03</internalNodes>\n          <leafValues>\n            -1.7747850716114044e-01 4.5862998813390732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6394 5.5019360035657883e-02</internalNodes>\n          <leafValues>\n            -8.3471573889255524e-03 6.0511541366577148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6395 1.3142649829387665e-01</internalNodes>\n          <leafValues>\n            -5.7535418309271336e-03 2.9167538881301880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6396 -1.6564460238441825e-03</internalNodes>\n          <leafValues>\n            7.0003032684326172e-02 -6.2690876424312592e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6397 1.5445409715175629e-01</internalNodes>\n          <leafValues>\n            6.1896732077002525e-03 -7.4323302507400513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6398 -5.0357519648969173e-03</internalNodes>\n          <leafValues>\n            -1.1333289742469788e-01 3.8741771131753922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6399 2.2772569209337234e-03</internalNodes>\n          <leafValues>\n            -1.1340530216693878e-01 2.1319400519132614e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6400 3.3173530828207731e-03</internalNodes>\n          <leafValues>\n            4.4273331761360168e-02 -1.0459829866886139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6401 -2.9692800715565681e-02</internalNodes>\n          <leafValues>\n            9.2483766376972198e-02 -2.3342609405517578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6402 6.2937840819358826e-02</internalNodes>\n          <leafValues>\n            -1.2998280115425587e-02 3.8887938857078552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6403 3.6641359329223633e-03</internalNodes>\n          <leafValues>\n            3.2099820673465729e-02 -3.9647988975048065e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6404 4.4782999902963638e-03</internalNodes>\n          <leafValues>\n            -4.5701328665018082e-02 1.0697010159492493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6405 1.8147319788113236e-03</internalNodes>\n          <leafValues>\n            -3.2871820032596588e-02 1.0647939890623093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6406 4.8941639252007008e-03</internalNodes>\n          <leafValues>\n            2.7911009266972542e-02 -2.1725590527057648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6407 -4.4425828382372856e-03</internalNodes>\n          <leafValues>\n            -1.3470150530338287e-01 1.0781410150229931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6408 -2.5493400171399117e-02</internalNodes>\n          <leafValues>\n            6.8371468782424927e-01 -7.7452720142900944e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6409 2.7835449203848839e-02</internalNodes>\n          <leafValues>\n            2.4144299328327179e-02 -1.5170599520206451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6410 7.5548859313130379e-03</internalNodes>\n          <leafValues>\n            -4.7643400728702545e-02 1.1925770342350006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6411 1.0329609736800194e-02</internalNodes>\n          <leafValues>\n            1.8646810203790665e-02 -1.6122570633888245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6412 -1.2393389828503132e-02</internalNodes>\n          <leafValues>\n            6.0304921865463257e-01 -7.7566630207002163e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6413 1.3833769597113132e-02</internalNodes>\n          <leafValues>\n            -2.7617299929261208e-02 5.1266878843307495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6414 -2.5669319555163383e-02</internalNodes>\n          <leafValues>\n            2.3801359534263611e-01 -2.3971909657120705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6415 -5.2043660543859005e-03</internalNodes>\n          <leafValues>\n            -1.0721790045499802e-01 2.6645049452781677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6416 3.4628969151526690e-03</internalNodes>\n          <leafValues>\n            5.4313410073518753e-02 -1.3458320498466492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6417 -1.9220679998397827e-02</internalNodes>\n          <leafValues>\n            7.2996392846107483e-02 -4.0652111172676086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6418 -2.5009829550981522e-03</internalNodes>\n          <leafValues>\n            -7.7671296894550323e-02 5.9096541255712509e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6419 -8.5285156965255737e-03</internalNodes>\n          <leafValues>\n            4.9050811678171158e-02 -6.4078353345394135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6420 4.3327538296580315e-03</internalNodes>\n          <leafValues>\n            2.5221010670065880e-02 -1.9358980655670166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6421 3.6595970392227173e-02</internalNodes>\n          <leafValues>\n            -1.6262590885162354e-02 1.5651239454746246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6422 -1.1795730097219348e-03</internalNodes>\n          <leafValues>\n            -7.2468072175979614e-02 7.0449486374855042e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6423 -1.3975829817354679e-02</internalNodes>\n          <leafValues>\n            -1.1789470165967941e-01 2.1292049437761307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6424 -1.3828700175508857e-03</internalNodes>\n          <leafValues>\n            7.9283542931079865e-02 -9.5104120671749115e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6425 -2.9435830656439066e-03</internalNodes>\n          <leafValues>\n            7.0368431508541107e-02 -3.3217910677194595e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6426 9.5262555405497551e-03</internalNodes>\n          <leafValues>\n            -2.9733620584011078e-02 1.6670459508895874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6427 -9.0114273130893707e-02</internalNodes>\n          <leafValues>\n            -1.6625370085239410e-01 8.6199166253209114e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6428 -1.2089919764548540e-03</internalNodes>\n          <leafValues>\n            8.1083856523036957e-02 -7.3029123246669769e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6429 -1.4199960231781006e-01</internalNodes>\n          <leafValues>\n            -1. 2.2284830920398235e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6430 8.0690719187259674e-03</internalNodes>\n          <leafValues>\n            4.7412220388650894e-02 -1.0178930312395096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6431 -4.7410889528691769e-03</internalNodes>\n          <leafValues>\n            1.2051119655370712e-01 -4.9957480281591415e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6432 -1.6977200284600258e-03</internalNodes>\n          <leafValues>\n            -2.4171440303325653e-01 1.9534369930624962e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6433 -2.8892089612782001e-03</internalNodes>\n          <leafValues>\n            2.5727990269660950e-01 -1.1625059880316257e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6434 -1.5177440363913774e-03</internalNodes>\n          <leafValues>\n            -9.8784193396568298e-02 4.6706128865480423e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6435 1.4197319746017456e-01</internalNodes>\n          <leafValues>\n            -2.5096370372921228e-03 7.5450611114501953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6436 9.7517937421798706e-02</internalNodes>\n          <leafValues>\n            -6.9059049710631371e-03 6.5184432268142700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6437 1.3567379675805569e-02</internalNodes>\n          <leafValues>\n            -7.6325193047523499e-02 8.8054582476615906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6438 8.0981463193893433e-02</internalNodes>\n          <leafValues>\n            1.5558109618723392e-02 -3.4601628780364990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6439 -4.7192731872200966e-03</internalNodes>\n          <leafValues>\n            8.1620022654533386e-02 -4.6072289347648621e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6440 2.0368969999253750e-03</internalNodes>\n          <leafValues>\n            -4.4817630201578140e-02 1.2861390411853790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6441 -1.7878509825095534e-03</internalNodes>\n          <leafValues>\n            4.3731331825256348e-02 -4.4995948672294617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6442 -7.1685528382658958e-03</internalNodes>\n          <leafValues>\n            -1.3597999513149261e-01 3.8796991109848022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6443 -6.7460887134075165e-02</internalNodes>\n          <leafValues>\n            -2.9265740513801575e-01 3.5135280340909958e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6444 -1.5598500147461891e-02</internalNodes>\n          <leafValues>\n            2.3105660080909729e-01 -2.2405069321393967e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6445 -2.1026479080319405e-02</internalNodes>\n          <leafValues>\n            -1.5283830463886261e-01 3.1531449407339096e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6446 -1.0558360069990158e-01</internalNodes>\n          <leafValues>\n            -6.8366038799285889e-01 6.8997950293123722e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6447 -3.6966579500585794e-03</internalNodes>\n          <leafValues>\n            3.4315150231122971e-02 -4.8922799527645111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6448 -6.0826627304777503e-04</internalNodes>\n          <leafValues>\n            -5.2638430148363113e-02 8.9546948671340942e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6449 -2.8936540707945824e-02</internalNodes>\n          <leafValues>\n            4.1818480938673019e-02 -1.3818169943988323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6450 -5.8082528412342072e-03</internalNodes>\n          <leafValues>\n            6.7874796688556671e-02 -8.5578799247741699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6451 -4.6095378696918488e-02</internalNodes>\n          <leafValues>\n            -1.2584780156612396e-01 2.0466970279812813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6452 5.2972920238971710e-02</internalNodes>\n          <leafValues>\n            -1.2453259900212288e-02 3.4565049409866333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6453 4.9351599067449570e-02</internalNodes>\n          <leafValues>\n            1.0901239700615406e-02 -4.8506981134414673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6454 4.4377800077199936e-02</internalNodes>\n          <leafValues>\n            9.9294837564229965e-03 -4.3877899646759033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6455 -1.1464890092611313e-01</internalNodes>\n          <leafValues>\n            2.6874598860740662e-01 -9.2000560835003853e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6456 1.6887830197811127e-01</internalNodes>\n          <leafValues>\n            5.7101310230791569e-03 -8.5972881317138672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6457 5.1198098808526993e-02</internalNodes>\n          <leafValues>\n            -8.5723921656608582e-03 1.3395169377326965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6458 -3.0789880547672510e-03</internalNodes>\n          <leafValues>\n            -1.0338760167360306e-01 4.3459478765726089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6459 4.7223128378391266e-02</internalNodes>\n          <leafValues>\n            8.1934239715337753e-03 -4.3803408741950989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6460 -7.6270569115877151e-03</internalNodes>\n          <leafValues>\n            1.8713890016078949e-01 -2.4660250172019005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6461 5.4106907919049263e-03</internalNodes>\n          <leafValues>\n            4.1099831461906433e-02 -7.8868232667446136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6462 -1.4900229871273041e-03</internalNodes>\n          <leafValues>\n            -2.0115040242671967e-01 3.1898159533739090e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6463 -8.3831608295440674e-02</internalNodes>\n          <leafValues>\n            5.8017939329147339e-01 -5.2973427809774876e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6464 6.2233800999820232e-03</internalNodes>\n          <leafValues>\n            -3.9786059409379959e-02 1.2283950299024582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6465 1.1475080251693726e-01</internalNodes>\n          <leafValues>\n            -1.1975419707596302e-02 2.1586710214614868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6466 -1.5253260498866439e-03</internalNodes>\n          <leafValues>\n            1.3804529607295990e-01 -3.9941880851984024e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6467 -5.2878521382808685e-03</internalNodes>\n          <leafValues>\n            -1.2790650129318237e-01 3.2893560826778412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6468 8.9670647867023945e-04</internalNodes>\n          <leafValues>\n            -1.2481059879064560e-01 4.4544249773025513e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6469 3.8421660661697388e-02</internalNodes>\n          <leafValues>\n            7.7155791223049164e-03 -6.5575468540191650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6470 -9.3785318313166499e-04</internalNodes>\n          <leafValues>\n            5.5608510971069336e-02 -8.9876912534236908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6471 1.9965849351137877e-03</internalNodes>\n          <leafValues>\n            -2.5297610089182854e-02 1.9413180649280548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6472 4.5782068627886474e-04</internalNodes>\n          <leafValues>\n            3.9089199155569077e-02 -1.2908570468425751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6473 3.8373940624296665e-03</internalNodes>\n          <leafValues>\n            -2.8748869895935059e-02 1.9429750740528107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6474 3.7142829387448728e-04</internalNodes>\n          <leafValues>\n            3.8272358477115631e-02 -1.3759189844131470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6475 7.5116259977221489e-03</internalNodes>\n          <leafValues>\n            -1.4461129903793335e-02 1.2656949460506439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6476 -5.0362840294837952e-02</internalNodes>\n          <leafValues>\n            3.5183578729629517e-01 -1.4051860198378563e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6477 3.9921641349792480e-02</internalNodes>\n          <leafValues>\n            2.7280429378151894e-02 -1.9958199560642242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6478 2.2605259716510773e-01</internalNodes>\n          <leafValues>\n            -6.8001961335539818e-03 7.3006898164749146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6479 1.1081779748201370e-01</internalNodes>\n          <leafValues>\n            4.3370737694203854e-03 -8.6829161643981934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6480 -9.7494889050722122e-03</internalNodes>\n          <leafValues>\n            -6.3740663230419159e-02 8.4537997841835022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6481 -2.2887689992785454e-03</internalNodes>\n          <leafValues>\n            9.9654018878936768e-02 -4.1565418243408203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6482 2.0008319988846779e-03</internalNodes>\n          <leafValues>\n            -5.5650699883699417e-02 1.0709869861602783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6483 -1.5160050243139267e-02</internalNodes>\n          <leafValues>\n            -1.4098760485649109e-01 3.8741599768400192e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6484 -6.3132969662547112e-03</internalNodes>\n          <leafValues>\n            -1. 4.4605308212339878e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6485 -1.3970009982585907e-02</internalNodes>\n          <leafValues>\n            1.2481089681386948e-01 -2.1425830200314522e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6486 -4.4321279972791672e-02</internalNodes>\n          <leafValues>\n            -5.3340071439743042e-01 1.0165239684283733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6487 1.4885979471728206e-03</internalNodes>\n          <leafValues>\n            -4.8868600279092789e-02 3.6077901721000671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6488 6.5139681100845337e-02</internalNodes>\n          <leafValues>\n            7.6331058517098427e-03 -5.8781641721725464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6489 -2.0741410553455353e-02</internalNodes>\n          <leafValues>\n            -2.9658278822898865e-01 1.8622800707817078e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>396</maxWeakCount>\n      <stageThreshold>-1.2181390523910522e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 6490 1.3575689867138863e-02</internalNodes>\n          <leafValues>\n            -1.4249590039253235e-01 2.3337620496749878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6491 -7.5882389210164547e-03</internalNodes>\n          <leafValues>\n            8.6464479565620422e-02 -2.3954319953918457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6492 4.2986529879271984e-03</internalNodes>\n          <leafValues>\n            5.0282090902328491e-02 -3.5250121355056763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6493 -1.9793119281530380e-02</internalNodes>\n          <leafValues>\n            -1.6827470064163208e-01 4.3712720274925232e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6494 6.6613829694688320e-03</internalNodes>\n          <leafValues>\n            -2.0371539890766144e-01 7.1225747466087341e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6495 3.2715050037950277e-03</internalNodes>\n          <leafValues>\n            5.4536718875169754e-02 -2.2428829967975616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6496 -3.6143321543931961e-02</internalNodes>\n          <leafValues>\n            5.5044889450073242e-01 -2.3597210645675659e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6497 3.1145319808274508e-03</internalNodes>\n          <leafValues>\n            2.2049430757761002e-02 -3.0109429359436035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6498 8.9540961198508739e-04</internalNodes>\n          <leafValues>\n            -1.2279850244522095e-01 1.0751420259475708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6499 8.0573331797495484e-04</internalNodes>\n          <leafValues>\n            -8.7587781250476837e-02 5.4632049053907394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6500 -6.5726130269467831e-03</internalNodes>\n          <leafValues>\n            -1.5649870038032532e-01 7.6560758054256439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6501 2.2269350010901690e-03</internalNodes>\n          <leafValues>\n            2.9490780085325241e-02 -5.9210199862718582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6502 6.2076752074062824e-03</internalNodes>\n          <leafValues>\n            7.5727343559265137e-02 -1.7675329744815826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6503 6.0021011158823967e-03</internalNodes>\n          <leafValues>\n            -7.8353807330131531e-02 1.4492890238761902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6504 1.1996340006589890e-02</internalNodes>\n          <leafValues>\n            2.8644030913710594e-02 -3.1982469558715820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6505 6.7174229770898819e-03</internalNodes>\n          <leafValues>\n            -1.0739900171756744e-01 1.3106329739093781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6506 5.7567027397453785e-04</internalNodes>\n          <leafValues>\n            -6.4126797020435333e-02 1.6293540596961975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6507 3.9552329108119011e-03</internalNodes>\n          <leafValues>\n            3.7347421050071716e-02 -1.5253570675849915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6508 1.5598450554534793e-03</internalNodes>\n          <leafValues>\n            -9.8687313497066498e-02 9.8718203604221344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6509 -8.4324590861797333e-03</internalNodes>\n          <leafValues>\n            2.0905649662017822e-01 -6.0484018176794052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6510 8.7580326944589615e-03</internalNodes>\n          <leafValues>\n            5.0603430718183517e-02 -2.1845470368862152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6511 -1.1965750157833099e-01</internalNodes>\n          <leafValues>\n            2.6711589097976685e-01 -7.4574039317667484e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6512 2.0653149113059044e-03</internalNodes>\n          <leafValues>\n            3.5194810479879379e-02 -2.5230750441551208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6513 -5.7491107145324349e-04</internalNodes>\n          <leafValues>\n            8.2424223423004150e-02 -1.0830479860305786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6514 -6.7591401748359203e-03</internalNodes>\n          <leafValues>\n            -1.3704189658164978e-01 7.0154368877410889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6515 1.8210740759968758e-02</internalNodes>\n          <leafValues>\n            -2.5407770648598671e-02 1.0123729705810547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6516 -8.8006846606731415e-02</internalNodes>\n          <leafValues>\n            3.6638718843460083e-01 -3.0893180519342422e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6517 -4.4944360852241516e-03</internalNodes>\n          <leafValues>\n            -1.5753810107707977e-01 6.0070630162954330e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6518 -6.3741360791027546e-03</internalNodes>\n          <leafValues>\n            2.1189889311790466e-01 -3.9567999541759491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6519 -3.1097440049052238e-02</internalNodes>\n          <leafValues>\n            -5.9965521097183228e-01 9.9493442103266716e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6520 5.8496380224823952e-03</internalNodes>\n          <leafValues>\n            2.8244689106941223e-02 -2.9778000712394714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6521 -2.2763800807297230e-03</internalNodes>\n          <leafValues>\n            1.0270419716835022e-01 -7.3711991310119629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6522 3.9103049784898758e-03</internalNodes>\n          <leafValues>\n            5.2445668727159500e-02 -2.0123919844627380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6523 2.8906730003654957e-03</internalNodes>\n          <leafValues>\n            -2.1692280471324921e-01 3.7294570356607437e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6524 4.5904931612312794e-03</internalNodes>\n          <leafValues>\n            -8.1276580691337585e-02 1.1013159900903702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6525 -3.4245800226926804e-02</internalNodes>\n          <leafValues>\n            -1.1541730165481567e-01 1.4384049922227859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6526 -1.7881620442494750e-04</internalNodes>\n          <leafValues>\n            6.2885977327823639e-02 -1.3267129659652710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6527 -4.0114559233188629e-03</internalNodes>\n          <leafValues>\n            -1.8961720168590546e-01 3.6701768636703491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6528 3.1429999507963657e-03</internalNodes>\n          <leafValues>\n            -4.9915120005607605e-02 1.7299769818782806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6529 7.8082352876663208e-02</internalNodes>\n          <leafValues>\n            4.7195390798151493e-03 -3.4015879034996033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6530 2.0370949804782867e-01</internalNodes>\n          <leafValues>\n            -2.1733140572905540e-02 3.7422651052474976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6531 9.7424820065498352e-02</internalNodes>\n          <leafValues>\n            -6.8117439514026046e-04 4.9639159440994263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6532 -2.6366419624537230e-03</internalNodes>\n          <leafValues>\n            -1.8532100319862366e-01 4.3768830597400665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6533 4.1020149365067482e-04</internalNodes>\n          <leafValues>\n            2.7802910655736923e-02 -8.7706968188285828e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6534 -5.9666559100151062e-02</internalNodes>\n          <leafValues>\n            -5.6872707605361938e-01 1.3388640247285366e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6535 -5.1892381161451340e-03</internalNodes>\n          <leafValues>\n            5.0499498844146729e-02 -1.4465869963169098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6536 1.0377140343189240e-01</internalNodes>\n          <leafValues>\n            -1.8952060490846634e-02 4.1107979416847229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6537 -1.4075759798288345e-02</internalNodes>\n          <leafValues>\n            -2.0367360115051270e-01 3.2513279467821121e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6538 -6.8877148441970348e-03</internalNodes>\n          <leafValues>\n            1.2401729822158813e-01 -7.6617129147052765e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6539 2.9345849528908730e-02</internalNodes>\n          <leafValues>\n            8.4471162408590317e-03 -3.4656980633735657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6540 -8.3123557269573212e-03</internalNodes>\n          <leafValues>\n            -1.9180110096931458e-01 3.8585629314184189e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6541 6.4493268728256226e-02</internalNodes>\n          <leafValues>\n            -2.7158880606293678e-02 3.0217999219894409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6542 8.0413377145305276e-04</internalNodes>\n          <leafValues>\n            -1.0444170236587524e-01 6.4721979200839996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6543 -6.5569980069994926e-03</internalNodes>\n          <leafValues>\n            -1.0658600181341171e-01 2.5238489732146263e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6544 -3.8326930254697800e-02</internalNodes>\n          <leafValues>\n            -6.8506389856338501e-01 9.6486946567893028e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6545 -4.0327329188585281e-02</internalNodes>\n          <leafValues>\n            1.9759850203990936e-01 -2.5184169411659241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6546 6.1981407925486565e-03</internalNodes>\n          <leafValues>\n            4.6415790915489197e-02 -1.7171670496463776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6547 3.7465501576662064e-02</internalNodes>\n          <leafValues>\n            -1.5010279603302479e-02 8.6962252855300903e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6548 -6.0584479942917824e-03</internalNodes>\n          <leafValues>\n            6.9242753088474274e-02 -9.4594202935695648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6549 -1.4991699717938900e-02</internalNodes>\n          <leafValues>\n            -1.4969819784164429e-01 4.6579450368881226e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6550 6.4760357141494751e-02</internalNodes>\n          <leafValues>\n            -2.6089169085025787e-02 2.7072009444236755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6551 5.9020328521728516e-01</internalNodes>\n          <leafValues>\n            3.9715780876576900e-03 -6.3918071985244751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6552 7.3892213404178619e-02</internalNodes>\n          <leafValues>\n            -6.2506332993507385e-02 1.3100719451904297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6553 4.3928170204162598e-01</internalNodes>\n          <leafValues>\n            5.0452877767384052e-03 -3.7628439068794250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6554 1.0192040354013443e-01</internalNodes>\n          <leafValues>\n            2.2053290158510208e-02 -3.3408200740814209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6555 1.1084219813346863e-01</internalNodes>\n          <leafValues>\n            1.6215540468692780e-02 -3.4900701045989990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6556 5.5628088302910328e-03</internalNodes>\n          <leafValues>\n            -5.2196711301803589e-02 1.1796370148658752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6557 -6.3897081417962909e-04</internalNodes>\n          <leafValues>\n            -1.5659700334072113e-01 4.4744450598955154e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6558 -3.5426639951765537e-03</internalNodes>\n          <leafValues>\n            1.4490570127964020e-01 -4.2518708854913712e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6559 -3.3016160130500793e-02</internalNodes>\n          <leafValues>\n            -3.6942940950393677e-01 7.6470980420708656e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6560 9.6050858497619629e-02</internalNodes>\n          <leafValues>\n            6.5154801122844219e-03 -8.7827038764953613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6561 -4.9572009593248367e-02</internalNodes>\n          <leafValues>\n            -4.2723020911216736e-01 3.1567770056426525e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6562 2.5885479408316314e-04</internalNodes>\n          <leafValues>\n            -1.5689669549465179e-01 3.8051828742027283e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6563 -1.5898289857432246e-03</internalNodes>\n          <leafValues>\n            -1.8845720589160919e-01 2.4630049243569374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6564 -1.3463890354614705e-04</internalNodes>\n          <leafValues>\n            1.4452700316905975e-01 -4.4172260910272598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6565 1.1674249544739723e-02</internalNodes>\n          <leafValues>\n            -2.5676380842924118e-02 1.9527709484100342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6566 -2.3507000878453255e-02</internalNodes>\n          <leafValues>\n            -3.2271888852119446e-01 1.8514839932322502e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6567 3.1225800514221191e-02</internalNodes>\n          <leafValues>\n            -1.9622299820184708e-02 1.4570100605487823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6568 8.0607319250702858e-04</internalNodes>\n          <leafValues>\n            4.4379990547895432e-02 -1.3635620474815369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6569 -2.6445880532264709e-01</internalNodes>\n          <leafValues>\n            4.1771200299263000e-01 -6.3821650110185146e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6570 3.5479381680488586e-02</internalNodes>\n          <leafValues>\n            -2.2758480161428452e-02 2.6946100592613220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6571 -3.8137599825859070e-02</internalNodes>\n          <leafValues>\n            -3.6719909310340881e-01 1.8722059205174446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6572 3.9108810015022755e-03</internalNodes>\n          <leafValues>\n            -1.8176819384098053e-01 3.9054948836565018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6573 4.1834539733827114e-03</internalNodes>\n          <leafValues>\n            4.8676248639822006e-02 -1.3558860123157501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6574 -4.6641420572996140e-02</internalNodes>\n          <leafValues>\n            -5.8741682767868042e-01 9.8590552806854248e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6575 1.1950139887630939e-02</internalNodes>\n          <leafValues>\n            -2.5506049394607544e-02 2.7971199154853821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6576 -6.3585072755813599e-02</internalNodes>\n          <leafValues>\n            -7.0940697193145752e-01 8.8691459968686104e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6577 9.7221415489912033e-03</internalNodes>\n          <leafValues>\n            -2.7885029092431068e-02 5.4626680910587311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6578 -1.6111459583044052e-02</internalNodes>\n          <leafValues>\n            -6.8265482783317566e-02 8.0932967364788055e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6579 -7.9950511455535889e-02</internalNodes>\n          <leafValues>\n            2.0425680279731750e-01 -3.4306850284337997e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6580 3.1421340536326170e-03</internalNodes>\n          <leafValues>\n            4.2196881026029587e-02 -1.5366910398006439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6581 2.9253180400701240e-05</internalNodes>\n          <leafValues>\n            -7.6382257044315338e-02 3.1748879700899124e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6582 -5.4587088525295258e-02</internalNodes>\n          <leafValues>\n            -6.4891487360000610e-01 9.1545386239886284e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6583 -2.1083420142531395e-02</internalNodes>\n          <leafValues>\n            1.9058999419212341e-01 -2.4686640128493309e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6584 3.9170900708995759e-04</internalNodes>\n          <leafValues>\n            -1.0570889711380005e-01 5.2946768701076508e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6585 2.2588829696178436e-01</internalNodes>\n          <leafValues>\n            2.3077470250427723e-03 -9.2606049776077271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6586 -1.8899979069828987e-02</internalNodes>\n          <leafValues>\n            1.4503970742225647e-01 -3.8506619632244110e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6587 -8.7533425539731979e-03</internalNodes>\n          <leafValues>\n            8.3958826959133148e-02 -3.7479098886251450e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6588 -2.0821259915828705e-01</internalNodes>\n          <leafValues>\n            -6.7948538064956665e-01 9.8609952256083488e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6589 1.6270060092210770e-02</internalNodes>\n          <leafValues>\n            1.4115580357611179e-02 -1.8218359351158142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6590 3.0145489145070314e-03</internalNodes>\n          <leafValues>\n            5.2013739943504333e-02 -1.1450190097093582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6591 1.8547449260950089e-02</internalNodes>\n          <leafValues>\n            -2.5681620463728905e-02 1.6456380486488342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6592 4.2732958681881428e-03</internalNodes>\n          <leafValues>\n            -5.9573240578174591e-02 1.0390280187129974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6593 -2.8249630704522133e-02</internalNodes>\n          <leafValues>\n            -7.8161589801311493e-02 2.9064230620861053e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6594 -1.5538600273430347e-02</internalNodes>\n          <leafValues>\n            -1.4481380581855774e-01 3.8434058427810669e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6595 3.8620950654149055e-03</internalNodes>\n          <leafValues>\n            -3.8745380938053131e-02 9.8183527588844299e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6596 1.5253369696438313e-02</internalNodes>\n          <leafValues>\n            1.7946500331163406e-02 -3.0948030948638916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6597 -4.2140888981521130e-03</internalNodes>\n          <leafValues>\n            5.7521570473909378e-02 -2.7782430872321129e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6598 -2.1610679104924202e-03</internalNodes>\n          <leafValues>\n            1.0617449879646301e-01 -5.9411250054836273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6599 -1.8687519477680326e-03</internalNodes>\n          <leafValues>\n            -1.2807689607143402e-01 4.7781638801097870e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6600 -6.2083022203296423e-04</internalNodes>\n          <leafValues>\n            1.1725349724292755e-01 -4.7861199826002121e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6601 -2.5575871113687754e-03</internalNodes>\n          <leafValues>\n            5.7900648564100266e-02 -8.4036856889724731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6602 4.1207410395145416e-03</internalNodes>\n          <leafValues>\n            5.4239779710769653e-02 -1.2611140310764313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6603 1.7525779083371162e-02</internalNodes>\n          <leafValues>\n            2.8792750090360641e-02 -1.9793170690536499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6604 -1.9012490287423134e-02</internalNodes>\n          <leafValues>\n            1.1444319784641266e-01 -6.6813051700592041e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6605 9.5198452472686768e-03</internalNodes>\n          <leafValues>\n            -3.9105638861656189e-02 8.8588982820510864e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6606 7.7857482247054577e-03</internalNodes>\n          <leafValues>\n            4.7903850674629211e-02 -1.1941280215978622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6607 -2.5355129037052393e-03</internalNodes>\n          <leafValues>\n            6.1377499252557755e-02 -5.1576390862464905e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6608 1.3886679708957672e-01</internalNodes>\n          <leafValues>\n            7.1258218958973885e-03 -7.5076061487197876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6609 -3.0958889983594418e-03</internalNodes>\n          <leafValues>\n            7.3432266712188721e-02 -4.0409181267023087e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6610 4.7118910588324070e-03</internalNodes>\n          <leafValues>\n            2.2374270483851433e-02 -2.3885080218315125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6611 6.3587618060410023e-03</internalNodes>\n          <leafValues>\n            5.3684379905462265e-02 -1.3398240506649017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6612 6.8367011845111847e-02</internalNodes>\n          <leafValues>\n            -3.6103919148445129e-02 1.7410080134868622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6613 -3.2802459318190813e-03</internalNodes>\n          <leafValues>\n            -1.4603079855442047e-01 4.8215139657258987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6614 -6.6430270671844482e-02</internalNodes>\n          <leafValues>\n            4.6738991141319275e-01 -1.3140380382537842e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6615 -4.2274069041013718e-02</internalNodes>\n          <leafValues>\n            -6.3253331184387207e-01 1.0359439998865128e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6616 -1.0691370116546750e-03</internalNodes>\n          <leafValues>\n            -1.1469829827547073e-01 4.5048121362924576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6617 5.4235469549894333e-02</internalNodes>\n          <leafValues>\n            -1.9809609279036522e-02 3.1430730223655701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6618 -7.2852471930673346e-06</internalNodes>\n          <leafValues>\n            5.8051250874996185e-02 -1.0246170312166214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6619 2.0893309265375137e-02</internalNodes>\n          <leafValues>\n            1.5608809888362885e-02 -2.1545739471912384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6620 -5.3765181452035904e-02</internalNodes>\n          <leafValues>\n            2.0559239387512207e-01 -3.2525919377803802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6621 -1.5972670167684555e-02</internalNodes>\n          <leafValues>\n            -1.7119890451431274e-01 1.4773829840123653e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6622 -1.4591409824788570e-02</internalNodes>\n          <leafValues>\n            -2.3046019673347473e-01 2.3345010355114937e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6623 2.4016639217734337e-03</internalNodes>\n          <leafValues>\n            -2.8272429481148720e-02 9.5124237239360809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6624 -2.0430689677596092e-02</internalNodes>\n          <leafValues>\n            4.0655559301376343e-01 -1.6212539747357368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6625 8.1926792860031128e-02</internalNodes>\n          <leafValues>\n            8.7937163189053535e-03 -4.0210300683975220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6626 -1.2892849743366241e-02</internalNodes>\n          <leafValues>\n            -1.1946929991245270e-01 4.5022130012512207e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6627 9.4712682068347931e-02</internalNodes>\n          <leafValues>\n            -1.0760080069303513e-02 2.1693980693817139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6628 4.0901689790189266e-03</internalNodes>\n          <leafValues>\n            -8.4592603147029877e-02 7.0457696914672852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6629 -1.2496539950370789e-01</internalNodes>\n          <leafValues>\n            2.8276950120925903e-01 -4.2760102078318596e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6630 1.5758169814944267e-02</internalNodes>\n          <leafValues>\n            -4.8926588147878647e-02 1.2380229681730270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6631 -5.2818129770457745e-03</internalNodes>\n          <leafValues>\n            6.1836440116167068e-02 -3.6712940782308578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6632 8.6735859513282776e-03</internalNodes>\n          <leafValues>\n            -4.7372240573167801e-02 1.5809150040149689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6633 -5.2273580804467201e-03</internalNodes>\n          <leafValues>\n            -1.1694569885730743e-01 2.9156440868973732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6634 6.1831828206777573e-02</internalNodes>\n          <leafValues>\n            8.0447606742382050e-03 -6.8530529737472534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6635 6.6815607249736786e-02</internalNodes>\n          <leafValues>\n            -8.4813889116048813e-03 1.4523769915103912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6636 -1.0062000155448914e-01</internalNodes>\n          <leafValues>\n            7.4605828523635864e-01 -6.8016690202057362e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6637 -1.4751539565622807e-02</internalNodes>\n          <leafValues>\n            -1.4893519878387451e-01 3.9579190313816071e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6638 3.4616589546203613e-02</internalNodes>\n          <leafValues>\n            -2.0749099552631378e-02 2.8549820184707642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6639 -1.2966389954090118e-01</internalNodes>\n          <leafValues>\n            -5.5446487665176392e-01 4.6082548797130585e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6640 7.4035510420799255e-02</internalNodes>\n          <leafValues>\n            5.3174998611211777e-03 -8.4149527549743652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6641 1.0177110135555267e-01</internalNodes>\n          <leafValues>\n            -7.6451660133898258e-03 3.5442221164703369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6642 8.9658737182617188e-02</internalNodes>\n          <leafValues>\n            -9.3901483342051506e-03 5.0577938556671143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6643 -1.6180740296840668e-01</internalNodes>\n          <leafValues>\n            -6.5451782941818237e-01 8.7116202339529991e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6644 1.8784119747579098e-03</internalNodes>\n          <leafValues>\n            5.2064418792724609e-02 -9.0741947293281555e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6645 1.9505689851939678e-03</internalNodes>\n          <leafValues>\n            -5.4091621190309525e-02 3.5506200045347214e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6646 -6.0789179988205433e-03</internalNodes>\n          <leafValues>\n            1.2238519638776779e-01 -4.6803738921880722e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6647 -2.2403250634670258e-01</internalNodes>\n          <leafValues>\n            -7.7728492021560669e-01 2.3639709688723087e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6648 -1.3039590418338776e-01</internalNodes>\n          <leafValues>\n            -2.7692648768424988e-01 2.1548289805650711e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6649 7.2587423026561737e-02</internalNodes>\n          <leafValues>\n            1.0621299967169762e-02 -1.6270780563354492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6650 7.3180042207241058e-02</internalNodes>\n          <leafValues>\n            -1.7519259825348854e-02 3.3697870373725891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6651 -3.4525979310274124e-02</internalNodes>\n          <leafValues>\n            -5.3538697957992554e-01 1.0397709906101227e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6652 2.3753559216856956e-03</internalNodes>\n          <leafValues>\n            5.1910828799009323e-02 -9.6959516406059265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6653 -6.8947779946029186e-03</internalNodes>\n          <leafValues>\n            8.2409977912902832e-02 -2.3098999634385109e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6654 -9.4773292541503906e-02</internalNodes>\n          <leafValues>\n            -7.0510691404342651e-01 7.7322297729551792e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6655 5.6327427737414837e-03</internalNodes>\n          <leafValues>\n            1.7960680648684502e-02 -7.2307042777538300e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6656 6.6090249456465244e-03</internalNodes>\n          <leafValues>\n            -3.6701079457998276e-02 1.3706339895725250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6657 -2.4978399276733398e-02</internalNodes>\n          <leafValues>\n            -1.6281390190124512e-01 7.6992698013782501e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6658 -6.0882410034537315e-03</internalNodes>\n          <leafValues>\n            1.0555619746446609e-01 -4.8507411032915115e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6659 6.1161588877439499e-02</internalNodes>\n          <leafValues>\n            1.1127579491585493e-03 -5.6657880544662476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6660 -3.8722809404134750e-02</internalNodes>\n          <leafValues>\n            -5.9797358512878418e-01 8.4153199568390846e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6661 6.2335198745131493e-03</internalNodes>\n          <leafValues>\n            3.1563021242618561e-02 -1.8769240379333496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6662 1.6939510405063629e-01</internalNodes>\n          <leafValues>\n            -1.7183739691972733e-02 3.1440049409866333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6663 8.5851341485977173e-02</internalNodes>\n          <leafValues>\n            5.7081878185272217e-03 -4.9966809153556824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6664 -2.0315010100603104e-02</internalNodes>\n          <leafValues>\n            -1.2359900027513504e-01 4.4704839587211609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6665 -4.0276069194078445e-03</internalNodes>\n          <leafValues>\n            4.7957219183444977e-02 -9.7137056291103363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6666 -3.9274509996175766e-02</internalNodes>\n          <leafValues>\n            1.8804270029067993e-01 -2.9754199087619781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6667 -2.1163629367947578e-02</internalNodes>\n          <leafValues>\n            -1.5724900364875793e-01 3.9636529982089996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6668 4.0783579461276531e-03</internalNodes>\n          <leafValues>\n            -4.7562818974256516e-02 1.0976249724626541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6669 1.0180410463362932e-03</internalNodes>\n          <leafValues>\n            -6.6306091845035553e-02 9.8773077130317688e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6670 2.8516049496829510e-03</internalNodes>\n          <leafValues>\n            -5.1101740449666977e-02 9.6994958817958832e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6671 4.8373742029070854e-03</internalNodes>\n          <leafValues>\n            4.0866550058126450e-02 -1.2480360269546509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6672 -3.4715479705482721e-04</internalNodes>\n          <leafValues>\n            4.1778691112995148e-02 -1.2574540078639984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6673 -6.3760261982679367e-03</internalNodes>\n          <leafValues>\n            1.5754230320453644e-01 -4.1692778468132019e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6674 -1.2534069828689098e-02</internalNodes>\n          <leafValues>\n            -1.3565440475940704e-01 4.1295569390058517e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6675 -2.3321550339460373e-02</internalNodes>\n          <leafValues>\n            1.2518349289894104e-01 -1.3427260331809521e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6676 2.1691620349884033e-03</internalNodes>\n          <leafValues>\n            1.4331200718879700e-01 -3.5120349377393723e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6677 -5.0005540251731873e-02</internalNodes>\n          <leafValues>\n            2.1500219404697418e-01 -2.7628419920802116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6678 1.3818169943988323e-02</internalNodes>\n          <leafValues>\n            2.2208500653505325e-02 -2.6048558950424194e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6679 -1.1389379948377609e-01</internalNodes>\n          <leafValues>\n            -2.6434680819511414e-01 5.8247619308531284e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6680 1.4204699546098709e-03</internalNodes>\n          <leafValues>\n            -7.1546286344528198e-02 7.0379182696342468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6681 1.2329610064625740e-02</internalNodes>\n          <leafValues>\n            2.9475130140781403e-02 -1.9224089384078979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6682 3.4679430536925793e-03</internalNodes>\n          <leafValues>\n            -6.1920940876007080e-02 9.0893089771270752e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6683 -1.2088479846715927e-01</internalNodes>\n          <leafValues>\n            4.6626859903335571e-01 -2.7361230459064245e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6684 -1.5827519819140434e-02</internalNodes>\n          <leafValues>\n            -9.5342837274074554e-02 5.5003169924020767e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6685 -5.3695850074291229e-03</internalNodes>\n          <leafValues>\n            1.6891020536422729e-01 -4.6700950711965561e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6686 5.2695080637931824e-02</internalNodes>\n          <leafValues>\n            -5.6889699772000313e-03 9.0487861633300781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6687 -1.1397979687899351e-03</internalNodes>\n          <leafValues>\n            3.4316681325435638e-02 -7.5787901878356934e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6688 -2.8946578968316317e-03</internalNodes>\n          <leafValues>\n            7.5482390820980072e-02 -7.6466552913188934e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6689 -5.1091420464217663e-03</internalNodes>\n          <leafValues>\n            -1.2294950336217880e-01 4.9972750246524811e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6690 1.8837359966710210e-03</internalNodes>\n          <leafValues>\n            4.3406400829553604e-02 -1.2572230398654938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6691 1.5422919765114784e-02</internalNodes>\n          <leafValues>\n            1.5831289812922478e-02 -2.0917390286922455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6692 2.1666040644049644e-02</internalNodes>\n          <leafValues>\n            -2.4713400751352310e-02 2.4171669781208038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6693 -9.4336412847042084e-02</internalNodes>\n          <leafValues>\n            8.0389547348022461e-01 -2.6913180481642485e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6694 -6.0154758393764496e-03</internalNodes>\n          <leafValues>\n            -1.3231749832630157e-01 4.9613710492849350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6695 4.3775320053100586e-02</internalNodes>\n          <leafValues>\n            4.5396219938993454e-03 -5.8732748031616211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6696 1.0561950039118528e-03</internalNodes>\n          <leafValues>\n            -8.8057562708854675e-02 7.1294106543064117e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6697 -1.6394529957324266e-03</internalNodes>\n          <leafValues>\n            9.0810842812061310e-02 -3.7760701030492783e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6698 2.6742160320281982e-01</internalNodes>\n          <leafValues>\n            9.4182817265391350e-03 -5.2740138769149780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6699 -2.1629330515861511e-01</internalNodes>\n          <leafValues>\n            -6.1128187179565430e-01 5.2118571475148201e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6700 -2.6974570751190186e-01</internalNodes>\n          <leafValues>\n            -7.3394459486007690e-01 6.0041057877242565e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6701 -6.0050850734114647e-03</internalNodes>\n          <leafValues>\n            1.1067090183496475e-01 -2.0614199340343475e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6702 4.9247939139604568e-02</internalNodes>\n          <leafValues>\n            1.0287189856171608e-02 -4.9581390619277954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6703 4.9235569313168526e-03</internalNodes>\n          <leafValues>\n            1.4880360104143620e-02 -1.1287470161914825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6704 -8.2946997135877609e-03</internalNodes>\n          <leafValues>\n            5.6476062536239624e-01 -1.0442149825394154e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6705 2.3567330092191696e-02</internalNodes>\n          <leafValues>\n            -2.9235871043056250e-03 2.4979250133037567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6706 -4.1040919721126556e-02</internalNodes>\n          <leafValues>\n            4.0030491352081299e-01 -1.3312620110809803e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6707 -5.3690220229327679e-03</internalNodes>\n          <leafValues>\n            -2.9186370968818665e-01 1.6781600192189217e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6708 3.6616099532693624e-03</internalNodes>\n          <leafValues>\n            -4.7920960932970047e-02 1.0898339748382568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6709 -2.4735789746046066e-02</internalNodes>\n          <leafValues>\n            6.7270919680595398e-02 -1.6207970678806305e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6710 8.6064152419567108e-03</internalNodes>\n          <leafValues>\n            -6.0250200331211090e-02 1.0674320161342621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6711 -3.3892609179019928e-02</internalNodes>\n          <leafValues>\n            -1.9795329868793488e-01 1.9014969468116760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6712 1.0522030293941498e-01</internalNodes>\n          <leafValues>\n            6.0530952177941799e-03 -7.5238007307052612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6713 -5.9583578258752823e-03</internalNodes>\n          <leafValues>\n            9.9094383418560028e-02 -3.5570640116930008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6714 2.7306210249662399e-03</internalNodes>\n          <leafValues>\n            -8.8879808783531189e-02 6.4843989908695221e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6715 4.3243571417406201e-04</internalNodes>\n          <leafValues>\n            3.2528489828109741e-02 -9.1479070484638214e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6716 -5.2608880214393139e-03</internalNodes>\n          <leafValues>\n            1.3896170258522034e-01 -4.0624819695949554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6717 -1.5605129301548004e-01</internalNodes>\n          <leafValues>\n            -7.3170071840286255e-01 2.5103189982473850e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6718 -1.1245990172028542e-02</internalNodes>\n          <leafValues>\n            -1.1834110319614410e-01 5.2261721342802048e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6719 -9.2654878972098231e-04</internalNodes>\n          <leafValues>\n            4.3350778520107269e-02 -7.6521359384059906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6720 1.5148459933698177e-03</internalNodes>\n          <leafValues>\n            -7.1485839784145355e-02 7.3206916451454163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6721 4.6230577863752842e-03</internalNodes>\n          <leafValues>\n            2.0211879163980484e-02 -4.6565961092710495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6722 1.2555140256881714e-01</internalNodes>\n          <leafValues>\n            9.2135155573487282e-03 -5.4831707477569580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6723 4.0751680731773376e-02</internalNodes>\n          <leafValues>\n            -4.5771248638629913e-02 5.6990999728441238e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6724 -2.2074349224567413e-02</internalNodes>\n          <leafValues>\n            -3.9075499773025513e-01 1.1654710397124290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6725 1.2412919849157333e-01</internalNodes>\n          <leafValues>\n            -6.0688108205795288e-03 2.6376709342002869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6726 6.0741119086742401e-03</internalNodes>\n          <leafValues>\n            1.0768520087003708e-01 -5.0139870494604111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6727 -1.4694149792194366e-01</internalNodes>\n          <leafValues>\n            -4.3452548980712891e-01 5.5836569517850876e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6728 -1.2046460062265396e-01</internalNodes>\n          <leafValues>\n            -5.4068279266357422e-01 9.8318615928292274e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6729 -9.0990159660577774e-03</internalNodes>\n          <leafValues>\n            -1.3625259697437286e-01 9.5357475802302361e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6730 1.0966449975967407e-02</internalNodes>\n          <leafValues>\n            -3.1344298273324966e-02 1.7068630456924438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6731 -2.1763380616903305e-02</internalNodes>\n          <leafValues>\n            7.3918178677558899e-02 -1.7846420407295227e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6732 -4.9578789621591568e-02</internalNodes>\n          <leafValues>\n            -5.8034032583236694e-01 1.0063209570944309e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6733 -6.6796392202377319e-03</internalNodes>\n          <leafValues>\n            -4.7280300408601761e-02 3.8668069988489151e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6734 -1.0112039744853973e-03</internalNodes>\n          <leafValues>\n            4.5412030071020126e-02 -1.4603359997272491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6735 2.5813570246100426e-03</internalNodes>\n          <leafValues>\n            3.1112480908632278e-02 -1.0001499950885773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6736 2.0418369676917791e-03</internalNodes>\n          <leafValues>\n            4.8378061503171921e-02 -1.4722709357738495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6737 5.6246068328619003e-02</internalNodes>\n          <leafValues>\n            3.7779449485242367e-03 -6.1013627052307129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6738 -2.6130750775337219e-02</internalNodes>\n          <leafValues>\n            2.6240581274032593e-01 -2.4313600733876228e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6739 -1.2151029892265797e-02</internalNodes>\n          <leafValues>\n            -5.6114129722118378e-02 2.9739160090684891e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6740 -5.1036469638347626e-02</internalNodes>\n          <leafValues>\n            2.7955740690231323e-01 -2.1683510392904282e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6741 8.7444618344306946e-02</internalNodes>\n          <leafValues>\n            -3.7635879125446081e-03 5.2711361646652222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6742 3.4982790239155293e-03</internalNodes>\n          <leafValues>\n            5.6673228740692139e-02 -9.2554636299610138e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6743 9.7861722111701965e-02</internalNodes>\n          <leafValues>\n            3.7442990578711033e-03 -5.4237729310989380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6744 -6.3886200077831745e-03</internalNodes>\n          <leafValues>\n            -9.7468167543411255e-02 6.0299299657344818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6745 -1.0128310322761536e-01</internalNodes>\n          <leafValues>\n            -6.5173667669296265e-01 3.4321940038353205e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6746 -3.9312228560447693e-02</internalNodes>\n          <leafValues>\n            2.6476991176605225e-01 -2.6981310918927193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6747 1.1417990177869797e-01</internalNodes>\n          <leafValues>\n            7.5375889427959919e-03 -6.8553638458251953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6748 8.4078265354037285e-03</internalNodes>\n          <leafValues>\n            -3.0973089858889580e-02 1.7200429737567902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6749 -1.5489499783143401e-03</internalNodes>\n          <leafValues>\n            4.6454809606075287e-02 -6.9261766970157623e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6750 2.9730569804087281e-04</internalNodes>\n          <leafValues>\n            3.7772700190544128e-02 -1.3767069578170776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6751 2.8460770845413208e-03</internalNodes>\n          <leafValues>\n            -4.3182320892810822e-02 9.9634610116481781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6752 4.9144420772790909e-02</internalNodes>\n          <leafValues>\n            5.9465290978550911e-03 -8.2366597652435303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6753 1.0286020115017891e-02</internalNodes>\n          <leafValues>\n            2.8591090813279152e-02 -1.5941999852657318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6754 1.9976280629634857e-02</internalNodes>\n          <leafValues>\n            -2.9617030173540115e-02 1.5943069756031036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6755 2.3533409461379051e-02</internalNodes>\n          <leafValues>\n            7.5594270601868629e-03 -2.3041130602359772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6756 -9.0482197701931000e-03</internalNodes>\n          <leafValues>\n            -1.2408699840307236e-01 4.1615001857280731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6757 -3.8635660894215107e-03</internalNodes>\n          <leafValues>\n            8.7811216711997986e-02 -4.1511181741952896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6758 -2.7298410423099995e-03</internalNodes>\n          <leafValues>\n            9.4712667167186737e-02 -5.2838958799839020e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6759 -4.5442068949341774e-03</internalNodes>\n          <leafValues>\n            -1.0748460143804550e-01 1.7744770273566246e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6760 2.3271010722965002e-03</internalNodes>\n          <leafValues>\n            -8.3826236426830292e-02 5.7210709899663925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6761 -1.2409550137817860e-02</internalNodes>\n          <leafValues>\n            2.3100300133228302e-01 -2.2110419347882271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6762 -4.5268908143043518e-03</internalNodes>\n          <leafValues>\n            -1.6244150698184967e-01 3.2564349472522736e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6763 -4.4666860048891976e-05</internalNodes>\n          <leafValues>\n            2.4341119825839996e-01 -2.6702800765633583e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6764 7.7015289571136236e-04</internalNodes>\n          <leafValues>\n            -1.2858650088310242e-01 4.2308151721954346e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6765 4.4863048940896988e-02</internalNodes>\n          <leafValues>\n            1.0781999677419662e-02 -3.5814240574836731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6766 3.7869490683078766e-02</internalNodes>\n          <leafValues>\n            -1.4966360293328762e-02 3.4195008873939514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6767 -8.3092376589775085e-03</internalNodes>\n          <leafValues>\n            -2.7514660358428955e-01 2.0139539614319801e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6768 -4.3290119618177414e-02</internalNodes>\n          <leafValues>\n            3.0036559700965881e-01 -1.9493019208312035e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6769 -1.0075629688799381e-02</internalNodes>\n          <leafValues>\n            -1.2262579798698425e-01 9.1246366500854492e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6770 -3.3486529719084501e-03</internalNodes>\n          <leafValues>\n            1.1790259927511215e-01 -4.1050188243389130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6771 -6.4645247766748071e-04</internalNodes>\n          <leafValues>\n            -7.8154936432838440e-02 4.6990569680929184e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6772 3.5247370600700378e-02</internalNodes>\n          <leafValues>\n            1.0365270078182220e-02 -5.1507127285003662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6773 3.5965928691439331e-04</internalNodes>\n          <leafValues>\n            -7.7936813235282898e-02 3.0275240540504456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6774 -1.5898740384727716e-03</internalNodes>\n          <leafValues>\n            -1.0594320297241211e-01 5.0036150962114334e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6775 -2.1408300846815109e-02</internalNodes>\n          <leafValues>\n            1.1649339646100998e-01 -3.7540700286626816e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6776 -2.7612380217760801e-03</internalNodes>\n          <leafValues>\n            3.4751810133457184e-02 -1.3718530535697937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6777 6.4307968132197857e-03</internalNodes>\n          <leafValues>\n            -1.3667429797351360e-02 1.4938560128211975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6778 -6.9555612280964851e-03</internalNodes>\n          <leafValues>\n            -1.2171459943056107e-01 5.6100189685821533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6779 -2.7654969692230225e-01</internalNodes>\n          <leafValues>\n            -8.5077387094497681e-01 3.8885050453245640e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6780 4.7567309811711311e-03</internalNodes>\n          <leafValues>\n            -6.5594427287578583e-02 7.5947061181068420e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6781 8.9218050241470337e-02</internalNodes>\n          <leafValues>\n            6.5016360022127628e-03 -3.2032990455627441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6782 6.7748151719570160e-02</internalNodes>\n          <leafValues>\n            -1.1878870427608490e-02 4.4954490661621094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6783 4.5336190611124039e-02</internalNodes>\n          <leafValues>\n            7.4317739345133305e-03 -4.3144878745079041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6784 1.0965850204229355e-02</internalNodes>\n          <leafValues>\n            2.5135010480880737e-02 -2.0359070599079132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6785 -6.5938562154769897e-02</internalNodes>\n          <leafValues>\n            4.5524141192436218e-01 -7.5815711170434952e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6786 -4.2270109057426453e-02</internalNodes>\n          <leafValues>\n            3.8470050692558289e-01 -1.1672279797494411e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6787 -6.3518402166664600e-03</internalNodes>\n          <leafValues>\n            -8.7010167539119720e-02 3.4159921109676361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6788 3.2269880175590515e-02</internalNodes>\n          <leafValues>\n            -4.0711440145969391e-02 1.2469469755887985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6789 -3.9068311452865601e-02</internalNodes>\n          <leafValues>\n            -1.0403119772672653e-01 6.7032999359071255e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6790 -1.0384949855506420e-03</internalNodes>\n          <leafValues>\n            5.8422528207302094e-02 -1.0154890269041061e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6791 2.9740650206804276e-02</internalNodes>\n          <leafValues>\n            1.2596059590578079e-02 -1.5170450508594513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6792 5.3193639032542706e-03</internalNodes>\n          <leafValues>\n            -4.6843089163303375e-02 1.1005250364542007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6793 -3.2385820522904396e-03</internalNodes>\n          <leafValues>\n            -1.0309839993715286e-01 5.0686061382293701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6794 4.2344750836491585e-03</internalNodes>\n          <leafValues>\n            -4.9582429230213165e-02 1.2092150002717972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6795 -7.4786663055419922e-02</internalNodes>\n          <leafValues>\n            -4.6895131468772888e-01 3.8582859560847282e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6796 8.5299033671617508e-03</internalNodes>\n          <leafValues>\n            3.8806159049272537e-02 -1.2022049725055695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6797 -4.8662569373846054e-02</internalNodes>\n          <leafValues>\n            1.6113990545272827e-01 -1.1717130430042744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6798 -1.3677199603989720e-03</internalNodes>\n          <leafValues>\n            -8.5303716361522675e-02 5.5394109338521957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6799 -5.8111362159252167e-03</internalNodes>\n          <leafValues>\n            4.7039270401000977e-02 -5.1736868917942047e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6800 -3.9951619692146778e-03</internalNodes>\n          <leafValues>\n            -7.8167162835597992e-02 6.3919343054294586e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6801 3.0817699152976274e-03</internalNodes>\n          <leafValues>\n            -6.9289833307266235e-02 2.8242539614439011e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6802 -4.6279471367597580e-02</internalNodes>\n          <leafValues>\n            -3.4760490059852600e-01 1.3878909870982170e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6803 -1.8725780770182610e-02</internalNodes>\n          <leafValues>\n            1.5222269296646118e-01 -1.5724090859293938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6804 -2.1445369347929955e-02</internalNodes>\n          <leafValues>\n            -3.5962730646133423e-01 1.2764260172843933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6805 -9.1003477573394775e-02</internalNodes>\n          <leafValues>\n            -7.9615950584411621e-01 4.9090441316366196e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6806 2.5607119314372540e-03</internalNodes>\n          <leafValues>\n            -5.4551690816879272e-02 8.4403410553932190e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6807 -1.3662099838256836e-02</internalNodes>\n          <leafValues>\n            9.4987250864505768e-02 -6.2036819756031036e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6808 9.2437807470560074e-03</internalNodes>\n          <leafValues>\n            5.3822331130504608e-02 -9.9236510694026947e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6809 -1.4612140133976936e-02</internalNodes>\n          <leafValues>\n            -1.5248660743236542e-01 4.2905550450086594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6810 -3.9584659039974213e-02</internalNodes>\n          <leafValues>\n            1.5883240103721619e-01 -3.5484429448843002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6811 -6.7460699938237667e-03</internalNodes>\n          <leafValues>\n            1.1749260127544403e-01 -3.7934441119432449e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6812 2.0449559669941664e-03</internalNodes>\n          <leafValues>\n            6.1626188457012177e-02 -9.4409346580505371e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6813 -1.5146560035645962e-02</internalNodes>\n          <leafValues>\n            -3.3887571096420288e-01 6.8320450372993946e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6814 -2.0916219800710678e-03</internalNodes>\n          <leafValues>\n            -1.4829570055007935e-01 3.3358350396156311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6815 1.3274390250444412e-02</internalNodes>\n          <leafValues>\n            -3.8169000297784805e-02 4.6379629522562027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6816 1.2404330074787140e-02</internalNodes>\n          <leafValues>\n            -1.8498679623007774e-02 2.7952960133552551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6817 -2.3678259924054146e-02</internalNodes>\n          <leafValues>\n            -4.7142859548330307e-02 2.3141339421272278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6818 6.7575983703136444e-02</internalNodes>\n          <leafValues>\n            -1.8598400056362152e-02 2.7481150627136230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6819 7.6359122991561890e-02</internalNodes>\n          <leafValues>\n            2.9178129509091377e-02 -2.0572820305824280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6820 -1.0918889939785004e-01</internalNodes>\n          <leafValues>\n            6.2577211856842041e-01 -9.8246810957789421e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6821 1.2964319903403521e-03</internalNodes>\n          <leafValues>\n            -3.1776499003171921e-02 6.7833930253982544e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6822 4.1218679398298264e-02</internalNodes>\n          <leafValues>\n            8.5701625794172287e-03 -5.8379119634628296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6823 -1.8773629562929273e-03</internalNodes>\n          <leafValues>\n            5.3263541311025620e-02 -4.1702788323163986e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6824 -2.9402649961411953e-03</internalNodes>\n          <leafValues>\n            8.6931921541690826e-02 -7.1344070136547089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6825 -3.0833749100565910e-02</internalNodes>\n          <leafValues>\n            -3.9439570903778076e-01 6.0907239094376564e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6826 -3.7960989866405725e-03</internalNodes>\n          <leafValues>\n            7.4150532484054565e-02 -6.1881281435489655e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6827 -6.3087488524615765e-03</internalNodes>\n          <leafValues>\n            -1.1662469804286957e-01 2.5016760453581810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6828 4.0001370944082737e-03</internalNodes>\n          <leafValues>\n            -5.7236731052398682e-02 9.7589701414108276e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6829 6.7752957344055176e-02</internalNodes>\n          <leafValues>\n            9.5101362094283104e-03 -3.3777019381523132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6830 -9.2353783547878265e-02</internalNodes>\n          <leafValues>\n            7.9015249013900757e-01 -6.2939748167991638e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6831 -2.4050839245319366e-02</internalNodes>\n          <leafValues>\n            -1.5585710108280182e-01 1.8099930137395859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6832 3.2272089738398790e-03</internalNodes>\n          <leafValues>\n            -4.7936741262674332e-02 1.0735899955034256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6833 -7.2444709949195385e-03</internalNodes>\n          <leafValues>\n            9.6775539219379425e-02 -2.4095900356769562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6834 -1.0888259857892990e-01</internalNodes>\n          <leafValues>\n            -8.1255799531936646e-01 6.0875630006194115e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6835 -1.4077230356633663e-02</internalNodes>\n          <leafValues>\n            -1.3358989357948303e-01 2.5421140715479851e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6836 -3.0071370303630829e-02</internalNodes>\n          <leafValues>\n            3.5427039861679077e-01 -1.3553430326282978e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6837 3.4985799342393875e-02</internalNodes>\n          <leafValues>\n            -3.0686240643262863e-03 4.6311178803443909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6838 1.8354769796133041e-02</internalNodes>\n          <leafValues>\n            1.1218019761145115e-02 -4.6143579483032227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6839 -6.4306408166885376e-02</internalNodes>\n          <leafValues>\n            -6.1207151412963867e-01 1.9155009649693966e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6840 8.2096129655838013e-02</internalNodes>\n          <leafValues>\n            -8.8210906833410263e-03 5.4885977506637573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6841 7.7698810491710901e-04</internalNodes>\n          <leafValues>\n            1.3247950375080109e-01 -3.3915128558874130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6842 6.4568981528282166e-02</internalNodes>\n          <leafValues>\n            6.4043831080198288e-03 -7.7150177955627441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6843 -1.5833489596843719e-02</internalNodes>\n          <leafValues>\n            -1.9498950242996216e-01 7.5541301630437374e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6844 3.4125618636608124e-02</internalNodes>\n          <leafValues>\n            -1.5915289521217346e-02 2.9716441035270691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6845 -1.2615050189197063e-02</internalNodes>\n          <leafValues>\n            -2.4650709331035614e-01 2.2699799388647079e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6846 1.8272679299116135e-02</internalNodes>\n          <leafValues>\n            -4.0593959391117096e-02 1.1693490296602249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6847 -6.6374349407851696e-03</internalNodes>\n          <leafValues>\n            -1.4557109773159027e-01 3.5353910177946091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6848 -2.6520919054746628e-03</internalNodes>\n          <leafValues>\n            7.6382592320442200e-02 -6.6688627004623413e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6849 2.2452129051089287e-03</internalNodes>\n          <leafValues>\n            -8.9759878814220428e-02 5.5091369897127151e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6850 -4.4775419519282877e-04</internalNodes>\n          <leafValues>\n            2.1264159679412842e-01 -2.6620639488101006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6851 -1.1115259677171707e-01</internalNodes>\n          <leafValues>\n            -4.3139949440956116e-01 4.6484731137752533e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6852 -1.1578770354390144e-02</internalNodes>\n          <leafValues>\n            -3.5296261310577393e-01 1.2750539928674698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6853 -2.5290170684456825e-02</internalNodes>\n          <leafValues>\n            5.1385980844497681e-01 -6.7363809794187546e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6854 -3.2232340425252914e-02</internalNodes>\n          <leafValues>\n            -5.7690191268920898e-01 7.7741048298776150e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6855 -4.1698799468576908e-03</internalNodes>\n          <leafValues>\n            -1.7519310116767883e-01 1.1018699966371059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6856 -2.0664500072598457e-02</internalNodes>\n          <leafValues>\n            2.5821951031684875e-01 -1.7920289188623428e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6857 -1.0834420099854469e-03</internalNodes>\n          <leafValues>\n            -1.3178519904613495e-01 2.5419749319553375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6858 -9.5458701252937317e-03</internalNodes>\n          <leafValues>\n            4.4964689016342163e-01 -1.1315030045807362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6859 5.3232181817293167e-02</internalNodes>\n          <leafValues>\n            7.4498020112514496e-03 -6.8122059106826782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6860 -1.3852520287036896e-01</internalNodes>\n          <leafValues>\n            -6.0117882490158081e-01 6.5434179268777370e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6861 1.7173439264297485e-02</internalNodes>\n          <leafValues>\n            -2.5120509788393974e-02 8.6516633629798889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6862 3.9947189390659332e-02</internalNodes>\n          <leafValues>\n            5.8647249825298786e-03 -7.4653059244155884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6863 2.0647009834647179e-02</internalNodes>\n          <leafValues>\n            -1.0226000100374222e-02 1.7227609455585480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6864 -1.8602909985929728e-03</internalNodes>\n          <leafValues>\n            -6.5767973661422729e-02 6.9248490035533905e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6865 -3.4106068313121796e-02</internalNodes>\n          <leafValues>\n            1.5908730030059814e-01 -1.3241630047559738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6866 6.3425069674849510e-03</internalNodes>\n          <leafValues>\n            3.5119149833917618e-02 -1.3436080515384674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6867 1.6866199439391494e-03</internalNodes>\n          <leafValues>\n            -4.3401770293712616e-02 5.0606630742549896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6868 -3.0595089774578810e-03</internalNodes>\n          <leafValues>\n            5.6976709514856339e-02 -8.1074528396129608e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6869 2.7664829976856709e-03</internalNodes>\n          <leafValues>\n            2.0497009158134460e-02 -8.0963827669620514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6870 -3.2909188885241747e-03</internalNodes>\n          <leafValues>\n            -1.0803789645433426e-01 4.6237960457801819e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6871 1.7244400456547737e-02</internalNodes>\n          <leafValues>\n            -2.5127060711383820e-02 2.4591030180454254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6872 9.1161586344242096e-02</internalNodes>\n          <leafValues>\n            1.0174980387091637e-02 -4.6983879804611206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6873 2.5459621101617813e-03</internalNodes>\n          <leafValues>\n            -3.0003750696778297e-02 1.4800469577312469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6874 1.7582690343260765e-03</internalNodes>\n          <leafValues>\n            5.4400689899921417e-02 -7.7444270253181458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6875 -1.6833960544317961e-03</internalNodes>\n          <leafValues>\n            8.1838123500347137e-02 -4.3751198798418045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6876 -7.6617579907178879e-04</internalNodes>\n          <leafValues>\n            -1.3564400374889374e-01 3.6041948944330215e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6877 1.1155450483784080e-03</internalNodes>\n          <leafValues>\n            -4.8263888806104660e-02 5.0273448228836060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6878 -2.6005289983004332e-03</internalNodes>\n          <leafValues>\n            8.8793486356735229e-02 -5.4554209113121033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6879 -3.2424980308860540e-03</internalNodes>\n          <leafValues>\n            -1.3159190118312836e-01 3.4248508512973785e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6880 -1.4817930059507489e-04</internalNodes>\n          <leafValues>\n            3.7875428795814514e-02 -1.2225220352411270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6881 1.1546639725565910e-02</internalNodes>\n          <leafValues>\n            1.5370969660580158e-02 -1.0286240279674530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6882 2.4446300230920315e-03</internalNodes>\n          <leafValues>\n            -5.1783051341772079e-02 1.0735079646110535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6883 4.5723789371550083e-03</internalNodes>\n          <leafValues>\n            -3.6362100392580032e-02 1.3289859890937805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6884 -1.1938340030610561e-02</internalNodes>\n          <leafValues>\n            -1.0882350057363510e-01 4.7698900103569031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6885 -4.1671381331980228e-03</internalNodes>\n          <leafValues>\n            1.1637099832296371e-01 -3.0638780444860458e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>399</maxWeakCount>\n      <stageThreshold>-1.2330470085144043e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 6886 3.3659618347883224e-02</internalNodes>\n          <leafValues>\n            -1.5576040744781494e-01 1.9109010696411133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6887 -1.5392389614135027e-03</internalNodes>\n          <leafValues>\n            7.2527736425399780e-02 -2.8808951377868652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6888 1.5648789703845978e-03</internalNodes>\n          <leafValues>\n            -1.1329220235347748e-01 1.5057389438152313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6889 5.6565739214420319e-04</internalNodes>\n          <leafValues>\n            -4.0502288937568665e-01 3.0235100537538528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6890 -2.9683491447940469e-04</internalNodes>\n          <leafValues>\n            -1.2592320144176483e-01 1.0352999716997147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6891 4.3946141377091408e-03</internalNodes>\n          <leafValues>\n            -1.0582420229911804e-01 2.3163750767707825e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6892 3.2444300595670938e-03</internalNodes>\n          <leafValues>\n            5.0188560038805008e-02 -2.5477260351181030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6893 3.8864749949425459e-03</internalNodes>\n          <leafValues>\n            -1.4332659542560577e-01 2.9871070757508278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6894 3.3563380129635334e-03</internalNodes>\n          <leafValues>\n            -1.8739770352840424e-01 6.1354521661996841e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6895 1.9797699525952339e-02</internalNodes>\n          <leafValues>\n            2.7567919343709946e-02 -7.3189876973628998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6896 3.3829871099442244e-03</internalNodes>\n          <leafValues>\n            -2.6915690302848816e-01 4.7561220824718475e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6897 5.0223460420966148e-03</internalNodes>\n          <leafValues>\n            4.2572669684886932e-02 -2.0097489655017853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6898 1.4903279952704906e-03</internalNodes>\n          <leafValues>\n            -1.0160639882087708e-01 1.1291279643774033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6899 -5.5050072260200977e-03</internalNodes>\n          <leafValues>\n            -2.1760410070419312e-01 2.5067379698157310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6900 4.1127130389213562e-03</internalNodes>\n          <leafValues>\n            -1.3703300058841705e-01 6.6536687314510345e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6901 1.9442260265350342e-02</internalNodes>\n          <leafValues>\n            4.2253911495208740e-02 -1.1731100082397461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6902 -1.9445870071649551e-02</internalNodes>\n          <leafValues>\n            2.8616631031036377e-01 -3.0423089861869812e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6903 -1.5500449808314443e-03</internalNodes>\n          <leafValues>\n            -1.5157119929790497e-01 6.3723236322402954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6904 -3.2575910445302725e-03</internalNodes>\n          <leafValues>\n            6.1063949018716812e-02 -1.3006690144538879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6905 8.5774611216038465e-04</internalNodes>\n          <leafValues>\n            -6.2051288783550262e-02 5.4809290915727615e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6906 6.8592262687161565e-04</internalNodes>\n          <leafValues>\n            -9.2828713357448578e-02 9.2287853360176086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6907 4.8905659466981888e-02</internalNodes>\n          <leafValues>\n            -1.2098040431737900e-02 2.4674870073795319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6908 -4.6415459364652634e-03</internalNodes>\n          <leafValues>\n            -1.7103439569473267e-01 5.1900148391723633e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6909 -9.9253775551915169e-03</internalNodes>\n          <leafValues>\n            1.6824729740619659e-01 -4.3742731213569641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6910 -7.2820088826119900e-04</internalNodes>\n          <leafValues>\n            -1.5762010216712952e-01 4.9283239990472794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6911 7.1829417720437050e-03</internalNodes>\n          <leafValues>\n            -7.5083851814270020e-02 1.5677660703659058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6912 7.4819842120632529e-04</internalNodes>\n          <leafValues>\n            9.4303682446479797e-02 -9.4410486519336700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6913 1.3856319710612297e-02</internalNodes>\n          <leafValues>\n            4.2250029742717743e-02 -2.4046279489994049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6914 -5.0514908507466316e-03</internalNodes>\n          <leafValues>\n            2.0170919597148895e-01 -4.4972479343414307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6915 -2.5696419179439545e-03</internalNodes>\n          <leafValues>\n            -1.4004689455032349e-01 4.1754510253667831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6916 5.4275751113891602e-02</internalNodes>\n          <leafValues>\n            -2.6094799861311913e-02 2.8374740481376648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6917 -3.7299469113349915e-02</internalNodes>\n          <leafValues>\n            -5.8281177282333374e-01 1.3501949608325958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6918 3.0674990266561508e-03</internalNodes>\n          <leafValues>\n            5.6224178522825241e-02 -1.1995050311088562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6919 -3.5402809735387564e-03</internalNodes>\n          <leafValues>\n            6.6515468060970306e-02 -1.1834269762039185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6920 4.1401982307434082e-03</internalNodes>\n          <leafValues>\n            2.0988019183278084e-02 -3.1807440519332886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6921 -1.1183559894561768e-02</internalNodes>\n          <leafValues>\n            1.2467139959335327e-01 -4.1797909885644913e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6922 1.0800679447129369e-03</internalNodes>\n          <leafValues>\n            4.5548491179943085e-02 -1.5857310593128204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6923 -7.7602718956768513e-03</internalNodes>\n          <leafValues>\n            -1.7031720280647278e-01 3.3989530056715012e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6924 -3.1192360911518335e-03</internalNodes>\n          <leafValues>\n            9.6817880868911743e-02 -8.6022533476352692e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6925 -1.3673380017280579e-02</internalNodes>\n          <leafValues>\n            -2.2536599636077881e-01 1.5587169677019119e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6926 -2.0611209329217672e-03</internalNodes>\n          <leafValues>\n            -1.5269860625267029e-01 5.0227679312229156e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6927 2.2635459899902344e-03</internalNodes>\n          <leafValues>\n            -4.2889460921287537e-02 7.6818563044071198e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6928 -3.4530080854892731e-02</internalNodes>\n          <leafValues>\n            1.2874439358711243e-01 -6.7660316824913025e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6929 6.1309239827096462e-03</internalNodes>\n          <leafValues>\n            -6.3456058502197266e-02 6.4237646758556366e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6930 -1.0171280242502689e-02</internalNodes>\n          <leafValues>\n            -2.9192021489143372e-01 2.6645509526133537e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6931 -1.3060650229454041e-01</internalNodes>\n          <leafValues>\n            -9.6297067403793335e-01 1.5367489540949464e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6932 6.8621779792010784e-03</internalNodes>\n          <leafValues>\n            -4.7239519655704498e-02 1.5440399944782257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6933 1.2950079981237650e-03</internalNodes>\n          <leafValues>\n            -7.1122348308563232e-02 5.8697238564491272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6934 -5.6443549692630768e-03</internalNodes>\n          <leafValues>\n            -1.7261339724063873e-01 4.4769309461116791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6935 1.6346110403537750e-01</internalNodes>\n          <leafValues>\n            -2.1536830812692642e-02 3.6825808882713318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6936 1.4170600101351738e-02</internalNodes>\n          <leafValues>\n            2.3462019860744476e-02 -3.0498749017715454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6937 -1.0679910331964493e-01</internalNodes>\n          <leafValues>\n            3.1485679745674133e-01 -9.1049326583743095e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6938 7.0258649066090584e-03</internalNodes>\n          <leafValues>\n            -6.5418191254138947e-02 1.0200239717960358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6939 -4.3358937837183475e-03</internalNodes>\n          <leafValues>\n            1.1601199954748154e-01 -5.5041059851646423e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6940 3.5394240170717239e-02</internalNodes>\n          <leafValues>\n            2.7795480564236641e-02 -2.5534549355506897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6941 2.1599680185317993e-02</internalNodes>\n          <leafValues>\n            -1.0513960383832455e-02 2.6087591052055359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6942 4.3032150715589523e-03</internalNodes>\n          <leafValues>\n            -4.6745400875806808e-02 1.3318620622158051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6943 7.8372862190008163e-03</internalNodes>\n          <leafValues>\n            6.1899811029434204e-02 -1.2405169755220413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6944 -1.6856989823281765e-03</internalNodes>\n          <leafValues>\n            -9.5696307718753815e-02 7.7667310833930969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6945 -4.1602249257266521e-03</internalNodes>\n          <leafValues>\n            6.5850533545017242e-02 -7.6837591826915741e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6946 -5.0864819437265396e-02</internalNodes>\n          <leafValues>\n            5.2419060468673706e-01 -1.7342429608106613e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6947 -6.4477883279323578e-02</internalNodes>\n          <leafValues>\n            -4.1972258687019348e-01 1.2231100350618362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6948 -2.4949579965323210e-03</internalNodes>\n          <leafValues>\n            6.4242206513881683e-02 -9.7457312047481537e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6949 3.2167730387300253e-03</internalNodes>\n          <leafValues>\n            -3.7902288138866425e-02 8.2197092473506927e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6950 -2.3393060546368361e-03</internalNodes>\n          <leafValues>\n            -1.0608460009098053e-01 7.2004899382591248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6951 -8.0535542219877243e-03</internalNodes>\n          <leafValues>\n            -1.0991869866847992e-01 2.5643279775977135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6952 1.5007739886641502e-02</internalNodes>\n          <leafValues>\n            -3.1267128884792328e-02 2.0507030189037323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6953 -4.7144708223640919e-03</internalNodes>\n          <leafValues>\n            -1.4058899879455566e-01 4.8687249422073364e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6954 -2.7188581228256226e-01</internalNodes>\n          <leafValues>\n            -7.7086192369461060e-01 8.2119107246398926e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6955 -3.7261729594320059e-03</internalNodes>\n          <leafValues>\n            7.8386418521404266e-02 -6.1110321432352066e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6956 8.1726117059588432e-03</internalNodes>\n          <leafValues>\n            2.5872390717267990e-02 -2.4203300476074219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6957 -1.5384130179882050e-01</internalNodes>\n          <leafValues>\n            -8.3681619167327881e-01 1.0526239639148116e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6958 -4.2209690436720848e-03</internalNodes>\n          <leafValues>\n            1.0987819731235504e-01 -6.0973130166530609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6959 3.4641180187463760e-02</internalNodes>\n          <leafValues>\n            5.9377611614763737e-03 -7.3021429777145386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6960 -1.0757029522210360e-03</internalNodes>\n          <leafValues>\n            6.3253231346607208e-02 -9.3954533338546753e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6961 6.0506182489916682e-04</internalNodes>\n          <leafValues>\n            -7.2633743286132812e-02 5.4847791790962219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6962 -4.9192002043128014e-03</internalNodes>\n          <leafValues>\n            -1.4617989957332611e-01 4.9854889512062073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6963 5.8641340583562851e-02</internalNodes>\n          <leafValues>\n            -1.4487889595329762e-02 2.1949279308319092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6964 -9.5993638038635254e-02</internalNodes>\n          <leafValues>\n            -4.2456990480422974e-01 1.5611169859766960e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6965 -1.7546750605106354e-01</internalNodes>\n          <leafValues>\n            -5.7154530286788940e-01 2.7310380246490240e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6966 5.3192701190710068e-02</internalNodes>\n          <leafValues>\n            -2.0759610459208488e-02 3.1531611084938049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6967 -3.0862109735608101e-02</internalNodes>\n          <leafValues>\n            -4.0818691253662109e-01 9.1538606211543083e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6968 -2.9243549797683954e-03</internalNodes>\n          <leafValues>\n            1.6538919508457184e-01 -3.7048339843750000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6969 7.9757552593946457e-03</internalNodes>\n          <leafValues>\n            4.0010299533605576e-02 -1.0603089630603790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6970 1.0228200256824493e-01</internalNodes>\n          <leafValues>\n            9.6151717007160187e-03 -6.5299248695373535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6971 2.3435470648109913e-03</internalNodes>\n          <leafValues>\n            -4.3119609355926514e-02 1.1908730119466782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6972 -3.3627110533416271e-03</internalNodes>\n          <leafValues>\n            1.0518670082092285e-01 -6.9644443690776825e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6973 4.9040392041206360e-03</internalNodes>\n          <leafValues>\n            4.8949901014566422e-02 -1.2949359416961670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6974 4.5119290007278323e-05</internalNodes>\n          <leafValues>\n            -1.6148559749126434e-01 4.1733540594577789e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6975 1.6195859760046005e-02</internalNodes>\n          <leafValues>\n            -1.2759320437908173e-02 2.0746350288391113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6976 -6.4254719763994217e-03</internalNodes>\n          <leafValues>\n            -1.3736939430236816e-01 4.3490421026945114e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6977 -6.6467811120674014e-04</internalNodes>\n          <leafValues>\n            6.6771537065505981e-02 -7.4648462235927582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6978 -2.3743628989905119e-03</internalNodes>\n          <leafValues>\n            -1.2377700209617615e-01 5.1728729158639908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6979 -8.3166018128395081e-02</internalNodes>\n          <leafValues>\n            1.5261100232601166e-01 -2.1502759307622910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6980 1.3301270082592964e-03</internalNodes>\n          <leafValues>\n            -6.1925448477268219e-02 1.0591439902782440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6981 9.0925350785255432e-02</internalNodes>\n          <leafValues>\n            6.9404938258230686e-03 -5.1022678613662720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6982 5.7555912062525749e-03</internalNodes>\n          <leafValues>\n            5.2849009633064270e-02 -1.0758169740438461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6983 9.3440711498260498e-04</internalNodes>\n          <leafValues>\n            -1.0605130344629288e-01 4.7824278473854065e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6984 5.2353799343109131e-02</internalNodes>\n          <leafValues>\n            -1.6387209296226501e-02 4.2318668961524963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6985 -2.4307209998369217e-02</internalNodes>\n          <leafValues>\n            1.3521690666675568e-01 -1.0088359937071800e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6986 -1.3722239993512630e-02</internalNodes>\n          <leafValues>\n            -4.9520999193191528e-01 1.1784340254962444e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6987 -1.1442030081525445e-03</internalNodes>\n          <leafValues>\n            4.3818730860948563e-02 -6.9104023277759552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6988 -7.8848190605640411e-02</internalNodes>\n          <leafValues>\n            3.5198599100112915e-01 -1.6464689746499062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6989 1.7305529909208417e-03</internalNodes>\n          <leafValues>\n            -6.6790081560611725e-02 8.2463577389717102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6990 -1.2928839772939682e-02</internalNodes>\n          <leafValues>\n            -8.1002123653888702e-02 8.5223287343978882e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6991 8.7096104398369789e-03</internalNodes>\n          <leafValues>\n            -5.0021901726722717e-02 1.3493220508098602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6992 -6.3483066856861115e-02</internalNodes>\n          <leafValues>\n            -7.7681750059127808e-01 7.0912609808146954e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6993 -4.3746097944676876e-03</internalNodes>\n          <leafValues>\n            -1.3329389691352844e-01 4.2627040296792984e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6994 -4.3985169380903244e-02</internalNodes>\n          <leafValues>\n            1.5131869912147522e-01 -4.0801558643579483e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6995 -6.0488767921924591e-03</internalNodes>\n          <leafValues>\n            -5.3645741194486618e-02 1.7832729965448380e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6996 -5.1487190648913383e-04</internalNodes>\n          <leafValues>\n            6.2102951109409332e-02 -9.5339402556419373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6997 -3.3046479802578688e-03</internalNodes>\n          <leafValues>\n            -2.4732820689678192e-01 2.1977340802550316e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6998 -3.0949179199524224e-04</internalNodes>\n          <leafValues>\n            -3.4656081348657608e-02 1.9599510729312897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6999 -8.3323381841182709e-03</internalNodes>\n          <leafValues>\n            1.7436729371547699e-01 -3.2631549984216690e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7000 6.6935829818248749e-03</internalNodes>\n          <leafValues>\n            2.5050759315490723e-02 -2.7362829446792603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7001 1.4068570453673601e-03</internalNodes>\n          <leafValues>\n            -2.9797010123729706e-02 6.5752580761909485e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7002 4.0725398808717728e-02</internalNodes>\n          <leafValues>\n            1.4967479743063450e-02 -3.7111800909042358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7003 -2.1524120122194290e-02</internalNodes>\n          <leafValues>\n            3.7294471263885498e-01 -1.4142910018563271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7004 4.1689630597829819e-02</internalNodes>\n          <leafValues>\n            8.3227548748254776e-03 -6.6822868585586548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7005 -3.2075429335236549e-03</internalNodes>\n          <leafValues>\n            6.2741018831729889e-02 -1.3061609864234924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7006 2.6418430730700493e-02</internalNodes>\n          <leafValues>\n            6.6760168410837650e-03 -7.5557070970535278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7007 -5.1153838634490967e-02</internalNodes>\n          <leafValues>\n            -5.0382971763610840e-01 2.2476969752460718e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7008 1.5723450342193246e-03</internalNodes>\n          <leafValues>\n            -6.0214620083570480e-02 7.9933151602745056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7009 1.2616170570254326e-03</internalNodes>\n          <leafValues>\n            4.4674988836050034e-02 -8.3830736577510834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7010 -2.8608670458197594e-02</internalNodes>\n          <leafValues>\n            -3.0249071121215820e-01 1.6254810616374016e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7011 1.4726459980010986e-02</internalNodes>\n          <leafValues>\n            -4.9459420144557953e-02 1.1457759886980057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7012 3.5319201648235321e-02</internalNodes>\n          <leafValues>\n            1.1276819743216038e-02 -4.8055538535118103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7013 2.2470189630985260e-01</internalNodes>\n          <leafValues>\n            -1.0596769861876965e-02 5.4026299715042114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7014 -7.0188841782510281e-03</internalNodes>\n          <leafValues>\n            -1.1836989969015121e-01 5.2995279431343079e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7015 -2.9194930568337440e-02</internalNodes>\n          <leafValues>\n            2.8498569130897522e-01 -1.4652130194008350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7016 -1.6918469918891788e-03</internalNodes>\n          <leafValues>\n            6.7731522023677826e-02 -7.4129588901996613e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7017 1.3110489584505558e-02</internalNodes>\n          <leafValues>\n            -4.0418051183223724e-02 9.6537798643112183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7018 7.5334981374908239e-05</internalNodes>\n          <leafValues>\n            -7.3065057396888733e-02 7.1049667894840240e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7019 2.9962710104882717e-03</internalNodes>\n          <leafValues>\n            2.4401130154728889e-02 -1.0679820179939270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7020 -4.1236128658056259e-02</internalNodes>\n          <leafValues>\n            2.5446560978889465e-01 -1.9801229238510132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7021 2.2827479988336563e-03</internalNodes>\n          <leafValues>\n            -5.9622149914503098e-02 8.6871787905693054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7022 -2.1318379731383175e-04</internalNodes>\n          <leafValues>\n            4.0506061166524887e-02 -1.2357629835605621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7023 4.1725938208401203e-03</internalNodes>\n          <leafValues>\n            4.1674789041280746e-02 -1.3029229640960693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7024 -1.7945859581232071e-02</internalNodes>\n          <leafValues>\n            2.5395989418029785e-01 -2.0783929154276848e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7025 -6.0957930982112885e-02</internalNodes>\n          <leafValues>\n            -5.9399938583374023e-01 5.6327730417251587e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7026 -8.3080737385898829e-04</internalNodes>\n          <leafValues>\n            4.8011310398578644e-02 -1.1289869993925095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7027 2.7037229388952255e-02</internalNodes>\n          <leafValues>\n            2.6524379849433899e-02 -1.7208619415760040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7028 3.7293829955160618e-03</internalNodes>\n          <leafValues>\n            -5.0795450806617737e-02 1.1093439906835556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7029 -1.0271129431203008e-03</internalNodes>\n          <leafValues>\n            -8.9025869965553284e-02 4.9861740320920944e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7030 4.3261310202069581e-04</internalNodes>\n          <leafValues>\n            -7.6471529901027679e-02 7.2490736842155457e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7031 -8.3997912704944611e-02</internalNodes>\n          <leafValues>\n            4.0178960561752319e-01 -8.4397885948419571e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7032 -3.4407388884574175e-03</internalNodes>\n          <leafValues>\n            -1.4326460659503937e-01 3.9170410484075546e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7033 -2.1418789401650429e-02</internalNodes>\n          <leafValues>\n            1.5835569798946381e-01 -1.3701870106160641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7034 2.4877830874174833e-03</internalNodes>\n          <leafValues>\n            -5.6875430047512054e-02 1.0218720138072968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7035 -1.0390300303697586e-03</internalNodes>\n          <leafValues>\n            8.1530712544918060e-02 -4.7183711081743240e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7036 4.6788761392235756e-04</internalNodes>\n          <leafValues>\n            7.0995680987834930e-02 -8.8464602828025818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7037 2.7436260133981705e-02</internalNodes>\n          <leafValues>\n            1.5190550126135349e-02 -1.2117669731378555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7038 -5.8917858405038714e-04</internalNodes>\n          <leafValues>\n            -8.1471607089042664e-02 6.8480782210826874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7039 7.9439081251621246e-02</internalNodes>\n          <leafValues>\n            -7.3907868936657906e-03 1.4902259409427643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7040 -3.5153090953826904e-02</internalNodes>\n          <leafValues>\n            4.1942089796066284e-01 -1.2480289675295353e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7041 6.8230971693992615e-02</internalNodes>\n          <leafValues>\n            9.3489149585366249e-03 -2.5965470075607300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7042 8.1733033061027527e-02</internalNodes>\n          <leafValues>\n            1.5513390302658081e-02 -3.2704469561576843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7043 -3.0718350317329168e-03</internalNodes>\n          <leafValues>\n            6.6938467323780060e-02 -4.2225748300552368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7044 5.6301880627870560e-02</internalNodes>\n          <leafValues>\n            -2.5680650025606155e-02 2.1728150546550751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7045 2.5166019797325134e-02</internalNodes>\n          <leafValues>\n            2.3228300735354424e-02 -9.2791043221950531e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7046 6.5088197588920593e-02</internalNodes>\n          <leafValues>\n            6.8949609994888306e-03 -8.2639491558074951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7047 2.2007930092513561e-03</internalNodes>\n          <leafValues>\n            -7.4394248425960541e-02 8.7209381163120270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7048 -8.8553391396999359e-03</internalNodes>\n          <leafValues>\n            -1.3203050196170807e-01 3.7658430635929108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7049 6.0942411422729492e-02</internalNodes>\n          <leafValues>\n            1.0197839699685574e-02 -5.4252862930297852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7050 -5.2589550614356995e-04</internalNodes>\n          <leafValues>\n            4.8835718631744385e-01 -1.1828079819679260e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7051 1.3005370274186134e-03</internalNodes>\n          <leafValues>\n            -3.8898441195487976e-01 1.4226339757442474e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7052 -1.6531689465045929e-01</internalNodes>\n          <leafValues>\n            4.0004518628120422e-01 -1.2666770257055759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7053 1.8595480360090733e-03</internalNodes>\n          <leafValues>\n            4.7802660614252090e-02 -1.1368919909000397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7054 1.3065179809927940e-02</internalNodes>\n          <leafValues>\n            -3.3714219927787781e-02 1.5762269496917725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7055 3.1612750142812729e-02</internalNodes>\n          <leafValues>\n            7.6767429709434509e-03 -5.9641021490097046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7056 -2.2566620260477066e-02</internalNodes>\n          <leafValues>\n            1.0603710263967514e-01 -4.7383170574903488e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7057 6.2679480761289597e-03</internalNodes>\n          <leafValues>\n            3.4595031291246414e-02 -7.7622346580028534e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7058 -3.1758081167936325e-02</internalNodes>\n          <leafValues>\n            -3.2147431373596191e-01 1.5986470505595207e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7059 -2.1477609872817993e-02</internalNodes>\n          <leafValues>\n            2.0527760684490204e-01 -1.8074609339237213e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7060 1.8594050779938698e-02</internalNodes>\n          <leafValues>\n            1.6375590115785599e-02 -2.9955211281776428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7061 1.4604429714381695e-02</internalNodes>\n          <leafValues>\n            -2.0433440804481506e-02 2.2725510597229004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7062 1.9902919884771109e-03</internalNodes>\n          <leafValues>\n            -5.8518249541521072e-02 1.0997360199689865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7063 9.7299525514245033e-03</internalNodes>\n          <leafValues>\n            3.1371861696243286e-02 -4.4369909912347794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7064 -2.3401379585266113e-03</internalNodes>\n          <leafValues>\n            9.6488200128078461e-02 -5.7249929755926132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7065 -1.9590060692280531e-03</internalNodes>\n          <leafValues>\n            -1.4031149446964264e-01 1.3546340167522430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7066 8.4066856652498245e-03</internalNodes>\n          <leafValues>\n            6.6289551556110382e-02 -8.0348283052444458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7067 5.2574548870325089e-02</internalNodes>\n          <leafValues>\n            -3.6297008395195007e-02 1.4638340473175049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7068 4.1065202094614506e-03</internalNodes>\n          <leafValues>\n            3.0372349545359612e-02 -1.8155770003795624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7069 -4.1818427853286266e-03</internalNodes>\n          <leafValues>\n            5.5590789765119553e-02 -3.7148520350456238e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7070 -1.5470250509679317e-03</internalNodes>\n          <leafValues>\n            1.0347150266170502e-01 -4.6374730765819550e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7071 -8.2695618038997054e-04</internalNodes>\n          <leafValues>\n            -9.3296989798545837e-02 4.3734461069107056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7072 4.1385791264474392e-03</internalNodes>\n          <leafValues>\n            -4.4266488403081894e-02 1.0968980193138123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7073 -3.3684119582176208e-02</internalNodes>\n          <leafValues>\n            -6.4337152242660522e-01 7.9893283545970917e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7074 5.2798818796873093e-02</internalNodes>\n          <leafValues>\n            -1.2490300461649895e-02 4.1572460532188416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7075 -2.9699259996414185e-01</internalNodes>\n          <leafValues>\n            -1.9598379731178284e-01 9.4300797209143639e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7076 1.1196310073137283e-01</internalNodes>\n          <leafValues>\n            1.1162719689309597e-02 -4.6838051080703735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7077 -1.8544310703873634e-02</internalNodes>\n          <leafValues>\n            -7.4080787599086761e-02 1.9528210163116455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7078 -1.0937429964542389e-02</internalNodes>\n          <leafValues>\n            8.8206529617309570e-02 -6.2830187380313873e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7079 2.7186619117856026e-03</internalNodes>\n          <leafValues>\n            3.0855480581521988e-02 -9.2405863106250763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7080 2.0727319642901421e-02</internalNodes>\n          <leafValues>\n            -5.2543301135301590e-02 1.0608410090208054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7081 -2.7961930260062218e-02</internalNodes>\n          <leafValues>\n            2.1735160052776337e-01 -2.1356139332056046e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7082 -9.0406360104680061e-03</internalNodes>\n          <leafValues>\n            -1.9535389542579651e-01 3.0077420175075531e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7083 -1.0906349867582321e-02</internalNodes>\n          <leafValues>\n            1.4888639748096466e-01 -3.1188679859042168e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7084 -3.8616119418293238e-03</internalNodes>\n          <leafValues>\n            -1.2094800174236298e-01 4.5144081115722656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7085 4.3162601068615913e-03</internalNodes>\n          <leafValues>\n            -1.0713649913668633e-02 2.8116491436958313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7086 -1.4098359970375896e-03</internalNodes>\n          <leafValues>\n            6.4685508608818054e-02 -9.9471300840377808e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7087 3.2964099664241076e-03</internalNodes>\n          <leafValues>\n            1.4295330643653870e-01 -3.1101010739803314e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7088 -2.9802869539707899e-03</internalNodes>\n          <leafValues>\n            -2.4578930437564850e-01 2.1760260686278343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7089 6.7178793251514435e-02</internalNodes>\n          <leafValues>\n            3.3457649406045675e-03 -4.5685601234436035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7090 2.9182849451899529e-02</internalNodes>\n          <leafValues>\n            -1.7016859725117683e-02 3.3545929193496704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7091 1.7935150535777211e-03</internalNodes>\n          <leafValues>\n            3.0516179278492928e-02 -1.2526740133762360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7092 2.0465679466724396e-02</internalNodes>\n          <leafValues>\n            -1.0909980162978172e-02 4.3552139401435852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7093 -2.6115079526789486e-04</internalNodes>\n          <leafValues>\n            3.8759760558605194e-02 -6.4098693430423737e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7094 3.7161160726100206e-03</internalNodes>\n          <leafValues>\n            3.7150889635086060e-02 -1.5467320382595062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7095 -7.4094999581575394e-03</internalNodes>\n          <leafValues>\n            -8.2704223692417145e-02 6.2809906899929047e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7096 1.7094809561967850e-02</internalNodes>\n          <leafValues>\n            -4.8347331583499908e-02 9.8770812153816223e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7097 -3.0473200604319572e-03</internalNodes>\n          <leafValues>\n            -1.0638830065727234e-01 3.0948650091886520e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7098 3.4502498805522919e-02</internalNodes>\n          <leafValues>\n            1.0997230187058449e-02 -4.2861738801002502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7099 -2.6834919117391109e-03</internalNodes>\n          <leafValues>\n            -1.4986449480056763e-01 3.3157639205455780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7100 9.2392861843109131e-03</internalNodes>\n          <leafValues>\n            -3.7733338773250580e-02 1.5778259932994843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7101 8.8205106556415558e-02</internalNodes>\n          <leafValues>\n            -1.0704769752919674e-02 3.2353109121322632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7102 7.7868886291980743e-02</internalNodes>\n          <leafValues>\n            1.0804659686982632e-02 -4.4243350625038147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7103 -3.1202291138470173e-03</internalNodes>\n          <leafValues>\n            2.0444509387016296e-01 -2.3976439610123634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7104 2.6000461075454950e-03</internalNodes>\n          <leafValues>\n            4.5765019953250885e-02 -1.0138899832963943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7105 7.0194108411669731e-03</internalNodes>\n          <leafValues>\n            2.5740729644894600e-02 -4.9060840159654617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7106 -2.4108150973916054e-03</internalNodes>\n          <leafValues>\n            -1.1837480217218399e-01 4.8649929463863373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7107 4.9886249005794525e-02</internalNodes>\n          <leafValues>\n            -1.4449880458414555e-02 2.0894059538841248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7108 -7.2655039839446545e-03</internalNodes>\n          <leafValues>\n            8.9042186737060547e-02 -4.9845550209283829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7109 1.0560270398855209e-02</internalNodes>\n          <leafValues>\n            5.2911709994077682e-02 -1.1509139835834503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7110 5.6417449377477169e-03</internalNodes>\n          <leafValues>\n            -6.8672746419906616e-02 7.7489316463470459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7111 4.3234648182988167e-03</internalNodes>\n          <leafValues>\n            -7.9207062721252441e-02 5.3491309285163879e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7112 1.1184070259332657e-02</internalNodes>\n          <leafValues>\n            7.1656093001365662e-02 -1.0634940117597580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7113 -9.9230423569679260e-02</internalNodes>\n          <leafValues>\n            3.7169519066810608e-01 -6.6843931563198566e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7114 -4.4848727993667126e-03</internalNodes>\n          <leafValues>\n            7.5577408075332642e-02 -6.9481082260608673e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7115 -1.9104180857539177e-02</internalNodes>\n          <leafValues>\n            -1.7291219532489777e-01 1.1360409669578075e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7116 -1.7672680551186204e-03</internalNodes>\n          <leafValues>\n            9.2567160725593567e-02 -5.2470050752162933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7117 5.9071529656648636e-02</internalNodes>\n          <leafValues>\n            9.2153968289494514e-03 -2.6687648892402649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7118 -3.4362819045782089e-02</internalNodes>\n          <leafValues>\n            -5.7914721965789795e-01 7.9972539097070694e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7119 5.6766539812088013e-02</internalNodes>\n          <leafValues>\n            5.8937501162290573e-03 -5.2275192737579346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7120 -1.2173549830913544e-01</internalNodes>\n          <leafValues>\n            -5.2229601144790649e-01 7.9296948388218880e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7121 3.4274619072675705e-02</internalNodes>\n          <leafValues>\n            -1.7069879919290543e-02 1.2958990037441254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7122 -6.7191021516919136e-03</internalNodes>\n          <leafValues>\n            1.1187720298767090e-01 -4.4685728847980499e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7123 3.1698260456323624e-02</internalNodes>\n          <leafValues>\n            2.8529319912195206e-02 -1.1617069691419601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7124 -9.5326751470565796e-02</internalNodes>\n          <leafValues>\n            3.6362048983573914e-01 -1.3523319736123085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7125 1.2620569765567780e-01</internalNodes>\n          <leafValues>\n            6.0956259258091450e-03 -8.4947621822357178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7126 -2.7324870228767395e-02</internalNodes>\n          <leafValues>\n            -2.9046019911766052e-01 1.4303879812359810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7127 -7.3618680238723755e-02</internalNodes>\n          <leafValues>\n            4.8824289441108704e-01 -1.0269859805703163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7128 5.0417389720678329e-03</internalNodes>\n          <leafValues>\n            -8.4770277142524719e-02 5.6035611778497696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7129 2.7569099329411983e-03</internalNodes>\n          <leafValues>\n            -4.8269480466842651e-02 3.8525570183992386e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7130 2.1967370063066483e-02</internalNodes>\n          <leafValues>\n            8.6190566420555115e-02 -8.0797329545021057e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7131 -3.8637530803680420e-01</internalNodes>\n          <leafValues>\n            -8.3998018503189087e-01 3.6657860036939383e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7132 -4.1083219647407532e-01</internalNodes>\n          <leafValues>\n            -9.7182428836822510e-01 3.9403690025210381e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7133 -4.1033279150724411e-02</internalNodes>\n          <leafValues>\n            1. -3.3212041016668081e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7134 2.4305000901222229e-02</internalNodes>\n          <leafValues>\n            1.8234970048069954e-02 -2.4954320490360260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7135 1.6170740127563477e-03</internalNodes>\n          <leafValues>\n            -1.2958160042762756e-01 3.2725200057029724e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7136 4.4785268604755402e-02</internalNodes>\n          <leafValues>\n            -2.3868849501013756e-02 1.9763439893722534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7137 4.0209591388702393e-02</internalNodes>\n          <leafValues>\n            5.3034191951155663e-03 -6.6284531354904175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7138 3.3616109285503626e-03</internalNodes>\n          <leafValues>\n            3.0226179957389832e-01 -1.6103280708193779e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7139 -1.1624400503933430e-03</internalNodes>\n          <leafValues>\n            -2.7934190630912781e-01 1.8276169896125793e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7140 5.5524259805679321e-02</internalNodes>\n          <leafValues>\n            -6.5288958139717579e-03 7.5690442323684692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7141 4.6308599412441254e-03</internalNodes>\n          <leafValues>\n            2.8254630044102669e-02 -9.4945177435874939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7142 2.7387610170990229e-03</internalNodes>\n          <leafValues>\n            -4.6980410814285278e-02 9.4511218369007111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7143 2.9127181041985750e-03</internalNodes>\n          <leafValues>\n            -2.2264670580625534e-02 7.2091333568096161e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7144 -2.3628510534763336e-02</internalNodes>\n          <leafValues>\n            -3.9147511124610901e-01 1.2840859591960907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7145 7.1669870521873236e-04</internalNodes>\n          <leafValues>\n            2.0413680002093315e-02 -1.6587799787521362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7146 3.2723631709814072e-02</internalNodes>\n          <leafValues>\n            8.5352789610624313e-03 -5.1838648319244385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7147 5.6393269449472427e-02</internalNodes>\n          <leafValues>\n            -2.4937599897384644e-02 1.9025549292564392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7148 2.9392001032829285e-01</internalNodes>\n          <leafValues>\n            5.7944031432271004e-03 -8.5530591011047363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7149 -5.6904228404164314e-03</internalNodes>\n          <leafValues>\n            -2.4354919791221619e-01 1.0601679794490337e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7150 9.8184328526258469e-03</internalNodes>\n          <leafValues>\n            -1.3599770143628120e-02 3.3795401453971863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7151 -3.6970589309930801e-02</internalNodes>\n          <leafValues>\n            -5.7309299707412720e-01 1.0090970434248447e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7152 1.8607610836625099e-02</internalNodes>\n          <leafValues>\n            -1.2938570231199265e-02 4.1123750805854797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7153 -1.5049210051074624e-03</internalNodes>\n          <leafValues>\n            -8.4678567945957184e-02 3.3724751323461533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7154 -3.9040379226207733e-02</internalNodes>\n          <leafValues>\n            -4.7390699386596680e-01 9.5385275781154633e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7155 -3.4379279240965843e-03</internalNodes>\n          <leafValues>\n            1.4112870395183563e-01 -2.2367769852280617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7156 -1.1330900015309453e-03</internalNodes>\n          <leafValues>\n            -1.3950189948081970e-01 3.2505869865417480e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7157 -6.5370470285415649e-02</internalNodes>\n          <leafValues>\n            1.4801700413227081e-01 -2.2039920091629028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7158 -2.0970970392227173e-01</internalNodes>\n          <leafValues>\n            -7.4392271041870117e-01 7.5829490087926388e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7159 -5.8827060274779797e-03</internalNodes>\n          <leafValues>\n            -6.3253037631511688e-02 2.3363839834928513e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7160 -2.9759449884295464e-02</internalNodes>\n          <leafValues>\n            4.8733299970626831e-01 -9.2995148152112961e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7161 -5.3064361214637756e-02</internalNodes>\n          <leafValues>\n            -3.8064101338386536e-01 5.6431228294968605e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7162 6.6667333245277405e-02</internalNodes>\n          <leafValues>\n            4.6323328278958797e-03 -9.1536080837249756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7163 -9.2325232923030853e-02</internalNodes>\n          <leafValues>\n            2.9184600710868835e-01 -7.4540497735142708e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7164 8.5644036531448364e-02</internalNodes>\n          <leafValues>\n            -1.0288530029356480e-02 4.1251561045646667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7165 2.2969970107078552e-01</internalNodes>\n          <leafValues>\n            -4.6802540309727192e-03 3.6509141325950623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7166 8.7508037686347961e-03</internalNodes>\n          <leafValues>\n            7.7816851437091827e-02 -6.3657559454441071e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7167 5.7104961015284061e-03</internalNodes>\n          <leafValues>\n            -5.9653200209140778e-02 4.2732730507850647e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7168 -4.8026451840996742e-03</internalNodes>\n          <leafValues>\n            -9.8918512463569641e-02 4.4956978410482407e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7169 3.2986800651997328e-03</internalNodes>\n          <leafValues>\n            3.3164538443088531e-02 -1.3477820158004761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7170 -4.0092850103974342e-03</internalNodes>\n          <leafValues>\n            1.3551770150661469e-01 -3.7139780819416046e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7171 -7.7049341052770615e-04</internalNodes>\n          <leafValues>\n            2.6690600439906120e-02 -8.4502391517162323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7172 2.3074099794030190e-02</internalNodes>\n          <leafValues>\n            -2.6398969814181328e-02 1.8520879745483398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7173 9.9315540865063667e-03</internalNodes>\n          <leafValues>\n            2.1702500060200691e-02 -1.4147830009460449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7174 -4.3977480381727219e-02</internalNodes>\n          <leafValues>\n            -5.9306997060775757e-01 7.6594059355556965e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7175 -2.1170598920434713e-03</internalNodes>\n          <leafValues>\n            9.6989497542381287e-02 -4.9988958984613419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7176 -1.1178949847817421e-02</internalNodes>\n          <leafValues>\n            -1.5058480203151703e-01 3.1385689973831177e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7177 -1.1888720327988267e-03</internalNodes>\n          <leafValues>\n            8.7665252387523651e-02 -6.8861946463584900e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7178 -1.2205859646201134e-02</internalNodes>\n          <leafValues>\n            8.2670666277408600e-02 -6.5326899290084839e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7179 -3.7645969539880753e-02</internalNodes>\n          <leafValues>\n            -4.8226159811019897e-01 5.5899759754538536e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7180 -1.7758710309863091e-03</internalNodes>\n          <leafValues>\n            -9.1606341302394867e-02 5.8380361646413803e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7181 -1.1116299778223038e-02</internalNodes>\n          <leafValues>\n            1.4710609614849091e-01 -2.9255999252200127e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7182 4.3831788934767246e-04</internalNodes>\n          <leafValues>\n            -1.0494749993085861e-01 4.4445890933275223e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7183 -9.8695211112499237e-02</internalNodes>\n          <leafValues>\n            2.6521149277687073e-01 -9.5453672111034393e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7184 1.1736120097339153e-02</internalNodes>\n          <leafValues>\n            2.8968680649995804e-02 -1.5355010330677032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7185 -3.6601141095161438e-02</internalNodes>\n          <leafValues>\n            2.4063609540462494e-01 -2.2525599226355553e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7186 -5.2371289581060410e-02</internalNodes>\n          <leafValues>\n            -4.9006670713424683e-01 1.0319559834897518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7187 -3.1134579330682755e-03</internalNodes>\n          <leafValues>\n            6.2287129461765289e-02 -4.5234039425849915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7188 1.0345289483666420e-03</internalNodes>\n          <leafValues>\n            -5.6548729538917542e-02 1.1970130354166031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7189 -2.3240610025823116e-03</internalNodes>\n          <leafValues>\n            -9.5265246927738190e-02 3.2402478158473969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7190 -2.7458980679512024e-02</internalNodes>\n          <leafValues>\n            2.9548159241676331e-01 -1.6016509383916855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7191 -9.3150883913040161e-03</internalNodes>\n          <leafValues>\n            -1.1465849727392197e-01 2.8171680867671967e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7192 7.6356199570000172e-03</internalNodes>\n          <leafValues>\n            2.9264479875564575e-02 -1.6166350245475769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7193 1.6107590869069099e-02</internalNodes>\n          <leafValues>\n            -3.0923349782824516e-02 1.6677390038967133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7194 6.1460789293050766e-02</internalNodes>\n          <leafValues>\n            8.1282109022140503e-03 -5.4833447933197021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7195 4.3377321213483810e-02</internalNodes>\n          <leafValues>\n            -7.7782347798347473e-03 3.5578370094299316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7196 -1.5809480100870132e-02</internalNodes>\n          <leafValues>\n            -3.1237179040908813e-01 1.4910760335624218e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7197 -4.3263029307126999e-02</internalNodes>\n          <leafValues>\n            4.7393178939819336e-01 -9.4731850549578667e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7198 1.0775650152936578e-03</internalNodes>\n          <leafValues>\n            -1.0892640054225922e-01 5.0780758261680603e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7199 -6.8012787960469723e-03</internalNodes>\n          <leafValues>\n            -9.3841306865215302e-02 3.8555730134248734e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7200 -3.8845991366542876e-04</internalNodes>\n          <leafValues>\n            6.4071871340274811e-02 -9.3577213585376740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7201 3.8177249953150749e-03</internalNodes>\n          <leafValues>\n            -4.7590740025043488e-02 7.1997672319412231e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7202 -3.1246189028024673e-03</internalNodes>\n          <leafValues>\n            1.5269869565963745e-01 -4.8789650201797485e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7203 6.0980509966611862e-02</internalNodes>\n          <leafValues>\n            8.0068446695804596e-03 -6.7602759599685669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7204 2.1819709800183773e-03</internalNodes>\n          <leafValues>\n            -6.8491749465465546e-02 7.5863577425479889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7205 2.4469599593430758e-03</internalNodes>\n          <leafValues>\n            -7.4371293187141418e-02 3.2011859118938446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7206 1.4674840494990349e-03</internalNodes>\n          <leafValues>\n            -1.1912509799003601e-01 4.6667739748954773e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7207 -2.1786419674754143e-03</internalNodes>\n          <leafValues>\n            -6.5324276685714722e-02 7.6355278491973877e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7208 -2.8284740983508527e-04</internalNodes>\n          <leafValues>\n            5.8292400091886520e-02 -8.7847188115119934e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7209 1.4723110012710094e-02</internalNodes>\n          <leafValues>\n            1.9820490479469299e-01 -2.4962980300188065e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7210 4.6598021872341633e-03</internalNodes>\n          <leafValues>\n            -9.3732737004756927e-02 5.4197840392589569e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7211 -6.0316991060972214e-02</internalNodes>\n          <leafValues>\n            -6.2958812713623047e-01 6.8706739693880081e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7212 -3.6654649302363396e-03</internalNodes>\n          <leafValues>\n            3.6130189895629883e-02 -1.2816099822521210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7213 1.4875479973852634e-02</internalNodes>\n          <leafValues>\n            -2.4313909932971001e-02 4.6657409518957138e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7214 1.1842879652976990e-01</internalNodes>\n          <leafValues>\n            1.0476130060851574e-02 -5.1786392927169800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7215 1.9809199869632721e-01</internalNodes>\n          <leafValues>\n            1.0157800279557705e-02 -4.1872209310531616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7216 -1.0167530179023743e-01</internalNodes>\n          <leafValues>\n            -8.5121291875839233e-01 4.4935508631169796e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7217 -3.0325200408697128e-02</internalNodes>\n          <leafValues>\n            -3.1803390383720398e-01 6.4301840029656887e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7218 3.4531850367784500e-02</internalNodes>\n          <leafValues>\n            -1.2561430223286152e-02 3.4778198599815369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7219 -3.5133380442857742e-02</internalNodes>\n          <leafValues>\n            1.1475030332803726e-01 -1.7527149990200996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7220 5.3501729853451252e-03</internalNodes>\n          <leafValues>\n            3.5263419151306152e-02 -1.3867680728435516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7221 3.1209299340844154e-02</internalNodes>\n          <leafValues>\n            -2.0925100892782211e-02 1.4748610556125641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7222 -5.5827602045610547e-04</internalNodes>\n          <leafValues>\n            -9.5544241368770599e-02 5.6234899908304214e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7223 -2.1599860489368439e-01</internalNodes>\n          <leafValues>\n            5.9710198640823364e-01 -3.9994427934288979e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7224 7.7018201351165771e-02</internalNodes>\n          <leafValues>\n            -1.2182369828224182e-02 3.5995039343833923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7225 -2.5808349251747131e-02</internalNodes>\n          <leafValues>\n            -1.9994600117206573e-01 1.6562040895223618e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7226 4.0148189291357994e-03</internalNodes>\n          <leafValues>\n            3.8874860852956772e-02 -1.1775989830493927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7227 7.4287859206378926e-06</internalNodes>\n          <leafValues>\n            3.1405460089445114e-02 -4.9142509698867798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7228 -2.8249230235815048e-03</internalNodes>\n          <leafValues>\n            -5.5889118462800980e-02 1.1791130155324936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7229 -2.2713130339980125e-02</internalNodes>\n          <leafValues>\n            1.0733339935541153e-01 -4.1647680103778839e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7230 -1.0052169673144817e-02</internalNodes>\n          <leafValues>\n            -1.4102290570735931e-01 3.7707269191741943e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7231 -2.1023969352245331e-01</internalNodes>\n          <leafValues>\n            -6.3184642791748047e-01 3.6316630430519581e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7232 -1.1812710203230381e-02</internalNodes>\n          <leafValues>\n            1.2123010307550430e-01 -5.0373788923025131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7233 6.3666589558124542e-03</internalNodes>\n          <leafValues>\n            3.0198849737644196e-02 -9.5920257270336151e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7234 -1.2146410346031189e-01</internalNodes>\n          <leafValues>\n            -6.8696069717407227e-01 6.8671889603137970e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7235 2.3568300530314445e-02</internalNodes>\n          <leafValues>\n            -1.0376869700849056e-02 2.6333120465278625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7236 -4.9841329455375671e-03</internalNodes>\n          <leafValues>\n            5.2314449101686478e-02 -8.6597919464111328e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7237 1.4171230141073465e-03</internalNodes>\n          <leafValues>\n            -4.1445188224315643e-02 9.3332767486572266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7238 1.6522710211575031e-03</internalNodes>\n          <leafValues>\n            2.7292339131236076e-02 -1.7193740606307983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7239 -4.2191468179225922e-02</internalNodes>\n          <leafValues>\n            7.7588337659835815e-01 -2.4552440736442804e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7240 -1.5193390427157283e-03</internalNodes>\n          <leafValues>\n            2.3297169804573059e-01 -1.9499920308589935e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7241 -5.9203859418630600e-03</internalNodes>\n          <leafValues>\n            -8.3495929837226868e-02 1.9756000488996506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7242 6.4658280462026596e-03</internalNodes>\n          <leafValues>\n            -4.0668301284313202e-02 1.2236029654741287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7243 -4.8110671341419220e-02</internalNodes>\n          <leafValues>\n            -3.1629499793052673e-01 1.2694340199232101e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7244 5.0246939063072205e-03</internalNodes>\n          <leafValues>\n            3.1356900930404663e-02 -1.9190339744091034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7245 1.1158010363578796e-01</internalNodes>\n          <leafValues>\n            -1.4073889702558517e-02 1.7848959565162659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7246 -6.4665876328945160e-02</internalNodes>\n          <leafValues>\n            -5.6230849027633667e-01 8.2082729786634445e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7247 -5.7942468672990799e-02</internalNodes>\n          <leafValues>\n            7.7341747283935547e-01 -4.3547940440475941e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7248 -8.1669846549630165e-03</internalNodes>\n          <leafValues>\n            2.1019349992275238e-01 -2.0802220329642296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7249 2.8506839647889137e-02</internalNodes>\n          <leafValues>\n            8.1413127481937408e-02 -6.2663510441780090e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7250 2.4857679381966591e-03</internalNodes>\n          <leafValues>\n            -1.5635970234870911e-01 3.5210859030485153e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7251 1.9798949360847473e-02</internalNodes>\n          <leafValues>\n            1.1353739537298679e-02 -1.6531160473823547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7252 -2.7027919888496399e-02</internalNodes>\n          <leafValues>\n            2.8912219405174255e-01 -1.6753070056438446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7253 -6.9706928916275501e-03</internalNodes>\n          <leafValues>\n            -2.5769388675689697e-01 1.6355020925402641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7254 1.1425119591876864e-03</internalNodes>\n          <leafValues>\n            -4.1056800633668900e-02 1.1580900102853775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7255 -1.3041249476373196e-03</internalNodes>\n          <leafValues>\n            5.1082979887723923e-02 -1.1724369972944260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7256 3.7698419764637947e-03</internalNodes>\n          <leafValues>\n            5.8557331562042236e-02 -8.2840107381343842e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7257 -4.8689868301153183e-02</internalNodes>\n          <leafValues>\n            -3.8769158720970154e-01 8.6165666580200195e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7258 -1.1471740156412125e-01</internalNodes>\n          <leafValues>\n            1.3444100320339203e-01 -4.2848691344261169e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7259 2.3503519594669342e-02</internalNodes>\n          <leafValues>\n            3.8586359005421400e-03 -4.3615299463272095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7260 -5.9582752874121070e-04</internalNodes>\n          <leafValues>\n            4.2376730591058731e-02 -1.2161590158939362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7261 5.4052029736340046e-03</internalNodes>\n          <leafValues>\n            -2.3753000423312187e-02 2.0137269794940948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7262 9.1158300638198853e-03</internalNodes>\n          <leafValues>\n            2.8088169172406197e-02 -1.9667729735374451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7263 3.3211729023605585e-03</internalNodes>\n          <leafValues>\n            -5.1258899271488190e-02 4.7993980348110199e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7264 1.2975499965250492e-02</internalNodes>\n          <leafValues>\n            1.1851020157337189e-02 -3.9444020390510559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7265 -5.0546238198876381e-03</internalNodes>\n          <leafValues>\n            -1.0956159979104996e-01 4.2662780731916428e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7266 -7.6824478805065155e-02</internalNodes>\n          <leafValues>\n            7.6269572973251343e-01 -6.6229291260242462e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7267 -1.8690669676288962e-03</internalNodes>\n          <leafValues>\n            4.0112659335136414e-02 -7.1398198604583740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7268 -6.0407500714063644e-03</internalNodes>\n          <leafValues>\n            1.2614290416240692e-01 -3.9585150778293610e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7269 -4.5013230293989182e-02</internalNodes>\n          <leafValues>\n            -2.1871440112590790e-01 6.5213250927627087e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7270 3.8492688909173012e-03</internalNodes>\n          <leafValues>\n            -9.2213302850723267e-02 6.6925182938575745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7271 -4.3247821740806103e-03</internalNodes>\n          <leafValues>\n            1.4973750710487366e-01 -3.1123559921979904e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7272 -2.6776840910315514e-02</internalNodes>\n          <leafValues>\n            -1.1432229727506638e-01 5.3090259432792664e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7273 2.0645130425691605e-03</internalNodes>\n          <leafValues>\n            -3.8483418524265289e-02 7.1507766842842102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7274 5.7206518948078156e-02</internalNodes>\n          <leafValues>\n            1.2463140301406384e-02 -3.9884459972381592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7275 7.7696829102933407e-03</internalNodes>\n          <leafValues>\n            -2.4309959262609482e-02 6.1120841652154922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7276 2.8191099409013987e-03</internalNodes>\n          <leafValues>\n            6.2243871390819550e-02 -7.9774282872676849e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7277 -5.1747109740972519e-02</internalNodes>\n          <leafValues>\n            -2.0475579798221588e-01 9.8433922976255417e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7278 4.2840079404413700e-03</internalNodes>\n          <leafValues>\n            -3.6799129098653793e-02 1.2380699813365936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7279 -8.0563372466713190e-04</internalNodes>\n          <leafValues>\n            -5.3742490708827972e-02 6.8746432662010193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7280 4.6062450855970383e-02</internalNodes>\n          <leafValues>\n            7.3871058411896229e-03 -6.1133211851119995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7281 6.6807270050048828e-02</internalNodes>\n          <leafValues>\n            -1.2545309960842133e-02 1.5731689333915710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7282 2.0568699110299349e-03</internalNodes>\n          <leafValues>\n            4.3087389320135117e-02 -1.1062700301408768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7283 2.8760819695889950e-03</internalNodes>\n          <leafValues>\n            2.5800980627536774e-02 -8.4697857499122620e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7284 -4.9642049707472324e-03</internalNodes>\n          <leafValues>\n            8.3168722689151764e-02 -5.6750860065221786e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>385</maxWeakCount>\n      <stageThreshold>-1.1474020481109619e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 7285 1.5166849829256535e-02</internalNodes>\n          <leafValues>\n            -1.7501029372215271e-01 1.5165300667285919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7286 4.1852002032101154e-03</internalNodes>\n          <leafValues>\n            -1.8253259360790253e-01 1.0545530170202255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7287 -2.6159440167248249e-03</internalNodes>\n          <leafValues>\n            -2.1517610549926758e-01 7.7460259199142456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7288 2.7645078953355551e-03</internalNodes>\n          <leafValues>\n            -1.1506909877061844e-01 6.7771263420581818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7289 -2.7296729967929423e-04</internalNodes>\n          <leafValues>\n            5.5712651461362839e-02 -2.8723669052124023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7290 2.4992981343530118e-04</internalNodes>\n          <leafValues>\n            5.5202499032020569e-02 -1.5191499888896942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7291 1.3287579640746117e-03</internalNodes>\n          <leafValues>\n            -1.2567579746246338e-01 9.4094827771186829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7292 -2.4653770960867405e-03</internalNodes>\n          <leafValues>\n            4.9393590539693832e-02 -2.2239279747009277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7293 -3.2979049719870090e-03</internalNodes>\n          <leafValues>\n            -1.7367990314960480e-01 6.9391071796417236e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7294 -4.9667809158563614e-02</internalNodes>\n          <leafValues>\n            3.2854220271110535e-01 -3.3067218959331512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7295 5.7844468392431736e-03</internalNodes>\n          <leafValues>\n            6.1289519071578979e-02 -1.6873429715633392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7296 2.9754149727523327e-03</internalNodes>\n          <leafValues>\n            -2.4017000198364258e-01 5.7906478643417358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7297 2.3769649851601571e-04</internalNodes>\n          <leafValues>\n            1.1141020059585571e-01 -8.6508020758628845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7298 5.4410300217568874e-03</internalNodes>\n          <leafValues>\n            -8.9257702231407166e-02 2.8492979705333710e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7299 2.5746610481292009e-03</internalNodes>\n          <leafValues>\n            6.0383580625057220e-02 -1.4771540462970734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7300 -1.2155439704656601e-02</internalNodes>\n          <leafValues>\n            1.8026730418205261e-01 -3.5744961351156235e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7301 5.5069979280233383e-03</internalNodes>\n          <leafValues>\n            6.1453469097614288e-02 -1.6147279739379883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7302 -3.0918378615751863e-04</internalNodes>\n          <leafValues>\n            -9.1295689344406128e-02 6.8111963570117950e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7303 -7.7705271542072296e-02</internalNodes>\n          <leafValues>\n            3.3344480395317078e-01 -2.6795169338583946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7304 4.5874878764152527e-02</internalNodes>\n          <leafValues>\n            6.2387371435761452e-03 -2.2738909721374512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7305 3.1658360967412591e-04</internalNodes>\n          <leafValues>\n            -1.1297920346260071e-01 9.8602570593357086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7306 -5.2962768822908401e-02</internalNodes>\n          <leafValues>\n            -6.0117399692535400e-01 1.0004489682614803e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7307 5.3028380498290062e-03</internalNodes>\n          <leafValues>\n            3.6164399236440659e-02 -2.6359859108924866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7308 -2.3473590612411499e-02</internalNodes>\n          <leafValues>\n            1.0663519799709320e-01 -3.0653990805149078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7309 -1.5029460191726685e-03</internalNodes>\n          <leafValues>\n            6.2882840633392334e-02 -1.2285350263118744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7310 -1.2232650071382523e-02</internalNodes>\n          <leafValues>\n            -2.3047080636024475e-01 4.0048789232969284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7311 -4.7428268939256668e-02</internalNodes>\n          <leafValues>\n            4.4135141372680664e-01 -1.8873579800128937e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7312 3.6379251629114151e-02</internalNodes>\n          <leafValues>\n            -1.3020380400121212e-02 1.4685730636119843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7313 3.6343511193990707e-02</internalNodes>\n          <leafValues>\n            3.8788039237260818e-02 -1.9903139770030975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7314 -1.0792929679155350e-01</internalNodes>\n          <leafValues>\n            1.6177520155906677e-01 -6.3546439632773399e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7315 -9.5479741692543030e-02</internalNodes>\n          <leafValues>\n            3.7320658564567566e-01 -2.3940289393067360e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7316 3.8954298943281174e-02</internalNodes>\n          <leafValues>\n            1.1239799670875072e-02 -3.4794488549232483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7317 -3.2646209001541138e-02</internalNodes>\n          <leafValues>\n            -3.1797638535499573e-01 2.1780189126729965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7318 -2.5872089900076389e-03</internalNodes>\n          <leafValues>\n            4.7268610447645187e-02 -1.5624779462814331e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7319 1.2979200109839439e-02</internalNodes>\n          <leafValues>\n            -2.4394070729613304e-02 3.0341750383377075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7320 -1.7490500584244728e-02</internalNodes>\n          <leafValues>\n            1.1967100203037262e-01 -3.4825209528207779e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7321 8.2290060818195343e-03</internalNodes>\n          <leafValues>\n            5.1706299185752869e-02 -1.4124310016632080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7322 8.7701035663485527e-03</internalNodes>\n          <leafValues>\n            1.2139629572629929e-02 -9.3410186469554901e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7323 -2.5523800868541002e-03</internalNodes>\n          <leafValues>\n            9.1882079839706421e-02 -7.9693943262100220e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7324 1.2640489730983973e-03</internalNodes>\n          <leafValues>\n            -4.2868331074714661e-02 9.8469160497188568e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7325 -3.8762169424444437e-03</internalNodes>\n          <leafValues>\n            6.4477890729904175e-02 -1.1426970362663269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7326 1.5416350215673447e-03</internalNodes>\n          <leafValues>\n            -3.8240168243646622e-02 5.0880789756774902e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7327 7.6829752651974559e-04</internalNodes>\n          <leafValues>\n            -1.2869219481945038e-01 5.8161370456218719e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7328 1.6587260179221630e-03</internalNodes>\n          <leafValues>\n            1.6391919553279877e-01 -4.7164998948574066e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7329 1.6514799790456891e-03</internalNodes>\n          <leafValues>\n            -5.9221718460321426e-02 1.3165080547332764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7330 -3.8682940066792071e-04</internalNodes>\n          <leafValues>\n            6.4493581652641296e-02 -1.0728739947080612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7331 -3.4595469478517771e-03</internalNodes>\n          <leafValues>\n            8.0743201076984406e-02 -9.2568591237068176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7332 3.5130660980939865e-02</internalNodes>\n          <leafValues>\n            1.5520620159804821e-02 -1.9732579588890076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7333 1.2025350332260132e-01</internalNodes>\n          <leafValues>\n            -2.0497029647231102e-02 4.0905651450157166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7334 7.8581331763416529e-04</internalNodes>\n          <leafValues>\n            -9.4858787953853607e-02 6.9316640496253967e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7335 6.1606317758560181e-03</internalNodes>\n          <leafValues>\n            6.0556668788194656e-02 -1.2436509877443314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7336 1.3351559638977051e-02</internalNodes>\n          <leafValues>\n            1.7634969204664230e-02 -1.4649459719657898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7337 1.9873639568686485e-02</internalNodes>\n          <leafValues>\n            -2.4449799209833145e-02 2.7322331070899963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7338 -2.3918889928609133e-03</internalNodes>\n          <leafValues>\n            -4.0744900703430176e-02 4.9925319850444794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7339 8.6433859542012215e-03</internalNodes>\n          <leafValues>\n            2.8967950493097305e-02 -2.3661069571971893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7340 -8.8321920484304428e-03</internalNodes>\n          <leafValues>\n            1.2054029852151871e-01 -2.7702990919351578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7341 -4.4150479137897491e-02</internalNodes>\n          <leafValues>\n            5.0038051605224609e-01 -1.2251130305230618e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7342 -4.0243011899292469e-03</internalNodes>\n          <leafValues>\n            -1.9502529501914978e-01 2.5193009525537491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7343 9.8465122282505035e-03</internalNodes>\n          <leafValues>\n            -6.0283869504928589e-02 1.2665469944477081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7344 -2.7608149684965611e-03</internalNodes>\n          <leafValues>\n            -8.3926528692245483e-02 6.0102649033069611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7345 3.9076831191778183e-02</internalNodes>\n          <leafValues>\n            1.5327650122344494e-02 -4.3197798728942871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7346 3.8136269431561232e-03</internalNodes>\n          <leafValues>\n            -3.1281091272830963e-02 7.7942118048667908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7347 2.7646059170365334e-03</internalNodes>\n          <leafValues>\n            1.7334839329123497e-02 -3.4732720255851746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7348 -3.6096980329602957e-03</internalNodes>\n          <leafValues>\n            -8.2286708056926727e-02 2.8170879930257797e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7349 3.5445080138742924e-03</internalNodes>\n          <leafValues>\n            -1.0557620227336884e-01 6.0050919651985168e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7350 1.2985900044441223e-02</internalNodes>\n          <leafValues>\n            1.8597990274429321e-02 -9.4987802207469940e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7351 -2.0027540624141693e-02</internalNodes>\n          <leafValues>\n            2.6007258892059326e-01 -2.7079159393906593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7352 -7.2966597974300385e-02</internalNodes>\n          <leafValues>\n            -7.6848107576370239e-01 2.3947900626808405e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7353 -2.1148719824850559e-03</internalNodes>\n          <leafValues>\n            -1.0763320326805115e-01 5.2361391484737396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7354 -7.7667146921157837e-02</internalNodes>\n          <leafValues>\n            1.7822329699993134e-01 -3.1463298946619034e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7355 -4.6600410714745522e-03</internalNodes>\n          <leafValues>\n            -2.0386479794979095e-01 3.9025411009788513e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7356 1.7059499397873878e-02</internalNodes>\n          <leafValues>\n            1.8954740837216377e-02 -1.7260240018367767e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7357 4.3174691498279572e-02</internalNodes>\n          <leafValues>\n            -3.1685609370470047e-02 2.3346449434757233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7358 -4.8927929997444153e-01</internalNodes>\n          <leafValues>\n            -7.1043139696121216e-01 4.6672620810568333e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7359 9.1495506465435028e-02</internalNodes>\n          <leafValues>\n            1.6027629375457764e-02 -4.0538018941879272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7360 -4.6843249350786209e-02</internalNodes>\n          <leafValues>\n            6.9358861446380615e-01 -2.0055349450558424e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7361 6.0863760299980640e-03</internalNodes>\n          <leafValues>\n            -1.5218159556388855e-01 4.0408309549093246e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7362 4.3676611036062241e-02</internalNodes>\n          <leafValues>\n            1.2257159687578678e-02 -2.5996598601341248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7363 -4.9580529332160950e-02</internalNodes>\n          <leafValues>\n            6.7571347951889038e-01 -8.0354865640401840e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7364 -2.8614638722501695e-04</internalNodes>\n          <leafValues>\n            3.4548770636320114e-02 -6.1849180608987808e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7365 -1.1863199993968010e-02</internalNodes>\n          <leafValues>\n            -1.2061329931020737e-01 5.1416579633951187e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7366 1.4754010364413261e-02</internalNodes>\n          <leafValues>\n            -2.4638049304485321e-02 1.5234139561653137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7367 -5.1772277802228928e-03</internalNodes>\n          <leafValues>\n            1.8428930640220642e-01 -4.2200319468975067e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7368 -2.0033530890941620e-02</internalNodes>\n          <leafValues>\n            -2.0986419916152954e-01 2.3016780614852905e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7369 4.1349478997290134e-03</internalNodes>\n          <leafValues>\n            3.8500111550092697e-02 -1.5400919318199158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7370 4.9832498189061880e-04</internalNodes>\n          <leafValues>\n            -5.6834470480680466e-02 1.1737540364265442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7371 1.5235079918056726e-03</internalNodes>\n          <leafValues>\n            -8.2305751740932465e-02 7.3340758681297302e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7372 2.6669060811400414e-02</internalNodes>\n          <leafValues>\n            1.7131920903921127e-02 -3.3337280154228210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7373 -2.5192899629473686e-02</internalNodes>\n          <leafValues>\n            1.8348090350627899e-01 -3.5275999456644058e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7374 1.1769080301746726e-03</internalNodes>\n          <leafValues>\n            -1.3197030127048492e-01 2.4242419749498367e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7375 -6.6034111659973860e-04</internalNodes>\n          <leafValues>\n            -1.0725550353527069e-01 5.8605268597602844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7376 4.3386619538068771e-02</internalNodes>\n          <leafValues>\n            -1.6498409211635590e-02 3.9293581247329712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7377 -1.1490290053188801e-02</internalNodes>\n          <leafValues>\n            -2.6332950592041016e-01 2.4240590631961823e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7378 8.5933692753314972e-02</internalNodes>\n          <leafValues>\n            -1.6279760748147964e-02 4.1729450225830078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7379 2.0756269805133343e-03</internalNodes>\n          <leafValues>\n            5.2543889731168747e-02 -1.0574310272932053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7380 1.4016899513080716e-03</internalNodes>\n          <leafValues>\n            -4.6594541519880295e-02 1.1355359852313995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7381 -3.4351870417594910e-03</internalNodes>\n          <leafValues>\n            -1.0806330293416977e-01 5.8778531849384308e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7382 -1.8299809889867902e-03</internalNodes>\n          <leafValues>\n            6.0645598918199539e-02 -6.6084399819374084e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7383 -3.4186599077656865e-04</internalNodes>\n          <leafValues>\n            -1.2682560086250305e-01 4.9244668334722519e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7384 1.0616290383040905e-02</internalNodes>\n          <leafValues>\n            -5.5619470775127411e-02 1.2270829826593399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7385 3.9490770548582077e-02</internalNodes>\n          <leafValues>\n            8.2882875576615334e-03 -6.6194152832031250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7386 -1.9746040925383568e-02</internalNodes>\n          <leafValues>\n            1.5761069953441620e-01 -9.3961963430047035e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7387 4.6383799053728580e-04</internalNodes>\n          <leafValues>\n            -2.0127220451831818e-01 2.6706330478191376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7388 5.1521410932764411e-04</internalNodes>\n          <leafValues>\n            -8.6019717156887054e-02 6.7131496965885162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7389 -1.1283540166914463e-02</internalNodes>\n          <leafValues>\n            -2.2754089534282684e-01 2.2250600159168243e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7390 -8.4253363311290741e-03</internalNodes>\n          <leafValues>\n            1.6505259275436401e-01 -5.0438180565834045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7391 3.0604569241404533e-02</internalNodes>\n          <leafValues>\n            2.7500540018081665e-02 -2.0984129607677460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7392 5.0000958144664764e-03</internalNodes>\n          <leafValues>\n            -3.8911771029233932e-02 1.1553470045328140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7393 4.1644461452960968e-02</internalNodes>\n          <leafValues>\n            -1.4164280146360397e-02 4.4004911184310913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7394 -3.9140251465141773e-03</internalNodes>\n          <leafValues>\n            -1.1528140306472778e-01 2.7629520744085312e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7395 -2.2060431074351072e-03</internalNodes>\n          <leafValues>\n            7.4794493615627289e-02 -7.5950391590595245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7396 -7.4060507118701935e-02</internalNodes>\n          <leafValues>\n            -6.0902571678161621e-01 3.8528270088136196e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7397 1.5966329956427217e-03</internalNodes>\n          <leafValues>\n            -7.0015199482440948e-02 1.1019259691238403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7398 2.0102860871702433e-03</internalNodes>\n          <leafValues>\n            -3.1859181821346283e-02 7.1592740714550018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7399 3.2757699955254793e-03</internalNodes>\n          <leafValues>\n            -5.2260760217905045e-02 1.2652389705181122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7400 3.6700100172311068e-03</internalNodes>\n          <leafValues>\n            5.4018720984458923e-02 -4.6530380845069885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7401 -5.7776779867708683e-03</internalNodes>\n          <leafValues>\n            -2.2940860688686371e-01 2.4704450741410255e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7402 3.7388929631561041e-03</internalNodes>\n          <leafValues>\n            -4.8273131251335144e-02 7.6772913336753845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7403 -1.2404560111463070e-02</internalNodes>\n          <leafValues>\n            1.1491999775171280e-01 -4.9308139830827713e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7404 9.0428609400987625e-03</internalNodes>\n          <leafValues>\n            4.3013140559196472e-02 -1.4439429342746735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7405 6.1762649565935135e-03</internalNodes>\n          <leafValues>\n            -3.9362821727991104e-02 1.6073490679264069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7406 2.1051440387964249e-02</internalNodes>\n          <leafValues>\n            2.4608060717582703e-02 -1.3768480718135834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7407 2.7457328978925943e-03</internalNodes>\n          <leafValues>\n            -6.3271999359130859e-02 9.1269433498382568e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7408 -1.0777959600090981e-02</internalNodes>\n          <leafValues>\n            9.1245301067829132e-02 -3.0110929161310196e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7409 1.6699189320206642e-02</internalNodes>\n          <leafValues>\n            4.3539609760046005e-02 -1.5240140259265900e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7410 5.4665589705109596e-03</internalNodes>\n          <leafValues>\n            -5.3575031459331512e-02 6.0266200453042984e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7411 -3.2001500949263573e-03</internalNodes>\n          <leafValues>\n            1.4220920205116272e-01 -4.0823381394147873e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7412 4.7289058566093445e-02</internalNodes>\n          <leafValues>\n            1.5853699296712875e-02 -2.7123591303825378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7413 -1.3604690320789814e-03</internalNodes>\n          <leafValues>\n            4.0636081248521805e-02 -1.4885699748992920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7414 6.2847061781212687e-04</internalNodes>\n          <leafValues>\n            4.1833158582448959e-02 -1.2394890189170837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7415 -3.7036079913377762e-02</internalNodes>\n          <leafValues>\n            -3.6944690346717834e-01 1.3664159923791885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7416 -2.2578550502657890e-02</internalNodes>\n          <leafValues>\n            1.1812049895524979e-01 -2.2939860820770264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7417 3.2851321157068014e-03</internalNodes>\n          <leafValues>\n            3.1136950850486755e-01 -1.8856419250369072e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7418 -2.0225369930267334e-01</internalNodes>\n          <leafValues>\n            -6.2465697526931763e-01 3.9239428006112576e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7419 -4.9903858453035355e-03</internalNodes>\n          <leafValues>\n            1.0674989968538284e-01 -6.0000490397214890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7420 -2.2539479658007622e-02</internalNodes>\n          <leafValues>\n            -1.9891190528869629e-01 1.8829969689249992e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7421 2.6878459379076958e-02</internalNodes>\n          <leafValues>\n            -3.1185189262032509e-02 2.0841309428215027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7422 -6.3416860066354275e-03</internalNodes>\n          <leafValues>\n            -8.3658866584300995e-02 4.0603660047054291e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7423 2.8207020368427038e-03</internalNodes>\n          <leafValues>\n            -5.8255858719348907e-02 9.7203142940998077e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7424 2.4739980697631836e-02</internalNodes>\n          <leafValues>\n            -1.8699239939451218e-02 9.9858507513999939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7425 7.4140671640634537e-03</internalNodes>\n          <leafValues>\n            2.9613019898533821e-02 -1.9177620112895966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7426 -8.3040986210107803e-03</internalNodes>\n          <leafValues>\n            1.2958979606628418e-01 -4.2671140283346176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7427 1.1470559984445572e-03</internalNodes>\n          <leafValues>\n            -1.5365119278430939e-01 4.1083239018917084e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7428 -1.6470700502395630e-01</internalNodes>\n          <leafValues>\n            -4.1437658667564392e-01 1.3509290292859077e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7429 2.4328620731830597e-01</internalNodes>\n          <leafValues>\n            -1.2499390169978142e-02 4.4623729586601257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7430 2.4545079097151756e-02</internalNodes>\n          <leafValues>\n            2.2270770743489265e-02 -1.0766860097646713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7431 -3.6004021763801575e-02</internalNodes>\n          <leafValues>\n            2.1495530009269714e-01 -2.3298330605030060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7432 1.7012679949402809e-02</internalNodes>\n          <leafValues>\n            2.8566520661115646e-02 -1.3689860701560974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7433 -1.7947000451385975e-03</internalNodes>\n          <leafValues>\n            2.6063710451126099e-02 -1.8060439825057983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7434 -3.4492081403732300e-01</internalNodes>\n          <leafValues>\n            -5.9101992845535278e-01 1.3455889420583844e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7435 -1.0471549816429615e-02</internalNodes>\n          <leafValues>\n            -6.4394369721412659e-02 8.1244252622127533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7436 6.4335219562053680e-02</internalNodes>\n          <leafValues>\n            -5.0874471664428711e-02 8.3752527832984924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7437 4.6703450381755829e-02</internalNodes>\n          <leafValues>\n            8.1825926899909973e-03 -6.2220478057861328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7438 6.7396290600299835e-02</internalNodes>\n          <leafValues>\n            -4.0585128590464592e-03 3.1115430593490601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7439 -1.8122399342246354e-04</internalNodes>\n          <leafValues>\n            6.3599228858947754e-02 -8.3870701491832733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7440 -4.6783890575170517e-02</internalNodes>\n          <leafValues>\n            -4.3748119473457336e-01 3.6999220028519630e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7441 1.2537419795989990e-01</internalNodes>\n          <leafValues>\n            -7.1869022212922573e-03 6.9267672300338745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7442 3.5549318999983370e-04</internalNodes>\n          <leafValues>\n            3.5804919898509979e-02 -4.1999049484729767e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7443 -1.8169870600104332e-02</internalNodes>\n          <leafValues>\n            -2.6467940211296082e-01 1.9274869933724403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7444 2.7509370818734169e-02</internalNodes>\n          <leafValues>\n            -9.9343024194240570e-03 1.2481729686260223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7445 -3.1984839588403702e-02</internalNodes>\n          <leafValues>\n            2.5694110989570618e-01 -2.6392020285129547e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7446 -1.2891650199890137e-02</internalNodes>\n          <leafValues>\n            -1.8838110566139221e-01 1.6135750338435173e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7447 4.5009091496467590e-02</internalNodes>\n          <leafValues>\n            8.4453048184514046e-03 -5.7920891046524048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7448 3.9589041844010353e-03</internalNodes>\n          <leafValues>\n            -4.3672330677509308e-02 1.2087629735469818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7449 2.7181839104741812e-03</internalNodes>\n          <leafValues>\n            -4.0779389441013336e-02 1.2974439561367035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7450 -7.5994711369276047e-04</internalNodes>\n          <leafValues>\n            3.2954100519418716e-02 -8.6419321596622467e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7451 6.6315899603068829e-03</internalNodes>\n          <leafValues>\n            3.6079831421375275e-02 -1.5763629972934723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7452 -3.6433320492506027e-03</internalNodes>\n          <leafValues>\n            -2.9832119122147560e-02 6.2801547348499298e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7453 -6.4768336713314056e-02</internalNodes>\n          <leafValues>\n            -8.4351742267608643e-01 6.0920589603483677e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7454 4.1712251305580139e-01</internalNodes>\n          <leafValues>\n            3.0659181065857410e-03 -4.4269698858261108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7455 1.8854279816150665e-01</internalNodes>\n          <leafValues>\n            4.8159952275454998e-03 -9.5497727394104004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7456 2.3751270025968552e-02</internalNodes>\n          <leafValues>\n            -1.2166289612650871e-02 3.0827128887176514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7457 1.8907970516011119e-03</internalNodes>\n          <leafValues>\n            -1.2497080117464066e-01 3.7261988967657089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7458 -1.5546990325674415e-03</internalNodes>\n          <leafValues>\n            7.3636576533317566e-02 -4.9398850649595261e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7459 -9.2505775392055511e-03</internalNodes>\n          <leafValues>\n            1.2446039915084839e-01 -3.8673549890518188e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7460 -9.9219558760523796e-03</internalNodes>\n          <leafValues>\n            -1.2231759727001190e-01 2.7252480387687683e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7461 -6.7504931939765811e-04</internalNodes>\n          <leafValues>\n            8.0792732536792755e-02 -6.1003699898719788e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7462 -1.3286190107464790e-02</internalNodes>\n          <leafValues>\n            1.7295649647712708e-01 -3.0486939474940300e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7463 4.3905568309128284e-03</internalNodes>\n          <leafValues>\n            2.9421260580420494e-02 -1.8230539560317993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7464 -1.8879309296607971e-02</internalNodes>\n          <leafValues>\n            -5.3837429732084274e-02 2.8330469503998756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7465 -6.9391563534736633e-02</internalNodes>\n          <leafValues>\n            5.4713129997253418e-01 -9.0404544025659561e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7466 7.8226983547210693e-02</internalNodes>\n          <leafValues>\n            6.9561759009957314e-03 -1.5992170572280884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7467 -9.5910448580980301e-03</internalNodes>\n          <leafValues>\n            8.3477370440959930e-02 -6.0714289546012878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7468 8.0856353044509888e-02</internalNodes>\n          <leafValues>\n            -3.1028070952743292e-03 8.1530278921127319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7469 -6.9029820151627064e-03</internalNodes>\n          <leafValues>\n            -6.2625996768474579e-02 7.7994093298912048e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7470 3.8219179958105087e-02</internalNodes>\n          <leafValues>\n            -9.4691133126616478e-03 4.1828629374504089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7471 -7.2923908010125160e-04</internalNodes>\n          <leafValues>\n            5.4394990205764771e-02 -1.0869490355253220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7472 -1.1224360205233097e-02</internalNodes>\n          <leafValues>\n            -2.8774300217628479e-01 1.9332440569996834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7473 -2.3755239322781563e-02</internalNodes>\n          <leafValues>\n            2.9632499814033508e-01 -1.6995029523968697e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7474 2.5170940905809402e-02</internalNodes>\n          <leafValues>\n            1.8151640892028809e-02 -6.9211177527904510e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7475 8.4619410336017609e-02</internalNodes>\n          <leafValues>\n            -1.2618330307304859e-02 4.0188309550285339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7476 -2.8461799956858158e-03</internalNodes>\n          <leafValues>\n            -1.6565479338169098e-01 3.5540379583835602e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7477 9.9000544287264347e-04</internalNodes>\n          <leafValues>\n            -7.0647209882736206e-02 9.2070832848548889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7478 8.5722869262099266e-03</internalNodes>\n          <leafValues>\n            -1.6599319875240326e-02 6.0025580227375031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7479 7.7498499304056168e-03</internalNodes>\n          <leafValues>\n            2.5065049529075623e-02 -2.0419560372829437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7480 -5.1633790135383606e-03</internalNodes>\n          <leafValues>\n            5.6465640664100647e-02 -3.9366569370031357e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7481 3.4570649731904268e-03</internalNodes>\n          <leafValues>\n            -4.8712749034166336e-02 1.1756400018930435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7482 1.5435590175911784e-03</internalNodes>\n          <leafValues>\n            -1.2385150045156479e-01 4.7240950167179108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7483 3.9221469312906265e-02</internalNodes>\n          <leafValues>\n            9.7949290648102760e-03 -5.5965268611907959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7484 -4.8019930720329285e-02</internalNodes>\n          <leafValues>\n            -2.4514609575271606e-01 1.5544380061328411e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7485 1.7867749556899071e-02</internalNodes>\n          <leafValues>\n            -2.6458689942955971e-02 1.8536129593849182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7486 -7.8233405947685242e-03</internalNodes>\n          <leafValues>\n            -1.2305969744920731e-01 2.1850170567631721e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7487 -4.8894518986344337e-03</internalNodes>\n          <leafValues>\n            2.5086471438407898e-01 -1.9914150238037109e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7488 1.1090599745512009e-01</internalNodes>\n          <leafValues>\n            2.1982348989695311e-03 -9.6110188961029053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7489 5.3139701485633850e-03</internalNodes>\n          <leafValues>\n            -7.0207841694355011e-02 7.4792057275772095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7490 -4.0226429700851440e-03</internalNodes>\n          <leafValues>\n            -9.2982061207294464e-02 2.7642169967293739e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7491 -9.9820762872695923e-02</internalNodes>\n          <leafValues>\n            -8.2527607679367065e-01 5.8367499150335789e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7492 3.2612269278615713e-03</internalNodes>\n          <leafValues>\n            3.0481850728392601e-02 -4.8289291560649872e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7493 -4.1559059172868729e-02</internalNodes>\n          <leafValues>\n            5.8879297971725464e-01 -8.5169300436973572e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7494 5.4297139868140221e-03</internalNodes>\n          <leafValues>\n            1.8141800537705421e-02 -1.3948309421539307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7495 1.6756299883127213e-02</internalNodes>\n          <leafValues>\n            1.2322929687798023e-02 -4.1245520114898682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7496 -1.7563860863447189e-02</internalNodes>\n          <leafValues>\n            1.1385770142078400e-01 -3.0968630686402321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7497 1.8308760598301888e-02</internalNodes>\n          <leafValues>\n            -3.5930249840021133e-02 1.4697270095348358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7498 3.5556308925151825e-02</internalNodes>\n          <leafValues>\n            1.0190679691731930e-02 -2.5837650895118713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7499 -5.1635081035783514e-05</internalNodes>\n          <leafValues>\n            4.6089090406894684e-02 -1.1719120293855667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7500 2.5128800189122558e-04</internalNodes>\n          <leafValues>\n            -4.0896330028772354e-02 1.0669410228729248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7501 -1.5876770485192537e-03</internalNodes>\n          <leafValues>\n            1.0786730051040649e-01 -4.5890059322118759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7502 -9.5712337642908096e-03</internalNodes>\n          <leafValues>\n            -1.5212120115756989e-01 3.7137780338525772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7503 2.8643130790442228e-03</internalNodes>\n          <leafValues>\n            3.6075118929147720e-02 -1.4268599450588226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7504 -5.0454098731279373e-02</internalNodes>\n          <leafValues>\n            1.9622960686683655e-01 -2.8599070385098457e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7505 -2.8714470099657774e-03</internalNodes>\n          <leafValues>\n            7.3919989168643951e-02 -8.6024001240730286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7506 4.9587138928472996e-03</internalNodes>\n          <leafValues>\n            9.4060972332954407e-03 -2.4880349636077881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7507 -7.8270390629768372e-02</internalNodes>\n          <leafValues>\n            4.3305158615112305e-01 -1.1123429983854294e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7508 -6.4656808972358704e-02</internalNodes>\n          <leafValues>\n            -1.9539129734039307e-01 9.3969572335481644e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7509 -4.0213608741760254e-01</internalNodes>\n          <leafValues>\n            -9.3731278181076050e-01 4.8170168884098530e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7510 4.2917151004076004e-02</internalNodes>\n          <leafValues>\n            5.9442862402647734e-04 -7.9430317878723145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7511 2.1517940331250429e-03</internalNodes>\n          <leafValues>\n            -2.4127319455146790e-02 2.1096949279308319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7512 9.5514237880706787e-02</internalNodes>\n          <leafValues>\n            3.0073130037635565e-03 -3.0030760169029236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7513 3.5949420183897018e-02</internalNodes>\n          <leafValues>\n            9.1736158356070518e-03 -5.3301852941513062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7514 1.4061479270458221e-01</internalNodes>\n          <leafValues>\n            -1.9780038855969906e-03 5.8360362052917480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7515 -1.0000269860029221e-01</internalNodes>\n          <leafValues>\n            -4.6577060222625732e-01 1.0447300039231777e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7516 -1.6898410022258759e-01</internalNodes>\n          <leafValues>\n            4.7578391432762146e-01 -3.0947721097618341e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7517 2.6123190298676491e-02</internalNodes>\n          <leafValues>\n            -1.8673470243811607e-02 2.5583058595657349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7518 8.8816967036109418e-05</internalNodes>\n          <leafValues>\n            1.2931160628795624e-01 -2.2033900022506714e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7519 -2.5785199832171202e-03</internalNodes>\n          <leafValues>\n            7.7590242028236389e-02 -5.8669801801443100e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7520 -5.5829741060733795e-02</internalNodes>\n          <leafValues>\n            -5.6296068429946899e-01 8.2240002229809761e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7521 -3.5114258527755737e-02</internalNodes>\n          <leafValues>\n            -4.1525208950042725e-01 1.0237259790301323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7522 3.0091139487922192e-03</internalNodes>\n          <leafValues>\n            -3.2801661640405655e-02 1.1237899959087372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7523 -3.0068641062825918e-03</internalNodes>\n          <leafValues>\n            -1.5794169902801514e-01 3.0354220420122147e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7524 -2.0059049129486084e-03</internalNodes>\n          <leafValues>\n            1.1346399784088135e-01 -3.3372201025485992e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7525 -1.3963360106572509e-03</internalNodes>\n          <leafValues>\n            1.4454230666160583e-01 -5.0115231424570084e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7526 -5.4588310420513153e-02</internalNodes>\n          <leafValues>\n            -9.6552258729934692e-01 2.6290758978575468e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7527 -5.0577907823026180e-03</internalNodes>\n          <leafValues>\n            -2.1536730229854584e-01 2.7823869138956070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7528 -7.4430949985980988e-02</internalNodes>\n          <leafValues>\n            5.9244579076766968e-01 -3.5832428839057684e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7529 -6.9759570062160492e-02</internalNodes>\n          <leafValues>\n            6.5854609012603760e-01 -7.1275448426604271e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7530 3.4715738729573786e-04</internalNodes>\n          <leafValues>\n            4.3214511126279831e-02 -6.5209239721298218e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7531 6.5575069747865200e-03</internalNodes>\n          <leafValues>\n            4.1032981127500534e-02 -1.2200939655303955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7532 9.2287212610244751e-02</internalNodes>\n          <leafValues>\n            -2.1933389827609062e-02 8.9953176677227020e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7533 5.2685599774122238e-02</internalNodes>\n          <leafValues>\n            1.6439350321888924e-02 -2.7847930788993835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7534 7.2394758462905884e-03</internalNodes>\n          <leafValues>\n            -3.3217910677194595e-02 9.7244061529636383e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7535 -2.2218099329620600e-03</internalNodes>\n          <leafValues>\n            3.5860918462276459e-02 -1.3876199722290039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7536 -2.3309379816055298e-02</internalNodes>\n          <leafValues>\n            -2.7913948893547058e-01 1.6362229362130165e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7537 1.4036920038051903e-04</internalNodes>\n          <leafValues>\n            -4.0096871554851532e-02 1.2379959970712662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7538 5.3702849894762039e-02</internalNodes>\n          <leafValues>\n            1.4607049524784088e-03 -8.6436408758163452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7539 4.1926259291358292e-04</internalNodes>\n          <leafValues>\n            -4.9342829734086990e-02 1.0289549827575684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7540 -1.6786300111562014e-03</internalNodes>\n          <leafValues>\n            -1.9065080583095551e-01 2.5145059451460838e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7541 1.6603240743279457e-02</internalNodes>\n          <leafValues>\n            -1.8125709146261215e-02 2.6887449622154236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7542 -2.2621789947152138e-02</internalNodes>\n          <leafValues>\n            1.3145700097084045e-01 -2.5288559496402740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7543 4.4634779915213585e-03</internalNodes>\n          <leafValues>\n            5.6568209081888199e-02 -1.0306429862976074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7544 3.3281201031059027e-03</internalNodes>\n          <leafValues>\n            2.1517809480428696e-02 -1.4086639881134033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7545 -2.5311840698122978e-02</internalNodes>\n          <leafValues>\n            1.1237470060586929e-01 -4.1784498840570450e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7546 -2.6119880378246307e-02</internalNodes>\n          <leafValues>\n            1.2703700363636017e-01 -2.3530310019850731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7547 -7.2608642280101776e-02</internalNodes>\n          <leafValues>\n            -3.3052888512611389e-01 2.1741159260272980e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7548 5.8377808891236782e-03</internalNodes>\n          <leafValues>\n            -2.8170680627226830e-02 6.1300031840801239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7549 1.7830949509516358e-03</internalNodes>\n          <leafValues>\n            -7.6140716671943665e-02 8.4391303360462189e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7550 -1.4502589404582977e-01</internalNodes>\n          <leafValues>\n            -2.8886368870735168e-01 9.4371382147073746e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7551 -2.4291570298373699e-03</internalNodes>\n          <leafValues>\n            -6.3645169138908386e-02 9.0057007968425751e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7552 1.0977900028228760e-01</internalNodes>\n          <leafValues>\n            -1.4906959841027856e-03 8.9710217714309692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7553 -3.8412429857999086e-03</internalNodes>\n          <leafValues>\n            7.3980011045932770e-02 -6.9378383457660675e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7554 3.9507250767201185e-04</internalNodes>\n          <leafValues>\n            -7.1166411042213440e-02 6.3150741159915924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7555 -6.6879019141197205e-03</internalNodes>\n          <leafValues>\n            -1.4211960136890411e-01 5.1007200032472610e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7556 -2.1278159320354462e-01</internalNodes>\n          <leafValues>\n            1.7479549348354340e-01 -1.6866499558091164e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7557 4.3913610279560089e-02</internalNodes>\n          <leafValues>\n            -7.9228030517697334e-03 5.9994518756866455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7558 3.0486818868666887e-03</internalNodes>\n          <leafValues>\n            2.7880100533366203e-02 -1.4996689558029175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7559 1.7128599574789405e-03</internalNodes>\n          <leafValues>\n            -6.1575889587402344e-02 1.0793119668960571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7560 -1.3061589561402798e-02</internalNodes>\n          <leafValues>\n            -3.5864189267158508e-01 1.2332689948379993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7561 1.4779239427298307e-03</internalNodes>\n          <leafValues>\n            -5.5280618369579315e-02 7.6400339603424072e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7562 -7.4117183685302734e-02</internalNodes>\n          <leafValues>\n            3.3055660128593445e-01 -5.4406579583883286e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7563 4.1532788425683975e-02</internalNodes>\n          <leafValues>\n            1.2762749567627907e-02 -3.4091010689735413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7564 -1.6474310308694839e-02</internalNodes>\n          <leafValues>\n            -1.1935900151729584e-01 3.5997871309518814e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7565 -1.3384450227022171e-02</internalNodes>\n          <leafValues>\n            1.4927010238170624e-01 -3.7151250988245010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7566 -4.3293130584061146e-03</internalNodes>\n          <leafValues>\n            -1.5257209539413452e-01 2.0008029416203499e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7567 3.7254339549690485e-03</internalNodes>\n          <leafValues>\n            3.8249280303716660e-02 -1.3562840223312378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7568 -3.5788780078291893e-03</internalNodes>\n          <leafValues>\n            1.1951140314340591e-01 -5.1356971263885498e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7569 9.0936541557312012e-02</internalNodes>\n          <leafValues>\n            -9.6294376999139786e-03 5.0582927465438843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7570 -3.1301870476454496e-03</internalNodes>\n          <leafValues>\n            2.4587530642747879e-02 -1.5752519667148590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7571 -3.0295769684016705e-03</internalNodes>\n          <leafValues>\n            -9.6669957041740417e-02 4.7402460128068924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7572 -3.1865050550550222e-03</internalNodes>\n          <leafValues>\n            3.5035319626331329e-02 -4.0841709822416306e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7573 4.4836260378360748e-02</internalNodes>\n          <leafValues>\n            -7.4580628424882889e-03 6.5190207958221436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7574 -6.4811948686838150e-03</internalNodes>\n          <leafValues>\n            1.3163930177688599e-01 -3.6060128360986710e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7575 -2.0486880093812943e-03</internalNodes>\n          <leafValues>\n            -1.1097510159015656e-01 5.1011908799409866e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7576 4.9175620079040527e-02</internalNodes>\n          <leafValues>\n            5.1457029767334461e-03 -8.9148598909378052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7577 8.4772880654782057e-04</internalNodes>\n          <leafValues>\n            -9.0741790831089020e-02 4.4853020459413528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7578 -1.6545709222555161e-02</internalNodes>\n          <leafValues>\n            2.5329568982124329e-01 -1.6997080296278000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7579 6.9274050183594227e-03</internalNodes>\n          <leafValues>\n            3.8941461592912674e-02 -1.3961300253868103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7580 -6.5109939314424992e-03</internalNodes>\n          <leafValues>\n            1.5610300004482269e-01 -2.4493880569934845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7581 -4.9708629958331585e-03</internalNodes>\n          <leafValues>\n            -9.8298586905002594e-02 5.7903841137886047e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7582 1.3074609637260437e-01</internalNodes>\n          <leafValues>\n            -2.7071859221905470e-04 1.0000669956207275e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7583 -2.6705920696258545e-02</internalNodes>\n          <leafValues>\n            -4.2577031254768372e-01 1.0705970227718353e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7584 -1.0329060256481171e-01</internalNodes>\n          <leafValues>\n            2.5896188616752625e-01 -1.8414590507745743e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7585 -2.0166130736470222e-02</internalNodes>\n          <leafValues>\n            -1.1455850303173065e-01 4.0439568459987640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7586 -4.2215920984745026e-03</internalNodes>\n          <leafValues>\n            4.3039258569478989e-02 -4.8735860735177994e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7587 -1.0038839653134346e-02</internalNodes>\n          <leafValues>\n            7.1608737111091614e-02 -6.6204607486724854e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7588 1.5833059325814247e-02</internalNodes>\n          <leafValues>\n            -3.2066859304904938e-02 8.9950896799564362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7589 3.4065160434693098e-03</internalNodes>\n          <leafValues>\n            4.7216009348630905e-02 -1.0898789763450623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7590 -9.8251160234212875e-03</internalNodes>\n          <leafValues>\n            1.0213229805231094e-01 -5.2902109920978546e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7591 1.6804629936814308e-02</internalNodes>\n          <leafValues>\n            -3.7189990282058716e-02 1.3787649571895599e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7592 8.5175316780805588e-03</internalNodes>\n          <leafValues>\n            2.7141440659761429e-02 -1.3569560647010803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7593 -6.3797592883929610e-04</internalNodes>\n          <leafValues>\n            6.9217190146446228e-02 -9.0696737170219421e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7594 -9.6052087610587478e-04</internalNodes>\n          <leafValues>\n            2.2472479939460754e-01 -2.4032639339566231e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7595 7.2245922638103366e-04</internalNodes>\n          <leafValues>\n            -4.6731200069189072e-02 9.6905507147312164e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7596 1.0769399814307690e-03</internalNodes>\n          <leafValues>\n            3.8259491324424744e-02 -6.6674157977104187e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7597 4.1620191186666489e-02</internalNodes>\n          <leafValues>\n            9.3473913148045540e-03 -4.9046689271926880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7598 -8.1712089013308287e-04</internalNodes>\n          <leafValues>\n            5.2797440439462662e-02 -9.6458092331886292e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7599 6.2240879051387310e-03</internalNodes>\n          <leafValues>\n            -3.5350788384675980e-02 1.6484160721302032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7600 2.0862540695816278e-03</internalNodes>\n          <leafValues>\n            3.3958710730075836e-02 -1.3114009797573090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7601 4.2804637923836708e-03</internalNodes>\n          <leafValues>\n            3.0104041099548340e-01 -1.6245450824499130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7602 -3.3040030393749475e-04</internalNodes>\n          <leafValues>\n            -1.1665459722280502e-01 3.8146208971738815e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7603 2.8100309427827597e-03</internalNodes>\n          <leafValues>\n            4.1940510272979736e-02 -1.1180300265550613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7604 1.9832739606499672e-02</internalNodes>\n          <leafValues>\n            -1.1701569892466068e-02 2.0122130215167999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7605 7.0879682898521423e-02</internalNodes>\n          <leafValues>\n            -1.8197819590568542e-02 2.5429588556289673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7606 -8.3893969655036926e-02</internalNodes>\n          <leafValues>\n            -3.8719230890274048e-01 1.1727290228009224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7607 2.8477620333433151e-02</internalNodes>\n          <leafValues>\n            1.3701519928872585e-02 -3.2496619224548340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7608 1.2077310122549534e-02</internalNodes>\n          <leafValues>\n            -2.3975890129804611e-02 2.5232788920402527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7609 -7.5613409280776978e-02</internalNodes>\n          <leafValues>\n            -6.0866451263427734e-01 8.2847801968455315e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7610 -1.7563860863447189e-02</internalNodes>\n          <leafValues>\n            1.0811589658260345e-01 -2.8622759506106377e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7611 1.1809109710156918e-02</internalNodes>\n          <leafValues>\n            3.4758269786834717e-02 -1.4444710314273834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7612 3.3459219336509705e-01</internalNodes>\n          <leafValues>\n            3.5104870330542326e-03 -9.1507577896118164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7613 9.8447836935520172e-02</internalNodes>\n          <leafValues>\n            -1.0290330275893211e-02 4.7943019866943359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7614 -4.0277838706970215e-02</internalNodes>\n          <leafValues>\n            -7.3793828487396240e-01 4.8832078464329243e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7615 4.6712718904018402e-03</internalNodes>\n          <leafValues>\n            2.5037309154868126e-02 -1.7003759741783142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7616 1.3958489894866943e-01</internalNodes>\n          <leafValues>\n            1.9962170626968145e-03 -7.1547168493270874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7617 6.9742716848850250e-02</internalNodes>\n          <leafValues>\n            -8.4846932440996170e-03 5.5378282070159912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7618 4.0283710695803165e-03</internalNodes>\n          <leafValues>\n            -1.6718029975891113e-02 2.3914240300655365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7619 1.0911709628999233e-02</internalNodes>\n          <leafValues>\n            1.5781659632921219e-02 -2.6813709735870361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7620 -6.7120362073183060e-03</internalNodes>\n          <leafValues>\n            1.1087659746408463e-01 -3.1365878880023956e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7621 -1.3467820361256599e-02</internalNodes>\n          <leafValues>\n            -2.0741519331932068e-01 2.3459080606698990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7622 -2.1431609056890011e-03</internalNodes>\n          <leafValues>\n            7.8274592757225037e-02 -2.7959430590271950e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7623 1.5163370408117771e-02</internalNodes>\n          <leafValues>\n            2.1727830171585083e-02 -1.8995440006256104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7624 -1.8551949411630630e-02</internalNodes>\n          <leafValues>\n            1.1164160072803497e-01 -3.0374029651284218e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7625 -1.1083459854125977e-01</internalNodes>\n          <leafValues>\n            -5.6379908323287964e-01 7.6859779655933380e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7626 5.6210728362202644e-03</internalNodes>\n          <leafValues>\n            3.2930258661508560e-02 -1.0337010025978088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7627 3.0593289993703365e-03</internalNodes>\n          <leafValues>\n            -6.8871803581714630e-02 6.0389719903469086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7628 -6.9845258258283138e-04</internalNodes>\n          <leafValues>\n            3.8080908358097076e-02 -7.0112928748130798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7629 -1.3236569939181209e-03</internalNodes>\n          <leafValues>\n            7.5004093348979950e-02 -6.3950046896934509e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7630 -1.6736539546400309e-03</internalNodes>\n          <leafValues>\n            -1.0580399632453918e-01 4.9476388841867447e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7631 7.0728380233049393e-03</internalNodes>\n          <leafValues>\n            -3.6582119762897491e-02 1.3126540184020996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7632 1.8164990469813347e-03</internalNodes>\n          <leafValues>\n            3.9953831583261490e-02 -5.1589578390121460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7633 4.1909920983016491e-03</internalNodes>\n          <leafValues>\n            4.8665199428796768e-02 -1.0598509758710861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7634 1.1940020322799683e-01</internalNodes>\n          <leafValues>\n            -6.7811049520969391e-03 7.4523490667343140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7635 -1.4965030131861567e-03</internalNodes>\n          <leafValues>\n            6.6805936396121979e-02 -6.7798472940921783e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7636 -1.1722999811172485e-01</internalNodes>\n          <leafValues>\n            -8.7860488891601562e-01 1.8648250261321664e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7637 3.2925528939813375e-03</internalNodes>\n          <leafValues>\n            3.5634901374578476e-02 -1.5030789375305176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7638 6.8493567407131195e-02</internalNodes>\n          <leafValues>\n            -9.8042488098144531e-03 3.0161941051483154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7639 2.1837449166923761e-03</internalNodes>\n          <leafValues>\n            -5.3420849144458771e-02 8.5626326501369476e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7640 6.9181360304355621e-03</internalNodes>\n          <leafValues>\n            -4.3685518205165863e-02 1.2706759572029114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7641 -1.5878600534051657e-03</internalNodes>\n          <leafValues>\n            -1.2640440464019775e-01 3.9026089012622833e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7642 3.8289129734039307e-03</internalNodes>\n          <leafValues>\n            3.9025381207466125e-02 -7.9675689339637756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7643 1.2253260239958763e-02</internalNodes>\n          <leafValues>\n            -4.4809628278017044e-02 9.7772710025310516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7644 6.4031239598989487e-03</internalNodes>\n          <leafValues>\n            3.3579610288143158e-02 -1.3300299644470215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7645 7.0500532165169716e-03</internalNodes>\n          <leafValues>\n            -5.1121409982442856e-02 1.1772400140762329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7646 1.3216730207204819e-02</internalNodes>\n          <leafValues>\n            2.6454009115695953e-02 -1.3190220296382904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7647 6.7367991432547569e-03</internalNodes>\n          <leafValues>\n            -1.0153199546039104e-02 4.1570469737052917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7648 2.4951510131359100e-03</internalNodes>\n          <leafValues>\n            1.4631019905209541e-02 -1.6560359299182892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7649 3.8302998989820480e-02</internalNodes>\n          <leafValues>\n            7.2940620593726635e-03 -6.0744607448577881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7650 -1.6491059213876724e-02</internalNodes>\n          <leafValues>\n            1.6788350045681000e-01 -1.5062170103192329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7651 -2.7071639895439148e-02</internalNodes>\n          <leafValues>\n            -4.6381551027297974e-01 1.0335059836506844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7652 -5.8714959770441055e-02</internalNodes>\n          <leafValues>\n            1.4860999584197998e-01 -1.6663730144500732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7653 9.2380512505769730e-03</internalNodes>\n          <leafValues>\n            4.3830338865518570e-02 -1.0612689703702927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7654 3.0808299779891968e-03</internalNodes>\n          <leafValues>\n            -3.6781489849090576e-02 8.9559197425842285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7655 2.9910521116107702e-03</internalNodes>\n          <leafValues>\n            1.6019189730286598e-02 -2.9177838563919067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7656 4.4786609709262848e-02</internalNodes>\n          <leafValues>\n            -6.7814979702234268e-03 3.6695161461830139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7657 -2.9985690489411354e-03</internalNodes>\n          <leafValues>\n            -9.0316072106361389e-02 4.8048041760921478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7658 -8.9135952293872833e-03</internalNodes>\n          <leafValues>\n            1.6903600096702576e-01 -2.1880460903048515e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7659 -3.9598200470209122e-02</internalNodes>\n          <leafValues>\n            -4.4884848594665527e-01 1.0027219541370869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7660 -3.7064809352159500e-02</internalNodes>\n          <leafValues>\n            -4.4183561205863953e-01 2.2891450207680464e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7661 -9.3376229051500559e-04</internalNodes>\n          <leafValues>\n            7.3633059859275818e-02 -5.8901689946651459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7662 8.0887757241725922e-02</internalNodes>\n          <leafValues>\n            -2.4963580071926117e-02 6.0303758829832077e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7663 -3.0697569251060486e-02</internalNodes>\n          <leafValues>\n            -1.7819009721279144e-01 2.6090290397405624e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7664 -1.8495260179042816e-01</internalNodes>\n          <leafValues>\n            3.4901228547096252e-01 -3.8219890557229519e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7665 1.1218319647014141e-02</internalNodes>\n          <leafValues>\n            -2.6781549677252769e-02 1.7431420087814331e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7666 6.2761609442532063e-03</internalNodes>\n          <leafValues>\n            1.4532440342009068e-02 -1.1864569783210754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7667 -8.8509358465671539e-03</internalNodes>\n          <leafValues>\n            -1.0515689849853516e-01 5.7655680924654007e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7668 -3.8575798273086548e-02</internalNodes>\n          <leafValues>\n            1.5004560351371765e-01 -3.6080200225114822e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7669 -5.2720211446285248e-02</internalNodes>\n          <leafValues>\n            -4.7556790709495544e-01 1.1126070283353329e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>392</maxWeakCount>\n      <stageThreshold>-1.1210759878158569e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 7670 -3.8506588898599148e-03</internalNodes>\n          <leafValues>\n            1.1209569871425629e-01 -2.7330291271209717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7671 -4.9427259713411331e-02</internalNodes>\n          <leafValues>\n            3.9270120859146118e-01 -3.9871849119663239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7672 1.3538210187107325e-03</internalNodes>\n          <leafValues>\n            -1.5965040028095245e-01 1.2521059811115265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7673 3.9328690618276596e-03</internalNodes>\n          <leafValues>\n            -3.4043839573860168e-01 4.7437489032745361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7674 2.3011169396340847e-03</internalNodes>\n          <leafValues>\n            -2.0827749371528625e-01 7.4891701340675354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7675 5.9128052089363337e-04</internalNodes>\n          <leafValues>\n            -2.0842720568180084e-01 3.7798780947923660e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7676 1.7478190129622817e-03</internalNodes>\n          <leafValues>\n            -1.9635179638862610e-01 6.4582027494907379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7677 5.8316658250987530e-03</internalNodes>\n          <leafValues>\n            3.1582038849592209e-02 -1.9084580242633820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7678 1.2435190146788955e-03</internalNodes>\n          <leafValues>\n            -5.3213578462600708e-01 2.2162230685353279e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7679 1.6247769817709923e-03</internalNodes>\n          <leafValues>\n            -1.3276180624961853e-01 8.0135673284530640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7680 -2.2734089288860559e-03</internalNodes>\n          <leafValues>\n            -1.7344699800014496e-01 5.4782990366220474e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7681 5.7859059423208237e-02</internalNodes>\n          <leafValues>\n            -1.5829589683562517e-03 -6.6367942094802856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7682 5.7728560641407967e-03</internalNodes>\n          <leafValues>\n            3.9815168827772141e-02 -2.2919249534606934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7683 -4.4039610773324966e-02</internalNodes>\n          <leafValues>\n            2.1793280541896820e-01 -2.3534009233117104e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7684 3.0226248782128096e-04</internalNodes>\n          <leafValues>\n            -8.9419580996036530e-02 1.1042869836091995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7685 -3.4470859915018082e-02</internalNodes>\n          <leafValues>\n            -3.6666679382324219e-01 2.7858279645442963e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7686 3.2460398972034454e-02</internalNodes>\n          <leafValues>\n            1.5733880922198296e-02 -4.9733749032020569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7687 9.9335552658885717e-04</internalNodes>\n          <leafValues>\n            -9.1800943017005920e-02 8.4003977477550507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7688 -2.3473830893635750e-02</internalNodes>\n          <leafValues>\n            -4.4375669956207275e-01 1.5148010104894638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7689 -2.9013049788773060e-03</internalNodes>\n          <leafValues>\n            5.4642349481582642e-02 -2.0156529545783997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7690 -6.5832951804623008e-04</internalNodes>\n          <leafValues>\n            -1.2285769730806351e-01 5.6707888841629028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7691 2.0407158881425858e-03</internalNodes>\n          <leafValues>\n            -1.0899069905281067e-01 5.9933699667453766e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7692 -1.3161499984562397e-02</internalNodes>\n          <leafValues>\n            1.4091959595680237e-01 -4.7396201640367508e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7693 -4.2273551225662231e-03</internalNodes>\n          <leafValues>\n            -1.2498269975185394e-01 5.1124658435583115e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7694 7.6580629684031010e-03</internalNodes>\n          <leafValues>\n            3.8773480802774429e-02 -1.8095690011978149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7695 -5.1912548951804638e-03</internalNodes>\n          <leafValues>\n            1.2545259296894073e-01 -4.4012580066919327e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7696 1.1874590069055557e-01</internalNodes>\n          <leafValues>\n            -1.4801479876041412e-02 4.0071210265159607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7697 4.5105828903615475e-03</internalNodes>\n          <leafValues>\n            5.3336851298809052e-02 -1.5709049999713898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7698 4.5015379786491394e-02</internalNodes>\n          <leafValues>\n            -3.3278778195381165e-02 2.0535139739513397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7699 -2.0866969134658575e-03</internalNodes>\n          <leafValues>\n            4.2103528976440430e-02 -1.0361789911985397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7700 -1.3008449459448457e-03</internalNodes>\n          <leafValues>\n            6.4424470067024231e-02 -9.7897060215473175e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7701 -1.3591230381280184e-03</internalNodes>\n          <leafValues>\n            7.2987347841262817e-02 -9.4451002776622772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7702 -7.4056759476661682e-03</internalNodes>\n          <leafValues>\n            -1.5320360660552979e-01 5.3242001682519913e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7703 2.0208859350532293e-03</internalNodes>\n          <leafValues>\n            -3.3245529979467392e-02 6.0319710522890091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7704 -1.0342149995267391e-02</internalNodes>\n          <leafValues>\n            8.5510559380054474e-02 -8.3920828998088837e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7705 2.4865860119462013e-02</internalNodes>\n          <leafValues>\n            1.2639460153877735e-02 -3.4757199883460999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7706 9.9798657000064850e-02</internalNodes>\n          <leafValues>\n            -1.8823970109224319e-02 3.4465000033378601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7707 2.1201390773057938e-02</internalNodes>\n          <leafValues>\n            -1.0467799752950668e-01 3.1494509428739548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7708 -5.1909908652305603e-03</internalNodes>\n          <leafValues>\n            -1.5792340040206909e-01 5.0269961357116699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7709 6.6961228847503662e-02</internalNodes>\n          <leafValues>\n            3.2651789952069521e-03 -5.6049168109893799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7710 1.1809109710156918e-02</internalNodes>\n          <leafValues>\n            -2.8513789176940918e-02 2.1226319670677185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7711 -1.7645660787820816e-02</internalNodes>\n          <leafValues>\n            -4.4503360986709595e-01 5.0029670819640160e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7712 -6.8918941542506218e-03</internalNodes>\n          <leafValues>\n            -4.2199620604515076e-01 1.4813040383160114e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7713 2.1675550378859043e-03</internalNodes>\n          <leafValues>\n            -1.3125190138816833e-01 6.7140422761440277e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7714 -3.3283489756286144e-03</internalNodes>\n          <leafValues>\n            -1.0765329748392105e-01 5.3610768169164658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7715 4.8869621008634567e-02</internalNodes>\n          <leafValues>\n            6.4427889883518219e-03 -6.4563280344009399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7716 7.2693959809839725e-03</internalNodes>\n          <leafValues>\n            -3.9603620767593384e-02 1.5369640290737152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7717 8.8849991559982300e-02</internalNodes>\n          <leafValues>\n            -1.3234400190412998e-02 2.8555288910865784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7718 1.5455950051546097e-02</internalNodes>\n          <leafValues>\n            3.9694100618362427e-02 -1.7206269502639771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7719 -1.3747200369834900e-02</internalNodes>\n          <leafValues>\n            1.0079269856214523e-01 -4.3812029063701630e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7720 -2.2805750370025635e-02</internalNodes>\n          <leafValues>\n            1.5014170110225677e-01 -4.3767798691987991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7721 2.3838039487600327e-02</internalNodes>\n          <leafValues>\n            5.3901281207799911e-02 -1.4610290527343750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7722 -1.0181629657745361e-01</internalNodes>\n          <leafValues>\n            3.1905040144920349e-01 -2.0011590793728828e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7723 7.1074268780648708e-03</internalNodes>\n          <leafValues>\n            5.6244179606437683e-02 -1.2587560713291168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7724 7.6678092591464520e-04</internalNodes>\n          <leafValues>\n            -1.0704190284013748e-01 6.6436298191547394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7725 3.7424071342684329e-04</internalNodes>\n          <leafValues>\n            -3.7826299667358398e-02 4.7234989702701569e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7726 -2.0078169181942940e-03</internalNodes>\n          <leafValues>\n            -9.3316286802291870e-02 6.7641608417034149e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7727 3.3469051122665405e-02</internalNodes>\n          <leafValues>\n            -2.7926150709390640e-02 2.5293371081352234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7728 -1.5507030300796032e-02</internalNodes>\n          <leafValues>\n            -5.5145150423049927e-01 1.2821160256862640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7729 -1.9248709082603455e-02</internalNodes>\n          <leafValues>\n            5.2688628435134888e-02 -3.0364990234375000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7730 -1.7556030303239822e-02</internalNodes>\n          <leafValues>\n            -3.3247348666191101e-01 1.8780380487442017e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7731 1.9324380904436111e-02</internalNodes>\n          <leafValues>\n            -3.2458461821079254e-02 9.4986997544765472e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7732 -2.0367160439491272e-02</internalNodes>\n          <leafValues>\n            1.1348400264978409e-01 -5.8434821665287018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7733 5.1770661957561970e-03</internalNodes>\n          <leafValues>\n            4.7030560672283173e-02 -8.4960326552391052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7734 1.9768481142818928e-03</internalNodes>\n          <leafValues>\n            -7.0794142782688141e-02 1.0375150293111801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7735 -7.0216279709711671e-04</internalNodes>\n          <leafValues>\n            3.0781729146838188e-02 -1.0170820355415344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7736 -2.4710369762033224e-03</internalNodes>\n          <leafValues>\n            5.1577620208263397e-02 -1.1920809745788574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7737 2.3278540000319481e-02</internalNodes>\n          <leafValues>\n            3.0191570520401001e-02 -9.3937888741493225e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7738 1.3673819601535797e-02</internalNodes>\n          <leafValues>\n            -2.6758959516882896e-02 2.4014200270175934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7739 -8.3967903628945351e-03</internalNodes>\n          <leafValues>\n            -5.0403770059347153e-02 2.2368110716342926e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7740 4.7878470271825790e-02</internalNodes>\n          <leafValues>\n            -2.3758050054311752e-02 2.6486390829086304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7741 -2.2483520209789276e-02</internalNodes>\n          <leafValues>\n            -2.3042780160903931e-01 1.2840679846704006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7742 -1.0883989743888378e-02</internalNodes>\n          <leafValues>\n            -1.8380180001258850e-01 3.2639708369970322e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7743 -4.4901989400386810e-02</internalNodes>\n          <leafValues>\n            2.4195960164070129e-01 -2.6507280766963959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7744 -8.3042927086353302e-02</internalNodes>\n          <leafValues>\n            -8.0491328239440918e-01 7.5420029461383820e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7745 -3.7240530364215374e-03</internalNodes>\n          <leafValues>\n            -8.0228239297866821e-02 3.1584471464157104e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7746 -7.3502189479768276e-03</internalNodes>\n          <leafValues>\n            6.8962231278419495e-02 -9.7391247749328613e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7747 5.5313981138169765e-03</internalNodes>\n          <leafValues>\n            -3.0180720612406731e-02 6.0174800455570221e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7748 1.7293080687522888e-02</internalNodes>\n          <leafValues>\n            4.0732100605964661e-02 -1.5600660443305969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7749 -3.3298740163445473e-03</internalNodes>\n          <leafValues>\n            4.1001088917255402e-02 -7.6909027993679047e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7750 -4.9308240413665771e-03</internalNodes>\n          <leafValues>\n            1.7031539976596832e-01 -4.0582239627838135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7751 8.6011141538619995e-03</internalNodes>\n          <leafValues>\n            3.1656920909881592e-02 -1.4050039649009705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7752 1.3674340210855007e-02</internalNodes>\n          <leafValues>\n            -2.1845709532499313e-02 3.0128660798072815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7753 -1.1375419795513153e-02</internalNodes>\n          <leafValues>\n            -1.5687340497970581e-01 2.8256019577383995e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7754 -4.2750681750476360e-03</internalNodes>\n          <leafValues>\n            -1.2155970185995102e-01 5.0146799534559250e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7755 1.6484759747982025e-02</internalNodes>\n          <leafValues>\n            -3.6557890474796295e-02 1.2583729624748230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7756 -3.9056900888681412e-02</internalNodes>\n          <leafValues>\n            2.4053129553794861e-01 -2.6983890682458878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7757 -5.7546719908714294e-03</internalNodes>\n          <leafValues>\n            -1.3337680697441101e-01 2.0266020670533180e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7758 5.1583289168775082e-03</internalNodes>\n          <leafValues>\n            6.4666390419006348e-02 -1.1428499966859818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7759 -3.0463270377367735e-03</internalNodes>\n          <leafValues>\n            4.5018680393695831e-02 -8.1573590636253357e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7760 7.4743861332535744e-03</internalNodes>\n          <leafValues>\n            3.1246710568666458e-02 -1.8929730355739594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7761 1.6480450285598636e-03</internalNodes>\n          <leafValues>\n            -2.5895040482282639e-02 1.8652880191802979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7762 4.5184311456978321e-03</internalNodes>\n          <leafValues>\n            5.4803468286991119e-02 -1.0444000363349915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7763 -3.3209871035069227e-03</internalNodes>\n          <leafValues>\n            4.3959401547908783e-02 -8.1240482628345490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7764 5.2665979601442814e-03</internalNodes>\n          <leafValues>\n            -4.4853471219539642e-02 1.1343909800052643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7765 -4.7867707908153534e-03</internalNodes>\n          <leafValues>\n            7.6319009065628052e-02 -2.8551170602440834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7766 -4.4710118323564529e-02</internalNodes>\n          <leafValues>\n            -3.4795719385147095e-01 1.4928230084478855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7767 4.3861730955541134e-03</internalNodes>\n          <leafValues>\n            7.4540950357913971e-02 -4.6298071742057800e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7768 9.2240851372480392e-03</internalNodes>\n          <leafValues>\n            -5.8626178652048111e-02 9.8693408071994781e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7769 -1.1849260190501809e-03</internalNodes>\n          <leafValues>\n            1.0023140162229538e-01 -5.6729640811681747e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7770 -1.8546540290117264e-02</internalNodes>\n          <leafValues>\n            -3.8236171007156372e-01 1.5141529962420464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7771 3.4743950236588717e-03</internalNodes>\n          <leafValues>\n            2.6523910462856293e-02 -1.1289829760789871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7772 1.0274019837379456e-01</internalNodes>\n          <leafValues>\n            -6.6097700037062168e-03 7.7561777830123901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7773 2.0479390025138855e-01</internalNodes>\n          <leafValues>\n            6.9657550193369389e-03 -3.5988980531692505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7774 1.2094060331583023e-01</internalNodes>\n          <leafValues>\n            1.8174450844526291e-02 -3.3531171083450317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7775 1.2224229983985424e-02</internalNodes>\n          <leafValues>\n            -3.1454049050807953e-02 7.9004973173141479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7776 1.5176460146903992e-01</internalNodes>\n          <leafValues>\n            -1.0826669633388519e-02 4.5583090186119080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7777 -9.9692150950431824e-02</internalNodes>\n          <leafValues>\n            -3.5422179102897644e-01 3.1256359070539474e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7778 -6.3465638086199760e-03</internalNodes>\n          <leafValues>\n            -1.1098819971084595e-01 5.3735308349132538e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7779 -6.7007602192461491e-03</internalNodes>\n          <leafValues>\n            1.8910090625286102e-01 -3.0930159613490105e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7780 -1.0101199895143509e-01</internalNodes>\n          <leafValues>\n            2.3763500154018402e-01 -2.2213969379663467e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7781 4.6111021190881729e-02</internalNodes>\n          <leafValues>\n            -3.7543330341577530e-02 4.8733759671449661e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7782 1.4146809279918671e-01</internalNodes>\n          <leafValues>\n            1.1148019693791866e-02 -5.1474362611770630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7783 -1.1394499801099300e-02</internalNodes>\n          <leafValues>\n            -7.0824302732944489e-02 3.1759370118379593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7784 3.1667309813201427e-03</internalNodes>\n          <leafValues>\n            4.1177280247211456e-02 -1.4900580048561096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7785 8.9959725737571716e-03</internalNodes>\n          <leafValues>\n            -4.1186511516571045e-02 7.2816781699657440e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7786 -6.1559271067380905e-02</internalNodes>\n          <leafValues>\n            -7.3937642574310303e-01 6.6859079524874687e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7787 -3.5607949830591679e-03</internalNodes>\n          <leafValues>\n            1.3260509818792343e-02 -6.1150819063186646e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7788 -1.2476339936256409e-01</internalNodes>\n          <leafValues>\n            -7.8580498695373535e-01 6.2701301649212837e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7789 6.2739187479019165e-01</internalNodes>\n          <leafValues>\n            3.5465341061353683e-03 -7.3363810777664185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7790 3.4219160676002502e-02</internalNodes>\n          <leafValues>\n            8.2031572237610817e-03 -5.3330212831497192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7791 1.0574149928288534e-04</internalNodes>\n          <leafValues>\n            -5.0354700535535812e-02 4.7019489109516144e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7792 -3.2112289220094681e-02</internalNodes>\n          <leafValues>\n            1.7085300385951996e-01 -3.4734141081571579e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7793 -1.6140839084982872e-02</internalNodes>\n          <leafValues>\n            -6.4753092825412750e-02 5.6943111121654510e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7794 1.9737280905246735e-02</internalNodes>\n          <leafValues>\n            -1.8065180629491806e-02 2.6183420419692993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7795 2.7895450592041016e-02</internalNodes>\n          <leafValues>\n            1.7641060054302216e-02 -3.0951151251792908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7796 3.5123159177601337e-03</internalNodes>\n          <leafValues>\n            -8.3447068929672241e-02 6.5015971660614014e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7797 -4.4775637798011303e-03</internalNodes>\n          <leafValues>\n            -1.2423449754714966e-01 4.7061119228601456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7798 -6.1348858289420605e-03</internalNodes>\n          <leafValues>\n            1.0248269885778427e-01 -5.9700958430767059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7799 1.4047959819436073e-02</internalNodes>\n          <leafValues>\n            1.4833379536867142e-02 -1.1229590326547623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7800 1.1907520238310099e-03</internalNodes>\n          <leafValues>\n            4.9986690282821655e-02 -1.1696290224790573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7801 1.7617389559745789e-02</internalNodes>\n          <leafValues>\n            -1.7687700688838959e-02 1.5416090190410614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7802 -4.9166870303452015e-03</internalNodes>\n          <leafValues>\n            -1.0227180272340775e-01 4.6994391828775406e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7803 -3.9010820910334587e-03</internalNodes>\n          <leafValues>\n            1.4229449629783630e-01 -4.5312799513339996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7804 -1.7458139918744564e-03</internalNodes>\n          <leafValues>\n            -1.0853090137243271e-01 7.5689561665058136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7805 -1.2748650042340159e-03</internalNodes>\n          <leafValues>\n            2.2384520620107651e-02 -7.5150527060031891e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7806 -7.9109556972980499e-02</internalNodes>\n          <leafValues>\n            4.8773929476737976e-01 -9.6941655501723289e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7807 -1.4103270135819912e-02</internalNodes>\n          <leafValues>\n            -2.3263689875602722e-01 1.5091559849679470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7808 -2.2076119203120470e-03</internalNodes>\n          <leafValues>\n            1.9268399477005005e-01 -2.5429060682654381e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7809 3.9626058191061020e-02</internalNodes>\n          <leafValues>\n            -1.5630759298801422e-02 1.2270029634237289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7810 -7.8973636846058071e-05</internalNodes>\n          <leafValues>\n            -7.3257647454738617e-02 6.5848693251609802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7811 5.1964947488158941e-04</internalNodes>\n          <leafValues>\n            -1.1366380006074905e-01 8.1133492290973663e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7812 -1.1722079943865538e-03</internalNodes>\n          <leafValues>\n            -9.7602643072605133e-02 5.9839569032192230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7813 3.9326730184257030e-03</internalNodes>\n          <leafValues>\n            -5.7026151567697525e-02 4.2226128280162811e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7814 -8.7386153638362885e-02</internalNodes>\n          <leafValues>\n            -3.7896049022674561e-01 1.2869279831647873e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7815 -2.1324040368199348e-02</internalNodes>\n          <leafValues>\n            3.0886441469192505e-01 -1.7734240740537643e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7816 -2.3385910317301750e-03</internalNodes>\n          <leafValues>\n            -1.1322320252656937e-01 4.3914940208196640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7817 1.5183660434558988e-03</internalNodes>\n          <leafValues>\n            -1.4337620139122009e-01 3.9441708475351334e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7818 -1.1085519939661026e-01</internalNodes>\n          <leafValues>\n            7.4037587642669678e-01 -6.7982021719217300e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7819 -1.0009120218455791e-02</internalNodes>\n          <leafValues>\n            -3.9203230291604996e-02 3.1749211251735687e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7820 -2.0916430279612541e-02</internalNodes>\n          <leafValues>\n            1.8927730619907379e-01 -3.0490230768918991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7821 7.4165337719023228e-03</internalNodes>\n          <leafValues>\n            4.6797450631856918e-02 -1.1113610118627548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7822 3.3599510788917542e-03</internalNodes>\n          <leafValues>\n            -4.5254990458488464e-02 1.1508409678936005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7823 -5.7189498329535127e-04</internalNodes>\n          <leafValues>\n            -6.3472077250480652e-02 5.2049949765205383e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7824 -6.8120293319225311e-02</internalNodes>\n          <leafValues>\n            5.0806027650833130e-01 -9.5091843977570534e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7825 2.5180799420922995e-03</internalNodes>\n          <leafValues>\n            5.5305320769548416e-02 -1.4402769505977631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7826 5.6055251508951187e-02</internalNodes>\n          <leafValues>\n            -2.3359170183539391e-02 2.1935400366783142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7827 -4.0386710315942764e-02</internalNodes>\n          <leafValues>\n            -1.9183440506458282e-01 7.8779058530926704e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7828 3.1857648864388466e-03</internalNodes>\n          <leafValues>\n            2.7605779469013214e-02 -2.0084309577941895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7829 2.5159550830721855e-02</internalNodes>\n          <leafValues>\n            1.1265699751675129e-02 -4.3628180027008057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7830 -2.7010419871658087e-03</internalNodes>\n          <leafValues>\n            1.1336500197649002e-01 -4.6904269605875015e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7831 -3.0056890100240707e-02</internalNodes>\n          <leafValues>\n            -6.2368732690811157e-01 7.3214052245020866e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7832 -1.2088020145893097e-01</internalNodes>\n          <leafValues>\n            -8.6428368091583252e-01 4.3813590891659260e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7833 4.0104859508574009e-03</internalNodes>\n          <leafValues>\n            -5.3471650928258896e-02 7.1113802492618561e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7834 -2.9688570648431778e-03</internalNodes>\n          <leafValues>\n            1.0076630115509033e-01 -4.9233928322792053e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7835 -3.7600689101964235e-03</internalNodes>\n          <leafValues>\n            -2.0928700268268585e-01 2.6549680158495903e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7836 -1.5982619952410460e-03</internalNodes>\n          <leafValues>\n            6.1070188879966736e-02 -7.9623572528362274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7837 5.4285880178213120e-03</internalNodes>\n          <leafValues>\n            3.9766579866409302e-02 -1.1746849864721298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7838 1.0872900020331144e-03</internalNodes>\n          <leafValues>\n            -6.4596228301525116e-02 7.4964426457881927e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7839 -2.8442030306905508e-03</internalNodes>\n          <leafValues>\n            1.1738350242376328e-01 -4.0159400552511215e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7840 3.5546101629734039e-02</internalNodes>\n          <leafValues>\n            1.2194969691336155e-02 -4.2184820771217346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7841 -4.8542950302362442e-02</internalNodes>\n          <leafValues>\n            3.1292769312858582e-01 -1.2773830443620682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7842 -3.0732100829482079e-02</internalNodes>\n          <leafValues>\n            -5.0631237030029297e-01 1.0600729845464230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7843 1.3066929765045643e-02</internalNodes>\n          <leafValues>\n            -5.0003118813037872e-02 4.4005930423736572e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7844 2.9200640320777893e-01</internalNodes>\n          <leafValues>\n            5.3693680092692375e-03 -8.9039158821105957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7845 -8.7579451501369476e-03</internalNodes>\n          <leafValues>\n            9.6666730940341949e-02 -3.1310658901929855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7846 -2.3599369451403618e-03</internalNodes>\n          <leafValues>\n            4.3046280741691589e-02 -1.0992430150508881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7847 6.9077489897608757e-03</internalNodes>\n          <leafValues>\n            -2.9174160212278366e-02 8.9174896478652954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7848 2.0849689841270447e-02</internalNodes>\n          <leafValues>\n            1.2614700198173523e-01 -4.4358100742101669e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7849 -5.8846421539783478e-02</internalNodes>\n          <leafValues>\n            2.1661500632762909e-01 -8.7285088375210762e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7850 2.5576311163604259e-03</internalNodes>\n          <leafValues>\n            -1.1648210138082504e-01 5.4756019264459610e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7851 3.8973900955170393e-03</internalNodes>\n          <leafValues>\n            3.5759489983320236e-02 -9.7868561744689941e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7852 -1.2494160328060389e-03</internalNodes>\n          <leafValues>\n            9.1347962617874146e-02 -5.7817179709672928e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7853 3.4928850363940001e-03</internalNodes>\n          <leafValues>\n            2.0634220913052559e-02 -1.4494930207729340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7854 -1.1378509923815727e-02</internalNodes>\n          <leafValues>\n            2.1203260123729706e-01 -2.4150850251317024e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7855 -4.4060450047254562e-02</internalNodes>\n          <leafValues>\n            4.2267361283302307e-01 -4.7765900380909443e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7856 -8.3084795624017715e-03</internalNodes>\n          <leafValues>\n            -8.4928646683692932e-02 6.0228090733289719e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7857 -9.1945994645357132e-03</internalNodes>\n          <leafValues>\n            7.2318702936172485e-02 -2.0472260192036629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7858 6.5575107932090759e-02</internalNodes>\n          <leafValues>\n            5.0813751295208931e-03 -8.9693188667297363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7859 1.8510420620441437e-01</internalNodes>\n          <leafValues>\n            2.2485901135951281e-03 -7.5125169754028320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7860 -1.7608819901943207e-01</internalNodes>\n          <leafValues>\n            -7.8969222307205200e-01 5.2678477950394154e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7861 9.8349712789058685e-02</internalNodes>\n          <leafValues>\n            2.8081049676984549e-03 -2.5828519463539124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7862 -1.8191979324910790e-04</internalNodes>\n          <leafValues>\n            -8.6206100881099701e-02 5.2294798195362091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7863 -5.2928649820387363e-03</internalNodes>\n          <leafValues>\n            -5.4600238800048828e-02 2.8304630890488625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7864 1.1537299724295735e-03</internalNodes>\n          <leafValues>\n            4.6684168279170990e-02 -1.1234779655933380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7865 -3.8274680264294147e-03</internalNodes>\n          <leafValues>\n            6.0145508497953415e-02 -8.2371100783348083e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7866 -8.6957857012748718e-02</internalNodes>\n          <leafValues>\n            -4.8363038897514343e-01 9.2326821759343147e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7867 -2.4195960722863674e-03</internalNodes>\n          <leafValues>\n            -3.5221140831708908e-02 2.7081709355115891e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7868 -4.7905668616294861e-03</internalNodes>\n          <leafValues>\n            5.8955200016498566e-02 -7.8748136758804321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7869 -4.0910490788519382e-03</internalNodes>\n          <leafValues>\n            -1.7550939321517944e-01 2.6454729959368706e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7870 2.5641750544309616e-03</internalNodes>\n          <leafValues>\n            -3.6814831197261810e-02 1.5140229463577271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7871 5.4726968519389629e-03</internalNodes>\n          <leafValues>\n            3.1243579462170601e-02 -9.7890958189964294e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7872 -1.0310260113328695e-03</internalNodes>\n          <leafValues>\n            -1.2424050271511078e-01 4.0365029126405716e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7873 -1.3030169904232025e-01</internalNodes>\n          <leafValues>\n            1.7106169462203979e-01 -6.9856629706919193e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7874 3.5753389820456505e-03</internalNodes>\n          <leafValues>\n            -2.5437129661440849e-02 2.1967570483684540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7875 8.4238024428486824e-03</internalNodes>\n          <leafValues>\n            2.9582399874925613e-02 -1.7390090227127075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7876 4.1154649108648300e-02</internalNodes>\n          <leafValues>\n            -1.3265499845147133e-02 3.6282411217689514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7877 -1.8620759248733521e-02</internalNodes>\n          <leafValues>\n            -2.2806780040264130e-01 2.1502569317817688e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7878 2.3307619616389275e-02</internalNodes>\n          <leafValues>\n            -2.3047760128974915e-02 2.3208670318126678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7879 4.6518299728631973e-02</internalNodes>\n          <leafValues>\n            1.0585400275886059e-02 -4.6076700091362000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7880 -8.3499401807785034e-02</internalNodes>\n          <leafValues>\n            3.7845119833946228e-01 -1.4105740003287792e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7881 -9.6897013485431671e-02</internalNodes>\n          <leafValues>\n            -3.2995849847793579e-01 6.2883920036256313e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7882 6.9753699935972691e-03</internalNodes>\n          <leafValues>\n            2.4593630805611610e-02 -2.1003679931163788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7883 -3.3859949558973312e-02</internalNodes>\n          <leafValues>\n            1.8927900493144989e-01 -8.7296841666102409e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7884 1.0354740079492331e-03</internalNodes>\n          <leafValues>\n            -6.4493343234062195e-02 8.0192290246486664e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7885 3.9950661361217499e-02</internalNodes>\n          <leafValues>\n            2.5073040276765823e-02 -1.1636939644813538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7886 3.0460350681096315e-03</internalNodes>\n          <leafValues>\n            -3.3754941076040268e-02 1.3324250280857086e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7887 -1.5341850230470300e-03</internalNodes>\n          <leafValues>\n            6.2442861497402191e-02 -5.6061070412397385e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7888 2.0531520713120699e-03</internalNodes>\n          <leafValues>\n            -8.4790043532848358e-02 5.3408049046993256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7889 2.1295580081641674e-03</internalNodes>\n          <leafValues>\n            4.0650319308042526e-02 -1.1124719679355621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7890 -1.5462029725313187e-02</internalNodes>\n          <leafValues>\n            1.3806979358196259e-01 -3.3944208174943924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7891 -2.7878239750862122e-02</internalNodes>\n          <leafValues>\n            -1.0025399923324585e-01 1.3444880023598671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7892 1.7255680635571480e-02</internalNodes>\n          <leafValues>\n            1.5361789613962173e-02 -3.6930799484252930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7893 -1.7870500683784485e-02</internalNodes>\n          <leafValues>\n            5.2870798856019974e-02 -2.5108009576797485e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7894 -1.4443919993937016e-02</internalNodes>\n          <leafValues>\n            -2.2763819992542267e-01 2.0391609519720078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7895 -8.3497241139411926e-03</internalNodes>\n          <leafValues>\n            -8.7055817246437073e-02 3.2707940787076950e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7896 2.7514319866895676e-02</internalNodes>\n          <leafValues>\n            -2.0628409460186958e-02 2.5977128744125366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7897 1.8610119819641113e-02</internalNodes>\n          <leafValues>\n            -8.0523788928985596e-03 1.6925090551376343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7898 -9.5786049962043762e-02</internalNodes>\n          <leafValues>\n            -5.0116628408432007e-01 8.7666641920804977e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7899 1.2036979943513870e-01</internalNodes>\n          <leafValues>\n            9.8632962908595800e-04 -1.0000280141830444e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7900 2.4782579392194748e-02</internalNodes>\n          <leafValues>\n            -1.2519709765911102e-02 3.5919609665870667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7901 -5.0353828817605972e-02</internalNodes>\n          <leafValues>\n            -3.3340519666671753e-01 6.9066900759935379e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7902 3.1298059970140457e-02</internalNodes>\n          <leafValues>\n            1.0963119566440582e-02 -4.0645220875740051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7903 7.4575231410562992e-03</internalNodes>\n          <leafValues>\n            -2.1207600831985474e-02 1.3167420029640198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7904 5.5791479535400867e-03</internalNodes>\n          <leafValues>\n            -3.4098070114850998e-02 1.2983830273151398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7905 5.9088319540023804e-03</internalNodes>\n          <leafValues>\n            -2.6940669864416122e-02 1.6839459538459778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7906 1.7543360590934753e-02</internalNodes>\n          <leafValues>\n            4.2376369237899780e-02 -1.2350399792194366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7907 -9.6103046089410782e-03</internalNodes>\n          <leafValues>\n            5.2223920822143555e-02 -2.5582559406757355e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7908 2.0607879851013422e-03</internalNodes>\n          <leafValues>\n            4.0174130350351334e-02 -1.0548079758882523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7909 -5.3874161094427109e-03</internalNodes>\n          <leafValues>\n            -6.4995579421520233e-02 2.7807140722870827e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7910 1.1102309823036194e-01</internalNodes>\n          <leafValues>\n            -4.9670711159706116e-03 8.1718921661376953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7911 -3.7374150007963181e-02</internalNodes>\n          <leafValues>\n            -6.2611418962478638e-01 3.0927599873393774e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7912 5.0286632031202316e-03</internalNodes>\n          <leafValues>\n            2.4978660047054291e-01 -1.8151100724935532e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7913 2.9225579928606749e-03</internalNodes>\n          <leafValues>\n            -6.0576818883419037e-02 2.6497339829802513e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7914 -5.4296620190143585e-02</internalNodes>\n          <leafValues>\n            -5.7990437746047974e-01 6.5989522263407707e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7915 1.2996720150113106e-02</internalNodes>\n          <leafValues>\n            -2.6128260418772697e-02 9.7030609846115112e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7916 3.3001229166984558e-02</internalNodes>\n          <leafValues>\n            1.4960479922592640e-02 -3.2304659485816956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7917 -1.1660449951887131e-01</internalNodes>\n          <leafValues>\n            2.5725141167640686e-01 -1.2625830247998238e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7918 7.0706337690353394e-02</internalNodes>\n          <leafValues>\n            7.0192231796681881e-03 -6.9260591268539429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7919 -4.4549949467182159e-02</internalNodes>\n          <leafValues>\n            -7.1134221553802490e-01 4.9668429419398308e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7920 4.2873818427324295e-02</internalNodes>\n          <leafValues>\n            6.7160711623728275e-03 -5.2660852670669556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7921 2.5025280192494392e-02</internalNodes>\n          <leafValues>\n            -1.8445409834384918e-02 7.8793220221996307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7922 2.1663550287485123e-03</internalNodes>\n          <leafValues>\n            3.2540310174226761e-02 -1.3115049898624420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7923 2.5540040805935860e-02</internalNodes>\n          <leafValues>\n            -3.4693568944931030e-02 4.1404798626899719e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7924 -8.3627507090568542e-02</internalNodes>\n          <leafValues>\n            -5.2143442630767822e-01 7.7060810290277004e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7925 3.7637550849467516e-03</internalNodes>\n          <leafValues>\n            -2.9463630169630051e-02 7.4424192309379578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7926 3.7175719626247883e-03</internalNodes>\n          <leafValues>\n            -4.2123001068830490e-02 1.0287009924650192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7927 -5.2892807871103287e-03</internalNodes>\n          <leafValues>\n            -1.2348390370607376e-01 3.7152700126171112e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7928 -9.1878473758697510e-03</internalNodes>\n          <leafValues>\n            9.0256750583648682e-02 -5.2674051374197006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7929 -5.5448919534683228e-02</internalNodes>\n          <leafValues>\n            -5.3639650344848633e-01 2.6584670413285494e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7930 6.4754108898341656e-03</internalNodes>\n          <leafValues>\n            5.5367350578308105e-02 -9.2722631990909576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7931 -1.5773440245538950e-03</internalNodes>\n          <leafValues>\n            1.3578939437866211e-01 -4.0911730378866196e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7932 -4.9912789836525917e-04</internalNodes>\n          <leafValues>\n            -1.4728380739688873e-01 5.3603630512952805e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7933 1.5690509974956512e-01</internalNodes>\n          <leafValues>\n            -7.8873159363865852e-03 3.7397789955139160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7934 3.6391850560903549e-02</internalNodes>\n          <leafValues>\n            4.9765990115702152e-03 -9.1157531738281250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7935 -9.5625342801213264e-03</internalNodes>\n          <leafValues>\n            1.2767709791660309e-01 -1.4394680038094521e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7936 2.4007901083678007e-03</internalNodes>\n          <leafValues>\n            -1.3107380270957947e-01 4.4731479138135910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7937 3.2929850276559591e-03</internalNodes>\n          <leafValues>\n            4.0428631007671356e-02 -5.3223561495542526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7938 -3.1314359512180090e-03</internalNodes>\n          <leafValues>\n            3.6826111376285553e-02 -1.2113159894943237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7939 5.2008330821990967e-02</internalNodes>\n          <leafValues>\n            5.9283021837472916e-03 -4.3858841061592102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7940 5.7681259931996465e-04</internalNodes>\n          <leafValues>\n            -6.9851770997047424e-02 6.4286291599273682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7941 6.1443001031875610e-03</internalNodes>\n          <leafValues>\n            3.0908059328794479e-02 -1.8229809403419495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7942 3.5959720611572266e-02</internalNodes>\n          <leafValues>\n            -4.1680991649627686e-02 1.4244790375232697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7943 -2.1290820091962814e-02</internalNodes>\n          <leafValues>\n            -9.6662320196628571e-02 5.5888749659061432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7944 -6.2724511371925473e-04</internalNodes>\n          <leafValues>\n            9.0150557458400726e-02 -6.9430753588676453e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7945 -2.5145700201392174e-03</internalNodes>\n          <leafValues>\n            -6.9526046514511108e-02 4.5552581548690796e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7946 5.7874649763107300e-02</internalNodes>\n          <leafValues>\n            -2.5036580860614777e-02 2.0633180439472198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7947 1.5898469835519791e-02</internalNodes>\n          <leafValues>\n            -1.7133399844169617e-02 1.1004959791898727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7948 2.7882799506187439e-02</internalNodes>\n          <leafValues>\n            2.7713179588317871e-02 -1.6536410152912140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7949 8.8283112272620201e-03</internalNodes>\n          <leafValues>\n            -2.7497250586748123e-02 5.9822890907526016e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7950 -1.5679910778999329e-02</internalNodes>\n          <leafValues>\n            -2.6984989643096924e-01 1.6398239880800247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7951 4.1906189173460007e-02</internalNodes>\n          <leafValues>\n            -8.0525986850261688e-03 3.1556311249732971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7952 -4.1068609803915024e-02</internalNodes>\n          <leafValues>\n            2.5637561082839966e-01 -1.8357910215854645e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7953 3.5570110194385052e-03</internalNodes>\n          <leafValues>\n            2.9343830421566963e-02 -1.2668469548225403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7954 -2.1371750626713037e-03</internalNodes>\n          <leafValues>\n            1.2923260033130646e-01 -4.0102209895849228e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7955 3.3638089895248413e-02</internalNodes>\n          <leafValues>\n            8.1196166574954987e-03 -4.0394780039787292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7956 1.0182919912040234e-02</internalNodes>\n          <leafValues>\n            -4.2566180229187012e-02 1.1843100190162659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7957 -7.0302112726494670e-04</internalNodes>\n          <leafValues>\n            3.8721978664398193e-02 -7.9703420400619507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7958 -2.8552680741995573e-03</internalNodes>\n          <leafValues>\n            9.1274276375770569e-02 -6.1691451817750931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7959 -2.9935541097074747e-03</internalNodes>\n          <leafValues>\n            -1.0913450270891190e-01 3.8736950606107712e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7960 -5.3608341841027141e-04</internalNodes>\n          <leafValues>\n            -4.3252488970756531e-01 1.0958270169794559e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7961 5.1431890577077866e-02</internalNodes>\n          <leafValues>\n            4.7060111537575722e-03 -2.6765900850296021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7962 -4.8872891813516617e-02</internalNodes>\n          <leafValues>\n            2.0144729316234589e-01 -2.2844519466161728e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7963 -1.6080449521541595e-01</internalNodes>\n          <leafValues>\n            -1. 1.9577229395508766e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7964 1.8509939312934875e-02</internalNodes>\n          <leafValues>\n            1.7808660864830017e-02 -2.7871158719062805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7965 -4.2106948792934418e-02</internalNodes>\n          <leafValues>\n            -6.2493157386779785e-01 7.0520970039069653e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7966 -9.7096778452396393e-02</internalNodes>\n          <leafValues>\n            -8.4505838155746460e-01 4.4749649241566658e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7967 -9.4244757201522589e-04</internalNodes>\n          <leafValues>\n            1.9796760380268097e-01 -2.2733120247721672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7968 -1.8040809780359268e-02</internalNodes>\n          <leafValues>\n            -3.3424109220504761e-01 1.3358039781451225e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7969 6.3626631163060665e-04</internalNodes>\n          <leafValues>\n            -1.0530749708414078e-01 4.4016160070896149e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7970 -3.4530549310147762e-03</internalNodes>\n          <leafValues>\n            -1.3687069714069366e-01 3.0288280919194221e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7971 1.7589809373021126e-02</internalNodes>\n          <leafValues>\n            -2.8031280264258385e-02 1.8331700563430786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7972 -1.4289390528574586e-03</internalNodes>\n          <leafValues>\n            6.7616157233715057e-02 -6.4400359988212585e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7973 1.4584570191800594e-02</internalNodes>\n          <leafValues>\n            -3.2548811286687851e-02 7.7070221304893494e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7974 7.4579578638076782e-01</internalNodes>\n          <leafValues>\n            9.1963959857821465e-03 -4.5680120587348938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7975 -1.2285649776458740e-01</internalNodes>\n          <leafValues>\n            -6.4423608779907227e-01 2.0847769919782877e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7976 -1.1613000184297562e-01</internalNodes>\n          <leafValues>\n            -7.9274278879165649e-01 4.9578230828046799e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7977 5.5644840002059937e-02</internalNodes>\n          <leafValues>\n            -5.7718120515346527e-03 3.0834281444549561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7978 2.0566429942846298e-02</internalNodes>\n          <leafValues>\n            -1.5474709682166576e-02 2.8002938628196716e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7979 3.8393519935198128e-04</internalNodes>\n          <leafValues>\n            3.4390248358249664e-02 -1.0244189947843552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7980 4.0198508650064468e-03</internalNodes>\n          <leafValues>\n            5.2533138543367386e-02 -1.1492720246315002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7981 -7.4124410748481750e-02</internalNodes>\n          <leafValues>\n            -3.0216461420059204e-01 4.2779031209647655e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7982 -3.4346429165452719e-03</internalNodes>\n          <leafValues>\n            6.5627492964267731e-02 -6.9991588592529297e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7983 -4.3740049004554749e-03</internalNodes>\n          <leafValues>\n            -1.2934839725494385e-01 5.1233518868684769e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7984 6.9464151747524738e-03</internalNodes>\n          <leafValues>\n            -3.2591849565505981e-02 1.5098060667514801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7985 -1.8434170633554459e-02</internalNodes>\n          <leafValues>\n            -3.1364220380783081e-01 9.5867328345775604e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7986 -3.2201830763369799e-03</internalNodes>\n          <leafValues>\n            -1.7494319379329681e-01 3.3579058945178986e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7987 -3.2273299992084503e-02</internalNodes>\n          <leafValues>\n            2.4136200547218323e-01 -2.4392010644078255e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7988 -4.8193791881203651e-03</internalNodes>\n          <leafValues>\n            -1.3610219955444336e-01 4.1156660765409470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7989 -9.8347626626491547e-02</internalNodes>\n          <leafValues>\n            -5.3324717283248901e-01 8.8729923591017723e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7990 1.9054619595408440e-02</internalNodes>\n          <leafValues>\n            -3.2564271241426468e-02 1.6729709506034851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7991 -8.1796169281005859e-02</internalNodes>\n          <leafValues>\n            -6.4131242036819458e-01 8.7052602320909500e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7992 3.2996949739754200e-03</internalNodes>\n          <leafValues>\n            -5.9765439480543137e-02 7.1879856288433075e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7993 -7.5977660715579987e-02</internalNodes>\n          <leafValues>\n            -5.0415420532226562e-01 5.6795510463416576e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7994 3.0508760362863541e-02</internalNodes>\n          <leafValues>\n            1.0317360050976276e-02 -4.3552881479263306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7995 -3.7642959505319595e-02</internalNodes>\n          <leafValues>\n            3.7324428558349609e-01 -1.7276229336857796e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7996 -9.9801109172403812e-04</internalNodes>\n          <leafValues>\n            -1.4508770406246185e-01 3.0973700806498528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7997 -2.0703389309346676e-03</internalNodes>\n          <leafValues>\n            1.2285920232534409e-01 -2.5285899639129639e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7998 7.1816377341747284e-02</internalNodes>\n          <leafValues>\n            7.2997398674488068e-03 -6.2621092796325684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7999 1.6781920194625854e-01</internalNodes>\n          <leafValues>\n            -1.0094069875776768e-02 2.2531180083751678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8000 1.5028619964141399e-04</internalNodes>\n          <leafValues>\n            -4.9013838171958923e-02 9.5635637640953064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8001 9.5139637589454651e-02</internalNodes>\n          <leafValues>\n            -2.3964960128068924e-03 7.8972822427749634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8002 3.8569360040128231e-03</internalNodes>\n          <leafValues>\n            4.0852431207895279e-02 -1.1976979672908783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8003 2.3172760382294655e-02</internalNodes>\n          <leafValues>\n            -8.1755416467785835e-03 3.4895899891853333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8004 1.3417989946901798e-02</internalNodes>\n          <leafValues>\n            2.9357729479670525e-02 -1.4476950466632843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8005 -1.4165779948234558e-01</internalNodes>\n          <leafValues>\n            3.4960448741912842e-01 -3.9633908309042454e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8006 5.5483141914010048e-03</internalNodes>\n          <leafValues>\n            -4.6736769378185272e-02 8.7630823254585266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8007 -4.7431029379367828e-03</internalNodes>\n          <leafValues>\n            6.2899678945541382e-02 -2.6983590796589851e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8008 -6.6862776875495911e-02</internalNodes>\n          <leafValues>\n            -9.5272868871688843e-01 3.9776111952960491e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8009 2.2987840697169304e-02</internalNodes>\n          <leafValues>\n            -1.7802899703383446e-02 1.4564949274063110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8010 -2.2234279662370682e-02</internalNodes>\n          <leafValues>\n            -9.3360446393489838e-02 5.1537070423364639e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8011 1.5045719919726253e-05</internalNodes>\n          <leafValues>\n            -3.0237749218940735e-02 2.6654670014977455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8012 -4.7994707711040974e-03</internalNodes>\n          <leafValues>\n            1.0105530172586441e-01 -5.0083991140127182e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8013 -2.4227909743785858e-01</internalNodes>\n          <leafValues>\n            -6.8399482965469360e-01 2.1470880601555109e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8014 4.6939790248870850e-02</internalNodes>\n          <leafValues>\n            8.1193735823035240e-03 -4.7671818733215332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8015 -6.0940280556678772e-02</internalNodes>\n          <leafValues>\n            2.3827329277992249e-01 -9.5430584624409676e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8016 2.4104740470647812e-02</internalNodes>\n          <leafValues>\n            -1.5799079090356827e-02 2.6727899909019470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8017 -4.6567570418119431e-02</internalNodes>\n          <leafValues>\n            -3.1017771363258362e-01 8.3353007212281227e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8018 1.8709240248426795e-03</internalNodes>\n          <leafValues>\n            -7.2588071227073669e-02 6.5608270466327667e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8019 -5.9872400015592575e-03</internalNodes>\n          <leafValues>\n            -1.8159690499305725e-01 1.4030029997229576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8020 -7.3103660724882502e-06</internalNodes>\n          <leafValues>\n            4.0913790464401245e-02 -1.0656440258026123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8021 -2.3244550451636314e-02</internalNodes>\n          <leafValues>\n            -1.9035540521144867e-01 1.5966059640049934e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8022 -1.1853489559143782e-03</internalNodes>\n          <leafValues>\n            5.9956710785627365e-02 -7.6678447425365448e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8023 -1.2981820106506348e-01</internalNodes>\n          <leafValues>\n            4.0999498963356018e-01 -5.0850748084485531e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8024 -5.1512669771909714e-02</internalNodes>\n          <leafValues>\n            -3.0527231097221375e-01 1.4186340384185314e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8025 -3.9303461089730263e-03</internalNodes>\n          <leafValues>\n            -7.9763479530811310e-02 2.6248890906572342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8026 1.5822829678654671e-02</internalNodes>\n          <leafValues>\n            -1.6849309206008911e-02 2.7549791336059570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8027 1.1561570316553116e-01</internalNodes>\n          <leafValues>\n            6.7870649509131908e-03 -1.2709319591522217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8028 1.1260829633101821e-03</internalNodes>\n          <leafValues>\n            8.1908516585826874e-02 -5.8194048702716827e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8029 1.5513430349528790e-02</internalNodes>\n          <leafValues>\n            -4.2989719659090042e-02 7.8364297747612000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8030 4.6268731355667114e-02</internalNodes>\n          <leafValues>\n            1.1759550310671329e-02 -3.9947330951690674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8031 7.9535972326993942e-03</internalNodes>\n          <leafValues>\n            1.6848539933562279e-02 -8.8599078357219696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8032 -1.8991220742464066e-02</internalNodes>\n          <leafValues>\n            2.4813260138034821e-01 -1.7320850864052773e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8033 3.7058200687170029e-03</internalNodes>\n          <leafValues>\n            -2.1747030317783356e-02 5.8276090770959854e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8034 2.5829279329627752e-03</internalNodes>\n          <leafValues>\n            5.0559278577566147e-02 -9.3193918466567993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8035 -3.1010560691356659e-02</internalNodes>\n          <leafValues>\n            2.2110439836978912e-01 -1.4786499552428722e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8036 2.5402549654245377e-03</internalNodes>\n          <leafValues>\n            -8.6743600666522980e-02 5.7932410389184952e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8037 -8.9100487530231476e-03</internalNodes>\n          <leafValues>\n            5.3846079856157303e-02 -4.5931909233331680e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8038 4.0557151660323143e-03</internalNodes>\n          <leafValues>\n            5.9298399835824966e-02 -8.3007253706455231e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8039 6.1204940080642700e-02</internalNodes>\n          <leafValues>\n            9.2248879373073578e-03 -2.1082369983196259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8040 7.7630057930946350e-03</internalNodes>\n          <leafValues>\n            -7.5927056372165680e-02 5.7865709066390991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8041 1.5921150147914886e-01</internalNodes>\n          <leafValues>\n            8.3040859317407012e-04 -1.0000480413436890e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8042 3.9196189492940903e-02</internalNodes>\n          <leafValues>\n            7.1930838748812675e-03 -6.0338622331619263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8043 1.0220289975404739e-01</internalNodes>\n          <leafValues>\n            -3.6227719392627478e-03 5.4500752687454224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8044 -1.5064980089664459e-01</internalNodes>\n          <leafValues>\n            -7.0450758934020996e-01 6.6995541565120220e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8045 1.3819299638271332e-01</internalNodes>\n          <leafValues>\n            -1.1153860017657280e-02 1.7932909727096558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8046 -3.8313010009005666e-04</internalNodes>\n          <leafValues>\n            -7.2442352771759033e-02 5.7925980538129807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8047 -2.7796919457614422e-03</internalNodes>\n          <leafValues>\n            -8.6280398070812225e-02 4.1014600545167923e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8048 3.9365138858556747e-02</internalNodes>\n          <leafValues>\n            -4.6629320830106735e-02 8.8124006986618042e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8049 -6.1933819204568863e-02</internalNodes>\n          <leafValues>\n            7.0118552446365356e-01 -2.5661089457571507e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8050 -5.9742941521108150e-03</internalNodes>\n          <leafValues>\n            -1.6519010066986084e-01 3.7947021424770355e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8051 7.5101079419255257e-03</internalNodes>\n          <leafValues>\n            5.4191488772630692e-02 -7.9166658222675323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8052 -9.7005672752857208e-02</internalNodes>\n          <leafValues>\n            -8.8104772567749023e-01 4.8486101441085339e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8053 -6.7751510068774223e-03</internalNodes>\n          <leafValues>\n            9.1601163148880005e-02 -4.8942770808935165e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8054 -9.2599419876933098e-03</internalNodes>\n          <leafValues>\n            -1.3298119604587555e-01 4.1785500943660736e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8055 1.5215040184557438e-03</internalNodes>\n          <leafValues>\n            5.2633590996265411e-02 -6.0624439269304276e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8056 5.4703168570995331e-03</internalNodes>\n          <leafValues>\n            -4.7825179994106293e-02 1.1194570362567902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8057 2.5002110749483109e-02</internalNodes>\n          <leafValues>\n            -2.0354969426989555e-02 1.0175590217113495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8058 3.2576780766248703e-02</internalNodes>\n          <leafValues>\n            2.5629660114645958e-02 -1.9484190642833710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8059 -7.7732130885124207e-03</internalNodes>\n          <leafValues>\n            1.2477400153875351e-01 -3.4667998552322388e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8060 1.7777189612388611e-02</internalNodes>\n          <leafValues>\n            3.3261820673942566e-02 -1.4155229926109314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8061 1.0459429584443569e-02</internalNodes>\n          <leafValues>\n            -4.4039878994226456e-02 6.1871558427810669e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>406</maxWeakCount>\n      <stageThreshold>-1.1700680255889893e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 8062 1.8751189112663269e-02</internalNodes>\n          <leafValues>\n            -1.7775079607963562e-01 1.7157439887523651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8063 -2.1875950042158365e-03</internalNodes>\n          <leafValues>\n            7.5339153409004211e-02 -2.5842121243476868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8064 -1.1698690056800842e-01</internalNodes>\n          <leafValues>\n            4.2645370960235596e-01 -3.7121698260307312e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8065 3.8377330638468266e-03</internalNodes>\n          <leafValues>\n            3.5092439502477646e-02 -1.5757289528846741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8066 -1.2941210297867656e-03</internalNodes>\n          <leafValues>\n            -2.0068730413913727e-01 5.5704809725284576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8067 4.3927300721406937e-03</internalNodes>\n          <leafValues>\n            5.7497099041938782e-02 -1.9302740693092346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8068 -1.5021540457382798e-03</internalNodes>\n          <leafValues>\n            7.2378978133201599e-02 -1.4534910023212433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8069 1.2381949927657843e-03</internalNodes>\n          <leafValues>\n            -9.0413779020309448e-02 8.2838788628578186e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8070 3.0004729051142931e-03</internalNodes>\n          <leafValues>\n            6.0199409723281860e-02 -1.5556170046329498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8071 4.5666601508855820e-03</internalNodes>\n          <leafValues>\n            -7.6936639845371246e-02 1.3762770593166351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8072 9.9231943022459745e-04</internalNodes>\n          <leafValues>\n            4.7918211668729782e-02 -2.0472359657287598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8073 -3.8909649010747671e-03</internalNodes>\n          <leafValues>\n            -2.1067039668560028e-01 5.9297189116477966e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8074 2.4324860423803329e-03</internalNodes>\n          <leafValues>\n            -7.3611870408058167e-02 1.4165569841861725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8075 -3.3090400975197554e-03</internalNodes>\n          <leafValues>\n            -1.6489060223102570e-01 4.3310891836881638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8076 5.9596560895442963e-03</internalNodes>\n          <leafValues>\n            -2.1388399600982666e-01 4.3472908437252045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8077 9.7754271700978279e-03</internalNodes>\n          <leafValues>\n            2.7664290741086006e-02 -1.9119890034198761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8078 -3.8124300539493561e-02</internalNodes>\n          <leafValues>\n            3.1658840179443359e-01 -2.9972679913043976e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8079 1.4401610242202878e-03</internalNodes>\n          <leafValues>\n            -1.6602130234241486e-01 6.1300911009311676e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8080 7.5199408456683159e-04</internalNodes>\n          <leafValues>\n            -1.3568510115146637e-01 5.7345770299434662e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8081 2.4780649691820145e-03</internalNodes>\n          <leafValues>\n            -7.7258758246898651e-02 5.3781200200319290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8082 9.2068109661340714e-03</internalNodes>\n          <leafValues>\n            7.4349351227283478e-02 -1.3886499404907227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8083 1.7634540796279907e-02</internalNodes>\n          <leafValues>\n            -2.6817159727215767e-02 3.4912449121475220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8084 1.0517879854887724e-03</internalNodes>\n          <leafValues>\n            8.3444483578205109e-02 -8.3271436393260956e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8085 -7.2119189426302910e-03</internalNodes>\n          <leafValues>\n            1.4149050414562225e-01 -3.0853189527988434e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8086 8.1929508596658707e-03</internalNodes>\n          <leafValues>\n            6.4249828457832336e-02 -1.4224460721015930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8087 -5.7932751951739192e-04</internalNodes>\n          <leafValues>\n            -6.1768930405378342e-02 3.4835230559110641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8088 4.5172017998993397e-03</internalNodes>\n          <leafValues>\n            -7.3925666511058807e-02 9.5347866415977478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8089 2.2280250489711761e-01</internalNodes>\n          <leafValues>\n            2.8079450130462646e-02 -2.6174598932266235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8090 -8.1560667604207993e-04</internalNodes>\n          <leafValues>\n            -1.1128710210323334e-01 6.1751261353492737e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8091 1.9009260460734367e-02</internalNodes>\n          <leafValues>\n            -3.5914849489927292e-02 9.5332697033882141e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8092 -1.1708099627867341e-03</internalNodes>\n          <leafValues>\n            -1.7809429764747620e-01 3.8471758365631104e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8093 -2.7492839843034744e-02</internalNodes>\n          <leafValues>\n            1.5674190223217010e-01 -3.6307450383901596e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8094 -5.4139150306582451e-03</internalNodes>\n          <leafValues>\n            -1.6014580428600311e-01 4.5228298753499985e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8095 1.1325670406222343e-02</internalNodes>\n          <leafValues>\n            -5.2679128944873810e-02 1.2411580234766006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8096 -1.3919079303741455e-01</internalNodes>\n          <leafValues>\n            -2.8573009371757507e-01 2.5642180815339088e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8097 -7.6183810830116272e-02</internalNodes>\n          <leafValues>\n            2.0390880107879639e-01 -1.2701939791440964e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8098 1.3947900151833892e-03</internalNodes>\n          <leafValues>\n            -1.1320529878139496e-01 5.7419300079345703e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8099 4.6532237902283669e-03</internalNodes>\n          <leafValues>\n            5.7795990258455276e-02 -1.0997010022401810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8100 4.5034389942884445e-02</internalNodes>\n          <leafValues>\n            -2.8761979192495346e-02 2.2605720162391663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8101 1.6864009201526642e-02</internalNodes>\n          <leafValues>\n            3.6318089812994003e-02 -2.0162770152091980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8102 1.9251279532909393e-01</internalNodes>\n          <leafValues>\n            -1.3869989663362503e-02 5.4226338863372803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8103 -1.6758369747549295e-03</internalNodes>\n          <leafValues>\n            -1.1462789773941040e-01 4.9984849989414215e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8104 -4.5270361006259918e-03</internalNodes>\n          <leafValues>\n            1.1731909960508347e-01 -6.1384700238704681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8105 5.4975082166492939e-03</internalNodes>\n          <leafValues>\n            3.2194830477237701e-02 -1.5348540246486664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8106 3.5562040284276009e-03</internalNodes>\n          <leafValues>\n            -6.3937939703464508e-02 1.0787469893693924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8107 2.1489830687642097e-03</internalNodes>\n          <leafValues>\n            -5.0976738333702087e-02 2.9315000399947166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8108 -1.0464210063219070e-02</internalNodes>\n          <leafValues>\n            1.9548749923706055e-01 -3.2784409821033478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8109 -2.9779719188809395e-02</internalNodes>\n          <leafValues>\n            -3.9286538958549500e-01 1.2266620062291622e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8110 9.6993939951062202e-04</internalNodes>\n          <leafValues>\n            -1.0772799700498581e-01 6.1684250831604004e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8111 -4.0499098598957062e-02</internalNodes>\n          <leafValues>\n            -3.6696648597717285e-01 1.1805539950728416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8112 -2.3762779310345650e-03</internalNodes>\n          <leafValues>\n            -1.3933740556240082e-01 5.0010170787572861e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8113 -5.1528858020901680e-03</internalNodes>\n          <leafValues>\n            9.7424000501632690e-02 -2.3820690810680389e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8114 -2.8726980090141296e-02</internalNodes>\n          <leafValues>\n            2.1031719446182251e-01 -3.6088269203901291e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8115 1.4215350151062012e-02</internalNodes>\n          <leafValues>\n            3.4664131700992584e-02 -1.5814340114593506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8116 2.0164670422673225e-03</internalNodes>\n          <leafValues>\n            5.0487071275711060e-02 -1.2704199552536011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8117 4.1724709444679320e-04</internalNodes>\n          <leafValues>\n            -5.6635189801454544e-02 1.0789140313863754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8118 7.3380130343139172e-03</internalNodes>\n          <leafValues>\n            5.0891719758510590e-02 -1.2210439890623093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8119 -7.5930766761302948e-02</internalNodes>\n          <leafValues>\n            2.2627210617065430e-01 -6.6569480113685131e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8120 -4.2873369529843330e-03</internalNodes>\n          <leafValues>\n            7.2104290127754211e-02 -8.0106139183044434e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8121 -2.4101670831441879e-02</internalNodes>\n          <leafValues>\n            9.1355301439762115e-02 -3.4591969102621078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8122 1.9936550408601761e-02</internalNodes>\n          <leafValues>\n            -3.7764240056276321e-02 1.8896919488906860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8123 5.6939899921417236e-01</internalNodes>\n          <leafValues>\n            3.1492649577558041e-03 -5.9846472740173340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8124 1.0352060198783875e-01</internalNodes>\n          <leafValues>\n            2.3323200643062592e-02 -3.2129231095314026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8125 5.9556990861892700e-02</internalNodes>\n          <leafValues>\n            4.2170342057943344e-03 -3.3442139625549316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8126 -5.0575539469718933e-02</internalNodes>\n          <leafValues>\n            -8.4793227910995483e-01 6.6583030857145786e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8127 -5.5158971808850765e-03</internalNodes>\n          <leafValues>\n            -7.0507496595382690e-02 2.1716769784688950e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8128 2.9419310390949249e-02</internalNodes>\n          <leafValues>\n            -3.6319408565759659e-02 1.7510940134525299e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8129 1.0972440242767334e-02</internalNodes>\n          <leafValues>\n            1.8267199397087097e-02 -1.8641340732574463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8130 -3.8842339999973774e-03</internalNodes>\n          <leafValues>\n            -1.0735920071601868e-01 6.0849040746688843e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8131 -1.1936859664274380e-04</internalNodes>\n          <leafValues>\n            5.2348621189594269e-02 -1.2701539695262909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8132 -5.0230980850756168e-03</internalNodes>\n          <leafValues>\n            5.2682720124721527e-02 -1.2703679502010345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8133 1.8986819684505463e-01</internalNodes>\n          <leafValues>\n            1.7255579587072134e-03 -3.2701051235198975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8134 -2.4319409858435392e-03</internalNodes>\n          <leafValues>\n            1.3875140249729156e-01 -4.3046601116657257e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8135 -2.0888550207018852e-03</internalNodes>\n          <leafValues>\n            -1.1241009831428528e-01 3.7676859647035599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8136 4.2116310447454453e-02</internalNodes>\n          <leafValues>\n            8.1929191946983337e-03 -6.8541908264160156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8137 2.7380110695958138e-02</internalNodes>\n          <leafValues>\n            4.4103930704295635e-03 -5.3421849012374878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8138 2.1348569542169571e-02</internalNodes>\n          <leafValues>\n            -5.1160380244255066e-02 1.0021480172872543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8139 -1.7236869782209396e-02</internalNodes>\n          <leafValues>\n            -3.9995738863945007e-01 2.0257489755749702e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8140 7.8617185354232788e-03</internalNodes>\n          <leafValues>\n            2.8996279463171959e-02 -1.8014070391654968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8141 8.1942398101091385e-03</internalNodes>\n          <leafValues>\n            -2.5498030707240105e-02 8.4693931043148041e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8142 6.2367911450564861e-03</internalNodes>\n          <leafValues>\n            1.8659260123968124e-02 -2.6443660259246826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8143 2.1872919751331210e-04</internalNodes>\n          <leafValues>\n            -1.5943029522895813e-01 3.0722649767994881e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8144 -6.4004249870777130e-03</internalNodes>\n          <leafValues>\n            2.8331050276756287e-01 -1.9352490082383156e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8145 -1.0007199645042419e-01</internalNodes>\n          <leafValues>\n            -4.0704050660133362e-01 6.1583020724356174e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8146 1.5690149739384651e-02</internalNodes>\n          <leafValues>\n            -1.6772339120507240e-02 2.9049569368362427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8147 -7.0421490818262100e-03</internalNodes>\n          <leafValues>\n            -6.7985177040100098e-02 3.1130369752645493e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8148 -1.5320030041038990e-02</internalNodes>\n          <leafValues>\n            3.6400088667869568e-01 -1.3608699664473534e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8149 5.8485660701990128e-02</internalNodes>\n          <leafValues>\n            7.4363988824188709e-03 -7.5599330663681030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8150 -3.5200670827180147e-03</internalNodes>\n          <leafValues>\n            -1.3923290371894836e-01 3.7657551467418671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8151 -8.7158178212121129e-04</internalNodes>\n          <leafValues>\n            4.2339839041233063e-02 -5.3530458360910416e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8152 2.4548629298806190e-03</internalNodes>\n          <leafValues>\n            -4.4667050242424011e-02 1.3785070180892944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8153 -6.1778929084539413e-02</internalNodes>\n          <leafValues>\n            -3.5338079929351807e-01 4.5869671739637852e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8154 -3.8533521001227200e-04</internalNodes>\n          <leafValues>\n            7.2278007864952087e-02 -1.0433299839496613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8155 7.6227717101573944e-02</internalNodes>\n          <leafValues>\n            -1.1004550382494926e-02 5.0025188922882080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8156 -4.4210380874574184e-03</internalNodes>\n          <leafValues>\n            -8.6290426552295685e-02 5.8773420751094818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8157 1.5068270266056061e-02</internalNodes>\n          <leafValues>\n            -5.8916270732879639e-02 1.0025119781494141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8158 2.5007940828800201e-02</internalNodes>\n          <leafValues>\n            7.6251477003097534e-02 -8.8744960725307465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8159 -7.7328123152256012e-02</internalNodes>\n          <leafValues>\n            2.5363400578498840e-01 -1.5778530389070511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8160 3.5588641185313463e-04</internalNodes>\n          <leafValues>\n            6.2983699142932892e-02 -7.7181987464427948e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8161 6.9400526583194733e-02</internalNodes>\n          <leafValues>\n            -8.9571140706539154e-03 1.5102629363536835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8162 -1.8577709794044495e-01</internalNodes>\n          <leafValues>\n            -6.9518351554870605e-01 7.8398203477263451e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8163 -6.6014728508889675e-03</internalNodes>\n          <leafValues>\n            -5.6056641042232513e-02 2.4557920172810555e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8164 4.0490310639142990e-02</internalNodes>\n          <leafValues>\n            -2.0202599465847015e-02 2.7736270427703857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8165 1.6997240018099546e-03</internalNodes>\n          <leafValues>\n            -1.1403460055589676e-01 1.9222680479288101e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8166 8.4750041365623474e-02</internalNodes>\n          <leafValues>\n            1.8607510253787041e-02 -3.0505430698394775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8167 -1.6975879669189453e-02</internalNodes>\n          <leafValues>\n            1.2357109785079956e-01 -2.9016660526394844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8168 4.6773189678788185e-03</internalNodes>\n          <leafValues>\n            -4.5864760875701904e-02 1.1718840152025223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8169 -1.4066020026803017e-02</internalNodes>\n          <leafValues>\n            -1.3670490682125092e-01 1.7362629994750023e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8170 5.0944689661264420e-02</internalNodes>\n          <leafValues>\n            1.3865640386939049e-02 -3.9529040455818176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8171 9.8265796899795532e-02</internalNodes>\n          <leafValues>\n            -1.2339199893176556e-02 3.6408239603042603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8172 1.1730480473488569e-03</internalNodes>\n          <leafValues>\n            6.6400513052940369e-02 -8.2091093063354492e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8173 1.0979039967060089e-01</internalNodes>\n          <leafValues>\n            4.6397978439927101e-03 -6.1344558000564575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8174 4.9452850362285972e-04</internalNodes>\n          <leafValues>\n            -1.0062679648399353e-01 5.7191990315914154e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8175 3.5673558712005615e-01</internalNodes>\n          <leafValues>\n            -1.4482989907264709e-02 3.9276111125946045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8176 8.7493062019348145e-03</internalNodes>\n          <leafValues>\n            -4.8551220446825027e-02 1.0460250079631805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8177 2.2463349625468254e-02</internalNodes>\n          <leafValues>\n            2.2396000102162361e-02 -1.3587850332260132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8178 1.8538760021328926e-02</internalNodes>\n          <leafValues>\n            3.0029479414224625e-02 -2.0861870050430298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8179 3.4236259758472443e-02</internalNodes>\n          <leafValues>\n            -1.0644080117344856e-02 1.6675490140914917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8180 4.0900480002164841e-02</internalNodes>\n          <leafValues>\n            -1.2056970037519932e-02 4.3773320317268372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8181 1.0512579977512360e-01</internalNodes>\n          <leafValues>\n            -9.4033451750874519e-04 7.8061622381210327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8182 7.4799366295337677e-02</internalNodes>\n          <leafValues>\n            7.8805796802043915e-03 -6.6342961788177490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8183 4.3973559513688087e-05</internalNodes>\n          <leafValues>\n            -5.8106150478124619e-02 1.0466519743204117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8184 6.6341059282422066e-03</internalNodes>\n          <leafValues>\n            1.9750369712710381e-02 -2.7033481001853943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8185 6.9901258684694767e-03</internalNodes>\n          <leafValues>\n            -3.2210368663072586e-02 5.6677810847759247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8186 -6.9424291141331196e-03</internalNodes>\n          <leafValues>\n            8.3492629230022430e-02 -6.4236722886562347e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8187 1.2524950504302979e-01</internalNodes>\n          <leafValues>\n            1.9679870456457138e-03 -8.7889492511749268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8188 -6.0555808246135712e-02</internalNodes>\n          <leafValues>\n            -6.5825527906417847e-01 7.3593561537563801e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8189 4.2092729359865189e-02</internalNodes>\n          <leafValues>\n            9.0475538745522499e-03 -3.7676310539245605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8190 1.6190059483051300e-02</internalNodes>\n          <leafValues>\n            1.4534840360283852e-02 -3.4089210629463196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8191 -2.6756960898637772e-02</internalNodes>\n          <leafValues>\n            1.6862440109252930e-01 -1.0768949985504150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8192 -5.1163539290428162e-02</internalNodes>\n          <leafValues>\n            -9.4068449735641479e-01 4.8503028228878975e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8193 -2.9093079268932343e-02</internalNodes>\n          <leafValues>\n            1.3051369786262512e-01 -2.7216060087084770e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8194 -1.3433809578418732e-01</internalNodes>\n          <leafValues>\n            -5.3713047504425049e-01 1.0605730116367340e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8195 -4.0363678708672523e-03</internalNodes>\n          <leafValues>\n            -7.8597947955131531e-02 4.5609310269355774e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8196 -1.6303880512714386e-01</internalNodes>\n          <leafValues>\n            6.9153147935867310e-01 -6.8249078467488289e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8197 5.3527228534221649e-02</internalNodes>\n          <leafValues>\n            -8.2422774285078049e-03 2.3649579286575317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8198 9.3209616839885712e-02</internalNodes>\n          <leafValues>\n            -7.0793349295854568e-03 6.3985627889633179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8199 -4.1583351790904999e-02</internalNodes>\n          <leafValues>\n            -4.0527749061584473e-01 1.1953369714319706e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8200 1.5241269767284393e-01</internalNodes>\n          <leafValues>\n            -1.6016889363527298e-02 3.7084808945655823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8201 -1.3017480261623859e-02</internalNodes>\n          <leafValues>\n            -1.2366600334644318e-01 4.4537510722875595e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8202 5.4946541786193848e-02</internalNodes>\n          <leafValues>\n            2.4852929636836052e-02 -2.1955069899559021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8203 3.0320021323859692e-04</internalNodes>\n          <leafValues>\n            -1.3367289304733276e-01 4.0226090699434280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8204 1.3891180045902729e-02</internalNodes>\n          <leafValues>\n            -2.6901820674538612e-02 1.9647410511970520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8205 1.0848880046978593e-03</internalNodes>\n          <leafValues>\n            3.6422070115804672e-02 -8.3430632948875427e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8206 2.3160090204328299e-03</internalNodes>\n          <leafValues>\n            -6.1215829104185104e-02 1.1277849972248077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8207 -7.1280319243669510e-03</internalNodes>\n          <leafValues>\n            -1.4642429351806641e-01 3.1300168484449387e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8208 -3.5769429523497820e-03</internalNodes>\n          <leafValues>\n            1.0159090161323547e-01 -6.0789510607719421e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8209 7.6856701634824276e-03</internalNodes>\n          <leafValues>\n            4.2229469865560532e-02 -1.2583130598068237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8210 8.4121264517307281e-03</internalNodes>\n          <leafValues>\n            -4.6872619539499283e-02 1.3011389970779419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8211 7.5839929282665253e-02</internalNodes>\n          <leafValues>\n            -9.2988023534417152e-03 2.4260810017585754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8212 8.6365960305556655e-04</internalNodes>\n          <leafValues>\n            9.1133847832679749e-02 -6.1323560774326324e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8213 -1.0632569901645184e-02</internalNodes>\n          <leafValues>\n            -6.7818403244018555e-02 1.9036499783396721e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8214 -1.4120140112936497e-02</internalNodes>\n          <leafValues>\n            2.9123929142951965e-01 -1.7482239753007889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8215 2.0944620482623577e-03</internalNodes>\n          <leafValues>\n            -1.1744289845228195e-01 5.4129518568515778e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8216 4.2378879152238369e-03</internalNodes>\n          <leafValues>\n            3.8495510816574097e-02 -1.4472819864749908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8217 -2.2818730212748051e-03</internalNodes>\n          <leafValues>\n            -1.1576230078935623e-01 2.7663499116897583e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8218 9.4367301790043712e-04</internalNodes>\n          <leafValues>\n            -9.4088926911354065e-02 5.3373821079730988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8219 1.4890190213918686e-02</internalNodes>\n          <leafValues>\n            -1.1562420055270195e-02 1.0941980034112930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8220 5.2381302230060101e-03</internalNodes>\n          <leafValues>\n            3.5265430808067322e-02 -1.5212060511112213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8221 1.2663690140470862e-03</internalNodes>\n          <leafValues>\n            -3.3352568745613098e-02 7.9812049865722656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8222 -5.3786882199347019e-03</internalNodes>\n          <leafValues>\n            2.0934769511222839e-01 -2.4073069915175438e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8223 -1.9063480431213975e-03</internalNodes>\n          <leafValues>\n            -2.0774979889392853e-01 2.5406830012798309e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8224 3.0771149322390556e-03</internalNodes>\n          <leafValues>\n            -5.1940180361270905e-02 1.0475979745388031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8225 9.5619028434157372e-03</internalNodes>\n          <leafValues>\n            3.0633790418505669e-02 -1.0758169740438461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8226 2.0540829747915268e-02</internalNodes>\n          <leafValues>\n            -2.2028919309377670e-02 2.3570840060710907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8227 7.0854742079973221e-03</internalNodes>\n          <leafValues>\n            -4.7188248485326767e-02 8.4122747182846069e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8228 -6.2047559767961502e-03</internalNodes>\n          <leafValues>\n            -1.2209820002317429e-01 4.5177329331636429e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8229 -2.3474119603633881e-02</internalNodes>\n          <leafValues>\n            -2.8770458698272705e-01 1.0876529850065708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8230 9.1368835419416428e-03</internalNodes>\n          <leafValues>\n            -3.3426750451326370e-02 2.0680120587348938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8231 1.0512090520933270e-03</internalNodes>\n          <leafValues>\n            4.7006800770759583e-02 -9.5018379390239716e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8232 -6.0899247182533145e-04</internalNodes>\n          <leafValues>\n            5.3419198840856552e-02 -1.0444770008325577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8233 -7.4382261373102665e-03</internalNodes>\n          <leafValues>\n            -4.8089329153299332e-02 1.9244499504566193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8234 1.9495990127325058e-02</internalNodes>\n          <leafValues>\n            -3.0136700719594955e-02 2.0381480455398560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8235 7.7799506485462189e-02</internalNodes>\n          <leafValues>\n            4.2237630113959312e-03 -7.2407877445220947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8236 3.1717489473521709e-03</internalNodes>\n          <leafValues>\n            2.8818940743803978e-02 -1.6305699944496155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8237 -3.9012718945741653e-02</internalNodes>\n          <leafValues>\n            -2.9151159524917603e-01 1.1131940409541130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8238 -3.1845991034060717e-03</internalNodes>\n          <leafValues>\n            6.3072219491004944e-02 -7.7291563153266907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8239 1.7876720055937767e-02</internalNodes>\n          <leafValues>\n            5.1196590065956116e-02 -3.7885930389165878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8240 1.2821210548281670e-03</internalNodes>\n          <leafValues>\n            -5.7314708828926086e-02 8.7054982781410217e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8241 1.0710550099611282e-01</internalNodes>\n          <leafValues>\n            -1.5561000443994999e-02 3.1525009870529175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8242 6.9577127695083618e-02</internalNodes>\n          <leafValues>\n            8.9664813131093979e-03 -5.8589607477188110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8243 -4.1071181185543537e-03</internalNodes>\n          <leafValues>\n            9.5472246408462524e-02 -3.5176470875740051e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8244 -2.4557299911975861e-03</internalNodes>\n          <leafValues>\n            -1.6605280339717865e-01 3.7322919815778732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8245 -2.0908420905470848e-02</internalNodes>\n          <leafValues>\n            1.3989880681037903e-01 -2.9987450689077377e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8246 -8.1008402630686760e-03</internalNodes>\n          <leafValues>\n            -1.0529220104217529e-01 7.0245787501335144e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8247 -2.5671819224953651e-02</internalNodes>\n          <leafValues>\n            4.4254720211029053e-01 -1.1081459932029247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8248 -9.3759642913937569e-03</internalNodes>\n          <leafValues>\n            -6.0765031725168228e-02 8.1338323652744293e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8249 5.1140699535608292e-02</internalNodes>\n          <leafValues>\n            -1.0516249574720860e-02 3.4041538834571838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8250 -4.0337219834327698e-03</internalNodes>\n          <leafValues>\n            8.5099473595619202e-02 -6.3421532511711121e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8251 3.3258409239351749e-03</internalNodes>\n          <leafValues>\n            -8.4625139832496643e-02 4.7368369996547699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8252 -3.9332117885351181e-03</internalNodes>\n          <leafValues>\n            -1.2637099623680115e-01 4.2450599372386932e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8253 -4.7937841154634953e-03</internalNodes>\n          <leafValues>\n            -4.2527411133050919e-02 2.5126809254288673e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8254 2.5972370058298111e-03</internalNodes>\n          <leafValues>\n            4.1884120553731918e-02 -1.4374159276485443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8255 5.2807550877332687e-02</internalNodes>\n          <leafValues>\n            -1.2467020191252232e-02 4.0223389863967896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8256 -8.1413555890321732e-03</internalNodes>\n          <leafValues>\n            -1.2783770263195038e-01 3.8975879549980164e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8257 2.9801739379763603e-02</internalNodes>\n          <leafValues>\n            -1.6747390851378441e-02 1.2424229830503464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8258 -8.9907720685005188e-02</internalNodes>\n          <leafValues>\n            3.1418469548225403e-01 -1.8360419198870659e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8259 1.7845210433006287e-01</internalNodes>\n          <leafValues>\n            1.0455190204083920e-02 -3.2048919796943665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8260 1.8588220700621605e-02</internalNodes>\n          <leafValues>\n            -3.8541439920663834e-02 1.5135329961776733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8261 -4.5074601075612009e-05</internalNodes>\n          <leafValues>\n            5.0462849438190460e-02 -5.6574851274490356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8262 3.8339050952345133e-03</internalNodes>\n          <leafValues>\n            4.7501549124717712e-02 -1.4327140152454376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8263 8.8608250021934509e-02</internalNodes>\n          <leafValues>\n            -3.3567149657756090e-03 5.8598208427429199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8264 -7.0611469447612762e-02</internalNodes>\n          <leafValues>\n            6.0292667150497437e-01 -8.3463769406080246e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8265 -1.3958199322223663e-01</internalNodes>\n          <leafValues>\n            -9.1693513095378876e-02 1.5311989933252335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8266 7.6274941675364971e-03</internalNodes>\n          <leafValues>\n            -4.0825009346008301e-02 1.1937720328569412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8267 -7.0419587194919586e-02</internalNodes>\n          <leafValues>\n            -6.6531497240066528e-01 2.6815559249371290e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8268 2.2952680010348558e-03</internalNodes>\n          <leafValues>\n            -7.9496517777442932e-02 5.7034268975257874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8269 3.6756680347025394e-03</internalNodes>\n          <leafValues>\n            -2.9180280864238739e-02 5.6333038955926895e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8270 4.6072501689195633e-02</internalNodes>\n          <leafValues>\n            1.9100179895758629e-02 -2.9163768887519836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8271 2.1738489158451557e-03</internalNodes>\n          <leafValues>\n            -2.6912130415439606e-02 2.0199960470199585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8272 -5.3164511919021606e-03</internalNodes>\n          <leafValues>\n            9.3022979795932770e-02 -7.1548640727996826e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8273 -1.1198960244655609e-02</internalNodes>\n          <leafValues>\n            -1.0618919879198074e-01 4.8395581543445587e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8274 1.7013610340654850e-03</internalNodes>\n          <leafValues>\n            -1.3111209869384766e-01 4.3086219578981400e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8275 -1.1626269668340683e-02</internalNodes>\n          <leafValues>\n            1.5684530138969421e-01 -2.4698950350284576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8276 9.3881830573081970e-02</internalNodes>\n          <leafValues>\n            -1.2058589607477188e-02 3.7941938638687134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8277 1.2041090056300163e-02</internalNodes>\n          <leafValues>\n            2.9569109901785851e-02 -1.3328549265861511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8278 -4.1863098740577698e-03</internalNodes>\n          <leafValues>\n            6.7244023084640503e-02 -7.2228990495204926e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8279 8.8373906910419464e-02</internalNodes>\n          <leafValues>\n            7.5915241613984108e-03 -6.2512797117233276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8280 -1.4876410365104675e-02</internalNodes>\n          <leafValues>\n            1.1762090027332306e-01 -4.3840218335390091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8281 1.3433529995381832e-02</internalNodes>\n          <leafValues>\n            1.9615789875388145e-02 -1.1923760175704956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8282 1.5091040730476379e-01</internalNodes>\n          <leafValues>\n            -9.9040074273943901e-03 5.6262481212615967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8283 -1.7507839947938919e-02</internalNodes>\n          <leafValues>\n            -2.3439739644527435e-01 1.8828360363841057e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8284 -1.4707089960575104e-01</internalNodes>\n          <leafValues>\n            -7.4530661106109619e-01 7.0233740843832493e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8285 3.1485889106988907e-02</internalNodes>\n          <leafValues>\n            -3.6193220876157284e-03 6.9215708971023560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8286 -1.6217399388551712e-04</internalNodes>\n          <leafValues>\n            4.6460039913654327e-02 -1.0642550140619278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8287 5.6881760247051716e-04</internalNodes>\n          <leafValues>\n            -2.8816150501370430e-02 7.4378728866577148e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8288 -1.9876200705766678e-02</internalNodes>\n          <leafValues>\n            -2.0997400581836700e-01 2.3018810898065567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8289 -8.7401196360588074e-03</internalNodes>\n          <leafValues>\n            1.7325100302696228e-01 -3.5786859691143036e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8290 -5.0579208880662918e-02</internalNodes>\n          <leafValues>\n            -5.2024918794631958e-01 9.2388605698943138e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8291 9.3982152640819550e-02</internalNodes>\n          <leafValues>\n            3.4048059023916721e-03 -2.9207429289817810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8292 -1.3326539658010006e-02</internalNodes>\n          <leafValues>\n            1.3661830127239227e-01 -3.4405559301376343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8293 -2.2472620010375977e-02</internalNodes>\n          <leafValues>\n            -2.5913679599761963e-01 1.1266170069575310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8294 -4.1125040501356125e-02</internalNodes>\n          <leafValues>\n            -6.6921561956405640e-01 7.3854308575391769e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8295 6.9720767438411713e-02</internalNodes>\n          <leafValues>\n            5.0764488987624645e-03 -2.4747189879417419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8296 2.5198599323630333e-02</internalNodes>\n          <leafValues>\n            -1.5660049393773079e-02 2.9408401250839233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8297 4.2568319477140903e-03</internalNodes>\n          <leafValues>\n            3.8112118840217590e-02 -1.2368690222501755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8298 -1.2679009698331356e-02</internalNodes>\n          <leafValues>\n            -1.9976189732551575e-01 2.8806639835238457e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8299 -1.6080659627914429e-01</internalNodes>\n          <leafValues>\n            1.8710459768772125e-01 -8.2025080919265747e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8300 1.2181399762630463e-01</internalNodes>\n          <leafValues>\n            -1.0855929926037788e-02 4.5412290096282959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8301 2.8687159065157175e-03</internalNodes>\n          <leafValues>\n            -9.8563097417354584e-03 1.9689890742301941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8302 -3.4924471401609480e-04</internalNodes>\n          <leafValues>\n            4.7955259680747986e-02 -1.2549050152301788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8303 4.3789181858301163e-02</internalNodes>\n          <leafValues>\n            5.1197651773691177e-03 -6.6044712066650391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8304 4.9425449222326279e-02</internalNodes>\n          <leafValues>\n            7.9704420641064644e-03 -5.1537191867828369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8305 1.2263789772987366e-02</internalNodes>\n          <leafValues>\n            9.8127601668238640e-03 -1.6274920105934143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8306 -6.7564379423856735e-03</internalNodes>\n          <leafValues>\n            -6.6992767155170441e-02 7.8426092863082886e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8307 1.9599240273237228e-02</internalNodes>\n          <leafValues>\n            -2.4508479982614517e-02 1.7892380058765411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8308 1.3520059874281287e-03</internalNodes>\n          <leafValues>\n            -7.5853422284126282e-02 5.7282470166683197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8309 5.1610758528113365e-03</internalNodes>\n          <leafValues>\n            5.0592619925737381e-02 -9.6658922731876373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8310 2.7124589309096336e-02</internalNodes>\n          <leafValues>\n            -1.3078499585390091e-02 3.3894819021224976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8311 -7.3659062385559082e-02</internalNodes>\n          <leafValues>\n            -9.0775561332702637e-01 5.3760888986289501e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8312 -2.7619479224085808e-03</internalNodes>\n          <leafValues>\n            1.3446320593357086e-01 -3.4483309835195541e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8313 -1.5638889744877815e-03</internalNodes>\n          <leafValues>\n            -1.9992120563983917e-01 1.4003699645400047e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8314 4.0559601038694382e-03</internalNodes>\n          <leafValues>\n            5.3183209151029587e-02 -1.0070829838514328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8315 -3.2189621124416590e-03</internalNodes>\n          <leafValues>\n            6.2624312937259674e-02 -3.0276089906692505e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8316 4.1666622273623943e-03</internalNodes>\n          <leafValues>\n            -9.1761156916618347e-02 5.8400500565767288e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8317 2.0393060520291328e-02</internalNodes>\n          <leafValues>\n            4.8048538155853748e-03 -3.8386350870132446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8318 -9.9844802170991898e-03</internalNodes>\n          <leafValues>\n            -6.9473296403884888e-02 7.0034191012382507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8319 1.9515320658683777e-02</internalNodes>\n          <leafValues>\n            -3.4106500446796417e-02 1.0831409692764282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8320 8.7807718664407730e-03</internalNodes>\n          <leafValues>\n            3.6990050226449966e-02 -1.3089330494403839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8321 1.7314519500359893e-03</internalNodes>\n          <leafValues>\n            -4.2123470455408096e-02 8.4982097148895264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8322 -2.6709519326686859e-02</internalNodes>\n          <leafValues>\n            3.2326829433441162e-01 -1.5427160076797009e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8323 7.8696580603718758e-03</internalNodes>\n          <leafValues>\n            3.1361158937215805e-02 -1.0568609833717346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8324 3.2152980566024780e-03</internalNodes>\n          <leafValues>\n            -6.5161801874637604e-02 7.6189488172531128e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8325 -2.3215120658278465e-02</internalNodes>\n          <leafValues>\n            2.2522650659084320e-01 -1.4838770031929016e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8326 -4.4935368932783604e-03</internalNodes>\n          <leafValues>\n            -1.3131460547447205e-01 4.2855940759181976e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8327 -1.1850389651954174e-02</internalNodes>\n          <leafValues>\n            1.4825740456581116e-01 -2.9456850141286850e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8328 -9.3039282364770770e-04</internalNodes>\n          <leafValues>\n            7.9329937696456909e-02 -7.5784526765346527e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8329 -7.2138011455535889e-04</internalNodes>\n          <leafValues>\n            2.2042410448193550e-02 -2.0893280208110809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8330 1.3078770041465759e-01</internalNodes>\n          <leafValues>\n            -1.2214420363306999e-02 4.3224608898162842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8331 2.7863389253616333e-01</internalNodes>\n          <leafValues>\n            -7.4468360980972648e-04 9.9999761581420898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8332 -4.0815200656652451e-02</internalNodes>\n          <leafValues>\n            -6.1310279369354248e-01 8.2405265420675278e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8333 1.5054940013214946e-03</internalNodes>\n          <leafValues>\n            -1.8053399398922920e-02 6.5230727195739746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8334 6.5729310736060143e-03</internalNodes>\n          <leafValues>\n            3.0967630445957184e-02 -1.5021359920501709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8335 -1.4033170044422150e-01</internalNodes>\n          <leafValues>\n            -4.4641208648681641e-01 5.0997259095311165e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8336 -1.2781560420989990e-02</internalNodes>\n          <leafValues>\n            1.2579609453678131e-01 -4.6258769929409027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8337 1.3383819721639156e-02</internalNodes>\n          <leafValues>\n            7.5233832001686096e-02 -2.9858419671654701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8338 9.5225386321544647e-03</internalNodes>\n          <leafValues>\n            -4.4135529547929764e-02 1.0822969675064087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8339 -7.2484686970710754e-02</internalNodes>\n          <leafValues>\n            -1. 1.3005880173295736e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8340 3.6246789386495948e-04</internalNodes>\n          <leafValues>\n            -6.6878542304039001e-02 7.3916479945182800e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8341 -1.5511980280280113e-02</internalNodes>\n          <leafValues>\n            -1.8414540588855743e-01 1.5999039635062218e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8342 5.1146611571311951e-02</internalNodes>\n          <leafValues>\n            -9.4361994415521622e-03 5.4720860719680786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8343 -8.9448272774461657e-05</internalNodes>\n          <leafValues>\n            3.2970890402793884e-02 -4.5103389769792557e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8344 1.0151580208912492e-03</internalNodes>\n          <leafValues>\n            4.8603180795907974e-02 -9.8257049918174744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8345 5.3570970892906189e-02</internalNodes>\n          <leafValues>\n            1.0325700044631958e-02 -1.4304420351982117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8346 1.2302629649639130e-01</internalNodes>\n          <leafValues>\n            -5.2219899371266365e-03 8.6903452873229980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8347 -6.0005468549206853e-04</internalNodes>\n          <leafValues>\n            5.3572040051221848e-02 -5.8203268796205521e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8348 -4.4715698808431625e-02</internalNodes>\n          <leafValues>\n            4.4988310337066650e-01 -1.0549419559538364e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8349 6.3781379722058773e-03</internalNodes>\n          <leafValues>\n            2.6184290647506714e-02 -1.0640030354261398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8350 -5.6618300732225180e-04</internalNodes>\n          <leafValues>\n            5.7264849543571472e-02 -7.7750243246555328e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8351 -1.5853339573368430e-04</internalNodes>\n          <leafValues>\n            2.5316949933767319e-02 -5.7189941406250000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8352 -4.9790769815444946e-02</internalNodes>\n          <leafValues>\n            -3.7127709388732910e-01 1.3125170022249222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8353 -1.0477020405232906e-02</internalNodes>\n          <leafValues>\n            8.4245949983596802e-02 -3.6731608211994171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8354 -9.0497080236673355e-03</internalNodes>\n          <leafValues>\n            -1.6894440352916718e-01 2.8471369296312332e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8355 -3.5202078521251678e-02</internalNodes>\n          <leafValues>\n            -4.3810841441154480e-01 5.8491500094532967e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8356 -2.0730090327560902e-03</internalNodes>\n          <leafValues>\n            9.4890840351581573e-02 -5.3059589117765427e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8357 -5.0727208144962788e-03</internalNodes>\n          <leafValues>\n            -1.1221739649772644e-01 4.4165991246700287e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8358 2.5876651052385569e-03</internalNodes>\n          <leafValues>\n            -5.5557820945978165e-02 1.1426319926977158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8359 -2.4757650680840015e-03</internalNodes>\n          <leafValues>\n            -4.8213180154561996e-02 3.1529899686574936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8360 -1.2912530452013016e-02</internalNodes>\n          <leafValues>\n            1.1486659944057465e-01 -3.8589760661125183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8361 7.0194348692893982e-02</internalNodes>\n          <leafValues>\n            3.5798270255327225e-03 -7.3008167743682861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8362 -1.2016300112009048e-01</internalNodes>\n          <leafValues>\n            -6.7217922210693359e-01 5.8088749647140503e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8363 1.3109490275382996e-01</internalNodes>\n          <leafValues>\n            1.5340699814260006e-02 -1.2917870283126831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8364 -1.1350499838590622e-01</internalNodes>\n          <leafValues>\n            4.7297981381416321e-01 -1.0574280284345150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8365 -7.1533523499965668e-02</internalNodes>\n          <leafValues>\n            -3.4910291433334351e-01 9.8157208412885666e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8366 1.5889670699834824e-02</internalNodes>\n          <leafValues>\n            -3.0149290338158607e-02 1.5134809911251068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8367 2.6840370893478394e-01</internalNodes>\n          <leafValues>\n            9.9974423646926880e-03 -1.2243749946355820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8368 -1.4922569692134857e-01</internalNodes>\n          <leafValues>\n            -1.5773139894008636e-01 2.7682509273290634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8369 -2.2858489304780960e-02</internalNodes>\n          <leafValues>\n            1.7340719699859619e-01 -2.1124770864844322e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8370 -9.0983451809734106e-04</internalNodes>\n          <leafValues>\n            5.5269908159971237e-02 -8.5052981972694397e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8371 -1.1462160386145115e-02</internalNodes>\n          <leafValues>\n            -1.4397600293159485e-01 1.3809709809720516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8372 8.7118431925773621e-02</internalNodes>\n          <leafValues>\n            6.4688520506024361e-03 -7.2809070348739624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8373 5.3810589015483856e-02</internalNodes>\n          <leafValues>\n            -2.8251519426703453e-02 1.3615800440311432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8374 -1.6928049735724926e-03</internalNodes>\n          <leafValues>\n            -1.0114800184965134e-01 5.2096601575613022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8375 -1.4526920393109322e-02</internalNodes>\n          <leafValues>\n            -1.0613209754228592e-01 2.7218030765652657e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8376 -5.9082340449094772e-03</internalNodes>\n          <leafValues>\n            1.1257000267505646e-01 -6.1032701283693314e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8377 -2.1421469748020172e-02</internalNodes>\n          <leafValues>\n            -1.5464189648628235e-01 1.1853870004415512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8378 8.0171570181846619e-02</internalNodes>\n          <leafValues>\n            5.5826799944043159e-03 -8.2389092445373535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8379 -1.0931739816442132e-03</internalNodes>\n          <leafValues>\n            -7.8393906354904175e-02 1.3433099724352360e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8380 4.1605130536481738e-04</internalNodes>\n          <leafValues>\n            -4.3186139315366745e-02 1.0500840097665787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8381 -2.8376420959830284e-03</internalNodes>\n          <leafValues>\n            7.8960210084915161e-02 -4.2247280478477478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8382 -2.8522519394755363e-02</internalNodes>\n          <leafValues>\n            -1.0722970217466354e-01 4.7789189964532852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8383 4.0068081021308899e-01</internalNodes>\n          <leafValues>\n            -5.7991011999547482e-03 3.0695509910583496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8384 -8.1703867763280869e-03</internalNodes>\n          <leafValues>\n            1.0851760208606720e-01 -5.6153468787670135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8385 9.3125440180301666e-03</internalNodes>\n          <leafValues>\n            -4.4560939073562622e-02 4.3634049594402313e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8386 5.8274720795452595e-03</internalNodes>\n          <leafValues>\n            3.1310841441154480e-02 -1.6053420305252075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8387 -2.9063750989735126e-03</internalNodes>\n          <leafValues>\n            3.7148229777812958e-02 -2.7310580015182495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8388 1.6421969980001450e-02</internalNodes>\n          <leafValues>\n            -3.1616371124982834e-02 1.6195470094680786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8389 -1.3876060023903847e-02</internalNodes>\n          <leafValues>\n            -1.7840880155563354e-01 2.6925239711999893e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8390 -2.9935980215668678e-02</internalNodes>\n          <leafValues>\n            2.0069709420204163e-01 -2.7372730895876884e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8391 8.1381313502788544e-03</internalNodes>\n          <leafValues>\n            4.0951769798994064e-02 -7.4756972491741180e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8392 -5.8591389097273350e-03</internalNodes>\n          <leafValues>\n            -1.2337020039558411e-01 3.9641879498958588e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8393 7.1592196822166443e-02</internalNodes>\n          <leafValues>\n            -1.0293760336935520e-02 2.2391259670257568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8394 5.0111521035432816e-02</internalNodes>\n          <leafValues>\n            2.4072999134659767e-02 -2.1443809568881989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8395 4.2603579349815845e-03</internalNodes>\n          <leafValues>\n            -2.3712050169706345e-02 7.3603406548500061e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8396 6.5065422095358372e-03</internalNodes>\n          <leafValues>\n            -6.7402780055999756e-02 7.6926141977310181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8397 2.0325470250099897e-03</internalNodes>\n          <leafValues>\n            -9.9664673209190369e-02 5.7994231581687927e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8398 -9.3465158715844154e-03</internalNodes>\n          <leafValues>\n            1.9432920217514038e-01 -3.1387709081172943e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8399 9.5768114551901817e-03</internalNodes>\n          <leafValues>\n            2.2594990208745003e-02 -1.6090850532054901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8400 -4.6763911843299866e-02</internalNodes>\n          <leafValues>\n            -3.5020270943641663e-01 1.5035149641335011e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8401 -5.0164870917797089e-02</internalNodes>\n          <leafValues>\n            1.2763389945030212e-01 -1.1035620234906673e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8402 2.3148149251937866e-02</internalNodes>\n          <leafValues>\n            -2.4636579677462578e-02 2.0264349877834320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8403 -7.4168562889099121e-02</internalNodes>\n          <leafValues>\n            -9.4854289293289185e-01 2.2216918878257275e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8404 -2.0698629319667816e-02</internalNodes>\n          <leafValues>\n            -2.4585549533367157e-01 2.1370820701122284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8405 -5.8187540620565414e-02</internalNodes>\n          <leafValues>\n            3.0531001091003418e-01 -8.1265745684504509e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8406 -5.2451588213443756e-02</internalNodes>\n          <leafValues>\n            5.0567781925201416e-01 -9.7108660265803337e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8407 -4.6721640974283218e-02</internalNodes>\n          <leafValues>\n            8.0896109342575073e-01 -1.8908439669758081e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8408 -1.0385509580373764e-02</internalNodes>\n          <leafValues>\n            -2.8369909524917603e-01 1.9166229292750359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8409 5.4432367905974388e-03</internalNodes>\n          <leafValues>\n            4.1430719196796417e-02 -1.6033279895782471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8410 2.4030160158872604e-02</internalNodes>\n          <leafValues>\n            -4.3751548975706100e-02 1.0553020238876343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8411 -2.6430420577526093e-02</internalNodes>\n          <leafValues>\n            -8.7448269128799438e-02 2.8769830241799355e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8412 4.8743681982159615e-03</internalNodes>\n          <leafValues>\n            3.5032961517572403e-02 -1.5881679952144623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8413 -2.5106489192694426e-03</internalNodes>\n          <leafValues>\n            8.8161677122116089e-02 -3.0205590650439262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8414 -5.2146320231258869e-03</internalNodes>\n          <leafValues>\n            -1.1350130289793015e-01 4.2001061141490936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8415 -1.0986009612679482e-02</internalNodes>\n          <leafValues>\n            8.4428779780864716e-02 -3.8272839039564133e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8416 -6.0057129710912704e-02</internalNodes>\n          <leafValues>\n            -7.9249101877212524e-01 5.2951448597013950e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8417 1.3621809892356396e-02</internalNodes>\n          <leafValues>\n            -1.7419820651412010e-02 2.1612060070037842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8418 -2.2223800420761108e-02</internalNodes>\n          <leafValues>\n            2.6721641421318054e-01 -2.0207190886139870e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8419 5.8124359697103500e-02</internalNodes>\n          <leafValues>\n            6.0539757832884789e-03 -4.0927109122276306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8420 -2.8097970411181450e-02</internalNodes>\n          <leafValues>\n            -1.1217900365591049e-01 5.4144639521837234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8421 6.5278373658657074e-02</internalNodes>\n          <leafValues>\n            -7.4973162263631821e-03 1.2384270131587982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8422 -2.5233640335500240e-03</internalNodes>\n          <leafValues>\n            -1.8224379420280457e-01 2.4537850171327591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8423 1.1478599905967712e-01</internalNodes>\n          <leafValues>\n            1.9617579877376556e-02 -1.1905120313167572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8424 9.6991509199142456e-03</internalNodes>\n          <leafValues>\n            -5.3946550935506821e-02 1.1180210113525391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8425 2.9359150677919388e-02</internalNodes>\n          <leafValues>\n            -2.3395609110593796e-02 1.8534250557422638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8426 7.8490097075700760e-03</internalNodes>\n          <leafValues>\n            1.6454109549522400e-01 -4.2129490524530411e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8427 4.0329899638891220e-03</internalNodes>\n          <leafValues>\n            2.4495590478181839e-02 -6.5955489873886108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8428 2.1471390128135681e-01</internalNodes>\n          <leafValues>\n            -1.0462880134582520e-02 4.7438031435012817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8429 -2.2316209506243467e-03</internalNodes>\n          <leafValues>\n            4.9796439707279205e-02 -1.0328280180692673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8430 2.1833330392837524e-02</internalNodes>\n          <leafValues>\n            -5.3884848952293396e-02 9.3277551233768463e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8431 2.4430779740214348e-02</internalNodes>\n          <leafValues>\n            1.5706099569797516e-02 -2.8244438767433167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8432 1.2532520107924938e-02</internalNodes>\n          <leafValues>\n            -3.0983900651335716e-02 1.5599699318408966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8433 7.9741179943084717e-03</internalNodes>\n          <leafValues>\n            2.6650540530681610e-02 -1.3689580559730530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8434 7.9444557428359985e-02</internalNodes>\n          <leafValues>\n            6.4238710328936577e-03 -7.8485661745071411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8435 -1.7925030551850796e-03</internalNodes>\n          <leafValues>\n            3.9645589888095856e-02 -1.1497259885072708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8436 -9.0927572455257177e-04</internalNodes>\n          <leafValues>\n            6.3256889581680298e-02 -7.5250372290611267e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8437 -2.6040049269795418e-02</internalNodes>\n          <leafValues>\n            1.4864259958267212e-01 -1.8506240099668503e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8438 4.1452320292592049e-03</internalNodes>\n          <leafValues>\n            3.3959619700908661e-02 -1.4355990290641785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8439 5.7123368605971336e-04</internalNodes>\n          <leafValues>\n            -6.8550966680049896e-02 6.9944731891155243e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8440 -4.9577720463275909e-02</internalNodes>\n          <leafValues>\n            3.9880838990211487e-01 -1.1339910328388214e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8441 -1.5334860421717167e-02</internalNodes>\n          <leafValues>\n            -8.3445623517036438e-02 3.2276369631290436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8442 -1.7406089231371880e-02</internalNodes>\n          <leafValues>\n            1.3560940325260162e-01 -3.1945578753948212e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8443 -2.1422259509563446e-02</internalNodes>\n          <leafValues>\n            -1.1050239950418472e-01 2.8536040335893631e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8444 1.9694769289344549e-03</internalNodes>\n          <leafValues>\n            4.3834108859300613e-02 -1.0551860183477402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8445 -1.9115379080176353e-02</internalNodes>\n          <leafValues>\n            1.4690290391445160e-01 -1.5405310317873955e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8446 4.6963259577751160e-02</internalNodes>\n          <leafValues>\n            8.1654358655214310e-03 -5.8734887838363647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8447 2.0964320003986359e-01</internalNodes>\n          <leafValues>\n            3.1721789855509996e-03 -8.0437898635864258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8448 6.2511406838893890e-02</internalNodes>\n          <leafValues>\n            -1.6422789543867111e-02 3.0976039171218872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8449 -1.0126180201768875e-01</internalNodes>\n          <leafValues>\n            -6.1639147996902466e-01 7.2699659503996372e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8450 3.3980670850723982e-03</internalNodes>\n          <leafValues>\n            -1.9664889201521873e-02 2.2541929781436920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8451 -1.7059950157999992e-02</internalNodes>\n          <leafValues>\n            -1.7193520441651344e-02 6.9114550948143005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8452 3.7455849815160036e-03</internalNodes>\n          <leafValues>\n            5.1737461239099503e-02 -8.2748822867870331e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8453 8.7769806385040283e-02</internalNodes>\n          <leafValues>\n            -6.3681108877062798e-03 7.9492002725601196e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8454 2.3725361097604036e-03</internalNodes>\n          <leafValues>\n            -3.0487439036369324e-01 1.4520769938826561e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8455 -1.9282909110188484e-02</internalNodes>\n          <leafValues>\n            1.8806980550289154e-01 -1.3220929540693760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8456 3.8580079562962055e-03</internalNodes>\n          <leafValues>\n            3.3978439867496490e-02 -1.2854169309139252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8457 2.6525680441409349e-03</internalNodes>\n          <leafValues>\n            -3.9146900177001953e-02 9.9119357764720917e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8458 9.9175602197647095e-02</internalNodes>\n          <leafValues>\n            5.0618657842278481e-03 -8.7370461225509644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8459 -7.0648840628564358e-03</internalNodes>\n          <leafValues>\n            8.5219286382198334e-02 -2.4467790499329567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8460 -5.2547529339790344e-03</internalNodes>\n          <leafValues>\n            -1.2158469855785370e-01 3.7228528410196304e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8461 5.0068609416484833e-03</internalNodes>\n          <leafValues>\n            -3.5557191818952560e-02 7.8515462577342987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8462 -6.8118162453174591e-02</internalNodes>\n          <leafValues>\n            -2.6292499899864197e-01 1.8325960263609886e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8463 9.3348289374262094e-04</internalNodes>\n          <leafValues>\n            -3.0107179656624794e-02 4.4869720935821533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8464 -2.1996269933879375e-03</internalNodes>\n          <leafValues>\n            1.1136700212955475e-01 -6.6201932728290558e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8465 -6.6485330462455750e-03</internalNodes>\n          <leafValues>\n            -7.8398697078227997e-02 2.0472070202231407e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8466 1.4126920141279697e-03</internalNodes>\n          <leafValues>\n            -5.2428670227527618e-02 8.9471399784088135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8467 5.1406599581241608e-02</internalNodes>\n          <leafValues>\n            -1.4306739903986454e-03 6.3885271549224854e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          2 7 14 4 -1.</_>\n        <_>\n          2 9 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 4 -1.</_>\n        <_>\n          7 2 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 9 5 -1.</_>\n        <_>\n          8 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 9 -1.</_>\n        <_>\n          3 9 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 5 -1.</_>\n        <_>\n          7 1 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 8 -1.</_>\n        <_>\n          4 10 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 10 -1.</_>\n        <_>\n          12 5 3 5 2.</_>\n        <_>\n          9 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 11 9 -1.</_>\n        <_>\n          4 3 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 8 -1.</_>\n        <_>\n          12 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 10 -1.</_>\n        <_>\n          4 5 5 5 2.</_>\n        <_>\n          9 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 5 12 -1.</_>\n        <_>\n          3 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 9 9 -1.</_>\n        <_>\n          5 6 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 12 -1.</_>\n        <_>\n          8 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 5 6 -1.</_>\n        <_>\n          3 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 5 -1.</_>\n        <_>\n          8 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 8 -1.</_>\n        <_>\n          1 2 4 4 2.</_>\n        <_>\n          5 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 10 8 -1.</_>\n        <_>\n          13 12 5 4 2.</_>\n        <_>\n          8 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 10 -1.</_>\n        <_>\n          4 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 10 -1.</_>\n        <_>\n          0 9 20 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 9 -1.</_>\n        <_>\n          3 3 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 11 -1.</_>\n        <_>\n          10 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 11 -1.</_>\n        <_>\n          8 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 8 -1.</_>\n        <_>\n          10 6 6 4 2.</_>\n        <_>\n          4 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 4 -1.</_>\n        <_>\n          4 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 7 -1.</_>\n        <_>\n          11 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 7 -1.</_>\n        <_>\n          7 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 6 -1.</_>\n        <_>\n          0 9 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 6 -1.</_>\n        <_>\n          6 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 7 -1.</_>\n        <_>\n          9 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 5 9 -1.</_>\n        <_>\n          11 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 8 8 -1.</_>\n        <_>\n          4 6 4 4 2.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 8 -1.</_>\n        <_>\n          9 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 5 6 -1.</_>\n        <_>\n          4 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 5 -1.</_>\n        <_>\n          12 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 6 -1.</_>\n        <_>\n          2 14 5 3 2.</_>\n        <_>\n          7 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 17 2 -1.</_>\n        <_>\n          3 3 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 8 -1.</_>\n        <_>\n          5 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 9 -1.</_>\n        <_>\n          14 3 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 9 5 -1.</_>\n        <_>\n          6 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 9 -1.</_>\n        <_>\n          15 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 4 9 -1.</_>\n        <_>\n          3 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 12 -1.</_>\n        <_>\n          8 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 16 4 -1.</_>\n        <_>\n          2 13 8 2 2.</_>\n        <_>\n          10 15 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 6 -1.</_>\n        <_>\n          6 7 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 6 -1.</_>\n        <_>\n          0 13 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 20 2 -1.</_>\n        <_>\n          0 19 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 7 6 -1.</_>\n        <_>\n          1 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 17 3 -1.</_>\n        <_>\n          3 2 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 5 6 -1.</_>\n        <_>\n          3 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 7 -1.</_>\n        <_>\n          8 5 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 14 4 -1.</_>\n        <_>\n          0 4 7 2 2.</_>\n        <_>\n          7 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 12 9 -1.</_>\n        <_>\n          4 14 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 16 -1.</_>\n        <_>\n          3 2 7 8 2.</_>\n        <_>\n          10 10 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 10 16 -1.</_>\n        <_>\n          3 1 5 8 2.</_>\n        <_>\n          8 9 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 2 -1.</_>\n        <_>\n          1 1 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 4 -1.</_>\n        <_>\n          2 12 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 8 -1.</_>\n        <_>\n          9 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 9 -1.</_>\n        <_>\n          5 6 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 8 12 -1.</_>\n        <_>\n          10 10 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 15 3 -1.</_>\n        <_>\n          2 9 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 9 12 -1.</_>\n        <_>\n          10 10 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 8 -1.</_>\n        <_>\n          4 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 12 -1.</_>\n        <_>\n          9 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 18 -1.</_>\n        <_>\n          4 0 3 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 13 2 -1.</_>\n        <_>\n          5 3 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 5 -1.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          10 0 4 6 2.</_>\n        <_>\n          6 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 10 -1.</_>\n        <_>\n          2 1 3 5 2.</_>\n        <_>\n          5 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 7 6 -1.</_>\n        <_>\n          11 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 18 4 -1.</_>\n        <_>\n          0 12 9 2 2.</_>\n        <_>\n          9 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 15 6 -1.</_>\n        <_>\n          5 7 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 5 9 -1.</_>\n        <_>\n          2 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 6 -1.</_>\n        <_>\n          14 8 5 3 2.</_>\n        <_>\n          9 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 10 -1.</_>\n        <_>\n          5 6 5 5 2.</_>\n        <_>\n          10 11 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 12 4 -1.</_>\n        <_>\n          7 6 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 16 4 -1.</_>\n        <_>\n          1 10 8 2 2.</_>\n        <_>\n          9 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          7 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 17 -1.</_>\n        <_>\n          7 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 4 16 -1.</_>\n        <_>\n          11 4 2 8 2.</_>\n        <_>\n          9 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 20 -1.</_>\n        <_>\n          2 0 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 13 -1.</_>\n        <_>\n          15 2 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 18 -1.</_>\n        <_>\n          6 1 3 9 2.</_>\n        <_>\n          9 10 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 13 -1.</_>\n        <_>\n          15 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 14 -1.</_>\n        <_>\n          6 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 13 -1.</_>\n        <_>\n          14 2 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 3 -1.</_>\n        <_>\n          7 2 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 11 8 -1.</_>\n        <_>\n          5 9 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 7 4 -1.</_>\n        <_>\n          11 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 20 -1.</_>\n        <_>\n          5 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 20 -1.</_>\n        <_>\n          7 0 6 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 9 -1.</_>\n        <_>\n          5 6 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 11 -1.</_>\n        <_>\n          14 3 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 4 10 -1.</_>\n        <_>\n          3 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 19 -1.</_>\n        <_>\n          8 1 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 19 -1.</_>\n        <_>\n          6 1 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 16 -1.</_>\n        <_>\n          8 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 12 -1.</_>\n        <_>\n          9 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 12 -1.</_>\n        <_>\n          6 6 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 13 -1.</_>\n        <_>\n          9 7 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 7 6 -1.</_>\n        <_>\n          0 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 19 3 -1.</_>\n        <_>\n          1 9 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 14 -1.</_>\n        <_>\n          6 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 10 6 -1.</_>\n        <_>\n          15 3 5 3 2.</_>\n        <_>\n          10 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 8 -1.</_>\n        <_>\n          5 1 4 4 2.</_>\n        <_>\n          9 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 4 -1.</_>\n        <_>\n          13 7 7 2 2.</_>\n        <_>\n          6 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 14 4 -1.</_>\n        <_>\n          0 7 7 2 2.</_>\n        <_>\n          7 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 9 12 -1.</_>\n        <_>\n          10 10 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 8 4 -1.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 8 6 -1.</_>\n        <_>\n          11 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 13 2 -1.</_>\n        <_>\n          2 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 4 -1.</_>\n        <_>\n          10 14 7 2 2.</_>\n        <_>\n          3 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 9 -1.</_>\n        <_>\n          3 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 13 2 -1.</_>\n        <_>\n          5 10 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 7 9 -1.</_>\n        <_>\n          3 3 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 10 6 -1.</_>\n        <_>\n          13 14 5 3 2.</_>\n        <_>\n          8 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 5 -1.</_>\n        <_>\n          8 4 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 7 4 -1.</_>\n        <_>\n          11 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 8 15 -1.</_>\n        <_>\n          2 10 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 5 6 -1.</_>\n        <_>\n          10 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 5 6 -1.</_>\n        <_>\n          5 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 13 2 -1.</_>\n        <_>\n          4 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 13 3 -1.</_>\n        <_>\n          0 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 14 12 -1.</_>\n        <_>\n          0 1 7 6 2.</_>\n        <_>\n          7 7 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 9 -1.</_>\n        <_>\n          10 13 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 10 9 -1.</_>\n        <_>\n          0 13 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 10 -1.</_>\n        <_>\n          10 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 14 -1.</_>\n        <_>\n          9 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 7 6 -1.</_>\n        <_>\n          13 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 6 -1.</_>\n        <_>\n          0 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 15 3 -1.</_>\n        <_>\n          8 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 4 -1.</_>\n        <_>\n          6 17 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 11 -1.</_>\n        <_>\n          15 0 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 18 -1.</_>\n        <_>\n          7 0 2 9 2.</_>\n        <_>\n          9 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 8 18 -1.</_>\n        <_>\n          16 2 4 9 2.</_>\n        <_>\n          12 11 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 18 -1.</_>\n        <_>\n          4 2 6 9 2.</_>\n        <_>\n          10 11 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 6 -1.</_>\n        <_>\n          4 9 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 4 -1.</_>\n        <_>\n          0 9 9 2 2.</_>\n        <_>\n          9 11 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 4 -1.</_>\n        <_>\n          11 0 9 2 2.</_>\n        <_>\n          2 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 11 -1.</_>\n        <_>\n          3 0 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 15 -1.</_>\n        <_>\n          16 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 11 -1.</_>\n        <_>\n          3 2 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 15 3 -1.</_>\n        <_>\n          7 17 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 4 -1.</_>\n        <_>\n          5 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 14 8 -1.</_>\n        <_>\n          3 13 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 6 -1.</_>\n        <_>\n          3 9 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 8 -1.</_>\n        <_>\n          5 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 8 -1.</_>\n        <_>\n          10 5 10 4 2.</_>\n        <_>\n          0 9 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 16 8 -1.</_>\n        <_>\n          0 9 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 5 -1.</_>\n        <_>\n          9 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 15 5 -1.</_>\n        <_>\n          7 6 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 5 -1.</_>\n        <_>\n          9 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 5 -1.</_>\n        <_>\n          8 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 12 -1.</_>\n        <_>\n          10 8 4 6 2.</_>\n        <_>\n          6 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 7 4 -1.</_>\n        <_>\n          1 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 8 -1.</_>\n        <_>\n          10 0 10 4 2.</_>\n        <_>\n          0 4 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 5 9 -1.</_>\n        <_>\n          5 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 4 -1.</_>\n        <_>\n          11 3 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 7 4 -1.</_>\n        <_>\n          1 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 6 -1.</_>\n        <_>\n          11 10 6 3 2.</_>\n        <_>\n          5 13 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 8 4 -1.</_>\n        <_>\n          5 3 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 5 -1.</_>\n        <_>\n          9 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 14 -1.</_>\n        <_>\n          9 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 19 -1.</_>\n        <_>\n          8 1 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 10 -1.</_>\n        <_>\n          9 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 10 6 -1.</_>\n        <_>\n          0 3 5 3 2.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 8 -1.</_>\n        <_>\n          6 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 5 6 -1.</_>\n        <_>\n          7 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 8 -1.</_>\n        <_>\n          11 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 8 8 -1.</_>\n        <_>\n          4 6 4 4 2.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 6 -1.</_>\n        <_>\n          2 7 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 12 -1.</_>\n        <_>\n          5 7 5 6 2.</_>\n        <_>\n          10 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 13 3 -1.</_>\n        <_>\n          6 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 6 -1.</_>\n        <_>\n          12 14 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 6 -1.</_>\n        <_>\n          0 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 6 -1.</_>\n        <_>\n          11 10 8 3 2.</_>\n        <_>\n          3 13 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 12 -1.</_>\n        <_>\n          3 8 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 15 -1.</_>\n        <_>\n          0 10 20 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 16 4 -1.</_>\n        <_>\n          1 11 8 2 2.</_>\n        <_>\n          9 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 5 -1.</_>\n        <_>\n          9 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 5 9 -1.</_>\n        <_>\n          3 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 5 -1.</_>\n        <_>\n          10 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 5 -1.</_>\n        <_>\n          7 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 9 -1.</_>\n        <_>\n          15 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 7 -1.</_>\n        <_>\n          3 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 8 -1.</_>\n        <_>\n          16 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 12 12 -1.</_>\n        <_>\n          2 11 12 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 6 -1.</_>\n        <_>\n          3 3 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 9 -1.</_>\n        <_>\n          0 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 10 18 -1.</_>\n        <_>\n          10 2 5 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 10 17 -1.</_>\n        <_>\n          5 3 5 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 8 -1.</_>\n        <_>\n          16 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 8 -1.</_>\n        <_>\n          2 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 6 -1.</_>\n        <_>\n          10 12 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 5 9 -1.</_>\n        <_>\n          5 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 13 2 -1.</_>\n        <_>\n          5 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 5 -1.</_>\n        <_>\n          8 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 2 -1.</_>\n        <_>\n          5 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 14 2 -1.</_>\n        <_>\n          8 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          10 10 4 4 2.</_>\n        <_>\n          6 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          10 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 14 -1.</_>\n        <_>\n          9 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 5 -1.</_>\n        <_>\n          7 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 3 -1.</_>\n        <_>\n          3 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 4 -1.</_>\n        <_>\n          1 2 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 8 -1.</_>\n        <_>\n          3 1 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          14 0 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 9 -1.</_>\n        <_>\n          3 0 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 4 -1.</_>\n        <_>\n          4 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 9 8 -1.</_>\n        <_>\n          4 9 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 2 -1.</_>\n        <_>\n          2 1 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 6 -1.</_>\n        <_>\n          12 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 10 3 -1.</_>\n        <_>\n          6 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 12 -1.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 12 -1.</_>\n        <_>\n          3 4 7 6 2.</_>\n        <_>\n          10 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 8 -1.</_>\n        <_>\n          6 10 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 7 4 -1.</_>\n        <_>\n          0 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 8 -1.</_>\n        <_>\n          16 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 10 -1.</_>\n        <_>\n          3 3 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 6 -1.</_>\n        <_>\n          5 6 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 4 -1.</_>\n        <_>\n          8 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 10 -1.</_>\n        <_>\n          14 2 3 5 2.</_>\n        <_>\n          11 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 15 6 -1.</_>\n        <_>\n          3 17 15 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 4 -1.</_>\n        <_>\n          0 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 6 -1.</_>\n        <_>\n          11 9 6 3 2.</_>\n        <_>\n          5 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 14 4 -1.</_>\n        <_>\n          2 10 7 2 2.</_>\n        <_>\n          9 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 19 9 -1.</_>\n        <_>\n          1 3 19 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 16 3 -1.</_>\n        <_>\n          1 12 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 20 -1.</_>\n        <_>\n          10 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 15 5 -1.</_>\n        <_>\n          8 6 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 7 -1.</_>\n        <_>\n          6 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 7 6 -1.</_>\n        <_>\n          2 14 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 5 6 -1.</_>\n        <_>\n          12 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 3 15 -1.</_>\n        <_>\n          4 10 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 10 -1.</_>\n        <_>\n          14 2 3 5 2.</_>\n        <_>\n          11 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 10 9 -1.</_>\n        <_>\n          7 13 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 10 -1.</_>\n        <_>\n          2 6 8 5 2.</_>\n        <_>\n          10 11 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 4 -1.</_>\n        <_>\n          10 9 10 2 2.</_>\n        <_>\n          0 11 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 7 -1.</_>\n        <_>\n          6 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 20 -1.</_>\n        <_>\n          18 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 13 2 -1.</_>\n        <_>\n          3 2 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 18 -1.</_>\n        <_>\n          18 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 15 5 -1.</_>\n        <_>\n          6 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 15 -1.</_>\n        <_>\n          9 3 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 6 -1.</_>\n        <_>\n          5 6 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 8 -1.</_>\n        <_>\n          10 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 12 -1.</_>\n        <_>\n          7 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 15 10 -1.</_>\n        <_>\n          5 10 15 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 7 4 -1.</_>\n        <_>\n          4 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 4 -1.</_>\n        <_>\n          8 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 7 4 -1.</_>\n        <_>\n          1 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 8 -1.</_>\n        <_>\n          11 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 12 -1.</_>\n        <_>\n          4 6 6 6 2.</_>\n        <_>\n          10 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 10 -1.</_>\n        <_>\n          14 1 3 5 2.</_>\n        <_>\n          11 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 16 12 -1.</_>\n        <_>\n          1 5 8 6 2.</_>\n        <_>\n          9 11 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 6 -1.</_>\n        <_>\n          4 9 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 10 -1.</_>\n        <_>\n          6 0 3 5 2.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 12 8 -1.</_>\n        <_>\n          13 1 6 4 2.</_>\n        <_>\n          7 5 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 18 -1.</_>\n        <_>\n          2 1 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 5 9 -1.</_>\n        <_>\n          15 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 6 -1.</_>\n        <_>\n          0 12 10 3 2.</_>\n        <_>\n          10 15 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 15 -1.</_>\n        <_>\n          10 9 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 8 -1.</_>\n        <_>\n          1 1 6 4 2.</_>\n        <_>\n          7 5 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 5 6 -1.</_>\n        <_>\n          11 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 5 6 -1.</_>\n        <_>\n          4 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 6 -1.</_>\n        <_>\n          4 16 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 9 -1.</_>\n        <_>\n          2 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 6 -1.</_>\n        <_>\n          5 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 2 -1.</_>\n        <_>\n          2 1 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 10 -1.</_>\n        <_>\n          10 2 9 5 2.</_>\n        <_>\n          1 7 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 5 -1.</_>\n        <_>\n          8 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 14 -1.</_>\n        <_>\n          10 4 5 7 2.</_>\n        <_>\n          5 11 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 5 6 -1.</_>\n        <_>\n          0 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 13 3 -1.</_>\n        <_>\n          7 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 4 -1.</_>\n        <_>\n          0 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 8 -1.</_>\n        <_>\n          5 10 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 18 3 -1.</_>\n        <_>\n          1 14 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 4 -1.</_>\n        <_>\n          10 15 7 2 2.</_>\n        <_>\n          3 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 13 -1.</_>\n        <_>\n          1 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 8 -1.</_>\n        <_>\n          8 9 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 5 -1.</_>\n        <_>\n          7 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 20 -1.</_>\n        <_>\n          16 0 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 20 -1.</_>\n        <_>\n          2 0 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 19 -1.</_>\n        <_>\n          16 1 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 4 -1.</_>\n        <_>\n          1 0 8 2 2.</_>\n        <_>\n          9 2 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 4 14 -1.</_>\n        <_>\n          14 6 2 7 2.</_>\n        <_>\n          12 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 15 3 -1.</_>\n        <_>\n          2 9 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 10 -1.</_>\n        <_>\n          11 6 4 5 2.</_>\n        <_>\n          7 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 20 -1.</_>\n        <_>\n          2 0 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 3 -1.</_>\n        <_>\n          5 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 14 3 -1.</_>\n        <_>\n          1 18 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 5 9 -1.</_>\n        <_>\n          15 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 10 -1.</_>\n        <_>\n          9 6 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          8 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 8 14 -1.</_>\n        <_>\n          5 4 4 7 2.</_>\n        <_>\n          9 11 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 8 -1.</_>\n        <_>\n          10 6 6 4 2.</_>\n        <_>\n          4 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 13 6 -1.</_>\n        <_>\n          3 4 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 7 10 -1.</_>\n        <_>\n          10 9 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 10 -1.</_>\n        <_>\n          3 4 7 5 2.</_>\n        <_>\n          10 9 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 3 13 -1.</_>\n        <_>\n          17 4 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 3 13 -1.</_>\n        <_>\n          2 4 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 6 -1.</_>\n        <_>\n          11 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 9 4 -1.</_>\n        <_>\n          0 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 12 8 -1.</_>\n        <_>\n          13 8 6 4 2.</_>\n        <_>\n          7 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 12 8 -1.</_>\n        <_>\n          1 8 6 4 2.</_>\n        <_>\n          7 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 10 -1.</_>\n        <_>\n          7 0 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 12 -1.</_>\n        <_>\n          4 2 4 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 12 9 -1.</_>\n        <_>\n          12 11 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 9 -1.</_>\n        <_>\n          7 10 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 10 -1.</_>\n        <_>\n          10 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 8 8 -1.</_>\n        <_>\n          13 12 4 4 2.</_>\n        <_>\n          9 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 9 15 -1.</_>\n        <_>\n          13 2 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 9 15 -1.</_>\n        <_>\n          4 1 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 6 -1.</_>\n        <_>\n          5 6 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 5 8 -1.</_>\n        <_>\n          5 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 4 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 5 8 -1.</_>\n        <_>\n          3 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 12 -1.</_>\n        <_>\n          14 1 3 6 2.</_>\n        <_>\n          11 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 8 8 -1.</_>\n        <_>\n          3 12 4 4 2.</_>\n        <_>\n          7 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 15 -1.</_>\n        <_>\n          15 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 14 8 -1.</_>\n        <_>\n          2 5 7 4 2.</_>\n        <_>\n          9 9 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 6 -1.</_>\n        <_>\n          12 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 10 -1.</_>\n        <_>\n          3 1 3 5 2.</_>\n        <_>\n          6 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 13 2 -1.</_>\n        <_>\n          4 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 19 2 -1.</_>\n        <_>\n          1 3 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 7 6 -1.</_>\n        <_>\n          1 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 13 3 -1.</_>\n        <_>\n          5 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 13 2 -1.</_>\n        <_>\n          7 1 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 12 -1.</_>\n        <_>\n          6 10 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 8 -1.</_>\n        <_>\n          11 1 4 4 2.</_>\n        <_>\n          7 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 8 -1.</_>\n        <_>\n          5 1 4 4 2.</_>\n        <_>\n          9 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 8 6 -1.</_>\n        <_>\n          10 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 12 -1.</_>\n        <_>\n          8 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 7 8 -1.</_>\n        <_>\n          12 9 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 14 -1.</_>\n        <_>\n          3 2 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 7 8 -1.</_>\n        <_>\n          1 9 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 16 -1.</_>\n        <_>\n          8 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 7 -1.</_>\n        <_>\n          6 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 7 6 -1.</_>\n        <_>\n          11 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 7 6 -1.</_>\n        <_>\n          2 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 13 3 -1.</_>\n        <_>\n          5 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 7 4 -1.</_>\n        <_>\n          1 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 17 6 -1.</_>\n        <_>\n          2 4 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 8 4 -1.</_>\n        <_>\n          5 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 8 -1.</_>\n        <_>\n          10 1 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 8 -1.</_>\n        <_>\n          8 1 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 3 14 -1.</_>\n        <_>\n          11 3 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 18 4 -1.</_>\n        <_>\n          0 11 9 2 2.</_>\n        <_>\n          9 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 7 4 -1.</_>\n        <_>\n          11 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 12 12 -1.</_>\n        <_>\n          2 7 6 6 2.</_>\n        <_>\n          8 13 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 13 2 -1.</_>\n        <_>\n          4 12 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 15 12 -1.</_>\n        <_>\n          0 10 15 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 11 8 -1.</_>\n        <_>\n          5 6 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 13 3 -1.</_>\n        <_>\n          2 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 9 -1.</_>\n        <_>\n          15 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 13 -1.</_>\n        <_>\n          8 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 3 -1.</_>\n        <_>\n          7 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 13 -1.</_>\n        <_>\n          9 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 13 -1.</_>\n        <_>\n          9 3 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 8 -1.</_>\n        <_>\n          1 2 4 4 2.</_>\n        <_>\n          5 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 12 -1.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 5 -1.</_>\n        <_>\n          8 4 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 16 -1.</_>\n        <_>\n          0 11 20 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 16 6 -1.</_>\n        <_>\n          0 6 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 5 12 -1.</_>\n        <_>\n          9 12 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 8 -1.</_>\n        <_>\n          5 10 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 16 3 -1.</_>\n        <_>\n          2 9 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 3 -1.</_>\n        <_>\n          2 10 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 7 4 -1.</_>\n        <_>\n          7 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 6 -1.</_>\n        <_>\n          6 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 14 3 -1.</_>\n        <_>\n          3 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 16 -1.</_>\n        <_>\n          1 4 3 8 2.</_>\n        <_>\n          4 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 19 6 -1.</_>\n        <_>\n          1 16 19 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 8 -1.</_>\n        <_>\n          7 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 12 4 -1.</_>\n        <_>\n          9 7 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 4 -1.</_>\n        <_>\n          7 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 6 -1.</_>\n        <_>\n          6 7 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 10 -1.</_>\n        <_>\n          6 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 8 -1.</_>\n        <_>\n          11 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 8 -1.</_>\n        <_>\n          5 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 2 -1.</_>\n        <_>\n          4 1 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 7 -1.</_>\n        <_>\n          2 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 7 -1.</_>\n        <_>\n          16 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 5 10 -1.</_>\n        <_>\n          5 9 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 5 10 -1.</_>\n        <_>\n          8 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 9 -1.</_>\n        <_>\n          16 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          2 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 19 3 -1.</_>\n        <_>\n          1 2 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 14 -1.</_>\n        <_>\n          8 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 8 -1.</_>\n        <_>\n          10 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 4 -1.</_>\n        <_>\n          8 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 2 -1.</_>\n        <_>\n          0 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 5 -1.</_>\n        <_>\n          9 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 11 -1.</_>\n        <_>\n          13 2 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 5 9 -1.</_>\n        <_>\n          0 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 8 -1.</_>\n        <_>\n          13 2 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 8 -1.</_>\n        <_>\n          4 2 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 13 3 -1.</_>\n        <_>\n          7 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 6 -1.</_>\n        <_>\n          0 2 10 3 2.</_>\n        <_>\n          10 5 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 13 -1.</_>\n        <_>\n          6 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 10 -1.</_>\n        <_>\n          0 6 20 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 3 13 -1.</_>\n        <_>\n          8 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 16 -1.</_>\n        <_>\n          11 0 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 13 -1.</_>\n        <_>\n          1 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 6 -1.</_>\n        <_>\n          10 13 10 3 2.</_>\n        <_>\n          0 16 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 4 13 -1.</_>\n        <_>\n          2 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 15 10 -1.</_>\n        <_>\n          5 15 15 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 15 10 -1.</_>\n        <_>\n          0 15 15 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          8 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 16 -1.</_>\n        <_>\n          8 0 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 9 4 -1.</_>\n        <_>\n          6 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 15 2 -1.</_>\n        <_>\n          1 4 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 13 8 -1.</_>\n        <_>\n          6 9 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 11 6 -1.</_>\n        <_>\n          4 2 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 4 -1.</_>\n        <_>\n          10 9 9 2 2.</_>\n        <_>\n          1 11 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 8 -1.</_>\n        <_>\n          6 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 4 -1.</_>\n        <_>\n          9 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 12 4 -1.</_>\n        <_>\n          7 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 8 -1.</_>\n        <_>\n          5 7 4 4 2.</_>\n        <_>\n          9 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 3 -1.</_>\n        <_>\n          10 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 4 -1.</_>\n        <_>\n          10 0 10 2 2.</_>\n        <_>\n          0 2 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 13 3 -1.</_>\n        <_>\n          3 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 7 -1.</_>\n        <_>\n          11 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 7 -1.</_>\n        <_>\n          7 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 2 -1.</_>\n        <_>\n          1 17 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 3 -1.</_>\n        <_>\n          0 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 13 -1.</_>\n        <_>\n          14 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 13 3 -1.</_>\n        <_>\n          3 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 7 6 -1.</_>\n        <_>\n          11 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 7 6 -1.</_>\n        <_>\n          2 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 10 -1.</_>\n        <_>\n          8 10 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 13 2 -1.</_>\n        <_>\n          0 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 14 4 -1.</_>\n        <_>\n          12 7 7 2 2.</_>\n        <_>\n          5 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 14 4 -1.</_>\n        <_>\n          1 7 7 2 2.</_>\n        <_>\n          8 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          8 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 13 -1.</_>\n        <_>\n          5 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 9 9 -1.</_>\n        <_>\n          12 7 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 15 2 -1.</_>\n        <_>\n          0 9 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 6 -1.</_>\n        <_>\n          15 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 9 18 -1.</_>\n        <_>\n          4 9 9 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 5 -1.</_>\n        <_>\n          14 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 5 6 -1.</_>\n        <_>\n          0 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 5 10 -1.</_>\n        <_>\n          9 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 8 -1.</_>\n        <_>\n          3 11 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 10 -1.</_>\n        <_>\n          12 7 3 5 2.</_>\n        <_>\n          9 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 9 10 -1.</_>\n        <_>\n          4 5 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 16 -1.</_>\n        <_>\n          9 2 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 9 16 -1.</_>\n        <_>\n          8 2 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 10 10 -1.</_>\n        <_>\n          5 15 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 10 -1.</_>\n        <_>\n          5 4 3 5 2.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 8 8 -1.</_>\n        <_>\n          15 2 4 4 2.</_>\n        <_>\n          11 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 10 -1.</_>\n        <_>\n          3 2 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 13 8 -1.</_>\n        <_>\n          4 14 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 4 -1.</_>\n        <_>\n          9 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          7 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 8 -1.</_>\n        <_>\n          1 2 4 4 2.</_>\n        <_>\n          5 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 6 -1.</_>\n        <_>\n          4 9 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 10 -1.</_>\n        <_>\n          4 5 6 5 2.</_>\n        <_>\n          10 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 8 8 -1.</_>\n        <_>\n          12 12 4 4 2.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 5 6 -1.</_>\n        <_>\n          3 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 8 -1.</_>\n        <_>\n          9 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 8 -1.</_>\n        <_>\n          6 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 13 3 -1.</_>\n        <_>\n          7 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 2 -1.</_>\n        <_>\n          3 2 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 6 -1.</_>\n        <_>\n          12 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 6 -1.</_>\n        <_>\n          0 7 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 18 -1.</_>\n        <_>\n          14 1 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 15 -1.</_>\n        <_>\n          5 1 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 3 -1.</_>\n        <_>\n          6 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 4 -1.</_>\n        <_>\n          0 14 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 4 -1.</_>\n        <_>\n          12 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 7 4 -1.</_>\n        <_>\n          1 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 2 -1.</_>\n        <_>\n          0 8 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 8 -1.</_>\n        <_>\n          5 9 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 3 10 -1.</_>\n        <_>\n          7 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 11 -1.</_>\n        <_>\n          8 9 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 20 -1.</_>\n        <_>\n          7 0 6 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 7 4 -1.</_>\n        <_>\n          7 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 16 4 -1.</_>\n        <_>\n          2 17 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 13 2 -1.</_>\n        <_>\n          5 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 8 -1.</_>\n        <_>\n          5 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 15 -1.</_>\n        <_>\n          12 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 9 6 -1.</_>\n        <_>\n          10 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 9 6 -1.</_>\n        <_>\n          1 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 13 3 -1.</_>\n        <_>\n          5 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 13 2 -1.</_>\n        <_>\n          3 3 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 3 -1.</_>\n        <_>\n          4 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 17 2 -1.</_>\n        <_>\n          0 11 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 12 -1.</_>\n        <_>\n          11 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 16 4 -1.</_>\n        <_>\n          0 10 8 2 2.</_>\n        <_>\n          8 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 4 -1.</_>\n        <_>\n          3 14 7 2 2.</_>\n        <_>\n          10 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 3 -1.</_>\n        <_>\n          6 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 14 3 -1.</_>\n        <_>\n          7 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 10 8 -1.</_>\n        <_>\n          10 8 5 4 2.</_>\n        <_>\n          5 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 7 -1.</_>\n        <_>\n          7 2 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 5 6 -1.</_>\n        <_>\n          12 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 4 7 -1.</_>\n        <_>\n          3 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 2 -1.</_>\n        <_>\n          4 1 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 7 9 -1.</_>\n        <_>\n          0 9 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 14 -1.</_>\n        <_>\n          10 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 13 3 -1.</_>\n        <_>\n          3 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 7 6 -1.</_>\n        <_>\n          13 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 5 -1.</_>\n        <_>\n          6 1 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 6 10 -1.</_>\n        <_>\n          15 10 3 5 2.</_>\n        <_>\n          12 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 10 -1.</_>\n        <_>\n          2 10 3 5 2.</_>\n        <_>\n          5 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 6 -1.</_>\n        <_>\n          4 5 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 4 -1.</_>\n        <_>\n          0 2 9 2 2.</_>\n        <_>\n          9 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 10 -1.</_>\n        <_>\n          9 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 5 -1.</_>\n        <_>\n          6 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 10 -1.</_>\n        <_>\n          13 10 3 5 2.</_>\n        <_>\n          10 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 10 -1.</_>\n        <_>\n          4 10 3 5 2.</_>\n        <_>\n          7 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 10 -1.</_>\n        <_>\n          10 0 4 5 2.</_>\n        <_>\n          6 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 10 -1.</_>\n        <_>\n          1 0 3 5 2.</_>\n        <_>\n          4 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 14 -1.</_>\n        <_>\n          9 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 10 -1.</_>\n        <_>\n          15 1 3 5 2.</_>\n        <_>\n          12 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 4 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 9 18 -1.</_>\n        <_>\n          11 10 9 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 10 -1.</_>\n        <_>\n          2 1 3 5 2.</_>\n        <_>\n          5 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 16 4 -1.</_>\n        <_>\n          12 10 8 2 2.</_>\n        <_>\n          4 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 4 -1.</_>\n        <_>\n          0 10 9 2 2.</_>\n        <_>\n          9 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 8 -1.</_>\n        <_>\n          12 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 18 10 -1.</_>\n        <_>\n          0 4 9 5 2.</_>\n        <_>\n          9 9 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 2 -1.</_>\n        <_>\n          2 12 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 5 9 -1.</_>\n        <_>\n          4 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 8 -1.</_>\n        <_>\n          12 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 13 2 -1.</_>\n        <_>\n          1 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 8 -1.</_>\n        <_>\n          12 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 8 -1.</_>\n        <_>\n          6 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 8 -1.</_>\n        <_>\n          12 5 4 4 2.</_>\n        <_>\n          8 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 10 -1.</_>\n        <_>\n          16 0 3 5 2.</_>\n        <_>\n          13 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 13 3 -1.</_>\n        <_>\n          3 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 11 6 -1.</_>\n        <_>\n          5 14 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 7 6 -1.</_>\n        <_>\n          1 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 8 -1.</_>\n        <_>\n          13 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 8 -1.</_>\n        <_>\n          3 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 20 -1.</_>\n        <_>\n          10 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 20 -1.</_>\n        <_>\n          5 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 3 -1.</_>\n        <_>\n          0 2 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 10 -1.</_>\n        <_>\n          8 14 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 3 -1.</_>\n        <_>\n          3 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 10 -1.</_>\n        <_>\n          16 0 3 5 2.</_>\n        <_>\n          13 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 10 -1.</_>\n        <_>\n          1 0 3 5 2.</_>\n        <_>\n          4 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 12 -1.</_>\n        <_>\n          7 7 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 17 2 -1.</_>\n        <_>\n          1 3 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 18 -1.</_>\n        <_>\n          12 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 6 -1.</_>\n        <_>\n          0 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 7 4 -1.</_>\n        <_>\n          7 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 14 -1.</_>\n        <_>\n          0 6 3 7 2.</_>\n        <_>\n          3 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 6 -1.</_>\n        <_>\n          12 13 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 12 4 -1.</_>\n        <_>\n          6 16 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 3 -1.</_>\n        <_>\n          7 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 8 -1.</_>\n        <_>\n          5 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 16 4 -1.</_>\n        <_>\n          11 11 8 2 2.</_>\n        <_>\n          3 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 16 4 -1.</_>\n        <_>\n          1 11 8 2 2.</_>\n        <_>\n          9 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 8 -1.</_>\n        <_>\n          16 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 18 -1.</_>\n        <_>\n          7 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 8 -1.</_>\n        <_>\n          16 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 4 -1.</_>\n        <_>\n          8 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 3 -1.</_>\n        <_>\n          4 1 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 8 -1.</_>\n        <_>\n          2 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          16 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 7 -1.</_>\n        <_>\n          2 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 12 -1.</_>\n        <_>\n          9 6 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 10 6 -1.</_>\n        <_>\n          0 12 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 10 -1.</_>\n        <_>\n          4 15 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 16 -1.</_>\n        <_>\n          10 4 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 16 -1.</_>\n        <_>\n          8 4 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 2 -1.</_>\n        <_>\n          7 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 2 -1.</_>\n        <_>\n          0 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 5 -1.</_>\n        <_>\n          11 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 9 5 -1.</_>\n        <_>\n          6 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 10 -1.</_>\n        <_>\n          14 6 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 17 6 -1.</_>\n        <_>\n          1 7 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 10 -1.</_>\n        <_>\n          14 6 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 14 3 -1.</_>\n        <_>\n          0 18 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 10 -1.</_>\n        <_>\n          14 6 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 10 -1.</_>\n        <_>\n          3 6 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 5 -1.</_>\n        <_>\n          10 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 5 -1.</_>\n        <_>\n          7 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 13 -1.</_>\n        <_>\n          4 7 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 3 15 -1.</_>\n        <_>\n          14 3 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 15 -1.</_>\n        <_>\n          5 3 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 15 5 -1.</_>\n        <_>\n          8 2 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 14 -1.</_>\n        <_>\n          5 11 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 5 -1.</_>\n        <_>\n          9 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 12 -1.</_>\n        <_>\n          4 6 5 6 2.</_>\n        <_>\n          9 12 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 10 -1.</_>\n        <_>\n          11 5 6 5 2.</_>\n        <_>\n          5 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 10 -1.</_>\n        <_>\n          3 5 6 5 2.</_>\n        <_>\n          9 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 12 -1.</_>\n        <_>\n          16 0 4 6 2.</_>\n        <_>\n          12 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 4 -1.</_>\n        <_>\n          10 2 10 2 2.</_>\n        <_>\n          0 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 8 -1.</_>\n        <_>\n          8 6 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 20 -1.</_>\n        <_>\n          11 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 20 -1.</_>\n        <_>\n          8 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 2 13 -1.</_>\n        <_>\n          10 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 13 -1.</_>\n        <_>\n          9 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 4 -1.</_>\n        <_>\n          10 15 10 2 2.</_>\n        <_>\n          0 17 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 3 13 -1.</_>\n        <_>\n          3 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 7 6 -1.</_>\n        <_>\n          7 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 15 14 -1.</_>\n        <_>\n          0 9 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 8 -1.</_>\n        <_>\n          12 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 6 -1.</_>\n        <_>\n          4 16 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 18 4 -1.</_>\n        <_>\n          10 13 9 2 2.</_>\n        <_>\n          1 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 11 4 -1.</_>\n        <_>\n          5 9 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 14 -1.</_>\n        <_>\n          9 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 14 -1.</_>\n        <_>\n          14 6 3 7 2.</_>\n        <_>\n          11 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 11 -1.</_>\n        <_>\n          3 2 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 5 -1.</_>\n        <_>\n          9 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 12 -1.</_>\n        <_>\n          3 7 3 6 2.</_>\n        <_>\n          6 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 3 -1.</_>\n        <_>\n          7 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 10 3 -1.</_>\n        <_>\n          8 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 3 -1.</_>\n        <_>\n          6 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 9 -1.</_>\n        <_>\n          3 3 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 4 -1.</_>\n        <_>\n          10 1 7 2 2.</_>\n        <_>\n          3 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 7 6 -1.</_>\n        <_>\n          1 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 10 10 -1.</_>\n        <_>\n          11 9 5 5 2.</_>\n        <_>\n          6 14 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 10 10 -1.</_>\n        <_>\n          4 9 5 5 2.</_>\n        <_>\n          9 14 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 6 -1.</_>\n        <_>\n          5 9 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 7 4 -1.</_>\n        <_>\n          1 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 3 -1.</_>\n        <_>\n          3 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 7 10 -1.</_>\n        <_>\n          6 12 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 10 19 -1.</_>\n        <_>\n          10 1 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 14 -1.</_>\n        <_>\n          9 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 20 -1.</_>\n        <_>\n          10 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 20 -1.</_>\n        <_>\n          5 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 13 -1.</_>\n        <_>\n          12 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 8 -1.</_>\n        <_>\n          5 9 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 7 4 -1.</_>\n        <_>\n          1 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 11 8 -1.</_>\n        <_>\n          7 16 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 13 -1.</_>\n        <_>\n          7 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 7 -1.</_>\n        <_>\n          10 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 16 4 -1.</_>\n        <_>\n          2 15 8 2 2.</_>\n        <_>\n          10 17 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 6 -1.</_>\n        <_>\n          10 1 9 3 2.</_>\n        <_>\n          1 4 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 6 -1.</_>\n        <_>\n          3 3 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 10 6 -1.</_>\n        <_>\n          0 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 7 -1.</_>\n        <_>\n          10 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 7 -1.</_>\n        <_>\n          8 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 13 12 -1.</_>\n        <_>\n          4 6 13 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 3 -1.</_>\n        <_>\n          1 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 6 -1.</_>\n        <_>\n          15 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 13 3 -1.</_>\n        <_>\n          3 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 10 6 -1.</_>\n        <_>\n          10 10 5 3 2.</_>\n        <_>\n          5 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 12 -1.</_>\n        <_>\n          3 5 6 6 2.</_>\n        <_>\n          9 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 6 -1.</_>\n        <_>\n          15 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 8 -1.</_>\n        <_>\n          1 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 7 -1.</_>\n        <_>\n          6 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 3 -1.</_>\n        <_>\n          2 2 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 6 6 -1.</_>\n        <_>\n          7 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 13 3 -1.</_>\n        <_>\n          4 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 18 4 -1.</_>\n        <_>\n          1 14 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 6 -1.</_>\n        <_>\n          12 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 14 -1.</_>\n        <_>\n          0 8 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 6 -1.</_>\n        <_>\n          11 12 9 3 2.</_>\n        <_>\n          2 15 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 13 -1.</_>\n        <_>\n          7 2 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 7 6 -1.</_>\n        <_>\n          13 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 10 -1.</_>\n        <_>\n          2 5 8 5 2.</_>\n        <_>\n          10 10 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 7 -1.</_>\n        <_>\n          16 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 7 -1.</_>\n        <_>\n          6 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 7 4 -1.</_>\n        <_>\n          13 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 7 4 -1.</_>\n        <_>\n          0 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 14 3 -1.</_>\n        <_>\n          6 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 13 3 -1.</_>\n        <_>\n          1 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 17 6 -1.</_>\n        <_>\n          2 16 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 5 12 -1.</_>\n        <_>\n          7 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 7 -1.</_>\n        <_>\n          8 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          7 10 3 5 2.</_>\n        <_>\n          10 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 15 3 -1.</_>\n        <_>\n          0 14 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 5 8 -1.</_>\n        <_>\n          13 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 18 6 -1.</_>\n        <_>\n          0 12 9 3 2.</_>\n        <_>\n          9 15 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 6 10 -1.</_>\n        <_>\n          15 10 3 5 2.</_>\n        <_>\n          12 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 10 -1.</_>\n        <_>\n          2 10 3 5 2.</_>\n        <_>\n          5 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 3 -1.</_>\n        <_>\n          9 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 6 -1.</_>\n        <_>\n          0 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 3 -1.</_>\n        <_>\n          10 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 3 -1.</_>\n        <_>\n          2 6 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 12 12 -1.</_>\n        <_>\n          8 8 6 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 7 6 -1.</_>\n        <_>\n          6 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 5 -1.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 5 -1.</_>\n        <_>\n          8 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 5 12 -1.</_>\n        <_>\n          9 12 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 8 -1.</_>\n        <_>\n          6 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 12 -1.</_>\n        <_>\n          14 0 3 6 2.</_>\n        <_>\n          11 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 12 -1.</_>\n        <_>\n          3 0 3 6 2.</_>\n        <_>\n          6 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 4 8 -1.</_>\n        <_>\n          10 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 8 -1.</_>\n        <_>\n          5 9 5 4 2.</_>\n        <_>\n          10 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 13 3 -1.</_>\n        <_>\n          4 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 7 -1.</_>\n        <_>\n          14 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 7 -1.</_>\n        <_>\n          4 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 14 6 -1.</_>\n        <_>\n          13 5 7 3 2.</_>\n        <_>\n          6 8 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 16 6 -1.</_>\n        <_>\n          0 6 8 3 2.</_>\n        <_>\n          8 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 5 9 -1.</_>\n        <_>\n          12 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 9 8 -1.</_>\n        <_>\n          1 10 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 7 6 -1.</_>\n        <_>\n          13 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 7 6 -1.</_>\n        <_>\n          0 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 14 -1.</_>\n        <_>\n          9 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 19 2 -1.</_>\n        <_>\n          1 3 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 13 -1.</_>\n        <_>\n          2 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 9 -1.</_>\n        <_>\n          16 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          2 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 9 -1.</_>\n        <_>\n          0 14 20 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 4 -1.</_>\n        <_>\n          0 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 10 -1.</_>\n        <_>\n          11 3 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 3 -1.</_>\n        <_>\n          9 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 5 -1.</_>\n        <_>\n          10 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 5 -1.</_>\n        <_>\n          8 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          8 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 9 -1.</_>\n        <_>\n          7 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 8 -1.</_>\n        <_>\n          10 0 9 4 2.</_>\n        <_>\n          1 4 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 14 2 -1.</_>\n        <_>\n          3 19 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 16 -1.</_>\n        <_>\n          0 4 3 8 2.</_>\n        <_>\n          3 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 13 -1.</_>\n        <_>\n          14 6 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 12 -1.</_>\n        <_>\n          6 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 5 6 -1.</_>\n        <_>\n          11 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 4 -1.</_>\n        <_>\n          6 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 7 -1.</_>\n        <_>\n          8 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 10 -1.</_>\n        <_>\n          12 0 3 5 2.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 20 -1.</_>\n        <_>\n          5 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 4 10 -1.</_>\n        <_>\n          15 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 4 10 -1.</_>\n        <_>\n          3 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 16 -1.</_>\n        <_>\n          10 0 5 8 2.</_>\n        <_>\n          5 8 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 13 3 -1.</_>\n        <_>\n          3 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 5 9 -1.</_>\n        <_>\n          8 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 12 -1.</_>\n        <_>\n          4 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 9 6 -1.</_>\n        <_>\n          8 16 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 6 -1.</_>\n        <_>\n          0 7 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 13 3 -1.</_>\n        <_>\n          4 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 12 -1.</_>\n        <_>\n          6 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 13 3 -1.</_>\n        <_>\n          4 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 13 3 -1.</_>\n        <_>\n          2 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 14 -1.</_>\n        <_>\n          11 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 4 -1.</_>\n        <_>\n          7 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 7 -1.</_>\n        <_>\n          8 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 8 -1.</_>\n        <_>\n          2 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 9 -1.</_>\n        <_>\n          2 14 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 7 -1.</_>\n        <_>\n          2 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 16 4 -1.</_>\n        <_>\n          0 10 8 2 2.</_>\n        <_>\n          8 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 2 -1.</_>\n        <_>\n          3 2 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 5 9 -1.</_>\n        <_>\n          4 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 16 4 -1.</_>\n        <_>\n          10 14 8 2 2.</_>\n        <_>\n          2 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 19 8 -1.</_>\n        <_>\n          0 4 19 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 5 -1.</_>\n        <_>\n          10 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 15 -1.</_>\n        <_>\n          7 1 6 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 5 -1.</_>\n        <_>\n          10 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 8 -1.</_>\n        <_>\n          6 7 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 14 -1.</_>\n        <_>\n          18 3 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 12 -1.</_>\n        <_>\n          4 6 6 6 2.</_>\n        <_>\n          10 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 8 14 -1.</_>\n        <_>\n          16 6 4 7 2.</_>\n        <_>\n          12 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 8 14 -1.</_>\n        <_>\n          0 6 4 7 2.</_>\n        <_>\n          4 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 16 -1.</_>\n        <_>\n          2 4 3 8 2.</_>\n        <_>\n          5 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 5 9 -1.</_>\n        <_>\n          14 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 3 -1.</_>\n        <_>\n          3 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 16 -1.</_>\n        <_>\n          5 1 3 8 2.</_>\n        <_>\n          8 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 10 -1.</_>\n        <_>\n          9 7 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 11 -1.</_>\n        <_>\n          7 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 6 -1.</_>\n        <_>\n          10 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 14 -1.</_>\n        <_>\n          1 3 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 6 -1.</_>\n        <_>\n          10 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 7 -1.</_>\n        <_>\n          7 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 13 -1.</_>\n        <_>\n          18 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 8 -1.</_>\n        <_>\n          2 9 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 10 -1.</_>\n        <_>\n          6 7 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 7 6 -1.</_>\n        <_>\n          0 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 13 -1.</_>\n        <_>\n          18 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 13 -1.</_>\n        <_>\n          1 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 8 12 -1.</_>\n        <_>\n          12 3 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 8 12 -1.</_>\n        <_>\n          4 3 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 4 -1.</_>\n        <_>\n          11 11 9 2 2.</_>\n        <_>\n          2 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 18 4 -1.</_>\n        <_>\n          0 11 9 2 2.</_>\n        <_>\n          9 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 9 12 -1.</_>\n        <_>\n          4 7 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 5 6 -1.</_>\n        <_>\n          0 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 4 -1.</_>\n        <_>\n          6 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 7 6 -1.</_>\n        <_>\n          0 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 13 -1.</_>\n        <_>\n          7 2 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 3 -1.</_>\n        <_>\n          4 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 2 -1.</_>\n        <_>\n          0 8 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 5 -1.</_>\n        <_>\n          14 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 10 6 -1.</_>\n        <_>\n          0 3 5 3 2.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 9 5 -1.</_>\n        <_>\n          9 4 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 8 8 -1.</_>\n        <_>\n          3 12 4 4 2.</_>\n        <_>\n          7 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 3 -1.</_>\n        <_>\n          9 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 9 -1.</_>\n        <_>\n          3 4 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 4 -1.</_>\n        <_>\n          4 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 12 -1.</_>\n        <_>\n          7 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 15 -1.</_>\n        <_>\n          6 6 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 15 3 -1.</_>\n        <_>\n          6 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 5 -1.</_>\n        <_>\n          8 9 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 8 -1.</_>\n        <_>\n          6 10 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 6 -1.</_>\n        <_>\n          12 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 2 -1.</_>\n        <_>\n          2 1 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 16 2 -1.</_>\n        <_>\n          1 4 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 6 -1.</_>\n        <_>\n          0 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 13 3 -1.</_>\n        <_>\n          5 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 17 3 -1.</_>\n        <_>\n          2 9 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 6 -1.</_>\n        <_>\n          1 1 9 3 2.</_>\n        <_>\n          10 4 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 19 6 -1.</_>\n        <_>\n          1 3 19 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 6 -1.</_>\n        <_>\n          4 6 6 3 2.</_>\n        <_>\n          10 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 13 2 -1.</_>\n        <_>\n          3 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          10 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 8 6 -1.</_>\n        <_>\n          10 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 4 -1.</_>\n        <_>\n          0 0 9 2 2.</_>\n        <_>\n          9 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 15 5 -1.</_>\n        <_>\n          9 6 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 15 4 -1.</_>\n        <_>\n          5 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 10 -1.</_>\n        <_>\n          12 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 12 -1.</_>\n        <_>\n          0 6 9 6 2.</_>\n        <_>\n          9 12 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 2 14 -1.</_>\n        <_>\n          16 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 5 6 -1.</_>\n        <_>\n          2 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 19 -1.</_>\n        <_>\n          13 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 9 6 -1.</_>\n        <_>\n          0 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 7 6 -1.</_>\n        <_>\n          11 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 7 -1.</_>\n        <_>\n          7 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 19 -1.</_>\n        <_>\n          13 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 14 4 -1.</_>\n        <_>\n          0 15 7 2 2.</_>\n        <_>\n          7 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 14 6 -1.</_>\n        <_>\n          4 7 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 7 -1.</_>\n        <_>\n          5 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          0 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 7 6 -1.</_>\n        <_>\n          11 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 7 6 -1.</_>\n        <_>\n          2 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 5 -1.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 5 -1.</_>\n        <_>\n          9 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 6 -1.</_>\n        <_>\n          12 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 10 10 -1.</_>\n        <_>\n          5 8 5 5 2.</_>\n        <_>\n          10 13 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 10 -1.</_>\n        <_>\n          10 5 9 5 2.</_>\n        <_>\n          1 10 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 9 -1.</_>\n        <_>\n          6 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 6 -1.</_>\n        <_>\n          7 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 5 14 -1.</_>\n        <_>\n          4 10 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 10 -1.</_>\n        <_>\n          0 5 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 6 -1.</_>\n        <_>\n          7 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 19 3 -1.</_>\n        <_>\n          0 1 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 6 -1.</_>\n        <_>\n          8 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 11 -1.</_>\n        <_>\n          9 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 10 -1.</_>\n        <_>\n          8 3 4 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 18 4 -1.</_>\n        <_>\n          0 6 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 15 -1.</_>\n        <_>\n          12 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 7 6 -1.</_>\n        <_>\n          0 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 6 -1.</_>\n        <_>\n          12 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 13 3 -1.</_>\n        <_>\n          2 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 14 -1.</_>\n        <_>\n          12 4 2 7 2.</_>\n        <_>\n          10 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 7 6 -1.</_>\n        <_>\n          2 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 14 -1.</_>\n        <_>\n          12 4 2 7 2.</_>\n        <_>\n          10 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 14 -1.</_>\n        <_>\n          6 4 2 7 2.</_>\n        <_>\n          8 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 7 -1.</_>\n        <_>\n          16 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 4 -1.</_>\n        <_>\n          6 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 15 -1.</_>\n        <_>\n          12 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 15 -1.</_>\n        <_>\n          7 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 17 -1.</_>\n        <_>\n          13 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 17 -1.</_>\n        <_>\n          6 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 13 -1.</_>\n        <_>\n          10 4 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 14 -1.</_>\n        <_>\n          10 3 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          10 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 4 -1.</_>\n        <_>\n          10 5 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 7 6 -1.</_>\n        <_>\n          13 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 19 2 -1.</_>\n        <_>\n          0 3 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 10 11 -1.</_>\n        <_>\n          10 9 5 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 3 -1.</_>\n        <_>\n          1 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 9 -1.</_>\n        <_>\n          8 0 5 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 2 -1.</_>\n        <_>\n          3 5 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 7 -1.</_>\n        <_>\n          2 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 10 11 -1.</_>\n        <_>\n          10 9 5 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 6 7 -1.</_>\n        <_>\n          5 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 15 3 -1.</_>\n        <_>\n          8 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 8 -1.</_>\n        <_>\n          0 1 4 4 2.</_>\n        <_>\n          4 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 4 -1.</_>\n        <_>\n          9 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 6 -1.</_>\n        <_>\n          6 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 9 -1.</_>\n        <_>\n          4 6 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 10 -1.</_>\n        <_>\n          8 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 17 2 -1.</_>\n        <_>\n          0 4 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 5 6 -1.</_>\n        <_>\n          12 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 8 -1.</_>\n        <_>\n          5 6 4 4 2.</_>\n        <_>\n          9 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 7 6 -1.</_>\n        <_>\n          9 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 6 -1.</_>\n        <_>\n          2 14 5 3 2.</_>\n        <_>\n          7 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 5 9 -1.</_>\n        <_>\n          13 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 5 9 -1.</_>\n        <_>\n          2 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 5 -1.</_>\n        <_>\n          14 2 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 11 -1.</_>\n        <_>\n          8 6 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 5 -1.</_>\n        <_>\n          14 2 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 10 6 -1.</_>\n        <_>\n          0 3 5 3 2.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 2 -1.</_>\n        <_>\n          6 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 6 -1.</_>\n        <_>\n          5 14 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 8 -1.</_>\n        <_>\n          12 15 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 7 -1.</_>\n        <_>\n          8 0 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 13 2 -1.</_>\n        <_>\n          5 16 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 6 -1.</_>\n        <_>\n          0 12 10 3 2.</_>\n        <_>\n          10 15 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 6 -1.</_>\n        <_>\n          4 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 10 -1.</_>\n        <_>\n          0 0 3 5 2.</_>\n        <_>\n          3 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 12 -1.</_>\n        <_>\n          10 6 5 6 2.</_>\n        <_>\n          5 12 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 15 4 -1.</_>\n        <_>\n          1 17 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 9 6 -1.</_>\n        <_>\n          10 7 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 7 -1.</_>\n        <_>\n          6 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 10 6 -1.</_>\n        <_>\n          10 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 6 -1.</_>\n        <_>\n          0 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 12 4 -1.</_>\n        <_>\n          12 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 8 -1.</_>\n        <_>\n          2 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 3 -1.</_>\n        <_>\n          0 2 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 17 -1.</_>\n        <_>\n          2 0 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 3 -1.</_>\n        <_>\n          5 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 12 -1.</_>\n        <_>\n          6 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 5 -1.</_>\n        <_>\n          14 2 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 5 -1.</_>\n        <_>\n          3 2 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 18 16 -1.</_>\n        <_>\n          7 3 6 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 11 10 -1.</_>\n        <_>\n          4 9 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 13 3 -1.</_>\n        <_>\n          6 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 8 10 -1.</_>\n        <_>\n          3 4 4 5 2.</_>\n        <_>\n          7 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 4 -1.</_>\n        <_>\n          13 7 7 2 2.</_>\n        <_>\n          6 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 6 -1.</_>\n        <_>\n          1 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 9 -1.</_>\n        <_>\n          15 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 5 9 -1.</_>\n        <_>\n          0 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 4 14 -1.</_>\n        <_>\n          16 6 2 7 2.</_>\n        <_>\n          14 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 12 -1.</_>\n        <_>\n          2 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 5 -1.</_>\n        <_>\n          10 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 5 -1.</_>\n        <_>\n          7 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 8 -1.</_>\n        <_>\n          10 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 18 7 -1.</_>\n        <_>\n          6 13 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 20 -1.</_>\n        <_>\n          10 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 11 -1.</_>\n        <_>\n          5 9 5 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 10 12 -1.</_>\n        <_>\n          5 14 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 7 6 -1.</_>\n        <_>\n          12 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 7 -1.</_>\n        <_>\n          3 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 3 -1.</_>\n        <_>\n          0 8 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 7 -1.</_>\n        <_>\n          10 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 14 -1.</_>\n        <_>\n          0 6 3 7 2.</_>\n        <_>\n          3 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 7 6 -1.</_>\n        <_>\n          12 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 11 12 -1.</_>\n        <_>\n          2 7 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 8 -1.</_>\n        <_>\n          5 4 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 8 8 -1.</_>\n        <_>\n          1 5 4 4 2.</_>\n        <_>\n          5 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 16 -1.</_>\n        <_>\n          18 4 2 8 2.</_>\n        <_>\n          16 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 7 6 -1.</_>\n        <_>\n          0 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 14 4 -1.</_>\n        <_>\n          13 15 7 2 2.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 7 -1.</_>\n        <_>\n          8 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 5 9 -1.</_>\n        <_>\n          10 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 14 -1.</_>\n        <_>\n          11 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 7 -1.</_>\n        <_>\n          8 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 13 -1.</_>\n        <_>\n          11 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 3 13 -1.</_>\n        <_>\n          8 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 10 6 -1.</_>\n        <_>\n          10 14 5 3 2.</_>\n        <_>\n          5 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 4 -1.</_>\n        <_>\n          6 10 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 8 6 -1.</_>\n        <_>\n          11 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 8 6 -1.</_>\n        <_>\n          1 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 3 -1.</_>\n        <_>\n          4 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 13 3 -1.</_>\n        <_>\n          1 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 13 3 -1.</_>\n        <_>\n          7 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 12 6 -1.</_>\n        <_>\n          2 2 6 3 2.</_>\n        <_>\n          8 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 16 -1.</_>\n        <_>\n          18 4 2 8 2.</_>\n        <_>\n          16 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 12 -1.</_>\n        <_>\n          0 12 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 9 6 -1.</_>\n        <_>\n          10 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 10 -1.</_>\n        <_>\n          5 2 3 5 2.</_>\n        <_>\n          8 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 8 -1.</_>\n        <_>\n          8 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 14 -1.</_>\n        <_>\n          11 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 14 -1.</_>\n        <_>\n          7 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 17 -1.</_>\n        <_>\n          8 3 6 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 4 -1.</_>\n        <_>\n          9 6 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 16 -1.</_>\n        <_>\n          18 4 2 8 2.</_>\n        <_>\n          16 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 12 14 -1.</_>\n        <_>\n          6 6 6 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 8 10 -1.</_>\n        <_>\n          12 9 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 8 10 -1.</_>\n        <_>\n          4 9 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 18 -1.</_>\n        <_>\n          13 2 3 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 18 -1.</_>\n        <_>\n          4 2 3 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 13 2 -1.</_>\n        <_>\n          4 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 9 -1.</_>\n        <_>\n          0 9 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 15 3 -1.</_>\n        <_>\n          5 5 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 19 15 -1.</_>\n        <_>\n          0 8 19 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 9 6 -1.</_>\n        <_>\n          10 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 9 6 -1.</_>\n        <_>\n          1 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 13 3 -1.</_>\n        <_>\n          5 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 16 -1.</_>\n        <_>\n          0 4 2 8 2.</_>\n        <_>\n          2 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 5 6 -1.</_>\n        <_>\n          10 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 8 -1.</_>\n        <_>\n          0 14 20 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 7 -1.</_>\n        <_>\n          16 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 7 -1.</_>\n        <_>\n          2 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 19 -1.</_>\n        <_>\n          14 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 4 -1.</_>\n        <_>\n          4 2 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 7 6 -1.</_>\n        <_>\n          12 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 7 6 -1.</_>\n        <_>\n          6 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 5 6 -1.</_>\n        <_>\n          10 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 9 -1.</_>\n        <_>\n          3 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 14 -1.</_>\n        <_>\n          15 5 2 7 2.</_>\n        <_>\n          13 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 10 9 -1.</_>\n        <_>\n          3 8 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 18 4 -1.</_>\n        <_>\n          2 17 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 8 6 -1.</_>\n        <_>\n          0 6 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 13 2 -1.</_>\n        <_>\n          4 6 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 7 6 -1.</_>\n        <_>\n          1 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 6 -1.</_>\n        <_>\n          0 14 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 8 -1.</_>\n        <_>\n          3 10 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 15 3 -1.</_>\n        <_>\n          9 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 9 6 -1.</_>\n        <_>\n          4 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 14 -1.</_>\n        <_>\n          10 0 8 7 2.</_>\n        <_>\n          2 7 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 18 -1.</_>\n        <_>\n          3 9 14 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 10 -1.</_>\n        <_>\n          12 7 3 5 2.</_>\n        <_>\n          9 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 4 16 -1.</_>\n        <_>\n          3 4 2 8 2.</_>\n        <_>\n          5 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 8 6 -1.</_>\n        <_>\n          12 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          0 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 4 -1.</_>\n        <_>\n          5 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 10 -1.</_>\n        <_>\n          7 0 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 15 -1.</_>\n        <_>\n          13 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 15 -1.</_>\n        <_>\n          4 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 5 -1.</_>\n        <_>\n          14 3 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 7 -1.</_>\n        <_>\n          14 2 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 7 -1.</_>\n        <_>\n          3 2 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 8 8 -1.</_>\n        <_>\n          15 6 4 4 2.</_>\n        <_>\n          11 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 7 6 -1.</_>\n        <_>\n          2 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 13 3 -1.</_>\n        <_>\n          5 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 15 3 -1.</_>\n        <_>\n          0 9 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 12 -1.</_>\n        <_>\n          11 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 13 3 -1.</_>\n        <_>\n          2 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 2 -1.</_>\n        <_>\n          2 2 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 10 -1.</_>\n        <_>\n          5 6 4 5 2.</_>\n        <_>\n          9 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 10 12 -1.</_>\n        <_>\n          13 8 5 6 2.</_>\n        <_>\n          8 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 6 -1.</_>\n        <_>\n          3 13 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 8 -1.</_>\n        <_>\n          10 5 9 4 2.</_>\n        <_>\n          1 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 13 3 -1.</_>\n        <_>\n          4 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 10 -1.</_>\n        <_>\n          14 2 3 5 2.</_>\n        <_>\n          11 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 7 -1.</_>\n        <_>\n          7 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 3 -1.</_>\n        <_>\n          7 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 8 14 -1.</_>\n        <_>\n          2 6 4 7 2.</_>\n        <_>\n          6 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 9 -1.</_>\n        <_>\n          8 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          5 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 13 -1.</_>\n        <_>\n          8 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 13 -1.</_>\n        <_>\n          10 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 13 2 -1.</_>\n        <_>\n          0 10 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 13 16 -1.</_>\n        <_>\n          7 11 13 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 5 9 -1.</_>\n        <_>\n          0 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 7 6 -1.</_>\n        <_>\n          11 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 4 -1.</_>\n        <_>\n          1 1 8 2 2.</_>\n        <_>\n          9 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 6 -1.</_>\n        <_>\n          10 2 10 3 2.</_>\n        <_>\n          0 5 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 19 10 -1.</_>\n        <_>\n          0 9 19 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 15 5 -1.</_>\n        <_>\n          9 6 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 14 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_>\n        <_>\n          7 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 8 -1.</_>\n        <_>\n          1 16 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 14 3 -1.</_>\n        <_>\n          3 6 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 3 -1.</_>\n        <_>\n          3 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          16 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 4 -1.</_>\n        <_>\n          3 11 7 2 2.</_>\n        <_>\n          10 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 4 -1.</_>\n        <_>\n          10 11 7 2 2.</_>\n        <_>\n          3 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 14 6 -1.</_>\n        <_>\n          2 7 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 9 4 -1.</_>\n        <_>\n          11 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 13 3 -1.</_>\n        <_>\n          1 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 7 6 -1.</_>\n        <_>\n          12 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 7 6 -1.</_>\n        <_>\n          1 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 20 4 -1.</_>\n        <_>\n          0 18 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 6 -1.</_>\n        <_>\n          0 14 6 3 2.</_>\n        <_>\n          6 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 15 5 -1.</_>\n        <_>\n          9 6 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 15 5 -1.</_>\n        <_>\n          6 6 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 6 9 -1.</_>\n        <_>\n          11 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 8 -1.</_>\n        <_>\n          7 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 13 3 -1.</_>\n        <_>\n          5 18 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 14 3 -1.</_>\n        <_>\n          5 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 5 -1.</_>\n        <_>\n          9 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 8 5 -1.</_>\n        <_>\n          12 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 13 -1.</_>\n        <_>\n          5 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 2 -1.</_>\n        <_>\n          4 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 7 -1.</_>\n        <_>\n          2 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          6 13 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 13 3 -1.</_>\n        <_>\n          3 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 3 10 -1.</_>\n        <_>\n          9 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 20 -1.</_>\n        <_>\n          10 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 6 -1.</_>\n        <_>\n          13 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 4 -1.</_>\n        <_>\n          9 2 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 13 -1.</_>\n        <_>\n          7 4 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 12 -1.</_>\n        <_>\n          13 4 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 3 -1.</_>\n        <_>\n          6 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 12 -1.</_>\n        <_>\n          13 4 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 4 12 -1.</_>\n        <_>\n          5 4 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 20 -1.</_>\n        <_>\n          10 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 20 -1.</_>\n        <_>\n          5 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 13 3 -1.</_>\n        <_>\n          5 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 3 -1.</_>\n        <_>\n          0 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 13 3 -1.</_>\n        <_>\n          7 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 4 -1.</_>\n        <_>\n          0 2 9 2 2.</_>\n        <_>\n          9 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 8 5 -1.</_>\n        <_>\n          12 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 8 -1.</_>\n        <_>\n          5 4 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 6 -1.</_>\n        <_>\n          9 2 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 3 -1.</_>\n        <_>\n          3 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 8 5 -1.</_>\n        <_>\n          12 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 8 5 -1.</_>\n        <_>\n          4 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 7 4 -1.</_>\n        <_>\n          11 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 9 5 -1.</_>\n        <_>\n          7 2 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 6 -1.</_>\n        <_>\n          5 5 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 14 -1.</_>\n        <_>\n          8 11 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 9 6 -1.</_>\n        <_>\n          1 7 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 7 -1.</_>\n        <_>\n          10 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 12 -1.</_>\n        <_>\n          10 4 10 6 2.</_>\n        <_>\n          0 10 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 7 4 -1.</_>\n        <_>\n          5 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 12 -1.</_>\n        <_>\n          8 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 2 -1.</_>\n        <_>\n          3 1 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 13 -1.</_>\n        <_>\n          9 7 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 16 12 -1.</_>\n        <_>\n          11 4 8 6 2.</_>\n        <_>\n          3 10 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 16 12 -1.</_>\n        <_>\n          1 4 8 6 2.</_>\n        <_>\n          9 10 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 10 -1.</_>\n        <_>\n          7 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 5 9 -1.</_>\n        <_>\n          3 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 14 4 -1.</_>\n        <_>\n          13 3 7 2 2.</_>\n        <_>\n          6 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 13 2 -1.</_>\n        <_>\n          3 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 16 4 -1.</_>\n        <_>\n          12 10 8 2 2.</_>\n        <_>\n          4 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 14 4 -1.</_>\n        <_>\n          2 10 7 2 2.</_>\n        <_>\n          9 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 7 6 -1.</_>\n        <_>\n          12 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 11 -1.</_>\n        <_>\n          2 0 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          14 0 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 7 6 -1.</_>\n        <_>\n          1 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 2 -1.</_>\n        <_>\n          6 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 9 -1.</_>\n        <_>\n          3 0 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 3 -1.</_>\n        <_>\n          0 10 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 10 -1.</_>\n        <_>\n          5 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 8 -1.</_>\n        <_>\n          10 5 9 4 2.</_>\n        <_>\n          1 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 10 6 -1.</_>\n        <_>\n          4 4 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          10 0 4 6 2.</_>\n        <_>\n          6 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 7 -1.</_>\n        <_>\n          7 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          8 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 10 -1.</_>\n        <_>\n          12 4 3 5 2.</_>\n        <_>\n          9 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 19 3 -1.</_>\n        <_>\n          0 9 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 3 -1.</_>\n        <_>\n          1 11 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 13 -1.</_>\n        <_>\n          6 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 9 -1.</_>\n        <_>\n          12 11 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 20 -1.</_>\n        <_>\n          6 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 9 -1.</_>\n        <_>\n          15 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 14 -1.</_>\n        <_>\n          2 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 4 -1.</_>\n        <_>\n          10 1 10 2 2.</_>\n        <_>\n          0 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 12 -1.</_>\n        <_>\n          2 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 6 -1.</_>\n        <_>\n          11 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 8 -1.</_>\n        <_>\n          6 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 13 3 -1.</_>\n        <_>\n          7 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 13 3 -1.</_>\n        <_>\n          0 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 6 -1.</_>\n        <_>\n          5 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 14 -1.</_>\n        <_>\n          4 5 2 7 2.</_>\n        <_>\n          6 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 6 -1.</_>\n        <_>\n          11 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 6 -1.</_>\n        <_>\n          6 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 7 -1.</_>\n        <_>\n          7 0 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 13 3 -1.</_>\n        <_>\n          2 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 7 6 -1.</_>\n        <_>\n          13 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 14 9 -1.</_>\n        <_>\n          2 9 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 7 6 -1.</_>\n        <_>\n          13 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 13 3 -1.</_>\n        <_>\n          2 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 7 6 -1.</_>\n        <_>\n          13 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 6 -1.</_>\n        <_>\n          0 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 4 -1.</_>\n        <_>\n          10 14 9 2 2.</_>\n        <_>\n          1 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 15 6 -1.</_>\n        <_>\n          7 8 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 8 -1.</_>\n        <_>\n          16 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 8 -1.</_>\n        <_>\n          0 1 4 4 2.</_>\n        <_>\n          4 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 8 4 -1.</_>\n        <_>\n          7 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 4 -1.</_>\n        <_>\n          0 3 7 2 2.</_>\n        <_>\n          7 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 14 4 -1.</_>\n        <_>\n          10 12 7 2 2.</_>\n        <_>\n          3 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 8 5 -1.</_>\n        <_>\n          8 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 4 -1.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 7 -1.</_>\n        <_>\n          7 2 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 4 -1.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 4 -1.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 7 12 -1.</_>\n        <_>\n          7 7 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 10 -1.</_>\n        <_>\n          4 5 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 4 -1.</_>\n        <_>\n          13 6 7 2 2.</_>\n        <_>\n          6 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 6 -1.</_>\n        <_>\n          0 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 2 14 -1.</_>\n        <_>\n          12 2 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 14 4 -1.</_>\n        <_>\n          0 15 7 2 2.</_>\n        <_>\n          7 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 6 -1.</_>\n        <_>\n          13 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 14 -1.</_>\n        <_>\n          7 2 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 4 -1.</_>\n        <_>\n          13 6 7 2 2.</_>\n        <_>\n          6 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 14 4 -1.</_>\n        <_>\n          0 6 7 2 2.</_>\n        <_>\n          7 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 9 -1.</_>\n        <_>\n          12 11 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 9 -1.</_>\n        <_>\n          4 11 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 12 18 -1.</_>\n        <_>\n          11 1 4 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 18 -1.</_>\n        <_>\n          5 1 4 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 10 -1.</_>\n        <_>\n          8 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 7 6 -1.</_>\n        <_>\n          6 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 13 8 -1.</_>\n        <_>\n          5 9 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 14 2 -1.</_>\n        <_>\n          1 3 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 9 -1.</_>\n        <_>\n          15 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 5 9 -1.</_>\n        <_>\n          0 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 8 -1.</_>\n        <_>\n          7 5 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 12 12 -1.</_>\n        <_>\n          2 5 6 6 2.</_>\n        <_>\n          8 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 4 -1.</_>\n        <_>\n          12 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 10 -1.</_>\n        <_>\n          5 7 5 5 2.</_>\n        <_>\n          10 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 16 3 -1.</_>\n        <_>\n          2 15 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 3 -1.</_>\n        <_>\n          7 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 18 4 -1.</_>\n        <_>\n          0 13 9 2 2.</_>\n        <_>\n          9 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          8 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 4 -1.</_>\n        <_>\n          0 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 2 -1.</_>\n        <_>\n          6 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 2 -1.</_>\n        <_>\n          1 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 14 4 -1.</_>\n        <_>\n          0 7 7 2 2.</_>\n        <_>\n          7 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 7 6 -1.</_>\n        <_>\n          13 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 16 -1.</_>\n        <_>\n          0 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 5 15 -1.</_>\n        <_>\n          13 10 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 10 -1.</_>\n        <_>\n          2 10 3 5 2.</_>\n        <_>\n          5 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 9 6 -1.</_>\n        <_>\n          11 13 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 9 6 -1.</_>\n        <_>\n          0 13 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 18 4 -1.</_>\n        <_>\n          1 3 9 2 2.</_>\n        <_>\n          10 5 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 6 -1.</_>\n        <_>\n          15 10 5 3 2.</_>\n        <_>\n          10 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 5 -1.</_>\n        <_>\n          8 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 7 -1.</_>\n        <_>\n          7 6 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 5 -1.</_>\n        <_>\n          8 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 5 -1.</_>\n        <_>\n          9 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 19 -1.</_>\n        <_>\n          7 1 3 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 20 -1.</_>\n        <_>\n          7 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 13 -1.</_>\n        <_>\n          10 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 16 -1.</_>\n        <_>\n          2 8 18 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 15 -1.</_>\n        <_>\n          1 10 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 6 -1.</_>\n        <_>\n          13 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 6 -1.</_>\n        <_>\n          1 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 10 6 -1.</_>\n        <_>\n          11 13 5 3 2.</_>\n        <_>\n          6 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 14 3 -1.</_>\n        <_>\n          0 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 8 -1.</_>\n        <_>\n          11 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 7 6 -1.</_>\n        <_>\n          1 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 12 -1.</_>\n        <_>\n          9 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 13 3 -1.</_>\n        <_>\n          1 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 2 -1.</_>\n        <_>\n          4 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 7 -1.</_>\n        <_>\n          8 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 7 -1.</_>\n        <_>\n          16 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 13 -1.</_>\n        <_>\n          2 6 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 18 3 -1.</_>\n        <_>\n          7 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 4 -1.</_>\n        <_>\n          0 1 8 2 2.</_>\n        <_>\n          8 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 4 -1.</_>\n        <_>\n          3 2 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 12 6 -1.</_>\n        <_>\n          3 13 6 3 2.</_>\n        <_>\n          9 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 9 -1.</_>\n        <_>\n          6 11 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 9 -1.</_>\n        <_>\n          0 11 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 10 7 -1.</_>\n        <_>\n          10 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 10 7 -1.</_>\n        <_>\n          5 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 8 6 -1.</_>\n        <_>\n          12 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 17 6 -1.</_>\n        <_>\n          0 15 17 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 10 4 -1.</_>\n        <_>\n          5 16 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 13 3 -1.</_>\n        <_>\n          1 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 9 4 -1.</_>\n        <_>\n          11 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 18 -1.</_>\n        <_>\n          1 2 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 7 -1.</_>\n        <_>\n          14 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 7 -1.</_>\n        <_>\n          3 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 14 -1.</_>\n        <_>\n          8 9 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 8 14 -1.</_>\n        <_>\n          4 9 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 13 3 -1.</_>\n        <_>\n          7 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 3 -1.</_>\n        <_>\n          3 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 3 -1.</_>\n        <_>\n          7 2 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 5 9 -1.</_>\n        <_>\n          12 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 9 12 -1.</_>\n        <_>\n          3 4 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 5 -1.</_>\n        <_>\n          9 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 5 -1.</_>\n        <_>\n          8 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 10 -1.</_>\n        <_>\n          13 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 10 8 -1.</_>\n        <_>\n          3 12 5 4 2.</_>\n        <_>\n          8 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 7 4 -1.</_>\n        <_>\n          12 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 12 6 -1.</_>\n        <_>\n          2 6 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 5 6 -1.</_>\n        <_>\n          13 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 5 6 -1.</_>\n        <_>\n          2 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 7 4 -1.</_>\n        <_>\n          12 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 9 10 -1.</_>\n        <_>\n          5 10 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 7 4 -1.</_>\n        <_>\n          12 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 17 2 -1.</_>\n        <_>\n          0 1 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 8 -1.</_>\n        <_>\n          13 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 8 -1.</_>\n        <_>\n          5 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 12 -1.</_>\n        <_>\n          5 7 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 7 4 -1.</_>\n        <_>\n          1 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 8 6 -1.</_>\n        <_>\n          10 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 6 -1.</_>\n        <_>\n          0 9 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 6 -1.</_>\n        <_>\n          10 11 5 3 2.</_>\n        <_>\n          5 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 3 -1.</_>\n        <_>\n          0 9 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 13 3 -1.</_>\n        <_>\n          7 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 15 5 -1.</_>\n        <_>\n          7 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 6 -1.</_>\n        <_>\n          2 9 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 5 6 -1.</_>\n        <_>\n          0 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 5 -1.</_>\n        <_>\n          8 12 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 16 4 -1.</_>\n        <_>\n          2 16 8 2 2.</_>\n        <_>\n          10 18 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 13 -1.</_>\n        <_>\n          5 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 3 -1.</_>\n        <_>\n          6 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 13 3 -1.</_>\n        <_>\n          2 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 7 -1.</_>\n        <_>\n          2 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 20 -1.</_>\n        <_>\n          9 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 13 -1.</_>\n        <_>\n          10 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 9 -1.</_>\n        <_>\n          5 4 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 8 8 -1.</_>\n        <_>\n          16 5 4 4 2.</_>\n        <_>\n          12 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 8 -1.</_>\n        <_>\n          6 4 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 10 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_>\n        <_>\n          10 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 10 6 -1.</_>\n        <_>\n          0 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 6 -1.</_>\n        <_>\n          13 2 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 7 -1.</_>\n        <_>\n          6 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 14 -1.</_>\n        <_>\n          12 6 5 7 2.</_>\n        <_>\n          7 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 3 -1.</_>\n        <_>\n          1 2 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 3 -1.</_>\n        <_>\n          0 10 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 7 6 -1.</_>\n        <_>\n          2 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 7 4 -1.</_>\n        <_>\n          2 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 13 -1.</_>\n        <_>\n          9 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 9 6 -1.</_>\n        <_>\n          7 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 5 6 -1.</_>\n        <_>\n          11 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 10 14 -1.</_>\n        <_>\n          3 6 5 7 2.</_>\n        <_>\n          8 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 12 -1.</_>\n        <_>\n          12 4 6 6 2.</_>\n        <_>\n          6 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 5 6 -1.</_>\n        <_>\n          4 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 14 5 -1.</_>\n        <_>\n          5 1 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 16 -1.</_>\n        <_>\n          9 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 7 4 -1.</_>\n        <_>\n          13 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 5 6 -1.</_>\n        <_>\n          3 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          17 10 3 5 2.</_>\n        <_>\n          14 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 8 4 -1.</_>\n        <_>\n          5 3 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 10 6 -1.</_>\n        <_>\n          14 14 5 3 2.</_>\n        <_>\n          9 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 13 -1.</_>\n        <_>\n          4 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 10 -1.</_>\n        <_>\n          15 10 5 5 2.</_>\n        <_>\n          10 15 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 8 14 -1.</_>\n        <_>\n          4 6 4 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 12 -1.</_>\n        <_>\n          10 3 6 6 2.</_>\n        <_>\n          4 9 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 13 3 -1.</_>\n        <_>\n          0 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 13 -1.</_>\n        <_>\n          10 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 10 5 -1.</_>\n        <_>\n          9 1 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 6 -1.</_>\n        <_>\n          3 2 6 3 2.</_>\n        <_>\n          9 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 4 -1.</_>\n        <_>\n          11 2 9 2 2.</_>\n        <_>\n          2 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 11 6 -1.</_>\n        <_>\n          3 4 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 12 -1.</_>\n        <_>\n          16 0 4 6 2.</_>\n        <_>\n          12 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 12 -1.</_>\n        <_>\n          0 0 4 6 2.</_>\n        <_>\n          4 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 10 -1.</_>\n        <_>\n          10 1 3 5 2.</_>\n        <_>\n          7 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 13 3 -1.</_>\n        <_>\n          0 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 13 3 -1.</_>\n        <_>\n          4 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 7 6 -1.</_>\n        <_>\n          3 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 13 3 -1.</_>\n        <_>\n          1 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 7 6 -1.</_>\n        <_>\n          8 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 7 -1.</_>\n        <_>\n          6 8 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 4 -1.</_>\n        <_>\n          10 1 10 2 2.</_>\n        <_>\n          0 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 3 -1.</_>\n        <_>\n          0 11 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 2 14 -1.</_>\n        <_>\n          12 1 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 10 -1.</_>\n        <_>\n          7 7 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 14 -1.</_>\n        <_>\n          15 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 5 -1.</_>\n        <_>\n          8 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 14 -1.</_>\n        <_>\n          15 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 3 14 -1.</_>\n        <_>\n          4 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 20 2 -1.</_>\n        <_>\n          0 17 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 14 -1.</_>\n        <_>\n          8 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 13 -1.</_>\n        <_>\n          10 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 7 6 -1.</_>\n        <_>\n          1 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 9 -1.</_>\n        <_>\n          9 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 9 6 -1.</_>\n        <_>\n          5 13 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 10 6 -1.</_>\n        <_>\n          14 14 5 3 2.</_>\n        <_>\n          9 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 10 6 -1.</_>\n        <_>\n          1 14 5 3 2.</_>\n        <_>\n          6 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 7 6 -1.</_>\n        <_>\n          11 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 8 12 -1.</_>\n        <_>\n          1 8 4 6 2.</_>\n        <_>\n          5 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 5 -1.</_>\n        <_>\n          10 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 15 5 -1.</_>\n        <_>\n          5 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 8 6 -1.</_>\n        <_>\n          12 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 10 -1.</_>\n        <_>\n          8 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 19 3 -1.</_>\n        <_>\n          1 7 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 9 -1.</_>\n        <_>\n          7 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 8 8 -1.</_>\n        <_>\n          15 2 4 4 2.</_>\n        <_>\n          11 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 14 -1.</_>\n        <_>\n          9 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 13 -1.</_>\n        <_>\n          10 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 13 -1.</_>\n        <_>\n          9 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 18 -1.</_>\n        <_>\n          3 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 10 -1.</_>\n        <_>\n          10 5 9 5 2.</_>\n        <_>\n          1 10 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 2 13 -1.</_>\n        <_>\n          7 1 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 6 -1.</_>\n        <_>\n          11 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 7 6 -1.</_>\n        <_>\n          4 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 10 3 -1.</_>\n        <_>\n          5 2 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 19 4 -1.</_>\n        <_>\n          1 6 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 5 -1.</_>\n        <_>\n          8 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 5 6 -1.</_>\n        <_>\n          11 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 12 -1.</_>\n        <_>\n          7 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 10 19 -1.</_>\n        <_>\n          10 1 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 19 -1.</_>\n        <_>\n          5 1 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 7 6 -1.</_>\n        <_>\n          2 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 10 12 -1.</_>\n        <_>\n          10 11 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 8 -1.</_>\n        <_>\n          5 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 8 12 -1.</_>\n        <_>\n          11 5 4 6 2.</_>\n        <_>\n          7 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 12 -1.</_>\n        <_>\n          5 5 4 6 2.</_>\n        <_>\n          9 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 8 -1.</_>\n        <_>\n          16 1 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          2 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 4 -1.</_>\n        <_>\n          7 6 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 13 2 -1.</_>\n        <_>\n          3 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 2 -1.</_>\n        <_>\n          3 4 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 13 6 -1.</_>\n        <_>\n          2 2 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 6 -1.</_>\n        <_>\n          12 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 13 2 -1.</_>\n        <_>\n          3 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 14 -1.</_>\n        <_>\n          14 0 2 7 2.</_>\n        <_>\n          12 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 13 3 -1.</_>\n        <_>\n          1 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 12 -1.</_>\n        <_>\n          4 0 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          14 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 5 -1.</_>\n        <_>\n          3 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 15 3 -1.</_>\n        <_>\n          5 2 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 6 -1.</_>\n        <_>\n          12 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 7 6 -1.</_>\n        <_>\n          1 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 13 3 -1.</_>\n        <_>\n          2 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 10 -1.</_>\n        <_>\n          10 5 10 5 2.</_>\n        <_>\n          0 10 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 7 -1.</_>\n        <_>\n          6 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 14 6 -1.</_>\n        <_>\n          11 6 7 3 2.</_>\n        <_>\n          4 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 8 -1.</_>\n        <_>\n          5 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          14 10 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 13 2 -1.</_>\n        <_>\n          2 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 4 -1.</_>\n        <_>\n          2 14 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 10 6 -1.</_>\n        <_>\n          1 6 5 3 2.</_>\n        <_>\n          6 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          14 10 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          3 10 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 17 -1.</_>\n        <_>\n          2 0 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 16 -1.</_>\n        <_>\n          2 4 3 8 2.</_>\n        <_>\n          5 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 8 -1.</_>\n        <_>\n          10 6 5 4 2.</_>\n        <_>\n          5 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 8 8 -1.</_>\n        <_>\n          4 6 4 4 2.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 5 -1.</_>\n        <_>\n          8 2 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 18 -1.</_>\n        <_>\n          11 2 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 7 -1.</_>\n        <_>\n          10 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          10 9 4 4 2.</_>\n        <_>\n          6 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 5 -1.</_>\n        <_>\n          10 5 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 4 -1.</_>\n        <_>\n          4 6 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 16 4 -1.</_>\n        <_>\n          11 15 8 2 2.</_>\n        <_>\n          3 17 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 16 4 -1.</_>\n        <_>\n          1 15 8 2 2.</_>\n        <_>\n          9 17 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 3 -1.</_>\n        <_>\n          4 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 9 -1.</_>\n        <_>\n          6 14 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 3 -1.</_>\n        <_>\n          3 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 13 3 -1.</_>\n        <_>\n          4 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 5 9 -1.</_>\n        <_>\n          0 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 8 4 -1.</_>\n        <_>\n          12 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 8 4 -1.</_>\n        <_>\n          0 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 6 -1.</_>\n        <_>\n          5 3 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 6 -1.</_>\n        <_>\n          0 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 9 -1.</_>\n        <_>\n          3 9 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 10 -1.</_>\n        <_>\n          9 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 9 -1.</_>\n        <_>\n          5 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 17 -1.</_>\n        <_>\n          2 0 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 16 -1.</_>\n        <_>\n          12 0 4 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 16 -1.</_>\n        <_>\n          4 0 4 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 6 -1.</_>\n        <_>\n          5 9 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 14 -1.</_>\n        <_>\n          8 4 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 14 -1.</_>\n        <_>\n          18 5 2 7 2.</_>\n        <_>\n          16 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 8 -1.</_>\n        <_>\n          6 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 14 3 -1.</_>\n        <_>\n          5 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 13 3 -1.</_>\n        <_>\n          3 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 9 6 -1.</_>\n        <_>\n          0 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 10 6 -1.</_>\n        <_>\n          8 12 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          10 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          5 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 19 -1.</_>\n        <_>\n          14 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 19 -1.</_>\n        <_>\n          5 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 9 -1.</_>\n        <_>\n          7 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 15 -1.</_>\n        <_>\n          6 9 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 7 -1.</_>\n        <_>\n          16 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 12 -1.</_>\n        <_>\n          2 4 7 6 2.</_>\n        <_>\n          9 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 12 5 -1.</_>\n        <_>\n          4 15 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 3 -1.</_>\n        <_>\n          9 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 14 -1.</_>\n        <_>\n          18 6 2 7 2.</_>\n        <_>\n          16 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 14 -1.</_>\n        <_>\n          0 6 2 7 2.</_>\n        <_>\n          2 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 8 6 -1.</_>\n        <_>\n          11 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          8 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 5 12 -1.</_>\n        <_>\n          7 7 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 8 -1.</_>\n        <_>\n          5 4 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 15 12 -1.</_>\n        <_>\n          0 5 15 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 10 -1.</_>\n        <_>\n          7 8 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 16 -1.</_>\n        <_>\n          6 4 2 8 2.</_>\n        <_>\n          8 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 4 -1.</_>\n        <_>\n          7 4 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 12 6 -1.</_>\n        <_>\n          0 3 6 3 2.</_>\n        <_>\n          6 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 8 10 -1.</_>\n        <_>\n          16 1 4 5 2.</_>\n        <_>\n          12 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 10 -1.</_>\n        <_>\n          0 1 4 5 2.</_>\n        <_>\n          4 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 8 8 -1.</_>\n        <_>\n          10 12 4 4 2.</_>\n        <_>\n          6 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 8 12 -1.</_>\n        <_>\n          5 8 4 6 2.</_>\n        <_>\n          9 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 6 -1.</_>\n        <_>\n          3 11 7 3 2.</_>\n        <_>\n          10 14 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 12 -1.</_>\n        <_>\n          11 4 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 5 14 -1.</_>\n        <_>\n          7 11 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 12 -1.</_>\n        <_>\n          7 4 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 12 7 -1.</_>\n        <_>\n          4 11 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 13 3 -1.</_>\n        <_>\n          1 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 6 -1.</_>\n        <_>\n          11 6 6 3 2.</_>\n        <_>\n          5 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 4 -1.</_>\n        <_>\n          3 11 7 2 2.</_>\n        <_>\n          10 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 10 -1.</_>\n        <_>\n          4 0 6 5 2.</_>\n        <_>\n          10 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 15 -1.</_>\n        <_>\n          8 5 6 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 14 3 -1.</_>\n        <_>\n          1 13 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 16 3 -1.</_>\n        <_>\n          10 17 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 9 -1.</_>\n        <_>\n          9 8 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 12 -1.</_>\n        <_>\n          10 3 6 6 2.</_>\n        <_>\n          4 9 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 20 -1.</_>\n        <_>\n          3 0 3 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 7 6 -1.</_>\n        <_>\n          11 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 2 -1.</_>\n        <_>\n          3 14 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 4 -1.</_>\n        <_>\n          13 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 13 -1.</_>\n        <_>\n          1 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 12 -1.</_>\n        <_>\n          15 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 12 -1.</_>\n        <_>\n          3 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 14 12 -1.</_>\n        <_>\n          4 12 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 12 -1.</_>\n        <_>\n          3 6 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 13 -1.</_>\n        <_>\n          14 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 13 -1.</_>\n        <_>\n          5 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 3 14 -1.</_>\n        <_>\n          17 2 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 3 14 -1.</_>\n        <_>\n          2 2 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 14 3 -1.</_>\n        <_>\n          6 10 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 14 3 -1.</_>\n        <_>\n          0 10 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 14 6 -1.</_>\n        <_>\n          11 6 7 3 2.</_>\n        <_>\n          4 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 14 6 -1.</_>\n        <_>\n          2 6 7 3 2.</_>\n        <_>\n          9 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 5 -1.</_>\n        <_>\n          10 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 10 16 -1.</_>\n        <_>\n          3 1 5 8 2.</_>\n        <_>\n          8 9 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 12 -1.</_>\n        <_>\n          10 7 7 6 2.</_>\n        <_>\n          3 13 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 13 6 -1.</_>\n        <_>\n          2 5 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 6 -1.</_>\n        <_>\n          14 4 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 6 -1.</_>\n        <_>\n          0 4 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 14 -1.</_>\n        <_>\n          4 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 4 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 3 -1.</_>\n        <_>\n          7 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 13 2 -1.</_>\n        <_>\n          4 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 6 -1.</_>\n        <_>\n          2 1 8 3 2.</_>\n        <_>\n          10 4 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 7 9 -1.</_>\n        <_>\n          9 8 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 8 8 -1.</_>\n        <_>\n          2 9 4 4 2.</_>\n        <_>\n          6 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          8 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 6 -1.</_>\n        <_>\n          1 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 7 6 -1.</_>\n        <_>\n          13 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 7 6 -1.</_>\n        <_>\n          0 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 14 2 -1.</_>\n        <_>\n          1 16 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 7 6 -1.</_>\n        <_>\n          13 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 7 6 -1.</_>\n        <_>\n          7 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 10 -1.</_>\n        <_>\n          5 5 3 5 2.</_>\n        <_>\n          8 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 4 -1.</_>\n        <_>\n          5 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 20 -1.</_>\n        <_>\n          7 0 6 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 7 4 -1.</_>\n        <_>\n          7 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 9 7 -1.</_>\n        <_>\n          3 5 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 8 -1.</_>\n        <_>\n          11 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 10 -1.</_>\n        <_>\n          0 8 20 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 12 -1.</_>\n        <_>\n          9 0 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 14 4 -1.</_>\n        <_>\n          3 18 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 8 -1.</_>\n        <_>\n          11 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 8 -1.</_>\n        <_>\n          5 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 13 3 -1.</_>\n        <_>\n          6 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 19 6 -1.</_>\n        <_>\n          0 2 19 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 16 2 -1.</_>\n        <_>\n          2 4 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 3 12 -1.</_>\n        <_>\n          7 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 10 -1.</_>\n        <_>\n          12 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 13 2 -1.</_>\n        <_>\n          0 3 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 4 -1.</_>\n        <_>\n          7 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 4 -1.</_>\n        <_>\n          9 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 4 -1.</_>\n        <_>\n          10 11 7 2 2.</_>\n        <_>\n          3 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 14 4 -1.</_>\n        <_>\n          3 10 7 2 2.</_>\n        <_>\n          10 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 3 -1.</_>\n        <_>\n          6 7 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 3 -1.</_>\n        <_>\n          0 10 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 13 -1.</_>\n        <_>\n          10 3 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 13 -1.</_>\n        <_>\n          10 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 7 4 -1.</_>\n        <_>\n          12 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 7 4 -1.</_>\n        <_>\n          1 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          10 10 3 5 2.</_>\n        <_>\n          7 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 13 3 -1.</_>\n        <_>\n          1 18 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 9 -1.</_>\n        <_>\n          4 0 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 3 -1.</_>\n        <_>\n          0 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 4 -1.</_>\n        <_>\n          0 3 10 2 2.</_>\n        <_>\n          10 5 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 8 6 -1.</_>\n        <_>\n          12 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 2 16 -1.</_>\n        <_>\n          7 1 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 19 -1.</_>\n        <_>\n          10 0 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 18 -1.</_>\n        <_>\n          9 0 7 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 9 -1.</_>\n        <_>\n          9 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 19 -1.</_>\n        <_>\n          5 0 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 14 -1.</_>\n        <_>\n          15 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 14 -1.</_>\n        <_>\n          4 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 13 3 -1.</_>\n        <_>\n          3 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 13 3 -1.</_>\n        <_>\n          0 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 5 9 -1.</_>\n        <_>\n          12 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 7 6 -1.</_>\n        <_>\n          0 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 8 -1.</_>\n        <_>\n          12 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 6 -1.</_>\n        <_>\n          0 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 8 -1.</_>\n        <_>\n          2 5 8 4 2.</_>\n        <_>\n          10 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 8 -1.</_>\n        <_>\n          16 3 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 10 -1.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 8 -1.</_>\n        <_>\n          9 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 7 -1.</_>\n        <_>\n          2 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 6 -1.</_>\n        <_>\n          5 4 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 8 -1.</_>\n        <_>\n          14 4 4 4 2.</_>\n        <_>\n          10 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 13 3 -1.</_>\n        <_>\n          0 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 8 -1.</_>\n        <_>\n          14 4 4 4 2.</_>\n        <_>\n          10 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 8 8 -1.</_>\n        <_>\n          2 4 4 4 2.</_>\n        <_>\n          6 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 20 -1.</_>\n        <_>\n          13 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 7 6 -1.</_>\n        <_>\n          3 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 4 -1.</_>\n        <_>\n          8 2 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 10 -1.</_>\n        <_>\n          6 0 3 5 2.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 3 -1.</_>\n        <_>\n          4 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 16 3 -1.</_>\n        <_>\n          8 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 20 -1.</_>\n        <_>\n          13 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 3 -1.</_>\n        <_>\n          2 2 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 20 -1.</_>\n        <_>\n          13 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 20 -1.</_>\n        <_>\n          6 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 8 -1.</_>\n        <_>\n          10 0 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 8 -1.</_>\n        <_>\n          5 0 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 7 -1.</_>\n        <_>\n          13 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 7 -1.</_>\n        <_>\n          5 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 13 -1.</_>\n        <_>\n          9 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 13 -1.</_>\n        <_>\n          9 4 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 4 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 10 -1.</_>\n        <_>\n          3 1 3 5 2.</_>\n        <_>\n          6 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 12 -1.</_>\n        <_>\n          4 12 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 3 -1.</_>\n        <_>\n          4 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 3 -1.</_>\n        <_>\n          1 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 13 2 -1.</_>\n        <_>\n          6 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 7 16 -1.</_>\n        <_>\n          6 11 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 9 -1.</_>\n        <_>\n          10 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 9 -1.</_>\n        <_>\n          8 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 3 13 -1.</_>\n        <_>\n          11 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 13 -1.</_>\n        <_>\n          8 4 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 7 -1.</_>\n        <_>\n          9 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 6 -1.</_>\n        <_>\n          0 14 6 3 2.</_>\n        <_>\n          6 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 5 6 -1.</_>\n        <_>\n          14 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 5 6 -1.</_>\n        <_>\n          1 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 13 2 -1.</_>\n        <_>\n          4 6 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 6 -1.</_>\n        <_>\n          0 10 10 3 2.</_>\n        <_>\n          10 13 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 14 -1.</_>\n        <_>\n          10 5 2 7 2.</_>\n        <_>\n          8 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 8 -1.</_>\n        <_>\n          6 8 4 4 2.</_>\n        <_>\n          10 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 5 9 -1.</_>\n        <_>\n          13 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 12 -1.</_>\n        <_>\n          5 0 5 6 2.</_>\n        <_>\n          10 6 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 7 -1.</_>\n        <_>\n          12 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 5 9 -1.</_>\n        <_>\n          2 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 2 -1.</_>\n        <_>\n          0 0 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 18 -1.</_>\n        <_>\n          3 0 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 6 -1.</_>\n        <_>\n          15 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 6 -1.</_>\n        <_>\n          2 4 7 3 2.</_>\n        <_>\n          9 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 10 6 -1.</_>\n        <_>\n          13 14 5 3 2.</_>\n        <_>\n          8 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 5 12 -1.</_>\n        <_>\n          3 9 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 17 15 -1.</_>\n        <_>\n          2 9 17 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 12 -1.</_>\n        <_>\n          3 4 13 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          2 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 6 -1.</_>\n        <_>\n          8 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 9 -1.</_>\n        <_>\n          6 0 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 7 -1.</_>\n        <_>\n          12 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 15 4 -1.</_>\n        <_>\n          6 6 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 12 9 -1.</_>\n        <_>\n          5 4 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 4 12 -1.</_>\n        <_>\n          6 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 10 -1.</_>\n        <_>\n          12 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 9 4 -1.</_>\n        <_>\n          3 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 3 -1.</_>\n        <_>\n          7 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 5 9 -1.</_>\n        <_>\n          4 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 5 -1.</_>\n        <_>\n          7 7 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 8 -1.</_>\n        <_>\n          8 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 8 -1.</_>\n        <_>\n          12 1 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 7 -1.</_>\n        <_>\n          6 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 13 2 -1.</_>\n        <_>\n          7 1 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 18 5 -1.</_>\n        <_>\n          6 4 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 11 -1.</_>\n        <_>\n          12 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 11 -1.</_>\n        <_>\n          5 5 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 9 10 -1.</_>\n        <_>\n          12 9 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 9 10 -1.</_>\n        <_>\n          5 9 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 9 -1.</_>\n        <_>\n          9 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 15 -1.</_>\n        <_>\n          7 0 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 10 6 -1.</_>\n        <_>\n          11 12 5 3 2.</_>\n        <_>\n          6 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 15 3 -1.</_>\n        <_>\n          5 17 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 10 -1.</_>\n        <_>\n          14 10 3 5 2.</_>\n        <_>\n          11 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 10 6 -1.</_>\n        <_>\n          4 12 5 3 2.</_>\n        <_>\n          9 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 5 -1.</_>\n        <_>\n          6 0 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 6 -1.</_>\n        <_>\n          2 3 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 9 6 -1.</_>\n        <_>\n          2 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 5 -1.</_>\n        <_>\n          9 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 5 -1.</_>\n        <_>\n          8 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 7 -1.</_>\n        <_>\n          9 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 5 6 -1.</_>\n        <_>\n          4 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 10 -1.</_>\n        <_>\n          15 2 3 5 2.</_>\n        <_>\n          12 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 14 4 -1.</_>\n        <_>\n          2 10 7 2 2.</_>\n        <_>\n          9 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 8 -1.</_>\n        <_>\n          4 10 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 10 -1.</_>\n        <_>\n          2 2 3 5 2.</_>\n        <_>\n          5 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 14 2 -1.</_>\n        <_>\n          6 16 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 5 -1.</_>\n        <_>\n          3 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 5 -1.</_>\n        <_>\n          9 2 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 8 6 -1.</_>\n        <_>\n          1 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 16 -1.</_>\n        <_>\n          17 4 2 8 2.</_>\n        <_>\n          15 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 13 3 -1.</_>\n        <_>\n          4 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 18 2 -1.</_>\n        <_>\n          2 9 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 2 -1.</_>\n        <_>\n          2 1 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 7 -1.</_>\n        <_>\n          11 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 6 -1.</_>\n        <_>\n          8 14 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 7 -1.</_>\n        <_>\n          11 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 7 -1.</_>\n        <_>\n          7 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 14 -1.</_>\n        <_>\n          9 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 15 3 -1.</_>\n        <_>\n          2 18 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 7 -1.</_>\n        <_>\n          16 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 4 7 -1.</_>\n        <_>\n          7 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 7 -1.</_>\n        <_>\n          16 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 7 -1.</_>\n        <_>\n          2 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 13 2 -1.</_>\n        <_>\n          4 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 14 -1.</_>\n        <_>\n          2 2 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 13 -1.</_>\n        <_>\n          15 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 13 -1.</_>\n        <_>\n          3 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 4 -1.</_>\n        <_>\n          10 3 10 2 2.</_>\n        <_>\n          0 5 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 11 -1.</_>\n        <_>\n          6 7 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 7 6 -1.</_>\n        <_>\n          7 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 10 6 -1.</_>\n        <_>\n          0 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 12 -1.</_>\n        <_>\n          10 7 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 11 4 -1.</_>\n        <_>\n          4 9 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 6 -1.</_>\n        <_>\n          10 7 5 3 2.</_>\n        <_>\n          5 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 10 -1.</_>\n        <_>\n          0 5 9 5 2.</_>\n        <_>\n          9 10 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 4 -1.</_>\n        <_>\n          10 0 10 2 2.</_>\n        <_>\n          0 2 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 13 3 -1.</_>\n        <_>\n          2 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 13 2 -1.</_>\n        <_>\n          2 5 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 13 3 -1.</_>\n        <_>\n          7 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 10 -1.</_>\n        <_>\n          1 0 3 5 2.</_>\n        <_>\n          4 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 9 14 -1.</_>\n        <_>\n          13 6 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 9 14 -1.</_>\n        <_>\n          4 6 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 5 10 -1.</_>\n        <_>\n          8 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 8 -1.</_>\n        <_>\n          0 7 20 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 14 2 -1.</_>\n        <_>\n          4 10 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 3 -1.</_>\n        <_>\n          1 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 6 -1.</_>\n        <_>\n          3 15 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 13 9 -1.</_>\n        <_>\n          6 14 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 13 9 -1.</_>\n        <_>\n          1 14 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          8 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 4 -1.</_>\n        <_>\n          7 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 4 -1.</_>\n        <_>\n          6 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 10 -1.</_>\n        <_>\n          9 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 13 2 -1.</_>\n        <_>\n          0 3 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 8 -1.</_>\n        <_>\n          11 1 4 4 2.</_>\n        <_>\n          7 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 12 -1.</_>\n        <_>\n          5 7 3 6 2.</_>\n        <_>\n          8 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 20 3 -1.</_>\n        <_>\n          0 15 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 9 5 -1.</_>\n        <_>\n          6 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 7 -1.</_>\n        <_>\n          7 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 19 -1.</_>\n        <_>\n          10 1 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 4 -1.</_>\n        <_>\n          0 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 5 6 -1.</_>\n        <_>\n          0 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 10 18 -1.</_>\n        <_>\n          14 2 5 9 2.</_>\n        <_>\n          9 11 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 8 4 -1.</_>\n        <_>\n          6 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 8 -1.</_>\n        <_>\n          9 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 19 -1.</_>\n        <_>\n          8 0 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 5 -1.</_>\n        <_>\n          3 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 18 -1.</_>\n        <_>\n          18 2 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 18 -1.</_>\n        <_>\n          18 2 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 18 -1.</_>\n        <_>\n          1 2 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 7 15 -1.</_>\n        <_>\n          7 9 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 6 -1.</_>\n        <_>\n          7 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 10 6 -1.</_>\n        <_>\n          13 14 5 3 2.</_>\n        <_>\n          8 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 6 -1.</_>\n        <_>\n          2 14 5 3 2.</_>\n        <_>\n          7 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 6 -1.</_>\n        <_>\n          0 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 16 -1.</_>\n        <_>\n          18 0 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 14 -1.</_>\n        <_>\n          1 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 5 -1.</_>\n        <_>\n          14 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 5 -1.</_>\n        <_>\n          3 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 18 4 -1.</_>\n        <_>\n          10 13 9 2 2.</_>\n        <_>\n          1 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 5 9 -1.</_>\n        <_>\n          7 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 5 -1.</_>\n        <_>\n          9 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 13 -1.</_>\n        <_>\n          8 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 10 -1.</_>\n        <_>\n          5 0 3 5 2.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 8 -1.</_>\n        <_>\n          3 4 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 5 10 -1.</_>\n        <_>\n          8 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 15 2 -1.</_>\n        <_>\n          2 19 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 7 -1.</_>\n        <_>\n          10 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 13 3 -1.</_>\n        <_>\n          0 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 4 -1.</_>\n        <_>\n          0 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          10 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 14 4 -1.</_>\n        <_>\n          3 16 7 2 2.</_>\n        <_>\n          10 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          6 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 12 -1.</_>\n        <_>\n          9 6 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 4 -1.</_>\n        <_>\n          6 8 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 10 -1.</_>\n        <_>\n          16 1 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 10 -1.</_>\n        <_>\n          6 9 4 5 2.</_>\n        <_>\n          10 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 10 -1.</_>\n        <_>\n          16 1 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 6 -1.</_>\n        <_>\n          0 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 13 3 -1.</_>\n        <_>\n          5 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 5 6 -1.</_>\n        <_>\n          1 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 6 -1.</_>\n        <_>\n          4 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 7 -1.</_>\n        <_>\n          9 7 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 11 -1.</_>\n        <_>\n          7 6 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 7 -1.</_>\n        <_>\n          10 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 7 -1.</_>\n        <_>\n          8 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 15 -1.</_>\n        <_>\n          11 2 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 10 -1.</_>\n        <_>\n          2 1 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 6 -1.</_>\n        <_>\n          15 0 5 3 2.</_>\n        <_>\n          10 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 3 -1.</_>\n        <_>\n          1 1 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 13 3 -1.</_>\n        <_>\n          7 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 0 5 3 2.</_>\n        <_>\n          5 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 12 -1.</_>\n        <_>\n          9 6 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 12 -1.</_>\n        <_>\n          9 6 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 18 -1.</_>\n        <_>\n          12 0 3 9 2.</_>\n        <_>\n          9 9 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 14 2 -1.</_>\n        <_>\n          10 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 7 6 -1.</_>\n        <_>\n          13 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 12 -1.</_>\n        <_>\n          6 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 6 -1.</_>\n        <_>\n          3 1 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 3 -1.</_>\n        <_>\n          0 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 7 4 -1.</_>\n        <_>\n          9 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 15 3 -1.</_>\n        <_>\n          0 10 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 8 -1.</_>\n        <_>\n          11 0 4 4 2.</_>\n        <_>\n          7 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 4 -1.</_>\n        <_>\n          0 3 10 2 2.</_>\n        <_>\n          10 5 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 10 3 -1.</_>\n        <_>\n          10 2 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 7 4 -1.</_>\n        <_>\n          4 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 10 3 -1.</_>\n        <_>\n          10 2 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 12 6 -1.</_>\n        <_>\n          2 11 6 3 2.</_>\n        <_>\n          8 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 10 -1.</_>\n        <_>\n          0 5 20 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 8 6 -1.</_>\n        <_>\n          12 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 13 3 -1.</_>\n        <_>\n          0 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 8 6 -1.</_>\n        <_>\n          12 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 6 -1.</_>\n        <_>\n          0 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 12 -1.</_>\n        <_>\n          16 0 4 6 2.</_>\n        <_>\n          12 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 14 -1.</_>\n        <_>\n          7 8 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 13 3 -1.</_>\n        <_>\n          5 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 9 -1.</_>\n        <_>\n          7 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 13 3 -1.</_>\n        <_>\n          5 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 8 8 -1.</_>\n        <_>\n          2 4 4 4 2.</_>\n        <_>\n          6 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 8 16 -1.</_>\n        <_>\n          15 4 4 8 2.</_>\n        <_>\n          11 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 8 16 -1.</_>\n        <_>\n          1 4 4 8 2.</_>\n        <_>\n          5 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 8 -1.</_>\n        <_>\n          11 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          6 10 4 4 2.</_>\n        <_>\n          10 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 8 -1.</_>\n        <_>\n          4 4 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 6 -1.</_>\n        <_>\n          5 4 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 15 2 -1.</_>\n        <_>\n          5 3 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 16 4 -1.</_>\n        <_>\n          1 11 8 2 2.</_>\n        <_>\n          9 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 10 3 -1.</_>\n        <_>\n          10 2 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 10 6 -1.</_>\n        <_>\n          1 0 5 3 2.</_>\n        <_>\n          6 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 10 3 -1.</_>\n        <_>\n          10 2 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 7 6 -1.</_>\n        <_>\n          0 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 9 -1.</_>\n        <_>\n          15 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 8 -1.</_>\n        <_>\n          1 1 9 4 2.</_>\n        <_>\n          10 5 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 18 -1.</_>\n        <_>\n          18 2 2 9 2.</_>\n        <_>\n          16 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 14 4 -1.</_>\n        <_>\n          0 15 7 2 2.</_>\n        <_>\n          7 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 18 -1.</_>\n        <_>\n          18 2 2 9 2.</_>\n        <_>\n          16 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 18 -1.</_>\n        <_>\n          0 2 2 9 2.</_>\n        <_>\n          2 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 11 -1.</_>\n        <_>\n          10 6 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 2 -1.</_>\n        <_>\n          10 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 6 -1.</_>\n        <_>\n          13 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 6 -1.</_>\n        <_>\n          1 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 7 -1.</_>\n        <_>\n          9 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 8 4 -1.</_>\n        <_>\n          12 2 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 4 -1.</_>\n        <_>\n          4 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 6 -1.</_>\n        <_>\n          13 1 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 7 -1.</_>\n        <_>\n          3 3 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 10 8 -1.</_>\n        <_>\n          13 12 5 4 2.</_>\n        <_>\n          8 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 10 -1.</_>\n        <_>\n          2 9 6 5 2.</_>\n        <_>\n          8 14 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          6 14 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 6 -1.</_>\n        <_>\n          1 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 13 3 -1.</_>\n        <_>\n          7 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 4 -1.</_>\n        <_>\n          0 1 9 2 2.</_>\n        <_>\n          9 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 8 -1.</_>\n        <_>\n          12 1 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 8 -1.</_>\n        <_>\n          6 1 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 10 -1.</_>\n        <_>\n          12 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 16 -1.</_>\n        <_>\n          7 9 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 5 8 -1.</_>\n        <_>\n          14 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 10 -1.</_>\n        <_>\n          5 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 4 -1.</_>\n        <_>\n          3 14 7 2 2.</_>\n        <_>\n          10 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 13 -1.</_>\n        <_>\n          10 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 13 -1.</_>\n        <_>\n          9 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 5 8 -1.</_>\n        <_>\n          14 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 5 8 -1.</_>\n        <_>\n          1 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 6 -1.</_>\n        <_>\n          14 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 19 3 -1.</_>\n        <_>\n          0 1 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 8 8 -1.</_>\n        <_>\n          14 12 4 4 2.</_>\n        <_>\n          10 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 8 8 -1.</_>\n        <_>\n          2 12 4 4 2.</_>\n        <_>\n          6 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 15 3 -1.</_>\n        <_>\n          3 9 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 13 -1.</_>\n        <_>\n          7 2 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 17 3 -1.</_>\n        <_>\n          3 10 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 13 3 -1.</_>\n        <_>\n          2 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 13 -1.</_>\n        <_>\n          14 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 9 6 -1.</_>\n        <_>\n          12 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 6 -1.</_>\n        <_>\n          5 9 5 3 2.</_>\n        <_>\n          10 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 14 4 -1.</_>\n        <_>\n          10 10 7 2 2.</_>\n        <_>\n          3 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 6 -1.</_>\n        <_>\n          1 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 5 -1.</_>\n        <_>\n          9 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 9 6 -1.</_>\n        <_>\n          11 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 9 6 -1.</_>\n        <_>\n          0 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 13 6 -1.</_>\n        <_>\n          4 4 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 6 -1.</_>\n        <_>\n          0 5 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 15 8 -1.</_>\n        <_>\n          7 6 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 4 -1.</_>\n        <_>\n          12 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 4 -1.</_>\n        <_>\n          0 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 4 -1.</_>\n        <_>\n          8 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 6 -1.</_>\n        <_>\n          5 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          10 10 4 4 2.</_>\n        <_>\n          6 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 20 -1.</_>\n        <_>\n          8 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 3 -1.</_>\n        <_>\n          7 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 2 -1.</_>\n        <_>\n          10 0 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 2 -1.</_>\n        <_>\n          3 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 9 -1.</_>\n        <_>\n          0 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 13 3 -1.</_>\n        <_>\n          7 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 8 14 -1.</_>\n        <_>\n          4 6 4 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 9 5 -1.</_>\n        <_>\n          12 13 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 9 5 -1.</_>\n        <_>\n          5 13 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 7 -1.</_>\n        <_>\n          10 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 7 -1.</_>\n        <_>\n          8 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 8 -1.</_>\n        <_>\n          12 8 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 8 8 -1.</_>\n        <_>\n          15 12 4 4 2.</_>\n        <_>\n          11 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 8 8 -1.</_>\n        <_>\n          1 12 4 4 2.</_>\n        <_>\n          5 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 5 -1.</_>\n        <_>\n          12 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 5 -1.</_>\n        <_>\n          5 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          10 5 6 3 2.</_>\n        <_>\n          4 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 10 3 -1.</_>\n        <_>\n          7 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 8 8 -1.</_>\n        <_>\n          14 3 4 4 2.</_>\n        <_>\n          10 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 8 8 -1.</_>\n        <_>\n          2 3 4 4 2.</_>\n        <_>\n          6 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 3 -1.</_>\n        <_>\n          8 2 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 8 8 -1.</_>\n        <_>\n          4 1 4 4 2.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 4 9 -1.</_>\n        <_>\n          10 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 15 7 -1.</_>\n        <_>\n          5 13 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 20 -1.</_>\n        <_>\n          10 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 20 -1.</_>\n        <_>\n          5 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 14 -1.</_>\n        <_>\n          15 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 3 -1.</_>\n        <_>\n          6 2 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 7 -1.</_>\n        <_>\n          12 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 7 -1.</_>\n        <_>\n          6 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 16 10 -1.</_>\n        <_>\n          0 9 16 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 13 3 -1.</_>\n        <_>\n          6 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 13 2 -1.</_>\n        <_>\n          2 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 11 8 -1.</_>\n        <_>\n          5 4 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 3 10 -1.</_>\n        <_>\n          1 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 3 -1.</_>\n        <_>\n          7 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 3 -1.</_>\n        <_>\n          0 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 4 7 -1.</_>\n        <_>\n          14 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 8 6 -1.</_>\n        <_>\n          1 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 13 3 -1.</_>\n        <_>\n          1 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 4 7 -1.</_>\n        <_>\n          14 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 7 -1.</_>\n        <_>\n          4 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 9 6 -1.</_>\n        <_>\n          1 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 7 -1.</_>\n        <_>\n          12 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 7 -1.</_>\n        <_>\n          6 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 10 6 -1.</_>\n        <_>\n          15 14 5 3 2.</_>\n        <_>\n          10 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 6 -1.</_>\n        <_>\n          4 17 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 7 -1.</_>\n        <_>\n          9 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 15 4 -1.</_>\n        <_>\n          6 3 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 3 -1.</_>\n        <_>\n          8 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 4 -1.</_>\n        <_>\n          6 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 11 -1.</_>\n        <_>\n          12 5 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 2 -1.</_>\n        <_>\n          10 0 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 13 -1.</_>\n        <_>\n          10 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 2 -1.</_>\n        <_>\n          3 3 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 12 4 -1.</_>\n        <_>\n          4 10 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 6 -1.</_>\n        <_>\n          0 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 10 -1.</_>\n        <_>\n          11 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 10 6 -1.</_>\n        <_>\n          1 14 5 3 2.</_>\n        <_>\n          6 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 12 -1.</_>\n        <_>\n          12 4 6 6 2.</_>\n        <_>\n          6 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 12 12 -1.</_>\n        <_>\n          2 4 6 6 2.</_>\n        <_>\n          8 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 14 8 -1.</_>\n        <_>\n          10 5 7 4 2.</_>\n        <_>\n          3 9 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 7 -1.</_>\n        <_>\n          2 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 7 6 -1.</_>\n        <_>\n          7 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 16 6 -1.</_>\n        <_>\n          2 15 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 3 13 -1.</_>\n        <_>\n          17 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 3 13 -1.</_>\n        <_>\n          2 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 5 9 -1.</_>\n        <_>\n          11 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 3 -1.</_>\n        <_>\n          1 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 13 3 -1.</_>\n        <_>\n          7 3 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 13 3 -1.</_>\n        <_>\n          1 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 5 9 -1.</_>\n        <_>\n          11 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 5 9 -1.</_>\n        <_>\n          4 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 3 -1.</_>\n        <_>\n          4 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 4 -1.</_>\n        <_>\n          1 2 9 2 2.</_>\n        <_>\n          10 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 6 -1.</_>\n        <_>\n          14 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 6 -1.</_>\n        <_>\n          0 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 6 -1.</_>\n        <_>\n          4 3 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 13 3 -1.</_>\n        <_>\n          2 8 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 2 -1.</_>\n        <_>\n          3 8 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 8 -1.</_>\n        <_>\n          11 10 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 7 -1.</_>\n        <_>\n          8 0 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 7 -1.</_>\n        <_>\n          11 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 18 -1.</_>\n        <_>\n          7 2 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 13 -1.</_>\n        <_>\n          13 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 14 2 -1.</_>\n        <_>\n          2 19 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 7 -1.</_>\n        <_>\n          11 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 13 -1.</_>\n        <_>\n          9 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 2 14 -1.</_>\n        <_>\n          12 4 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 14 -1.</_>\n        <_>\n          7 4 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 18 3 -1.</_>\n        <_>\n          7 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 9 -1.</_>\n        <_>\n          5 8 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 8 8 -1.</_>\n        <_>\n          15 5 4 4 2.</_>\n        <_>\n          11 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 8 -1.</_>\n        <_>\n          5 5 4 4 2.</_>\n        <_>\n          9 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 20 -1.</_>\n        <_>\n          10 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 13 -1.</_>\n        <_>\n          8 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 10 6 -1.</_>\n        <_>\n          0 3 5 3 2.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 12 4 -1.</_>\n        <_>\n          9 7 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 10 -1.</_>\n        <_>\n          5 4 3 5 2.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 8 -1.</_>\n        <_>\n          10 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 5 -1.</_>\n        <_>\n          7 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 12 -1.</_>\n        <_>\n          7 6 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 8 -1.</_>\n        <_>\n          3 4 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 13 3 -1.</_>\n        <_>\n          4 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 5 -1.</_>\n        <_>\n          6 9 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 2 -1.</_>\n        <_>\n          5 8 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 14 4 -1.</_>\n        <_>\n          2 11 7 2 2.</_>\n        <_>\n          9 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 6 -1.</_>\n        <_>\n          12 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 6 -1.</_>\n        <_>\n          4 10 6 3 2.</_>\n        <_>\n          10 13 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 10 -1.</_>\n        <_>\n          14 8 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 2 -1.</_>\n        <_>\n          0 3 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 5 -1.</_>\n        <_>\n          14 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 13 2 -1.</_>\n        <_>\n          3 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 5 -1.</_>\n        <_>\n          3 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 8 -1.</_>\n        <_>\n          11 1 4 4 2.</_>\n        <_>\n          7 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 8 -1.</_>\n        <_>\n          5 1 4 4 2.</_>\n        <_>\n          9 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 14 -1.</_>\n        <_>\n          17 4 2 7 2.</_>\n        <_>\n          15 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 14 -1.</_>\n        <_>\n          17 4 2 7 2.</_>\n        <_>\n          15 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 4 18 -1.</_>\n        <_>\n          1 2 2 9 2.</_>\n        <_>\n          3 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 16 9 -1.</_>\n        <_>\n          3 14 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 17 3 -1.</_>\n        <_>\n          0 1 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 15 -1.</_>\n        <_>\n          9 10 9 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 7 9 -1.</_>\n        <_>\n          0 10 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 10 -1.</_>\n        <_>\n          16 0 3 5 2.</_>\n        <_>\n          13 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 4 -1.</_>\n        <_>\n          0 3 7 2 2.</_>\n        <_>\n          7 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 10 -1.</_>\n        <_>\n          16 0 3 5 2.</_>\n        <_>\n          13 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 10 -1.</_>\n        <_>\n          1 0 3 5 2.</_>\n        <_>\n          4 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 7 -1.</_>\n        <_>\n          12 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 5 16 -1.</_>\n        <_>\n          7 12 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 8 -1.</_>\n        <_>\n          10 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 17 -1.</_>\n        <_>\n          6 3 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 20 -1.</_>\n        <_>\n          8 0 6 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 6 -1.</_>\n        <_>\n          8 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 5 16 -1.</_>\n        <_>\n          9 12 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 9 -1.</_>\n        <_>\n          3 7 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 5 9 -1.</_>\n        <_>\n          15 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 10 6 -1.</_>\n        <_>\n          5 16 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 17 6 -1.</_>\n        <_>\n          2 16 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 6 -1.</_>\n        <_>\n          3 4 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 15 -1.</_>\n        <_>\n          2 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 10 -1.</_>\n        <_>\n          10 4 9 5 2.</_>\n        <_>\n          1 9 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 13 -1.</_>\n        <_>\n          1 1 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 3 12 -1.</_>\n        <_>\n          13 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 4 -1.</_>\n        <_>\n          0 2 10 2 2.</_>\n        <_>\n          10 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 7 -1.</_>\n        <_>\n          9 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 5 -1.</_>\n        <_>\n          7 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 12 -1.</_>\n        <_>\n          11 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 13 3 -1.</_>\n        <_>\n          1 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 12 -1.</_>\n        <_>\n          11 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 12 -1.</_>\n        <_>\n          11 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 12 -1.</_>\n        <_>\n          7 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 14 -1.</_>\n        <_>\n          10 0 3 7 2.</_>\n        <_>\n          7 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 8 -1.</_>\n        <_>\n          5 4 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 8 -1.</_>\n        <_>\n          3 4 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 5 10 -1.</_>\n        <_>\n          9 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 14 -1.</_>\n        <_>\n          8 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 18 5 -1.</_>\n        <_>\n          8 15 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 10 6 -1.</_>\n        <_>\n          1 9 5 3 2.</_>\n        <_>\n          6 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 13 -1.</_>\n        <_>\n          8 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 11 -1.</_>\n        <_>\n          2 1 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 7 6 -1.</_>\n        <_>\n          7 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 8 -1.</_>\n        <_>\n          10 4 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 9 -1.</_>\n        <_>\n          15 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 7 6 -1.</_>\n        <_>\n          1 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 3 10 -1.</_>\n        <_>\n          11 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 3 10 -1.</_>\n        <_>\n          6 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 9 -1.</_>\n        <_>\n          8 2 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 18 5 -1.</_>\n        <_>\n          8 15 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 5 -1.</_>\n        <_>\n          6 15 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 9 -1.</_>\n        <_>\n          12 3 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 8 -1.</_>\n        <_>\n          9 12 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 14 -1.</_>\n        <_>\n          15 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 14 -1.</_>\n        <_>\n          3 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 13 3 -1.</_>\n        <_>\n          0 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 9 13 -1.</_>\n        <_>\n          13 7 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 9 13 -1.</_>\n        <_>\n          4 7 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 12 5 -1.</_>\n        <_>\n          12 15 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 6 -1.</_>\n        <_>\n          10 14 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 15 3 -1.</_>\n        <_>\n          5 3 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 6 -1.</_>\n        <_>\n          5 5 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 7 8 -1.</_>\n        <_>\n          7 8 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 9 -1.</_>\n        <_>\n          0 3 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 9 -1.</_>\n        <_>\n          15 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 9 -1.</_>\n        <_>\n          0 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 13 3 -1.</_>\n        <_>\n          7 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 7 6 -1.</_>\n        <_>\n          2 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 7 -1.</_>\n        <_>\n          6 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 5 9 -1.</_>\n        <_>\n          8 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 12 -1.</_>\n        <_>\n          4 8 4 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 9 5 -1.</_>\n        <_>\n          12 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 5 -1.</_>\n        <_>\n          5 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 10 14 -1.</_>\n        <_>\n          11 4 5 7 2.</_>\n        <_>\n          6 11 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 10 14 -1.</_>\n        <_>\n          4 4 5 7 2.</_>\n        <_>\n          9 11 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 6 5 -1.</_>\n        <_>\n          13 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 13 3 -1.</_>\n        <_>\n          3 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 14 4 -1.</_>\n        <_>\n          12 16 7 2 2.</_>\n        <_>\n          5 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 10 -1.</_>\n        <_>\n          1 0 3 5 2.</_>\n        <_>\n          4 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 5 12 -1.</_>\n        <_>\n          11 7 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 5 12 -1.</_>\n        <_>\n          4 7 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 8 -1.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 14 4 -1.</_>\n        <_>\n          1 16 7 2 2.</_>\n        <_>\n          8 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 13 2 -1.</_>\n        <_>\n          5 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 9 -1.</_>\n        <_>\n          0 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 5 -1.</_>\n        <_>\n          13 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 5 -1.</_>\n        <_>\n          4 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 4 13 -1.</_>\n        <_>\n          15 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 4 13 -1.</_>\n        <_>\n          3 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 10 4 -1.</_>\n        <_>\n          5 12 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 15 3 -1.</_>\n        <_>\n          0 3 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 11 6 -1.</_>\n        <_>\n          7 2 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 6 -1.</_>\n        <_>\n          0 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 4 -1.</_>\n        <_>\n          0 12 10 2 2.</_>\n        <_>\n          10 14 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 5 -1.</_>\n        <_>\n          8 1 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 2 14 -1.</_>\n        <_>\n          7 1 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 8 -1.</_>\n        <_>\n          8 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 7 -1.</_>\n        <_>\n          8 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 9 -1.</_>\n        <_>\n          15 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 5 -1.</_>\n        <_>\n          9 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 5 6 -1.</_>\n        <_>\n          0 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 16 -1.</_>\n        <_>\n          17 4 2 8 2.</_>\n        <_>\n          15 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 16 -1.</_>\n        <_>\n          17 4 2 8 2.</_>\n        <_>\n          15 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 15 4 -1.</_>\n        <_>\n          2 18 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 13 -1.</_>\n        <_>\n          18 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 15 5 -1.</_>\n        <_>\n          7 8 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 16 -1.</_>\n        <_>\n          17 4 2 8 2.</_>\n        <_>\n          15 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 4 16 -1.</_>\n        <_>\n          1 4 2 8 2.</_>\n        <_>\n          3 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 10 -1.</_>\n        <_>\n          6 4 3 5 2.</_>\n        <_>\n          9 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 19 3 -1.</_>\n        <_>\n          1 10 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 12 -1.</_>\n        <_>\n          3 4 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 4 -1.</_>\n        <_>\n          6 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 15 3 -1.</_>\n        <_>\n          0 6 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 13 -1.</_>\n        <_>\n          12 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 14 -1.</_>\n        <_>\n          10 4 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 6 -1.</_>\n        <_>\n          12 0 5 3 2.</_>\n        <_>\n          7 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 6 7 -1.</_>\n        <_>\n          3 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 13 -1.</_>\n        <_>\n          18 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 13 -1.</_>\n        <_>\n          1 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 6 -1.</_>\n        <_>\n          11 0 5 3 2.</_>\n        <_>\n          6 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 10 6 -1.</_>\n        <_>\n          4 0 5 3 2.</_>\n        <_>\n          9 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 14 2 -1.</_>\n        <_>\n          6 2 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 18 -1.</_>\n        <_>\n          3 9 12 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 10 -1.</_>\n        <_>\n          13 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 10 -1.</_>\n        <_>\n          1 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 12 -1.</_>\n        <_>\n          10 5 6 6 2.</_>\n        <_>\n          4 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 5 -1.</_>\n        <_>\n          10 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 15 4 -1.</_>\n        <_>\n          9 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 11 -1.</_>\n        <_>\n          10 9 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 10 -1.</_>\n        <_>\n          11 6 4 5 2.</_>\n        <_>\n          7 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 6 -1.</_>\n        <_>\n          4 10 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 9 6 -1.</_>\n        <_>\n          11 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 7 6 -1.</_>\n        <_>\n          6 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 16 -1.</_>\n        <_>\n          9 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 9 16 -1.</_>\n        <_>\n          3 10 9 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 10 -1.</_>\n        <_>\n          5 5 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 10 -1.</_>\n        <_>\n          5 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 3 12 -1.</_>\n        <_>\n          13 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 6 -1.</_>\n        <_>\n          0 12 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 14 2 -1.</_>\n        <_>\n          6 16 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 7 4 -1.</_>\n        <_>\n          6 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 11 8 -1.</_>\n        <_>\n          6 9 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 12 -1.</_>\n        <_>\n          0 8 4 6 2.</_>\n        <_>\n          4 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 5 9 -1.</_>\n        <_>\n          8 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 4 14 -1.</_>\n        <_>\n          2 6 2 7 2.</_>\n        <_>\n          4 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 6 -1.</_>\n        <_>\n          9 10 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 4 8 -1.</_>\n        <_>\n          2 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 8 12 -1.</_>\n        <_>\n          13 4 4 6 2.</_>\n        <_>\n          9 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 8 12 -1.</_>\n        <_>\n          3 4 4 6 2.</_>\n        <_>\n          7 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 8 -1.</_>\n        <_>\n          14 8 5 4 2.</_>\n        <_>\n          9 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 15 2 -1.</_>\n        <_>\n          2 19 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 5 9 -1.</_>\n        <_>\n          10 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 16 4 -1.</_>\n        <_>\n          8 11 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 14 -1.</_>\n        <_>\n          14 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 18 6 -1.</_>\n        <_>\n          9 11 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 8 -1.</_>\n        <_>\n          8 2 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 6 -1.</_>\n        <_>\n          3 2 6 3 2.</_>\n        <_>\n          9 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 8 4 -1.</_>\n        <_>\n          12 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 8 4 -1.</_>\n        <_>\n          0 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 13 3 -1.</_>\n        <_>\n          1 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 15 -1.</_>\n        <_>\n          9 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 7 4 -1.</_>\n        <_>\n          2 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 4 7 -1.</_>\n        <_>\n          14 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 3 15 -1.</_>\n        <_>\n          4 3 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 7 -1.</_>\n        <_>\n          8 0 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 5 6 -1.</_>\n        <_>\n          3 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 10 3 -1.</_>\n        <_>\n          10 2 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 14 -1.</_>\n        <_>\n          8 11 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 8 4 -1.</_>\n        <_>\n          6 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 10 3 -1.</_>\n        <_>\n          10 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 5 8 -1.</_>\n        <_>\n          5 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 6 -1.</_>\n        <_>\n          13 1 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 6 -1.</_>\n        <_>\n          4 1 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 4 -1.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 4 -1.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 7 4 -1.</_>\n        <_>\n          12 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 7 6 -1.</_>\n        <_>\n          3 17 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 3 -1.</_>\n        <_>\n          2 2 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 2 -1.</_>\n        <_>\n          3 3 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 13 2 -1.</_>\n        <_>\n          7 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 13 3 -1.</_>\n        <_>\n          1 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 4 -1.</_>\n        <_>\n          4 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 8 4 -1.</_>\n        <_>\n          0 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 8 -1.</_>\n        <_>\n          10 6 8 4 2.</_>\n        <_>\n          2 10 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 7 -1.</_>\n        <_>\n          4 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 2 -1.</_>\n        <_>\n          6 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 18 6 -1.</_>\n        <_>\n          1 11 9 3 2.</_>\n        <_>\n          10 14 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 5 10 -1.</_>\n        <_>\n          10 14 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          7 10 3 5 2.</_>\n        <_>\n          10 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 12 -1.</_>\n        <_>\n          6 6 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          7 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 5 -1.</_>\n        <_>\n          9 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 5 -1.</_>\n        <_>\n          9 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 13 2 -1.</_>\n        <_>\n          3 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 13 -1.</_>\n        <_>\n          16 3 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 13 -1.</_>\n        <_>\n          2 3 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 10 -1.</_>\n        <_>\n          12 9 3 5 2.</_>\n        <_>\n          9 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 5 9 -1.</_>\n        <_>\n          1 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 8 12 -1.</_>\n        <_>\n          16 8 4 6 2.</_>\n        <_>\n          12 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 8 -1.</_>\n        <_>\n          10 9 6 4 2.</_>\n        <_>\n          4 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 8 -1.</_>\n        <_>\n          6 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 10 -1.</_>\n        <_>\n          8 2 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 18 -1.</_>\n        <_>\n          17 2 2 9 2.</_>\n        <_>\n          15 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 20 -1.</_>\n        <_>\n          0 0 10 10 2.</_>\n        <_>\n          10 10 10 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 3 -1.</_>\n        <_>\n          5 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 4 -1.</_>\n        <_>\n          7 7 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 5 -1.</_>\n        <_>\n          11 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 5 -1.</_>\n        <_>\n          6 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 14 3 -1.</_>\n        <_>\n          6 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 8 8 -1.</_>\n        <_>\n          15 12 4 4 2.</_>\n        <_>\n          11 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 8 8 -1.</_>\n        <_>\n          1 12 4 4 2.</_>\n        <_>\n          5 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 8 -1.</_>\n        <_>\n          12 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 14 3 -1.</_>\n        <_>\n          8 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 10 19 -1.</_>\n        <_>\n          10 1 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 19 -1.</_>\n        <_>\n          5 1 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 8 -1.</_>\n        <_>\n          12 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 8 -1.</_>\n        <_>\n          6 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 18 6 -1.</_>\n        <_>\n          1 14 18 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 5 6 -1.</_>\n        <_>\n          5 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 4 8 -1.</_>\n        <_>\n          9 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 13 3 -1.</_>\n        <_>\n          0 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 18 3 -1.</_>\n        <_>\n          1 12 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 2 -1.</_>\n        <_>\n          2 2 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 19 3 -1.</_>\n        <_>\n          0 10 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 7 4 -1.</_>\n        <_>\n          9 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 20 6 -1.</_>\n        <_>\n          0 16 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 12 6 -1.</_>\n        <_>\n          8 7 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 6 -1.</_>\n        <_>\n          6 7 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 12 -1.</_>\n        <_>\n          0 6 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 3 13 -1.</_>\n        <_>\n          14 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 13 6 -1.</_>\n        <_>\n          3 3 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 13 -1.</_>\n        <_>\n          8 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 8 -1.</_>\n        <_>\n          7 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 10 -1.</_>\n        <_>\n          12 2 3 5 2.</_>\n        <_>\n          9 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 14 -1.</_>\n        <_>\n          6 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 7 6 -1.</_>\n        <_>\n          2 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 6 -1.</_>\n        <_>\n          7 2 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 7 4 -1.</_>\n        <_>\n          4 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 10 16 -1.</_>\n        <_>\n          9 12 10 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 16 12 -1.</_>\n        <_>\n          1 3 8 6 2.</_>\n        <_>\n          9 9 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 2 16 -1.</_>\n        <_>\n          11 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 13 -1.</_>\n        <_>\n          9 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 13 3 -1.</_>\n        <_>\n          7 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 13 3 -1.</_>\n        <_>\n          0 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 6 -1.</_>\n        <_>\n          7 9 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 8 -1.</_>\n        <_>\n          6 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 10 -1.</_>\n        <_>\n          9 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 12 -1.</_>\n        <_>\n          8 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 15 3 -1.</_>\n        <_>\n          4 6 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 9 4 -1.</_>\n        <_>\n          2 6 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 10 -1.</_>\n        <_>\n          8 5 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 10 -1.</_>\n        <_>\n          8 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 11 8 -1.</_>\n        <_>\n          5 11 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 6 6 -1.</_>\n        <_>\n          1 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 5 18 -1.</_>\n        <_>\n          14 8 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 5 18 -1.</_>\n        <_>\n          1 8 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 3 13 -1.</_>\n        <_>\n          14 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 13 -1.</_>\n        <_>\n          5 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 2 -1.</_>\n        <_>\n          0 7 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 4 -1.</_>\n        <_>\n          2 1 8 2 2.</_>\n        <_>\n          10 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 10 6 -1.</_>\n        <_>\n          11 1 5 3 2.</_>\n        <_>\n          6 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 15 -1.</_>\n        <_>\n          4 5 4 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 12 6 -1.</_>\n        <_>\n          4 13 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 14 -1.</_>\n        <_>\n          7 0 3 7 2.</_>\n        <_>\n          10 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 10 -1.</_>\n        <_>\n          7 10 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 13 2 -1.</_>\n        <_>\n          0 3 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 15 -1.</_>\n        <_>\n          0 5 20 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 6 -1.</_>\n        <_>\n          4 3 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 4 -1.</_>\n        <_>\n          6 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 7 6 -1.</_>\n        <_>\n          0 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 4 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 7 -1.</_>\n        <_>\n          5 0 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 8 -1.</_>\n        <_>\n          10 0 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 8 -1.</_>\n        <_>\n          5 0 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 4 -1.</_>\n        <_>\n          5 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 4 -1.</_>\n        <_>\n          9 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 7 -1.</_>\n        <_>\n          9 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 9 -1.</_>\n        <_>\n          7 0 5 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 2 -1.</_>\n        <_>\n          6 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 8 -1.</_>\n        <_>\n          8 0 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 14 -1.</_>\n        <_>\n          14 1 2 7 2.</_>\n        <_>\n          12 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 3 -1.</_>\n        <_>\n          6 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 7 6 -1.</_>\n        <_>\n          7 4 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 5 14 -1.</_>\n        <_>\n          6 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 5 -1.</_>\n        <_>\n          9 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 15 5 -1.</_>\n        <_>\n          6 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 5 -1.</_>\n        <_>\n          9 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 7 -1.</_>\n        <_>\n          9 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 6 -1.</_>\n        <_>\n          12 1 5 3 2.</_>\n        <_>\n          7 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 13 2 -1.</_>\n        <_>\n          2 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 4 -1.</_>\n        <_>\n          10 2 9 2 2.</_>\n        <_>\n          1 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 9 5 -1.</_>\n        <_>\n          8 8 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 18 -1.</_>\n        <_>\n          17 2 2 9 2.</_>\n        <_>\n          15 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 4 18 -1.</_>\n        <_>\n          1 2 2 9 2.</_>\n        <_>\n          3 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 10 6 -1.</_>\n        <_>\n          15 7 5 3 2.</_>\n        <_>\n          10 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 17 6 -1.</_>\n        <_>\n          1 9 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 7 4 -1.</_>\n        <_>\n          7 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 10 6 -1.</_>\n        <_>\n          1 8 5 3 2.</_>\n        <_>\n          6 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 10 6 -1.</_>\n        <_>\n          15 7 5 3 2.</_>\n        <_>\n          10 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 10 6 -1.</_>\n        <_>\n          0 7 5 3 2.</_>\n        <_>\n          5 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 19 -1.</_>\n        <_>\n          8 1 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 19 -1.</_>\n        <_>\n          6 1 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 12 13 -1.</_>\n        <_>\n          5 1 6 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 9 5 -1.</_>\n        <_>\n          8 1 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 8 -1.</_>\n        <_>\n          16 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 13 3 -1.</_>\n        <_>\n          0 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 16 -1.</_>\n        <_>\n          10 0 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 5 -1.</_>\n        <_>\n          8 12 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 16 -1.</_>\n        <_>\n          10 0 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 16 -1.</_>\n        <_>\n          8 0 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 7 -1.</_>\n        <_>\n          6 1 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 7 -1.</_>\n        <_>\n          10 4 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 9 9 -1.</_>\n        <_>\n          14 8 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 9 -1.</_>\n        <_>\n          3 8 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 5 -1.</_>\n        <_>\n          0 4 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 18 2 -1.</_>\n        <_>\n          1 13 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 5 9 -1.</_>\n        <_>\n          11 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 5 9 -1.</_>\n        <_>\n          4 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 10 -1.</_>\n        <_>\n          14 2 3 5 2.</_>\n        <_>\n          11 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 14 4 -1.</_>\n        <_>\n          2 10 7 2 2.</_>\n        <_>\n          9 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 4 -1.</_>\n        <_>\n          10 11 10 2 2.</_>\n        <_>\n          0 13 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 15 -1.</_>\n        <_>\n          15 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 15 -1.</_>\n        <_>\n          4 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 7 4 -1.</_>\n        <_>\n          9 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 5 -1.</_>\n        <_>\n          8 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 9 -1.</_>\n        <_>\n          14 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 9 -1.</_>\n        <_>\n          4 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 8 8 -1.</_>\n        <_>\n          13 1 4 4 2.</_>\n        <_>\n          9 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 13 -1.</_>\n        <_>\n          8 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 4 -1.</_>\n        <_>\n          10 15 7 2 2.</_>\n        <_>\n          3 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 7 4 -1.</_>\n        <_>\n          4 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 4 8 -1.</_>\n        <_>\n          9 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 13 3 -1.</_>\n        <_>\n          1 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 10 -1.</_>\n        <_>\n          5 12 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 8 -1.</_>\n        <_>\n          5 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 10 -1.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 5 -1.</_>\n        <_>\n          5 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 14 -1.</_>\n        <_>\n          8 11 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 5 6 -1.</_>\n        <_>\n          3 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 17 6 -1.</_>\n        <_>\n          1 4 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 10 -1.</_>\n        <_>\n          9 5 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 6 -1.</_>\n        <_>\n          8 4 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          12 6 7 3 2.</_>\n        <_>\n          5 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 14 6 -1.</_>\n        <_>\n          1 6 7 3 2.</_>\n        <_>\n          8 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 5 -1.</_>\n        <_>\n          8 9 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 15 -1.</_>\n        <_>\n          0 10 20 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 14 -1.</_>\n        <_>\n          14 5 2 7 2.</_>\n        <_>\n          12 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 9 -1.</_>\n        <_>\n          2 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 8 -1.</_>\n        <_>\n          16 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 13 -1.</_>\n        <_>\n          7 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 8 -1.</_>\n        <_>\n          16 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 8 -1.</_>\n        <_>\n          2 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 20 -1.</_>\n        <_>\n          10 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 20 -1.</_>\n        <_>\n          5 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 6 -1.</_>\n        <_>\n          11 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 20 -1.</_>\n        <_>\n          7 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 8 12 -1.</_>\n        <_>\n          11 5 4 6 2.</_>\n        <_>\n          7 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 12 -1.</_>\n        <_>\n          4 5 5 6 2.</_>\n        <_>\n          9 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 14 -1.</_>\n        <_>\n          14 5 2 7 2.</_>\n        <_>\n          12 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 14 -1.</_>\n        <_>\n          4 5 2 7 2.</_>\n        <_>\n          6 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 9 -1.</_>\n        <_>\n          14 10 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 2 -1.</_>\n        <_>\n          3 9 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 6 -1.</_>\n        <_>\n          11 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 14 3 -1.</_>\n        <_>\n          0 16 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 6 -1.</_>\n        <_>\n          11 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 8 6 -1.</_>\n        <_>\n          1 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 19 -1.</_>\n        <_>\n          7 0 6 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 10 -1.</_>\n        <_>\n          3 9 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 9 4 -1.</_>\n        <_>\n          11 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 10 -1.</_>\n        <_>\n          8 3 4 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 10 -1.</_>\n        <_>\n          7 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 3 -1.</_>\n        <_>\n          4 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 4 -1.</_>\n        <_>\n          0 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 14 3 -1.</_>\n        <_>\n          6 13 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 6 -1.</_>\n        <_>\n          11 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 5 15 -1.</_>\n        <_>\n          7 5 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 13 2 -1.</_>\n        <_>\n          4 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 4 12 -1.</_>\n        <_>\n          2 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 4 -1.</_>\n        <_>\n          12 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 15 -1.</_>\n        <_>\n          9 5 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 4 -1.</_>\n        <_>\n          12 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 7 4 -1.</_>\n        <_>\n          1 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 2 -1.</_>\n        <_>\n          3 3 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 14 -1.</_>\n        <_>\n          8 8 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 17 6 -1.</_>\n        <_>\n          2 9 17 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 5 9 -1.</_>\n        <_>\n          0 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 13 2 -1.</_>\n        <_>\n          4 6 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 14 2 -1.</_>\n        <_>\n          2 10 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 13 3 -1.</_>\n        <_>\n          5 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 14 -1.</_>\n        <_>\n          6 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 4 -1.</_>\n        <_>\n          11 0 7 2 2.</_>\n        <_>\n          4 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 4 -1.</_>\n        <_>\n          0 1 10 2 2.</_>\n        <_>\n          10 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 7 6 -1.</_>\n        <_>\n          7 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 10 -1.</_>\n        <_>\n          7 2 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 13 3 -1.</_>\n        <_>\n          1 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 3 -1.</_>\n        <_>\n          0 2 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 17 -1.</_>\n        <_>\n          18 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 10 -1.</_>\n        <_>\n          0 0 10 5 2.</_>\n        <_>\n          10 5 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 14 4 -1.</_>\n        <_>\n          11 8 7 2 2.</_>\n        <_>\n          4 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 7 6 -1.</_>\n        <_>\n          0 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 14 4 -1.</_>\n        <_>\n          11 8 7 2 2.</_>\n        <_>\n          4 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 14 4 -1.</_>\n        <_>\n          2 8 7 2 2.</_>\n        <_>\n          9 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 16 10 -1.</_>\n        <_>\n          11 4 8 5 2.</_>\n        <_>\n          3 9 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 6 -1.</_>\n        <_>\n          6 5 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 13 2 -1.</_>\n        <_>\n          5 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 7 -1.</_>\n        <_>\n          7 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 4 13 -1.</_>\n        <_>\n          11 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 13 -1.</_>\n        <_>\n          7 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 14 3 -1.</_>\n        <_>\n          5 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 3 14 -1.</_>\n        <_>\n          2 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 15 3 -1.</_>\n        <_>\n          8 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 16 -1.</_>\n        <_>\n          2 4 3 8 2.</_>\n        <_>\n          5 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 13 -1.</_>\n        <_>\n          13 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 20 -1.</_>\n        <_>\n          4 10 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 7 9 -1.</_>\n        <_>\n          8 5 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 13 -1.</_>\n        <_>\n          6 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 10 -1.</_>\n        <_>\n          14 2 3 5 2.</_>\n        <_>\n          11 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 7 -1.</_>\n        <_>\n          7 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 13 -1.</_>\n        <_>\n          15 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 7 -1.</_>\n        <_>\n          9 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 13 -1.</_>\n        <_>\n          15 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 13 3 -1.</_>\n        <_>\n          1 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 9 4 -1.</_>\n        <_>\n          0 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 8 10 -1.</_>\n        <_>\n          11 7 4 5 2.</_>\n        <_>\n          7 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 10 -1.</_>\n        <_>\n          5 7 4 5 2.</_>\n        <_>\n          9 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 5 -1.</_>\n        <_>\n          14 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 13 6 -1.</_>\n        <_>\n          3 16 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 14 4 -1.</_>\n        <_>\n          10 12 7 2 2.</_>\n        <_>\n          3 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 6 5 -1.</_>\n        <_>\n          3 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 13 -1.</_>\n        <_>\n          15 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 13 -1.</_>\n        <_>\n          4 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 8 -1.</_>\n        <_>\n          8 11 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 3 15 -1.</_>\n        <_>\n          3 3 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 13 -1.</_>\n        <_>\n          17 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 7 -1.</_>\n        <_>\n          5 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 13 -1.</_>\n        <_>\n          17 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 13 -1.</_>\n        <_>\n          2 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 16 -1.</_>\n        <_>\n          10 1 2 8 2.</_>\n        <_>\n          8 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 5 9 -1.</_>\n        <_>\n          7 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 8 -1.</_>\n        <_>\n          6 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 5 -1.</_>\n        <_>\n          3 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 7 -1.</_>\n        <_>\n          14 0 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 12 7 -1.</_>\n        <_>\n          6 11 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 9 5 -1.</_>\n        <_>\n          10 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 15 2 -1.</_>\n        <_>\n          2 2 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 9 -1.</_>\n        <_>\n          15 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 5 -1.</_>\n        <_>\n          3 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 14 4 -1.</_>\n        <_>\n          13 8 7 2 2.</_>\n        <_>\n          6 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 13 -1.</_>\n        <_>\n          10 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 3 -1.</_>\n        <_>\n          4 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 7 -1.</_>\n        <_>\n          7 2 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 11 -1.</_>\n        <_>\n          9 5 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 11 -1.</_>\n        <_>\n          9 5 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 15 8 -1.</_>\n        <_>\n          10 12 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 9 -1.</_>\n        <_>\n          7 7 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 4 -1.</_>\n        <_>\n          6 8 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 5 9 -1.</_>\n        <_>\n          0 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 12 -1.</_>\n        <_>\n          7 12 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 9 12 -1.</_>\n        <_>\n          5 8 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 9 -1.</_>\n        <_>\n          11 3 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 5 -1.</_>\n        <_>\n          8 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 10 -1.</_>\n        <_>\n          12 2 3 5 2.</_>\n        <_>\n          9 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 10 6 -1.</_>\n        <_>\n          11 3 5 3 2.</_>\n        <_>\n          6 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 6 -1.</_>\n        <_>\n          3 4 7 3 2.</_>\n        <_>\n          10 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 7 -1.</_>\n        <_>\n          6 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 6 -1.</_>\n        <_>\n          9 3 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 6 -1.</_>\n        <_>\n          7 3 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 9 -1.</_>\n        <_>\n          10 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 13 2 -1.</_>\n        <_>\n          2 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 4 -1.</_>\n        <_>\n          3 13 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 3 -1.</_>\n        <_>\n          6 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 3 -1.</_>\n        <_>\n          9 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 6 -1.</_>\n        <_>\n          0 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 15 12 -1.</_>\n        <_>\n          3 7 15 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 10 -1.</_>\n        <_>\n          0 0 5 5 2.</_>\n        <_>\n          5 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 8 -1.</_>\n        <_>\n          16 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 5 -1.</_>\n        <_>\n          4 14 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 2 15 -1.</_>\n        <_>\n          11 5 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 7 6 -1.</_>\n        <_>\n          6 5 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 9 -1.</_>\n        <_>\n          10 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 2 15 -1.</_>\n        <_>\n          8 5 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 18 -1.</_>\n        <_>\n          18 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 8 -1.</_>\n        <_>\n          0 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 7 -1.</_>\n        <_>\n          8 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 4 -1.</_>\n        <_>\n          10 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 6 -1.</_>\n        <_>\n          10 9 5 3 2.</_>\n        <_>\n          5 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 5 8 -1.</_>\n        <_>\n          4 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 7 6 -1.</_>\n        <_>\n          13 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 7 6 -1.</_>\n        <_>\n          0 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 19 -1.</_>\n        <_>\n          4 0 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 15 8 -1.</_>\n        <_>\n          5 12 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 14 4 -1.</_>\n        <_>\n          13 8 7 2 2.</_>\n        <_>\n          6 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 13 3 -1.</_>\n        <_>\n          1 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 18 -1.</_>\n        <_>\n          18 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 18 -1.</_>\n        <_>\n          1 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 14 -1.</_>\n        <_>\n          16 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 8 -1.</_>\n        <_>\n          4 0 4 4 2.</_>\n        <_>\n          8 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 10 -1.</_>\n        <_>\n          10 0 8 5 2.</_>\n        <_>\n          2 5 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 7 -1.</_>\n        <_>\n          6 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 5 -1.</_>\n        <_>\n          7 9 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 4 9 -1.</_>\n        <_>\n          2 7 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 16 -1.</_>\n        <_>\n          14 0 3 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 5 9 -1.</_>\n        <_>\n          0 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 9 12 -1.</_>\n        <_>\n          11 6 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 9 12 -1.</_>\n        <_>\n          0 6 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 5 12 -1.</_>\n        <_>\n          8 6 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 9 -1.</_>\n        <_>\n          5 9 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 20 2 -1.</_>\n        <_>\n          0 18 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 8 -1.</_>\n        <_>\n          9 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 14 -1.</_>\n        <_>\n          6 12 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 9 -1.</_>\n        <_>\n          11 3 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 9 -1.</_>\n        <_>\n          0 3 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 14 -1.</_>\n        <_>\n          13 0 2 7 2.</_>\n        <_>\n          11 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 4 -1.</_>\n        <_>\n          6 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 14 -1.</_>\n        <_>\n          13 0 2 7 2.</_>\n        <_>\n          11 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 14 -1.</_>\n        <_>\n          4 0 2 7 2.</_>\n        <_>\n          6 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 10 6 -1.</_>\n        <_>\n          11 13 5 3 2.</_>\n        <_>\n          6 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 14 4 -1.</_>\n        <_>\n          1 8 7 2 2.</_>\n        <_>\n          8 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 9 -1.</_>\n        <_>\n          11 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 9 -1.</_>\n        <_>\n          7 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 6 -1.</_>\n        <_>\n          9 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 6 -1.</_>\n        <_>\n          8 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 4 -1.</_>\n        <_>\n          6 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 4 -1.</_>\n        <_>\n          6 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 3 14 -1.</_>\n        <_>\n          11 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 14 -1.</_>\n        <_>\n          8 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 14 -1.</_>\n        <_>\n          0 0 10 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 10 -1.</_>\n        <_>\n          10 9 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 8 -1.</_>\n        <_>\n          10 5 8 4 2.</_>\n        <_>\n          2 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 10 6 -1.</_>\n        <_>\n          4 4 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 3 -1.</_>\n        <_>\n          0 10 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 9 -1.</_>\n        <_>\n          3 14 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 6 -1.</_>\n        <_>\n          1 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 14 4 -1.</_>\n        <_>\n          13 15 7 2 2.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 10 6 -1.</_>\n        <_>\n          3 13 5 3 2.</_>\n        <_>\n          8 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 3 -1.</_>\n        <_>\n          0 7 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 6 -1.</_>\n        <_>\n          12 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 16 3 -1.</_>\n        <_>\n          0 16 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 16 4 -1.</_>\n        <_>\n          10 16 8 2 2.</_>\n        <_>\n          2 18 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 13 3 -1.</_>\n        <_>\n          1 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 6 -1.</_>\n        <_>\n          11 10 6 3 2.</_>\n        <_>\n          5 13 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 12 6 -1.</_>\n        <_>\n          3 10 6 3 2.</_>\n        <_>\n          9 13 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 10 6 -1.</_>\n        <_>\n          12 14 5 3 2.</_>\n        <_>\n          7 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 7 6 -1.</_>\n        <_>\n          2 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 14 2 -1.</_>\n        <_>\n          5 15 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 3 -1.</_>\n        <_>\n          1 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 14 -1.</_>\n        <_>\n          18 1 2 7 2.</_>\n        <_>\n          16 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 14 -1.</_>\n        <_>\n          6 12 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 14 2 -1.</_>\n        <_>\n          5 15 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 8 -1.</_>\n        <_>\n          6 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 12 -1.</_>\n        <_>\n          10 4 5 6 2.</_>\n        <_>\n          5 10 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 3 -1.</_>\n        <_>\n          3 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 4 -1.</_>\n        <_>\n          10 13 7 2 2.</_>\n        <_>\n          3 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 10 -1.</_>\n        <_>\n          5 9 3 5 2.</_>\n        <_>\n          8 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 7 -1.</_>\n        <_>\n          9 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 7 -1.</_>\n        <_>\n          8 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 8 6 -1.</_>\n        <_>\n          7 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 12 -1.</_>\n        <_>\n          0 0 4 6 2.</_>\n        <_>\n          4 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 5 -1.</_>\n        <_>\n          10 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 8 5 -1.</_>\n        <_>\n          9 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 13 3 -1.</_>\n        <_>\n          7 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 13 3 -1.</_>\n        <_>\n          0 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 6 -1.</_>\n        <_>\n          4 2 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 4 -1.</_>\n        <_>\n          4 2 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 4 -1.</_>\n        <_>\n          4 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 10 8 -1.</_>\n        <_>\n          2 12 5 4 2.</_>\n        <_>\n          7 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 14 -1.</_>\n        <_>\n          9 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 10 -1.</_>\n        <_>\n          4 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 2 -1.</_>\n        <_>\n          3 1 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 6 -1.</_>\n        <_>\n          0 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 13 2 -1.</_>\n        <_>\n          4 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 4 -1.</_>\n        <_>\n          2 12 8 2 2.</_>\n        <_>\n          10 14 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 11 9 -1.</_>\n        <_>\n          5 6 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 10 -1.</_>\n        <_>\n          0 7 20 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          10 9 4 4 2.</_>\n        <_>\n          6 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 6 10 -1.</_>\n        <_>\n          3 8 3 5 2.</_>\n        <_>\n          6 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 6 -1.</_>\n        <_>\n          7 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          5 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 5 -1.</_>\n        <_>\n          9 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 4 -1.</_>\n        <_>\n          1 7 9 2 2.</_>\n        <_>\n          10 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          8 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 5 8 -1.</_>\n        <_>\n          7 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 4 -1.</_>\n        <_>\n          8 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 8 -1.</_>\n        <_>\n          8 4 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 7 4 -1.</_>\n        <_>\n          12 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 8 -1.</_>\n        <_>\n          4 0 4 4 2.</_>\n        <_>\n          8 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 7 6 -1.</_>\n        <_>\n          13 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 12 4 -1.</_>\n        <_>\n          5 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 14 4 -1.</_>\n        <_>\n          1 3 7 2 2.</_>\n        <_>\n          8 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 8 -1.</_>\n        <_>\n          0 0 4 4 2.</_>\n        <_>\n          4 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 10 8 -1.</_>\n        <_>\n          7 16 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 13 3 -1.</_>\n        <_>\n          0 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 7 8 -1.</_>\n        <_>\n          10 16 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 13 2 -1.</_>\n        <_>\n          1 3 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 13 3 -1.</_>\n        <_>\n          6 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 13 3 -1.</_>\n        <_>\n          0 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 10 6 -1.</_>\n        <_>\n          13 14 5 3 2.</_>\n        <_>\n          8 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 4 -1.</_>\n        <_>\n          0 15 10 2 2.</_>\n        <_>\n          10 17 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 4 -1.</_>\n        <_>\n          4 6 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 11 -1.</_>\n        <_>\n          9 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 10 -1.</_>\n        <_>\n          15 10 4 5 2.</_>\n        <_>\n          11 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 10 6 -1.</_>\n        <_>\n          1 4 5 3 2.</_>\n        <_>\n          6 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 13 2 -1.</_>\n        <_>\n          7 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 13 -1.</_>\n        <_>\n          9 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 13 3 -1.</_>\n        <_>\n          5 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 8 10 -1.</_>\n        <_>\n          16 10 4 5 2.</_>\n        <_>\n          12 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 18 4 -1.</_>\n        <_>\n          0 11 9 2 2.</_>\n        <_>\n          9 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 8 10 -1.</_>\n        <_>\n          16 10 4 5 2.</_>\n        <_>\n          12 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 8 10 -1.</_>\n        <_>\n          0 10 4 5 2.</_>\n        <_>\n          4 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 14 -1.</_>\n        <_>\n          13 6 6 7 2.</_>\n        <_>\n          7 13 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 7 4 -1.</_>\n        <_>\n          1 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 7 -1.</_>\n        <_>\n          12 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 2 -1.</_>\n        <_>\n          10 0 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 7 -1.</_>\n        <_>\n          12 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 7 -1.</_>\n        <_>\n          6 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 14 -1.</_>\n        <_>\n          12 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 17 -1.</_>\n        <_>\n          10 2 6 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 7 -1.</_>\n        <_>\n          12 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 10 10 -1.</_>\n        <_>\n          6 9 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 13 3 -1.</_>\n        <_>\n          4 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 5 9 -1.</_>\n        <_>\n          7 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 14 -1.</_>\n        <_>\n          11 5 2 7 2.</_>\n        <_>\n          9 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 14 -1.</_>\n        <_>\n          8 5 2 7 2.</_>\n        <_>\n          10 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 12 -1.</_>\n        <_>\n          11 3 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 12 -1.</_>\n        <_>\n          7 3 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 14 4 -1.</_>\n        <_>\n          11 10 7 2 2.</_>\n        <_>\n          4 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 14 4 -1.</_>\n        <_>\n          2 10 7 2 2.</_>\n        <_>\n          9 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 7 -1.</_>\n        <_>\n          9 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 13 2 -1.</_>\n        <_>\n          1 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 2 -1.</_>\n        <_>\n          7 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 12 4 -1.</_>\n        <_>\n          4 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 7 4 -1.</_>\n        <_>\n          12 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 7 4 -1.</_>\n        <_>\n          1 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 3 14 -1.</_>\n        <_>\n          11 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 14 -1.</_>\n        <_>\n          8 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 6 7 -1.</_>\n        <_>\n          10 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 10 -1.</_>\n        <_>\n          2 5 3 5 2.</_>\n        <_>\n          5 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 3 16 -1.</_>\n        <_>\n          16 3 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 3 16 -1.</_>\n        <_>\n          3 3 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 13 -1.</_>\n        <_>\n          14 0 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 13 -1.</_>\n        <_>\n          3 0 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 14 -1.</_>\n        <_>\n          17 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 13 -1.</_>\n        <_>\n          5 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 14 -1.</_>\n        <_>\n          17 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 10 10 -1.</_>\n        <_>\n          1 10 5 5 2.</_>\n        <_>\n          6 15 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 10 -1.</_>\n        <_>\n          0 5 20 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 13 3 -1.</_>\n        <_>\n          2 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 14 -1.</_>\n        <_>\n          7 13 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 13 2 -1.</_>\n        <_>\n          0 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          10 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 10 -1.</_>\n        <_>\n          10 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 6 -1.</_>\n        <_>\n          3 13 7 3 2.</_>\n        <_>\n          10 16 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 19 -1.</_>\n        <_>\n          10 1 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 6 -1.</_>\n        <_>\n          1 12 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 3 -1.</_>\n        <_>\n          6 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 19 -1.</_>\n        <_>\n          8 1 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 2 -1.</_>\n        <_>\n          0 6 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 3 -1.</_>\n        <_>\n          6 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 7 -1.</_>\n        <_>\n          12 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 8 -1.</_>\n        <_>\n          6 2 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 9 -1.</_>\n        <_>\n          10 0 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 9 -1.</_>\n        <_>\n          5 0 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 7 6 -1.</_>\n        <_>\n          12 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 5 6 -1.</_>\n        <_>\n          1 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 10 -1.</_>\n        <_>\n          11 4 3 5 2.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 10 -1.</_>\n        <_>\n          4 5 6 5 2.</_>\n        <_>\n          10 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 5 9 -1.</_>\n        <_>\n          13 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 18 -1.</_>\n        <_>\n          1 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 18 8 -1.</_>\n        <_>\n          1 12 9 4 2.</_>\n        <_>\n          10 16 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          10 10 3 5 2.</_>\n        <_>\n          7 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 10 4 -1.</_>\n        <_>\n          4 5 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 9 6 -1.</_>\n        <_>\n          6 3 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 10 -1.</_>\n        <_>\n          5 9 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 5 8 -1.</_>\n        <_>\n          8 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 13 10 -1.</_>\n        <_>\n          3 13 13 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 5 12 -1.</_>\n        <_>\n          12 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 17 -1.</_>\n        <_>\n          12 0 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 17 -1.</_>\n        <_>\n          7 0 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 6 -1.</_>\n        <_>\n          0 7 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 13 -1.</_>\n        <_>\n          1 1 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 5 15 -1.</_>\n        <_>\n          12 5 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 5 15 -1.</_>\n        <_>\n          3 5 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 9 4 -1.</_>\n        <_>\n          10 5 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 14 2 -1.</_>\n        <_>\n          3 6 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 6 -1.</_>\n        <_>\n          10 2 7 3 2.</_>\n        <_>\n          3 5 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 6 -1.</_>\n        <_>\n          6 6 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 4 8 -1.</_>\n        <_>\n          11 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 13 -1.</_>\n        <_>\n          9 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 13 -1.</_>\n        <_>\n          10 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 7 -1.</_>\n        <_>\n          7 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 18 5 -1.</_>\n        <_>\n          8 6 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 4 -1.</_>\n        <_>\n          10 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 10 -1.</_>\n        <_>\n          11 4 3 5 2.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          4 5 6 3 2.</_>\n        <_>\n          10 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 10 -1.</_>\n        <_>\n          12 2 3 5 2.</_>\n        <_>\n          9 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 7 8 -1.</_>\n        <_>\n          3 16 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          8 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 7 -1.</_>\n        <_>\n          8 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 18 9 -1.</_>\n        <_>\n          2 9 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 16 2 -1.</_>\n        <_>\n          9 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 11 4 -1.</_>\n        <_>\n          5 4 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 10 8 -1.</_>\n        <_>\n          0 12 5 4 2.</_>\n        <_>\n          5 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 15 8 -1.</_>\n        <_>\n          8 1 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 15 8 -1.</_>\n        <_>\n          7 1 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 9 -1.</_>\n        <_>\n          3 7 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 15 5 -1.</_>\n        <_>\n          9 3 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 12 -1.</_>\n        <_>\n          0 8 20 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 4 -1.</_>\n        <_>\n          8 1 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 12 -1.</_>\n        <_>\n          0 8 20 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 4 9 -1.</_>\n        <_>\n          10 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 12 15 -1.</_>\n        <_>\n          6 1 4 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 10 3 -1.</_>\n        <_>\n          10 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 3 -1.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 14 -1.</_>\n        <_>\n          6 8 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 12 -1.</_>\n        <_>\n          6 6 3 6 2.</_>\n        <_>\n          9 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 4 9 -1.</_>\n        <_>\n          10 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 4 9 -1.</_>\n        <_>\n          8 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 5 -1.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 5 -1.</_>\n        <_>\n          9 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 9 6 -1.</_>\n        <_>\n          9 11 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 10 -1.</_>\n        <_>\n          5 2 3 5 2.</_>\n        <_>\n          8 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          14 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 9 18 -1.</_>\n        <_>\n          3 1 3 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 7 -1.</_>\n        <_>\n          6 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 10 -1.</_>\n        <_>\n          3 1 3 5 2.</_>\n        <_>\n          6 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 18 12 -1.</_>\n        <_>\n          1 3 9 6 2.</_>\n        <_>\n          10 9 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 13 3 -1.</_>\n        <_>\n          7 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 13 3 -1.</_>\n        <_>\n          1 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 7 6 -1.</_>\n        <_>\n          2 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 14 4 -1.</_>\n        <_>\n          13 16 7 2 2.</_>\n        <_>\n          6 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 14 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_>\n        <_>\n          7 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 8 -1.</_>\n        <_>\n          12 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 13 -1.</_>\n        <_>\n          7 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 3 10 -1.</_>\n        <_>\n          11 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 14 3 -1.</_>\n        <_>\n          1 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 6 -1.</_>\n        <_>\n          4 9 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 9 -1.</_>\n        <_>\n          6 11 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 12 4 -1.</_>\n        <_>\n          4 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 18 2 -1.</_>\n        <_>\n          1 13 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 8 -1.</_>\n        <_>\n          11 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 8 -1.</_>\n        <_>\n          5 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          12 6 5 3 2.</_>\n        <_>\n          7 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 9 6 -1.</_>\n        <_>\n          8 11 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 14 2 -1.</_>\n        <_>\n          4 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 9 6 -1.</_>\n        <_>\n          5 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 12 -1.</_>\n        <_>\n          17 1 3 6 2.</_>\n        <_>\n          14 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 12 -1.</_>\n        <_>\n          0 1 3 6 2.</_>\n        <_>\n          3 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 6 -1.</_>\n        <_>\n          12 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 2 -1.</_>\n        <_>\n          0 17 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 11 4 -1.</_>\n        <_>\n          5 18 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 13 3 -1.</_>\n        <_>\n          2 17 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 11 -1.</_>\n        <_>\n          16 9 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 8 6 -1.</_>\n        <_>\n          11 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 13 3 -1.</_>\n        <_>\n          0 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 4 8 -1.</_>\n        <_>\n          10 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 9 15 -1.</_>\n        <_>\n          8 5 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 7 -1.</_>\n        <_>\n          9 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 13 2 -1.</_>\n        <_>\n          0 16 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 8 6 -1.</_>\n        <_>\n          11 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          5 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 7 -1.</_>\n        <_>\n          11 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 7 -1.</_>\n        <_>\n          7 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 10 6 -1.</_>\n        <_>\n          11 11 5 3 2.</_>\n        <_>\n          6 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          6 10 4 4 2.</_>\n        <_>\n          10 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 8 6 -1.</_>\n        <_>\n          11 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 11 10 -1.</_>\n        <_>\n          4 9 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 8 6 -1.</_>\n        <_>\n          11 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 6 -1.</_>\n        <_>\n          1 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 3 -1.</_>\n        <_>\n          2 3 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 13 -1.</_>\n        <_>\n          18 1 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 5 6 -1.</_>\n        <_>\n          0 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 13 3 -1.</_>\n        <_>\n          5 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 7 -1.</_>\n        <_>\n          6 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          14 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 6 -1.</_>\n        <_>\n          0 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 8 -1.</_>\n        <_>\n          11 2 4 4 2.</_>\n        <_>\n          7 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 8 -1.</_>\n        <_>\n          5 2 4 4 2.</_>\n        <_>\n          9 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 4 16 -1.</_>\n        <_>\n          17 3 2 8 2.</_>\n        <_>\n          15 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 7 6 -1.</_>\n        <_>\n          1 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 13 3 -1.</_>\n        <_>\n          5 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 8 -1.</_>\n        <_>\n          4 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 6 -1.</_>\n        <_>\n          4 16 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 14 3 -1.</_>\n        <_>\n          1 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 13 -1.</_>\n        <_>\n          18 1 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          1 1 9 2 2.</_>\n        <_>\n          10 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 13 -1.</_>\n        <_>\n          18 1 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 13 -1.</_>\n        <_>\n          1 1 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 2 -1.</_>\n        <_>\n          2 0 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 12 -1.</_>\n        <_>\n          2 0 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          16 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 6 -1.</_>\n        <_>\n          0 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 7 -1.</_>\n        <_>\n          2 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 7 4 -1.</_>\n        <_>\n          7 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 13 3 -1.</_>\n        <_>\n          1 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 9 6 -1.</_>\n        <_>\n          9 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 14 3 -1.</_>\n        <_>\n          0 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 13 3 -1.</_>\n        <_>\n          5 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 8 -1.</_>\n        <_>\n          5 4 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 9 6 -1.</_>\n        <_>\n          9 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 6 -1.</_>\n        <_>\n          2 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 4 -1.</_>\n        <_>\n          13 6 7 2 2.</_>\n        <_>\n          6 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 16 4 -1.</_>\n        <_>\n          1 7 8 2 2.</_>\n        <_>\n          9 9 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 7 -1.</_>\n        <_>\n          8 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 5 -1.</_>\n        <_>\n          8 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 4 -1.</_>\n        <_>\n          8 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 13 -1.</_>\n        <_>\n          3 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 11 -1.</_>\n        <_>\n          16 7 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 4 11 -1.</_>\n        <_>\n          2 7 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 8 -1.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 3 -1.</_>\n        <_>\n          0 11 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 8 6 -1.</_>\n        <_>\n          11 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 13 -1.</_>\n        <_>\n          9 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 13 -1.</_>\n        <_>\n          10 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          9 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 18 -1.</_>\n        <_>\n          16 0 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 3 -1.</_>\n        <_>\n          3 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 13 3 -1.</_>\n        <_>\n          4 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 19 -1.</_>\n        <_>\n          2 0 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 20 -1.</_>\n        <_>\n          10 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 20 -1.</_>\n        <_>\n          5 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 10 10 -1.</_>\n        <_>\n          13 5 5 5 2.</_>\n        <_>\n          8 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 12 -1.</_>\n        <_>\n          1 8 3 6 2.</_>\n        <_>\n          4 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 13 -1.</_>\n        <_>\n          5 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 3 -1.</_>\n        <_>\n          4 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 19 -1.</_>\n        <_>\n          5 1 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 8 6 -1.</_>\n        <_>\n          1 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 13 3 -1.</_>\n        <_>\n          4 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 14 4 -1.</_>\n        <_>\n          0 6 7 2 2.</_>\n        <_>\n          7 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 16 -1.</_>\n        <_>\n          17 3 3 8 2.</_>\n        <_>\n          14 11 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 10 -1.</_>\n        <_>\n          1 4 9 5 2.</_>\n        <_>\n          10 9 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 16 -1.</_>\n        <_>\n          17 2 3 8 2.</_>\n        <_>\n          14 10 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 16 -1.</_>\n        <_>\n          0 2 3 8 2.</_>\n        <_>\n          3 10 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 12 -1.</_>\n        <_>\n          14 8 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 12 -1.</_>\n        <_>\n          3 8 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 5 -1.</_>\n        <_>\n          3 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 8 -1.</_>\n        <_>\n          8 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 8 -1.</_>\n        <_>\n          4 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 18 16 -1.</_>\n        <_>\n          8 4 6 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 7 -1.</_>\n        <_>\n          7 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 4 -1.</_>\n        <_>\n          9 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 10 4 -1.</_>\n        <_>\n          7 2 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          0 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 6 -1.</_>\n        <_>\n          1 16 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 13 -1.</_>\n        <_>\n          10 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 19 3 -1.</_>\n        <_>\n          1 2 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 13 2 -1.</_>\n        <_>\n          4 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 7 6 -1.</_>\n        <_>\n          13 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 7 6 -1.</_>\n        <_>\n          0 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 3 -1.</_>\n        <_>\n          4 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 13 3 -1.</_>\n        <_>\n          3 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 18 4 -1.</_>\n        <_>\n          10 15 9 2 2.</_>\n        <_>\n          1 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 10 -1.</_>\n        <_>\n          4 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 9 6 -1.</_>\n        <_>\n          14 14 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 10 -1.</_>\n        <_>\n          10 10 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 7 -1.</_>\n        <_>\n          6 6 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 7 -1.</_>\n        <_>\n          10 4 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 15 -1.</_>\n        <_>\n          9 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 12 12 -1.</_>\n        <_>\n          2 11 12 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 6 -1.</_>\n        <_>\n          4 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 9 9 -1.</_>\n        <_>\n          5 13 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 8 -1.</_>\n        <_>\n          0 12 4 4 2.</_>\n        <_>\n          4 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 6 9 -1.</_>\n        <_>\n          14 14 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 7 6 -1.</_>\n        <_>\n          5 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 14 -1.</_>\n        <_>\n          9 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 8 -1.</_>\n        <_>\n          8 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 14 -1.</_>\n        <_>\n          7 12 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 8 -1.</_>\n        <_>\n          6 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 6 9 -1.</_>\n        <_>\n          14 9 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 6 9 -1.</_>\n        <_>\n          4 9 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 15 4 -1.</_>\n        <_>\n          9 16 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 10 4 -1.</_>\n        <_>\n          8 2 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 12 -1.</_>\n        <_>\n          10 0 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 12 -1.</_>\n        <_>\n          8 0 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 7 -1.</_>\n        <_>\n          9 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 13 -1.</_>\n        <_>\n          6 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 5 9 -1.</_>\n        <_>\n          12 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 12 -1.</_>\n        <_>\n          5 10 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 20 -1.</_>\n        <_>\n          11 0 2 10 2.</_>\n        <_>\n          9 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 16 -1.</_>\n        <_>\n          8 0 2 8 2.</_>\n        <_>\n          10 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 11 -1.</_>\n        <_>\n          8 9 6 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 9 -1.</_>\n        <_>\n          0 14 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 6 12 -1.</_>\n        <_>\n          13 6 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 8 8 -1.</_>\n        <_>\n          6 12 4 4 2.</_>\n        <_>\n          10 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 8 -1.</_>\n        <_>\n          10 9 9 4 2.</_>\n        <_>\n          1 13 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 4 -1.</_>\n        <_>\n          6 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 6 12 -1.</_>\n        <_>\n          13 6 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 6 12 -1.</_>\n        <_>\n          4 6 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 13 3 -1.</_>\n        <_>\n          3 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 13 3 -1.</_>\n        <_>\n          7 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 14 -1.</_>\n        <_>\n          18 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 16 -1.</_>\n        <_>\n          0 8 20 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 14 4 -1.</_>\n        <_>\n          13 3 7 2 2.</_>\n        <_>\n          6 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 6 -1.</_>\n        <_>\n          0 2 10 3 2.</_>\n        <_>\n          10 5 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 14 -1.</_>\n        <_>\n          18 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 9 -1.</_>\n        <_>\n          7 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 7 -1.</_>\n        <_>\n          11 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 10 -1.</_>\n        <_>\n          7 7 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 2 -1.</_>\n        <_>\n          0 7 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 12 -1.</_>\n        <_>\n          3 4 7 6 2.</_>\n        <_>\n          10 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 7 -1.</_>\n        <_>\n          9 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 8 -1.</_>\n        <_>\n          8 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 10 -1.</_>\n        <_>\n          11 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 14 -1.</_>\n        <_>\n          7 2 6 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 8 -1.</_>\n        <_>\n          10 3 7 4 2.</_>\n        <_>\n          3 7 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 9 -1.</_>\n        <_>\n          6 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 11 -1.</_>\n        <_>\n          5 9 5 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 8 -1.</_>\n        <_>\n          5 7 5 4 2.</_>\n        <_>\n          10 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 16 -1.</_>\n        <_>\n          16 8 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 4 -1.</_>\n        <_>\n          10 4 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 14 3 -1.</_>\n        <_>\n          4 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 14 -1.</_>\n        <_>\n          18 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 7 6 -1.</_>\n        <_>\n          2 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 10 -1.</_>\n        <_>\n          16 1 3 5 2.</_>\n        <_>\n          13 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 10 -1.</_>\n        <_>\n          1 1 3 5 2.</_>\n        <_>\n          4 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 3 -1.</_>\n        <_>\n          3 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 13 3 -1.</_>\n        <_>\n          3 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 8 8 -1.</_>\n        <_>\n          15 4 4 4 2.</_>\n        <_>\n          11 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 13 3 -1.</_>\n        <_>\n          2 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 7 4 -1.</_>\n        <_>\n          11 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 14 2 -1.</_>\n        <_>\n          0 15 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 8 8 -1.</_>\n        <_>\n          15 4 4 4 2.</_>\n        <_>\n          11 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 9 -1.</_>\n        <_>\n          0 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 5 9 -1.</_>\n        <_>\n          3 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 9 -1.</_>\n        <_>\n          0 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 8 -1.</_>\n        <_>\n          15 0 5 4 2.</_>\n        <_>\n          10 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 6 -1.</_>\n        <_>\n          12 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 12 9 -1.</_>\n        <_>\n          0 7 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 4 -1.</_>\n        <_>\n          0 9 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 4 -1.</_>\n        <_>\n          10 2 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 7 -1.</_>\n        <_>\n          11 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 7 -1.</_>\n        <_>\n          8 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 9 7 -1.</_>\n        <_>\n          14 13 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 12 5 -1.</_>\n        <_>\n          10 15 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 8 -1.</_>\n        <_>\n          8 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 7 -1.</_>\n        <_>\n          7 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          8 5 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          9 5 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 9 -1.</_>\n        <_>\n          2 9 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 2 -1.</_>\n        <_>\n          3 9 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 15 -1.</_>\n        <_>\n          9 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 4 8 -1.</_>\n        <_>\n          7 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 11 -1.</_>\n        <_>\n          16 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 11 -1.</_>\n        <_>\n          2 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 8 10 -1.</_>\n        <_>\n          7 8 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 5 -1.</_>\n        <_>\n          7 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 8 4 -1.</_>\n        <_>\n          7 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 10 20 -1.</_>\n        <_>\n          1 0 5 10 2.</_>\n        <_>\n          6 10 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 10 -1.</_>\n        <_>\n          10 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 4 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 4 -1.</_>\n        <_>\n          10 7 9 2 2.</_>\n        <_>\n          1 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 10 6 -1.</_>\n        <_>\n          5 16 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 13 3 -1.</_>\n        <_>\n          7 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 7 6 -1.</_>\n        <_>\n          2 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 5 8 -1.</_>\n        <_>\n          11 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 5 8 -1.</_>\n        <_>\n          4 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 4 -1.</_>\n        <_>\n          10 12 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 9 6 -1.</_>\n        <_>\n          4 15 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 4 -1.</_>\n        <_>\n          10 12 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 10 4 -1.</_>\n        <_>\n          0 12 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 16 -1.</_>\n        <_>\n          16 8 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 15 -1.</_>\n        <_>\n          7 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 10 6 -1.</_>\n        <_>\n          14 10 5 3 2.</_>\n        <_>\n          9 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 14 -1.</_>\n        <_>\n          3 1 7 7 2.</_>\n        <_>\n          10 8 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 14 -1.</_>\n        <_>\n          18 5 2 7 2.</_>\n        <_>\n          16 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 14 -1.</_>\n        <_>\n          0 5 2 7 2.</_>\n        <_>\n          2 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 13 3 -1.</_>\n        <_>\n          5 3 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 17 2 -1.</_>\n        <_>\n          0 17 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 6 -1.</_>\n        <_>\n          2 12 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 2 -1.</_>\n        <_>\n          1 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 13 3 -1.</_>\n        <_>\n          5 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 9 -1.</_>\n        <_>\n          3 3 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 9 5 -1.</_>\n        <_>\n          9 4 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 6 -1.</_>\n        <_>\n          2 14 5 3 2.</_>\n        <_>\n          7 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 10 4 -1.</_>\n        <_>\n          10 1 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 18 15 -1.</_>\n        <_>\n          1 8 18 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 12 -1.</_>\n        <_>\n          14 2 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 5 -1.</_>\n        <_>\n          4 2 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 8 8 -1.</_>\n        <_>\n          16 5 4 4 2.</_>\n        <_>\n          12 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 13 3 -1.</_>\n        <_>\n          0 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 4 -1.</_>\n        <_>\n          12 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 17 3 -1.</_>\n        <_>\n          0 1 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 8 -1.</_>\n        <_>\n          6 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 7 4 -1.</_>\n        <_>\n          1 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 5 -1.</_>\n        <_>\n          8 9 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 15 3 -1.</_>\n        <_>\n          9 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 3 -1.</_>\n        <_>\n          6 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 13 3 -1.</_>\n        <_>\n          4 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 13 3 -1.</_>\n        <_>\n          0 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 7 4 -1.</_>\n        <_>\n          10 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 10 -1.</_>\n        <_>\n          13 9 3 5 2.</_>\n        <_>\n          10 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 5 -1.</_>\n        <_>\n          10 10 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 4 -1.</_>\n        <_>\n          10 1 8 2 2.</_>\n        <_>\n          2 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 6 -1.</_>\n        <_>\n          4 3 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 5 -1.</_>\n        <_>\n          10 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 5 -1.</_>\n        <_>\n          7 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 16 17 -1.</_>\n        <_>\n          2 3 8 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 8 8 -1.</_>\n        <_>\n          16 5 4 4 2.</_>\n        <_>\n          12 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 8 -1.</_>\n        <_>\n          0 5 4 4 2.</_>\n        <_>\n          4 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 16 -1.</_>\n        <_>\n          18 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 3 -1.</_>\n        <_>\n          8 0 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 15 3 -1.</_>\n        <_>\n          2 7 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 6 -1.</_>\n        <_>\n          2 14 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 13 -1.</_>\n        <_>\n          5 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 13 3 -1.</_>\n        <_>\n          5 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 13 -1.</_>\n        <_>\n          4 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 12 -1.</_>\n        <_>\n          10 5 5 6 2.</_>\n        <_>\n          5 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 12 -1.</_>\n        <_>\n          2 4 7 6 2.</_>\n        <_>\n          9 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 16 -1.</_>\n        <_>\n          18 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 5 -1.</_>\n        <_>\n          8 4 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 15 -1.</_>\n        <_>\n          16 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 15 -1.</_>\n        <_>\n          3 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 8 -1.</_>\n        <_>\n          8 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 16 -1.</_>\n        <_>\n          1 4 3 8 2.</_>\n        <_>\n          4 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 2 -1.</_>\n        <_>\n          3 1 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 14 -1.</_>\n        <_>\n          7 2 3 7 2.</_>\n        <_>\n          10 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 7 -1.</_>\n        <_>\n          12 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 16 -1.</_>\n        <_>\n          6 1 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 10 -1.</_>\n        <_>\n          6 7 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 13 -1.</_>\n        <_>\n          10 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 13 -1.</_>\n        <_>\n          10 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 14 6 -1.</_>\n        <_>\n          2 6 7 3 2.</_>\n        <_>\n          9 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 3 -1.</_>\n        <_>\n          7 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 3 -1.</_>\n        <_>\n          0 10 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 7 9 -1.</_>\n        <_>\n          9 8 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 13 2 -1.</_>\n        <_>\n          3 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 8 6 -1.</_>\n        <_>\n          9 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 7 4 -1.</_>\n        <_>\n          2 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 13 3 -1.</_>\n        <_>\n          6 18 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 7 6 -1.</_>\n        <_>\n          3 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 7 9 -1.</_>\n        <_>\n          9 8 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 7 9 -1.</_>\n        <_>\n          4 8 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 13 3 -1.</_>\n        <_>\n          5 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 12 -1.</_>\n        <_>\n          1 6 18 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 3 -1.</_>\n        <_>\n          4 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 8 -1.</_>\n        <_>\n          10 2 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 8 -1.</_>\n        <_>\n          8 2 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 16 -1.</_>\n        <_>\n          14 0 6 8 2.</_>\n        <_>\n          8 8 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 6 -1.</_>\n        <_>\n          6 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 4 -1.</_>\n        <_>\n          12 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 7 -1.</_>\n        <_>\n          3 0 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 7 -1.</_>\n        <_>\n          11 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 7 -1.</_>\n        <_>\n          8 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 17 6 -1.</_>\n        <_>\n          1 16 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 7 6 -1.</_>\n        <_>\n          2 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 13 3 -1.</_>\n        <_>\n          5 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 6 7 -1.</_>\n        <_>\n          7 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 7 -1.</_>\n        <_>\n          12 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 11 -1.</_>\n        <_>\n          7 9 6 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 7 -1.</_>\n        <_>\n          12 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 7 -1.</_>\n        <_>\n          6 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 9 9 -1.</_>\n        <_>\n          12 10 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 10 10 -1.</_>\n        <_>\n          0 10 5 5 2.</_>\n        <_>\n          5 15 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 6 5 -1.</_>\n        <_>\n          12 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 8 5 -1.</_>\n        <_>\n          5 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 14 2 -1.</_>\n        <_>\n          5 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 3 -1.</_>\n        <_>\n          7 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 8 -1.</_>\n        <_>\n          5 2 4 4 2.</_>\n        <_>\n          9 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 14 4 -1.</_>\n        <_>\n          13 16 7 2 2.</_>\n        <_>\n          6 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 14 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_>\n        <_>\n          7 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 4 -1.</_>\n        <_>\n          10 15 7 2 2.</_>\n        <_>\n          3 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 2 -1.</_>\n        <_>\n          10 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 14 6 -1.</_>\n        <_>\n          12 3 7 3 2.</_>\n        <_>\n          5 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 6 -1.</_>\n        <_>\n          5 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 2 -1.</_>\n        <_>\n          0 3 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 6 -1.</_>\n        <_>\n          6 3 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 13 2 -1.</_>\n        <_>\n          7 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 13 14 -1.</_>\n        <_>\n          0 12 13 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 8 -1.</_>\n        <_>\n          14 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 8 -1.</_>\n        <_>\n          0 0 10 4 2.</_>\n        <_>\n          10 4 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 18 -1.</_>\n        <_>\n          18 1 2 9 2.</_>\n        <_>\n          16 10 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 9 -1.</_>\n        <_>\n          3 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          10 10 3 5 2.</_>\n        <_>\n          7 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 12 -1.</_>\n        <_>\n          4 7 6 6 2.</_>\n        <_>\n          10 13 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 13 3 -1.</_>\n        <_>\n          7 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 6 -1.</_>\n        <_>\n          0 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 6 -1.</_>\n        <_>\n          0 2 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 6 -1.</_>\n        <_>\n          6 4 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 8 -1.</_>\n        <_>\n          0 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 9 5 -1.</_>\n        <_>\n          12 3 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          2 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 6 -1.</_>\n        <_>\n          4 5 5 3 2.</_>\n        <_>\n          9 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 6 -1.</_>\n        <_>\n          12 1 5 3 2.</_>\n        <_>\n          7 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 4 -1.</_>\n        <_>\n          0 2 9 2 2.</_>\n        <_>\n          9 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 2 17 -1.</_>\n        <_>\n          17 1 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 19 -1.</_>\n        <_>\n          2 0 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 4 -1.</_>\n        <_>\n          10 9 8 2 2.</_>\n        <_>\n          2 11 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 8 -1.</_>\n        <_>\n          1 6 9 4 2.</_>\n        <_>\n          10 10 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 4 -1.</_>\n        <_>\n          7 8 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 10 -1.</_>\n        <_>\n          5 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 6 -1.</_>\n        <_>\n          5 4 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 10 -1.</_>\n        <_>\n          7 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 6 -1.</_>\n        <_>\n          8 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 15 5 -1.</_>\n        <_>\n          6 6 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 12 -1.</_>\n        <_>\n          8 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 10 12 -1.</_>\n        <_>\n          1 8 5 6 2.</_>\n        <_>\n          6 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 5 6 -1.</_>\n        <_>\n          14 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 18 4 -1.</_>\n        <_>\n          0 12 9 2 2.</_>\n        <_>\n          9 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 18 12 -1.</_>\n        <_>\n          1 3 9 6 2.</_>\n        <_>\n          10 9 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 3 -1.</_>\n        <_>\n          7 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 9 6 -1.</_>\n        <_>\n          5 4 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 17 -1.</_>\n        <_>\n          15 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 3 -1.</_>\n        <_>\n          0 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 13 -1.</_>\n        <_>\n          10 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 13 -1.</_>\n        <_>\n          9 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 8 -1.</_>\n        <_>\n          9 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 2 17 -1.</_>\n        <_>\n          4 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 4 -1.</_>\n        <_>\n          11 0 9 2 2.</_>\n        <_>\n          2 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 4 -1.</_>\n        <_>\n          0 0 9 2 2.</_>\n        <_>\n          9 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 6 8 -1.</_>\n        <_>\n          13 12 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 8 -1.</_>\n        <_>\n          5 12 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 10 6 -1.</_>\n        <_>\n          12 12 5 3 2.</_>\n        <_>\n          7 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 14 -1.</_>\n        <_>\n          8 0 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 15 4 -1.</_>\n        <_>\n          9 3 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 15 4 -1.</_>\n        <_>\n          6 3 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 14 -1.</_>\n        <_>\n          15 5 2 7 2.</_>\n        <_>\n          13 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 14 -1.</_>\n        <_>\n          3 5 2 7 2.</_>\n        <_>\n          5 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 7 -1.</_>\n        <_>\n          11 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 7 -1.</_>\n        <_>\n          7 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 10 6 -1.</_>\n        <_>\n          12 12 5 3 2.</_>\n        <_>\n          7 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 10 6 -1.</_>\n        <_>\n          3 12 5 3 2.</_>\n        <_>\n          8 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 16 6 -1.</_>\n        <_>\n          11 4 8 3 2.</_>\n        <_>\n          3 7 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 7 -1.</_>\n        <_>\n          6 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 14 3 -1.</_>\n        <_>\n          6 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 7 -1.</_>\n        <_>\n          6 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 13 3 -1.</_>\n        <_>\n          5 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 7 -1.</_>\n        <_>\n          10 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 12 -1.</_>\n        <_>\n          5 4 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 18 -1.</_>\n        <_>\n          10 0 5 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 20 -1.</_>\n        <_>\n          5 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 9 -1.</_>\n        <_>\n          7 10 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 6 8 -1.</_>\n        <_>\n          8 12 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 14 2 -1.</_>\n        <_>\n          3 19 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 7 6 -1.</_>\n        <_>\n          1 8 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 7 4 -1.</_>\n        <_>\n          13 7 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 7 4 -1.</_>\n        <_>\n          0 7 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 11 15 -1.</_>\n        <_>\n          8 10 11 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 10 9 -1.</_>\n        <_>\n          8 9 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 13 3 -1.</_>\n        <_>\n          4 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 12 -1.</_>\n        <_>\n          7 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 8 -1.</_>\n        <_>\n          8 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 16 3 -1.</_>\n        <_>\n          10 16 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 5 -1.</_>\n        <_>\n          9 7 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 9 5 -1.</_>\n        <_>\n          8 7 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 13 2 -1.</_>\n        <_>\n          7 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 11 -1.</_>\n        <_>\n          7 5 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 10 -1.</_>\n        <_>\n          12 6 3 5 2.</_>\n        <_>\n          9 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 10 -1.</_>\n        <_>\n          5 6 3 5 2.</_>\n        <_>\n          8 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 8 -1.</_>\n        <_>\n          12 8 8 4 2.</_>\n        <_>\n          4 12 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 16 8 -1.</_>\n        <_>\n          0 8 8 4 2.</_>\n        <_>\n          8 12 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 10 -1.</_>\n        <_>\n          14 8 5 5 2.</_>\n        <_>\n          9 13 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 10 10 -1.</_>\n        <_>\n          1 8 5 5 2.</_>\n        <_>\n          6 13 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 9 16 -1.</_>\n        <_>\n          14 1 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 12 -1.</_>\n        <_>\n          6 4 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 8 -1.</_>\n        <_>\n          16 12 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 8 -1.</_>\n        <_>\n          2 12 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 10 3 -1.</_>\n        <_>\n          5 2 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 6 -1.</_>\n        <_>\n          6 6 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 12 -1.</_>\n        <_>\n          7 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 18 -1.</_>\n        <_>\n          12 1 2 9 2.</_>\n        <_>\n          10 10 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 14 -1.</_>\n        <_>\n          4 6 2 7 2.</_>\n        <_>\n          6 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 10 -1.</_>\n        <_>\n          13 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 14 12 -1.</_>\n        <_>\n          1 3 7 6 2.</_>\n        <_>\n          8 9 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 13 3 -1.</_>\n        <_>\n          0 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 9 -1.</_>\n        <_>\n          12 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 4 -1.</_>\n        <_>\n          1 14 9 2 2.</_>\n        <_>\n          10 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 14 -1.</_>\n        <_>\n          9 6 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 4 8 -1.</_>\n        <_>\n          10 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 12 -1.</_>\n        <_>\n          6 8 4 6 2.</_>\n        <_>\n          10 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          16 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 2 -1.</_>\n        <_>\n          9 0 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          16 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 7 6 -1.</_>\n        <_>\n          1 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 10 -1.</_>\n        <_>\n          12 5 3 5 2.</_>\n        <_>\n          9 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 7 -1.</_>\n        <_>\n          2 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 9 5 -1.</_>\n        <_>\n          9 1 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 13 2 -1.</_>\n        <_>\n          3 3 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 3 -1.</_>\n        <_>\n          4 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 7 -1.</_>\n        <_>\n          6 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 6 -1.</_>\n        <_>\n          12 1 5 3 2.</_>\n        <_>\n          7 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 3 -1.</_>\n        <_>\n          5 0 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 5 -1.</_>\n        <_>\n          9 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 12 -1.</_>\n        <_>\n          0 11 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 13 3 -1.</_>\n        <_>\n          6 18 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 15 5 -1.</_>\n        <_>\n          6 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 3 -1.</_>\n        <_>\n          1 9 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 11 -1.</_>\n        <_>\n          16 0 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 12 6 -1.</_>\n        <_>\n          3 1 6 3 2.</_>\n        <_>\n          9 4 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 6 -1.</_>\n        <_>\n          6 7 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 11 -1.</_>\n        <_>\n          2 0 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 5 12 -1.</_>\n        <_>\n          8 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 16 -1.</_>\n        <_>\n          1 4 3 8 2.</_>\n        <_>\n          4 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 10 -1.</_>\n        <_>\n          16 5 3 5 2.</_>\n        <_>\n          13 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 10 -1.</_>\n        <_>\n          1 5 3 5 2.</_>\n        <_>\n          4 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 8 -1.</_>\n        <_>\n          16 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          6 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 16 -1.</_>\n        <_>\n          6 9 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 6 7 -1.</_>\n        <_>\n          8 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 13 -1.</_>\n        <_>\n          7 1 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 10 -1.</_>\n        <_>\n          8 10 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 20 -1.</_>\n        <_>\n          4 0 4 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 6 -1.</_>\n        <_>\n          10 0 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 9 -1.</_>\n        <_>\n          5 5 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 8 -1.</_>\n        <_>\n          16 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 2 -1.</_>\n        <_>\n          10 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 5 -1.</_>\n        <_>\n          11 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 13 3 -1.</_>\n        <_>\n          3 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 8 -1.</_>\n        <_>\n          16 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 11 12 -1.</_>\n        <_>\n          0 7 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 9 5 -1.</_>\n        <_>\n          12 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 9 5 -1.</_>\n        <_>\n          6 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 8 -1.</_>\n        <_>\n          8 0 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 14 2 -1.</_>\n        <_>\n          0 16 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 10 3 -1.</_>\n        <_>\n          10 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 10 -1.</_>\n        <_>\n          7 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 3 -1.</_>\n        <_>\n          6 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 12 6 -1.</_>\n        <_>\n          4 11 6 3 2.</_>\n        <_>\n          10 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 16 6 -1.</_>\n        <_>\n          11 12 8 3 2.</_>\n        <_>\n          3 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 16 6 -1.</_>\n        <_>\n          1 12 8 3 2.</_>\n        <_>\n          9 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 6 -1.</_>\n        <_>\n          9 0 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 6 -1.</_>\n        <_>\n          6 0 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 3 -1.</_>\n        <_>\n          6 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 6 -1.</_>\n        <_>\n          5 3 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 17 -1.</_>\n        <_>\n          8 0 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 19 3 -1.</_>\n        <_>\n          1 10 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 18 -1.</_>\n        <_>\n          8 0 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 13 -1.</_>\n        <_>\n          9 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 6 -1.</_>\n        <_>\n          0 13 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 5 9 -1.</_>\n        <_>\n          10 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 13 3 -1.</_>\n        <_>\n          3 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 4 -1.</_>\n        <_>\n          13 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 14 -1.</_>\n        <_>\n          4 2 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 2 17 -1.</_>\n        <_>\n          12 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 9 -1.</_>\n        <_>\n          3 9 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 10 -1.</_>\n        <_>\n          14 3 3 5 2.</_>\n        <_>\n          11 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 13 -1.</_>\n        <_>\n          3 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 2 -1.</_>\n        <_>\n          4 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 13 -1.</_>\n        <_>\n          5 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          17 10 3 5 2.</_>\n        <_>\n          14 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 6 -1.</_>\n        <_>\n          0 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 2 17 -1.</_>\n        <_>\n          12 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 10 3 -1.</_>\n        <_>\n          5 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 5 9 -1.</_>\n        <_>\n          10 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 5 9 -1.</_>\n        <_>\n          5 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 13 3 -1.</_>\n        <_>\n          5 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 13 3 -1.</_>\n        <_>\n          2 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 16 9 -1.</_>\n        <_>\n          3 14 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 5 -1.</_>\n        <_>\n          8 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 16 -1.</_>\n        <_>\n          10 8 10 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 16 -1.</_>\n        <_>\n          0 8 10 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 13 -1.</_>\n        <_>\n          10 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 10 -1.</_>\n        <_>\n          6 0 3 5 2.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 10 -1.</_>\n        <_>\n          11 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 16 -1.</_>\n        <_>\n          0 0 2 8 2.</_>\n        <_>\n          2 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 13 -1.</_>\n        <_>\n          8 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          10 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 16 -1.</_>\n        <_>\n          0 4 2 8 2.</_>\n        <_>\n          2 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 3 -1.</_>\n        <_>\n          0 2 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 7 6 -1.</_>\n        <_>\n          5 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 10 -1.</_>\n        <_>\n          14 3 3 5 2.</_>\n        <_>\n          11 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 10 -1.</_>\n        <_>\n          3 3 3 5 2.</_>\n        <_>\n          6 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 6 -1.</_>\n        <_>\n          13 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 10 -1.</_>\n        <_>\n          6 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 16 -1.</_>\n        <_>\n          14 0 2 8 2.</_>\n        <_>\n          12 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 16 -1.</_>\n        <_>\n          4 0 2 8 2.</_>\n        <_>\n          6 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 15 7 -1.</_>\n        <_>\n          10 13 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 2 -1.</_>\n        <_>\n          0 8 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 5 -1.</_>\n        <_>\n          8 13 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 13 -1.</_>\n        <_>\n          9 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 6 12 -1.</_>\n        <_>\n          15 7 3 6 2.</_>\n        <_>\n          12 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 12 -1.</_>\n        <_>\n          2 7 3 6 2.</_>\n        <_>\n          5 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 6 -1.</_>\n        <_>\n          14 8 5 3 2.</_>\n        <_>\n          9 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 10 6 -1.</_>\n        <_>\n          1 8 5 3 2.</_>\n        <_>\n          6 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 13 3 -1.</_>\n        <_>\n          4 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 10 -1.</_>\n        <_>\n          0 13 20 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 15 7 -1.</_>\n        <_>\n          5 13 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 6 9 -1.</_>\n        <_>\n          9 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 9 8 -1.</_>\n        <_>\n          4 11 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 17 6 -1.</_>\n        <_>\n          2 15 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 7 6 -1.</_>\n        <_>\n          0 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 6 -1.</_>\n        <_>\n          13 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 8 -1.</_>\n        <_>\n          5 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 4 12 -1.</_>\n        <_>\n          13 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 12 -1.</_>\n        <_>\n          4 5 6 6 2.</_>\n        <_>\n          10 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 6 -1.</_>\n        <_>\n          10 5 5 3 2.</_>\n        <_>\n          5 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 14 8 -1.</_>\n        <_>\n          3 5 7 4 2.</_>\n        <_>\n          10 9 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 9 -1.</_>\n        <_>\n          5 9 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 14 4 -1.</_>\n        <_>\n          2 10 7 2 2.</_>\n        <_>\n          9 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 8 4 -1.</_>\n        <_>\n          12 11 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 8 4 -1.</_>\n        <_>\n          0 11 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 8 4 -1.</_>\n        <_>\n          8 10 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 13 3 -1.</_>\n        <_>\n          2 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 12 17 -1.</_>\n        <_>\n          12 2 4 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 17 -1.</_>\n        <_>\n          4 2 4 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 8 -1.</_>\n        <_>\n          11 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 20 -1.</_>\n        <_>\n          5 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 14 6 -1.</_>\n        <_>\n          12 14 7 3 2.</_>\n        <_>\n          5 17 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 14 6 -1.</_>\n        <_>\n          0 14 7 3 2.</_>\n        <_>\n          7 17 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 10 6 -1.</_>\n        <_>\n          9 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 5 6 -1.</_>\n        <_>\n          1 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 13 -1.</_>\n        <_>\n          12 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 13 -1.</_>\n        <_>\n          7 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 5 -1.</_>\n        <_>\n          9 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 9 -1.</_>\n        <_>\n          7 4 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 8 -1.</_>\n        <_>\n          11 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 8 -1.</_>\n        <_>\n          6 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 12 -1.</_>\n        <_>\n          9 7 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 12 -1.</_>\n        <_>\n          10 3 7 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 4 -1.</_>\n        <_>\n          12 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 20 -1.</_>\n        <_>\n          1 0 4 10 2.</_>\n        <_>\n          5 10 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 4 -1.</_>\n        <_>\n          12 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 10 5 -1.</_>\n        <_>\n          5 2 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 8 -1.</_>\n        <_>\n          12 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 4 -1.</_>\n        <_>\n          0 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 5 10 -1.</_>\n        <_>\n          15 14 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 10 -1.</_>\n        <_>\n          0 14 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 10 6 -1.</_>\n        <_>\n          9 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 10 6 -1.</_>\n        <_>\n          1 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 3 -1.</_>\n        <_>\n          6 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 9 -1.</_>\n        <_>\n          6 11 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 20 -1.</_>\n        <_>\n          10 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 20 -1.</_>\n        <_>\n          5 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 12 -1.</_>\n        <_>\n          7 12 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 3 -1.</_>\n        <_>\n          1 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 2 -1.</_>\n        <_>\n          3 9 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 7 6 -1.</_>\n        <_>\n          0 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 10 4 -1.</_>\n        <_>\n          5 18 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          0 10 3 5 2.</_>\n        <_>\n          3 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 2 17 -1.</_>\n        <_>\n          12 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 13 2 -1.</_>\n        <_>\n          7 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 10 6 -1.</_>\n        <_>\n          3 9 5 3 2.</_>\n        <_>\n          8 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 10 -1.</_>\n        <_>\n          12 9 3 5 2.</_>\n        <_>\n          9 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 12 -1.</_>\n        <_>\n          2 6 8 6 2.</_>\n        <_>\n          10 12 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 7 6 -1.</_>\n        <_>\n          13 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 4 -1.</_>\n        <_>\n          3 6 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 2 -1.</_>\n        <_>\n          7 2 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 3 -1.</_>\n        <_>\n          3 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 15 6 -1.</_>\n        <_>\n          7 1 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 14 3 -1.</_>\n        <_>\n          0 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 14 -1.</_>\n        <_>\n          11 6 2 7 2.</_>\n        <_>\n          9 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 19 2 -1.</_>\n        <_>\n          0 9 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 8 -1.</_>\n        <_>\n          8 11 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 11 -1.</_>\n        <_>\n          9 5 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 13 -1.</_>\n        <_>\n          9 3 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 12 6 -1.</_>\n        <_>\n          0 3 6 3 2.</_>\n        <_>\n          6 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 2 -1.</_>\n        <_>\n          3 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 6 7 -1.</_>\n        <_>\n          6 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 5 6 -1.</_>\n        <_>\n          15 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 6 -1.</_>\n        <_>\n          8 1 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 8 -1.</_>\n        <_>\n          10 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 12 5 -1.</_>\n        <_>\n          9 1 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 7 6 -1.</_>\n        <_>\n          13 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 7 6 -1.</_>\n        <_>\n          0 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 9 -1.</_>\n        <_>\n          14 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          0 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 8 -1.</_>\n        <_>\n          6 4 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 8 -1.</_>\n        <_>\n          0 5 4 4 2.</_>\n        <_>\n          4 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 12 -1.</_>\n        <_>\n          11 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 5 6 -1.</_>\n        <_>\n          4 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 11 8 -1.</_>\n        <_>\n          7 9 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 5 -1.</_>\n        <_>\n          8 2 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 10 8 -1.</_>\n        <_>\n          10 12 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 10 8 -1.</_>\n        <_>\n          5 12 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 7 -1.</_>\n        <_>\n          15 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 7 -1.</_>\n        <_>\n          3 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 4 -1.</_>\n        <_>\n          10 2 10 2 2.</_>\n        <_>\n          0 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 9 -1.</_>\n        <_>\n          1 3 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 9 4 -1.</_>\n        <_>\n          10 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 11 4 -1.</_>\n        <_>\n          1 8 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 12 4 -1.</_>\n        <_>\n          4 10 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 10 -1.</_>\n        <_>\n          4 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 3 10 -1.</_>\n        <_>\n          3 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 17 -1.</_>\n        <_>\n          18 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 13 2 -1.</_>\n        <_>\n          0 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 17 -1.</_>\n        <_>\n          18 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 17 -1.</_>\n        <_>\n          1 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 6 -1.</_>\n        <_>\n          2 2 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 13 -1.</_>\n        <_>\n          8 5 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 12 16 -1.</_>\n        <_>\n          7 3 6 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 16 2 -1.</_>\n        <_>\n          8 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 8 12 -1.</_>\n        <_>\n          11 10 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 7 -1.</_>\n        <_>\n          3 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 12 -1.</_>\n        <_>\n          16 0 4 6 2.</_>\n        <_>\n          12 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 10 -1.</_>\n        <_>\n          5 6 5 5 2.</_>\n        <_>\n          10 11 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 2 18 -1.</_>\n        <_>\n          10 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 8 -1.</_>\n        <_>\n          4 9 6 4 2.</_>\n        <_>\n          10 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 13 -1.</_>\n        <_>\n          18 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 4 -1.</_>\n        <_>\n          6 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 13 -1.</_>\n        <_>\n          18 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 2 17 -1.</_>\n        <_>\n          7 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 8 -1.</_>\n        <_>\n          11 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 8 -1.</_>\n        <_>\n          7 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 13 -1.</_>\n        <_>\n          18 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 13 -1.</_>\n        <_>\n          1 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 2 -1.</_>\n        <_>\n          0 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 13 3 -1.</_>\n        <_>\n          0 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 6 -1.</_>\n        <_>\n          11 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 8 6 -1.</_>\n        <_>\n          2 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 14 8 -1.</_>\n        <_>\n          12 4 7 4 2.</_>\n        <_>\n          5 8 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          4 5 6 3 2.</_>\n        <_>\n          10 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          10 10 4 4 2.</_>\n        <_>\n          6 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 9 5 -1.</_>\n        <_>\n          8 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 6 -1.</_>\n        <_>\n          6 6 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 5 -1.</_>\n        <_>\n          8 9 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 10 4 -1.</_>\n        <_>\n          10 1 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 18 -1.</_>\n        <_>\n          15 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 9 15 -1.</_>\n        <_>\n          4 2 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 4 -1.</_>\n        <_>\n          7 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 5 -1.</_>\n        <_>\n          9 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 15 2 -1.</_>\n        <_>\n          4 3 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 13 3 -1.</_>\n        <_>\n          1 18 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 8 -1.</_>\n        <_>\n          6 10 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 5 9 -1.</_>\n        <_>\n          4 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 10 -1.</_>\n        <_>\n          13 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 10 -1.</_>\n        <_>\n          2 9 6 5 2.</_>\n        <_>\n          8 14 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 15 3 -1.</_>\n        <_>\n          8 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 12 -1.</_>\n        <_>\n          1 0 4 6 2.</_>\n        <_>\n          5 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 7 6 -1.</_>\n        <_>\n          13 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 5 10 -1.</_>\n        <_>\n          5 14 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 7 6 -1.</_>\n        <_>\n          13 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 7 6 -1.</_>\n        <_>\n          0 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 13 -1.</_>\n        <_>\n          10 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 6 -1.</_>\n        <_>\n          0 7 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 10 12 -1.</_>\n        <_>\n          9 9 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 7 6 -1.</_>\n        <_>\n          1 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 13 2 -1.</_>\n        <_>\n          7 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 8 -1.</_>\n        <_>\n          5 9 5 4 2.</_>\n        <_>\n          10 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 5 9 -1.</_>\n        <_>\n          11 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 8 -1.</_>\n        <_>\n          6 3 4 4 2.</_>\n        <_>\n          10 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 13 -1.</_>\n        <_>\n          9 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 7 -1.</_>\n        <_>\n          6 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 9 4 -1.</_>\n        <_>\n          11 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 5 -1.</_>\n        <_>\n          8 9 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 8 4 -1.</_>\n        <_>\n          12 17 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 8 4 -1.</_>\n        <_>\n          0 17 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 3 -1.</_>\n        <_>\n          0 12 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 16 -1.</_>\n        <_>\n          1 0 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 11 -1.</_>\n        <_>\n          3 2 7 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 8 6 -1.</_>\n        <_>\n          4 5 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 6 -1.</_>\n        <_>\n          3 2 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 13 3 -1.</_>\n        <_>\n          1 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 6 -1.</_>\n        <_>\n          1 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 5 6 -1.</_>\n        <_>\n          15 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 13 3 -1.</_>\n        <_>\n          3 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 7 6 -1.</_>\n        <_>\n          0 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 6 -1.</_>\n        <_>\n          10 6 8 3 2.</_>\n        <_>\n          2 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 3 10 -1.</_>\n        <_>\n          2 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 5 6 -1.</_>\n        <_>\n          15 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 6 -1.</_>\n        <_>\n          5 7 5 3 2.</_>\n        <_>\n          10 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 5 6 -1.</_>\n        <_>\n          15 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 5 6 -1.</_>\n        <_>\n          0 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 9 15 -1.</_>\n        <_>\n          10 10 9 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 9 5 -1.</_>\n        <_>\n          8 7 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 6 -1.</_>\n        <_>\n          13 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 13 3 -1.</_>\n        <_>\n          3 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 6 -1.</_>\n        <_>\n          13 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 7 6 -1.</_>\n        <_>\n          0 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 10 18 -1.</_>\n        <_>\n          10 1 5 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 18 -1.</_>\n        <_>\n          5 1 5 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 5 -1.</_>\n        <_>\n          8 1 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 8 -1.</_>\n        <_>\n          4 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 3 10 -1.</_>\n        <_>\n          9 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 14 4 -1.</_>\n        <_>\n          2 10 7 2 2.</_>\n        <_>\n          9 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 9 5 -1.</_>\n        <_>\n          12 11 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 4 -1.</_>\n        <_>\n          3 11 7 2 2.</_>\n        <_>\n          10 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 4 -1.</_>\n        <_>\n          10 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 13 -1.</_>\n        <_>\n          9 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 14 -1.</_>\n        <_>\n          7 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 4 -1.</_>\n        <_>\n          10 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 4 -1.</_>\n        <_>\n          4 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 13 -1.</_>\n        <_>\n          14 0 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 11 -1.</_>\n        <_>\n          3 1 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 9 5 -1.</_>\n        <_>\n          12 11 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 9 5 -1.</_>\n        <_>\n          5 11 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 7 -1.</_>\n        <_>\n          9 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 15 -1.</_>\n        <_>\n          2 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 2 15 -1.</_>\n        <_>\n          12 2 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 15 -1.</_>\n        <_>\n          7 2 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 13 2 -1.</_>\n        <_>\n          6 1 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 13 3 -1.</_>\n        <_>\n          0 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 7 -1.</_>\n        <_>\n          10 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 7 -1.</_>\n        <_>\n          7 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 4 -1.</_>\n        <_>\n          10 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 8 4 -1.</_>\n        <_>\n          6 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 13 2 -1.</_>\n        <_>\n          7 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 15 -1.</_>\n        <_>\n          8 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 11 8 -1.</_>\n        <_>\n          5 4 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 8 14 -1.</_>\n        <_>\n          6 3 4 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 6 -1.</_>\n        <_>\n          15 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 6 -1.</_>\n        <_>\n          0 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 7 -1.</_>\n        <_>\n          8 4 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          10 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 19 -1.</_>\n        <_>\n          14 0 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 19 -1.</_>\n        <_>\n          5 0 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 6 7 -1.</_>\n        <_>\n          13 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 3 -1.</_>\n        <_>\n          7 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 5 8 -1.</_>\n        <_>\n          8 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 16 -1.</_>\n        <_>\n          6 10 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 9 -1.</_>\n        <_>\n          8 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 7 4 -1.</_>\n        <_>\n          2 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 7 4 -1.</_>\n        <_>\n          8 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 5 12 -1.</_>\n        <_>\n          7 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 4 -1.</_>\n        <_>\n          3 6 7 2 2.</_>\n        <_>\n          10 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 10 -1.</_>\n        <_>\n          11 4 3 5 2.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 10 -1.</_>\n        <_>\n          7 4 3 5 2.</_>\n        <_>\n          10 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 13 2 -1.</_>\n        <_>\n          7 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 7 6 -1.</_>\n        <_>\n          0 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 15 -1.</_>\n        <_>\n          14 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 14 3 -1.</_>\n        <_>\n          0 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 15 -1.</_>\n        <_>\n          1 9 18 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 13 3 -1.</_>\n        <_>\n          0 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 14 -1.</_>\n        <_>\n          5 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 6 -1.</_>\n        <_>\n          12 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 18 4 -1.</_>\n        <_>\n          1 15 9 2 2.</_>\n        <_>\n          10 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 8 6 -1.</_>\n        <_>\n          10 15 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 13 -1.</_>\n        <_>\n          8 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 7 6 -1.</_>\n        <_>\n          12 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 7 6 -1.</_>\n        <_>\n          1 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 18 -1.</_>\n        <_>\n          13 0 5 9 2.</_>\n        <_>\n          8 9 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 18 3 -1.</_>\n        <_>\n          6 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 10 6 -1.</_>\n        <_>\n          15 4 5 3 2.</_>\n        <_>\n          10 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 16 4 -1.</_>\n        <_>\n          10 8 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 12 -1.</_>\n        <_>\n          10 4 6 6 2.</_>\n        <_>\n          4 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 3 -1.</_>\n        <_>\n          10 0 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 10 -1.</_>\n        <_>\n          11 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 5 15 -1.</_>\n        <_>\n          2 9 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 2 14 -1.</_>\n        <_>\n          17 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 14 -1.</_>\n        <_>\n          1 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 10 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_>\n        <_>\n          10 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 10 6 -1.</_>\n        <_>\n          0 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 3 -1.</_>\n        <_>\n          2 11 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 7 4 -1.</_>\n        <_>\n          0 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 6 -1.</_>\n        <_>\n          2 2 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 15 3 -1.</_>\n        <_>\n          7 17 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 6 7 -1.</_>\n        <_>\n          12 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 6 7 -1.</_>\n        <_>\n          5 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 13 -1.</_>\n        <_>\n          14 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 8 -1.</_>\n        <_>\n          7 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          8 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 6 5 -1.</_>\n        <_>\n          8 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 13 -1.</_>\n        <_>\n          14 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 13 -1.</_>\n        <_>\n          5 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 9 -1.</_>\n        <_>\n          6 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 4 -1.</_>\n        <_>\n          13 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 13 3 -1.</_>\n        <_>\n          0 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 12 -1.</_>\n        <_>\n          6 11 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 14 4 -1.</_>\n        <_>\n          2 2 7 2 2.</_>\n        <_>\n          9 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 2 13 -1.</_>\n        <_>\n          10 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 13 -1.</_>\n        <_>\n          9 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 4 -1.</_>\n        <_>\n          13 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 7 6 -1.</_>\n        <_>\n          6 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 4 -1.</_>\n        <_>\n          0 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 6 -1.</_>\n        <_>\n          8 12 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 10 -1.</_>\n        <_>\n          8 6 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 14 6 -1.</_>\n        <_>\n          2 2 7 3 2.</_>\n        <_>\n          9 5 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 7 -1.</_>\n        <_>\n          5 0 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 5 -1.</_>\n        <_>\n          10 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 18 -1.</_>\n        <_>\n          13 0 5 9 2.</_>\n        <_>\n          8 9 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 14 6 -1.</_>\n        <_>\n          2 5 7 3 2.</_>\n        <_>\n          9 8 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 10 -1.</_>\n        <_>\n          10 1 3 5 2.</_>\n        <_>\n          7 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 14 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_>\n        <_>\n          7 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 10 6 -1.</_>\n        <_>\n          14 9 5 3 2.</_>\n        <_>\n          9 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 10 -1.</_>\n        <_>\n          2 13 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 19 2 -1.</_>\n        <_>\n          1 11 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 6 -1.</_>\n        <_>\n          4 12 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 12 -1.</_>\n        <_>\n          9 11 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 13 3 -1.</_>\n        <_>\n          0 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 7 6 -1.</_>\n        <_>\n          10 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 7 6 -1.</_>\n        <_>\n          3 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 15 -1.</_>\n        <_>\n          15 5 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 17 10 -1.</_>\n        <_>\n          0 8 17 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 4 -1.</_>\n        <_>\n          10 0 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 10 6 -1.</_>\n        <_>\n          11 1 5 3 2.</_>\n        <_>\n          6 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 11 -1.</_>\n        <_>\n          6 9 6 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 3 -1.</_>\n        <_>\n          4 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 6 -1.</_>\n        <_>\n          0 12 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 10 -1.</_>\n        <_>\n          13 9 3 5 2.</_>\n        <_>\n          10 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          7 10 3 5 2.</_>\n        <_>\n          10 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 15 -1.</_>\n        <_>\n          6 6 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 3 -1.</_>\n        <_>\n          0 9 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 10 -1.</_>\n        <_>\n          3 10 3 5 2.</_>\n        <_>\n          6 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 8 12 -1.</_>\n        <_>\n          15 8 4 6 2.</_>\n        <_>\n          11 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 8 12 -1.</_>\n        <_>\n          1 8 4 6 2.</_>\n        <_>\n          5 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 3 13 -1.</_>\n        <_>\n          14 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 5 9 -1.</_>\n        <_>\n          6 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 5 -1.</_>\n        <_>\n          7 14 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 8 -1.</_>\n        <_>\n          2 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 6 -1.</_>\n        <_>\n          5 3 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          10 9 4 4 2.</_>\n        <_>\n          6 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 13 -1.</_>\n        <_>\n          13 5 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 10 -1.</_>\n        <_>\n          5 9 3 5 2.</_>\n        <_>\n          8 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 3 -1.</_>\n        <_>\n          8 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 13 -1.</_>\n        <_>\n          6 5 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 10 -1.</_>\n        <_>\n          11 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 10 -1.</_>\n        <_>\n          7 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 15 14 -1.</_>\n        <_>\n          9 2 5 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 15 14 -1.</_>\n        <_>\n          6 2 5 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 9 -1.</_>\n        <_>\n          5 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 10 8 -1.</_>\n        <_>\n          1 3 5 4 2.</_>\n        <_>\n          6 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 14 6 -1.</_>\n        <_>\n          5 13 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 14 6 -1.</_>\n        <_>\n          8 13 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 13 3 -1.</_>\n        <_>\n          7 3 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 2 -1.</_>\n        <_>\n          10 7 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 6 -1.</_>\n        <_>\n          10 0 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 6 -1.</_>\n        <_>\n          5 0 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 8 13 -1.</_>\n        <_>\n          12 1 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 13 -1.</_>\n        <_>\n          4 1 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 18 -1.</_>\n        <_>\n          15 0 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 4 -1.</_>\n        <_>\n          8 0 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 18 -1.</_>\n        <_>\n          15 0 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 18 -1.</_>\n        <_>\n          3 0 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 6 -1.</_>\n        <_>\n          8 12 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 5 -1.</_>\n        <_>\n          5 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 12 -1.</_>\n        <_>\n          12 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 11 6 -1.</_>\n        <_>\n          4 6 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 5 6 -1.</_>\n        <_>\n          11 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 8 -1.</_>\n        <_>\n          5 6 4 4 2.</_>\n        <_>\n          9 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 8 -1.</_>\n        <_>\n          10 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 8 4 -1.</_>\n        <_>\n          6 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 7 -1.</_>\n        <_>\n          10 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 13 2 -1.</_>\n        <_>\n          1 10 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 7 -1.</_>\n        <_>\n          10 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 7 -1.</_>\n        <_>\n          8 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 7 14 -1.</_>\n        <_>\n          9 12 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 17 2 -1.</_>\n        <_>\n          0 1 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 8 -1.</_>\n        <_>\n          10 9 5 4 2.</_>\n        <_>\n          5 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 6 -1.</_>\n        <_>\n          3 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 7 6 -1.</_>\n        <_>\n          7 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 13 2 -1.</_>\n        <_>\n          3 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 5 6 -1.</_>\n        <_>\n          10 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 14 -1.</_>\n        <_>\n          6 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 4 8 -1.</_>\n        <_>\n          12 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 8 -1.</_>\n        <_>\n          4 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          14 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 4 14 -1.</_>\n        <_>\n          1 4 2 7 2.</_>\n        <_>\n          3 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 20 -1.</_>\n        <_>\n          12 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 5 -1.</_>\n        <_>\n          3 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 5 -1.</_>\n        <_>\n          9 2 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 7 -1.</_>\n        <_>\n          2 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 20 -1.</_>\n        <_>\n          12 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 14 -1.</_>\n        <_>\n          2 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 20 -1.</_>\n        <_>\n          12 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 20 -1.</_>\n        <_>\n          7 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 7 -1.</_>\n        <_>\n          16 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 7 -1.</_>\n        <_>\n          2 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 13 -1.</_>\n        <_>\n          14 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 14 -1.</_>\n        <_>\n          7 1 6 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 13 -1.</_>\n        <_>\n          11 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 16 4 -1.</_>\n        <_>\n          12 10 8 2 2.</_>\n        <_>\n          4 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 4 -1.</_>\n        <_>\n          0 10 9 2 2.</_>\n        <_>\n          9 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 10 6 -1.</_>\n        <_>\n          13 14 5 3 2.</_>\n        <_>\n          8 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 14 6 -1.</_>\n        <_>\n          1 4 7 3 2.</_>\n        <_>\n          8 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 10 -1.</_>\n        <_>\n          11 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 9 10 -1.</_>\n        <_>\n          5 8 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 10 -1.</_>\n        <_>\n          11 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 10 -1.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 20 -1.</_>\n        <_>\n          6 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 8 -1.</_>\n        <_>\n          11 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 8 -1.</_>\n        <_>\n          7 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 8 -1.</_>\n        <_>\n          8 7 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 4 -1.</_>\n        <_>\n          0 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 10 -1.</_>\n        <_>\n          11 0 8 5 2.</_>\n        <_>\n          3 5 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 2 -1.</_>\n        <_>\n          0 3 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 13 -1.</_>\n        <_>\n          9 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 8 -1.</_>\n        <_>\n          0 0 4 4 2.</_>\n        <_>\n          4 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 4 -1.</_>\n        <_>\n          10 15 7 2 2.</_>\n        <_>\n          3 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 8 8 -1.</_>\n        <_>\n          4 1 4 4 2.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 13 3 -1.</_>\n        <_>\n          7 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 13 3 -1.</_>\n        <_>\n          0 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          0 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 13 2 -1.</_>\n        <_>\n          6 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 5 9 -1.</_>\n        <_>\n          4 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 7 6 -1.</_>\n        <_>\n          7 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 7 -1.</_>\n        <_>\n          2 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 13 2 -1.</_>\n        <_>\n          5 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 14 4 -1.</_>\n        <_>\n          0 7 7 2 2.</_>\n        <_>\n          7 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 16 -1.</_>\n        <_>\n          17 4 2 8 2.</_>\n        <_>\n          15 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 6 -1.</_>\n        <_>\n          0 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 12 -1.</_>\n        <_>\n          17 7 3 6 2.</_>\n        <_>\n          14 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 12 4 -1.</_>\n        <_>\n          7 16 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          8 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 15 5 -1.</_>\n        <_>\n          7 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 3 -1.</_>\n        <_>\n          1 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 12 -1.</_>\n        <_>\n          10 0 3 6 2.</_>\n        <_>\n          7 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 10 -1.</_>\n        <_>\n          8 3 4 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 10 -1.</_>\n        <_>\n          8 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 8 -1.</_>\n        <_>\n          0 7 20 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 12 -1.</_>\n        <_>\n          0 7 3 6 2.</_>\n        <_>\n          3 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 2 14 -1.</_>\n        <_>\n          12 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          0 10 3 5 2.</_>\n        <_>\n          3 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 8 -1.</_>\n        <_>\n          2 0 8 4 2.</_>\n        <_>\n          10 4 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 7 9 -1.</_>\n        <_>\n          9 8 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 8 -1.</_>\n        <_>\n          0 12 4 4 2.</_>\n        <_>\n          4 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 16 4 -1.</_>\n        <_>\n          0 10 8 2 2.</_>\n        <_>\n          8 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 4 -1.</_>\n        <_>\n          10 2 10 2 2.</_>\n        <_>\n          0 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 14 -1.</_>\n        <_>\n          3 5 2 7 2.</_>\n        <_>\n          5 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 11 9 -1.</_>\n        <_>\n          5 13 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 4 9 -1.</_>\n        <_>\n          4 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 3 -1.</_>\n        <_>\n          3 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 4 15 -1.</_>\n        <_>\n          3 9 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 13 3 -1.</_>\n        <_>\n          7 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 7 -1.</_>\n        <_>\n          14 0 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 7 -1.</_>\n        <_>\n          3 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 17 -1.</_>\n        <_>\n          14 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 13 -1.</_>\n        <_>\n          10 4 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 9 -1.</_>\n        <_>\n          10 6 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 12 9 -1.</_>\n        <_>\n          6 6 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 4 -1.</_>\n        <_>\n          10 14 7 2 2.</_>\n        <_>\n          3 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 13 4 -1.</_>\n        <_>\n          3 5 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 10 6 -1.</_>\n        <_>\n          10 16 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 11 6 -1.</_>\n        <_>\n          0 16 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 17 -1.</_>\n        <_>\n          5 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 3 17 -1.</_>\n        <_>\n          14 3 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 9 -1.</_>\n        <_>\n          7 0 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 9 6 -1.</_>\n        <_>\n          12 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 17 -1.</_>\n        <_>\n          5 3 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 14 3 -1.</_>\n        <_>\n          6 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 13 3 -1.</_>\n        <_>\n          2 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 15 3 -1.</_>\n        <_>\n          5 15 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 6 -1.</_>\n        <_>\n          7 10 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 10 -1.</_>\n        <_>\n          8 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 14 2 -1.</_>\n        <_>\n          5 9 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 13 3 -1.</_>\n        <_>\n          0 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 17 6 -1.</_>\n        <_>\n          3 15 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 4 -1.</_>\n        <_>\n          6 17 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 2 -1.</_>\n        <_>\n          6 8 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 8 -1.</_>\n        <_>\n          6 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 13 3 -1.</_>\n        <_>\n          5 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 10 -1.</_>\n        <_>\n          0 0 3 5 2.</_>\n        <_>\n          3 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 4 -1.</_>\n        <_>\n          12 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 14 -1.</_>\n        <_>\n          6 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 7 -1.</_>\n        <_>\n          14 0 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 4 -1.</_>\n        <_>\n          4 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 7 -1.</_>\n        <_>\n          14 0 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 7 -1.</_>\n        <_>\n          3 0 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 16 4 -1.</_>\n        <_>\n          10 13 8 2 2.</_>\n        <_>\n          2 15 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 7 6 -1.</_>\n        <_>\n          0 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 8 -1.</_>\n        <_>\n          5 4 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 14 -1.</_>\n        <_>\n          5 9 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 13 2 -1.</_>\n        <_>\n          7 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 13 3 -1.</_>\n        <_>\n          1 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 3 -1.</_>\n        <_>\n          4 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 4 -1.</_>\n        <_>\n          5 2 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 3 -1.</_>\n        <_>\n          9 0 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          8 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          6 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 8 4 -1.</_>\n        <_>\n          11 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 18 15 -1.</_>\n        <_>\n          0 8 18 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 8 -1.</_>\n        <_>\n          2 13 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 7 4 -1.</_>\n        <_>\n          0 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 12 -1.</_>\n        <_>\n          10 5 6 6 2.</_>\n        <_>\n          4 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 9 5 -1.</_>\n        <_>\n          8 12 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 16 -1.</_>\n        <_>\n          18 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 16 -1.</_>\n        <_>\n          0 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 13 3 -1.</_>\n        <_>\n          0 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 10 -1.</_>\n        <_>\n          17 7 3 5 2.</_>\n        <_>\n          14 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 6 -1.</_>\n        <_>\n          0 2 6 3 2.</_>\n        <_>\n          6 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 10 -1.</_>\n        <_>\n          15 0 5 5 2.</_>\n        <_>\n          10 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 10 -1.</_>\n        <_>\n          0 0 5 5 2.</_>\n        <_>\n          5 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 4 -1.</_>\n        <_>\n          11 7 9 2 2.</_>\n        <_>\n          2 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 14 -1.</_>\n        <_>\n          5 3 3 7 2.</_>\n        <_>\n          8 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 13 -1.</_>\n        <_>\n          10 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 10 -1.</_>\n        <_>\n          0 7 3 5 2.</_>\n        <_>\n          3 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 13 -1.</_>\n        <_>\n          14 4 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 8 4 -1.</_>\n        <_>\n          5 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 15 5 -1.</_>\n        <_>\n          10 15 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 13 -1.</_>\n        <_>\n          9 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 13 3 -1.</_>\n        <_>\n          7 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 8 -1.</_>\n        <_>\n          2 0 8 4 2.</_>\n        <_>\n          10 4 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 11 -1.</_>\n        <_>\n          15 7 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 10 -1.</_>\n        <_>\n          7 9 3 5 2.</_>\n        <_>\n          10 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 9 8 -1.</_>\n        <_>\n          10 5 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 3 13 -1.</_>\n        <_>\n          5 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 12 -1.</_>\n        <_>\n          10 8 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 7 -1.</_>\n        <_>\n          9 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 4 -1.</_>\n        <_>\n          9 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 4 -1.</_>\n        <_>\n          7 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 8 -1.</_>\n        <_>\n          16 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 9 8 -1.</_>\n        <_>\n          7 5 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 8 -1.</_>\n        <_>\n          16 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 15 -1.</_>\n        <_>\n          4 10 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 13 2 -1.</_>\n        <_>\n          5 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 4 13 -1.</_>\n        <_>\n          3 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 8 -1.</_>\n        <_>\n          11 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 8 -1.</_>\n        <_>\n          6 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 15 -1.</_>\n        <_>\n          11 1 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 9 15 -1.</_>\n        <_>\n          6 1 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 9 6 -1.</_>\n        <_>\n          12 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 7 -1.</_>\n        <_>\n          2 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 16 -1.</_>\n        <_>\n          11 2 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 10 -1.</_>\n        <_>\n          7 1 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 10 8 -1.</_>\n        <_>\n          15 8 5 4 2.</_>\n        <_>\n          10 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 10 8 -1.</_>\n        <_>\n          0 8 5 4 2.</_>\n        <_>\n          5 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 16 -1.</_>\n        <_>\n          11 2 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 12 11 -1.</_>\n        <_>\n          9 9 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 3 -1.</_>\n        <_>\n          6 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 10 16 -1.</_>\n        <_>\n          3 1 5 8 2.</_>\n        <_>\n          8 9 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 8 10 -1.</_>\n        <_>\n          12 3 4 5 2.</_>\n        <_>\n          8 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 8 10 -1.</_>\n        <_>\n          4 3 4 5 2.</_>\n        <_>\n          8 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 9 6 -1.</_>\n        <_>\n          10 14 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 9 6 -1.</_>\n        <_>\n          1 14 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 14 4 -1.</_>\n        <_>\n          13 16 7 2 2.</_>\n        <_>\n          6 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 9 18 -1.</_>\n        <_>\n          1 6 9 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 4 -1.</_>\n        <_>\n          8 5 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 7 9 -1.</_>\n        <_>\n          1 8 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 7 6 -1.</_>\n        <_>\n          13 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 6 -1.</_>\n        <_>\n          0 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 7 -1.</_>\n        <_>\n          11 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 7 -1.</_>\n        <_>\n          7 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 15 4 -1.</_>\n        <_>\n          9 16 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 15 3 -1.</_>\n        <_>\n          5 17 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 18 -1.</_>\n        <_>\n          8 2 6 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 16 -1.</_>\n        <_>\n          7 4 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 6 -1.</_>\n        <_>\n          9 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 10 6 -1.</_>\n        <_>\n          1 14 5 3 2.</_>\n        <_>\n          6 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 5 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 5 9 -1.</_>\n        <_>\n          0 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 9 -1.</_>\n        <_>\n          13 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 9 -1.</_>\n        <_>\n          1 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 4 -1.</_>\n        <_>\n          5 9 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 12 -1.</_>\n        <_>\n          1 9 18 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 10 6 -1.</_>\n        <_>\n          13 14 5 3 2.</_>\n        <_>\n          8 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 13 14 -1.</_>\n        <_>\n          2 11 13 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 6 -1.</_>\n        <_>\n          10 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 8 -1.</_>\n        <_>\n          2 5 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 6 -1.</_>\n        <_>\n          10 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 11 6 -1.</_>\n        <_>\n          4 2 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 2 -1.</_>\n        <_>\n          2 3 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 12 5 -1.</_>\n        <_>\n          10 15 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 6 -1.</_>\n        <_>\n          10 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 4 -1.</_>\n        <_>\n          6 14 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 6 6 -1.</_>\n        <_>\n          12 10 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 14 -1.</_>\n        <_>\n          1 5 3 7 2.</_>\n        <_>\n          4 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 9 13 -1.</_>\n        <_>\n          13 2 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 6 -1.</_>\n        <_>\n          7 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 9 -1.</_>\n        <_>\n          12 5 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 9 -1.</_>\n        <_>\n          5 5 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 15 2 -1.</_>\n        <_>\n          5 9 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 3 -1.</_>\n        <_>\n          2 10 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 5 6 -1.</_>\n        <_>\n          12 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 5 6 -1.</_>\n        <_>\n          3 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 5 9 -1.</_>\n        <_>\n          15 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 4 -1.</_>\n        <_>\n          0 13 10 2 2.</_>\n        <_>\n          10 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 13 3 -1.</_>\n        <_>\n          5 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 10 6 -1.</_>\n        <_>\n          2 12 5 3 2.</_>\n        <_>\n          7 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 10 -1.</_>\n        <_>\n          9 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 13 -1.</_>\n        <_>\n          9 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 5 9 -1.</_>\n        <_>\n          15 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 13 -1.</_>\n        <_>\n          9 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 5 9 -1.</_>\n        <_>\n          15 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 3 13 -1.</_>\n        <_>\n          2 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 16 -1.</_>\n        <_>\n          12 4 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 16 -1.</_>\n        <_>\n          6 4 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 9 5 -1.</_>\n        <_>\n          10 15 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 12 4 -1.</_>\n        <_>\n          8 16 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 6 -1.</_>\n        <_>\n          10 3 5 3 2.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 3 -1.</_>\n        <_>\n          3 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 14 2 -1.</_>\n        <_>\n          6 3 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 8 4 -1.</_>\n        <_>\n          7 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 4 -1.</_>\n        <_>\n          4 2 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 15 -1.</_>\n        <_>\n          0 7 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 6 -1.</_>\n        <_>\n          3 2 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 4 -1.</_>\n        <_>\n          0 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 14 2 -1.</_>\n        <_>\n          3 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 10 3 -1.</_>\n        <_>\n          9 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 3 -1.</_>\n        <_>\n          4 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 3 -1.</_>\n        <_>\n          9 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 16 8 -1.</_>\n        <_>\n          4 12 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 16 8 -1.</_>\n        <_>\n          8 12 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 10 -1.</_>\n        <_>\n          16 9 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 11 12 -1.</_>\n        <_>\n          2 11 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 3 12 -1.</_>\n        <_>\n          9 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 15 -1.</_>\n        <_>\n          2 6 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 2 13 -1.</_>\n        <_>\n          17 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 2 13 -1.</_>\n        <_>\n          2 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 4 -1.</_>\n        <_>\n          10 1 10 2 2.</_>\n        <_>\n          0 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 6 -1.</_>\n        <_>\n          6 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 6 -1.</_>\n        <_>\n          8 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          12 0 4 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 8 -1.</_>\n        <_>\n          8 7 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 8 -1.</_>\n        <_>\n          12 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 9 5 -1.</_>\n        <_>\n          8 2 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 12 9 -1.</_>\n        <_>\n          12 10 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 9 5 -1.</_>\n        <_>\n          7 15 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 3 -1.</_>\n        <_>\n          7 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 8 4 -1.</_>\n        <_>\n          12 9 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 15 16 -1.</_>\n        <_>\n          3 12 15 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 4 -1.</_>\n        <_>\n          0 9 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 9 -1.</_>\n        <_>\n          9 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 8 9 -1.</_>\n        <_>\n          4 14 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 9 8 -1.</_>\n        <_>\n          14 3 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 9 8 -1.</_>\n        <_>\n          3 4 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 10 -1.</_>\n        <_>\n          12 4 3 5 2.</_>\n        <_>\n          9 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 4 -1.</_>\n        <_>\n          0 6 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 3 -1.</_>\n        <_>\n          8 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 13 3 -1.</_>\n        <_>\n          3 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          6 10 4 4 2.</_>\n        <_>\n          10 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          10 9 4 4 2.</_>\n        <_>\n          6 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 10 6 -1.</_>\n        <_>\n          0 7 5 3 2.</_>\n        <_>\n          5 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 8 -1.</_>\n        <_>\n          11 1 4 4 2.</_>\n        <_>\n          7 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 8 -1.</_>\n        <_>\n          5 1 4 4 2.</_>\n        <_>\n          9 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 4 -1.</_>\n        <_>\n          10 2 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 7 6 -1.</_>\n        <_>\n          0 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 5 6 -1.</_>\n        <_>\n          15 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 8 -1.</_>\n        <_>\n          1 6 9 4 2.</_>\n        <_>\n          10 10 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 13 3 -1.</_>\n        <_>\n          4 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 13 2 -1.</_>\n        <_>\n          1 10 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 8 8 -1.</_>\n        <_>\n          13 12 4 4 2.</_>\n        <_>\n          9 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 5 6 -1.</_>\n        <_>\n          0 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 9 -1.</_>\n        <_>\n          15 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 16 -1.</_>\n        <_>\n          0 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 9 -1.</_>\n        <_>\n          15 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 10 -1.</_>\n        <_>\n          2 5 8 5 2.</_>\n        <_>\n          10 10 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 2 -1.</_>\n        <_>\n          6 8 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 13 -1.</_>\n        <_>\n          9 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 14 -1.</_>\n        <_>\n          10 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 14 -1.</_>\n        <_>\n          9 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 7 -1.</_>\n        <_>\n          11 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 13 -1.</_>\n        <_>\n          7 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 15 3 -1.</_>\n        <_>\n          8 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 7 6 -1.</_>\n        <_>\n          0 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 6 -1.</_>\n        <_>\n          12 13 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 9 -1.</_>\n        <_>\n          6 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 7 -1.</_>\n        <_>\n          11 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 9 10 -1.</_>\n        <_>\n          5 9 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 18 -1.</_>\n        <_>\n          15 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 7 -1.</_>\n        <_>\n          11 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 8 -1.</_>\n        <_>\n          10 2 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 18 -1.</_>\n        <_>\n          15 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 4 -1.</_>\n        <_>\n          4 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 13 3 -1.</_>\n        <_>\n          6 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 3 -1.</_>\n        <_>\n          0 7 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 8 8 -1.</_>\n        <_>\n          14 8 4 4 2.</_>\n        <_>\n          10 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 5 9 -1.</_>\n        <_>\n          1 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 16 6 -1.</_>\n        <_>\n          1 4 8 3 2.</_>\n        <_>\n          9 7 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 6 -1.</_>\n        <_>\n          9 2 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 6 -1.</_>\n        <_>\n          4 5 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 8 8 -1.</_>\n        <_>\n          9 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 9 6 -1.</_>\n        <_>\n          1 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 9 5 -1.</_>\n        <_>\n          11 3 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 13 3 -1.</_>\n        <_>\n          5 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 3 16 -1.</_>\n        <_>\n          4 3 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 17 -1.</_>\n        <_>\n          15 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 9 7 -1.</_>\n        <_>\n          3 10 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 7 12 -1.</_>\n        <_>\n          8 4 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 5 9 -1.</_>\n        <_>\n          0 6 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 10 5 -1.</_>\n        <_>\n          9 9 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 10 5 -1.</_>\n        <_>\n          6 9 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 15 3 -1.</_>\n        <_>\n          9 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 3 -1.</_>\n        <_>\n          6 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 6 -1.</_>\n        <_>\n          10 5 5 3 2.</_>\n        <_>\n          5 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 8 8 -1.</_>\n        <_>\n          3 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 2 -1.</_>\n        <_>\n          0 1 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 8 8 -1.</_>\n        <_>\n          12 12 4 4 2.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 8 8 -1.</_>\n        <_>\n          4 12 4 4 2.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 13 4 -1.</_>\n        <_>\n          7 17 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 6 -1.</_>\n        <_>\n          0 14 6 3 2.</_>\n        <_>\n          6 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 8 -1.</_>\n        <_>\n          16 11 4 4 2.</_>\n        <_>\n          12 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 8 -1.</_>\n        <_>\n          0 11 4 4 2.</_>\n        <_>\n          4 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 19 -1.</_>\n        <_>\n          6 0 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 13 3 -1.</_>\n        <_>\n          0 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 12 -1.</_>\n        <_>\n          7 8 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 9 4 -1.</_>\n        <_>\n          11 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 8 6 -1.</_>\n        <_>\n          11 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 8 6 -1.</_>\n        <_>\n          1 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 8 -1.</_>\n        <_>\n          4 4 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 15 -1.</_>\n        <_>\n          8 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 8 8 -1.</_>\n        <_>\n          14 8 4 4 2.</_>\n        <_>\n          10 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 10 -1.</_>\n        <_>\n          8 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          7 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 5 9 -1.</_>\n        <_>\n          2 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 16 3 -1.</_>\n        <_>\n          3 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 12 7 -1.</_>\n        <_>\n          9 13 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 15 -1.</_>\n        <_>\n          11 2 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 15 -1.</_>\n        <_>\n          8 2 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 7 4 -1.</_>\n        <_>\n          10 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 7 12 -1.</_>\n        <_>\n          5 4 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 7 4 -1.</_>\n        <_>\n          10 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 4 8 -1.</_>\n        <_>\n          3 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 5 -1.</_>\n        <_>\n          9 7 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 16 -1.</_>\n        <_>\n          7 0 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 8 8 -1.</_>\n        <_>\n          14 8 4 4 2.</_>\n        <_>\n          10 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 8 8 -1.</_>\n        <_>\n          2 8 4 4 2.</_>\n        <_>\n          6 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 8 -1.</_>\n        <_>\n          12 8 8 4 2.</_>\n        <_>\n          4 12 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 10 -1.</_>\n        <_>\n          2 10 3 5 2.</_>\n        <_>\n          5 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 4 8 -1.</_>\n        <_>\n          10 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 16 3 -1.</_>\n        <_>\n          9 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 7 4 -1.</_>\n        <_>\n          10 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 7 4 -1.</_>\n        <_>\n          3 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 7 -1.</_>\n        <_>\n          10 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 10 19 -1.</_>\n        <_>\n          9 0 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 13 -1.</_>\n        <_>\n          13 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 5 -1.</_>\n        <_>\n          7 4 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 7 -1.</_>\n        <_>\n          10 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 7 -1.</_>\n        <_>\n          8 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 3 -1.</_>\n        <_>\n          2 1 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 7 9 -1.</_>\n        <_>\n          5 10 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 14 3 -1.</_>\n        <_>\n          4 6 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 7 6 -1.</_>\n        <_>\n          2 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 4 8 -1.</_>\n        <_>\n          10 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 18 -1.</_>\n        <_>\n          5 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 10 -1.</_>\n        <_>\n          15 0 5 5 2.</_>\n        <_>\n          10 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 14 3 -1.</_>\n        <_>\n          0 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 13 3 -1.</_>\n        <_>\n          6 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 13 -1.</_>\n        <_>\n          6 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 7 -1.</_>\n        <_>\n          6 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 3 -1.</_>\n        <_>\n          8 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 3 -1.</_>\n        <_>\n          6 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 17 3 -1.</_>\n        <_>\n          2 18 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 19 -1.</_>\n        <_>\n          9 1 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 12 -1.</_>\n        <_>\n          4 6 12 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 13 3 -1.</_>\n        <_>\n          0 18 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 11 12 -1.</_>\n        <_>\n          4 12 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 5 6 -1.</_>\n        <_>\n          12 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 5 6 -1.</_>\n        <_>\n          3 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 7 6 -1.</_>\n        <_>\n          13 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 17 -1.</_>\n        <_>\n          4 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 13 3 -1.</_>\n        <_>\n          5 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 8 -1.</_>\n        <_>\n          5 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 7 6 -1.</_>\n        <_>\n          13 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 13 -1.</_>\n        <_>\n          1 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 7 14 -1.</_>\n        <_>\n          7 8 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 8 -1.</_>\n        <_>\n          2 4 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 3 -1.</_>\n        <_>\n          7 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 10 16 -1.</_>\n        <_>\n          5 2 5 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 15 12 -1.</_>\n        <_>\n          5 6 15 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 8 -1.</_>\n        <_>\n          9 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 15 5 -1.</_>\n        <_>\n          10 1 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 9 -1.</_>\n        <_>\n          4 8 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 10 6 -1.</_>\n        <_>\n          11 5 5 3 2.</_>\n        <_>\n          6 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 4 12 -1.</_>\n        <_>\n          5 4 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 7 4 -1.</_>\n        <_>\n          13 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 10 12 -1.</_>\n        <_>\n          0 8 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 3 -1.</_>\n        <_>\n          4 8 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 11 12 -1.</_>\n        <_>\n          4 14 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 3 -1.</_>\n        <_>\n          2 2 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 11 6 -1.</_>\n        <_>\n          4 4 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 8 6 -1.</_>\n        <_>\n          11 11 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 13 3 -1.</_>\n        <_>\n          0 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 16 3 -1.</_>\n        <_>\n          2 5 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 10 -1.</_>\n        <_>\n          0 0 5 5 2.</_>\n        <_>\n          5 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 13 3 -1.</_>\n        <_>\n          6 3 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 3 -1.</_>\n        <_>\n          9 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 16 7 -1.</_>\n        <_>\n          2 7 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 7 -1.</_>\n        <_>\n          8 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 6 -1.</_>\n        <_>\n          11 6 5 3 2.</_>\n        <_>\n          6 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 13 3 -1.</_>\n        <_>\n          0 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 4 -1.</_>\n        <_>\n          8 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 9 -1.</_>\n        <_>\n          9 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 13 -1.</_>\n        <_>\n          10 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 13 -1.</_>\n        <_>\n          9 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 12 -1.</_>\n        <_>\n          10 1 4 6 2.</_>\n        <_>\n          6 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 6 -1.</_>\n        <_>\n          4 5 5 3 2.</_>\n        <_>\n          9 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 10 -1.</_>\n        <_>\n          12 3 3 5 2.</_>\n        <_>\n          9 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 15 6 -1.</_>\n        <_>\n          2 3 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 16 -1.</_>\n        <_>\n          8 1 6 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 14 6 -1.</_>\n        <_>\n          9 1 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 13 3 -1.</_>\n        <_>\n          7 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 14 -1.</_>\n        <_>\n          8 1 6 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 14 -1.</_>\n        <_>\n          6 1 6 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 18 13 -1.</_>\n        <_>\n          8 3 6 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 4 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          17 10 3 5 2.</_>\n        <_>\n          14 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          0 10 3 5 2.</_>\n        <_>\n          3 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 13 2 -1.</_>\n        <_>\n          7 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 10 6 -1.</_>\n        <_>\n          5 13 5 3 2.</_>\n        <_>\n          10 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 18 -1.</_>\n        <_>\n          18 2 2 9 2.</_>\n        <_>\n          16 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 9 -1.</_>\n        <_>\n          0 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 12 6 -1.</_>\n        <_>\n          13 2 6 3 2.</_>\n        <_>\n          7 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 6 -1.</_>\n        <_>\n          4 2 6 3 2.</_>\n        <_>\n          10 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 4 8 -1.</_>\n        <_>\n          12 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 16 8 -1.</_>\n        <_>\n          0 8 8 4 2.</_>\n        <_>\n          8 12 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 6 -1.</_>\n        <_>\n          15 10 5 3 2.</_>\n        <_>\n          10 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 8 -1.</_>\n        <_>\n          0 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 12 -1.</_>\n        <_>\n          13 2 3 6 2.</_>\n        <_>\n          10 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 14 -1.</_>\n        <_>\n          0 7 20 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 7 6 -1.</_>\n        <_>\n          11 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 8 6 -1.</_>\n        <_>\n          1 11 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 15 -1.</_>\n        <_>\n          13 6 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 7 15 -1.</_>\n        <_>\n          0 6 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 6 -1.</_>\n        <_>\n          12 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 6 -1.</_>\n        <_>\n          4 6 5 3 2.</_>\n        <_>\n          9 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 4 -1.</_>\n        <_>\n          5 7 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 19 -1.</_>\n        <_>\n          14 1 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 19 -1.</_>\n        <_>\n          5 1 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 6 -1.</_>\n        <_>\n          12 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 5 6 -1.</_>\n        <_>\n          3 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          12 6 5 3 2.</_>\n        <_>\n          7 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 9 5 -1.</_>\n        <_>\n          6 11 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 16 -1.</_>\n        <_>\n          8 1 6 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 16 -1.</_>\n        <_>\n          6 1 6 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 9 5 -1.</_>\n        <_>\n          9 12 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 10 -1.</_>\n        <_>\n          2 10 8 5 2.</_>\n        <_>\n          10 15 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 14 -1.</_>\n        <_>\n          14 0 2 7 2.</_>\n        <_>\n          12 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 14 -1.</_>\n        <_>\n          4 0 2 7 2.</_>\n        <_>\n          6 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 9 -1.</_>\n        <_>\n          12 7 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 9 -1.</_>\n        <_>\n          6 7 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 20 -1.</_>\n        <_>\n          16 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 20 -1.</_>\n        <_>\n          3 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 2 14 -1.</_>\n        <_>\n          5 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 18 3 -1.</_>\n        <_>\n          6 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 2 -1.</_>\n        <_>\n          0 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 9 6 -1.</_>\n        <_>\n          6 14 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 9 6 -1.</_>\n        <_>\n          5 5 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 10 3 -1.</_>\n        <_>\n          10 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 8 4 -1.</_>\n        <_>\n          4 3 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 7 4 -1.</_>\n        <_>\n          10 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 7 -1.</_>\n        <_>\n          8 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 12 -1.</_>\n        <_>\n          6 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 8 -1.</_>\n        <_>\n          16 1 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 18 -1.</_>\n        <_>\n          9 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 8 -1.</_>\n        <_>\n          2 1 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 6 -1.</_>\n        <_>\n          14 5 5 3 2.</_>\n        <_>\n          9 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 14 3 -1.</_>\n        <_>\n          0 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 7 6 -1.</_>\n        <_>\n          10 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 14 4 -1.</_>\n        <_>\n          3 10 7 2 2.</_>\n        <_>\n          10 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 17 2 -1.</_>\n        <_>\n          3 9 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 14 12 -1.</_>\n        <_>\n          0 11 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 6 -1.</_>\n        <_>\n          3 9 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 7 -1.</_>\n        <_>\n          9 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 13 2 -1.</_>\n        <_>\n          4 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 14 2 -1.</_>\n        <_>\n          8 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 15 -1.</_>\n        <_>\n          8 5 6 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 14 -1.</_>\n        <_>\n          8 6 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 8 -1.</_>\n        <_>\n          12 5 4 4 2.</_>\n        <_>\n          8 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 5 -1.</_>\n        <_>\n          8 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 10 12 -1.</_>\n        <_>\n          11 5 5 6 2.</_>\n        <_>\n          6 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 14 -1.</_>\n        <_>\n          3 5 6 7 2.</_>\n        <_>\n          9 12 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 13 3 -1.</_>\n        <_>\n          7 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 9 12 -1.</_>\n        <_>\n          5 11 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 14 -1.</_>\n        <_>\n          13 6 2 7 2.</_>\n        <_>\n          11 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 14 -1.</_>\n        <_>\n          5 6 2 7 2.</_>\n        <_>\n          7 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 17 2 -1.</_>\n        <_>\n          3 2 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 16 -1.</_>\n        <_>\n          7 12 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 7 -1.</_>\n        <_>\n          8 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 13 3 -1.</_>\n        <_>\n          0 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 15 -1.</_>\n        <_>\n          8 5 6 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 15 -1.</_>\n        <_>\n          6 5 6 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 12 19 -1.</_>\n        <_>\n          6 0 4 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 11 4 -1.</_>\n        <_>\n          9 14 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 6 -1.</_>\n        <_>\n          0 6 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 4 -1.</_>\n        <_>\n          5 5 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 12 4 -1.</_>\n        <_>\n          5 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 14 3 -1.</_>\n        <_>\n          6 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 14 3 -1.</_>\n        <_>\n          0 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 13 6 -1.</_>\n        <_>\n          5 6 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 11 4 -1.</_>\n        <_>\n          0 14 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 13 3 -1.</_>\n        <_>\n          5 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 4 -1.</_>\n        <_>\n          0 2 10 2 2.</_>\n        <_>\n          10 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 5 -1.</_>\n        <_>\n          14 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 5 6 -1.</_>\n        <_>\n          4 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 10 18 -1.</_>\n        <_>\n          6 10 10 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 12 -1.</_>\n        <_>\n          0 8 3 6 2.</_>\n        <_>\n          3 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 10 6 -1.</_>\n        <_>\n          14 9 5 3 2.</_>\n        <_>\n          9 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 10 6 -1.</_>\n        <_>\n          1 9 5 3 2.</_>\n        <_>\n          6 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 13 -1.</_>\n        <_>\n          16 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 13 -1.</_>\n        <_>\n          3 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 13 -1.</_>\n        <_>\n          18 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 13 -1.</_>\n        <_>\n          1 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 16 -1.</_>\n        <_>\n          16 4 3 8 2.</_>\n        <_>\n          13 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 14 -1.</_>\n        <_>\n          4 2 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 13 -1.</_>\n        <_>\n          17 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 3 13 -1.</_>\n        <_>\n          2 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 9 9 -1.</_>\n        <_>\n          8 9 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 14 2 -1.</_>\n        <_>\n          0 3 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 6 -1.</_>\n        <_>\n          12 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 6 -1.</_>\n        <_>\n          5 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 9 6 -1.</_>\n        <_>\n          10 3 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 6 -1.</_>\n        <_>\n          2 14 5 3 2.</_>\n        <_>\n          7 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          9 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 20 -1.</_>\n        <_>\n          1 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 14 -1.</_>\n        <_>\n          16 5 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 14 -1.</_>\n        <_>\n          16 5 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 14 -1.</_>\n        <_>\n          2 5 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 4 -1.</_>\n        <_>\n          10 11 10 2 2.</_>\n        <_>\n          0 13 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 5 -1.</_>\n        <_>\n          9 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 13 -1.</_>\n        <_>\n          10 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 9 6 -1.</_>\n        <_>\n          10 3 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 9 6 -1.</_>\n        <_>\n          1 3 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 5 8 -1.</_>\n        <_>\n          11 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 11 -1.</_>\n        <_>\n          11 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 11 -1.</_>\n        <_>\n          7 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 10 -1.</_>\n        <_>\n          10 1 3 5 2.</_>\n        <_>\n          7 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 10 5 -1.</_>\n        <_>\n          8 2 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 17 3 -1.</_>\n        <_>\n          2 18 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 3 -1.</_>\n        <_>\n          0 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 4 10 -1.</_>\n        <_>\n          7 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 6 -1.</_>\n        <_>\n          2 14 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 13 3 -1.</_>\n        <_>\n          5 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 12 -1.</_>\n        <_>\n          8 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 14 6 -1.</_>\n        <_>\n          13 1 7 3 2.</_>\n        <_>\n          6 4 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 12 6 -1.</_>\n        <_>\n          3 3 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 11 6 -1.</_>\n        <_>\n          9 7 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 13 -1.</_>\n        <_>\n          6 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 14 -1.</_>\n        <_>\n          17 5 2 7 2.</_>\n        <_>\n          15 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 7 6 -1.</_>\n        <_>\n          0 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 13 3 -1.</_>\n        <_>\n          5 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          6 10 4 4 2.</_>\n        <_>\n          10 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 14 6 -1.</_>\n        <_>\n          10 10 7 3 2.</_>\n        <_>\n          3 13 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 15 3 -1.</_>\n        <_>\n          5 15 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 14 6 -1.</_>\n        <_>\n          0 1 7 3 2.</_>\n        <_>\n          7 4 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 8 -1.</_>\n        <_>\n          0 0 4 4 2.</_>\n        <_>\n          4 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 14 4 -1.</_>\n        <_>\n          10 16 7 2 2.</_>\n        <_>\n          3 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 10 -1.</_>\n        <_>\n          0 1 3 5 2.</_>\n        <_>\n          3 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 8 8 -1.</_>\n        <_>\n          14 3 4 4 2.</_>\n        <_>\n          10 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 10 6 -1.</_>\n        <_>\n          1 5 5 3 2.</_>\n        <_>\n          6 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 14 -1.</_>\n        <_>\n          14 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 14 -1.</_>\n        <_>\n          4 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 12 4 -1.</_>\n        <_>\n          4 10 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 8 8 -1.</_>\n        <_>\n          2 3 4 4 2.</_>\n        <_>\n          6 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 16 -1.</_>\n        <_>\n          17 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 4 14 -1.</_>\n        <_>\n          1 5 2 7 2.</_>\n        <_>\n          3 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 5 10 -1.</_>\n        <_>\n          8 11 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 8 10 -1.</_>\n        <_>\n          4 2 4 5 2.</_>\n        <_>\n          8 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 10 8 -1.</_>\n        <_>\n          13 5 5 4 2.</_>\n        <_>\n          8 9 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 7 6 -1.</_>\n        <_>\n          0 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 7 -1.</_>\n        <_>\n          16 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 16 -1.</_>\n        <_>\n          1 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 12 -1.</_>\n        <_>\n          0 6 20 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 5 6 -1.</_>\n        <_>\n          0 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 7 4 -1.</_>\n        <_>\n          9 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 13 6 -1.</_>\n        <_>\n          2 12 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 14 -1.</_>\n        <_>\n          2 9 16 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 8 -1.</_>\n        <_>\n          4 9 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 13 -1.</_>\n        <_>\n          18 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 15 -1.</_>\n        <_>\n          8 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 13 -1.</_>\n        <_>\n          18 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 13 -1.</_>\n        <_>\n          1 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 4 -1.</_>\n        <_>\n          10 14 9 2 2.</_>\n        <_>\n          1 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 5 -1.</_>\n        <_>\n          4 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 19 -1.</_>\n        <_>\n          13 1 3 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 19 -1.</_>\n        <_>\n          4 1 3 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 3 -1.</_>\n        <_>\n          6 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 3 -1.</_>\n        <_>\n          0 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 7 6 -1.</_>\n        <_>\n          8 5 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 9 14 -1.</_>\n        <_>\n          3 3 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 9 6 -1.</_>\n        <_>\n          10 10 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 4 -1.</_>\n        <_>\n          0 1 8 2 2.</_>\n        <_>\n          8 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 7 -1.</_>\n        <_>\n          16 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 10 6 -1.</_>\n        <_>\n          0 10 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 7 -1.</_>\n        <_>\n          16 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 7 -1.</_>\n        <_>\n          2 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 14 -1.</_>\n        <_>\n          11 3 6 7 2.</_>\n        <_>\n          5 10 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 10 -1.</_>\n        <_>\n          7 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          16 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          2 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          4 5 6 3 2.</_>\n        <_>\n          10 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 8 -1.</_>\n        <_>\n          9 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 6 -1.</_>\n        <_>\n          8 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 4 14 -1.</_>\n        <_>\n          1 4 2 7 2.</_>\n        <_>\n          3 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 6 -1.</_>\n        <_>\n          10 1 10 3 2.</_>\n        <_>\n          0 4 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 6 -1.</_>\n        <_>\n          5 4 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 6 -1.</_>\n        <_>\n          0 5 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 8 -1.</_>\n        <_>\n          5 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 16 -1.</_>\n        <_>\n          15 4 2 8 2.</_>\n        <_>\n          13 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 18 -1.</_>\n        <_>\n          6 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 16 -1.</_>\n        <_>\n          15 4 2 8 2.</_>\n        <_>\n          13 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 4 16 -1.</_>\n        <_>\n          3 4 2 8 2.</_>\n        <_>\n          5 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 9 4 -1.</_>\n        <_>\n          6 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 7 -1.</_>\n        <_>\n          6 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 12 -1.</_>\n        <_>\n          8 0 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 2 -1.</_>\n        <_>\n          10 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 18 -1.</_>\n        <_>\n          17 2 3 9 2.</_>\n        <_>\n          14 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 14 4 -1.</_>\n        <_>\n          0 7 7 2 2.</_>\n        <_>\n          7 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 10 8 -1.</_>\n        <_>\n          13 5 5 4 2.</_>\n        <_>\n          8 9 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 10 8 -1.</_>\n        <_>\n          2 5 5 4 2.</_>\n        <_>\n          7 9 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 16 12 -1.</_>\n        <_>\n          4 2 8 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 16 12 -1.</_>\n        <_>\n          8 2 8 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 7 -1.</_>\n        <_>\n          11 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 7 -1.</_>\n        <_>\n          7 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 4 -1.</_>\n        <_>\n          6 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 10 -1.</_>\n        <_>\n          6 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 10 8 -1.</_>\n        <_>\n          11 10 5 4 2.</_>\n        <_>\n          6 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 6 9 -1.</_>\n        <_>\n          4 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 18 -1.</_>\n        <_>\n          4 0 6 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 9 17 -1.</_>\n        <_>\n          7 1 3 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 8 -1.</_>\n        <_>\n          11 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 7 -1.</_>\n        <_>\n          8 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 3 -1.</_>\n        <_>\n          3 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 9 -1.</_>\n        <_>\n          5 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 7 6 -1.</_>\n        <_>\n          10 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 7 4 -1.</_>\n        <_>\n          4 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 10 8 -1.</_>\n        <_>\n          11 10 5 4 2.</_>\n        <_>\n          6 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 4 -1.</_>\n        <_>\n          8 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 14 4 -1.</_>\n        <_>\n          12 7 7 2 2.</_>\n        <_>\n          5 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 7 -1.</_>\n        <_>\n          8 10 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 16 -1.</_>\n        <_>\n          11 2 6 8 2.</_>\n        <_>\n          5 10 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 14 4 -1.</_>\n        <_>\n          1 7 7 2 2.</_>\n        <_>\n          8 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 15 14 -1.</_>\n        <_>\n          3 12 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 4 -1.</_>\n        <_>\n          0 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 9 9 -1.</_>\n        <_>\n          8 9 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 10 -1.</_>\n        <_>\n          7 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 11 -1.</_>\n        <_>\n          11 4 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 14 8 -1.</_>\n        <_>\n          8 12 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 11 -1.</_>\n        <_>\n          11 4 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 15 -1.</_>\n        <_>\n          7 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 6 -1.</_>\n        <_>\n          8 2 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 14 -1.</_>\n        <_>\n          3 3 6 7 2.</_>\n        <_>\n          9 10 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 7 -1.</_>\n        <_>\n          9 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 7 -1.</_>\n        <_>\n          9 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 5 9 -1.</_>\n        <_>\n          15 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 9 -1.</_>\n        <_>\n          0 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 9 -1.</_>\n        <_>\n          8 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 6 -1.</_>\n        <_>\n          10 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 14 3 -1.</_>\n        <_>\n          6 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 12 8 -1.</_>\n        <_>\n          6 12 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 15 6 -1.</_>\n        <_>\n          10 14 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 12 -1.</_>\n        <_>\n          6 8 3 6 2.</_>\n        <_>\n          9 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 15 6 -1.</_>\n        <_>\n          10 14 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 20 -1.</_>\n        <_>\n          6 10 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 13 -1.</_>\n        <_>\n          10 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 6 -1.</_>\n        <_>\n          8 12 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 13 -1.</_>\n        <_>\n          10 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 9 6 -1.</_>\n        <_>\n          8 11 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 6 7 -1.</_>\n        <_>\n          10 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 8 -1.</_>\n        <_>\n          0 0 4 4 2.</_>\n        <_>\n          4 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 7 6 -1.</_>\n        <_>\n          10 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 7 6 -1.</_>\n        <_>\n          3 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 5 12 -1.</_>\n        <_>\n          12 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 9 4 -1.</_>\n        <_>\n          4 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 14 3 -1.</_>\n        <_>\n          6 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 13 3 -1.</_>\n        <_>\n          1 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 19 -1.</_>\n        <_>\n          13 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 13 -1.</_>\n        <_>\n          8 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 9 5 -1.</_>\n        <_>\n          13 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 9 5 -1.</_>\n        <_>\n          4 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          14 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 9 -1.</_>\n        <_>\n          8 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 5 12 -1.</_>\n        <_>\n          12 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 5 12 -1.</_>\n        <_>\n          3 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 6 9 -1.</_>\n        <_>\n          10 14 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 12 4 -1.</_>\n        <_>\n          4 18 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 18 4 -1.</_>\n        <_>\n          11 14 9 2 2.</_>\n        <_>\n          2 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 7 4 -1.</_>\n        <_>\n          6 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 8 -1.</_>\n        <_>\n          5 14 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 7 4 -1.</_>\n        <_>\n          4 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 7 4 -1.</_>\n        <_>\n          8 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 6 -1.</_>\n        <_>\n          9 10 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 2 -1.</_>\n        <_>\n          0 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 8 -1.</_>\n        <_>\n          8 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 13 -1.</_>\n        <_>\n          13 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 10 -1.</_>\n        <_>\n          8 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 14 -1.</_>\n        <_>\n          12 1 4 7 2.</_>\n        <_>\n          8 8 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 19 -1.</_>\n        <_>\n          6 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 10 -1.</_>\n        <_>\n          12 10 3 5 2.</_>\n        <_>\n          9 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 5 14 -1.</_>\n        <_>\n          0 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 14 -1.</_>\n        <_>\n          18 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 2 14 -1.</_>\n        <_>\n          0 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 10 -1.</_>\n        <_>\n          13 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 18 -1.</_>\n        <_>\n          1 9 18 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 4 -1.</_>\n        <_>\n          10 16 9 2 2.</_>\n        <_>\n          1 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 6 -1.</_>\n        <_>\n          5 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 13 9 -1.</_>\n        <_>\n          4 10 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 10 -1.</_>\n        <_>\n          5 5 5 5 2.</_>\n        <_>\n          10 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 10 -1.</_>\n        <_>\n          12 4 4 5 2.</_>\n        <_>\n          8 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 4 -1.</_>\n        <_>\n          3 7 7 2 2.</_>\n        <_>\n          10 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 18 -1.</_>\n        <_>\n          18 2 2 9 2.</_>\n        <_>\n          16 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 13 2 -1.</_>\n        <_>\n          1 1 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 14 3 -1.</_>\n        <_>\n          6 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 13 3 -1.</_>\n        <_>\n          0 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 6 -1.</_>\n        <_>\n          4 4 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 7 6 -1.</_>\n        <_>\n          0 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 6 -1.</_>\n        <_>\n          10 5 8 3 2.</_>\n        <_>\n          2 8 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 14 4 -1.</_>\n        <_>\n          2 10 7 2 2.</_>\n        <_>\n          9 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 18 -1.</_>\n        <_>\n          18 2 2 9 2.</_>\n        <_>\n          16 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 15 -1.</_>\n        <_>\n          6 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 7 6 -1.</_>\n        <_>\n          10 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 14 -1.</_>\n        <_>\n          4 0 2 7 2.</_>\n        <_>\n          6 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 10 6 -1.</_>\n        <_>\n          11 3 5 3 2.</_>\n        <_>\n          6 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 10 6 -1.</_>\n        <_>\n          4 3 5 3 2.</_>\n        <_>\n          9 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 12 -1.</_>\n        <_>\n          4 8 13 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 7 -1.</_>\n        <_>\n          5 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 9 -1.</_>\n        <_>\n          11 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 13 -1.</_>\n        <_>\n          2 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 9 -1.</_>\n        <_>\n          11 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 8 -1.</_>\n        <_>\n          7 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 15 6 -1.</_>\n        <_>\n          10 14 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 15 6 -1.</_>\n        <_>\n          5 14 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 4 -1.</_>\n        <_>\n          10 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 4 -1.</_>\n        <_>\n          6 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 4 10 -1.</_>\n        <_>\n          13 6 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 7 -1.</_>\n        <_>\n          10 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 12 5 -1.</_>\n        <_>\n          9 1 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 4 -1.</_>\n        <_>\n          7 2 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 2 -1.</_>\n        <_>\n          6 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 13 3 -1.</_>\n        <_>\n          3 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 9 6 -1.</_>\n        <_>\n          10 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 9 -1.</_>\n        <_>\n          0 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 2 -1.</_>\n        <_>\n          0 3 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 11 -1.</_>\n        <_>\n          5 5 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 17 -1.</_>\n        <_>\n          14 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 9 -1.</_>\n        <_>\n          6 0 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 6 -1.</_>\n        <_>\n          9 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 7 6 -1.</_>\n        <_>\n          2 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 17 -1.</_>\n        <_>\n          14 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 17 -1.</_>\n        <_>\n          5 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 6 -1.</_>\n        <_>\n          8 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 12 -1.</_>\n        <_>\n          7 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 5 9 -1.</_>\n        <_>\n          10 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 5 9 -1.</_>\n        <_>\n          5 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 18 -1.</_>\n        <_>\n          9 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 7 4 -1.</_>\n        <_>\n          6 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 9 -1.</_>\n        <_>\n          16 10 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 4 9 -1.</_>\n        <_>\n          2 10 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 18 -1.</_>\n        <_>\n          16 2 3 9 2.</_>\n        <_>\n          13 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 6 -1.</_>\n        <_>\n          0 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 5 12 -1.</_>\n        <_>\n          2 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 4 -1.</_>\n        <_>\n          3 17 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 6 -1.</_>\n        <_>\n          3 3 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 16 9 -1.</_>\n        <_>\n          4 11 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 16 9 -1.</_>\n        <_>\n          8 11 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 5 8 -1.</_>\n        <_>\n          11 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 9 -1.</_>\n        <_>\n          0 6 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 10 -1.</_>\n        <_>\n          10 0 5 5 2.</_>\n        <_>\n          5 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 18 -1.</_>\n        <_>\n          0 2 3 9 2.</_>\n        <_>\n          3 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 15 -1.</_>\n        <_>\n          9 10 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 13 2 -1.</_>\n        <_>\n          0 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 5 9 -1.</_>\n        <_>\n          11 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 14 6 -1.</_>\n        <_>\n          2 1 7 3 2.</_>\n        <_>\n          9 4 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 12 -1.</_>\n        <_>\n          12 0 3 6 2.</_>\n        <_>\n          9 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 12 -1.</_>\n        <_>\n          5 0 3 6 2.</_>\n        <_>\n          8 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 6 -1.</_>\n        <_>\n          9 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 6 -1.</_>\n        <_>\n          8 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 10 11 -1.</_>\n        <_>\n          8 3 5 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 10 11 -1.</_>\n        <_>\n          7 3 5 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 12 18 -1.</_>\n        <_>\n          8 2 6 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 19 -1.</_>\n        <_>\n          6 1 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 5 9 -1.</_>\n        <_>\n          10 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 4 -1.</_>\n        <_>\n          3 15 7 2 2.</_>\n        <_>\n          10 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 16 6 -1.</_>\n        <_>\n          4 14 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 9 6 -1.</_>\n        <_>\n          8 11 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 14 -1.</_>\n        <_>\n          15 4 2 7 2.</_>\n        <_>\n          13 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 9 -1.</_>\n        <_>\n          3 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 7 -1.</_>\n        <_>\n          12 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 10 3 -1.</_>\n        <_>\n          5 2 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 5 9 -1.</_>\n        <_>\n          12 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 8 8 -1.</_>\n        <_>\n          3 12 4 4 2.</_>\n        <_>\n          7 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 2 -1.</_>\n        <_>\n          2 1 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 7 6 -1.</_>\n        <_>\n          13 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 7 6 -1.</_>\n        <_>\n          0 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 5 8 -1.</_>\n        <_>\n          9 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 12 -1.</_>\n        <_>\n          7 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 14 -1.</_>\n        <_>\n          15 4 2 7 2.</_>\n        <_>\n          13 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 4 14 -1.</_>\n        <_>\n          3 4 2 7 2.</_>\n        <_>\n          5 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 2 -1.</_>\n        <_>\n          3 4 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 10 -1.</_>\n        <_>\n          7 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 10 12 -1.</_>\n        <_>\n          10 10 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 9 5 -1.</_>\n        <_>\n          7 2 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 10 -1.</_>\n        <_>\n          12 4 8 5 2.</_>\n        <_>\n          4 9 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 16 10 -1.</_>\n        <_>\n          0 4 8 5 2.</_>\n        <_>\n          8 9 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 12 -1.</_>\n        <_>\n          11 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 12 -1.</_>\n        <_>\n          7 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 13 3 -1.</_>\n        <_>\n          5 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 10 13 -1.</_>\n        <_>\n          5 7 5 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 7 4 -1.</_>\n        <_>\n          13 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 9 8 -1.</_>\n        <_>\n          3 9 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 13 2 -1.</_>\n        <_>\n          0 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 4 -1.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 4 -1.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 13 -1.</_>\n        <_>\n          14 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 8 -1.</_>\n        <_>\n          4 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 4 -1.</_>\n        <_>\n          10 6 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 8 -1.</_>\n        <_>\n          2 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 4 -1.</_>\n        <_>\n          3 2 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 13 -1.</_>\n        <_>\n          5 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 9 9 -1.</_>\n        <_>\n          13 0 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 9 9 -1.</_>\n        <_>\n          4 0 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 14 -1.</_>\n        <_>\n          18 6 2 7 2.</_>\n        <_>\n          16 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 3 -1.</_>\n        <_>\n          6 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 5 -1.</_>\n        <_>\n          10 4 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 14 4 -1.</_>\n        <_>\n          12 1 7 2 2.</_>\n        <_>\n          5 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 14 4 -1.</_>\n        <_>\n          1 1 7 2 2.</_>\n        <_>\n          8 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 14 -1.</_>\n        <_>\n          18 6 2 7 2.</_>\n        <_>\n          16 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 14 -1.</_>\n        <_>\n          0 6 2 7 2.</_>\n        <_>\n          2 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 5 9 -1.</_>\n        <_>\n          12 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 9 -1.</_>\n        <_>\n          5 12 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 9 -1.</_>\n        <_>\n          8 0 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 5 6 -1.</_>\n        <_>\n          1 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 7 4 -1.</_>\n        <_>\n          11 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 13 3 -1.</_>\n        <_>\n          3 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 7 8 -1.</_>\n        <_>\n          7 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 3 10 -1.</_>\n        <_>\n          2 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 13 2 -1.</_>\n        <_>\n          7 3 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 7 4 -1.</_>\n        <_>\n          2 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 10 -1.</_>\n        <_>\n          17 1 3 5 2.</_>\n        <_>\n          14 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 10 -1.</_>\n        <_>\n          0 1 3 5 2.</_>\n        <_>\n          3 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 8 -1.</_>\n        <_>\n          12 0 4 4 2.</_>\n        <_>\n          8 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 4 9 -1.</_>\n        <_>\n          8 8 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 12 -1.</_>\n        <_>\n          9 1 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 8 -1.</_>\n        <_>\n          12 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 8 -1.</_>\n        <_>\n          6 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 18 -1.</_>\n        <_>\n          10 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 7 12 -1.</_>\n        <_>\n          0 9 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 5 9 -1.</_>\n        <_>\n          11 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 14 4 -1.</_>\n        <_>\n          3 9 7 2 2.</_>\n        <_>\n          10 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 17 3 -1.</_>\n        <_>\n          3 8 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 8 -1.</_>\n        <_>\n          10 0 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 10 -1.</_>\n        <_>\n          0 0 5 5 2.</_>\n        <_>\n          5 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 16 9 -1.</_>\n        <_>\n          2 6 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 8 -1.</_>\n        <_>\n          4 4 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 7 6 -1.</_>\n        <_>\n          13 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 15 -1.</_>\n        <_>\n          5 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 7 -1.</_>\n        <_>\n          12 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 7 -1.</_>\n        <_>\n          6 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 8 8 -1.</_>\n        <_>\n          14 8 4 4 2.</_>\n        <_>\n          10 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 8 8 -1.</_>\n        <_>\n          2 8 4 4 2.</_>\n        <_>\n          6 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          17 10 3 5 2.</_>\n        <_>\n          14 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          0 10 3 5 2.</_>\n        <_>\n          3 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 10 -1.</_>\n        <_>\n          10 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 5 6 -1.</_>\n        <_>\n          6 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 12 -1.</_>\n        <_>\n          4 7 12 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 6 -1.</_>\n        <_>\n          4 5 5 3 2.</_>\n        <_>\n          9 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 9 10 -1.</_>\n        <_>\n          11 9 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 12 -1.</_>\n        <_>\n          7 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 9 18 -1.</_>\n        <_>\n          11 7 9 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 12 10 -1.</_>\n        <_>\n          4 8 6 5 2.</_>\n        <_>\n          10 13 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 10 -1.</_>\n        <_>\n          11 4 3 5 2.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 14 -1.</_>\n        <_>\n          6 0 4 7 2.</_>\n        <_>\n          10 7 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 8 -1.</_>\n        <_>\n          12 1 4 4 2.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 8 -1.</_>\n        <_>\n          5 1 4 4 2.</_>\n        <_>\n          9 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 5 -1.</_>\n        <_>\n          8 1 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 8 -1.</_>\n        <_>\n          5 0 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 10 5 -1.</_>\n        <_>\n          5 15 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 15 -1.</_>\n        <_>\n          6 5 6 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 3 -1.</_>\n        <_>\n          10 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 15 3 -1.</_>\n        <_>\n          5 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 7 6 -1.</_>\n        <_>\n          11 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 7 6 -1.</_>\n        <_>\n          2 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 6 -1.</_>\n        <_>\n          12 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 8 -1.</_>\n        <_>\n          15 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 4 -1.</_>\n        <_>\n          0 0 10 2 2.</_>\n        <_>\n          10 2 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 14 -1.</_>\n        <_>\n          10 5 3 7 2.</_>\n        <_>\n          7 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 7 4 -1.</_>\n        <_>\n          6 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 5 9 -1.</_>\n        <_>\n          11 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 5 9 -1.</_>\n        <_>\n          4 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 6 -1.</_>\n        <_>\n          10 5 5 3 2.</_>\n        <_>\n          5 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 8 -1.</_>\n        <_>\n          0 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 6 -1.</_>\n        <_>\n          12 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 4 8 -1.</_>\n        <_>\n          4 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 4 14 -1.</_>\n        <_>\n          16 5 2 7 2.</_>\n        <_>\n          14 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 4 14 -1.</_>\n        <_>\n          2 5 2 7 2.</_>\n        <_>\n          4 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 6 -1.</_>\n        <_>\n          12 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 7 6 -1.</_>\n        <_>\n          1 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 10 6 -1.</_>\n        <_>\n          8 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 14 -1.</_>\n        <_>\n          7 2 2 7 2.</_>\n        <_>\n          9 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 14 4 -1.</_>\n        <_>\n          12 7 7 2 2.</_>\n        <_>\n          5 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 14 4 -1.</_>\n        <_>\n          1 7 7 2 2.</_>\n        <_>\n          8 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 6 -1.</_>\n        <_>\n          13 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 14 10 -1.</_>\n        <_>\n          2 6 7 5 2.</_>\n        <_>\n          9 11 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 11 -1.</_>\n        <_>\n          13 5 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 15 6 -1.</_>\n        <_>\n          7 13 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 12 4 -1.</_>\n        <_>\n          9 16 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 9 5 -1.</_>\n        <_>\n          6 15 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 17 18 -1.</_>\n        <_>\n          2 9 17 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 12 -1.</_>\n        <_>\n          1 4 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 11 -1.</_>\n        <_>\n          13 5 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 5 -1.</_>\n        <_>\n          6 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 2 -1.</_>\n        <_>\n          3 1 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 3 -1.</_>\n        <_>\n          9 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 15 3 -1.</_>\n        <_>\n          6 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 14 -1.</_>\n        <_>\n          12 2 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 13 -1.</_>\n        <_>\n          8 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 4 -1.</_>\n        <_>\n          13 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 16 2 -1.</_>\n        <_>\n          2 8 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 7 4 -1.</_>\n        <_>\n          7 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 10 -1.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 8 -1.</_>\n        <_>\n          9 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 11 12 -1.</_>\n        <_>\n          0 10 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 4 14 -1.</_>\n        <_>\n          13 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 4 14 -1.</_>\n        <_>\n          3 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 10 -1.</_>\n        <_>\n          13 2 3 5 2.</_>\n        <_>\n          10 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 6 -1.</_>\n        <_>\n          4 9 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 6 -1.</_>\n        <_>\n          0 7 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 10 -1.</_>\n        <_>\n          4 2 3 5 2.</_>\n        <_>\n          7 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 5 -1.</_>\n        <_>\n          8 1 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 8 -1.</_>\n        <_>\n          6 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 6 9 -1.</_>\n        <_>\n          12 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 13 -1.</_>\n        <_>\n          9 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 15 -1.</_>\n        <_>\n          11 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 15 -1.</_>\n        <_>\n          8 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 4 -1.</_>\n        <_>\n          8 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 19 -1.</_>\n        <_>\n          5 1 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 12 13 -1.</_>\n        <_>\n          8 7 6 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 14 2 -1.</_>\n        <_>\n          7 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 15 3 -1.</_>\n        <_>\n          10 17 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 15 3 -1.</_>\n        <_>\n          5 17 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 8 5 -1.</_>\n        <_>\n          11 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 14 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_>\n        <_>\n          7 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 8 8 -1.</_>\n        <_>\n          3 1 4 4 2.</_>\n        <_>\n          7 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 10 -1.</_>\n        <_>\n          10 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 7 6 -1.</_>\n        <_>\n          0 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 12 -1.</_>\n        <_>\n          8 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 18 2 -1.</_>\n        <_>\n          0 12 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 6 9 -1.</_>\n        <_>\n          2 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 5 -1.</_>\n        <_>\n          8 1 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 5 -1.</_>\n        <_>\n          6 1 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 2 14 -1.</_>\n        <_>\n          11 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 12 -1.</_>\n        <_>\n          7 8 3 6 2.</_>\n        <_>\n          10 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 16 4 -1.</_>\n        <_>\n          2 17 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 2 19 -1.</_>\n        <_>\n          6 1 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 10 -1.</_>\n        <_>\n          10 4 3 5 2.</_>\n        <_>\n          7 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 15 4 -1.</_>\n        <_>\n          7 16 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 15 -1.</_>\n        <_>\n          12 1 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 3 -1.</_>\n        <_>\n          0 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 10 4 -1.</_>\n        <_>\n          5 10 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 5 8 -1.</_>\n        <_>\n          6 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 8 -1.</_>\n        <_>\n          10 5 6 4 2.</_>\n        <_>\n          4 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 15 -1.</_>\n        <_>\n          6 1 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 12 -1.</_>\n        <_>\n          11 8 3 6 2.</_>\n        <_>\n          8 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 6 8 -1.</_>\n        <_>\n          5 6 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 14 -1.</_>\n        <_>\n          17 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 14 -1.</_>\n        <_>\n          2 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 13 -1.</_>\n        <_>\n          12 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 13 -1.</_>\n        <_>\n          7 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 13 -1.</_>\n        <_>\n          16 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 13 -1.</_>\n        <_>\n          2 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 3 -1.</_>\n        <_>\n          5 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 14 3 -1.</_>\n        <_>\n          8 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 12 -1.</_>\n        <_>\n          10 8 3 6 2.</_>\n        <_>\n          7 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 7 -1.</_>\n        <_>\n          7 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 12 -1.</_>\n        <_>\n          12 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 4 12 -1.</_>\n        <_>\n          4 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 12 -1.</_>\n        <_>\n          3 4 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 7 4 -1.</_>\n        <_>\n          6 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 7 -1.</_>\n        <_>\n          12 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 3 -1.</_>\n        <_>\n          8 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 3 -1.</_>\n        <_>\n          0 10 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 3 -1.</_>\n        <_>\n          6 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 12 -1.</_>\n        <_>\n          2 8 15 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 5 6 -1.</_>\n        <_>\n          11 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 14 3 -1.</_>\n        <_>\n          2 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 9 -1.</_>\n        <_>\n          10 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 7 -1.</_>\n        <_>\n          6 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 12 6 -1.</_>\n        <_>\n          14 14 6 3 2.</_>\n        <_>\n          8 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 8 6 -1.</_>\n        <_>\n          6 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 9 4 -1.</_>\n        <_>\n          9 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 7 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 8 -1.</_>\n        <_>\n          2 15 18 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 10 8 -1.</_>\n        <_>\n          0 12 5 4 2.</_>\n        <_>\n          5 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 7 -1.</_>\n        <_>\n          13 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 6 -1.</_>\n        <_>\n          5 9 5 3 2.</_>\n        <_>\n          10 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 5 9 -1.</_>\n        <_>\n          12 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 5 9 -1.</_>\n        <_>\n          3 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 11 6 -1.</_>\n        <_>\n          5 8 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 7 -1.</_>\n        <_>\n          6 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 5 -1.</_>\n        <_>\n          7 8 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 18 7 -1.</_>\n        <_>\n          7 3 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 7 8 -1.</_>\n        <_>\n          7 15 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 6 -1.</_>\n        <_>\n          10 14 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 11 9 -1.</_>\n        <_>\n          5 9 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 8 -1.</_>\n        <_>\n          7 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 10 6 -1.</_>\n        <_>\n          14 14 5 3 2.</_>\n        <_>\n          9 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 7 6 -1.</_>\n        <_>\n          6 8 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 7 -1.</_>\n        <_>\n          13 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 4 7 -1.</_>\n        <_>\n          5 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 8 10 -1.</_>\n        <_>\n          6 10 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 12 16 -1.</_>\n        <_>\n          14 4 6 8 2.</_>\n        <_>\n          8 12 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 12 16 -1.</_>\n        <_>\n          0 4 6 8 2.</_>\n        <_>\n          6 12 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 7 -1.</_>\n        <_>\n          10 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 14 -1.</_>\n        <_>\n          8 6 2 7 2.</_>\n        <_>\n          10 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 10 18 -1.</_>\n        <_>\n          10 2 5 9 2.</_>\n        <_>\n          5 11 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 7 6 -1.</_>\n        <_>\n          6 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 5 12 -1.</_>\n        <_>\n          9 10 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 4 -1.</_>\n        <_>\n          0 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 19 15 -1.</_>\n        <_>\n          1 10 19 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 7 4 -1.</_>\n        <_>\n          0 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 6 -1.</_>\n        <_>\n          11 0 5 3 2.</_>\n        <_>\n          6 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 10 6 -1.</_>\n        <_>\n          4 0 5 3 2.</_>\n        <_>\n          9 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 7 6 -1.</_>\n        <_>\n          11 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 5 -1.</_>\n        <_>\n          8 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 11 4 -1.</_>\n        <_>\n          9 6 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 10 -1.</_>\n        <_>\n          2 1 3 5 2.</_>\n        <_>\n          5 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 8 -1.</_>\n        <_>\n          12 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 8 -1.</_>\n        <_>\n          0 5 9 4 2.</_>\n        <_>\n          9 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 5 12 -1.</_>\n        <_>\n          9 12 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 13 2 -1.</_>\n        <_>\n          0 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 3 13 -1.</_>\n        <_>\n          11 4 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 14 -1.</_>\n        <_>\n          8 3 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 8 -1.</_>\n        <_>\n          9 12 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 12 -1.</_>\n        <_>\n          4 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 17 2 -1.</_>\n        <_>\n          3 4 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 6 -1.</_>\n        <_>\n          2 2 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 4 -1.</_>\n        <_>\n          8 0 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 10 6 -1.</_>\n        <_>\n          1 12 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 8 -1.</_>\n        <_>\n          12 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 4 12 -1.</_>\n        <_>\n          3 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 15 5 -1.</_>\n        <_>\n          9 15 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 14 3 -1.</_>\n        <_>\n          0 2 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 7 -1.</_>\n        <_>\n          12 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 7 -1.</_>\n        <_>\n          6 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 8 6 -1.</_>\n        <_>\n          6 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 14 12 -1.</_>\n        <_>\n          1 7 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 15 5 -1.</_>\n        <_>\n          9 15 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 15 5 -1.</_>\n        <_>\n          6 15 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 7 -1.</_>\n        <_>\n          11 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 7 -1.</_>\n        <_>\n          7 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 5 -1.</_>\n        <_>\n          8 10 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 12 -1.</_>\n        <_>\n          0 0 4 6 2.</_>\n        <_>\n          4 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 2 -1.</_>\n        <_>\n          7 2 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 14 2 -1.</_>\n        <_>\n          2 6 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 14 -1.</_>\n        <_>\n          15 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 14 -1.</_>\n        <_>\n          4 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 13 -1.</_>\n        <_>\n          16 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 13 -1.</_>\n        <_>\n          2 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 9 -1.</_>\n        <_>\n          15 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 7 -1.</_>\n        <_>\n          2 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 13 -1.</_>\n        <_>\n          14 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 13 -1.</_>\n        <_>\n          5 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 8 -1.</_>\n        <_>\n          0 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 10 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_>\n        <_>\n          10 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 16 -1.</_>\n        <_>\n          0 1 10 8 2.</_>\n        <_>\n          10 9 10 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 16 -1.</_>\n        <_>\n          12 1 5 8 2.</_>\n        <_>\n          7 9 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 14 -1.</_>\n        <_>\n          0 1 8 7 2.</_>\n        <_>\n          8 8 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 6 -1.</_>\n        <_>\n          14 5 5 3 2.</_>\n        <_>\n          9 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 10 6 -1.</_>\n        <_>\n          1 5 5 3 2.</_>\n        <_>\n          6 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 13 2 -1.</_>\n        <_>\n          4 6 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 10 4 -1.</_>\n        <_>\n          0 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 8 -1.</_>\n        <_>\n          10 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 3 -1.</_>\n        <_>\n          0 4 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          0 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 3 -1.</_>\n        <_>\n          6 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 4 -1.</_>\n        <_>\n          3 17 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 7 6 -1.</_>\n        <_>\n          12 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 18 4 -1.</_>\n        <_>\n          0 14 9 2 2.</_>\n        <_>\n          9 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 4 9 -1.</_>\n        <_>\n          14 4 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 8 -1.</_>\n        <_>\n          2 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 14 -1.</_>\n        <_>\n          18 6 2 7 2.</_>\n        <_>\n          16 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 5 9 -1.</_>\n        <_>\n          1 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 14 -1.</_>\n        <_>\n          18 6 2 7 2.</_>\n        <_>\n          16 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 5 -1.</_>\n        <_>\n          8 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 14 -1.</_>\n        <_>\n          18 6 2 7 2.</_>\n        <_>\n          16 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 10 16 -1.</_>\n        <_>\n          3 1 5 8 2.</_>\n        <_>\n          8 9 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 4 -1.</_>\n        <_>\n          11 12 9 2 2.</_>\n        <_>\n          2 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 7 -1.</_>\n        <_>\n          10 4 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 20 -1.</_>\n        <_>\n          13 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 20 -1.</_>\n        <_>\n          6 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 9 7 -1.</_>\n        <_>\n          14 13 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 14 -1.</_>\n        <_>\n          8 5 2 7 2.</_>\n        <_>\n          10 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 4 -1.</_>\n        <_>\n          11 12 9 2 2.</_>\n        <_>\n          2 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 18 4 -1.</_>\n        <_>\n          0 12 9 2 2.</_>\n        <_>\n          9 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 12 5 -1.</_>\n        <_>\n          12 14 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 5 -1.</_>\n        <_>\n          4 14 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 14 3 -1.</_>\n        <_>\n          6 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 16 4 -1.</_>\n        <_>\n          1 11 8 2 2.</_>\n        <_>\n          9 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 10 -1.</_>\n        <_>\n          16 10 3 5 2.</_>\n        <_>\n          13 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 12 -1.</_>\n        <_>\n          0 5 10 6 2.</_>\n        <_>\n          10 11 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 15 2 -1.</_>\n        <_>\n          1 19 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 10 -1.</_>\n        <_>\n          16 10 3 5 2.</_>\n        <_>\n          13 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 20 6 -1.</_>\n        <_>\n          0 16 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 10 -1.</_>\n        <_>\n          16 10 3 5 2.</_>\n        <_>\n          13 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 2 -1.</_>\n        <_>\n          3 1 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 3 -1.</_>\n        <_>\n          0 8 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 10 8 -1.</_>\n        <_>\n          2 9 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 6 -1.</_>\n        <_>\n          8 8 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 11 6 -1.</_>\n        <_>\n          0 8 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 17 2 -1.</_>\n        <_>\n          3 11 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 10 -1.</_>\n        <_>\n          1 10 3 5 2.</_>\n        <_>\n          4 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 3 -1.</_>\n        <_>\n          7 0 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 14 4 -1.</_>\n        <_>\n          3 14 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 7 8 -1.</_>\n        <_>\n          8 4 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 7 6 -1.</_>\n        <_>\n          3 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 13 -1.</_>\n        <_>\n          10 7 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 5 6 -1.</_>\n        <_>\n          0 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 15 4 -1.</_>\n        <_>\n          10 6 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 15 4 -1.</_>\n        <_>\n          5 6 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 3 10 -1.</_>\n        <_>\n          16 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 15 -1.</_>\n        <_>\n          1 5 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 13 -1.</_>\n        <_>\n          14 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 2 -1.</_>\n        <_>\n          4 1 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          10 0 4 6 2.</_>\n        <_>\n          6 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 13 -1.</_>\n        <_>\n          9 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 13 -1.</_>\n        <_>\n          10 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 4 -1.</_>\n        <_>\n          1 1 8 2 2.</_>\n        <_>\n          9 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 13 -1.</_>\n        <_>\n          18 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 3 13 -1.</_>\n        <_>\n          1 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 14 -1.</_>\n        <_>\n          12 2 3 7 2.</_>\n        <_>\n          9 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 7 -1.</_>\n        <_>\n          9 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 12 -1.</_>\n        <_>\n          10 8 4 6 2.</_>\n        <_>\n          6 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 16 3 -1.</_>\n        <_>\n          2 14 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 8 10 -1.</_>\n        <_>\n          6 8 4 5 2.</_>\n        <_>\n          10 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 3 -1.</_>\n        <_>\n          5 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 18 -1.</_>\n        <_>\n          8 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 12 -1.</_>\n        <_>\n          9 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 10 -1.</_>\n        <_>\n          7 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 7 6 -1.</_>\n        <_>\n          10 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 14 -1.</_>\n        <_>\n          0 6 2 7 2.</_>\n        <_>\n          2 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 5 -1.</_>\n        <_>\n          13 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 5 -1.</_>\n        <_>\n          4 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 4 7 -1.</_>\n        <_>\n          14 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 6 5 -1.</_>\n        <_>\n          4 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 12 -1.</_>\n        <_>\n          6 12 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 14 3 -1.</_>\n        <_>\n          0 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 6 -1.</_>\n        <_>\n          8 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 12 -1.</_>\n        <_>\n          6 7 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 8 -1.</_>\n        <_>\n          2 4 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 17 3 -1.</_>\n        <_>\n          1 1 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 13 2 -1.</_>\n        <_>\n          5 14 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 7 6 -1.</_>\n        <_>\n          1 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 7 6 -1.</_>\n        <_>\n          13 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 13 -1.</_>\n        <_>\n          9 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 7 6 -1.</_>\n        <_>\n          13 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          3 14 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 7 6 -1.</_>\n        <_>\n          13 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 6 -1.</_>\n        <_>\n          0 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 12 -1.</_>\n        <_>\n          6 4 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 13 2 -1.</_>\n        <_>\n          0 2 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 13 -1.</_>\n        <_>\n          16 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 3 13 -1.</_>\n        <_>\n          3 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 4 -1.</_>\n        <_>\n          8 4 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 4 -1.</_>\n        <_>\n          7 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 13 3 -1.</_>\n        <_>\n          1 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 18 -1.</_>\n        <_>\n          6 2 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 3 -1.</_>\n        <_>\n          0 11 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 13 3 -1.</_>\n        <_>\n          7 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 13 2 -1.</_>\n        <_>\n          0 16 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 5 -1.</_>\n        <_>\n          7 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 8 -1.</_>\n        <_>\n          10 11 8 4 2.</_>\n        <_>\n          2 15 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 12 -1.</_>\n        <_>\n          2 6 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 8 -1.</_>\n        <_>\n          11 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 6 -1.</_>\n        <_>\n          5 11 5 3 2.</_>\n        <_>\n          10 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 7 6 -1.</_>\n        <_>\n          10 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 6 -1.</_>\n        <_>\n          5 5 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 3 -1.</_>\n        <_>\n          4 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 14 3 -1.</_>\n        <_>\n          1 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 4 -1.</_>\n        <_>\n          12 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 4 -1.</_>\n        <_>\n          4 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 10 8 -1.</_>\n        <_>\n          10 9 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 8 -1.</_>\n        <_>\n          5 9 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 3 -1.</_>\n        <_>\n          3 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 4 -1.</_>\n        <_>\n          0 7 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 12 -1.</_>\n        <_>\n          7 7 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 15 -1.</_>\n        <_>\n          10 0 5 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 10 6 -1.</_>\n        <_>\n          11 1 5 3 2.</_>\n        <_>\n          6 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 10 6 -1.</_>\n        <_>\n          4 1 5 3 2.</_>\n        <_>\n          9 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 3 -1.</_>\n        <_>\n          7 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 12 -1.</_>\n        <_>\n          11 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 12 -1.</_>\n        <_>\n          7 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 16 -1.</_>\n        <_>\n          10 4 2 8 2.</_>\n        <_>\n          8 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 14 -1.</_>\n        <_>\n          8 6 2 7 2.</_>\n        <_>\n          10 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 2 -1.</_>\n        <_>\n          3 3 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 9 -1.</_>\n        <_>\n          3 3 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 17 6 -1.</_>\n        <_>\n          3 7 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 15 19 -1.</_>\n        <_>\n          8 1 5 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 3 -1.</_>\n        <_>\n          3 2 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 10 3 -1.</_>\n        <_>\n          8 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 2 -1.</_>\n        <_>\n          6 8 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 15 3 -1.</_>\n        <_>\n          2 5 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 7 6 -1.</_>\n        <_>\n          2 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 7 4 -1.</_>\n        <_>\n          8 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 6 -1.</_>\n        <_>\n          0 15 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 13 3 -1.</_>\n        <_>\n          6 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 17 12 -1.</_>\n        <_>\n          1 9 17 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 13 3 -1.</_>\n        <_>\n          6 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 8 -1.</_>\n        <_>\n          2 9 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 5 14 -1.</_>\n        <_>\n          9 12 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 16 -1.</_>\n        <_>\n          9 4 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 6 -1.</_>\n        <_>\n          10 4 7 3 2.</_>\n        <_>\n          3 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 7 6 -1.</_>\n        <_>\n          0 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          10 5 6 3 2.</_>\n        <_>\n          4 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 19 6 -1.</_>\n        <_>\n          0 15 19 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 7 6 -1.</_>\n        <_>\n          13 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 7 6 -1.</_>\n        <_>\n          3 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 7 6 -1.</_>\n        <_>\n          13 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 8 10 -1.</_>\n        <_>\n          1 3 4 5 2.</_>\n        <_>\n          5 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 12 -1.</_>\n        <_>\n          9 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 7 -1.</_>\n        <_>\n          6 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 14 -1.</_>\n        <_>\n          11 0 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 19 -1.</_>\n        <_>\n          7 1 6 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 9 -1.</_>\n        <_>\n          8 8 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 3 -1.</_>\n        <_>\n          3 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 3 -1.</_>\n        <_>\n          7 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 8 -1.</_>\n        <_>\n          4 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 7 6 -1.</_>\n        <_>\n          12 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 8 -1.</_>\n        <_>\n          6 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 10 -1.</_>\n        <_>\n          10 14 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 10 -1.</_>\n        <_>\n          4 14 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 7 6 -1.</_>\n        <_>\n          13 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 7 6 -1.</_>\n        <_>\n          1 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 13 -1.</_>\n        <_>\n          13 1 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 13 3 -1.</_>\n        <_>\n          3 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 13 2 -1.</_>\n        <_>\n          7 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 10 6 -1.</_>\n        <_>\n          4 14 5 3 2.</_>\n        <_>\n          9 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 14 -1.</_>\n        <_>\n          13 1 2 7 2.</_>\n        <_>\n          11 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 2 -1.</_>\n        <_>\n          0 4 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 6 -1.</_>\n        <_>\n          7 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 18 -1.</_>\n        <_>\n          0 6 16 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 5 9 -1.</_>\n        <_>\n          14 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 4 10 -1.</_>\n        <_>\n          1 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 2 14 -1.</_>\n        <_>\n          16 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 2 14 -1.</_>\n        <_>\n          2 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 5 9 -1.</_>\n        <_>\n          14 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 5 9 -1.</_>\n        <_>\n          1 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 9 9 -1.</_>\n        <_>\n          8 7 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          4 5 6 3 2.</_>\n        <_>\n          10 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 16 -1.</_>\n        <_>\n          14 4 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 16 -1.</_>\n        <_>\n          5 4 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 12 -1.</_>\n        <_>\n          12 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 14 -1.</_>\n        <_>\n          7 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 16 -1.</_>\n        <_>\n          15 8 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 16 -1.</_>\n        <_>\n          1 8 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 8 6 -1.</_>\n        <_>\n          12 11 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 14 2 -1.</_>\n        <_>\n          7 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 5 -1.</_>\n        <_>\n          0 0 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 6 -1.</_>\n        <_>\n          4 0 6 3 2.</_>\n        <_>\n          10 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 8 -1.</_>\n        <_>\n          0 0 4 4 2.</_>\n        <_>\n          4 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 5 9 -1.</_>\n        <_>\n          14 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 2 -1.</_>\n        <_>\n          1 7 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 7 6 -1.</_>\n        <_>\n          7 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 10 -1.</_>\n        <_>\n          1 2 9 5 2.</_>\n        <_>\n          10 7 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 8 8 -1.</_>\n        <_>\n          13 3 4 4 2.</_>\n        <_>\n          9 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 12 4 -1.</_>\n        <_>\n          9 1 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 7 -1.</_>\n        <_>\n          8 5 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 5 -1.</_>\n        <_>\n          8 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 7 -1.</_>\n        <_>\n          9 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 13 -1.</_>\n        <_>\n          9 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 16 -1.</_>\n        <_>\n          11 2 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 9 7 -1.</_>\n        <_>\n          5 13 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 16 -1.</_>\n        <_>\n          11 2 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 11 -1.</_>\n        <_>\n          6 9 6 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 16 -1.</_>\n        <_>\n          11 2 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 6 -1.</_>\n        <_>\n          7 7 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 5 9 -1.</_>\n        <_>\n          11 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 5 9 -1.</_>\n        <_>\n          4 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 5 9 -1.</_>\n        <_>\n          14 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 16 -1.</_>\n        <_>\n          8 2 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 3 -1.</_>\n        <_>\n          3 16 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 6 -1.</_>\n        <_>\n          10 1 10 3 2.</_>\n        <_>\n          0 4 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 5 -1.</_>\n        <_>\n          8 0 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 14 -1.</_>\n        <_>\n          14 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 14 -1.</_>\n        <_>\n          5 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 10 -1.</_>\n        <_>\n          16 0 3 5 2.</_>\n        <_>\n          13 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 10 -1.</_>\n        <_>\n          1 0 3 5 2.</_>\n        <_>\n          4 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 5 -1.</_>\n        <_>\n          8 0 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 5 -1.</_>\n        <_>\n          6 0 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 14 -1.</_>\n        <_>\n          13 1 2 7 2.</_>\n        <_>\n          11 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 14 -1.</_>\n        <_>\n          5 1 2 7 2.</_>\n        <_>\n          7 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 13 3 -1.</_>\n        <_>\n          0 8 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 13 -1.</_>\n        <_>\n          17 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 3 13 -1.</_>\n        <_>\n          2 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 5 8 -1.</_>\n        <_>\n          2 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 3 -1.</_>\n        <_>\n          7 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 3 -1.</_>\n        <_>\n          0 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 4 -1.</_>\n        <_>\n          6 11 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 10 6 -1.</_>\n        <_>\n          0 7 5 3 2.</_>\n        <_>\n          5 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 16 -1.</_>\n        <_>\n          15 12 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 9 9 -1.</_>\n        <_>\n          7 0 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          5 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 14 8 -1.</_>\n        <_>\n          3 12 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 10 -1.</_>\n        <_>\n          2 10 8 5 2.</_>\n        <_>\n          10 15 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          10 5 6 3 2.</_>\n        <_>\n          4 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 8 -1.</_>\n        <_>\n          5 5 5 4 2.</_>\n        <_>\n          10 9 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 6 -1.</_>\n        <_>\n          10 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 5 -1.</_>\n        <_>\n          5 15 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          17 10 3 5 2.</_>\n        <_>\n          14 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 8 -1.</_>\n        <_>\n          5 9 5 4 2.</_>\n        <_>\n          10 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 13 -1.</_>\n        <_>\n          8 7 6 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 5 -1.</_>\n        <_>\n          9 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          17 10 3 5 2.</_>\n        <_>\n          14 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 8 -1.</_>\n        <_>\n          5 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 16 6 -1.</_>\n        <_>\n          3 14 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 7 -1.</_>\n        <_>\n          8 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 14 3 -1.</_>\n        <_>\n          4 10 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 13 9 -1.</_>\n        <_>\n          3 9 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 18 -1.</_>\n        <_>\n          7 9 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 10 -1.</_>\n        <_>\n          8 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 16 4 -1.</_>\n        <_>\n          3 5 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 5 6 -1.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 6 -1.</_>\n        <_>\n          4 9 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 4 -1.</_>\n        <_>\n          4 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 9 4 -1.</_>\n        <_>\n          8 11 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 16 3 -1.</_>\n        <_>\n          1 6 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 13 3 -1.</_>\n        <_>\n          5 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 3 -1.</_>\n        <_>\n          0 2 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 10 -1.</_>\n        <_>\n          12 2 3 5 2.</_>\n        <_>\n          9 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 12 4 -1.</_>\n        <_>\n          7 1 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 10 -1.</_>\n        <_>\n          12 2 3 5 2.</_>\n        <_>\n          9 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 2 18 -1.</_>\n        <_>\n          8 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 10 -1.</_>\n        <_>\n          12 2 3 5 2.</_>\n        <_>\n          9 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 10 -1.</_>\n        <_>\n          5 2 3 5 2.</_>\n        <_>\n          8 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 4 -1.</_>\n        <_>\n          8 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 9 8 -1.</_>\n        <_>\n          4 13 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 19 4 -1.</_>\n        <_>\n          1 17 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 7 4 -1.</_>\n        <_>\n          5 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 10 -1.</_>\n        <_>\n          9 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 6 -1.</_>\n        <_>\n          0 10 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 10 -1.</_>\n        <_>\n          7 5 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 10 6 -1.</_>\n        <_>\n          0 14 5 3 2.</_>\n        <_>\n          5 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          17 10 3 5 2.</_>\n        <_>\n          14 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 9 -1.</_>\n        <_>\n          0 11 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 5 9 -1.</_>\n        <_>\n          15 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 13 3 -1.</_>\n        <_>\n          1 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 5 9 -1.</_>\n        <_>\n          15 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 2 -1.</_>\n        <_>\n          0 13 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 5 9 -1.</_>\n        <_>\n          15 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 5 9 -1.</_>\n        <_>\n          0 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 10 -1.</_>\n        <_>\n          13 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 18 -1.</_>\n        <_>\n          3 9 13 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 14 -1.</_>\n        <_>\n          12 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 14 -1.</_>\n        <_>\n          5 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 16 10 -1.</_>\n        <_>\n          10 8 8 5 2.</_>\n        <_>\n          2 13 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          10 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 9 -1.</_>\n        <_>\n          10 3 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 5 -1.</_>\n        <_>\n          7 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 12 8 -1.</_>\n        <_>\n          11 1 6 4 2.</_>\n        <_>\n          5 5 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 10 -1.</_>\n        <_>\n          5 6 3 5 2.</_>\n        <_>\n          8 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 9 -1.</_>\n        <_>\n          2 10 9 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 4 -1.</_>\n        <_>\n          5 2 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 7 -1.</_>\n        <_>\n          9 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 18 3 -1.</_>\n        <_>\n          6 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 3 -1.</_>\n        <_>\n          4 2 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 8 -1.</_>\n        <_>\n          4 5 4 4 2.</_>\n        <_>\n          8 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          4 7 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 4 -1.</_>\n        <_>\n          5 1 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 13 2 -1.</_>\n        <_>\n          4 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 16 10 -1.</_>\n        <_>\n          10 4 8 5 2.</_>\n        <_>\n          2 9 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 16 2 -1.</_>\n        <_>\n          0 3 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 6 7 -1.</_>\n        <_>\n          5 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 3 -1.</_>\n        <_>\n          7 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 10 6 -1.</_>\n        <_>\n          3 1 5 3 2.</_>\n        <_>\n          8 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 5 9 -1.</_>\n        <_>\n          12 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 7 -1.</_>\n        <_>\n          8 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 6 -1.</_>\n        <_>\n          12 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 4 12 -1.</_>\n        <_>\n          1 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 6 -1.</_>\n        <_>\n          12 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 7 -1.</_>\n        <_>\n          10 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 8 8 -1.</_>\n        <_>\n          14 8 4 4 2.</_>\n        <_>\n          10 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 15 3 -1.</_>\n        <_>\n          6 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          6 14 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 14 3 -1.</_>\n        <_>\n          3 6 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 7 6 -1.</_>\n        <_>\n          2 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 7 8 -1.</_>\n        <_>\n          8 10 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 7 -1.</_>\n        <_>\n          2 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 3 -1.</_>\n        <_>\n          4 2 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 13 2 -1.</_>\n        <_>\n          2 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 13 3 -1.</_>\n        <_>\n          5 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 4 -1.</_>\n        <_>\n          2 1 8 2 2.</_>\n        <_>\n          10 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 6 -1.</_>\n        <_>\n          9 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 8 -1.</_>\n        <_>\n          6 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 8 6 -1.</_>\n        <_>\n          12 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 5 -1.</_>\n        <_>\n          7 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 8 -1.</_>\n        <_>\n          11 6 4 4 2.</_>\n        <_>\n          7 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 10 -1.</_>\n        <_>\n          7 5 3 5 2.</_>\n        <_>\n          10 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 10 4 -1.</_>\n        <_>\n          10 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 10 4 -1.</_>\n        <_>\n          0 6 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 14 6 -1.</_>\n        <_>\n          4 5 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 13 3 -1.</_>\n        <_>\n          0 3 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 5 -1.</_>\n        <_>\n          8 9 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 7 6 -1.</_>\n        <_>\n          12 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 7 6 -1.</_>\n        <_>\n          1 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 10 6 -1.</_>\n        <_>\n          0 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          5 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 12 5 -1.</_>\n        <_>\n          8 15 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 7 6 -1.</_>\n        <_>\n          12 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 17 3 -1.</_>\n        <_>\n          0 7 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          17 10 3 5 2.</_>\n        <_>\n          14 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 18 4 -1.</_>\n        <_>\n          0 12 9 2 2.</_>\n        <_>\n          9 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 7 -1.</_>\n        <_>\n          11 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 14 2 -1.</_>\n        <_>\n          0 13 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 7 -1.</_>\n        <_>\n          12 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 13 -1.</_>\n        <_>\n          9 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 14 -1.</_>\n        <_>\n          10 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 7 -1.</_>\n        <_>\n          6 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 7 6 -1.</_>\n        <_>\n          11 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 7 6 -1.</_>\n        <_>\n          2 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 12 -1.</_>\n        <_>\n          0 9 20 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 11 -1.</_>\n        <_>\n          9 6 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 4 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 11 -1.</_>\n        <_>\n          3 1 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 5 12 -1.</_>\n        <_>\n          9 10 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 4 -1.</_>\n        <_>\n          0 3 10 2 2.</_>\n        <_>\n          10 5 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 6 -1.</_>\n        <_>\n          15 0 5 3 2.</_>\n        <_>\n          10 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 10 6 -1.</_>\n        <_>\n          4 0 5 3 2.</_>\n        <_>\n          9 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 3 -1.</_>\n        <_>\n          7 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 3 -1.</_>\n        <_>\n          0 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 7 4 -1.</_>\n        <_>\n          10 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 7 4 -1.</_>\n        <_>\n          3 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 7 6 -1.</_>\n        <_>\n          11 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 14 4 -1.</_>\n        <_>\n          2 8 7 2 2.</_>\n        <_>\n          9 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 6 -1.</_>\n        <_>\n          15 10 5 3 2.</_>\n        <_>\n          10 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 10 6 -1.</_>\n        <_>\n          0 10 5 3 2.</_>\n        <_>\n          5 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 4 14 -1.</_>\n        <_>\n          16 5 2 7 2.</_>\n        <_>\n          14 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 9 -1.</_>\n        <_>\n          0 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 4 14 -1.</_>\n        <_>\n          16 5 2 7 2.</_>\n        <_>\n          14 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 4 14 -1.</_>\n        <_>\n          2 5 2 7 2.</_>\n        <_>\n          4 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 12 -1.</_>\n        <_>\n          11 5 9 6 2.</_>\n        <_>\n          2 11 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 5 -1.</_>\n        <_>\n          6 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 20 -1.</_>\n        <_>\n          10 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 16 -1.</_>\n        <_>\n          1 8 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 15 4 -1.</_>\n        <_>\n          6 3 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 5 16 -1.</_>\n        <_>\n          8 12 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 7 6 -1.</_>\n        <_>\n          1 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 12 -1.</_>\n        <_>\n          17 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 15 3 -1.</_>\n        <_>\n          1 4 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 12 -1.</_>\n        <_>\n          8 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 10 -1.</_>\n        <_>\n          8 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 3 -1.</_>\n        <_>\n          4 2 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 3 12 -1.</_>\n        <_>\n          0 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 18 6 -1.</_>\n        <_>\n          7 13 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 7 -1.</_>\n        <_>\n          9 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 5 -1.</_>\n        <_>\n          11 7 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 9 5 -1.</_>\n        <_>\n          6 7 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 8 10 -1.</_>\n        <_>\n          14 10 4 5 2.</_>\n        <_>\n          10 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 8 10 -1.</_>\n        <_>\n          2 10 4 5 2.</_>\n        <_>\n          6 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 10 6 -1.</_>\n        <_>\n          13 14 5 3 2.</_>\n        <_>\n          8 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 7 6 -1.</_>\n        <_>\n          3 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 5 8 -1.</_>\n        <_>\n          8 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 8 -1.</_>\n        <_>\n          7 4 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 7 6 -1.</_>\n        <_>\n          10 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 13 3 -1.</_>\n        <_>\n          7 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 18 4 -1.</_>\n        <_>\n          1 3 9 2 2.</_>\n        <_>\n          10 5 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 8 -1.</_>\n        <_>\n          10 1 4 4 2.</_>\n        <_>\n          6 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 7 -1.</_>\n        <_>\n          10 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 18 6 -1.</_>\n        <_>\n          11 4 9 3 2.</_>\n        <_>\n          2 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 8 8 -1.</_>\n        <_>\n          1 5 4 4 2.</_>\n        <_>\n          5 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 13 -1.</_>\n        <_>\n          14 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 13 -1.</_>\n        <_>\n          5 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 12 3 -1.</_>\n        <_>\n          7 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 3 -1.</_>\n        <_>\n          7 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 7 -1.</_>\n        <_>\n          9 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 12 -1.</_>\n        <_>\n          7 2 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 12 -1.</_>\n        <_>\n          12 5 3 6 2.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 12 -1.</_>\n        <_>\n          5 5 3 6 2.</_>\n        <_>\n          8 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 14 3 -1.</_>\n        <_>\n          5 10 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 18 12 -1.</_>\n        <_>\n          1 3 9 6 2.</_>\n        <_>\n          10 9 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 4 -1.</_>\n        <_>\n          10 11 7 2 2.</_>\n        <_>\n          3 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 14 -1.</_>\n        <_>\n          4 6 2 7 2.</_>\n        <_>\n          6 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 7 -1.</_>\n        <_>\n          11 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 7 -1.</_>\n        <_>\n          7 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 3 -1.</_>\n        <_>\n          6 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 18 4 -1.</_>\n        <_>\n          7 3 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 7 6 -1.</_>\n        <_>\n          13 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 3 -1.</_>\n        <_>\n          10 8 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 13 -1.</_>\n        <_>\n          9 4 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 7 6 -1.</_>\n        <_>\n          10 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 7 6 -1.</_>\n        <_>\n          3 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 3 -1.</_>\n        <_>\n          2 1 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 7 4 -1.</_>\n        <_>\n          2 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 16 8 -1.</_>\n        <_>\n          12 7 8 4 2.</_>\n        <_>\n          4 11 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 16 8 -1.</_>\n        <_>\n          0 7 8 4 2.</_>\n        <_>\n          8 11 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 10 6 -1.</_>\n        <_>\n          12 12 5 3 2.</_>\n        <_>\n          7 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 10 6 -1.</_>\n        <_>\n          3 12 5 3 2.</_>\n        <_>\n          8 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 8 -1.</_>\n        <_>\n          4 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 3 -1.</_>\n        <_>\n          2 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 18 4 -1.</_>\n        <_>\n          11 3 9 2 2.</_>\n        <_>\n          2 5 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 18 -1.</_>\n        <_>\n          5 6 10 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 4 -1.</_>\n        <_>\n          0 3 7 2 2.</_>\n        <_>\n          7 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 15 -1.</_>\n        <_>\n          14 4 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 15 -1.</_>\n        <_>\n          5 4 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 10 -1.</_>\n        <_>\n          16 4 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 10 -1.</_>\n        <_>\n          2 4 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 14 -1.</_>\n        <_>\n          10 5 2 7 2.</_>\n        <_>\n          8 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 12 -1.</_>\n        <_>\n          4 6 6 6 2.</_>\n        <_>\n          10 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 19 -1.</_>\n        <_>\n          10 1 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 3 17 -1.</_>\n        <_>\n          3 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 4 -1.</_>\n        <_>\n          8 7 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 8 6 -1.</_>\n        <_>\n          1 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 9 8 -1.</_>\n        <_>\n          12 9 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 15 -1.</_>\n        <_>\n          0 5 20 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 6 -1.</_>\n        <_>\n          3 4 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 7 4 -1.</_>\n        <_>\n          0 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 3 15 -1.</_>\n        <_>\n          17 2 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 14 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_>\n        <_>\n          7 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 6 -1.</_>\n        <_>\n          12 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 14 4 -1.</_>\n        <_>\n          2 16 7 2 2.</_>\n        <_>\n          9 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 3 15 -1.</_>\n        <_>\n          17 2 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 8 -1.</_>\n        <_>\n          3 0 4 4 2.</_>\n        <_>\n          7 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 14 3 -1.</_>\n        <_>\n          5 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 16 4 -1.</_>\n        <_>\n          1 11 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 5 8 -1.</_>\n        <_>\n          8 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 3 15 -1.</_>\n        <_>\n          2 2 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 6 8 -1.</_>\n        <_>\n          16 11 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 8 -1.</_>\n        <_>\n          2 11 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 12 -1.</_>\n        <_>\n          17 8 3 6 2.</_>\n        <_>\n          14 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 12 -1.</_>\n        <_>\n          0 8 3 6 2.</_>\n        <_>\n          3 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 20 -1.</_>\n        <_>\n          16 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 20 -1.</_>\n        <_>\n          3 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 8 4 -1.</_>\n        <_>\n          8 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 10 -1.</_>\n        <_>\n          9 9 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 9 8 -1.</_>\n        <_>\n          12 9 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 9 8 -1.</_>\n        <_>\n          5 9 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 15 -1.</_>\n        <_>\n          14 5 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 9 5 -1.</_>\n        <_>\n          4 2 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 19 -1.</_>\n        <_>\n          10 1 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 19 -1.</_>\n        <_>\n          9 1 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 3 -1.</_>\n        <_>\n          6 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 3 -1.</_>\n        <_>\n          9 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 10 10 -1.</_>\n        <_>\n          6 3 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 5 -1.</_>\n        <_>\n          9 0 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 10 16 -1.</_>\n        <_>\n          13 1 5 8 2.</_>\n        <_>\n          8 9 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 8 4 -1.</_>\n        <_>\n          8 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 9 4 -1.</_>\n        <_>\n          9 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          4 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 15 -1.</_>\n        <_>\n          14 5 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 15 -1.</_>\n        <_>\n          4 5 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 17 -1.</_>\n        <_>\n          14 0 3 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 17 -1.</_>\n        <_>\n          3 0 3 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 17 2 -1.</_>\n        <_>\n          3 9 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 4 -1.</_>\n        <_>\n          6 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 4 -1.</_>\n        <_>\n          4 4 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 14 3 -1.</_>\n        <_>\n          1 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 13 3 -1.</_>\n        <_>\n          3 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 19 12 -1.</_>\n        <_>\n          1 9 19 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 13 15 -1.</_>\n        <_>\n          2 8 13 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 15 6 -1.</_>\n        <_>\n          10 1 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 3 -1.</_>\n        <_>\n          6 0 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 5 9 -1.</_>\n        <_>\n          15 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 14 4 -1.</_>\n        <_>\n          3 14 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 2 -1.</_>\n        <_>\n          7 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 9 -1.</_>\n        <_>\n          0 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 5 15 -1.</_>\n        <_>\n          14 10 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 5 15 -1.</_>\n        <_>\n          1 10 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 17 -1.</_>\n        <_>\n          10 3 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 8 -1.</_>\n        <_>\n          4 11 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 2 14 -1.</_>\n        <_>\n          5 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 8 -1.</_>\n        <_>\n          9 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 9 15 -1.</_>\n        <_>\n          3 10 9 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 12 -1.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 14 -1.</_>\n        <_>\n          4 3 3 7 2.</_>\n        <_>\n          7 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 10 -1.</_>\n        <_>\n          9 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 8 -1.</_>\n        <_>\n          0 4 10 4 2.</_>\n        <_>\n          10 8 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 10 6 -1.</_>\n        <_>\n          11 11 5 3 2.</_>\n        <_>\n          6 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 8 8 -1.</_>\n        <_>\n          2 9 4 4 2.</_>\n        <_>\n          6 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 14 2 -1.</_>\n        <_>\n          6 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 14 2 -1.</_>\n        <_>\n          7 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 18 12 -1.</_>\n        <_>\n          8 4 6 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 8 -1.</_>\n        <_>\n          9 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 12 -1.</_>\n        <_>\n          12 3 3 6 2.</_>\n        <_>\n          9 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 5 9 -1.</_>\n        <_>\n          6 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 8 -1.</_>\n        <_>\n          10 1 10 4 2.</_>\n        <_>\n          0 5 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 17 -1.</_>\n        <_>\n          8 3 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          17 10 3 5 2.</_>\n        <_>\n          14 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          0 10 3 5 2.</_>\n        <_>\n          3 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 8 -1.</_>\n        <_>\n          16 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 4 8 -1.</_>\n        <_>\n          2 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 7 -1.</_>\n        <_>\n          11 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 11 -1.</_>\n        <_>\n          8 6 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 15 4 -1.</_>\n        <_>\n          5 6 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 5 -1.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 11 -1.</_>\n        <_>\n          14 1 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 3 -1.</_>\n        <_>\n          0 12 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 11 -1.</_>\n        <_>\n          14 1 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 11 -1.</_>\n        <_>\n          4 1 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 8 -1.</_>\n        <_>\n          10 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 7 6 -1.</_>\n        <_>\n          0 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 13 -1.</_>\n        <_>\n          8 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 5 6 -1.</_>\n        <_>\n          15 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 8 -1.</_>\n        <_>\n          11 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 5 6 -1.</_>\n        <_>\n          0 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 3 -1.</_>\n        <_>\n          2 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 2 -1.</_>\n        <_>\n          4 5 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 20 2 -1.</_>\n        <_>\n          0 19 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          14 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 5 -1.</_>\n        <_>\n          3 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 14 -1.</_>\n        <_>\n          10 0 4 7 2.</_>\n        <_>\n          6 7 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 12 -1.</_>\n        <_>\n          2 2 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 9 6 -1.</_>\n        <_>\n          9 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 7 4 -1.</_>\n        <_>\n          2 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          8 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 10 -1.</_>\n        <_>\n          5 0 3 5 2.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 13 -1.</_>\n        <_>\n          18 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 13 -1.</_>\n        <_>\n          18 6 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 13 -1.</_>\n        <_>\n          1 6 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 13 -1.</_>\n        <_>\n          16 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 7 6 -1.</_>\n        <_>\n          6 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 10 6 -1.</_>\n        <_>\n          11 11 5 3 2.</_>\n        <_>\n          6 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 5 -1.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 15 -1.</_>\n        <_>\n          10 3 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 15 -1.</_>\n        <_>\n          8 3 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 13 2 -1.</_>\n        <_>\n          6 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 16 4 -1.</_>\n        <_>\n          2 15 8 2 2.</_>\n        <_>\n          10 17 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 13 -1.</_>\n        <_>\n          18 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 4 13 -1.</_>\n        <_>\n          2 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 13 -1.</_>\n        <_>\n          18 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 9 -1.</_>\n        <_>\n          5 14 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 13 -1.</_>\n        <_>\n          18 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 13 -1.</_>\n        <_>\n          1 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 12 -1.</_>\n        <_>\n          9 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 16 -1.</_>\n        <_>\n          0 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 4 -1.</_>\n        <_>\n          10 15 10 2 2.</_>\n        <_>\n          0 17 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 4 -1.</_>\n        <_>\n          0 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 10 6 -1.</_>\n        <_>\n          14 14 5 3 2.</_>\n        <_>\n          9 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 13 3 -1.</_>\n        <_>\n          4 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 4 -1.</_>\n        <_>\n          0 0 9 2 2.</_>\n        <_>\n          9 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 15 -1.</_>\n        <_>\n          6 10 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 7 -1.</_>\n        <_>\n          2 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 12 -1.</_>\n        <_>\n          16 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          5 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 13 -1.</_>\n        <_>\n          18 1 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 19 -1.</_>\n        <_>\n          5 1 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 4 10 -1.</_>\n        <_>\n          14 2 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 16 -1.</_>\n        <_>\n          0 3 2 8 2.</_>\n        <_>\n          2 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 6 -1.</_>\n        <_>\n          11 0 5 3 2.</_>\n        <_>\n          6 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 10 6 -1.</_>\n        <_>\n          1 14 5 3 2.</_>\n        <_>\n          6 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 5 9 -1.</_>\n        <_>\n          8 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 4 10 -1.</_>\n        <_>\n          4 2 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 7 4 -1.</_>\n        <_>\n          11 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 12 -1.</_>\n        <_>\n          5 6 5 6 2.</_>\n        <_>\n          10 12 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 12 -1.</_>\n        <_>\n          9 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 6 -1.</_>\n        <_>\n          2 3 15 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 13 8 -1.</_>\n        <_>\n          6 4 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 13 8 -1.</_>\n        <_>\n          1 4 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 2 14 -1.</_>\n        <_>\n          11 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 3 -1.</_>\n        <_>\n          0 2 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 10 -1.</_>\n        <_>\n          11 5 3 5 2.</_>\n        <_>\n          8 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 10 12 -1.</_>\n        <_>\n          9 8 5 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 5 -1.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 5 -1.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 7 -1.</_>\n        <_>\n          15 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 7 -1.</_>\n        <_>\n          3 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 6 -1.</_>\n        <_>\n          12 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          6 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 8 -1.</_>\n        <_>\n          10 7 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 18 5 -1.</_>\n        <_>\n          6 14 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 4 -1.</_>\n        <_>\n          10 13 10 2 2.</_>\n        <_>\n          0 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 7 4 -1.</_>\n        <_>\n          11 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 7 6 -1.</_>\n        <_>\n          2 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 6 -1.</_>\n        <_>\n          0 10 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 15 2 -1.</_>\n        <_>\n          4 9 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 5 -1.</_>\n        <_>\n          3 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 6 5 -1.</_>\n        <_>\n          13 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 5 -1.</_>\n        <_>\n          4 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 14 -1.</_>\n        <_>\n          15 0 2 7 2.</_>\n        <_>\n          13 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 19 -1.</_>\n        <_>\n          7 0 7 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 14 -1.</_>\n        <_>\n          15 0 2 7 2.</_>\n        <_>\n          13 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 14 -1.</_>\n        <_>\n          3 0 2 7 2.</_>\n        <_>\n          5 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 7 6 -1.</_>\n        <_>\n          13 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 3 -1.</_>\n        <_>\n          2 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 15 -1.</_>\n        <_>\n          12 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 12 -1.</_>\n        <_>\n          7 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 14 18 -1.</_>\n        <_>\n          13 2 7 9 2.</_>\n        <_>\n          6 11 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 6 -1.</_>\n        <_>\n          5 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 18 -1.</_>\n        <_>\n          10 1 10 9 2.</_>\n        <_>\n          0 10 10 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 7 4 -1.</_>\n        <_>\n          4 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 14 12 -1.</_>\n        <_>\n          1 4 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 8 -1.</_>\n        <_>\n          9 0 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 5 -1.</_>\n        <_>\n          8 2 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 15 -1.</_>\n        <_>\n          12 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 10 -1.</_>\n        <_>\n          8 0 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 13 -1.</_>\n        <_>\n          9 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 18 10 -1.</_>\n        <_>\n          0 4 9 5 2.</_>\n        <_>\n          9 9 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 7 6 -1.</_>\n        <_>\n          12 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 7 6 -1.</_>\n        <_>\n          1 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 6 -1.</_>\n        <_>\n          12 3 8 3 2.</_>\n        <_>\n          4 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 5 9 -1.</_>\n        <_>\n          3 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 12 5 -1.</_>\n        <_>\n          12 4 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 8 4 -1.</_>\n        <_>\n          3 11 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 15 -1.</_>\n        <_>\n          11 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 15 -1.</_>\n        <_>\n          8 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 8 -1.</_>\n        <_>\n          10 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 7 -1.</_>\n        <_>\n          11 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 9 5 -1.</_>\n        <_>\n          7 14 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 4 17 -1.</_>\n        <_>\n          15 3 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 13 -1.</_>\n        <_>\n          3 6 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 4 7 -1.</_>\n        <_>\n          11 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 7 -1.</_>\n        <_>\n          2 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 7 -1.</_>\n        <_>\n          11 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 7 -1.</_>\n        <_>\n          7 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 8 -1.</_>\n        <_>\n          9 7 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          0 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 14 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_>\n        <_>\n          7 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 13 3 -1.</_>\n        <_>\n          5 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 14 3 -1.</_>\n        <_>\n          2 10 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 7 4 -1.</_>\n        <_>\n          8 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 6 -1.</_>\n        <_>\n          2 14 5 3 2.</_>\n        <_>\n          7 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 5 6 -1.</_>\n        <_>\n          13 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 3 -1.</_>\n        <_>\n          4 5 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 14 -1.</_>\n        <_>\n          5 10 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 15 5 -1.</_>\n        <_>\n          9 13 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 2 -1.</_>\n        <_>\n          0 4 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 15 5 -1.</_>\n        <_>\n          9 13 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 15 5 -1.</_>\n        <_>\n          6 13 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 6 -1.</_>\n        <_>\n          12 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 5 -1.</_>\n        <_>\n          6 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 14 8 -1.</_>\n        <_>\n          11 7 7 4 2.</_>\n        <_>\n          4 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 14 8 -1.</_>\n        <_>\n          2 7 7 4 2.</_>\n        <_>\n          9 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 20 -1.</_>\n        <_>\n          11 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 20 -1.</_>\n        <_>\n          8 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 8 -1.</_>\n        <_>\n          12 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 13 -1.</_>\n        <_>\n          9 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 4 -1.</_>\n        <_>\n          10 2 7 2 2.</_>\n        <_>\n          3 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 9 16 -1.</_>\n        <_>\n          11 4 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 8 -1.</_>\n        <_>\n          6 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          10 10 3 5 2.</_>\n        <_>\n          7 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 5 6 -1.</_>\n        <_>\n          5 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 13 8 -1.</_>\n        <_>\n          4 12 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 6 -1.</_>\n        <_>\n          0 9 5 3 2.</_>\n        <_>\n          5 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 5 8 -1.</_>\n        <_>\n          4 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 10 -1.</_>\n        <_>\n          8 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 7 10 -1.</_>\n        <_>\n          6 8 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 3 -1.</_>\n        <_>\n          6 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 13 3 -1.</_>\n        <_>\n          2 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 4 -1.</_>\n        <_>\n          12 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 7 4 -1.</_>\n        <_>\n          1 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 9 4 -1.</_>\n        <_>\n          9 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 4 -1.</_>\n        <_>\n          2 12 8 2 2.</_>\n        <_>\n          10 14 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 10 6 -1.</_>\n        <_>\n          15 14 5 3 2.</_>\n        <_>\n          10 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 8 8 -1.</_>\n        <_>\n          4 1 4 4 2.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 7 -1.</_>\n        <_>\n          8 12 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 12 6 -1.</_>\n        <_>\n          3 13 6 3 2.</_>\n        <_>\n          9 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 13 4 -1.</_>\n        <_>\n          4 14 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 15 -1.</_>\n        <_>\n          7 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 16 18 -1.</_>\n        <_>\n          12 2 8 9 2.</_>\n        <_>\n          4 11 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 4 -1.</_>\n        <_>\n          7 16 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 6 -1.</_>\n        <_>\n          13 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 9 -1.</_>\n        <_>\n          8 0 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 6 -1.</_>\n        <_>\n          7 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 12 8 -1.</_>\n        <_>\n          13 12 6 4 2.</_>\n        <_>\n          7 16 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 12 8 -1.</_>\n        <_>\n          1 12 6 4 2.</_>\n        <_>\n          7 16 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 9 -1.</_>\n        <_>\n          0 13 20 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 6 -1.</_>\n        <_>\n          4 5 5 3 2.</_>\n        <_>\n          9 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 7 6 -1.</_>\n        <_>\n          13 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 14 -1.</_>\n        <_>\n          8 1 2 7 2.</_>\n        <_>\n          10 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 5 6 -1.</_>\n        <_>\n          12 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 5 6 -1.</_>\n        <_>\n          3 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 4 -1.</_>\n        <_>\n          8 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 14 -1.</_>\n        <_>\n          6 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 15 3 -1.</_>\n        <_>\n          10 17 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          6 0 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 17 -1.</_>\n        <_>\n          8 3 6 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 16 12 -1.</_>\n        <_>\n          8 2 8 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 12 -1.</_>\n        <_>\n          7 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 8 -1.</_>\n        <_>\n          8 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 12 10 -1.</_>\n        <_>\n          14 7 6 5 2.</_>\n        <_>\n          8 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 5 -1.</_>\n        <_>\n          10 1 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 8 -1.</_>\n        <_>\n          11 2 4 4 2.</_>\n        <_>\n          7 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 8 -1.</_>\n        <_>\n          5 2 4 4 2.</_>\n        <_>\n          9 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 6 -1.</_>\n        <_>\n          3 17 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 5 12 -1.</_>\n        <_>\n          3 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 6 -1.</_>\n        <_>\n          15 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 6 -1.</_>\n        <_>\n          0 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 9 -1.</_>\n        <_>\n          15 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 14 -1.</_>\n        <_>\n          8 6 2 7 2.</_>\n        <_>\n          10 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 10 -1.</_>\n        <_>\n          5 0 4 5 2.</_>\n        <_>\n          9 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 7 -1.</_>\n        <_>\n          11 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 7 -1.</_>\n        <_>\n          7 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 7 6 -1.</_>\n        <_>\n          13 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 6 -1.</_>\n        <_>\n          1 3 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 17 6 -1.</_>\n        <_>\n          2 3 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 2 16 -1.</_>\n        <_>\n          4 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 14 -1.</_>\n        <_>\n          12 6 5 7 2.</_>\n        <_>\n          7 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 6 -1.</_>\n        <_>\n          10 9 6 3 2.</_>\n        <_>\n          4 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 3 -1.</_>\n        <_>\n          7 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 7 -1.</_>\n        <_>\n          8 13 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 3 -1.</_>\n        <_>\n          6 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 7 -1.</_>\n        <_>\n          10 0 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 3 -1.</_>\n        <_>\n          3 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 4 -1.</_>\n        <_>\n          12 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 8 -1.</_>\n        <_>\n          6 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 12 -1.</_>\n        <_>\n          9 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 7 6 -1.</_>\n        <_>\n          0 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 9 -1.</_>\n        <_>\n          15 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 13 2 -1.</_>\n        <_>\n          2 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 12 -1.</_>\n        <_>\n          6 10 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 9 -1.</_>\n        <_>\n          7 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 11 4 -1.</_>\n        <_>\n          0 9 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 10 6 -1.</_>\n        <_>\n          13 12 5 3 2.</_>\n        <_>\n          8 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 10 6 -1.</_>\n        <_>\n          2 12 5 3 2.</_>\n        <_>\n          7 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 8 6 -1.</_>\n        <_>\n          12 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          0 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 13 -1.</_>\n        <_>\n          18 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 8 -1.</_>\n        <_>\n          4 5 4 4 2.</_>\n        <_>\n          8 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 13 -1.</_>\n        <_>\n          18 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 8 -1.</_>\n        <_>\n          7 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 11 4 -1.</_>\n        <_>\n          9 10 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 5 10 -1.</_>\n        <_>\n          6 11 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 14 6 -1.</_>\n        <_>\n          4 9 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 8 -1.</_>\n        <_>\n          4 4 6 4 2.</_>\n        <_>\n          10 8 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 5 -1.</_>\n        <_>\n          5 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 15 12 -1.</_>\n        <_>\n          6 3 5 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 6 17 -1.</_>\n        <_>\n          13 3 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 17 -1.</_>\n        <_>\n          4 3 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 9 -1.</_>\n        <_>\n          14 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 6 -1.</_>\n        <_>\n          4 3 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 15 3 -1.</_>\n        <_>\n          5 5 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 4 -1.</_>\n        <_>\n          0 7 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 13 -1.</_>\n        <_>\n          18 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 13 -1.</_>\n        <_>\n          1 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 13 -1.</_>\n        <_>\n          18 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 13 -1.</_>\n        <_>\n          1 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 13 2 -1.</_>\n        <_>\n          4 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 4 -1.</_>\n        <_>\n          2 14 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 3 -1.</_>\n        <_>\n          6 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 3 -1.</_>\n        <_>\n          1 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 3 -1.</_>\n        <_>\n          6 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 3 -1.</_>\n        <_>\n          9 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 6 -1.</_>\n        <_>\n          6 4 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 7 4 -1.</_>\n        <_>\n          6 7 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 9 -1.</_>\n        <_>\n          9 8 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 4 -1.</_>\n        <_>\n          0 10 9 2 2.</_>\n        <_>\n          9 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 9 -1.</_>\n        <_>\n          10 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 7 -1.</_>\n        <_>\n          8 4 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 10 -1.</_>\n        <_>\n          12 6 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 10 6 -1.</_>\n        <_>\n          15 14 5 3 2.</_>\n        <_>\n          10 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 5 12 -1.</_>\n        <_>\n          0 10 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 10 -1.</_>\n        <_>\n          12 6 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 10 7 -1.</_>\n        <_>\n          6 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 17 -1.</_>\n        <_>\n          3 2 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 9 5 -1.</_>\n        <_>\n          13 14 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 9 5 -1.</_>\n        <_>\n          4 14 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 7 6 -1.</_>\n        <_>\n          7 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 7 6 -1.</_>\n        <_>\n          1 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 8 6 -1.</_>\n        <_>\n          12 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 9 9 -1.</_>\n        <_>\n          5 6 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 7 6 -1.</_>\n        <_>\n          12 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 12 -1.</_>\n        <_>\n          5 2 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 7 15 -1.</_>\n        <_>\n          9 6 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 7 -1.</_>\n        <_>\n          8 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 20 -1.</_>\n        <_>\n          10 0 5 10 2.</_>\n        <_>\n          5 10 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          9 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 7 4 -1.</_>\n        <_>\n          12 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 16 4 -1.</_>\n        <_>\n          2 7 8 2 2.</_>\n        <_>\n          10 9 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 10 -1.</_>\n        <_>\n          5 10 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 2 16 -1.</_>\n        <_>\n          6 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 10 -1.</_>\n        <_>\n          6 7 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 6 -1.</_>\n        <_>\n          2 4 7 3 2.</_>\n        <_>\n          9 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 11 12 -1.</_>\n        <_>\n          5 4 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 12 -1.</_>\n        <_>\n          7 5 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 11 4 -1.</_>\n        <_>\n          9 10 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 11 4 -1.</_>\n        <_>\n          0 10 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 19 6 -1.</_>\n        <_>\n          1 11 19 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 8 -1.</_>\n        <_>\n          7 4 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 15 2 -1.</_>\n        <_>\n          5 4 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 14 6 -1.</_>\n        <_>\n          2 9 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 6 -1.</_>\n        <_>\n          3 2 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 17 6 -1.</_>\n        <_>\n          0 2 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 7 4 -1.</_>\n        <_>\n          13 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 7 4 -1.</_>\n        <_>\n          0 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 10 -1.</_>\n        <_>\n          14 1 6 5 2.</_>\n        <_>\n          8 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 8 -1.</_>\n        <_>\n          2 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 11 10 -1.</_>\n        <_>\n          5 6 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 10 6 -1.</_>\n        <_>\n          3 9 5 3 2.</_>\n        <_>\n          8 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 7 4 -1.</_>\n        <_>\n          12 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 12 8 -1.</_>\n        <_>\n          6 7 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 8 4 -1.</_>\n        <_>\n          10 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 8 4 -1.</_>\n        <_>\n          6 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 3 -1.</_>\n        <_>\n          3 10 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 5 -1.</_>\n        <_>\n          4 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 9 9 -1.</_>\n        <_>\n          13 7 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 9 9 -1.</_>\n        <_>\n          4 7 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 5 -1.</_>\n        <_>\n          5 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 5 -1.</_>\n        <_>\n          9 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 16 2 -1.</_>\n        <_>\n          2 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 7 6 -1.</_>\n        <_>\n          2 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 6 -1.</_>\n        <_>\n          7 10 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 15 -1.</_>\n        <_>\n          4 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 3 -1.</_>\n        <_>\n          3 10 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 16 3 -1.</_>\n        <_>\n          9 10 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 19 -1.</_>\n        <_>\n          12 0 4 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 19 -1.</_>\n        <_>\n          4 0 4 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 14 3 -1.</_>\n        <_>\n          6 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 14 3 -1.</_>\n        <_>\n          6 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 16 4 -1.</_>\n        <_>\n          0 12 8 2 2.</_>\n        <_>\n          8 14 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 6 -1.</_>\n        <_>\n          13 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 6 -1.</_>\n        <_>\n          1 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 14 -1.</_>\n        <_>\n          10 3 7 7 2.</_>\n        <_>\n          3 10 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 12 -1.</_>\n        <_>\n          5 6 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 12 6 -1.</_>\n        <_>\n          9 12 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 14 6 -1.</_>\n        <_>\n          1 8 7 3 2.</_>\n        <_>\n          8 11 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 12 10 -1.</_>\n        <_>\n          14 7 6 5 2.</_>\n        <_>\n          8 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 10 -1.</_>\n        <_>\n          0 7 6 5 2.</_>\n        <_>\n          6 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 18 -1.</_>\n        <_>\n          12 2 3 9 2.</_>\n        <_>\n          9 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 8 10 -1.</_>\n        <_>\n          1 10 4 5 2.</_>\n        <_>\n          5 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 4 -1.</_>\n        <_>\n          4 16 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 6 7 -1.</_>\n        <_>\n          7 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 15 5 -1.</_>\n        <_>\n          10 2 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 14 -1.</_>\n        <_>\n          5 11 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 11 4 -1.</_>\n        <_>\n          8 2 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 16 6 -1.</_>\n        <_>\n          0 16 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 8 6 -1.</_>\n        <_>\n          10 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 13 3 -1.</_>\n        <_>\n          0 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 15 3 -1.</_>\n        <_>\n          5 9 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 19 3 -1.</_>\n        <_>\n          0 9 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 8 4 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 8 4 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 9 -1.</_>\n        <_>\n          9 8 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 10 9 -1.</_>\n        <_>\n          1 8 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 14 2 -1.</_>\n        <_>\n          4 7 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 13 2 -1.</_>\n        <_>\n          2 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 4 -1.</_>\n        <_>\n          6 7 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 9 5 -1.</_>\n        <_>\n          8 12 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 3 -1.</_>\n        <_>\n          3 7 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 12 -1.</_>\n        <_>\n          7 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 16 4 -1.</_>\n        <_>\n          2 6 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 9 4 -1.</_>\n        <_>\n          1 6 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 11 4 -1.</_>\n        <_>\n          9 6 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 8 -1.</_>\n        <_>\n          4 5 4 4 2.</_>\n        <_>\n          8 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 3 -1.</_>\n        <_>\n          7 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 7 -1.</_>\n        <_>\n          6 0 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 5 15 -1.</_>\n        <_>\n          12 5 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 5 15 -1.</_>\n        <_>\n          3 5 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 8 -1.</_>\n        <_>\n          10 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 7 -1.</_>\n        <_>\n          10 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 11 -1.</_>\n        <_>\n          8 6 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 4 -1.</_>\n        <_>\n          1 9 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 8 -1.</_>\n        <_>\n          10 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 5 -1.</_>\n        <_>\n          10 2 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 7 -1.</_>\n        <_>\n          9 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 6 -1.</_>\n        <_>\n          0 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 7 6 -1.</_>\n        <_>\n          13 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 15 4 -1.</_>\n        <_>\n          5 6 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 5 -1.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 11 -1.</_>\n        <_>\n          14 1 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 3 -1.</_>\n        <_>\n          0 12 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 11 -1.</_>\n        <_>\n          14 1 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 11 -1.</_>\n        <_>\n          4 1 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 8 -1.</_>\n        <_>\n          10 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 7 6 -1.</_>\n        <_>\n          0 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 13 -1.</_>\n        <_>\n          8 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 5 6 -1.</_>\n        <_>\n          15 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 8 -1.</_>\n        <_>\n          11 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 5 6 -1.</_>\n        <_>\n          0 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 3 -1.</_>\n        <_>\n          2 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 2 -1.</_>\n        <_>\n          4 5 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 20 2 -1.</_>\n        <_>\n          0 19 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          14 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 5 -1.</_>\n        <_>\n          3 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 14 -1.</_>\n        <_>\n          10 0 4 7 2.</_>\n        <_>\n          6 7 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 12 -1.</_>\n        <_>\n          2 2 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 9 6 -1.</_>\n        <_>\n          9 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 7 4 -1.</_>\n        <_>\n          2 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          8 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 10 -1.</_>\n        <_>\n          5 0 3 5 2.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 13 -1.</_>\n        <_>\n          18 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 13 -1.</_>\n        <_>\n          18 6 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 13 -1.</_>\n        <_>\n          1 6 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 13 -1.</_>\n        <_>\n          16 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 7 6 -1.</_>\n        <_>\n          6 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 10 6 -1.</_>\n        <_>\n          11 11 5 3 2.</_>\n        <_>\n          6 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 5 -1.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 15 -1.</_>\n        <_>\n          10 3 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 15 -1.</_>\n        <_>\n          8 3 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 13 2 -1.</_>\n        <_>\n          6 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 16 4 -1.</_>\n        <_>\n          2 15 8 2 2.</_>\n        <_>\n          10 17 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 13 -1.</_>\n        <_>\n          18 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 4 13 -1.</_>\n        <_>\n          2 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 13 -1.</_>\n        <_>\n          18 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 9 -1.</_>\n        <_>\n          5 14 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 13 -1.</_>\n        <_>\n          18 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 13 -1.</_>\n        <_>\n          1 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 12 -1.</_>\n        <_>\n          9 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 16 -1.</_>\n        <_>\n          0 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 4 -1.</_>\n        <_>\n          10 15 10 2 2.</_>\n        <_>\n          0 17 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 4 -1.</_>\n        <_>\n          0 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 10 6 -1.</_>\n        <_>\n          14 14 5 3 2.</_>\n        <_>\n          9 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 13 3 -1.</_>\n        <_>\n          4 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 4 -1.</_>\n        <_>\n          0 0 9 2 2.</_>\n        <_>\n          9 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 15 -1.</_>\n        <_>\n          6 10 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 7 -1.</_>\n        <_>\n          2 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 12 -1.</_>\n        <_>\n          16 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          5 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 13 -1.</_>\n        <_>\n          18 1 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 19 -1.</_>\n        <_>\n          5 1 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 4 10 -1.</_>\n        <_>\n          14 2 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 16 -1.</_>\n        <_>\n          0 3 2 8 2.</_>\n        <_>\n          2 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 6 -1.</_>\n        <_>\n          11 0 5 3 2.</_>\n        <_>\n          6 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 10 6 -1.</_>\n        <_>\n          1 14 5 3 2.</_>\n        <_>\n          6 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 5 9 -1.</_>\n        <_>\n          8 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 4 10 -1.</_>\n        <_>\n          4 2 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 7 4 -1.</_>\n        <_>\n          11 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 12 -1.</_>\n        <_>\n          5 6 5 6 2.</_>\n        <_>\n          10 12 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 12 -1.</_>\n        <_>\n          9 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 6 -1.</_>\n        <_>\n          2 3 15 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 13 8 -1.</_>\n        <_>\n          6 4 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 13 8 -1.</_>\n        <_>\n          1 4 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 2 14 -1.</_>\n        <_>\n          11 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 3 -1.</_>\n        <_>\n          0 2 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 10 -1.</_>\n        <_>\n          11 5 3 5 2.</_>\n        <_>\n          8 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 10 12 -1.</_>\n        <_>\n          9 8 5 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 5 -1.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 5 -1.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 7 -1.</_>\n        <_>\n          15 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 7 -1.</_>\n        <_>\n          3 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 6 -1.</_>\n        <_>\n          12 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          6 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 8 -1.</_>\n        <_>\n          10 7 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 18 5 -1.</_>\n        <_>\n          6 14 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 4 -1.</_>\n        <_>\n          10 13 10 2 2.</_>\n        <_>\n          0 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 7 4 -1.</_>\n        <_>\n          11 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 7 6 -1.</_>\n        <_>\n          2 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 6 -1.</_>\n        <_>\n          0 10 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 15 2 -1.</_>\n        <_>\n          4 9 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 5 -1.</_>\n        <_>\n          3 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 6 5 -1.</_>\n        <_>\n          13 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 5 -1.</_>\n        <_>\n          4 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 14 -1.</_>\n        <_>\n          15 0 2 7 2.</_>\n        <_>\n          13 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 19 -1.</_>\n        <_>\n          7 0 7 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 14 -1.</_>\n        <_>\n          15 0 2 7 2.</_>\n        <_>\n          13 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 14 -1.</_>\n        <_>\n          3 0 2 7 2.</_>\n        <_>\n          5 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 7 6 -1.</_>\n        <_>\n          13 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 3 -1.</_>\n        <_>\n          2 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 15 -1.</_>\n        <_>\n          12 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 12 -1.</_>\n        <_>\n          7 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 14 18 -1.</_>\n        <_>\n          13 2 7 9 2.</_>\n        <_>\n          6 11 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 6 -1.</_>\n        <_>\n          5 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 18 -1.</_>\n        <_>\n          10 1 10 9 2.</_>\n        <_>\n          0 10 10 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 7 4 -1.</_>\n        <_>\n          4 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 14 12 -1.</_>\n        <_>\n          1 4 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 8 -1.</_>\n        <_>\n          9 0 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 5 -1.</_>\n        <_>\n          8 2 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 15 -1.</_>\n        <_>\n          12 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 10 -1.</_>\n        <_>\n          8 0 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 13 -1.</_>\n        <_>\n          9 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 18 10 -1.</_>\n        <_>\n          0 4 9 5 2.</_>\n        <_>\n          9 9 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 7 6 -1.</_>\n        <_>\n          12 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 7 6 -1.</_>\n        <_>\n          1 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 6 -1.</_>\n        <_>\n          12 3 8 3 2.</_>\n        <_>\n          4 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 5 9 -1.</_>\n        <_>\n          3 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 12 5 -1.</_>\n        <_>\n          12 4 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 8 4 -1.</_>\n        <_>\n          3 11 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 15 -1.</_>\n        <_>\n          11 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 15 -1.</_>\n        <_>\n          8 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 8 -1.</_>\n        <_>\n          10 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 7 -1.</_>\n        <_>\n          11 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 9 5 -1.</_>\n        <_>\n          7 14 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 4 17 -1.</_>\n        <_>\n          15 3 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 13 -1.</_>\n        <_>\n          3 6 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 4 7 -1.</_>\n        <_>\n          11 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 7 -1.</_>\n        <_>\n          2 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 7 -1.</_>\n        <_>\n          11 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 7 -1.</_>\n        <_>\n          7 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 8 -1.</_>\n        <_>\n          9 7 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          0 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 14 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_>\n        <_>\n          7 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 13 3 -1.</_>\n        <_>\n          5 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 14 3 -1.</_>\n        <_>\n          2 10 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 7 4 -1.</_>\n        <_>\n          8 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 6 -1.</_>\n        <_>\n          2 14 5 3 2.</_>\n        <_>\n          7 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 5 6 -1.</_>\n        <_>\n          13 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 3 -1.</_>\n        <_>\n          4 5 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 14 -1.</_>\n        <_>\n          5 10 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 15 5 -1.</_>\n        <_>\n          9 13 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 2 -1.</_>\n        <_>\n          0 4 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 15 5 -1.</_>\n        <_>\n          9 13 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 15 5 -1.</_>\n        <_>\n          6 13 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 6 -1.</_>\n        <_>\n          12 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 5 -1.</_>\n        <_>\n          6 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 14 8 -1.</_>\n        <_>\n          11 7 7 4 2.</_>\n        <_>\n          4 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 14 8 -1.</_>\n        <_>\n          2 7 7 4 2.</_>\n        <_>\n          9 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 20 -1.</_>\n        <_>\n          11 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 20 -1.</_>\n        <_>\n          8 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 8 -1.</_>\n        <_>\n          12 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 13 -1.</_>\n        <_>\n          9 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 4 -1.</_>\n        <_>\n          10 2 7 2 2.</_>\n        <_>\n          3 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 7 -1.</_>\n        <_>\n          9 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 9 16 -1.</_>\n        <_>\n          11 4 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 8 -1.</_>\n        <_>\n          6 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          10 10 3 5 2.</_>\n        <_>\n          7 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 5 6 -1.</_>\n        <_>\n          5 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 13 8 -1.</_>\n        <_>\n          4 12 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 6 -1.</_>\n        <_>\n          0 9 5 3 2.</_>\n        <_>\n          5 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 5 8 -1.</_>\n        <_>\n          4 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 10 -1.</_>\n        <_>\n          8 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 7 10 -1.</_>\n        <_>\n          6 8 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 3 -1.</_>\n        <_>\n          6 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 13 3 -1.</_>\n        <_>\n          2 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 4 -1.</_>\n        <_>\n          12 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 7 4 -1.</_>\n        <_>\n          1 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 9 4 -1.</_>\n        <_>\n          9 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 4 -1.</_>\n        <_>\n          2 12 8 2 2.</_>\n        <_>\n          10 14 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 10 6 -1.</_>\n        <_>\n          15 14 5 3 2.</_>\n        <_>\n          10 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 8 8 -1.</_>\n        <_>\n          4 1 4 4 2.</_>\n        <_>\n          8 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 7 -1.</_>\n        <_>\n          8 12 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 12 6 -1.</_>\n        <_>\n          3 13 6 3 2.</_>\n        <_>\n          9 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 13 4 -1.</_>\n        <_>\n          4 14 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 15 -1.</_>\n        <_>\n          7 0 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 16 18 -1.</_>\n        <_>\n          12 2 8 9 2.</_>\n        <_>\n          4 11 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 4 -1.</_>\n        <_>\n          7 16 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 6 -1.</_>\n        <_>\n          13 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 9 -1.</_>\n        <_>\n          8 0 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 6 -1.</_>\n        <_>\n          7 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 12 8 -1.</_>\n        <_>\n          13 12 6 4 2.</_>\n        <_>\n          7 16 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 12 8 -1.</_>\n        <_>\n          1 12 6 4 2.</_>\n        <_>\n          7 16 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 9 -1.</_>\n        <_>\n          0 13 20 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 6 -1.</_>\n        <_>\n          4 5 5 3 2.</_>\n        <_>\n          9 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 7 6 -1.</_>\n        <_>\n          13 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 14 -1.</_>\n        <_>\n          8 1 2 7 2.</_>\n        <_>\n          10 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 5 6 -1.</_>\n        <_>\n          12 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 5 6 -1.</_>\n        <_>\n          3 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 4 -1.</_>\n        <_>\n          8 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 14 -1.</_>\n        <_>\n          6 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 15 3 -1.</_>\n        <_>\n          10 17 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          6 0 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 17 -1.</_>\n        <_>\n          8 3 6 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 16 12 -1.</_>\n        <_>\n          8 2 8 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 12 -1.</_>\n        <_>\n          7 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 8 -1.</_>\n        <_>\n          8 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 12 10 -1.</_>\n        <_>\n          14 7 6 5 2.</_>\n        <_>\n          8 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 5 -1.</_>\n        <_>\n          10 1 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 8 -1.</_>\n        <_>\n          11 2 4 4 2.</_>\n        <_>\n          7 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 8 -1.</_>\n        <_>\n          5 2 4 4 2.</_>\n        <_>\n          9 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 6 -1.</_>\n        <_>\n          3 17 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 5 12 -1.</_>\n        <_>\n          3 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 6 -1.</_>\n        <_>\n          15 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 6 -1.</_>\n        <_>\n          0 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 9 -1.</_>\n        <_>\n          15 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 14 -1.</_>\n        <_>\n          8 6 2 7 2.</_>\n        <_>\n          10 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 10 -1.</_>\n        <_>\n          5 0 4 5 2.</_>\n        <_>\n          9 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 7 -1.</_>\n        <_>\n          11 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 7 -1.</_>\n        <_>\n          7 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 7 6 -1.</_>\n        <_>\n          13 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 6 -1.</_>\n        <_>\n          1 3 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 17 6 -1.</_>\n        <_>\n          2 3 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 2 16 -1.</_>\n        <_>\n          4 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 14 -1.</_>\n        <_>\n          12 6 5 7 2.</_>\n        <_>\n          7 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 6 -1.</_>\n        <_>\n          10 9 6 3 2.</_>\n        <_>\n          4 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 3 -1.</_>\n        <_>\n          7 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 7 -1.</_>\n        <_>\n          8 13 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 3 -1.</_>\n        <_>\n          6 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 7 -1.</_>\n        <_>\n          10 0 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 3 -1.</_>\n        <_>\n          3 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 4 -1.</_>\n        <_>\n          12 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 8 -1.</_>\n        <_>\n          6 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 12 -1.</_>\n        <_>\n          9 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 7 6 -1.</_>\n        <_>\n          0 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 5 9 -1.</_>\n        <_>\n          15 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 13 2 -1.</_>\n        <_>\n          2 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 12 -1.</_>\n        <_>\n          6 10 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 9 -1.</_>\n        <_>\n          7 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 11 4 -1.</_>\n        <_>\n          0 9 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 10 6 -1.</_>\n        <_>\n          13 12 5 3 2.</_>\n        <_>\n          8 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 10 6 -1.</_>\n        <_>\n          2 12 5 3 2.</_>\n        <_>\n          7 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 8 6 -1.</_>\n        <_>\n          12 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          0 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 13 -1.</_>\n        <_>\n          18 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 8 -1.</_>\n        <_>\n          4 5 4 4 2.</_>\n        <_>\n          8 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 13 -1.</_>\n        <_>\n          18 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 8 -1.</_>\n        <_>\n          7 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 11 4 -1.</_>\n        <_>\n          9 10 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 5 10 -1.</_>\n        <_>\n          6 11 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 14 6 -1.</_>\n        <_>\n          4 9 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 8 -1.</_>\n        <_>\n          4 4 6 4 2.</_>\n        <_>\n          10 8 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 5 -1.</_>\n        <_>\n          5 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 15 12 -1.</_>\n        <_>\n          6 3 5 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 6 17 -1.</_>\n        <_>\n          13 3 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 17 -1.</_>\n        <_>\n          4 3 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 9 -1.</_>\n        <_>\n          14 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 6 -1.</_>\n        <_>\n          4 3 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 15 3 -1.</_>\n        <_>\n          5 5 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 4 -1.</_>\n        <_>\n          0 7 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 13 -1.</_>\n        <_>\n          18 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 13 -1.</_>\n        <_>\n          1 2 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 13 -1.</_>\n        <_>\n          18 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 13 -1.</_>\n        <_>\n          1 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 13 2 -1.</_>\n        <_>\n          4 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 4 -1.</_>\n        <_>\n          2 14 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 3 -1.</_>\n        <_>\n          6 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 3 -1.</_>\n        <_>\n          1 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 3 -1.</_>\n        <_>\n          6 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 3 -1.</_>\n        <_>\n          9 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 6 -1.</_>\n        <_>\n          6 4 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 7 4 -1.</_>\n        <_>\n          6 7 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 9 -1.</_>\n        <_>\n          9 8 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 4 -1.</_>\n        <_>\n          0 10 9 2 2.</_>\n        <_>\n          9 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 9 -1.</_>\n        <_>\n          10 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 7 -1.</_>\n        <_>\n          8 4 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 10 -1.</_>\n        <_>\n          12 6 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 10 6 -1.</_>\n        <_>\n          15 14 5 3 2.</_>\n        <_>\n          10 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 5 12 -1.</_>\n        <_>\n          0 10 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 10 -1.</_>\n        <_>\n          12 6 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 10 7 -1.</_>\n        <_>\n          6 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 17 -1.</_>\n        <_>\n          3 2 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 9 5 -1.</_>\n        <_>\n          13 14 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 9 5 -1.</_>\n        <_>\n          4 14 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 7 6 -1.</_>\n        <_>\n          7 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 7 6 -1.</_>\n        <_>\n          1 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 8 6 -1.</_>\n        <_>\n          12 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 9 9 -1.</_>\n        <_>\n          5 6 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 7 6 -1.</_>\n        <_>\n          12 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 12 -1.</_>\n        <_>\n          5 2 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 7 15 -1.</_>\n        <_>\n          9 6 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 7 -1.</_>\n        <_>\n          8 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 20 -1.</_>\n        <_>\n          10 0 5 10 2.</_>\n        <_>\n          5 10 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 10 -1.</_>\n        <_>\n          9 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 7 4 -1.</_>\n        <_>\n          12 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 16 4 -1.</_>\n        <_>\n          2 7 8 2 2.</_>\n        <_>\n          10 9 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 10 -1.</_>\n        <_>\n          5 10 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 2 16 -1.</_>\n        <_>\n          6 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 10 -1.</_>\n        <_>\n          6 7 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 6 -1.</_>\n        <_>\n          2 4 7 3 2.</_>\n        <_>\n          9 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 11 12 -1.</_>\n        <_>\n          5 4 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 12 -1.</_>\n        <_>\n          7 5 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 11 4 -1.</_>\n        <_>\n          9 10 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 11 4 -1.</_>\n        <_>\n          0 10 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 19 6 -1.</_>\n        <_>\n          1 11 19 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 8 -1.</_>\n        <_>\n          7 4 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 15 2 -1.</_>\n        <_>\n          5 4 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 14 6 -1.</_>\n        <_>\n          2 9 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 6 -1.</_>\n        <_>\n          3 2 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 17 6 -1.</_>\n        <_>\n          0 2 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 7 4 -1.</_>\n        <_>\n          13 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 7 4 -1.</_>\n        <_>\n          0 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 10 -1.</_>\n        <_>\n          14 1 6 5 2.</_>\n        <_>\n          8 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 8 -1.</_>\n        <_>\n          2 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 11 10 -1.</_>\n        <_>\n          5 6 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 10 6 -1.</_>\n        <_>\n          3 9 5 3 2.</_>\n        <_>\n          8 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 7 4 -1.</_>\n        <_>\n          12 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 12 8 -1.</_>\n        <_>\n          6 7 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 8 4 -1.</_>\n        <_>\n          10 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 8 4 -1.</_>\n        <_>\n          6 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 3 -1.</_>\n        <_>\n          3 10 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 5 -1.</_>\n        <_>\n          4 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 9 9 -1.</_>\n        <_>\n          13 7 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 9 9 -1.</_>\n        <_>\n          4 7 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 5 -1.</_>\n        <_>\n          5 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 5 -1.</_>\n        <_>\n          9 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 16 2 -1.</_>\n        <_>\n          2 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 7 6 -1.</_>\n        <_>\n          2 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 6 -1.</_>\n        <_>\n          7 10 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 15 -1.</_>\n        <_>\n          4 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 3 -1.</_>\n        <_>\n          3 10 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 16 3 -1.</_>\n        <_>\n          9 10 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 19 -1.</_>\n        <_>\n          12 0 4 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 19 -1.</_>\n        <_>\n          4 0 4 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 14 3 -1.</_>\n        <_>\n          6 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 14 3 -1.</_>\n        <_>\n          6 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 16 4 -1.</_>\n        <_>\n          0 12 8 2 2.</_>\n        <_>\n          8 14 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 6 -1.</_>\n        <_>\n          13 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 6 -1.</_>\n        <_>\n          1 14 6 3 2.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 14 -1.</_>\n        <_>\n          10 3 7 7 2.</_>\n        <_>\n          3 10 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 12 -1.</_>\n        <_>\n          5 6 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 12 6 -1.</_>\n        <_>\n          9 12 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 14 6 -1.</_>\n        <_>\n          1 8 7 3 2.</_>\n        <_>\n          8 11 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 12 10 -1.</_>\n        <_>\n          14 7 6 5 2.</_>\n        <_>\n          8 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 10 -1.</_>\n        <_>\n          0 7 6 5 2.</_>\n        <_>\n          6 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 18 -1.</_>\n        <_>\n          12 2 3 9 2.</_>\n        <_>\n          9 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 8 10 -1.</_>\n        <_>\n          1 10 4 5 2.</_>\n        <_>\n          5 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 4 -1.</_>\n        <_>\n          4 16 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 6 7 -1.</_>\n        <_>\n          7 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 15 5 -1.</_>\n        <_>\n          10 2 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 14 -1.</_>\n        <_>\n          5 11 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 11 4 -1.</_>\n        <_>\n          8 2 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 16 6 -1.</_>\n        <_>\n          0 16 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 8 6 -1.</_>\n        <_>\n          10 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 13 3 -1.</_>\n        <_>\n          0 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 15 3 -1.</_>\n        <_>\n          5 9 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 19 3 -1.</_>\n        <_>\n          0 9 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 8 4 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 8 4 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 9 -1.</_>\n        <_>\n          9 8 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 10 9 -1.</_>\n        <_>\n          1 8 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 14 2 -1.</_>\n        <_>\n          4 7 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 13 2 -1.</_>\n        <_>\n          2 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 4 -1.</_>\n        <_>\n          6 7 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 9 5 -1.</_>\n        <_>\n          8 12 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 3 -1.</_>\n        <_>\n          3 7 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 12 -1.</_>\n        <_>\n          7 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 16 4 -1.</_>\n        <_>\n          2 6 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 9 4 -1.</_>\n        <_>\n          1 6 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 11 4 -1.</_>\n        <_>\n          9 6 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 8 -1.</_>\n        <_>\n          4 5 4 4 2.</_>\n        <_>\n          8 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 3 -1.</_>\n        <_>\n          7 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 7 -1.</_>\n        <_>\n          6 0 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 5 15 -1.</_>\n        <_>\n          12 5 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 5 15 -1.</_>\n        <_>\n          3 5 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 8 -1.</_>\n        <_>\n          10 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 7 -1.</_>\n        <_>\n          10 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 11 -1.</_>\n        <_>\n          8 6 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 4 -1.</_>\n        <_>\n          1 9 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 8 -1.</_>\n        <_>\n          10 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 5 -1.</_>\n        <_>\n          10 2 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 7 -1.</_>\n        <_>\n          9 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 6 -1.</_>\n        <_>\n          0 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 7 6 -1.</_>\n        <_>\n          13 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 4 -1.</_>\n        <_>\n          5 1 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 7 6 -1.</_>\n        <_>\n          7 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 12 -1.</_>\n        <_>\n          4 5 5 6 2.</_>\n        <_>\n          9 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 11 8 -1.</_>\n        <_>\n          8 16 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 9 5 -1.</_>\n        <_>\n          8 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 14 -1.</_>\n        <_>\n          1 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 3 10 -1.</_>\n        <_>\n          11 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 13 3 -1.</_>\n        <_>\n          3 18 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 13 3 -1.</_>\n        <_>\n          6 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 6 -1.</_>\n        <_>\n          1 2 9 3 2.</_>\n        <_>\n          10 5 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 8 -1.</_>\n        <_>\n          12 1 6 4 2.</_>\n        <_>\n          6 5 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 8 -1.</_>\n        <_>\n          4 1 6 4 2.</_>\n        <_>\n          10 5 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 13 3 -1.</_>\n        <_>\n          4 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 12 4 -1.</_>\n        <_>\n          5 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 5 -1.</_>\n        <_>\n          14 2 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 13 2 -1.</_>\n        <_>\n          3 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 6 -1.</_>\n        <_>\n          12 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 7 -1.</_>\n        <_>\n          3 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          14 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 6 -1.</_>\n        <_>\n          14 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 3 10 -1.</_>\n        <_>\n          6 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 5 -1.</_>\n        <_>\n          10 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 12 -1.</_>\n        <_>\n          6 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 6 -1.</_>\n        <_>\n          14 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 6 -1.</_>\n        <_>\n          3 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 3 -1.</_>\n        <_>\n          4 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 8 -1.</_>\n        <_>\n          8 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 13 -1.</_>\n        <_>\n          12 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 13 -1.</_>\n        <_>\n          7 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 2 -1.</_>\n        <_>\n          4 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 7 6 -1.</_>\n        <_>\n          1 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 8 -1.</_>\n        <_>\n          13 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 12 4 -1.</_>\n        <_>\n          8 16 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 8 -1.</_>\n        <_>\n          11 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 8 -1.</_>\n        <_>\n          6 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 10 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_>\n        <_>\n          10 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 3 -1.</_>\n        <_>\n          3 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 10 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_>\n        <_>\n          10 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 9 -1.</_>\n        <_>\n          2 3 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 10 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_>\n        <_>\n          10 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 10 6 -1.</_>\n        <_>\n          0 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 12 -1.</_>\n        <_>\n          9 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 10 6 -1.</_>\n        <_>\n          2 4 5 3 2.</_>\n        <_>\n          7 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 8 16 -1.</_>\n        <_>\n          13 1 4 8 2.</_>\n        <_>\n          9 9 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 14 8 -1.</_>\n        <_>\n          2 5 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 7 6 -1.</_>\n        <_>\n          12 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 9 -1.</_>\n        <_>\n          3 8 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 2 -1.</_>\n        <_>\n          0 1 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 14 4 -1.</_>\n        <_>\n          2 13 7 2 2.</_>\n        <_>\n          9 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 9 7 -1.</_>\n        <_>\n          10 5 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 8 -1.</_>\n        <_>\n          13 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 10 -1.</_>\n        <_>\n          6 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 8 -1.</_>\n        <_>\n          0 7 20 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 8 -1.</_>\n        <_>\n          10 0 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 19 -1.</_>\n        <_>\n          8 1 6 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 19 -1.</_>\n        <_>\n          6 1 6 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 19 -1.</_>\n        <_>\n          8 1 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 19 -1.</_>\n        <_>\n          6 1 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 10 -1.</_>\n        <_>\n          10 0 10 5 2.</_>\n        <_>\n          0 5 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 13 3 -1.</_>\n        <_>\n          0 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 2 -1.</_>\n        <_>\n          3 3 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 13 3 -1.</_>\n        <_>\n          1 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 7 4 -1.</_>\n        <_>\n          13 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 19 -1.</_>\n        <_>\n          4 1 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 7 6 -1.</_>\n        <_>\n          12 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 13 3 -1.</_>\n        <_>\n          3 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 14 3 -1.</_>\n        <_>\n          4 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 9 -1.</_>\n        <_>\n          4 8 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 13 3 -1.</_>\n        <_>\n          6 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 4 -1.</_>\n        <_>\n          0 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 18 -1.</_>\n        <_>\n          12 2 7 9 2.</_>\n        <_>\n          5 11 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 12 -1.</_>\n        <_>\n          7 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 18 -1.</_>\n        <_>\n          12 2 7 9 2.</_>\n        <_>\n          5 11 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 14 18 -1.</_>\n        <_>\n          1 2 7 9 2.</_>\n        <_>\n          8 11 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 10 -1.</_>\n        <_>\n          10 10 4 5 2.</_>\n        <_>\n          6 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 8 -1.</_>\n        <_>\n          3 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          10 10 4 4 2.</_>\n        <_>\n          6 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 7 6 -1.</_>\n        <_>\n          1 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 3 -1.</_>\n        <_>\n          4 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 9 -1.</_>\n        <_>\n          8 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 9 7 -1.</_>\n        <_>\n          10 5 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 19 6 -1.</_>\n        <_>\n          0 13 19 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 10 -1.</_>\n        <_>\n          4 6 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 6 -1.</_>\n        <_>\n          0 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 13 3 -1.</_>\n        <_>\n          5 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 2 -1.</_>\n        <_>\n          0 6 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 17 6 -1.</_>\n        <_>\n          2 2 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 10 6 -1.</_>\n        <_>\n          3 14 5 3 2.</_>\n        <_>\n          8 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 11 -1.</_>\n        <_>\n          9 0 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 11 -1.</_>\n        <_>\n          2 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 7 -1.</_>\n        <_>\n          16 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 12 -1.</_>\n        <_>\n          3 8 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 7 6 -1.</_>\n        <_>\n          13 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 7 6 -1.</_>\n        <_>\n          0 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 7 -1.</_>\n        <_>\n          16 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 7 -1.</_>\n        <_>\n          2 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 15 -1.</_>\n        <_>\n          11 0 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 11 -1.</_>\n        <_>\n          7 5 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 13 3 -1.</_>\n        <_>\n          6 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 13 3 -1.</_>\n        <_>\n          0 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 9 7 -1.</_>\n        <_>\n          10 5 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 14 -1.</_>\n        <_>\n          8 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 13 3 -1.</_>\n        <_>\n          5 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 13 -1.</_>\n        <_>\n          9 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 14 -1.</_>\n        <_>\n          11 6 2 7 2.</_>\n        <_>\n          9 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 10 -1.</_>\n        <_>\n          6 9 4 5 2.</_>\n        <_>\n          10 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 14 5 -1.</_>\n        <_>\n          7 15 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 5 -1.</_>\n        <_>\n          12 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 10 6 -1.</_>\n        <_>\n          0 16 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 14 4 -1.</_>\n        <_>\n          4 18 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 18 -1.</_>\n        <_>\n          8 1 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 14 2 -1.</_>\n        <_>\n          6 15 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 6 -1.</_>\n        <_>\n          0 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 9 -1.</_>\n        <_>\n          15 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 20 -1.</_>\n        <_>\n          10 0 7 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 7 -1.</_>\n        <_>\n          8 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 9 7 -1.</_>\n        <_>\n          7 5 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 13 -1.</_>\n        <_>\n          8 3 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 8 -1.</_>\n        <_>\n          7 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 5 -1.</_>\n        <_>\n          7 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 10 -1.</_>\n        <_>\n          11 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 12 6 -1.</_>\n        <_>\n          4 11 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 10 -1.</_>\n        <_>\n          11 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 10 -1.</_>\n        <_>\n          7 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 14 2 -1.</_>\n        <_>\n          6 15 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 14 2 -1.</_>\n        <_>\n          0 15 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 12 -1.</_>\n        <_>\n          15 6 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 12 -1.</_>\n        <_>\n          0 6 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 14 -1.</_>\n        <_>\n          16 12 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 6 -1.</_>\n        <_>\n          0 14 6 3 2.</_>\n        <_>\n          6 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 14 -1.</_>\n        <_>\n          16 12 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 14 -1.</_>\n        <_>\n          0 12 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 5 -1.</_>\n        <_>\n          12 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 5 -1.</_>\n        <_>\n          4 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 14 -1.</_>\n        <_>\n          13 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 5 8 -1.</_>\n        <_>\n          5 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 14 -1.</_>\n        <_>\n          18 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 6 -1.</_>\n        <_>\n          6 3 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 9 -1.</_>\n        <_>\n          14 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 6 -1.</_>\n        <_>\n          3 4 7 3 2.</_>\n        <_>\n          10 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 9 6 -1.</_>\n        <_>\n          10 7 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 5 -1.</_>\n        <_>\n          4 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 18 -1.</_>\n        <_>\n          15 0 3 9 2.</_>\n        <_>\n          12 9 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 18 -1.</_>\n        <_>\n          2 0 3 9 2.</_>\n        <_>\n          5 9 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 14 -1.</_>\n        <_>\n          10 0 8 7 2.</_>\n        <_>\n          2 7 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 16 -1.</_>\n        <_>\n          2 0 2 8 2.</_>\n        <_>\n          4 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 4 -1.</_>\n        <_>\n          12 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 4 -1.</_>\n        <_>\n          4 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 14 5 -1.</_>\n        <_>\n          6 12 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 14 5 -1.</_>\n        <_>\n          7 12 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 5 -1.</_>\n        <_>\n          12 1 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 5 -1.</_>\n        <_>\n          4 1 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 14 4 -1.</_>\n        <_>\n          10 10 7 2 2.</_>\n        <_>\n          3 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 20 4 -1.</_>\n        <_>\n          0 14 10 2 2.</_>\n        <_>\n          10 16 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 9 5 -1.</_>\n        <_>\n          13 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 9 5 -1.</_>\n        <_>\n          4 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 8 4 -1.</_>\n        <_>\n          10 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          4 5 6 3 2.</_>\n        <_>\n          10 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 8 -1.</_>\n        <_>\n          12 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 5 -1.</_>\n        <_>\n          7 1 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 10 10 -1.</_>\n        <_>\n          14 2 5 5 2.</_>\n        <_>\n          9 7 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 10 10 -1.</_>\n        <_>\n          1 2 5 5 2.</_>\n        <_>\n          6 7 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 6 -1.</_>\n        <_>\n          14 3 6 3 2.</_>\n        <_>\n          8 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 8 4 -1.</_>\n        <_>\n          5 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 12 -1.</_>\n        <_>\n          10 3 10 6 2.</_>\n        <_>\n          0 9 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 6 -1.</_>\n        <_>\n          5 5 5 3 2.</_>\n        <_>\n          10 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 12 -1.</_>\n        <_>\n          12 8 3 6 2.</_>\n        <_>\n          9 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 4 -1.</_>\n        <_>\n          0 8 9 2 2.</_>\n        <_>\n          9 10 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 4 -1.</_>\n        <_>\n          10 14 7 2 2.</_>\n        <_>\n          3 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 5 9 -1.</_>\n        <_>\n          5 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 8 4 -1.</_>\n        <_>\n          6 18 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 12 -1.</_>\n        <_>\n          7 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 7 12 -1.</_>\n        <_>\n          9 11 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 5 9 -1.</_>\n        <_>\n          7 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 12 5 -1.</_>\n        <_>\n          8 13 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 7 9 -1.</_>\n        <_>\n          4 12 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 4 -1.</_>\n        <_>\n          8 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 7 -1.</_>\n        <_>\n          9 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 4 -1.</_>\n        <_>\n          0 15 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 13 3 -1.</_>\n        <_>\n          2 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 7 12 -1.</_>\n        <_>\n          9 11 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 9 17 -1.</_>\n        <_>\n          6 1 3 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          8 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 8 -1.</_>\n        <_>\n          8 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 14 12 -1.</_>\n        <_>\n          12 4 7 6 2.</_>\n        <_>\n          5 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 2 -1.</_>\n        <_>\n          9 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 8 -1.</_>\n        <_>\n          6 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 12 -1.</_>\n        <_>\n          7 5 3 6 2.</_>\n        <_>\n          10 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 7 -1.</_>\n        <_>\n          6 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 14 3 -1.</_>\n        <_>\n          6 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 14 3 -1.</_>\n        <_>\n          0 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 14 3 -1.</_>\n        <_>\n          4 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 15 12 -1.</_>\n        <_>\n          5 2 5 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 12 -1.</_>\n        <_>\n          14 5 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 16 -1.</_>\n        <_>\n          2 9 16 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 13 3 -1.</_>\n        <_>\n          7 17 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 4 -1.</_>\n        <_>\n          3 7 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 7 4 -1.</_>\n        <_>\n          9 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 14 6 -1.</_>\n        <_>\n          3 9 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 7 4 -1.</_>\n        <_>\n          9 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 7 4 -1.</_>\n        <_>\n          4 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 3 -1.</_>\n        <_>\n          1 10 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 13 -1.</_>\n        <_>\n          1 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 12 -1.</_>\n        <_>\n          14 5 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 12 -1.</_>\n        <_>\n          3 5 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 10 -1.</_>\n        <_>\n          11 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 20 -1.</_>\n        <_>\n          1 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 11 -1.</_>\n        <_>\n          8 0 6 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 5 -1.</_>\n        <_>\n          7 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 14 4 -1.</_>\n        <_>\n          13 3 7 2 2.</_>\n        <_>\n          6 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 9 6 -1.</_>\n        <_>\n          7 4 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 9 8 -1.</_>\n        <_>\n          11 9 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 9 8 -1.</_>\n        <_>\n          6 9 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 10 -1.</_>\n        <_>\n          12 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 14 -1.</_>\n        <_>\n          9 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 9 -1.</_>\n        <_>\n          9 9 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 9 9 -1.</_>\n        <_>\n          7 3 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 9 -1.</_>\n        <_>\n          8 2 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 16 3 -1.</_>\n        <_>\n          0 3 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 6 -1.</_>\n        <_>\n          10 10 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 9 -1.</_>\n        <_>\n          6 0 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 14 12 -1.</_>\n        <_>\n          12 4 7 6 2.</_>\n        <_>\n          5 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 4 -1.</_>\n        <_>\n          6 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 13 2 -1.</_>\n        <_>\n          7 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 10 -1.</_>\n        <_>\n          1 10 3 5 2.</_>\n        <_>\n          4 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 8 -1.</_>\n        <_>\n          12 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 6 -1.</_>\n        <_>\n          4 14 6 3 2.</_>\n        <_>\n          10 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 8 -1.</_>\n        <_>\n          12 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 8 -1.</_>\n        <_>\n          4 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 14 4 -1.</_>\n        <_>\n          11 11 7 2 2.</_>\n        <_>\n          4 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 14 4 -1.</_>\n        <_>\n          2 11 7 2 2.</_>\n        <_>\n          9 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          12 6 5 3 2.</_>\n        <_>\n          7 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 10 6 -1.</_>\n        <_>\n          3 6 5 3 2.</_>\n        <_>\n          8 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 19 -1.</_>\n        <_>\n          11 0 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 19 -1.</_>\n        <_>\n          7 0 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 14 2 -1.</_>\n        <_>\n          4 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 9 -1.</_>\n        <_>\n          0 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 9 -1.</_>\n        <_>\n          13 4 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 7 9 -1.</_>\n        <_>\n          0 4 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 11 6 -1.</_>\n        <_>\n          9 13 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 11 6 -1.</_>\n        <_>\n          0 13 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 10 -1.</_>\n        <_>\n          10 5 8 5 2.</_>\n        <_>\n          2 10 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 4 -1.</_>\n        <_>\n          11 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 14 12 -1.</_>\n        <_>\n          1 4 7 6 2.</_>\n        <_>\n          8 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 3 -1.</_>\n        <_>\n          6 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 13 3 -1.</_>\n        <_>\n          2 18 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 18 6 -1.</_>\n        <_>\n          1 13 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 7 18 -1.</_>\n        <_>\n          6 11 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 4 -1.</_>\n        <_>\n          11 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 6 -1.</_>\n        <_>\n          1 1 8 3 2.</_>\n        <_>\n          9 4 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 14 -1.</_>\n        <_>\n          18 1 2 7 2.</_>\n        <_>\n          16 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 14 -1.</_>\n        <_>\n          0 1 2 7 2.</_>\n        <_>\n          2 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 4 -1.</_>\n        <_>\n          13 7 7 2 2.</_>\n        <_>\n          6 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 5 -1.</_>\n        <_>\n          6 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 6 -1.</_>\n        <_>\n          4 4 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 14 4 -1.</_>\n        <_>\n          0 7 7 2 2.</_>\n        <_>\n          7 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 5 9 -1.</_>\n        <_>\n          8 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 13 2 -1.</_>\n        <_>\n          2 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 10 6 -1.</_>\n        <_>\n          14 12 5 3 2.</_>\n        <_>\n          9 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 10 -1.</_>\n        <_>\n          7 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 5 -1.</_>\n        <_>\n          7 2 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 13 2 -1.</_>\n        <_>\n          7 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 13 -1.</_>\n        <_>\n          1 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 17 -1.</_>\n        <_>\n          15 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 3 17 -1.</_>\n        <_>\n          4 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 7 6 -1.</_>\n        <_>\n          12 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 17 -1.</_>\n        <_>\n          4 2 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 18 -1.</_>\n        <_>\n          16 0 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 7 6 -1.</_>\n        <_>\n          3 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 12 -1.</_>\n        <_>\n          11 4 3 6 2.</_>\n        <_>\n          8 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 10 -1.</_>\n        <_>\n          4 4 6 5 2.</_>\n        <_>\n          10 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 18 -1.</_>\n        <_>\n          16 0 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 18 -1.</_>\n        <_>\n          2 0 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 18 -1.</_>\n        <_>\n          9 9 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 6 -1.</_>\n        <_>\n          3 5 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 12 -1.</_>\n        <_>\n          17 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 12 -1.</_>\n        <_>\n          0 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 5 9 -1.</_>\n        <_>\n          14 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 8 -1.</_>\n        <_>\n          1 4 18 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 4 -1.</_>\n        <_>\n          11 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 8 4 -1.</_>\n        <_>\n          1 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 9 -1.</_>\n        <_>\n          15 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 3 -1.</_>\n        <_>\n          10 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 5 -1.</_>\n        <_>\n          5 7 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 4 -1.</_>\n        <_>\n          2 6 8 2 2.</_>\n        <_>\n          10 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 5 9 -1.</_>\n        <_>\n          15 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 9 -1.</_>\n        <_>\n          0 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 12 -1.</_>\n        <_>\n          11 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 6 -1.</_>\n        <_>\n          0 4 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 7 18 -1.</_>\n        <_>\n          7 10 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 6 -1.</_>\n        <_>\n          0 2 9 3 2.</_>\n        <_>\n          9 5 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 13 2 -1.</_>\n        <_>\n          5 9 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 10 -1.</_>\n        <_>\n          6 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 13 2 -1.</_>\n        <_>\n          6 12 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          1 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 18 2 -1.</_>\n        <_>\n          1 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 10 3 -1.</_>\n        <_>\n          8 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 18 4 -1.</_>\n        <_>\n          7 15 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 9 -1.</_>\n        <_>\n          8 5 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 11 -1.</_>\n        <_>\n          8 6 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 10 -1.</_>\n        <_>\n          0 0 4 5 2.</_>\n        <_>\n          4 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 3 -1.</_>\n        <_>\n          8 0 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 9 -1.</_>\n        <_>\n          8 9 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 2 17 -1.</_>\n        <_>\n          11 3 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 20 -1.</_>\n        <_>\n          8 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 8 18 -1.</_>\n        <_>\n          10 1 4 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 8 -1.</_>\n        <_>\n          4 5 4 4 2.</_>\n        <_>\n          8 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 14 -1.</_>\n        <_>\n          12 1 6 7 2.</_>\n        <_>\n          6 8 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 8 18 -1.</_>\n        <_>\n          6 1 4 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 7 -1.</_>\n        <_>\n          7 5 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 16 -1.</_>\n        <_>\n          3 4 3 8 2.</_>\n        <_>\n          6 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 4 14 -1.</_>\n        <_>\n          14 3 2 7 2.</_>\n        <_>\n          12 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 4 14 -1.</_>\n        <_>\n          4 3 2 7 2.</_>\n        <_>\n          6 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 6 -1.</_>\n        <_>\n          8 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 6 6 -1.</_>\n        <_>\n          9 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 3 -1.</_>\n        <_>\n          4 2 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 10 6 -1.</_>\n        <_>\n          3 5 5 3 2.</_>\n        <_>\n          8 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 4 -1.</_>\n        <_>\n          13 6 7 2 2.</_>\n        <_>\n          6 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 8 -1.</_>\n        <_>\n          0 4 10 4 2.</_>\n        <_>\n          10 8 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 8 8 -1.</_>\n        <_>\n          16 5 4 4 2.</_>\n        <_>\n          12 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 15 6 -1.</_>\n        <_>\n          1 3 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 16 3 -1.</_>\n        <_>\n          3 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 5 -1.</_>\n        <_>\n          10 3 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 9 5 -1.</_>\n        <_>\n          10 4 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 16 3 -1.</_>\n        <_>\n          9 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 15 -1.</_>\n        <_>\n          9 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 14 -1.</_>\n        <_>\n          1 1 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 13 -1.</_>\n        <_>\n          13 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 13 -1.</_>\n        <_>\n          6 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 8 -1.</_>\n        <_>\n          4 10 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 7 6 -1.</_>\n        <_>\n          3 10 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 10 -1.</_>\n        <_>\n          0 8 20 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 7 6 -1.</_>\n        <_>\n          0 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 8 4 -1.</_>\n        <_>\n          11 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 4 -1.</_>\n        <_>\n          1 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 6 -1.</_>\n        <_>\n          5 2 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 10 -1.</_>\n        <_>\n          6 8 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 5 12 -1.</_>\n        <_>\n          7 8 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 12 -1.</_>\n        <_>\n          9 7 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 8 -1.</_>\n        <_>\n          9 3 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 16 -1.</_>\n        <_>\n          10 8 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 16 8 -1.</_>\n        <_>\n          0 10 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 16 4 -1.</_>\n        <_>\n          3 10 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 9 4 -1.</_>\n        <_>\n          10 10 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 10 -1.</_>\n        <_>\n          7 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 12 -1.</_>\n        <_>\n          9 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 13 9 -1.</_>\n        <_>\n          0 10 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 8 -1.</_>\n        <_>\n          10 11 4 4 2.</_>\n        <_>\n          6 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 10 4 -1.</_>\n        <_>\n          5 15 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 16 2 -1.</_>\n        <_>\n          4 18 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          6 14 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 7 6 -1.</_>\n        <_>\n          8 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 5 8 -1.</_>\n        <_>\n          7 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 12 -1.</_>\n        <_>\n          6 11 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 7 -1.</_>\n        <_>\n          8 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 7 -1.</_>\n        <_>\n          14 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 10 -1.</_>\n        <_>\n          6 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 16 -1.</_>\n        <_>\n          13 4 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 16 -1.</_>\n        <_>\n          6 4 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 16 -1.</_>\n        <_>\n          10 3 2 8 2.</_>\n        <_>\n          8 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 18 -1.</_>\n        <_>\n          8 9 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 2 -1.</_>\n        <_>\n          4 5 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 14 2 -1.</_>\n        <_>\n          0 3 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 7 -1.</_>\n        <_>\n          14 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 13 2 -1.</_>\n        <_>\n          0 3 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 7 -1.</_>\n        <_>\n          14 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 4 7 -1.</_>\n        <_>\n          4 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 13 -1.</_>\n        <_>\n          14 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 5 6 -1.</_>\n        <_>\n          2 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 5 9 -1.</_>\n        <_>\n          14 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 13 3 -1.</_>\n        <_>\n          1 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 13 3 -1.</_>\n        <_>\n          5 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 17 6 -1.</_>\n        <_>\n          0 15 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 13 3 -1.</_>\n        <_>\n          5 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 14 -1.</_>\n        <_>\n          9 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 13 3 -1.</_>\n        <_>\n          1 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 8 -1.</_>\n        <_>\n          13 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 14 -1.</_>\n        <_>\n          4 5 2 7 2.</_>\n        <_>\n          6 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 8 -1.</_>\n        <_>\n          13 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 8 8 -1.</_>\n        <_>\n          2 8 4 4 2.</_>\n        <_>\n          6 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 6 9 -1.</_>\n        <_>\n          13 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 5 9 -1.</_>\n        <_>\n          4 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 10 -1.</_>\n        <_>\n          13 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 8 -1.</_>\n        <_>\n          3 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 8 6 -1.</_>\n        <_>\n          10 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 13 3 -1.</_>\n        <_>\n          1 18 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 10 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_>\n        <_>\n          10 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 11 -1.</_>\n        <_>\n          9 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 9 6 -1.</_>\n        <_>\n          9 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 13 3 -1.</_>\n        <_>\n          1 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 3 -1.</_>\n        <_>\n          4 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 14 12 -1.</_>\n        <_>\n          1 2 7 6 2.</_>\n        <_>\n          8 8 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 14 -1.</_>\n        <_>\n          15 4 2 7 2.</_>\n        <_>\n          13 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 4 14 -1.</_>\n        <_>\n          3 4 2 7 2.</_>\n        <_>\n          5 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 7 4 -1.</_>\n        <_>\n          1 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          16 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 2 -1.</_>\n        <_>\n          1 3 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 7 -1.</_>\n        <_>\n          16 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 3 -1.</_>\n        <_>\n          3 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 6 7 -1.</_>\n        <_>\n          13 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 19 12 -1.</_>\n        <_>\n          1 11 19 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 10 -1.</_>\n        <_>\n          7 9 3 5 2.</_>\n        <_>\n          10 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 13 3 -1.</_>\n        <_>\n          4 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 7 4 -1.</_>\n        <_>\n          3 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 15 -1.</_>\n        <_>\n          16 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 4 -1.</_>\n        <_>\n          0 3 7 2 2.</_>\n        <_>\n          7 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 10 -1.</_>\n        <_>\n          11 0 4 5 2.</_>\n        <_>\n          7 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 2 -1.</_>\n        <_>\n          10 2 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 3 -1.</_>\n        <_>\n          7 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 10 3 -1.</_>\n        <_>\n          8 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 18 16 -1.</_>\n        <_>\n          6 4 6 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 19 -1.</_>\n        <_>\n          15 0 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 10 6 -1.</_>\n        <_>\n          0 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 10 -1.</_>\n        <_>\n          0 0 3 5 2.</_>\n        <_>\n          3 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 9 5 -1.</_>\n        <_>\n          12 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 10 -1.</_>\n        <_>\n          5 0 4 5 2.</_>\n        <_>\n          9 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 3 -1.</_>\n        <_>\n          0 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 12 -1.</_>\n        <_>\n          16 0 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 19 -1.</_>\n        <_>\n          3 0 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 7 -1.</_>\n        <_>\n          14 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 9 14 -1.</_>\n        <_>\n          4 6 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 9 -1.</_>\n        <_>\n          9 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          0 10 3 5 2.</_>\n        <_>\n          3 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 12 6 -1.</_>\n        <_>\n          8 8 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 12 9 -1.</_>\n        <_>\n          6 5 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 9 5 -1.</_>\n        <_>\n          7 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 7 -1.</_>\n        <_>\n          12 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 7 6 -1.</_>\n        <_>\n          6 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 14 -1.</_>\n        <_>\n          13 6 2 7 2.</_>\n        <_>\n          11 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 14 -1.</_>\n        <_>\n          5 6 2 7 2.</_>\n        <_>\n          7 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 7 4 -1.</_>\n        <_>\n          13 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 4 14 -1.</_>\n        <_>\n          1 5 2 7 2.</_>\n        <_>\n          3 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 18 4 -1.</_>\n        <_>\n          10 13 9 2 2.</_>\n        <_>\n          1 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 12 -1.</_>\n        <_>\n          0 7 18 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 18 -1.</_>\n        <_>\n          4 10 14 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 10 -1.</_>\n        <_>\n          6 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 9 -1.</_>\n        <_>\n          16 10 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 4 9 -1.</_>\n        <_>\n          2 10 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 7 -1.</_>\n        <_>\n          12 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 7 -1.</_>\n        <_>\n          6 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 15 3 -1.</_>\n        <_>\n          9 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 15 3 -1.</_>\n        <_>\n          6 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 12 -1.</_>\n        <_>\n          16 0 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 12 -1.</_>\n        <_>\n          7 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 12 -1.</_>\n        <_>\n          16 0 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 12 -1.</_>\n        <_>\n          2 0 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 7 6 -1.</_>\n        <_>\n          12 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 13 -1.</_>\n        <_>\n          9 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 7 6 -1.</_>\n        <_>\n          12 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 7 -1.</_>\n        <_>\n          2 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 4 -1.</_>\n        <_>\n          10 9 9 2 2.</_>\n        <_>\n          1 11 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 13 2 -1.</_>\n        <_>\n          3 10 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 8 8 -1.</_>\n        <_>\n          6 12 4 4 2.</_>\n        <_>\n          10 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 7 6 -1.</_>\n        <_>\n          3 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 15 6 -1.</_>\n        <_>\n          10 10 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 7 -1.</_>\n        <_>\n          10 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 7 -1.</_>\n        <_>\n          10 1 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 9 6 -1.</_>\n        <_>\n          1 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 6 -1.</_>\n        <_>\n          7 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 10 -1.</_>\n        <_>\n          0 0 4 5 2.</_>\n        <_>\n          4 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 6 7 -1.</_>\n        <_>\n          13 8 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 13 -1.</_>\n        <_>\n          7 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 8 -1.</_>\n        <_>\n          10 10 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 8 9 -1.</_>\n        <_>\n          2 12 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 4 14 -1.</_>\n        <_>\n          16 4 2 7 2.</_>\n        <_>\n          14 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 7 8 -1.</_>\n        <_>\n          4 13 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 8 -1.</_>\n        <_>\n          7 1 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 7 6 -1.</_>\n        <_>\n          1 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 15 6 -1.</_>\n        <_>\n          5 10 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 5 -1.</_>\n        <_>\n          9 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 5 -1.</_>\n        <_>\n          8 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 7 4 -1.</_>\n        <_>\n          7 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 5 9 -1.</_>\n        <_>\n          5 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 13 3 -1.</_>\n        <_>\n          7 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 4 -1.</_>\n        <_>\n          2 14 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 4 -1.</_>\n        <_>\n          0 0 10 2 2.</_>\n        <_>\n          10 2 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 2 -1.</_>\n        <_>\n          6 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 13 3 -1.</_>\n        <_>\n          1 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 10 -1.</_>\n        <_>\n          15 0 3 5 2.</_>\n        <_>\n          12 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 13 2 -1.</_>\n        <_>\n          3 17 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 10 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_>\n        <_>\n          10 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 13 3 -1.</_>\n        <_>\n          1 17 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 9 -1.</_>\n        <_>\n          15 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 4 -1.</_>\n        <_>\n          0 1 9 2 2.</_>\n        <_>\n          9 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 4 -1.</_>\n        <_>\n          5 2 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 10 -1.</_>\n        <_>\n          4 2 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 6 -1.</_>\n        <_>\n          8 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 6 -1.</_>\n        <_>\n          5 4 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 12 -1.</_>\n        <_>\n          8 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 8 -1.</_>\n        <_>\n          5 4 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 4 14 -1.</_>\n        <_>\n          2 4 2 7 2.</_>\n        <_>\n          4 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 10 6 -1.</_>\n        <_>\n          15 9 5 3 2.</_>\n        <_>\n          10 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 9 5 -1.</_>\n        <_>\n          8 12 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 12 6 -1.</_>\n        <_>\n          8 14 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 12 14 -1.</_>\n        <_>\n          2 5 6 7 2.</_>\n        <_>\n          8 12 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 14 4 -1.</_>\n        <_>\n          10 10 7 2 2.</_>\n        <_>\n          3 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 4 -1.</_>\n        <_>\n          8 2 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 14 -1.</_>\n        <_>\n          14 0 2 7 2.</_>\n        <_>\n          12 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 14 -1.</_>\n        <_>\n          4 0 2 7 2.</_>\n        <_>\n          6 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 6 11 -1.</_>\n        <_>\n          14 9 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 14 -1.</_>\n        <_>\n          1 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 13 -1.</_>\n        <_>\n          16 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 3 13 -1.</_>\n        <_>\n          3 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 10 10 -1.</_>\n        <_>\n          13 10 5 5 2.</_>\n        <_>\n          8 15 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 20 -1.</_>\n        <_>\n          7 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 14 6 -1.</_>\n        <_>\n          12 14 7 3 2.</_>\n        <_>\n          5 17 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 3 13 -1.</_>\n        <_>\n          2 4 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 14 -1.</_>\n        <_>\n          18 6 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 14 -1.</_>\n        <_>\n          1 6 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 9 5 -1.</_>\n        <_>\n          13 2 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 7 -1.</_>\n        <_>\n          4 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 14 16 -1.</_>\n        <_>\n          11 4 7 8 2.</_>\n        <_>\n          4 12 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 7 6 -1.</_>\n        <_>\n          12 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 20 3 -1.</_>\n        <_>\n          10 17 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 10 4 -1.</_>\n        <_>\n          6 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 7 6 -1.</_>\n        <_>\n          12 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 6 8 -1.</_>\n        <_>\n          9 11 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 13 3 -1.</_>\n        <_>\n          5 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 15 -1.</_>\n        <_>\n          6 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 9 -1.</_>\n        <_>\n          3 9 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 8 -1.</_>\n        <_>\n          4 9 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 16 -1.</_>\n        <_>\n          2 4 7 8 2.</_>\n        <_>\n          9 12 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 12 3 -1.</_>\n        <_>\n          7 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 19 3 -1.</_>\n        <_>\n          1 8 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 10 -1.</_>\n        <_>\n          10 0 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 4 -1.</_>\n        <_>\n          6 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 5 -1.</_>\n        <_>\n          7 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 18 -1.</_>\n        <_>\n          18 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 3 -1.</_>\n        <_>\n          6 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 3 -1.</_>\n        <_>\n          3 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 7 6 -1.</_>\n        <_>\n          12 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 13 3 -1.</_>\n        <_>\n          3 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 7 6 -1.</_>\n        <_>\n          12 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 7 6 -1.</_>\n        <_>\n          1 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 12 12 -1.</_>\n        <_>\n          5 11 12 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 10 -1.</_>\n        <_>\n          4 5 5 5 2.</_>\n        <_>\n          9 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 8 7 -1.</_>\n        <_>\n          12 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 9 6 -1.</_>\n        <_>\n          4 3 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 13 2 -1.</_>\n        <_>\n          4 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 18 -1.</_>\n        <_>\n          1 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 2 -1.</_>\n        <_>\n          0 14 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 10 4 -1.</_>\n        <_>\n          9 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 12 16 -1.</_>\n        <_>\n          8 4 6 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 12 16 -1.</_>\n        <_>\n          6 4 6 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 9 -1.</_>\n        <_>\n          12 5 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 7 -1.</_>\n        <_>\n          4 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 16 -1.</_>\n        <_>\n          13 0 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 18 12 -1.</_>\n        <_>\n          6 7 6 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 4 -1.</_>\n        <_>\n          8 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 16 4 -1.</_>\n        <_>\n          0 7 8 2 2.</_>\n        <_>\n          8 9 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 9 5 -1.</_>\n        <_>\n          10 4 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 16 -1.</_>\n        <_>\n          6 0 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 13 2 -1.</_>\n        <_>\n          6 12 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 13 2 -1.</_>\n        <_>\n          1 12 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 5 9 -1.</_>\n        <_>\n          8 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 8 -1.</_>\n        <_>\n          8 4 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 4 8 -1.</_>\n        <_>\n          14 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 4 8 -1.</_>\n        <_>\n          4 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 7 -1.</_>\n        <_>\n          12 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 8 8 -1.</_>\n        <_>\n          4 6 4 4 2.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 7 -1.</_>\n        <_>\n          10 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 7 -1.</_>\n        <_>\n          7 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 5 -1.</_>\n        <_>\n          8 10 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 6 -1.</_>\n        <_>\n          6 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 3 -1.</_>\n        <_>\n          4 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 4 14 -1.</_>\n        <_>\n          4 3 2 7 2.</_>\n        <_>\n          6 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 3 -1.</_>\n        <_>\n          6 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 16 2 -1.</_>\n        <_>\n          10 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 8 14 -1.</_>\n        <_>\n          15 6 4 7 2.</_>\n        <_>\n          11 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 19 -1.</_>\n        <_>\n          4 0 3 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 10 -1.</_>\n        <_>\n          15 5 3 5 2.</_>\n        <_>\n          12 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 10 -1.</_>\n        <_>\n          2 5 3 5 2.</_>\n        <_>\n          5 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 4 -1.</_>\n        <_>\n          7 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 18 2 -1.</_>\n        <_>\n          9 11 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 9 -1.</_>\n        <_>\n          6 6 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 9 5 -1.</_>\n        <_>\n          7 4 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 7 -1.</_>\n        <_>\n          10 2 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 9 5 -1.</_>\n        <_>\n          8 2 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          14 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 4 -1.</_>\n        <_>\n          11 1 7 2 2.</_>\n        <_>\n          4 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 2 13 -1.</_>\n        <_>\n          10 1 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 10 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_>\n        <_>\n          10 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 10 6 -1.</_>\n        <_>\n          0 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 3 -1.</_>\n        <_>\n          6 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 4 13 -1.</_>\n        <_>\n          3 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          14 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 5 -1.</_>\n        <_>\n          3 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 5 12 -1.</_>\n        <_>\n          15 10 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 16 -1.</_>\n        <_>\n          0 1 3 8 2.</_>\n        <_>\n          3 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 2 -1.</_>\n        <_>\n          0 0 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 5 12 -1.</_>\n        <_>\n          0 10 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 6 -1.</_>\n        <_>\n          10 0 9 3 2.</_>\n        <_>\n          1 3 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 5 -1.</_>\n        <_>\n          7 0 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 5 -1.</_>\n        <_>\n          10 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 8 18 -1.</_>\n        <_>\n          11 2 4 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 18 -1.</_>\n        <_>\n          5 2 4 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 5 6 -1.</_>\n        <_>\n          12 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 14 4 -1.</_>\n        <_>\n          2 1 7 2 2.</_>\n        <_>\n          9 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 8 6 -1.</_>\n        <_>\n          12 9 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 6 -1.</_>\n        <_>\n          0 9 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 13 2 -1.</_>\n        <_>\n          7 8 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 9 -1.</_>\n        <_>\n          1 9 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 6 -1.</_>\n        <_>\n          0 10 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 4 13 -1.</_>\n        <_>\n          6 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 3 15 -1.</_>\n        <_>\n          14 3 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 3 -1.</_>\n        <_>\n          3 16 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 17 3 -1.</_>\n        <_>\n          0 17 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 11 6 -1.</_>\n        <_>\n          5 14 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 15 -1.</_>\n        <_>\n          5 3 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 9 -1.</_>\n        <_>\n          3 4 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 8 -1.</_>\n        <_>\n          0 4 20 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 7 4 -1.</_>\n        <_>\n          7 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 13 2 -1.</_>\n        <_>\n          2 14 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 3 -1.</_>\n        <_>\n          2 13 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 13 3 -1.</_>\n        <_>\n          1 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 13 3 -1.</_>\n        <_>\n          7 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 7 6 -1.</_>\n        <_>\n          5 16 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 14 3 -1.</_>\n        <_>\n          4 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 2 -1.</_>\n        <_>\n          3 3 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 14 -1.</_>\n        <_>\n          3 7 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 14 -1.</_>\n        <_>\n          4 8 12 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 7 -1.</_>\n        <_>\n          11 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 8 4 -1.</_>\n        <_>\n          6 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 8 6 -1.</_>\n        <_>\n          8 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 6 7 -1.</_>\n        <_>\n          7 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 5 -1.</_>\n        <_>\n          11 10 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 16 -1.</_>\n        <_>\n          1 0 4 8 2.</_>\n        <_>\n          5 8 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 18 -1.</_>\n        <_>\n          8 8 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 18 -1.</_>\n        <_>\n          6 8 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 4 -1.</_>\n        <_>\n          7 8 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 5 9 -1.</_>\n        <_>\n          1 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 6 -1.</_>\n        <_>\n          12 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 10 6 -1.</_>\n        <_>\n          0 14 5 3 2.</_>\n        <_>\n          5 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 5 9 -1.</_>\n        <_>\n          9 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 12 4 -1.</_>\n        <_>\n          4 16 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 14 -1.</_>\n        <_>\n          15 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          6 9 4 4 2.</_>\n        <_>\n          10 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 7 -1.</_>\n        <_>\n          8 5 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 9 -1.</_>\n        <_>\n          8 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 16 -1.</_>\n        <_>\n          10 2 3 8 2.</_>\n        <_>\n          7 10 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 5 -1.</_>\n        <_>\n          9 15 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 14 4 -1.</_>\n        <_>\n          11 12 7 2 2.</_>\n        <_>\n          4 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 14 4 -1.</_>\n        <_>\n          2 12 7 2 2.</_>\n        <_>\n          9 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 14 3 -1.</_>\n        <_>\n          4 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 10 3 -1.</_>\n        <_>\n          5 2 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 8 -1.</_>\n        <_>\n          8 0 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 2 -1.</_>\n        <_>\n          10 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 9 -1.</_>\n        <_>\n          6 0 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 10 6 -1.</_>\n        <_>\n          3 2 5 3 2.</_>\n        <_>\n          8 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 13 -1.</_>\n        <_>\n          15 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 6 -1.</_>\n        <_>\n          11 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 8 6 -1.</_>\n        <_>\n          1 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 3 -1.</_>\n        <_>\n          3 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 15 9 -1.</_>\n        <_>\n          4 5 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 13 3 -1.</_>\n        <_>\n          0 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 10 6 -1.</_>\n        <_>\n          13 14 5 3 2.</_>\n        <_>\n          8 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 6 -1.</_>\n        <_>\n          2 14 5 3 2.</_>\n        <_>\n          7 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 6 -1.</_>\n        <_>\n          12 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 6 -1.</_>\n        <_>\n          0 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 14 4 -1.</_>\n        <_>\n          13 16 7 2 2.</_>\n        <_>\n          6 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 14 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_>\n        <_>\n          7 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 16 4 -1.</_>\n        <_>\n          12 16 8 2 2.</_>\n        <_>\n          4 18 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 16 4 -1.</_>\n        <_>\n          0 16 8 2 2.</_>\n        <_>\n          8 18 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 5 -1.</_>\n        <_>\n          8 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 5 -1.</_>\n        <_>\n          9 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 8 -1.</_>\n        <_>\n          8 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 12 -1.</_>\n        <_>\n          4 12 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 12 -1.</_>\n        <_>\n          1 9 18 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 4 -1.</_>\n        <_>\n          4 8 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 19 3 -1.</_>\n        <_>\n          1 6 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 12 14 -1.</_>\n        <_>\n          2 3 6 7 2.</_>\n        <_>\n          8 10 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 16 -1.</_>\n        <_>\n          13 8 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 16 -1.</_>\n        <_>\n          4 8 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 14 -1.</_>\n        <_>\n          8 0 4 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 10 6 -1.</_>\n        <_>\n          0 10 5 3 2.</_>\n        <_>\n          5 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 13 3 -1.</_>\n        <_>\n          7 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 10 -1.</_>\n        <_>\n          5 5 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 8 14 -1.</_>\n        <_>\n          15 6 4 7 2.</_>\n        <_>\n          11 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 3 13 -1.</_>\n        <_>\n          4 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 8 14 -1.</_>\n        <_>\n          15 6 4 7 2.</_>\n        <_>\n          11 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 3 13 -1.</_>\n        <_>\n          4 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 9 -1.</_>\n        <_>\n          9 5 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 8 14 -1.</_>\n        <_>\n          1 6 4 7 2.</_>\n        <_>\n          5 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 9 6 -1.</_>\n        <_>\n          11 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 9 6 -1.</_>\n        <_>\n          0 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 9 -1.</_>\n        <_>\n          12 14 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 15 9 -1.</_>\n        <_>\n          2 14 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 18 4 -1.</_>\n        <_>\n          8 16 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 3 -1.</_>\n        <_>\n          7 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          14 0 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 10 -1.</_>\n        <_>\n          3 0 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 16 -1.</_>\n        <_>\n          15 1 2 8 2.</_>\n        <_>\n          13 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 11 -1.</_>\n        <_>\n          3 9 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 3 -1.</_>\n        <_>\n          6 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 10 -1.</_>\n        <_>\n          0 0 6 5 2.</_>\n        <_>\n          6 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 13 3 -1.</_>\n        <_>\n          4 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 7 6 -1.</_>\n        <_>\n          0 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 4 8 -1.</_>\n        <_>\n          13 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 4 8 -1.</_>\n        <_>\n          3 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 5 6 -1.</_>\n        <_>\n          15 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 13 3 -1.</_>\n        <_>\n          0 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 6 -1.</_>\n        <_>\n          14 8 5 3 2.</_>\n        <_>\n          9 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 10 6 -1.</_>\n        <_>\n          1 8 5 3 2.</_>\n        <_>\n          6 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 15 6 -1.</_>\n        <_>\n          5 8 15 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 14 2 -1.</_>\n        <_>\n          9 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 7 -1.</_>\n        <_>\n          9 1 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 7 -1.</_>\n        <_>\n          8 1 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 6 -1.</_>\n        <_>\n          0 9 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 15 2 -1.</_>\n        <_>\n          2 9 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 15 6 -1.</_>\n        <_>\n          0 4 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 15 2 -1.</_>\n        <_>\n          5 3 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 7 4 -1.</_>\n        <_>\n          5 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 8 -1.</_>\n        <_>\n          13 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 7 6 -1.</_>\n        <_>\n          1 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 5 6 -1.</_>\n        <_>\n          12 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 9 -1.</_>\n        <_>\n          3 6 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 5 6 -1.</_>\n        <_>\n          12 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 5 6 -1.</_>\n        <_>\n          3 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 17 8 -1.</_>\n        <_>\n          2 13 17 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 7 12 -1.</_>\n        <_>\n          6 12 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 9 -1.</_>\n        <_>\n          11 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 16 -1.</_>\n        <_>\n          6 2 2 8 2.</_>\n        <_>\n          8 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          5 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 10 6 -1.</_>\n        <_>\n          15 4 5 3 2.</_>\n        <_>\n          10 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 4 -1.</_>\n        <_>\n          6 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 7 -1.</_>\n        <_>\n          10 1 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 9 7 -1.</_>\n        <_>\n          7 1 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 13 -1.</_>\n        <_>\n          9 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 17 -1.</_>\n        <_>\n          5 1 4 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 12 -1.</_>\n        <_>\n          12 1 3 6 2.</_>\n        <_>\n          9 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 9 15 -1.</_>\n        <_>\n          5 5 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 4 -1.</_>\n        <_>\n          12 0 8 2 2.</_>\n        <_>\n          4 2 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 4 -1.</_>\n        <_>\n          0 0 8 2 2.</_>\n        <_>\n          8 2 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 10 6 -1.</_>\n        <_>\n          15 4 5 3 2.</_>\n        <_>\n          10 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 3 -1.</_>\n        <_>\n          1 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 13 2 -1.</_>\n        <_>\n          5 14 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 10 6 -1.</_>\n        <_>\n          0 4 5 3 2.</_>\n        <_>\n          5 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 12 5 -1.</_>\n        <_>\n          12 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 7 6 -1.</_>\n        <_>\n          11 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 6 -1.</_>\n        <_>\n          1 17 18 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 6 -1.</_>\n        <_>\n          3 3 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 6 -1.</_>\n        <_>\n          12 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 12 5 -1.</_>\n        <_>\n          9 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 8 -1.</_>\n        <_>\n          5 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 14 -1.</_>\n        <_>\n          15 0 2 7 2.</_>\n        <_>\n          13 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 5 -1.</_>\n        <_>\n          5 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 16 -1.</_>\n        <_>\n          12 2 3 8 2.</_>\n        <_>\n          9 10 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 14 -1.</_>\n        <_>\n          6 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 16 -1.</_>\n        <_>\n          17 4 2 8 2.</_>\n        <_>\n          15 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 8 -1.</_>\n        <_>\n          5 1 5 4 2.</_>\n        <_>\n          10 5 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 7 6 -1.</_>\n        <_>\n          11 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 14 3 -1.</_>\n        <_>\n          1 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 8 -1.</_>\n        <_>\n          13 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 7 6 -1.</_>\n        <_>\n          2 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 8 -1.</_>\n        <_>\n          0 5 9 4 2.</_>\n        <_>\n          9 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 14 -1.</_>\n        <_>\n          15 5 2 7 2.</_>\n        <_>\n          13 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 13 -1.</_>\n        <_>\n          2 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 14 -1.</_>\n        <_>\n          15 5 2 7 2.</_>\n        <_>\n          13 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 14 -1.</_>\n        <_>\n          3 5 2 7 2.</_>\n        <_>\n          5 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 7 6 -1.</_>\n        <_>\n          11 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 7 6 -1.</_>\n        <_>\n          2 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 16 -1.</_>\n        <_>\n          16 4 3 8 2.</_>\n        <_>\n          13 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 6 -1.</_>\n        <_>\n          0 9 5 3 2.</_>\n        <_>\n          5 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 15 -1.</_>\n        <_>\n          9 10 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 10 -1.</_>\n        <_>\n          10 2 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 16 -1.</_>\n        <_>\n          16 4 3 8 2.</_>\n        <_>\n          13 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 5 -1.</_>\n        <_>\n          7 8 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 16 -1.</_>\n        <_>\n          16 4 3 8 2.</_>\n        <_>\n          13 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 16 -1.</_>\n        <_>\n          1 4 3 8 2.</_>\n        <_>\n          4 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 18 4 -1.</_>\n        <_>\n          11 15 9 2 2.</_>\n        <_>\n          2 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 2 16 -1.</_>\n        <_>\n          7 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 4 -1.</_>\n        <_>\n          0 6 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 13 3 -1.</_>\n        <_>\n          2 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 17 -1.</_>\n        <_>\n          14 1 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 7 6 -1.</_>\n        <_>\n          2 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 16 -1.</_>\n        <_>\n          14 0 3 8 2.</_>\n        <_>\n          11 8 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 13 3 -1.</_>\n        <_>\n          1 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 16 -1.</_>\n        <_>\n          3 0 3 8 2.</_>\n        <_>\n          6 8 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 10 3 -1.</_>\n        <_>\n          10 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 5 -1.</_>\n        <_>\n          7 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 6 -1.</_>\n        <_>\n          7 0 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 10 3 -1.</_>\n        <_>\n          5 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 4 -1.</_>\n        <_>\n          8 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 8 -1.</_>\n        <_>\n          7 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 9 6 -1.</_>\n        <_>\n          11 11 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 7 9 -1.</_>\n        <_>\n          4 10 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 10 6 -1.</_>\n        <_>\n          5 16 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 19 4 -1.</_>\n        <_>\n          0 16 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 8 -1.</_>\n        <_>\n          12 9 6 4 2.</_>\n        <_>\n          6 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 3 14 -1.</_>\n        <_>\n          2 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 8 -1.</_>\n        <_>\n          12 9 6 4 2.</_>\n        <_>\n          6 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 8 -1.</_>\n        <_>\n          2 9 6 4 2.</_>\n        <_>\n          8 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 18 -1.</_>\n        <_>\n          18 2 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 8 -1.</_>\n        <_>\n          8 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 12 -1.</_>\n        <_>\n          10 3 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 12 -1.</_>\n        <_>\n          12 8 3 6 2.</_>\n        <_>\n          9 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 18 -1.</_>\n        <_>\n          18 2 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 17 6 -1.</_>\n        <_>\n          1 7 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 6 -1.</_>\n        <_>\n          4 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 6 -1.</_>\n        <_>\n          3 2 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 5 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 5 6 -1.</_>\n        <_>\n          0 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 10 -1.</_>\n        <_>\n          4 6 14 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 7 4 -1.</_>\n        <_>\n          0 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 4 -1.</_>\n        <_>\n          13 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 10 9 -1.</_>\n        <_>\n          6 4 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 10 19 -1.</_>\n        <_>\n          10 1 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 19 -1.</_>\n        <_>\n          5 1 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 12 -1.</_>\n        <_>\n          13 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 12 -1.</_>\n        <_>\n          3 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 4 -1.</_>\n        <_>\n          11 0 9 2 2.</_>\n        <_>\n          2 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 5 -1.</_>\n        <_>\n          9 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 8 -1.</_>\n        <_>\n          12 5 6 4 2.</_>\n        <_>\n          6 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 12 8 -1.</_>\n        <_>\n          2 5 6 4 2.</_>\n        <_>\n          8 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 13 3 -1.</_>\n        <_>\n          5 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 13 3 -1.</_>\n        <_>\n          2 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 13 2 -1.</_>\n        <_>\n          7 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 15 3 -1.</_>\n        <_>\n          2 5 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 4 -1.</_>\n        <_>\n          10 14 9 2 2.</_>\n        <_>\n          1 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 10 -1.</_>\n        <_>\n          5 8 3 5 2.</_>\n        <_>\n          8 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 10 -1.</_>\n        <_>\n          12 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 3 -1.</_>\n        <_>\n          2 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 15 3 -1.</_>\n        <_>\n          0 2 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 4 -1.</_>\n        <_>\n          2 3 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 9 -1.</_>\n        <_>\n          0 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 15 3 -1.</_>\n        <_>\n          3 6 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 10 6 -1.</_>\n        <_>\n          1 5 5 3 2.</_>\n        <_>\n          6 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 12 -1.</_>\n        <_>\n          9 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 19 2 -1.</_>\n        <_>\n          0 3 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 10 -1.</_>\n        <_>\n          16 0 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 13 3 -1.</_>\n        <_>\n          1 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 13 4 -1.</_>\n        <_>\n          7 2 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 10 -1.</_>\n        <_>\n          4 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 7 -1.</_>\n        <_>\n          9 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 13 -1.</_>\n        <_>\n          5 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 6 -1.</_>\n        <_>\n          14 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 15 -1.</_>\n        <_>\n          8 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 8 -1.</_>\n        <_>\n          16 0 4 4 2.</_>\n        <_>\n          12 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 9 -1.</_>\n        <_>\n          7 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 9 6 -1.</_>\n        <_>\n          11 11 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 9 5 -1.</_>\n        <_>\n          8 13 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 10 -1.</_>\n        <_>\n          12 9 3 5 2.</_>\n        <_>\n          9 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 10 -1.</_>\n        <_>\n          5 9 3 5 2.</_>\n        <_>\n          8 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 10 -1.</_>\n        <_>\n          16 10 3 5 2.</_>\n        <_>\n          13 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 10 -1.</_>\n        <_>\n          1 10 3 5 2.</_>\n        <_>\n          4 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 12 -1.</_>\n        <_>\n          10 3 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 12 -1.</_>\n        <_>\n          8 3 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 9 5 -1.</_>\n        <_>\n          14 1 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 3 -1.</_>\n        <_>\n          10 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 10 -1.</_>\n        <_>\n          10 2 4 5 2.</_>\n        <_>\n          6 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 8 -1.</_>\n        <_>\n          0 0 4 4 2.</_>\n        <_>\n          4 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 6 10 -1.</_>\n        <_>\n          14 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 9 5 -1.</_>\n        <_>\n          3 1 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 17 -1.</_>\n        <_>\n          16 0 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 20 -1.</_>\n        <_>\n          4 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 17 -1.</_>\n        <_>\n          16 0 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 4 -1.</_>\n        <_>\n          10 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 14 -1.</_>\n        <_>\n          8 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 14 15 -1.</_>\n        <_>\n          1 8 14 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 16 -1.</_>\n        <_>\n          16 0 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 9 -1.</_>\n        <_>\n          4 9 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 16 -1.</_>\n        <_>\n          16 0 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 16 -1.</_>\n        <_>\n          2 0 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 4 7 -1.</_>\n        <_>\n          15 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 6 -1.</_>\n        <_>\n          3 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 4 -1.</_>\n        <_>\n          12 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 4 7 -1.</_>\n        <_>\n          3 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 6 -1.</_>\n        <_>\n          14 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 2 13 -1.</_>\n        <_>\n          2 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 11 -1.</_>\n        <_>\n          7 2 6 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 7 -1.</_>\n        <_>\n          8 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 14 -1.</_>\n        <_>\n          10 6 10 7 2.</_>\n        <_>\n          0 13 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 15 -1.</_>\n        <_>\n          6 5 6 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 15 -1.</_>\n        <_>\n          16 5 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 7 -1.</_>\n        <_>\n          7 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 4 -1.</_>\n        <_>\n          10 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 10 6 -1.</_>\n        <_>\n          5 13 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 17 12 -1.</_>\n        <_>\n          3 13 17 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 17 12 -1.</_>\n        <_>\n          0 13 17 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 19 -1.</_>\n        <_>\n          8 0 6 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 7 -1.</_>\n        <_>\n          9 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 7 8 -1.</_>\n        <_>\n          9 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 19 2 -1.</_>\n        <_>\n          0 11 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 9 6 -1.</_>\n        <_>\n          11 11 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 3 -1.</_>\n        <_>\n          5 0 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 13 -1.</_>\n        <_>\n          18 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 9 6 -1.</_>\n        <_>\n          0 11 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 7 8 -1.</_>\n        <_>\n          9 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 7 8 -1.</_>\n        <_>\n          4 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 16 2 -1.</_>\n        <_>\n          3 4 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          6 10 4 4 2.</_>\n        <_>\n          10 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 10 6 -1.</_>\n        <_>\n          6 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 7 6 -1.</_>\n        <_>\n          0 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 15 9 -1.</_>\n        <_>\n          3 14 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 13 -1.</_>\n        <_>\n          1 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 20 -1.</_>\n        <_>\n          10 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 20 -1.</_>\n        <_>\n          5 0 5 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 13 3 -1.</_>\n        <_>\n          5 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 8 -1.</_>\n        <_>\n          5 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 18 -1.</_>\n        <_>\n          4 9 13 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 4 -1.</_>\n        <_>\n          5 0 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 3 -1.</_>\n        <_>\n          9 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 6 -1.</_>\n        <_>\n          9 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 2 -1.</_>\n        <_>\n          0 8 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 14 -1.</_>\n        <_>\n          6 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 5 12 -1.</_>\n        <_>\n          13 6 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 6 -1.</_>\n        <_>\n          4 4 6 3 2.</_>\n        <_>\n          10 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 8 -1.</_>\n        <_>\n          10 1 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 10 -1.</_>\n        <_>\n          1 1 3 5 2.</_>\n        <_>\n          4 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 8 -1.</_>\n        <_>\n          11 14 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 8 8 -1.</_>\n        <_>\n          1 14 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 12 -1.</_>\n        <_>\n          13 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 12 -1.</_>\n        <_>\n          4 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 13 -1.</_>\n        <_>\n          14 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 8 -1.</_>\n        <_>\n          10 1 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 9 8 -1.</_>\n        <_>\n          7 1 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 10 -1.</_>\n        <_>\n          5 2 3 5 2.</_>\n        <_>\n          8 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 13 -1.</_>\n        <_>\n          5 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          17 0 3 5 2.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 10 -1.</_>\n        <_>\n          0 0 3 5 2.</_>\n        <_>\n          3 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          8 5 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 8 -1.</_>\n        <_>\n          7 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 9 -1.</_>\n        <_>\n          15 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 4 16 -1.</_>\n        <_>\n          1 4 2 8 2.</_>\n        <_>\n          3 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 16 4 -1.</_>\n        <_>\n          11 14 8 2 2.</_>\n        <_>\n          3 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 9 6 -1.</_>\n        <_>\n          8 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 14 2 -1.</_>\n        <_>\n          6 1 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 14 2 -1.</_>\n        <_>\n          7 1 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 8 -1.</_>\n        <_>\n          12 0 4 4 2.</_>\n        <_>\n          8 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 14 -1.</_>\n        <_>\n          5 4 5 7 2.</_>\n        <_>\n          10 11 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 4 -1.</_>\n        <_>\n          11 0 9 2 2.</_>\n        <_>\n          2 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          9 5 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 14 4 -1.</_>\n        <_>\n          11 10 7 2 2.</_>\n        <_>\n          4 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 14 4 -1.</_>\n        <_>\n          2 10 7 2 2.</_>\n        <_>\n          9 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 6 -1.</_>\n        <_>\n          7 4 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 7 8 -1.</_>\n        <_>\n          6 4 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 9 4 -1.</_>\n        <_>\n          1 5 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 2 -1.</_>\n        <_>\n          4 5 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 14 3 -1.</_>\n        <_>\n          1 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 6 9 -1.</_>\n        <_>\n          9 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 4 7 -1.</_>\n        <_>\n          8 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 12 12 -1.</_>\n        <_>\n          4 8 6 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 18 5 -1.</_>\n        <_>\n          10 11 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 6 -1.</_>\n        <_>\n          4 7 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 16 -1.</_>\n        <_>\n          0 3 2 8 2.</_>\n        <_>\n          2 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 11 -1.</_>\n        <_>\n          16 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 8 -1.</_>\n        <_>\n          0 4 20 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 8 8 -1.</_>\n        <_>\n          12 7 4 4 2.</_>\n        <_>\n          8 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 8 8 -1.</_>\n        <_>\n          4 7 4 4 2.</_>\n        <_>\n          8 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 11 -1.</_>\n        <_>\n          16 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 12 -1.</_>\n        <_>\n          4 5 5 6 2.</_>\n        <_>\n          9 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 11 -1.</_>\n        <_>\n          16 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 11 -1.</_>\n        <_>\n          2 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 6 11 -1.</_>\n        <_>\n          12 4 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 11 -1.</_>\n        <_>\n          5 4 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 5 9 -1.</_>\n        <_>\n          8 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 4 -1.</_>\n        <_>\n          10 3 10 2 2.</_>\n        <_>\n          0 5 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 4 -1.</_>\n        <_>\n          0 15 9 2 2.</_>\n        <_>\n          9 17 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 13 3 -1.</_>\n        <_>\n          6 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 13 -1.</_>\n        <_>\n          10 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 13 -1.</_>\n        <_>\n          9 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 7 -1.</_>\n        <_>\n          9 6 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 7 -1.</_>\n        <_>\n          8 6 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 5 -1.</_>\n        <_>\n          8 0 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 5 -1.</_>\n        <_>\n          8 0 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 19 -1.</_>\n        <_>\n          7 1 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 20 -1.</_>\n        <_>\n          8 0 5 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 14 3 -1.</_>\n        <_>\n          7 4 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 14 6 -1.</_>\n        <_>\n          11 4 7 3 2.</_>\n        <_>\n          4 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 6 -1.</_>\n        <_>\n          0 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 3 -1.</_>\n        <_>\n          6 8 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 5 12 -1.</_>\n        <_>\n          2 6 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 7 4 -1.</_>\n        <_>\n          9 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 7 4 -1.</_>\n        <_>\n          4 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 3 -1.</_>\n        <_>\n          3 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 13 3 -1.</_>\n        <_>\n          3 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 10 -1.</_>\n        <_>\n          9 6 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 3 -1.</_>\n        <_>\n          0 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 17 2 -1.</_>\n        <_>\n          3 11 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 17 -1.</_>\n        <_>\n          3 0 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 12 -1.</_>\n        <_>\n          14 0 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 16 -1.</_>\n        <_>\n          4 0 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 7 -1.</_>\n        <_>\n          16 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 7 -1.</_>\n        <_>\n          2 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 9 12 -1.</_>\n        <_>\n          12 1 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 9 12 -1.</_>\n        <_>\n          5 1 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 12 -1.</_>\n        <_>\n          13 5 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 12 -1.</_>\n        <_>\n          5 5 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 4 -1.</_>\n        <_>\n          10 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 4 -1.</_>\n        <_>\n          6 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 11 -1.</_>\n        <_>\n          8 9 6 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 6 -1.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 19 2 -1.</_>\n        <_>\n          1 13 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 13 3 -1.</_>\n        <_>\n          0 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 16 4 -1.</_>\n        <_>\n          0 8 8 2 2.</_>\n        <_>\n          8 10 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 8 -1.</_>\n        <_>\n          12 6 4 4 2.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 6 -1.</_>\n        <_>\n          3 15 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 15 6 -1.</_>\n        <_>\n          4 15 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 4 -1.</_>\n        <_>\n          7 0 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 4 10 -1.</_>\n        <_>\n          14 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 12 -1.</_>\n        <_>\n          2 4 7 6 2.</_>\n        <_>\n          9 10 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 10 -1.</_>\n        <_>\n          10 4 3 5 2.</_>\n        <_>\n          7 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 15 -1.</_>\n        <_>\n          1 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 19 12 -1.</_>\n        <_>\n          1 5 19 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 6 7 -1.</_>\n        <_>\n          7 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 16 -1.</_>\n        <_>\n          12 0 2 8 2.</_>\n        <_>\n          10 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 16 -1.</_>\n        <_>\n          6 0 2 8 2.</_>\n        <_>\n          8 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 11 -1.</_>\n        <_>\n          8 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 3 -1.</_>\n        <_>\n          0 12 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 7 4 -1.</_>\n        <_>\n          7 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 16 4 -1.</_>\n        <_>\n          1 14 8 2 2.</_>\n        <_>\n          9 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 13 3 -1.</_>\n        <_>\n          7 17 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 18 8 -1.</_>\n        <_>\n          1 12 9 4 2.</_>\n        <_>\n          10 16 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 4 10 -1.</_>\n        <_>\n          14 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 4 10 -1.</_>\n        <_>\n          2 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 12 -1.</_>\n        <_>\n          2 7 16 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 16 -1.</_>\n        <_>\n          7 8 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 12 -1.</_>\n        <_>\n          7 7 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 15 8 -1.</_>\n        <_>\n          7 12 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 15 4 -1.</_>\n        <_>\n          9 16 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 6 -1.</_>\n        <_>\n          10 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 12 -1.</_>\n        <_>\n          1 8 9 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 15 3 -1.</_>\n        <_>\n          5 17 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 17 -1.</_>\n        <_>\n          11 2 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 17 -1.</_>\n        <_>\n          7 2 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 7 -1.</_>\n        <_>\n          9 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 15 3 -1.</_>\n        <_>\n          0 12 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 11 6 -1.</_>\n        <_>\n          9 12 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 18 -1.</_>\n        <_>\n          9 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 8 -1.</_>\n        <_>\n          14 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 15 8 -1.</_>\n        <_>\n          1 15 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 10 -1.</_>\n        <_>\n          9 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 9 -1.</_>\n        <_>\n          1 9 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 2 -1.</_>\n        <_>\n          3 2 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 3 -1.</_>\n        <_>\n          0 2 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 2 -1.</_>\n        <_>\n          5 1 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 12 10 -1.</_>\n        <_>\n          7 8 4 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 12 -1.</_>\n        <_>\n          6 6 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 4 -1.</_>\n        <_>\n          4 5 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 5 9 -1.</_>\n        <_>\n          0 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 6 -1.</_>\n        <_>\n          7 4 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 10 -1.</_>\n        <_>\n          4 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 17 14 -1.</_>\n        <_>\n          2 12 17 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 10 8 -1.</_>\n        <_>\n          0 11 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 15 -1.</_>\n        <_>\n          13 4 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 15 -1.</_>\n        <_>\n          6 4 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 12 5 -1.</_>\n        <_>\n          12 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 5 -1.</_>\n        <_>\n          4 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 3 -1.</_>\n        <_>\n          3 7 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 2 18 -1.</_>\n        <_>\n          7 1 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 9 4 -1.</_>\n        <_>\n          6 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 4 -1.</_>\n        <_>\n          3 17 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 13 3 -1.</_>\n        <_>\n          7 17 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 12 4 -1.</_>\n        <_>\n          4 4 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 14 4 -1.</_>\n        <_>\n          13 4 7 2 2.</_>\n        <_>\n          6 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 6 -1.</_>\n        <_>\n          0 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 10 8 -1.</_>\n        <_>\n          3 12 5 4 2.</_>\n        <_>\n          8 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 9 -1.</_>\n        <_>\n          12 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 4 -1.</_>\n        <_>\n          0 13 7 2 2.</_>\n        <_>\n          7 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 10 -1.</_>\n        <_>\n          2 10 3 5 2.</_>\n        <_>\n          5 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 7 6 -1.</_>\n        <_>\n          0 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 20 6 -1.</_>\n        <_>\n          0 15 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 16 4 -1.</_>\n        <_>\n          1 18 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 9 -1.</_>\n        <_>\n          12 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 5 9 -1.</_>\n        <_>\n          3 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 13 12 -1.</_>\n        <_>\n          5 12 13 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 6 -1.</_>\n        <_>\n          5 5 5 3 2.</_>\n        <_>\n          10 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 6 -1.</_>\n        <_>\n          10 5 5 3 2.</_>\n        <_>\n          5 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 13 2 -1.</_>\n        <_>\n          0 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 12 4 -1.</_>\n        <_>\n          8 4 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 6 -1.</_>\n        <_>\n          5 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 4 -1.</_>\n        <_>\n          12 2 7 2 2.</_>\n        <_>\n          5 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 8 -1.</_>\n        <_>\n          5 4 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 4 -1.</_>\n        <_>\n          12 2 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 8 -1.</_>\n        <_>\n          8 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 5 8 -1.</_>\n        <_>\n          9 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 4 -1.</_>\n        <_>\n          6 14 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 14 4 -1.</_>\n        <_>\n          11 6 7 2 2.</_>\n        <_>\n          4 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 11 10 -1.</_>\n        <_>\n          4 9 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 12 -1.</_>\n        <_>\n          7 7 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 15 -1.</_>\n        <_>\n          8 10 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 3 -1.</_>\n        <_>\n          7 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 6 -1.</_>\n        <_>\n          0 6 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 4 -1.</_>\n        <_>\n          5 5 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 8 -1.</_>\n        <_>\n          6 11 4 4 2.</_>\n        <_>\n          10 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 13 3 -1.</_>\n        <_>\n          5 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 18 4 -1.</_>\n        <_>\n          0 13 9 2 2.</_>\n        <_>\n          9 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 13 -1.</_>\n        <_>\n          11 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 13 -1.</_>\n        <_>\n          8 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 18 -1.</_>\n        <_>\n          8 0 6 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 12 15 -1.</_>\n        <_>\n          2 7 12 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 11 18 -1.</_>\n        <_>\n          7 7 11 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 14 -1.</_>\n        <_>\n          8 5 2 7 2.</_>\n        <_>\n          10 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 3 14 -1.</_>\n        <_>\n          10 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 14 -1.</_>\n        <_>\n          7 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 4 -1.</_>\n        <_>\n          3 6 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 4 -1.</_>\n        <_>\n          0 5 10 2 2.</_>\n        <_>\n          10 7 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 14 -1.</_>\n        <_>\n          8 11 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 4 16 -1.</_>\n        <_>\n          17 3 2 8 2.</_>\n        <_>\n          15 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 7 -1.</_>\n        <_>\n          4 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 5 9 -1.</_>\n        <_>\n          12 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 8 6 -1.</_>\n        <_>\n          2 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 8 -1.</_>\n        <_>\n          10 1 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 8 -1.</_>\n        <_>\n          8 1 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 7 6 -1.</_>\n        <_>\n          10 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 5 6 -1.</_>\n        <_>\n          4 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 7 4 -1.</_>\n        <_>\n          7 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 8 -1.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 7 6 -1.</_>\n        <_>\n          10 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 7 6 -1.</_>\n        <_>\n          3 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 12 -1.</_>\n        <_>\n          11 6 3 6 2.</_>\n        <_>\n          8 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 14 -1.</_>\n        <_>\n          5 6 2 7 2.</_>\n        <_>\n          7 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 2 -1.</_>\n        <_>\n          0 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 13 2 -1.</_>\n        <_>\n          6 16 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 19 3 -1.</_>\n        <_>\n          0 18 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 10 -1.</_>\n        <_>\n          12 5 3 5 2.</_>\n        <_>\n          9 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 13 2 -1.</_>\n        <_>\n          3 4 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 17 6 -1.</_>\n        <_>\n          2 2 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 16 -1.</_>\n        <_>\n          1 3 2 8 2.</_>\n        <_>\n          3 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 8 6 -1.</_>\n        <_>\n          12 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 4 -1.</_>\n        <_>\n          5 7 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          14 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 6 -1.</_>\n        <_>\n          10 0 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 10 -1.</_>\n        <_>\n          10 9 3 5 2.</_>\n        <_>\n          7 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 18 6 -1.</_>\n        <_>\n          6 14 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 16 -1.</_>\n        <_>\n          14 0 3 8 2.</_>\n        <_>\n          11 8 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 7 -1.</_>\n        <_>\n          7 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 8 -1.</_>\n        <_>\n          11 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 8 -1.</_>\n        <_>\n          7 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 13 -1.</_>\n        <_>\n          17 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 16 6 -1.</_>\n        <_>\n          9 14 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 6 -1.</_>\n        <_>\n          5 3 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 14 15 -1.</_>\n        <_>\n          6 9 14 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 4 -1.</_>\n        <_>\n          3 1 7 2 2.</_>\n        <_>\n          10 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 10 -1.</_>\n        <_>\n          11 3 3 5 2.</_>\n        <_>\n          8 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 10 -1.</_>\n        <_>\n          6 3 3 5 2.</_>\n        <_>\n          9 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 10 -1.</_>\n        <_>\n          12 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 10 -1.</_>\n        <_>\n          5 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 5 -1.</_>\n        <_>\n          11 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 6 -1.</_>\n        <_>\n          5 7 5 3 2.</_>\n        <_>\n          10 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 19 3 -1.</_>\n        <_>\n          1 11 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 13 -1.</_>\n        <_>\n          2 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 16 -1.</_>\n        <_>\n          16 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 14 12 -1.</_>\n        <_>\n          3 5 7 6 2.</_>\n        <_>\n          10 11 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 16 -1.</_>\n        <_>\n          16 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 16 -1.</_>\n        <_>\n          2 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 4 -1.</_>\n        <_>\n          8 2 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 12 6 -1.</_>\n        <_>\n          3 12 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 13 -1.</_>\n        <_>\n          9 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 10 -1.</_>\n        <_>\n          11 9 3 5 2.</_>\n        <_>\n          8 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 10 -1.</_>\n        <_>\n          6 9 3 5 2.</_>\n        <_>\n          9 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 10 3 -1.</_>\n        <_>\n          5 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 18 -1.</_>\n        <_>\n          8 2 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 15 6 -1.</_>\n        <_>\n          10 14 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 7 6 -1.</_>\n        <_>\n          0 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 15 6 -1.</_>\n        <_>\n          10 14 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 15 6 -1.</_>\n        <_>\n          5 14 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 7 6 -1.</_>\n        <_>\n          12 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 4 14 -1.</_>\n        <_>\n          2 4 2 7 2.</_>\n        <_>\n          4 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 12 -1.</_>\n        <_>\n          14 1 3 6 2.</_>\n        <_>\n          11 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 12 -1.</_>\n        <_>\n          3 1 3 6 2.</_>\n        <_>\n          6 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 6 -1.</_>\n        <_>\n          9 7 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 10 -1.</_>\n        <_>\n          1 0 3 5 2.</_>\n        <_>\n          4 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 9 5 -1.</_>\n        <_>\n          11 13 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 7 -1.</_>\n        <_>\n          3 0 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 8 5 -1.</_>\n        <_>\n          9 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 8 5 -1.</_>\n        <_>\n          7 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 19 -1.</_>\n        <_>\n          8 0 4 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 8 6 -1.</_>\n        <_>\n          7 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 5 6 -1.</_>\n        <_>\n          15 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 13 10 -1.</_>\n        <_>\n          3 6 13 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 10 -1.</_>\n        <_>\n          14 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 8 -1.</_>\n        <_>\n          0 1 10 4 2.</_>\n        <_>\n          10 5 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 12 -1.</_>\n        <_>\n          11 6 3 6 2.</_>\n        <_>\n          8 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 10 -1.</_>\n        <_>\n          10 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 14 -1.</_>\n        <_>\n          9 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 18 -1.</_>\n        <_>\n          11 1 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 18 -1.</_>\n        <_>\n          7 1 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 5 -1.</_>\n        <_>\n          7 1 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 8 -1.</_>\n        <_>\n          7 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 7 6 -1.</_>\n        <_>\n          12 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 7 6 -1.</_>\n        <_>\n          1 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 7 4 -1.</_>\n        <_>\n          9 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 9 -1.</_>\n        <_>\n          0 5 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 9 -1.</_>\n        <_>\n          10 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 6 -1.</_>\n        <_>\n          0 1 9 3 2.</_>\n        <_>\n          9 4 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 3 -1.</_>\n        <_>\n          5 7 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 5 -1.</_>\n        <_>\n          3 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 9 6 -1.</_>\n        <_>\n          13 10 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 9 -1.</_>\n        <_>\n          0 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 19 -1.</_>\n        <_>\n          8 0 4 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 13 -1.</_>\n        <_>\n          9 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 6 -1.</_>\n        <_>\n          12 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 9 6 -1.</_>\n        <_>\n          6 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 14 -1.</_>\n        <_>\n          10 4 4 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 12 14 -1.</_>\n        <_>\n          6 4 4 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 5 -1.</_>\n        <_>\n          7 1 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 19 -1.</_>\n        <_>\n          8 0 4 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 9 5 -1.</_>\n        <_>\n          11 13 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 9 5 -1.</_>\n        <_>\n          6 13 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 4 -1.</_>\n        <_>\n          8 1 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 18 -1.</_>\n        <_>\n          1 2 4 9 2.</_>\n        <_>\n          5 11 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 6 9 -1.</_>\n        <_>\n          11 14 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 6 9 -1.</_>\n        <_>\n          3 14 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 10 6 -1.</_>\n        <_>\n          13 14 5 3 2.</_>\n        <_>\n          8 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 7 -1.</_>\n        <_>\n          9 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 7 6 -1.</_>\n        <_>\n          9 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 7 6 -1.</_>\n        <_>\n          4 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 16 -1.</_>\n        <_>\n          3 8 17 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 19 3 -1.</_>\n        <_>\n          0 1 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 5 9 -1.</_>\n        <_>\n          11 4 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 10 6 -1.</_>\n        <_>\n          4 4 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 12 9 -1.</_>\n        <_>\n          7 13 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 12 3 -1.</_>\n        <_>\n          7 10 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 12 -1.</_>\n        <_>\n          10 8 3 6 2.</_>\n        <_>\n          7 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 6 -1.</_>\n        <_>\n          2 14 5 3 2.</_>\n        <_>\n          7 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 8 -1.</_>\n        <_>\n          10 9 4 4 2.</_>\n        <_>\n          6 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          7 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 6 -1.</_>\n        <_>\n          11 6 5 3 2.</_>\n        <_>\n          6 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 6 -1.</_>\n        <_>\n          4 6 5 3 2.</_>\n        <_>\n          9 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 9 5 -1.</_>\n        <_>\n          9 14 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 10 -1.</_>\n        <_>\n          8 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 7 -1.</_>\n        <_>\n          10 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 8 4 -1.</_>\n        <_>\n          8 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 9 -1.</_>\n        <_>\n          0 3 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 8 4 -1.</_>\n        <_>\n          9 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 5 6 -1.</_>\n        <_>\n          4 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 9 4 -1.</_>\n        <_>\n          8 8 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 13 -1.</_>\n        <_>\n          1 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 11 -1.</_>\n        <_>\n          15 1 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 11 -1.</_>\n        <_>\n          3 1 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 5 -1.</_>\n        <_>\n          11 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 17 -1.</_>\n        <_>\n          6 2 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 8 8 -1.</_>\n        <_>\n          12 12 4 4 2.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 13 -1.</_>\n        <_>\n          5 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 4 -1.</_>\n        <_>\n          6 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 9 6 -1.</_>\n        <_>\n          2 13 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 11 6 -1.</_>\n        <_>\n          9 14 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 8 -1.</_>\n        <_>\n          3 11 7 4 2.</_>\n        <_>\n          10 15 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 10 -1.</_>\n        <_>\n          8 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 3 -1.</_>\n        <_>\n          1 13 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 12 -1.</_>\n        <_>\n          9 11 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 7 6 -1.</_>\n        <_>\n          0 17 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 6 -1.</_>\n        <_>\n          13 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 16 -1.</_>\n        <_>\n          4 12 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 9 4 -1.</_>\n        <_>\n          11 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 9 4 -1.</_>\n        <_>\n          0 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 6 -1.</_>\n        <_>\n          2 14 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 13 -1.</_>\n        <_>\n          1 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 7 -1.</_>\n        <_>\n          9 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 12 4 -1.</_>\n        <_>\n          4 11 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 8 -1.</_>\n        <_>\n          13 9 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 8 -1.</_>\n        <_>\n          5 9 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 19 -1.</_>\n        <_>\n          11 0 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 8 -1.</_>\n        <_>\n          7 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 7 6 -1.</_>\n        <_>\n          13 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 13 3 -1.</_>\n        <_>\n          1 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 13 3 -1.</_>\n        <_>\n          5 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 9 4 -1.</_>\n        <_>\n          4 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 7 6 -1.</_>\n        <_>\n          7 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 14 4 -1.</_>\n        <_>\n          3 14 7 2 2.</_>\n        <_>\n          10 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 7 14 -1.</_>\n        <_>\n          13 7 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 14 -1.</_>\n        <_>\n          0 7 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 16 4 -1.</_>\n        <_>\n          3 2 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 8 -1.</_>\n        <_>\n          6 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 14 -1.</_>\n        <_>\n          10 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 9 -1.</_>\n        <_>\n          1 10 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 14 -1.</_>\n        <_>\n          9 5 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 9 14 -1.</_>\n        <_>\n          8 5 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 15 -1.</_>\n        <_>\n          11 2 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 4 8 -1.</_>\n        <_>\n          8 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 10 9 -1.</_>\n        <_>\n          6 13 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 14 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_>\n        <_>\n          7 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 13 -1.</_>\n        <_>\n          9 5 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 12 4 -1.</_>\n        <_>\n          8 11 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 14 2 -1.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 14 2 -1.</_>\n        <_>\n          7 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 15 -1.</_>\n        <_>\n          16 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 10 -1.</_>\n        <_>\n          2 0 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 12 -1.</_>\n        <_>\n          16 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 4 12 -1.</_>\n        <_>\n          0 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 6 -1.</_>\n        <_>\n          12 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 6 -1.</_>\n        <_>\n          0 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 14 -1.</_>\n        <_>\n          11 5 2 7 2.</_>\n        <_>\n          9 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 11 6 -1.</_>\n        <_>\n          0 14 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 5 -1.</_>\n        <_>\n          9 15 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 12 -1.</_>\n        <_>\n          6 6 3 6 2.</_>\n        <_>\n          9 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 8 4 -1.</_>\n        <_>\n          7 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 10 -1.</_>\n        <_>\n          5 8 3 5 2.</_>\n        <_>\n          8 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 7 14 -1.</_>\n        <_>\n          7 11 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 8 -1.</_>\n        <_>\n          7 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 9 -1.</_>\n        <_>\n          9 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 9 -1.</_>\n        <_>\n          5 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 13 -1.</_>\n        <_>\n          15 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 11 -1.</_>\n        <_>\n          10 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          10 1 9 2 2.</_>\n        <_>\n          1 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 4 16 -1.</_>\n        <_>\n          3 4 2 8 2.</_>\n        <_>\n          5 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 8 -1.</_>\n        <_>\n          10 12 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 7 -1.</_>\n        <_>\n          2 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 9 -1.</_>\n        <_>\n          14 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 7 9 -1.</_>\n        <_>\n          0 5 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 13 -1.</_>\n        <_>\n          17 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 13 -1.</_>\n        <_>\n          2 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 7 -1.</_>\n        <_>\n          6 7 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 10 -1.</_>\n        <_>\n          5 3 3 5 2.</_>\n        <_>\n          8 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 5 -1.</_>\n        <_>\n          9 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 5 -1.</_>\n        <_>\n          6 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 8 -1.</_>\n        <_>\n          12 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 8 -1.</_>\n        <_>\n          4 4 6 4 2.</_>\n        <_>\n          10 8 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 10 6 -1.</_>\n        <_>\n          13 8 5 3 2.</_>\n        <_>\n          8 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 10 6 -1.</_>\n        <_>\n          2 8 5 3 2.</_>\n        <_>\n          7 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 8 14 -1.</_>\n        <_>\n          13 5 4 7 2.</_>\n        <_>\n          9 12 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 13 -1.</_>\n        <_>\n          4 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 9 5 -1.</_>\n        <_>\n          9 14 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 14 -1.</_>\n        <_>\n          1 6 2 7 2.</_>\n        <_>\n          3 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 8 8 -1.</_>\n        <_>\n          13 6 4 4 2.</_>\n        <_>\n          9 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 8 -1.</_>\n        <_>\n          2 4 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 8 14 -1.</_>\n        <_>\n          13 5 4 7 2.</_>\n        <_>\n          9 12 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 8 8 -1.</_>\n        <_>\n          3 6 4 4 2.</_>\n        <_>\n          7 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 10 -1.</_>\n        <_>\n          14 3 3 5 2.</_>\n        <_>\n          11 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 10 -1.</_>\n        <_>\n          3 3 3 5 2.</_>\n        <_>\n          6 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 10 -1.</_>\n        <_>\n          15 0 4 5 2.</_>\n        <_>\n          11 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 13 3 -1.</_>\n        <_>\n          3 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 13 3 -1.</_>\n        <_>\n          5 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 12 -1.</_>\n        <_>\n          0 8 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 6 -1.</_>\n        <_>\n          12 8 8 3 2.</_>\n        <_>\n          4 11 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 7 6 -1.</_>\n        <_>\n          12 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 9 7 -1.</_>\n        <_>\n          5 9 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 15 9 -1.</_>\n        <_>\n          5 9 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 15 9 -1.</_>\n        <_>\n          0 9 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 14 2 -1.</_>\n        <_>\n          6 9 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 10 3 -1.</_>\n        <_>\n          8 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 5 -1.</_>\n        <_>\n          14 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 2 -1.</_>\n        <_>\n          10 6 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 12 8 -1.</_>\n        <_>\n          5 12 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 18 3 -1.</_>\n        <_>\n          0 4 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 4 -1.</_>\n        <_>\n          10 15 7 2 2.</_>\n        <_>\n          3 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 16 2 -1.</_>\n        <_>\n          2 8 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 7 6 -1.</_>\n        <_>\n          10 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 19 2 -1.</_>\n        <_>\n          0 11 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 7 18 -1.</_>\n        <_>\n          13 9 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 9 5 -1.</_>\n        <_>\n          4 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 17 -1.</_>\n        <_>\n          18 0 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 16 -1.</_>\n        <_>\n          1 0 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 10 -1.</_>\n        <_>\n          10 1 3 5 2.</_>\n        <_>\n          7 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 11 -1.</_>\n        <_>\n          4 9 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 16 -1.</_>\n        <_>\n          10 2 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 16 -1.</_>\n        <_>\n          8 2 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 13 -1.</_>\n        <_>\n          10 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 12 -1.</_>\n        <_>\n          9 4 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 9 -1.</_>\n        <_>\n          7 9 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 13 3 -1.</_>\n        <_>\n          0 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 7 6 -1.</_>\n        <_>\n          10 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 11 6 -1.</_>\n        <_>\n          4 4 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 8 4 -1.</_>\n        <_>\n          9 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 10 -1.</_>\n        <_>\n          5 5 3 5 2.</_>\n        <_>\n          8 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 3 13 -1.</_>\n        <_>\n          16 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 3 13 -1.</_>\n        <_>\n          3 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 13 -1.</_>\n        <_>\n          14 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 10 6 -1.</_>\n        <_>\n          4 3 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 8 -1.</_>\n        <_>\n          0 6 20 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 13 18 -1.</_>\n        <_>\n          2 10 13 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 10 -1.</_>\n        <_>\n          9 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 14 -1.</_>\n        <_>\n          9 6 6 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 6 -1.</_>\n        <_>\n          8 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 3 -1.</_>\n        <_>\n          7 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 18 2 -1.</_>\n        <_>\n          2 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 3 13 -1.</_>\n        <_>\n          5 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 7 -1.</_>\n        <_>\n          13 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 7 -1.</_>\n        <_>\n          5 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 13 -1.</_>\n        <_>\n          13 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 13 -1.</_>\n        <_>\n          9 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 5 12 -1.</_>\n        <_>\n          8 12 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 8 5 -1.</_>\n        <_>\n          6 4 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 16 -1.</_>\n        <_>\n          7 4 3 8 2.</_>\n        <_>\n          10 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 13 -1.</_>\n        <_>\n          13 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 8 4 -1.</_>\n        <_>\n          3 9 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 6 -1.</_>\n        <_>\n          12 8 8 3 2.</_>\n        <_>\n          4 11 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 9 8 -1.</_>\n        <_>\n          5 15 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 17 -1.</_>\n        <_>\n          12 3 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 17 -1.</_>\n        <_>\n          6 3 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 3 -1.</_>\n        <_>\n          5 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 16 2 -1.</_>\n        <_>\n          9 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 10 -1.</_>\n        <_>\n          9 1 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 13 -1.</_>\n        <_>\n          6 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 13 2 -1.</_>\n        <_>\n          4 10 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 13 3 -1.</_>\n        <_>\n          1 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 12 -1.</_>\n        <_>\n          3 4 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 6 -1.</_>\n        <_>\n          0 4 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 11 10 -1.</_>\n        <_>\n          9 5 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 20 -1.</_>\n        <_>\n          0 10 20 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 10 4 -1.</_>\n        <_>\n          10 1 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 4 -1.</_>\n        <_>\n          5 1 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 10 -1.</_>\n        <_>\n          15 0 4 5 2.</_>\n        <_>\n          11 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 10 -1.</_>\n        <_>\n          1 0 4 5 2.</_>\n        <_>\n          5 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 14 4 -1.</_>\n        <_>\n          13 3 7 2 2.</_>\n        <_>\n          6 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 4 -1.</_>\n        <_>\n          0 3 10 2 2.</_>\n        <_>\n          10 5 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 7 -1.</_>\n        <_>\n          6 6 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 7 -1.</_>\n        <_>\n          10 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 16 -1.</_>\n        <_>\n          8 0 4 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 8 -1.</_>\n        <_>\n          7 6 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 11 8 -1.</_>\n        <_>\n          7 16 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 12 -1.</_>\n        <_>\n          6 0 3 6 2.</_>\n        <_>\n          9 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 12 -1.</_>\n        <_>\n          10 3 6 6 2.</_>\n        <_>\n          4 9 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 7 -1.</_>\n        <_>\n          4 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 4 7 -1.</_>\n        <_>\n          15 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 4 7 -1.</_>\n        <_>\n          3 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 13 2 -1.</_>\n        <_>\n          3 3 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 14 3 -1.</_>\n        <_>\n          4 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 7 6 -1.</_>\n        <_>\n          1 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 13 9 -1.</_>\n        <_>\n          6 8 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 16 6 -1.</_>\n        <_>\n          0 8 8 3 2.</_>\n        <_>\n          8 11 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 5 12 -1.</_>\n        <_>\n          15 5 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 5 12 -1.</_>\n        <_>\n          0 5 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 14 3 -1.</_>\n        <_>\n          5 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 9 -1.</_>\n        <_>\n          4 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 9 7 -1.</_>\n        <_>\n          14 13 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 5 -1.</_>\n        <_>\n          3 15 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 11 -1.</_>\n        <_>\n          16 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 19 3 -1.</_>\n        <_>\n          0 12 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 14 4 -1.</_>\n        <_>\n          13 15 7 2 2.</_>\n        <_>\n          6 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 6 -1.</_>\n        <_>\n          0 7 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 11 -1.</_>\n        <_>\n          16 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 11 -1.</_>\n        <_>\n          2 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 5 -1.</_>\n        <_>\n          8 11 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 14 4 -1.</_>\n        <_>\n          1 15 7 2 2.</_>\n        <_>\n          8 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 7 9 -1.</_>\n        <_>\n          12 13 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 7 9 -1.</_>\n        <_>\n          1 13 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 8 -1.</_>\n        <_>\n          15 7 4 4 2.</_>\n        <_>\n          11 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 8 4 -1.</_>\n        <_>\n          6 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 19 -1.</_>\n        <_>\n          11 1 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 10 -1.</_>\n        <_>\n          6 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 5 -1.</_>\n        <_>\n          11 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 5 -1.</_>\n        <_>\n          6 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 15 4 -1.</_>\n        <_>\n          9 12 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 16 2 -1.</_>\n        <_>\n          8 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 4 -1.</_>\n        <_>\n          13 6 7 2 2.</_>\n        <_>\n          6 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 8 14 -1.</_>\n        <_>\n          3 5 4 7 2.</_>\n        <_>\n          7 12 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 7 15 -1.</_>\n        <_>\n          12 7 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 7 15 -1.</_>\n        <_>\n          1 7 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 12 -1.</_>\n        <_>\n          13 6 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 10 -1.</_>\n        <_>\n          6 0 4 5 2.</_>\n        <_>\n          10 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 19 -1.</_>\n        <_>\n          11 0 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 8 8 -1.</_>\n        <_>\n          4 12 4 4 2.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 15 4 -1.</_>\n        <_>\n          9 12 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 19 -1.</_>\n        <_>\n          8 0 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 9 -1.</_>\n        <_>\n          10 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 4 -1.</_>\n        <_>\n          9 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 15 4 -1.</_>\n        <_>\n          9 12 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 4 12 -1.</_>\n        <_>\n          2 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 6 -1.</_>\n        <_>\n          10 7 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 4 -1.</_>\n        <_>\n          7 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 12 4 -1.</_>\n        <_>\n          8 14 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 4 -1.</_>\n        <_>\n          6 14 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 15 4 -1.</_>\n        <_>\n          9 12 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 15 4 -1.</_>\n        <_>\n          6 12 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 18 -1.</_>\n        <_>\n          10 0 4 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 14 4 -1.</_>\n        <_>\n          0 6 7 2 2.</_>\n        <_>\n          7 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 7 6 -1.</_>\n        <_>\n          13 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 18 -1.</_>\n        <_>\n          0 9 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 14 4 -1.</_>\n        <_>\n          13 8 7 2 2.</_>\n        <_>\n          6 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 14 4 -1.</_>\n        <_>\n          0 8 7 2 2.</_>\n        <_>\n          7 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 10 -1.</_>\n        <_>\n          3 7 14 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 7 -1.</_>\n        <_>\n          5 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 14 6 -1.</_>\n        <_>\n          11 4 7 3 2.</_>\n        <_>\n          4 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 10 -1.</_>\n        <_>\n          6 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 18 -1.</_>\n        <_>\n          11 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 3 15 -1.</_>\n        <_>\n          3 6 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 6 -1.</_>\n        <_>\n          7 0 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 15 -1.</_>\n        <_>\n          2 5 9 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 3 -1.</_>\n        <_>\n          8 0 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 8 -1.</_>\n        <_>\n          6 8 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 15 12 -1.</_>\n        <_>\n          10 8 5 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 3 -1.</_>\n        <_>\n          6 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 14 -1.</_>\n        <_>\n          9 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 6 -1.</_>\n        <_>\n          5 6 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 7 6 -1.</_>\n        <_>\n          9 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 4 -1.</_>\n        <_>\n          7 7 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 4 -1.</_>\n        <_>\n          8 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 4 -1.</_>\n        <_>\n          0 3 7 2 2.</_>\n        <_>\n          7 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 15 3 -1.</_>\n        <_>\n          5 18 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 6 -1.</_>\n        <_>\n          5 11 5 3 2.</_>\n        <_>\n          10 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 3 -1.</_>\n        <_>\n          4 5 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 5 9 -1.</_>\n        <_>\n          5 14 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 13 -1.</_>\n        <_>\n          15 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 6 9 -1.</_>\n        <_>\n          2 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 13 -1.</_>\n        <_>\n          15 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 14 -1.</_>\n        <_>\n          1 3 2 7 2.</_>\n        <_>\n          3 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 12 -1.</_>\n        <_>\n          13 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 13 -1.</_>\n        <_>\n          9 7 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 5 -1.</_>\n        <_>\n          10 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 5 -1.</_>\n        <_>\n          8 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 13 -1.</_>\n        <_>\n          9 5 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 12 -1.</_>\n        <_>\n          7 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 3 -1.</_>\n        <_>\n          8 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 16 -1.</_>\n        <_>\n          4 3 6 8 2.</_>\n        <_>\n          10 11 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 13 -1.</_>\n        <_>\n          15 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 3 -1.</_>\n        <_>\n          3 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 20 7 -1.</_>\n        <_>\n          0 13 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 13 -1.</_>\n        <_>\n          4 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 14 -1.</_>\n        <_>\n          4 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 12 -1.</_>\n        <_>\n          16 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 14 4 -1.</_>\n        <_>\n          0 6 7 2 2.</_>\n        <_>\n          7 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 12 -1.</_>\n        <_>\n          16 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 6 -1.</_>\n        <_>\n          0 6 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 12 -1.</_>\n        <_>\n          16 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 15 3 -1.</_>\n        <_>\n          0 9 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 6 -1.</_>\n        <_>\n          10 1 8 3 2.</_>\n        <_>\n          2 4 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 12 -1.</_>\n        <_>\n          2 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 9 5 -1.</_>\n        <_>\n          12 2 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 4 -1.</_>\n        <_>\n          7 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 13 -1.</_>\n        <_>\n          14 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 7 -1.</_>\n        <_>\n          2 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 13 -1.</_>\n        <_>\n          14 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 6 -1.</_>\n        <_>\n          3 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 5 -1.</_>\n        <_>\n          10 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 7 -1.</_>\n        <_>\n          8 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 7 -1.</_>\n        <_>\n          7 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 13 -1.</_>\n        <_>\n          5 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 3 -1.</_>\n        <_>\n          8 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 14 -1.</_>\n        <_>\n          6 5 2 7 2.</_>\n        <_>\n          8 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 19 4 -1.</_>\n        <_>\n          1 7 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 7 6 -1.</_>\n        <_>\n          0 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 13 2 -1.</_>\n        <_>\n          6 13 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 10 -1.</_>\n        <_>\n          3 0 6 5 2.</_>\n        <_>\n          9 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 3 -1.</_>\n        <_>\n          8 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 3 -1.</_>\n        <_>\n          9 15 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 14 6 -1.</_>\n        <_>\n          6 14 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 14 6 -1.</_>\n        <_>\n          7 14 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 7 -1.</_>\n        <_>\n          13 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 4 -1.</_>\n        <_>\n          6 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 7 6 -1.</_>\n        <_>\n          13 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 6 -1.</_>\n        <_>\n          0 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 7 4 -1.</_>\n        <_>\n          12 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 8 -1.</_>\n        <_>\n          1 2 4 4 2.</_>\n        <_>\n          5 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 3 -1.</_>\n        <_>\n          8 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 3 -1.</_>\n        <_>\n          6 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 6 -1.</_>\n        <_>\n          8 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 7 -1.</_>\n        <_>\n          7 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 16 2 -1.</_>\n        <_>\n          3 17 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 6 -1.</_>\n        <_>\n          3 3 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 3 -1.</_>\n        <_>\n          4 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 5 12 -1.</_>\n        <_>\n          1 5 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 13 3 -1.</_>\n        <_>\n          6 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 7 4 -1.</_>\n        <_>\n          1 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 8 -1.</_>\n        <_>\n          9 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 8 -1.</_>\n        <_>\n          9 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 8 -1.</_>\n        <_>\n          16 12 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 3 -1.</_>\n        <_>\n          3 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 9 5 -1.</_>\n        <_>\n          12 2 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 7 4 -1.</_>\n        <_>\n          5 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 6 -1.</_>\n        <_>\n          11 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 7 6 -1.</_>\n        <_>\n          2 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 9 4 -1.</_>\n        <_>\n          10 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 13 3 -1.</_>\n        <_>\n          2 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 10 6 -1.</_>\n        <_>\n          10 15 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 10 6 -1.</_>\n        <_>\n          0 15 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 16 8 -1.</_>\n        <_>\n          10 8 8 4 2.</_>\n        <_>\n          2 12 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 7 -1.</_>\n        <_>\n          5 0 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 7 -1.</_>\n        <_>\n          9 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 10 9 -1.</_>\n        <_>\n          1 10 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 11 6 -1.</_>\n        <_>\n          5 5 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 13 -1.</_>\n        <_>\n          1 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 11 -1.</_>\n        <_>\n          16 1 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 14 -1.</_>\n        <_>\n          2 6 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 8 12 -1.</_>\n        <_>\n          11 8 4 6 2.</_>\n        <_>\n          7 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 8 -1.</_>\n        <_>\n          2 10 8 4 2.</_>\n        <_>\n          10 14 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 7 8 -1.</_>\n        <_>\n          11 10 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 7 8 -1.</_>\n        <_>\n          2 10 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 14 -1.</_>\n        <_>\n          17 6 2 7 2.</_>\n        <_>\n          15 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 14 -1.</_>\n        <_>\n          1 6 2 7 2.</_>\n        <_>\n          3 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 4 8 -1.</_>\n        <_>\n          15 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 8 -1.</_>\n        <_>\n          4 0 4 4 2.</_>\n        <_>\n          8 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 7 6 -1.</_>\n        <_>\n          7 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 3 -1.</_>\n        <_>\n          3 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 6 -1.</_>\n        <_>\n          10 2 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 2 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 20 14 -1.</_>\n        <_>\n          0 10 20 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 12 -1.</_>\n        <_>\n          2 0 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 6 -1.</_>\n        <_>\n          12 3 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 12 6 -1.</_>\n        <_>\n          4 3 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 4 8 -1.</_>\n        <_>\n          14 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 4 8 -1.</_>\n        <_>\n          4 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 6 10 -1.</_>\n        <_>\n          16 6 3 5 2.</_>\n        <_>\n          13 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 6 10 -1.</_>\n        <_>\n          1 6 3 5 2.</_>\n        <_>\n          4 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 2 -1.</_>\n        <_>\n          7 14 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 11 4 -1.</_>\n        <_>\n          3 14 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 8 -1.</_>\n        <_>\n          13 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 6 8 -1.</_>\n        <_>\n          4 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 8 8 -1.</_>\n        <_>\n          16 6 4 4 2.</_>\n        <_>\n          12 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 8 8 -1.</_>\n        <_>\n          0 6 4 4 2.</_>\n        <_>\n          4 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 16 2 -1.</_>\n        <_>\n          3 9 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 16 3 -1.</_>\n        <_>\n          0 8 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 14 3 -1.</_>\n        <_>\n          5 12 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 20 -1.</_>\n        <_>\n          9 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 9 7 -1.</_>\n        <_>\n          11 10 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 3 -1.</_>\n        <_>\n          10 6 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 3 -1.</_>\n        <_>\n          4 8 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 14 5 -1.</_>\n        <_>\n          7 5 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 9 7 -1.</_>\n        <_>\n          11 10 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 9 7 -1.</_>\n        <_>\n          6 10 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 10 -1.</_>\n        <_>\n          11 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 6 -1.</_>\n        <_>\n          1 9 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 15 -1.</_>\n        <_>\n          8 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 15 -1.</_>\n        <_>\n          6 6 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 14 3 -1.</_>\n        <_>\n          6 10 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 10 -1.</_>\n        <_>\n          1 10 3 5 2.</_>\n        <_>\n          4 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 13 -1.</_>\n        <_>\n          11 3 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 9 -1.</_>\n        <_>\n          10 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 8 -1.</_>\n        <_>\n          10 1 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 2 -1.</_>\n        <_>\n          3 6 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 8 -1.</_>\n        <_>\n          3 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 14 -1.</_>\n        <_>\n          18 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 14 -1.</_>\n        <_>\n          0 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 16 2 -1.</_>\n        <_>\n          3 15 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 9 6 -1.</_>\n        <_>\n          2 3 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 7 6 -1.</_>\n        <_>\n          11 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 8 8 -1.</_>\n        <_>\n          1 8 4 4 2.</_>\n        <_>\n          5 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 5 8 -1.</_>\n        <_>\n          8 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 8 8 -1.</_>\n        <_>\n          4 12 4 4 2.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 4 8 -1.</_>\n        <_>\n          15 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 5 8 -1.</_>\n        <_>\n          7 15 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 13 2 -1.</_>\n        <_>\n          5 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 9 12 -1.</_>\n        <_>\n          2 8 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 3 -1.</_>\n        <_>\n          3 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 13 3 -1.</_>\n        <_>\n          0 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 8 6 -1.</_>\n        <_>\n          9 16 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 4 8 -1.</_>\n        <_>\n          1 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 12 4 -1.</_>\n        <_>\n          9 16 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 7 -1.</_>\n        <_>\n          6 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 15 -1.</_>\n        <_>\n          12 1 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 13 -1.</_>\n        <_>\n          1 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 19 -1.</_>\n        <_>\n          12 1 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 7 -1.</_>\n        <_>\n          7 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 8 4 -1.</_>\n        <_>\n          8 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 8 8 -1.</_>\n        <_>\n          9 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 10 14 -1.</_>\n        <_>\n          11 4 5 7 2.</_>\n        <_>\n          6 11 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 10 14 -1.</_>\n        <_>\n          4 4 5 7 2.</_>\n        <_>\n          9 11 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 18 15 -1.</_>\n        <_>\n          2 8 18 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 9 -1.</_>\n        <_>\n          6 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 9 -1.</_>\n        <_>\n          8 10 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 14 4 -1.</_>\n        <_>\n          2 8 7 2 2.</_>\n        <_>\n          9 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 10 -1.</_>\n        <_>\n          6 10 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 9 5 -1.</_>\n        <_>\n          7 15 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 4 -1.</_>\n        <_>\n          9 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 7 -1.</_>\n        <_>\n          12 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 12 -1.</_>\n        <_>\n          6 7 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 8 -1.</_>\n        <_>\n          9 6 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 16 -1.</_>\n        <_>\n          5 3 3 8 2.</_>\n        <_>\n          8 11 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 6 6 -1.</_>\n        <_>\n          12 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 6 -1.</_>\n        <_>\n          5 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 9 -1.</_>\n        <_>\n          10 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 7 -1.</_>\n        <_>\n          7 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 8 -1.</_>\n        <_>\n          12 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 8 -1.</_>\n        <_>\n          6 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 6 -1.</_>\n        <_>\n          6 8 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          5 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 10 10 -1.</_>\n        <_>\n          13 10 5 5 2.</_>\n        <_>\n          8 15 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 15 4 -1.</_>\n        <_>\n          7 16 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 10 13 -1.</_>\n        <_>\n          9 6 5 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 10 13 -1.</_>\n        <_>\n          6 6 5 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 16 2 -1.</_>\n        <_>\n          4 15 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 16 2 -1.</_>\n        <_>\n          9 15 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 3 12 -1.</_>\n        <_>\n          15 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 3 12 -1.</_>\n        <_>\n          2 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 7 -1.</_>\n        <_>\n          8 13 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 15 3 -1.</_>\n        <_>\n          2 5 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 2 13 -1.</_>\n        <_>\n          16 6 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 5 -1.</_>\n        <_>\n          7 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 4 14 -1.</_>\n        <_>\n          16 6 2 7 2.</_>\n        <_>\n          14 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 12 3 -1.</_>\n        <_>\n          6 4 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 13 2 -1.</_>\n        <_>\n          4 6 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 13 10 -1.</_>\n        <_>\n          3 7 13 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 10 -1.</_>\n        <_>\n          7 7 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 7 6 -1.</_>\n        <_>\n          3 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 6 -1.</_>\n        <_>\n          4 2 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 6 -1.</_>\n        <_>\n          3 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 7 6 -1.</_>\n        <_>\n          13 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 16 -1.</_>\n        <_>\n          5 0 2 8 2.</_>\n        <_>\n          7 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 6 -1.</_>\n        <_>\n          10 14 9 3 2.</_>\n        <_>\n          1 17 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 14 3 -1.</_>\n        <_>\n          9 17 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 4 7 -1.</_>\n        <_>\n          16 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 8 15 -1.</_>\n        <_>\n          8 1 4 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 7 6 -1.</_>\n        <_>\n          13 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 13 -1.</_>\n        <_>\n          3 6 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 7 4 -1.</_>\n        <_>\n          12 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 7 4 -1.</_>\n        <_>\n          1 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 2 -1.</_>\n        <_>\n          7 14 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 6 -1.</_>\n        <_>\n          0 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 8 -1.</_>\n        <_>\n          8 11 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 10 10 -1.</_>\n        <_>\n          13 10 5 5 2.</_>\n        <_>\n          8 15 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 10 10 -1.</_>\n        <_>\n          2 10 5 5 2.</_>\n        <_>\n          7 15 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 10 6 -1.</_>\n        <_>\n          11 13 5 3 2.</_>\n        <_>\n          6 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 10 6 -1.</_>\n        <_>\n          4 13 5 3 2.</_>\n        <_>\n          9 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 12 -1.</_>\n        <_>\n          7 12 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 14 4 -1.</_>\n        <_>\n          1 14 7 2 2.</_>\n        <_>\n          8 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 7 4 -1.</_>\n        <_>\n          11 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 16 4 -1.</_>\n        <_>\n          1 17 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 8 -1.</_>\n        <_>\n          8 0 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 12 -1.</_>\n        <_>\n          0 12 18 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 13 2 -1.</_>\n        <_>\n          7 12 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 13 2 -1.</_>\n        <_>\n          0 12 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 19 3 -1.</_>\n        <_>\n          1 13 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 13 3 -1.</_>\n        <_>\n          0 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 9 -1.</_>\n        <_>\n          9 14 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 9 -1.</_>\n        <_>\n          5 14 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 13 3 -1.</_>\n        <_>\n          4 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 9 4 -1.</_>\n        <_>\n          5 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 8 -1.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 4 -1.</_>\n        <_>\n          3 8 7 2 2.</_>\n        <_>\n          10 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 6 -1.</_>\n        <_>\n          8 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 8 9 -1.</_>\n        <_>\n          3 8 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 12 -1.</_>\n        <_>\n          10 9 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 6 -1.</_>\n        <_>\n          0 6 9 3 2.</_>\n        <_>\n          9 9 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 16 4 -1.</_>\n        <_>\n          11 6 8 2 2.</_>\n        <_>\n          3 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 7 4 -1.</_>\n        <_>\n          4 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 7 6 -1.</_>\n        <_>\n          12 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 7 6 -1.</_>\n        <_>\n          1 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 6 -1.</_>\n        <_>\n          6 2 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 6 -1.</_>\n        <_>\n          0 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 13 -1.</_>\n        <_>\n          18 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 13 -1.</_>\n        <_>\n          1 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 13 3 -1.</_>\n        <_>\n          6 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 10 6 -1.</_>\n        <_>\n          0 13 5 3 2.</_>\n        <_>\n          5 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 8 8 -1.</_>\n        <_>\n          14 12 4 4 2.</_>\n        <_>\n          10 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 8 -1.</_>\n        <_>\n          6 10 4 4 2.</_>\n        <_>\n          10 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 7 -1.</_>\n        <_>\n          12 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 5 -1.</_>\n        <_>\n          8 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 7 6 -1.</_>\n        <_>\n          7 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 18 7 -1.</_>\n        <_>\n          6 13 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 9 -1.</_>\n        <_>\n          7 10 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 18 3 -1.</_>\n        <_>\n          1 13 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 13 2 -1.</_>\n        <_>\n          7 14 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 7 -1.</_>\n        <_>\n          9 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 12 10 -1.</_>\n        <_>\n          14 10 6 5 2.</_>\n        <_>\n          8 15 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 12 10 -1.</_>\n        <_>\n          0 10 6 5 2.</_>\n        <_>\n          6 15 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 9 -1.</_>\n        <_>\n          7 10 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 12 4 -1.</_>\n        <_>\n          7 16 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 9 4 -1.</_>\n        <_>\n          7 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 9 4 -1.</_>\n        <_>\n          4 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 19 -1.</_>\n        <_>\n          12 1 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 7 6 -1.</_>\n        <_>\n          6 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 15 -1.</_>\n        <_>\n          12 1 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 19 -1.</_>\n        <_>\n          7 1 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 10 -1.</_>\n        <_>\n          11 0 7 5 2.</_>\n        <_>\n          4 5 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 10 -1.</_>\n        <_>\n          2 0 7 5 2.</_>\n        <_>\n          9 5 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 13 -1.</_>\n        <_>\n          11 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 8 -1.</_>\n        <_>\n          8 7 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 10 -1.</_>\n        <_>\n          11 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 13 2 -1.</_>\n        <_>\n          3 19 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 8 -1.</_>\n        <_>\n          11 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 8 -1.</_>\n        <_>\n          5 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 6 -1.</_>\n        <_>\n          12 8 8 3 2.</_>\n        <_>\n          4 11 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 10 -1.</_>\n        <_>\n          7 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 13 -1.</_>\n        <_>\n          11 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 3 13 -1.</_>\n        <_>\n          8 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 7 -1.</_>\n        <_>\n          6 6 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 9 -1.</_>\n        <_>\n          10 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 12 -1.</_>\n        <_>\n          9 11 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 4 -1.</_>\n        <_>\n          10 2 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 10 6 -1.</_>\n        <_>\n          13 1 5 3 2.</_>\n        <_>\n          8 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 9 10 -1.</_>\n        <_>\n          0 7 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 10 14 -1.</_>\n        <_>\n          10 8 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 14 -1.</_>\n        <_>\n          0 8 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 15 -1.</_>\n        <_>\n          9 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 18 -1.</_>\n        <_>\n          0 2 2 9 2.</_>\n        <_>\n          2 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 7 -1.</_>\n        <_>\n          12 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 7 -1.</_>\n        <_>\n          5 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 3 17 -1.</_>\n        <_>\n          14 2 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 4 8 -1.</_>\n        <_>\n          2 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 10 10 -1.</_>\n        <_>\n          6 10 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 3 17 -1.</_>\n        <_>\n          5 2 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 5 -1.</_>\n        <_>\n          6 6 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 15 3 -1.</_>\n        <_>\n          5 11 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 10 6 -1.</_>\n        <_>\n          3 0 5 3 2.</_>\n        <_>\n          8 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 12 -1.</_>\n        <_>\n          9 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 2 -1.</_>\n        <_>\n          0 14 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 15 -1.</_>\n        <_>\n          5 2 4 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 16 -1.</_>\n        <_>\n          8 0 6 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 16 -1.</_>\n        <_>\n          6 0 6 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 13 -1.</_>\n        <_>\n          14 0 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 17 -1.</_>\n        <_>\n          5 3 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 6 10 -1.</_>\n        <_>\n          13 6 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 11 -1.</_>\n        <_>\n          4 5 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 12 -1.</_>\n        <_>\n          16 7 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 10 -1.</_>\n        <_>\n          5 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 12 -1.</_>\n        <_>\n          16 7 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 12 -1.</_>\n        <_>\n          0 7 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 6 -1.</_>\n        <_>\n          13 0 7 3 2.</_>\n        <_>\n          6 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 19 -1.</_>\n        <_>\n          3 1 3 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 13 -1.</_>\n        <_>\n          17 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 13 -1.</_>\n        <_>\n          3 0 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 5 -1.</_>\n        <_>\n          12 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 5 -1.</_>\n        <_>\n          5 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 7 -1.</_>\n        <_>\n          12 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 10 3 -1.</_>\n        <_>\n          6 1 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 8 -1.</_>\n        <_>\n          12 0 8 4 2.</_>\n        <_>\n          4 4 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 12 -1.</_>\n        <_>\n          0 0 4 6 2.</_>\n        <_>\n          4 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 7 6 -1.</_>\n        <_>\n          11 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 7 6 -1.</_>\n        <_>\n          2 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 15 9 -1.</_>\n        <_>\n          3 11 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 10 -1.</_>\n        <_>\n          6 6 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 5 6 -1.</_>\n        <_>\n          15 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 5 6 -1.</_>\n        <_>\n          0 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 4 -1.</_>\n        <_>\n          12 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 6 -1.</_>\n        <_>\n          2 3 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 4 -1.</_>\n        <_>\n          12 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 4 -1.</_>\n        <_>\n          4 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 7 6 -1.</_>\n        <_>\n          7 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 7 -1.</_>\n        <_>\n          6 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 3 10 -1.</_>\n        <_>\n          13 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 7 6 -1.</_>\n        <_>\n          2 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 13 3 -1.</_>\n        <_>\n          7 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 13 3 -1.</_>\n        <_>\n          0 15 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 12 -1.</_>\n        <_>\n          9 6 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 12 -1.</_>\n        <_>\n          5 6 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 12 -1.</_>\n        <_>\n          9 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 12 -1.</_>\n        <_>\n          7 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 8 18 -1.</_>\n        <_>\n          9 8 8 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 7 -1.</_>\n        <_>\n          10 6 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 9 9 -1.</_>\n        <_>\n          3 10 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 3 13 -1.</_>\n        <_>\n          15 4 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 15 -1.</_>\n        <_>\n          4 6 12 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 8 -1.</_>\n        <_>\n          8 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 20 -1.</_>\n        <_>\n          3 10 12 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 19 3 -1.</_>\n        <_>\n          1 18 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 18 2 -1.</_>\n        <_>\n          9 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 9 -1.</_>\n        <_>\n          10 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 9 -1.</_>\n        <_>\n          8 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 4 -1.</_>\n        <_>\n          5 13 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 8 4 -1.</_>\n        <_>\n          2 7 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 7 6 -1.</_>\n        <_>\n          9 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 13 3 -1.</_>\n        <_>\n          1 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 3 -1.</_>\n        <_>\n          3 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 8 -1.</_>\n        <_>\n          10 6 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 13 -1.</_>\n        <_>\n          11 3 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 10 -1.</_>\n        <_>\n          0 0 3 5 2.</_>\n        <_>\n          3 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 7 18 -1.</_>\n        <_>\n          8 6 7 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 13 -1.</_>\n        <_>\n          7 3 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 9 5 -1.</_>\n        <_>\n          10 4 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 18 -1.</_>\n        <_>\n          9 1 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 11 15 -1.</_>\n        <_>\n          9 5 11 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 8 -1.</_>\n        <_>\n          0 0 8 4 2.</_>\n        <_>\n          8 4 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 14 -1.</_>\n        <_>\n          10 3 6 7 2.</_>\n        <_>\n          4 10 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 12 -1.</_>\n        <_>\n          5 6 3 6 2.</_>\n        <_>\n          8 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 11 9 -1.</_>\n        <_>\n          6 6 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 8 -1.</_>\n        <_>\n          0 0 9 4 2.</_>\n        <_>\n          9 4 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 9 12 -1.</_>\n        <_>\n          11 11 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 14 8 -1.</_>\n        <_>\n          2 9 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 8 -1.</_>\n        <_>\n          16 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 7 6 -1.</_>\n        <_>\n          4 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 7 6 -1.</_>\n        <_>\n          7 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 8 -1.</_>\n        <_>\n          0 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 13 -1.</_>\n        <_>\n          17 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 10 6 -1.</_>\n        <_>\n          4 2 5 3 2.</_>\n        <_>\n          9 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 14 3 -1.</_>\n        <_>\n          4 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 7 6 -1.</_>\n        <_>\n          5 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 3 -1.</_>\n        <_>\n          6 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 13 3 -1.</_>\n        <_>\n          1 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 7 4 -1.</_>\n        <_>\n          10 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 13 3 -1.</_>\n        <_>\n          1 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 11 9 -1.</_>\n        <_>\n          6 6 11 3 3.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_frontalface_default.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    Stump-based 24x24 discrete(?) adaboost frontal face detector.\n    Created by Rainer Lienhart.\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's 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   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>24</height>\n  <width>24</width>\n  <stageParams>\n    <maxWeakCount>211</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>25</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-5.0425500869750977e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 -3.1511999666690826e-02</internalNodes>\n          <leafValues>\n            2.0875380039215088e+00 -2.2172100543975830e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 1.2396000325679779e-02</internalNodes>\n          <leafValues>\n            -1.8633940219879150e+00 1.3272049427032471e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 2.1927999332547188e-02</internalNodes>\n          <leafValues>\n            -1.5105249881744385e+00 1.0625729560852051e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3 5.7529998011887074e-03</internalNodes>\n          <leafValues>\n            -8.7463897466659546e-01 1.1760339736938477e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 1.5014000236988068e-02</internalNodes>\n          <leafValues>\n            -7.7945697307586670e-01 1.2608419656753540e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 9.9371001124382019e-02</internalNodes>\n          <leafValues>\n            5.5751299858093262e-01 -1.8743000030517578e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 2.7340000960975885e-03</internalNodes>\n          <leafValues>\n            -1.6911929845809937e+00 4.4009700417518616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 -1.8859000876545906e-02</internalNodes>\n          <leafValues>\n            -1.4769539833068848e+00 4.4350099563598633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 5.9739998541772366e-03</internalNodes>\n          <leafValues>\n            -8.5909199714660645e-01 8.5255599021911621e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>16</maxWeakCount>\n      <stageThreshold>-4.9842400550842285e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 9 -2.1110000088810921e-02</internalNodes>\n          <leafValues>\n            1.2435649633407593e+00 -1.5713009834289551e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 2.0355999469757080e-02</internalNodes>\n          <leafValues>\n            -1.6204780340194702e+00 1.1817760467529297e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 2.1308999508619308e-02</internalNodes>\n          <leafValues>\n            -1.9415930509567261e+00 7.0069098472595215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 9.1660000383853912e-02</internalNodes>\n          <leafValues>\n            -5.5670100450515747e-01 1.7284419536590576e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 3.6288000643253326e-02</internalNodes>\n          <leafValues>\n            2.6763799786567688e-01 -2.1831810474395752e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -1.9109999760985374e-02</internalNodes>\n          <leafValues>\n            -2.6730210781097412e+00 4.5670801401138306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 8.2539999857544899e-03</internalNodes>\n          <leafValues>\n            -1.0852910280227661e+00 5.3564202785491943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 1.8355000764131546e-02</internalNodes>\n          <leafValues>\n            -3.5200199484825134e-01 9.3339198827743530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 -7.0569999516010284e-03</internalNodes>\n          <leafValues>\n            9.2782098054885864e-01 -6.6349899768829346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 -9.8770000040531158e-03</internalNodes>\n          <leafValues>\n            1.1577470302581787e+00 -2.9774799942970276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 1.5814000740647316e-02</internalNodes>\n          <leafValues>\n            -4.1960600018501282e-01 1.3576040267944336e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 -2.0700000226497650e-02</internalNodes>\n          <leafValues>\n            1.4590020179748535e+00 -1.9739399850368500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 -1.3760800659656525e-01</internalNodes>\n          <leafValues>\n            1.1186759471893311e+00 -5.2915501594543457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 1.4318999834358692e-02</internalNodes>\n          <leafValues>\n            -3.5127198696136475e-01 1.1440860033035278e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 1.0253000073134899e-02</internalNodes>\n          <leafValues>\n            -6.0850602388381958e-01 7.7098500728607178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 9.1508001089096069e-02</internalNodes>\n          <leafValues>\n            3.8817799091339111e-01 -1.5122940540313721e+00</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>27</maxWeakCount>\n      <stageThreshold>-4.6551899909973145e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 25 6.9747000932693481e-02</internalNodes>\n          <leafValues>\n            -1.0130879878997803e+00 1.4687349796295166e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 3.1502999365329742e-02</internalNodes>\n          <leafValues>\n            -1.6463639736175537e+00 1.0000629425048828e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 1.4260999858379364e-02</internalNodes>\n          <leafValues>\n            4.6480301022529602e-01 -1.5959889888763428e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 1.4453000389039516e-02</internalNodes>\n          <leafValues>\n            -6.5511900186538696e-01 8.3021801710128784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 -3.0509999487549067e-03</internalNodes>\n          <leafValues>\n            -1.3982310295104980e+00 4.2550599575042725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 3.2722998410463333e-02</internalNodes>\n          <leafValues>\n            -5.0702601671218872e-01 1.0526109933853149e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 -7.2960001416504383e-03</internalNodes>\n          <leafValues>\n            3.6356899142265320e-01 -1.3464889526367188e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 5.0425000488758087e-02</internalNodes>\n          <leafValues>\n            -3.0461400747299194e-01 1.4504129886627197e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 4.6879000961780548e-02</internalNodes>\n          <leafValues>\n            -4.0286201238632202e-01 1.2145609855651855e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -6.9358997046947479e-02</internalNodes>\n          <leafValues>\n            1.0539360046386719e+00 -4.5719701051712036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 -4.9033999443054199e-02</internalNodes>\n          <leafValues>\n            -1.6253089904785156e+00 1.5378999710083008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 8.4827996790409088e-02</internalNodes>\n          <leafValues>\n            2.8402999043464661e-01 -1.5662059783935547e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 -1.7229999648407102e-03</internalNodes>\n          <leafValues>\n            -1.0147459506988525e+00 2.3294800519943237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 1.1562199890613556e-01</internalNodes>\n          <leafValues>\n            -1.6732899844646454e-01 1.2804069519042969e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 -5.1279999315738678e-02</internalNodes>\n          <leafValues>\n            1.5162390470504761e+00 -3.0271100997924805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 -4.2706999927759171e-02</internalNodes>\n          <leafValues>\n            1.7631920576095581e+00 -5.1832001656293869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 3.7178099155426025e-01</internalNodes>\n          <leafValues>\n            -3.1389200687408447e-01 1.5357979536056519e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 1.9412999972701073e-02</internalNodes>\n          <leafValues>\n            -1.0017599910497665e-01 9.3655401468276978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 1.7439000308513641e-02</internalNodes>\n          <leafValues>\n            -4.0379899740219116e-01 9.6293002367019653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 3.9638999849557877e-02</internalNodes>\n          <leafValues>\n            1.7039099335670471e-01 -2.9602990150451660e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 -9.1469995677471161e-03</internalNodes>\n          <leafValues>\n            8.8786798715591431e-01 -4.3818700313568115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 1.7219999572262168e-03</internalNodes>\n          <leafValues>\n            -3.7218600511550903e-01 4.0018901228904724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 3.0231000855565071e-02</internalNodes>\n          <leafValues>\n            6.5924003720283508e-02 -2.6469180583953857e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 -7.8795999288558960e-02</internalNodes>\n          <leafValues>\n            -1.7491459846496582e+00 2.8475299477577209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 2.1110000088810921e-03</internalNodes>\n          <leafValues>\n            -9.3908101320266724e-01 2.3205199837684631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 2.7091000229120255e-02</internalNodes>\n          <leafValues>\n            -5.2664000540971756e-02 1.0756820440292358e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 -4.4964998960494995e-02</internalNodes>\n          <leafValues>\n            -1.8294479846954346e+00 9.9561996757984161e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>32</maxWeakCount>\n      <stageThreshold>-4.4531588554382324e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 52 -6.5701000392436981e-02</internalNodes>\n          <leafValues>\n            1.1558510065078735e+00 -1.0716359615325928e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 1.5839999541640282e-02</internalNodes>\n          <leafValues>\n            -1.5634720325469971e+00 7.6877099275588989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 1.4570899307727814e-01</internalNodes>\n          <leafValues>\n            -5.7450097799301147e-01 1.3808720111846924e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 6.1389999464154243e-03</internalNodes>\n          <leafValues>\n            -1.4570560455322266e+00 5.1610302925109863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 6.7179999314248562e-03</internalNodes>\n          <leafValues>\n            -8.3533602952957153e-01 5.8522200584411621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 1.8518000841140747e-02</internalNodes>\n          <leafValues>\n            -3.1312099099159241e-01 1.1696679592132568e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 1.9958000630140305e-02</internalNodes>\n          <leafValues>\n            -4.3442600965499878e-01 9.5446902513504028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 -2.7755001187324524e-01</internalNodes>\n          <leafValues>\n            1.4906179904937744e+00 -1.3815900683403015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 9.1859996318817139e-03</internalNodes>\n          <leafValues>\n            -9.6361500024795532e-01 2.7665498852729797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 -3.7737999111413956e-02</internalNodes>\n          <leafValues>\n            -2.4464108943939209e+00 2.3619599640369415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 1.8463000655174255e-02</internalNodes>\n          <leafValues>\n            1.7539200186729431e-01 -1.3423130512237549e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 -1.1114999651908875e-02</internalNodes>\n          <leafValues>\n            4.8710799217224121e-01 -8.9851897954940796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 3.3927999436855316e-02</internalNodes>\n          <leafValues>\n            1.7874200642108917e-01 -1.6342279911041260e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 -3.5649001598358154e-02</internalNodes>\n          <leafValues>\n            -1.9607399702072144e+00 1.8102499842643738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 -1.1438000015914440e-02</internalNodes>\n          <leafValues>\n            9.9010699987411499e-01 -3.8103199005126953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 -6.5236002206802368e-02</internalNodes>\n          <leafValues>\n            -2.5794160366058350e+00 2.4753600358963013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -4.2272001504898071e-02</internalNodes>\n          <leafValues>\n            1.4411840438842773e+00 -2.9508298635482788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 1.9219999667257071e-03</internalNodes>\n          <leafValues>\n            -4.9608600139617920e-01 6.3173598051071167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 -1.2921799719333649e-01</internalNodes>\n          <leafValues>\n            -2.3314270973205566e+00 5.4496999830007553e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 2.2931000217795372e-02</internalNodes>\n          <leafValues>\n            -8.4447097778320312e-01 3.8738098740577698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 -3.4120000898838043e-02</internalNodes>\n          <leafValues>\n            -1.4431500434875488e+00 9.8422996699810028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 2.6223000138998032e-02</internalNodes>\n          <leafValues>\n            1.8223099410533905e-01 -1.2586519718170166e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 2.2236999124288559e-02</internalNodes>\n          <leafValues>\n            6.9807998836040497e-02 -2.3820950984954834e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 -5.8240001089870930e-03</internalNodes>\n          <leafValues>\n            3.9332500100135803e-01 -2.7542799711227417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 4.3653000146150589e-02</internalNodes>\n          <leafValues>\n            1.4832699298858643e-01 -1.1368780136108398e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 5.7266999036073685e-02</internalNodes>\n          <leafValues>\n            2.4628099799156189e-01 -1.2687400579452515e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 2.3409998975694180e-03</internalNodes>\n          <leafValues>\n            -7.5448900461196899e-01 2.7163800597190857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 1.2996000237762928e-02</internalNodes>\n          <leafValues>\n            -3.6394900083541870e-01 7.0959198474884033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 -2.6517000049352646e-02</internalNodes>\n          <leafValues>\n            -2.3221859931945801e+00 3.5744000226259232e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 -5.8400002308189869e-03</internalNodes>\n          <leafValues>\n            4.2194300889968872e-01 -4.8184998333454132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 -1.6568999737501144e-02</internalNodes>\n          <leafValues>\n            1.1099940538406372e+00 -3.4849700331687927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 -6.8157002329826355e-02</internalNodes>\n          <leafValues>\n            -3.3269989490509033e+00 2.1299000084400177e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>52</maxWeakCount>\n      <stageThreshold>-4.3864588737487793e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 84 3.9974000304937363e-02</internalNodes>\n          <leafValues>\n            -1.2173449993133545e+00 1.0826710462570190e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 1.8819500505924225e-01</internalNodes>\n          <leafValues>\n            -4.8289400339126587e-01 1.4045250415802002e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 7.8027002513408661e-02</internalNodes>\n          <leafValues>\n            -1.0782150030136108e+00 7.4040299654006958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 1.1899999663000926e-04</internalNodes>\n          <leafValues>\n            -1.2019979953765869e+00 3.7749201059341431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 8.5056997835636139e-02</internalNodes>\n          <leafValues>\n            -4.3939098715782166e-01 1.2647340297698975e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 8.9720003306865692e-03</internalNodes>\n          <leafValues>\n            -1.8440499901771545e-01 4.5726400613784790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 8.8120000436902046e-03</internalNodes>\n          <leafValues>\n            3.0396699905395508e-01 -9.5991098880767822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 -2.3507999256253242e-02</internalNodes>\n          <leafValues>\n            1.2487529516220093e+00 4.6227999031543732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 7.0039997808635235e-03</internalNodes>\n          <leafValues>\n            -5.9442102909088135e-01 5.3963297605514526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 3.3851999789476395e-02</internalNodes>\n          <leafValues>\n            2.8496098518371582e-01 -1.4895249605178833e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 -3.2530000898987055e-03</internalNodes>\n          <leafValues>\n            4.8120799660682678e-01 -5.2712398767471313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 2.9097000136971474e-02</internalNodes>\n          <leafValues>\n            2.6743900775909424e-01 -1.6007850170135498e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 -8.4790000692009926e-03</internalNodes>\n          <leafValues>\n            -1.3107639551162720e+00 1.5243099629878998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -1.0795000009238720e-02</internalNodes>\n          <leafValues>\n            4.5613598823547363e-01 -7.2050899267196655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -2.4620000272989273e-02</internalNodes>\n          <leafValues>\n            -1.7320619821548462e+00 6.8363003432750702e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 3.7380000576376915e-03</internalNodes>\n          <leafValues>\n            -1.9303299486637115e-01 6.8243497610092163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 -1.2264000251889229e-02</internalNodes>\n          <leafValues>\n            -1.6095290184020996e+00 7.5268000364303589e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 -4.8670000396668911e-03</internalNodes>\n          <leafValues>\n            7.4286502599716187e-01 -2.1510200202465057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 7.6725997030735016e-02</internalNodes>\n          <leafValues>\n            -2.6835098862648010e-01 1.3094140291213989e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 2.8578000143170357e-02</internalNodes>\n          <leafValues>\n            -5.8793000876903534e-02 1.2196329832077026e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 1.9694000482559204e-02</internalNodes>\n          <leafValues>\n            -3.5142898559570312e-01 8.4926998615264893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 -2.9093999415636063e-02</internalNodes>\n          <leafValues>\n            -1.0507299900054932e+00 2.9806300997734070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 -2.9144000262022018e-02</internalNodes>\n          <leafValues>\n            8.2547801733016968e-01 -3.2687199115753174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 1.9741000607609749e-02</internalNodes>\n          <leafValues>\n            2.0452600717544556e-01 -8.3760201930999756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 4.3299999088048935e-03</internalNodes>\n          <leafValues>\n            2.0577900111675262e-01 -6.6829800605773926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 -3.5500999540090561e-02</internalNodes>\n          <leafValues>\n            -1.2969900369644165e+00 1.3897499442100525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 -1.6172999516129494e-02</internalNodes>\n          <leafValues>\n            -1.3110569715499878e+00 7.5751997530460358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 -2.2151000797748566e-02</internalNodes>\n          <leafValues>\n            -1.0524389743804932e+00 1.9241100549697876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 -2.2707000374794006e-02</internalNodes>\n          <leafValues>\n            -1.3735309839248657e+00 6.6780999302864075e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 1.6607999801635742e-02</internalNodes>\n          <leafValues>\n            -3.7135999649763107e-02 7.7846401929855347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 -1.3309000059962273e-02</internalNodes>\n          <leafValues>\n            -9.9850702285766602e-01 1.2248100340366364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -3.3732000738382339e-02</internalNodes>\n          <leafValues>\n            1.4461359977722168e+00 1.3151999562978745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 1.6935000196099281e-02</internalNodes>\n          <leafValues>\n            -3.7121298909187317e-01 5.2842199802398682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 3.3259999472647905e-03</internalNodes>\n          <leafValues>\n            -5.7568502426147461e-01 3.9261901378631592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 8.3644002676010132e-02</internalNodes>\n          <leafValues>\n            1.6116000711917877e-02 -2.1173279285430908e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 2.5785198807716370e-01</internalNodes>\n          <leafValues>\n            -8.1609003245830536e-02 9.8782497644424438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 -3.6566998809576035e-02</internalNodes>\n          <leafValues>\n            -1.1512110233306885e+00 9.6459001302719116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 -1.6445999965071678e-02</internalNodes>\n          <leafValues>\n            3.7315499782562256e-01 -1.4585399627685547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 -3.7519999314099550e-03</internalNodes>\n          <leafValues>\n            2.6179298758506775e-01 -5.8156698942184448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 -6.3660000450909138e-03</internalNodes>\n          <leafValues>\n            7.5477397441864014e-01 -1.7055200040340424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 -3.8499999791383743e-03</internalNodes>\n          <leafValues>\n            2.2653999924659729e-01 -6.3876402378082275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 -4.5494001358747482e-02</internalNodes>\n          <leafValues>\n            -1.2640299797058105e+00 2.5260698795318604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 -2.3941000923514366e-02</internalNodes>\n          <leafValues>\n            8.7068402767181396e-01 -2.7104699611663818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -7.7558003365993500e-02</internalNodes>\n          <leafValues>\n            -1.3901610374450684e+00 2.3612299561500549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 2.3614000529050827e-02</internalNodes>\n          <leafValues>\n            6.6140003502368927e-02 -1.2645419836044312e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 -2.5750000495463610e-03</internalNodes>\n          <leafValues>\n            -5.3841698169708252e-01 3.0379098653793335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 1.2010800093412399e-01</internalNodes>\n          <leafValues>\n            -3.5343000292778015e-01 5.2866202592849731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 2.2899999748915434e-03</internalNodes>\n          <leafValues>\n            -5.8701997995376587e-01 2.4061000347137451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 6.9716997444629669e-02</internalNodes>\n          <leafValues>\n            -3.3348900079727173e-01 5.1916301250457764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 -4.6670001000165939e-02</internalNodes>\n          <leafValues>\n            6.9795399904251099e-01 -1.4895999804139137e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 -5.0129000097513199e-02</internalNodes>\n          <leafValues>\n            8.6146199703216553e-01 -2.5986000895500183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 3.0147999525070190e-02</internalNodes>\n          <leafValues>\n            1.9332799315452576e-01 -5.9131097793579102e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>53</maxWeakCount>\n      <stageThreshold>-4.1299300193786621e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 136 9.1085001826286316e-02</internalNodes>\n          <leafValues>\n            -8.9233100414276123e-01 1.0434230566024780e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 1.2818999588489532e-02</internalNodes>\n          <leafValues>\n            -1.2597670555114746e+00 5.5317097902297974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 1.5931999310851097e-02</internalNodes>\n          <leafValues>\n            -8.6254400014877319e-01 6.3731801509857178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 2.2780001163482666e-03</internalNodes>\n          <leafValues>\n            -7.4639201164245605e-01 5.3155601024627686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 3.1840998679399490e-02</internalNodes>\n          <leafValues>\n            -1.2650489807128906e+00 3.6153900623321533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 2.6960000395774841e-03</internalNodes>\n          <leafValues>\n            -9.8290401697158813e-01 3.6013001203536987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 -1.2055000290274620e-02</internalNodes>\n          <leafValues>\n            6.4068400859832764e-01 -5.0125002861022949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 2.1324999630451202e-02</internalNodes>\n          <leafValues>\n            -2.4034999310970306e-01 8.5448002815246582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 3.0486000701785088e-02</internalNodes>\n          <leafValues>\n            -3.4273600578308105e-01 1.1428849697113037e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 -4.5079998672008514e-02</internalNodes>\n          <leafValues>\n            1.0976949930191040e+00 -1.7974600195884705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -7.1700997650623322e-02</internalNodes>\n          <leafValues>\n            1.5735000371932983e+00 -3.1433498859405518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 5.9218000620603561e-02</internalNodes>\n          <leafValues>\n            -2.7582401037216187e-01 1.0448570251464844e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 6.7010000348091125e-03</internalNodes>\n          <leafValues>\n            -1.0974019765853882e+00 1.9801199436187744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 4.1046999394893646e-02</internalNodes>\n          <leafValues>\n            3.0547699332237244e-01 -1.3287999629974365e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 -8.5499999113380909e-04</internalNodes>\n          <leafValues>\n            2.5807100534439087e-01 -7.0052897930145264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 -3.0360000208020210e-02</internalNodes>\n          <leafValues>\n            -1.2306419610977173e+00 2.2609399259090424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 -1.2930000200867653e-02</internalNodes>\n          <leafValues>\n            4.0758600831031799e-01 -5.1234501600265503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 3.7367999553680420e-02</internalNodes>\n          <leafValues>\n            -9.4755001366138458e-02 6.1765098571777344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 2.4434000253677368e-02</internalNodes>\n          <leafValues>\n            -4.1100600361824036e-01 4.7630500793457031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 5.7007998228073120e-02</internalNodes>\n          <leafValues>\n            2.5249299407005310e-01 -6.8669801950454712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 -1.6313999891281128e-02</internalNodes>\n          <leafValues>\n            -9.3928402662277222e-01 1.1448100209236145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -1.7648899555206299e-01</internalNodes>\n          <leafValues>\n            1.2451089620590210e+00 -5.6519001722335815e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 1.7614600062370300e-01</internalNodes>\n          <leafValues>\n            -3.2528200745582581e-01 8.2791501283645630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 -7.3910001665353775e-03</internalNodes>\n          <leafValues>\n            3.4783700108528137e-01 -1.7929099500179291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 6.0890998691320419e-02</internalNodes>\n          <leafValues>\n            5.5098000913858414e-02 -1.5480779409408569e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 -2.9123000800609589e-02</internalNodes>\n          <leafValues>\n            -1.0255639553070068e+00 2.4106900393962860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -4.5648999512195587e-02</internalNodes>\n          <leafValues>\n            1.0301599502563477e+00 -3.1672099232673645e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 3.7333000451326370e-02</internalNodes>\n          <leafValues>\n            2.1620599925518036e-01 -8.2589900493621826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 -2.4411000311374664e-02</internalNodes>\n          <leafValues>\n            -1.5957959890365601e+00 5.1139000803232193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 -5.9806998819112778e-02</internalNodes>\n          <leafValues>\n            -1.0312290191650391e+00 1.3092300295829773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 -3.0106000602245331e-02</internalNodes>\n          <leafValues>\n            -1.4781630039215088e+00 3.7211999297142029e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 7.4209999293088913e-03</internalNodes>\n          <leafValues>\n            -2.4024100601673126e-01 4.9333998560905457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 -2.1909999195486307e-03</internalNodes>\n          <leafValues>\n            2.8941500186920166e-01 -5.7259601354598999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 2.0860999822616577e-02</internalNodes>\n          <leafValues>\n            -2.3148399591445923e-01 6.3765901327133179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 -6.6990000195801258e-03</internalNodes>\n          <leafValues>\n            -1.2107750177383423e+00 6.4018003642559052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 1.8758000805974007e-02</internalNodes>\n          <leafValues>\n            2.4461300671100616e-01 -9.9786698818206787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 -4.4323001056909561e-02</internalNodes>\n          <leafValues>\n            -1.3699189424514771e+00 3.6051999777555466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 2.2859999909996986e-02</internalNodes>\n          <leafValues>\n            2.1288399398326874e-01 -1.0397620201110840e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 -9.8600005730986595e-04</internalNodes>\n          <leafValues>\n            3.2443600893020630e-01 -5.4291802644729614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 1.7239000648260117e-02</internalNodes>\n          <leafValues>\n            -2.8323900699615479e-01 4.4468200206756592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 -3.4531001001596451e-02</internalNodes>\n          <leafValues>\n            -2.3107020854949951e+00 -3.1399999279528856e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 6.7006997764110565e-02</internalNodes>\n          <leafValues>\n            2.8715699911117554e-01 -6.4481002092361450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 2.3776899278163910e-01</internalNodes>\n          <leafValues>\n            -2.7174800634384155e-01 8.0219101905822754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 -1.2903000228106976e-02</internalNodes>\n          <leafValues>\n            -1.5317620038986206e+00 2.1423600614070892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 1.0514999739825726e-02</internalNodes>\n          <leafValues>\n            7.7037997543811798e-02 -1.0581140518188477e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 1.6969000920653343e-02</internalNodes>\n          <leafValues>\n            1.4306700229644775e-01 -8.5828399658203125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 -7.2460002265870571e-03</internalNodes>\n          <leafValues>\n            -1.1020129919052124e+00 6.4906999468803406e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 1.0556999593973160e-02</internalNodes>\n          <leafValues>\n            1.3964000158011913e-02 6.3601499795913696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 6.1380001716315746e-03</internalNodes>\n          <leafValues>\n            -3.4545901417732239e-01 5.6296801567077637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 1.3158000074326992e-02</internalNodes>\n          <leafValues>\n            1.9927300512790680e-01 -1.5040320158004761e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 3.1310000922530890e-03</internalNodes>\n          <leafValues>\n            -4.0903699398040771e-01 3.7796398997306824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 -1.0920699685811996e-01</internalNodes>\n          <leafValues>\n            -2.2227079868316650e+00 1.2178199738264084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 8.1820003688335419e-03</internalNodes>\n          <leafValues>\n            -2.8652000427246094e-01 6.7890799045562744e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>62</maxWeakCount>\n      <stageThreshold>-4.0218091011047363e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 189 3.1346999108791351e-02</internalNodes>\n          <leafValues>\n            -8.8884598016738892e-01 9.4936800003051758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 3.1918000429868698e-02</internalNodes>\n          <leafValues>\n            -1.1146880388259888e+00 4.8888999223709106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 6.5939999185502529e-03</internalNodes>\n          <leafValues>\n            -1.0097689628601074e+00 4.9723801016807556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 2.6148000732064247e-02</internalNodes>\n          <leafValues>\n            2.5991299748420715e-01 -1.2537480592727661e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 1.2845000252127647e-02</internalNodes>\n          <leafValues>\n            -5.7138597965240479e-01 5.9659498929977417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 2.6344999670982361e-02</internalNodes>\n          <leafValues>\n            -5.5203199386596680e-01 3.0217400193214417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 -1.5083000063896179e-02</internalNodes>\n          <leafValues>\n            -1.2871240377426147e+00 2.2354200482368469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 -3.8887001574039459e-02</internalNodes>\n          <leafValues>\n            1.7425049543380737e+00 -9.9747002124786377e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 -5.7029998861253262e-03</internalNodes>\n          <leafValues>\n            -1.0523240566253662e+00 1.8362599611282349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 -1.4860000228509307e-03</internalNodes>\n          <leafValues>\n            5.6784200668334961e-01 -4.6742001175880432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 -2.8486000373959541e-02</internalNodes>\n          <leafValues>\n            1.3082909584045410e+00 -2.6460900902748108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 6.6224999725818634e-02</internalNodes>\n          <leafValues>\n            -4.6210700273513794e-01 4.1749599575996399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 8.8569996878504753e-03</internalNodes>\n          <leafValues>\n            -4.1474899649620056e-01 5.9204798936843872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 1.1355999857187271e-02</internalNodes>\n          <leafValues>\n            3.6103099584579468e-01 -4.5781201124191284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 -2.7679998893290758e-03</internalNodes>\n          <leafValues>\n            -8.9238899946212769e-01 1.4199000597000122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 1.1246999725699425e-02</internalNodes>\n          <leafValues>\n            2.9353401064872742e-01 -9.7330600023269653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 7.1970000863075256e-03</internalNodes>\n          <leafValues>\n            -7.9334902763366699e-01 1.8313400447368622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 3.1768999993801117e-02</internalNodes>\n          <leafValues>\n            1.5523099899291992e-01 -1.3245639801025391e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 2.5173999369144440e-02</internalNodes>\n          <leafValues>\n            3.4214999526739120e-02 -2.0948131084442139e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 7.5360001064836979e-03</internalNodes>\n          <leafValues>\n            -3.9450600743293762e-01 5.1333999633789062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 3.2873000949621201e-02</internalNodes>\n          <leafValues>\n            8.8372997939586639e-02 -1.2814120054244995e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -2.7379998937249184e-03</internalNodes>\n          <leafValues>\n            5.5286502838134766e-01 -4.6384999155998230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 -3.8075000047683716e-02</internalNodes>\n          <leafValues>\n            -1.8497270345687866e+00 4.5944001525640488e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 -3.8984000682830811e-02</internalNodes>\n          <leafValues>\n            -4.8223701119422913e-01 3.4760600328445435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 2.8029999230057001e-03</internalNodes>\n          <leafValues>\n            -4.5154699683189392e-01 4.2806300520896912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 -5.4145999252796173e-02</internalNodes>\n          <leafValues>\n            -8.4520798921585083e-01 1.6674900054931641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 -8.3280000835657120e-03</internalNodes>\n          <leafValues>\n            3.5348299145698547e-01 -4.7163200378417969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 3.3778000622987747e-02</internalNodes>\n          <leafValues>\n            1.8463100492954254e-01 -1.6686669588088989e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 -1.1238099634647369e-01</internalNodes>\n          <leafValues>\n            -1.2521569728851318e+00 3.5992000252008438e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 -1.0408000089228153e-02</internalNodes>\n          <leafValues>\n            -8.1620401144027710e-01 2.3428599536418915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 -4.9439999274909496e-03</internalNodes>\n          <leafValues>\n            -9.2584699392318726e-01 1.0034800320863724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 -9.3029998242855072e-03</internalNodes>\n          <leafValues>\n            5.6499302387237549e-01 -1.8881900608539581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 -1.1749999597668648e-02</internalNodes>\n          <leafValues>\n            8.0302399396896362e-01 -3.8277000188827515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 -2.3217000067234039e-02</internalNodes>\n          <leafValues>\n            -8.4926998615264893e-01 1.9671200215816498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 1.6866000369191170e-02</internalNodes>\n          <leafValues>\n            -4.0591898560523987e-01 5.0695300102233887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 -2.4031000211834908e-02</internalNodes>\n          <leafValues>\n            -1.5297520160675049e+00 2.3344999551773071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 -3.6945998668670654e-02</internalNodes>\n          <leafValues>\n            6.3007700443267822e-01 -3.1780400872230530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 -6.1563998460769653e-02</internalNodes>\n          <leafValues>\n            5.8627897500991821e-01 -1.2107999995350838e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 2.1661000326275826e-02</internalNodes>\n          <leafValues>\n            -2.5623700022697449e-01 1.0409849882125854e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 -3.6710000131279230e-03</internalNodes>\n          <leafValues>\n            2.9171100258827209e-01 -8.3287298679351807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 4.4849000871181488e-02</internalNodes>\n          <leafValues>\n            -3.9633199572563171e-01 4.5662000775337219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 5.7195000350475311e-02</internalNodes>\n          <leafValues>\n            2.1023899316787720e-01 -1.5004800558090210e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 -1.1342000216245651e-02</internalNodes>\n          <leafValues>\n            4.4071298837661743e-01 -3.8653799891471863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 -1.2004000134766102e-02</internalNodes>\n          <leafValues>\n            9.3954598903656006e-01 -1.0589499771595001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 2.2515999153256416e-02</internalNodes>\n          <leafValues>\n            9.4480002298951149e-03 -1.6799509525299072e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 -1.9809000194072723e-02</internalNodes>\n          <leafValues>\n            -1.0133639574050903e+00 2.4146600067615509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 1.5891000628471375e-02</internalNodes>\n          <leafValues>\n            -3.7507599592208862e-01 4.6614098548889160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -9.1420002281665802e-03</internalNodes>\n          <leafValues>\n            -8.0484098196029663e-01 1.7816999554634094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 -4.4740000739693642e-03</internalNodes>\n          <leafValues>\n            -1.0562069416046143e+00 7.3305003345012665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 1.2742500007152557e-01</internalNodes>\n          <leafValues>\n            2.0165599882602692e-01 -1.5467929840087891e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 4.7703001648187637e-02</internalNodes>\n          <leafValues>\n            -3.7937799096107483e-01 3.7885999679565430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 5.3608000278472900e-02</internalNodes>\n          <leafValues>\n            2.1220499277114868e-01 -1.2399710416793823e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -3.9680998772382736e-02</internalNodes>\n          <leafValues>\n            -1.0257550477981567e+00 5.1282998174428940e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 -6.7327000200748444e-02</internalNodes>\n          <leafValues>\n            -1.0304750204086304e+00 2.3005299270153046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 1.3337600231170654e-01</internalNodes>\n          <leafValues>\n            -2.0869000256061554e-01 1.2272510528564453e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 -2.0919300615787506e-01</internalNodes>\n          <leafValues>\n            8.7929898500442505e-01 -4.4254999607801437e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 -6.5589003264904022e-02</internalNodes>\n          <leafValues>\n            1.0443429946899414e+00 -2.1682099997997284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 6.1882998794317245e-02</internalNodes>\n          <leafValues>\n            1.3798199594020844e-01 -1.9009059667587280e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 -2.5578999891877174e-02</internalNodes>\n          <leafValues>\n            -1.6607600450515747e+00 5.8439997956156731e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 -3.4827001392841339e-02</internalNodes>\n          <leafValues>\n            7.9940402507781982e-01 -8.2406997680664062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 -1.8209999427199364e-02</internalNodes>\n          <leafValues>\n            -9.6073997020721436e-01 6.6320002079010010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 1.5070999972522259e-02</internalNodes>\n          <leafValues>\n            1.9899399578571320e-01 -7.6433002948760986e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>72</maxWeakCount>\n      <stageThreshold>-3.8832089900970459e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 251 4.6324998140335083e-02</internalNodes>\n          <leafValues>\n            -1.0362670421600342e+00 8.2201498746871948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 1.5406999737024307e-02</internalNodes>\n          <leafValues>\n            -1.2327589988708496e+00 2.9647698998451233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 1.2808999978005886e-02</internalNodes>\n          <leafValues>\n            -7.5852298736572266e-01 5.7985502481460571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 4.9150999635457993e-02</internalNodes>\n          <leafValues>\n            -3.8983899354934692e-01 8.9680302143096924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 1.2621000409126282e-02</internalNodes>\n          <leafValues>\n            -7.1799302101135254e-01 5.0440901517868042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 -1.8768999725580215e-02</internalNodes>\n          <leafValues>\n            5.5147600173950195e-01 -7.0555400848388672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 4.1965000331401825e-02</internalNodes>\n          <leafValues>\n            -4.4782099127769470e-01 7.0985502004623413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 -5.1401998847723007e-02</internalNodes>\n          <leafValues>\n            -1.0932120084762573e+00 2.6701900362968445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 -7.0960998535156250e-02</internalNodes>\n          <leafValues>\n            8.3618402481079102e-01 -3.8318100571632385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 1.6745999455451965e-02</internalNodes>\n          <leafValues>\n            -2.5733101367950439e-01 2.5966501235961914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 -6.2400000169873238e-03</internalNodes>\n          <leafValues>\n            3.1631499528884888e-01 -5.8796900510787964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 -3.9397999644279480e-02</internalNodes>\n          <leafValues>\n            -1.0491210222244263e+00 1.6822400689125061e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 0.</internalNodes>\n          <leafValues>\n            1.6144199669361115e-01 -8.7876898050308228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 -2.2307999432086945e-02</internalNodes>\n          <leafValues>\n            -6.9053500890731812e-01 2.3607000708580017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 1.8919999711215496e-03</internalNodes>\n          <leafValues>\n            2.4989199638366699e-01 -5.6583297252655029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 1.0730000212788582e-03</internalNodes>\n          <leafValues>\n            -5.0415802001953125e-01 3.8374501466751099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 3.9230998605489731e-02</internalNodes>\n          <leafValues>\n            4.2619001120328903e-02 -1.3875889778137207e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 6.2238000333309174e-02</internalNodes>\n          <leafValues>\n            1.4119400084018707e-01 -1.0688860416412354e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 2.1399999968707561e-03</internalNodes>\n          <leafValues>\n            -8.9622402191162109e-01 1.9796399772167206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 9.1800000518560410e-04</internalNodes>\n          <leafValues>\n            -4.5337298512458801e-01 4.3532699346542358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 -6.9169998168945312e-03</internalNodes>\n          <leafValues>\n            3.3822798728942871e-01 -4.4793000817298889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 -2.3866999894380569e-02</internalNodes>\n          <leafValues>\n            -7.8908598423004150e-01 2.2511799633502960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 -1.0262800008058548e-01</internalNodes>\n          <leafValues>\n            -2.2831439971923828e+00 -5.3960001096129417e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 -9.5239998772740364e-03</internalNodes>\n          <leafValues>\n            3.9346700906753540e-01 -5.2242201566696167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 3.9877001196146011e-02</internalNodes>\n          <leafValues>\n            3.2799001783132553e-02 -1.5079489946365356e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 -1.3144999742507935e-02</internalNodes>\n          <leafValues>\n            -1.0839990377426147e+00 1.8482400476932526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 -5.0590999424457550e-02</internalNodes>\n          <leafValues>\n            -1.8822289705276489e+00 -2.2199999075382948e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 2.4917000904679298e-02</internalNodes>\n          <leafValues>\n            1.4593400061130524e-01 -2.2196519374847412e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 -7.6370001770555973e-03</internalNodes>\n          <leafValues>\n            -1.0164569616317749e+00 5.8797001838684082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 4.2911998927593231e-02</internalNodes>\n          <leafValues>\n            1.5443000197410583e-01 -1.1843889951705933e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 2.3000000510364771e-04</internalNodes>\n          <leafValues>\n            -7.7305799722671509e-01 1.2189900130033493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 9.0929996222257614e-03</internalNodes>\n          <leafValues>\n            -1.1450099945068359e-01 7.1091300249099731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 1.1145000346004963e-02</internalNodes>\n          <leafValues>\n            7.0000998675823212e-02 -1.0534820556640625e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 -5.2453000098466873e-02</internalNodes>\n          <leafValues>\n            -1.7594360113143921e+00 1.9523799419403076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 -2.3020699620246887e-01</internalNodes>\n          <leafValues>\n            9.5840299129486084e-01 -2.5045698881149292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 -1.6365999355912209e-02</internalNodes>\n          <leafValues>\n            4.6731901168823242e-01 -2.1108399331569672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -1.7208000645041466e-02</internalNodes>\n          <leafValues>\n            7.0835697650909424e-01 -2.8018298745155334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 -3.6648001521825790e-02</internalNodes>\n          <leafValues>\n            -1.1013339757919312e+00 2.4341100454330444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -1.0304999537765980e-02</internalNodes>\n          <leafValues>\n            -1.0933129787445068e+00 5.6258998811244965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 -1.3713000342249870e-02</internalNodes>\n          <leafValues>\n            -2.6438099145889282e-01 1.9821000099182129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 2.9308000579476357e-02</internalNodes>\n          <leafValues>\n            -2.2142399847507477e-01 1.0525950193405151e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 2.4077000096440315e-02</internalNodes>\n          <leafValues>\n            1.8485699594020844e-01 -1.7203969955444336e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 6.1280000954866409e-03</internalNodes>\n          <leafValues>\n            -9.2721498012542725e-01 5.8752998709678650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 -2.2377999499440193e-02</internalNodes>\n          <leafValues>\n            1.9646559953689575e+00 2.7785999700427055e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 -7.0440000854432583e-03</internalNodes>\n          <leafValues>\n            2.1427600085735321e-01 -4.8407599329948425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 -4.0603000670671463e-02</internalNodes>\n          <leafValues>\n            -1.1754349470138550e+00 1.6061200201511383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 -2.4466000497341156e-02</internalNodes>\n          <leafValues>\n            -1.1239900588989258e+00 4.1110001504421234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 2.5309999473392963e-03</internalNodes>\n          <leafValues>\n            -1.7169700562953949e-01 3.2178801298141479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 -1.9588999450206757e-02</internalNodes>\n          <leafValues>\n            8.2720202207565308e-01 -2.6376700401306152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -2.9635999351739883e-02</internalNodes>\n          <leafValues>\n            -1.1524770259857178e+00 1.4999300241470337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 -1.5030000358819962e-02</internalNodes>\n          <leafValues>\n            -1.0491830110549927e+00 4.0160998702049255e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 -6.0715001076459885e-02</internalNodes>\n          <leafValues>\n            -1.0903840065002441e+00 1.5330800414085388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 -1.2790000066161156e-02</internalNodes>\n          <leafValues>\n            4.2248600721359253e-01 -4.2399200797080994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 -2.0247999578714371e-02</internalNodes>\n          <leafValues>\n            -9.1866999864578247e-01 1.8485699594020844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 -3.0683999881148338e-02</internalNodes>\n          <leafValues>\n            -1.5958670377731323e+00 2.5760000571608543e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 -2.0718000829219818e-02</internalNodes>\n          <leafValues>\n            -6.6299998760223389e-01 3.1037199497222900e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 -1.7290000105276704e-03</internalNodes>\n          <leafValues>\n            1.9183400273323059e-01 -6.5084999799728394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 -3.1394001096487045e-02</internalNodes>\n          <leafValues>\n            -6.3643002510070801e-01 1.5408399701118469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 1.9003000110387802e-02</internalNodes>\n          <leafValues>\n            -1.8919399380683899e-01 1.5294510126113892e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 6.1769997701048851e-03</internalNodes>\n          <leafValues>\n            -1.0597900301218033e-01 6.4859598875045776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 -1.0165999643504620e-02</internalNodes>\n          <leafValues>\n            -1.0802700519561768e+00 3.7176001816987991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 -1.4169999631121755e-03</internalNodes>\n          <leafValues>\n            3.4157499670982361e-01 -9.7737997770309448e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 -4.0799998678267002e-03</internalNodes>\n          <leafValues>\n            4.7624599933624268e-01 -3.4366300702095032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -4.4096998870372772e-02</internalNodes>\n          <leafValues>\n            9.7634297609329224e-01 -1.9173000007867813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 -6.0669999569654465e-02</internalNodes>\n          <leafValues>\n            -2.1752851009368896e+00 -2.8925999999046326e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 -3.2931998372077942e-02</internalNodes>\n          <leafValues>\n            -6.4383101463317871e-01 1.6494099795818329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 -1.4722800254821777e-01</internalNodes>\n          <leafValues>\n            -1.4745830297470093e+00 2.5839998852461576e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 -1.1930000036954880e-02</internalNodes>\n          <leafValues>\n            4.2441400885581970e-01 -1.7712600529193878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 1.4517900347709656e-01</internalNodes>\n          <leafValues>\n            2.5444999337196350e-02 -1.2779400348663330e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 5.1447998732328415e-02</internalNodes>\n          <leafValues>\n            1.5678399801254272e-01 -1.5188430547714233e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 3.1479999888688326e-03</internalNodes>\n          <leafValues>\n            -4.0424400568008423e-01 3.2429701089859009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 -4.3600000441074371e-02</internalNodes>\n          <leafValues>\n            -1.9932260513305664e+00 1.5018600225448608e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>83</maxWeakCount>\n      <stageThreshold>-3.8424909114837646e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 323 1.2899599969387054e-01</internalNodes>\n          <leafValues>\n            -6.2161999940872192e-01 1.1116520166397095e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 -9.1261997818946838e-02</internalNodes>\n          <leafValues>\n            1.0143059492111206e+00 -6.1335200071334839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 1.4271999709308147e-02</internalNodes>\n          <leafValues>\n            -1.0261659622192383e+00 3.9779999852180481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 3.2889999449253082e-02</internalNodes>\n          <leafValues>\n            -1.1386079788208008e+00 2.8690800070762634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 1.2590000405907631e-02</internalNodes>\n          <leafValues>\n            -5.6645601987838745e-01 4.5172399282455444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 1.4661000110208988e-02</internalNodes>\n          <leafValues>\n            3.0505999922752380e-01 -6.8129599094390869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 -3.3555999398231506e-02</internalNodes>\n          <leafValues>\n            -1.7208939790725708e+00 6.1439000070095062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 1.4252699911594391e-01</internalNodes>\n          <leafValues>\n            2.3192200064659119e-01 -1.7297149896621704e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 -6.2079997733235359e-03</internalNodes>\n          <leafValues>\n            -1.2163300514221191e+00 1.2160199880599976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 1.8178999423980713e-02</internalNodes>\n          <leafValues>\n            3.2553699612617493e-01 -8.1003999710083008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 2.5036999955773354e-02</internalNodes>\n          <leafValues>\n            -3.1698799133300781e-01 6.7361402511596680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 4.6560999006032944e-02</internalNodes>\n          <leafValues>\n            -1.1089800298213959e-01 8.4082502126693726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 -8.9999996125698090e-03</internalNodes>\n          <leafValues>\n            3.9574500918388367e-01 -4.7624599933624268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 4.0805999189615250e-02</internalNodes>\n          <leafValues>\n            -1.8000000272877514e-04 9.4570702314376831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 -3.4221999347209930e-02</internalNodes>\n          <leafValues>\n            7.5206297636032104e-01 -3.1531500816345215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 -3.9716001600027084e-02</internalNodes>\n          <leafValues>\n            -8.3139598369598389e-01 1.7744399607181549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 2.5170000735670328e-03</internalNodes>\n          <leafValues>\n            -5.9377998113632202e-01 2.4657000601291656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 2.7428999543190002e-02</internalNodes>\n          <leafValues>\n            1.5998399257659912e-01 -4.2781999707221985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 3.4986000508069992e-02</internalNodes>\n          <leafValues>\n            3.5055998712778091e-02 -1.5988600254058838e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 4.4970000162720680e-03</internalNodes>\n          <leafValues>\n            -5.2034300565719604e-01 3.7828299403190613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 2.7699999045580626e-03</internalNodes>\n          <leafValues>\n            -5.3182601928710938e-01 2.4951000511646271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 3.5174001008272171e-02</internalNodes>\n          <leafValues>\n            1.9983400404453278e-01 -1.4446129798889160e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 2.5970999151468277e-02</internalNodes>\n          <leafValues>\n            4.4426999986171722e-02 -1.3622980117797852e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 -1.5783999115228653e-02</internalNodes>\n          <leafValues>\n            -9.1020399332046509e-01 2.7190300822257996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 -7.5880000367760658e-03</internalNodes>\n          <leafValues>\n            9.2064999043941498e-02 -8.1628900766372681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 2.0754000172019005e-02</internalNodes>\n          <leafValues>\n            2.1185700595378876e-01 -7.4729001522064209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 5.9829000383615494e-02</internalNodes>\n          <leafValues>\n            -2.7301099896430969e-01 8.0923300981521606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 3.9039000868797302e-02</internalNodes>\n          <leafValues>\n            -1.0432299971580505e-01 8.6226201057434082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 2.1665999665856361e-02</internalNodes>\n          <leafValues>\n            6.2709003686904907e-02 -9.8894298076629639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 -2.7496999129652977e-02</internalNodes>\n          <leafValues>\n            -9.2690998315811157e-01 1.5586300194263458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 1.0462000034749508e-02</internalNodes>\n          <leafValues>\n            1.3418099284172058e-01 -7.0386397838592529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 2.4870999157428741e-02</internalNodes>\n          <leafValues>\n            1.9706700742244720e-01 -4.0263301134109497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 -1.6036000102758408e-02</internalNodes>\n          <leafValues>\n            -1.1409829854965210e+00 7.3997996747493744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 4.8627000302076340e-02</internalNodes>\n          <leafValues>\n            1.6990399360656738e-01 -7.2152197360992432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 1.2619999470189214e-03</internalNodes>\n          <leafValues>\n            -4.7389799356460571e-01 2.6254999637603760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 -8.8035002350807190e-02</internalNodes>\n          <leafValues>\n            -2.1606519222259521e+00 1.4554800093173981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 1.8356999382376671e-02</internalNodes>\n          <leafValues>\n            4.4750999659299850e-02 -1.0766370296478271e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 3.5275001078844070e-02</internalNodes>\n          <leafValues>\n            -3.2919000834226608e-02 1.2153890132904053e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 -2.0392900705337524e-01</internalNodes>\n          <leafValues>\n            -1.3187999725341797e+00 1.5503999777138233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 -1.6619000583887100e-02</internalNodes>\n          <leafValues>\n            3.6850199103355408e-01 -1.5283699333667755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 3.7739001214504242e-02</internalNodes>\n          <leafValues>\n            -2.5727799534797668e-01 7.0655298233032227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 2.2720000706613064e-03</internalNodes>\n          <leafValues>\n            -7.7602997422218323e-02 3.3367800712585449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 -1.4802999794483185e-02</internalNodes>\n          <leafValues>\n            -7.8524798154830933e-01 7.6934002339839935e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 -4.8319000750780106e-02</internalNodes>\n          <leafValues>\n            1.7022320032119751e+00 4.9722000956535339e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 -2.9539000242948532e-02</internalNodes>\n          <leafValues>\n            7.7670699357986450e-01 -2.4534299969673157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -4.6169001609086990e-02</internalNodes>\n          <leafValues>\n            -1.4922779798507690e+00 1.2340000271797180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 -2.8064999729394913e-02</internalNodes>\n          <leafValues>\n            -2.1345369815826416e+00 -2.5797000154852867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 -5.7339998893439770e-03</internalNodes>\n          <leafValues>\n            5.6982600688934326e-01 -1.2056600302457809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 -1.0111000388860703e-02</internalNodes>\n          <leafValues>\n            6.7911398410797119e-01 -2.6638001203536987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 1.1359999887645245e-02</internalNodes>\n          <leafValues>\n            2.4789799749851227e-01 -6.4493000507354736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 5.1809001713991165e-02</internalNodes>\n          <leafValues>\n            1.4716000296175480e-02 -1.2395579814910889e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 3.3291999250650406e-02</internalNodes>\n          <leafValues>\n            -8.2559995353221893e-03 1.0168470144271851e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 -1.4494000002741814e-02</internalNodes>\n          <leafValues>\n            4.5066800713539124e-01 -3.6250999569892883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 -3.4221999347209930e-02</internalNodes>\n          <leafValues>\n            -9.5292502641677856e-01 2.0684599876403809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -8.0654002726078033e-02</internalNodes>\n          <leafValues>\n            -2.0139501094818115e+00 -2.3084999993443489e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 -8.9399999706074595e-04</internalNodes>\n          <leafValues>\n            3.9572000503540039e-01 -2.9351300001144409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 9.7162000834941864e-02</internalNodes>\n          <leafValues>\n            -2.4980300664901733e-01 1.0859220027923584e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 3.6614000797271729e-02</internalNodes>\n          <leafValues>\n            -5.7844001799821854e-02 1.2162159681320190e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 5.1693998277187347e-02</internalNodes>\n          <leafValues>\n            4.3062999844551086e-02 -1.0636160373687744e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 -2.4557000026106834e-02</internalNodes>\n          <leafValues>\n            -4.8946800827980042e-01 1.7182900011539459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 3.2736799120903015e-01</internalNodes>\n          <leafValues>\n            -2.9688599705696106e-01 5.1798301935195923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 7.6959999278187752e-03</internalNodes>\n          <leafValues>\n            -5.9805899858474731e-01 2.4803200364112854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 1.6172200441360474e-01</internalNodes>\n          <leafValues>\n            -2.9613999649882317e-02 -2.3162529468536377e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 -4.7889999113976955e-03</internalNodes>\n          <leafValues>\n            3.7457901239395142e-01 -3.2779198884963989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 -1.8402999266982079e-02</internalNodes>\n          <leafValues>\n            -9.9692702293395996e-01 7.2948001325130463e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 7.7665001153945923e-02</internalNodes>\n          <leafValues>\n            1.4175699651241302e-01 -1.7238730192184448e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 1.8921000882983208e-02</internalNodes>\n          <leafValues>\n            -2.1273100376129150e-01 1.0165189504623413e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 -7.9397998750209808e-02</internalNodes>\n          <leafValues>\n            -1.3164349794387817e+00 1.4981999993324280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 -6.8037003278732300e-02</internalNodes>\n          <leafValues>\n            4.9421998858451843e-01 -2.9091000556945801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 -6.1010001227259636e-03</internalNodes>\n          <leafValues>\n            4.2430499196052551e-01 -3.3899301290512085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 3.1927000731229782e-02</internalNodes>\n          <leafValues>\n            -3.1046999618411064e-02 -2.3459999561309814e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 -2.9843999072909355e-02</internalNodes>\n          <leafValues>\n            -7.8989601135253906e-01 1.5417699515819550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 -8.0541998147964478e-02</internalNodes>\n          <leafValues>\n            -2.2509229183197021e+00 -3.0906999483704567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 3.8109999150037766e-03</internalNodes>\n          <leafValues>\n            -2.5577300786972046e-01 2.3785500228404999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 3.3647000789642334e-02</internalNodes>\n          <leafValues>\n            -2.2541399300098419e-01 9.2307400703430176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 8.2809999585151672e-03</internalNodes>\n          <leafValues>\n            -2.8896200656890869e-01 3.1046199798583984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 1.0104399919509888e-01</internalNodes>\n          <leafValues>\n            -3.4864000976085663e-02 -2.7102620601654053e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 -1.0009000077843666e-02</internalNodes>\n          <leafValues>\n            5.9715402126312256e-01 -3.3831000328063965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 7.1919998154044151e-03</internalNodes>\n          <leafValues>\n            -4.7738000750541687e-01 2.2686000168323517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 2.4969000369310379e-02</internalNodes>\n          <leafValues>\n            2.2877700626850128e-01 -1.0435529947280884e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 2.7908000349998474e-01</internalNodes>\n          <leafValues>\n            -2.5818100571632385e-01 7.6780498027801514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 -4.4213000684976578e-02</internalNodes>\n          <leafValues>\n            -5.9798002243041992e-01 2.8039899468421936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 -1.4136999845504761e-02</internalNodes>\n          <leafValues>\n            7.0987302064895630e-01 -2.5645199418067932e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>91</maxWeakCount>\n      <stageThreshold>-3.6478610038757324e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 406 1.3771200180053711e-01</internalNodes>\n          <leafValues>\n            -5.5870598554611206e-01 1.0953769683837891e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 3.4460999071598053e-02</internalNodes>\n          <leafValues>\n            -7.1171897649765015e-01 5.2899599075317383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 1.8580000847578049e-02</internalNodes>\n          <leafValues>\n            -1.1157519817352295e+00 4.0593999624252319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 2.5041999295353889e-02</internalNodes>\n          <leafValues>\n            -4.0892499685287476e-01 7.4129998683929443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 5.7179000228643417e-02</internalNodes>\n          <leafValues>\n            -3.8054299354553223e-01 7.3647701740264893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 1.4932000078260899e-02</internalNodes>\n          <leafValues>\n            -6.9945502281188965e-01 3.7950998544692993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 8.8900001719594002e-03</internalNodes>\n          <leafValues>\n            -5.4558598995208740e-01 3.6332499980926514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 3.0435999855399132e-02</internalNodes>\n          <leafValues>\n            -1.0124599933624268e-01 7.9585897922515869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 -4.4160000979900360e-02</internalNodes>\n          <leafValues>\n            8.4410899877548218e-01 -3.2976400852203369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 1.8461000174283981e-02</internalNodes>\n          <leafValues>\n            2.6326599717140198e-01 -9.6736502647399902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 1.0614999569952488e-02</internalNodes>\n          <leafValues>\n            1.5251900255680084e-01 -1.0589870214462280e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 -4.5974001288414001e-02</internalNodes>\n          <leafValues>\n            -1.9918340444564819e+00 1.3629099726676941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 8.2900002598762512e-02</internalNodes>\n          <leafValues>\n            -3.2037198543548584e-01 6.0304200649261475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 -8.9130001142621040e-03</internalNodes>\n          <leafValues>\n            5.9586602449417114e-01 -2.1139599382877350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 4.2814001441001892e-02</internalNodes>\n          <leafValues>\n            2.2925000637769699e-02 -1.4679330587387085e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 -8.7139997631311417e-03</internalNodes>\n          <leafValues>\n            -4.3989500403404236e-01 2.0439699292182922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 -4.3390002101659775e-03</internalNodes>\n          <leafValues>\n            -8.9066797494888306e-01 1.0469999909400940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 8.0749997869133949e-03</internalNodes>\n          <leafValues>\n            2.1164199709892273e-01 -4.0231600403785706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 9.6739001572132111e-02</internalNodes>\n          <leafValues>\n            1.3319999910891056e-02 -1.6085360050201416e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 -3.0536999925971031e-02</internalNodes>\n          <leafValues>\n            1.0063740015029907e+00 -1.3413299620151520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 -6.0855999588966370e-02</internalNodes>\n          <leafValues>\n            -1.4689979553222656e+00 9.4240000471472740e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 -3.8162000477313995e-02</internalNodes>\n          <leafValues>\n            -8.1636399030685425e-01 2.6171201467514038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 -9.6960002556443214e-03</internalNodes>\n          <leafValues>\n            1.1561699956655502e-01 -7.1693199872970581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 4.8902999609708786e-02</internalNodes>\n          <leafValues>\n            1.3050499558448792e-01 -1.6448370218276978e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 -4.1611999273300171e-02</internalNodes>\n          <leafValues>\n            -1.1795840263366699e+00 2.5017000734806061e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 -2.0188000053167343e-02</internalNodes>\n          <leafValues>\n            6.3188201189041138e-01 -1.0490400344133377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 -9.7900000400841236e-04</internalNodes>\n          <leafValues>\n            1.8507799506187439e-01 -5.3565901517868042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -3.3622000366449356e-02</internalNodes>\n          <leafValues>\n            -9.3127602338790894e-01 2.0071500539779663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 1.9455999135971069e-02</internalNodes>\n          <leafValues>\n            3.8029000163078308e-02 -1.0112210512161255e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 -3.1800000579096377e-04</internalNodes>\n          <leafValues>\n            3.6457699537277222e-01 -2.7610900998115540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 -3.8899999344721437e-04</internalNodes>\n          <leafValues>\n            1.9665899872779846e-01 -5.3410500288009644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 -9.3496002256870270e-02</internalNodes>\n          <leafValues>\n            -1.6772350072860718e+00 2.0727099478244781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 -7.7877998352050781e-02</internalNodes>\n          <leafValues>\n            -3.0760629177093506e+00 -3.5803999751806259e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 1.6947999596595764e-02</internalNodes>\n          <leafValues>\n            2.1447399258613586e-01 -7.1376299858093262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 -2.1459000185132027e-02</internalNodes>\n          <leafValues>\n            -1.1468060016632080e+00 1.5855999663472176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 -1.2865999713540077e-02</internalNodes>\n          <leafValues>\n            8.3812397718429565e-01 -6.5944001078605652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 7.8220004215836525e-03</internalNodes>\n          <leafValues>\n            -2.8026801347732544e-01 7.9376900196075439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 1.0294400155544281e-01</internalNodes>\n          <leafValues>\n            1.7832300066947937e-01 -6.8412202596664429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 -3.7487998604774475e-02</internalNodes>\n          <leafValues>\n            9.6189999580383301e-01 -2.1735599637031555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 2.5505999103188515e-02</internalNodes>\n          <leafValues>\n            1.0103999637067318e-02 1.2461110353469849e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 6.6700001480057836e-04</internalNodes>\n          <leafValues>\n            -5.3488200902938843e-01 1.4746299386024475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 -2.8867900371551514e-01</internalNodes>\n          <leafValues>\n            8.2172799110412598e-01 -1.4948000200092793e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 9.1294996440410614e-02</internalNodes>\n          <leafValues>\n            -1.9605399668216705e-01 1.0803170204162598e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 1.2056600302457809e-01</internalNodes>\n          <leafValues>\n            -2.3848999291658401e-02 1.1392610073089600e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -7.3775000870227814e-02</internalNodes>\n          <leafValues>\n            -1.3583840131759644e+00 -4.2039998807013035e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 -3.3128000795841217e-02</internalNodes>\n          <leafValues>\n            -6.4483201503753662e-01 2.4142199754714966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 -4.3937001377344131e-02</internalNodes>\n          <leafValues>\n            8.4285402297973633e-01 -2.0624800026416779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 1.8110199272632599e-01</internalNodes>\n          <leafValues>\n            1.9212099909782410e-01 -1.2222139835357666e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -1.1850999668240547e-02</internalNodes>\n          <leafValues>\n            -7.2677397727966309e-01 5.2687998861074448e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 4.5920000411570072e-03</internalNodes>\n          <leafValues>\n            -3.6305201053619385e-01 2.9223799705505371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 7.0620002225041389e-03</internalNodes>\n          <leafValues>\n            5.8116000145673752e-02 -6.7161601781845093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 -2.3715000599622726e-02</internalNodes>\n          <leafValues>\n            4.7142100334167480e-01 1.8580000847578049e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 -6.7171998322010040e-02</internalNodes>\n          <leafValues>\n            -1.1331889629364014e+00 2.3780999705195427e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 -6.5310001373291016e-02</internalNodes>\n          <leafValues>\n            9.8253500461578369e-01 2.8362000361084938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 2.2791000083088875e-02</internalNodes>\n          <leafValues>\n            -2.8213700652122498e-01 5.8993399143218994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 -1.9037999212741852e-02</internalNodes>\n          <leafValues>\n            -6.3711500167846680e-01 2.6514598727226257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 -6.8689999170601368e-03</internalNodes>\n          <leafValues>\n            3.7487301230430603e-01 -3.3232098817825317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 -4.0146000683307648e-02</internalNodes>\n          <leafValues>\n            -1.3048729896545410e+00 1.5724299848079681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 -4.0530998259782791e-02</internalNodes>\n          <leafValues>\n            -2.0458049774169922e+00 -2.6925999671220779e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 -1.2253999710083008e-02</internalNodes>\n          <leafValues>\n            7.7649402618408203e-01 -4.2971000075340271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 -2.7219999581575394e-02</internalNodes>\n          <leafValues>\n            1.7424400150775909e-01 -4.4600901007652283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 -8.8366001844406128e-02</internalNodes>\n          <leafValues>\n            -1.5036419630050659e+00 1.4289900660514832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 -7.9159997403621674e-03</internalNodes>\n          <leafValues>\n            2.8666698932647705e-01 -3.7923699617385864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 -4.1960000991821289e-02</internalNodes>\n          <leafValues>\n            1.3846950531005859e+00 6.5026998519897461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 4.5662999153137207e-02</internalNodes>\n          <leafValues>\n            -2.2452299296855927e-01 7.9521000385284424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 -1.4090600609779358e-01</internalNodes>\n          <leafValues>\n            -1.5879319906234741e+00 1.1359000205993652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 -5.9216000139713287e-02</internalNodes>\n          <leafValues>\n            -1.1945960521697998e+00 -7.1640000678598881e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 4.3390002101659775e-03</internalNodes>\n          <leafValues>\n            -1.5528699755668640e-01 4.0664499998092651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 -2.0369999110698700e-03</internalNodes>\n          <leafValues>\n            2.5927901268005371e-01 -3.8368299603462219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 2.7516499161720276e-01</internalNodes>\n          <leafValues>\n            -8.8497996330261230e-02 7.6787501573562622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 -2.6601999998092651e-02</internalNodes>\n          <leafValues>\n            7.5024497509002686e-01 -2.2621999680995941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 4.0906000882387161e-02</internalNodes>\n          <leafValues>\n            1.2158600240945816e-01 -1.4566910266876221e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 5.5320002138614655e-03</internalNodes>\n          <leafValues>\n            -3.6611500382423401e-01 2.5968599319458008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 3.1879000365734100e-02</internalNodes>\n          <leafValues>\n            -7.5019001960754395e-02 4.8484799265861511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 -4.1482001543045044e-02</internalNodes>\n          <leafValues>\n            7.8220397233963013e-01 -2.1992200613021851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 -9.6130996942520142e-02</internalNodes>\n          <leafValues>\n            -8.9456301927566528e-01 1.4680700004100800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -1.1568999849259853e-02</internalNodes>\n          <leafValues>\n            8.2714098691940308e-01 -2.0275600254535675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 1.8312999978661537e-02</internalNodes>\n          <leafValues>\n            1.6367999836802483e-02 2.7306801080703735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 -3.4166000783443451e-02</internalNodes>\n          <leafValues>\n            1.1307320594787598e+00 -1.8810899555683136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 -2.4476999416947365e-02</internalNodes>\n          <leafValues>\n            -5.7791298627853394e-01 1.5812499821186066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 4.8957001417875290e-02</internalNodes>\n          <leafValues>\n            -2.2564999759197235e-02 -1.6373280286788940e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 -2.0702999085187912e-02</internalNodes>\n          <leafValues>\n            -5.4512101411819458e-01 2.4086999893188477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 -2.3002000525593758e-02</internalNodes>\n          <leafValues>\n            -1.2236540317535400e+00 -7.3440000414848328e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 6.4585000276565552e-02</internalNodes>\n          <leafValues>\n            1.4695599675178528e-01 -4.4967499375343323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 1.2666000053286552e-02</internalNodes>\n          <leafValues>\n            -2.7873900532722473e-01 4.3876600265502930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 -1.2002999894320965e-02</internalNodes>\n          <leafValues>\n            -2.4289099872112274e-01 2.5350099802017212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 -2.6443999260663986e-02</internalNodes>\n          <leafValues>\n            -8.5864800214767456e-01 2.6025999337434769e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 -2.5547999888658524e-02</internalNodes>\n          <leafValues>\n            6.9287902116775513e-01 -2.1160000469535589e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 3.9115000516176224e-02</internalNodes>\n          <leafValues>\n            -1.6589100658893585e-01 1.5209139585494995e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 -6.0330000706017017e-03</internalNodes>\n          <leafValues>\n            4.3856900930404663e-01 -2.1613700687885284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 -3.3936999738216400e-02</internalNodes>\n          <leafValues>\n            -9.7998398542404175e-01 2.2133000195026398e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>99</maxWeakCount>\n      <stageThreshold>-3.8700489997863770e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 497 4.0672998875379562e-02</internalNodes>\n          <leafValues>\n            -9.0474700927734375e-01 6.4410597085952759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 2.5609999895095825e-02</internalNodes>\n          <leafValues>\n            -7.9216998815536499e-01 5.7489997148513794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 1.9959500432014465e-01</internalNodes>\n          <leafValues>\n            -3.0099600553512573e-01 1.3143850564956665e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 1.2404999695718288e-02</internalNodes>\n          <leafValues>\n            -8.9882999658584595e-01 2.9205799102783203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 3.9207998663187027e-02</internalNodes>\n          <leafValues>\n            -4.1955199837684631e-01 5.3463298082351685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 -3.0843999236822128e-02</internalNodes>\n          <leafValues>\n            4.5793399214744568e-01 -4.4629099965095520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -3.5523001104593277e-02</internalNodes>\n          <leafValues>\n            9.1310501098632812e-01 -2.7373200654983521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 -6.1650000512599945e-02</internalNodes>\n          <leafValues>\n            -1.4697799682617188e+00 2.0364099740982056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 -1.1739999987185001e-02</internalNodes>\n          <leafValues>\n            -1.0482879877090454e+00 6.7801997065544128e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 6.6933996975421906e-02</internalNodes>\n          <leafValues>\n            2.9274499416351318e-01 -5.2282899618148804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 -2.0631000399589539e-02</internalNodes>\n          <leafValues>\n            -1.2855139970779419e+00 4.4550999999046326e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 -2.2357000038027763e-02</internalNodes>\n          <leafValues>\n            -8.5753798484802246e-01 1.8434000015258789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 1.1500000255182385e-03</internalNodes>\n          <leafValues>\n            1.6405500471591949e-01 -6.9125002622604370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 3.5872999578714371e-02</internalNodes>\n          <leafValues>\n            1.5756499767303467e-01 -8.4262597560882568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 3.0659999698400497e-02</internalNodes>\n          <leafValues>\n            2.1637000143527985e-02 -1.3634690046310425e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 5.5559999309480190e-03</internalNodes>\n          <leafValues>\n            -1.6737000644207001e-01 2.5888401269912720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 -6.1160000041127205e-03</internalNodes>\n          <leafValues>\n            -9.7271800041198730e-01 6.6100001335144043e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 -3.0316999182105064e-02</internalNodes>\n          <leafValues>\n            9.8474198579788208e-01 -1.6448000445961952e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 -9.7200004383921623e-03</internalNodes>\n          <leafValues>\n            4.7604700922966003e-01 -3.2516700029373169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 -5.7126998901367188e-02</internalNodes>\n          <leafValues>\n            -9.5920699834823608e-01 1.9938200712203979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 4.0059997700154781e-03</internalNodes>\n          <leafValues>\n            -5.2612501382827759e-01 2.2428700327873230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 3.3734001219272614e-02</internalNodes>\n          <leafValues>\n            1.7070099711418152e-01 -1.0737580060958862e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 -3.4641999751329422e-02</internalNodes>\n          <leafValues>\n            -1.1343129873275757e+00 3.6540001630783081e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 4.6923000365495682e-02</internalNodes>\n          <leafValues>\n            2.5832301378250122e-01 -7.1535801887512207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 -8.7660001590847969e-03</internalNodes>\n          <leafValues>\n            1.9640900194644928e-01 -5.3355097770690918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 6.5627999603748322e-02</internalNodes>\n          <leafValues>\n            -5.1194999366998672e-02 9.7610700130462646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 -4.4165000319480896e-02</internalNodes>\n          <leafValues>\n            1.0631920099258423e+00 -2.3462599515914917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 1.7304999753832817e-02</internalNodes>\n          <leafValues>\n            -1.8582899868488312e-01 4.5889899134635925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 3.3135998994112015e-02</internalNodes>\n          <leafValues>\n            -2.9381999745965004e-02 -2.6651329994201660e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 -2.1029999479651451e-02</internalNodes>\n          <leafValues>\n            9.9979901313781738e-01 2.4937000125646591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 2.9783999547362328e-02</internalNodes>\n          <leafValues>\n            -2.9605999588966370e-02 -2.1695868968963623e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 5.5291999131441116e-02</internalNodes>\n          <leafValues>\n            -7.5599999399855733e-04 7.4651998281478882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 -3.3597998321056366e-02</internalNodes>\n          <leafValues>\n            -1.5274159908294678e+00 1.1060000397264957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 1.9602999091148376e-02</internalNodes>\n          <leafValues>\n            3.3574998378753662e-02 9.9526202678680420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 -2.0787000656127930e-02</internalNodes>\n          <leafValues>\n            7.6612901687622070e-01 -2.4670800566673279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 3.2536000013351440e-02</internalNodes>\n          <leafValues>\n            1.6263400018215179e-01 -6.1134302616119385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 -1.0788000188767910e-02</internalNodes>\n          <leafValues>\n            -9.7839701175689697e-01 2.8969999402761459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 -9.9560003727674484e-03</internalNodes>\n          <leafValues>\n            4.6145799756050110e-01 -1.3510499894618988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 -3.7489999085664749e-03</internalNodes>\n          <leafValues>\n            2.5458198785781860e-01 -5.1955598592758179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 -4.1779998689889908e-02</internalNodes>\n          <leafValues>\n            -8.0565100908279419e-01 1.5208500623703003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 -3.4221000969409943e-02</internalNodes>\n          <leafValues>\n            -1.3137799501419067e+00 -3.5800000187009573e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 1.0130000300705433e-02</internalNodes>\n          <leafValues>\n            2.0175799727439880e-01 -6.1339598894119263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 -8.9849002659320831e-02</internalNodes>\n          <leafValues>\n            9.7632801532745361e-01 -2.0884799957275391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 2.6097999885678291e-02</internalNodes>\n          <leafValues>\n            -1.8807999789714813e-01 4.7705799341201782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 -3.7539999466389418e-03</internalNodes>\n          <leafValues>\n            -6.7980402708053589e-01 1.1288800090551376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 3.1973000615835190e-02</internalNodes>\n          <leafValues>\n            1.8951700627803802e-01 -1.4967479705810547e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 1.9332999363541603e-02</internalNodes>\n          <leafValues>\n            -2.3609900474548340e-01 8.1320500373840332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 1.9490000559017062e-03</internalNodes>\n          <leafValues>\n            2.4830399453639984e-01 -6.9211997091770172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 -4.4146999716758728e-02</internalNodes>\n          <leafValues>\n            -1.0418920516967773e+00 4.8053000122308731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 -4.4681999832391739e-02</internalNodes>\n          <leafValues>\n            5.1346302032470703e-01 -7.3799998499453068e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 -1.0757499933242798e-01</internalNodes>\n          <leafValues>\n            1.6202019453048706e+00 -1.8667599558830261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 -1.2846800684928894e-01</internalNodes>\n          <leafValues>\n            2.9869480133056641e+00 9.5427997410297394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 -4.4757999479770660e-02</internalNodes>\n          <leafValues>\n            6.0405302047729492e-01 -2.7058699727058411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 -4.3990999460220337e-02</internalNodes>\n          <leafValues>\n            -6.1790502071380615e-01 1.5997199714183807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 -1.2268999963998795e-01</internalNodes>\n          <leafValues>\n            6.6327202320098877e-01 -2.3636999726295471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 -1.9982999190688133e-02</internalNodes>\n          <leafValues>\n            -1.1228660345077515e+00 1.9616700708866119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 -1.5527999959886074e-02</internalNodes>\n          <leafValues>\n            -1.0770269632339478e+00 2.0693000406026840e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 -4.8971001058816910e-02</internalNodes>\n          <leafValues>\n            8.1168299913406372e-01 -1.7252000048756599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 5.5975999683141708e-02</internalNodes>\n          <leafValues>\n            -2.2529000416398048e-02 -1.7356760501861572e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -9.8580000922083855e-03</internalNodes>\n          <leafValues>\n            6.7881399393081665e-01 -5.8180000633001328e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 1.3481000438332558e-02</internalNodes>\n          <leafValues>\n            5.7847999036312103e-02 -7.7255302667617798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 6.5609999001026154e-03</internalNodes>\n          <leafValues>\n            -1.3146899640560150e-01 6.7055797576904297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 7.1149999275803566e-03</internalNodes>\n          <leafValues>\n            -3.7880599498748779e-01 3.0978998541831970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 4.8159998841583729e-03</internalNodes>\n          <leafValues>\n            -5.8470398187637329e-01 2.5602099299430847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 561 9.5319999381899834e-03</internalNodes>\n          <leafValues>\n            -3.0217000842094421e-01 4.1253298521041870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 -2.7474999427795410e-02</internalNodes>\n          <leafValues>\n            5.9154701232910156e-01 1.7963999882340431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 -3.9519999176263809e-02</internalNodes>\n          <leafValues>\n            9.6913498640060425e-01 -2.1020300686359406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 -3.0658999457955360e-02</internalNodes>\n          <leafValues>\n            9.1155898571014404e-01 4.0550000965595245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 -1.4680000022053719e-03</internalNodes>\n          <leafValues>\n            -6.0489797592163086e-01 1.6960899531841278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 1.9077600538730621e-01</internalNodes>\n          <leafValues>\n            4.3515000492334366e-02 8.1892901659011841e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 5.1790000870823860e-03</internalNodes>\n          <leafValues>\n            -9.3617302179336548e-01 2.4937000125646591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 2.4126000702381134e-02</internalNodes>\n          <leafValues>\n            1.8175500631332397e-01 -3.4185901284217834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 -2.6383999735116959e-02</internalNodes>\n          <leafValues>\n            -1.2912579774856567e+00 -3.4280000254511833e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 5.4139997810125351e-03</internalNodes>\n          <leafValues>\n            -4.6291999518871307e-02 2.5269600749015808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 5.4216001182794571e-02</internalNodes>\n          <leafValues>\n            -1.2848000042140484e-02 -1.4304540157318115e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 2.3799999326001853e-04</internalNodes>\n          <leafValues>\n            -2.6676699519157410e-01 3.3588299155235291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 1.5216999687254429e-02</internalNodes>\n          <leafValues>\n            -5.1367300748825073e-01 1.3005100190639496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 1.7007999122142792e-02</internalNodes>\n          <leafValues>\n            4.1575899720191956e-01 -3.1241199374198914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 3.0496999621391296e-02</internalNodes>\n          <leafValues>\n            -2.4820999801158905e-01 7.0828497409820557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 6.5430002287030220e-03</internalNodes>\n          <leafValues>\n            -2.2637000679969788e-01 1.9184599816799164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 1.4163999259471893e-01</internalNodes>\n          <leafValues>\n            6.5227001905441284e-02 -8.8809502124786377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 1.9338000565767288e-02</internalNodes>\n          <leafValues>\n            1.8891200423240662e-01 -2.7397701144218445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 -1.7324000597000122e-02</internalNodes>\n          <leafValues>\n            -9.4866698980331421e-01 2.4196999147534370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 -6.2069999985396862e-03</internalNodes>\n          <leafValues>\n            3.6938399076461792e-01 -1.7494900524616241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 -1.6109000891447067e-02</internalNodes>\n          <leafValues>\n            9.6159499883651733e-01 -2.0005300641059875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 -1.0122500360012054e-01</internalNodes>\n          <leafValues>\n            -3.0699110031127930e+00 1.1363799870014191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 -7.5509999878704548e-03</internalNodes>\n          <leafValues>\n            2.2921000421047211e-01 -4.5645099878311157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 4.4247999787330627e-02</internalNodes>\n          <leafValues>\n            -3.1599999056197703e-04 3.9225301146507263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 -1.1636000126600266e-01</internalNodes>\n          <leafValues>\n            9.5233702659606934e-01 -2.0201599597930908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 4.7360002063214779e-03</internalNodes>\n          <leafValues>\n            -9.9177002906799316e-02 2.0370499789714813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 2.2459000349044800e-02</internalNodes>\n          <leafValues>\n            8.7280003353953362e-03 -1.0217070579528809e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 -1.2109000235795975e-02</internalNodes>\n          <leafValues>\n            6.4812600612640381e-01 -9.0149000287055969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 5.6120000779628754e-02</internalNodes>\n          <leafValues>\n            -3.6759998649358749e-02 -1.9275590181350708e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 -8.7379999458789825e-03</internalNodes>\n          <leafValues>\n            6.9261300563812256e-01 -6.8374998867511749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 6.6399998031556606e-03</internalNodes>\n          <leafValues>\n            -4.0569800138473511e-01 1.8625700473785400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 -1.8131999298930168e-02</internalNodes>\n          <leafValues>\n            -6.4518201351165771e-01 2.1976399421691895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 -2.2718999534845352e-02</internalNodes>\n          <leafValues>\n            9.7776198387145996e-01 -1.8654300272464752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 1.2705000117421150e-02</internalNodes>\n          <leafValues>\n            -1.0546600073575974e-01 3.7404099106788635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 -1.3682999648153782e-02</internalNodes>\n          <leafValues>\n            6.1064100265502930e-01 -2.6881098747253418e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>115</maxWeakCount>\n      <stageThreshold>-3.7160909175872803e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 596 3.1357999891042709e-02</internalNodes>\n          <leafValues>\n            -1.0183910131454468e+00 5.7528597116470337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 9.3050003051757812e-02</internalNodes>\n          <leafValues>\n            -4.1297501325607300e-01 1.0091199874877930e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 2.5949999690055847e-02</internalNodes>\n          <leafValues>\n            -5.8587902784347534e-01 5.6606197357177734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 1.6472000628709793e-02</internalNodes>\n          <leafValues>\n            -9.2857497930526733e-01 3.0924499034881592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 -1.8779999809339643e-03</internalNodes>\n          <leafValues>\n            1.1951000243425369e-01 -1.1180130243301392e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 -9.0129999443888664e-03</internalNodes>\n          <leafValues>\n            -5.7849502563476562e-01 3.3154401183128357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 2.2547999396920204e-02</internalNodes>\n          <leafValues>\n            -3.8325101137161255e-01 5.2462202310562134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 -3.7780001759529114e-02</internalNodes>\n          <leafValues>\n            1.1790670156478882e+00 -3.4166999161243439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 -5.3799999877810478e-03</internalNodes>\n          <leafValues>\n            -8.6265897750854492e-01 1.1867900192737579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 -2.3893000558018684e-02</internalNodes>\n          <leafValues>\n            -7.4950599670410156e-01 2.1011400222778320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 -2.6521999388933182e-02</internalNodes>\n          <leafValues>\n            9.2128598690032959e-01 -2.8252801299095154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 1.2280000373721123e-02</internalNodes>\n          <leafValues>\n            2.6662799715995789e-01 -7.0013600587844849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 9.6594996750354767e-02</internalNodes>\n          <leafValues>\n            -2.8453999757766724e-01 7.3168998956680298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 -2.7414999902248383e-02</internalNodes>\n          <leafValues>\n            -6.1492699384689331e-01 1.5576200187206268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 -1.5767000615596771e-02</internalNodes>\n          <leafValues>\n            5.7551199197769165e-01 -3.4362199902534485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 -2.1100000012665987e-03</internalNodes>\n          <leafValues>\n            3.2599699497222900e-01 -1.3008299469947815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 1.2006999924778938e-02</internalNodes>\n          <leafValues>\n            8.9322999119758606e-02 -9.6025598049163818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 -1.5421999618411064e-02</internalNodes>\n          <leafValues>\n            3.4449499845504761e-01 -4.6711999177932739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 -4.1579999960958958e-03</internalNodes>\n          <leafValues>\n            2.3696300387382507e-01 -5.2563297748565674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 -2.1185999736189842e-02</internalNodes>\n          <leafValues>\n            -7.4267697334289551e-01 2.1702000498771667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 -1.7077000811696053e-02</internalNodes>\n          <leafValues>\n            -9.0471798181533813e-01 6.6012002527713776e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 -4.0849998593330383e-02</internalNodes>\n          <leafValues>\n            -3.4446600079536438e-01 2.1503700315952301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 -8.1930002197623253e-03</internalNodes>\n          <leafValues>\n            -9.3388599157333374e-01 5.0471000373363495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 -1.9238000735640526e-02</internalNodes>\n          <leafValues>\n            -5.3203701972961426e-01 1.7240600287914276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 -4.4192001223564148e-02</internalNodes>\n          <leafValues>\n            9.2075002193450928e-01 -2.2148500382900238e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 -6.2392000108957291e-02</internalNodes>\n          <leafValues>\n            -7.1053802967071533e-01 1.8323899805545807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 -1.0079999919980764e-03</internalNodes>\n          <leafValues>\n            -8.7063097953796387e-01 5.5330000817775726e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 2.3870000615715981e-02</internalNodes>\n          <leafValues>\n            -2.2854200005531311e-01 5.2415597438812256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 2.1391000598669052e-02</internalNodes>\n          <leafValues>\n            -3.0325898528099060e-01 5.5860602855682373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 2.0254999399185181e-02</internalNodes>\n          <leafValues>\n            2.6901501417160034e-01 -7.0261800289154053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 -2.8772000223398209e-02</internalNodes>\n          <leafValues>\n            -1.1835030317306519e+00 4.6512000262737274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 3.4199999645352364e-03</internalNodes>\n          <leafValues>\n            -5.4652100801467896e-01 2.5962498784065247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 5.6983001530170441e-02</internalNodes>\n          <leafValues>\n            -2.6982900500297546e-01 5.8170700073242188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 -9.3892000615596771e-02</internalNodes>\n          <leafValues>\n            -9.1046398878097534e-01 1.9677700102329254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 1.7699999734759331e-02</internalNodes>\n          <leafValues>\n            -4.4003298878669739e-01 2.1349500119686127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 2.2844199836254120e-01</internalNodes>\n          <leafValues>\n            2.3605000227689743e-02 7.7171599864959717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 -1.8287500739097595e-01</internalNodes>\n          <leafValues>\n            7.9228597879409790e-01 -2.4644799530506134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 -6.9891996681690216e-02</internalNodes>\n          <leafValues>\n            8.0267798900604248e-01 -3.6072000861167908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 1.5297000296413898e-02</internalNodes>\n          <leafValues>\n            -2.0072300732135773e-01 1.1030600070953369e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 6.7500001750886440e-03</internalNodes>\n          <leafValues>\n            -4.5967999845743179e-02 7.2094500064849854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 -1.5983000397682190e-02</internalNodes>\n          <leafValues>\n            -9.0357202291488647e-01 4.4987998902797699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 1.3088000006973743e-02</internalNodes>\n          <leafValues>\n            3.5297098755836487e-01 -3.7710601091384888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 1.3061000034213066e-02</internalNodes>\n          <leafValues>\n            -1.9583599269390106e-01 1.1198940277099609e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 -3.9907000958919525e-02</internalNodes>\n          <leafValues>\n            -1.3998429775238037e+00 1.9145099818706512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 1.5026999637484550e-02</internalNodes>\n          <leafValues>\n            2.3600000422447920e-03 -1.1611249446868896e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 -2.0517999306321144e-02</internalNodes>\n          <leafValues>\n            -4.8908099532127380e-01 1.6743400692939758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 -2.2359000518918037e-02</internalNodes>\n          <leafValues>\n            -1.2202980518341064e+00 -1.1975999921560287e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 -7.9150004312396049e-03</internalNodes>\n          <leafValues>\n            3.7228098511695862e-01 -8.5063003003597260e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 1.5258000232279301e-02</internalNodes>\n          <leafValues>\n            -2.9412600398063660e-01 5.9406399726867676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 -3.1665999442338943e-02</internalNodes>\n          <leafValues>\n            -1.4395569562911987e+00 1.3578799366950989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 -3.0773999169468880e-02</internalNodes>\n          <leafValues>\n            -2.2545371055603027e+00 -3.3971000462770462e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 -1.5483000315725803e-02</internalNodes>\n          <leafValues>\n            3.7700700759887695e-01 1.5847999602556229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 3.5167001187801361e-02</internalNodes>\n          <leafValues>\n            -2.9446101188659668e-01 5.3159099817276001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 -1.7906000837683678e-02</internalNodes>\n          <leafValues>\n            -9.9788200855255127e-01 1.6235999763011932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 -3.1799999997019768e-03</internalNodes>\n          <leafValues>\n            4.7657001763582230e-02 -7.5249898433685303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 1.5720000490546227e-02</internalNodes>\n          <leafValues>\n            1.4873799681663513e-01 -6.5375399589538574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 2.9864000156521797e-02</internalNodes>\n          <leafValues>\n            -1.4952000230550766e-02 -1.2275190353393555e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 2.9899999499320984e-03</internalNodes>\n          <leafValues>\n            -1.4263699948787689e-01 4.3272799253463745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 8.4749996662139893e-02</internalNodes>\n          <leafValues>\n            -1.9280999898910522e-02 -1.1946409940719604e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 -5.8724999427795410e-02</internalNodes>\n          <leafValues>\n            -1.7328219413757324e+00 1.4374700188636780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 4.4755998998880386e-02</internalNodes>\n          <leafValues>\n            -2.4140599370002747e-01 5.4019999504089355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 4.0369000285863876e-02</internalNodes>\n          <leafValues>\n            5.7680001482367516e-03 5.6578099727630615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 3.7735998630523682e-02</internalNodes>\n          <leafValues>\n            3.8180999457836151e-02 -7.9370397329330444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 6.0752999037504196e-02</internalNodes>\n          <leafValues>\n            7.6453000307083130e-02 1.4813209772109985e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 -1.9832000136375427e-02</internalNodes>\n          <leafValues>\n            -1.6971720457077026e+00 -2.7370000258088112e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 -1.6592699289321899e-01</internalNodes>\n          <leafValues>\n            6.2976002693176270e-01 3.1762998551130295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 6.9014996290206909e-02</internalNodes>\n          <leafValues>\n            -3.3463200926780701e-01 3.0076700448989868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 1.1358000338077545e-02</internalNodes>\n          <leafValues>\n            2.2741499543190002e-01 -3.8224700093269348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 1.7000000225380063e-03</internalNodes>\n          <leafValues>\n            1.9223800301551819e-01 -5.2735102176666260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 7.9769000411033630e-02</internalNodes>\n          <leafValues>\n            9.1491997241973877e-02 2.1049048900604248e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 -5.7144001126289368e-02</internalNodes>\n          <leafValues>\n            -1.7452130317687988e+00 -4.0910001844167709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 7.3830001056194305e-03</internalNodes>\n          <leafValues>\n            -2.4214799702167511e-01 3.5577800869941711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 -1.8040999770164490e-02</internalNodes>\n          <leafValues>\n            1.1779999732971191e+00 -1.7676700651645660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 9.4503000378608704e-02</internalNodes>\n          <leafValues>\n            1.3936099410057068e-01 -1.2993700504302979e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 5.4210000671446323e-03</internalNodes>\n          <leafValues>\n            -5.4608601331710815e-01 1.3916400074958801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 7.0290002040565014e-03</internalNodes>\n          <leafValues>\n            -2.1597200632095337e-01 3.9258098602294922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 3.4515999257564545e-02</internalNodes>\n          <leafValues>\n            6.3188999891281128e-02 -7.2108101844787598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 -5.1924999803304672e-02</internalNodes>\n          <leafValues>\n            6.8667602539062500e-01 6.3272997736930847e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 -6.9162003695964813e-02</internalNodes>\n          <leafValues>\n            1.7411810159683228e+00 -1.6619299352169037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 -5.5229999125003815e-03</internalNodes>\n          <leafValues>\n            3.0694699287414551e-01 -1.6662900149822235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 6.8599998950958252e-02</internalNodes>\n          <leafValues>\n            -2.1405400335788727e-01 7.3185002803802490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 -6.7038998007774353e-02</internalNodes>\n          <leafValues>\n            -7.9360598325729370e-01 2.0525799691677094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 678 -2.1005000919103622e-02</internalNodes>\n          <leafValues>\n            3.7344399094581604e-01 -2.9618600010871887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 2.0278999581933022e-02</internalNodes>\n          <leafValues>\n            -1.5200000256299973e-02 4.0555301308631897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 -4.7107998281717300e-02</internalNodes>\n          <leafValues>\n            1.2116849422454834e+00 -1.7464299499988556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 1.8768499791622162e-01</internalNodes>\n          <leafValues>\n            -2.2909000515937805e-02 6.9645798206329346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 -4.3228998780250549e-02</internalNodes>\n          <leafValues>\n            -1.0602480173110962e+00 -5.5599998449906707e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 2.0004000514745712e-02</internalNodes>\n          <leafValues>\n            -3.2751001417636871e-02 5.3805100917816162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 8.0880001187324524e-03</internalNodes>\n          <leafValues>\n            3.7548001855611801e-02 -7.4768900871276855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 2.7101000770926476e-02</internalNodes>\n          <leafValues>\n            -8.1790000200271606e-02 3.3387100696563721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 -9.1746002435684204e-02</internalNodes>\n          <leafValues>\n            -1.9213509559631348e+00 -3.8952998816967010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 -1.2454999610781670e-02</internalNodes>\n          <leafValues>\n            4.8360601067543030e-01 1.8168000504374504e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 1.4649000018835068e-02</internalNodes>\n          <leafValues>\n            -1.9906699657440186e-01 7.2815400362014771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 2.9101999476552010e-02</internalNodes>\n          <leafValues>\n            1.9871099293231964e-01 -4.9216800928115845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 8.7799998000264168e-03</internalNodes>\n          <leafValues>\n            -1.9499599933624268e-01 7.7317398786544800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 -5.4740000516176224e-02</internalNodes>\n          <leafValues>\n            1.8087190389633179e+00 6.8323001265525818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 -1.4798000454902649e-02</internalNodes>\n          <leafValues>\n            7.8064900636672974e-01 -1.8709599971771240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 2.5012999773025513e-02</internalNodes>\n          <leafValues>\n            1.5285299718379974e-01 -1.6021020412445068e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 4.6548001468181610e-02</internalNodes>\n          <leafValues>\n            -1.6738200187683105e-01 1.1902060508728027e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 1.7624000087380409e-02</internalNodes>\n          <leafValues>\n            -1.0285499691963196e-01 3.9175900816917419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 1.6319599747657776e-01</internalNodes>\n          <leafValues>\n            -3.5624001175165176e-02 -1.6098170280456543e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 1.3137999922037125e-02</internalNodes>\n          <leafValues>\n            -5.6359000504016876e-02 5.4158902168273926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 -1.5665000304579735e-02</internalNodes>\n          <leafValues>\n            2.8063100576400757e-01 -3.1708601117134094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 699 8.0554001033306122e-02</internalNodes>\n          <leafValues>\n            1.2640400230884552e-01 -1.0297529697418213e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 3.5363998264074326e-02</internalNodes>\n          <leafValues>\n            2.0752999931573868e-02 -7.9105597734451294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 3.2986998558044434e-02</internalNodes>\n          <leafValues>\n            1.9057099521160126e-01 -8.3839899301528931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 1.2195000424981117e-02</internalNodes>\n          <leafValues>\n            7.3729000985622406e-02 -6.2780702114105225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 4.3065998703241348e-02</internalNodes>\n          <leafValues>\n            4.7384999692440033e-02 1.5712939500808716e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 3.0326999723911285e-02</internalNodes>\n          <leafValues>\n            -2.7314600348472595e-01 3.8572001457214355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 3.5493001341819763e-02</internalNodes>\n          <leafValues>\n            5.4593998938798904e-02 5.2583402395248413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 -1.4596999622881413e-02</internalNodes>\n          <leafValues>\n            3.8152599334716797e-01 -2.8332400321960449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 1.2606999836862087e-02</internalNodes>\n          <leafValues>\n            1.5455099940299988e-01 -3.0501499772071838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 1.0172000154852867e-02</internalNodes>\n          <leafValues>\n            2.3637000471353531e-02 -8.7217897176742554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 2.8843000531196594e-02</internalNodes>\n          <leafValues>\n            1.6090999543666840e-01 -2.0277599990367889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 5.5100000463426113e-04</internalNodes>\n          <leafValues>\n            -6.1545401811599731e-01 8.0935999751091003e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>127</maxWeakCount>\n      <stageThreshold>-3.5645289421081543e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 711 4.8344001173973083e-02</internalNodes>\n          <leafValues>\n            -8.4904599189758301e-01 5.6974399089813232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 3.2460000365972519e-02</internalNodes>\n          <leafValues>\n            -8.1417298316955566e-01 4.4781699776649475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 3.3339999616146088e-02</internalNodes>\n          <leafValues>\n            -3.6423799395561218e-01 6.7937397956848145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 6.4019998535513878e-03</internalNodes>\n          <leafValues>\n            -1.1885459423065186e+00 1.9238699972629547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 -5.6889997795224190e-03</internalNodes>\n          <leafValues>\n            3.3085298538208008e-01 -7.1334099769592285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 1.2698000296950340e-02</internalNodes>\n          <leafValues>\n            -5.0990802049636841e-01 1.1376299709081650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 6.0549997724592686e-03</internalNodes>\n          <leafValues>\n            -1.0470550060272217e+00 2.0222599804401398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 2.6420000940561295e-03</internalNodes>\n          <leafValues>\n            -5.0559401512145996e-01 3.6441200971603394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 -1.6925999894738197e-02</internalNodes>\n          <leafValues>\n            -9.9541902542114258e-01 1.2602199614048004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 2.8235999867320061e-02</internalNodes>\n          <leafValues>\n            -9.4137996435165405e-02 5.7780402898788452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 1.0428999550640583e-02</internalNodes>\n          <leafValues>\n            2.3272900283336639e-01 -5.2569699287414551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 9.8860003054141998e-03</internalNodes>\n          <leafValues>\n            -1.0316299647092819e-01 4.7657600045204163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 2.6015000417828560e-02</internalNodes>\n          <leafValues>\n            -1.0920000495389104e-03 -1.5581729412078857e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 -2.5537999346852303e-02</internalNodes>\n          <leafValues>\n            -6.5451401472091675e-01 1.8843199312686920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 -3.5310001112520695e-03</internalNodes>\n          <leafValues>\n            2.8140598535537720e-01 -4.4575300812721252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 9.2449998483061790e-03</internalNodes>\n          <leafValues>\n            1.5612000226974487e-01 -2.1370999515056610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 2.1030999720096588e-02</internalNodes>\n          <leafValues>\n            -2.9170298576354980e-01 5.2234101295471191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 -5.1063001155853271e-02</internalNodes>\n          <leafValues>\n            1.3661290407180786e+00 3.0465999618172646e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 -6.2330000102519989e-02</internalNodes>\n          <leafValues>\n            1.2207020521163940e+00 -2.2434400022029877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 -3.2963000237941742e-02</internalNodes>\n          <leafValues>\n            -8.2016801834106445e-01 1.4531899988651276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -3.7418000400066376e-02</internalNodes>\n          <leafValues>\n            -1.2218099832534790e+00 1.9448999315500259e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 1.2402799725532532e-01</internalNodes>\n          <leafValues>\n            1.2082300335168839e-01 -9.8729300498962402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 -8.9229997247457504e-03</internalNodes>\n          <leafValues>\n            -1.1688489913940430e+00 2.1105000749230385e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 -5.9879999607801437e-02</internalNodes>\n          <leafValues>\n            -1.0689330101013184e+00 1.9860200583934784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 6.2620001845061779e-03</internalNodes>\n          <leafValues>\n            -3.6229598522186279e-01 3.8000801205635071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 -1.7673000693321228e-02</internalNodes>\n          <leafValues>\n            4.9094098806381226e-01 -1.4606699347496033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 1.7579000443220139e-02</internalNodes>\n          <leafValues>\n            5.8728098869323730e-01 -2.7774399518966675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 5.1560001447796822e-03</internalNodes>\n          <leafValues>\n            -7.5194999575614929e-02 6.0193097591400146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 -1.0599999688565731e-02</internalNodes>\n          <leafValues>\n            2.7637401223182678e-01 -3.7794300913810730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 2.0884099602699280e-01</internalNodes>\n          <leafValues>\n            -5.3599998354911804e-03 1.0317809581756592e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 -2.6412999257445335e-02</internalNodes>\n          <leafValues>\n            8.2336401939392090e-01 -2.2480599582195282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 5.8892000466585159e-02</internalNodes>\n          <leafValues>\n            1.3098299503326416e-01 -1.1853699684143066e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 -1.1579000391066074e-02</internalNodes>\n          <leafValues>\n            -9.0667802095413208e-01 4.4126998633146286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 4.5988000929355621e-02</internalNodes>\n          <leafValues>\n            1.0143999941647053e-02 1.0740900039672852e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 745 -2.2838000208139420e-02</internalNodes>\n          <leafValues>\n            1.7791990041732788e+00 -1.7315499484539032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 -8.1709995865821838e-03</internalNodes>\n          <leafValues>\n            5.7386302947998047e-01 -7.4106000363826752e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 3.5359999164938927e-03</internalNodes>\n          <leafValues>\n            -3.2072898745536804e-01 4.0182501077651978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 4.9444999545812607e-02</internalNodes>\n          <leafValues>\n            1.9288000464439392e-01 -1.2166700363159180e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 3.5139999818056822e-03</internalNodes>\n          <leafValues>\n            6.9568000733852386e-02 -7.1323698759078979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 -3.0996000394225121e-02</internalNodes>\n          <leafValues>\n            -3.8862198591232300e-01 1.8098799884319305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 8.6452998220920563e-02</internalNodes>\n          <leafValues>\n            -2.5792999193072319e-02 -1.5453219413757324e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 -1.3652600347995758e-01</internalNodes>\n          <leafValues>\n            -1.9199420213699341e+00 1.6613300144672394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 -5.7689999230206013e-03</internalNodes>\n          <leafValues>\n            -1.2822589874267578e+00 -1.5907999128103256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 -1.7899999395012856e-02</internalNodes>\n          <leafValues>\n            -4.0409898757934570e-01 2.3591600358486176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 -1.9969999790191650e-02</internalNodes>\n          <leafValues>\n            -7.2891902923583984e-01 5.6235000491142273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 -5.7493001222610474e-02</internalNodes>\n          <leafValues>\n            5.7830798625946045e-01 -1.5796000137925148e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 -8.3056002855300903e-02</internalNodes>\n          <leafValues>\n            9.1511601209640503e-01 -2.1121400594711304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 -5.3771000355482101e-02</internalNodes>\n          <leafValues>\n            -5.1931297779083252e-01 1.8576000630855560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 -8.3670001477003098e-03</internalNodes>\n          <leafValues>\n            2.4109700322151184e-01 -3.9648601412773132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 5.5406998842954636e-02</internalNodes>\n          <leafValues>\n            1.6771200299263000e-01 -2.5664970874786377e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 -6.7180998623371124e-02</internalNodes>\n          <leafValues>\n            -1.3658570051193237e+00 -1.4232000336050987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 -2.3900000378489494e-02</internalNodes>\n          <leafValues>\n            -1.7084569931030273e+00 1.6507799923419952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 5.5949999950826168e-03</internalNodes>\n          <leafValues>\n            -3.1373998522758484e-01 3.2837900519371033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 2.1294999867677689e-02</internalNodes>\n          <leafValues>\n            1.4953400194644928e-01 -4.8579800128936768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 -2.4613000452518463e-02</internalNodes>\n          <leafValues>\n            7.4346399307250977e-01 -2.2305199503898621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 -1.9626000896096230e-02</internalNodes>\n          <leafValues>\n            -4.0918299555778503e-01 1.8893200159072876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 -5.3266000002622604e-02</internalNodes>\n          <leafValues>\n            8.1381601095199585e-01 -2.0853699743747711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 7.1290000341832638e-03</internalNodes>\n          <leafValues>\n            3.2996100187301636e-01 -5.9937399625778198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 -2.2486999630928040e-02</internalNodes>\n          <leafValues>\n            -1.2551610469818115e+00 -2.0413000136613846e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 -8.2310996949672699e-02</internalNodes>\n          <leafValues>\n            1.3821430206298828e+00 5.9308998286724091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 1.3097000122070312e-01</internalNodes>\n          <leafValues>\n            -3.5843998193740845e-02 -1.5396369695663452e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 1.4293000102043152e-02</internalNodes>\n          <leafValues>\n            -1.8475200235843658e-01 3.7455001473426819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 6.3479999080300331e-03</internalNodes>\n          <leafValues>\n            -4.4901099801063538e-01 1.3876999914646149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 -4.6055000275373459e-02</internalNodes>\n          <leafValues>\n            6.7832601070404053e-01 -1.7071999609470367e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 5.7693999260663986e-02</internalNodes>\n          <leafValues>\n            -1.1955999769270420e-02 -1.2261159420013428e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 -6.0609998181462288e-03</internalNodes>\n          <leafValues>\n            3.3958598971366882e-01 6.2800000887364149e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 -5.2163001149892807e-02</internalNodes>\n          <leafValues>\n            -1.0621069669723511e+00 -1.3779999688267708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 4.6572998166084290e-02</internalNodes>\n          <leafValues>\n            1.4538800716400146e-01 -1.2384550571441650e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 7.5309998355805874e-03</internalNodes>\n          <leafValues>\n            -2.4467700719833374e-01 5.1377099752426147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 780 2.1615000441670418e-02</internalNodes>\n          <leafValues>\n            1.3072599470615387e-01 -7.0996797084808350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 -1.7864000052213669e-02</internalNodes>\n          <leafValues>\n            -1.0474660396575928e+00 4.9599999329075217e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 -3.7195000797510147e-02</internalNodes>\n          <leafValues>\n            -1.5126730203628540e+00 1.4801399409770966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 -3.1100001069717109e-04</internalNodes>\n          <leafValues>\n            1.3971500098705292e-01 -4.6867498755455017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 2.5042999535799026e-02</internalNodes>\n          <leafValues>\n            2.8632000088691711e-01 -4.1794699430465698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 9.3449996784329414e-03</internalNodes>\n          <leafValues>\n            -2.7336201071739197e-01 4.3444699048995972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 3.2363999634981155e-02</internalNodes>\n          <leafValues>\n            1.8438899517059326e-01 -9.5019298791885376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 -6.2299999408423901e-03</internalNodes>\n          <leafValues>\n            3.2581999897956848e-01 -3.0815601348876953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 5.1488999277353287e-02</internalNodes>\n          <leafValues>\n            1.1416000127792358e-01 -1.9795479774475098e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 -2.6449000462889671e-02</internalNodes>\n          <leafValues>\n            -1.1067299842834473e+00 -8.5519999265670776e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 -1.5420000068843365e-02</internalNodes>\n          <leafValues>\n            8.0138701200485229e-01 -3.2035000622272491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 1.9456999376416206e-02</internalNodes>\n          <leafValues>\n            -2.6449498534202576e-01 3.8753899931907654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 3.3620998263359070e-02</internalNodes>\n          <leafValues>\n            1.6052000224590302e-02 5.8840900659561157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 2.8906000778079033e-02</internalNodes>\n          <leafValues>\n            1.5216000378131866e-02 -9.4723600149154663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 2.0300000323913991e-04</internalNodes>\n          <leafValues>\n            -3.0766001343727112e-01 2.1235899627208710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 -4.9141999334096909e-02</internalNodes>\n          <leafValues>\n            -1.6058609485626221e+00 -3.1094999983906746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 7.6425999402999878e-02</internalNodes>\n          <leafValues>\n            7.4758999049663544e-02 1.1639410257339478e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 2.3897999897599220e-02</internalNodes>\n          <leafValues>\n            -6.4320000819861889e-03 -1.1150749921798706e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 3.8970001041889191e-03</internalNodes>\n          <leafValues>\n            -2.4105699360370636e-01 2.0858900249004364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 -8.9445002377033234e-02</internalNodes>\n          <leafValues>\n            1.9157789945602417e+00 -1.5721100568771362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 -1.5008999966084957e-02</internalNodes>\n          <leafValues>\n            -2.5174099206924438e-01 1.8179899454116821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 -1.1145999655127525e-02</internalNodes>\n          <leafValues>\n            -6.9349497556686401e-01 4.4927999377250671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 9.4578996300697327e-02</internalNodes>\n          <leafValues>\n            1.8102100491523743e-01 -7.4978601932525635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 5.5038899183273315e-01</internalNodes>\n          <leafValues>\n            -3.0974000692367554e-02 -1.6746139526367188e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 4.1381001472473145e-02</internalNodes>\n          <leafValues>\n            6.3910000026226044e-02 7.6561200618743896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 2.4771999567747116e-02</internalNodes>\n          <leafValues>\n            1.1380000039935112e-02 -8.8559401035308838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 5.0999000668525696e-02</internalNodes>\n          <leafValues>\n            1.4890299737453461e-01 -2.4634211063385010e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 -1.6893999651074409e-02</internalNodes>\n          <leafValues>\n            3.8870999217033386e-01 -2.9880300164222717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 -1.2162300199270248e-01</internalNodes>\n          <leafValues>\n            -1.5542800426483154e+00 1.6300800442695618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 -3.6049999762326479e-03</internalNodes>\n          <leafValues>\n            2.1842800080776215e-01 -3.7312099337577820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 1.1575400084257126e-01</internalNodes>\n          <leafValues>\n            -4.7061000019311905e-02 5.9403699636459351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 3.6903999745845795e-02</internalNodes>\n          <leafValues>\n            -2.5508600473403931e-01 5.5397301912307739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 1.1483999900519848e-02</internalNodes>\n          <leafValues>\n            -1.8129499256610870e-01 4.0682798624038696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 -2.0233999937772751e-02</internalNodes>\n          <leafValues>\n            5.4311197996139526e-01 -2.3822399973869324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 -2.8765000402927399e-02</internalNodes>\n          <leafValues>\n            -6.9172298908233643e-01 1.5943300724029541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 -5.8320001699030399e-03</internalNodes>\n          <leafValues>\n            2.9447799921035767e-01 -3.4005999565124512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 -5.5468998849391937e-02</internalNodes>\n          <leafValues>\n            9.2200797796249390e-01 9.4093002378940582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 -1.4801000244915485e-02</internalNodes>\n          <leafValues>\n            -7.9539698362350464e-01 3.1521998345851898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 -7.0940000005066395e-03</internalNodes>\n          <leafValues>\n            3.3096000552177429e-01 -5.0886999815702438e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -4.5124001801013947e-02</internalNodes>\n          <leafValues>\n            -1.3719749450683594e+00 -2.1408999338746071e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 6.4377002418041229e-02</internalNodes>\n          <leafValues>\n            6.3901998102664948e-02 9.1478300094604492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 -1.4727000147104263e-02</internalNodes>\n          <leafValues>\n            3.6050599813461304e-01 -2.8614500164985657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 4.5007001608610153e-02</internalNodes>\n          <leafValues>\n            -1.5619699656963348e-01 5.3160297870635986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 -1.1330000124871731e-03</internalNodes>\n          <leafValues>\n            1.3422900438308716e-01 -4.4358900189399719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 4.9451000988483429e-02</internalNodes>\n          <leafValues>\n            1.0571800172328949e-01 -2.5589139461517334e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 2.9102999716997147e-02</internalNodes>\n          <leafValues>\n            -1.0088000446557999e-02 -1.1073939800262451e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 3.4786000847816467e-02</internalNodes>\n          <leafValues>\n            -2.7719999197870493e-03 5.6700998544692993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 827 -6.1309998854994774e-03</internalNodes>\n          <leafValues>\n            -4.6889400482177734e-01 1.2636399269104004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 1.5525000169873238e-02</internalNodes>\n          <leafValues>\n            -8.4279999136924744e-03 8.7469202280044556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 2.9249999206513166e-03</internalNodes>\n          <leafValues>\n            -3.4434300661087036e-01 2.0851600170135498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 -5.3571000695228577e-02</internalNodes>\n          <leafValues>\n            1.4982949495315552e+00 5.7328000664710999e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 -1.9217999652028084e-02</internalNodes>\n          <leafValues>\n            -9.9234098196029663e-01 -9.3919998034834862e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 -5.5282998830080032e-02</internalNodes>\n          <leafValues>\n            -5.7682299613952637e-01 1.6860599815845490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 5.6336000561714172e-02</internalNodes>\n          <leafValues>\n            -3.3775001764297485e-02 -1.3889650106430054e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 -2.3824000731110573e-02</internalNodes>\n          <leafValues>\n            4.0182098746299744e-01 1.8360000103712082e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 1.7810000572353601e-03</internalNodes>\n          <leafValues>\n            1.8145999312400818e-01 -4.1743400692939758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 -3.7689000368118286e-02</internalNodes>\n          <leafValues>\n            5.4683101177215576e-01 1.8219999969005585e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -2.4144999682903290e-02</internalNodes>\n          <leafValues>\n            6.8352097272872925e-01 -1.9650200009346008e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>135</maxWeakCount>\n      <stageThreshold>-3.7025990486145020e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 838 2.7444999665021896e-02</internalNodes>\n          <leafValues>\n            -8.9984202384948730e-01 5.1876497268676758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 1.1554100364446640e-01</internalNodes>\n          <leafValues>\n            -5.6524401903152466e-01 7.0551300048828125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 -2.2297000512480736e-02</internalNodes>\n          <leafValues>\n            3.6079999804496765e-01 -6.6864597797393799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 1.3325000181794167e-02</internalNodes>\n          <leafValues>\n            -5.5573397874832153e-01 3.5789999365806580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 -3.8060001097619534e-03</internalNodes>\n          <leafValues>\n            -1.0713000297546387e+00 1.8850000202655792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 -2.6819999329745770e-03</internalNodes>\n          <leafValues>\n            -7.1584302186965942e-01 2.6344498991966248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 3.3819999080151320e-03</internalNodes>\n          <leafValues>\n            -4.6930798888206482e-01 2.6658400893211365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 3.7643000483512878e-02</internalNodes>\n          <leafValues>\n            2.1098700165748596e-01 -1.0804339647293091e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 -1.3861999846994877e-02</internalNodes>\n          <leafValues>\n            6.6912001371383667e-01 -2.7942800521850586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 -2.7350001037120819e-03</internalNodes>\n          <leafValues>\n            -9.5332300662994385e-01 2.4051299691200256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 -3.8336999714374542e-02</internalNodes>\n          <leafValues>\n            8.1432801485061646e-01 -2.4919399619102478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 -3.4697998315095901e-02</internalNodes>\n          <leafValues>\n            1.2330100536346436e+00 6.8600000813603401e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 2.3360999301075935e-02</internalNodes>\n          <leafValues>\n            -3.0794700980186462e-01 7.0714497566223145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 3.5057999193668365e-02</internalNodes>\n          <leafValues>\n            2.1205900609493256e-01 -1.4399830102920532e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 -1.3256999664008617e-02</internalNodes>\n          <leafValues>\n            -9.0260702371597290e-01 4.8610001802444458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 1.2740000151097775e-02</internalNodes>\n          <leafValues>\n            2.2655199468135834e-01 -4.4643801450729370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 3.6400000099092722e-03</internalNodes>\n          <leafValues>\n            -3.9817899465560913e-01 3.4665399789810181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 1.0064700245857239e-01</internalNodes>\n          <leafValues>\n            1.8383599817752838e-01 -1.3410769701004028e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 0.</internalNodes>\n          <leafValues>\n            1.5536400675773621e-01 -5.1582497358322144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 1.1708999983966351e-02</internalNodes>\n          <leafValues>\n            2.1651400625705719e-01 -7.2705197334289551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 -3.5964999347925186e-02</internalNodes>\n          <leafValues>\n            -1.4789500236511230e+00 -2.4317000061273575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 -2.1236000582575798e-02</internalNodes>\n          <leafValues>\n            -1.6844099760055542e-01 1.9526599347591400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 1.4874000102281570e-02</internalNodes>\n          <leafValues>\n            3.7335999310016632e-02 -8.7557297945022583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 -5.1409997977316380e-03</internalNodes>\n          <leafValues>\n            3.3466500043869019e-01 -2.4109700322151184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 2.3450000211596489e-02</internalNodes>\n          <leafValues>\n            5.5320002138614655e-03 -1.2509720325469971e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 -2.5062000378966331e-02</internalNodes>\n          <leafValues>\n            4.5212399959564209e-01 -8.4469996392726898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 -7.7400001464411616e-04</internalNodes>\n          <leafValues>\n            1.5249900519847870e-01 -4.8486500978469849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 -4.0483999997377396e-02</internalNodes>\n          <leafValues>\n            -1.3024920225143433e+00 1.7983500659465790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 2.8170999139547348e-02</internalNodes>\n          <leafValues>\n            -2.4410900473594666e-01 6.2271100282669067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 4.5692998915910721e-02</internalNodes>\n          <leafValues>\n            2.8122000396251678e-02 9.2394399642944336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 3.9707001298666000e-02</internalNodes>\n          <leafValues>\n            -2.2332799434661865e-01 7.7674001455307007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 5.0517000257968903e-02</internalNodes>\n          <leafValues>\n            2.0319999754428864e-01 -1.0895930528640747e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 -1.7266999930143356e-02</internalNodes>\n          <leafValues>\n            6.8598401546478271e-01 -2.3304499685764313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 8.0186001956462860e-02</internalNodes>\n          <leafValues>\n            -1.0292000137269497e-02 6.1881101131439209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 9.7676001489162445e-02</internalNodes>\n          <leafValues>\n            -2.0070299506187439e-01 1.0088349580764771e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 -1.5572000294923782e-02</internalNodes>\n          <leafValues>\n            4.7615298628807068e-01 4.5623999089002609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 -1.5305000357329845e-02</internalNodes>\n          <leafValues>\n            -1.1077369451522827e+00 4.5239999890327454e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 -1.6485000029206276e-02</internalNodes>\n          <leafValues>\n            1.0152939558029175e+00 1.6327999532222748e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 -2.6141999289393425e-02</internalNodes>\n          <leafValues>\n            4.1723299026489258e-01 -2.8645500540733337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 8.8679995387792587e-03</internalNodes>\n          <leafValues>\n            2.1404999494552612e-01 -1.6772800683975220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 -2.6886999607086182e-02</internalNodes>\n          <leafValues>\n            -1.1564220190048218e+00 -1.0324000380933285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 7.7789998613297939e-03</internalNodes>\n          <leafValues>\n            3.5359498858451843e-01 -2.9611301422119141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 -1.5974000096321106e-02</internalNodes>\n          <leafValues>\n            -1.5374109745025635e+00 -2.9958000406622887e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 2.0866999402642250e-02</internalNodes>\n          <leafValues>\n            2.0244100689888000e-01 -7.1270197629928589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 8.5482001304626465e-02</internalNodes>\n          <leafValues>\n            -2.5932999327778816e-02 -1.5156569480895996e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 2.3872999474406242e-02</internalNodes>\n          <leafValues>\n            1.6803400218486786e-01 -3.8806200027465820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 -3.9105001837015152e-02</internalNodes>\n          <leafValues>\n            -1.1958349943161011e+00 -2.0361000671982765e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 -7.7946998178958893e-02</internalNodes>\n          <leafValues>\n            -1.0898950099945068e+00 1.4530299603939056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 -1.6876000910997391e-02</internalNodes>\n          <leafValues>\n            2.8049701452255249e-01 -4.1336300969123840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 1.1875600367784500e-01</internalNodes>\n          <leafValues>\n            -4.3490998446941376e-02 4.1263699531555176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 1.5624199807643890e-01</internalNodes>\n          <leafValues>\n            -2.6429599523544312e-01 5.5127799510955811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 -4.5908000320196152e-02</internalNodes>\n          <leafValues>\n            6.0189199447631836e-01 1.8921000882983208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 -1.0309999808669090e-02</internalNodes>\n          <leafValues>\n            3.8152998685836792e-01 -2.9507899284362793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 9.5769003033638000e-02</internalNodes>\n          <leafValues>\n            1.3246500492095947e-01 -4.6266800165176392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 1.3686999678611755e-02</internalNodes>\n          <leafValues>\n            1.1738699674606323e-01 -5.1664102077484131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 2.3990001063793898e-03</internalNodes>\n          <leafValues>\n            -3.4007599949836731e-01 2.0953500270843506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 3.3264998346567154e-02</internalNodes>\n          <leafValues>\n            -1.7052799463272095e-01 1.4366799592971802e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 -3.3206000924110413e-02</internalNodes>\n          <leafValues>\n            6.1295700073242188e-01 -4.1549999266862869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 2.7979998849332333e-03</internalNodes>\n          <leafValues>\n            -4.8554301261901855e-01 1.3372699916362762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 -6.5792001783847809e-02</internalNodes>\n          <leafValues>\n            -4.0257668495178223e+00 1.0876700282096863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 2.1430000197142363e-03</internalNodes>\n          <leafValues>\n            -3.9179998636245728e-01 2.2427099943161011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 2.2363999858498573e-02</internalNodes>\n          <leafValues>\n            -8.6429998278617859e-02 3.7785199284553528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 -5.7410001754760742e-02</internalNodes>\n          <leafValues>\n            1.1454069614410400e+00 -1.9736599922180176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 6.6550001502037048e-03</internalNodes>\n          <leafValues>\n            -2.1105000749230385e-02 5.8453398942947388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 1.2326999567449093e-02</internalNodes>\n          <leafValues>\n            3.7817001342773438e-02 -6.6987001895904541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 -8.1869997084140778e-03</internalNodes>\n          <leafValues>\n            5.6366002559661865e-01 -7.6877996325492859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 3.6681000143289566e-02</internalNodes>\n          <leafValues>\n            -1.7343300580978394e-01 1.1670149564743042e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 -4.0220400691032410e-01</internalNodes>\n          <leafValues>\n            1.2640819549560547e+00 4.3398998677730560e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 -2.2126000374555588e-02</internalNodes>\n          <leafValues>\n            6.6978102922439575e-01 -2.1605299413204193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 -1.3156999833881855e-02</internalNodes>\n          <leafValues>\n            -4.1198599338531494e-01 2.0215000212192535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 -1.2860000133514404e-02</internalNodes>\n          <leafValues>\n            -9.1582697629928589e-01 3.9232999086380005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 2.1627999842166901e-02</internalNodes>\n          <leafValues>\n            3.8719999138265848e-03 3.5668200254440308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 1.1896000243723392e-02</internalNodes>\n          <leafValues>\n            -3.7303900718688965e-01 1.9235099852085114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 -1.9548999145627022e-02</internalNodes>\n          <leafValues>\n            -4.2374899983406067e-01 2.4429599940776825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 6.4444996416568756e-02</internalNodes>\n          <leafValues>\n            -1.6558900475502014e-01 1.2697030305862427e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 1.0898499935865402e-01</internalNodes>\n          <leafValues>\n            1.4894300699234009e-01 -2.1534640789031982e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 -3.4077998250722885e-02</internalNodes>\n          <leafValues>\n            1.3779460191726685e+00 -1.6198499500751495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 915 -3.7489999085664749e-03</internalNodes>\n          <leafValues>\n            -3.3828601241111755e-01 2.1152900159358978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 -1.0971999727189541e-02</internalNodes>\n          <leafValues>\n            7.6517897844314575e-01 -1.9692599773406982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 -1.1485000140964985e-02</internalNodes>\n          <leafValues>\n            -6.9271200895309448e-01 2.1657100319862366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 2.5984000414609909e-02</internalNodes>\n          <leafValues>\n            -1.1983999982476234e-02 -9.9697297811508179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 4.2159999720752239e-03</internalNodes>\n          <leafValues>\n            -1.0205700248479843e-01 4.8884400725364685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 -4.7697000205516815e-02</internalNodes>\n          <leafValues>\n            1.0666010379791260e+00 -1.7576299607753754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 4.0300001273863018e-04</internalNodes>\n          <leafValues>\n            1.8524800240993500e-01 -7.4790000915527344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 1.1539600044488907e-01</internalNodes>\n          <leafValues>\n            -2.2019700706005096e-01 5.4509997367858887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 1.6021000221371651e-02</internalNodes>\n          <leafValues>\n            2.5487500429153442e-01 -5.0740098953247070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 5.6632000952959061e-02</internalNodes>\n          <leafValues>\n            -1.1256000027060509e-02 -9.5968097448348999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -1.0726000182330608e-02</internalNodes>\n          <leafValues>\n            -2.8544700145721436e-01 1.6994799673557281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 1.2420000135898590e-01</internalNodes>\n          <leafValues>\n            -3.6139998584985733e-02 -1.3132710456848145e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 -5.3799999877810478e-03</internalNodes>\n          <leafValues>\n            3.3092701435089111e-01 1.3307999819517136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 1.1908000335097313e-02</internalNodes>\n          <leafValues>\n            -3.4830299019813538e-01 2.4041900038719177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 -4.3007999658584595e-02</internalNodes>\n          <leafValues>\n            -1.4390469789505005e+00 1.5599599480628967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 -3.3149998635053635e-02</internalNodes>\n          <leafValues>\n            -1.1805850267410278e+00 -1.2347999960184097e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 -2.1341999992728233e-02</internalNodes>\n          <leafValues>\n            2.2119441032409668e+00 6.2737002968788147e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 -1.2218999676406384e-02</internalNodes>\n          <leafValues>\n            -1.8709750175476074e+00 -4.5499999076128006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 -1.6860999166965485e-02</internalNodes>\n          <leafValues>\n            -7.6912701129913330e-01 1.5330000221729279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 -2.4999999441206455e-03</internalNodes>\n          <leafValues>\n            -6.2987399101257324e-01 5.1600001752376556e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 -4.5037999749183655e-02</internalNodes>\n          <leafValues>\n            8.5428899526596069e-01 6.2600001692771912e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 3.9057999849319458e-02</internalNodes>\n          <leafValues>\n            -3.2458998262882233e-02 -1.3325669765472412e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 6.6720000468194485e-03</internalNodes>\n          <leafValues>\n            -1.9423599541187286e-01 3.7328699231147766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 -1.6361000016331673e-02</internalNodes>\n          <leafValues>\n            2.0605869293212891e+00 -1.5042699873447418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 6.1719999648630619e-03</internalNodes>\n          <leafValues>\n            -1.1610999703407288e-01 2.5455400347709656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 4.5722000300884247e-02</internalNodes>\n          <leafValues>\n            -1.6340000554919243e-02 -1.0449140071868896e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 4.1209999471902847e-03</internalNodes>\n          <leafValues>\n            -4.1997998952865601e-02 3.9680999517440796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 -1.7800000205170363e-04</internalNodes>\n          <leafValues>\n            -6.6422599554061890e-01 3.3443000167608261e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 7.1109998971223831e-03</internalNodes>\n          <leafValues>\n            -5.8231998234987259e-02 3.7857300043106079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 -4.9864001572132111e-02</internalNodes>\n          <leafValues>\n            6.1019402742385864e-01 -2.1005700528621674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 -2.5011999532580376e-02</internalNodes>\n          <leafValues>\n            -5.7100099325180054e-01 1.7848399281501770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 3.0939999967813492e-02</internalNodes>\n          <leafValues>\n            5.6363001465797424e-02 -6.4731001853942871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 4.6271000057458878e-02</internalNodes>\n          <leafValues>\n            1.7482399940490723e-01 -9.8909401893615723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 -3.1870000530034304e-03</internalNodes>\n          <leafValues>\n            -6.6804802417755127e-01 3.2267000526189804e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 -2.4351999163627625e-02</internalNodes>\n          <leafValues>\n            2.9444900155067444e-01 -1.3599999947473407e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 1.1974000371992588e-02</internalNodes>\n          <leafValues>\n            -2.8345099091529846e-01 4.7171199321746826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 1.3070000335574150e-02</internalNodes>\n          <leafValues>\n            -1.0834600031375885e-01 5.7193297147750854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 5.9163000434637070e-02</internalNodes>\n          <leafValues>\n            -5.0939001142978668e-02 -1.9059720039367676e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 -4.1094999760389328e-02</internalNodes>\n          <leafValues>\n            4.5104598999023438e-01 -9.7599998116493225e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 -8.3989001810550690e-02</internalNodes>\n          <leafValues>\n            -2.0349199771881104e+00 -5.1019001752138138e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 4.4619001448154449e-02</internalNodes>\n          <leafValues>\n            1.7041100561618805e-01 -1.2278720140457153e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 2.4419000372290611e-02</internalNodes>\n          <leafValues>\n            -2.1796999499201775e-02 -1.0822949409484863e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 -4.3870001100003719e-03</internalNodes>\n          <leafValues>\n            3.0466699600219727e-01 -3.7066599726676941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 2.4607999250292778e-02</internalNodes>\n          <leafValues>\n            -3.1169500946998596e-01 2.3657299578189850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 -8.5182003676891327e-02</internalNodes>\n          <leafValues>\n            -1.7982350587844849e+00 1.5254299342632294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 2.1844999864697456e-02</internalNodes>\n          <leafValues>\n            -5.1888000220060349e-02 -1.9017189741134644e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 -1.6829000785946846e-02</internalNodes>\n          <leafValues>\n            2.1025900542736053e-01 2.1656999364495277e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 3.2547999173402786e-02</internalNodes>\n          <leafValues>\n            -2.0292599499225616e-01 6.0944002866744995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 2.4709999561309814e-03</internalNodes>\n          <leafValues>\n            -9.5371198654174805e-01 1.8568399548530579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 5.5415999144315720e-02</internalNodes>\n          <leafValues>\n            -1.4405299723148346e-01 2.1506340503692627e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 -1.0635499656200409e-01</internalNodes>\n          <leafValues>\n            -1.0911970138549805e+00 1.3228000700473785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 -7.9889995977282524e-03</internalNodes>\n          <leafValues>\n            1.0253400355577469e-01 -5.1744902133941650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 7.5567997992038727e-02</internalNodes>\n          <leafValues>\n            5.8965001255273819e-02 1.2354209423065186e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 -9.2805996537208557e-02</internalNodes>\n          <leafValues>\n            -1.3431650400161743e+00 -3.4462999552488327e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 4.9431998282670975e-02</internalNodes>\n          <leafValues>\n            4.9601998180150986e-02 1.6054730415344238e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 -1.1772999539971352e-02</internalNodes>\n          <leafValues>\n            -1.0261050462722778e+00 -4.1559999808669090e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 8.5886001586914062e-02</internalNodes>\n          <leafValues>\n            8.4642998874187469e-02 9.5220798254013062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 8.1031002104282379e-02</internalNodes>\n          <leafValues>\n            -1.4687100052833557e-01 1.9359990358352661e+00</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>136</maxWeakCount>\n      <stageThreshold>-3.4265899658203125e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 973 -3.3840999007225037e-02</internalNodes>\n          <leafValues>\n            6.5889501571655273e-01 -6.9755297899246216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 1.5410000458359718e-02</internalNodes>\n          <leafValues>\n            -9.0728402137756348e-01 3.0478599667549133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 5.4905999451875687e-02</internalNodes>\n          <leafValues>\n            -4.9774798750877380e-01 5.7132601737976074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 2.1390000358223915e-02</internalNodes>\n          <leafValues>\n            -4.2565199732780457e-01 5.8096802234649658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 977 7.8849997371435165e-03</internalNodes>\n          <leafValues>\n            -4.7905999422073364e-01 4.3016499280929565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 -3.7544999271631241e-02</internalNodes>\n          <leafValues>\n            5.0861597061157227e-01 -1.9985899329185486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 1.5925799310207367e-01</internalNodes>\n          <leafValues>\n            -2.3263600468635559e-01 1.0993319749832153e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 -6.8939998745918274e-02</internalNodes>\n          <leafValues>\n            4.0569001436233521e-01 5.6855000555515289e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 -3.3695001155138016e-02</internalNodes>\n          <leafValues>\n            4.5132800936698914e-01 -3.3332800865173340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 -6.3314996659755707e-02</internalNodes>\n          <leafValues>\n            -8.5015702247619629e-01 2.2341699898242950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 7.3699997738003731e-03</internalNodes>\n          <leafValues>\n            -9.3082201480865479e-01 5.9216998517513275e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 -9.5969997346401215e-03</internalNodes>\n          <leafValues>\n            -1.2794899940490723e+00 1.8447299301624298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 -1.3067999482154846e-01</internalNodes>\n          <leafValues>\n            5.8426898717880249e-01 -2.6007199287414551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 5.7402998208999634e-02</internalNodes>\n          <leafValues>\n            -5.3789000958204269e-02 7.1175599098205566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 -7.2340001352131367e-03</internalNodes>\n          <leafValues>\n            -8.6962199211120605e-01 7.5214996933937073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 3.1098999083042145e-02</internalNodes>\n          <leafValues>\n            -7.5006999075412750e-02 9.0781599283218384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 3.5854000598192215e-02</internalNodes>\n          <leafValues>\n            -2.4795499444007874e-01 7.2272098064422607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 990 -3.1534999608993530e-02</internalNodes>\n          <leafValues>\n            -1.1238329410552979e+00 2.0988300442695618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 991 -1.9437000155448914e-02</internalNodes>\n          <leafValues>\n            -1.4499390125274658e+00 -1.5100000426173210e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 992 -7.2420001961290836e-03</internalNodes>\n          <leafValues>\n            5.3864902257919312e-01 -1.1375399678945541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 993 8.1639997661113739e-03</internalNodes>\n          <leafValues>\n            6.6889002919197083e-02 -7.6872897148132324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 994 -4.3653000146150589e-02</internalNodes>\n          <leafValues>\n            1.1413530111312866e+00 4.0217000991106033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 995 2.6569999754428864e-02</internalNodes>\n          <leafValues>\n            -2.4719099700450897e-01 5.9295099973678589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 996 3.2216999679803848e-02</internalNodes>\n          <leafValues>\n            -4.0024999529123306e-02 3.2688000798225403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 997 -7.2236001491546631e-02</internalNodes>\n          <leafValues>\n            5.8729398250579834e-01 -2.5396001338958740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 998 3.1424999237060547e-02</internalNodes>\n          <leafValues>\n            1.5315100550651550e-01 -5.6042098999023438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 999 -4.7699999413453043e-04</internalNodes>\n          <leafValues>\n            1.6958899796009064e-01 -5.2626699209213257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1000 2.7189999818801880e-03</internalNodes>\n          <leafValues>\n            -1.4944599568843842e-01 2.9658699035644531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1001 3.2875001430511475e-02</internalNodes>\n          <leafValues>\n            -3.9943501353263855e-01 2.5156599283218384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1002 -1.4553000219166279e-02</internalNodes>\n          <leafValues>\n            2.7972599864006042e-01 -4.7203800082206726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1003 3.8017999380826950e-02</internalNodes>\n          <leafValues>\n            -2.9200001154094934e-03 -1.1300059556961060e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1004 2.8659999370574951e-03</internalNodes>\n          <leafValues>\n            4.1111800074577332e-01 -2.6220801472663879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1005 -4.1606999933719635e-02</internalNodes>\n          <leafValues>\n            -1.4293819665908813e+00 -1.9132999703288078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1006 -2.4802999570965767e-02</internalNodes>\n          <leafValues>\n            -2.5013598799705505e-01 1.5978699922561646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1007 1.0098000057041645e-02</internalNodes>\n          <leafValues>\n            4.3738998472690582e-02 -6.9986099004745483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1008 -2.0947000011801720e-02</internalNodes>\n          <leafValues>\n            -9.4137799739837646e-01 2.3204000294208527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1009 2.2458000108599663e-02</internalNodes>\n          <leafValues>\n            -2.7185800671577454e-01 4.5319199562072754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1010 -3.7110999226570129e-02</internalNodes>\n          <leafValues>\n            -1.0314660072326660e+00 1.4421799778938293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1011 -1.0648000054061413e-02</internalNodes>\n          <leafValues>\n            6.3107001781463623e-01 -2.5520798563957214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1012 5.5422998964786530e-02</internalNodes>\n          <leafValues>\n            1.6206599771976471e-01 -1.7722640037536621e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1013 2.1601999178528786e-02</internalNodes>\n          <leafValues>\n            -2.5016099214553833e-01 5.4119801521301270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1014 8.7000000348780304e-05</internalNodes>\n          <leafValues>\n            -2.9008901119232178e-01 3.3507999777793884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1015 1.4406000263988972e-02</internalNodes>\n          <leafValues>\n            -7.8840004280209541e-03 -1.1677219867706299e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1016 1.0777399688959122e-01</internalNodes>\n          <leafValues>\n            1.1292000114917755e-01 -2.4940319061279297e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1017 3.5943999886512756e-02</internalNodes>\n          <leafValues>\n            -1.9480599462985992e-01 9.5757502317428589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1018 -3.9510000497102737e-03</internalNodes>\n          <leafValues>\n            3.0927801132202148e-01 -2.5530201196670532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1019 2.0942000672221184e-02</internalNodes>\n          <leafValues>\n            -7.6319999061524868e-03 -1.0086350440979004e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1020 -2.9877999797463417e-02</internalNodes>\n          <leafValues>\n            -4.6027699112892151e-01 1.9507199525833130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1021 2.5971999391913414e-02</internalNodes>\n          <leafValues>\n            -1.2187999673187733e-02 -1.0035500526428223e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1022 1.0603000409901142e-02</internalNodes>\n          <leafValues>\n            -7.5969003140926361e-02 4.1669899225234985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1023 8.5819996893405914e-03</internalNodes>\n          <leafValues>\n            -2.6648598909378052e-01 3.9111500978469849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1024 2.1270999684929848e-02</internalNodes>\n          <leafValues>\n            1.8273900449275970e-01 -3.6052298545837402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1025 7.4518002569675446e-02</internalNodes>\n          <leafValues>\n            -1.8938399851322174e-01 9.2658001184463501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1026 4.6569998376071453e-03</internalNodes>\n          <leafValues>\n            -1.4506199955940247e-01 3.3294600248336792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1027 1.7119999974966049e-03</internalNodes>\n          <leafValues>\n            -5.2464002370834351e-01 8.9879997074604034e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1028 9.8500004969537258e-04</internalNodes>\n          <leafValues>\n            -3.8381999731063843e-01 2.4392999708652496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1029 2.8233999386429787e-02</internalNodes>\n          <leafValues>\n            -5.7879998348653316e-03 -1.2617139816284180e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1030 -3.2678000628948212e-02</internalNodes>\n          <leafValues>\n            -5.7953298091888428e-01 1.6955299675464630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1031 2.2536000236868858e-02</internalNodes>\n          <leafValues>\n            2.2281000390648842e-02 -8.7869602441787720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1032 -2.1657999604940414e-02</internalNodes>\n          <leafValues>\n            -6.5108501911163330e-01 1.2966899573802948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1033 7.6799998059868813e-03</internalNodes>\n          <leafValues>\n            -3.3965200185775757e-01 2.2013300657272339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1034 1.4592000283300877e-02</internalNodes>\n          <leafValues>\n            1.5077300369739532e-01 -5.0452399253845215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1035 2.7868000790476799e-02</internalNodes>\n          <leafValues>\n            -2.5045299530029297e-01 4.5741999149322510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1036 5.6940000504255295e-03</internalNodes>\n          <leafValues>\n            -1.0948500037193298e-01 5.5757802724838257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1037 -1.0002999566495419e-02</internalNodes>\n          <leafValues>\n            -9.7366297245025635e-01 1.8467999994754791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1038 -4.0719998069107533e-03</internalNodes>\n          <leafValues>\n            3.8222199678421021e-01 -1.6921100020408630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1039 -2.2593999281525612e-02</internalNodes>\n          <leafValues>\n            -1.0391089916229248e+00 5.1839998923242092e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1040 -3.9579998701810837e-02</internalNodes>\n          <leafValues>\n            -5.5109229087829590e+00 1.1163999885320663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1041 -1.7537999898195267e-02</internalNodes>\n          <leafValues>\n            9.5485800504684448e-01 -1.8584500253200531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1042 9.0300003066658974e-03</internalNodes>\n          <leafValues>\n            1.0436000302433968e-02 8.2114797830581665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1043 -7.9539995640516281e-03</internalNodes>\n          <leafValues>\n            2.2632899880409241e-01 -3.4568199515342712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1044 2.7091000229120255e-02</internalNodes>\n          <leafValues>\n            1.6430099308490753e-01 -1.3926379680633545e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1045 -2.0625999197363853e-02</internalNodes>\n          <leafValues>\n            -8.6366099119186401e-01 2.3880000226199627e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1046 -7.1989998221397400e-02</internalNodes>\n          <leafValues>\n            -2.8192629814147949e+00 1.1570499837398529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1047 -2.6964999735355377e-02</internalNodes>\n          <leafValues>\n            -1.2946130037307739e+00 -2.4661000818014145e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1048 -4.7377999871969223e-02</internalNodes>\n          <leafValues>\n            -8.1306397914886475e-01 1.1831399798393250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1049 -1.0895600169897079e-01</internalNodes>\n          <leafValues>\n            6.5937900543212891e-01 -2.0843900740146637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1050 1.3574000447988510e-02</internalNodes>\n          <leafValues>\n            7.4240001849830151e-03 5.3152197599411011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1051 -6.6920001991093159e-03</internalNodes>\n          <leafValues>\n            3.0655801296234131e-01 -3.1084299087524414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1052 -3.9070001803338528e-03</internalNodes>\n          <leafValues>\n            2.5576499104499817e-01 -5.2932001650333405e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1053 -3.7613000720739365e-02</internalNodes>\n          <leafValues>\n            -1.4350049495697021e+00 -1.5448000282049179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1054 8.6329998448491096e-03</internalNodes>\n          <leafValues>\n            -1.6884399950504303e-01 4.2124900221824646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1055 -3.2097000628709793e-02</internalNodes>\n          <leafValues>\n            -6.4979398250579834e-01 4.1110001504421234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1056 5.8495998382568359e-02</internalNodes>\n          <leafValues>\n            -5.2963998168706894e-02 6.3368302583694458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1057 -4.0901999920606613e-02</internalNodes>\n          <leafValues>\n            -9.2101097106933594e-01 9.0640000998973846e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1058 -1.9925000146031380e-02</internalNodes>\n          <leafValues>\n            5.3759998083114624e-01 -6.2996998429298401e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1059 -4.6020001173019409e-03</internalNodes>\n          <leafValues>\n            -5.4333502054214478e-01 8.4104999899864197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1060 1.6824999824166298e-02</internalNodes>\n          <leafValues>\n            1.5563699603080750e-01 -4.0171200037002563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1061 9.4790002331137657e-03</internalNodes>\n          <leafValues>\n            -2.4245299398899078e-01 5.1509499549865723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1062 -1.9534999504685402e-02</internalNodes>\n          <leafValues>\n            -5.1118397712707520e-01 1.3831999897956848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1063 1.0746000334620476e-02</internalNodes>\n          <leafValues>\n            -2.1854999661445618e-01 6.2828701734542847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1064 3.7927001714706421e-02</internalNodes>\n          <leafValues>\n            1.1640299856662750e-01 -2.7301959991455078e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1065 1.6390999779105186e-02</internalNodes>\n          <leafValues>\n            -1.4635999687016010e-02 -1.0797250270843506e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1066 -1.9785000011324883e-02</internalNodes>\n          <leafValues>\n            1.2166420221328735e+00 3.3275000751018524e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1067 1.1067000217735767e-02</internalNodes>\n          <leafValues>\n            -2.5388300418853760e-01 4.4038599729537964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1068 5.2479999139904976e-03</internalNodes>\n          <leafValues>\n            2.2496800124645233e-01 -2.4216499924659729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1069 -1.1141999624669552e-02</internalNodes>\n          <leafValues>\n            2.5018098950386047e-01 -3.0811500549316406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1070 -1.0666999965906143e-02</internalNodes>\n          <leafValues>\n            -3.2729101181030273e-01 2.6168298721313477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1071 1.0545299947261810e-01</internalNodes>\n          <leafValues>\n            -5.5750001221895218e-02 -1.9605729579925537e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1072 5.4827999323606491e-02</internalNodes>\n          <leafValues>\n            -1.9519999623298645e-03 7.3866099119186401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1073 1.7760999500751495e-02</internalNodes>\n          <leafValues>\n            -3.0647200345993042e-01 2.6346999406814575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1074 -3.1185999512672424e-02</internalNodes>\n          <leafValues>\n            -2.4600900709629059e-01 1.7082199454307556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1075 -5.7296000421047211e-02</internalNodes>\n          <leafValues>\n            4.7033500671386719e-01 -2.6048299670219421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1076 -1.1312000453472137e-02</internalNodes>\n          <leafValues>\n            3.8628900051116943e-01 -2.8817000985145569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1077 3.0592000111937523e-02</internalNodes>\n          <leafValues>\n            -4.8826001584529877e-02 -1.7638969421386719e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1078 1.8489999929443002e-03</internalNodes>\n          <leafValues>\n            2.1099899709224701e-01 -2.5940999388694763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1079 1.1419000104069710e-02</internalNodes>\n          <leafValues>\n            -1.6829599440097809e-01 1.0278660058975220e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1080 8.1403002142906189e-02</internalNodes>\n          <leafValues>\n            1.1531999707221985e-01 -1.2482399940490723e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1081 5.3495999425649643e-02</internalNodes>\n          <leafValues>\n            -4.6303998678922653e-02 -1.7165969610214233e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1082 -2.3948000743985176e-02</internalNodes>\n          <leafValues>\n            -4.0246599912643433e-01 2.0562100410461426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1083 6.7690000869333744e-03</internalNodes>\n          <leafValues>\n            -3.3152300119400024e-01 2.0683400332927704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1084 -3.2343998551368713e-02</internalNodes>\n          <leafValues>\n            -7.2632801532745361e-01 2.0073500275611877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1085 3.7863001227378845e-02</internalNodes>\n          <leafValues>\n            -1.5631000697612762e-01 1.6697460412979126e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1086 1.5440000221133232e-02</internalNodes>\n          <leafValues>\n            1.9487400352954865e-01 -3.5384199023246765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1087 -4.4376000761985779e-02</internalNodes>\n          <leafValues>\n            8.2093602418899536e-01 -1.8193599581718445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1088 -2.3102000355720520e-02</internalNodes>\n          <leafValues>\n            -4.3044099211692810e-01 1.2375400215387344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1089 1.9400000572204590e-02</internalNodes>\n          <leafValues>\n            -2.9726000502705574e-02 -1.1597590446472168e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1090 1.0385700315237045e-01</internalNodes>\n          <leafValues>\n            1.1149899661540985e-01 -4.6835222244262695e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1091 -1.8964000046253204e-02</internalNodes>\n          <leafValues>\n            2.1773819923400879e+00 -1.4544400572776794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1092 3.8750998675823212e-02</internalNodes>\n          <leafValues>\n            -4.9446001648902893e-02 3.4018298983573914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1093 2.2766999900341034e-02</internalNodes>\n          <leafValues>\n            -3.2802999019622803e-01 3.0531400442123413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1094 -3.1357001513242722e-02</internalNodes>\n          <leafValues>\n            1.1520819664001465e+00 2.7305999770760536e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1095 9.6909999847412109e-03</internalNodes>\n          <leafValues>\n            -3.8799500465393066e-01 2.1512599289417267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1096 -4.9284998327493668e-02</internalNodes>\n          <leafValues>\n            -1.6774909496307373e+00 1.5774199366569519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1097 -3.9510998874902725e-02</internalNodes>\n          <leafValues>\n            -9.7647899389266968e-01 -1.0552000254392624e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1098 4.7997999936342239e-02</internalNodes>\n          <leafValues>\n            2.0843900740146637e-01 -6.8992799520492554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1099 5.1422998309135437e-02</internalNodes>\n          <leafValues>\n            -1.6665300726890564e-01 1.2149239778518677e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1100 1.4279999770224094e-02</internalNodes>\n          <leafValues>\n            2.3627699911594391e-01 -4.1396799683570862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1101 -9.1611996293067932e-02</internalNodes>\n          <leafValues>\n            -9.2830902338027954e-01 -1.8345000222325325e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1102 6.5080001950263977e-03</internalNodes>\n          <leafValues>\n            -7.3647201061248779e-01 1.9497099518775940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1103 3.5723000764846802e-02</internalNodes>\n          <leafValues>\n            1.4197799563407898e-01 -4.2089301347732544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1104 5.0638001412153244e-02</internalNodes>\n          <leafValues>\n            1.1644000187516212e-02 7.8486597537994385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1105 -1.4613999985158443e-02</internalNodes>\n          <leafValues>\n            -1.1909500360488892e+00 -3.5128001123666763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1106 -3.8662999868392944e-02</internalNodes>\n          <leafValues>\n            2.4314730167388916e+00 6.5647996962070465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1107 -4.0346998721361160e-02</internalNodes>\n          <leafValues>\n            7.1755301952362061e-01 -1.9108299911022186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1108 2.3902000859379768e-02</internalNodes>\n          <leafValues>\n            1.5646199882030487e-01 -7.9294800758361816e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>137</maxWeakCount>\n      <stageThreshold>-3.5125269889831543e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1109 8.5640000179409981e-03</internalNodes>\n          <leafValues>\n            -8.1450700759887695e-01 5.8875298500061035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1110 -1.3292600214481354e-01</internalNodes>\n          <leafValues>\n            9.3213397264480591e-01 -2.9367300868034363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1111 9.8400004208087921e-03</internalNodes>\n          <leafValues>\n            -5.6462901830673218e-01 4.1647699475288391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1112 5.0889998674392700e-03</internalNodes>\n          <leafValues>\n            -7.9232800006866455e-01 1.6975000500679016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1113 -6.1039000749588013e-02</internalNodes>\n          <leafValues>\n            -1.4169000387191772e+00 2.5020999833941460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1114 -4.6599999768659472e-04</internalNodes>\n          <leafValues>\n            3.7982499599456787e-01 -4.1567099094390869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1115 3.3889999613165855e-03</internalNodes>\n          <leafValues>\n            -4.0768599510192871e-01 3.5548499226570129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1116 2.1006999537348747e-02</internalNodes>\n          <leafValues>\n            -2.4080100655555725e-01 8.6112701892852783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1117 7.5559997931122780e-03</internalNodes>\n          <leafValues>\n            -8.7467199563980103e-01 9.8572000861167908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1118 2.4779999628663063e-02</internalNodes>\n          <leafValues>\n            1.5566200017929077e-01 -6.9229799509048462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1119 -3.5620000213384628e-02</internalNodes>\n          <leafValues>\n            -1.1472270488739014e+00 3.6359999328851700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1120 1.9810000434517860e-02</internalNodes>\n          <leafValues>\n            1.5516200661659241e-01 -6.9520097970962524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1121 1.5019999817013741e-02</internalNodes>\n          <leafValues>\n            4.1990000754594803e-02 -9.6622800827026367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1122 -2.3137999698519707e-02</internalNodes>\n          <leafValues>\n            4.3396899104118347e-01 2.4160000029951334e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1123 -1.8743000924587250e-02</internalNodes>\n          <leafValues>\n            4.3481099605560303e-01 -3.2522499561309814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1124 4.5080000162124634e-01</internalNodes>\n          <leafValues>\n            -9.4573996961116791e-02 7.2421300411224365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1125 1.1854999698698521e-02</internalNodes>\n          <leafValues>\n            -3.8133099675178528e-01 3.0098399519920349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1126 -2.4830000475049019e-02</internalNodes>\n          <leafValues>\n            8.9300602674484253e-01 -1.0295899957418442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1127 -4.4743001461029053e-02</internalNodes>\n          <leafValues>\n            8.6280298233032227e-01 -2.1716499328613281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1128 -1.4600000344216824e-02</internalNodes>\n          <leafValues>\n            6.0069400072097778e-01 -1.5906299650669098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1129 -2.4527000263333321e-02</internalNodes>\n          <leafValues>\n            -1.5872869491577148e+00 -2.1817000582814217e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1130 2.3024000227451324e-02</internalNodes>\n          <leafValues>\n            1.6853399574756622e-01 -3.8106900453567505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1131 -2.4917000904679298e-02</internalNodes>\n          <leafValues>\n            5.0810897350311279e-01 -2.7279898524284363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1132 1.0130000300705433e-03</internalNodes>\n          <leafValues>\n            -4.3138799071311951e-01 2.6438099145889282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1133 1.5603000298142433e-02</internalNodes>\n          <leafValues>\n            -3.1624200940132141e-01 5.5715900659561157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1134 -2.6685999706387520e-02</internalNodes>\n          <leafValues>\n            1.0553920269012451e+00 2.9074000194668770e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1135 1.3940000208094716e-03</internalNodes>\n          <leafValues>\n            -7.1873801946640015e-01 6.5390996634960175e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1136 -6.4799998654052615e-04</internalNodes>\n          <leafValues>\n            2.4884399771690369e-01 -2.0978200435638428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1137 -3.1888000667095184e-02</internalNodes>\n          <leafValues>\n            -6.8844497203826904e-01 6.3589997589588165e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1138 -4.9290000461041927e-03</internalNodes>\n          <leafValues>\n            -5.9152501821517944e-01 2.7943599224090576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1139 3.1168000772595406e-02</internalNodes>\n          <leafValues>\n            4.5223999768495560e-02 -8.8639199733734131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1140 -3.3663000911474228e-02</internalNodes>\n          <leafValues>\n            -6.1590200662612915e-01 1.5749299526214600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1141 1.1966999620199203e-02</internalNodes>\n          <leafValues>\n            -3.0606698989868164e-01 4.2293301224708557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1142 -3.4680001437664032e-02</internalNodes>\n          <leafValues>\n            -1.3734940290451050e+00 1.5908700227737427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1143 9.9290004000067711e-03</internalNodes>\n          <leafValues>\n            -5.5860197544097900e-01 1.2119200080633163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1144 5.9574998915195465e-02</internalNodes>\n          <leafValues>\n            4.9720001406967640e-03 8.2055401802062988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1145 -6.5428003668785095e-02</internalNodes>\n          <leafValues>\n            1.5651429891586304e+00 -1.6817499697208405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1146 -9.2895999550819397e-02</internalNodes>\n          <leafValues>\n            -1.5794529914855957e+00 1.4661799371242523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1147 -4.1184000670909882e-02</internalNodes>\n          <leafValues>\n            -1.5518720149993896e+00 -2.9969999566674232e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1148 2.1447999402880669e-02</internalNodes>\n          <leafValues>\n            1.7196300625801086e-01 -6.9343197345733643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1149 -2.5569999590516090e-02</internalNodes>\n          <leafValues>\n            -1.3061310052871704e+00 -2.4336999282240868e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1150 -4.1200999170541763e-02</internalNodes>\n          <leafValues>\n            -1.3821059465408325e+00 1.4801800251007080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1151 -1.7668999731540680e-02</internalNodes>\n          <leafValues>\n            -7.0889997482299805e-01 3.6524001508951187e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1152 9.0060001239180565e-03</internalNodes>\n          <leafValues>\n            -4.0913999080657959e-02 8.0373102426528931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1153 -1.1652999557554722e-02</internalNodes>\n          <leafValues>\n            5.7546800374984741e-01 -2.4991700053215027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1154 -7.4780001305043697e-03</internalNodes>\n          <leafValues>\n            -4.9280899763107300e-01 1.9810900092124939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1155 8.5499999113380909e-04</internalNodes>\n          <leafValues>\n            -4.8858100175857544e-01 1.3563099503517151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1156 -3.0538000166416168e-02</internalNodes>\n          <leafValues>\n            -6.0278397798538208e-01 1.8522000312805176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1157 -1.8846999853849411e-02</internalNodes>\n          <leafValues>\n            2.3565599322319031e-01 -3.5136300325393677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1158 -8.1129996106028557e-03</internalNodes>\n          <leafValues>\n            -8.1304997205734253e-02 2.1069599688053131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1159 -3.4830000251531601e-02</internalNodes>\n          <leafValues>\n            -1.2065670490264893e+00 -1.4251999557018280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1160 1.9021000713109970e-02</internalNodes>\n          <leafValues>\n            2.3349900543689728e-01 -4.5664900541305542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1161 -1.9004000350832939e-02</internalNodes>\n          <leafValues>\n            -8.1075799465179443e-01 1.3140000402927399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1162 -8.9057996869087219e-02</internalNodes>\n          <leafValues>\n            6.1542397737503052e-01 3.2983001321554184e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1163 6.8620000965893269e-03</internalNodes>\n          <leafValues>\n            -2.9583099484443665e-01 2.7003699541091919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1164 -2.8240999206900597e-02</internalNodes>\n          <leafValues>\n            -6.1102700233459473e-01 1.7357499897480011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1165 -3.2099999953061342e-04</internalNodes>\n          <leafValues>\n            -5.3322899341583252e-01 6.8539001047611237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1166 -1.0829100012779236e-01</internalNodes>\n          <leafValues>\n            -1.2879559993743896e+00 1.1801700294017792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1167 1.5878999605774879e-02</internalNodes>\n          <leafValues>\n            -1.7072600126266479e-01 1.1103910207748413e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1168 8.6859995499253273e-03</internalNodes>\n          <leafValues>\n            -1.0995099693536758e-01 4.6010500192642212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1169 -2.5234999135136604e-02</internalNodes>\n          <leafValues>\n            1.0220669507980347e+00 -1.8694299459457397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1170 -1.3508999720215797e-02</internalNodes>\n          <leafValues>\n            -7.8316599130630493e-01 1.4202600717544556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1171 -7.7149998396635056e-03</internalNodes>\n          <leafValues>\n            -8.8060700893402100e-01 1.1060000397264957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1172 7.1580000221729279e-02</internalNodes>\n          <leafValues>\n            1.1369399726390839e-01 -1.1032789945602417e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1173 -1.3554000295698643e-02</internalNodes>\n          <leafValues>\n            -8.1096500158309937e-01 3.4080001059919596e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1174 2.9450000729411840e-03</internalNodes>\n          <leafValues>\n            -7.2879999876022339e-02 3.4998100996017456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1175 -5.0833001732826233e-02</internalNodes>\n          <leafValues>\n            -1.2868590354919434e+00 -2.8842000290751457e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1176 -8.7989997118711472e-03</internalNodes>\n          <leafValues>\n            4.7613599896430969e-01 -1.4690400660037994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1177 2.1424399316310883e-01</internalNodes>\n          <leafValues>\n            -5.9702001512050629e-02 -2.4802260398864746e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1178 1.3962999917566776e-02</internalNodes>\n          <leafValues>\n            1.7420299351215363e-01 -4.3911001086235046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1179 4.2502000927925110e-02</internalNodes>\n          <leafValues>\n            -1.9965299963951111e-01 7.0654797554016113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1180 1.9827999174594879e-02</internalNodes>\n          <leafValues>\n            -6.9136001169681549e-02 6.1643397808074951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1181 -3.3560000360012054e-02</internalNodes>\n          <leafValues>\n            -1.2740780115127563e+00 -2.5673000141978264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1182 6.3542999327182770e-02</internalNodes>\n          <leafValues>\n            1.2403500080108643e-01 -1.0776289701461792e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1183 2.1933000534772873e-02</internalNodes>\n          <leafValues>\n            1.4952000230550766e-02 -7.1023499965667725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1184 -7.8424997627735138e-02</internalNodes>\n          <leafValues>\n            6.2033998966217041e-01 3.3610999584197998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1185 1.4390000142157078e-02</internalNodes>\n          <leafValues>\n            -3.6324599385261536e-01 1.7308300733566284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1186 -6.7309997975826263e-02</internalNodes>\n          <leafValues>\n            5.2374100685119629e-01 1.2799999676644802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1187 1.3047499954700470e-01</internalNodes>\n          <leafValues>\n            -1.7122499644756317e-01 1.1235200166702271e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1188 -4.6245999634265900e-02</internalNodes>\n          <leafValues>\n            -1.1908329725265503e+00 1.7425599694252014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1189 -2.9842000454664230e-02</internalNodes>\n          <leafValues>\n            8.3930599689483643e-01 -1.8064199388027191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1190 -3.8099999073892832e-04</internalNodes>\n          <leafValues>\n            3.5532799363136292e-01 -2.3842300474643707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1191 -2.2378999739885330e-02</internalNodes>\n          <leafValues>\n            -8.7943899631500244e-01 -7.8399997437372804e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1192 -1.5569999814033508e-03</internalNodes>\n          <leafValues>\n            -1.4253300428390503e-01 2.5876200199127197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1193 1.2013000436127186e-02</internalNodes>\n          <leafValues>\n            -2.9015499353408813e-01 2.6051101088523865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1194 2.4384999647736549e-02</internalNodes>\n          <leafValues>\n            -3.1438998878002167e-02 5.8695900440216064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1195 -4.7180999070405960e-02</internalNodes>\n          <leafValues>\n            6.9430100917816162e-01 -2.1816100180149078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1196 -2.4893999099731445e-02</internalNodes>\n          <leafValues>\n            -6.4599299430847168e-01 1.5611599385738373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1197 2.1944999694824219e-02</internalNodes>\n          <leafValues>\n            -2.7742000296711922e-02 -1.1346880197525024e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1198 1.8809899687767029e-01</internalNodes>\n          <leafValues>\n            -1.0076000355184078e-02 1.2429029941558838e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1199 -7.7872000634670258e-02</internalNodes>\n          <leafValues>\n            8.5008001327514648e-01 -1.9015499949455261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1200 -4.8769000917673111e-02</internalNodes>\n          <leafValues>\n            -2.0763080120086670e+00 1.2179400026798248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1201 -1.7115000635385513e-02</internalNodes>\n          <leafValues>\n            -8.5687297582626343e-01 7.8760003671050072e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1202 -2.7499999850988388e-03</internalNodes>\n          <leafValues>\n            3.8645499944686890e-01 -1.1391499638557434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1203 -9.8793998360633850e-02</internalNodes>\n          <leafValues>\n            -1.7233899831771851e+00 -5.6063000112771988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1204 -2.1936999633908272e-02</internalNodes>\n          <leafValues>\n            5.4749399423599243e-01 -4.2481999844312668e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1205 6.1096999794244766e-02</internalNodes>\n          <leafValues>\n            -3.8945000618696213e-02 -1.0807880163192749e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1206 -2.4563999846577644e-02</internalNodes>\n          <leafValues>\n            5.8311098814010620e-01 -9.7599998116493225e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1207 3.3752001821994781e-02</internalNodes>\n          <leafValues>\n            -1.3795999810099602e-02 -8.4730297327041626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1208 3.8199000060558319e-02</internalNodes>\n          <leafValues>\n            1.5114299952983856e-01 -7.9473400115966797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1209 -2.0117999985814095e-02</internalNodes>\n          <leafValues>\n            5.1579099893569946e-01 -2.1445399522781372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1210 2.4734999984502792e-02</internalNodes>\n          <leafValues>\n            -2.2105000913143158e-02 4.2917698621749878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1211 -2.4357000365853310e-02</internalNodes>\n          <leafValues>\n            -8.6201298236846924e-01 -3.6760000512003899e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1212 -2.6442000642418861e-02</internalNodes>\n          <leafValues>\n            -4.5397499203681946e-01 2.2462800145149231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1213 -3.4429999068379402e-03</internalNodes>\n          <leafValues>\n            1.3073000311851501e-01 -3.8622701168060303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1214 1.0701700299978256e-01</internalNodes>\n          <leafValues>\n            1.3158600032329559e-01 -7.9306900501251221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1215 4.5152999460697174e-02</internalNodes>\n          <leafValues>\n            -2.5296801328659058e-01 4.0672400593757629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1216 4.4349998235702515e-02</internalNodes>\n          <leafValues>\n            2.2613000124692917e-02 7.9618102312088013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1217 1.0839999886229634e-03</internalNodes>\n          <leafValues>\n            -3.9158400893211365e-01 1.1639100313186646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1218 7.1433000266551971e-02</internalNodes>\n          <leafValues>\n            8.2466997206211090e-02 1.2530590295791626e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1219 3.5838000476360321e-02</internalNodes>\n          <leafValues>\n            -1.8203300237655640e-01 7.7078700065612793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1220 -2.0839000120759010e-02</internalNodes>\n          <leafValues>\n            -6.1744397878646851e-01 1.5891399979591370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1221 4.2525801062583923e-01</internalNodes>\n          <leafValues>\n            -4.8978000879287720e-02 -1.8422030210494995e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1222 1.1408000253140926e-02</internalNodes>\n          <leafValues>\n            1.7918199300765991e-01 -1.5383499860763550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1223 -1.5364999882876873e-02</internalNodes>\n          <leafValues>\n            -8.4016501903533936e-01 -1.0280000278726220e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1224 -1.5212000347673893e-02</internalNodes>\n          <leafValues>\n            -1.8995699286460876e-01 1.7130999267101288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1225 -1.8972000107169151e-02</internalNodes>\n          <leafValues>\n            -7.9541999101638794e-01 6.6800001077353954e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1226 -3.3330000005662441e-03</internalNodes>\n          <leafValues>\n            -2.3530800640583038e-01 2.4730099737644196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1227 9.3248002231121063e-02</internalNodes>\n          <leafValues>\n            -5.4758001118898392e-02 -1.8324300050735474e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1228 -1.2555000372231007e-02</internalNodes>\n          <leafValues>\n            2.6385200023651123e-01 -3.8526400923728943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1229 -2.7070000767707825e-02</internalNodes>\n          <leafValues>\n            -6.6929799318313599e-01 2.0340999588370323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1230 -2.3677000775933266e-02</internalNodes>\n          <leafValues>\n            6.7265301942825317e-01 -1.4344000257551670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1231 -1.4275000430643559e-02</internalNodes>\n          <leafValues>\n            3.0186399817466736e-01 -2.8514400124549866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1232 2.8096999973058701e-02</internalNodes>\n          <leafValues>\n            1.4766000211238861e-01 -1.4078520536422729e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1233 5.0840001553297043e-02</internalNodes>\n          <leafValues>\n            -1.8613600730895996e-01 7.9953002929687500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1234 1.1505999602377415e-02</internalNodes>\n          <leafValues>\n            1.9118399918079376e-01 -8.5035003721714020e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1235 -1.4661000110208988e-02</internalNodes>\n          <leafValues>\n            4.5239299535751343e-01 -2.2205199301242828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1236 2.2842499613761902e-01</internalNodes>\n          <leafValues>\n            1.3488399982452393e-01 -1.2894610166549683e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1237 1.1106900125741959e-01</internalNodes>\n          <leafValues>\n            -2.0753799378871918e-01 5.4561597108840942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1238 3.2450000289827585e-03</internalNodes>\n          <leafValues>\n            3.2053700089454651e-01 -1.6403500735759735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1239 8.5309997200965881e-02</internalNodes>\n          <leafValues>\n            -2.0210500061511993e-01 5.3296798467636108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1240 2.2048000246286392e-02</internalNodes>\n          <leafValues>\n            1.5698599815368652e-01 -1.7014099657535553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1241 -1.5676999464631081e-02</internalNodes>\n          <leafValues>\n            -6.2863498926162720e-01 4.0761999785900116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1242 3.3112901449203491e-01</internalNodes>\n          <leafValues>\n            1.6609300673007965e-01 -1.0326379537582397e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1243 8.8470000773668289e-03</internalNodes>\n          <leafValues>\n            -2.5076198577880859e-01 3.1660598516464233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1244 4.6080000698566437e-02</internalNodes>\n          <leafValues>\n            1.5352100133895874e-01 -1.6333500146865845e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1245 -3.7703000009059906e-02</internalNodes>\n          <leafValues>\n            5.6873798370361328e-01 -2.0102599263191223e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>159</maxWeakCount>\n      <stageThreshold>-3.5939640998840332e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1246 -8.1808999180793762e-02</internalNodes>\n          <leafValues>\n            5.7124799489974976e-01 -6.7438799142837524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1247 2.1761199831962585e-01</internalNodes>\n          <leafValues>\n            -3.8610199093818665e-01 9.0343999862670898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1248 1.4878000132739544e-02</internalNodes>\n          <leafValues>\n            2.2241599857807159e-01 -1.2779350280761719e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1249 5.2434999495744705e-02</internalNodes>\n          <leafValues>\n            -2.8690400719642639e-01 7.5742298364639282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1250 9.1429995372891426e-03</internalNodes>\n          <leafValues>\n            -6.4880400896072388e-01 2.2268800437450409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1251 7.9169999808073044e-03</internalNodes>\n          <leafValues>\n            -2.9253599047660828e-01 3.1030198931694031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1252 -2.6084000244736671e-02</internalNodes>\n          <leafValues>\n            4.5532700419425964e-01 -3.8500601053237915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1253 -2.9400000348687172e-03</internalNodes>\n          <leafValues>\n            -5.1264399290084839e-01 2.7432298660278320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1254 5.7130001485347748e-02</internalNodes>\n          <leafValues>\n            1.5788000077009201e-02 -1.2133100032806396e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1255 -6.1309998854994774e-03</internalNodes>\n          <leafValues>\n            3.9174601435661316e-01 -3.0866798758506775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1256 -4.0405001491308212e-02</internalNodes>\n          <leafValues>\n            1.1901949644088745e+00 -2.0347100496292114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1257 -2.0297000184655190e-02</internalNodes>\n          <leafValues>\n            -6.8239498138427734e-01 2.0458699762821198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1258 -1.7188999801874161e-02</internalNodes>\n          <leafValues>\n            -8.4939897060394287e-01 3.8433000445365906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1259 -2.4215999990701675e-02</internalNodes>\n          <leafValues>\n            -1.1039420366287231e+00 1.5975099802017212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1260 5.6869000196456909e-02</internalNodes>\n          <leafValues>\n            -1.9595299661159515e-01 1.1806850433349609e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1261 3.6199999158270657e-04</internalNodes>\n          <leafValues>\n            -4.0847799181938171e-01 3.2938599586486816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1262 9.9790003150701523e-03</internalNodes>\n          <leafValues>\n            -2.9673001170158386e-01 4.1547900438308716e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1263 -5.2625000476837158e-02</internalNodes>\n          <leafValues>\n            -1.3069299459457397e+00 1.7862600088119507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1264 -1.3748999685049057e-02</internalNodes>\n          <leafValues>\n            2.3665800690650940e-01 -4.4536599516868591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1265 -3.0517000705003738e-02</internalNodes>\n          <leafValues>\n            2.9018300771713257e-01 -1.1210100352764130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1266 -3.0037501454353333e-01</internalNodes>\n          <leafValues>\n            -2.4237680435180664e+00 -4.2830999940633774e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1267 -3.5990998148918152e-02</internalNodes>\n          <leafValues>\n            8.8206499814987183e-01 -4.7012999653816223e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1268 -5.5112000554800034e-02</internalNodes>\n          <leafValues>\n            8.0119001865386963e-01 -2.0490999519824982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1269 3.3762000501155853e-02</internalNodes>\n          <leafValues>\n            1.4617599546909332e-01 -1.1349489688873291e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1270 -8.2710003480315208e-03</internalNodes>\n          <leafValues>\n            -8.1604897975921631e-01 1.8988000229001045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1271 -5.4399999789893627e-03</internalNodes>\n          <leafValues>\n            -7.0980900526046753e-01 2.2343699634075165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1272 3.1059999018907547e-03</internalNodes>\n          <leafValues>\n            -7.2808599472045898e-01 4.0224999189376831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1273 5.3651999682188034e-02</internalNodes>\n          <leafValues>\n            1.7170900106430054e-01 -1.1163710355758667e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1274 -1.2541399896144867e-01</internalNodes>\n          <leafValues>\n            2.7680370807647705e+00 -1.4611500501632690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1275 9.2542000114917755e-02</internalNodes>\n          <leafValues>\n            1.1609800159931183e-01 -3.9635529518127441e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1276 3.8513999432325363e-02</internalNodes>\n          <leafValues>\n            -7.6399999670684338e-03 -9.8780900239944458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1277 -2.0200000144541264e-03</internalNodes>\n          <leafValues>\n            2.3059999942779541e-01 -7.4970299005508423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1278 9.7599998116493225e-03</internalNodes>\n          <leafValues>\n            -3.1137999892234802e-01 3.0287799239158630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1279 2.4095000699162483e-02</internalNodes>\n          <leafValues>\n            -4.9529999494552612e-02 5.2690100669860840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1280 -1.7982000485062599e-02</internalNodes>\n          <leafValues>\n            -1.1610640287399292e+00 -5.7000000961124897e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1281 -1.0555000044405460e-02</internalNodes>\n          <leafValues>\n            -2.7189099788665771e-01 2.3597699403762817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1282 -7.2889998555183411e-03</internalNodes>\n          <leafValues>\n            -5.4219102859497070e-01 8.1914000213146210e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1283 2.3939000442624092e-02</internalNodes>\n          <leafValues>\n            1.7975799739360809e-01 -6.7049497365951538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1284 -1.8365999683737755e-02</internalNodes>\n          <leafValues>\n            6.2664300203323364e-01 -2.0970100164413452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1285 1.5715999528765678e-02</internalNodes>\n          <leafValues>\n            2.4193699657917023e-01 -1.0444309711456299e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1286 -4.8804000020027161e-02</internalNodes>\n          <leafValues>\n            -9.4060599803924561e-01 -3.7519999314099550e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1287 6.7130001261830330e-03</internalNodes>\n          <leafValues>\n            -7.5432002544403076e-02 6.1575299501419067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1288 9.7770001739263535e-03</internalNodes>\n          <leafValues>\n            3.9285000413656235e-02 -8.4810298681259155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1289 1.4744999818503857e-02</internalNodes>\n          <leafValues>\n            1.6968999803066254e-01 -5.0906401872634888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1290 9.7079001367092133e-02</internalNodes>\n          <leafValues>\n            -3.3103000372648239e-02 -1.2706379890441895e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1291 4.8285998404026031e-02</internalNodes>\n          <leafValues>\n            9.4329997897148132e-02 2.7203190326690674e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1292 9.7810002043843269e-03</internalNodes>\n          <leafValues>\n            -3.9533400535583496e-01 1.5363800525665283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1293 -3.9893999695777893e-02</internalNodes>\n          <leafValues>\n            -2.2767400741577148e-01 1.3913999497890472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1294 2.2848000749945641e-02</internalNodes>\n          <leafValues>\n            -2.7391999959945679e-01 3.4199500083923340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1295 6.7179999314248562e-03</internalNodes>\n          <leafValues>\n            -1.0874299705028534e-01 4.8125401139259338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1296 5.9599999338388443e-02</internalNodes>\n          <leafValues>\n            -4.9522001296281815e-02 -2.0117089748382568e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1297 6.9340001791715622e-03</internalNodes>\n          <leafValues>\n            1.5037499368190765e-01 -1.1271899938583374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1298 1.5757000073790550e-02</internalNodes>\n          <leafValues>\n            -2.0885000005364418e-02 -1.1651979684829712e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1299 -4.9690000712871552e-02</internalNodes>\n          <leafValues>\n            -8.0213499069213867e-01 1.4372299611568451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1300 5.2347000688314438e-02</internalNodes>\n          <leafValues>\n            -2.0836700499057770e-01 6.1677598953247070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1301 2.2430999204516411e-02</internalNodes>\n          <leafValues>\n            2.0305900275707245e-01 -7.5326198339462280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1302 4.1142001748085022e-02</internalNodes>\n          <leafValues>\n            -1.8118199706077576e-01 1.0033359527587891e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1303 -2.1632000803947449e-02</internalNodes>\n          <leafValues>\n            4.9998998641967773e-01 -3.4662999212741852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1304 -8.2808002829551697e-02</internalNodes>\n          <leafValues>\n            1.1711900234222412e+00 -1.8433600664138794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1305 8.5060000419616699e-03</internalNodes>\n          <leafValues>\n            -6.3225001096725464e-02 2.9024899005889893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1306 7.8905001282691956e-02</internalNodes>\n          <leafValues>\n            -2.3274500668048859e-01 5.9695798158645630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1307 -9.0207003057003021e-02</internalNodes>\n          <leafValues>\n            -8.2211899757385254e-01 1.7772200703620911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1308 -2.9269000515341759e-02</internalNodes>\n          <leafValues>\n            6.0860699415206909e-01 -2.1468900144100189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1309 6.9499998353421688e-03</internalNodes>\n          <leafValues>\n            -4.2665999382734299e-02 6.0512101650238037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1310 -8.0629996955394745e-03</internalNodes>\n          <leafValues>\n            -1.1508270502090454e+00 -2.7286000549793243e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1311 1.9595999270677567e-02</internalNodes>\n          <leafValues>\n            -9.1880001127719879e-03 5.6857800483703613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1312 -1.4884999953210354e-02</internalNodes>\n          <leafValues>\n            3.7658798694610596e-01 -2.7149501442909241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1313 2.5217000395059586e-02</internalNodes>\n          <leafValues>\n            -9.9991001188755035e-02 2.4664700031280518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1314 -1.5855999663472176e-02</internalNodes>\n          <leafValues>\n            6.6826701164245605e-01 -2.0614700019359589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1315 2.9441000893712044e-02</internalNodes>\n          <leafValues>\n            1.5832200646400452e-01 -7.6060897111892700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1316 -8.5279997438192368e-03</internalNodes>\n          <leafValues>\n            3.8212299346923828e-01 -2.5407800078392029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1317 2.4421999230980873e-02</internalNodes>\n          <leafValues>\n            1.5105099976062775e-01 -2.8752899169921875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1318 -3.3886998891830444e-02</internalNodes>\n          <leafValues>\n            -6.8002802133560181e-01 3.4327000379562378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1319 -2.0810000132769346e-03</internalNodes>\n          <leafValues>\n            2.5413900613784790e-01 -2.6859098672866821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1320 3.0358999967575073e-02</internalNodes>\n          <leafValues>\n            -3.0842000618577003e-02 -1.1476809978485107e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1321 4.0210001170635223e-03</internalNodes>\n          <leafValues>\n            -3.5253798961639404e-01 2.9868099093437195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1322 2.7681000530719757e-02</internalNodes>\n          <leafValues>\n            -3.8148999214172363e-02 -1.3262039422988892e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1323 7.9039996489882469e-03</internalNodes>\n          <leafValues>\n            -2.3737000301480293e-02 7.0503002405166626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1324 4.4031001627445221e-02</internalNodes>\n          <leafValues>\n            1.0674899816513062e-01 -4.5261201262474060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1325 -3.2370999455451965e-02</internalNodes>\n          <leafValues>\n            4.6674901247024536e-01 -6.1546999961137772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1326 2.0933000370860100e-02</internalNodes>\n          <leafValues>\n            -2.8447899222373962e-01 4.3845599889755249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1327 2.5227999314665794e-02</internalNodes>\n          <leafValues>\n            -2.2537000477313995e-02 7.0389097929000854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1328 6.5520000644028187e-03</internalNodes>\n          <leafValues>\n            -3.2554900646209717e-01 2.4023699760437012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1329 -5.8557998389005661e-02</internalNodes>\n          <leafValues>\n            -1.2227720022201538e+00 1.1668799817562103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1330 3.1899999827146530e-02</internalNodes>\n          <leafValues>\n            -1.9305000081658363e-02 -1.0973169803619385e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1331 -3.0445000156760216e-02</internalNodes>\n          <leafValues>\n            6.5582501888275146e-01 7.5090996921062469e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1332 1.4933000318706036e-02</internalNodes>\n          <leafValues>\n            -5.2155798673629761e-01 1.1523099988698959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1333 -4.9008000642061234e-02</internalNodes>\n          <leafValues>\n            -7.8303998708724976e-01 1.6657200455665588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1334 8.3158999681472778e-02</internalNodes>\n          <leafValues>\n            -2.6879999786615372e-03 -8.5282301902770996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1335 2.3902999237179756e-02</internalNodes>\n          <leafValues>\n            -5.1010999828577042e-02 4.1999098658561707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1336 1.6428999602794647e-02</internalNodes>\n          <leafValues>\n            1.9232999533414841e-02 -6.5049099922180176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1337 -1.1838000267744064e-02</internalNodes>\n          <leafValues>\n            -6.2409800291061401e-01 1.5411199629306793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1338 -1.6799999866634607e-04</internalNodes>\n          <leafValues>\n            1.7589199542999268e-01 -3.4338700771331787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1339 1.9193999469280243e-02</internalNodes>\n          <leafValues>\n            4.3418999761343002e-02 7.9069197177886963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1340 -1.0032000020146370e-02</internalNodes>\n          <leafValues>\n            4.5648899674415588e-01 -2.2494800388813019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1341 -1.4004000462591648e-02</internalNodes>\n          <leafValues>\n            3.3570998907089233e-01 -4.8799999058246613e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1342 -1.0319899767637253e-01</internalNodes>\n          <leafValues>\n            -2.3378000259399414e+00 -5.8933001011610031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1343 -9.5697000622749329e-02</internalNodes>\n          <leafValues>\n            -6.6153901815414429e-01 2.0098599791526794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1344 -4.1480999439954758e-02</internalNodes>\n          <leafValues>\n            4.5939201116561890e-01 -2.2314099967479706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1345 2.4099999573081732e-03</internalNodes>\n          <leafValues>\n            -2.6898598670959473e-01 2.4922999739646912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1346 1.0724999755620956e-01</internalNodes>\n          <leafValues>\n            -1.8640199303627014e-01 7.2769802808761597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1347 3.1870000530034304e-03</internalNodes>\n          <leafValues>\n            -2.4608999490737915e-02 2.8643900156021118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1348 2.9167000204324722e-02</internalNodes>\n          <leafValues>\n            -3.4683000296354294e-02 -1.1162580251693726e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1349 1.1287000030279160e-02</internalNodes>\n          <leafValues>\n            6.3760001212358475e-03 6.6632097959518433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1350 -1.2001000344753265e-02</internalNodes>\n          <leafValues>\n            4.2420101165771484e-01 -2.6279801130294800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1351 -1.2695999816060066e-02</internalNodes>\n          <leafValues>\n            -2.1957000717520714e-02 1.8936799466609955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1352 2.4597000330686569e-02</internalNodes>\n          <leafValues>\n            -3.4963998943567276e-02 -1.0989320278167725e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1353 4.5953001827001572e-02</internalNodes>\n          <leafValues>\n            1.1109799891710281e-01 -2.9306049346923828e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1354 -2.7241000905632973e-02</internalNodes>\n          <leafValues>\n            2.9101699590682983e-01 -2.7407899498939514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1355 4.0063999593257904e-02</internalNodes>\n          <leafValues>\n            1.1877900362014771e-01 -6.2801802158355713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1356 2.3055000230669975e-02</internalNodes>\n          <leafValues>\n            1.4813800156116486e-01 -3.7007498741149902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1357 -2.3737000301480293e-02</internalNodes>\n          <leafValues>\n            -5.3724801540374756e-01 1.9358199834823608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1358 7.7522002160549164e-02</internalNodes>\n          <leafValues>\n            -6.0194000601768494e-02 -1.9489669799804688e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1359 -1.3345000334084034e-02</internalNodes>\n          <leafValues>\n            -4.5229598879814148e-01 1.8741500377655029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1360 -2.1719999611377716e-02</internalNodes>\n          <leafValues>\n            1.2144249677658081e+00 -1.5365800261497498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1361 -7.1474999189376831e-02</internalNodes>\n          <leafValues>\n            -2.3047130107879639e+00 1.0999900102615356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1362 -5.4999999701976776e-03</internalNodes>\n          <leafValues>\n            -7.1855199337005615e-01 2.0100999623537064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1363 2.6740999892354012e-02</internalNodes>\n          <leafValues>\n            7.3545001447200775e-02 9.8786002397537231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1364 -3.9407998323440552e-02</internalNodes>\n          <leafValues>\n            -1.2227380275726318e+00 -4.3506998568773270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1365 2.5888999924063683e-02</internalNodes>\n          <leafValues>\n            1.3409300148487091e-01 -1.1770780086517334e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1366 4.8925001174211502e-02</internalNodes>\n          <leafValues>\n            -3.0810000374913216e-02 -9.3479502201080322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1367 3.6892998963594437e-02</internalNodes>\n          <leafValues>\n            1.3333700597286224e-01 -1.4998290538787842e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1368 7.8929997980594635e-02</internalNodes>\n          <leafValues>\n            -1.4538800716400146e-01 1.5631790161132812e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1369 2.9006000608205795e-02</internalNodes>\n          <leafValues>\n            1.9383700191974640e-01 -6.7642802000045776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1370 6.3089998438954353e-03</internalNodes>\n          <leafValues>\n            -3.7465399503707886e-01 1.0857500135898590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1371 -6.5830998122692108e-02</internalNodes>\n          <leafValues>\n            8.1059402227401733e-01 3.0201999470591545e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1372 -6.8965002894401550e-02</internalNodes>\n          <leafValues>\n            8.3772599697113037e-01 -1.7140999436378479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1373 -1.1669100075960159e-01</internalNodes>\n          <leafValues>\n            -9.4647198915481567e-01 1.3123199343681335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1374 -1.3060000492259860e-03</internalNodes>\n          <leafValues>\n            4.6007998287677765e-02 -5.2011597156524658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1375 -4.4558998197317123e-02</internalNodes>\n          <leafValues>\n            -1.9423669576644897e+00 1.3200700283050537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1376 5.1033001393079758e-02</internalNodes>\n          <leafValues>\n            -2.1480999886989594e-01 4.8673900961875916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1377 -3.1578000634908676e-02</internalNodes>\n          <leafValues>\n            5.9989798069000244e-01 7.9159997403621674e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1378 2.1020000800490379e-02</internalNodes>\n          <leafValues>\n            -2.2069500386714935e-01 5.4046201705932617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1379 -1.3824200630187988e-01</internalNodes>\n          <leafValues>\n            6.2957501411437988e-01 -2.1712999790906906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1380 5.2228998392820358e-02</internalNodes>\n          <leafValues>\n            -2.3360900580883026e-01 4.9760800600051880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1381 2.5884000584483147e-02</internalNodes>\n          <leafValues>\n            1.8041999638080597e-01 -2.2039200365543365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1382 -1.2138999998569489e-02</internalNodes>\n          <leafValues>\n            -6.9731897115707397e-01 1.5712000429630280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1383 -2.4237999692559242e-02</internalNodes>\n          <leafValues>\n            3.4593299031257629e-01 7.1469999849796295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1384 -2.5272000581026077e-02</internalNodes>\n          <leafValues>\n            -8.7583297491073608e-01 -9.8240002989768982e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1385 1.2597000226378441e-02</internalNodes>\n          <leafValues>\n            2.3649999499320984e-01 -2.8731200098991394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1386 5.7330999523401260e-02</internalNodes>\n          <leafValues>\n            -6.1530999839305878e-02 -2.2326040267944336e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1387 1.6671000048518181e-02</internalNodes>\n          <leafValues>\n            -1.9850100576877594e-01 4.0810701251029968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1388 -2.2818999364972115e-02</internalNodes>\n          <leafValues>\n            9.6487599611282349e-01 -2.0245699584484100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1389 3.7000001611886546e-05</internalNodes>\n          <leafValues>\n            -5.8908998966217041e-02 2.7055400609970093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1390 -7.6700001955032349e-03</internalNodes>\n          <leafValues>\n            -4.5317101478576660e-01 8.9628003537654877e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1391 9.4085998833179474e-02</internalNodes>\n          <leafValues>\n            1.1604599654674530e-01 -1.0951169729232788e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1392 -6.2267001718282700e-02</internalNodes>\n          <leafValues>\n            1.8096530437469482e+00 -1.4773200452327728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1393 1.7416000366210938e-02</internalNodes>\n          <leafValues>\n            2.3068200051784515e-01 -4.2417600750923157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1394 -2.2066000849008560e-02</internalNodes>\n          <leafValues>\n            4.9270299077033997e-01 -2.0630900561809540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1395 -1.0404000058770180e-02</internalNodes>\n          <leafValues>\n            6.0924297571182251e-01 2.8130000457167625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1396 -9.3670003116130829e-03</internalNodes>\n          <leafValues>\n            4.0171200037002563e-01 -2.1681700646877289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1397 -2.9039999470114708e-02</internalNodes>\n          <leafValues>\n            -8.4876501560211182e-01 1.4246800541877747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1398 -2.1061999723315239e-02</internalNodes>\n          <leafValues>\n            -7.9198300838470459e-01 -1.2595999985933304e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1399 -3.7000998854637146e-02</internalNodes>\n          <leafValues>\n            -6.7488902807235718e-01 1.2830400466918945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1400 1.0735999792814255e-02</internalNodes>\n          <leafValues>\n            3.6779999732971191e-02 -6.3393002748489380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1401 1.6367599368095398e-01</internalNodes>\n          <leafValues>\n            1.3803899288177490e-01 -4.7189000248908997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1402 9.4917997717857361e-02</internalNodes>\n          <leafValues>\n            -1.3855700194835663e-01 1.9492419958114624e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1403 3.5261999815702438e-02</internalNodes>\n          <leafValues>\n            1.3721899688243866e-01 -2.1186530590057373e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1404 1.2811000458896160e-02</internalNodes>\n          <leafValues>\n            -2.0008100569248199e-01 4.9507799744606018e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>155</maxWeakCount>\n      <stageThreshold>-3.3933560848236084e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1405 1.3904400169849396e-01</internalNodes>\n          <leafValues>\n            -4.6581199765205383e-01 7.6431602239608765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1406 1.1916999705135822e-02</internalNodes>\n          <leafValues>\n            -9.4398999214172363e-01 3.9726299047470093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1407 -1.0006999596953392e-02</internalNodes>\n          <leafValues>\n            3.2718798518180847e-01 -6.3367402553558350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1408 -6.0479999519884586e-03</internalNodes>\n          <leafValues>\n            2.7427899837493896e-01 -5.7446998357772827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1409 -1.2489999644458294e-03</internalNodes>\n          <leafValues>\n            2.3629300296306610e-01 -6.8593502044677734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1410 3.2382000237703323e-02</internalNodes>\n          <leafValues>\n            -5.7630199193954468e-01 2.7492699027061462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1411 -1.3957999646663666e-02</internalNodes>\n          <leafValues>\n            -6.1061501502990723e-01 2.4541600048542023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1412 1.1159999994561076e-03</internalNodes>\n          <leafValues>\n            -5.6539100408554077e-01 2.7179300785064697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1413 2.7000000045518391e-05</internalNodes>\n          <leafValues>\n            -8.0235999822616577e-01 1.1509100347757339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1414 -2.5700000696815550e-04</internalNodes>\n          <leafValues>\n            -8.1205898523330688e-01 2.3844699561595917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1415 4.0460000745952129e-03</internalNodes>\n          <leafValues>\n            1.3909600675106049e-01 -6.6163200139999390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1416 1.4356000348925591e-02</internalNodes>\n          <leafValues>\n            -1.6485199332237244e-01 4.1901698708534241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1417 -5.5374998599290848e-02</internalNodes>\n          <leafValues>\n            1.4425870180130005e+00 -1.8820199370384216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1418 9.3594998121261597e-02</internalNodes>\n          <leafValues>\n            1.3548299670219421e-01 -9.1636097431182861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1419 2.6624999940395355e-02</internalNodes>\n          <leafValues>\n            -3.3748298883438110e-01 3.9233601093292236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1420 3.7469998933374882e-03</internalNodes>\n          <leafValues>\n            -1.1615400016307831e-01 4.4399300217628479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1421 -3.1886000186204910e-02</internalNodes>\n          <leafValues>\n            -9.9498301744461060e-01 1.6120000509545207e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1422 -2.2600000724196434e-02</internalNodes>\n          <leafValues>\n            -4.8067399859428406e-01 1.7007300257682800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1423 2.5202000513672829e-02</internalNodes>\n          <leafValues>\n            3.5580001771450043e-02 -8.0215400457382202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1424 -3.1036999076604843e-02</internalNodes>\n          <leafValues>\n            -1.0895340442657471e+00 1.8081900477409363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1425 -2.6475999504327774e-02</internalNodes>\n          <leafValues>\n            9.5671200752258301e-01 -2.1049399673938751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1426 -1.3853999786078930e-02</internalNodes>\n          <leafValues>\n            -1.0370320081710815e+00 2.2166700661182404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1427 -6.2925003468990326e-02</internalNodes>\n          <leafValues>\n            9.0199398994445801e-01 -1.9085299968719482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1428 -4.4750999659299850e-02</internalNodes>\n          <leafValues>\n            -1.0119110345840454e+00 1.4691199362277985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1429 -2.0428000018000603e-02</internalNodes>\n          <leafValues>\n            6.1624497175216675e-01 -2.3552699387073517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1430 -8.0329999327659607e-03</internalNodes>\n          <leafValues>\n            -8.3279997110366821e-02 2.1728700399398804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1431 8.7280003353953362e-03</internalNodes>\n          <leafValues>\n            6.5458998084068298e-02 -6.0318702459335327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1432 -2.7202000841498375e-02</internalNodes>\n          <leafValues>\n            -9.3447399139404297e-01 1.5270000696182251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1433 -1.6471000388264656e-02</internalNodes>\n          <leafValues>\n            -8.4177100658416748e-01 1.3332000002264977e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1434 -1.3744000345468521e-02</internalNodes>\n          <leafValues>\n            6.0567200183868408e-01 -9.2021003365516663e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1435 2.9164999723434448e-02</internalNodes>\n          <leafValues>\n            -2.8114000335335732e-02 -1.4014569520950317e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1436 3.7457000464200974e-02</internalNodes>\n          <leafValues>\n            1.3080599904060364e-01 -4.9382498860359192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1437 -2.5070000439882278e-02</internalNodes>\n          <leafValues>\n            -1.1289390325546265e+00 -1.4600000344216824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1438 -6.3812002539634705e-02</internalNodes>\n          <leafValues>\n            7.5871598720550537e-01 -1.8200000049546361e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1439 -9.3900002539157867e-03</internalNodes>\n          <leafValues>\n            2.9936400055885315e-01 -2.9487800598144531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1440 -7.6000002445653081e-04</internalNodes>\n          <leafValues>\n            1.9725000485777855e-02 1.9993899762630463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1441 -2.1740999072790146e-02</internalNodes>\n          <leafValues>\n            -8.5247898101806641e-01 4.9169998615980148e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1442 -1.7869999632239342e-02</internalNodes>\n          <leafValues>\n            -5.9985999017953873e-02 1.5222500264644623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1443 -2.4831000715494156e-02</internalNodes>\n          <leafValues>\n            3.5603401064872742e-01 -2.6259899139404297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1444 1.5715500712394714e-01</internalNodes>\n          <leafValues>\n            1.5599999460391700e-04 1.0428730249404907e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1445 6.9026999175548553e-02</internalNodes>\n          <leafValues>\n            -3.3006999641656876e-02 -1.1796669960021973e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1446 -1.1021999642252922e-02</internalNodes>\n          <leafValues>\n            5.8987700939178467e-01 -5.7647999376058578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1447 -1.3834999874234200e-02</internalNodes>\n          <leafValues>\n            5.9502798318862915e-01 -2.4418599903583527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1448 -3.0941000208258629e-02</internalNodes>\n          <leafValues>\n            -1.1723799705505371e+00 1.6907000541687012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1449 2.1258000284433365e-02</internalNodes>\n          <leafValues>\n            -1.8900999799370766e-02 -1.0684759616851807e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1450 9.3079999089241028e-02</internalNodes>\n          <leafValues>\n            1.6305600106716156e-01 -1.3375270366668701e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1451 2.9635999351739883e-02</internalNodes>\n          <leafValues>\n            -2.2524799406528473e-01 4.5400100946426392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1452 -1.2199999764561653e-04</internalNodes>\n          <leafValues>\n            2.7409100532531738e-01 -3.7371399998664856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1453 -4.2098000645637512e-02</internalNodes>\n          <leafValues>\n            -7.5828802585601807e-01 1.7137000337243080e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1454 -2.2505000233650208e-02</internalNodes>\n          <leafValues>\n            -2.2759300470352173e-01 2.3698699474334717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1455 -1.2862999923527241e-02</internalNodes>\n          <leafValues>\n            1.9252400100231171e-01 -3.2127100229263306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1456 2.7860000729560852e-02</internalNodes>\n          <leafValues>\n            1.6723699867725372e-01 -1.0209059715270996e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1457 -2.7807999402284622e-02</internalNodes>\n          <leafValues>\n            1.2824759483337402e+00 -1.7225299775600433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1458 -6.1630001291632652e-03</internalNodes>\n          <leafValues>\n            -5.4072898626327515e-01 2.3885700106620789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1459 -2.0436000078916550e-02</internalNodes>\n          <leafValues>\n            6.3355398178100586e-01 -2.1090599894523621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1460 -1.2307999655604362e-02</internalNodes>\n          <leafValues>\n            -4.9778199195861816e-01 1.7402599751949310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1461 -4.0493998676538467e-02</internalNodes>\n          <leafValues>\n            -1.1848740577697754e+00 -3.3890999853610992e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1462 2.9657000675797462e-02</internalNodes>\n          <leafValues>\n            2.1740999072790146e-02 1.0069919824600220e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1463 6.8379999138414860e-03</internalNodes>\n          <leafValues>\n            2.9217999428510666e-02 -5.9906297922134399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1464 1.6164999455213547e-02</internalNodes>\n          <leafValues>\n            -2.1000799536705017e-01 3.7637299299240112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1465 5.0193000584840775e-02</internalNodes>\n          <leafValues>\n            2.5319999549537897e-03 -7.1668201684951782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1466 1.9680000841617584e-03</internalNodes>\n          <leafValues>\n            -2.1921400725841522e-01 3.2298699021339417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1467 2.4979999288916588e-02</internalNodes>\n          <leafValues>\n            -9.6840001642704010e-03 -7.7572900056838989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1468 -1.5809999778866768e-02</internalNodes>\n          <leafValues>\n            4.4637501239776611e-01 -6.1760000884532928e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1469 3.7206999957561493e-02</internalNodes>\n          <leafValues>\n            -2.0495399832725525e-01 5.7722198963165283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1470 -7.9264998435974121e-02</internalNodes>\n          <leafValues>\n            -7.6745402812957764e-01 1.2550400197505951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1471 -1.7152000218629837e-02</internalNodes>\n          <leafValues>\n            -1.4121830463409424e+00 -5.1704000681638718e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1472 3.2740000635385513e-02</internalNodes>\n          <leafValues>\n            1.9334000349044800e-01 -6.3633698225021362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1473 -1.1756999790668488e-01</internalNodes>\n          <leafValues>\n            8.4325402975082397e-01 -1.8018600344657898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1474 1.2057200074195862e-01</internalNodes>\n          <leafValues>\n            1.2530000507831573e-01 -2.1213600635528564e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1475 4.2779999785125256e-03</internalNodes>\n          <leafValues>\n            -4.6604400873184204e-01 8.9643999934196472e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1476 -7.2544999420642853e-02</internalNodes>\n          <leafValues>\n            5.1826500892639160e-01 1.6823999583721161e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1477 1.7710599303245544e-01</internalNodes>\n          <leafValues>\n            -3.0910000205039978e-02 -1.1046639680862427e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1478 8.4229996427893639e-03</internalNodes>\n          <leafValues>\n            2.4445800483226776e-01 -3.8613098859786987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1479 -1.3035000301897526e-02</internalNodes>\n          <leafValues>\n            9.8004400730133057e-01 -1.7016500234603882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1480 1.8912000581622124e-02</internalNodes>\n          <leafValues>\n            2.0248499512672424e-01 -3.8545900583267212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1481 2.1447999402880669e-02</internalNodes>\n          <leafValues>\n            -2.5717198848724365e-01 3.5181200504302979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1482 6.3357003033161163e-02</internalNodes>\n          <leafValues>\n            1.6994799673557281e-01 -9.1383802890777588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1483 -3.2435998320579529e-02</internalNodes>\n          <leafValues>\n            -8.5681599378585815e-01 -2.1680999547243118e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1484 -2.3564999923110008e-02</internalNodes>\n          <leafValues>\n            5.6115597486495972e-01 -2.2400000307243317e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1485 1.8789000809192657e-02</internalNodes>\n          <leafValues>\n            -2.5459799170494080e-01 3.4512901306152344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1486 3.1042000278830528e-02</internalNodes>\n          <leafValues>\n            7.5719999149441719e-03 3.4800198674201965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1487 -1.1226999573409557e-02</internalNodes>\n          <leafValues>\n            -6.0219800472259521e-01 4.2814999818801880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1488 -1.2845999561250210e-02</internalNodes>\n          <leafValues>\n            4.2020401358604431e-01 -5.3801000118255615e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1489 -1.2791999615728855e-02</internalNodes>\n          <leafValues>\n            2.2724500298500061e-01 -3.2398000359535217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1490 6.8651996552944183e-02</internalNodes>\n          <leafValues>\n            9.3532003462314606e-02 10.</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1491 5.2789999172091484e-03</internalNodes>\n          <leafValues>\n            -2.6926299929618835e-01 3.3303201198577881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1492 -3.8779001682996750e-02</internalNodes>\n          <leafValues>\n            -7.2365301847457886e-01 1.7806500196456909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1493 6.1820000410079956e-03</internalNodes>\n          <leafValues>\n            -3.5119399428367615e-01 1.6586300730705261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1494 1.7515200376510620e-01</internalNodes>\n          <leafValues>\n            1.1623100191354752e-01 -1.5419290065765381e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1495 1.1627999693155289e-01</internalNodes>\n          <leafValues>\n            -9.1479998081922531e-03 -9.9842602014541626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1496 -2.2964000701904297e-02</internalNodes>\n          <leafValues>\n            2.0565399527549744e-01 1.5432000160217285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1497 -5.1410000771284103e-02</internalNodes>\n          <leafValues>\n            5.8072400093078613e-01 -2.0118400454521179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1498 2.2474199533462524e-01</internalNodes>\n          <leafValues>\n            1.8728999421000481e-02 1.0829299688339233e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1499 9.4860000535845757e-03</internalNodes>\n          <leafValues>\n            -3.3171299099922180e-01 1.9902999699115753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1500 -1.1846300214529037e-01</internalNodes>\n          <leafValues>\n            1.3711010217666626e+00 6.8926997482776642e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1501 3.7810999900102615e-02</internalNodes>\n          <leafValues>\n            -9.3600002583116293e-04 -8.3996999263763428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1502 2.2202000021934509e-02</internalNodes>\n          <leafValues>\n            -1.1963999830186367e-02 3.6673998832702637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1503 -3.6366000771522522e-02</internalNodes>\n          <leafValues>\n            3.7866500020027161e-01 -2.7714800834655762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1504 -1.3184699416160583e-01</internalNodes>\n          <leafValues>\n            -2.7481179237365723e+00 1.0666900128126144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1505 -4.1655998677015305e-02</internalNodes>\n          <leafValues>\n            4.7524300217628479e-01 -2.3249800503253937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1506 -3.3151999115943909e-02</internalNodes>\n          <leafValues>\n            -5.7929402589797974e-01 1.7434400320053101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1507 1.5769999474287033e-02</internalNodes>\n          <leafValues>\n            -1.1284000240266323e-02 -8.3701401948928833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1508 -3.9363000541925430e-02</internalNodes>\n          <leafValues>\n            3.4821599721908569e-01 -1.7455400526523590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1509 -6.7849002778530121e-02</internalNodes>\n          <leafValues>\n            1.4225699901580811e+00 -1.4765599370002747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1510 -2.6775000616908073e-02</internalNodes>\n          <leafValues>\n            2.3947000503540039e-01 1.3271999545395374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1511 3.9919000118970871e-02</internalNodes>\n          <leafValues>\n            -8.9999996125698090e-03 -7.5938898324966431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1512 1.0065600275993347e-01</internalNodes>\n          <leafValues>\n            -1.8685000017285347e-02 7.6245301961898804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1513 -8.1022001802921295e-02</internalNodes>\n          <leafValues>\n            -9.0439099073410034e-01 -8.5880002006888390e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1514 -2.1258000284433365e-02</internalNodes>\n          <leafValues>\n            -2.1319599449634552e-01 2.1919700503349304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1515 -1.0630999691784382e-02</internalNodes>\n          <leafValues>\n            1.9598099589347839e-01 -3.5768100619316101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1516 8.1300002057105303e-04</internalNodes>\n          <leafValues>\n            -9.2794999480247498e-02 2.6145899295806885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1517 3.4650000743567944e-03</internalNodes>\n          <leafValues>\n            -5.5336099863052368e-01 2.7386000379920006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1518 1.8835999071598053e-02</internalNodes>\n          <leafValues>\n            1.8446099758148193e-01 -6.6934299468994141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1519 -2.5631999596953392e-02</internalNodes>\n          <leafValues>\n            1.9382879734039307e+00 -1.4708900451660156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1520 -4.0939999744296074e-03</internalNodes>\n          <leafValues>\n            -2.6451599597930908e-01 2.0733200013637543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1521 -8.9199998183175921e-04</internalNodes>\n          <leafValues>\n            -5.5031597614288330e-01 5.0374999642372131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1522 -4.9518000334501266e-02</internalNodes>\n          <leafValues>\n            -2.5615389347076416e+00 1.3141700625419617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1523 1.1680999770760536e-02</internalNodes>\n          <leafValues>\n            -2.4819800257682800e-01 3.9982700347900391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1524 3.4563999623060226e-02</internalNodes>\n          <leafValues>\n            1.6178800165653229e-01 -7.1418899297714233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1525 -8.2909995689988136e-03</internalNodes>\n          <leafValues>\n            2.2180099785327911e-01 -2.9181700944900513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1526 -2.2358000278472900e-02</internalNodes>\n          <leafValues>\n            3.1044098734855652e-01 -2.7280000504106283e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1527 -3.0801000073552132e-02</internalNodes>\n          <leafValues>\n            -9.5672702789306641e-01 -8.3400001749396324e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1528 4.3779000639915466e-02</internalNodes>\n          <leafValues>\n            1.2556900084018707e-01 -1.1759619712829590e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1529 4.3046001344919205e-02</internalNodes>\n          <leafValues>\n            -5.8876998722553253e-02 -1.8568470478057861e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1530 2.7188999578356743e-02</internalNodes>\n          <leafValues>\n            4.2858000844717026e-02 3.9036700129508972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1531 9.4149997457861900e-03</internalNodes>\n          <leafValues>\n            -4.3567001819610596e-02 -1.1094470024108887e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1532 9.4311997294425964e-02</internalNodes>\n          <leafValues>\n            4.0256999433040619e-02 9.8442298173904419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1533 1.7025099694728851e-01</internalNodes>\n          <leafValues>\n            2.9510000720620155e-02 -6.9509297609329224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1534 -4.7148000448942184e-02</internalNodes>\n          <leafValues>\n            1.0338569879531860e+00 6.7602001130580902e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1535 1.1186300218105316e-01</internalNodes>\n          <leafValues>\n            -6.8682998418807983e-02 -2.4985830783843994e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1536 -1.4353999868035316e-02</internalNodes>\n          <leafValues>\n            -5.9481900930404663e-01 1.5001699328422546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1537 3.4024000167846680e-02</internalNodes>\n          <leafValues>\n            -6.4823001623153687e-02 -2.1382639408111572e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1538 2.1601999178528786e-02</internalNodes>\n          <leafValues>\n            5.5309999734163284e-02 7.8292900323867798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1539 2.1771999076008797e-02</internalNodes>\n          <leafValues>\n            -7.1279997937381268e-03 -7.2148102521896362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1540 8.2416996359825134e-02</internalNodes>\n          <leafValues>\n            1.4609499275684357e-01 -1.3636670112609863e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1541 8.4671996533870697e-02</internalNodes>\n          <leafValues>\n            -1.7784699797630310e-01 7.2857701778411865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1542 -5.5128000676631927e-02</internalNodes>\n          <leafValues>\n            -5.9402400255203247e-01 1.9357800483703613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1543 -6.4823001623153687e-02</internalNodes>\n          <leafValues>\n            -1.0783840417861938e+00 -4.0734000504016876e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1544 -2.2769000381231308e-02</internalNodes>\n          <leafValues>\n            7.7900201082229614e-01 3.4960000775754452e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1545 5.4756000638008118e-02</internalNodes>\n          <leafValues>\n            -6.5683998167514801e-02 -1.8188409805297852e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1546 -8.9000001025851816e-05</internalNodes>\n          <leafValues>\n            -1.7891999334096909e-02 2.0768299698829651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1547 9.8361998796463013e-02</internalNodes>\n          <leafValues>\n            -5.5946998298168182e-02 -1.4153920412063599e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1548 -7.0930002257227898e-03</internalNodes>\n          <leafValues>\n            3.4135299921035767e-01 -1.2089899927377701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1549 5.0278000533580780e-02</internalNodes>\n          <leafValues>\n            -2.6286700367927551e-01 2.5797298550605774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1550 -5.7870000600814819e-03</internalNodes>\n          <leafValues>\n            -1.3178600370883942e-01 1.7350199818611145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1551 1.3973999768495560e-02</internalNodes>\n          <leafValues>\n            2.8518000617623329e-02 -6.1152201890945435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1552 2.1449999883770943e-02</internalNodes>\n          <leafValues>\n            2.6181999593973160e-02 3.0306598544120789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1553 -2.9214000329375267e-02</internalNodes>\n          <leafValues>\n            4.4940599799156189e-01 -2.2803099453449249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1554 4.8099999548867345e-04</internalNodes>\n          <leafValues>\n            -1.9879999756813049e-01 2.0744499564170837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1555 1.7109999898821115e-03</internalNodes>\n          <leafValues>\n            -5.4037201404571533e-01 6.7865997552871704e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1556 8.6660003289580345e-03</internalNodes>\n          <leafValues>\n            -1.3128000311553478e-02 5.2297902107238770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1557 6.3657999038696289e-02</internalNodes>\n          <leafValues>\n            6.8299002945423126e-02 -4.9235099554061890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1558 -2.7968000620603561e-02</internalNodes>\n          <leafValues>\n            6.8183898925781250e-01 7.8781001269817352e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1559 4.8953998833894730e-02</internalNodes>\n          <leafValues>\n            -2.0622399449348450e-01 5.0388097763061523e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>169</maxWeakCount>\n      <stageThreshold>-3.2396929264068604e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1560 -2.9312999919056892e-02</internalNodes>\n          <leafValues>\n            7.1284699440002441e-01 -5.8230698108673096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1561 1.2415099889039993e-01</internalNodes>\n          <leafValues>\n            -3.6863499879837036e-01 6.0067200660705566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1562 7.9349996522068977e-03</internalNodes>\n          <leafValues>\n            -8.6008298397064209e-01 2.1724699437618256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1563 3.0365999788045883e-02</internalNodes>\n          <leafValues>\n            -2.7186998724937439e-01 6.1247897148132324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1564 2.5218000635504723e-02</internalNodes>\n          <leafValues>\n            -3.4748300909996033e-01 5.0427699089050293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1565 1.0014000348746777e-02</internalNodes>\n          <leafValues>\n            -3.1898999214172363e-01 4.1376799345016479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1566 -1.6775000840425491e-02</internalNodes>\n          <leafValues>\n            -6.9048100709915161e-01 9.4830997288227081e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1567 -2.6950000319629908e-03</internalNodes>\n          <leafValues>\n            -2.0829799771308899e-01 2.3737199604511261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1568 4.2257998138666153e-02</internalNodes>\n          <leafValues>\n            -4.9366700649261475e-01 1.8170599639415741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1569 -4.8505000770092010e-02</internalNodes>\n          <leafValues>\n            1.3429640531539917e+00 3.9769001305103302e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1570 2.8992999345064163e-02</internalNodes>\n          <leafValues>\n            4.6496000140905380e-02 -8.1643497943878174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1571 -4.0089000016450882e-02</internalNodes>\n          <leafValues>\n            -7.1197801828384399e-01 2.2553899884223938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1572 -4.1021998971700668e-02</internalNodes>\n          <leafValues>\n            1.0057929754257202e+00 -1.9690200686454773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1573 1.1838000267744064e-02</internalNodes>\n          <leafValues>\n            -1.2600000016391277e-02 8.0767101049423218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1574 -2.1328000351786613e-02</internalNodes>\n          <leafValues>\n            -8.2023900747299194e-01 2.0524999126791954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1575 -2.3904999718070030e-02</internalNodes>\n          <leafValues>\n            5.4210501909255981e-01 -7.4767000973224640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1576 1.8008999526500702e-02</internalNodes>\n          <leafValues>\n            -3.3827701210975647e-01 4.2358601093292236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1577 -4.3614000082015991e-02</internalNodes>\n          <leafValues>\n            -1.1983489990234375e+00 1.5566200017929077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1578 -9.2449998483061790e-03</internalNodes>\n          <leafValues>\n            -8.9029997587203979e-01 1.1003999970853329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1579 4.7485001385211945e-02</internalNodes>\n          <leafValues>\n            1.6664099693298340e-01 -9.0764498710632324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1580 -1.4233999885618687e-02</internalNodes>\n          <leafValues>\n            6.2695199251174927e-01 -2.5791200995445251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1581 3.8010000716894865e-03</internalNodes>\n          <leafValues>\n            -2.8229999542236328e-01 2.6624599099159241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1582 3.4330000635236502e-03</internalNodes>\n          <leafValues>\n            -6.3771998882293701e-01 9.8422996699810028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1583 -2.9221000149846077e-02</internalNodes>\n          <leafValues>\n            -7.6769900321960449e-01 2.2634500265121460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1584 -6.4949998632073402e-03</internalNodes>\n          <leafValues>\n            4.5600101351737976e-01 -2.6528900861740112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1585 -3.0034000054001808e-02</internalNodes>\n          <leafValues>\n            -7.6551097631454468e-01 1.4009299874305725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1586 7.8360000625252724e-03</internalNodes>\n          <leafValues>\n            4.6755999326705933e-02 -7.2356200218200684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1587 8.8550001382827759e-03</internalNodes>\n          <leafValues>\n            -4.9141999334096909e-02 5.1472699642181396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1588 9.5973998308181763e-02</internalNodes>\n          <leafValues>\n            -2.0068999379873276e-02 -1.0850950479507446e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1589 -3.2876998186111450e-02</internalNodes>\n          <leafValues>\n            -9.5875298976898193e-01 1.4543600380420685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1590 -1.3384000398218632e-02</internalNodes>\n          <leafValues>\n            -7.0013600587844849e-01 2.9157999902963638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1591 1.5235999599099159e-02</internalNodes>\n          <leafValues>\n            -2.8235700726509094e-01 2.5367999076843262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1592 1.2054000049829483e-02</internalNodes>\n          <leafValues>\n            -2.5303399562835693e-01 4.6526700258255005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1593 -7.6295003294944763e-02</internalNodes>\n          <leafValues>\n            -6.9915801286697388e-01 1.3217200338840485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1594 -1.2040000408887863e-02</internalNodes>\n          <leafValues>\n            4.5894598960876465e-01 -2.3856499791145325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1595 2.1916000172495842e-02</internalNodes>\n          <leafValues>\n            1.8268600106239319e-01 -6.1629700660705566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1596 -2.7330000884830952e-03</internalNodes>\n          <leafValues>\n            -6.3257902860641479e-01 3.4219000488519669e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1597 -4.8652000725269318e-02</internalNodes>\n          <leafValues>\n            -1.0297729969024658e+00 1.7386500537395477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1598 -1.0463999584317207e-02</internalNodes>\n          <leafValues>\n            3.4757301211357117e-01 -2.7464100718498230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1599 -6.6550001502037048e-03</internalNodes>\n          <leafValues>\n            -2.8980299830436707e-01 2.4037900567054749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1600 8.5469996556639671e-03</internalNodes>\n          <leafValues>\n            -4.4340500235557556e-01 1.4267399907112122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1601 1.9913999363780022e-02</internalNodes>\n          <leafValues>\n            1.7740400135517120e-01 -2.4096299707889557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1602 2.2012999281287193e-02</internalNodes>\n          <leafValues>\n            -1.0812000371515751e-02 -9.4690799713134766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1603 -5.2179001271724701e-02</internalNodes>\n          <leafValues>\n            1.6547499895095825e+00 9.6487000584602356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1604 1.9698999822139740e-02</internalNodes>\n          <leafValues>\n            -6.7560002207756042e-03 -8.6311501264572144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1605 2.3040000349283218e-02</internalNodes>\n          <leafValues>\n            -2.3519999813288450e-03 3.8531300425529480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1606 -1.5038000419735909e-02</internalNodes>\n          <leafValues>\n            -6.1905699968338013e-01 3.1077999621629715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1607 -4.9956001341342926e-02</internalNodes>\n          <leafValues>\n            7.0657497644424438e-01 4.7880999743938446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1608 -6.9269999861717224e-02</internalNodes>\n          <leafValues>\n            3.9212900400161743e-01 -2.3848000168800354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1609 4.7399997711181641e-03</internalNodes>\n          <leafValues>\n            -2.4309000000357628e-02 2.5386300683021545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1610 -3.3923998475074768e-02</internalNodes>\n          <leafValues>\n            4.6930399537086487e-01 -2.3321899771690369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1611 -1.6231000423431396e-02</internalNodes>\n          <leafValues>\n            3.2319200038909912e-01 -2.0545600354671478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1612 -5.0193000584840775e-02</internalNodes>\n          <leafValues>\n            -1.2277870178222656e+00 -4.0798000991344452e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1613 5.6944001466035843e-02</internalNodes>\n          <leafValues>\n            4.5184001326560974e-02 6.0197502374649048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1614 4.0936999022960663e-02</internalNodes>\n          <leafValues>\n            -1.6772800683975220e-01 8.9819300174713135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1615 -3.0839999672025442e-03</internalNodes>\n          <leafValues>\n            3.3716198801994324e-01 -2.7240800857543945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1616 -3.2600000500679016e-02</internalNodes>\n          <leafValues>\n            -8.5446500778198242e-01 1.9664999097585678e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1617 9.8480999469757080e-02</internalNodes>\n          <leafValues>\n            5.4742000997066498e-02 6.3827300071716309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1618 -3.8185000419616699e-02</internalNodes>\n          <leafValues>\n            5.2274698019027710e-01 -2.3384800553321838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1619 -4.5917000621557236e-02</internalNodes>\n          <leafValues>\n            6.2829202413558960e-01 3.2859001308679581e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1620 -1.1955499649047852e-01</internalNodes>\n          <leafValues>\n            -6.1572700738906860e-01 3.4680001437664032e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1621 -1.2044399976730347e-01</internalNodes>\n          <leafValues>\n            -8.4380000829696655e-01 1.6530700027942657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1622 7.0619001984596252e-02</internalNodes>\n          <leafValues>\n            -6.3261002302169800e-02 -1.9863929748535156e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1623 8.4889996796846390e-03</internalNodes>\n          <leafValues>\n            -1.7663399875164032e-01 3.8011199235916138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1624 2.2710999473929405e-02</internalNodes>\n          <leafValues>\n            -2.7605999261140823e-02 -9.1921401023864746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1625 4.9700000090524554e-04</internalNodes>\n          <leafValues>\n            -2.4293200671672821e-01 2.2878900170326233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1626 3.4651998430490494e-02</internalNodes>\n          <leafValues>\n            -2.3705999553203583e-01 5.4010999202728271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1627 -4.4700000435113907e-03</internalNodes>\n          <leafValues>\n            3.9078998565673828e-01 -1.2693800032138824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1628 2.3643000051379204e-02</internalNodes>\n          <leafValues>\n            -2.6663699746131897e-01 3.2312598824501038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1629 1.2813000008463860e-02</internalNodes>\n          <leafValues>\n            1.7540800571441650e-01 -6.0787999629974365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1630 -1.1250999756157398e-02</internalNodes>\n          <leafValues>\n            -1.0852589607238770e+00 -2.8046000748872757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1631 -4.1535001248121262e-02</internalNodes>\n          <leafValues>\n            7.1887397766113281e-01 2.7982000261545181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1632 -9.3470998108386993e-02</internalNodes>\n          <leafValues>\n            -1.1906319856643677e+00 -4.4810999184846878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1633 -2.7249999344348907e-02</internalNodes>\n          <leafValues>\n            6.2942498922348022e-01 9.5039997249841690e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1634 -2.1759999915957451e-02</internalNodes>\n          <leafValues>\n            1.3233649730682373e+00 -1.5027000010013580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1635 -9.6890004351735115e-03</internalNodes>\n          <leafValues>\n            -3.3947101235389709e-01 1.7085799574851990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1636 6.9395996630191803e-02</internalNodes>\n          <leafValues>\n            -2.5657799839973450e-01 4.7652098536491394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1637 3.1208999454975128e-02</internalNodes>\n          <leafValues>\n            1.4154000580310822e-01 -3.4942001104354858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1638 -4.9727000296115875e-02</internalNodes>\n          <leafValues>\n            -1.1675560474395752e+00 -4.0757998824119568e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1639 -2.0301999524235725e-02</internalNodes>\n          <leafValues>\n            -3.9486399292945862e-01 1.5814900398254395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1640 -1.5367000363767147e-02</internalNodes>\n          <leafValues>\n            4.9300000071525574e-01 -2.0092099905014038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1641 -5.0735000520944595e-02</internalNodes>\n          <leafValues>\n            1.8736059665679932e+00 8.6730003356933594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1642 -2.0726000890135765e-02</internalNodes>\n          <leafValues>\n            -8.8938397169113159e-01 -7.3199998587369919e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1643 -3.0993999913334846e-02</internalNodes>\n          <leafValues>\n            -1.1664899587631226e+00 1.4274600148200989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1644 -4.4269999489188194e-03</internalNodes>\n          <leafValues>\n            -6.6815102100372314e-01 4.4120000675320625e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1645 -4.5743998140096664e-02</internalNodes>\n          <leafValues>\n            -4.7955200076103210e-01 1.5121999382972717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1646 1.6698999330401421e-02</internalNodes>\n          <leafValues>\n            1.2048599869012833e-01 -4.5235899090766907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1647 3.2210000790655613e-03</internalNodes>\n          <leafValues>\n            -7.7615000307559967e-02 2.7846598625183105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1648 2.4434000253677368e-02</internalNodes>\n          <leafValues>\n            -1.9987100362777710e-01 6.7253702878952026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1649 -7.9677999019622803e-02</internalNodes>\n          <leafValues>\n            9.2222398519515991e-01 9.2557996511459351e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1650 4.4530000537633896e-02</internalNodes>\n          <leafValues>\n            -2.6690500974655151e-01 3.3320501446723938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1651 -1.2528300285339355e-01</internalNodes>\n          <leafValues>\n            -5.4253101348876953e-01 1.3976299762725830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1652 1.7971999943256378e-02</internalNodes>\n          <leafValues>\n            1.8219999969005585e-02 -6.8048501014709473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1653 1.9184000790119171e-02</internalNodes>\n          <leafValues>\n            -1.2583999894559383e-02 5.4126697778701782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1654 4.0024001151323318e-02</internalNodes>\n          <leafValues>\n            -1.7638799548149109e-01 7.8810399770736694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1655 1.3558999635279179e-02</internalNodes>\n          <leafValues>\n            2.0737600326538086e-01 -4.7744300961494446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1656 1.6220999881625175e-02</internalNodes>\n          <leafValues>\n            2.3076999932527542e-02 -6.1182099580764771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1657 1.1229000054299831e-02</internalNodes>\n          <leafValues>\n            -1.7728000879287720e-02 4.1764199733734131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1658 3.9193000644445419e-02</internalNodes>\n          <leafValues>\n            -1.8948499858379364e-01 7.4019300937652588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1659 -9.5539996400475502e-03</internalNodes>\n          <leafValues>\n            4.0947100520133972e-01 -1.3508899509906769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1660 2.7878999710083008e-02</internalNodes>\n          <leafValues>\n            -2.0350700616836548e-01 6.1625397205352783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1661 -2.3600999265909195e-02</internalNodes>\n          <leafValues>\n            -1.6967060565948486e+00 1.4633199572563171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1662 2.6930000633001328e-02</internalNodes>\n          <leafValues>\n            -3.0401999130845070e-02 -1.0909470319747925e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1663 2.8999999631196260e-04</internalNodes>\n          <leafValues>\n            -2.0076000690460205e-01 2.2314099967479706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1664 -4.1124999523162842e-02</internalNodes>\n          <leafValues>\n            -4.5242199301719666e-01 5.7392001152038574e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1665 6.6789998672902584e-03</internalNodes>\n          <leafValues>\n            2.3824900388717651e-01 -2.1262100338935852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1666 4.7864999622106552e-02</internalNodes>\n          <leafValues>\n            -1.8194800615310669e-01 6.1918401718139648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1667 -3.1679999083280563e-03</internalNodes>\n          <leafValues>\n            -2.7393200993537903e-01 2.5017300248146057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1668 -8.6230002343654633e-03</internalNodes>\n          <leafValues>\n            -4.6280300617218018e-01 4.2397998273372650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1669 -7.4350000359117985e-03</internalNodes>\n          <leafValues>\n            4.1796800494194031e-01 -1.7079999670386314e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1670 -1.8769999733194709e-03</internalNodes>\n          <leafValues>\n            1.4602300524711609e-01 -3.3721101284027100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1671 -8.6226001381874084e-02</internalNodes>\n          <leafValues>\n            7.5143402814865112e-01 1.0711999610066414e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1672 4.6833999454975128e-02</internalNodes>\n          <leafValues>\n            -1.9119599461555481e-01 4.8414900898933411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1673 -9.2000002041459084e-05</internalNodes>\n          <leafValues>\n            3.5220399498939514e-01 -1.7333300411701202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1674 -1.6343999654054642e-02</internalNodes>\n          <leafValues>\n            -6.4397698640823364e-01 9.0680001303553581e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1675 4.5703999698162079e-02</internalNodes>\n          <leafValues>\n            1.8216000869870186e-02 3.1970798969268799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1676 -2.7382999658584595e-02</internalNodes>\n          <leafValues>\n            1.0564049482345581e+00 -1.7276400327682495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1677 -2.7602000162005424e-02</internalNodes>\n          <leafValues>\n            2.9715499281883240e-01 -9.4600003212690353e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1678 7.6939999125897884e-03</internalNodes>\n          <leafValues>\n            -2.1660299599170685e-01 4.7385200858116150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1679 -7.0500001311302185e-04</internalNodes>\n          <leafValues>\n            2.4048799276351929e-01 -2.6776000857353210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1680 1.1054199934005737e-01</internalNodes>\n          <leafValues>\n            -3.3539000898599625e-02 -1.0233880281448364e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1681 6.8765997886657715e-02</internalNodes>\n          <leafValues>\n            -4.3239998631179333e-03 5.7153397798538208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1682 1.7999999690800905e-03</internalNodes>\n          <leafValues>\n            7.7574998140335083e-02 -4.2092698812484741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1683 1.9232000410556793e-01</internalNodes>\n          <leafValues>\n            8.2021996378898621e-02 2.8810169696807861e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1684 1.5742099285125732e-01</internalNodes>\n          <leafValues>\n            -1.3708199560642242e-01 2.0890059471130371e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1685 -4.9387000501155853e-02</internalNodes>\n          <leafValues>\n            -1.8610910177230835e+00 1.4332099258899689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1686 5.1929000765085220e-02</internalNodes>\n          <leafValues>\n            -1.8737000226974487e-01 5.4231601953506470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1687 4.9965001642704010e-02</internalNodes>\n          <leafValues>\n            1.4175300300121307e-01 -1.5625779628753662e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1688 -4.2633000761270523e-02</internalNodes>\n          <leafValues>\n            1.6059479713439941e+00 -1.4712899923324585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1689 -3.7553999572992325e-02</internalNodes>\n          <leafValues>\n            -8.0974900722503662e-01 1.3256999850273132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1690 -3.7174999713897705e-02</internalNodes>\n          <leafValues>\n            -1.3945020437240601e+00 -5.7055000215768814e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1691 1.3945999555289745e-02</internalNodes>\n          <leafValues>\n            3.3427000045776367e-02 5.7474797964096069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1692 -4.4800000614486635e-04</internalNodes>\n          <leafValues>\n            -5.5327498912811279e-01 2.1952999755740166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1693 3.1993001699447632e-02</internalNodes>\n          <leafValues>\n            2.0340999588370323e-02 3.7459200620651245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1694 -4.2799999937415123e-03</internalNodes>\n          <leafValues>\n            4.4428700208663940e-01 -2.2999699413776398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1695 9.8550003021955490e-03</internalNodes>\n          <leafValues>\n            1.8315799534320831e-01 -4.0964999794960022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1696 9.3356996774673462e-02</internalNodes>\n          <leafValues>\n            -6.3661001622676849e-02 -1.6929290294647217e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1697 1.7209999263286591e-02</internalNodes>\n          <leafValues>\n            2.0153899490833282e-01 -4.6061098575592041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1698 8.4319999441504478e-03</internalNodes>\n          <leafValues>\n            -3.2003998756408691e-01 1.5312199294567108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1699 -1.4054999686777592e-02</internalNodes>\n          <leafValues>\n            8.6882400512695312e-01 3.2575000077486038e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1700 -7.7180000953376293e-03</internalNodes>\n          <leafValues>\n            6.3686698675155640e-01 -1.8425500392913818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1701 2.8005000203847885e-02</internalNodes>\n          <leafValues>\n            1.7357499897480011e-01 -4.7883599996566772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1702 -1.8884999677538872e-02</internalNodes>\n          <leafValues>\n            2.4101600050926208e-01 -2.6547598838806152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1703 -1.8585000187158585e-02</internalNodes>\n          <leafValues>\n            5.4232501983642578e-01 5.3633000701665878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1704 -3.6437001079320908e-02</internalNodes>\n          <leafValues>\n            2.3908898830413818e+00 -1.3634699583053589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1705 3.2455001026391983e-02</internalNodes>\n          <leafValues>\n            1.5910699963569641e-01 -6.7581498622894287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1706 5.9781998395919800e-02</internalNodes>\n          <leafValues>\n            -2.3479999508708715e-03 -7.3053699731826782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1707 9.8209995776414871e-03</internalNodes>\n          <leafValues>\n            -1.1444099992513657e-01 3.0570301413536072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1708 -3.5163998603820801e-02</internalNodes>\n          <leafValues>\n            -1.0511469841003418e+00 -3.3103000372648239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1709 2.7429999317973852e-03</internalNodes>\n          <leafValues>\n            -2.0135399699211121e-01 3.2754099369049072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1710 8.1059997901320457e-03</internalNodes>\n          <leafValues>\n            -2.1383500099182129e-01 4.3362098932266235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1711 8.8942997157573700e-02</internalNodes>\n          <leafValues>\n            1.0940899699926376e-01 -4.7609338760375977e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1712 -3.0054999515414238e-02</internalNodes>\n          <leafValues>\n            -1.7169300317764282e+00 -6.0919001698493958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1713 -2.1734999492764473e-02</internalNodes>\n          <leafValues>\n            6.4778900146484375e-01 -3.2830998301506042e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1714 3.7648998200893402e-02</internalNodes>\n          <leafValues>\n            -1.0060000233352184e-02 -7.6569098234176636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1715 2.7189999818801880e-03</internalNodes>\n          <leafValues>\n            1.9888900220394135e-01 -8.2479000091552734e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1716 -1.0548000223934650e-02</internalNodes>\n          <leafValues>\n            -8.6613601446151733e-01 -2.5986000895500183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1717 1.2966300547122955e-01</internalNodes>\n          <leafValues>\n            1.3911999762058258e-01 -2.2271950244903564e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1718 -1.7676999792456627e-02</internalNodes>\n          <leafValues>\n            3.3967700600624084e-01 -2.3989599943161011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1719 -7.7051997184753418e-02</internalNodes>\n          <leafValues>\n            -2.5017969608306885e+00 1.2841999530792236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1720 -1.9230000674724579e-02</internalNodes>\n          <leafValues>\n            5.0641202926635742e-01 -1.9751599431037903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1721 -5.1222998648881912e-02</internalNodes>\n          <leafValues>\n            -2.9333369731903076e+00 1.3858500123023987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1722 2.0830000285059214e-03</internalNodes>\n          <leafValues>\n            -6.0043597221374512e-01 2.9718000441789627e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1723 2.5418000295758247e-02</internalNodes>\n          <leafValues>\n            3.3915799856185913e-01 -1.4392000436782837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1724 -2.3905999958515167e-02</internalNodes>\n          <leafValues>\n            -1.1082680225372314e+00 -4.7377001494169235e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1725 -6.3740001060068607e-03</internalNodes>\n          <leafValues>\n            4.4533699750900269e-01 -6.7052997648715973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1726 -3.7698999047279358e-02</internalNodes>\n          <leafValues>\n            -1.0406579971313477e+00 -4.1790001094341278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1727 2.1655100584030151e-01</internalNodes>\n          <leafValues>\n            3.3863000571727753e-02 8.2017302513122559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1728 -1.3400999829173088e-02</internalNodes>\n          <leafValues>\n            5.2903497219085693e-01 -1.9133000075817108e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>196</maxWeakCount>\n      <stageThreshold>-3.2103500366210938e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1729 7.1268998086452484e-02</internalNodes>\n          <leafValues>\n            -5.3631198406219482e-01 6.0715299844741821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1730 5.6111000478267670e-02</internalNodes>\n          <leafValues>\n            -5.0141602754592896e-01 4.3976101279258728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1731 4.0463998913764954e-02</internalNodes>\n          <leafValues>\n            -3.2922199368476868e-01 5.4834699630737305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1732 6.3155002892017365e-02</internalNodes>\n          <leafValues>\n            -3.1701698899269104e-01 4.6152999997138977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1733 1.0320999659597874e-02</internalNodes>\n          <leafValues>\n            1.0694999992847443e-01 -9.8243898153305054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1734 6.2606997787952423e-02</internalNodes>\n          <leafValues>\n            -1.4329700171947479e-01 7.1095001697540283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1735 -3.9416000247001648e-02</internalNodes>\n          <leafValues>\n            9.4380199909210205e-01 -2.1572099626064301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1736 -5.3960001096129417e-03</internalNodes>\n          <leafValues>\n            -5.4611998796463013e-01 2.5303798913955688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1737 1.0773199796676636e-01</internalNodes>\n          <leafValues>\n            1.2496000155806541e-02 -1.0809199810028076e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1738 1.6982000321149826e-02</internalNodes>\n          <leafValues>\n            -3.1536400318145752e-01 5.1239997148513794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1739 3.1216999515891075e-02</internalNodes>\n          <leafValues>\n            -4.5199999585747719e-03 -1.2443480491638184e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1740 -2.3106999695301056e-02</internalNodes>\n          <leafValues>\n            -7.6492899656295776e-01 2.0640599727630615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1741 -1.1203999631106853e-02</internalNodes>\n          <leafValues>\n            2.4092699587345123e-01 -3.5142099857330322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1742 -4.7479998320341110e-03</internalNodes>\n          <leafValues>\n            -9.7007997334003448e-02 2.0638099312782288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1743 -1.7358999699354172e-02</internalNodes>\n          <leafValues>\n            -7.9020297527313232e-01 2.1852999925613403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1744 1.8851999193429947e-02</internalNodes>\n          <leafValues>\n            -1.0394600033760071e-01 5.4844200611114502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1745 7.2249998338520527e-03</internalNodes>\n          <leafValues>\n            -4.0409401059150696e-01 2.6763799786567688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1746 1.8915999680757523e-02</internalNodes>\n          <leafValues>\n            2.0508000254631042e-01 -1.0206340551376343e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1747 3.1156999990344048e-02</internalNodes>\n          <leafValues>\n            1.2400000123307109e-03 -8.7293499708175659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1748 2.0951999351382256e-02</internalNodes>\n          <leafValues>\n            -5.5559999309480190e-03 8.0356198549270630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1749 1.1291000060737133e-02</internalNodes>\n          <leafValues>\n            -3.6478400230407715e-01 2.2767899930477142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1750 -5.7011000812053680e-02</internalNodes>\n          <leafValues>\n            -1.4295619726181030e+00 1.4322000741958618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1751 7.2194002568721771e-02</internalNodes>\n          <leafValues>\n            -4.1850000619888306e-02 -1.9111829996109009e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1752 -1.9874000921845436e-02</internalNodes>\n          <leafValues>\n            2.6425498723983765e-01 -3.2617700099945068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1753 -1.6692999750375748e-02</internalNodes>\n          <leafValues>\n            -8.3907800912857056e-01 4.0799999260343611e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1754 -3.9834998548030853e-02</internalNodes>\n          <leafValues>\n            -4.8858499526977539e-01 1.6436100006103516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1755 2.7009999379515648e-02</internalNodes>\n          <leafValues>\n            -1.8862499296665192e-01 8.3419400453567505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1756 -3.9420002140104771e-03</internalNodes>\n          <leafValues>\n            2.3231500387191772e-01 -7.2360001504421234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1757 2.2833000868558884e-02</internalNodes>\n          <leafValues>\n            -3.5884000360965729e-02 -1.1549400091171265e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1758 -6.8888001143932343e-02</internalNodes>\n          <leafValues>\n            -1.7837309837341309e+00 1.5159000456333160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1759 4.3097000569105148e-02</internalNodes>\n          <leafValues>\n            -2.1608099341392517e-01 5.0624102354049683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1760 8.6239995434880257e-03</internalNodes>\n          <leafValues>\n            -1.7795599997043610e-01 2.8957900404930115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1761 1.4561000280082226e-02</internalNodes>\n          <leafValues>\n            -1.1408000253140926e-02 -8.9402002096176147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1762 -1.1501000262796879e-02</internalNodes>\n          <leafValues>\n            3.0171999335289001e-01 -4.3659001588821411e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1763 -1.0971499979496002e-01</internalNodes>\n          <leafValues>\n            -9.5147097110748291e-01 -1.9973000511527061e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1764 4.5228000730276108e-02</internalNodes>\n          <leafValues>\n            3.3110998570919037e-02 9.6619802713394165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1765 -2.7047999203205109e-02</internalNodes>\n          <leafValues>\n            9.7963601350784302e-01 -1.7261900007724762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1766 1.8030999228358269e-02</internalNodes>\n          <leafValues>\n            -2.0801000297069550e-02 2.7385899424552917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1767 5.0524998456239700e-02</internalNodes>\n          <leafValues>\n            -5.6802999228239059e-02 -1.7775089740753174e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1768 -2.9923999682068825e-02</internalNodes>\n          <leafValues>\n            6.5329200029373169e-01 -2.3537000641226768e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1769 3.8058001548051834e-02</internalNodes>\n          <leafValues>\n            2.6317000389099121e-02 -7.0665699243545532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1770 1.8563899397850037e-01</internalNodes>\n          <leafValues>\n            -5.6039998307824135e-03 3.2873699069023132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1771 -4.0670000016689301e-03</internalNodes>\n          <leafValues>\n            3.4204798936843872e-01 -3.0171599984169006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1772 1.0108999907970428e-02</internalNodes>\n          <leafValues>\n            -7.3600001633167267e-03 5.7981598377227783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1773 -1.1567000299692154e-02</internalNodes>\n          <leafValues>\n            -5.2722197771072388e-01 4.6447999775409698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1774 -6.5649999305605888e-03</internalNodes>\n          <leafValues>\n            -5.8529102802276611e-01 1.9101899862289429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1775 1.0582000017166138e-02</internalNodes>\n          <leafValues>\n            2.1073000505566597e-02 -6.8892598152160645e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1776 -2.0304000005125999e-02</internalNodes>\n          <leafValues>\n            -3.6400699615478516e-01 1.5338799357414246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1777 2.3529999889433384e-03</internalNodes>\n          <leafValues>\n            3.6164000630378723e-02 -5.9825098514556885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1778 -1.4690000098198652e-03</internalNodes>\n          <leafValues>\n            -1.4707699418067932e-01 3.7507998943328857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1779 8.6449999362230301e-03</internalNodes>\n          <leafValues>\n            -2.1708500385284424e-01 5.1936799287796021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1780 -2.4326000362634659e-02</internalNodes>\n          <leafValues>\n            -1.0846769809722900e+00 1.4084799587726593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1781 7.4418999254703522e-02</internalNodes>\n          <leafValues>\n            -1.5513800084590912e-01 1.1822769641876221e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1782 1.7077999189496040e-02</internalNodes>\n          <leafValues>\n            4.4231001287698746e-02 9.1561102867126465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1783 -2.4577999487519264e-02</internalNodes>\n          <leafValues>\n            -1.5504100322723389e+00 -5.4745998233556747e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1784 3.0205000191926956e-02</internalNodes>\n          <leafValues>\n            1.6662800312042236e-01 -1.0001239776611328e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1785 1.2136000208556652e-02</internalNodes>\n          <leafValues>\n            -7.7079099416732788e-01 -4.8639997839927673e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1786 8.6717002093791962e-02</internalNodes>\n          <leafValues>\n            1.1061699688434601e-01 -1.6857999563217163e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1787 -4.2309001088142395e-02</internalNodes>\n          <leafValues>\n            1.1075930595397949e+00 -1.5438599884510040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1788 -2.6420000940561295e-03</internalNodes>\n          <leafValues>\n            2.7451899647712708e-01 -1.8456199765205383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1789 -5.6662000715732574e-02</internalNodes>\n          <leafValues>\n            -8.0625599622726440e-01 -1.6928000375628471e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1790 2.3475000634789467e-02</internalNodes>\n          <leafValues>\n            1.4187699556350708e-01 -2.5500899553298950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1791 -2.0803000777959824e-02</internalNodes>\n          <leafValues>\n            1.9826300442218781e-01 -3.1171199679374695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1792 7.2599998675286770e-03</internalNodes>\n          <leafValues>\n            -5.0590999424457550e-02 4.1923800110816956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1793 3.4160000085830688e-01</internalNodes>\n          <leafValues>\n            -1.6674900054931641e-01 9.2748600244522095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1794 6.2029999680817127e-03</internalNodes>\n          <leafValues>\n            -1.2625899910926819e-01 4.0445300936698914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1795 3.2692000269889832e-02</internalNodes>\n          <leafValues>\n            -3.2634999603033066e-02 -9.8939800262451172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1796 2.1100000594742596e-04</internalNodes>\n          <leafValues>\n            -6.4534001052379608e-02 2.5473698973655701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1797 7.2100001852959394e-04</internalNodes>\n          <leafValues>\n            -3.6618599295616150e-01 1.1973100155591965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1798 5.4490998387336731e-02</internalNodes>\n          <leafValues>\n            1.2073499709367752e-01 -1.0291390419006348e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1799 -1.0141000151634216e-02</internalNodes>\n          <leafValues>\n            -5.2177202701568604e-01 3.3734999597072601e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1800 -1.8815999850630760e-02</internalNodes>\n          <leafValues>\n            6.5181797742843628e-01 1.3399999588727951e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1801 -5.3480002097785473e-03</internalNodes>\n          <leafValues>\n            1.7370699346065521e-01 -3.4132000803947449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1802 -1.0847000405192375e-02</internalNodes>\n          <leafValues>\n            -1.9699899852275848e-01 1.5045499801635742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1803 -4.9926001578569412e-02</internalNodes>\n          <leafValues>\n            -5.0888502597808838e-01 3.0762000009417534e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1804 1.2160000391304493e-02</internalNodes>\n          <leafValues>\n            -6.9251999258995056e-02 1.8745499849319458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1805 -2.2189998999238014e-03</internalNodes>\n          <leafValues>\n            -4.0849098563194275e-01 7.9954996705055237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1806 3.1580000650137663e-03</internalNodes>\n          <leafValues>\n            -2.1124599874019623e-01 2.2366400063037872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1807 4.1439998894929886e-03</internalNodes>\n          <leafValues>\n            -4.9900299310684204e-01 6.2917001545429230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1808 -7.3730000294744968e-03</internalNodes>\n          <leafValues>\n            -2.0553299784660339e-01 2.2096699476242065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1809 5.1812000572681427e-02</internalNodes>\n          <leafValues>\n            1.8096800148487091e-01 -4.3495801091194153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1810 1.8340000882744789e-02</internalNodes>\n          <leafValues>\n            1.5200000256299973e-02 3.7991699576377869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1811 1.7490799725055695e-01</internalNodes>\n          <leafValues>\n            -2.0920799672603607e-01 4.0013000369071960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1812 5.3993999958038330e-02</internalNodes>\n          <leafValues>\n            2.4751600623130798e-01 -2.6712900400161743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1813 -3.2033199071884155e-01</internalNodes>\n          <leafValues>\n            -1.9094380140304565e+00 -6.6960997879505157e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1814 -2.7060000225901604e-02</internalNodes>\n          <leafValues>\n            -7.1371299028396606e-01 1.5904599428176880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1815 7.7463999390602112e-02</internalNodes>\n          <leafValues>\n            -1.6970199346542358e-01 7.7552998065948486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1816 2.3771999403834343e-02</internalNodes>\n          <leafValues>\n            1.9021899998188019e-01 -6.0162097215652466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1817 1.1501000262796879e-02</internalNodes>\n          <leafValues>\n            7.7039999887347221e-03 -6.1730301380157471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1818 3.2616000622510910e-02</internalNodes>\n          <leafValues>\n            1.7159199714660645e-01 -7.0978200435638428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1819 -4.4383000582456589e-02</internalNodes>\n          <leafValues>\n            -2.2606229782104492e+00 -7.3276996612548828e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1820 -5.8476001024246216e-02</internalNodes>\n          <leafValues>\n            2.4087750911712646e+00 8.3091996610164642e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1821 1.9303999841213226e-02</internalNodes>\n          <leafValues>\n            -2.7082300186157227e-01 2.7369999885559082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1822 -4.4705998152494431e-02</internalNodes>\n          <leafValues>\n            3.1355598568916321e-01 -6.2492001801729202e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1823 -6.0334999114274979e-02</internalNodes>\n          <leafValues>\n            -1.4515119791030884e+00 -5.8761000633239746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1824 1.1667000129818916e-02</internalNodes>\n          <leafValues>\n            -1.8084999173879623e-02 5.0479698181152344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1825 2.8009999543428421e-02</internalNodes>\n          <leafValues>\n            -2.3302899301052094e-01 3.0708700418472290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1826 6.5397001802921295e-02</internalNodes>\n          <leafValues>\n            1.4135900139808655e-01 -5.0010901689529419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1827 9.6239997074007988e-03</internalNodes>\n          <leafValues>\n            -2.2054600715637207e-01 3.9191201329231262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1828 2.5510000996291637e-03</internalNodes>\n          <leafValues>\n            -1.1381500214338303e-01 2.0032300055027008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1829 3.1847000122070312e-02</internalNodes>\n          <leafValues>\n            2.5476999580860138e-02 -5.3326398134231567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1830 3.3055000007152557e-02</internalNodes>\n          <leafValues>\n            1.7807699739933014e-01 -6.2793898582458496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1831 4.7600999474525452e-02</internalNodes>\n          <leafValues>\n            -1.4747899770736694e-01 1.4204180240631104e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1832 -1.9571999087929726e-02</internalNodes>\n          <leafValues>\n            -5.2693498134613037e-01 1.5838600695133209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1833 -5.4730001837015152e-02</internalNodes>\n          <leafValues>\n            8.8231599330902100e-01 -1.6627800464630127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1834 -2.2686000913381577e-02</internalNodes>\n          <leafValues>\n            -4.8386898636817932e-01 1.5000100433826447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1835 1.0713200271129608e-01</internalNodes>\n          <leafValues>\n            -2.1336199343204498e-01 4.2333900928497314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1836 -3.6380000412464142e-02</internalNodes>\n          <leafValues>\n            -7.4198000133037567e-02 1.4589400589466095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1837 1.3935999944806099e-02</internalNodes>\n          <leafValues>\n            -2.4911600351333618e-01 2.6771199703216553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1838 2.0991999655961990e-02</internalNodes>\n          <leafValues>\n            8.7959999218583107e-03 4.3064999580383301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1839 4.9118999391794205e-02</internalNodes>\n          <leafValues>\n            -1.7591999471187592e-01 6.9282901287078857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1840 3.6315999925136566e-02</internalNodes>\n          <leafValues>\n            1.3145299255847931e-01 -3.3597299456596375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1841 4.1228000074625015e-02</internalNodes>\n          <leafValues>\n            -4.5692000538110733e-02 -1.3515930175781250e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1842 1.5672000125050545e-02</internalNodes>\n          <leafValues>\n            1.7544099688529968e-01 -6.0550000518560410e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1843 -1.6286000609397888e-02</internalNodes>\n          <leafValues>\n            -1.1308189630508423e+00 -3.9533000439405441e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1844 -3.0229999683797359e-03</internalNodes>\n          <leafValues>\n            -2.2454300522804260e-01 2.3628099262714386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1845 -1.3786299526691437e-01</internalNodes>\n          <leafValues>\n            4.5376899838447571e-01 -2.1098700165748596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1846 -9.6760001033544540e-03</internalNodes>\n          <leafValues>\n            -1.5105099976062775e-01 2.0781700313091278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1847 -2.4839999154210091e-02</internalNodes>\n          <leafValues>\n            -6.8350297212600708e-01 -8.0040004104375839e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1848 -1.3964399695396423e-01</internalNodes>\n          <leafValues>\n            6.5011298656463623e-01 4.6544000506401062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1849 -8.2153998315334320e-02</internalNodes>\n          <leafValues>\n            4.4887199997901917e-01 -2.3591999709606171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1850 3.8449999410659075e-03</internalNodes>\n          <leafValues>\n            -8.8173002004623413e-02 2.7346798777580261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1851 -6.6579999402165413e-03</internalNodes>\n          <leafValues>\n            -4.6866598725318909e-01 7.7001996338367462e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1852 -1.5898000448942184e-02</internalNodes>\n          <leafValues>\n            2.9268398880958557e-01 -2.1941000595688820e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1853 -5.0946000963449478e-02</internalNodes>\n          <leafValues>\n            -1.2093789577484131e+00 -4.2109999805688858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1854 1.6837999224662781e-02</internalNodes>\n          <leafValues>\n            -4.5595999807119370e-02 5.0180697441101074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1855 1.5918999910354614e-02</internalNodes>\n          <leafValues>\n            -2.6904299855232239e-01 2.6516300439834595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1856 3.6309999413788319e-03</internalNodes>\n          <leafValues>\n            -1.3046100735664368e-01 3.1807100772857666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1857 -8.6144998669624329e-02</internalNodes>\n          <leafValues>\n            1.9443659782409668e+00 -1.3978299498558044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1858 3.3140998333692551e-02</internalNodes>\n          <leafValues>\n            1.5266799926757812e-01 -3.0866000801324844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1859 -3.9679999463260174e-03</internalNodes>\n          <leafValues>\n            -7.1202301979064941e-01 -1.3844000175595284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1860 -2.4008000269532204e-02</internalNodes>\n          <leafValues>\n            9.2007797956466675e-01 4.6723999083042145e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1861 8.7320003658533096e-03</internalNodes>\n          <leafValues>\n            -2.2567300498485565e-01 3.1931799650192261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1862 -2.7786999940872192e-02</internalNodes>\n          <leafValues>\n            -7.2337102890014648e-01 1.7018599808216095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1863 -1.9455300271511078e-01</internalNodes>\n          <leafValues>\n            1.2461860179901123e+00 -1.4736199378967285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1864 -1.0869699716567993e-01</internalNodes>\n          <leafValues>\n            -1.4465179443359375e+00 1.2145300209522247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1865 -1.9494999200105667e-02</internalNodes>\n          <leafValues>\n            -7.8153097629547119e-01 -2.3732999339699745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1866 3.0650000553578138e-03</internalNodes>\n          <leafValues>\n            -8.5471397638320923e-01 1.6686999797821045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1867 5.9193998575210571e-02</internalNodes>\n          <leafValues>\n            -1.4853699505329132e-01 1.1273469924926758e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1868 -5.4207999259233475e-02</internalNodes>\n          <leafValues>\n            5.4726999998092651e-01 3.5523999482393265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1869 -3.9324998855590820e-02</internalNodes>\n          <leafValues>\n            3.6642599105834961e-01 -2.0543999969959259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1870 8.2278996706008911e-02</internalNodes>\n          <leafValues>\n            -3.5007998347282410e-02 5.3994202613830566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1871 -7.4479999020695686e-03</internalNodes>\n          <leafValues>\n            -6.1537498235702515e-01 -3.5319998860359192e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1872 7.3770000599324703e-03</internalNodes>\n          <leafValues>\n            -6.5591000020503998e-02 4.1961398720741272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1873 7.0779998786747456e-03</internalNodes>\n          <leafValues>\n            -3.4129500389099121e-01 1.2536799907684326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1874 -1.5581999905407429e-02</internalNodes>\n          <leafValues>\n            -3.0240398645401001e-01 2.1511000394821167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1875 -2.7399999089539051e-03</internalNodes>\n          <leafValues>\n            7.6553001999855042e-02 -4.1060501337051392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1876 -7.0600003004074097e-02</internalNodes>\n          <leafValues>\n            -9.7356200218200684e-01 1.1241800338029861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1877 -1.1706000193953514e-02</internalNodes>\n          <leafValues>\n            1.8560700118541718e-01 -2.9755198955535889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1878 7.1499997284263372e-04</internalNodes>\n          <leafValues>\n            -5.9650000184774399e-02 2.4824699759483337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1879 -3.6866001784801483e-02</internalNodes>\n          <leafValues>\n            3.2751700282096863e-01 -2.3059600591659546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1880 -3.2526999711990356e-02</internalNodes>\n          <leafValues>\n            -2.9320299625396729e-01 1.5427699685096741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1881 -7.4813999235630035e-02</internalNodes>\n          <leafValues>\n            -1.2143570184707642e+00 -5.2244000136852264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1882 4.1469998657703400e-02</internalNodes>\n          <leafValues>\n            1.3062499463558197e-01 -2.3274369239807129e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1883 -2.8880000114440918e-02</internalNodes>\n          <leafValues>\n            -6.6074597835540771e-01 -9.0960003435611725e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1884 4.6381998807191849e-02</internalNodes>\n          <leafValues>\n            1.6630199551582336e-01 -6.6949498653411865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1885 2.5424998998641968e-01</internalNodes>\n          <leafValues>\n            -5.4641999304294586e-02 -1.2676080465316772e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1886 2.4000001139938831e-03</internalNodes>\n          <leafValues>\n            2.0276799798011780e-01 1.4667999930679798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1887 -8.2805998623371124e-02</internalNodes>\n          <leafValues>\n            -7.8713601827621460e-01 -2.4468999356031418e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1888 -1.1438000015914440e-02</internalNodes>\n          <leafValues>\n            2.8623399138450623e-01 -3.0894000083208084e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1889 -1.2913399934768677e-01</internalNodes>\n          <leafValues>\n            1.7292929887771606e+00 -1.4293900132179260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1890 3.8552999496459961e-02</internalNodes>\n          <leafValues>\n            1.9232999533414841e-02 3.7732601165771484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1891 1.0191400349140167e-01</internalNodes>\n          <leafValues>\n            -7.4533998966217041e-02 -3.3868899345397949e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1892 -1.9068000838160515e-02</internalNodes>\n          <leafValues>\n            3.1814101338386536e-01 1.9261000677943230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1893 -6.0775000602006912e-02</internalNodes>\n          <leafValues>\n            7.6936298608779907e-01 -1.7644000053405762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1894 2.4679999798536301e-02</internalNodes>\n          <leafValues>\n            1.8396499752998352e-01 -3.0868801474571228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1895 2.6759000495076180e-02</internalNodes>\n          <leafValues>\n            -2.3454900085926056e-01 3.3056598901748657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1896 1.4969999901950359e-02</internalNodes>\n          <leafValues>\n            1.7213599383831024e-01 -1.8248899281024933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1897 2.6142999529838562e-02</internalNodes>\n          <leafValues>\n            -4.6463999897241592e-02 -1.1318379640579224e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1898 -3.7512000650167465e-02</internalNodes>\n          <leafValues>\n            8.0404001474380493e-01 6.9660000503063202e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1899 -5.3229997865855694e-03</internalNodes>\n          <leafValues>\n            -8.1884402036666870e-01 -1.8224999308586121e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1900 1.7813000828027725e-02</internalNodes>\n          <leafValues>\n            1.4957800507545471e-01 -1.8667200207710266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1901 -3.4010000526905060e-02</internalNodes>\n          <leafValues>\n            -7.2852301597595215e-01 -1.6615999862551689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1902 -1.5953000634908676e-02</internalNodes>\n          <leafValues>\n            5.6944000720977783e-01 1.3832000084221363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1903 1.9743999466300011e-02</internalNodes>\n          <leafValues>\n            4.0525000542402267e-02 -4.1773399710655212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1904 -1.0374800115823746e-01</internalNodes>\n          <leafValues>\n            -1.9825149774551392e+00 1.1960200220346451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1905 -1.9285000860691071e-02</internalNodes>\n          <leafValues>\n            5.0230598449707031e-01 -1.9745899736881256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1906 -1.2780000455677509e-02</internalNodes>\n          <leafValues>\n            4.0195000171661377e-01 -2.6957999914884567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1907 -1.6352999955415726e-02</internalNodes>\n          <leafValues>\n            -7.6608800888061523e-01 -2.4209000170230865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1908 -1.2763699889183044e-01</internalNodes>\n          <leafValues>\n            8.6578500270843506e-01 6.4205996692180634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1909 1.9068999215960503e-02</internalNodes>\n          <leafValues>\n            -5.5929797887802124e-01 -1.6880000475794077e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1910 3.2480999827384949e-02</internalNodes>\n          <leafValues>\n            4.0722001343965530e-02 4.8925098776817322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1911 9.4849998131394386e-03</internalNodes>\n          <leafValues>\n            -1.9231900572776794e-01 5.1139700412750244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1912 5.0470000132918358e-03</internalNodes>\n          <leafValues>\n            1.8706800043582916e-01 -1.6113600134849548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1913 4.1267998516559601e-02</internalNodes>\n          <leafValues>\n            -4.8817999660968781e-02 -1.1326299905776978e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1914 -7.6358996331691742e-02</internalNodes>\n          <leafValues>\n            1.4169390201568604e+00 8.7319999933242798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1915 -7.2834998369216919e-02</internalNodes>\n          <leafValues>\n            1.3189860582351685e+00 -1.4819100499153137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1916 5.9576999396085739e-02</internalNodes>\n          <leafValues>\n            4.8376999795436859e-02 8.5611802339553833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1917 2.0263999700546265e-02</internalNodes>\n          <leafValues>\n            -2.1044099330902100e-01 3.3858999609947205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1918 -8.0301001667976379e-02</internalNodes>\n          <leafValues>\n            -1.2464400529861450e+00 1.1857099831104279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1919 -1.7835000529885292e-02</internalNodes>\n          <leafValues>\n            2.5782299041748047e-01 -2.4564799666404724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1920 1.1431000195443630e-02</internalNodes>\n          <leafValues>\n            2.2949799895286560e-01 -2.9497599601745605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1921 -2.5541000068187714e-02</internalNodes>\n          <leafValues>\n            -8.6252999305725098e-01 -7.0400000549852848e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1922 -7.6899997657164931e-04</internalNodes>\n          <leafValues>\n            3.1511399149894714e-01 -1.4349000155925751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1923 -1.4453999698162079e-02</internalNodes>\n          <leafValues>\n            2.5148499011993408e-01 -2.8232899308204651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1924 8.6730001494288445e-03</internalNodes>\n          <leafValues>\n            2.6601400971412659e-01 -2.8190800547599792e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>197</maxWeakCount>\n      <stageThreshold>-3.2772979736328125e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1925 5.4708998650312424e-02</internalNodes>\n          <leafValues>\n            -5.4144299030303955e-01 6.1043000221252441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1926 -1.0838799923658371e-01</internalNodes>\n          <leafValues>\n            7.1739900112152100e-01 -4.1196098923683167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1927 2.2996999323368073e-02</internalNodes>\n          <leafValues>\n            -5.8269798755645752e-01 2.9645600914955139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1928 2.7540000155568123e-03</internalNodes>\n          <leafValues>\n            -7.4243897199630737e-01 1.4183300733566284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1929 -2.1520000882446766e-03</internalNodes>\n          <leafValues>\n            1.7879900336265564e-01 -6.8548601865768433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1930 -2.2559000179171562e-02</internalNodes>\n          <leafValues>\n            -1.0775549411773682e+00 1.2388999760150909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1931 8.3025000989437103e-02</internalNodes>\n          <leafValues>\n            2.4500999599695206e-02 -1.0251879692077637e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1932 -6.6740000620484352e-03</internalNodes>\n          <leafValues>\n            -4.5283100008964539e-01 2.1230199933052063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1933 7.6485000550746918e-02</internalNodes>\n          <leafValues>\n            -2.6972699165344238e-01 4.8580199480056763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1934 5.4910001344978809e-03</internalNodes>\n          <leafValues>\n            -4.8871201276779175e-01 3.1616398692131042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1935 -1.0414999909698963e-02</internalNodes>\n          <leafValues>\n            4.1512900590896606e-01 -3.0044800043106079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1936 2.7607999742031097e-02</internalNodes>\n          <leafValues>\n            1.6203799843788147e-01 -9.9868500232696533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1937 -2.3272000253200531e-02</internalNodes>\n          <leafValues>\n            -1.1024399995803833e+00 2.1124999970197678e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1938 -5.5619999766349792e-02</internalNodes>\n          <leafValues>\n            6.5033102035522461e-01 -2.7938000857830048e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1939 -4.0631998330354691e-02</internalNodes>\n          <leafValues>\n            4.2117300629615784e-01 -2.6763799786567688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1940 -7.3560001328587532e-03</internalNodes>\n          <leafValues>\n            3.5277798771858215e-01 -3.7854000926017761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1941 1.7007000744342804e-02</internalNodes>\n          <leafValues>\n            -2.9189500212669373e-01 4.1053798794746399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1942 -3.7034001201391220e-02</internalNodes>\n          <leafValues>\n            -1.3216309547424316e+00 1.2966500222682953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1943 -1.9633000716567039e-02</internalNodes>\n          <leafValues>\n            -8.7702298164367676e-01 1.0799999581649899e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1944 -2.3546999320387840e-02</internalNodes>\n          <leafValues>\n            2.6106101274490356e-01 -2.1481400728225708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1945 -4.3352998793125153e-02</internalNodes>\n          <leafValues>\n            -9.9089699983596802e-01 -9.9560003727674484e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1946 -2.2183999419212341e-02</internalNodes>\n          <leafValues>\n            6.3454401493072510e-01 -5.6547001004219055e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1947 1.6530999913811684e-02</internalNodes>\n          <leafValues>\n            2.4664999917149544e-02 -7.3326802253723145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1948 -3.2744001597166061e-02</internalNodes>\n          <leafValues>\n            -5.6297200918197632e-01 1.6640299558639526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1949 7.1415998041629791e-02</internalNodes>\n          <leafValues>\n            -3.0000001424923539e-04 -9.3286401033401489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1950 8.0999999772757292e-04</internalNodes>\n          <leafValues>\n            -9.5380000770092010e-02 2.5184699892997742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1951 -8.4090000018477440e-03</internalNodes>\n          <leafValues>\n            -6.5496802330017090e-01 6.7300997674465179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1952 -1.7254000529646873e-02</internalNodes>\n          <leafValues>\n            -4.6492999792098999e-01 1.6070899367332458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1953 -1.8641000613570213e-02</internalNodes>\n          <leafValues>\n            -1.0594010353088379e+00 -1.9617000594735146e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1954 -9.1979997232556343e-03</internalNodes>\n          <leafValues>\n            5.0716197490692139e-01 -1.5339200198650360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1955 1.8538000062108040e-02</internalNodes>\n          <leafValues>\n            -3.0498200654983521e-01 7.3506200313568115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1956 -5.0335001200437546e-02</internalNodes>\n          <leafValues>\n            -1.1140480041503906e+00 1.8000100553035736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1957 -2.3529000580310822e-02</internalNodes>\n          <leafValues>\n            -8.6907899379730225e-01 -1.2459999881684780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1958 -2.7100000530481339e-02</internalNodes>\n          <leafValues>\n            6.5942901372909546e-01 -3.5323999822139740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1959 6.5879998728632927e-03</internalNodes>\n          <leafValues>\n            -2.2953400015830994e-01 4.2425099015235901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1960 2.3360000923275948e-02</internalNodes>\n          <leafValues>\n            1.8356199562549591e-01 -9.8587298393249512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1961 1.2946999631822109e-02</internalNodes>\n          <leafValues>\n            -3.3147400617599487e-01 2.1323199570178986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1962 -6.6559999249875546e-03</internalNodes>\n          <leafValues>\n            -1.1951400339603424e-01 2.9752799868583679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1963 -2.2570999339222908e-02</internalNodes>\n          <leafValues>\n            3.8499400019645691e-01 -2.4434499442577362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1964 -6.3813999295234680e-02</internalNodes>\n          <leafValues>\n            -8.9383500814437866e-01 1.4217500388622284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1965 -4.9945000559091568e-02</internalNodes>\n          <leafValues>\n            5.3864401578903198e-01 -2.0485299825668335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1966 6.8319998681545258e-03</internalNodes>\n          <leafValues>\n            -5.6678999215364456e-02 3.9970999956130981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1967 -5.5835999548435211e-02</internalNodes>\n          <leafValues>\n            -1.5239470005035400e+00 -5.1183000206947327e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1968 3.1957000494003296e-01</internalNodes>\n          <leafValues>\n            7.4574001133441925e-02 1.2447799444198608e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1969 8.0955997109413147e-02</internalNodes>\n          <leafValues>\n            -1.9665500521659851e-01 5.9889698028564453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1970 -1.4911999925971031e-02</internalNodes>\n          <leafValues>\n            -6.4020597934722900e-01 1.5807600319385529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1971 4.6709001064300537e-02</internalNodes>\n          <leafValues>\n            8.5239000618457794e-02 -4.5487201213836670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1972 6.0539999976754189e-03</internalNodes>\n          <leafValues>\n            -4.3184000253677368e-01 2.2452600300312042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1973 -3.4375999122858047e-02</internalNodes>\n          <leafValues>\n            4.0202501416206360e-01 -2.3903599381446838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1974 -3.4924000501632690e-02</internalNodes>\n          <leafValues>\n            5.2870100736618042e-01 3.9709001779556274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1975 3.0030000489205122e-03</internalNodes>\n          <leafValues>\n            -3.8754299283027649e-01 1.4192600548267365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1976 -1.4132999815046787e-02</internalNodes>\n          <leafValues>\n            8.7528401613235474e-01 8.5507996380329132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1977 -6.7940000444650650e-03</internalNodes>\n          <leafValues>\n            -1.1649219989776611e+00 -3.3943001180887222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1978 -5.2886001765727997e-02</internalNodes>\n          <leafValues>\n            1.0930680036544800e+00 5.1187001168727875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1979 -2.1079999860376120e-03</internalNodes>\n          <leafValues>\n            1.3696199655532837e-01 -3.3849999308586121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1980 1.8353000283241272e-02</internalNodes>\n          <leafValues>\n            1.3661600649356842e-01 -4.0777799487113953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1981 1.2671999633312225e-02</internalNodes>\n          <leafValues>\n            -1.4936000108718872e-02 -8.1707501411437988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1982 1.2924999929964542e-02</internalNodes>\n          <leafValues>\n            1.7625099420547485e-01 -3.2491698861122131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1983 -1.7921000719070435e-02</internalNodes>\n          <leafValues>\n            -5.2745401859283447e-01 4.4443000108003616e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1984 1.9160000374540687e-03</internalNodes>\n          <leafValues>\n            -1.0978599637746811e-01 2.2067500650882721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1985 -1.4697999693453312e-02</internalNodes>\n          <leafValues>\n            3.9067798852920532e-01 -2.2224999964237213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1986 -1.4972999691963196e-02</internalNodes>\n          <leafValues>\n            -2.5450900197029114e-01 1.7790000140666962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1987 1.4636999927461147e-02</internalNodes>\n          <leafValues>\n            -2.5125000625848770e-02 -8.7121301889419556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1988 -1.0974000208079815e-02</internalNodes>\n          <leafValues>\n            7.9082798957824707e-01 2.0121000707149506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1989 -9.1599998995661736e-03</internalNodes>\n          <leafValues>\n            -4.7906899452209473e-01 5.2232000976800919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1990 4.6179997734725475e-03</internalNodes>\n          <leafValues>\n            -1.7244599759578705e-01 3.4527799487113953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1991 2.3476999253034592e-02</internalNodes>\n          <leafValues>\n            3.7760001141577959e-03 -6.5333700180053711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1992 3.1766999512910843e-02</internalNodes>\n          <leafValues>\n            1.6364000737667084e-02 5.8723700046539307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1993 -1.8419999629259109e-02</internalNodes>\n          <leafValues>\n            1.9993899762630463e-01 -3.2056498527526855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1994 1.9543999806046486e-02</internalNodes>\n          <leafValues>\n            1.8450200557708740e-01 -2.3793600499629974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1995 4.1159498691558838e-01</internalNodes>\n          <leafValues>\n            -6.0382001101970673e-02 -1.6072119474411011e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1996 -4.1595999151468277e-02</internalNodes>\n          <leafValues>\n            -3.2756200432777405e-01 1.5058000385761261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1997 -1.0335999540984631e-02</internalNodes>\n          <leafValues>\n            -6.2394398450851440e-01 1.3112000189721584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1998 1.2392999604344368e-02</internalNodes>\n          <leafValues>\n            -3.3114999532699585e-02 5.5579900741577148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1999 -8.7270000949501991e-03</internalNodes>\n          <leafValues>\n            1.9883200526237488e-01 -3.7635600566864014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2000 1.6295000910758972e-02</internalNodes>\n          <leafValues>\n            2.0373000204563141e-01 -4.2800799012184143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2001 -1.0483999736607075e-02</internalNodes>\n          <leafValues>\n            -5.6847000122070312e-01 4.4199001044034958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2002 -1.2431999668478966e-02</internalNodes>\n          <leafValues>\n            7.4641901254653931e-01 4.3678998947143555e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2003 -5.0374999642372131e-02</internalNodes>\n          <leafValues>\n            8.5090100765228271e-01 -1.7773799598217010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2004 4.9548000097274780e-02</internalNodes>\n          <leafValues>\n            1.6784900426864624e-01 -2.9877498745918274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2005 -4.1085001081228256e-02</internalNodes>\n          <leafValues>\n            -1.3302919864654541e+00 -4.9182001501321793e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2006 1.0069999843835831e-03</internalNodes>\n          <leafValues>\n            -6.0538999736309052e-02 1.8483200669288635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2007 -5.0142999738454819e-02</internalNodes>\n          <leafValues>\n            7.6447701454162598e-01 -1.8356999754905701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2008 -8.7879998609423637e-03</internalNodes>\n          <leafValues>\n            2.2655999660491943e-01 -6.3156999647617340e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2009 -5.0170999020338058e-02</internalNodes>\n          <leafValues>\n            -1.5899070501327515e+00 -6.1255000531673431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2010 1.0216099768877029e-01</internalNodes>\n          <leafValues>\n            1.2071800231933594e-01 -1.4120110273361206e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2011 -1.4372999779880047e-02</internalNodes>\n          <leafValues>\n            -1.3116970062255859e+00 -5.1936000585556030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2012 1.0281999595463276e-02</internalNodes>\n          <leafValues>\n            -2.1639999467879534e-03 4.4247201085090637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2013 -1.1814000084996223e-02</internalNodes>\n          <leafValues>\n            6.5378099679946899e-01 -1.8723699450492859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2014 7.2114996612071991e-02</internalNodes>\n          <leafValues>\n            7.1846999228000641e-02 8.1496298313140869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2015 -1.9001999869942665e-02</internalNodes>\n          <leafValues>\n            -6.7427200078964233e-01 -4.3200000072829425e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2016 -4.6990001574158669e-03</internalNodes>\n          <leafValues>\n            3.3311501145362854e-01 5.5794000625610352e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2017 -5.8157000690698624e-02</internalNodes>\n          <leafValues>\n            4.5572298765182495e-01 -2.0305100083351135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2018 1.1360000353306532e-03</internalNodes>\n          <leafValues>\n            -4.4686999171972275e-02 2.2681899368762970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2019 -4.9414999783039093e-02</internalNodes>\n          <leafValues>\n            2.6694598793983459e-01 -2.6116999983787537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2020 -1.1913800239562988e-01</internalNodes>\n          <leafValues>\n            -8.3017998933792114e-01 1.3248500227928162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2021 -1.8303999677300453e-02</internalNodes>\n          <leafValues>\n            -6.7499202489852905e-01 1.7092000693082809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2022 -7.9199997708201408e-03</internalNodes>\n          <leafValues>\n            -7.2287000715732574e-02 1.4425800740718842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2023 5.1925998181104660e-02</internalNodes>\n          <leafValues>\n            3.0921999365091324e-02 -5.5860602855682373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2024 6.6724002361297607e-02</internalNodes>\n          <leafValues>\n            1.3666400313377380e-01 -2.9411000013351440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2025 -1.3778000138700008e-02</internalNodes>\n          <leafValues>\n            -5.9443902969360352e-01 1.5300000086426735e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2026 -1.7760999500751495e-02</internalNodes>\n          <leafValues>\n            4.0496501326560974e-01 -3.3559999428689480e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2027 -4.2234998196363449e-02</internalNodes>\n          <leafValues>\n            -1.0897940397262573e+00 -4.0224999189376831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2028 -1.3524999842047691e-02</internalNodes>\n          <leafValues>\n            2.8921899199485779e-01 -2.5194799900054932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2029 -1.1106000281870365e-02</internalNodes>\n          <leafValues>\n            6.5312802791595459e-01 -1.8053700029850006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2030 -1.2284599989652634e-01</internalNodes>\n          <leafValues>\n            -1.9570649862289429e+00 1.4815400540828705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2031 4.7715999186038971e-02</internalNodes>\n          <leafValues>\n            -2.2875599563121796e-01 3.4233701229095459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2032 3.1817000359296799e-02</internalNodes>\n          <leafValues>\n            1.5976299345493317e-01 -1.0091969966888428e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2033 4.2570000514388084e-03</internalNodes>\n          <leafValues>\n            -3.8881298899650574e-01 8.4210000932216644e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2034 -6.1372999101877213e-02</internalNodes>\n          <leafValues>\n            1.7152810096740723e+00 5.9324998408555984e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2035 -2.7030000928789377e-03</internalNodes>\n          <leafValues>\n            -3.8161700963973999e-01 8.5127003490924835e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2036 -6.8544000387191772e-02</internalNodes>\n          <leafValues>\n            -3.0925889015197754e+00 1.1788000166416168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2037 1.0372500121593475e-01</internalNodes>\n          <leafValues>\n            -1.3769300282001495e-01 1.9009410142898560e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2038 1.5799000859260559e-02</internalNodes>\n          <leafValues>\n            -6.2660001218318939e-02 2.5917699933052063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2039 -9.8040001466870308e-03</internalNodes>\n          <leafValues>\n            -5.6291598081588745e-01 4.3923001736402512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2040 -9.0229995548725128e-03</internalNodes>\n          <leafValues>\n            2.5287100672721863e-01 -4.1225999593734741e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2041 -6.3754998147487640e-02</internalNodes>\n          <leafValues>\n            -2.6178569793701172e+00 -7.4005998671054840e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2042 3.8954999297857285e-02</internalNodes>\n          <leafValues>\n            5.9032998979091644e-02 8.5945600271224976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2043 -3.9802998304367065e-02</internalNodes>\n          <leafValues>\n            9.3600499629974365e-01 -1.5639400482177734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2044 5.0301998853683472e-02</internalNodes>\n          <leafValues>\n            1.3725900650024414e-01 -2.5549728870391846e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2045 4.6250000596046448e-02</internalNodes>\n          <leafValues>\n            -1.3964000158011913e-02 -7.1026200056076050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2046 6.2196001410484314e-02</internalNodes>\n          <leafValues>\n            5.9526000171899796e-02 1.6509100198745728e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2047 -6.4776003360748291e-02</internalNodes>\n          <leafValues>\n            7.1368998289108276e-01 -1.7270000278949738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2048 2.7522999793291092e-02</internalNodes>\n          <leafValues>\n            1.4631600677967072e-01 -8.1428997218608856e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2049 3.9900001138448715e-04</internalNodes>\n          <leafValues>\n            -3.7144500017166138e-01 1.0152699798345566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2050 -4.3299999088048935e-03</internalNodes>\n          <leafValues>\n            -2.3756299912929535e-01 2.6798400282859802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2051 4.7297000885009766e-02</internalNodes>\n          <leafValues>\n            -2.7682000771164894e-02 -8.4910297393798828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2052 1.2508999556303024e-02</internalNodes>\n          <leafValues>\n            1.8730199337005615e-01 -5.6001102924346924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2053 4.5899000018835068e-02</internalNodes>\n          <leafValues>\n            -1.5601199865341187e-01 9.7073000669479370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2054 1.9853399693965912e-01</internalNodes>\n          <leafValues>\n            1.4895500242710114e-01 -1.1015529632568359e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2055 1.6674999147653580e-02</internalNodes>\n          <leafValues>\n            -1.6615299880504608e-01 8.2210999727249146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2056 1.9829999655485153e-03</internalNodes>\n          <leafValues>\n            -7.1249999105930328e-02 2.8810900449752808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2057 2.2447999566793442e-02</internalNodes>\n          <leafValues>\n            -2.0981000736355782e-02 -7.8416502475738525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2058 -1.3913000002503395e-02</internalNodes>\n          <leafValues>\n            -1.8165799975395203e-01 2.0491799712181091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2059 -7.7659999951720238e-03</internalNodes>\n          <leafValues>\n            -4.5595899224281311e-01 6.3576996326446533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2060 -1.3209000229835510e-02</internalNodes>\n          <leafValues>\n            2.6632300019264221e-01 -1.7795999348163605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2061 4.9052998423576355e-02</internalNodes>\n          <leafValues>\n            -1.5476800501346588e-01 1.1069979667663574e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2062 2.0263999700546265e-02</internalNodes>\n          <leafValues>\n            6.8915002048015594e-02 6.9867497682571411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2063 -1.6828000545501709e-02</internalNodes>\n          <leafValues>\n            2.7607199549674988e-01 -2.5139200687408447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2064 -1.6939499974250793e-01</internalNodes>\n          <leafValues>\n            -3.0767529010772705e+00 1.1617500334978104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2065 -1.1336100101470947e-01</internalNodes>\n          <leafValues>\n            -1.4639229774475098e+00 -5.1447000354528427e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2066 -7.7685996890068054e-02</internalNodes>\n          <leafValues>\n            8.8430202007293701e-01 4.3306998908519745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2067 -1.5568000264465809e-02</internalNodes>\n          <leafValues>\n            1.3672499358654022e-01 -3.4505501389503479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2068 -6.6018998622894287e-02</internalNodes>\n          <leafValues>\n            -1.0300110578536987e+00 1.1601399630308151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2069 8.3699999377131462e-03</internalNodes>\n          <leafValues>\n            7.6429001986980438e-02 -4.4002500176429749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2070 3.5402998328208923e-02</internalNodes>\n          <leafValues>\n            1.1979500204324722e-01 -7.2668302059173584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2071 -3.9051000028848648e-02</internalNodes>\n          <leafValues>\n            6.7375302314758301e-01 -1.8196000158786774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2072 -9.7899995744228363e-03</internalNodes>\n          <leafValues>\n            2.1264599263668060e-01 3.6756001412868500e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2073 -2.3047000169754028e-02</internalNodes>\n          <leafValues>\n            4.4742199778556824e-01 -2.0986700057983398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2074 3.1169999856501818e-03</internalNodes>\n          <leafValues>\n            3.7544000893831253e-02 2.7808201313018799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2075 1.3136000372469425e-02</internalNodes>\n          <leafValues>\n            -1.9842399656772614e-01 5.4335701465606689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2076 1.4782000333070755e-02</internalNodes>\n          <leafValues>\n            1.3530600070953369e-01 -1.1153600364923477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2077 -6.0139000415802002e-02</internalNodes>\n          <leafValues>\n            8.4039300680160522e-01 -1.6711600124835968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2078 5.1998998969793320e-02</internalNodes>\n          <leafValues>\n            1.7372000217437744e-01 -7.8547602891921997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2079 2.4792000651359558e-02</internalNodes>\n          <leafValues>\n            -1.7739200592041016e-01 6.6752600669860840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2080 -1.2014999985694885e-02</internalNodes>\n          <leafValues>\n            -1.4263699948787689e-01 1.6070500016212463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2081 -9.8655998706817627e-02</internalNodes>\n          <leafValues>\n            1.0429769754409790e+00 -1.5770199894905090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2082 1.1758299916982651e-01</internalNodes>\n          <leafValues>\n            1.0955700278282166e-01 -4.4920377731323242e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2083 -1.8922999501228333e-02</internalNodes>\n          <leafValues>\n            -7.8543400764465332e-01 1.2984000146389008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2084 -2.8390999883413315e-02</internalNodes>\n          <leafValues>\n            -6.0569900274276733e-01 1.2903499603271484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2085 1.3182999566197395e-02</internalNodes>\n          <leafValues>\n            -1.4415999874472618e-02 -7.3210501670837402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2086 -1.1653000116348267e-01</internalNodes>\n          <leafValues>\n            -2.0442469120025635e+00 1.4053100347518921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2087 -3.8880000356584787e-03</internalNodes>\n          <leafValues>\n            -4.1861599683761597e-01 7.8704997897148132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2088 3.1229000538587570e-02</internalNodes>\n          <leafValues>\n            2.4632999673485756e-02 4.1870400309562683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2089 2.5198999792337418e-02</internalNodes>\n          <leafValues>\n            -1.7557799816131592e-01 6.4710599184036255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2090 -2.8124000877141953e-02</internalNodes>\n          <leafValues>\n            -2.2005599737167358e-01 1.4121000468730927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2091 3.6499001085758209e-02</internalNodes>\n          <leafValues>\n            -6.8426996469497681e-02 -2.3410849571228027e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2092 -7.2292998433113098e-02</internalNodes>\n          <leafValues>\n            1.2898750305175781e+00 8.4875002503395081e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2093 -4.1671000421047211e-02</internalNodes>\n          <leafValues>\n            -1.1630970239639282e+00 -5.3752999752759933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2094 4.7703001648187637e-02</internalNodes>\n          <leafValues>\n            7.0101000368595123e-02 7.3676502704620361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2095 6.5793000161647797e-02</internalNodes>\n          <leafValues>\n            -1.7755299806594849e-01 6.9780498743057251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2096 1.3904999941587448e-02</internalNodes>\n          <leafValues>\n            2.1936799585819244e-01 -2.0390799641609192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2097 -2.7730999514460564e-02</internalNodes>\n          <leafValues>\n            6.1867898702621460e-01 -1.7804099619388580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2098 -1.5879999846220016e-02</internalNodes>\n          <leafValues>\n            -4.6484100818634033e-01 1.8828600645065308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2099 7.4128001928329468e-02</internalNodes>\n          <leafValues>\n            -1.2858100235462189e-01 3.2792479991912842e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2100 -8.9000002481043339e-04</internalNodes>\n          <leafValues>\n            -3.0117601156234741e-01 2.3818799853324890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2101 1.7965000122785568e-02</internalNodes>\n          <leafValues>\n            -2.2284999489784241e-01 2.9954001307487488e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2102 -2.5380000006407499e-03</internalNodes>\n          <leafValues>\n            2.5064399838447571e-01 -1.3665600121021271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2103 -9.0680001303553581e-03</internalNodes>\n          <leafValues>\n            2.9017499089241028e-01 -2.8929701447486877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2104 4.9169998615980148e-02</internalNodes>\n          <leafValues>\n            1.9156399369239807e-01 -6.8328702449798584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2105 -3.0680999159812927e-02</internalNodes>\n          <leafValues>\n            -7.5677001476287842e-01 -1.3279999606311321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2106 1.0017400234937668e-01</internalNodes>\n          <leafValues>\n            8.4453999996185303e-02 1.0888710021972656e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2107 3.1950001139193773e-03</internalNodes>\n          <leafValues>\n            -2.6919400691986084e-01 1.9537900388240814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2108 3.5503000020980835e-02</internalNodes>\n          <leafValues>\n            1.3632300496101379e-01 -5.6917202472686768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2109 4.5900000259280205e-04</internalNodes>\n          <leafValues>\n            -4.0443998575210571e-01 1.4074799418449402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2110 2.5258999317884445e-02</internalNodes>\n          <leafValues>\n            1.6243200004100800e-01 -5.5741798877716064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2111 -5.1549999043345451e-03</internalNodes>\n          <leafValues>\n            3.1132599711418152e-01 -2.2756099700927734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2112 1.5869999770075083e-03</internalNodes>\n          <leafValues>\n            -2.6867699623107910e-01 1.9565400481224060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2113 -1.6204999759793282e-02</internalNodes>\n          <leafValues>\n            1.5486499667167664e-01 -3.4057798981666565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2114 -2.9624000191688538e-02</internalNodes>\n          <leafValues>\n            1.1466799974441528e+00 9.0557999908924103e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2115 -1.5930000226944685e-03</internalNodes>\n          <leafValues>\n            -7.1257501840591431e-01 -7.0400000549852848e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2116 -5.4019000381231308e-02</internalNodes>\n          <leafValues>\n            4.1537499427795410e-01 2.7246000245213509e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2117 -6.6211000084877014e-02</internalNodes>\n          <leafValues>\n            -1.3340090513229370e+00 -4.7352999448776245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2118 2.7940999716520309e-02</internalNodes>\n          <leafValues>\n            1.4446300268173218e-01 -5.1518398523330688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2119 2.8957000002264977e-02</internalNodes>\n          <leafValues>\n            -4.9966000020503998e-02 -1.1929039955139160e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2120 -2.0424999296665192e-02</internalNodes>\n          <leafValues>\n            6.3881301879882812e-01 3.8141001015901566e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2121 1.2416999787092209e-02</internalNodes>\n          <leafValues>\n            -2.1547000110149384e-01 4.9477699398994446e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>181</maxWeakCount>\n      <stageThreshold>-3.3196411132812500e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2122 4.3274000287055969e-02</internalNodes>\n          <leafValues>\n            -8.0494397878646851e-01 3.9897298812866211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2123 1.8615500628948212e-01</internalNodes>\n          <leafValues>\n            -3.1655299663543701e-01 6.8877297639846802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2124 3.1860999763011932e-02</internalNodes>\n          <leafValues>\n            -6.4266198873519897e-01 2.5550898909568787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2125 1.4022000133991241e-02</internalNodes>\n          <leafValues>\n            -4.5926600694656372e-01 3.1171199679374695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2126 -6.3029997982084751e-03</internalNodes>\n          <leafValues>\n            4.6026900410652161e-01 -2.7438500523567200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2127 -5.4310001432895660e-03</internalNodes>\n          <leafValues>\n            3.6608600616455078e-01 -2.7205801010131836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2128 1.6822999343276024e-02</internalNodes>\n          <leafValues>\n            2.3476999253034592e-02 -8.8443797826766968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2129 2.6039000600576401e-02</internalNodes>\n          <leafValues>\n            1.7488799989223480e-01 -5.4564702510833740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2130 -2.6720000430941582e-02</internalNodes>\n          <leafValues>\n            -9.6396499872207642e-01 2.3524999618530273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2131 -1.7041999846696854e-02</internalNodes>\n          <leafValues>\n            -7.0848798751831055e-01 2.1468099951744080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2132 5.9569999575614929e-03</internalNodes>\n          <leafValues>\n            7.3601000010967255e-02 -6.8225598335266113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2133 -2.8679999522864819e-03</internalNodes>\n          <leafValues>\n            -7.4935001134872437e-01 2.3803399503231049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2134 -4.3774999678134918e-02</internalNodes>\n          <leafValues>\n            6.8323302268981934e-01 -2.1380299329757690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2135 5.1633000373840332e-02</internalNodes>\n          <leafValues>\n            -1.2566499412059784e-01 6.7523801326751709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2136 8.1780003383755684e-03</internalNodes>\n          <leafValues>\n            7.0689998567104340e-02 -8.0665898323059082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2137 -5.2841998636722565e-02</internalNodes>\n          <leafValues>\n            9.5433902740478516e-01 1.6548000276088715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2138 5.2583999931812286e-02</internalNodes>\n          <leafValues>\n            -2.8414401412010193e-01 4.7129800915718079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2139 -1.2659000232815742e-02</internalNodes>\n          <leafValues>\n            3.8445401191711426e-01 -6.2288001179695129e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2140 1.1694000102579594e-02</internalNodes>\n          <leafValues>\n            5.6000000768108293e-05 -1.0173139572143555e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2141 -2.3918999359011650e-02</internalNodes>\n          <leafValues>\n            8.4921300411224365e-01 5.7399999350309372e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2142 -6.1673998832702637e-02</internalNodes>\n          <leafValues>\n            -9.2571401596069336e-01 -1.7679999582469463e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2143 -1.8279999494552612e-03</internalNodes>\n          <leafValues>\n            -5.4372298717498779e-01 2.4932399392127991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2144 3.5257998853921890e-02</internalNodes>\n          <leafValues>\n            -7.3719997890293598e-03 -9.3963998556137085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2145 -1.8438000231981277e-02</internalNodes>\n          <leafValues>\n            7.2136700153350830e-01 1.0491999797523022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2146 -3.8389001041650772e-02</internalNodes>\n          <leafValues>\n            1.9272600114345551e-01 -3.5832101106643677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2147 9.9720999598503113e-02</internalNodes>\n          <leafValues>\n            1.1354199796915054e-01 -1.6304190158843994e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2148 8.4462001919746399e-02</internalNodes>\n          <leafValues>\n            -5.3420998156070709e-02 -1.6981120109558105e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2149 4.0270000696182251e-02</internalNodes>\n          <leafValues>\n            -1.0783199965953827e-01 5.1926600933074951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2150 5.8935999870300293e-02</internalNodes>\n          <leafValues>\n            -1.8053700029850006e-01 9.5119798183441162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2151 1.4957000315189362e-01</internalNodes>\n          <leafValues>\n            1.6785299777984619e-01 -1.1591869592666626e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2152 6.9399998756125569e-04</internalNodes>\n          <leafValues>\n            2.0491400361061096e-01 -3.3118200302124023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2153 -3.3369001001119614e-02</internalNodes>\n          <leafValues>\n            9.3468099832534790e-01 -2.9639999847859144e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2154 9.3759996816515923e-03</internalNodes>\n          <leafValues>\n            3.7000000011175871e-03 -7.7549797296524048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2155 4.3193999677896500e-02</internalNodes>\n          <leafValues>\n            -2.2040000185370445e-03 7.4589699506759644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2156 -6.7555002868175507e-02</internalNodes>\n          <leafValues>\n            7.2292101383209229e-01 -1.8404200673103333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2157 -3.1168600916862488e-01</internalNodes>\n          <leafValues>\n            1.0014270544052124e+00 3.4003000706434250e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2158 2.9743999242782593e-02</internalNodes>\n          <leafValues>\n            -4.6356000006198883e-02 -1.2781809568405151e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2159 1.0737000033259392e-02</internalNodes>\n          <leafValues>\n            1.4812000095844269e-02 6.6649997234344482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2160 -2.8841000050306320e-02</internalNodes>\n          <leafValues>\n            -9.4222599267959595e-01 -2.0796999335289001e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2161 -5.7649998925626278e-03</internalNodes>\n          <leafValues>\n            -4.3541899323463440e-01 2.3386000096797943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2162 2.8410999104380608e-02</internalNodes>\n          <leafValues>\n            -1.7615799605846405e-01 8.5765302181243896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2163 -2.9007999226450920e-02</internalNodes>\n          <leafValues>\n            5.7978099584579468e-01 2.8565999120473862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2164 2.4965999647974968e-02</internalNodes>\n          <leafValues>\n            -2.2729000076651573e-02 -9.6773099899291992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2165 1.2036000378429890e-02</internalNodes>\n          <leafValues>\n            -1.4214700460433960e-01 5.1687997579574585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2166 -4.2514000087976456e-02</internalNodes>\n          <leafValues>\n            9.7273802757263184e-01 -1.8119800090789795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2167 1.0276000015437603e-02</internalNodes>\n          <leafValues>\n            -8.3099998533725739e-02 3.1762799620628357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2168 -6.9191999733448029e-02</internalNodes>\n          <leafValues>\n            -2.0668580532073975e+00 -6.0173999518156052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2169 -4.6769999898970127e-03</internalNodes>\n          <leafValues>\n            4.4131800532341003e-01 2.3209000006318092e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2170 -1.3923999853432178e-02</internalNodes>\n          <leafValues>\n            2.8606700897216797e-01 -2.9152700304985046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2171 -1.5333999879658222e-02</internalNodes>\n          <leafValues>\n            -5.7414501905441284e-01 2.3063300549983978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2172 -1.0239000432193279e-02</internalNodes>\n          <leafValues>\n            3.4479200839996338e-01 -2.6080399751663208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2173 -5.0988998264074326e-02</internalNodes>\n          <leafValues>\n            5.6154102087020874e-01 6.1218999326229095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2174 3.0689999461174011e-02</internalNodes>\n          <leafValues>\n            -1.4772799611091614e-01 1.6378489732742310e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2175 -1.1223999783396721e-02</internalNodes>\n          <leafValues>\n            2.4006199836730957e-01 -4.4864898920059204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2176 -6.2899999320507050e-03</internalNodes>\n          <leafValues>\n            4.3119499087333679e-01 -2.3808999359607697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2177 7.8590996563434601e-02</internalNodes>\n          <leafValues>\n            1.9865000620484352e-02 8.0853801965713501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2178 -1.0178999975323677e-02</internalNodes>\n          <leafValues>\n            1.8193200230598450e-01 -3.2877799868583679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2179 3.1227000057697296e-02</internalNodes>\n          <leafValues>\n            1.4973899722099304e-01 -1.4180339574813843e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2180 4.0196999907493591e-02</internalNodes>\n          <leafValues>\n            -1.9760499894618988e-01 5.8508199453353882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2181 1.6138000413775444e-02</internalNodes>\n          <leafValues>\n            5.0000002374872565e-04 3.9050000905990601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2182 -4.5519001781940460e-02</internalNodes>\n          <leafValues>\n            1.2646820545196533e+00 -1.5632599592208862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2183 -1.8130000680685043e-02</internalNodes>\n          <leafValues>\n            6.5148502588272095e-01 1.0235999710857868e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2184 -1.4001999981701374e-02</internalNodes>\n          <leafValues>\n            -1.0344820022583008e+00 -3.2182998955249786e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2185 -3.8816001266241074e-02</internalNodes>\n          <leafValues>\n            -4.7874298691749573e-01 1.6290700435638428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2186 3.1656000763177872e-02</internalNodes>\n          <leafValues>\n            -2.0983399450778961e-01 5.4575902223587036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2187 -1.0839999653398991e-02</internalNodes>\n          <leafValues>\n            5.1898801326751709e-01 -1.5080000273883343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2188 1.2032999657094479e-02</internalNodes>\n          <leafValues>\n            -2.1107600629329681e-01 7.5937002897262573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2189 7.0772998034954071e-02</internalNodes>\n          <leafValues>\n            1.8048800528049469e-01 -7.4048501253128052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2190 5.3139799833297729e-01</internalNodes>\n          <leafValues>\n            -1.4491699635982513e-01 1.5360039472579956e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2191 -1.4774000272154808e-02</internalNodes>\n          <leafValues>\n            -2.8153699636459351e-01 2.0407299697399139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2192 -2.2410000674426556e-03</internalNodes>\n          <leafValues>\n            -4.4876301288604736e-01 5.3989000618457794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2193 4.9968000501394272e-02</internalNodes>\n          <leafValues>\n            4.1514001786708832e-02 2.9417100548744202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2194 -4.7701999545097351e-02</internalNodes>\n          <leafValues>\n            3.9674299955368042e-01 -2.8301799297332764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2195 -9.1311000287532806e-02</internalNodes>\n          <leafValues>\n            2.1994259357452393e+00 8.7964996695518494e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2196 3.8070000708103180e-02</internalNodes>\n          <leafValues>\n            -2.8025600314140320e-01 2.5156199932098389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2197 -1.5538999810814857e-02</internalNodes>\n          <leafValues>\n            3.4157499670982361e-01 1.7924999818205833e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2198 -1.5445999801158905e-02</internalNodes>\n          <leafValues>\n            2.8680199384689331e-01 -2.5135898590087891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2199 -5.7388000190258026e-02</internalNodes>\n          <leafValues>\n            6.3830000162124634e-01 8.8597998023033142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2200 -5.9440000914037228e-03</internalNodes>\n          <leafValues>\n            7.9016998410224915e-02 -4.0774899721145630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2201 -6.9968998432159424e-02</internalNodes>\n          <leafValues>\n            -4.4644200801849365e-01 1.7219600081443787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2202 -2.5064999237656593e-02</internalNodes>\n          <leafValues>\n            -9.8270201683044434e-01 -3.5388000309467316e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2203 1.7216000705957413e-02</internalNodes>\n          <leafValues>\n            2.2705900669097900e-01 -8.0550098419189453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2204 -4.4279001653194427e-02</internalNodes>\n          <leafValues>\n            8.3951997756958008e-01 -1.7429600656032562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2205 4.3988998979330063e-02</internalNodes>\n          <leafValues>\n            1.1557199805974960e-01 -1.9666889905929565e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2206 1.5907000750303268e-02</internalNodes>\n          <leafValues>\n            -3.7576001137495041e-02 -1.0311100482940674e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2207 -9.2754997313022614e-02</internalNodes>\n          <leafValues>\n            -1.3530019521713257e+00 1.2141299992799759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2208 7.1037001907825470e-02</internalNodes>\n          <leafValues>\n            -1.7684300243854523e-01 7.4485200643539429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2209 5.7762000709772110e-02</internalNodes>\n          <leafValues>\n            1.2835599482059479e-01 -4.4444200396537781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2210 -1.6432000324130058e-02</internalNodes>\n          <leafValues>\n            8.0152702331542969e-01 -1.7491699755191803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2211 2.3939000442624092e-02</internalNodes>\n          <leafValues>\n            1.6144999861717224e-01 -1.2364500015974045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2212 1.2636000290513039e-02</internalNodes>\n          <leafValues>\n            1.5411999821662903e-01 -3.3293798565864563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2213 -5.4347999393939972e-02</internalNodes>\n          <leafValues>\n            -1.8400700092315674e+00 1.4835999906063080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2214 -1.3261999934911728e-02</internalNodes>\n          <leafValues>\n            -8.0838799476623535e-01 -2.7726000174880028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2215 6.1340001411736012e-03</internalNodes>\n          <leafValues>\n            -1.3785000145435333e-01 3.2858499884605408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2216 2.8991000726819038e-02</internalNodes>\n          <leafValues>\n            -2.5516999885439873e-02 -8.3387202024459839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2217 -2.1986000239849091e-02</internalNodes>\n          <leafValues>\n            -7.3739999532699585e-01 1.7887100577354431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2218 5.3269998170435429e-03</internalNodes>\n          <leafValues>\n            -4.5449298620223999e-01 6.8791002035140991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2219 8.6047999560832977e-02</internalNodes>\n          <leafValues>\n            2.1008500456809998e-01 -3.7808901071548462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2220 -8.5549997165799141e-03</internalNodes>\n          <leafValues>\n            4.0134999155998230e-01 -2.1074099838733673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2221 6.7790001630783081e-03</internalNodes>\n          <leafValues>\n            -2.1648999303579330e-02 4.5421499013900757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2222 -6.3959998078644276e-03</internalNodes>\n          <leafValues>\n            -4.9818599224090576e-01 7.5907997786998749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2223 8.9469999074935913e-03</internalNodes>\n          <leafValues>\n            1.7857700586318970e-01 -2.8454899787902832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2224 3.2589999027550220e-03</internalNodes>\n          <leafValues>\n            4.6624999493360519e-02 -5.5206298828125000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2225 4.1476998478174210e-02</internalNodes>\n          <leafValues>\n            1.7550499737262726e-01 -2.0703999698162079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2226 -6.7449999041855335e-03</internalNodes>\n          <leafValues>\n            -4.6392598748207092e-01 6.9303996860980988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2227 3.0564999207854271e-02</internalNodes>\n          <leafValues>\n            5.1734998822212219e-02 7.5550502538681030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2228 -7.4780001305043697e-03</internalNodes>\n          <leafValues>\n            1.4893899857997894e-01 -3.1906801462173462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2229 8.9088998734951019e-02</internalNodes>\n          <leafValues>\n            1.3738800585269928e-01 -1.1379710435867310e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2230 7.3230001144111156e-03</internalNodes>\n          <leafValues>\n            -2.8829199075698853e-01 1.9088600575923920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2231 -1.8205000087618828e-02</internalNodes>\n          <leafValues>\n            -3.0178600549697876e-01 1.6795800626277924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2232 -2.5828000158071518e-02</internalNodes>\n          <leafValues>\n            -9.8137998580932617e-01 -1.9860999658703804e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2233 1.0936199873685837e-01</internalNodes>\n          <leafValues>\n            4.8790000379085541e-02 5.3118300437927246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2234 -1.1424999684095383e-02</internalNodes>\n          <leafValues>\n            2.3705999553203583e-01 -2.7925300598144531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2235 -5.7565998286008835e-02</internalNodes>\n          <leafValues>\n            4.7255399823188782e-01 6.5171003341674805e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2236 1.0278300195932388e-01</internalNodes>\n          <leafValues>\n            -2.0765100419521332e-01 5.0947701930999756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2237 2.7041999623179436e-02</internalNodes>\n          <leafValues>\n            1.6421200335025787e-01 -1.4508620500564575e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2238 -1.3635000213980675e-02</internalNodes>\n          <leafValues>\n            -5.6543898582458496e-01 2.3788999766111374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2239 -3.2158198952674866e-01</internalNodes>\n          <leafValues>\n            -3.5602829456329346e+00 1.1801300197839737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2240 2.0458100736141205e-01</internalNodes>\n          <leafValues>\n            -3.7016000598669052e-02 -1.0225499868392944e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2241 -7.0347003638744354e-02</internalNodes>\n          <leafValues>\n            -5.6491899490356445e-01 1.8525199592113495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2242 3.7831000983715057e-02</internalNodes>\n          <leafValues>\n            -2.9901999980211258e-02 -8.2921499013900757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2243 -7.0298001170158386e-02</internalNodes>\n          <leafValues>\n            -5.3172302246093750e-01 1.4430199563503265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2244 6.3221000134944916e-02</internalNodes>\n          <leafValues>\n            -2.2041200101375580e-01 4.7952198982238770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2245 3.6393001675605774e-02</internalNodes>\n          <leafValues>\n            1.4222699403762817e-01 -6.1193901300430298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2246 4.0099998004734516e-03</internalNodes>\n          <leafValues>\n            -3.4560799598693848e-01 1.1738699674606323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2247 -4.9106001853942871e-02</internalNodes>\n          <leafValues>\n            9.5984101295471191e-01 6.4934998750686646e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2248 -7.1583002805709839e-02</internalNodes>\n          <leafValues>\n            1.7385669946670532e+00 -1.4252899587154388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2249 -3.8008999079465866e-02</internalNodes>\n          <leafValues>\n            1.3872820138931274e+00 6.6188000142574310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2250 -3.1570000573992729e-03</internalNodes>\n          <leafValues>\n            5.3677000105381012e-02 -5.4048001766204834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2251 1.9458999857306480e-02</internalNodes>\n          <leafValues>\n            -9.3620002269744873e-02 3.9131000638008118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2252 1.1293999850749969e-02</internalNodes>\n          <leafValues>\n            3.7223998457193375e-02 -5.4251801967620850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2253 -3.3495001494884491e-02</internalNodes>\n          <leafValues>\n            9.5307898521423340e-01 3.7696998566389084e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2254 9.2035003006458282e-02</internalNodes>\n          <leafValues>\n            -1.3488399982452393e-01 2.2897069454193115e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2255 3.7529999390244484e-03</internalNodes>\n          <leafValues>\n            2.2824199497699738e-01 -5.9983700513839722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2256 1.2848000042140484e-02</internalNodes>\n          <leafValues>\n            -2.2005200386047363e-01 3.7221899628639221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2257 -1.4316199719905853e-01</internalNodes>\n          <leafValues>\n            1.2855789661407471e+00 4.7237001359462738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2258 -9.6879996359348297e-02</internalNodes>\n          <leafValues>\n            -3.9550929069519043e+00 -7.2903998196125031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2259 -8.8459998369216919e-03</internalNodes>\n          <leafValues>\n            3.7674999237060547e-01 -4.6484000980854034e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2260 1.5900000929832458e-02</internalNodes>\n          <leafValues>\n            -2.4457000195980072e-02 -8.0034798383712769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2261 7.0372000336647034e-02</internalNodes>\n          <leafValues>\n            1.7019000649452209e-01 -6.3068997859954834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2262 -3.7953998893499374e-02</internalNodes>\n          <leafValues>\n            -9.3667197227478027e-01 -4.1214000433683395e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2263 5.1597899198532104e-01</internalNodes>\n          <leafValues>\n            1.3080599904060364e-01 -1.5802290439605713e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2264 -3.2843001186847687e-02</internalNodes>\n          <leafValues>\n            -1.1441620588302612e+00 -4.9173999577760696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2265 -3.6357000470161438e-02</internalNodes>\n          <leafValues>\n            4.9606400728225708e-01 -3.4458998590707779e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2266 6.8080001510679722e-03</internalNodes>\n          <leafValues>\n            -3.0997800827026367e-01 1.7054800689220428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2267 -1.6114000231027603e-02</internalNodes>\n          <leafValues>\n            -3.7904599308967590e-01 1.6078999638557434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2268 8.4530003368854523e-03</internalNodes>\n          <leafValues>\n            -1.8655499815940857e-01 5.6367701292037964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2269 -1.3752399384975433e-01</internalNodes>\n          <leafValues>\n            -5.8989900350570679e-01 1.1749500036239624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2270 1.7688000202178955e-01</internalNodes>\n          <leafValues>\n            -1.5424899756908417e-01 9.2911100387573242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2271 7.9309996217489243e-03</internalNodes>\n          <leafValues>\n            3.2190701365470886e-01 -1.6392600536346436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2272 1.0971800237894058e-01</internalNodes>\n          <leafValues>\n            -1.5876500308513641e-01 1.0186259746551514e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2273 -3.0293000862002373e-02</internalNodes>\n          <leafValues>\n            7.5587302446365356e-01 3.1794998794794083e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2274 -2.3118000477552414e-02</internalNodes>\n          <leafValues>\n            -8.8451498746871948e-01 -9.5039997249841690e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2275 -3.0900000128895044e-03</internalNodes>\n          <leafValues>\n            2.3838299512863159e-01 -1.1606200039386749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2276 -3.3392000943422318e-02</internalNodes>\n          <leafValues>\n            -1.8738139867782593e+00 -6.8502999842166901e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2277 1.3190000317990780e-02</internalNodes>\n          <leafValues>\n            1.2919899821281433e-01 -6.7512202262878418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2278 1.4661000110208988e-02</internalNodes>\n          <leafValues>\n            -2.4829000234603882e-02 -7.4396800994873047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2279 -1.3248000293970108e-02</internalNodes>\n          <leafValues>\n            4.6820199489593506e-01 -2.4165000766515732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2280 -1.6218999400734901e-02</internalNodes>\n          <leafValues>\n            4.0083798766136169e-01 -2.1255700290203094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2281 -2.9052000492811203e-02</internalNodes>\n          <leafValues>\n            -1.5650019645690918e+00 1.4375899732112885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2282 -1.0153199732303619e-01</internalNodes>\n          <leafValues>\n            -1.9220689535140991e+00 -6.9559998810291290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2283 3.7753999233245850e-02</internalNodes>\n          <leafValues>\n            1.3396799564361572e-01 -2.2639141082763672e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2284 -2.8555598855018616e-01</internalNodes>\n          <leafValues>\n            1.0215270519256592e+00 -1.5232199430465698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2285 1.5360699594020844e-01</internalNodes>\n          <leafValues>\n            -9.7409002482891083e-02 4.1662400960922241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2286 -2.1199999901000410e-04</internalNodes>\n          <leafValues>\n            1.1271899938583374e-01 -4.1653999686241150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2287 -2.0597999915480614e-02</internalNodes>\n          <leafValues>\n            6.0540497303009033e-01 6.2467999756336212e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2288 3.7353999912738800e-02</internalNodes>\n          <leafValues>\n            -1.8919000029563904e-01 4.6464699506759644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2289 5.7275000959634781e-02</internalNodes>\n          <leafValues>\n            1.1565300077199936e-01 -1.3213009834289551e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2290 5.1029999740421772e-03</internalNodes>\n          <leafValues>\n            -2.8061500191688538e-01 1.9313399493694305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2291 -5.4644998162984848e-02</internalNodes>\n          <leafValues>\n            7.2428500652313232e-01 7.5447998940944672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2292 2.5349000468850136e-02</internalNodes>\n          <leafValues>\n            -1.9481800496578217e-01 4.6032801270484924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2293 2.4311000481247902e-02</internalNodes>\n          <leafValues>\n            1.5564100444316864e-01 -4.9913901090621948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2294 3.5962000489234924e-02</internalNodes>\n          <leafValues>\n            -5.8573000133037567e-02 -1.5418399572372437e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2295 -1.0000699758529663e-01</internalNodes>\n          <leafValues>\n            -1.6100039482116699e+00 1.1450500041246414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2296 8.4435999393463135e-02</internalNodes>\n          <leafValues>\n            -6.1406999826431274e-02 -1.4673349857330322e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2297 1.5947999432682991e-02</internalNodes>\n          <leafValues>\n            1.6287900507450104e-01 -1.1026400327682495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2298 3.3824000507593155e-02</internalNodes>\n          <leafValues>\n            -1.7932699620723724e-01 5.7218402624130249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2299 -6.1996001750230789e-02</internalNodes>\n          <leafValues>\n            4.6511812210083008e+00 9.4534002244472504e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2300 6.9876998662948608e-02</internalNodes>\n          <leafValues>\n            -1.6985900700092316e-01 8.7028998136520386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2301 -2.7916999533772469e-02</internalNodes>\n          <leafValues>\n            9.1042500734329224e-01 5.6827001273632050e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2302 -1.2764000333845615e-02</internalNodes>\n          <leafValues>\n            2.2066700458526611e-01 -2.7769100666046143e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>199</maxWeakCount>\n      <stageThreshold>-3.2573320865631104e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2303 2.1662000566720963e-02</internalNodes>\n          <leafValues>\n            -8.9868897199630737e-01 2.9436299204826355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2304 1.0044500231742859e-01</internalNodes>\n          <leafValues>\n            -3.7659201025962830e-01 6.0891002416610718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2305 2.6003999635577202e-02</internalNodes>\n          <leafValues>\n            -3.8128501176834106e-01 3.9217400550842285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2306 2.8441000729799271e-02</internalNodes>\n          <leafValues>\n            -1.8182300031185150e-01 5.8927202224731445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2307 3.8612000644207001e-02</internalNodes>\n          <leafValues>\n            -2.2399599850177765e-01 6.3779997825622559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2308 -4.6594999730587006e-02</internalNodes>\n          <leafValues>\n            7.0812201499938965e-01 -1.4666199684143066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2309 -4.2791999876499176e-02</internalNodes>\n          <leafValues>\n            4.7680398821830750e-01 -2.9233199357986450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2310 3.7960000336170197e-03</internalNodes>\n          <leafValues>\n            -1.8510299921035767e-01 5.2626699209213257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2311 4.2348999530076981e-02</internalNodes>\n          <leafValues>\n            3.9244998246431351e-02 -8.9197701215744019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2312 1.9598999992012978e-02</internalNodes>\n          <leafValues>\n            -2.3358400166034698e-01 4.4146499037742615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2313 8.7400001939386129e-04</internalNodes>\n          <leafValues>\n            -4.6063598990440369e-01 1.7689600586891174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2314 -4.3629999272525311e-03</internalNodes>\n          <leafValues>\n            3.3493199944496155e-01 -2.9893401265144348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2315 1.6973000019788742e-02</internalNodes>\n          <leafValues>\n            -1.6408699750900269e-01 1.5993679761886597e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2316 3.6063998937606812e-02</internalNodes>\n          <leafValues>\n            2.2601699829101562e-01 -5.3186100721359253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2317 -7.0864997804164886e-02</internalNodes>\n          <leafValues>\n            1.5220500528812408e-01 -4.1914600133895874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2318 -6.3075996935367584e-02</internalNodes>\n          <leafValues>\n            -1.4874019622802734e+00 1.2953700125217438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2319 2.9670000076293945e-02</internalNodes>\n          <leafValues>\n            -1.9145900011062622e-01 9.8184901475906372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2320 3.7873998284339905e-02</internalNodes>\n          <leafValues>\n            1.3459500670433044e-01 -5.6316298246383667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2321 -3.3289000391960144e-02</internalNodes>\n          <leafValues>\n            -1.0828030109405518e+00 -1.1504000052809715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2322 -3.1608998775482178e-02</internalNodes>\n          <leafValues>\n            -5.9224498271942139e-01 1.3394799828529358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2323 1.0740000288933516e-03</internalNodes>\n          <leafValues>\n            -4.9185800552368164e-01 9.4446003437042236e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2324 -7.1556001901626587e-02</internalNodes>\n          <leafValues>\n            5.9710198640823364e-01 -3.9553001523017883e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2325 -8.1170000135898590e-02</internalNodes>\n          <leafValues>\n            -1.1817820072174072e+00 -2.8254000470042229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2326 4.4860001653432846e-03</internalNodes>\n          <leafValues>\n            -6.1028099060058594e-01 2.2619099915027618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2327 -4.2176000773906708e-02</internalNodes>\n          <leafValues>\n            -1.1435619592666626e+00 -2.9001999646425247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2328 -6.5640002489089966e-02</internalNodes>\n          <leafValues>\n            -1.6470279693603516e+00 1.2810300290584564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2329 1.8188999965786934e-02</internalNodes>\n          <leafValues>\n            -3.1149399280548096e-01 2.5739601254463196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2330 -5.1520001143217087e-02</internalNodes>\n          <leafValues>\n            -6.9206899404525757e-01 1.5270799398422241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2331 -4.7150999307632446e-02</internalNodes>\n          <leafValues>\n            -7.1868300437927246e-01 2.6879999786615372e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2332 1.7488999292254448e-02</internalNodes>\n          <leafValues>\n            2.2371199727058411e-01 -5.5381798744201660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2333 -2.5264000520110130e-02</internalNodes>\n          <leafValues>\n            1.0319819450378418e+00 -1.7496499419212341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2334 -4.0745001286268234e-02</internalNodes>\n          <leafValues>\n            4.4961598515510559e-01 3.9349000900983810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2335 -3.7666998803615570e-02</internalNodes>\n          <leafValues>\n            -8.5475701093673706e-01 -1.2463999912142754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2336 -1.3411000370979309e-02</internalNodes>\n          <leafValues>\n            5.7845598459243774e-01 -1.7467999830842018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2337 -7.8999997640494257e-05</internalNodes>\n          <leafValues>\n            -3.7749201059341431e-01 1.3961799442768097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2338 -1.1415000073611736e-02</internalNodes>\n          <leafValues>\n            -2.6186600327491760e-01 2.3712499439716339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2339 3.7200000137090683e-02</internalNodes>\n          <leafValues>\n            -2.8626000508666039e-02 -1.2945239543914795e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2340 3.4050000831484795e-03</internalNodes>\n          <leafValues>\n            2.0531399548053741e-01 -1.8747499585151672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2341 -2.2483000531792641e-02</internalNodes>\n          <leafValues>\n            6.7027199268341064e-01 -1.9594000279903412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2342 2.3274999111890793e-02</internalNodes>\n          <leafValues>\n            1.7405399680137634e-01 -3.2746300101280212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2343 -1.3917000032961369e-02</internalNodes>\n          <leafValues>\n            -8.3954298496246338e-01 -6.3760001212358475e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2344 7.5429999269545078e-03</internalNodes>\n          <leafValues>\n            -3.4194998443126678e-02 5.8998197317123413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2345 -1.1539000086486340e-02</internalNodes>\n          <leafValues>\n            4.2142799496650696e-01 -2.3510499298572540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2346 5.2501998841762543e-02</internalNodes>\n          <leafValues>\n            6.9303996860980988e-02 7.3226499557495117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2347 5.2715998142957687e-02</internalNodes>\n          <leafValues>\n            -1.5688100457191467e-01 1.0907289981842041e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2348 -1.1726000346243382e-02</internalNodes>\n          <leafValues>\n            -7.0934301614761353e-01 1.6828800737857819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2349 9.5945999026298523e-02</internalNodes>\n          <leafValues>\n            -1.6192899644374847e-01 1.0072519779205322e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2350 -1.5871999785304070e-02</internalNodes>\n          <leafValues>\n            3.9008399844169617e-01 -5.3777001798152924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2351 3.4818001091480255e-02</internalNodes>\n          <leafValues>\n            1.7179999500513077e-02 -9.3941801786422729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2352 3.4791998565196991e-02</internalNodes>\n          <leafValues>\n            5.0462998449802399e-02 5.4465699195861816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2353 1.6284000128507614e-02</internalNodes>\n          <leafValues>\n            -2.6981300115585327e-01 4.0365299582481384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2354 -4.4319000095129013e-02</internalNodes>\n          <leafValues>\n            8.4399998188018799e-01 3.2882999628782272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2355 -5.5689997971057892e-03</internalNodes>\n          <leafValues>\n            1.5309399366378784e-01 -3.4959799051284790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2356 -6.5842002630233765e-02</internalNodes>\n          <leafValues>\n            -9.2711198329925537e-01 1.6800999641418457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2357 -7.3337003588676453e-02</internalNodes>\n          <leafValues>\n            5.1614499092102051e-01 -2.0236000418663025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2358 1.6450000926852226e-02</internalNodes>\n          <leafValues>\n            1.3950599730014801e-01 -4.9301299452781677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2359 -9.2630004510283470e-03</internalNodes>\n          <leafValues>\n            -9.0101999044418335e-01 -1.6116000711917877e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2360 5.9139998629689217e-03</internalNodes>\n          <leafValues>\n            1.9858199357986450e-01 -1.6731299459934235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2361 -8.4699998842552304e-04</internalNodes>\n          <leafValues>\n            9.4005003571510315e-02 -4.1570898890495300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2362 2.0532900094985962e-01</internalNodes>\n          <leafValues>\n            -6.0022000223398209e-02 7.0993602275848389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2363 -1.6883000731468201e-02</internalNodes>\n          <leafValues>\n            2.4392199516296387e-01 -3.0551800131797791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2364 -1.9111000001430511e-02</internalNodes>\n          <leafValues>\n            6.1229902505874634e-01 2.4252999573945999e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2365 -2.5962999090552330e-02</internalNodes>\n          <leafValues>\n            9.0764999389648438e-01 -1.6722099483013153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2366 -2.1762000396847725e-02</internalNodes>\n          <leafValues>\n            -3.1384700536727905e-01 2.0134599506855011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2367 -2.4119999259710312e-02</internalNodes>\n          <leafValues>\n            -6.6588401794433594e-01 7.4559999629855156e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2368 4.7129999846220016e-02</internalNodes>\n          <leafValues>\n            5.9533998370170593e-02 8.7804502248764038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2369 -4.5984998345375061e-02</internalNodes>\n          <leafValues>\n            8.0067998170852661e-01 -1.7252300679683685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2370 2.6507999747991562e-02</internalNodes>\n          <leafValues>\n            1.8774099647998810e-01 -6.0850602388381958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2371 -4.8615001142024994e-02</internalNodes>\n          <leafValues>\n            5.8644098043441772e-01 -1.9427700340747833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2372 -1.8562000244855881e-02</internalNodes>\n          <leafValues>\n            -2.5587901473045349e-01 1.6326199471950531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2373 1.2678000144660473e-02</internalNodes>\n          <leafValues>\n            -1.4228000305593014e-02 -7.6738101243972778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2374 -1.1919999960809946e-03</internalNodes>\n          <leafValues>\n            2.0495000481605530e-01 -1.1404299736022949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2375 -4.9088999629020691e-02</internalNodes>\n          <leafValues>\n            -1.0740849971771240e+00 -3.8940999656915665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2376 -1.7436999827623367e-02</internalNodes>\n          <leafValues>\n            -5.7973802089691162e-01 1.8584500253200531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2377 -1.4770000241696835e-02</internalNodes>\n          <leafValues>\n            -6.6150301694869995e-01 5.3119999356567860e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2378 -2.2905200719833374e-01</internalNodes>\n          <leafValues>\n            -4.8305100202560425e-01 1.2326399981975555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2379 -1.2707099318504333e-01</internalNodes>\n          <leafValues>\n            5.7452601194381714e-01 -1.9420400261878967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2380 1.0339000262320042e-02</internalNodes>\n          <leafValues>\n            -5.4641999304294586e-02 2.4501800537109375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2381 6.9010001607239246e-03</internalNodes>\n          <leafValues>\n            1.2180600315332413e-01 -3.8797399401664734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2382 2.9025399684906006e-01</internalNodes>\n          <leafValues>\n            1.0966199636459351e-01 -30.</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2383 -2.3804999887943268e-01</internalNodes>\n          <leafValues>\n            -1.7352679967880249e+00 -6.3809998333454132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2384 6.2481001019477844e-02</internalNodes>\n          <leafValues>\n            1.3523000478744507e-01 -7.0301097631454468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2385 4.7109997831285000e-03</internalNodes>\n          <leafValues>\n            -4.6984100341796875e-01 6.0341998934745789e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2386 -2.7815999463200569e-02</internalNodes>\n          <leafValues>\n            6.9807600975036621e-01 1.3719999697059393e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2387 -1.7020000144839287e-02</internalNodes>\n          <leafValues>\n            1.6870440244674683e+00 -1.4314800500869751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2388 -4.9754999577999115e-02</internalNodes>\n          <leafValues>\n            7.9497700929641724e-01 7.7199999941512942e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2389 -7.4732996523380280e-02</internalNodes>\n          <leafValues>\n            -1.0132360458374023e+00 -1.9388999789953232e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2390 3.2009001821279526e-02</internalNodes>\n          <leafValues>\n            1.4412100613117218e-01 -4.2139101028442383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2391 -9.4463996589183807e-02</internalNodes>\n          <leafValues>\n            5.0682598352432251e-01 -2.0478899776935577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2392 -1.5426999889314175e-02</internalNodes>\n          <leafValues>\n            -1.5811300277709961e-01 1.7806899547576904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2393 -4.0540001355111599e-03</internalNodes>\n          <leafValues>\n            -5.4366701841354370e-01 3.1235000118613243e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2394 3.0080000869929790e-03</internalNodes>\n          <leafValues>\n            -1.7376799881458282e-01 3.0441701412200928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2395 -1.0091999545693398e-02</internalNodes>\n          <leafValues>\n            2.5103801488876343e-01 -2.6224100589752197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2396 -3.8818001747131348e-02</internalNodes>\n          <leafValues>\n            9.3226701021194458e-01 7.2659999132156372e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2397 3.4651998430490494e-02</internalNodes>\n          <leafValues>\n            -3.3934999257326126e-02 -8.5707902908325195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2398 -4.6729999594390392e-03</internalNodes>\n          <leafValues>\n            3.4969300031661987e-01 -4.8517998307943344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2399 6.8499997723847628e-04</internalNodes>\n          <leafValues>\n            6.6573001444339752e-02 -4.4973799586296082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2400 3.5317000001668930e-02</internalNodes>\n          <leafValues>\n            1.4275799691677094e-01 -4.6726399660110474e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2401 -2.3569999262690544e-02</internalNodes>\n          <leafValues>\n            -1.0286079645156860e+00 -4.5288000255823135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2402 -1.9109999993816018e-03</internalNodes>\n          <leafValues>\n            -1.9652199745178223e-01 2.8661000728607178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2403 -1.6659000888466835e-02</internalNodes>\n          <leafValues>\n            -7.7532202005386353e-01 -8.3280000835657120e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2404 6.6062200069427490e-01</internalNodes>\n          <leafValues>\n            1.3232499361038208e-01 -3.5266680717468262e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2405 1.0970599949359894e-01</internalNodes>\n          <leafValues>\n            -1.5547199547290802e-01 1.4674140214920044e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2406 1.3500999659299850e-02</internalNodes>\n          <leafValues>\n            1.5233400464057922e-01 -1.3020930290222168e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2407 -2.2871999070048332e-02</internalNodes>\n          <leafValues>\n            -7.1325999498367310e-01 -8.7040001526474953e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2408 -8.1821002066135406e-02</internalNodes>\n          <leafValues>\n            1.1127580404281616e+00 8.3219997584819794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2409 -5.2728001028299332e-02</internalNodes>\n          <leafValues>\n            9.3165099620819092e-01 -1.7103999853134155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2410 -2.5242000818252563e-02</internalNodes>\n          <leafValues>\n            -1.9733799993991852e-01 2.5359401106834412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2411 -4.3818999081850052e-02</internalNodes>\n          <leafValues>\n            4.1815200448036194e-01 -2.4585500359535217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2412 -1.8188999965786934e-02</internalNodes>\n          <leafValues>\n            -5.1743197441101074e-01 2.0174199342727661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2413 2.3466000333428383e-02</internalNodes>\n          <leafValues>\n            -4.3071001768112183e-02 -1.0636579990386963e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2414 3.4216001629829407e-02</internalNodes>\n          <leafValues>\n            5.3780999034643173e-02 4.9707201123237610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2415 2.5692999362945557e-02</internalNodes>\n          <leafValues>\n            -2.3800100386142731e-01 4.1651499271392822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2416 -2.6565000414848328e-02</internalNodes>\n          <leafValues>\n            -8.8574802875518799e-01 1.3365900516510010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2417 6.0942001640796661e-02</internalNodes>\n          <leafValues>\n            -2.0669700205326080e-01 5.8309000730514526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2418 1.4474500715732574e-01</internalNodes>\n          <leafValues>\n            1.3282300531864166e-01 -3.1449348926544189e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2419 5.3410999476909637e-02</internalNodes>\n          <leafValues>\n            -1.7325200140476227e-01 6.9190698862075806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2420 1.1408000253140926e-02</internalNodes>\n          <leafValues>\n            5.4822001606225967e-02 3.0240398645401001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2421 -2.3179999552667141e-03</internalNodes>\n          <leafValues>\n            1.5820899605751038e-01 -3.1973201036453247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2422 -2.9695000499486923e-02</internalNodes>\n          <leafValues>\n            7.1274799108505249e-01 5.8136001229286194e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2423 2.7249999344348907e-02</internalNodes>\n          <leafValues>\n            -1.5754100680351257e-01 9.2143797874450684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2424 -3.6200000904500484e-03</internalNodes>\n          <leafValues>\n            -3.4548398852348328e-01 2.0220999419689178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2425 -1.2578999623656273e-02</internalNodes>\n          <leafValues>\n            -5.5650299787521362e-01 2.0388999953866005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2426 -8.8849000632762909e-02</internalNodes>\n          <leafValues>\n            -3.6100010871887207e+00 1.3164199888706207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2427 -1.9256999716162682e-02</internalNodes>\n          <leafValues>\n            5.1908999681472778e-01 -1.9284300506114960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2428 -1.6666999086737633e-02</internalNodes>\n          <leafValues>\n            -8.7499998509883881e-02 1.5812499821186066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2429 1.2931999750435352e-02</internalNodes>\n          <leafValues>\n            2.7405999600887299e-02 -5.5123901367187500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2430 -1.3431999832391739e-02</internalNodes>\n          <leafValues>\n            2.3457799851894379e-01 -4.3235000222921371e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2431 1.8810000270605087e-02</internalNodes>\n          <leafValues>\n            -3.9680998772382736e-02 -9.4373297691345215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2432 -6.4349998719990253e-03</internalNodes>\n          <leafValues>\n            4.5703700184822083e-01 -4.0520001202821732e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2433 -2.4249000474810600e-02</internalNodes>\n          <leafValues>\n            -7.6248002052307129e-01 -1.9857000559568405e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2434 -2.9667999595403671e-02</internalNodes>\n          <leafValues>\n            -3.7412509918212891e+00 1.1250600218772888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2435 5.1150000654160976e-03</internalNodes>\n          <leafValues>\n            -6.3781797885894775e-01 1.1223999783396721e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2436 -5.7819997891783714e-03</internalNodes>\n          <leafValues>\n            1.9374400377273560e-01 -8.2042001187801361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2437 1.6606999561190605e-02</internalNodes>\n          <leafValues>\n            -1.6192099452018738e-01 1.1334990262985229e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2438 3.8228001445531845e-02</internalNodes>\n          <leafValues>\n            2.1105000749230385e-02 7.6264202594757080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2439 -5.7094000279903412e-02</internalNodes>\n          <leafValues>\n            -1.6974929571151733e+00 -5.9762001037597656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2440 -5.3883001208305359e-02</internalNodes>\n          <leafValues>\n            1.1850190162658691e+00 9.0966999530792236e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2441 -2.6110000908374786e-03</internalNodes>\n          <leafValues>\n            -4.0941199660301208e-01 8.3820998668670654e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2442 2.9714399576187134e-01</internalNodes>\n          <leafValues>\n            1.5529899299144745e-01 -1.0995409488677979e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2443 -8.9063003659248352e-02</internalNodes>\n          <leafValues>\n            4.8947200179100037e-01 -2.0041200518608093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2444 -5.6193001568317413e-02</internalNodes>\n          <leafValues>\n            -2.4581399559974670e-01 1.4365500211715698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2445 3.7004999816417694e-02</internalNodes>\n          <leafValues>\n            -4.8168998211622238e-02 -1.2310709953308105e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2446 -8.4840003401041031e-03</internalNodes>\n          <leafValues>\n            4.3372601270675659e-01 1.3779999688267708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2447 -2.4379999376833439e-03</internalNodes>\n          <leafValues>\n            1.8949699401855469e-01 -3.2294198870658875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2448 -7.1639999747276306e-02</internalNodes>\n          <leafValues>\n            -4.3979001045227051e-01 2.2730199992656708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2449 5.2260002121329308e-03</internalNodes>\n          <leafValues>\n            -2.0548400282859802e-01 5.0933301448822021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2450 -6.1360001564025879e-03</internalNodes>\n          <leafValues>\n            3.1157198548316956e-01 7.0680998265743256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2451 1.5595000237226486e-02</internalNodes>\n          <leafValues>\n            -3.0934798717498779e-01 1.5627700090408325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2452 2.5995999574661255e-02</internalNodes>\n          <leafValues>\n            1.3821600377559662e-01 -1.7616599798202515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2453 -1.2085000053048134e-02</internalNodes>\n          <leafValues>\n            -5.1070201396942139e-01 5.8440998196601868e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2454 -6.7836001515388489e-02</internalNodes>\n          <leafValues>\n            4.7757101058959961e-01 -7.1446001529693604e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2455 -1.4715000055730343e-02</internalNodes>\n          <leafValues>\n            4.5238900184631348e-01 -1.9861400127410889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2456 2.5118999183177948e-02</internalNodes>\n          <leafValues>\n            1.2954899668693542e-01 -8.6266398429870605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2457 1.8826000392436981e-02</internalNodes>\n          <leafValues>\n            -4.1570000350475311e-02 -1.1354700326919556e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2458 -2.1263999864459038e-02</internalNodes>\n          <leafValues>\n            -3.4738001227378845e-01 1.5779499709606171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2459 9.4609996303915977e-03</internalNodes>\n          <leafValues>\n            4.8639997839927673e-03 -6.1654800176620483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2460 2.2957700490951538e-01</internalNodes>\n          <leafValues>\n            8.1372998654842377e-02 6.9841402769088745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2461 -3.8061998784542084e-02</internalNodes>\n          <leafValues>\n            1.1616369485855103e+00 -1.4976699650287628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2462 -1.3484999537467957e-02</internalNodes>\n          <leafValues>\n            -3.2036399841308594e-01 1.7365099489688873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2463 3.6238998174667358e-02</internalNodes>\n          <leafValues>\n            -1.8158499896526337e-01 6.1956697702407837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2464 6.7210001870989799e-03</internalNodes>\n          <leafValues>\n            7.9600000753998756e-04 4.2441400885581970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2465 9.6525996923446655e-02</internalNodes>\n          <leafValues>\n            -1.4696800708770752e-01 1.2525680065155029e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2466 -3.5656999796628952e-02</internalNodes>\n          <leafValues>\n            -3.9781698584556580e-01 1.4191399514675140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2467 1.0772000066936016e-02</internalNodes>\n          <leafValues>\n            -1.8194000422954559e-01 5.9762197732925415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2468 7.9279996454715729e-02</internalNodes>\n          <leafValues>\n            1.4642499387264252e-01 -7.8836899995803833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2469 3.2841000705957413e-02</internalNodes>\n          <leafValues>\n            -6.2408000230789185e-02 -1.4227490425109863e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2470 -2.7781000360846519e-02</internalNodes>\n          <leafValues>\n            3.4033098816871643e-01 3.0670000240206718e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2471 -4.0339999832212925e-03</internalNodes>\n          <leafValues>\n            3.1084701418876648e-01 -2.2595700621604919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2472 7.4260002002120018e-03</internalNodes>\n          <leafValues>\n            -3.8936998695135117e-02 3.1702101230621338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2473 1.1213999986648560e-01</internalNodes>\n          <leafValues>\n            -1.7578299343585968e-01 6.5056598186492920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2474 -1.1878100037574768e-01</internalNodes>\n          <leafValues>\n            -1.0092990398406982e+00 1.1069700121879578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2475 -4.1584998369216919e-02</internalNodes>\n          <leafValues>\n            -5.3806400299072266e-01 1.9905000925064087e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2476 -2.7966000139713287e-02</internalNodes>\n          <leafValues>\n            4.8143199086189270e-01 3.3590998500585556e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2477 -1.2506400048732758e-01</internalNodes>\n          <leafValues>\n            2.6352199912071228e-01 -2.5737899541854858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2478 2.3666900396347046e-01</internalNodes>\n          <leafValues>\n            3.6508001387119293e-02 9.0655601024627686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2479 -2.9475999996066093e-02</internalNodes>\n          <leafValues>\n            -6.0048800706863403e-01 9.5880003646016121e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2480 3.7792999297380447e-02</internalNodes>\n          <leafValues>\n            1.5506200492382050e-01 -9.5733499526977539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2481 7.2044000029563904e-02</internalNodes>\n          <leafValues>\n            -1.4525899291038513e-01 1.3676730394363403e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2482 9.7759999334812164e-03</internalNodes>\n          <leafValues>\n            1.2915999628603458e-02 2.1640899777412415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2483 5.2154000848531723e-02</internalNodes>\n          <leafValues>\n            -1.6359999775886536e-02 -8.8356298208236694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2484 -4.3790999799966812e-02</internalNodes>\n          <leafValues>\n            3.5829600691795349e-01 6.5131001174449921e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2485 -3.8378998637199402e-02</internalNodes>\n          <leafValues>\n            1.1961040496826172e+00 -1.4971500635147095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2486 -9.8838999867439270e-02</internalNodes>\n          <leafValues>\n            -6.1834001541137695e-01 1.2786200642585754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2487 -1.2190700322389603e-01</internalNodes>\n          <leafValues>\n            -1.8276120424270630e+00 -6.4862996339797974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2488 -1.1981700360774994e-01</internalNodes>\n          <leafValues>\n            -30. 1.1323300004005432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2489 3.0910000205039978e-02</internalNodes>\n          <leafValues>\n            -2.3934000730514526e-01 3.6332899332046509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2490 1.0800999589264393e-02</internalNodes>\n          <leafValues>\n            -3.5140000283718109e-02 2.7707898616790771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2491 5.6844998151063919e-02</internalNodes>\n          <leafValues>\n            -1.5524299442768097e-01 1.0802700519561768e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2492 1.0280000278726220e-03</internalNodes>\n          <leafValues>\n            -6.1202999204397202e-02 2.0508000254631042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2493 -2.8273999691009521e-02</internalNodes>\n          <leafValues>\n            -6.4778000116348267e-01 2.3917000740766525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2494 -1.6013599932193756e-01</internalNodes>\n          <leafValues>\n            1.0892050266265869e+00 5.8389000594615936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2495 4.9629998393356800e-03</internalNodes>\n          <leafValues>\n            -2.5806298851966858e-01 2.0834599435329437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2496 4.6937000006437302e-02</internalNodes>\n          <leafValues>\n            1.3886299729347229e-01 -1.5662620067596436e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2497 2.4286000058054924e-02</internalNodes>\n          <leafValues>\n            -2.0728300511837006e-01 5.2430999279022217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2498 7.0202000439167023e-02</internalNodes>\n          <leafValues>\n            1.4796899259090424e-01 -1.3095090389251709e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2499 9.8120002076029778e-03</internalNodes>\n          <leafValues>\n            2.7906000614166260e-02 -5.0864601135253906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2500 -5.6200999766588211e-02</internalNodes>\n          <leafValues>\n            1.2618130445480347e+00 6.3801996409893036e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2501 1.0982800275087357e-01</internalNodes>\n          <leafValues>\n            -1.2850099802017212e-01 3.0776169300079346e+00</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>211</maxWeakCount>\n      <stageThreshold>-3.3703000545501709e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2502 2.0910000428557396e-02</internalNodes>\n          <leafValues>\n            -6.8559402227401733e-01 3.8984298706054688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2503 3.5032000392675400e-02</internalNodes>\n          <leafValues>\n            -4.7724398970603943e-01 4.5027199387550354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2504 3.9799001067876816e-02</internalNodes>\n          <leafValues>\n            -4.7011101245880127e-01 4.2702499032020569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2505 -4.8409998416900635e-03</internalNodes>\n          <leafValues>\n            2.5614300370216370e-01 -6.6556298732757568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2506 2.3439999204128981e-03</internalNodes>\n          <leafValues>\n            -4.8083499073982239e-01 2.8013798594474792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2507 2.5312999263405800e-02</internalNodes>\n          <leafValues>\n            -2.3948200047016144e-01 4.4191798567771912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2508 -3.2193001359701157e-02</internalNodes>\n          <leafValues>\n            7.6086699962615967e-01 -2.5059100985527039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2509 7.5409002602100372e-02</internalNodes>\n          <leafValues>\n            -3.4974598884582520e-01 3.4380298852920532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2510 -1.8469000235199928e-02</internalNodes>\n          <leafValues>\n            -7.9085600376129150e-01 3.4788001328706741e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2511 -1.2802000157535076e-02</internalNodes>\n          <leafValues>\n            4.7107800841331482e-01 -6.0006000101566315e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2512 -2.6598000898957253e-02</internalNodes>\n          <leafValues>\n            6.7116099596023560e-01 -2.4257500469684601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2513 2.1988999098539352e-02</internalNodes>\n          <leafValues>\n            2.4717499315738678e-01 -4.8301699757575989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2514 1.4654099941253662e-01</internalNodes>\n          <leafValues>\n            -2.1504099667072296e-01 7.2055900096893311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2515 3.5310001112520695e-03</internalNodes>\n          <leafValues>\n            2.7930998802185059e-01 -3.4339898824691772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2516 9.4010001048445702e-03</internalNodes>\n          <leafValues>\n            5.5861998349428177e-02 -8.2143598794937134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2517 -8.6390003561973572e-03</internalNodes>\n          <leafValues>\n            -9.9620598554611206e-01 1.8874999880790710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2518 -3.9193000644445419e-02</internalNodes>\n          <leafValues>\n            -1.1945559978485107e+00 -2.9198000207543373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2519 2.4855000898241997e-02</internalNodes>\n          <leafValues>\n            1.4987599849700928e-01 -5.4137802124023438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2520 -3.4995000809431076e-02</internalNodes>\n          <leafValues>\n            -1.4210180044174194e+00 -4.2314000427722931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2521 -1.8378999084234238e-02</internalNodes>\n          <leafValues>\n            -2.8242599964141846e-01 1.5581800043582916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2522 -1.3592000119388103e-02</internalNodes>\n          <leafValues>\n            4.7317099571228027e-01 -2.1937200427055359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2523 6.2629999592900276e-03</internalNodes>\n          <leafValues>\n            -5.9714000672101974e-02 6.0625898838043213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2524 -1.8478000536561012e-02</internalNodes>\n          <leafValues>\n            -8.5647201538085938e-01 -1.3783999718725681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2525 1.4236000366508961e-02</internalNodes>\n          <leafValues>\n            1.6654799878597260e-01 -2.7713999152183533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2526 -3.2547000795602798e-02</internalNodes>\n          <leafValues>\n            -1.1728240251541138e+00 -4.0185000747442245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2527 -2.6410000864416361e-03</internalNodes>\n          <leafValues>\n            2.6514300704002380e-01 -5.6343000382184982e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2528 -8.7799999164417386e-04</internalNodes>\n          <leafValues>\n            3.6556001752614975e-02 -5.5075198411941528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2529 4.7371998429298401e-02</internalNodes>\n          <leafValues>\n            -4.2614001780748367e-02 4.8194900155067444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2530 -7.0790001191198826e-03</internalNodes>\n          <leafValues>\n            2.8698998689651489e-01 -3.2923001050949097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2531 -4.3145999312400818e-02</internalNodes>\n          <leafValues>\n            -1.4065419435501099e+00 1.2836399674415588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2532 2.0592000335454941e-02</internalNodes>\n          <leafValues>\n            -2.1435299515724182e-01 5.3981798887252808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2533 -2.2367000579833984e-02</internalNodes>\n          <leafValues>\n            3.3718299865722656e-01 4.5212000608444214e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2534 5.0039999186992645e-02</internalNodes>\n          <leafValues>\n            -2.5121700763702393e-01 4.1750499606132507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2535 6.1794999986886978e-02</internalNodes>\n          <leafValues>\n            4.0084999054670334e-02 6.8779802322387695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2536 -4.1861999779939651e-02</internalNodes>\n          <leafValues>\n            5.3027397394180298e-01 -2.2901999950408936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2537 -3.1959998887032270e-03</internalNodes>\n          <leafValues>\n            2.5161498785018921e-01 -2.1514600515365601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2538 2.4255000054836273e-02</internalNodes>\n          <leafValues>\n            7.2320001199841499e-03 -7.2519099712371826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2539 -1.7303999513387680e-02</internalNodes>\n          <leafValues>\n            -4.9958199262619019e-01 1.8394500017166138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2540 -4.1470001451671124e-03</internalNodes>\n          <leafValues>\n            8.5211999714374542e-02 -4.6364700794219971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2541 -1.4369999989867210e-02</internalNodes>\n          <leafValues>\n            -5.2258902788162231e-01 2.3892599344253540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2542 -9.0399999171495438e-03</internalNodes>\n          <leafValues>\n            -6.3250398635864258e-01 3.2551001757383347e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2543 -1.2373100221157074e-01</internalNodes>\n          <leafValues>\n            1.2856210470199585e+00 7.6545000076293945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2544 -8.2221999764442444e-02</internalNodes>\n          <leafValues>\n            8.3208197355270386e-01 -1.8590599298477173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2545 6.5659001469612122e-02</internalNodes>\n          <leafValues>\n            1.1298800259828568e-01 -30.</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2546 -3.1582999974489212e-02</internalNodes>\n          <leafValues>\n            -1.3485900163650513e+00 -4.7097001224756241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2547 -7.9636000096797943e-02</internalNodes>\n          <leafValues>\n            -1.3533639907836914e+00 1.5668800473213196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2548 -1.8880000337958336e-02</internalNodes>\n          <leafValues>\n            4.0300300717353821e-01 -2.5148901343345642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2549 -5.0149997696280479e-03</internalNodes>\n          <leafValues>\n            -2.6287099719047546e-01 1.8582500517368317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2550 -1.2218000367283821e-02</internalNodes>\n          <leafValues>\n            5.8692401647567749e-01 -1.9427700340747833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2551 1.2710000155493617e-03</internalNodes>\n          <leafValues>\n            -1.6688999533653259e-01 2.3006899654865265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2552 2.9743999242782593e-02</internalNodes>\n          <leafValues>\n            1.2520000338554382e-02 -6.6723597049713135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2553 2.8175000101327896e-02</internalNodes>\n          <leafValues>\n            -1.7060000449419022e-02 6.4579397439956665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2554 3.0345000326633453e-02</internalNodes>\n          <leafValues>\n            -2.4178700149059296e-01 3.4878900647163391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2555 -1.7325999215245247e-02</internalNodes>\n          <leafValues>\n            -5.3599399328231812e-01 2.0995999872684479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2556 -8.4178000688552856e-02</internalNodes>\n          <leafValues>\n            7.5093299150466919e-01 -1.7593200504779816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2557 7.4950000271201134e-03</internalNodes>\n          <leafValues>\n            -1.6188099980354309e-01 3.0657500028610229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2558 5.6494999676942825e-02</internalNodes>\n          <leafValues>\n            -1.7318800091743469e-01 1.0016150474548340e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2559 -5.2939997985959053e-03</internalNodes>\n          <leafValues>\n            2.3417599499225616e-01 -6.5347000956535339e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2560 -1.4945000410079956e-02</internalNodes>\n          <leafValues>\n            2.5018900632858276e-01 -3.0591198801994324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2561 5.4919000715017319e-02</internalNodes>\n          <leafValues>\n            1.3121999800205231e-01 -9.3765097856521606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2562 -1.9721999764442444e-02</internalNodes>\n          <leafValues>\n            -8.3978497982025146e-01 -2.3473000153899193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2563 -6.7158997058868408e-02</internalNodes>\n          <leafValues>\n            2.3586840629577637e+00 8.2970999181270599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2564 -1.4325999654829502e-02</internalNodes>\n          <leafValues>\n            1.8814499676227570e-01 -3.1221601366996765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2565 2.9841000214219093e-02</internalNodes>\n          <leafValues>\n            1.4825099706649780e-01 -8.4681701660156250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2566 5.1883000880479813e-02</internalNodes>\n          <leafValues>\n            -4.3731000274419785e-02 -1.3366169929504395e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2567 4.1127000004053116e-02</internalNodes>\n          <leafValues>\n            1.7660099267959595e-01 -6.0904097557067871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2568 -1.2865099310874939e-01</internalNodes>\n          <leafValues>\n            -9.8701000213623047e-01 -3.7785001099109650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2569 2.4170000106096268e-03</internalNodes>\n          <leafValues>\n            -1.6119599342346191e-01 3.2675701379776001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2570 7.7030002139508724e-03</internalNodes>\n          <leafValues>\n            -2.3841500282287598e-01 2.9319399595260620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2571 4.5520000159740448e-02</internalNodes>\n          <leafValues>\n            1.4424599707126617e-01 -1.5010160207748413e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2572 -7.8700996935367584e-02</internalNodes>\n          <leafValues>\n            -1.0394560098648071e+00 -4.5375999063253403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2573 7.8619997948408127e-03</internalNodes>\n          <leafValues>\n            1.9633600115776062e-01 -1.4472399652004242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2574 -1.3458999805152416e-02</internalNodes>\n          <leafValues>\n            -9.0634697675704956e-01 -3.8049001246690750e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2575 2.8827000409364700e-02</internalNodes>\n          <leafValues>\n            -2.9473999515175819e-02 6.0058397054672241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2576 -2.7365999296307564e-02</internalNodes>\n          <leafValues>\n            -9.9804002046585083e-01 -3.8653001189231873e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2577 -7.2917997837066650e-02</internalNodes>\n          <leafValues>\n            7.3361498117446899e-01 5.7440001517534256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2578 -1.3988999649882317e-02</internalNodes>\n          <leafValues>\n            2.7892601490020752e-01 -2.6516300439834595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2579 4.3242998421192169e-02</internalNodes>\n          <leafValues>\n            4.7760000452399254e-03 3.5925900936126709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2580 2.9533000662922859e-02</internalNodes>\n          <leafValues>\n            -2.0083999633789062e-01 5.1202899217605591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2581 -3.1897000968456268e-02</internalNodes>\n          <leafValues>\n            6.4721697568893433e-01 -1.3760000001639128e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2582 3.7868998944759369e-02</internalNodes>\n          <leafValues>\n            -1.8363800644874573e-01 6.1343097686767578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2583 -2.2417999804019928e-02</internalNodes>\n          <leafValues>\n            -2.9187899827957153e-01 1.8194800615310669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2584 5.8958999812602997e-02</internalNodes>\n          <leafValues>\n            -6.6451996564865112e-02 -1.9290030002593994e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2585 3.1222999095916748e-02</internalNodes>\n          <leafValues>\n            -1.2732000090181828e-02 6.1560797691345215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2586 3.7484999746084213e-02</internalNodes>\n          <leafValues>\n            -2.0856900513172150e-01 4.4363999366760254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2587 -2.0966000854969025e-02</internalNodes>\n          <leafValues>\n            -3.5712799429893494e-01 2.4252200126647949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2588 -2.5477999821305275e-02</internalNodes>\n          <leafValues>\n            1.0846560001373291e+00 -1.5054400265216827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2589 -7.2570000775158405e-03</internalNodes>\n          <leafValues>\n            2.1302600204944611e-01 -1.8308199942111969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2590 -5.0983000546693802e-02</internalNodes>\n          <leafValues>\n            5.1736801862716675e-01 -1.8833099305629730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2591 -2.0640000700950623e-02</internalNodes>\n          <leafValues>\n            -4.4030201435089111e-01 2.2745999693870544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2592 1.0672999545931816e-02</internalNodes>\n          <leafValues>\n            3.5059999674558640e-02 -5.1665002107620239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2593 3.1895998865365982e-02</internalNodes>\n          <leafValues>\n            1.3228000141680241e-02 3.4915199875831604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2594 -2.3824999108910561e-02</internalNodes>\n          <leafValues>\n            3.4118801355361938e-01 -2.1510200202465057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2595 -6.0680001042783260e-03</internalNodes>\n          <leafValues>\n            3.2937398552894592e-01 -2.8523799777030945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2596 2.3881999775767326e-02</internalNodes>\n          <leafValues>\n            -2.5333800911903381e-01 2.6296100020408630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2597 2.7966000139713287e-02</internalNodes>\n          <leafValues>\n            1.4049099385738373e-01 -4.9887099862098694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2598 1.4603000134229660e-02</internalNodes>\n          <leafValues>\n            -1.5395999886095524e-02 -7.6958000659942627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2599 1.0872399806976318e-01</internalNodes>\n          <leafValues>\n            1.9069600105285645e-01 -3.2393100857734680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2600 -1.4038000255823135e-02</internalNodes>\n          <leafValues>\n            3.4924700856208801e-01 -2.2358700633049011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2601 4.0440000593662262e-03</internalNodes>\n          <leafValues>\n            -3.8329001516103745e-02 5.1177299022674561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2602 -4.9769999459385872e-03</internalNodes>\n          <leafValues>\n            -4.2888298630714417e-01 4.9173999577760696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2603 -8.5183002054691315e-02</internalNodes>\n          <leafValues>\n            6.6624599695205688e-01 7.8079998493194580e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2604 2.1559998858720064e-03</internalNodes>\n          <leafValues>\n            -4.9135199189186096e-01 6.9555997848510742e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2605 3.6384499073028564e-01</internalNodes>\n          <leafValues>\n            1.2997099757194519e-01 -1.8949509859085083e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2606 2.2082500159740448e-01</internalNodes>\n          <leafValues>\n            -5.7211998850107193e-02 -1.4281120300292969e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2607 -1.6140000894665718e-02</internalNodes>\n          <leafValues>\n            -5.7589399814605713e-01 1.8062500655651093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2608 -4.8330001533031464e-02</internalNodes>\n          <leafValues>\n            9.7308498620986938e-01 -1.6513000428676605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2609 1.7529999837279320e-02</internalNodes>\n          <leafValues>\n            1.7932699620723724e-01 -2.7948901057243347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2610 -3.4309998154640198e-02</internalNodes>\n          <leafValues>\n            -8.1072497367858887e-01 -1.6596000641584396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2611 -4.5830002054572105e-03</internalNodes>\n          <leafValues>\n            2.7908998727798462e-01 -7.4519999325275421e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2612 1.2896400690078735e-01</internalNodes>\n          <leafValues>\n            -1.3508500158786774e-01 2.5411539077758789e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2613 3.0361000448465347e-02</internalNodes>\n          <leafValues>\n            -6.8419001996517181e-02 2.8734099864959717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2614 4.4086001813411713e-02</internalNodes>\n          <leafValues>\n            -1.8135899305343628e-01 6.5413200855255127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2615 3.0159999150782824e-03</internalNodes>\n          <leafValues>\n            -1.5690499544143677e-01 2.6963800191879272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2616 -2.6336999610066414e-02</internalNodes>\n          <leafValues>\n            2.9175600409507751e-01 -2.5274100899696350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2617 -2.7866000309586525e-02</internalNodes>\n          <leafValues>\n            4.4387501478195190e-01 5.5038001388311386e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2618 1.1725000105798244e-02</internalNodes>\n          <leafValues>\n            -1.9346499443054199e-01 4.6656700968742371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2619 1.5689999563619494e-03</internalNodes>\n          <leafValues>\n            -8.2360003143548965e-03 2.5700899958610535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2620 -3.5550000611692667e-03</internalNodes>\n          <leafValues>\n            -4.2430898547172546e-01 7.1174003183841705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2621 -3.1695000827312469e-02</internalNodes>\n          <leafValues>\n            -8.5393500328063965e-01 1.6916200518608093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2622 -3.2097000628709793e-02</internalNodes>\n          <leafValues>\n            8.3784902095794678e-01 -1.7597299814224243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2623 1.5544199943542480e-01</internalNodes>\n          <leafValues>\n            9.9550001323223114e-02 2.3873300552368164e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2624 8.8045999407768250e-02</internalNodes>\n          <leafValues>\n            -1.8725299835205078e-01 6.2384301424026489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2625 -1.6720000421628356e-03</internalNodes>\n          <leafValues>\n            2.5008699297904968e-01 -6.5118998289108276e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2626 9.3409996479749680e-03</internalNodes>\n          <leafValues>\n            -3.5378900170326233e-01 1.0715000331401825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2627 3.7138000130653381e-02</internalNodes>\n          <leafValues>\n            1.6387000679969788e-01 -9.1718399524688721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2628 8.0183997750282288e-02</internalNodes>\n          <leafValues>\n            -1.4812999963760376e-01 1.4895190000534058e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2629 -7.9100002767518163e-04</internalNodes>\n          <leafValues>\n            -2.1326899528503418e-01 1.9676400721073151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2630 -5.0400001928210258e-03</internalNodes>\n          <leafValues>\n            -7.1318697929382324e-01 1.8240000354126096e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2631 1.1962399631738663e-01</internalNodes>\n          <leafValues>\n            3.3098999410867691e-02 1.0441709756851196e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2632 -4.5280000194907188e-03</internalNodes>\n          <leafValues>\n            -2.7308499813079834e-01 2.7229800820350647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2633 -2.9639000073075294e-02</internalNodes>\n          <leafValues>\n            3.6225798726081848e-01 5.6795001029968262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2634 2.6650000363588333e-02</internalNodes>\n          <leafValues>\n            -4.8041000962257385e-02 -9.6723502874374390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2635 4.4422000646591187e-02</internalNodes>\n          <leafValues>\n            1.3052900135517120e-01 -3.5077300667762756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2636 -2.4359999224543571e-02</internalNodes>\n          <leafValues>\n            -1.0766899585723877e+00 -5.1222998648881912e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2637 1.9734999164938927e-02</internalNodes>\n          <leafValues>\n            2.6238000020384789e-02 2.8070500493049622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2638 5.4930001497268677e-03</internalNodes>\n          <leafValues>\n            -2.6111298799514771e-01 2.1011400222778320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2639 -2.3200300335884094e-01</internalNodes>\n          <leafValues>\n            -1.7748440504074097e+00 1.1482600122690201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2640 -2.5614000856876373e-02</internalNodes>\n          <leafValues>\n            2.9900801181793213e-01 -2.2502499818801880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2641 -6.4949998632073402e-03</internalNodes>\n          <leafValues>\n            1.9563800096511841e-01 -9.9762998521327972e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2642 3.9840000681579113e-03</internalNodes>\n          <leafValues>\n            -4.3021500110626221e-01 8.1261001527309418e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2643 -3.5813000053167343e-02</internalNodes>\n          <leafValues>\n            -5.0987398624420166e-01 1.6345900297164917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2644 -1.4169000089168549e-02</internalNodes>\n          <leafValues>\n            7.7978098392486572e-01 -1.7476299405097961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2645 -1.2642100453376770e-01</internalNodes>\n          <leafValues>\n            -6.3047897815704346e-01 1.2728300690650940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2646 6.8677999079227448e-02</internalNodes>\n          <leafValues>\n            -4.6447999775409698e-02 -1.1128979921340942e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2647 8.5864998400211334e-02</internalNodes>\n          <leafValues>\n            1.1835400015115738e-01 -4.8235158920288086e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2648 1.5511999838054180e-02</internalNodes>\n          <leafValues>\n            -1.7467999830842018e-02 -6.3693398237228394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2649 8.1091001629829407e-02</internalNodes>\n          <leafValues>\n            8.6133003234863281e-02 2.4559431076049805e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2650 1.8495000898838043e-02</internalNodes>\n          <leafValues>\n            4.0229000151157379e-02 -5.0858199596405029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2651 -8.6320996284484863e-02</internalNodes>\n          <leafValues>\n            -1.9006760120391846e+00 1.1019100248813629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2652 7.2355002164840698e-02</internalNodes>\n          <leafValues>\n            -6.2111999839544296e-02 -1.4165179729461670e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2653 -7.8179001808166504e-02</internalNodes>\n          <leafValues>\n            8.8849300146102905e-01 4.2369998991489410e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2654 9.6681997179985046e-02</internalNodes>\n          <leafValues>\n            -2.2094200551509857e-01 3.3575099706649780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2655 -3.9875999093055725e-02</internalNodes>\n          <leafValues>\n            5.7804799079895020e-01 4.5347999781370163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2656 -9.5349997282028198e-03</internalNodes>\n          <leafValues>\n            -5.4175698757171631e-01 3.2399999909102917e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2657 4.0600000647827983e-04</internalNodes>\n          <leafValues>\n            -8.1549003720283508e-02 3.5837900638580322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2658 1.2107999995350838e-02</internalNodes>\n          <leafValues>\n            -2.0280399918556213e-01 4.3768000602722168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2659 -2.0873999223113060e-02</internalNodes>\n          <leafValues>\n            4.1469898819923401e-01 -4.5568000525236130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2660 5.7888001203536987e-02</internalNodes>\n          <leafValues>\n            -2.9009999707341194e-02 -9.1822302341461182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2661 1.3200000103097409e-04</internalNodes>\n          <leafValues>\n            -1.1772400140762329e-01 2.0000000298023224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2662 -1.7137000337243080e-02</internalNodes>\n          <leafValues>\n            3.3004799485206604e-01 -2.3055200278759003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2663 3.0655000358819962e-02</internalNodes>\n          <leafValues>\n            -2.1545000374317169e-02 2.6878198981285095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2664 -7.8699999721720815e-04</internalNodes>\n          <leafValues>\n            -4.4100698828697205e-01 4.9157999455928802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2665 8.8036999106407166e-02</internalNodes>\n          <leafValues>\n            1.1782000213861465e-01 -2.8293309211730957e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2666 -3.9028998464345932e-02</internalNodes>\n          <leafValues>\n            9.1777199506759644e-01 -1.5827399492263794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2667 8.0105997622013092e-02</internalNodes>\n          <leafValues>\n            1.1289200186729431e-01 -1.9937280416488647e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2668 3.9538998156785965e-02</internalNodes>\n          <leafValues>\n            -1.4357399940490723e-01 1.3085240125656128e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2669 2.0684000104665756e-02</internalNodes>\n          <leafValues>\n            2.0048099756240845e-01 -4.4186998158693314e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2670 -6.7037999629974365e-02</internalNodes>\n          <leafValues>\n            3.2618600130081177e-01 -2.0550400018692017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2671 4.6815000474452972e-02</internalNodes>\n          <leafValues>\n            1.5825299918651581e-01 -9.5535099506378174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2672 7.8443996608257294e-02</internalNodes>\n          <leafValues>\n            -7.4651002883911133e-02 -2.1161499023437500e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2673 6.6380001604557037e-02</internalNodes>\n          <leafValues>\n            1.1641900241374969e-01 -1.6113519668579102e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2674 3.0053999274969101e-02</internalNodes>\n          <leafValues>\n            -1.6562600433826447e-01 7.0025402307510376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2675 1.7119999974966049e-02</internalNodes>\n          <leafValues>\n            2.2627699375152588e-01 -4.0114998817443848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2676 2.0073000341653824e-02</internalNodes>\n          <leafValues>\n            -1.9389699399471283e-01 4.4420298933982849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2677 3.3101998269557953e-02</internalNodes>\n          <leafValues>\n            1.1637499928474426e-01 -1.5771679878234863e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2678 -1.4882000163197517e-02</internalNodes>\n          <leafValues>\n            -8.9680302143096924e-01 -4.2010001838207245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2679 -1.0281000286340714e-02</internalNodes>\n          <leafValues>\n            3.5602998733520508e-01 -1.3124000281095505e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2680 -2.8695000335574150e-02</internalNodes>\n          <leafValues>\n            -4.6039599180221558e-01 2.6801999658346176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2681 -4.7189998440444469e-03</internalNodes>\n          <leafValues>\n            2.3788799345493317e-01 -6.5518997609615326e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2682 3.2201600074768066e-01</internalNodes>\n          <leafValues>\n            -2.8489999473094940e-02 -8.4234601259231567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2683 -1.7045000568032265e-02</internalNodes>\n          <leafValues>\n            -5.0938802957534790e-01 1.6057600080966949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2684 -7.3469998314976692e-03</internalNodes>\n          <leafValues>\n            -5.4154998064041138e-01 4.7320001758635044e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2685 -3.0001999810338020e-02</internalNodes>\n          <leafValues>\n            -8.8785797357559204e-01 1.3621799647808075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2686 -1.1292999610304832e-02</internalNodes>\n          <leafValues>\n            8.0615198612213135e-01 -1.6159500181674957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2687 4.7749998047947884e-03</internalNodes>\n          <leafValues>\n            1.2968000024557114e-02 5.5079901218414307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2688 5.0710001960396767e-03</internalNodes>\n          <leafValues>\n            -4.5728001743555069e-02 -1.0766259431838989e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2689 1.9344100356101990e-01</internalNodes>\n          <leafValues>\n            7.1262001991271973e-02 1.1694519519805908e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2690 5.3750001825392246e-03</internalNodes>\n          <leafValues>\n            -1.9736200571060181e-01 3.8206899166107178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2691 -6.8276003003120422e-02</internalNodes>\n          <leafValues>\n            -5.4372339248657227e+00 1.1151900142431259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2692 -3.4933000802993774e-02</internalNodes>\n          <leafValues>\n            4.4793400168418884e-01 -1.8657900393009186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2693 5.1219998858869076e-03</internalNodes>\n          <leafValues>\n            -1.4871999621391296e-02 1.8413899838924408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2694 9.5311999320983887e-02</internalNodes>\n          <leafValues>\n            -1.5117099881172180e-01 9.4991499185562134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2695 -6.2849000096321106e-02</internalNodes>\n          <leafValues>\n            4.6473601460456848e-01 3.8405001163482666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2696 -1.7040699720382690e-01</internalNodes>\n          <leafValues>\n            -1.6499999761581421e+00 -6.3236996531486511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2697 1.0583999566733837e-02</internalNodes>\n          <leafValues>\n            -3.8348998874425888e-02 4.1913801431655884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2698 -4.1579000651836395e-02</internalNodes>\n          <leafValues>\n            3.4461900591850281e-01 -2.1187700331211090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2699 1.2718600034713745e-01</internalNodes>\n          <leafValues>\n            1.2398199737071991e-01 -2.1254889965057373e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2700 8.2557000219821930e-02</internalNodes>\n          <leafValues>\n            -6.2024001032114029e-02 -1.4875819683074951e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2701 8.5293002426624298e-02</internalNodes>\n          <leafValues>\n            1.7087999731302261e-02 3.2076600193977356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2702 5.5544000118970871e-02</internalNodes>\n          <leafValues>\n            -2.7414000034332275e-01 1.8976399302482605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2703 4.5650000683963299e-03</internalNodes>\n          <leafValues>\n            -1.7920200526714325e-01 2.7967301011085510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2704 1.2997999787330627e-02</internalNodes>\n          <leafValues>\n            -3.2297500967979431e-01 2.6941800117492676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2705 5.7891998440027237e-02</internalNodes>\n          <leafValues>\n            1.2644399702548981e-01 -6.0713499784469604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2706 -2.2824000567197800e-02</internalNodes>\n          <leafValues>\n            -4.9682098627090454e-01 2.2376999258995056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2707 4.8312000930309296e-02</internalNodes>\n          <leafValues>\n            4.3607000261545181e-02 4.8537799715995789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2708 2.5714000687003136e-02</internalNodes>\n          <leafValues>\n            -4.2950998991727829e-02 -9.3023502826690674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2709 6.9269998930394650e-03</internalNodes>\n          <leafValues>\n            -2.9680000152438879e-03 3.4296301007270813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2710 -3.4446999430656433e-02</internalNodes>\n          <leafValues>\n            -1.5299769639968872e+00 -6.1014998704195023e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2711 2.9387999325990677e-02</internalNodes>\n          <leafValues>\n            3.7595998495817184e-02 6.4172399044036865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2712 -2.4319998919963837e-03</internalNodes>\n          <leafValues>\n            9.9088996648788452e-02 -3.9688101410865784e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>200</maxWeakCount>\n      <stageThreshold>-2.9928278923034668e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2713 -9.5944002270698547e-02</internalNodes>\n          <leafValues>\n            6.2419098615646362e-01 -4.5875200629234314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2714 1.6834000125527382e-02</internalNodes>\n          <leafValues>\n            -9.3072801828384399e-01 2.1563600003719330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2715 2.6049999520182610e-02</internalNodes>\n          <leafValues>\n            -4.0532299876213074e-01 4.2256599664688110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2716 3.6500001442618668e-04</internalNodes>\n          <leafValues>\n            9.5288001000881195e-02 -6.3298100233078003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2717 -6.6940002143383026e-03</internalNodes>\n          <leafValues>\n            3.7243801355361938e-01 -3.0332401394844055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2718 1.8874000757932663e-02</internalNodes>\n          <leafValues>\n            -2.3357200622558594e-01 4.0330699086189270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2719 -1.6300000424962491e-04</internalNodes>\n          <leafValues>\n            4.2886998504400253e-02 -7.7796798944473267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2720 -7.6259002089500427e-02</internalNodes>\n          <leafValues>\n            -4.9628499150276184e-01 1.6335399448871613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2721 5.0149001181125641e-02</internalNodes>\n          <leafValues>\n            3.2747000455856323e-02 -8.0047899484634399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2722 -2.9239999130368233e-03</internalNodes>\n          <leafValues>\n            -5.0002801418304443e-01 2.5480601191520691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2723 1.6243999823927879e-02</internalNodes>\n          <leafValues>\n            3.8913000375032425e-02 -7.0724898576736450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2724 3.7811998277902603e-02</internalNodes>\n          <leafValues>\n            -6.6267997026443481e-02 7.3868799209594727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2725 -1.2319999746978283e-02</internalNodes>\n          <leafValues>\n            4.8696398735046387e-01 -2.4485599994659424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2726 5.8003999292850494e-02</internalNodes>\n          <leafValues>\n            1.3459099829196930e-01 -1.3232100009918213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2727 4.8630000092089176e-03</internalNodes>\n          <leafValues>\n            -4.4172900915145874e-01 1.4005599915981293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2728 4.5690998435020447e-02</internalNodes>\n          <leafValues>\n            3.1217999756336212e-02 8.9818298816680908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2729 2.1321000531315804e-02</internalNodes>\n          <leafValues>\n            1.2008000165224075e-02 -8.6066198348999023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2730 1.5679100155830383e-01</internalNodes>\n          <leafValues>\n            1.4055999927222729e-02 8.5332900285720825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2731 -1.0328999720513821e-02</internalNodes>\n          <leafValues>\n            2.9022800922393799e-01 -2.9478800296783447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2732 2.4290001019835472e-03</internalNodes>\n          <leafValues>\n            -4.0439900755882263e-01 1.9400200247764587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2733 -2.3338999599218369e-02</internalNodes>\n          <leafValues>\n            3.2945200800895691e-01 -2.5712698698043823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2734 -6.8970001302659512e-03</internalNodes>\n          <leafValues>\n            -5.3352999687194824e-01 2.1635200083255768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2735 -3.4403000026941299e-02</internalNodes>\n          <leafValues>\n            -1.4425489902496338e+00 -4.4682998210191727e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2736 -2.1235000342130661e-02</internalNodes>\n          <leafValues>\n            -7.9017502069473267e-01 1.9084100425243378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2737 2.0620001014322042e-03</internalNodes>\n          <leafValues>\n            -2.6931199431419373e-01 3.1488001346588135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2738 -4.2190002277493477e-03</internalNodes>\n          <leafValues>\n            -5.4464399814605713e-01 1.6574600338935852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2739 -1.4334999956190586e-02</internalNodes>\n          <leafValues>\n            2.2105000913143158e-02 -6.2342500686645508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2740 -8.2120001316070557e-03</internalNodes>\n          <leafValues>\n            -4.9884998798370361e-01 1.9237099587917328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2741 -9.3350000679492950e-03</internalNodes>\n          <leafValues>\n            -7.9131197929382324e-01 -1.4143999665975571e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2742 -3.7937998771667480e-02</internalNodes>\n          <leafValues>\n            7.9841297864913940e-01 -3.3799000084400177e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2743 4.7059999778866768e-03</internalNodes>\n          <leafValues>\n            -3.3163401484489441e-01 2.0726299285888672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2744 -4.4499998912215233e-03</internalNodes>\n          <leafValues>\n            -2.7256301045417786e-01 1.8402199447154999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2745 5.2189999260008335e-03</internalNodes>\n          <leafValues>\n            -5.3096002340316772e-01 5.2607998251914978e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2746 -9.5399999991059303e-03</internalNodes>\n          <leafValues>\n            -5.6485402584075928e-01 1.9269399344921112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2747 4.4969998300075531e-02</internalNodes>\n          <leafValues>\n            -1.7411500215530396e-01 9.5382601022720337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2748 1.4209000393748283e-02</internalNodes>\n          <leafValues>\n            -9.1949000954627991e-02 2.4836100637912750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2749 1.6380199790000916e-01</internalNodes>\n          <leafValues>\n            -5.8497000485658646e-02 -1.6404409408569336e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2750 2.5579999200999737e-03</internalNodes>\n          <leafValues>\n            2.3447999358177185e-01 -9.2734001576900482e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2751 -3.8499999791383743e-03</internalNodes>\n          <leafValues>\n            1.7880700528621674e-01 -3.5844099521636963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2752 -2.5221999734640121e-02</internalNodes>\n          <leafValues>\n            -4.2903000116348267e-01 2.0244500041007996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2753 -1.9415000453591347e-02</internalNodes>\n          <leafValues>\n            5.8016300201416016e-01 -1.8806399405002594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2754 1.4419999904930592e-02</internalNodes>\n          <leafValues>\n            3.2846998423337936e-02 8.1980502605438232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2755 5.1582999527454376e-02</internalNodes>\n          <leafValues>\n            6.9176003336906433e-02 -4.5866298675537109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2756 -3.7960000336170197e-02</internalNodes>\n          <leafValues>\n            -1.2553000450134277e+00 1.4332899451255798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2757 -2.9560999944806099e-02</internalNodes>\n          <leafValues>\n            5.3151798248291016e-01 -2.0596499741077423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2758 -3.9110999554395676e-02</internalNodes>\n          <leafValues>\n            1.1658719778060913e+00 5.3897000849246979e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2759 -2.9159000143408775e-02</internalNodes>\n          <leafValues>\n            3.9307600259780884e-01 -2.2184500098228455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2760 -8.3617001771926880e-02</internalNodes>\n          <leafValues>\n            -7.3744499683380127e-01 1.4268200099468231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2761 4.2004001140594482e-01</internalNodes>\n          <leafValues>\n            -1.4277400076389313e-01 1.7894840240478516e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2762 6.0005001723766327e-02</internalNodes>\n          <leafValues>\n            1.1976700276136398e-01 -1.8886189460754395e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2763 -1.8981000408530235e-02</internalNodes>\n          <leafValues>\n            -1.4148449897766113e+00 -5.6522998958826065e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2764 -6.0049998573958874e-03</internalNodes>\n          <leafValues>\n            4.4170799851417542e-01 -1.0200800001621246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2765 -5.8214001357555389e-02</internalNodes>\n          <leafValues>\n            -1.3918470144271851e+00 -4.8268999904394150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2766 -1.2271000072360039e-02</internalNodes>\n          <leafValues>\n            5.1317697763442993e-01 -9.3696996569633484e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2767 4.6585999429225922e-02</internalNodes>\n          <leafValues>\n            -5.7484000921249390e-02 -1.4283169507980347e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2768 1.2110000243410468e-03</internalNodes>\n          <leafValues>\n            -8.0891996622085571e-02 3.2333201169967651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2769 -8.8642001152038574e-02</internalNodes>\n          <leafValues>\n            -8.6449098587036133e-01 -3.3146999776363373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2770 -2.3184999823570251e-02</internalNodes>\n          <leafValues>\n            5.2162200212478638e-01 -1.6168000176548958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2771 4.3090000748634338e-02</internalNodes>\n          <leafValues>\n            -1.6153800487518311e-01 1.0915000438690186e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2772 2.0599999697878957e-04</internalNodes>\n          <leafValues>\n            -1.7091499269008636e-01 3.1236699223518372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2773 8.9159999042749405e-03</internalNodes>\n          <leafValues>\n            -6.7039998248219490e-03 -6.8810397386550903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2774 -1.7752999439835548e-02</internalNodes>\n          <leafValues>\n            6.3292801380157471e-01 -4.2360001243650913e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2775 6.2299999408423901e-03</internalNodes>\n          <leafValues>\n            -3.3637198805809021e-01 1.2790599465370178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2776 2.2770000621676445e-02</internalNodes>\n          <leafValues>\n            -3.4703999757766724e-02 3.9141800999641418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2777 -2.1534999832510948e-02</internalNodes>\n          <leafValues>\n            6.4765101671218872e-01 -2.0097799599170685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2778 6.1758998781442642e-02</internalNodes>\n          <leafValues>\n            5.4297000169754028e-02 9.0700101852416992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2779 -7.8069999814033508e-02</internalNodes>\n          <leafValues>\n            6.5523397922515869e-01 -1.9754399359226227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2780 1.1315000243484974e-02</internalNodes>\n          <leafValues>\n            1.9385300576686859e-01 -5.1707297563552856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2781 -2.5590000674128532e-02</internalNodes>\n          <leafValues>\n            -9.3096500635147095e-01 -3.1546998769044876e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2782 -3.8058999925851822e-02</internalNodes>\n          <leafValues>\n            -6.8326902389526367e-01 1.2709100544452667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2783 9.7970003262162209e-03</internalNodes>\n          <leafValues>\n            1.5523999929428101e-02 -6.3347899913787842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2784 -1.3841999694705009e-02</internalNodes>\n          <leafValues>\n            1.0060529708862305e+00 6.2812998890876770e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2785 8.3459997549653053e-03</internalNodes>\n          <leafValues>\n            -2.3383200168609619e-01 3.0982699990272522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2786 -7.1439996361732483e-02</internalNodes>\n          <leafValues>\n            -7.2505402565002441e-01 1.7148299515247345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2787 1.0006000287830830e-02</internalNodes>\n          <leafValues>\n            -2.2071999311447144e-01 3.5266199707984924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2788 1.1005300283432007e-01</internalNodes>\n          <leafValues>\n            1.6662000119686127e-01 -7.4318999052047729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2789 3.5310998558998108e-02</internalNodes>\n          <leafValues>\n            -2.3982700705528259e-01 4.1435998678207397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2790 -1.1174699664115906e-01</internalNodes>\n          <leafValues>\n            5.1045399904251099e-01 2.2319999989122152e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2791 -1.1367800086736679e-01</internalNodes>\n          <leafValues>\n            9.0475201606750488e-01 -1.6615299880504608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2792 1.6667999327182770e-02</internalNodes>\n          <leafValues>\n            1.4024500548839569e-01 -5.2178502082824707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2793 -8.0340001732110977e-03</internalNodes>\n          <leafValues>\n            -6.6178399324417114e-01 3.7640000227838755e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2794 -3.3096998929977417e-02</internalNodes>\n          <leafValues>\n            8.0185902118682861e-01 5.9385001659393311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2795 1.2547999620437622e-02</internalNodes>\n          <leafValues>\n            -3.3545500040054321e-01 1.4578600227832794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2796 -4.2073998600244522e-02</internalNodes>\n          <leafValues>\n            -5.5509102344512939e-01 1.3266600668430328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2797 2.5221999734640121e-02</internalNodes>\n          <leafValues>\n            -6.1631999909877777e-02 -1.3678770065307617e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2798 -2.4268999695777893e-02</internalNodes>\n          <leafValues>\n            3.4185099601745605e-01 -7.4160001240670681e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2799 -1.2280000373721123e-02</internalNodes>\n          <leafValues>\n            2.7745801210403442e-01 -3.1033900380134583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2800 -1.1377099901437759e-01</internalNodes>\n          <leafValues>\n            1.1719540357589722e+00 8.3681002259254456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2801 -8.4771998226642609e-02</internalNodes>\n          <leafValues>\n            8.1694799661636353e-01 -1.7837500572204590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2802 -2.4552000686526299e-02</internalNodes>\n          <leafValues>\n            -1.8627299368381500e-01 1.4340099692344666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2803 -9.0269995853304863e-03</internalNodes>\n          <leafValues>\n            3.2659199833869934e-01 -2.3541299998760223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2804 1.1177999898791313e-02</internalNodes>\n          <leafValues>\n            1.9761200249195099e-01 -2.1701000630855560e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2805 -2.9366999864578247e-02</internalNodes>\n          <leafValues>\n            -9.3414801359176636e-01 -2.1704999729990959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2806 6.3640000298619270e-03</internalNodes>\n          <leafValues>\n            2.5573000311851501e-02 4.6412798762321472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2807 1.4026000164449215e-02</internalNodes>\n          <leafValues>\n            -2.1228599548339844e-01 4.0078800916671753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2808 -1.3341999612748623e-02</internalNodes>\n          <leafValues>\n            7.4202698469161987e-01 2.9001999646425247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2809 2.8422799706459045e-01</internalNodes>\n          <leafValues>\n            -1.9243599474430084e-01 4.3631199002265930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2810 -2.3724000155925751e-01</internalNodes>\n          <leafValues>\n            6.9736397266387939e-01 6.9307997822761536e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2811 -1.1169700324535370e-01</internalNodes>\n          <leafValues>\n            3.9147201180458069e-01 -2.0922000706195831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2812 1.2787500023841858e-01</internalNodes>\n          <leafValues>\n            -7.2555996477603912e-02 3.6088201403617859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2813 -6.2900997698307037e-02</internalNodes>\n          <leafValues>\n            9.5424997806549072e-01 -1.5402799844741821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2814 1.7439000308513641e-02</internalNodes>\n          <leafValues>\n            -5.1134999841451645e-02 2.7750301361083984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2815 1.2319999514147639e-03</internalNodes>\n          <leafValues>\n            7.5627997517585754e-02 -3.6456099152565002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2816 2.7495000511407852e-02</internalNodes>\n          <leafValues>\n            5.1844000816345215e-02 4.1562598943710327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2817 -4.3543998152017593e-02</internalNodes>\n          <leafValues>\n            7.1969997882843018e-01 -1.7132200300693512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2818 1.1025999672710896e-02</internalNodes>\n          <leafValues>\n            1.4354600012302399e-01 -6.5403002500534058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2819 2.0865999162197113e-02</internalNodes>\n          <leafValues>\n            4.0089000016450882e-02 -4.5743298530578613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2820 -2.2304000332951546e-02</internalNodes>\n          <leafValues>\n            5.3855001926422119e-01 7.1662999689579010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2821 3.2492000609636307e-02</internalNodes>\n          <leafValues>\n            -4.5991998165845871e-02 -1.0047069787979126e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2822 1.2269999831914902e-02</internalNodes>\n          <leafValues>\n            3.4334998577833176e-02 4.2431798577308655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2823 8.3820000290870667e-03</internalNodes>\n          <leafValues>\n            -2.5850600004196167e-01 2.6263499259948730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2824 3.7353999912738800e-02</internalNodes>\n          <leafValues>\n            1.5692499279975891e-01 -1.0429090261459351e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2825 -1.4111000113189220e-02</internalNodes>\n          <leafValues>\n            -7.3177701234817505e-01 -2.0276999101042747e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2826 5.7066999375820160e-02</internalNodes>\n          <leafValues>\n            8.3360001444816589e-02 1.5661499500274658e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2827 4.9680001102387905e-03</internalNodes>\n          <leafValues>\n            -3.5318198800086975e-01 1.4698399603366852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2828 -2.4492999538779259e-02</internalNodes>\n          <leafValues>\n            2.8325900435447693e-01 -3.4640000667423010e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2829 -1.1254999786615372e-02</internalNodes>\n          <leafValues>\n            -8.4017497301101685e-01 -3.6251999437808990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2830 3.4533001482486725e-02</internalNodes>\n          <leafValues>\n            1.4998500049114227e-01 -8.7367099523544312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2831 2.4303000420331955e-02</internalNodes>\n          <leafValues>\n            -1.8787500262260437e-01 5.9483999013900757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2832 -7.8790001571178436e-03</internalNodes>\n          <leafValues>\n            4.4315698742866516e-01 -5.6570999324321747e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2833 3.5142000764608383e-02</internalNodes>\n          <leafValues>\n            -5.6494999676942825e-02 -1.3617190122604370e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2834 4.6259998343884945e-03</internalNodes>\n          <leafValues>\n            -3.1161698698997498e-01 2.5447699427604675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2835 -8.3131000399589539e-02</internalNodes>\n          <leafValues>\n            1.6424349546432495e+00 -1.4429399371147156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2836 -1.4015999622642994e-02</internalNodes>\n          <leafValues>\n            -7.7819502353668213e-01 1.7173300683498383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2837 1.2450000504031777e-03</internalNodes>\n          <leafValues>\n            -2.3191399872303009e-01 2.8527900576591492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2838 -1.6803000122308731e-02</internalNodes>\n          <leafValues>\n            -3.5965099930763245e-01 2.0412999391555786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2839 -7.6747998595237732e-02</internalNodes>\n          <leafValues>\n            7.8050500154495239e-01 -1.5612800419330597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2840 -2.3671999573707581e-01</internalNodes>\n          <leafValues>\n            1.1813700199127197e+00 7.8111998736858368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2841 -1.0057400166988373e-01</internalNodes>\n          <leafValues>\n            -4.7104099392890930e-01 7.9172998666763306e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2842 1.3239999534562230e-03</internalNodes>\n          <leafValues>\n            2.2262699902057648e-01 -3.7099799513816833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2843 2.2152999415993690e-02</internalNodes>\n          <leafValues>\n            -3.8649000227451324e-02 -9.2274999618530273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2844 -1.1246199905872345e-01</internalNodes>\n          <leafValues>\n            4.1899600625038147e-01 8.0411002039909363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2845 1.6481000930070877e-02</internalNodes>\n          <leafValues>\n            -1.6756699979305267e-01 7.1842402219772339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2846 6.8113997578620911e-02</internalNodes>\n          <leafValues>\n            1.5719899535179138e-01 -8.7681102752685547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2847 1.6011999920010567e-02</internalNodes>\n          <leafValues>\n            -4.1600000113248825e-03 -5.9327799081802368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2848 4.6640001237392426e-03</internalNodes>\n          <leafValues>\n            -3.0153999105095863e-02 4.8345300555229187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2849 6.7579997703433037e-03</internalNodes>\n          <leafValues>\n            -2.2667400538921356e-01 3.3662301301956177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2850 4.7289999201893806e-03</internalNodes>\n          <leafValues>\n            -6.0373999178409576e-02 3.1458100676536560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2851 2.5869999080896378e-03</internalNodes>\n          <leafValues>\n            -2.9872599244117737e-01 1.7787499725818634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2852 2.8989999555051327e-03</internalNodes>\n          <leafValues>\n            2.1890200674533844e-01 -2.9567098617553711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2853 -3.0053999274969101e-02</internalNodes>\n          <leafValues>\n            1.2150429487228394e+00 -1.4354999363422394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2854 1.4181000180542469e-02</internalNodes>\n          <leafValues>\n            1.2451999820768833e-02 5.5490100383758545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2855 -6.0527000576257706e-02</internalNodes>\n          <leafValues>\n            -1.4933999776840210e+00 -6.5227001905441284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2856 -1.9882999360561371e-02</internalNodes>\n          <leafValues>\n            -3.8526400923728943e-01 1.9761200249195099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2857 3.1218999996781349e-02</internalNodes>\n          <leafValues>\n            -2.1281200647354126e-01 2.9446500539779663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2858 1.8271999433636665e-02</internalNodes>\n          <leafValues>\n            9.7200000891461968e-04 6.6814202070236206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2859 1.1089999461546540e-03</internalNodes>\n          <leafValues>\n            -6.2467902898788452e-01 -1.6599999507889152e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2860 -3.6713998764753342e-02</internalNodes>\n          <leafValues>\n            -4.2333900928497314e-01 1.2084700167179108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2861 1.2044000439345837e-02</internalNodes>\n          <leafValues>\n            2.5882000103592873e-02 -5.0732398033142090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2862 7.4749000370502472e-02</internalNodes>\n          <leafValues>\n            1.3184699416160583e-01 -2.1739600598812103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2863 -2.3473200201988220e-01</internalNodes>\n          <leafValues>\n            1.1775610446929932e+00 -1.5114699304103851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2864 1.4096499979496002e-01</internalNodes>\n          <leafValues>\n            3.3991001546382904e-02 3.9923098683357239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2865 6.1789997853338718e-03</internalNodes>\n          <leafValues>\n            -3.1806701421737671e-01 1.1681699752807617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2866 -5.7216998189687729e-02</internalNodes>\n          <leafValues>\n            8.4399098157882690e-01 8.3889000117778778e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2867 -5.5227000266313553e-02</internalNodes>\n          <leafValues>\n            3.6888301372528076e-01 -1.8913400173187256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2868 -2.1583000198006630e-02</internalNodes>\n          <leafValues>\n            -5.2161800861358643e-01 1.5772600471973419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2869 2.5747999548912048e-02</internalNodes>\n          <leafValues>\n            -5.9921998530626297e-02 -1.0674990415573120e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2870 -1.3098999857902527e-02</internalNodes>\n          <leafValues>\n            7.8958398103713989e-01 5.2099999040365219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2871 2.2799998987466097e-03</internalNodes>\n          <leafValues>\n            -1.1704430580139160e+00 -5.9356998652219772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2872 8.8060004636645317e-03</internalNodes>\n          <leafValues>\n            4.1717998683452606e-02 6.6352599859237671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2873 -8.9699998497962952e-03</internalNodes>\n          <leafValues>\n            -3.5862699151039124e-01 6.0458000749349594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2874 4.0230001322925091e-03</internalNodes>\n          <leafValues>\n            2.0979399979114532e-01 -2.4806000292301178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2875 2.5017000734806061e-02</internalNodes>\n          <leafValues>\n            -1.8795900046825409e-01 3.9547100663185120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2876 -5.9009999968111515e-03</internalNodes>\n          <leafValues>\n            2.5663900375366211e-01 -9.4919003546237946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2877 4.3850000947713852e-03</internalNodes>\n          <leafValues>\n            3.3139001578092575e-02 -4.6075400710105896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2878 -3.3771999180316925e-02</internalNodes>\n          <leafValues>\n            -9.8881602287292480e-01 1.4636899530887604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2879 4.4523000717163086e-02</internalNodes>\n          <leafValues>\n            -1.3286699354648590e-01 1.5796790122985840e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2880 -4.0929000824689865e-02</internalNodes>\n          <leafValues>\n            3.3877098560333252e-01 7.4970997869968414e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2881 3.9351999759674072e-02</internalNodes>\n          <leafValues>\n            -1.8327899277210236e-01 4.6980699896812439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2882 -7.0322997868061066e-02</internalNodes>\n          <leafValues>\n            -9.8322701454162598e-01 1.1808100342750549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2883 3.5743001848459244e-02</internalNodes>\n          <leafValues>\n            -3.3050999045372009e-02 -8.3610898256301880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2884 -4.2961999773979187e-02</internalNodes>\n          <leafValues>\n            1.1670809984207153e+00 8.0692000687122345e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2885 -2.1007999777793884e-02</internalNodes>\n          <leafValues>\n            6.3869798183441162e-01 -1.7626300454139709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2886 -1.5742200613021851e-01</internalNodes>\n          <leafValues>\n            -2.3302499949932098e-01 1.2517499923706055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2887 7.8659998252987862e-03</internalNodes>\n          <leafValues>\n            -2.2037999331951141e-01 2.7196800708770752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2888 2.3622000589966774e-02</internalNodes>\n          <leafValues>\n            1.6127300262451172e-01 -4.3329000473022461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2889 7.4692003428936005e-02</internalNodes>\n          <leafValues>\n            -1.6991999745368958e-01 5.8884900808334351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2890 -6.4799998654052615e-04</internalNodes>\n          <leafValues>\n            2.5842899084091187e-01 -3.5911999642848969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2891 -1.6290999948978424e-02</internalNodes>\n          <leafValues>\n            -7.6764398813247681e-01 -2.0472999662160873e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2892 -3.3133998513221741e-02</internalNodes>\n          <leafValues>\n            -2.7180099487304688e-01 1.4325700700283051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2893 4.8797998577356339e-02</internalNodes>\n          <leafValues>\n            7.6408997178077698e-02 -4.1445198655128479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2894 2.2869999520480633e-03</internalNodes>\n          <leafValues>\n            -3.8628999143838882e-02 2.0753799378871918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2895 4.5304000377655029e-02</internalNodes>\n          <leafValues>\n            -1.7777900397777557e-01 6.3461399078369141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2896 1.0705800354480743e-01</internalNodes>\n          <leafValues>\n            1.8972299993038177e-01 -5.1236200332641602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2897 -4.0525000542402267e-02</internalNodes>\n          <leafValues>\n            7.0614999532699585e-01 -1.7803299427032471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2898 3.1968999654054642e-02</internalNodes>\n          <leafValues>\n            6.8149998784065247e-02 6.8733102083206177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2899 -5.7617001235485077e-02</internalNodes>\n          <leafValues>\n            7.5170499086380005e-01 -1.5764999389648438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2900 1.3593999668955803e-02</internalNodes>\n          <leafValues>\n            1.9411900639533997e-01 -2.4561899900436401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2901 7.1396000683307648e-02</internalNodes>\n          <leafValues>\n            -4.6881001442670822e-02 -8.8198298215866089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2902 -1.4895999804139137e-02</internalNodes>\n          <leafValues>\n            -4.4532400369644165e-01 1.7679899930953979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2903 -1.0026000440120697e-02</internalNodes>\n          <leafValues>\n            6.5122699737548828e-01 -1.6709999740123749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2904 3.7589999847114086e-03</internalNodes>\n          <leafValues>\n            -5.8301001787185669e-02 3.4483298659324646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2905 1.6263000667095184e-02</internalNodes>\n          <leafValues>\n            -1.5581500530242920e-01 8.6432701349258423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2906 -4.0176000446081161e-02</internalNodes>\n          <leafValues>\n            -6.1028599739074707e-01 1.1796399950981140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2907 2.7080999687314034e-02</internalNodes>\n          <leafValues>\n            -4.9601998180150986e-02 -8.9990001916885376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2908 5.2420001477003098e-02</internalNodes>\n          <leafValues>\n            1.1297199875116348e-01 -1.0833640098571777e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2909 -1.9160000607371330e-02</internalNodes>\n          <leafValues>\n            -7.9880100488662720e-01 -3.4079000353813171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2910 -3.7730000913143158e-03</internalNodes>\n          <leafValues>\n            -1.9124099612236023e-01 2.1535199880599976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2911 7.5762003660202026e-02</internalNodes>\n          <leafValues>\n            -1.3421699404716492e-01 1.6807060241699219e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2912 -2.2173000499606133e-02</internalNodes>\n          <leafValues>\n            4.8600998520851135e-01 3.6160000599920750e-03</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          6 4 12 9 -1.</_>\n        <_>\n          6 7 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 7 -1.</_>\n        <_>\n          10 4 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 9 -1.</_>\n        <_>\n          3 12 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 9 6 -1.</_>\n        <_>\n          8 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 19 -1.</_>\n        <_>\n          5 5 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 16 -1.</_>\n        <_>\n          6 13 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 6 -1.</_>\n        <_>\n          5 11 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 10 -1.</_>\n        <_>\n          11 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 7 6 -1.</_>\n        <_>\n          4 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          6 8 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 7 -1.</_>\n        <_>\n          10 4 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 19 12 -1.</_>\n        <_>\n          1 12 19 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 3 -1.</_>\n        <_>\n          8 2 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 15 -1.</_>\n        <_>\n          9 14 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 10 -1.</_>\n        <_>\n          5 11 14 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 9 -1.</_>\n        <_>\n          5 3 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 9 6 -1.</_>\n        <_>\n          16 11 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 10 -1.</_>\n        <_>\n          9 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 10 -1.</_>\n        <_>\n          12 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 4 9 -1.</_>\n        <_>\n          4 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 11 -1.</_>\n        <_>\n          20 0 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 13 -1.</_>\n        <_>\n          8 6 8 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 10 6 -1.</_>\n        <_>\n          7 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 14 12 -1.</_>\n        <_>\n          5 13 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 3 -1.</_>\n        <_>\n          8 3 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 15 6 -1.</_>\n        <_>\n          5 11 15 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 5 14 -1.</_>\n        <_>\n          9 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 10 -1.</_>\n        <_>\n          11 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 3 12 -1.</_>\n        <_>\n          6 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          9 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 13 6 -1.</_>\n        <_>\n          5 8 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 15 -1.</_>\n        <_>\n          18 1 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 15 -1.</_>\n        <_>\n          4 1 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 24 15 -1.</_>\n        <_>\n          8 8 8 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 12 -1.</_>\n        <_>\n          5 6 7 6 2.</_>\n        <_>\n          12 12 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 21 12 -1.</_>\n        <_>\n          2 16 21 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 10 -1.</_>\n        <_>\n          10 1 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 20 10 -1.</_>\n        <_>\n          2 13 10 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 13 -1.</_>\n        <_>\n          2 1 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 2 4 13 -1.</_>\n        <_>\n          20 2 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 22 19 -1.</_>\n        <_>\n          11 5 11 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 9 -1.</_>\n        <_>\n          20 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 11 -1.</_>\n        <_>\n          2 3 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 9 -1.</_>\n        <_>\n          12 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 19 3 -1.</_>\n        <_>\n          0 7 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 9 -1.</_>\n        <_>\n          12 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 9 -1.</_>\n        <_>\n          10 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 14 -1.</_>\n        <_>\n          12 5 7 7 2.</_>\n        <_>\n          5 12 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 2 -1.</_>\n        <_>\n          1 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 13 4 11 -1.</_>\n        <_>\n          17 13 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 9 -1.</_>\n        <_>\n          0 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 9 -1.</_>\n        <_>\n          6 7 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 6 -1.</_>\n        <_>\n          10 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 5 -1.</_>\n        <_>\n          8 1 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 18 6 -1.</_>\n        <_>\n          4 12 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 12 6 -1.</_>\n        <_>\n          2 17 6 3 2.</_>\n        <_>\n          8 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 4 13 -1.</_>\n        <_>\n          19 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 13 -1.</_>\n        <_>\n          3 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 23 -1.</_>\n        <_>\n          8 1 8 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 8 12 -1.</_>\n        <_>\n          1 11 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 14 -1.</_>\n        <_>\n          14 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 16 6 -1.</_>\n        <_>\n          3 12 8 3 2.</_>\n        <_>\n          11 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          6 8 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 12 -1.</_>\n        <_>\n          8 13 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          1 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 12 -1.</_>\n        <_>\n          4 10 16 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 20 -1.</_>\n        <_>\n          2 1 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 2 -1.</_>\n        <_>\n          3 1 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 20 14 -1.</_>\n        <_>\n          1 5 10 7 2.</_>\n        <_>\n          11 12 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 14 12 -1.</_>\n        <_>\n          5 12 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 7 9 -1.</_>\n        <_>\n          3 17 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 9 6 -1.</_>\n        <_>\n          14 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 9 6 -1.</_>\n        <_>\n          1 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 8 10 -1.</_>\n        <_>\n          15 6 4 5 2.</_>\n        <_>\n          11 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 14 -1.</_>\n        <_>\n          5 5 7 7 2.</_>\n        <_>\n          12 12 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 5 -1.</_>\n        <_>\n          10 0 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          9 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 18 4 -1.</_>\n        <_>\n          9 8 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 9 -1.</_>\n        <_>\n          6 3 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 6 -1.</_>\n        <_>\n          8 0 8 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 16 12 -1.</_>\n        <_>\n          4 11 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 6 -1.</_>\n        <_>\n          11 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 24 3 -1.</_>\n        <_>\n          8 20 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 15 4 -1.</_>\n        <_>\n          9 13 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 12 -1.</_>\n        <_>\n          9 18 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 22 18 2 -1.</_>\n        <_>\n          1 23 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 10 -1.</_>\n        <_>\n          10 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 10 -1.</_>\n        <_>\n          6 12 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 10 4 -1.</_>\n        <_>\n          0 16 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 2 -1.</_>\n        <_>\n          6 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 22 3 -1.</_>\n        <_>\n          1 2 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 15 -1.</_>\n        <_>\n          5 4 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 4 4 10 -1.</_>\n        <_>\n          20 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 10 -1.</_>\n        <_>\n          2 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 20 6 -1.</_>\n        <_>\n          12 16 10 3 2.</_>\n        <_>\n          2 19 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 9 -1.</_>\n        <_>\n          4 12 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 6 -1.</_>\n        <_>\n          8 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 12 6 -1.</_>\n        <_>\n          17 8 6 3 2.</_>\n        <_>\n          11 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_>\n        <_>\n          6 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 9 6 -1.</_>\n        <_>\n          8 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 6 -1.</_>\n        <_>\n          0 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 10 -1.</_>\n        <_>\n          12 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 12 3 -1.</_>\n        <_>\n          9 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 20 2 -1.</_>\n        <_>\n          2 11 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 12 -1.</_>\n        <_>\n          2 9 9 6 2.</_>\n        <_>\n          11 15 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 24 -1.</_>\n        <_>\n          3 0 9 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 10 -1.</_>\n        <_>\n          5 6 7 5 2.</_>\n        <_>\n          12 11 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 12 -1.</_>\n        <_>\n          14 5 5 6 2.</_>\n        <_>\n          9 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 12 -1.</_>\n        <_>\n          4 5 6 6 2.</_>\n        <_>\n          10 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 18 3 -1.</_>\n        <_>\n          4 15 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 8 8 -1.</_>\n        <_>\n          6 17 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 18 6 -1.</_>\n        <_>\n          3 19 18 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 18 -1.</_>\n        <_>\n          10 6 4 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 14 -1.</_>\n        <_>\n          8 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 19 2 -1.</_>\n        <_>\n          3 3 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 22 13 -1.</_>\n        <_>\n          12 8 11 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 11 4 -1.</_>\n        <_>\n          8 11 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 15 10 -1.</_>\n        <_>\n          5 12 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 12 6 -1.</_>\n        <_>\n          16 16 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 12 6 -1.</_>\n        <_>\n          4 16 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 5 12 -1.</_>\n        <_>\n          19 5 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          8 2 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 4 -1.</_>\n        <_>\n          6 10 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 9 6 -1.</_>\n        <_>\n          10 5 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 6 -1.</_>\n        <_>\n          9 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 22 15 -1.</_>\n        <_>\n          0 12 22 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 17 9 -1.</_>\n        <_>\n          4 4 17 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 10 -1.</_>\n        <_>\n          9 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 8 -1.</_>\n        <_>\n          18 1 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 7 -1.</_>\n        <_>\n          3 1 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 22 -1.</_>\n        <_>\n          18 0 3 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 22 -1.</_>\n        <_>\n          3 0 3 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 8 16 -1.</_>\n        <_>\n          16 7 4 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 19 6 -1.</_>\n        <_>\n          2 12 19 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 12 -1.</_>\n        <_>\n          9 13 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 17 6 -1.</_>\n        <_>\n          2 17 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 14 -1.</_>\n        <_>\n          14 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 10 -1.</_>\n        <_>\n          5 6 4 5 2.</_>\n        <_>\n          9 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 9 11 -1.</_>\n        <_>\n          18 8 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 11 -1.</_>\n        <_>\n          3 8 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 10 18 -1.</_>\n        <_>\n          8 15 10 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 14 -1.</_>\n        <_>\n          7 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 24 8 -1.</_>\n        <_>\n          8 14 8 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 14 -1.</_>\n        <_>\n          10 10 9 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 6 -1.</_>\n        <_>\n          14 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 16 -1.</_>\n        <_>\n          7 0 5 8 2.</_>\n        <_>\n          12 8 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 9 6 -1.</_>\n        <_>\n          13 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 4 -1.</_>\n        <_>\n          12 3 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 9 6 -1.</_>\n        <_>\n          13 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 20 4 -1.</_>\n        <_>\n          1 1 10 2 2.</_>\n        <_>\n          11 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 9 6 -1.</_>\n        <_>\n          13 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 6 -1.</_>\n        <_>\n          8 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 10 6 -1.</_>\n        <_>\n          8 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 9 -1.</_>\n        <_>\n          8 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 12 6 -1.</_>\n        <_>\n          7 5 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 3 -1.</_>\n        <_>\n          0 11 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 22 3 -1.</_>\n        <_>\n          1 11 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 8 8 -1.</_>\n        <_>\n          9 11 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 6 -1.</_>\n        <_>\n          12 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 6 -1.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 11 6 -1.</_>\n        <_>\n          7 12 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 24 4 -1.</_>\n        <_>\n          0 13 12 2 2.</_>\n        <_>\n          12 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 22 12 -1.</_>\n        <_>\n          13 4 11 6 2.</_>\n        <_>\n          2 10 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 20 17 -1.</_>\n        <_>\n          12 0 10 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 24 -1.</_>\n        <_>\n          14 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 24 -1.</_>\n        <_>\n          9 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 22 -1.</_>\n        <_>\n          14 1 1 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 2 22 -1.</_>\n        <_>\n          9 1 1 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 18 -1.</_>\n        <_>\n          18 6 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 9 6 -1.</_>\n        <_>\n          6 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 9 4 -1.</_>\n        <_>\n          13 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 18 3 -1.</_>\n        <_>\n          3 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 8 18 -1.</_>\n        <_>\n          13 4 4 9 2.</_>\n        <_>\n          9 13 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 4 -1.</_>\n        <_>\n          6 2 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 14 6 -1.</_>\n        <_>\n          6 11 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 6 -1.</_>\n        <_>\n          10 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 16 -1.</_>\n        <_>\n          10 13 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 9 16 -1.</_>\n        <_>\n          4 4 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 18 9 -1.</_>\n        <_>\n          5 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 5 8 -1.</_>\n        <_>\n          9 19 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 4 9 -1.</_>\n        <_>\n          20 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 3 -1.</_>\n        <_>\n          2 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 22 19 2 -1.</_>\n        <_>\n          5 23 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 9 -1.</_>\n        <_>\n          2 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 19 18 -1.</_>\n        <_>\n          5 12 19 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          2 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 14 12 -1.</_>\n        <_>\n          13 5 7 6 2.</_>\n        <_>\n          6 11 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 2 -1.</_>\n        <_>\n          0 2 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 3 -1.</_>\n        <_>\n          1 3 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 7 9 -1.</_>\n        <_>\n          2 11 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 22 4 -1.</_>\n        <_>\n          13 12 11 2 2.</_>\n        <_>\n          2 14 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 22 4 -1.</_>\n        <_>\n          0 12 11 2 2.</_>\n        <_>\n          11 14 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 11 -1.</_>\n        <_>\n          11 7 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 6 -1.</_>\n        <_>\n          10 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 10 -1.</_>\n        <_>\n          11 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 12 -1.</_>\n        <_>\n          6 10 12 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 15 -1.</_>\n        <_>\n          18 6 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 18 3 -1.</_>\n        <_>\n          3 16 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 6 9 -1.</_>\n        <_>\n          18 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 16 6 -1.</_>\n        <_>\n          1 5 8 3 2.</_>\n        <_>\n          9 8 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 24 14 -1.</_>\n        <_>\n          0 4 12 7 2.</_>\n        <_>\n          12 11 12 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 13 -1.</_>\n        <_>\n          13 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 13 -1.</_>\n        <_>\n          9 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 9 -1.</_>\n        <_>\n          13 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 9 -1.</_>\n        <_>\n          10 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 9 6 -1.</_>\n        <_>\n          13 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 14 6 -1.</_>\n        <_>\n          2 18 7 3 2.</_>\n        <_>\n          9 21 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 18 4 -1.</_>\n        <_>\n          12 18 9 2 2.</_>\n        <_>\n          3 20 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 15 4 -1.</_>\n        <_>\n          5 20 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 15 9 -1.</_>\n        <_>\n          14 15 5 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 4 -1.</_>\n        <_>\n          4 6 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 15 10 -1.</_>\n        <_>\n          5 14 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 14 -1.</_>\n        <_>\n          12 9 5 7 2.</_>\n        <_>\n          7 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 9 -1.</_>\n        <_>\n          9 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 3 -1.</_>\n        <_>\n          3 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 3 -1.</_>\n        <_>\n          0 11 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 18 4 -1.</_>\n        <_>\n          12 16 9 2 2.</_>\n        <_>\n          3 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 14 6 -1.</_>\n        <_>\n          4 6 7 3 2.</_>\n        <_>\n          11 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 18 -1.</_>\n        <_>\n          13 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 18 -1.</_>\n        <_>\n          10 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 10 -1.</_>\n        <_>\n          10 7 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 21 4 -1.</_>\n        <_>\n          8 20 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 5 18 -1.</_>\n        <_>\n          10 14 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 6 -1.</_>\n        <_>\n          0 2 12 3 2.</_>\n        <_>\n          12 5 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 22 8 -1.</_>\n        <_>\n          12 1 11 4 2.</_>\n        <_>\n          1 5 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 9 -1.</_>\n        <_>\n          4 3 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 19 -1.</_>\n        <_>\n          8 0 8 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 21 18 3 -1.</_>\n        <_>\n          11 21 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 10 4 -1.</_>\n        <_>\n          9 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 4 -1.</_>\n        <_>\n          10 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 6 16 -1.</_>\n        <_>\n          20 8 3 8 2.</_>\n        <_>\n          17 16 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 20 4 -1.</_>\n        <_>\n          1 15 10 2 2.</_>\n        <_>\n          11 17 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 10 6 -1.</_>\n        <_>\n          14 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 9 -1.</_>\n        <_>\n          3 3 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 7 15 -1.</_>\n        <_>\n          15 11 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 13 -1.</_>\n        <_>\n          11 1 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 6 14 -1.</_>\n        <_>\n          17 2 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 12 10 -1.</_>\n        <_>\n          3 14 6 5 2.</_>\n        <_>\n          9 19 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 14 -1.</_>\n        <_>\n          4 2 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 5 12 -1.</_>\n        <_>\n          10 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 24 5 -1.</_>\n        <_>\n          8 17 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 5 12 -1.</_>\n        <_>\n          15 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 12 -1.</_>\n        <_>\n          3 1 3 6 2.</_>\n        <_>\n          6 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 6 6 -1.</_>\n        <_>\n          12 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 6 -1.</_>\n        <_>\n          6 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 16 -1.</_>\n        <_>\n          14 14 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 6 -1.</_>\n        <_>\n          1 14 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 9 -1.</_>\n        <_>\n          13 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 6 -1.</_>\n        <_>\n          10 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 9 -1.</_>\n        <_>\n          12 2 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 9 -1.</_>\n        <_>\n          9 2 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 12 6 -1.</_>\n        <_>\n          6 20 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 9 -1.</_>\n        <_>\n          9 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 3 -1.</_>\n        <_>\n          7 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 8 21 -1.</_>\n        <_>\n          8 10 8 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 10 12 -1.</_>\n        <_>\n          7 8 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          0 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 2 20 -1.</_>\n        <_>\n          15 2 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          0 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 21 -1.</_>\n        <_>\n          15 3 1 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 23 -1.</_>\n        <_>\n          8 0 1 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 9 4 -1.</_>\n        <_>\n          15 10 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 4 -1.</_>\n        <_>\n          0 10 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 9 6 -1.</_>\n        <_>\n          8 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 18 4 -1.</_>\n        <_>\n          9 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 19 -1.</_>\n        <_>\n          8 0 8 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 8 12 -1.</_>\n        <_>\n          9 7 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 10 -1.</_>\n        <_>\n          12 6 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 12 -1.</_>\n        <_>\n          12 9 5 6 2.</_>\n        <_>\n          7 15 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 19 -1.</_>\n        <_>\n          6 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          16 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 12 -1.</_>\n        <_>\n          2 0 3 6 2.</_>\n        <_>\n          5 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 24 2 -1.</_>\n        <_>\n          0 12 24 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 13 4 -1.</_>\n        <_>\n          4 11 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 9 -1.</_>\n        <_>\n          9 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 16 4 -1.</_>\n        <_>\n          0 14 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 12 6 9 -1.</_>\n        <_>\n          18 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 9 -1.</_>\n        <_>\n          0 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 10 4 -1.</_>\n        <_>\n          8 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 9 -1.</_>\n        <_>\n          10 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 6 15 -1.</_>\n        <_>\n          14 3 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 15 -1.</_>\n        <_>\n          8 3 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 9 4 -1.</_>\n        <_>\n          15 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 7 -1.</_>\n        <_>\n          8 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 6 10 -1.</_>\n        <_>\n          9 19 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 5 8 -1.</_>\n        <_>\n          7 17 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 16 -1.</_>\n        <_>\n          14 13 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          2 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 19 3 -1.</_>\n        <_>\n          5 19 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 18 -1.</_>\n        <_>\n          13 4 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 18 -1.</_>\n        <_>\n          10 4 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 18 9 -1.</_>\n        <_>\n          9 3 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 14 -1.</_>\n        <_>\n          8 1 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 9 6 -1.</_>\n        <_>\n          12 19 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 20 16 -1.</_>\n        <_>\n          1 3 10 8 2.</_>\n        <_>\n          11 11 10 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 12 -1.</_>\n        <_>\n          15 5 3 6 2.</_>\n        <_>\n          12 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 16 -1.</_>\n        <_>\n          1 2 11 8 2.</_>\n        <_>\n          12 10 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 5 10 -1.</_>\n        <_>\n          10 19 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          3 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 10 -1.</_>\n        <_>\n          12 14 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          8 2 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 9 -1.</_>\n        <_>\n          6 7 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 5 -1.</_>\n        <_>\n          10 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 14 12 -1.</_>\n        <_>\n          5 12 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 8 10 -1.</_>\n        <_>\n          4 14 4 5 2.</_>\n        <_>\n          8 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 5 14 -1.</_>\n        <_>\n          11 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 16 -1.</_>\n        <_>\n          7 14 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 8 -1.</_>\n        <_>\n          9 7 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 20 2 -1.</_>\n        <_>\n          2 4 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 19 6 -1.</_>\n        <_>\n          3 14 19 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 6 14 -1.</_>\n        <_>\n          16 6 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 12 -1.</_>\n        <_>\n          9 9 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 6 18 -1.</_>\n        <_>\n          21 6 3 9 2.</_>\n        <_>\n          18 15 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 18 -1.</_>\n        <_>\n          0 6 3 9 2.</_>\n        <_>\n          3 15 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          18 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 15 6 -1.</_>\n        <_>\n          3 20 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          18 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 18 2 -1.</_>\n        <_>\n          5 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 6 -1.</_>\n        <_>\n          6 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          10 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 13 6 -1.</_>\n        <_>\n          3 8 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 15 -1.</_>\n        <_>\n          5 5 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 9 6 -1.</_>\n        <_>\n          11 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 14 -1.</_>\n        <_>\n          8 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 10 4 -1.</_>\n        <_>\n          9 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 19 -1.</_>\n        <_>\n          13 1 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 19 -1.</_>\n        <_>\n          9 1 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 6 9 -1.</_>\n        <_>\n          18 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 18 3 -1.</_>\n        <_>\n          1 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 10 9 -1.</_>\n        <_>\n          14 16 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 22 4 -1.</_>\n        <_>\n          1 13 11 2 2.</_>\n        <_>\n          12 15 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 6 -1.</_>\n        <_>\n          12 6 8 3 2.</_>\n        <_>\n          4 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 22 -1.</_>\n        <_>\n          1 0 9 11 2.</_>\n        <_>\n          10 11 9 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 8 14 -1.</_>\n        <_>\n          14 7 4 7 2.</_>\n        <_>\n          10 14 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 20 -1.</_>\n        <_>\n          0 4 3 10 2.</_>\n        <_>\n          3 14 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 9 -1.</_>\n        <_>\n          17 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 9 -1.</_>\n        <_>\n          5 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 6 12 -1.</_>\n        <_>\n          18 12 3 6 2.</_>\n        <_>\n          15 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 12 -1.</_>\n        <_>\n          3 12 3 6 2.</_>\n        <_>\n          6 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 9 6 -1.</_>\n        <_>\n          0 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 19 3 -1.</_>\n        <_>\n          4 15 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 19 3 -1.</_>\n        <_>\n          2 14 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 10 6 -1.</_>\n        <_>\n          14 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 12 -1.</_>\n        <_>\n          6 0 5 6 2.</_>\n        <_>\n          11 6 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 6 12 -1.</_>\n        <_>\n          20 1 3 6 2.</_>\n        <_>\n          17 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 12 -1.</_>\n        <_>\n          1 1 3 6 2.</_>\n        <_>\n          4 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 6 9 -1.</_>\n        <_>\n          16 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 9 12 -1.</_>\n        <_>\n          7 9 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 12 -1.</_>\n        <_>\n          12 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 8 -1.</_>\n        <_>\n          4 4 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 3 -1.</_>\n        <_>\n          8 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 21 23 -1.</_>\n        <_>\n          7 1 7 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 17 4 -1.</_>\n        <_>\n          6 11 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 11 18 -1.</_>\n        <_>\n          1 6 11 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 13 6 -1.</_>\n        <_>\n          6 17 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 6 -1.</_>\n        <_>\n          0 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 15 4 -1.</_>\n        <_>\n          13 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 9 -1.</_>\n        <_>\n          9 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 18 3 -1.</_>\n        <_>\n          12 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 24 4 -1.</_>\n        <_>\n          8 14 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 3 12 -1.</_>\n        <_>\n          16 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 3 -1.</_>\n        <_>\n          0 4 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 10 6 -1.</_>\n        <_>\n          14 19 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 18 3 -1.</_>\n        <_>\n          7 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 18 9 -1.</_>\n        <_>\n          5 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 9 -1.</_>\n        <_>\n          4 6 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 12 -1.</_>\n        <_>\n          16 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 18 4 -1.</_>\n        <_>\n          6 7 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 10 -1.</_>\n        <_>\n          11 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 9 -1.</_>\n        <_>\n          11 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 21 -1.</_>\n        <_>\n          12 1 9 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 7 -1.</_>\n        <_>\n          6 8 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 9 -1.</_>\n        <_>\n          10 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          8 2 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 5 12 -1.</_>\n        <_>\n          14 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 5 12 -1.</_>\n        <_>\n          5 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 17 -1.</_>\n        <_>\n          3 1 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 19 9 -1.</_>\n        <_>\n          3 4 19 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 12 6 -1.</_>\n        <_>\n          3 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 4 4 19 -1.</_>\n        <_>\n          20 4 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 10 7 -1.</_>\n        <_>\n          5 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 10 12 -1.</_>\n        <_>\n          13 7 5 6 2.</_>\n        <_>\n          8 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 12 -1.</_>\n        <_>\n          6 7 5 6 2.</_>\n        <_>\n          11 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 9 6 -1.</_>\n        <_>\n          12 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 21 4 -1.</_>\n        <_>\n          8 20 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 9 6 -1.</_>\n        <_>\n          9 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 9 6 -1.</_>\n        <_>\n          10 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 14 -1.</_>\n        <_>\n          13 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 14 -1.</_>\n        <_>\n          9 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 9 6 -1.</_>\n        <_>\n          14 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 18 5 -1.</_>\n        <_>\n          8 8 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 6 11 -1.</_>\n        <_>\n          20 3 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 11 14 -1.</_>\n        <_>\n          6 12 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 9 -1.</_>\n        <_>\n          18 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 6 -1.</_>\n        <_>\n          7 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 9 -1.</_>\n        <_>\n          18 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 9 -1.</_>\n        <_>\n          0 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 9 4 -1.</_>\n        <_>\n          9 6 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 19 2 -1.</_>\n        <_>\n          0 23 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 14 6 9 -1.</_>\n        <_>\n          17 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 9 -1.</_>\n        <_>\n          1 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 9 -1.</_>\n        <_>\n          14 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 4 9 -1.</_>\n        <_>\n          8 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 7 -1.</_>\n        <_>\n          9 9 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 10 -1.</_>\n        <_>\n          9 17 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 18 3 -1.</_>\n        <_>\n          6 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          1 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 11 12 -1.</_>\n        <_>\n          10 12 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          5 6 7 3 2.</_>\n        <_>\n          12 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 15 4 -1.</_>\n        <_>\n          5 6 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 22 2 -1.</_>\n        <_>\n          0 1 22 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 24 -1.</_>\n        <_>\n          8 0 8 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 18 4 -1.</_>\n        <_>\n          10 15 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 9 -1.</_>\n        <_>\n          6 11 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 7 12 -1.</_>\n        <_>\n          4 16 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 6 -1.</_>\n        <_>\n          12 2 11 3 2.</_>\n        <_>\n          1 5 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 14 3 -1.</_>\n        <_>\n          12 20 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 16 -1.</_>\n        <_>\n          12 0 12 8 2.</_>\n        <_>\n          0 8 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 18 4 -1.</_>\n        <_>\n          3 13 9 2 2.</_>\n        <_>\n          12 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 22 2 -1.</_>\n        <_>\n          2 11 22 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 11 8 -1.</_>\n        <_>\n          6 7 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 6 -1.</_>\n        <_>\n          14 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 6 -1.</_>\n        <_>\n          0 9 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 10 -1.</_>\n        <_>\n          19 0 5 5 2.</_>\n        <_>\n          14 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 10 -1.</_>\n        <_>\n          0 0 5 5 2.</_>\n        <_>\n          5 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 4 -1.</_>\n        <_>\n          12 1 12 2 2.</_>\n        <_>\n          0 3 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 16 6 -1.</_>\n        <_>\n          13 15 8 3 2.</_>\n        <_>\n          5 18 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 16 6 -1.</_>\n        <_>\n          3 15 8 3 2.</_>\n        <_>\n          11 18 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 21 10 -1.</_>\n        <_>\n          0 18 21 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 24 -1.</_>\n        <_>\n          15 0 2 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 11 -1.</_>\n        <_>\n          9 4 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 6 -1.</_>\n        <_>\n          12 5 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 2 20 -1.</_>\n        <_>\n          1 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 24 -1.</_>\n        <_>\n          15 0 2 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 24 -1.</_>\n        <_>\n          7 0 2 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 6 14 -1.</_>\n        <_>\n          19 7 3 7 2.</_>\n        <_>\n          16 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 12 -1.</_>\n        <_>\n          6 7 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 24 14 -1.</_>\n        <_>\n          8 5 8 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 10 6 -1.</_>\n        <_>\n          5 15 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 14 -1.</_>\n        <_>\n          2 7 3 7 2.</_>\n        <_>\n          5 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 9 15 -1.</_>\n        <_>\n          18 2 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          2 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 10 14 -1.</_>\n        <_>\n          17 2 5 7 2.</_>\n        <_>\n          12 9 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 18 -1.</_>\n        <_>\n          12 6 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 15 6 -1.</_>\n        <_>\n          14 5 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 10 -1.</_>\n        <_>\n          10 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 9 7 -1.</_>\n        <_>\n          6 3 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 3 -1.</_>\n        <_>\n          6 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 8 6 -1.</_>\n        <_>\n          11 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 7 12 -1.</_>\n        <_>\n          12 13 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          10 6 2 9 2.</_>\n        <_>\n          12 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 6 9 -1.</_>\n        <_>\n          16 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 13 -1.</_>\n        <_>\n          6 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 21 3 -1.</_>\n        <_>\n          9 2 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 5 12 -1.</_>\n        <_>\n          5 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 10 -1.</_>\n        <_>\n          10 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 5 8 -1.</_>\n        <_>\n          8 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 11 9 -1.</_>\n        <_>\n          6 3 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 5 -1.</_>\n        <_>\n          10 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 5 -1.</_>\n        <_>\n          8 0 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 23 6 -1.</_>\n        <_>\n          1 12 23 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          9 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 21 6 -1.</_>\n        <_>\n          3 8 21 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 12 -1.</_>\n        <_>\n          2 5 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 8 10 -1.</_>\n        <_>\n          8 12 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 12 -1.</_>\n        <_>\n          10 7 5 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 10 6 -1.</_>\n        <_>\n          0 19 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 9 6 -1.</_>\n        <_>\n          14 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 16 -1.</_>\n        <_>\n          9 14 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 9 6 -1.</_>\n        <_>\n          14 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 9 6 -1.</_>\n        <_>\n          1 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 9 6 -1.</_>\n        <_>\n          15 11 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 9 6 -1.</_>\n        <_>\n          0 11 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 6 9 -1.</_>\n        <_>\n          19 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          2 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 21 6 -1.</_>\n        <_>\n          3 17 21 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 6 -1.</_>\n        <_>\n          9 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 6 9 -1.</_>\n        <_>\n          18 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          0 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 10 -1.</_>\n        <_>\n          12 0 8 5 2.</_>\n        <_>\n          4 5 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 10 16 -1.</_>\n        <_>\n          2 0 5 8 2.</_>\n        <_>\n          7 8 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 5 -1.</_>\n        <_>\n          14 0 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 5 -1.</_>\n        <_>\n          5 0 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 6 10 -1.</_>\n        <_>\n          18 3 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 6 -1.</_>\n        <_>\n          5 11 6 3 2.</_>\n        <_>\n          11 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          21 0 3 18 -1.</_>\n        <_>\n          22 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 9 7 -1.</_>\n        <_>\n          11 8 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 8 10 -1.</_>\n        <_>\n          7 12 4 5 2.</_>\n        <_>\n          11 17 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          21 0 3 18 -1.</_>\n        <_>\n          22 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          12 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 9 6 -1.</_>\n        <_>\n          15 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 3 -1.</_>\n        <_>\n          0 3 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 9 -1.</_>\n        <_>\n          13 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 10 -1.</_>\n        <_>\n          9 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 12 -1.</_>\n        <_>\n          14 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 12 -1.</_>\n        <_>\n          6 10 12 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 2 21 -1.</_>\n        <_>\n          14 3 1 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 8 -1.</_>\n        <_>\n          6 5 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 8 -1.</_>\n        <_>\n          3 4 18 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 3 -1.</_>\n        <_>\n          3 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 24 4 -1.</_>\n        <_>\n          12 13 12 2 2.</_>\n        <_>\n          0 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 9 -1.</_>\n        <_>\n          12 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 9 -1.</_>\n        <_>\n          13 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 22 -1.</_>\n        <_>\n          8 2 2 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 8 14 -1.</_>\n        <_>\n          20 10 4 7 2.</_>\n        <_>\n          16 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 16 15 -1.</_>\n        <_>\n          3 9 16 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 8 14 -1.</_>\n        <_>\n          20 10 4 7 2.</_>\n        <_>\n          16 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 8 14 -1.</_>\n        <_>\n          0 10 4 7 2.</_>\n        <_>\n          4 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 11 6 -1.</_>\n        <_>\n          10 17 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 9 -1.</_>\n        <_>\n          8 7 8 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 16 -1.</_>\n        <_>\n          13 1 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 16 -1.</_>\n        <_>\n          9 1 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 16 8 -1.</_>\n        <_>\n          13 5 8 4 2.</_>\n        <_>\n          5 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 9 -1.</_>\n        <_>\n          0 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 9 -1.</_>\n        <_>\n          3 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 9 6 -1.</_>\n        <_>\n          8 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 8 10 -1.</_>\n        <_>\n          2 13 4 5 2.</_>\n        <_>\n          6 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 3 18 -1.</_>\n        <_>\n          15 11 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 18 3 -1.</_>\n        <_>\n          3 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 6 11 -1.</_>\n        <_>\n          19 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 11 -1.</_>\n        <_>\n          3 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 4 9 -1.</_>\n        <_>\n          19 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 4 9 -1.</_>\n        <_>\n          3 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 18 9 -1.</_>\n        <_>\n          4 15 9 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 4 -1.</_>\n        <_>\n          6 11 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 9 6 -1.</_>\n        <_>\n          15 4 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 9 6 -1.</_>\n        <_>\n          0 4 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 17 -1.</_>\n        <_>\n          17 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 17 -1.</_>\n        <_>\n          5 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 9 4 -1.</_>\n        <_>\n          8 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 18 -1.</_>\n        <_>\n          6 11 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 12 -1.</_>\n        <_>\n          5 8 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 12 -1.</_>\n        <_>\n          10 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 14 15 -1.</_>\n        <_>\n          10 12 14 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 14 15 -1.</_>\n        <_>\n          0 12 14 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 9 6 -1.</_>\n        <_>\n          15 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 6 -1.</_>\n        <_>\n          0 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 14 -1.</_>\n        <_>\n          14 6 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 9 -1.</_>\n        <_>\n          11 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 15 -1.</_>\n        <_>\n          14 6 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 15 -1.</_>\n        <_>\n          8 6 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 8 9 -1.</_>\n        <_>\n          15 3 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 21 -1.</_>\n        <_>\n          3 0 3 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 8 12 -1.</_>\n        <_>\n          11 13 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 12 -1.</_>\n        <_>\n          6 7 5 6 2.</_>\n        <_>\n          11 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          12 6 2 9 2.</_>\n        <_>\n          10 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 9 -1.</_>\n        <_>\n          0 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 18 3 -1.</_>\n        <_>\n          3 15 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 8 10 -1.</_>\n        <_>\n          3 14 4 5 2.</_>\n        <_>\n          7 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 24 4 -1.</_>\n        <_>\n          12 12 12 2 2.</_>\n        <_>\n          0 14 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 20 -1.</_>\n        <_>\n          1 2 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 10 8 -1.</_>\n        <_>\n          17 16 5 4 2.</_>\n        <_>\n          12 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 10 8 -1.</_>\n        <_>\n          2 16 5 4 2.</_>\n        <_>\n          7 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 9 -1.</_>\n        <_>\n          7 3 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 3 -1.</_>\n        <_>\n          8 0 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 15 4 -1.</_>\n        <_>\n          3 10 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 6 -1.</_>\n        <_>\n          10 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 14 6 -1.</_>\n        <_>\n          5 16 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 10 -1.</_>\n        <_>\n          11 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 7 -1.</_>\n        <_>\n          3 6 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 6 -1.</_>\n        <_>\n          18 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 3 -1.</_>\n        <_>\n          3 2 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 14 18 -1.</_>\n        <_>\n          9 12 14 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 24 3 -1.</_>\n        <_>\n          8 20 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 7 -1.</_>\n        <_>\n          13 11 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 10 6 -1.</_>\n        <_>\n          4 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 7 -1.</_>\n        <_>\n          8 11 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 11 12 -1.</_>\n        <_>\n          7 8 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 10 4 -1.</_>\n        <_>\n          6 17 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 9 -1.</_>\n        <_>\n          6 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 15 -1.</_>\n        <_>\n          11 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 10 6 -1.</_>\n        <_>\n          13 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 11 -1.</_>\n        <_>\n          5 7 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 10 9 -1.</_>\n        <_>\n          10 17 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 9 -1.</_>\n        <_>\n          10 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 10 4 -1.</_>\n        <_>\n          14 3 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          6 6 6 3 2.</_>\n        <_>\n          12 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 8 10 -1.</_>\n        <_>\n          12 8 4 5 2.</_>\n        <_>\n          8 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 16 -1.</_>\n        <_>\n          7 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 9 4 -1.</_>\n        <_>\n          8 10 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 9 -1.</_>\n        <_>\n          5 5 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 19 8 -1.</_>\n        <_>\n          3 20 19 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 8 -1.</_>\n        <_>\n          5 0 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 16 18 -1.</_>\n        <_>\n          5 2 8 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 24 11 -1.</_>\n        <_>\n          8 11 8 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 18 5 -1.</_>\n        <_>\n          3 3 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 3 -1.</_>\n        <_>\n          1 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 18 3 -1.</_>\n        <_>\n          5 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 9 6 -1.</_>\n        <_>\n          1 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 23 10 -1.</_>\n        <_>\n          1 14 23 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 3 -1.</_>\n        <_>\n          3 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 3 -1.</_>\n        <_>\n          6 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 22 -1.</_>\n        <_>\n          7 2 1 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 10 6 -1.</_>\n        <_>\n          14 19 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 10 6 -1.</_>\n        <_>\n          1 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 12 -1.</_>\n        <_>\n          13 3 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          12 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 9 6 -1.</_>\n        <_>\n          15 10 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 6 9 -1.</_>\n        <_>\n          5 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 19 -1.</_>\n        <_>\n          15 5 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 6 -1.</_>\n        <_>\n          6 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 19 -1.</_>\n        <_>\n          15 5 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          0 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 18 3 -1.</_>\n        <_>\n          5 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 4 -1.</_>\n        <_>\n          7 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 8 10 -1.</_>\n        <_>\n          17 4 4 5 2.</_>\n        <_>\n          13 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 6 -1.</_>\n        <_>\n          10 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 9 8 -1.</_>\n        <_>\n          15 9 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 5 12 -1.</_>\n        <_>\n          0 10 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 14 6 -1.</_>\n        <_>\n          14 6 7 3 2.</_>\n        <_>\n          7 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 19 -1.</_>\n        <_>\n          8 5 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 15 20 -1.</_>\n        <_>\n          13 4 5 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 15 20 -1.</_>\n        <_>\n          6 4 5 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 6 -1.</_>\n        <_>\n          13 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 6 -1.</_>\n        <_>\n          8 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 14 -1.</_>\n        <_>\n          17 2 3 7 2.</_>\n        <_>\n          14 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 14 -1.</_>\n        <_>\n          4 2 3 7 2.</_>\n        <_>\n          7 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 6 7 -1.</_>\n        <_>\n          12 4 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 9 -1.</_>\n        <_>\n          11 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 8 10 -1.</_>\n        <_>\n          11 4 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 8 10 -1.</_>\n        <_>\n          9 4 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 10 6 -1.</_>\n        <_>\n          8 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 21 6 -1.</_>\n        <_>\n          1 20 21 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 12 6 -1.</_>\n        <_>\n          9 2 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 6 -1.</_>\n        <_>\n          9 2 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 12 6 -1.</_>\n        <_>\n          18 5 6 3 2.</_>\n        <_>\n          12 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 9 -1.</_>\n        <_>\n          8 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 20 6 -1.</_>\n        <_>\n          2 9 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 6 -1.</_>\n        <_>\n          0 5 6 3 2.</_>\n        <_>\n          6 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 8 10 -1.</_>\n        <_>\n          18 14 4 5 2.</_>\n        <_>\n          14 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 8 10 -1.</_>\n        <_>\n          2 14 4 5 2.</_>\n        <_>\n          6 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 20 13 -1.</_>\n        <_>\n          2 11 10 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 5 -1.</_>\n        <_>\n          12 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 16 6 -1.</_>\n        <_>\n          13 6 8 3 2.</_>\n        <_>\n          5 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 9 4 -1.</_>\n        <_>\n          1 21 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 12 5 -1.</_>\n        <_>\n          11 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 14 12 -1.</_>\n        <_>\n          3 5 7 6 2.</_>\n        <_>\n          10 11 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 9 6 -1.</_>\n        <_>\n          12 4 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 19 3 -1.</_>\n        <_>\n          2 7 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 6 9 -1.</_>\n        <_>\n          18 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 2 -1.</_>\n        <_>\n          3 8 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 2 4 18 -1.</_>\n        <_>\n          22 2 2 9 2.</_>\n        <_>\n          20 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 20 3 -1.</_>\n        <_>\n          2 19 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 22 3 -1.</_>\n        <_>\n          1 10 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 18 -1.</_>\n        <_>\n          0 2 2 9 2.</_>\n        <_>\n          2 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 4 23 -1.</_>\n        <_>\n          19 0 2 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 19 -1.</_>\n        <_>\n          3 3 3 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          20 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 6 -1.</_>\n        <_>\n          0 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 12 -1.</_>\n        <_>\n          13 0 6 6 2.</_>\n        <_>\n          7 6 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 6 -1.</_>\n        <_>\n          0 3 12 3 2.</_>\n        <_>\n          12 6 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 10 -1.</_>\n        <_>\n          10 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 15 -1.</_>\n        <_>\n          8 14 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 17 6 -1.</_>\n        <_>\n          4 14 17 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 8 -1.</_>\n        <_>\n          2 5 9 4 2.</_>\n        <_>\n          11 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 14 6 -1.</_>\n        <_>\n          14 6 7 3 2.</_>\n        <_>\n          7 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 6 -1.</_>\n        <_>\n          3 6 7 3 2.</_>\n        <_>\n          10 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 18 -1.</_>\n        <_>\n          17 5 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 18 -1.</_>\n        <_>\n          6 5 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 14 4 -1.</_>\n        <_>\n          10 12 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 9 4 -1.</_>\n        <_>\n          4 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 9 -1.</_>\n        <_>\n          2 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 8 -1.</_>\n        <_>\n          10 3 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 5 -1.</_>\n        <_>\n          5 1 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 7 8 -1.</_>\n        <_>\n          12 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 22 4 -1.</_>\n        <_>\n          0 14 22 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 15 -1.</_>\n        <_>\n          15 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 7 8 -1.</_>\n        <_>\n          5 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 9 4 -1.</_>\n        <_>\n          8 20 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 4 -1.</_>\n        <_>\n          1 4 22 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 6 17 -1.</_>\n        <_>\n          19 3 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 18 -1.</_>\n        <_>\n          8 11 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 6 12 -1.</_>\n        <_>\n          20 0 3 6 2.</_>\n        <_>\n          17 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 9 12 -1.</_>\n        <_>\n          15 11 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 22 18 2 -1.</_>\n        <_>\n          2 23 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 12 6 -1.</_>\n        <_>\n          16 10 6 3 2.</_>\n        <_>\n          10 13 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 11 -1.</_>\n        <_>\n          2 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 4 10 -1.</_>\n        <_>\n          20 0 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 17 -1.</_>\n        <_>\n          3 3 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 9 -1.</_>\n        <_>\n          0 16 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 6 12 -1.</_>\n        <_>\n          16 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 12 -1.</_>\n        <_>\n          2 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 19 3 -1.</_>\n        <_>\n          1 6 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 9 7 -1.</_>\n        <_>\n          14 8 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 12 9 -1.</_>\n        <_>\n          3 11 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 3 -1.</_>\n        <_>\n          3 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 12 -1.</_>\n        <_>\n          10 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 14 -1.</_>\n        <_>\n          3 9 9 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 9 -1.</_>\n        <_>\n          2 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 18 -1.</_>\n        <_>\n          12 5 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 18 -1.</_>\n        <_>\n          10 5 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 10 -1.</_>\n        <_>\n          12 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 4 11 -1.</_>\n        <_>\n          11 4 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 18 3 -1.</_>\n        <_>\n          4 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 20 3 -1.</_>\n        <_>\n          0 17 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 12 -1.</_>\n        <_>\n          9 13 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 8 8 -1.</_>\n        <_>\n          8 17 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 3 12 -1.</_>\n        <_>\n          13 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 14 14 -1.</_>\n        <_>\n          5 9 7 7 2.</_>\n        <_>\n          12 16 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 10 -1.</_>\n        <_>\n          12 0 12 5 2.</_>\n        <_>\n          0 5 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 18 2 -1.</_>\n        <_>\n          1 12 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 5 12 -1.</_>\n        <_>\n          19 9 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 5 12 -1.</_>\n        <_>\n          0 9 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 8 18 -1.</_>\n        <_>\n          20 6 4 9 2.</_>\n        <_>\n          16 15 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 8 18 -1.</_>\n        <_>\n          0 6 4 9 2.</_>\n        <_>\n          4 15 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 12 12 -1.</_>\n        <_>\n          18 5 6 6 2.</_>\n        <_>\n          12 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 9 -1.</_>\n        <_>\n          9 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 11 -1.</_>\n        <_>\n          11 13 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 12 -1.</_>\n        <_>\n          0 5 6 6 2.</_>\n        <_>\n          6 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 23 3 -1.</_>\n        <_>\n          1 3 23 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 19 3 -1.</_>\n        <_>\n          1 16 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 11 4 -1.</_>\n        <_>\n          13 19 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 5 -1.</_>\n        <_>\n          4 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 10 4 -1.</_>\n        <_>\n          12 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 9 -1.</_>\n        <_>\n          4 9 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 9 6 -1.</_>\n        <_>\n          15 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 6 -1.</_>\n        <_>\n          1 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 20 8 -1.</_>\n        <_>\n          13 10 10 4 2.</_>\n        <_>\n          3 14 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 18 -1.</_>\n        <_>\n          5 0 3 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 9 10 -1.</_>\n        <_>\n          16 11 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 5 -1.</_>\n        <_>\n          5 2 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 21 6 -1.</_>\n        <_>\n          10 4 7 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 14 -1.</_>\n        <_>\n          7 0 5 7 2.</_>\n        <_>\n          12 7 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 12 4 -1.</_>\n        <_>\n          12 19 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 23 4 -1.</_>\n        <_>\n          0 8 23 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 8 10 -1.</_>\n        <_>\n          17 10 4 5 2.</_>\n        <_>\n          13 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 9 4 -1.</_>\n        <_>\n          15 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 4 -1.</_>\n        <_>\n          0 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 6 -1.</_>\n        <_>\n          8 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 6 -1.</_>\n        <_>\n          12 3 12 3 2.</_>\n        <_>\n          0 6 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 18 3 -1.</_>\n        <_>\n          2 5 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 4 -1.</_>\n        <_>\n          12 0 12 2 2.</_>\n        <_>\n          0 2 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 3 -1.</_>\n        <_>\n          1 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 6 -1.</_>\n        <_>\n          0 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 18 3 -1.</_>\n        <_>\n          6 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 10 -1.</_>\n        <_>\n          10 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 5 8 -1.</_>\n        <_>\n          8 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 8 -1.</_>\n        <_>\n          12 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 11 -1.</_>\n        <_>\n          8 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 8 9 -1.</_>\n        <_>\n          13 9 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 21 6 -1.</_>\n        <_>\n          1 9 21 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 3 12 -1.</_>\n        <_>\n          15 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 11 12 -1.</_>\n        <_>\n          6 13 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 10 8 -1.</_>\n        <_>\n          18 8 5 4 2.</_>\n        <_>\n          13 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 3 -1.</_>\n        <_>\n          11 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 18 4 -1.</_>\n        <_>\n          12 11 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 22 22 -1.</_>\n        <_>\n          0 11 22 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 8 -1.</_>\n        <_>\n          11 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 14 -1.</_>\n        <_>\n          8 3 3 7 2.</_>\n        <_>\n          11 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 18 8 -1.</_>\n        <_>\n          9 10 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 14 -1.</_>\n        <_>\n          10 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 20 -1.</_>\n        <_>\n          4 13 16 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 10 -1.</_>\n        <_>\n          11 4 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 16 4 -1.</_>\n        <_>\n          5 2 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 4 -1.</_>\n        <_>\n          8 5 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          15 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 5 -1.</_>\n        <_>\n          12 4 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 10 4 -1.</_>\n        <_>\n          12 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 10 4 -1.</_>\n        <_>\n          7 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 12 5 -1.</_>\n        <_>\n          11 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 10 -1.</_>\n        <_>\n          3 10 4 5 2.</_>\n        <_>\n          7 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 9 8 -1.</_>\n        <_>\n          14 12 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 24 3 -1.</_>\n        <_>\n          8 21 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 18 4 -1.</_>\n        <_>\n          9 20 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 9 6 -1.</_>\n        <_>\n          1 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 10 4 -1.</_>\n        <_>\n          11 19 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 4 12 -1.</_>\n        <_>\n          9 18 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 6 -1.</_>\n        <_>\n          12 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 6 9 -1.</_>\n        <_>\n          1 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 12 4 -1.</_>\n        <_>\n          6 18 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 20 3 -1.</_>\n        <_>\n          1 6 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 9 -1.</_>\n        <_>\n          8 4 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 9 4 -1.</_>\n        <_>\n          2 21 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 18 -1.</_>\n        <_>\n          11 7 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 12 -1.</_>\n        <_>\n          7 2 4 6 2.</_>\n        <_>\n          11 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 9 8 -1.</_>\n        <_>\n          14 10 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 5 -1.</_>\n        <_>\n          9 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 9 6 -1.</_>\n        <_>\n          14 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 9 -1.</_>\n        <_>\n          7 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 5 12 -1.</_>\n        <_>\n          4 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 21 6 -1.</_>\n        <_>\n          9 0 7 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 15 -1.</_>\n        <_>\n          11 0 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 2 -1.</_>\n        <_>\n          2 3 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 8 6 -1.</_>\n        <_>\n          8 20 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 2 -1.</_>\n        <_>\n          3 1 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 6 -1.</_>\n        <_>\n          11 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 5 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          2 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 2 4 9 -1.</_>\n        <_>\n          20 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 9 -1.</_>\n        <_>\n          2 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 4 -1.</_>\n        <_>\n          12 1 12 2 2.</_>\n        <_>\n          0 3 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 6 -1.</_>\n        <_>\n          0 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 9 6 -1.</_>\n        <_>\n          14 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 19 3 -1.</_>\n        <_>\n          0 16 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 22 12 -1.</_>\n        <_>\n          12 5 11 6 2.</_>\n        <_>\n          1 11 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 6 6 -1.</_>\n        <_>\n          8 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 20 3 -1.</_>\n        <_>\n          4 3 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 10 -1.</_>\n        <_>\n          10 14 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 16 6 -1.</_>\n        <_>\n          14 12 8 3 2.</_>\n        <_>\n          6 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 8 9 -1.</_>\n        <_>\n          2 16 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 6 14 -1.</_>\n        <_>\n          14 8 3 7 2.</_>\n        <_>\n          11 15 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 6 -1.</_>\n        <_>\n          2 12 8 3 2.</_>\n        <_>\n          10 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 16 8 -1.</_>\n        <_>\n          5 20 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 12 -1.</_>\n        <_>\n          9 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 10 -1.</_>\n        <_>\n          12 2 4 5 2.</_>\n        <_>\n          8 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          6 6 6 3 2.</_>\n        <_>\n          12 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 9 -1.</_>\n        <_>\n          12 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 12 -1.</_>\n        <_>\n          0 0 4 6 2.</_>\n        <_>\n          4 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 6 9 -1.</_>\n        <_>\n          18 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 6 -1.</_>\n        <_>\n          5 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 21 3 -1.</_>\n        <_>\n          10 21 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 6 -1.</_>\n        <_>\n          2 3 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 7 6 -1.</_>\n        <_>\n          13 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 14 -1.</_>\n        <_>\n          6 11 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 9 -1.</_>\n        <_>\n          11 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 14 -1.</_>\n        <_>\n          7 8 3 7 2.</_>\n        <_>\n          10 15 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 4 16 -1.</_>\n        <_>\n          18 16 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 6 10 -1.</_>\n        <_>\n          11 14 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 5 -1.</_>\n        <_>\n          10 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 23 3 -1.</_>\n        <_>\n          0 13 23 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 12 -1.</_>\n        <_>\n          15 0 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 12 5 -1.</_>\n        <_>\n          4 10 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 10 4 -1.</_>\n        <_>\n          13 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 12 -1.</_>\n        <_>\n          7 0 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 9 6 -1.</_>\n        <_>\n          14 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 6 -1.</_>\n        <_>\n          7 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 18 13 -1.</_>\n        <_>\n          12 11 6 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 18 13 -1.</_>\n        <_>\n          6 11 6 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 12 6 -1.</_>\n        <_>\n          16 16 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 21 3 -1.</_>\n        <_>\n          0 7 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 12 6 -1.</_>\n        <_>\n          16 16 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 14 -1.</_>\n        <_>\n          5 14 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 19 2 -1.</_>\n        <_>\n          5 11 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 14 4 -1.</_>\n        <_>\n          5 6 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 18 4 -1.</_>\n        <_>\n          9 18 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 9 -1.</_>\n        <_>\n          9 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 11 4 -1.</_>\n        <_>\n          13 5 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 6 -1.</_>\n        <_>\n          5 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 4 23 -1.</_>\n        <_>\n          19 1 2 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 4 23 -1.</_>\n        <_>\n          3 1 2 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 18 3 -1.</_>\n        <_>\n          5 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 11 4 -1.</_>\n        <_>\n          0 5 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 20 3 -1.</_>\n        <_>\n          2 17 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 13 4 -1.</_>\n        <_>\n          5 5 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 22 15 -1.</_>\n        <_>\n          1 9 11 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 3 -1.</_>\n        <_>\n          10 4 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 10 4 -1.</_>\n        <_>\n          8 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 4 -1.</_>\n        <_>\n          11 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 9 -1.</_>\n        <_>\n          12 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 6 -1.</_>\n        <_>\n          4 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 8 10 -1.</_>\n        <_>\n          12 3 4 5 2.</_>\n        <_>\n          8 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 16 6 -1.</_>\n        <_>\n          3 6 8 3 2.</_>\n        <_>\n          11 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          5 9 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 9 6 -1.</_>\n        <_>\n          4 5 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 18 2 -1.</_>\n        <_>\n          6 4 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 6 -1.</_>\n        <_>\n          10 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 3 -1.</_>\n        <_>\n          0 2 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 10 6 -1.</_>\n        <_>\n          0 19 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 18 3 -1.</_>\n        <_>\n          3 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 16 -1.</_>\n        <_>\n          2 5 3 8 2.</_>\n        <_>\n          5 13 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 11 6 -1.</_>\n        <_>\n          7 8 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 22 -1.</_>\n        <_>\n          5 13 12 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 10 -1.</_>\n        <_>\n          10 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 18 -1.</_>\n        <_>\n          9 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 6 9 -1.</_>\n        <_>\n          18 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 10 -1.</_>\n        <_>\n          9 7 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 9 -1.</_>\n        <_>\n          12 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 10 -1.</_>\n        <_>\n          11 9 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 10 -1.</_>\n        <_>\n          13 14 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 10 -1.</_>\n        <_>\n          9 14 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 9 -1.</_>\n        <_>\n          4 11 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 20 3 -1.</_>\n        <_>\n          2 12 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 13 -1.</_>\n        <_>\n          13 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 13 -1.</_>\n        <_>\n          9 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 7 -1.</_>\n        <_>\n          9 1 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 9 -1.</_>\n        <_>\n          1 14 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 9 6 -1.</_>\n        <_>\n          8 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 15 6 -1.</_>\n        <_>\n          3 11 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 19 2 -1.</_>\n        <_>\n          5 11 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 7 16 -1.</_>\n        <_>\n          8 14 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 9 6 -1.</_>\n        <_>\n          9 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 12 -1.</_>\n        <_>\n          0 11 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 18 3 -1.</_>\n        <_>\n          6 5 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 12 6 -1.</_>\n        <_>\n          4 16 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 9 4 -1.</_>\n        <_>\n          13 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 14 14 -1.</_>\n        <_>\n          5 8 7 7 2.</_>\n        <_>\n          12 15 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 22 6 -1.</_>\n        <_>\n          12 16 11 3 2.</_>\n        <_>\n          1 19 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 10 -1.</_>\n        <_>\n          14 5 5 5 2.</_>\n        <_>\n          9 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 10 -1.</_>\n        <_>\n          5 5 5 5 2.</_>\n        <_>\n          10 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 6 -1.</_>\n        <_>\n          12 6 8 3 2.</_>\n        <_>\n          4 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 9 -1.</_>\n        <_>\n          0 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 8 14 -1.</_>\n        <_>\n          20 10 4 7 2.</_>\n        <_>\n          16 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 12 -1.</_>\n        <_>\n          9 18 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 8 12 -1.</_>\n        <_>\n          12 10 4 6 2.</_>\n        <_>\n          8 16 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 9 -1.</_>\n        <_>\n          10 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 16 -1.</_>\n        <_>\n          14 4 4 8 2.</_>\n        <_>\n          10 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 10 6 -1.</_>\n        <_>\n          7 12 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 14 -1.</_>\n        <_>\n          12 6 7 7 2.</_>\n        <_>\n          5 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 20 2 -1.</_>\n        <_>\n          2 12 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 4 16 -1.</_>\n        <_>\n          18 16 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 12 10 -1.</_>\n        <_>\n          1 11 6 5 2.</_>\n        <_>\n          7 16 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 4 -1.</_>\n        <_>\n          6 11 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 7 -1.</_>\n        <_>\n          12 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 16 -1.</_>\n        <_>\n          14 4 4 8 2.</_>\n        <_>\n          10 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 16 -1.</_>\n        <_>\n          6 4 4 8 2.</_>\n        <_>\n          10 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 9 6 -1.</_>\n        <_>\n          11 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 16 12 -1.</_>\n        <_>\n          1 5 8 6 2.</_>\n        <_>\n          9 11 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 8 -1.</_>\n        <_>\n          9 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 18 -1.</_>\n        <_>\n          7 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 5 14 -1.</_>\n        <_>\n          17 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 5 14 -1.</_>\n        <_>\n          2 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 10 6 -1.</_>\n        <_>\n          7 7 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 23 18 -1.</_>\n        <_>\n          1 9 23 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 21 3 -1.</_>\n        <_>\n          8 1 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 12 6 -1.</_>\n        <_>\n          3 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 8 16 -1.</_>\n        <_>\n          20 8 4 8 2.</_>\n        <_>\n          16 16 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 24 4 -1.</_>\n        <_>\n          8 19 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 8 16 -1.</_>\n        <_>\n          20 8 4 8 2.</_>\n        <_>\n          16 16 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 16 -1.</_>\n        <_>\n          0 8 4 8 2.</_>\n        <_>\n          4 16 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 8 10 -1.</_>\n        <_>\n          8 17 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 5 8 -1.</_>\n        <_>\n          5 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 19 2 -1.</_>\n        <_>\n          4 2 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 24 9 -1.</_>\n        <_>\n          8 12 8 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 13 8 -1.</_>\n        <_>\n          6 4 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 3 -1.</_>\n        <_>\n          0 1 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 3 4 11 -1.</_>\n        <_>\n          20 3 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 8 -1.</_>\n        <_>\n          12 11 6 4 2.</_>\n        <_>\n          6 15 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_>\n        <_>\n          6 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 18 3 -1.</_>\n        <_>\n          6 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 3 4 9 -1.</_>\n        <_>\n          20 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 9 -1.</_>\n        <_>\n          2 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 9 19 -1.</_>\n        <_>\n          18 0 3 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 19 -1.</_>\n        <_>\n          3 0 3 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 8 -1.</_>\n        <_>\n          13 11 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 8 -1.</_>\n        <_>\n          8 11 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 19 3 -1.</_>\n        <_>\n          5 12 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 18 4 -1.</_>\n        <_>\n          9 20 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 16 6 -1.</_>\n        <_>\n          6 8 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 6 -1.</_>\n        <_>\n          9 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 14 -1.</_>\n        <_>\n          10 10 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 15 12 -1.</_>\n        <_>\n          1 11 15 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 8 5 -1.</_>\n        <_>\n          11 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 9 -1.</_>\n        <_>\n          7 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 8 -1.</_>\n        <_>\n          5 5 6 4 2.</_>\n        <_>\n          11 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 11 6 -1.</_>\n        <_>\n          13 14 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 21 3 -1.</_>\n        <_>\n          0 14 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 12 -1.</_>\n        <_>\n          12 1 4 6 2.</_>\n        <_>\n          8 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 12 -1.</_>\n        <_>\n          1 0 3 6 2.</_>\n        <_>\n          4 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 21 2 -1.</_>\n        <_>\n          2 3 21 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 19 3 -1.</_>\n        <_>\n          2 3 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 10 6 14 -1.</_>\n        <_>\n          20 10 3 7 2.</_>\n        <_>\n          17 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 14 -1.</_>\n        <_>\n          1 10 3 7 2.</_>\n        <_>\n          4 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 14 14 -1.</_>\n        <_>\n          14 6 7 7 2.</_>\n        <_>\n          7 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 9 6 -1.</_>\n        <_>\n          0 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 8 9 -1.</_>\n        <_>\n          15 17 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 22 4 -1.</_>\n        <_>\n          1 1 11 2 2.</_>\n        <_>\n          12 3 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 9 6 -1.</_>\n        <_>\n          9 13 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 3 -1.</_>\n        <_>\n          0 16 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 7 9 -1.</_>\n        <_>\n          16 17 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 4 -1.</_>\n        <_>\n          12 3 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 5 -1.</_>\n        <_>\n          7 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 10 -1.</_>\n        <_>\n          12 1 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 10 -1.</_>\n        <_>\n          10 1 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 6 9 -1.</_>\n        <_>\n          15 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 9 -1.</_>\n        <_>\n          3 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 19 -1.</_>\n        <_>\n          16 1 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 9 -1.</_>\n        <_>\n          3 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 19 -1.</_>\n        <_>\n          16 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 4 -1.</_>\n        <_>\n          12 3 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 9 -1.</_>\n        <_>\n          10 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 19 -1.</_>\n        <_>\n          7 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 12 -1.</_>\n        <_>\n          11 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 5 -1.</_>\n        <_>\n          11 7 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 18 -1.</_>\n        <_>\n          12 3 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 12 -1.</_>\n        <_>\n          11 3 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 19 3 -1.</_>\n        <_>\n          3 8 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 3 -1.</_>\n        <_>\n          2 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 18 4 -1.</_>\n        <_>\n          12 13 9 2 2.</_>\n        <_>\n          3 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 9 -1.</_>\n        <_>\n          5 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 20 4 -1.</_>\n        <_>\n          14 1 10 2 2.</_>\n        <_>\n          4 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 4 -1.</_>\n        <_>\n          0 1 10 2 2.</_>\n        <_>\n          10 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 6 -1.</_>\n        <_>\n          10 15 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 8 -1.</_>\n        <_>\n          8 2 8 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 18 3 -1.</_>\n        <_>\n          5 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 6 -1.</_>\n        <_>\n          11 15 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 8 5 -1.</_>\n        <_>\n          11 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 8 5 -1.</_>\n        <_>\n          9 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 6 -1.</_>\n        <_>\n          5 2 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 5 12 -1.</_>\n        <_>\n          10 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 8 14 -1.</_>\n        <_>\n          7 9 4 7 2.</_>\n        <_>\n          11 16 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 22 6 -1.</_>\n        <_>\n          12 5 11 3 2.</_>\n        <_>\n          1 8 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 4 -1.</_>\n        <_>\n          12 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 19 3 -1.</_>\n        <_>\n          2 19 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 4 -1.</_>\n        <_>\n          12 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          1 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 4 -1.</_>\n        <_>\n          12 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 3 -1.</_>\n        <_>\n          0 1 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 4 -1.</_>\n        <_>\n          5 2 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 9 6 -1.</_>\n        <_>\n          6 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 9 -1.</_>\n        <_>\n          14 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 13 4 -1.</_>\n        <_>\n          5 22 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 12 -1.</_>\n        <_>\n          9 13 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 21 3 -1.</_>\n        <_>\n          8 10 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 9 6 -1.</_>\n        <_>\n          11 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 9 7 -1.</_>\n        <_>\n          6 10 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 10 8 -1.</_>\n        <_>\n          17 10 5 4 2.</_>\n        <_>\n          12 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 24 3 -1.</_>\n        <_>\n          8 15 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 9 6 -1.</_>\n        <_>\n          8 7 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 9 -1.</_>\n        <_>\n          4 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 4 -1.</_>\n        <_>\n          12 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 6 -1.</_>\n        <_>\n          9 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 14 10 -1.</_>\n        <_>\n          16 9 7 5 2.</_>\n        <_>\n          9 14 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 14 10 -1.</_>\n        <_>\n          1 9 7 5 2.</_>\n        <_>\n          8 14 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 17 -1.</_>\n        <_>\n          11 7 3 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 20 -1.</_>\n        <_>\n          3 4 3 10 2.</_>\n        <_>\n          6 14 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 9 -1.</_>\n        <_>\n          12 7 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 9 -1.</_>\n        <_>\n          12 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 6 16 -1.</_>\n        <_>\n          3 8 3 8 2.</_>\n        <_>\n          6 16 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 4 -1.</_>\n        <_>\n          12 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 9 4 -1.</_>\n        <_>\n          3 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 9 6 -1.</_>\n        <_>\n          13 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 10 -1.</_>\n        <_>\n          5 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 12 6 -1.</_>\n        <_>\n          11 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 9 8 -1.</_>\n        <_>\n          9 4 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 10 8 -1.</_>\n        <_>\n          17 16 5 4 2.</_>\n        <_>\n          12 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 10 8 -1.</_>\n        <_>\n          2 16 5 4 2.</_>\n        <_>\n          7 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 4 -1.</_>\n        <_>\n          12 0 12 2 2.</_>\n        <_>\n          0 2 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 9 6 -1.</_>\n        <_>\n          0 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 24 6 -1.</_>\n        <_>\n          12 4 12 3 2.</_>\n        <_>\n          0 7 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 11 4 -1.</_>\n        <_>\n          5 2 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 22 4 -1.</_>\n        <_>\n          12 1 11 2 2.</_>\n        <_>\n          1 3 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 18 -1.</_>\n        <_>\n          9 15 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 20 4 -1.</_>\n        <_>\n          2 11 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 14 -1.</_>\n        <_>\n          5 9 14 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 16 6 -1.</_>\n        <_>\n          4 5 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 19 3 -1.</_>\n        <_>\n          2 4 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 4 -1.</_>\n        <_>\n          7 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 15 -1.</_>\n        <_>\n          0 14 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 21 3 -1.</_>\n        <_>\n          2 11 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 6 -1.</_>\n        <_>\n          6 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 14 9 -1.</_>\n        <_>\n          6 7 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 9 -1.</_>\n        <_>\n          11 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 9 9 -1.</_>\n        <_>\n          15 11 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 21 -1.</_>\n        <_>\n          8 7 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 22 19 2 -1.</_>\n        <_>\n          3 23 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 20 3 -1.</_>\n        <_>\n          2 16 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 4 13 -1.</_>\n        <_>\n          19 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 8 8 -1.</_>\n        <_>\n          1 11 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 6 9 -1.</_>\n        <_>\n          14 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 6 9 -1.</_>\n        <_>\n          4 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 4 10 -1.</_>\n        <_>\n          14 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 10 -1.</_>\n        <_>\n          8 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 6 -1.</_>\n        <_>\n          14 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 6 -1.</_>\n        <_>\n          4 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 21 -1.</_>\n        <_>\n          8 2 8 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 13 -1.</_>\n        <_>\n          3 2 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 4 21 -1.</_>\n        <_>\n          20 0 2 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 20 -1.</_>\n        <_>\n          2 4 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 9 6 -1.</_>\n        <_>\n          8 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 7 9 -1.</_>\n        <_>\n          16 15 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 14 3 -1.</_>\n        <_>\n          12 21 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 6 9 -1.</_>\n        <_>\n          11 5 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 10 -1.</_>\n        <_>\n          12 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 9 -1.</_>\n        <_>\n          10 5 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 10 4 -1.</_>\n        <_>\n          14 16 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 14 -1.</_>\n        <_>\n          5 5 7 7 2.</_>\n        <_>\n          12 12 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 12 6 -1.</_>\n        <_>\n          18 8 6 3 2.</_>\n        <_>\n          12 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 12 -1.</_>\n        <_>\n          6 6 6 6 2.</_>\n        <_>\n          12 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 6 10 -1.</_>\n        <_>\n          13 13 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 20 8 -1.</_>\n        <_>\n          1 10 10 4 2.</_>\n        <_>\n          11 14 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 9 6 -1.</_>\n        <_>\n          15 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          9 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 5 14 -1.</_>\n        <_>\n          10 8 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 16 6 -1.</_>\n        <_>\n          3 6 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 8 9 -1.</_>\n        <_>\n          16 6 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 10 -1.</_>\n        <_>\n          9 13 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 9 6 -1.</_>\n        <_>\n          15 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 9 6 -1.</_>\n        <_>\n          0 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 16 9 6 -1.</_>\n        <_>\n          13 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 9 6 -1.</_>\n        <_>\n          2 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 18 3 -1.</_>\n        <_>\n          5 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 3 -1.</_>\n        <_>\n          1 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 18 3 -1.</_>\n        <_>\n          5 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 19 2 -1.</_>\n        <_>\n          1 2 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 11 -1.</_>\n        <_>\n          16 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 15 6 -1.</_>\n        <_>\n          9 15 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 11 -1.</_>\n        <_>\n          16 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 11 -1.</_>\n        <_>\n          6 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          18 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 4 -1.</_>\n        <_>\n          1 2 11 2 2.</_>\n        <_>\n          12 4 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 21 12 -1.</_>\n        <_>\n          9 0 7 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 18 3 -1.</_>\n        <_>\n          0 13 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 9 -1.</_>\n        <_>\n          14 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 18 3 -1.</_>\n        <_>\n          3 11 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 8 9 -1.</_>\n        <_>\n          16 6 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 3 -1.</_>\n        <_>\n          3 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 9 -1.</_>\n        <_>\n          11 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 9 -1.</_>\n        <_>\n          11 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 18 -1.</_>\n        <_>\n          15 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 18 -1.</_>\n        <_>\n          8 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 7 9 -1.</_>\n        <_>\n          17 6 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 9 6 -1.</_>\n        <_>\n          3 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 21 3 -1.</_>\n        <_>\n          3 19 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 7 9 -1.</_>\n        <_>\n          0 6 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 22 3 -1.</_>\n        <_>\n          2 8 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 16 -1.</_>\n        <_>\n          0 3 12 8 2.</_>\n        <_>\n          12 11 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 9 4 -1.</_>\n        <_>\n          13 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 8 -1.</_>\n        <_>\n          5 5 6 4 2.</_>\n        <_>\n          11 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          12 6 7 3 2.</_>\n        <_>\n          5 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 14 6 -1.</_>\n        <_>\n          5 16 7 3 2.</_>\n        <_>\n          12 19 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          18 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 20 10 -1.</_>\n        <_>\n          13 4 10 5 2.</_>\n        <_>\n          3 9 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 9 8 -1.</_>\n        <_>\n          5 13 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 21 15 -1.</_>\n        <_>\n          9 1 7 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 14 8 -1.</_>\n        <_>\n          12 12 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 4 -1.</_>\n        <_>\n          6 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 6 -1.</_>\n        <_>\n          9 5 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 6 -1.</_>\n        <_>\n          8 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 18 2 -1.</_>\n        <_>\n          6 5 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 11 -1.</_>\n        <_>\n          2 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 15 -1.</_>\n        <_>\n          20 0 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 13 -1.</_>\n        <_>\n          2 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          8 2 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 18 4 -1.</_>\n        <_>\n          12 13 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 10 4 -1.</_>\n        <_>\n          9 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 3 -1.</_>\n        <_>\n          11 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 19 3 -1.</_>\n        <_>\n          4 15 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 20 -1.</_>\n        <_>\n          10 10 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 9 6 -1.</_>\n        <_>\n          8 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 15 4 -1.</_>\n        <_>\n          7 9 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 12 7 -1.</_>\n        <_>\n          12 4 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 9 -1.</_>\n        <_>\n          0 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 6 9 -1.</_>\n        <_>\n          18 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 16 6 -1.</_>\n        <_>\n          0 18 8 3 2.</_>\n        <_>\n          8 21 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 14 6 -1.</_>\n        <_>\n          16 18 7 3 2.</_>\n        <_>\n          9 21 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 20 4 -1.</_>\n        <_>\n          1 20 10 2 2.</_>\n        <_>\n          11 22 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 20 6 -1.</_>\n        <_>\n          12 8 10 3 2.</_>\n        <_>\n          2 11 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 9 -1.</_>\n        <_>\n          9 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 8 -1.</_>\n        <_>\n          12 5 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 8 -1.</_>\n        <_>\n          8 5 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 16 -1.</_>\n        <_>\n          4 0 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 6 12 -1.</_>\n        <_>\n          15 8 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 12 -1.</_>\n        <_>\n          3 8 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 22 -1.</_>\n        <_>\n          4 11 15 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 9 6 -1.</_>\n        <_>\n          0 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 6 -1.</_>\n        <_>\n          0 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 10 -1.</_>\n        <_>\n          14 0 4 5 2.</_>\n        <_>\n          10 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 16 -1.</_>\n        <_>\n          3 0 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 4 10 -1.</_>\n        <_>\n          10 17 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 10 6 -1.</_>\n        <_>\n          8 6 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 22 18 2 -1.</_>\n        <_>\n          12 22 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 11 6 -1.</_>\n        <_>\n          7 9 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 10 -1.</_>\n        <_>\n          0 0 6 5 2.</_>\n        <_>\n          6 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 12 6 -1.</_>\n        <_>\n          16 1 6 3 2.</_>\n        <_>\n          10 4 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 9 4 -1.</_>\n        <_>\n          7 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 16 -1.</_>\n        <_>\n          10 7 5 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 13 -1.</_>\n        <_>\n          11 10 6 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 6 -1.</_>\n        <_>\n          12 2 6 3 2.</_>\n        <_>\n          6 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 12 9 -1.</_>\n        <_>\n          3 12 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 8 6 -1.</_>\n        <_>\n          16 5 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 6 -1.</_>\n        <_>\n          0 5 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 11 -1.</_>\n        <_>\n          0 3 12 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 10 -1.</_>\n        <_>\n          0 13 4 5 2.</_>\n        <_>\n          4 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 10 -1.</_>\n        <_>\n          10 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 21 -1.</_>\n        <_>\n          10 9 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 15 9 -1.</_>\n        <_>\n          4 7 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 6 -1.</_>\n        <_>\n          8 1 8 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 5 16 -1.</_>\n        <_>\n          9 14 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          9 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 12 -1.</_>\n        <_>\n          6 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 8 -1.</_>\n        <_>\n          8 6 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 20 2 -1.</_>\n        <_>\n          4 4 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 3 -1.</_>\n        <_>\n          8 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 10 6 -1.</_>\n        <_>\n          7 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 4 18 -1.</_>\n        <_>\n          1 4 2 9 2.</_>\n        <_>\n          3 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          15 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 9 -1.</_>\n        <_>\n          7 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 6 -1.</_>\n        <_>\n          9 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 2 -1.</_>\n        <_>\n          3 1 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 4 -1.</_>\n        <_>\n          0 10 10 2 2.</_>\n        <_>\n          10 12 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 12 -1.</_>\n        <_>\n          10 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 12 -1.</_>\n        <_>\n          6 5 3 6 2.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 22 -1.</_>\n        <_>\n          15 0 9 11 2.</_>\n        <_>\n          6 11 9 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 22 -1.</_>\n        <_>\n          0 0 9 11 2.</_>\n        <_>\n          9 11 9 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 11 -1.</_>\n        <_>\n          20 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 11 -1.</_>\n        <_>\n          2 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 20 2 -1.</_>\n        <_>\n          2 3 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 2 -1.</_>\n        <_>\n          1 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 6 9 -1.</_>\n        <_>\n          18 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 22 9 -1.</_>\n        <_>\n          0 3 22 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 6 9 -1.</_>\n        <_>\n          17 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 9 -1.</_>\n        <_>\n          0 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 6 -1.</_>\n        <_>\n          0 8 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 10 -1.</_>\n        <_>\n          2 2 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 9 -1.</_>\n        <_>\n          17 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 9 -1.</_>\n        <_>\n          5 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 9 6 -1.</_>\n        <_>\n          15 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 23 6 -1.</_>\n        <_>\n          0 17 23 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 18 3 -1.</_>\n        <_>\n          5 16 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 8 10 -1.</_>\n        <_>\n          13 8 4 5 2.</_>\n        <_>\n          9 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 15 6 -1.</_>\n        <_>\n          8 7 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 8 10 -1.</_>\n        <_>\n          13 8 4 5 2.</_>\n        <_>\n          9 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 12 -1.</_>\n        <_>\n          8 0 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 8 10 -1.</_>\n        <_>\n          13 8 4 5 2.</_>\n        <_>\n          9 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 9 -1.</_>\n        <_>\n          10 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          12 6 2 9 2.</_>\n        <_>\n          10 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 12 4 -1.</_>\n        <_>\n          11 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 8 10 -1.</_>\n        <_>\n          13 8 4 5 2.</_>\n        <_>\n          9 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 8 10 -1.</_>\n        <_>\n          7 8 4 5 2.</_>\n        <_>\n          11 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 14 -1.</_>\n        <_>\n          14 10 3 7 2.</_>\n        <_>\n          11 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 19 -1.</_>\n        <_>\n          12 5 3 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 12 6 -1.</_>\n        <_>\n          12 12 6 3 2.</_>\n        <_>\n          6 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 6 -1.</_>\n        <_>\n          1 9 9 3 2.</_>\n        <_>\n          10 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 8 10 -1.</_>\n        <_>\n          20 14 4 5 2.</_>\n        <_>\n          16 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 22 8 -1.</_>\n        <_>\n          0 9 11 4 2.</_>\n        <_>\n          11 13 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 12 6 -1.</_>\n        <_>\n          14 18 6 3 2.</_>\n        <_>\n          8 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 18 -1.</_>\n        <_>\n          0 6 10 9 2.</_>\n        <_>\n          10 15 10 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 20 12 -1.</_>\n        <_>\n          13 6 10 6 2.</_>\n        <_>\n          3 12 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 10 8 -1.</_>\n        <_>\n          0 16 5 4 2.</_>\n        <_>\n          5 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 19 3 -1.</_>\n        <_>\n          0 12 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 9 -1.</_>\n        <_>\n          14 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 22 4 -1.</_>\n        <_>\n          1 7 11 2 2.</_>\n        <_>\n          12 9 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 7 12 -1.</_>\n        <_>\n          13 10 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 11 9 -1.</_>\n        <_>\n          4 10 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 10 8 -1.</_>\n        <_>\n          17 10 5 4 2.</_>\n        <_>\n          12 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 9 7 -1.</_>\n        <_>\n          5 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 6 9 -1.</_>\n        <_>\n          16 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 12 -1.</_>\n        <_>\n          3 16 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 6 -1.</_>\n        <_>\n          14 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          10 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 23 -1.</_>\n        <_>\n          11 1 2 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 6 -1.</_>\n        <_>\n          0 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 18 3 -1.</_>\n        <_>\n          4 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 13 14 -1.</_>\n        <_>\n          5 9 13 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 8 12 -1.</_>\n        <_>\n          19 0 4 6 2.</_>\n        <_>\n          15 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 12 -1.</_>\n        <_>\n          0 0 4 6 2.</_>\n        <_>\n          4 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 7 -1.</_>\n        <_>\n          8 2 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 9 -1.</_>\n        <_>\n          3 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 12 -1.</_>\n        <_>\n          17 8 3 6 2.</_>\n        <_>\n          14 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 12 -1.</_>\n        <_>\n          4 8 3 6 2.</_>\n        <_>\n          7 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 5 15 -1.</_>\n        <_>\n          16 10 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 5 15 -1.</_>\n        <_>\n          3 10 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 9 -1.</_>\n        <_>\n          18 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 15 -1.</_>\n        <_>\n          1 12 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 12 8 -1.</_>\n        <_>\n          17 15 6 4 2.</_>\n        <_>\n          11 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          0 2 12 2 2.</_>\n        <_>\n          12 4 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 2 19 -1.</_>\n        <_>\n          15 1 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 2 19 -1.</_>\n        <_>\n          8 1 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          22 1 2 20 -1.</_>\n        <_>\n          22 1 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 20 -1.</_>\n        <_>\n          1 1 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 11 6 12 -1.</_>\n        <_>\n          20 11 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 12 -1.</_>\n        <_>\n          2 11 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 14 -1.</_>\n        <_>\n          3 13 18 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 7 8 -1.</_>\n        <_>\n          6 14 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 12 12 -1.</_>\n        <_>\n          7 13 12 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 18 5 -1.</_>\n        <_>\n          11 18 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 21 20 3 -1.</_>\n        <_>\n          4 22 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 12 -1.</_>\n        <_>\n          9 12 3 6 2.</_>\n        <_>\n          12 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 18 3 -1.</_>\n        <_>\n          4 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 3 -1.</_>\n        <_>\n          3 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 9 -1.</_>\n        <_>\n          18 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 9 6 -1.</_>\n        <_>\n          2 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 18 4 -1.</_>\n        <_>\n          13 14 9 2 2.</_>\n        <_>\n          4 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 14 -1.</_>\n        <_>\n          7 7 3 7 2.</_>\n        <_>\n          10 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 12 6 -1.</_>\n        <_>\n          13 13 6 3 2.</_>\n        <_>\n          7 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 9 -1.</_>\n        <_>\n          10 7 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 6 -1.</_>\n        <_>\n          12 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 10 -1.</_>\n        <_>\n          0 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 6 -1.</_>\n        <_>\n          11 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 6 -1.</_>\n        <_>\n          2 12 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 9 -1.</_>\n        <_>\n          13 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 9 -1.</_>\n        <_>\n          5 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 9 6 -1.</_>\n        <_>\n          9 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 12 6 -1.</_>\n        <_>\n          5 19 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 20 3 -1.</_>\n        <_>\n          3 3 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 12 6 -1.</_>\n        <_>\n          6 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 24 -1.</_>\n        <_>\n          12 0 1 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 15 4 -1.</_>\n        <_>\n          8 16 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 12 -1.</_>\n        <_>\n          9 18 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 8 -1.</_>\n        <_>\n          1 15 6 4 2.</_>\n        <_>\n          7 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 8 14 -1.</_>\n        <_>\n          19 10 4 7 2.</_>\n        <_>\n          15 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 8 14 -1.</_>\n        <_>\n          1 9 4 7 2.</_>\n        <_>\n          5 16 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 9 10 -1.</_>\n        <_>\n          9 16 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 6 -1.</_>\n        <_>\n          6 9 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 9 -1.</_>\n        <_>\n          12 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 7 -1.</_>\n        <_>\n          10 8 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 10 -1.</_>\n        <_>\n          14 4 4 5 2.</_>\n        <_>\n          10 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 9 -1.</_>\n        <_>\n          4 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 12 -1.</_>\n        <_>\n          8 6 8 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 14 -1.</_>\n        <_>\n          6 7 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 8 5 8 -1.</_>\n        <_>\n          19 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 8 -1.</_>\n        <_>\n          0 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 6 6 -1.</_>\n        <_>\n          17 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 6 -1.</_>\n        <_>\n          1 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          18 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 18 6 -1.</_>\n        <_>\n          3 5 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 9 6 -1.</_>\n        <_>\n          2 5 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 10 8 -1.</_>\n        <_>\n          14 3 5 4 2.</_>\n        <_>\n          9 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 8 -1.</_>\n        <_>\n          5 3 5 4 2.</_>\n        <_>\n          10 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 6 12 -1.</_>\n        <_>\n          10 11 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 11 -1.</_>\n        <_>\n          11 11 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 7 -1.</_>\n        <_>\n          12 6 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 18 3 -1.</_>\n        <_>\n          5 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 9 -1.</_>\n        <_>\n          10 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 7 -1.</_>\n        <_>\n          11 1 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 6 -1.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 11 -1.</_>\n        <_>\n          14 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 11 -1.</_>\n        <_>\n          8 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 18 -1.</_>\n        <_>\n          12 0 4 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 10 5 -1.</_>\n        <_>\n          7 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 20 22 3 -1.</_>\n        <_>\n          2 21 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 20 -1.</_>\n        <_>\n          1 4 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          8 2 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 10 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 10 -1.</_>\n        <_>\n          6 7 4 5 2.</_>\n        <_>\n          10 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 14 -1.</_>\n        <_>\n          17 0 3 7 2.</_>\n        <_>\n          14 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 5 8 -1.</_>\n        <_>\n          4 15 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 20 9 -1.</_>\n        <_>\n          2 3 20 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 8 -1.</_>\n        <_>\n          6 7 6 4 2.</_>\n        <_>\n          12 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 6 -1.</_>\n        <_>\n          9 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 10 4 -1.</_>\n        <_>\n          7 12 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 9 -1.</_>\n        <_>\n          10 5 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 8 -1.</_>\n        <_>\n          8 11 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 17 -1.</_>\n        <_>\n          18 4 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 17 -1.</_>\n        <_>\n          18 4 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 4 17 -1.</_>\n        <_>\n          4 4 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 19 3 -1.</_>\n        <_>\n          5 19 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 18 -1.</_>\n        <_>\n          11 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 2 18 -1.</_>\n        <_>\n          15 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 18 -1.</_>\n        <_>\n          7 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 10 8 -1.</_>\n        <_>\n          12 11 5 4 2.</_>\n        <_>\n          7 15 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          12 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 8 -1.</_>\n        <_>\n          2 9 8 4 2.</_>\n        <_>\n          10 13 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 9 -1.</_>\n        <_>\n          14 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 9 -1.</_>\n        <_>\n          10 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 9 -1.</_>\n        <_>\n          14 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 12 6 -1.</_>\n        <_>\n          3 14 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 9 6 -1.</_>\n        <_>\n          14 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 6 -1.</_>\n        <_>\n          1 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 3 -1.</_>\n        <_>\n          3 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 22 6 -1.</_>\n        <_>\n          1 9 22 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 6 -1.</_>\n        <_>\n          18 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 6 -1.</_>\n        <_>\n          0 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 16 6 -1.</_>\n        <_>\n          5 14 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 9 4 -1.</_>\n        <_>\n          6 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 9 -1.</_>\n        <_>\n          14 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 9 -1.</_>\n        <_>\n          4 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 6 23 -1.</_>\n        <_>\n          17 1 2 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 24 3 -1.</_>\n        <_>\n          8 21 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 24 4 -1.</_>\n        <_>\n          8 20 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 23 -1.</_>\n        <_>\n          5 1 2 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 18 3 -1.</_>\n        <_>\n          3 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 22 4 -1.</_>\n        <_>\n          12 16 11 2 2.</_>\n        <_>\n          1 18 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 6 -1.</_>\n        <_>\n          0 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 21 3 -1.</_>\n        <_>\n          9 10 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 12 6 -1.</_>\n        <_>\n          2 18 6 3 2.</_>\n        <_>\n          8 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 24 4 -1.</_>\n        <_>\n          0 7 24 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 12 -1.</_>\n        <_>\n          10 13 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 9 -1.</_>\n        <_>\n          8 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 9 -1.</_>\n        <_>\n          11 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 20 3 -1.</_>\n        <_>\n          2 2 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 12 6 -1.</_>\n        <_>\n          1 18 6 3 2.</_>\n        <_>\n          7 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 13 -1.</_>\n        <_>\n          13 2 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 4 -1.</_>\n        <_>\n          12 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 13 -1.</_>\n        <_>\n          10 1 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 18 -1.</_>\n        <_>\n          7 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 10 5 -1.</_>\n        <_>\n          14 3 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 12 8 -1.</_>\n        <_>\n          10 15 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 9 -1.</_>\n        <_>\n          11 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 9 -1.</_>\n        <_>\n          10 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 6 14 -1.</_>\n        <_>\n          20 0 3 7 2.</_>\n        <_>\n          17 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 14 -1.</_>\n        <_>\n          1 0 3 7 2.</_>\n        <_>\n          4 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 16 -1.</_>\n        <_>\n          17 0 3 8 2.</_>\n        <_>\n          14 8 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 10 -1.</_>\n        <_>\n          9 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 18 6 -1.</_>\n        <_>\n          12 17 9 3 2.</_>\n        <_>\n          3 20 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 22 4 -1.</_>\n        <_>\n          12 20 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 10 5 -1.</_>\n        <_>\n          14 3 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 10 5 -1.</_>\n        <_>\n          5 3 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 12 16 -1.</_>\n        <_>\n          16 6 4 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 12 16 -1.</_>\n        <_>\n          4 6 4 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 5 15 -1.</_>\n        <_>\n          10 14 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 21 2 -1.</_>\n        <_>\n          1 19 21 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 9 6 -1.</_>\n        <_>\n          15 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 4 -1.</_>\n        <_>\n          12 1 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 12 -1.</_>\n        <_>\n          12 0 6 6 2.</_>\n        <_>\n          6 6 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 8 12 -1.</_>\n        <_>\n          8 10 4 6 2.</_>\n        <_>\n          12 16 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 10 8 -1.</_>\n        <_>\n          19 16 5 4 2.</_>\n        <_>\n          14 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 10 8 -1.</_>\n        <_>\n          0 16 5 4 2.</_>\n        <_>\n          5 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 12 5 -1.</_>\n        <_>\n          14 12 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 10 8 -1.</_>\n        <_>\n          6 16 5 4 2.</_>\n        <_>\n          11 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 6 -1.</_>\n        <_>\n          13 6 6 3 2.</_>\n        <_>\n          7 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 18 -1.</_>\n        <_>\n          9 6 2 9 2.</_>\n        <_>\n          11 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 14 -1.</_>\n        <_>\n          13 9 3 7 2.</_>\n        <_>\n          10 16 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 14 -1.</_>\n        <_>\n          8 9 3 7 2.</_>\n        <_>\n          11 16 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 11 12 -1.</_>\n        <_>\n          7 10 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 16 -1.</_>\n        <_>\n          4 8 3 8 2.</_>\n        <_>\n          7 16 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 4 21 -1.</_>\n        <_>\n          17 10 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 4 21 -1.</_>\n        <_>\n          3 10 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 8 18 -1.</_>\n        <_>\n          14 1 4 9 2.</_>\n        <_>\n          10 10 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 8 -1.</_>\n        <_>\n          2 5 8 4 2.</_>\n        <_>\n          10 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 12 -1.</_>\n        <_>\n          3 10 18 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 16 12 -1.</_>\n        <_>\n          4 14 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 8 20 -1.</_>\n        <_>\n          19 4 4 10 2.</_>\n        <_>\n          15 14 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 9 6 -1.</_>\n        <_>\n          10 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 8 20 -1.</_>\n        <_>\n          19 4 4 10 2.</_>\n        <_>\n          15 14 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 8 20 -1.</_>\n        <_>\n          1 4 4 10 2.</_>\n        <_>\n          5 14 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 8 14 -1.</_>\n        <_>\n          15 8 4 7 2.</_>\n        <_>\n          11 15 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 8 14 -1.</_>\n        <_>\n          5 8 4 7 2.</_>\n        <_>\n          9 15 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 5 8 -1.</_>\n        <_>\n          10 17 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 7 9 -1.</_>\n        <_>\n          4 16 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 24 10 -1.</_>\n        <_>\n          0 18 24 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 8 11 -1.</_>\n        <_>\n          8 2 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 8 16 -1.</_>\n        <_>\n          14 2 4 8 2.</_>\n        <_>\n          10 10 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 6 -1.</_>\n        <_>\n          0 2 12 3 2.</_>\n        <_>\n          12 5 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 9 -1.</_>\n        <_>\n          6 3 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 12 -1.</_>\n        <_>\n          1 2 6 6 2.</_>\n        <_>\n          7 8 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 6 9 -1.</_>\n        <_>\n          18 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 8 10 -1.</_>\n        <_>\n          4 3 4 5 2.</_>\n        <_>\n          8 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 21 18 3 -1.</_>\n        <_>\n          6 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 2 -1.</_>\n        <_>\n          1 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 22 3 -1.</_>\n        <_>\n          1 11 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 9 -1.</_>\n        <_>\n          2 11 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 12 6 -1.</_>\n        <_>\n          18 8 6 3 2.</_>\n        <_>\n          12 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_>\n        <_>\n          6 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 9 -1.</_>\n        <_>\n          12 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 9 6 -1.</_>\n        <_>\n          7 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 7 12 -1.</_>\n        <_>\n          9 14 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 9 6 -1.</_>\n        <_>\n          7 13 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 18 4 -1.</_>\n        <_>\n          12 15 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 16 -1.</_>\n        <_>\n          7 4 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 9 -1.</_>\n        <_>\n          12 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 9 -1.</_>\n        <_>\n          10 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 12 10 -1.</_>\n        <_>\n          15 11 6 5 2.</_>\n        <_>\n          9 16 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 6 -1.</_>\n        <_>\n          3 8 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 17 8 -1.</_>\n        <_>\n          4 6 17 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 21 -1.</_>\n        <_>\n          6 9 12 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 9 -1.</_>\n        <_>\n          8 4 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 3 -1.</_>\n        <_>\n          12 7 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 9 10 -1.</_>\n        <_>\n          11 11 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 3 -1.</_>\n        <_>\n          2 12 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 9 4 -1.</_>\n        <_>\n          8 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 6 -1.</_>\n        <_>\n          0 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 24 6 -1.</_>\n        <_>\n          0 13 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 20 6 -1.</_>\n        <_>\n          2 12 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 12 -1.</_>\n        <_>\n          12 5 8 6 2.</_>\n        <_>\n          4 11 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 10 4 -1.</_>\n        <_>\n          7 5 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 8 -1.</_>\n        <_>\n          9 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 7 10 -1.</_>\n        <_>\n          17 5 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 10 -1.</_>\n        <_>\n          0 5 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 6 12 -1.</_>\n        <_>\n          19 1 3 6 2.</_>\n        <_>\n          16 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 19 8 -1.</_>\n        <_>\n          1 4 19 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 9 4 -1.</_>\n        <_>\n          12 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 9 4 -1.</_>\n        <_>\n          3 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 10 6 -1.</_>\n        <_>\n          12 4 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 18 2 -1.</_>\n        <_>\n          12 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 9 -1.</_>\n        <_>\n          12 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 9 -1.</_>\n        <_>\n          10 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 10 -1.</_>\n        <_>\n          14 5 4 5 2.</_>\n        <_>\n          10 10 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 13 -1.</_>\n        <_>\n          10 4 4 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 6 -1.</_>\n        <_>\n          13 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 12 3 -1.</_>\n        <_>\n          7 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 10 6 -1.</_>\n        <_>\n          7 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 21 5 -1.</_>\n        <_>\n          9 0 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 9 -1.</_>\n        <_>\n          0 11 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 7 -1.</_>\n        <_>\n          3 3 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 12 6 -1.</_>\n        <_>\n          15 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 20 6 -1.</_>\n        <_>\n          2 8 10 3 2.</_>\n        <_>\n          12 11 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 10 4 -1.</_>\n        <_>\n          13 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 5 18 -1.</_>\n        <_>\n          4 11 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 4 4 9 -1.</_>\n        <_>\n          20 4 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 14 -1.</_>\n        <_>\n          8 13 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 6 -1.</_>\n        <_>\n          12 1 12 3 2.</_>\n        <_>\n          0 4 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 9 -1.</_>\n        <_>\n          2 4 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 3 -1.</_>\n        <_>\n          3 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 16 6 -1.</_>\n        <_>\n          3 19 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 6 9 -1.</_>\n        <_>\n          13 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          5 6 7 3 2.</_>\n        <_>\n          12 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 8 10 -1.</_>\n        <_>\n          17 5 4 5 2.</_>\n        <_>\n          13 10 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 20 3 -1.</_>\n        <_>\n          2 3 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 9 6 -1.</_>\n        <_>\n          12 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 4 11 -1.</_>\n        <_>\n          12 3 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 11 -1.</_>\n        <_>\n          10 3 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 8 10 -1.</_>\n        <_>\n          12 3 4 5 2.</_>\n        <_>\n          8 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 18 -1.</_>\n        <_>\n          12 1 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 9 6 -1.</_>\n        <_>\n          12 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 19 3 -1.</_>\n        <_>\n          0 3 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 9 6 -1.</_>\n        <_>\n          9 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 5 -1.</_>\n        <_>\n          7 8 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 4 15 -1.</_>\n        <_>\n          13 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 3 -1.</_>\n        <_>\n          1 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 14 6 -1.</_>\n        <_>\n          9 9 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 18 3 -1.</_>\n        <_>\n          2 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_>\n        <_>\n          6 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 7 8 -1.</_>\n        <_>\n          9 17 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 20 3 -1.</_>\n        <_>\n          2 18 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 4 -1.</_>\n        <_>\n          4 2 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 6 6 -1.</_>\n        <_>\n          17 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          0 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 9 6 -1.</_>\n        <_>\n          0 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 12 6 -1.</_>\n        <_>\n          15 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 9 -1.</_>\n        <_>\n          3 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 8 10 -1.</_>\n        <_>\n          20 13 4 5 2.</_>\n        <_>\n          16 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 24 4 -1.</_>\n        <_>\n          8 14 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 6 6 -1.</_>\n        <_>\n          13 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 10 -1.</_>\n        <_>\n          0 13 4 5 2.</_>\n        <_>\n          4 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 24 6 -1.</_>\n        <_>\n          0 17 24 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 8 -1.</_>\n        <_>\n          5 2 6 4 2.</_>\n        <_>\n          11 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 9 6 -1.</_>\n        <_>\n          11 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 4 -1.</_>\n        <_>\n          4 5 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 10 -1.</_>\n        <_>\n          10 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 5 8 -1.</_>\n        <_>\n          8 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 9 12 -1.</_>\n        <_>\n          11 9 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 9 12 -1.</_>\n        <_>\n          4 9 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 9 -1.</_>\n        <_>\n          14 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 20 12 -1.</_>\n        <_>\n          2 8 20 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 17 16 -1.</_>\n        <_>\n          4 12 17 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 7 6 -1.</_>\n        <_>\n          8 10 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 23 2 -1.</_>\n        <_>\n          1 10 23 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 4 9 -1.</_>\n        <_>\n          13 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 13 -1.</_>\n        <_>\n          10 1 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 22 18 2 -1.</_>\n        <_>\n          4 23 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 9 6 -1.</_>\n        <_>\n          6 10 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 24 -1.</_>\n        <_>\n          14 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 24 -1.</_>\n        <_>\n          9 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 18 10 -1.</_>\n        <_>\n          9 2 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 15 6 -1.</_>\n        <_>\n          9 13 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          9 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 11 -1.</_>\n        <_>\n          11 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 10 4 -1.</_>\n        <_>\n          9 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 18 -1.</_>\n        <_>\n          12 0 5 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 16 -1.</_>\n        <_>\n          14 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 16 -1.</_>\n        <_>\n          8 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 6 -1.</_>\n        <_>\n          18 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 18 2 -1.</_>\n        <_>\n          3 6 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 6 -1.</_>\n        <_>\n          18 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 6 -1.</_>\n        <_>\n          0 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 11 6 -1.</_>\n        <_>\n          13 13 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 4 -1.</_>\n        <_>\n          10 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 10 7 -1.</_>\n        <_>\n          11 9 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 10 7 -1.</_>\n        <_>\n          8 9 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 6 6 -1.</_>\n        <_>\n          16 4 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 8 -1.</_>\n        <_>\n          5 6 5 4 2.</_>\n        <_>\n          10 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 21 16 3 -1.</_>\n        <_>\n          7 21 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 16 3 -1.</_>\n        <_>\n          9 21 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 22 14 -1.</_>\n        <_>\n          13 5 11 7 2.</_>\n        <_>\n          2 12 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 10 -1.</_>\n        <_>\n          3 10 4 5 2.</_>\n        <_>\n          7 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 6 12 -1.</_>\n        <_>\n          20 0 3 6 2.</_>\n        <_>\n          17 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 18 -1.</_>\n        <_>\n          7 2 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          15 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 9 -1.</_>\n        <_>\n          0 15 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 8 10 -1.</_>\n        <_>\n          19 13 4 5 2.</_>\n        <_>\n          15 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 12 -1.</_>\n        <_>\n          1 0 3 6 2.</_>\n        <_>\n          4 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 8 10 -1.</_>\n        <_>\n          1 13 4 5 2.</_>\n        <_>\n          5 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 19 2 -1.</_>\n        <_>\n          3 22 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 13 -1.</_>\n        <_>\n          8 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 18 3 -1.</_>\n        <_>\n          5 11 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 12 -1.</_>\n        <_>\n          9 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 15 -1.</_>\n        <_>\n          11 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 4 -1.</_>\n        <_>\n          4 3 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 3 -1.</_>\n        <_>\n          6 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 8 -1.</_>\n        <_>\n          5 1 5 4 2.</_>\n        <_>\n          10 5 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 12 6 -1.</_>\n        <_>\n          17 18 6 3 2.</_>\n        <_>\n          11 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 3 -1.</_>\n        <_>\n          11 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 22 4 -1.</_>\n        <_>\n          1 10 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 9 6 -1.</_>\n        <_>\n          10 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 5 -1.</_>\n        <_>\n          10 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 7 -1.</_>\n        <_>\n          11 7 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 8 10 -1.</_>\n        <_>\n          11 2 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 10 -1.</_>\n        <_>\n          9 2 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 18 6 -1.</_>\n        <_>\n          15 4 9 3 2.</_>\n        <_>\n          6 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 9 -1.</_>\n        <_>\n          0 8 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 21 6 -1.</_>\n        <_>\n          2 9 21 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 22 16 -1.</_>\n        <_>\n          0 4 11 8 2.</_>\n        <_>\n          11 12 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 22 -1.</_>\n        <_>\n          9 11 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 12 -1.</_>\n        <_>\n          9 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 12 18 -1.</_>\n        <_>\n          18 0 6 9 2.</_>\n        <_>\n          12 9 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 18 -1.</_>\n        <_>\n          0 0 6 9 2.</_>\n        <_>\n          6 9 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 22 4 -1.</_>\n        <_>\n          12 1 11 2 2.</_>\n        <_>\n          1 3 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 4 -1.</_>\n        <_>\n          3 2 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 22 6 -1.</_>\n        <_>\n          2 7 22 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 9 -1.</_>\n        <_>\n          5 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 9 -1.</_>\n        <_>\n          12 14 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 9 -1.</_>\n        <_>\n          10 14 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 18 3 -1.</_>\n        <_>\n          5 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 13 -1.</_>\n        <_>\n          9 0 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 12 4 -1.</_>\n        <_>\n          7 4 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 6 -1.</_>\n        <_>\n          9 2 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 18 3 -1.</_>\n        <_>\n          4 2 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 12 -1.</_>\n        <_>\n          0 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 9 -1.</_>\n        <_>\n          11 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 13 -1.</_>\n        <_>\n          11 10 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 18 2 -1.</_>\n        <_>\n          6 18 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 9 -1.</_>\n        <_>\n          11 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 8 -1.</_>\n        <_>\n          5 6 5 4 2.</_>\n        <_>\n          10 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 5 8 -1.</_>\n        <_>\n          14 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 5 8 -1.</_>\n        <_>\n          5 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 9 6 -1.</_>\n        <_>\n          14 13 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 23 15 -1.</_>\n        <_>\n          0 7 23 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 12 -1.</_>\n        <_>\n          16 6 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 9 -1.</_>\n        <_>\n          4 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 9 4 -1.</_>\n        <_>\n          8 20 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 11 6 -1.</_>\n        <_>\n          13 13 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 11 6 -1.</_>\n        <_>\n          0 13 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 24 6 -1.</_>\n        <_>\n          12 9 12 3 2.</_>\n        <_>\n          0 12 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 8 8 -1.</_>\n        <_>\n          6 20 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 14 6 -1.</_>\n        <_>\n          10 18 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 21 3 -1.</_>\n        <_>\n          1 2 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 3 -1.</_>\n        <_>\n          0 2 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 8 5 -1.</_>\n        <_>\n          6 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 21 3 -1.</_>\n        <_>\n          9 11 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 12 6 -1.</_>\n        <_>\n          1 18 6 3 2.</_>\n        <_>\n          7 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 10 -1.</_>\n        <_>\n          10 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 10 -1.</_>\n        <_>\n          7 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 12 -1.</_>\n        <_>\n          9 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 6 -1.</_>\n        <_>\n          10 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 19 2 -1.</_>\n        <_>\n          3 15 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 10 10 -1.</_>\n        <_>\n          7 7 5 5 2.</_>\n        <_>\n          12 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 18 12 -1.</_>\n        <_>\n          3 12 9 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 12 -1.</_>\n        <_>\n          10 0 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 9 -1.</_>\n        <_>\n          3 3 17 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 11 -1.</_>\n        <_>\n          10 0 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 13 -1.</_>\n        <_>\n          4 0 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 16 6 -1.</_>\n        <_>\n          5 11 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 5 12 -1.</_>\n        <_>\n          8 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          9 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 20 3 -1.</_>\n        <_>\n          2 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 15 10 -1.</_>\n        <_>\n          9 6 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 9 6 -1.</_>\n        <_>\n          7 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 9 -1.</_>\n        <_>\n          6 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 6 16 -1.</_>\n        <_>\n          19 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 16 -1.</_>\n        <_>\n          3 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 9 -1.</_>\n        <_>\n          14 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 9 -1.</_>\n        <_>\n          0 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          9 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 9 6 -1.</_>\n        <_>\n          6 10 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 16 -1.</_>\n        <_>\n          14 15 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 14 12 -1.</_>\n        <_>\n          4 10 7 6 2.</_>\n        <_>\n          11 16 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 6 -1.</_>\n        <_>\n          7 8 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 20 -1.</_>\n        <_>\n          9 2 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 9 -1.</_>\n        <_>\n          14 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          12 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 9 -1.</_>\n        <_>\n          14 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 14 4 -1.</_>\n        <_>\n          5 22 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 12 -1.</_>\n        <_>\n          4 10 16 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 21 4 -1.</_>\n        <_>\n          3 2 21 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 9 -1.</_>\n        <_>\n          4 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 5 8 -1.</_>\n        <_>\n          16 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 16 -1.</_>\n        <_>\n          4 0 8 8 2.</_>\n        <_>\n          12 8 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 6 -1.</_>\n        <_>\n          13 6 7 3 2.</_>\n        <_>\n          6 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 15 -1.</_>\n        <_>\n          10 10 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 12 8 -1.</_>\n        <_>\n          15 15 6 4 2.</_>\n        <_>\n          9 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 4 -1.</_>\n        <_>\n          12 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          12 6 7 3 2.</_>\n        <_>\n          5 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 10 -1.</_>\n        <_>\n          3 6 9 5 2.</_>\n        <_>\n          12 11 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 21 -1.</_>\n        <_>\n          12 0 6 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 21 -1.</_>\n        <_>\n          8 0 8 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 3 -1.</_>\n        <_>\n          6 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 6 -1.</_>\n        <_>\n          0 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 19 2 -1.</_>\n        <_>\n          4 4 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 2 -1.</_>\n        <_>\n          0 4 24 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 9 4 -1.</_>\n        <_>\n          15 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 4 -1.</_>\n        <_>\n          0 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 18 2 -1.</_>\n        <_>\n          6 16 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 18 3 -1.</_>\n        <_>\n          3 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 23 -1.</_>\n        <_>\n          13 0 1 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 6 -1.</_>\n        <_>\n          6 3 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 23 -1.</_>\n        <_>\n          10 0 1 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 10 -1.</_>\n        <_>\n          10 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 12 -1.</_>\n        <_>\n          7 12 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 14 -1.</_>\n        <_>\n          17 9 3 7 2.</_>\n        <_>\n          14 16 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 10 9 -1.</_>\n        <_>\n          2 3 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 5 12 -1.</_>\n        <_>\n          11 7 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 10 -1.</_>\n        <_>\n          1 4 6 5 2.</_>\n        <_>\n          7 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 9 4 -1.</_>\n        <_>\n          15 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 10 -1.</_>\n        <_>\n          1 2 4 5 2.</_>\n        <_>\n          5 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 5 12 -1.</_>\n        <_>\n          10 5 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 24 -1.</_>\n        <_>\n          11 0 7 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 10 4 -1.</_>\n        <_>\n          7 19 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 10 -1.</_>\n        <_>\n          10 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 6 9 -1.</_>\n        <_>\n          15 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          3 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 6 9 -1.</_>\n        <_>\n          15 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 6 9 -1.</_>\n        <_>\n          7 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          12 6 2 9 2.</_>\n        <_>\n          10 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 11 -1.</_>\n        <_>\n          9 3 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 9 4 -1.</_>\n        <_>\n          15 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 14 8 -1.</_>\n        <_>\n          5 8 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 15 9 -1.</_>\n        <_>\n          8 4 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 10 -1.</_>\n        <_>\n          7 2 4 5 2.</_>\n        <_>\n          11 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 12 -1.</_>\n        <_>\n          12 2 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 12 -1.</_>\n        <_>\n          9 2 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 4 -1.</_>\n        <_>\n          7 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 10 -1.</_>\n        <_>\n          10 3 4 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 16 6 -1.</_>\n        <_>\n          13 6 8 3 2.</_>\n        <_>\n          5 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 9 -1.</_>\n        <_>\n          9 1 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 18 5 -1.</_>\n        <_>\n          9 8 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 22 -1.</_>\n        <_>\n          0 0 12 11 2.</_>\n        <_>\n          12 11 12 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 9 6 -1.</_>\n        <_>\n          14 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 24 8 -1.</_>\n        <_>\n          0 20 24 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 22 4 -1.</_>\n        <_>\n          12 19 11 2 2.</_>\n        <_>\n          1 21 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 9 6 -1.</_>\n        <_>\n          1 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 9 -1.</_>\n        <_>\n          11 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 12 6 -1.</_>\n        <_>\n          16 18 6 3 2.</_>\n        <_>\n          10 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 12 6 -1.</_>\n        <_>\n          2 18 6 3 2.</_>\n        <_>\n          8 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 16 9 -1.</_>\n        <_>\n          8 6 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 6 -1.</_>\n        <_>\n          0 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 18 3 -1.</_>\n        <_>\n          5 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 9 6 -1.</_>\n        <_>\n          2 9 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 10 9 -1.</_>\n        <_>\n          14 5 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 3 -1.</_>\n        <_>\n          3 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 15 6 -1.</_>\n        <_>\n          9 4 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 15 6 -1.</_>\n        <_>\n          4 10 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 24 4 -1.</_>\n        <_>\n          12 5 12 2 2.</_>\n        <_>\n          0 7 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 12 -1.</_>\n        <_>\n          9 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 12 -1.</_>\n        <_>\n          0 12 3 6 2.</_>\n        <_>\n          3 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 10 6 -1.</_>\n        <_>\n          14 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 9 -1.</_>\n        <_>\n          2 10 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 10 9 -1.</_>\n        <_>\n          11 17 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 8 -1.</_>\n        <_>\n          7 6 5 4 2.</_>\n        <_>\n          12 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 6 -1.</_>\n        <_>\n          13 6 7 3 2.</_>\n        <_>\n          6 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 9 7 -1.</_>\n        <_>\n          7 13 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 12 -1.</_>\n        <_>\n          17 10 3 6 2.</_>\n        <_>\n          14 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 12 -1.</_>\n        <_>\n          4 10 3 6 2.</_>\n        <_>\n          7 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 8 6 -1.</_>\n        <_>\n          13 9 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 14 -1.</_>\n        <_>\n          10 3 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 18 -1.</_>\n        <_>\n          18 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 16 12 -1.</_>\n        <_>\n          12 12 8 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 14 -1.</_>\n        <_>\n          17 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 14 -1.</_>\n        <_>\n          5 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 12 20 -1.</_>\n        <_>\n          16 2 4 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 20 -1.</_>\n        <_>\n          4 2 4 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 6 17 -1.</_>\n        <_>\n          18 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 17 -1.</_>\n        <_>\n          4 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 9 6 -1.</_>\n        <_>\n          15 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 9 6 -1.</_>\n        <_>\n          0 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 13 -1.</_>\n        <_>\n          20 1 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 13 -1.</_>\n        <_>\n          2 1 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 9 -1.</_>\n        <_>\n          16 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 7 -1.</_>\n        <_>\n          9 10 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 12 6 -1.</_>\n        <_>\n          12 11 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 6 -1.</_>\n        <_>\n          0 11 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 14 9 -1.</_>\n        <_>\n          5 10 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 3 -1.</_>\n        <_>\n          0 16 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 8 10 -1.</_>\n        <_>\n          12 10 4 5 2.</_>\n        <_>\n          8 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 13 9 -1.</_>\n        <_>\n          5 7 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 18 -1.</_>\n        <_>\n          10 8 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 4 -1.</_>\n        <_>\n          6 11 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 15 12 -1.</_>\n        <_>\n          3 6 15 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 12 5 -1.</_>\n        <_>\n          16 0 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 3 -1.</_>\n        <_>\n          6 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 24 5 -1.</_>\n        <_>\n          8 14 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 18 -1.</_>\n        <_>\n          6 1 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 14 -1.</_>\n        <_>\n          10 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 9 -1.</_>\n        <_>\n          11 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 12 6 -1.</_>\n        <_>\n          14 2 6 3 2.</_>\n        <_>\n          8 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 17 4 -1.</_>\n        <_>\n          0 6 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 5 8 -1.</_>\n        <_>\n          16 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 5 8 -1.</_>\n        <_>\n          3 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 2 -1.</_>\n        <_>\n          6 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 5 -1.</_>\n        <_>\n          4 0 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 12 -1.</_>\n        <_>\n          17 3 3 6 2.</_>\n        <_>\n          14 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 12 -1.</_>\n        <_>\n          2 12 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 21 3 -1.</_>\n        <_>\n          2 4 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 12 -1.</_>\n        <_>\n          4 3 3 6 2.</_>\n        <_>\n          7 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 12 6 -1.</_>\n        <_>\n          18 8 6 3 2.</_>\n        <_>\n          12 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 16 9 -1.</_>\n        <_>\n          8 15 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 18 5 -1.</_>\n        <_>\n          6 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 15 6 -1.</_>\n        <_>\n          6 6 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 9 6 -1.</_>\n        <_>\n          14 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 11 -1.</_>\n        <_>\n          8 0 5 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 3 18 -1.</_>\n        <_>\n          15 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 18 -1.</_>\n        <_>\n          6 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 8 -1.</_>\n        <_>\n          14 5 5 4 2.</_>\n        <_>\n          9 9 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 8 -1.</_>\n        <_>\n          4 4 8 4 2.</_>\n        <_>\n          12 8 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 3 -1.</_>\n        <_>\n          7 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 13 -1.</_>\n        <_>\n          8 0 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 10 9 -1.</_>\n        <_>\n          8 4 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 2 -1.</_>\n        <_>\n          0 3 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 14 6 -1.</_>\n        <_>\n          17 13 7 3 2.</_>\n        <_>\n          10 16 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 6 -1.</_>\n        <_>\n          0 13 7 3 2.</_>\n        <_>\n          7 16 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 2 3 21 -1.</_>\n        <_>\n          21 2 1 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 12 -1.</_>\n        <_>\n          0 13 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 12 6 -1.</_>\n        <_>\n          12 8 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 20 3 -1.</_>\n        <_>\n          1 9 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 19 3 -1.</_>\n        <_>\n          5 8 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 6 -1.</_>\n        <_>\n          1 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 14 12 -1.</_>\n        <_>\n          6 14 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 18 -1.</_>\n        <_>\n          5 12 14 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 9 7 -1.</_>\n        <_>\n          14 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 18 4 -1.</_>\n        <_>\n          1 17 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 9 -1.</_>\n        <_>\n          11 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 4 -1.</_>\n        <_>\n          0 8 9 2 2.</_>\n        <_>\n          9 10 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 20 6 -1.</_>\n        <_>\n          13 10 10 3 2.</_>\n        <_>\n          3 13 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 20 6 -1.</_>\n        <_>\n          1 10 10 3 2.</_>\n        <_>\n          11 13 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 24 2 -1.</_>\n        <_>\n          0 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 20 8 -1.</_>\n        <_>\n          1 12 10 4 2.</_>\n        <_>\n          11 16 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 9 7 -1.</_>\n        <_>\n          14 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 9 7 -1.</_>\n        <_>\n          7 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 5 -1.</_>\n        <_>\n          12 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 8 5 -1.</_>\n        <_>\n          8 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 4 10 -1.</_>\n        <_>\n          13 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 20 2 -1.</_>\n        <_>\n          11 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 6 -1.</_>\n        <_>\n          9 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 21 3 -1.</_>\n        <_>\n          7 1 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 13 9 -1.</_>\n        <_>\n          6 7 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 5 -1.</_>\n        <_>\n          10 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 6 -1.</_>\n        <_>\n          10 12 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 5 8 -1.</_>\n        <_>\n          6 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          15 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 6 -1.</_>\n        <_>\n          8 10 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 9 4 -1.</_>\n        <_>\n          11 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 21 3 -1.</_>\n        <_>\n          8 20 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 22 2 -1.</_>\n        <_>\n          1 11 22 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          15 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 9 -1.</_>\n        <_>\n          7 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 20 -1.</_>\n        <_>\n          20 2 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 20 -1.</_>\n        <_>\n          2 2 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 14 -1.</_>\n        <_>\n          14 7 3 7 2.</_>\n        <_>\n          11 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 9 -1.</_>\n        <_>\n          2 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 9 4 -1.</_>\n        <_>\n          12 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 9 4 -1.</_>\n        <_>\n          1 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 15 6 -1.</_>\n        <_>\n          7 8 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 18 -1.</_>\n        <_>\n          8 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          12 6 6 3 2.</_>\n        <_>\n          6 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 20 4 -1.</_>\n        <_>\n          2 19 10 2 2.</_>\n        <_>\n          12 21 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 9 -1.</_>\n        <_>\n          14 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 18 14 -1.</_>\n        <_>\n          3 5 9 7 2.</_>\n        <_>\n          12 12 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 18 -1.</_>\n        <_>\n          17 6 2 9 2.</_>\n        <_>\n          15 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 18 -1.</_>\n        <_>\n          5 6 2 9 2.</_>\n        <_>\n          7 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 6 9 -1.</_>\n        <_>\n          13 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          12 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 6 -1.</_>\n        <_>\n          12 1 8 3 2.</_>\n        <_>\n          4 4 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 11 -1.</_>\n        <_>\n          11 13 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 6 12 -1.</_>\n        <_>\n          20 1 3 6 2.</_>\n        <_>\n          17 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          1 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 10 8 -1.</_>\n        <_>\n          7 17 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 10 6 -1.</_>\n        <_>\n          6 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 9 4 -1.</_>\n        <_>\n          9 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 12 -1.</_>\n        <_>\n          1 1 3 6 2.</_>\n        <_>\n          4 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 5 12 -1.</_>\n        <_>\n          19 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 8 -1.</_>\n        <_>\n          4 0 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 19 3 -1.</_>\n        <_>\n          3 6 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 12 6 -1.</_>\n        <_>\n          1 5 6 3 2.</_>\n        <_>\n          7 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 21 8 -1.</_>\n        <_>\n          9 1 7 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 8 -1.</_>\n        <_>\n          4 5 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 3 -1.</_>\n        <_>\n          6 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 10 14 -1.</_>\n        <_>\n          4 11 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 10 -1.</_>\n        <_>\n          15 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 18 3 -1.</_>\n        <_>\n          9 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 12 6 -1.</_>\n        <_>\n          12 18 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 9 -1.</_>\n        <_>\n          6 15 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 6 8 -1.</_>\n        <_>\n          15 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 8 -1.</_>\n        <_>\n          3 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 18 6 -1.</_>\n        <_>\n          14 9 9 3 2.</_>\n        <_>\n          5 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 12 6 -1.</_>\n        <_>\n          1 15 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 10 6 -1.</_>\n        <_>\n          14 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 10 6 -1.</_>\n        <_>\n          0 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 6 9 -1.</_>\n        <_>\n          15 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 6 9 -1.</_>\n        <_>\n          3 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 8 8 -1.</_>\n        <_>\n          9 5 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 12 6 -1.</_>\n        <_>\n          1 18 6 3 2.</_>\n        <_>\n          7 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 19 10 4 -1.</_>\n        <_>\n          13 21 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 10 4 -1.</_>\n        <_>\n          1 21 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 19 18 3 -1.</_>\n        <_>\n          6 20 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 10 -1.</_>\n        <_>\n          8 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 6 -1.</_>\n        <_>\n          0 2 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          0 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 20 6 -1.</_>\n        <_>\n          14 9 10 3 2.</_>\n        <_>\n          4 12 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 19 8 -1.</_>\n        <_>\n          1 19 19 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 6 -1.</_>\n        <_>\n          14 2 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 21 14 -1.</_>\n        <_>\n          8 10 7 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 8 8 -1.</_>\n        <_>\n          10 10 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 10 4 -1.</_>\n        <_>\n          11 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 9 -1.</_>\n        <_>\n          10 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 10 -1.</_>\n        <_>\n          9 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 4 13 -1.</_>\n        <_>\n          14 4 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 13 -1.</_>\n        <_>\n          8 4 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 6 -1.</_>\n        <_>\n          11 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 16 6 -1.</_>\n        <_>\n          3 6 8 3 2.</_>\n        <_>\n          11 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 16 14 -1.</_>\n        <_>\n          13 4 8 7 2.</_>\n        <_>\n          5 11 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 4 -1.</_>\n        <_>\n          0 0 12 2 2.</_>\n        <_>\n          12 2 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 9 6 -1.</_>\n        <_>\n          12 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 4 -1.</_>\n        <_>\n          11 1 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 7 9 -1.</_>\n        <_>\n          10 17 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 8 10 -1.</_>\n        <_>\n          8 3 4 5 2.</_>\n        <_>\n          12 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 12 5 -1.</_>\n        <_>\n          11 3 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 13 -1.</_>\n        <_>\n          10 2 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 19 -1.</_>\n        <_>\n          12 2 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 6 -1.</_>\n        <_>\n          10 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 22 20 2 -1.</_>\n        <_>\n          4 22 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 24 4 -1.</_>\n        <_>\n          0 16 12 2 2.</_>\n        <_>\n          12 18 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 12 5 -1.</_>\n        <_>\n          11 3 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 8 14 -1.</_>\n        <_>\n          1 10 4 7 2.</_>\n        <_>\n          5 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 6 6 -1.</_>\n        <_>\n          11 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 24 -1.</_>\n        <_>\n          6 0 5 12 2.</_>\n        <_>\n          11 12 5 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 14 14 -1.</_>\n        <_>\n          14 5 7 7 2.</_>\n        <_>\n          7 12 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 8 -1.</_>\n        <_>\n          7 8 5 4 2.</_>\n        <_>\n          12 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 9 6 -1.</_>\n        <_>\n          12 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 3 -1.</_>\n        <_>\n          12 6 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 12 5 -1.</_>\n        <_>\n          11 3 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 22 4 -1.</_>\n        <_>\n          1 13 11 2 2.</_>\n        <_>\n          12 15 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 12 6 -1.</_>\n        <_>\n          9 14 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 9 6 -1.</_>\n        <_>\n          0 7 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 23 6 -1.</_>\n        <_>\n          1 7 23 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 19 12 -1.</_>\n        <_>\n          1 10 19 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 21 -1.</_>\n        <_>\n          9 8 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 18 3 -1.</_>\n        <_>\n          9 19 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 6 9 -1.</_>\n        <_>\n          11 14 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 12 -1.</_>\n        <_>\n          11 6 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 6 9 -1.</_>\n        <_>\n          18 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 9 -1.</_>\n        <_>\n          4 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 22 -1.</_>\n        <_>\n          15 1 2 11 2.</_>\n        <_>\n          13 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 8 12 -1.</_>\n        <_>\n          1 14 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 7 9 -1.</_>\n        <_>\n          14 10 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 18 4 -1.</_>\n        <_>\n          3 12 9 2 2.</_>\n        <_>\n          12 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 22 -1.</_>\n        <_>\n          15 1 2 11 2.</_>\n        <_>\n          13 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 22 -1.</_>\n        <_>\n          7 1 2 11 2.</_>\n        <_>\n          9 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 20 4 -1.</_>\n        <_>\n          14 7 10 2 2.</_>\n        <_>\n          4 9 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 7 -1.</_>\n        <_>\n          12 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 10 4 -1.</_>\n        <_>\n          7 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 15 -1.</_>\n        <_>\n          0 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 8 12 -1.</_>\n        <_>\n          19 0 4 6 2.</_>\n        <_>\n          15 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 12 -1.</_>\n        <_>\n          1 0 4 6 2.</_>\n        <_>\n          5 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 16 -1.</_>\n        <_>\n          16 5 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 16 -1.</_>\n        <_>\n          6 5 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 16 -1.</_>\n        <_>\n          17 0 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 16 -1.</_>\n        <_>\n          5 0 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 3 -1.</_>\n        <_>\n          0 3 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 4 -1.</_>\n        <_>\n          7 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 23 8 -1.</_>\n        <_>\n          1 4 23 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 19 3 -1.</_>\n        <_>\n          1 18 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 2 -1.</_>\n        <_>\n          6 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 9 6 -1.</_>\n        <_>\n          1 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 6 9 -1.</_>\n        <_>\n          15 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 9 -1.</_>\n        <_>\n          3 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 20 6 -1.</_>\n        <_>\n          4 17 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 14 -1.</_>\n        <_>\n          0 10 3 7 2.</_>\n        <_>\n          3 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 3 -1.</_>\n        <_>\n          6 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 9 7 -1.</_>\n        <_>\n          7 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 18 5 -1.</_>\n        <_>\n          12 10 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 5 -1.</_>\n        <_>\n          6 10 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 18 9 -1.</_>\n        <_>\n          9 2 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 10 -1.</_>\n        <_>\n          4 6 5 5 2.</_>\n        <_>\n          9 11 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 14 4 9 -1.</_>\n        <_>\n          20 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 4 9 -1.</_>\n        <_>\n          2 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 20 -1.</_>\n        <_>\n          13 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 21 12 3 -1.</_>\n        <_>\n          12 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 20 -1.</_>\n        <_>\n          13 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 10 8 -1.</_>\n        <_>\n          1 16 5 4 2.</_>\n        <_>\n          6 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 20 -1.</_>\n        <_>\n          13 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 19 -1.</_>\n        <_>\n          2 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 20 -1.</_>\n        <_>\n          13 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          2 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 19 4 -1.</_>\n        <_>\n          3 9 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 9 6 -1.</_>\n        <_>\n          7 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 7 6 -1.</_>\n        <_>\n          17 4 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 8 -1.</_>\n        <_>\n          5 4 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 8 6 -1.</_>\n        <_>\n          16 4 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 6 -1.</_>\n        <_>\n          0 4 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 4 -1.</_>\n        <_>\n          15 0 9 2 2.</_>\n        <_>\n          6 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 8 -1.</_>\n        <_>\n          9 7 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 6 9 -1.</_>\n        <_>\n          4 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 9 -1.</_>\n        <_>\n          12 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          10 6 2 9 2.</_>\n        <_>\n          12 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 20 -1.</_>\n        <_>\n          13 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 20 -1.</_>\n        <_>\n          9 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 18 6 -1.</_>\n        <_>\n          14 9 9 3 2.</_>\n        <_>\n          5 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 9 -1.</_>\n        <_>\n          8 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 8 6 -1.</_>\n        <_>\n          10 16 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 8 -1.</_>\n        <_>\n          0 0 9 4 2.</_>\n        <_>\n          9 4 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 14 12 -1.</_>\n        <_>\n          13 5 7 6 2.</_>\n        <_>\n          6 11 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 15 7 -1.</_>\n        <_>\n          9 3 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 10 6 -1.</_>\n        <_>\n          14 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 4 10 -1.</_>\n        <_>\n          0 16 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 22 3 -1.</_>\n        <_>\n          1 11 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 10 -1.</_>\n        <_>\n          10 9 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 12 -1.</_>\n        <_>\n          16 2 3 6 2.</_>\n        <_>\n          13 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          10 6 2 9 2.</_>\n        <_>\n          12 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 16 -1.</_>\n        <_>\n          12 8 5 8 2.</_>\n        <_>\n          7 16 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 12 -1.</_>\n        <_>\n          8 1 4 6 2.</_>\n        <_>\n          12 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 12 14 -1.</_>\n        <_>\n          13 1 6 7 2.</_>\n        <_>\n          7 8 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 12 6 -1.</_>\n        <_>\n          2 16 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 6 6 -1.</_>\n        <_>\n          11 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 6 -1.</_>\n        <_>\n          7 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 10 -1.</_>\n        <_>\n          13 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 19 3 -1.</_>\n        <_>\n          0 20 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 8 -1.</_>\n        <_>\n          12 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 22 -1.</_>\n        <_>\n          8 12 8 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 8 -1.</_>\n        <_>\n          12 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 8 -1.</_>\n        <_>\n          6 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 9 -1.</_>\n        <_>\n          14 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 4 -1.</_>\n        <_>\n          0 8 24 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 10 6 -1.</_>\n        <_>\n          14 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 10 6 -1.</_>\n        <_>\n          0 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 19 3 -1.</_>\n        <_>\n          4 7 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 19 3 -1.</_>\n        <_>\n          1 7 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 9 -1.</_>\n        <_>\n          4 3 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 5 -1.</_>\n        <_>\n          8 1 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 15 -1.</_>\n        <_>\n          3 11 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 22 18 2 -1.</_>\n        <_>\n          6 23 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 9 -1.</_>\n        <_>\n          2 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 12 6 9 -1.</_>\n        <_>\n          18 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 9 -1.</_>\n        <_>\n          0 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 10 -1.</_>\n        <_>\n          11 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 16 -1.</_>\n        <_>\n          9 14 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 10 10 -1.</_>\n        <_>\n          7 12 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 13 -1.</_>\n        <_>\n          3 3 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 13 -1.</_>\n        <_>\n          18 1 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 9 -1.</_>\n        <_>\n          7 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 11 -1.</_>\n        <_>\n          18 2 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 11 -1.</_>\n        <_>\n          3 2 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 15 6 -1.</_>\n        <_>\n          9 14 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 20 3 -1.</_>\n        <_>\n          2 3 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          10 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 14 -1.</_>\n        <_>\n          5 6 6 7 2.</_>\n        <_>\n          11 13 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 6 -1.</_>\n        <_>\n          10 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 20 -1.</_>\n        <_>\n          4 1 6 10 2.</_>\n        <_>\n          10 11 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 18 3 -1.</_>\n        <_>\n          6 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 18 3 -1.</_>\n        <_>\n          9 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 18 3 -1.</_>\n        <_>\n          9 20 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 15 -1.</_>\n        <_>\n          10 2 4 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 18 3 -1.</_>\n        <_>\n          2 4 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 4 18 -1.</_>\n        <_>\n          21 4 2 9 2.</_>\n        <_>\n          19 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 19 3 -1.</_>\n        <_>\n          0 2 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 4 -1.</_>\n        <_>\n          5 2 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 5 -1.</_>\n        <_>\n          12 2 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 14 -1.</_>\n        <_>\n          1 2 11 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 9 -1.</_>\n        <_>\n          10 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 18 3 -1.</_>\n        <_>\n          6 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 18 -1.</_>\n        <_>\n          9 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 20 3 -1.</_>\n        <_>\n          2 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 5 12 -1.</_>\n        <_>\n          5 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 12 5 -1.</_>\n        <_>\n          12 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 12 -1.</_>\n        <_>\n          9 12 3 6 2.</_>\n        <_>\n          12 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 8 10 -1.</_>\n        <_>\n          18 14 4 5 2.</_>\n        <_>\n          14 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 8 10 -1.</_>\n        <_>\n          2 14 4 5 2.</_>\n        <_>\n          6 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 12 6 -1.</_>\n        <_>\n          16 18 6 3 2.</_>\n        <_>\n          10 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 9 -1.</_>\n        <_>\n          1 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 20 -1.</_>\n        <_>\n          12 3 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 14 6 -1.</_>\n        <_>\n          4 6 7 3 2.</_>\n        <_>\n          11 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 13 -1.</_>\n        <_>\n          10 5 4 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 15 -1.</_>\n        <_>\n          5 9 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 15 4 -1.</_>\n        <_>\n          14 16 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 14 -1.</_>\n        <_>\n          7 8 3 7 2.</_>\n        <_>\n          10 15 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 3 -1.</_>\n        <_>\n          2 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 15 8 -1.</_>\n        <_>\n          5 5 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 18 -1.</_>\n        <_>\n          7 10 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 24 3 -1.</_>\n        <_>\n          0 11 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 13 -1.</_>\n        <_>\n          2 2 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 10 -1.</_>\n        <_>\n          20 0 4 5 2.</_>\n        <_>\n          16 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 9 -1.</_>\n        <_>\n          5 4 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 18 3 -1.</_>\n        <_>\n          5 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 3 -1.</_>\n        <_>\n          0 2 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 11 -1.</_>\n        <_>\n          13 4 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 10 -1.</_>\n        <_>\n          0 0 4 5 2.</_>\n        <_>\n          4 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 18 3 -1.</_>\n        <_>\n          4 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 18 3 -1.</_>\n        <_>\n          2 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 10 -1.</_>\n        <_>\n          12 0 9 5 2.</_>\n        <_>\n          3 5 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 20 21 -1.</_>\n        <_>\n          12 3 10 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 3 -1.</_>\n        <_>\n          6 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 6 -1.</_>\n        <_>\n          0 9 6 3 2.</_>\n        <_>\n          6 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 21 4 -1.</_>\n        <_>\n          10 14 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 21 4 -1.</_>\n        <_>\n          7 14 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 18 3 -1.</_>\n        <_>\n          11 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 18 3 -1.</_>\n        <_>\n          7 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 4 18 -1.</_>\n        <_>\n          21 4 2 9 2.</_>\n        <_>\n          19 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 3 -1.</_>\n        <_>\n          3 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 4 18 -1.</_>\n        <_>\n          21 4 2 9 2.</_>\n        <_>\n          19 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 10 6 -1.</_>\n        <_>\n          7 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 11 9 -1.</_>\n        <_>\n          9 16 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 10 -1.</_>\n        <_>\n          0 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 9 6 -1.</_>\n        <_>\n          15 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 4 18 -1.</_>\n        <_>\n          1 5 2 9 2.</_>\n        <_>\n          3 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 8 10 -1.</_>\n        <_>\n          13 8 4 5 2.</_>\n        <_>\n          9 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 8 10 -1.</_>\n        <_>\n          7 8 4 5 2.</_>\n        <_>\n          11 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 12 5 -1.</_>\n        <_>\n          13 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 7 -1.</_>\n        <_>\n          10 8 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 12 5 -1.</_>\n        <_>\n          13 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 7 -1.</_>\n        <_>\n          10 6 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 12 5 -1.</_>\n        <_>\n          13 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 18 -1.</_>\n        <_>\n          10 11 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 12 -1.</_>\n        <_>\n          5 11 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 11 4 -1.</_>\n        <_>\n          0 3 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 10 -1.</_>\n        <_>\n          11 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 11 6 -1.</_>\n        <_>\n          2 19 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 9 6 -1.</_>\n        <_>\n          15 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 2 -1.</_>\n        <_>\n          1 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 13 -1.</_>\n        <_>\n          10 4 4 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 18 3 -1.</_>\n        <_>\n          0 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 3 -1.</_>\n        <_>\n          6 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 6 -1.</_>\n        <_>\n          0 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 9 6 -1.</_>\n        <_>\n          13 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 9 6 -1.</_>\n        <_>\n          2 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 16 -1.</_>\n        <_>\n          13 1 3 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 16 -1.</_>\n        <_>\n          8 1 3 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 6 10 -1.</_>\n        <_>\n          13 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 10 -1.</_>\n        <_>\n          9 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 24 -1.</_>\n        <_>\n          12 0 2 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 4 20 -1.</_>\n        <_>\n          3 4 2 10 2.</_>\n        <_>\n          5 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 9 -1.</_>\n        <_>\n          6 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 18 5 -1.</_>\n        <_>\n          10 5 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 9 -1.</_>\n        <_>\n          7 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 15 8 -1.</_>\n        <_>\n          12 2 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 8 -1.</_>\n        <_>\n          7 2 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 9 -1.</_>\n        <_>\n          10 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 12 -1.</_>\n        <_>\n          3 4 3 6 2.</_>\n        <_>\n          6 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 18 -1.</_>\n        <_>\n          16 0 4 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 18 -1.</_>\n        <_>\n          4 0 4 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 6 -1.</_>\n        <_>\n          0 9 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 14 3 -1.</_>\n        <_>\n          11 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 8 15 -1.</_>\n        <_>\n          10 8 4 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 14 -1.</_>\n        <_>\n          12 0 5 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 8 10 -1.</_>\n        <_>\n          17 10 4 5 2.</_>\n        <_>\n          13 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 9 -1.</_>\n        <_>\n          5 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 6 8 -1.</_>\n        <_>\n          16 1 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 8 -1.</_>\n        <_>\n          5 1 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 12 -1.</_>\n        <_>\n          3 10 18 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 16 4 -1.</_>\n        <_>\n          4 14 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 16 15 -1.</_>\n        <_>\n          4 14 16 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 10 -1.</_>\n        <_>\n          3 10 4 5 2.</_>\n        <_>\n          7 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 16 6 -1.</_>\n        <_>\n          16 18 8 3 2.</_>\n        <_>\n          8 21 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 12 5 -1.</_>\n        <_>\n          6 16 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 9 4 -1.</_>\n        <_>\n          14 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 9 6 -1.</_>\n        <_>\n          7 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 16 12 -1.</_>\n        <_>\n          4 14 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 19 6 -1.</_>\n        <_>\n          0 15 19 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 9 6 -1.</_>\n        <_>\n          10 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 23 -1.</_>\n        <_>\n          6 0 1 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 24 6 -1.</_>\n        <_>\n          0 10 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 5 12 -1.</_>\n        <_>\n          0 9 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 19 18 -1.</_>\n        <_>\n          3 9 19 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 12 -1.</_>\n        <_>\n          9 11 3 6 2.</_>\n        <_>\n          12 17 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 24 8 -1.</_>\n        <_>\n          12 5 12 4 2.</_>\n        <_>\n          0 9 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 9 4 -1.</_>\n        <_>\n          6 20 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 10 6 -1.</_>\n        <_>\n          8 10 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 20 3 -1.</_>\n        <_>\n          2 8 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 7 20 -1.</_>\n        <_>\n          12 10 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 7 20 -1.</_>\n        <_>\n          5 10 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 18 -1.</_>\n        <_>\n          14 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 10 12 -1.</_>\n        <_>\n          10 8 5 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 8 -1.</_>\n        <_>\n          12 9 6 4 2.</_>\n        <_>\n          6 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 14 -1.</_>\n        <_>\n          7 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 12 16 -1.</_>\n        <_>\n          17 2 6 8 2.</_>\n        <_>\n          11 10 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 9 4 -1.</_>\n        <_>\n          13 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 22 4 -1.</_>\n        <_>\n          0 12 11 2 2.</_>\n        <_>\n          11 14 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 22 6 -1.</_>\n        <_>\n          12 12 11 3 2.</_>\n        <_>\n          1 15 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 6 -1.</_>\n        <_>\n          9 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 9 -1.</_>\n        <_>\n          10 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 18 7 -1.</_>\n        <_>\n          9 8 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 6 -1.</_>\n        <_>\n          0 8 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 24 10 -1.</_>\n        <_>\n          8 11 8 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 18 21 -1.</_>\n        <_>\n          9 3 6 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 10 -1.</_>\n        <_>\n          9 12 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 10 8 -1.</_>\n        <_>\n          15 16 5 4 2.</_>\n        <_>\n          10 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 6 12 -1.</_>\n        <_>\n          15 10 3 6 2.</_>\n        <_>\n          12 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 12 -1.</_>\n        <_>\n          6 10 3 6 2.</_>\n        <_>\n          9 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 6 12 -1.</_>\n        <_>\n          19 12 3 6 2.</_>\n        <_>\n          16 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 12 -1.</_>\n        <_>\n          2 12 3 6 2.</_>\n        <_>\n          5 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 9 -1.</_>\n        <_>\n          12 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 9 -1.</_>\n        <_>\n          10 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 20 10 4 -1.</_>\n        <_>\n          14 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 10 4 -1.</_>\n        <_>\n          5 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 9 6 -1.</_>\n        <_>\n          11 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 4 -1.</_>\n        <_>\n          3 4 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 10 4 -1.</_>\n        <_>\n          10 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 10 4 -1.</_>\n        <_>\n          5 15 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 3 19 -1.</_>\n        <_>\n          20 2 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 9 8 -1.</_>\n        <_>\n          7 12 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 5 12 -1.</_>\n        <_>\n          4 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 3 -1.</_>\n        <_>\n          8 1 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 4 -1.</_>\n        <_>\n          6 10 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 4 10 -1.</_>\n        <_>\n          19 3 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 9 6 -1.</_>\n        <_>\n          3 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 22 -1.</_>\n        <_>\n          20 0 2 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 22 -1.</_>\n        <_>\n          2 0 2 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 19 3 -1.</_>\n        <_>\n          5 16 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 15 -1.</_>\n        <_>\n          10 12 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 18 3 -1.</_>\n        <_>\n          0 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 10 15 -1.</_>\n        <_>\n          7 8 10 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 3 -1.</_>\n        <_>\n          1 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 9 6 -1.</_>\n        <_>\n          11 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 24 14 -1.</_>\n        <_>\n          0 17 24 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 8 10 -1.</_>\n        <_>\n          17 9 4 5 2.</_>\n        <_>\n          13 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 9 -1.</_>\n        <_>\n          12 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 8 10 -1.</_>\n        <_>\n          17 9 4 5 2.</_>\n        <_>\n          13 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 10 10 -1.</_>\n        <_>\n          7 11 5 5 2.</_>\n        <_>\n          12 16 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 18 4 -1.</_>\n        <_>\n          13 13 9 2 2.</_>\n        <_>\n          4 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 19 2 -1.</_>\n        <_>\n          0 1 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 24 6 -1.</_>\n        <_>\n          8 18 8 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 16 -1.</_>\n        <_>\n          6 12 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 10 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          0 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 7 9 -1.</_>\n        <_>\n          13 18 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 12 6 -1.</_>\n        <_>\n          3 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 6 9 -1.</_>\n        <_>\n          12 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 15 8 -1.</_>\n        <_>\n          2 19 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 16 -1.</_>\n        <_>\n          9 14 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 7 12 -1.</_>\n        <_>\n          6 10 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 9 -1.</_>\n        <_>\n          14 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 6 9 -1.</_>\n        <_>\n          5 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 9 -1.</_>\n        <_>\n          12 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 18 -1.</_>\n        <_>\n          6 6 2 9 2.</_>\n        <_>\n          8 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 12 -1.</_>\n        <_>\n          17 9 3 6 2.</_>\n        <_>\n          14 15 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 12 -1.</_>\n        <_>\n          4 9 3 6 2.</_>\n        <_>\n          7 15 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 9 6 -1.</_>\n        <_>\n          14 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 18 4 -1.</_>\n        <_>\n          0 20 9 2 2.</_>\n        <_>\n          9 22 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 9 6 -1.</_>\n        <_>\n          13 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 9 6 -1.</_>\n        <_>\n          2 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 4 22 -1.</_>\n        <_>\n          21 2 2 11 2.</_>\n        <_>\n          19 13 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 4 22 -1.</_>\n        <_>\n          1 2 2 11 2.</_>\n        <_>\n          3 13 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 24 -1.</_>\n        <_>\n          15 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 16 4 -1.</_>\n        <_>\n          11 20 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 18 -1.</_>\n        <_>\n          13 6 2 9 2.</_>\n        <_>\n          11 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 14 -1.</_>\n        <_>\n          7 9 5 7 2.</_>\n        <_>\n          12 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 9 -1.</_>\n        <_>\n          14 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 7 9 -1.</_>\n        <_>\n          3 9 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 4 4 20 -1.</_>\n        <_>\n          22 4 2 10 2.</_>\n        <_>\n          20 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 9 -1.</_>\n        <_>\n          7 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 14 -1.</_>\n        <_>\n          12 0 5 7 2.</_>\n        <_>\n          7 7 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 6 -1.</_>\n        <_>\n          11 1 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 24 -1.</_>\n        <_>\n          15 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 24 -1.</_>\n        <_>\n          8 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 7 -1.</_>\n        <_>\n          13 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 7 -1.</_>\n        <_>\n          8 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 18 19 -1.</_>\n        <_>\n          9 5 6 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 6 -1.</_>\n        <_>\n          8 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 6 -1.</_>\n        <_>\n          12 5 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 10 8 -1.</_>\n        <_>\n          3 16 5 4 2.</_>\n        <_>\n          8 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 8 5 15 -1.</_>\n        <_>\n          19 13 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 15 -1.</_>\n        <_>\n          0 13 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 4 4 20 -1.</_>\n        <_>\n          22 4 2 10 2.</_>\n        <_>\n          20 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 20 -1.</_>\n        <_>\n          0 4 2 10 2.</_>\n        <_>\n          2 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 10 4 -1.</_>\n        <_>\n          7 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 14 4 -1.</_>\n        <_>\n          11 19 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 12 3 -1.</_>\n        <_>\n          10 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 3 -1.</_>\n        <_>\n          0 2 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 14 20 -1.</_>\n        <_>\n          14 2 7 10 2.</_>\n        <_>\n          7 12 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 9 -1.</_>\n        <_>\n          2 13 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 19 -1.</_>\n        <_>\n          13 0 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 14 3 -1.</_>\n        <_>\n          8 11 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 16 20 -1.</_>\n        <_>\n          15 1 8 10 2.</_>\n        <_>\n          7 11 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 21 9 -1.</_>\n        <_>\n          7 10 7 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 19 15 5 -1.</_>\n        <_>\n          11 19 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 6 -1.</_>\n        <_>\n          11 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 16 20 -1.</_>\n        <_>\n          15 1 8 10 2.</_>\n        <_>\n          7 11 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 20 -1.</_>\n        <_>\n          1 1 8 10 2.</_>\n        <_>\n          9 11 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 3 12 -1.</_>\n        <_>\n          16 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 12 -1.</_>\n        <_>\n          5 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 8 -1.</_>\n        <_>\n          12 6 5 4 2.</_>\n        <_>\n          7 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 6 -1.</_>\n        <_>\n          4 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 4 -1.</_>\n        <_>\n          6 7 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 5 15 -1.</_>\n        <_>\n          9 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 9 6 -1.</_>\n        <_>\n          15 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 11 10 -1.</_>\n        <_>\n          6 5 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 12 -1.</_>\n        <_>\n          12 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 9 4 -1.</_>\n        <_>\n          7 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 13 6 -1.</_>\n        <_>\n          6 2 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          10 6 2 9 2.</_>\n        <_>\n          12 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 9 -1.</_>\n        <_>\n          12 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 10 6 -1.</_>\n        <_>\n          3 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 20 3 -1.</_>\n        <_>\n          4 15 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 9 6 -1.</_>\n        <_>\n          2 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 19 -1.</_>\n        <_>\n          13 0 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 19 -1.</_>\n        <_>\n          9 0 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 22 2 -1.</_>\n        <_>\n          1 5 22 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 6 -1.</_>\n        <_>\n          0 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 18 -1.</_>\n        <_>\n          0 9 24 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 16 8 -1.</_>\n        <_>\n          3 6 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 6 -1.</_>\n        <_>\n          3 8 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 10 -1.</_>\n        <_>\n          5 1 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 9 6 -1.</_>\n        <_>\n          16 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 6 -1.</_>\n        <_>\n          5 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 7 10 -1.</_>\n        <_>\n          6 5 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 20 4 -1.</_>\n        <_>\n          12 2 10 2 2.</_>\n        <_>\n          2 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 19 3 -1.</_>\n        <_>\n          2 12 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 9 -1.</_>\n        <_>\n          12 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 9 -1.</_>\n        <_>\n          10 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 4 9 -1.</_>\n        <_>\n          13 8 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 9 9 -1.</_>\n        <_>\n          6 11 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 5 -1.</_>\n        <_>\n          9 9 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 2 20 -1.</_>\n        <_>\n          2 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 8 6 -1.</_>\n        <_>\n          14 20 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 2 -1.</_>\n        <_>\n          3 22 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 15 6 -1.</_>\n        <_>\n          10 4 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 12 6 -1.</_>\n        <_>\n          2 17 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 6 9 -1.</_>\n        <_>\n          17 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 20 4 -1.</_>\n        <_>\n          2 12 10 2 2.</_>\n        <_>\n          12 14 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 24 6 -1.</_>\n        <_>\n          0 19 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 9 4 -1.</_>\n        <_>\n          7 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 4 22 -1.</_>\n        <_>\n          17 1 2 11 2.</_>\n        <_>\n          15 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 22 -1.</_>\n        <_>\n          5 1 2 11 2.</_>\n        <_>\n          7 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 8 9 -1.</_>\n        <_>\n          11 16 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 9 -1.</_>\n        <_>\n          8 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 18 -1.</_>\n        <_>\n          11 10 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 6 -1.</_>\n        <_>\n          5 8 6 3 2.</_>\n        <_>\n          11 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 5 8 -1.</_>\n        <_>\n          15 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 5 8 -1.</_>\n        <_>\n          4 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 12 -1.</_>\n        <_>\n          15 6 3 6 2.</_>\n        <_>\n          12 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 12 -1.</_>\n        <_>\n          6 6 3 6 2.</_>\n        <_>\n          9 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 14 8 -1.</_>\n        <_>\n          12 9 7 4 2.</_>\n        <_>\n          5 13 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 14 -1.</_>\n        <_>\n          9 8 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 12 -1.</_>\n        <_>\n          12 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 18 -1.</_>\n        <_>\n          4 5 2 9 2.</_>\n        <_>\n          6 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 18 -1.</_>\n        <_>\n          4 12 16 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 7 20 -1.</_>\n        <_>\n          5 14 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 8 12 -1.</_>\n        <_>\n          14 14 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 14 -1.</_>\n        <_>\n          9 10 3 7 2.</_>\n        <_>\n          12 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 6 -1.</_>\n        <_>\n          12 5 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 18 -1.</_>\n        <_>\n          10 4 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 22 14 -1.</_>\n        <_>\n          12 4 11 7 2.</_>\n        <_>\n          1 11 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 2 -1.</_>\n        <_>\n          2 8 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 12 -1.</_>\n        <_>\n          12 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 7 -1.</_>\n        <_>\n          9 5 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 12 -1.</_>\n        <_>\n          12 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 12 -1.</_>\n        <_>\n          8 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 10 22 -1.</_>\n        <_>\n          7 13 10 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 3 20 -1.</_>\n        <_>\n          1 1 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 18 4 -1.</_>\n        <_>\n          13 13 9 2 2.</_>\n        <_>\n          4 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 4 -1.</_>\n        <_>\n          2 13 9 2 2.</_>\n        <_>\n          11 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 6 -1.</_>\n        <_>\n          0 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 24 -1.</_>\n        <_>\n          15 0 9 12 2.</_>\n        <_>\n          6 12 9 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 12 -1.</_>\n        <_>\n          6 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 10 4 -1.</_>\n        <_>\n          8 9 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 6 -1.</_>\n        <_>\n          1 9 9 3 2.</_>\n        <_>\n          10 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 18 3 -1.</_>\n        <_>\n          6 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 8 -1.</_>\n        <_>\n          10 7 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 6 12 -1.</_>\n        <_>\n          12 12 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 18 3 -1.</_>\n        <_>\n          3 15 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 7 -1.</_>\n        <_>\n          18 17 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 10 6 -1.</_>\n        <_>\n          1 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 7 -1.</_>\n        <_>\n          18 17 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 3 19 -1.</_>\n        <_>\n          11 3 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 7 -1.</_>\n        <_>\n          18 17 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 11 9 -1.</_>\n        <_>\n          6 4 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 7 -1.</_>\n        <_>\n          18 17 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 11 6 -1.</_>\n        <_>\n          6 8 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 8 5 -1.</_>\n        <_>\n          16 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 20 19 -1.</_>\n        <_>\n          12 4 10 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 21 6 -1.</_>\n        <_>\n          9 1 7 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 14 -1.</_>\n        <_>\n          6 5 6 7 2.</_>\n        <_>\n          12 12 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 8 5 -1.</_>\n        <_>\n          6 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 8 5 -1.</_>\n        <_>\n          16 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 5 -1.</_>\n        <_>\n          4 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 7 -1.</_>\n        <_>\n          18 17 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 10 -1.</_>\n        <_>\n          8 6 4 5 2.</_>\n        <_>\n          12 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 9 -1.</_>\n        <_>\n          18 15 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 9 -1.</_>\n        <_>\n          3 15 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 9 7 -1.</_>\n        <_>\n          15 10 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 9 7 -1.</_>\n        <_>\n          6 10 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 10 8 -1.</_>\n        <_>\n          18 15 5 4 2.</_>\n        <_>\n          13 19 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 12 -1.</_>\n        <_>\n          0 1 3 6 2.</_>\n        <_>\n          3 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 12 -1.</_>\n        <_>\n          13 0 3 6 2.</_>\n        <_>\n          10 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 12 -1.</_>\n        <_>\n          7 0 5 6 2.</_>\n        <_>\n          12 6 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 8 -1.</_>\n        <_>\n          4 1 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 19 3 -1.</_>\n        <_>\n          0 22 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 18 4 -1.</_>\n        <_>\n          15 9 9 2 2.</_>\n        <_>\n          6 11 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 9 6 -1.</_>\n        <_>\n          3 6 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 15 -1.</_>\n        <_>\n          9 6 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 6 -1.</_>\n        <_>\n          8 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 14 9 -1.</_>\n        <_>\n          5 4 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 20 -1.</_>\n        <_>\n          3 0 4 10 2.</_>\n        <_>\n          7 10 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 7 9 -1.</_>\n        <_>\n          5 3 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 5 -1.</_>\n        <_>\n          10 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 14 -1.</_>\n        <_>\n          4 1 4 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 22 4 -1.</_>\n        <_>\n          2 14 22 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 6 6 -1.</_>\n        <_>\n          8 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 7 -1.</_>\n        <_>\n          18 1 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 17 18 -1.</_>\n        <_>\n          4 12 17 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 6 -1.</_>\n        <_>\n          6 0 6 3 2.</_>\n        <_>\n          12 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 18 4 -1.</_>\n        <_>\n          13 7 9 2 2.</_>\n        <_>\n          4 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 10 6 -1.</_>\n        <_>\n          4 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 12 -1.</_>\n        <_>\n          12 9 5 6 2.</_>\n        <_>\n          7 15 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 3 -1.</_>\n        <_>\n          8 1 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 6 -1.</_>\n        <_>\n          8 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 19 3 -1.</_>\n        <_>\n          3 11 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 10 6 -1.</_>\n        <_>\n          14 18 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 10 6 -1.</_>\n        <_>\n          0 18 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 9 6 -1.</_>\n        <_>\n          14 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 9 6 -1.</_>\n        <_>\n          0 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 9 6 -1.</_>\n        <_>\n          14 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 9 -1.</_>\n        <_>\n          8 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 4 12 -1.</_>\n        <_>\n          15 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 8 8 -1.</_>\n        <_>\n          8 17 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 20 18 3 -1.</_>\n        <_>\n          10 20 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 12 -1.</_>\n        <_>\n          7 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 3 -1.</_>\n        <_>\n          7 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          12 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 18 3 -1.</_>\n        <_>\n          11 20 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 18 3 -1.</_>\n        <_>\n          7 20 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 20 -1.</_>\n        <_>\n          21 1 3 10 2.</_>\n        <_>\n          18 11 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 20 -1.</_>\n        <_>\n          0 1 3 10 2.</_>\n        <_>\n          3 11 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 4 18 -1.</_>\n        <_>\n          15 3 2 9 2.</_>\n        <_>\n          13 12 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 12 -1.</_>\n        <_>\n          0 6 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 12 6 -1.</_>\n        <_>\n          18 9 6 3 2.</_>\n        <_>\n          12 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 18 -1.</_>\n        <_>\n          7 3 2 9 2.</_>\n        <_>\n          9 12 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 6 -1.</_>\n        <_>\n          0 9 6 3 2.</_>\n        <_>\n          6 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 8 20 -1.</_>\n        <_>\n          18 4 4 10 2.</_>\n        <_>\n          14 14 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 8 20 -1.</_>\n        <_>\n          2 4 4 10 2.</_>\n        <_>\n          6 14 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 9 6 -1.</_>\n        <_>\n          14 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 9 6 -1.</_>\n        <_>\n          1 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 18 3 -1.</_>\n        <_>\n          9 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 9 6 -1.</_>\n        <_>\n          5 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 18 3 -1.</_>\n        <_>\n          5 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 7 -1.</_>\n        <_>\n          11 2 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 9 6 -1.</_>\n        <_>\n          12 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 9 6 -1.</_>\n        <_>\n          9 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          12 6 7 3 2.</_>\n        <_>\n          5 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 13 -1.</_>\n        <_>\n          10 2 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 6 -1.</_>\n        <_>\n          12 11 6 3 2.</_>\n        <_>\n          6 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 15 -1.</_>\n        <_>\n          9 1 6 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 7 -1.</_>\n        <_>\n          13 0 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 16 6 -1.</_>\n        <_>\n          3 6 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 9 -1.</_>\n        <_>\n          9 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 24 -1.</_>\n        <_>\n          13 0 2 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 24 -1.</_>\n        <_>\n          9 0 2 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 5 12 -1.</_>\n        <_>\n          11 13 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 9 6 -1.</_>\n        <_>\n          7 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 18 6 -1.</_>\n        <_>\n          5 9 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 5 12 -1.</_>\n        <_>\n          8 13 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 17 6 -1.</_>\n        <_>\n          4 19 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 18 14 -1.</_>\n        <_>\n          0 3 9 7 2.</_>\n        <_>\n          9 10 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 2 -1.</_>\n        <_>\n          0 2 24 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 3 -1.</_>\n        <_>\n          0 16 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 12 -1.</_>\n        <_>\n          3 9 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          10 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 10 -1.</_>\n        <_>\n          12 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 9 -1.</_>\n        <_>\n          7 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 21 7 -1.</_>\n        <_>\n          9 0 7 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 5 -1.</_>\n        <_>\n          10 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 8 -1.</_>\n        <_>\n          11 7 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 18 -1.</_>\n        <_>\n          9 6 3 9 2.</_>\n        <_>\n          12 15 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 8 10 -1.</_>\n        <_>\n          19 14 4 5 2.</_>\n        <_>\n          15 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 8 10 -1.</_>\n        <_>\n          1 14 4 5 2.</_>\n        <_>\n          5 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 10 -1.</_>\n        <_>\n          15 0 4 5 2.</_>\n        <_>\n          11 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 10 -1.</_>\n        <_>\n          5 0 4 5 2.</_>\n        <_>\n          9 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 5 -1.</_>\n        <_>\n          6 1 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 18 2 -1.</_>\n        <_>\n          10 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 20 6 -1.</_>\n        <_>\n          12 8 10 3 2.</_>\n        <_>\n          2 11 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 7 -1.</_>\n        <_>\n          10 6 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 16 -1.</_>\n        <_>\n          14 5 4 8 2.</_>\n        <_>\n          10 13 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 16 8 -1.</_>\n        <_>\n          3 9 8 4 2.</_>\n        <_>\n          11 13 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 10 8 -1.</_>\n        <_>\n          7 12 5 4 2.</_>\n        <_>\n          12 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 15 4 -1.</_>\n        <_>\n          14 19 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 9 -1.</_>\n        <_>\n          7 0 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 10 8 -1.</_>\n        <_>\n          18 4 5 4 2.</_>\n        <_>\n          13 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 18 4 -1.</_>\n        <_>\n          9 16 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 10 12 -1.</_>\n        <_>\n          13 7 5 6 2.</_>\n        <_>\n          8 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 12 -1.</_>\n        <_>\n          6 7 5 6 2.</_>\n        <_>\n          11 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 18 7 -1.</_>\n        <_>\n          10 6 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 18 3 -1.</_>\n        <_>\n          3 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 10 -1.</_>\n        <_>\n          4 4 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 24 -1.</_>\n        <_>\n          16 0 4 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 15 -1.</_>\n        <_>\n          8 0 4 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 24 -1.</_>\n        <_>\n          16 0 4 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 9 -1.</_>\n        <_>\n          7 4 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 6 -1.</_>\n        <_>\n          3 9 9 3 2.</_>\n        <_>\n          12 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 6 9 -1.</_>\n        <_>\n          18 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 9 -1.</_>\n        <_>\n          0 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 18 4 -1.</_>\n        <_>\n          13 7 9 2 2.</_>\n        <_>\n          4 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 12 20 -1.</_>\n        <_>\n          2 1 6 10 2.</_>\n        <_>\n          8 11 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 6 23 -1.</_>\n        <_>\n          17 0 3 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 18 -1.</_>\n        <_>\n          1 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 10 6 -1.</_>\n        <_>\n          8 10 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 6 -1.</_>\n        <_>\n          0 6 10 3 2.</_>\n        <_>\n          10 9 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 12 5 -1.</_>\n        <_>\n          15 12 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 19 -1.</_>\n        <_>\n          1 4 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 3 18 -1.</_>\n        <_>\n          20 1 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 3 18 -1.</_>\n        <_>\n          3 1 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 18 3 -1.</_>\n        <_>\n          9 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 10 9 -1.</_>\n        <_>\n          9 4 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 14 7 -1.</_>\n        <_>\n          7 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 7 -1.</_>\n        <_>\n          10 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 9 6 -1.</_>\n        <_>\n          11 15 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 8 10 -1.</_>\n        <_>\n          4 14 4 5 2.</_>\n        <_>\n          8 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 10 -1.</_>\n        <_>\n          10 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 5 16 -1.</_>\n        <_>\n          3 16 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 9 6 -1.</_>\n        <_>\n          15 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 9 6 -1.</_>\n        <_>\n          0 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 9 -1.</_>\n        <_>\n          6 10 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 5 8 -1.</_>\n        <_>\n          9 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 9 -1.</_>\n        <_>\n          10 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 7 6 -1.</_>\n        <_>\n          16 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 22 -1.</_>\n        <_>\n          10 1 2 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 3 -1.</_>\n        <_>\n          6 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 19 3 -1.</_>\n        <_>\n          0 19 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 6 24 -1.</_>\n        <_>\n          17 0 3 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 15 6 -1.</_>\n        <_>\n          5 13 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 10 14 -1.</_>\n        <_>\n          14 6 5 7 2.</_>\n        <_>\n          9 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 8 10 -1.</_>\n        <_>\n          1 6 4 5 2.</_>\n        <_>\n          5 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 5 -1.</_>\n        <_>\n          7 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 6 -1.</_>\n        <_>\n          10 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 14 14 -1.</_>\n        <_>\n          14 8 7 7 2.</_>\n        <_>\n          7 15 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 14 -1.</_>\n        <_>\n          3 8 7 7 2.</_>\n        <_>\n          10 15 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 13 4 -1.</_>\n        <_>\n          9 10 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 12 -1.</_>\n        <_>\n          3 2 3 6 2.</_>\n        <_>\n          6 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 17 6 -1.</_>\n        <_>\n          6 13 17 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 17 6 -1.</_>\n        <_>\n          1 13 17 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 8 9 -1.</_>\n        <_>\n          16 10 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 9 -1.</_>\n        <_>\n          0 10 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 24 10 -1.</_>\n        <_>\n          12 9 12 5 2.</_>\n        <_>\n          0 14 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 15 8 -1.</_>\n        <_>\n          8 2 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 18 8 -1.</_>\n        <_>\n          10 2 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 4 -1.</_>\n        <_>\n          0 1 9 2 2.</_>\n        <_>\n          9 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 2 3 18 -1.</_>\n        <_>\n          21 2 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 3 19 -1.</_>\n        <_>\n          2 3 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 6 16 -1.</_>\n        <_>\n          20 8 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 16 -1.</_>\n        <_>\n          2 8 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 11 6 -1.</_>\n        <_>\n          8 20 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 5 -1.</_>\n        <_>\n          8 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 5 -1.</_>\n        <_>\n          11 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 9 6 -1.</_>\n        <_>\n          9 3 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 5 -1.</_>\n        <_>\n          7 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 7 -1.</_>\n        <_>\n          12 8 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 9 6 -1.</_>\n        <_>\n          11 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 9 -1.</_>\n        <_>\n          8 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 9 6 -1.</_>\n        <_>\n          11 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 20 -1.</_>\n        <_>\n          4 3 8 10 2.</_>\n        <_>\n          12 13 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 12 -1.</_>\n        <_>\n          12 6 5 6 2.</_>\n        <_>\n          7 12 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 7 12 -1.</_>\n        <_>\n          0 6 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 11 6 -1.</_>\n        <_>\n          12 19 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 8 -1.</_>\n        <_>\n          4 7 6 4 2.</_>\n        <_>\n          10 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 8 10 -1.</_>\n        <_>\n          12 11 4 5 2.</_>\n        <_>\n          8 16 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 9 -1.</_>\n        <_>\n          11 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 22 -1.</_>\n        <_>\n          15 0 1 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 22 -1.</_>\n        <_>\n          8 0 1 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 18 4 -1.</_>\n        <_>\n          13 7 9 2 2.</_>\n        <_>\n          4 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 13 -1.</_>\n        <_>\n          9 0 9 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 24 -1.</_>\n        <_>\n          17 0 1 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 24 -1.</_>\n        <_>\n          6 0 1 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 5 8 -1.</_>\n        <_>\n          10 19 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 18 2 -1.</_>\n        <_>\n          2 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 20 3 -1.</_>\n        <_>\n          2 9 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 6 -1.</_>\n        <_>\n          7 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 19 10 -1.</_>\n        <_>\n          3 7 19 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 19 3 -1.</_>\n        <_>\n          2 8 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 9 4 -1.</_>\n        <_>\n          15 8 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 8 -1.</_>\n        <_>\n          8 2 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 14 4 -1.</_>\n        <_>\n          10 9 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 16 -1.</_>\n        <_>\n          7 4 3 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 9 16 -1.</_>\n        <_>\n          18 8 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 16 -1.</_>\n        <_>\n          3 8 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 14 -1.</_>\n        <_>\n          20 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 14 -1.</_>\n        <_>\n          2 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 22 -1.</_>\n        <_>\n          17 0 2 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 22 -1.</_>\n        <_>\n          5 0 2 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 12 20 -1.</_>\n        <_>\n          16 2 4 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 20 -1.</_>\n        <_>\n          4 2 4 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 16 -1.</_>\n        <_>\n          12 0 3 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 18 6 -1.</_>\n        <_>\n          3 4 9 3 2.</_>\n        <_>\n          12 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 16 8 -1.</_>\n        <_>\n          13 5 8 4 2.</_>\n        <_>\n          5 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 10 6 -1.</_>\n        <_>\n          0 15 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 9 6 -1.</_>\n        <_>\n          8 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 6 -1.</_>\n        <_>\n          9 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 10 8 -1.</_>\n        <_>\n          19 1 5 4 2.</_>\n        <_>\n          14 5 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 12 -1.</_>\n        <_>\n          9 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 9 -1.</_>\n        <_>\n          6 7 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 6 -1.</_>\n        <_>\n          10 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 5 -1.</_>\n        <_>\n          5 1 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 8 -1.</_>\n        <_>\n          12 16 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 12 6 -1.</_>\n        <_>\n          3 14 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 12 6 -1.</_>\n        <_>\n          15 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 6 -1.</_>\n        <_>\n          4 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 7 18 -1.</_>\n        <_>\n          11 12 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 3 -1.</_>\n        <_>\n          9 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 19 2 -1.</_>\n        <_>\n          5 4 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 6 -1.</_>\n        <_>\n          4 2 6 3 2.</_>\n        <_>\n          10 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 5 15 -1.</_>\n        <_>\n          16 14 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 5 15 -1.</_>\n        <_>\n          3 14 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 6 -1.</_>\n        <_>\n          13 6 7 3 2.</_>\n        <_>\n          6 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 14 -1.</_>\n        <_>\n          8 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 24 5 -1.</_>\n        <_>\n          8 16 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 20 3 -1.</_>\n        <_>\n          10 20 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 18 2 -1.</_>\n        <_>\n          5 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 10 -1.</_>\n        <_>\n          2 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 20 3 -1.</_>\n        <_>\n          2 2 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 11 -1.</_>\n        <_>\n          11 13 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 8 -1.</_>\n        <_>\n          9 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 9 -1.</_>\n        <_>\n          9 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 18 2 -1.</_>\n        <_>\n          5 12 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 15 6 -1.</_>\n        <_>\n          2 8 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 3 -1.</_>\n        <_>\n          6 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 18 -1.</_>\n        <_>\n          6 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 6 10 -1.</_>\n        <_>\n          20 3 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 10 -1.</_>\n        <_>\n          2 3 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 9 -1.</_>\n        <_>\n          10 5 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 9 -1.</_>\n        <_>\n          10 5 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 20 3 -1.</_>\n        <_>\n          3 3 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 13 4 -1.</_>\n        <_>\n          5 4 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 7 14 -1.</_>\n        <_>\n          17 7 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 14 -1.</_>\n        <_>\n          0 7 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 10 6 -1.</_>\n        <_>\n          9 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 6 -1.</_>\n        <_>\n          10 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 18 -1.</_>\n        <_>\n          11 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 10 -1.</_>\n        <_>\n          4 11 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 15 4 -1.</_>\n        <_>\n          9 9 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 6 -1.</_>\n        <_>\n          5 6 6 3 2.</_>\n        <_>\n          11 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 9 -1.</_>\n        <_>\n          6 4 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 12 -1.</_>\n        <_>\n          7 9 3 6 2.</_>\n        <_>\n          10 15 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 13 6 -1.</_>\n        <_>\n          11 7 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 22 13 -1.</_>\n        <_>\n          12 11 11 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 6 6 -1.</_>\n        <_>\n          18 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 6 -1.</_>\n        <_>\n          0 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 3 -1.</_>\n        <_>\n          0 7 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 6 -1.</_>\n        <_>\n          0 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 18 3 -1.</_>\n        <_>\n          6 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 2 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 3 19 -1.</_>\n        <_>\n          20 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 16 -1.</_>\n        <_>\n          4 6 6 8 2.</_>\n        <_>\n          10 14 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 6 4 18 -1.</_>\n        <_>\n          21 6 2 9 2.</_>\n        <_>\n          19 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 18 -1.</_>\n        <_>\n          1 6 2 9 2.</_>\n        <_>\n          3 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          3 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 9 4 -1.</_>\n        <_>\n          0 21 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 12 6 -1.</_>\n        <_>\n          18 18 6 3 2.</_>\n        <_>\n          12 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 9 4 -1.</_>\n        <_>\n          7 20 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 10 8 -1.</_>\n        <_>\n          17 16 5 4 2.</_>\n        <_>\n          12 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 10 8 -1.</_>\n        <_>\n          2 16 5 4 2.</_>\n        <_>\n          7 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 12 -1.</_>\n        <_>\n          19 0 5 6 2.</_>\n        <_>\n          14 6 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 12 -1.</_>\n        <_>\n          0 0 5 6 2.</_>\n        <_>\n          5 6 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 9 6 -1.</_>\n        <_>\n          15 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 10 6 -1.</_>\n        <_>\n          14 16 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 10 6 -1.</_>\n        <_>\n          0 16 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 18 2 -1.</_>\n        <_>\n          5 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 18 3 -1.</_>\n        <_>\n          0 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 18 12 -1.</_>\n        <_>\n          12 5 9 6 2.</_>\n        <_>\n          3 11 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 7 9 -1.</_>\n        <_>\n          5 6 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 19 15 -1.</_>\n        <_>\n          4 5 19 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 4 -1.</_>\n        <_>\n          3 2 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 16 12 -1.</_>\n        <_>\n          4 12 8 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 15 -1.</_>\n        <_>\n          10 3 6 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 2 19 -1.</_>\n        <_>\n          16 4 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 19 -1.</_>\n        <_>\n          7 4 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 8 10 -1.</_>\n        <_>\n          17 14 4 5 2.</_>\n        <_>\n          13 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 8 10 -1.</_>\n        <_>\n          3 14 4 5 2.</_>\n        <_>\n          7 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 18 -1.</_>\n        <_>\n          12 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 6 -1.</_>\n        <_>\n          5 11 6 3 2.</_>\n        <_>\n          11 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 10 -1.</_>\n        <_>\n          14 5 4 5 2.</_>\n        <_>\n          10 10 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 10 -1.</_>\n        <_>\n          6 4 6 5 2.</_>\n        <_>\n          12 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 18 10 -1.</_>\n        <_>\n          15 8 9 5 2.</_>\n        <_>\n          6 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 10 -1.</_>\n        <_>\n          0 8 9 5 2.</_>\n        <_>\n          9 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 18 -1.</_>\n        <_>\n          12 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 18 3 -1.</_>\n        <_>\n          0 15 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 18 -1.</_>\n        <_>\n          12 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 18 -1.</_>\n        <_>\n          9 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 18 3 -1.</_>\n        <_>\n          6 15 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 3 -1.</_>\n        <_>\n          0 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 22 3 -1.</_>\n        <_>\n          2 6 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 21 10 -1.</_>\n        <_>\n          7 0 7 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 18 17 -1.</_>\n        <_>\n          12 3 6 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 18 17 -1.</_>\n        <_>\n          6 3 6 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 24 11 -1.</_>\n        <_>\n          8 12 8 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 16 6 -1.</_>\n        <_>\n          4 13 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 8 -1.</_>\n        <_>\n          12 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 8 7 -1.</_>\n        <_>\n          10 14 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 6 14 -1.</_>\n        <_>\n          18 10 3 7 2.</_>\n        <_>\n          15 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 14 -1.</_>\n        <_>\n          3 10 3 7 2.</_>\n        <_>\n          6 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 18 2 -1.</_>\n        <_>\n          6 13 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 10 6 -1.</_>\n        <_>\n          5 10 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 9 4 -1.</_>\n        <_>\n          12 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 9 6 -1.</_>\n        <_>\n          0 13 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 18 -1.</_>\n        <_>\n          12 2 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 18 -1.</_>\n        <_>\n          11 2 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 10 -1.</_>\n        <_>\n          11 12 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 9 -1.</_>\n        <_>\n          1 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 16 6 -1.</_>\n        <_>\n          14 9 8 3 2.</_>\n        <_>\n          6 12 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 9 6 -1.</_>\n        <_>\n          1 10 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 16 6 -1.</_>\n        <_>\n          7 9 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 3 -1.</_>\n        <_>\n          0 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          12 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          12 6 2 9 2.</_>\n        <_>\n          10 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          10 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 9 -1.</_>\n        <_>\n          9 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 9 -1.</_>\n        <_>\n          1 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 3 -1.</_>\n        <_>\n          0 4 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 9 4 -1.</_>\n        <_>\n          6 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 8 10 -1.</_>\n        <_>\n          12 9 4 5 2.</_>\n        <_>\n          8 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 13 9 -1.</_>\n        <_>\n          5 5 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 9 -1.</_>\n        <_>\n          4 7 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 14 9 -1.</_>\n        <_>\n          4 7 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 9 6 -1.</_>\n        <_>\n          8 7 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 16 6 -1.</_>\n        <_>\n          1 9 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 13 9 -1.</_>\n        <_>\n          10 8 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 13 9 -1.</_>\n        <_>\n          1 8 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 24 6 -1.</_>\n        <_>\n          12 4 12 3 2.</_>\n        <_>\n          0 7 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 10 9 -1.</_>\n        <_>\n          1 17 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 18 3 -1.</_>\n        <_>\n          5 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 9 6 -1.</_>\n        <_>\n          9 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 22 4 -1.</_>\n        <_>\n          1 20 11 2 2.</_>\n        <_>\n          12 22 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 8 6 -1.</_>\n        <_>\n          8 17 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 15 -1.</_>\n        <_>\n          8 11 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 18 3 -1.</_>\n        <_>\n          5 5 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 10 -1.</_>\n        <_>\n          9 8 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 3 -1.</_>\n        <_>\n          6 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 18 6 -1.</_>\n        <_>\n          2 6 9 3 2.</_>\n        <_>\n          11 9 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          12 6 2 9 2.</_>\n        <_>\n          10 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 6 -1.</_>\n        <_>\n          10 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 2 18 -1.</_>\n        <_>\n          14 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 18 -1.</_>\n        <_>\n          8 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 10 6 -1.</_>\n        <_>\n          9 2 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 12 -1.</_>\n        <_>\n          12 1 9 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 17 22 -1.</_>\n        <_>\n          5 13 17 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 6 -1.</_>\n        <_>\n          4 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 16 6 -1.</_>\n        <_>\n          14 9 8 3 2.</_>\n        <_>\n          6 12 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 5 18 -1.</_>\n        <_>\n          9 9 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 12 -1.</_>\n        <_>\n          11 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 13 4 -1.</_>\n        <_>\n          5 11 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 19 3 -1.</_>\n        <_>\n          5 9 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 8 -1.</_>\n        <_>\n          9 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 15 -1.</_>\n        <_>\n          11 14 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 14 -1.</_>\n        <_>\n          2 0 3 7 2.</_>\n        <_>\n          5 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 6 14 -1.</_>\n        <_>\n          18 1 3 7 2.</_>\n        <_>\n          15 8 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 14 -1.</_>\n        <_>\n          3 1 3 7 2.</_>\n        <_>\n          6 8 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 18 4 -1.</_>\n        <_>\n          12 20 9 2 2.</_>\n        <_>\n          3 22 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 20 -1.</_>\n        <_>\n          5 0 2 10 2.</_>\n        <_>\n          7 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 8 12 -1.</_>\n        <_>\n          20 8 4 6 2.</_>\n        <_>\n          16 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 12 -1.</_>\n        <_>\n          0 8 4 6 2.</_>\n        <_>\n          4 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 10 8 -1.</_>\n        <_>\n          18 13 5 4 2.</_>\n        <_>\n          13 17 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 10 8 -1.</_>\n        <_>\n          1 13 5 4 2.</_>\n        <_>\n          6 17 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 4 15 -1.</_>\n        <_>\n          15 13 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 15 -1.</_>\n        <_>\n          5 13 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 16 12 -1.</_>\n        <_>\n          6 15 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 12 -1.</_>\n        <_>\n          2 15 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 7 9 -1.</_>\n        <_>\n          14 15 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 21 -1.</_>\n        <_>\n          10 8 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 9 4 -1.</_>\n        <_>\n          13 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 17 9 -1.</_>\n        <_>\n          3 13 17 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 8 15 -1.</_>\n        <_>\n          13 13 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 8 15 -1.</_>\n        <_>\n          3 13 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 10 8 -1.</_>\n        <_>\n          16 14 5 4 2.</_>\n        <_>\n          11 18 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 22 6 -1.</_>\n        <_>\n          0 18 11 3 2.</_>\n        <_>\n          11 21 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 24 4 -1.</_>\n        <_>\n          0 16 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 20 12 3 -1.</_>\n        <_>\n          12 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 12 6 12 -1.</_>\n        <_>\n          21 12 3 6 2.</_>\n        <_>\n          18 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 12 -1.</_>\n        <_>\n          0 12 3 6 2.</_>\n        <_>\n          3 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 22 10 -1.</_>\n        <_>\n          1 6 11 5 2.</_>\n        <_>\n          12 11 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 18 2 -1.</_>\n        <_>\n          0 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 19 3 -1.</_>\n        <_>\n          3 16 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 18 3 -1.</_>\n        <_>\n          0 14 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 9 6 -1.</_>\n        <_>\n          0 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 6 -1.</_>\n        <_>\n          12 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 9 6 -1.</_>\n        <_>\n          3 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 3 20 -1.</_>\n        <_>\n          17 2 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 24 8 -1.</_>\n        <_>\n          0 17 24 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 22 -1.</_>\n        <_>\n          12 1 3 11 2.</_>\n        <_>\n          9 12 3 11 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_fullbody.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n   14x28 fullbody detector (see the detailed description below). \n\n//////////////////////////////////////////////////////////////////////////\n| Contributors License Agreement\n| IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n|   By downloading, copying, installing or using the software you agree \n|   to this license.\n|   If you do not agree to this license, do not download, install,\n|   copy or use the software.\n|\n| Copyright (c) 2004, Hannes Kruppa and Bernt Schiele (ETH Zurich, Switzerland).\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\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|    * The name of Contributor may not used to endorse or promote products \n|      derived 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\n| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n| PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n| PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n| LIABILITY, 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.  Back to\n| Top\n//////////////////////////////////////////////////////////////////////////\n\n\"Haar\"-based Detectors For Pedestrian Detection\n===============================================\nby Hannes Kruppa and Bernt Schiele, ETH Zurich, Switzerland\n\nThis archive provides the following three detectors:\n- upper body detector (most fun, useful in many scenarios!)\n- lower body detector\n- full body detector\n\nThese detectors have been successfully applied to pedestrian detection\nin still images. They can be directly passed as parameters to the\nprogram HaarFaceDetect.\nNOTE: These detectors deal with frontal and backside views but not\nwith side views (also see \"Known limitations\" below).\n\nRESEARCHERS:\nIf you are using any of the detectors or involved ideas please cite\nthis paper (available at www.vision.ethz.ch/publications/):\n\n@InProceedings{Kruppa03-bmvc,\n  author =       \"Hannes Kruppa, Modesto Castrillon-Santana and Bernt Schiele\",\n  title =        \"Fast and Robust Face Finding via Local Context.\"\n  booktitle =    \"Joint IEEE International Workshop on Visual Surveillance and Performance Evaluation of Tracking and Surveillance\"\n  year =         \"2003\",\n  month =        \"October\"\n}\n\nCOMMERCIAL:\nIf you have any commercial interest in this work please contact \nhkruppa@inf.ethz.ch\n\n\nADDITIONAL INFORMATION \n====================== \nCheck out the demo movie, e.g. using mplayer or any (Windows/Linux-) player\nthat can play back .mpg movies.\nUnder Linux that's:\n> ffplay demo.mpg\nor:\n> mplayer demo.mpg\n\nThe movie shows a person walking towards the camera in a realistic\nindoor setting. Using ffplay or mplayer you can pause and continue the\nmovie by pressing the space bar.\n\nDetections coming from the different detectors are visualized using\ndifferent line styles: \nupper body : dotted line\nlower body : dashed line\nfull body  : solid line\n\nYou will notice that successful detections containing the target do\nnot sit tightly on the body but also include some of the background\nleft and right.  This is not a bug but accurately reflects the\nemployed training data which also includes portions of the background\nto ensure proper silhouette representation. If you want to get a\nfeeling for the training data check out the CBCL data set:\nhttp://www.ai.mit.edu/projects/cbcl/software-datasets/PedestrianData.html\n\nThere is also a small number of false alarms in this sequence.  \nNOTE: This is per frame detection, not tracking (which is also one of\nthe reasons why it is not mislead by the person's shadow on the back\nwall). \n\nOn an Intel Xeon 1.7GHz machine the detectors operate at something\nbetween 6Hz to 14 Hz (on 352 x 288 frames per second) depending on the\ndetector. The detectors work as well on much lower image resolutions\nwhich is always an interesting possibility for speed-ups or\n\"coarse-to-fine\" search strategies.\n\nAdditional information e.g. on training parameters, detector\ncombination, detecting other types of objects (e.g. cars) etc. is\navailable in my PhD thesis report (available end of June). Check out\nwww.vision.ethz.ch/kruppa/\n\n\nKNOWN LIMITATIONS\n==================\n1) the detectors only support frontal and back views but not sideviews.\n   Sideviews are trickier and it makes a lot of sense to include additional\n   modalities for their detection, e.g. motion information. I recommend\n   Viola and Jones' ICCV 2003 paper if this further interests you.\n\n2) dont expect these detectors to be as accurate as a frontal face detector.\n   A frontal face as a pattern is pretty distinct with respect to other\n   patterns occuring in the world (i.e. image \"background\"). This is not so\n   for upper, lower and especially full bodies, because they have to rely\n   on fragile silhouette information rather than internal (facial) features.\n   Still, we found especially the upper body detector to perform amazingly well.\n   In contrast to a face detector these detectors will also work at very low\n   image resolutions \n\nAcknowledgements\n================\nThanks to Martin Spengler, ETH Zurich, for providing the demo movie.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>28</height>\n  <width>14</width>\n  <stageParams>\n    <maxWeakCount>107</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>30</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-1.2288980484008789e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 -5.5820569396018982e-02</internalNodes>\n          <leafValues>\n            5.8697921037673950e-01 -6.2811422348022461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 -3.8861181586980820e-02</internalNodes>\n          <leafValues>\n            -7.0916819572448730e-01 2.6821210980415344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 -2.6740878820419312e-01</internalNodes>\n          <leafValues>\n            8.3082962036132812e-01 -2.2599589824676514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3 9.6419736742973328e-02</internalNodes>\n          <leafValues>\n            -1.1697849631309509e-01 8.7254559993743896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 -1.0798710398375988e-02</internalNodes>\n          <leafValues>\n            -5.7219749689102173e-01 2.5325658917427063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 1.1365639977157116e-02</internalNodes>\n          <leafValues>\n            1.9650830328464508e-01 -7.2744637727737427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 -5.0216919044032693e-04</internalNodes>\n          <leafValues>\n            2.4435159564018250e-01 -5.1973581314086914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 -2.8462480753660202e-02</internalNodes>\n          <leafValues>\n            -8.3607292175292969e-01 1.1158040165901184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 1.3473170110955834e-03</internalNodes>\n          <leafValues>\n            -3.8406538963317871e-01 2.6767989993095398e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>15</maxWeakCount>\n      <stageThreshold>-1.0969949960708618e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 9 -1.0743220336735249e-02</internalNodes>\n          <leafValues>\n            4.7747328877449036e-01 -6.2392932176589966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 -1.3188569573685527e-03</internalNodes>\n          <leafValues>\n            2.1242660284042358e-01 -2.4162709712982178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 -5.5571161210536957e-03</internalNodes>\n          <leafValues>\n            3.6147859692573547e-01 -3.7251719832420349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 -1.3893410563468933e-01</internalNodes>\n          <leafValues>\n            -6.7900502681732178e-01 1.1280310153961182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 2.6465829461812973e-02</internalNodes>\n          <leafValues>\n            1.2474969774484634e-01 -8.2852339744567871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -8.9386843144893646e-02</internalNodes>\n          <leafValues>\n            7.4271762371063232e-01 -1.7019319534301758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 -2.1335419267416000e-02</internalNodes>\n          <leafValues>\n            -7.1750187873840332e-01 1.5566180646419525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 5.5709101259708405e-02</internalNodes>\n          <leafValues>\n            -1.5310040116310120e-01 7.1804767847061157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 -6.9709950685501099e-01</internalNodes>\n          <leafValues>\n            8.1154191493988037e-01 -1.0886389762163162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 2.0205999910831451e-01</internalNodes>\n          <leafValues>\n            7.6398417353630066e-02 -7.3011511564254761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 -7.1882657706737518e-02</internalNodes>\n          <leafValues>\n            -7.1488589048385620e-01 1.6517649590969086e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 -1.9228760153055191e-02</internalNodes>\n          <leafValues>\n            -3.9868369698524475e-01 4.0557239204645157e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 1.1500229593366385e-03</internalNodes>\n          <leafValues>\n            -3.8260778784751892e-01 3.1855079531669617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 2.3252779617905617e-02</internalNodes>\n          <leafValues>\n            5.4390400648117065e-02 -7.0669990777969360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 -3.2618120894767344e-04</internalNodes>\n          <leafValues>\n            2.2610600292682648e-01 -4.0709879994392395e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>14</maxWeakCount>\n      <stageThreshold>-1.2285970449447632e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 24 -1.2910200655460358e-01</internalNodes>\n          <leafValues>\n            7.6003128290176392e-01 -2.3405790328979492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 6.7449256777763367e-02</internalNodes>\n          <leafValues>\n            1.7179529368877411e-01 -8.4364777803421021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 1.2663270346820354e-02</internalNodes>\n          <leafValues>\n            2.2913210093975067e-01 -7.3072457313537598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 -4.2741331271827221e-03</internalNodes>\n          <leafValues>\n            6.2420479953289032e-02 -4.0985938906669617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -2.3143950849771500e-02</internalNodes>\n          <leafValues>\n            -8.3971828222274780e-01 2.0115749537944794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 -5.5371038615703583e-04</internalNodes>\n          <leafValues>\n            1.5369419753551483e-01 -4.4038110971450806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 -9.5239803194999695e-03</internalNodes>\n          <leafValues>\n            -6.3186800479888916e-01 1.6250230371952057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 2.8307670727372169e-02</internalNodes>\n          <leafValues>\n            -7.2599969804286957e-02 3.7919989228248596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 -4.5148018747568130e-02</internalNodes>\n          <leafValues>\n            7.4493628740310669e-01 -1.5581710636615753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 1.0014739632606506e-01</internalNodes>\n          <leafValues>\n            1.7949639260768890e-01 -6.4644080400466919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 7.3245721869170666e-03</internalNodes>\n          <leafValues>\n            1.7763899266719818e-01 -5.7654058933258057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 1.1875670403242111e-02</internalNodes>\n          <leafValues>\n            -3.1129720807075500e-01 1.6321399807929993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 -2.5479039177298546e-02</internalNodes>\n          <leafValues>\n            6.2692481279373169e-01 -1.1333750188350677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 -7.9196523874998093e-03</internalNodes>\n          <leafValues>\n            -7.7624428272247314e-01 1.5427610278129578e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>22</maxWeakCount>\n      <stageThreshold>-1.1200269460678101e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 38 -8.5809278488159180e-01</internalNodes>\n          <leafValues>\n            7.8796839714050293e-01 -2.2135549783706665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 -1.6491119749844074e-03</internalNodes>\n          <leafValues>\n            2.5673401355743408e-01 -4.3194240331649780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 -2.5882309302687645e-02</internalNodes>\n          <leafValues>\n            -8.7551230192184448e-01 8.8385626673698425e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 -4.7666151076555252e-03</internalNodes>\n          <leafValues>\n            -4.7022369503974915e-01 2.2800800204277039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 -8.3729699254035950e-02</internalNodes>\n          <leafValues>\n            6.3385730981826782e-01 -1.4888319373130798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 -4.0685739368200302e-02</internalNodes>\n          <leafValues>\n            -9.3931788206100464e-01 1.0598939843475819e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 -5.0759920850396156e-03</internalNodes>\n          <leafValues>\n            -4.5554420351982117e-01 1.7864370346069336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 2.3427829146385193e-03</internalNodes>\n          <leafValues>\n            -2.1434280276298523e-01 1.5531420707702637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 2.7649151161313057e-04</internalNodes>\n          <leafValues>\n            -3.3348160982131958e-01 2.2780239582061768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 1.6941839829087257e-02</internalNodes>\n          <leafValues>\n            7.4140816926956177e-02 -5.6262052059173584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 4.7558981180191040e-01</internalNodes>\n          <leafValues>\n            -1.0861130058765411e-01 8.2985258102416992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 5.8000627905130386e-03</internalNodes>\n          <leafValues>\n            1.3249030709266663e-01 -5.1620399951934814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 -7.4477560818195343e-02</internalNodes>\n          <leafValues>\n            -5.5545568466186523e-01 1.2344320118427277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 -3.5143009154126048e-04</internalNodes>\n          <leafValues>\n            6.8190753459930420e-02 -1.3616859912872314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 7.3454021476209164e-03</internalNodes>\n          <leafValues>\n            1.3678510487079620e-01 -5.3645122051239014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 -1.5471279621124268e-02</internalNodes>\n          <leafValues>\n            2.6180639863014221e-01 -1.0545810312032700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 5.6055500172078609e-03</internalNodes>\n          <leafValues>\n            -2.5746351480484009e-01 2.8795930743217468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 -2.4552858667448163e-04</internalNodes>\n          <leafValues>\n            1.0099930316209793e-01 -2.6119679212570190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 -3.3138900995254517e-02</internalNodes>\n          <leafValues>\n            -8.3779567480087280e-01 1.1327689886093140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 3.5591889172792435e-02</internalNodes>\n          <leafValues>\n            8.2336090505123138e-02 -6.2505662441253662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 2.0834030210971832e-01</internalNodes>\n          <leafValues>\n            6.9524437189102173e-02 -8.6881148815155029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 -2.8165400028228760e-02</internalNodes>\n          <leafValues>\n            -5.9799849987030029e-01 8.0329902470111847e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>25</maxWeakCount>\n      <stageThreshold>-1.0664960145950317e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 60 -2.6740709319710732e-02</internalNodes>\n          <leafValues>\n            3.8912421464920044e-01 -4.9827679991722107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 -1.2516999850049615e-03</internalNodes>\n          <leafValues>\n            1.3123430311679840e-01 -3.6368998885154724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 -4.1634511202573776e-02</internalNodes>\n          <leafValues>\n            5.7444751262664795e-01 -1.3932879269123077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 1.0096579790115356e-02</internalNodes>\n          <leafValues>\n            9.9073797464370728e-02 -2.2956989705562592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 -1.9090399146080017e-02</internalNodes>\n          <leafValues>\n            -5.5153107643127441e-01 1.5110069513320923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 -3.1481068581342697e-02</internalNodes>\n          <leafValues>\n            -4.5884269475936890e-01 1.7579549551010132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 -1.7687549814581871e-02</internalNodes>\n          <leafValues>\n            4.4711831212043762e-01 -1.5292930603027344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 -4.3685659766197205e-03</internalNodes>\n          <leafValues>\n            1.2185490131378174e-01 -1.6688570380210876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 8.9326845481991768e-03</internalNodes>\n          <leafValues>\n            -1.3333690166473389e-01 6.3753342628479004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 -5.0706309266388416e-03</internalNodes>\n          <leafValues>\n            -1.1220289766788483e-01 6.9824352860450745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 -5.9803090989589691e-03</internalNodes>\n          <leafValues>\n            -5.1842898130416870e-01 1.6099199652671814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 2.9967839363962412e-03</internalNodes>\n          <leafValues>\n            4.1065338999032974e-02 -1.9455850124359131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 3.8641549181193113e-03</internalNodes>\n          <leafValues>\n            1.6673240065574646e-01 -4.3569779396057129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 6.8349428474903107e-03</internalNodes>\n          <leafValues>\n            -1.7162640392780304e-01 1.4818060398101807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 4.3158490210771561e-02</internalNodes>\n          <leafValues>\n            8.3203509449958801e-02 -7.7821850776672363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 7.6560080051422119e-03</internalNodes>\n          <leafValues>\n            8.4740802645683289e-02 -4.9738150835037231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 -3.1110988929867744e-03</internalNodes>\n          <leafValues>\n            2.5827148556709290e-01 -2.5552031397819519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 1.1870309710502625e-01</internalNodes>\n          <leafValues>\n            -9.0944238007068634e-02 7.2286212444305420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 1.6875969246029854e-02</internalNodes>\n          <leafValues>\n            1.2629170715808868e-01 -5.5205297470092773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 -1.0887029930017889e-04</internalNodes>\n          <leafValues>\n            8.1648796796798706e-02 -1.6937020421028137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 2.8222990222275257e-03</internalNodes>\n          <leafValues>\n            1.6411300003528595e-01 -3.5218268632888794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 -5.2425849437713623e-01</internalNodes>\n          <leafValues>\n            4.8906171321868896e-01 -1.2674759328365326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 3.6927509307861328e-01</internalNodes>\n          <leafValues>\n            8.6115993559360504e-02 -6.7184638977050781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 -1.6883780062198639e-01</internalNodes>\n          <leafValues>\n            -8.4915691614151001e-01 5.4833348840475082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 -1.9279260188341141e-02</internalNodes>\n          <leafValues>\n            -7.8011512756347656e-01 6.2202680855989456e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>22</maxWeakCount>\n      <stageThreshold>-1.2319500446319580e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 85 -2.0901350677013397e-01</internalNodes>\n          <leafValues>\n            6.9808167219161987e-01 -3.4573590755462646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 -4.8061009147204459e-04</internalNodes>\n          <leafValues>\n            2.0923900604248047e-01 -2.4147640168666840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 -2.4844119325280190e-03</internalNodes>\n          <leafValues>\n            2.7636009454727173e-01 -4.1990399360656738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 -2.1536289714276791e-03</internalNodes>\n          <leafValues>\n            2.4710460007190704e-01 -3.0677899718284607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 5.8911990374326706e-02</internalNodes>\n          <leafValues>\n            -7.0834763348102570e-02 7.1133142709732056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 -2.3095219512470067e-04</internalNodes>\n          <leafValues>\n            1.7148600518703461e-01 -3.6168378591537476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 -3.1396400183439255e-02</internalNodes>\n          <leafValues>\n            -8.0131882429122925e-01 1.0042560100555420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 -3.5601970739662647e-03</internalNodes>\n          <leafValues>\n            9.9432766437530518e-02 -1.4848260581493378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 -4.3389322236180305e-03</internalNodes>\n          <leafValues>\n            -5.6621241569519043e-01 1.4096799492835999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 2.1326710283756256e-01</internalNodes>\n          <leafValues>\n            4.8158209770917892e-02 -7.4858909845352173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 1.0042529553174973e-02</internalNodes>\n          <leafValues>\n            1.0428400337696075e-01 -5.5387377738952637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 -2.6825280860066414e-02</internalNodes>\n          <leafValues>\n            5.7281607389450073e-01 -8.2537978887557983e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 8.3760882262140512e-04</internalNodes>\n          <leafValues>\n            -2.5626900792121887e-01 2.5898420810699463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -7.6051978394389153e-03</internalNodes>\n          <leafValues>\n            -5.8677357435226440e-01 5.1210779696702957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 -1.1935640126466751e-01</internalNodes>\n          <leafValues>\n            -4.5530828833580017e-01 1.2570330500602722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 6.6083478741347790e-03</internalNodes>\n          <leafValues>\n            -1.6316379606723785e-01 4.6659541130065918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 1.7303509637713432e-02</internalNodes>\n          <leafValues>\n            -1.2391400337219238e-01 5.9755408763885498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 5.4382272064685822e-03</internalNodes>\n          <leafValues>\n            1.3838729262351990e-01 -5.5069202184677124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 2.4591449182480574e-03</internalNodes>\n          <leafValues>\n            -3.9927339553833008e-01 1.5387089550495148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 3.5056238994002342e-03</internalNodes>\n          <leafValues>\n            -1.6146700084209442e-01 1.6086600720882416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 -2.3172689543571323e-04</internalNodes>\n          <leafValues>\n            1.7059360444545746e-01 -3.5409420728683472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 1.1914529837667942e-02</internalNodes>\n          <leafValues>\n            1.6265639662742615e-01 -4.1463181376457214e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>18</maxWeakCount>\n      <stageThreshold>-1.1912549734115601e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 107 -4.5429700985550880e-03</internalNodes>\n          <leafValues>\n            4.2964971065521240e-01 -5.6915849447250366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 4.6804840676486492e-03</internalNodes>\n          <leafValues>\n            -1.0380080342292786e-01 2.5453719496726990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 3.5870380233973265e-03</internalNodes>\n          <leafValues>\n            -3.6577078700065613e-01 3.9343339204788208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 -3.4428331255912781e-01</internalNodes>\n          <leafValues>\n            7.3125761747360229e-01 -1.5060240030288696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 3.3054459840059280e-02</internalNodes>\n          <leafValues>\n            1.7657589912414551e-01 -5.1060509681701660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 -2.1190310362726450e-03</internalNodes>\n          <leafValues>\n            8.6859323084354401e-02 -1.7733760178089142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 1.3780740089714527e-02</internalNodes>\n          <leafValues>\n            -1.2247169762849808e-01 6.6472941637039185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 2.4847950786352158e-02</internalNodes>\n          <leafValues>\n            2.3976799845695496e-01 -3.2456618547439575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -1.3126630336046219e-02</internalNodes>\n          <leafValues>\n            4.9461808800697327e-01 -2.0954379439353943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 -1.6886189579963684e-02</internalNodes>\n          <leafValues>\n            -1.3973990082740784e-01 7.5013160705566406e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 -5.2776751108467579e-03</internalNodes>\n          <leafValues>\n            -3.8919359445571899e-01 1.8921519815921783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 -2.0325549412518740e-03</internalNodes>\n          <leafValues>\n            2.4965450167655945e-01 -1.7960360646247864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 -1.8056800588965416e-02</internalNodes>\n          <leafValues>\n            -5.3683072328567505e-01 1.0615479946136475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 -2.8815109282732010e-02</internalNodes>\n          <leafValues>\n            5.3303200006484985e-01 -7.8712686896324158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 -6.0971658676862717e-02</internalNodes>\n          <leafValues>\n            -8.5663092136383057e-01 8.1721447408199310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 -6.2022160738706589e-02</internalNodes>\n          <leafValues>\n            -6.7228960990905762e-01 8.2316987216472626e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 -6.2961759977042675e-03</internalNodes>\n          <leafValues>\n            2.7192309498786926e-01 -2.3713490366935730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 4.9608140252530575e-03</internalNodes>\n          <leafValues>\n            -1.4295519888401031e-01 2.9380369186401367e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>30</maxWeakCount>\n      <stageThreshold>-1.1750839948654175e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 125 -8.7001353502273560e-02</internalNodes>\n          <leafValues>\n            6.3087427616119385e-01 -2.6264131069183350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 -4.5627020299434662e-03</internalNodes>\n          <leafValues>\n            1.4641839265823364e-01 -5.2321881055831909e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -4.1381991468369961e-03</internalNodes>\n          <leafValues>\n            2.1747599542140961e-01 -3.2107940316200256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 -1.9443330529611558e-04</internalNodes>\n          <leafValues>\n            1.4305000007152557e-01 -4.4748461246490479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 -2.6125069707632065e-03</internalNodes>\n          <leafValues>\n            -3.5936230421066284e-01 2.0934499800205231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 -3.5238351672887802e-02</internalNodes>\n          <leafValues>\n            -5.5879557132720947e-01 1.1818339675664902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 2.3880550637841225e-02</internalNodes>\n          <leafValues>\n            -1.2345419824123383e-01 6.4505738019943237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 -3.5878319758921862e-03</internalNodes>\n          <leafValues>\n            2.3340910673141479e-01 -2.9905730485916138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 -3.4388148784637451e-01</internalNodes>\n          <leafValues>\n            6.3334107398986816e-01 -8.6101479828357697e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 -2.5634190533310175e-03</internalNodes>\n          <leafValues>\n            -3.0992001295089722e-01 8.8213436305522919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 4.7002349048852921e-02</internalNodes>\n          <leafValues>\n            7.3533393442630768e-02 -7.5965261459350586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 7.1428148075938225e-03</internalNodes>\n          <leafValues>\n            -1.6981430351734161e-01 4.1982281208038330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 -3.7736629601567984e-03</internalNodes>\n          <leafValues>\n            -5.5664837360382080e-01 1.0060050338506699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 2.2179849445819855e-02</internalNodes>\n          <leafValues>\n            -7.6009899377822876e-02 6.3711041212081909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 2.9807379178237170e-05</internalNodes>\n          <leafValues>\n            -2.7143061161041260e-01 2.1503789722919464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 -1.4308329809864517e-05</internalNodes>\n          <leafValues>\n            1.3090610504150391e-01 -2.8089499473571777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 -1.1500260233879089e-01</internalNodes>\n          <leafValues>\n            -7.1986222267150879e-01 7.6884172856807709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 -2.5318590924143791e-02</internalNodes>\n          <leafValues>\n            4.5250499248504639e-01 -9.0481691062450409e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 -4.8698320984840393e-02</internalNodes>\n          <leafValues>\n            -7.4177128076553345e-01 6.7692406475543976e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 -5.0045289099216461e-03</internalNodes>\n          <leafValues>\n            1.3680170476436615e-01 -1.1860919743776321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 7.5120502151548862e-03</internalNodes>\n          <leafValues>\n            9.1260991990566254e-02 -5.6960678100585938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -5.4631778039038181e-03</internalNodes>\n          <leafValues>\n            1.1702360212802887e-01 -1.4761230349540710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 1.5256009995937347e-02</internalNodes>\n          <leafValues>\n            -1.0768359899520874e-01 6.4716261625289917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 -2.1900620311498642e-02</internalNodes>\n          <leafValues>\n            -6.0776418447494507e-01 6.4449213445186615e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 2.1267218980938196e-03</internalNodes>\n          <leafValues>\n            -2.3115469515323639e-01 2.1813300251960754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 -3.1501919031143188e-02</internalNodes>\n          <leafValues>\n            -1.3678109645843506e-01 6.6003270447254181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 1.8107969313859940e-02</internalNodes>\n          <leafValues>\n            1.0865720361471176e-01 -4.4673460721969604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 -1.1059570312500000e-01</internalNodes>\n          <leafValues>\n            4.6954178810119629e-01 -1.1268380284309387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 2.2349569480866194e-03</internalNodes>\n          <leafValues>\n            -2.9884970188140869e-01 1.8147529661655426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 4.6504188328981400e-02</internalNodes>\n          <leafValues>\n            1.2846769392490387e-01 -2.6609849929809570e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>27</maxWeakCount>\n      <stageThreshold>-1.1861419677734375e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 155 -4.8820599913597107e-02</internalNodes>\n          <leafValues>\n            4.2807990312576294e-01 -5.5154949426651001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 1.4779040357097983e-03</internalNodes>\n          <leafValues>\n            -1.8688060343265533e-01 1.9038289785385132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -1.0012290440499783e-02</internalNodes>\n          <leafValues>\n            3.8451421260833740e-01 -2.1723049879074097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 -5.1000278443098068e-02</internalNodes>\n          <leafValues>\n            -7.6136952638626099e-01 1.3625900261104107e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 5.2959132008254528e-03</internalNodes>\n          <leafValues>\n            -2.3021429777145386e-01 2.8536239266395569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 -4.8654139041900635e-02</internalNodes>\n          <leafValues>\n            7.0992070436477661e-01 -4.9203149974346161e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 8.8448636233806610e-03</internalNodes>\n          <leafValues>\n            -3.1505361199378967e-01 2.0899020135402679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 1.0062800347805023e-01</internalNodes>\n          <leafValues>\n            6.6908989101648331e-03 6.7013871669769287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 -7.0256260223686695e-03</internalNodes>\n          <leafValues>\n            -3.9408329129219055e-01 1.7433549463748932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 -2.1224319934844971e-03</internalNodes>\n          <leafValues>\n            1.6996310651302338e-01 -3.0237409472465515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 9.9532064050436020e-03</internalNodes>\n          <leafValues>\n            -1.4202840626239777e-01 4.5167461037635803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 1.2565069831907749e-02</internalNodes>\n          <leafValues>\n            7.3175877332687378e-02 -6.1700421571731567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 -1.7854310572147369e-03</internalNodes>\n          <leafValues>\n            1.4909860491752625e-01 -3.2865241169929504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 -4.0306518785655499e-03</internalNodes>\n          <leafValues>\n            -4.5713710784912109e-01 1.0815720260143280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 -7.3099560104310513e-03</internalNodes>\n          <leafValues>\n            -6.5592771768569946e-01 6.5615788102149963e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 -3.3843431621789932e-02</internalNodes>\n          <leafValues>\n            5.0412368774414062e-01 -6.1626069247722626e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 3.8319290615618229e-04</internalNodes>\n          <leafValues>\n            -2.5153478980064392e-01 2.0271340012550354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 -2.6169361080974340e-03</internalNodes>\n          <leafValues>\n            2.2497959434986115e-01 -2.1958619356155396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 -4.5606079511344433e-03</internalNodes>\n          <leafValues>\n            -4.6598041057586670e-01 1.2348009645938873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 1.0822789743542671e-02</internalNodes>\n          <leafValues>\n            -9.6618972718715668e-02 4.6412429213523865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 -5.3171347826719284e-03</internalNodes>\n          <leafValues>\n            -5.5634248256683350e-01 9.4623282551765442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 -9.3140971148386598e-04</internalNodes>\n          <leafValues>\n            1.0143929719924927e-01 -1.0564240068197250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 8.4296840941533446e-04</internalNodes>\n          <leafValues>\n            -1.3243100047111511e-01 3.5351079702377319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 -2.7806960046291351e-02</internalNodes>\n          <leafValues>\n            -6.5050601959228516e-01 3.3153589814901352e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 6.9245469057932496e-04</internalNodes>\n          <leafValues>\n            -2.6702880859375000e-01 2.1129630506038666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 -1.2787230312824249e-02</internalNodes>\n          <leafValues>\n            2.1593640744686127e-01 -8.6767077445983887e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 -6.1678601196035743e-04</internalNodes>\n          <leafValues>\n            1.6959980130195618e-01 -2.9248940944671631e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>21</maxWeakCount>\n      <stageThreshold>-1.0550270080566406e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 182 -5.1706928759813309e-02</internalNodes>\n          <leafValues>\n            4.6942698955535889e-01 -5.1280671358108521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 5.5232150480151176e-03</internalNodes>\n          <leafValues>\n            -2.4982389807701111e-01 6.3005810976028442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 -9.2110745608806610e-03</internalNodes>\n          <leafValues>\n            3.7530669569969177e-01 -2.2910380363464355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 4.1729960590600967e-02</internalNodes>\n          <leafValues>\n            -1.1262010037899017e-01 6.7508697509765625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 4.5255841687321663e-03</internalNodes>\n          <leafValues>\n            -2.6939728856086731e-01 2.4889509379863739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 -8.5208792006596923e-04</internalNodes>\n          <leafValues>\n            2.0098550617694855e-01 -2.3001730442047119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -3.4569639246910810e-03</internalNodes>\n          <leafValues>\n            -3.6372348666191101e-01 2.7142500877380371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 -8.8200360536575317e-02</internalNodes>\n          <leafValues>\n            -7.5951957702636719e-01 -7.2166309691965580e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 -2.3253160179592669e-04</internalNodes>\n          <leafValues>\n            1.4738219976425171e-01 -4.2548701167106628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 1.9258400425314903e-02</internalNodes>\n          <leafValues>\n            -8.4830872714519501e-02 5.9487771987915039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 -3.1915740109980106e-03</internalNodes>\n          <leafValues>\n            -4.2638280987739563e-01 1.3357159495353699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 -2.2229040041565895e-02</internalNodes>\n          <leafValues>\n            -4.2298269271850586e-01 3.6127958446741104e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 -5.3123440593481064e-03</internalNodes>\n          <leafValues>\n            2.9349780082702637e-01 -2.2197869420051575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 5.6796981953084469e-03</internalNodes>\n          <leafValues>\n            8.0412790179252625e-02 -1.9725289940834045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 3.2511178869754076e-03</internalNodes>\n          <leafValues>\n            -1.6628390550613403e-01 3.3107280731201172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 2.5559039786458015e-03</internalNodes>\n          <leafValues>\n            6.7350171506404877e-02 -2.4642370641231537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 3.1239999458193779e-02</internalNodes>\n          <leafValues>\n            -6.7393511533737183e-02 8.2851767539978027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 -4.4333371333777905e-03</internalNodes>\n          <leafValues>\n            -3.8048321008682251e-01 1.4248619973659515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 -3.9497618563473225e-03</internalNodes>\n          <leafValues>\n            -3.5660448670387268e-01 1.8685440719127655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 -1.4043290168046951e-02</internalNodes>\n          <leafValues>\n            5.3222888708114624e-01 -7.8980803489685059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 4.2212791740894318e-03</internalNodes>\n          <leafValues>\n            -1.9841830432415009e-01 3.1367298960685730e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>43</maxWeakCount>\n      <stageThreshold>-1.1214250326156616e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 203 -1.5278789401054382e-01</internalNodes>\n          <leafValues>\n            5.4140037298202515e-01 -1.8756979703903198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 -7.0655636489391327e-02</internalNodes>\n          <leafValues>\n            3.4003350138664246e-01 -1.4459669589996338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 -2.1033229306340218e-02</internalNodes>\n          <leafValues>\n            -5.5878472328186035e-01 1.1598149687051773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 -9.5666358247399330e-03</internalNodes>\n          <leafValues>\n            1.0890080034732819e-01 -2.0365689694881439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 -4.2720541357994080e-02</internalNodes>\n          <leafValues>\n            -9.4030022621154785e-01 6.3606321811676025e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 -4.5477859675884247e-03</internalNodes>\n          <leafValues>\n            3.4227019548416138e-01 -1.7053720355033875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 3.7029080558568239e-03</internalNodes>\n          <leafValues>\n            8.3720892667770386e-02 -4.6139541268348694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -1.1458870023488998e-01</internalNodes>\n          <leafValues>\n            6.0027849674224854e-01 -1.7764480784535408e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 5.7319342158734798e-03</internalNodes>\n          <leafValues>\n            -2.5590109825134277e-01 2.0062319934368134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 -7.0237793028354645e-02</internalNodes>\n          <leafValues>\n            2.5359788537025452e-01 -2.9503619298338890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 1.3983179815113544e-02</internalNodes>\n          <leafValues>\n            1.1456400156021118e-01 -3.9683538675308228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 1.8175759911537170e-01</internalNodes>\n          <leafValues>\n            5.0749950110912323e-02 -8.3061927556991577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 3.0185490846633911e-02</internalNodes>\n          <leafValues>\n            -2.6683610677719116e-01 1.4070799946784973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 7.5633287429809570e-01</internalNodes>\n          <leafValues>\n            -4.1416618973016739e-02 9.0957278013229370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 -8.5228988900780678e-03</internalNodes>\n          <leafValues>\n            1.6142499446868896e-01 -2.7549099922180176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 -4.9996669404208660e-03</internalNodes>\n          <leafValues>\n            -1.1666730046272278e-01 6.0298819094896317e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 -5.9932802105322480e-04</internalNodes>\n          <leafValues>\n            1.3015550374984741e-01 -3.1072840094566345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 -9.6063673496246338e-02</internalNodes>\n          <leafValues>\n            -8.5259348154067993e-01 1.5970790758728981e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 -7.0154820568859577e-03</internalNodes>\n          <leafValues>\n            -4.5490509271621704e-01 7.7178090810775757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 -8.7620541453361511e-03</internalNodes>\n          <leafValues>\n            4.8034501075744629e-01 -8.1306837499141693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 -3.9868508465588093e-03</internalNodes>\n          <leafValues>\n            2.2495600581169128e-01 -2.0447289943695068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 -5.7335309684276581e-02</internalNodes>\n          <leafValues>\n            -5.6859737634658813e-01 5.2798101678490639e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 1.9260890549048781e-03</internalNodes>\n          <leafValues>\n            1.4920340478420258e-01 -3.1059908866882324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 2.1118070930242538e-02</internalNodes>\n          <leafValues>\n            4.1174301877617836e-03 -5.2401381731033325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 -1.1973599903285503e-03</internalNodes>\n          <leafValues>\n            2.3353399336338043e-01 -2.0193660259246826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 4.5973812229931355e-03</internalNodes>\n          <leafValues>\n            5.9917010366916656e-02 -1.1878310143947601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 2.8869660571217537e-02</internalNodes>\n          <leafValues>\n            -9.4110779464244843e-02 4.5966941118240356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 -3.7549799308180809e-03</internalNodes>\n          <leafValues>\n            1.2161179631948471e-01 -1.4811019599437714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 4.2033549398183823e-03</internalNodes>\n          <leafValues>\n            1.0903070122003555e-01 -3.8700520992279053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 7.2994068264961243e-02</internalNodes>\n          <leafValues>\n            -3.4046798944473267e-02 3.0610039830207825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 1.6667179763317108e-02</internalNodes>\n          <leafValues>\n            1.3168589770793915e-01 -3.8485860824584961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 -2.8268690221011639e-03</internalNodes>\n          <leafValues>\n            6.4782157540321350e-02 -2.2371709346771240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 3.7736070808023214e-03</internalNodes>\n          <leafValues>\n            -1.5592969954013824e-01 2.5413069128990173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -3.6936940159648657e-03</internalNodes>\n          <leafValues>\n            2.5576528906822205e-01 -1.5768060088157654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 -6.6801063716411591e-02</internalNodes>\n          <leafValues>\n            -7.4346089363098145e-01 5.4915640503168106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 1.5752790495753288e-02</internalNodes>\n          <leafValues>\n            -9.8638102412223816e-02 4.3119820952415466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 9.0647127944976091e-04</internalNodes>\n          <leafValues>\n            1.1339239776134491e-01 -4.1574460268020630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 -2.1695699542760849e-02</internalNodes>\n          <leafValues>\n            4.6949240565299988e-01 -5.5732611566781998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -1.4639029977843165e-03</internalNodes>\n          <leafValues>\n            -3.0617880821228027e-01 1.4398169517517090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 -1.7810560762882233e-02</internalNodes>\n          <leafValues>\n            3.0411729216575623e-01 -4.6758800745010376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 -5.6027648970484734e-03</internalNodes>\n          <leafValues>\n            -5.2942901849746704e-01 7.8287117183208466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 1.9500569906085730e-03</internalNodes>\n          <leafValues>\n            -9.5949448645114899e-02 1.9031670689582825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 1.0641569644212723e-01</internalNodes>\n          <leafValues>\n            4.7288440167903900e-02 -8.6525350809097290e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>21</maxWeakCount>\n      <stageThreshold>-1.1566660404205322e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 246 1.8256990239024162e-02</internalNodes>\n          <leafValues>\n            -5.5564939975738525e-01 4.3546560406684875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 -1.1249440163373947e-01</internalNodes>\n          <leafValues>\n            6.1800277233123779e-01 -2.1641810238361359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 2.0443440880626440e-03</internalNodes>\n          <leafValues>\n            -3.1379559636116028e-01 2.6424890756607056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 6.2505697133019567e-04</internalNodes>\n          <leafValues>\n            -2.3659600317478180e-01 2.1169990301132202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 1.3297300320118666e-03</internalNodes>\n          <leafValues>\n            -3.1339448690414429e-01 3.0449068546295166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 -4.6840369701385498e-02</internalNodes>\n          <leafValues>\n            5.3759092092514038e-01 -1.8081139773130417e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 -6.4874291419982910e-01</internalNodes>\n          <leafValues>\n            6.6768437623977661e-01 -9.1247849166393280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 9.6183530986309052e-03</internalNodes>\n          <leafValues>\n            1.4733779430389404e-01 -3.2193028926849365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 2.2117879707366228e-03</internalNodes>\n          <leafValues>\n            1.5755419433116913e-01 -3.6799180507659912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 4.9280291423201561e-03</internalNodes>\n          <leafValues>\n            -8.3405740559101105e-02 6.8260177969932556e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 1.3977079652249813e-02</internalNodes>\n          <leafValues>\n            -1.0702060163021088e-01 4.8326531052589417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 -1.0333389946026728e-04</internalNodes>\n          <leafValues>\n            1.3645449280738831e-01 -3.1777021288871765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 -2.2287340834736824e-03</internalNodes>\n          <leafValues>\n            2.1791179478168488e-01 -1.9923299551010132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 -3.2301511615514755e-02</internalNodes>\n          <leafValues>\n            3.3135131001472473e-01 -2.0617039874196053e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 2.3240039125084877e-02</internalNodes>\n          <leafValues>\n            5.9672571718692780e-02 -6.4993959665298462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 3.5599120892584324e-03</internalNodes>\n          <leafValues>\n            -1.4818920195102692e-01 2.9893338680267334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 1.5469759702682495e-02</internalNodes>\n          <leafValues>\n            -7.5569599866867065e-02 5.2314680814743042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 -1.6372289974242449e-04</internalNodes>\n          <leafValues>\n            1.0446730256080627e-01 -2.0943340659141541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 -2.9369019903242588e-03</internalNodes>\n          <leafValues>\n            -4.3197739124298096e-01 1.0765810310840607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 -7.8579207183793187e-04</internalNodes>\n          <leafValues>\n            -2.4614779651165009e-01 2.1554739773273468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 1.1156699620187283e-02</internalNodes>\n          <leafValues>\n            -8.1820882856845856e-02 6.7338067293167114e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>49</maxWeakCount>\n      <stageThreshold>-1.0953630208969116e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 267 -1.8473519384860992e-01</internalNodes>\n          <leafValues>\n            5.4758828878402710e-01 -2.2319069504737854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 -2.8615030460059643e-03</internalNodes>\n          <leafValues>\n            1.9264279305934906e-01 -2.2989100217819214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 1.7970189452171326e-01</internalNodes>\n          <leafValues>\n            -6.4573682844638824e-02 8.0322009325027466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 -5.2812729030847549e-02</internalNodes>\n          <leafValues>\n            2.8784981369972229e-01 -8.8289387524127960e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 6.9000339135527611e-03</internalNodes>\n          <leafValues>\n            1.0979209840297699e-01 -4.8886889219284058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 4.0469530969858170e-02</internalNodes>\n          <leafValues>\n            6.1697468161582947e-02 -7.2907817363739014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 4.5191249810159206e-03</internalNodes>\n          <leafValues>\n            -2.7972379326820374e-01 1.7065159976482391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 -3.8400939665734768e-03</internalNodes>\n          <leafValues>\n            -2.8329300880432129e-01 1.1611709743738174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 -7.1505218511447310e-04</internalNodes>\n          <leafValues>\n            1.5870480239391327e-01 -2.8253421187400818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 3.0127899721264839e-02</internalNodes>\n          <leafValues>\n            -3.6236338317394257e-02 5.3369390964508057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 -1.9907640293240547e-02</internalNodes>\n          <leafValues>\n            -3.2229989767074585e-01 1.4933170378208160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 -3.1435668468475342e-02</internalNodes>\n          <leafValues>\n            2.0812889933586121e-01 -9.6762210130691528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 -1.9912680611014366e-02</internalNodes>\n          <leafValues>\n            -3.2928928732872009e-01 1.2732729315757751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 4.0626749396324158e-02</internalNodes>\n          <leafValues>\n            1.6985720023512840e-02 -5.2226179838180542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 1.6589110018685460e-03</internalNodes>\n          <leafValues>\n            -2.3795670270919800e-01 2.0775599777698517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 1.9869199022650719e-03</internalNodes>\n          <leafValues>\n            -1.3493759930133820e-01 1.2050859630107880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 -4.1985820978879929e-02</internalNodes>\n          <leafValues>\n            4.4601130485534668e-01 -7.6145969331264496e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 7.0260182023048401e-02</internalNodes>\n          <leafValues>\n            1.5833569690585136e-02 -3.8182300329208374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 -1.7992800101637840e-02</internalNodes>\n          <leafValues>\n            -3.6973980069160461e-01 1.0451599955558777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 -1.0420969873666763e-01</internalNodes>\n          <leafValues>\n            5.1836878061294556e-01 -2.2372400388121605e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 5.3277369588613510e-02</internalNodes>\n          <leafValues>\n            7.4715927243232727e-02 -5.8489412069320679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 9.6819162368774414e-02</internalNodes>\n          <leafValues>\n            -7.8130746260285378e-03 -9.0531897544860840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -2.2317610681056976e-01</internalNodes>\n          <leafValues>\n            4.7848999500274658e-01 -8.9570246636867523e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 1.3523760251700878e-02</internalNodes>\n          <leafValues>\n            6.5158583223819733e-02 -1.4030559360980988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 -7.1465343236923218e-02</internalNodes>\n          <leafValues>\n            -8.8997572660446167e-01 3.8111008703708649e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 2.4734560400247574e-02</internalNodes>\n          <leafValues>\n            -3.2858259975910187e-02 3.5368600487709045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 -4.2641810141503811e-03</internalNodes>\n          <leafValues>\n            1.2885729968547821e-01 -2.7788180112838745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 4.3246541172266006e-02</internalNodes>\n          <leafValues>\n            -2.6344619691371918e-02 3.3333760499954224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 5.2720978856086731e-03</internalNodes>\n          <leafValues>\n            9.6122108399868011e-02 -3.8203689455986023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 -6.4102048054337502e-03</internalNodes>\n          <leafValues>\n            1.6924449801445007e-01 -7.5236052274703979e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 1.7747100442647934e-02</internalNodes>\n          <leafValues>\n            -6.5126739442348480e-02 5.3720867633819580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 1.6466729342937469e-01</internalNodes>\n          <leafValues>\n            2.6764029636979103e-02 -6.9506132602691650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 -7.6354909688234329e-03</internalNodes>\n          <leafValues>\n            1.7261630296707153e-01 -2.0242890715599060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -7.6648168265819550e-02</internalNodes>\n          <leafValues>\n            2.2567149996757507e-01 -3.5044141113758087e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 2.9634330421686172e-03</internalNodes>\n          <leafValues>\n            1.0679820179939270e-01 -3.0704519152641296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 -1.8968040123581886e-02</internalNodes>\n          <leafValues>\n            -6.5349531173706055e-01 4.5328449457883835e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 6.2272930145263672e-01</internalNodes>\n          <leafValues>\n            2.9418470337986946e-02 -7.7416032552719116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 3.1170540023595095e-03</internalNodes>\n          <leafValues>\n            -1.9263580441474915e-01 1.0082499682903290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 -1.0179740190505981e-01</internalNodes>\n          <leafValues>\n            5.0667291879653931e-01 -7.5845532119274139e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 -8.7539367377758026e-02</internalNodes>\n          <leafValues>\n            -8.0127829313278198e-01 3.9741981774568558e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 -4.0089199319481850e-03</internalNodes>\n          <leafValues>\n            1.5867359936237335e-01 -2.0390710234642029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 -1.7252740263938904e-01</internalNodes>\n          <leafValues>\n            -4.8556509613990784e-01 6.6162437200546265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 2.2747491020709276e-03</internalNodes>\n          <leafValues>\n            1.0839290171861649e-01 -2.6120510697364807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 8.7025731801986694e-02</internalNodes>\n          <leafValues>\n            -4.5612849295139313e-02 3.0642318725585938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 3.3302091062068939e-02</internalNodes>\n          <leafValues>\n            9.8511956632137299e-02 -4.0321010351181030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 -5.5495370179414749e-03</internalNodes>\n          <leafValues>\n            6.7809469997882843e-02 -1.9448509812355042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 -7.5916801579296589e-03</internalNodes>\n          <leafValues>\n            -3.3229979872703552e-01 1.0552299767732620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -5.4776940494775772e-02</internalNodes>\n          <leafValues>\n            3.1344750523567200e-01 -9.2561431229114532e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 1.7293309792876244e-02</internalNodes>\n          <leafValues>\n            -1.0366520285606384e-01 4.5732820034027100e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>40</maxWeakCount>\n      <stageThreshold>-1.0216970443725586e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 316 -2.2501630708575249e-02</internalNodes>\n          <leafValues>\n            5.2293592691421509e-01 -1.7968380451202393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 -1.8166720867156982e-02</internalNodes>\n          <leafValues>\n            1.4281089603900909e-01 -3.0268448591232300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 3.1680259853601456e-02</internalNodes>\n          <leafValues>\n            1.5708820521831512e-01 -3.2303369045257568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 -2.3476250469684601e-02</internalNodes>\n          <leafValues>\n            -4.5576000213623047e-01 1.0300090163946152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 4.5688278973102570e-02</internalNodes>\n          <leafValues>\n            6.7873537540435791e-02 -7.4623328447341919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 -7.4609883129596710e-02</internalNodes>\n          <leafValues>\n            2.0548540353775024e-01 -1.0097859799861908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 -4.5903101563453674e-02</internalNodes>\n          <leafValues>\n            6.6662758588790894e-01 -6.9071657955646515e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 -5.7763070799410343e-04</internalNodes>\n          <leafValues>\n            1.1386449635028839e-01 -1.2278319895267487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 -4.1800830513238907e-04</internalNodes>\n          <leafValues>\n            1.9999989867210388e-01 -2.2372670471668243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 2.4581039324402809e-03</internalNodes>\n          <leafValues>\n            1.0073749721050262e-01 -3.6323159933090210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 6.7467048764228821e-02</internalNodes>\n          <leafValues>\n            5.4200690239667892e-02 -6.0347068309783936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 -3.8971859961748123e-02</internalNodes>\n          <leafValues>\n            4.0277591347694397e-01 -1.1299470067024231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 1.6628159582614899e-01</internalNodes>\n          <leafValues>\n            4.8290308564901352e-02 -8.1269222497940063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 5.5140322074294090e-03</internalNodes>\n          <leafValues>\n            6.0484610497951508e-02 -5.4575890302658081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 1.2837080284953117e-03</internalNodes>\n          <leafValues>\n            -2.8150710463523865e-01 1.2785549461841583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 3.3840160816907883e-02</internalNodes>\n          <leafValues>\n            -6.1925090849399567e-02 5.4461580514907837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 1.4224560000002384e-02</internalNodes>\n          <leafValues>\n            -8.3702072501182556e-02 5.5404889583587646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 -1.4315280714072287e-04</internalNodes>\n          <leafValues>\n            1.5318620204925537e-01 -2.8312870860099792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 -1.3604390434920788e-02</internalNodes>\n          <leafValues>\n            -6.3229328393936157e-01 5.6792028248310089e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 -1.7952319979667664e-01</internalNodes>\n          <leafValues>\n            -7.7471101284027100e-01 -1.2696949997916818e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 -6.3834888860583305e-03</internalNodes>\n          <leafValues>\n            1.2864939868450165e-01 -3.1159159541130066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 -1.8140509724617004e-01</internalNodes>\n          <leafValues>\n            -7.0704931020736694e-01 3.0992519110441208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 3.4940429031848907e-03</internalNodes>\n          <leafValues>\n            1.0192289948463440e-01 -3.3393231034278870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 4.0861740708351135e-02</internalNodes>\n          <leafValues>\n            3.1267888844013214e-02 -4.3739050626754761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 3.6993999034166336e-02</internalNodes>\n          <leafValues>\n            -6.2453608959913254e-02 5.7605278491973877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 -7.7690118923783302e-03</internalNodes>\n          <leafValues>\n            -6.0737371444702148e-01 6.9758452475070953e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 7.1885702200233936e-03</internalNodes>\n          <leafValues>\n            -1.4034010469913483e-01 2.4509570002555847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 -3.0558679252862930e-02</internalNodes>\n          <leafValues>\n            -2.6109099388122559e-01 2.0893760025501251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 -1.3949500396847725e-02</internalNodes>\n          <leafValues>\n            -4.5984518527984619e-01 7.2996988892555237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 -1.7439149320125580e-01</internalNodes>\n          <leafValues>\n            2.7917501330375671e-01 -7.0309691131114960e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 -5.6514460593461990e-03</internalNodes>\n          <leafValues>\n            -5.8335387706756592e-01 4.8543170094490051e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 -5.6718150153756142e-03</internalNodes>\n          <leafValues>\n            -2.0645590126514435e-01 5.9949990361928940e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 -2.9772339985356666e-05</internalNodes>\n          <leafValues>\n            1.6627080738544464e-01 -1.8144470453262329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 -6.2705092132091522e-03</internalNodes>\n          <leafValues>\n            2.5829210877418518e-01 -1.3548080623149872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 -5.2028051577508450e-03</internalNodes>\n          <leafValues>\n            -2.9585519433021545e-01 1.0223600268363953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 -3.6721840500831604e-02</internalNodes>\n          <leafValues>\n            1.1443459987640381e-01 -1.5670689940452576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 7.8717432916164398e-02</internalNodes>\n          <leafValues>\n            2.9407389461994171e-02 -8.9653927087783813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 9.0856212377548218e-01</internalNodes>\n          <leafValues>\n            -5.6400269269943237e-02 6.9543528556823730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 -5.2952598780393600e-03</internalNodes>\n          <leafValues>\n            1.8282440304756165e-01 -2.0518480241298676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 -5.2672341465950012e-02</internalNodes>\n          <leafValues>\n            -6.8133538961410522e-01 3.6046069115400314e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>51</maxWeakCount>\n      <stageThreshold>-1.0450960397720337e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 356 -2.1731309592723846e-01</internalNodes>\n          <leafValues>\n            5.9716808795928955e-01 -2.2432699799537659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 -3.4627959132194519e-01</internalNodes>\n          <leafValues>\n            5.3741937875747681e-01 -8.7782189249992371e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 1.0713579831644893e-03</internalNodes>\n          <leafValues>\n            -3.5920229554176331e-01 1.5685929358005524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 -6.1267141252756119e-02</internalNodes>\n          <leafValues>\n            -7.1003252267837524e-01 2.0527899265289307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 3.1281840056180954e-02</internalNodes>\n          <leafValues>\n            -7.4646763503551483e-02 5.9689122438430786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 -1.2337400112301111e-03</internalNodes>\n          <leafValues>\n            1.5949830412864685e-01 -2.7181199193000793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 -3.4508139360696077e-03</internalNodes>\n          <leafValues>\n            2.0255160331726074e-01 -1.9399139285087585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 -7.0481761358678341e-03</internalNodes>\n          <leafValues>\n            -5.5100089311599731e-01 7.0738323032855988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 2.2950200736522675e-01</internalNodes>\n          <leafValues>\n            -8.7573416531085968e-02 6.0446268320083618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 -2.2578560747206211e-03</internalNodes>\n          <leafValues>\n            -8.5306502878665924e-02 1.0997729748487473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 -9.7562908194959164e-04</internalNodes>\n          <leafValues>\n            9.7412303090095520e-02 -3.6251759529113770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 5.3088109940290451e-02</internalNodes>\n          <leafValues>\n            -3.5328660160303116e-03 -6.0694789886474609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 1.5448880149051547e-03</internalNodes>\n          <leafValues>\n            -2.2419139742851257e-01 1.7832720279693604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 1.2375700287520885e-02</internalNodes>\n          <leafValues>\n            -3.5778950899839401e-02 2.9557931423187256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 5.9611927717924118e-03</internalNodes>\n          <leafValues>\n            -7.3603026568889618e-02 4.8699569702148438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 8.3732418715953827e-03</internalNodes>\n          <leafValues>\n            9.5786556601524353e-02 -3.9222580194473267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 -7.9954452812671661e-03</internalNodes>\n          <leafValues>\n            -2.9597011208534241e-01 1.3246519863605499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 1.7624149098992348e-02</internalNodes>\n          <leafValues>\n            1.1629760265350342e-02 -3.7594190239906311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 -8.1538967788219452e-04</internalNodes>\n          <leafValues>\n            1.8403179943561554e-01 -2.1106949448585510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 6.5910838544368744e-02</internalNodes>\n          <leafValues>\n            3.8050938397645950e-02 -8.7356221675872803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 -8.1749828532338142e-03</internalNodes>\n          <leafValues>\n            -3.0115619301795959e-01 8.1345446407794952e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -3.8275010883808136e-02</internalNodes>\n          <leafValues>\n            3.8238960504531860e-01 -5.5969979614019394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 3.2501420937478542e-03</internalNodes>\n          <leafValues>\n            -2.1520890295505524e-01 1.3417840003967285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 5.6356219574809074e-03</internalNodes>\n          <leafValues>\n            -9.1598346829414368e-02 2.6930230855941772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 -5.1177428103983402e-03</internalNodes>\n          <leafValues>\n            -3.0092298984527588e-01 1.0440470278263092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 -6.0195129364728928e-02</internalNodes>\n          <leafValues>\n            1.8512830138206482e-01 -6.3004150986671448e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 4.6473558992147446e-02</internalNodes>\n          <leafValues>\n            3.7559378892183304e-02 -8.1117790937423706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 2.2262150887399912e-03</internalNodes>\n          <leafValues>\n            -1.2262800335884094e-01 8.3288192749023438e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 1.6670780256390572e-02</internalNodes>\n          <leafValues>\n            -5.2774429321289062e-02 5.4887998104095459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 -6.3093528151512146e-02</internalNodes>\n          <leafValues>\n            -7.4702072143554688e-01 2.7049509808421135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 -7.7139958739280701e-04</internalNodes>\n          <leafValues>\n            9.2177063226699829e-02 -2.9994431138038635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 -8.9107893407344818e-02</internalNodes>\n          <leafValues>\n            -3.8937440514564514e-01 2.9831759631633759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 -1.7469590238761157e-04</internalNodes>\n          <leafValues>\n            1.6117650270462036e-01 -2.0639100670814514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 -2.1986931096762419e-03</internalNodes>\n          <leafValues>\n            1.4286069571971893e-01 -1.2366549670696259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 2.1864708978682756e-03</internalNodes>\n          <leafValues>\n            -1.7435190081596375e-01 1.6586010158061981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 1.2738450430333614e-02</internalNodes>\n          <leafValues>\n            4.8340078443288803e-02 -8.1297926604747772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 -1.2383400462567806e-02</internalNodes>\n          <leafValues>\n            -3.7464460730552673e-01 8.1205978989601135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 -1.2094350159168243e-01</internalNodes>\n          <leafValues>\n            -9.1908979415893555e-01 1.7007840797305107e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 4.8902980983257294e-02</internalNodes>\n          <leafValues>\n            -7.0619069039821625e-02 5.1363438367843628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 -1.9585320260375738e-03</internalNodes>\n          <leafValues>\n            9.9808372557163239e-02 -1.0681519657373428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 -2.9645320773124695e-01</internalNodes>\n          <leafValues>\n            -9.1213762760162354e-01 3.2292358577251434e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 1.0741979628801346e-01</internalNodes>\n          <leafValues>\n            -2.3814958985894918e-03 -7.1836417913436890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 -4.2040441185235977e-02</internalNodes>\n          <leafValues>\n            3.0848339200019836e-01 -9.9647372961044312e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 6.8270778283476830e-03</internalNodes>\n          <leafValues>\n            8.3302132785320282e-02 -3.6433839797973633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 -1.1072089895606041e-02</internalNodes>\n          <leafValues>\n            -2.5886499881744385e-01 1.2579409778118134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 -1.6399029642343521e-02</internalNodes>\n          <leafValues>\n            3.0191990733146667e-01 -4.9352090805768967e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 -2.0852450688835233e-04</internalNodes>\n          <leafValues>\n            1.2508730590343475e-01 -2.1993610262870789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 -3.0174860730767250e-02</internalNodes>\n          <leafValues>\n            -6.5353047847747803e-01 1.0185699909925461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 -3.9148568175733089e-03</internalNodes>\n          <leafValues>\n            -2.0781719684600830e-01 1.2460950016975403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 -2.7260989882051945e-03</internalNodes>\n          <leafValues>\n            1.2443950027227402e-01 -1.5540640056133270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 1.7432900145649910e-02</internalNodes>\n          <leafValues>\n            -5.9761889278888702e-02 4.9430638551712036e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>45</maxWeakCount>\n      <stageThreshold>-9.2809242010116577e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 407 -2.1454410254955292e-01</internalNodes>\n          <leafValues>\n            5.1646298170089722e-01 -2.2012180089950562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 1.3796210289001465e-02</internalNodes>\n          <leafValues>\n            5.0541419535875320e-02 -2.3305070400238037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 9.6883601509034634e-04</internalNodes>\n          <leafValues>\n            -2.4793210625648499e-01 2.0536769926548004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 -6.6670728847384453e-03</internalNodes>\n          <leafValues>\n            -2.2546489536762238e-01 6.4493361860513687e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 2.1733778994530439e-03</internalNodes>\n          <leafValues>\n            -2.1164029836654663e-01 2.1819859743118286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 -1.2321940157562494e-03</internalNodes>\n          <leafValues>\n            6.7792296409606934e-02 -1.1661940068006516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 -5.9950752183794975e-03</internalNodes>\n          <leafValues>\n            -4.2384910583496094e-01 1.3204540312290192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 2.6942830532789230e-02</internalNodes>\n          <leafValues>\n            -1.0161910206079483e-01 4.8092079162597656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 6.6907003521919250e-02</internalNodes>\n          <leafValues>\n            -8.4552347660064697e-02 4.9274548888206482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 -1.6729519702494144e-03</internalNodes>\n          <leafValues>\n            9.2197872698307037e-02 -2.2954310476779938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 1.3808730058372021e-02</internalNodes>\n          <leafValues>\n            -6.0905098915100098e-02 5.8490061759948730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 -2.3627160117030144e-02</internalNodes>\n          <leafValues>\n            -8.8347977399826050e-01 9.7397705540060997e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 -1.3927640393376350e-02</internalNodes>\n          <leafValues>\n            -6.5309441089630127e-01 5.2886508405208588e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 3.6122989840805531e-03</internalNodes>\n          <leafValues>\n            -2.6369398832321167e-01 1.0595279932022095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 -5.2949450910091400e-02</internalNodes>\n          <leafValues>\n            -7.3409342765808105e-01 4.7014039009809494e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 1.7414819449186325e-02</internalNodes>\n          <leafValues>\n            1.7683740705251694e-02 -5.8782297372817993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 -3.2427799305878580e-04</internalNodes>\n          <leafValues>\n            1.3886380195617676e-01 -3.0609750747680664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 -4.3613791465759277e-02</internalNodes>\n          <leafValues>\n            5.4857110977172852e-01 -6.7348852753639221e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 -9.3427510000765324e-04</internalNodes>\n          <leafValues>\n            1.8392640352249146e-01 -1.7492470145225525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 7.9606421291828156e-02</internalNodes>\n          <leafValues>\n            4.5652151107788086e-02 -6.3910657167434692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 -2.5120750069618225e-02</internalNodes>\n          <leafValues>\n            1.0046990215778351e-01 -2.7824568748474121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 3.2976910471916199e-02</internalNodes>\n          <leafValues>\n            -5.9311199933290482e-02 6.5328377485275269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 -3.7845480255782604e-03</internalNodes>\n          <leafValues>\n            -2.4190320074558258e-01 1.3097280263900757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 9.4495685771107674e-03</internalNodes>\n          <leafValues>\n            -9.3100033700466156e-02 2.3785820603370667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 2.5168890133500099e-03</internalNodes>\n          <leafValues>\n            1.3604310154914856e-01 -2.8159540891647339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 2.6242460589855909e-03</internalNodes>\n          <leafValues>\n            8.9834272861480713e-02 -3.7729039788246155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -4.4626198709011078e-02</internalNodes>\n          <leafValues>\n            3.8320839405059814e-01 -9.6285469830036163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 1.4027470024302602e-04</internalNodes>\n          <leafValues>\n            -1.7261759936809540e-01 1.6574309766292572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 3.9115909487009048e-02</internalNodes>\n          <leafValues>\n            7.8652113676071167e-02 -3.5689839720726013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 -6.6682003438472748e-02</internalNodes>\n          <leafValues>\n            -8.8001507520675659e-01 9.0465601533651352e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 6.3860351219773293e-03</internalNodes>\n          <leafValues>\n            -7.5936213135719299e-02 3.8622769713401794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 4.3549899011850357e-02</internalNodes>\n          <leafValues>\n            -2.5680009275674820e-02 7.4085921049118042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 1.8360930262133479e-03</internalNodes>\n          <leafValues>\n            1.1183869838714600e-01 -3.3362200856208801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 1.6189280431717634e-03</internalNodes>\n          <leafValues>\n            1.8969060853123665e-02 -1.5130129456520081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 2.8807038906961679e-03</internalNodes>\n          <leafValues>\n            9.4285592436790466e-02 -3.1100749969482422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 -3.2489649951457977e-02</internalNodes>\n          <leafValues>\n            -2.1908520162105560e-01 1.1370900273323059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 -3.8253709673881531e-02</internalNodes>\n          <leafValues>\n            3.7908008694648743e-01 -6.8298138678073883e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 -1.8478769809007645e-02</internalNodes>\n          <leafValues>\n            2.9623249173164368e-01 -6.0682911425828934e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 1.5569750219583511e-02</internalNodes>\n          <leafValues>\n            8.5731290280818939e-02 -3.3175340294837952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 -1.7486449796706438e-03</internalNodes>\n          <leafValues>\n            1.2554299831390381e-01 -1.9797539710998535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 9.0995557606220245e-02</internalNodes>\n          <leafValues>\n            -6.7590013146400452e-02 5.2676147222518921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 -6.0815969482064247e-03</internalNodes>\n          <leafValues>\n            2.1883159875869751e-01 -1.5794619917869568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 1.3633850030601025e-02</internalNodes>\n          <leafValues>\n            1.2463530153036118e-01 -2.3396529257297516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -3.2046619057655334e-01</internalNodes>\n          <leafValues>\n            4.5808508992195129e-01 -2.7573259547352791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 -3.6630940157920122e-03</internalNodes>\n          <leafValues>\n            -2.4003350734710693e-01 1.2256260216236115e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>46</maxWeakCount>\n      <stageThreshold>-8.5974782705307007e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 452 -1.5901359915733337e-01</internalNodes>\n          <leafValues>\n            4.3535038828849792e-01 -1.7064349353313446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 -8.1815905869007111e-03</internalNodes>\n          <leafValues>\n            -4.6280708909034729e-01 8.8514603674411774e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -7.1978997766564135e-06</internalNodes>\n          <leafValues>\n            1.6246670484542847e-01 -3.1899040937423706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 1.4128180220723152e-02</internalNodes>\n          <leafValues>\n            4.3259881436824799e-02 -5.9328877925872803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 -9.5496661961078644e-03</internalNodes>\n          <leafValues>\n            -6.3987672328948975e-01 4.6203929930925369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 -2.4156800936907530e-03</internalNodes>\n          <leafValues>\n            2.6009899377822876e-01 -1.7099030315876007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 4.4057718478143215e-03</internalNodes>\n          <leafValues>\n            -2.2679199278354645e-01 1.6393969953060150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 -3.3825438469648361e-02</internalNodes>\n          <leafValues>\n            -7.2834062576293945e-01 5.1699958741664886e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 2.9628010466694832e-02</internalNodes>\n          <leafValues>\n            3.4399930387735367e-02 -6.9400608539581299e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 1.2294690310955048e-01</internalNodes>\n          <leafValues>\n            3.3281920477747917e-03 -7.6602149009704590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 -9.8816171288490295e-02</internalNodes>\n          <leafValues>\n            3.1439980864524841e-01 -1.0131180286407471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 -3.3952430821955204e-03</internalNodes>\n          <leafValues>\n            3.3362209796905518e-02 -1.3168929517269135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 2.4586699903011322e-02</internalNodes>\n          <leafValues>\n            -6.5227553248405457e-02 6.8169701099395752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 7.8804800286889076e-03</internalNodes>\n          <leafValues>\n            1.2926100194454193e-01 -4.3783390522003174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 -9.1016880469396710e-04</internalNodes>\n          <leafValues>\n            1.3692790269851685e-01 -1.9827769696712494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 1.6178259626030922e-02</internalNodes>\n          <leafValues>\n            9.9287502467632294e-02 -3.4090539813041687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 -1.0527680069208145e-01</internalNodes>\n          <leafValues>\n            -9.1738772392272949e-01 3.2674968242645264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 -3.7090498954057693e-02</internalNodes>\n          <leafValues>\n            4.2047971487045288e-01 -7.1002766489982605e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 3.8721140474081039e-02</internalNodes>\n          <leafValues>\n            -7.3284432291984558e-02 4.8204809427261353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 -3.4923329949378967e-03</internalNodes>\n          <leafValues>\n            -2.8713211417198181e-01 1.0397130250930786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 -1.1214460246264935e-02</internalNodes>\n          <leafValues>\n            -5.1632231473922729e-01 5.4384410381317139e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 -2.2951549908611923e-04</internalNodes>\n          <leafValues>\n            -1.6355240345001221e-01 7.7216558158397675e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 2.5744609534740448e-02</internalNodes>\n          <leafValues>\n            -5.7303100824356079e-02 4.9525278806686401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 3.7998620420694351e-02</internalNodes>\n          <leafValues>\n            2.7654580771923065e-02 -4.8470789194107056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 2.3906941059976816e-03</internalNodes>\n          <leafValues>\n            -2.0106680691242218e-01 1.6209079325199127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 -1.2891319394111633e-01</internalNodes>\n          <leafValues>\n            -6.9726997613906860e-01 1.7226759344339371e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 9.4630720559507608e-04</internalNodes>\n          <leafValues>\n            -2.7104228734970093e-01 1.0894539952278137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 3.2807278912514448e-03</internalNodes>\n          <leafValues>\n            -4.1949510574340820e-02 8.2179002463817596e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 5.1204498857259750e-02</internalNodes>\n          <leafValues>\n            4.8180408775806427e-02 -6.6344922780990601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 -4.5751508325338364e-02</internalNodes>\n          <leafValues>\n            1.9350789487361908e-01 -3.7223301827907562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 1.4391579665243626e-02</internalNodes>\n          <leafValues>\n            1.0828830301761627e-01 -2.3524640500545502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 -7.6694227755069733e-03</internalNodes>\n          <leafValues>\n            7.7429883182048798e-02 -4.6658441424369812e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 -4.9375209957361221e-02</internalNodes>\n          <leafValues>\n            3.5604238510131836e-01 -8.1731930375099182e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 4.9358978867530823e-02</internalNodes>\n          <leafValues>\n            5.0106838345527649e-02 -5.9273171424865723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 5.3014289587736130e-02</internalNodes>\n          <leafValues>\n            3.3155430108308792e-02 -7.0783668756484985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 -1.2086739763617516e-02</internalNodes>\n          <leafValues>\n            1.4943680167198181e-01 -1.8973240256309509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 -1.3579580187797546e-01</internalNodes>\n          <leafValues>\n            4.5863440632820129e-01 -7.1998342871665955e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 1.9633909687399864e-03</internalNodes>\n          <leafValues>\n            -1.0420600324869156e-01 1.8465609848499298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 9.3589266762137413e-03</internalNodes>\n          <leafValues>\n            5.3957458585500717e-02 -4.7337940335273743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 4.3361759744584560e-03</internalNodes>\n          <leafValues>\n            -5.7173401117324829e-02 5.0958871841430664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 8.5009206086397171e-03</internalNodes>\n          <leafValues>\n            9.4076819717884064e-02 -2.9265969991683960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 -1.9089920446276665e-02</internalNodes>\n          <leafValues>\n            3.5426521301269531e-01 -5.5876109749078751e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 -1.6061830101534724e-03</internalNodes>\n          <leafValues>\n            1.6634060442447662e-01 -1.5939429402351379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 -7.8830653801560402e-03</internalNodes>\n          <leafValues>\n            -2.6064670085906982e-01 5.5236898362636566e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 -3.2838371116667986e-03</internalNodes>\n          <leafValues>\n            -2.4924349784851074e-01 1.4288279414176941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 1.9204219803214073e-02</internalNodes>\n          <leafValues>\n            -2.6132659986615181e-02 3.2939550280570984e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>55</maxWeakCount>\n      <stageThreshold>-8.6706262826919556e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 498 -1.0141430050134659e-01</internalNodes>\n          <leafValues>\n            4.7197818756103516e-01 -1.8123960494995117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 -7.6708722114562988e-01</internalNodes>\n          <leafValues>\n            4.3214419484138489e-01 -1.0705640166997910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 8.0198869109153748e-03</internalNodes>\n          <leafValues>\n            8.4858916699886322e-02 -5.0163632631301880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 4.2173888534307480e-02</internalNodes>\n          <leafValues>\n            4.3612729758024216e-02 -6.5135252475738525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 4.0101539343595505e-03</internalNodes>\n          <leafValues>\n            -2.4151140451431274e-01 1.7029179632663727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -1.3389269588515162e-03</internalNodes>\n          <leafValues>\n            -1.8421310186386108e-01 9.2217013239860535e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 3.3321550581604242e-03</internalNodes>\n          <leafValues>\n            -1.6709089279174805e-01 1.9239999353885651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 1.5524900518357754e-03</internalNodes>\n          <leafValues>\n            1.1113339662551880e-01 -3.1200349330902100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 2.3809259757399559e-02</internalNodes>\n          <leafValues>\n            -6.4096599817276001e-02 5.6162089109420776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 2.8085429221391678e-02</internalNodes>\n          <leafValues>\n            -2.2390459477901459e-01 1.6832110285758972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 -4.7726151533424854e-03</internalNodes>\n          <leafValues>\n            -4.6150028705596924e-01 4.9433000385761261e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 1.0531850159168243e-01</internalNodes>\n          <leafValues>\n            3.4683290868997574e-02 -6.4283651113510132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 -7.2594000957906246e-03</internalNodes>\n          <leafValues>\n            -4.0418758988380432e-01 6.0901068150997162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 8.7005542591214180e-03</internalNodes>\n          <leafValues>\n            -7.5832478702068329e-02 8.9484892785549164e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 -5.3671520203351974e-02</internalNodes>\n          <leafValues>\n            7.3710972070693970e-01 -4.0993150323629379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 3.4521210938692093e-02</internalNodes>\n          <leafValues>\n            -1.3731540180742741e-02 2.7299648523330688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 -7.2156880050897598e-03</internalNodes>\n          <leafValues>\n            1.2723149359226227e-01 -2.3329609632492065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 1.7666360363364220e-03</internalNodes>\n          <leafValues>\n            5.7977691292762756e-02 -2.0036549866199493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 3.8101759273558855e-03</internalNodes>\n          <leafValues>\n            7.3866911232471466e-02 -3.0780071020126343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 -2.5019630789756775e-02</internalNodes>\n          <leafValues>\n            4.3502670526504517e-01 -4.8294428735971451e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 9.7328815609216690e-03</internalNodes>\n          <leafValues>\n            -8.3063952624797821e-02 3.0008700489997864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 -3.3074519596993923e-03</internalNodes>\n          <leafValues>\n            1.3591299951076508e-01 -2.2476670145988464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 -1.9178609549999237e-01</internalNodes>\n          <leafValues>\n            -8.7936902046203613e-01 2.7915079146623611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 6.0892169130966067e-04</internalNodes>\n          <leafValues>\n            -2.2891379892826080e-01 1.0236170142889023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 -7.7072591520845890e-03</internalNodes>\n          <leafValues>\n            -2.4917750060558319e-01 9.4315156340599060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 -1.0916110128164291e-01</internalNodes>\n          <leafValues>\n            5.5664068460464478e-01 -4.7419041395187378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 -6.3703782856464386e-02</internalNodes>\n          <leafValues>\n            -2.1503069996833801e-01 1.0655879974365234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 -2.6704160496592522e-02</internalNodes>\n          <leafValues>\n            3.3017820119857788e-01 -9.3569032847881317e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 -2.7289129793643951e-03</internalNodes>\n          <leafValues>\n            8.6531341075897217e-02 -2.6623091101646423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 -1.0575050115585327e-01</internalNodes>\n          <leafValues>\n            -1. 5.9039499610662460e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 1.8904829397797585e-02</internalNodes>\n          <leafValues>\n            -6.2077309936285019e-02 4.7796338796615601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 -1.6396720707416534e-01</internalNodes>\n          <leafValues>\n            -1. 1.0493510402739048e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 1.0453710332512856e-02</internalNodes>\n          <leafValues>\n            1.2688960134983063e-01 -2.0351530611515045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 1.3724270462989807e-01</internalNodes>\n          <leafValues>\n            9.6491426229476929e-03 -3.7908729910850525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 -5.0359591841697693e-03</internalNodes>\n          <leafValues>\n            -2.5936231017112732e-01 1.1745890229940414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 6.5677291713654995e-03</internalNodes>\n          <leafValues>\n            -6.0465291142463684e-02 1.5637819468975067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 -3.0346989631652832e-02</internalNodes>\n          <leafValues>\n            3.8403400778770447e-01 -6.1477359384298325e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 1.7546329647302628e-02</internalNodes>\n          <leafValues>\n            2.8643229976296425e-02 -4.7679468989372253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 -4.5566740445792675e-03</internalNodes>\n          <leafValues>\n            -3.1261089444160461e-01 1.0885629802942276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 -6.9851092994213104e-02</internalNodes>\n          <leafValues>\n            -7.0994102954864502e-01 1.8536770716309547e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 -1.4962710338295437e-05</internalNodes>\n          <leafValues>\n            1.0287140309810638e-01 -2.2921159863471985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 -7.2705000638961792e-02</internalNodes>\n          <leafValues>\n            4.2520120739936829e-01 -2.8236340731382370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 3.7338290363550186e-02</internalNodes>\n          <leafValues>\n            -7.6630033552646637e-02 3.2374149560928345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 2.8690960258245468e-02</internalNodes>\n          <leafValues>\n            3.0029499903321266e-02 -8.4007978439331055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 1.0019769892096519e-02</internalNodes>\n          <leafValues>\n            -7.9071857035160065e-02 3.4019070863723755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 -3.9540659636259079e-03</internalNodes>\n          <leafValues>\n            -2.4449679255485535e-01 1.1845660209655762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 -8.2879550755023956e-03</internalNodes>\n          <leafValues>\n            1.0628750175237656e-01 -2.2044150531291962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 -3.4582480788230896e-02</internalNodes>\n          <leafValues>\n            -7.1333628892898560e-01 2.9727920889854431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 -1.4701869804412127e-03</internalNodes>\n          <leafValues>\n            1.2630669772624969e-01 -1.8260860443115234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 -1.8792560324072838e-02</internalNodes>\n          <leafValues>\n            4.4159510731697083e-01 -6.2980100512504578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 -1.9830280914902687e-02</internalNodes>\n          <leafValues>\n            -2.8308698534965515e-01 9.2180028557777405e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 -1.6321459412574768e-01</internalNodes>\n          <leafValues>\n            -4.1355830430984497e-01 1.1562050320208073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 7.5624987483024597e-02</internalNodes>\n          <leafValues>\n            2.2105440497398376e-02 -9.1430252790451050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 -2.2491789422929287e-03</internalNodes>\n          <leafValues>\n            9.1926686465740204e-02 -1.0633769631385803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 -6.3310638070106506e-02</internalNodes>\n          <leafValues>\n            -7.7100628614425659e-01 2.7047479525208473e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>60</maxWeakCount>\n      <stageThreshold>-8.9544051885604858e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 553 -1.7043270170688629e-01</internalNodes>\n          <leafValues>\n            4.7425061464309692e-01 -1.8581479787826538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 2.7967130765318871e-02</internalNodes>\n          <leafValues>\n            -8.6291179060935974e-02 5.3257989883422852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 2.0941249385941774e-04</internalNodes>\n          <leafValues>\n            -2.7199700474739075e-01 1.3615070283412933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -3.3637240529060364e-02</internalNodes>\n          <leafValues>\n            2.8299760818481445e-01 -2.2356469184160233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 -4.5356429181993008e-03</internalNodes>\n          <leafValues>\n            1.6135759651660919e-01 -2.0162500441074371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 3.3124668989330530e-03</internalNodes>\n          <leafValues>\n            -7.9677619040012360e-02 1.4375239610671997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 -5.4888740181922913e-02</internalNodes>\n          <leafValues>\n            6.6563862562179565e-01 -5.3526669740676880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 5.3796600550413132e-03</internalNodes>\n          <leafValues>\n            -9.6400886774063110e-02 9.3223050236701965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 561 -6.0283239930868149e-02</internalNodes>\n          <leafValues>\n            -5.4325622320175171e-01 5.4515969008207321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 8.4590855985879898e-03</internalNodes>\n          <leafValues>\n            5.0189521163702011e-02 -3.7638399004936218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 2.8549430426210165e-03</internalNodes>\n          <leafValues>\n            1.3105809688568115e-01 -2.4903079867362976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 -2.0608250051736832e-02</internalNodes>\n          <leafValues>\n            -4.3393260240554810e-01 6.0918930917978287e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 -1.0088419541716576e-02</internalNodes>\n          <leafValues>\n            2.9433688521385193e-01 -1.0092660039663315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 -5.9431340545415878e-02</internalNodes>\n          <leafValues>\n            -9.0102052688598633e-01 2.7330689132213593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 -2.4024050217121840e-03</internalNodes>\n          <leafValues>\n            1.2758029997348785e-01 -1.9134059548377991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 -2.7372820302844048e-02</internalNodes>\n          <leafValues>\n            -2.8051578998565674e-01 1.0892979800701141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 -7.3817551136016846e-02</internalNodes>\n          <leafValues>\n            3.6636620759963989e-01 -7.1261473000049591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 -6.9365866482257843e-02</internalNodes>\n          <leafValues>\n            4.4759741425514221e-01 -3.5112198442220688e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 -1.2530760141089559e-03</internalNodes>\n          <leafValues>\n            1.0481069982051849e-01 -2.5331568717956543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 -3.2429681159555912e-03</internalNodes>\n          <leafValues>\n            -2.1083809435367584e-01 8.9755013585090637e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 1.6115259379148483e-02</internalNodes>\n          <leafValues>\n            -5.8019161224365234e-02 5.5759441852569580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 6.2562932725995779e-04</internalNodes>\n          <leafValues>\n            -2.1611200273036957e-01 1.2215120345354080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 -7.6641827821731567e-01</internalNodes>\n          <leafValues>\n            -6.3647639751434326e-01 3.3915121108293533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 -7.4419458542251959e-06</internalNodes>\n          <leafValues>\n            9.5346711575984955e-02 -2.3950740694999695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 -3.7739300751127303e-04</internalNodes>\n          <leafValues>\n            1.4481280744075775e-01 -1.8476490676403046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 7.6729603111743927e-02</internalNodes>\n          <leafValues>\n            1.1742720380425453e-02 -9.6213918924331665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 -4.4697099365293980e-03</internalNodes>\n          <leafValues>\n            -2.3385390639305115e-01 1.0464339703321457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 7.5911812484264374e-02</internalNodes>\n          <leafValues>\n            6.7219119518995285e-03 -4.2311188578605652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 -8.3202589303255081e-03</internalNodes>\n          <leafValues>\n            3.2122060656547546e-01 -8.3661839365959167e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 -3.7233818322420120e-02</internalNodes>\n          <leafValues>\n            1.1662390083074570e-01 -2.3976010084152222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 -2.1381198894232512e-03</internalNodes>\n          <leafValues>\n            8.4755808115005493e-02 -2.5149530172348022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 -4.4315438717603683e-03</internalNodes>\n          <leafValues>\n            -1.0990399867296219e-01 6.6713362932205200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 -1.0959600098431110e-02</internalNodes>\n          <leafValues>\n            2.8818470239639282e-01 -7.7696867287158966e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 3.4907169640064240e-02</internalNodes>\n          <leafValues>\n            -1.1712339706718922e-02 3.9965820312500000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 -1.3335079886019230e-02</internalNodes>\n          <leafValues>\n            -4.9896249175071716e-01 5.3193040192127228e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 -3.7070110440254211e-02</internalNodes>\n          <leafValues>\n            -5.9346628189086914e-01 1.2502389959990978e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 -9.1118857264518738e-02</internalNodes>\n          <leafValues>\n            -6.0664188861846924e-01 3.0223639681935310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 -6.7527957260608673e-02</internalNodes>\n          <leafValues>\n            3.2593071460723877e-01 -3.2810360193252563e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 -2.6317719370126724e-02</internalNodes>\n          <leafValues>\n            -7.6599878072738647e-01 2.5263689458370209e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 3.7877839058637619e-02</internalNodes>\n          <leafValues>\n            1.7415969632565975e-03 -9.1090667247772217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 1.6833839472383261e-03</internalNodes>\n          <leafValues>\n            -6.4769007265567780e-02 3.5946249961853027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 -4.2451170884305611e-05</internalNodes>\n          <leafValues>\n            6.2228899449110031e-02 -8.5069350898265839e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 2.7713281451724470e-04</internalNodes>\n          <leafValues>\n            -1.7252549529075623e-01 1.2511169910430908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 596 -3.0400960240513086e-03</internalNodes>\n          <leafValues>\n            1.5032739937305450e-01 -1.4423249661922455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 -5.4823148995637894e-02</internalNodes>\n          <leafValues>\n            3.4711471199989319e-01 -6.3294216990470886e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 1.4232549583539367e-03</internalNodes>\n          <leafValues>\n            7.3755688965320587e-02 -2.7084198594093323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 -3.3660030458122492e-03</internalNodes>\n          <leafValues>\n            -2.3144030570983887e-01 8.8216871023178101e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 -1.1405759723857045e-03</internalNodes>\n          <leafValues>\n            1.5687429904937744e-01 -1.3379560410976410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 3.7445020861923695e-03</internalNodes>\n          <leafValues>\n            -1.2132400274276733e-01 2.2723269462585449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 1.6585510224103928e-02</internalNodes>\n          <leafValues>\n            5.4631579667329788e-02 -1.0117000341415405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 -2.9970710165798664e-03</internalNodes>\n          <leafValues>\n            1.7258630692958832e-01 -1.4288370311260223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 -3.0509869102388620e-03</internalNodes>\n          <leafValues>\n            1.0889530181884766e-01 -1.2865459918975830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 -2.7037179097533226e-02</internalNodes>\n          <leafValues>\n            -2.1809040009975433e-01 1.0335580259561539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 -1.4020490460097790e-02</internalNodes>\n          <leafValues>\n            1.7013829946517944e-01 -4.6483799815177917e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 4.0001110173761845e-03</internalNodes>\n          <leafValues>\n            6.1452940106391907e-02 -3.5107728838920593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 1.1888570152223110e-02</internalNodes>\n          <leafValues>\n            -6.5659493207931519e-02 3.4128171205520630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 1.0041910223662853e-02</internalNodes>\n          <leafValues>\n            1.0645069926977158e-01 -2.3905399441719055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 -8.3469128003343940e-04</internalNodes>\n          <leafValues>\n            1.1359920352697372e-01 -1.2456230074167252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 -8.4286198019981384e-02</internalNodes>\n          <leafValues>\n            4.4472348690032959e-01 -4.6677689999341965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 -1.2084700167179108e-02</internalNodes>\n          <leafValues>\n            -3.1389999389648438e-01 8.1864818930625916e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>69</maxWeakCount>\n      <stageThreshold>-8.5815817117691040e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 613 -6.6878342628479004e-01</internalNodes>\n          <leafValues>\n            4.1411510109901428e-01 -1.8810300529003143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 3.4350738860666752e-04</internalNodes>\n          <leafValues>\n            -1.5680180490016937e-01 1.0782240331172943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 2.6565280277282000e-03</internalNodes>\n          <leafValues>\n            -2.2030730545520782e-01 2.1439610421657562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 -1.9296359270811081e-02</internalNodes>\n          <leafValues>\n            4.2026680707931519e-01 -6.8671546876430511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 -6.6540208645164967e-03</internalNodes>\n          <leafValues>\n            -2.3488819599151611e-01 1.6749989986419678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 1.5521990135312080e-02</internalNodes>\n          <leafValues>\n            1.9785670563578606e-02 -3.9180341362953186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 8.0317907035350800e-02</internalNodes>\n          <leafValues>\n            -1.9278699532151222e-02 5.8520817756652832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 -1.0220059752464294e-01</internalNodes>\n          <leafValues>\n            -8.1461167335510254e-01 8.9545976370573044e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 -1.0618870146572590e-02</internalNodes>\n          <leafValues>\n            1.8044769763946533e-01 -2.1122869849205017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 9.8658069968223572e-02</internalNodes>\n          <leafValues>\n            -4.9179349094629288e-02 2.1871259808540344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 -6.6758222877979279e-02</internalNodes>\n          <leafValues>\n            -2.6649540662765503e-01 1.0707940161228180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 -2.9256459325551987e-02</internalNodes>\n          <leafValues>\n            -7.8809207677841187e-01 5.6176739744842052e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 -1.2126189656555653e-02</internalNodes>\n          <leafValues>\n            1.0218500345945358e-01 -2.2899429500102997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 -5.4919619113206863e-02</internalNodes>\n          <leafValues>\n            -5.3647202253341675e-01 1.4213330112397671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 -4.0985811501741409e-03</internalNodes>\n          <leafValues>\n            -3.1650361418724060e-01 7.6794192194938660e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 -6.2581077218055725e-02</internalNodes>\n          <leafValues>\n            -4.8726239800453186e-01 9.1610476374626160e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 4.9834471195936203e-02</internalNodes>\n          <leafValues>\n            -7.5687482953071594e-02 2.9998108744621277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 1.0333029925823212e-01</internalNodes>\n          <leafValues>\n            3.3387999981641769e-02 -5.6652718782424927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 -2.6153959333896637e-02</internalNodes>\n          <leafValues>\n            4.4663658738136292e-01 -5.7146150618791580e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 6.8949297070503235e-02</internalNodes>\n          <leafValues>\n            6.6676470451056957e-03 -9.9968850612640381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 2.1299200598150492e-03</internalNodes>\n          <leafValues>\n            -1.8253549933433533e-01 1.2543450295925140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 -4.4991839677095413e-02</internalNodes>\n          <leafValues>\n            -5.6401151418685913e-01 3.7286750972270966e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 2.2533860057592392e-02</internalNodes>\n          <leafValues>\n            -4.2648501694202423e-02 5.9839051961898804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 1.9274459779262543e-01</internalNodes>\n          <leafValues>\n            3.0479490756988525e-02 -8.4564548730850220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 -9.2559499898925424e-04</internalNodes>\n          <leafValues>\n            -2.0614519715309143e-01 1.1016649752855301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 -3.6584408953785896e-03</internalNodes>\n          <leafValues>\n            9.1432936489582062e-02 -8.2888223230838776e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 3.3741090446710587e-03</internalNodes>\n          <leafValues>\n            8.0734901130199432e-02 -3.0495160818099976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 -5.1757801324129105e-02</internalNodes>\n          <leafValues>\n            -8.0067127943038940e-01 2.8978339396417141e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 1.0498389601707458e-03</internalNodes>\n          <leafValues>\n            -1.8396970629692078e-01 1.3429929316043854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 7.5232777744531631e-03</internalNodes>\n          <leafValues>\n            -3.1206240877509117e-02 1.2124940007925034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 -7.1075286541599780e-05</internalNodes>\n          <leafValues>\n            8.4017656743526459e-02 -2.5043961405754089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 1.1362830176949501e-02</internalNodes>\n          <leafValues>\n            -7.6280519366264343e-02 2.0559790730476379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 -2.4097480345517397e-03</internalNodes>\n          <leafValues>\n            -1.5042850375175476e-01 1.6493639349937439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 2.4056989699602127e-02</internalNodes>\n          <leafValues>\n            1.4566550031304359e-02 -9.0886771678924561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 -2.3983620107173920e-02</internalNodes>\n          <leafValues>\n            3.9107671380043030e-01 -5.4178200662136078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 -2.1438319236040115e-02</internalNodes>\n          <leafValues>\n            -4.8545840382575989e-01 4.0402751415967941e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 1.5210740268230438e-02</internalNodes>\n          <leafValues>\n            3.4481588751077652e-02 -5.4406332969665527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 1.1712989769876003e-02</internalNodes>\n          <leafValues>\n            -6.5206751227378845e-02 4.1007021069526672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 6.3996820244938135e-04</internalNodes>\n          <leafValues>\n            -1.4772899448871613e-01 1.5154249966144562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 -3.4567480906844139e-03</internalNodes>\n          <leafValues>\n            6.3351117074489594e-02 -1.4297829568386078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 -1.2475489638745785e-03</internalNodes>\n          <leafValues>\n            -1.8521060049533844e-01 1.3410830497741699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 6.6904430277645588e-03</internalNodes>\n          <leafValues>\n            1.4112530648708344e-01 -1.8778939545154572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 -6.9181032478809357e-02</internalNodes>\n          <leafValues>\n            3.4451478719711304e-01 -8.4655232727527618e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 -6.7893281579017639e-02</internalNodes>\n          <leafValues>\n            -7.0076942443847656e-01 2.3327259346842766e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 -8.5538747953251004e-04</internalNodes>\n          <leafValues>\n            9.2393256723880768e-02 -2.1416470408439636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 1.7967769503593445e-01</internalNodes>\n          <leafValues>\n            2.9103670269250870e-02 -7.8690862655639648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 -2.9843579977750778e-03</internalNodes>\n          <leafValues>\n            1.6117380559444427e-01 -1.2868699431419373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 1.9973449409008026e-02</internalNodes>\n          <leafValues>\n            3.6350231617689133e-02 -5.9400641918182373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 -8.3998020272701979e-04</internalNodes>\n          <leafValues>\n            1.1332140117883682e-01 -1.9175720214843750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 5.0804121419787407e-03</internalNodes>\n          <leafValues>\n            5.3663559257984161e-02 -2.7940011024475098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 7.3341121897101402e-03</internalNodes>\n          <leafValues>\n            -1.6792379319667816e-01 1.2119220197200775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 7.6924441382288933e-03</internalNodes>\n          <leafValues>\n            -6.9076187908649445e-02 1.8550349771976471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 2.0062309340573847e-04</internalNodes>\n          <leafValues>\n            -2.0654049515724182e-01 9.7337253391742706e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 2.6919560506939888e-02</internalNodes>\n          <leafValues>\n            -2.3648599162697792e-02 6.4873528480529785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 -2.7951570227742195e-03</internalNodes>\n          <leafValues>\n            -2.0725600421428680e-01 1.0188090056180954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 7.8026622533798218e-02</internalNodes>\n          <leafValues>\n            8.9439805597066879e-03 -3.9990609884262085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 -1.0000459849834442e-01</internalNodes>\n          <leafValues>\n            3.7361750006675720e-01 -5.5814821273088455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 -1.4978240430355072e-01</internalNodes>\n          <leafValues>\n            3.8677608966827393e-01 -5.5641401559114456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 3.3566348254680634e-02</internalNodes>\n          <leafValues>\n            7.5311936438083649e-02 -3.2007390260696411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 -2.1213890612125397e-01</internalNodes>\n          <leafValues>\n            -5.9270721673965454e-01 4.9450621008872986e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 -1.4402889646589756e-02</internalNodes>\n          <leafValues>\n            3.2471069693565369e-01 -5.8492168784141541e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 -1.8413169309496880e-02</internalNodes>\n          <leafValues>\n            -9.6801750361919403e-02 1.0343659669160843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 1.6228349879384041e-02</internalNodes>\n          <leafValues>\n            -6.0577668249607086e-02 3.1738010048866272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 -6.7683439701795578e-03</internalNodes>\n          <leafValues>\n            -1.9742150604724884e-01 2.7996420860290527e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 -1.9165309146046638e-02</internalNodes>\n          <leafValues>\n            -2.5684070587158203e-01 8.3432748913764954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 678 2.8667549486272037e-04</internalNodes>\n          <leafValues>\n            -1.5241080522537231e-01 1.4404779672622681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 9.4157401472330093e-03</internalNodes>\n          <leafValues>\n            -7.3207639157772064e-02 3.3655610680580139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 2.3321900516748428e-02</internalNodes>\n          <leafValues>\n            -6.1898268759250641e-02 8.3489909768104553e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 -1.1910670436918736e-02</internalNodes>\n          <leafValues>\n            -1.9628530740737915e-01 9.6807330846786499e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>63</maxWeakCount>\n      <stageThreshold>-7.2787708044052124e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 682 -9.4191312789916992e-02</internalNodes>\n          <leafValues>\n            4.7028279304504395e-01 -1.4449509978294373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 -6.9314462598413229e-04</internalNodes>\n          <leafValues>\n            1.7749489843845367e-01 -1.8127989768981934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 -1.2782390415668488e-01</internalNodes>\n          <leafValues>\n            2.9733940958976746e-01 -1.0098580271005630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 -2.5297680404037237e-03</internalNodes>\n          <leafValues>\n            1.0854879766702652e-01 -1.3471469283103943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 -2.5406670756638050e-03</internalNodes>\n          <leafValues>\n            -2.7025818824768066e-01 1.0289029777050018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 -1.5717690112069249e-03</internalNodes>\n          <leafValues>\n            1.7058460414409637e-01 -1.0923519730567932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 1.4790190383791924e-02</internalNodes>\n          <leafValues>\n            2.3690680041909218e-02 -5.1412177085876465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 -1.1837840080261230e-02</internalNodes>\n          <leafValues>\n            1.5754750370979309e-01 -2.7252310886979103e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 -3.8180808769538999e-04</internalNodes>\n          <leafValues>\n            1.0274309664964676e-01 -2.1815380454063416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 5.0768889486789703e-02</internalNodes>\n          <leafValues>\n            7.3335068300366402e-03 -8.5053902864456177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 2.2738629952073097e-02</internalNodes>\n          <leafValues>\n            -4.3974649161100388e-02 5.0167572498321533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 7.3323072865605354e-04</internalNodes>\n          <leafValues>\n            -9.8431721329689026e-02 1.1515360325574875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 1.1889509623870254e-03</internalNodes>\n          <leafValues>\n            -2.2443179786205292e-01 1.0813289880752563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 -3.2934029586613178e-03</internalNodes>\n          <leafValues>\n            7.1840867400169373e-02 -8.0868020653724670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 -3.0113169923424721e-03</internalNodes>\n          <leafValues>\n            -2.9698678851127625e-01 7.9700268805027008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 -1.5521480236202478e-03</internalNodes>\n          <leafValues>\n            1.8694180250167847e-01 -1.1467470228672028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 -1.0300680063664913e-02</internalNodes>\n          <leafValues>\n            -2.9109370708465576e-01 6.7836336791515350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 699 -2.6368349790573120e-03</internalNodes>\n          <leafValues>\n            1.1284109950065613e-01 -7.3468528687953949e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 -3.2815459417179227e-04</internalNodes>\n          <leafValues>\n            8.1921890377998352e-02 -2.4893359839916229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 -3.4514568746089935e-02</internalNodes>\n          <leafValues>\n            4.2230990529060364e-01 -3.4608390182256699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 2.1102999744471163e-04</internalNodes>\n          <leafValues>\n            -1.9479750096797943e-01 1.1572039872407913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 -4.4254157692193985e-03</internalNodes>\n          <leafValues>\n            -1.9316120445728302e-01 5.8137431740760803e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 -1.7686230130493641e-03</internalNodes>\n          <leafValues>\n            -1.7518809437751770e-01 1.4515039324760437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 -3.3355921041220427e-03</internalNodes>\n          <leafValues>\n            2.2621470689773560e-01 -1.0195499658584595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 4.5241121202707291e-02</internalNodes>\n          <leafValues>\n            3.3572640269994736e-02 -6.6535997390747070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 -2.7708040550351143e-02</internalNodes>\n          <leafValues>\n            -4.7514501214027405e-01 1.6605619341135025e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 -6.0042630881071091e-02</internalNodes>\n          <leafValues>\n            2.7002659440040588e-01 -7.5283601880073547e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 9.3657420948147774e-03</internalNodes>\n          <leafValues>\n            -5.2090760320425034e-02 3.4359771013259888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 2.2545119747519493e-02</internalNodes>\n          <leafValues>\n            4.5823760330677032e-02 -5.3111177682876587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 711 -6.6756099462509155e-02</internalNodes>\n          <leafValues>\n            5.1867592334747314e-01 -1.0766089893877506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 4.3578571639955044e-03</internalNodes>\n          <leafValues>\n            -1.6680300235748291e-01 1.3410590589046478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 -3.6338180303573608e-02</internalNodes>\n          <leafValues>\n            -5.4825192689895630e-01 1.8291600048542023e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 -4.5509558171033859e-02</internalNodes>\n          <leafValues>\n            3.9119181036949158e-01 -5.4338268935680389e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 6.2883161008358002e-03</internalNodes>\n          <leafValues>\n            9.5495186746120453e-02 -2.4893720448017120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 1.5809159958735108e-03</internalNodes>\n          <leafValues>\n            -1.6792270541191101e-01 1.1553759872913361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 -1.5780210494995117e-01</internalNodes>\n          <leafValues>\n            -6.9598740339279175e-01 3.1015299260616302e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 -5.0400748848915100e-02</internalNodes>\n          <leafValues>\n            -6.1013418436050415e-01 2.5600189343094826e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 -8.3708087913691998e-04</internalNodes>\n          <leafValues>\n            6.3689701259136200e-02 -3.2572910189628601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 5.2259840071201324e-02</internalNodes>\n          <leafValues>\n            -5.2639529109001160e-02 4.3018800020217896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 6.6796218743547797e-04</internalNodes>\n          <leafValues>\n            8.0761440098285675e-02 -2.5092118978500366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 -3.6306399852037430e-02</internalNodes>\n          <leafValues>\n            7.2837859392166138e-01 -2.8703549876809120e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 -7.5823411345481873e-02</internalNodes>\n          <leafValues>\n            -7.6045262813568115e-01 1.3166300021111965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 -5.5567082017660141e-03</internalNodes>\n          <leafValues>\n            1.1258409917354584e-01 -1.9850979745388031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 3.1275521032512188e-03</internalNodes>\n          <leafValues>\n            -1.0436189919710159e-01 1.0283000022172928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 2.7931319549679756e-02</internalNodes>\n          <leafValues>\n            4.7023560851812363e-02 -4.7727531194686890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 1.5156970359385014e-02</internalNodes>\n          <leafValues>\n            -4.9909379333257675e-02 2.1705010533332825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 6.8009081296622753e-03</internalNodes>\n          <leafValues>\n            1.1713290214538574e-01 -2.2082920372486115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 -4.3796948157250881e-03</internalNodes>\n          <leafValues>\n            1.7191199958324432e-01 -8.9668810367584229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 -6.9269728846848011e-03</internalNodes>\n          <leafValues>\n            8.8258482515811920e-02 -2.6454809308052063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -2.0586250722408295e-01</internalNodes>\n          <leafValues>\n            -5.0262999534606934e-01 4.0832251310348511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 -1.1398729839129373e-04</internalNodes>\n          <leafValues>\n            1.0535170137882233e-01 -1.9488720595836639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 3.6993779242038727e-02</internalNodes>\n          <leafValues>\n            -5.4779630154371262e-02 2.2932989895343781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 4.7788480296730995e-03</internalNodes>\n          <leafValues>\n            9.1294333338737488e-02 -2.4968950450420380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 1.1999059934169054e-03</internalNodes>\n          <leafValues>\n            -9.2685289680957794e-02 1.1050710082054138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 2.0830740686506033e-03</internalNodes>\n          <leafValues>\n            -1.0583080351352692e-01 1.7405270040035248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 2.7166489511728287e-02</internalNodes>\n          <leafValues>\n            1.1538780294358730e-02 -1.0000569820404053e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 -4.3531907722353935e-03</internalNodes>\n          <leafValues>\n            -2.6105979084968567e-01 7.8109443187713623e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 -1.6676170751452446e-02</internalNodes>\n          <leafValues>\n            -6.3766658306121826e-01 1.2807319872081280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 -1.7588710179552436e-03</internalNodes>\n          <leafValues>\n            1.5328720211982727e-01 -1.4830219745635986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 -1.3470610138028860e-03</internalNodes>\n          <leafValues>\n            1.1022730171680450e-01 -1.1166580021381378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 -7.7226730063557625e-03</internalNodes>\n          <leafValues>\n            2.6749759912490845e-01 -8.4375701844692230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 2.4557989090681076e-02</internalNodes>\n          <leafValues>\n            1.1705229990184307e-02 -6.9936311244964600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 -4.1882451623678207e-03</internalNodes>\n          <leafValues>\n            -2.0845660567283630e-01 1.1073870211839676e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>67</maxWeakCount>\n      <stageThreshold>-7.7944219112396240e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 745 -3.0925211310386658e-01</internalNodes>\n          <leafValues>\n            3.1520840525627136e-01 -1.6629250347614288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 3.8660250604152679e-02</internalNodes>\n          <leafValues>\n            -5.7934600859880447e-02 4.5278790593147278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 -1.8853870034217834e-01</internalNodes>\n          <leafValues>\n            -8.2013928890228271e-01 3.0941359698772430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 7.1423681220039725e-04</internalNodes>\n          <leafValues>\n            1.0280930250883102e-01 -2.4902869760990143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 -7.2074443101882935e-02</internalNodes>\n          <leafValues>\n            3.3171579241752625e-01 -7.3685511946678162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 9.4616664573550224e-03</internalNodes>\n          <leafValues>\n            3.2647788524627686e-02 -3.6112511157989502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 -4.6513080596923828e-02</internalNodes>\n          <leafValues>\n            -4.7550851106643677e-01 5.6877400726079941e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 -3.4777458757162094e-02</internalNodes>\n          <leafValues>\n            -6.3515567779541016e-01 3.1314119696617126e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 -1.4840300427749753e-03</internalNodes>\n          <leafValues>\n            9.2628233134746552e-02 -2.5283080339431763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 8.3039281889796257e-03</internalNodes>\n          <leafValues>\n            3.3991388976573944e-02 -1.8357479572296143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 2.7342209592461586e-02</internalNodes>\n          <leafValues>\n            -5.1393941044807434e-02 5.5958998203277588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 5.8637421578168869e-02</internalNodes>\n          <leafValues>\n            -5.7350661605596542e-02 1.4842259883880615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 -3.7032511085271835e-02</internalNodes>\n          <leafValues>\n            -4.0602868795394897e-01 6.6790133714675903e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 8.9913606643676758e-03</internalNodes>\n          <leafValues>\n            -1.9094319641590118e-01 5.9438090771436691e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 -5.9351198375225067e-02</internalNodes>\n          <leafValues>\n            -8.7097257375717163e-01 2.1483449265360832e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 3.7055540084838867e-01</internalNodes>\n          <leafValues>\n            -4.0396090596914291e-02 6.0631322860717773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 -8.4517069626599550e-04</internalNodes>\n          <leafValues>\n            1.3660719990730286e-01 -1.5541790425777435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 1.0664479807019234e-02</internalNodes>\n          <leafValues>\n            3.4129761159420013e-02 -2.3508089780807495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 3.7040449678897858e-03</internalNodes>\n          <leafValues>\n            1.1293920129537582e-01 -1.5596470236778259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 2.3328550159931183e-02</internalNodes>\n          <leafValues>\n            3.6770980805158615e-02 -1.6631129384040833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 2.0906640216708183e-02</internalNodes>\n          <leafValues>\n            -7.3391966521739960e-02 3.2708668708801270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 2.0865180995315313e-03</internalNodes>\n          <leafValues>\n            9.6375763416290283e-02 -2.1638840436935425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 1.2039430439472198e-03</internalNodes>\n          <leafValues>\n            -1.7018699645996094e-01 1.0815030336380005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 3.3848760649561882e-03</internalNodes>\n          <leafValues>\n            -1.0820890218019485e-01 9.0751953423023224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 -1.5309279784560204e-02</internalNodes>\n          <leafValues>\n            -6.2071442604064941e-01 3.1353730708360672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 2.1820720285177231e-02</internalNodes>\n          <leafValues>\n            -5.7232249528169632e-02 2.9141768813133240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 5.8554150164127350e-03</internalNodes>\n          <leafValues>\n            5.5810708552598953e-02 -3.4557789564132690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 -8.8380590081214905e-02</internalNodes>\n          <leafValues>\n            -5.8971607685089111e-01 3.2257869839668274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 -3.6303598433732986e-02</internalNodes>\n          <leafValues>\n            6.7906290292739868e-01 -3.1298439949750900e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 6.7714422941207886e-02</internalNodes>\n          <leafValues>\n            2.8151830658316612e-02 -7.5963890552520752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 -1.7487880541011691e-03</internalNodes>\n          <leafValues>\n            1.3521270453929901e-01 -1.4939880371093750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 5.7627420872449875e-02</internalNodes>\n          <leafValues>\n            1.4716790057718754e-02 -6.4088898897171021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 4.8004398122429848e-03</internalNodes>\n          <leafValues>\n            5.7510860264301300e-02 -3.0728340148925781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 1.5568589791655540e-02</internalNodes>\n          <leafValues>\n            -2.6860829442739487e-02 3.9390829205513000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 -9.9650640040636063e-03</internalNodes>\n          <leafValues>\n            3.2090151309967041e-01 -5.8974441140890121e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 780 -9.1902203857898712e-03</internalNodes>\n          <leafValues>\n            -3.8006910681724548e-01 3.5807169973850250e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 3.0834939330816269e-02</internalNodes>\n          <leafValues>\n            4.0354121476411819e-02 -5.0782901048660278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 -6.4900278812274337e-04</internalNodes>\n          <leafValues>\n            9.5597133040428162e-02 -1.8812850117683411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 -3.9334357716143131e-03</internalNodes>\n          <leafValues>\n            -2.0279949903488159e-01 1.0514850169420242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 -2.1477680653333664e-02</internalNodes>\n          <leafValues>\n            -3.2985571026802063e-01 3.5263378173112869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 -2.7516249567270279e-02</internalNodes>\n          <leafValues>\n            3.4558650851249695e-01 -7.2544910013675690e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 -7.2914459742605686e-03</internalNodes>\n          <leafValues>\n            1.0051680356264114e-01 -1.3560770452022552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 -5.6135728955268860e-02</internalNodes>\n          <leafValues>\n            4.0078470110893250e-01 -5.1991838961839676e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 1.3679620623588562e-01</internalNodes>\n          <leafValues>\n            -1.6432780772447586e-02 5.6100088357925415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 -2.4549920111894608e-02</internalNodes>\n          <leafValues>\n            -1.8187479674816132e-01 1.4125369489192963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 4.6405121684074402e-03</internalNodes>\n          <leafValues>\n            -1.6500659286975861e-01 1.4912450313568115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 -2.1023359149694443e-02</internalNodes>\n          <leafValues>\n            -1.9611929357051849e-01 9.9226936697959900e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 -4.8856949433684349e-03</internalNodes>\n          <leafValues>\n            1.1330509930849075e-01 -8.0172486603260040e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 -1.7337809503078461e-01</internalNodes>\n          <leafValues>\n            -8.3458930253982544e-01 2.3691669106483459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 -9.2903972836211324e-04</internalNodes>\n          <leafValues>\n            8.5904203355312347e-02 -1.0580120235681534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 -1.0562090203166008e-02</internalNodes>\n          <leafValues>\n            2.6989871263504028e-01 -6.7542143166065216e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 1.5071259811520576e-02</internalNodes>\n          <leafValues>\n            5.8657489717006683e-02 -3.2436290383338928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 -1.8616430461406708e-02</internalNodes>\n          <leafValues>\n            3.5660719871520996e-01 -5.3099378943443298e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 8.4412463009357452e-02</internalNodes>\n          <leafValues>\n            1.7715929076075554e-02 -4.5803558826446533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 5.1138769835233688e-02</internalNodes>\n          <leafValues>\n            1.7407679930329323e-02 -9.4110202789306641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 -1.0613460093736649e-02</internalNodes>\n          <leafValues>\n            -6.0632371902465820e-01 3.0793670564889908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 1.8357619643211365e-02</internalNodes>\n          <leafValues>\n            -7.7268190681934357e-02 2.9780578613281250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 -8.4444461390376091e-04</internalNodes>\n          <leafValues>\n            7.8023009002208710e-02 -2.5017648935317993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 -6.2388968653976917e-03</internalNodes>\n          <leafValues>\n            -4.8017698526382446e-01 3.9185639470815659e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 -3.5363171249628067e-02</internalNodes>\n          <leafValues>\n            -1. 9.3268742784857750e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 -7.3558121919631958e-02</internalNodes>\n          <leafValues>\n            -7.7895337343215942e-01 1.8441500142216682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 -8.7034203112125397e-02</internalNodes>\n          <leafValues>\n            4.3624061346054077e-01 -1.7716599628329277e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 -8.0721646547317505e-02</internalNodes>\n          <leafValues>\n            2.7296718955039978e-01 -6.6346958279609680e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 1.0344590246677399e-01</internalNodes>\n          <leafValues>\n            9.0693607926368713e-03 -6.6438651084899902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 9.3807540833950043e-03</internalNodes>\n          <leafValues>\n            7.1242772042751312e-02 -2.7381658554077148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 -7.1806147694587708e-02</internalNodes>\n          <leafValues>\n            -9.1222041845321655e-01 8.0809993669390678e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 -1.9418599549680948e-03</internalNodes>\n          <leafValues>\n            1.8472340703010559e-01 -1.1344549804925919e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>68</maxWeakCount>\n      <stageThreshold>-7.3019427061080933e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 812 3.0328959226608276e-02</internalNodes>\n          <leafValues>\n            -1.7539510130882263e-01 3.6945340037345886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 -8.2631781697273254e-02</internalNodes>\n          <leafValues>\n            2.2216479480266571e-01 -8.7577551603317261e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 2.5548380799591541e-03</internalNodes>\n          <leafValues>\n            -1.5091089904308319e-01 1.4608770608901978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 -1.4431839808821678e-03</internalNodes>\n          <leafValues>\n            6.2405250966548920e-02 -1.8302099406719208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 4.3006289750337601e-02</internalNodes>\n          <leafValues>\n            8.5711486637592316e-02 -4.4278779625892639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 -1.7748139798641205e-01</internalNodes>\n          <leafValues>\n            -6.7308551073074341e-01 2.1622380241751671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 9.9723696708679199e-02</internalNodes>\n          <leafValues>\n            -4.2775660753250122e-02 6.9088941812515259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -1.7957199364900589e-02</internalNodes>\n          <leafValues>\n            8.8784933090209961e-02 -2.9352998733520508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 5.8914110995829105e-03</internalNodes>\n          <leafValues>\n            2.6884179562330246e-02 -3.9257821440696716e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 -1.2439199490472674e-03</internalNodes>\n          <leafValues>\n            8.3695329725742340e-02 -1.3524650037288666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 -6.3109956681728363e-02</internalNodes>\n          <leafValues>\n            6.8365001678466797e-01 -1.1174580082297325e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 5.3107268176972866e-03</internalNodes>\n          <leafValues>\n            7.3095791041851044e-02 -3.3228519558906555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 -9.6346868667751551e-04</internalNodes>\n          <leafValues>\n            9.3923456966876984e-02 -2.6014220714569092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 -2.0377680659294128e-02</internalNodes>\n          <leafValues>\n            2.3682409524917603e-01 -5.1811341196298599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 -1.5610749833285809e-02</internalNodes>\n          <leafValues>\n            -4.8465269804000854e-01 4.2128730565309525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 827 4.5497290790081024e-02</internalNodes>\n          <leafValues>\n            5.7874252088367939e-03 -5.2637368440628052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 -1.2244869954884052e-02</internalNodes>\n          <leafValues>\n            3.0523040890693665e-01 -7.9311266541481018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 -5.5875871330499649e-03</internalNodes>\n          <leafValues>\n            7.2504900395870209e-02 -1.0300940275192261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 -1.3237710110843182e-02</internalNodes>\n          <leafValues>\n            -2.1259979903697968e-01 1.4112070202827454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 -1.6236070543527603e-02</internalNodes>\n          <leafValues>\n            -3.6822131276130676e-01 1.6904499381780624e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 8.7341741891577840e-04</internalNodes>\n          <leafValues>\n            -1.7513209581375122e-01 1.1717790365219116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 7.8164516016840935e-03</internalNodes>\n          <leafValues>\n            -4.0935669094324112e-02 3.8136309385299683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 1.4803799786022864e-05</internalNodes>\n          <leafValues>\n            -1.1581300199031830e-01 1.8054120242595673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 3.6272540688514709e-02</internalNodes>\n          <leafValues>\n            1.5196749940514565e-02 -4.6037960052490234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 -3.8026720285415649e-03</internalNodes>\n          <leafValues>\n            1.3440360128879547e-01 -1.6124980151653290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -1.4585750177502632e-02</internalNodes>\n          <leafValues>\n            -2.8331491351127625e-01 7.4682116508483887e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 838 1.4677370199933648e-03</internalNodes>\n          <leafValues>\n            -1.3493220508098602e-01 1.4244909584522247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 -1.3981569558382034e-02</internalNodes>\n          <leafValues>\n            2.1735540032386780e-01 -5.2886679768562317e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 -6.3076039077714086e-04</internalNodes>\n          <leafValues>\n            1.4901949465274811e-01 -1.3620099425315857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 -1.4475540257990360e-02</internalNodes>\n          <leafValues>\n            -1.9180099666118622e-01 1.0607130080461502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 -3.2217580825090408e-02</internalNodes>\n          <leafValues>\n            2.8091669082641602e-01 -8.5046291351318359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 3.4460560418665409e-03</internalNodes>\n          <leafValues>\n            7.4571870267391205e-02 -2.7108609676361084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 -4.3949890881776810e-02</internalNodes>\n          <leafValues>\n            4.4002100825309753e-01 -4.5509129762649536e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 -1.1966270394623280e-02</internalNodes>\n          <leafValues>\n            6.3286870718002319e-02 -1.9805380702018738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 -4.3486028909683228e-01</internalNodes>\n          <leafValues>\n            -7.6205497980117798e-01 2.1508129313588142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 3.9887550473213196e-01</internalNodes>\n          <leafValues>\n            8.0703729763627052e-03 -8.4284877777099609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 -4.4802378863096237e-02</internalNodes>\n          <leafValues>\n            -6.8417382240295410e-01 2.2474979981780052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 -1.0935150086879730e-01</internalNodes>\n          <leafValues>\n            2.1119509637355804e-01 -3.9731640368700027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 3.0923409387469292e-02</internalNodes>\n          <leafValues>\n            4.4779401272535324e-02 -3.5875031352043152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 1.3285979628562927e-02</internalNodes>\n          <leafValues>\n            -4.8151660710573196e-02 3.7119218707084656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 -3.9830091409385204e-03</internalNodes>\n          <leafValues>\n            1.2781530618667603e-01 -1.9959120452404022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 1.4184620231389999e-02</internalNodes>\n          <leafValues>\n            -3.9896048605442047e-02 2.4085929989814758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 1.6680279513821006e-03</internalNodes>\n          <leafValues>\n            -1.8107059597969055e-01 9.3981906771659851e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 -2.2055890411138535e-02</internalNodes>\n          <leafValues>\n            -2.8798168897628784e-01 3.0038369819521904e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 -6.0371801257133484e-02</internalNodes>\n          <leafValues>\n            2.9529640078544617e-01 -6.4714096486568451e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 5.9291448444128036e-02</internalNodes>\n          <leafValues>\n            8.4209917113184929e-03 -5.8830922842025757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 3.2637149095535278e-02</internalNodes>\n          <leafValues>\n            3.2118339091539383e-02 -5.1192921400070190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 -9.8897633142769337e-04</internalNodes>\n          <leafValues>\n            1.3382619619369507e-01 -1.1545710265636444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 -3.5560440272092819e-02</internalNodes>\n          <leafValues>\n            -1.5159629285335541e-01 1.0519140213727951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 9.8722549155354500e-03</internalNodes>\n          <leafValues>\n            9.3462042510509491e-02 -2.5988951325416565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 7.1953269653022289e-03</internalNodes>\n          <leafValues>\n            -8.6937829852104187e-02 2.8372770547866821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 2.4437099695205688e-02</internalNodes>\n          <leafValues>\n            -3.9930108934640884e-02 3.9243239164352417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 5.2195340394973755e-03</internalNodes>\n          <leafValues>\n            4.9804110080003738e-02 -3.1846821308135986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 2.3442960809916258e-03</internalNodes>\n          <leafValues>\n            -5.4469950497150421e-02 3.3718121051788330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 4.7694300301373005e-03</internalNodes>\n          <leafValues>\n            7.1476787328720093e-02 -3.1018280982971191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 -1.4517470262944698e-02</internalNodes>\n          <leafValues>\n            7.8642480075359344e-02 -1.4538839459419250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 4.4710729271173477e-02</internalNodes>\n          <leafValues>\n            -2.5051780045032501e-02 6.4730519056320190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 1.6867399215698242e-02</internalNodes>\n          <leafValues>\n            2.9088959097862244e-02 -3.9030238986015320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 -9.0343318879604340e-04</internalNodes>\n          <leafValues>\n            8.7722577154636383e-02 -1.6588549315929413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 -8.2187339663505554e-02</internalNodes>\n          <leafValues>\n            -8.4238857030868530e-01 9.8376423120498657e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 1.8525390187278390e-03</internalNodes>\n          <leafValues>\n            -1.2251490354537964e-01 1.2000189721584320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 -9.3228723853826523e-03</internalNodes>\n          <leafValues>\n            7.8422851860523224e-02 -1.3231949508190155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 2.2730689495801926e-02</internalNodes>\n          <leafValues>\n            -3.3696789294481277e-02 4.4383940100669861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 1.0286659747362137e-01</internalNodes>\n          <leafValues>\n            1.7917430028319359e-02 -5.8341610431671143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 -9.9547371268272400e-02</internalNodes>\n          <leafValues>\n            -9.5365560054779053e-01 1.2582040391862392e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 1.6412759199738503e-02</internalNodes>\n          <leafValues>\n            1.6067119315266609e-02 -4.1402378678321838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 -2.5932409334927797e-03</internalNodes>\n          <leafValues>\n            5.2763499319553375e-02 -3.0404600501060486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 9.5953093841671944e-03</internalNodes>\n          <leafValues>\n            8.3528086543083191e-02 -1.1780069768428802e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>66</maxWeakCount>\n      <stageThreshold>-6.8558442592620850e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 880 -3.5430109500885010e-01</internalNodes>\n          <leafValues>\n            3.1792920827865601e-01 -1.8512800335884094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 -1.4761329628527164e-02</internalNodes>\n          <leafValues>\n            3.4065079689025879e-01 -8.6621738970279694e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 -1.1580450087785721e-01</internalNodes>\n          <leafValues>\n            -7.2353202104568481e-01 3.4404840320348740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 -4.4705160689773038e-05</internalNodes>\n          <leafValues>\n            8.2497082650661469e-02 -2.1311110258102417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 -5.8883379097096622e-05</internalNodes>\n          <leafValues>\n            1.0809300094842911e-01 -1.8269860744476318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 3.7944849580526352e-02</internalNodes>\n          <leafValues>\n            -2.4756550788879395e-02 4.5866918563842773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 -2.1807940211147070e-03</internalNodes>\n          <leafValues>\n            1.5783859789371490e-01 -1.7752459645271301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 -4.5430101454257965e-02</internalNodes>\n          <leafValues>\n            -3.7249541282653809e-01 5.7393261231482029e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 1.9972559530287981e-03</internalNodes>\n          <leafValues>\n            -1.9175310432910919e-01 1.1995170265436172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 -2.2458820239990018e-05</internalNodes>\n          <leafValues>\n            9.1529168188571930e-02 -1.3080990314483643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 -3.7994279991835356e-03</internalNodes>\n          <leafValues>\n            -2.0454970002174377e-01 1.4146579802036285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 -2.7970419614575803e-04</internalNodes>\n          <leafValues>\n            1.1078160256147385e-01 -1.8713960051536560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 -3.9631421677768230e-03</internalNodes>\n          <leafValues>\n            -3.7749990820884705e-01 5.6935790926218033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 -1.4290240360423923e-03</internalNodes>\n          <leafValues>\n            -1.9449859857559204e-01 9.8834916949272156e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 2.1182179450988770e-02</internalNodes>\n          <leafValues>\n            -8.7030410766601562e-02 2.8888610005378723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 8.7332521798089147e-04</internalNodes>\n          <leafValues>\n            -1.1729159951210022e-01 1.2506540119647980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 2.6135759428143501e-02</internalNodes>\n          <leafValues>\n            -3.9572428911924362e-02 6.2252640724182129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 4.3046330101788044e-03</internalNodes>\n          <leafValues>\n            1.1582309752702713e-01 -1.9618239998817444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 1.5224959934130311e-03</internalNodes>\n          <leafValues>\n            -1.8586060404777527e-01 1.1688389629125595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 -7.4201932875439525e-04</internalNodes>\n          <leafValues>\n            9.8724737763404846e-02 -2.5791341066360474e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 -2.5593061000108719e-03</internalNodes>\n          <leafValues>\n            1.7307940125465393e-01 -1.2067069858312607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 -9.5563217997550964e-02</internalNodes>\n          <leafValues>\n            3.4646418690681458e-01 -1.3142139650881290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 1.3280790299177170e-02</internalNodes>\n          <leafValues>\n            1.2056879699230194e-01 -2.0627740025520325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 1.8245529383420944e-02</internalNodes>\n          <leafValues>\n            -6.7242950201034546e-02 4.6858128160238266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 -6.1288971453905106e-02</internalNodes>\n          <leafValues>\n            -6.6364967823028564e-01 2.9319150373339653e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 -2.6133419945836067e-02</internalNodes>\n          <leafValues>\n            2.0848380029201508e-01 -2.7202930301427841e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 -3.2300818711519241e-02</internalNodes>\n          <leafValues>\n            -6.2726408243179321e-01 3.0091879889369011e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 5.0284489989280701e-02</internalNodes>\n          <leafValues>\n            1.5047290362417698e-03 -5.9630411863327026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 -1.8137119710445404e-02</internalNodes>\n          <leafValues>\n            2.9262909293174744e-01 -6.9213449954986572e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 1.0980300139635801e-03</internalNodes>\n          <leafValues>\n            1.0316859930753708e-01 -1.6558070480823517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 3.9596110582351685e-03</internalNodes>\n          <leafValues>\n            -5.7063579559326172e-02 3.3744910359382629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 3.1622028909623623e-03</internalNodes>\n          <leafValues>\n            8.8302358984947205e-02 -2.7917590737342834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 8.4337368607521057e-03</internalNodes>\n          <leafValues>\n            8.6311057209968567e-02 -2.5153660774230957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 2.3408479988574982e-02</internalNodes>\n          <leafValues>\n            -3.7011519074440002e-02 2.5571560859680176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 -1.9710899796336889e-03</internalNodes>\n          <leafValues>\n            1.4960870146751404e-01 -1.3213759660720825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 915 -3.1434781849384308e-02</internalNodes>\n          <leafValues>\n            2.7072909474372864e-01 -2.4784140288829803e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 -2.0984669681638479e-03</internalNodes>\n          <leafValues>\n            -2.2842940688133240e-01 9.2392489314079285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 -1.0477580130100250e-01</internalNodes>\n          <leafValues>\n            1.3740949332714081e-01 -5.8604940772056580e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 1.2558500282466412e-02</internalNodes>\n          <leafValues>\n            9.4428263604640961e-02 -2.3187640309333801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 2.6465631090104580e-03</internalNodes>\n          <leafValues>\n            -2.0493589341640472e-01 9.2889577150344849e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 2.8069379925727844e-01</internalNodes>\n          <leafValues>\n            4.0848400443792343e-02 -4.6177521347999573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 -4.5882318168878555e-02</internalNodes>\n          <leafValues>\n            -7.1715551614761353e-01 9.1696027666330338e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 -1.3070689747110009e-03</internalNodes>\n          <leafValues>\n            1.6250529885292053e-01 -1.1437030136585236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 6.8374760448932648e-03</internalNodes>\n          <leafValues>\n            -6.7564792931079865e-02 2.1927219629287720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 -5.8329561725258827e-03</internalNodes>\n          <leafValues>\n            -3.5843908786773682e-01 5.7467628270387650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -4.0936999022960663e-02</internalNodes>\n          <leafValues>\n            -5.5129498243331909e-01 1.3819620013237000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 1.8727440387010574e-02</internalNodes>\n          <leafValues>\n            -5.2844639867544174e-02 3.4427130222320557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 1.0303989984095097e-03</internalNodes>\n          <leafValues>\n            -9.4872146844863892e-02 1.1235869675874710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 -2.6228028582409024e-04</internalNodes>\n          <leafValues>\n            6.3875511288642883e-02 -3.0397358536720276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 -2.6861110702157021e-02</internalNodes>\n          <leafValues>\n            1.7592920362949371e-01 -6.2506988644599915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 3.1061280518770218e-02</internalNodes>\n          <leafValues>\n            -7.2171129286289215e-02 3.1532520055770874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 -7.1269841864705086e-03</internalNodes>\n          <leafValues>\n            -1.2540310621261597e-01 1.0068179666996002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 -2.7709340676665306e-02</internalNodes>\n          <leafValues>\n            -8.0085551738739014e-01 2.5742180645465851e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 4.2209450155496597e-02</internalNodes>\n          <leafValues>\n            2.7846070006489754e-02 -5.6140202283859253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 6.2995860353112221e-03</internalNodes>\n          <leafValues>\n            1.0806919634342194e-01 -2.0114520192146301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 2.0048789680004120e-02</internalNodes>\n          <leafValues>\n            -5.8164618909358978e-02 1.8885469436645508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 -7.8481709351763129e-05</internalNodes>\n          <leafValues>\n            8.2995712757110596e-02 -2.1331989765167236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 -8.9945547282695770e-02</internalNodes>\n          <leafValues>\n            -7.9307717084884644e-01 7.8350491821765900e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 7.7181761153042316e-03</internalNodes>\n          <leafValues>\n            4.1435040533542633e-02 -3.7721860408782959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 5.3638177923858166e-03</internalNodes>\n          <leafValues>\n            -9.3567937612533569e-02 1.4666350185871124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 1.4555330388247967e-02</internalNodes>\n          <leafValues>\n            -5.6989211589097977e-02 3.4367969632148743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 1.0583730041980743e-01</internalNodes>\n          <leafValues>\n            3.0579300597310066e-02 -5.8684998750686646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 2.7123570907860994e-04</internalNodes>\n          <leafValues>\n            8.5480518639087677e-02 -2.2808749973773956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 -7.3196433484554291e-02</internalNodes>\n          <leafValues>\n            -5.1212561130523682e-01 9.6583841368556023e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 8.3729642210528255e-04</internalNodes>\n          <leafValues>\n            -1.7978319525718689e-01 1.4117470383644104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 1.9459549803286791e-03</internalNodes>\n          <leafValues>\n            8.7605938315391541e-02 -2.0442050695419312e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>78</maxWeakCount>\n      <stageThreshold>-3.0717300415039062e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 946 -8.5505366325378418e-02</internalNodes>\n          <leafValues>\n            2.6714649796485901e-01 -1.8152849376201630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 -3.7014279514551163e-02</internalNodes>\n          <leafValues>\n            3.7405461072921753e-01 -7.0312701165676117e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 1.6834780573844910e-02</internalNodes>\n          <leafValues>\n            8.9160107076168060e-02 -2.4566100537776947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 9.7268886747770011e-05</internalNodes>\n          <leafValues>\n            -1.9830940663814545e-01 1.4981469511985779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 5.2984068170189857e-03</internalNodes>\n          <leafValues>\n            -1.5779909491539001e-01 1.7095419764518738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 -2.3770859465003014e-02</internalNodes>\n          <leafValues>\n            -2.5096279382705688e-01 3.2790731638669968e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 -1.4852959662675858e-02</internalNodes>\n          <leafValues>\n            2.7263158559799194e-01 -7.2188302874565125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 -8.2722969353199005e-02</internalNodes>\n          <leafValues>\n            -6.6801771521568298e-02 1.3384120166301727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 6.4472708618268371e-04</internalNodes>\n          <leafValues>\n            -1.9309680163860321e-01 1.3628469407558441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 -4.3215509504079819e-04</internalNodes>\n          <leafValues>\n            5.7426910847425461e-02 -7.2983436286449432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 -7.5133621066925116e-06</internalNodes>\n          <leafValues>\n            1.2174469977617264e-01 -1.8166640400886536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 2.0493609830737114e-02</internalNodes>\n          <leafValues>\n            -6.1657600104808807e-02 3.8570550084114075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 -5.9959441423416138e-03</internalNodes>\n          <leafValues>\n            -1.8091249465942383e-01 1.1791180074214935e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 -9.3910521268844604e-01</internalNodes>\n          <leafValues>\n            3.1374409794807434e-01 -5.9216298162937164e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 -2.4341490119695663e-02</internalNodes>\n          <leafValues>\n            -3.7053358554840088e-01 5.5251110345125198e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 -7.6796777546405792e-02</internalNodes>\n          <leafValues>\n            1.3754889369010925e-01 -5.8201938867568970e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 -8.2179326564073563e-03</internalNodes>\n          <leafValues>\n            -2.5679248571395874e-01 9.9195696413516998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 -5.1702618598937988e-02</internalNodes>\n          <leafValues>\n            -5.2937638759613037e-01 2.7275180444121361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 6.3065597787499428e-03</internalNodes>\n          <leafValues>\n            -1.0400679707527161e-01 2.0388899743556976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 3.6337040364742279e-02</internalNodes>\n          <leafValues>\n            1.3178840279579163e-02 -3.8717061281204224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 -2.7929339557886124e-03</internalNodes>\n          <leafValues>\n            1.2351000308990479e-01 -2.0460779964923859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 -1.4435379765927792e-02</internalNodes>\n          <leafValues>\n            -5.0111377239227295e-01 3.7262540310621262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 6.4411992207169533e-03</internalNodes>\n          <leafValues>\n            -6.0557190328836441e-02 3.0578470230102539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 -1.2598140165209770e-03</internalNodes>\n          <leafValues>\n            5.3200751543045044e-02 -1.6916200518608093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 -6.9105648435652256e-03</internalNodes>\n          <leafValues>\n            -3.6398649215698242e-01 4.2843151837587357e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 -5.2663110196590424e-02</internalNodes>\n          <leafValues>\n            4.4169178605079651e-01 -3.2096829265356064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 -4.0925059467554092e-02</internalNodes>\n          <leafValues>\n            -5.5673360824584961e-01 2.9191689565777779e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 973 -2.1683140657842159e-03</internalNodes>\n          <leafValues>\n            6.6585853695869446e-02 -1.1715179681777954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 1.7480919137597084e-02</internalNodes>\n          <leafValues>\n            -6.7747853696346283e-02 3.4224361181259155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 1.3032980263233185e-01</internalNodes>\n          <leafValues>\n            1.0853439569473267e-02 -5.9894740581512451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 5.1362451631575823e-04</internalNodes>\n          <leafValues>\n            -1.8810969591140747e-01 1.0938909649848938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 977 -3.8764420896768570e-02</internalNodes>\n          <leafValues>\n            -2.6928341388702393e-01 2.0156569778919220e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 -4.8952922224998474e-03</internalNodes>\n          <leafValues>\n            -2.3670850694179535e-01 7.0693537592887878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 8.4380611777305603e-02</internalNodes>\n          <leafValues>\n            -6.1777111142873764e-02 1.5130819380283356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 -5.4832860827445984e-02</internalNodes>\n          <leafValues>\n            -4.9945160746574402e-01 3.5915810614824295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 -5.4148300550878048e-03</internalNodes>\n          <leafValues>\n            8.2116909325122833e-02 -1.3672749698162079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 1.2813720107078552e-01</internalNodes>\n          <leafValues>\n            -3.9755281060934067e-02 6.0340911149978638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 -4.4217561371624470e-03</internalNodes>\n          <leafValues>\n            -7.4642613530158997e-02 1.0235700011253357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 -7.1978997766564135e-06</internalNodes>\n          <leafValues>\n            7.4595592916011810e-02 -2.9046559333801270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 7.3321886360645294e-02</internalNodes>\n          <leafValues>\n            -2.1364469081163406e-02 6.9809699058532715e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 -2.2566469386219978e-02</internalNodes>\n          <leafValues>\n            -5.3714770078659058e-01 3.6509968340396881e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 -2.9338080435991287e-02</internalNodes>\n          <leafValues>\n            1.0626199841499329e-01 -3.1652290374040604e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 1.3684090226888657e-02</internalNodes>\n          <leafValues>\n            -5.7709541171789169e-02 3.0355650186538696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 -8.2646618830040097e-04</internalNodes>\n          <leafValues>\n            1.2958580255508423e-01 -1.3603089749813080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 990 3.9828647859394550e-03</internalNodes>\n          <leafValues>\n            5.0734668970108032e-02 -3.3896729350090027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 991 -2.0535979419946671e-02</internalNodes>\n          <leafValues>\n            2.6028490066528320e-01 -7.2259396314620972e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 992 -1.4932189881801605e-01</internalNodes>\n          <leafValues>\n            -5.4172599315643311e-01 4.4534388929605484e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 993 -1.7894789576530457e-02</internalNodes>\n          <leafValues>\n            4.7149929404258728e-01 -3.0801070854067802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 994 4.7443818766623735e-04</internalNodes>\n          <leafValues>\n            -1.9686989486217499e-01 1.2433020025491714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 995 -4.0598851628601551e-03</internalNodes>\n          <leafValues>\n            1.4028669893741608e-01 -4.7751329839229584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 996 -1.1755799874663353e-02</internalNodes>\n          <leafValues>\n            -2.6237910985946655e-01 5.9933070093393326e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 997 -1.8559649586677551e-02</internalNodes>\n          <leafValues>\n            1.0493250191211700e-01 -3.2159261405467987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 998 3.4838409628719091e-03</internalNodes>\n          <leafValues>\n            7.9499892890453339e-02 -2.0486010611057281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 999 -6.2133308500051498e-02</internalNodes>\n          <leafValues>\n            -3.5091090202331543e-01 1.2265560217201710e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1000 -4.4008668512105942e-02</internalNodes>\n          <leafValues>\n            2.6838389039039612e-01 -8.8284887373447418e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1001 3.0750890728086233e-03</internalNodes>\n          <leafValues>\n            -4.5581929385662079e-02 1.9343300163745880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1002 -8.9865371584892273e-02</internalNodes>\n          <leafValues>\n            -4.8605358600616455e-01 4.5101881027221680e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1003 -1.6210540197789669e-03</internalNodes>\n          <leafValues>\n            8.7722256779670715e-02 -1.6689349710941315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1004 -2.9370939359068871e-02</internalNodes>\n          <leafValues>\n            -4.2794701457023621e-01 4.5566789805889130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1005 -8.5921816527843475e-02</internalNodes>\n          <leafValues>\n            -6.9077378511428833e-01 1.5122929587960243e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1006 6.7258282797411084e-04</internalNodes>\n          <leafValues>\n            -1.1166089773178101e-01 1.5630759298801422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1007 1.7752440180629492e-03</internalNodes>\n          <leafValues>\n            -4.5409418642520905e-02 7.7933087944984436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1008 1.5036190234241076e-05</internalNodes>\n          <leafValues>\n            -1.6349479556083679e-01 1.0864420235157013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1009 1.8150300020352006e-03</internalNodes>\n          <leafValues>\n            9.6329912543296814e-02 -1.1818060278892517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1010 -6.7588366568088531e-02</internalNodes>\n          <leafValues>\n            2.2657020390033722e-01 -9.0492926537990570e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1011 1.8347490578889847e-02</internalNodes>\n          <leafValues>\n            1.6350140795111656e-02 -4.4877880811691284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1012 -1.0822510346770287e-02</internalNodes>\n          <leafValues>\n            -4.9622350931167603e-01 4.0703330188989639e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1013 1.7427999526262283e-02</internalNodes>\n          <leafValues>\n            -3.5475689917802811e-02 3.0856430530548096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1014 -7.8753121197223663e-02</internalNodes>\n          <leafValues>\n            -6.7144078016281128e-01 2.6170469820499420e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1015 7.3261657962575555e-04</internalNodes>\n          <leafValues>\n            -1.0309589654207230e-01 6.4503982663154602e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1016 2.8185009956359863e-02</internalNodes>\n          <leafValues>\n            -5.5124811828136444e-02 3.1133919954299927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1017 -1.5536470338702202e-02</internalNodes>\n          <leafValues>\n            -8.5527300834655762e-02 4.9024209380149841e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1018 -2.6290729641914368e-02</internalNodes>\n          <leafValues>\n            -6.5267199277877808e-01 2.4495759978890419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1019 -6.8586082197725773e-03</internalNodes>\n          <leafValues>\n            -5.8548830449581146e-02 2.8735989332199097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1020 -3.0750960577279329e-03</internalNodes>\n          <leafValues>\n            8.6425736546516418e-02 -2.2627249360084534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1021 5.6799430400133133e-02</internalNodes>\n          <leafValues>\n            2.9048459604382515e-02 -3.6798200011253357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1022 3.7182599306106567e-02</internalNodes>\n          <leafValues>\n            -3.5062279552221298e-02 4.5094621181488037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1023 -3.5590359475463629e-03</internalNodes>\n          <leafValues>\n            -1.7892469465732574e-01 6.8459518253803253e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>77</maxWeakCount>\n      <stageThreshold>-3.0740200042724609e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1024 -5.8595160953700542e-03</internalNodes>\n          <leafValues>\n            2.0132589340209961e-01 -2.6587140560150146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1025 -5.9507137537002563e-01</internalNodes>\n          <leafValues>\n            3.6134061217308044e-01 -1.2203159928321838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1026 4.1726600378751755e-02</internalNodes>\n          <leafValues>\n            -5.2889000624418259e-02 3.9082470536231995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1027 4.7253750264644623e-02</internalNodes>\n          <leafValues>\n            1.4923909679055214e-02 -5.0544148683547974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1028 9.8612194415181875e-04</internalNodes>\n          <leafValues>\n            -2.0337739586830139e-01 1.1030670255422592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1029 -7.2683179751038551e-03</internalNodes>\n          <leafValues>\n            -2.0899240672588348e-01 1.4733150601387024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1030 -2.9695410281419754e-02</internalNodes>\n          <leafValues>\n            6.6190290451049805e-01 -6.7257620394229889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1031 -1.3097229599952698e-01</internalNodes>\n          <leafValues>\n            1.7485789954662323e-01 -8.1029571592807770e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1032 1.7316760495305061e-02</internalNodes>\n          <leafValues>\n            -4.8908680677413940e-02 4.6843668818473816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1033 -1.0221409797668457e-01</internalNodes>\n          <leafValues>\n            -2.2275149822235107e-01 7.7479638159275055e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1034 2.9453460592776537e-03</internalNodes>\n          <leafValues>\n            3.9738278836011887e-02 -2.8107449412345886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1035 -4.5425590127706528e-02</internalNodes>\n          <leafValues>\n            2.4193780124187469e-01 1.3621949590742588e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1036 2.2699350956827402e-03</internalNodes>\n          <leafValues>\n            -1.6247589886188507e-01 1.6063609719276428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1037 1.1421869695186615e-01</internalNodes>\n          <leafValues>\n            1.5750480815768242e-02 -5.7382887601852417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1038 -4.1054069995880127e-02</internalNodes>\n          <leafValues>\n            3.0522629618644714e-01 -5.5898960679769516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1039 1.1980540119111538e-02</internalNodes>\n          <leafValues>\n            1.7477169632911682e-02 -4.0707069635391235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1040 1.2105259811505675e-03</internalNodes>\n          <leafValues>\n            -1.7840960621833801e-01 1.0353209823369980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1041 -2.2351980209350586e-02</internalNodes>\n          <leafValues>\n            -4.7567600011825562e-01 3.7311390042304993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1042 2.2135479375720024e-02</internalNodes>\n          <leafValues>\n            -5.4137628525495529e-02 4.2861071228981018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1043 -1.5875579789280891e-02</internalNodes>\n          <leafValues>\n            6.6373616456985474e-02 -1.6455489397048950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1044 6.0371369123458862e-02</internalNodes>\n          <leafValues>\n            3.8663931190967560e-02 -4.6496200561523438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1045 -5.1881238818168640e-02</internalNodes>\n          <leafValues>\n            -5.6141299009323120e-01 5.4471958428621292e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1046 1.9330360228195786e-03</internalNodes>\n          <leafValues>\n            -1.3475979864597321e-01 1.3747330009937286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1047 -4.3940469622612000e-03</internalNodes>\n          <leafValues>\n            -9.3405917286872864e-02 3.5123821347951889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1048 -5.2314151078462601e-02</internalNodes>\n          <leafValues>\n            7.5311762094497681e-01 -2.9210770502686501e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1049 -5.6897811591625214e-02</internalNodes>\n          <leafValues>\n            -9.1858989000320435e-01 2.8862420469522476e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1050 -2.1614639461040497e-01</internalNodes>\n          <leafValues>\n            -1. 6.9490820169448853e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1051 1.8479259312152863e-01</internalNodes>\n          <leafValues>\n            -8.8357992470264435e-02 1.9002689421176910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1052 -5.6834658607840538e-03</internalNodes>\n          <leafValues>\n            -1.7791560292243958e-01 9.8286077380180359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1053 -8.2448042929172516e-02</internalNodes>\n          <leafValues>\n            -3.4058651328086853e-01 1.5612719580531120e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1054 -7.5926659628748894e-03</internalNodes>\n          <leafValues>\n            2.5929468870162964e-01 -6.9370441138744354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1055 -2.9748380184173584e-03</internalNodes>\n          <leafValues>\n            5.4534178227186203e-02 -1.2630839645862579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1056 -1.6377970576286316e-01</internalNodes>\n          <leafValues>\n            -8.3725690841674805e-01 2.2446790710091591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1057 -3.8845320232212543e-03</internalNodes>\n          <leafValues>\n            -2.1008059382438660e-01 9.1814376413822174e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1058 -5.5496331304311752e-02</internalNodes>\n          <leafValues>\n            5.2739220857620239e-01 -3.8561638444662094e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1059 4.5041809789836407e-03</internalNodes>\n          <leafValues>\n            3.8907989859580994e-02 -2.1077489852905273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1060 5.7516310364007950e-02</internalNodes>\n          <leafValues>\n            -5.4442461580038071e-02 3.4977319836616516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1061 -5.4960879497230053e-03</internalNodes>\n          <leafValues>\n            1.0459329932928085e-01 -2.2956989705562592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1062 5.8753142366185784e-04</internalNodes>\n          <leafValues>\n            7.4045538902282715e-02 -2.3731130361557007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1063 1.1216119676828384e-01</internalNodes>\n          <leafValues>\n            -2.5916000828146935e-02 1.1389470100402832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1064 2.1753750741481781e-01</internalNodes>\n          <leafValues>\n            1.9727870821952820e-02 -9.6220922470092773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1065 -1.4632700476795435e-03</internalNodes>\n          <leafValues>\n            -9.4052821397781372e-02 6.4389176666736603e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1066 -8.6313979700207710e-03</internalNodes>\n          <leafValues>\n            2.5036060810089111e-01 -7.2234652936458588e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1067 -1.9858509302139282e-02</internalNodes>\n          <leafValues>\n            -1.2698090076446533e-01 7.9051487147808075e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1068 -1.3804109767079353e-04</internalNodes>\n          <leafValues>\n            1.4466640353202820e-01 -1.1444070190191269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1069 2.6781240478157997e-02</internalNodes>\n          <leafValues>\n            1.7647750675678253e-02 -8.3157891035079956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1070 1.9331119954586029e-02</internalNodes>\n          <leafValues>\n            -4.5500081032514572e-02 5.0110948085784912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1071 4.1692070662975311e-02</internalNodes>\n          <leafValues>\n            2.2502349689602852e-02 -3.8992220163345337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1072 1.1296980082988739e-01</internalNodes>\n          <leafValues>\n            -3.2494839280843735e-02 5.3929620981216431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1073 3.1683610286563635e-03</internalNodes>\n          <leafValues>\n            -1.7195589840412140e-01 9.3619801104068756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1074 5.3966748528182507e-03</internalNodes>\n          <leafValues>\n            5.7677630335092545e-02 -3.0436149239540100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1075 -1.3829180598258972e-01</internalNodes>\n          <leafValues>\n            -5.2158790826797485e-01 1.8444910645484924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1076 -1.2594119645655155e-02</internalNodes>\n          <leafValues>\n            2.2748909890651703e-01 -6.9325000047683716e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1077 -1.6514480113983154e-02</internalNodes>\n          <leafValues>\n            1.6279229521751404e-01 -3.4446150064468384e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1078 -1.6392849385738373e-02</internalNodes>\n          <leafValues>\n            -1.4277680218219757e-01 1.6290099918842316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1079 -3.4606490284204483e-02</internalNodes>\n          <leafValues>\n            -4.0356379747390747e-01 8.3033805713057518e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1080 -6.8894061259925365e-03</internalNodes>\n          <leafValues>\n            2.6890090107917786e-01 -6.9450862705707550e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1081 -1.1879400350153446e-02</internalNodes>\n          <leafValues>\n            2.1395209431648254e-01 -2.0930450409650803e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1082 -1.9165100529789925e-03</internalNodes>\n          <leafValues>\n            6.8464219570159912e-02 -3.1453219056129456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1083 1.3729350175708532e-03</internalNodes>\n          <leafValues>\n            -6.0340028256177902e-02 2.7572840452194214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1084 2.4278028868138790e-03</internalNodes>\n          <leafValues>\n            -2.3944500088691711e-01 8.4658838808536530e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1085 2.1290169097483158e-03</internalNodes>\n          <leafValues>\n            8.6938478052616119e-02 -2.8218480944633484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1086 -5.2569470426533371e-05</internalNodes>\n          <leafValues>\n            1.3682359457015991e-01 -1.1980649828910828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1087 1.5957899391651154e-02</internalNodes>\n          <leafValues>\n            -3.9610300213098526e-02 2.4825170636177063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1088 8.9294081553816795e-03</internalNodes>\n          <leafValues>\n            8.1123508512973785e-02 -2.6561570167541504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1089 4.9925308674573898e-02</internalNodes>\n          <leafValues>\n            1.5018629841506481e-02 -3.6647871136665344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1090 -1.7374839633703232e-02</internalNodes>\n          <leafValues>\n            3.3971020579338074e-01 -5.4494149982929230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1091 -7.8357063233852386e-02</internalNodes>\n          <leafValues>\n            -4.9435839056968689e-01 8.4990533068776131e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1092 -8.9894477277994156e-03</internalNodes>\n          <leafValues>\n            -2.3209859430789948e-01 7.1379087865352631e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1093 -1.5932919923216105e-03</internalNodes>\n          <leafValues>\n            8.2504719495773315e-02 -9.3123182654380798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1094 2.6272730901837349e-03</internalNodes>\n          <leafValues>\n            -1.3213430345058441e-01 1.3099829852581024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1095 -5.9108160436153412e-02</internalNodes>\n          <leafValues>\n            -3.7229761481285095e-01 4.5574661344289780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1096 3.5086690913885832e-03</internalNodes>\n          <leafValues>\n            8.9478462934494019e-02 -1.8543410301208496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1097 1.5465220436453819e-02</internalNodes>\n          <leafValues>\n            -3.0604820698499680e-02 2.0754580199718475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1098 -1.1749019846320152e-02</internalNodes>\n          <leafValues>\n            3.9200168848037720e-01 -4.1100859642028809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1099 4.8413608223199844e-02</internalNodes>\n          <leafValues>\n            3.7391050718724728e-03 -8.5701841115951538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1100 -1.1499889660626650e-03</internalNodes>\n          <leafValues>\n            -2.2441549599170685e-01 7.1305088698863983e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>89</maxWeakCount>\n      <stageThreshold>-3.0760700225830078e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1101 -3.2420051097869873e-01</internalNodes>\n          <leafValues>\n            4.1447758674621582e-01 -1.0684230178594589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1102 -2.1065689623355865e-01</internalNodes>\n          <leafValues>\n            2.3302809894084930e-01 -9.4695799052715302e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1103 -2.1540550515055656e-02</internalNodes>\n          <leafValues>\n            -2.8891721367835999e-01 7.0666067302227020e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1104 5.9726871550083160e-03</internalNodes>\n          <leafValues>\n            -9.0559490025043488e-02 2.2989599406719208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1105 2.6468100026249886e-02</internalNodes>\n          <leafValues>\n            -5.0254050642251968e-02 3.9346438646316528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1106 -7.2531126439571381e-02</internalNodes>\n          <leafValues>\n            -3.9421468973159790e-01 7.5547359883785248e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1107 -4.3684918433427811e-02</internalNodes>\n          <leafValues>\n            -5.7553547620773315e-01 5.1893319934606552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1108 1.1670660227537155e-01</internalNodes>\n          <leafValues>\n            -2.5791339576244354e-03 -8.2597649097442627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1109 -8.2381166517734528e-02</internalNodes>\n          <leafValues>\n            7.5818961858749390e-01 -2.6576930657029152e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1110 -2.3157079704105854e-03</internalNodes>\n          <leafValues>\n            6.6858686506748199e-02 -3.0407869815826416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1111 -1.6678189858794212e-02</internalNodes>\n          <leafValues>\n            3.8525319099426270e-01 -4.8842679709196091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1112 -3.0678999610245228e-03</internalNodes>\n          <leafValues>\n            -2.7150988578796387e-01 6.4561262726783752e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1113 -8.3884904161095619e-03</internalNodes>\n          <leafValues>\n            -2.8267300128936768e-01 7.0778891444206238e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1114 2.1357910707592964e-02</internalNodes>\n          <leafValues>\n            -6.6106483340263367e-02 3.1867539882659912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1115 -4.0636979974806309e-03</internalNodes>\n          <leafValues>\n            1.1739840358495712e-01 -1.5105929970741272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1116 -1.1475679930299520e-03</internalNodes>\n          <leafValues>\n            6.4262896776199341e-02 -7.4472077190876007e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1117 1.8145689740777016e-02</internalNodes>\n          <leafValues>\n            -5.6946009397506714e-02 4.2107149958610535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1118 5.0288350321352482e-03</internalNodes>\n          <leafValues>\n            8.3866670727729797e-02 -3.3929398655891418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1119 -5.7916361838579178e-02</internalNodes>\n          <leafValues>\n            4.5170179009437561e-01 -4.3198868632316589e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1120 3.1025299802422523e-02</internalNodes>\n          <leafValues>\n            2.8000740334391594e-02 -1.6818940639495850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1121 8.2134291529655457e-02</internalNodes>\n          <leafValues>\n            1.9999530166387558e-02 -7.6910507678985596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1122 7.3666572570800781e-02</internalNodes>\n          <leafValues>\n            -1.2391459895297885e-03 -1.0004559755325317e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1123 1.5681830700486898e-04</internalNodes>\n          <leafValues>\n            -1.2154590338468552e-01 1.3561969995498657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1124 4.5130930840969086e-02</internalNodes>\n          <leafValues>\n            4.7123869881033897e-03 -2.9671049118041992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1125 -5.1468348829075694e-04</internalNodes>\n          <leafValues>\n            1.4606890082359314e-01 -1.3600480556488037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1126 -1.4981119893491268e-02</internalNodes>\n          <leafValues>\n            -1.7933659255504608e-01 5.3928699344396591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1127 -2.7151789516210556e-02</internalNodes>\n          <leafValues>\n            -6.7529010772705078e-01 2.3046780377626419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1128 -6.6578023135662079e-02</internalNodes>\n          <leafValues>\n            -6.5586429834365845e-01 4.7667929902672768e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1129 -3.3119178842753172e-03</internalNodes>\n          <leafValues>\n            1.2255000323057175e-01 -1.6333930194377899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1130 -1.5811180695891380e-02</internalNodes>\n          <leafValues>\n            -4.4731178879737854e-01 8.9029967784881592e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1131 -5.6757620768621564e-05</internalNodes>\n          <leafValues>\n            1.4944350719451904e-01 -1.0686829686164856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1132 1.0602490045130253e-02</internalNodes>\n          <leafValues>\n            2.1685829386115074e-02 -3.2208129763603210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1133 2.1245649550110102e-03</internalNodes>\n          <leafValues>\n            -2.0425739884376526e-01 8.2330957055091858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1134 4.7638580203056335e-02</internalNodes>\n          <leafValues>\n            -3.2728441059589386e-02 4.4726258516311646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1135 -1.1300199665129185e-02</internalNodes>\n          <leafValues>\n            2.5546020269393921e-01 -6.9969899952411652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1136 -1.1472209589555860e-03</internalNodes>\n          <leafValues>\n            4.7467790544033051e-02 -2.2220790386199951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1137 1.8008640035986900e-02</internalNodes>\n          <leafValues>\n            -6.0860209167003632e-02 2.9082441329956055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1138 -1.1634260416030884e-02</internalNodes>\n          <leafValues>\n            -3.1474921107292175e-01 8.3630897104740143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1139 6.5580541267991066e-03</internalNodes>\n          <leafValues>\n            -1.2121830135583878e-01 1.3124500215053558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1140 -2.3253620602190495e-03</internalNodes>\n          <leafValues>\n            -8.7138622999191284e-02 7.0476517081260681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1141 2.1486220881342888e-02</internalNodes>\n          <leafValues>\n            -3.5936549305915833e-02 4.3737021088600159e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1142 1.2589399516582489e-01</internalNodes>\n          <leafValues>\n            1.2443150393664837e-02 -9.2822617292404175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1143 -2.2191529569681734e-04</internalNodes>\n          <leafValues>\n            6.9798342883586884e-02 -3.2106238603591919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1144 -5.8175198733806610e-02</internalNodes>\n          <leafValues>\n            -7.7025629580020905e-02 9.6747986972332001e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1145 -4.5887380838394165e-04</internalNodes>\n          <leafValues>\n            1.1412449926137924e-01 -1.4719170331954956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1146 -4.0837019681930542e-02</internalNodes>\n          <leafValues>\n            4.7654581069946289e-01 -4.9737568944692612e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1147 -9.7786840051412582e-03</internalNodes>\n          <leafValues>\n            -2.0513780415058136e-01 8.4468983113765717e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1148 2.7964261174201965e-01</internalNodes>\n          <leafValues>\n            -3.0034869909286499e-02 6.9526249170303345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1149 -8.8869117200374603e-02</internalNodes>\n          <leafValues>\n            2.4081839621067047e-01 -7.0576377213001251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1150 -1.4095460064709187e-02</internalNodes>\n          <leafValues>\n            -1.0456439852714539e-01 4.6604979783296585e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1151 2.6836670003831387e-03</internalNodes>\n          <leafValues>\n            6.0495968908071518e-02 -2.5784969329833984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1152 8.7051279842853546e-02</internalNodes>\n          <leafValues>\n            -2.4173669517040253e-02 2.4043059349060059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1153 -1.0178039781749249e-02</internalNodes>\n          <leafValues>\n            2.5469788908958435e-01 -9.2890508472919464e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1154 -9.0314531698822975e-03</internalNodes>\n          <leafValues>\n            -2.6343479752540588e-01 7.0848807692527771e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1155 -6.7082298919558525e-03</internalNodes>\n          <leafValues>\n            2.3313470184803009e-01 -7.6271809637546539e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1156 -6.7614473402500153e-02</internalNodes>\n          <leafValues>\n            -5.2013260126113892e-01 1.3785160146653652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1157 -3.9636880159378052e-01</internalNodes>\n          <leafValues>\n            -7.6267188787460327e-01 2.0686520263552666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1158 1.2813470093533397e-03</internalNodes>\n          <leafValues>\n            -1.4046239852905273e-01 1.2711919844150543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1159 8.4416065365076065e-03</internalNodes>\n          <leafValues>\n            7.4712827801704407e-02 -2.5663131475448608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1160 1.4749030015082099e-05</internalNodes>\n          <leafValues>\n            -1.4015120267868042e-01 1.5210489928722382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1161 -4.5073211193084717e-02</internalNodes>\n          <leafValues>\n            -6.4262861013412476e-01 2.5925450026988983e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1162 7.7068619430065155e-03</internalNodes>\n          <leafValues>\n            3.2485689967870712e-02 -2.0377029478549957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1163 5.9383822372183204e-04</internalNodes>\n          <leafValues>\n            -1.2950329482555389e-01 1.6219380497932434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1164 -1.3042639475315809e-03</internalNodes>\n          <leafValues>\n            8.6318843066692352e-02 -1.9224709272384644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1165 6.4417850226163864e-03</internalNodes>\n          <leafValues>\n            -7.1506053209304810e-02 3.0627349019050598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1166 -1.5630330890417099e-02</internalNodes>\n          <leafValues>\n            4.9515549093484879e-02 -1.4840349555015564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1167 1.1395620182156563e-02</internalNodes>\n          <leafValues>\n            6.3355296850204468e-02 -2.5576409697532654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1168 4.7544430941343307e-02</internalNodes>\n          <leafValues>\n            4.8167328350245953e-03 -7.8987777233123779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1169 8.3856023848056793e-03</internalNodes>\n          <leafValues>\n            -4.3012011796236038e-02 4.1108319163322449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1170 -1.6369849909096956e-03</internalNodes>\n          <leafValues>\n            8.2473292946815491e-02 -7.8956812620162964e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1171 -1.6513109207153320e-02</internalNodes>\n          <leafValues>\n            -5.0692492723464966e-01 3.9071910083293915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1172 1.0358359664678574e-01</internalNodes>\n          <leafValues>\n            2.0772270858287811e-02 -6.9371747970581055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1173 3.3361840993165970e-02</internalNodes>\n          <leafValues>\n            -4.4479008764028549e-02 4.6392819285392761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1174 -2.8664430603384972e-02</internalNodes>\n          <leafValues>\n            -4.5883670449256897e-01 3.5676170140504837e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1175 -1.1209170043002814e-04</internalNodes>\n          <leafValues>\n            8.4344513714313507e-02 -2.1555650234222412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1176 1.7690200358629227e-02</internalNodes>\n          <leafValues>\n            9.7461966797709465e-03 -8.5261541604995728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1177 -2.1878469735383987e-02</internalNodes>\n          <leafValues>\n            2.6345950365066528e-01 -7.0220641791820526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1178 -1.2424430251121521e-01</internalNodes>\n          <leafValues>\n            -2.8659409284591675e-01 2.1816140040755272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1179 6.5736092627048492e-02</internalNodes>\n          <leafValues>\n            2.3600580170750618e-02 -7.0263791084289551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1180 -4.4633701443672180e-02</internalNodes>\n          <leafValues>\n            -9.5776432752609253e-01 3.5877549089491367e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1181 -6.4271576702594757e-02</internalNodes>\n          <leafValues>\n            6.0099518299102783e-01 -2.8557619079947472e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1182 5.6516240874771029e-05</internalNodes>\n          <leafValues>\n            -1.3485489785671234e-01 1.1080929636955261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1183 1.3419260503724217e-03</internalNodes>\n          <leafValues>\n            9.8325006663799286e-02 -1.6883499920368195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1184 -2.1889729425311089e-02</internalNodes>\n          <leafValues>\n            -2.1880550682544708e-01 2.9620679095387459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1185 -1.9670790061354637e-03</internalNodes>\n          <leafValues>\n            9.7642809152603149e-02 -1.8062870204448700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1186 -7.6196521520614624e-02</internalNodes>\n          <leafValues>\n            -8.6387622356414795e-01 7.3730680160224438e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1187 -7.9841358819976449e-04</internalNodes>\n          <leafValues>\n            1.5353679656982422e-01 -1.2105809897184372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1188 -8.2246732199564576e-04</internalNodes>\n          <leafValues>\n            4.0794339030981064e-02 -1.3737790286540985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1189 -3.0324649997055531e-03</internalNodes>\n          <leafValues>\n            1.2088210135698318e-01 -1.4088730514049530e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>107</maxWeakCount>\n      <stageThreshold>-3.0838300704956055e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1190 -5.2718650549650192e-02</internalNodes>\n          <leafValues>\n            2.5985679030418396e-01 -1.5721979737281799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1191 5.1614670082926750e-03</internalNodes>\n          <leafValues>\n            -1.0271859914064407e-01 5.9346981346607208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1192 6.7699067294597626e-02</internalNodes>\n          <leafValues>\n            -7.7311262488365173e-02 2.8602010011672974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1193 -3.3822011202573776e-02</internalNodes>\n          <leafValues>\n            -5.6999057531356812e-01 4.0684528648853302e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1194 -5.3746398538351059e-02</internalNodes>\n          <leafValues>\n            -4.7421398758888245e-01 6.2751591205596924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1195 -3.0559560284018517e-02</internalNodes>\n          <leafValues>\n            7.1638780832290649e-01 -1.7423950135707855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1196 -3.3822011202573776e-02</internalNodes>\n          <leafValues>\n            -6.7283177375793457e-01 -1.2177439639344811e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1197 2.7876009698957205e-04</internalNodes>\n          <leafValues>\n            -7.0205226540565491e-02 1.1648730188608170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1198 -2.5016230065375566e-03</internalNodes>\n          <leafValues>\n            1.2915210425853729e-01 -1.3576079905033112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1199 9.0835839509963989e-02</internalNodes>\n          <leafValues>\n            4.1303969919681549e-03 4.0111660957336426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1200 -2.5603260844945908e-02</internalNodes>\n          <leafValues>\n            -1.0059480369091034e-01 1.8819159269332886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1201 -5.2134461700916290e-02</internalNodes>\n          <leafValues>\n            2.5282728672027588e-01 -1.1447659879922867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1202 3.8462068885564804e-02</internalNodes>\n          <leafValues>\n            5.5828869342803955e-02 -5.7635480165481567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1203 -1.4195869443938136e-03</internalNodes>\n          <leafValues>\n            4.5769099146127701e-02 -1.6001120209693909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1204 -7.6488167047500610e-02</internalNodes>\n          <leafValues>\n            -5.2531337738037109e-01 5.2011650055646896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1205 1.2786199804395437e-03</internalNodes>\n          <leafValues>\n            7.6051406562328339e-02 -2.5104090571403503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1206 -1.2661969522014260e-03</internalNodes>\n          <leafValues>\n            -1.2411650270223618e-01 1.6375949978828430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1207 -9.0841390192508698e-03</internalNodes>\n          <leafValues>\n            2.2613930702209473e-01 -5.4559618234634399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1208 7.4418167059775442e-05</internalNodes>\n          <leafValues>\n            -1.6488799452781677e-01 1.0864400118589401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1209 -2.5643699336796999e-03</internalNodes>\n          <leafValues>\n            -1.8933239579200745e-01 1.0298830270767212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1210 -3.4997228533029556e-02</internalNodes>\n          <leafValues>\n            2.3746269941329956e-01 -8.2390688359737396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1211 -1.9422829151153564e-02</internalNodes>\n          <leafValues>\n            -9.9691540002822876e-02 4.0376558899879456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1212 -5.9601478278636932e-02</internalNodes>\n          <leafValues>\n            -9.1162431240081787e-01 1.8367420881986618e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1213 3.4046408534049988e-01</internalNodes>\n          <leafValues>\n            6.0519641265273094e-03 -4.4584161043167114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1214 6.5878271125257015e-03</internalNodes>\n          <leafValues>\n            -9.5767751336097717e-02 1.8087559938430786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1215 5.3841830231249332e-03</internalNodes>\n          <leafValues>\n            5.2658561617136002e-02 -4.5202389359474182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1216 7.9094972461462021e-03</internalNodes>\n          <leafValues>\n            3.8064301013946533e-02 -4.5984381437301636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1217 -1.7566539347171783e-02</internalNodes>\n          <leafValues>\n            1.1139140278100967e-01 -2.9564509168267250e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1218 -1.1352599831297994e-03</internalNodes>\n          <leafValues>\n            1.0825510323047638e-01 -1.8355409801006317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1219 1.4237280189990997e-01</internalNodes>\n          <leafValues>\n            -3.1995229423046112e-02 3.8099318742752075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1220 -1.0024409741163254e-01</internalNodes>\n          <leafValues>\n            -7.7461862564086914e-01 2.3992599919438362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1221 -1.2453799694776535e-01</internalNodes>\n          <leafValues>\n            2.1255059540271759e-01 -9.1748759150505066e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1222 1.9641380012035370e-01</internalNodes>\n          <leafValues>\n            3.3028271049261093e-02 -6.0223150253295898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1223 -4.1467338800430298e-02</internalNodes>\n          <leafValues>\n            -8.8264447450637817e-01 1.3399540446698666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1224 -3.0020199716091156e-02</internalNodes>\n          <leafValues>\n            5.8158951997756958e-01 -3.9801310747861862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1225 1.9002150744199753e-02</internalNodes>\n          <leafValues>\n            -2.4508230388164520e-02 3.2259100675582886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1226 -1.0837280191481113e-02</internalNodes>\n          <leafValues>\n            -2.5428688526153564e-01 7.3384523391723633e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1227 -2.4493860080838203e-02</internalNodes>\n          <leafValues>\n            1.4883559942245483e-01 -3.6729950457811356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1228 4.7652618959546089e-03</internalNodes>\n          <leafValues>\n            1.2693640589714050e-01 -1.9157619774341583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1229 -1.2438010424375534e-02</internalNodes>\n          <leafValues>\n            7.1727007627487183e-02 -2.5421911478042603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1230 2.1275319159030914e-02</internalNodes>\n          <leafValues>\n            -4.9392588436603546e-02 5.2715432643890381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1231 -6.7369833588600159e-02</internalNodes>\n          <leafValues>\n            -4.6891281008720398e-01 4.2881548404693604e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1232 -1.0925510432571173e-03</internalNodes>\n          <leafValues>\n            1.1250150203704834e-01 -1.3688379526138306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1233 -9.7863428294658661e-02</internalNodes>\n          <leafValues>\n            -8.5167092084884644e-01 7.9745445400476456e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1234 -2.0980979315936565e-03</internalNodes>\n          <leafValues>\n            7.2556197643280029e-02 -2.1253560483455658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1235 4.4975668191909790e-02</internalNodes>\n          <leafValues>\n            -6.4254011958837509e-03 6.7334640026092529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1236 -2.0970530807971954e-02</internalNodes>\n          <leafValues>\n            -1.5341369807720184e-01 1.1229439824819565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1237 7.1862142067402601e-04</internalNodes>\n          <leafValues>\n            -1.3690039515495300e-01 1.2323109805583954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1238 1.1921999976038933e-02</internalNodes>\n          <leafValues>\n            -5.2036911249160767e-02 3.5095539689064026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1239 -1.2956890277564526e-02</internalNodes>\n          <leafValues>\n            8.7813578546047211e-02 -2.8173919767141342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1240 -2.7972649782896042e-02</internalNodes>\n          <leafValues>\n            -5.9018450975418091e-01 2.4770129472017288e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1241 -6.0088839381933212e-03</internalNodes>\n          <leafValues>\n            -6.5963357686996460e-02 3.6277290433645248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1242 -4.0854439139366150e-03</internalNodes>\n          <leafValues>\n            1.8211939930915833e-01 -8.9567668735980988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1243 6.3200960867106915e-03</internalNodes>\n          <leafValues>\n            2.3888850584626198e-02 -1.0606460273265839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1244 2.0633619278669357e-02</internalNodes>\n          <leafValues>\n            -3.8176801055669785e-02 5.2134162187576294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1245 -2.5221719406545162e-03</internalNodes>\n          <leafValues>\n            4.6510368585586548e-02 -9.3957871198654175e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1246 -4.6648699790239334e-03</internalNodes>\n          <leafValues>\n            -2.3734979331493378e-01 8.0608420073986053e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1247 2.5844529736787081e-03</internalNodes>\n          <leafValues>\n            -2.4275559931993484e-02 2.2888250648975372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1248 -1.4966880371503066e-05</internalNodes>\n          <leafValues>\n            9.9380202591419220e-02 -1.9830170273780823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1249 6.2676537781953812e-03</internalNodes>\n          <leafValues>\n            -7.4367232620716095e-02 2.2790339589118958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1250 2.6347549632191658e-02</internalNodes>\n          <leafValues>\n            1.9285459071397781e-02 -8.8683319091796875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1251 -6.0268949717283249e-02</internalNodes>\n          <leafValues>\n            1.2562690675258636e-01 -3.3716868609189987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1252 -3.8371770642697811e-03</internalNodes>\n          <leafValues>\n            -1.7735309898853302e-01 8.8588736951351166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1253 -3.5063549876213074e-03</internalNodes>\n          <leafValues>\n            -8.7100908160209656e-02 5.6650858372449875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1254 -8.1536881625652313e-03</internalNodes>\n          <leafValues>\n            2.5863811373710632e-01 -5.9690609574317932e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1255 3.8574129343032837e-02</internalNodes>\n          <leafValues>\n            8.4148198366165161e-03 -4.3409061431884766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1256 -3.9269659668207169e-02</internalNodes>\n          <leafValues>\n            3.5469511151313782e-01 -4.3248169124126434e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1257 -1.7512469785287976e-03</internalNodes>\n          <leafValues>\n            8.6816087365150452e-02 -9.6924632787704468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1258 -8.4061250090599060e-02</internalNodes>\n          <leafValues>\n            -6.5256571769714355e-01 2.4765320122241974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1259 -4.3417539447546005e-02</internalNodes>\n          <leafValues>\n            -5.6205427646636963e-01 9.8713487386703491e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1260 -1.3643169775605202e-02</internalNodes>\n          <leafValues>\n            2.4562139809131622e-01 -6.0552708804607391e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1261 1.6490360721945763e-02</internalNodes>\n          <leafValues>\n            3.8866888731718063e-02 -2.7715849876403809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1262 -1.4422900043427944e-02</internalNodes>\n          <leafValues>\n            -2.2820469737052917e-01 5.9026841074228287e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1263 2.7178740128874779e-03</internalNodes>\n          <leafValues>\n            -1.1887180060148239e-01 1.2192229926586151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1264 6.3701239414513111e-03</internalNodes>\n          <leafValues>\n            -1.7167779803276062e-01 9.9555417895317078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1265 8.1290200352668762e-02</internalNodes>\n          <leafValues>\n            -2.2509740665555000e-02 2.4472869932651520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1266 -1.4793650188948959e-04</internalNodes>\n          <leafValues>\n            8.0845691263675690e-02 -2.1680369973182678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1267 -6.9097941741347313e-04</internalNodes>\n          <leafValues>\n            6.2281239777803421e-02 -1.4082409441471100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1268 -1.1455359868705273e-02</internalNodes>\n          <leafValues>\n            -1.1722529679536819e-01 1.5948510169982910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1269 -1.6334399580955505e-01</internalNodes>\n          <leafValues>\n            -3.4727150201797485e-01 1.1003250256180763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1270 -6.8652302026748657e-02</internalNodes>\n          <leafValues>\n            2.5441581010818481e-01 -7.8778758645057678e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1271 6.9226641207933426e-03</internalNodes>\n          <leafValues>\n            -2.9800569638609886e-02 2.0455279946327209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1272 -1.0851600021123886e-01</internalNodes>\n          <leafValues>\n            -4.7375029325485229e-01 4.0704440325498581e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1273 5.8868151158094406e-02</internalNodes>\n          <leafValues>\n            1.3014429714530706e-03 -1.0001180171966553e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1274 1.5332780312746763e-03</internalNodes>\n          <leafValues>\n            -1.6441990435123444e-01 9.9495269358158112e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1275 -2.5576220359653234e-03</internalNodes>\n          <leafValues>\n            8.1458933651447296e-02 -9.0945683419704437e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1276 3.6009950563311577e-03</internalNodes>\n          <leafValues>\n            8.6760893464088440e-02 -1.9872209429740906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1277 1.0986080393195152e-02</internalNodes>\n          <leafValues>\n            -4.8230320215225220e-02 1.9264499843120575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1278 -4.4403300853446126e-04</internalNodes>\n          <leafValues>\n            2.0115670561790466e-01 -8.3059810101985931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1279 2.9464240651577711e-04</internalNodes>\n          <leafValues>\n            -1.2808699905872345e-01 6.6652536392211914e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1280 -4.1320081800222397e-02</internalNodes>\n          <leafValues>\n            -5.3510922193527222e-01 2.9578590765595436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1281 8.1929996609687805e-02</internalNodes>\n          <leafValues>\n            -1.6939610242843628e-02 7.6524221897125244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1282 1.4758399687707424e-02</internalNodes>\n          <leafValues>\n            2.7206780388951302e-02 -6.2607800960540771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1283 -1.7577099800109863e-01</internalNodes>\n          <leafValues>\n            1.0328330099582672e-01 -5.1863618195056915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1284 -1.0492449626326561e-02</internalNodes>\n          <leafValues>\n            -1.9424819946289062e-01 8.5835307836532593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1285 -5.6793028488755226e-03</internalNodes>\n          <leafValues>\n            1.6252349317073822e-01 -1.1607410013675690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1286 -7.7026091516017914e-02</internalNodes>\n          <leafValues>\n            -1.6585369408130646e-01 1.0487639904022217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1287 8.8255241513252258e-02</internalNodes>\n          <leafValues>\n            -4.2857029475271702e-03 1.0002230405807495e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1288 -2.5600788649171591e-04</internalNodes>\n          <leafValues>\n            1.3218410313129425e-01 -1.4754749834537506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1289 3.4532468765974045e-02</internalNodes>\n          <leafValues>\n            -4.7874059528112411e-02 2.7708581089973450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1290 1.0978250205516815e-01</internalNodes>\n          <leafValues>\n            -2.1606300026178360e-02 8.5059100389480591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1291 3.6717768758535385e-02</internalNodes>\n          <leafValues>\n            1.6276430338621140e-02 -8.9000707864761353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1292 -6.1206728219985962e-02</internalNodes>\n          <leafValues>\n            5.4838019609451294e-01 -3.1625121831893921e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1293 2.9046889394521713e-03</internalNodes>\n          <leafValues>\n            4.1483800858259201e-02 -8.6054533720016479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1294 6.9003179669380188e-02</internalNodes>\n          <leafValues>\n            -2.6552880182862282e-02 6.0647368431091309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1295 7.0049421628937125e-04</internalNodes>\n          <leafValues>\n            -1.9934299588203430e-01 7.5443200767040253e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1296 3.4873239696025848e-02</internalNodes>\n          <leafValues>\n            3.9036870002746582e-02 -4.2251279950141907e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>71</maxWeakCount>\n      <stageThreshold>-3.0640199661254883e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1297 5.4466608911752701e-02</internalNodes>\n          <leafValues>\n            -1.3182820379734039e-01 2.7660441398620605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1298 -2.1856650710105896e-02</internalNodes>\n          <leafValues>\n            2.5475510954856873e-01 -8.4045611321926117e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1299 6.6198781132698059e-03</internalNodes>\n          <leafValues>\n            7.1489393711090088e-02 -2.6304081082344055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1300 8.8211596012115479e-03</internalNodes>\n          <leafValues>\n            -1.3396710157394409e-01 1.4222930371761322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1301 -2.3251229524612427e-01</internalNodes>\n          <leafValues>\n            -3.4628748893737793e-01 5.6767478585243225e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1302 2.8472349047660828e-01</internalNodes>\n          <leafValues>\n            8.6089121177792549e-03 -1.0012650489807129e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1303 4.2303521186113358e-02</internalNodes>\n          <leafValues>\n            -9.1637752950191498e-02 1.9090470671653748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1304 4.9781981855630875e-02</internalNodes>\n          <leafValues>\n            2.9709989205002785e-02 -3.5961869359016418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1305 -4.8924300819635391e-02</internalNodes>\n          <leafValues>\n            -3.8387179374694824e-01 5.5182989686727524e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1306 -7.7399803558364511e-05</internalNodes>\n          <leafValues>\n            -1.2758800387382507e-01 9.4793520867824554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1307 -2.4455290287733078e-02</internalNodes>\n          <leafValues>\n            4.6911829710006714e-01 -5.1782071590423584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1308 2.5210820138454437e-02</internalNodes>\n          <leafValues>\n            4.4035088270902634e-02 -1.7653049528598785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1309 -4.7570910304784775e-02</internalNodes>\n          <leafValues>\n            -5.3332722187042236e-01 4.6693909913301468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1310 -1.4046980440616608e-01</internalNodes>\n          <leafValues>\n            3.2798460125923157e-01 -6.5607719123363495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1311 -1.0932429879903793e-01</internalNodes>\n          <leafValues>\n            -5.9276747703552246e-01 3.0543249100446701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1312 -9.8567470908164978e-02</internalNodes>\n          <leafValues>\n            3.6753898859024048e-01 -6.6568426787853241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1313 -7.6861098408699036e-02</internalNodes>\n          <leafValues>\n            -1.3722559809684753e-01 1.7806069552898407e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1314 -2.1035360172390938e-02</internalNodes>\n          <leafValues>\n            4.3632039427757263e-01 -2.9524799436330795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1315 1.3428479433059692e-03</internalNodes>\n          <leafValues>\n            -2.4420669674873352e-01 1.1969459801912308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1316 -3.4433171153068542e-02</internalNodes>\n          <leafValues>\n            2.7110278606414795e-01 -7.5950436294078827e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1317 1.7944410210475326e-03</internalNodes>\n          <leafValues>\n            -1.7997020483016968e-01 1.3508750498294830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1318 -9.6644267439842224e-02</internalNodes>\n          <leafValues>\n            -7.6689988374710083e-01 1.5435869805514812e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1319 2.5092919822782278e-03</internalNodes>\n          <leafValues>\n            -1.2506179511547089e-01 1.8814159929752350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1320 -2.2511319257318974e-03</internalNodes>\n          <leafValues>\n            7.8268818557262421e-02 -7.2636753320693970e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1321 -7.4670952017186210e-06</internalNodes>\n          <leafValues>\n            7.6933227479457855e-02 -2.6148709654808044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1322 2.6573959738016129e-02</internalNodes>\n          <leafValues>\n            2.2534679621458054e-02 -1.6299429535865784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1323 1.7086470499634743e-02</internalNodes>\n          <leafValues>\n            -5.8232828974723816e-02 3.6095941066741943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1324 3.0147018842399120e-03</internalNodes>\n          <leafValues>\n            1.2817589938640594e-01 -1.8230159580707550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1325 9.4206426292657852e-03</internalNodes>\n          <leafValues>\n            8.9825786650180817e-02 -2.6877298951148987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1326 7.5143040157854557e-04</internalNodes>\n          <leafValues>\n            8.8295407593250275e-02 -2.3304849863052368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1327 -1.0687969624996185e-02</internalNodes>\n          <leafValues>\n            3.0612778663635254e-01 -6.5760366618633270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1328 7.5001686811447144e-02</internalNodes>\n          <leafValues>\n            4.3955240398645401e-03 -7.5094991922378540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1329 5.0849020481109619e-02</internalNodes>\n          <leafValues>\n            2.0524559542536736e-02 -8.3406442403793335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1330 2.3555630818009377e-02</internalNodes>\n          <leafValues>\n            3.6320169456303120e-03 -8.8322782516479492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1331 -1.6827480867505074e-02</internalNodes>\n          <leafValues>\n            -6.5697771310806274e-01 2.3138659074902534e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1332 1.9977349787950516e-02</internalNodes>\n          <leafValues>\n            -2.3847330361604691e-02 3.2636478543281555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1333 3.1397528946399689e-02</internalNodes>\n          <leafValues>\n            -3.6343611776828766e-02 4.4792640209197998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1334 -9.3282759189605713e-02</internalNodes>\n          <leafValues>\n            -5.2942079305648804e-01 6.3824458047747612e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1335 -7.7012612018734217e-04</internalNodes>\n          <leafValues>\n            1.5420450270175934e-01 -1.5751419961452484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1336 4.6891491860151291e-02</internalNodes>\n          <leafValues>\n            1.1802299879491329e-02 -7.3092728853225708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1337 -3.4607138950377703e-03</internalNodes>\n          <leafValues>\n            1.1565960198640823e-01 -1.7568419873714447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1338 -3.3493418246507645e-02</internalNodes>\n          <leafValues>\n            -6.8049472570419312e-01 5.1433579064905643e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1339 -5.5793918669223785e-02</internalNodes>\n          <leafValues>\n            -5.3908890485763550e-01 3.2008830457925797e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1340 5.1339478231966496e-03</internalNodes>\n          <leafValues>\n            -6.6114626824855804e-02 3.1760030984878540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1341 3.0386429280042648e-03</internalNodes>\n          <leafValues>\n            8.1462718546390533e-02 -2.4291920661926270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1342 -3.1149981077760458e-04</internalNodes>\n          <leafValues>\n            4.6723391860723495e-02 -8.4542676806449890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1343 1.8326110439375043e-03</internalNodes>\n          <leafValues>\n            -1.2830300629138947e-01 1.5127150714397430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1344 -2.5878880172967911e-02</internalNodes>\n          <leafValues>\n            -2.1160699427127838e-01 2.9811259359121323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1345 -1.3985199620947242e-03</internalNodes>\n          <leafValues>\n            1.9801080226898193e-01 -1.0368689894676208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1346 2.4663188960403204e-03</internalNodes>\n          <leafValues>\n            2.4554869160056114e-02 -1.0830429941415787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1347 -1.3155230553820729e-03</internalNodes>\n          <leafValues>\n            -2.1984469890594482e-01 9.3965977430343628e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1348 -1.0562440007925034e-01</internalNodes>\n          <leafValues>\n            -7.9747790098190308e-01 8.9689819142222404e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1349 -3.0508160125464201e-03</internalNodes>\n          <leafValues>\n            1.3266490399837494e-01 -1.3734680414199829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1350 2.9857279732823372e-02</internalNodes>\n          <leafValues>\n            9.6069881692528725e-03 -3.0116540193557739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1351 3.0972119420766830e-02</internalNodes>\n          <leafValues>\n            3.0091350898146629e-02 -5.7279831171035767e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1352 1.0772749781608582e-01</internalNodes>\n          <leafValues>\n            -1.1804240057244897e-03 -9.9987578392028809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1353 -5.1501881331205368e-02</internalNodes>\n          <leafValues>\n            2.7181380987167358e-01 -6.8161502480506897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1354 -2.5288289412856102e-02</internalNodes>\n          <leafValues>\n            4.5067310333251953e-01 -1.6520980745553970e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1355 -4.2859618552029133e-03</internalNodes>\n          <leafValues>\n            3.7213888764381409e-01 -4.9761738628149033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1356 -2.3194460198283195e-02</internalNodes>\n          <leafValues>\n            -2.0697650313377380e-01 4.1071210056543350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1357 1.6878530383110046e-02</internalNodes>\n          <leafValues>\n            5.6408129632472992e-02 -3.7614488601684570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1358 -2.9601169750094414e-02</internalNodes>\n          <leafValues>\n            2.7207991480827332e-01 -7.3090076446533203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1359 -1.0797269642353058e-01</internalNodes>\n          <leafValues>\n            -4.9193540215492249e-01 3.6118570715188980e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1360 2.5317850708961487e-01</internalNodes>\n          <leafValues>\n            8.8794529438018799e-03 -3.4746390581130981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1361 -7.5927868485450745e-02</internalNodes>\n          <leafValues>\n            -5.2568101882934570e-01 3.0029149726033211e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1362 3.5496079362928867e-03</internalNodes>\n          <leafValues>\n            6.1817318201065063e-02 -2.3450049757957458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1363 -1.0419470258057117e-02</internalNodes>\n          <leafValues>\n            9.5470182597637177e-02 -1.9764930009841919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1364 -1.6242120414972305e-02</internalNodes>\n          <leafValues>\n            3.5856780409812927e-01 -5.2510499954223633e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1365 -1.4503370039165020e-03</internalNodes>\n          <leafValues>\n            -1.8003490567207336e-01 9.5208331942558289e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1366 1.9696209579706192e-02</internalNodes>\n          <leafValues>\n            3.7537660449743271e-02 -4.8065909743309021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1367 3.4964820370078087e-03</internalNodes>\n          <leafValues>\n            -9.7187377512454987e-02 1.7569050192832947e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>96</maxWeakCount>\n      <stageThreshold>-3.0804899215698242e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1368 -1.4011229574680328e-01</internalNodes>\n          <leafValues>\n            3.5787770152091980e-01 -1.2125530093908310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1369 -1.0008949786424637e-02</internalNodes>\n          <leafValues>\n            2.6330929994583130e-01 -8.9008018374443054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1370 -1.1394180357456207e-02</internalNodes>\n          <leafValues>\n            4.3228828907012939e-01 -5.0159178674221039e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1371 2.3134359717369080e-01</internalNodes>\n          <leafValues>\n            6.3841762021183968e-03 -7.0292097330093384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1372 1.2646619975566864e-01</internalNodes>\n          <leafValues>\n            4.2768001556396484e-02 -4.3919000029563904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1373 4.6616248786449432e-02</internalNodes>\n          <leafValues>\n            1.9250590354204178e-02 5.4499799013137817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1374 2.2037800401449203e-02</internalNodes>\n          <leafValues>\n            -8.5108749568462372e-02 3.3848780393600464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1375 3.1345561146736145e-02</internalNodes>\n          <leafValues>\n            2.2690940648317337e-02 -5.1671189069747925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1376 -2.1140639483928680e-01</internalNodes>\n          <leafValues>\n            2.9412490129470825e-01 -4.6479560434818268e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1377 -6.6334113478660583e-02</internalNodes>\n          <leafValues>\n            -1.3444049656391144e-01 1.2842020392417908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1378 4.0738668292760849e-02</internalNodes>\n          <leafValues>\n            2.3405810818076134e-02 -8.0233561992645264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1379 -4.1470870375633240e-02</internalNodes>\n          <leafValues>\n            1.4620569348335266e-01 -1.9590210169553757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1380 1.8456790596246719e-02</internalNodes>\n          <leafValues>\n            -3.6185469478368759e-02 5.1238268613815308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1381 3.7538509350270033e-03</internalNodes>\n          <leafValues>\n            -1.5587760508060455e-01 1.0312390327453613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1382 -2.8798980638384819e-03</internalNodes>\n          <leafValues>\n            -1.2225770205259323e-01 1.7551769316196442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1383 -3.2762341201305389e-02</internalNodes>\n          <leafValues>\n            -4.7169759869575500e-01 3.0380319803953171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1384 -3.9022210985422134e-02</internalNodes>\n          <leafValues>\n            3.5106760263442993e-01 -6.6119261085987091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1385 -4.4674798846244812e-02</internalNodes>\n          <leafValues>\n            -3.9958310127258301e-01 2.1066389977931976e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1386 5.3343027830123901e-03</internalNodes>\n          <leafValues>\n            7.9137377440929413e-02 -2.1176779270172119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1387 1.5521169640123844e-02</internalNodes>\n          <leafValues>\n            3.4438930451869965e-02 -5.7202047109603882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1388 -8.0842437455430627e-04</internalNodes>\n          <leafValues>\n            1.1951749771833420e-01 -1.4325830340385437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1389 2.7754740789532661e-02</internalNodes>\n          <leafValues>\n            -3.2436888664960861e-02 3.0749228596687317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1390 -3.4786630421876907e-03</internalNodes>\n          <leafValues>\n            1.5688750147819519e-01 -1.5649950504302979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1391 -2.7840979397296906e-02</internalNodes>\n          <leafValues>\n            -1.2932580709457397e-01 1.5408019721508026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1392 -2.0033390319440514e-04</internalNodes>\n          <leafValues>\n            1.0591139644384384e-01 -2.3829479515552521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1393 6.3352532684803009e-02</internalNodes>\n          <leafValues>\n            -3.5057701170444489e-02 1.1119090020656586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1394 -1.0634259879589081e-01</internalNodes>\n          <leafValues>\n            -6.7938178777694702e-01 2.7465900406241417e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1395 1.9035820150747895e-04</internalNodes>\n          <leafValues>\n            -1.1908160150051117e-01 1.1334689706563950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1396 -1.3564240187406540e-02</internalNodes>\n          <leafValues>\n            2.7505800127983093e-01 -6.8315982818603516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1397 2.1096229553222656e-02</internalNodes>\n          <leafValues>\n            -1.0987949557602406e-02 3.9935430884361267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1398 -2.4880920536816120e-03</internalNodes>\n          <leafValues>\n            -2.1849539875984192e-01 8.9293807744979858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1399 1.2370670214295387e-02</internalNodes>\n          <leafValues>\n            -9.5645450055599213e-02 5.6633960455656052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1400 -1.2036350369453430e-01</internalNodes>\n          <leafValues>\n            -5.3174102306365967e-01 3.5775080323219299e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1401 -6.7138060927391052e-02</internalNodes>\n          <leafValues>\n            2.1456840634346008e-01 -8.7389126420021057e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1402 -1.2161920219659805e-01</internalNodes>\n          <leafValues>\n            -1.8160809576511383e-01 1.4573550224304199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1403 2.0479459315538406e-02</internalNodes>\n          <leafValues>\n            -5.5715341120958328e-02 6.1189219355583191e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1404 2.1847079042345285e-03</internalNodes>\n          <leafValues>\n            -9.5258213579654694e-02 2.0591090619564056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1405 4.0952740237116814e-03</internalNodes>\n          <leafValues>\n            -1.1867360025644302e-01 4.6696461737155914e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1406 -3.5035728942602873e-03</internalNodes>\n          <leafValues>\n            2.3321969807147980e-01 -7.5537599623203278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1407 -1.0467019863426685e-02</internalNodes>\n          <leafValues>\n            -1.2448009848594666e-01 5.0595261156558990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1408 -1.5020829625427723e-02</internalNodes>\n          <leafValues>\n            9.1991908848285675e-02 -2.2077399492263794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1409 4.4499050825834274e-02</internalNodes>\n          <leafValues>\n            3.4101899713277817e-02 -5.3422772884368896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1410 8.1879837671294808e-04</internalNodes>\n          <leafValues>\n            -1.9193440675735474e-01 1.0177730023860931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1411 -2.9793549329042435e-02</internalNodes>\n          <leafValues>\n            4.1442748904228210e-01 -2.0298149436712265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1412 1.6614329069852829e-02</internalNodes>\n          <leafValues>\n            1.0457099974155426e-01 -1.8352369964122772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1413 -2.2510789334774017e-02</internalNodes>\n          <leafValues>\n            1.8911230564117432e-01 -3.3867038786411285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1414 2.0407250151038170e-02</internalNodes>\n          <leafValues>\n            -5.8524370193481445e-02 3.5967621207237244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1415 3.0294319149106741e-03</internalNodes>\n          <leafValues>\n            -1.4031639695167542e-01 5.4849781095981598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1416 5.8518280275166035e-04</internalNodes>\n          <leafValues>\n            9.5523588359355927e-02 -1.9650359451770782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1417 1.7756339162588120e-02</internalNodes>\n          <leafValues>\n            1.6195869073271751e-02 -5.8534300327301025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1418 -3.2687620259821415e-03</internalNodes>\n          <leafValues>\n            -3.0802598595619202e-01 6.5568111836910248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1419 3.4140530042350292e-03</internalNodes>\n          <leafValues>\n            -8.2502417266368866e-02 9.9890269339084625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1420 6.3527207821607590e-03</internalNodes>\n          <leafValues>\n            -3.5163778811693192e-02 5.4237622022628784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1421 2.0045090932399035e-03</internalNodes>\n          <leafValues>\n            -1.0081720352172852e-01 9.6935041248798370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1422 6.9825910031795502e-03</internalNodes>\n          <leafValues>\n            -1.6012389957904816e-01 1.1348509788513184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1423 4.5963011682033539e-02</internalNodes>\n          <leafValues>\n            6.1929170042276382e-03 -8.8551759719848633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1424 3.7062391638755798e-02</internalNodes>\n          <leafValues>\n            2.0128250122070312e-02 -8.0933511257171631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1425 -4.1522808372974396e-02</internalNodes>\n          <leafValues>\n            2.0597919821739197e-01 -3.1927939504384995e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1426 1.6521860659122467e-01</internalNodes>\n          <leafValues>\n            2.5524839758872986e-02 -6.2951612472534180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1427 -2.3188880085945129e-01</internalNodes>\n          <leafValues>\n            1.3953979313373566e-01 -6.1611790210008621e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1428 -2.8150070458650589e-02</internalNodes>\n          <leafValues>\n            -1.3676370680332184e-01 1.1677569895982742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1429 2.0499450620263815e-03</internalNodes>\n          <leafValues>\n            -1.5855039656162262e-01 1.3511709868907928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1430 1.2636490282602608e-04</internalNodes>\n          <leafValues>\n            -1.5024340152740479e-01 1.3739089667797089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1431 2.4286638945341110e-03</internalNodes>\n          <leafValues>\n            7.9247459769248962e-02 -2.5959441065788269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1432 -2.1873589605093002e-02</internalNodes>\n          <leafValues>\n            3.5590508580207825e-01 -6.1835918575525284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1433 -5.8419788256287575e-03</internalNodes>\n          <leafValues>\n            -1.0219120234251022e-01 3.9997130632400513e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1434 -2.6236099656671286e-03</internalNodes>\n          <leafValues>\n            1.2129990011453629e-01 -1.4861150085926056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1435 1.4590419828891754e-01</internalNodes>\n          <leafValues>\n            -3.6884650588035583e-02 4.1484919190406799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1436 -8.6298510432243347e-03</internalNodes>\n          <leafValues>\n            2.5522458553314209e-01 -6.9871626794338226e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1437 -3.9153471589088440e-02</internalNodes>\n          <leafValues>\n            -8.5533118247985840e-01 1.4639239758253098e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1438 3.8482698798179626e-01</internalNodes>\n          <leafValues>\n            1.7361119389533997e-02 -7.9790550470352173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1439 -6.3598138513043523e-04</internalNodes>\n          <leafValues>\n            1.1518269777297974e-01 -1.4216409623622894e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1440 5.9026381932199001e-03</internalNodes>\n          <leafValues>\n            7.0523656904697418e-02 -2.3031190037727356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1441 -1.1841119703603908e-04</internalNodes>\n          <leafValues>\n            1.0401789844036102e-01 -1.7126679420471191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1442 8.1962659955024719e-02</internalNodes>\n          <leafValues>\n            2.7799099683761597e-02 -5.8331722021102905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1443 -7.9551688395440578e-04</internalNodes>\n          <leafValues>\n            1.2568520009517670e-01 -1.0317719727754593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1444 -1.5588940680027008e-01</internalNodes>\n          <leafValues>\n            6.2890201807022095e-01 -2.5191979482769966e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1445 -1.3456310145556927e-02</internalNodes>\n          <leafValues>\n            -3.2471698522567749e-01 5.5486921221017838e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1446 -2.1507199853658676e-02</internalNodes>\n          <leafValues>\n            2.8819179534912109e-01 -6.1176139861345291e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1447 -1.9042069092392921e-02</internalNodes>\n          <leafValues>\n            -6.0552909970283508e-02 8.9629061520099640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1448 -9.1205362696200609e-04</internalNodes>\n          <leafValues>\n            1.2385459989309311e-01 -1.3584870100021362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1449 3.8202628493309021e-02</internalNodes>\n          <leafValues>\n            1.9218420609831810e-02 -8.4488832950592041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1450 5.1787391304969788e-02</internalNodes>\n          <leafValues>\n            -5.4830659180879593e-02 3.3352980017662048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1451 -1.3860349357128143e-01</internalNodes>\n          <leafValues>\n            -2.7164599299430847e-01 1.0680199600756168e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1452 -3.9325959980487823e-02</internalNodes>\n          <leafValues>\n            -7.6043432950973511e-01 1.9320670515298843e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1453 -1.1157010449096560e-03</internalNodes>\n          <leafValues>\n            6.9478519260883331e-02 -2.0327170193195343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1454 -4.2068599723279476e-03</internalNodes>\n          <leafValues>\n            1.6007219254970551e-01 -1.0982350260019302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1455 3.7919029127806425e-03</internalNodes>\n          <leafValues>\n            -8.3800643682479858e-02 2.5154781341552734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1456 -3.1430590897798538e-02</internalNodes>\n          <leafValues>\n            -5.0590312480926514e-01 3.7667378783226013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1457 -4.3412651866674423e-03</internalNodes>\n          <leafValues>\n            5.8591969311237335e-02 -1.7271269857883453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1458 -5.6401407346129417e-04</internalNodes>\n          <leafValues>\n            1.0131839662790298e-01 -1.6737550497055054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1459 -1.7139960080385208e-02</internalNodes>\n          <leafValues>\n            4.9619451165199280e-02 -1.1812750250101089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1460 -2.3868490010499954e-02</internalNodes>\n          <leafValues>\n            -9.5875509083271027e-02 1.8404319882392883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1461 -8.7408810853958130e-02</internalNodes>\n          <leafValues>\n            1.4144630730152130e-01 -5.7713828980922699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1462 -3.9170090109109879e-02</internalNodes>\n          <leafValues>\n            -6.1036241054534912e-01 2.2308109328150749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1463 5.3361579775810242e-02</internalNodes>\n          <leafValues>\n            1.5027640387415886e-02 -6.5409141778945923e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          1 5 12 21 -1.</_>\n        <_>\n          5 5 4 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 26 -1.</_>\n        <_>\n          9 15 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 23 -1.</_>\n        <_>\n          5 4 4 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 9 -1.</_>\n        <_>\n          4 7 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 16 -1.</_>\n        <_>\n          3 20 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 6 -1.</_>\n        <_>\n          4 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 25 12 3 -1.</_>\n        <_>\n          5 25 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 25 8 3 -1.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 12 -1.</_>\n        <_>\n          4 2 2 6 2.</_>\n        <_>\n          6 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 8 11 -1.</_>\n        <_>\n          5 15 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 6 -1.</_>\n        <_>\n          8 9 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 6 6 -1.</_>\n        <_>\n          4 9 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 5 28 -1.</_>\n        <_>\n          8 14 5 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 24 10 4 -1.</_>\n        <_>\n          7 24 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 8 11 -1.</_>\n        <_>\n          5 15 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 25 14 3 -1.</_>\n        <_>\n          7 25 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 12 13 -1.</_>\n        <_>\n          5 11 4 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 21 -1.</_>\n        <_>\n          5 9 4 7 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 28 -1.</_>\n        <_>\n          10 14 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 28 -1.</_>\n        <_>\n          1 14 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 8 -1.</_>\n        <_>\n          8 5 3 4 2.</_>\n        <_>\n          5 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 8 -1.</_>\n        <_>\n          3 5 3 4 2.</_>\n        <_>\n          6 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 4 12 -1.</_>\n        <_>\n          12 16 2 6 2.</_>\n        <_>\n          10 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 4 -1.</_>\n        <_>\n          4 10 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 8 21 -1.</_>\n        <_>\n          5 5 4 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 12 -1.</_>\n        <_>\n          7 15 6 6 2.</_>\n        <_>\n          1 21 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 25 12 3 -1.</_>\n        <_>\n          6 25 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 3 8 -1.</_>\n        <_>\n          8 14 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 25 8 3 -1.</_>\n        <_>\n          4 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 24 12 4 -1.</_>\n        <_>\n          5 24 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 4 6 -1.</_>\n        <_>\n          3 18 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 7 -1.</_>\n        <_>\n          8 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 4 7 -1.</_>\n        <_>\n          4 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 18 -1.</_>\n        <_>\n          1 3 6 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 4 8 -1.</_>\n        <_>\n          3 20 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 7 18 -1.</_>\n        <_>\n          6 19 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 13 -1.</_>\n        <_>\n          5 8 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 22 4 6 -1.</_>\n        <_>\n          10 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 27 -1.</_>\n        <_>\n          5 9 4 9 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 20 12 7 -1.</_>\n        <_>\n          5 20 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 25 10 3 -1.</_>\n        <_>\n          7 25 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 26 14 2 -1.</_>\n        <_>\n          0 26 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 8 9 -1.</_>\n        <_>\n          5 15 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 23 6 5 -1.</_>\n        <_>\n          8 23 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 26 14 2 -1.</_>\n        <_>\n          7 26 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 2 18 -1.</_>\n        <_>\n          8 19 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 4 12 -1.</_>\n        <_>\n          4 4 2 6 2.</_>\n        <_>\n          6 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 24 9 4 -1.</_>\n        <_>\n          7 24 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 15 -1.</_>\n        <_>\n          5 8 4 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 2 12 -1.</_>\n        <_>\n          11 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 7 16 -1.</_>\n        <_>\n          2 12 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 6 -1.</_>\n        <_>\n          8 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 8 6 -1.</_>\n        <_>\n          3 11 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 8 -1.</_>\n        <_>\n          10 8 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 7 -1.</_>\n        <_>\n          2 8 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 25 12 3 -1.</_>\n        <_>\n          6 25 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 25 12 3 -1.</_>\n        <_>\n          4 25 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 4 -1.</_>\n        <_>\n          1 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 14 12 -1.</_>\n        <_>\n          7 2 7 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 14 6 -1.</_>\n        <_>\n          7 19 7 3 2.</_>\n        <_>\n          0 22 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 6 -1.</_>\n        <_>\n          5 14 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 24 12 4 -1.</_>\n        <_>\n          5 24 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 14 -1.</_>\n        <_>\n          2 1 2 7 2.</_>\n        <_>\n          4 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 6 -1.</_>\n        <_>\n          10 3 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 4 -1.</_>\n        <_>\n          4 3 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 16 14 8 -1.</_>\n        <_>\n          0 16 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 12 -1.</_>\n        <_>\n          6 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 4 7 -1.</_>\n        <_>\n          7 15 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 4 8 -1.</_>\n        <_>\n          5 15 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 4 8 -1.</_>\n        <_>\n          9 17 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 4 8 -1.</_>\n        <_>\n          3 17 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 7 -1.</_>\n        <_>\n          9 18 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 4 7 -1.</_>\n        <_>\n          3 18 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 6 -1.</_>\n        <_>\n          7 5 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 4 -1.</_>\n        <_>\n          7 5 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 26 12 2 -1.</_>\n        <_>\n          2 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 12 -1.</_>\n        <_>\n          5 7 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 11 -1.</_>\n        <_>\n          4 7 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 8 4 -1.</_>\n        <_>\n          6 13 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 22 6 4 -1.</_>\n        <_>\n          5 22 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 26 14 2 -1.</_>\n        <_>\n          7 26 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 18 -1.</_>\n        <_>\n          5 9 4 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 9 22 -1.</_>\n        <_>\n          0 17 9 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 24 -1.</_>\n        <_>\n          7 1 6 12 2.</_>\n        <_>\n          1 13 6 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 26 12 2 -1.</_>\n        <_>\n          6 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 23 -1.</_>\n        <_>\n          5 4 4 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 22 6 5 -1.</_>\n        <_>\n          5 22 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 22 6 5 -1.</_>\n        <_>\n          6 22 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 6 -1.</_>\n        <_>\n          5 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 12 8 -1.</_>\n        <_>\n          4 8 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 5 12 -1.</_>\n        <_>\n          6 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 14 6 -1.</_>\n        <_>\n          0 20 7 3 2.</_>\n        <_>\n          7 23 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 6 -1.</_>\n        <_>\n          8 9 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 6 -1.</_>\n        <_>\n          7 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 12 15 -1.</_>\n        <_>\n          2 18 12 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 4 12 -1.</_>\n        <_>\n          0 16 2 6 2.</_>\n        <_>\n          2 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 26 -1.</_>\n        <_>\n          10 2 1 13 2.</_>\n        <_>\n          9 15 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 2 26 -1.</_>\n        <_>\n          3 2 1 13 2.</_>\n        <_>\n          4 15 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 22 4 6 -1.</_>\n        <_>\n          10 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 12 -1.</_>\n        <_>\n          4 5 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 12 -1.</_>\n        <_>\n          7 15 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 3 15 -1.</_>\n        <_>\n          6 10 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 22 4 6 -1.</_>\n        <_>\n          10 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 8 18 -1.</_>\n        <_>\n          0 19 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 8 12 -1.</_>\n        <_>\n          9 16 4 6 2.</_>\n        <_>\n          5 22 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 25 8 3 -1.</_>\n        <_>\n          4 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 14 8 -1.</_>\n        <_>\n          7 17 7 4 2.</_>\n        <_>\n          0 21 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 6 4 -1.</_>\n        <_>\n          5 15 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 23 9 4 -1.</_>\n        <_>\n          8 23 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 23 9 5 -1.</_>\n        <_>\n          3 23 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 22 -1.</_>\n        <_>\n          5 4 4 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 5 24 -1.</_>\n        <_>\n          1 10 5 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 23 12 4 -1.</_>\n        <_>\n          5 23 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 4 12 -1.</_>\n        <_>\n          5 16 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 12 11 -1.</_>\n        <_>\n          1 17 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 12 -1.</_>\n        <_>\n          6 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 4 6 -1.</_>\n        <_>\n          8 17 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 16 4 6 -1.</_>\n        <_>\n          7 16 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 6 -1.</_>\n        <_>\n          6 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 5 16 -1.</_>\n        <_>\n          2 20 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 3 14 -1.</_>\n        <_>\n          7 13 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 6 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 14 6 -1.</_>\n        <_>\n          0 11 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 4 7 -1.</_>\n        <_>\n          4 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 6 -1.</_>\n        <_>\n          8 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 8 13 -1.</_>\n        <_>\n          5 13 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          10 2 2 6 2.</_>\n        <_>\n          8 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 4 12 -1.</_>\n        <_>\n          2 2 2 6 2.</_>\n        <_>\n          4 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 24 8 3 -1.</_>\n        <_>\n          6 24 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 12 -1.</_>\n        <_>\n          4 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 14 6 -1.</_>\n        <_>\n          0 21 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 4 -1.</_>\n        <_>\n          4 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 5 -1.</_>\n        <_>\n          5 2 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 21 -1.</_>\n        <_>\n          4 8 2 7 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 2 12 -1.</_>\n        <_>\n          11 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 6 5 -1.</_>\n        <_>\n          7 17 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 12 -1.</_>\n        <_>\n          7 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 2 12 -1.</_>\n        <_>\n          2 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 3 12 -1.</_>\n        <_>\n          8 13 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 4 6 -1.</_>\n        <_>\n          6 17 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 4 6 -1.</_>\n        <_>\n          6 11 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 8 12 -1.</_>\n        <_>\n          1 11 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 3 12 -1.</_>\n        <_>\n          8 13 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 6 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 14 3 12 -1.</_>\n        <_>\n          8 14 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 25 12 3 -1.</_>\n        <_>\n          4 25 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 4 8 -1.</_>\n        <_>\n          7 17 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 4 8 -1.</_>\n        <_>\n          5 17 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 24 6 4 -1.</_>\n        <_>\n          8 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 22 6 6 -1.</_>\n        <_>\n          4 22 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 5 8 -1.</_>\n        <_>\n          8 15 5 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 5 -1.</_>\n        <_>\n          6 15 4 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 8 12 7 -1.</_>\n        <_>\n          4 8 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          0 15 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 22 -1.</_>\n        <_>\n          7 15 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 22 -1.</_>\n        <_>\n          4 4 6 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 12 -1.</_>\n        <_>\n          8 3 2 6 2.</_>\n        <_>\n          6 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 12 -1.</_>\n        <_>\n          6 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 8 -1.</_>\n        <_>\n          8 5 3 4 2.</_>\n        <_>\n          5 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 8 -1.</_>\n        <_>\n          3 5 3 4 2.</_>\n        <_>\n          6 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 4 -1.</_>\n        <_>\n          8 4 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 3 18 -1.</_>\n        <_>\n          5 19 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 6 -1.</_>\n        <_>\n          7 6 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 4 -1.</_>\n        <_>\n          7 6 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 24 8 3 -1.</_>\n        <_>\n          6 24 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 12 5 -1.</_>\n        <_>\n          4 11 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 22 4 6 -1.</_>\n        <_>\n          10 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 4 12 -1.</_>\n        <_>\n          2 3 2 6 2.</_>\n        <_>\n          4 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 22 4 6 -1.</_>\n        <_>\n          10 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 4 6 -1.</_>\n        <_>\n          2 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 12 -1.</_>\n        <_>\n          7 15 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 4 6 -1.</_>\n        <_>\n          7 16 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 6 -1.</_>\n        <_>\n          4 4 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 12 -1.</_>\n        <_>\n          4 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 12 -1.</_>\n        <_>\n          7 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 6 -1.</_>\n        <_>\n          7 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 12 -1.</_>\n        <_>\n          7 15 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 2 12 -1.</_>\n        <_>\n          6 15 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 25 12 2 -1.</_>\n        <_>\n          2 25 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 4 12 -1.</_>\n        <_>\n          3 16 2 6 2.</_>\n        <_>\n          5 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 24 8 3 -1.</_>\n        <_>\n          6 24 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 25 12 2 -1.</_>\n        <_>\n          6 25 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 27 -1.</_>\n        <_>\n          4 10 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 12 -1.</_>\n        <_>\n          7 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 6 4 -1.</_>\n        <_>\n          6 21 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 12 -1.</_>\n        <_>\n          4 8 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 4 -1.</_>\n        <_>\n          6 0 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 14 -1.</_>\n        <_>\n          7 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 6 -1.</_>\n        <_>\n          6 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 24 12 4 -1.</_>\n        <_>\n          6 24 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 24 12 4 -1.</_>\n        <_>\n          4 24 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 12 -1.</_>\n        <_>\n          9 13 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 22 4 6 -1.</_>\n        <_>\n          3 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 12 -1.</_>\n        <_>\n          8 7 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 12 -1.</_>\n        <_>\n          5 7 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 8 3 -1.</_>\n        <_>\n          4 1 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 23 -1.</_>\n        <_>\n          5 4 1 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 21 4 7 -1.</_>\n        <_>\n          9 21 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 3 12 -1.</_>\n        <_>\n          6 14 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 26 12 2 -1.</_>\n        <_>\n          2 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 26 12 2 -1.</_>\n        <_>\n          6 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 3 12 -1.</_>\n        <_>\n          9 13 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 12 -1.</_>\n        <_>\n          4 13 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 8 20 -1.</_>\n        <_>\n          3 7 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 12 8 -1.</_>\n        <_>\n          5 18 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 6 -1.</_>\n        <_>\n          6 9 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 12 8 -1.</_>\n        <_>\n          5 18 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 24 8 4 -1.</_>\n        <_>\n          4 24 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 24 -1.</_>\n        <_>\n          7 2 1 12 2.</_>\n        <_>\n          6 14 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 12 -1.</_>\n        <_>\n          5 8 2 6 2.</_>\n        <_>\n          7 14 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 6 -1.</_>\n        <_>\n          7 3 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 7 -1.</_>\n        <_>\n          2 8 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 6 -1.</_>\n        <_>\n          7 3 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 4 -1.</_>\n        <_>\n          7 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 10 19 -1.</_>\n        <_>\n          2 7 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 11 24 -1.</_>\n        <_>\n          0 16 11 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 21 -1.</_>\n        <_>\n          5 8 4 7 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 12 8 -1.</_>\n        <_>\n          3 18 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 4 8 -1.</_>\n        <_>\n          9 17 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 6 -1.</_>\n        <_>\n          4 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 5 9 -1.</_>\n        <_>\n          7 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 4 8 -1.</_>\n        <_>\n          3 17 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 13 -1.</_>\n        <_>\n          10 15 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 8 -1.</_>\n        <_>\n          3 0 3 4 2.</_>\n        <_>\n          6 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 10 -1.</_>\n        <_>\n          9 18 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 4 10 -1.</_>\n        <_>\n          3 18 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 22 2 4 -1.</_>\n        <_>\n          7 22 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 22 4 2 -1.</_>\n        <_>\n          7 22 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 5 9 -1.</_>\n        <_>\n          7 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 11 -1.</_>\n        <_>\n          4 7 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 8 -1.</_>\n        <_>\n          8 6 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 16 -1.</_>\n        <_>\n          5 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 8 -1.</_>\n        <_>\n          8 6 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 6 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 24 12 3 -1.</_>\n        <_>\n          6 24 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 4 -1.</_>\n        <_>\n          3 7 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 4 -1.</_>\n        <_>\n          4 7 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 6 6 -1.</_>\n        <_>\n          6 14 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 13 -1.</_>\n        <_>\n          7 11 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 24 12 3 -1.</_>\n        <_>\n          4 24 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 12 -1.</_>\n        <_>\n          9 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 12 -1.</_>\n        <_>\n          4 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 12 -1.</_>\n        <_>\n          7 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 4 6 -1.</_>\n        <_>\n          2 21 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 12 -1.</_>\n        <_>\n          7 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 10 16 -1.</_>\n        <_>\n          2 3 5 8 2.</_>\n        <_>\n          7 11 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 6 16 -1.</_>\n        <_>\n          4 20 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 11 -1.</_>\n        <_>\n          4 15 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 10 -1.</_>\n        <_>\n          3 4 3 5 2.</_>\n        <_>\n          6 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 24 12 4 -1.</_>\n        <_>\n          8 24 6 2 2.</_>\n        <_>\n          2 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 24 12 4 -1.</_>\n        <_>\n          0 24 6 2 2.</_>\n        <_>\n          6 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 4 -1.</_>\n        <_>\n          8 4 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 18 -1.</_>\n        <_>\n          5 8 4 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 22 10 6 -1.</_>\n        <_>\n          2 22 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 26 12 2 -1.</_>\n        <_>\n          7 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 4 -1.</_>\n        <_>\n          8 4 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 12 10 4 -1.</_>\n        <_>\n          5 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 4 -1.</_>\n        <_>\n          4 10 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 12 -1.</_>\n        <_>\n          5 4 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 8 -1.</_>\n        <_>\n          10 4 3 4 2.</_>\n        <_>\n          7 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 14 4 -1.</_>\n        <_>\n          0 18 7 2 2.</_>\n        <_>\n          7 20 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 12 -1.</_>\n        <_>\n          7 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 3 12 -1.</_>\n        <_>\n          5 15 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 2 13 -1.</_>\n        <_>\n          8 9 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 6 -1.</_>\n        <_>\n          7 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 8 5 -1.</_>\n        <_>\n          3 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 2 12 -1.</_>\n        <_>\n          6 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 10 17 -1.</_>\n        <_>\n          5 7 5 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 8 4 -1.</_>\n        <_>\n          3 9 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 24 -1.</_>\n        <_>\n          5 8 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 9 4 -1.</_>\n        <_>\n          6 16 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 4 -1.</_>\n        <_>\n          7 14 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 23 9 4 -1.</_>\n        <_>\n          8 23 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 9 4 -1.</_>\n        <_>\n          3 22 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 22 4 6 -1.</_>\n        <_>\n          9 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 24 6 4 -1.</_>\n        <_>\n          4 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 8 9 -1.</_>\n        <_>\n          6 19 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 8 9 -1.</_>\n        <_>\n          4 19 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 22 12 4 -1.</_>\n        <_>\n          5 22 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 14 7 -1.</_>\n        <_>\n          7 19 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 6 8 -1.</_>\n        <_>\n          8 20 3 4 2.</_>\n        <_>\n          5 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 6 8 -1.</_>\n        <_>\n          3 20 3 4 2.</_>\n        <_>\n          6 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 14 -1.</_>\n        <_>\n          8 1 2 7 2.</_>\n        <_>\n          6 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 4 12 -1.</_>\n        <_>\n          2 2 2 6 2.</_>\n        <_>\n          4 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 4 -1.</_>\n        <_>\n          7 4 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 6 -1.</_>\n        <_>\n          7 4 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 5 -1.</_>\n        <_>\n          7 3 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 5 6 -1.</_>\n        <_>\n          7 3 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 4 -1.</_>\n        <_>\n          7 3 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 2 8 18 -1.</_>\n        <_>\n          3 8 8 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 9 12 -1.</_>\n        <_>\n          7 19 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 12 6 -1.</_>\n        <_>\n          7 21 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 8 -1.</_>\n        <_>\n          9 18 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 9 4 -1.</_>\n        <_>\n          5 16 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 10 6 -1.</_>\n        <_>\n          4 17 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 4 8 -1.</_>\n        <_>\n          3 18 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 6 -1.</_>\n        <_>\n          9 3 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 17 8 6 -1.</_>\n        <_>\n          5 17 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 12 9 -1.</_>\n        <_>\n          6 22 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 14 -1.</_>\n        <_>\n          2 0 2 7 2.</_>\n        <_>\n          4 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 10 14 -1.</_>\n        <_>\n          9 9 5 7 2.</_>\n        <_>\n          4 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 4 12 -1.</_>\n        <_>\n          0 16 2 6 2.</_>\n        <_>\n          2 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 24 8 4 -1.</_>\n        <_>\n          3 24 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 14 22 -1.</_>\n        <_>\n          0 16 14 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 8 -1.</_>\n        <_>\n          6 17 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 10 14 -1.</_>\n        <_>\n          0 9 5 7 2.</_>\n        <_>\n          5 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 9 9 -1.</_>\n        <_>\n          3 6 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 6 -1.</_>\n        <_>\n          5 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 9 -1.</_>\n        <_>\n          5 3 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 12 -1.</_>\n        <_>\n          4 7 3 6 2.</_>\n        <_>\n          7 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 18 -1.</_>\n        <_>\n          8 13 2 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 18 -1.</_>\n        <_>\n          4 13 2 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 22 12 4 -1.</_>\n        <_>\n          6 22 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 8 8 -1.</_>\n        <_>\n          3 16 4 4 2.</_>\n        <_>\n          7 20 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 10 -1.</_>\n        <_>\n          7 7 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 12 10 -1.</_>\n        <_>\n          4 8 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 12 -1.</_>\n        <_>\n          6 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 17 -1.</_>\n        <_>\n          4 5 5 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 14 24 -1.</_>\n        <_>\n          7 4 7 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 7 -1.</_>\n        <_>\n          6 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 20 10 8 -1.</_>\n        <_>\n          2 20 5 4 2.</_>\n        <_>\n          7 24 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 8 -1.</_>\n        <_>\n          6 7 6 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 6 -1.</_>\n        <_>\n          6 4 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 6 -1.</_>\n        <_>\n          6 3 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 6 -1.</_>\n        <_>\n          7 4 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 6 -1.</_>\n        <_>\n          5 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 6 -1.</_>\n        <_>\n          7 3 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 6 -1.</_>\n        <_>\n          4 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 14 -1.</_>\n        <_>\n          3 19 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 2 12 -1.</_>\n        <_>\n          11 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 22 6 6 -1.</_>\n        <_>\n          3 22 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 12 -1.</_>\n        <_>\n          7 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 12 -1.</_>\n        <_>\n          6 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 8 4 -1.</_>\n        <_>\n          3 11 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 12 -1.</_>\n        <_>\n          4 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 20 12 8 -1.</_>\n        <_>\n          5 20 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 12 8 -1.</_>\n        <_>\n          3 20 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 12 -1.</_>\n        <_>\n          5 10 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 10 4 -1.</_>\n        <_>\n          4 12 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 10 4 -1.</_>\n        <_>\n          4 2 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 13 -1.</_>\n        <_>\n          4 15 6 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 2 12 -1.</_>\n        <_>\n          11 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 3 12 -1.</_>\n        <_>\n          3 3 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 6 -1.</_>\n        <_>\n          8 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 4 6 -1.</_>\n        <_>\n          4 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 12 14 -1.</_>\n        <_>\n          5 13 6 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 2 12 -1.</_>\n        <_>\n          2 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 21 4 6 -1.</_>\n        <_>\n          9 21 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 4 6 -1.</_>\n        <_>\n          3 21 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 15 -1.</_>\n        <_>\n          10 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 22 4 6 -1.</_>\n        <_>\n          4 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 12 14 -1.</_>\n        <_>\n          5 13 6 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 6 -1.</_>\n        <_>\n          6 3 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 24 -1.</_>\n        <_>\n          5 8 4 8 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 8 -1.</_>\n        <_>\n          4 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 12 8 -1.</_>\n        <_>\n          2 6 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 12 18 -1.</_>\n        <_>\n          4 8 6 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 24 -1.</_>\n        <_>\n          3 8 8 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 6 6 -1.</_>\n        <_>\n          3 21 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 3 -1.</_>\n        <_>\n          5 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 8 3 -1.</_>\n        <_>\n          5 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 6 -1.</_>\n        <_>\n          5 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 6 -1.</_>\n        <_>\n          4 9 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 20 4 6 -1.</_>\n        <_>\n          10 20 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 8 21 -1.</_>\n        <_>\n          3 8 8 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 4 12 -1.</_>\n        <_>\n          9 16 2 6 2.</_>\n        <_>\n          7 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 25 12 3 -1.</_>\n        <_>\n          5 25 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 4 12 -1.</_>\n        <_>\n          9 16 2 6 2.</_>\n        <_>\n          7 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 4 12 -1.</_>\n        <_>\n          3 16 2 6 2.</_>\n        <_>\n          5 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 4 7 -1.</_>\n        <_>\n          7 17 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 4 7 -1.</_>\n        <_>\n          5 17 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 6 6 -1.</_>\n        <_>\n          6 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 15 -1.</_>\n        <_>\n          6 8 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 22 2 4 -1.</_>\n        <_>\n          7 22 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 22 4 2 -1.</_>\n        <_>\n          7 22 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 3 -1.</_>\n        <_>\n          1 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 12 -1.</_>\n        <_>\n          4 15 3 6 2.</_>\n        <_>\n          7 21 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 3 12 -1.</_>\n        <_>\n          8 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 4 18 -1.</_>\n        <_>\n          2 9 2 9 2.</_>\n        <_>\n          4 18 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 6 -1.</_>\n        <_>\n          8 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 4 12 -1.</_>\n        <_>\n          0 16 2 6 2.</_>\n        <_>\n          2 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 22 12 4 -1.</_>\n        <_>\n          6 22 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 24 9 4 -1.</_>\n        <_>\n          3 24 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 4 12 -1.</_>\n        <_>\n          9 17 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 4 6 -1.</_>\n        <_>\n          4 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 8 6 -1.</_>\n        <_>\n          4 10 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 12 4 -1.</_>\n        <_>\n          4 22 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 21 9 7 -1.</_>\n        <_>\n          7 21 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 22 4 6 -1.</_>\n        <_>\n          7 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 12 -1.</_>\n        <_>\n          10 2 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 3 12 -1.</_>\n        <_>\n          3 3 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 6 -1.</_>\n        <_>\n          8 4 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 4 -1.</_>\n        <_>\n          6 4 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 8 16 -1.</_>\n        <_>\n          8 6 4 8 2.</_>\n        <_>\n          4 14 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 8 16 -1.</_>\n        <_>\n          2 6 4 8 2.</_>\n        <_>\n          6 14 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 8 8 -1.</_>\n        <_>\n          6 8 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 12 10 -1.</_>\n        <_>\n          4 6 4 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 7 -1.</_>\n        <_>\n          10 12 2 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 7 6 -1.</_>\n        <_>\n          4 12 7 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 7 -1.</_>\n        <_>\n          5 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 12 16 -1.</_>\n        <_>\n          1 11 6 8 2.</_>\n        <_>\n          7 19 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 3 13 -1.</_>\n        <_>\n          7 9 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 4 -1.</_>\n        <_>\n          3 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 22 4 6 -1.</_>\n        <_>\n          9 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 7 4 -1.</_>\n        <_>\n          2 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 3 12 -1.</_>\n        <_>\n          8 15 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 8 3 -1.</_>\n        <_>\n          6 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 19 -1.</_>\n        <_>\n          4 7 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 12 -1.</_>\n        <_>\n          8 9 2 6 2.</_>\n        <_>\n          6 15 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 4 6 -1.</_>\n        <_>\n          1 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 22 8 6 -1.</_>\n        <_>\n          8 22 4 3 2.</_>\n        <_>\n          4 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 22 8 6 -1.</_>\n        <_>\n          2 22 4 3 2.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 4 6 -1.</_>\n        <_>\n          9 17 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 4 6 -1.</_>\n        <_>\n          3 17 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 4 -1.</_>\n        <_>\n          4 7 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 6 -1.</_>\n        <_>\n          7 3 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 24 6 4 -1.</_>\n        <_>\n          6 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 12 3 -1.</_>\n        <_>\n          5 21 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 2 7 -1.</_>\n        <_>\n          7 17 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 17 7 2 -1.</_>\n        <_>\n          7 17 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 12 3 16 -1.</_>\n        <_>\n          6 20 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 24 9 4 -1.</_>\n        <_>\n          5 24 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 25 12 2 -1.</_>\n        <_>\n          2 25 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 25 12 2 -1.</_>\n        <_>\n          6 25 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 6 8 -1.</_>\n        <_>\n          4 15 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 6 -1.</_>\n        <_>\n          7 0 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 10 7 -1.</_>\n        <_>\n          2 2 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 25 -1.</_>\n        <_>\n          3 1 6 25 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 6 -1.</_>\n        <_>\n          4 14 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 26 12 2 -1.</_>\n        <_>\n          6 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 12 -1.</_>\n        <_>\n          7 15 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 12 -1.</_>\n        <_>\n          7 7 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 6 -1.</_>\n        <_>\n          5 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 6 6 -1.</_>\n        <_>\n          6 20 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 4 -1.</_>\n        <_>\n          3 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 9 18 -1.</_>\n        <_>\n          3 11 3 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 6 -1.</_>\n        <_>\n          8 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 4 6 -1.</_>\n        <_>\n          4 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 12 -1.</_>\n        <_>\n          10 8 2 6 2.</_>\n        <_>\n          8 14 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 8 -1.</_>\n        <_>\n          4 10 3 4 2.</_>\n        <_>\n          7 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 4 6 -1.</_>\n        <_>\n          7 15 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 4 -1.</_>\n        <_>\n          7 15 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 9 13 15 -1.</_>\n        <_>\n          1 14 13 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 25 -1.</_>\n        <_>\n          6 1 1 25 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 12 -1.</_>\n        <_>\n          7 15 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 4 16 -1.</_>\n        <_>\n          0 7 2 8 2.</_>\n        <_>\n          2 15 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 4 -1.</_>\n        <_>\n          4 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 10 -1.</_>\n        <_>\n          0 5 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 8 -1.</_>\n        <_>\n          11 5 3 4 2.</_>\n        <_>\n          8 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 14 -1.</_>\n        <_>\n          1 14 6 7 2.</_>\n        <_>\n          7 21 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 18 -1.</_>\n        <_>\n          9 7 2 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 14 8 -1.</_>\n        <_>\n          0 18 7 4 2.</_>\n        <_>\n          7 22 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 8 23 -1.</_>\n        <_>\n          6 3 4 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 4 9 -1.</_>\n        <_>\n          10 18 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 25 8 3 -1.</_>\n        <_>\n          4 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 26 12 2 -1.</_>\n        <_>\n          2 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 22 4 6 -1.</_>\n        <_>\n          3 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 2 12 -1.</_>\n        <_>\n          6 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 6 14 -1.</_>\n        <_>\n          2 14 3 7 2.</_>\n        <_>\n          5 21 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 6 -1.</_>\n        <_>\n          6 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 8 6 -1.</_>\n        <_>\n          0 18 4 3 2.</_>\n        <_>\n          4 21 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 11 -1.</_>\n        <_>\n          9 13 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 12 7 -1.</_>\n        <_>\n          4 16 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 4 9 -1.</_>\n        <_>\n          7 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 4 9 -1.</_>\n        <_>\n          5 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 4 8 -1.</_>\n        <_>\n          10 18 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 9 6 -1.</_>\n        <_>\n          2 9 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 12 6 -1.</_>\n        <_>\n          1 12 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 5 12 -1.</_>\n        <_>\n          3 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 8 4 -1.</_>\n        <_>\n          3 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 6 -1.</_>\n        <_>\n          4 8 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 26 12 2 -1.</_>\n        <_>\n          1 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 6 -1.</_>\n        <_>\n          7 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 5 -1.</_>\n        <_>\n          7 5 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 13 -1.</_>\n        <_>\n          6 9 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 6 10 -1.</_>\n        <_>\n          8 18 3 5 2.</_>\n        <_>\n          5 23 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 6 10 -1.</_>\n        <_>\n          3 18 3 5 2.</_>\n        <_>\n          6 23 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 7 6 -1.</_>\n        <_>\n          7 15 7 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 23 9 5 -1.</_>\n        <_>\n          3 23 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 7 6 -1.</_>\n        <_>\n          7 15 7 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 7 -1.</_>\n        <_>\n          7 15 3 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 12 -1.</_>\n        <_>\n          10 2 3 6 2.</_>\n        <_>\n          7 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 4 -1.</_>\n        <_>\n          7 5 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 10 -1.</_>\n        <_>\n          10 3 3 5 2.</_>\n        <_>\n          7 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 10 -1.</_>\n        <_>\n          1 3 3 5 2.</_>\n        <_>\n          4 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 4 -1.</_>\n        <_>\n          1 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 4 -1.</_>\n        <_>\n          5 1 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 10 -1.</_>\n        <_>\n          0 5 14 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 10 18 -1.</_>\n        <_>\n          0 8 5 9 2.</_>\n        <_>\n          5 17 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 12 -1.</_>\n        <_>\n          7 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 21 8 7 -1.</_>\n        <_>\n          4 21 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 8 6 -1.</_>\n        <_>\n          5 21 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 8 -1.</_>\n        <_>\n          6 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 12 -1.</_>\n        <_>\n          9 2 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 12 -1.</_>\n        <_>\n          4 2 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 26 12 2 -1.</_>\n        <_>\n          2 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 25 12 3 -1.</_>\n        <_>\n          7 25 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 20 3 5 -1.</_>\n        <_>\n          8 21 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 15 8 11 -1.</_>\n        <_>\n          5 15 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 21 -1.</_>\n        <_>\n          5 8 4 7 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 4 6 -1.</_>\n        <_>\n          2 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 23 9 4 -1.</_>\n        <_>\n          8 23 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 23 9 4 -1.</_>\n        <_>\n          3 23 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 12 -1.</_>\n        <_>\n          8 3 2 6 2.</_>\n        <_>\n          6 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 24 -1.</_>\n        <_>\n          6 4 1 12 2.</_>\n        <_>\n          7 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 6 -1.</_>\n        <_>\n          5 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 4 6 -1.</_>\n        <_>\n          4 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 20 -1.</_>\n        <_>\n          4 18 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 3 12 -1.</_>\n        <_>\n          2 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 16 -1.</_>\n        <_>\n          8 16 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 4 6 -1.</_>\n        <_>\n          3 17 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 9 -1.</_>\n        <_>\n          9 14 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 9 -1.</_>\n        <_>\n          3 14 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 18 -1.</_>\n        <_>\n          10 0 2 9 2.</_>\n        <_>\n          8 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 18 -1.</_>\n        <_>\n          2 0 2 9 2.</_>\n        <_>\n          4 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 2 12 -1.</_>\n        <_>\n          11 14 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 2 12 -1.</_>\n        <_>\n          2 14 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 12 -1.</_>\n        <_>\n          9 11 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 6 -1.</_>\n        <_>\n          4 7 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 9 -1.</_>\n        <_>\n          4 1 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 20 -1.</_>\n        <_>\n          1 3 6 10 2.</_>\n        <_>\n          7 13 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 10 -1.</_>\n        <_>\n          7 8 3 5 2.</_>\n        <_>\n          4 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 3 -1.</_>\n        <_>\n          6 5 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 15 8 7 -1.</_>\n        <_>\n          5 15 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 12 -1.</_>\n        <_>\n          4 18 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 16 -1.</_>\n        <_>\n          5 16 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 12 6 -1.</_>\n        <_>\n          4 21 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 8 7 -1.</_>\n        <_>\n          4 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 8 7 -1.</_>\n        <_>\n          6 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 5 -1.</_>\n        <_>\n          7 4 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 5 6 -1.</_>\n        <_>\n          7 4 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 7 -1.</_>\n        <_>\n          8 3 3 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 7 6 -1.</_>\n        <_>\n          6 3 7 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 22 -1.</_>\n        <_>\n          7 4 1 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 22 -1.</_>\n        <_>\n          6 4 1 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 12 -1.</_>\n        <_>\n          7 8 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 12 -1.</_>\n        <_>\n          6 8 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 10 5 -1.</_>\n        <_>\n          3 8 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 6 6 -1.</_>\n        <_>\n          6 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 16 -1.</_>\n        <_>\n          10 8 2 8 2.</_>\n        <_>\n          8 16 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 4 16 -1.</_>\n        <_>\n          2 8 2 8 2.</_>\n        <_>\n          4 16 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 12 4 -1.</_>\n        <_>\n          7 21 6 2 2.</_>\n        <_>\n          1 23 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 12 -1.</_>\n        <_>\n          4 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 4 -1.</_>\n        <_>\n          4 12 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 10 12 -1.</_>\n        <_>\n          2 12 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 6 8 -1.</_>\n        <_>\n          7 17 3 4 2.</_>\n        <_>\n          4 21 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 4 3 -1.</_>\n        <_>\n          6 16 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 20 3 5 -1.</_>\n        <_>\n          10 21 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 14 6 -1.</_>\n        <_>\n          7 18 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 24 -1.</_>\n        <_>\n          9 6 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 24 -1.</_>\n        <_>\n          2 6 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 6 -1.</_>\n        <_>\n          6 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 25 12 3 -1.</_>\n        <_>\n          5 25 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 14 -1.</_>\n        <_>\n          4 4 6 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 12 -1.</_>\n        <_>\n          7 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 4 6 -1.</_>\n        <_>\n          7 18 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 12 -1.</_>\n        <_>\n          7 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 12 -1.</_>\n        <_>\n          6 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 4 -1.</_>\n        <_>\n          7 4 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 7 4 -1.</_>\n        <_>\n          7 1 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 4 -1.</_>\n        <_>\n          7 2 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 6 -1.</_>\n        <_>\n          5 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 8 8 -1.</_>\n        <_>\n          7 20 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 5 -1.</_>\n        <_>\n          6 15 4 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 7 10 6 -1.</_>\n        <_>\n          7 7 5 3 2.</_>\n        <_>\n          2 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 20 4 4 -1.</_>\n        <_>\n          6 21 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 24 12 4 -1.</_>\n        <_>\n          4 24 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 6 -1.</_>\n        <_>\n          6 4 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 24 -1.</_>\n        <_>\n          7 4 6 12 2.</_>\n        <_>\n          1 16 6 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 15 -1.</_>\n        <_>\n          4 9 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 8 -1.</_>\n        <_>\n          11 3 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 13 -1.</_>\n        <_>\n          5 9 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 6 -1.</_>\n        <_>\n          6 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 8 3 -1.</_>\n        <_>\n          6 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 6 8 -1.</_>\n        <_>\n          7 11 3 4 2.</_>\n        <_>\n          4 15 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 27 -1.</_>\n        <_>\n          0 9 14 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 6 -1.</_>\n        <_>\n          5 11 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 12 -1.</_>\n        <_>\n          5 5 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 9 -1.</_>\n        <_>\n          6 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 4 9 -1.</_>\n        <_>\n          4 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 6 -1.</_>\n        <_>\n          9 5 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 4 -1.</_>\n        <_>\n          5 5 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 21 -1.</_>\n        <_>\n          4 1 6 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 25 12 3 -1.</_>\n        <_>\n          5 25 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 10 -1.</_>\n        <_>\n          9 18 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 9 3 -1.</_>\n        <_>\n          3 17 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 10 -1.</_>\n        <_>\n          9 18 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 4 10 -1.</_>\n        <_>\n          3 18 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 9 4 -1.</_>\n        <_>\n          4 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 5 -1.</_>\n        <_>\n          5 0 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 2 18 -1.</_>\n        <_>\n          7 15 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 6 6 -1.</_>\n        <_>\n          2 22 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 6 5 -1.</_>\n        <_>\n          5 21 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 6 5 -1.</_>\n        <_>\n          6 21 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 21 2 5 -1.</_>\n        <_>\n          9 21 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 8 -1.</_>\n        <_>\n          0 17 3 4 2.</_>\n        <_>\n          3 21 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 6 -1.</_>\n        <_>\n          6 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 14 -1.</_>\n        <_>\n          2 1 3 7 2.</_>\n        <_>\n          5 8 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 5 6 -1.</_>\n        <_>\n          6 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 4 6 -1.</_>\n        <_>\n          6 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 6 -1.</_>\n        <_>\n          4 8 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 4 -1.</_>\n        <_>\n          3 7 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 6 -1.</_>\n        <_>\n          7 6 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 4 -1.</_>\n        <_>\n          4 7 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 21 -1.</_>\n        <_>\n          8 1 2 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 20 -1.</_>\n        <_>\n          4 2 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 20 3 5 -1.</_>\n        <_>\n          10 21 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 24 6 4 -1.</_>\n        <_>\n          3 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 6 -1.</_>\n        <_>\n          6 2 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 6 -1.</_>\n        <_>\n          6 2 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 13 2 -1.</_>\n        <_>\n          1 5 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 6 7 -1.</_>\n        <_>\n          7 11 3 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 16 6 4 -1.</_>\n        <_>\n          8 16 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 24 -1.</_>\n        <_>\n          5 11 4 8 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 24 12 4 -1.</_>\n        <_>\n          8 24 6 2 2.</_>\n        <_>\n          2 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 24 12 4 -1.</_>\n        <_>\n          0 24 6 2 2.</_>\n        <_>\n          6 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 24 -1.</_>\n        <_>\n          7 4 1 12 2.</_>\n        <_>\n          6 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 6 -1.</_>\n        <_>\n          6 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 9 -1.</_>\n        <_>\n          6 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 8 7 -1.</_>\n        <_>\n          6 8 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 10 7 -1.</_>\n        <_>\n          3 7 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 10 7 -1.</_>\n        <_>\n          6 7 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 9 12 -1.</_>\n        <_>\n          7 5 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 9 12 -1.</_>\n        <_>\n          4 5 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 25 8 3 -1.</_>\n        <_>\n          4 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 12 7 -1.</_>\n        <_>\n          3 16 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 4 7 -1.</_>\n        <_>\n          9 17 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 4 7 -1.</_>\n        <_>\n          3 17 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 7 -1.</_>\n        <_>\n          7 0 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 7 4 -1.</_>\n        <_>\n          7 0 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 6 -1.</_>\n        <_>\n          9 3 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 12 -1.</_>\n        <_>\n          0 10 3 6 2.</_>\n        <_>\n          3 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 12 -1.</_>\n        <_>\n          10 3 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 12 -1.</_>\n        <_>\n          2 3 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 10 10 -1.</_>\n        <_>\n          7 7 5 5 2.</_>\n        <_>\n          2 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 4 9 -1.</_>\n        <_>\n          5 16 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 14 11 -1.</_>\n        <_>\n          0 11 7 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 5 6 -1.</_>\n        <_>\n          4 18 5 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 20 2 6 -1.</_>\n        <_>\n          11 20 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 18 4 6 -1.</_>\n        <_>\n          3 18 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 3 6 -1.</_>\n        <_>\n          11 15 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 14 6 3 -1.</_>\n        <_>\n          3 15 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 20 3 5 -1.</_>\n        <_>\n          8 21 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 25 8 3 -1.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 12 -1.</_>\n        <_>\n          10 15 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 6 2 -1.</_>\n        <_>\n          5 15 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 18 2 7 -1.</_>\n        <_>\n          7 18 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 20 5 3 -1.</_>\n        <_>\n          6 21 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 16 2 10 -1.</_>\n        <_>\n          10 16 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 16 10 2 -1.</_>\n        <_>\n          4 16 10 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 17 12 6 -1.</_>\n        <_>\n          4 17 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 8 -1.</_>\n        <_>\n          4 15 3 4 2.</_>\n        <_>\n          7 19 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 6 4 -1.</_>\n        <_>\n          9 19 2 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 17 4 6 -1.</_>\n        <_>\n          5 19 4 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 13 12 4 -1.</_>\n        <_>\n          1 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 12 -1.</_>\n        <_>\n          0 2 4 6 2.</_>\n        <_>\n          4 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 16 -1.</_>\n        <_>\n          6 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 8 4 -1.</_>\n        <_>\n          2 10 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 18 -1.</_>\n        <_>\n          5 19 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 12 -1.</_>\n        <_>\n          0 7 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 22 12 4 -1.</_>\n        <_>\n          7 22 6 2 2.</_>\n        <_>\n          1 24 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 7 2 -1.</_>\n        <_>\n          2 19 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 26 12 2 -1.</_>\n        <_>\n          2 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 14 -1.</_>\n        <_>\n          0 11 3 7 2.</_>\n        <_>\n          3 18 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 10 -1.</_>\n        <_>\n          7 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 6 -1.</_>\n        <_>\n          2 17 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 12 -1.</_>\n        <_>\n          9 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 6 3 -1.</_>\n        <_>\n          5 17 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 8 -1.</_>\n        <_>\n          10 2 2 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 6 -1.</_>\n        <_>\n          8 6 4 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 21 -1.</_>\n        <_>\n          4 14 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 18 -1.</_>\n        <_>\n          3 0 4 9 2.</_>\n        <_>\n          7 9 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 9 10 -1.</_>\n        <_>\n          6 6 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 21 4 3 -1.</_>\n        <_>\n          6 22 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 23 12 5 -1.</_>\n        <_>\n          6 23 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 3 12 -1.</_>\n        <_>\n          5 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 2 7 -1.</_>\n        <_>\n          7 17 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 5 14 10 -1.</_>\n        <_>\n          0 5 7 5 2.</_>\n        <_>\n          7 10 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 4 -1.</_>\n        <_>\n          3 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 10 4 -1.</_>\n        <_>\n          5 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 6 -1.</_>\n        <_>\n          7 0 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 3 10 7 -1.</_>\n        <_>\n          7 3 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 4 21 -1.</_>\n        <_>\n          5 7 2 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 24 -1.</_>\n        <_>\n          7 2 1 12 2.</_>\n        <_>\n          6 14 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 8 16 -1.</_>\n        <_>\n          3 8 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 12 -1.</_>\n        <_>\n          9 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 12 -1.</_>\n        <_>\n          4 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 6 -1.</_>\n        <_>\n          5 4 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 4 9 -1.</_>\n        <_>\n          3 19 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 4 16 -1.</_>\n        <_>\n          10 10 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 5 2 -1.</_>\n        <_>\n          5 18 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 4 -1.</_>\n        <_>\n          5 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 4 -1.</_>\n        <_>\n          6 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 8 -1.</_>\n        <_>\n          8 5 3 4 2.</_>\n        <_>\n          5 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 8 -1.</_>\n        <_>\n          3 5 3 4 2.</_>\n        <_>\n          6 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 12 -1.</_>\n        <_>\n          10 3 4 6 2.</_>\n        <_>\n          6 9 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 2 12 -1.</_>\n        <_>\n          2 10 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 13 3 -1.</_>\n        <_>\n          1 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 7 -1.</_>\n        <_>\n          4 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 21 2 5 -1.</_>\n        <_>\n          9 21 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 25 8 3 -1.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 12 -1.</_>\n        <_>\n          7 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 8 6 -1.</_>\n        <_>\n          0 15 4 3 2.</_>\n        <_>\n          4 18 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 26 12 2 -1.</_>\n        <_>\n          2 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 26 12 2 -1.</_>\n        <_>\n          6 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 13 3 -1.</_>\n        <_>\n          1 2 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 2 -1.</_>\n        <_>\n          7 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 12 4 -1.</_>\n        <_>\n          8 16 6 2 2.</_>\n        <_>\n          2 18 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 12 6 -1.</_>\n        <_>\n          3 20 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 8 7 -1.</_>\n        <_>\n          6 15 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 12 -1.</_>\n        <_>\n          4 10 3 6 2.</_>\n        <_>\n          7 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 6 -1.</_>\n        <_>\n          7 0 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 4 -1.</_>\n        <_>\n          7 0 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 18 8 6 -1.</_>\n        <_>\n          10 18 4 3 2.</_>\n        <_>\n          6 21 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 4 -1.</_>\n        <_>\n          6 0 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 15 10 6 -1.</_>\n        <_>\n          7 15 5 3 2.</_>\n        <_>\n          2 18 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 4 8 -1.</_>\n        <_>\n          0 17 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 14 9 -1.</_>\n        <_>\n          0 12 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 24 9 4 -1.</_>\n        <_>\n          5 24 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 24 12 4 -1.</_>\n        <_>\n          4 24 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 10 8 -1.</_>\n        <_>\n          0 11 5 4 2.</_>\n        <_>\n          5 15 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 4 -1.</_>\n        <_>\n          5 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 4 17 -1.</_>\n        <_>\n          2 8 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 12 -1.</_>\n        <_>\n          10 2 2 6 2.</_>\n        <_>\n          8 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 4 12 -1.</_>\n        <_>\n          2 2 2 6 2.</_>\n        <_>\n          4 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 14 -1.</_>\n        <_>\n          12 7 2 7 2.</_>\n        <_>\n          10 14 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 4 14 -1.</_>\n        <_>\n          0 7 2 7 2.</_>\n        <_>\n          2 14 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 10 6 -1.</_>\n        <_>\n          4 8 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 3 -1.</_>\n        <_>\n          6 6 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 5 12 3 -1.</_>\n        <_>\n          2 6 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 9 5 -1.</_>\n        <_>\n          5 15 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 14 15 -1.</_>\n        <_>\n          0 6 14 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 18 -1.</_>\n        <_>\n          3 7 2 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 9 10 -1.</_>\n        <_>\n          4 7 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 6 -1.</_>\n        <_>\n          7 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 21 -1.</_>\n        <_>\n          7 4 1 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 6 3 -1.</_>\n        <_>\n          5 18 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 4 -1.</_>\n        <_>\n          7 16 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 16 4 2 -1.</_>\n        <_>\n          7 16 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 20 2 6 -1.</_>\n        <_>\n          8 20 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 20 6 2 -1.</_>\n        <_>\n          6 20 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 6 -1.</_>\n        <_>\n          8 4 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 3 16 -1.</_>\n        <_>\n          2 1 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 2 10 -1.</_>\n        <_>\n          12 14 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 2 -1.</_>\n        <_>\n          2 14 10 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 27 -1.</_>\n        <_>\n          5 10 2 9 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 12 -1.</_>\n        <_>\n          7 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 8 22 -1.</_>\n        <_>\n          4 6 4 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 13 -1.</_>\n        <_>\n          6 6 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 6 6 -1.</_>\n        <_>\n          5 13 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 26 12 2 -1.</_>\n        <_>\n          2 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 9 -1.</_>\n        <_>\n          6 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 25 8 3 -1.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 24 6 4 -1.</_>\n        <_>\n          6 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 8 9 -1.</_>\n        <_>\n          4 16 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 8 9 -1.</_>\n        <_>\n          6 16 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 6 -1.</_>\n        <_>\n          7 5 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 6 -1.</_>\n        <_>\n          7 15 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 10 12 -1.</_>\n        <_>\n          3 19 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 10 3 -1.</_>\n        <_>\n          7 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 8 21 -1.</_>\n        <_>\n          3 8 8 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 6 -1.</_>\n        <_>\n          4 9 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 8 4 -1.</_>\n        <_>\n          4 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 6 -1.</_>\n        <_>\n          7 5 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 10 -1.</_>\n        <_>\n          2 8 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 8 10 -1.</_>\n        <_>\n          5 4 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 8 6 -1.</_>\n        <_>\n          7 16 4 3 2.</_>\n        <_>\n          3 19 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 2 24 -1.</_>\n        <_>\n          3 3 1 12 2.</_>\n        <_>\n          4 15 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 4 12 -1.</_>\n        <_>\n          10 16 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 4 12 -1.</_>\n        <_>\n          2 16 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 12 -1.</_>\n        <_>\n          9 12 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 5 6 -1.</_>\n        <_>\n          3 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 10 8 -1.</_>\n        <_>\n          2 11 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 12 -1.</_>\n        <_>\n          4 12 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 4 12 -1.</_>\n        <_>\n          5 16 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 22 4 2 -1.</_>\n        <_>\n          7 22 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 22 8 6 -1.</_>\n        <_>\n          10 22 4 3 2.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 2 14 -1.</_>\n        <_>\n          2 14 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 20 3 5 -1.</_>\n        <_>\n          10 21 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 20 5 3 -1.</_>\n        <_>\n          4 21 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 5 -1.</_>\n        <_>\n          7 15 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 17 10 6 -1.</_>\n        <_>\n          1 17 5 3 2.</_>\n        <_>\n          6 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 3 -1.</_>\n        <_>\n          5 3 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 5 6 -1.</_>\n        <_>\n          7 3 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 12 -1.</_>\n        <_>\n          8 7 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 12 -1.</_>\n        <_>\n          5 7 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 9 13 -1.</_>\n        <_>\n          8 11 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 21 -1.</_>\n        <_>\n          6 5 1 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 9 11 -1.</_>\n        <_>\n          7 13 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 9 11 -1.</_>\n        <_>\n          4 13 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 8 10 -1.</_>\n        <_>\n          9 18 4 5 2.</_>\n        <_>\n          5 23 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 14 14 -1.</_>\n        <_>\n          0 5 7 7 2.</_>\n        <_>\n          7 12 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 15 -1.</_>\n        <_>\n          10 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 20 -1.</_>\n        <_>\n          5 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 12 2 -1.</_>\n        <_>\n          2 5 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 12 3 -1.</_>\n        <_>\n          0 4 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 14 6 -1.</_>\n        <_>\n          7 18 7 3 2.</_>\n        <_>\n          0 21 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 15 -1.</_>\n        <_>\n          3 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 4 -1.</_>\n        <_>\n          8 1 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 6 -1.</_>\n        <_>\n          2 9 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 22 4 6 -1.</_>\n        <_>\n          10 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 3 12 -1.</_>\n        <_>\n          3 7 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 25 8 3 -1.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 4 6 -1.</_>\n        <_>\n          2 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 24 6 4 -1.</_>\n        <_>\n          8 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 9 -1.</_>\n        <_>\n          4 3 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 4 -1.</_>\n        <_>\n          8 3 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 22 -1.</_>\n        <_>\n          2 0 3 11 2.</_>\n        <_>\n          5 11 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 8 10 -1.</_>\n        <_>\n          10 18 4 5 2.</_>\n        <_>\n          6 23 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 6 6 -1.</_>\n        <_>\n          2 22 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 6 6 -1.</_>\n        <_>\n          8 15 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 6 -1.</_>\n        <_>\n          0 15 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 6 6 -1.</_>\n        <_>\n          3 16 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 21 -1.</_>\n        <_>\n          7 9 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 6 3 -1.</_>\n        <_>\n          3 15 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 25 8 3 -1.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 6 -1.</_>\n        <_>\n          7 3 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 8 16 -1.</_>\n        <_>\n          4 9 4 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 8 16 -1.</_>\n        <_>\n          6 9 4 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 7 24 -1.</_>\n        <_>\n          4 9 7 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 4 6 -1.</_>\n        <_>\n          3 17 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 4 -1.</_>\n        <_>\n          5 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 6 -1.</_>\n        <_>\n          7 2 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 4 -1.</_>\n        <_>\n          4 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 24 6 4 -1.</_>\n        <_>\n          4 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 8 -1.</_>\n        <_>\n          8 0 3 4 2.</_>\n        <_>\n          5 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 26 12 2 -1.</_>\n        <_>\n          6 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 8 -1.</_>\n        <_>\n          8 0 3 4 2.</_>\n        <_>\n          5 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 6 -1.</_>\n        <_>\n          7 4 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 8 -1.</_>\n        <_>\n          6 2 6 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 6 -1.</_>\n        <_>\n          8 2 4 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 17 3 4 -1.</_>\n        <_>\n          8 18 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 20 6 8 -1.</_>\n        <_>\n          1 20 3 4 2.</_>\n        <_>\n          4 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 2 12 -1.</_>\n        <_>\n          9 15 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 2 12 -1.</_>\n        <_>\n          4 15 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 4 -1.</_>\n        <_>\n          5 2 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 4 -1.</_>\n        <_>\n          6 3 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 24 -1.</_>\n        <_>\n          7 4 3 12 2.</_>\n        <_>\n          4 16 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 12 -1.</_>\n        <_>\n          7 13 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 12 -1.</_>\n        <_>\n          7 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 14 -1.</_>\n        <_>\n          7 4 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 25 -1.</_>\n        <_>\n          6 3 2 25 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 21 -1.</_>\n        <_>\n          6 4 1 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 2 12 -1.</_>\n        <_>\n          7 6 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 20 -1.</_>\n        <_>\n          5 4 2 10 2.</_>\n        <_>\n          7 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 24 -1.</_>\n        <_>\n          8 12 2 8 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 24 -1.</_>\n        <_>\n          6 1 6 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 7 22 -1.</_>\n        <_>\n          7 17 7 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 4 9 -1.</_>\n        <_>\n          4 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 8 -1.</_>\n        <_>\n          6 6 6 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 4 -1.</_>\n        <_>\n          7 5 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 6 -1.</_>\n        <_>\n          5 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 10 -1.</_>\n        <_>\n          0 5 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 24 -1.</_>\n        <_>\n          7 8 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 4 15 -1.</_>\n        <_>\n          2 8 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 25 8 3 -1.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 23 12 3 -1.</_>\n        <_>\n          5 23 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 22 8 6 -1.</_>\n        <_>\n          10 22 4 3 2.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 14 6 -1.</_>\n        <_>\n          0 22 7 3 2.</_>\n        <_>\n          7 25 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 12 3 -1.</_>\n        <_>\n          2 4 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 9 -1.</_>\n        <_>\n          4 5 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 12 -1.</_>\n        <_>\n          5 4 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 3 -1.</_>\n        <_>\n          1 4 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 3 -1.</_>\n        <_>\n          5 4 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 2 12 -1.</_>\n        <_>\n          2 15 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 12 5 -1.</_>\n        <_>\n          5 20 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 5 4 -1.</_>\n        <_>\n          6 16 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 21 -1.</_>\n        <_>\n          7 9 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 4 12 -1.</_>\n        <_>\n          2 2 2 6 2.</_>\n        <_>\n          4 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 22 8 6 -1.</_>\n        <_>\n          7 22 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 6 -1.</_>\n        <_>\n          0 1 5 3 2.</_>\n        <_>\n          5 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 9 6 -1.</_>\n        <_>\n          3 13 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 19 -1.</_>\n        <_>\n          7 7 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 8 16 -1.</_>\n        <_>\n          7 10 4 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 12 -1.</_>\n        <_>\n          6 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 4 15 -1.</_>\n        <_>\n          10 18 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 10 10 -1.</_>\n        <_>\n          2 1 5 5 2.</_>\n        <_>\n          7 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 19 2 7 -1.</_>\n        <_>\n          7 19 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 14 9 6 -1.</_>\n        <_>\n          5 14 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 10 14 -1.</_>\n        <_>\n          9 13 5 7 2.</_>\n        <_>\n          4 20 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 15 -1.</_>\n        <_>\n          5 12 4 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 24 -1.</_>\n        <_>\n          7 2 1 12 2.</_>\n        <_>\n          6 14 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 12 -1.</_>\n        <_>\n          5 9 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 24 6 4 -1.</_>\n        <_>\n          8 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 24 6 4 -1.</_>\n        <_>\n          3 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 12 4 -1.</_>\n        <_>\n          4 8 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 9 -1.</_>\n        <_>\n          5 8 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 6 -1.</_>\n        <_>\n          9 18 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 20 8 8 -1.</_>\n        <_>\n          2 20 4 4 2.</_>\n        <_>\n          6 24 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 8 -1.</_>\n        <_>\n          11 15 1 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 15 8 2 -1.</_>\n        <_>\n          3 15 8 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 6 -1.</_>\n        <_>\n          5 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 4 6 -1.</_>\n        <_>\n          2 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 26 14 2 -1.</_>\n        <_>\n          0 26 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 6 8 -1.</_>\n        <_>\n          3 20 3 4 2.</_>\n        <_>\n          6 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 12 -1.</_>\n        <_>\n          7 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 4 12 -1.</_>\n        <_>\n          5 13 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 22 12 2 -1.</_>\n        <_>\n          1 22 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 24 12 4 -1.</_>\n        <_>\n          0 24 6 2 2.</_>\n        <_>\n          6 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 4 -1.</_>\n        <_>\n          5 10 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 12 3 -1.</_>\n        <_>\n          0 4 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 6 -1.</_>\n        <_>\n          7 4 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 6 -1.</_>\n        <_>\n          7 4 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 8 -1.</_>\n        <_>\n          8 3 3 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 5 -1.</_>\n        <_>\n          3 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 12 -1.</_>\n        <_>\n          9 3 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 22 -1.</_>\n        <_>\n          7 0 1 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 12 -1.</_>\n        <_>\n          9 3 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 3 12 -1.</_>\n        <_>\n          4 3 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 3 12 -1.</_>\n        <_>\n          7 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 2 12 -1.</_>\n        <_>\n          6 15 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 10 -1.</_>\n        <_>\n          8 8 3 5 2.</_>\n        <_>\n          5 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 10 10 -1.</_>\n        <_>\n          2 8 5 5 2.</_>\n        <_>\n          7 13 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 10 -1.</_>\n        <_>\n          10 9 3 5 2.</_>\n        <_>\n          7 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 12 3 -1.</_>\n        <_>\n          0 5 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 12 -1.</_>\n        <_>\n          9 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 12 -1.</_>\n        <_>\n          4 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 20 12 6 -1.</_>\n        <_>\n          6 20 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 8 8 -1.</_>\n        <_>\n          2 10 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 14 6 -1.</_>\n        <_>\n          0 15 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 12 16 -1.</_>\n        <_>\n          1 14 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 12 -1.</_>\n        <_>\n          8 7 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 3 -1.</_>\n        <_>\n          0 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 13 3 -1.</_>\n        <_>\n          1 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 7 -1.</_>\n        <_>\n          2 17 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 24 6 4 -1.</_>\n        <_>\n          6 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 7 -1.</_>\n        <_>\n          3 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 18 -1.</_>\n        <_>\n          10 9 3 9 2.</_>\n        <_>\n          7 18 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 12 5 -1.</_>\n        <_>\n          4 22 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 10 -1.</_>\n        <_>\n          10 9 3 5 2.</_>\n        <_>\n          7 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 10 -1.</_>\n        <_>\n          1 9 3 5 2.</_>\n        <_>\n          4 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 22 4 6 -1.</_>\n        <_>\n          8 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 6 8 -1.</_>\n        <_>\n          0 16 3 4 2.</_>\n        <_>\n          3 20 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 8 -1.</_>\n        <_>\n          4 2 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 9 -1.</_>\n        <_>\n          5 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 19 -1.</_>\n        <_>\n          10 8 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 6 -1.</_>\n        <_>\n          5 11 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 7 6 -1.</_>\n        <_>\n          7 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 12 -1.</_>\n        <_>\n          1 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 17 -1.</_>\n        <_>\n          12 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 17 -1.</_>\n        <_>\n          1 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 4 14 -1.</_>\n        <_>\n          5 20 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 4 -1.</_>\n        <_>\n          6 15 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 17 8 6 -1.</_>\n        <_>\n          7 17 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 8 6 -1.</_>\n        <_>\n          3 17 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 6 -1.</_>\n        <_>\n          5 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 8 13 -1.</_>\n        <_>\n          5 13 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 8 4 -1.</_>\n        <_>\n          3 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 4 -1.</_>\n        <_>\n          7 5 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 8 -1.</_>\n        <_>\n          7 9 3 4 2.</_>\n        <_>\n          4 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 24 -1.</_>\n        <_>\n          6 4 1 12 2.</_>\n        <_>\n          7 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 24 6 4 -1.</_>\n        <_>\n          7 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 20 5 3 -1.</_>\n        <_>\n          6 21 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 15 9 12 -1.</_>\n        <_>\n          6 19 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 8 7 -1.</_>\n        <_>\n          3 20 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 14 -1.</_>\n        <_>\n          10 12 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 2 14 -1.</_>\n        <_>\n          3 12 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 8 4 -1.</_>\n        <_>\n          3 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 8 8 -1.</_>\n        <_>\n          3 9 4 4 2.</_>\n        <_>\n          7 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 24 -1.</_>\n        <_>\n          5 10 4 8 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 10 3 -1.</_>\n        <_>\n          7 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 8 8 -1.</_>\n        <_>\n          6 15 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 4 4 -1.</_>\n        <_>\n          6 16 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 6 6 -1.</_>\n        <_>\n          6 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 3 12 -1.</_>\n        <_>\n          5 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 12 -1.</_>\n        <_>\n          8 8 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 12 -1.</_>\n        <_>\n          5 8 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 4 6 -1.</_>\n        <_>\n          10 17 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 24 -1.</_>\n        <_>\n          5 4 1 12 2.</_>\n        <_>\n          6 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 25 8 3 -1.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 4 6 -1.</_>\n        <_>\n          2 17 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 12 -1.</_>\n        <_>\n          11 11 3 6 2.</_>\n        <_>\n          8 17 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 10 -1.</_>\n        <_>\n          3 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 6 -1.</_>\n        <_>\n          7 6 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 7 10 3 -1.</_>\n        <_>\n          6 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 6 -1.</_>\n        <_>\n          7 6 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 4 -1.</_>\n        <_>\n          7 6 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 6 -1.</_>\n        <_>\n          7 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 8 -1.</_>\n        <_>\n          4 6 3 4 2.</_>\n        <_>\n          7 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 16 -1.</_>\n        <_>\n          8 20 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 10 3 -1.</_>\n        <_>\n          5 4 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 13 -1.</_>\n        <_>\n          8 2 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 10 14 -1.</_>\n        <_>\n          1 1 5 7 2.</_>\n        <_>\n          6 8 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 25 8 3 -1.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 25 8 3 -1.</_>\n        <_>\n          4 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 3 13 -1.</_>\n        <_>\n          7 13 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 24 6 4 -1.</_>\n        <_>\n          4 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 7 -1.</_>\n        <_>\n          8 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 3 -1.</_>\n        <_>\n          0 8 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 6 -1.</_>\n        <_>\n          4 8 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 7 4 -1.</_>\n        <_>\n          3 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 18 -1.</_>\n        <_>\n          5 16 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 5 26 -1.</_>\n        <_>\n          4 14 5 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 22 8 6 -1.</_>\n        <_>\n          10 22 4 3 2.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 8 6 -1.</_>\n        <_>\n          0 22 4 3 2.</_>\n        <_>\n          4 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 8 6 -1.</_>\n        <_>\n          9 21 4 3 2.</_>\n        <_>\n          5 24 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 4 -1.</_>\n        <_>\n          6 0 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 5 -1.</_>\n        <_>\n          6 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 12 -1.</_>\n        <_>\n          6 6 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 7 -1.</_>\n        <_>\n          8 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 4 7 -1.</_>\n        <_>\n          4 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 8 3 -1.</_>\n        <_>\n          6 12 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 9 5 -1.</_>\n        <_>\n          4 11 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 14 -1.</_>\n        <_>\n          12 3 2 7 2.</_>\n        <_>\n          10 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 14 -1.</_>\n        <_>\n          0 2 2 7 2.</_>\n        <_>\n          2 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 13 6 -1.</_>\n        <_>\n          1 11 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 4 2 -1.</_>\n        <_>\n          7 17 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 15 3 6 -1.</_>\n        <_>\n          11 16 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 3 -1.</_>\n        <_>\n          3 16 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 19 2 7 -1.</_>\n        <_>\n          7 19 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 18 12 9 -1.</_>\n        <_>\n          3 18 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 19 2 7 -1.</_>\n        <_>\n          7 19 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 19 7 2 -1.</_>\n        <_>\n          7 19 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 15 3 13 -1.</_>\n        <_>\n          8 15 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 8 7 -1.</_>\n        <_>\n          4 16 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 21 10 6 -1.</_>\n        <_>\n          9 21 5 3 2.</_>\n        <_>\n          4 24 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 10 6 -1.</_>\n        <_>\n          0 21 5 3 2.</_>\n        <_>\n          5 24 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 7 -1.</_>\n        <_>\n          10 16 2 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 20 12 4 -1.</_>\n        <_>\n          0 20 6 2 2.</_>\n        <_>\n          6 22 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 10 -1.</_>\n        <_>\n          4 14 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 6 4 -1.</_>\n        <_>\n          6 18 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 16 -1.</_>\n        <_>\n          11 19 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 14 -1.</_>\n        <_>\n          3 10 3 7 2.</_>\n        <_>\n          6 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 6 -1.</_>\n        <_>\n          6 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 12 -1.</_>\n        <_>\n          6 16 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 12 18 -1.</_>\n        <_>\n          6 9 4 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 10 -1.</_>\n        <_>\n          3 4 3 5 2.</_>\n        <_>\n          6 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 6 4 -1.</_>\n        <_>\n          7 18 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 18 4 6 -1.</_>\n        <_>\n          7 18 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 13 -1.</_>\n        <_>\n          6 8 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 3 12 -1.</_>\n        <_>\n          3 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 12 12 -1.</_>\n        <_>\n          5 15 6 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 4 12 -1.</_>\n        <_>\n          5 15 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 9 9 -1.</_>\n        <_>\n          7 19 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 5 4 -1.</_>\n        <_>\n          6 17 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 14 6 8 -1.</_>\n        <_>\n          9 14 3 4 2.</_>\n        <_>\n          6 18 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 6 8 -1.</_>\n        <_>\n          2 14 3 4 2.</_>\n        <_>\n          5 18 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 10 16 -1.</_>\n        <_>\n          8 2 5 8 2.</_>\n        <_>\n          3 10 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 3 12 -1.</_>\n        <_>\n          6 15 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 23 6 4 -1.</_>\n        <_>\n          8 23 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 14 -1.</_>\n        <_>\n          4 2 2 7 2.</_>\n        <_>\n          6 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 8 6 -1.</_>\n        <_>\n          7 7 4 3 2.</_>\n        <_>\n          3 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 4 6 -1.</_>\n        <_>\n          2 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 24 -1.</_>\n        <_>\n          7 6 6 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 14 -1.</_>\n        <_>\n          0 13 3 7 2.</_>\n        <_>\n          3 20 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 10 6 -1.</_>\n        <_>\n          9 19 5 3 2.</_>\n        <_>\n          4 22 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 10 6 -1.</_>\n        <_>\n          0 19 5 3 2.</_>\n        <_>\n          5 22 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 8 10 -1.</_>\n        <_>\n          8 18 4 5 2.</_>\n        <_>\n          4 23 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 8 10 -1.</_>\n        <_>\n          2 18 4 5 2.</_>\n        <_>\n          6 23 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 4 14 -1.</_>\n        <_>\n          5 14 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 10 16 -1.</_>\n        <_>\n          1 2 5 8 2.</_>\n        <_>\n          6 10 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 14 16 -1.</_>\n        <_>\n          0 20 14 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 10 6 -1.</_>\n        <_>\n          2 3 5 3 2.</_>\n        <_>\n          7 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 26 -1.</_>\n        <_>\n          10 14 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 18 -1.</_>\n        <_>\n          0 18 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 21 4 6 -1.</_>\n        <_>\n          8 21 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 9 8 -1.</_>\n        <_>\n          5 6 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 21 4 6 -1.</_>\n        <_>\n          9 21 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 8 -1.</_>\n        <_>\n          3 0 3 4 2.</_>\n        <_>\n          6 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 20 4 7 -1.</_>\n        <_>\n          9 20 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 10 12 -1.</_>\n        <_>\n          6 4 5 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 2 24 -1.</_>\n        <_>\n          6 9 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 21 4 6 -1.</_>\n        <_>\n          4 21 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 26 -1.</_>\n        <_>\n          10 14 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 3 26 -1.</_>\n        <_>\n          1 14 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 14 -1.</_>\n        <_>\n          8 9 6 7 2.</_>\n        <_>\n          2 16 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 6 8 -1.</_>\n        <_>\n          4 15 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 18 -1.</_>\n        <_>\n          5 15 9 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 9 4 -1.</_>\n        <_>\n          4 0 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 6 -1.</_>\n        <_>\n          5 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 8 4 -1.</_>\n        <_>\n          3 9 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 12 6 -1.</_>\n        <_>\n          8 16 6 3 2.</_>\n        <_>\n          2 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 22 -1.</_>\n        <_>\n          1 2 4 11 2.</_>\n        <_>\n          5 13 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 19 6 7 -1.</_>\n        <_>\n          9 19 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 18 -1.</_>\n        <_>\n          6 13 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 8 16 -1.</_>\n        <_>\n          5 12 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 6 2 -1.</_>\n        <_>\n          5 20 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 19 3 6 -1.</_>\n        <_>\n          11 20 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 22 12 6 -1.</_>\n        <_>\n          4 22 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 25 12 3 -1.</_>\n        <_>\n          2 25 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 6 3 -1.</_>\n        <_>\n          3 20 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 20 6 7 -1.</_>\n        <_>\n          9 20 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 12 10 -1.</_>\n        <_>\n          4 17 4 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 12 4 -1.</_>\n        <_>\n          4 18 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 6 7 -1.</_>\n        <_>\n          3 19 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 22 4 6 -1.</_>\n        <_>\n          10 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 2 24 -1.</_>\n        <_>\n          1 4 1 12 2.</_>\n        <_>\n          2 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 10 -1.</_>\n        <_>\n          10 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 10 -1.</_>\n        <_>\n          2 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 15 -1.</_>\n        <_>\n          9 10 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 3 15 -1.</_>\n        <_>\n          4 10 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 17 -1.</_>\n        <_>\n          9 7 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 17 -1.</_>\n        <_>\n          4 7 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 13 -1.</_>\n        <_>\n          10 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 13 -1.</_>\n        <_>\n          3 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 5 -1.</_>\n        <_>\n          4 3 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 7 6 -1.</_>\n        <_>\n          4 2 7 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 8 -1.</_>\n        <_>\n          7 2 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 12 -1.</_>\n        <_>\n          7 4 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 6 -1.</_>\n        <_>\n          10 17 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 6 -1.</_>\n        <_>\n          7 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 12 21 -1.</_>\n        <_>\n          4 5 6 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 12 18 -1.</_>\n        <_>\n          2 9 12 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 4 -1.</_>\n        <_>\n          4 1 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 3 13 -1.</_>\n        <_>\n          7 13 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 12 -1.</_>\n        <_>\n          1 1 3 6 2.</_>\n        <_>\n          4 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 6 -1.</_>\n        <_>\n          9 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 6 6 -1.</_>\n        <_>\n          3 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 13 -1.</_>\n        <_>\n          9 2 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 13 -1.</_>\n        <_>\n          3 2 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 28 -1.</_>\n        <_>\n          6 0 2 28 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 3 -1.</_>\n        <_>\n          0 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 20 4 7 -1.</_>\n        <_>\n          10 20 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 12 -1.</_>\n        <_>\n          6 8 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 4 8 -1.</_>\n        <_>\n          5 16 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 8 -1.</_>\n        <_>\n          3 0 3 4 2.</_>\n        <_>\n          6 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 8 -1.</_>\n        <_>\n          8 0 3 4 2.</_>\n        <_>\n          5 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 8 -1.</_>\n        <_>\n          3 0 3 4 2.</_>\n        <_>\n          6 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 20 4 7 -1.</_>\n        <_>\n          10 20 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 4 12 -1.</_>\n        <_>\n          5 15 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 4 6 -1.</_>\n        <_>\n          7 16 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 9 -1.</_>\n        <_>\n          6 2 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 12 2 -1.</_>\n        <_>\n          2 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 2 -1.</_>\n        <_>\n          6 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 4 -1.</_>\n        <_>\n          6 1 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 6 -1.</_>\n        <_>\n          0 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 8 4 -1.</_>\n        <_>\n          5 6 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 12 2 -1.</_>\n        <_>\n          1 9 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 8 -1.</_>\n        <_>\n          8 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 8 -1.</_>\n        <_>\n          0 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 12 -1.</_>\n        <_>\n          11 15 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 3 12 -1.</_>\n        <_>\n          3 15 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 12 -1.</_>\n        <_>\n          11 15 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 6 16 -1.</_>\n        <_>\n          1 12 3 8 2.</_>\n        <_>\n          4 20 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 10 5 -1.</_>\n        <_>\n          4 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 8 3 -1.</_>\n        <_>\n          3 17 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 25 12 3 -1.</_>\n        <_>\n          6 25 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 10 8 -1.</_>\n        <_>\n          1 10 5 4 2.</_>\n        <_>\n          6 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 14 6 -1.</_>\n        <_>\n          7 12 7 3 2.</_>\n        <_>\n          0 15 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 20 8 8 -1.</_>\n        <_>\n          2 20 4 4 2.</_>\n        <_>\n          6 24 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 2 7 -1.</_>\n        <_>\n          12 16 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 17 12 4 -1.</_>\n        <_>\n          4 17 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 14 -1.</_>\n        <_>\n          7 9 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 14 -1.</_>\n        <_>\n          5 9 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 9 12 -1.</_>\n        <_>\n          6 12 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 19 -1.</_>\n        <_>\n          7 4 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 19 -1.</_>\n        <_>\n          5 5 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 10 18 -1.</_>\n        <_>\n          2 10 5 9 2.</_>\n        <_>\n          7 19 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 9 15 -1.</_>\n        <_>\n          3 8 9 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 8 12 -1.</_>\n        <_>\n          3 11 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 8 -1.</_>\n        <_>\n          6 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 2 12 -1.</_>\n        <_>\n          2 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 18 -1.</_>\n        <_>\n          11 12 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 18 -1.</_>\n        <_>\n          0 12 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 10 6 -1.</_>\n        <_>\n          7 8 5 3 2.</_>\n        <_>\n          2 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 23 -1.</_>\n        <_>\n          1 3 1 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 5 -1.</_>\n        <_>\n          7 3 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 10 28 -1.</_>\n        <_>\n          2 14 10 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 8 6 -1.</_>\n        <_>\n          10 17 4 3 2.</_>\n        <_>\n          6 20 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 4 14 -1.</_>\n        <_>\n          4 13 2 7 2.</_>\n        <_>\n          6 20 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 12 -1.</_>\n        <_>\n          12 7 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 5 -1.</_>\n        <_>\n          4 3 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 12 -1.</_>\n        <_>\n          12 7 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 12 -1.</_>\n        <_>\n          1 7 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 6 6 -1.</_>\n        <_>\n          6 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 10 5 -1.</_>\n        <_>\n          5 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 8 -1.</_>\n        <_>\n          5 9 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 4 12 -1.</_>\n        <_>\n          2 7 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 3 6 -1.</_>\n        <_>\n          12 17 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 16 2 12 -1.</_>\n        <_>\n          6 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 3 6 -1.</_>\n        <_>\n          12 17 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 14 -1.</_>\n        <_>\n          7 6 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 8 11 -1.</_>\n        <_>\n          5 2 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 22 -1.</_>\n        <_>\n          6 3 1 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 6 -1.</_>\n        <_>\n          5 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 4 -1.</_>\n        <_>\n          4 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 25 8 3 -1.</_>\n        <_>\n          5 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 4 -1.</_>\n        <_>\n          4 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 10 8 -1.</_>\n        <_>\n          4 9 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 6 -1.</_>\n        <_>\n          0 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 25 8 3 -1.</_>\n        <_>\n          5 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 10 6 -1.</_>\n        <_>\n          0 13 5 3 2.</_>\n        <_>\n          5 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 15 -1.</_>\n        <_>\n          7 7 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 14 15 -1.</_>\n        <_>\n          0 6 14 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 8 -1.</_>\n        <_>\n          6 6 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 12 8 -1.</_>\n        <_>\n          0 12 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 6 -1.</_>\n        <_>\n          8 3 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 6 -1.</_>\n        <_>\n          0 3 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 25 8 3 -1.</_>\n        <_>\n          5 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 6 -1.</_>\n        <_>\n          6 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 12 4 -1.</_>\n        <_>\n          4 16 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 4 -1.</_>\n        <_>\n          8 4 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 6 -1.</_>\n        <_>\n          6 4 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 4 -1.</_>\n        <_>\n          4 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 4 -1.</_>\n        <_>\n          6 15 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 4 -1.</_>\n        <_>\n          4 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 4 -1.</_>\n        <_>\n          4 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 12 -1.</_>\n        <_>\n          9 2 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 12 -1.</_>\n        <_>\n          4 2 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 28 -1.</_>\n        <_>\n          6 0 4 28 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 8 28 -1.</_>\n        <_>\n          4 0 4 28 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 8 -1.</_>\n        <_>\n          8 15 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 8 6 -1.</_>\n        <_>\n          0 22 4 3 2.</_>\n        <_>\n          4 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 20 4 4 -1.</_>\n        <_>\n          8 21 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 6 -1.</_>\n        <_>\n          6 15 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 9 -1.</_>\n        <_>\n          6 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 17 -1.</_>\n        <_>\n          6 8 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 12 -1.</_>\n        <_>\n          7 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 12 -1.</_>\n        <_>\n          7 11 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 14 12 -1.</_>\n        <_>\n          0 12 7 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 24 -1.</_>\n        <_>\n          0 10 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 8 -1.</_>\n        <_>\n          8 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 24 12 4 -1.</_>\n        <_>\n          4 24 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 8 18 -1.</_>\n        <_>\n          5 18 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 3 22 -1.</_>\n        <_>\n          2 4 1 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 2 12 -1.</_>\n        <_>\n          11 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 2 12 -1.</_>\n        <_>\n          2 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 8 6 -1.</_>\n        <_>\n          8 1 4 3 2.</_>\n        <_>\n          4 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 8 6 -1.</_>\n        <_>\n          2 1 4 3 2.</_>\n        <_>\n          6 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 20 -1.</_>\n        <_>\n          4 10 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 9 6 -1.</_>\n        <_>\n          0 8 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 8 16 -1.</_>\n        <_>\n          3 8 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 6 16 -1.</_>\n        <_>\n          3 19 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 12 -1.</_>\n        <_>\n          7 9 3 6 2.</_>\n        <_>\n          4 15 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 20 4 3 -1.</_>\n        <_>\n          6 21 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 12 2 -1.</_>\n        <_>\n          2 7 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 4 -1.</_>\n        <_>\n          4 2 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 5 -1.</_>\n        <_>\n          8 1 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 6 -1.</_>\n        <_>\n          7 4 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 20 -1.</_>\n        <_>\n          4 10 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 4 13 -1.</_>\n        <_>\n          4 8 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 8 -1.</_>\n        <_>\n          7 0 7 4 2.</_>\n        <_>\n          0 4 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 6 -1.</_>\n        <_>\n          7 0 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 12 -1.</_>\n        <_>\n          6 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 4 7 -1.</_>\n        <_>\n          4 14 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 4 -1.</_>\n        <_>\n          5 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 19 -1.</_>\n        <_>\n          7 0 4 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 15 -1.</_>\n        <_>\n          5 5 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 12 3 -1.</_>\n        <_>\n          1 12 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 4 -1.</_>\n        <_>\n          5 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 5 6 -1.</_>\n        <_>\n          1 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 4 -1.</_>\n        <_>\n          5 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 13 3 -1.</_>\n        <_>\n          0 14 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 4 -1.</_>\n        <_>\n          5 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 4 -1.</_>\n        <_>\n          6 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 22 4 6 -1.</_>\n        <_>\n          8 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 22 4 6 -1.</_>\n        <_>\n          4 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 22 4 6 -1.</_>\n        <_>\n          8 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 22 4 6 -1.</_>\n        <_>\n          4 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 3 -1.</_>\n        <_>\n          0 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 19 7 2 -1.</_>\n        <_>\n          7 19 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 12 -1.</_>\n        <_>\n          6 13 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 26 12 2 -1.</_>\n        <_>\n          6 26 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 25 12 3 -1.</_>\n        <_>\n          2 25 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 24 14 4 -1.</_>\n        <_>\n          0 24 7 2 2.</_>\n        <_>\n          7 26 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 2 12 -1.</_>\n        <_>\n          12 3 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 12 -1.</_>\n        <_>\n          3 2 2 6 2.</_>\n        <_>\n          5 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 17 -1.</_>\n        <_>\n          7 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 8 7 -1.</_>\n        <_>\n          5 6 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 12 -1.</_>\n        <_>\n          7 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 12 -1.</_>\n        <_>\n          6 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 17 -1.</_>\n        <_>\n          7 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 8 8 -1.</_>\n        <_>\n          3 8 4 4 2.</_>\n        <_>\n          7 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 3 12 -1.</_>\n        <_>\n          9 15 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 10 12 -1.</_>\n        <_>\n          0 16 5 6 2.</_>\n        <_>\n          5 22 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 22 -1.</_>\n        <_>\n          10 2 4 11 2.</_>\n        <_>\n          6 13 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 25 12 3 -1.</_>\n        <_>\n          6 25 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 12 14 -1.</_>\n        <_>\n          2 14 6 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 8 10 -1.</_>\n        <_>\n          4 14 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 6 14 -1.</_>\n        <_>\n          7 13 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 6 14 -1.</_>\n        <_>\n          5 13 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 8 13 -1.</_>\n        <_>\n          6 12 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 8 13 -1.</_>\n        <_>\n          4 12 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 22 10 6 -1.</_>\n        <_>\n          8 22 5 3 2.</_>\n        <_>\n          3 25 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 22 10 6 -1.</_>\n        <_>\n          1 22 5 3 2.</_>\n        <_>\n          6 25 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 9 -1.</_>\n        <_>\n          8 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_>\n        <_>\n          6 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 13 -1.</_>\n        <_>\n          10 6 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 24 -1.</_>\n        <_>\n          0 14 5 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 3 8 -1.</_>\n        <_>\n          11 15 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 17 -1.</_>\n        <_>\n          6 1 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 8 -1.</_>\n        <_>\n          7 5 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 12 -1.</_>\n        <_>\n          4 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 18 -1.</_>\n        <_>\n          8 9 2 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 12 -1.</_>\n        <_>\n          4 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 12 -1.</_>\n        <_>\n          5 4 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 12 -1.</_>\n        <_>\n          5 4 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 5 -1.</_>\n        <_>\n          6 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 5 -1.</_>\n        <_>\n          5 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 21 -1.</_>\n        <_>\n          7 5 1 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 24 -1.</_>\n        <_>\n          1 0 3 12 2.</_>\n        <_>\n          4 12 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 4 6 -1.</_>\n        <_>\n          9 19 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 8 -1.</_>\n        <_>\n          3 0 3 4 2.</_>\n        <_>\n          6 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 24 9 4 -1.</_>\n        <_>\n          8 24 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 8 6 -1.</_>\n        <_>\n          2 20 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 22 6 6 -1.</_>\n        <_>\n          9 22 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 22 6 6 -1.</_>\n        <_>\n          3 22 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 6 11 -1.</_>\n        <_>\n          3 15 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 4 -1.</_>\n        <_>\n          4 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 4 11 -1.</_>\n        <_>\n          2 16 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 6 6 -1.</_>\n        <_>\n          10 16 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 12 12 -1.</_>\n        <_>\n          4 20 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 18 -1.</_>\n        <_>\n          8 16 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 5 16 -1.</_>\n        <_>\n          0 20 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 16 -1.</_>\n        <_>\n          11 16 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 12 -1.</_>\n        <_>\n          0 13 7 6 2.</_>\n        <_>\n          7 19 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 10 16 -1.</_>\n        <_>\n          8 12 5 8 2.</_>\n        <_>\n          3 20 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 5 12 -1.</_>\n        <_>\n          3 17 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 18 -1.</_>\n        <_>\n          8 6 2 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 14 -1.</_>\n        <_>\n          6 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 8 11 -1.</_>\n        <_>\n          5 15 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 8 11 -1.</_>\n        <_>\n          5 2 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 5 -1.</_>\n        <_>\n          5 4 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 8 25 -1.</_>\n        <_>\n          5 3 4 25 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 6 6 -1.</_>\n        <_>\n          10 16 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 6 6 -1.</_>\n        <_>\n          2 16 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 3 14 -1.</_>\n        <_>\n          8 13 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 4 12 -1.</_>\n        <_>\n          2 8 2 6 2.</_>\n        <_>\n          4 14 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 3 14 -1.</_>\n        <_>\n          8 13 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 3 14 -1.</_>\n        <_>\n          5 13 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 9 6 -1.</_>\n        <_>\n          5 5 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 6 4 -1.</_>\n        <_>\n          3 10 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 12 -1.</_>\n        <_>\n          11 7 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 3 -1.</_>\n        <_>\n          4 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 12 8 -1.</_>\n        <_>\n          7 13 6 4 2.</_>\n        <_>\n          1 17 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 10 10 -1.</_>\n        <_>\n          7 18 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 6 -1.</_>\n        <_>\n          5 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 13 3 -1.</_>\n        <_>\n          0 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 8 -1.</_>\n        <_>\n          11 1 3 4 2.</_>\n        <_>\n          8 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 8 -1.</_>\n        <_>\n          0 1 3 4 2.</_>\n        <_>\n          3 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 2 7 -1.</_>\n        <_>\n          7 18 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 18 7 2 -1.</_>\n        <_>\n          7 18 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 22 9 4 -1.</_>\n        <_>\n          7 22 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 5 6 -1.</_>\n        <_>\n          0 7 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 12 -1.</_>\n        <_>\n          11 7 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 3 12 -1.</_>\n        <_>\n          0 7 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 8 -1.</_>\n        <_>\n          8 0 3 4 2.</_>\n        <_>\n          5 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 8 -1.</_>\n        <_>\n          3 0 3 4 2.</_>\n        <_>\n          6 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 2 12 -1.</_>\n        <_>\n          8 3 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 9 8 -1.</_>\n        <_>\n          0 8 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 4 -1.</_>\n        <_>\n          4 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 4 10 -1.</_>\n        <_>\n          3 18 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 6 -1.</_>\n        <_>\n          9 18 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 3 -1.</_>\n        <_>\n          1 3 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 6 -1.</_>\n        <_>\n          9 18 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 14 3 -1.</_>\n        <_>\n          0 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 4 6 -1.</_>\n        <_>\n          9 19 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 4 6 -1.</_>\n        <_>\n          3 19 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 15 -1.</_>\n        <_>\n          8 12 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 20 4 4 -1.</_>\n        <_>\n          6 21 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 6 -1.</_>\n        <_>\n          9 3 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 6 -1.</_>\n        <_>\n          3 3 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 15 -1.</_>\n        <_>\n          8 12 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 15 -1.</_>\n        <_>\n          3 12 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 12 -1.</_>\n        <_>\n          9 18 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 12 -1.</_>\n        <_>\n          3 18 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 5 6 -1.</_>\n        <_>\n          8 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 5 6 -1.</_>\n        <_>\n          1 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 8 8 -1.</_>\n        <_>\n          3 8 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 14 -1.</_>\n        <_>\n          4 4 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 7 16 -1.</_>\n        <_>\n          5 18 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 10 -1.</_>\n        <_>\n          6 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 12 -1.</_>\n        <_>\n          5 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 18 -1.</_>\n        <_>\n          4 6 2 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 12 4 -1.</_>\n        <_>\n          1 12 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 5 2 -1.</_>\n        <_>\n          7 15 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 24 6 4 -1.</_>\n        <_>\n          4 24 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 5 4 -1.</_>\n        <_>\n          4 19 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 25 -1.</_>\n        <_>\n          6 1 3 25 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 12 -1.</_>\n        <_>\n          6 13 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 13 -1.</_>\n        <_>\n          7 4 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 19 -1.</_>\n        <_>\n          10 2 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 19 -1.</_>\n        <_>\n          2 2 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 13 -1.</_>\n        <_>\n          10 1 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 4 13 -1.</_>\n        <_>\n          2 1 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 8 3 -1.</_>\n        <_>\n          3 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 10 18 -1.</_>\n        <_>\n          2 11 10 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 9 12 -1.</_>\n        <_>\n          6 12 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 4 -1.</_>\n        <_>\n          4 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 10 8 -1.</_>\n        <_>\n          9 8 5 4 2.</_>\n        <_>\n          4 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 6 -1.</_>\n        <_>\n          4 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 10 -1.</_>\n        <_>\n          7 10 3 5 2.</_>\n        <_>\n          4 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 8 14 -1.</_>\n        <_>\n          3 9 4 7 2.</_>\n        <_>\n          7 16 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 20 -1.</_>\n        <_>\n          7 7 3 10 2.</_>\n        <_>\n          4 17 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 8 -1.</_>\n        <_>\n          3 0 3 4 2.</_>\n        <_>\n          6 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 6 -1.</_>\n        <_>\n          7 5 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 8 8 -1.</_>\n        <_>\n          3 7 4 4 2.</_>\n        <_>\n          7 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 4 -1.</_>\n        <_>\n          5 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 9 -1.</_>\n        <_>\n          0 12 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 12 -1.</_>\n        <_>\n          8 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 10 6 -1.</_>\n        <_>\n          1 9 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 14 12 -1.</_>\n        <_>\n          0 10 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 4 -1.</_>\n        <_>\n          3 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 8 -1.</_>\n        <_>\n          8 1 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 4 12 -1.</_>\n        <_>\n          2 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 12 4 -1.</_>\n        <_>\n          8 16 6 2 2.</_>\n        <_>\n          2 18 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 20 4 4 -1.</_>\n        <_>\n          6 21 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 16 2 12 -1.</_>\n        <_>\n          9 16 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 5 4 -1.</_>\n        <_>\n          4 19 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 8 -1.</_>\n        <_>\n          8 1 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 9 7 -1.</_>\n        <_>\n          5 6 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 8 12 -1.</_>\n        <_>\n          3 9 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 21 -1.</_>\n        <_>\n          3 7 3 7 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 8 -1.</_>\n        <_>\n          8 1 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 1 5 18 -1.</_>\n        <_>\n          2 10 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 7 -1.</_>\n        <_>\n          8 1 3 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 16 -1.</_>\n        <_>\n          1 3 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 8 -1.</_>\n        <_>\n          9 18 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 12 9 -1.</_>\n        <_>\n          3 18 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 3 -1.</_>\n        <_>\n          5 2 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 6 -1.</_>\n        <_>\n          6 1 7 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 3 13 -1.</_>\n        <_>\n          7 9 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 6 -1.</_>\n        <_>\n          6 1 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 11 -1.</_>\n        <_>\n          6 4 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 4 11 -1.</_>\n        <_>\n          6 4 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 8 -1.</_>\n        <_>\n          8 1 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 20 4 8 -1.</_>\n        <_>\n          3 20 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 22 4 6 -1.</_>\n        <_>\n          9 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 22 4 6 -1.</_>\n        <_>\n          3 22 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 22 -1.</_>\n        <_>\n          10 0 1 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 8 6 -1.</_>\n        <_>\n          5 21 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 15 -1.</_>\n        <_>\n          7 11 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 4 -1.</_>\n        <_>\n          6 1 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 16 12 4 -1.</_>\n        <_>\n          8 16 6 2 2.</_>\n        <_>\n          2 18 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 12 4 -1.</_>\n        <_>\n          0 16 6 2 2.</_>\n        <_>\n          6 18 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 12 -1.</_>\n        <_>\n          6 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 14 -1.</_>\n        <_>\n          4 20 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 9 15 -1.</_>\n        <_>\n          6 14 3 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 9 4 -1.</_>\n        <_>\n          7 13 3 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 8 7 -1.</_>\n        <_>\n          3 7 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 4 6 -1.</_>\n        <_>\n          6 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 11 -1.</_>\n        <_>\n          6 9 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 4 12 -1.</_>\n        <_>\n          1 15 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 12 -1.</_>\n        <_>\n          9 0 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 4 16 -1.</_>\n        <_>\n          2 4 2 8 2.</_>\n        <_>\n          4 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 5 14 -1.</_>\n        <_>\n          5 15 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 22 -1.</_>\n        <_>\n          3 0 1 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 25 8 3 -1.</_>\n        <_>\n          6 25 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 8 22 -1.</_>\n        <_>\n          1 17 8 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 8 -1.</_>\n        <_>\n          7 15 3 4 2.</_>\n        <_>\n          4 19 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 4 14 -1.</_>\n        <_>\n          5 13 2 7 2.</_>\n        <_>\n          7 20 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 10 12 -1.</_>\n        <_>\n          7 16 5 6 2.</_>\n        <_>\n          2 22 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 8 3 -1.</_>\n        <_>\n          4 15 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 12 3 -1.</_>\n        <_>\n          2 1 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 9 22 -1.</_>\n        <_>\n          3 5 3 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 4 -1.</_>\n        <_>\n          4 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 6 2 -1.</_>\n        <_>\n          4 14 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 4 -1.</_>\n        <_>\n          8 12 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 16 8 4 -1.</_>\n        <_>\n          4 17 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 4 6 -1.</_>\n        <_>\n          5 15 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 14 -1.</_>\n        <_>\n          5 16 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 12 -1.</_>\n        <_>\n          6 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 12 6 -1.</_>\n        <_>\n          1 20 6 3 2.</_>\n        <_>\n          7 23 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 4 -1.</_>\n        <_>\n          4 10 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 9 6 -1.</_>\n        <_>\n          1 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 4 -1.</_>\n        <_>\n          5 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 8 6 -1.</_>\n        <_>\n          3 3 4 3 2.</_>\n        <_>\n          7 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 23 6 5 -1.</_>\n        <_>\n          6 23 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 12 4 -1.</_>\n        <_>\n          0 3 6 2 2.</_>\n        <_>\n          6 5 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 18 -1.</_>\n        <_>\n          7 10 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 6 -1.</_>\n        <_>\n          6 12 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 15 12 6 -1.</_>\n        <_>\n          5 15 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 12 -1.</_>\n        <_>\n          0 5 2 6 2.</_>\n        <_>\n          2 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 16 -1.</_>\n        <_>\n          12 4 2 8 2.</_>\n        <_>\n          10 12 2 8 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_lefteye_2splits.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    Tree-based 20x20 left eye detector.\n    The detector is trained by 6665 positive samples from FERET, VALID and BioID face databases. \n    Created by Shiqi Yu (http://yushiqi.cn/research/eyedetection).\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's 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   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>20</height>\n  <width>20</width>\n  <stageParams>\n    <maxWeakCount>33</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>20</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>5</maxWeakCount>\n      <stageThreshold>-2.3924100399017334e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 0 2.7325989678502083e-02 -1 -2 1 -7.0568458177149296e-03</internalNodes>\n          <leafValues>\n            -9.0600621700286865e-01 9.3385708332061768e-01\n            -4.5859959721565247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2 -1.2538699805736542e-01 -1 -2 3\n            -1.1487299948930740e-01</internalNodes>\n          <leafValues>\n            7.2463721036911011e-01 5.3034168481826782e-01\n            -8.3221220970153809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 4 -5.8309938758611679e-02 -1 -2 5\n            -1.7684370279312134e-02</internalNodes>\n          <leafValues>\n            6.5408891439437866e-01 2.9482871294021606e-01\n            -7.4809581041336060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 6 3.5937170032411814e-03 -1 -2 7 -1.3436110457405448e-03</internalNodes>\n          <leafValues>\n            -5.0303918123245239e-01 6.5995341539382935e-01\n            -5.5740857124328613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 8 -2.1795940119773149e-03 -1 -2 9 1.1514870449900627e-02</internalNodes>\n          <leafValues>\n            -4.2016351222991943e-01 5.9694331884384155e-01\n            -8.0508047342300415e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>7</maxWeakCount>\n      <stageThreshold>-2.6498730182647705e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 10 -2.2485560178756714e-01 -1 -2 11\n            -9.6008004620671272e-03</internalNodes>\n          <leafValues>\n            -8.1363201141357422e-01 9.0863138437271118e-01\n            -3.2208970189094543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 12 7.4219167232513428e-02 -1 -2 13\n            -5.3165741264820099e-03</internalNodes>\n          <leafValues>\n            -7.5329452753067017e-01 8.6339497566223145e-01\n            -3.3463571220636368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 14 -2.1913449745625257e-03 -1 -2 15\n            1.1800959706306458e-02</internalNodes>\n          <leafValues>\n            -5.5720347166061401e-01 -3.2359680533409119e-01\n            6.4163821935653687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 16 -7.6179709285497665e-03 -1 -2 17\n            -9.0587511658668518e-03</internalNodes>\n          <leafValues>\n            -5.3167867660522461e-01 -7.3611450195312500e-01\n            5.5660772323608398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 18 -4.9959779717028141e-03 -1 -2 19\n            8.0803930759429932e-03</internalNodes>\n          <leafValues>\n            -4.1476911306381226e-01 5.9278357028961182e-01\n            -6.7384922504425049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 20 1.9909010734409094e-03 -1 -2 21\n            1.6845749923959374e-03</internalNodes>\n          <leafValues>\n            -4.2145928740501404e-01 5.4679220914840698e-01\n            -7.5099450349807739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 22 -5.0781872123479843e-03 -1 -2 23\n            2.6645609177649021e-03</internalNodes>\n          <leafValues>\n            -3.9899548888206482e-01 5.8940601348876953e-01\n            -4.6778041124343872e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>8</maxWeakCount>\n      <stageThreshold>-2.3828399181365967e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 24 -2.5301438570022583e-01 -1 -2 25\n            2.9663778841495514e-03</internalNodes>\n          <leafValues>\n            -7.5402587652206421e-01 -3.5279649496078491e-01\n            8.7992298603057861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 26 -4.7127649188041687e-02 -1 -2 27\n            1.9500750349834561e-03</internalNodes>\n          <leafValues>\n            -5.2234899997711182e-01 -3.0379909276962280e-01\n            7.5204378366470337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 28 -7.1481026709079742e-02 -1 -2 29\n            2.2189730405807495e-01</internalNodes>\n          <leafValues>\n            6.5841901302337646e-01 -6.0907202959060669e-01\n            5.6842160224914551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 30 3.3842820674180984e-02 -1 -2 31\n            -5.1714561413973570e-04</internalNodes>\n          <leafValues>\n            -6.4311647415161133e-01 5.4620361328125000e-01\n            -3.9984148740768433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 32 -3.4458211157470942e-03 -1 -2 33\n            2.4395729415118694e-03</internalNodes>\n          <leafValues>\n            -4.5636838674545288e-01 4.7798189520835876e-01\n            -9.1247087717056274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 34 2.1385070867836475e-03 -1 -2 35\n            1.8324409611523151e-03</internalNodes>\n          <leafValues>\n            -8.3617758750915527e-01 3.3462798595428467e-01\n            -7.5008547306060791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 36 1.1167610064148903e-03 -1 -2 37\n            9.9106997367925942e-05</internalNodes>\n          <leafValues>\n            -6.9083797931671143e-01 -3.4561330080032349e-01\n            4.1183179616928101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 38 1.5447770245373249e-02 -1 -2 39\n            -3.2244939357042313e-02</internalNodes>\n          <leafValues>\n            3.6980190873146057e-01 6.1112838983535767e-01\n            -5.5685341358184814e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-2.1312201023101807e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 40 -1.2251129746437073e-01 -1 -2 41\n            -1.4230609871447086e-02</internalNodes>\n          <leafValues>\n            -6.7026627063751221e-01 8.7802392244338989e-01\n            -1.8784180283546448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 42 -5.9833219274878502e-03 -1 -2 43\n            7.7085137367248535e-02</internalNodes>\n          <leafValues>\n            -5.8122849464416504e-01 -5.0395351648330688e-01\n            6.7387360334396362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 44 -1.1086189746856689e-01 -1 -2 45\n            9.4604760408401489e-02</internalNodes>\n          <leafValues>\n            6.3432037830352783e-01 -4.9726390838623047e-01\n            3.8787439465522766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 46 1.7696130089461803e-04 -1 -2 47\n            2.0120320841670036e-03</internalNodes>\n          <leafValues>\n            -6.3938802480697632e-01 -3.5313910245895386e-01\n            5.1538437604904175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 48 -1.6102839726954699e-03 -1 -2 49\n            1.6666069859638810e-03</internalNodes>\n          <leafValues>\n            -5.1915901899337769e-01 4.0478190779685974e-01\n            -6.9496357440948486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 50 -7.1480998303741217e-04 -1 -2 51\n            -4.7647571191191673e-03</internalNodes>\n          <leafValues>\n            -4.8945188522338867e-01 -5.0037759542465210e-01\n            4.0796059370040894e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 52 7.8659597784280777e-03 -1 -2 53\n            -1.2938310392200947e-03</internalNodes>\n          <leafValues>\n            -3.3636429905891418e-01 -6.7621380090713501e-01\n            4.7010248899459839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 54 -3.6533139063976705e-04 -1 -2 55\n            2.0565679296851158e-03</internalNodes>\n          <leafValues>\n            -4.7071608901023865e-01 4.1323411464691162e-01\n            -5.5526417493820190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 56 7.8385717642959207e-05 -1 -2 57\n            1.7511800397187471e-03</internalNodes>\n          <leafValues>\n            -5.1521158218383789e-01 3.3417248725891113e-01\n            -7.9558157920837402e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-2.0176210403442383e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 58 -6.4695239067077637e-02 -1 -2 59\n            9.5212170854210854e-03</internalNodes>\n          <leafValues>\n            -6.1326402425765991e-01 -5.4831558465957642e-01\n            7.8652447462081909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 60 -9.8109766840934753e-02 -1 -2 61\n            -8.5938459634780884e-01</internalNodes>\n          <leafValues>\n            6.9113308191299438e-01 4.5364680886268616e-01\n            -5.0026148557662964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 62 -8.9836172759532928e-02 -1 -2 63\n            2.6945930439978838e-03</internalNodes>\n          <leafValues>\n            -5.2928781509399414e-01 -3.8199779391288757e-01\n            5.7821297645568848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 64 2.5973599404096603e-03 -1 -2 65\n            -3.0058110132813454e-03</internalNodes>\n          <leafValues>\n            -9.1928368806838989e-01 -8.0213797092437744e-01\n            2.9259279370307922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 66 -4.5496290549635887e-03 -1 -2 67\n            4.7376728616654873e-03</internalNodes>\n          <leafValues>\n            -4.3678951263427734e-01 4.1010880470275879e-01\n            -7.2692811489105225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 68 4.6190437860786915e-03 -1 -2 69\n            4.5377281494438648e-03</internalNodes>\n          <leafValues>\n            -8.4895151853561401e-01 3.0124679207801819e-01\n            -7.0301771163940430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 70 -2.4952790699899197e-03 -1 -2 71\n            -5.1753767766058445e-03</internalNodes>\n          <leafValues>\n            -4.6784749627113342e-01 -7.4530351161956787e-01\n            4.0011820197105408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 72 -5.2049742080271244e-03 -1 -2 73\n            -8.7892003357410431e-02</internalNodes>\n          <leafValues>\n            4.8669269680976868e-01 8.3493947982788086e-01\n            -3.3827719092369080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 74 6.9997250102460384e-03 -1 -2 75\n            -9.0990252792835236e-03</internalNodes>\n          <leafValues>\n            -2.9039889574050903e-01 6.2315821647644043e-01\n            -3.5424730181694031e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>11</maxWeakCount>\n      <stageThreshold>-2.2212049961090088e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 76 -5.5702101439237595e-02 -1 -2 77\n            3.4033291041851044e-02</internalNodes>\n          <leafValues>\n            -6.9841581583023071e-01 -3.9509189128875732e-01\n            8.0313128232955933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 78 -4.6199060976505280e-02 -1 -2 79\n            -4.8061669804155827e-03</internalNodes>\n          <leafValues>\n            -4.8860380053520203e-01 8.0775612592697144e-01\n            -7.4490822851657867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 80 1.8170489929616451e-03 -1 -2 81\n            -3.6162370815873146e-03</internalNodes>\n          <leafValues>\n            -3.8043528795242310e-01 6.0451722145080566e-01\n            -2.2582240402698517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 82 -1.5706950798630714e-02 -1 -2 83\n            4.3929950334131718e-03</internalNodes>\n          <leafValues>\n            -3.7577998638153076e-01 5.4214221239089966e-01\n            -3.7388241291046143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 84 -1.0047219984699041e-04 -1 -2 85\n            -8.6475118994712830e-02</internalNodes>\n          <leafValues>\n            -4.7433409094810486e-01 5.0186318159103394e-01\n            -2.1136230230331421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 86 -7.7960766851902008e-02 -1 -2 87\n            9.8561286926269531e-02</internalNodes>\n          <leafValues>\n            5.7337349653244019e-01 -3.2515558600425720e-01\n            5.3035980463027954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 88 -5.4359167814254761e-01 -1 -2 89\n            -4.4177699834108353e-02</internalNodes>\n          <leafValues>\n            5.9464299678802490e-01 2.9671078920364380e-01\n            -3.8474830985069275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 90 -8.8016409426927567e-04 -1 -2 91\n            2.6359390467405319e-03</internalNodes>\n          <leafValues>\n            -3.2000589370727539e-01 -1.7586140334606171e-01\n            4.8360350728034973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 92 -1.4203689992427826e-02 -1 -2 93\n            -7.3902818257920444e-05</internalNodes>\n          <leafValues>\n            -7.7882087230682373e-01 3.0619418621063232e-01\n            -3.3196049928665161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 94 4.6157240867614746e-03 -1 -2 95\n            1.1152310296893120e-02</internalNodes>\n          <leafValues>\n            4.9689778685569763e-01 -5.3435891866683960e-01\n            9.7229443490505219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 96 -6.0547702014446259e-03 -1 -2 97\n            -2.1118740551173687e-03</internalNodes>\n          <leafValues>\n            -8.3811217546463013e-01 6.3617032766342163e-01\n            -4.8299189656972885e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>13</maxWeakCount>\n      <stageThreshold>-2.1328830718994141e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 98 -1.2956829741597176e-02 -1 -2 99\n            -2.7141019701957703e-02</internalNodes>\n          <leafValues>\n            -6.4874732494354248e-01 7.6293057203292847e-01\n            -3.3947870135307312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 100 4.5119998976588249e-03 -1 -2 101\n            1.2516690418124199e-02</internalNodes>\n          <leafValues>\n            -5.0059837102890015e-01 -3.6873328685760498e-01\n            5.9888631105422974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 102 -6.0557941906154156e-03 -1 -2 103\n            -4.6923749148845673e-02</internalNodes>\n          <leafValues>\n            -3.8940930366516113e-01 6.3268911838531494e-01\n            -2.6270028948783875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 104 -2.4018269032239914e-03 -1 -2 105\n            -1.5936089679598808e-02</internalNodes>\n          <leafValues>\n            -5.0517928600311279e-01 6.5526002645492554e-01\n            -1.7308109998703003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 106 1.4000290073454380e-02 -1 -2 107\n            1.3202779926359653e-02</internalNodes>\n          <leafValues>\n            -4.1653230786323547e-01 -4.9121969938278198e-01\n            3.7397938966751099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 108 -2.7658580802381039e-04 -1 -2 109\n            -4.8634149134159088e-03</internalNodes>\n          <leafValues>\n            -4.5382869243621826e-01 -5.9796881675720215e-01\n            3.1217721104621887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 110 2.7654920704662800e-03 -1 -2 111\n            2.5534769892692566e-01</internalNodes>\n          <leafValues>\n            -7.6476567983627319e-01 -3.4267220646142960e-02\n            7.0786577463150024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 112 4.6812961809337139e-03 -1 -2 113\n            6.5162130631506443e-03</internalNodes>\n          <leafValues>\n            -7.8790861368179321e-01 1.8877579271793365e-01\n            -7.9132258892059326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 114 5.7325329631567001e-02 -1 -2 115\n            -1.2718330137431622e-02</internalNodes>\n          <leafValues>\n            6.2349188327789307e-01 3.0860608816146851e-01\n            -3.2784330844879150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 116 -6.7374261561781168e-04 -1 -2 117\n            5.6564649567008018e-03</internalNodes>\n          <leafValues>\n            -4.5451548695564270e-01 2.7431339025497437e-01\n            -7.8447937965393066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 118 3.1134090386331081e-03 -1 -2 119\n            2.4249779526144266e-03</internalNodes>\n          <leafValues>\n            3.9738771319389343e-01 -3.5198271274566650e-01\n            3.0490091443061829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 120 -5.5641461163759232e-02 -1 -2 121\n            4.3548129498958588e-02</internalNodes>\n          <leafValues>\n            4.5575490593910217e-01 -3.3370929956436157e-01\n            2.9501429200172424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 122 8.0783379962667823e-04 -1 -2 123\n            1.8713270546868443e-03</internalNodes>\n          <leafValues>\n            2.2460040450096130e-01 -6.6048407554626465e-01\n            1.5031670033931732e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>13</maxWeakCount>\n      <stageThreshold>-1.9884539842605591e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 124 -4.3516629934310913e-01 -1 -2 125\n            6.2595037743449211e-03</internalNodes>\n          <leafValues>\n            -4.9959290027618408e-01 -2.3639589548110962e-01\n            7.9975378513336182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 126 -6.6518150269985199e-03 -1 -2 127\n            -5.7092090137302876e-03</internalNodes>\n          <leafValues>\n            -5.4752808809280396e-01 6.4273327589035034e-01\n            -2.1511809527873993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 128 1.9450180232524872e-02 -1 -2 129\n            -5.4476498626172543e-03</internalNodes>\n          <leafValues>\n            -5.3605002164840698e-01 5.5794501304626465e-01\n            -2.1474960446357727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 130 -1.6347589553333819e-04 -1 -2 131\n            7.1614650078117847e-03</internalNodes>\n          <leafValues>\n            -5.5962842702865601e-01 -1.6604369878768921e-01\n            4.6805259585380554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 132 -1.3145170174539089e-02 -1 -2 133\n            -1.1436809785664082e-02</internalNodes>\n          <leafValues>\n            -4.1279909014701843e-01 3.7901800870895386e-01\n            -4.1791579127311707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 134 -7.2912001051008701e-03 -1 -2 135\n            -5.2170921117067337e-04</internalNodes>\n          <leafValues>\n            -7.6089668273925781e-01 3.2527619600296021e-01\n            -3.0110970139503479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 136 3.3754010219126940e-03 -1 -2 137\n            2.5100160855799913e-03</internalNodes>\n          <leafValues>\n            -7.8373962640762329e-01 1.8525449931621552e-01\n            -5.8084958791732788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 138 -1.2884209863841534e-03 -1 -2 139\n            -1.8726480193436146e-03</internalNodes>\n          <leafValues>\n            2.7339500188827515e-01 1.6819879412651062e-01\n            -5.1986902952194214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 140 2.4010189808905125e-03 -1 -2 141\n            4.8938081599771976e-03</internalNodes>\n          <leafValues>\n            -8.2964670658111572e-01 1.6796599328517914e-01\n            -6.5530872344970703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 142 3.1223020050674677e-03 -1 -2 143\n            5.0366491079330444e-02</internalNodes>\n          <leafValues>\n            -4.3521308898925781e-01 -5.8327801525592804e-03\n            7.0878309011459351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 144 3.6151800304651260e-02 -1 -2 145\n            -1.3426589965820312e-01</internalNodes>\n          <leafValues>\n            4.4979161024093628e-01 3.9472430944442749e-01\n            -3.7588629126548767e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 146 -2.7791369706392288e-02 -1 -2 147\n            -1.2712170369923115e-02</internalNodes>\n          <leafValues>\n            -2.9488721489906311e-01 -7.2011739015579224e-01\n            3.6595028638839722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 148 -3.8276749546639621e-04 -1 -2 149\n            -6.1330529861152172e-03</internalNodes>\n          <leafValues>\n            -4.0581339597702026e-01 -5.2725958824157715e-01\n            3.6040499806404114e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>16</maxWeakCount>\n      <stageThreshold>-2.0902318954467773e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 150 -4.7748669981956482e-02 -1 -2 151\n            4.6201851218938828e-03</internalNodes>\n          <leafValues>\n            -5.9902387857437134e-01 -2.4887490272521973e-01\n            6.9201582670211792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 152 -8.5353456437587738e-02 -1 -2 153\n            -7.0110969245433807e-03</internalNodes>\n          <leafValues>\n            -5.1715832948684692e-01 5.6950652599334717e-01\n            -2.4749420583248138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 154 -7.6567470096051693e-03 -1 -2 155\n            -3.5919491201639175e-02</internalNodes>\n          <leafValues>\n            -3.7316519021987915e-01 4.9438580870628357e-01\n            -3.9586681127548218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 156 -7.4326626956462860e-02 -1 -2 157\n            9.0118587017059326e-02</internalNodes>\n          <leafValues>\n            5.6755977869033813e-01 -3.8921171426773071e-01\n            3.1079098582267761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 158 1.6736460849642754e-02 -1 -2 159\n            1.8592580454424024e-03</internalNodes>\n          <leafValues>\n            -3.6674138903617859e-01 3.4875720739364624e-01\n            -5.7483112812042236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 160 7.5264140032231808e-03 -1 -2 161\n            -3.5309391096234322e-03</internalNodes>\n          <leafValues>\n            6.7878991365432739e-01 4.8617920279502869e-01\n            -2.5660640001296997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 162 -4.9510748795000836e-05 -1 -2 163\n            -6.8923248909413815e-03</internalNodes>\n          <leafValues>\n            -4.5661240816116333e-01 -5.7134729623794556e-01\n            3.2921048998832703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 164 6.1156069859862328e-03 -1 -2 165\n            -5.5014882236719131e-03</internalNodes>\n          <leafValues>\n            -7.1315360069274902e-01 -5.9139078855514526e-01\n            1.9805949926376343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 166 -4.2378060519695282e-02 -1 -2 167\n            2.2011259570717812e-03</internalNodes>\n          <leafValues>\n            -3.8239300251007080e-01 3.3457010984420776e-01\n            -4.3032339215278625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 168 2.1217379253357649e-03 -1 -2 169\n            6.4385468140244484e-03</internalNodes>\n          <leafValues>\n            -6.8310022354125977e-01 2.0478610694408417e-01\n            -6.1793941259384155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 170 3.1177410855889320e-03 -1 -2 171\n            4.2230269173160195e-04</internalNodes>\n          <leafValues>\n            5.1137161254882812e-01 -3.6440208554267883e-01\n            2.1073049306869507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 172 -6.5657291561365128e-03 -1 -2 173\n            2.5686610024422407e-03</internalNodes>\n          <leafValues>\n            -6.4581501483917236e-01 2.7643561363220215e-01\n            -3.4198498725891113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 174 -6.2437567976303399e-05 -1 -2 175\n            -3.6269261036068201e-03</internalNodes>\n          <leafValues>\n            -3.1758078932762146e-01 -8.1051957607269287e-01\n            2.7218630909919739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 176 -3.4638389479368925e-03 -1 -2 177\n            -7.4930191040039062e-02</internalNodes>\n          <leafValues>\n            -3.9515769481658936e-01 -5.4353868961334229e-01\n            2.6106119155883789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 178 -9.7247250378131866e-03 -1 -2 179\n            4.5450199395418167e-03</internalNodes>\n          <leafValues>\n            4.1124871373176575e-01 -3.1576550006866455e-01\n            3.9046970009803772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 180 -2.7354240883141756e-03 -1 -2 181\n            -1.6969470307230949e-02</internalNodes>\n          <leafValues>\n            -7.4906748533248901e-01 -6.2437218427658081e-01\n            1.8387380242347717e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>15</maxWeakCount>\n      <stageThreshold>-1.9407310485839844e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 182 -2.4978699162602425e-02 -1 -2 183\n            -5.8007869869470596e-02</internalNodes>\n          <leafValues>\n            -6.0697889328002930e-01 7.1478021144866943e-01\n            -2.9943239688873291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 184 -5.1753749139606953e-03 -1 -2 185\n            -8.9618662605062127e-04</internalNodes>\n          <leafValues>\n            -3.5297989845275879e-01 5.4417461156845093e-01\n            -3.9789950847625732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 186 -2.8718139219563454e-05 -1 -2 187\n            4.7620530240237713e-03</internalNodes>\n          <leafValues>\n            -4.8898181319236755e-01 -3.1144559383392334e-01\n            4.6786791086196899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 188 1.9751280546188354e-02 -1 -2 189\n            -1.2683609966188669e-03</internalNodes>\n          <leafValues>\n            -4.3020489811897278e-01 -5.4090851545333862e-01\n            3.9797520637512207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 190 -4.5749718992738053e-05 -1 -2 191\n            2.4090509396046400e-03</internalNodes>\n          <leafValues>\n            -4.4518938660621643e-01 2.8822308778762817e-01\n            -5.4514312744140625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 192 -4.5728669501841068e-03 -1 -2 193\n            8.9018214493989944e-03</internalNodes>\n          <leafValues>\n            5.5039870738983154e-01 -4.1598889231681824e-01\n            1.7468899488449097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 194 -1.2056449800729752e-01 -1 -2 195\n            4.6919930726289749e-02</internalNodes>\n          <leafValues>\n            6.8890577554702759e-01 -4.2266309261322021e-01\n            1.7010940611362457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 196 -4.2390259914100170e-03 -1 -2 197\n            3.2174249645322561e-03</internalNodes>\n          <leafValues>\n            -6.3045340776443481e-01 -3.6097949743270874e-01\n            2.4933730065822601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 198 -8.5738790221512318e-04 -1 -2 199\n            -1.8432449549436569e-02</internalNodes>\n          <leafValues>\n            3.0993479490280151e-01 9.7758449614048004e-02\n            -5.0742352008819580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 200 5.8692828752100468e-03 -1 -2 201\n            -6.8751699291169643e-03</internalNodes>\n          <leafValues>\n            -7.4556058645248413e-01 -6.7458391189575195e-01\n            1.5918810665607452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 202 -6.8542227381840348e-05 -1 -2 203\n            -1.0658579878509045e-02</internalNodes>\n          <leafValues>\n            -4.1279420256614685e-01 3.7002709507942200e-01\n            -2.1731729805469513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 204 -1.8811509944498539e-03 -1 -2 205\n            -2.2309130057692528e-02</internalNodes>\n          <leafValues>\n            5.7902830839157104e-01 1.9725680351257324e-01\n            -3.2475191354751587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 206 6.5826578065752983e-04 -1 -2 207\n            -5.0781588070094585e-03</internalNodes>\n          <leafValues>\n            -6.0630238056182861e-01 -7.7123302221298218e-01\n            1.8186129629611969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 208 5.6215081363916397e-02 -1 -2 209\n            -3.7720590829849243e-02</internalNodes>\n          <leafValues>\n            5.0561398267745972e-01 3.6052110791206360e-01\n            -3.2743760943412781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 210 3.9480631239712238e-03 -1 -2 211\n            -2.4269670248031616e-03</internalNodes>\n          <leafValues>\n            -7.5788182020187378e-01 5.2076101303100586e-01\n            -6.1021361500024796e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>19</maxWeakCount>\n      <stageThreshold>-2.1061589717864990e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 212 -1.6906699165701866e-02 -1 -2 213\n            2.5327840819954872e-02</internalNodes>\n          <leafValues>\n            -4.7501268982887268e-01 -4.4016760587692261e-01\n            6.0885351896286011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 214 -1.5663320198655128e-02 -1 -2 215\n            -1.6101899743080139e-01</internalNodes>\n          <leafValues>\n            5.7100051641464233e-01 4.0989148616790771e-01\n            -3.8142371177673340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 216 1.6885380318854004e-04 -1 -2 217\n            -3.0552360694855452e-03</internalNodes>\n          <leafValues>\n            -4.7958490252494812e-01 4.2852300405502319e-01\n            -2.8252631425857544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 218 4.8042940907180309e-03 -1 -2 219\n            -5.0092511810362339e-03</internalNodes>\n          <leafValues>\n            -6.8659138679504395e-01 -5.9033542871475220e-01\n            1.9732500612735748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 220 -3.7119518965482712e-02 -1 -2 221\n            3.7857799325138330e-03</internalNodes>\n          <leafValues>\n            -4.3130961060523987e-01 3.3596190810203552e-01\n            -3.7401720881462097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 222 -1.0869850404560566e-02 -1 -2 223\n            4.0577541221864522e-04</internalNodes>\n          <leafValues>\n            5.4841208457946777e-01 -5.0022697448730469e-01\n            5.1423858851194382e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 224 5.0201490521430969e-03 -1 -2 225\n            2.5601210072636604e-03</internalNodes>\n          <leafValues>\n            -5.9016227722167969e-01 1.9469800591468811e-01\n            -6.4648360013961792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 226 -1.2395749799907207e-03 -1 -2 227\n            -5.1075750961899757e-03</internalNodes>\n          <leafValues>\n            -2.7762159705162048e-01 -6.1149162054061890e-01\n            3.5250389575958252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 228 -6.4853738876990974e-05 -1 -2 229\n            2.3282810579985380e-03</internalNodes>\n          <leafValues>\n            -3.4008860588073730e-01 2.7134749293327332e-01\n            -6.6915398836135864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 230 -1.5571110416203737e-03 -1 -2 231\n            2.3992219939827919e-03</internalNodes>\n          <leafValues>\n            -4.1144248843193054e-01 2.5939700007438660e-01\n            -4.0380299091339111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 232 7.7784422319382429e-04 -1 -2 233\n            3.2334199640899897e-03</internalNodes>\n          <leafValues>\n            2.9523921012878418e-01 -5.8436852693557739e-01\n            -1.7936639487743378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 234 -5.6113858590833843e-05 -1 -2 235\n            1.9111000001430511e-03</internalNodes>\n          <leafValues>\n            -3.5021650791168213e-01 2.6312610507011414e-01\n            -6.1549347639083862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 236 -3.4321150742471218e-03 -1 -2 237\n            -1.4541969634592533e-02</internalNodes>\n          <leafValues>\n            3.7493300437927246e-01 4.3788930773735046e-01\n            -3.0131611227989197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 238 -2.5027070194482803e-02 -1 -2 239\n            -3.1183639075607061e-03</internalNodes>\n          <leafValues>\n            -5.2829748392105103e-01 -8.1336849927902222e-01\n            1.7928420007228851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 240 2.9415208846330643e-03 -1 -2 241\n            -2.4807679001241922e-03</internalNodes>\n          <leafValues>\n            -4.7243058681488037e-01 -6.0058331489562988e-01\n            2.1497109532356262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 242 -4.2498838156461716e-03 -1 -2 243\n            7.6959328725934029e-03</internalNodes>\n          <leafValues>\n            -3.3230608701705933e-01 2.1247069537639618e-01\n            -8.1967252492904663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 244 -6.1426039785146713e-02 -1 -2 245\n            5.3176790475845337e-02</internalNodes>\n          <leafValues>\n            5.2200448513031006e-01 -2.9851761460304260e-01\n            2.8654190897941589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 246 2.5695779186207801e-05 -1 -2 247\n            2.4311970919370651e-03</internalNodes>\n          <leafValues>\n            -3.4719291329383850e-01 -1.2133490294218063e-01\n            3.8965350389480591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 248 5.6956289336085320e-03 -1 -2 249\n            -6.6630227956920862e-04</internalNodes>\n          <leafValues>\n            -6.6364032030105591e-01 2.7921909093856812e-01\n            -2.1624849736690521e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>20</maxWeakCount>\n      <stageThreshold>-2.0051579475402832e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 250 -2.8509549796581268e-02 -1 -2 251\n            -1.6429109498858452e-02</internalNodes>\n          <leafValues>\n            -5.5133241415023804e-01 6.0328769683837891e-01\n            -3.0009600520133972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 252 -5.8078952133655548e-03 -1 -2 253\n            -1.4670349657535553e-02</internalNodes>\n          <leafValues>\n            -4.8640519380569458e-01 4.4786658883094788e-01\n            -3.5448360443115234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 254 -1.0694459779188037e-03 -1 -2 255\n            -5.0697539001703262e-02</internalNodes>\n          <leafValues>\n            -3.8593119382858276e-01 4.3865600228309631e-01\n            -3.1134051084518433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 256 -7.2318017482757568e-02 -1 -2 257\n            -1.6740759834647179e-02</internalNodes>\n          <leafValues>\n            5.5695492029190063e-01 3.4036931395530701e-01\n            -3.7713068723678589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 258 1.2923260219395161e-02 -1 -2 259\n            -2.0832989830523729e-03</internalNodes>\n          <leafValues>\n            2.6987180113792419e-01 7.2217263281345367e-02\n            -5.0617259740829468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 260 2.9217539122328162e-04 -1 -2 261\n            4.6477448195219040e-03</internalNodes>\n          <leafValues>\n            -4.7199469804763794e-01 -2.0233640074729919e-01\n            3.6684620380401611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 262 1.6355320112779737e-03 -1 -2 263\n            6.0143060982227325e-03</internalNodes>\n          <leafValues>\n            -3.3369150757789612e-01 2.6335370540618896e-01\n            -7.5315129756927490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 264 -1.9768040627241135e-02 -1 -2 265\n            5.0995801575481892e-03</internalNodes>\n          <leafValues>\n            -7.3396641016006470e-01 -1.0626330226659775e-01\n            3.7877479195594788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 266 2.1737320348620415e-03 -1 -2 267\n            2.3621059954166412e-02</internalNodes>\n          <leafValues>\n            -4.5873621106147766e-01 -3.7341989576816559e-02\n            5.0312960147857666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 268 4.7070439904928207e-02 -1 -2 269\n            4.8429161310195923e-02</internalNodes>\n          <leafValues>\n            3.9159670472145081e-01 -2.7507638931274414e-01\n            3.6923450231552124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 270 7.1763257437851280e-05 -1 -2 271\n            -4.0031517855823040e-03</internalNodes>\n          <leafValues>\n            -2.6133701205253601e-01 -4.6118479967117310e-01\n            3.4101578593254089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 272 2.5536299217492342e-03 -1 -2 273\n            -2.5720898993313313e-03</internalNodes>\n          <leafValues>\n            4.4237849116325378e-01 4.3066531419754028e-01\n            -2.8360688686370850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 274 8.7512210011482239e-03 -1 -2 275\n            5.7346918620169163e-03</internalNodes>\n          <leafValues>\n            -7.7647632360458374e-01 1.4551159739494324e-01\n            -7.5074160099029541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 276 -6.6438838839530945e-03 -1 -2 277\n            -3.4590701106935740e-03</internalNodes>\n          <leafValues>\n            4.0350550413131714e-01 2.8769719600677490e-01\n            -2.8021600842475891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 278 9.9742468446493149e-03 -1 -2 279\n            1.3233659788966179e-02</internalNodes>\n          <leafValues>\n            -6.0677021741867065e-01 1.5478080511093140e-01\n            -7.0759147405624390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 280 -5.0271311774849892e-03 -1 -2 281\n            -1.2092100223526359e-04</internalNodes>\n          <leafValues>\n            -7.3897778987884521e-01 2.3473000526428223e-01\n            -2.4400579929351807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 282 -1.2881499715149403e-03 -1 -2 283\n            6.2854858115315437e-03</internalNodes>\n          <leafValues>\n            -2.8901669383049011e-01 2.8100869059562683e-01\n            -5.6933850049972534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 284 5.6929360143840313e-03 -1 -2 285\n            -5.3880861960351467e-03</internalNodes>\n          <leafValues>\n            -7.8456932306289673e-01 2.6201328635215759e-01\n            -2.2232030332088470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 286 4.8205819912254810e-03 -1 -2 287\n            3.4279188513755798e-01</internalNodes>\n          <leafValues>\n            5.6795972585678101e-01 -1.8314230442047119e-01\n            5.4108071327209473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 288 5.1370919682085514e-03 -1 -2 289\n            -9.1285221278667450e-03</internalNodes>\n          <leafValues>\n            -3.9116761088371277e-01 5.3076338768005371e-01\n            -3.0019309371709824e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>21</maxWeakCount>\n      <stageThreshold>-2.1121981143951416e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 290 -5.1386129111051559e-02 -1 -2 291\n            5.1850839518010616e-03</internalNodes>\n          <leafValues>\n            -5.3148782253265381e-01 -2.4744540452957153e-01\n            6.1181622743606567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 292 -1.5259400010108948e-02 -1 -2 293\n            2.5995150208473206e-02</internalNodes>\n          <leafValues>\n            -4.3303629755973816e-01 4.3979901820421219e-02\n            7.3829138278961182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 294 -3.2312370836734772e-02 -1 -2 295\n            1.3700700365006924e-02</internalNodes>\n          <leafValues>\n            -3.9609751105308533e-01 -2.7643880248069763e-01\n            4.2535358667373657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 296 -2.2647869773209095e-03 -1 -2 297\n            -6.8290620110929012e-03</internalNodes>\n          <leafValues>\n            -3.2005569338798523e-01 -5.1682972908020020e-01\n            3.6975708603858948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 298 -2.2481549531221390e-03 -1 -2 299\n            4.5944549143314362e-02</internalNodes>\n          <leafValues>\n            -3.6244350671768188e-01 -1.3187309959903359e-03\n            6.3217681646347046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 300 1.8755620112642646e-03 -1 -2 301\n            -1.9700559787452221e-03</internalNodes>\n          <leafValues>\n            -7.1403390169143677e-01 -5.8730661869049072e-01\n            1.7592810094356537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 302 -6.5721389837563038e-03 -1 -2 303\n            -1.1746180243790150e-02</internalNodes>\n          <leafValues>\n            -3.6347511410713196e-01 3.1440791487693787e-01\n            -4.0111118555068970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 304 -1.6494120063725859e-04 -1 -2 305\n            -7.2169408667832613e-05</internalNodes>\n          <leafValues>\n            -3.7792590260505676e-01 5.2791112661361694e-01\n            -1.0790319740772247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 306 1.9697639800142497e-04 -1 -2 307\n            -1.1423509567975998e-02</internalNodes>\n          <leafValues>\n            -4.7097641229629517e-01 -8.5209292173385620e-01\n            1.7662869393825531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 308 -4.5562228187918663e-03 -1 -2 309\n            -4.4720191508531570e-03</internalNodes>\n          <leafValues>\n            -8.0601161718368530e-01 -6.1500209569931030e-01\n            1.2908309698104858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 310 -1.7765410011634231e-03 -1 -2 311\n            -7.8799277544021606e-03</internalNodes>\n          <leafValues>\n            3.1382599472999573e-01 3.0394628643989563e-01\n            -3.7204921245574951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 312 -1.4284689677879214e-03 -1 -2 313\n            -1.8939910223707557e-03</internalNodes>\n          <leafValues>\n            5.0413030385971069e-01 3.4823760390281677e-01\n            -2.3673820495605469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 314 -3.1496640294790268e-03 -1 -2 315\n            -1.0716119781136513e-02</internalNodes>\n          <leafValues>\n            -6.6812378168106079e-01 -4.8515519499778748e-01\n            1.9036419689655304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 316 -6.8033537827432156e-03 -1 -2 317\n            1.4902319759130478e-02</internalNodes>\n          <leafValues>\n            -5.6979268789291382e-01 1.3098250329494476e-01\n            -7.1448272466659546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 318 -3.4170228987932205e-02 -1 -2 319\n            -1.4779250323772430e-01</internalNodes>\n          <leafValues>\n            5.0575131177902222e-01 2.8233268857002258e-01\n            -2.7205321192741394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 320 -5.5842810979811475e-05 -1 -2 321\n            3.9885081350803375e-02</internalNodes>\n          <leafValues>\n            -2.6936730742454529e-01 5.6696129031479359e-03\n            6.3975161314010620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 322 1.2483130209147930e-02 -1 -2 323\n            -3.2864511013031006e-04</internalNodes>\n          <leafValues>\n            -7.4533742666244507e-01 3.6449620127677917e-01\n            -9.6498817205429077e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 324 -1.4710469986312091e-04 -1 -2 325\n            -2.7814340591430664e-01</internalNodes>\n          <leafValues>\n            1.4060440659523010e-01 5.7002830505371094e-01\n            -4.8755478858947754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 326 -1.3452640268951654e-03 -1 -2 327\n            9.1500842245295644e-04</internalNodes>\n          <leafValues>\n            3.9255830645561218e-01 -3.0215170979499817e-01\n            3.6698031425476074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 328 -3.4133149310946465e-03 -1 -2 329\n            5.1169008947908878e-03</internalNodes>\n          <leafValues>\n            -6.4085817337036133e-01 -2.3052580654621124e-01\n            2.4285919964313507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 330 8.8846698403358459e-02 -1 -2 331\n            6.1080828309059143e-03</internalNodes>\n          <leafValues>\n            4.5381888747215271e-01 -3.5880088806152344e-01\n            1.3209380209445953e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>23</maxWeakCount>\n      <stageThreshold>-1.8701590299606323e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 332 -1.5930000692605972e-02 -1 -2 333\n            2.7407450601458549e-02</internalNodes>\n          <leafValues>\n            -3.5245341062545776e-01 -6.0236789286136627e-02\n            7.2715848684310913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 334 -8.5037678480148315e-02 -1 -2 335\n            -1.1508919997140765e-03</internalNodes>\n          <leafValues>\n            -4.3576711416244507e-01 4.6471679210662842e-01\n            -3.5896891355514526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 336 -6.4599298639222980e-04 -1 -2 337\n            5.5495807901024818e-03</internalNodes>\n          <leafValues>\n            -3.1371060013771057e-01 4.1225919127464294e-01\n            -4.9400448799133301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 338 -1.1472150217741728e-03 -1 -2 339\n            -6.4546810463070869e-03</internalNodes>\n          <leafValues>\n            -3.9192581176757812e-01 -6.9197827577590942e-01\n            2.6103940606117249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 340 -1.1414250358939171e-02 -1 -2 341\n            1.1582579463720322e-03</internalNodes>\n          <leafValues>\n            3.2361420989036560e-01 -3.8304999470710754e-01\n            2.8015980124473572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 342 -6.1077292775735259e-04 -1 -2 343\n            1.1812780285254121e-03</internalNodes>\n          <leafValues>\n            -3.7471079826354980e-01 -1.7685219645500183e-01\n            3.5498109459877014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 344 7.9117231070995331e-03 -1 -2 345\n            -9.0904926764778793e-05</internalNodes>\n          <leafValues>\n            -6.9681918621063232e-01 2.0756739377975464e-01\n            -4.4282090663909912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 346 2.8638960793614388e-03 -1 -2 347\n            1.2769990134984255e-03</internalNodes>\n          <leafValues>\n            -4.1364789009094238e-01 -2.1157020330429077e-01\n            3.1919568777084351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 348 -7.5440858490765095e-03 -1 -2 349\n            5.4467269219458103e-03</internalNodes>\n          <leafValues>\n            -7.5495690107345581e-01 1.3229879736900330e-01\n            -6.7695891857147217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 350 1.3641830300912261e-03 -1 -2 351\n            1.3810779899358749e-02</internalNodes>\n          <leafValues>\n            -4.2168149352073669e-01 1.5719360113143921e-01\n            -6.7965167760848999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 352 5.0265640020370483e-02 -1 -2 353\n            4.7765119234099984e-05</internalNodes>\n          <leafValues>\n            7.4369138479232788e-01 -3.8102349638938904e-01\n            1.0605350136756897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 354 1.4666689932346344e-01 -1 -2 355\n            -3.0426830053329468e-01</internalNodes>\n          <leafValues>\n            5.3409832715988159e-01 3.7783610820770264e-01\n            -2.1534620225429535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 356 -3.2244708854705095e-03 -1 -2 357\n            -1.7187190242111683e-03</internalNodes>\n          <leafValues>\n            2.8274241089820862e-01 1.0677109658718109e-01\n            -4.4204118847846985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 358 -8.4115704521536827e-03 -1 -2 359\n            -2.3220919072628021e-02</internalNodes>\n          <leafValues>\n            -8.3557051420211792e-01 -5.1933908462524414e-01\n            1.3181640207767487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 360 -6.3912221230566502e-03 -1 -2 361\n            -3.0661540222354233e-04</internalNodes>\n          <leafValues>\n            -6.8552321195602417e-01 2.2192850708961487e-01\n            -2.3945030570030212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 362 1.8742750398814678e-03 -1 -2 363\n            -2.8299540281295776e-02</internalNodes>\n          <leafValues>\n            -4.7218438982963562e-01 -6.8186718225479126e-01\n            1.5923790633678436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 364 7.9352483153343201e-03 -1 -2 365\n            -8.7599940598011017e-03</internalNodes>\n          <leafValues>\n            -7.3135781288146973e-01 -6.0014718770980835e-01\n            1.0350330173969269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 366 -5.5426149629056454e-03 -1 -2 367\n            -1.8066290067508817e-03</internalNodes>\n          <leafValues>\n            -5.9360408782958984e-01 2.5533521175384521e-01\n            -1.7036439478397369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 368 -8.3993803709745407e-03 -1 -2 369\n            -1.9515500171110034e-03</internalNodes>\n          <leafValues>\n            -2.3953610658645630e-01 3.7252411246299744e-01\n            -1.2982900440692902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 370 -2.2850139066576958e-03 -1 -2 371\n            -6.1910818330943584e-03</internalNodes>\n          <leafValues>\n            5.0227212905883789e-01 4.4551658630371094e-01\n            -1.6307780146598816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 372 1.1659320443868637e-03 -1 -2 373\n            -2.1016779355704784e-03</internalNodes>\n          <leafValues>\n            3.4809079766273499e-01 3.1531378626823425e-01\n            -3.4710261225700378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 374 -9.1615924611687660e-03 -1 -2 375\n            -2.0036540925502777e-02</internalNodes>\n          <leafValues>\n            -6.8623197078704834e-01 -6.8991881608963013e-01\n            1.2962220609188080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 376 2.7148448862135410e-03 -1 -2 377\n            2.2834159899502993e-03</internalNodes>\n          <leafValues>\n            4.7745740413665771e-01 -1.3344570063054562e-02\n            -6.1795878410339355e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>26</maxWeakCount>\n      <stageThreshold>-1.9807859659194946e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 378 -3.2838471233844757e-02 -1 -2 379\n            -7.5696408748626709e-03</internalNodes>\n          <leafValues>\n            -5.1984071731567383e-01 6.3690251111984253e-01\n            -1.1562170088291168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 380 5.4125871509313583e-02 -1 -2 381\n            2.7004599571228027e-01</internalNodes>\n          <leafValues>\n            5.0340247154235840e-01 -3.4640678763389587e-01\n            3.7651509046554565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 382 7.0261410437524319e-03 -1 -2 383\n            3.1245660502463579e-03</internalNodes>\n          <leafValues>\n            -4.1046440601348877e-01 -4.1382190585136414e-01\n            3.7550741434097290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 384 -1.8708549905568361e-03 -1 -2 385\n            -1.4969009906053543e-02</internalNodes>\n          <leafValues>\n            -3.7827330827713013e-01 3.9941680431365967e-01\n            -2.2254510223865509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 386 3.4136420581489801e-03 -1 -2 387\n            2.3454260081052780e-03</internalNodes>\n          <leafValues>\n            -5.4667568206787109e-01 1.6618840396404266e-01\n            -6.3203942775726318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 388 -1.1689099483191967e-03 -1 -2 389\n            -7.8206984326243401e-03</internalNodes>\n          <leafValues>\n            -4.4972181320190430e-01 -5.7166117429733276e-01\n            1.8599990010261536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 390 -2.6324259117245674e-02 -1 -2 391\n            -9.1647548833861947e-04</internalNodes>\n          <leafValues>\n            -7.8041112422943115e-01 2.3100090026855469e-01\n            -2.1224120259284973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 392 -2.3702960461378098e-03 -1 -2 393\n            -9.2874821275472641e-03</internalNodes>\n          <leafValues>\n            2.7304211258888245e-01 2.3200799524784088e-01\n            -3.4602558612823486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 394 2.9221060685813427e-03 -1 -2 395\n            -1.4097889652475715e-03</internalNodes>\n          <leafValues>\n            -6.9972628355026245e-01 4.8019358515739441e-01\n            -4.2650200426578522e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 396 9.3326548812910914e-04 -1 -2 397\n            -5.6837309151887894e-02</internalNodes>\n          <leafValues>\n            3.7708479166030884e-01 4.6375161409378052e-01\n            -2.0441579818725586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 398 -9.1405760031193495e-05 -1 -2 399\n            -1.1147770099341869e-02</internalNodes>\n          <leafValues>\n            -2.9447770118713379e-01 3.6579200625419617e-01\n            -1.6106230020523071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 400 8.0759642878547311e-04 -1 -2 401\n            1.7215589759871364e-03</internalNodes>\n          <leafValues>\n            -3.8769969344139099e-01 1.7790059745311737e-01\n            -5.9673792123794556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 402 1.4305640012025833e-02 -1 -2 403\n            -3.8885008543729782e-02</internalNodes>\n          <leafValues>\n            -2.8887918591499329e-01 3.6497229337692261e-01\n            -1.3762719929218292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 404 -3.4479280002415180e-03 -1 -2 405\n            3.0168178677558899e-01</internalNodes>\n          <leafValues>\n            1.8110840022563934e-01 -3.5425490140914917e-01\n            4.2958360910415649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 406 2.8582389932125807e-03 -1 -2 407\n            1.4091320335865021e-03</internalNodes>\n          <leafValues>\n            5.2957808971405029e-01 -2.1234430372714996e-01\n            3.1428509950637817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 408 -1.6597079811617732e-03 -1 -2 409\n            8.7804382201284170e-04</internalNodes>\n          <leafValues>\n            -6.3348418474197388e-01 -5.5315300822257996e-02\n            3.9389958977699280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 410 2.0211800001561642e-03 -1 -2 411\n            -6.8409871309995651e-03</internalNodes>\n          <leafValues>\n            -4.7127309441566467e-01 -6.4065527915954590e-01\n            1.4861440658569336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 412 4.7200761735439301e-02 -1 -2 413\n            4.9684080295264721e-03</internalNodes>\n          <leafValues>\n            4.1216409206390381e-01 -3.2404300570487976e-01\n            1.5755960345268250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 414 3.7529911845922470e-02 -1 -2 415\n            -1.1665089987218380e-02</internalNodes>\n          <leafValues>\n            4.1328459978103638e-01 2.5467500090599060e-01\n            -3.1303560733795166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 416 -6.8298257247079164e-05 -1 -2 417\n            1.5325429849326611e-02</internalNodes>\n          <leafValues>\n            -2.7212071418762207e-01 2.2946609556674957e-01\n            -6.7345708608627319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 418 8.5185896605253220e-03 -1 -2 419\n            -2.6828479021787643e-03</internalNodes>\n          <leafValues>\n            -7.1114671230316162e-01 1.5511700510978699e-01\n            -3.5444891452789307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 420 1.3791749952360988e-03 -1 -2 421\n            -3.3968368370551616e-05</internalNodes>\n          <leafValues>\n            3.6916270852088928e-01 5.9150930494070053e-02\n            -4.6007719635963440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 422 5.8259358629584312e-03 -1 -2 423\n            -8.1688696518540382e-03</internalNodes>\n          <leafValues>\n            -5.4986697435379028e-01 -5.0567412376403809e-01\n            1.5189670026302338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 424 -2.3251199163496494e-03 -1 -2 425\n            -4.8669208772480488e-03</internalNodes>\n          <leafValues>\n            3.4904810786247253e-01 5.3138560056686401e-01\n            -2.1413469314575195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 426 4.3380381539463997e-03 -1 -2 427\n            3.4176679328083992e-03</internalNodes>\n          <leafValues>\n            -7.8248262405395508e-01 1.2460789829492569e-01\n            -5.5297750234603882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 428 5.5309730768203735e-01 -1 -2 429\n            2.3636389523744583e-03</internalNodes>\n          <leafValues>\n            4.6573078632354736e-01 -3.3309051394462585e-01\n            9.4380050897598267e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>26</maxWeakCount>\n      <stageThreshold>-1.9697020053863525e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 430 -2.2934280335903168e-02 -1 -2 431\n            -4.2665850371122360e-02</internalNodes>\n          <leafValues>\n            -4.4716298580169678e-01 5.4085898399353027e-01\n            -3.3589279651641846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 432 -9.8418388515710831e-03 -1 -2 433\n            -1.1932349763810635e-02</internalNodes>\n          <leafValues>\n            3.9958000183105469e-01 3.4219118952751160e-01\n            -4.2416951060295105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 434 -2.4437010288238525e-02 -1 -2 435\n            -4.9987169913947582e-03</internalNodes>\n          <leafValues>\n            -3.7337359786033630e-01 4.0358328819274902e-01\n            -3.5199370980262756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 436 1.8582950579002500e-03 -1 -2 437\n            2.7540219016373158e-03</internalNodes>\n          <leafValues>\n            -4.4158118963241577e-01 -2.8722938895225525e-01\n            3.3857241272926331e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 438 -3.4452530089765787e-03 -1 -2 439\n            -5.9277489781379700e-03</internalNodes>\n          <leafValues>\n            -3.1821981072425842e-01 -6.5073519945144653e-01\n            2.7109220623970032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 440 -1.2391789641696960e-04 -1 -2 441\n            -7.3327139019966125e-02</internalNodes>\n          <leafValues>\n            -3.3467200398445129e-01 -5.9646248817443848e-01\n            2.2861810028553009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 442 -8.3964750170707703e-02 -1 -2 443\n            -8.1644707825034857e-04</internalNodes>\n          <leafValues>\n            -2.2525189816951752e-01 3.8213649392127991e-01\n            -3.3410450816154480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 444 -1.5207779593765736e-02 -1 -2 445\n            4.6894788742065430e-02</internalNodes>\n          <leafValues>\n            3.0742698907852173e-01 -3.8833889365196228e-01\n            2.3177519440650940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 446 -1.0398440062999725e-01 -1 -2 447\n            3.9815339259803295e-03</internalNodes>\n          <leafValues>\n            7.1321141719818115e-01 -2.3310199379920959e-01\n            2.9247841238975525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 448 2.5737080723047256e-03 -1 -2 449\n            9.1035291552543640e-04</internalNodes>\n          <leafValues>\n            -5.5017340183258057e-01 -1.8228930234909058e-01\n            2.8370320796966553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 450 6.4211348071694374e-03 -1 -2 451\n            -5.8243819512426853e-03</internalNodes>\n          <leafValues>\n            -4.8581978678703308e-01 2.4608190357685089e-01\n            -2.1565020084381104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 452 -4.0043629705905914e-02 -1 -2 453\n            8.4683427121490240e-04</internalNodes>\n          <leafValues>\n            -6.3880550861358643e-01 -6.0435589402914047e-02\n            4.3711128830909729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 454 1.2964580208063126e-02 -1 -2 455\n            -2.2524749510921538e-04</internalNodes>\n          <leafValues>\n            5.9495061635971069e-01 8.6831472814083099e-02\n            -3.6362320184707642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 456 -1.7258729785680771e-03 -1 -2 457\n            -7.2289421223104000e-03</internalNodes>\n          <leafValues>\n            -6.4707720279693604e-01 -6.8775367736816406e-01\n            1.3838720321655273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 458 2.5079259648919106e-03 -1 -2 459\n            -1.9473560387268662e-03</internalNodes>\n          <leafValues>\n            3.0659309029579163e-01 2.2967760264873505e-01\n            -3.4737649559974670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 460 7.4747111648321152e-03 -1 -2 461\n            1.0328400094294921e-04</internalNodes>\n          <leafValues>\n            -6.5191787481307983e-01 -2.0725889503955841e-01\n            2.2402130067348480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 462 -7.8996885567903519e-03 -1 -2 463\n            4.2833909392356873e-03</internalNodes>\n          <leafValues>\n            -7.2479170560836792e-01 1.3954970240592957e-01\n            -4.3086060881614685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 464 6.3452741596847773e-04 -1 -2 465\n            -5.4966621100902557e-03</internalNodes>\n          <leafValues>\n            2.9792639613151550e-01 -5.6205391883850098e-01\n            -2.9608119279146194e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 466 3.1408690847456455e-03 -1 -2 467\n            -5.0443639047443867e-03</internalNodes>\n          <leafValues>\n            -6.1322140693664551e-01 -5.3060102462768555e-01\n            1.2507459521293640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 468 4.5964870601892471e-02 -1 -2 469\n            -5.3749699145555496e-03</internalNodes>\n          <leafValues>\n            3.8188719749450684e-01 1.4089010655879974e-01\n            -3.5535690188407898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 470 2.9262059833854437e-03 -1 -2 471\n            5.2230368601158261e-04</internalNodes>\n          <leafValues>\n            -6.0886657238006592e-01 -7.1441568434238434e-02\n            3.6275258660316467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 472 -4.4181118719279766e-03 -1 -2 473\n            4.3349149636924267e-03</internalNodes>\n          <leafValues>\n            -7.6458007097244263e-01 1.1246410012245178e-01\n            -5.4553848505020142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 474 2.6483018882572651e-03 -1 -2 475\n            -1.0814110282808542e-03</internalNodes>\n          <leafValues>\n            2.3542310297489166e-01 1.4422300457954407e-01\n            -3.4401959180831909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 476 -5.4296739108394831e-05 -1 -2 477\n            5.5393581278622150e-03</internalNodes>\n          <leafValues>\n            -2.8607460856437683e-01 1.9345289468765259e-01\n            -5.0549429655075073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 478 3.3703099936246872e-02 -1 -2 479\n            -1.2178930046502501e-04</internalNodes>\n          <leafValues>\n            3.8302558660507202e-01 6.6414177417755127e-02\n            -4.8530051112174988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 480 -1.7803770024329424e-03 -1 -2 481\n            -5.6019638577708974e-05</internalNodes>\n          <leafValues>\n            4.4113549590110779e-01 1.2396749854087830e-01\n            -2.6292270421981812e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>30</maxWeakCount>\n      <stageThreshold>-2.0330519676208496e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 482 3.1982790678739548e-03 -1 -2 483\n            -1.5240450156852603e-03</internalNodes>\n          <leafValues>\n            5.4208421707153320e-01 8.2784838974475861e-02\n            -5.0164830684661865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 484 -1.2284429743885994e-02 -1 -2 485\n            -8.3555448800325394e-03</internalNodes>\n          <leafValues>\n            4.4174939393997192e-01 3.5863399505615234e-01\n            -3.6254858970642090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 486 4.1357800364494324e-02 -1 -2 487\n            2.2308749612420797e-03</internalNodes>\n          <leafValues>\n            4.7858810424804688e-01 -6.0390347242355347e-01\n            -8.7199418339878321e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 488 -5.4160541296005249e-01 -1 -2 489\n            7.9009458422660828e-03</internalNodes>\n          <leafValues>\n            -3.2536658644676208e-01 -3.6415100097656250e-01\n            4.0501600503921509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 490 -2.7236728928983212e-03 -1 -2 491\n            2.1041880827397108e-03</internalNodes>\n          <leafValues>\n            -2.7644181251525879e-01 3.4068119525909424e-01\n            -4.1922488808631897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 492 1.2688159476965666e-03 -1 -2 493\n            -4.2881062254309654e-03</internalNodes>\n          <leafValues>\n            -5.4520767927169800e-01 3.0060088634490967e-01\n            -1.5233190357685089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 494 -4.8890449106693268e-03 -1 -2 495\n            5.0922110676765442e-03</internalNodes>\n          <leafValues>\n            -3.7665820121765137e-01 2.1803319454193115e-01\n            -5.7126522064208984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 496 -7.0944731123745441e-03 -1 -2 497\n            2.5431890040636063e-02</internalNodes>\n          <leafValues>\n            5.1921921968460083e-01 -2.1260249614715576e-01\n            3.0566200613975525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 498 -6.7461907747201622e-05 -1 -2 499\n            -8.5350889712572098e-03</internalNodes>\n          <leafValues>\n            -3.3406749367713928e-01 3.5043460130691528e-01\n            -9.0384833514690399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 500 -4.1117807850241661e-03 -1 -2 501\n            6.3964081928133965e-03</internalNodes>\n          <leafValues>\n            -6.9683700799942017e-01 1.1542639881372452e-01\n            -6.6645371913909912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 502 9.8322751000523567e-04 -1 -2 503\n            -5.5737968068569899e-04</internalNodes>\n          <leafValues>\n            3.5695379972457886e-01 2.3081110417842865e-01\n            -2.8862631320953369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 504 2.8798289131373167e-03 -1 -2 505\n            -7.7164517715573311e-03</internalNodes>\n          <leafValues>\n            -5.9923267364501953e-01 3.6074900627136230e-01\n            -8.1827618181705475e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 506 3.7285129074007273e-03 -1 -2 507\n            -1.3161109760403633e-02</internalNodes>\n          <leafValues>\n            -3.7732011079788208e-01 6.7023038864135742e-01\n            1.5114549547433853e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 508 -3.8966130465269089e-02 -1 -2 509\n            -5.7413699105381966e-03</internalNodes>\n          <leafValues>\n            -3.1252211332321167e-01 3.3947479724884033e-01\n            -1.6011409461498260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 510 1.2538330256938934e-01 -1 -2 511\n            -9.7243122756481171e-02</internalNodes>\n          <leafValues>\n            7.3721152544021606e-01 5.0288981199264526e-01\n            -1.3284370303153992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 512 -2.0128490868955851e-03 -1 -2 513\n            3.5349070094525814e-03</internalNodes>\n          <leafValues>\n            4.1367891430854797e-01 -1.5923270583152771e-01\n            4.4056579470634460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 514 4.4846540689468384e-01 -1 -2 515\n            -1.0387780144810677e-02</internalNodes>\n          <leafValues>\n            5.9423661231994629e-01 3.0399119853973389e-01\n            -1.8287350237369537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 516 -1.4210389927029610e-03 -1 -2 517\n            3.6446070298552513e-03</internalNodes>\n          <leafValues>\n            -4.5361068844795227e-01 1.5766820311546326e-01\n            -6.2608838081359863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 518 3.2253630924969912e-03 -1 -2 519\n            9.8893349058926105e-04</internalNodes>\n          <leafValues>\n            -4.1410240530967712e-01 -1.0757800191640854e-01\n            3.1156888604164124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 520 -2.7107829228043556e-03 -1 -2 521\n            -6.9264871999621391e-03</internalNodes>\n          <leafValues>\n            -7.5352817773818970e-01 2.7464428544044495e-01\n            -1.1728949844837189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 522 -3.7942770868539810e-02 -1 -2 523\n            1.3486459851264954e-02</internalNodes>\n          <leafValues>\n            2.6936548948287964e-01 -3.1532868742942810e-01\n            2.5785440206527710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 524 2.7866458985954523e-03 -1 -2 525\n            3.2895719632506371e-03</internalNodes>\n          <leafValues>\n            -6.8431657552719116e-01 1.2949100136756897e-01\n            -4.4475141167640686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 526 1.7910100286826491e-03 -1 -2 527\n            3.3694170415401459e-03</internalNodes>\n          <leafValues>\n            -5.6237429380416870e-01 -6.1936769634485245e-02\n            3.6794289946556091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 528 6.5897632157430053e-04 -1 -2 529\n            -3.2603838917566463e-05</internalNodes>\n          <leafValues>\n            -2.7705720067024231e-01 2.7426779270172119e-01\n            -2.2369539737701416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 530 -6.0175720602273941e-02 -1 -2 531\n            -2.1217610687017441e-02</internalNodes>\n          <leafValues>\n            -7.4174910783767700e-01 -4.5034751296043396e-01\n            1.1426000297069550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 532 -2.2632910404354334e-03 -1 -2 533\n            6.0313078574836254e-03</internalNodes>\n          <leafValues>\n            -3.0538588762283325e-01 2.0562660694122314e-01\n            -4.0689799189567566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 534 5.7578482665121555e-04 -1 -2 535\n            -9.3677162658423185e-04</internalNodes>\n          <leafValues>\n            3.5098749399185181e-01 2.1616159379482269e-01\n            -2.4415770173072815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 536 -3.7626568228006363e-02 -1 -2 537\n            4.4729812070727348e-03</internalNodes>\n          <leafValues>\n            -5.9113681316375732e-01 1.5792270004749298e-01\n            -3.2226279377937317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 538 -7.1853301487863064e-03 -1 -2 539\n            4.0520228445529938e-02</internalNodes>\n          <leafValues>\n            -5.9519052505493164e-01 -6.6688463091850281e-02\n            3.4030249714851379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 540 -6.1968388035893440e-03 -1 -2 541\n            1.0311529971659184e-02</internalNodes>\n          <leafValues>\n            -6.7287462949752808e-01 1.0683239996433258e-01\n            -5.4825967550277710e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>33</maxWeakCount>\n      <stageThreshold>-1.9516259431838989e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 542 -1.9320519641041756e-02 -1 -2 543\n            -1.5126460231840611e-02</internalNodes>\n          <leafValues>\n            -3.8712570071220398e-01 6.4468181133270264e-01\n            -1.2727110087871552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 544 -6.0182690620422363e-02 -1 -2 545\n            -1.3576049823313951e-03</internalNodes>\n          <leafValues>\n            -3.0819109082221985e-01 4.8021888732910156e-01\n            -3.3428680896759033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 546 -5.6930771097540855e-03 -1 -2 547\n            -8.0942036584019661e-03</internalNodes>\n          <leafValues>\n            -3.3166080713272095e-01 4.7517481446266174e-01\n            -7.4761562049388885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 548 6.8413332337513566e-04 -1 -2 549\n            -1.1520589888095856e-01</internalNodes>\n          <leafValues>\n            -3.5741969943046570e-01 2.6105090975761414e-01\n            -3.1773808598518372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 550 -9.1124046593904495e-03 -1 -2 551\n            5.4891068430151790e-05</internalNodes>\n          <leafValues>\n            -5.8540707826614380e-01 -2.2981899976730347e-01\n            2.3482909798622131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 552 -9.5622539520263672e-03 -1 -2 553\n            -8.2032606005668640e-03</internalNodes>\n          <leafValues>\n            3.9155280590057373e-01 4.3179950118064880e-01\n            -2.3173290491104126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 554 -4.0035760030150414e-03 -1 -2 555\n            2.5406230706721544e-03</internalNodes>\n          <leafValues>\n            -5.8700478076934814e-01 1.7990030348300934e-01\n            -4.1681569814682007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 556 1.9435470458120108e-03 -1 -2 557\n            8.4362342022359371e-04</internalNodes>\n          <leafValues>\n            3.0340009927749634e-01 -3.0661040544509888e-01\n            2.3646999895572662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 558 -5.3103519603610039e-03 -1 -2 559\n            -3.5526719875633717e-03</internalNodes>\n          <leafValues>\n            -5.6304818391799927e-01 -5.5695772171020508e-01\n            1.5022790431976318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 560 7.1414401754736900e-03 -1 -2 561\n            -1.1435860069468617e-03</internalNodes>\n          <leafValues>\n            -6.7626637220382690e-01 3.7873879075050354e-01\n            -7.4442893266677856e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 562 -3.1177429482340813e-03 -1 -2 563\n            -7.7415622770786285e-02</internalNodes>\n          <leafValues>\n            -6.2568587064743042e-01 3.9839410781860352e-01\n            -5.5262319743633270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 564 -3.9252988994121552e-02 -1 -2 565\n            2.2049970924854279e-02</internalNodes>\n          <leafValues>\n            3.4094831347465515e-01 -2.4413719773292542e-01\n            4.3050870299339294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 566 -2.2205871064215899e-03 -1 -2 567\n            2.8649640735238791e-03</internalNodes>\n          <leafValues>\n            2.8309720754623413e-01 -3.5401880741119385e-01\n            2.1054570376873016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 568 5.8806730521610007e-05 -1 -2 569\n            -6.6595021635293961e-03</internalNodes>\n          <leafValues>\n            -2.7014040946960449e-01 -5.9313482046127319e-01\n            2.1892869472503662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 570 1.6931600868701935e-02 -1 -2 571\n            4.7026639804244041e-03</internalNodes>\n          <leafValues>\n            -1.1279620230197906e-01 4.9212211370468140e-01\n            -3.9702880382537842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 572 1.7478819936513901e-03 -1 -2 573\n            -2.0893230102956295e-03</internalNodes>\n          <leafValues>\n            -2.2339369356632233e-01 -4.3157818913459778e-01\n            2.5373139977455139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 574 1.1534850113093853e-02 -1 -2 575\n            8.7350117973983288e-04</internalNodes>\n          <leafValues>\n            -7.0668542385101318e-01 -7.2509132325649261e-02\n            3.9975029230117798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 576 -7.2836421895772219e-04 -1 -2 577\n            1.2666890397667885e-03</internalNodes>\n          <leafValues>\n            -2.3567649722099304e-01 2.2582389414310455e-01\n            -4.2317348718643188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 578 -8.4794021677225828e-04 -1 -2 579\n            3.6212441325187683e-01</internalNodes>\n          <leafValues>\n            -2.8307029604911804e-01 1.6724239289760590e-01\n            -7.6826947927474976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 580 -1.9437649752944708e-03 -1 -2 581\n            -4.1159680113196373e-03</internalNodes>\n          <leafValues>\n            -2.7229419350624084e-01 -6.4211308956146240e-01\n            1.8810230493545532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 582 2.3254039697349072e-03 -1 -2 583\n            -1.4815620379522443e-03</internalNodes>\n          <leafValues>\n            2.8516888618469238e-01 4.2574208974838257e-01\n            -2.1113610267639160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 584 -6.6233296820428222e-05 -1 -2 585\n            -3.3756431192159653e-02</internalNodes>\n          <leafValues>\n            -2.8205850720405579e-01 -8.1803041696548462e-01\n            1.7053669691085815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 586 -9.4350927975028753e-04 -1 -2 587\n            1.0650219628587365e-03</internalNodes>\n          <leafValues>\n            1.5273140370845795e-01 -4.2650490999221802e-01\n            1.5235939621925354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 588 -1.2905279872938991e-03 -1 -2 589\n            9.6549028530716896e-03</internalNodes>\n          <leafValues>\n            1.7365390062332153e-01 -3.9721599221229553e-01\n            1.7953179776668549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 590 1.3434770517051220e-03 -1 -2 591\n            5.5220007197931409e-04</internalNodes>\n          <leafValues>\n            -6.9609320163726807e-01 -7.2258770465850830e-02\n            3.4493291378021240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 592 3.5795350559055805e-03 -1 -2 593\n            -1.0585499927401543e-02</internalNodes>\n          <leafValues>\n            -4.8070669174194336e-01 -3.2975581288337708e-01\n            1.4686919748783112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 594 3.5636040847748518e-03 -1 -2 595\n            -1.0298290103673935e-01</internalNodes>\n          <leafValues>\n            -6.1415022611618042e-01 -7.2366482019424438e-01\n            8.4447070956230164e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 596 -2.9605759307742119e-02 -1 -2 597\n            -3.4580599516630173e-02</internalNodes>\n          <leafValues>\n            4.7113609313964844e-01 -4.3128991127014160e-01\n            2.4623470380902290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 598 4.7923368401825428e-03 -1 -2 599\n            1.7058040248230100e-03</internalNodes>\n          <leafValues>\n            -4.6270799636840820e-01 1.4738570153713226e-01\n            -3.7818890810012817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 600 -3.3174119889736176e-03 -1 -2 601\n            -1.7022279789671302e-03</internalNodes>\n          <leafValues>\n            2.7929860353469849e-01 2.6326990127563477e-01\n            -2.5129210948944092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 602 -8.1695342669263482e-04 -1 -2 603\n            -1.4184829778969288e-03</internalNodes>\n          <leafValues>\n            -1.2859649956226349e-01 5.8855402469635010e-01\n            -5.0085168331861496e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 604 -1.0478599928319454e-02 -1 -2 605\n            3.1981911510229111e-02</internalNodes>\n          <leafValues>\n            1.4732900261878967e-01 -4.1299548745155334e-01\n            3.4442049264907837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 606 4.5543849468231201e-02 -1 -2 607\n            2.3574009537696838e-02</internalNodes>\n          <leafValues>\n            4.8842081427574158e-01 -4.6383219957351685e-01\n            3.7443768233060837e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>29</maxWeakCount>\n      <stageThreshold>-1.7628519535064697e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 608 -3.2347131520509720e-02 -1 -2 609\n            -7.4855431914329529e-02</internalNodes>\n          <leafValues>\n            -4.1153168678283691e-01 5.4409480094909668e-01\n            -2.1043080091476440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 610 -5.9164799749851227e-02 -1 -2 611\n            -5.0734709948301315e-03</internalNodes>\n          <leafValues>\n            4.6945521235466003e-01 8.0933347344398499e-02\n            -4.0436869859695435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 612 6.6304411739110947e-03 -1 -2 613\n            2.2804280743002892e-02</internalNodes>\n          <leafValues>\n            -3.1943950057029724e-01 -3.5277611017227173e-01\n            3.6358159780502319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 614 3.4148059785366058e-03 -1 -2 615\n            -6.0696629807353020e-03</internalNodes>\n          <leafValues>\n            -4.2139899730682373e-01 2.8190940618515015e-01\n            -2.5727981328964233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 616 -3.3271780703216791e-03 -1 -2 617\n            1.2381239794194698e-02</internalNodes>\n          <leafValues>\n            -3.3380180597305298e-01 2.5831120088696480e-02\n            5.8200639486312866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 618 -7.8561902046203613e-02 -1 -2 619\n            -7.6863910071551800e-03</internalNodes>\n          <leafValues>\n            5.7080817222595215e-01 1.9097380340099335e-01\n            -2.4749469757080078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 620 3.9404830895364285e-03 -1 -2 621\n            -7.0624810177832842e-05</internalNodes>\n          <leafValues>\n            -3.5295888781547546e-01 2.8438061475753784e-01\n            -1.6469420492649078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 622 -2.2568539716303349e-03 -1 -2 623\n            -3.5595949739217758e-03</internalNodes>\n          <leafValues>\n            -4.6189218759536743e-01 2.4525940418243408e-01\n            -1.8984979391098022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 624 -3.0113100074231625e-03 -1 -2 625\n            -6.2748990021646023e-03</internalNodes>\n          <leafValues>\n            3.0594390630722046e-01 1.4716149866580963e-01\n            -3.3265221118927002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 626 2.5835279375314713e-03 -1 -2 627\n            3.2576550729572773e-03</internalNodes>\n          <leafValues>\n            -7.4853891134262085e-01 -1.4949619770050049e-01\n            2.6293671131134033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 628 -2.6957978843711317e-04 -1 -2 629\n            -4.4593680649995804e-03</internalNodes>\n          <leafValues>\n            -2.9468360543251038e-01 -4.5905289053916931e-01\n            2.2235380113124847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 630 2.2841650061309338e-03 -1 -2 631\n            -6.7595718428492546e-04</internalNodes>\n          <leafValues>\n            -6.3815939426422119e-01 -3.1756940484046936e-01\n            1.4903070032596588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 632 6.1428439803421497e-03 -1 -2 633\n            2.7392068877816200e-03</internalNodes>\n          <leafValues>\n            2.4187029898166656e-01 -3.1487539410591125e-01\n            2.3589129745960236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 634 -2.0209311041980982e-03 -1 -2 635\n            2.6892140507698059e-02</internalNodes>\n          <leafValues>\n            2.5389561057090759e-01 -3.4391039609909058e-01\n            2.3010760545730591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 636 1.4671060256659985e-02 -1 -2 637\n            -1.2444119900465012e-02</internalNodes>\n          <leafValues>\n            5.9517538547515869e-01 3.7335929274559021e-01\n            -1.4540639519691467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 638 2.0527220331132412e-03 -1 -2 639\n            -1.7088990658521652e-02</internalNodes>\n          <leafValues>\n            -2.1135020256042480e-01 -7.2516232728958130e-01\n            2.3358739912509918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 640 -9.8585523664951324e-03 -1 -2 641\n            -1.0541190393269062e-02</internalNodes>\n          <leafValues>\n            4.5390421152114868e-01 3.5500058531761169e-01\n            -1.7118500173091888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 642 4.0034228004515171e-03 -1 -2 643\n            -1.1889140121638775e-02</internalNodes>\n          <leafValues>\n            -7.0433962345123291e-01 4.0436559915542603e-01\n            -4.6263620257377625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 644 -2.0685700699687004e-02 -1 -2 645\n            -7.9243928194046021e-03</internalNodes>\n          <leafValues>\n            -6.4347600936889648e-01 -5.3632920980453491e-01\n            1.1002989858388901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 646 1.2431150535121560e-03 -1 -2 647\n            -4.2312019504606724e-03</internalNodes>\n          <leafValues>\n            4.1220021247863770e-01 7.9887658357620239e-02\n            -3.0926740169525146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 648 9.8197339102625847e-03 -1 -2 649\n            4.5455411076545715e-02</internalNodes>\n          <leafValues>\n            -6.0976761579513550e-01 1.0621140152215958e-01\n            -6.4687371253967285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 650 2.6892758905887604e-03 -1 -2 651\n            -1.5172710409387946e-03</internalNodes>\n          <leafValues>\n            -4.9122989177703857e-01 1.7578749358654022e-01\n            -2.6818940043449402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 652 6.2014168361201882e-04 -1 -2 653\n            -2.0233519899193197e-04</internalNodes>\n          <leafValues>\n            2.5500729680061340e-01 7.2745857760310173e-03\n            -5.0815272331237793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 654 3.1760020647197962e-03 -1 -2 655\n            -1.2668699491769075e-03</internalNodes>\n          <leafValues>\n            4.3849268555641174e-01 1.6349400579929352e-01\n            -2.9128161072731018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 656 5.1056100055575371e-03 -1 -2 657\n            -1.5026510227471590e-03</internalNodes>\n          <leafValues>\n            -7.5001358985900879e-01 2.7198830246925354e-01\n            -9.9486798048019409e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 658 -3.6238620523363352e-03 -1 -2 659\n            7.6577658765017986e-03</internalNodes>\n          <leafValues>\n            -6.0396248102188110e-01 1.0938379913568497e-01\n            -5.3007638454437256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 660 -3.1830249354243279e-03 -1 -2 661\n            1.0931329801678658e-02</internalNodes>\n          <leafValues>\n            -4.7724890708923340e-01 -4.3065819889307022e-02\n            3.8945859670639038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 662 -1.0047679534181952e-03 -1 -2 663\n            -4.6660430729389191e-02</internalNodes>\n          <leafValues>\n            4.1553598642349243e-01 3.0159878730773926e-01\n            -1.6184380650520325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 664 3.2002381049096584e-03 -1 -2 665\n            -1.7367519903928041e-03</internalNodes>\n          <leafValues>\n            -5.4621779918670654e-01 -2.1987779438495636e-01\n            1.9606420397758484e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>33</maxWeakCount>\n      <stageThreshold>-1.8088439702987671e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 666 1.7160519957542419e-02 -1 -2 667\n            1.4503560028970242e-02</internalNodes>\n          <leafValues>\n            -3.2273009419441223e-01 -3.9438620209693909e-01\n            5.7922977209091187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 668 -9.0323518961668015e-03 -1 -2 669\n            -6.9836131297051907e-03</internalNodes>\n          <leafValues>\n            -4.1536870598793030e-01 3.5515859723091125e-01\n            -3.8177150487899780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 670 -1.9220909103751183e-02 -1 -2 671\n            -4.0087159723043442e-02</internalNodes>\n          <leafValues>\n            4.5315900444984436e-01 1.7228379845619202e-01\n            -3.1110560894012451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 672 5.6549701839685440e-03 -1 -2 673\n            -1.1611269786953926e-02</internalNodes>\n          <leafValues>\n            -4.0461608767509460e-01 2.9034239053726196e-01\n            -2.2078509628772736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 674 -1.0576159693300724e-03 -1 -2 675\n            -1.3360800221562386e-03</internalNodes>\n          <leafValues>\n            3.5851669311523438e-01 1.5968900173902512e-02\n            -4.1990101337432861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 676 5.2302791737020016e-03 -1 -2 677\n            -2.7848479803651571e-03</internalNodes>\n          <leafValues>\n            -4.9663281440734863e-01 -5.2960211038589478e-01\n            1.5535449981689453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 678 -2.5654129683971405e-02 -1 -2 679\n            -6.8942131474614143e-03</internalNodes>\n          <leafValues>\n            -5.9309178590774536e-01 2.4318109452724457e-01\n            -1.8231940269470215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 680 -6.9622750743292272e-05 -1 -2 681\n            -6.4154611900448799e-03</internalNodes>\n          <leafValues>\n            -3.2716289162635803e-01 -5.0821667909622192e-01\n            1.9543349742889404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 682 -6.7164386564400047e-05 -1 -2 683\n            2.2416690364480019e-02</internalNodes>\n          <leafValues>\n            1.8602199852466583e-01 -3.9281991124153137e-01\n            1.3279129564762115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 684 8.4287580102682114e-03 -1 -2 685\n            -8.7357551092281938e-04</internalNodes>\n          <leafValues>\n            -5.5447560548782349e-01 4.7158730030059814e-01\n            -3.8492478430271149e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 686 -4.7496971092186868e-05 -1 -2 687\n            4.5816078782081604e-03</internalNodes>\n          <leafValues>\n            -2.5197029113769531e-01 2.0250399410724640e-01\n            -6.1638081073760986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 688 -1.1175150051712990e-02 -1 -2 689\n            -7.4238609522581100e-03</internalNodes>\n          <leafValues>\n            -2.7771198749542236e-01 -5.0103437900543213e-01\n            1.9318529963493347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 690 -3.0201480258256197e-03 -1 -2 691\n            -3.0343679245561361e-03</internalNodes>\n          <leafValues>\n            -6.5904247760772705e-01 3.1962481141090393e-01\n            -1.0512910038232803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 692 -1.0971290059387684e-02 -1 -2 693\n            1.2000739661743864e-04</internalNodes>\n          <leafValues>\n            3.2707008719444275e-01 -4.1679269075393677e-01\n            1.1645200103521347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 694 2.1552699618041515e-03 -1 -2 695\n            1.5970800304785371e-03</internalNodes>\n          <leafValues>\n            1.5389390289783478e-01 -4.2979270219802856e-01\n            1.9192950427532196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 696 -4.3590939603745937e-03 -1 -2 697\n            -6.5752048976719379e-03</internalNodes>\n          <leafValues>\n            -8.6613738536834717e-01 3.5298541188240051e-01\n            -7.2624720633029938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 698 3.5486191045492887e-03 -1 -2 699\n            1.7437560018151999e-03</internalNodes>\n          <leafValues>\n            -3.6141040921211243e-01 -4.0250919759273529e-02\n            4.1119590401649475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 700 6.5892767452169210e-05 -1 -2 701\n            1.2217169627547264e-02</internalNodes>\n          <leafValues>\n            1.5523989498615265e-01 -3.6567229032516479e-01\n            2.5159689784049988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 702 6.0199309140443802e-02 -1 -2 703\n            -9.1684371232986450e-02</internalNodes>\n          <leafValues>\n            -6.8959599733352661e-01 -6.6311872005462646e-01\n            9.4827361404895782e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 704 8.9392811059951782e-04 -1 -2 705\n            -1.1146500473842025e-03</internalNodes>\n          <leafValues>\n            2.8731009364128113e-01 3.6127060651779175e-01\n            -2.4054229259490967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 706 -1.1042780242860317e-02 -1 -2 707\n            3.7769351154565811e-02</internalNodes>\n          <leafValues>\n            -7.1686691045761108e-01 1.1125349998474121e-01\n            -5.6320947408676147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 708 5.5979429744184017e-03 -1 -2 709\n            -2.5462140329182148e-03</internalNodes>\n          <leafValues>\n            -5.6998908519744873e-01 2.6734578609466553e-01\n            -1.0527700185775757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 710 -1.7929819878190756e-03 -1 -2 711\n            -8.9686378487385809e-05</internalNodes>\n          <leafValues>\n            1.7712120711803436e-01 1.6762410104274750e-01\n            -4.1336658596992493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 712 -6.8254990037530661e-04 -1 -2 713\n            4.0599349886178970e-03</internalNodes>\n          <leafValues>\n            -3.1327050924301147e-01 2.0312629640102386e-01\n            -4.6360948681831360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 714 1.5843180008232594e-03 -1 -2 715\n            -4.6101640909910202e-02</internalNodes>\n          <leafValues>\n            2.6413089036941528e-01 2.4587640166282654e-01\n            -3.1151199340820312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 716 1.5759950038045645e-03 -1 -2 717\n            3.5904631018638611e-02</internalNodes>\n          <leafValues>\n            -3.6593970656394958e-01 -1.3352620415389538e-02\n            4.9500739574432373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 718 1.9230529665946960e-02 -1 -2 719\n            1.3461830094456673e-02</internalNodes>\n          <leafValues>\n            1.8603560328483582e-01 -4.2704311013221741e-01\n            1.4756950736045837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 720 6.3534970395267010e-03 -1 -2 721\n            4.7998740337789059e-03</internalNodes>\n          <leafValues>\n            -5.8824592828750610e-01 1.3966129720211029e-01\n            -3.6948320269584656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 722 -9.7894563805311918e-04 -1 -2 723\n            1.8534340197220445e-03</internalNodes>\n          <leafValues>\n            4.3156591057777405e-01 -1.9053110480308533e-01\n            2.6868799328804016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 724 5.5962381884455681e-04 -1 -2 725\n            -8.1787789240479469e-03</internalNodes>\n          <leafValues>\n            -3.0545750260353088e-01 -7.2353351116180420e-01\n            1.6197769343852997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 726 -6.4591833506710827e-05 -1 -2 727\n            -4.2282380163669586e-03</internalNodes>\n          <leafValues>\n            -1.6121749579906464e-01 4.2441681027412415e-01\n            -1.1488209664821625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 728 -3.2379399053752422e-03 -1 -2 729\n            -4.7763898037374020e-03</internalNodes>\n          <leafValues>\n            -8.2811427116394043e-01 3.9157009124755859e-01\n            -3.7677429616451263e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 730 -6.1182728968560696e-03 -1 -2 731\n            3.1565790995955467e-03</internalNodes>\n          <leafValues>\n            3.0208829045295715e-01 -1.9045789539813995e-01\n            3.0219689011573792e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          8 12 3 8 -1.</_>\n        <_>\n          8 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 8 9 -1.</_>\n        <_>\n          7 11 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 11 12 -1.</_>\n        <_>\n          8 11 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 7 8 -1.</_>\n        <_>\n          1 4 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 6 -1.</_>\n        <_>\n          7 9 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 4 -1.</_>\n        <_>\n          0 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 4 4 -1.</_>\n        <_>\n          18 13 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 15 2 3 -1.</_>\n        <_>\n          17 15 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 2 -1.</_>\n        <_>\n          2 13 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 6 -1.</_>\n        <_>\n          7 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 9 12 -1.</_>\n        <_>\n          8 11 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 10 -1.</_>\n        <_>\n          5 6 2 5 2.</_>\n        <_>\n          7 11 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 11 8 -1.</_>\n        <_>\n          8 16 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 8 -1.</_>\n        <_>\n          0 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 6 6 -1.</_>\n        <_>\n          14 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 9 7 -1.</_>\n        <_>\n          8 13 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 6 3 -1.</_>\n        <_>\n          8 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 4 -1.</_>\n        <_>\n          0 2 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 3 -1.</_>\n        <_>\n          2 1 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 6 2 -1.</_>\n        <_>\n          3 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 4 2 -1.</_>\n        <_>\n          8 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 12 2 -1.</_>\n        <_>\n          6 11 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 1 -1.</_>\n        <_>\n          16 9 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 9 12 -1.</_>\n        <_>\n          8 11 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 1 6 -1.</_>\n        <_>\n          16 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 5 6 -1.</_>\n        <_>\n          7 9 5 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 6 -1.</_>\n        <_>\n          18 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 8 -1.</_>\n        <_>\n          0 4 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 15 12 -1.</_>\n        <_>\n          3 5 15 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 9 8 -1.</_>\n        <_>\n          11 16 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 9 -1.</_>\n        <_>\n          4 0 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 4 -1.</_>\n        <_>\n          2 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 4 2 -1.</_>\n        <_>\n          11 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 3 -1.</_>\n        <_>\n          6 2 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 3 2 -1.</_>\n        <_>\n          13 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 8 -1.</_>\n        <_>\n          1 0 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 4 2 -1.</_>\n        <_>\n          5 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 6 6 -1.</_>\n        <_>\n          17 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 8 4 -1.</_>\n        <_>\n          8 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 4 9 -1.</_>\n        <_>\n          9 9 4 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 7 -1.</_>\n        <_>\n          12 10 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 8 -1.</_>\n        <_>\n          5 8 2 4 2.</_>\n        <_>\n          7 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 11 8 -1.</_>\n        <_>\n          8 16 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 6 -1.</_>\n        <_>\n          3 3 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 12 -1.</_>\n        <_>\n          7 4 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 7 2 -1.</_>\n        <_>\n          0 19 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 3 -1.</_>\n        <_>\n          18 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 8 -1.</_>\n        <_>\n          2 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 1 -1.</_>\n        <_>\n          5 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 2 -1.</_>\n        <_>\n          3 13 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 16 19 4 -1.</_>\n        <_>\n          0 18 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 8 2 -1.</_>\n        <_>\n          11 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 1 -1.</_>\n        <_>\n          9 8 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 1 4 -1.</_>\n        <_>\n          0 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 4 -1.</_>\n        <_>\n          0 1 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 5 2 -1.</_>\n        <_>\n          15 16 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 3 2 -1.</_>\n        <_>\n          8 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 3 8 -1.</_>\n        <_>\n          11 9 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 8 -1.</_>\n        <_>\n          15 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 10 6 -1.</_>\n        <_>\n          2 3 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 15 -1.</_>\n        <_>\n          6 10 6 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 12 6 -1.</_>\n        <_>\n          7 13 4 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 7 -1.</_>\n        <_>\n          18 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 4 2 -1.</_>\n        <_>\n          9 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 4 3 -1.</_>\n        <_>\n          9 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 6 -1.</_>\n        <_>\n          2 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 4 4 -1.</_>\n        <_>\n          5 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 6 -1.</_>\n        <_>\n          4 0 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 7 -1.</_>\n        <_>\n          2 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 8 3 -1.</_>\n        <_>\n          6 0 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 6 -1.</_>\n        <_>\n          9 3 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 2 -1.</_>\n        <_>\n          10 11 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 7 6 -1.</_>\n        <_>\n          4 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 10 2 -1.</_>\n        <_>\n          15 18 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 1 -1.</_>\n        <_>\n          9 13 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 8 4 6 -1.</_>\n        <_>\n          8 10 4 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 8 -1.</_>\n        <_>\n          14 16 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 4 -1.</_>\n        <_>\n          12 10 2 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 3 -1.</_>\n        <_>\n          2 12 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 11 2 6 -1.</_>\n        <_>\n          19 11 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 10 -1.</_>\n        <_>\n          0 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 8 12 -1.</_>\n        <_>\n          7 4 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 9 8 -1.</_>\n        <_>\n          4 3 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 2 -1.</_>\n        <_>\n          0 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 12 -1.</_>\n        <_>\n          14 12 2 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 14 6 -1.</_>\n        <_>\n          4 4 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 8 -1.</_>\n        <_>\n          3 4 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 17 20 -1.</_>\n        <_>\n          0 5 17 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 6 -1.</_>\n        <_>\n          4 2 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 6 -1.</_>\n        <_>\n          3 10 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 6 4 -1.</_>\n        <_>\n          4 14 3 2 2.</_>\n        <_>\n          7 16 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 8 -1.</_>\n        <_>\n          10 1 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 6 -1.</_>\n        <_>\n          1 1 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 1 3 -1.</_>\n        <_>\n          7 13 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 8 4 -1.</_>\n        <_>\n          5 4 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 5 -1.</_>\n        <_>\n          1 2 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 2 -1.</_>\n        <_>\n          6 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 8 2 -1.</_>\n        <_>\n          7 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 9 8 -1.</_>\n        <_>\n          11 11 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 3 -1.</_>\n        <_>\n          18 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 4 6 -1.</_>\n        <_>\n          16 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 3 -1.</_>\n        <_>\n          2 12 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 7 6 -1.</_>\n        <_>\n          6 8 7 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 6 -1.</_>\n        <_>\n          0 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 15 5 -1.</_>\n        <_>\n          5 2 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 10 3 -1.</_>\n        <_>\n          13 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 2 8 -1.</_>\n        <_>\n          8 15 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 6 -1.</_>\n        <_>\n          1 1 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 4 -1.</_>\n        <_>\n          1 1 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 1 -1.</_>\n        <_>\n          6 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 7 15 -1.</_>\n        <_>\n          5 5 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 2 -1.</_>\n        <_>\n          18 1 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 18 6 2 -1.</_>\n        <_>\n          6 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 5 -1.</_>\n        <_>\n          7 1 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 8 -1.</_>\n        <_>\n          14 0 3 4 2.</_>\n        <_>\n          17 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 18 -1.</_>\n        <_>\n          5 2 2 9 2.</_>\n        <_>\n          7 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 6 2 -1.</_>\n        <_>\n          9 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 3 -1.</_>\n        <_>\n          10 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 4 2 -1.</_>\n        <_>\n          10 10 2 1 2.</_>\n        <_>\n          12 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 6 -1.</_>\n        <_>\n          4 4 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 12 8 -1.</_>\n        <_>\n          5 3 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 4 2 -1.</_>\n        <_>\n          2 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 8 1 -1.</_>\n        <_>\n          4 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 12 -1.</_>\n        <_>\n          8 11 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 4 6 -1.</_>\n        <_>\n          18 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 7 -1.</_>\n        <_>\n          8 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 8 -1.</_>\n        <_>\n          0 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 5 6 -1.</_>\n        <_>\n          15 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 9 -1.</_>\n        <_>\n          2 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 4 1 -1.</_>\n        <_>\n          16 12 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 11 8 2 -1.</_>\n        <_>\n          15 11 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 11 -1.</_>\n        <_>\n          3 1 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 4 -1.</_>\n        <_>\n          7 9 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 17 6 3 -1.</_>\n        <_>\n          8 17 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 4 -1.</_>\n        <_>\n          0 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 1 3 -1.</_>\n        <_>\n          2 2 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 11 2 3 -1.</_>\n        <_>\n          18 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 8 -1.</_>\n        <_>\n          3 12 1 4 2.</_>\n        <_>\n          4 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 3 -1.</_>\n        <_>\n          4 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 4 2 -1.</_>\n        <_>\n          12 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 10 3 3 -1.</_>\n        <_>\n          17 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 5 2 -1.</_>\n        <_>\n          7 15 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 5 -1.</_>\n        <_>\n          6 0 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 1 5 8 -1.</_>\n        <_>\n          6 5 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 9 8 -1.</_>\n        <_>\n          3 5 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 15 6 -1.</_>\n        <_>\n          7 14 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 6 5 -1.</_>\n        <_>\n          14 3 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 2 2 -1.</_>\n        <_>\n          5 16 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 16 2 2 -1.</_>\n        <_>\n          5 16 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 4 -1.</_>\n        <_>\n          11 10 2 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 4 -1.</_>\n        <_>\n          4 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 12 -1.</_>\n        <_>\n          15 12 2 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 10 -1.</_>\n        <_>\n          0 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 4 -1.</_>\n        <_>\n          2 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 8 6 -1.</_>\n        <_>\n          5 7 8 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 1 16 4 -1.</_>\n        <_>\n          3 3 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 10 9 -1.</_>\n        <_>\n          6 5 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 10 -1.</_>\n        <_>\n          17 10 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 4 3 -1.</_>\n        <_>\n          6 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 2 -1.</_>\n        <_>\n          6 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 2 -1.</_>\n        <_>\n          6 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 9 -1.</_>\n        <_>\n          1 0 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 3 2 -1.</_>\n        <_>\n          2 6 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 3 -1.</_>\n        <_>\n          9 16 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 6 2 -1.</_>\n        <_>\n          9 17 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 9 6 -1.</_>\n        <_>\n          4 5 9 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 2 -1.</_>\n        <_>\n          7 16 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 3 -1.</_>\n        <_>\n          7 2 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 4 -1.</_>\n        <_>\n          4 1 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 4 2 -1.</_>\n        <_>\n          13 11 2 1 2.</_>\n        <_>\n          15 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 2 -1.</_>\n        <_>\n          14 10 1 1 2.</_>\n        <_>\n          15 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 3 -1.</_>\n        <_>\n          18 8 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 2 -1.</_>\n        <_>\n          18 8 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 2 -1.</_>\n        <_>\n          0 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 2 5 -1.</_>\n        <_>\n          11 1 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 3 12 -1.</_>\n        <_>\n          1 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 8 2 -1.</_>\n        <_>\n          2 10 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 12 3 3 -1.</_>\n        <_>\n          7 13 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 4 -1.</_>\n        <_>\n          7 11 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 4 2 -1.</_>\n        <_>\n          6 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 20 1 -1.</_>\n        <_>\n          10 19 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 8 5 -1.</_>\n        <_>\n          7 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 8 9 -1.</_>\n        <_>\n          10 11 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 2 -1.</_>\n        <_>\n          2 13 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 2 1 -1.</_>\n        <_>\n          18 14 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 2 2 4 -1.</_>\n        <_>\n          2 2 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 5 -1.</_>\n        <_>\n          9 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 5 4 -1.</_>\n        <_>\n          7 15 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 3 2 -1.</_>\n        <_>\n          17 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 2 -1.</_>\n        <_>\n          0 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 1 3 -1.</_>\n        <_>\n          2 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 11 3 4 -1.</_>\n        <_>\n          11 11 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 8 -1.</_>\n        <_>\n          16 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 9 6 -1.</_>\n        <_>\n          2 5 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 17 8 -1.</_>\n        <_>\n          0 6 17 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 5 3 -1.</_>\n        <_>\n          15 18 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 2 8 -1.</_>\n        <_>\n          2 15 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 3 -1.</_>\n        <_>\n          4 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 9 7 -1.</_>\n        <_>\n          6 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 7 -1.</_>\n        <_>\n          14 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 2 2 -1.</_>\n        <_>\n          3 16 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 17 2 1 -1.</_>\n        <_>\n          3 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 6 -1.</_>\n        <_>\n          4 9 3 3 2.</_>\n        <_>\n          7 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 3 1 -1.</_>\n        <_>\n          12 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          5 0 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 2 -1.</_>\n        <_>\n          0 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 1 -1.</_>\n        <_>\n          18 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 9 -1.</_>\n        <_>\n          4 3 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 4 -1.</_>\n        <_>\n          6 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 1 -1.</_>\n        <_>\n          18 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 1 -1.</_>\n        <_>\n          17 2 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 8 2 -1.</_>\n        <_>\n          7 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 3 8 -1.</_>\n        <_>\n          15 16 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 8 3 -1.</_>\n        <_>\n          5 11 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 11 9 -1.</_>\n        <_>\n          5 3 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 2 2 -1.</_>\n        <_>\n          19 14 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 9 8 -1.</_>\n        <_>\n          4 3 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 3 -1.</_>\n        <_>\n          2 7 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 3 -1.</_>\n        <_>\n          2 7 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 1 12 -1.</_>\n        <_>\n          13 11 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 15 -1.</_>\n        <_>\n          0 5 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 3 -1.</_>\n        <_>\n          6 10 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 3 2 -1.</_>\n        <_>\n          3 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 4 3 -1.</_>\n        <_>\n          16 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 4 3 -1.</_>\n        <_>\n          11 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 4 3 -1.</_>\n        <_>\n          14 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 3 2 -1.</_>\n        <_>\n          5 16 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 2 -1.</_>\n        <_>\n          1 4 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 5 -1.</_>\n        <_>\n          5 0 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 3 8 -1.</_>\n        <_>\n          1 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 1 3 -1.</_>\n        <_>\n          4 9 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 13 2 1 -1.</_>\n        <_>\n          5 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 4 9 -1.</_>\n        <_>\n          11 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 1 2 -1.</_>\n        <_>\n          0 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 3 -1.</_>\n        <_>\n          0 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 4 -1.</_>\n        <_>\n          12 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 3 3 -1.</_>\n        <_>\n          15 11 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 12 1 6 -1.</_>\n        <_>\n          18 12 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 17 3 2 -1.</_>\n        <_>\n          5 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 2 -1.</_>\n        <_>\n          18 8 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 1 -1.</_>\n        <_>\n          18 9 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 5 -1.</_>\n        <_>\n          9 12 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 2 7 -1.</_>\n        <_>\n          8 1 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 14 6 -1.</_>\n        <_>\n          4 6 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 11 6 -1.</_>\n        <_>\n          2 5 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 2 -1.</_>\n        <_>\n          18 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 2 6 -1.</_>\n        <_>\n          18 11 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 3 -1.</_>\n        <_>\n          18 1 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 6 -1.</_>\n        <_>\n          18 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 8 -1.</_>\n        <_>\n          4 7 3 4 2.</_>\n        <_>\n          7 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 2 -1.</_>\n        <_>\n          11 11 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 7 -1.</_>\n        <_>\n          3 0 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 5 8 -1.</_>\n        <_>\n          15 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 8 -1.</_>\n        <_>\n          3 10 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 6 -1.</_>\n        <_>\n          7 9 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 6 -1.</_>\n        <_>\n          4 4 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 2 -1.</_>\n        <_>\n          4 1 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 6 -1.</_>\n        <_>\n          14 8 3 3 2.</_>\n        <_>\n          17 11 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 8 -1.</_>\n        <_>\n          4 12 1 4 2.</_>\n        <_>\n          5 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 7 2 -1.</_>\n        <_>\n          0 19 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 1 4 -1.</_>\n        <_>\n          9 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 8 -1.</_>\n        <_>\n          19 10 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 8 -1.</_>\n        <_>\n          7 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 6 -1.</_>\n        <_>\n          3 2 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 8 2 -1.</_>\n        <_>\n          10 10 4 1 2.</_>\n        <_>\n          14 11 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 2 3 -1.</_>\n        <_>\n          2 10 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 1 13 6 -1.</_>\n        <_>\n          5 3 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 13 6 -1.</_>\n        <_>\n          4 6 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 5 -1.</_>\n        <_>\n          8 1 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 2 1 -1.</_>\n        <_>\n          8 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 4 -1.</_>\n        <_>\n          6 5 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 2 -1.</_>\n        <_>\n          14 12 2 1 2.</_>\n        <_>\n          16 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 4 2 -1.</_>\n        <_>\n          13 11 2 1 2.</_>\n        <_>\n          15 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 3 -1.</_>\n        <_>\n          16 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 5 -1.</_>\n        <_>\n          11 0 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 1 3 -1.</_>\n        <_>\n          7 12 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 12 3 2 -1.</_>\n        <_>\n          7 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 2 3 -1.</_>\n        <_>\n          17 8 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 5 -1.</_>\n        <_>\n          13 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 3 -1.</_>\n        <_>\n          0 1 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 1 2 -1.</_>\n        <_>\n          2 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 2 -1.</_>\n        <_>\n          13 12 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 3 -1.</_>\n        <_>\n          18 9 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 15 1 3 -1.</_>\n        <_>\n          14 16 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 2 -1.</_>\n        <_>\n          8 13 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 4 -1.</_>\n        <_>\n          9 10 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 19 -1.</_>\n        <_>\n          13 0 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 8 4 -1.</_>\n        <_>\n          12 18 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 2 -1.</_>\n        <_>\n          14 5 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 4 -1.</_>\n        <_>\n          12 10 2 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 4 -1.</_>\n        <_>\n          4 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 7 -1.</_>\n        <_>\n          3 2 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 2 -1.</_>\n        <_>\n          8 0 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          15 13 2 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 10 4 -1.</_>\n        <_>\n          12 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 4 5 -1.</_>\n        <_>\n          2 11 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 4 2 -1.</_>\n        <_>\n          3 15 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 6 -1.</_>\n        <_>\n          0 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 6 -1.</_>\n        <_>\n          6 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 4 2 -1.</_>\n        <_>\n          7 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 4 2 -1.</_>\n        <_>\n          7 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 7 4 -1.</_>\n        <_>\n          3 5 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 8 12 -1.</_>\n        <_>\n          7 8 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 2 1 -1.</_>\n        <_>\n          5 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 18 2 1 -1.</_>\n        <_>\n          5 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 16 7 2 -1.</_>\n        <_>\n          13 17 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 2 3 -1.</_>\n        <_>\n          7 15 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 5 -1.</_>\n        <_>\n          10 2 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 6 -1.</_>\n        <_>\n          8 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 3 -1.</_>\n        <_>\n          4 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 3 -1.</_>\n        <_>\n          6 13 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 3 2 -1.</_>\n        <_>\n          5 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 3 1 -1.</_>\n        <_>\n          11 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 3 -1.</_>\n        <_>\n          12 5 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 7 1 10 -1.</_>\n        <_>\n          19 12 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 3 -1.</_>\n        <_>\n          3 9 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 5 -1.</_>\n        <_>\n          9 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 2 -1.</_>\n        <_>\n          5 0 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 13 9 -1.</_>\n        <_>\n          5 3 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 1 2 -1.</_>\n        <_>\n          0 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 6 -1.</_>\n        <_>\n          1 2 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 4 -1.</_>\n        <_>\n          18 0 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 13 2 2 -1.</_>\n        <_>\n          4 13 1 1 2.</_>\n        <_>\n          5 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 1 -1.</_>\n        <_>\n          2 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 12 -1.</_>\n        <_>\n          3 6 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 4 1 -1.</_>\n        <_>\n          13 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 2 -1.</_>\n        <_>\n          12 12 1 1 2.</_>\n        <_>\n          13 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 3 1 -1.</_>\n        <_>\n          6 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 8 4 -1.</_>\n        <_>\n          3 13 4 2 2.</_>\n        <_>\n          7 15 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 3 -1.</_>\n        <_>\n          6 9 6 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 5 -1.</_>\n        <_>\n          11 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 9 1 -1.</_>\n        <_>\n          8 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 4 -1.</_>\n        <_>\n          4 0 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 12 8 -1.</_>\n        <_>\n          7 11 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 15 2 1 -1.</_>\n        <_>\n          18 15 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 4 -1.</_>\n        <_>\n          3 13 1 2 2.</_>\n        <_>\n          4 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 3 -1.</_>\n        <_>\n          3 8 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 7 -1.</_>\n        <_>\n          1 1 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 9 -1.</_>\n        <_>\n          5 0 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 3 3 -1.</_>\n        <_>\n          14 11 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          13 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 4 -1.</_>\n        <_>\n          0 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 8 2 -1.</_>\n        <_>\n          12 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 2 2 -1.</_>\n        <_>\n          17 9 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 2 -1.</_>\n        <_>\n          17 11 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 13 10 1 -1.</_>\n        <_>\n          12 13 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 3 -1.</_>\n        <_>\n          9 7 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 6 2 -1.</_>\n        <_>\n          11 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 6 2 -1.</_>\n        <_>\n          10 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 3 1 -1.</_>\n        <_>\n          18 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 2 11 -1.</_>\n        <_>\n          18 7 1 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 4 -1.</_>\n        <_>\n          8 2 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 3 -1.</_>\n        <_>\n          7 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 5 -1.</_>\n        <_>\n          10 3 3 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 9 -1.</_>\n        <_>\n          6 3 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 4 3 -1.</_>\n        <_>\n          3 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 4 5 -1.</_>\n        <_>\n          1 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 2 3 -1.</_>\n        <_>\n          2 3 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 1 -1.</_>\n        <_>\n          4 13 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 6 -1.</_>\n        <_>\n          6 0 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 2 1 -1.</_>\n        <_>\n          2 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 1 3 -1.</_>\n        <_>\n          3 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          2 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 2 -1.</_>\n        <_>\n          16 7 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 4 -1.</_>\n        <_>\n          9 2 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 6 2 -1.</_>\n        <_>\n          9 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 4 -1.</_>\n        <_>\n          3 14 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 7 3 -1.</_>\n        <_>\n          5 9 7 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 1 -1.</_>\n        <_>\n          15 13 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 3 2 -1.</_>\n        <_>\n          5 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 3 -1.</_>\n        <_>\n          6 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 2 -1.</_>\n        <_>\n          19 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 1 -1.</_>\n        <_>\n          17 0 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 3 -1.</_>\n        <_>\n          18 1 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 8 -1.</_>\n        <_>\n          13 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 3 2 -1.</_>\n        <_>\n          8 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 2 -1.</_>\n        <_>\n          16 1 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 9 4 -1.</_>\n        <_>\n          8 11 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 1 6 -1.</_>\n        <_>\n          12 11 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 4 -1.</_>\n        <_>\n          4 0 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 1 11 12 -1.</_>\n        <_>\n          5 5 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 8 -1.</_>\n        <_>\n          18 12 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 2 6 -1.</_>\n        <_>\n          18 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 4 4 -1.</_>\n        <_>\n          2 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 4 -1.</_>\n        <_>\n          5 8 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 3 2 -1.</_>\n        <_>\n          6 16 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 1 -1.</_>\n        <_>\n          7 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 2 -1.</_>\n        <_>\n          10 14 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 3 -1.</_>\n        <_>\n          3 8 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 8 -1.</_>\n        <_>\n          4 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 3 -1.</_>\n        <_>\n          4 5 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 6 -1.</_>\n        <_>\n          4 11 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 3 -1.</_>\n        <_>\n          14 12 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 17 4 3 -1.</_>\n        <_>\n          12 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 2 -1.</_>\n        <_>\n          13 11 1 1 2.</_>\n        <_>\n          14 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 2 -1.</_>\n        <_>\n          13 11 1 1 2.</_>\n        <_>\n          14 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 5 6 -1.</_>\n        <_>\n          8 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 2 -1.</_>\n        <_>\n          0 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 10 4 -1.</_>\n        <_>\n          0 10 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 1 -1.</_>\n        <_>\n          18 12 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 18 2 2 -1.</_>\n        <_>\n          8 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 4 -1.</_>\n        <_>\n          9 6 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 12 8 -1.</_>\n        <_>\n          6 12 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 14 1 -1.</_>\n        <_>\n          8 0 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 19 -1.</_>\n        <_>\n          14 0 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 3 2 -1.</_>\n        <_>\n          8 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 5 -1.</_>\n        <_>\n          9 11 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 3 2 -1.</_>\n        <_>\n          8 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 2 2 -1.</_>\n        <_>\n          5 13 1 1 2.</_>\n        <_>\n          6 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 3 1 -1.</_>\n        <_>\n          17 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 3 -1.</_>\n        <_>\n          18 0 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 15 6 -1.</_>\n        <_>\n          4 4 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 4 -1.</_>\n        <_>\n          10 0 5 2 2.</_>\n        <_>\n          15 2 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 6 -1.</_>\n        <_>\n          5 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 8 6 -1.</_>\n        <_>\n          12 1 4 3 2.</_>\n        <_>\n          16 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 2 1 -1.</_>\n        <_>\n          1 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 2 4 -1.</_>\n        <_>\n          16 7 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 17 5 3 -1.</_>\n        <_>\n          15 18 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 6 8 -1.</_>\n        <_>\n          8 12 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 2 2 -1.</_>\n        <_>\n          6 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 4 6 -1.</_>\n        <_>\n          14 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 4 -1.</_>\n        <_>\n          18 1 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 10 -1.</_>\n        <_>\n          5 0 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 3 -1.</_>\n        <_>\n          6 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 3 -1.</_>\n        <_>\n          12 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 1 3 -1.</_>\n        <_>\n          2 3 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 1 8 1 -1.</_>\n        <_>\n          4 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 18 12 -1.</_>\n        <_>\n          6 7 6 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 6 2 -1.</_>\n        <_>\n          15 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 7 -1.</_>\n        <_>\n          12 10 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 12 -1.</_>\n        <_>\n          16 12 1 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 7 3 -1.</_>\n        <_>\n          6 11 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 10 3 -1.</_>\n        <_>\n          4 10 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 15 7 -1.</_>\n        <_>\n          5 1 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 18 -1.</_>\n        <_>\n          0 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 4 -1.</_>\n        <_>\n          8 14 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 16 4 4 -1.</_>\n        <_>\n          16 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 4 8 -1.</_>\n        <_>\n          2 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 3 2 -1.</_>\n        <_>\n          3 16 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 17 2 1 -1.</_>\n        <_>\n          2 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 8 -1.</_>\n        <_>\n          18 10 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 18 3 -1.</_>\n        <_>\n          6 12 6 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 4 2 -1.</_>\n        <_>\n          16 11 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 5 4 -1.</_>\n        <_>\n          9 3 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 6 -1.</_>\n        <_>\n          6 4 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 8 6 -1.</_>\n        <_>\n          3 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 2 -1.</_>\n        <_>\n          18 1 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 12 2 3 -1.</_>\n        <_>\n          18 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 2 8 -1.</_>\n        <_>\n          17 6 1 4 2.</_>\n        <_>\n          18 10 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 4 -1.</_>\n        <_>\n          18 6 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 8 -1.</_>\n        <_>\n          0 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 3 8 -1.</_>\n        <_>\n          0 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 2 2 -1.</_>\n        <_>\n          14 11 1 1 2.</_>\n        <_>\n          15 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 3 3 -1.</_>\n        <_>\n          14 12 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 12 5 2 -1.</_>\n        <_>\n          14 13 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 12 1 2 -1.</_>\n        <_>\n          19 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 7 -1.</_>\n        <_>\n          7 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 3 2 -1.</_>\n        <_>\n          12 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 4 2 -1.</_>\n        <_>\n          12 13 2 1 2.</_>\n        <_>\n          14 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 4 2 -1.</_>\n        <_>\n          16 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 1 2 -1.</_>\n        <_>\n          14 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 2 -1.</_>\n        <_>\n          17 1 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 2 -1.</_>\n        <_>\n          17 1 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 13 2 2 -1.</_>\n        <_>\n          12 13 1 1 2.</_>\n        <_>\n          13 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 4 2 -1.</_>\n        <_>\n          7 10 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 3 1 3 -1.</_>\n        <_>\n          2 4 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 2 3 -1.</_>\n        <_>\n          2 5 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 6 -1.</_>\n        <_>\n          3 2 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 2 5 -1.</_>\n        <_>\n          12 2 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 1 3 -1.</_>\n        <_>\n          3 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 12 2 2 -1.</_>\n        <_>\n          13 12 1 1 2.</_>\n        <_>\n          14 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 4 3 -1.</_>\n        <_>\n          6 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 13 3 3 -1.</_>\n        <_>\n          17 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 2 8 -1.</_>\n        <_>\n          0 12 1 4 2.</_>\n        <_>\n          1 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 1 3 -1.</_>\n        <_>\n          3 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 2 -1.</_>\n        <_>\n          0 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 7 -1.</_>\n        <_>\n          11 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 9 -1.</_>\n        <_>\n          2 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 2 2 -1.</_>\n        <_>\n          2 4 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 2 2 -1.</_>\n        <_>\n          13 12 1 1 2.</_>\n        <_>\n          14 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 1 -1.</_>\n        <_>\n          19 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 3 1 -1.</_>\n        <_>\n          5 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 4 1 -1.</_>\n        <_>\n          7 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 3 -1.</_>\n        <_>\n          6 11 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 4 3 -1.</_>\n        <_>\n          7 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 3 -1.</_>\n        <_>\n          6 0 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 15 5 2 -1.</_>\n        <_>\n          15 16 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 12 -1.</_>\n        <_>\n          6 12 6 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 14 4 -1.</_>\n        <_>\n          8 6 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 6 3 -1.</_>\n        <_>\n          2 12 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 1 3 -1.</_>\n        <_>\n          4 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 10 3 3 -1.</_>\n        <_>\n          18 11 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 11 1 4 -1.</_>\n        <_>\n          16 12 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 9 -1.</_>\n        <_>\n          4 0 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 5 -1.</_>\n        <_>\n          10 3 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 3 -1.</_>\n        <_>\n          7 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 6 -1.</_>\n        <_>\n          7 3 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 2 -1.</_>\n        <_>\n          0 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 5 -1.</_>\n        <_>\n          14 9 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 16 3 1 -1.</_>\n        <_>\n          4 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 7 -1.</_>\n        <_>\n          12 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 2 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_>\n        <_>\n          12 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 3 1 -1.</_>\n        <_>\n          13 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 1 -1.</_>\n        <_>\n          18 3 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 6 -1.</_>\n        <_>\n          14 2 3 3 2.</_>\n        <_>\n          17 5 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 8 4 -1.</_>\n        <_>\n          12 18 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 3 3 -1.</_>\n        <_>\n          6 12 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 6 -1.</_>\n        <_>\n          4 5 8 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 8 3 8 -1.</_>\n        <_>\n          1 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 6 -1.</_>\n        <_>\n          9 2 4 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 7 6 -1.</_>\n        <_>\n          5 5 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 3 1 -1.</_>\n        <_>\n          11 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 4 2 -1.</_>\n        <_>\n          12 12 2 1 2.</_>\n        <_>\n          14 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 14 19 -1.</_>\n        <_>\n          13 1 7 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 14 1 -1.</_>\n        <_>\n          13 9 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 1 -1.</_>\n        <_>\n          18 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 1 -1.</_>\n        <_>\n          16 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 3 -1.</_>\n        <_>\n          4 8 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 12 3 3 -1.</_>\n        <_>\n          14 13 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 17 4 2 -1.</_>\n        <_>\n          11 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 3 -1.</_>\n        <_>\n          9 13 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 7 6 -1.</_>\n        <_>\n          4 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 6 -1.</_>\n        <_>\n          11 2 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 1 4 -1.</_>\n        <_>\n          0 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 4 -1.</_>\n        <_>\n          8 5 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 1 3 -1.</_>\n        <_>\n          1 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 2 -1.</_>\n        <_>\n          9 4 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 13 2 5 -1.</_>\n        <_>\n          19 13 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 3 6 -1.</_>\n        <_>\n          3 11 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 2 12 -1.</_>\n        <_>\n          0 9 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 5 -1.</_>\n        <_>\n          15 10 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 4 2 -1.</_>\n        <_>\n          16 12 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 8 4 2 -1.</_>\n        <_>\n          16 9 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 13 2 1 -1.</_>\n        <_>\n          6 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 2 2 -1.</_>\n        <_>\n          13 13 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 8 8 -1.</_>\n        <_>\n          13 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 10 -1.</_>\n        <_>\n          5 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 2 2 -1.</_>\n        <_>\n          6 14 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 5 19 4 -1.</_>\n        <_>\n          0 7 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 2 -1.</_>\n        <_>\n          18 5 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 4 -1.</_>\n        <_>\n          18 4 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 13 8 2 -1.</_>\n        <_>\n          7 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 8 -1.</_>\n        <_>\n          0 4 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 15 6 -1.</_>\n        <_>\n          0 11 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 2 1 -1.</_>\n        <_>\n          18 14 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 8 -1.</_>\n        <_>\n          2 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 2 -1.</_>\n        <_>\n          2 13 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 3 2 -1.</_>\n        <_>\n          3 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 15 6 -1.</_>\n        <_>\n          7 13 5 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 3 3 -1.</_>\n        <_>\n          8 15 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 2 -1.</_>\n        <_>\n          8 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 3 -1.</_>\n        <_>\n          6 10 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 7 3 -1.</_>\n        <_>\n          5 9 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 3 1 -1.</_>\n        <_>\n          18 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 9 3 2 -1.</_>\n        <_>\n          18 10 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 9 1 3 -1.</_>\n        <_>\n          11 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          13 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 4 5 -1.</_>\n        <_>\n          4 6 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 3 -1.</_>\n        <_>\n          6 6 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 6 -1.</_>\n        <_>\n          0 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 2 -1.</_>\n        <_>\n          14 12 1 1 2.</_>\n        <_>\n          15 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 3 3 -1.</_>\n        <_>\n          4 16 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 4 -1.</_>\n        <_>\n          3 3 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 8 -1.</_>\n        <_>\n          6 0 7 4 2.</_>\n        <_>\n          13 4 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 8 -1.</_>\n        <_>\n          4 2 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 1 -1.</_>\n        <_>\n          13 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 1 -1.</_>\n        <_>\n          17 1 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 18 2 2 -1.</_>\n        <_>\n          18 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 2 2 -1.</_>\n        <_>\n          5 16 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 11 3 -1.</_>\n        <_>\n          2 9 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 2 3 -1.</_>\n        <_>\n          1 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 12 2 5 -1.</_>\n        <_>\n          19 12 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 16 1 3 -1.</_>\n        <_>\n          18 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 9 2 2 -1.</_>\n        <_>\n          14 9 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 2 -1.</_>\n        <_>\n          13 11 1 1 2.</_>\n        <_>\n          14 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 4 4 -1.</_>\n        <_>\n          14 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 11 1 3 -1.</_>\n        <_>\n          19 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 1 4 -1.</_>\n        <_>\n          0 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 20 -1.</_>\n        <_>\n          0 0 10 10 2.</_>\n        <_>\n          10 10 10 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 3 -1.</_>\n        <_>\n          10 13 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 2 -1.</_>\n        <_>\n          16 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 10 4 2 -1.</_>\n        <_>\n          13 10 2 1 2.</_>\n        <_>\n          15 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 2 -1.</_>\n        <_>\n          15 11 1 1 2.</_>\n        <_>\n          16 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 6 -1.</_>\n        <_>\n          3 10 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 9 -1.</_>\n        <_>\n          2 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 2 1 -1.</_>\n        <_>\n          8 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 18 8 1 -1.</_>\n        <_>\n          8 18 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 1 4 -1.</_>\n        <_>\n          3 12 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 11 3 3 -1.</_>\n        <_>\n          6 12 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 1 -1.</_>\n        <_>\n          10 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 2 1 -1.</_>\n        <_>\n          1 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 5 -1.</_>\n        <_>\n          12 6 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 0 6 10 2.</_>\n        <_>\n          14 10 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 1 4 -1.</_>\n        <_>\n          3 1 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 14 16 4 -1.</_>\n        <_>\n          8 14 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 5 4 -1.</_>\n        <_>\n          6 10 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 2 -1.</_>\n        <_>\n          5 12 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 14 4 1 -1.</_>\n        <_>\n          1 14 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 1 3 -1.</_>\n        <_>\n          3 11 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 3 9 -1.</_>\n        <_>\n          4 10 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 4 -1.</_>\n        <_>\n          5 11 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 2 -1.</_>\n        <_>\n          6 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 3 2 -1.</_>\n        <_>\n          8 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 6 -1.</_>\n        <_>\n          5 2 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 3 -1.</_>\n        <_>\n          11 2 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 2 -1.</_>\n        <_>\n          8 1 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 15 9 -1.</_>\n        <_>\n          4 7 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 8 6 -1.</_>\n        <_>\n          7 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 9 9 -1.</_>\n        <_>\n          11 11 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 4 -1.</_>\n        <_>\n          9 2 2 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 6 3 -1.</_>\n        <_>\n          2 12 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 3 -1.</_>\n        <_>\n          18 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 2 10 -1.</_>\n        <_>\n          10 15 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 4 -1.</_>\n        <_>\n          4 8 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 1 -1.</_>\n        <_>\n          3 11 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 6 -1.</_>\n        <_>\n          0 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 10 2 -1.</_>\n        <_>\n          8 10 5 1 2.</_>\n        <_>\n          13 11 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 5 6 -1.</_>\n        <_>\n          5 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 1 -1.</_>\n        <_>\n          6 1 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 12 -1.</_>\n        <_>\n          0 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 1 -1.</_>\n        <_>\n          1 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 1 3 -1.</_>\n        <_>\n          2 6 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 3 -1.</_>\n        <_>\n          10 13 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 3 -1.</_>\n        <_>\n          11 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 3 -1.</_>\n        <_>\n          10 12 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 4 2 -1.</_>\n        <_>\n          7 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 6 2 -1.</_>\n        <_>\n          15 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 2 1 -1.</_>\n        <_>\n          3 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 15 4 1 -1.</_>\n        <_>\n          2 16 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 2 -1.</_>\n        <_>\n          18 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 3 -1.</_>\n        <_>\n          19 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 2 -1.</_>\n        <_>\n          16 11 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 12 2 3 -1.</_>\n        <_>\n          15 13 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 1 -1.</_>\n        <_>\n          16 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 9 6 -1.</_>\n        <_>\n          2 4 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 3 2 -1.</_>\n        <_>\n          17 1 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 4 -1.</_>\n        <_>\n          7 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 2 -1.</_>\n        <_>\n          7 6 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 6 -1.</_>\n        <_>\n          13 4 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 9 3 -1.</_>\n        <_>\n          5 8 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 9 3 -1.</_>\n        <_>\n          5 9 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 3 -1.</_>\n        <_>\n          2 0 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 5 4 -1.</_>\n        <_>\n          9 10 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 7 -1.</_>\n        <_>\n          3 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 3 2 -1.</_>\n        <_>\n          17 10 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 2 -1.</_>\n        <_>\n          14 12 1 1 2.</_>\n        <_>\n          15 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 1 -1.</_>\n        <_>\n          7 0 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 2 -1.</_>\n        <_>\n          15 11 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 14 12 4 -1.</_>\n        <_>\n          3 14 6 2 2.</_>\n        <_>\n          9 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 1 3 -1.</_>\n        <_>\n          4 3 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 2 -1.</_>\n        <_>\n          9 13 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 11 2 2 -1.</_>\n        <_>\n          14 11 1 1 2.</_>\n        <_>\n          15 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 7 2 -1.</_>\n        <_>\n          13 11 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 1 2 -1.</_>\n        <_>\n          7 13 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 3 -1.</_>\n        <_>\n          6 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 2 5 -1.</_>\n        <_>\n          9 2 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 4 2 -1.</_>\n        <_>\n          3 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 4 3 -1.</_>\n        <_>\n          13 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 5 3 -1.</_>\n        <_>\n          15 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 4 3 -1.</_>\n        <_>\n          15 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 16 3 -1.</_>\n        <_>\n          4 17 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 2 2 -1.</_>\n        <_>\n          0 14 1 1 2.</_>\n        <_>\n          1 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 6 -1.</_>\n        <_>\n          7 4 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 1 3 -1.</_>\n        <_>\n          2 6 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 7 2 2 -1.</_>\n        <_>\n          2 7 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 11 5 3 -1.</_>\n        <_>\n          5 12 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 14 4 6 -1.</_>\n        <_>\n          16 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 7 -1.</_>\n        <_>\n          8 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 11 -1.</_>\n        <_>\n          3 1 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 7 3 -1.</_>\n        <_>\n          6 11 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 4 -1.</_>\n        <_>\n          8 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 10 2 -1.</_>\n        <_>\n          10 15 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 18 -1.</_>\n        <_>\n          0 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 2 2 -1.</_>\n        <_>\n          4 13 1 1 2.</_>\n        <_>\n          5 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 6 -1.</_>\n        <_>\n          9 12 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 3 -1.</_>\n        <_>\n          5 8 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 3 -1.</_>\n        <_>\n          5 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 14 1 -1.</_>\n        <_>\n          1 4 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 13 8 3 -1.</_>\n        <_>\n          14 13 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 2 1 -1.</_>\n        <_>\n          4 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 16 2 2 -1.</_>\n        <_>\n          6 16 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 17 4 2 -1.</_>\n        <_>\n          4 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 2 -1.</_>\n        <_>\n          5 7 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 2 2 -1.</_>\n        <_>\n          15 9 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 12 2 2 -1.</_>\n        <_>\n          3 12 1 1 2.</_>\n        <_>\n          4 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 2 1 -1.</_>\n        <_>\n          1 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 2 -1.</_>\n        <_>\n          18 1 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 3 9 -1.</_>\n        <_>\n          3 11 1 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 4 2 -1.</_>\n        <_>\n          16 8 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 16 3 3 -1.</_>\n        <_>\n          5 16 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 1 -1.</_>\n        <_>\n          10 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 3 2.</_>\n        <_>\n          17 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 2 1 -1.</_>\n        <_>\n          17 2 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 19 20 1 -1.</_>\n        <_>\n          10 19 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 6 1 -1.</_>\n        <_>\n          3 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 4 3 -1.</_>\n        <_>\n          10 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 3 -1.</_>\n        <_>\n          5 12 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 3 -1.</_>\n        <_>\n          18 8 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 1 1 4 -1.</_>\n        <_>\n          18 2 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 1 -1.</_>\n        <_>\n          7 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 4 -1.</_>\n        <_>\n          6 5 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 7 -1.</_>\n        <_>\n          9 0 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 5 9 -1.</_>\n        <_>\n          0 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 2 -1.</_>\n        <_>\n          14 10 1 1 2.</_>\n        <_>\n          15 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 2 -1.</_>\n        <_>\n          15 11 1 1 2.</_>\n        <_>\n          16 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 4 -1.</_>\n        <_>\n          11 2 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 12 8 -1.</_>\n        <_>\n          6 12 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 2 -1.</_>\n        <_>\n          3 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 4 5 -1.</_>\n        <_>\n          1 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 4 4 -1.</_>\n        <_>\n          3 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 4 -1.</_>\n        <_>\n          13 11 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 1 4 -1.</_>\n        <_>\n          2 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 9 -1.</_>\n        <_>\n          7 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 2 3 -1.</_>\n        <_>\n          13 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 15 3 -1.</_>\n        <_>\n          8 10 5 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 3 1 -1.</_>\n        <_>\n          16 11 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 8 -1.</_>\n        <_>\n          1 2 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 15 6 -1.</_>\n        <_>\n          2 6 15 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 6 -1.</_>\n        <_>\n          6 2 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 3 -1.</_>\n        <_>\n          16 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 4 3 -1.</_>\n        <_>\n          16 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 2 -1.</_>\n        <_>\n          15 10 1 1 2.</_>\n        <_>\n          16 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 3 -1.</_>\n        <_>\n          13 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 2 2 -1.</_>\n        <_>\n          2 16 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 7 -1.</_>\n        <_>\n          4 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 2 -1.</_>\n        <_>\n          0 16 1 1 2.</_>\n        <_>\n          1 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 3 -1.</_>\n        <_>\n          8 0 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 1 3 -1.</_>\n        <_>\n          0 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 4 -1.</_>\n        <_>\n          10 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 4 6 -1.</_>\n        <_>\n          16 4 2 3 2.</_>\n        <_>\n          18 7 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 4 2 -1.</_>\n        <_>\n          11 12 2 1 2.</_>\n        <_>\n          13 13 2 1 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_licence_plate_rus_16stages.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<opencv_storage>\r\n<!-- Automatically converted from haarcascade2, window size = 64x16 -->\r\n<haarcascade_pltzzz64x16_16STG type_id=\"opencv-haar-classifier\">\r\n  <size>\r\n    64 16</size>\r\n  <stages>\r\n    <_>\r\n      <!-- stage 0 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  32 2 8 6 -1.</_>\r\n                <_>\r\n                  32 4 8 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.6915600746870041e-002</threshold>\r\n            <left_val>-9.5547717809677124e-001</left_val>\r\n            <right_val>8.9129137992858887e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 6 10 -1.</_>\r\n                <_>\r\n                  3 4 3 10 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.4228349328041077e-002</threshold>\r\n            <left_val>-9.2089319229125977e-001</left_val>\r\n            <right_val>8.8723921775817871e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  55 0 8 6 -1.</_>\r\n                <_>\r\n                  55 0 4 3 2.</_>\r\n                <_>\r\n                  59 3 4 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.0168660432100296e-002</threshold>\r\n            <left_val>8.8940089941024780e-001</left_val>\r\n            <right_val>-7.7847331762313843e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  44 7 4 9 -1.</_>\r\n                <_>\r\n                  44 10 4 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.0863260142505169e-003</threshold>\r\n            <left_val>-8.7998157739639282e-001</left_val>\r\n            <right_val>5.8651781082153320e-001</right_val></_></_></trees>\r\n      <stage_threshold>-2.0683259963989258e+000</stage_threshold>\r\n      <parent>-1</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 1 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  29 1 16 4 -1.</_>\r\n                <_>\r\n                  29 3 16 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.9062159359455109e-002</threshold>\r\n            <left_val>-8.7765061855316162e-001</left_val>\r\n            <right_val>8.5373121500015259e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 9 8 -1.</_>\r\n                <_>\r\n                  3 5 3 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.3903399705886841e-002</threshold>\r\n            <left_val>-9.2079448699951172e-001</left_val>\r\n            <right_val>7.5155001878738403e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  44 0 20 14 -1.</_>\r\n                <_>\r\n                  44 0 10 7 2.</_>\r\n                <_>\r\n                  54 7 10 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-3.5404648631811142e-002</threshold>\r\n            <left_val>6.7834627628326416e-001</left_val>\r\n            <right_val>-9.0937072038650513e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  41 7 6 9 -1.</_>\r\n                <_>\r\n                  43 7 2 9 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.2988721765577793e-003</threshold>\r\n            <left_val>-8.1054258346557617e-001</left_val>\r\n            <right_val>5.8985030651092529e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 21 4 -1.</_>\r\n                <_>\r\n                  7 4 7 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.4959490876644850e-003</threshold>\r\n            <left_val>-9.7632282972335815e-001</left_val>\r\n            <right_val>4.5473039150238037e-001</right_val></_></_></trees>\r\n      <stage_threshold>-1.6632349491119385e+000</stage_threshold>\r\n      <parent>0</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 2 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  31 2 11 6 -1.</_>\r\n                <_>\r\n                  31 4 11 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.3864099755883217e-002</threshold>\r\n            <left_val>-9.3137168884277344e-001</left_val>\r\n            <right_val>8.2478952407836914e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  56 3 6 11 -1.</_>\r\n                <_>\r\n                  59 3 3 11 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.5775209069252014e-002</threshold>\r\n            <left_val>8.5526448488235474e-001</left_val>\r\n            <right_val>-8.7574672698974609e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  32 14 32 2 -1.</_>\r\n                <_>\r\n                  32 15 32 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.0646049864590168e-002</threshold>\r\n            <left_val>8.5167151689529419e-001</left_val>\r\n            <right_val>-6.7789041996002197e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 2 8 14 -1.</_>\r\n                <_>\r\n                  4 2 4 14 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.7000989764928818e-002</threshold>\r\n            <left_val>-8.0041092634201050e-001</left_val>\r\n            <right_val>6.4893317222595215e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 0 22 6 -1.</_>\r\n                <_>\r\n                  19 0 11 3 2.</_>\r\n                <_>\r\n                  30 3 11 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.2989721298217773e-003</threshold>\r\n            <left_val>-9.5342522859573364e-001</left_val>\r\n            <right_val>5.0140267610549927e-001</right_val></_></_></trees>\r\n      <stage_threshold>-1.3346730470657349e+000</stage_threshold>\r\n      <parent>1</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 3 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  56 0 6 6 -1.</_>\r\n                <_>\r\n                  56 0 3 3 2.</_>\r\n                <_>\r\n                  59 3 3 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.9233630783855915e-003</threshold>\r\n            <left_val>8.2654470205307007e-001</left_val>\r\n            <right_val>-8.5396027565002441e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  32 0 14 12 -1.</_>\r\n                <_>\r\n                  32 0 7 6 2.</_>\r\n                <_>\r\n                  39 6 7 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.2539249658584595e-001</threshold>\r\n            <left_val>-1.2996139936149120e-002</left_val>\r\n            <right_val>-3.2377028808593750e+003</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 1 43 4 -1.</_>\r\n                <_>\r\n                  2 3 43 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.3474893569946289e-002</threshold>\r\n            <left_val>-6.4648061990737915e-001</left_val>\r\n            <right_val>8.2302427291870117e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  34 10 30 5 -1.</_>\r\n                <_>\r\n                  44 10 10 5 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.2217150330543518e-002</threshold>\r\n            <left_val>-7.5190877914428711e-001</left_val>\r\n            <right_val>6.3705182075500488e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 9 5 -1.</_>\r\n                <_>\r\n                  3 9 3 5 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.0000640302896500e-002</threshold>\r\n            <left_val>-6.2077498435974121e-001</left_val>\r\n            <right_val>6.1317932605743408e-001</right_val></_></_></trees>\r\n      <stage_threshold>-1.6521669626235962e+000</stage_threshold>\r\n      <parent>2</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 4 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  2 1 43 6 -1.</_>\r\n                <_>\r\n                  2 3 43 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.2297486960887909e-002</threshold>\r\n            <left_val>-7.2764229774475098e-001</left_val>\r\n            <right_val>8.0554759502410889e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  53 4 9 8 -1.</_>\r\n                <_>\r\n                  56 4 3 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.7613969519734383e-002</threshold>\r\n            <left_val>-7.0769268274307251e-001</left_val>\r\n            <right_val>7.3315787315368652e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  36 4 14 8 -1.</_>\r\n                <_>\r\n                  36 4 7 4 2.</_>\r\n                <_>\r\n                  43 8 7 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.2465449981391430e-002</threshold>\r\n            <left_val>-8.4359270334243774e-001</left_val>\r\n            <right_val>5.7046437263488770e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 14 49 2 -1.</_>\r\n                <_>\r\n                  14 15 49 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.3886829614639282e-002</threshold>\r\n            <left_val>8.2656508684158325e-001</left_val>\r\n            <right_val>-5.2783298492431641e-001</right_val></_></_></trees>\r\n      <stage_threshold>-1.4523630142211914e+000</stage_threshold>\r\n      <parent>3</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 5 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 5 4 9 -1.</_>\r\n                <_>\r\n                  2 5 2 9 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.8821349367499352e-002</threshold>\r\n            <left_val>-8.1122857332229614e-001</left_val>\r\n            <right_val>6.9127470254898071e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 1 38 4 -1.</_>\r\n                <_>\r\n                  21 3 38 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.1703320592641830e-002</threshold>\r\n            <left_val>-7.6482647657394409e-001</left_val>\r\n            <right_val>6.4212161302566528e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  44 12 18 3 -1.</_>\r\n                <_>\r\n                  53 12 9 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.6298670321702957e-002</threshold>\r\n            <left_val>5.0207728147506714e-001</left_val>\r\n            <right_val>-8.4020161628723145e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  10 4 9 3 -1.</_>\r\n                <_>\r\n                  13 4 3 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-4.9458951689302921e-003</threshold>\r\n            <left_val>6.1991941928863525e-001</left_val>\r\n            <right_val>-6.1633539199829102e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  40 4 10 4 -1.</_>\r\n                <_>\r\n                  45 4 5 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.1894597709178925e-003</threshold>\r\n            <left_val>4.4975179433822632e-001</left_val>\r\n            <right_val>-8.0651968717575073e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  17 14 47 2 -1.</_>\r\n                <_>\r\n                  17 15 47 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.8824130296707153e-002</threshold>\r\n            <left_val>6.1992841958999634e-001</left_val>\r\n            <right_val>-5.5643159151077271e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 5 4 7 -1.</_>\r\n                <_>\r\n                  10 5 2 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.6571601890027523e-003</threshold>\r\n            <left_val>-4.8346561193466187e-001</left_val>\r\n            <right_val>6.8647360801696777e-001</right_val></_></_></trees>\r\n      <stage_threshold>-2.2358059883117676e+000</stage_threshold>\r\n      <parent>4</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 6 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  56 0 6 6 -1.</_>\r\n                <_>\r\n                  56 0 3 3 2.</_>\r\n                <_>\r\n                  59 3 3 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.1503243893384933e-003</threshold>\r\n            <left_val>6.8174481391906738e-001</left_val>\r\n            <right_val>-7.7866071462631226e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 6 6 -1.</_>\r\n                <_>\r\n                  0 0 3 3 2.</_>\r\n                <_>\r\n                  3 3 3 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.4933180585503578e-003</threshold>\r\n            <left_val>-6.8696027994155884e-001</left_val>\r\n            <right_val>6.6913938522338867e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  13 4 48 2 -1.</_>\r\n                <_>\r\n                  29 4 16 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.5296419411897659e-002</threshold>\r\n            <left_val>-7.3576509952545166e-001</left_val>\r\n            <right_val>5.9453499317169189e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  42 1 6 15 -1.</_>\r\n                <_>\r\n                  42 6 6 5 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.1669679544866085e-002</threshold>\r\n            <left_val>-8.4733831882476807e-001</left_val>\r\n            <right_val>4.5461329817771912e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  30 8 3 5 -1.</_>\r\n                <_>\r\n                  31 8 1 5 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.5769430212676525e-003</threshold>\r\n            <left_val>-5.8270388841629028e-001</left_val>\r\n            <right_val>7.7900522947311401e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  55 10 8 6 -1.</_>\r\n                <_>\r\n                  55 13 8 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.4139170525595546e-003</threshold>\r\n            <left_val>4.5126929879188538e-001</left_val>\r\n            <right_val>-9.0696328878402710e-001</right_val></_></_></trees>\r\n      <stage_threshold>-1.8782069683074951e+000</stage_threshold>\r\n      <parent>5</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 7 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 6 4 7 -1.</_>\r\n                <_>\r\n                  6 6 2 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-5.3149578161537647e-003</threshold>\r\n            <left_val>6.5218788385391235e-001</left_val>\r\n            <right_val>-7.9464268684387207e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  56 3 6 8 -1.</_>\r\n                <_>\r\n                  59 3 3 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.2906960919499397e-002</threshold>\r\n            <left_val>6.6433382034301758e-001</left_val>\r\n            <right_val>-7.3633247613906860e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  37 2 4 6 -1.</_>\r\n                <_>\r\n                  37 4 4 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>9.4887977465987206e-003</threshold>\r\n            <left_val>-8.2612031698226929e-001</left_val>\r\n            <right_val>4.9333500862121582e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 10 30 6 -1.</_>\r\n                <_>\r\n                  0 12 30 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.5138411223888397e-002</threshold>\r\n            <left_val>-5.4704028367996216e-001</left_val>\r\n            <right_val>7.6927912235260010e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 4 21 12 -1.</_>\r\n                <_>\r\n                  7 4 7 12 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.5049019604921341e-002</threshold>\r\n            <left_val>-8.6739641427993774e-001</left_val>\r\n            <right_val>5.2807968854904175e-001</right_val></_></_></trees>\r\n      <stage_threshold>-1.0597369670867920e+000</stage_threshold>\r\n      <parent>6</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 8 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  44 0 1 14 -1.</_>\r\n                <_>\r\n                  44 7 1 7 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.6414438188076019e-003</threshold>\r\n            <left_val>-7.7290147542953491e-001</left_val>\r\n            <right_val>6.9723731279373169e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  54 3 4 3 -1.</_>\r\n                <_>\r\n                  56 3 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.4703629314899445e-003</threshold>\r\n            <left_val>-7.4289917945861816e-001</left_val>\r\n            <right_val>6.6825848817825317e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  32 0 30 6 -1.</_>\r\n                <_>\r\n                  32 0 15 3 2.</_>\r\n                <_>\r\n                  47 3 15 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.2910499945282936e-002</threshold>\r\n            <left_val>4.3986389040946960e-001</left_val>\r\n            <right_val>-9.0588808059692383e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 8 9 7 -1.</_>\r\n                <_>\r\n                  3 8 3 7 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.4193221479654312e-002</threshold>\r\n            <left_val>-6.9507479667663574e-001</left_val>\r\n            <right_val>6.2501090764999390e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  30 10 3 3 -1.</_>\r\n                <_>\r\n                  31 10 1 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.5060020377859473e-003</threshold>\r\n            <left_val>-6.8670761585235596e-001</left_val>\r\n            <right_val>8.2241541147232056e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 3 24 4 -1.</_>\r\n                <_>\r\n                  29 3 8 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.9838380467263050e-005</threshold>\r\n            <left_val>-9.2727631330490112e-001</left_val>\r\n            <right_val>6.4723730087280273e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  42 3 12 6 -1.</_>\r\n                <_>\r\n                  46 3 4 6 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.2170299416757189e-005</threshold>\r\n            <left_val>5.6555831432342529e-001</left_val>\r\n            <right_val>-9.6788132190704346e-001</right_val></_></_></trees>\r\n      <stage_threshold>-1.4993519783020020e+000</stage_threshold>\r\n      <parent>7</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 9 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  56 9 6 6 -1.</_>\r\n                <_>\r\n                  59 9 3 6 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.1395259760320187e-002</threshold>\r\n            <left_val>7.1383631229400635e-001</left_val>\r\n            <right_val>-8.7429678440093994e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 4 1 6 -1.</_>\r\n                <_>\r\n                  6 7 1 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.1864590235054493e-003</threshold>\r\n            <left_val>8.5311782360076904e-001</left_val>\r\n            <right_val>-6.4777731895446777e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 12 4 -1.</_>\r\n                <_>\r\n                  0 0 6 2 2.</_>\r\n                <_>\r\n                  6 2 6 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.3193720262497663e-003</threshold>\r\n            <left_val>-7.6411879062652588e-001</left_val>\r\n            <right_val>7.1867972612380981e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  43 12 18 2 -1.</_>\r\n                <_>\r\n                  52 12 9 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.9916073009371758e-003</threshold>\r\n            <left_val>6.6442942619323730e-001</left_val>\r\n            <right_val>-7.9540950059890747e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  9 5 2 8 -1.</_>\r\n                <_>\r\n                  10 5 1 8 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.4212740352377295e-003</threshold>\r\n            <left_val>-6.3904231786727905e-001</left_val>\r\n            <right_val>7.5050598382949829e-001</right_val></_></_></trees>\r\n      <stage_threshold>-8.4829801321029663e-001</stage_threshold>\r\n      <parent>8</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 10 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 9 6 3 -1.</_>\r\n                <_>\r\n                  3 9 2 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.4091659151017666e-003</threshold>\r\n            <left_val>-8.8425230979919434e-001</left_val>\r\n            <right_val>9.9953681230545044e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  56 8 2 8 -1.</_>\r\n                <_>\r\n                  56 12 2 4 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.3316390151157975e-004</threshold>\r\n            <left_val>8.3822172880172729e-001</left_val>\r\n            <right_val>-9.8322170972824097e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  24 2 6 13 -1.</_>\r\n                <_>\r\n                  26 2 2 13 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-6.4947169448714703e-005</threshold>\r\n            <left_val>1.</left_val>\r\n            <right_val>-9.1822808980941772e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  33 7 24 4 -1.</_>\r\n                <_>\r\n                  41 7 8 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.3404141217470169e-003</threshold>\r\n            <left_val>-9.4317251443862915e-001</left_val>\r\n            <right_val>9.0425151586532593e-001</right_val></_></_></trees>\r\n      <stage_threshold>-6.0007210820913315e-002</stage_threshold>\r\n      <parent>9</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 11 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 1 57 4 -1.</_>\r\n                <_>\r\n                  1 3 57 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.0755469650030136e-001</threshold>\r\n            <left_val>-7.1647202968597412e-001</left_val>\r\n            <right_val>8.7827038764953613e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 2 6 14 -1.</_>\r\n                <_>\r\n                  3 2 3 14 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.1668949872255325e-002</threshold>\r\n            <left_val>-8.7051069736480713e-001</left_val>\r\n            <right_val>5.8807212114334106e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  52 3 6 10 -1.</_>\r\n                <_>\r\n                  54 3 2 10 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-1.0572380386292934e-002</threshold>\r\n            <left_val>6.2438100576400757e-001</left_val>\r\n            <right_val>-7.4027371406555176e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 14 61 2 -1.</_>\r\n                <_>\r\n                  1 15 61 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.7396259829401970e-002</threshold>\r\n            <left_val>8.9776748418807983e-001</left_val>\r\n            <right_val>-5.2986758947372437e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  28 0 11 12 -1.</_>\r\n                <_>\r\n                  28 4 11 4 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.5918649509549141e-002</threshold>\r\n            <left_val>-8.6482518911361694e-001</left_val>\r\n            <right_val>5.3121817111968994e-001</right_val></_></_></trees>\r\n      <stage_threshold>-9.6125108003616333e-001</stage_threshold>\r\n      <parent>10</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 12 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  22 1 41 4 -1.</_>\r\n                <_>\r\n                  22 3 41 2 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.1039132773876190e-002</threshold>\r\n            <left_val>-7.5719678401947021e-001</left_val>\r\n            <right_val>7.5645631551742554e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  41 6 6 8 -1.</_>\r\n                <_>\r\n                  43 6 2 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.6241148635745049e-003</threshold>\r\n            <left_val>-7.9783838987350464e-001</left_val>\r\n            <right_val>7.1733069419860840e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  50 9 14 5 -1.</_>\r\n                <_>\r\n                  57 9 7 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.7092639356851578e-002</threshold>\r\n            <left_val>6.0071170330047607e-001</left_val>\r\n            <right_val>-8.4794402122497559e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  4 1 12 5 -1.</_>\r\n                <_>\r\n                  10 1 6 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.1267888890579343e-004</threshold>\r\n            <left_val>5.9364068508148193e-001</left_val>\r\n            <right_val>-8.9295238256454468e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  37 9 3 3 -1.</_>\r\n                <_>\r\n                  38 9 1 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.3705072756856680e-004</threshold>\r\n            <left_val>-6.4887362718582153e-001</left_val>\r\n            <right_val>7.8537952899932861e-001</right_val></_></_></trees>\r\n      <stage_threshold>-1.0618970394134521e+000</stage_threshold>\r\n      <parent>11</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 13 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  54 0 10 6 -1.</_>\r\n                <_>\r\n                  54 0 5 3 2.</_>\r\n                <_>\r\n                  59 3 5 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-9.7556859254837036e-003</threshold>\r\n            <left_val>7.6982218027114868e-001</left_val>\r\n            <right_val>-8.5293501615524292e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  47 0 6 11 -1.</_>\r\n                <_>\r\n                  49 0 2 11 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.6617246270179749e-003</threshold>\r\n            <left_val>8.4029090404510498e-001</left_val>\r\n            <right_val>-7.1949690580368042e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  19 2 20 2 -1.</_>\r\n                <_>\r\n                  19 3 20 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.6897840425372124e-002</threshold>\r\n            <left_val>-5.3601992130279541e-001</left_val>\r\n            <right_val>9.5484441518783569e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  14 4 6 11 -1.</_>\r\n                <_>\r\n                  17 4 3 11 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>4.7526158596156165e-005</threshold>\r\n            <left_val>-7.6412862539291382e-001</left_val>\r\n            <right_val>7.5398761034011841e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  31 9 33 2 -1.</_>\r\n                <_>\r\n                  42 9 11 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>6.5607670694589615e-003</threshold>\r\n            <left_val>-9.9346441030502319e-001</left_val>\r\n            <right_val>6.4864277839660645e-001</right_val></_></_></trees>\r\n      <stage_threshold>-7.3307347297668457e-001</stage_threshold>\r\n      <parent>12</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 14 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  6 1 53 6 -1.</_>\r\n                <_>\r\n                  6 3 53 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.0103269666433334e-001</threshold>\r\n            <left_val>-7.3275578022003174e-001</left_val>\r\n            <right_val>8.4619927406311035e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  49 9 4 6 -1.</_>\r\n                <_>\r\n                  49 9 2 3 2.</_>\r\n                <_>\r\n                  51 12 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.8920811018906534e-004</threshold>\r\n            <left_val>7.1564781665802002e-001</left_val>\r\n            <right_val>-8.8221758604049683e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 9 30 7 -1.</_>\r\n                <_>\r\n                  10 9 10 7 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.0838840156793594e-002</threshold>\r\n            <left_val>-8.7420248985290527e-001</left_val>\r\n            <right_val>6.0648679733276367e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  40 4 6 2 -1.</_>\r\n                <_>\r\n                  42 4 2 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>5.0803890917450190e-004</threshold>\r\n            <left_val>-9.0554022789001465e-001</left_val>\r\n            <right_val>6.4213967323303223e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 9 6 1 -1.</_>\r\n                <_>\r\n                  3 9 2 1 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.3357039317488670e-003</threshold>\r\n            <left_val>-9.2574918270111084e-001</left_val>\r\n            <right_val>8.6384928226470947e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 5 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  47 3 4 10 -1.</_>\r\n                <_>\r\n                  47 8 4 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>8.0239427916239947e-005</threshold>\r\n            <left_val>-9.9618428945541382e-001</left_val>\r\n            <right_val>9.5355111360549927e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 6 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  31 5 30 11 -1.</_>\r\n                <_>\r\n                  41 5 10 11 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>3.2030208967626095e-003</threshold>\r\n            <left_val>-1.</left_val>\r\n            <right_val>1.0001050233840942e+000</right_val></_></_>\r\n        <_>\r\n          <!-- tree 7 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 2 1 -1.</_>\r\n                <_>\r\n                  1 0 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.</threshold>\r\n            <left_val>0.</left_val>\r\n            <right_val>-1.</right_val></_></_>\r\n        <_>\r\n          <!-- tree 8 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  21 3 42 5 -1.</_>\r\n                <_>\r\n                  35 3 14 5 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.6143440045416355e-003</threshold>\r\n            <left_val>-1.</left_val>\r\n            <right_val>1.0002139806747437e+000</right_val></_></_>\r\n        <_>\r\n          <!-- tree 9 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 2 1 -1.</_>\r\n                <_>\r\n                  1 0 1 1 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>0.</threshold>\r\n            <left_val>0.</left_val>\r\n            <right_val>-1.</right_val></_></_>\r\n        <_>\r\n          <!-- tree 10 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  8 5 30 9 -1.</_>\r\n                <_>\r\n                  8 8 30 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-7.0475979009643197e-004</threshold>\r\n            <left_val>1.</left_val>\r\n            <right_val>-9.9976968765258789e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 11 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 12 33 3 -1.</_>\r\n                <_>\r\n                  14 12 11 3 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.1271279547363520e-003</threshold>\r\n            <left_val>-9.9694627523422241e-001</left_val>\r\n            <right_val>1.0002720355987549e+000</right_val></_></_>\r\n        <_>\r\n          <!-- tree 12 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 0 3 2 -1.</_>\r\n                <_>\r\n                  1 0 1 2 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.4224430671893060e-004</threshold>\r\n            <left_val>1.</left_val>\r\n            <right_val>-1.</right_val></_></_>\r\n        <_>\r\n          <!-- tree 13 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  46 4 3 8 -1.</_>\r\n                <_>\r\n                  47 4 1 8 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>7.4700301047414541e-004</threshold>\r\n            <left_val>-9.9108231067657471e-001</left_val>\r\n            <right_val>9.9941182136535645e-001</right_val></_></_></trees>\r\n      <stage_threshold>-1.0991690158843994e+000</stage_threshold>\r\n      <parent>13</parent>\r\n      <next>-1</next></_>\r\n    <_>\r\n      <!-- stage 15 -->\r\n      <trees>\r\n        <_>\r\n          <!-- tree 0 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  1 2 6 5 -1.</_>\r\n                <_>\r\n                  3 2 2 5 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>1.7227890202775598e-003</threshold>\r\n            <left_val>-9.3608891963958740e-001</left_val>\r\n            <right_val>8.7251222133636475e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 1 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  0 3 18 5 -1.</_>\r\n                <_>\r\n                  6 3 6 5 3.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>2.7599320746958256e-003</threshold>\r\n            <left_val>-9.9757021665573120e-001</left_val>\r\n            <right_val>1.0000289678573608e+000</right_val></_></_>\r\n        <_>\r\n          <!-- tree 2 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 1 6 14 -1.</_>\r\n                <_>\r\n                  6 1 3 14 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-8.9444358309265226e-005</threshold>\r\n            <left_val>1.</left_val>\r\n            <right_val>-9.9264812469482422e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 3 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  3 6 2 10 -1.</_>\r\n                <_>\r\n                  3 11 2 5 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.7962020249105990e-004</threshold>\r\n            <left_val>8.2833290100097656e-001</left_val>\r\n            <right_val>-9.8444151878356934e-001</right_val></_></_>\r\n        <_>\r\n          <!-- tree 4 -->\r\n          <_>\r\n            <!-- root node -->\r\n            <feature>\r\n              <rects>\r\n                <_>\r\n                  42 0 4 6 -1.</_>\r\n                <_>\r\n                  42 0 2 3 2.</_>\r\n                <_>\r\n                  44 3 2 3 2.</_></rects>\r\n              <tilted>0</tilted></feature>\r\n            <threshold>-2.7560539820115082e-005</threshold>\r\n            <left_val>1.</left_val>\r\n            <right_val>-9.9543339014053345e-001</right_val></_></_></trees>\r\n      <stage_threshold>-9.1314977407455444e-001</stage_threshold>\r\n      <parent>14</parent>\r\n      <next>-1</next></_></stages></haarcascade_pltzzz64x16_16STG>\r\n</opencv_storage>\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_lowerbody.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n   19x23 lowerbody detector (see the detailed description below). \n\n//////////////////////////////////////////////////////////////////////////\n| Contributors License Agreement\n| IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n|   By downloading, copying, installing or using the software you agree \n|   to this license.\n|   If you do not agree to this license, do not download, install,\n|   copy or use the software.\n|\n| Copyright (c) 2004, Hannes Kruppa and Bernt Schiele (ETH Zurich, Switzerland).\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\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|    * The name of Contributor may not used to endorse or promote products \n|      derived 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\n| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n| PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n| PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n| LIABILITY, 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.  Back to\n| Top\n//////////////////////////////////////////////////////////////////////////\n\n\"Haar\"-based Detectors For Pedestrian Detection\n===============================================\nby Hannes Kruppa and Bernt Schiele, ETH Zurich, Switzerland\n\nThis archive provides the following three detectors:\n- upper body detector (most fun, useful in many scenarios!)\n- lower body detector\n- full body detector\n\nThese detectors have been successfully applied to pedestrian detection\nin still images. They can be directly passed as parameters to the\nprogram HaarFaceDetect.\nNOTE: These detectors deal with frontal and backside views but not\nwith side views (also see \"Known limitations\" below).\n\nRESEARCHERS:\nIf you are using any of the detectors or involved ideas please cite\nthis paper (available at www.vision.ethz.ch/publications/):\n\n@InProceedings{Kruppa03-bmvc,\n  author =       \"Hannes Kruppa, Modesto Castrillon-Santana and Bernt Schiele\",\n  title =        \"Fast and Robust Face Finding via Local Context.\"\n  booktitle =    \"Joint IEEE International Workshop on Visual Surveillance and Performance Evaluation of Tracking and Surveillance\"\n  year =         \"2003\",\n  month =        \"October\"\n}\n\nCOMMERCIAL:\nIf you have any commercial interest in this work please contact \nhkruppa@inf.ethz.ch\n\n\nADDITIONAL INFORMATION \n====================== \nCheck out the demo movie, e.g. using mplayer or any (Windows/Linux-) player\nthat can play back .mpg movies.\nUnder Linux that's:\n> ffplay demo.mpg\nor:\n> mplayer demo.mpg\n\nThe movie shows a person walking towards the camera in a realistic\nindoor setting. Using ffplay or mplayer you can pause and continue the\nmovie by pressing the space bar.\n\nDetections coming from the different detectors are visualized using\ndifferent line styles: \nupper body : dotted line\nlower body : dashed line\nfull body  : solid line\n\nYou will notice that successful detections containing the target do\nnot sit tightly on the body but also include some of the background\nleft and right.  This is not a bug but accurately reflects the\nemployed training data which also includes portions of the background\nto ensure proper silhouette representation. If you want to get a\nfeeling for the training data check out the CBCL data set:\nhttp://www.ai.mit.edu/projects/cbcl/software-datasets/PedestrianData.html\n\nThere is also a small number of false alarms in this sequence.  \nNOTE: This is per frame detection, not tracking (which is also one of\nthe reasons why it is not mislead by the person's shadow on the back\nwall). \n\nOn an Intel Xeon 1.7GHz machine the detectors operate at something\nbetween 6Hz to 14 Hz (on 352 x 288 frames per second) depending on the\ndetector. The detectors work as well on much lower image resolutions\nwhich is always an interesting possibility for speed-ups or\n\"coarse-to-fine\" search strategies.\n\nAdditional information e.g. on training parameters, detector\ncombination, detecting other types of objects (e.g. cars) etc. is\navailable in my PhD thesis report (available end of June). Check out\nwww.vision.ethz.ch/kruppa/\n\n\nKNOWN LIMITATIONS\n==================\n1) the detectors only support frontal and back views but not sideviews.\n   Sideviews are trickier and it makes a lot of sense to include additional\n   modalities for their detection, e.g. motion information. I recommend\n   Viola and Jones' ICCV 2003 paper if this further interests you.\n\n2) dont expect these detectors to be as accurate as a frontal face detector.\n   A frontal face as a pattern is pretty distinct with respect to other\n   patterns occuring in the world (i.e. image \"background\"). This is not so\n   for upper, lower and especially full bodies, because they have to rely\n   on fragile silhouette information rather than internal (facial) features.\n   Still, we found especially the upper body detector to perform amazingly well.\n   In contrast to a face detector these detectors will also work at very low\n   image resolutions \n\nAcknowledgements\n================\nThanks to Martin Spengler, ETH Zurich, for providing the demo movie.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>23</height>\n  <width>19</width>\n  <stageParams>\n    <maxWeakCount>89</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>27</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>17</maxWeakCount>\n      <stageThreshold>-1.4308550357818604e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 -1.6869869083166122e-02</internalNodes>\n          <leafValues>\n            5.4657417535781860e-01 -6.3678038120269775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 2.5349899660795927e-03</internalNodes>\n          <leafValues>\n            -3.7605491280555725e-01 3.2378101348876953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 -2.4709459394216537e-02</internalNodes>\n          <leafValues>\n            -6.7979127168655396e-01 2.0501059293746948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3 8.2436859607696533e-02</internalNodes>\n          <leafValues>\n            2.0588639378547668e-01 -8.4938430786132812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 -8.2128931535407901e-04</internalNodes>\n          <leafValues>\n            3.1891921162605286e-01 -4.6469458937644958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 2.3016959428787231e-02</internalNodes>\n          <leafValues>\n            1.8670299649238586e-01 -7.0330899953842163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 6.6386149264872074e-03</internalNodes>\n          <leafValues>\n            1.6370490193367004e-01 -8.4604722261428833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 7.6682120561599731e-04</internalNodes>\n          <leafValues>\n            -3.9852690696716309e-01 2.3113329708576202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 1.1731679737567902e-01</internalNodes>\n          <leafValues>\n            1.0445039719343185e-01 -8.8510942459106445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 1.5421230345964432e-02</internalNodes>\n          <leafValues>\n            -2.7859508991241455e-01 2.8921920061111450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 3.4018948674201965e-02</internalNodes>\n          <leafValues>\n            -1.4287669956684113e-01 7.7801531553268433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 3.4638870507478714e-02</internalNodes>\n          <leafValues>\n            1.8644079566001892e-01 -6.0324841737747192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 -3.7503659725189209e-01</internalNodes>\n          <leafValues>\n            9.2781841754913330e-01 -1.5421600639820099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 -5.6011971086263657e-02</internalNodes>\n          <leafValues>\n            -5.8591067790985107e-01 1.9547510147094727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -1.4878909569233656e-03</internalNodes>\n          <leafValues>\n            2.8139349818229675e-01 -4.1853010654449463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 -1.4495699666440487e-02</internalNodes>\n          <leafValues>\n            -7.2273969650268555e-01 9.4288460910320282e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 -5.6178281083703041e-03</internalNodes>\n          <leafValues>\n            -5.9551960229873657e-01 1.5202650427818298e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>13</maxWeakCount>\n      <stageThreshold>-1.1907930374145508e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 17 -3.1839120201766491e-03</internalNodes>\n          <leafValues>\n            4.0025138854980469e-01 -6.8473160266876221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 3.5989920143038034e-03</internalNodes>\n          <leafValues>\n            -5.1895952224731445e-01 3.0101141333580017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 1.8804630264639854e-02</internalNodes>\n          <leafValues>\n            1.5554919838905334e-01 -8.0477172136306763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 5.2497140131890774e-03</internalNodes>\n          <leafValues>\n            1.3780809938907623e-01 -6.0767507553100586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 -1.4204799663275480e-03</internalNodes>\n          <leafValues>\n            3.2319429516792297e-01 -4.3407461047172546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 -2.5174349546432495e-02</internalNodes>\n          <leafValues>\n            -7.0780879259109497e-01 9.3106329441070557e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 3.2285219058394432e-03</internalNodes>\n          <leafValues>\n            -3.2510471343994141e-01 3.3571699261665344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 9.4993412494659424e-02</internalNodes>\n          <leafValues>\n            8.2439087331295013e-02 -8.7549537420272827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 -6.5919090993702412e-03</internalNodes>\n          <leafValues>\n            -7.3804199695587158e-01 1.3853749632835388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 -1.1146620381623507e-03</internalNodes>\n          <leafValues>\n            1.7917269468307495e-01 -2.7955859899520874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 1.3349019922316074e-02</internalNodes>\n          <leafValues>\n            1.3057829439640045e-01 -6.9802671670913696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -3.5181451588869095e-02</internalNodes>\n          <leafValues>\n            4.6535360813140869e-01 -1.0698779672384262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 3.1874589622020721e-02</internalNodes>\n          <leafValues>\n            -1.3565389811992645e-01 7.9047888517379761e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>19</maxWeakCount>\n      <stageThreshold>-1.3129220008850098e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 30 -1.0647430084645748e-02</internalNodes>\n          <leafValues>\n            3.8079029321670532e-01 -5.8672338724136353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 -7.3214493691921234e-02</internalNodes>\n          <leafValues>\n            -7.9550951719284058e-01 1.7223259806632996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 6.0464427806437016e-03</internalNodes>\n          <leafValues>\n            1.6532160341739655e-01 -6.9376647472381592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 7.3225022060796618e-04</internalNodes>\n          <leafValues>\n            -3.3247160911560059e-01 2.3669970035552979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -1.0990080423653126e-02</internalNodes>\n          <leafValues>\n            -6.9136887788772583e-01 2.1058270335197449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 -1.5282750246115029e-04</internalNodes>\n          <leafValues>\n            2.0305849611759186e-01 -4.6551659703254700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 2.4822261184453964e-04</internalNodes>\n          <leafValues>\n            -4.2122921347618103e-01 2.7335309982299805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 -8.4205856546759605e-03</internalNodes>\n          <leafValues>\n            -4.3744468688964844e-01 5.8831848204135895e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 -3.6992791295051575e-01</internalNodes>\n          <leafValues>\n            9.1070818901062012e-01 -8.7207540869712830e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 6.1259930953383446e-03</internalNodes>\n          <leafValues>\n            1.1886730045080185e-01 -1.8520170450210571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 -6.0144090093672276e-03</internalNodes>\n          <leafValues>\n            -6.3057059049606323e-01 1.4577180147171021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 8.5623031482100487e-03</internalNodes>\n          <leafValues>\n            -2.9369381070137024e-01 3.2411348819732666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 -1.3966850005090237e-02</internalNodes>\n          <leafValues>\n            -8.0650371313095093e-01 1.1267790198326111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 -4.1734468191862106e-02</internalNodes>\n          <leafValues>\n            7.7495330572128296e-01 -7.8866302967071533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 -2.7996799326501787e-04</internalNodes>\n          <leafValues>\n            2.7783310413360596e-01 -3.5196089744567871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 1.9588569179177284e-02</internalNodes>\n          <leafValues>\n            -6.5759636461734772e-02 5.2414137125015259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 9.2163113877177238e-03</internalNodes>\n          <leafValues>\n            -1.5525479614734650e-01 5.4835391044616699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 -2.1458569914102554e-02</internalNodes>\n          <leafValues>\n            -5.2255308628082275e-01 8.2208268344402313e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 3.6805770359933376e-03</internalNodes>\n          <leafValues>\n            -2.4434129893779755e-01 3.6122488975524902e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>23</maxWeakCount>\n      <stageThreshold>-1.3777279853820801e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 49 -8.3544738590717316e-03</internalNodes>\n          <leafValues>\n            2.8173181414604187e-01 -4.9728131294250488e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 -5.5724289268255234e-03</internalNodes>\n          <leafValues>\n            -6.5505301952362061e-01 1.9406059384346008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 -5.7714767754077911e-03</internalNodes>\n          <leafValues>\n            -6.2230938673019409e-01 2.7622398734092712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 2.2995889186859131e-02</internalNodes>\n          <leafValues>\n            1.9798569381237030e-02 -7.8324538469314575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 -1.1443760013207793e-03</internalNodes>\n          <leafValues>\n            2.8108718991279602e-01 -4.8214849829673767e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 -2.5917509198188782e-01</internalNodes>\n          <leafValues>\n            -6.8214958906173706e-01 -3.3729869755916297e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 -3.0133039690554142e-03</internalNodes>\n          <leafValues>\n            -6.5704411268234253e-01 1.3693599402904510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 5.4540671408176422e-03</internalNodes>\n          <leafValues>\n            8.6931817233562469e-02 -7.0567971467971802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 6.6230311058461666e-03</internalNodes>\n          <leafValues>\n            1.6634289920330048e-01 -5.1772958040237427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 -1.2561669573187828e-02</internalNodes>\n          <leafValues>\n            9.0290471911430359e-02 -1.6850970685482025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 4.2890738695859909e-02</internalNodes>\n          <leafValues>\n            1.2977810204029083e-01 -5.8218061923980713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 -1.3341030571609735e-03</internalNodes>\n          <leafValues>\n            1.3694329559803009e-01 -1.9437809288501740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 -4.1247460991144180e-02</internalNodes>\n          <leafValues>\n            6.8543851375579834e-01 -1.3039450347423553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 -9.1503392904996872e-03</internalNodes>\n          <leafValues>\n            -1.1895430088043213e-01 6.7576698958873749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 -1.7151240026578307e-03</internalNodes>\n          <leafValues>\n            2.6475539803504944e-01 -3.0487450957298279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 2.0843200385570526e-01</internalNodes>\n          <leafValues>\n            1.2401489913463593e-01 -4.7014111280441284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 7.2393968701362610e-02</internalNodes>\n          <leafValues>\n            9.6924379467964172e-02 -7.7347749471664429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 -1.5335980569943786e-03</internalNodes>\n          <leafValues>\n            1.7991219460964203e-01 -2.5788331031799316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 4.8640500754117966e-03</internalNodes>\n          <leafValues>\n            1.1392980068922043e-01 -5.5173867940902710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -1.6523050144314766e-03</internalNodes>\n          <leafValues>\n            1.5154689550399780e-01 -2.2901679575443268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 7.5348757207393646e-02</internalNodes>\n          <leafValues>\n            -1.4630889892578125e-01 6.8105882406234741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 -8.2630068063735962e-03</internalNodes>\n          <leafValues>\n            -7.2783601284027100e-01 1.0281019657850266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 -5.5124741047620773e-03</internalNodes>\n          <leafValues>\n            -6.3059347867965698e-01 9.3257799744606018e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>15</maxWeakCount>\n      <stageThreshold>-1.0618749856948853e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 72 -9.3849105760455132e-03</internalNodes>\n          <leafValues>\n            5.2500581741333008e-01 -4.3231061100959778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 -1.3772470410913229e-03</internalNodes>\n          <leafValues>\n            2.0698480308055878e-01 -4.2718759179115295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 2.6320109143853188e-02</internalNodes>\n          <leafValues>\n            1.5825170278549194e-01 -6.5509521961212158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 -4.5488759875297546e-02</internalNodes>\n          <leafValues>\n            -4.9510109424591064e-01 1.7998820543289185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 -4.7006201930344105e-03</internalNodes>\n          <leafValues>\n            3.3971160650253296e-01 -3.6917701363563538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 -1.3270860072225332e-03</internalNodes>\n          <leafValues>\n            3.0907860398292542e-01 -1.9771750271320343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 9.3802614137530327e-03</internalNodes>\n          <leafValues>\n            9.4488449394702911e-02 -7.3198097944259644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 4.3565612286329269e-03</internalNodes>\n          <leafValues>\n            1.1520200222730637e-01 -5.4008102416992188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 8.1178937107324600e-03</internalNodes>\n          <leafValues>\n            -1.5956309437751770e-01 5.3777867555618286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 -8.7829083204269409e-03</internalNodes>\n          <leafValues>\n            5.6634718179702759e-01 -1.3279379904270172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 2.1944850683212280e-02</internalNodes>\n          <leafValues>\n            1.5901289880275726e-01 -5.1751822233200073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 4.9510098993778229e-02</internalNodes>\n          <leafValues>\n            1.1067640036344528e-02 -4.9972468614578247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 -2.1175360307097435e-03</internalNodes>\n          <leafValues>\n            2.6490759849548340e-01 -2.4565629661083221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 1.0379469953477383e-02</internalNodes>\n          <leafValues>\n            1.2624099850654602e-01 -4.0877240896224976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 2.4977258872240782e-03</internalNodes>\n          <leafValues>\n            -1.9723020493984222e-01 3.8866749405860901e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>18</maxWeakCount>\n      <stageThreshold>-9.5461457967758179e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 87 -6.1489548534154892e-03</internalNodes>\n          <leafValues>\n            4.0187481045722961e-01 -5.2397370338439941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 5.0464540719985962e-02</internalNodes>\n          <leafValues>\n            1.3049679994583130e-01 -5.8651441335678101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 -5.5906269699335098e-02</internalNodes>\n          <leafValues>\n            -5.1229542493820190e-01 2.4392889440059662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 1.4281509816646576e-01</internalNodes>\n          <leafValues>\n            -1.5180160291492939e-02 -6.9593918323516846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 4.1162770241498947e-02</internalNodes>\n          <leafValues>\n            1.3673730194568634e-01 -6.4158838987350464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 -1.6468750312924385e-02</internalNodes>\n          <leafValues>\n            2.6339039206504822e-01 -2.2083680331707001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 2.4763140827417374e-02</internalNodes>\n          <leafValues>\n            1.0897739976644516e-01 -6.5213900804519653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 4.3008858337998390e-03</internalNodes>\n          <leafValues>\n            -1.8299630284309387e-01 4.3614229559898376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 3.4035290591418743e-03</internalNodes>\n          <leafValues>\n            -2.4363580346107483e-01 2.8224369883537292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 -2.2210620343685150e-02</internalNodes>\n          <leafValues>\n            -5.4645758867263794e-01 1.3542969524860382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -2.6968019083142281e-02</internalNodes>\n          <leafValues>\n            6.5300947427749634e-01 -1.4297309517860413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -3.4927908331155777e-02</internalNodes>\n          <leafValues>\n            -5.2346628904342651e-01 1.0084570199251175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 3.6263581365346909e-02</internalNodes>\n          <leafValues>\n            1.5110149979591370e-01 -5.4185849428176880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 -3.8526788353919983e-02</internalNodes>\n          <leafValues>\n            -8.6942279338836670e-01 3.7176769226789474e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 2.5399168953299522e-03</internalNodes>\n          <leafValues>\n            -2.6125881075859070e-01 2.7278441190719604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 -1.2931150384247303e-02</internalNodes>\n          <leafValues>\n            -4.9501579999923706e-01 9.1383516788482666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 1.1981350369751453e-02</internalNodes>\n          <leafValues>\n            -1.2059610337018967e-01 6.3848638534545898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 -7.4320413172245026e-02</internalNodes>\n          <leafValues>\n            4.6591779589653015e-01 -4.0265668183565140e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>14</maxWeakCount>\n      <stageThreshold>-1.1777880191802979e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 105 -6.9070039317011833e-03</internalNodes>\n          <leafValues>\n            4.3197679519653320e-01 -5.1717847585678101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 -8.1628039479255676e-03</internalNodes>\n          <leafValues>\n            2.7116540074348450e-01 -3.2803410291671753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 1.8852509558200836e-02</internalNodes>\n          <leafValues>\n            1.5548799932003021e-01 -5.5243927240371704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 3.4079391509294510e-02</internalNodes>\n          <leafValues>\n            1.5272259712219238e-01 -6.5318012237548828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 -3.2038250938057899e-03</internalNodes>\n          <leafValues>\n            3.4725460410118103e-01 -2.7734228968620300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 2.1410689223557711e-03</internalNodes>\n          <leafValues>\n            -6.8888276815414429e-02 2.4079489707946777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 1.4620450139045715e-01</internalNodes>\n          <leafValues>\n            1.5766879916191101e-01 -5.4515862464904785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 -6.2386798672378063e-03</internalNodes>\n          <leafValues>\n            3.2899579405784607e-01 -1.6970640420913696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 7.7623138204216957e-03</internalNodes>\n          <leafValues>\n            1.6352510452270508e-01 -5.1879328489303589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 3.7800080608576536e-03</internalNodes>\n          <leafValues>\n            -1.8464370071887970e-01 4.8660078644752502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 2.2303969599306583e-03</internalNodes>\n          <leafValues>\n            -1.7057199776172638e-01 4.7744798660278320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 2.4544890038669109e-03</internalNodes>\n          <leafValues>\n            -3.3550649881362915e-01 2.5369268655776978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 -2.1707419306039810e-02</internalNodes>\n          <leafValues>\n            -4.8321890830993652e-01 1.6075029969215393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 1.7421970143914223e-02</internalNodes>\n          <leafValues>\n            7.9877912998199463e-02 -7.5137257575988770e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>34</maxWeakCount>\n      <stageThreshold>-1.2834340333938599e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 119 8.8802073150873184e-03</internalNodes>\n          <leafValues>\n            -4.4682410359382629e-01 2.6062530279159546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 -3.0198058811947703e-04</internalNodes>\n          <leafValues>\n            1.5258400142192841e-01 -3.5206508636474609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 6.7998501472175121e-03</internalNodes>\n          <leafValues>\n            1.2259320169687271e-01 -6.8427437543869019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 2.7802670374512672e-03</internalNodes>\n          <leafValues>\n            -3.3681631088256836e-01 1.8518559634685516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 -1.1553820222616196e-02</internalNodes>\n          <leafValues>\n            -6.9871348142623901e-01 1.3079600036144257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 -2.6563290506601334e-02</internalNodes>\n          <leafValues>\n            -7.0277881622314453e-01 1.7791330814361572e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 -2.5158381322398782e-04</internalNodes>\n          <leafValues>\n            2.4779480695724487e-01 -3.9787930250167847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 3.5748310387134552e-02</internalNodes>\n          <leafValues>\n            -3.8043439388275146e-02 4.7976261377334595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -1.9973930902779102e-03</internalNodes>\n          <leafValues>\n            2.5774869322776794e-01 -3.1990098953247070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 -1.1007110029459000e-01</internalNodes>\n          <leafValues>\n            -4.9102869629859924e-01 2.3104630410671234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 -2.2225650027394295e-03</internalNodes>\n          <leafValues>\n            2.3825299739837646e-01 -2.8415530920028687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 -7.7874241396784782e-03</internalNodes>\n          <leafValues>\n            -3.8951370120048523e-01 5.5762890726327896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 5.6415859609842300e-02</internalNodes>\n          <leafValues>\n            -9.3521721661090851e-02 7.2561162710189819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 -3.5978010855615139e-03</internalNodes>\n          <leafValues>\n            1.9452190399169922e-01 -1.9651280343532562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 -7.2716898284852505e-03</internalNodes>\n          <leafValues>\n            3.4169870615005493e-01 -2.2851559519767761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 7.1941758506000042e-03</internalNodes>\n          <leafValues>\n            7.2148866951465607e-02 -4.5313501358032227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 -4.1034761816263199e-03</internalNodes>\n          <leafValues>\n            -5.1336747407913208e-01 1.3323569297790527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 -3.4210970625281334e-03</internalNodes>\n          <leafValues>\n            -4.2383781075477600e-01 8.4852807223796844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 4.1890922002494335e-03</internalNodes>\n          <leafValues>\n            -1.3398550450801849e-01 4.3749558925628662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 1.1827970156446099e-03</internalNodes>\n          <leafValues>\n            -2.9739010334014893e-01 2.2126840054988861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -4.1196551173925400e-02</internalNodes>\n          <leafValues>\n            -5.0735759735107422e-01 1.3243959844112396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 2.9593890067189932e-03</internalNodes>\n          <leafValues>\n            -1.4052620530128479e-01 6.1360880732536316e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 -5.0226859748363495e-03</internalNodes>\n          <leafValues>\n            -4.7495970129966736e-01 1.2069150060415268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 -1.5097860246896744e-02</internalNodes>\n          <leafValues>\n            2.7555391192436218e-01 -5.3780451416969299e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 -2.7190970256924629e-02</internalNodes>\n          <leafValues>\n            7.5995457172393799e-01 -7.4793189764022827e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 1.9893879070878029e-02</internalNodes>\n          <leafValues>\n            -6.7238640040159225e-03 7.3972767591476440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 7.7208830043673515e-03</internalNodes>\n          <leafValues>\n            9.3071162700653076e-02 -6.5780252218246460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -1.1565990280359983e-03</internalNodes>\n          <leafValues>\n            9.4645917415618896e-02 -1.6407909989356995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 2.6069190353155136e-03</internalNodes>\n          <leafValues>\n            -1.3877980411052704e-01 4.7349870204925537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 -5.3586110472679138e-02</internalNodes>\n          <leafValues>\n            -3.7349641323089600e-01 2.5728559121489525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 1.5184599906206131e-03</internalNodes>\n          <leafValues>\n            -2.2478710114955902e-01 2.3574599623680115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 -3.7061560899019241e-02</internalNodes>\n          <leafValues>\n            -6.1827117204666138e-01 8.2348063588142395e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 -2.6311799883842468e-02</internalNodes>\n          <leafValues>\n            -6.0057657957077026e-01 7.7768869698047638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 -8.7947428226470947e-02</internalNodes>\n          <leafValues>\n            3.8841038942337036e-01 -8.1545598804950714e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>20</maxWeakCount>\n      <stageThreshold>-1.2891789674758911e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 153 -2.9038030654191971e-02</internalNodes>\n          <leafValues>\n            5.0635957717895508e-01 -4.3462699651718140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 3.9044669829308987e-03</internalNodes>\n          <leafValues>\n            -1.9009789824485779e-01 5.1840317249298096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 2.9162769205868244e-03</internalNodes>\n          <leafValues>\n            -3.4351310133934021e-01 2.4016310274600983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 -8.9670084416866302e-03</internalNodes>\n          <leafValues>\n            -4.2667150497436523e-01 1.2316550314426422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -2.4935540277510881e-03</internalNodes>\n          <leafValues>\n            3.6086550354957581e-01 -1.8381460011005402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 -4.8912568017840385e-03</internalNodes>\n          <leafValues>\n            -6.4749848842620850e-01 1.0856709629297256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 -4.0970719419419765e-03</internalNodes>\n          <leafValues>\n            2.2143830358982086e-01 -3.1505578756332397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 4.3956499546766281e-02</internalNodes>\n          <leafValues>\n            -1.0780169814825058e-01 7.1893501281738281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 1.9277370302006602e-03</internalNodes>\n          <leafValues>\n            2.0247739553451538e-01 -4.0381088852882385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 9.4976946711540222e-03</internalNodes>\n          <leafValues>\n            4.3494019657373428e-02 -2.9908061027526855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 3.5389279946684837e-03</internalNodes>\n          <leafValues>\n            -1.5109489858150482e-01 5.1864242553710938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 -2.2064079530537128e-03</internalNodes>\n          <leafValues>\n            2.3006440699100494e-01 -3.3191001415252686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 3.9085410535335541e-03</internalNodes>\n          <leafValues>\n            -3.4253311157226562e-01 2.2951880097389221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 2.6973709464073181e-03</internalNodes>\n          <leafValues>\n            1.1976680159568787e-01 -3.5321989655494690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 -2.1321459207683802e-03</internalNodes>\n          <leafValues>\n            1.8206289410591125e-01 -2.8434100747108459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 2.6955150533467531e-03</internalNodes>\n          <leafValues>\n            7.4593842029571533e-02 -3.0896648764610291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 -6.0222679749131203e-03</internalNodes>\n          <leafValues>\n            1.8041500449180603e-01 -2.7531668543815613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 -8.9143458753824234e-03</internalNodes>\n          <leafValues>\n            2.4166099727153778e-01 -1.4506129920482635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 2.3474939167499542e-02</internalNodes>\n          <leafValues>\n            -1.2354619801044464e-01 6.5625041723251343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 -5.6602950207889080e-03</internalNodes>\n          <leafValues>\n            -3.3785250782966614e-01 1.1194559931755066e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>20</maxWeakCount>\n      <stageThreshold>-1.0202569961547852e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 173 -6.9699093699455261e-02</internalNodes>\n          <leafValues>\n            5.0786459445953369e-01 -4.7562688589096069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 2.1672779694199562e-02</internalNodes>\n          <leafValues>\n            -2.9134199023246765e-01 3.4561529755592346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 -4.7600260004401207e-03</internalNodes>\n          <leafValues>\n            3.6477440595626831e-01 -1.9551509618759155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 -4.6418169513344765e-03</internalNodes>\n          <leafValues>\n            -5.6445592641830444e-01 9.8486669361591339e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 -6.0006938874721527e-03</internalNodes>\n          <leafValues>\n            -6.3645982742309570e-01 1.4379170536994934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 1.9073469564318657e-02</internalNodes>\n          <leafValues>\n            -3.4218288958072662e-02 5.5043292045593262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 4.7993380576372147e-02</internalNodes>\n          <leafValues>\n            -8.5889510810375214e-02 7.6790231466293335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 -3.6511209327727556e-03</internalNodes>\n          <leafValues>\n            2.0186069607734680e-01 -2.9832679033279419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 -1.4485770370811224e-03</internalNodes>\n          <leafValues>\n            -5.1293247938156128e-01 1.3695690035820007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 -3.3748829737305641e-03</internalNodes>\n          <leafValues>\n            -4.0975129604339600e-01 1.1581440269947052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 2.3586750030517578e-03</internalNodes>\n          <leafValues>\n            1.7582429945468903e-01 -4.5439630746841431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 -2.2074829787015915e-02</internalNodes>\n          <leafValues>\n            4.6775639057159424e-01 -4.6358831226825714e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 7.0953248068690300e-03</internalNodes>\n          <leafValues>\n            -3.2100531458854675e-01 2.2119350731372833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 -2.0119780674576759e-03</internalNodes>\n          <leafValues>\n            5.4601740092039108e-02 -9.7853101789951324e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 4.9847508780658245e-03</internalNodes>\n          <leafValues>\n            -1.3063269853591919e-01 5.2815079689025879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -5.3485459648072720e-03</internalNodes>\n          <leafValues>\n            -4.2115539312362671e-01 1.1927159875631332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 2.5243330746889114e-03</internalNodes>\n          <leafValues>\n            1.2105660140514374e-01 -4.5177119970321655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 -2.4893151130527258e-03</internalNodes>\n          <leafValues>\n            1.2249600142240524e-01 -1.1200980097055435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 4.3740491382777691e-03</internalNodes>\n          <leafValues>\n            -1.0549320280551910e-01 6.0806149244308472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 -7.3214988224208355e-03</internalNodes>\n          <leafValues>\n            4.7615110874176025e-01 -6.8390920758247375e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>24</maxWeakCount>\n      <stageThreshold>-1.0336159467697144e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 193 -4.2286239564418793e-02</internalNodes>\n          <leafValues>\n            3.6749860644340515e-01 -4.3680980801582336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 3.8884699344635010e-02</internalNodes>\n          <leafValues>\n            -3.5438889265060425e-01 2.7009218931198120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 1.5983959892764688e-03</internalNodes>\n          <leafValues>\n            -3.2200628519058228e-01 2.5404900312423706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 3.9249849505722523e-03</internalNodes>\n          <leafValues>\n            1.6477300226688385e-01 -4.2043879628181458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 1.5850430354475975e-03</internalNodes>\n          <leafValues>\n            -2.5503370165824890e-01 3.1559389829635620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 -3.4282119013369083e-03</internalNodes>\n          <leafValues>\n            -4.0074288845062256e-01 1.1993350088596344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 -3.3538821153342724e-03</internalNodes>\n          <leafValues>\n            3.0459630489349365e-01 -2.2311030328273773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 -6.7664748057723045e-03</internalNodes>\n          <leafValues>\n            3.2396519184112549e-01 -9.2932380735874176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 -6.7180307814851403e-04</internalNodes>\n          <leafValues>\n            -3.2457518577575684e-01 2.1808999776840210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 2.8931829147040844e-03</internalNodes>\n          <leafValues>\n            1.2530609965324402e-01 -4.8582470417022705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 -3.3115309197455645e-03</internalNodes>\n          <leafValues>\n            4.0534108877182007e-01 -2.2432869672775269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 8.8509041815996170e-03</internalNodes>\n          <leafValues>\n            1.2155570089817047e-01 -6.0243481397628784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 5.4662628099322319e-03</internalNodes>\n          <leafValues>\n            -1.6978119313716888e-01 4.0752619504928589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 4.7559391707181931e-02</internalNodes>\n          <leafValues>\n            -8.1737041473388672e-02 6.9865119457244873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 3.1745019368827343e-03</internalNodes>\n          <leafValues>\n            1.7419810593128204e-01 -3.7237030267715454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 -5.1520839333534241e-03</internalNodes>\n          <leafValues>\n            2.7799358963966370e-01 -2.5311779975891113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 -4.8141111619770527e-03</internalNodes>\n          <leafValues>\n            -5.8466029167175293e-01 1.5894299745559692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 2.1967150270938873e-02</internalNodes>\n          <leafValues>\n            -1.0052759945392609e-01 4.7374871373176575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 -6.0128211043775082e-03</internalNodes>\n          <leafValues>\n            1.9820199906826019e-01 -4.2172819375991821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 4.5052049681544304e-03</internalNodes>\n          <leafValues>\n            1.7064809799194336e-02 -4.8947790265083313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 -1.3302109437063336e-03</internalNodes>\n          <leafValues>\n            1.8670339882373810e-01 -2.9437661170959473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 -7.3667510878294706e-04</internalNodes>\n          <leafValues>\n            -1.4788800477981567e-01 1.0121300071477890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 -1.4602739829570055e-03</internalNodes>\n          <leafValues>\n            -4.3107959628105164e-01 1.2479860335588455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 3.4185629338026047e-02</internalNodes>\n          <leafValues>\n            -5.7933650910854340e-02 5.4917758703231812e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>33</maxWeakCount>\n      <stageThreshold>-1.0450899600982666e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 217 3.0665110796689987e-02</internalNodes>\n          <leafValues>\n            -3.9953279495239258e-01 3.3617529273033142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 2.8893710114061832e-03</internalNodes>\n          <leafValues>\n            -3.8745269179344177e-01 3.0567520856857300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 -1.1876110220327973e-03</internalNodes>\n          <leafValues>\n            2.2150239348411560e-01 -2.9632321000099182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 4.0173018351197243e-03</internalNodes>\n          <leafValues>\n            1.3102529942989349e-01 -4.8803418874740601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 4.4870697893202305e-03</internalNodes>\n          <leafValues>\n            -3.3282509446144104e-01 1.6376070678234100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 3.2539520412683487e-02</internalNodes>\n          <leafValues>\n            -5.9164509177207947e-02 6.9953370094299316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 -8.9682880789041519e-03</internalNodes>\n          <leafValues>\n            -5.6289541721343994e-01 1.1756320297718048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 -6.1743397964164615e-04</internalNodes>\n          <leafValues>\n            1.5408250689506531e-01 -2.7350011467933655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 -3.1031211256049573e-04</internalNodes>\n          <leafValues>\n            1.8013550341129303e-01 -3.7572589516639709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 2.8775030747056007e-02</internalNodes>\n          <leafValues>\n            -3.4200929105281830e-02 2.7645361423492432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 -6.1647972324863076e-04</internalNodes>\n          <leafValues>\n            1.7953120172023773e-01 -3.5178318619728088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 2.1818219684064388e-03</internalNodes>\n          <leafValues>\n            -1.4532999694347382e-01 1.4900140464305878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 -2.4263889063149691e-03</internalNodes>\n          <leafValues>\n            -4.6981298923492432e-01 9.5262229442596436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 2.5438209995627403e-02</internalNodes>\n          <leafValues>\n            -2.1531460806727409e-02 3.3266928791999817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 7.9593079863116145e-04</internalNodes>\n          <leafValues>\n            1.2254969775676727e-01 -3.5679769515991211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 5.6763447355479002e-04</internalNodes>\n          <leafValues>\n            -1.3694189488887787e-01 1.0818839818239212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 8.7481308728456497e-03</internalNodes>\n          <leafValues>\n            -9.0849868953227997e-02 5.0112378597259521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 -4.7468831762671471e-03</internalNodes>\n          <leafValues>\n            1.1629249900579453e-01 -1.4651729725301266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 3.0644210055470467e-03</internalNodes>\n          <leafValues>\n            -2.2739639878273010e-01 2.7780678868293762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 3.1514191068708897e-03</internalNodes>\n          <leafValues>\n            3.5710681229829788e-02 -3.2296779751777649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 -3.8335900753736496e-03</internalNodes>\n          <leafValues>\n            -4.8395419120788574e-01 9.2689603567123413e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 -3.6972409579902887e-03</internalNodes>\n          <leafValues>\n            1.6351610422134399e-01 -1.4657320082187653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 6.7644561640918255e-03</internalNodes>\n          <leafValues>\n            8.0342940986156464e-02 -5.0272989273071289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 5.7455507339909673e-04</internalNodes>\n          <leafValues>\n            -1.9531010091304779e-01 1.2394949793815613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 1.0008309967815876e-02</internalNodes>\n          <leafValues>\n            -1.5030139684677124e-01 2.7990019321441650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 -7.2150952182710171e-03</internalNodes>\n          <leafValues>\n            1.6882060468196869e-01 -1.2279219925403595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 1.1310850270092487e-02</internalNodes>\n          <leafValues>\n            -9.6786908805370331e-02 6.4601618051528931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 1.0049899667501450e-01</internalNodes>\n          <leafValues>\n            2.0610159263014793e-02 -9.9988579750061035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 1.3250860385596752e-02</internalNodes>\n          <leafValues>\n            9.3147717416286469e-02 -4.8156800866127014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 -3.9085310697555542e-01</internalNodes>\n          <leafValues>\n            7.1057820320129395e-01 -1.6548840329051018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 2.4332199245691299e-02</internalNodes>\n          <leafValues>\n            1.4528210461139679e-01 -2.8366720676422119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 1.0354409459978342e-03</internalNodes>\n          <leafValues>\n            -2.0017370581626892e-01 1.8794250488281250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 -7.1747899055480957e-01</internalNodes>\n          <leafValues>\n            6.6637128591537476e-01 -5.2656259387731552e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>42</maxWeakCount>\n      <stageThreshold>-1.0599969625473022e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 250 1.9620559178292751e-03</internalNodes>\n          <leafValues>\n            -4.1077700257301331e-01 1.8896859884262085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 2.1331369876861572e-02</internalNodes>\n          <leafValues>\n            9.2599019408226013e-02 -3.9660450816154480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 -2.3037450388073921e-02</internalNodes>\n          <leafValues>\n            -7.2293937206268311e-01 9.6411719918251038e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 -5.0521228462457657e-02</internalNodes>\n          <leafValues>\n            1.8302009999752045e-01 -1.9482779502868652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 2.5330919772386551e-02</internalNodes>\n          <leafValues>\n            1.0334759950637817e-01 -5.8018290996551514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 -4.3120220652781427e-04</internalNodes>\n          <leafValues>\n            1.3374519348144531e-01 -2.1300980448722839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 -1.4295669643615838e-05</internalNodes>\n          <leafValues>\n            1.8420490622520447e-01 -3.0300238728523254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 -2.8645719867199659e-03</internalNodes>\n          <leafValues>\n            1.7371790111064911e-01 -2.1612820029258728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 1.0322510264813900e-02</internalNodes>\n          <leafValues>\n            1.1071330308914185e-01 -4.2402949929237366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 1.3879509642720222e-02</internalNodes>\n          <leafValues>\n            -1.0993299633264542e-01 5.5458897352218628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 -1.7010340234264731e-03</internalNodes>\n          <leafValues>\n            -3.1409528851509094e-01 1.5474779903888702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 -2.7375848731026053e-04</internalNodes>\n          <leafValues>\n            1.4674690365791321e-01 -1.2817619740962982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 3.9977379143238068e-02</internalNodes>\n          <leafValues>\n            -6.3540339469909668e-02 6.0685801506042480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 -1.2663399800658226e-02</internalNodes>\n          <leafValues>\n            1.0982260107994080e-01 -1.2707209587097168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 1.0186760127544403e-01</internalNodes>\n          <leafValues>\n            8.8505871593952179e-02 -5.7165622711181641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 -1.0695089586079121e-03</internalNodes>\n          <leafValues>\n            3.4594889730215073e-02 -9.9618308246135712e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 -3.4467370714992285e-03</internalNodes>\n          <leafValues>\n            2.2871519625186920e-01 -1.9664469361305237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 -1.2329400330781937e-01</internalNodes>\n          <leafValues>\n            -1.0825649648904800e-01 2.4728389456868172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 -5.8832589536905289e-02</internalNodes>\n          <leafValues>\n            5.5791580677032471e-01 -7.7630676329135895e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 9.7795920446515083e-03</internalNodes>\n          <leafValues>\n            9.4951488077640533e-02 -5.3767371177673340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 1.1116569861769676e-02</internalNodes>\n          <leafValues>\n            -8.9288607239723206e-02 4.6695429086685181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 -1.5398260205984116e-02</internalNodes>\n          <leafValues>\n            9.0432487428188324e-02 -1.2233799695968628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 5.8570769615471363e-03</internalNodes>\n          <leafValues>\n            1.0859709978103638e-01 -4.0961760282516479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 6.6174753010272980e-02</internalNodes>\n          <leafValues>\n            -4.4282642193138599e-03 -8.8055539131164551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 -1.0636489838361740e-02</internalNodes>\n          <leafValues>\n            -4.4541570544242859e-01 1.0953740030527115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 -3.1363599002361298e-02</internalNodes>\n          <leafValues>\n            8.0546891689300537e-01 -4.9883890897035599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 9.8021561279892921e-04</internalNodes>\n          <leafValues>\n            -2.3428329825401306e-01 1.6934409737586975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 5.3463829681277275e-03</internalNodes>\n          <leafValues>\n            -1.0729180276393890e-01 2.5447541475296021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 -5.1919990219175816e-03</internalNodes>\n          <leafValues>\n            -5.1496618986129761e-01 8.5118137300014496e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 1.8721649423241615e-02</internalNodes>\n          <leafValues>\n            -8.4052212536334991e-02 4.7836899757385254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 3.7875440903007984e-03</internalNodes>\n          <leafValues>\n            -2.3145659267902374e-01 1.6052989661693573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 6.8765478208661079e-03</internalNodes>\n          <leafValues>\n            9.6559382975101471e-02 -2.3832960426807404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 -5.4661519825458527e-03</internalNodes>\n          <leafValues>\n            -3.7871730327606201e-01 8.7851487100124359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 -1.5829449519515038e-02</internalNodes>\n          <leafValues>\n            5.2159512042999268e-01 -7.3916867375373840e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 1.2771990150213242e-02</internalNodes>\n          <leafValues>\n            1.0658729821443558e-01 -3.2850459218025208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 4.7000780701637268e-02</internalNodes>\n          <leafValues>\n            -2.9548000544309616e-02 4.8469349741935730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 1.1224800255149603e-03</internalNodes>\n          <leafValues>\n            -2.1395659446716309e-01 1.5407760441303253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -1.0136750061064959e-03</internalNodes>\n          <leafValues>\n            2.3574739694595337e-01 -1.4536799490451813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 5.2841319702565670e-03</internalNodes>\n          <leafValues>\n            8.0536216497421265e-02 -3.6417248845100403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -1.7608689144253731e-02</internalNodes>\n          <leafValues>\n            5.3858822584152222e-01 -3.5741850733757019e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 3.4710608422756195e-02</internalNodes>\n          <leafValues>\n            -4.3261460959911346e-02 7.7817600965499878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 1.6450349241495132e-02</internalNodes>\n          <leafValues>\n            4.1815090924501419e-02 -3.4912678599357605e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>45</maxWeakCount>\n      <stageThreshold>-1.0216469764709473e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 292 -1.7846419941633940e-03</internalNodes>\n          <leafValues>\n            2.2014810144901276e-01 -3.6912658810615540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 -6.1350408941507339e-04</internalNodes>\n          <leafValues>\n            -3.0695998668670654e-01 9.7717791795730591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 -2.5726810563355684e-03</internalNodes>\n          <leafValues>\n            -3.7789058685302734e-01 1.7042149603366852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 8.8661757763475180e-04</internalNodes>\n          <leafValues>\n            -3.7929078936576843e-01 9.3289971351623535e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 3.5716239362955093e-02</internalNodes>\n          <leafValues>\n            7.3169313371181488e-02 -6.1792898178100586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 3.5162840038537979e-02</internalNodes>\n          <leafValues>\n            -1.2328250333666801e-02 4.4894638657569885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 -5.8216741308569908e-03</internalNodes>\n          <leafValues>\n            -4.9501991271972656e-01 8.8005952537059784e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 -7.7909301035106182e-04</internalNodes>\n          <leafValues>\n            1.1154119670391083e-01 -2.8316551446914673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -6.8164491094648838e-03</internalNodes>\n          <leafValues>\n            1.8434180319309235e-01 -2.3727069795131683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 9.0218139812350273e-03</internalNodes>\n          <leafValues>\n            -5.3773559629917145e-02 2.6174989342689514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 -6.7481878213584423e-03</internalNodes>\n          <leafValues>\n            -5.0475108623504639e-01 7.6614417135715485e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 7.5771231204271317e-03</internalNodes>\n          <leafValues>\n            -1.1926110088825226e-01 3.4210419654846191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 -4.6335519291460514e-03</internalNodes>\n          <leafValues>\n            -4.9088281393051147e-01 6.9542020559310913e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 4.1346959769725800e-03</internalNodes>\n          <leafValues>\n            -8.1591427326202393e-02 4.7879660129547119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 -9.8444558680057526e-03</internalNodes>\n          <leafValues>\n            2.0124210417270660e-01 -2.3769280314445496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 -3.4897070378065109e-02</internalNodes>\n          <leafValues>\n            -9.1024678945541382e-01 1.8579540774226189e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 -3.5042490344494581e-04</internalNodes>\n          <leafValues>\n            1.2479469925165176e-01 -3.0717149376869202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 -9.4668623059988022e-03</internalNodes>\n          <leafValues>\n            1.1332949995994568e-01 -1.6115890443325043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 2.2053409367799759e-02</internalNodes>\n          <leafValues>\n            -7.9784400761127472e-02 6.0739010572433472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 -7.2947797889355570e-05</internalNodes>\n          <leafValues>\n            1.4449119567871094e-01 -1.3706150650978088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 -7.5134839862585068e-03</internalNodes>\n          <leafValues>\n            -3.0744421482086182e-01 1.0279080271720886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 1.0311939753592014e-02</internalNodes>\n          <leafValues>\n            -7.0246197283267975e-02 4.8307010531425476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 9.4670448452234268e-03</internalNodes>\n          <leafValues>\n            7.0281803607940674e-02 -4.7069519758224487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 -3.0116239562630653e-02</internalNodes>\n          <leafValues>\n            5.2378559112548828e-01 -3.7109669297933578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 -1.2667849659919739e-02</internalNodes>\n          <leafValues>\n            -6.0825890302658081e-01 5.0444670021533966e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 2.2987429983913898e-03</internalNodes>\n          <leafValues>\n            -1.1808679997920990e-01 1.7393890023231506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 2.5533209554851055e-03</internalNodes>\n          <leafValues>\n            -1.6625979542732239e-01 1.9768959283828735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 -3.3218199014663696e-01</internalNodes>\n          <leafValues>\n            -9.5407789945602417e-01 4.1291080415248871e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 5.4485369473695755e-03</internalNodes>\n          <leafValues>\n            -9.1220542788505554e-02 3.9834749698638916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 4.7633191570639610e-03</internalNodes>\n          <leafValues>\n            -1.2069889903068542e-01 1.6169339418411255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 4.4371229596436024e-03</internalNodes>\n          <leafValues>\n            8.5928186774253845e-02 -4.4427189230918884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 2.7019889093935490e-03</internalNodes>\n          <leafValues>\n            -1.9511219859123230e-01 7.1141660213470459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 -1.4219670556485653e-03</internalNodes>\n          <leafValues>\n            1.9089500606060028e-01 -1.8880489468574524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 -6.9531630724668503e-03</internalNodes>\n          <leafValues>\n            -2.6191520690917969e-01 7.7488146722316742e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 -2.6554360985755920e-01</internalNodes>\n          <leafValues>\n            4.7893580794334412e-01 -7.8830257058143616e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 5.4960828274488449e-03</internalNodes>\n          <leafValues>\n            6.4748808741569519e-02 -4.0898790955543518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 1.6060929745435715e-02</internalNodes>\n          <leafValues>\n            9.4868503510951996e-02 -3.5040768980979919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 -3.5279421135783195e-03</internalNodes>\n          <leafValues>\n            2.2704540193080902e-01 -1.5011039376258850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 1.5189720317721367e-02</internalNodes>\n          <leafValues>\n            -8.6033642292022705e-02 5.0375241041183472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 9.8117031157016754e-03</internalNodes>\n          <leafValues>\n            9.1945856809616089e-02 -2.7134710550308228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 -8.9835934340953827e-03</internalNodes>\n          <leafValues>\n            -3.5721930861473083e-01 1.1564330011606216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 2.5472430512309074e-02</internalNodes>\n          <leafValues>\n            -3.8861878216266632e-02 5.0707322359085083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 1.3594819465652108e-03</internalNodes>\n          <leafValues>\n            -1.5127420425415039e-01 2.3332439363002777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 1.4673129655420780e-02</internalNodes>\n          <leafValues>\n            7.6386481523513794e-02 -4.3126261234283447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 -2.1757239475846291e-02</internalNodes>\n          <leafValues>\n            6.0306608676910400e-01 -5.7926669716835022e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>49</maxWeakCount>\n      <stageThreshold>-1.0149190425872803e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 337 -1.9122850149869919e-02</internalNodes>\n          <leafValues>\n            2.1423059701919556e-01 -4.0178310871124268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 -4.0749661275185645e-04</internalNodes>\n          <leafValues>\n            1.0837800055742264e-01 -9.7847007215023041e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 1.8419560045003891e-02</internalNodes>\n          <leafValues>\n            9.4817012548446655e-02 -4.4825899600982666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 -3.0946850893087685e-04</internalNodes>\n          <leafValues>\n            1.1567220091819763e-01 -6.9291338324546814e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 2.4416830390691757e-02</internalNodes>\n          <leafValues>\n            -2.6403778791427612e-01 1.4588509500026703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 3.9483308792114258e-03</internalNodes>\n          <leafValues>\n            7.8703567385673523e-02 -3.9770650863647461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 1.5498059801757336e-02</internalNodes>\n          <leafValues>\n            -6.8623371422290802e-02 6.3598757982254028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 1.0397369973361492e-02</internalNodes>\n          <leafValues>\n            5.3116258233785629e-02 -2.4757599830627441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 1.0350650409236550e-03</internalNodes>\n          <leafValues>\n            -2.2953610122203827e-01 2.1623679995536804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 -6.9717521546408534e-04</internalNodes>\n          <leafValues>\n            1.6330949962139130e-01 -2.7930000424385071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 1.1055100476369262e-03</internalNodes>\n          <leafValues>\n            -2.6721170544624329e-01 1.3809490203857422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 1.8128760159015656e-02</internalNodes>\n          <leafValues>\n            7.8602522611618042e-02 -3.3748328685760498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 -1.4303029747679830e-03</internalNodes>\n          <leafValues>\n            1.5668049454689026e-01 -2.5422498583793640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 1.0650220327079296e-02</internalNodes>\n          <leafValues>\n            -4.1638601571321487e-02 3.2634070515632629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 -1.0680139530450106e-03</internalNodes>\n          <leafValues>\n            1.7996980249881744e-01 -2.0673060417175293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 -8.0095082521438599e-03</internalNodes>\n          <leafValues>\n            -2.8778979182243347e-01 7.5492449104785919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 -1.1857559904456139e-02</internalNodes>\n          <leafValues>\n            -5.5485212802886963e-01 4.7465000301599503e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 -1.9440150260925293e-01</internalNodes>\n          <leafValues>\n            4.9564599990844727e-01 -6.8522267043590546e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 1.2786169536411762e-02</internalNodes>\n          <leafValues>\n            -5.8201011270284653e-02 5.1194858551025391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 1.1360739590600133e-03</internalNodes>\n          <leafValues>\n            -2.1216529607772827e-01 1.4639540016651154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 -3.7541511119343340e-04</internalNodes>\n          <leafValues>\n            1.1406060308218002e-01 -2.7936661243438721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 6.2142009846866131e-03</internalNodes>\n          <leafValues>\n            2.8568789362907410e-02 -3.2485058903694153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 4.5166439376771450e-03</internalNodes>\n          <leafValues>\n            -9.5556378364562988e-02 3.6032339930534363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 -1.7354219453409314e-03</internalNodes>\n          <leafValues>\n            -8.0804876983165741e-02 5.3851570934057236e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 -6.9608418270945549e-03</internalNodes>\n          <leafValues>\n            -6.0131508111953735e-01 4.5509491115808487e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 8.7833311408758163e-03</internalNodes>\n          <leafValues>\n            -9.4497971236705780e-02 3.1924161314964294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 -2.0243569742888212e-03</internalNodes>\n          <leafValues>\n            2.6737558841705322e-01 -1.1679279804229736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 5.6362948380410671e-03</internalNodes>\n          <leafValues>\n            4.6491090208292007e-02 -2.3982259631156921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 -2.1751220338046551e-03</internalNodes>\n          <leafValues>\n            -3.1831741333007812e-01 1.1634550243616104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 2.5424890220165253e-02</internalNodes>\n          <leafValues>\n            7.5600057840347290e-02 -3.7359631061553955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 3.9950129576027393e-04</internalNodes>\n          <leafValues>\n            -2.6206868886947632e-01 1.4345559477806091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -3.9724060334265232e-03</internalNodes>\n          <leafValues>\n            2.0395089685916901e-01 -1.1896310001611710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 2.4637179449200630e-03</internalNodes>\n          <leafValues>\n            -1.3687339425086975e-01 3.4098258614540100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 1.4397709630429745e-02</internalNodes>\n          <leafValues>\n            2.4846889078617096e-02 -6.5415948629379272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 -1.4848919818177819e-05</internalNodes>\n          <leafValues>\n            1.3884930312633514e-01 -2.1077479422092438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 -3.8339510560035706e-02</internalNodes>\n          <leafValues>\n            5.8668392896652222e-01 -3.6245860159397125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 -5.4605712648481131e-04</internalNodes>\n          <leafValues>\n            2.1259330213069916e-01 -1.3791069388389587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 1.3036499731242657e-02</internalNodes>\n          <leafValues>\n            5.0619971007108688e-02 -2.3150099813938141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 -2.4273560848087072e-03</internalNodes>\n          <leafValues>\n            2.4302999675273895e-01 -1.1315950006246567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 -6.3351681455969810e-03</internalNodes>\n          <leafValues>\n            -3.5549488663673401e-01 9.4948403537273407e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -5.7510860264301300e-02</internalNodes>\n          <leafValues>\n            4.9378138780593872e-01 -6.0664121061563492e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 6.8376341369003057e-04</internalNodes>\n          <leafValues>\n            -1.9417250156402588e-01 1.4234590530395508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 8.8113872334361076e-03</internalNodes>\n          <leafValues>\n            4.7562059015035629e-02 -5.8416491746902466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 1.0788169689476490e-02</internalNodes>\n          <leafValues>\n            -4.6855889260768890e-02 1.6548010706901550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 -1.3571690069511533e-03</internalNodes>\n          <leafValues>\n            -3.2510679960250854e-01 9.4090476632118225e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 -1.0195979848504066e-02</internalNodes>\n          <leafValues>\n            -1.4696849882602692e-01 2.6246059685945511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 -1.2560819741338491e-03</internalNodes>\n          <leafValues>\n            2.2853380441665649e-01 -1.6265660524368286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 6.6750420955941081e-04</internalNodes>\n          <leafValues>\n            -1.3430669903755188e-01 1.3987569510936737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 2.0975170191377401e-03</internalNodes>\n          <leafValues>\n            -1.2987610697746277e-01 1.9978469610214233e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>53</maxWeakCount>\n      <stageThreshold>-9.3152678012847900e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 386 -3.6917610559612513e-03</internalNodes>\n          <leafValues>\n            2.2682790458202362e-01 -4.1167381405830383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 -9.4609148800373077e-03</internalNodes>\n          <leafValues>\n            1.6305020451545715e-01 -2.2949010133743286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 3.3874800428748131e-03</internalNodes>\n          <leafValues>\n            7.7644690871238708e-02 -4.7465118765830994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 3.3596849534660578e-03</internalNodes>\n          <leafValues>\n            -1.4722810685634613e-01 1.3755659759044647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 -2.2649099119007587e-03</internalNodes>\n          <leafValues>\n            -2.9027861356735229e-01 1.2261869758367538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 -5.5420072749257088e-04</internalNodes>\n          <leafValues>\n            1.1591990292072296e-01 -2.3066529631614685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 1.9706019666045904e-03</internalNodes>\n          <leafValues>\n            1.1808300018310547e-01 -3.7879431247711182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 1.7503080889582634e-02</internalNodes>\n          <leafValues>\n            -9.4161599874496460e-02 4.7933238744735718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 -2.9575270600616932e-03</internalNodes>\n          <leafValues>\n            1.7336699366569519e-01 -3.1673321127891541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 -2.6238700747489929e-01</internalNodes>\n          <leafValues>\n            -7.4405288696289062e-01 8.9512793347239494e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 5.5493800900876522e-03</internalNodes>\n          <leafValues>\n            -2.4088740348815918e-01 1.4212040603160858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 -1.4842569828033447e-02</internalNodes>\n          <leafValues>\n            5.5166311562061310e-02 -8.5363000631332397e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 -1.8193490803241730e-02</internalNodes>\n          <leafValues>\n            -7.5389099121093750e-01 4.4062498956918716e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 -1.9381130114197731e-03</internalNodes>\n          <leafValues>\n            1.4762139320373535e-01 -1.4214770495891571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 -6.1375028453767300e-03</internalNodes>\n          <leafValues>\n            -5.4175209999084473e-01 5.2872691303491592e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 1.6630079597234726e-02</internalNodes>\n          <leafValues>\n            -6.0005810111761093e-02 5.2294141054153442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 -9.7470665350556374e-03</internalNodes>\n          <leafValues>\n            -3.1776770949363708e-01 9.4077728688716888e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 -3.9159679412841797e-01</internalNodes>\n          <leafValues>\n            5.1550501585006714e-01 -8.6178213357925415e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 1.0457860305905342e-02</internalNodes>\n          <leafValues>\n            -5.4442230612039566e-02 5.5086338520050049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 9.2479586601257324e-02</internalNodes>\n          <leafValues>\n            9.5865959301590919e-03 -7.5205242633819580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 -1.3383329845964909e-02</internalNodes>\n          <leafValues>\n            -2.5909280776977539e-01 1.2255199998617172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 -1.9297929480671883e-02</internalNodes>\n          <leafValues>\n            -1.8686549365520477e-01 4.2670380324125290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 -1.1118740076199174e-03</internalNodes>\n          <leafValues>\n            1.4586099982261658e-01 -2.2742809355258942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 2.3209059610962868e-02</internalNodes>\n          <leafValues>\n            2.1769199520349503e-02 -2.4001930654048920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 6.9435071200132370e-03</internalNodes>\n          <leafValues>\n            -8.4814570844173431e-02 3.8388100266456604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 -1.0249669849872589e-01</internalNodes>\n          <leafValues>\n            -7.0618611574172974e-01 1.2580949813127518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 -1.4036430045962334e-02</internalNodes>\n          <leafValues>\n            -3.8427880406379700e-01 8.7678723037242889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 6.8071340210735798e-03</internalNodes>\n          <leafValues>\n            -7.5941346585750580e-02 7.6014332473278046e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 4.8163239844143391e-03</internalNodes>\n          <leafValues>\n            -1.6402910649776459e-01 2.0124110579490662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 -3.0274710152298212e-03</internalNodes>\n          <leafValues>\n            -2.8118729591369629e-01 6.8671241402626038e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 -1.6530510038137436e-03</internalNodes>\n          <leafValues>\n            2.1427379548549652e-01 -1.3038359582424164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 -3.9757499471306801e-03</internalNodes>\n          <leafValues>\n            -2.3737999796867371e-01 5.1290549337863922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 6.9589749909937382e-03</internalNodes>\n          <leafValues>\n            -1.3246279954910278e-01 2.3703409731388092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 7.2270620148628950e-04</internalNodes>\n          <leafValues>\n            5.0478070974349976e-02 -1.3544809818267822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 1.5057729557156563e-02</internalNodes>\n          <leafValues>\n            -6.6954463720321655e-02 4.5368999242782593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 6.5838429145514965e-03</internalNodes>\n          <leafValues>\n            3.9054669439792633e-02 -1.9516509771347046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 -2.9128929600119591e-03</internalNodes>\n          <leafValues>\n            1.7604969441890717e-01 -1.5639689564704895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 6.4386397600173950e-01</internalNodes>\n          <leafValues>\n            -1.1777699925005436e-02 1.0000569820404053e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 5.1160277798771858e-03</internalNodes>\n          <leafValues>\n            9.5464669167995453e-02 -3.7832370400428772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 6.8325497210025787e-02</internalNodes>\n          <leafValues>\n            -3.9297499461099505e-04 -9.9986249208450317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 4.4071719050407410e-02</internalNodes>\n          <leafValues>\n            2.8716549277305603e-02 -9.0306490659713745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 -1.5712520107626915e-02</internalNodes>\n          <leafValues>\n            2.4888029694557190e-01 -5.3066261112689972e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 -3.9486829191446304e-03</internalNodes>\n          <leafValues>\n            -5.0214129686355591e-01 5.2089609205722809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 1.1841469677165151e-03</internalNodes>\n          <leafValues>\n            6.2122888863086700e-02 -1.6479890048503876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 -1.1385709792375565e-01</internalNodes>\n          <leafValues>\n            5.6728571653366089e-01 -3.8864318281412125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 6.2493737787008286e-03</internalNodes>\n          <leafValues>\n            8.7858140468597412e-02 -2.8675949573516846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 -2.3781529162079096e-03</internalNodes>\n          <leafValues>\n            2.6684141159057617e-01 -9.3291386961936951e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -6.3620522618293762e-02</internalNodes>\n          <leafValues>\n            1.5153369307518005e-01 -1.5354029834270477e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 7.9275481402873993e-03</internalNodes>\n          <leafValues>\n            8.8268518447875977e-02 -3.1872791051864624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 1.0556660126894712e-03</internalNodes>\n          <leafValues>\n            -1.0226110368967056e-01 6.0546699911355972e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 9.1879200190305710e-03</internalNodes>\n          <leafValues>\n            8.0963402986526489e-02 -3.5031539201736450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 3.9727380499243736e-03</internalNodes>\n          <leafValues>\n            -1.0334850102663040e-01 2.7450188994407654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 1.7149309860542417e-03</internalNodes>\n          <leafValues>\n            -1.2329679727554321e-01 2.1561819314956665e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>55</maxWeakCount>\n      <stageThreshold>-9.3984860181808472e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 439 -1.4547890052199364e-02</internalNodes>\n          <leafValues>\n            -5.7042872905731201e-01 1.0164090245962143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 -1.2570459512062371e-04</internalNodes>\n          <leafValues>\n            7.7566891908645630e-02 -2.9524150490760803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 9.4022490084171295e-03</internalNodes>\n          <leafValues>\n            -3.2618519663810730e-01 1.3688039779663086e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 -5.1469001919031143e-03</internalNodes>\n          <leafValues>\n            -2.2486360371112823e-01 1.4886389672756195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 -3.1212199246510863e-04</internalNodes>\n          <leafValues>\n            1.1287149786949158e-01 -3.2888731360435486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 1.8742609769105911e-02</internalNodes>\n          <leafValues>\n            -1.8080070614814758e-02 3.0115321278572083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 2.9675778932869434e-03</internalNodes>\n          <leafValues>\n            -2.5948849320411682e-01 1.3308060169219971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 -3.0295079573988914e-02</internalNodes>\n          <leafValues>\n            -6.0041320323944092e-01 3.3516548573970795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 6.4835487864911556e-03</internalNodes>\n          <leafValues>\n            -7.7768087387084961e-02 4.6268320083618164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 2.2889559622853994e-03</internalNodes>\n          <leafValues>\n            6.0411829501390457e-02 -1.7498730123043060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 -1.6078320331871510e-03</internalNodes>\n          <leafValues>\n            -2.9557180404663086e-01 1.5449790656566620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -2.3348669707775116e-01</internalNodes>\n          <leafValues>\n            -6.3751947879791260e-01 1.3748309575021267e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 5.8999718166887760e-03</internalNodes>\n          <leafValues>\n            1.2713789939880371e-01 -3.2689490914344788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 1.2073719874024391e-02</internalNodes>\n          <leafValues>\n            1.6614260151982307e-02 -2.2707170248031616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 -5.6356011191383004e-04</internalNodes>\n          <leafValues>\n            1.6879190504550934e-01 -1.9605310261249542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 1.7435080371797085e-03</internalNodes>\n          <leafValues>\n            -1.3831000030040741e-01 2.2103509306907654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 6.6066621802747250e-03</internalNodes>\n          <leafValues>\n            4.4354528188705444e-02 -6.7365241050720215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 -5.9419698081910610e-03</internalNodes>\n          <leafValues>\n            1.7569009959697723e-01 -1.3697220385074615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 4.9261527601629496e-04</internalNodes>\n          <leafValues>\n            -2.1035130321979523e-01 1.3241830468177795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 -3.6582869943231344e-03</internalNodes>\n          <leafValues>\n            1.5420369803905487e-01 -1.0563220083713531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 -1.4477679505944252e-03</internalNodes>\n          <leafValues>\n            -2.8920960426330566e-01 1.4950390160083771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 -1.0310580255463719e-03</internalNodes>\n          <leafValues>\n            8.8572971522808075e-02 -9.0375833213329315e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 3.2927519641816616e-03</internalNodes>\n          <leafValues>\n            -1.1087729781866074e-01 3.0003741383552551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 -1.6668019816279411e-03</internalNodes>\n          <leafValues>\n            -6.2054108828306198e-02 2.2652259469032288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 1.3452100101858377e-03</internalNodes>\n          <leafValues>\n            9.2012971639633179e-02 -3.5944160819053650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 -1.4981569722294807e-02</internalNodes>\n          <leafValues>\n            3.6636090278625488e-01 -6.4556807279586792e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 6.2536462210118771e-03</internalNodes>\n          <leafValues>\n            6.9381363689899445e-02 -4.1023838520050049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 5.0937399268150330e-02</internalNodes>\n          <leafValues>\n            1.7869930714368820e-02 -6.0524070262908936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 1.0756580159068108e-03</internalNodes>\n          <leafValues>\n            -2.3777949810028076e-01 1.4223319292068481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 -4.1086040437221527e-03</internalNodes>\n          <leafValues>\n            1.4915379881858826e-01 -1.9213069975376129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 -1.3338520191609859e-02</internalNodes>\n          <leafValues>\n            -4.9711030721664429e-01 6.5755158662796021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 3.1997971236705780e-02</internalNodes>\n          <leafValues>\n            -6.4927592873573303e-02 6.6577041149139404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 -4.9686059355735779e-02</internalNodes>\n          <leafValues>\n            5.0676888227462769e-01 -6.4676910638809204e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 6.0286428779363632e-03</internalNodes>\n          <leafValues>\n            8.8214896619319916e-02 -2.7923619747161865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 -6.9053061306476593e-03</internalNodes>\n          <leafValues>\n            -6.1452347040176392e-01 3.5631489008665085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 5.8130919933319092e-03</internalNodes>\n          <leafValues>\n            -9.3653626739978790e-02 9.9817357957363129e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 -1.1030419729650021e-02</internalNodes>\n          <leafValues>\n            4.5798170566558838e-01 -6.5124973654747009e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 -1.5703570097684860e-03</internalNodes>\n          <leafValues>\n            4.7113660722970963e-02 -1.3347460329532623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 4.6482901088893414e-03</internalNodes>\n          <leafValues>\n            7.3932677507400513e-02 -4.2145860195159912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 5.0479872152209282e-04</internalNodes>\n          <leafValues>\n            -2.0517270267009735e-01 9.5128253102302551e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 2.6125760748982430e-02</internalNodes>\n          <leafValues>\n            -6.8816967308521271e-02 4.2644789814949036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 6.4811189658939838e-03</internalNodes>\n          <leafValues>\n            1.1302389949560165e-01 -4.7021061182022095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 -4.5484181493520737e-02</internalNodes>\n          <leafValues>\n            5.4101467132568359e-01 -5.6804839521646500e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 6.8956136703491211e-02</internalNodes>\n          <leafValues>\n            3.4444119781255722e-02 -1.7411549389362335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 -2.0358948968350887e-03</internalNodes>\n          <leafValues>\n            1.3366940617561340e-01 -2.0985920727252960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 1.4390050200745463e-03</internalNodes>\n          <leafValues>\n            -1.6449619829654694e-01 9.8886348307132721e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 3.0180480331182480e-02</internalNodes>\n          <leafValues>\n            8.7635383009910583e-02 -3.9464119076728821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 -3.8663588929921389e-03</internalNodes>\n          <leafValues>\n            1.5964619815349579e-01 -1.1840829998254776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 1.0753490030765533e-02</internalNodes>\n          <leafValues>\n            -5.7142060250043869e-02 5.0125277042388916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 1.0978150181472301e-02</internalNodes>\n          <leafValues>\n            3.5985160619020462e-02 -3.8646480441093445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 -7.8152219066396356e-04</internalNodes>\n          <leafValues>\n            1.8248090147972107e-01 -1.6435949504375458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 -6.9936108775436878e-03</internalNodes>\n          <leafValues>\n            -2.6556238532066345e-01 9.4436101615428925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 2.3125730454921722e-02</internalNodes>\n          <leafValues>\n            -5.9101939201354980e-02 5.7359057664871216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 -1.7055520787835121e-02</internalNodes>\n          <leafValues>\n            -5.4567247629165649e-01 2.7153130620718002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 1.5192289836704731e-02</internalNodes>\n          <leafValues>\n            9.2580981552600861e-02 -2.9735139012336731e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>53</maxWeakCount>\n      <stageThreshold>-8.2538652420043945e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 494 -2.1589139476418495e-02</internalNodes>\n          <leafValues>\n            3.3779260516166687e-01 -2.6725459098815918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 6.3885431736707687e-03</internalNodes>\n          <leafValues>\n            -2.6759129762649536e-01 2.1438689529895782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 -2.4394609499722719e-03</internalNodes>\n          <leafValues>\n            1.8841089308261871e-01 -2.3495130240917206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 3.9824391715228558e-03</internalNodes>\n          <leafValues>\n            4.6689908951520920e-02 -1.7984829843044281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 -3.1252959161065519e-04</internalNodes>\n          <leafValues>\n            1.7267709970474243e-01 -1.8782779574394226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 3.3181109465658665e-03</internalNodes>\n          <leafValues>\n            1.2081120163202286e-01 -3.2373869419097900e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 -7.0711369626224041e-03</internalNodes>\n          <leafValues>\n            -2.7498379349708557e-01 1.3868269324302673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 4.4392608106136322e-03</internalNodes>\n          <leafValues>\n            -2.2279019653797150e-01 1.7155140638351440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 2.1352670155465603e-03</internalNodes>\n          <leafValues>\n            -1.1322859674692154e-01 2.8428959846496582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -4.0205409750342369e-03</internalNodes>\n          <leafValues>\n            -2.4542550742626190e-01 9.4957500696182251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 -6.5228617750108242e-03</internalNodes>\n          <leafValues>\n            3.2106789946556091e-01 -9.7372367978096008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 4.4146090658614412e-05</internalNodes>\n          <leafValues>\n            -1.5269330143928528e-01 8.5128836333751678e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 4.7606039792299271e-02</internalNodes>\n          <leafValues>\n            7.9339757561683655e-02 -2.9599419236183167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 4.0928661823272705e-02</internalNodes>\n          <leafValues>\n            -3.5142261534929276e-02 3.7593579292297363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 -1.1161889880895615e-02</internalNodes>\n          <leafValues>\n            -2.6747810840606689e-01 8.9181788265705109e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 -2.9888451099395752e-01</internalNodes>\n          <leafValues>\n            4.8014399409294128e-01 -7.2485052049160004e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 1.1514360085129738e-02</internalNodes>\n          <leafValues>\n            -5.9218250215053558e-02 4.0962639451026917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 -2.6182739529758692e-03</internalNodes>\n          <leafValues>\n            -1.8478739261627197e-01 3.9801560342311859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 -1.2829460320062935e-04</internalNodes>\n          <leafValues>\n            1.0710919648408890e-01 -2.4155279994010925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 -6.9328160025179386e-03</internalNodes>\n          <leafValues>\n            -2.9845720529556274e-01 4.5657958835363388e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 -6.3937888480722904e-03</internalNodes>\n          <leafValues>\n            1.8363510072231293e-01 -1.4049419760704041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 4.1702711023390293e-03</internalNodes>\n          <leafValues>\n            -5.1890019327402115e-02 1.0211580246686935e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 1.0390999726951122e-02</internalNodes>\n          <leafValues>\n            -1.3426989316940308e-01 1.9137309491634369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 1.3004739768803120e-02</internalNodes>\n          <leafValues>\n            -4.5922718942165375e-02 3.0526930093765259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 -4.0645021945238113e-03</internalNodes>\n          <leafValues>\n            -4.8477160930633545e-01 6.9338463246822357e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 -3.7050418904982507e-04</internalNodes>\n          <leafValues>\n            1.0090719908475876e-01 -6.8911276757717133e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 8.8882551062852144e-04</internalNodes>\n          <leafValues>\n            -1.6742789745330811e-01 1.8965889513492584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 -4.8583559691905975e-03</internalNodes>\n          <leafValues>\n            -4.0789389610290527e-01 5.1483351737260818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 4.4327960349619389e-03</internalNodes>\n          <leafValues>\n            -1.4262509346008301e-01 1.8987190723419189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 2.0999709144234657e-02</internalNodes>\n          <leafValues>\n            9.2153772711753845e-02 -3.0773550271987915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 -2.2740170825272799e-03</internalNodes>\n          <leafValues>\n            1.5176279842853546e-01 -1.6528700292110443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 -1.5075540170073509e-02</internalNodes>\n          <leafValues>\n            -3.1039240956306458e-01 6.5696939826011658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 9.5290662720799446e-03</internalNodes>\n          <leafValues>\n            -6.7693017423152924e-02 4.0692031383514404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 1.2057139538228512e-03</internalNodes>\n          <leafValues>\n            4.3188188225030899e-02 -1.8454369902610779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 -2.4757070466876030e-02</internalNodes>\n          <leafValues>\n            6.6890978813171387e-01 -3.4418709576129913e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 3.0408669263124466e-03</internalNodes>\n          <leafValues>\n            -1.3256159424781799e-01 9.5131039619445801e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 -1.5181970084086061e-03</internalNodes>\n          <leafValues>\n            1.2939499318599701e-01 -1.8558539450168610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 -2.4845359846949577e-02</internalNodes>\n          <leafValues>\n            -7.3013377189636230e-01 9.4545418396592140e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 -8.1413304433226585e-03</internalNodes>\n          <leafValues>\n            1.1521799862384796e-01 -1.9038149714469910e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 -4.2350329458713531e-03</internalNodes>\n          <leafValues>\n            7.2733633220195770e-02 -1.0841889679431915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 9.9135711789131165e-03</internalNodes>\n          <leafValues>\n            -8.4218956530094147e-02 4.7613239288330078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 -2.7879870031028986e-03</internalNodes>\n          <leafValues>\n            -1.2846939265727997e-01 6.5720662474632263e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 2.6451589073985815e-03</internalNodes>\n          <leafValues>\n            8.9269757270812988e-02 -2.6216679811477661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 -2.6683490723371506e-02</internalNodes>\n          <leafValues>\n            8.9870773255825043e-02 -9.6914090216159821e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 3.1197380740195513e-03</internalNodes>\n          <leafValues>\n            -1.1731740087270737e-01 2.2004860639572144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 -2.3388290405273438e-01</internalNodes>\n          <leafValues>\n            -9.0905857086181641e-01 5.6871720589697361e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 1.0922820307314396e-02</internalNodes>\n          <leafValues>\n            8.5061840713024139e-02 -3.0725648999214172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 9.4858808442950249e-03</internalNodes>\n          <leafValues>\n            -2.2317569702863693e-02 3.3745709061622620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 -5.1413412438705564e-04</internalNodes>\n          <leafValues>\n            1.4860659837722778e-01 -1.5598359704017639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 6.5561588853597641e-03</internalNodes>\n          <leafValues>\n            6.6693432629108429e-02 -2.9945740103721619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 9.8293996416032314e-04</internalNodes>\n          <leafValues>\n            -1.9923539459705353e-01 1.4816479384899139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 -1.8866109894588590e-03</internalNodes>\n          <leafValues>\n            8.6462371051311493e-02 -1.6101740300655365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 2.7264489326626062e-03</internalNodes>\n          <leafValues>\n            -8.2049086689949036e-02 3.8679501414299011e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>60</maxWeakCount>\n      <stageThreshold>-8.3464938402175903e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 547 -1.2602520175278187e-02</internalNodes>\n          <leafValues>\n            2.2423070669174194e-01 -3.3462178707122803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 2.5659699458628893e-03</internalNodes>\n          <leafValues>\n            8.5756540298461914e-02 -3.2376360893249512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 -1.2003120500594378e-03</internalNodes>\n          <leafValues>\n            1.4650370180606842e-01 -3.0306750535964966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 4.7978968359529972e-03</internalNodes>\n          <leafValues>\n            -2.4725909531116486e-01 5.2705809473991394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 -5.9380318270996213e-04</internalNodes>\n          <leafValues>\n            -1.8883049488067627e-01 1.5490350127220154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 8.1017091870307922e-03</internalNodes>\n          <leafValues>\n            1.0764879733324051e-01 -2.4738930165767670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 -6.8427261430770159e-04</internalNodes>\n          <leafValues>\n            1.8282850086688995e-01 -1.6550099849700928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 4.5279348269104958e-03</internalNodes>\n          <leafValues>\n            -5.5668760091066360e-02 4.1382691264152527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 3.8289420772343874e-03</internalNodes>\n          <leafValues>\n            -2.2222219407558441e-01 1.5282329916954041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -6.2229200266301632e-03</internalNodes>\n          <leafValues>\n            -3.2351690530776978e-01 6.8372547626495361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 -6.1763478443026543e-03</internalNodes>\n          <leafValues>\n            -3.9912268519401550e-01 7.7707469463348389e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 -8.7820261716842651e-02</internalNodes>\n          <leafValues>\n            5.8577078580856323e-01 -5.3584650158882141e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 -6.8017458543181419e-03</internalNodes>\n          <leafValues>\n            -4.3307110667228699e-01 6.2693849205970764e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 1.0741569567471743e-03</internalNodes>\n          <leafValues>\n            -1.1966490000486374e-01 5.5397849529981613e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 561 -3.0490919947624207e-02</internalNodes>\n          <leafValues>\n            -2.3663240671157837e-01 1.0002999752759933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 5.1879119127988815e-02</internalNodes>\n          <leafValues>\n            -3.6418840289115906e-02 7.3392897844314575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 8.6805049795657396e-04</internalNodes>\n          <leafValues>\n            -1.7705479264259338e-01 1.4985239505767822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 4.8424140550196171e-03</internalNodes>\n          <leafValues>\n            -4.6208251267671585e-02 1.3162529468536377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 9.1674225404858589e-03</internalNodes>\n          <leafValues>\n            9.9181063473224640e-02 -2.0292450487613678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 -5.6356228888034821e-03</internalNodes>\n          <leafValues>\n            8.7860167026519775e-02 -3.7438090890645981e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 -3.8375150412321091e-02</internalNodes>\n          <leafValues>\n            4.9721479415893555e-01 -4.3815169483423233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 8.9894384145736694e-03</internalNodes>\n          <leafValues>\n            9.4126552343368530e-02 -3.0227750539779663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 -1.1650560190901160e-04</internalNodes>\n          <leafValues>\n            1.3361050188541412e-01 -1.8932069838047028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 -6.6462112590670586e-04</internalNodes>\n          <leafValues>\n            7.7972702682018280e-02 -1.3508260250091553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 -1.2656490318477154e-02</internalNodes>\n          <leafValues>\n            -3.6913019418716431e-01 6.4613893628120422e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 -4.3929531238973141e-03</internalNodes>\n          <leafValues>\n            2.6696819067001343e-01 -8.8650099933147430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 -1.2583639472723007e-03</internalNodes>\n          <leafValues>\n            2.0614829659461975e-01 -1.0952439904212952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 -1.1131940409541130e-02</internalNodes>\n          <leafValues>\n            -4.1352048516273499e-01 6.2840126454830170e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 3.0703889206051826e-03</internalNodes>\n          <leafValues>\n            -1.5591779351234436e-01 1.5018209815025330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 3.5361549817025661e-03</internalNodes>\n          <leafValues>\n            6.2573492527008057e-02 -2.1869969367980957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 2.8864629566669464e-02</internalNodes>\n          <leafValues>\n            -6.9561749696731567e-02 4.4892778992652893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 -7.1035906672477722e-02</internalNodes>\n          <leafValues>\n            2.0991979539394379e-01 -3.6562878638505936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 -1.1107679456472397e-03</internalNodes>\n          <leafValues>\n            -3.3020168542861938e-01 7.9758942127227783e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 7.9184047877788544e-02</internalNodes>\n          <leafValues>\n            -1.3226009905338287e-02 3.8603660464286804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 1.3353509828448296e-02</internalNodes>\n          <leafValues>\n            5.8410558849573135e-02 -3.9250770211219788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 5.0049051642417908e-02</internalNodes>\n          <leafValues>\n            -2.3318229243159294e-02 7.4593770503997803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 -2.1859000623226166e-01</internalNodes>\n          <leafValues>\n            -8.4585267305374146e-01 2.5940530002117157e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 1.0064110159873962e-02</internalNodes>\n          <leafValues>\n            -1.0959850251674652e-01 2.1068529784679413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 7.5430879369378090e-03</internalNodes>\n          <leafValues>\n            5.3567539900541306e-02 -3.3617278933525085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 1.5817210078239441e-02</internalNodes>\n          <leafValues>\n            -1.9042259082198143e-02 2.2196899354457855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 -1.7135319649241865e-04</internalNodes>\n          <leafValues>\n            1.7667369544506073e-01 -1.2068530172109604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 6.6670849919319153e-03</internalNodes>\n          <leafValues>\n            7.0071838796138763e-02 -2.2137600183486938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 2.7946738991886377e-03</internalNodes>\n          <leafValues>\n            -1.0509230196475983e-01 1.9277399778366089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 -1.5057970304042101e-03</internalNodes>\n          <leafValues>\n            6.0012888163328171e-02 -1.2378510087728500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 8.5329543799161911e-03</internalNodes>\n          <leafValues>\n            -4.7611240297555923e-02 3.9985141158103943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 4.2939469218254089e-02</internalNodes>\n          <leafValues>\n            3.1611390411853790e-02 -1.9731660187244415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 2.0308220759034157e-02</internalNodes>\n          <leafValues>\n            3.5055190324783325e-02 -5.1969397068023682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 -7.7673741616308689e-03</internalNodes>\n          <leafValues>\n            -1.8817919492721558e-01 5.6889228522777557e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 2.1762759424746037e-03</internalNodes>\n          <leafValues>\n            -9.0948157012462616e-02 2.4575869739055634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 596 -1.9813690334558487e-02</internalNodes>\n          <leafValues>\n            5.2904421091079712e-01 -3.8754951208829880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 1.3035159558057785e-02</internalNodes>\n          <leafValues>\n            6.7918822169303894e-02 -3.0413469672203064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 -1.9664920400828123e-03</internalNodes>\n          <leafValues>\n            -2.0626169443130493e-01 9.6140593290328979e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 -2.6359891053289175e-03</internalNodes>\n          <leafValues>\n            2.5085249543190002e-01 -8.3200961351394653e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 -2.2968810517340899e-03</internalNodes>\n          <leafValues>\n            2.9634681344032288e-01 -5.8743689209222794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 -3.8644939195364714e-03</internalNodes>\n          <leafValues>\n            1.9411550462245941e-01 -1.0827559977769852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 4.4517841160995886e-05</internalNodes>\n          <leafValues>\n            -2.4451869726181030e-01 1.0293029993772507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 1.9567341078072786e-03</internalNodes>\n          <leafValues>\n            -1.0519249737262726e-01 2.2499999403953552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 1.4188109897077084e-02</internalNodes>\n          <leafValues>\n            3.2100718468427658e-02 -5.9142422676086426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 -1.3274629600346088e-04</internalNodes>\n          <leafValues>\n            7.4577853083610535e-02 -2.7654591202735901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 2.0996380597352982e-02</internalNodes>\n          <leafValues>\n            -4.5735489577054977e-02 3.2947731018066406e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>68</maxWeakCount>\n      <stageThreshold>-7.0352667570114136e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 607 -3.9841078221797943e-02</internalNodes>\n          <leafValues>\n            1.5186519920825958e-01 -2.9055249691009521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 1.1327869724482298e-03</internalNodes>\n          <leafValues>\n            -1.1921630054712296e-01 1.2098889797925949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 1.0022070491686463e-03</internalNodes>\n          <leafValues>\n            1.2088630348443985e-01 -2.5621330738067627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 6.3866227865219116e-02</internalNodes>\n          <leafValues>\n            4.7628100961446762e-02 -8.6150348186492920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 -3.0986019410192966e-03</internalNodes>\n          <leafValues>\n            -3.1975808739662170e-01 9.1434687376022339e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 6.5784230828285217e-03</internalNodes>\n          <leafValues>\n            -8.0473050475120544e-02 3.6123031377792358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 4.5082601718604565e-03</internalNodes>\n          <leafValues>\n            -1.8215750157833099e-01 1.4672499895095825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 -1.6526240855455399e-02</internalNodes>\n          <leafValues>\n            -1.2954659759998322e-01 6.6522419452667236e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 -4.1868099942803383e-03</internalNodes>\n          <leafValues>\n            -2.6552608609199524e-01 1.1237680166959763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 5.6613027118146420e-04</internalNodes>\n          <leafValues>\n            1.1822649836540222e-01 -1.6119679808616638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 2.0279800519347191e-03</internalNodes>\n          <leafValues>\n            -2.2618439793586731e-01 1.1263699829578400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 -1.1969150044023991e-02</internalNodes>\n          <leafValues>\n            -2.7523440122604370e-01 8.3603866398334503e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 -2.8411731123924255e-01</internalNodes>\n          <leafValues>\n            4.0216109156608582e-01 -7.7971749007701874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 -3.6587871145457029e-03</internalNodes>\n          <leafValues>\n            -2.9723858833312988e-01 6.3484713435173035e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 9.2046172358095646e-04</internalNodes>\n          <leafValues>\n            7.7872820198535919e-02 -2.9539081454277039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 1.3571759685873985e-02</internalNodes>\n          <leafValues>\n            -7.2430767118930817e-02 3.4849750995635986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 -3.1399999279528856e-03</internalNodes>\n          <leafValues>\n            -2.2088779509067535e-01 1.0072159767150879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 6.9894008338451385e-03</internalNodes>\n          <leafValues>\n            5.9188209474086761e-02 -1.4137220382690430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 -5.9609091840684414e-04</internalNodes>\n          <leafValues>\n            1.3563929498195648e-01 -1.5081329643726349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 1.6805849736556411e-03</internalNodes>\n          <leafValues>\n            -7.8348256647586823e-02 7.7357366681098938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 -5.7250040117651224e-04</internalNodes>\n          <leafValues>\n            2.3572799563407898e-01 -1.1594360321760178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 4.3474160134792328e-02</internalNodes>\n          <leafValues>\n            8.2836961373686790e-03 -3.7428310513496399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 6.0316640883684158e-04</internalNodes>\n          <leafValues>\n            -1.7846900224685669e-01 1.6185760498046875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 2.6881720870733261e-02</internalNodes>\n          <leafValues>\n            7.2419442236423492e-02 -1.7971959710121155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 -4.9273878335952759e-02</internalNodes>\n          <leafValues>\n            4.6386399865150452e-01 -5.0276938825845718e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 -6.7225202918052673e-02</internalNodes>\n          <leafValues>\n            -1. 1.3532400131225586e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 2.0203770697116852e-01</internalNodes>\n          <leafValues>\n            -3.8748100399971008e-02 5.7211977243423462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 3.1489748507738113e-02</internalNodes>\n          <leafValues>\n            4.5488908886909485e-02 -1.2539370357990265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 -5.7097017997875810e-04</internalNodes>\n          <leafValues>\n            1.9619710743427277e-01 -1.0944739729166031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 -7.8234989196062088e-03</internalNodes>\n          <leafValues>\n            6.7954361438751221e-02 -7.2075963020324707e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 -2.1555390208959579e-02</internalNodes>\n          <leafValues>\n            -2.8890660405158997e-01 9.9806018173694611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 -8.3767198026180267e-02</internalNodes>\n          <leafValues>\n            -4.3685078620910645e-01 1.0792650282382965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 -3.5752300173044205e-03</internalNodes>\n          <leafValues>\n            1.1191669851541519e-01 -1.9461460411548615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 1.2265419587492943e-02</internalNodes>\n          <leafValues>\n            -6.5728217363357544e-02 3.2739359140396118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 2.8762801084667444e-03</internalNodes>\n          <leafValues>\n            -1.8723809719085693e-01 1.1246989667415619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 7.4190571904182434e-03</internalNodes>\n          <leafValues>\n            5.1525920629501343e-02 -2.6615419983863831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 -4.9716630019247532e-03</internalNodes>\n          <leafValues>\n            1.5384270250797272e-01 -1.5141449868679047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 2.0294899120926857e-02</internalNodes>\n          <leafValues>\n            -1.9532799720764160e-02 3.0571049451828003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 1.3469019904732704e-02</internalNodes>\n          <leafValues>\n            6.2345318496227264e-02 -3.6343741416931152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 6.8610929884016514e-03</internalNodes>\n          <leafValues>\n            -6.2487348914146423e-02 2.8820911049842834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 -5.9594889171421528e-04</internalNodes>\n          <leafValues>\n            8.5537739098072052e-02 -2.4081380665302277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 -4.0149871259927750e-02</internalNodes>\n          <leafValues>\n            -1. 1.5480610309168696e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 -2.7885669842362404e-03</internalNodes>\n          <leafValues>\n            -2.2338689863681793e-01 1.1001159995794296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 -7.9318676143884659e-03</internalNodes>\n          <leafValues>\n            1.3043269515037537e-01 -2.8859179466962814e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 -2.9607459509861656e-05</internalNodes>\n          <leafValues>\n            1.1876039952039719e-01 -1.7018820345401764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 2.6092668995261192e-03</internalNodes>\n          <leafValues>\n            -6.9877780973911285e-02 1.5036509931087494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 -4.5970208942890167e-02</internalNodes>\n          <leafValues>\n            5.6322151422500610e-01 -3.6318130791187286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 9.0047682169824839e-04</internalNodes>\n          <leafValues>\n            3.2461058348417282e-02 -1.8973889946937561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 -5.1712408661842346e-02</internalNodes>\n          <leafValues>\n            -8.5045510530471802e-01 2.0679740235209465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 -1.4172409474849701e-01</internalNodes>\n          <leafValues>\n            -9.1004508733749390e-01 3.8531969767063856e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 -6.9771192967891693e-02</internalNodes>\n          <leafValues>\n            4.2144781351089478e-01 -5.5162269622087479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 -7.5836889445781708e-03</internalNodes>\n          <leafValues>\n            -4.2189291119575500e-01 6.1964530497789383e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 -1.2404819717630744e-03</internalNodes>\n          <leafValues>\n            1.7558629810810089e-01 -1.3540640473365784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 1.0614699684083462e-02</internalNodes>\n          <leafValues>\n            4.5083239674568176e-02 -2.5765570998191833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 1.7647630302235484e-03</internalNodes>\n          <leafValues>\n            -1.1009249836206436e-01 2.4041210114955902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 3.7170480936765671e-03</internalNodes>\n          <leafValues>\n            -7.6920822262763977e-02 2.0119519531726837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 1.5280679799616337e-02</internalNodes>\n          <leafValues>\n            5.8605119585990906e-02 -3.6220121383666992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 -8.1635616719722748e-02</internalNodes>\n          <leafValues>\n            5.2819788455963135e-01 -4.3608970940113068e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 -2.4431939236819744e-03</internalNodes>\n          <leafValues>\n            -2.4369360506534576e-01 8.4384277462959290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 -1.2289900332689285e-03</internalNodes>\n          <leafValues>\n            1.0332729667425156e-01 -9.7442328929901123e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 6.9271848769858479e-04</internalNodes>\n          <leafValues>\n            -1.1367750167846680e-01 1.6121849417686462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 9.9380649626255035e-03</internalNodes>\n          <leafValues>\n            5.2774678915739059e-02 -1.5222820639610291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 -1.8377749249339104e-02</internalNodes>\n          <leafValues>\n            4.6800789237022400e-01 -4.2411230504512787e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 -3.0569550581276417e-03</internalNodes>\n          <leafValues>\n            1.2866629660129547e-01 -9.8308563232421875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 -1.8440110143274069e-03</internalNodes>\n          <leafValues>\n            -2.7592489123344421e-01 1.0050299763679504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 5.6205368600785732e-03</internalNodes>\n          <leafValues>\n            -7.0716217160224915e-02 1.6734069585800171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 3.4157470799982548e-03</internalNodes>\n          <leafValues>\n            5.2378088235855103e-02 -5.0982749462127686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 -3.0376210343092680e-03</internalNodes>\n          <leafValues>\n            1.4243629574775696e-01 -6.3037060201168060e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>67</maxWeakCount>\n      <stageThreshold>-7.4644768238067627e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 675 1.0126640088856220e-02</internalNodes>\n          <leafValues>\n            -2.1863789856433868e-01 1.7513489723205566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 -2.6893198955804110e-03</internalNodes>\n          <leafValues>\n            -3.2822969555854797e-01 9.9838256835937500e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 -1.5573530457913876e-02</internalNodes>\n          <leafValues>\n            1.9594019651412964e-01 -2.2535979747772217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 678 4.9326270818710327e-03</internalNodes>\n          <leafValues>\n            4.9988470971584320e-02 -5.3175377845764160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 -7.6638202881440520e-04</internalNodes>\n          <leafValues>\n            -2.6926669478416443e-01 1.1751429736614227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 -1.2552300177048892e-04</internalNodes>\n          <leafValues>\n            6.9110788404941559e-02 -8.1727392971515656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 -1.4519299838866573e-05</internalNodes>\n          <leafValues>\n            1.1483950167894363e-01 -2.3017129302024841e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 -1.6113840043544769e-02</internalNodes>\n          <leafValues>\n            5.0956588983535767e-01 -3.7494029849767685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 5.5138790048658848e-03</internalNodes>\n          <leafValues>\n            -7.8787550330162048e-02 2.3771439492702484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 8.7763823568820953e-02</internalNodes>\n          <leafValues>\n            1.3863979838788509e-02 -8.9777380228042603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 -1.2825570069253445e-02</internalNodes>\n          <leafValues>\n            -3.9504998922348022e-01 5.5546328425407410e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 8.2099979044869542e-04</internalNodes>\n          <leafValues>\n            -1.2663979828357697e-01 1.9081629812717438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 -1.2775770155712962e-03</internalNodes>\n          <leafValues>\n            1.1065080016851425e-01 -1.9801099598407745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 -2.5229719281196594e-01</internalNodes>\n          <leafValues>\n            -8.1039828062057495e-01 8.3870543166995049e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 7.0347747532650828e-04</internalNodes>\n          <leafValues>\n            -2.1380549669265747e-01 9.8673596978187561e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 1.0717480443418026e-02</internalNodes>\n          <leafValues>\n            8.4470443427562714e-02 -2.6063749194145203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 5.1081487908959389e-03</internalNodes>\n          <leafValues>\n            -5.5732220411300659e-02 4.1447860002517700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 -1.9006159156560898e-02</internalNodes>\n          <leafValues>\n            -3.7475249171257019e-01 7.9524833709001541e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 1.1136929970234632e-03</internalNodes>\n          <leafValues>\n            -2.2650149464607239e-01 1.0789389908313751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 1.1141769587993622e-02</internalNodes>\n          <leafValues>\n            -4.2054798454046249e-02 1.3697710633277893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 1.2054879916831851e-03</internalNodes>\n          <leafValues>\n            9.2105977237224579e-02 -2.3083679378032684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 -2.0797130127903074e-04</internalNodes>\n          <leafValues>\n            8.4210596978664398e-02 -6.6967681050300598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 -1.6412649303674698e-02</internalNodes>\n          <leafValues>\n            4.2269191145896912e-01 -4.9638699740171432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 7.0363390259444714e-03</internalNodes>\n          <leafValues>\n            9.0550661087036133e-02 -2.7322870492935181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 699 -8.4774550050497055e-03</internalNodes>\n          <leafValues>\n            -1.9004869461059570e-01 1.0416539758443832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 -8.7799631059169769e-02</internalNodes>\n          <leafValues>\n            -1. 4.5551471412181854e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 -4.6731110662221909e-02</internalNodes>\n          <leafValues>\n            4.1607761383056641e-01 -6.7924611270427704e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 7.4915830045938492e-03</internalNodes>\n          <leafValues>\n            4.7516189515590668e-02 -4.4306200742721558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 8.6966790258884430e-03</internalNodes>\n          <leafValues>\n            -3.9423149079084396e-02 5.2188277244567871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 -6.4137862063944340e-03</internalNodes>\n          <leafValues>\n            -2.4749429523944855e-01 1.1350250244140625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 6.4909840002655983e-03</internalNodes>\n          <leafValues>\n            -2.0237590372562408e-01 1.1887309700250626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 1.1677639558911324e-03</internalNodes>\n          <leafValues>\n            -9.8187439143657684e-02 1.4470459520816803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 8.0650653690099716e-03</internalNodes>\n          <leafValues>\n            3.0806429684162140e-02 -5.7410538196563721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 -6.1450549401342869e-03</internalNodes>\n          <leafValues>\n            1.4213280379772186e-01 -1.2155479937791824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 3.3926900941878557e-03</internalNodes>\n          <leafValues>\n            -6.9425463676452637e-02 3.7945500016212463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 2.5861251354217529e-01</internalNodes>\n          <leafValues>\n            -8.0964984372258186e-03 5.7324391603469849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 711 4.6327650547027588e-02</internalNodes>\n          <leafValues>\n            9.3428269028663635e-02 -2.9274320602416992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 -1.4053919585421681e-05</internalNodes>\n          <leafValues>\n            5.9584300965070724e-02 -1.2193849682807922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 -5.5521689355373383e-03</internalNodes>\n          <leafValues>\n            -3.0268138647079468e-01 7.9481996595859528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 -7.1974180638790131e-02</internalNodes>\n          <leafValues>\n            5.9862488508224487e-01 -3.2414238899946213e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 -1.1097419774159789e-03</internalNodes>\n          <leafValues>\n            -2.2289000451564789e-01 9.4809576869010925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 1.1012280359864235e-02</internalNodes>\n          <leafValues>\n            -5.0954710692167282e-02 2.1996709704399109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 -1.0663530230522156e-01</internalNodes>\n          <leafValues>\n            -7.8257107734680176e-01 2.3075709119439125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 2.6826610788702965e-02</internalNodes>\n          <leafValues>\n            -3.3334378153085709e-02 3.2825571298599243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 1.6480779275298119e-02</internalNodes>\n          <leafValues>\n            2.4793079122900963e-02 -7.9102367162704468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 1.4533529756590724e-03</internalNodes>\n          <leafValues>\n            -4.7377821058034897e-02 1.8299889564514160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 4.6536721289157867e-02</internalNodes>\n          <leafValues>\n            -4.2217779904603958e-02 4.7201961278915405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 1.3604049570858479e-02</internalNodes>\n          <leafValues>\n            7.1543172001838684e-02 -2.8175559639930725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 2.9868748970329762e-03</internalNodes>\n          <leafValues>\n            -1.2019319832324982e-01 1.5165250003337860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 7.5455583631992340e-02</internalNodes>\n          <leafValues>\n            7.6729329302906990e-03 -3.7560600042343140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 -2.1207109093666077e-03</internalNodes>\n          <leafValues>\n            1.1624389886856079e-01 -1.5187309682369232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 4.6092201955616474e-03</internalNodes>\n          <leafValues>\n            5.2315160632133484e-02 -2.3050600290298462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 1.0207670275121927e-03</internalNodes>\n          <leafValues>\n            -1.1380010098218918e-01 1.7626440525054932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 6.2532532028853893e-03</internalNodes>\n          <leafValues>\n            6.1674360185861588e-02 -3.4915238618850708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 2.8322400525212288e-02</internalNodes>\n          <leafValues>\n            -3.9958149194717407e-02 5.2392977476119995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 -1.6342360526323318e-02</internalNodes>\n          <leafValues>\n            -1.2563559412956238e-01 4.0041740983724594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -1.8282469827681780e-03</internalNodes>\n          <leafValues>\n            9.1135032474994659e-02 -1.9224719703197479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 4.4616919010877609e-02</internalNodes>\n          <leafValues>\n            -1.7582910135388374e-02 3.0281931161880493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 3.5677649429999292e-04</internalNodes>\n          <leafValues>\n            -8.7897412478923798e-02 2.2339150309562683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 -4.5413200859911740e-04</internalNodes>\n          <leafValues>\n            6.5522827208042145e-02 -9.9679380655288696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 1.5353029593825340e-03</internalNodes>\n          <leafValues>\n            6.8590000271797180e-02 -2.9728370904922485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 2.1600390318781137e-03</internalNodes>\n          <leafValues>\n            -8.9736528694629669e-02 8.0284543335437775e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 -5.9745612088590860e-04</internalNodes>\n          <leafValues>\n            2.1873860061168671e-01 -1.1398520320653915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 -1.2356050312519073e-02</internalNodes>\n          <leafValues>\n            -2.9350760579109192e-01 6.4420320093631744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 -3.2670930027961731e-01</internalNodes>\n          <leafValues>\n            3.8920149207115173e-01 -4.9165409058332443e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 8.7828626856207848e-03</internalNodes>\n          <leafValues>\n            8.6186192929744720e-02 -2.2631849348545074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 3.3569689840078354e-03</internalNodes>\n          <leafValues>\n            -9.1194286942481995e-02 2.1264100074768066e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>75</maxWeakCount>\n      <stageThreshold>-7.8030252456665039e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 742 -1.5290499664843082e-02</internalNodes>\n          <leafValues>\n            1.6011320054531097e-01 -2.1511940658092499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 -5.9956451877951622e-03</internalNodes>\n          <leafValues>\n            -1.8299789726734161e-01 3.7886500358581543e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 6.2301359139382839e-04</internalNodes>\n          <leafValues>\n            -1.2199199944734573e-01 2.1163250505924225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 745 5.8087380602955818e-04</internalNodes>\n          <leafValues>\n            -2.2747389972209930e-01 7.6958037912845612e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 -2.8277048841118813e-03</internalNodes>\n          <leafValues>\n            2.7597460150718689e-01 -7.8942306339740753e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 2.1096320822834969e-02</internalNodes>\n          <leafValues>\n            4.1295919567346573e-02 -3.2933080196380615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 -2.2117430344223976e-03</internalNodes>\n          <leafValues>\n            2.4672569334506989e-01 -7.3121666908264160e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 -2.3275949060916901e-03</internalNodes>\n          <leafValues>\n            -2.2825109958648682e-01 7.9285196959972382e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 -4.4754869304597378e-03</internalNodes>\n          <leafValues>\n            1.1744049936532974e-01 -1.9801409542560577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 -2.5716619566082954e-03</internalNodes>\n          <leafValues>\n            3.7658710032701492e-02 -1.2148059904575348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 1.5387970488518476e-03</internalNodes>\n          <leafValues>\n            -5.5973250418901443e-02 3.6923429369926453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 -3.3066518604755402e-02</internalNodes>\n          <leafValues>\n            3.9160001277923584e-01 -7.7862940728664398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 -8.5727721452713013e-02</internalNodes>\n          <leafValues>\n            -2.5174748897552490e-01 1.3543550670146942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 -7.0333289913833141e-03</internalNodes>\n          <leafValues>\n            1.3328710198402405e-01 -1.5664640069007874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 -6.8310517235659063e-05</internalNodes>\n          <leafValues>\n            9.9454201757907867e-02 -2.3412980139255524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 -6.0546118766069412e-04</internalNodes>\n          <leafValues>\n            -1.7742669582366943e-01 1.0017810016870499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 -2.2480569314211607e-03</internalNodes>\n          <leafValues>\n            -3.6424639821052551e-01 5.3501259535551071e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 -1.5090550296008587e-03</internalNodes>\n          <leafValues>\n            7.7575050294399261e-02 -9.4920717179775238e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 -5.8666180848376825e-05</internalNodes>\n          <leafValues>\n            1.2585939466953278e-01 -1.4529819786548615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 3.5532109905034304e-03</internalNodes>\n          <leafValues>\n            -9.8626613616943359e-02 7.4326246976852417e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 -1.4601859729737043e-03</internalNodes>\n          <leafValues>\n            -3.3026841282844543e-01 6.3813462853431702e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 -2.3586049792356789e-04</internalNodes>\n          <leafValues>\n            1.0846760123968124e-01 -1.0571049898862839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 1.4756060205399990e-02</internalNodes>\n          <leafValues>\n            -5.9472840279340744e-02 3.7792891263961792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 -1.6795310378074646e-01</internalNodes>\n          <leafValues>\n            -6.6773468255996704e-01 1.7404930666089058e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 3.2017670571804047e-02</internalNodes>\n          <leafValues>\n            -2.3720450699329376e-01 9.6205927431583405e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 -6.1111792456358671e-04</internalNodes>\n          <leafValues>\n            1.3566890358924866e-01 -6.8121932446956635e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 -1.1586040258407593e-02</internalNodes>\n          <leafValues>\n            -2.9761460423469543e-01 6.4853250980377197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 -1.1290679685771465e-03</internalNodes>\n          <leafValues>\n            1.3520470261573792e-01 -9.0693503618240356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 1.8352170009166002e-03</internalNodes>\n          <leafValues>\n            -9.6694603562355042e-02 1.8725989758968353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 -2.7584248781204224e-01</internalNodes>\n          <leafValues>\n            2.7460220456123352e-01 -1.6176709905266762e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 -5.2487280219793320e-02</internalNodes>\n          <leafValues>\n            -2.6295030117034912e-01 8.4279276430606842e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 -2.8409080579876900e-02</internalNodes>\n          <leafValues>\n            4.4033178687095642e-01 -4.6736340969800949e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 1.2234229594469070e-02</internalNodes>\n          <leafValues>\n            7.1391902863979340e-02 -2.9463478922843933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 3.7752088159322739e-02</internalNodes>\n          <leafValues>\n            -3.2507140189409256e-02 6.2293910980224609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 -1.3006339780986309e-02</internalNodes>\n          <leafValues>\n            -3.5619509220123291e-01 5.7085920125246048e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 -3.7061918992549181e-03</internalNodes>\n          <leafValues>\n            1.7485049366950989e-01 -1.0506869852542877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 -4.8177209682762623e-03</internalNodes>\n          <leafValues>\n            1.4761090278625488e-01 -1.3700130581855774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 -3.0726719647645950e-02</internalNodes>\n          <leafValues>\n            -2.1432609856128693e-01 3.4535329788923264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 780 1.0044399648904800e-02</internalNodes>\n          <leafValues>\n            8.2472868263721466e-02 -2.1329440176486969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 3.3808979787863791e-04</internalNodes>\n          <leafValues>\n            -5.6368399411439896e-02 8.4050692617893219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 -3.4935539588332176e-04</internalNodes>\n          <leafValues>\n            1.5510140359401703e-01 -1.5465189516544342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 8.5416442016139627e-04</internalNodes>\n          <leafValues>\n            7.4811212718486786e-02 -2.0761939883232117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 -7.4278831016272306e-04</internalNodes>\n          <leafValues>\n            2.0695370435714722e-01 -1.1315040290355682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 -4.1803911328315735e-02</internalNodes>\n          <leafValues>\n            7.7375417947769165e-01 -2.7391599491238594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 -8.9303712593391538e-04</internalNodes>\n          <leafValues>\n            -2.8926849365234375e-01 8.3425313234329224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 2.0034189801663160e-03</internalNodes>\n          <leafValues>\n            5.7899519801139832e-02 -2.1817860007286072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 7.4933562427759171e-04</internalNodes>\n          <leafValues>\n            -1.3606220483779907e-01 1.6150030493736267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 -8.9645422995090485e-02</internalNodes>\n          <leafValues>\n            -9.5717740058898926e-01 5.8882208541035652e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 -6.5244808793067932e-03</internalNodes>\n          <leafValues>\n            1.4521969854831696e-01 -1.6119849681854248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 -2.8723690193146467e-03</internalNodes>\n          <leafValues>\n            1.0670810192823410e-01 -3.0505739152431488e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 2.2762219887226820e-03</internalNodes>\n          <leafValues>\n            -1.4573380351066589e-01 1.5590649843215942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 4.3706637807190418e-03</internalNodes>\n          <leafValues>\n            -2.4369299411773682e-02 2.0724129676818848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 1.1989739723503590e-03</internalNodes>\n          <leafValues>\n            8.8461942970752716e-02 -2.2536410391330719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 -6.1923090834170580e-04</internalNodes>\n          <leafValues>\n            1.5108090639114380e-01 -9.9106341600418091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 -1.0555429616943002e-03</internalNodes>\n          <leafValues>\n            1.5399299561977386e-01 -1.4410500228404999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 2.3101890459656715e-02</internalNodes>\n          <leafValues>\n            -2.6107529178261757e-02 2.5875169038772583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 6.7337458021938801e-03</internalNodes>\n          <leafValues>\n            6.4629636704921722e-02 -3.2299819588661194e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 1.4084229478612542e-03</internalNodes>\n          <leafValues>\n            8.5755072534084320e-02 -1.4947549998760223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 -2.3923629487399012e-04</internalNodes>\n          <leafValues>\n            1.8700890243053436e-01 -1.0941530019044876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 2.2198690567165613e-04</internalNodes>\n          <leafValues>\n            -1.9517560303211212e-01 5.9587858617305756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 2.8156230691820383e-03</internalNodes>\n          <leafValues>\n            -8.9527882635593414e-02 2.2894319891929626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 7.8730508685112000e-03</internalNodes>\n          <leafValues>\n            6.4139701426029205e-02 -1.7174859344959259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 1.0448540560901165e-03</internalNodes>\n          <leafValues>\n            -2.0927239954471588e-01 1.1022809892892838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 -1.8041099607944489e-01</internalNodes>\n          <leafValues>\n            2.5460541248321533e-01 -3.1580239534378052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 -1.8916819989681244e-01</internalNodes>\n          <leafValues>\n            -8.1439048051834106e-01 3.0212750658392906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 -4.8934340476989746e-02</internalNodes>\n          <leafValues>\n            4.8329269886016846e-01 -3.1813390552997589e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 -6.2278551049530506e-03</internalNodes>\n          <leafValues>\n            -2.2463080286979675e-01 9.3202292919158936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 -3.6263489164412022e-03</internalNodes>\n          <leafValues>\n            9.7239963710308075e-02 -2.2094939649105072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 2.0688530057668686e-02</internalNodes>\n          <leafValues>\n            -3.9044689387083054e-02 6.9668918848037720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 -6.5703191794455051e-03</internalNodes>\n          <leafValues>\n            -1.5919350087642670e-01 3.7697389721870422e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 -2.7691440191119909e-03</internalNodes>\n          <leafValues>\n            -2.1777799725532532e-01 1.1075550317764282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 -2.5391899980604649e-03</internalNodes>\n          <leafValues>\n            7.6753303408622742e-02 -1.2121020257472992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 1.4522899873554707e-02</internalNodes>\n          <leafValues>\n            -4.6935468912124634e-02 4.4322049617767334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 -4.8549640923738480e-03</internalNodes>\n          <leafValues>\n            -4.1040301322937012e-01 4.7296289354562759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 -3.6202149931341410e-03</internalNodes>\n          <leafValues>\n            3.6707898974418640e-01 -5.0583109259605408e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>79</maxWeakCount>\n      <stageThreshold>-8.1366151571273804e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 817 9.7794737666845322e-03</internalNodes>\n          <leafValues>\n            -1.9873769581317902e-01 1.8754990398883820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 2.5764610618352890e-03</internalNodes>\n          <leafValues>\n            -1.6544049978256226e-01 1.1968299746513367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 6.6844018874689937e-04</internalNodes>\n          <leafValues>\n            8.1187427043914795e-02 -2.6954218745231628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 1.8919180147349834e-03</internalNodes>\n          <leafValues>\n            8.2398690283298492e-02 -1.9564670324325562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 -8.2977651618421078e-04</internalNodes>\n          <leafValues>\n            -2.1381169557571411e-01 1.0152959823608398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 -2.5124829262495041e-03</internalNodes>\n          <leafValues>\n            2.6497021317481995e-01 -8.1728130578994751e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 4.9220919609069824e-03</internalNodes>\n          <leafValues>\n            -1.3837899267673492e-01 1.7047420144081116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 1.5432259533554316e-03</internalNodes>\n          <leafValues>\n            -2.3483499884605408e-01 1.2624679505825043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 -7.5272549875080585e-03</internalNodes>\n          <leafValues>\n            -2.1902580559253693e-01 7.8214943408966064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 -3.2087319414131343e-04</internalNodes>\n          <leafValues>\n            9.9803313612937927e-02 -1.0052630305290222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 827 -5.6291592773050070e-04</internalNodes>\n          <leafValues>\n            1.4587800204753876e-01 -1.3194470107555389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 -3.4248359501361847e-02</internalNodes>\n          <leafValues>\n            7.3179531097412109e-01 -2.5754369795322418e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 5.5207060649991035e-03</internalNodes>\n          <leafValues>\n            7.3829427361488342e-02 -2.4615940451622009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 3.3663161098957062e-02</internalNodes>\n          <leafValues>\n            -5.0750829279422760e-02 5.1054477691650391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 1.0605139657855034e-02</internalNodes>\n          <leafValues>\n            -1.9593380391597748e-01 9.6162728965282440e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 3.6454470828175545e-03</internalNodes>\n          <leafValues>\n            -1.0274770110845566e-01 1.8021290004253387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 3.1658720225095749e-02</internalNodes>\n          <leafValues>\n            7.7415347099304199e-02 -2.3498320579528809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 6.0496449470520020e-02</internalNodes>\n          <leafValues>\n            7.9810861498117447e-03 -5.8126330375671387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 -2.1451190696097910e-04</internalNodes>\n          <leafValues>\n            -2.7141410112380981e-01 7.2448231279850006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 -8.9069753885269165e-03</internalNodes>\n          <leafValues>\n            1.0864660143852234e-01 -3.7890978157520294e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -3.1367139890789986e-03</internalNodes>\n          <leafValues>\n            2.3194080591201782e-01 -8.3242997527122498e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 838 -8.2477089017629623e-04</internalNodes>\n          <leafValues>\n            1.3757370412349701e-01 -4.0709521621465683e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 -3.8041090010665357e-04</internalNodes>\n          <leafValues>\n            9.9655948579311371e-02 -2.0115250349044800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 3.0412159394472837e-03</internalNodes>\n          <leafValues>\n            4.8606388270854950e-02 -2.9261159896850586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 -2.7135149575769901e-03</internalNodes>\n          <leafValues>\n            -2.0402909815311432e-01 8.7270192801952362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 -1.1454220116138458e-01</internalNodes>\n          <leafValues>\n            2.6342248916625977e-01 -2.8976829722523689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 -7.9219061881303787e-03</internalNodes>\n          <leafValues>\n            -2.3954220116138458e-01 7.8425459563732147e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 -6.4272403717041016e-02</internalNodes>\n          <leafValues>\n            3.8651049137115479e-01 -3.4981280565261841e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 2.0820159465074539e-02</internalNodes>\n          <leafValues>\n            3.6676738411188126e-02 -5.0909721851348877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 4.7503421083092690e-03</internalNodes>\n          <leafValues>\n            -4.9171518534421921e-02 1.8542270362377167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 -9.3589037656784058e-02</internalNodes>\n          <leafValues>\n            6.2822377681732178e-01 -2.5140469893813133e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 -6.8223377456888556e-04</internalNodes>\n          <leafValues>\n            4.0090799331665039e-02 -1.0250650346279144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 -8.3058718591928482e-03</internalNodes>\n          <leafValues>\n            -2.1625949442386627e-01 8.5505023598670959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 5.5919620208442211e-03</internalNodes>\n          <leafValues>\n            -6.5724261105060577e-02 6.1939451843500137e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 1.8336649518460035e-03</internalNodes>\n          <leafValues>\n            -1.0324809700250626e-01 2.5134149193763733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 -4.4351099058985710e-03</internalNodes>\n          <leafValues>\n            -1.5100279450416565e-01 3.7323009222745895e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 -4.7271270304918289e-03</internalNodes>\n          <leafValues>\n            1.3500709831714630e-01 -1.5250219404697418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 5.3573452169075608e-04</internalNodes>\n          <leafValues>\n            -6.0964770615100861e-02 7.1996733546257019e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 -1.3135100016370416e-04</internalNodes>\n          <leafValues>\n            1.2902179360389709e-01 -1.3107609748840332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 4.0799290873110294e-03</internalNodes>\n          <leafValues>\n            4.9433309584856033e-02 -1.9467090070247650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 -3.1066180672496557e-03</internalNodes>\n          <leafValues>\n            2.3984549939632416e-01 -7.1281567215919495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 1.0999400168657303e-02</internalNodes>\n          <leafValues>\n            2.9017930850386620e-02 -3.8504680991172791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 1.5001590363681316e-03</internalNodes>\n          <leafValues>\n            -8.3652436733245850e-02 1.8141129612922668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 1.3700149953365326e-02</internalNodes>\n          <leafValues>\n            3.6753259599208832e-02 -4.5086589455604553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 3.9507630281150341e-03</internalNodes>\n          <leafValues>\n            -6.9417111575603485e-02 2.1540710330009460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 -8.5161393508315086e-03</internalNodes>\n          <leafValues>\n            1.0704089701175690e-01 -1.4857380092144012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 1.7032850300893188e-03</internalNodes>\n          <leafValues>\n            -8.1896521151065826e-02 3.2398068904876709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 -1.0852930136024952e-02</internalNodes>\n          <leafValues>\n            -1.3142329454421997e-01 9.9990189075469971e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 -3.7832378875464201e-03</internalNodes>\n          <leafValues>\n            9.7596637904644012e-02 -1.6081459820270538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 1.3263260014355183e-02</internalNodes>\n          <leafValues>\n            6.8189077079296112e-02 -1.4820660650730133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 -4.4276300817728043e-02</internalNodes>\n          <leafValues>\n            5.3883999586105347e-01 -3.4769881516695023e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 -1.6476439312100410e-02</internalNodes>\n          <leafValues>\n            -6.9341838359832764e-01 3.0285930261015892e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 1.5063960105180740e-02</internalNodes>\n          <leafValues>\n            5.0365351140499115e-02 -3.2215261459350586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 5.3230069577693939e-02</internalNodes>\n          <leafValues>\n            4.0058908052742481e-03 -1.0000929832458496e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 -1.2282089889049530e-01</internalNodes>\n          <leafValues>\n            4.0438568592071533e-01 -5.4661169648170471e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 -8.0205321311950684e-02</internalNodes>\n          <leafValues>\n            -1.8915909528732300e-01 3.5704288631677628e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 -1.1679669842123985e-03</internalNodes>\n          <leafValues>\n            -2.7641400694847107e-01 5.9974398463964462e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 -3.1197320204228163e-03</internalNodes>\n          <leafValues>\n            1.1307190358638763e-01 -7.2880730032920837e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 3.6612390540540218e-03</internalNodes>\n          <leafValues>\n            -4.7828570008277893e-02 3.9067369699478149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 4.6034730039536953e-03</internalNodes>\n          <leafValues>\n            -4.7448419034481049e-02 3.6146968603134155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 -1.0733479866757989e-03</internalNodes>\n          <leafValues>\n            1.1264870315790176e-01 -2.9074960947036743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 -1.8310690298676491e-02</internalNodes>\n          <leafValues>\n            9.6729353070259094e-02 -1.0150820016860962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 -6.8194739520549774e-02</internalNodes>\n          <leafValues>\n            -2.2048689424991608e-01 1.0977990180253983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 8.9977607131004333e-03</internalNodes>\n          <leafValues>\n            -2.9652440920472145e-02 1.5059219300746918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 2.6954131317324936e-04</internalNodes>\n          <leafValues>\n            -1.9917850196361542e-01 9.4677992165088654e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 5.9090729337185621e-04</internalNodes>\n          <leafValues>\n            -1.3240300118923187e-01 6.3088178634643555e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 5.5691739544272423e-03</internalNodes>\n          <leafValues>\n            1.0318289697170258e-01 -1.9276739656925201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 -9.9434129893779755e-02</internalNodes>\n          <leafValues>\n            2.5911080837249756e-01 -4.3947871774435043e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 -9.6295922994613647e-03</internalNodes>\n          <leafValues>\n            -3.6871969699859619e-01 4.6506170183420181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 -1.7397940391674638e-03</internalNodes>\n          <leafValues>\n            1.3736039400100708e-01 -6.9822482764720917e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 -1.3269430026412010e-02</internalNodes>\n          <leafValues>\n            4.5216149091720581e-01 -3.8461238145828247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 2.5604839902371168e-03</internalNodes>\n          <leafValues>\n            5.4858781397342682e-02 -2.4963529407978058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 -1.9173050532117486e-03</internalNodes>\n          <leafValues>\n            -2.5733208656311035e-01 6.7481383681297302e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 -3.7461649626493454e-02</internalNodes>\n          <leafValues>\n            5.9668248891830444e-01 -1.8121080473065376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 -1.9658938981592655e-03</internalNodes>\n          <leafValues>\n            1.9501520693302155e-01 -9.0026341378688812e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 -3.2596408855170012e-03</internalNodes>\n          <leafValues>\n            -3.5647168755531311e-01 4.6495281159877777e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 -1.2043650262057781e-02</internalNodes>\n          <leafValues>\n            3.7508749961853027e-01 -5.3072199225425720e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 4.1690650396049023e-03</internalNodes>\n          <leafValues>\n            -4.1845761239528656e-02 1.1177790164947510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 1.4214499853551388e-02</internalNodes>\n          <leafValues>\n            7.1965761482715607e-02 -2.6777520775794983e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>81</maxWeakCount>\n      <stageThreshold>-3.0813199996948242e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 896 -1.2230969965457916e-02</internalNodes>\n          <leafValues>\n            1.4567610621452332e-01 -2.4045179784297943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 -5.5717672221362591e-03</internalNodes>\n          <leafValues>\n            -1.8789610266685486e-01 4.0596708655357361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 -5.5606552632525563e-04</internalNodes>\n          <leafValues>\n            1.6649569571018219e-01 -1.1817839741706848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 8.3173572784289718e-04</internalNodes>\n          <leafValues>\n            -1.4224030077457428e-01 4.1616160422563553e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 -8.7869318667799234e-04</internalNodes>\n          <leafValues>\n            -1.6430449485778809e-01 1.5523290634155273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 -1.3641480356454849e-02</internalNodes>\n          <leafValues>\n            3.0867528915405273e-01 -2.7172269299626350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 1.4917860426066909e-05</internalNodes>\n          <leafValues>\n            -1.5592050552368164e-01 1.0176579654216766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 8.7703643366694450e-03</internalNodes>\n          <leafValues>\n            6.1582878232002258e-02 -3.0546051263809204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 7.5755198486149311e-03</internalNodes>\n          <leafValues>\n            -6.8759873509407043e-02 2.9675748944282532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 4.9841161817312241e-02</internalNodes>\n          <leafValues>\n            1.0127910412847996e-02 -7.9213422536849976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 -1.1090819723904133e-02</internalNodes>\n          <leafValues>\n            1.8339020013809204e-01 -1.0113699734210968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 -8.5937082767486572e-02</internalNodes>\n          <leafValues>\n            -4.1994568705558777e-01 1.5568479895591736e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 -1.0151329915970564e-03</internalNodes>\n          <leafValues>\n            1.1474460363388062e-01 -1.6091680526733398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 -1.3470250181853771e-02</internalNodes>\n          <leafValues>\n            -3.0626448988914490e-01 5.3186140954494476e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 1.6635110601782799e-02</internalNodes>\n          <leafValues>\n            -4.3458938598632812e-02 4.4043311476707458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 -2.2650870960205793e-03</internalNodes>\n          <leafValues>\n            1.5985119342803955e-01 -1.2725980579853058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 7.0288166403770447e-02</internalNodes>\n          <leafValues>\n            6.4891628921031952e-02 -2.3496179282665253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 2.9186379164457321e-02</internalNodes>\n          <leafValues>\n            -2.0920279622077942e-01 8.9257873594760895e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 -5.0624469295144081e-03</internalNodes>\n          <leafValues>\n            3.4374091029167175e-01 -6.2093049287796021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 915 2.9356318991631269e-03</internalNodes>\n          <leafValues>\n            -1.4249369502067566e-01 4.5412261039018631e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 -6.7740739323198795e-03</internalNodes>\n          <leafValues>\n            3.1641799211502075e-01 -4.9601629376411438e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 -1.4607170305680484e-04</internalNodes>\n          <leafValues>\n            1.0752049833536148e-01 -1.1540039628744125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 -3.5684450995177031e-03</internalNodes>\n          <leafValues>\n            -4.1672629117965698e-01 4.2202819138765335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 -2.0149808842688799e-03</internalNodes>\n          <leafValues>\n            1.0860130190849304e-01 -1.6349700093269348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 -8.7240645661950111e-03</internalNodes>\n          <leafValues>\n            -2.2000640630722046e-01 9.0927027165889740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 7.3565947823226452e-03</internalNodes>\n          <leafValues>\n            -1.0335700213909149e-01 1.6051970422267914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 3.4252731129527092e-03</internalNodes>\n          <leafValues>\n            -6.9635637104511261e-02 3.1490880250930786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 -5.7803248055279255e-03</internalNodes>\n          <leafValues>\n            -4.3639171123504639e-01 3.6127548664808273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 -2.9641189612448215e-03</internalNodes>\n          <leafValues>\n            2.1797280013561249e-01 -7.7875941991806030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 2.4028679355978966e-02</internalNodes>\n          <leafValues>\n            2.5940960273146629e-02 -5.7640588283538818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 8.1514477729797363e-02</internalNodes>\n          <leafValues>\n            -3.4380380064249039e-02 5.7957500219345093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 6.7858170950785279e-04</internalNodes>\n          <leafValues>\n            1.0398740321397781e-01 -2.3831090331077576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 4.2639520019292831e-02</internalNodes>\n          <leafValues>\n            -4.1167970746755600e-02 4.0556749701499939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 -4.0414459072053432e-03</internalNodes>\n          <leafValues>\n            -3.8652890920639038e-01 5.3053580224514008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 4.2280308902263641e-02</internalNodes>\n          <leafValues>\n            1.5058529563248158e-02 -9.6623957157135010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 -7.3401766712777317e-05</internalNodes>\n          <leafValues>\n            8.4438636898994446e-02 -1.0468550026416779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 4.7503020614385605e-03</internalNodes>\n          <leafValues>\n            -3.8135491311550140e-02 4.3066629767417908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 1.7291309777647257e-03</internalNodes>\n          <leafValues>\n            7.5733587145805359e-02 -1.5384200215339661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 -4.8985757166519761e-04</internalNodes>\n          <leafValues>\n            1.3722479343414307e-01 -1.2631259858608246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 -2.2209450253285468e-04</internalNodes>\n          <leafValues>\n            5.1139138638973236e-02 -6.6661313176155090e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 1.1202819878235459e-03</internalNodes>\n          <leafValues>\n            -1.0968499630689621e-01 1.5611450374126434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 -2.0596029236912727e-02</internalNodes>\n          <leafValues>\n            -4.5425260066986084e-01 5.6112911552190781e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 -5.1287859678268433e-03</internalNodes>\n          <leafValues>\n            -3.9422529935836792e-01 4.4144820421934128e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 -4.3597300536930561e-03</internalNodes>\n          <leafValues>\n            1.9391660392284393e-01 -6.5949328243732452e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 4.7703061136417091e-04</internalNodes>\n          <leafValues>\n            -1.1900710314512253e-01 1.6375440359115601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 -1.0993770323693752e-02</internalNodes>\n          <leafValues>\n            -2.9915741086006165e-01 2.8793500736355782e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 8.1108389422297478e-03</internalNodes>\n          <leafValues>\n            -4.8145949840545654e-02 3.8399958610534668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 -3.6698309704661369e-03</internalNodes>\n          <leafValues>\n            8.8712036609649658e-02 -3.0650860071182251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 1.3895990559831262e-03</internalNodes>\n          <leafValues>\n            -5.5156201124191284e-02 3.5109901428222656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 1.2493750546127558e-03</internalNodes>\n          <leafValues>\n            -1.8023060262203217e-01 1.3490100204944611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 5.5981278419494629e-03</internalNodes>\n          <leafValues>\n            7.9764246940612793e-02 -2.7847459912300110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 -3.8133479654788971e-02</internalNodes>\n          <leafValues>\n            3.5153418779373169e-01 -1.7089430242776871e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 -4.6064890921115875e-03</internalNodes>\n          <leafValues>\n            -2.2194199264049530e-01 1.0675799846649170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 -2.3793010413646698e-01</internalNodes>\n          <leafValues>\n            4.0079510211944580e-01 -6.2151808291673660e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 1.2010410428047180e-02</internalNodes>\n          <leafValues>\n            5.8646921068429947e-02 -3.5234829783439636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 8.4618777036666870e-03</internalNodes>\n          <leafValues>\n            -4.1455499827861786e-02 3.9362218976020813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 -1.4482599683105946e-02</internalNodes>\n          <leafValues>\n            -2.7049958705902100e-01 6.9400496780872345e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 2.5672810152173042e-03</internalNodes>\n          <leafValues>\n            -8.2357987761497498e-02 2.2959560155868530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 6.8167857825756073e-03</internalNodes>\n          <leafValues>\n            8.5212066769599915e-02 -2.2813120484352112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 -6.4145028591156006e-04</internalNodes>\n          <leafValues>\n            1.3260249793529510e-01 -8.1091962754726410e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 3.8798429886810482e-04</internalNodes>\n          <leafValues>\n            -2.1800529956817627e-01 8.2977667450904846e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 2.6308000087738037e-02</internalNodes>\n          <leafValues>\n            -2.5558909401297569e-02 5.8989650011062622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 2.0907879807054996e-03</internalNodes>\n          <leafValues>\n            5.7611741125583649e-02 -3.0286490917205811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 -1.1132369749248028e-02</internalNodes>\n          <leafValues>\n            -1.3822869956493378e-01 4.2258080095052719e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 -1.5296150231733918e-03</internalNodes>\n          <leafValues>\n            9.1749697923660278e-02 -2.2181099653244019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 6.7247601691633463e-04</internalNodes>\n          <leafValues>\n            -6.7084349691867828e-02 7.9762071371078491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 1.0386659763753414e-02</internalNodes>\n          <leafValues>\n            -7.4621170759201050e-02 2.2916689515113831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 6.2723900191485882e-04</internalNodes>\n          <leafValues>\n            -8.6500599980354309e-02 9.7814910113811493e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 1.5324779786169529e-02</internalNodes>\n          <leafValues>\n            8.0094330012798309e-02 -2.2011950612068176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 -8.7603963911533356e-03</internalNodes>\n          <leafValues>\n            3.1290820240974426e-01 -5.9373341500759125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 -2.3745700309518725e-04</internalNodes>\n          <leafValues>\n            1.1855959892272949e-01 -1.4514200389385223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 -1.0718279518187046e-03</internalNodes>\n          <leafValues>\n            1.2567649781703949e-01 -5.3101938217878342e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 5.3873867727816105e-04</internalNodes>\n          <leafValues>\n            -1.0715659707784653e-01 1.6037760674953461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 -6.9268636405467987e-02</internalNodes>\n          <leafValues>\n            -7.9294067621231079e-01 8.2057341933250427e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 1.0430130176246166e-02</internalNodes>\n          <leafValues>\n            5.1620200276374817e-02 -3.3472689986228943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 7.1888908743858337e-02</internalNodes>\n          <leafValues>\n            1.5941270394250751e-03 -8.5840928554534912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 2.0217420533299446e-02</internalNodes>\n          <leafValues>\n            -3.9817400276660919e-02 4.6351060271263123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 973 5.8006029576063156e-03</internalNodes>\n          <leafValues>\n            -2.1701389923691750e-02 9.9040143191814423e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 3.5261210054159164e-02</internalNodes>\n          <leafValues>\n            1.7082870006561279e-02 -1.0000469684600830e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 -4.5255878567695618e-01</internalNodes>\n          <leafValues>\n            -9.1292119026184082e-01 5.2670161239802837e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 -7.5286221690475941e-03</internalNodes>\n          <leafValues>\n            -5.2581560611724854e-01 2.2044740617275238e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>89</maxWeakCount>\n      <stageThreshold>-3.0780099868774414e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 977 2.9085609130561352e-03</internalNodes>\n          <leafValues>\n            -2.0195980370044708e-01 1.6118539869785309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 -6.4552230760455132e-03</internalNodes>\n          <leafValues>\n            -1.8676100671291351e-01 3.5359650850296021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 2.7815890498459339e-03</internalNodes>\n          <leafValues>\n            -1.2228749692440033e-01 2.0362569391727448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 -7.6125850901007652e-03</internalNodes>\n          <leafValues>\n            -3.6965709924697876e-01 3.9566628634929657e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 -2.5900858640670776e-01</internalNodes>\n          <leafValues>\n            6.4312630891799927e-01 3.1312569626607001e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 4.6097189188003540e-03</internalNodes>\n          <leafValues>\n            -2.7262160554528236e-02 2.1891650557518005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 -1.4135500416159630e-02</internalNodes>\n          <leafValues>\n            7.6006792485713959e-02 -2.6031088829040527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 -5.9708990156650543e-03</internalNodes>\n          <leafValues>\n            -1.9146460294723511e-01 1.1078900098800659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 -1.0699110571295023e-03</internalNodes>\n          <leafValues>\n            9.0127058327198029e-02 -1.9876359403133392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 1.5315730124711990e-02</internalNodes>\n          <leafValues>\n            5.1883369684219360e-02 -3.1069299578666687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 -7.3937349952757359e-05</internalNodes>\n          <leafValues>\n            1.0555309802293777e-01 -1.6768750548362732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 -8.1876888871192932e-02</internalNodes>\n          <leafValues>\n            4.6053099632263184e-01 -3.8276348263025284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 -8.8246334344148636e-03</internalNodes>\n          <leafValues>\n            -3.3107680082321167e-01 6.9674566388130188e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 990 -3.7569031119346619e-03</internalNodes>\n          <leafValues>\n            -2.7566310763359070e-01 6.9375626742839813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 991 -3.6343189422041178e-03</internalNodes>\n          <leafValues>\n            1.6658850014209747e-01 -1.2031579762697220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 992 2.1979490295052528e-02</internalNodes>\n          <leafValues>\n            -2.2316349670290947e-02 3.4402579069137573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 993 6.1386551707983017e-02</internalNodes>\n          <leafValues>\n            1.7906000837683678e-02 -8.8129872083663940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 994 2.7061739936470985e-02</internalNodes>\n          <leafValues>\n            -3.2444350421428680e-02 2.8866448998451233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 995 -9.5964036881923676e-03</internalNodes>\n          <leafValues>\n            -3.0743318796157837e-01 5.2499480545520782e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 996 -1.7550870543345809e-03</internalNodes>\n          <leafValues>\n            1.0434249788522720e-01 -1.1126209795475006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 997 1.6808100044727325e-03</internalNodes>\n          <leafValues>\n            -1.1712419986724854e-01 1.5606869757175446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 998 -1.3623350532725453e-03</internalNodes>\n          <leafValues>\n            2.2637459635734558e-01 -8.6454801261425018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 999 -3.6580429878085852e-03</internalNodes>\n          <leafValues>\n            -3.9829111099243164e-01 4.7143589705228806e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1000 5.2668720483779907e-02</internalNodes>\n          <leafValues>\n            -1.9696790724992752e-02 4.2998239398002625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1001 -3.4802549635060132e-04</internalNodes>\n          <leafValues>\n            9.1115236282348633e-02 -2.0480670034885406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1002 1.2204200029373169e-03</internalNodes>\n          <leafValues>\n            3.3061511814594269e-02 -1.7324869334697723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1003 -9.4577670097351074e-03</internalNodes>\n          <leafValues>\n            2.9774200916290283e-01 -5.8979131281375885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1004 -1.7641530139371753e-03</internalNodes>\n          <leafValues>\n            -9.6304766833782196e-02 6.5304636955261230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1005 8.1057827919721603e-03</internalNodes>\n          <leafValues>\n            5.7158369570970535e-02 -3.1123921275138855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1006 1.3963400386273861e-02</internalNodes>\n          <leafValues>\n            -3.5234641283750534e-02 3.5719850659370422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1007 -3.1854680273681879e-03</internalNodes>\n          <leafValues>\n            -2.1528400480747223e-01 7.6040878891944885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1008 -4.3546650558710098e-03</internalNodes>\n          <leafValues>\n            -8.3892293274402618e-02 2.8290690854191780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1009 -1.6740639694035053e-03</internalNodes>\n          <leafValues>\n            1.5145839750766754e-01 -1.1756320297718048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1010 -2.7018489781767130e-03</internalNodes>\n          <leafValues>\n            1.3833570480346680e-01 -5.0832830369472504e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1011 2.2117499611340463e-04</internalNodes>\n          <leafValues>\n            -2.3960849642753601e-01 7.5004346668720245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1012 2.2773200646042824e-02</internalNodes>\n          <leafValues>\n            -2.2433629259467125e-02 3.7049260735511780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1013 9.5928199589252472e-03</internalNodes>\n          <leafValues>\n            9.7205437719821930e-02 -1.7737109959125519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1014 3.3168029040098190e-03</internalNodes>\n          <leafValues>\n            -5.6414358317852020e-02 9.1938421130180359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1015 -2.3929888848215342e-03</internalNodes>\n          <leafValues>\n            2.1076680719852448e-01 -9.2880353331565857e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1016 -1.0766570456326008e-02</internalNodes>\n          <leafValues>\n            -1.2974379956722260e-01 5.9958908706903458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1017 9.9714798852801323e-04</internalNodes>\n          <leafValues>\n            -1.4279229938983917e-01 1.4279709756374359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1018 -6.6825798712670803e-03</internalNodes>\n          <leafValues>\n            -2.3819839954376221e-01 4.8119660466909409e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1019 -3.7201410159468651e-03</internalNodes>\n          <leafValues>\n            1.9953179359436035e-01 -9.0783573687076569e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1020 -1.8553409725427628e-02</internalNodes>\n          <leafValues>\n            -2.6621541380882263e-01 2.2872749716043472e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1021 3.0256200116127729e-03</internalNodes>\n          <leafValues>\n            -9.1106131672859192e-02 2.4559549987316132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1022 -6.2146309763193130e-02</internalNodes>\n          <leafValues>\n            -1. 5.2797337993979454e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1023 1.7690609674900770e-03</internalNodes>\n          <leafValues>\n            -1.9379650056362152e-01 9.5696106553077698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1024 -4.3277359509374946e-05</internalNodes>\n          <leafValues>\n            1.1374049633741379e-01 -1.3504849374294281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1025 1.2779419776052237e-03</internalNodes>\n          <leafValues>\n            7.9606160521507263e-02 -2.3597019910812378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1026 -4.4742479920387268e-02</internalNodes>\n          <leafValues>\n            1.8557150661945343e-01 -3.4167829900979996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1027 2.7726130792871118e-04</internalNodes>\n          <leafValues>\n            -5.7937718927860260e-02 2.8903219103813171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1028 5.6225471198558807e-02</internalNodes>\n          <leafValues>\n            1.3840789906680584e-02 -7.7199739217758179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1029 8.6825769394636154e-03</internalNodes>\n          <leafValues>\n            -1.8263089656829834e-01 1.1423269659280777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1030 -2.4038869887590408e-03</internalNodes>\n          <leafValues>\n            -1.9004139304161072e-01 6.5928563475608826e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1031 1.2840219773352146e-02</internalNodes>\n          <leafValues>\n            -3.6279100924730301e-02 4.5519340038299561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1032 1.1061480036005378e-03</internalNodes>\n          <leafValues>\n            -6.3054688274860382e-02 8.1609472632408142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1033 -4.6486179344356060e-03</internalNodes>\n          <leafValues>\n            -2.7108541131019592e-01 8.0167703330516815e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1034 6.4021991565823555e-03</internalNodes>\n          <leafValues>\n            -6.6946588456630707e-02 1.0634910315275192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1035 -8.2370378077030182e-02</internalNodes>\n          <leafValues>\n            3.4517300128936768e-01 -4.8468429595232010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1036 -3.7429828196763992e-02</internalNodes>\n          <leafValues>\n            -6.9630950689315796e-01 1.3054380193352699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1037 1.0500400327146053e-02</internalNodes>\n          <leafValues>\n            9.6028283238410950e-02 -2.6362740993499756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1038 6.8851239979267120e-02</internalNodes>\n          <leafValues>\n            3.7341150455176830e-03 -9.9989157915115356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1039 1.0171310277655721e-03</internalNodes>\n          <leafValues>\n            -2.3500110208988190e-01 9.1097183525562286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1040 -2.9057949781417847e-02</internalNodes>\n          <leafValues>\n            5.9977847337722778e-01 -3.6899000406265259e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1041 2.2022729739546776e-02</internalNodes>\n          <leafValues>\n            5.8034650981426239e-02 -3.2748758792877197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1042 -4.3123541399836540e-03</internalNodes>\n          <leafValues>\n            2.2153949737548828e-01 -6.1332020908594131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1043 1.0949710384011269e-02</internalNodes>\n          <leafValues>\n            2.1837379783391953e-02 -7.4662190675735474e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1044 4.3610740453004837e-02</internalNodes>\n          <leafValues>\n            -4.5098949223756790e-02 2.8109139204025269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1045 7.7252179384231567e-02</internalNodes>\n          <leafValues>\n            2.0801780745387077e-02 -8.6648237705230713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1046 -2.4023890495300293e-02</internalNodes>\n          <leafValues>\n            3.9884421229362488e-01 -3.5227119922637939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1047 1.9559780135750771e-02</internalNodes>\n          <leafValues>\n            3.5944730043411255e-02 -5.1469117403030396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1048 2.5917299091815948e-02</internalNodes>\n          <leafValues>\n            -1.2942669913172722e-02 4.1695970296859741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1049 -4.6949301031418145e-04</internalNodes>\n          <leafValues>\n            1.6665999591350555e-01 -9.0680040419101715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1050 -8.4590032696723938e-02</internalNodes>\n          <leafValues>\n            -5.9283781051635742e-01 7.2113061323761940e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1051 -8.9234940242022276e-04</internalNodes>\n          <leafValues>\n            1.7458200454711914e-01 -1.0072509944438934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1052 -2.4009350687265396e-02</internalNodes>\n          <leafValues>\n            -3.9131438732147217e-01 2.2361040115356445e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1053 -4.7586968867108226e-04</internalNodes>\n          <leafValues>\n            1.8306100368499756e-01 -1.2541130185127258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1054 2.9483099933713675e-03</internalNodes>\n          <leafValues>\n            6.5301053225994110e-02 -2.0387080311775208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1055 3.6947780754417181e-03</internalNodes>\n          <leafValues>\n            -6.0878321528434753e-02 3.0403020977973938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1056 -2.9413169249892235e-03</internalNodes>\n          <leafValues>\n            -3.0284491181373596e-01 4.7550499439239502e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1057 -7.1274640504270792e-04</internalNodes>\n          <leafValues>\n            1.6200789809226990e-01 -1.1822160333395004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1058 2.4309750646352768e-02</internalNodes>\n          <leafValues>\n            -1.1442789807915688e-02 2.0453959703445435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1059 -9.1473112115636468e-04</internalNodes>\n          <leafValues>\n            -2.0707829296588898e-01 7.5701341032981873e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1060 -3.6473390646278858e-03</internalNodes>\n          <leafValues>\n            2.4093860387802124e-01 -8.3565562963485718e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1061 1.2513220310211182e-02</internalNodes>\n          <leafValues>\n            4.1536040604114532e-02 -3.7487721443176270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1062 6.2148571014404297e-03</internalNodes>\n          <leafValues>\n            2.0434129983186722e-02 -9.0057849884033203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1063 -2.0954229403287172e-03</internalNodes>\n          <leafValues>\n            1.1625260114669800e-01 -1.8561770021915436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1064 -2.1173250675201416e-01</internalNodes>\n          <leafValues>\n            -1. 2.4372090119868517e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1065 1.0188589803874493e-03</internalNodes>\n          <leafValues>\n            -7.5683966279029846e-02 2.9555431008338928e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>77</maxWeakCount>\n      <stageThreshold>-3.0694400787353516e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1066 -2.4422600865364075e-02</internalNodes>\n          <leafValues>\n            2.0446979999542236e-01 -2.2299669682979584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1067 1.0574000189080834e-03</internalNodes>\n          <leafValues>\n            -1.4355170726776123e-01 8.5603542625904083e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1068 2.5123930536210537e-03</internalNodes>\n          <leafValues>\n            1.0997679829597473e-01 -2.3044809699058533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1069 1.2112739682197571e-01</internalNodes>\n          <leafValues>\n            3.3267501741647720e-02 -9.9910151958465576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1070 2.9103590641170740e-03</internalNodes>\n          <leafValues>\n            -1.0391929745674133e-01 1.9292880594730377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1071 -8.6717177182435989e-03</internalNodes>\n          <leafValues>\n            -2.7087220549583435e-01 9.9762901663780212e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1072 6.1140959151089191e-03</internalNodes>\n          <leafValues>\n            -1.1517100036144257e-01 2.0429219305515289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1073 2.0590990781784058e-02</internalNodes>\n          <leafValues>\n            -3.3107578754425049e-02 4.6375459432601929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1074 1.1507490416988730e-03</internalNodes>\n          <leafValues>\n            7.6014623045921326e-02 -2.7485209703445435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1075 6.5449788235127926e-03</internalNodes>\n          <leafValues>\n            -1.1266589909791946e-01 5.0031568855047226e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1076 1.6102850204333663e-03</internalNodes>\n          <leafValues>\n            -1.8794959783554077e-01 1.1234410107135773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1077 2.8527909889817238e-03</internalNodes>\n          <leafValues>\n            4.0457468479871750e-02 -8.4716461598873138e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1078 -4.0883300825953484e-03</internalNodes>\n          <leafValues>\n            1.2509189546108246e-01 -1.4850109815597534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1079 1.6648479504510760e-03</internalNodes>\n          <leafValues>\n            -1.0346720367670059e-01 5.3585231304168701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1080 -3.1635090708732605e-03</internalNodes>\n          <leafValues>\n            -3.3729389309883118e-01 6.1192918568849564e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1081 -1.0922599583864212e-02</internalNodes>\n          <leafValues>\n            4.5238488912582397e-01 -5.7903379201889038e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1082 -3.3356929197907448e-03</internalNodes>\n          <leafValues>\n            3.3880978822708130e-01 -6.4470112323760986e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1083 -3.0014500021934509e-02</internalNodes>\n          <leafValues>\n            -8.2835501432418823e-01 2.4696119129657745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1084 -3.0110439658164978e-01</internalNodes>\n          <leafValues>\n            -8.3429050445556641e-01 1.4369309879839420e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1085 -4.2447918094694614e-03</internalNodes>\n          <leafValues>\n            -1.2281739711761475e-01 2.8134100139141083e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1086 7.7825621701776981e-03</internalNodes>\n          <leafValues>\n            -6.9222308695316315e-02 2.5814509391784668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1087 -1.2726710177958012e-02</internalNodes>\n          <leafValues>\n            1.0745859891176224e-01 -7.6575823128223419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1088 4.7346940264105797e-03</internalNodes>\n          <leafValues>\n            4.4127859175205231e-02 -3.8045680522918701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1089 3.4512639977037907e-03</internalNodes>\n          <leafValues>\n            -4.2947210371494293e-02 4.6074831485748291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1090 5.6996050989255309e-04</internalNodes>\n          <leafValues>\n            6.6926121711730957e-02 -2.9685848951339722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1091 -5.3889099508523941e-02</internalNodes>\n          <leafValues>\n            -1. 3.9760880172252655e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1092 1.0263220174238086e-03</internalNodes>\n          <leafValues>\n            -1.1138930171728134e-01 1.7764210700988770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1093 3.9374440908432007e-02</internalNodes>\n          <leafValues>\n            1.2977429665625095e-02 -6.3669937849044800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1094 1.8777979537844658e-02</internalNodes>\n          <leafValues>\n            -3.9334569126367569e-02 4.5990169048309326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1095 1.5851920470595360e-03</internalNodes>\n          <leafValues>\n            -1.0917869955301285e-01 5.6247789412736893e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1096 -1.0857740417122841e-02</internalNodes>\n          <leafValues>\n            -2.0176340639591217e-01 9.0685456991195679e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1097 4.4399261474609375e-02</internalNodes>\n          <leafValues>\n            1.9891490228474140e-03 -9.9981158971786499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1098 -1.7311190022155643e-03</internalNodes>\n          <leafValues>\n            1.4699029922485352e-01 -1.4069539308547974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1099 -1.6609770245850086e-03</internalNodes>\n          <leafValues>\n            1.6190530359745026e-01 -5.5535599589347839e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1100 -4.3332851491868496e-03</internalNodes>\n          <leafValues>\n            -3.3971568942070007e-01 4.3209198862314224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1101 -4.4786658691009507e-05</internalNodes>\n          <leafValues>\n            1.0217490047216415e-01 -1.0289809852838516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1102 -1.2255939655005932e-02</internalNodes>\n          <leafValues>\n            4.6331259608268738e-01 -3.8829129189252853e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1103 3.1728390604257584e-02</internalNodes>\n          <leafValues>\n            -1.0918959975242615e-02 1.9252130389213562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1104 8.6054168641567230e-03</internalNodes>\n          <leafValues>\n            5.3962308913469315e-02 -3.3835870027542114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1105 2.4249579291790724e-03</internalNodes>\n          <leafValues>\n            -4.3876059353351593e-02 2.4977789819240570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1106 -1.9957860931754112e-03</internalNodes>\n          <leafValues>\n            1.1398400366306305e-01 -1.7925310134887695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1107 4.6042509377002716e-02</internalNodes>\n          <leafValues>\n            2.0680939778685570e-03 -8.7673932313919067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1108 2.4898271076381207e-03</internalNodes>\n          <leafValues>\n            -6.9595612585544586e-02 2.6142540574073792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1109 1.0052820434793830e-03</internalNodes>\n          <leafValues>\n            4.5501660555601120e-02 -1.2399580329656601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1110 9.0297553688287735e-03</internalNodes>\n          <leafValues>\n            -7.1272410452365875e-02 2.2919359803199768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1111 1.2028490193188190e-02</internalNodes>\n          <leafValues>\n            2.0230330526828766e-02 -3.4052988886833191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1112 2.3313730489462614e-03</internalNodes>\n          <leafValues>\n            8.7259337306022644e-02 -2.3195190727710724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1113 9.5184362726286054e-04</internalNodes>\n          <leafValues>\n            -2.3168809711933136e-01 5.5022191256284714e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1114 9.6378661692142487e-03</internalNodes>\n          <leafValues>\n            -4.1655559092760086e-02 4.2928260564804077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1115 1.3566980138421059e-02</internalNodes>\n          <leafValues>\n            4.5669659972190857e-02 -2.2501240670681000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1116 3.3653501421213150e-02</internalNodes>\n          <leafValues>\n            -6.7861579358577728e-02 3.6967611312866211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1117 -6.0395020991563797e-02</internalNodes>\n          <leafValues>\n            -9.0887361764907837e-01 3.8193699438124895e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1118 1.3169209705665708e-03</internalNodes>\n          <leafValues>\n            -1.5941339731216431e-01 1.4766550064086914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1119 -9.7704064100980759e-03</internalNodes>\n          <leafValues>\n            -1.2848410010337830e-01 4.7832399606704712e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1120 -4.5100511051714420e-03</internalNodes>\n          <leafValues>\n            1.2574909627437592e-01 -2.1964469552040100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1121 -2.0346629898995161e-03</internalNodes>\n          <leafValues>\n            -1.8574400246143341e-01 4.9177091568708420e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1122 1.3294390402734280e-02</internalNodes>\n          <leafValues>\n            9.1497242450714111e-02 -2.1343930065631866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1123 -4.0054250508546829e-02</internalNodes>\n          <leafValues>\n            3.1770059466362000e-01 -3.1080769374966621e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1124 2.5492990389466286e-02</internalNodes>\n          <leafValues>\n            3.8877040147781372e-02 -4.5658990740776062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1125 -3.8089688867330551e-02</internalNodes>\n          <leafValues>\n            6.6615498065948486e-01 -1.9895339384675026e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1126 -2.1308319270610809e-01</internalNodes>\n          <leafValues>\n            -8.6534178256988525e-01 2.0898429676890373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1127 -8.9727543294429779e-02</internalNodes>\n          <leafValues>\n            2.5725919008255005e-01 -4.6261668205261230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1128 2.5075700134038925e-02</internalNodes>\n          <leafValues>\n            4.1259508579969406e-02 -3.7666648626327515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1129 2.3366149514913559e-02</internalNodes>\n          <leafValues>\n            -7.2202831506729126e-02 2.4737030267715454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1130 2.8038409072905779e-04</internalNodes>\n          <leafValues>\n            -7.9473547637462616e-02 2.2478230297565460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1131 8.2364194095134735e-03</internalNodes>\n          <leafValues>\n            5.1211010664701462e-02 -1.3328659534454346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1132 5.3922779858112335e-02</internalNodes>\n          <leafValues>\n            1.7108399420976639e-02 -8.9256042242050171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1133 2.7015779633074999e-03</internalNodes>\n          <leafValues>\n            -1.8405599892139435e-01 1.2830390036106110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1134 -1.6505690291523933e-02</internalNodes>\n          <leafValues>\n            6.2239181995391846e-01 -2.6413690298795700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1135 -1.8418730469420552e-03</internalNodes>\n          <leafValues>\n            -1.2646800279617310e-01 4.8690851777791977e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1136 5.1953629590570927e-03</internalNodes>\n          <leafValues>\n            4.5653700828552246e-02 -3.2519981265068054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1137 5.0785308703780174e-03</internalNodes>\n          <leafValues>\n            4.0703259408473969e-02 -2.0620769262313843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1138 5.0687040202319622e-03</internalNodes>\n          <leafValues>\n            -7.6456248760223389e-02 2.5867408514022827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1139 -1.1892319656908512e-02</internalNodes>\n          <leafValues>\n            -2.2366219758987427e-01 3.0855409801006317e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1140 2.4257500190287828e-03</internalNodes>\n          <leafValues>\n            -7.1597889065742493e-02 2.6108819246292114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1141 -1.1990379542112350e-02</internalNodes>\n          <leafValues>\n            2.2678479552268982e-01 -1.0305509716272354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1142 -2.2772200405597687e-02</internalNodes>\n          <leafValues>\n            -2.3770140111446381e-01 7.6630853116512299e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>78</maxWeakCount>\n      <stageThreshold>-3.0664699554443359e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1143 3.3625920768827200e-03</internalNodes>\n          <leafValues>\n            -1.8268440663814545e-01 1.5935519337654114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1144 4.4937757775187492e-03</internalNodes>\n          <leafValues>\n            -8.9438192546367645e-02 2.8422310948371887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1145 -8.8971032528206706e-04</internalNodes>\n          <leafValues>\n            9.5665588974952698e-02 -1.9407069683074951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1146 2.6789100375026464e-03</internalNodes>\n          <leafValues>\n            -1.0152669996023178e-01 1.7864160239696503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1147 -4.0554129518568516e-03</internalNodes>\n          <leafValues>\n            -2.3337660729885101e-01 1.2279739975929260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1148 -1.7742250114679337e-02</internalNodes>\n          <leafValues>\n            1.9190870225429535e-01 -3.1710729002952576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1149 3.0996970599517226e-04</internalNodes>\n          <leafValues>\n            -1.9344709813594818e-01 9.9541679024696350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1150 -3.7737619131803513e-03</internalNodes>\n          <leafValues>\n            -2.0298850536346436e-01 7.9316012561321259e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1151 1.4448439469560981e-03</internalNodes>\n          <leafValues>\n            -5.9811491519212723e-02 4.1375398635864258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1152 4.1589159518480301e-03</internalNodes>\n          <leafValues>\n            -9.2934109270572662e-02 7.7575348317623138e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1153 9.7764004021883011e-03</internalNodes>\n          <leafValues>\n            5.3027391433715820e-02 -3.6435180902481079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1154 -2.8739850968122482e-03</internalNodes>\n          <leafValues>\n            1.2728120386600494e-01 -3.2182350754737854e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1155 4.3552028946578503e-03</internalNodes>\n          <leafValues>\n            -1.4472070336341858e-01 1.4171679317951202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1156 -1.2132039666175842e-01</internalNodes>\n          <leafValues>\n            1.5284240245819092e-01 -2.6948520913720131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1157 7.5531532056629658e-03</internalNodes>\n          <leafValues>\n            1.0153439640998840e-01 -1.8715800344944000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1158 4.8978552222251892e-03</internalNodes>\n          <leafValues>\n            2.8034990653395653e-02 -1.4224380254745483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1159 -1.8711129669100046e-03</internalNodes>\n          <leafValues>\n            1.5129889547824860e-01 -1.3912929594516754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1160 4.1867699474096298e-02</internalNodes>\n          <leafValues>\n            1.8230549991130829e-02 -5.6771957874298096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1161 -8.4031058941036463e-04</internalNodes>\n          <leafValues>\n            1.5392039716243744e-01 -1.2112110108137131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1162 3.6289851414039731e-04</internalNodes>\n          <leafValues>\n            -7.9913586378097534e-02 7.0097483694553375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1163 -4.4498889474198222e-04</internalNodes>\n          <leafValues>\n            1.6784679889678955e-01 -1.3805930316448212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1164 2.2194290068000555e-03</internalNodes>\n          <leafValues>\n            5.8453138917684555e-02 -1.2374790012836456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1165 -2.5759059935808182e-03</internalNodes>\n          <leafValues>\n            2.2619499266147614e-01 -8.6251437664031982e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1166 5.8989811688661575e-02</internalNodes>\n          <leafValues>\n            6.9204131141304970e-03 -7.3367577791213989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1167 -2.7889141440391541e-01</internalNodes>\n          <leafValues>\n            4.6728101372718811e-01 -3.8612861186265945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1168 -5.3824000060558319e-03</internalNodes>\n          <leafValues>\n            -1.6939850151538849e-01 6.1394538730382919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1169 -8.9165568351745605e-04</internalNodes>\n          <leafValues>\n            -2.4867910146713257e-01 7.6590277254581451e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1170 1.2071889825165272e-02</internalNodes>\n          <leafValues>\n            8.9360373094677925e-03 -2.7028709650039673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1171 3.8453561137430370e-04</internalNodes>\n          <leafValues>\n            9.9488303065299988e-02 -2.1522629261016846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1172 -2.2118990309536457e-03</internalNodes>\n          <leafValues>\n            4.0786389261484146e-02 -1.1563809961080551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1173 2.0960820838809013e-02</internalNodes>\n          <leafValues>\n            -3.1355928629636765e-02 7.1006178855895996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1174 -3.9021030534058809e-03</internalNodes>\n          <leafValues>\n            -1.7460019886493683e-01 4.0775351226329803e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1175 -4.5169141230871901e-05</internalNodes>\n          <leafValues>\n            1.2105180323123932e-01 -1.6618220508098602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1176 6.9195672869682312e-02</internalNodes>\n          <leafValues>\n            7.6447450555860996e-03 -5.9211570024490356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1177 -1.1615910334512591e-03</internalNodes>\n          <leafValues>\n            2.2584970295429230e-01 -9.1772772371768951e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1178 4.5347518607741222e-05</internalNodes>\n          <leafValues>\n            -2.0863719284534454e-01 9.0364061295986176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1179 -1.9045149907469749e-02</internalNodes>\n          <leafValues>\n            4.2344009876251221e-01 -4.6018179506063461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1180 4.1966438293457031e-03</internalNodes>\n          <leafValues>\n            -2.8369670733809471e-02 3.0800709128379822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1181 2.5357000413350761e-04</internalNodes>\n          <leafValues>\n            -2.8971961140632629e-01 7.5374223291873932e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1182 1.0817909985780716e-01</internalNodes>\n          <leafValues>\n            -1.4286429621279240e-02 7.2823339700698853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1183 -5.5140778422355652e-03</internalNodes>\n          <leafValues>\n            -1.8854649364948273e-01 1.1378549784421921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1184 5.5264509283006191e-03</internalNodes>\n          <leafValues>\n            7.0834018290042877e-02 -1.8397599458694458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1185 6.4198831096291542e-03</internalNodes>\n          <leafValues>\n            -1.1449480056762695e-01 1.9120390713214874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1186 1.9314220547676086e-01</internalNodes>\n          <leafValues>\n            1.4066229574382305e-02 -6.9772118330001831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1187 4.0670208632946014e-02</internalNodes>\n          <leafValues>\n            -2.4279089644551277e-02 7.8828179836273193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1188 -2.1965131163597107e-03</internalNodes>\n          <leafValues>\n            -2.0105579495429993e-01 5.1050510257482529e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1189 -4.7381771728396416e-03</internalNodes>\n          <leafValues>\n            2.5222310423851013e-01 -7.3429226875305176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1190 7.1773640811443329e-02</internalNodes>\n          <leafValues>\n            -9.0609909966588020e-03 9.2946898937225342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1191 6.9466611603274941e-04</internalNodes>\n          <leafValues>\n            1.0625690221786499e-01 -1.9162459671497345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1192 2.6388010010123253e-03</internalNodes>\n          <leafValues>\n            6.3330717384815216e-02 -2.0404089987277985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1193 -3.1406691414304078e-04</internalNodes>\n          <leafValues>\n            1.7990510165691376e-01 -9.8495960235595703e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1194 -5.8691151207312942e-04</internalNodes>\n          <leafValues>\n            8.5071258246898651e-02 -7.6974540948867798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1195 1.0376359568908811e-03</internalNodes>\n          <leafValues>\n            -1.1096309870481491e-01 1.5985070168972015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1196 1.6373570542782545e-03</internalNodes>\n          <leafValues>\n            1.1128730326890945e-01 -1.2352730333805084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1197 -7.3773309122771025e-04</internalNodes>\n          <leafValues>\n            1.2890860438346863e-01 -1.4294579625129700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1198 -1.6841450706124306e-02</internalNodes>\n          <leafValues>\n            -2.4231070280075073e-01 2.0597470924258232e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1199 -3.0590690672397614e-02</internalNodes>\n          <leafValues>\n            3.3513951301574707e-01 -4.7183569520711899e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1200 1.0214540176093578e-02</internalNodes>\n          <leafValues>\n            5.5497199296951294e-02 -2.3405939340591431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1201 -1.1853770120069385e-03</internalNodes>\n          <leafValues>\n            9.2074163258075714e-02 -1.7347140610218048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1202 1.1729650432243943e-03</internalNodes>\n          <leafValues>\n            -8.4075942635536194e-02 2.0689530670642853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1203 1.0894170030951500e-02</internalNodes>\n          <leafValues>\n            5.6475941091775894e-02 -3.1677180528640747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1204 -2.0437049679458141e-03</internalNodes>\n          <leafValues>\n            1.8796369433403015e-01 -9.8889023065567017e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1205 -5.7676038704812527e-03</internalNodes>\n          <leafValues>\n            -2.5189259648323059e-01 7.5108267366886139e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1206 6.9624483585357666e-02</internalNodes>\n          <leafValues>\n            -1.7661379650235176e-02 4.3390399217605591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1207 -3.1853429391048849e-04</internalNodes>\n          <leafValues>\n            -2.9378080368041992e-01 5.8162420988082886e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1208 1.7543470021337271e-03</internalNodes>\n          <leafValues>\n            2.6858489960432053e-02 -1.5225639939308167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1209 1.2951970566064119e-03</internalNodes>\n          <leafValues>\n            -7.1769118309020996e-02 3.8101229071617126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1210 2.0549140870571136e-02</internalNodes>\n          <leafValues>\n            -2.3171430453658104e-02 2.7228319644927979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1211 2.7475480455905199e-03</internalNodes>\n          <leafValues>\n            6.7207306623458862e-02 -2.7162951231002808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1212 5.2633951418101788e-03</internalNodes>\n          <leafValues>\n            -1.3931609690189362e-01 1.1821229755878448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1213 -5.2199261263012886e-03</internalNodes>\n          <leafValues>\n            -3.3213511109352112e-01 4.7329191118478775e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1214 9.9096707999706268e-03</internalNodes>\n          <leafValues>\n            -6.9706782698631287e-02 1.9954280555248260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1215 -1.0334379971027374e-01</internalNodes>\n          <leafValues>\n            4.2418560385704041e-01 -3.9896268397569656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1216 -1.3322319835424423e-02</internalNodes>\n          <leafValues>\n            -2.5508868694305420e-01 4.1351031512022018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1217 1.7832260346040130e-03</internalNodes>\n          <leafValues>\n            -1.7664439976215363e-01 1.0336239635944366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1218 6.3282333314418793e-02</internalNodes>\n          <leafValues>\n            1.2395679950714111e-02 -4.6355250477790833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1219 -5.1022358238697052e-03</internalNodes>\n          <leafValues>\n            4.0670639276504517e-01 -5.0193451344966888e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1220 3.9891529828310013e-02</internalNodes>\n          <leafValues>\n            3.7219129502773285e-02 -5.5696451663970947e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          3 4 12 16 -1.</_>\n        <_>\n          7 4 4 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 20 -1.</_>\n        <_>\n          11 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 4 22 -1.</_>\n        <_>\n          4 12 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 7 12 -1.</_>\n        <_>\n          9 14 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 10 -1.</_>\n        <_>\n          6 0 3 5 2.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 18 5 -1.</_>\n        <_>\n          1 18 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 20 10 3 -1.</_>\n        <_>\n          9 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 10 6 -1.</_>\n        <_>\n          6 20 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 20 -1.</_>\n        <_>\n          0 10 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 14 -1.</_>\n        <_>\n          3 7 16 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 13 -1.</_>\n        <_>\n          7 1 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 12 -1.</_>\n        <_>\n          10 8 9 6 2.</_>\n        <_>\n          1 14 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 21 -1.</_>\n        <_>\n          7 0 5 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 18 -1.</_>\n        <_>\n          10 5 9 9 2.</_>\n        <_>\n          1 14 9 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 15 3 -1.</_>\n        <_>\n          7 19 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 20 12 3 -1.</_>\n        <_>\n          7 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 14 2 -1.</_>\n        <_>\n          8 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 6 -1.</_>\n        <_>\n          6 16 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 20 -1.</_>\n        <_>\n          8 13 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 18 3 -1.</_>\n        <_>\n          9 19 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 14 2 -1.</_>\n        <_>\n          5 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 5 -1.</_>\n        <_>\n          5 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 15 3 -1.</_>\n        <_>\n          8 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 14 -1.</_>\n        <_>\n          5 9 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 18 -1.</_>\n        <_>\n          12 12 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 4 9 -1.</_>\n        <_>\n          3 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 11 8 -1.</_>\n        <_>\n          7 17 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 10 -1.</_>\n        <_>\n          0 7 3 5 2.</_>\n        <_>\n          3 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 13 -1.</_>\n        <_>\n          10 6 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 13 -1.</_>\n        <_>\n          7 6 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 8 -1.</_>\n        <_>\n          8 2 6 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 19 12 -1.</_>\n        <_>\n          0 17 19 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 6 5 -1.</_>\n        <_>\n          3 18 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 9 6 -1.</_>\n        <_>\n          12 17 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 15 3 -1.</_>\n        <_>\n          5 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 8 4 -1.</_>\n        <_>\n          9 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 9 6 -1.</_>\n        <_>\n          3 17 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 5 6 -1.</_>\n        <_>\n          14 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 14 -1.</_>\n        <_>\n          7 2 5 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 5 6 -1.</_>\n        <_>\n          14 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 5 6 -1.</_>\n        <_>\n          0 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 8 -1.</_>\n        <_>\n          3 4 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 14 2 -1.</_>\n        <_>\n          7 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 15 -1.</_>\n        <_>\n          9 4 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 8 5 -1.</_>\n        <_>\n          5 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 15 -1.</_>\n        <_>\n          9 4 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 15 -1.</_>\n        <_>\n          8 4 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 8 8 -1.</_>\n        <_>\n          15 11 4 4 2.</_>\n        <_>\n          11 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 7 -1.</_>\n        <_>\n          6 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 8 13 -1.</_>\n        <_>\n          7 1 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 14 2 -1.</_>\n        <_>\n          5 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 18 2 -1.</_>\n        <_>\n          9 21 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 8 5 -1.</_>\n        <_>\n          7 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 8 6 -1.</_>\n        <_>\n          8 17 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 7 10 -1.</_>\n        <_>\n          10 2 7 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 2 14 -1.</_>\n        <_>\n          3 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 2 16 -1.</_>\n        <_>\n          15 7 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 4 15 -1.</_>\n        <_>\n          3 8 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 14 -1.</_>\n        <_>\n          14 0 3 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 8 9 -1.</_>\n        <_>\n          9 6 4 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 15 11 8 -1.</_>\n        <_>\n          8 17 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 10 -1.</_>\n        <_>\n          7 7 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 9 8 -1.</_>\n        <_>\n          10 17 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 8 -1.</_>\n        <_>\n          0 17 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 17 18 -1.</_>\n        <_>\n          2 10 17 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 2 -1.</_>\n        <_>\n          2 0 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 5 -1.</_>\n        <_>\n          11 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 10 -1.</_>\n        <_>\n          6 0 3 5 2.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 7 -1.</_>\n        <_>\n          10 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 15 11 -1.</_>\n        <_>\n          7 4 5 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 4 8 -1.</_>\n        <_>\n          15 15 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 4 8 -1.</_>\n        <_>\n          2 15 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 11 -1.</_>\n        <_>\n          7 6 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 16 4 -1.</_>\n        <_>\n          7 17 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 10 8 -1.</_>\n        <_>\n          9 3 5 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 7 10 -1.</_>\n        <_>\n          12 6 7 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 5 -1.</_>\n        <_>\n          5 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 14 3 -1.</_>\n        <_>\n          4 19 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 20 14 3 -1.</_>\n        <_>\n          9 20 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 21 14 2 -1.</_>\n        <_>\n          4 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 14 -1.</_>\n        <_>\n          9 8 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 14 -1.</_>\n        <_>\n          9 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 9 16 -1.</_>\n        <_>\n          5 11 9 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 6 8 -1.</_>\n        <_>\n          11 17 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 7 6 -1.</_>\n        <_>\n          4 19 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 16 8 -1.</_>\n        <_>\n          10 13 8 4 2.</_>\n        <_>\n          2 17 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 15 3 -1.</_>\n        <_>\n          2 19 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 15 3 -1.</_>\n        <_>\n          7 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 11 16 -1.</_>\n        <_>\n          8 4 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 19 18 -1.</_>\n        <_>\n          0 6 19 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 11 16 -1.</_>\n        <_>\n          8 4 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 20 -1.</_>\n        <_>\n          0 6 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 15 4 -1.</_>\n        <_>\n          8 6 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 6 -1.</_>\n        <_>\n          0 9 9 3 2.</_>\n        <_>\n          9 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 14 -1.</_>\n        <_>\n          9 5 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 8 -1.</_>\n        <_>\n          3 0 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 6 -1.</_>\n        <_>\n          10 6 9 3 2.</_>\n        <_>\n          1 9 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 15 -1.</_>\n        <_>\n          8 7 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 8 10 -1.</_>\n        <_>\n          11 10 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 10 -1.</_>\n        <_>\n          0 10 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 15 3 -1.</_>\n        <_>\n          8 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 9 5 -1.</_>\n        <_>\n          5 16 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 11 -1.</_>\n        <_>\n          13 11 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 11 -1.</_>\n        <_>\n          7 8 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 12 5 -1.</_>\n        <_>\n          8 7 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 15 3 -1.</_>\n        <_>\n          7 11 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 3 -1.</_>\n        <_>\n          7 1 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 14 4 -1.</_>\n        <_>\n          5 1 7 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 10 -1.</_>\n        <_>\n          10 9 9 5 2.</_>\n        <_>\n          1 14 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 14 -1.</_>\n        <_>\n          8 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 14 -1.</_>\n        <_>\n          9 7 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 19 16 -1.</_>\n        <_>\n          0 9 19 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 14 -1.</_>\n        <_>\n          10 7 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 14 6 -1.</_>\n        <_>\n          2 11 7 3 2.</_>\n        <_>\n          9 14 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 14 -1.</_>\n        <_>\n          10 7 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 14 -1.</_>\n        <_>\n          8 7 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 5 6 -1.</_>\n        <_>\n          7 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 9 15 -1.</_>\n        <_>\n          5 11 3 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 10 -1.</_>\n        <_>\n          11 0 3 5 2.</_>\n        <_>\n          8 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 21 -1.</_>\n        <_>\n          5 9 2 7 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 10 4 -1.</_>\n        <_>\n          9 19 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 4 8 -1.</_>\n        <_>\n          4 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 22 -1.</_>\n        <_>\n          11 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 15 3 -1.</_>\n        <_>\n          5 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 19 8 4 -1.</_>\n        <_>\n          10 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 8 4 -1.</_>\n        <_>\n          5 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 7 -1.</_>\n        <_>\n          6 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 3 10 -1.</_>\n        <_>\n          13 2 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 9 -1.</_>\n        <_>\n          9 4 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 2 10 -1.</_>\n        <_>\n          10 7 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 1 15 9 -1.</_>\n        <_>\n          7 1 5 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 7 -1.</_>\n        <_>\n          7 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 2 10 -1.</_>\n        <_>\n          10 7 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 10 2 -1.</_>\n        <_>\n          9 7 10 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 16 4 7 -1.</_>\n        <_>\n          13 16 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 10 -1.</_>\n        <_>\n          8 9 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 14 4 -1.</_>\n        <_>\n          12 18 7 2 2.</_>\n        <_>\n          5 20 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 12 3 -1.</_>\n        <_>\n          5 1 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 22 -1.</_>\n        <_>\n          11 11 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 4 8 -1.</_>\n        <_>\n          5 15 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 14 -1.</_>\n        <_>\n          11 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 14 -1.</_>\n        <_>\n          7 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 20 -1.</_>\n        <_>\n          11 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 16 4 -1.</_>\n        <_>\n          5 19 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 20 -1.</_>\n        <_>\n          11 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 2 20 -1.</_>\n        <_>\n          7 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 22 -1.</_>\n        <_>\n          11 11 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 14 4 -1.</_>\n        <_>\n          0 18 7 2 2.</_>\n        <_>\n          7 20 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 8 -1.</_>\n        <_>\n          10 1 9 4 2.</_>\n        <_>\n          1 5 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 4 -1.</_>\n        <_>\n          9 8 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 15 3 -1.</_>\n        <_>\n          8 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 8 -1.</_>\n        <_>\n          8 1 6 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 15 -1.</_>\n        <_>\n          9 3 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 9 6 -1.</_>\n        <_>\n          4 14 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 15 3 -1.</_>\n        <_>\n          8 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 14 3 -1.</_>\n        <_>\n          0 19 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 10 3 -1.</_>\n        <_>\n          5 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 6 -1.</_>\n        <_>\n          9 5 5 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 15 14 -1.</_>\n        <_>\n          7 4 5 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 6 7 -1.</_>\n        <_>\n          3 16 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 12 5 -1.</_>\n        <_>\n          11 18 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 15 3 -1.</_>\n        <_>\n          1 19 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 12 4 -1.</_>\n        <_>\n          8 19 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 12 -1.</_>\n        <_>\n          5 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 16 3 -1.</_>\n        <_>\n          3 20 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 15 8 -1.</_>\n        <_>\n          0 17 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 4 7 -1.</_>\n        <_>\n          12 14 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 15 3 -1.</_>\n        <_>\n          6 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 4 -1.</_>\n        <_>\n          10 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 4 -1.</_>\n        <_>\n          6 0 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 20 10 3 -1.</_>\n        <_>\n          9 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 15 16 -1.</_>\n        <_>\n          7 4 5 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 11 12 -1.</_>\n        <_>\n          4 6 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 14 -1.</_>\n        <_>\n          8 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 21 14 2 -1.</_>\n        <_>\n          4 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 16 2 -1.</_>\n        <_>\n          8 21 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 14 -1.</_>\n        <_>\n          9 7 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 12 -1.</_>\n        <_>\n          5 0 8 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 16 5 -1.</_>\n        <_>\n          7 17 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 5 -1.</_>\n        <_>\n          3 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 6 -1.</_>\n        <_>\n          13 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 6 -1.</_>\n        <_>\n          3 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 14 -1.</_>\n        <_>\n          9 7 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 20 -1.</_>\n        <_>\n          7 13 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 15 -1.</_>\n        <_>\n          9 6 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 15 -1.</_>\n        <_>\n          8 6 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 12 -1.</_>\n        <_>\n          16 11 3 6 2.</_>\n        <_>\n          13 17 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 12 -1.</_>\n        <_>\n          0 11 3 6 2.</_>\n        <_>\n          3 17 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 14 -1.</_>\n        <_>\n          11 2 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 14 -1.</_>\n        <_>\n          7 2 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 14 -1.</_>\n        <_>\n          12 5 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 15 10 -1.</_>\n        <_>\n          7 4 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 11 22 -1.</_>\n        <_>\n          4 11 11 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 14 4 -1.</_>\n        <_>\n          0 19 7 2 2.</_>\n        <_>\n          7 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 7 -1.</_>\n        <_>\n          8 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 15 -1.</_>\n        <_>\n          8 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 14 2 -1.</_>\n        <_>\n          5 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 14 -1.</_>\n        <_>\n          8 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 2 14 -1.</_>\n        <_>\n          12 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 14 -1.</_>\n        <_>\n          6 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 15 3 -1.</_>\n        <_>\n          8 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 17 -1.</_>\n        <_>\n          6 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 20 12 3 -1.</_>\n        <_>\n          4 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 14 -1.</_>\n        <_>\n          6 2 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 15 18 -1.</_>\n        <_>\n          7 3 5 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 7 -1.</_>\n        <_>\n          9 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 5 -1.</_>\n        <_>\n          11 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 7 -1.</_>\n        <_>\n          9 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 19 -1.</_>\n        <_>\n          8 3 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 12 19 -1.</_>\n        <_>\n          5 3 6 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 2 14 -1.</_>\n        <_>\n          13 8 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 12 6 -1.</_>\n        <_>\n          1 18 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 2 14 -1.</_>\n        <_>\n          13 8 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 14 -1.</_>\n        <_>\n          5 8 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 4 -1.</_>\n        <_>\n          9 0 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 22 -1.</_>\n        <_>\n          6 12 7 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 10 6 -1.</_>\n        <_>\n          12 17 5 3 2.</_>\n        <_>\n          7 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 5 -1.</_>\n        <_>\n          9 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 15 3 -1.</_>\n        <_>\n          8 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 15 8 -1.</_>\n        <_>\n          1 4 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 6 -1.</_>\n        <_>\n          6 0 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 20 10 3 -1.</_>\n        <_>\n          7 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 10 3 -1.</_>\n        <_>\n          9 19 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 6 5 -1.</_>\n        <_>\n          6 18 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 9 -1.</_>\n        <_>\n          6 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 14 -1.</_>\n        <_>\n          12 9 2 7 2.</_>\n        <_>\n          10 16 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 4 7 -1.</_>\n        <_>\n          4 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 4 9 -1.</_>\n        <_>\n          12 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 9 -1.</_>\n        <_>\n          5 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 10 6 -1.</_>\n        <_>\n          14 13 5 3 2.</_>\n        <_>\n          9 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 15 10 -1.</_>\n        <_>\n          7 10 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 14 -1.</_>\n        <_>\n          12 9 2 7 2.</_>\n        <_>\n          10 16 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 14 -1.</_>\n        <_>\n          5 9 2 7 2.</_>\n        <_>\n          7 16 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 4 7 -1.</_>\n        <_>\n          12 16 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 4 7 -1.</_>\n        <_>\n          5 16 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 7 6 -1.</_>\n        <_>\n          8 19 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 15 3 -1.</_>\n        <_>\n          5 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 8 -1.</_>\n        <_>\n          9 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 10 -1.</_>\n        <_>\n          0 0 5 5 2.</_>\n        <_>\n          5 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 3 -1.</_>\n        <_>\n          9 0 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 3 -1.</_>\n        <_>\n          5 0 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 10 -1.</_>\n        <_>\n          10 4 2 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 10 4 -1.</_>\n        <_>\n          9 4 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 12 -1.</_>\n        <_>\n          10 8 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 12 -1.</_>\n        <_>\n          5 8 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 8 -1.</_>\n        <_>\n          5 8 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 15 21 -1.</_>\n        <_>\n          7 8 5 7 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 9 7 -1.</_>\n        <_>\n          4 16 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 18 -1.</_>\n        <_>\n          10 5 6 9 2.</_>\n        <_>\n          4 14 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 15 3 -1.</_>\n        <_>\n          6 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 16 13 -1.</_>\n        <_>\n          7 4 8 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 10 8 -1.</_>\n        <_>\n          9 3 5 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 19 8 4 -1.</_>\n        <_>\n          11 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 8 4 -1.</_>\n        <_>\n          4 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 5 -1.</_>\n        <_>\n          11 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 22 -1.</_>\n        <_>\n          6 0 3 11 2.</_>\n        <_>\n          9 11 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 14 -1.</_>\n        <_>\n          9 7 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 14 -1.</_>\n        <_>\n          6 8 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 10 -1.</_>\n        <_>\n          13 16 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 5 -1.</_>\n        <_>\n          5 0 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 7 -1.</_>\n        <_>\n          9 0 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 23 -1.</_>\n        <_>\n          9 0 9 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 15 -1.</_>\n        <_>\n          9 13 4 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 7 -1.</_>\n        <_>\n          5 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 15 -1.</_>\n        <_>\n          9 13 4 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 13 -1.</_>\n        <_>\n          7 2 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 2 -1.</_>\n        <_>\n          3 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 15 7 -1.</_>\n        <_>\n          7 12 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 15 -1.</_>\n        <_>\n          9 13 4 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 15 9 -1.</_>\n        <_>\n          5 14 5 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 12 8 -1.</_>\n        <_>\n          9 15 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 8 -1.</_>\n        <_>\n          4 15 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 14 -1.</_>\n        <_>\n          9 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 14 -1.</_>\n        <_>\n          5 5 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 14 -1.</_>\n        <_>\n          12 5 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 9 -1.</_>\n        <_>\n          3 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 16 10 -1.</_>\n        <_>\n          6 8 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 6 6 -1.</_>\n        <_>\n          6 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 10 -1.</_>\n        <_>\n          10 10 9 5 2.</_>\n        <_>\n          1 15 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 7 4 -1.</_>\n        <_>\n          6 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 19 3 -1.</_>\n        <_>\n          0 7 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 6 -1.</_>\n        <_>\n          9 11 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 5 -1.</_>\n        <_>\n          10 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 9 4 -1.</_>\n        <_>\n          0 5 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 17 2 -1.</_>\n        <_>\n          1 19 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 8 -1.</_>\n        <_>\n          9 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 14 -1.</_>\n        <_>\n          9 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 14 -1.</_>\n        <_>\n          9 8 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 9 4 -1.</_>\n        <_>\n          10 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 10 3 -1.</_>\n        <_>\n          5 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 12 -1.</_>\n        <_>\n          8 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 4 7 -1.</_>\n        <_>\n          5 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 12 6 -1.</_>\n        <_>\n          12 17 6 3 2.</_>\n        <_>\n          6 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 6 -1.</_>\n        <_>\n          9 16 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 14 -1.</_>\n        <_>\n          14 0 2 7 2.</_>\n        <_>\n          12 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 14 2 -1.</_>\n        <_>\n          8 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 8 4 -1.</_>\n        <_>\n          9 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 4 -1.</_>\n        <_>\n          5 0 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 8 5 -1.</_>\n        <_>\n          10 1 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 10 -1.</_>\n        <_>\n          2 13 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 14 -1.</_>\n        <_>\n          9 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 10 2 -1.</_>\n        <_>\n          9 7 10 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 16 15 3 -1.</_>\n        <_>\n          7 16 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 17 -1.</_>\n        <_>\n          9 1 4 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 8 4 -1.</_>\n        <_>\n          9 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 8 4 -1.</_>\n        <_>\n          6 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 7 -1.</_>\n        <_>\n          10 0 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 7 -1.</_>\n        <_>\n          5 0 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 7 4 -1.</_>\n        <_>\n          12 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 14 -1.</_>\n        <_>\n          9 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 15 3 -1.</_>\n        <_>\n          2 19 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 7 -1.</_>\n        <_>\n          9 1 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 15 -1.</_>\n        <_>\n          12 5 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 10 -1.</_>\n        <_>\n          0 10 3 5 2.</_>\n        <_>\n          3 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 15 -1.</_>\n        <_>\n          12 5 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 15 -1.</_>\n        <_>\n          6 5 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 12 -1.</_>\n        <_>\n          6 5 6 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 16 -1.</_>\n        <_>\n          7 4 6 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 7 -1.</_>\n        <_>\n          13 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 4 16 -1.</_>\n        <_>\n          1 7 2 8 2.</_>\n        <_>\n          3 15 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 22 -1.</_>\n        <_>\n          11 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 14 3 -1.</_>\n        <_>\n          1 19 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 12 5 -1.</_>\n        <_>\n          11 18 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 19 -1.</_>\n        <_>\n          5 0 8 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 12 6 -1.</_>\n        <_>\n          9 17 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 8 4 -1.</_>\n        <_>\n          7 11 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 3 14 -1.</_>\n        <_>\n          11 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 15 8 -1.</_>\n        <_>\n          7 11 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 7 8 -1.</_>\n        <_>\n          11 6 7 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 7 -1.</_>\n        <_>\n          8 6 4 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 3 14 -1.</_>\n        <_>\n          11 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 3 14 -1.</_>\n        <_>\n          7 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 12 -1.</_>\n        <_>\n          7 0 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 16 -1.</_>\n        <_>\n          6 2 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 15 7 -1.</_>\n        <_>\n          6 4 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 4 8 -1.</_>\n        <_>\n          12 17 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 12 12 -1.</_>\n        <_>\n          6 15 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 5 6 -1.</_>\n        <_>\n          12 18 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 19 16 -1.</_>\n        <_>\n          0 8 19 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 20 15 3 -1.</_>\n        <_>\n          9 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 8 -1.</_>\n        <_>\n          9 0 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 6 -1.</_>\n        <_>\n          11 15 6 3 2.</_>\n        <_>\n          5 18 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 12 6 -1.</_>\n        <_>\n          2 15 6 3 2.</_>\n        <_>\n          8 18 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 5 -1.</_>\n        <_>\n          11 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 14 4 -1.</_>\n        <_>\n          0 19 7 2 2.</_>\n        <_>\n          7 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 7 -1.</_>\n        <_>\n          1 14 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 8 -1.</_>\n        <_>\n          5 1 4 4 2.</_>\n        <_>\n          9 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 12 -1.</_>\n        <_>\n          9 6 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 4 -1.</_>\n        <_>\n          9 0 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 20 15 3 -1.</_>\n        <_>\n          9 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 15 3 -1.</_>\n        <_>\n          5 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 9 -1.</_>\n        <_>\n          6 6 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 12 -1.</_>\n        <_>\n          7 6 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 9 6 -1.</_>\n        <_>\n          12 17 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 9 -1.</_>\n        <_>\n          6 7 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 16 -1.</_>\n        <_>\n          13 6 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 12 9 -1.</_>\n        <_>\n          7 5 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 16 -1.</_>\n        <_>\n          13 6 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 16 -1.</_>\n        <_>\n          5 6 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 15 -1.</_>\n        <_>\n          13 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 15 -1.</_>\n        <_>\n          5 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 8 8 -1.</_>\n        <_>\n          8 2 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 5 -1.</_>\n        <_>\n          9 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 11 16 -1.</_>\n        <_>\n          4 11 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 5 8 -1.</_>\n        <_>\n          7 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 14 3 -1.</_>\n        <_>\n          4 19 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 17 3 -1.</_>\n        <_>\n          1 19 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 20 10 3 -1.</_>\n        <_>\n          9 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 14 2 -1.</_>\n        <_>\n          8 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 14 3 -1.</_>\n        <_>\n          4 19 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 5 6 -1.</_>\n        <_>\n          2 19 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 5 12 -1.</_>\n        <_>\n          13 15 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 16 3 -1.</_>\n        <_>\n          1 10 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 5 9 -1.</_>\n        <_>\n          7 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 7 14 -1.</_>\n        <_>\n          6 7 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 6 7 -1.</_>\n        <_>\n          13 16 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 3 15 -1.</_>\n        <_>\n          2 4 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 8 -1.</_>\n        <_>\n          14 0 4 4 2.</_>\n        <_>\n          10 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 3 14 -1.</_>\n        <_>\n          2 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 5 9 -1.</_>\n        <_>\n          13 16 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 5 9 -1.</_>\n        <_>\n          1 16 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 6 -1.</_>\n        <_>\n          12 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 9 6 -1.</_>\n        <_>\n          4 17 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 10 3 -1.</_>\n        <_>\n          7 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 5 -1.</_>\n        <_>\n          9 0 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 2 15 -1.</_>\n        <_>\n          2 8 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 18 -1.</_>\n        <_>\n          15 0 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 14 2 -1.</_>\n        <_>\n          7 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 8 4 -1.</_>\n        <_>\n          9 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 16 2 -1.</_>\n        <_>\n          9 21 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 4 -1.</_>\n        <_>\n          6 0 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 9 5 -1.</_>\n        <_>\n          6 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 10 -1.</_>\n        <_>\n          10 5 8 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 8 -1.</_>\n        <_>\n          0 5 18 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 10 -1.</_>\n        <_>\n          10 5 8 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 20 10 3 -1.</_>\n        <_>\n          9 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 14 3 -1.</_>\n        <_>\n          4 19 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 6 7 -1.</_>\n        <_>\n          4 16 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 14 3 -1.</_>\n        <_>\n          4 19 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 12 -1.</_>\n        <_>\n          7 6 5 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 9 -1.</_>\n        <_>\n          7 10 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 8 7 -1.</_>\n        <_>\n          12 9 4 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 18 -1.</_>\n        <_>\n          0 1 9 9 2.</_>\n        <_>\n          9 10 9 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 6 -1.</_>\n        <_>\n          9 9 8 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 14 -1.</_>\n        <_>\n          8 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 6 -1.</_>\n        <_>\n          9 9 8 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 4 -1.</_>\n        <_>\n          5 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 6 -1.</_>\n        <_>\n          9 9 8 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 8 -1.</_>\n        <_>\n          10 9 2 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 19 -1.</_>\n        <_>\n          15 0 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 19 -1.</_>\n        <_>\n          2 0 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 2 14 -1.</_>\n        <_>\n          13 8 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 16 3 -1.</_>\n        <_>\n          0 5 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 10 -1.</_>\n        <_>\n          8 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 10 6 -1.</_>\n        <_>\n          3 17 5 3 2.</_>\n        <_>\n          8 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 2 14 -1.</_>\n        <_>\n          13 8 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 16 5 -1.</_>\n        <_>\n          5 7 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 9 -1.</_>\n        <_>\n          15 5 2 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 14 -1.</_>\n        <_>\n          7 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 12 -1.</_>\n        <_>\n          10 8 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 9 -1.</_>\n        <_>\n          9 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 7 8 -1.</_>\n        <_>\n          10 6 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 7 8 -1.</_>\n        <_>\n          2 6 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 14 3 -1.</_>\n        <_>\n          4 19 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 14 -1.</_>\n        <_>\n          5 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 7 8 -1.</_>\n        <_>\n          12 17 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 7 20 -1.</_>\n        <_>\n          6 5 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 16 4 -1.</_>\n        <_>\n          10 1 8 2 2.</_>\n        <_>\n          2 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 10 -1.</_>\n        <_>\n          4 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 8 8 -1.</_>\n        <_>\n          12 8 4 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 12 8 -1.</_>\n        <_>\n          3 10 6 4 2.</_>\n        <_>\n          9 14 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 10 -1.</_>\n        <_>\n          8 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 5 9 -1.</_>\n        <_>\n          7 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 17 3 -1.</_>\n        <_>\n          1 5 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 14 3 -1.</_>\n        <_>\n          2 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 14 2 -1.</_>\n        <_>\n          2 7 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 19 8 4 -1.</_>\n        <_>\n          10 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 5 22 -1.</_>\n        <_>\n          5 11 5 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 19 8 4 -1.</_>\n        <_>\n          10 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 8 4 -1.</_>\n        <_>\n          5 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 9 -1.</_>\n        <_>\n          8 12 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 9 5 -1.</_>\n        <_>\n          4 16 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 15 3 -1.</_>\n        <_>\n          8 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 10 14 -1.</_>\n        <_>\n          8 8 5 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 7 6 -1.</_>\n        <_>\n          10 5 7 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          9 5 3 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 9 10 -1.</_>\n        <_>\n          10 4 9 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 10 9 -1.</_>\n        <_>\n          9 4 5 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 15 7 8 -1.</_>\n        <_>\n          12 17 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 7 8 -1.</_>\n        <_>\n          0 17 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 19 4 -1.</_>\n        <_>\n          0 17 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 20 10 3 -1.</_>\n        <_>\n          9 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 15 -1.</_>\n        <_>\n          10 8 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 14 -1.</_>\n        <_>\n          4 7 2 7 2.</_>\n        <_>\n          6 14 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 2 15 -1.</_>\n        <_>\n          12 8 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 15 -1.</_>\n        <_>\n          6 8 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 4 11 -1.</_>\n        <_>\n          8 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 11 -1.</_>\n        <_>\n          9 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 3 10 -1.</_>\n        <_>\n          10 4 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 16 4 7 -1.</_>\n        <_>\n          5 16 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 16 3 -1.</_>\n        <_>\n          3 18 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 4 10 -1.</_>\n        <_>\n          2 12 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 12 6 -1.</_>\n        <_>\n          10 14 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 6 -1.</_>\n        <_>\n          3 14 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 4 -1.</_>\n        <_>\n          11 0 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 10 -1.</_>\n        <_>\n          9 0 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 3 -1.</_>\n        <_>\n          9 0 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 3 -1.</_>\n        <_>\n          5 0 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 8 -1.</_>\n        <_>\n          10 5 4 4 2.</_>\n        <_>\n          6 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 14 -1.</_>\n        <_>\n          5 6 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 10 -1.</_>\n        <_>\n          12 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 6 10 -1.</_>\n        <_>\n          5 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 6 -1.</_>\n        <_>\n          9 15 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 12 6 -1.</_>\n        <_>\n          6 15 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 5 8 -1.</_>\n        <_>\n          8 9 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 14 4 -1.</_>\n        <_>\n          7 2 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 7 -1.</_>\n        <_>\n          9 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 17 -1.</_>\n        <_>\n          7 2 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 15 -1.</_>\n        <_>\n          11 6 3 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 4 -1.</_>\n        <_>\n          4 0 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 8 8 -1.</_>\n        <_>\n          11 5 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 8 -1.</_>\n        <_>\n          0 5 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 14 -1.</_>\n        <_>\n          11 8 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 10 3 -1.</_>\n        <_>\n          9 4 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 2 11 -1.</_>\n        <_>\n          11 8 1 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 8 -1.</_>\n        <_>\n          3 17 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 8 12 -1.</_>\n        <_>\n          10 17 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 14 -1.</_>\n        <_>\n          7 8 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 2 10 -1.</_>\n        <_>\n          10 9 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 6 -1.</_>\n        <_>\n          8 11 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 16 4 -1.</_>\n        <_>\n          5 6 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 2 14 -1.</_>\n        <_>\n          12 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 14 -1.</_>\n        <_>\n          8 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 2 11 -1.</_>\n        <_>\n          11 7 1 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 11 2 -1.</_>\n        <_>\n          8 7 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 5 -1.</_>\n        <_>\n          7 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 5 -1.</_>\n        <_>\n          8 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 10 6 -1.</_>\n        <_>\n          12 17 5 3 2.</_>\n        <_>\n          7 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 15 -1.</_>\n        <_>\n          8 6 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 3 -1.</_>\n        <_>\n          5 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 14 -1.</_>\n        <_>\n          9 7 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 10 -1.</_>\n        <_>\n          10 8 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 3 9 18 -1.</_>\n        <_>\n          6 9 3 6 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 12 -1.</_>\n        <_>\n          13 0 5 6 2.</_>\n        <_>\n          8 6 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 12 11 -1.</_>\n        <_>\n          4 12 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 15 9 -1.</_>\n        <_>\n          7 7 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 10 10 -1.</_>\n        <_>\n          8 7 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 10 -1.</_>\n        <_>\n          10 8 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 18 6 5 -1.</_>\n        <_>\n          5 18 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 20 10 3 -1.</_>\n        <_>\n          9 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 14 -1.</_>\n        <_>\n          5 0 2 7 2.</_>\n        <_>\n          7 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 12 -1.</_>\n        <_>\n          13 0 5 6 2.</_>\n        <_>\n          8 6 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 8 18 -1.</_>\n        <_>\n          2 0 4 9 2.</_>\n        <_>\n          6 9 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 4 -1.</_>\n        <_>\n          10 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 9 2 -1.</_>\n        <_>\n          9 9 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 7 3 10 -1.</_>\n        <_>\n          15 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 3 10 -1.</_>\n        <_>\n          1 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 7 -1.</_>\n        <_>\n          15 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 7 -1.</_>\n        <_>\n          6 15 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 20 -1.</_>\n        <_>\n          10 2 8 10 2.</_>\n        <_>\n          2 12 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 7 6 -1.</_>\n        <_>\n          4 19 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 15 6 -1.</_>\n        <_>\n          3 18 15 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 14 3 -1.</_>\n        <_>\n          0 19 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 20 10 3 -1.</_>\n        <_>\n          9 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 18 -1.</_>\n        <_>\n          2 0 2 9 2.</_>\n        <_>\n          4 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 8 -1.</_>\n        <_>\n          10 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 8 -1.</_>\n        <_>\n          5 2 4 4 2.</_>\n        <_>\n          9 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 20 10 3 -1.</_>\n        <_>\n          9 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 3 -1.</_>\n        <_>\n          6 0 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 4 -1.</_>\n        <_>\n          10 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 4 -1.</_>\n        <_>\n          5 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 20 10 3 -1.</_>\n        <_>\n          9 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 8 2 -1.</_>\n        <_>\n          9 9 8 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 9 -1.</_>\n        <_>\n          9 7 5 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 14 -1.</_>\n        <_>\n          9 8 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 16 -1.</_>\n        <_>\n          9 6 6 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 12 16 -1.</_>\n        <_>\n          4 6 6 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 7 -1.</_>\n        <_>\n          10 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 5 6 -1.</_>\n        <_>\n          2 18 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 19 12 4 -1.</_>\n        <_>\n          11 19 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 12 4 -1.</_>\n        <_>\n          4 19 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 7 -1.</_>\n        <_>\n          10 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 9 -1.</_>\n        <_>\n          7 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 17 -1.</_>\n        <_>\n          7 3 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 14 2 -1.</_>\n        <_>\n          3 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 12 3 -1.</_>\n        <_>\n          6 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 22 -1.</_>\n        <_>\n          9 11 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 14 -1.</_>\n        <_>\n          6 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 16 -1.</_>\n        <_>\n          7 11 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 4 8 -1.</_>\n        <_>\n          1 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 15 3 -1.</_>\n        <_>\n          7 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 12 6 -1.</_>\n        <_>\n          1 17 6 3 2.</_>\n        <_>\n          7 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 9 -1.</_>\n        <_>\n          8 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 9 -1.</_>\n        <_>\n          9 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 5 20 -1.</_>\n        <_>\n          7 6 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 16 -1.</_>\n        <_>\n          3 7 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 10 -1.</_>\n        <_>\n          8 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 12 -1.</_>\n        <_>\n          5 7 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 14 -1.</_>\n        <_>\n          9 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 6 10 -1.</_>\n        <_>\n          2 6 3 5 2.</_>\n        <_>\n          5 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 14 -1.</_>\n        <_>\n          9 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 12 -1.</_>\n        <_>\n          0 10 9 6 2.</_>\n        <_>\n          9 16 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 14 -1.</_>\n        <_>\n          9 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 14 -1.</_>\n        <_>\n          8 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 18 6 -1.</_>\n        <_>\n          1 15 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 6 5 -1.</_>\n        <_>\n          4 17 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 12 6 -1.</_>\n        <_>\n          9 17 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 8 -1.</_>\n        <_>\n          4 15 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 19 3 -1.</_>\n        <_>\n          0 8 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 16 3 -1.</_>\n        <_>\n          1 9 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 7 6 -1.</_>\n        <_>\n          6 8 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 10 14 -1.</_>\n        <_>\n          4 7 5 7 2.</_>\n        <_>\n          9 14 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 10 -1.</_>\n        <_>\n          5 0 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 13 -1.</_>\n        <_>\n          7 0 5 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 6 -1.</_>\n        <_>\n          8 6 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 6 7 -1.</_>\n        <_>\n          4 16 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 8 -1.</_>\n        <_>\n          12 6 4 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 7 6 -1.</_>\n        <_>\n          7 7 7 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 3 -1.</_>\n        <_>\n          1 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 11 -1.</_>\n        <_>\n          8 4 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 7 -1.</_>\n        <_>\n          15 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 12 6 -1.</_>\n        <_>\n          3 11 6 3 2.</_>\n        <_>\n          9 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 3 16 -1.</_>\n        <_>\n          14 4 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 3 16 -1.</_>\n        <_>\n          4 4 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 8 -1.</_>\n        <_>\n          10 9 8 4 2.</_>\n        <_>\n          2 13 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 19 -1.</_>\n        <_>\n          4 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 8 10 -1.</_>\n        <_>\n          8 1 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 18 6 -1.</_>\n        <_>\n          6 14 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 15 9 -1.</_>\n        <_>\n          9 9 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 15 8 -1.</_>\n        <_>\n          5 14 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 15 3 -1.</_>\n        <_>\n          8 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 2 -1.</_>\n        <_>\n          0 16 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 17 3 -1.</_>\n        <_>\n          2 16 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 19 4 -1.</_>\n        <_>\n          0 2 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 4 -1.</_>\n        <_>\n          4 2 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 21 -1.</_>\n        <_>\n          4 0 1 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 8 4 -1.</_>\n        <_>\n          6 20 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 14 3 -1.</_>\n        <_>\n          1 19 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 9 5 -1.</_>\n        <_>\n          12 18 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 19 3 -1.</_>\n        <_>\n          0 19 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 14 -1.</_>\n        <_>\n          14 8 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 12 7 -1.</_>\n        <_>\n          5 6 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 16 -1.</_>\n        <_>\n          6 6 8 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 20 -1.</_>\n        <_>\n          4 1 8 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 4 14 -1.</_>\n        <_>\n          14 9 2 7 2.</_>\n        <_>\n          12 16 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 4 14 -1.</_>\n        <_>\n          3 9 2 7 2.</_>\n        <_>\n          5 16 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 6 10 -1.</_>\n        <_>\n          14 11 3 5 2.</_>\n        <_>\n          11 16 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 6 10 -1.</_>\n        <_>\n          2 11 3 5 2.</_>\n        <_>\n          5 16 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 16 9 -1.</_>\n        <_>\n          6 8 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 10 6 -1.</_>\n        <_>\n          2 17 5 3 2.</_>\n        <_>\n          7 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 7 -1.</_>\n        <_>\n          13 9 4 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 7 8 -1.</_>\n        <_>\n          6 9 7 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 16 -1.</_>\n        <_>\n          7 11 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 10 -1.</_>\n        <_>\n          7 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 5 -1.</_>\n        <_>\n          8 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 18 -1.</_>\n        <_>\n          5 1 8 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 14 2 -1.</_>\n        <_>\n          5 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 18 3 -1.</_>\n        <_>\n          6 20 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 14 -1.</_>\n        <_>\n          9 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 13 2 -1.</_>\n        <_>\n          2 4 13 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 16 -1.</_>\n        <_>\n          11 0 5 8 2.</_>\n        <_>\n          6 8 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 5 6 -1.</_>\n        <_>\n          2 17 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 4 8 -1.</_>\n        <_>\n          12 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 4 8 -1.</_>\n        <_>\n          3 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 10 -1.</_>\n        <_>\n          14 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 3 10 -1.</_>\n        <_>\n          2 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 12 16 -1.</_>\n        <_>\n          7 9 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 4 9 -1.</_>\n        <_>\n          8 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 10 5 -1.</_>\n        <_>\n          7 18 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 11 14 -1.</_>\n        <_>\n          4 7 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 15 -1.</_>\n        <_>\n          11 6 3 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 5 8 -1.</_>\n        <_>\n          0 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 13 -1.</_>\n        <_>\n          15 0 2 13 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 4 -1.</_>\n        <_>\n          4 0 13 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 9 5 -1.</_>\n        <_>\n          9 3 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 9 5 -1.</_>\n        <_>\n          7 3 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 12 4 -1.</_>\n        <_>\n          7 1 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 12 -1.</_>\n        <_>\n          0 8 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 5 -1.</_>\n        <_>\n          5 0 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 5 -1.</_>\n        <_>\n          9 0 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 14 -1.</_>\n        <_>\n          10 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 9 8 -1.</_>\n        <_>\n          3 7 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 16 9 -1.</_>\n        <_>\n          6 7 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 14 2 -1.</_>\n        <_>\n          7 19 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 20 10 3 -1.</_>\n        <_>\n          8 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 10 3 -1.</_>\n        <_>\n          6 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 10 -1.</_>\n        <_>\n          16 9 1 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 21 16 2 -1.</_>\n        <_>\n          8 21 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 15 3 -1.</_>\n        <_>\n          4 7 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 14 -1.</_>\n        <_>\n          7 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 10 5 -1.</_>\n        <_>\n          7 18 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 10 5 -1.</_>\n        <_>\n          7 18 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 16 -1.</_>\n        <_>\n          11 0 5 8 2.</_>\n        <_>\n          6 8 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 10 16 -1.</_>\n        <_>\n          3 0 5 8 2.</_>\n        <_>\n          8 8 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 7 4 -1.</_>\n        <_>\n          6 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 19 3 -1.</_>\n        <_>\n          0 3 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 4 -1.</_>\n        <_>\n          7 2 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 15 3 -1.</_>\n        <_>\n          0 3 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 3 -1.</_>\n        <_>\n          1 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 6 -1.</_>\n        <_>\n          3 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 10 -1.</_>\n        <_>\n          5 5 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 9 4 -1.</_>\n        <_>\n          5 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 6 -1.</_>\n        <_>\n          5 4 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 9 6 -1.</_>\n        <_>\n          1 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 14 9 -1.</_>\n        <_>\n          5 16 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 8 3 -1.</_>\n        <_>\n          7 13 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 8 2 15 -1.</_>\n        <_>\n          12 8 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 15 -1.</_>\n        <_>\n          6 8 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 14 -1.</_>\n        <_>\n          12 5 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 14 -1.</_>\n        <_>\n          6 8 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 14 -1.</_>\n        <_>\n          12 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 22 -1.</_>\n        <_>\n          0 0 4 11 2.</_>\n        <_>\n          4 11 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 4 8 -1.</_>\n        <_>\n          13 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 16 7 -1.</_>\n        <_>\n          5 13 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 4 8 -1.</_>\n        <_>\n          13 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 4 8 -1.</_>\n        <_>\n          4 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 6 -1.</_>\n        <_>\n          10 7 5 3 2.</_>\n        <_>\n          5 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 8 4 -1.</_>\n        <_>\n          4 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 15 3 -1.</_>\n        <_>\n          3 16 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 16 -1.</_>\n        <_>\n          7 2 2 8 2.</_>\n        <_>\n          9 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 12 -1.</_>\n        <_>\n          8 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 12 -1.</_>\n        <_>\n          7 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 2 -1.</_>\n        <_>\n          3 16 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 17 8 -1.</_>\n        <_>\n          0 17 17 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 9 10 -1.</_>\n        <_>\n          10 3 9 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 10 -1.</_>\n        <_>\n          7 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 7 15 -1.</_>\n        <_>\n          7 13 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 20 -1.</_>\n        <_>\n          5 0 8 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 9 5 -1.</_>\n        <_>\n          12 18 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 9 5 -1.</_>\n        <_>\n          4 18 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 8 12 -1.</_>\n        <_>\n          12 7 4 6 2.</_>\n        <_>\n          8 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 4 13 -1.</_>\n        <_>\n          4 9 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 4 -1.</_>\n        <_>\n          12 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 3 -1.</_>\n        <_>\n          0 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 7 -1.</_>\n        <_>\n          1 16 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 15 5 -1.</_>\n        <_>\n          5 18 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 8 -1.</_>\n        <_>\n          10 5 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 8 -1.</_>\n        <_>\n          7 5 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 5 -1.</_>\n        <_>\n          7 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 15 -1.</_>\n        <_>\n          7 2 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 4 -1.</_>\n        <_>\n          4 0 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 14 -1.</_>\n        <_>\n          5 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 14 4 -1.</_>\n        <_>\n          5 17 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 2 14 -1.</_>\n        <_>\n          3 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 7 -1.</_>\n        <_>\n          12 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 7 -1.</_>\n        <_>\n          5 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 15 -1.</_>\n        <_>\n          11 5 3 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 15 -1.</_>\n        <_>\n          5 5 3 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 2 16 -1.</_>\n        <_>\n          16 5 1 16 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 16 2 -1.</_>\n        <_>\n          3 5 16 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 9 -1.</_>\n        <_>\n          11 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 4 -1.</_>\n        <_>\n          7 6 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 8 -1.</_>\n        <_>\n          14 0 4 4 2.</_>\n        <_>\n          10 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 4 -1.</_>\n        <_>\n          7 0 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 9 -1.</_>\n        <_>\n          11 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 10 -1.</_>\n        <_>\n          5 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 6 5 -1.</_>\n        <_>\n          11 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 6 9 -1.</_>\n        <_>\n          6 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 7 4 -1.</_>\n        <_>\n          12 12 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 8 -1.</_>\n        <_>\n          1 0 4 4 2.</_>\n        <_>\n          5 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 9 10 -1.</_>\n        <_>\n          10 4 9 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 8 -1.</_>\n        <_>\n          1 1 6 4 2.</_>\n        <_>\n          7 5 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 16 2 -1.</_>\n        <_>\n          2 14 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 14 -1.</_>\n        <_>\n          8 3 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 7 -1.</_>\n        <_>\n          9 1 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 12 -1.</_>\n        <_>\n          3 14 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 7 -1.</_>\n        <_>\n          10 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 6 7 -1.</_>\n        <_>\n          7 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 14 8 -1.</_>\n        <_>\n          5 7 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 5 -1.</_>\n        <_>\n          5 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 4 7 -1.</_>\n        <_>\n          12 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 4 7 -1.</_>\n        <_>\n          5 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 12 -1.</_>\n        <_>\n          13 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 4 12 -1.</_>\n        <_>\n          2 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 16 8 -1.</_>\n        <_>\n          10 2 8 4 2.</_>\n        <_>\n          2 6 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 9 -1.</_>\n        <_>\n          7 5 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 12 -1.</_>\n        <_>\n          8 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 3 15 -1.</_>\n        <_>\n          3 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 16 4 -1.</_>\n        <_>\n          5 8 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 8 -1.</_>\n        <_>\n          10 0 4 4 2.</_>\n        <_>\n          6 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 2 14 -1.</_>\n        <_>\n          9 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 10 -1.</_>\n        <_>\n          8 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 14 -1.</_>\n        <_>\n          9 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 16 -1.</_>\n        <_>\n          6 11 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 16 -1.</_>\n        <_>\n          5 0 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 11 -1.</_>\n        <_>\n          13 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 14 3 -1.</_>\n        <_>\n          7 18 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 11 -1.</_>\n        <_>\n          9 9 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 16 9 -1.</_>\n        <_>\n          5 7 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 7 -1.</_>\n        <_>\n          11 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 12 12 -1.</_>\n        <_>\n          7 15 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 7 -1.</_>\n        <_>\n          11 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 10 -1.</_>\n        <_>\n          6 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 14 -1.</_>\n        <_>\n          13 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 14 -1.</_>\n        <_>\n          5 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 16 -1.</_>\n        <_>\n          7 11 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 4 7 -1.</_>\n        <_>\n          4 16 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 9 6 -1.</_>\n        <_>\n          12 17 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 6 7 -1.</_>\n        <_>\n          4 16 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 5 6 -1.</_>\n        <_>\n          14 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 6 -1.</_>\n        <_>\n          6 0 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 7 -1.</_>\n        <_>\n          4 0 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 22 -1.</_>\n        <_>\n          5 11 9 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 8 4 -1.</_>\n        <_>\n          11 10 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 8 -1.</_>\n        <_>\n          9 0 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 17 14 2 -1.</_>\n        <_>\n          5 18 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 14 3 -1.</_>\n        <_>\n          1 18 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 12 -1.</_>\n        <_>\n          10 5 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 12 -1.</_>\n        <_>\n          5 5 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 7 18 -1.</_>\n        <_>\n          6 9 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 9 -1.</_>\n        <_>\n          3 0 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 14 -1.</_>\n        <_>\n          10 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 5 9 -1.</_>\n        <_>\n          7 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 14 -1.</_>\n        <_>\n          10 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 14 -1.</_>\n        <_>\n          8 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 8 -1.</_>\n        <_>\n          12 10 5 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 10 7 -1.</_>\n        <_>\n          8 6 5 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 15 7 4 -1.</_>\n        <_>\n          12 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 7 4 -1.</_>\n        <_>\n          0 17 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 16 -1.</_>\n        <_>\n          15 6 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 4 8 -1.</_>\n        <_>\n          3 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 19 3 -1.</_>\n        <_>\n          0 15 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 4 7 -1.</_>\n        <_>\n          3 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 11 -1.</_>\n        <_>\n          14 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 6 -1.</_>\n        <_>\n          0 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 3 -1.</_>\n        <_>\n          4 0 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 14 3 -1.</_>\n        <_>\n          8 0 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 7 4 -1.</_>\n        <_>\n          12 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 7 4 -1.</_>\n        <_>\n          0 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 4 7 -1.</_>\n        <_>\n          10 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 4 11 -1.</_>\n        <_>\n          3 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 4 -1.</_>\n        <_>\n          2 11 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 9 3 -1.</_>\n        <_>\n          6 12 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 16 -1.</_>\n        <_>\n          8 6 6 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 14 4 -1.</_>\n        <_>\n          2 6 7 2 2.</_>\n        <_>\n          9 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 6 -1.</_>\n        <_>\n          10 6 5 3 2.</_>\n        <_>\n          5 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 2 14 -1.</_>\n        <_>\n          1 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 9 5 -1.</_>\n        <_>\n          13 18 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 10 3 -1.</_>\n        <_>\n          3 10 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 18 9 5 -1.</_>\n        <_>\n          13 18 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 9 5 -1.</_>\n        <_>\n          3 18 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 9 -1.</_>\n        <_>\n          9 8 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 9 -1.</_>\n        <_>\n          6 8 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 14 -1.</_>\n        <_>\n          10 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 20 15 3 -1.</_>\n        <_>\n          7 20 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 5 -1.</_>\n        <_>\n          8 4 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 14 -1.</_>\n        <_>\n          7 6 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 2 14 -1.</_>\n        <_>\n          10 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 14 -1.</_>\n        <_>\n          8 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 8 -1.</_>\n        <_>\n          12 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 3 -1.</_>\n        <_>\n          0 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 10 3 -1.</_>\n        <_>\n          5 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 7 4 -1.</_>\n        <_>\n          6 20 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 9 -1.</_>\n        <_>\n          5 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 7 -1.</_>\n        <_>\n          15 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 10 -1.</_>\n        <_>\n          5 13 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 4 10 -1.</_>\n        <_>\n          12 12 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 4 7 -1.</_>\n        <_>\n          5 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 14 -1.</_>\n        <_>\n          15 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 12 -1.</_>\n        <_>\n          2 0 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 19 14 4 -1.</_>\n        <_>\n          12 19 7 2 2.</_>\n        <_>\n          5 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 9 10 -1.</_>\n        <_>\n          0 17 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 5 6 -1.</_>\n        <_>\n          14 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 8 4 -1.</_>\n        <_>\n          0 18 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 16 3 -1.</_>\n        <_>\n          3 17 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 5 -1.</_>\n        <_>\n          6 0 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 17 10 -1.</_>\n        <_>\n          0 5 17 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 15 -1.</_>\n        <_>\n          9 1 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 20 -1.</_>\n        <_>\n          0 7 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 10 -1.</_>\n        <_>\n          8 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 10 -1.</_>\n        <_>\n          7 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 17 -1.</_>\n        <_>\n          12 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 17 -1.</_>\n        <_>\n          6 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 14 -1.</_>\n        <_>\n          13 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 10 -1.</_>\n        <_>\n          9 2 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 21 14 2 -1.</_>\n        <_>\n          4 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 4 -1.</_>\n        <_>\n          9 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 8 -1.</_>\n        <_>\n          10 0 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 6 -1.</_>\n        <_>\n          3 0 6 3 2.</_>\n        <_>\n          9 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 8 -1.</_>\n        <_>\n          10 8 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 12 8 -1.</_>\n        <_>\n          4 13 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 8 -1.</_>\n        <_>\n          10 8 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 8 -1.</_>\n        <_>\n          7 8 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 8 10 -1.</_>\n        <_>\n          9 13 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 8 9 -1.</_>\n        <_>\n          6 14 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 9 5 -1.</_>\n        <_>\n          12 15 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 4 7 -1.</_>\n        <_>\n          9 15 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 12 4 -1.</_>\n        <_>\n          4 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 6 8 -1.</_>\n        <_>\n          8 15 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 8 -1.</_>\n        <_>\n          12 5 4 4 2.</_>\n        <_>\n          8 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 7 4 -1.</_>\n        <_>\n          0 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 8 -1.</_>\n        <_>\n          11 3 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 12 17 3 -1.</_>\n        <_>\n          1 13 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 4 15 -1.</_>\n        <_>\n          14 8 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 14 3 -1.</_>\n        <_>\n          2 13 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 7 6 -1.</_>\n        <_>\n          6 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 12 6 -1.</_>\n        <_>\n          2 2 6 3 2.</_>\n        <_>\n          8 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 5 -1.</_>\n        <_>\n          11 0 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 5 -1.</_>\n        <_>\n          4 0 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 20 -1.</_>\n        <_>\n          1 2 9 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 8 -1.</_>\n        <_>\n          9 5 5 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 7 10 -1.</_>\n        <_>\n          7 13 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 14 -1.</_>\n        <_>\n          8 7 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 4 16 -1.</_>\n        <_>\n          15 7 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 7 -1.</_>\n        <_>\n          4 0 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 4 7 -1.</_>\n        <_>\n          11 7 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 15 -1.</_>\n        <_>\n          7 4 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 13 -1.</_>\n        <_>\n          9 10 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 4 7 -1.</_>\n        <_>\n          3 14 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 14 -1.</_>\n        <_>\n          12 1 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 8 -1.</_>\n        <_>\n          7 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 7 -1.</_>\n        <_>\n          11 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 7 -1.</_>\n        <_>\n          6 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 9 9 -1.</_>\n        <_>\n          10 5 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 12 12 -1.</_>\n        <_>\n          6 5 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 14 4 -1.</_>\n        <_>\n          11 19 7 2 2.</_>\n        <_>\n          4 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 14 4 -1.</_>\n        <_>\n          1 19 7 2 2.</_>\n        <_>\n          8 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 9 5 -1.</_>\n        <_>\n          12 18 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 9 5 -1.</_>\n        <_>\n          4 18 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 8 6 -1.</_>\n        <_>\n          11 4 4 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 8 7 6 -1.</_>\n        <_>\n          6 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 14 2 -1.</_>\n        <_>\n          5 18 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 3 -1.</_>\n        <_>\n          5 7 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 11 -1.</_>\n        <_>\n          13 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 4 11 -1.</_>\n        <_>\n          4 9 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 14 -1.</_>\n        <_>\n          13 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 14 -1.</_>\n        <_>\n          5 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 5 6 -1.</_>\n        <_>\n          7 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 17 4 -1.</_>\n        <_>\n          0 14 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 10 -1.</_>\n        <_>\n          12 7 2 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 12 -1.</_>\n        <_>\n          6 13 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 8 -1.</_>\n        <_>\n          7 15 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 8 -1.</_>\n        <_>\n          10 0 4 4 2.</_>\n        <_>\n          6 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 7 8 -1.</_>\n        <_>\n          0 17 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 8 -1.</_>\n        <_>\n          8 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 14 -1.</_>\n        <_>\n          6 8 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 7 4 -1.</_>\n        <_>\n          12 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 4 -1.</_>\n        <_>\n          0 13 7 2 2.</_>\n        <_>\n          7 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 7 8 -1.</_>\n        <_>\n          6 15 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 15 -1.</_>\n        <_>\n          8 7 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 5 6 -1.</_>\n        <_>\n          11 19 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 10 -1.</_>\n        <_>\n          4 0 3 5 2.</_>\n        <_>\n          7 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 7 6 -1.</_>\n        <_>\n          9 12 7 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 2 -1.</_>\n        <_>\n          9 0 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 8 -1.</_>\n        <_>\n          10 10 9 4 2.</_>\n        <_>\n          1 14 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 15 3 -1.</_>\n        <_>\n          1 19 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 14 3 -1.</_>\n        <_>\n          4 19 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 19 18 -1.</_>\n        <_>\n          0 9 19 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 11 20 -1.</_>\n        <_>\n          4 10 11 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 18 -1.</_>\n        <_>\n          5 9 9 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 20 -1.</_>\n        <_>\n          9 10 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 6 -1.</_>\n        <_>\n          1 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 6 6 -1.</_>\n        <_>\n          12 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 2 14 -1.</_>\n        <_>\n          4 8 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 5 12 -1.</_>\n        <_>\n          7 15 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 5 12 -1.</_>\n        <_>\n          5 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 16 -1.</_>\n        <_>\n          15 0 2 8 2.</_>\n        <_>\n          13 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 8 -1.</_>\n        <_>\n          7 0 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 7 -1.</_>\n        <_>\n          15 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 7 8 -1.</_>\n        <_>\n          0 10 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 7 6 -1.</_>\n        <_>\n          6 8 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 14 -1.</_>\n        <_>\n          7 8 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 6 6 -1.</_>\n        <_>\n          13 17 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 12 -1.</_>\n        <_>\n          5 17 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 6 6 -1.</_>\n        <_>\n          13 17 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 14 -1.</_>\n        <_>\n          0 15 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 6 5 -1.</_>\n        <_>\n          13 18 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 14 -1.</_>\n        <_>\n          5 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 8 -1.</_>\n        <_>\n          15 11 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 3 12 -1.</_>\n        <_>\n          1 17 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 6 5 -1.</_>\n        <_>\n          12 18 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 4 8 -1.</_>\n        <_>\n          0 19 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 8 -1.</_>\n        <_>\n          15 11 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 8 -1.</_>\n        <_>\n          2 11 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 14 3 -1.</_>\n        <_>\n          5 18 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 7 6 -1.</_>\n        <_>\n          0 17 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 4 10 -1.</_>\n        <_>\n          10 8 2 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 11 16 7 -1.</_>\n        <_>\n          5 11 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 16 -1.</_>\n        <_>\n          8 0 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 14 -1.</_>\n        <_>\n          7 6 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 15 -1.</_>\n        <_>\n          12 5 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 10 4 -1.</_>\n        <_>\n          9 8 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 14 -1.</_>\n        <_>\n          8 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 14 -1.</_>\n        <_>\n          9 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 18 9 -1.</_>\n        <_>\n          7 17 6 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 7 9 -1.</_>\n        <_>\n          6 12 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 18 2 -1.</_>\n        <_>\n          1 12 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 16 -1.</_>\n        <_>\n          7 11 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 15 3 -1.</_>\n        <_>\n          2 11 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 7 9 -1.</_>\n        <_>\n          6 15 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 15 3 -1.</_>\n        <_>\n          4 11 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 14 4 -1.</_>\n        <_>\n          0 19 7 2 2.</_>\n        <_>\n          7 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 14 3 -1.</_>\n        <_>\n          5 18 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 3 14 -1.</_>\n        <_>\n          2 7 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 7 -1.</_>\n        <_>\n          11 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 7 -1.</_>\n        <_>\n          6 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 6 -1.</_>\n        <_>\n          6 5 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 16 -1.</_>\n        <_>\n          6 2 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 15 -1.</_>\n        <_>\n          16 4 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 6 5 -1.</_>\n        <_>\n          6 12 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 14 -1.</_>\n        <_>\n          9 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 7 4 -1.</_>\n        <_>\n          0 18 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 14 3 -1.</_>\n        <_>\n          5 17 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 15 -1.</_>\n        <_>\n          1 4 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 8 6 -1.</_>\n        <_>\n          10 4 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 6 -1.</_>\n        <_>\n          1 4 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 16 -1.</_>\n        <_>\n          12 6 2 8 2.</_>\n        <_>\n          10 14 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 18 -1.</_>\n        <_>\n          7 1 2 9 2.</_>\n        <_>\n          9 10 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 7 -1.</_>\n        <_>\n          8 4 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 7 -1.</_>\n        <_>\n          9 4 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 14 -1.</_>\n        <_>\n          7 0 6 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 2 14 -1.</_>\n        <_>\n          3 1 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 14 4 -1.</_>\n        <_>\n          0 18 7 2 2.</_>\n        <_>\n          7 20 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 8 -1.</_>\n        <_>\n          10 0 4 4 2.</_>\n        <_>\n          6 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 10 -1.</_>\n        <_>\n          4 9 3 5 2.</_>\n        <_>\n          7 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 6 -1.</_>\n        <_>\n          10 17 9 3 2.</_>\n        <_>\n          1 20 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 21 -1.</_>\n        <_>\n          7 7 2 7 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 7 -1.</_>\n        <_>\n          6 7 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 3 -1.</_>\n        <_>\n          7 0 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 5 -1.</_>\n        <_>\n          8 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 3 14 -1.</_>\n        <_>\n          8 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 16 9 -1.</_>\n        <_>\n          3 17 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 6 6 -1.</_>\n        <_>\n          4 17 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 20 -1.</_>\n        <_>\n          5 6 10 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 12 7 -1.</_>\n        <_>\n          4 16 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 4 -1.</_>\n        <_>\n          5 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 6 -1.</_>\n        <_>\n          3 2 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 7 8 -1.</_>\n        <_>\n          11 15 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 8 -1.</_>\n        <_>\n          3 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 9 6 -1.</_>\n        <_>\n          12 17 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 7 6 -1.</_>\n        <_>\n          6 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 7 6 -1.</_>\n        <_>\n          8 19 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 5 8 -1.</_>\n        <_>\n          5 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 19 2 -1.</_>\n        <_>\n          0 16 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 7 4 -1.</_>\n        <_>\n          6 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 21 -1.</_>\n        <_>\n          9 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 15 4 -1.</_>\n        <_>\n          5 19 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 20 10 3 -1.</_>\n        <_>\n          9 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 15 3 -1.</_>\n        <_>\n          0 18 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 6 5 -1.</_>\n        <_>\n          12 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 7 6 -1.</_>\n        <_>\n          6 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 3 -1.</_>\n        <_>\n          3 16 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 10 3 -1.</_>\n        <_>\n          5 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 4 -1.</_>\n        <_>\n          6 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 7 6 -1.</_>\n        <_>\n          1 19 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 12 4 -1.</_>\n        <_>\n          11 17 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 7 -1.</_>\n        <_>\n          5 15 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 7 -1.</_>\n        <_>\n          6 7 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 12 12 -1.</_>\n        <_>\n          1 13 12 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 5 9 -1.</_>\n        <_>\n          12 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 5 9 -1.</_>\n        <_>\n          2 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 7 -1.</_>\n        <_>\n          14 8 2 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 8 10 -1.</_>\n        <_>\n          5 9 4 5 2.</_>\n        <_>\n          9 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 6 -1.</_>\n        <_>\n          10 11 8 3 2.</_>\n        <_>\n          2 14 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 16 -1.</_>\n        <_>\n          9 4 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 14 -1.</_>\n        <_>\n          9 9 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 4 14 -1.</_>\n        <_>\n          8 9 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 12 4 -1.</_>\n        <_>\n          11 17 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 12 4 -1.</_>\n        <_>\n          4 17 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 10 -1.</_>\n        <_>\n          16 12 3 5 2.</_>\n        <_>\n          13 17 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 6 -1.</_>\n        <_>\n          3 17 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 6 8 -1.</_>\n        <_>\n          12 4 3 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 10 15 -1.</_>\n        <_>\n          8 6 5 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 7 4 -1.</_>\n        <_>\n          10 10 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 9 9 7 -1.</_>\n        <_>\n          4 9 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 6 -1.</_>\n        <_>\n          10 17 9 3 2.</_>\n        <_>\n          1 20 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 13 3 -1.</_>\n        <_>\n          5 1 13 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 9 -1.</_>\n        <_>\n          11 1 1 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 9 3 -1.</_>\n        <_>\n          8 1 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 12 12 -1.</_>\n        <_>\n          13 1 6 6 2.</_>\n        <_>\n          7 7 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 8 6 -1.</_>\n        <_>\n          7 4 8 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 11 8 4 -1.</_>\n        <_>\n          11 11 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 8 -1.</_>\n        <_>\n          8 11 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 7 4 -1.</_>\n        <_>\n          10 10 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 10 4 7 -1.</_>\n        <_>\n          9 10 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 14 -1.</_>\n        <_>\n          9 7 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 10 7 -1.</_>\n        <_>\n          8 6 5 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 16 3 -1.</_>\n        <_>\n          3 7 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 2 17 -1.</_>\n        <_>\n          5 5 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 18 -1.</_>\n        <_>\n          15 0 3 9 2.</_>\n        <_>\n          12 9 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 16 -1.</_>\n        <_>\n          3 4 3 8 2.</_>\n        <_>\n          6 12 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 18 -1.</_>\n        <_>\n          15 0 3 9 2.</_>\n        <_>\n          12 9 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 4 -1.</_>\n        <_>\n          0 1 8 2 2.</_>\n        <_>\n          8 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 12 5 -1.</_>\n        <_>\n          6 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 10 -1.</_>\n        <_>\n          3 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 7 12 -1.</_>\n        <_>\n          11 7 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 8 6 -1.</_>\n        <_>\n          0 8 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 7 6 -1.</_>\n        <_>\n          12 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 7 6 -1.</_>\n        <_>\n          0 5 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 8 -1.</_>\n        <_>\n          15 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 14 2 -1.</_>\n        <_>\n          0 18 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 8 -1.</_>\n        <_>\n          15 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 14 2 -1.</_>\n        <_>\n          0 18 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 8 -1.</_>\n        <_>\n          10 0 4 4 2.</_>\n        <_>\n          6 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 8 -1.</_>\n        <_>\n          2 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 14 -1.</_>\n        <_>\n          14 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 7 -1.</_>\n        <_>\n          8 0 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 8 -1.</_>\n        <_>\n          10 0 4 4 2.</_>\n        <_>\n          6 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 8 -1.</_>\n        <_>\n          5 0 4 4 2.</_>\n        <_>\n          9 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 16 7 -1.</_>\n        <_>\n          3 7 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 16 7 -1.</_>\n        <_>\n          8 7 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 10 8 -1.</_>\n        <_>\n          7 11 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 9 -1.</_>\n        <_>\n          14 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 9 -1.</_>\n        <_>\n          3 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 14 11 -1.</_>\n        <_>\n          4 3 7 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 13 3 -1.</_>\n        <_>\n          4 6 13 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 14 12 -1.</_>\n        <_>\n          1 0 7 6 2.</_>\n        <_>\n          8 6 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 4 -1.</_>\n        <_>\n          10 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 12 -1.</_>\n        <_>\n          5 10 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 22 -1.</_>\n        <_>\n          11 11 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 14 4 -1.</_>\n        <_>\n          0 19 7 2 2.</_>\n        <_>\n          7 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 8 -1.</_>\n        <_>\n          10 8 1 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 14 -1.</_>\n        <_>\n          5 0 2 7 2.</_>\n        <_>\n          7 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 4 10 -1.</_>\n        <_>\n          8 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 8 2 -1.</_>\n        <_>\n          9 8 8 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 19 3 -1.</_>\n        <_>\n          0 8 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 19 2 -1.</_>\n        <_>\n          0 9 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 18 4 -1.</_>\n        <_>\n          10 6 9 2 2.</_>\n        <_>\n          1 8 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 8 18 -1.</_>\n        <_>\n          6 1 4 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 10 12 -1.</_>\n        <_>\n          11 11 5 6 2.</_>\n        <_>\n          6 17 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 9 11 -1.</_>\n        <_>\n          6 7 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 14 -1.</_>\n        <_>\n          11 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 12 7 -1.</_>\n        <_>\n          6 16 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 15 6 -1.</_>\n        <_>\n          7 15 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 7 -1.</_>\n        <_>\n          7 2 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 14 -1.</_>\n        <_>\n          9 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 14 -1.</_>\n        <_>\n          8 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 12 5 -1.</_>\n        <_>\n          11 18 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 15 3 -1.</_>\n        <_>\n          1 19 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 9 6 -1.</_>\n        <_>\n          12 17 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 6 -1.</_>\n        <_>\n          5 10 9 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 10 4 9 -1.</_>\n        <_>\n          12 11 2 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 9 4 -1.</_>\n        <_>\n          7 11 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 16 -1.</_>\n        <_>\n          15 11 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 5 6 -1.</_>\n        <_>\n          1 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 5 6 -1.</_>\n        <_>\n          12 19 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 3 14 -1.</_>\n        <_>\n          6 2 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 9 6 -1.</_>\n        <_>\n          12 17 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 9 -1.</_>\n        <_>\n          8 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 10 5 -1.</_>\n        <_>\n          7 7 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 20 -1.</_>\n        <_>\n          6 0 2 10 2.</_>\n        <_>\n          8 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 3 9 -1.</_>\n        <_>\n          14 11 1 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 3 -1.</_>\n        <_>\n          5 11 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 21 14 2 -1.</_>\n        <_>\n          5 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 14 -1.</_>\n        <_>\n          9 6 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 9 -1.</_>\n        <_>\n          8 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 9 -1.</_>\n        <_>\n          9 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 12 6 -1.</_>\n        <_>\n          13 17 6 3 2.</_>\n        <_>\n          7 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 10 6 -1.</_>\n        <_>\n          8 4 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 8 -1.</_>\n        <_>\n          15 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 8 -1.</_>\n        <_>\n          5 5 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 8 -1.</_>\n        <_>\n          15 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 8 -1.</_>\n        <_>\n          0 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 5 -1.</_>\n        <_>\n          10 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 5 -1.</_>\n        <_>\n          6 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 14 2 -1.</_>\n        <_>\n          5 21 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 8 9 -1.</_>\n        <_>\n          9 3 4 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 8 -1.</_>\n        <_>\n          12 1 6 4 2.</_>\n        <_>\n          6 5 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 10 11 -1.</_>\n        <_>\n          9 10 5 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 15 -1.</_>\n        <_>\n          13 1 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 8 12 -1.</_>\n        <_>\n          8 3 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 10 8 -1.</_>\n        <_>\n          8 2 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 19 6 -1.</_>\n        <_>\n          0 6 19 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 11 16 -1.</_>\n        <_>\n          4 4 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 5 -1.</_>\n        <_>\n          7 1 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 14 18 -1.</_>\n        <_>\n          10 5 7 9 2.</_>\n        <_>\n          3 14 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 5 6 -1.</_>\n        <_>\n          1 20 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 14 -1.</_>\n        <_>\n          15 0 2 7 2.</_>\n        <_>\n          13 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 14 -1.</_>\n        <_>\n          2 0 2 7 2.</_>\n        <_>\n          4 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 2 10 -1.</_>\n        <_>\n          10 2 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 9 3 -1.</_>\n        <_>\n          8 2 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 2 10 6 -1.</_>\n        <_>\n          11 2 5 3 2.</_>\n        <_>\n          6 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 6 -1.</_>\n        <_>\n          1 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 10 6 -1.</_>\n        <_>\n          11 2 5 3 2.</_>\n        <_>\n          6 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 10 6 -1.</_>\n        <_>\n          3 2 5 3 2.</_>\n        <_>\n          8 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 5 20 -1.</_>\n        <_>\n          7 5 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 12 7 -1.</_>\n        <_>\n          5 10 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 14 4 -1.</_>\n        <_>\n          0 18 7 2 2.</_>\n        <_>\n          7 20 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 15 -1.</_>\n        <_>\n          10 7 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 5 -1.</_>\n        <_>\n          9 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 2 17 -1.</_>\n        <_>\n          9 4 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 2 17 -1.</_>\n        <_>\n          9 4 1 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 9 5 -1.</_>\n        <_>\n          11 18 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 9 5 -1.</_>\n        <_>\n          5 18 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 6 5 -1.</_>\n        <_>\n          12 18 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 6 5 -1.</_>\n        <_>\n          8 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 10 -1.</_>\n        <_>\n          15 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 9 -1.</_>\n        <_>\n          2 17 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 10 -1.</_>\n        <_>\n          15 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 10 -1.</_>\n        <_>\n          2 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 12 -1.</_>\n        <_>\n          12 5 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 18 7 4 -1.</_>\n        <_>\n          6 20 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 4 12 -1.</_>\n        <_>\n          15 8 2 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 12 4 -1.</_>\n        <_>\n          4 8 12 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 13 5 9 -1.</_>\n        <_>\n          14 16 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 5 9 -1.</_>\n        <_>\n          0 16 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 7 6 -1.</_>\n        <_>\n          12 16 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 6 6 -1.</_>\n        <_>\n          1 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 4 -1.</_>\n        <_>\n          7 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 3 -1.</_>\n        <_>\n          0 10 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 9 6 -1.</_>\n        <_>\n          12 17 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 15 9 -1.</_>\n        <_>\n          7 17 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 8 8 -1.</_>\n        <_>\n          9 17 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 14 -1.</_>\n        <_>\n          5 9 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 13 -1.</_>\n        <_>\n          12 10 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 4 13 -1.</_>\n        <_>\n          5 10 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 2 -1.</_>\n        <_>\n          5 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 14 2 -1.</_>\n        <_>\n          7 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 10 -1.</_>\n        <_>\n          16 12 3 5 2.</_>\n        <_>\n          13 17 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 10 -1.</_>\n        <_>\n          0 12 3 5 2.</_>\n        <_>\n          3 17 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 5 12 -1.</_>\n        <_>\n          12 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 5 12 -1.</_>\n        <_>\n          2 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 7 4 -1.</_>\n        <_>\n          6 10 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 14 3 -1.</_>\n        <_>\n          0 18 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 15 -1.</_>\n        <_>\n          12 7 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 9 6 -1.</_>\n        <_>\n          4 17 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 9 7 -1.</_>\n        <_>\n          13 9 3 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 7 9 -1.</_>\n        <_>\n          6 9 7 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 10 4 -1.</_>\n        <_>\n          5 10 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 14 -1.</_>\n        <_>\n          0 13 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 22 -1.</_>\n        <_>\n          10 1 9 11 2.</_>\n        <_>\n          1 12 9 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 17 3 -1.</_>\n        <_>\n          1 6 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 5 -1.</_>\n        <_>\n          13 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 16 3 -1.</_>\n        <_>\n          0 6 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 17 -1.</_>\n        <_>\n          12 6 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 6 17 -1.</_>\n        <_>\n          4 6 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 18 2 -1.</_>\n        <_>\n          1 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 2 16 -1.</_>\n        <_>\n          1 5 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 4 10 -1.</_>\n        <_>\n          15 17 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 16 3 -1.</_>\n        <_>\n          1 6 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 12 -1.</_>\n        <_>\n          6 12 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 8 -1.</_>\n        <_>\n          3 17 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 8 8 -1.</_>\n        <_>\n          9 17 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 10 -1.</_>\n        <_>\n          5 0 4 5 2.</_>\n        <_>\n          9 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 6 -1.</_>\n        <_>\n          10 4 9 3 2.</_>\n        <_>\n          1 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 9 6 -1.</_>\n        <_>\n          3 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 14 4 -1.</_>\n        <_>\n          3 18 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 9 6 -1.</_>\n        <_>\n          2 5 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 19 3 -1.</_>\n        <_>\n          0 4 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 16 4 -1.</_>\n        <_>\n          1 4 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 14 -1.</_>\n        <_>\n          14 0 3 7 2.</_>\n        <_>\n          11 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 9 6 -1.</_>\n        <_>\n          3 17 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 8 7 -1.</_>\n        <_>\n          9 16 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 10 5 -1.</_>\n        <_>\n          8 14 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 14 -1.</_>\n        <_>\n          13 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 14 -1.</_>\n        <_>\n          5 9 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 14 -1.</_>\n        <_>\n          13 9 3 7 2.</_>\n        <_>\n          10 16 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 5 -1.</_>\n        <_>\n          9 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 8 -1.</_>\n        <_>\n          7 4 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 11 21 -1.</_>\n        <_>\n          2 7 11 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 12 -1.</_>\n        <_>\n          8 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 6 14 -1.</_>\n        <_>\n          3 9 3 7 2.</_>\n        <_>\n          6 16 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 8 7 -1.</_>\n        <_>\n          12 7 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 8 7 -1.</_>\n        <_>\n          3 7 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 9 20 -1.</_>\n        <_>\n          8 2 3 20 3.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_profileface.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    20x20 profile face detector.\n    Contributed by David Bradley from Princeton University.\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's 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   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>20</height>\n  <width>20</width>\n  <stageParams>\n    <maxWeakCount>195</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>26</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>3</maxWeakCount>\n      <stageThreshold>-1.1856809854507446e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 1.1384399840608239e-03</internalNodes>\n          <leafValues>\n            -8.3771979808807373e-01 7.3413830995559692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 -1.1342350393533707e-02</internalNodes>\n          <leafValues>\n            6.2702018022537231e-01 -7.2396302223205566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 -1.1023089755326509e-03</internalNodes>\n          <leafValues>\n            3.7600189447402954e-01 -6.6088408231735229e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>12</maxWeakCount>\n      <stageThreshold>-1.4913179874420166e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 3 -1.9553869962692261e-02</internalNodes>\n          <leafValues>\n            4.9245831370353699e-01 -6.3396167755126953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 2.2794529795646667e-03</internalNodes>\n          <leafValues>\n            -6.4604967832565308e-01 3.5818460583686829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 2.4270440917462111e-03</internalNodes>\n          <leafValues>\n            -4.7253230214118958e-01 2.8494310379028320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 1.9644061103463173e-03</internalNodes>\n          <leafValues>\n            1.6999539732933044e-01 -7.7868157625198364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 2.2895270958542824e-03</internalNodes>\n          <leafValues>\n            1.5551710128784180e-01 -6.6725099086761475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 -3.0143910553306341e-03</internalNodes>\n          <leafValues>\n            -6.8721300363540649e-01 1.4604569971561432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 -1.7399009317159653e-02</internalNodes>\n          <leafValues>\n            7.2524380683898926e-01 -1.6572900116443634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 9.0722442837432027e-04</internalNodes>\n          <leafValues>\n            -4.6388080716133118e-01 2.3604999482631683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 -1.5043979510664940e-03</internalNodes>\n          <leafValues>\n            -7.5959628820419312e-01 1.1436919867992401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 1.0804689675569534e-01</internalNodes>\n          <leafValues>\n            -1.2865519523620605e-01 7.9092341661453247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 -1.1923050042241812e-03</internalNodes>\n          <leafValues>\n            -6.2403547763824463e-01 1.4847490191459656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -2.0571390166878700e-02</internalNodes>\n          <leafValues>\n            4.0808489918708801e-01 -2.1287000179290771e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>27</maxWeakCount>\n      <stageThreshold>-1.9596290588378906e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 15 -3.6899209022521973e-02</internalNodes>\n          <leafValues>\n            5.3308618068695068e-01 -4.0872651338577271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 2.4960909504443407e-03</internalNodes>\n          <leafValues>\n            -6.9489312171936035e-01 2.7125179767608643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 2.4068039783742279e-04</internalNodes>\n          <leafValues>\n            -5.6208252906799316e-01 2.1930350363254547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 -5.8021828532218933e-02</internalNodes>\n          <leafValues>\n            6.9060617685317993e-01 -1.5082140266895294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 1.1526979506015778e-03</internalNodes>\n          <leafValues>\n            1.3925389945507050e-01 -6.6311657428741455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 7.4388440698385239e-03</internalNodes>\n          <leafValues>\n            -3.3333170413970947e-01 3.1699380278587341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 -1.4158539706841111e-03</internalNodes>\n          <leafValues>\n            -6.8007302284240723e-01 1.3243320584297180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 8.8562711607664824e-04</internalNodes>\n          <leafValues>\n            -3.8672161102294922e-01 1.9732959568500519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 2.5714060757309198e-03</internalNodes>\n          <leafValues>\n            1.2035659700632095e-01 -7.3177069425582886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 1.8255549948662519e-03</internalNodes>\n          <leafValues>\n            7.7979840338230133e-02 -7.7196091413497925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 -1.1993020307272673e-03</internalNodes>\n          <leafValues>\n            1.6821229457855225e-01 -4.1479128599166870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 2.3179080337285995e-02</internalNodes>\n          <leafValues>\n            7.5337320566177368e-02 -7.1047067642211914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 4.6539418399333954e-02</internalNodes>\n          <leafValues>\n            -1.0464839637279510e-01 6.6270697116851807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -1.7157640540972352e-03</internalNodes>\n          <leafValues>\n            -4.9618211388587952e-01 1.6275240480899811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 -1.2778829783201218e-02</internalNodes>\n          <leafValues>\n            4.6254539489746094e-01 -1.6027900576591492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 -1.5214820206165314e-01</internalNodes>\n          <leafValues>\n            -7.0592701435089111e-01 1.0022509843111038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 3.1789899803698063e-03</internalNodes>\n          <leafValues>\n            1.2345749884843826e-01 -3.9093419909477234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 -2.2882770281285048e-03</internalNodes>\n          <leafValues>\n            3.7081500887870789e-01 -1.6210420429706573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -2.9806189704686403e-03</internalNodes>\n          <leafValues>\n            1.8087059259414673e-01 -3.3239859342575073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -1.5072739915922284e-03</internalNodes>\n          <leafValues>\n            -4.9472311139106750e-01 9.8288856446743011e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 1.9225040450692177e-03</internalNodes>\n          <leafValues>\n            -1.7791110277175903e-01 3.0773329734802246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 1.9025449873879552e-03</internalNodes>\n          <leafValues>\n            8.4794998168945312e-02 -5.9020972251892090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 -3.5421559587121010e-03</internalNodes>\n          <leafValues>\n            3.1175771355628967e-01 -1.4392930269241333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 -2.9751660767942667e-03</internalNodes>\n          <leafValues>\n            -6.3649141788482666e-01 8.2639887928962708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 1.0003290139138699e-02</internalNodes>\n          <leafValues>\n            -1.1699260026216507e-01 4.2387530207633972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 -1.9193530315533280e-03</internalNodes>\n          <leafValues>\n            -4.7115838527679443e-01 1.1038240045309067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 2.5070620700716972e-02</internalNodes>\n          <leafValues>\n            4.8775929957628250e-02 -8.0351328849792480e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>28</maxWeakCount>\n      <stageThreshold>-1.9849590063095093e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 42 1.4214799739420414e-02</internalNodes>\n          <leafValues>\n            -6.3577878475189209e-01 3.3461728692054749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 -1.2525909580290318e-02</internalNodes>\n          <leafValues>\n            3.2766130566596985e-01 -4.1331529617309570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 -2.2514370357384905e-05</internalNodes>\n          <leafValues>\n            2.3102630674839020e-01 -5.4282051324844360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 1.8600060138851404e-03</internalNodes>\n          <leafValues>\n            1.7933349311351776e-01 -6.9131940603256226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 7.8344792127609253e-03</internalNodes>\n          <leafValues>\n            9.1071300208568573e-02 -7.8126847743988037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 -4.2322301305830479e-03</internalNodes>\n          <leafValues>\n            2.0658409595489502e-01 -4.2906031012535095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 -7.5860600918531418e-04</internalNodes>\n          <leafValues>\n            2.0730710029602051e-01 -4.2070311307907104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 -3.5626380704343319e-03</internalNodes>\n          <leafValues>\n            -6.3227087259292603e-01 1.3118620216846466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 -4.9960161559283733e-03</internalNodes>\n          <leafValues>\n            -7.5112378597259521e-01 7.8203327953815460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 7.3098740540444851e-03</internalNodes>\n          <leafValues>\n            9.3428641557693481e-02 -6.6310107707977295e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 2.2772040392737836e-04</internalNodes>\n          <leafValues>\n            -3.4148821234703064e-01 2.0008200407028198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 8.3124160300940275e-04</internalNodes>\n          <leafValues>\n            -2.5448161363601685e-01 2.5857710838317871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 -7.5492179021239281e-03</internalNodes>\n          <leafValues>\n            -6.6138988733291626e-01 8.3004422485828400e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 -3.8039948791265488e-02</internalNodes>\n          <leafValues>\n            -8.2163572311401367e-01 5.9231590479612350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 2.8484580107033253e-03</internalNodes>\n          <leafValues>\n            8.9729957282543182e-02 -5.8333742618560791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 4.8181698657572269e-03</internalNodes>\n          <leafValues>\n            9.3960560858249664e-02 -5.7619768381118774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 -1.1190489865839481e-02</internalNodes>\n          <leafValues>\n            -6.2544298171997070e-01 7.3608897626399994e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 -6.4537129364907742e-03</internalNodes>\n          <leafValues>\n            5.5123388767242432e-01 -1.0020790249109268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 3.3225629013031721e-03</internalNodes>\n          <leafValues>\n            -1.0797890275716782e-01 5.3664940595626831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 4.6705761924386024e-03</internalNodes>\n          <leafValues>\n            8.8321126997470856e-02 -6.7683601379394531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 -1.1613310314714909e-02</internalNodes>\n          <leafValues>\n            -5.0711882114410400e-01 7.6556630432605743e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 -3.7515610456466675e-02</internalNodes>\n          <leafValues>\n            -7.2936272621154785e-01 5.9448610991239548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 2.3086030036211014e-02</internalNodes>\n          <leafValues>\n            5.0718959420919418e-02 -7.8459781408309937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 -7.1651988946541678e-06</internalNodes>\n          <leafValues>\n            1.6686220467090607e-01 -2.5713220238685608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 7.1611627936363220e-04</internalNodes>\n          <leafValues>\n            1.0636030137538910e-01 -4.2793640494346619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 4.1476460173726082e-03</internalNodes>\n          <leafValues>\n            -1.2069659680128098e-01 4.1993188858032227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -2.5815099943429232e-03</internalNodes>\n          <leafValues>\n            4.8718088865280151e-01 -1.0045810043811798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 -1.7147070029750466e-03</internalNodes>\n          <leafValues>\n            -4.6096310019493103e-01 1.0375110059976578e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>28</maxWeakCount>\n      <stageThreshold>-1.8260079622268677e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 70 -6.1202719807624817e-02</internalNodes>\n          <leafValues>\n            3.9079108834266663e-01 -3.9401251077651978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 -1.4643670292571187e-03</internalNodes>\n          <leafValues>\n            -7.3697841167449951e-01 1.5660220384597778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 7.2080420795828104e-04</internalNodes>\n          <leafValues>\n            2.1675530076026917e-01 -5.8012658357620239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 6.4895692048594356e-04</internalNodes>\n          <leafValues>\n            -7.2308099269866943e-01 1.2785249948501587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 -1.7158190021291375e-03</internalNodes>\n          <leafValues>\n            -7.7100431919097900e-01 1.0210309922695160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 -2.2490581031888723e-03</internalNodes>\n          <leafValues>\n            -6.0623127222061157e-01 1.2427269667387009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 5.3841978311538696e-02</internalNodes>\n          <leafValues>\n            -1.7169749736785889e-01 5.3350567817687988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 -1.3288970291614532e-01</internalNodes>\n          <leafValues>\n            5.5924367904663086e-01 -1.8954899907112122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 9.0965389972552657e-04</internalNodes>\n          <leafValues>\n            -4.7166430950164795e-01 1.6924260556697845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 6.0799147468060255e-04</internalNodes>\n          <leafValues>\n            1.1347220093011856e-01 -5.9846878051757812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 1.6072629392147064e-01</internalNodes>\n          <leafValues>\n            -1.0295519977807999e-01 6.6487199068069458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 -1.7097239615395665e-03</internalNodes>\n          <leafValues>\n            -4.7276279330253601e-01 1.3392050564289093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 1.1734620202332735e-03</internalNodes>\n          <leafValues>\n            -2.2795589268207550e-01 2.6135650277137756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 -1.5138329472392797e-03</internalNodes>\n          <leafValues>\n            -5.5395001173019409e-01 1.1028339713811874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 -2.1774161141365767e-03</internalNodes>\n          <leafValues>\n            -6.2228900194168091e-01 7.8486673533916473e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 -2.7727920096367598e-03</internalNodes>\n          <leafValues>\n            4.6141120791435242e-01 -1.3496559858322144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 9.3199027469381690e-04</internalNodes>\n          <leafValues>\n            1.0162770003080368e-01 -5.1631838083267212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 2.9746659565716982e-03</internalNodes>\n          <leafValues>\n            -1.2999209761619568e-01 4.2117300629615784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 -5.0399480387568474e-03</internalNodes>\n          <leafValues>\n            -6.3706171512603760e-01 7.7624127268791199e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 2.3414850234985352e-02</internalNodes>\n          <leafValues>\n            7.2182796895503998e-02 -5.9831130504608154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 -1.0927390540018678e-03</internalNodes>\n          <leafValues>\n            -4.1664880514144897e-01 1.1829990148544312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 -1.6441360348835588e-03</internalNodes>\n          <leafValues>\n            1.8583069741725922e-01 -2.7551019191741943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 -2.5736279785633087e-02</internalNodes>\n          <leafValues>\n            -7.5146478414535522e-01 6.3907749950885773e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 -2.8924590442329645e-03</internalNodes>\n          <leafValues>\n            -5.6780880689620972e-01 7.3297739028930664e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 -5.2889231592416763e-03</internalNodes>\n          <leafValues>\n            -6.3738888502120972e-01 6.8686947226524353e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 3.2964269630610943e-03</internalNodes>\n          <leafValues>\n            -2.5062951445579529e-01 1.5989780426025391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 2.4914439767599106e-02</internalNodes>\n          <leafValues>\n            5.5260978639125824e-02 -7.6208770275115967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -1.5088500455021858e-02</internalNodes>\n          <leafValues>\n            3.7033379077911377e-01 -1.2003959715366364e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>53</maxWeakCount>\n      <stageThreshold>-1.9446740150451660e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 98 -1.1857179924845695e-02</internalNodes>\n          <leafValues>\n            2.9421558976173401e-01 -5.1703310012817383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 2.0991980563849211e-03</internalNodes>\n          <leafValues>\n            -6.1471748352050781e-01 2.0648500323295593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 -1.5772449842188507e-04</internalNodes>\n          <leafValues>\n            2.2870740294456482e-01 -5.5258047580718994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 -2.0669099467340857e-04</internalNodes>\n          <leafValues>\n            1.2070009857416153e-01 -5.4926127195358276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 2.2675560321658850e-03</internalNodes>\n          <leafValues>\n            1.5354810655117035e-01 -4.6074301004409790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 1.4469499699771404e-02</internalNodes>\n          <leafValues>\n            -1.8976309895515442e-01 4.2071411013603210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 -1.2127560330554843e-03</internalNodes>\n          <leafValues>\n            -4.5139861106872559e-01 9.9425867199897766e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 2.1505509503185749e-03</internalNodes>\n          <leafValues>\n            1.0200879722833633e-01 -6.2064242362976074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 -1.6638869419693947e-03</internalNodes>\n          <leafValues>\n            -7.0367491245269775e-01 7.7214680612087250e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 1.0530210565775633e-03</internalNodes>\n          <leafValues>\n            -3.2453960180282593e-01 1.7616109549999237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 1.1836409568786621e-02</internalNodes>\n          <leafValues>\n            -1.3507820665836334e-01 4.2641130089759827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 9.6512871095910668e-04</internalNodes>\n          <leafValues>\n            9.4502769410610199e-02 -4.8544931411743164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 7.5651629595085979e-04</internalNodes>\n          <leafValues>\n            -2.9959529638290405e-01 1.6867619752883911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 1.0839150287210941e-02</internalNodes>\n          <leafValues>\n            -1.1121030151844025e-01 4.6914410591125488e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 -5.1439419388771057e-02</internalNodes>\n          <leafValues>\n            4.1726920008659363e-01 -1.1776400357484818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 3.4927250817418098e-03</internalNodes>\n          <leafValues>\n            9.2512279748916626e-02 -5.2599352598190308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 -1.3926399871706963e-02</internalNodes>\n          <leafValues>\n            -6.6633498668670654e-01 5.2386458963155746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 4.5590959489345551e-03</internalNodes>\n          <leafValues>\n            -9.3383841216564178e-02 4.3774750828742981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 -3.7318699061870575e-02</internalNodes>\n          <leafValues>\n            -5.9583687782287598e-01 7.2627849876880646e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 1.2496879789978266e-03</internalNodes>\n          <leafValues>\n            6.9537237286567688e-02 -4.8772460222244263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 -3.7307639140635729e-03</internalNodes>\n          <leafValues>\n            3.2699251174926758e-01 -1.1739090085029602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 2.1144179627299309e-03</internalNodes>\n          <leafValues>\n            9.2889092862606049e-02 -4.1788020730018616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 -6.4239342464134097e-04</internalNodes>\n          <leafValues>\n            -2.9332190752029419e-01 1.3107809424400330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 -3.1379980500787497e-03</internalNodes>\n          <leafValues>\n            3.2445520162582397e-01 -1.1506850272417068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 -3.9186969399452209e-02</internalNodes>\n          <leafValues>\n            -7.9360449314117432e-01 5.0053481012582779e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 4.4646807946264744e-03</internalNodes>\n          <leafValues>\n            5.4776020348072052e-02 -5.6535738706588745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 8.6451368406414986e-04</internalNodes>\n          <leafValues>\n            -1.7471200227737427e-01 1.9758160412311554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 2.4237011093646288e-03</internalNodes>\n          <leafValues>\n            -9.5296189188957214e-02 4.0760260820388794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 -2.5377490092068911e-03</internalNodes>\n          <leafValues>\n            -6.2454742193222046e-01 6.9920547306537628e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -7.3309220169903710e-06</internalNodes>\n          <leafValues>\n            1.2249249964952469e-01 -2.8157269954681396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 -1.8882560543715954e-03</internalNodes>\n          <leafValues>\n            -6.2670397758483887e-01 6.5820932388305664e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 6.0609861975535750e-04</internalNodes>\n          <leafValues>\n            -2.5481408834457397e-01 1.2902240455150604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 2.3213759995996952e-03</internalNodes>\n          <leafValues>\n            -9.7430117428302765e-02 3.2456091046333313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 -1.8534410046413541e-03</internalNodes>\n          <leafValues>\n            -4.4065341353416443e-01 8.2968853414058685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 2.3999500554054976e-03</internalNodes>\n          <leafValues>\n            -1.2041269987821579e-01 2.8288060426712036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 -8.1356197595596313e-02</internalNodes>\n          <leafValues>\n            -7.3972231149673462e-01 4.6568300575017929e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 -2.9865680262446404e-03</internalNodes>\n          <leafValues>\n            1.6334620118141174e-01 -1.9834910333156586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 2.8128880076110363e-03</internalNodes>\n          <leafValues>\n            1.1837379634380341e-01 -2.9398199915885925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 -1.0060790181159973e-01</internalNodes>\n          <leafValues>\n            -7.3717647790908813e-01 4.2510021477937698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 1.1854549666168168e-04</internalNodes>\n          <leafValues>\n            1.0471060127019882e-01 -2.9139861464500427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 2.2375308908522129e-03</internalNodes>\n          <leafValues>\n            -9.6042059361934662e-02 3.4045928716659546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -4.4986992143094540e-03</internalNodes>\n          <leafValues>\n            -5.8234661817550659e-01 5.6236840784549713e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 -3.6484538577497005e-04</internalNodes>\n          <leafValues>\n            -2.7956131100654602e-01 1.0113990306854248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 -7.9940296709537506e-03</internalNodes>\n          <leafValues>\n            2.7775949239730835e-01 -1.1941230297088623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 -5.1547219045460224e-03</internalNodes>\n          <leafValues>\n            -6.0229510068893433e-01 4.8917140811681747e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 -8.1772619159892201e-04</internalNodes>\n          <leafValues>\n            1.7660500109195709e-01 -1.6407689452171326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 6.7434698343276978e-02</internalNodes>\n          <leafValues>\n            4.0761459618806839e-02 -7.1865761280059814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 -2.4103289470076561e-03</internalNodes>\n          <leafValues>\n            1.7671680450439453e-01 -1.6081850230693817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -3.5183799918740988e-03</internalNodes>\n          <leafValues>\n            -4.3078601360321045e-01 7.0671632885932922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 -1.4561560419679154e-05</internalNodes>\n          <leafValues>\n            1.2714700400829315e-01 -2.3387859761714935e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 -4.7951821237802505e-02</internalNodes>\n          <leafValues>\n            -7.9085767269134521e-01 3.6803081631660461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 2.1735159680247307e-03</internalNodes>\n          <leafValues>\n            -1.3089279830455780e-01 2.5330349802970886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 -3.4542270004749298e-03</internalNodes>\n          <leafValues>\n            5.1025247573852539e-01 -7.5337253510951996e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>54</maxWeakCount>\n      <stageThreshold>-1.8389279842376709e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 151 4.5243161730468273e-03</internalNodes>\n          <leafValues>\n            -3.0485519766807556e-01 5.1908642053604126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 2.3372350260615349e-03</internalNodes>\n          <leafValues>\n            -4.2904540896415710e-01 2.9052159190177917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 -4.4243237935006618e-03</internalNodes>\n          <leafValues>\n            2.1068570017814636e-01 -4.5954981446266174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 -1.2887439690530300e-02</internalNodes>\n          <leafValues>\n            1.9138230383396149e-01 -4.5879068970680237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 -5.2370920457178727e-05</internalNodes>\n          <leafValues>\n            1.4141489565372467e-01 -5.0267368555068970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 -4.7738491557538509e-03</internalNodes>\n          <leafValues>\n            -4.8760831356048584e-01 1.2341009825468063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 9.6315861446782947e-04</internalNodes>\n          <leafValues>\n            1.3367399573326111e-01 -4.4793748855590820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 -8.9140303432941437e-02</internalNodes>\n          <leafValues>\n            5.0387668609619141e-01 -1.5923009812831879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 1.7201449954882264e-03</internalNodes>\n          <leafValues>\n            -2.0535360276699066e-01 2.4340680241584778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 -2.6712119579315186e-03</internalNodes>\n          <leafValues>\n            -6.3319712877273560e-01 5.3035650402307510e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 3.7353280931711197e-02</internalNodes>\n          <leafValues>\n            -1.1360249668359756e-01 4.6645331382751465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -3.1510960310697556e-02</internalNodes>\n          <leafValues>\n            -6.8820482492446899e-01 6.9371856749057770e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 1.5293819829821587e-02</internalNodes>\n          <leafValues>\n            -1.0043840110301971e-01 4.6267789602279663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 5.4966909810900688e-03</internalNodes>\n          <leafValues>\n            -9.3514643609523773e-02 4.5127061009407043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 -4.6311439946293831e-03</internalNodes>\n          <leafValues>\n            -6.4314597845077515e-01 8.5003547370433807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 8.0943357897922397e-04</internalNodes>\n          <leafValues>\n            7.9738967120647430e-02 -4.9320799112319946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 2.9745940119028091e-02</internalNodes>\n          <leafValues>\n            7.8420467674732208e-02 -5.0482439994812012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 9.7070122137665749e-04</internalNodes>\n          <leafValues>\n            5.8135438710451126e-02 -5.7035177946090698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 2.4534659460186958e-03</internalNodes>\n          <leafValues>\n            -1.1259060353040695e-01 3.6852970719337463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 1.9709810148924589e-03</internalNodes>\n          <leafValues>\n            7.7185310423374176e-02 -5.2683860063552856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 4.8643019981682301e-03</internalNodes>\n          <leafValues>\n            -1.0479539632797241e-01 4.1474440693855286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 1.0143260005861521e-03</internalNodes>\n          <leafValues>\n            -1.4731560647487640e-01 2.8671079874038696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 -9.5099088503047824e-04</internalNodes>\n          <leafValues>\n            -3.8070049881935120e-01 8.8108353316783905e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 -5.6730289943516254e-03</internalNodes>\n          <leafValues>\n            2.4818900227546692e-01 -1.3696339726448059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 1.6987899318337440e-02</internalNodes>\n          <leafValues>\n            -8.0896042287349701e-02 5.2781671285629272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 -7.5278789736330509e-03</internalNodes>\n          <leafValues>\n            -4.6880009770393372e-01 8.9389666914939880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 3.3948529511690140e-02</internalNodes>\n          <leafValues>\n            5.0594791769981384e-02 -6.7399561405181885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 8.3328841719776392e-04</internalNodes>\n          <leafValues>\n            -1.8931360542774200e-01 1.9607099890708923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 -5.9632491320371628e-04</internalNodes>\n          <leafValues>\n            -3.6229288578033447e-01 1.0544770210981369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 3.0905720777809620e-03</internalNodes>\n          <leafValues>\n            5.7209629565477371e-02 -5.5316972732543945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 3.5152619238942862e-03</internalNodes>\n          <leafValues>\n            -1.2211070209741592e-01 2.9369899630546570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 7.9333729809150100e-04</internalNodes>\n          <leafValues>\n            7.5977906584739685e-02 -4.4539821147918701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 -1.1189360171556473e-02</internalNodes>\n          <leafValues>\n            -5.0596517324447632e-01 5.7438369840383530e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 -1.1787790572270751e-03</internalNodes>\n          <leafValues>\n            3.0799698829650879e-01 -1.0762230306863785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 5.4418851505033672e-05</internalNodes>\n          <leafValues>\n            -2.5997561216354370e-01 1.3138440251350403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 -7.2562302193546202e-06</internalNodes>\n          <leafValues>\n            1.5439839661121368e-01 -2.1094700694084167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 -8.3436258137226105e-04</internalNodes>\n          <leafValues>\n            1.3689869642257690e-01 -2.4367660284042358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -3.3380609005689621e-02</internalNodes>\n          <leafValues>\n            -6.7477357387542725e-01 5.0986740738153458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 7.4093497823923826e-04</internalNodes>\n          <leafValues>\n            9.1248527169227600e-02 -3.5220760107040405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 -2.0966369193047285e-03</internalNodes>\n          <leafValues>\n            1.9110049307346344e-01 -1.6380029916763306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 -6.9339506328105927e-02</internalNodes>\n          <leafValues>\n            -8.7700867652893066e-01 3.5726629197597504e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 -5.7089990004897118e-03</internalNodes>\n          <leafValues>\n            -6.8067228794097900e-01 3.5545960068702698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 6.8668760359287262e-03</internalNodes>\n          <leafValues>\n            -6.4886868000030518e-02 5.2265900373458862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 5.4602831369265914e-04</internalNodes>\n          <leafValues>\n            1.0924419760704041e-01 -3.0285251140594482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 6.4349039457738400e-03</internalNodes>\n          <leafValues>\n            -1.6561950743198395e-01 1.9022129476070404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 -1.0112419724464417e-02</internalNodes>\n          <leafValues>\n            7.4523001909255981e-01 -3.8347329944372177e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 -7.5152877252548933e-04</internalNodes>\n          <leafValues>\n            -2.8147280216217041e-01 1.1321689933538437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 2.8225290589034557e-03</internalNodes>\n          <leafValues>\n            -1.2364400178194046e-01 2.5608530640602112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 2.2058798931539059e-03</internalNodes>\n          <leafValues>\n            5.7334281504154205e-02 -5.6152081489562988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 2.8164181113243103e-01</internalNodes>\n          <leafValues>\n            4.2092379182577133e-02 -6.4923799037933350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 -4.2593148536980152e-03</internalNodes>\n          <leafValues>\n            -6.4854997396469116e-01 4.3502658605575562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 2.6586679741740227e-03</internalNodes>\n          <leafValues>\n            -9.3526139855384827e-02 3.4158730506896973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 2.0971989724785089e-03</internalNodes>\n          <leafValues>\n            -1.1068929731845856e-01 3.1760269403457642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 -1.0267860488966107e-03</internalNodes>\n          <leafValues>\n            -3.7612101435661316e-01 9.8973110318183899e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>56</maxWeakCount>\n      <stageThreshold>-1.8807189464569092e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 205 2.6354179717600346e-03</internalNodes>\n          <leafValues>\n            -5.2496808767318726e-01 2.7711030840873718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 2.6279650628566742e-03</internalNodes>\n          <leafValues>\n            -3.2195448875427246e-01 3.7013629078865051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 -5.8889109641313553e-03</internalNodes>\n          <leafValues>\n            2.3777529597282410e-01 -4.1800329089164734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 1.9291159696877003e-03</internalNodes>\n          <leafValues>\n            -4.7122061252593994e-01 1.3692170381546021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 -1.5205480158329010e-02</internalNodes>\n          <leafValues>\n            -3.9618429541587830e-01 1.7402400076389313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 2.3393579758703709e-03</internalNodes>\n          <leafValues>\n            -3.8508901000022888e-01 1.5659110248088837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 4.2395621538162231e-02</internalNodes>\n          <leafValues>\n            1.0478709638118744e-01 -6.2164002656936646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 -5.6959640234708786e-02</internalNodes>\n          <leafValues>\n            5.1225858926773071e-01 -1.2684780359268188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 -7.2845568865886889e-06</internalNodes>\n          <leafValues>\n            1.5136890113353729e-01 -3.1185621023178101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 -7.9633750021457672e-02</internalNodes>\n          <leafValues>\n            -8.4324747323989868e-01 4.4978428632020950e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 5.9168688021600246e-03</internalNodes>\n          <leafValues>\n            -1.0745979845523834e-01 4.7434100508689880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 -1.4736950397491455e-03</internalNodes>\n          <leafValues>\n            3.6067450046539307e-01 -1.4760640263557434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 -3.9630971848964691e-02</internalNodes>\n          <leafValues>\n            -6.5838980674743652e-01 7.4866786599159241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 6.2401412287726998e-04</internalNodes>\n          <leafValues>\n            -2.6195651292800903e-01 1.5652139484882355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 -2.3399210476782173e-05</internalNodes>\n          <leafValues>\n            1.2157510221004486e-01 -3.0320811271667480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 3.0802030116319656e-02</internalNodes>\n          <leafValues>\n            4.4408731162548065e-02 -6.6609877347946167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 1.4787449617870152e-04</internalNodes>\n          <leafValues>\n            -2.4449509382247925e-01 1.4723050594329834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 4.8630568198859692e-03</internalNodes>\n          <leafValues>\n            -1.1267810314893723e-01 3.2596799731254578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 6.2191881239414215e-02</internalNodes>\n          <leafValues>\n            5.7439960539340973e-02 -6.4031070470809937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 1.4668420189991593e-03</internalNodes>\n          <leafValues>\n            9.5356643199920654e-02 -3.3727881312370300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 -1.4742349776497576e-05</internalNodes>\n          <leafValues>\n            1.9759610295295715e-01 -1.7083899676799774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 -3.2495670020580292e-02</internalNodes>\n          <leafValues>\n            -3.6848729848861694e-01 9.0363331139087677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 -1.5333830378949642e-03</internalNodes>\n          <leafValues>\n            3.2256379723548889e-01 -1.0416819900274277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 -2.7998909354209900e-02</internalNodes>\n          <leafValues>\n            -4.9097910523414612e-01 8.2653783261775970e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 4.9783890135586262e-03</internalNodes>\n          <leafValues>\n            7.3238030076026917e-02 -4.4057780504226685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 6.8226028233766556e-03</internalNodes>\n          <leafValues>\n            7.6766029000282288e-02 -4.1460910439491272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 1.1497880332171917e-02</internalNodes>\n          <leafValues>\n            -9.1440111398696899e-02 4.0099748969078064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 -1.1003069579601288e-02</internalNodes>\n          <leafValues>\n            -5.7417541742324829e-01 7.2776727378368378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 4.9345887964591384e-04</internalNodes>\n          <leafValues>\n            -1.3353590667247772e-01 2.4575209617614746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 2.2130589932203293e-03</internalNodes>\n          <leafValues>\n            -1.0753840208053589e-01 3.1632119417190552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 5.1011620089411736e-03</internalNodes>\n          <leafValues>\n            7.8985318541526794e-02 -4.2948201298713684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -3.7305638194084167e-02</internalNodes>\n          <leafValues>\n            -6.7921191453933716e-01 4.5049939304590225e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 -6.1271698214113712e-03</internalNodes>\n          <leafValues>\n            2.3062059283256531e-01 -1.4559289813041687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 7.6517700217664242e-03</internalNodes>\n          <leafValues>\n            -9.0355172753334045e-02 4.3072968721389771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 -1.1280870065093040e-02</internalNodes>\n          <leafValues>\n            -4.7850719094276428e-01 7.4674449861049652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 -1.4724049833603203e-05</internalNodes>\n          <leafValues>\n            1.4459890127182007e-01 -2.2535640001296997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -1.9895960576832294e-03</internalNodes>\n          <leafValues>\n            -6.1527568101882935e-01 5.4905921220779419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 1.6876959707587957e-03</internalNodes>\n          <leafValues>\n            -9.7619786858558655e-02 3.3004701137542725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 9.8390737548470497e-03</internalNodes>\n          <leafValues>\n            4.0972411632537842e-02 -7.5515109300613403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 1.3243829598650336e-03</internalNodes>\n          <leafValues>\n            -1.0046280175447464e-01 3.0665108561515808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 3.1150300055742264e-03</internalNodes>\n          <leafValues>\n            8.9804470539093018e-02 -3.3524599671363831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 7.3907422120100819e-06</internalNodes>\n          <leafValues>\n            -2.2410400211811066e-01 1.3288240134716034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 3.2559569925069809e-02</internalNodes>\n          <leafValues>\n            5.0113398581743240e-02 -5.4240328073501587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 -2.9865119140595198e-03</internalNodes>\n          <leafValues>\n            2.8385341167449951e-01 -1.1164219677448273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 1.6058710170909762e-03</internalNodes>\n          <leafValues>\n            -1.2024080008268356e-01 2.9032671451568604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 2.2018649615347385e-03</internalNodes>\n          <leafValues>\n            7.8110128641128540e-02 -4.3846049904823303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 -5.7107508182525635e-03</internalNodes>\n          <leafValues>\n            -3.2608801126480103e-01 9.2941299080848694e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 8.9503038907423615e-04</internalNodes>\n          <leafValues>\n            -1.3504159450531006e-01 2.2331899404525757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 7.7259249985218048e-02</internalNodes>\n          <leafValues>\n            7.3221340775489807e-02 -4.1714018583297729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 -1.0145610198378563e-02</internalNodes>\n          <leafValues>\n            -2.7330970764160156e-01 1.4099189639091492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 -7.0878718361200299e-06</internalNodes>\n          <leafValues>\n            1.2602959573268890e-01 -2.3253719508647919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 -8.0232005566358566e-03</internalNodes>\n          <leafValues>\n            -6.2682849168777466e-01 4.4199578464031219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 -1.5409339684993029e-03</internalNodes>\n          <leafValues>\n            3.2154878973960876e-01 -9.5819726586341858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 -1.3815560378134251e-03</internalNodes>\n          <leafValues>\n            2.3909060657024384e-01 -1.0845059901475906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 -8.5559524595737457e-03</internalNodes>\n          <leafValues>\n            -6.2880992889404297e-01 4.6904459595680237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 1.4967939932830632e-05</internalNodes>\n          <leafValues>\n            -1.7331050336360931e-01 1.6265609860420227e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>68</maxWeakCount>\n      <stageThreshold>-1.7268099784851074e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 261 -9.2911375686526299e-03</internalNodes>\n          <leafValues>\n            2.6676508784294128e-01 -4.8681628704071045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 -1.0201609693467617e-03</internalNodes>\n          <leafValues>\n            2.1469169855117798e-01 -4.2971470952033997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 1.8099240260198712e-03</internalNodes>\n          <leafValues>\n            -4.7085261344909668e-01 1.7293150722980499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 -6.3195452094078064e-02</internalNodes>\n          <leafValues>\n            5.5868512392044067e-01 -1.1922080069780350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 1.5157799934968352e-03</internalNodes>\n          <leafValues>\n            -3.3087429404258728e-01 1.4256539940834045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 -3.1134260352700949e-03</internalNodes>\n          <leafValues>\n            3.1897360086441040e-01 -1.5563400089740753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 6.7187240347266197e-03</internalNodes>\n          <leafValues>\n            1.1308009922504425e-01 -4.6142110228538513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 -1.4929190001566894e-05</internalNodes>\n          <leafValues>\n            1.1303120106458664e-01 -3.8268089294433594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 -1.9974811002612114e-03</internalNodes>\n          <leafValues>\n            -6.7833811044692993e-01 5.5562671273946762e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 4.4361899199429899e-05</internalNodes>\n          <leafValues>\n            -2.1478720009326935e-01 1.7524589598178864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 -9.4379335641860962e-03</internalNodes>\n          <leafValues>\n            -2.9008820652961731e-01 1.0494410246610641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 1.0263459989801049e-04</internalNodes>\n          <leafValues>\n            -3.6809450387954712e-01 1.1580110341310501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 -4.3512079864740372e-02</internalNodes>\n          <leafValues>\n            -5.7967478036880493e-01 4.5160628855228424e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 2.3894330952316523e-03</internalNodes>\n          <leafValues>\n            -1.2443830072879791e-01 2.5726899504661560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 3.6203579511493444e-03</internalNodes>\n          <leafValues>\n            4.8385269939899445e-02 -6.4456540346145630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 -4.2086638859473169e-04</internalNodes>\n          <leafValues>\n            -2.9963639378547668e-01 9.7508132457733154e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 -3.6320161074399948e-02</internalNodes>\n          <leafValues>\n            3.2499030232429504e-01 -1.0373180359601974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 5.5678240023553371e-03</internalNodes>\n          <leafValues>\n            -1.2865519523620605e-01 2.7721390128135681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 1.4324679505079985e-03</internalNodes>\n          <leafValues>\n            6.3044667243957520e-02 -5.0411659479141235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 1.2268769787624478e-03</internalNodes>\n          <leafValues>\n            -1.7073589563369751e-01 1.7944329977035522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 4.0125530213117599e-03</internalNodes>\n          <leafValues>\n            7.2100132703781128e-02 -4.1321611404418945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 4.7377590090036392e-03</internalNodes>\n          <leafValues>\n            -9.0100876986980438e-02 3.4303799271583557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 4.3965759687125683e-03</internalNodes>\n          <leafValues>\n            5.4753091186285019e-02 -5.9175938367843628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 1.8952810205519199e-03</internalNodes>\n          <leafValues>\n            4.0120709687471390e-02 -6.4907258749008179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 -1.3425230281427503e-03</internalNodes>\n          <leafValues>\n            3.0321699380874634e-01 -1.1009240150451660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 -4.6405740082263947e-02</internalNodes>\n          <leafValues>\n            -4.6026471257209778e-01 7.0307031273841858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 2.5875549763441086e-02</internalNodes>\n          <leafValues>\n            3.8987319916486740e-02 -6.4847522974014282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 1.0986380511894822e-03</internalNodes>\n          <leafValues>\n            -1.6458760201931000e-01 1.8133540451526642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -3.9583959733135998e-04</internalNodes>\n          <leafValues>\n            9.7805656492710114e-02 -2.7554351091384888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 -4.5633990317583084e-02</internalNodes>\n          <leafValues>\n            -5.4276019334793091e-01 5.4855771362781525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 -4.7068470157682896e-03</internalNodes>\n          <leafValues>\n            4.0961420536041260e-01 -6.9687090814113617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 2.0004810357932001e-04</internalNodes>\n          <leafValues>\n            1.2908969819545746e-01 -2.1091359853744507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 1.1126570170745254e-03</internalNodes>\n          <leafValues>\n            -2.2213070094585419e-01 1.2458589673042297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 -1.4747029636055231e-03</internalNodes>\n          <leafValues>\n            2.9185178875923157e-01 -9.0756237506866455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 4.3162931688129902e-03</internalNodes>\n          <leafValues>\n            6.1542909592390060e-02 -5.1068651676177979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 2.0302709890529513e-04</internalNodes>\n          <leafValues>\n            -1.5639910101890564e-01 1.6466440260410309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 3.4639390651136637e-04</internalNodes>\n          <leafValues>\n            1.0773540288209915e-01 -2.5532799959182739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 1.5631220303475857e-03</internalNodes>\n          <leafValues>\n            -9.5428019762039185e-02 2.5450360774993896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 5.5476918350905180e-04</internalNodes>\n          <leafValues>\n            7.9774253070354462e-02 -3.0791428685188293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 2.7690480928868055e-03</internalNodes>\n          <leafValues>\n            -9.1900892555713654e-02 3.0198639631271362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 1.1085179867222905e-03</internalNodes>\n          <leafValues>\n            6.2624886631965637e-02 -4.1680490970611572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 3.4288389142602682e-03</internalNodes>\n          <leafValues>\n            -5.7473558932542801e-02 4.7293519973754883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 -2.0233790855854750e-03</internalNodes>\n          <leafValues>\n            -2.4128660559654236e-01 1.0806660354137421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 -9.1446418082341552e-04</internalNodes>\n          <leafValues>\n            1.7990960180759430e-01 -1.6031919419765472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 3.8880690932273865e-02</internalNodes>\n          <leafValues>\n            3.9132621139287949e-02 -6.4085322618484497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 1.2836069799959660e-03</internalNodes>\n          <leafValues>\n            5.2912048995494843e-02 -4.3914559483528137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 3.5828219261020422e-03</internalNodes>\n          <leafValues>\n            -9.7462162375450134e-02 3.0772930383682251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 2.3203529417514801e-03</internalNodes>\n          <leafValues>\n            -1.0929799824953079e-01 2.6735728979110718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 1.1978139809798449e-04</internalNodes>\n          <leafValues>\n            1.1623129993677139e-01 -2.3586340248584747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 -2.8259279206395149e-03</internalNodes>\n          <leafValues>\n            -4.1935729980468750e-01 5.7008400559425354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 2.4410230107605457e-03</internalNodes>\n          <leafValues>\n            4.2706880718469620e-02 -5.3362858295440674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 2.6899650692939758e-03</internalNodes>\n          <leafValues>\n            -1.1351829767227173e-01 2.4779020249843597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 -3.1081750057637691e-03</internalNodes>\n          <leafValues>\n            -2.9488921165466309e-01 8.2543209195137024e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -6.6210748627781868e-03</internalNodes>\n          <leafValues>\n            2.2958689928054810e-01 -1.1443620175123215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 4.6786409802734852e-03</internalNodes>\n          <leafValues>\n            -1.2875209748744965e-01 2.6777699589729309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 -1.2973829871043563e-03</internalNodes>\n          <leafValues>\n            -2.7280429005622864e-01 9.6471726894378662e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 2.9523740522563457e-03</internalNodes>\n          <leafValues>\n            -8.7040692567825317e-02 2.9207450151443481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 -1.6173559706658125e-03</internalNodes>\n          <leafValues>\n            -4.0207850933074951e-01 6.5386466681957245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 -7.5417757034301758e-02</internalNodes>\n          <leafValues>\n            -8.9723330736160278e-01 2.4602690711617470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 -2.5402200408279896e-03</internalNodes>\n          <leafValues>\n            1.5258650481700897e-01 -1.5025460720062256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 3.7864660844206810e-03</internalNodes>\n          <leafValues>\n            7.6477207243442535e-02 -3.3881941437721252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 -1.4005510136485100e-02</internalNodes>\n          <leafValues>\n            4.4426390528678894e-01 -5.9003930538892746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 5.5956508731469512e-04</internalNodes>\n          <leafValues>\n            7.4007123708724976e-02 -3.5604709386825562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 2.5946850655600429e-04</internalNodes>\n          <leafValues>\n            -2.8126189112663269e-01 8.7399207055568695e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 4.4409232214093208e-03</internalNodes>\n          <leafValues>\n            2.8623659163713455e-02 -7.7284187078475952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 -2.3343560751527548e-03</internalNodes>\n          <leafValues>\n            3.5460600256919861e-01 -7.1207538247108459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 9.7654951969161630e-04</internalNodes>\n          <leafValues>\n            -1.0138420015573502e-01 2.2545370459556580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 -4.3227209243923426e-04</internalNodes>\n          <leafValues>\n            -2.1095879375934601e-01 1.2273149937391281e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>70</maxWeakCount>\n      <stageThreshold>-1.6056820154190063e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 329 -1.2480209581553936e-02</internalNodes>\n          <leafValues>\n            2.6112109422683716e-01 -4.7001519799232483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 3.5450961440801620e-02</internalNodes>\n          <leafValues>\n            -2.0008459687232971e-01 4.7718611359596252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 2.0369330886751413e-03</internalNodes>\n          <leafValues>\n            -4.7703158855438232e-01 1.5132640302181244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 -4.3946420191787183e-05</internalNodes>\n          <leafValues>\n            1.2288480252027512e-01 -5.1796287298202515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 -3.8480788934975863e-03</internalNodes>\n          <leafValues>\n            4.1113680601119995e-01 -1.4595329761505127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 -2.8316550888121128e-03</internalNodes>\n          <leafValues>\n            2.8710970282554626e-01 -1.7629599571228027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 2.5026081129908562e-03</internalNodes>\n          <leafValues>\n            7.9668842256069183e-02 -5.7808011770248413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 3.0812958721071482e-04</internalNodes>\n          <leafValues>\n            8.2838706672191620e-02 -4.2540180683135986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 6.1186961829662323e-04</internalNodes>\n          <leafValues>\n            1.3641810417175293e-01 -3.0591419339179993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 -1.4354350241774227e-05</internalNodes>\n          <leafValues>\n            1.4197489619255066e-01 -2.5681999325752258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 1.6148330178111792e-03</internalNodes>\n          <leafValues>\n            -2.6239329576492310e-01 1.3288390636444092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 2.0318101160228252e-03</internalNodes>\n          <leafValues>\n            7.5749568641185760e-02 -4.3141460418701172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 9.5563679933547974e-03</internalNodes>\n          <leafValues>\n            -9.1424480080604553e-02 4.0004569292068481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 -7.8439561184495687e-04</internalNodes>\n          <leafValues>\n            -3.6619931459426880e-01 9.1777816414833069e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 -3.9661130867898464e-03</internalNodes>\n          <leafValues>\n            2.3698210716247559e-01 -1.4281649887561798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 -2.3194469977170229e-03</internalNodes>\n          <leafValues>\n            -4.2245340347290039e-01 7.8684106469154358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 -7.3490202426910400e-02</internalNodes>\n          <leafValues>\n            -6.2218552827835083e-01 4.0496870875358582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 -3.6803178954869509e-03</internalNodes>\n          <leafValues>\n            1.2612029910087585e-01 -2.0990429818630219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 -4.1019290685653687e-02</internalNodes>\n          <leafValues>\n            -8.0316942930221558e-01 2.7993949130177498e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 -4.8213129048235714e-04</internalNodes>\n          <leafValues>\n            1.4825980365276337e-01 -1.7869630455970764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 -1.6598250716924667e-02</internalNodes>\n          <leafValues>\n            4.1442281007766724e-01 -6.4051687717437744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 -1.0631670011207461e-03</internalNodes>\n          <leafValues>\n            -3.3466520905494690e-01 8.2425996661186218e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 1.8658409826457500e-03</internalNodes>\n          <leafValues>\n            -1.3119789958000183e-01 2.3183380067348480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 -2.5827190838754177e-03</internalNodes>\n          <leafValues>\n            3.8415950536727905e-01 -8.4121666848659515e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 1.7159619601443410e-03</internalNodes>\n          <leafValues>\n            7.6971538364887238e-02 -4.1098991036415100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 -3.9140181615948677e-03</internalNodes>\n          <leafValues>\n            -6.2508618831634521e-01 3.8418460637331009e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 4.2724498780444264e-04</internalNodes>\n          <leafValues>\n            8.6016573011875153e-02 -2.6975229382514954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 3.3992920070886612e-03</internalNodes>\n          <leafValues>\n            -1.0176510363817215e-01 2.7030828595161438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 -3.6457281559705734e-02</internalNodes>\n          <leafValues>\n            -4.9261981248855591e-01 5.5854249745607376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 1.6230379696935415e-03</internalNodes>\n          <leafValues>\n            5.7567078620195389e-02 -4.2053499817848206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 4.6655549667775631e-03</internalNodes>\n          <leafValues>\n            -9.1158397495746613e-02 3.2095280289649963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 3.1331549398601055e-03</internalNodes>\n          <leafValues>\n            -9.6932657063007355e-02 3.4073451161384583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 -1.6835830174386501e-03</internalNodes>\n          <leafValues>\n            -3.6766248941421509e-01 8.2226082682609558e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 2.7728650718927383e-02</internalNodes>\n          <leafValues>\n            4.0117498487234116e-02 -6.5198391675949097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 9.5015309751033783e-02</internalNodes>\n          <leafValues>\n            2.3065119981765747e-02 -8.8881981372833252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 7.4755616486072540e-02</internalNodes>\n          <leafValues>\n            -6.3946872949600220e-02 4.7399708628654480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 1.6693340614438057e-02</internalNodes>\n          <leafValues>\n            4.6477258205413818e-02 -7.1152418851852417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 1.2088769581168890e-03</internalNodes>\n          <leafValues>\n            -1.1359269917011261e-01 2.2424149513244629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 -6.1751517932862043e-04</internalNodes>\n          <leafValues>\n            -3.1268230080604553e-01 8.5018932819366455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 8.5786692798137665e-03</internalNodes>\n          <leafValues>\n            -1.5559460222721100e-01 1.5640939772129059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 6.1184767400845885e-04</internalNodes>\n          <leafValues>\n            9.4403937458992004e-02 -2.6520138978958130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 -3.4570440184324980e-03</internalNodes>\n          <leafValues>\n            1.5146060287952423e-01 -1.6220529377460480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 1.3953070156276226e-03</internalNodes>\n          <leafValues>\n            -9.9996216595172882e-02 2.4998310208320618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 3.5910680890083313e-03</internalNodes>\n          <leafValues>\n            8.1011682748794556e-02 -3.0081549286842346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 5.4192831739783287e-03</internalNodes>\n          <leafValues>\n            6.7650042474269867e-02 -3.2355660200119019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 -1.1379310162737966e-03</internalNodes>\n          <leafValues>\n            1.8887449800968170e-01 -1.2729729712009430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 9.1047259047627449e-03</internalNodes>\n          <leafValues>\n            1.0160540044307709e-01 -2.2280150651931763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 6.5050171688199043e-03</internalNodes>\n          <leafValues>\n            -7.2986416518688202e-02 3.5770270228385925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -1.4676549653813709e-05</internalNodes>\n          <leafValues>\n            1.4693109691143036e-01 -1.7403540015220642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 -9.4403158873319626e-03</internalNodes>\n          <leafValues>\n            -2.6536750793457031e-01 9.6619546413421631e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 -4.2933300137519836e-03</internalNodes>\n          <leafValues>\n            2.5656831264495850e-01 -1.0550209879875183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 4.3133171275258064e-03</internalNodes>\n          <leafValues>\n            6.5936572849750519e-02 -4.5719939470291138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 5.8854468166828156e-02</internalNodes>\n          <leafValues>\n            6.7918263375759125e-02 -3.3078071475028992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 -2.8407620266079903e-03</internalNodes>\n          <leafValues>\n            2.3953500390052795e-01 -9.2092156410217285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 9.6359942108392715e-04</internalNodes>\n          <leafValues>\n            -1.0982380062341690e-01 2.6462998986244202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 -1.4724590073456056e-05</internalNodes>\n          <leafValues>\n            1.1111160367727280e-01 -2.2704580426216125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 -8.0675468780100346e-04</internalNodes>\n          <leafValues>\n            -3.6335140466690063e-01 7.8122653067111969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 7.3296198388561606e-04</internalNodes>\n          <leafValues>\n            -1.5605129301548004e-01 1.5184900164604187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 6.3753738068044186e-03</internalNodes>\n          <leafValues>\n            -7.1957953274250031e-02 2.9723879694938660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 4.6390579082071781e-03</internalNodes>\n          <leafValues>\n            3.5969600081443787e-02 -6.1132347583770752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 -7.1079272311180830e-04</internalNodes>\n          <leafValues>\n            -2.8806841373443604e-01 6.9314628839492798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 2.9162289574742317e-03</internalNodes>\n          <leafValues>\n            -7.5968459248542786e-02 3.2681688666343689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 -1.7853140830993652e-02</internalNodes>\n          <leafValues>\n            4.4206309318542480e-01 -4.8174031078815460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 8.3874985575675964e-03</internalNodes>\n          <leafValues>\n            4.8913899809122086e-02 -5.4415327310562134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 2.9458320568664931e-05</internalNodes>\n          <leafValues>\n            -2.1131239831447601e-01 1.0629370063543320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 -9.8192706704139709e-02</internalNodes>\n          <leafValues>\n            3.5318240523338318e-01 -6.9296866655349731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 4.6140368795022368e-04</internalNodes>\n          <leafValues>\n            9.6270777285099030e-02 -2.5811928510665894e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 -2.4016610404942185e-04</internalNodes>\n          <leafValues>\n            -2.2976429760456085e-01 9.9984891712665558e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 3.7882480770349503e-02</internalNodes>\n          <leafValues>\n            -1.0365439951419830e-01 2.3164770007133484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 3.2621581340208650e-04</internalNodes>\n          <leafValues>\n            9.7933940589427948e-02 -2.3689700663089752e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>85</maxWeakCount>\n      <stageThreshold>-1.5173089504241943e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 399 -3.6744121462106705e-02</internalNodes>\n          <leafValues>\n            3.4079340100288391e-01 -3.1779891252517700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 2.1955010015517473e-03</internalNodes>\n          <leafValues>\n            -2.8729590773582458e-01 2.5869798660278320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 8.3034839481115341e-03</internalNodes>\n          <leafValues>\n            -2.1800449490547180e-01 2.6759269833564758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 2.6289420202374458e-03</internalNodes>\n          <leafValues>\n            -3.6006081104278564e-01 1.4639839529991150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 1.9458869937807322e-03</internalNodes>\n          <leafValues>\n            1.3677720725536346e-01 -4.2058759927749634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 -2.1704390645027161e-02</internalNodes>\n          <leafValues>\n            4.8903319239616394e-01 -9.8091572523117065e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 4.2956420220434666e-03</internalNodes>\n          <leafValues>\n            -2.7825561165809631e-01 1.5712629258632660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 4.9894629046320915e-04</internalNodes>\n          <leafValues>\n            1.1003810167312622e-01 -3.3779421448707581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 2.4652799591422081e-02</internalNodes>\n          <leafValues>\n            4.5820660889148712e-02 -5.4710537195205688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 -2.3075740784406662e-02</internalNodes>\n          <leafValues>\n            -4.9801421165466309e-01 6.7044779658317566e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 1.1991280131042004e-02</internalNodes>\n          <leafValues>\n            -7.0877023041248322e-02 4.8294249176979065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 1.5430679544806480e-02</internalNodes>\n          <leafValues>\n            -6.5949738025665283e-02 4.5236849784851074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 -4.5555769465863705e-03</internalNodes>\n          <leafValues>\n            -4.4665691256523132e-01 6.7877657711505890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 -4.4582979753613472e-03</internalNodes>\n          <leafValues>\n            3.3656919002532959e-01 -9.4792358577251434e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 1.3494009908754379e-04</internalNodes>\n          <leafValues>\n            -3.0288851261138916e-01 1.0293830186128616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 -4.2500188574194908e-03</internalNodes>\n          <leafValues>\n            4.2550128698348999e-01 -7.2956383228302002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 -1.4293759595602751e-03</internalNodes>\n          <leafValues>\n            -3.0116760730743408e-01 9.0039253234863281e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 -6.3978550024330616e-03</internalNodes>\n          <leafValues>\n            4.1943550109863281e-01 -7.9320870339870453e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 2.6083870325237513e-03</internalNodes>\n          <leafValues>\n            8.3598926663398743e-02 -4.1897168755531311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 8.6870808154344559e-03</internalNodes>\n          <leafValues>\n            -6.3015699386596680e-02 5.2644741535186768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 -1.0380990570411086e-03</internalNodes>\n          <leafValues>\n            -3.6220151185989380e-01 8.0301038920879364e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 4.4070050120353699e-01</internalNodes>\n          <leafValues>\n            3.4913059324026108e-02 -7.2764492034912109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 3.3689520787447691e-03</internalNodes>\n          <leafValues>\n            5.7332780212163925e-02 -4.8633271455764771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 1.7443710239604115e-03</internalNodes>\n          <leafValues>\n            -1.0994660109281540e-01 2.7023580670356750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 5.3788698278367519e-04</internalNodes>\n          <leafValues>\n            -2.7439421415328979e-01 1.0063380002975464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 1.0072899749502540e-03</internalNodes>\n          <leafValues>\n            1.0756769776344299e-01 -2.3221600055694580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 -8.2518812268972397e-03</internalNodes>\n          <leafValues>\n            -6.5216302871704102e-01 3.5704229027032852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 3.5490558948367834e-03</internalNodes>\n          <leafValues>\n            -8.4254868328571320e-02 3.1767430901527405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 -1.1033359915018082e-02</internalNodes>\n          <leafValues>\n            4.1271620988845825e-01 -6.2587052583694458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 3.2278439030051231e-03</internalNodes>\n          <leafValues>\n            7.1266986429691315e-02 -4.1172251105308533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 1.7540389299392700e-01</internalNodes>\n          <leafValues>\n            3.4958980977535248e-02 -6.3775068521499634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 -4.8067080206237733e-04</internalNodes>\n          <leafValues>\n            -2.4503110349178314e-01 9.8930649459362030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 -1.8284550169482827e-03</internalNodes>\n          <leafValues>\n            1.3486519455909729e-01 -1.9799900054931641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 1.7096720403060317e-03</internalNodes>\n          <leafValues>\n            -1.0525950044393539e-01 2.1005709469318390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 3.9468301110900939e-04</internalNodes>\n          <leafValues>\n            8.0952547490596771e-02 -2.7405399084091187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 2.3097719531506300e-03</internalNodes>\n          <leafValues>\n            1.2338220328092575e-01 -1.9958800077438354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 3.1529190018773079e-03</internalNodes>\n          <leafValues>\n            -1.0612549632787704e-01 2.2089600563049316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 -1.9097010372206569e-03</internalNodes>\n          <leafValues>\n            -2.5094708800315857e-01 8.7022580206394196e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 -1.2370609911158681e-03</internalNodes>\n          <leafValues>\n            3.0760520696640015e-01 -7.5937293469905853e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 3.7081091431900859e-04</internalNodes>\n          <leafValues>\n            -1.6065080463886261e-01 1.3480199873447418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 3.4268848598003387e-02</internalNodes>\n          <leafValues>\n            3.5260949283838272e-02 -6.3547158241271973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 4.6664681285619736e-03</internalNodes>\n          <leafValues>\n            -5.2494861185550690e-02 4.3242320418357849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 1.0423569940030575e-02</internalNodes>\n          <leafValues>\n            5.1612429320812225e-02 -5.0745230913162231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 1.1215180158615112e-02</internalNodes>\n          <leafValues>\n            -3.8614250719547272e-02 5.7645928859710693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 -7.3029109444178175e-06</internalNodes>\n          <leafValues>\n            1.2052319943904877e-01 -1.7274369299411774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 -4.9072802066802979e-03</internalNodes>\n          <leafValues>\n            -3.4818550944328308e-01 5.9116441756486893e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 1.9488829420879483e-03</internalNodes>\n          <leafValues>\n            -8.8861227035522461e-02 2.4020899832248688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 1.3313010276760906e-04</internalNodes>\n          <leafValues>\n            -1.4657719433307648e-01 1.9929920136928558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 -1.4298240421339869e-03</internalNodes>\n          <leafValues>\n            -3.9005228877067566e-01 5.9909418225288391e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 -6.4831459894776344e-03</internalNodes>\n          <leafValues>\n            1.8141369521617889e-01 -1.1655449867248535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 7.2958500823006034e-06</internalNodes>\n          <leafValues>\n            -1.8219240009784698e-01 1.1812780052423477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 4.1690681246109307e-04</internalNodes>\n          <leafValues>\n            1.0591679811477661e-01 -2.0353710651397705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 5.1982058212161064e-03</internalNodes>\n          <leafValues>\n            -3.5962641239166260e-02 6.0264211893081665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 -4.0649957954883575e-03</internalNodes>\n          <leafValues>\n            2.0696419477462769e-01 -9.8599843680858612e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 -4.7734950203448534e-04</internalNodes>\n          <leafValues>\n            -2.4629549682140350e-01 9.3174271285533905e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 5.2415160462260246e-03</internalNodes>\n          <leafValues>\n            3.6528520286083221e-02 -5.4934787750244141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 3.7873629480600357e-03</internalNodes>\n          <leafValues>\n            -5.7597089558839798e-02 3.8733980059623718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 -1.4434250260819681e-05</internalNodes>\n          <leafValues>\n            1.1292859911918640e-01 -1.7447079718112946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 4.2011599987745285e-02</internalNodes>\n          <leafValues>\n            -4.6556860208511353e-02 4.5454800128936768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 7.9663433134555817e-03</internalNodes>\n          <leafValues>\n            4.2258739471435547e-02 -5.3702521324157715e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 5.3092982852831483e-04</internalNodes>\n          <leafValues>\n            -9.7918719053268433e-02 2.1795919537544250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 5.2906107157468796e-04</internalNodes>\n          <leafValues>\n            7.7961057424545288e-02 -2.8867539763450623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 -1.9556249678134918e-01</internalNodes>\n          <leafValues>\n            -7.6475739479064941e-01 2.7276000007987022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 -1.1559950187802315e-02</internalNodes>\n          <leafValues>\n            3.3526000380516052e-01 -6.3614986836910248e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 -1.4005659520626068e-01</internalNodes>\n          <leafValues>\n            -7.6232051849365234e-01 2.8024470433592796e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 4.4643289584200829e-05</internalNodes>\n          <leafValues>\n            -2.0320929586887360e-01 9.9391698837280273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 3.9411801844835281e-03</internalNodes>\n          <leafValues>\n            4.9936279654502869e-02 -3.7584540247917175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 -4.5965691097080708e-03</internalNodes>\n          <leafValues>\n            3.3031210303306580e-01 -6.3809931278228760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 -6.9790292764082551e-04</internalNodes>\n          <leafValues>\n            1.6093710064888000e-01 -1.3192920386791229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 6.1886821640655398e-04</internalNodes>\n          <leafValues>\n            7.4621193110942841e-02 -3.3021458983421326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 -3.2755140215158463e-02</internalNodes>\n          <leafValues>\n            -4.0643560886383057e-01 4.9308661371469498e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 3.3697509206831455e-03</internalNodes>\n          <leafValues>\n            4.0627099573612213e-02 -4.9757328629493713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 3.7391821388155222e-04</internalNodes>\n          <leafValues>\n            -1.4931799471378326e-01 1.6517969965934753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 -4.0217190980911255e-03</internalNodes>\n          <leafValues>\n            2.9531970620155334e-01 -7.6642103493213654e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 -7.2943832492455840e-04</internalNodes>\n          <leafValues>\n            -2.7355810999870300e-01 7.9243987798690796e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 -5.7726111263036728e-03</internalNodes>\n          <leafValues>\n            3.4741240739822388e-01 -7.6087206602096558e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 -2.1122458856552839e-03</internalNodes>\n          <leafValues>\n            1.7290510237216949e-01 -1.2444470077753067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 4.4956691563129425e-03</internalNodes>\n          <leafValues>\n            3.0218729749321938e-02 -7.4003338813781738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 -1.1419389629736543e-03</internalNodes>\n          <leafValues>\n            -2.3494489490985870e-01 7.6911546289920807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 2.7658098842948675e-03</internalNodes>\n          <leafValues>\n            -9.1666661202907562e-02 2.1009710431098938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 -7.2281848406419158e-04</internalNodes>\n          <leafValues>\n            -2.5587469339370728e-01 7.5378142297267914e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 1.8604539800435305e-03</internalNodes>\n          <leafValues>\n            -9.4511069357395172e-02 1.9726920127868652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 -2.8568008565343916e-04</internalNodes>\n          <leafValues>\n            -2.1073310077190399e-01 9.7290039062500000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -3.8796100765466690e-02</internalNodes>\n          <leafValues>\n            -7.8724592924118042e-01 2.4410309270024300e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 -1.2119869701564312e-02</internalNodes>\n          <leafValues>\n            3.6466810107231140e-01 -5.7907499372959137e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>93</maxWeakCount>\n      <stageThreshold>-1.6563049554824829e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 484 5.6008538231253624e-03</internalNodes>\n          <leafValues>\n            -3.8491588830947876e-01 3.3817461133003235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 -3.7205789703875780e-03</internalNodes>\n          <leafValues>\n            2.4614119529724121e-01 -3.0673781037330627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 -2.5333440862596035e-03</internalNodes>\n          <leafValues>\n            1.2531200051307678e-01 -4.2720189690589905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 -7.3425087612122297e-04</internalNodes>\n          <leafValues>\n            1.3314330577850342e-01 -3.5111570358276367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 -1.4792960428167135e-04</internalNodes>\n          <leafValues>\n            1.2545309960842133e-01 -3.8591191172599792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 -4.8976339399814606e-02</internalNodes>\n          <leafValues>\n            3.6456748843193054e-01 -1.1494780331850052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 1.0917349718511105e-03</internalNodes>\n          <leafValues>\n            7.9005338251590729e-02 -4.1399830579757690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 5.4457997903227806e-03</internalNodes>\n          <leafValues>\n            -1.1921840161085129e-01 3.3085560798645020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 1.5979419695213437e-03</internalNodes>\n          <leafValues>\n            4.1181199252605438e-02 -5.5028229951858521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 -1.3023250503465533e-03</internalNodes>\n          <leafValues>\n            8.2839436829090118e-02 -3.5719320178031921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 4.8810569569468498e-04</internalNodes>\n          <leafValues>\n            -2.0928630232810974e-01 1.4972810447216034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 2.1033850498497486e-03</internalNodes>\n          <leafValues>\n            5.1839418709278107e-02 -6.1099958419799805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 1.1984360404312611e-02</internalNodes>\n          <leafValues>\n            4.1022349148988724e-02 -5.8985722064971924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 -1.1898590251803398e-02</internalNodes>\n          <leafValues>\n            4.5844998955726624e-01 -6.4714707434177399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 5.3713661618530750e-03</internalNodes>\n          <leafValues>\n            -6.1560470610857010e-02 4.1204369068145752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 4.3421140871942043e-03</internalNodes>\n          <leafValues>\n            6.0501661151647568e-02 -4.8703390359878540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 6.6142519935965538e-03</internalNodes>\n          <leafValues>\n            4.6873189508914948e-02 -5.0346171855926514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 1.2339729582890868e-03</internalNodes>\n          <leafValues>\n            -8.1538438796997070e-02 3.0428299307823181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 -1.2975660152733326e-02</internalNodes>\n          <leafValues>\n            -4.7834330797195435e-01 4.8681490123271942e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -1.7806360265240073e-03</internalNodes>\n          <leafValues>\n            3.7698730826377869e-01 -6.8126037716865540e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 7.8339744359254837e-03</internalNodes>\n          <leafValues>\n            5.4501280188560486e-02 -4.6738588809967041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 -6.0113701038062572e-03</internalNodes>\n          <leafValues>\n            5.4870051145553589e-01 -4.4434640556573868e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 -2.0694560371339321e-03</internalNodes>\n          <leafValues>\n            -3.7755548954010010e-01 6.4383402466773987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 4.7843591310083866e-03</internalNodes>\n          <leafValues>\n            4.6252150088548660e-02 -5.2633982896804810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 -6.2808818183839321e-03</internalNodes>\n          <leafValues>\n            3.9451861381530762e-01 -6.9051302969455719e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 1.6099009662866592e-03</internalNodes>\n          <leafValues>\n            -1.0316190123558044e-01 2.7321669459342957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 -8.2392559852451086e-04</internalNodes>\n          <leafValues>\n            -2.8039410710334778e-01 8.4601573646068573e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 -1.0123319923877716e-02</internalNodes>\n          <leafValues>\n            3.3635950088500977e-01 -6.1322949826717377e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 1.0525720193982124e-02</internalNodes>\n          <leafValues>\n            4.6165600419044495e-02 -5.1672130823135376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 -2.6774499565362930e-02</internalNodes>\n          <leafValues>\n            -5.0325971841812134e-01 3.9857819676399231e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 4.0248301811516285e-03</internalNodes>\n          <leafValues>\n            -6.1501380056142807e-02 3.6659809947013855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 -4.6271650353446603e-04</internalNodes>\n          <leafValues>\n            -2.6439830660820007e-01 8.1311263144016266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 -5.1834900659741834e-05</internalNodes>\n          <leafValues>\n            1.1154399812221527e-01 -2.0269370079040527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 4.8874281346797943e-03</internalNodes>\n          <leafValues>\n            -6.9644987583160400e-02 3.3612030744552612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 1.2638230621814728e-01</internalNodes>\n          <leafValues>\n            3.6813639104366302e-02 -6.5849918127059937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 -8.0248164013028145e-03</internalNodes>\n          <leafValues>\n            4.6601921319961548e-01 -4.8885859549045563e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 -1.1518909595906734e-03</internalNodes>\n          <leafValues>\n            -4.0466758608818054e-01 5.8572851121425629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 9.8190037533640862e-04</internalNodes>\n          <leafValues>\n            -1.3197229802608490e-01 1.7744350433349609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 -1.9447980448603630e-02</internalNodes>\n          <leafValues>\n            -6.8489527702331543e-01 3.3834591507911682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 -7.2442039709130768e-06</internalNodes>\n          <leafValues>\n            1.1553110182285309e-01 -1.8726129829883575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 -1.7039060592651367e-02</internalNodes>\n          <leafValues>\n            -3.5105291008949280e-01 6.7737713456153870e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 1.1186580173671246e-02</internalNodes>\n          <leafValues>\n            -9.3420043587684631e-02 2.1077099442481995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 7.6585268834605813e-04</internalNodes>\n          <leafValues>\n            6.5965756773948669e-02 -3.2127881050109863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 1.4231950626708567e-04</internalNodes>\n          <leafValues>\n            -1.5460130572319031e-01 1.3757640123367310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 -5.5553209967911243e-03</internalNodes>\n          <leafValues>\n            3.1319350004196167e-01 -6.4753532409667969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 1.2308239820413291e-04</internalNodes>\n          <leafValues>\n            9.7666621208190918e-02 -2.2251069545745850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 -1.6092039877548814e-03</internalNodes>\n          <leafValues>\n            -3.6215591430664062e-01 6.4452558755874634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 -1.5626100357621908e-03</internalNodes>\n          <leafValues>\n            2.2588780522346497e-01 -9.5551103353500366e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 -5.0116342026740313e-04</internalNodes>\n          <leafValues>\n            -2.2289219498634338e-01 8.9174531400203705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 3.7322030402719975e-04</internalNodes>\n          <leafValues>\n            9.1969013214111328e-02 -2.1129919588565826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 -2.2882660850882530e-03</internalNodes>\n          <leafValues>\n            3.8989049196243286e-01 -5.3455859422683716e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 -4.6884030103683472e-02</internalNodes>\n          <leafValues>\n            -6.2357091903686523e-01 3.2194521278142929e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 1.8901260336861014e-03</internalNodes>\n          <leafValues>\n            -7.2615146636962891e-02 2.7420088648796082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 1.5805330127477646e-02</internalNodes>\n          <leafValues>\n            2.8601830825209618e-02 -6.9608169794082642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 3.2644178718328476e-02</internalNodes>\n          <leafValues>\n            -4.0772251784801483e-02 5.0873398780822754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 6.5482832724228501e-04</internalNodes>\n          <leafValues>\n            8.5724912583827972e-02 -2.7580630779266357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 -1.1142930015921593e-02</internalNodes>\n          <leafValues>\n            8.7326012551784515e-02 -2.0914819836616516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 -5.8072229148820043e-04</internalNodes>\n          <leafValues>\n            -2.9471421241760254e-01 6.6337890923023224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 -7.4414577102288604e-04</internalNodes>\n          <leafValues>\n            1.8017959594726562e-01 -1.0654629766941071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 7.6460661366581917e-03</internalNodes>\n          <leafValues>\n            -6.3608147203922272e-02 3.1582340598106384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 3.2617211341857910e-02</internalNodes>\n          <leafValues>\n            3.2606441527605057e-02 -6.0541188716888428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 -3.4527231007814407e-02</internalNodes>\n          <leafValues>\n            -5.9770858287811279e-01 2.7888769283890724e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 3.2211719080805779e-03</internalNodes>\n          <leafValues>\n            -4.9183920025825500e-02 4.0305620431900024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 -4.1549839079380035e-04</internalNodes>\n          <leafValues>\n            1.3533140718936920e-01 -1.5845330059528351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 2.5140501093119383e-03</internalNodes>\n          <leafValues>\n            6.3218571245670319e-02 -3.0768528580665588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 -2.0818209648132324e-01</internalNodes>\n          <leafValues>\n            -7.5750261545181274e-01 2.2695960476994514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 -2.6067279279232025e-02</internalNodes>\n          <leafValues>\n            -7.4959957599639893e-01 1.9375480711460114e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 -5.8264029212296009e-04</internalNodes>\n          <leafValues>\n            9.4658233225345612e-02 -1.9919820129871368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 -3.2769259996712208e-03</internalNodes>\n          <leafValues>\n            1.6214330494403839e-01 -1.2322030216455460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 1.3998829526826739e-03</internalNodes>\n          <leafValues>\n            -1.0849200189113617e-01 2.3151659965515137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 -1.2055980041623116e-02</internalNodes>\n          <leafValues>\n            -2.4002850055694580e-01 9.3272961676120758e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 3.1805539038032293e-03</internalNodes>\n          <leafValues>\n            7.6264120638370514e-02 -2.5435069203376770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -1.0693799704313278e-03</internalNodes>\n          <leafValues>\n            2.2258889675140381e-01 -9.0730242431163788e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 -2.9467688873410225e-03</internalNodes>\n          <leafValues>\n            -3.4242698550224304e-01 6.0581039637327194e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 8.8108901400119066e-04</internalNodes>\n          <leafValues>\n            -7.8326202929019928e-02 2.6911988854408264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 2.8118939371779561e-04</internalNodes>\n          <leafValues>\n            9.8370827734470367e-02 -2.1947909891605377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 -1.8574869260191917e-02</internalNodes>\n          <leafValues>\n            2.6729720830917358e-01 -7.1240752935409546e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 561 -2.4810349568724632e-02</internalNodes>\n          <leafValues>\n            -6.8322032690048218e-01 2.9446309432387352e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 2.8904930222779512e-03</internalNodes>\n          <leafValues>\n            7.6161012053489685e-02 -2.4025200307369232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 3.5410430282354355e-03</internalNodes>\n          <leafValues>\n            -1.0742089897394180e-01 1.8509419262409210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 -8.4244477329775691e-04</internalNodes>\n          <leafValues>\n            1.8727229535579681e-01 -1.1407770216464996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 -2.5338360574096441e-03</internalNodes>\n          <leafValues>\n            -3.5870191454887390e-01 5.1251661032438278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 1.9654980860650539e-03</internalNodes>\n          <leafValues>\n            -1.4064720273017883e-01 1.3041019439697266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 3.1574100255966187e-01</internalNodes>\n          <leafValues>\n            2.9550969600677490e-02 -6.3157892227172852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 -2.9846638790331781e-04</internalNodes>\n          <leafValues>\n            -2.2911080718040466e-01 7.8875422477722168e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 -1.1545480042695999e-01</internalNodes>\n          <leafValues>\n            -8.1895941495895386e-01 2.2261450067162514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 -3.5817299038171768e-02</internalNodes>\n          <leafValues>\n            -3.0612939596176147e-01 6.0644190758466721e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 1.7071690410375595e-02</internalNodes>\n          <leafValues>\n            -6.1134841293096542e-02 3.2152679562568665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 -2.1385080181062222e-03</internalNodes>\n          <leafValues>\n            -5.4798161983489990e-01 3.8667369633913040e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 6.5424457192420959e-02</internalNodes>\n          <leafValues>\n            1.7884260043501854e-02 -8.5628831386566162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 -1.3419929891824722e-02</internalNodes>\n          <leafValues>\n            3.0995100736618042e-01 -6.7559666931629181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 1.8939709290862083e-02</internalNodes>\n          <leafValues>\n            2.8729729354381561e-02 -7.5338190793991089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 -2.9120460152626038e-02</internalNodes>\n          <leafValues>\n            -7.3594617843627930e-01 2.0359549671411514e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>79</maxWeakCount>\n      <stageThreshold>-1.5920439958572388e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 577 -1.3419030234217644e-02</internalNodes>\n          <leafValues>\n            3.0538010597229004e-01 -4.1782331466674805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 1.7404999816790223e-03</internalNodes>\n          <leafValues>\n            -2.7101579308509827e-01 3.5409560799598694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 7.7174860052764416e-03</internalNodes>\n          <leafValues>\n            -3.1271371245384216e-01 2.1189980208873749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 -1.4514879694615956e-05</internalNodes>\n          <leafValues>\n            1.6157090663909912e-01 -3.3522731065750122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 -1.4871519852022175e-05</internalNodes>\n          <leafValues>\n            1.4571620523929596e-01 -2.9369521141052246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 1.5004149463493377e-04</internalNodes>\n          <leafValues>\n            -4.0149879455566406e-01 1.0407949984073639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 1.8634879961609840e-03</internalNodes>\n          <leafValues>\n            4.9062840640544891e-02 -6.5208268165588379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 -2.9590800404548645e-03</internalNodes>\n          <leafValues>\n            2.8804430365562439e-01 -1.3293409347534180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 3.3067780896089971e-04</internalNodes>\n          <leafValues>\n            3.9615370333194733e-02 -4.1540861129760742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 -1.6816710121929646e-03</internalNodes>\n          <leafValues>\n            1.3032579421997070e-01 -2.3237510025501251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 3.4896740689873695e-03</internalNodes>\n          <leafValues>\n            6.8852916359901428e-02 -4.7176009416580200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 1.6204500570893288e-03</internalNodes>\n          <leafValues>\n            -1.0996960103511810e-01 3.4887188673019409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 1.9125849939882755e-04</internalNodes>\n          <leafValues>\n            -2.0317320525646210e-01 1.4775620400905609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 2.2485259920358658e-02</internalNodes>\n          <leafValues>\n            5.1929730921983719e-02 -5.4815691709518433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 1.0035949759185314e-02</internalNodes>\n          <leafValues>\n            -1.0943319648504257e-01 2.6000571250915527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 4.0091630071401596e-02</internalNodes>\n          <leafValues>\n            3.8657050579786301e-02 -7.4724602699279785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 1.5319019556045532e-02</internalNodes>\n          <leafValues>\n            2.8579369187355042e-02 -7.7717798948287964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 9.0913427993655205e-04</internalNodes>\n          <leafValues>\n            -1.5049549937248230e-01 1.7363379895687103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 -6.0226190835237503e-03</internalNodes>\n          <leafValues>\n            -4.7704491019248962e-01 5.8185670524835587e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 596 7.8066787682473660e-04</internalNodes>\n          <leafValues>\n            -1.6349339485168457e-01 1.6236920654773712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 -1.1492020450532436e-02</internalNodes>\n          <leafValues>\n            -5.6185477972030640e-01 4.6009611338376999e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 8.9691327884793282e-03</internalNodes>\n          <leafValues>\n            6.6570483148097992e-02 -3.3824840188026428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 7.2241941234096885e-04</internalNodes>\n          <leafValues>\n            -1.2882669270038605e-01 1.9002969563007355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 1.4879239643050823e-05</internalNodes>\n          <leafValues>\n            -2.1765929460525513e-01 1.3151009380817413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 8.7159732356667519e-03</internalNodes>\n          <leafValues>\n            4.8188239336013794e-02 -5.2367717027664185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 -1.3809900265187025e-03</internalNodes>\n          <leafValues>\n            -3.1734630465507507e-01 6.7012362182140350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 1.4004110358655453e-02</internalNodes>\n          <leafValues>\n            -7.2155177593231201e-02 3.4900391101837158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 -1.2883460149168968e-02</internalNodes>\n          <leafValues>\n            -5.9674298763275146e-01 3.9219990372657776e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 9.9220760166645050e-03</internalNodes>\n          <leafValues>\n            -7.3617048561573029e-02 3.5491651296615601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 -1.0360360145568848e-02</internalNodes>\n          <leafValues>\n            -4.9655780196189880e-01 5.4516721516847610e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 5.9103948296979070e-04</internalNodes>\n          <leafValues>\n            -9.1649092733860016e-02 2.3738409578800201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 1.4986419955675956e-05</internalNodes>\n          <leafValues>\n            -1.5624360740184784e-01 1.4216689765453339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 6.2526292167603970e-03</internalNodes>\n          <leafValues>\n            4.6570941805839539e-02 -4.3861261010169983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 9.0722978115081787e-02</internalNodes>\n          <leafValues>\n            2.3544119670987129e-02 -7.5557678937911987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 1.2880839640274644e-03</internalNodes>\n          <leafValues>\n            -1.0999819636344910e-01 1.9954189658164978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 -5.3202832350507379e-04</internalNodes>\n          <leafValues>\n            -2.3681020736694336e-01 9.4349831342697144e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 1.4669039519503713e-03</internalNodes>\n          <leafValues>\n            -6.0417938977479935e-02 3.5437929630279541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 2.5929270312190056e-02</internalNodes>\n          <leafValues>\n            3.0205380171537399e-02 -7.1175122261047363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 -7.2257839143276215e-02</internalNodes>\n          <leafValues>\n            -7.6830059289932251e-01 2.2078540176153183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 -2.5999830104410648e-03</internalNodes>\n          <leafValues>\n            2.2878250479698181e-01 -9.2575646936893463e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 4.2036110162734985e-01</internalNodes>\n          <leafValues>\n            3.4129150211811066e-02 -6.3944667577743530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 -2.1722039673477411e-03</internalNodes>\n          <leafValues>\n            -2.0458799600601196e-01 9.6727348864078522e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 -1.8573250621557236e-02</internalNodes>\n          <leafValues>\n            -7.2321742773056030e-01 2.6587400585412979e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 2.1321140229701996e-03</internalNodes>\n          <leafValues>\n            -7.9263173043727875e-02 2.9004418849945068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 1.4585970347980037e-05</internalNodes>\n          <leafValues>\n            -1.5812200307846069e-01 1.2857919931411743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 -2.5919941067695618e-01</internalNodes>\n          <leafValues>\n            -8.3206391334533691e-01 2.1327629685401917e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 -1.2713880278170109e-02</internalNodes>\n          <leafValues>\n            -4.8670661449432373e-01 3.5282909870147705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 2.1182969212532043e-03</internalNodes>\n          <leafValues>\n            -4.8141859471797943e-02 4.3498820066452026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 4.9225408583879471e-03</internalNodes>\n          <leafValues>\n            5.9389010071754456e-02 -3.5719910264015198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 7.1720690466463566e-03</internalNodes>\n          <leafValues>\n            -7.2721220552921295e-02 3.1716778874397278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 1.5319329686462879e-03</internalNodes>\n          <leafValues>\n            7.6105281710624695e-02 -2.9826408624649048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 -2.6141680777072906e-02</internalNodes>\n          <leafValues>\n            -4.8129829764366150e-01 4.1991200298070908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 -7.1861818469187710e-06</internalNodes>\n          <leafValues>\n            1.0385909676551819e-01 -2.5540891289710999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 -5.8513309340924025e-04</internalNodes>\n          <leafValues>\n            2.1552430093288422e-01 -1.0446780174970627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 7.3564669582992792e-04</internalNodes>\n          <leafValues>\n            8.2850307226181030e-02 -2.3229689896106720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 -4.4216000242158771e-04</internalNodes>\n          <leafValues>\n            1.9849689304828644e-01 -1.1084359884262085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 6.6545000299811363e-03</internalNodes>\n          <leafValues>\n            2.9844839125871658e-02 -6.3819402456283569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 -1.4856060261081439e-05</internalNodes>\n          <leafValues>\n            1.0647810250520706e-01 -1.6304740309715271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 4.4933347962796688e-03</internalNodes>\n          <leafValues>\n            -5.8312181383371353e-02 3.2200211286544800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 3.8110970053821802e-03</internalNodes>\n          <leafValues>\n            7.1237437427043915e-02 -2.7149480581283569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 -3.8309019058942795e-02</internalNodes>\n          <leafValues>\n            -6.2387478351593018e-01 2.9790399596095085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 -2.5534629821777344e-03</internalNodes>\n          <leafValues>\n            2.0947620272636414e-01 -9.3472570180892944e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 -2.9908109354437329e-05</internalNodes>\n          <leafValues>\n            1.4771899580955505e-01 -1.2858720123767853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 2.0549520850181580e-03</internalNodes>\n          <leafValues>\n            -9.3603983521461487e-02 2.1911169588565826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 3.3064800663851202e-04</internalNodes>\n          <leafValues>\n            -1.4430660009384155e-01 1.6905060410499573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 4.0969369001686573e-04</internalNodes>\n          <leafValues>\n            8.9844956994056702e-02 -2.1793210506439209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 -5.1680381875485182e-04</internalNodes>\n          <leafValues>\n            -2.7330860495567322e-01 7.2490707039833069e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 -1.2285299599170685e-02</internalNodes>\n          <leafValues>\n            -5.7899951934814453e-01 2.8828129172325134e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 1.4923219569027424e-03</internalNodes>\n          <leafValues>\n            -8.9748427271842957e-02 2.1315790712833405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 3.7809570785611868e-03</internalNodes>\n          <leafValues>\n            5.6869130581617355e-02 -3.2580479979515076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 -1.3630799949169159e-01</internalNodes>\n          <leafValues>\n            -5.1958292722702026e-01 3.4014869481325150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 2.1192250773310661e-02</internalNodes>\n          <leafValues>\n            -5.9815749526023865e-02 4.3134000897407532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 -2.2501780185848475e-03</internalNodes>\n          <leafValues>\n            -3.2725110650062561e-01 6.9494038820266724e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 -1.3309439644217491e-02</internalNodes>\n          <leafValues>\n            5.5684721469879150e-01 -3.8055110722780228e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 -4.8674400895833969e-02</internalNodes>\n          <leafValues>\n            3.7503889203071594e-01 -4.8045299947261810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 -1.4651560377387796e-05</internalNodes>\n          <leafValues>\n            9.3043543398380280e-02 -2.2984559834003448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 -7.7605661936104298e-03</internalNodes>\n          <leafValues>\n            3.8858211040496826e-01 -5.4669309407472610e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 2.4429330602288246e-02</internalNodes>\n          <leafValues>\n            4.5898649841547012e-02 -5.1061111688613892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 -2.1317049686331302e-04</internalNodes>\n          <leafValues>\n            -2.0513610541820526e-01 1.0507310181856155e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>105</maxWeakCount>\n      <stageThreshold>-1.6632529497146606e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 656 -5.7014292106032372e-03</internalNodes>\n          <leafValues>\n            2.7576211094856262e-01 -3.3123719692230225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 -4.4359369203448296e-03</internalNodes>\n          <leafValues>\n            1.5587480366230011e-01 -5.0288617610931396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 -5.0388257950544357e-03</internalNodes>\n          <leafValues>\n            1.6109010577201843e-01 -3.5196068882942200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 8.0847437493503094e-04</internalNodes>\n          <leafValues>\n            -3.3315700292587280e-01 1.4446459710597992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 2.1605329588055611e-02</internalNodes>\n          <leafValues>\n            -8.6723573505878448e-02 5.9101939201354980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 -1.8266839906573296e-02</internalNodes>\n          <leafValues>\n            5.0261861085891724e-01 -8.4620863199234009e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 -8.3384668687358499e-04</internalNodes>\n          <leafValues>\n            -3.0832511186599731e-01 1.1352760344743729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 -1.5336600132286549e-02</internalNodes>\n          <leafValues>\n            -6.8610608577728271e-01 3.3057838678359985e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 -5.0607877783477306e-03</internalNodes>\n          <leafValues>\n            3.4399279952049255e-01 -9.2118233442306519e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 -1.4741700397280511e-05</internalNodes>\n          <leafValues>\n            1.1778169870376587e-01 -2.5235179066658020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 -1.1485730065032840e-03</internalNodes>\n          <leafValues>\n            -2.9050019383430481e-01 8.3533048629760742e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 2.8824089094996452e-03</internalNodes>\n          <leafValues>\n            -9.0674236416816711e-02 3.1274148821830750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 -2.9224360361695290e-02</internalNodes>\n          <leafValues>\n            -6.9156378507614136e-01 3.3279780298471451e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 2.1423520520329475e-03</internalNodes>\n          <leafValues>\n            -1.0087729990482330e-01 2.4603089690208435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 -3.3471059054136276e-02</internalNodes>\n          <leafValues>\n            -5.0953942537307739e-01 5.5052071809768677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 1.4763450053578708e-05</internalNodes>\n          <leafValues>\n            -1.7823149263858795e-01 1.2816399335861206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 1.6341559588909149e-02</internalNodes>\n          <leafValues>\n            -1.3254739344120026e-01 1.9663499295711517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 2.2475779987871647e-03</internalNodes>\n          <leafValues>\n            7.9048447310924530e-02 -2.9476320743560791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 4.6113221906125546e-03</internalNodes>\n          <leafValues>\n            -7.6338447630405426e-02 3.2394409179687500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 2.8979079797863960e-03</internalNodes>\n          <leafValues>\n            -1.0839050263166428e-01 2.6353389024734497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 1.3482819776982069e-03</internalNodes>\n          <leafValues>\n            7.9134561121463776e-02 -3.4839859604835510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 4.6576592139899731e-03</internalNodes>\n          <leafValues>\n            7.6356090605258942e-02 -3.1110540032386780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 678 -3.9915097877383232e-03</internalNodes>\n          <leafValues>\n            -3.4151628613471985e-01 8.2623466849327087e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 6.0268798843026161e-03</internalNodes>\n          <leafValues>\n            -9.6277832984924316e-02 2.6347661018371582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 -4.1388701647520065e-03</internalNodes>\n          <leafValues>\n            2.3571729660034180e-01 -9.4335287809371948e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 -1.0371750220656395e-02</internalNodes>\n          <leafValues>\n            -7.2972798347473145e-01 3.3645220100879669e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 1.0373629629611969e-01</internalNodes>\n          <leafValues>\n            3.1347069889307022e-02 -5.8245128393173218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 -1.8832299974747002e-04</internalNodes>\n          <leafValues>\n            1.6663299500942230e-01 -1.3723160326480865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 -6.0749921249225736e-04</internalNodes>\n          <leafValues>\n            -2.7257540822029114e-01 8.1483371555805206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 2.3499270901083946e-03</internalNodes>\n          <leafValues>\n            -1.0285440087318420e-01 2.1854889392852783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 -3.1354159582406282e-03</internalNodes>\n          <leafValues>\n            -4.9246039986610413e-01 4.4747360050678253e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 1.5564589994028211e-03</internalNodes>\n          <leafValues>\n            5.3096260875463486e-02 -4.0526211261749268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 6.3236099667847157e-03</internalNodes>\n          <leafValues>\n            -7.9116806387901306e-02 2.8413718938827515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 -4.8074051737785339e-03</internalNodes>\n          <leafValues>\n            2.9990258812904358e-01 -8.2824081182479858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 7.6432302594184875e-02</internalNodes>\n          <leafValues>\n            3.9146371185779572e-02 -5.7314342260360718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 7.0249952841550112e-04</internalNodes>\n          <leafValues>\n            5.2832871675491333e-02 -3.3245471119880676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 -8.2157138967886567e-04</internalNodes>\n          <leafValues>\n            -2.1230019629001617e-01 8.8145829737186432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 -1.0148280300199986e-02</internalNodes>\n          <leafValues>\n            -2.2071610391139984e-01 9.6597403287887573e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 -1.7348809540271759e-01</internalNodes>\n          <leafValues>\n            -5.9822201728820801e-01 3.2547060400247574e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 4.3031540699303150e-03</internalNodes>\n          <leafValues>\n            -6.8253546953201294e-02 2.8981029987335205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 -7.3378678280278109e-06</internalNodes>\n          <leafValues>\n            7.5155563652515411e-02 -2.5863590836524963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 1.9277239916846156e-03</internalNodes>\n          <leafValues>\n            1.0856460034847260e-01 -1.6595140099525452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 -4.2054480873048306e-03</internalNodes>\n          <leafValues>\n            1.9811309874057770e-01 -9.1941706836223602e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 699 1.1466189753264189e-03</internalNodes>\n          <leafValues>\n            4.2078729718923569e-02 -4.3991029262542725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 -6.7244949750602245e-03</internalNodes>\n          <leafValues>\n            3.4456861019134521e-01 -5.7096958160400391e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 -1.4554189874615986e-05</internalNodes>\n          <leafValues>\n            1.1632560193538666e-01 -1.6252210736274719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 -2.6114559732377529e-03</internalNodes>\n          <leafValues>\n            2.8084969520568848e-01 -6.8243041634559631e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 -1.9477460591588169e-04</internalNodes>\n          <leafValues>\n            -1.9368860125541687e-01 9.3413226306438446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 2.6438338682055473e-04</internalNodes>\n          <leafValues>\n            9.9354371428489685e-02 -2.1586629748344421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 2.0134719088673592e-03</internalNodes>\n          <leafValues>\n            -6.1209201812744141e-02 2.9120978713035583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 -2.6024359464645386e-01</internalNodes>\n          <leafValues>\n            -8.3802181482315063e-01 2.1150760352611542e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 -1.5944700688123703e-02</internalNodes>\n          <leafValues>\n            -6.3974797725677490e-01 2.2144839167594910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 6.7249889252707362e-04</internalNodes>\n          <leafValues>\n            -1.4014090597629547e-01 1.2326350063085556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 1.3042770326137543e-02</internalNodes>\n          <leafValues>\n            2.4306889623403549e-02 -6.6303068399429321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 -1.4540290067088790e-05</internalNodes>\n          <leafValues>\n            9.0137362480163574e-02 -1.7409169673919678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 711 1.7920829355716705e-02</internalNodes>\n          <leafValues>\n            2.5644620880484581e-02 -6.5067142248153687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 1.6542300581932068e-03</internalNodes>\n          <leafValues>\n            -1.0385700315237045e-01 1.6688160598278046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 3.5362090915441513e-02</internalNodes>\n          <leafValues>\n            2.3093009367585182e-02 -6.9009417295455933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 3.3049840567400679e-05</internalNodes>\n          <leafValues>\n            -1.7408940196037292e-01 9.3873098492622375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 3.3775588963180780e-03</internalNodes>\n          <leafValues>\n            -5.8522459119558334e-02 3.0490559339523315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 7.3239738121628761e-03</internalNodes>\n          <leafValues>\n            4.0999408811330795e-02 -4.6160981059074402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 -2.9797051101922989e-03</internalNodes>\n          <leafValues>\n            5.1136761903762817e-01 -3.6246869713068008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 2.0306499209254980e-03</internalNodes>\n          <leafValues>\n            6.5309353172779083e-02 -2.6698499917984009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 -6.8856950383633375e-04</internalNodes>\n          <leafValues>\n            -1.7604120075702667e-01 9.9361896514892578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 1.5746579738333821e-03</internalNodes>\n          <leafValues>\n            -1.0312269628047943e-01 1.6940550506114960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 1.5011089853942394e-03</internalNodes>\n          <leafValues>\n            -8.8128447532653809e-02 1.8899090588092804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 1.3503979425877333e-04</internalNodes>\n          <leafValues>\n            9.4145476818084717e-02 -1.8483440577983856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 5.5570588447153568e-03</internalNodes>\n          <leafValues>\n            2.9959060251712799e-02 -5.5482620000839233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 9.4529995694756508e-03</internalNodes>\n          <leafValues>\n            -5.3136389702558517e-02 4.0138289332389832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 -6.1030662618577480e-04</internalNodes>\n          <leafValues>\n            -2.7060449123382568e-01 6.6881351172924042e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 -1.1329240351915359e-01</internalNodes>\n          <leafValues>\n            -6.5178507566452026e-01 2.5042990222573280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 -2.0354389562271535e-04</internalNodes>\n          <leafValues>\n            1.0892420262098312e-01 -1.5174369513988495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 -1.4983189757913351e-03</internalNodes>\n          <leafValues>\n            2.7388730645179749e-01 -5.8467049151659012e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 7.5277159921824932e-03</internalNodes>\n          <leafValues>\n            4.0991529822349548e-02 -4.2739889025688171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 3.6209179088473320e-03</internalNodes>\n          <leafValues>\n            -6.7309238016605377e-02 2.6064750552177429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 1.2153049930930138e-02</internalNodes>\n          <leafValues>\n            5.0768271088600159e-02 -3.8319081068038940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 4.6126339584589005e-02</internalNodes>\n          <leafValues>\n            2.4232989177107811e-02 -6.5039527416229248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 7.1408541407436132e-04</internalNodes>\n          <leafValues>\n            -1.3476370275020599e-01 1.2208549678325653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 -4.4331620447337627e-03</internalNodes>\n          <leafValues>\n            1.9939610362052917e-01 -1.0218709707260132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 1.3099729549139738e-03</internalNodes>\n          <leafValues>\n            7.4517026543617249e-02 -2.4503719806671143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 2.6161450659856200e-04</internalNodes>\n          <leafValues>\n            -8.4287956357002258e-02 1.9924600422382355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 -2.7577539440244436e-03</internalNodes>\n          <leafValues>\n            -6.8734467029571533e-01 2.4851109832525253e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 6.9469690322875977e-02</internalNodes>\n          <leafValues>\n            3.8438729941844940e-02 -3.9717179536819458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 -1.3031469425186515e-03</internalNodes>\n          <leafValues>\n            2.0089949667453766e-01 -9.1723307967185974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 1.3012000126764178e-03</internalNodes>\n          <leafValues>\n            -9.5305852591991425e-02 1.9248190522193909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 -3.9377259090542793e-03</internalNodes>\n          <leafValues>\n            -3.9224091172218323e-01 4.3738011270761490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 9.6125707030296326e-02</internalNodes>\n          <leafValues>\n            -4.3269440531730652e-02 3.7441849708557129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 -1.9181859493255615e-01</internalNodes>\n          <leafValues>\n            -6.1320561170578003e-01 2.8775539249181747e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 -3.2945619896054268e-03</internalNodes>\n          <leafValues>\n            -2.2446820139884949e-01 7.7655017375946045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 745 -8.5190916433930397e-03</internalNodes>\n          <leafValues>\n            4.4720551371574402e-01 -4.1310388594865799e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 -4.9431469291448593e-02</internalNodes>\n          <leafValues>\n            -5.1819682121276855e-01 3.6863740533590317e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 2.3110879585146904e-02</internalNodes>\n          <leafValues>\n            -3.3078420907258987e-02 5.9146630764007568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 -4.3400399590609595e-05</internalNodes>\n          <leafValues>\n            1.1395029723644257e-01 -1.9526299834251404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 5.4926839657127857e-03</internalNodes>\n          <leafValues>\n            6.1616070568561554e-02 -2.5591990351676941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 1.1886029969900846e-03</internalNodes>\n          <leafValues>\n            -6.8509116768836975e-02 2.4291250109672546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 8.8473428040742874e-03</internalNodes>\n          <leafValues>\n            7.6467283070087433e-02 -2.3176389932632446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 2.3952820338308811e-03</internalNodes>\n          <leafValues>\n            -4.4620860368013382e-02 4.5811769366264343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 -1.5011220239102840e-04</internalNodes>\n          <leafValues>\n            -1.6560749709606171e-01 1.0622239857912064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 -2.3465899750590324e-02</internalNodes>\n          <leafValues>\n            -2.4931310117244720e-01 6.6179357469081879e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 -6.6368370316922665e-03</internalNodes>\n          <leafValues>\n            1.4358420670032501e-01 -1.1510509997606277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 1.1986029567196965e-03</internalNodes>\n          <leafValues>\n            -9.8347522318363190e-02 1.7605540156364441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 7.9502072185277939e-03</internalNodes>\n          <leafValues>\n            3.5481378436088562e-02 -5.0176638364791870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 -4.5950649655424058e-04</internalNodes>\n          <leafValues>\n            -1.6928760707378387e-01 9.3400083482265472e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 -1.9301069900393486e-02</internalNodes>\n          <leafValues>\n            4.1836661100387573e-01 -5.1140110939741135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 4.0163499116897583e-01</internalNodes>\n          <leafValues>\n            2.9358919709920883e-02 -6.4768058061599731e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>114</maxWeakCount>\n      <stageThreshold>-1.5384509563446045e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 761 -3.6284290254116058e-02</internalNodes>\n          <leafValues>\n            4.2841899394989014e-01 -2.5840431451797485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 3.0520830303430557e-02</internalNodes>\n          <leafValues>\n            -2.9715040326118469e-01 2.1756610274314880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 3.3444820437580347e-03</internalNodes>\n          <leafValues>\n            -2.1734359860420227e-01 1.9754439592361450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 -1.3315919786691666e-03</internalNodes>\n          <leafValues>\n            1.5535929799079895e-01 -2.3133680224418640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 -1.9773480016738176e-03</internalNodes>\n          <leafValues>\n            -4.2001301050186157e-01 8.8554427027702332e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 -3.7038238951936364e-04</internalNodes>\n          <leafValues>\n            1.2769789993762970e-01 -2.3879130184650421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 -7.3736459016799927e-03</internalNodes>\n          <leafValues>\n            -4.0720060467720032e-01 2.9765319079160690e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 -2.1873020159546286e-05</internalNodes>\n          <leafValues>\n            1.2338209897279739e-01 -2.2237089276313782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 4.5575048716273159e-05</internalNodes>\n          <leafValues>\n            -2.3092910647392273e-01 1.2953619658946991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 -1.1247170157730579e-02</internalNodes>\n          <leafValues>\n            -5.4762738943099976e-01 4.1907660663127899e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 -8.9430268853902817e-03</internalNodes>\n          <leafValues>\n            2.7945289015769958e-01 -9.0801216661930084e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 1.4646670024376363e-05</internalNodes>\n          <leafValues>\n            -1.6777880489826202e-01 1.4968040585517883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 -6.5398351289331913e-03</internalNodes>\n          <leafValues>\n            3.3654621243476868e-01 -7.1987256407737732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 3.3825531136244535e-03</internalNodes>\n          <leafValues>\n            4.9931880086660385e-02 -4.5806300640106201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 2.7450500056147575e-03</internalNodes>\n          <leafValues>\n            3.6119509488344193e-02 -5.7113862037658691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 1.0356379672884941e-02</internalNodes>\n          <leafValues>\n            -5.3049158304929733e-02 4.2121198773384094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 3.1687319278717041e-03</internalNodes>\n          <leafValues>\n            6.2849938869476318e-02 -3.4674918651580811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 1.3616570504382253e-03</internalNodes>\n          <leafValues>\n            -9.0661056339740753e-02 2.5257480144500732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 -2.2238260135054588e-03</internalNodes>\n          <leafValues>\n            2.6595190167427063e-01 -9.6649080514907837e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 780 1.1090899817645550e-02</internalNodes>\n          <leafValues>\n            8.6638063192367554e-02 -3.0103358626365662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 -6.7766150459647179e-04</internalNodes>\n          <leafValues>\n            9.4277828931808472e-02 -2.1464149653911591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 -3.3104580361396074e-03</internalNodes>\n          <leafValues>\n            -5.9162640571594238e-01 3.2738488167524338e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 2.3221869487315416e-03</internalNodes>\n          <leafValues>\n            -9.5557250082492828e-02 2.0546199381351471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 3.0947118648327887e-04</internalNodes>\n          <leafValues>\n            -1.2992270290851593e-01 1.7704719305038452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 -3.2214168459177017e-02</internalNodes>\n          <leafValues>\n            -6.4662492275238037e-01 3.1749259680509567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 -8.3192758029326797e-04</internalNodes>\n          <leafValues>\n            -3.0666750669479370e-01 6.1040591448545456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 3.9188290247693658e-04</internalNodes>\n          <leafValues>\n            -1.5795469284057617e-01 1.1830350011587143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 -3.6203738301992416e-02</internalNodes>\n          <leafValues>\n            -2.2731229662895203e-01 8.3183012902736664e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 2.6437509804964066e-03</internalNodes>\n          <leafValues>\n            -7.6691061258316040e-02 2.3545509576797485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 -3.4368310589343309e-03</internalNodes>\n          <leafValues>\n            3.6057031154632568e-01 -7.3672987520694733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 -5.5921601597219706e-04</internalNodes>\n          <leafValues>\n            -2.5343179702758789e-01 7.8275643289089203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 4.3010139052057639e-05</internalNodes>\n          <leafValues>\n            -1.8223099410533905e-01 9.7539380192756653e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 5.3192679770290852e-03</internalNodes>\n          <leafValues>\n            -7.6901949942111969e-02 2.4221810698509216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 -6.9484501145780087e-03</internalNodes>\n          <leafValues>\n            -5.8275872468948364e-01 3.4601949155330658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 1.2447779998183250e-02</internalNodes>\n          <leafValues>\n            2.3883659392595291e-02 -6.1712497472763062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 1.0083100060001016e-03</internalNodes>\n          <leafValues>\n            -7.5152181088924408e-02 2.4744270741939545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 -2.3544009309262037e-03</internalNodes>\n          <leafValues>\n            3.1459400057792664e-01 -6.5026231110095978e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 4.5676861191168427e-04</internalNodes>\n          <leafValues>\n            7.9758197069168091e-02 -2.3777219653129578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 6.6723190248012543e-03</internalNodes>\n          <leafValues>\n            3.8779199123382568e-02 -4.6045419573783875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 7.1861818469187710e-06</internalNodes>\n          <leafValues>\n            -1.3110539317131042e-01 1.2532530725002289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 3.0392590910196304e-02</internalNodes>\n          <leafValues>\n            2.9670530930161476e-02 -5.3870928287506104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 1.4835850379313342e-05</internalNodes>\n          <leafValues>\n            -1.5778580307960510e-01 1.0566859692335129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 1.4415860176086426e-02</internalNodes>\n          <leafValues>\n            -7.6271347701549530e-02 3.0597710609436035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 3.2787520904093981e-03</internalNodes>\n          <leafValues>\n            4.4464308768510818e-02 -3.8928028941154480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 1.0770520195364952e-02</internalNodes>\n          <leafValues>\n            -3.9324011653661728e-02 4.1493979096412659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 5.4678268497809768e-04</internalNodes>\n          <leafValues>\n            5.8721691370010376e-02 -2.7546930313110352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 -1.8106499919667840e-03</internalNodes>\n          <leafValues>\n            1.8281750380992889e-01 -9.3675427138805389e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 1.1771249771118164e-01</internalNodes>\n          <leafValues>\n            2.3175759240984917e-02 -7.0696681737899780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 -3.1166549888439476e-04</internalNodes>\n          <leafValues>\n            -2.0585930347442627e-01 7.6573841273784637e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 -9.7939418628811836e-03</internalNodes>\n          <leafValues>\n            4.8732680082321167e-01 -3.4746028482913971e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 1.0002780472859740e-03</internalNodes>\n          <leafValues>\n            -1.1003620177507401e-01 1.5490560233592987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 6.9929230958223343e-03</internalNodes>\n          <leafValues>\n            3.2923609018325806e-02 -5.4326117038726807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 3.4163020551204681e-02</internalNodes>\n          <leafValues>\n            1.8062820658087730e-02 -7.0809149742126465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 -2.0808410644531250e-01</internalNodes>\n          <leafValues>\n            -6.7879611253738403e-01 2.0255820825695992e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 2.4889659835025668e-04</internalNodes>\n          <leafValues>\n            -1.7719520628452301e-01 8.8152356445789337e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 -9.3355607241392136e-03</internalNodes>\n          <leafValues>\n            1.7948059737682343e-01 -9.4474621117115021e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 2.9192469082772732e-04</internalNodes>\n          <leafValues>\n            -1.3786169886589050e-01 1.3819259405136108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 9.1989226639270782e-03</internalNodes>\n          <leafValues>\n            -1.0269109904766083e-01 1.7618100345134735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 6.8165437551215291e-04</internalNodes>\n          <leafValues>\n            7.4821308255195618e-02 -2.3621830344200134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 -1.4507620107906405e-05</internalNodes>\n          <leafValues>\n            9.5861770212650299e-02 -1.7785739898681641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 1.7662490427028388e-04</internalNodes>\n          <leafValues>\n            -1.3805359601974487e-01 1.3394320011138916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 -1.7513500060886145e-03</internalNodes>\n          <leafValues>\n            7.7623583376407623e-02 -2.3174029588699341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 5.1342020742595196e-03</internalNodes>\n          <leafValues>\n            3.0363969504833221e-02 -5.2420848608016968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 9.4114318490028381e-03</internalNodes>\n          <leafValues>\n            -5.8994568884372711e-02 3.0291381478309631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 -1.0448819957673550e-03</internalNodes>\n          <leafValues>\n            -1.7124690115451813e-01 1.0156030207872391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 -6.3579198904335499e-03</internalNodes>\n          <leafValues>\n            3.1986710429191589e-01 -5.0694450736045837e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 827 -6.3502117991447449e-03</internalNodes>\n          <leafValues>\n            -5.2413272857666016e-01 3.1800068914890289e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 1.2251759879291058e-02</internalNodes>\n          <leafValues>\n            1.6559680923819542e-02 -7.9422187805175781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 -1.4000720344483852e-02</internalNodes>\n          <leafValues>\n            -5.4444402456283569e-01 2.4652559310197830e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 1.9229920580983162e-03</internalNodes>\n          <leafValues>\n            -7.6944977045059204e-02 2.1888209879398346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 -3.4030789975076914e-03</internalNodes>\n          <leafValues>\n            3.0143401026725769e-01 -5.8023329824209213e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 -2.7728609740734100e-02</internalNodes>\n          <leafValues>\n            -5.6704998016357422e-01 3.0071720480918884e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 1.4990579802542925e-04</internalNodes>\n          <leafValues>\n            9.1404616832733154e-02 -1.6989429295063019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 -1.4532960449287202e-05</internalNodes>\n          <leafValues>\n            1.0442660003900528e-01 -1.3983349502086639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 2.8315950185060501e-02</internalNodes>\n          <leafValues>\n            1.7812129110097885e-02 -8.1201279163360596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 -1.7363600200042129e-03</internalNodes>\n          <leafValues>\n            1.9688630104064941e-01 -7.6398819684982300e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -2.2081490606069565e-02</internalNodes>\n          <leafValues>\n            4.4497510790824890e-01 -3.3445868641138077e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 838 1.2189210392534733e-03</internalNodes>\n          <leafValues>\n            4.9154780805110931e-02 -3.7790310382843018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 -5.4838892538100481e-04</internalNodes>\n          <leafValues>\n            -2.2823029756546021e-01 8.0446496605873108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 -9.3702552840113640e-04</internalNodes>\n          <leafValues>\n            2.5258961319923401e-01 -6.5389201045036316e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 1.2496720068156719e-02</internalNodes>\n          <leafValues>\n            3.8215879350900650e-02 -4.0465530753135681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 -1.6764370724558830e-02</internalNodes>\n          <leafValues>\n            -1.4508719742298126e-01 1.2119810283184052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 5.6504327803850174e-03</internalNodes>\n          <leafValues>\n            -8.7139137089252472e-02 2.2194419801235199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 5.2610319107770920e-04</internalNodes>\n          <leafValues>\n            8.7222076952457428e-02 -2.0502470433712006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 1.5574200078845024e-03</internalNodes>\n          <leafValues>\n            -1.7036689817905426e-01 9.4435282051563263e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 2.5609090924263000e-01</internalNodes>\n          <leafValues>\n            1.7790110781788826e-02 -7.4050921201705933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 3.3561999443918467e-03</internalNodes>\n          <leafValues>\n            -4.2667269706726074e-02 3.7573391199111938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 4.7072928398847580e-02</internalNodes>\n          <leafValues>\n            3.2015219330787659e-02 -6.4522278308868408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 -2.2168930154293776e-03</internalNodes>\n          <leafValues>\n            2.0757040381431580e-01 -7.7372692525386810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 5.0796428695321083e-03</internalNodes>\n          <leafValues>\n            4.1829328984022141e-02 -3.7722969055175781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 7.0120906457304955e-05</internalNodes>\n          <leafValues>\n            8.1031888723373413e-02 -1.8506260216236115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 -5.2204862004145980e-04</internalNodes>\n          <leafValues>\n            1.2528459727764130e-01 -1.3090319931507111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 -6.1609707772731781e-03</internalNodes>\n          <leafValues>\n            3.1177788972854614e-01 -5.1252178847789764e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 -2.8424879908561707e-01</internalNodes>\n          <leafValues>\n            -7.0340508222579956e-01 2.2811079397797585e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 -4.1746720671653748e-02</internalNodes>\n          <leafValues>\n            -7.8914260864257812e-01 1.6686350107192993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 -1.0051350109279156e-03</internalNodes>\n          <leafValues>\n            -2.2181299328804016e-01 6.1887398362159729e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 -1.3900640187785029e-03</internalNodes>\n          <leafValues>\n            1.8797479569911957e-01 -7.6582401990890503e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 -4.0118378819897771e-04</internalNodes>\n          <leafValues>\n            -1.7291170358657837e-01 8.6806759238243103e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 -2.9202610676293261e-05</internalNodes>\n          <leafValues>\n            9.2319779098033905e-02 -1.7136460542678833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 -2.6532830670475960e-03</internalNodes>\n          <leafValues>\n            3.9422848820686340e-01 -3.9826449006795883e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 -7.8933471813797951e-03</internalNodes>\n          <leafValues>\n            -4.3326890468597412e-01 3.6603361368179321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 8.7933447211980820e-03</internalNodes>\n          <leafValues>\n            -3.3205948770046234e-02 4.8740789294242859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 1.2014759704470634e-02</internalNodes>\n          <leafValues>\n            2.2244220599532127e-02 -8.1597268581390381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 2.1147020161151886e-03</internalNodes>\n          <leafValues>\n            6.4942933619022369e-02 -2.0959229767322540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 -9.9916034378111362e-04</internalNodes>\n          <leafValues>\n            1.5402349829673767e-01 -1.0149469971656799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 -7.6499581336975098e-04</internalNodes>\n          <leafValues>\n            2.0236450433731079e-01 -7.1199662983417511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 -4.2193511035293341e-04</internalNodes>\n          <leafValues>\n            1.1521430313587189e-01 -1.2845459580421448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 -4.1548791341483593e-04</internalNodes>\n          <leafValues>\n            -2.1168529987335205e-01 7.0376142859458923e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 1.5300279483199120e-03</internalNodes>\n          <leafValues>\n            6.1263758689165115e-02 -2.2269320487976074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 -2.6573969516903162e-03</internalNodes>\n          <leafValues>\n            3.8462328910827637e-01 -3.8276020437479019e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 -2.1988600492477417e-01</internalNodes>\n          <leafValues>\n            -5.1546782255172729e-01 2.8099389746785164e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 -8.7377207819372416e-04</internalNodes>\n          <leafValues>\n            1.0149329900741577e-01 -1.3990689814090729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 7.5169820338487625e-03</internalNodes>\n          <leafValues>\n            -6.1671640723943710e-02 2.5486430525779724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 -1.3438290625344962e-04</internalNodes>\n          <leafValues>\n            -1.6618040204048157e-01 8.8938876986503601e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>117</maxWeakCount>\n      <stageThreshold>-1.5079799890518188e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 875 3.5007519181817770e-03</internalNodes>\n          <leafValues>\n            -2.8256690502166748e-01 3.3628109097480774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 4.1042729280889034e-03</internalNodes>\n          <leafValues>\n            -1.5877629816532135e-01 3.4091961383819580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 9.8724407143890858e-04</internalNodes>\n          <leafValues>\n            -4.6094760298728943e-01 1.1771719902753830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 -4.0168981067836285e-03</internalNodes>\n          <leafValues>\n            1.3994920253753662e-01 -3.8476601243019104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 -4.2784500867128372e-02</internalNodes>\n          <leafValues>\n            3.1519949436187744e-01 -1.1673810333013535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 -5.6273501832038164e-04</internalNodes>\n          <leafValues>\n            8.2315109670162201e-02 -3.3594700694084167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 -4.3416650441940874e-05</internalNodes>\n          <leafValues>\n            1.0691779851913452e-01 -2.5068029761314392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 1.5347570180892944e-02</internalNodes>\n          <leafValues>\n            9.7383828833699226e-03 -6.4612430334091187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 1.8295480404049158e-03</internalNodes>\n          <leafValues>\n            8.9164443314075470e-02 -2.9637640714645386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 3.2098879455588758e-04</internalNodes>\n          <leafValues>\n            -2.3136790096759796e-01 1.1478479951620102e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 1.0728760389611125e-03</internalNodes>\n          <leafValues>\n            -1.2982189655303955e-01 1.9653689861297607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 -4.9566011875867844e-03</internalNodes>\n          <leafValues>\n            3.5313999652862549e-01 -7.6989777386188507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 -1.6319400165230036e-03</internalNodes>\n          <leafValues>\n            -2.3701989650726318e-01 1.0319659858942032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 1.9862050190567970e-02</internalNodes>\n          <leafValues>\n            5.9187598526477814e-02 -4.0955111384391785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 -9.5205483958125114e-03</internalNodes>\n          <leafValues>\n            3.9061769843101501e-01 -5.7647578418254852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 -1.0885810479521751e-03</internalNodes>\n          <leafValues>\n            -5.2902680635452271e-01 4.4961001724004745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 3.5348529927432537e-03</internalNodes>\n          <leafValues>\n            -9.2707537114620209e-02 2.4449980258941650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 5.7174800895154476e-03</internalNodes>\n          <leafValues>\n            5.7306189090013504e-02 -3.9878991246223450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 -1.4010589802637696e-03</internalNodes>\n          <leafValues>\n            1.0757780075073242e-01 -1.9520820677280426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 -2.2306239698082209e-03</internalNodes>\n          <leafValues>\n            -6.1328327655792236e-01 2.7875339612364769e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 -5.0583072006702423e-03</internalNodes>\n          <leafValues>\n            -5.4739731550216675e-01 3.0482530593872070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 1.3725720345973969e-01</internalNodes>\n          <leafValues>\n            2.8162300586700439e-02 -6.0817748308181763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 3.7828299682587385e-03</internalNodes>\n          <leafValues>\n            -1.2640979886054993e-01 1.3382309675216675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 -1.0629029944539070e-02</internalNodes>\n          <leafValues>\n            -1.7343379557132721e-01 9.9954582750797272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 5.6623672135174274e-03</internalNodes>\n          <leafValues>\n            -5.2419230341911316e-02 3.2940819859504700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 -4.5901038683950901e-03</internalNodes>\n          <leafValues>\n            1.8784660100936890e-01 -9.2681042850017548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 7.1088741533458233e-03</internalNodes>\n          <leafValues>\n            3.2605409622192383e-02 -5.7968139648437500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 -1.9310249481350183e-03</internalNodes>\n          <leafValues>\n            -2.8707239031791687e-01 5.8658700436353683e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 3.5559700336307287e-03</internalNodes>\n          <leafValues>\n            -6.2841393053531647e-02 3.0232760310173035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 2.1007249597460032e-04</internalNodes>\n          <leafValues>\n            -1.2029449641704559e-01 2.0722889900207520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 3.0181880574673414e-03</internalNodes>\n          <leafValues>\n            4.2764421552419662e-02 -4.5567208528518677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 -2.0919379312545061e-03</internalNodes>\n          <leafValues>\n            -5.8067041635513306e-01 2.4772390723228455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 4.9380292184650898e-03</internalNodes>\n          <leafValues>\n            -6.7825779318809509e-02 2.6715460419654846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 1.0227119782939553e-03</internalNodes>\n          <leafValues>\n            -1.1050579696893692e-01 1.7136010527610779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 -9.1216713190078735e-02</internalNodes>\n          <leafValues>\n            -5.5617409944534302e-01 3.1176509335637093e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 1.9377609714865685e-03</internalNodes>\n          <leafValues>\n            5.2470069378614426e-02 -3.3402100205421448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 -4.5235231518745422e-03</internalNodes>\n          <leafValues>\n            -3.8628038763999939e-01 4.4883530586957932e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 1.1070469627156854e-03</internalNodes>\n          <leafValues>\n            -9.4648011028766632e-02 1.7694370448589325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 -1.4522889629006386e-02</internalNodes>\n          <leafValues>\n            -4.4854640960693359e-01 4.0654070675373077e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 2.0895639434456825e-02</internalNodes>\n          <leafValues>\n            3.5988390445709229e-02 -4.4317048788070679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 915 7.3273790803796146e-06</internalNodes>\n          <leafValues>\n            -1.9736979901790619e-01 8.8131763041019440e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 -1.4750339687452652e-05</internalNodes>\n          <leafValues>\n            8.8203012943267822e-02 -1.9387699663639069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 1.0160019621253014e-02</internalNodes>\n          <leafValues>\n            -7.3683522641658783e-02 2.7725589275360107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 1.4658429790870287e-05</internalNodes>\n          <leafValues>\n            -1.3514040410518646e-01 1.1165390163660049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 2.9789519030600786e-03</internalNodes>\n          <leafValues>\n            -5.6356389075517654e-02 2.9033899307250977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 6.7907930351793766e-03</internalNodes>\n          <leafValues>\n            -5.5468060076236725e-02 2.9650750756263733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 3.5746619105339050e-02</internalNodes>\n          <leafValues>\n            4.4232271611690521e-02 -3.7943100929260254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 -8.6023868061602116e-04</internalNodes>\n          <leafValues>\n            -2.5524240732192993e-01 6.3983328640460968e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 -3.2749359961599112e-03</internalNodes>\n          <leafValues>\n            5.1642370223999023e-01 -3.0802410095930099e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 -1.4287419617176056e-04</internalNodes>\n          <leafValues>\n            -1.7014829814434052e-01 9.0200550854206085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -5.9252060949802399e-02</internalNodes>\n          <leafValues>\n            4.4787400960922241e-01 -3.4802999347448349e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 4.9169741570949554e-02</internalNodes>\n          <leafValues>\n            4.3797228485345840e-02 -3.9337700605392456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 2.4047859478741884e-03</internalNodes>\n          <leafValues>\n            -8.5982158780097961e-02 1.7597770690917969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 -8.8569998741149902e-02</internalNodes>\n          <leafValues>\n            -2.9694429039955139e-01 5.6752521544694901e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 3.5266599152237177e-03</internalNodes>\n          <leafValues>\n            -5.4160539060831070e-02 3.2359990477561951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 -1.4674359590571839e-05</internalNodes>\n          <leafValues>\n            1.0095299780368805e-01 -1.7195940017700195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 -1.0672880336642265e-02</internalNodes>\n          <leafValues>\n            -3.9103358983993530e-01 3.9687499403953552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 -1.3177569955587387e-02</internalNodes>\n          <leafValues>\n            2.7460250258445740e-01 -5.5524408817291260e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 -2.0427990239113569e-03</internalNodes>\n          <leafValues>\n            -3.2616940140724182e-01 5.1151938736438751e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 2.5430709123611450e-02</internalNodes>\n          <leafValues>\n            3.4412149339914322e-02 -3.9120680093765259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 6.6575622186064720e-03</internalNodes>\n          <leafValues>\n            -6.2124639749526978e-02 2.5493910908699036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 -2.4922629818320274e-02</internalNodes>\n          <leafValues>\n            -7.5617647171020508e-01 2.0520050078630447e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 6.4869478344917297e-02</internalNodes>\n          <leafValues>\n            1.3535760343074799e-02 -8.5182607173919678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 -1.9129139836877584e-03</internalNodes>\n          <leafValues>\n            -2.0609579980373383e-01 6.8809613585472107e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 -2.7280850335955620e-03</internalNodes>\n          <leafValues>\n            1.3853220641613007e-01 -1.1308959871530533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 3.9647668600082397e-03</internalNodes>\n          <leafValues>\n            -8.5980050265789032e-02 1.8867929279804230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 8.6866566562093794e-05</internalNodes>\n          <leafValues>\n            -1.3409359753131866e-01 1.1543890088796616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 -1.0680439881980419e-03</internalNodes>\n          <leafValues>\n            2.4043959379196167e-01 -5.9584230184555054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 6.4973197877407074e-03</internalNodes>\n          <leafValues>\n            3.5721741616725922e-02 -4.3827891349792480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 3.3825050923041999e-04</internalNodes>\n          <leafValues>\n            7.5188770890235901e-02 -1.9240869581699371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 2.4638089817017317e-03</internalNodes>\n          <leafValues>\n            -3.8108248263597488e-02 4.1398531198501587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 7.1629788726568222e-04</internalNodes>\n          <leafValues>\n            6.7675560712814331e-02 -2.3129940032958984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 -1.1354340240359306e-03</internalNodes>\n          <leafValues>\n            1.6413919627666473e-01 -9.8224140703678131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 -4.6024488983675838e-04</internalNodes>\n          <leafValues>\n            7.8879103064537048e-02 -1.8191289901733398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 -8.1474315375089645e-03</internalNodes>\n          <leafValues>\n            -1.8627829849720001e-01 7.7696673572063446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 -3.3882331103086472e-02</internalNodes>\n          <leafValues>\n            4.1818460822105408e-01 -4.0109351277351379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 -4.3395790271461010e-03</internalNodes>\n          <leafValues>\n            1.8961839377880096e-01 -8.3509556949138641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 2.4691419675946236e-03</internalNodes>\n          <leafValues>\n            4.3756991624832153e-02 -3.8284140825271606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 8.7688177824020386e-02</internalNodes>\n          <leafValues>\n            2.3466430604457855e-02 -5.9991317987442017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 7.1277258939517196e-06</internalNodes>\n          <leafValues>\n            -1.4574949443340302e-01 9.4181038439273834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 -2.2863550111651421e-03</internalNodes>\n          <leafValues>\n            2.2176849842071533e-01 -6.2630541622638702e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 -1.4718780221301131e-05</internalNodes>\n          <leafValues>\n            1.1210440099239349e-01 -1.3407769799232483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 2.9124629218131304e-03</internalNodes>\n          <leafValues>\n            -6.1113931238651276e-02 2.6921069622039795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 -7.2532321792095900e-04</internalNodes>\n          <leafValues>\n            -1.8317590653896332e-01 9.0204723179340363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 -1.7109309555962682e-03</internalNodes>\n          <leafValues>\n            -2.9150980710983276e-01 5.6865800172090530e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 3.5050138831138611e-02</internalNodes>\n          <leafValues>\n            2.4259999394416809e-02 -5.9926068782806396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 2.5119259953498840e-02</internalNodes>\n          <leafValues>\n            -4.6499390155076981e-02 3.3078059554100037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 1.3924979604780674e-02</internalNodes>\n          <leafValues>\n            5.4394099861383438e-02 -3.2431459426879883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 1.2507860083132982e-03</internalNodes>\n          <leafValues>\n            -8.6275100708007812e-02 1.6083979606628418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 3.2347340602427721e-03</internalNodes>\n          <leafValues>\n            4.0214668959379196e-02 -3.3414369821548462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 2.3993090726435184e-03</internalNodes>\n          <leafValues>\n            -3.6099448800086975e-02 4.0332961082458496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 -6.4468860626220703e-02</internalNodes>\n          <leafValues>\n            -9.2355471849441528e-01 1.7104439437389374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 2.6983879506587982e-02</internalNodes>\n          <leafValues>\n            -4.1323971003293991e-02 3.8095420598983765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 -1.4244250451156404e-05</internalNodes>\n          <leafValues>\n            9.8453678190708160e-02 -1.3854749500751495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 3.6304299719631672e-03</internalNodes>\n          <leafValues>\n            2.2532820701599121e-02 -5.7740187644958496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 -2.7509450446814299e-03</internalNodes>\n          <leafValues>\n            2.8656649589538574e-01 -4.9012679606676102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 3.4084690269082785e-03</internalNodes>\n          <leafValues>\n            3.8566160947084427e-02 -3.5187271237373352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 -2.0442469976842403e-03</internalNodes>\n          <leafValues>\n            1.5499830245971680e-01 -8.1280998885631561e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 973 -3.3763761166483164e-04</internalNodes>\n          <leafValues>\n            -1.8969820439815521e-01 7.3497541248798370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 -1.9649739842861891e-03</internalNodes>\n          <leafValues>\n            2.4030299484729767e-01 -5.3698450326919556e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 2.6115038781426847e-04</internalNodes>\n          <leafValues>\n            -1.0585899651050568e-01 1.4551800489425659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 -2.4496200494468212e-03</internalNodes>\n          <leafValues>\n            -3.3511948585510254e-01 4.3949641287326813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 977 2.5791170075535774e-02</internalNodes>\n          <leafValues>\n            1.9443970173597336e-02 -6.3135677576065063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 -1.7996380338445306e-03</internalNodes>\n          <leafValues>\n            1.5620160102844238e-01 -8.9669622480869293e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 -5.5190739221870899e-03</internalNodes>\n          <leafValues>\n            3.8429600000381470e-01 -3.9308220148086548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 9.3076081248000264e-04</internalNodes>\n          <leafValues>\n            5.3146060556173325e-02 -2.7482900023460388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 2.7754770126193762e-03</internalNodes>\n          <leafValues>\n            -5.3488280624151230e-02 2.4878840148448944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 1.9387940410524607e-03</internalNodes>\n          <leafValues>\n            7.5177863240242004e-02 -1.9432419538497925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 -4.0069930255413055e-03</internalNodes>\n          <leafValues>\n            -2.7330648899078369e-01 6.2000360339879990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 7.4540930800139904e-03</internalNodes>\n          <leafValues>\n            -5.0977949053049088e-02 2.7055469155311584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 -1.6338729765266180e-03</internalNodes>\n          <leafValues>\n            1.0920850187540054e-01 -1.4821110665798187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 -1.1626870185136795e-01</internalNodes>\n          <leafValues>\n            -9.4307368993759155e-01 1.4511439949274063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 -1.2051310390233994e-02</internalNodes>\n          <leafValues>\n            -3.0964991450309753e-01 3.7726309150457382e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 1.5592000447213650e-02</internalNodes>\n          <leafValues>\n            -3.8526348769664764e-02 3.6706140637397766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 -1.1198739521205425e-03</internalNodes>\n          <leafValues>\n            -1.4644260704517365e-01 9.6057042479515076e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 990 -1.4623399692936800e-05</internalNodes>\n          <leafValues>\n            1.0641819983720779e-01 -1.3394460082054138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 991 -1.0319639742374420e-01</internalNodes>\n          <leafValues>\n            -7.0196557044982910e-01 1.8891770392656326e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>121</maxWeakCount>\n      <stageThreshold>-1.4499469995498657e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 992 -3.7469431757926941e-02</internalNodes>\n          <leafValues>\n            2.9079249501228333e-01 -3.5205191373825073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 993 4.0861819870769978e-03</internalNodes>\n          <leafValues>\n            -2.9098600149154663e-01 1.8445029854774475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 994 -9.2446897178888321e-04</internalNodes>\n          <leafValues>\n            1.1087530106306076e-01 -4.1064518690109253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 995 8.5803697584196925e-04</internalNodes>\n          <leafValues>\n            -2.2129820287227631e-01 1.5465059876441956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 996 2.3659599537495524e-04</internalNodes>\n          <leafValues>\n            -3.2185178995132446e-01 1.1183690279722214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 997 -3.5021029412746429e-02</internalNodes>\n          <leafValues>\n            2.2721460461616516e-01 -1.4156529307365417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 998 -3.4688229206949472e-03</internalNodes>\n          <leafValues>\n            -4.0247380733489990e-01 4.3791528791189194e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 999 5.0372090190649033e-03</internalNodes>\n          <leafValues>\n            -1.2387280166149139e-01 2.2701320052146912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1000 -1.1929610045626760e-03</internalNodes>\n          <leafValues>\n            -4.8692488670349121e-01 5.2568510174751282e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1001 9.5561221241950989e-03</internalNodes>\n          <leafValues>\n            -4.6204000711441040e-02 5.1149028539657593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1002 1.1109219631180167e-03</internalNodes>\n          <leafValues>\n            4.5496881008148193e-02 -4.5278310775756836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1003 5.7835641200654209e-05</internalNodes>\n          <leafValues>\n            -1.5641710162162781e-01 1.3276909291744232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1004 -9.4595848349854350e-04</internalNodes>\n          <leafValues>\n            -2.8471308946609497e-01 6.4549557864665985e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1005 8.8587577920407057e-04</internalNodes>\n          <leafValues>\n            6.5990276634693146e-02 -3.2505878806114197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1006 2.1180589683353901e-03</internalNodes>\n          <leafValues>\n            -7.1820907294750214e-02 3.3132740855216980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1007 -1.6004469245672226e-02</internalNodes>\n          <leafValues>\n            -4.9266660213470459e-01 3.5758759826421738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1008 1.4956319937482476e-03</internalNodes>\n          <leafValues>\n            -8.3095543086528778e-02 2.7613210678100586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1009 7.5204619206488132e-03</internalNodes>\n          <leafValues>\n            2.6987679302692413e-02 -6.5507948398590088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1010 -1.4567610378435347e-05</internalNodes>\n          <leafValues>\n            1.1181929707527161e-01 -1.8279710412025452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1011 1.5564640052616596e-03</internalNodes>\n          <leafValues>\n            -1.5681059658527374e-01 1.1271400004625320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1012 -3.6522798240184784e-02</internalNodes>\n          <leafValues>\n            -1.4254869520664215e-01 1.3022269308567047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1013 9.4677843153476715e-03</internalNodes>\n          <leafValues>\n            -4.3431900441646576e-02 3.6521318554878235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1014 -1.4508370441035368e-05</internalNodes>\n          <leafValues>\n            8.4056511521339417e-02 -2.0373860001564026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1015 9.7979931160807610e-04</internalNodes>\n          <leafValues>\n            -9.2570282518863678e-02 1.9765810668468475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1016 1.4909260244166944e-05</internalNodes>\n          <leafValues>\n            -1.4167930185794830e-01 1.2542089819908142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1017 -2.1510709484573454e-04</internalNodes>\n          <leafValues>\n            2.0154480636119843e-01 -8.0978751182556152e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1018 -1.3552160235121846e-03</internalNodes>\n          <leafValues>\n            -3.9648211002349854e-01 4.5137099921703339e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1019 8.4163509309291840e-03</internalNodes>\n          <leafValues>\n            -7.5962640345096588e-02 2.2327689826488495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1020 -3.0116800917312503e-04</internalNodes>\n          <leafValues>\n            -1.9837650656700134e-01 8.5917882621288300e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1021 9.7665376961231232e-04</internalNodes>\n          <leafValues>\n            6.1060719192028046e-02 -3.1315010786056519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1022 1.9718110561370850e-03</internalNodes>\n          <leafValues>\n            -5.4124880582094193e-02 3.2931008934974670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1023 6.4220376312732697e-02</internalNodes>\n          <leafValues>\n            3.1034920364618301e-02 -5.8339309692382812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1024 -4.8852190375328064e-03</internalNodes>\n          <leafValues>\n            1.8666909635066986e-01 -8.5492432117462158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1025 -2.5309080956503749e-04</internalNodes>\n          <leafValues>\n            -1.6574999690055847e-01 9.2472381889820099e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1026 2.9818940674886107e-05</internalNodes>\n          <leafValues>\n            -1.4195050299167633e-01 1.0154379904270172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1027 -1.0288760066032410e-02</internalNodes>\n          <leafValues>\n            2.5133699178695679e-01 -5.9286661446094513e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1028 -2.9165179512347095e-05</internalNodes>\n          <leafValues>\n            1.2957669794559479e-01 -1.1733850091695786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1029 -2.0741471089422703e-03</internalNodes>\n          <leafValues>\n            -2.2633939981460571e-01 6.6792942583560944e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1030 1.1343799997121096e-03</internalNodes>\n          <leafValues>\n            -6.3913702964782715e-02 2.7956250309944153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1031 -1.5007710317149758e-05</internalNodes>\n          <leafValues>\n            1.3454750180244446e-01 -1.1705060303211212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1032 4.9826782196760178e-03</internalNodes>\n          <leafValues>\n            2.6505010202527046e-02 -6.0010671615600586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1033 -3.4576859325170517e-03</internalNodes>\n          <leafValues>\n            3.1286209821701050e-01 -5.4155170917510986e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1034 5.4344828240573406e-03</internalNodes>\n          <leafValues>\n            2.8702750802040100e-02 -5.6824082136154175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1035 -1.4558049770130310e-05</internalNodes>\n          <leafValues>\n            1.0756780207157135e-01 -1.3127699494361877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1036 1.5321969985961914e-03</internalNodes>\n          <leafValues>\n            -1.1911620199680328e-01 1.4021439850330353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1037 -2.2449430078268051e-02</internalNodes>\n          <leafValues>\n            -3.3376368880271912e-01 4.9373220652341843e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1038 1.1923030018806458e-02</internalNodes>\n          <leafValues>\n            6.3558742403984070e-02 -2.4746930599212646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1039 2.0685950294137001e-02</internalNodes>\n          <leafValues>\n            -6.1905119568109512e-02 2.6367300748825073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1040 5.0756777636706829e-04</internalNodes>\n          <leafValues>\n            -1.2528319656848907e-01 1.4505800604820251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1041 9.2508539091795683e-04</internalNodes>\n          <leafValues>\n            5.9009589254856110e-02 -2.6204380393028259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1042 8.6694798665121198e-04</internalNodes>\n          <leafValues>\n            -8.8942721486091614e-02 1.7795750498771667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1043 4.7340960009023547e-04</internalNodes>\n          <leafValues>\n            6.8137630820274353e-02 -2.1880300343036652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1044 9.0366601943969727e-02</internalNodes>\n          <leafValues>\n            1.8516469746828079e-02 -6.5736871957778931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1045 2.0585930906236172e-03</internalNodes>\n          <leafValues>\n            -4.5568998903036118e-02 3.2879421114921570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1046 -4.0761628188192844e-03</internalNodes>\n          <leafValues>\n            -3.5896709561347961e-01 4.0903490036725998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1047 3.2309619709849358e-03</internalNodes>\n          <leafValues>\n            -5.8772470802068710e-02 2.5518509745597839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1048 2.0424150861799717e-03</internalNodes>\n          <leafValues>\n            4.3209441006183624e-02 -3.3393308520317078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1049 -2.8341729193925858e-04</internalNodes>\n          <leafValues>\n            -1.6685059666633606e-01 8.1555336713790894e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1050 -1.0859699686989188e-03</internalNodes>\n          <leafValues>\n            1.7807449400424957e-01 -9.2171236872673035e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1051 -2.0089520141482353e-02</internalNodes>\n          <leafValues>\n            -3.5236391425132751e-01 4.4607751071453094e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1052 -1.8073120154440403e-03</internalNodes>\n          <leafValues>\n            3.0220940709114075e-01 -5.2047580480575562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1053 1.0337149724364281e-02</internalNodes>\n          <leafValues>\n            2.4787139147520065e-02 -6.8838161230087280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1054 -2.4023749865591526e-03</internalNodes>\n          <leafValues>\n            3.3173340559005737e-01 -4.6199489384889603e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1055 -5.8347097365185618e-04</internalNodes>\n          <leafValues>\n            -1.8856820464134216e-01 7.7347792685031891e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1056 -2.1759211085736752e-03</internalNodes>\n          <leafValues>\n            3.3067348599433899e-01 -4.0855869650840759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1057 -1.1984390439465642e-03</internalNodes>\n          <leafValues>\n            -2.1580339968204498e-01 6.8534582853317261e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1058 1.4474330237135291e-03</internalNodes>\n          <leafValues>\n            -5.8074928820133209e-02 2.3362369835376740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1059 5.1625841297209263e-04</internalNodes>\n          <leafValues>\n            7.5655579566955566e-02 -2.0956470072269440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1060 -1.4388939598575234e-03</internalNodes>\n          <leafValues>\n            -3.0948141217231750e-01 5.8159999549388885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1061 -1.7495449865236878e-03</internalNodes>\n          <leafValues>\n            1.0236290097236633e-01 -1.5715239942073822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1062 1.6774939373135567e-02</internalNodes>\n          <leafValues>\n            2.3711699992418289e-02 -5.8594572544097900e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1063 -8.3265192806720734e-03</internalNodes>\n          <leafValues>\n            3.0943349003791809e-01 -4.8807561397552490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1064 -4.4853150029666722e-05</internalNodes>\n          <leafValues>\n            1.0615509748458862e-01 -1.3089710474014282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1065 5.9908269904553890e-03</internalNodes>\n          <leafValues>\n            8.0168873071670532e-02 -1.6817809641361237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1066 1.4110070187598467e-03</internalNodes>\n          <leafValues>\n            -6.9941587746143341e-02 2.2045080363750458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1067 4.1205998510122299e-02</internalNodes>\n          <leafValues>\n            3.1721431761980057e-02 -4.4176858663558960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1068 1.5044870087876916e-04</internalNodes>\n          <leafValues>\n            -1.2152300029993057e-01 1.1241420358419418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1069 -4.8399530351161957e-03</internalNodes>\n          <leafValues>\n            2.8244999051094055e-01 -5.1606610417366028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1070 -1.0831269901245832e-03</internalNodes>\n          <leafValues>\n            -1.6978019475936890e-01 8.3731047809123993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1071 -1.3483200222253799e-02</internalNodes>\n          <leafValues>\n            2.8269320726394653e-01 -5.2228599786758423e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1072 5.9854640858247876e-04</internalNodes>\n          <leafValues>\n            -1.3749149441719055e-01 1.2280890345573425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1073 -6.4943352481350303e-04</internalNodes>\n          <leafValues>\n            -1.6931599378585815e-01 8.8171690702438354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1074 -6.3191158697009087e-03</internalNodes>\n          <leafValues>\n            1.6245460510253906e-01 -8.6300060153007507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1075 -2.5179239455610514e-03</internalNodes>\n          <leafValues>\n            -3.1853398680686951e-01 5.2688188850879669e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1076 -4.6924971044063568e-02</internalNodes>\n          <leafValues>\n            -6.5773141384124756e-01 2.0505079999566078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1077 -9.6446421230211854e-04</internalNodes>\n          <leafValues>\n            -2.7256599068641663e-01 4.5441299676895142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1078 1.5073099639266729e-03</internalNodes>\n          <leafValues>\n            -5.0479460507631302e-02 2.8486481308937073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1079 1.6149930655956268e-02</internalNodes>\n          <leafValues>\n            3.8769058883190155e-02 -3.6149570345878601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1080 1.9126510247588158e-02</internalNodes>\n          <leafValues>\n            -3.6233641207218170e-02 4.7573548555374146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1081 -1.2546279467642307e-03</internalNodes>\n          <leafValues>\n            1.1009909957647324e-01 -1.5554140508174896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1082 -1.4754529729543719e-05</internalNodes>\n          <leafValues>\n            9.6549153327941895e-02 -1.3947430253028870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1083 1.5680169686675072e-02</internalNodes>\n          <leafValues>\n            2.3214520886540413e-02 -5.7713180780410767e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1084 1.2293360196053982e-02</internalNodes>\n          <leafValues>\n            -5.7809889316558838e-02 2.3951390385627747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1085 -9.6596255898475647e-03</internalNodes>\n          <leafValues>\n            2.4098740518093109e-01 -6.5823532640933990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1086 4.4940081425011158e-03</internalNodes>\n          <leafValues>\n            5.4532490670681000e-02 -3.1474688649177551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1087 1.1480580084025860e-02</internalNodes>\n          <leafValues>\n            1.7419299110770226e-02 -7.4722832441329956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1088 -6.5499639511108398e-01</internalNodes>\n          <leafValues>\n            -4.5483970642089844e-01 2.6187120005488396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1089 -1.5746919962111861e-04</internalNodes>\n          <leafValues>\n            8.4341458976268768e-02 -1.8240310251712799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1090 -1.0111900046467781e-03</internalNodes>\n          <leafValues>\n            -2.0862899720668793e-01 6.7676216363906860e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1091 1.8488839268684387e-02</internalNodes>\n          <leafValues>\n            -3.5499621182680130e-02 4.1342151165008545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1092 -3.8888910785317421e-04</internalNodes>\n          <leafValues>\n            1.5692460536956787e-01 -8.6299479007720947e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1093 -4.5315301977097988e-03</internalNodes>\n          <leafValues>\n            -4.3912211060523987e-01 3.4103620797395706e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1094 3.3536020666360855e-02</internalNodes>\n          <leafValues>\n            -3.2231528311967850e-02 4.7096571326255798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1095 2.0854349713772535e-03</internalNodes>\n          <leafValues>\n            -7.6001010835170746e-02 1.7373880743980408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1096 -1.4060589819564484e-05</internalNodes>\n          <leafValues>\n            8.5960999131202698e-02 -1.6348780691623688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1097 4.2995680123567581e-02</internalNodes>\n          <leafValues>\n            2.2033119574189186e-02 -5.9274291992187500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1098 2.4928380735218525e-03</internalNodes>\n          <leafValues>\n            -6.3020773231983185e-02 2.1398860216140747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1099 1.4520809600071516e-05</internalNodes>\n          <leafValues>\n            -1.1218129843473434e-01 1.1997319757938385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1100 2.1152360364794731e-02</internalNodes>\n          <leafValues>\n            3.0270710587501526e-02 -4.4600808620452881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1101 2.1028789342381060e-04</internalNodes>\n          <leafValues>\n            8.0384418368339539e-02 -1.7209020256996155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1102 1.0620340472087264e-03</internalNodes>\n          <leafValues>\n            -6.4051970839500427e-02 2.1304920315742493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1103 -2.5768030900508165e-03</internalNodes>\n          <leafValues>\n            -5.2309602499008179e-01 2.6146469637751579e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1104 4.7555579803884029e-03</internalNodes>\n          <leafValues>\n            3.6213729530572891e-02 -3.4408730268478394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1105 -5.9062540531158447e-01</internalNodes>\n          <leafValues>\n            -9.1701269149780273e-01 1.3416379690170288e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1106 -9.7031831741333008e-02</internalNodes>\n          <leafValues>\n            4.8288398981094360e-01 -3.2344181090593338e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1107 1.4890159945935011e-03</internalNodes>\n          <leafValues>\n            4.0591750293970108e-02 -3.8898488879203796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1108 2.4702500086277723e-03</internalNodes>\n          <leafValues>\n            -6.3159219920635223e-02 2.1322609484195709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1109 -2.9705299530178308e-03</internalNodes>\n          <leafValues>\n            1.4960889518260956e-01 -1.0181649774312973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1110 1.5555499494075775e-01</internalNodes>\n          <leafValues>\n            3.6674879491329193e-02 -3.5983988642692566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1111 1.4113659970462322e-02</internalNodes>\n          <leafValues>\n            1.3834640383720398e-02 -8.7112957239151001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1112 -9.5594127196818590e-04</internalNodes>\n          <leafValues>\n            -2.2359329462051392e-01 5.5646751075983047e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>137</maxWeakCount>\n      <stageThreshold>-1.4971179962158203e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1113 2.3068320006132126e-02</internalNodes>\n          <leafValues>\n            -3.0734539031982422e-01 2.5758111476898193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1114 -1.1603030376136303e-02</internalNodes>\n          <leafValues>\n            1.7347939312458038e-01 -2.9917559027671814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1115 -1.0232869535684586e-03</internalNodes>\n          <leafValues>\n            1.9289019703865051e-01 -2.4926829338073730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1116 1.2194960378110409e-02</internalNodes>\n          <leafValues>\n            8.7591417133808136e-02 -4.0853890776634216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1117 -1.2484550243243575e-03</internalNodes>\n          <leafValues>\n            1.6345569491386414e-01 -1.8811899423599243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1118 3.2145460136234760e-04</internalNodes>\n          <leafValues>\n            7.9135909676551819e-02 -3.7722501158714294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1119 -7.9707789700478315e-04</internalNodes>\n          <leafValues>\n            -2.6377388834953308e-01 9.6936263144016266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1120 7.0924922823905945e-02</internalNodes>\n          <leafValues>\n            -1.2538060545921326e-01 2.5267291069030762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1121 2.5408361107110977e-03</internalNodes>\n          <leafValues>\n            -1.3923250138759613e-01 1.4974319934844971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1122 -6.9253891706466675e-04</internalNodes>\n          <leafValues>\n            -3.1363919377326965e-01 3.9419740438461304e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1123 2.5845640338957310e-03</internalNodes>\n          <leafValues>\n            -7.0067122578620911e-02 2.8096580505371094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1124 -1.6803950071334839e-02</internalNodes>\n          <leafValues>\n            -4.6254080533981323e-01 3.6509469151496887e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1125 -2.1332600153982639e-03</internalNodes>\n          <leafValues>\n            2.2691309452056885e-01 -8.4447480738162994e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1126 -5.5397138930857182e-04</internalNodes>\n          <leafValues>\n            -2.0728160440921783e-01 1.0041700303554535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1127 -1.4573110092896968e-05</internalNodes>\n          <leafValues>\n            8.8534340262413025e-02 -2.0813420414924622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1128 8.0281507689505816e-04</internalNodes>\n          <leafValues>\n            -8.8521443307399750e-02 1.9553969800472260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1129 3.6762449890375137e-03</internalNodes>\n          <leafValues>\n            -8.3966277539730072e-02 2.4232700467109680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1130 -1.6549570136703551e-04</internalNodes>\n          <leafValues>\n            -1.9402000308036804e-01 1.0044509917497635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1131 5.5225789546966553e-03</internalNodes>\n          <leafValues>\n            4.6014141291379929e-02 -4.1095688939094543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1132 1.1023939587175846e-03</internalNodes>\n          <leafValues>\n            -2.1053719520568848e-01 8.4169827401638031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1133 -2.1610360592603683e-02</internalNodes>\n          <leafValues>\n            -3.4724879264831543e-01 5.1196940243244171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1134 -1.4869699953123927e-05</internalNodes>\n          <leafValues>\n            1.1187150329351425e-01 -1.6249230504035950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1135 3.1727060675621033e-02</internalNodes>\n          <leafValues>\n            3.7546031177043915e-02 -4.5357111096382141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1136 -6.5588178113102913e-03</internalNodes>\n          <leafValues>\n            2.9756790399551392e-01 -6.1539310961961746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1137 3.7398359272629023e-03</internalNodes>\n          <leafValues>\n            -6.9362841546535492e-02 2.2881920635700226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1138 -2.1445790771394968e-03</internalNodes>\n          <leafValues>\n            -3.0691981315612793e-01 5.7085540145635605e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1139 1.4241340104490519e-03</internalNodes>\n          <leafValues>\n            4.7747720032930374e-02 -3.5141488909721375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1140 1.8902820302173495e-03</internalNodes>\n          <leafValues>\n            1.1250650137662888e-01 -1.5074999630451202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1141 -6.4917900599539280e-03</internalNodes>\n          <leafValues>\n            2.8712779283523560e-01 -6.2573678791522980e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1142 -8.7750004604458809e-03</internalNodes>\n          <leafValues>\n            -5.4141241312026978e-01 2.9559530317783356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1143 9.3647688627243042e-02</internalNodes>\n          <leafValues>\n            -5.6943789124488831e-02 2.9638379812240601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1144 -4.4028809497831389e-05</internalNodes>\n          <leafValues>\n            1.0726290196180344e-01 -1.5169329941272736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1145 7.9690842540003359e-05</internalNodes>\n          <leafValues>\n            8.7704338133335114e-02 -1.8157640099525452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1146 -6.6510448232293129e-03</internalNodes>\n          <leafValues>\n            2.1250769495964050e-01 -7.8765399754047394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1147 2.1358320116996765e-01</internalNodes>\n          <leafValues>\n            3.2704930752515793e-02 -4.9895349144935608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1148 -9.8035410046577454e-02</internalNodes>\n          <leafValues>\n            -6.3620072603225708e-01 2.4300750344991684e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1149 -3.6894609220325947e-03</internalNodes>\n          <leafValues>\n            -5.7873171567916870e-01 2.5343220680952072e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1150 4.7867568209767342e-03</internalNodes>\n          <leafValues>\n            -6.9719798862934113e-02 2.4641029536724091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1151 4.0250780875794590e-04</internalNodes>\n          <leafValues>\n            -1.1852599680423737e-01 1.7163689434528351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1152 -3.8258030544966459e-03</internalNodes>\n          <leafValues>\n            -3.1708711385726929e-01 5.2796650677919388e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1153 2.9255099434521981e-05</internalNodes>\n          <leafValues>\n            -1.2157870084047318e-01 1.2443509697914124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1154 -5.5969221284613013e-04</internalNodes>\n          <leafValues>\n            -2.3942449688911438e-01 6.1564020812511444e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1155 1.6149280127137899e-03</internalNodes>\n          <leafValues>\n            -8.9536681771278381e-02 1.9396179914474487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1156 -5.9165759012103081e-03</internalNodes>\n          <leafValues>\n            -6.0741347074508667e-01 2.4107500910758972e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1157 4.5592039823532104e-03</internalNodes>\n          <leafValues>\n            -5.4090119898319244e-02 2.8721129894256592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1158 -5.1767788827419281e-02</internalNodes>\n          <leafValues>\n            -6.4853471517562866e-01 2.4329099804162979e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1159 -1.0635569691658020e-02</internalNodes>\n          <leafValues>\n            3.2359760999679565e-01 -5.0231788307428360e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1160 2.5121110957115889e-04</internalNodes>\n          <leafValues>\n            9.5274448394775391e-02 -1.4859940111637115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1161 1.3107099803164601e-03</internalNodes>\n          <leafValues>\n            -1.1612690240144730e-01 1.2647250294685364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1162 -7.3629721999168396e-02</internalNodes>\n          <leafValues>\n            -6.2977832555770874e-01 2.4197410792112350e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1163 5.1864539273083210e-04</internalNodes>\n          <leafValues>\n            8.0843970179557800e-02 -1.8038350343704224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1164 -2.0541099365800619e-03</internalNodes>\n          <leafValues>\n            2.0690770447254181e-01 -7.1559637784957886e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1165 -7.2738518938422203e-03</internalNodes>\n          <leafValues>\n            -1.8049220740795135e-01 8.4618158638477325e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1166 -7.0418710820376873e-03</internalNodes>\n          <leafValues>\n            -5.5255848169326782e-01 2.4243000894784927e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1167 2.3678881116211414e-03</internalNodes>\n          <leafValues>\n            -7.4315063655376434e-02 2.2013199329376221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1168 -4.1341409087181091e-03</internalNodes>\n          <leafValues>\n            -3.1461110711097717e-01 5.7645540684461594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1169 5.9597631916403770e-03</internalNodes>\n          <leafValues>\n            2.1551210433244705e-02 -6.6399222612380981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1170 -1.4643320355389733e-05</internalNodes>\n          <leafValues>\n            1.0325399786233902e-01 -1.4378640055656433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1171 -8.0324069131165743e-04</internalNodes>\n          <leafValues>\n            -2.8026849031448364e-01 5.2175540477037430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1172 -1.7860220745205879e-02</internalNodes>\n          <leafValues>\n            3.1547638773918152e-01 -4.7295480966567993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1173 8.5229711839929223e-04</internalNodes>\n          <leafValues>\n            -1.0860790312290192e-01 1.6905729472637177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1174 8.8618341833353043e-03</internalNodes>\n          <leafValues>\n            2.0629420876502991e-02 -7.1686798334121704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1175 4.1418620385229588e-03</internalNodes>\n          <leafValues>\n            3.1313210725784302e-02 -3.9753648638725281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1176 -9.6616581082344055e-02</internalNodes>\n          <leafValues>\n            4.2378899455070496e-01 -3.2291099429130554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1177 -8.4853649139404297e-02</internalNodes>\n          <leafValues>\n            -4.8360210657119751e-01 3.4420508891344070e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1178 -2.7399489656090736e-02</internalNodes>\n          <leafValues>\n            -2.8981518745422363e-01 4.6805508434772491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1179 1.9653420895338058e-03</internalNodes>\n          <leafValues>\n            -7.6221130788326263e-02 1.8894240260124207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1180 -9.0222749859094620e-03</internalNodes>\n          <leafValues>\n            -5.8255058526992798e-01 2.6038780808448792e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1181 1.7859010398387909e-01</internalNodes>\n          <leafValues>\n            1.4113079756498337e-02 -7.5876772403717041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1182 2.6170860510319471e-03</internalNodes>\n          <leafValues>\n            -4.2011409997940063e-02 3.4582638740539551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1183 -1.8247140105813742e-03</internalNodes>\n          <leafValues>\n            -2.5125750899314880e-01 5.4113451391458511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1184 1.0635840008035302e-03</internalNodes>\n          <leafValues>\n            -6.9988057017326355e-02 2.1111090481281281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1185 -8.5794121026992798e-02</internalNodes>\n          <leafValues>\n            -5.2950221300125122e-01 2.4234309792518616e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1186 -2.4844249710440636e-03</internalNodes>\n          <leafValues>\n            2.2798889875411987e-01 -5.7894941419363022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1187 2.4517390411347151e-03</internalNodes>\n          <leafValues>\n            4.7758270055055618e-02 -2.9931840300559998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1188 7.2088139131665230e-03</internalNodes>\n          <leafValues>\n            8.9190460741519928e-02 -1.4663650095462799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1189 -6.0728411190211773e-03</internalNodes>\n          <leafValues>\n            2.9773110151290894e-01 -4.4187791645526886e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1190 2.9379719868302345e-02</internalNodes>\n          <leafValues>\n            1.8384920433163643e-02 -7.2799599170684814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1191 3.5265460610389709e-02</internalNodes>\n          <leafValues>\n            -4.0345128625631332e-02 3.4369349479675293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1192 8.0668088048696518e-04</internalNodes>\n          <leafValues>\n            -1.0171490162611008e-01 1.3324069976806641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1193 -1.4964640140533447e-03</internalNodes>\n          <leafValues>\n            -2.3296439647674561e-01 5.9193279594182968e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1194 2.6136979460716248e-02</internalNodes>\n          <leafValues>\n            1.7993519082665443e-02 -7.3094600439071655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1195 1.8663259223103523e-02</internalNodes>\n          <leafValues>\n            1.4693800359964371e-02 -7.2105181217193604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1196 -5.0944439863087609e-05</internalNodes>\n          <leafValues>\n            9.8113812506198883e-02 -1.3487009704113007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1197 -5.5268028518185019e-04</internalNodes>\n          <leafValues>\n            -1.1313900351524353e-01 1.1931320279836655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1198 5.4916120134294033e-03</internalNodes>\n          <leafValues>\n            -6.8996928632259369e-02 2.2312630712985992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1199 3.1243199482560158e-02</internalNodes>\n          <leafValues>\n            -3.2394438982009888e-02 3.9250150322914124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1200 2.7375440113246441e-03</internalNodes>\n          <leafValues>\n            3.6713510751724243e-02 -4.0632349252700806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1201 9.0960890054702759e-02</internalNodes>\n          <leafValues>\n            2.7709199115633965e-02 -4.1612899303436279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1202 -4.2210621177218854e-04</internalNodes>\n          <leafValues>\n            -1.5993569791316986e-01 7.8440353274345398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1203 -2.3689800873398781e-03</internalNodes>\n          <leafValues>\n            1.4372199773788452e-01 -9.0417243540287018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1204 4.5116269029676914e-03</internalNodes>\n          <leafValues>\n            -6.8068206310272217e-02 2.1011069416999817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1205 -1.4441140228882432e-03</internalNodes>\n          <leafValues>\n            -1.3376539945602417e-01 1.1816109716892242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1206 2.1477979607880116e-03</internalNodes>\n          <leafValues>\n            -9.8067082464694977e-02 1.7571650445461273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1207 2.2534599527716637e-02</internalNodes>\n          <leafValues>\n            5.3246740251779556e-02 -2.8085210919380188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1208 -1.6165290027856827e-02</internalNodes>\n          <leafValues>\n            2.6058629155158997e-01 -5.6349318474531174e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1209 1.3157909736037254e-02</internalNodes>\n          <leafValues>\n            4.4960599392652512e-02 -3.1084328889846802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1210 -2.5218630209565163e-02</internalNodes>\n          <leafValues>\n            -1.2245389819145203e-01 1.1707650125026703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1211 -1.0043029760709032e-04</internalNodes>\n          <leafValues>\n            6.2668606638908386e-02 -2.3665410280227661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1212 2.2884309291839600e-02</internalNodes>\n          <leafValues>\n            -5.6393388658761978e-02 2.6951891183853149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1213 -3.7653960753232241e-03</internalNodes>\n          <leafValues>\n            2.4265049397945404e-01 -6.0327839106321335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1214 -1.2131360126659274e-03</internalNodes>\n          <leafValues>\n            -2.2581340372562408e-01 6.3866272568702698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1215 3.6897920072078705e-03</internalNodes>\n          <leafValues>\n            -7.5056307017803192e-02 1.7121140658855438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1216 3.9484380977228284e-04</internalNodes>\n          <leafValues>\n            7.2925560176372528e-02 -1.8006080389022827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1217 -2.8756330721080303e-03</internalNodes>\n          <leafValues>\n            2.3332679271697998e-01 -5.8312799781560898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1218 -1.2939549982547760e-02</internalNodes>\n          <leafValues>\n            -5.9966820478439331e-01 2.4746209383010864e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1219 4.8920139670372009e-03</internalNodes>\n          <leafValues>\n            -5.0808548927307129e-02 2.7142828702926636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1220 -6.3685458153486252e-03</internalNodes>\n          <leafValues>\n            -1.7759549617767334e-01 7.8720703721046448e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1221 9.1700062155723572e-02</internalNodes>\n          <leafValues>\n            -2.4316219612956047e-02 5.6610620021820068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1222 -2.9075080528855324e-03</internalNodes>\n          <leafValues>\n            -5.3473442792892456e-01 2.6738349348306656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1223 -3.9782752282917500e-03</internalNodes>\n          <leafValues>\n            1.7898949980735779e-01 -7.3634162545204163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1224 3.8189089391380548e-03</internalNodes>\n          <leafValues>\n            9.6640147268772125e-02 -1.2615419924259186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1225 -6.1400169506669044e-03</internalNodes>\n          <leafValues>\n            -2.8025910258293152e-01 4.8952069133520126e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1226 4.6048378571867943e-03</internalNodes>\n          <leafValues>\n            -3.5297919064760208e-02 3.6271721124649048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1227 6.9598153233528137e-02</internalNodes>\n          <leafValues>\n            2.8236450627446175e-02 -4.7523179650306702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1228 8.2954921526834369e-04</internalNodes>\n          <leafValues>\n            6.5010666847229004e-02 -1.9608500599861145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1229 1.0073450393974781e-02</internalNodes>\n          <leafValues>\n            2.4091430008411407e-02 -5.2702528238296509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1230 -4.9964170902967453e-02</internalNodes>\n          <leafValues>\n            2.7060431241989136e-01 -5.2939768880605698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1231 -2.3425720632076263e-02</internalNodes>\n          <leafValues>\n            -6.5538042783737183e-01 2.0399950444698334e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1232 4.5370758743956685e-04</internalNodes>\n          <leafValues>\n            -1.0145729780197144e-01 1.2575489282608032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1233 -9.4329239800572395e-04</internalNodes>\n          <leafValues>\n            -2.3677830398082733e-01 5.2147369831800461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1234 -2.5503130163997412e-03</internalNodes>\n          <leafValues>\n            1.8695800006389618e-01 -6.4383536577224731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1235 -2.1031149663031101e-03</internalNodes>\n          <leafValues>\n            -4.0381109714508057e-01 2.8763780370354652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1236 2.3942890111356974e-03</internalNodes>\n          <leafValues>\n            -5.8961909264326096e-02 2.0151209831237793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1237 3.4859919105656445e-04</internalNodes>\n          <leafValues>\n            -1.1594740301370621e-01 1.1559849977493286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1238 6.5279641421511769e-04</internalNodes>\n          <leafValues>\n            -9.6583247184753418e-02 1.4546130597591400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1239 6.6208152566105127e-04</internalNodes>\n          <leafValues>\n            5.5666640400886536e-02 -2.3408170044422150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1240 -1.1246719956398010e-01</internalNodes>\n          <leafValues>\n            -7.2129100561141968e-01 1.6700809821486473e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1241 2.4760260712355375e-03</internalNodes>\n          <leafValues>\n            -7.0752441883087158e-02 1.6832010447978973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1242 -8.7723489850759506e-03</internalNodes>\n          <leafValues>\n            -4.8666760325431824e-01 2.6006119325757027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1243 2.8840279206633568e-02</internalNodes>\n          <leafValues>\n            3.3308699727058411e-02 -3.4549170732498169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1244 4.7115320921875536e-04</internalNodes>\n          <leafValues>\n            5.8610469102859497e-02 -2.1334120631217957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1245 -7.5157210230827332e-03</internalNodes>\n          <leafValues>\n            3.7866720557212830e-01 -3.6307640373706818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1246 -1.7479779489804059e-04</internalNodes>\n          <leafValues>\n            -1.8687920272350311e-01 7.0380441844463348e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1247 6.9826189428567886e-03</internalNodes>\n          <leafValues>\n            -7.5376212596893311e-02 1.8541449308395386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1248 -2.5053499266505241e-03</internalNodes>\n          <leafValues>\n            -4.7345471382141113e-01 2.6765290647745132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1249 6.5240712137892842e-04</internalNodes>\n          <leafValues>\n            -1.1398679763078690e-01 1.1460109800100327e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>153</maxWeakCount>\n      <stageThreshold>-1.5120370388031006e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1250 2.7968829497694969e-02</internalNodes>\n          <leafValues>\n            -2.4054290354251862e-01 3.3976718783378601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1251 4.7484100796282291e-03</internalNodes>\n          <leafValues>\n            -1.8598410487174988e-01 2.6523759961128235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1252 -9.6774380654096603e-03</internalNodes>\n          <leafValues>\n            1.3574579358100891e-01 -3.1734740734100342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1253 1.0649940231814981e-03</internalNodes>\n          <leafValues>\n            -5.0356131792068481e-01 7.0383183658123016e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1254 3.0151519458740950e-03</internalNodes>\n          <leafValues>\n            -1.7585769295692444e-01 1.6750140488147736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1255 7.6821137918159366e-04</internalNodes>\n          <leafValues>\n            -2.3158560693264008e-01 1.2748460471630096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1256 -5.6622780859470367e-02</internalNodes>\n          <leafValues>\n            3.0103230476379395e-01 -1.1525429785251617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1257 4.7889677807688713e-03</internalNodes>\n          <leafValues>\n            -6.8797349929809570e-02 3.5774651169776917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1258 3.7908130325376987e-03</internalNodes>\n          <leafValues>\n            1.1250580102205276e-01 -2.3389840126037598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1259 -3.6302749067544937e-03</internalNodes>\n          <leafValues>\n            -2.7425950765609741e-01 6.0180071741342545e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1260 1.4986160211265087e-02</internalNodes>\n          <leafValues>\n            5.8370150625705719e-02 -3.5088211297988892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1261 6.1338639352470636e-04</internalNodes>\n          <leafValues>\n            -1.0045500099658966e-01 1.8004140257835388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1262 1.7827099654823542e-03</internalNodes>\n          <leafValues>\n            -5.8504570275545120e-02 2.8165730834007263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1263 1.0279649868607521e-03</internalNodes>\n          <leafValues>\n            4.6049151569604874e-02 -4.1633561253547668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1264 -1.4470520000031684e-05</internalNodes>\n          <leafValues>\n            9.7594477236270905e-02 -1.7005239427089691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1265 7.2919862577691674e-04</internalNodes>\n          <leafValues>\n            -8.9277692139148712e-02 1.9683800637722015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1266 -1.2752750189974904e-03</internalNodes>\n          <leafValues>\n            -2.1324349939823151e-01 7.7781319618225098e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1267 2.7510570362210274e-02</internalNodes>\n          <leafValues>\n            9.8059087991714478e-02 -1.8463979661464691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1268 3.9082998409867287e-03</internalNodes>\n          <leafValues>\n            -9.8240077495574951e-02 1.7902830243110657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1269 2.8285238659009337e-04</internalNodes>\n          <leafValues>\n            6.4882382750511169e-02 -2.5903809070587158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1270 5.8698928914964199e-03</internalNodes>\n          <leafValues>\n            -4.8436500132083893e-02 3.5584059357643127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1271 5.2106438670307398e-04</internalNodes>\n          <leafValues>\n            6.4200893044471741e-02 -2.4268729984760284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1272 -3.8013618905097246e-03</internalNodes>\n          <leafValues>\n            3.1349530816078186e-01 -4.9372490495443344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1273 -3.5830549895763397e-03</internalNodes>\n          <leafValues>\n            -1.9015640020370483e-01 8.5928887128829956e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1274 7.3326388373970985e-03</internalNodes>\n          <leafValues>\n            -8.7244078516960144e-02 1.8596029281616211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1275 6.8118958733975887e-04</internalNodes>\n          <leafValues>\n            9.0353183448314667e-02 -1.7380879819393158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1276 -2.4127468932420015e-03</internalNodes>\n          <leafValues>\n            2.6583871245384216e-01 -6.2018260359764099e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1277 4.4389287941157818e-03</internalNodes>\n          <leafValues>\n            3.8672439754009247e-02 -4.4039198756217957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1278 2.9394390367087908e-05</internalNodes>\n          <leafValues>\n            -1.3116660714149475e-01 1.2389960139989853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1279 5.2613918669521809e-03</internalNodes>\n          <leafValues>\n            -5.4326139390468597e-02 3.1434679031372070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1280 2.3712380789220333e-03</internalNodes>\n          <leafValues>\n            3.5234931856393814e-02 -4.5936021208763123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1281 -2.4774149060249329e-03</internalNodes>\n          <leafValues>\n            -3.2579651474952698e-01 4.1676308959722519e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1282 5.1308068213984370e-04</internalNodes>\n          <leafValues>\n            -9.8032839596271515e-02 1.5209600329399109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1283 -7.6761870877817273e-04</internalNodes>\n          <leafValues>\n            -2.0944289863109589e-01 6.9563657045364380e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1284 4.1551832109689713e-03</internalNodes>\n          <leafValues>\n            -5.9142418205738068e-02 2.4788859486579895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1285 1.4315149746835232e-02</internalNodes>\n          <leafValues>\n            2.4713350459933281e-02 -6.2663692235946655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1286 8.9347898028790951e-04</internalNodes>\n          <leafValues>\n            -1.3387380540370941e-01 1.0626660287380219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1287 -5.8425782481208444e-04</internalNodes>\n          <leafValues>\n            -2.1583810448646545e-01 6.7552872002124786e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1288 8.9712149929255247e-04</internalNodes>\n          <leafValues>\n            -1.5998089313507080e-01 9.6859596669673920e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1289 -4.4576660729944706e-03</internalNodes>\n          <leafValues>\n            -4.6839779615402222e-01 3.4481108188629150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1290 1.6316650435328484e-02</internalNodes>\n          <leafValues>\n            1.6176480799913406e-02 -7.6990699768066406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1291 -1.9581869710236788e-03</internalNodes>\n          <leafValues>\n            2.3423190414905548e-01 -6.3605003058910370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1292 2.9628631472587585e-01</internalNodes>\n          <leafValues>\n            3.8007281720638275e-02 -3.8991358876228333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1293 -9.1676972806453705e-04</internalNodes>\n          <leafValues>\n            1.2086489796638489e-01 -1.0912480205297470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1294 -2.5543299852870405e-04</internalNodes>\n          <leafValues>\n            -1.8755780160427094e-01 7.1104221045970917e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1295 8.2945115864276886e-03</internalNodes>\n          <leafValues>\n            -3.9912570267915726e-02 3.3551681041717529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1296 -5.8387689292430878e-02</internalNodes>\n          <leafValues>\n            -3.3475118875503540e-01 4.1011139750480652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1297 1.0927469702437520e-03</internalNodes>\n          <leafValues>\n            -8.3243489265441895e-02 1.6046769917011261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1298 1.0653319768607616e-03</internalNodes>\n          <leafValues>\n            -1.1920040100812912e-01 1.0561779886484146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1299 -3.5323720425367355e-02</internalNodes>\n          <leafValues>\n            2.8399449586868286e-01 -4.7650910913944244e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1300 6.7976478021591902e-04</internalNodes>\n          <leafValues>\n            5.9223521500825882e-02 -2.2741270065307617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1301 -2.4810519069433212e-02</internalNodes>\n          <leafValues>\n            -6.5788549184799194e-01 1.8828939646482468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1302 4.5880349352955818e-03</internalNodes>\n          <leafValues>\n            -5.0799869000911713e-02 2.6886260509490967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1303 3.9034360088407993e-03</internalNodes>\n          <leafValues>\n            -5.9183020144701004e-02 2.2644530236721039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1304 1.2360659986734390e-01</internalNodes>\n          <leafValues>\n            2.2052299231290817e-02 -6.7844098806381226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1305 -3.7856408744119108e-04</internalNodes>\n          <leafValues>\n            -2.1715499460697174e-01 5.7522300630807877e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1306 2.8562229126691818e-02</internalNodes>\n          <leafValues>\n            -3.4095268696546555e-02 4.2474791407585144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1307 2.2348840720951557e-03</internalNodes>\n          <leafValues>\n            -3.5655528306961060e-02 3.5050040483474731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1308 1.9211059436202049e-02</internalNodes>\n          <leafValues>\n            2.5078350678086281e-02 -5.9314918518066406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1309 1.5611639618873596e-01</internalNodes>\n          <leafValues>\n            2.3612640798091888e-02 -4.8740550875663757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1310 -1.2261980446055532e-03</internalNodes>\n          <leafValues>\n            -3.0421718955039978e-01 3.9526391774415970e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1311 3.6561759188771248e-03</internalNodes>\n          <leafValues>\n            -7.7627539634704590e-02 2.0262609422206879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1312 1.1567790061235428e-03</internalNodes>\n          <leafValues>\n            5.5682398378849030e-02 -2.4368490278720856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1313 6.2764538452029228e-03</internalNodes>\n          <leafValues>\n            -6.4452603459358215e-02 2.1183019876480103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1314 1.2091239914298058e-02</internalNodes>\n          <leafValues>\n            2.0667979493737221e-02 -6.2231677770614624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1315 3.7568950210697949e-04</internalNodes>\n          <leafValues>\n            7.3670476675033569e-02 -1.7809109389781952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1316 3.8157668896019459e-03</internalNodes>\n          <leafValues>\n            3.3845711499452591e-02 -3.6262959241867065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1317 -1.3252210337668657e-03</internalNodes>\n          <leafValues>\n            1.4732490479946136e-01 -8.1727422773838043e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1318 2.1575710270553827e-03</internalNodes>\n          <leafValues>\n            -6.8624198436737061e-02 1.7562319338321686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1319 -6.4548188820481300e-03</internalNodes>\n          <leafValues>\n            -5.8159267902374268e-01 2.3020049557089806e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1320 -8.1042833626270294e-03</internalNodes>\n          <leafValues>\n            -3.5549208521842957e-01 3.5372331738471985e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1321 1.6489460540469736e-04</internalNodes>\n          <leafValues>\n            7.4472688138484955e-02 -1.5718360245227814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1322 -1.9494029693305492e-03</internalNodes>\n          <leafValues>\n            3.5157081484794617e-01 -3.6213818937540054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1323 -1.5267659910023212e-04</internalNodes>\n          <leafValues>\n            -1.4115719497203827e-01 8.4802761673927307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1324 2.3890420794487000e-02</internalNodes>\n          <leafValues>\n            1.9317669793963432e-02 -6.3186031579971313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1325 -4.4950367882847786e-03</internalNodes>\n          <leafValues>\n            2.1254129707813263e-01 -5.9143088757991791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1326 2.8725271113216877e-03</internalNodes>\n          <leafValues>\n            3.2794039696455002e-02 -3.9505231380462646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1327 2.0885460544377565e-03</internalNodes>\n          <leafValues>\n            -8.5443787276744843e-02 1.4347669482231140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1328 -4.4343829154968262e-01</internalNodes>\n          <leafValues>\n            -4.0052318572998047e-01 2.9428049921989441e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1329 2.0199170336127281e-02</internalNodes>\n          <leafValues>\n            4.0000550448894501e-02 -3.1763339042663574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1330 1.4570879749953747e-02</internalNodes>\n          <leafValues>\n            1.3662800192832947e-02 -8.6441951990127563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1331 -3.8080150261521339e-03</internalNodes>\n          <leafValues>\n            4.0930721163749695e-01 -3.3838968724012375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1332 1.0009920224547386e-03</internalNodes>\n          <leafValues>\n            -8.2600250840187073e-02 1.3928790390491486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1333 1.1500980472192168e-03</internalNodes>\n          <leafValues>\n            6.9677546620368958e-02 -1.7433060705661774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1334 3.4720861003734171e-04</internalNodes>\n          <leafValues>\n            6.6659383475780487e-02 -1.7403809726238251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1335 2.7565560303628445e-03</internalNodes>\n          <leafValues>\n            -2.9285680502653122e-02 4.0243569016456604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1336 -2.4124220013618469e-02</internalNodes>\n          <leafValues>\n            -3.2424208521842957e-01 3.7330508232116699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1337 -1.3989120721817017e-01</internalNodes>\n          <leafValues>\n            -6.5967488288879395e-01 1.7929619178175926e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1338 3.0997680500149727e-02</internalNodes>\n          <leafValues>\n            1.4100589789450169e-02 -6.9532638788223267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1339 4.6191760338842869e-04</internalNodes>\n          <leafValues>\n            -6.7944146692752838e-02 1.8066139519214630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1340 3.4264490008354187e-02</internalNodes>\n          <leafValues>\n            2.2298639640212059e-02 -5.8638918399810791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1341 3.9756381884217262e-03</internalNodes>\n          <leafValues>\n            -4.1803721338510513e-02 3.1669101119041443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1342 -3.4192908788099885e-04</internalNodes>\n          <leafValues>\n            -1.5810790657997131e-01 7.7484056353569031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1343 7.1672953665256500e-02</internalNodes>\n          <leafValues>\n            -2.3302769288420677e-02 5.2465027570724487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1344 7.1812322130426764e-04</internalNodes>\n          <leafValues>\n            4.8268780112266541e-02 -2.7771729230880737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1345 -1.8881190335378051e-03</internalNodes>\n          <leafValues>\n            8.3184987306594849e-02 -1.4802010357379913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1346 -1.2498029973357916e-03</internalNodes>\n          <leafValues>\n            2.5329118967056274e-01 -4.9769390374422073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1347 -1.2756100296974182e-01</internalNodes>\n          <leafValues>\n            -6.7970567941665649e-01 2.0871700718998909e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1348 -1.4621549780713394e-05</internalNodes>\n          <leafValues>\n            7.9338513314723969e-02 -1.5043739974498749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1349 3.5788679961115122e-03</internalNodes>\n          <leafValues>\n            -5.5469110608100891e-02 2.4075509607791901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1350 9.4902152195572853e-03</internalNodes>\n          <leafValues>\n            2.8637239709496498e-02 -5.3680288791656494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1351 1.0283050127327442e-02</internalNodes>\n          <leafValues>\n            1.1550529859960079e-02 -7.7501267194747925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1352 -4.2507290840148926e-02</internalNodes>\n          <leafValues>\n            -8.8770490884780884e-01 9.7261751070618629e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1353 3.6155930138193071e-04</internalNodes>\n          <leafValues>\n            6.4407013356685638e-02 -1.7109510302543640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1354 -3.4245628863573074e-02</internalNodes>\n          <leafValues>\n            2.4231609702110291e-01 -4.7188870608806610e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1355 -1.2806710600852966e-01</internalNodes>\n          <leafValues>\n            -5.4869401454925537e-01 2.1854300051927567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1356 5.3918339312076569e-02</internalNodes>\n          <leafValues>\n            -2.5415059179067612e-02 4.8263218998908997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1357 -3.7711810320615768e-02</internalNodes>\n          <leafValues>\n            1.4176939427852631e-01 -8.8871710002422333e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1358 -2.8310909867286682e-01</internalNodes>\n          <leafValues>\n            -6.4925712347030640e-01 2.0563820376992226e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1359 -1.1926019564270973e-02</internalNodes>\n          <leafValues>\n            -2.1756759285926819e-01 5.1851660013198853e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1360 3.7750680348835886e-04</internalNodes>\n          <leafValues>\n            7.2340622544288635e-02 -1.6360169649124146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1361 1.5865910798311234e-02</internalNodes>\n          <leafValues>\n            -7.9940237104892731e-02 1.6453659534454346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1362 7.1175709366798401e-02</internalNodes>\n          <leafValues>\n            3.1589020043611526e-02 -4.1988191008567810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1363 5.8520520105957985e-03</internalNodes>\n          <leafValues>\n            2.3279080167412758e-02 -4.8604270815849304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1364 -1.3924130471423268e-03</internalNodes>\n          <leafValues>\n            1.6908380389213562e-01 -7.3783926665782928e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1365 -1.8412459758110344e-04</internalNodes>\n          <leafValues>\n            1.2232059985399246e-01 -1.0313989967107773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1366 2.2130980505608022e-04</internalNodes>\n          <leafValues>\n            -8.1976376473903656e-02 1.6332870721817017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1367 2.0723740453831851e-04</internalNodes>\n          <leafValues>\n            9.2730201780796051e-02 -1.3733580708503723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1368 -3.8736319402232766e-04</internalNodes>\n          <leafValues>\n            -2.0004619657993317e-01 8.4838382899761200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1369 3.2468559220433235e-03</internalNodes>\n          <leafValues>\n            -5.6439258158206940e-02 2.2364979982376099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1370 9.3086768174543977e-04</internalNodes>\n          <leafValues>\n            3.1926579773426056e-02 -3.9701279997825623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1371 1.0306099429726601e-03</internalNodes>\n          <leafValues>\n            -6.0154888778924942e-02 2.0189760625362396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1372 -7.6027261093258858e-04</internalNodes>\n          <leafValues>\n            1.4901119470596313e-01 -9.9665373563766479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1373 -4.0442569297738373e-04</internalNodes>\n          <leafValues>\n            -1.9113409519195557e-01 7.4125148355960846e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1374 -4.7783120535314083e-03</internalNodes>\n          <leafValues>\n            -3.5730269551277161e-01 3.6531679332256317e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1375 -7.7672587940469384e-04</internalNodes>\n          <leafValues>\n            1.0242869704961777e-01 -1.2974999845027924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1376 -5.7417969219386578e-03</internalNodes>\n          <leafValues>\n            -1.6698950529098511e-01 7.0111282169818878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1377 -1.0879320092499256e-02</internalNodes>\n          <leafValues>\n            4.4120571017265320e-01 -2.9255589470267296e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1378 6.4163492061197758e-04</internalNodes>\n          <leafValues>\n            -1.1195279657840729e-01 1.0681179910898209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1379 1.8341830000281334e-02</internalNodes>\n          <leafValues>\n            1.6387680172920227e-01 -8.0189116299152374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1380 -1.5051739756017923e-03</internalNodes>\n          <leafValues>\n            -2.2313259541988373e-01 6.1541710048913956e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1381 4.4345208443701267e-03</internalNodes>\n          <leafValues>\n            -6.6646136343479156e-02 2.2299060225486755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1382 -1.4749550246051513e-05</internalNodes>\n          <leafValues>\n            1.1597889661788940e-01 -1.0377810150384903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1383 -2.6539659593254328e-03</internalNodes>\n          <leafValues>\n            1.3116030395030975e-01 -8.6488783359527588e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1384 2.7743550017476082e-03</internalNodes>\n          <leafValues>\n            4.1064068675041199e-02 -3.1225061416625977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1385 1.1590829817578197e-03</internalNodes>\n          <leafValues>\n            6.4309477806091309e-02 -1.7413079738616943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1386 9.2315068468451500e-04</internalNodes>\n          <leafValues>\n            -8.2974001765251160e-02 1.4439080655574799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1387 -8.2323597744107246e-03</internalNodes>\n          <leafValues>\n            3.0380389094352722e-01 -4.1229110211133957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1388 3.5314110573381186e-03</internalNodes>\n          <leafValues>\n            3.9511259645223618e-02 -3.3097168803215027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1389 5.7490761391818523e-03</internalNodes>\n          <leafValues>\n            1.9821660593152046e-02 -5.8780592679977417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1390 7.8584970906376839e-03</internalNodes>\n          <leafValues>\n            -4.9952238798141479e-02 2.7249589562416077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1391 -1.4245980310079176e-05</internalNodes>\n          <leafValues>\n            8.8010340929031372e-02 -1.3228349387645721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1392 6.9364177761599422e-04</internalNodes>\n          <leafValues>\n            -6.7391887307167053e-02 1.7463630437850952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1393 -2.9837749898433685e-02</internalNodes>\n          <leafValues>\n            -5.1709812879562378e-01 2.4871410802006721e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1394 7.1383598260581493e-03</internalNodes>\n          <leafValues>\n            6.7430503666400909e-02 -1.9037249684333801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1395 1.7582569271326065e-02</internalNodes>\n          <leafValues>\n            -3.6622371524572372e-02 3.5335469245910645e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1396 -1.2527840444818139e-03</internalNodes>\n          <leafValues>\n            -2.1730649471282959e-01 6.1200018972158432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1397 7.4575009057298303e-04</internalNodes>\n          <leafValues>\n            -6.4467661082744598e-02 1.9775040447711945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1398 -7.2683871258050203e-04</internalNodes>\n          <leafValues>\n            -1.7233370244503021e-01 7.1719951927661896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1399 2.6301289908587933e-03</internalNodes>\n          <leafValues>\n            -3.9274338632822037e-02 3.3066290616989136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1400 -1.4553769688063767e-05</internalNodes>\n          <leafValues>\n            7.9698577523231506e-02 -1.7852419614791870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1401 -4.5518940896727145e-04</internalNodes>\n          <leafValues>\n            -1.6662250459194183e-01 7.5660362839698792e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1402 -4.0261688991449773e-04</internalNodes>\n          <leafValues>\n            -1.4214369654655457e-01 8.1017293035984039e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>161</maxWeakCount>\n      <stageThreshold>-1.4741109609603882e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1403 -8.3439666777849197e-03</internalNodes>\n          <leafValues>\n            3.1942158937454224e-01 -2.6766449213027954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1404 7.8073277836665511e-04</internalNodes>\n          <leafValues>\n            -3.4852638840675354e-01 1.3628880679607391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1405 8.6505862418562174e-04</internalNodes>\n          <leafValues>\n            -2.5323680043220520e-01 1.7417639493942261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1406 -2.0879819930996746e-04</internalNodes>\n          <leafValues>\n            8.8503703474998474e-02 -3.6038509011268616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1407 -7.4667241424322128e-03</internalNodes>\n          <leafValues>\n            1.6120630502700806e-01 -1.7366449534893036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1408 -6.9383758818730712e-04</internalNodes>\n          <leafValues>\n            9.6873007714748383e-02 -2.6793479919433594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1409 -4.7926991101121530e-05</internalNodes>\n          <leafValues>\n            9.1756246984004974e-02 -2.6212221384048462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1410 -1.5861799474805593e-03</internalNodes>\n          <leafValues>\n            -6.1400872468948364e-01 -7.4168378487229347e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1411 4.4573731429409236e-05</internalNodes>\n          <leafValues>\n            -1.4841860532760620e-01 1.3855740427970886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1412 5.0104141701012850e-04</internalNodes>\n          <leafValues>\n            5.9088941663503647e-02 -2.9596069455146790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1413 -4.7243628650903702e-03</internalNodes>\n          <leafValues>\n            1.7092029750347137e-01 -1.0624700039625168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1414 3.9171050302684307e-03</internalNodes>\n          <leafValues>\n            8.8605202734470367e-02 -2.2775200009346008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1415 8.8675727602094412e-04</internalNodes>\n          <leafValues>\n            -1.6839639842510223e-01 1.1958680301904678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1416 -4.2634559795260429e-03</internalNodes>\n          <leafValues>\n            -3.3663240075111389e-01 4.7266270965337753e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1417 6.8006501533091068e-03</internalNodes>\n          <leafValues>\n            -5.9237081557512283e-02 3.1675300002098083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1418 -1.3168989680707455e-02</internalNodes>\n          <leafValues>\n            3.7162569165229797e-01 -4.2714890092611313e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1419 7.3881301796063781e-04</internalNodes>\n          <leafValues>\n            5.9158101677894592e-02 -3.0953711271286011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1420 1.7939460230991244e-03</internalNodes>\n          <leafValues>\n            -8.4615282714366913e-02 2.0452530682086945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1421 1.6819390002638102e-03</internalNodes>\n          <leafValues>\n            -8.6703762412071228e-02 2.0580549538135529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1422 -2.5033599231392145e-03</internalNodes>\n          <leafValues>\n            -4.3473190069198608e-01 3.8707830011844635e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1423 3.3658559550531209e-04</internalNodes>\n          <leafValues>\n            -1.0717310011386871e-01 1.5238380432128906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1424 1.3037879951298237e-02</internalNodes>\n          <leafValues>\n            4.4682659208774567e-02 -4.0395650267601013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1425 1.3743729505222291e-04</internalNodes>\n          <leafValues>\n            -2.1432510018348694e-01 6.8643413484096527e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1426 3.7178888916969299e-01</internalNodes>\n          <leafValues>\n            3.4502930939197540e-02 -4.5998379588127136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1427 -7.1649150922894478e-03</internalNodes>\n          <leafValues>\n            2.6640880107879639e-01 -5.4557949304580688e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1428 -7.1985478280112147e-04</internalNodes>\n          <leafValues>\n            -1.4415690302848816e-01 9.8254486918449402e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1429 1.6854539513587952e-02</internalNodes>\n          <leafValues>\n            2.8428679332137108e-02 -4.5227599143981934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1430 1.3624729588627815e-02</internalNodes>\n          <leafValues>\n            -6.0474298894405365e-02 2.2715990245342255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1431 1.3620140030980110e-02</internalNodes>\n          <leafValues>\n            7.9177603125572205e-02 -1.8104650080204010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1432 -4.4976719655096531e-03</internalNodes>\n          <leafValues>\n            2.1300099790096283e-01 -7.1392573416233063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1433 7.1611418388783932e-04</internalNodes>\n          <leafValues>\n            -9.4237379729747772e-02 1.5830449759960175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1434 7.0651061832904816e-04</internalNodes>\n          <leafValues>\n            4.8840671777725220e-02 -2.9152449965476990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1435 -3.1002271175384521e-01</internalNodes>\n          <leafValues>\n            -3.8511890172958374e-01 3.4369651228189468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1436 4.3721711263060570e-03</internalNodes>\n          <leafValues>\n            -4.6880301088094711e-02 2.9952910542488098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1437 -1.4383009634912014e-02</internalNodes>\n          <leafValues>\n            -4.5463728904724121e-01 3.4184519201517105e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1438 -3.7763800937682390e-03</internalNodes>\n          <leafValues>\n            -5.6709027290344238e-01 2.1684719249606133e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1439 -3.4393940586596727e-03</internalNodes>\n          <leafValues>\n            2.8183689713478088e-01 -5.2640009671449661e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1440 -3.5846829414367676e-03</internalNodes>\n          <leafValues>\n            -2.9227399826049805e-01 5.2231520414352417e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1441 3.6200750619173050e-03</internalNodes>\n          <leafValues>\n            -5.3378768265247345e-02 2.6364138722419739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1442 7.6435408554971218e-03</internalNodes>\n          <leafValues>\n            3.6897629499435425e-02 -3.9242339134216309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1443 3.5417820326983929e-03</internalNodes>\n          <leafValues>\n            3.5689998418092728e-02 -3.5601079463958740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1444 -2.4041049182415009e-03</internalNodes>\n          <leafValues>\n            1.6313059628009796e-01 -8.9239962399005890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1445 6.5479031763970852e-03</internalNodes>\n          <leafValues>\n            3.6708708852529526e-02 -3.4187689423561096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1446 -1.2350000441074371e-02</internalNodes>\n          <leafValues>\n            2.6157799363136292e-01 -5.2475821226835251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1447 1.4726500012329780e-05</internalNodes>\n          <leafValues>\n            -1.7869140207767487e-01 7.7807463705539703e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1448 -2.1563619375228882e-02</internalNodes>\n          <leafValues>\n            -6.3926118612289429e-01 1.9050199538469315e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1449 5.0762481987476349e-03</internalNodes>\n          <leafValues>\n            -5.1665481179952621e-02 2.9126250743865967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1450 -5.9531949460506439e-02</internalNodes>\n          <leafValues>\n            -7.5291550159454346e-01 2.0238230004906654e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1451 -1.6808489337563515e-02</internalNodes>\n          <leafValues>\n            -4.2833268642425537e-01 2.5997729972004890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1452 3.4431689418852329e-03</internalNodes>\n          <leafValues>\n            -5.4912570863962173e-02 2.4233500659465790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1453 -1.0451589478179812e-03</internalNodes>\n          <leafValues>\n            -2.6243540644645691e-01 4.5748569071292877e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1454 -4.8333409358747303e-04</internalNodes>\n          <leafValues>\n            8.9791953563690186e-02 -1.2892110645771027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1455 -4.7575961798429489e-03</internalNodes>\n          <leafValues>\n            -3.1868740916252136e-01 3.6020528525114059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1456 -1.0407149791717529e-01</internalNodes>\n          <leafValues>\n            5.1398742198944092e-01 -2.3598119616508484e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1457 9.6292654052376747e-03</internalNodes>\n          <leafValues>\n            -4.7965578734874725e-02 2.1790429949760437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1458 5.9226430021226406e-03</internalNodes>\n          <leafValues>\n            6.4275130629539490e-02 -1.8210859596729279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1459 1.6943799331784248e-02</internalNodes>\n          <leafValues>\n            -3.7509348243474960e-02 3.1458830833435059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1460 -6.5468349494040012e-03</internalNodes>\n          <leafValues>\n            -1.5812429785728455e-01 9.0520747005939484e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1461 9.4754863530397415e-03</internalNodes>\n          <leafValues>\n            4.8995878547430038e-02 -2.7853849530220032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1462 -4.9254479818046093e-03</internalNodes>\n          <leafValues>\n            3.1902191042900085e-01 -4.5609470456838608e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1463 -9.4199541490525007e-04</internalNodes>\n          <leafValues>\n            -1.6472989320755005e-01 7.3966227471828461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1464 7.0046652108430862e-03</internalNodes>\n          <leafValues>\n            -3.6342341452836990e-02 3.3846628665924072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1465 -9.1483298456296325e-04</internalNodes>\n          <leafValues>\n            1.0460989922285080e-01 -1.1206439882516861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1466 -1.8404760339763016e-04</internalNodes>\n          <leafValues>\n            1.4215709269046783e-01 -8.7627373635768890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1467 -3.1692520133219659e-04</internalNodes>\n          <leafValues>\n            -1.6067850589752197e-01 7.0096842944622040e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1468 2.3108009248971939e-02</internalNodes>\n          <leafValues>\n            -5.3784500807523727e-02 2.0780019462108612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1469 6.3212551176548004e-03</internalNodes>\n          <leafValues>\n            2.9342239722609520e-02 -3.8378500938415527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1470 7.3698158375918865e-03</internalNodes>\n          <leafValues>\n            -4.1625689715147018e-02 2.6526549458503723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1471 3.3730969298630953e-03</internalNodes>\n          <leafValues>\n            3.7753321230411530e-02 -3.0138298869132996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1472 -6.4016957767307758e-03</internalNodes>\n          <leafValues>\n            2.1839860081672668e-01 -5.4551340639591217e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1473 1.3553920201957226e-02</internalNodes>\n          <leafValues>\n            2.8121260926127434e-02 -4.3601170182228088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1474 -6.7636291496455669e-03</internalNodes>\n          <leafValues>\n            -1.6322250664234161e-01 6.7339658737182617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1475 -1.3078070478513837e-03</internalNodes>\n          <leafValues>\n            1.2315399944782257e-01 -1.0096319764852524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1476 -7.6282368972897530e-03</internalNodes>\n          <leafValues>\n            2.5165349245071411e-01 -5.0460711121559143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1477 7.9994397237896919e-03</internalNodes>\n          <leafValues>\n            7.3020651936531067e-02 -1.8877799808979034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1478 -3.1321209389716387e-03</internalNodes>\n          <leafValues>\n            2.7653199434280396e-01 -4.3276838958263397e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1479 -4.0931310504674911e-02</internalNodes>\n          <leafValues>\n            -6.5518248081207275e-01 1.8600920215249062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1480 7.0344978012144566e-03</internalNodes>\n          <leafValues>\n            2.1914770826697350e-02 -4.8595818877220154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1481 -2.5299859698861837e-03</internalNodes>\n          <leafValues>\n            1.4030769467353821e-01 -8.0566473305225372e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1482 3.8867890834808350e-03</internalNodes>\n          <leafValues>\n            -8.9075699448585510e-02 1.6832409799098969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1483 3.8210590719245374e-04</internalNodes>\n          <leafValues>\n            6.5200872719287872e-02 -1.8599529564380646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1484 1.0954789817333221e-01</internalNodes>\n          <leafValues>\n            1.5036020427942276e-02 -8.6908358335494995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1485 -1.4177490083966404e-04</internalNodes>\n          <leafValues>\n            -1.4669269323348999e-01 7.9050153493881226e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1486 2.0990408957004547e-03</internalNodes>\n          <leafValues>\n            -4.6489678323268890e-02 2.3045249283313751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1487 -2.3089480237103999e-04</internalNodes>\n          <leafValues>\n            -1.6784009337425232e-01 6.9773100316524506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1488 -4.3103471398353577e-04</internalNodes>\n          <leafValues>\n            8.1758759915828705e-02 -1.2939240038394928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1489 -2.9572288622148335e-04</internalNodes>\n          <leafValues>\n            -1.9068230688571930e-01 5.8420080691576004e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1490 -4.0046018548309803e-03</internalNodes>\n          <leafValues>\n            1.2948529422283173e-01 -8.1599622964859009e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1491 1.4935520084691234e-05</internalNodes>\n          <leafValues>\n            -1.3364720344543457e-01 9.8664022982120514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1492 5.7824450777843595e-04</internalNodes>\n          <leafValues>\n            5.9095639735460281e-02 -1.8318089842796326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1493 1.3251320458948612e-02</internalNodes>\n          <leafValues>\n            -7.1488671004772186e-02 1.5635989606380463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1494 7.1273561843554489e-06</internalNodes>\n          <leafValues>\n            -1.2283089756965637e-01 9.7752511501312256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1495 1.4193489914759994e-03</internalNodes>\n          <leafValues>\n            -8.1696748733520508e-02 1.3701570034027100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1496 -8.0165416002273560e-03</internalNodes>\n          <leafValues>\n            2.4697229266166687e-01 -5.6527040898799896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1497 -2.3803471121937037e-03</internalNodes>\n          <leafValues>\n            -3.7901589274406433e-01 3.4532550722360611e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1498 -4.8633730039000511e-03</internalNodes>\n          <leafValues>\n            6.5441012382507324e-01 -1.9296199083328247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1499 -1.4388219824468251e-05</internalNodes>\n          <leafValues>\n            7.5101882219314575e-02 -1.4394460618495941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1500 1.4798780284763779e-05</internalNodes>\n          <leafValues>\n            -1.0807389765977859e-01 9.6213810145854950e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1501 2.4176139384508133e-02</internalNodes>\n          <leafValues>\n            2.6983680203557014e-02 -4.0708479285240173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1502 -3.9851912297308445e-03</internalNodes>\n          <leafValues>\n            2.1786700189113617e-01 -5.4170310497283936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1503 -2.5377580896019936e-03</internalNodes>\n          <leafValues>\n            -1.5314599871635437e-01 8.8059239089488983e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1504 2.1663319785147905e-03</internalNodes>\n          <leafValues>\n            1.0252720117568970e-01 -1.2039250135421753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1505 3.5593929351307452e-04</internalNodes>\n          <leafValues>\n            -8.2267768681049347e-02 1.3228890299797058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1506 1.1394560569897294e-03</internalNodes>\n          <leafValues>\n            -8.6393490433692932e-02 1.5693899989128113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1507 5.5563818663358688e-02</internalNodes>\n          <leafValues>\n            1.7108110710978508e-02 -7.0473742485046387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1508 5.5514591932296753e-01</internalNodes>\n          <leafValues>\n            1.3345389626920223e-02 -6.9916892051696777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1509 -4.6235490590333939e-03</internalNodes>\n          <leafValues>\n            -2.3983679711818695e-01 3.9515350013971329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1510 -4.5803869143128395e-03</internalNodes>\n          <leafValues>\n            4.2900869250297546e-01 -2.6430539786815643e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1511 7.0851319469511509e-03</internalNodes>\n          <leafValues>\n            1.1231079697608948e-01 -1.0711509734392166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1512 -4.0524810901843011e-04</internalNodes>\n          <leafValues>\n            -2.5740951299667358e-01 4.6670019626617432e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1513 -4.9121538177132607e-03</internalNodes>\n          <leafValues>\n            2.7129280567169189e-01 -4.3966241180896759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1514 -1.9348099827766418e-02</internalNodes>\n          <leafValues>\n            -4.0643858909606934e-01 2.9176769778132439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1515 -1.3842330081388354e-03</internalNodes>\n          <leafValues>\n            2.3537209630012512e-01 -5.0227548927068710e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1516 6.2752598896622658e-03</internalNodes>\n          <leafValues>\n            2.8113570064306259e-02 -3.9913201332092285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1517 1.4853129869152326e-05</internalNodes>\n          <leafValues>\n            -1.0750629752874374e-01 1.0206390172243118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1518 -1.1780710192397237e-03</internalNodes>\n          <leafValues>\n            1.8112790584564209e-01 -5.8998040854930878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1519 -3.2166391611099243e-02</internalNodes>\n          <leafValues>\n            -9.8135101795196533e-01 1.1817139573395252e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1520 2.8749080374836922e-03</internalNodes>\n          <leafValues>\n            5.0774369388818741e-02 -2.0650039613246918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1521 -3.5098160151392221e-03</internalNodes>\n          <leafValues>\n            1.4354039728641510e-01 -7.8006736934185028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1522 -7.2203627787530422e-03</internalNodes>\n          <leafValues>\n            2.3853950202465057e-01 -4.6176180243492126e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1523 2.0837699994444847e-03</internalNodes>\n          <leafValues>\n            2.2801460698246956e-02 -5.0945621728897095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1524 3.6175400018692017e-02</internalNodes>\n          <leafValues>\n            1.4734740369021893e-02 -6.1349362134933472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1525 7.5545758008956909e-03</internalNodes>\n          <leafValues>\n            1.6166130080819130e-02 -5.8863008022308350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1526 -2.6058950461447239e-03</internalNodes>\n          <leafValues>\n            3.6436009407043457e-01 -3.4624300897121429e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1527 6.4669351559132338e-04</internalNodes>\n          <leafValues>\n            6.3444733619689941e-02 -1.8953520059585571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1528 -3.1747641041874886e-03</internalNodes>\n          <leafValues>\n            4.2877858877182007e-01 -2.6968790218234062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1529 -2.3839730769395828e-02</internalNodes>\n          <leafValues>\n            -3.6871370673179626e-01 3.3688500523567200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1530 1.1973649961873889e-03</internalNodes>\n          <leafValues>\n            -6.2898509204387665e-02 1.9179169833660126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1531 4.4593929487746209e-05</internalNodes>\n          <leafValues>\n            -1.1022660136222839e-01 1.2159959971904755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1532 9.1575905680656433e-03</internalNodes>\n          <leafValues>\n            2.5353889912366867e-02 -4.9928730726242065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1533 2.3933469783514738e-03</internalNodes>\n          <leafValues>\n            4.8282090574502945e-02 -2.2685450315475464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1534 -1.1994830565527081e-03</internalNodes>\n          <leafValues>\n            1.0886570066213608e-01 -1.0669539868831635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1535 2.1603968925774097e-03</internalNodes>\n          <leafValues>\n            -7.6076626777648926e-02 1.6507959365844727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1536 -1.6556339338421822e-02</internalNodes>\n          <leafValues>\n            -5.4167211055755615e-01 2.0711649209260941e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1537 -8.8350269943475723e-03</internalNodes>\n          <leafValues>\n            -3.6710909008979797e-01 2.8870400041341782e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1538 -1.4592399566026870e-05</internalNodes>\n          <leafValues>\n            7.8724071383476257e-02 -1.3622610270977020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1539 -1.4897900400683284e-03</internalNodes>\n          <leafValues>\n            1.1436119675636292e-01 -1.0104899853467941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1540 -3.9764028042554855e-03</internalNodes>\n          <leafValues>\n            -1.0250560194253922e-01 1.0466060042381287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1541 -7.2657042182981968e-03</internalNodes>\n          <leafValues>\n            2.2982269525527954e-01 -4.5155581086874008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1542 8.9115025475621223e-03</internalNodes>\n          <leafValues>\n            2.9681159183382988e-02 -4.4235008955001831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1543 -1.8145949579775333e-03</internalNodes>\n          <leafValues>\n            2.3911419510841370e-01 -4.6856120228767395e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1544 -3.7546321749687195e-02</internalNodes>\n          <leafValues>\n            -1.8569689989089966e-01 6.1533749103546143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1545 -1.0010029654949903e-03</internalNodes>\n          <leafValues>\n            1.4361350238323212e-01 -8.6990483105182648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1546 -3.7357229739427567e-03</internalNodes>\n          <leafValues>\n            2.0245459675788879e-01 -6.1167530715465546e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1547 -1.4672010365757160e-05</internalNodes>\n          <leafValues>\n            8.8180869817733765e-02 -1.3037009537220001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1548 9.4379713118541986e-05</internalNodes>\n          <leafValues>\n            5.5626530200242996e-02 -2.0025369524955750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1549 1.5706509293522686e-04</internalNodes>\n          <leafValues>\n            -9.8335877060890198e-02 1.1518850177526474e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1550 -8.1810058327391744e-04</internalNodes>\n          <leafValues>\n            -2.1701550483703613e-01 5.2880410104990005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1551 -5.1689259707927704e-02</internalNodes>\n          <leafValues>\n            5.7715278863906860e-01 -1.8761100247502327e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1552 -9.0719409286975861e-02</internalNodes>\n          <leafValues>\n            -3.6278849840164185e-01 3.6741130053997040e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1553 -1.0959040373563766e-02</internalNodes>\n          <leafValues>\n            1.6787180304527283e-01 -6.9725647568702698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1554 3.7122920621186495e-03</internalNodes>\n          <leafValues>\n            6.0360308736562729e-02 -2.0567069947719574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1555 -1.9315730780363083e-02</internalNodes>\n          <leafValues>\n            -5.7397401332855225e-01 1.9705319777131081e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1556 -2.7051189914345741e-02</internalNodes>\n          <leafValues>\n            3.4983208775520325e-01 -3.6084290593862534e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1557 2.1742910146713257e-02</internalNodes>\n          <leafValues>\n            2.2767079994082451e-02 -6.5319198369979858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1558 9.9608592689037323e-02</internalNodes>\n          <leafValues>\n            -3.1259559094905853e-02 3.8271111249923706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1559 4.6517839655280113e-03</internalNodes>\n          <leafValues>\n            1.0088030248880386e-01 -1.2396019697189331e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1560 -1.4784580343984999e-05</internalNodes>\n          <leafValues>\n            7.9683482646942139e-02 -1.5573020279407501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1561 -1.6718909610062838e-03</internalNodes>\n          <leafValues>\n            1.7077329754829407e-01 -6.7733809351921082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1562 1.4456630196946207e-05</internalNodes>\n          <leafValues>\n            -1.0106030106544495e-01 1.1116830259561539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1563 -2.7084909379482269e-03</internalNodes>\n          <leafValues>\n            1.1312720179557800e-01 -1.0880629718303680e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>159</maxWeakCount>\n      <stageThreshold>-1.3943890333175659e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1564 -2.2686859592795372e-02</internalNodes>\n          <leafValues>\n            2.7316910028457642e-01 -2.7358779311180115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1565 4.2952829971909523e-04</internalNodes>\n          <leafValues>\n            -2.5107958912849426e-01 1.5740729868412018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1566 2.5115790776908398e-03</internalNodes>\n          <leafValues>\n            -2.2002549469470978e-01 1.5660229325294495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1567 -6.3958892133086920e-04</internalNodes>\n          <leafValues>\n            7.2609938681125641e-02 -3.8278979063034058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1568 2.6575280353426933e-03</internalNodes>\n          <leafValues>\n            -1.1523439735174179e-01 2.3414239287376404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1569 -7.5916409492492676e-02</internalNodes>\n          <leafValues>\n            3.2517579197883606e-01 -8.2622267305850983e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1570 1.4966350136091933e-05</internalNodes>\n          <leafValues>\n            -3.5640290379524231e-01 5.2353590726852417e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1571 -1.4678399566037115e-05</internalNodes>\n          <leafValues>\n            1.0198219865560532e-01 -2.2452689707279205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1572 5.2314779168227687e-05</internalNodes>\n          <leafValues>\n            -1.7757849395275116e-01 1.0107079893350601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1573 1.4088390162214637e-04</internalNodes>\n          <leafValues>\n            -1.5139770507812500e-01 1.3872760534286499e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1574 -2.3411789909005165e-02</internalNodes>\n          <leafValues>\n            -1.6435989737510681e-01 1.0702139884233475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1575 2.3284659255295992e-03</internalNodes>\n          <leafValues>\n            -8.0950729548931122e-02 2.2333970665931702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1576 -3.3611140679568052e-03</internalNodes>\n          <leafValues>\n            -4.4329941272735596e-01 3.4489039331674576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1577 5.8458978310227394e-04</internalNodes>\n          <leafValues>\n            -1.1083470284938812e-01 1.7215029895305634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1578 -3.3180968603119254e-04</internalNodes>\n          <leafValues>\n            6.9152593612670898e-02 -2.6321241259574890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1579 -8.8515877723693848e-04</internalNodes>\n          <leafValues>\n            -3.4764730930328369e-01 4.3258201330900192e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1580 1.4169749920256436e-04</internalNodes>\n          <leafValues>\n            -1.4600689709186554e-01 1.0149820148944855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1581 1.4851680025458336e-03</internalNodes>\n          <leafValues>\n            2.9983170330524445e-02 -4.1786131262779236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1582 -7.5329327955842018e-04</internalNodes>\n          <leafValues>\n            -2.1557639539241791e-01 6.4534209668636322e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1583 1.4260539785027504e-02</internalNodes>\n          <leafValues>\n            -8.0013327300548553e-02 1.9511990249156952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1584 -1.4687920156575274e-05</internalNodes>\n          <leafValues>\n            9.7121663391590118e-02 -1.3502350449562073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1585 -9.8925074562430382e-03</internalNodes>\n          <leafValues>\n            -5.1035261154174805e-01 2.9335800558328629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1586 -1.8316040514037013e-03</internalNodes>\n          <leafValues>\n            3.2676079869270325e-01 -4.5014020055532455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1587 8.6495577124878764e-04</internalNodes>\n          <leafValues>\n            -7.7836513519287109e-02 1.8764939904212952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1588 1.4902660250663757e-01</internalNodes>\n          <leafValues>\n            1.9568990916013718e-02 -6.2450677156448364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1589 -1.7126720398664474e-02</internalNodes>\n          <leafValues>\n            -1.8141449987888336e-01 7.3048681020736694e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1590 -1.7061959952116013e-03</internalNodes>\n          <leafValues>\n            3.1236839294433594e-01 -4.4152028858661652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1591 3.8261809386312962e-03</internalNodes>\n          <leafValues>\n            5.1518529653549194e-02 -2.9330030083656311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1592 3.8093670736998320e-03</internalNodes>\n          <leafValues>\n            -7.6707206666469574e-02 1.7574439942836761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1593 -3.4228331060148776e-04</internalNodes>\n          <leafValues>\n            -2.3458020389080048e-01 6.1726640909910202e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1594 -4.1697870939970016e-02</internalNodes>\n          <leafValues>\n            4.3929129838943481e-01 -3.6892820149660110e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1595 1.9080520723946393e-04</internalNodes>\n          <leafValues>\n            -1.3488939404487610e-01 9.7168661653995514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1596 2.6400710339657962e-04</internalNodes>\n          <leafValues>\n            -1.6539520025253296e-01 7.3270231485366821e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1597 7.9839164391160011e-03</internalNodes>\n          <leafValues>\n            -3.3527340739965439e-02 3.6535859107971191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1598 -1.4267410151660442e-02</internalNodes>\n          <leafValues>\n            4.6739241480827332e-01 -2.7154419571161270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1599 -9.4726070528849959e-05</internalNodes>\n          <leafValues>\n            -1.5017749369144440e-01 8.7657302618026733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1600 -2.9629279742948711e-04</internalNodes>\n          <leafValues>\n            -1.6194540262222290e-01 7.3863230645656586e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1601 2.3301010951399803e-03</internalNodes>\n          <leafValues>\n            -7.9925157129764557e-02 1.5778550505638123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1602 3.6623800406232476e-04</internalNodes>\n          <leafValues>\n            -8.7019346654415131e-02 2.0495669543743134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1603 -4.4499669224023819e-02</internalNodes>\n          <leafValues>\n            -2.9891410470008850e-01 4.5648001134395599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1604 -6.0768700204789639e-03</internalNodes>\n          <leafValues>\n            2.3746150732040405e-01 -5.3580708801746368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1605 6.6064862767234445e-04</internalNodes>\n          <leafValues>\n            5.9221439063549042e-02 -2.3569910228252411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1606 7.4699260294437408e-03</internalNodes>\n          <leafValues>\n            5.1304049789905548e-02 -2.3386649787425995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1607 -6.7128022201359272e-03</internalNodes>\n          <leafValues>\n            2.7061641216278076e-01 -5.0031121820211411e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1608 4.6589970588684082e-03</internalNodes>\n          <leafValues>\n            4.4932201504707336e-02 -3.0730488896369934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1609 4.9815201200544834e-03</internalNodes>\n          <leafValues>\n            -4.8255410045385361e-02 2.6853010058403015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1610 9.9244136363267899e-03</internalNodes>\n          <leafValues>\n            1.9446769729256630e-02 -7.0352387428283691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1611 6.1988402158021927e-03</internalNodes>\n          <leafValues>\n            -3.5107269883155823e-02 3.5460400581359863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1612 8.8433362543582916e-03</internalNodes>\n          <leafValues>\n            4.5328389853239059e-02 -2.7485930919647217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1613 1.1110560037195683e-02</internalNodes>\n          <leafValues>\n            2.2391419857740402e-02 -5.0172042846679688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1614 -6.9408811395987868e-04</internalNodes>\n          <leafValues>\n            1.7079490423202515e-01 -6.3849426805973053e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1615 8.0377031117677689e-03</internalNodes>\n          <leafValues>\n            8.8937461376190186e-02 -1.6416129469871521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1616 1.4750069567526225e-05</internalNodes>\n          <leafValues>\n            -1.3713030517101288e-01 9.6981123089790344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1617 1.2381490087136626e-03</internalNodes>\n          <leafValues>\n            -6.9491222500801086e-02 1.6551379859447479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1618 2.6584148872643709e-04</internalNodes>\n          <leafValues>\n            -9.6803613007068634e-02 1.2020370364189148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1619 -5.4076651576906443e-04</internalNodes>\n          <leafValues>\n            -2.3185379803180695e-01 4.8987850546836853e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1620 -5.1092808134853840e-03</internalNodes>\n          <leafValues>\n            3.0391758680343628e-01 -4.0800470858812332e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1621 1.5575919533148408e-03</internalNodes>\n          <leafValues>\n            -1.0150980204343796e-01 1.4465929567813873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1622 2.8396019712090492e-02</internalNodes>\n          <leafValues>\n            1.5098540484905243e-01 -8.8314309716224670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1623 1.5096530551090837e-03</internalNodes>\n          <leafValues>\n            5.1589738577604294e-02 -2.6199528574943542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1624 1.4308419777080417e-03</internalNodes>\n          <leafValues>\n            -4.5497849583625793e-02 2.7584540843963623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1625 1.3030369579792023e-01</internalNodes>\n          <leafValues>\n            2.0329989492893219e-02 -5.7491821050643921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1626 -3.3548770006746054e-03</internalNodes>\n          <leafValues>\n            1.2289950251579285e-01 -8.9937411248683929e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1627 2.7094839140772820e-02</internalNodes>\n          <leafValues>\n            1.4342390000820160e-02 -7.8952521085739136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1628 -3.6210110783576965e-01</internalNodes>\n          <leafValues>\n            -6.2560427188873291e-01 1.4021329581737518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1629 -6.6879601217806339e-04</internalNodes>\n          <leafValues>\n            2.1966129541397095e-01 -5.2415199577808380e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1630 -3.7389241158962250e-02</internalNodes>\n          <leafValues>\n            -4.7313681244850159e-01 2.5704499334096909e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1631 -7.4386061169207096e-03</internalNodes>\n          <leafValues>\n            -5.2914857864379883e-01 2.0038880407810211e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1632 1.0443119704723358e-01</internalNodes>\n          <leafValues>\n            -2.2909460589289665e-02 5.1592028141021729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1633 -6.1161867051851004e-05</internalNodes>\n          <leafValues>\n            7.7016606926918030e-02 -1.4625400304794312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1634 6.5830379026010633e-04</internalNodes>\n          <leafValues>\n            7.0015281438827515e-02 -1.5569929778575897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1635 9.7367232665419579e-03</internalNodes>\n          <leafValues>\n            -3.1582240015268326e-02 3.2754561305046082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1636 -2.9574360232800245e-03</internalNodes>\n          <leafValues>\n            -3.4247711300849915e-01 3.2184720039367676e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1637 1.6319820424541831e-03</internalNodes>\n          <leafValues>\n            -4.9400478601455688e-02 2.2656440734863281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1638 1.3844939880073071e-02</internalNodes>\n          <leafValues>\n            2.0476659759879112e-02 -5.4600667953491211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1639 3.1580299139022827e-02</internalNodes>\n          <leafValues>\n            -4.2422048747539520e-02 2.9091480374336243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1640 8.6624026298522949e-03</internalNodes>\n          <leafValues>\n            5.4432898759841919e-02 -2.1892189979553223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1641 -4.6714721247553825e-04</internalNodes>\n          <leafValues>\n            -1.8205730617046356e-01 7.1491912007331848e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1642 4.1834521107375622e-03</internalNodes>\n          <leafValues>\n            -6.7491203546524048e-02 1.7285770177841187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1643 -5.3335628472268581e-03</internalNodes>\n          <leafValues>\n            -8.4681749343872070e-01 1.3804829679429531e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1644 7.8782793134450912e-03</internalNodes>\n          <leafValues>\n            -4.8166718333959579e-02 2.4242730438709259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1645 3.8775329012423754e-03</internalNodes>\n          <leafValues>\n            2.4311149492859840e-02 -4.9763259291648865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1646 -1.6564880206715316e-04</internalNodes>\n          <leafValues>\n            5.5546380579471588e-02 -1.9554230570793152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1647 1.8993400037288666e-02</internalNodes>\n          <leafValues>\n            -3.6479089409112930e-02 2.8472718596458435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1648 -3.4308759495615959e-03</internalNodes>\n          <leafValues>\n            -3.2813000679016113e-01 3.6524198949337006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1649 1.4614370229537599e-05</internalNodes>\n          <leafValues>\n            -1.0106439888477325e-01 1.0622490197420120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1650 1.5978919342160225e-02</internalNodes>\n          <leafValues>\n            3.0059399083256721e-02 -3.9310181140899658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1651 -2.2245719446800649e-04</internalNodes>\n          <leafValues>\n            1.8586489558219910e-01 -7.2151653468608856e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1652 2.0615909248590469e-02</internalNodes>\n          <leafValues>\n            1.5250990167260170e-02 -7.8391200304031372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1653 2.8645060956478119e-04</internalNodes>\n          <leafValues>\n            6.8745598196983337e-02 -1.5308310091495514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1654 -5.9233439969830215e-05</internalNodes>\n          <leafValues>\n            -1.2545019388198853e-01 9.8448492586612701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1655 -7.6257862383499742e-04</internalNodes>\n          <leafValues>\n            2.1546240150928497e-01 -5.3760219365358353e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1656 -1.4181639999151230e-03</internalNodes>\n          <leafValues>\n            -1.9876889884471893e-01 5.1982138305902481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1657 -4.4716868549585342e-02</internalNodes>\n          <leafValues>\n            -7.5508397817611694e-01 1.2906449846923351e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1658 -1.3735699467360973e-03</internalNodes>\n          <leafValues>\n            2.2003139555454254e-01 -5.1394689828157425e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1659 -1.5352779999375343e-02</internalNodes>\n          <leafValues>\n            -2.1422849595546722e-01 5.3781170397996902e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1660 1.3817439787089825e-02</internalNodes>\n          <leafValues>\n            -3.5158120095729828e-02 2.9399091005325317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1661 8.7981626391410828e-02</internalNodes>\n          <leafValues>\n            1.6688749194145203e-02 -7.2053599357604980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1662 4.0486121177673340e-01</internalNodes>\n          <leafValues>\n            9.4695771113038063e-03 -8.2725608348846436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1663 1.9231239566579461e-03</internalNodes>\n          <leafValues>\n            -5.8016318827867508e-02 1.7696020007133484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1664 -4.0756969247013330e-04</internalNodes>\n          <leafValues>\n            8.7600946426391602e-02 -1.2633720040321350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1665 -2.3862780071794987e-03</internalNodes>\n          <leafValues>\n            -4.0085569024085999e-01 2.7183029800653458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1666 5.6235089898109436e-02</internalNodes>\n          <leafValues>\n            -1.7541319131851196e-02 7.3818737268447876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1667 4.9810402560979128e-04</internalNodes>\n          <leafValues>\n            -7.6487071812152863e-02 1.2697990238666534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1668 5.3285917965695262e-04</internalNodes>\n          <leafValues>\n            5.9596300125122070e-02 -1.7600339651107788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1669 5.9949647402390838e-04</internalNodes>\n          <leafValues>\n            -8.2509063184261322e-02 1.3002809882164001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1670 -2.0725550712086260e-04</internalNodes>\n          <leafValues>\n            9.3374222517013550e-02 -1.1726769804954529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1671 8.1314949784427881e-04</internalNodes>\n          <leafValues>\n            -8.0063126981258392e-02 1.4701730012893677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1672 -3.4973450237885118e-04</internalNodes>\n          <leafValues>\n            1.1057929694652557e-01 -1.0881700366735458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1673 -2.1448899805545807e-01</internalNodes>\n          <leafValues>\n            -3.1701159477233887e-01 4.1711531579494476e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1674 5.9010740369558334e-04</internalNodes>\n          <leafValues>\n            4.6280328184366226e-02 -2.3512250185012817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1675 -1.2093999981880188e-01</internalNodes>\n          <leafValues>\n            -6.8957090377807617e-01 1.4982040040194988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1676 1.0181350260972977e-01</internalNodes>\n          <leafValues>\n            1.1298139579594135e-02 -7.1199649572372437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1677 3.5208329558372498e-01</internalNodes>\n          <leafValues>\n            1.2944510206580162e-02 -6.7572408914566040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1678 -1.4602140254282858e-05</internalNodes>\n          <leafValues>\n            6.9550313055515289e-02 -1.4288060367107391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1679 -2.3212860524654388e-01</internalNodes>\n          <leafValues>\n            -7.5287401676177979e-01 1.1394330300390720e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1680 -1.4764709630981088e-03</internalNodes>\n          <leafValues>\n            1.3547790050506592e-01 -8.5470907390117645e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1681 9.9324379116296768e-03</internalNodes>\n          <leafValues>\n            -4.8758801072835922e-02 2.4582690000534058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1682 -2.6857290416955948e-02</internalNodes>\n          <leafValues>\n            -4.3975710868835449e-01 2.5082239881157875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1683 -7.3618912138044834e-03</internalNodes>\n          <leafValues>\n            1.2384700030088425e-01 -9.7226209938526154e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1684 -1.9785730168223381e-02</internalNodes>\n          <leafValues>\n            -5.0932317972183228e-01 2.3481979966163635e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1685 -1.4635100342275109e-05</internalNodes>\n          <leafValues>\n            9.4043917953968048e-02 -1.2145669758319855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1686 -5.4067030549049377e-02</internalNodes>\n          <leafValues>\n            -5.4586207866668701e-01 1.9500140100717545e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1687 1.1532169766724110e-02</internalNodes>\n          <leafValues>\n            -7.6409153640270233e-02 1.3763970136642456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1688 -4.4358540326356888e-03</internalNodes>\n          <leafValues>\n            1.2359759956598282e-01 -9.1719299554824829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1689 8.3216017810627818e-04</internalNodes>\n          <leafValues>\n            6.3659071922302246e-02 -2.0440760254859924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1690 -1.2503969669342041e-01</internalNodes>\n          <leafValues>\n            -4.1524758934974670e-01 2.7199100703001022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1691 4.9618318676948547e-02</internalNodes>\n          <leafValues>\n            1.5955109149217606e-02 -6.1666852235794067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1692 -3.0613599810749292e-03</internalNodes>\n          <leafValues>\n            3.6662209033966064e-01 -3.3449448645114899e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1693 3.5273379180580378e-03</internalNodes>\n          <leafValues>\n            3.1757980585098267e-02 -3.8478809595108032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1694 -6.6726570948958397e-03</internalNodes>\n          <leafValues>\n            3.2095840573310852e-01 -3.4408681094646454e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1695 -2.5795500259846449e-03</internalNodes>\n          <leafValues>\n            -3.7870529294013977e-01 2.8562130406498909e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1696 7.8417789191007614e-03</internalNodes>\n          <leafValues>\n            -2.0479770377278328e-02 5.1704108715057373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1697 3.1101319473236799e-04</internalNodes>\n          <leafValues>\n            -1.0809139907360077e-01 9.7204521298408508e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1698 2.6113479398190975e-03</internalNodes>\n          <leafValues>\n            -8.1770427525043488e-02 1.4691209793090820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1699 7.3472261428833008e-03</internalNodes>\n          <leafValues>\n            2.5131259113550186e-02 -4.3025061488151550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1700 1.3528259296435863e-04</internalNodes>\n          <leafValues>\n            -1.4751060307025909e-01 6.7584678530693054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1701 -5.1026898290729150e-05</internalNodes>\n          <leafValues>\n            -1.2161359935998917e-01 8.4333047270774841e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1702 1.1552199721336365e-03</internalNodes>\n          <leafValues>\n            -5.4663829505443573e-02 1.9773660600185394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1703 -8.2931712269783020e-02</internalNodes>\n          <leafValues>\n            -5.1923328638076782e-01 2.0582359284162521e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1704 -4.6260739327408373e-04</internalNodes>\n          <leafValues>\n            8.5588268935680389e-02 -1.1725299805402756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1705 6.7906372714787722e-04</internalNodes>\n          <leafValues>\n            4.5980118215084076e-02 -2.2628420591354370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1706 1.4090019976720214e-03</internalNodes>\n          <leafValues>\n            -4.7628920525312424e-02 2.2722719609737396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1707 2.8954911231994629e-01</internalNodes>\n          <leafValues>\n            1.6701240092515945e-02 -6.3967019319534302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1708 1.9376130774617195e-02</internalNodes>\n          <leafValues>\n            -2.2569410502910614e-02 5.0590497255325317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1709 4.2641081381589174e-04</internalNodes>\n          <leafValues>\n            6.6041722893714905e-02 -1.6666300594806671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1710 1.7502580303698778e-03</internalNodes>\n          <leafValues>\n            -5.8077909052371979e-02 1.9512599706649780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1711 -3.2605750020593405e-03</internalNodes>\n          <leafValues>\n            -2.9101881384849548e-01 3.8328718394041061e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1712 1.9519040361046791e-03</internalNodes>\n          <leafValues>\n            5.9565968811511993e-02 -1.6910600662231445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1713 -3.2053990289568901e-03</internalNodes>\n          <leafValues>\n            1.9927769899368286e-01 -5.6053258478641510e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1714 1.7617279663681984e-03</internalNodes>\n          <leafValues>\n            5.0697531551122665e-02 -2.1276649832725525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1715 -6.0043102130293846e-03</internalNodes>\n          <leafValues>\n            -1.3699269294738770e-01 8.2275278866291046e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1716 2.4830829352140427e-03</internalNodes>\n          <leafValues>\n            -5.1561661064624786e-02 2.1684220433235168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1717 -1.0821930319070816e-01</internalNodes>\n          <leafValues>\n            -7.8375291824340820e-01 1.4433650299906731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1718 -7.5229378417134285e-03</internalNodes>\n          <leafValues>\n            1.3453729450702667e-01 -9.0582698583602905e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1719 3.0750989913940430e-02</internalNodes>\n          <leafValues>\n            1.1081690341234207e-01 -9.9475599825382233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1720 -2.8948320541530848e-03</internalNodes>\n          <leafValues>\n            1.9005739688873291e-01 -5.2639260888099670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1721 2.7011099737137556e-03</internalNodes>\n          <leafValues>\n            5.8573558926582336e-02 -1.9851949810981750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1722 1.2562989722937346e-03</internalNodes>\n          <leafValues>\n            -7.3565311729907990e-02 1.5436840057373047e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>173</maxWeakCount>\n      <stageThreshold>-1.4785599708557129e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1723 -2.1460579708218575e-02</internalNodes>\n          <leafValues>\n            3.2505050301551819e-01 -2.0890380442142487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1724 7.6785432174801826e-03</internalNodes>\n          <leafValues>\n            -1.3231310248374939e-01 3.0525839328765869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1725 3.4118059556931257e-03</internalNodes>\n          <leafValues>\n            -3.0793079733848572e-01 1.1010979861021042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1726 -1.4710490177094471e-05</internalNodes>\n          <leafValues>\n            9.5858857035636902e-02 -2.9641860723495483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1727 1.0538049973547459e-02</internalNodes>\n          <leafValues>\n            -7.9252541065216064e-02 3.7234848737716675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1728 -2.5260078837163746e-04</internalNodes>\n          <leafValues>\n            6.7121110856533051e-02 -3.0784338712692261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1729 -3.5665810573846102e-03</internalNodes>\n          <leafValues>\n            1.4667609333992004e-01 -1.7083789408206940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1730 -1.2677359627559781e-03</internalNodes>\n          <leafValues>\n            -4.9063721299171448e-01 2.0374119281768799e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1731 -6.7669381387531757e-03</internalNodes>\n          <leafValues>\n            2.5767329335212708e-01 -7.4175901710987091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1732 -6.0447258874773979e-04</internalNodes>\n          <leafValues>\n            -1.9196410477161407e-01 9.1349847614765167e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1733 -2.5375590194016695e-03</internalNodes>\n          <leafValues>\n            -3.5663878917694092e-01 5.1547251641750336e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1734 -7.0200557820498943e-03</internalNodes>\n          <leafValues>\n            3.9719080924987793e-01 -4.3967988342046738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1735 -5.7049379684031010e-03</internalNodes>\n          <leafValues>\n            -5.0015491247177124e-01 2.9825929552316666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1736 1.4744909713044763e-03</internalNodes>\n          <leafValues>\n            5.8546211570501328e-02 -2.6139810681343079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1737 9.2834811657667160e-03</internalNodes>\n          <leafValues>\n            -4.2836759239435196e-02 3.3443170785903931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1738 9.9660153500735760e-04</internalNodes>\n          <leafValues>\n            -1.0425110161304474e-01 1.6191780567169189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1739 -7.5932733714580536e-02</internalNodes>\n          <leafValues>\n            -3.7356320023536682e-01 4.3075688183307648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1740 5.5370710470015183e-05</internalNodes>\n          <leafValues>\n            -1.4570540189743042e-01 1.1560150235891342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1741 1.4746849956281949e-05</internalNodes>\n          <leafValues>\n            -1.2972679734230042e-01 1.1747740209102631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1742 -1.4875919441692531e-04</internalNodes>\n          <leafValues>\n            -1.8002930283546448e-01 7.8782692551612854e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1743 3.3751460723578930e-03</internalNodes>\n          <leafValues>\n            -7.7242009341716766e-02 1.8596859276294708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1744 3.4271259210072458e-04</internalNodes>\n          <leafValues>\n            -1.5393340587615967e-01 1.0472580045461655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1745 -4.5711229904554784e-04</internalNodes>\n          <leafValues>\n            -2.2300529479980469e-01 6.1818670481443405e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1746 3.2788628595881164e-04</internalNodes>\n          <leafValues>\n            7.9448707401752472e-02 -1.8889829516410828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1747 -9.6754019614309072e-04</internalNodes>\n          <leafValues>\n            1.3137130439281464e-01 -1.0801070183515549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1748 1.0537009686231613e-02</internalNodes>\n          <leafValues>\n            2.2138269618153572e-02 -5.7479751110076904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1749 5.6796409189701080e-03</internalNodes>\n          <leafValues>\n            -5.6034579873085022e-02 2.4849580228328705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1750 -8.8083967566490173e-03</internalNodes>\n          <leafValues>\n            -3.7167680263519287e-01 4.2726948857307434e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1751 -2.8319710865616798e-02</internalNodes>\n          <leafValues>\n            -6.2387847900390625e-01 2.0844049751758575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1752 1.3637860305607319e-02</internalNodes>\n          <leafValues>\n            1.4434239827096462e-02 -7.1537137031555176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1753 1.1822770349681377e-02</internalNodes>\n          <leafValues>\n            -4.3181091547012329e-02 3.0682548880577087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1754 -6.1035697581246495e-04</internalNodes>\n          <leafValues>\n            -2.0418339967727661e-01 6.2115620821714401e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1755 -5.6125568225979805e-03</internalNodes>\n          <leafValues>\n            3.6485010385513306e-01 -3.5448960959911346e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1756 1.4603640011046082e-05</internalNodes>\n          <leafValues>\n            -9.6096910536289215e-02 1.2142290174961090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1757 1.9061230123043060e-03</internalNodes>\n          <leafValues>\n            5.3135868161916733e-02 -2.2978909313678741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1758 -3.6644220817834139e-03</internalNodes>\n          <leafValues>\n            1.9614529609680176e-01 -6.8556912243366241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1759 1.2336249928921461e-03</internalNodes>\n          <leafValues>\n            -8.7000347673892975e-02 1.3920229673385620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1760 5.4660569876432419e-03</internalNodes>\n          <leafValues>\n            2.2660890594124794e-02 -4.8329529166221619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1761 -6.1730947345495224e-04</internalNodes>\n          <leafValues>\n            -2.1959540247917175e-01 5.5258519947528839e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1762 2.9604700393974781e-03</internalNodes>\n          <leafValues>\n            -5.0548229366540909e-02 2.7476710081100464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1763 2.8015000745654106e-02</internalNodes>\n          <leafValues>\n            1.8874650821089745e-02 -6.0498368740081787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1764 -7.1651988946541678e-06</internalNodes>\n          <leafValues>\n            1.0836219787597656e-01 -1.0606969892978668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1765 -1.6367150470614433e-02</internalNodes>\n          <leafValues>\n            2.8645038604736328e-01 -3.7137690931558609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1766 1.0280719725415111e-03</internalNodes>\n          <leafValues>\n            5.6318141520023346e-02 -2.1795029938220978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1767 1.3662660494446754e-03</internalNodes>\n          <leafValues>\n            -4.6803500503301620e-02 2.3804000020027161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1768 7.6626739464700222e-03</internalNodes>\n          <leafValues>\n            2.1595260128378868e-02 -5.6847488880157471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1769 -4.5117521658539772e-03</internalNodes>\n          <leafValues>\n            -3.5794979333877563e-01 3.0485490337014198e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1770 -4.3773967772722244e-03</internalNodes>\n          <leafValues>\n            2.3192660510540009e-01 -5.3999818861484528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1771 -7.2474628686904907e-03</internalNodes>\n          <leafValues>\n            -4.3440380692481995e-01 2.6374189183115959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1772 7.9146260395646095e-04</internalNodes>\n          <leafValues>\n            -9.9924586713314056e-02 1.1088500171899796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1773 6.4166806638240814e-02</internalNodes>\n          <leafValues>\n            1.8938669934868813e-02 -5.7849419116973877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1774 -1.1797840124927461e-04</internalNodes>\n          <leafValues>\n            -1.4889569580554962e-01 6.8777203559875488e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1775 1.2801289558410645e-02</internalNodes>\n          <leafValues>\n            5.6179329752922058e-02 -2.0865969359874725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1776 -2.7018740773200989e-02</internalNodes>\n          <leafValues>\n            4.5356890559196472e-01 -2.5054579600691795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1777 -6.9431727752089500e-03</internalNodes>\n          <leafValues>\n            -5.2916550636291504e-01 2.1800139918923378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1778 3.3396780490875244e-03</internalNodes>\n          <leafValues>\n            -3.7295959889888763e-02 3.1198439002037048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1779 -3.8888349081389606e-04</internalNodes>\n          <leafValues>\n            -1.5630130469799042e-01 7.0981830358505249e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1780 -7.1400677552446723e-04</internalNodes>\n          <leafValues>\n            2.1799430251121521e-01 -5.4069280624389648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1781 1.2549630366265774e-02</internalNodes>\n          <leafValues>\n            1.7357179895043373e-02 -7.8320449590682983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1782 -1.4623020433646161e-05</internalNodes>\n          <leafValues>\n            7.8640103340148926e-02 -1.4212970435619354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1783 -1.2133170384913683e-03</internalNodes>\n          <leafValues>\n            -3.1371229887008667e-01 3.4287638962268829e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1784 3.6882720887660980e-03</internalNodes>\n          <leafValues>\n            -3.8382381200790405e-02 3.0124679207801819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1785 -1.4818239833402913e-05</internalNodes>\n          <leafValues>\n            1.2561169266700745e-01 -9.1703377664089203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1786 3.0302109662443399e-03</internalNodes>\n          <leafValues>\n            -2.9543070122599602e-02 3.7889540195465088e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1787 5.9340851294109598e-05</internalNodes>\n          <leafValues>\n            -1.7745719850063324e-01 7.0102430880069733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1788 -2.9449560315697454e-05</internalNodes>\n          <leafValues>\n            1.2052319943904877e-01 -1.1128979921340942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1789 -1.7771139740943909e-02</internalNodes>\n          <leafValues>\n            -4.7108310461044312e-01 2.5600789114832878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1790 7.6775359921157360e-03</internalNodes>\n          <leafValues>\n            -4.0757879614830017e-02 2.7021768689155579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1791 -1.8513019382953644e-01</internalNodes>\n          <leafValues>\n            -3.0238750576972961e-01 3.8790911436080933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1792 2.7697190642356873e-02</internalNodes>\n          <leafValues>\n            2.6712810620665550e-02 -4.4166600704193115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1793 -2.0427649840712547e-02</internalNodes>\n          <leafValues>\n            2.5086608529090881e-01 -5.5672701448202133e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1794 9.0200370177626610e-03</internalNodes>\n          <leafValues>\n            4.7344069927930832e-02 -2.7445980906486511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1795 -1.2504979968070984e-03</internalNodes>\n          <leafValues>\n            -1.4971190690994263e-01 7.9667650163173676e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1796 -1.0021160356700420e-02</internalNodes>\n          <leafValues>\n            2.4248859286308289e-01 -4.9217909574508667e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1797 2.6042328681796789e-04</internalNodes>\n          <leafValues>\n            6.3192427158355713e-02 -1.8544280529022217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1798 1.1920549441128969e-03</internalNodes>\n          <leafValues>\n            -8.6547911167144775e-02 1.3552339375019073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1799 3.0391330365091562e-03</internalNodes>\n          <leafValues>\n            -7.2965219616889954e-02 1.6479800641536713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1800 -2.9615699531859718e-05</internalNodes>\n          <leafValues>\n            8.2047976553440094e-02 -1.4502969384193420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1801 -1.2226340360939503e-02</internalNodes>\n          <leafValues>\n            -5.3014177083969116e-01 2.0405799150466919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1802 -2.8124889358878136e-02</internalNodes>\n          <leafValues>\n            -5.5148762464523315e-01 1.7688119783997536e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1803 -4.8307109624147415e-02</internalNodes>\n          <leafValues>\n            -8.2579791545867920e-01 1.1020540259778500e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1804 4.6184109523892403e-03</internalNodes>\n          <leafValues>\n            3.2069969922304153e-02 -3.0115368962287903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1805 -8.4275740664452314e-04</internalNodes>\n          <leafValues>\n            1.7034439742565155e-01 -6.3009433448314667e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1806 6.3863280229270458e-03</internalNodes>\n          <leafValues>\n            1.6307299956679344e-02 -7.1346491575241089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1807 -7.7203067485243082e-04</internalNodes>\n          <leafValues>\n            1.6715280711650848e-01 -6.6192783415317535e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1808 -2.2645338904112577e-03</internalNodes>\n          <leafValues>\n            -3.5107091069221497e-01 2.8168670833110809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1809 -3.7738790269941092e-03</internalNodes>\n          <leafValues>\n            5.2762818336486816e-01 -2.0222609862685204e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1810 5.8204168453812599e-03</internalNodes>\n          <leafValues>\n            7.0864066481590271e-02 -1.4675390720367432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1811 -1.2069250456988811e-02</internalNodes>\n          <leafValues>\n            2.3928099870681763e-01 -4.4312968850135803e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1812 3.3203759230673313e-03</internalNodes>\n          <leafValues>\n            -6.5749533474445343e-02 2.0277680456638336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1813 2.1621929481625557e-03</internalNodes>\n          <leafValues>\n            6.7407980561256409e-02 -1.8125349283218384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1814 1.2229150161147118e-02</internalNodes>\n          <leafValues>\n            2.2559309378266335e-02 -4.9180999398231506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1815 -6.7253508605062962e-03</internalNodes>\n          <leafValues>\n            -1.5290050208568573e-01 6.9786652922630310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1816 2.3579499684274197e-03</internalNodes>\n          <leafValues>\n            4.9212101846933365e-02 -2.0838280022144318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1817 -2.2950689308345318e-03</internalNodes>\n          <leafValues>\n            1.2400440126657486e-01 -9.6624918282032013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1818 1.0958530474454165e-03</internalNodes>\n          <leafValues>\n            -7.3270753026008606e-02 1.5208619832992554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1819 -1.3427219819277525e-03</internalNodes>\n          <leafValues>\n            1.2233039736747742e-01 -9.5689877867698669e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1820 5.4691417608410120e-04</internalNodes>\n          <leafValues>\n            -1.3924160599708557e-01 8.4381736814975739e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1821 8.4598818793892860e-03</internalNodes>\n          <leafValues>\n            8.9689873158931732e-02 -1.3318899273872375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1822 -9.1597117483615875e-02</internalNodes>\n          <leafValues>\n            -6.1854732036590576e-01 2.2867869585752487e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1823 -1.1090439511463046e-03</internalNodes>\n          <leafValues>\n            5.8513749390840530e-02 -1.8806450068950653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1824 2.2256910597207025e-05</internalNodes>\n          <leafValues>\n            -8.4488280117511749e-02 1.2780910730361938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1825 -1.5437819820363075e-04</internalNodes>\n          <leafValues>\n            -1.2228029966354370e-01 8.6046978831291199e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1826 -2.6862788945436478e-03</internalNodes>\n          <leafValues>\n            -2.4487000703811646e-01 4.4255960732698441e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1827 -4.0478641167283058e-03</internalNodes>\n          <leafValues>\n            2.7030688524246216e-01 -4.2200870811939240e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1828 -5.3340241312980652e-02</internalNodes>\n          <leafValues>\n            -7.6232349872589111e-01 1.4388039708137512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1829 2.8256059158593416e-03</internalNodes>\n          <leafValues>\n            -2.9877070337533951e-02 3.9692971110343933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1830 1.4443730004131794e-02</internalNodes>\n          <leafValues>\n            3.0186710879206657e-02 -3.6606648564338684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1831 1.3111650478094816e-03</internalNodes>\n          <leafValues>\n            -4.8140369355678558e-02 2.2434459626674652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1832 1.6730680363252759e-03</internalNodes>\n          <leafValues>\n            -5.9983398765325546e-02 1.6394190490245819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1833 2.3517120629549026e-02</internalNodes>\n          <leafValues>\n            2.4109700694680214e-02 -4.0492439270019531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1834 -3.5689130891114473e-03</internalNodes>\n          <leafValues>\n            3.1903558969497681e-01 -3.4295879304409027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1835 -2.8193008620291948e-04</internalNodes>\n          <leafValues>\n            -1.4874160289764404e-01 7.0669896900653839e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1836 1.0215859860181808e-01</internalNodes>\n          <leafValues>\n            1.2840500101447105e-02 -7.7848541736602783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1837 -1.9175480306148529e-01</internalNodes>\n          <leafValues>\n            -7.5706577301025391e-01 1.0587760247290134e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1838 5.3162658587098122e-03</internalNodes>\n          <leafValues>\n            -4.0066570043563843e-02 2.6050180196762085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1839 -1.1487120063975453e-03</internalNodes>\n          <leafValues>\n            -1.8017220497131348e-01 6.1610430479049683e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1840 -2.8316730260848999e-01</internalNodes>\n          <leafValues>\n            -8.4913408756256104e-01 1.1647139675915241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1841 3.3731758594512939e-02</internalNodes>\n          <leafValues>\n            1.2357609719038010e-01 -7.7482230961322784e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1842 9.8635945469141006e-03</internalNodes>\n          <leafValues>\n            4.3958030641078949e-02 -2.5541779398918152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1843 -3.1564768869429827e-03</internalNodes>\n          <leafValues>\n            1.8942989408969879e-01 -5.8221038430929184e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1844 1.5572150005027652e-03</internalNodes>\n          <leafValues>\n            -1.0376139730215073e-01 1.4107349514961243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1845 6.2360420823097229e-02</internalNodes>\n          <leafValues>\n            9.6462322399020195e-03 -8.5804969072341919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1846 1.1480550165288150e-04</internalNodes>\n          <leafValues>\n            -8.4419928491115570e-02 1.1312700062990189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1847 -5.9252730570733547e-03</internalNodes>\n          <leafValues>\n            -3.1650778651237488e-01 3.2079849392175674e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1848 -2.4660851340740919e-04</internalNodes>\n          <leafValues>\n            8.8697679340839386e-02 -1.1085110157728195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1849 1.6946049872785807e-03</internalNodes>\n          <leafValues>\n            -5.9657149016857147e-02 2.0904210209846497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1850 9.0623252617660910e-05</internalNodes>\n          <leafValues>\n            7.7441960573196411e-02 -1.2806339561939240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1851 1.1666920036077499e-03</internalNodes>\n          <leafValues>\n            -6.1748579144477844e-02 1.5702450275421143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1852 1.2541549513116479e-03</internalNodes>\n          <leafValues>\n            4.4608380645513535e-02 -2.3140360414981842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1853 -6.0275900177657604e-03</internalNodes>\n          <leafValues>\n            9.5281846821308136e-02 -1.0283090174198151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1854 -2.0472849905490875e-01</internalNodes>\n          <leafValues>\n            -4.1114759445190430e-01 2.3537550121545792e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1855 1.7691280692815781e-02</internalNodes>\n          <leafValues>\n            -3.9257150143384933e-02 2.8564441204071045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1856 -1.2875649333000183e-01</internalNodes>\n          <leafValues>\n            -8.2030779123306274e-01 1.1735290288925171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1857 1.2868089834228158e-03</internalNodes>\n          <leafValues>\n            5.0858870148658752e-02 -1.7848010361194611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1858 -4.5859832316637039e-03</internalNodes>\n          <leafValues>\n            1.6802109777927399e-01 -6.1582598835229874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1859 4.6391240903176367e-04</internalNodes>\n          <leafValues>\n            6.6747047007083893e-02 -1.4237800240516663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1860 -4.4439961202442646e-03</internalNodes>\n          <leafValues>\n            4.5714980363845825e-01 -2.1746810525655746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1861 3.8220020942389965e-03</internalNodes>\n          <leafValues>\n            1.8094329163432121e-02 -6.0244542360305786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1862 1.3894500443711877e-03</internalNodes>\n          <leafValues>\n            3.4007851034402847e-02 -2.7153480052947998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1863 -7.2111929766833782e-03</internalNodes>\n          <leafValues>\n            2.7312570810317993e-01 -3.6855131387710571e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1864 1.6509749693796039e-03</internalNodes>\n          <leafValues>\n            -8.4407016634941101e-02 1.3134449720382690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1865 -5.0506892148405313e-04</internalNodes>\n          <leafValues>\n            -1.4193339645862579e-01 7.3628053069114685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1866 -1.1205329559743404e-02</internalNodes>\n          <leafValues>\n            3.0093750357627869e-01 -3.4171391278505325e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1867 -3.4860160667449236e-04</internalNodes>\n          <leafValues>\n            -2.4538309872150421e-01 5.9823978692293167e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1868 7.3347258148714900e-04</internalNodes>\n          <leafValues>\n            -6.1770260334014893e-02 1.6367949545383453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1869 -9.2969406396150589e-03</internalNodes>\n          <leafValues>\n            -3.0236640572547913e-01 3.9257898926734924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1870 2.3957120254635811e-02</internalNodes>\n          <leafValues>\n            -2.3900719359517097e-02 4.8340830206871033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1871 3.6422210541786626e-05</internalNodes>\n          <leafValues>\n            -1.2283039838075638e-01 9.1258950531482697e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1872 5.0458200275897980e-02</internalNodes>\n          <leafValues>\n            1.3529149815440178e-02 -7.7827727794647217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1873 -9.8683983087539673e-03</internalNodes>\n          <leafValues>\n            -4.4060459733009338e-01 2.0404359325766563e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1874 -1.0851239785552025e-02</internalNodes>\n          <leafValues>\n            2.0165500044822693e-01 -5.2248589694499969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1875 1.7670930537860841e-04</internalNodes>\n          <leafValues>\n            -1.3691440224647522e-01 8.3170592784881592e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1876 1.2582179624587297e-04</internalNodes>\n          <leafValues>\n            6.1275351792573929e-02 -1.6542710363864899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1877 -7.0588971721008420e-04</internalNodes>\n          <leafValues>\n            1.5219129621982574e-01 -6.6164620220661163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1878 1.1355109745636582e-03</internalNodes>\n          <leafValues>\n            -5.4115369915962219e-02 2.1311099827289581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1879 -3.7436310667544603e-03</internalNodes>\n          <leafValues>\n            -2.3469850420951843e-01 4.9591001123189926e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1880 1.2309269513934851e-03</internalNodes>\n          <leafValues>\n            -7.5196012854576111e-02 1.4646540582180023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1881 3.6228948738425970e-04</internalNodes>\n          <leafValues>\n            -9.7789406776428223e-02 1.2091729789972305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1882 7.5996189843863249e-04</internalNodes>\n          <leafValues>\n            6.9713920354843140e-02 -1.6278789937496185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1883 -1.8509250367060304e-03</internalNodes>\n          <leafValues>\n            -1.8382890522480011e-01 5.7501520961523056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1884 7.9539678990840912e-03</internalNodes>\n          <leafValues>\n            -5.8848708868026733e-02 1.8846440315246582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1885 -3.1013600528240204e-04</internalNodes>\n          <leafValues>\n            -1.4575460553169250e-01 7.2403199970722198e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1886 1.6956350300461054e-03</internalNodes>\n          <leafValues>\n            7.0550262928009033e-02 -1.6740930080413818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1887 2.9058079235255718e-05</internalNodes>\n          <leafValues>\n            -1.0341589897871017e-01 9.5376282930374146e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1888 1.4466919936239719e-02</internalNodes>\n          <leafValues>\n            -1.7532069236040115e-02 5.4767167568206787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1889 -5.7156499475240707e-02</internalNodes>\n          <leafValues>\n            -7.4789309501647949e-01 1.6394419595599174e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1890 3.0681469943374395e-03</internalNodes>\n          <leafValues>\n            3.8702819496393204e-02 -2.4164369702339172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1891 3.7490210961550474e-03</internalNodes>\n          <leafValues>\n            -5.6555431336164474e-02 2.0308320224285126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1892 -1.0643450077623129e-03</internalNodes>\n          <leafValues>\n            -2.8211921453475952e-01 3.5207509994506836e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1893 -8.9807435870170593e-03</internalNodes>\n          <leafValues>\n            2.1754769980907440e-01 -5.0628181546926498e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1894 2.4643479264341295e-04</internalNodes>\n          <leafValues>\n            7.2727531194686890e-02 -1.4768819510936737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1895 2.2197801154106855e-03</internalNodes>\n          <leafValues>\n            -3.6754861474037170e-02 2.6939278841018677e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>169</maxWeakCount>\n      <stageThreshold>-1.3372850418090820e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1896 -3.5328421741724014e-02</internalNodes>\n          <leafValues>\n            2.4123990535736084e-01 -2.7961900830268860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1897 2.6829841081053019e-03</internalNodes>\n          <leafValues>\n            -1.6362559795379639e-01 2.3433500528335571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1898 2.1330378949642181e-03</internalNodes>\n          <leafValues>\n            -2.0100639760494232e-01 1.5679529309272766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1899 4.2972870869562030e-04</internalNodes>\n          <leafValues>\n            -3.7790980935096741e-01 7.4083693325519562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1900 -3.4645918756723404e-02</internalNodes>\n          <leafValues>\n            3.0556240677833557e-01 -8.3546526730060577e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1901 -1.4237920368032064e-05</internalNodes>\n          <leafValues>\n            8.2699142396450043e-02 -2.3583950102329254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1902 4.9165110103785992e-03</internalNodes>\n          <leafValues>\n            -1.9556050002574921e-01 9.6965387463569641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1903 6.0989488847553730e-03</internalNodes>\n          <leafValues>\n            7.8470550477504730e-02 -2.3209640383720398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1904 7.4874181300401688e-03</internalNodes>\n          <leafValues>\n            7.1725919842720032e-03 -5.1566261053085327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1905 4.2871991172432899e-03</internalNodes>\n          <leafValues>\n            4.0530510246753693e-02 -4.1086289286613464e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1906 1.6856180503964424e-02</internalNodes>\n          <leafValues>\n            -7.7506266534328461e-02 2.3657779395580292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1907 -1.0347689967602491e-03</internalNodes>\n          <leafValues>\n            -4.6704441308975220e-01 3.4468568861484528e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1908 1.6820980235934258e-03</internalNodes>\n          <leafValues>\n            -6.7206740379333496e-02 2.3671430349349976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1909 -1.2018240056931973e-02</internalNodes>\n          <leafValues>\n            -2.2372600436210632e-01 7.4281953275203705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1910 1.3802549801766872e-03</internalNodes>\n          <leafValues>\n            -9.9990189075469971e-02 1.5270860493183136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1911 -1.4281070232391357e-01</internalNodes>\n          <leafValues>\n            -2.8344118595123291e-01 6.2299348413944244e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1912 -1.5463490039110184e-02</internalNodes>\n          <leafValues>\n            2.9084190726280212e-01 -5.3395688533782959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1913 -9.9617196246981621e-04</internalNodes>\n          <leafValues>\n            -3.6011821031570435e-01 4.1922971606254578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1914 -2.6956679299473763e-02</internalNodes>\n          <leafValues>\n            -4.3736729025840759e-01 3.1731128692626953e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1915 -8.7780617177486420e-03</internalNodes>\n          <leafValues>\n            -5.0374472141265869e-01 2.5146849453449249e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1916 4.2969950300175697e-05</internalNodes>\n          <leafValues>\n            -1.5406499803066254e-01 8.8478356599807739e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1917 -6.2619051896035671e-03</internalNodes>\n          <leafValues>\n            2.2435919940471649e-01 -5.9849821031093597e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1918 -6.4296770142391324e-04</internalNodes>\n          <leafValues>\n            -2.4377089738845825e-01 5.9389740228652954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1919 -1.5573870041407645e-04</internalNodes>\n          <leafValues>\n            -1.6867999732494354e-01 7.8476317226886749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1920 4.1139780660159886e-04</internalNodes>\n          <leafValues>\n            -8.9017570018768311e-02 1.4019380509853363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1921 1.8635790329426527e-03</internalNodes>\n          <leafValues>\n            3.8603689521551132e-02 -3.2118970155715942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1922 1.6059159534052014e-03</internalNodes>\n          <leafValues>\n            -7.8801520168781281e-02 1.5801469981670380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1923 8.6740078404545784e-04</internalNodes>\n          <leafValues>\n            5.4134480655193329e-02 -2.3538430035114288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1924 -7.9801032552495599e-04</internalNodes>\n          <leafValues>\n            1.3330009579658508e-01 -9.5731817185878754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1925 -4.8548211343586445e-03</internalNodes>\n          <leafValues>\n            -2.0736059546470642e-01 6.1038620769977570e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1926 -1.1426740325987339e-02</internalNodes>\n          <leafValues>\n            1.7201809585094452e-01 -7.1152277290821075e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1927 8.7062492966651917e-03</internalNodes>\n          <leafValues>\n            -7.2185672819614410e-02 1.9082969427108765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1928 -1.1634400580078363e-03</internalNodes>\n          <leafValues>\n            -1.3751690089702606e-01 9.1818131506443024e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1929 6.8914610892534256e-03</internalNodes>\n          <leafValues>\n            9.6225969493389130e-02 -1.3246159255504608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1930 -2.2426620125770569e-03</internalNodes>\n          <leafValues>\n            3.5683241486549377e-01 -3.6280050873756409e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1931 1.2301520444452763e-02</internalNodes>\n          <leafValues>\n            4.6940989792346954e-02 -3.0623328685760498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1932 3.9963610470294952e-03</internalNodes>\n          <leafValues>\n            -8.2999393343925476e-02 1.5486459434032440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1933 -2.2026189981261268e-05</internalNodes>\n          <leafValues>\n            1.1778099834918976e-01 -1.1899650096893311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1934 5.8708270080387592e-04</internalNodes>\n          <leafValues>\n            5.6864660233259201e-02 -2.2509899735450745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1935 -5.8760121464729309e-03</internalNodes>\n          <leafValues>\n            2.6625269651412964e-01 -4.4570129364728928e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1936 4.3262130930088460e-04</internalNodes>\n          <leafValues>\n            5.8049838989973068e-02 -2.1173800528049469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1937 4.7852578572928905e-03</internalNodes>\n          <leafValues>\n            -4.0710568428039551e-02 2.9509121179580688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1938 4.5480159315047786e-05</internalNodes>\n          <leafValues>\n            -1.8201610445976257e-01 6.0179539024829865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1939 2.5633929762989283e-03</internalNodes>\n          <leafValues>\n            -8.7039761245250702e-02 1.2692840397357941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1940 -4.7383471392095089e-03</internalNodes>\n          <leafValues>\n            2.3961830139160156e-01 -4.9914900213479996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1941 4.4647231698036194e-03</internalNodes>\n          <leafValues>\n            4.0540020912885666e-02 -3.2467570900917053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1942 -6.7061209119856358e-03</internalNodes>\n          <leafValues>\n            -3.2789680361747742e-01 3.2299648970365524e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1943 7.1761049330234528e-02</internalNodes>\n          <leafValues>\n            -2.3713670670986176e-02 4.7772058844566345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1944 3.0584860593080521e-02</internalNodes>\n          <leafValues>\n            1.6793910413980484e-02 -7.8061228990554810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1945 3.8672669325023890e-03</internalNodes>\n          <leafValues>\n            -2.4876890704035759e-02 5.1260662078857422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1946 -5.2802208811044693e-02</internalNodes>\n          <leafValues>\n            -5.0759661197662354e-01 2.3873040452599525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1947 -6.5651582553982735e-04</internalNodes>\n          <leafValues>\n            -2.0122329890727997e-01 4.9672801047563553e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1948 8.5785267874598503e-03</internalNodes>\n          <leafValues>\n            -4.5007020235061646e-02 2.3518909513950348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1949 -1.2620680499821901e-03</internalNodes>\n          <leafValues>\n            -1.9962050020694733e-01 5.5564209818840027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1950 1.4215289615094662e-02</internalNodes>\n          <leafValues>\n            -4.6983979642391205e-02 2.0781150460243225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1951 1.6393810510635376e-01</internalNodes>\n          <leafValues>\n            1.4973269775509834e-02 -6.5025687217712402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1952 1.4837640523910522e-01</internalNodes>\n          <leafValues>\n            8.1885885447263718e-03 -9.4296187162399292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1953 1.4631190424552187e-05</internalNodes>\n          <leafValues>\n            -1.2383759766817093e-01 8.2489579916000366e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1954 -3.3909391611814499e-02</internalNodes>\n          <leafValues>\n            -2.2818760573863983e-01 4.3302498757839203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1955 3.8288589566946030e-03</internalNodes>\n          <leafValues>\n            -3.7276919931173325e-02 2.7613049745559692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1956 8.0947913229465485e-03</internalNodes>\n          <leafValues>\n            2.8445359319448471e-02 -3.9388808608055115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1957 -7.0019601844251156e-04</internalNodes>\n          <leafValues>\n            1.2199380248785019e-01 -9.2714257538318634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1958 3.4412490203976631e-03</internalNodes>\n          <leafValues>\n            -4.8972681164741516e-02 2.0617230236530304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1959 -1.6337490081787109e-01</internalNodes>\n          <leafValues>\n            -6.1850237846374512e-01 1.6467820852994919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1960 6.5640709362924099e-03</internalNodes>\n          <leafValues>\n            1.1007189750671387e-01 -9.2340007424354553e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1961 4.4708838686347008e-04</internalNodes>\n          <leafValues>\n            -1.3933309912681580e-01 7.7039696276187897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1962 1.7568700015544891e-02</internalNodes>\n          <leafValues>\n            9.7569692879915237e-03 -8.0032902956008911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1963 -1.9571769516915083e-03</internalNodes>\n          <leafValues>\n            2.8000330924987793e-01 -3.6428239196538925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1964 5.1913037896156311e-04</internalNodes>\n          <leafValues>\n            5.3515341132879257e-02 -1.9425579905509949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1965 9.6273031085729599e-03</internalNodes>\n          <leafValues>\n            3.1317751854658127e-02 -3.1802541017532349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1966 -5.0332810729742050e-02</internalNodes>\n          <leafValues>\n            5.6659060716629028e-01 -1.8494980409741402e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1967 -6.4624901860952377e-03</internalNodes>\n          <leafValues>\n            -4.1894671320915222e-01 2.7350850403308868e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1968 -5.2857249975204468e-03</internalNodes>\n          <leafValues>\n            1.7756509780883789e-01 -5.8377739042043686e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1969 9.9454462528228760e-02</internalNodes>\n          <leafValues>\n            1.6487719491124153e-02 -5.8526170253753662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1970 2.1917840058449656e-04</internalNodes>\n          <leafValues>\n            -1.0714250057935715e-01 9.1884173452854156e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1971 -4.3873358663404360e-05</internalNodes>\n          <leafValues>\n            7.8036926686763763e-02 -1.2723919749259949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1972 -6.7227642284706235e-04</internalNodes>\n          <leafValues>\n            -2.5709420442581177e-01 3.8843378424644470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1973 1.1754270235542208e-04</internalNodes>\n          <leafValues>\n            -7.9695962369441986e-02 1.2093970179557800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1974 4.6061190962791443e-01</internalNodes>\n          <leafValues>\n            1.3886069878935814e-02 -6.5241271257400513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1975 1.1115600354969501e-02</internalNodes>\n          <leafValues>\n            1.3871660456061363e-02 -6.0222518444061279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1976 9.0776477009057999e-03</internalNodes>\n          <leafValues>\n            -3.6118660122156143e-02 2.5702419877052307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1977 -4.9597548786550760e-04</internalNodes>\n          <leafValues>\n            1.1017049849033356e-01 -8.9249506592750549e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1978 1.5807070303708315e-03</internalNodes>\n          <leafValues>\n            4.8131279647350311e-02 -2.0215910673141479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1979 -6.9012932479381561e-02</internalNodes>\n          <leafValues>\n            -8.1536060571670532e-01 1.0660010389983654e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1980 1.9330780196469277e-04</internalNodes>\n          <leafValues>\n            -1.1231829971075058e-01 8.5046432912349701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1981 7.8813207801431417e-04</internalNodes>\n          <leafValues>\n            -5.5200818926095963e-02 1.7654439806938171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1982 9.5367128960788250e-04</internalNodes>\n          <leafValues>\n            5.4411198943853378e-02 -1.8674199283123016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1983 -2.3191540967673063e-03</internalNodes>\n          <leafValues>\n            -2.7544409036636353e-01 3.8513321429491043e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1984 9.5087959198281169e-04</internalNodes>\n          <leafValues>\n            -6.8218901753425598e-02 1.6082139313220978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1985 9.5385108143091202e-03</internalNodes>\n          <leafValues>\n            -3.8826879113912582e-02 3.0370831489562988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1986 -1.4489189721643925e-02</internalNodes>\n          <leafValues>\n            -4.6989730000495911e-01 2.3550020530819893e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1987 1.0756050236523151e-02</internalNodes>\n          <leafValues>\n            2.0565100014209747e-02 -4.7243130207061768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1988 -2.0074830390512943e-03</internalNodes>\n          <leafValues>\n            -2.7946698665618896e-01 3.6021549254655838e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1989 -1.7316909506917000e-03</internalNodes>\n          <leafValues>\n            2.0902790129184723e-01 -4.6300981193780899e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1990 1.5234799683094025e-01</internalNodes>\n          <leafValues>\n            1.4934250153601170e-02 -6.0461127758026123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1991 6.3340878114104271e-04</internalNodes>\n          <leafValues>\n            5.0307150930166245e-02 -1.8277199566364288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1992 -8.2793915644288063e-03</internalNodes>\n          <leafValues>\n            3.6463031172752380e-01 -2.6474289596080780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1993 1.3667670078575611e-02</internalNodes>\n          <leafValues>\n            1.2511620298027992e-02 -8.9023828506469727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1994 2.0979309920221567e-03</internalNodes>\n          <leafValues>\n            -8.0247193574905396e-02 1.2989950180053711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1995 -8.9776562526822090e-03</internalNodes>\n          <leafValues>\n            1.7411080002784729e-01 -6.1771109700202942e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1996 1.2094390112906694e-03</internalNodes>\n          <leafValues>\n            6.8711720407009125e-02 -1.6561290621757507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1997 6.8200258538126945e-03</internalNodes>\n          <leafValues>\n            5.7795759290456772e-02 -1.8231619894504547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1998 -1.8268059939146042e-03</internalNodes>\n          <leafValues>\n            1.3340330123901367e-01 -7.5343966484069824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1999 7.9908408224582672e-03</internalNodes>\n          <leafValues>\n            -4.5094471424818039e-02 2.4594159424304962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2000 -2.5262041017413139e-03</internalNodes>\n          <leafValues>\n            -2.0763960480690002e-01 5.2334129810333252e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2001 -7.4825510382652283e-02</internalNodes>\n          <leafValues>\n            -5.4688757658004761e-01 1.7803389579057693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2002 -3.3099399879574776e-03</internalNodes>\n          <leafValues>\n            3.3455818891525269e-01 -2.8966419398784637e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2003 8.2276277244091034e-03</internalNodes>\n          <leafValues>\n            4.1579861193895340e-02 -2.6652270555496216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2004 3.1686299480497837e-03</internalNodes>\n          <leafValues>\n            -4.1817110031843185e-02 2.9769781231880188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2005 1.5170290134847164e-02</internalNodes>\n          <leafValues>\n            4.3392360210418701e-02 -2.4617969989776611e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2006 -1.5946379862725735e-03</internalNodes>\n          <leafValues>\n            1.5057189762592316e-01 -7.3017738759517670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2007 -8.5226353257894516e-03</internalNodes>\n          <leafValues>\n            -1.5050080418586731e-01 6.9656036794185638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2008 -1.1418120004236698e-02</internalNodes>\n          <leafValues>\n            1.2974749505519867e-01 -9.5122329890727997e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2009 -2.8856399655342102e-01</internalNodes>\n          <leafValues>\n            -2.1124540269374847e-01 4.7410819679498672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2010 -3.9014229550957680e-03</internalNodes>\n          <leafValues>\n            -2.6843780279159546e-01 3.8698658347129822e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2011 -3.5567739978432655e-03</internalNodes>\n          <leafValues>\n            2.3385030031204224e-01 -4.5723881572484970e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2012 -6.4394129440188408e-03</internalNodes>\n          <leafValues>\n            -6.0463881492614746e-01 1.6156049445271492e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2013 -7.4861319735646248e-03</internalNodes>\n          <leafValues>\n            1.6867969930171967e-01 -5.5975880473852158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2014 2.3621210129931569e-04</internalNodes>\n          <leafValues>\n            5.3596749901771545e-02 -2.1872919797897339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2015 2.6099249720573425e-02</internalNodes>\n          <leafValues>\n            -5.3937491029500961e-02 2.2728930413722992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2016 -1.7809759592637420e-03</internalNodes>\n          <leafValues>\n            8.6759522557258606e-02 -1.2009979784488678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2017 -1.1987469770247117e-04</internalNodes>\n          <leafValues>\n            -1.5347549319267273e-01 7.0707783102989197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2018 -6.8248361349105835e-03</internalNodes>\n          <leafValues>\n            -3.7341019511222839e-01 2.6779960840940475e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2019 -1.3119089999236166e-04</internalNodes>\n          <leafValues>\n            -1.1640869826078415e-01 8.7211161851882935e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2020 -1.8228540429845452e-03</internalNodes>\n          <leafValues>\n            1.5664499998092651e-01 -6.8006090819835663e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2021 2.6267999783158302e-03</internalNodes>\n          <leafValues>\n            -3.6987219005823135e-02 2.6393121480941772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2022 -7.0677183568477631e-02</internalNodes>\n          <leafValues>\n            -2.8295999765396118e-01 3.5035520792007446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2023 1.8061319366097450e-02</internalNodes>\n          <leafValues>\n            -2.8041649609804153e-02 3.5313779115676880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2024 9.2649407451972365e-04</internalNodes>\n          <leafValues>\n            4.4600278139114380e-02 -2.2788539528846741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2025 -5.3023721557110548e-04</internalNodes>\n          <leafValues>\n            -2.0866680145263672e-01 6.2718503177165985e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2026 3.6058931145817041e-03</internalNodes>\n          <leafValues>\n            -6.7796908318996429e-02 1.4900009334087372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2027 8.5915643721818924e-03</internalNodes>\n          <leafValues>\n            -4.5626759529113770e-02 2.3078480362892151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2028 -8.8329352438449860e-03</internalNodes>\n          <leafValues>\n            -4.1117089986801147e-01 2.8230689465999603e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2029 4.0959479520097375e-04</internalNodes>\n          <leafValues>\n            5.3656630218029022e-02 -1.8243549764156342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2030 -2.5011589750647545e-03</internalNodes>\n          <leafValues>\n            1.6313549876213074e-01 -6.0954701155424118e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2031 -1.4622169546782970e-02</internalNodes>\n          <leafValues>\n            -4.9988400936126709e-01 1.8572760745882988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2032 -6.3790678977966309e-02</internalNodes>\n          <leafValues>\n            -4.8329600691795349e-01 1.7903389409184456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2033 -1.6671139746904373e-02</internalNodes>\n          <leafValues>\n            -2.6661589741706848e-01 3.4886009991168976e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2034 -1.2526069767773151e-02</internalNodes>\n          <leafValues>\n            3.4061339497566223e-01 -2.8094800189137459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2035 4.8325158655643463e-02</internalNodes>\n          <leafValues>\n            -3.3176191151142120e-02 2.9025658965110779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2036 1.3246550224721432e-03</internalNodes>\n          <leafValues>\n            3.7181440740823746e-02 -2.6850658655166626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2037 -2.2221319377422333e-01</internalNodes>\n          <leafValues>\n            -8.9892768859863281e-01 1.0064439848065376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2038 1.2954319827258587e-03</internalNodes>\n          <leafValues>\n            -1.0161759704351425e-01 9.0588621795177460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2039 1.3794669881463051e-02</internalNodes>\n          <leafValues>\n            -7.4244648218154907e-02 1.4314259588718414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2040 8.5643801139667630e-04</internalNodes>\n          <leafValues>\n            5.9753969311714172e-02 -1.8660190701484680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2041 -2.3317540064454079e-02</internalNodes>\n          <leafValues>\n            -6.9259917736053467e-01 1.3667319901287556e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2042 1.6281680436804891e-03</internalNodes>\n          <leafValues>\n            -6.1060748994350433e-02 1.5505290031433105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2043 -1.2380329892039299e-02</internalNodes>\n          <leafValues>\n            -1.5146850049495697e-01 6.1767600476741791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2044 1.8393599893897772e-03</internalNodes>\n          <leafValues>\n            -3.7167988717556000e-02 2.4822179973125458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2045 3.5529870074242353e-03</internalNodes>\n          <leafValues>\n            -2.9200790449976921e-02 3.3592289686203003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2046 1.0305979521945119e-03</internalNodes>\n          <leafValues>\n            3.7694081664085388e-02 -2.9085698723793030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2047 2.9916960556874983e-05</internalNodes>\n          <leafValues>\n            -8.8014192879199982e-02 1.0515210032463074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2048 -4.1505339322611690e-04</internalNodes>\n          <leafValues>\n            6.5726242959499359e-02 -1.5021100640296936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2049 -1.4631619706051424e-05</internalNodes>\n          <leafValues>\n            7.8170351684093475e-02 -1.1962439864873886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2050 -4.3779090046882629e-03</internalNodes>\n          <leafValues>\n            2.0752459764480591e-01 -5.2089329808950424e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2051 4.7036199248395860e-04</internalNodes>\n          <leafValues>\n            6.3348479568958282e-02 -1.8767729401588440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2052 1.4788640328333713e-05</internalNodes>\n          <leafValues>\n            -9.5828853547573090e-02 1.1213099956512451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2053 3.7048431113362312e-04</internalNodes>\n          <leafValues>\n            -9.8723009228706360e-02 9.8647676408290863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2054 -1.8590339459478855e-03</internalNodes>\n          <leafValues>\n            -2.6873630285263062e-01 3.8352578878402710e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2055 -7.0764529518783092e-03</internalNodes>\n          <leafValues>\n            -1.5984000265598297e-01 5.7841330766677856e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2056 1.4920010231435299e-02</internalNodes>\n          <leafValues>\n            -5.1178149878978729e-02 1.9242909550666809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2057 -5.0713191740214825e-03</internalNodes>\n          <leafValues>\n            1.3863259553909302e-01 -1.1121229827404022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2058 -1.5005500055849552e-02</internalNodes>\n          <leafValues>\n            4.8583930730819702e-01 -1.8811760470271111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2059 -2.0439480431377888e-03</internalNodes>\n          <leafValues>\n            -3.2754859328269958e-01 2.7816310524940491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2060 -1.3060690253041685e-04</internalNodes>\n          <leafValues>\n            9.8868042230606079e-02 -8.4957577288150787e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2061 8.8742617517709732e-03</internalNodes>\n          <leafValues>\n            -2.5235600769519806e-02 3.2389879226684570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2062 7.0397509261965752e-04</internalNodes>\n          <leafValues>\n            5.6327521800994873e-02 -1.7392079532146454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2063 -2.5402469560503960e-02</internalNodes>\n          <leafValues>\n            1.9675390422344208e-01 -4.7362301498651505e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2064 -9.3743661418557167e-03</internalNodes>\n          <leafValues>\n            -1.5204219520092010e-01 5.9932630509138107e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>178</maxWeakCount>\n      <stageThreshold>-1.3418790102005005e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2065 4.0453020483255386e-02</internalNodes>\n          <leafValues>\n            -2.3637829720973969e-01 2.8865531086921692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2066 -1.1056049726903439e-02</internalNodes>\n          <leafValues>\n            1.6062900424003601e-01 -2.6259741187095642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2067 -3.9778949576430023e-04</internalNodes>\n          <leafValues>\n            1.1591099947690964e-01 -2.7081018686294556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2068 1.0191530454903841e-03</internalNodes>\n          <leafValues>\n            -2.0969370007514954e-01 1.3642899692058563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2069 3.6101979203522205e-03</internalNodes>\n          <leafValues>\n            -2.1725459396839142e-01 1.2617790699005127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2070 4.4545531272888184e-04</internalNodes>\n          <leafValues>\n            -1.5974539518356323e-01 1.2596489489078522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2071 5.8226222172379494e-03</internalNodes>\n          <leafValues>\n            -1.5484449267387390e-01 9.7783811390399933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2072 -2.1416260860860348e-03</internalNodes>\n          <leafValues>\n            -3.6377671360969543e-01 4.0103349834680557e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2073 -2.6691620587371290e-04</internalNodes>\n          <leafValues>\n            8.4470756351947784e-02 -1.7496100068092346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2074 -5.4352330043911934e-03</internalNodes>\n          <leafValues>\n            -3.1830930709838867e-01 4.9786038696765900e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2075 -1.5426309546455741e-03</internalNodes>\n          <leafValues>\n            -2.1333709359169006e-01 6.4884513616561890e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2076 -2.7932289522141218e-03</internalNodes>\n          <leafValues>\n            2.5483250617980957e-01 -6.5170928835868835e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2077 1.3845940120518208e-03</internalNodes>\n          <leafValues>\n            3.9304580539464951e-02 -3.7404829263687134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2078 -3.2193479128181934e-03</internalNodes>\n          <leafValues>\n            2.6290428638458252e-01 -5.6396361440420151e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2079 -9.7977351397275925e-03</internalNodes>\n          <leafValues>\n            3.2044389843940735e-01 -4.6382289379835129e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2080 -1.7625789623707533e-03</internalNodes>\n          <leafValues>\n            1.5050819516181946e-01 -8.8892437517642975e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2081 -3.6096889525651932e-02</internalNodes>\n          <leafValues>\n            -4.3137839436531067e-01 3.1785801053047180e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2082 2.0813369192183018e-03</internalNodes>\n          <leafValues>\n            -6.5957918763160706e-02 1.9275289773941040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2083 -6.0533690266311169e-03</internalNodes>\n          <leafValues>\n            -3.1374609470367432e-01 5.1007431000471115e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2084 3.7253410555422306e-03</internalNodes>\n          <leafValues>\n            -6.1402589082717896e-02 2.5631371140480042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2085 5.0668260082602501e-03</internalNodes>\n          <leafValues>\n            5.7962730526924133e-02 -2.4340160191059113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2086 2.8038739692419767e-03</internalNodes>\n          <leafValues>\n            -7.0329703390598297e-02 2.1375860273838043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2087 1.5925259795039892e-03</internalNodes>\n          <leafValues>\n            2.6637760922312737e-02 -5.1129138469696045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2088 2.9422679290291853e-05</internalNodes>\n          <leafValues>\n            -2.1710200607776642e-01 6.4985051751136780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2089 -2.2399190129362978e-05</internalNodes>\n          <leafValues>\n            8.1582568585872650e-02 -1.5135610103607178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2090 6.7072827368974686e-04</internalNodes>\n          <leafValues>\n            1.0502190142869949e-01 -1.1787360161542892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2091 -1.5262300148606300e-03</internalNodes>\n          <leafValues>\n            -3.4620371460914612e-01 3.9244089275598526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2092 1.8151829717680812e-03</internalNodes>\n          <leafValues>\n            -7.4669457972049713e-02 1.6847759485244751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2093 5.8078771689906716e-04</internalNodes>\n          <leafValues>\n            -9.7952410578727722e-02 1.4192749559879303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2094 -8.9623313397169113e-03</internalNodes>\n          <leafValues>\n            -1.9601620733737946e-01 6.6268041729927063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2095 1.1146809905767441e-01</internalNodes>\n          <leafValues>\n            1.7000140622258186e-02 -6.4917707443237305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2096 -1.7872039461508393e-04</internalNodes>\n          <leafValues>\n            -1.4053599536418915e-01 8.0108702182769775e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2097 -4.6587768010795116e-03</internalNodes>\n          <leafValues>\n            1.9530229270458221e-01 -5.8602340519428253e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2098 3.4576000180095434e-03</internalNodes>\n          <leafValues>\n            5.9805799275636673e-02 -2.1990789473056793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2099 -1.9979270291514695e-04</internalNodes>\n          <leafValues>\n            -1.3726149499416351e-01 8.3430230617523193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2100 -4.8079751431941986e-03</internalNodes>\n          <leafValues>\n            5.5041921138763428e-01 -2.0715299993753433e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2101 -7.3389292083447799e-06</internalNodes>\n          <leafValues>\n            7.5302027165889740e-02 -1.4486590027809143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2102 -3.5799799952656031e-03</internalNodes>\n          <leafValues>\n            2.6277220249176025e-01 -4.2550459504127502e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2103 1.1689850362017751e-03</internalNodes>\n          <leafValues>\n            -1.0984169691801071e-01 1.2971849739551544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2104 3.2639548182487488e-02</internalNodes>\n          <leafValues>\n            3.1038379296660423e-02 -3.9474260807037354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2105 1.1596709955483675e-03</internalNodes>\n          <leafValues>\n            5.2021898329257965e-02 -2.2035829722881317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2106 -1.4262240147218108e-03</internalNodes>\n          <leafValues>\n            1.0745699703693390e-01 -1.0067079961299896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2107 -2.3668329417705536e-01</internalNodes>\n          <leafValues>\n            -7.3174351453781128e-01 1.6999609768390656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2108 1.9279429398011416e-04</internalNodes>\n          <leafValues>\n            -1.3248440623283386e-01 7.8186027705669403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2109 -1.7292149364948273e-02</internalNodes>\n          <leafValues>\n            -9.7199842333793640e-02 1.1069560050964355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2110 -1.2431619688868523e-03</internalNodes>\n          <leafValues>\n            1.7741470038890839e-01 -7.2548337280750275e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2111 2.1754560293629766e-05</internalNodes>\n          <leafValues>\n            -9.6952050924301147e-02 1.0899409651756287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2112 3.0975879053585231e-04</internalNodes>\n          <leafValues>\n            6.2249891459941864e-02 -1.7384719848632812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2113 -1.1590570211410522e-02</internalNodes>\n          <leafValues>\n            2.6162809133529663e-01 -4.1994079947471619e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2114 1.8150920048356056e-02</internalNodes>\n          <leafValues>\n            2.6353549212217331e-02 -4.4685411453247070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2115 8.0223509576171637e-04</internalNodes>\n          <leafValues>\n            -1.2143869698047638e-01 8.7092787027359009e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2116 -1.4258639421314001e-03</internalNodes>\n          <leafValues>\n            1.9236080348491669e-01 -5.2987430244684219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2117 -2.4536260752938688e-04</internalNodes>\n          <leafValues>\n            -1.6683700680732727e-01 6.5604820847511292e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2118 2.2050029656384140e-05</internalNodes>\n          <leafValues>\n            -9.3477472662925720e-02 1.0711719840764999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2119 4.7658861149102449e-04</internalNodes>\n          <leafValues>\n            -8.0596633255481720e-02 1.2512689828872681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2120 4.0533850551582873e-04</internalNodes>\n          <leafValues>\n            6.8990617990493774e-02 -1.5740759670734406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2121 -1.6471749171614647e-02</internalNodes>\n          <leafValues>\n            -5.9667861461639404e-01 1.8876109272241592e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2122 2.2267159074544907e-03</internalNodes>\n          <leafValues>\n            -4.5803830027580261e-02 2.3071089386940002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2123 4.9383189529180527e-02</internalNodes>\n          <leafValues>\n            1.9837729632854462e-02 -5.9306108951568604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2124 8.6411498486995697e-03</internalNodes>\n          <leafValues>\n            2.8697369620203972e-02 -3.5161119699478149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2125 -4.8241391777992249e-03</internalNodes>\n          <leafValues>\n            2.2474339604377747e-01 -4.8463210463523865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2126 -8.6174849420785904e-03</internalNodes>\n          <leafValues>\n            -5.7088959217071533e-01 1.9183190539479256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2127 -5.7220697635784745e-04</internalNodes>\n          <leafValues>\n            1.1697269976139069e-01 -8.8938057422637939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2128 1.1997730471193790e-03</internalNodes>\n          <leafValues>\n            8.4181122481822968e-02 -1.2565499544143677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2129 2.6049909647554159e-03</internalNodes>\n          <leafValues>\n            5.9500031173229218e-02 -2.0638149976730347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2130 -1.4789920533075929e-03</internalNodes>\n          <leafValues>\n            2.5114980340003967e-01 -4.7535050660371780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2131 -2.5746721029281616e-01</internalNodes>\n          <leafValues>\n            -7.3038768768310547e-01 1.5440680086612701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2132 -1.2104290071874857e-03</internalNodes>\n          <leafValues>\n            1.8646970391273499e-01 -5.5789809674024582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2133 3.4140399657189846e-04</internalNodes>\n          <leafValues>\n            6.7707672715187073e-02 -1.5597160160541534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2134 3.1749058980494738e-03</internalNodes>\n          <leafValues>\n            3.5003460943698883e-02 -2.9529309272766113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2135 4.4338819384574890e-01</internalNodes>\n          <leafValues>\n            1.4550019986927509e-02 -6.1034661531448364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2136 3.9458259940147400e-02</internalNodes>\n          <leafValues>\n            -4.5779328793287277e-02 2.2927519679069519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2137 3.0410829931497574e-03</internalNodes>\n          <leafValues>\n            1.6304129734635353e-02 -5.7491117715835571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2138 -1.4853020012378693e-01</internalNodes>\n          <leafValues>\n            -5.6220901012420654e-01 1.5771050006151199e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2139 4.4339009036775678e-05</internalNodes>\n          <leafValues>\n            -9.1284371912479401e-02 1.0920979827642441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2140 2.2139810025691986e-03</internalNodes>\n          <leafValues>\n            -4.7668289393186569e-02 2.2291789948940277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2141 8.7831966578960419e-02</internalNodes>\n          <leafValues>\n            2.6718059554696083e-02 -4.0396329760551453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2142 -2.2798930294811726e-03</internalNodes>\n          <leafValues>\n            -1.6160930693149567e-01 6.6071107983589172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2143 -1.4653969628852792e-05</internalNodes>\n          <leafValues>\n            8.5298359394073486e-02 -1.2724019587039948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2144 1.2313240440562367e-03</internalNodes>\n          <leafValues>\n            -6.5917477011680603e-02 1.6606420278549194e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2145 4.5110988616943359e-01</internalNodes>\n          <leafValues>\n            1.3457960449159145e-02 -7.1525502204895020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2146 -2.4518640711903572e-02</internalNodes>\n          <leafValues>\n            -4.3282639980316162e-01 2.0400719717144966e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2147 -1.1901959805982187e-04</internalNodes>\n          <leafValues>\n            8.9420333504676819e-02 -1.1834760010242462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2148 -1.3584910193458200e-03</internalNodes>\n          <leafValues>\n            2.4722290039062500e-01 -4.3907400220632553e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2149 6.9289728999137878e-03</internalNodes>\n          <leafValues>\n            -5.6832619011402130e-02 1.6665740311145782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2150 -6.9041848182678223e-03</internalNodes>\n          <leafValues>\n            -1.2742209434509277e-01 7.9310603439807892e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2151 1.2964820489287376e-03</internalNodes>\n          <leafValues>\n            7.2462439537048340e-02 -1.6863870620727539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2152 2.3060059174895287e-02</internalNodes>\n          <leafValues>\n            -5.0913080573081970e-02 2.1664789319038391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2153 -4.0960568934679031e-02</internalNodes>\n          <leafValues>\n            -5.6479138135910034e-01 1.9609550014138222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2154 7.4867479270324111e-05</internalNodes>\n          <leafValues>\n            -6.9450333714485168e-02 1.4615139365196228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2155 -6.8458272144198418e-03</internalNodes>\n          <leafValues>\n            6.6049978137016296e-02 -2.0840729773044586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2156 1.9395649433135986e-02</internalNodes>\n          <leafValues>\n            1.6168899834156036e-02 -5.6396162509918213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2157 -1.6121419321279973e-04</internalNodes>\n          <leafValues>\n            -1.3194569945335388e-01 7.4094116687774658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2158 6.6511691547930241e-03</internalNodes>\n          <leafValues>\n            -5.5261820554733276e-02 1.9894389808177948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2159 4.5172171667218208e-03</internalNodes>\n          <leafValues>\n            3.2863661646842957e-02 -3.0980890989303589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2160 -4.0247041732072830e-02</internalNodes>\n          <leafValues>\n            -6.8980348110198975e-01 1.2438739649951458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2161 7.2544030444987584e-06</internalNodes>\n          <leafValues>\n            -9.5949873328208923e-02 9.7919799387454987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2162 -1.6025650501251221e-01</internalNodes>\n          <leafValues>\n            4.9472638964653015e-01 -1.8643429502844810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2163 5.0598900998011231e-04</internalNodes>\n          <leafValues>\n            -1.2216579914093018e-01 8.6699098348617554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2164 -1.0506899654865265e-01</internalNodes>\n          <leafValues>\n            -8.5855627059936523e-01 8.2870386540889740e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2165 -1.8218380212783813e-01</internalNodes>\n          <leafValues>\n            -5.8477312326431274e-01 1.3160600326955318e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2166 1.6435410827398300e-02</internalNodes>\n          <leafValues>\n            1.6296360641717911e-02 -5.5137562751770020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2167 1.9282519817352295e-02</internalNodes>\n          <leafValues>\n            -2.5027479976415634e-02 4.3645161390304565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2168 3.4772949293255806e-03</internalNodes>\n          <leafValues>\n            3.1632781028747559e-02 -2.9246759414672852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2169 2.2620869800448418e-02</internalNodes>\n          <leafValues>\n            -2.3985739797353745e-02 4.3105301260948181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2170 -1.8172320723533630e-01</internalNodes>\n          <leafValues>\n            -1.8037860095500946e-01 5.1903489977121353e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2171 -4.3819830752909184e-03</internalNodes>\n          <leafValues>\n            -2.8302851319313049e-01 3.3024039119482040e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2172 -1.5246120281517506e-02</internalNodes>\n          <leafValues>\n            2.3519919812679291e-01 -4.1242249310016632e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2173 3.9043289422988892e-01</internalNodes>\n          <leafValues>\n            2.8530629351735115e-02 -3.5845771431922913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2174 3.9103450253605843e-03</internalNodes>\n          <leafValues>\n            -5.1523748785257339e-02 1.7829769849777222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2175 -1.0847560130059719e-02</internalNodes>\n          <leafValues>\n            -4.8355281352996826e-01 1.8765790387988091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2176 5.7015339843928814e-03</internalNodes>\n          <leafValues>\n            1.2250830419361591e-02 -7.0457488298416138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2177 -1.1917110532522202e-03</internalNodes>\n          <leafValues>\n            1.8404430150985718e-01 -5.0144620239734650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2178 4.0988530963659286e-04</internalNodes>\n          <leafValues>\n            -9.7399666905403137e-02 1.0874579846858978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2179 4.5295488089323044e-03</internalNodes>\n          <leafValues>\n            4.5356839895248413e-02 -2.1069140732288361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2180 -5.4893731139600277e-03</internalNodes>\n          <leafValues>\n            2.9642790555953979e-01 -3.5870831459760666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2181 1.9906361121684313e-03</internalNodes>\n          <leafValues>\n            3.4332871437072754e-02 -3.1506469845771790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2182 8.3358466625213623e-02</internalNodes>\n          <leafValues>\n            1.9684519618749619e-02 -4.4279980659484863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2183 3.0363420955836773e-03</internalNodes>\n          <leafValues>\n            -3.3693831413984299e-02 2.6669681072235107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2184 5.7799968868494034e-02</internalNodes>\n          <leafValues>\n            8.5875885561108589e-03 -9.8965817689895630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2185 -7.8585641458630562e-03</internalNodes>\n          <leafValues>\n            2.0088459551334381e-01 -4.6583641320466995e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2186 1.9253200152888894e-03</internalNodes>\n          <leafValues>\n            4.7922369092702866e-02 -2.2640110552310944e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2187 1.0996909812092781e-02</internalNodes>\n          <leafValues>\n            1.6258660703897476e-02 -5.4048168659210205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2188 1.6405170026700944e-04</internalNodes>\n          <leafValues>\n            -1.1542510241270065e-01 7.6001413166522980e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2189 5.3780381567776203e-03</internalNodes>\n          <leafValues>\n            1.1179029941558838e-01 -8.4179848432540894e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2190 2.2905960213392973e-03</internalNodes>\n          <leafValues>\n            -5.7969480752944946e-02 1.6899429261684418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2191 6.3102580606937408e-03</internalNodes>\n          <leafValues>\n            4.1471399366855621e-02 -2.0478209853172302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2192 -1.4342570304870605e-01</internalNodes>\n          <leafValues>\n            -7.8573477268218994e-01 1.1634309776127338e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2193 1.2364640133455396e-03</internalNodes>\n          <leafValues>\n            -5.1800731569528580e-02 1.7734350264072418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2194 -2.0046550780534744e-02</internalNodes>\n          <leafValues>\n            -3.1420910358428955e-01 2.8849070891737938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2195 1.0868109762668610e-01</internalNodes>\n          <leafValues>\n            1.6183530911803246e-02 -5.1956307888031006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2196 5.1173489540815353e-02</internalNodes>\n          <leafValues>\n            -3.2460309565067291e-02 3.1230181455612183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2197 1.3251069933176041e-02</internalNodes>\n          <leafValues>\n            2.3655060678720474e-02 -4.4210249185562134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2198 -2.0110961049795151e-03</internalNodes>\n          <leafValues>\n            1.0359399765729904e-01 -9.3961462378501892e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2199 -3.2843051012605429e-03</internalNodes>\n          <leafValues>\n            3.3196929097175598e-01 -2.9921280220150948e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2200 8.8341237278655171e-04</internalNodes>\n          <leafValues>\n            5.9891819953918457e-02 -1.6192750632762909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2201 8.4265992045402527e-03</internalNodes>\n          <leafValues>\n            -3.6928750574588776e-02 2.3691199719905853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2202 -1.4503750207950361e-05</internalNodes>\n          <leafValues>\n            7.7373847365379333e-02 -1.3290609419345856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2203 8.0891689285635948e-03</internalNodes>\n          <leafValues>\n            2.8817569836974144e-02 -3.0961230397224426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2204 1.0339939966797829e-02</internalNodes>\n          <leafValues>\n            -2.4850569665431976e-02 3.7060049176216125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2205 -2.2790539078414440e-03</internalNodes>\n          <leafValues>\n            -2.2051370143890381e-01 4.1877530515193939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2206 -1.7716860165819526e-03</internalNodes>\n          <leafValues>\n            1.4205080270767212e-01 -6.5252363681793213e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2207 -6.9317207671701908e-03</internalNodes>\n          <leafValues>\n            -3.3556079864501953e-01 2.7605969458818436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2208 -4.2506060563027859e-03</internalNodes>\n          <leafValues>\n            2.3591980338096619e-01 -3.7345319986343384e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2209 1.5317599754780531e-03</internalNodes>\n          <leafValues>\n            3.9657011628150940e-02 -2.3438200354576111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2210 1.4941049739718437e-03</internalNodes>\n          <leafValues>\n            -6.0311999171972275e-02 1.4468440413475037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2211 -5.2249869331717491e-03</internalNodes>\n          <leafValues>\n            -4.0660250186920166e-01 2.3257270455360413e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2212 6.4759532688185573e-04</internalNodes>\n          <leafValues>\n            6.4828239381313324e-02 -1.2987309694290161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2213 3.2836120226420462e-04</internalNodes>\n          <leafValues>\n            6.1917629092931747e-02 -1.4835810661315918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2214 -3.4691279288381338e-03</internalNodes>\n          <leafValues>\n            1.5662840008735657e-01 -5.7200349867343903e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2215 4.5903379213996232e-04</internalNodes>\n          <leafValues>\n            5.2517898380756378e-02 -1.9093179702758789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2216 -2.6641879230737686e-03</internalNodes>\n          <leafValues>\n            1.5235909819602966e-01 -6.8154700100421906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2217 -8.2513149827718735e-03</internalNodes>\n          <leafValues>\n            3.6680310964584351e-01 -2.8480609878897667e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2218 7.1076201274991035e-03</internalNodes>\n          <leafValues>\n            1.5445350110530853e-01 -6.7992970347404480e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2219 -4.3808001279830933e-01</internalNodes>\n          <leafValues>\n            -2.8871530294418335e-01 3.6639489233493805e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2220 6.3719082390889525e-04</internalNodes>\n          <leafValues>\n            -1.5995030105113983e-01 5.9860341250896454e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2221 -1.9303169392514974e-04</internalNodes>\n          <leafValues>\n            8.6703971028327942e-02 -1.0924819856882095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2222 3.0723758973181248e-03</internalNodes>\n          <leafValues>\n            4.8543959856033325e-02 -1.7700059711933136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2223 1.8341860268265009e-03</internalNodes>\n          <leafValues>\n            -5.1901239901781082e-02 1.8232129514217377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2224 6.3172310590744019e-02</internalNodes>\n          <leafValues>\n            2.3308899253606796e-02 -4.2870610952377319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2225 2.4458649568259716e-03</internalNodes>\n          <leafValues>\n            -8.6425289511680603e-02 1.1974500119686127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2226 1.1953969951719046e-03</internalNodes>\n          <leafValues>\n            1.1685889959335327e-01 -1.0430490225553513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2227 3.1024610507301986e-04</internalNodes>\n          <leafValues>\n            6.2281988561153412e-02 -1.9196020066738129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2228 -3.1970158219337463e-02</internalNodes>\n          <leafValues>\n            -6.4184898138046265e-01 1.3087569735944271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2229 -1.0163170518353581e-03</internalNodes>\n          <leafValues>\n            -2.5210660696029663e-01 3.4096211194992065e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2230 -5.1776540931314230e-04</internalNodes>\n          <leafValues>\n            1.1874090135097504e-01 -8.2813777029514313e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2231 -4.0794219821691513e-03</internalNodes>\n          <leafValues>\n            -1.6135309636592865e-01 6.5708972513675690e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2232 9.9409874528646469e-03</internalNodes>\n          <leafValues>\n            -3.0160220339894295e-02 3.5104531049728394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2233 1.9788760691881180e-03</internalNodes>\n          <leafValues>\n            -4.4945359230041504e-02 2.3295649886131287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2234 1.0975249856710434e-01</internalNodes>\n          <leafValues>\n            1.6620220616459846e-02 -6.0423362255096436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2235 -9.2024728655815125e-03</internalNodes>\n          <leafValues>\n            -5.6000357866287231e-01 1.4122909866273403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2236 5.8626191457733512e-04</internalNodes>\n          <leafValues>\n            -1.0622119903564453e-01 8.4198087453842163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2237 3.3601750619709492e-03</internalNodes>\n          <leafValues>\n            -2.1583529189229012e-02 4.1820129752159119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2238 -4.8143669962882996e-02</internalNodes>\n          <leafValues>\n            -7.2092157602310181e-01 1.4954459853470325e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2239 1.2209859676659107e-02</internalNodes>\n          <leafValues>\n            2.1544290706515312e-02 -3.5482150316238403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2240 -3.9961449801921844e-02</internalNodes>\n          <leafValues>\n            -8.8848268985748291e-01 9.4328429549932480e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2241 1.5312479808926582e-03</internalNodes>\n          <leafValues>\n            -6.4070880413055420e-02 1.3569630682468414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2242 8.9791123173199594e-05</internalNodes>\n          <leafValues>\n            5.0932768732309341e-02 -1.8393670022487640e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>195</maxWeakCount>\n      <stageThreshold>-1.3934370279312134e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2243 -3.8741368800401688e-02</internalNodes>\n          <leafValues>\n            2.8778830170631409e-01 -2.3312190175056458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2244 -2.5511500425636768e-03</internalNodes>\n          <leafValues>\n            2.5108599662780762e-01 -2.1116070449352264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2245 -2.7973129181191325e-04</internalNodes>\n          <leafValues>\n            8.9916922152042389e-02 -3.4069269895553589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2246 1.1981100542470813e-03</internalNodes>\n          <leafValues>\n            -2.2542229294776917e-01 1.3602660596370697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2247 -5.6686070747673512e-03</internalNodes>\n          <leafValues>\n            8.2847259938716888e-02 -2.8080710768699646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2248 -2.7642669738270342e-04</internalNodes>\n          <leafValues>\n            1.0485479980707169e-01 -1.8848650157451630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2249 2.0516710355877876e-03</internalNodes>\n          <leafValues>\n            3.4714280627667904e-03 -4.8608478903770447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2250 -1.4435249795496929e-05</internalNodes>\n          <leafValues>\n            8.4275819361209869e-02 -1.9356100261211395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2251 7.4418791336938739e-04</internalNodes>\n          <leafValues>\n            -1.2526750564575195e-01 1.1769519746303558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2252 -4.9923241138458252e-02</internalNodes>\n          <leafValues>\n            -4.0080299973487854e-01 2.7910390868782997e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2253 9.2694535851478577e-03</internalNodes>\n          <leafValues>\n            -9.1088913381099701e-02 1.7550450563430786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2254 -7.4646030552685261e-03</internalNodes>\n          <leafValues>\n            1.6380469501018524e-01 -1.0385499894618988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2255 -8.1985909491777420e-03</internalNodes>\n          <leafValues>\n            -1.9168980419635773e-01 8.5415020585060120e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2256 -8.1690691877156496e-04</internalNodes>\n          <leafValues>\n            -3.0793309211730957e-01 4.0833581238985062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2257 2.8902110643684864e-03</internalNodes>\n          <leafValues>\n            -5.0324201583862305e-02 2.9259419441223145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2258 8.0008199438452721e-03</internalNodes>\n          <leafValues>\n            -4.6863578259944916e-02 3.1964871287345886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2259 -5.8349180035293102e-03</internalNodes>\n          <leafValues>\n            -1.5489180386066437e-01 8.8137261569499969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2260 -1.2492289533838630e-03</internalNodes>\n          <leafValues>\n            -3.6294621229171753e-01 3.6120988428592682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2261 2.2950479760766029e-02</internalNodes>\n          <leafValues>\n            -4.7119770199060440e-02 2.8532719612121582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2262 -6.9193239323794842e-03</internalNodes>\n          <leafValues>\n            1.7873649299144745e-01 -7.3547556996345520e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2263 -1.9392240210436285e-04</internalNodes>\n          <leafValues>\n            1.3911420106887817e-01 -9.2489100992679596e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2264 1.9811228848993778e-03</internalNodes>\n          <leafValues>\n            4.3448008596897125e-02 -3.0942690372467041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2265 1.6018489375710487e-02</internalNodes>\n          <leafValues>\n            -3.9718918502330780e-02 3.4248939156532288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2266 9.3541406095027924e-03</internalNodes>\n          <leafValues>\n            3.2482650130987167e-02 -4.4502100348472595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2267 -1.3822780456393957e-03</internalNodes>\n          <leafValues>\n            2.1627070009708405e-01 -5.6410200893878937e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2268 2.5065820664167404e-02</internalNodes>\n          <leafValues>\n            2.3123230785131454e-02 -5.3954011201858521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2269 5.9798579663038254e-02</internalNodes>\n          <leafValues>\n            2.8747579082846642e-02 -3.6572590470314026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2270 -2.7519159484654665e-03</internalNodes>\n          <leafValues>\n            1.7491349577903748e-01 -6.3990972936153412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2271 -3.2093640416860580e-02</internalNodes>\n          <leafValues>\n            -2.5695550441741943e-01 4.0945108979940414e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2272 -2.3349749390035868e-03</internalNodes>\n          <leafValues>\n            1.5433880686759949e-01 -7.2836689651012421e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2273 2.6897678617388010e-04</internalNodes>\n          <leafValues>\n            7.2721242904663086e-02 -1.5513220429420471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2274 -8.9813407976180315e-04</internalNodes>\n          <leafValues>\n            -2.0699620246887207e-01 5.3738221526145935e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2275 3.8521869573742151e-03</internalNodes>\n          <leafValues>\n            3.6562010645866394e-02 -2.8075969219207764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2276 1.3440090231597424e-02</internalNodes>\n          <leafValues>\n            -3.6046478897333145e-02 3.1876960396766663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2277 7.7129118144512177e-03</internalNodes>\n          <leafValues>\n            9.5960013568401337e-02 -1.1787489801645279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2278 2.1991880203131586e-04</internalNodes>\n          <leafValues>\n            -1.3249869644641876e-01 8.4939576685428619e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2279 -7.4781170114874840e-03</internalNodes>\n          <leafValues>\n            -2.3073039948940277e-01 5.0310928374528885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2280 8.9175272732973099e-03</internalNodes>\n          <leafValues>\n            -5.3924769163131714e-02 2.0320640504360199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2281 2.2819850128144026e-03</internalNodes>\n          <leafValues>\n            3.5264909267425537e-02 -3.0841338634490967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2282 2.6413009036332369e-03</internalNodes>\n          <leafValues>\n            -3.2939229160547256e-02 3.1721460819244385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2283 -1.4605689793825150e-03</internalNodes>\n          <leafValues>\n            -1.7154279351234436e-01 6.3374556601047516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2284 -3.1993410084396601e-03</internalNodes>\n          <leafValues>\n            3.4501680731773376e-01 -3.0717490240931511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2285 2.3919229861348867e-03</internalNodes>\n          <leafValues>\n            2.0887520164251328e-02 -4.8564168810844421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2286 -3.5997610539197922e-03</internalNodes>\n          <leafValues>\n            2.8900530934333801e-01 -3.5605821758508682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2287 -1.4754279618500732e-05</internalNodes>\n          <leafValues>\n            7.2744622826576233e-02 -1.4580619335174561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2288 1.5968360006809235e-02</internalNodes>\n          <leafValues>\n            1.2548550032079220e-02 -6.7445451021194458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2289 -4.0752082131803036e-03</internalNodes>\n          <leafValues>\n            3.1447470188140869e-01 -3.2155450433492661e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2290 7.5432872108649462e-05</internalNodes>\n          <leafValues>\n            -9.9738657474517822e-02 8.9665092527866364e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2291 -3.9632249623537064e-02</internalNodes>\n          <leafValues>\n            2.7617400884628296e-01 -3.4800730645656586e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2292 2.9354610887821764e-05</internalNodes>\n          <leafValues>\n            -1.4023000001907349e-01 8.8519610464572906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2293 3.1818989664316177e-02</internalNodes>\n          <leafValues>\n            2.9925649985671043e-02 -3.3958339691162109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2294 1.2690100073814392e-01</internalNodes>\n          <leafValues>\n            1.1263390071690083e-02 -8.9932328462600708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2295 -3.5952320322394371e-03</internalNodes>\n          <leafValues>\n            1.7751759290695190e-01 -5.8113489300012589e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2296 -1.9231259822845459e-02</internalNodes>\n          <leafValues>\n            -3.3173981308937073e-01 4.0587101131677628e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2297 2.2836721036583185e-03</internalNodes>\n          <leafValues>\n            3.7206009030342102e-02 -2.8370648622512817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2298 -1.6381660243496299e-03</internalNodes>\n          <leafValues>\n            1.4629170298576355e-01 -6.7781522870063782e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2299 2.1173330023884773e-03</internalNodes>\n          <leafValues>\n            2.0773969590663910e-02 -4.3928679823875427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2300 6.4710620790719986e-03</internalNodes>\n          <leafValues>\n            -7.2133928537368774e-02 1.3981610536575317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2301 -3.1431620009243488e-03</internalNodes>\n          <leafValues>\n            -1.9903449714183807e-01 4.7544669359922409e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2302 1.6056640306487679e-03</internalNodes>\n          <leafValues>\n            -3.9751898497343063e-02 2.5931739807128906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2303 4.8740832135081291e-03</internalNodes>\n          <leafValues>\n            3.4082379192113876e-02 -2.7611988782882690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2304 -9.6354109700769186e-05</internalNodes>\n          <leafValues>\n            -1.0709609836339951e-01 8.3503186702728271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2305 7.7706458978354931e-03</internalNodes>\n          <leafValues>\n            -3.0095349997282028e-02 2.9493871331214905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2306 1.3028859393671155e-04</internalNodes>\n          <leafValues>\n            -1.1232890188694000e-01 9.4578683376312256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2307 1.2239719508215785e-03</internalNodes>\n          <leafValues>\n            5.1999621093273163e-02 -1.8106269836425781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2308 -8.7549741147086024e-04</internalNodes>\n          <leafValues>\n            1.4276699721813202e-01 -7.5098946690559387e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2309 -8.8081993162631989e-02</internalNodes>\n          <leafValues>\n            -7.0848828554153442e-01 1.4353640377521515e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2310 -3.2854160666465759e-01</internalNodes>\n          <leafValues>\n            -4.9687421321868896e-01 1.6604600474238396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2311 9.8696127533912659e-03</internalNodes>\n          <leafValues>\n            1.9364370033144951e-02 -4.9978300929069519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2312 -2.7273639570921659e-03</internalNodes>\n          <leafValues>\n            2.9612520337104797e-01 -3.2831400632858276e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2313 9.9100142717361450e-02</internalNodes>\n          <leafValues>\n            1.9799079746007919e-02 -4.7344958782196045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2314 -6.3501899130642414e-03</internalNodes>\n          <leafValues>\n            -5.1504719257354736e-01 1.6986010596156120e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2315 2.9596920285257511e-05</internalNodes>\n          <leafValues>\n            -1.0923019796609879e-01 8.9656107127666473e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2316 2.1247670054435730e-02</internalNodes>\n          <leafValues>\n            -4.1462190449237823e-02 2.2684270143508911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2317 -7.2977989912033081e-02</internalNodes>\n          <leafValues>\n            -6.3227838277816772e-01 1.6678869724273682e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2318 1.6230919957160950e-01</internalNodes>\n          <leafValues>\n            -2.5661909952759743e-02 3.7533140182495117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2319 -1.4590819773729891e-05</internalNodes>\n          <leafValues>\n            8.5613600909709930e-02 -1.1900989711284637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2320 2.7719149366021156e-03</internalNodes>\n          <leafValues>\n            -5.4649248719215393e-02 2.0311379432678223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2321 -8.7484354153275490e-03</internalNodes>\n          <leafValues>\n            -7.3674517869949341e-01 1.5571890398859978e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2322 1.3679199852049351e-02</internalNodes>\n          <leafValues>\n            7.8902930021286011e-02 -1.1590500175952911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2323 -1.1001150123775005e-02</internalNodes>\n          <leafValues>\n            3.1690821051597595e-01 -3.2384991645812988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2324 3.2964799902401865e-04</internalNodes>\n          <leafValues>\n            5.0016529858112335e-02 -2.0451450347900391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2325 2.7753270696848631e-03</internalNodes>\n          <leafValues>\n            -6.7407429218292236e-02 1.5935909748077393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2326 -2.8740249108523130e-03</internalNodes>\n          <leafValues>\n            2.2455960512161255e-01 -5.1031488925218582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2327 8.1631669308990240e-04</internalNodes>\n          <leafValues>\n            6.9849550724029541e-02 -1.4791619777679443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2328 3.7573580630123615e-03</internalNodes>\n          <leafValues>\n            3.1594600528478622e-02 -3.1387978792190552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2329 -3.4902389161288738e-03</internalNodes>\n          <leafValues>\n            1.1638429760932922e-01 -8.5947930812835693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2330 -2.9415320605039597e-02</internalNodes>\n          <leafValues>\n            6.8403428792953491e-01 -1.6140609979629517e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2331 -8.8095385581254959e-03</internalNodes>\n          <leafValues>\n            -2.0775319635868073e-01 4.9950890243053436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2332 -1.5459939837455750e-02</internalNodes>\n          <leafValues>\n            -4.8748460412025452e-01 2.0065559074282646e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2333 -3.6481369286775589e-02</internalNodes>\n          <leafValues>\n            -5.2395141124725342e-01 1.5850989148020744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2334 -8.8937362306751311e-05</internalNodes>\n          <leafValues>\n            -1.3299320638179779e-01 6.6926807165145874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2335 1.4536709932144731e-04</internalNodes>\n          <leafValues>\n            8.7170369923114777e-02 -1.0435820370912552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2336 1.5216879546642303e-01</internalNodes>\n          <leafValues>\n            1.6140580177307129e-02 -6.4970171451568604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2337 -4.2344830580987036e-04</internalNodes>\n          <leafValues>\n            1.8045839667320251e-01 -5.2974540740251541e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2338 1.0672640055418015e-03</internalNodes>\n          <leafValues>\n            2.0548380911350250e-02 -4.8242041468620300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2339 1.5491680242121220e-02</internalNodes>\n          <leafValues>\n            -5.1540851593017578e-02 1.8363960087299347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2340 6.1393307987600565e-04</internalNodes>\n          <leafValues>\n            2.9983729124069214e-02 -3.1031700968742371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2341 -1.4619939975091256e-05</internalNodes>\n          <leafValues>\n            1.0368499904870987e-01 -9.1634131968021393e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2342 6.9900648668408394e-03</internalNodes>\n          <leafValues>\n            1.4683909714221954e-02 -5.9485381841659546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2343 -5.3000110201537609e-03</internalNodes>\n          <leafValues>\n            -1.2457770109176636e-01 7.0542782545089722e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2344 5.0289987120777369e-04</internalNodes>\n          <leafValues>\n            -7.7135689556598663e-02 1.2228710204362869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2345 1.1190979741513729e-02</internalNodes>\n          <leafValues>\n            5.0308059900999069e-02 -1.8091809749603271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2346 1.7019819468259811e-02</internalNodes>\n          <leafValues>\n            -3.8816768676042557e-02 3.0851981043815613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2347 -5.8241572696715593e-04</internalNodes>\n          <leafValues>\n            1.2537799775600433e-01 -7.6115481555461884e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2348 2.0036669448018074e-02</internalNodes>\n          <leafValues>\n            4.9899481236934662e-02 -1.8082989752292633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2349 -5.4328818805515766e-03</internalNodes>\n          <leafValues>\n            2.3409770429134369e-01 -4.2385410517454147e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2350 -2.9535360226873308e-05</internalNodes>\n          <leafValues>\n            5.7630240917205811e-02 -1.5753529965877533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2351 -1.0352370142936707e-01</internalNodes>\n          <leafValues>\n            7.1587741374969482e-01 -1.2989929877221584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2352 -1.2122269719839096e-02</internalNodes>\n          <leafValues>\n            -1.4788970351219177e-01 6.6566437482833862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2353 3.0254870653152466e-03</internalNodes>\n          <leafValues>\n            -5.4378628730773926e-02 1.7140829563140869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2354 -5.8111078105866909e-03</internalNodes>\n          <leafValues>\n            2.4422149360179901e-01 -5.7652641087770462e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2355 8.2830740138888359e-03</internalNodes>\n          <leafValues>\n            2.2720400243997574e-02 -4.2961999773979187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2356 1.2375120073556900e-02</internalNodes>\n          <leafValues>\n            2.2810289636254311e-02 -3.7505629658699036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2357 1.9211210310459137e-02</internalNodes>\n          <leafValues>\n            1.1791059747338295e-02 -6.5529459714889526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2358 3.1843129545450211e-04</internalNodes>\n          <leafValues>\n            6.4130060374736786e-02 -1.3995569944381714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2359 8.4224628517404199e-04</internalNodes>\n          <leafValues>\n            -5.4134279489517212e-02 1.7525580525398254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2360 -1.6085049510002136e-01</internalNodes>\n          <leafValues>\n            -9.4571417570114136e-01 7.8549478203058243e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2361 -1.6774870455265045e-03</internalNodes>\n          <leafValues>\n            -1.9166129827499390e-01 4.5787028968334198e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2362 -1.8989649834111333e-03</internalNodes>\n          <leafValues>\n            1.5783150494098663e-01 -6.5896913409233093e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2363 4.0205760160461068e-04</internalNodes>\n          <leafValues>\n            -7.3599092662334442e-02 1.3118380308151245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2364 2.4369959719479084e-03</internalNodes>\n          <leafValues>\n            2.3522870615124702e-02 -4.2745968699455261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2365 -2.8488409952842630e-05</internalNodes>\n          <leafValues>\n            6.3280619680881500e-02 -1.3599009811878204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2366 1.9538639113306999e-02</internalNodes>\n          <leafValues>\n            -2.1458270028233528e-02 4.7534748911857605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2367 -1.6530340071767569e-03</internalNodes>\n          <leafValues>\n            -1.5323260426521301e-01 5.9455979615449905e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2368 -2.1052840165793896e-03</internalNodes>\n          <leafValues>\n            1.1017639935016632e-01 -8.3118103444576263e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2369 -4.5266482047736645e-03</internalNodes>\n          <leafValues>\n            2.5815379619598389e-01 -3.5743940621614456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2370 -1.6275560483336449e-04</internalNodes>\n          <leafValues>\n            -1.3548290729522705e-01 6.9295726716518402e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2371 -3.3048219047486782e-03</internalNodes>\n          <leafValues>\n            1.7806029319763184e-01 -5.2156440913677216e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2372 -5.1905210129916668e-03</internalNodes>\n          <leafValues>\n            -3.4897321462631226e-01 2.5990990921854973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2373 1.1190810054540634e-01</internalNodes>\n          <leafValues>\n            2.9962029308080673e-02 -2.9597550630569458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2374 -5.2873138338327408e-03</internalNodes>\n          <leafValues>\n            1.8564499914646149e-01 -5.0216298550367355e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2375 2.6098049711436033e-03</internalNodes>\n          <leafValues>\n            -7.3559276759624481e-02 1.4365130662918091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2376 -2.8581928927451372e-03</internalNodes>\n          <leafValues>\n            -1.2605139613151550e-01 7.5433082878589630e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2377 -2.9555680157500319e-05</internalNodes>\n          <leafValues>\n            1.0733310133218765e-01 -1.0386200249195099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2378 5.9023561334470287e-05</internalNodes>\n          <leafValues>\n            -1.3029119372367859e-01 7.6478391885757446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2379 -4.3344721198081970e-02</internalNodes>\n          <leafValues>\n            -6.9299221038818359e-01 1.4173300005495548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2380 -4.6946998685598373e-02</internalNodes>\n          <leafValues>\n            -5.5803751945495605e-01 1.2422920204699039e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2381 -1.5189060010015965e-02</internalNodes>\n          <leafValues>\n            3.7049770355224609e-01 -2.5564119219779968e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2382 1.6361879184842110e-02</internalNodes>\n          <leafValues>\n            2.7049979194998741e-02 -3.4278920292854309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2383 4.0752839297056198e-02</internalNodes>\n          <leafValues>\n            9.3995258212089539e-03 -8.8683712482452393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2384 -1.0879869572818279e-02</internalNodes>\n          <leafValues>\n            5.3260582685470581e-01 -1.9450860098004341e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2385 -7.7538257755804807e-05</internalNodes>\n          <leafValues>\n            -1.1696249991655350e-01 7.7288232743740082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2386 -4.0953079587779939e-04</internalNodes>\n          <leafValues>\n            1.6214360296726227e-01 -5.3711488842964172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2387 -1.8464239314198494e-02</internalNodes>\n          <leafValues>\n            -5.0844788551330566e-01 1.9838189706206322e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2388 -5.6788129732012749e-03</internalNodes>\n          <leafValues>\n            3.0203920602798462e-01 -3.0203990638256073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2389 3.8324110209941864e-04</internalNodes>\n          <leafValues>\n            -1.6841089725494385e-01 5.4902028292417526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2390 6.4761550165712833e-03</internalNodes>\n          <leafValues>\n            9.5140263438224792e-02 -1.0746160149574280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2391 -2.4377859663218260e-03</internalNodes>\n          <leafValues>\n            -1.5647719800472260e-01 6.3407607376575470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2392 5.4156291298568249e-04</internalNodes>\n          <leafValues>\n            -6.5962299704551697e-02 1.8441629409790039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2393 2.7917029336094856e-02</internalNodes>\n          <leafValues>\n            -2.7590230107307434e-02 3.5032740235328674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2394 4.6622849185951054e-04</internalNodes>\n          <leafValues>\n            4.9628820270299911e-02 -2.2624179720878601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2395 -3.7316799163818359e-02</internalNodes>\n          <leafValues>\n            -4.2978170514106750e-01 2.1337680518627167e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2396 -2.6047111023217440e-03</internalNodes>\n          <leafValues>\n            3.6650991439819336e-01 -2.5405049324035645e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2397 5.1927138119935989e-03</internalNodes>\n          <leafValues>\n            2.6877930387854576e-02 -3.3478578925132751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2398 3.0462879221886396e-03</internalNodes>\n          <leafValues>\n            -3.0848290771245956e-02 2.9788359999656677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2399 -4.1325599886476994e-04</internalNodes>\n          <leafValues>\n            7.2986789047718048e-02 -1.2147530168294907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2400 -1.1456120014190674e-01</internalNodes>\n          <leafValues>\n            3.1955468654632568e-01 -3.3379800617694855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2401 -1.3044059742242098e-03</internalNodes>\n          <leafValues>\n            -2.0625290274620056e-01 5.4634369909763336e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2402 4.5045089791528881e-05</internalNodes>\n          <leafValues>\n            -1.1376550048589706e-01 7.8123383224010468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2403 1.8890319624915719e-03</internalNodes>\n          <leafValues>\n            -6.5578728914260864e-02 1.7001299560070038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2404 -5.4107961477711797e-04</internalNodes>\n          <leafValues>\n            -1.8184140324592590e-01 5.1611810922622681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2405 4.4150161556899548e-03</internalNodes>\n          <leafValues>\n            -3.6324780434370041e-02 2.4938449263572693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2406 -2.1878050640225410e-02</internalNodes>\n          <leafValues>\n            -1.7643679678440094e-01 5.4811108857393265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2407 -2.0328219980001450e-03</internalNodes>\n          <leafValues>\n            9.4266183674335480e-02 -9.7129411995410919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2408 2.6754371356219053e-04</internalNodes>\n          <leafValues>\n            5.7487931102514267e-02 -1.5442019701004028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2409 1.4061420224606991e-03</internalNodes>\n          <leafValues>\n            -5.0268959254026413e-02 1.8814170360565186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2410 2.0725419744849205e-04</internalNodes>\n          <leafValues>\n            7.7659189701080322e-02 -1.2538130581378937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2411 1.8001600401476026e-03</internalNodes>\n          <leafValues>\n            -4.2675640434026718e-02 2.2430649399757385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2412 -4.6744230203330517e-03</internalNodes>\n          <leafValues>\n            -3.3480471372604370e-01 2.9364420101046562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2413 7.2110369801521301e-03</internalNodes>\n          <leafValues>\n            -5.2441328763961792e-02 1.8891569972038269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2414 2.3627521004527807e-03</internalNodes>\n          <leafValues>\n            3.4400060772895813e-02 -2.7200448513031006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2415 -1.3181479880586267e-03</internalNodes>\n          <leafValues>\n            1.7767719924449921e-01 -5.6363631039857864e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2416 -1.7586319881957024e-04</internalNodes>\n          <leafValues>\n            9.1534242033958435e-02 -1.0412310063838959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2417 -2.5801590527407825e-04</internalNodes>\n          <leafValues>\n            -1.1226779967546463e-01 8.1381812691688538e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2418 9.6790950919967145e-05</internalNodes>\n          <leafValues>\n            -1.1881929636001587e-01 7.1883186697959900e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2419 8.2001117989420891e-03</internalNodes>\n          <leafValues>\n            -4.0254529565572739e-02 2.2790899872779846e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2420 -6.7277951166033745e-04</internalNodes>\n          <leafValues>\n            -7.0979103446006775e-02 1.2775769829750061e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2421 3.7424470065161586e-04</internalNodes>\n          <leafValues>\n            6.7096449434757233e-02 -1.3645760715007782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2422 2.5741120334714651e-03</internalNodes>\n          <leafValues>\n            -5.4319828748703003e-02 1.6720260679721832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2423 4.3884690967388451e-04</internalNodes>\n          <leafValues>\n            8.2114033401012421e-02 -1.1024679988622665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2424 -4.8180628567934036e-02</internalNodes>\n          <leafValues>\n            -7.2217732667922974e-01 1.2223210185766220e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2425 9.9836904555559158e-03</internalNodes>\n          <leafValues>\n            1.2195640243589878e-02 -6.7448061704635620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2426 -1.2344559654593468e-03</internalNodes>\n          <leafValues>\n            1.7145380377769470e-01 -5.5381339043378830e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2427 -2.7302911039441824e-03</internalNodes>\n          <leafValues>\n            -1.3044339418411255e-01 7.4266709387302399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2428 5.5562541820108891e-04</internalNodes>\n          <leafValues>\n            -1.0187319666147232e-01 1.0454159975051880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2429 1.5140359755605459e-03</internalNodes>\n          <leafValues>\n            8.2843840122222900e-02 -1.1898560076951981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2430 -7.2555973019916564e-05</internalNodes>\n          <leafValues>\n            -1.2512299418449402e-01 7.1132406592369080e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2431 -2.4981278693303466e-04</internalNodes>\n          <leafValues>\n            -1.3125610351562500e-01 6.8963102996349335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2432 -6.0206428170204163e-03</internalNodes>\n          <leafValues>\n            2.1284450590610504e-01 -4.7603111714124680e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2433 -7.2469102451577783e-04</internalNodes>\n          <leafValues>\n            1.0499659925699234e-01 -8.5549630224704742e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2434 6.3740357290953398e-04</internalNodes>\n          <leafValues>\n            5.4655481129884720e-02 -1.7353290319442749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2435 1.0901190340518951e-02</internalNodes>\n          <leafValues>\n            -5.2832279354333878e-02 1.8752649426460266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2436 7.0734010078012943e-03</internalNodes>\n          <leafValues>\n            6.2958806753158569e-02 -1.6468439996242523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2437 1.3333789538592100e-03</internalNodes>\n          <leafValues>\n            -1.2590870261192322e-01 9.4716809689998627e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>171</maxWeakCount>\n      <stageThreshold>-1.2739679813385010e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2438 6.2053989619016647e-02</internalNodes>\n          <leafValues>\n            -2.5427028536796570e-01 2.3591099679470062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2439 5.9534627944231033e-03</internalNodes>\n          <leafValues>\n            -2.2544360160827637e-01 1.7751939594745636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2440 7.2477371431887150e-03</internalNodes>\n          <leafValues>\n            -1.1398050189018250e-01 2.7556711435317993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2441 -2.2824530024081469e-03</internalNodes>\n          <leafValues>\n            8.6277678608894348e-02 -3.1412398815155029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2442 1.1776019819080830e-02</internalNodes>\n          <leafValues>\n            -6.2360338866710663e-02 3.4443479776382446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2443 4.3855342082679272e-03</internalNodes>\n          <leafValues>\n            1.8105769529938698e-02 -5.0128728151321411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2444 1.5859069302678108e-02</internalNodes>\n          <leafValues>\n            -7.8765146434307098e-02 2.6402598619461060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2445 3.0654110014438629e-03</internalNodes>\n          <leafValues>\n            3.3250238746404648e-02 -4.3427819013595581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2446 2.5912460405379534e-03</internalNodes>\n          <leafValues>\n            4.0578570216894150e-02 -4.9658200144767761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2447 3.0834769131615758e-04</internalNodes>\n          <leafValues>\n            -1.4615769684314728e-01 1.2339019775390625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2448 -2.4314899928867817e-03</internalNodes>\n          <leafValues>\n            7.2739332914352417e-02 -1.9999310374259949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2449 -1.8934230320155621e-03</internalNodes>\n          <leafValues>\n            -2.3373599350452423e-01 5.6464370340108871e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2450 4.4724289327859879e-03</internalNodes>\n          <leafValues>\n            4.7042880207300186e-02 -3.1258741021156311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2451 1.5810050535947084e-04</internalNodes>\n          <leafValues>\n            -1.3098309934139252e-01 1.0137090086936951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2452 1.8755989149212837e-02</internalNodes>\n          <leafValues>\n            -3.8183789700269699e-02 3.7149110436439514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2453 -7.4876967119053006e-04</internalNodes>\n          <leafValues>\n            1.9981959462165833e-01 -6.0278389602899551e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2454 -9.3861011555418372e-04</internalNodes>\n          <leafValues>\n            8.7467707693576813e-02 -1.6001270711421967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2455 -1.3442989438772202e-03</internalNodes>\n          <leafValues>\n            -3.3072051405906677e-01 3.6564111709594727e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2456 -1.1384190293028951e-03</internalNodes>\n          <leafValues>\n            -2.0630060136318207e-01 5.6614480912685394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2457 2.5966269895434380e-03</internalNodes>\n          <leafValues>\n            -6.2676019966602325e-02 1.9195850193500519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2458 1.2499650474637747e-03</internalNodes>\n          <leafValues>\n            5.7390280067920685e-02 -1.9605259597301483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2459 1.1832700110971928e-03</internalNodes>\n          <leafValues>\n            -8.5788756608963013e-02 1.3682979345321655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2460 -5.1836138591170311e-03</internalNodes>\n          <leafValues>\n            3.1635698676109314e-01 -4.6736460179090500e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2461 -1.3185790181159973e-01</internalNodes>\n          <leafValues>\n            -6.2279629707336426e-01 1.8798090517520905e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2462 1.8653980223461986e-03</internalNodes>\n          <leafValues>\n            3.8837268948554993e-02 -3.0104321241378784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2463 7.3482480365782976e-04</internalNodes>\n          <leafValues>\n            -7.6612047851085663e-02 1.5002079308032990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2464 -1.5738410002086312e-04</internalNodes>\n          <leafValues>\n            -1.6588360071182251e-01 7.0020452141761780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2465 5.1779212662950158e-04</internalNodes>\n          <leafValues>\n            7.4801079928874969e-02 -1.6358199715614319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2466 7.5904270634055138e-03</internalNodes>\n          <leafValues>\n            -5.1050990819931030e-02 2.4487720429897308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2467 -1.1010250076651573e-02</internalNodes>\n          <leafValues>\n            -5.8380401134490967e-01 2.0622009411454201e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2468 1.1621849983930588e-01</internalNodes>\n          <leafValues>\n            2.5175059214234352e-02 -4.1262671351432800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2469 -7.4468040838837624e-04</internalNodes>\n          <leafValues>\n            1.2729789316654205e-01 -8.9675500988960266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2470 1.1765309609472752e-02</internalNodes>\n          <leafValues>\n            2.0906679332256317e-02 -5.3172761201858521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2471 -4.4441698119044304e-03</internalNodes>\n          <leafValues>\n            1.4282639324665070e-01 -7.8762412071228027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2472 -4.3369788909330964e-04</internalNodes>\n          <leafValues>\n            -2.2131459414958954e-01 5.4554950445890427e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2473 -1.9204010022804141e-03</internalNodes>\n          <leafValues>\n            -2.5610721111297607e-01 4.0600918233394623e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2474 -2.9081690590828657e-03</internalNodes>\n          <leafValues>\n            2.0206320285797119e-01 -5.6222829967737198e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2475 -1.4549949810316321e-05</internalNodes>\n          <leafValues>\n            9.0000502765178680e-02 -1.1770520359277725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2476 -5.3217669483274221e-04</internalNodes>\n          <leafValues>\n            -1.5299430489540100e-01 6.8925492465496063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2477 -1.4590179547667503e-02</internalNodes>\n          <leafValues>\n            2.1776519715785980e-01 -5.1850430667400360e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2478 -4.0213059401139617e-04</internalNodes>\n          <leafValues>\n            9.4017893075942993e-02 -1.1027640104293823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2479 -2.3089889436960220e-03</internalNodes>\n          <leafValues>\n            2.4792349338531494e-01 -5.7857040315866470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2480 3.1196139752864838e-04</internalNodes>\n          <leafValues>\n            -1.4021940529346466e-01 7.7247492969036102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2481 -9.1317007318139076e-03</internalNodes>\n          <leafValues>\n            4.0242809057235718e-01 -2.8953509405255318e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2482 4.2655199649743736e-04</internalNodes>\n          <leafValues>\n            5.3114388138055801e-02 -2.1355339884757996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2483 3.9956220425665379e-03</internalNodes>\n          <leafValues>\n            4.4066920876502991e-02 -2.2994419932365417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2484 -1.4012040337547660e-03</internalNodes>\n          <leafValues>\n            2.7106899023056030e-01 -4.5171830803155899e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2485 3.6064770072698593e-02</internalNodes>\n          <leafValues>\n            3.3628080040216446e-02 -3.2830131053924561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2486 -1.3408949598670006e-04</internalNodes>\n          <leafValues>\n            -1.3888040184974670e-01 8.0078050494194031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2487 -6.9480319507420063e-03</internalNodes>\n          <leafValues>\n            -3.9315450191497803e-01 2.7302930131554604e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2488 -1.4855440240353346e-03</internalNodes>\n          <leafValues>\n            1.9761669635772705e-01 -5.1562070846557617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2489 -1.3757539913058281e-02</internalNodes>\n          <leafValues>\n            -5.5620980262756348e-01 1.8301570788025856e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2490 8.4021147340536118e-03</internalNodes>\n          <leafValues>\n            1.3690480031073093e-02 -6.3171321153640747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2491 -1.7845979891717434e-04</internalNodes>\n          <leafValues>\n            -1.4535990357398987e-01 6.3921131193637848e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2492 -1.1326850391924381e-02</internalNodes>\n          <leafValues>\n            6.5870612859725952e-01 -1.6460629180073738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2493 1.5268150018528104e-03</internalNodes>\n          <leafValues>\n            -6.0389541089534760e-02 1.5454010665416718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2494 -6.0069989413022995e-03</internalNodes>\n          <leafValues>\n            2.5859731435775757e-01 -4.9466971307992935e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2495 -7.4241221882402897e-03</internalNodes>\n          <leafValues>\n            -3.8806110620498657e-01 2.9393190518021584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2496 -3.9992430247366428e-03</internalNodes>\n          <leafValues>\n            -1.3788199424743652e-01 7.7991880476474762e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2497 1.0202969860984012e-04</internalNodes>\n          <leafValues>\n            7.2710737586021423e-02 -1.7032580077648163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2498 4.0135599556379020e-04</internalNodes>\n          <leafValues>\n            -9.2788018286228180e-02 1.2305440008640289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2499 -9.7611807286739349e-03</internalNodes>\n          <leafValues>\n            -3.6630520224571228e-01 2.9748899862170219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2500 -3.0745539069175720e-01</internalNodes>\n          <leafValues>\n            -7.8651821613311768e-01 1.3058690354228020e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2501 -6.0231718234717846e-03</internalNodes>\n          <leafValues>\n            -5.0900238752365112e-01 1.8171619623899460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2502 -2.3784159566275775e-04</internalNodes>\n          <leafValues>\n            -9.9822521209716797e-02 1.0530869662761688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2503 1.3516229810193181e-03</internalNodes>\n          <leafValues>\n            -6.6444016993045807e-02 1.5425109863281250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2504 -1.6924949595704675e-03</internalNodes>\n          <leafValues>\n            -4.4133850932121277e-01 2.5100700557231903e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2505 1.0610929457470775e-03</internalNodes>\n          <leafValues>\n            -6.0577899217605591e-02 1.7217910289764404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2506 5.6644581491127610e-04</internalNodes>\n          <leafValues>\n            -7.8687779605388641e-02 1.6784669458866119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2507 -1.3955390080809593e-02</internalNodes>\n          <leafValues>\n            -5.7841098308563232e-01 1.9087139517068863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2508 -1.8862909637391567e-03</internalNodes>\n          <leafValues>\n            6.2118150293827057e-02 -1.6523399949073792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2509 1.6784170642495155e-02</internalNodes>\n          <leafValues>\n            -3.0380919575691223e-02 3.6105319857597351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2510 -1.4158519661577884e-05</internalNodes>\n          <leafValues>\n            7.2182632982730865e-02 -1.4407490193843842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2511 7.3750452138483524e-03</internalNodes>\n          <leafValues>\n            2.9791580513119698e-02 -2.9277870059013367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2512 8.0517530441284180e-03</internalNodes>\n          <leafValues>\n            -4.4681299477815628e-02 2.1760399639606476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2513 -7.9519696533679962e-02</internalNodes>\n          <leafValues>\n            -6.5208691358566284e-01 1.4618909917771816e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2514 1.2065700255334377e-02</internalNodes>\n          <leafValues>\n            2.9202880337834358e-02 -2.9454120993614197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2515 -1.0122699663043022e-02</internalNodes>\n          <leafValues>\n            2.7746239304542542e-01 -4.3713569641113281e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2516 -1.8515810370445251e-01</internalNodes>\n          <leafValues>\n            -4.6136859059333801e-01 2.4093240499496460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2517 -8.0726131796836853e-02</internalNodes>\n          <leafValues>\n            -4.4673430919647217e-01 2.0845459774136543e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2518 1.5173270367085934e-03</internalNodes>\n          <leafValues>\n            -5.1575969904661179e-02 1.8063379824161530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2519 -1.1184819974005222e-02</internalNodes>\n          <leafValues>\n            -3.5373958945274353e-01 2.7059540152549744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2520 -3.5008399281650782e-03</internalNodes>\n          <leafValues>\n            2.0548710227012634e-01 -4.6032059937715530e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2521 1.4720410108566284e-03</internalNodes>\n          <leafValues>\n            -6.3871711492538452e-02 1.8168300390243530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2522 -4.5021830010227859e-04</internalNodes>\n          <leafValues>\n            -1.6353920102119446e-01 5.9327740222215652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2523 6.1653478769585490e-04</internalNodes>\n          <leafValues>\n            6.9089323282241821e-02 -1.9156040251255035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2524 1.4797239564359188e-03</internalNodes>\n          <leafValues>\n            -5.2241999655961990e-02 1.8631340563297272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2525 -1.4754989933862817e-05</internalNodes>\n          <leafValues>\n            7.3586143553256989e-02 -1.5092320740222931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2526 8.6423632455989718e-04</internalNodes>\n          <leafValues>\n            6.6930077970027924e-02 -1.3976100087165833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2527 -4.1005611419677734e-03</internalNodes>\n          <leafValues>\n            2.0946699380874634e-01 -4.7175008803606033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2528 -2.1505339536815882e-03</internalNodes>\n          <leafValues>\n            -5.2753841876983643e-01 1.7665250226855278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2529 7.8334724530577660e-03</internalNodes>\n          <leafValues>\n            -4.5125011354684830e-02 2.0374919474124908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2530 -3.2690390944480896e-03</internalNodes>\n          <leafValues>\n            -1.3836699724197388e-01 7.0653162896633148e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2531 3.9274748414754868e-03</internalNodes>\n          <leafValues>\n            6.8428598344326019e-02 -1.6210170090198517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2532 7.6534547843039036e-03</internalNodes>\n          <leafValues>\n            -9.3162156641483307e-02 9.9912680685520172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2533 -3.2620150595903397e-02</internalNodes>\n          <leafValues>\n            3.5453549027442932e-01 -3.0765339732170105e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2534 -1.8247209489345551e-02</internalNodes>\n          <leafValues>\n            -3.8171181082725525e-01 2.7764180675148964e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2535 -8.0104079097509384e-04</internalNodes>\n          <leafValues>\n            -1.4329099655151367e-01 6.4936630427837372e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2536 -1.0993109643459320e-01</internalNodes>\n          <leafValues>\n            8.7319427728652954e-01 -1.1242670007050037e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2537 -3.0508199706673622e-02</internalNodes>\n          <leafValues>\n            -6.1269849538803101e-01 1.9372699782252312e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2538 -1.9187819212675095e-02</internalNodes>\n          <leafValues>\n            2.8533020615577698e-01 -3.6832328885793686e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2539 2.3266570642590523e-03</internalNodes>\n          <leafValues>\n            4.7289360314607620e-02 -2.1252959966659546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2540 -1.4535760274156928e-03</internalNodes>\n          <leafValues>\n            1.3778920471668243e-01 -7.4501492083072662e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2541 -1.0573640465736389e-03</internalNodes>\n          <leafValues>\n            -2.2186830639839172e-01 4.2039170861244202e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2542 1.7203199677169323e-03</internalNodes>\n          <leafValues>\n            -6.9299750030040741e-02 1.3794890046119690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2543 -1.4716150471940637e-03</internalNodes>\n          <leafValues>\n            2.4296709895133972e-01 -4.0795009583234787e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2544 -5.2822660654783249e-03</internalNodes>\n          <leafValues>\n            -3.1959480047225952e-01 3.4215260297060013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2545 -4.7165742143988609e-03</internalNodes>\n          <leafValues>\n            3.0581191182136536e-01 -3.1772918999195099e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2546 7.3668370023369789e-03</internalNodes>\n          <leafValues>\n            6.1085078865289688e-02 -1.6390019655227661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2547 -7.6594999991357327e-03</internalNodes>\n          <leafValues>\n            -4.6472349762916565e-01 1.8869750201702118e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2548 7.6969028450548649e-03</internalNodes>\n          <leafValues>\n            -1.8191590905189514e-02 5.5395811796188354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2549 -5.6195858633145690e-04</internalNodes>\n          <leafValues>\n            9.7618483006954193e-02 -1.0844089835882187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2550 -1.4587530131393578e-05</internalNodes>\n          <leafValues>\n            7.4585132300853729e-02 -1.2353610247373581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2551 -9.5779378898441792e-04</internalNodes>\n          <leafValues>\n            1.6370140016078949e-01 -5.8610081672668457e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2552 8.0253500491380692e-03</internalNodes>\n          <leafValues>\n            2.6857670396566391e-02 -4.1507768630981445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2553 1.6938529442995787e-03</internalNodes>\n          <leafValues>\n            4.8536270856857300e-02 -1.7888469994068146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2554 -4.3334178626537323e-03</internalNodes>\n          <leafValues>\n            1.9798220694065094e-01 -4.8085059970617294e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2555 -2.2440029715653509e-04</internalNodes>\n          <leafValues>\n            -1.5113249421119690e-01 6.0428649187088013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2556 -1.1392509564757347e-02</internalNodes>\n          <leafValues>\n            3.2737928628921509e-01 -2.9751259833574295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2557 -9.3984175473451614e-03</internalNodes>\n          <leafValues>\n            -1.2912990152835846e-01 7.6302282512187958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2558 8.7430170970037580e-04</internalNodes>\n          <leafValues>\n            -9.7556166350841522e-02 9.7808010876178741e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2559 7.5171617791056633e-03</internalNodes>\n          <leafValues>\n            6.5084353089332581e-02 -1.5419410169124603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2560 -2.7937069535255432e-03</internalNodes>\n          <leafValues>\n            1.5009529888629913e-01 -6.3355393707752228e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2561 -3.4385098842903972e-04</internalNodes>\n          <leafValues>\n            1.2404289841651917e-01 -7.5780630111694336e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2562 8.7557926774024963e-02</internalNodes>\n          <leafValues>\n            -1.5905940905213356e-02 5.6607347726821899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2563 -9.3594435602426529e-03</internalNodes>\n          <leafValues>\n            -3.3039200305938721e-01 3.0874710530042648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2564 -6.7703737877309322e-03</internalNodes>\n          <leafValues>\n            1.7960870265960693e-01 -5.1310319453477859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2565 -6.2513751909136772e-03</internalNodes>\n          <leafValues>\n            -5.7952338457107544e-01 1.5425769612193108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2566 -2.5206409394741058e-02</internalNodes>\n          <leafValues>\n            -6.3777071237564087e-01 1.3051119633018970e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2567 -1.1819769861176610e-03</internalNodes>\n          <leafValues>\n            -2.0478110015392303e-01 4.0494531393051147e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2568 -1.0458839824423194e-03</internalNodes>\n          <leafValues>\n            1.4812879264354706e-01 -6.2631592154502869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2569 -2.5445020291954279e-03</internalNodes>\n          <leafValues>\n            1.3021010160446167e-01 -6.9430023431777954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2570 -8.0673627555370331e-02</internalNodes>\n          <leafValues>\n            -2.8054219484329224e-01 3.8956280797719955e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2571 -1.4390920114237815e-04</internalNodes>\n          <leafValues>\n            1.0780519992113113e-01 -9.6550762653350830e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2572 7.6481432188302279e-04</internalNodes>\n          <leafValues>\n            6.0667239129543304e-02 -1.5742610394954681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2573 -3.4516688901931047e-04</internalNodes>\n          <leafValues>\n            1.1415769904851913e-01 -8.8832370936870575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2574 -2.2118249908089638e-03</internalNodes>\n          <leafValues>\n            2.2988039255142212e-01 -5.0498738884925842e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2575 9.4616543501615524e-03</internalNodes>\n          <leafValues>\n            1.9827060401439667e-02 -5.0633531808853149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2576 1.0567939607426524e-03</internalNodes>\n          <leafValues>\n            3.8744639605283737e-02 -2.3509359359741211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2577 2.9194469098001719e-03</internalNodes>\n          <leafValues>\n            -6.1895478516817093e-02 1.5313319861888885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2578 -1.0768010281026363e-02</internalNodes>\n          <leafValues>\n            -5.5298101902008057e-01 1.7847239971160889e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2579 -1.0197740048170090e-03</internalNodes>\n          <leafValues>\n            1.1559300124645233e-01 -8.0185852944850922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2580 1.8127029761672020e-04</internalNodes>\n          <leafValues>\n            5.6652870029211044e-02 -1.6549369692802429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2581 7.1620188464294188e-06</internalNodes>\n          <leafValues>\n            -9.1480091214179993e-02 9.7915090620517731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2582 5.2910070866346359e-02</internalNodes>\n          <leafValues>\n            -1.3591200113296509e-02 6.6090220212936401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2583 4.0185371041297913e-01</internalNodes>\n          <leafValues>\n            1.9574489444494247e-02 -4.9015858769416809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2584 -1.7914770171046257e-02</internalNodes>\n          <leafValues>\n            -8.8317036628723145e-02 1.0532960295677185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2585 -1.4578569789591711e-05</internalNodes>\n          <leafValues>\n            7.8513152897357941e-02 -1.2300349771976471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2586 6.4994548447430134e-03</internalNodes>\n          <leafValues>\n            -4.0843468159437180e-02 2.9337158799171448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2587 9.5762982964515686e-02</internalNodes>\n          <leafValues>\n            1.9332479685544968e-02 -5.3444057703018188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2588 1.4263469893194269e-05</internalNodes>\n          <leafValues>\n            -8.8897533714771271e-02 1.0632789880037308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2589 2.2215039934962988e-03</internalNodes>\n          <leafValues>\n            -4.0777951478958130e-02 2.6405128836631775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2590 3.1875250861048698e-03</internalNodes>\n          <leafValues>\n            5.9725038707256317e-02 -1.6202959418296814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2591 9.6069589257240295e-02</internalNodes>\n          <leafValues>\n            1.1318460106849670e-02 -7.9110687971115112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2592 1.9584870897233486e-03</internalNodes>\n          <leafValues>\n            -3.9252020418643951e-02 2.3639929294586182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2593 -1.8468469381332397e-01</internalNodes>\n          <leafValues>\n            -5.8974397182464600e-01 1.5758410096168518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2594 2.1685050160158426e-04</internalNodes>\n          <leafValues>\n            4.6320449560880661e-02 -1.8274679780006409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2595 1.8809709697961807e-02</internalNodes>\n          <leafValues>\n            -4.3357118964195251e-02 2.7832600474357605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2596 -6.2639699317514896e-03</internalNodes>\n          <leafValues>\n            -1.3891190290451050e-01 7.7115900814533234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2597 3.2622940489090979e-04</internalNodes>\n          <leafValues>\n            -9.1803021728992462e-02 1.0588289797306061e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2598 5.3745559416711330e-03</internalNodes>\n          <leafValues>\n            1.0803489945828915e-02 -7.6716458797454834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2599 2.8126770630478859e-03</internalNodes>\n          <leafValues>\n            -5.9618860483169556e-02 1.6133050620555878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2600 -6.5314618404954672e-04</internalNodes>\n          <leafValues>\n            -8.5690811276435852e-02 1.1540769785642624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2601 -1.7845110269263387e-03</internalNodes>\n          <leafValues>\n            8.1831991672515869e-02 -1.2700800597667694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2602 3.0969830695539713e-03</internalNodes>\n          <leafValues>\n            6.8366639316082001e-02 -1.4475439488887787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2603 -4.1442047804594040e-03</internalNodes>\n          <leafValues>\n            1.8632030487060547e-01 -5.4030310362577438e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2604 -4.9972519278526306e-02</internalNodes>\n          <leafValues>\n            -1.2800359725952148e-01 8.5049159824848175e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2605 -1.0743910446763039e-02</internalNodes>\n          <leafValues>\n            1.3701729476451874e-01 -7.7366456389427185e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2606 -3.0474149389192462e-04</internalNodes>\n          <leafValues>\n            -1.6938340663909912e-01 5.7971168309450150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2607 3.6023318767547607e-02</internalNodes>\n          <leafValues>\n            1.3561300002038479e-02 -6.3279747962951660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2608 2.5479190517216921e-03</internalNodes>\n          <leafValues>\n            -4.3824359774589539e-02 2.2150419652462006e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          8 7 2 6 -1.</_>\n        <_>\n          8 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 10 7 -1.</_>\n        <_>\n          13 3 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 3 6 -1.</_>\n        <_>\n          10 14 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 8 -1.</_>\n        <_>\n          14 4 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 5 4 -1.</_>\n        <_>\n          5 9 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 6 -1.</_>\n        <_>\n          8 4 3 3 2.</_>\n        <_>\n          11 7 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 5 2 -1.</_>\n        <_>\n          10 15 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 8 4 -1.</_>\n        <_>\n          7 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 3 3 -1.</_>\n        <_>\n          11 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 3 11 -1.</_>\n        <_>\n          4 5 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 6 -1.</_>\n        <_>\n          8 10 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 1 2 -1.</_>\n        <_>\n          13 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 17 -1.</_>\n        <_>\n          4 3 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 3 -1.</_>\n        <_>\n          11 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 9 -1.</_>\n        <_>\n          4 9 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 6 -1.</_>\n        <_>\n          14 5 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 6 -1.</_>\n        <_>\n          7 10 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 6 -1.</_>\n        <_>\n          5 8 3 3 2.</_>\n        <_>\n          8 11 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 18 -1.</_>\n        <_>\n          4 0 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 4 -1.</_>\n        <_>\n          10 14 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 9 -1.</_>\n        <_>\n          7 3 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 1 3 -1.</_>\n        <_>\n          11 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 5 2 -1.</_>\n        <_>\n          4 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 2 3 -1.</_>\n        <_>\n          11 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 1 3 -1.</_>\n        <_>\n          12 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 8 -1.</_>\n        <_>\n          9 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 13 -1.</_>\n        <_>\n          8 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 4 12 -1.</_>\n        <_>\n          4 6 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 3 2 -1.</_>\n        <_>\n          12 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 3 11 -1.</_>\n        <_>\n          4 5 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 13 12 -1.</_>\n        <_>\n          3 12 13 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 6 -1.</_>\n        <_>\n          7 7 3 3 2.</_>\n        <_>\n          10 10 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 2 -1.</_>\n        <_>\n          5 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 14 3 -1.</_>\n        <_>\n          12 4 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 2 -1.</_>\n        <_>\n          11 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 1 3 -1.</_>\n        <_>\n          12 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 3 3 -1.</_>\n        <_>\n          4 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 2 -1.</_>\n        <_>\n          9 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 3 13 -1.</_>\n        <_>\n          4 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 2 3 -1.</_>\n        <_>\n          15 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 4 4 -1.</_>\n        <_>\n          12 10 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 8 9 -1.</_>\n        <_>\n          8 10 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 6 -1.</_>\n        <_>\n          8 0 6 3 2.</_>\n        <_>\n          14 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 6 -1.</_>\n        <_>\n          5 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 4 -1.</_>\n        <_>\n          12 12 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 3 8 -1.</_>\n        <_>\n          11 11 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 5 6 -1.</_>\n        <_>\n          5 7 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 6 -1.</_>\n        <_>\n          10 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 3 4 -1.</_>\n        <_>\n          11 15 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 3 -1.</_>\n        <_>\n          8 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 2 -1.</_>\n        <_>\n          8 8 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 2 -1.</_>\n        <_>\n          10 7 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 3 -1.</_>\n        <_>\n          6 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 8 -1.</_>\n        <_>\n          9 0 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 3 8 -1.</_>\n        <_>\n          5 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 2 -1.</_>\n        <_>\n          13 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 4 -1.</_>\n        <_>\n          9 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 1 8 -1.</_>\n        <_>\n          14 14 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 3 -1.</_>\n        <_>\n          6 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 3 -1.</_>\n        <_>\n          6 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 2 -1.</_>\n        <_>\n          10 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 1 12 -1.</_>\n        <_>\n          12 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 14 6 -1.</_>\n        <_>\n          2 8 7 3 2.</_>\n        <_>\n          9 11 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 17 -1.</_>\n        <_>\n          12 3 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 1 2 -1.</_>\n        <_>\n          12 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 2 1 -1.</_>\n        <_>\n          14 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 3 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 3 -1.</_>\n        <_>\n          12 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 10 10 -1.</_>\n        <_>\n          13 2 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 3 1 -1.</_>\n        <_>\n          12 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 1 4 -1.</_>\n        <_>\n          12 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 6 -1.</_>\n        <_>\n          8 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 3 -1.</_>\n        <_>\n          12 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          10 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 6 -1.</_>\n        <_>\n          6 3 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 19 -1.</_>\n        <_>\n          4 0 4 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 9 -1.</_>\n        <_>\n          5 9 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 1 2 -1.</_>\n        <_>\n          13 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 8 15 -1.</_>\n        <_>\n          5 3 4 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 2 3 -1.</_>\n        <_>\n          13 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 2 -1.</_>\n        <_>\n          6 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 1 -1.</_>\n        <_>\n          9 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 1 -1.</_>\n        <_>\n          10 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 1 3 -1.</_>\n        <_>\n          6 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 1 2 -1.</_>\n        <_>\n          18 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 3 -1.</_>\n        <_>\n          6 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 4 -1.</_>\n        <_>\n          11 10 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 14 -1.</_>\n        <_>\n          6 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 3 4 -1.</_>\n        <_>\n          14 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 3 6 -1.</_>\n        <_>\n          4 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 8 -1.</_>\n        <_>\n          5 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 2 -1.</_>\n        <_>\n          10 1 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 3 -1.</_>\n        <_>\n          11 1 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 8 8 -1.</_>\n        <_>\n          9 12 4 4 2.</_>\n        <_>\n          13 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 6 4 -1.</_>\n        <_>\n          10 13 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 3 12 -1.</_>\n        <_>\n          4 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 8 5 -1.</_>\n        <_>\n          13 3 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 6 -1.</_>\n        <_>\n          7 10 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 10 4 -1.</_>\n        <_>\n          5 12 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 6 -1.</_>\n        <_>\n          11 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 2 -1.</_>\n        <_>\n          8 8 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 8 4 -1.</_>\n        <_>\n          2 0 4 2 2.</_>\n        <_>\n          6 2 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 5 -1.</_>\n        <_>\n          12 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 2 3 -1.</_>\n        <_>\n          12 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 1 2 -1.</_>\n        <_>\n          12 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 3 -1.</_>\n        <_>\n          8 11 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 3 9 -1.</_>\n        <_>\n          3 6 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 1 3 -1.</_>\n        <_>\n          12 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 2 -1.</_>\n        <_>\n          5 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 3 7 -1.</_>\n        <_>\n          4 8 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 15 -1.</_>\n        <_>\n          3 3 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 4 3 -1.</_>\n        <_>\n          12 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 20 -1.</_>\n        <_>\n          9 0 1 10 2.</_>\n        <_>\n          10 10 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 3 3 -1.</_>\n        <_>\n          6 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 10 -1.</_>\n        <_>\n          5 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 1 -1.</_>\n        <_>\n          9 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 3 -1.</_>\n        <_>\n          5 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 2 -1.</_>\n        <_>\n          15 6 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 3 2 -1.</_>\n        <_>\n          15 6 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 3 -1.</_>\n        <_>\n          5 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 12 -1.</_>\n        <_>\n          8 5 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 3 -1.</_>\n        <_>\n          8 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 3 -1.</_>\n        <_>\n          6 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 1 -1.</_>\n        <_>\n          5 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 2 1 -1.</_>\n        <_>\n          13 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 5 2 -1.</_>\n        <_>\n          10 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 1 3 -1.</_>\n        <_>\n          11 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 6 -1.</_>\n        <_>\n          7 4 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 3 -1.</_>\n        <_>\n          5 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 2 3 -1.</_>\n        <_>\n          12 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 3 -1.</_>\n        <_>\n          8 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 10 -1.</_>\n        <_>\n          7 11 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 18 2 -1.</_>\n        <_>\n          6 18 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 1 8 -1.</_>\n        <_>\n          0 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 8 10 -1.</_>\n        <_>\n          1 8 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 2 -1.</_>\n        <_>\n          9 13 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 3 -1.</_>\n        <_>\n          9 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 3 -1.</_>\n        <_>\n          10 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 1 3 -1.</_>\n        <_>\n          13 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 13 3 -1.</_>\n        <_>\n          2 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 2 4 -1.</_>\n        <_>\n          11 15 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 2 3 -1.</_>\n        <_>\n          8 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 8 -1.</_>\n        <_>\n          3 6 6 4 2.</_>\n        <_>\n          9 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 4 -1.</_>\n        <_>\n          12 0 4 2 2.</_>\n        <_>\n          16 2 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 3 3 -1.</_>\n        <_>\n          10 15 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 2 -1.</_>\n        <_>\n          10 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 5 6 -1.</_>\n        <_>\n          6 14 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 3 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 4 -1.</_>\n        <_>\n          6 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 4 -1.</_>\n        <_>\n          11 6 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 6 -1.</_>\n        <_>\n          6 7 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 16 7 -1.</_>\n        <_>\n          11 1 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 6 -1.</_>\n        <_>\n          12 14 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 8 -1.</_>\n        <_>\n          6 10 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 6 -1.</_>\n        <_>\n          5 12 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 14 -1.</_>\n        <_>\n          4 0 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 1 9 -1.</_>\n        <_>\n          8 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 2 2 -1.</_>\n        <_>\n          11 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 4 13 -1.</_>\n        <_>\n          4 7 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 6 -1.</_>\n        <_>\n          8 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 20 -1.</_>\n        <_>\n          19 0 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 3 -1.</_>\n        <_>\n          7 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 1 4 -1.</_>\n        <_>\n          13 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 2 -1.</_>\n        <_>\n          12 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 6 -1.</_>\n        <_>\n          3 6 6 3 2.</_>\n        <_>\n          9 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 2 -1.</_>\n        <_>\n          10 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 3 -1.</_>\n        <_>\n          6 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 1 3 -1.</_>\n        <_>\n          13 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 3 3 -1.</_>\n        <_>\n          6 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 3 3 -1.</_>\n        <_>\n          5 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 1 3 -1.</_>\n        <_>\n          15 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 3 12 -1.</_>\n        <_>\n          4 8 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 3 14 -1.</_>\n        <_>\n          4 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 2 -1.</_>\n        <_>\n          9 11 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 8 4 -1.</_>\n        <_>\n          8 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 2 4 -1.</_>\n        <_>\n          5 5 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 2 1 -1.</_>\n        <_>\n          8 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 2 3 -1.</_>\n        <_>\n          12 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 6 3 -1.</_>\n        <_>\n          3 17 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 2 1 -1.</_>\n        <_>\n          14 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 4 4 -1.</_>\n        <_>\n          11 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 1 -1.</_>\n        <_>\n          6 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 2 -1.</_>\n        <_>\n          6 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 2 1 -1.</_>\n        <_>\n          13 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 3 -1.</_>\n        <_>\n          8 7 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 10 -1.</_>\n        <_>\n          5 13 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 1 2 -1.</_>\n        <_>\n          0 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 4 4 -1.</_>\n        <_>\n          4 11 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 12 3 -1.</_>\n        <_>\n          5 9 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 2 3 -1.</_>\n        <_>\n          9 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 3 -1.</_>\n        <_>\n          8 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 1 2 -1.</_>\n        <_>\n          1 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 7 6 -1.</_>\n        <_>\n          5 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 3 4 -1.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 3 3 -1.</_>\n        <_>\n          5 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 1 -1.</_>\n        <_>\n          8 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 11 16 -1.</_>\n        <_>\n          0 8 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 2 -1.</_>\n        <_>\n          8 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 3 -1.</_>\n        <_>\n          6 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 3 -1.</_>\n        <_>\n          6 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 2 -1.</_>\n        <_>\n          13 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 2 6 -1.</_>\n        <_>\n          8 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 4 -1.</_>\n        <_>\n          6 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 8 -1.</_>\n        <_>\n          10 0 5 4 2.</_>\n        <_>\n          15 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 12 -1.</_>\n        <_>\n          9 11 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 12 -1.</_>\n        <_>\n          6 3 6 6 2.</_>\n        <_>\n          12 9 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 6 -1.</_>\n        <_>\n          5 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 10 -1.</_>\n        <_>\n          5 7 5 5 2.</_>\n        <_>\n          10 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 15 -1.</_>\n        <_>\n          4 1 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 2 -1.</_>\n        <_>\n          13 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 10 6 -1.</_>\n        <_>\n          6 14 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 3 -1.</_>\n        <_>\n          5 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 1 3 -1.</_>\n        <_>\n          6 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 8 -1.</_>\n        <_>\n          3 7 6 4 2.</_>\n        <_>\n          9 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 6 -1.</_>\n        <_>\n          6 4 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 5 4 -1.</_>\n        <_>\n          11 13 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 6 -1.</_>\n        <_>\n          8 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 2 -1.</_>\n        <_>\n          7 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 7 -1.</_>\n        <_>\n          4 13 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 5 9 -1.</_>\n        <_>\n          11 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 15 9 -1.</_>\n        <_>\n          4 6 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 2 2 -1.</_>\n        <_>\n          15 13 1 1 2.</_>\n        <_>\n          16 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 13 -1.</_>\n        <_>\n          9 5 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 1 -1.</_>\n        <_>\n          6 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 2 15 -1.</_>\n        <_>\n          6 6 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 3 -1.</_>\n        <_>\n          13 0 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 4 -1.</_>\n        <_>\n          0 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 9 3 -1.</_>\n        <_>\n          4 9 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 2 -1.</_>\n        <_>\n          8 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 2 2 -1.</_>\n        <_>\n          4 15 1 1 2.</_>\n        <_>\n          5 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 2 3 -1.</_>\n        <_>\n          6 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 1 6 -1.</_>\n        <_>\n          6 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 10 -1.</_>\n        <_>\n          5 14 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 3 10 -1.</_>\n        <_>\n          4 6 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 5 -1.</_>\n        <_>\n          4 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 2 -1.</_>\n        <_>\n          13 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 1 -1.</_>\n        <_>\n          12 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 1 -1.</_>\n        <_>\n          12 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 1 3 -1.</_>\n        <_>\n          6 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 5 3 -1.</_>\n        <_>\n          10 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 1 3 -1.</_>\n        <_>\n          7 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 8 2 -1.</_>\n        <_>\n          12 5 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 3 -1.</_>\n        <_>\n          10 7 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 5 9 -1.</_>\n        <_>\n          12 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 3 -1.</_>\n        <_>\n          5 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          5 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 4 -1.</_>\n        <_>\n          12 0 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 6 -1.</_>\n        <_>\n          5 9 5 3 2.</_>\n        <_>\n          10 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 3 3 -1.</_>\n        <_>\n          6 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 12 -1.</_>\n        <_>\n          1 9 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 5 10 -1.</_>\n        <_>\n          1 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 2 -1.</_>\n        <_>\n          10 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 8 -1.</_>\n        <_>\n          9 5 1 4 2.</_>\n        <_>\n          10 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 12 3 1 -1.</_>\n        <_>\n          18 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 2 3 -1.</_>\n        <_>\n          5 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 7 2 -1.</_>\n        <_>\n          11 19 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 8 -1.</_>\n        <_>\n          13 6 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 5 -1.</_>\n        <_>\n          14 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 6 -1.</_>\n        <_>\n          9 7 2 3 2.</_>\n        <_>\n          11 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 6 -1.</_>\n        <_>\n          10 10 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 17 -1.</_>\n        <_>\n          4 1 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 4 -1.</_>\n        <_>\n          7 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 4 -1.</_>\n        <_>\n          8 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 8 2 -1.</_>\n        <_>\n          9 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 4 -1.</_>\n        <_>\n          11 14 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 1 3 -1.</_>\n        <_>\n          13 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 19 4 1 -1.</_>\n        <_>\n          12 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 12 -1.</_>\n        <_>\n          5 4 5 6 2.</_>\n        <_>\n          10 10 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 5 6 -1.</_>\n        <_>\n          4 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 8 -1.</_>\n        <_>\n          5 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 3 -1.</_>\n        <_>\n          7 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 2 -1.</_>\n        <_>\n          8 4 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 16 -1.</_>\n        <_>\n          2 3 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 3 12 -1.</_>\n        <_>\n          3 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 2 -1.</_>\n        <_>\n          12 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 13 -1.</_>\n        <_>\n          19 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 5 4 -1.</_>\n        <_>\n          9 16 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 3 -1.</_>\n        <_>\n          10 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 1 3 -1.</_>\n        <_>\n          12 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 3 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 14 -1.</_>\n        <_>\n          9 6 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 3 -1.</_>\n        <_>\n          8 11 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 4 -1.</_>\n        <_>\n          6 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 11 9 -1.</_>\n        <_>\n          7 6 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 9 6 -1.</_>\n        <_>\n          10 6 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 3 -1.</_>\n        <_>\n          8 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 1 -1.</_>\n        <_>\n          1 0 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 4 6 -1.</_>\n        <_>\n          9 4 2 3 2.</_>\n        <_>\n          11 7 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 1 -1.</_>\n        <_>\n          6 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 2 -1.</_>\n        <_>\n          7 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 1 3 -1.</_>\n        <_>\n          7 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 1 2 -1.</_>\n        <_>\n          1 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 3 -1.</_>\n        <_>\n          7 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 6 1 2 -1.</_>\n        <_>\n          19 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 2 3 -1.</_>\n        <_>\n          6 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 1 3 -1.</_>\n        <_>\n          11 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 10 3 1 -1.</_>\n        <_>\n          18 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 1 -1.</_>\n        <_>\n          13 0 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 4 -1.</_>\n        <_>\n          14 0 3 2 2.</_>\n        <_>\n          17 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 6 -1.</_>\n        <_>\n          12 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 1 2 -1.</_>\n        <_>\n          14 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 4 3 -1.</_>\n        <_>\n          6 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 3 -1.</_>\n        <_>\n          5 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 1 -1.</_>\n        <_>\n          10 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 3 3 -1.</_>\n        <_>\n          10 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 1 -1.</_>\n        <_>\n          10 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 3 -1.</_>\n        <_>\n          7 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 1 6 -1.</_>\n        <_>\n          1 6 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 11 -1.</_>\n        <_>\n          4 2 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 18 -1.</_>\n        <_>\n          4 2 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 2 -1.</_>\n        <_>\n          8 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 3 -1.</_>\n        <_>\n          6 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 3 1 -1.</_>\n        <_>\n          8 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 6 -1.</_>\n        <_>\n          3 13 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 3 17 -1.</_>\n        <_>\n          4 2 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 8 1 -1.</_>\n        <_>\n          8 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 3 6 -1.</_>\n        <_>\n          3 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 1 2 -1.</_>\n        <_>\n          18 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 6 -1.</_>\n        <_>\n          7 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 3 -1.</_>\n        <_>\n          11 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 1 -1.</_>\n        <_>\n          17 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 2 -1.</_>\n        <_>\n          17 11 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 1 4 -1.</_>\n        <_>\n          15 5 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 11 -1.</_>\n        <_>\n          14 0 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 5 6 -1.</_>\n        <_>\n          7 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 6 -1.</_>\n        <_>\n          8 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 4 6 -1.</_>\n        <_>\n          11 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 2 -1.</_>\n        <_>\n          5 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 2 -1.</_>\n        <_>\n          4 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 3 -1.</_>\n        <_>\n          11 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 6 -1.</_>\n        <_>\n          5 12 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 2 3 -1.</_>\n        <_>\n          17 4 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 1 -1.</_>\n        <_>\n          13 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 4 -1.</_>\n        <_>\n          8 5 3 2 2.</_>\n        <_>\n          11 7 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 3 3 -1.</_>\n        <_>\n          11 15 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 7 -1.</_>\n        <_>\n          4 7 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 1 2 -1.</_>\n        <_>\n          11 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 3 5 -1.</_>\n        <_>\n          4 9 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 3 3 -1.</_>\n        <_>\n          11 15 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 6 12 -1.</_>\n        <_>\n          3 9 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 5 6 -1.</_>\n        <_>\n          3 7 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 11 -1.</_>\n        <_>\n          8 6 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 6 -1.</_>\n        <_>\n          7 5 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 3 8 -1.</_>\n        <_>\n          3 6 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 1 -1.</_>\n        <_>\n          7 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 3 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 2 3 -1.</_>\n        <_>\n          13 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 2 3 -1.</_>\n        <_>\n          10 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 3 -1.</_>\n        <_>\n          19 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 5 3 -1.</_>\n        <_>\n          5 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 10 4 -1.</_>\n        <_>\n          9 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 3 -1.</_>\n        <_>\n          12 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 4 3 -1.</_>\n        <_>\n          5 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 3 3 -1.</_>\n        <_>\n          6 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 2 -1.</_>\n        <_>\n          7 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 8 2 -1.</_>\n        <_>\n          8 11 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 8 -1.</_>\n        <_>\n          14 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 5 -1.</_>\n        <_>\n          12 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 6 2 -1.</_>\n        <_>\n          7 14 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 3 -1.</_>\n        <_>\n          6 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 1 3 -1.</_>\n        <_>\n          13 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 14 12 -1.</_>\n        <_>\n          6 3 7 6 2.</_>\n        <_>\n          13 9 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 2 -1.</_>\n        <_>\n          18 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 10 -1.</_>\n        <_>\n          16 7 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 3 -1.</_>\n        <_>\n          9 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 4 -1.</_>\n        <_>\n          0 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 2 -1.</_>\n        <_>\n          11 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 2 -1.</_>\n        <_>\n          12 0 4 1 2.</_>\n        <_>\n          16 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 14 6 -1.</_>\n        <_>\n          3 12 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 4 -1.</_>\n        <_>\n          7 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 1 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 5 10 -1.</_>\n        <_>\n          11 11 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 4 4 -1.</_>\n        <_>\n          3 16 2 2 2.</_>\n        <_>\n          5 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 3 -1.</_>\n        <_>\n          7 2 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 20 -1.</_>\n        <_>\n          4 0 4 10 2.</_>\n        <_>\n          8 10 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 3 4 -1.</_>\n        <_>\n          4 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 3 1 -1.</_>\n        <_>\n          4 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 1 2 -1.</_>\n        <_>\n          11 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 1 3 -1.</_>\n        <_>\n          11 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 19 14 1 -1.</_>\n        <_>\n          13 19 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 3 -1.</_>\n        <_>\n          6 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 2 -1.</_>\n        <_>\n          8 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 2 1 -1.</_>\n        <_>\n          10 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 2 3 -1.</_>\n        <_>\n          6 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 6 -1.</_>\n        <_>\n          9 9 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 7 -1.</_>\n        <_>\n          10 12 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 1 3 -1.</_>\n        <_>\n          8 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 11 -1.</_>\n        <_>\n          12 5 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 1 2 -1.</_>\n        <_>\n          2 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 2 -1.</_>\n        <_>\n          0 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 16 -1.</_>\n        <_>\n          12 0 4 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 2 -1.</_>\n        <_>\n          0 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 11 -1.</_>\n        <_>\n          14 0 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 6 -1.</_>\n        <_>\n          6 5 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 4 -1.</_>\n        <_>\n          8 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 12 -1.</_>\n        <_>\n          13 8 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 14 -1.</_>\n        <_>\n          10 13 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 10 1 -1.</_>\n        <_>\n          6 1 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 13 6 -1.</_>\n        <_>\n          4 4 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 2 3 -1.</_>\n        <_>\n          12 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 9 -1.</_>\n        <_>\n          6 12 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 3 10 -1.</_>\n        <_>\n          6 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 4 -1.</_>\n        <_>\n          3 10 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 3 6 -1.</_>\n        <_>\n          4 8 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 6 -1.</_>\n        <_>\n          12 12 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 2 3 -1.</_>\n        <_>\n          8 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 6 -1.</_>\n        <_>\n          5 8 3 3 2.</_>\n        <_>\n          8 11 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 1 -1.</_>\n        <_>\n          4 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 3 -1.</_>\n        <_>\n          10 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 3 -1.</_>\n        <_>\n          5 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 4 3 -1.</_>\n        <_>\n          10 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          5 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 1 -1.</_>\n        <_>\n          10 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 14 -1.</_>\n        <_>\n          2 7 18 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 2 -1.</_>\n        <_>\n          10 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 3 -1.</_>\n        <_>\n          8 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 5 2 -1.</_>\n        <_>\n          4 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 6 -1.</_>\n        <_>\n          0 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 1 6 -1.</_>\n        <_>\n          13 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 3 -1.</_>\n        <_>\n          6 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 7 3 -1.</_>\n        <_>\n          3 17 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 5 3 -1.</_>\n        <_>\n          10 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 5 20 -1.</_>\n        <_>\n          4 10 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 2 -1.</_>\n        <_>\n          7 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 15 -1.</_>\n        <_>\n          18 5 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 7 3 -1.</_>\n        <_>\n          6 16 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 6 2 -1.</_>\n        <_>\n          10 14 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 1 9 -1.</_>\n        <_>\n          13 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 4 -1.</_>\n        <_>\n          3 0 2 2 2.</_>\n        <_>\n          5 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 6 -1.</_>\n        <_>\n          0 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 1 -1.</_>\n        <_>\n          6 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 3 -1.</_>\n        <_>\n          6 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 7 -1.</_>\n        <_>\n          8 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 3 -1.</_>\n        <_>\n          8 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 8 1 -1.</_>\n        <_>\n          7 8 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 3 -1.</_>\n        <_>\n          5 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 8 -1.</_>\n        <_>\n          9 7 1 4 2.</_>\n        <_>\n          10 11 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 3 5 -1.</_>\n        <_>\n          15 2 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 3 -1.</_>\n        <_>\n          6 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 1 2 -1.</_>\n        <_>\n          6 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 2 3 -1.</_>\n        <_>\n          12 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 12 3 -1.</_>\n        <_>\n          5 14 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 1 -1.</_>\n        <_>\n          12 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 2 3 -1.</_>\n        <_>\n          14 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 2 -1.</_>\n        <_>\n          8 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 3 11 -1.</_>\n        <_>\n          3 7 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 2 1 -1.</_>\n        <_>\n          1 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 2 -1.</_>\n        <_>\n          7 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 4 -1.</_>\n        <_>\n          18 10 1 2 2.</_>\n        <_>\n          19 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 2 2 -1.</_>\n        <_>\n          14 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 8 12 -1.</_>\n        <_>\n          13 5 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 3 -1.</_>\n        <_>\n          12 5 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 2 2 -1.</_>\n        <_>\n          16 11 1 1 2.</_>\n        <_>\n          17 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 1 2 -1.</_>\n        <_>\n          14 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 16 -1.</_>\n        <_>\n          3 8 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 5 -1.</_>\n        <_>\n          4 11 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 6 -1.</_>\n        <_>\n          4 8 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 2 -1.</_>\n        <_>\n          6 9 2 1 2.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 3 5 -1.</_>\n        <_>\n          12 15 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 2 6 -1.</_>\n        <_>\n          18 10 1 3 2.</_>\n        <_>\n          19 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 6 1 -1.</_>\n        <_>\n          16 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 7 6 -1.</_>\n        <_>\n          5 13 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 6 6 -1.</_>\n        <_>\n          2 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 3 3 -1.</_>\n        <_>\n          11 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 3 -1.</_>\n        <_>\n          7 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 5 3 -1.</_>\n        <_>\n          5 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 1 -1.</_>\n        <_>\n          7 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 4 3 -1.</_>\n        <_>\n          4 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 4 8 -1.</_>\n        <_>\n          2 2 2 4 2.</_>\n        <_>\n          4 6 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 2 3 -1.</_>\n        <_>\n          12 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 4 3 -1.</_>\n        <_>\n          9 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 5 3 -1.</_>\n        <_>\n          8 9 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 2 -1.</_>\n        <_>\n          10 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 2 -1.</_>\n        <_>\n          4 0 4 1 2.</_>\n        <_>\n          8 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 1 2 -1.</_>\n        <_>\n          0 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 8 4 -1.</_>\n        <_>\n          8 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 9 3 -1.</_>\n        <_>\n          4 18 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 2 8 -1.</_>\n        <_>\n          10 4 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 6 -1.</_>\n        <_>\n          10 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 10 5 -1.</_>\n        <_>\n          12 2 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 6 -1.</_>\n        <_>\n          9 7 2 3 2.</_>\n        <_>\n          11 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 1 6 -1.</_>\n        <_>\n          12 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 8 -1.</_>\n        <_>\n          4 2 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 1 3 -1.</_>\n        <_>\n          10 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 2 -1.</_>\n        <_>\n          6 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 1 3 -1.</_>\n        <_>\n          10 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 9 -1.</_>\n        <_>\n          4 6 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 3 -1.</_>\n        <_>\n          7 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 3 -1.</_>\n        <_>\n          10 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 3 8 -1.</_>\n        <_>\n          11 6 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 3 5 -1.</_>\n        <_>\n          2 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 2 -1.</_>\n        <_>\n          7 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 3 -1.</_>\n        <_>\n          10 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 3 -1.</_>\n        <_>\n          11 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 1 -1.</_>\n        <_>\n          17 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 3 -1.</_>\n        <_>\n          10 0 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 2 2 -1.</_>\n        <_>\n          17 11 1 1 2.</_>\n        <_>\n          18 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 7 3 -1.</_>\n        <_>\n          11 4 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 1 3 -1.</_>\n        <_>\n          6 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 2 -1.</_>\n        <_>\n          8 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 3 -1.</_>\n        <_>\n          8 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 3 -1.</_>\n        <_>\n          6 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 3 -1.</_>\n        <_>\n          6 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 3 -1.</_>\n        <_>\n          10 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 2 -1.</_>\n        <_>\n          5 1 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 8 4 -1.</_>\n        <_>\n          4 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 8 4 -1.</_>\n        <_>\n          6 14 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 2 -1.</_>\n        <_>\n          4 0 2 1 2.</_>\n        <_>\n          6 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 2 -1.</_>\n        <_>\n          13 10 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 2 2 -1.</_>\n        <_>\n          13 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 1 -1.</_>\n        <_>\n          12 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 6 -1.</_>\n        <_>\n          6 9 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 1 3 -1.</_>\n        <_>\n          11 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 2 -1.</_>\n        <_>\n          14 11 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 1 -1.</_>\n        <_>\n          12 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 1 -1.</_>\n        <_>\n          10 11 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 6 5 -1.</_>\n        <_>\n          3 13 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 1 -1.</_>\n        <_>\n          15 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 1 -1.</_>\n        <_>\n          15 0 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 3 3 -1.</_>\n        <_>\n          5 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 2 2 -1.</_>\n        <_>\n          12 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 2 3 -1.</_>\n        <_>\n          12 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 1 3 -1.</_>\n        <_>\n          8 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 3 -1.</_>\n        <_>\n          0 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 3 -1.</_>\n        <_>\n          0 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 2 -1.</_>\n        <_>\n          4 8 1 1 2.</_>\n        <_>\n          5 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 8 10 -1.</_>\n        <_>\n          3 6 4 5 2.</_>\n        <_>\n          7 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 1 3 -1.</_>\n        <_>\n          6 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 8 -1.</_>\n        <_>\n          13 0 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 6 -1.</_>\n        <_>\n          10 0 5 3 2.</_>\n        <_>\n          15 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 2 2 -1.</_>\n        <_>\n          17 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 14 -1.</_>\n        <_>\n          14 0 6 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 2 1 -1.</_>\n        <_>\n          11 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 6 -1.</_>\n        <_>\n          18 9 1 3 2.</_>\n        <_>\n          19 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 16 -1.</_>\n        <_>\n          18 4 1 8 2.</_>\n        <_>\n          19 12 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 6 -1.</_>\n        <_>\n          8 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 11 -1.</_>\n        <_>\n          8 5 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 2 -1.</_>\n        <_>\n          7 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 5 -1.</_>\n        <_>\n          7 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 3 4 -1.</_>\n        <_>\n          11 16 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 18 -1.</_>\n        <_>\n          3 9 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 7 3 -1.</_>\n        <_>\n          1 8 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 6 -1.</_>\n        <_>\n          5 7 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 3 10 -1.</_>\n        <_>\n          4 8 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 2 -1.</_>\n        <_>\n          4 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 10 3 -1.</_>\n        <_>\n          8 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 6 2 -1.</_>\n        <_>\n          8 15 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 2 -1.</_>\n        <_>\n          6 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 3 -1.</_>\n        <_>\n          17 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 1 3 -1.</_>\n        <_>\n          8 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 1 3 -1.</_>\n        <_>\n          18 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 5 6 -1.</_>\n        <_>\n          5 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 3 -1.</_>\n        <_>\n          13 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 10 -1.</_>\n        <_>\n          6 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 4 4 -1.</_>\n        <_>\n          5 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 4 1 -1.</_>\n        <_>\n          4 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 2 -1.</_>\n        <_>\n          7 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 2 6 -1.</_>\n        <_>\n          8 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 10 -1.</_>\n        <_>\n          10 10 10 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 2 2 -1.</_>\n        <_>\n          13 8 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 10 4 -1.</_>\n        <_>\n          15 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 16 2 -1.</_>\n        <_>\n          8 10 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 6 -1.</_>\n        <_>\n          10 14 3 3 2.</_>\n        <_>\n          13 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 1 3 -1.</_>\n        <_>\n          13 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 10 8 -1.</_>\n        <_>\n          4 4 5 4 2.</_>\n        <_>\n          9 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 6 -1.</_>\n        <_>\n          5 1 3 3 2.</_>\n        <_>\n          8 4 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 3 -1.</_>\n        <_>\n          11 11 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 6 -1.</_>\n        <_>\n          3 13 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 6 -1.</_>\n        <_>\n          8 0 6 3 2.</_>\n        <_>\n          14 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 4 -1.</_>\n        <_>\n          7 8 1 2 2.</_>\n        <_>\n          8 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 7 10 -1.</_>\n        <_>\n          11 6 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 3 2 -1.</_>\n        <_>\n          10 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 3 -1.</_>\n        <_>\n          12 11 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 2 -1.</_>\n        <_>\n          6 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 1 3 -1.</_>\n        <_>\n          11 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 3 -1.</_>\n        <_>\n          5 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 2 -1.</_>\n        <_>\n          12 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 9 -1.</_>\n        <_>\n          11 6 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 3 3 -1.</_>\n        <_>\n          11 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 1 3 -1.</_>\n        <_>\n          6 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 3 -1.</_>\n        <_>\n          10 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 6 -1.</_>\n        <_>\n          7 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 6 -1.</_>\n        <_>\n          3 0 2 3 2.</_>\n        <_>\n          5 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 17 -1.</_>\n        <_>\n          6 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 6 3 -1.</_>\n        <_>\n          12 10 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 19 8 1 -1.</_>\n        <_>\n          14 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 5 3 -1.</_>\n        <_>\n          13 4 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 2 -1.</_>\n        <_>\n          6 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 3 10 -1.</_>\n        <_>\n          13 10 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 3 -1.</_>\n        <_>\n          7 7 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 1 3 -1.</_>\n        <_>\n          6 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 3 -1.</_>\n        <_>\n          6 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 3 -1.</_>\n        <_>\n          11 4 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 2 3 -1.</_>\n        <_>\n          13 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 8 4 -1.</_>\n        <_>\n          6 16 4 2 2.</_>\n        <_>\n          10 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 3 15 -1.</_>\n        <_>\n          11 5 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 6 -1.</_>\n        <_>\n          10 0 5 3 2.</_>\n        <_>\n          15 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 16 -1.</_>\n        <_>\n          12 2 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 2 2 -1.</_>\n        <_>\n          7 12 1 1 2.</_>\n        <_>\n          8 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 1 -1.</_>\n        <_>\n          7 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 4 -1.</_>\n        <_>\n          7 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 16 6 -1.</_>\n        <_>\n          0 15 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 2 3 -1.</_>\n        <_>\n          7 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 2 2 -1.</_>\n        <_>\n          15 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 12 2 2 -1.</_>\n        <_>\n          17 12 1 1 2.</_>\n        <_>\n          18 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 19 -1.</_>\n        <_>\n          12 1 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 19 4 -1.</_>\n        <_>\n          1 13 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 2 10 -1.</_>\n        <_>\n          17 8 1 5 2.</_>\n        <_>\n          18 13 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 11 20 -1.</_>\n        <_>\n          9 10 11 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 12 -1.</_>\n        <_>\n          4 1 6 6 2.</_>\n        <_>\n          10 7 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 6 -1.</_>\n        <_>\n          6 11 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 1 -1.</_>\n        <_>\n          5 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 4 -1.</_>\n        <_>\n          19 1 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 15 -1.</_>\n        <_>\n          15 0 4 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 2 -1.</_>\n        <_>\n          7 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 2 2 -1.</_>\n        <_>\n          17 11 1 1 2.</_>\n        <_>\n          18 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 8 -1.</_>\n        <_>\n          6 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 4 -1.</_>\n        <_>\n          9 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 2 -1.</_>\n        <_>\n          0 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 8 4 -1.</_>\n        <_>\n          7 14 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 3 2 -1.</_>\n        <_>\n          11 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 2 -1.</_>\n        <_>\n          5 8 1 1 2.</_>\n        <_>\n          6 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 3 -1.</_>\n        <_>\n          12 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 2 -1.</_>\n        <_>\n          10 8 1 1 2.</_>\n        <_>\n          11 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 2 -1.</_>\n        <_>\n          7 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 2 1 -1.</_>\n        <_>\n          14 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 2 6 -1.</_>\n        <_>\n          16 9 1 3 2.</_>\n        <_>\n          17 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 2 6 -1.</_>\n        <_>\n          17 4 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 7 6 -1.</_>\n        <_>\n          13 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 4 4 -1.</_>\n        <_>\n          16 10 2 2 2.</_>\n        <_>\n          18 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 2 -1.</_>\n        <_>\n          11 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 3 3 -1.</_>\n        <_>\n          6 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 4 2 -1.</_>\n        <_>\n          4 15 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 2 1 -1.</_>\n        <_>\n          1 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 4 8 -1.</_>\n        <_>\n          7 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 7 3 -1.</_>\n        <_>\n          9 18 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 2 3 -1.</_>\n        <_>\n          7 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 4 3 -1.</_>\n        <_>\n          12 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 9 11 -1.</_>\n        <_>\n          14 7 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 4 5 -1.</_>\n        <_>\n          18 14 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 3 4 -1.</_>\n        <_>\n          10 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 2 8 -1.</_>\n        <_>\n          3 11 1 4 2.</_>\n        <_>\n          4 15 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 18 -1.</_>\n        <_>\n          13 2 3 9 2.</_>\n        <_>\n          16 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 5 2 -1.</_>\n        <_>\n          9 13 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 10 -1.</_>\n        <_>\n          11 8 2 5 2.</_>\n        <_>\n          13 13 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 1 -1.</_>\n        <_>\n          10 11 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 1 2 -1.</_>\n        <_>\n          1 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 3 -1.</_>\n        <_>\n          8 7 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 10 3 -1.</_>\n        <_>\n          13 5 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 6 -1.</_>\n        <_>\n          5 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 3 -1.</_>\n        <_>\n          8 11 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 3 7 -1.</_>\n        <_>\n          3 8 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 6 -1.</_>\n        <_>\n          3 10 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 2 -1.</_>\n        <_>\n          15 0 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 4 -1.</_>\n        <_>\n          8 7 2 2 2.</_>\n        <_>\n          10 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 4 3 -1.</_>\n        <_>\n          4 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 2 -1.</_>\n        <_>\n          8 12 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 1 4 -1.</_>\n        <_>\n          17 5 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 3 -1.</_>\n        <_>\n          6 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 8 -1.</_>\n        <_>\n          7 9 3 4 2.</_>\n        <_>\n          10 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 2 3 -1.</_>\n        <_>\n          5 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 4 9 -1.</_>\n        <_>\n          7 13 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 1 -1.</_>\n        <_>\n          6 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 19 -1.</_>\n        <_>\n          2 1 2 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 2 -1.</_>\n        <_>\n          8 8 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          5 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 4 -1.</_>\n        <_>\n          9 12 1 2 2.</_>\n        <_>\n          10 14 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 10 -1.</_>\n        <_>\n          12 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 8 -1.</_>\n        <_>\n          10 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 2 6 -1.</_>\n        <_>\n          5 3 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 3 3 -1.</_>\n        <_>\n          5 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 2 8 -1.</_>\n        <_>\n          10 7 1 4 2.</_>\n        <_>\n          11 11 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 10 -1.</_>\n        <_>\n          2 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 2 -1.</_>\n        <_>\n          8 11 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 2 1 -1.</_>\n        <_>\n          11 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 4 3 -1.</_>\n        <_>\n          4 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 2 -1.</_>\n        <_>\n          8 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 1 -1.</_>\n        <_>\n          8 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 3 -1.</_>\n        <_>\n          5 6 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 5 3 -1.</_>\n        <_>\n          5 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 9 -1.</_>\n        <_>\n          10 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 1 2 -1.</_>\n        <_>\n          17 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 10 4 -1.</_>\n        <_>\n          4 9 5 2 2.</_>\n        <_>\n          9 11 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 10 -1.</_>\n        <_>\n          5 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 5 -1.</_>\n        <_>\n          11 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 3 -1.</_>\n        <_>\n          5 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 4 -1.</_>\n        <_>\n          9 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 15 6 -1.</_>\n        <_>\n          5 13 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 6 -1.</_>\n        <_>\n          16 0 2 3 2.</_>\n        <_>\n          18 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 2 -1.</_>\n        <_>\n          11 12 1 1 2.</_>\n        <_>\n          12 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 3 5 -1.</_>\n        <_>\n          7 6 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 2 1 -1.</_>\n        <_>\n          14 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 2 -1.</_>\n        <_>\n          6 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 3 1 -1.</_>\n        <_>\n          17 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 8 -1.</_>\n        <_>\n          14 5 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 4 4 -1.</_>\n        <_>\n          5 13 2 2 2.</_>\n        <_>\n          7 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 3 -1.</_>\n        <_>\n          6 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 2 10 -1.</_>\n        <_>\n          9 2 1 5 2.</_>\n        <_>\n          10 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 1 2 -1.</_>\n        <_>\n          9 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 2 4 -1.</_>\n        <_>\n          15 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 3 -1.</_>\n        <_>\n          7 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 2 -1.</_>\n        <_>\n          7 10 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 2 2 -1.</_>\n        <_>\n          13 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 3 -1.</_>\n        <_>\n          9 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 5 2 -1.</_>\n        <_>\n          13 11 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 2 2 -1.</_>\n        <_>\n          16 11 1 1 2.</_>\n        <_>\n          17 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 2 4 -1.</_>\n        <_>\n          0 10 1 2 2.</_>\n        <_>\n          1 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 8 -1.</_>\n        <_>\n          0 8 1 4 2.</_>\n        <_>\n          1 12 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 5 3 -1.</_>\n        <_>\n          6 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 2 4 -1.</_>\n        <_>\n          19 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 3 1 -1.</_>\n        <_>\n          15 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 3 3 -1.</_>\n        <_>\n          9 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 6 3 -1.</_>\n        <_>\n          5 14 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 1 3 -1.</_>\n        <_>\n          12 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 14 6 -1.</_>\n        <_>\n          2 17 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 2 4 -1.</_>\n        <_>\n          7 5 1 2 2.</_>\n        <_>\n          8 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 2 2 -1.</_>\n        <_>\n          5 17 1 1 2.</_>\n        <_>\n          6 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 3 5 -1.</_>\n        <_>\n          10 3 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 4 3 -1.</_>\n        <_>\n          6 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 4 -1.</_>\n        <_>\n          12 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 10 -1.</_>\n        <_>\n          4 8 3 5 2.</_>\n        <_>\n          7 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 2 6 -1.</_>\n        <_>\n          5 3 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 6 -1.</_>\n        <_>\n          5 4 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 8 -1.</_>\n        <_>\n          5 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 2 -1.</_>\n        <_>\n          5 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 1 3 -1.</_>\n        <_>\n          12 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 15 -1.</_>\n        <_>\n          5 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 1 3 -1.</_>\n        <_>\n          6 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 3 3 -1.</_>\n        <_>\n          6 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 3 -1.</_>\n        <_>\n          12 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 3 -1.</_>\n        <_>\n          7 2 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 5 -1.</_>\n        <_>\n          12 0 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 8 -1.</_>\n        <_>\n          13 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 4 -1.</_>\n        <_>\n          9 11 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 16 -1.</_>\n        <_>\n          5 2 3 8 2.</_>\n        <_>\n          8 10 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 3 -1.</_>\n        <_>\n          13 7 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 1 -1.</_>\n        <_>\n          13 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 8 -1.</_>\n        <_>\n          0 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 15 -1.</_>\n        <_>\n          8 5 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 2 2 -1.</_>\n        <_>\n          8 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 1 2 -1.</_>\n        <_>\n          1 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 11 -1.</_>\n        <_>\n          9 2 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 6 -1.</_>\n        <_>\n          9 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 3 -1.</_>\n        <_>\n          9 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 3 -1.</_>\n        <_>\n          6 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 2 8 -1.</_>\n        <_>\n          13 5 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 4 -1.</_>\n        <_>\n          6 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 14 -1.</_>\n        <_>\n          10 6 10 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 6 -1.</_>\n        <_>\n          8 0 6 3 2.</_>\n        <_>\n          14 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 9 -1.</_>\n        <_>\n          8 10 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 6 -1.</_>\n        <_>\n          10 14 3 3 2.</_>\n        <_>\n          13 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 10 -1.</_>\n        <_>\n          8 7 2 5 2.</_>\n        <_>\n          10 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 3 3 -1.</_>\n        <_>\n          15 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          16 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 6 -1.</_>\n        <_>\n          5 9 5 3 2.</_>\n        <_>\n          10 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 1 -1.</_>\n        <_>\n          12 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 7 -1.</_>\n        <_>\n          12 7 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 18 -1.</_>\n        <_>\n          9 0 1 9 2.</_>\n        <_>\n          10 9 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 3 4 -1.</_>\n        <_>\n          4 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 2 2 -1.</_>\n        <_>\n          14 10 1 1 2.</_>\n        <_>\n          15 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 2 -1.</_>\n        <_>\n          5 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 3 -1.</_>\n        <_>\n          10 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 3 -1.</_>\n        <_>\n          12 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 2 8 -1.</_>\n        <_>\n          3 0 1 4 2.</_>\n        <_>\n          4 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 5 3 -1.</_>\n        <_>\n          14 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 1 3 -1.</_>\n        <_>\n          6 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 2 3 -1.</_>\n        <_>\n          5 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 6 -1.</_>\n        <_>\n          4 6 5 3 2.</_>\n        <_>\n          9 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 7 4 -1.</_>\n        <_>\n          9 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 2 4 -1.</_>\n        <_>\n          10 11 1 2 2.</_>\n        <_>\n          11 13 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 3 -1.</_>\n        <_>\n          5 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 3 2 -1.</_>\n        <_>\n          5 14 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 8 4 -1.</_>\n        <_>\n          7 15 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 1 -1.</_>\n        <_>\n          9 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 1 4 -1.</_>\n        <_>\n          6 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 6 -1.</_>\n        <_>\n          8 0 6 3 2.</_>\n        <_>\n          14 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 3 -1.</_>\n        <_>\n          8 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 3 -1.</_>\n        <_>\n          8 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 1 -1.</_>\n        <_>\n          8 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 2 2 -1.</_>\n        <_>\n          7 9 1 1 2.</_>\n        <_>\n          8 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 4 6 -1.</_>\n        <_>\n          15 14 2 3 2.</_>\n        <_>\n          17 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 1 4 -1.</_>\n        <_>\n          7 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 3 9 -1.</_>\n        <_>\n          11 11 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 1 -1.</_>\n        <_>\n          18 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 1 -1.</_>\n        <_>\n          18 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 1 2 -1.</_>\n        <_>\n          0 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 7 3 -1.</_>\n        <_>\n          9 16 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 2 -1.</_>\n        <_>\n          16 0 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 1 14 -1.</_>\n        <_>\n          5 7 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 1 2 -1.</_>\n        <_>\n          7 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 6 -1.</_>\n        <_>\n          7 2 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 2 -1.</_>\n        <_>\n          8 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 3 -1.</_>\n        <_>\n          5 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 1 2 -1.</_>\n        <_>\n          18 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 10 -1.</_>\n        <_>\n          18 0 1 5 2.</_>\n        <_>\n          19 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 13 6 -1.</_>\n        <_>\n          0 4 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 2 -1.</_>\n        <_>\n          0 0 1 1 2.</_>\n        <_>\n          1 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 4 -1.</_>\n        <_>\n          7 12 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 4 10 -1.</_>\n        <_>\n          9 9 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 16 -1.</_>\n        <_>\n          2 8 9 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 2 8 -1.</_>\n        <_>\n          10 3 1 4 2.</_>\n        <_>\n          11 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 3 -1.</_>\n        <_>\n          5 2 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 3 -1.</_>\n        <_>\n          5 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 10 -1.</_>\n        <_>\n          3 7 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 2 1 -1.</_>\n        <_>\n          2 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 5 -1.</_>\n        <_>\n          13 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 6 -1.</_>\n        <_>\n          6 7 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 2 3 -1.</_>\n        <_>\n          13 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 4 -1.</_>\n        <_>\n          7 15 3 2 2.</_>\n        <_>\n          10 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 3 -1.</_>\n        <_>\n          10 16 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 2 6 -1.</_>\n        <_>\n          3 2 1 3 2.</_>\n        <_>\n          4 5 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 3 5 -1.</_>\n        <_>\n          11 15 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 5 2 -1.</_>\n        <_>\n          12 10 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 10 1 -1.</_>\n        <_>\n          9 11 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 6 2 -1.</_>\n        <_>\n          6 12 3 1 2.</_>\n        <_>\n          9 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 1 3 -1.</_>\n        <_>\n          6 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 8 4 -1.</_>\n        <_>\n          3 12 4 2 2.</_>\n        <_>\n          7 14 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 1 3 -1.</_>\n        <_>\n          0 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 1 -1.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 3 6 -1.</_>\n        <_>\n          3 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 6 -1.</_>\n        <_>\n          8 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 3 -1.</_>\n        <_>\n          12 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 3 -1.</_>\n        <_>\n          12 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 2 -1.</_>\n        <_>\n          6 10 1 1 2.</_>\n        <_>\n          7 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 9 6 -1.</_>\n        <_>\n          3 13 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 7 10 -1.</_>\n        <_>\n          4 13 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 11 3 -1.</_>\n        <_>\n          6 9 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 1 14 -1.</_>\n        <_>\n          6 12 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 5 10 -1.</_>\n        <_>\n          13 11 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 13 15 -1.</_>\n        <_>\n          2 5 13 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 2 -1.</_>\n        <_>\n          7 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 9 4 -1.</_>\n        <_>\n          7 5 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 3 -1.</_>\n        <_>\n          7 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 4 -1.</_>\n        <_>\n          9 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 7 2 -1.</_>\n        <_>\n          8 12 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 2 -1.</_>\n        <_>\n          5 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 2 6 -1.</_>\n        <_>\n          4 14 1 3 2.</_>\n        <_>\n          5 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 13 -1.</_>\n        <_>\n          4 7 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 9 -1.</_>\n        <_>\n          8 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 3 -1.</_>\n        <_>\n          9 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 2 6 -1.</_>\n        <_>\n          16 14 1 3 2.</_>\n        <_>\n          17 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 2 3 -1.</_>\n        <_>\n          11 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 1 2 -1.</_>\n        <_>\n          11 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 2 -1.</_>\n        <_>\n          8 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 5 -1.</_>\n        <_>\n          14 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 2 -1.</_>\n        <_>\n          6 15 4 1 2.</_>\n        <_>\n          10 16 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 3 4 -1.</_>\n        <_>\n          14 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 1 6 -1.</_>\n        <_>\n          1 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 2 -1.</_>\n        <_>\n          12 0 4 1 2.</_>\n        <_>\n          16 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 1 -1.</_>\n        <_>\n          6 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 2 4 -1.</_>\n        <_>\n          8 5 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 1 -1.</_>\n        <_>\n          8 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 3 -1.</_>\n        <_>\n          0 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 2 2 -1.</_>\n        <_>\n          3 17 1 1 2.</_>\n        <_>\n          4 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 9 -1.</_>\n        <_>\n          12 0 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 3 -1.</_>\n        <_>\n          11 0 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 3 2.</_>\n        <_>\n          17 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 1 2 -1.</_>\n        <_>\n          15 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 1 6 -1.</_>\n        <_>\n          8 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 2 -1.</_>\n        <_>\n          6 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 4 6 -1.</_>\n        <_>\n          6 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 10 2 -1.</_>\n        <_>\n          13 6 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 15 -1.</_>\n        <_>\n          4 1 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 6 -1.</_>\n        <_>\n          5 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 1 -1.</_>\n        <_>\n          13 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 2 -1.</_>\n        <_>\n          8 4 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 4 8 -1.</_>\n        <_>\n          12 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 2 4 -1.</_>\n        <_>\n          15 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 3 3 -1.</_>\n        <_>\n          6 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 3 -1.</_>\n        <_>\n          6 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 6 -1.</_>\n        <_>\n          7 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 9 -1.</_>\n        <_>\n          7 11 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 4 3 -1.</_>\n        <_>\n          5 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 2 -1.</_>\n        <_>\n          11 12 1 1 2.</_>\n        <_>\n          12 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 5 3 -1.</_>\n        <_>\n          5 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 8 1 -1.</_>\n        <_>\n          8 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 6 -1.</_>\n        <_>\n          12 0 4 3 2.</_>\n        <_>\n          16 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 3 -1.</_>\n        <_>\n          9 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 7 15 -1.</_>\n        <_>\n          8 5 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 4 -1.</_>\n        <_>\n          3 0 4 2 2.</_>\n        <_>\n          7 2 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 1 -1.</_>\n        <_>\n          10 11 10 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 3 2 -1.</_>\n        <_>\n          4 14 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 8 -1.</_>\n        <_>\n          4 11 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 5 -1.</_>\n        <_>\n          8 13 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 3 3 -1.</_>\n        <_>\n          14 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 3 -1.</_>\n        <_>\n          5 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 1 2 -1.</_>\n        <_>\n          6 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 3 1 -1.</_>\n        <_>\n          6 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 3 -1.</_>\n        <_>\n          12 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 1 3 -1.</_>\n        <_>\n          5 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 12 9 -1.</_>\n        <_>\n          1 12 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 3 3 -1.</_>\n        <_>\n          12 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 5 3 -1.</_>\n        <_>\n          10 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          5 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 6 -1.</_>\n        <_>\n          5 14 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 14 -1.</_>\n        <_>\n          6 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 5 2 -1.</_>\n        <_>\n          2 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 1 2 -1.</_>\n        <_>\n          10 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 4 6 -1.</_>\n        <_>\n          7 16 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 1 -1.</_>\n        <_>\n          9 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 1 -1.</_>\n        <_>\n          5 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 3 4 -1.</_>\n        <_>\n          4 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 8 -1.</_>\n        <_>\n          4 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 2 2 -1.</_>\n        <_>\n          12 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 2 2 -1.</_>\n        <_>\n          16 10 1 1 2.</_>\n        <_>\n          17 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 5 8 -1.</_>\n        <_>\n          7 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 10 -1.</_>\n        <_>\n          4 5 4 5 2.</_>\n        <_>\n          8 10 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 3 -1.</_>\n        <_>\n          7 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 10 14 -1.</_>\n        <_>\n          10 13 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 2 3 -1.</_>\n        <_>\n          8 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 1 4 -1.</_>\n        <_>\n          13 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 12 4 -1.</_>\n        <_>\n          3 9 6 2 2.</_>\n        <_>\n          9 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 3 6 -1.</_>\n        <_>\n          7 16 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 2 -1.</_>\n        <_>\n          11 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 10 4 -1.</_>\n        <_>\n          3 4 5 2 2.</_>\n        <_>\n          8 6 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 3 -1.</_>\n        <_>\n          4 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 4 -1.</_>\n        <_>\n          5 3 3 2 2.</_>\n        <_>\n          8 5 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 10 -1.</_>\n        <_>\n          9 8 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 3 -1.</_>\n        <_>\n          10 16 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 3 7 -1.</_>\n        <_>\n          4 4 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 3 11 -1.</_>\n        <_>\n          4 3 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 5 3 -1.</_>\n        <_>\n          7 15 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 2 2 -1.</_>\n        <_>\n          17 11 1 1 2.</_>\n        <_>\n          18 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 4 -1.</_>\n        <_>\n          10 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 1 -1.</_>\n        <_>\n          12 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 2 2 -1.</_>\n        <_>\n          17 11 1 1 2.</_>\n        <_>\n          18 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 2 1 -1.</_>\n        <_>\n          1 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 8 -1.</_>\n        <_>\n          17 0 1 4 2.</_>\n        <_>\n          18 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 2 -1.</_>\n        <_>\n          8 7 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 9 -1.</_>\n        <_>\n          8 7 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 9 3 -1.</_>\n        <_>\n          9 8 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 4 -1.</_>\n        <_>\n          13 7 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 2 -1.</_>\n        <_>\n          9 5 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 4 10 -1.</_>\n        <_>\n          15 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 1 2 -1.</_>\n        <_>\n          9 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 8 2 -1.</_>\n        <_>\n          7 15 4 1 2.</_>\n        <_>\n          11 16 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 9 -1.</_>\n        <_>\n          7 5 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 4 -1.</_>\n        <_>\n          7 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 2 4 -1.</_>\n        <_>\n          11 15 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 7 4 -1.</_>\n        <_>\n          12 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 9 3 -1.</_>\n        <_>\n          8 9 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 5 -1.</_>\n        <_>\n          8 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 4 3 -1.</_>\n        <_>\n          7 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 4 3 -1.</_>\n        <_>\n          15 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 2 2 -1.</_>\n        <_>\n          16 10 1 1 2.</_>\n        <_>\n          17 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 9 -1.</_>\n        <_>\n          8 6 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 6 -1.</_>\n        <_>\n          10 0 5 3 2.</_>\n        <_>\n          15 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 1 2 -1.</_>\n        <_>\n          13 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 3 1 -1.</_>\n        <_>\n          11 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 1 3 -1.</_>\n        <_>\n          6 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 4 3 -1.</_>\n        <_>\n          11 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 6 -1.</_>\n        <_>\n          14 10 3 3 2.</_>\n        <_>\n          17 13 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 1 2 -1.</_>\n        <_>\n          1 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 1 3 -1.</_>\n        <_>\n          6 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 1 3 -1.</_>\n        <_>\n          7 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 3 2 -1.</_>\n        <_>\n          9 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 9 -1.</_>\n        <_>\n          6 8 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 2 10 -1.</_>\n        <_>\n          3 3 1 5 2.</_>\n        <_>\n          4 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 3 1 -1.</_>\n        <_>\n          4 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 1 -1.</_>\n        <_>\n          3 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 3 -1.</_>\n        <_>\n          7 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 1 9 -1.</_>\n        <_>\n          7 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 1 9 -1.</_>\n        <_>\n          7 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 3 10 -1.</_>\n        <_>\n          16 7 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 10 -1.</_>\n        <_>\n          16 7 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 6 -1.</_>\n        <_>\n          2 14 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 1 -1.</_>\n        <_>\n          4 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 3 6 -1.</_>\n        <_>\n          2 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 1 -1.</_>\n        <_>\n          9 6 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 1 -1.</_>\n        <_>\n          11 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 10 -1.</_>\n        <_>\n          16 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 7 -1.</_>\n        <_>\n          14 5 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 4 -1.</_>\n        <_>\n          8 5 4 2 2.</_>\n        <_>\n          12 7 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 1 8 -1.</_>\n        <_>\n          11 15 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 4 -1.</_>\n        <_>\n          6 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 2 -1.</_>\n        <_>\n          7 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 11 -1.</_>\n        <_>\n          4 2 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 8 -1.</_>\n        <_>\n          8 10 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 2 6 -1.</_>\n        <_>\n          5 4 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 1 2 -1.</_>\n        <_>\n          13 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 3 2 -1.</_>\n        <_>\n          4 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 1 3 -1.</_>\n        <_>\n          13 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 4 1 -1.</_>\n        <_>\n          11 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 2 3 -1.</_>\n        <_>\n          15 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 11 4 -1.</_>\n        <_>\n          5 13 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 1 3 -1.</_>\n        <_>\n          7 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 4 -1.</_>\n        <_>\n          6 14 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 1 3 -1.</_>\n        <_>\n          7 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 3 -1.</_>\n        <_>\n          10 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 1 -1.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 12 16 -1.</_>\n        <_>\n          7 1 6 8 2.</_>\n        <_>\n          13 9 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 7 -1.</_>\n        <_>\n          14 5 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 2 10 -1.</_>\n        <_>\n          18 8 1 5 2.</_>\n        <_>\n          19 13 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 2 -1.</_>\n        <_>\n          13 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 3 1 -1.</_>\n        <_>\n          4 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 2 1 -1.</_>\n        <_>\n          6 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 1 2 -1.</_>\n        <_>\n          11 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 1 -1.</_>\n        <_>\n          11 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 7 2 -1.</_>\n        <_>\n          5 10 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 1 -1.</_>\n        <_>\n          12 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 2 -1.</_>\n        <_>\n          12 0 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 2 -1.</_>\n        <_>\n          5 0 1 1 2.</_>\n        <_>\n          6 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 6 -1.</_>\n        <_>\n          8 5 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 12 -1.</_>\n        <_>\n          18 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 1 -1.</_>\n        <_>\n          12 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 1 -1.</_>\n        <_>\n          6 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 6 -1.</_>\n        <_>\n          7 14 3 3 2.</_>\n        <_>\n          10 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 1 2 -1.</_>\n        <_>\n          11 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 12 4 -1.</_>\n        <_>\n          3 9 6 2 2.</_>\n        <_>\n          9 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 2 -1.</_>\n        <_>\n          5 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 1 -1.</_>\n        <_>\n          7 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 3 2 -1.</_>\n        <_>\n          9 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 3 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 3 2 -1.</_>\n        <_>\n          8 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 2 1 -1.</_>\n        <_>\n          9 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 3 -1.</_>\n        <_>\n          5 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 4 12 -1.</_>\n        <_>\n          8 7 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 7 -1.</_>\n        <_>\n          8 6 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 11 -1.</_>\n        <_>\n          11 4 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 3 -1.</_>\n        <_>\n          9 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 1 2 -1.</_>\n        <_>\n          0 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 1 -1.</_>\n        <_>\n          7 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 2 2 -1.</_>\n        <_>\n          13 1 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 10 12 -1.</_>\n        <_>\n          4 4 5 6 2.</_>\n        <_>\n          9 10 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 2 2 -1.</_>\n        <_>\n          5 18 1 1 2.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 3 -1.</_>\n        <_>\n          7 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 2 3 -1.</_>\n        <_>\n          5 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 2 3 -1.</_>\n        <_>\n          11 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 1 3 -1.</_>\n        <_>\n          11 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 2 -1.</_>\n        <_>\n          7 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 14 1 -1.</_>\n        <_>\n          10 11 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 1 -1.</_>\n        <_>\n          6 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 3 3 -1.</_>\n        <_>\n          14 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 2 2 -1.</_>\n        <_>\n          4 17 1 1 2.</_>\n        <_>\n          5 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 12 2 2 -1.</_>\n        <_>\n          18 12 1 1 2.</_>\n        <_>\n          19 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 3 -1.</_>\n        <_>\n          7 11 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 3 -1.</_>\n        <_>\n          9 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 2 -1.</_>\n        <_>\n          18 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 2 -1.</_>\n        <_>\n          18 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 2 6 -1.</_>\n        <_>\n          4 7 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 6 4 -1.</_>\n        <_>\n          3 11 3 2 2.</_>\n        <_>\n          6 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 3 3 -1.</_>\n        <_>\n          2 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 4 -1.</_>\n        <_>\n          15 0 2 2 2.</_>\n        <_>\n          17 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 10 -1.</_>\n        <_>\n          5 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 1 3 -1.</_>\n        <_>\n          7 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 4 -1.</_>\n        <_>\n          3 10 8 2 2.</_>\n        <_>\n          11 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 1 3 -1.</_>\n        <_>\n          7 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 3 3 -1.</_>\n        <_>\n          5 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 8 -1.</_>\n        <_>\n          10 9 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 7 4 -1.</_>\n        <_>\n          6 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 1 4 -1.</_>\n        <_>\n          8 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 1 6 -1.</_>\n        <_>\n          1 6 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 15 3 -1.</_>\n        <_>\n          5 2 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 2 -1.</_>\n        <_>\n          0 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 4 -1.</_>\n        <_>\n          5 10 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 1 -1.</_>\n        <_>\n          9 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 2 -1.</_>\n        <_>\n          15 11 1 1 2.</_>\n        <_>\n          16 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 6 2 -1.</_>\n        <_>\n          7 11 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 4 -1.</_>\n        <_>\n          8 8 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 6 -1.</_>\n        <_>\n          8 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 2 3 -1.</_>\n        <_>\n          15 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 7 -1.</_>\n        <_>\n          12 5 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 8 4 -1.</_>\n        <_>\n          7 16 4 2 2.</_>\n        <_>\n          11 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 12 4 -1.</_>\n        <_>\n          5 16 6 2 2.</_>\n        <_>\n          11 18 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 6 3 -1.</_>\n        <_>\n          10 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 3 -1.</_>\n        <_>\n          6 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 18 -1.</_>\n        <_>\n          10 0 10 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 5 -1.</_>\n        <_>\n          11 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 2 -1.</_>\n        <_>\n          13 5 2 1 2.</_>\n        <_>\n          15 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 11 -1.</_>\n        <_>\n          12 4 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 3 1 -1.</_>\n        <_>\n          6 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 2 3 -1.</_>\n        <_>\n          17 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 8 6 -1.</_>\n        <_>\n          6 13 4 3 2.</_>\n        <_>\n          10 16 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 3 10 -1.</_>\n        <_>\n          18 5 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 2 -1.</_>\n        <_>\n          14 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 9 -1.</_>\n        <_>\n          5 12 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 3 -1.</_>\n        <_>\n          5 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 2 2 -1.</_>\n        <_>\n          15 15 1 1 2.</_>\n        <_>\n          16 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 5 -1.</_>\n        <_>\n          8 13 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 8 -1.</_>\n        <_>\n          9 7 1 4 2.</_>\n        <_>\n          10 11 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 2 2 -1.</_>\n        <_>\n          4 12 1 1 2.</_>\n        <_>\n          5 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 1 -1.</_>\n        <_>\n          8 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 4 -1.</_>\n        <_>\n          13 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 20 -1.</_>\n        <_>\n          2 10 18 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 7 12 -1.</_>\n        <_>\n          11 8 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 2 -1.</_>\n        <_>\n          14 5 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 4 1 -1.</_>\n        <_>\n          6 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 4 4 -1.</_>\n        <_>\n          5 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 18 -1.</_>\n        <_>\n          0 11 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 3 -1.</_>\n        <_>\n          5 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 2 -1.</_>\n        <_>\n          9 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 4 -1.</_>\n        <_>\n          5 9 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 8 -1.</_>\n        <_>\n          10 0 5 4 2.</_>\n        <_>\n          15 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 4 4 -1.</_>\n        <_>\n          10 8 2 2 2.</_>\n        <_>\n          12 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 10 -1.</_>\n        <_>\n          5 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 4 -1.</_>\n        <_>\n          8 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 2 2 -1.</_>\n        <_>\n          12 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 12 -1.</_>\n        <_>\n          7 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 18 -1.</_>\n        <_>\n          2 0 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 10 6 -1.</_>\n        <_>\n          6 3 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 3 2 -1.</_>\n        <_>\n          13 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 3 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 1 10 -1.</_>\n        <_>\n          6 15 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 4 -1.</_>\n        <_>\n          9 11 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 2 -1.</_>\n        <_>\n          7 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 1 -1.</_>\n        <_>\n          13 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 1 3 -1.</_>\n        <_>\n          7 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          5 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 1 2 -1.</_>\n        <_>\n          1 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 6 3 -1.</_>\n        <_>\n          10 17 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 4 6 -1.</_>\n        <_>\n          9 4 2 3 2.</_>\n        <_>\n          11 7 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 10 1 -1.</_>\n        <_>\n          15 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 1 2 -1.</_>\n        <_>\n          9 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 6 -1.</_>\n        <_>\n          7 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 8 2 -1.</_>\n        <_>\n          1 18 4 1 2.</_>\n        <_>\n          5 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 3 3 -1.</_>\n        <_>\n          5 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 5 6 -1.</_>\n        <_>\n          4 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 1 -1.</_>\n        <_>\n          7 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 1 6 -1.</_>\n        <_>\n          11 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 4 3 -1.</_>\n        <_>\n          6 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 2 10 -1.</_>\n        <_>\n          10 4 1 5 2.</_>\n        <_>\n          11 9 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 9 13 -1.</_>\n        <_>\n          11 4 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 2 2 -1.</_>\n        <_>\n          11 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 1 2 -1.</_>\n        <_>\n          13 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 13 -1.</_>\n        <_>\n          18 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 10 -1.</_>\n        <_>\n          0 5 14 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 15 -1.</_>\n        <_>\n          14 5 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 2 3 -1.</_>\n        <_>\n          11 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 3 3 -1.</_>\n        <_>\n          5 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 3 2 -1.</_>\n        <_>\n          5 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 3 6 -1.</_>\n        <_>\n          12 14 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 2 1 -1.</_>\n        <_>\n          13 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 1 2 -1.</_>\n        <_>\n          16 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 3 4 -1.</_>\n        <_>\n          18 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 2 3 -1.</_>\n        <_>\n          9 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 4 -1.</_>\n        <_>\n          6 7 1 2 2.</_>\n        <_>\n          7 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 12 2 -1.</_>\n        <_>\n          7 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 3 -1.</_>\n        <_>\n          5 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 2 1 -1.</_>\n        <_>\n          2 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 2 5 -1.</_>\n        <_>\n          5 4 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 2 -1.</_>\n        <_>\n          13 7 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 2 3 -1.</_>\n        <_>\n          14 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 1 3 -1.</_>\n        <_>\n          6 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 16 -1.</_>\n        <_>\n          11 11 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 5 3 -1.</_>\n        <_>\n          9 13 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 1 3 -1.</_>\n        <_>\n          5 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 8 4 -1.</_>\n        <_>\n          3 8 4 2 2.</_>\n        <_>\n          7 10 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 2 3 -1.</_>\n        <_>\n          10 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 1 6 -1.</_>\n        <_>\n          14 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 1 3 -1.</_>\n        <_>\n          13 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 6 -1.</_>\n        <_>\n          8 9 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 3 -1.</_>\n        <_>\n          9 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 2 5 -1.</_>\n        <_>\n          9 2 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 3 3 -1.</_>\n        <_>\n          13 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 5 14 -1.</_>\n        <_>\n          12 7 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 7 10 -1.</_>\n        <_>\n          2 7 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 6 11 -1.</_>\n        <_>\n          8 5 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 3 3 -1.</_>\n        <_>\n          6 18 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 8 -1.</_>\n        <_>\n          9 5 1 4 2.</_>\n        <_>\n          10 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 16 -1.</_>\n        <_>\n          14 8 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 1 3 -1.</_>\n        <_>\n          10 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 3 2 -1.</_>\n        <_>\n          8 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 1 3 -1.</_>\n        <_>\n          10 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 14 6 -1.</_>\n        <_>\n          5 14 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 1 3 -1.</_>\n        <_>\n          9 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 5 4 -1.</_>\n        <_>\n          6 13 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 10 8 -1.</_>\n        <_>\n          6 9 5 4 2.</_>\n        <_>\n          11 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 6 -1.</_>\n        <_>\n          18 9 1 3 2.</_>\n        <_>\n          19 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 8 2 -1.</_>\n        <_>\n          9 12 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 12 -1.</_>\n        <_>\n          8 8 3 6 2.</_>\n        <_>\n          11 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 5 -1.</_>\n        <_>\n          13 7 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 4 3 -1.</_>\n        <_>\n          10 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 15 -1.</_>\n        <_>\n          13 4 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 4 2 -1.</_>\n        <_>\n          6 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 1 -1.</_>\n        <_>\n          16 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 8 -1.</_>\n        <_>\n          16 3 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 16 6 4 -1.</_>\n        <_>\n          13 16 3 2 2.</_>\n        <_>\n          16 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 7 -1.</_>\n        <_>\n          12 5 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 2 -1.</_>\n        <_>\n          18 4 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 4 -1.</_>\n        <_>\n          11 0 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 2 2 -1.</_>\n        <_>\n          1 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 3 6 -1.</_>\n        <_>\n          5 12 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 2 -1.</_>\n        <_>\n          5 13 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 11 2 -1.</_>\n        <_>\n          4 15 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 8 3 -1.</_>\n        <_>\n          4 14 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 10 -1.</_>\n        <_>\n          3 7 3 5 2.</_>\n        <_>\n          6 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 4 -1.</_>\n        <_>\n          7 7 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 10 6 -1.</_>\n        <_>\n          2 14 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 9 12 -1.</_>\n        <_>\n          5 13 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 7 4 -1.</_>\n        <_>\n          9 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 8 4 -1.</_>\n        <_>\n          2 0 4 2 2.</_>\n        <_>\n          6 2 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 4 -1.</_>\n        <_>\n          4 0 2 2 2.</_>\n        <_>\n          6 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 2 -1.</_>\n        <_>\n          7 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 3 4 -1.</_>\n        <_>\n          3 11 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 2 1 -1.</_>\n        <_>\n          2 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 4 3 -1.</_>\n        <_>\n          15 13 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 7 3 -1.</_>\n        <_>\n          9 16 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 2 -1.</_>\n        <_>\n          7 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 10 -1.</_>\n        <_>\n          3 5 6 5 2.</_>\n        <_>\n          9 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 5 -1.</_>\n        <_>\n          10 2 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 1 -1.</_>\n        <_>\n          10 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 4 -1.</_>\n        <_>\n          3 10 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 2 10 -1.</_>\n        <_>\n          11 10 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 7 8 -1.</_>\n        <_>\n          8 10 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 3 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 8 4 -1.</_>\n        <_>\n          6 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 2 2 -1.</_>\n        <_>\n          1 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 4 2 -1.</_>\n        <_>\n          15 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 12 5 -1.</_>\n        <_>\n          12 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 9 1 -1.</_>\n        <_>\n          14 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 4 -1.</_>\n        <_>\n          15 10 1 2 2.</_>\n        <_>\n          16 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 1 3 -1.</_>\n        <_>\n          18 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 7 3 -1.</_>\n        <_>\n          4 11 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 1 -1.</_>\n        <_>\n          9 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 3 -1.</_>\n        <_>\n          7 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 3 3 -1.</_>\n        <_>\n          7 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 3 3 -1.</_>\n        <_>\n          7 16 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 1 3 -1.</_>\n        <_>\n          14 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 10 6 -1.</_>\n        <_>\n          2 17 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 5 3 -1.</_>\n        <_>\n          5 13 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 1 6 -1.</_>\n        <_>\n          7 11 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 5 6 -1.</_>\n        <_>\n          0 8 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 4 -1.</_>\n        <_>\n          6 12 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 9 2 -1.</_>\n        <_>\n          4 10 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 1 2 -1.</_>\n        <_>\n          7 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 4 -1.</_>\n        <_>\n          8 11 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 1 -1.</_>\n        <_>\n          12 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 2 -1.</_>\n        <_>\n          5 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 6 -1.</_>\n        <_>\n          7 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 4 -1.</_>\n        <_>\n          6 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 9 12 -1.</_>\n        <_>\n          14 1 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 4 9 -1.</_>\n        <_>\n          6 10 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 6 -1.</_>\n        <_>\n          11 7 4 3 2.</_>\n        <_>\n          15 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 7 3 -1.</_>\n        <_>\n          8 10 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 18 -1.</_>\n        <_>\n          5 2 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 3 -1.</_>\n        <_>\n          6 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 6 -1.</_>\n        <_>\n          6 11 4 3 2.</_>\n        <_>\n          10 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 4 7 -1.</_>\n        <_>\n          7 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 5 -1.</_>\n        <_>\n          8 8 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 1 3 -1.</_>\n        <_>\n          7 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 3 1 -1.</_>\n        <_>\n          16 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 2 -1.</_>\n        <_>\n          10 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 2 1 -1.</_>\n        <_>\n          12 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 2 -1.</_>\n        <_>\n          6 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 2 12 -1.</_>\n        <_>\n          11 2 1 6 2.</_>\n        <_>\n          12 8 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 6 -1.</_>\n        <_>\n          7 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 4 2 -1.</_>\n        <_>\n          4 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 1 2 -1.</_>\n        <_>\n          14 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 4 -1.</_>\n        <_>\n          4 0 1 2 2.</_>\n        <_>\n          5 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 2 1 -1.</_>\n        <_>\n          16 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 3 1 -1.</_>\n        <_>\n          4 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 4 -1.</_>\n        <_>\n          5 11 5 2 2.</_>\n        <_>\n          10 13 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 3 -1.</_>\n        <_>\n          4 11 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 4 6 -1.</_>\n        <_>\n          15 2 2 3 2.</_>\n        <_>\n          17 5 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 1 4 -1.</_>\n        <_>\n          5 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 2 -1.</_>\n        <_>\n          7 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 19 2 1 -1.</_>\n        <_>\n          12 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 2 -1.</_>\n        <_>\n          7 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 1 -1.</_>\n        <_>\n          7 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 2 -1.</_>\n        <_>\n          7 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 2 -1.</_>\n        <_>\n          6 8 1 1 2.</_>\n        <_>\n          7 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 2 -1.</_>\n        <_>\n          7 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 4 -1.</_>\n        <_>\n          4 8 1 2 2.</_>\n        <_>\n          5 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 7 3 -1.</_>\n        <_>\n          10 5 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 2 6 -1.</_>\n        <_>\n          5 5 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 1 3 -1.</_>\n        <_>\n          10 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 3 -1.</_>\n        <_>\n          9 11 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 3 2 -1.</_>\n        <_>\n          10 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 2 -1.</_>\n        <_>\n          10 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 12 3 1 -1.</_>\n        <_>\n          18 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 11 16 -1.</_>\n        <_>\n          9 8 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 6 -1.</_>\n        <_>\n          17 2 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 2 -1.</_>\n        <_>\n          0 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          5 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 10 9 -1.</_>\n        <_>\n          4 13 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 3 5 -1.</_>\n        <_>\n          4 3 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 2 6 -1.</_>\n        <_>\n          6 3 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 6 -1.</_>\n        <_>\n          5 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 2 -1.</_>\n        <_>\n          0 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 4 -1.</_>\n        <_>\n          8 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 3 -1.</_>\n        <_>\n          8 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 6 -1.</_>\n        <_>\n          9 8 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 12 -1.</_>\n        <_>\n          4 3 6 6 2.</_>\n        <_>\n          10 9 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 2 -1.</_>\n        <_>\n          13 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 10 2 -1.</_>\n        <_>\n          9 3 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 2 2 -1.</_>\n        <_>\n          18 14 1 1 2.</_>\n        <_>\n          19 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 2 -1.</_>\n        <_>\n          8 6 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 20 5 -1.</_>\n        <_>\n          10 14 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 2 1 -1.</_>\n        <_>\n          10 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 5 3 -1.</_>\n        <_>\n          5 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 2 -1.</_>\n        <_>\n          10 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 5 3 -1.</_>\n        <_>\n          6 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 8 -1.</_>\n        <_>\n          12 12 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 9 -1.</_>\n        <_>\n          4 6 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 3 -1.</_>\n        <_>\n          12 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 10 2 -1.</_>\n        <_>\n          5 17 5 1 2.</_>\n        <_>\n          10 18 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 2 3 -1.</_>\n        <_>\n          5 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 2 4 -1.</_>\n        <_>\n          6 14 1 2 2.</_>\n        <_>\n          7 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 6 3 -1.</_>\n        <_>\n          10 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 3 -1.</_>\n        <_>\n          19 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 2 2 -1.</_>\n        <_>\n          16 13 1 1 2.</_>\n        <_>\n          17 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 2 1 -1.</_>\n        <_>\n          1 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 6 6 -1.</_>\n        <_>\n          4 12 3 3 2.</_>\n        <_>\n          7 15 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 4 3 -1.</_>\n        <_>\n          5 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 3 2 -1.</_>\n        <_>\n          11 16 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 10 2 -1.</_>\n        <_>\n          1 0 5 1 2.</_>\n        <_>\n          6 1 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 14 -1.</_>\n        <_>\n          11 0 9 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 4 7 -1.</_>\n        <_>\n          17 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 4 -1.</_>\n        <_>\n          6 10 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 3 1 -1.</_>\n        <_>\n          16 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 5 3 -1.</_>\n        <_>\n          7 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 3 -1.</_>\n        <_>\n          14 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 2 1 -1.</_>\n        <_>\n          17 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 2 -1.</_>\n        <_>\n          17 0 1 1 2.</_>\n        <_>\n          18 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 6 -1.</_>\n        <_>\n          1 2 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 18 -1.</_>\n        <_>\n          3 7 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 1 12 -1.</_>\n        <_>\n          5 7 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 2 2 -1.</_>\n        <_>\n          16 9 1 1 2.</_>\n        <_>\n          17 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 11 -1.</_>\n        <_>\n          5 2 1 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 1 -1.</_>\n        <_>\n          5 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 2 2 -1.</_>\n        <_>\n          14 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 10 -1.</_>\n        <_>\n          10 0 5 5 2.</_>\n        <_>\n          15 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 6 1 2 -1.</_>\n        <_>\n          19 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 8 -1.</_>\n        <_>\n          11 0 3 4 2.</_>\n        <_>\n          14 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 2 -1.</_>\n        <_>\n          5 0 1 1 2.</_>\n        <_>\n          6 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 9 11 -1.</_>\n        <_>\n          6 1 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 3 2 -1.</_>\n        <_>\n          10 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 4 2 -1.</_>\n        <_>\n          12 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 1 6 -1.</_>\n        <_>\n          13 9 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 2 -1.</_>\n        <_>\n          8 10 3 1 2.</_>\n        <_>\n          11 11 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 4 6 -1.</_>\n        <_>\n          4 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 2 3 -1.</_>\n        <_>\n          17 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 8 14 -1.</_>\n        <_>\n          10 2 4 7 2.</_>\n        <_>\n          14 9 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 8 7 -1.</_>\n        <_>\n          16 8 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 18 1 -1.</_>\n        <_>\n          7 2 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 19 -1.</_>\n        <_>\n          4 1 4 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 12 -1.</_>\n        <_>\n          4 0 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 5 12 -1.</_>\n        <_>\n          13 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 1 4 -1.</_>\n        <_>\n          7 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 10 3 -1.</_>\n        <_>\n          5 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 12 4 -1.</_>\n        <_>\n          6 7 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 2 6 -1.</_>\n        <_>\n          9 1 1 3 2.</_>\n        <_>\n          10 4 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 3 -1.</_>\n        <_>\n          7 8 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 1 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 2 -1.</_>\n        <_>\n          5 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 4 1 -1.</_>\n        <_>\n          2 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 2 1 -1.</_>\n        <_>\n          2 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 2 3 -1.</_>\n        <_>\n          7 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 2 -1.</_>\n        <_>\n          10 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 1 -1.</_>\n        <_>\n          17 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 3 2 -1.</_>\n        <_>\n          17 10 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 1 -1.</_>\n        <_>\n          8 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 5 3 -1.</_>\n        <_>\n          14 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 2 3 -1.</_>\n        <_>\n          8 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 7 -1.</_>\n        <_>\n          8 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 6 -1.</_>\n        <_>\n          4 2 1 3 2.</_>\n        <_>\n          5 5 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 3 -1.</_>\n        <_>\n          4 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 7 12 -1.</_>\n        <_>\n          8 10 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 10 -1.</_>\n        <_>\n          8 10 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 5 -1.</_>\n        <_>\n          5 3 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 1 -1.</_>\n        <_>\n          10 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 3 4 -1.</_>\n        <_>\n          4 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 3 3 -1.</_>\n        <_>\n          13 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 2 3 -1.</_>\n        <_>\n          2 14 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 4 -1.</_>\n        <_>\n          5 0 1 2 2.</_>\n        <_>\n          6 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 4 3 -1.</_>\n        <_>\n          5 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 6 -1.</_>\n        <_>\n          6 12 1 3 2.</_>\n        <_>\n          7 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 2 -1.</_>\n        <_>\n          7 13 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 4 5 -1.</_>\n        <_>\n          11 10 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 2 1 -1.</_>\n        <_>\n          12 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 2 -1.</_>\n        <_>\n          6 7 1 1 2.</_>\n        <_>\n          7 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 5 -1.</_>\n        <_>\n          7 3 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 8 -1.</_>\n        <_>\n          7 6 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 3 -1.</_>\n        <_>\n          7 7 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 4 -1.</_>\n        <_>\n          10 12 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 3 1 -1.</_>\n        <_>\n          17 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 3 3 -1.</_>\n        <_>\n          13 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 4 2 -1.</_>\n        <_>\n          7 13 2 1 2.</_>\n        <_>\n          9 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 1 2 -1.</_>\n        <_>\n          10 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 3 -1.</_>\n        <_>\n          9 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 3 -1.</_>\n        <_>\n          9 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 8 1 -1.</_>\n        <_>\n          13 6 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 2 -1.</_>\n        <_>\n          6 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 3 -1.</_>\n        <_>\n          6 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 2 6 -1.</_>\n        <_>\n          12 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 2 -1.</_>\n        <_>\n          7 0 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 6 -1.</_>\n        <_>\n          9 7 2 3 2.</_>\n        <_>\n          11 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 2 4 -1.</_>\n        <_>\n          13 10 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 1 2 -1.</_>\n        <_>\n          13 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 2 2 -1.</_>\n        <_>\n          14 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 2 1 -1.</_>\n        <_>\n          16 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 3 -1.</_>\n        <_>\n          7 7 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 8 3 -1.</_>\n        <_>\n          9 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 6 3 -1.</_>\n        <_>\n          9 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 3 6 -1.</_>\n        <_>\n          13 14 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 8 -1.</_>\n        <_>\n          18 9 1 4 2.</_>\n        <_>\n          19 13 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 7 3 -1.</_>\n        <_>\n          5 6 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 2 -1.</_>\n        <_>\n          10 13 1 1 2.</_>\n        <_>\n          11 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 3 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 3 -1.</_>\n        <_>\n          6 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 4 2 -1.</_>\n        <_>\n          9 13 2 1 2.</_>\n        <_>\n          11 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 1 3 -1.</_>\n        <_>\n          7 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 6 -1.</_>\n        <_>\n          7 12 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 4 4 -1.</_>\n        <_>\n          13 10 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 18 -1.</_>\n        <_>\n          8 9 12 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 2 10 -1.</_>\n        <_>\n          18 9 1 5 2.</_>\n        <_>\n          19 14 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 3 6 -1.</_>\n        <_>\n          14 5 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 14 -1.</_>\n        <_>\n          11 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 8 4 -1.</_>\n        <_>\n          6 16 4 2 2.</_>\n        <_>\n          10 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 5 12 -1.</_>\n        <_>\n          5 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 3 -1.</_>\n        <_>\n          4 16 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 1 3 -1.</_>\n        <_>\n          6 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 2 1 -1.</_>\n        <_>\n          14 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 9 -1.</_>\n        <_>\n          11 2 9 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 2 4 -1.</_>\n        <_>\n          4 16 1 2 2.</_>\n        <_>\n          5 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 8 -1.</_>\n        <_>\n          16 1 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 3 -1.</_>\n        <_>\n          11 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 4 -1.</_>\n        <_>\n          9 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 8 4 -1.</_>\n        <_>\n          5 9 4 2 2.</_>\n        <_>\n          9 11 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 3 -1.</_>\n        <_>\n          9 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 2 3 -1.</_>\n        <_>\n          7 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 4 3 -1.</_>\n        <_>\n          11 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 2 3 -1.</_>\n        <_>\n          8 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 3 -1.</_>\n        <_>\n          6 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 3 -1.</_>\n        <_>\n          8 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 2 -1.</_>\n        <_>\n          6 9 2 1 2.</_>\n        <_>\n          8 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 9 1 -1.</_>\n        <_>\n          7 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 6 -1.</_>\n        <_>\n          5 7 1 3 2.</_>\n        <_>\n          6 10 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 4 8 -1.</_>\n        <_>\n          4 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 19 -1.</_>\n        <_>\n          8 0 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 1 3 -1.</_>\n        <_>\n          5 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 1 -1.</_>\n        <_>\n          10 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 3 6 -1.</_>\n        <_>\n          16 6 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 5 3 -1.</_>\n        <_>\n          10 16 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 5 14 -1.</_>\n        <_>\n          13 8 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 4 -1.</_>\n        <_>\n          3 0 2 2 2.</_>\n        <_>\n          5 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 13 -1.</_>\n        <_>\n          8 5 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 16 -1.</_>\n        <_>\n          4 2 1 8 2.</_>\n        <_>\n          5 10 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 8 3 -1.</_>\n        <_>\n          8 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 2 12 -1.</_>\n        <_>\n          5 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 4 -1.</_>\n        <_>\n          9 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 5 4 -1.</_>\n        <_>\n          13 11 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 2 -1.</_>\n        <_>\n          12 0 4 1 2.</_>\n        <_>\n          16 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 4 -1.</_>\n        <_>\n          14 0 3 2 2.</_>\n        <_>\n          17 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 2 -1.</_>\n        <_>\n          6 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 2 1 -1.</_>\n        <_>\n          14 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 3 -1.</_>\n        <_>\n          6 0 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 3 -1.</_>\n        <_>\n          6 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 3 -1.</_>\n        <_>\n          5 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 2 4 -1.</_>\n        <_>\n          5 13 1 2 2.</_>\n        <_>\n          6 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 3 3 -1.</_>\n        <_>\n          4 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 2 -1.</_>\n        <_>\n          1 9 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 4 12 -1.</_>\n        <_>\n          6 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 4 -1.</_>\n        <_>\n          7 14 3 2 2.</_>\n        <_>\n          10 16 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 8 4 -1.</_>\n        <_>\n          8 16 4 2 2.</_>\n        <_>\n          12 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 10 6 -1.</_>\n        <_>\n          5 12 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 1 3 -1.</_>\n        <_>\n          6 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 4 6 -1.</_>\n        <_>\n          3 13 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 3 -1.</_>\n        <_>\n          10 15 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 4 2 -1.</_>\n        <_>\n          5 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 4 3 -1.</_>\n        <_>\n          5 14 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 1 2 -1.</_>\n        <_>\n          1 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 4 -1.</_>\n        <_>\n          4 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 1 2 -1.</_>\n        <_>\n          1 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 1 3 -1.</_>\n        <_>\n          5 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 19 2 1 -1.</_>\n        <_>\n          11 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 4 -1.</_>\n        <_>\n          6 6 2 2 2.</_>\n        <_>\n          8 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 1 2 -1.</_>\n        <_>\n          6 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 10 2 -1.</_>\n        <_>\n          5 4 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 2 1 -1.</_>\n        <_>\n          5 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 2 1 -1.</_>\n        <_>\n          1 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 11 -1.</_>\n        <_>\n          3 4 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 1 -1.</_>\n        <_>\n          7 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 1 6 -1.</_>\n        <_>\n          7 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 4 -1.</_>\n        <_>\n          7 2 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 2 -1.</_>\n        <_>\n          13 7 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 2 -1.</_>\n        <_>\n          16 15 1 1 2.</_>\n        <_>\n          17 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 1 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 5 2 -1.</_>\n        <_>\n          4 5 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 9 -1.</_>\n        <_>\n          4 6 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 3 -1.</_>\n        <_>\n          7 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 1 -1.</_>\n        <_>\n          7 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 12 5 -1.</_>\n        <_>\n          9 8 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 1 3 -1.</_>\n        <_>\n          9 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 1 -1.</_>\n        <_>\n          12 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 7 6 -1.</_>\n        <_>\n          13 9 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 18 -1.</_>\n        <_>\n          10 2 10 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 3 -1.</_>\n        <_>\n          12 6 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 3 2 -1.</_>\n        <_>\n          8 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 11 6 -1.</_>\n        <_>\n          4 11 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 7 6 -1.</_>\n        <_>\n          7 10 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 2 8 -1.</_>\n        <_>\n          15 7 1 4 2.</_>\n        <_>\n          16 11 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 6 -1.</_>\n        <_>\n          4 12 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 2 -1.</_>\n        <_>\n          7 13 1 1 2.</_>\n        <_>\n          8 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 4 -1.</_>\n        <_>\n          8 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 2 3 -1.</_>\n        <_>\n          8 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 1 -1.</_>\n        <_>\n          6 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 8 -1.</_>\n        <_>\n          15 6 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 6 -1.</_>\n        <_>\n          4 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 10 3 -1.</_>\n        <_>\n          0 18 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 7 2 -1.</_>\n        <_>\n          5 19 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 1 3 -1.</_>\n        <_>\n          13 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 16 -1.</_>\n        <_>\n          9 2 2 8 2.</_>\n        <_>\n          11 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 3 -1.</_>\n        <_>\n          6 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 4 -1.</_>\n        <_>\n          9 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 3 -1.</_>\n        <_>\n          18 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 2 2 -1.</_>\n        <_>\n          16 10 1 1 2.</_>\n        <_>\n          17 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 6 -1.</_>\n        <_>\n          14 4 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 1 -1.</_>\n        <_>\n          17 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 10 2 1 -1.</_>\n        <_>\n          18 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 2 4 -1.</_>\n        <_>\n          17 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 6 3 -1.</_>\n        <_>\n          11 16 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 4 -1.</_>\n        <_>\n          4 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 3 5 -1.</_>\n        <_>\n          4 5 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 1 -1.</_>\n        <_>\n          5 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 2 -1.</_>\n        <_>\n          14 0 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 1 2 -1.</_>\n        <_>\n          9 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 5 6 -1.</_>\n        <_>\n          15 14 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 10 4 -1.</_>\n        <_>\n          4 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 4 -1.</_>\n        <_>\n          7 16 3 2 2.</_>\n        <_>\n          10 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 7 3 -1.</_>\n        <_>\n          9 17 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 2 -1.</_>\n        <_>\n          4 8 1 1 2.</_>\n        <_>\n          5 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 20 2 -1.</_>\n        <_>\n          10 17 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 1 -1.</_>\n        <_>\n          5 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 6 -1.</_>\n        <_>\n          4 7 1 3 2.</_>\n        <_>\n          5 10 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 1 2 -1.</_>\n        <_>\n          11 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 5 2 -1.</_>\n        <_>\n          10 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 3 3 -1.</_>\n        <_>\n          8 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 1 -1.</_>\n        <_>\n          10 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 11 12 -1.</_>\n        <_>\n          8 10 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 13 12 -1.</_>\n        <_>\n          2 10 13 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 10 4 -1.</_>\n        <_>\n          0 15 5 2 2.</_>\n        <_>\n          5 17 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 2 -1.</_>\n        <_>\n          7 8 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 2 -1.</_>\n        <_>\n          12 1 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 7 -1.</_>\n        <_>\n          9 8 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 2 -1.</_>\n        <_>\n          11 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 15 4 -1.</_>\n        <_>\n          8 14 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 2 14 -1.</_>\n        <_>\n          7 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 1 2 -1.</_>\n        <_>\n          11 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 1 3 -1.</_>\n        <_>\n          5 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 3 3 -1.</_>\n        <_>\n          11 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 9 4 -1.</_>\n        <_>\n          13 7 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 5 -1.</_>\n        <_>\n          14 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 1 2 -1.</_>\n        <_>\n          8 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 1 10 -1.</_>\n        <_>\n          16 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 10 4 -1.</_>\n        <_>\n          6 13 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 2 -1.</_>\n        <_>\n          6 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 6 11 -1.</_>\n        <_>\n          4 6 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 3 2 -1.</_>\n        <_>\n          6 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 1 2 -1.</_>\n        <_>\n          10 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 1 -1.</_>\n        <_>\n          14 0 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 2 2 -1.</_>\n        <_>\n          6 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 5 -1.</_>\n        <_>\n          14 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 3 3 -1.</_>\n        <_>\n          6 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 3 -1.</_>\n        <_>\n          11 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 2 -1.</_>\n        <_>\n          6 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 16 8 -1.</_>\n        <_>\n          12 2 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 2 -1.</_>\n        <_>\n          10 12 1 1 2.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 2 2 -1.</_>\n        <_>\n          11 7 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 1 3 -1.</_>\n        <_>\n          13 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 2 3 -1.</_>\n        <_>\n          13 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 6 4 -1.</_>\n        <_>\n          4 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 1 -1.</_>\n        <_>\n          11 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 2 10 -1.</_>\n        <_>\n          10 6 1 5 2.</_>\n        <_>\n          11 11 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 2 2 -1.</_>\n        <_>\n          16 11 1 1 2.</_>\n        <_>\n          17 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 3 1 -1.</_>\n        <_>\n          17 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 7 12 -1.</_>\n        <_>\n          9 9 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 10 18 -1.</_>\n        <_>\n          4 1 5 9 2.</_>\n        <_>\n          9 10 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 12 2 2 -1.</_>\n        <_>\n          17 12 1 1 2.</_>\n        <_>\n          18 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 2 -1.</_>\n        <_>\n          12 6 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 5 2 -1.</_>\n        <_>\n          4 8 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 1 2 -1.</_>\n        <_>\n          7 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 7 6 -1.</_>\n        <_>\n          6 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 2 8 -1.</_>\n        <_>\n          13 11 1 4 2.</_>\n        <_>\n          14 15 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 2 -1.</_>\n        <_>\n          10 7 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 4 -1.</_>\n        <_>\n          4 1 1 2 2.</_>\n        <_>\n          5 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 8 -1.</_>\n        <_>\n          4 0 1 4 2.</_>\n        <_>\n          5 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 2 1 -1.</_>\n        <_>\n          7 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 1 3 -1.</_>\n        <_>\n          14 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 2 -1.</_>\n        <_>\n          5 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 15 -1.</_>\n        <_>\n          5 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 14 -1.</_>\n        <_>\n          11 5 2 7 2.</_>\n        <_>\n          13 12 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 3 1 -1.</_>\n        <_>\n          10 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 5 6 -1.</_>\n        <_>\n          4 12 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 3 3 -1.</_>\n        <_>\n          5 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 5 -1.</_>\n        <_>\n          9 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 2 -1.</_>\n        <_>\n          5 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 3 3 -1.</_>\n        <_>\n          7 14 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 3 -1.</_>\n        <_>\n          7 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 2 9 -1.</_>\n        <_>\n          4 6 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 2 -1.</_>\n        <_>\n          4 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 2 2 -1.</_>\n        <_>\n          10 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 12 6 -1.</_>\n        <_>\n          7 8 6 3 2.</_>\n        <_>\n          13 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 3 2 -1.</_>\n        <_>\n          14 11 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 6 2 -1.</_>\n        <_>\n          5 17 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 4 3 -1.</_>\n        <_>\n          8 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 2 2 -1.</_>\n        <_>\n          14 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 3 -1.</_>\n        <_>\n          8 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 3 -1.</_>\n        <_>\n          8 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 17 9 -1.</_>\n        <_>\n          1 10 17 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 8 -1.</_>\n        <_>\n          5 14 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 2 -1.</_>\n        <_>\n          18 1 1 1 2.</_>\n        <_>\n          19 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 11 6 -1.</_>\n        <_>\n          0 3 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 3 -1.</_>\n        <_>\n          3 1 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 3 -1.</_>\n        <_>\n          10 11 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 15 18 -1.</_>\n        <_>\n          0 9 15 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 2 2 -1.</_>\n        <_>\n          15 11 1 1 2.</_>\n        <_>\n          16 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 3 -1.</_>\n        <_>\n          17 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 4 -1.</_>\n        <_>\n          9 4 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 12 4 -1.</_>\n        <_>\n          12 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 2 -1.</_>\n        <_>\n          9 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 1 2 -1.</_>\n        <_>\n          6 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 8 -1.</_>\n        <_>\n          4 7 1 4 2.</_>\n        <_>\n          5 11 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 3 2 -1.</_>\n        <_>\n          10 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 1 3 -1.</_>\n        <_>\n          9 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 1 6 -1.</_>\n        <_>\n          6 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 13 6 -1.</_>\n        <_>\n          5 8 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 4 12 -1.</_>\n        <_>\n          8 7 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 4 -1.</_>\n        <_>\n          7 12 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 4 3 -1.</_>\n        <_>\n          5 15 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 3 1 -1.</_>\n        <_>\n          11 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 4 3 -1.</_>\n        <_>\n          4 16 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 2 -1.</_>\n        <_>\n          12 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 8 2 -1.</_>\n        <_>\n          15 10 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 6 2 -1.</_>\n        <_>\n          17 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 2 -1.</_>\n        <_>\n          8 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 2 1 -1.</_>\n        <_>\n          12 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 6 -1.</_>\n        <_>\n          12 8 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 1 2 -1.</_>\n        <_>\n          11 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 3 9 -1.</_>\n        <_>\n          13 9 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 1 3 -1.</_>\n        <_>\n          0 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 1 3 -1.</_>\n        <_>\n          0 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 2 2 -1.</_>\n        <_>\n          3 8 1 1 2.</_>\n        <_>\n          4 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 6 -1.</_>\n        <_>\n          4 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 9 -1.</_>\n        <_>\n          4 12 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 2 -1.</_>\n        <_>\n          7 13 1 1 2.</_>\n        <_>\n          8 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 10 6 -1.</_>\n        <_>\n          3 6 5 3 2.</_>\n        <_>\n          8 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 4 6 -1.</_>\n        <_>\n          11 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 14 3 -1.</_>\n        <_>\n          9 12 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 11 18 -1.</_>\n        <_>\n          0 9 11 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 4 2 -1.</_>\n        <_>\n          4 18 2 1 2.</_>\n        <_>\n          6 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 4 6 -1.</_>\n        <_>\n          7 13 2 3 2.</_>\n        <_>\n          9 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 1 -1.</_>\n        <_>\n          9 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 8 6 -1.</_>\n        <_>\n          5 14 4 3 2.</_>\n        <_>\n          9 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 2 3 -1.</_>\n        <_>\n          7 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 4 2 -1.</_>\n        <_>\n          14 4 2 1 2.</_>\n        <_>\n          16 5 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 3 -1.</_>\n        <_>\n          7 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 4 2 -1.</_>\n        <_>\n          7 14 2 1 2.</_>\n        <_>\n          9 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 6 -1.</_>\n        <_>\n          10 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 1 -1.</_>\n        <_>\n          12 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 7 -1.</_>\n        <_>\n          11 5 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 1 2 -1.</_>\n        <_>\n          18 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 14 6 -1.</_>\n        <_>\n          4 17 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 20 -1.</_>\n        <_>\n          10 0 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 18 -1.</_>\n        <_>\n          12 9 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 2 1 -1.</_>\n        <_>\n          13 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 13 -1.</_>\n        <_>\n          3 6 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 3 4 -1.</_>\n        <_>\n          4 15 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 6 -1.</_>\n        <_>\n          4 13 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 9 2 -1.</_>\n        <_>\n          6 11 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 8 -1.</_>\n        <_>\n          3 11 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 7 -1.</_>\n        <_>\n          17 0 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 2 6 -1.</_>\n        <_>\n          16 1 1 3 2.</_>\n        <_>\n          17 4 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 10 -1.</_>\n        <_>\n          3 7 3 5 2.</_>\n        <_>\n          6 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 7 -1.</_>\n        <_>\n          5 0 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 2 -1.</_>\n        <_>\n          5 2 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 1 2 -1.</_>\n        <_>\n          6 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 6 -1.</_>\n        <_>\n          4 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 9 3 -1.</_>\n        <_>\n          6 11 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 2 2 -1.</_>\n        <_>\n          4 14 1 1 2.</_>\n        <_>\n          5 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 2 -1.</_>\n        <_>\n          12 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 6 -1.</_>\n        <_>\n          18 5 1 3 2.</_>\n        <_>\n          19 8 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 1 2 -1.</_>\n        <_>\n          0 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 1 -1.</_>\n        <_>\n          11 4 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 2 3 -1.</_>\n        <_>\n          5 5 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 4 -1.</_>\n        <_>\n          3 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 1 -1.</_>\n        <_>\n          14 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 3 3 -1.</_>\n        <_>\n          6 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 2 2 -1.</_>\n        <_>\n          4 4 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 3 -1.</_>\n        <_>\n          8 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 14 -1.</_>\n        <_>\n          5 5 5 7 2.</_>\n        <_>\n          10 12 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 2 6 -1.</_>\n        <_>\n          16 7 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 3 -1.</_>\n        <_>\n          19 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 2 2 -1.</_>\n        <_>\n          3 6 1 1 2.</_>\n        <_>\n          4 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 10 -1.</_>\n        <_>\n          5 1 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 1 -1.</_>\n        <_>\n          7 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 1 -1.</_>\n        <_>\n          16 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 1 3 -1.</_>\n        <_>\n          6 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 2 4 -1.</_>\n        <_>\n          6 14 1 2 2.</_>\n        <_>\n          7 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 5 -1.</_>\n        <_>\n          1 7 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 8 -1.</_>\n        <_>\n          18 0 1 4 2.</_>\n        <_>\n          19 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 2 -1.</_>\n        <_>\n          8 8 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 8 3 -1.</_>\n        <_>\n          8 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 2 -1.</_>\n        <_>\n          8 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 11 -1.</_>\n        <_>\n          15 8 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 9 5 -1.</_>\n        <_>\n          14 15 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 12 15 -1.</_>\n        <_>\n          9 4 4 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 2 8 -1.</_>\n        <_>\n          16 12 1 4 2.</_>\n        <_>\n          17 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 10 6 -1.</_>\n        <_>\n          7 16 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 4 -1.</_>\n        <_>\n          6 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 8 2 -1.</_>\n        <_>\n          13 5 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 4 -1.</_>\n        <_>\n          6 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 7 6 -1.</_>\n        <_>\n          10 10 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 1 4 -1.</_>\n        <_>\n          12 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 4 -1.</_>\n        <_>\n          3 10 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 6 -1.</_>\n        <_>\n          8 7 3 3 2.</_>\n        <_>\n          11 10 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 2 -1.</_>\n        <_>\n          7 0 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 1 3 -1.</_>\n        <_>\n          13 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 3 4 -1.</_>\n        <_>\n          3 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 2 -1.</_>\n        <_>\n          6 5 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 2 3 -1.</_>\n        <_>\n          11 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 3 -1.</_>\n        <_>\n          7 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 4 -1.</_>\n        <_>\n          6 12 1 2 2.</_>\n        <_>\n          7 14 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 1 -1.</_>\n        <_>\n          12 1 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 3 4 -1.</_>\n        <_>\n          7 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 3 3 -1.</_>\n        <_>\n          9 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 12 3 -1.</_>\n        <_>\n          14 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 2 -1.</_>\n        <_>\n          12 10 2 1 2.</_>\n        <_>\n          14 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 1 2 -1.</_>\n        <_>\n          16 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 1 2 -1.</_>\n        <_>\n          6 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 3 -1.</_>\n        <_>\n          5 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 3 -1.</_>\n        <_>\n          5 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 2 -1.</_>\n        <_>\n          12 0 4 1 2.</_>\n        <_>\n          16 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 3 8 -1.</_>\n        <_>\n          11 11 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          5 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 6 -1.</_>\n        <_>\n          5 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 6 -1.</_>\n        <_>\n          6 2 3 3 2.</_>\n        <_>\n          9 5 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 1 6 -1.</_>\n        <_>\n          11 6 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 16 -1.</_>\n        <_>\n          18 3 1 8 2.</_>\n        <_>\n          19 11 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 2 -1.</_>\n        <_>\n          11 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 2 3 -1.</_>\n        <_>\n          7 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 2 1 -1.</_>\n        <_>\n          17 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 2 -1.</_>\n        <_>\n          15 7 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 3 -1.</_>\n        <_>\n          4 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 19 6 1 -1.</_>\n        <_>\n          11 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          9 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 1 3 -1.</_>\n        <_>\n          10 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 2 3 -1.</_>\n        <_>\n          8 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 5 -1.</_>\n        <_>\n          8 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 1 2 -1.</_>\n        <_>\n          14 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 3 -1.</_>\n        <_>\n          13 7 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 1 -1.</_>\n        <_>\n          16 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 1 3 -1.</_>\n        <_>\n          9 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 2 8 -1.</_>\n        <_>\n          9 5 1 4 2.</_>\n        <_>\n          10 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 1 4 -1.</_>\n        <_>\n          6 14 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 4 2 -1.</_>\n        <_>\n          5 14 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 2 4 -1.</_>\n        <_>\n          12 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 6 -1.</_>\n        <_>\n          13 7 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 14 -1.</_>\n        <_>\n          5 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 1 2 -1.</_>\n        <_>\n          9 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 14 12 -1.</_>\n        <_>\n          6 5 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 7 6 -1.</_>\n        <_>\n          13 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 3 3 -1.</_>\n        <_>\n          14 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 12 3 1 -1.</_>\n        <_>\n          18 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 2 -1.</_>\n        <_>\n          9 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 1 -1.</_>\n        <_>\n          8 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 2 -1.</_>\n        <_>\n          5 8 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 2 1 -1.</_>\n        <_>\n          12 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 3 1 -1.</_>\n        <_>\n          12 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 1 3 -1.</_>\n        <_>\n          9 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 1 2 -1.</_>\n        <_>\n          12 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 3 -1.</_>\n        <_>\n          13 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 3 -1.</_>\n        <_>\n          8 11 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 2 -1.</_>\n        <_>\n          6 10 1 1 2.</_>\n        <_>\n          7 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 1 9 -1.</_>\n        <_>\n          17 5 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 6 -1.</_>\n        <_>\n          4 7 1 3 2.</_>\n        <_>\n          5 10 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 11 18 -1.</_>\n        <_>\n          0 10 11 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 2 8 -1.</_>\n        <_>\n          7 10 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 6 -1.</_>\n        <_>\n          6 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 12 4 -1.</_>\n        <_>\n          2 14 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 1 -1.</_>\n        <_>\n          12 0 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 2 -1.</_>\n        <_>\n          5 1 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 2 1 -1.</_>\n        <_>\n          11 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 3 3 -1.</_>\n        <_>\n          7 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 5 3 -1.</_>\n        <_>\n          4 14 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 6 2 -1.</_>\n        <_>\n          9 17 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 5 3 -1.</_>\n        <_>\n          11 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 15 -1.</_>\n        <_>\n          6 0 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 8 4 -1.</_>\n        <_>\n          9 18 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 3 2 -1.</_>\n        <_>\n          0 7 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 1 -1.</_>\n        <_>\n          6 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 4 2 -1.</_>\n        <_>\n          9 11 2 1 2.</_>\n        <_>\n          11 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 2 2 -1.</_>\n        <_>\n          4 13 1 1 2.</_>\n        <_>\n          5 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 1 2 -1.</_>\n        <_>\n          6 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 2 2 -1.</_>\n        <_>\n          14 18 1 1 2.</_>\n        <_>\n          15 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 5 6 -1.</_>\n        <_>\n          7 12 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 6 -1.</_>\n        <_>\n          8 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 2 -1.</_>\n        <_>\n          9 9 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 4 -1.</_>\n        <_>\n          6 6 3 2 2.</_>\n        <_>\n          9 8 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 1 6 -1.</_>\n        <_>\n          10 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 14 -1.</_>\n        <_>\n          5 2 6 7 2.</_>\n        <_>\n          11 9 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 2 -1.</_>\n        <_>\n          13 6 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 8 -1.</_>\n        <_>\n          16 0 2 4 2.</_>\n        <_>\n          18 4 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 1 -1.</_>\n        <_>\n          4 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 3 4 -1.</_>\n        <_>\n          4 10 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 1 6 -1.</_>\n        <_>\n          4 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 15 1 -1.</_>\n        <_>\n          8 7 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 6 5 -1.</_>\n        <_>\n          4 15 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 8 4 -1.</_>\n        <_>\n          15 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 2 4 -1.</_>\n        <_>\n          16 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 1 2 -1.</_>\n        <_>\n          19 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 3 -1.</_>\n        <_>\n          7 15 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 3 1 -1.</_>\n        <_>\n          4 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 3 10 -1.</_>\n        <_>\n          4 10 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 2 -1.</_>\n        <_>\n          18 17 1 1 2.</_>\n        <_>\n          19 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 4 -1.</_>\n        <_>\n          3 12 3 2 2.</_>\n        <_>\n          6 14 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 2 2 -1.</_>\n        <_>\n          5 17 1 1 2.</_>\n        <_>\n          6 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 2 3 -1.</_>\n        <_>\n          7 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 3 -1.</_>\n        <_>\n          8 11 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 1 3 -1.</_>\n        <_>\n          7 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 1 -1.</_>\n        <_>\n          1 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 9 6 -1.</_>\n        <_>\n          11 10 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 9 16 -1.</_>\n        <_>\n          12 4 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 5 3 -1.</_>\n        <_>\n          14 13 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 3 2 -1.</_>\n        <_>\n          9 18 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 11 16 -1.</_>\n        <_>\n          4 8 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 12 15 -1.</_>\n        <_>\n          2 9 12 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 11 4 -1.</_>\n        <_>\n          3 15 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 3 -1.</_>\n        <_>\n          7 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 3 -1.</_>\n        <_>\n          6 6 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 9 -1.</_>\n        <_>\n          5 3 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 2 2 -1.</_>\n        <_>\n          16 8 1 1 2.</_>\n        <_>\n          17 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 8 2 -1.</_>\n        <_>\n          12 10 4 1 2.</_>\n        <_>\n          16 11 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 8 -1.</_>\n        <_>\n          7 2 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 3 -1.</_>\n        <_>\n          7 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 1 3 -1.</_>\n        <_>\n          17 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 3 2 -1.</_>\n        <_>\n          16 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 2 3 -1.</_>\n        <_>\n          11 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 11 -1.</_>\n        <_>\n          16 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 8 -1.</_>\n        <_>\n          12 0 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 8 4 -1.</_>\n        <_>\n          7 15 4 2 2.</_>\n        <_>\n          11 17 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 16 6 -1.</_>\n        <_>\n          4 16 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 6 -1.</_>\n        <_>\n          6 12 1 3 2.</_>\n        <_>\n          7 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 4 -1.</_>\n        <_>\n          7 14 3 2 2.</_>\n        <_>\n          10 16 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 4 -1.</_>\n        <_>\n          0 0 1 2 2.</_>\n        <_>\n          1 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 1 3 -1.</_>\n        <_>\n          15 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 3 1 -1.</_>\n        <_>\n          8 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 1 2 -1.</_>\n        <_>\n          1 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 3 2 -1.</_>\n        <_>\n          4 14 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 3 5 -1.</_>\n        <_>\n          4 13 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 4 -1.</_>\n        <_>\n          8 2 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 4 -1.</_>\n        <_>\n          10 3 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 1 2 -1.</_>\n        <_>\n          9 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 2 2 -1.</_>\n        <_>\n          7 12 1 1 2.</_>\n        <_>\n          8 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 4 4 -1.</_>\n        <_>\n          4 11 2 2 2.</_>\n        <_>\n          6 13 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 4 -1.</_>\n        <_>\n          12 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 2 -1.</_>\n        <_>\n          9 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 6 6 -1.</_>\n        <_>\n          13 9 3 3 2.</_>\n        <_>\n          16 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 5 -1.</_>\n        <_>\n          15 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 4 -1.</_>\n        <_>\n          9 8 3 2 2.</_>\n        <_>\n          12 10 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 3 3 -1.</_>\n        <_>\n          11 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 2 1 -1.</_>\n        <_>\n          14 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 2 2 -1.</_>\n        <_>\n          4 5 1 1 2.</_>\n        <_>\n          5 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 2 2 -1.</_>\n        <_>\n          4 5 1 1 2.</_>\n        <_>\n          5 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 2 6 -1.</_>\n        <_>\n          7 11 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 3 -1.</_>\n        <_>\n          6 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 3 -1.</_>\n        <_>\n          6 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 2 -1.</_>\n        <_>\n          8 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 4 -1.</_>\n        <_>\n          14 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 11 3 -1.</_>\n        <_>\n          6 9 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 5 2 -1.</_>\n        <_>\n          13 11 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 3 6 -1.</_>\n        <_>\n          13 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 5 2 -1.</_>\n        <_>\n          3 15 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 2 -1.</_>\n        <_>\n          11 0 4 1 2.</_>\n        <_>\n          15 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 6 -1.</_>\n        <_>\n          13 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 1 -1.</_>\n        <_>\n          13 0 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 5 3 -1.</_>\n        <_>\n          8 2 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 3 -1.</_>\n        <_>\n          12 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 13 3 6 -1.</_>\n        <_>\n          17 15 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 3 -1.</_>\n        <_>\n          12 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 1 -1.</_>\n        <_>\n          16 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 11 -1.</_>\n        <_>\n          13 4 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 4 4 -1.</_>\n        <_>\n          13 9 2 2 2.</_>\n        <_>\n          15 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 1 6 -1.</_>\n        <_>\n          8 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 6 -1.</_>\n        <_>\n          5 9 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 4 8 -1.</_>\n        <_>\n          4 6 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 1 2 -1.</_>\n        <_>\n          11 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 7 10 -1.</_>\n        <_>\n          11 6 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 9 6 -1.</_>\n        <_>\n          7 13 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 8 1 -1.</_>\n        <_>\n          8 9 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 3 -1.</_>\n        <_>\n          11 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 7 6 -1.</_>\n        <_>\n          8 2 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 2 2 -1.</_>\n        <_>\n          11 13 1 1 2.</_>\n        <_>\n          12 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 1 3 -1.</_>\n        <_>\n          7 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 9 -1.</_>\n        <_>\n          7 13 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 1 3 -1.</_>\n        <_>\n          5 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 18 6 -1.</_>\n        <_>\n          11 8 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 4 -1.</_>\n        <_>\n          13 7 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 6 -1.</_>\n        <_>\n          7 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 4 6 -1.</_>\n        <_>\n          10 6 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 6 1 -1.</_>\n        <_>\n          13 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 1 -1.</_>\n        <_>\n          6 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 3 -1.</_>\n        <_>\n          5 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 2 -1.</_>\n        <_>\n          16 18 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 1 -1.</_>\n        <_>\n          2 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 2 2 -1.</_>\n        <_>\n          5 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 2 3 -1.</_>\n        <_>\n          12 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          5 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 1 -1.</_>\n        <_>\n          2 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 4 -1.</_>\n        <_>\n          16 0 2 2 2.</_>\n        <_>\n          18 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 8 10 -1.</_>\n        <_>\n          4 5 4 5 2.</_>\n        <_>\n          8 10 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 4 5 -1.</_>\n        <_>\n          5 14 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 6 2 -1.</_>\n        <_>\n          5 16 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 8 1 -1.</_>\n        <_>\n          12 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 15 6 -1.</_>\n        <_>\n          0 7 15 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 3 2 -1.</_>\n        <_>\n          9 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 2 6 -1.</_>\n        <_>\n          7 11 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 3 -1.</_>\n        <_>\n          5 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 1 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 1 3 -1.</_>\n        <_>\n          17 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 4 -1.</_>\n        <_>\n          11 9 2 2 2.</_>\n        <_>\n          13 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 2 -1.</_>\n        <_>\n          10 15 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 8 -1.</_>\n        <_>\n          11 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 5 6 -1.</_>\n        <_>\n          11 10 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 2 6 -1.</_>\n        <_>\n          5 2 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 5 2 -1.</_>\n        <_>\n          6 1 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 4 3 -1.</_>\n        <_>\n          10 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 7 3 -1.</_>\n        <_>\n          12 4 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 8 -1.</_>\n        <_>\n          8 1 6 4 2.</_>\n        <_>\n          14 5 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 20 -1.</_>\n        <_>\n          12 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 2 2 -1.</_>\n        <_>\n          17 1 1 1 2.</_>\n        <_>\n          18 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 7 6 -1.</_>\n        <_>\n          2 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 1 -1.</_>\n        <_>\n          8 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 11 3 -1.</_>\n        <_>\n          4 18 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 3 2 -1.</_>\n        <_>\n          8 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 3 13 -1.</_>\n        <_>\n          4 4 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 14 -1.</_>\n        <_>\n          5 2 6 7 2.</_>\n        <_>\n          11 9 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 3 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 2 1 -1.</_>\n        <_>\n          6 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 13 -1.</_>\n        <_>\n          10 7 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 8 -1.</_>\n        <_>\n          7 2 1 4 2.</_>\n        <_>\n          8 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 4 -1.</_>\n        <_>\n          7 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 2 1 -1.</_>\n        <_>\n          8 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 2 -1.</_>\n        <_>\n          4 0 2 1 2.</_>\n        <_>\n          6 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 8 -1.</_>\n        <_>\n          3 14 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 5 10 -1.</_>\n        <_>\n          10 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 3 4 -1.</_>\n        <_>\n          13 8 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 5 3 -1.</_>\n        <_>\n          13 11 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 2 2 -1.</_>\n        <_>\n          16 12 1 1 2.</_>\n        <_>\n          17 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 2 1 -1.</_>\n        <_>\n          17 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 5 -1.</_>\n        <_>\n          6 1 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 8 6 -1.</_>\n        <_>\n          5 9 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 2 -1.</_>\n        <_>\n          6 10 4 1 2.</_>\n        <_>\n          10 11 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 8 -1.</_>\n        <_>\n          6 9 2 4 2.</_>\n        <_>\n          8 13 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 4 -1.</_>\n        <_>\n          4 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 2 6 -1.</_>\n        <_>\n          14 13 1 3 2.</_>\n        <_>\n          15 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 2 1 -1.</_>\n        <_>\n          13 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 2 -1.</_>\n        <_>\n          6 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 1 -1.</_>\n        <_>\n          16 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 14 -1.</_>\n        <_>\n          0 7 18 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 3 -1.</_>\n        <_>\n          12 5 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 3 3 -1.</_>\n        <_>\n          5 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 1 -1.</_>\n        <_>\n          5 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 1 8 -1.</_>\n        <_>\n          5 13 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 3 15 -1.</_>\n        <_>\n          5 2 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 4 -1.</_>\n        <_>\n          17 0 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 1 3 -1.</_>\n        <_>\n          10 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 2 -1.</_>\n        <_>\n          9 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 3 2 -1.</_>\n        <_>\n          9 17 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 1 3 -1.</_>\n        <_>\n          10 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 4 4 -1.</_>\n        <_>\n          6 7 2 2 2.</_>\n        <_>\n          8 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 4 -1.</_>\n        <_>\n          8 7 2 2 2.</_>\n        <_>\n          10 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 2 7 -1.</_>\n        <_>\n          16 8 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 3 2 -1.</_>\n        <_>\n          9 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 3 1 -1.</_>\n        <_>\n          17 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 14 -1.</_>\n        <_>\n          3 2 6 7 2.</_>\n        <_>\n          9 9 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 2 -1.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 2 3 -1.</_>\n        <_>\n          7 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 2 6 -1.</_>\n        <_>\n          8 13 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 2 6 -1.</_>\n        <_>\n          8 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 4 6 -1.</_>\n        <_>\n          6 16 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 6 -1.</_>\n        <_>\n          12 12 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 1 12 -1.</_>\n        <_>\n          0 10 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 2 10 -1.</_>\n        <_>\n          3 3 1 5 2.</_>\n        <_>\n          4 8 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 2 8 -1.</_>\n        <_>\n          3 3 1 4 2.</_>\n        <_>\n          4 7 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 1 12 -1.</_>\n        <_>\n          9 10 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 4 -1.</_>\n        <_>\n          3 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 1 4 -1.</_>\n        <_>\n          9 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 4 -1.</_>\n        <_>\n          4 6 3 2 2.</_>\n        <_>\n          7 8 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 2 -1.</_>\n        <_>\n          7 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 14 -1.</_>\n        <_>\n          8 4 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 3 -1.</_>\n        <_>\n          7 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 5 -1.</_>\n        <_>\n          7 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 8 10 -1.</_>\n        <_>\n          4 4 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 14 -1.</_>\n        <_>\n          9 6 9 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 3 5 -1.</_>\n        <_>\n          12 15 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 4 2 -1.</_>\n        <_>\n          3 18 2 1 2.</_>\n        <_>\n          5 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 2 -1.</_>\n        <_>\n          7 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 10 -1.</_>\n        <_>\n          10 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 8 10 -1.</_>\n        <_>\n          13 0 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 13 -1.</_>\n        <_>\n          11 2 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 7 -1.</_>\n        <_>\n          9 3 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 2 -1.</_>\n        <_>\n          12 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 2 8 -1.</_>\n        <_>\n          11 7 1 4 2.</_>\n        <_>\n          12 11 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 3 2 -1.</_>\n        <_>\n          0 7 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 2 3 -1.</_>\n        <_>\n          6 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 2 -1.</_>\n        <_>\n          4 7 1 1 2.</_>\n        <_>\n          5 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 10 9 -1.</_>\n        <_>\n          9 5 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 4 -1.</_>\n        <_>\n          9 0 5 2 2.</_>\n        <_>\n          14 2 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 2 1 -1.</_>\n        <_>\n          8 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 2 1 -1.</_>\n        <_>\n          8 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 3 -1.</_>\n        <_>\n          4 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 3 -1.</_>\n        <_>\n          4 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 3 -1.</_>\n        <_>\n          6 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 1 3 -1.</_>\n        <_>\n          18 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 5 -1.</_>\n        <_>\n          18 0 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 8 3 -1.</_>\n        <_>\n          11 3 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 5 -1.</_>\n        <_>\n          17 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 4 6 -1.</_>\n        <_>\n          0 9 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 12 -1.</_>\n        <_>\n          12 7 2 6 2.</_>\n        <_>\n          14 13 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 3 -1.</_>\n        <_>\n          11 7 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 3 -1.</_>\n        <_>\n          12 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 20 -1.</_>\n        <_>\n          14 0 3 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 2 6 -1.</_>\n        <_>\n          5 5 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 11 -1.</_>\n        <_>\n          3 7 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 2 1 -1.</_>\n        <_>\n          3 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 6 -1.</_>\n        <_>\n          5 14 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 2 3 -1.</_>\n        <_>\n          6 18 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 11 12 -1.</_>\n        <_>\n          5 12 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 2 2 -1.</_>\n        <_>\n          16 10 1 1 2.</_>\n        <_>\n          17 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 3 1 -1.</_>\n        <_>\n          16 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 1 3 -1.</_>\n        <_>\n          13 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 3 4 -1.</_>\n        <_>\n          6 16 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 14 -1.</_>\n        <_>\n          6 13 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 2 1 -1.</_>\n        <_>\n          12 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 6 -1.</_>\n        <_>\n          9 13 3 3 2.</_>\n        <_>\n          12 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 3 1 -1.</_>\n        <_>\n          11 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 6 -1.</_>\n        <_>\n          9 13 1 3 2.</_>\n        <_>\n          10 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 4 2 -1.</_>\n        <_>\n          13 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          10 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 1 12 -1.</_>\n        <_>\n          5 12 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 6 -1.</_>\n        <_>\n          4 4 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 9 3 -1.</_>\n        <_>\n          4 4 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 3 3 -1.</_>\n        <_>\n          5 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 1 3 -1.</_>\n        <_>\n          8 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 19 6 1 -1.</_>\n        <_>\n          13 19 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 8 -1.</_>\n        <_>\n          18 4 1 4 2.</_>\n        <_>\n          19 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 2 3 -1.</_>\n        <_>\n          17 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 8 4 -1.</_>\n        <_>\n          16 15 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 4 10 -1.</_>\n        <_>\n          14 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 18 -1.</_>\n        <_>\n          11 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 6 -1.</_>\n        <_>\n          8 7 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 4 2 -1.</_>\n        <_>\n          12 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 8 -1.</_>\n        <_>\n          6 7 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 12 -1.</_>\n        <_>\n          6 3 6 6 2.</_>\n        <_>\n          12 9 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 2 -1.</_>\n        <_>\n          6 10 2 1 2.</_>\n        <_>\n          8 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 10 -1.</_>\n        <_>\n          2 2 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 3 2 -1.</_>\n        <_>\n          11 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 10 2 -1.</_>\n        <_>\n          6 8 5 1 2.</_>\n        <_>\n          11 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 1 6 -1.</_>\n        <_>\n          6 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 1 -1.</_>\n        <_>\n          11 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 3 -1.</_>\n        <_>\n          8 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 1 -1.</_>\n        <_>\n          8 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 3 1 -1.</_>\n        <_>\n          3 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 3 3 -1.</_>\n        <_>\n          2 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 2 -1.</_>\n        <_>\n          12 0 4 1 2.</_>\n        <_>\n          16 1 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 8 -1.</_>\n        <_>\n          9 6 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 1 3 -1.</_>\n        <_>\n          6 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 7 2 -1.</_>\n        <_>\n          8 13 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 3 -1.</_>\n        <_>\n          6 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 12 -1.</_>\n        <_>\n          6 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 2 3 -1.</_>\n        <_>\n          6 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 1 3 -1.</_>\n        <_>\n          12 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 1 2 -1.</_>\n        <_>\n          8 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 4 6 -1.</_>\n        <_>\n          7 11 2 3 2.</_>\n        <_>\n          9 14 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 4 3 -1.</_>\n        <_>\n          10 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 2 3 -1.</_>\n        <_>\n          12 11 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 3 -1.</_>\n        <_>\n          6 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 1 3 -1.</_>\n        <_>\n          7 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 6 -1.</_>\n        <_>\n          6 12 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 12 -1.</_>\n        <_>\n          5 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 2 1 -1.</_>\n        <_>\n          2 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 2 3 -1.</_>\n        <_>\n          8 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 8 4 -1.</_>\n        <_>\n          4 6 4 2 2.</_>\n        <_>\n          8 8 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 3 1 -1.</_>\n        <_>\n          1 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 2 -1.</_>\n        <_>\n          4 1 1 1 2.</_>\n        <_>\n          5 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 1 6 -1.</_>\n        <_>\n          14 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 3 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 3 3 -1.</_>\n        <_>\n          5 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 12 4 -1.</_>\n        <_>\n          2 3 6 2 2.</_>\n        <_>\n          8 5 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 3 2 -1.</_>\n        <_>\n          11 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 8 1 -1.</_>\n        <_>\n          16 14 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 13 -1.</_>\n        <_>\n          15 0 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 8 -1.</_>\n        <_>\n          12 12 1 4 2.</_>\n        <_>\n          13 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 8 12 -1.</_>\n        <_>\n          4 13 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 2 4 -1.</_>\n        <_>\n          10 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 3 1 -1.</_>\n        <_>\n          5 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 1 3 -1.</_>\n        <_>\n          18 6 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 1 -1.</_>\n        <_>\n          9 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 6 -1.</_>\n        <_>\n          12 7 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 4 -1.</_>\n        <_>\n          18 0 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 2 2 -1.</_>\n        <_>\n          3 10 1 1 2.</_>\n        <_>\n          4 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 2 8 -1.</_>\n        <_>\n          17 4 1 4 2.</_>\n        <_>\n          18 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 1 3 -1.</_>\n        <_>\n          7 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 2 1 -1.</_>\n        <_>\n          1 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 2 4 -1.</_>\n        <_>\n          7 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 3 1 -1.</_>\n        <_>\n          5 19 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 4 5 -1.</_>\n        <_>\n          4 14 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 4 4 -1.</_>\n        <_>\n          4 11 2 2 2.</_>\n        <_>\n          6 13 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 2 6 -1.</_>\n        <_>\n          4 13 1 3 2.</_>\n        <_>\n          5 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 3 4 -1.</_>\n        <_>\n          8 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 2 -1.</_>\n        <_>\n          18 11 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 2 -1.</_>\n        <_>\n          10 5 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 6 3 -1.</_>\n        <_>\n          12 4 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 12 2 2 -1.</_>\n        <_>\n          17 12 1 1 2.</_>\n        <_>\n          18 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 15 8 -1.</_>\n        <_>\n          10 12 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 2 2 -1.</_>\n        <_>\n          4 18 1 1 2.</_>\n        <_>\n          5 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 2 2 -1.</_>\n        <_>\n          0 15 1 1 2.</_>\n        <_>\n          1 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 1 6 -1.</_>\n        <_>\n          5 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 14 -1.</_>\n        <_>\n          1 7 18 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 7 6 -1.</_>\n        <_>\n          6 5 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 2 1 -1.</_>\n        <_>\n          7 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 16 9 -1.</_>\n        <_>\n          4 14 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 2 2 -1.</_>\n        <_>\n          17 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 2 -1.</_>\n        <_>\n          7 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 3 -1.</_>\n        <_>\n          6 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 10 -1.</_>\n        <_>\n          7 11 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 1 2 -1.</_>\n        <_>\n          10 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 2 2 -1.</_>\n        <_>\n          6 17 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 18 -1.</_>\n        <_>\n          11 0 9 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 3 -1.</_>\n        <_>\n          14 11 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 1 -1.</_>\n        <_>\n          14 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 2 2 -1.</_>\n        <_>\n          15 10 1 1 2.</_>\n        <_>\n          16 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 8 -1.</_>\n        <_>\n          4 11 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 12 -1.</_>\n        <_>\n          8 1 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 8 -1.</_>\n        <_>\n          8 3 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 12 -1.</_>\n        <_>\n          11 4 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 4 5 -1.</_>\n        <_>\n          18 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 2 3 -1.</_>\n        <_>\n          15 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 10 6 -1.</_>\n        <_>\n          14 7 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 11 -1.</_>\n        <_>\n          13 7 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 16 1 2 -1.</_>\n        <_>\n          19 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 12 1 -1.</_>\n        <_>\n          14 15 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 3 -1.</_>\n        <_>\n          10 16 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 10 4 -1.</_>\n        <_>\n          6 8 5 2 2.</_>\n        <_>\n          11 10 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 1 3 -1.</_>\n        <_>\n          10 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 9 12 -1.</_>\n        <_>\n          10 7 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 1 4 -1.</_>\n        <_>\n          10 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 4 -1.</_>\n        <_>\n          1 7 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 6 -1.</_>\n        <_>\n          12 4 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 3 -1.</_>\n        <_>\n          13 2 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 4 -1.</_>\n        <_>\n          14 0 3 2 2.</_>\n        <_>\n          17 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 3 -1.</_>\n        <_>\n          9 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 8 4 -1.</_>\n        <_>\n          5 14 4 2 2.</_>\n        <_>\n          9 16 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 14 14 -1.</_>\n        <_>\n          8 6 7 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 2 -1.</_>\n        <_>\n          13 4 3 1 2.</_>\n        <_>\n          16 5 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 6 -1.</_>\n        <_>\n          8 9 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 20 -1.</_>\n        <_>\n          8 10 12 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 3 -1.</_>\n        <_>\n          9 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 8 2 -1.</_>\n        <_>\n          10 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 4 2 -1.</_>\n        <_>\n          9 12 2 1 2.</_>\n        <_>\n          11 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 2 2 -1.</_>\n        <_>\n          4 14 1 1 2.</_>\n        <_>\n          5 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 3 2 -1.</_>\n        <_>\n          5 15 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 3 -1.</_>\n        <_>\n          13 1 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 2 3 -1.</_>\n        <_>\n          6 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 2 -1.</_>\n        <_>\n          15 1 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 7 -1.</_>\n        <_>\n          3 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 1 -1.</_>\n        <_>\n          18 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 8 4 -1.</_>\n        <_>\n          9 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 8 4 -1.</_>\n        <_>\n          7 16 4 2 2.</_>\n        <_>\n          11 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 4 3 -1.</_>\n        <_>\n          11 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 2 -1.</_>\n        <_>\n          3 10 3 1 2.</_>\n        <_>\n          6 11 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 2 -1.</_>\n        <_>\n          12 7 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 2 -1.</_>\n        <_>\n          11 7 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 3 10 -1.</_>\n        <_>\n          14 6 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 4 3 -1.</_>\n        <_>\n          17 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 10 -1.</_>\n        <_>\n          3 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 2 -1.</_>\n        <_>\n          5 0 1 1 2.</_>\n        <_>\n          6 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 3 6 -1.</_>\n        <_>\n          3 13 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 10 -1.</_>\n        <_>\n          7 6 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 9 5 -1.</_>\n        <_>\n          9 10 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 3 9 -1.</_>\n        <_>\n          11 5 1 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 4 -1.</_>\n        <_>\n          4 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 2 -1.</_>\n        <_>\n          4 6 1 1 2.</_>\n        <_>\n          5 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 3 -1.</_>\n        <_>\n          0 3 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 8 4 -1.</_>\n        <_>\n          12 0 4 2 2.</_>\n        <_>\n          16 2 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 8 2 -1.</_>\n        <_>\n          11 1 4 1 2.</_>\n        <_>\n          15 2 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 7 3 -1.</_>\n        <_>\n          12 3 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 3 2 -1.</_>\n        <_>\n          4 6 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 6 -1.</_>\n        <_>\n          4 9 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 4 -1.</_>\n        <_>\n          13 12 3 2 2.</_>\n        <_>\n          16 14 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 2 4 -1.</_>\n        <_>\n          13 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 3 3 -1.</_>\n        <_>\n          15 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 2 3 -1.</_>\n        <_>\n          14 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 8 -1.</_>\n        <_>\n          18 4 1 4 2.</_>\n        <_>\n          19 8 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 2 4 -1.</_>\n        <_>\n          7 14 1 2 2.</_>\n        <_>\n          8 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 6 -1.</_>\n        <_>\n          14 5 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 7 1 2 -1.</_>\n        <_>\n          19 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 2 -1.</_>\n        <_>\n          8 8 3 1 2.</_>\n        <_>\n          11 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 6 1 3 -1.</_>\n        <_>\n          19 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 7 3 -1.</_>\n        <_>\n          7 9 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 6 -1.</_>\n        <_>\n          18 6 1 3 2.</_>\n        <_>\n          19 9 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 8 6 -1.</_>\n        <_>\n          5 10 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 15 -1.</_>\n        <_>\n          10 1 9 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 5 4 -1.</_>\n        <_>\n          11 9 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 3 -1.</_>\n        <_>\n          11 12 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 2 4 -1.</_>\n        <_>\n          0 9 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 2 -1.</_>\n        <_>\n          6 12 2 1 2.</_>\n        <_>\n          8 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 8 -1.</_>\n        <_>\n          7 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 2 4 -1.</_>\n        <_>\n          9 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 6 -1.</_>\n        <_>\n          9 12 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 4 2 -1.</_>\n        <_>\n          12 14 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 8 1 -1.</_>\n        <_>\n          4 4 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 1 2 -1.</_>\n        <_>\n          14 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 6 -1.</_>\n        <_>\n          8 7 1 3 2.</_>\n        <_>\n          9 10 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 10 6 -1.</_>\n        <_>\n          5 8 5 3 2.</_>\n        <_>\n          10 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 3 -1.</_>\n        <_>\n          5 13 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 2 -1.</_>\n        <_>\n          5 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 15 -1.</_>\n        <_>\n          6 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 2 4 -1.</_>\n        <_>\n          7 6 1 2 2.</_>\n        <_>\n          8 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 3 -1.</_>\n        <_>\n          5 10 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 2 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_>\n        <_>\n          16 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 4 6 -1.</_>\n        <_>\n          4 13 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 6 -1.</_>\n        <_>\n          6 0 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 12 4 -1.</_>\n        <_>\n          4 11 6 2 2.</_>\n        <_>\n          10 13 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 3 3 -1.</_>\n        <_>\n          7 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 2 -1.</_>\n        <_>\n          9 13 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 8 -1.</_>\n        <_>\n          8 0 6 4 2.</_>\n        <_>\n          14 4 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 4 4 -1.</_>\n        <_>\n          10 8 2 2 2.</_>\n        <_>\n          12 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 1 6 -1.</_>\n        <_>\n          12 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 10 -1.</_>\n        <_>\n          6 5 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 6 -1.</_>\n        <_>\n          11 0 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 2 6 -1.</_>\n        <_>\n          9 7 1 3 2.</_>\n        <_>\n          10 10 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 3 1 -1.</_>\n        <_>\n          9 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 2 2 -1.</_>\n        <_>\n          11 15 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 6 2 -1.</_>\n        <_>\n          12 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 8 6 -1.</_>\n        <_>\n          8 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 6 -1.</_>\n        <_>\n          7 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 3 -1.</_>\n        <_>\n          5 2 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 12 -1.</_>\n        <_>\n          5 4 5 6 2.</_>\n        <_>\n          10 10 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 2 -1.</_>\n        <_>\n          5 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 1 3 -1.</_>\n        <_>\n          7 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          5 12 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 9 -1.</_>\n        <_>\n          8 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 6 -1.</_>\n        <_>\n          7 10 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 3 14 -1.</_>\n        <_>\n          4 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 3 6 -1.</_>\n        <_>\n          4 10 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 2 -1.</_>\n        <_>\n          4 8 1 1 2.</_>\n        <_>\n          5 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 2 3 -1.</_>\n        <_>\n          10 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 8 4 -1.</_>\n        <_>\n          6 14 4 2 2.</_>\n        <_>\n          10 16 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 3 4 -1.</_>\n        <_>\n          6 12 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 2 2 -1.</_>\n        <_>\n          17 11 1 1 2.</_>\n        <_>\n          18 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 1 10 -1.</_>\n        <_>\n          15 11 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 12 6 -1.</_>\n        <_>\n          7 3 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 4 -1.</_>\n        <_>\n          4 9 1 2 2.</_>\n        <_>\n          5 11 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 12 -1.</_>\n        <_>\n          9 7 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 2 3 -1.</_>\n        <_>\n          8 6 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 1 3 -1.</_>\n        <_>\n          0 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 1 3 -1.</_>\n        <_>\n          0 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 3 5 -1.</_>\n        <_>\n          12 15 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 6 -1.</_>\n        <_>\n          8 8 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 3 12 -1.</_>\n        <_>\n          5 7 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 2 2 -1.</_>\n        <_>\n          7 9 1 1 2.</_>\n        <_>\n          8 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 2 12 -1.</_>\n        <_>\n          4 8 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 7 3 -1.</_>\n        <_>\n          4 6 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 3 -1.</_>\n        <_>\n          13 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 2 -1.</_>\n        <_>\n          4 0 1 1 2.</_>\n        <_>\n          5 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 3 11 -1.</_>\n        <_>\n          12 8 1 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 2 2 -1.</_>\n        <_>\n          4 0 1 1 2.</_>\n        <_>\n          5 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 2 2 -1.</_>\n        <_>\n          9 3 1 1 2.</_>\n        <_>\n          10 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 3 2 -1.</_>\n        <_>\n          8 11 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 1 -1.</_>\n        <_>\n          12 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 2 -1.</_>\n        <_>\n          10 8 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 15 3 1 -1.</_>\n        <_>\n          18 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 2 4 -1.</_>\n        <_>\n          12 6 1 2 2.</_>\n        <_>\n          13 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 9 11 -1.</_>\n        <_>\n          11 3 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 2 -1.</_>\n        <_>\n          11 8 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 9 -1.</_>\n        <_>\n          12 8 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 17 -1.</_>\n        <_>\n          15 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 3 4 -1.</_>\n        <_>\n          7 6 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 7 -1.</_>\n        <_>\n          7 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 2 -1.</_>\n        <_>\n          8 5 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 6 2 -1.</_>\n        <_>\n          7 15 3 1 2.</_>\n        <_>\n          10 16 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 1 3 -1.</_>\n        <_>\n          11 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 7 -1.</_>\n        <_>\n          4 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 5 3 -1.</_>\n        <_>\n          11 18 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 2 2 -1.</_>\n        <_>\n          17 11 1 1 2.</_>\n        <_>\n          18 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 6 3 -1.</_>\n        <_>\n          10 18 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 1 2 -1.</_>\n        <_>\n          2 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 3 -1.</_>\n        <_>\n          8 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 1 2 -1.</_>\n        <_>\n          7 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 2 2 -1.</_>\n        <_>\n          2 16 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 3 1 -1.</_>\n        <_>\n          4 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 20 -1.</_>\n        <_>\n          4 0 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 12 12 -1.</_>\n        <_>\n          14 2 6 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 2 3 -1.</_>\n        <_>\n          5 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 2 2 -1.</_>\n        <_>\n          3 4 1 1 2.</_>\n        <_>\n          4 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 3 -1.</_>\n        <_>\n          10 15 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 4 -1.</_>\n        <_>\n          6 13 1 2 2.</_>\n        <_>\n          7 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 7 -1.</_>\n        <_>\n          13 8 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 10 -1.</_>\n        <_>\n          8 9 3 5 2.</_>\n        <_>\n          11 14 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 16 2 -1.</_>\n        <_>\n          10 10 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 15 6 -1.</_>\n        <_>\n          10 3 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 2 1 -1.</_>\n        <_>\n          11 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 4 4 -1.</_>\n        <_>\n          11 11 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 2 4 -1.</_>\n        <_>\n          12 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 10 14 -1.</_>\n        <_>\n          1 3 5 7 2.</_>\n        <_>\n          6 10 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 4 -1.</_>\n        <_>\n          8 2 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 2 1 -1.</_>\n        <_>\n          11 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 5 3 -1.</_>\n        <_>\n          5 13 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 1 3 -1.</_>\n        <_>\n          7 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 6 3 -1.</_>\n        <_>\n          10 13 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 1 3 -1.</_>\n        <_>\n          6 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 3 -1.</_>\n        <_>\n          2 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 11 6 -1.</_>\n        <_>\n          8 10 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 10 8 -1.</_>\n        <_>\n          2 6 5 4 2.</_>\n        <_>\n          7 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 2 -1.</_>\n        <_>\n          11 2 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 6 3 -1.</_>\n        <_>\n          15 9 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 1 2 -1.</_>\n        <_>\n          5 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 3 1 -1.</_>\n        <_>\n          2 7 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 8 6 -1.</_>\n        <_>\n          4 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 1 2 -1.</_>\n        <_>\n          11 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 1 2 -1.</_>\n        <_>\n          12 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 10 4 -1.</_>\n        <_>\n          10 15 5 2 2.</_>\n        <_>\n          15 17 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 1 2 -1.</_>\n        <_>\n          12 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 1 -1.</_>\n        <_>\n          7 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 2 -1.</_>\n        <_>\n          12 3 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 5 -1.</_>\n        <_>\n          7 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 3 1 -1.</_>\n        <_>\n          4 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 5 -1.</_>\n        <_>\n          7 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 3 -1.</_>\n        <_>\n          7 7 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 8 -1.</_>\n        <_>\n          7 8 2 4 2.</_>\n        <_>\n          9 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 14 12 -1.</_>\n        <_>\n          4 6 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 2 6 -1.</_>\n        <_>\n          4 14 1 3 2.</_>\n        <_>\n          5 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 4 -1.</_>\n        <_>\n          7 13 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 10 15 -1.</_>\n        <_>\n          6 9 10 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 6 -1.</_>\n        <_>\n          6 13 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 4 3 -1.</_>\n        <_>\n          6 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 4 3 -1.</_>\n        <_>\n          6 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 3 7 -1.</_>\n        <_>\n          10 13 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 5 2 -1.</_>\n        <_>\n          2 9 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 8 -1.</_>\n        <_>\n          15 1 1 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 1 2 -1.</_>\n        <_>\n          2 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 2 2 -1.</_>\n        <_>\n          8 6 1 1 2.</_>\n        <_>\n          9 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 10 12 -1.</_>\n        <_>\n          4 9 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 8 4 -1.</_>\n        <_>\n          5 9 4 2 2.</_>\n        <_>\n          9 11 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 4 4 -1.</_>\n        <_>\n          9 11 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 2 -1.</_>\n        <_>\n          5 11 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 2 1 -1.</_>\n        <_>\n          7 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 1 -1.</_>\n        <_>\n          13 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 8 -1.</_>\n        <_>\n          13 6 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 10 -1.</_>\n        <_>\n          10 4 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 9 2 -1.</_>\n        <_>\n          3 18 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 3 3 -1.</_>\n        <_>\n          15 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 2 2 -1.</_>\n        <_>\n          9 12 1 1 2.</_>\n        <_>\n          10 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 7 3 -1.</_>\n        <_>\n          13 13 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 2 -1.</_>\n        <_>\n          14 11 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 5 14 -1.</_>\n        <_>\n          14 12 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 5 3 -1.</_>\n        <_>\n          4 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 5 3 -1.</_>\n        <_>\n          5 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 5 -1.</_>\n        <_>\n          10 14 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 2 1 -1.</_>\n        <_>\n          10 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 2 -1.</_>\n        <_>\n          6 10 3 1 2.</_>\n        <_>\n          9 11 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 6 -1.</_>\n        <_>\n          8 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 7 6 -1.</_>\n        <_>\n          10 15 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 8 -1.</_>\n        <_>\n          4 1 1 4 2.</_>\n        <_>\n          5 5 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 4 -1.</_>\n        <_>\n          3 6 3 2 2.</_>\n        <_>\n          6 8 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 3 13 -1.</_>\n        <_>\n          16 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 2 6 -1.</_>\n        <_>\n          16 10 1 3 2.</_>\n        <_>\n          17 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 19 2 1 -1.</_>\n        <_>\n          14 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 2 1 -1.</_>\n        <_>\n          8 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 3 4 -1.</_>\n        <_>\n          5 10 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 2 4 -1.</_>\n        <_>\n          4 7 1 2 2.</_>\n        <_>\n          5 9 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 5 4 -1.</_>\n        <_>\n          10 9 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 8 16 -1.</_>\n        <_>\n          7 4 4 8 2.</_>\n        <_>\n          11 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 10 6 -1.</_>\n        <_>\n          5 9 5 3 2.</_>\n        <_>\n          10 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 2 -1.</_>\n        <_>\n          5 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 4 8 -1.</_>\n        <_>\n          12 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 6 2 -1.</_>\n        <_>\n          8 14 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 5 6 -1.</_>\n        <_>\n          3 14 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 2 -1.</_>\n        <_>\n          16 0 1 1 2.</_>\n        <_>\n          17 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 3 4 -1.</_>\n        <_>\n          14 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 3 1 -1.</_>\n        <_>\n          16 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 5 -1.</_>\n        <_>\n          16 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 8 18 -1.</_>\n        <_>\n          10 10 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 2 -1.</_>\n        <_>\n          11 6 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 2 1 -1.</_>\n        <_>\n          6 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 3 3 -1.</_>\n        <_>\n          4 4 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 1 3 -1.</_>\n        <_>\n          11 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 3 3 -1.</_>\n        <_>\n          16 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 5 12 -1.</_>\n        <_>\n          15 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 10 -1.</_>\n        <_>\n          4 0 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 1 2 -1.</_>\n        <_>\n          15 16 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 2 -1.</_>\n        <_>\n          15 0 2 1 2.</_>\n        <_>\n          17 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 2 1 -1.</_>\n        <_>\n          18 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 1 3 -1.</_>\n        <_>\n          8 14 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 2 6 -1.</_>\n        <_>\n          9 1 1 3 2.</_>\n        <_>\n          10 4 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 3 -1.</_>\n        <_>\n          1 13 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 3 3 -1.</_>\n        <_>\n          12 15 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 3 1 -1.</_>\n        <_>\n          16 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 1 -1.</_>\n        <_>\n          12 6 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 3 7 -1.</_>\n        <_>\n          13 5 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 2 2 -1.</_>\n        <_>\n          8 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 2 -1.</_>\n        <_>\n          7 1 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 5 -1.</_>\n        <_>\n          14 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 3 6 -1.</_>\n        <_>\n          15 2 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 4 3 -1.</_>\n        <_>\n          8 7 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 1 9 -1.</_>\n        <_>\n          6 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 7 6 -1.</_>\n        <_>\n          3 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 3 -1.</_>\n        <_>\n          6 7 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 1 -1.</_>\n        <_>\n          6 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 4 -1.</_>\n        <_>\n          4 5 2 2 2.</_>\n        <_>\n          6 7 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 3 -1.</_>\n        <_>\n          8 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 7 -1.</_>\n        <_>\n          7 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 3 5 -1.</_>\n        <_>\n          11 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 13 -1.</_>\n        <_>\n          12 4 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 3 3 -1.</_>\n        <_>\n          3 13 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 2 -1.</_>\n        <_>\n          5 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 1 3 -1.</_>\n        <_>\n          0 5 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 6 -1.</_>\n        <_>\n          9 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 12 -1.</_>\n        <_>\n          9 7 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 6 3 -1.</_>\n        <_>\n          9 12 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 9 12 -1.</_>\n        <_>\n          8 10 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 15 -1.</_>\n        <_>\n          11 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 6 4 -1.</_>\n        <_>\n          8 16 3 2 2.</_>\n        <_>\n          11 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 10 6 -1.</_>\n        <_>\n          6 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 3 4 -1.</_>\n        <_>\n          3 12 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 4 3 -1.</_>\n        <_>\n          9 14 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 6 -1.</_>\n        <_>\n          3 0 2 3 2.</_>\n        <_>\n          5 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 1 -1.</_>\n        <_>\n          8 9 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 2 3 -1.</_>\n        <_>\n          11 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 1 -1.</_>\n        <_>\n          6 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 12 -1.</_>\n        <_>\n          17 4 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 3 6 -1.</_>\n        <_>\n          11 13 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 3 7 -1.</_>\n        <_>\n          11 13 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 1 -1.</_>\n        <_>\n          8 5 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 8 -1.</_>\n        <_>\n          19 2 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 1 -1.</_>\n        <_>\n          6 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 6 -1.</_>\n        <_>\n          8 7 2 3 2.</_>\n        <_>\n          10 10 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 2 2 -1.</_>\n        <_>\n          8 3 1 1 2.</_>\n        <_>\n          9 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 3 -1.</_>\n        <_>\n          18 6 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 4 -1.</_>\n        <_>\n          18 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 2 4 -1.</_>\n        <_>\n          8 2 1 2 2.</_>\n        <_>\n          9 4 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 2 2 -1.</_>\n        <_>\n          5 6 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 1 -1.</_>\n        <_>\n          5 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 9 10 -1.</_>\n        <_>\n          10 14 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 1 -1.</_>\n        <_>\n          7 4 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 1 3 -1.</_>\n        <_>\n          8 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 1 -1.</_>\n        <_>\n          7 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 3 9 -1.</_>\n        <_>\n          5 12 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 7 3 -1.</_>\n        <_>\n          5 14 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 10 -1.</_>\n        <_>\n          9 6 1 5 2.</_>\n        <_>\n          10 11 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 18 -1.</_>\n        <_>\n          13 10 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 2 3 -1.</_>\n        <_>\n          5 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 7 -1.</_>\n        <_>\n          10 10 1 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 13 -1.</_>\n        <_>\n          18 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 1 2 -1.</_>\n        <_>\n          13 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 3 2 -1.</_>\n        <_>\n          7 15 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 2 3 -1.</_>\n        <_>\n          5 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 1 6 -1.</_>\n        <_>\n          16 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 2 2 -1.</_>\n        <_>\n          1 6 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 4 8 -1.</_>\n        <_>\n          3 12 2 4 2.</_>\n        <_>\n          5 16 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 8 -1.</_>\n        <_>\n          7 2 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 6 -1.</_>\n        <_>\n          6 7 1 3 2.</_>\n        <_>\n          7 10 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 2 -1.</_>\n        <_>\n          7 12 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 13 2 -1.</_>\n        <_>\n          4 10 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 1 2 -1.</_>\n        <_>\n          19 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 9 1 -1.</_>\n        <_>\n          7 8 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 2 1 -1.</_>\n        <_>\n          9 8 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 2 10 -1.</_>\n        <_>\n          3 5 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 1 -1.</_>\n        <_>\n          7 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 3 -1.</_>\n        <_>\n          15 5 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 2 -1.</_>\n        <_>\n          4 8 1 1 2.</_>\n        <_>\n          5 9 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 9 2 -1.</_>\n        <_>\n          8 17 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 2 3 -1.</_>\n        <_>\n          6 8 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 2 2 -1.</_>\n        <_>\n          12 11 1 1 2.</_>\n        <_>\n          13 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 2 4 -1.</_>\n        <_>\n          15 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 2 3 -1.</_>\n        <_>\n          5 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 3 -1.</_>\n        <_>\n          6 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 1 6 -1.</_>\n        <_>\n          6 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 5 9 -1.</_>\n        <_>\n          6 12 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 2 2 -1.</_>\n        <_>\n          8 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 2 -1.</_>\n        <_>\n          10 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 6 -1.</_>\n        <_>\n          8 10 2 3 2.</_>\n        <_>\n          10 13 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 20 -1.</_>\n        <_>\n          5 0 3 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 2 4 -1.</_>\n        <_>\n          12 3 1 2 2.</_>\n        <_>\n          13 5 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 10 -1.</_>\n        <_>\n          16 0 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 3 4 -1.</_>\n        <_>\n          14 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 1 2 -1.</_>\n        <_>\n          14 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 3 1 -1.</_>\n        <_>\n          17 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 2 2 -1.</_>\n        <_>\n          16 11 1 1 2.</_>\n        <_>\n          17 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 1 -1.</_>\n        <_>\n          15 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 9 -1.</_>\n        <_>\n          10 2 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 12 2 -1.</_>\n        <_>\n          11 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 2 1 -1.</_>\n        <_>\n          14 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 3 -1.</_>\n        <_>\n          7 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 4 2 -1.</_>\n        <_>\n          18 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 8 8 -1.</_>\n        <_>\n          4 12 4 4 2.</_>\n        <_>\n          8 16 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 4 5 -1.</_>\n        <_>\n          16 8 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 6 2 -1.</_>\n        <_>\n          13 8 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 5 -1.</_>\n        <_>\n          12 5 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 10 -1.</_>\n        <_>\n          16 9 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 3 1 -1.</_>\n        <_>\n          5 18 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 4 4 -1.</_>\n        <_>\n          4 13 2 2 2.</_>\n        <_>\n          6 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 2 3 -1.</_>\n        <_>\n          6 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 1 3 -1.</_>\n        <_>\n          6 16 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 3 1 -1.</_>\n        <_>\n          8 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 3 1 -1.</_>\n        <_>\n          8 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 4 1 -1.</_>\n        <_>\n          11 10 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 2 1 -1.</_>\n        <_>\n          12 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 1 6 -1.</_>\n        <_>\n          7 11 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 3 -1.</_>\n        <_>\n          7 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 1 3 -1.</_>\n        <_>\n          13 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 2 4 -1.</_>\n        <_>\n          5 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 6 -1.</_>\n        <_>\n          8 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 13 -1.</_>\n        <_>\n          8 5 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 10 8 -1.</_>\n        <_>\n          8 4 5 4 2.</_>\n        <_>\n          13 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 9 6 -1.</_>\n        <_>\n          11 3 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 3 -1.</_>\n        <_>\n          13 0 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 15 -1.</_>\n        <_>\n          12 1 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 14 9 -1.</_>\n        <_>\n          4 11 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 1 16 -1.</_>\n        <_>\n          11 10 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 2 14 -1.</_>\n        <_>\n          12 8 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 4 -1.</_>\n        <_>\n          12 1 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 2 -1.</_>\n        <_>\n          9 8 2 1 2.</_>\n        <_>\n          11 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 2 2 -1.</_>\n        <_>\n          18 3 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 3 2 -1.</_>\n        <_>\n          3 6 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 2 2 -1.</_>\n        <_>\n          9 9 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 6 1 -1.</_>\n        <_>\n          8 15 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 2 4 -1.</_>\n        <_>\n          16 10 1 2 2.</_>\n        <_>\n          17 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 6 -1.</_>\n        <_>\n          6 6 5 3 2.</_>\n        <_>\n          11 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 3 -1.</_>\n        <_>\n          13 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 2 -1.</_>\n        <_>\n          13 0 2 1 2.</_>\n        <_>\n          15 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 2 -1.</_>\n        <_>\n          10 0 5 1 2.</_>\n        <_>\n          15 1 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 2 1 -1.</_>\n        <_>\n          14 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 2 -1.</_>\n        <_>\n          4 9 1 1 2.</_>\n        <_>\n          5 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 2 3 -1.</_>\n        <_>\n          6 9 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 2 3 -1.</_>\n        <_>\n          2 13 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 10 2 -1.</_>\n        <_>\n          2 0 5 1 2.</_>\n        <_>\n          7 1 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 2 2 -1.</_>\n        <_>\n          6 3 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 8 2 -1.</_>\n        <_>\n          5 11 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 5 10 -1.</_>\n        <_>\n          11 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 4 3 -1.</_>\n        <_>\n          5 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 12 -1.</_>\n        <_>\n          9 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 3 5 -1.</_>\n        <_>\n          17 10 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 2 4 -1.</_>\n        <_>\n          15 12 1 2 2.</_>\n        <_>\n          16 14 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 8 -1.</_>\n        <_>\n          8 0 6 4 2.</_>\n        <_>\n          14 4 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 5 3 -1.</_>\n        <_>\n          14 2 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 3 6 -1.</_>\n        <_>\n          3 2 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 2 2 -1.</_>\n        <_>\n          7 5 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 12 1 -1.</_>\n        <_>\n          11 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 7 2 -1.</_>\n        <_>\n          13 10 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 1 3 -1.</_>\n        <_>\n          5 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 15 2 -1.</_>\n        <_>\n          5 4 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 9 13 -1.</_>\n        <_>\n          6 0 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 2 -1.</_>\n        <_>\n          7 10 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 2 -1.</_>\n        <_>\n          8 3 2 1 2.</_>\n        <_>\n          10 4 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 6 -1.</_>\n        <_>\n          8 7 1 3 2.</_>\n        <_>\n          9 10 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 2 3 -1.</_>\n        <_>\n          9 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          6 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 1 2 -1.</_>\n        <_>\n          0 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 1 6 -1.</_>\n        <_>\n          7 2 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 5 -1.</_>\n        <_>\n          15 0 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 1 -1.</_>\n        <_>\n          7 2 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 5 2 -1.</_>\n        <_>\n          11 14 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 1 3 -1.</_>\n        <_>\n          13 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 12 2 -1.</_>\n        <_>\n          11 17 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 13 20 -1.</_>\n        <_>\n          0 10 13 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 10 12 -1.</_>\n        <_>\n          4 13 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 2 2 -1.</_>\n        <_>\n          11 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 4 4 -1.</_>\n        <_>\n          11 11 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 16 5 -1.</_>\n        <_>\n          12 9 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 2 4 -1.</_>\n        <_>\n          17 9 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 1 -1.</_>\n        <_>\n          16 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 4 11 -1.</_>\n        <_>\n          16 3 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 10 10 -1.</_>\n        <_>\n          4 3 5 5 2.</_>\n        <_>\n          9 8 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 3 1 -1.</_>\n        <_>\n          17 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 14 9 -1.</_>\n        <_>\n          6 7 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 2 4 -1.</_>\n        <_>\n          8 13 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 8 -1.</_>\n        <_>\n          5 9 3 4 2.</_>\n        <_>\n          8 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 4 4 -1.</_>\n        <_>\n          5 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 1 3 -1.</_>\n        <_>\n          7 15 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 3 1 -1.</_>\n        <_>\n          10 10 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 2 4 -1.</_>\n        <_>\n          4 8 1 2 2.</_>\n        <_>\n          5 10 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 2 5 -1.</_>\n        <_>\n          15 6 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 7 -1.</_>\n        <_>\n          15 7 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 7 -1.</_>\n        <_>\n          17 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 5 -1.</_>\n        <_>\n          11 11 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 4 -1.</_>\n        <_>\n          10 8 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 14 -1.</_>\n        <_>\n          1 2 4 7 2.</_>\n        <_>\n          5 9 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 3 1 -1.</_>\n        <_>\n          11 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 4 -1.</_>\n        <_>\n          9 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 2 -1.</_>\n        <_>\n          7 14 3 1 2.</_>\n        <_>\n          10 15 3 1 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_righteye_2splits.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    Tree-based 20x20 right eye detector.\n    The detector is trained by 6665 positive samples from FERET, VALID and BioID face databases. \n    Created by Shiqi Yu (http://yushiqi.cn/research/eyedetection).\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's 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   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>20</height>\n  <width>20</width>\n  <stageParams>\n    <maxWeakCount>34</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>20</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>5</maxWeakCount>\n      <stageThreshold>-2.2325520515441895e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 0 -4.8210550099611282e-02 -1 -2 1\n            -4.1576199233531952e-02</internalNodes>\n          <leafValues>\n            -8.6140447854995728e-01 9.1769057512283325e-01\n            -2.1284009516239166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 2 9.3528684228658676e-03 -1 -2 3 -2.2144919785205275e-04</internalNodes>\n          <leafValues>\n            -6.9785767793655396e-01 7.9523372650146484e-01\n            -4.8948091268539429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 4 -2.1853350102901459e-02 -1 -2 5 9.9672928452491760e-02</internalNodes>\n          <leafValues>\n            7.0574641227722168e-01 -7.0666241645812988e-01\n            7.9210978746414185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 6 -2.1664820611476898e-02 -1 -2 7\n            -7.5680727604776621e-04</internalNodes>\n          <leafValues>\n            -6.0898607969284058e-01 7.1685701608657837e-01\n            -3.0464568734169006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 8 -1.3333049602806568e-02 -1 -2 9 9.2925298959016800e-03</internalNodes>\n          <leafValues>\n            -4.6844691038131714e-01 6.4235931634902954e-01\n            -5.1180428266525269e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>5</maxWeakCount>\n      <stageThreshold>-2.1598019599914551e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 10 -3.3948719501495361e-01 -1 -2 11\n            -1.3672479987144470e-01</internalNodes>\n          <leafValues>\n            7.7913260459899902e-01 2.6421278715133667e-01\n            -8.7910091876983643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 12 3.1394500285387039e-02 -1 -2 13\n            -1.0828140191733837e-02</internalNodes>\n          <leafValues>\n            -6.9956701993942261e-01 7.6504492759704590e-01\n            -4.3719211220741272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 14 -4.2506768368184566e-03 -1 -2 15\n            -2.2675469517707825e-02</internalNodes>\n          <leafValues>\n            -5.7561582326889038e-01 7.4080592393875122e-01\n            -3.6677250266075134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 16 3.9161480963230133e-02 -1 -2 17\n            -3.1934089493006468e-03</internalNodes>\n          <leafValues>\n            6.4045161008834839e-01 1.6047589480876923e-01\n            -7.1010977029800415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 18 2.5321990251541138e-02 -1 -2 19\n            7.7583367237821221e-04</internalNodes>\n          <leafValues>\n            4.9574860930442810e-01 -7.1737897396087646e-01\n            -1.8581770360469818e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>8</maxWeakCount>\n      <stageThreshold>-2.3451159000396729e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 20 -2.6554059982299805e-01 -1 -2 21\n            -2.2532779723405838e-02</internalNodes>\n          <leafValues>\n            -8.4712451696395874e-01 8.7977188825607300e-01\n            -3.3394691348075867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 22 8.5310067515820265e-04 -1 -2 23\n            1.5820249973330647e-04</internalNodes>\n          <leafValues>\n            -8.2032448053359985e-01 -7.5176358222961426e-01\n            6.7769712209701538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 24 -1.0837490117410198e-04 -1 -2 25\n            2.6810260023921728e-03</internalNodes>\n          <leafValues>\n            -8.3314001560211182e-01 5.3844749927520752e-01\n            -7.6534157991409302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 26 8.5202371701598167e-04 -1 -2 27\n            -1.2241739779710770e-02</internalNodes>\n          <leafValues>\n            -7.7514898777008057e-01 6.3240152597427368e-01\n            -6.3395208120346069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 28 6.2314196838997304e-05 -1 -2 29\n            -7.1911108493804932e-01</internalNodes>\n          <leafValues>\n            4.4290411472320557e-01 8.0135929584503174e-01\n            -5.3431099653244019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 30 -2.4280339479446411e-02 -1 -2 31\n            3.4558640327304602e-03</internalNodes>\n          <leafValues>\n            -6.7797917127609253e-01 4.9030610918998718e-01\n            -8.8447982072830200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 32 -6.2993327446747571e-05 -1 -2 33\n            -4.6443562023341656e-03</internalNodes>\n          <leafValues>\n            -5.7883417606353760e-01 -8.5878807306289673e-01\n            5.2454602718353271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 34 -4.0299328247783706e-05 -1 -2 35\n            -3.7485519424080849e-03</internalNodes>\n          <leafValues>\n            -5.2713459730148315e-01 -8.5626190900802612e-01\n            4.8944610357284546e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>10</maxWeakCount>\n      <stageThreshold>-2.3431489467620850e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 36 -3.8377079367637634e-01 -1 -2 37\n            -1.3837030529975891e-01</internalNodes>\n          <leafValues>\n            7.1715021133422852e-01 3.4392359852790833e-01\n            -7.9931277036666870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 38 3.3107071067206562e-04 -1 -2 39\n            -5.1273438148200512e-03</internalNodes>\n          <leafValues>\n            -6.8352431058883667e-01 5.8250617980957031e-01\n            -4.0955001115798950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 40 -2.6100680232048035e-02 -1 -2 41\n            -1.0628979653120041e-03</internalNodes>\n          <leafValues>\n            -4.3713301420211792e-01 7.0680737495422363e-01\n            -2.6817938685417175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 42 -9.7854852676391602e-02 -1 -2 43\n            -1.1829820275306702e-01</internalNodes>\n          <leafValues>\n            7.3940038681030273e-01 6.3814181089401245e-01\n            -3.8721871376037598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 44 -7.5409049168229103e-03 -1 -2 45\n            2.6851659640669823e-03</internalNodes>\n          <leafValues>\n            -4.8803019523620605e-01 3.9083468914031982e-01\n            -6.5561538934707642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 46 1.6870240215212107e-03 -1 -2 47\n            -3.8136160001158714e-03</internalNodes>\n          <leafValues>\n            -4.9891749024391174e-01 -6.6405588388442993e-01\n            4.0650749206542969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 48 2.0289309322834015e-03 -1 -2 49\n            -7.6308869756758213e-03</internalNodes>\n          <leafValues>\n            -6.9989210367202759e-01 4.3206840753555298e-01\n            -2.9664969444274902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 50 -3.3815231290645897e-04 -1 -2 51\n            7.5163291767239571e-03</internalNodes>\n          <leafValues>\n            -4.6808540821075439e-01 3.6521491408348083e-01\n            -7.6014542579650879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 52 6.1479508876800537e-02 -1 -2 53\n            -4.6286579221487045e-02</internalNodes>\n          <leafValues>\n            5.6990629434585571e-01 2.2625060379505157e-01\n            -4.5330780744552612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 54 4.6903551556169987e-03 -1 -2 55\n            1.8803169950842857e-03</internalNodes>\n          <leafValues>\n            -7.7286708354949951e-01 2.7349120378494263e-01\n            -6.6667830944061279e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>8</maxWeakCount>\n      <stageThreshold>-2.1268370151519775e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 56 -5.5420672893524170e-01 -1 -2 57\n            -6.9329799152910709e-03</internalNodes>\n          <leafValues>\n            -6.0620260238647461e-01 7.8542029857635498e-01\n            -3.5522121191024780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 58 -2.1169960498809814e-02 -1 -2 59\n            -6.7428398132324219e-01</internalNodes>\n          <leafValues>\n            5.2947688102722168e-01 4.6065220236778259e-01\n            -7.0058208703994751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 60 -4.2725078761577606e-02 -1 -2 61\n            -1.0109329596161842e-02</internalNodes>\n          <leafValues>\n            -5.9904807806015015e-01 6.8109220266342163e-01\n            -2.0731879770755768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 62 6.5861130133271217e-03 -1 -2 63\n            -7.6380418613553047e-03</internalNodes>\n          <leafValues>\n            -5.2420848608016968e-01 -7.0169782638549805e-01\n            4.4100138545036316e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 64 -9.7681581974029541e-02 -1 -2 65\n            1.0197360068559647e-02</internalNodes>\n          <leafValues>\n            5.7708740234375000e-01 -9.8518550395965576e-02\n            -8.8111698627471924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 66 -2.5724549777805805e-03 -1 -2 67\n            2.6594230439513922e-03</internalNodes>\n          <leafValues>\n            -8.3233338594436646e-01 3.0995351076126099e-01\n            -8.1609177589416504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 68 -1.0042720241472125e-03 -1 -2 69\n            2.6080000679939985e-03</internalNodes>\n          <leafValues>\n            -4.3558520078659058e-01 3.3566600084304810e-01\n            -8.1889331340789795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 70 4.9724509008228779e-03 -1 -2 71\n            1.2243240140378475e-02</internalNodes>\n          <leafValues>\n            -7.7048182487487793e-01 2.2534200549125671e-01\n            -6.8695551156997681e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>10</maxWeakCount>\n      <stageThreshold>-2.0604379177093506e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 72 -5.7784929871559143e-02 -1 -2 73\n            -1.7517809756100178e-03</internalNodes>\n          <leafValues>\n            -7.0516008138656616e-01 8.5655921697616577e-01\n            -9.2403419315814972e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 74 -1.1522379703819752e-02 -1 -2 75\n            -3.8323760963976383e-03</internalNodes>\n          <leafValues>\n            -4.2749640345573425e-01 7.5913530588150024e-01\n            -1.0894049704074860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 76 -8.0922387540340424e-02 -1 -2 77\n            -6.2537011690437794e-03</internalNodes>\n          <leafValues>\n            -3.1364768743515015e-01 6.9995921850204468e-01\n            -1.1805690079927444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 78 -1.2227860093116760e-01 -1 -2 79\n            -6.4168110489845276e-02</internalNodes>\n          <leafValues>\n            5.2072501182556152e-01 3.9272749423980713e-01\n            -4.2194411158561707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 80 -5.3712888620793819e-04 -1 -2 81\n            -2.8175620827823877e-03</internalNodes>\n          <leafValues>\n            -4.9524548649787903e-01 4.1350141167640686e-01\n            -3.8919278979301453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 82 -3.6368549335747957e-03 -1 -2 83\n            -1.3223909772932529e-03</internalNodes>\n          <leafValues>\n            6.7615020275115967e-01 4.3426999449729919e-01\n            -3.7642130255699158e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 84 3.7143539520911872e-04 -1 -2 85\n            -5.0255712121725082e-03</internalNodes>\n          <leafValues>\n            -5.5630880594253540e-01 -5.2328592538833618e-01\n            3.4646821022033691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 86 -9.2711612523999065e-05 -1 -2 87\n            1.9847028888761997e-03</internalNodes>\n          <leafValues>\n            -4.9652668833732605e-01 3.3401641249656677e-01\n            -6.2446892261505127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 88 4.7203440219163895e-02 -1 -2 89\n            -6.8562600063160062e-05</internalNodes>\n          <leafValues>\n            5.7562619447708130e-01 2.6172660291194916e-02\n            -6.0849070549011230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 90 7.5034219771623611e-03 -1 -2 91\n            6.3834791071712971e-03</internalNodes>\n          <leafValues>\n            -6.8576759099960327e-01 -1.7312510311603546e-01\n            3.8560429215431213e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>12</maxWeakCount>\n      <stageThreshold>-2.3187489509582520e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 92 -1.5584450215101242e-02 -1 -2 93\n            1.4557019807398319e-02</internalNodes>\n          <leafValues>\n            -6.6648960113525391e-01 -4.3745130300521851e-01\n            7.2227817773818970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 94 -5.7889888994395733e-03 -1 -2 95\n            -8.1936769187450409e-02</internalNodes>\n          <leafValues>\n            -4.3183240294456482e-01 6.8467652797698975e-01\n            -2.2546729445457458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 96 -4.2995368130505085e-03 -1 -2 97\n            -1.3736640103161335e-02</internalNodes>\n          <leafValues>\n            -5.2409631013870239e-01 6.1626207828521729e-01\n            -3.5893160104751587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 98 -4.8069912008941174e-03 -1 -2 99\n            -7.7131099998950958e-02</internalNodes>\n          <leafValues>\n            -4.2382389307022095e-01 6.0599362850189209e-01\n            -3.1555330753326416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 100 4.4640208943746984e-04 -1 -2 101\n            3.4841578453779221e-02</internalNodes>\n          <leafValues>\n            -4.9206110835075378e-01 -4.1017889976501465e-02\n            6.1330878734588623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 102 8.2969048526138067e-04 -1 -2 103\n            -7.8510129242204130e-05</internalNodes>\n          <leafValues>\n            -4.5479419827461243e-01 4.0007328987121582e-01\n            -2.0888769626617432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 104 4.6054688282310963e-03 -1 -2 105\n            -7.1904482319951057e-03</internalNodes>\n          <leafValues>\n            -6.7931377887725830e-01 4.7060671448707581e-01\n            -1.4138610661029816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 106 -5.5724480189383030e-03 -1 -2 107\n            -7.0458237314596772e-04</internalNodes>\n          <leafValues>\n            -7.0525509119033813e-01 3.6097851395606995e-01\n            -1.8361540138721466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 108 1.8595060333609581e-02 -1 -2 109\n            5.0072550773620605e-02</internalNodes>\n          <leafValues>\n            4.1765761375427246e-01 -4.1869449615478516e-01\n            2.8186509013175964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 110 -2.0355919376015663e-02 -1 -2 111\n            -2.8686519712209702e-02</internalNodes>\n          <leafValues>\n            -3.6494150757789612e-01 -5.3867787122726440e-01\n            3.4767881035804749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 112 -7.1101690991781652e-05 -1 -2 113\n            2.0686469506472349e-03</internalNodes>\n          <leafValues>\n            -4.0156790614128113e-01 3.2963660359382629e-01\n            -7.0951050519943237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 114 1.1430920567363501e-03 -1 -2 115\n            -8.8636036962270737e-03</internalNodes>\n          <leafValues>\n            4.4172981381416321e-01 1.8426130712032318e-01\n            -4.1275170445442200e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>15</maxWeakCount>\n      <stageThreshold>-2.2203750610351562e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 116 -7.7637642621994019e-02 -1 -2 117\n            -8.4830820560455322e-03</internalNodes>\n          <leafValues>\n            -4.9321529269218445e-01 7.8138542175292969e-01\n            -3.6062291264533997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 118 -1.7180460272356868e-03 -1 -2 119\n            2.4740949273109436e-02</internalNodes>\n          <leafValues>\n            -4.7690048813819885e-01 -3.2420080900192261e-01\n            5.9280002117156982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 120 3.3028100151568651e-03 -1 -2 121\n            -3.4622039645910263e-02</internalNodes>\n          <leafValues>\n            -5.3991597890853882e-01 5.2076727151870728e-01\n            -3.3530798554420471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 122 -7.1505777304992080e-04 -1 -2 123\n            -9.0145105496048927e-03</internalNodes>\n          <leafValues>\n            -4.8981699347496033e-01 -7.7969801425933838e-01\n            3.6586359143257141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 124 -1.0250939521938562e-03 -1 -2 125\n            -5.5693178437650204e-03</internalNodes>\n          <leafValues>\n            -4.6970510482788086e-01 -6.9695621728897095e-01\n            3.5025438666343689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 126 1.3235070509836078e-03 -1 -2 127\n            -3.3737940248101950e-03</internalNodes>\n          <leafValues>\n            -4.4707980751991272e-01 -5.6195151805877686e-01\n            3.1833809614181519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 128 -6.4095242123585194e-05 -1 -2 129\n            -2.7294119354337454e-03</internalNodes>\n          <leafValues>\n            -3.5473638772964478e-01 4.1285240650177002e-01\n            -3.1416821479797363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 130 6.3087652961257845e-05 -1 -2 131\n            -1.5436099842190742e-02</internalNodes>\n          <leafValues>\n            -3.5946568846702576e-01 -6.1329078674316406e-01\n            3.4301999211311340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 132 -2.1025019232183695e-03 -1 -2 133\n            -1.6849569976329803e-02</internalNodes>\n          <leafValues>\n            -7.6962250471115112e-01 3.6569809913635254e-01\n            -2.1210379898548126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 134 5.6847798987291753e-05 -1 -2 135\n            5.9984489344060421e-03</internalNodes>\n          <leafValues>\n            -4.0466558933258057e-01 2.8503778576850891e-01\n            -5.8756178617477417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 136 6.1389962211251259e-03 -1 -2 137\n            -2.8117469628341496e-04</internalNodes>\n          <leafValues>\n            -8.7189829349517822e-01 2.5182509422302246e-01\n            -3.1868219375610352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 138 -4.5429798774421215e-03 -1 -2 139\n            -3.2167110592126846e-02</internalNodes>\n          <leafValues>\n            -3.6724218726158142e-01 -7.9481202363967896e-01\n            2.8887200355529785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 140 5.0912089645862579e-03 -1 -2 141\n            -1.5173070132732391e-03</internalNodes>\n          <leafValues>\n            -7.1477490663528442e-01 4.4514629244804382e-01\n            -9.5207341015338898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 142 -6.0079508693888783e-04 -1 -2 143\n            4.4868541881442070e-03</internalNodes>\n          <leafValues>\n            -3.6021450161933899e-01 2.8276360034942627e-01\n            -7.2084128856658936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 144 -3.7957848981022835e-03 -1 -2 145\n            -9.1829998418688774e-03</internalNodes>\n          <leafValues>\n            -2.8717440366744995e-01 5.0479042530059814e-01\n            -7.0781037211418152e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>17</maxWeakCount>\n      <stageThreshold>-2.1757249832153320e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 146 -5.5760249495506287e-02 -1 -2 147\n            -5.9436690062284470e-02</internalNodes>\n          <leafValues>\n            -5.5854648351669312e-01 6.8943697214126587e-01\n            -3.7195080518722534e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 148 -5.4637178778648376e-02 -1 -2 149\n            2.3608359694480896e-01</internalNodes>\n          <leafValues>\n            5.3040331602096558e-01 -4.7355309128761292e-01\n            4.6322488784790039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 150 -9.4560505822300911e-03 -1 -2 151\n            -5.3182709962129593e-02</internalNodes>\n          <leafValues>\n            -3.2544779777526855e-01 6.3468569517135620e-01\n            -2.8268361091613770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 152 -1.0638199746608734e-02 -1 -2 153\n            -2.1207019686698914e-02</internalNodes>\n          <leafValues>\n            -5.5776351690292358e-01 3.9049190282821655e-01\n            -4.2111930251121521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 154 -5.6731878430582583e-05 -1 -2 155\n            -4.4976451317779720e-04</internalNodes>\n          <leafValues>\n            -4.1803309321403503e-01 3.7355789542198181e-01\n            -3.9199641346931458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 156 2.7574670966714621e-03 -1 -2 157\n            2.5649419985711575e-03</internalNodes>\n          <leafValues>\n            -7.9104632139205933e-01 1.9258180260658264e-01\n            -7.5344461202621460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 158 -9.4359368085861206e-03 -1 -2 159\n            1.4136210083961487e-03</internalNodes>\n          <leafValues>\n            4.4834750890731812e-01 -3.3878430724143982e-01\n            4.4291919469833374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 160 3.9976350963115692e-03 -1 -2 161\n            -1.5278969658538699e-03</internalNodes>\n          <leafValues>\n            -6.6637581586837769e-01 3.1292399764060974e-01\n            -2.8027990460395813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 162 -3.2376639865105972e-05 -1 -2 163\n            1.6323389718309045e-03</internalNodes>\n          <leafValues>\n            -4.6672090888023376e-01 2.7995559573173523e-01\n            -6.1321508884429932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 164 7.7096219174563885e-03 -1 -2 165\n            -7.8599318861961365e-02</internalNodes>\n          <leafValues>\n            2.0352549850940704e-01 7.2726912796497345e-02\n            -6.8677097558975220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 166 -3.6581400781869888e-03 -1 -2 167\n            -4.2612198740243912e-02</internalNodes>\n          <leafValues>\n            -6.8079459667205811e-01 -8.4551781415939331e-01\n            1.5990570187568665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 168 -4.8822778626345098e-04 -1 -2 169\n            -4.6951142139732838e-03</internalNodes>\n          <leafValues>\n            -4.7945699095726013e-01 -8.2234281301498413e-01\n            2.0431579649448395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 170 6.1706348787993193e-05 -1 -2 171\n            1.3809910044074059e-02</internalNodes>\n          <leafValues>\n            -3.1742820143699646e-01 3.0769300460815430e-01\n            -4.3544968962669373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 172 -4.2187729850411415e-03 -1 -2 173\n            -3.9540808647871017e-03</internalNodes>\n          <leafValues>\n            6.2499982118606567e-01 1.3225209712982178e-01\n            -3.9745101332664490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 174 2.2203531116247177e-03 -1 -2 175\n            6.2806582718621939e-05</internalNodes>\n          <leafValues>\n            -6.0045331716537476e-01 -2.2429980337619781e-01\n            2.9768520593643188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 176 2.3292789701372385e-03 -1 -2 177\n            -5.3711822256445885e-03</internalNodes>\n          <leafValues>\n            -7.5982081890106201e-01 2.6484918594360352e-01\n            -2.6005539298057556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 178 6.4782587287481874e-05 -1 -2 179\n            7.6606678776443005e-03</internalNodes>\n          <leafValues>\n            -3.2119300961494446e-01 2.4176409840583801e-01\n            -8.3822727203369141e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>19</maxWeakCount>\n      <stageThreshold>-2.2618789672851562e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 180 -1.4848279766738415e-02 -1 -2 181\n            -1.6066679963842034e-03</internalNodes>\n          <leafValues>\n            -5.3391128778457642e-01 7.6002711057662964e-01\n            -2.1091739833354950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 182 -1.5651920437812805e-01 -1 -2 183\n            -5.5439779534935951e-03</internalNodes>\n          <leafValues>\n            -4.2818549275398254e-01 6.5620750188827515e-01\n            -2.2949840128421783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 184 -1.9448339939117432e-02 -1 -2 185\n            7.6653067953884602e-03</internalNodes>\n          <leafValues>\n            -4.4212520122528076e-01 -3.3950591087341309e-01\n            4.6587219834327698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 186 -2.1142010390758514e-01 -1 -2 187\n            -1.0628429800271988e-01</internalNodes>\n          <leafValues>\n            5.5007970333099365e-01 6.8280947208404541e-01\n            -3.0987739562988281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 188 -5.2653599530458450e-02 -1 -2 189\n            -5.3522300731856376e-05</internalNodes>\n          <leafValues>\n            -3.4818819165229797e-01 5.0566762685775757e-01\n            -2.5229519605636597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 190 -5.7972650974988937e-03 -1 -2 191\n            -3.7428899668157101e-03</internalNodes>\n          <leafValues>\n            3.0238011479377747e-01 2.2873230278491974e-01\n            -4.8366579413414001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 192 -5.2694038458866999e-05 -1 -2 193\n            -1.1983739677816629e-03</internalNodes>\n          <leafValues>\n            -3.7988960742950439e-01 -6.7442452907562256e-01\n            2.8611260652542114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 194 2.2544799372553825e-02 -1 -2 195\n            3.1783939339220524e-03</internalNodes>\n          <leafValues>\n            4.7565719485282898e-01 -2.8893348574638367e-01\n            5.5509638786315918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 196 3.4742769785225391e-03 -1 -2 197\n            -8.1408787518739700e-03</internalNodes>\n          <leafValues>\n            -5.9826552867889404e-01 -5.5933791399002075e-01\n            2.2349210083484650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 198 -3.0238809995353222e-03 -1 -2 199\n            -5.9159598313271999e-03</internalNodes>\n          <leafValues>\n            4.5917978882789612e-01 6.2234902381896973e-01\n            -2.4468150734901428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 200 2.3184430319815874e-03 -1 -2 201\n            7.7198208309710026e-03</internalNodes>\n          <leafValues>\n            -6.0478079319000244e-01 2.1004509925842285e-01\n            -6.4331281185150146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 202 -5.5973320268094540e-03 -1 -2 203\n            2.0320380281191319e-04</internalNodes>\n          <leafValues>\n            -7.1625810861587524e-01 -3.8018029928207397e-01\n            2.1336899697780609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 204 -3.8205389864742756e-03 -1 -2 205\n            4.8883338458836079e-03</internalNodes>\n          <leafValues>\n            -3.5957258939743042e-01 2.6471930742263794e-01\n            -5.8996689319610596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 206 -1.3334590476006269e-03 -1 -2 207\n            -1.5447080368176103e-03</internalNodes>\n          <leafValues>\n            3.2258489727973938e-01 3.6971050500869751e-01\n            -3.1308570504188538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 208 7.5150746852159500e-05 -1 -2 209\n            -1.1108840117231011e-03</internalNodes>\n          <leafValues>\n            -3.4674531221389771e-01 -5.7477539777755737e-01\n            2.9201140999794006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 210 -1.6881119518075138e-04 -1 -2 211\n            -1.2814450019504875e-04</internalNodes>\n          <leafValues>\n            -3.6041781306266785e-01 3.5043209791183472e-01\n            -2.2014050185680389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 212 1.9546970725059509e-02 -1 -2 213\n            -1.1061180382966995e-02</internalNodes>\n          <leafValues>\n            4.1295918822288513e-01 2.5962719321250916e-01\n            -3.4875950217247009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 214 1.8147419905290008e-03 -1 -2 215\n            -7.1724010631442070e-03</internalNodes>\n          <leafValues>\n            -5.2019888162612915e-01 2.7452668547630310e-01\n            -2.6828849315643311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 216 2.2158189676702023e-03 -1 -2 217\n            -9.6856858581304550e-03</internalNodes>\n          <leafValues>\n            -5.7340908050537109e-01 -5.8028572797775269e-01\n            1.8564410507678986e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>19</maxWeakCount>\n      <stageThreshold>-2.0994780063629150e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 218 -1.2065219692885876e-02 -1 -2 219\n            -4.9067771434783936e-01</internalNodes>\n          <leafValues>\n            6.1679571866989136e-01 1.4063939452171326e-01\n            -5.5357742309570312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 220 -6.6585717722773552e-03 -1 -2 221\n            1.5827560797333717e-02</internalNodes>\n          <leafValues>\n            -5.1332288980484009e-01 -3.6301520466804504e-01\n            4.3343341350555420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 222 -1.4081180095672607e-02 -1 -2 223\n            -1.2139449827373028e-02</internalNodes>\n          <leafValues>\n            5.4223722219467163e-01 4.4281288981437683e-01\n            -3.4171119332313538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 224 7.8055798076093197e-03 -1 -2 225\n            -7.0759910158813000e-05</internalNodes>\n          <leafValues>\n            -4.8659759759902954e-01 3.4818679094314575e-01\n            -3.2806739211082458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 226 -1.8199630081653595e-02 -1 -2 227\n            -2.5289389304816723e-03</internalNodes>\n          <leafValues>\n            5.6594151258468628e-01 1.1310060322284698e-01\n            -4.0772381424903870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 228 1.0156990028917789e-03 -1 -2 229\n            2.9432660085149109e-04</internalNodes>\n          <leafValues>\n            -5.9842979907989502e-01 2.8439450263977051e-01\n            -3.2190230488777161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 230 2.0865290425717831e-03 -1 -2 231\n            -1.7371569992974401e-03</internalNodes>\n          <leafValues>\n            -7.8285712003707886e-01 3.3585301041603088e-01\n            -2.0582370460033417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 232 -7.0026202592998743e-05 -1 -2 233\n            -1.4891549944877625e-03</internalNodes>\n          <leafValues>\n            -3.9109349250793457e-01 -4.6953418850898743e-01\n            2.7609241008758545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 234 -1.1788429692387581e-02 -1 -2 235\n            -1.5155089786276221e-03</internalNodes>\n          <leafValues>\n            -4.0114149451255798e-01 -7.4290478229522705e-01\n            2.7695629000663757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 236 6.8396717309951782e-02 -1 -2 237\n            -7.6441407203674316e-02</internalNodes>\n          <leafValues>\n            4.5235648751258850e-01 4.2848169803619385e-01\n            -3.1636309623718262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 238 6.8310201168060303e-02 -1 -2 239\n            -6.4508013427257538e-02</internalNodes>\n          <leafValues>\n            5.1404279470443726e-01 1.8081870675086975e-01\n            -3.4217950701713562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 240 -2.8335719835013151e-03 -1 -2 241\n            -9.9732237868010998e-04</internalNodes>\n          <leafValues>\n            -6.9509768486022949e-01 -4.3724590539932251e-01\n            2.0226080715656281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 242 -2.2869910299777985e-01 -1 -2 243\n            2.9855249449610710e-03</internalNodes>\n          <leafValues>\n            6.4662200212478638e-01 8.1149758771061897e-03\n            -6.0210299491882324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 244 -2.9535989742726088e-03 -1 -2 245\n            -2.1225619129836559e-03</internalNodes>\n          <leafValues>\n            -7.2013127803802490e-01 5.0875622034072876e-01\n            -5.9366609901189804e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 246 -2.9382819775491953e-03 -1 -2 247\n            -5.8961478061974049e-03</internalNodes>\n          <leafValues>\n            3.9287531375885010e-01 4.1866040229797363e-01\n            -2.5405511260032654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 248 2.5730929337441921e-03 -1 -2 249\n            1.6647739335894585e-02</internalNodes>\n          <leafValues>\n            -5.8707278966903687e-01 1.9208480417728424e-01\n            -6.0388940572738647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 250 2.4041840806603432e-03 -1 -2 251\n            -9.0452830772846937e-04</internalNodes>\n          <leafValues>\n            -5.7192337512969971e-01 3.4860768914222717e-01\n            -1.3049240410327911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 252 4.0814210660755634e-03 -1 -2 253\n            3.3811479806900024e-03</internalNodes>\n          <leafValues>\n            5.1778018474578857e-01 -6.3828541897237301e-03\n            -6.1447817087173462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 254 -2.7499340940266848e-03 -1 -2 255\n            -4.8207710497081280e-03</internalNodes>\n          <leafValues>\n            -6.5407788753509521e-01 -6.0029619932174683e-01\n            1.4374589920043945e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>21</maxWeakCount>\n      <stageThreshold>-2.1254189014434814e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 256 7.9710120335221291e-03 -1 -2 257\n            -9.7160867881029844e-04</internalNodes>\n          <leafValues>\n            -6.1992239952087402e-01 5.4877161979675293e-01\n            -4.0606960654258728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 258 -1.0945869609713554e-02 -1 -2 259\n            -6.1174821108579636e-02</internalNodes>\n          <leafValues>\n            4.6936869621276855e-01 3.0570849776268005e-01\n            -4.4459891319274902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 260 -2.3100150283426046e-03 -1 -2 261\n            -4.7585051506757736e-02</internalNodes>\n          <leafValues>\n            -3.7816441059112549e-01 4.8865839838981628e-01\n            -2.9728868603706360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 262 -2.5944279041141272e-03 -1 -2 263\n            -3.9469371549785137e-03</internalNodes>\n          <leafValues>\n            -5.4405367374420166e-01 3.6382490396499634e-01\n            -3.0469849705696106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 264 3.1871569808572531e-04 -1 -2 265\n            -2.6655721012502909e-03</internalNodes>\n          <leafValues>\n            -4.6822971105575562e-01 3.3131968975067139e-01\n            -2.9918238520622253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 266 -3.9534650743007660e-02 -1 -2 267\n            -9.4085611635819077e-04</internalNodes>\n          <leafValues>\n            -3.5316830873489380e-01 4.4447100162506104e-01\n            -1.1088660359382629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 268 6.9526307925116271e-05 -1 -2 269\n            -9.6976682543754578e-03</internalNodes>\n          <leafValues>\n            -3.9403268694877625e-01 5.7181888818740845e-01\n            -1.6370950266718864e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 270 3.9469040930271149e-02 -1 -2 271\n            -8.2811042666435242e-03</internalNodes>\n          <leafValues>\n            6.9152122735977173e-01 1.3349990546703339e-01\n            -4.7064480185508728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 272 -4.3219728395342827e-03 -1 -2 273\n            -5.5436040274798870e-03</internalNodes>\n          <leafValues>\n            3.8239258527755737e-01 1.5645879507064819e-01\n            -4.1088208556175232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 274 -5.9953341406071559e-05 -1 -2 275\n            -5.9089371934533119e-03</internalNodes>\n          <leafValues>\n            -3.9221799373626709e-01 -5.9083867073059082e-01\n            2.7924481034278870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 276 -4.4721391052007675e-02 -1 -2 277\n            4.1267018765211105e-02</internalNodes>\n          <leafValues>\n            4.1454491019248962e-01 -3.2242009043693542e-01\n            3.7849879264831543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 278 5.6728709751041606e-05 -1 -2 279\n            -6.2427870929241180e-02</internalNodes>\n          <leafValues>\n            -3.2228040695190430e-01 -5.9666448831558228e-01\n            2.8915780782699585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 280 -5.6994128972291946e-03 -1 -2 281\n            7.5202910229563713e-03</internalNodes>\n          <leafValues>\n            3.7499341368675232e-01 -2.8132459521293640e-01\n            5.0988858938217163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 282 -3.3640549518167973e-03 -1 -2 283\n            -6.8076648749411106e-03</internalNodes>\n          <leafValues>\n            -6.3978207111358643e-01 -7.3105818033218384e-01\n            1.4475250244140625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 284 1.2633459642529488e-02 -1 -2 285\n            -2.9199919663369656e-03</internalNodes>\n          <leafValues>\n            -7.7725297212600708e-01 2.3258599638938904e-01\n            -2.0490600168704987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 286 -3.0582249164581299e-02 -1 -2 287\n            -2.7796169742941856e-03</internalNodes>\n          <leafValues>\n            -6.5738821029663086e-01 -5.4888349771499634e-01\n            1.3837890326976776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 288 -7.6163080520927906e-03 -1 -2 289\n            -1.8409560434520245e-03</internalNodes>\n          <leafValues>\n            -3.5912349820137024e-01 2.2404469549655914e-01\n            -3.7881860136985779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 290 -3.9200261235237122e-02 -1 -2 291\n            -2.2543789818882942e-03</internalNodes>\n          <leafValues>\n            5.0090551376342773e-01 3.1364008784294128e-01\n            -2.2131860256195068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 292 2.3894659243524075e-03 -1 -2 293\n            -1.0725490283221006e-03</internalNodes>\n          <leafValues>\n            -5.8699512481689453e-01 4.7141209244728088e-01\n            -3.2570488750934601e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 294 8.9095337898470461e-05 -1 -2 295\n            1.6920049674808979e-03</internalNodes>\n          <leafValues>\n            -3.0444309115409851e-01 3.0280891060829163e-01\n            -3.8902729749679565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 296 1.1784000322222710e-02 -1 -2 297\n            3.9335917681455612e-03</internalNodes>\n          <leafValues>\n            -6.8993437290191650e-01 -6.7763939499855042e-02\n            4.6499788761138916e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>22</maxWeakCount>\n      <stageThreshold>-2.0614759922027588e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 298 1.1430840007960796e-02 -1 -2 299\n            -3.2242920249700546e-02</internalNodes>\n          <leafValues>\n            -3.9274570345878601e-01 6.5568798780441284e-01\n            -3.1068810820579529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 300 -1.8382760463282466e-03 -1 -2 301\n            -1.0764399915933609e-01</internalNodes>\n          <leafValues>\n            -4.0825068950653076e-01 4.3280079960823059e-01\n            -4.2263451218605042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 302 -2.3866090923547745e-03 -1 -2 303\n            8.6586214601993561e-03</internalNodes>\n          <leafValues>\n            -4.6435201168060303e-01 -4.0673071146011353e-01\n            4.1267868876457214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 304 -1.6437229933217168e-03 -1 -2 305\n            -9.8511137068271637e-02</internalNodes>\n          <leafValues>\n            -2.1344049274921417e-01 6.8432319164276123e-01\n            -9.7035013139247894e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 306 4.4292360544204712e-03 -1 -2 307\n            4.6966210938990116e-03</internalNodes>\n          <leafValues>\n            -3.9498910307884216e-01 -1.1345980316400528e-01\n            4.9681991338729858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 308 -8.8480701670050621e-03 -1 -2 309\n            -6.7258379422128201e-03</internalNodes>\n          <leafValues>\n            -3.1293100118637085e-01 -6.1635792255401611e-01\n            3.1764769554138184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 310 2.0052040927112103e-03 -1 -2 311\n            -1.3407340273261070e-02</internalNodes>\n          <leafValues>\n            3.1724271178245544e-01 1.9735060632228851e-01\n            -3.7199181318283081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 312 -4.4199679978191853e-03 -1 -2 313\n            -3.2800938934087753e-02</internalNodes>\n          <leafValues>\n            -5.7164478302001953e-01 3.0599930882453918e-01\n            -1.7397969961166382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 314 4.9407979531679302e-05 -1 -2 315\n            4.1550169698894024e-03</internalNodes>\n          <leafValues>\n            -2.8270530700683594e-01 2.9686808586120605e-01\n            -4.8494309186935425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 316 -7.5589967309497297e-05 -1 -2 317\n            -3.2147730235010386e-03</internalNodes>\n          <leafValues>\n            -3.8531139492988586e-01 -6.3306808471679688e-01\n            2.3434750735759735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 318 1.6021779738366604e-03 -1 -2 319\n            -1.9478019326925278e-02</internalNodes>\n          <leafValues>\n            -2.9579049348831177e-01 -4.9625208973884583e-01\n            2.6092579960823059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 320 -2.5193750858306885e-02 -1 -2 321\n            -4.6487729996442795e-02</internalNodes>\n          <leafValues>\n            3.9384880661964417e-01 2.2168830037117004e-01\n            -2.9691740870475769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 322 4.3414267711341381e-03 -1 -2 323\n            -2.4886759929358959e-03</internalNodes>\n          <leafValues>\n            -6.7661178112030029e-01 2.0509929955005646e-01\n            -2.9771140217781067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 324 -5.8827269822359085e-03 -1 -2 325\n            9.0498890494927764e-04</internalNodes>\n          <leafValues>\n            -6.1301797628402710e-01 -3.4023219347000122e-01\n            1.8168209493160248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 326 -9.8338901996612549e-02 -1 -2 327\n            5.6141808629035950e-02</internalNodes>\n          <leafValues>\n            4.7729569673538208e-01 -2.2904439270496368e-01\n            3.4410089254379272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 328 -5.5787130258977413e-03 -1 -2 329\n            1.5108759980648756e-03</internalNodes>\n          <leafValues>\n            -3.5910171270370483e-01 2.4900430440902710e-01\n            -4.3798071146011353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 330 -6.0129738412797451e-03 -1 -2 331\n            -7.9341192031279206e-04</internalNodes>\n          <leafValues>\n            3.1164181232452393e-01 2.6759660243988037e-01\n            -3.6802908778190613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 332 6.1855330131947994e-03 -1 -2 333\n            -7.3785060085356236e-03</internalNodes>\n          <leafValues>\n            -7.2153317928314209e-01 -5.3714382648468018e-01\n            1.3824890553951263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 334 -6.7488732747733593e-04 -1 -2 335\n            -1.3102099765092134e-03</internalNodes>\n          <leafValues>\n            3.7406051158905029e-01 1.9003790616989136e-01\n            -3.1632271409034729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 336 4.9453211249783635e-04 -1 -2 337\n            1.2824690202251077e-03</internalNodes>\n          <leafValues>\n            -2.3283170163631439e-01 3.0463808774948120e-01\n            -4.8092108964920044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 338 -2.2624820470809937e-02 -1 -2 339\n            4.3685249984264374e-03</internalNodes>\n          <leafValues>\n            -6.8783479928970337e-01 1.2403090298175812e-01\n            -7.9220730066299438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 340 5.6756488047540188e-03 -1 -2 341\n            -8.1769213080406189e-02</internalNodes>\n          <leafValues>\n            1.7611420154571533e-01 3.8942161202430725e-01\n            -4.5094010233879089e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>24</maxWeakCount>\n      <stageThreshold>-1.9795049428939819e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 342 -2.0003549754619598e-02 -1 -2 343\n            -3.2621208578348160e-02</internalNodes>\n          <leafValues>\n            -5.6650751829147339e-01 5.0807082653045654e-01\n            -4.5345708727836609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 344 1.0668139904737473e-02 -1 -2 345\n            -1.6276689246296883e-02</internalNodes>\n          <leafValues>\n            -3.2316839694976807e-01 6.0189497470855713e-01\n            -2.4059510231018066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 346 -2.8211208991706371e-03 -1 -2 347\n            -1.4291180297732353e-02</internalNodes>\n          <leafValues>\n            -4.7181150317192078e-01 5.1280087232589722e-01\n            -1.0744000226259232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 348 1.0120410006493330e-03 -1 -2 349\n            -5.9822672046720982e-03</internalNodes>\n          <leafValues>\n            -3.8844698667526245e-01 4.6928858757019043e-01\n            -9.1355919837951660e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 350 -2.4705699179321527e-03 -1 -2 351\n            2.4079859722405672e-03</internalNodes>\n          <leafValues>\n            -4.5964410901069641e-01 2.1830670535564423e-01\n            -5.9373402595520020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 352 -1.4312269631773233e-03 -1 -2 353\n            2.9141810955479741e-04</internalNodes>\n          <leafValues>\n            -2.4731670320034027e-01 -2.5972241163253784e-01\n            3.8206368684768677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 354 -3.2818811014294624e-03 -1 -2 355\n            -1.0365940397605300e-03</internalNodes>\n          <leafValues>\n            -7.7180129289627075e-01 2.3569859564304352e-01\n            -2.2067700326442719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 356 -2.2078400943428278e-03 -1 -2 357\n            3.5239339340478182e-03</internalNodes>\n          <leafValues>\n            3.0886119604110718e-01 -2.8496000170707703e-01\n            4.7544300556182861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 358 -6.1774807982146740e-03 -1 -2 359\n            -3.2023619860410690e-03</internalNodes>\n          <leafValues>\n            -7.0318382978439331e-01 -5.1361310482025146e-01\n            1.5656259655952454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 360 -8.7003601947799325e-04 -1 -2 361\n            -3.8079950027167797e-03</internalNodes>\n          <leafValues>\n            -2.9925128817558289e-01 5.5215638875961304e-01\n            -8.0608041025698185e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 362 4.9994210712611675e-03 -1 -2 363\n            -1.0323170572519302e-03</internalNodes>\n          <leafValues>\n            -4.3541741371154785e-01 5.4992151260375977e-01\n            -5.0770761445164680e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 364 6.9215619005262852e-03 -1 -2 365\n            -8.1578325480222702e-03</internalNodes>\n          <leafValues>\n            3.3900010585784912e-01 3.4354889392852783e-01\n            -2.4483889341354370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 366 -1.6159559600055218e-03 -1 -2 367\n            4.7165839932858944e-03</internalNodes>\n          <leafValues>\n            -7.4653702974319458e-01 1.1855059862136841e-01\n            -7.1803867816925049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 368 -1.6093119978904724e-02 -1 -2 369\n            -5.9861610643565655e-03</internalNodes>\n          <leafValues>\n            -3.2987210154533386e-01 3.1263980269432068e-01\n            -2.3194029927253723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 370 6.4122617244720459e-02 -1 -2 371\n            2.1518159657716751e-02</internalNodes>\n          <leafValues>\n            4.6239149570465088e-01 -2.4277320504188538e-01\n            4.0963909029960632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 372 -2.8541380167007446e-01 -1 -2 373\n            2.7372559998184443e-04</internalNodes>\n          <leafValues>\n            4.4521799683570862e-01 -4.7307610511779785e-01\n            7.6739721000194550e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 374 -6.4039281569421291e-03 -1 -2 375\n            1.4279670082032681e-02</internalNodes>\n          <leafValues>\n            -5.6167787313461304e-01 -6.7311890423297882e-02\n            4.3806758522987366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 376 -1.3179860077798367e-02 -1 -2 377\n            6.6828072071075439e-02</internalNodes>\n          <leafValues>\n            -6.7672669887542725e-01 -3.2182909548282623e-02\n            5.1308721303939819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 378 6.3021448440849781e-03 -1 -2 379\n            -1.6806010389700532e-03</internalNodes>\n          <leafValues>\n            -2.0082660019397736e-01 -5.1767241954803467e-01\n            3.8576510548591614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 380 -1.5057720011100173e-03 -1 -2 381\n            1.1699240421876311e-03</internalNodes>\n          <leafValues>\n            3.9358091354370117e-01 -2.5579568743705750e-01\n            3.1927299499511719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 382 7.2735180146992207e-03 -1 -2 383\n            7.8693883551750332e-05</internalNodes>\n          <leafValues>\n            -7.1667242050170898e-01 -1.8908829987049103e-01\n            2.3849080502986908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 384 1.9624589476734400e-03 -1 -2 385\n            -3.1472831033170223e-03</internalNodes>\n          <leafValues>\n            -5.1583772897720337e-01 4.8033049702644348e-01\n            -3.6237910389900208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 386 5.0133569166064262e-03 -1 -2 387\n            -6.5994369797408581e-03</internalNodes>\n          <leafValues>\n            -5.2729338407516479e-01 -6.9400531053543091e-01\n            1.2275890260934830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 388 -4.2700361460447311e-02 -1 -2 389\n            -3.5096149076707661e-05</internalNodes>\n          <leafValues>\n            -6.8218547105789185e-01 1.2160310149192810e-01\n            -4.2142289876937866e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>24</maxWeakCount>\n      <stageThreshold>-1.9048260450363159e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 390 8.7128365412354469e-03 -1 -2 391\n            -4.0675927884876728e-03</internalNodes>\n          <leafValues>\n            -4.4048839807510376e-01 6.0030102729797363e-01\n            -2.6042649149894714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 392 -8.3933398127555847e-02 -1 -2 393\n            -2.2626180201768875e-02</internalNodes>\n          <leafValues>\n            -3.7943989038467407e-01 5.2529489994049072e-01\n            -3.2733321189880371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 394 -3.5725389607250690e-03 -1 -2 395\n            -1.6297569964081049e-03</internalNodes>\n          <leafValues>\n            -2.6030939817428589e-01 4.8434230685234070e-01\n            -3.8363268971443176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 396 -8.0011576414108276e-02 -1 -2 397\n            -9.6061453223228455e-02</internalNodes>\n          <leafValues>\n            3.9579561352729797e-01 4.2874181270599365e-01\n            -2.9096639156341553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 398 -9.3183852732181549e-03 -1 -2 399\n            9.2205153778195381e-03</internalNodes>\n          <leafValues>\n            -3.9325499534606934e-01 -2.9857379198074341e-01\n            3.1733301281929016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 400 2.3208750411868095e-02 -1 -2 401\n            1.6389730153605342e-03</internalNodes>\n          <leafValues>\n            3.9295229315757751e-01 -5.4035997390747070e-01\n            -2.1836880594491959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 402 2.8872499242424965e-03 -1 -2 403\n            4.7465260140597820e-03</internalNodes>\n          <leafValues>\n            -7.8172737360000610e-01 1.4474189281463623e-01\n            -6.4237701892852783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 404 -5.7432148605585098e-03 -1 -2 405\n            -8.5324952378869057e-03</internalNodes>\n          <leafValues>\n            -6.5556287765502930e-01 2.2090309858322144e-01\n            -2.5790300965309143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 406 -8.8752172887325287e-03 -1 -2 407\n            -7.7129527926445007e-03</internalNodes>\n          <leafValues>\n            4.6596860885620117e-01 2.5279781222343445e-01\n            -2.6170450448989868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 408 7.6909800991415977e-03 -1 -2 409\n            2.6657560374587774e-03</internalNodes>\n          <leafValues>\n            -5.9350818395614624e-01 1.6969729959964752e-01\n            -5.4123950004577637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 410 -4.4685939792543650e-04 -1 -2 411\n            -1.5998890157788992e-03</internalNodes>\n          <leafValues>\n            -3.0383870005607605e-01 -5.4817748069763184e-01\n            2.4971559643745422e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 412 1.9368670182302594e-03 -1 -2 413\n            -2.4878541007637978e-03</internalNodes>\n          <leafValues>\n            -6.3200348615646362e-01 4.7051379084587097e-01\n            -4.5187219977378845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 414 -2.8134910389780998e-03 -1 -2 415\n            -1.4107710449025035e-03</internalNodes>\n          <leafValues>\n            3.9270851016044617e-01 1.8017080426216125e-01\n            -2.5714579224586487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 416 -6.9013070315122604e-03 -1 -2 417\n            -1.1458620429039001e-03</internalNodes>\n          <leafValues>\n            -5.3386241197586060e-01 2.8174358606338501e-01\n            -1.6080249845981598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 418 9.2800445854663849e-03 -1 -2 419\n            -4.1281301528215408e-02</internalNodes>\n          <leafValues>\n            -3.0028960108757019e-01 -6.2409067153930664e-01\n            2.0549909770488739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 420 -3.5625360906124115e-02 -1 -2 421\n            -4.1647539474070072e-03</internalNodes>\n          <leafValues>\n            -5.2529340982437134e-01 -6.3538008928298950e-01\n            1.2846650183200836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 422 -9.5598259940743446e-04 -1 -2 423\n            -8.9347851462662220e-04</internalNodes>\n          <leafValues>\n            2.6505509018898010e-01 1.8266810476779938e-01\n            -3.7531790137290955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 424 2.5431478861719370e-03 -1 -2 425\n            -1.5853889286518097e-02</internalNodes>\n          <leafValues>\n            -6.1057221889495850e-01 3.0754768848419189e-01\n            -9.8143920302391052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 426 -4.1315760463476181e-02 -1 -2 427\n            -6.8226549774408340e-04</internalNodes>\n          <leafValues>\n            4.9247589707374573e-01 6.2975943088531494e-02\n            -4.2634299397468567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 428 6.3098431564867496e-04 -1 -2 429\n            -2.8946860693395138e-03</internalNodes>\n          <leafValues>\n            3.1397339701652527e-01 2.8590971231460571e-01\n            -2.5623229146003723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 430 -1.0244140401482582e-02 -1 -2 431\n            -1.6979850828647614e-02</internalNodes>\n          <leafValues>\n            -6.9737482070922852e-01 -7.3125731945037842e-01\n            1.0389179736375809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 432 -7.0198569446802139e-03 -1 -2 433\n            -6.0688778758049011e-03</internalNodes>\n          <leafValues>\n            -3.5070639848709106e-01 -5.3395807743072510e-01\n            1.7334850132465363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 434 -9.6911415457725525e-03 -1 -2 435\n            8.5460003465414047e-03</internalNodes>\n          <leafValues>\n            5.6399798393249512e-01 -2.4716490507125854e-01\n            1.8216520547866821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 436 -4.9479231238365173e-03 -1 -2 437\n            1.9269150216132402e-03</internalNodes>\n          <leafValues>\n            -2.8333988785743713e-01 -6.8196073174476624e-02\n            3.7787199020385742e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>28</maxWeakCount>\n      <stageThreshold>-1.9407349824905396e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 438 -2.8639819473028183e-02 -1 -2 439\n            -4.2176660150289536e-02</internalNodes>\n          <leafValues>\n            -3.7718260288238525e-01 7.2298699617385864e-01\n            -7.6141163706779480e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 440 -2.2537210024893284e-03 -1 -2 441\n            -3.0683329328894615e-02</internalNodes>\n          <leafValues>\n            -3.2727459073066711e-01 5.1505237817764282e-01\n            -2.2235199809074402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 442 -1.2341269850730896e-01 -1 -2 443\n            -2.3674150928854942e-02</internalNodes>\n          <leafValues>\n            4.4699010252952576e-01 3.4708538651466370e-01\n            -3.1773900985717773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 444 3.1951239798218012e-03 -1 -2 445\n            -1.4915530337020755e-03</internalNodes>\n          <leafValues>\n            -4.9775049090385437e-01 2.6384419202804565e-01\n            -3.8912549614906311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 446 8.8097527623176575e-04 -1 -2 447\n            -5.8355771005153656e-02</internalNodes>\n          <leafValues>\n            -4.0939790010452271e-01 3.2287618517875671e-01\n            -2.3045599460601807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 448 5.1132370717823505e-03 -1 -2 449\n            -4.5418320223689079e-03</internalNodes>\n          <leafValues>\n            -5.1353681087493896e-01 5.3011757135391235e-01\n            -3.0649330466985703e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 450 1.6811339883133769e-03 -1 -2 451\n            2.8129699639976025e-03</internalNodes>\n          <leafValues>\n            -5.3161472082138062e-01 -6.7524053156375885e-02\n            3.8542249798774719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 452 2.1835418883711100e-03 -1 -2 453\n            -2.4335379712283611e-03</internalNodes>\n          <leafValues>\n            -6.4298832416534424e-01 -6.6313308477401733e-01\n            1.3882370293140411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 454 3.0736608896404505e-03 -1 -2 455\n            -9.6425544470548630e-03</internalNodes>\n          <leafValues>\n            -6.3433158397674561e-01 3.8696160912513733e-01\n            -6.8737797439098358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 456 -7.2082108817994595e-03 -1 -2 457\n            -8.0191977322101593e-03</internalNodes>\n          <leafValues>\n            1.6121250391006470e-01 3.8011130690574646e-01\n            -4.1397979855537415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 458 -7.2479159571230412e-03 -1 -2 459\n            -2.2631640732288361e-01</internalNodes>\n          <leafValues>\n            2.4351879954338074e-01 6.0667949914932251e-01\n            -2.2521880269050598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 460 -7.0091613451950252e-05 -1 -2 461\n            -1.8161399662494659e-01</internalNodes>\n          <leafValues>\n            1.7115320265293121e-01 5.2725982666015625e-01\n            -3.5247540473937988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 462 -9.4038434326648712e-03 -1 -2 463\n            -2.1289030555635691e-03</internalNodes>\n          <leafValues>\n            3.4970518946647644e-01 5.5878698825836182e-02\n            -4.9816590547561646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 464 -5.1798550412058830e-03 -1 -2 465\n            -6.5030192490667105e-04</internalNodes>\n          <leafValues>\n            -6.3095641136169434e-01 3.5856458544731140e-01\n            -7.8281052410602570e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 466 -1.0555930435657501e-02 -1 -2 467\n            -5.1852981559932232e-03</internalNodes>\n          <leafValues>\n            -5.5502831935882568e-01 3.5548681020736694e-01\n            -6.8892292678356171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 468 -7.8725479543209076e-03 -1 -2 469\n            -6.5342970192432404e-03</internalNodes>\n          <leafValues>\n            -4.8596179485321045e-01 2.1178959310054779e-01\n            -2.3174080252647400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 470 -1.3909920118749142e-02 -1 -2 471\n            1.5418450348079205e-03</internalNodes>\n          <leafValues>\n            5.9936982393264771e-01 -9.5086917281150818e-03\n            -6.4796131849288940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 472 -1.1549900518730283e-03 -1 -2 473\n            -3.2687030732631683e-02</internalNodes>\n          <leafValues>\n            -2.7501720190048218e-01 -6.7336207628250122e-01\n            1.9520400464534760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 474 -2.6422590017318726e-01 -1 -2 475\n            6.9438670761883259e-03</internalNodes>\n          <leafValues>\n            3.6986869573593140e-01 -3.0029740929603577e-01\n            1.4998969435691833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 476 -1.2077920138835907e-02 -1 -2 477\n            -1.3986700214445591e-03</internalNodes>\n          <leafValues>\n            4.1644129157066345e-01 4.1248729825019836e-01\n            -1.9533659517765045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 478 1.3138339854776859e-02 -1 -2 479\n            7.2417110204696655e-03</internalNodes>\n          <leafValues>\n            -6.4204931259155273e-01 1.1359360069036484e-01\n            -7.3838871717453003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 480 -7.4837901629507542e-03 -1 -2 481\n            6.8022231571376324e-03</internalNodes>\n          <leafValues>\n            -6.9246298074722290e-01 9.2873439192771912e-02\n            -6.0047471523284912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 482 4.5322909951210022e-01 -1 -2 483\n            -5.5721630342304707e-03</internalNodes>\n          <leafValues>\n            5.6260532140731812e-01 7.7820159494876862e-02\n            -3.3990600705146790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 484 3.1583961099386215e-02 -1 -2 485\n            -5.7926177978515625e-03</internalNodes>\n          <leafValues>\n            3.2292670011520386e-01 1.5534450113773346e-01\n            -3.5717839002609253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 486 -7.6025379821658134e-03 -1 -2 487\n            9.5151038840413094e-04</internalNodes>\n          <leafValues>\n            -5.1859498023986816e-01 -2.9570670798420906e-02\n            4.6027511358261108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 488 1.9723300356417894e-03 -1 -2 489\n            2.3158260155469179e-03</internalNodes>\n          <leafValues>\n            3.6926651000976562e-01 -2.1299740672111511e-01\n            2.6948541402816772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 490 2.1179600153118372e-03 -1 -2 491\n            -2.6946600992232561e-03</internalNodes>\n          <leafValues>\n            -4.8369500041007996e-01 1.8545660376548767e-01\n            -2.9411968588829041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 492 5.8865409344434738e-02 -1 -2 493\n            -6.8408921360969543e-03</internalNodes>\n          <leafValues>\n            -4.6770378947257996e-01 -6.6371321678161621e-01\n            1.2721349298954010e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>26</maxWeakCount>\n      <stageThreshold>-1.8931059837341309e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 494 -1.2766489759087563e-02 -1 -2 495\n            3.7821640726178885e-03</internalNodes>\n          <leafValues>\n            -3.7968099117279053e-01 -1.6001829504966736e-01\n            6.1953288316726685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 496 -3.3049881458282471e-02 -1 -2 497\n            4.5050241053104401e-02</internalNodes>\n          <leafValues>\n            -3.6825481057167053e-01 9.3770343810319901e-03\n            7.1570581197738647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 498 -3.5275409463793039e-03 -1 -2 499\n            2.2250709589570761e-03</internalNodes>\n          <leafValues>\n            -3.7336608767509460e-01 -6.6712491214275360e-02\n            4.9906119704246521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 500 1.3609490124508739e-03 -1 -2 501\n            -2.9087859392166138e-01</internalNodes>\n          <leafValues>\n            1.7162929475307465e-01 3.6158901453018188e-01\n            -5.0871372222900391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 502 3.3148950897157192e-03 -1 -2 503\n            -8.8641437469050288e-04</internalNodes>\n          <leafValues>\n            -7.1788138151168823e-01 2.5713619589805603e-01\n            -1.7978949844837189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 504 1.1313590221107006e-03 -1 -2 505\n            -3.0621800106018782e-03</internalNodes>\n          <leafValues>\n            3.5387420654296875e-01 3.0790808796882629e-01\n            -3.1217241287231445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 506 2.5443620979785919e-03 -1 -2 507\n            -6.7088878713548183e-03</internalNodes>\n          <leafValues>\n            -5.6788551807403564e-01 2.1222899854183197e-01\n            -2.6821109652519226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 508 -1.6446809470653534e-01 -1 -2 509\n            4.0828108787536621e-02</internalNodes>\n          <leafValues>\n            4.9016961455345154e-01 -3.1217470765113831e-01\n            2.4748149514198303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 510 -3.6051510833203793e-03 -1 -2 511\n            -2.3608640767633915e-03</internalNodes>\n          <leafValues>\n            3.4355860948562622e-01 2.6566460728645325e-01\n            -2.8644719719886780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 512 1.2965350179001689e-03 -1 -2 513\n            6.0111000202596188e-03</internalNodes>\n          <leafValues>\n            -2.9317760467529297e-01 2.1941700577735901e-01\n            -6.0014218091964722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 514 -6.1628420371562243e-04 -1 -2 515\n            2.0573718938976526e-03</internalNodes>\n          <leafValues>\n            -3.1292331218719482e-01 2.8763169050216675e-01\n            -3.7320709228515625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 516 -7.7166007831692696e-03 -1 -2 517\n            -2.8222459368407726e-03</internalNodes>\n          <leafValues>\n            -7.1683251857757568e-01 4.2501831054687500e-01\n            -5.3294889628887177e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 518 -7.3861207056324929e-05 -1 -2 519\n            5.8680498041212559e-03</internalNodes>\n          <leafValues>\n            1.4903450012207031e-01 -5.8436650037765503e-01\n            1.0724759846925735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 520 -7.9013723880052567e-03 -1 -2 521\n            2.7825690340250731e-03</internalNodes>\n          <leafValues>\n            -3.4319949150085449e-01 1.7655360698699951e-01\n            -6.1473757028579712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 522 3.2751538674347103e-04 -1 -2 523\n            3.0700899660587311e-02</internalNodes>\n          <leafValues>\n            -3.3837568759918213e-01 1.8566130101680756e-01\n            -5.3450268507003784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 524 5.6932470761239529e-03 -1 -2 525\n            2.1375140547752380e-01</internalNodes>\n          <leafValues>\n            -5.1750451326370239e-01 1.2332399934530258e-01\n            -6.4288139343261719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 526 -4.4024959206581116e-03 -1 -2 527\n            -4.5719969784840941e-04</internalNodes>\n          <leafValues>\n            5.8535677194595337e-01 2.3368820548057556e-01\n            -1.9039009511470795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 528 -4.2587839998304844e-03 -1 -2 529\n            -2.3462621029466391e-03</internalNodes>\n          <leafValues>\n            -5.1190847158432007e-01 -4.7164770960807800e-01\n            1.4783400297164917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 530 -6.5065571106970310e-05 -1 -2 531\n            -5.5082160979509354e-03</internalNodes>\n          <leafValues>\n            -2.9886341094970703e-01 -4.8508960008621216e-01\n            2.0014910399913788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 532 1.8942790105938911e-02 -1 -2 533\n            6.9123771972954273e-03</internalNodes>\n          <leafValues>\n            3.1028950214385986e-01 -2.8701239824295044e-01\n            2.0534069836139679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 534 8.1696882843971252e-03 -1 -2 535\n            1.0069769807159901e-02</internalNodes>\n          <leafValues>\n            4.5810830593109131e-01 -2.4175919592380524e-01\n            1.7593820393085480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 536 2.1663580555468798e-03 -1 -2 537\n            1.0505730286240578e-02</internalNodes>\n          <leafValues>\n            -4.9877908825874329e-01 1.6231280565261841e-01\n            -4.2988869547843933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 538 5.7576788822188973e-04 -1 -2 539\n            -3.0608899891376495e-02</internalNodes>\n          <leafValues>\n            -3.1012570858001709e-01 -7.4064302444458008e-01\n            1.6217179596424103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 540 -1.3430659659206867e-02 -1 -2 541\n            1.1859040241688490e-03</internalNodes>\n          <leafValues>\n            4.5505639910697937e-01 -2.7227258682250977e-01\n            2.2475010156631470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 542 -4.9311347538605332e-04 -1 -2 543\n            -2.4509918875992298e-03</internalNodes>\n          <leafValues>\n            -3.9598318934440613e-01 2.5004211068153381e-01\n            -1.6140510141849518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 544 1.3641949743032455e-02 -1 -2 545\n            -3.6733329296112061e-02</internalNodes>\n          <leafValues>\n            -6.4525490999221802e-01 3.4197059273719788e-01\n            -6.5968327224254608e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>29</maxWeakCount>\n      <stageThreshold>-1.9677840471267700e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 1 546 1.3613830087706447e-03 -1 -2 547\n            1.2211060151457787e-02</internalNodes>\n          <leafValues>\n            -3.4383928775787354e-01 -4.0358600020408630e-01\n            5.7873630523681641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 548 3.2929528970271349e-03 -1 -2 549\n            -2.4831980466842651e-02</internalNodes>\n          <leafValues>\n            -2.2164349257946014e-01 5.4256910085678101e-01\n            -4.7585600614547729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 550 -3.4081530570983887e-01 -1 -2 551\n            6.0929641127586365e-02</internalNodes>\n          <leafValues>\n            5.3438740968704224e-01 -2.6015359163284302e-01\n            3.7626558542251587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 552 -1.4399300562217832e-03 -1 -2 553\n            -7.5711178779602051e-01</internalNodes>\n          <leafValues>\n            -4.1635149717330933e-01 4.7764539718627930e-01\n            -1.2374229729175568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 554 -5.9891431592404842e-03 -1 -2 555\n            -8.9398561976850033e-04</internalNodes>\n          <leafValues>\n            2.1848620474338531e-01 1.7726029455661774e-01\n            -5.4815018177032471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 556 2.9013510793447495e-03 -1 -2 557\n            4.4361278414726257e-03</internalNodes>\n          <leafValues>\n            -5.6709182262420654e-01 1.4183780550956726e-01\n            -5.8784419298171997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 558 -5.3319290600484237e-05 -1 -2 559\n            2.5481029879301786e-03</internalNodes>\n          <leafValues>\n            -3.4821888804435730e-01 1.9745320081710815e-01\n            -5.5979222059249878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 560 7.4882939457893372e-02 -1 -2 561\n            4.8816308379173279e-02</internalNodes>\n          <leafValues>\n            4.6647951006889343e-01 -2.2575210034847260e-01\n            3.2325819134712219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 562 -3.9128339849412441e-03 -1 -2 563\n            -1.3820629566907883e-02</internalNodes>\n          <leafValues>\n            -5.9772872924804688e-01 2.6031211018562317e-01\n            -2.0211410522460938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 564 9.4047200400382280e-04 -1 -2 565\n            -4.6419431455433369e-03</internalNodes>\n          <leafValues>\n            -3.4005248546600342e-01 -4.5187801122665405e-01\n            2.1054859459400177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 566 -3.1960941851139069e-02 -1 -2 567\n            -1.2651160068344325e-04</internalNodes>\n          <leafValues>\n            -2.0826019346714020e-01 3.8553190231323242e-01\n            -2.3116420209407806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 568 -5.0413709133863449e-02 -1 -2 569\n            -2.0950778853148222e-03</internalNodes>\n          <leafValues>\n            2.2846159338951111e-01 3.2639551162719727e-01\n            -3.4385430812835693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 570 -1.1017880402505398e-02 -1 -2 571\n            -9.7415763884782791e-03</internalNodes>\n          <leafValues>\n            -7.7388781309127808e-01 3.6731991171836853e-01\n            -6.5746001899242401e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 572 5.3386680519906804e-05 -1 -2 573\n            5.9820311143994331e-03</internalNodes>\n          <leafValues>\n            -3.5571750998497009e-01 1.7653119564056396e-01\n            -4.6110078692436218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 574 -1.9558269996196032e-03 -1 -2 575\n            7.6739699579775333e-03</internalNodes>\n          <leafValues>\n            -3.6172690987586975e-01 1.8038579821586609e-01\n            -4.0452030301094055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 576 4.2935381643474102e-03 -1 -2 577\n            1.4181300066411495e-03</internalNodes>\n          <leafValues>\n            5.2086359262466431e-01 -2.2085809707641602e-01\n            2.7357560396194458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 578 -2.8263099491596222e-02 -1 -2 579\n            6.3434068579226732e-04</internalNodes>\n          <leafValues>\n            -6.3833731412887573e-01 1.5636380016803741e-01\n            -3.2148900628089905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 580 -7.2387307882308960e-03 -1 -2 581\n            -9.9928081035614014e-03</internalNodes>\n          <leafValues>\n            2.3126259446144104e-01 3.0397319793701172e-01\n            -2.4478439986705780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 582 6.4995248976629227e-05 -1 -2 583\n            -5.3049270063638687e-03</internalNodes>\n          <leafValues>\n            1.5132980048656464e-01 2.0417870581150055e-01\n            -4.6260431408882141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 584 -1.6613099724054337e-02 -1 -2 585\n            -1.1630290187895298e-02</internalNodes>\n          <leafValues>\n            3.3399769663810730e-01 3.7053430080413818e-01\n            -1.9361549615859985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 586 1.9068180117756128e-03 -1 -2 587\n            -5.6926468387246132e-03</internalNodes>\n          <leafValues>\n            -3.8105058670043945e-01 5.0645208358764648e-01\n            6.5170922316610813e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 588 -2.2453670680988580e-04 -1 -2 589\n            9.5565039664506912e-03</internalNodes>\n          <leafValues>\n            -3.1526011228561401e-01 -5.3035598993301392e-01\n            2.0532760024070740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 590 3.1540619675070047e-03 -1 -2 591\n            -3.0681329965591431e-01</internalNodes>\n          <leafValues>\n            -4.5928329229354858e-01 5.0717717409133911e-01\n            -1.4439250342547894e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 592 2.8239809907972813e-03 -1 -2 593\n            -3.3063529990613461e-03</internalNodes>\n          <leafValues>\n            -1.5437939763069153e-01 -4.3571388721466064e-01\n            3.9342719316482544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 594 3.7848789361305535e-04 -1 -2 595\n            -3.0488630291074514e-03</internalNodes>\n          <leafValues>\n            2.5212600827217102e-01 4.6662339568138123e-01\n            -2.2792230546474457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 596 -1.4724380336701870e-02 -1 -2 597\n            3.6062300205230713e-02</internalNodes>\n          <leafValues>\n            -7.8602111339569092e-01 -6.8571321666240692e-02\n            3.6698839068412781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 598 -2.2327410988509655e-03 -1 -2 599\n            -7.8541820403188467e-04</internalNodes>\n          <leafValues>\n            -5.9740197658538818e-01 2.0273469388484955e-01\n            -1.7221680283546448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 600 7.8553898492828012e-04 -1 -2 601\n            1.0078109800815582e-02</internalNodes>\n          <leafValues>\n            -4.3407449126243591e-01 1.2464140355587006e-01\n            -4.8391419649124146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 602 2.0928790792822838e-02 -1 -2 603\n            1.3340089935809374e-03</internalNodes>\n          <leafValues>\n            5.6864207983016968e-01 1.4524639584124088e-02\n            -4.6003210544586182e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>34</maxWeakCount>\n      <stageThreshold>-1.9657919406890869e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 604 -1.5313959680497646e-02 -1 -2 605\n            -1.4265860430896282e-02</internalNodes>\n          <leafValues>\n            -3.4347689151763916e-01 5.8209532499313354e-01\n            -3.5527399182319641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 606 1.2652979930862784e-03 -1 -2 607\n            -7.3807648732326925e-05</internalNodes>\n          <leafValues>\n            -3.1498318910598755e-01 4.7249591350555420e-01\n            -2.6380801200866699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 608 -3.8527030497789383e-02 -1 -2 609\n            -1.4758770354092121e-02</internalNodes>\n          <leafValues>\n            4.1556850075721741e-01 1.5677249431610107e-01\n            -3.7650239467620850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 610 -1.5448270132765174e-03 -1 -2 611\n            6.4564580097794533e-03</internalNodes>\n          <leafValues>\n            -3.5932019352912903e-01 2.1276639401912689e-01\n            -7.2287178039550781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 612 1.0267349891364574e-02 -1 -2 613\n            -8.6422899039462209e-04</internalNodes>\n          <leafValues>\n            -4.6045809984207153e-01 2.4920259416103363e-01\n            -2.6721361279487610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 614 3.2311889808624983e-03 -1 -2 615\n            1.3676529750227928e-02</internalNodes>\n          <leafValues>\n            -4.0939199924468994e-01 -2.7391690760850906e-02\n            4.5259070396423340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 616 3.2787120435386896e-03 -1 -2 617\n            -1.4256529975682497e-03</internalNodes>\n          <leafValues>\n            -7.0025652647018433e-01 2.5787800550460815e-01\n            -1.5093439817428589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 618 -2.2095029707998037e-03 -1 -2 619\n            -8.7701372802257538e-02</internalNodes>\n          <leafValues>\n            3.5148110985755920e-01 4.1978740692138672e-01\n            -2.3600180447101593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 620 -2.8805620968341827e-03 -1 -2 621\n            -2.5028509553521872e-03</internalNodes>\n          <leafValues>\n            3.0479869246482849e-01 1.3316699862480164e-01\n            -3.1691300868988037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 622 -5.1710562547668815e-04 -1 -2 623\n            6.7088729701936245e-03</internalNodes>\n          <leafValues>\n            -3.5199090838432312e-01 2.0163150131702423e-01\n            -6.0948008298873901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 624 -7.6058752834796906e-02 -1 -2 625\n            -3.0889140907675028e-03</internalNodes>\n          <leafValues>\n            -6.3694208860397339e-01 -7.9025340080261230e-01\n            1.0366079956293106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 626 2.5740528944879770e-03 -1 -2 627\n            -5.4877097718417645e-03</internalNodes>\n          <leafValues>\n            -4.5424199104309082e-01 2.1481299400329590e-01\n            -1.9329510629177094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 628 -1.2507289648056030e-03 -1 -2 629\n            -4.3231048621237278e-03</internalNodes>\n          <leafValues>\n            -2.1651449799537659e-01 -6.2799078226089478e-01\n            2.4270740151405334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 630 4.3724630959331989e-03 -1 -2 631\n            7.4632692849263549e-04</internalNodes>\n          <leafValues>\n            -5.1889377832412720e-01 -1.1378680169582367e-01\n            2.8224378824234009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 632 -1.3375070411711931e-03 -1 -2 633\n            -2.9367550741881132e-03</internalNodes>\n          <leafValues>\n            2.4589119851589203e-01 2.4335819482803345e-01\n            -2.9112818837165833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 634 6.3193867390509695e-05 -1 -2 635\n            -5.1338938064873219e-03</internalNodes>\n          <leafValues>\n            -2.5806590914726257e-01 -4.6110409498214722e-01\n            2.4333980679512024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 636 4.9400608986616135e-03 -1 -2 637\n            -5.6112580932676792e-03</internalNodes>\n          <leafValues>\n            -3.9632990956306458e-01 2.4502380192279816e-01\n            -1.5639010071754456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 638 4.2950599454343319e-03 -1 -2 639\n            4.5142881572246552e-03</internalNodes>\n          <leafValues>\n            -4.7671678662300110e-01 1.0698430240154266e-01\n            -9.0471321344375610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 640 7.5297639705240726e-03 -1 -2 641\n            -1.2225280515849590e-03</internalNodes>\n          <leafValues>\n            4.1239809989929199e-01 2.8488171100616455e-01\n            -1.9815699756145477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 642 -3.4703810233622789e-03 -1 -2 643\n            8.3724651485681534e-03</internalNodes>\n          <leafValues>\n            -4.4967961311340332e-01 1.5324249863624573e-01\n            -3.8666850328445435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 644 -3.3934618841158226e-05 -1 -2 645\n            -2.7241709828376770e-01</internalNodes>\n          <leafValues>\n            -3.1429070234298706e-01 -5.5842101573944092e-01\n            1.6627819836139679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 646 -2.7582740876823664e-03 -1 -2 647\n            2.5530489161610603e-02</internalNodes>\n          <leafValues>\n            2.7189570665359497e-01 -1.9172009825706482e-01\n            4.3780499696731567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 648 4.2080380953848362e-03 -1 -2 649\n            -8.2151442766189575e-03</internalNodes>\n          <leafValues>\n            -4.4684138894081116e-01 2.2786709666252136e-01\n            -1.7441789805889130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 650 -2.9405429959297180e-03 -1 -2 651\n            -9.4840265810489655e-03</internalNodes>\n          <leafValues>\n            -7.2643548250198364e-01 2.0794290304183960e-01\n            -1.5239919722080231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 652 4.2596450075507164e-03 -1 -2 653\n            -1.7117479583248496e-03</internalNodes>\n          <leafValues>\n            6.1772680282592773e-01 -7.1106612682342529e-01\n            -6.1875251121819019e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 654 -1.3266160385683179e-03 -1 -2 655\n            9.1314306482672691e-03</internalNodes>\n          <leafValues>\n            1.7181269824504852e-01 -4.1138759255409241e-01\n            1.8124279379844666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 656 6.8382360041141510e-03 -1 -2 657\n            7.5181988067924976e-03</internalNodes>\n          <leafValues>\n            -5.7601082324981689e-01 -1.0819079726934433e-01\n            2.9561421275138855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 658 -7.2788819670677185e-03 -1 -2 659\n            -1.8039470538496971e-02</internalNodes>\n          <leafValues>\n            -5.8113521337509155e-01 4.5183068513870239e-01\n            -2.7083089575171471e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 660 -1.0126599809154868e-03 -1 -2 661\n            -6.7263199016451836e-03</internalNodes>\n          <leafValues>\n            2.4344119429588318e-01 1.6870440542697906e-01\n            -2.7007728815078735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 662 -3.2334970310330391e-03 -1 -2 663\n            -7.7852200774941593e-05</internalNodes>\n          <leafValues>\n            -6.0048222541809082e-01 2.4241769313812256e-01\n            -1.2413249909877777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 664 -6.7774722992908210e-05 -1 -2 665\n            7.1789676439948380e-05</internalNodes>\n          <leafValues>\n            1.5729150176048279e-01 -5.2893507480621338e-01\n            -3.1665571033954620e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 666 1.0024299845099449e-02 -1 -2 667\n            9.4298496842384338e-03</internalNodes>\n          <leafValues>\n            -4.8646959662437439e-01 1.1240869760513306e-01\n            -4.2570489645004272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 668 -7.4433721601963043e-04 -1 -2 669\n            1.1660560034215450e-02</internalNodes>\n          <leafValues>\n            2.7540761232376099e-01 -2.3117260634899139e-01\n            2.2442330420017242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 670 3.9079408161342144e-03 -1 -2 671\n            1.6550149768590927e-02</internalNodes>\n          <leafValues>\n            -6.3519638776779175e-01 1.0619100183248520e-01\n            -4.7654989361763000e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>32</maxWeakCount>\n      <stageThreshold>-1.7649420499801636e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            1 0 672 -1.8439030274748802e-02 -1 -2 673\n            -5.3364519029855728e-02</internalNodes>\n          <leafValues>\n            -4.8745709657669067e-01 5.1037812232971191e-01\n            -2.2670130431652069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 674 -7.5706318020820618e-02 -1 -2 675\n            -1.5329009620472789e-03</internalNodes>\n          <leafValues>\n            4.1487750411033630e-01 8.5764937102794647e-02\n            -4.3470910191535950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 676 -2.4494890123605728e-02 -1 -2 677\n            -3.8144161226227880e-04</internalNodes>\n          <leafValues>\n            -2.7532699704170227e-01 3.8043969869613647e-01\n            -4.3967849016189575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 678 -8.8816778734326363e-03 -1 -2 679\n            -3.9625130593776703e-02</internalNodes>\n          <leafValues>\n            -4.3258818984031677e-01 2.4481220543384552e-01\n            -2.6193639636039734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 680 -3.5907390993088484e-03 -1 -2 681\n            3.7008870393037796e-02</internalNodes>\n          <leafValues>\n            -3.6199480295181274e-01 2.2637460380792618e-02\n            5.5778437852859497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 682 7.8503930126316845e-05 -1 -2 683\n            -4.7969701699912548e-03</internalNodes>\n          <leafValues>\n            -3.3861130475997925e-01 3.1856098771095276e-01\n            -1.6600249707698822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 684 -1.1298010125756264e-02 -1 -2 685\n            -4.4886539690196514e-03</internalNodes>\n          <leafValues>\n            3.7305471301078796e-01 2.9692959785461426e-01\n            -2.5235760211944580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 686 -2.2497780155390501e-03 -1 -2 687\n            2.9247230850160122e-03</internalNodes>\n          <leafValues>\n            3.4263029694557190e-01 -5.6593239307403564e-02\n            -7.0626032352447510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 688 1.7976630479097366e-03 -1 -2 689\n            1.9808609504252672e-03</internalNodes>\n          <leafValues>\n            -5.4180228710174561e-01 -2.5643008947372437e-01\n            1.8446870148181915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 690 -4.7688339836895466e-03 -1 -2 691\n            -1.5755610540509224e-02</internalNodes>\n          <leafValues>\n            -2.9698228836059570e-01 2.8959378600120544e-01\n            -1.6480749845504761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 692 -1.1919640004634857e-02 -1 -2 693\n            4.2308131232857704e-03</internalNodes>\n          <leafValues>\n            -5.8567219972610474e-01 1.3601270318031311e-01\n            -4.8162451386451721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 694 2.0548550412058830e-02 -1 -2 695\n            -7.3943338356912136e-03</internalNodes>\n          <leafValues>\n            3.0143499374389648e-01 4.6367760747671127e-02\n            -4.2379519343376160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 696 -6.2137800268828869e-03 -1 -2 697\n            1.4182809973135591e-03</internalNodes>\n          <leafValues>\n            4.5724278688430786e-01 -3.0143639445304871e-01\n            1.8204510211944580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 698 4.1609420441091061e-03 -1 -2 699\n            -3.7915320135653019e-03</internalNodes>\n          <leafValues>\n            -5.2654838562011719e-01 -5.8677071332931519e-01\n            1.1703660339117050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 700 2.0879150833934546e-03 -1 -2 701\n            1.5018540434539318e-03</internalNodes>\n          <leafValues>\n            -3.5307729244232178e-01 1.8624800443649292e-01\n            -3.2729730010032654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 702 2.1248809993267059e-02 -1 -2 703\n            -5.5249751312658191e-04</internalNodes>\n          <leafValues>\n            -3.1979259848594666e-01 2.3370230197906494e-01\n            -1.7386199533939362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 704 -3.0085169710218906e-03 -1 -2 705\n            -1.1611919617280364e-03</internalNodes>\n          <leafValues>\n            1.7596049606800079e-01 1.6033430397510529e-01\n            -3.9680978655815125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 706 -3.9655580185353756e-03 -1 -2 707\n            -6.5836100839078426e-03</internalNodes>\n          <leafValues>\n            3.6691769957542419e-01 -6.2966358661651611e-01\n            -2.4926450103521347e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 708 -9.0950471349060535e-04 -1 -2 709\n            -5.7984529994428158e-03</internalNodes>\n          <leafValues>\n            3.9574980735778809e-01 1.7492240667343140e-01\n            -2.6837408542633057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 710 -5.7758802175521851e-01 -1 -2 711\n            -1.5161310322582722e-02</internalNodes>\n          <leafValues>\n            5.9611392021179199e-01 -6.6131639480590820e-01\n            3.3608361263759434e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 712 7.6604672358371317e-05 -1 -2 713\n            2.7769979089498520e-02</internalNodes>\n          <leafValues>\n            2.0401589572429657e-01 -3.2097330689430237e-01\n            2.2317400574684143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 714 -2.6336179580539465e-03 -1 -2 715\n            8.3722146227955818e-03</internalNodes>\n          <leafValues>\n            -3.9656499028205872e-01 1.3883970677852631e-01\n            -5.8006221055984497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 716 -7.0203031646087766e-04 -1 -2 717\n            -4.8448870074935257e-04</internalNodes>\n          <leafValues>\n            2.7777281403541565e-01 2.1628519892692566e-01\n            -2.9692250490188599e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 718 -3.3638171851634979e-02 -1 -2 719\n            4.4241230934858322e-03</internalNodes>\n          <leafValues>\n            3.5791969299316406e-01 -8.6632027523592114e-04\n            -5.5872720479965210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 720 1.1545260436832905e-02 -1 -2 721\n            -1.5816639643162489e-03</internalNodes>\n          <leafValues>\n            3.3837619423866272e-01 2.8660699725151062e-02\n            -3.5041970014572144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 722 1.3838140293955803e-02 -1 -2 723\n            2.8327409178018570e-02</internalNodes>\n          <leafValues>\n            -7.7886807918548584e-01 -1.8604910001158714e-02\n            6.2147867679595947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 724 -8.8482163846492767e-03 -1 -2 725\n            -1.1661020107567310e-03</internalNodes>\n          <leafValues>\n            2.6369819045066833e-01 1.0302580147981644e-01\n            -3.2680010795593262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 726 -3.2252211123704910e-02 -1 -2 727\n            -9.4921119511127472e-02</internalNodes>\n          <leafValues>\n            -5.0046241283416748e-01 -7.2761011123657227e-01\n            1.0330100357532501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            1 0 728 2.5177269708365202e-03 -1 -2 729\n            -4.0892168879508972e-02</internalNodes>\n          <leafValues>\n            -6.3938027620315552e-01 -5.7345229387283325e-01\n            8.1502526998519897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 730 -1.9293189980089664e-03 -1 -2 731\n            -1.4116390375420451e-03</internalNodes>\n          <leafValues>\n            2.4177229404449463e-01 8.0363817512989044e-02\n            -3.6146539449691772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 732 -3.8812779821455479e-03 -1 -2 733\n            4.4630360789597034e-03</internalNodes>\n          <leafValues>\n            -5.7638782262802124e-01 9.1835789382457733e-02\n            -6.8039101362228394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 1 734 2.9870839789509773e-03 -1 -2 735\n            9.4975335523486137e-03</internalNodes>\n          <leafValues>\n            -1.0236640274524689e-01 4.9150609970092773e-01\n            -3.8011389970779419e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          8 7 3 12 -1.</_>\n        <_>\n          8 11 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 8 3 -1.</_>\n        <_>\n          10 9 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 13 2 6 -1.</_>\n        <_>\n          9 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 12 8 -1.</_>\n        <_>\n          11 2 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 5 12 -1.</_>\n        <_>\n          8 4 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 3 12 -1.</_>\n        <_>\n          1 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 2 7 -1.</_>\n        <_>\n          1 11 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 9 7 -1.</_>\n        <_>\n          9 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 9 -1.</_>\n        <_>\n          15 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 12 -1.</_>\n        <_>\n          8 11 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 20 -1.</_>\n        <_>\n          15 5 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 5 8 -1.</_>\n        <_>\n          0 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 12 8 -1.</_>\n        <_>\n          12 2 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 8 -1.</_>\n        <_>\n          19 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 3 12 -1.</_>\n        <_>\n          9 11 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 8 -1.</_>\n        <_>\n          1 6 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 4 4 -1.</_>\n        <_>\n          2 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 8 -1.</_>\n        <_>\n          9 7 3 4 2.</_>\n        <_>\n          12 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 7 2 -1.</_>\n        <_>\n          13 19 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 12 -1.</_>\n        <_>\n          8 11 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 12 -1.</_>\n        <_>\n          0 12 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 8 -1.</_>\n        <_>\n          18 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 1 8 -1.</_>\n        <_>\n          16 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 9 9 -1.</_>\n        <_>\n          12 1 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 3 -1.</_>\n        <_>\n          15 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 14 2 4 -1.</_>\n        <_>\n          2 16 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 9 3 -1.</_>\n        <_>\n          9 12 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 5 2 -1.</_>\n        <_>\n          0 19 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 12 -1.</_>\n        <_>\n          7 11 6 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 12 -1.</_>\n        <_>\n          4 0 8 6 2.</_>\n        <_>\n          12 6 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 2 5 -1.</_>\n        <_>\n          9 3 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 2 -1.</_>\n        <_>\n          17 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 16 1 3 -1.</_>\n        <_>\n          17 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 2 6 -1.</_>\n        <_>\n          1 9 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 3 4 -1.</_>\n        <_>\n          4 3 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 12 -1.</_>\n        <_>\n          8 11 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 7 8 -1.</_>\n        <_>\n          10 4 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 9 -1.</_>\n        <_>\n          19 0 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 1 4 -1.</_>\n        <_>\n          4 13 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 2 -1.</_>\n        <_>\n          12 10 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 7 -1.</_>\n        <_>\n          15 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 13 8 -1.</_>\n        <_>\n          4 2 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 7 8 -1.</_>\n        <_>\n          9 5 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 9 -1.</_>\n        <_>\n          10 0 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 4 4 -1.</_>\n        <_>\n          15 3 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 4 4 -1.</_>\n        <_>\n          0 18 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 2 1 -1.</_>\n        <_>\n          3 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 16 1 3 -1.</_>\n        <_>\n          16 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 4 -1.</_>\n        <_>\n          10 11 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 4 -1.</_>\n        <_>\n          19 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 3 -1.</_>\n        <_>\n          18 1 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 12 6 -1.</_>\n        <_>\n          2 4 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 1 16 -1.</_>\n        <_>\n          15 6 1 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 6 -1.</_>\n        <_>\n          13 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 3 -1.</_>\n        <_>\n          12 3 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 12 -1.</_>\n        <_>\n          7 11 6 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 9 -1.</_>\n        <_>\n          12 1 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 10 -1.</_>\n        <_>\n          18 5 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 15 -1.</_>\n        <_>\n          8 10 4 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 4 12 -1.</_>\n        <_>\n          1 12 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 8 2 -1.</_>\n        <_>\n          8 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 15 -1.</_>\n        <_>\n          18 0 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 8 -1.</_>\n        <_>\n          15 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 9 -1.</_>\n        <_>\n          5 3 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 6 -1.</_>\n        <_>\n          10 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 3 3 -1.</_>\n        <_>\n          11 17 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 4 3 -1.</_>\n        <_>\n          11 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 4 -1.</_>\n        <_>\n          15 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 4 2 -1.</_>\n        <_>\n          9 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 5 -1.</_>\n        <_>\n          7 1 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 5 -1.</_>\n        <_>\n          4 0 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 8 3 -1.</_>\n        <_>\n          10 9 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 3 -1.</_>\n        <_>\n          15 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 4 -1.</_>\n        <_>\n          9 11 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 6 -1.</_>\n        <_>\n          17 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 9 -1.</_>\n        <_>\n          3 12 2 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 8 4 -1.</_>\n        <_>\n          9 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 6 -1.</_>\n        <_>\n          1 3 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 6 -1.</_>\n        <_>\n          2 2 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 2 9 -1.</_>\n        <_>\n          1 11 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 11 1 8 -1.</_>\n        <_>\n          18 11 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 2 -1.</_>\n        <_>\n          11 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 3 1 -1.</_>\n        <_>\n          12 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 4 8 -1.</_>\n        <_>\n          17 0 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 4 3 -1.</_>\n        <_>\n          14 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 1 2 -1.</_>\n        <_>\n          15 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 16 1 3 -1.</_>\n        <_>\n          14 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 8 -1.</_>\n        <_>\n          3 2 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 1 2 -1.</_>\n        <_>\n          18 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 3 -1.</_>\n        <_>\n          8 0 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 1 9 -1.</_>\n        <_>\n          9 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 9 2 -1.</_>\n        <_>\n          9 13 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 5 6 -1.</_>\n        <_>\n          0 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 4 -1.</_>\n        <_>\n          15 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 2 -1.</_>\n        <_>\n          8 10 4 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 8 -1.</_>\n        <_>\n          19 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 12 8 -1.</_>\n        <_>\n          11 2 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 4 4 -1.</_>\n        <_>\n          2 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 13 9 -1.</_>\n        <_>\n          7 11 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 6 -1.</_>\n        <_>\n          19 1 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 5 8 -1.</_>\n        <_>\n          7 6 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 9 2 -1.</_>\n        <_>\n          11 19 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 2 3 -1.</_>\n        <_>\n          11 7 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 6 2 -1.</_>\n        <_>\n          6 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 7 -1.</_>\n        <_>\n          8 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 6 2 -1.</_>\n        <_>\n          7 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 2 -1.</_>\n        <_>\n          18 6 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 4 -1.</_>\n        <_>\n          6 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 7 4 -1.</_>\n        <_>\n          13 0 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 9 3 6 -1.</_>\n        <_>\n          11 11 3 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 6 -1.</_>\n        <_>\n          16 11 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 1 2 -1.</_>\n        <_>\n          19 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 1 3 -1.</_>\n        <_>\n          19 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 2 4 -1.</_>\n        <_>\n          13 12 1 2 2.</_>\n        <_>\n          14 14 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 3 5 -1.</_>\n        <_>\n          15 10 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 8 3 -1.</_>\n        <_>\n          10 9 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 4 -1.</_>\n        <_>\n          6 8 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 2 6 -1.</_>\n        <_>\n          1 11 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 5 6 -1.</_>\n        <_>\n          0 16 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 4 6 -1.</_>\n        <_>\n          18 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 7 -1.</_>\n        <_>\n          15 7 2 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 2 1 4 -1.</_>\n        <_>\n          19 4 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 2 -1.</_>\n        <_>\n          16 1 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 5 -1.</_>\n        <_>\n          15 12 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 15 2 3 -1.</_>\n        <_>\n          17 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 16 3 4 -1.</_>\n        <_>\n          14 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 2 -1.</_>\n        <_>\n          16 16 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 1 2 -1.</_>\n        <_>\n          18 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 1 6 -1.</_>\n        <_>\n          9 11 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 1 -1.</_>\n        <_>\n          19 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 4 -1.</_>\n        <_>\n          16 3 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 4 2 -1.</_>\n        <_>\n          9 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 9 7 -1.</_>\n        <_>\n          9 13 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 2 2 -1.</_>\n        <_>\n          1 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 3 4 -1.</_>\n        <_>\n          0 17 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 5 -1.</_>\n        <_>\n          9 1 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 9 -1.</_>\n        <_>\n          12 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 10 4 -1.</_>\n        <_>\n          10 10 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 5 4 -1.</_>\n        <_>\n          15 10 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 3 2 -1.</_>\n        <_>\n          18 2 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 5 -1.</_>\n        <_>\n          14 11 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 3 -1.</_>\n        <_>\n          10 7 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 1 -1.</_>\n        <_>\n          5 0 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 6 5 -1.</_>\n        <_>\n          3 13 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 3 5 -1.</_>\n        <_>\n          14 10 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 6 -1.</_>\n        <_>\n          9 10 4 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 6 -1.</_>\n        <_>\n          13 9 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 7 6 -1.</_>\n        <_>\n          7 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 10 12 -1.</_>\n        <_>\n          3 5 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 4 -1.</_>\n        <_>\n          15 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 9 -1.</_>\n        <_>\n          2 12 2 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 11 -1.</_>\n        <_>\n          12 0 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 1 8 -1.</_>\n        <_>\n          13 11 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 4 1 2 -1.</_>\n        <_>\n          19 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 1 2 -1.</_>\n        <_>\n          2 15 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 16 1 3 -1.</_>\n        <_>\n          15 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 2 -1.</_>\n        <_>\n          6 12 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 2 2 -1.</_>\n        <_>\n          4 11 1 1 2.</_>\n        <_>\n          5 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 2 -1.</_>\n        <_>\n          18 8 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 9 3 8 -1.</_>\n        <_>\n          16 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 4 -1.</_>\n        <_>\n          19 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 3 -1.</_>\n        <_>\n          19 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 3 -1.</_>\n        <_>\n          14 0 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 15 17 -1.</_>\n        <_>\n          8 3 5 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 4 -1.</_>\n        <_>\n          9 0 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 8 1 -1.</_>\n        <_>\n          1 11 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 2 4 -1.</_>\n        <_>\n          3 11 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 17 4 3 -1.</_>\n        <_>\n          5 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 1 -1.</_>\n        <_>\n          19 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 3 -1.</_>\n        <_>\n          11 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 4 2 -1.</_>\n        <_>\n          4 11 2 1 2.</_>\n        <_>\n          6 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 4 -1.</_>\n        <_>\n          4 11 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 1 -1.</_>\n        <_>\n          17 2 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 18 1 2 -1.</_>\n        <_>\n          4 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 2 -1.</_>\n        <_>\n          10 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 5 4 -1.</_>\n        <_>\n          11 12 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 1 -1.</_>\n        <_>\n          19 2 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 2 -1.</_>\n        <_>\n          9 0 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 8 2 -1.</_>\n        <_>\n          8 13 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 4 -1.</_>\n        <_>\n          15 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 17 9 -1.</_>\n        <_>\n          3 11 17 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 4 3 -1.</_>\n        <_>\n          2 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 6 -1.</_>\n        <_>\n          12 3 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 3 6 -1.</_>\n        <_>\n          0 17 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 9 -1.</_>\n        <_>\n          3 3 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 6 -1.</_>\n        <_>\n          8 5 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 18 3 -1.</_>\n        <_>\n          7 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 2 -1.</_>\n        <_>\n          16 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 4 -1.</_>\n        <_>\n          16 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 4 5 -1.</_>\n        <_>\n          14 11 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 1 2 -1.</_>\n        <_>\n          19 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 3 -1.</_>\n        <_>\n          19 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 4 -1.</_>\n        <_>\n          7 4 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 3 2 -1.</_>\n        <_>\n          10 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 2 -1.</_>\n        <_>\n          16 9 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 15 3 2 -1.</_>\n        <_>\n          16 15 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 12 3 3 -1.</_>\n        <_>\n          7 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 3 1 -1.</_>\n        <_>\n          14 13 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 1 3 -1.</_>\n        <_>\n          3 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 4 -1.</_>\n        <_>\n          10 2 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 2 3 -1.</_>\n        <_>\n          14 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 18 8 2 -1.</_>\n        <_>\n          12 19 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 7 -1.</_>\n        <_>\n          9 12 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 18 6 2 -1.</_>\n        <_>\n          6 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 3 -1.</_>\n        <_>\n          12 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 2 2 -1.</_>\n        <_>\n          13 12 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 2 1 -1.</_>\n        <_>\n          19 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 19 4 1 -1.</_>\n        <_>\n          6 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 5 2 -1.</_>\n        <_>\n          0 12 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 2 -1.</_>\n        <_>\n          18 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 6 -1.</_>\n        <_>\n          1 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 1 -1.</_>\n        <_>\n          3 3 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 9 3 1 -1.</_>\n        <_>\n          17 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 10 1 6 -1.</_>\n        <_>\n          12 12 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 1 1 3 -1.</_>\n        <_>\n          2 2 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 3 -1.</_>\n        <_>\n          2 1 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 14 8 1 -1.</_>\n        <_>\n          8 14 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 9 -1.</_>\n        <_>\n          7 11 6 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 18 -1.</_>\n        <_>\n          19 6 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 3 6 -1.</_>\n        <_>\n          1 16 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 7 3 -1.</_>\n        <_>\n          6 11 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 7 3 -1.</_>\n        <_>\n          6 10 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 8 -1.</_>\n        <_>\n          17 1 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 2 4 -1.</_>\n        <_>\n          10 6 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 7 2 -1.</_>\n        <_>\n          6 12 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 6 -1.</_>\n        <_>\n          18 12 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 17 1 2 -1.</_>\n        <_>\n          19 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 2 -1.</_>\n        <_>\n          17 10 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 18 4 2 -1.</_>\n        <_>\n          7 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 4 4 -1.</_>\n        <_>\n          3 12 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 1 2 -1.</_>\n        <_>\n          19 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 1 3 -1.</_>\n        <_>\n          19 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 12 3 -1.</_>\n        <_>\n          7 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 4 1 -1.</_>\n        <_>\n          7 18 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 6 -1.</_>\n        <_>\n          5 5 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 6 -1.</_>\n        <_>\n          9 4 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 11 9 -1.</_>\n        <_>\n          7 3 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 8 9 -1.</_>\n        <_>\n          2 3 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 3 -1.</_>\n        <_>\n          6 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 3 2 -1.</_>\n        <_>\n          0 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 10 19 -1.</_>\n        <_>\n          6 0 5 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 2 3 -1.</_>\n        <_>\n          2 9 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 17 4 3 -1.</_>\n        <_>\n          11 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 3 2 -1.</_>\n        <_>\n          12 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 2 -1.</_>\n        <_>\n          11 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 3 -1.</_>\n        <_>\n          10 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 1 -1.</_>\n        <_>\n          18 3 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 13 -1.</_>\n        <_>\n          14 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 1 -1.</_>\n        <_>\n          17 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 1 2 -1.</_>\n        <_>\n          5 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 4 2 -1.</_>\n        <_>\n          2 11 2 1 2.</_>\n        <_>\n          4 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 15 2 3 -1.</_>\n        <_>\n          15 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 17 4 2 -1.</_>\n        <_>\n          9 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 4 3 -1.</_>\n        <_>\n          0 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 2 -1.</_>\n        <_>\n          12 13 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 1 2 -1.</_>\n        <_>\n          2 14 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 8 3 -1.</_>\n        <_>\n          5 11 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 8 -1.</_>\n        <_>\n          13 2 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 7 -1.</_>\n        <_>\n          15 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 15 4 -1.</_>\n        <_>\n          8 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 9 9 -1.</_>\n        <_>\n          12 1 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 4 7 -1.</_>\n        <_>\n          2 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 1 4 -1.</_>\n        <_>\n          0 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 6 -1.</_>\n        <_>\n          19 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 9 9 -1.</_>\n        <_>\n          11 11 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 8 3 -1.</_>\n        <_>\n          11 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 2 2 -1.</_>\n        <_>\n          19 4 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 3 -1.</_>\n        <_>\n          9 12 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 3 4 -1.</_>\n        <_>\n          13 2 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 3 -1.</_>\n        <_>\n          12 6 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 1 3 -1.</_>\n        <_>\n          9 13 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 3 -1.</_>\n        <_>\n          9 13 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 1 2 -1.</_>\n        <_>\n          17 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 16 2 2 -1.</_>\n        <_>\n          16 16 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 6 -1.</_>\n        <_>\n          6 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 8 -1.</_>\n        <_>\n          5 2 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 2 1 -1.</_>\n        <_>\n          18 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 9 -1.</_>\n        <_>\n          14 0 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 7 3 -1.</_>\n        <_>\n          6 10 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 2 -1.</_>\n        <_>\n          3 12 3 1 2.</_>\n        <_>\n          6 13 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 1 2 -1.</_>\n        <_>\n          2 10 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 15 2 3 -1.</_>\n        <_>\n          12 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 2 6 5 -1.</_>\n        <_>\n          9 2 2 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 6 3 -1.</_>\n        <_>\n          15 13 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 3 8 -1.</_>\n        <_>\n          17 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 3 -1.</_>\n        <_>\n          9 3 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 2 12 -1.</_>\n        <_>\n          15 6 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 2 -1.</_>\n        <_>\n          11 14 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 5 4 -1.</_>\n        <_>\n          9 4 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 3 3 -1.</_>\n        <_>\n          14 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 3 -1.</_>\n        <_>\n          18 2 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 4 1 -1.</_>\n        <_>\n          6 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 2 2 -1.</_>\n        <_>\n          5 10 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 11 1 2 -1.</_>\n        <_>\n          2 11 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 6 -1.</_>\n        <_>\n          18 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 2 -1.</_>\n        <_>\n          10 5 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 6 2 -1.</_>\n        <_>\n          13 13 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 4 -1.</_>\n        <_>\n          9 11 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 2 5 -1.</_>\n        <_>\n          1 11 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 20 9 -1.</_>\n        <_>\n          0 11 20 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 1 6 -1.</_>\n        <_>\n          18 3 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 7 -1.</_>\n        <_>\n          17 1 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 2 4 -1.</_>\n        <_>\n          4 13 1 2 2.</_>\n        <_>\n          5 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 6 -1.</_>\n        <_>\n          7 9 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 5 4 -1.</_>\n        <_>\n          0 18 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 3 4 -1.</_>\n        <_>\n          8 15 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 8 3 -1.</_>\n        <_>\n          11 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 4 7 -1.</_>\n        <_>\n          13 3 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 2 8 -1.</_>\n        <_>\n          13 12 1 4 2.</_>\n        <_>\n          14 16 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 3 5 -1.</_>\n        <_>\n          14 11 1 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 5 -1.</_>\n        <_>\n          11 5 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 2 -1.</_>\n        <_>\n          8 11 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 1 2 -1.</_>\n        <_>\n          2 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 1 2 -1.</_>\n        <_>\n          2 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 17 1 2 -1.</_>\n        <_>\n          15 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 16 1 3 -1.</_>\n        <_>\n          16 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 10 -1.</_>\n        <_>\n          19 0 1 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 7 -1.</_>\n        <_>\n          16 2 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 4 -1.</_>\n        <_>\n          12 0 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 15 6 -1.</_>\n        <_>\n          0 5 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 4 -1.</_>\n        <_>\n          6 1 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 7 -1.</_>\n        <_>\n          9 13 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 6 2 -1.</_>\n        <_>\n          8 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 5 2 -1.</_>\n        <_>\n          0 16 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 6 -1.</_>\n        <_>\n          4 3 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 13 8 -1.</_>\n        <_>\n          5 2 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 6 -1.</_>\n        <_>\n          15 12 2 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 1 -1.</_>\n        <_>\n          16 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          6 12 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 2 2 -1.</_>\n        <_>\n          6 11 1 1 2.</_>\n        <_>\n          7 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 3 2 -1.</_>\n        <_>\n          18 4 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 3 -1.</_>\n        <_>\n          17 4 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 13 3 1 -1.</_>\n        <_>\n          13 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 2 -1.</_>\n        <_>\n          12 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 1 2 -1.</_>\n        <_>\n          10 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 13 1 6 -1.</_>\n        <_>\n          17 13 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 14 2 4 -1.</_>\n        <_>\n          16 14 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 3 -1.</_>\n        <_>\n          4 0 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 1 -1.</_>\n        <_>\n          13 0 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 18 5 -1.</_>\n        <_>\n          8 15 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 8 5 -1.</_>\n        <_>\n          8 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 12 -1.</_>\n        <_>\n          0 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 2 -1.</_>\n        <_>\n          14 0 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 8 4 5 -1.</_>\n        <_>\n          14 9 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 4 9 -1.</_>\n        <_>\n          2 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 6 -1.</_>\n        <_>\n          6 11 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 4 2 -1.</_>\n        <_>\n          12 19 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 2 -1.</_>\n        <_>\n          16 13 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 9 1 10 -1.</_>\n        <_>\n          19 9 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 4 4 -1.</_>\n        <_>\n          12 5 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 3 5 -1.</_>\n        <_>\n          15 12 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 6 -1.</_>\n        <_>\n          18 0 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 16 3 3 -1.</_>\n        <_>\n          14 16 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 4 -1.</_>\n        <_>\n          19 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 4 2 -1.</_>\n        <_>\n          7 13 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 3 -1.</_>\n        <_>\n          10 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 2 3 -1.</_>\n        <_>\n          13 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 4 -1.</_>\n        <_>\n          12 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 1 3 -1.</_>\n        <_>\n          4 13 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 2 -1.</_>\n        <_>\n          1 11 3 1 2.</_>\n        <_>\n          4 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 2 3 -1.</_>\n        <_>\n          4 8 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 12 2 2 -1.</_>\n        <_>\n          5 12 1 1 2.</_>\n        <_>\n          6 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          8 9 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 5 3 -1.</_>\n        <_>\n          7 9 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 19 4 1 -1.</_>\n        <_>\n          7 19 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 4 -1.</_>\n        <_>\n          6 0 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 8 -1.</_>\n        <_>\n          8 0 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 3 4 -1.</_>\n        <_>\n          11 12 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 20 6 -1.</_>\n        <_>\n          5 4 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 4 -1.</_>\n        <_>\n          13 2 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 5 14 15 -1.</_>\n        <_>\n          7 5 7 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 3 2 -1.</_>\n        <_>\n          1 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 3 3 -1.</_>\n        <_>\n          2 7 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 8 -1.</_>\n        <_>\n          0 1 3 4 2.</_>\n        <_>\n          3 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 6 -1.</_>\n        <_>\n          7 0 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 15 8 -1.</_>\n        <_>\n          1 3 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 1 -1.</_>\n        <_>\n          8 0 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 1 2 -1.</_>\n        <_>\n          3 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 4 1 -1.</_>\n        <_>\n          4 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 2 2 -1.</_>\n        <_>\n          4 11 1 1 2.</_>\n        <_>\n          5 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 3 -1.</_>\n        <_>\n          18 3 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 2 1 -1.</_>\n        <_>\n          17 3 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 3 2 -1.</_>\n        <_>\n          0 12 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 4 2 -1.</_>\n        <_>\n          4 11 2 1 2.</_>\n        <_>\n          6 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 11 -1.</_>\n        <_>\n          11 0 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 15 2 3 -1.</_>\n        <_>\n          17 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 11 8 1 -1.</_>\n        <_>\n          2 11 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 13 1 6 -1.</_>\n        <_>\n          17 13 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 13 6 2 -1.</_>\n        <_>\n          13 13 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 10 -1.</_>\n        <_>\n          19 5 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 7 9 -1.</_>\n        <_>\n          2 11 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 20 2 -1.</_>\n        <_>\n          5 11 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 6 1 -1.</_>\n        <_>\n          8 14 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 8 7 -1.</_>\n        <_>\n          12 3 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 5 9 -1.</_>\n        <_>\n          7 3 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 6 -1.</_>\n        <_>\n          0 2 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 2 6 -1.</_>\n        <_>\n          4 12 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 14 -1.</_>\n        <_>\n          18 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 6 -1.</_>\n        <_>\n          6 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 12 2 -1.</_>\n        <_>\n          8 19 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 17 4 3 -1.</_>\n        <_>\n          11 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 1 4 -1.</_>\n        <_>\n          4 1 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 2 -1.</_>\n        <_>\n          18 6 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 10 3 4 -1.</_>\n        <_>\n          11 11 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 9 4 3 -1.</_>\n        <_>\n          9 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 4 3 -1.</_>\n        <_>\n          9 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 4 -1.</_>\n        <_>\n          18 5 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 0 2 3 -1.</_>\n        <_>\n          18 1 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 2 -1.</_>\n        <_>\n          18 2 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 1 3 -1.</_>\n        <_>\n          19 2 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 4 2 -1.</_>\n        <_>\n          9 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 4 2 -1.</_>\n        <_>\n          2 13 2 1 2.</_>\n        <_>\n          4 14 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 4 2 -1.</_>\n        <_>\n          3 11 2 1 2.</_>\n        <_>\n          5 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 4 2 -1.</_>\n        <_>\n          2 10 2 1 2.</_>\n        <_>\n          4 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 2 3 -1.</_>\n        <_>\n          4 10 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 10 4 6 -1.</_>\n        <_>\n          3 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 8 -1.</_>\n        <_>\n          16 0 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 9 -1.</_>\n        <_>\n          12 0 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 8 1 -1.</_>\n        <_>\n          1 11 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 1 3 -1.</_>\n        <_>\n          2 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 13 2 2 -1.</_>\n        <_>\n          14 13 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 3 4 -1.</_>\n        <_>\n          5 12 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 4 3 -1.</_>\n        <_>\n          7 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 6 -1.</_>\n        <_>\n          14 1 2 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 4 -1.</_>\n        <_>\n          8 6 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 5 -1.</_>\n        <_>\n          10 3 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 2 2 -1.</_>\n        <_>\n          13 12 1 1 2.</_>\n        <_>\n          14 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 3 3 -1.</_>\n        <_>\n          7 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 3 3 -1.</_>\n        <_>\n          4 8 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 10 5 4 -1.</_>\n        <_>\n          15 11 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 4 9 -1.</_>\n        <_>\n          14 11 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 3 -1.</_>\n        <_>\n          16 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 13 -1.</_>\n        <_>\n          19 7 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 1 -1.</_>\n        <_>\n          8 0 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 5 4 -1.</_>\n        <_>\n          11 12 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 13 2 4 -1.</_>\n        <_>\n          18 13 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 9 2 -1.</_>\n        <_>\n          9 13 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 6 8 -1.</_>\n        <_>\n          3 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 3 -1.</_>\n        <_>\n          15 12 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 4 -1.</_>\n        <_>\n          14 8 2 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 6 -1.</_>\n        <_>\n          4 3 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 17 2 -1.</_>\n        <_>\n          0 1 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 1 6 -1.</_>\n        <_>\n          2 17 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 3 3 -1.</_>\n        <_>\n          2 11 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 2 2 9 -1.</_>\n        <_>\n          19 2 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 13 8 -1.</_>\n        <_>\n          7 11 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 4 -1.</_>\n        <_>\n          18 7 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 13 2 2 -1.</_>\n        <_>\n          7 13 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 1 3 -1.</_>\n        <_>\n          14 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 16 6 4 -1.</_>\n        <_>\n          11 16 3 2 2.</_>\n        <_>\n          14 18 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 4 -1.</_>\n        <_>\n          19 1 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 2 -1.</_>\n        <_>\n          19 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 6 -1.</_>\n        <_>\n          13 3 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 3 -1.</_>\n        <_>\n          8 11 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 8 -1.</_>\n        <_>\n          19 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 0 3 3 2.</_>\n        <_>\n          17 3 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 3 -1.</_>\n        <_>\n          9 12 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 10 12 -1.</_>\n        <_>\n          6 6 5 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 2 1 -1.</_>\n        <_>\n          11 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 7 10 -1.</_>\n        <_>\n          8 6 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 3 3 -1.</_>\n        <_>\n          14 12 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 13 4 4 -1.</_>\n        <_>\n          10 13 2 2 2.</_>\n        <_>\n          12 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 2 3 -1.</_>\n        <_>\n          14 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 13 3 1 -1.</_>\n        <_>\n          14 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 3 -1.</_>\n        <_>\n          12 4 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 4 -1.</_>\n        <_>\n          1 7 3 2 2.</_>\n        <_>\n          4 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 4 2 -1.</_>\n        <_>\n          16 8 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 9 6 -1.</_>\n        <_>\n          13 4 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 2 -1.</_>\n        <_>\n          14 2 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 18 4 2 -1.</_>\n        <_>\n          6 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 2 8 -1.</_>\n        <_>\n          1 12 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 18 1 -1.</_>\n        <_>\n          10 19 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 12 20 -1.</_>\n        <_>\n          8 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 1 -1.</_>\n        <_>\n          9 0 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 8 3 -1.</_>\n        <_>\n          7 10 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 2 2 -1.</_>\n        <_>\n          3 11 1 1 2.</_>\n        <_>\n          4 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 2 -1.</_>\n        <_>\n          14 0 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 1 -1.</_>\n        <_>\n          9 0 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 1 4 -1.</_>\n        <_>\n          3 9 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 3 3 -1.</_>\n        <_>\n          0 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 15 12 -1.</_>\n        <_>\n          8 8 5 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 6 -1.</_>\n        <_>\n          9 13 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 12 6 -1.</_>\n        <_>\n          2 3 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 1 -1.</_>\n        <_>\n          3 3 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 5 3 -1.</_>\n        <_>\n          2 5 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 12 2 2 -1.</_>\n        <_>\n          2 12 1 1 2.</_>\n        <_>\n          3 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 3 -1.</_>\n        <_>\n          9 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 4 -1.</_>\n        <_>\n          10 11 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 1 -1.</_>\n        <_>\n          18 3 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 3 -1.</_>\n        <_>\n          8 11 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 12 8 -1.</_>\n        <_>\n          2 12 6 4 2.</_>\n        <_>\n          8 16 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 2 3 -1.</_>\n        <_>\n          12 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 14 9 1 -1.</_>\n        <_>\n          8 14 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 4 6 -1.</_>\n        <_>\n          13 13 2 3 2.</_>\n        <_>\n          15 16 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 1 -1.</_>\n        <_>\n          11 10 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 4 -1.</_>\n        <_>\n          16 0 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 13 2 2 -1.</_>\n        <_>\n          2 13 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 12 2 2 -1.</_>\n        <_>\n          5 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 4 -1.</_>\n        <_>\n          0 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 14 11 -1.</_>\n        <_>\n          7 8 7 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 4 3 -1.</_>\n        <_>\n          5 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 3 5 -1.</_>\n        <_>\n          4 12 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 1 3 -1.</_>\n        <_>\n          5 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 2 -1.</_>\n        <_>\n          4 10 2 1 2.</_>\n        <_>\n          6 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 3 1 -1.</_>\n        <_>\n          16 10 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 7 -1.</_>\n        <_>\n          7 0 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 17 6 -1.</_>\n        <_>\n          2 5 17 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 6 -1.</_>\n        <_>\n          2 6 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 6 2 -1.</_>\n        <_>\n          2 9 3 1 2.</_>\n        <_>\n          5 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 4 2 -1.</_>\n        <_>\n          3 11 2 1 2.</_>\n        <_>\n          5 12 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 4 2 -1.</_>\n        <_>\n          18 13 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 3 2 -1.</_>\n        <_>\n          16 8 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 4 2 -1.</_>\n        <_>\n          0 12 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 3 -1.</_>\n        <_>\n          3 10 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 18 6 2 -1.</_>\n        <_>\n          5 18 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 2 -1.</_>\n        <_>\n          12 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 2 -1.</_>\n        <_>\n          19 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 1 -1.</_>\n        <_>\n          7 0 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 3 4 -1.</_>\n        <_>\n          10 11 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 16 1 3 -1.</_>\n        <_>\n          13 17 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 4 -1.</_>\n        <_>\n          19 1 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 5 6 -1.</_>\n        <_>\n          15 15 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 3 3 -1.</_>\n        <_>\n          17 5 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 14 -1.</_>\n        <_>\n          12 6 8 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 3 1 -1.</_>\n        <_>\n          11 12 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 2 2 -1.</_>\n        <_>\n          5 12 1 1 2.</_>\n        <_>\n          6 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 5 -1.</_>\n        <_>\n          10 3 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 3 -1.</_>\n        <_>\n          18 2 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 17 1 2 -1.</_>\n        <_>\n          19 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 2 7 6 -1.</_>\n        <_>\n          10 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 13 4 -1.</_>\n        <_>\n          2 1 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 2 -1.</_>\n        <_>\n          2 0 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 8 -1.</_>\n        <_>\n          3 3 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 1 3 -1.</_>\n        <_>\n          2 1 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          10 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 3 2 -1.</_>\n        <_>\n          18 10 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 6 -1.</_>\n        <_>\n          16 10 4 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 7 3 -1.</_>\n        <_>\n          6 10 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 3 4 -1.</_>\n        <_>\n          2 11 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 1 6 -1.</_>\n        <_>\n          15 8 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 3 1 12 -1.</_>\n        <_>\n          19 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 5 2 -1.</_>\n        <_>\n          2 0 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 3 11 6 -1.</_>\n        <_>\n          1 5 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 2 4 -1.</_>\n        <_>\n          14 13 1 2 2.</_>\n        <_>\n          15 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 10 3 -1.</_>\n        <_>\n          13 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 1 4 -1.</_>\n        <_>\n          6 13 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 3 9 -1.</_>\n        <_>\n          3 12 1 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 9 -1.</_>\n        <_>\n          9 3 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 4 -1.</_>\n        <_>\n          12 0 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 5 -1.</_>\n        <_>\n          12 5 2 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 12 -1.</_>\n        <_>\n          7 11 6 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 4 -1.</_>\n        <_>\n          16 12 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 3 3 -1.</_>\n        <_>\n          14 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 4 1 -1.</_>\n        <_>\n          15 10 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 2 -1.</_>\n        <_>\n          18 8 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 3 1 2 -1.</_>\n        <_>\n          19 4 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 1 4 -1.</_>\n        <_>\n          19 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 8 -1.</_>\n        <_>\n          3 4 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 6 -1.</_>\n        <_>\n          1 2 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 1 -1.</_>\n        <_>\n          17 9 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 3 -1.</_>\n        <_>\n          9 14 2 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 6 2 -1.</_>\n        <_>\n          11 19 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 5 3 -1.</_>\n        <_>\n          15 18 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 4 -1.</_>\n        <_>\n          8 1 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 1 2 -1.</_>\n        <_>\n          5 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 6 -1.</_>\n        <_>\n          3 13 2 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 4 2 -1.</_>\n        <_>\n          3 12 2 1 2.</_>\n        <_>\n          5 13 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 3 -1.</_>\n        <_>\n          2 1 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 10 3 3 -1.</_>\n        <_>\n          9 11 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 2 -1.</_>\n        <_>\n          0 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 4 3 -1.</_>\n        <_>\n          0 17 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 12 1 -1.</_>\n        <_>\n          6 13 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 9 -1.</_>\n        <_>\n          15 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 3 -1.</_>\n        <_>\n          9 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 4 -1.</_>\n        <_>\n          10 11 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 10 -1.</_>\n        <_>\n          15 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 1 4 -1.</_>\n        <_>\n          3 11 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 11 3 3 -1.</_>\n        <_>\n          10 12 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 3 3 -1.</_>\n        <_>\n          5 13 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 6 2 1 -1.</_>\n        <_>\n          18 6 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 1 4 -1.</_>\n        <_>\n          16 2 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 5 13 4 -1.</_>\n        <_>\n          2 6 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 6 2 -1.</_>\n        <_>\n          14 4 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 8 1 3 -1.</_>\n        <_>\n          2 9 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 8 3 -1.</_>\n        <_>\n          7 8 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 3 -1.</_>\n        <_>\n          10 8 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 3 8 -1.</_>\n        <_>\n          10 15 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 2 3 -1.</_>\n        <_>\n          12 16 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 20 -1.</_>\n        <_>\n          6 0 6 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 1 -1.</_>\n        <_>\n          5 0 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 3 -1.</_>\n        <_>\n          0 1 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 2 2 -1.</_>\n        <_>\n          14 13 1 1 2.</_>\n        <_>\n          15 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 2 -1.</_>\n        <_>\n          12 10 2 1 2.</_>\n        <_>\n          14 11 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 4 -1.</_>\n        <_>\n          9 0 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 10 -1.</_>\n        <_>\n          0 0 5 5 2.</_>\n        <_>\n          5 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 2 -1.</_>\n        <_>\n          7 3 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 4 11 -1.</_>\n        <_>\n          2 5 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 3 1 -1.</_>\n        <_>\n          13 8 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 2 -1.</_>\n        <_>\n          2 2 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 5 7 3 -1.</_>\n        <_>\n          12 6 7 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 7 3 4 -1.</_>\n        <_>\n          14 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 3 2 -1.</_>\n        <_>\n          8 12 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 4 8 -1.</_>\n        <_>\n          0 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 2 6 -1.</_>\n        <_>\n          14 13 1 3 2.</_>\n        <_>\n          15 16 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 17 1 2 -1.</_>\n        <_>\n          16 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 6 -1.</_>\n        <_>\n          10 2 3 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 14 3 -1.</_>\n        <_>\n          4 11 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 1 12 -1.</_>\n        <_>\n          19 8 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 1 6 -1.</_>\n        <_>\n          19 4 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 12 3 -1.</_>\n        <_>\n          14 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 2 3 -1.</_>\n        <_>\n          1 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 9 -1.</_>\n        <_>\n          18 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 6 4 -1.</_>\n        <_>\n          9 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 3 1 -1.</_>\n        <_>\n          17 3 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 12 3 6 -1.</_>\n        <_>\n          16 12 1 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 3 3 -1.</_>\n        <_>\n          14 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 15 4 -1.</_>\n        <_>\n          3 5 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 3 4 -1.</_>\n        <_>\n          12 11 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 3 3 -1.</_>\n        <_>\n          11 11 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 4 -1.</_>\n        <_>\n          19 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 3 -1.</_>\n        <_>\n          15 1 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 10 8 2 -1.</_>\n        <_>\n          2 10 4 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 18 4 2 -1.</_>\n        <_>\n          10 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 9 -1.</_>\n        <_>\n          11 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 5 6 -1.</_>\n        <_>\n          15 12 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 4 2 -1.</_>\n        <_>\n          3 13 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 4 1 -1.</_>\n        <_>\n          3 16 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 2 -1.</_>\n        <_>\n          16 9 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 2 -1.</_>\n        <_>\n          2 6 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 1 -1.</_>\n        <_>\n          12 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 19 6 1 -1.</_>\n        <_>\n          17 19 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 18 1 2 -1.</_>\n        <_>\n          17 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 3 1 9 -1.</_>\n        <_>\n          19 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 3 3 -1.</_>\n        <_>\n          9 11 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 3 -1.</_>\n        <_>\n          2 1 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 16 2 2 -1.</_>\n        <_>\n          17 16 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 3 3 -1.</_>\n        <_>\n          6 12 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 2 2 -1.</_>\n        <_>\n          3 11 1 1 2.</_>\n        <_>\n          4 12 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 2 2 -1.</_>\n        <_>\n          16 9 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 2 2 -1.</_>\n        <_>\n          4 9 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 10 2 3 -1.</_>\n        <_>\n          2 11 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 20 -1.</_>\n        <_>\n          0 0 10 10 2.</_>\n        <_>\n          10 10 10 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 5 3 -1.</_>\n        <_>\n          7 17 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 6 -1.</_>\n        <_>\n          12 3 3 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 4 7 -1.</_>\n        <_>\n          7 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 6 -1.</_>\n        <_>\n          12 5 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 4 2 -1.</_>\n        <_>\n          6 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 8 -1.</_>\n        <_>\n          9 7 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 16 2 4 -1.</_>\n        <_>\n          18 16 1 2 2.</_>\n        <_>\n          19 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 2 2 -1.</_>\n        <_>\n          12 18 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 5 2 -1.</_>\n        <_>\n          3 3 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 4 -1.</_>\n        <_>\n          7 3 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 2 -1.</_>\n        <_>\n          2 0 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 1 -1.</_>\n        <_>\n          8 1 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 10 -1.</_>\n        <_>\n          12 1 1 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 4 -1.</_>\n        <_>\n          5 1 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 13 3 2 -1.</_>\n        <_>\n          5 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 3 -1.</_>\n        <_>\n          7 12 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 17 4 3 -1.</_>\n        <_>\n          8 17 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 19 2 1 -1.</_>\n        <_>\n          6 19 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 2 2 -1.</_>\n        <_>\n          0 9 1 1 2.</_>\n        <_>\n          1 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 2 2 -1.</_>\n        <_>\n          0 9 1 1 2.</_>\n        <_>\n          1 10 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 2 2 -1.</_>\n        <_>\n          6 9 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 5 3 -1.</_>\n        <_>\n          0 11 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 2 2 -1.</_>\n        <_>\n          3 10 1 1 2.</_>\n        <_>\n          4 11 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 1 -1.</_>\n        <_>\n          6 10 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 1 -1.</_>\n        <_>\n          18 5 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 1 2 7 -1.</_>\n        <_>\n          17 1 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 13 9 2 -1.</_>\n        <_>\n          9 13 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 16 6 -1.</_>\n        <_>\n          4 11 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 4 -1.</_>\n        <_>\n          1 3 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 3 3 -1.</_>\n        <_>\n          15 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 6 2 -1.</_>\n        <_>\n          4 11 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 10 -1.</_>\n        <_>\n          12 0 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 16 4 -1.</_>\n        <_>\n          5 12 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 9 -1.</_>\n        <_>\n          15 11 2 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 1 8 -1.</_>\n        <_>\n          19 4 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 10 6 -1.</_>\n        <_>\n          8 5 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 2 1 -1.</_>\n        <_>\n          19 7 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 1 12 -1.</_>\n        <_>\n          19 7 1 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 3 3 -1.</_>\n        <_>\n          9 12 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 3 3 -1.</_>\n        <_>\n          8 12 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 3 2 -1.</_>\n        <_>\n          7 13 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 15 3 2 -1.</_>\n        <_>\n          17 15 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 3 -1.</_>\n        <_>\n          12 6 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 2 4 -1.</_>\n        <_>\n          0 17 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 7 2 -1.</_>\n        <_>\n          12 9 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 7 -1.</_>\n        <_>\n          10 5 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 8 3 -1.</_>\n        <_>\n          8 17 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 4 3 -1.</_>\n        <_>\n          0 18 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 6 -1.</_>\n        <_>\n          5 3 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 2 -1.</_>\n        <_>\n          6 2 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 3 -1.</_>\n        <_>\n          7 9 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 1 3 -1.</_>\n        <_>\n          10 9 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 2 -1.</_>\n        <_>\n          17 2 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 10 1 2 -1.</_>\n        <_>\n          2 10 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 1 2 -1.</_>\n        <_>\n          2 9 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 2 3 -1.</_>\n        <_>\n          2 10 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 14 12 6 -1.</_>\n        <_>\n          2 14 6 3 2.</_>\n        <_>\n          8 17 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 1 2 -1.</_>\n        <_>\n          15 17 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 11 3 3 -1.</_>\n        <_>\n          18 12 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 12 3 2 -1.</_>\n        <_>\n          14 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 18 4 2 -1.</_>\n        <_>\n          18 18 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 14 2 4 -1.</_>\n        <_>\n          17 15 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 13 3 1 -1.</_>\n        <_>\n          13 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 3 3 -1.</_>\n        <_>\n          12 13 1 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 20 -1.</_>\n        <_>\n          8 0 8 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 5 -1.</_>\n        <_>\n          5 0 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 1 -1.</_>\n        <_>\n          1 0 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 19 4 -1.</_>\n        <_>\n          1 4 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 3 4 -1.</_>\n        <_>\n          13 7 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 3 3 -1.</_>\n        <_>\n          16 7 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 2 2 -1.</_>\n        <_>\n          3 13 1 1 2.</_>\n        <_>\n          4 14 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 2 2 -1.</_>\n        <_>\n          2 12 1 1 2.</_>\n        <_>\n          3 13 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 19 4 -1.</_>\n        <_>\n          0 4 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 7 3 4 -1.</_>\n        <_>\n          18 8 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 4 -1.</_>\n        <_>\n          5 9 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 6 -1.</_>\n        <_>\n          15 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 6 -1.</_>\n        <_>\n          18 5 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 2 4 -1.</_>\n        <_>\n          14 3 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 5 4 -1.</_>\n        <_>\n          7 10 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 2 -1.</_>\n        <_>\n          12 12 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 3 4 -1.</_>\n        <_>\n          16 13 3 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 7 5 9 -1.</_>\n        <_>\n          14 10 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 1 3 -1.</_>\n        <_>\n          0 13 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 3 6 -1.</_>\n        <_>\n          4 8 3 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 9 1 -1.</_>\n        <_>\n          3 9 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 2 -1.</_>\n        <_>\n          0 9 3 1 2.</_>\n        <_>\n          3 10 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 4 -1.</_>\n        <_>\n          4 2 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 2 3 -1.</_>\n        <_>\n          18 4 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 3 3 -1.</_>\n        <_>\n          6 17 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 6 3 -1.</_>\n        <_>\n          1 17 6 1 3.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_russian_plate_number.xml",
    "content": "<?xml version=\"1.0\"?>\n<opencv_storage>\n<cascade>\n  <stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>20</height>\n  <width>60</width>\n  <stageParams>\n    <boostType>GAB</boostType>\n    <minHitRate>9.9500000476837158e-001</minHitRate>\n    <maxFalseAlarm>5.0000000000000000e-001</maxFalseAlarm>\n    <weightTrimRate>9.4999999999999996e-001</weightTrimRate>\n    <maxDepth>1</maxDepth>\n    <maxWeakCount>100</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount>\n    <featSize>1</featSize>\n    <mode>ALL</mode></featureParams>\n  <stageNum>20</stageNum>\n  <stages>\n    <!-- stage 0 -->\n    <_>\n      <maxWeakCount>6</maxWeakCount>\n      <stageThreshold>-1.3110191822052002e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 193 1.0079263709485531e-002</internalNodes>\n          <leafValues>\n            -8.1339186429977417e-001 5.0277775526046753e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 -2.2060684859752655e-002</internalNodes>\n          <leafValues>\n            7.9418992996215820e-001 -5.0896102190017700e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 -4.8777908086776733e-002</internalNodes>\n          <leafValues>\n            7.1656656265258789e-001 -4.1640335321426392e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 1.0387318208813667e-002</internalNodes>\n          <leafValues>\n            3.7618312239646912e-001 -8.5504144430160522e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 -9.4083719886839390e-004</internalNodes>\n          <leafValues>\n            4.2658549547195435e-001 -5.7729166746139526e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 -8.2391249015927315e-003</internalNodes>\n          <leafValues>\n            8.2346975803375244e-001 -3.7503159046173096e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 1 -->\n    <_>\n      <maxWeakCount>6</maxWeakCount>\n      <stageThreshold>-1.1759783029556274e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 21 1.7386786639690399e-001</internalNodes>\n          <leafValues>\n            -6.8139964342117310e-001 6.0767590999603271e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -1.9797295331954956e-002</internalNodes>\n          <leafValues>\n            7.8072130680084229e-001 -4.4399836659431458e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 -1.0154811898246408e-003</internalNodes>\n          <leafValues>\n            3.3383268117904663e-001 -7.6357340812683105e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 2.4954911321401596e-002</internalNodes>\n          <leafValues>\n            -3.9979115128517151e-001 6.8620890378952026e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 2.8837744612246752e-003</internalNodes>\n          <leafValues>\n            -2.7928480505943298e-001 7.9980146884918213e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 -3.8839362561702728e-002</internalNodes>\n          <leafValues>\n            -7.8442335128784180e-001 3.4929576516151428e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 2 -->\n    <_>\n      <maxWeakCount>6</maxWeakCount>\n      <stageThreshold>-1.7856997251510620e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 34 2.7977079153060913e-002</internalNodes>\n          <leafValues>\n            -5.8424139022827148e-001 6.6850829124450684e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 1.9148588180541992e-002</internalNodes>\n          <leafValues>\n            -6.5457659959793091e-001 4.0804430842399597e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 1.1955041438341141e-002</internalNodes>\n          <leafValues>\n            -4.2002618312835693e-001 5.6217432022094727e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 -2.1218564361333847e-002</internalNodes>\n          <leafValues>\n            7.1812576055526733e-001 -3.0354043841362000e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 2.0117280655540526e-004</internalNodes>\n          <leafValues>\n            -6.1749500036239624e-001 3.5549193620681763e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 3.9725980604998767e-004</internalNodes>\n          <leafValues>\n            -2.6844096183776855e-001 7.6771658658981323e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 3 -->\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-1.1837021112442017e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 202 -1.3291766867041588e-002</internalNodes>\n          <leafValues>\n            4.5248869061470032e-001 -5.8849954605102539e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 -4.8353265970945358e-002</internalNodes>\n          <leafValues>\n            7.0951640605926514e-001 -3.2546108961105347e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 2.6532993651926517e-003</internalNodes>\n          <leafValues>\n            -2.5343564152717590e-001 7.6588714122772217e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 -3.8548894226551056e-002</internalNodes>\n          <leafValues>\n            5.8126109838485718e-001 -3.0813106894493103e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 -6.8602780811488628e-004</internalNodes>\n          <leafValues>\n            2.6361095905303955e-001 -7.2226840257644653e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 -2.5726919993758202e-002</internalNodes>\n          <leafValues>\n            -8.7153857946395874e-001 1.9438524544239044e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 8.4192806389182806e-004</internalNodes>\n          <leafValues>\n            -3.6150649189949036e-001 5.2065432071685791e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 -2.6956878136843443e-003</internalNodes>\n          <leafValues>\n            5.9945529699325562e-001 -2.8344830870628357e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 3.0572075396776199e-002</internalNodes>\n          <leafValues>\n            -3.0688971281051636e-001 5.7261526584625244e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 4 -->\n    <_>\n      <maxWeakCount>8</maxWeakCount>\n      <stageThreshold>-1.4687808752059937e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 5 3.1486168503761292e-002</internalNodes>\n          <leafValues>\n            -5.7836848497390747e-001 3.7931033968925476e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 2.8311354108154774e-003</internalNodes>\n          <leafValues>\n            -5.7888329029083252e-001 3.2841828465461731e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 -4.2060948908329010e-002</internalNodes>\n          <leafValues>\n            5.5578106641769409e-001 -3.2662427425384521e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 6.2936875037848949e-003</internalNodes>\n          <leafValues>\n            -2.1032968163490295e-001 7.8646916151046753e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 7.0570126175880432e-002</internalNodes>\n          <leafValues>\n            -4.3683132529258728e-001 4.0298295021057129e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 2.5173835456371307e-003</internalNodes>\n          <leafValues>\n            -2.0461565256118774e-001 8.2858163118362427e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 1.5648975968360901e-003</internalNodes>\n          <leafValues>\n            -2.4848082661628723e-001 6.0209411382675171e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 -3.5970686003565788e-003</internalNodes>\n          <leafValues>\n            2.3294737935066223e-001 -6.5612471103668213e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 5 -->\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-1.1029583215713501e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 27 -1.1257569491863251e-001</internalNodes>\n          <leafValues>\n            3.3181819319725037e-001 -5.3901344537734985e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 3.8014666642993689e-003</internalNodes>\n          <leafValues>\n            -3.6430206894874573e-001 4.5984184741973877e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 9.8789634648710489e-004</internalNodes>\n          <leafValues>\n            -2.6661416888237000e-001 5.6971323490142822e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 2.1719809621572495e-002</internalNodes>\n          <leafValues>\n            1.8432702124118805e-001 -8.2999354600906372e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 5.1051773130893707e-002</internalNodes>\n          <leafValues>\n            1.4391148090362549e-001 -9.4541704654693604e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 1.8956036074087024e-003</internalNodes>\n          <leafValues>\n            -6.0830104351043701e-001 2.6091885566711426e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 -5.8700828813016415e-003</internalNodes>\n          <leafValues>\n            6.9104760885238647e-001 -2.6916843652725220e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 -1.1522199492901564e-003</internalNodes>\n          <leafValues>\n            -6.9503885507583618e-001 2.4749211966991425e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 -5.1933946087956429e-003</internalNodes>\n          <leafValues>\n            5.8551025390625000e-001 -3.0389472842216492e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 6 -->\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-9.0274518728256226e-001</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 205 -1.4383997768163681e-002</internalNodes>\n          <leafValues>\n            4.5400592684745789e-001 -4.9917897582054138e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 -3.3369414508342743e-002</internalNodes>\n          <leafValues>\n            -9.3247985839843750e-001 1.4586758613586426e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 5.2380945999175310e-004</internalNodes>\n          <leafValues>\n            -2.8349643945693970e-001 6.4983856678009033e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 6.1231426661834121e-004</internalNodes>\n          <leafValues>\n            -1.8502233922481537e-001 6.5052211284637451e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 1.7017847858369350e-003</internalNodes>\n          <leafValues>\n            2.2008989751338959e-001 -7.2277534008026123e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 2.6139442343264818e-003</internalNodes>\n          <leafValues>\n            1.8238025903701782e-001 -7.6262325048446655e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 -2.0020073279738426e-003</internalNodes>\n          <leafValues>\n            5.6799399852752686e-001 -2.8219676017761230e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 1.9273828947916627e-003</internalNodes>\n          <leafValues>\n            -2.0913636684417725e-001 7.9203850030899048e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 -9.4476283993571997e-004</internalNodes>\n          <leafValues>\n            -8.2361942529678345e-001 2.4256958067417145e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 7 -->\n    <_>\n      <maxWeakCount>10</maxWeakCount>\n      <stageThreshold>-1.4518526792526245e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 162 1.6756314784288406e-002</internalNodes>\n          <leafValues>\n            -6.9359332323074341e-001 5.1373954862356186e-002</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 2.4082964286208153e-002</internalNodes>\n          <leafValues>\n            -3.3989402651786804e-001 4.5332714915275574e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 1.2284796684980392e-003</internalNodes>\n          <leafValues>\n            -2.2297365963459015e-001 6.1439812183380127e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 -1.4379122294485569e-003</internalNodes>\n          <leafValues>\n            -6.9444245100021362e-001 2.0446482300758362e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 -1.8713285680860281e-003</internalNodes>\n          <leafValues>\n            6.7942184209823608e-001 -2.7580419182777405e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 -4.7389674000442028e-003</internalNodes>\n          <leafValues>\n            -7.0437240600585938e-001 2.6915156841278076e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 7.4071279959753156e-004</internalNodes>\n          <leafValues>\n            -2.9220902919769287e-001 5.3538239002227783e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 -2.2739455103874207e-001</internalNodes>\n          <leafValues>\n            6.6916191577911377e-001 -2.1987228095531464e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 -1.0255509987473488e-003</internalNodes>\n          <leafValues>\n            6.3346290588378906e-001 -2.2717863321304321e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 2.4775355122983456e-003</internalNodes>\n          <leafValues>\n            -5.4297816753387451e-001 3.1877547502517700e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 8 -->\n    <_>\n      <maxWeakCount>11</maxWeakCount>\n      <stageThreshold>-1.3153649568557739e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 6 1.9131936132907867e-002</internalNodes>\n          <leafValues>\n            -6.0168600082397461e-001 1.9141913950443268e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 -4.5855185016989708e-003</internalNodes>\n          <leafValues>\n            2.1901632845401764e-001 -5.7136750221252441e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 -1.9026801455765963e-003</internalNodes>\n          <leafValues>\n            -8.0075079202651978e-001 1.6502076387405396e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 -3.2767035067081451e-002</internalNodes>\n          <leafValues>\n            5.1496404409408569e-001 -2.5474679470062256e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 6.3941581174731255e-004</internalNodes>\n          <leafValues>\n            -1.9851709902286530e-001 6.7218667268753052e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 1.5573646873235703e-002</internalNodes>\n          <leafValues>\n            -1.7564551532268524e-001 7.0536541938781738e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 9.5508026424795389e-004</internalNodes>\n          <leafValues>\n            -1.9691802561283112e-001 6.1125624179840088e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 9.0427603572607040e-003</internalNodes>\n          <leafValues>\n            1.6518253087997437e-001 -8.7012130022048950e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 8.1576988101005554e-002</internalNodes>\n          <leafValues>\n            1.4075902104377747e-001 -8.4871828556060791e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 -5.1994959358125925e-004</internalNodes>\n          <leafValues>\n            2.1803210675716400e-001 -5.4628211259841919e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 -2.3009868338704109e-002</internalNodes>\n          <leafValues>\n            -7.9586231708526611e-001 1.5989699959754944e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 9 -->\n    <_>\n      <maxWeakCount>13</maxWeakCount>\n      <stageThreshold>-1.4625015258789063e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1 2.6759501546621323e-002</internalNodes>\n          <leafValues>\n            -6.0482984781265259e-001 1.4906832575798035e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 3.0343931168317795e-002</internalNodes>\n          <leafValues>\n            -4.7357541322708130e-001 2.6279065012931824e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 1.2678599450737238e-003</internalNodes>\n          <leafValues>\n            -1.9493983685970306e-001 6.9734728336334229e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 1.8607920501381159e-003</internalNodes>\n          <leafValues>\n            1.5611934661865234e-001 -9.0542370080947876e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -1.3872641138732433e-003</internalNodes>\n          <leafValues>\n            5.3263407945632935e-001 -3.0192303657531738e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 -6.9969398900866508e-003</internalNodes>\n          <leafValues>\n            -9.4549953937530518e-001 1.5575224161148071e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 1.1245720088481903e-003</internalNodes>\n          <leafValues>\n            -2.6688691973686218e-001 5.5608308315277100e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 -2.8279949910938740e-003</internalNodes>\n          <leafValues>\n            -9.1861122846603394e-001 1.3309663534164429e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 7.1019242750480771e-004</internalNodes>\n          <leafValues>\n            -3.0977895855903625e-001 4.3846300244331360e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 -4.1933014988899231e-002</internalNodes>\n          <leafValues>\n            -8.9102542400360107e-001 1.5866196155548096e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 1.6568358987569809e-002</internalNodes>\n          <leafValues>\n            1.2731756269931793e-001 -8.5553413629531860e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 2.0309074316173792e-003</internalNodes>\n          <leafValues>\n            -2.3260365426540375e-001 6.7330485582351685e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 -1.7069760942831635e-003</internalNodes>\n          <leafValues>\n            -7.1925789117813110e-001 1.9108834862709045e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 10 -->\n    <_>\n      <maxWeakCount>14</maxWeakCount>\n      <stageThreshold>-1.4959813356399536e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 4 1.4695923775434494e-002</internalNodes>\n          <leafValues>\n            -6.2167906761169434e-001 2.1172638237476349e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 -1.6501215286552906e-003</internalNodes>\n          <leafValues>\n            1.9353884458541870e-001 -5.7780367136001587e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 7.0121872704476118e-004</internalNodes>\n          <leafValues>\n            -2.2979106009006500e-001 5.3033334016799927e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 9.4158272258937359e-004</internalNodes>\n          <leafValues>\n            1.6849038004875183e-001 -7.4897718429565430e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 -2.0684124901890755e-003</internalNodes>\n          <leafValues>\n            6.7936712503433228e-001 -1.9317412376403809e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 -1.8305826233699918e-004</internalNodes>\n          <leafValues>\n            -7.0275229215621948e-001 1.7971208691596985e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 5.5587477982044220e-004</internalNodes>\n          <leafValues>\n            -2.4448128044605255e-001 5.0703984498977661e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 4.3448276119306684e-004</internalNodes>\n          <leafValues>\n            1.3497908413410187e-001 -8.5621362924575806e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 -1.2359691318124533e-003</internalNodes>\n          <leafValues>\n            6.1710417270660400e-001 -2.2301279008388519e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 -6.9627340417355299e-004</internalNodes>\n          <leafValues>\n            -6.4706987142562866e-001 2.3951497673988342e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 1.0683680884540081e-003</internalNodes>\n          <leafValues>\n            -2.8343605995178223e-001 4.9318629503250122e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 1.7104238213505596e-004</internalNodes>\n          <leafValues>\n            -2.7171039581298828e-001 4.2520308494567871e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 8.2368971779942513e-003</internalNodes>\n          <leafValues>\n            1.6359315812587738e-001 -7.3864609003067017e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 -5.9884190559387207e-003</internalNodes>\n          <leafValues>\n            3.8030940294265747e-001 -3.0763563513755798e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 11 -->\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-1.1183819770812988e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 187 -1.4863962307572365e-002</internalNodes>\n          <leafValues>\n            1.1989101022481918e-001 -6.6138857603073120e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 2.4736612103879452e-003</internalNodes>\n          <leafValues>\n            -5.2778661251068115e-001 2.3012125492095947e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 -4.8899287357926369e-003</internalNodes>\n          <leafValues>\n            6.0186779499053955e-001 -2.0681641995906830e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 1.5796069055795670e-002</internalNodes>\n          <leafValues>\n            1.4610521495342255e-001 -8.2099527120590210e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 5.9720675926655531e-004</internalNodes>\n          <leafValues>\n            -2.3587301373481750e-001 4.8323699831962585e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 -1.9448818638920784e-003</internalNodes>\n          <leafValues>\n            6.4417767524719238e-001 -2.0953170955181122e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 1.9433414854574949e-004</internalNodes>\n          <leafValues>\n            2.0600238442420959e-001 -7.2418999671936035e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 -1.5097535215318203e-002</internalNodes>\n          <leafValues>\n            -8.7151485681533813e-001 1.2594890594482422e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 -3.9843879640102386e-003</internalNodes>\n          <leafValues>\n            4.3801131844520569e-001 -2.9676589369773865e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 12 -->\n    <_>\n      <maxWeakCount>12</maxWeakCount>\n      <stageThreshold>-1.5434337854385376e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 105 1.1273270938545465e-003</internalNodes>\n          <leafValues>\n            -4.7976878285408020e-001 3.6627906560897827e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 9.7806821577250957e-004</internalNodes>\n          <leafValues>\n            -2.7689707279205322e-001 5.1295894384384155e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 1.6528377309441566e-002</internalNodes>\n          <leafValues>\n            -4.5259797573089600e-001 2.4290211498737335e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 1.1040373938158154e-003</internalNodes>\n          <leafValues>\n            -3.2714816927909851e-001 3.4566244482994080e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 -1.7780361231416464e-003</internalNodes>\n          <leafValues>\n            -6.9511681795120239e-001 1.8829824030399323e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 4.6280334936454892e-004</internalNodes>\n          <leafValues>\n            -2.3864887654781342e-001 5.3136289119720459e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 -1.4975425438024104e-004</internalNodes>\n          <leafValues>\n            -6.6509884595870972e-001 2.1483559906482697e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 -1.4625370968133211e-003</internalNodes>\n          <leafValues>\n            2.6556470990180969e-001 -4.9002227187156677e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -2.6019819779321551e-004</internalNodes>\n          <leafValues>\n            -7.0160359144210815e-001 1.6359129548072815e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 2.2371641534846276e-004</internalNodes>\n          <leafValues>\n            1.2919521331787109e-001 -6.9767206907272339e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 -1.0447315871715546e-002</internalNodes>\n          <leafValues>\n            2.1837629377841949e-001 -4.6482038497924805e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 -9.2897024005651474e-003</internalNodes>\n          <leafValues>\n            6.4918082952499390e-001 -2.0495061576366425e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 13 -->\n    <_>\n      <maxWeakCount>12</maxWeakCount>\n      <stageThreshold>-1.4440233707427979e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 9 8.5356216877698898e-003</internalNodes>\n          <leafValues>\n            -5.3151458501815796e-001 2.2357723116874695e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 1.5294685726985335e-003</internalNodes>\n          <leafValues>\n            -6.0895460844039917e-001 1.7429886758327484e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 1.8610086990520358e-003</internalNodes>\n          <leafValues>\n            -2.5480428338050842e-001 4.2150071263313293e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 1.5735558699816465e-003</internalNodes>\n          <leafValues>\n            -1.6832062602043152e-001 4.8567819595336914e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 -6.7992787808179855e-004</internalNodes>\n          <leafValues>\n            3.9894598722457886e-001 -3.0744269490242004e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 4.9857296049594879e-002</internalNodes>\n          <leafValues>\n            -1.5370152890682220e-001 6.7523348331451416e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -2.8339058160781860e-002</internalNodes>\n          <leafValues>\n            5.0540882349014282e-001 -2.9473617672920227e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 -7.7956825494766235e-002</internalNodes>\n          <leafValues>\n            4.0387043356895447e-001 -3.0287107825279236e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 -3.6115488037467003e-003</internalNodes>\n          <leafValues>\n            6.3856112957000732e-001 -1.6917882859706879e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 3.3940275898203254e-004</internalNodes>\n          <leafValues>\n            1.3713537156581879e-001 -7.8120291233062744e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 4.0043061599135399e-003</internalNodes>\n          <leafValues>\n            1.5233094990253448e-001 -6.3939732313156128e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 -4.4601649278774858e-004</internalNodes>\n          <leafValues>\n            2.1333815157413483e-001 -4.7728902101516724e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 14 -->\n    <_>\n      <maxWeakCount>13</maxWeakCount>\n      <stageThreshold>-1.2532578706741333e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 204 -2.0341124385595322e-002</internalNodes>\n          <leafValues>\n            2.4170616269111633e-001 -4.9161517620086670e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 8.9040049351751804e-004</internalNodes>\n          <leafValues>\n            -2.8570893406867981e-001 4.2666998505592346e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 -3.3259526826441288e-003</internalNodes>\n          <leafValues>\n            4.2626520991325378e-001 -2.3811897635459900e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 -3.1714607030153275e-002</internalNodes>\n          <leafValues>\n            -8.5494768619537354e-001 1.1712870001792908e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 -1.1553820222616196e-002</internalNodes>\n          <leafValues>\n            2.2675493359565735e-001 -4.9640509486198425e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 -6.7727260291576385e-002</internalNodes>\n          <leafValues>\n            -8.6705064773559570e-001 9.8765812814235687e-002</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 -3.1611192971467972e-003</internalNodes>\n          <leafValues>\n            3.9449846744537354e-001 -2.8210711479187012e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 4.3221906526014209e-004</internalNodes>\n          <leafValues>\n            1.1805476248264313e-001 -9.0178310871124268e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -2.2296360111795366e-004</internalNodes>\n          <leafValues>\n            1.7324598133563995e-001 -5.2877873182296753e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 -2.1440195851027966e-003</internalNodes>\n          <leafValues>\n            5.5513423681259155e-001 -1.9791823625564575e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 -4.5122690498828888e-003</internalNodes>\n          <leafValues>\n            5.5083745718002319e-001 -1.8810540437698364e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 -3.5149464383721352e-003</internalNodes>\n          <leafValues>\n            5.5467557907104492e-001 -2.2856147587299347e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 -4.4786706566810608e-003</internalNodes>\n          <leafValues>\n            -7.9106998443603516e-001 1.7836479842662811e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 15 -->\n    <_>\n      <maxWeakCount>15</maxWeakCount>\n      <stageThreshold>-1.1898330450057983e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 1.5206767246127129e-002</internalNodes>\n          <leafValues>\n            -4.9173194169998169e-001 2.7093595266342163e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 6.9564773002639413e-004</internalNodes>\n          <leafValues>\n            -2.3066598176956177e-001 5.4028344154357910e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 -8.3668017759919167e-004</internalNodes>\n          <leafValues>\n            4.4658055901527405e-001 -2.7778497338294983e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 -3.8321319967508316e-002</internalNodes>\n          <leafValues>\n            -7.9069298505783081e-001 1.8700349330902100e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 -2.1063965687062591e-004</internalNodes>\n          <leafValues>\n            -6.3163763284683228e-001 1.8656146526336670e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 3.6907330155372620e-002</internalNodes>\n          <leafValues>\n            9.9319733679294586e-002 -7.6762360334396362e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 8.1071127206087112e-003</internalNodes>\n          <leafValues>\n            -2.8561261296272278e-001 3.4748569130897522e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 6.2815943965688348e-004</internalNodes>\n          <leafValues>\n            1.6656193137168884e-001 -5.4635977745056152e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 2.8582263621501625e-004</internalNodes>\n          <leafValues>\n            -2.4100163578987122e-001 4.5410770177841187e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 -1.9862279295921326e-002</internalNodes>\n          <leafValues>\n            -9.4317340850830078e-001 1.2513674795627594e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 1.1506280861794949e-003</internalNodes>\n          <leafValues>\n            -2.4514634907245636e-001 4.6452957391738892e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 2.3451185552403331e-004</internalNodes>\n          <leafValues>\n            1.2489952147006989e-001 -8.0278074741363525e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 6.7837134702131152e-004</internalNodes>\n          <leafValues>\n            -2.5017899274826050e-001 4.3841627240180969e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 3.1583159579895437e-004</internalNodes>\n          <leafValues>\n            1.5951988101005554e-001 -7.4524724483489990e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 7.2623658925294876e-003</internalNodes>\n          <leafValues>\n            1.2511830031871796e-001 -6.5659755468368530e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 16 -->\n    <_>\n      <maxWeakCount>15</maxWeakCount>\n      <stageThreshold>-1.2416906356811523e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2 7.5144092552363873e-003</internalNodes>\n          <leafValues>\n            -5.9518074989318848e-001 5.3793102502822876e-002</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -6.4494344405829906e-004</internalNodes>\n          <leafValues>\n            2.0429474115371704e-001 -4.3661779165267944e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 3.3831471228040755e-004</internalNodes>\n          <leafValues>\n            -2.1566553413867950e-001 4.7118204832077026e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 2.8320802375674248e-003</internalNodes>\n          <leafValues>\n            1.3322307169437408e-001 -8.3729231357574463e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 1.6218879027292132e-003</internalNodes>\n          <leafValues>\n            -2.0889574289321899e-001 4.7114694118499756e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 2.7122153551317751e-004</internalNodes>\n          <leafValues>\n            1.1475630849599838e-001 -7.8029519319534302e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 8.8358242064714432e-003</internalNodes>\n          <leafValues>\n            1.2460929155349731e-001 -7.6791721582412720e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 9.7634072881191969e-004</internalNodes>\n          <leafValues>\n            -2.0806105434894562e-001 5.1318311691284180e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 -2.1239042282104492e-002</internalNodes>\n          <leafValues>\n            -8.7171542644500732e-001 1.2721680104732513e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 7.1797124110162258e-004</internalNodes>\n          <leafValues>\n            -3.0763280391693115e-001 3.7504923343658447e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 2.7504155412316322e-002</internalNodes>\n          <leafValues>\n            1.5651945769786835e-001 -7.9516488313674927e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 1.0624636197462678e-003</internalNodes>\n          <leafValues>\n            1.3473348319530487e-001 -6.9174814224243164e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -8.1248432397842407e-002</internalNodes>\n          <leafValues>\n            -8.5117286443710327e-001 1.0601779073476791e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 -2.2936165332794189e-002</internalNodes>\n          <leafValues>\n            3.9202499389648438e-001 -2.9867398738861084e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -1.3326616026461124e-003</internalNodes>\n          <leafValues>\n            4.7240665555000305e-001 -2.6287403702735901e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 17 -->\n    <_>\n      <maxWeakCount>13</maxWeakCount>\n      <stageThreshold>-1.3383979797363281e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 3 3.2254494726657867e-002</internalNodes>\n          <leafValues>\n            -6.5151512622833252e-001 7.9947575926780701e-002</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 -1.1810796568170190e-003</internalNodes>\n          <leafValues>\n            2.5173431634902954e-001 -4.5536977052688599e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 8.0361258005723357e-004</internalNodes>\n          <leafValues>\n            -2.1178695559501648e-001 4.9318632483482361e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 6.6201295703649521e-004</internalNodes>\n          <leafValues>\n            -1.9441033899784088e-001 4.6225026249885559e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 3.4565184614621103e-004</internalNodes>\n          <leafValues>\n            -2.1175089478492737e-001 4.6985754370689392e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 -5.6433549616485834e-004</internalNodes>\n          <leafValues>\n            -7.9713624715805054e-001 1.8714086711406708e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 5.8492692187428474e-004</internalNodes>\n          <leafValues>\n            -3.9330720901489258e-001 2.4242231249809265e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 2.5043603032827377e-002</internalNodes>\n          <leafValues>\n            1.3490234315395355e-001 -7.5923883914947510e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 -1.8510785885155201e-003</internalNodes>\n          <leafValues>\n            4.1279399394989014e-001 -2.7271771430969238e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -2.5741360150277615e-004</internalNodes>\n          <leafValues>\n            -6.3662034273147583e-001 1.8135882914066315e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 -1.5121832489967346e-002</internalNodes>\n          <leafValues>\n            2.5249326229095459e-001 -3.8438034057617188e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 -1.5006031841039658e-002</internalNodes>\n          <leafValues>\n            -8.4878319501876831e-001 1.1718367785215378e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 4.9880752339959145e-004</internalNodes>\n          <leafValues>\n            -2.6755046844482422e-001 4.5769825577735901e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 18 -->\n    <_>\n      <maxWeakCount>12</maxWeakCount>\n      <stageThreshold>-1.2097512483596802e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 195 -1.1614991351962090e-002</internalNodes>\n          <leafValues>\n            1.4465409517288208e-001 -5.9521216154098511e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 3.9767110138200223e-004</internalNodes>\n          <leafValues>\n            -4.2697989940643311e-001 2.4382311105728149e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 -4.6969857066869736e-002</internalNodes>\n          <leafValues>\n            -9.3969690799713135e-001 1.2196484953165054e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 5.5550434626638889e-004</internalNodes>\n          <leafValues>\n            -1.8246935307979584e-001 6.5156191587448120e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 2.9468833236023784e-004</internalNodes>\n          <leafValues>\n            1.5099152922630310e-001 -7.8840750455856323e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 1.2439775280654430e-002</internalNodes>\n          <leafValues>\n            1.4981375634670258e-001 -7.5917595624923706e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 6.6337559837847948e-004</internalNodes>\n          <leafValues>\n            -2.5185841321945190e-001 5.9387433528900146e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 -6.8454549182206392e-004</internalNodes>\n          <leafValues>\n            5.1199448108673096e-001 -2.5247576832771301e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 1.4808592386543751e-003</internalNodes>\n          <leafValues>\n            2.2439701855182648e-001 -5.8184891939163208e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 6.0307271778583527e-003</internalNodes>\n          <leafValues>\n            -4.3553912639617920e-001 2.8183382749557495e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 -1.9170897081494331e-002</internalNodes>\n          <leafValues>\n            -8.5707378387451172e-001 1.4850790798664093e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 3.0278289341367781e-004</internalNodes>\n          <leafValues>\n            -3.1547480821609497e-001 4.1798374056816101e-001</leafValues></_></weakClassifiers></_>\n    <!-- stage 19 -->\n    <_>\n      <maxWeakCount>10</maxWeakCount>\n      <stageThreshold>-1.2253109216690063e+000</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 181 4.6847470104694366e-002</internalNodes>\n          <leafValues>\n            -4.9239391088485718e-001 5.2287584543228149e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 2.2181579843163490e-003</internalNodes>\n          <leafValues>\n            -4.2569425702095032e-001 3.6892616748809814e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 6.1082182219251990e-004</internalNodes>\n          <leafValues>\n            1.7654621601104736e-001 -8.2656937837600708e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 1.7401995137333870e-002</internalNodes>\n          <leafValues>\n            2.7770876884460449e-001 -5.6393522024154663e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 5.2314018830657005e-004</internalNodes>\n          <leafValues>\n            -3.6257097125053406e-001 4.6126455068588257e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 2.1581796463578939e-003</internalNodes>\n          <leafValues>\n            1.9110183417797089e-001 -6.8012320995330811e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 -1.3209994649514556e-003</internalNodes>\n          <leafValues>\n            6.7618584632873535e-001 -2.6087108254432678e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 -1.2237254530191422e-002</internalNodes>\n          <leafValues>\n            -5.7184767723083496e-001 3.0778104066848755e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 8.7829465046525002e-003</internalNodes>\n          <leafValues>\n            1.6890920698642731e-001 -7.8835797309875488e-001</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 7.5588272884488106e-003</internalNodes>\n          <leafValues>\n            1.5143942832946777e-001 -8.2572847604751587e-001</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          0 0 10 10 -1.</_>\n        <_>\n          0 0 5 5 2.</_>\n        <_>\n          5 5 5 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 16 -1.</_>\n        <_>\n          6 0 6 16 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 10 6 -1.</_>\n        <_>\n          5 3 5 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 21 16 -1.</_>\n        <_>\n          7 3 7 16 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 16 9 -1.</_>\n        <_>\n          4 4 8 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 10 12 -1.</_>\n        <_>\n          5 4 5 12 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 14 7 -1.</_>\n        <_>\n          7 7 7 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 7 -1.</_>\n        <_>\n          6 9 6 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 60 3 -1.</_>\n        <_>\n          30 9 30 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 8 3 -1.</_>\n        <_>\n          4 10 4 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 1 2 -1.</_>\n        <_>\n          0 12 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 51 12 -1.</_>\n        <_>\n          1 4 51 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 3 15 7 -1.</_>\n        <_>\n          6 3 5 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 7 30 6 -1.</_>\n        <_>\n          1 7 15 3 2.</_>\n        <_>\n          16 10 15 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 12 1 2 -1.</_>\n        <_>\n          1 13 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 16 -1.</_>\n        <_>\n          2 6 18 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 3 29 4 -1.</_>\n        <_>\n          2 5 29 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 1 2 -1.</_>\n        <_>\n          2 10 1 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 14 40 6 -1.</_>\n        <_>\n          2 17 40 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 22 6 -1.</_>\n        <_>\n          3 2 22 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 2 38 2 -1.</_>\n        <_>\n          3 2 19 1 2.</_>\n        <_>\n          22 3 19 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 51 16 -1.</_>\n        <_>\n          3 8 51 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 7 3 8 -1.</_>\n        <_>\n          4 7 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 1 3 -1.</_>\n        <_>\n          3 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 3 5 -1.</_>\n        <_>\n          5 8 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 4 9 -1.</_>\n        <_>\n          5 8 2 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 36 9 -1.</_>\n        <_>\n          16 11 12 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 14 49 6 -1.</_>\n        <_>\n          4 17 49 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 17 6 -1.</_>\n        <_>\n          5 2 17 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 1 -1.</_>\n        <_>\n          6 1 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 1 8 2 -1.</_>\n        <_>\n          7 1 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 36 9 -1.</_>\n        <_>\n          17 2 12 9 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 3 33 17 -1.</_>\n        <_>\n          16 3 11 17 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 30 19 -1.</_>\n        <_>\n          16 0 10 19 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 29 4 -1.</_>\n        <_>\n          6 5 29 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 16 16 -1.</_>\n        <_>\n          14 4 8 16 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 54 1 -1.</_>\n        <_>\n          33 9 27 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 18 -1.</_>\n        <_>\n          8 0 2 18 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 12 15 -1.</_>\n        <_>\n          13 3 6 15 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 20 5 -1.</_>\n        <_>\n          12 4 10 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 3 -1.</_>\n        <_>\n          7 5 6 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 36 6 -1.</_>\n        <_>\n          19 4 12 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 28 4 -1.</_>\n        <_>\n          14 5 14 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 11 -1.</_>\n        <_>\n          8 7 2 11 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 12 7 -1.</_>\n        <_>\n          13 9 6 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 21 4 -1.</_>\n        <_>\n          8 3 21 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 28 6 -1.</_>\n        <_>\n          15 4 14 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 8 38 6 -1.</_>\n        <_>\n          8 10 38 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 14 25 4 -1.</_>\n        <_>\n          8 15 25 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 12 4 -1.</_>\n        <_>\n          12 2 6 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 24 3 -1.</_>\n        <_>\n          15 5 12 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 8 40 12 -1.</_>\n        <_>\n          9 12 40 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 2 8 2 -1.</_>\n        <_>\n          12 2 4 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 2 9 2 -1.</_>\n        <_>\n          13 2 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 5 3 3 -1.</_>\n        <_>\n          11 6 1 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 32 20 -1.</_>\n        <_>\n          19 0 16 20 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 1 4 -1.</_>\n        <_>\n          11 5 1 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 3 -1.</_>\n        <_>\n          12 9 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 9 3 7 -1.</_>\n        <_>\n          12 9 1 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 9 2 -1.</_>\n        <_>\n          15 3 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 6 -1.</_>\n        <_>\n          14 6 2 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 10 42 10 -1.</_>\n        <_>\n          26 10 14 10 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 14 11 3 -1.</_>\n        <_>\n          12 15 11 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 14 -1.</_>\n        <_>\n          15 4 2 14 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 6 -1.</_>\n        <_>\n          14 8 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 11 32 2 -1.</_>\n        <_>\n          21 11 16 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 13 25 6 -1.</_>\n        <_>\n          13 16 25 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 16 21 3 -1.</_>\n        <_>\n          20 16 7 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 2 3 2 -1.</_>\n        <_>\n          15 2 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 2 24 8 -1.</_>\n        <_>\n          20 2 12 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 13 36 6 -1.</_>\n        <_>\n          23 13 18 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 14 8 3 -1.</_>\n        <_>\n          14 15 8 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 14 45 6 -1.</_>\n        <_>\n          14 17 45 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 18 9 2 -1.</_>\n        <_>\n          17 18 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 9 4 1 -1.</_>\n        <_>\n          16 9 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 10 19 4 -1.</_>\n        <_>\n          15 12 19 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 28 8 -1.</_>\n        <_>\n          16 2 28 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 2 36 18 -1.</_>\n        <_>\n          28 2 12 18 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 6 24 6 -1.</_>\n        <_>\n          22 6 12 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 1 24 6 -1.</_>\n        <_>\n          17 3 24 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 3 15 12 -1.</_>\n        <_>\n          22 7 5 4 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 15 11 3 -1.</_>\n        <_>\n          17 16 11 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 5 6 10 -1.</_>\n        <_>\n          20 5 2 10 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 6 18 3 -1.</_>\n        <_>\n          24 6 6 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 11 3 1 -1.</_>\n        <_>\n          19 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 6 32 2 -1.</_>\n        <_>\n          27 6 16 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 8 3 1 -1.</_>\n        <_>\n          20 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 9 14 11 -1.</_>\n        <_>\n          26 9 7 11 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 10 3 3 -1.</_>\n        <_>\n          20 10 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 13 7 3 -1.</_>\n        <_>\n          19 14 7 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 14 13 3 -1.</_>\n        <_>\n          19 15 13 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 0 15 20 -1.</_>\n        <_>\n          25 0 5 20 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 9 3 1 -1.</_>\n        <_>\n          21 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 10 3 2 -1.</_>\n        <_>\n          21 10 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 1 21 6 -1.</_>\n        <_>\n          21 3 21 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 8 4 3 -1.</_>\n        <_>\n          22 8 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 9 3 4 -1.</_>\n        <_>\n          22 9 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 10 4 2 -1.</_>\n        <_>\n          22 10 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 11 24 2 -1.</_>\n        <_>\n          27 11 12 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 18 4 1 -1.</_>\n        <_>\n          22 18 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 3 4 1 -1.</_>\n        <_>\n          23 3 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 6 2 6 -1.</_>\n        <_>\n          22 6 1 3 2.</_>\n        <_>\n          23 9 1 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 7 3 3 -1.</_>\n        <_>\n          23 8 1 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 8 3 5 -1.</_>\n        <_>\n          23 8 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 9 3 2 -1.</_>\n        <_>\n          23 9 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          23 8 3 3 -1.</_>\n        <_>\n          24 8 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          23 10 3 2 -1.</_>\n        <_>\n          24 10 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          24 3 20 17 -1.</_>\n        <_>\n          29 3 10 17 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          24 4 14 6 -1.</_>\n        <_>\n          31 4 7 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          24 18 9 2 -1.</_>\n        <_>\n          27 18 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          25 5 8 4 -1.</_>\n        <_>\n          25 5 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          25 6 22 14 -1.</_>\n        <_>\n          36 6 11 14 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          25 12 28 8 -1.</_>\n        <_>\n          25 14 28 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          25 14 9 3 -1.</_>\n        <_>\n          25 15 9 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          26 2 27 18 -1.</_>\n        <_>\n          35 2 9 18 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          26 3 22 3 -1.</_>\n        <_>\n          26 4 22 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          26 4 8 4 -1.</_>\n        <_>\n          30 4 4 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          26 4 20 6 -1.</_>\n        <_>\n          31 4 10 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          26 7 1 12 -1.</_>\n        <_>\n          22 11 1 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          26 9 3 3 -1.</_>\n        <_>\n          27 9 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          26 13 9 3 -1.</_>\n        <_>\n          26 14 9 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          27 3 15 6 -1.</_>\n        <_>\n          32 3 5 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          27 9 3 1 -1.</_>\n        <_>\n          28 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          27 9 3 2 -1.</_>\n        <_>\n          28 9 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          27 10 3 3 -1.</_>\n        <_>\n          28 10 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          27 11 3 2 -1.</_>\n        <_>\n          28 11 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          28 2 10 4 -1.</_>\n        <_>\n          28 2 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          28 8 32 6 -1.</_>\n        <_>\n          28 10 32 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          28 10 3 1 -1.</_>\n        <_>\n          29 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          28 11 3 1 -1.</_>\n        <_>\n          29 11 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          28 15 5 4 -1.</_>\n        <_>\n          28 16 5 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          28 16 23 4 -1.</_>\n        <_>\n          28 17 23 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          28 19 6 1 -1.</_>\n        <_>\n          30 19 2 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          29 3 9 4 -1.</_>\n        <_>\n          32 3 3 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          29 5 9 1 -1.</_>\n        <_>\n          32 5 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          29 8 3 6 -1.</_>\n        <_>\n          30 8 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          29 9 3 1 -1.</_>\n        <_>\n          30 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          29 11 10 4 -1.</_>\n        <_>\n          29 13 10 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          29 11 26 8 -1.</_>\n        <_>\n          29 13 26 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          30 0 16 6 -1.</_>\n        <_>\n          30 3 16 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          30 2 30 6 -1.</_>\n        <_>\n          30 2 15 3 2.</_>\n        <_>\n          45 5 15 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          30 3 9 4 -1.</_>\n        <_>\n          33 3 3 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          30 5 9 4 -1.</_>\n        <_>\n          30 6 9 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          30 10 3 2 -1.</_>\n        <_>\n          31 10 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          30 14 18 6 -1.</_>\n        <_>\n          36 14 6 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          31 3 4 3 -1.</_>\n        <_>\n          32 3 2 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          31 7 4 9 -1.</_>\n        <_>\n          32 7 2 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          31 11 3 2 -1.</_>\n        <_>\n          32 11 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          31 11 3 3 -1.</_>\n        <_>\n          32 11 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          32 4 3 2 -1.</_>\n        <_>\n          33 4 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          32 6 18 6 -1.</_>\n        <_>\n          32 6 9 3 2.</_>\n        <_>\n          41 9 9 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          33 1 22 6 -1.</_>\n        <_>\n          33 4 22 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          33 3 4 2 -1.</_>\n        <_>\n          34 3 2 2 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          33 3 4 4 -1.</_>\n        <_>\n          34 3 2 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          33 5 4 1 -1.</_>\n        <_>\n          34 5 2 1 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          33 9 3 6 -1.</_>\n        <_>\n          34 9 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          33 10 3 3 -1.</_>\n        <_>\n          34 10 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          34 8 4 7 -1.</_>\n        <_>\n          35 8 2 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          34 9 3 5 -1.</_>\n        <_>\n          35 9 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          34 18 9 2 -1.</_>\n        <_>\n          37 18 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          35 0 8 6 -1.</_>\n        <_>\n          37 0 4 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          35 9 3 2 -1.</_>\n        <_>\n          36 9 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          36 9 24 9 -1.</_>\n        <_>\n          42 9 12 9 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          37 1 16 18 -1.</_>\n        <_>\n          41 1 8 18 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          37 11 20 8 -1.</_>\n        <_>\n          42 11 10 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          38 8 15 12 -1.</_>\n        <_>\n          38 12 15 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          39 6 12 8 -1.</_>\n        <_>\n          45 6 6 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          40 8 8 4 -1.</_>\n        <_>\n          40 8 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          40 10 3 1 -1.</_>\n        <_>\n          41 10 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          40 10 3 5 -1.</_>\n        <_>\n          41 10 1 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          40 13 12 6 -1.</_>\n        <_>\n          43 13 6 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          41 5 7 15 -1.</_>\n        <_>\n          41 10 7 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          41 6 12 6 -1.</_>\n        <_>\n          45 6 4 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          41 7 12 7 -1.</_>\n        <_>\n          45 7 4 7 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          41 8 12 12 -1.</_>\n        <_>\n          45 8 4 12 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          41 9 3 6 -1.</_>\n        <_>\n          42 9 1 6 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          42 2 3 13 -1.</_>\n        <_>\n          43 2 1 13 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          42 4 18 10 -1.</_>\n        <_>\n          42 4 9 5 2.</_>\n        <_>\n          51 9 9 5 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          42 5 18 8 -1.</_>\n        <_>\n          42 5 9 4 2.</_>\n        <_>\n          51 9 9 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          42 7 2 7 -1.</_>\n        <_>\n          43 7 1 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          42 14 12 5 -1.</_>\n        <_>\n          46 14 4 5 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          43 1 10 9 -1.</_>\n        <_>\n          40 4 10 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          43 6 6 6 -1.</_>\n        <_>\n          43 9 6 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          44 0 8 20 -1.</_>\n        <_>\n          46 0 4 20 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          44 2 16 12 -1.</_>\n        <_>\n          44 2 8 6 2.</_>\n        <_>\n          52 8 8 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          44 5 3 8 -1.</_>\n        <_>\n          45 5 1 8 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          44 8 3 4 -1.</_>\n        <_>\n          45 8 1 4 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          44 12 16 4 -1.</_>\n        <_>\n          52 12 8 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          44 13 10 3 -1.</_>\n        <_>\n          49 13 5 3 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          45 19 9 1 -1.</_>\n        <_>\n          48 19 3 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          46 3 8 8 -1.</_>\n        <_>\n          50 3 4 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          47 12 10 6 -1.</_>\n        <_>\n          52 12 5 6 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          48 0 4 13 -1.</_>\n        <_>\n          49 0 2 13 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          48 5 3 12 -1.</_>\n        <_>\n          45 8 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          48 9 12 8 -1.</_>\n        <_>\n          54 9 6 8 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          48 13 12 4 -1.</_>\n        <_>\n          54 13 6 4 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          49 8 3 1 -1.</_>\n        <_>\n          50 8 1 1 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          49 8 3 2 -1.</_>\n        <_>\n          50 8 1 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          49 8 3 3 -1.</_>\n        <_>\n          50 8 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          50 9 3 3 -1.</_>\n        <_>\n          51 10 1 1 9.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          51 8 3 3 -1.</_>\n        <_>\n          52 8 1 3 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          52 6 6 10 -1.</_>\n        <_>\n          54 6 2 10 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          52 7 8 7 -1.</_>\n        <_>\n          56 7 4 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          52 8 8 4 -1.</_>\n        <_>\n          52 8 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          54 3 6 15 -1.</_>\n        <_>\n          57 3 3 15 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          54 8 6 7 -1.</_>\n        <_>\n          57 8 3 7 2.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          57 11 3 6 -1.</_>\n        <_>\n          57 13 3 2 3.</_></rects>\n      <tilted>0</tilted></_>\n    <_>\n      <rects>\n        <_>\n          59 8 1 3 -1.</_>\n        <_>\n          59 9 1 1 3.</_></rects>\n      <tilted>0</tilted></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_smile.xml",
    "content": "<?xml version=\"1.0\"?>\n<!----------------------------------------------------------------------------\n  Smile detector\n  Contributed by Oscar Deniz Suarez\n  More information can be found at http://visilab.etsii.uclm.es/personas/oscar/oscar.html\n\n//////////////////////////////////////////////////////////////////////////\n| Contributors License Agreement\n| IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n|   By downloading, copying, installing or using the software you agree\n|   to this license.\n|   If you do not agree to this license, do not download, install,\n|   copy or use the software.\n|\n| Copyright (c) 2011, Modesto Castrillon-Santana (IUSIANI, Universidad de\n| Las Palmas de Gran Canaria, Spain).\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\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|    * The name of Contributor may not used to endorse or promote products\n|      derived 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\n| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n| PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n| PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n| LIABILITY, 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.  Back to\n| Top\n//////////////////////////////////////////////////////////////////////////\n\n------------------------------------------------------------------------>\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>18</height>\n  <width>36</width>\n  <stageParams>\n    <maxWeakCount>53</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>20</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>11</maxWeakCount>\n      <stageThreshold>-1.2678639888763428e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 -4.8783610691316426e-04</internalNodes>\n          <leafValues>\n            5.9219348430633545e-01 -4.4163608551025391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 -4.2209611274302006e-04</internalNodes>\n          <leafValues>\n            3.0318650603294373e-01 -3.2912918925285339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 -4.9940118333324790e-04</internalNodes>\n          <leafValues>\n            4.8563310503959656e-01 -4.2923060059547424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3 3.7289198487997055e-02</internalNodes>\n          <leafValues>\n            -2.8667300939559937e-01 5.9979999065399170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 1.4334049774333835e-03</internalNodes>\n          <leafValues>\n            -3.4893131256103516e-01 4.0482750535011292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 -7.7213020995259285e-03</internalNodes>\n          <leafValues>\n            7.5714188814163208e-01 -1.2225949764251709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 8.1067271530628204e-03</internalNodes>\n          <leafValues>\n            -1.6657720506191254e-01 7.5096148252487183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 -7.7238711528480053e-03</internalNodes>\n          <leafValues>\n            6.2662792205810547e-01 -1.9127459824085236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 4.4225031160749495e-04</internalNodes>\n          <leafValues>\n            -2.3944470286369324e-01 4.4840618968009949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 -1.6867710510268807e-03</internalNodes>\n          <leafValues>\n            -1.8439069390296936e-01 9.1782413423061371e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 1.4625620096921921e-02</internalNodes>\n          <leafValues>\n            1.6168059408664703e-01 -8.1501179933547974e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>11</maxWeakCount>\n      <stageThreshold>-1.5844069719314575e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 11 3.8141138851642609e-02</internalNodes>\n          <leafValues>\n            -3.3275881409645081e-01 7.7833342552185059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 -1.3136120105627924e-04</internalNodes>\n          <leafValues>\n            3.6353090405464172e-01 -3.2043468952178955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 -3.8757019210606813e-03</internalNodes>\n          <leafValues>\n            7.1352392435073853e-01 -3.5185989737510681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 1.4266290236264467e-03</internalNodes>\n          <leafValues>\n            6.8100847303867340e-02 -6.1727327108383179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 -2.4605958606116474e-04</internalNodes>\n          <leafValues>\n            5.7271498441696167e-01 -3.7860998511314392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 -3.1822640448808670e-02</internalNodes>\n          <leafValues>\n            -6.3484561443328857e-01 1.1641839891672134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 -1.7130950465798378e-02</internalNodes>\n          <leafValues>\n            -6.2793147563934326e-01 3.2479470968246460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 -9.3903783708810806e-03</internalNodes>\n          <leafValues>\n            -2.7578958868980408e-01 2.2330729663372040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 2.2802520543336868e-03</internalNodes>\n          <leafValues>\n            1.8977640569210052e-01 -6.8817621469497681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 2.6840099599212408e-03</internalNodes>\n          <leafValues>\n            -2.2350500524044037e-01 1.3725799322128296e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 1.0604639537632465e-02</internalNodes>\n          <leafValues>\n            -2.1426230669021606e-01 5.6207871437072754e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>17</maxWeakCount>\n      <stageThreshold>-1.3820559978485107e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 22 -3.1677199876867235e-04</internalNodes>\n          <leafValues>\n            4.6595481038093567e-01 -3.7425819039344788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 -5.5120628327131271e-02</internalNodes>\n          <leafValues>\n            5.4179787635803223e-01 -2.2657650709152222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 -6.4742640824988484e-04</internalNodes>\n          <leafValues>\n            3.7703070044517517e-01 -3.3486440777778625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 3.9507839083671570e-01</internalNodes>\n          <leafValues>\n            -1.8144419789314270e-01 8.1325918436050415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 4.0509410202503204e-02</internalNodes>\n          <leafValues>\n            -9.5369413495063782e-02 8.0595618486404419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 4.8735421150922775e-03</internalNodes>\n          <leafValues>\n            -1.4023660123348236e-01 6.1643028259277344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 1.0578040033578873e-02</internalNodes>\n          <leafValues>\n            1.2932670116424561e-01 -7.4823349714279175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 9.2986393719911575e-03</internalNodes>\n          <leafValues>\n            5.8940600603818893e-02 -4.4107300043106079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 -5.0301607698202133e-03</internalNodes>\n          <leafValues>\n            -6.6309732198715210e-01 1.8104769289493561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 -1.0947990085696802e-04</internalNodes>\n          <leafValues>\n            2.2112590074539185e-01 -2.7309039235115051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 -1.1685509979724884e-01</internalNodes>\n          <leafValues>\n            -7.7205967903137207e-01 1.2481659650802612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -4.3603649828583002e-05</internalNodes>\n          <leafValues>\n            1.3670609891414642e-01 -1.6127939522266388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -1.5056360280141234e-04</internalNodes>\n          <leafValues>\n            4.4860461354255676e-01 -2.1711289882659912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 -1.6394609585404396e-02</internalNodes>\n          <leafValues>\n            -6.5827351808547974e-01 1.6745500266551971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 -1.4482860453426838e-02</internalNodes>\n          <leafValues>\n            -6.8345147371292114e-01 1.3456159830093384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 3.9269471017178148e-05</internalNodes>\n          <leafValues>\n            -1.4998139441013336e-01 1.6017720103263855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 7.4323131702840328e-03</internalNodes>\n          <leafValues>\n            -1.6848459839820862e-01 5.3963989019393921e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>18</maxWeakCount>\n      <stageThreshold>-1.3879380226135254e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 39 -4.3472499237395823e-04</internalNodes>\n          <leafValues>\n            4.3949240446090698e-01 -4.2248758673667908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 3.2995320856571198e-02</internalNodes>\n          <leafValues>\n            -1.9798250496387482e-01 5.9534871578216553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 -4.1011828579939902e-04</internalNodes>\n          <leafValues>\n            4.4403061270713806e-01 -3.0748468637466431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 -8.1969738006591797e-02</internalNodes>\n          <leafValues>\n            -5.3334367275238037e-01 1.6718100011348724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 1.7778700217604637e-02</internalNodes>\n          <leafValues>\n            -2.0450179278850555e-01 5.1444131135940552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 2.2834699600934982e-02</internalNodes>\n          <leafValues>\n            -1.4846070110797882e-01 5.6242787837982178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 3.8604341447353363e-02</internalNodes>\n          <leafValues>\n            -1.2731470167636871e-01 8.1494480371475220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 -7.3286908445879817e-04</internalNodes>\n          <leafValues>\n            -3.7193441390991211e-01 6.7616499960422516e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 -2.3229040205478668e-02</internalNodes>\n          <leafValues>\n            7.1232062578201294e-01 -1.1589390039443970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 -1.9575359299778938e-02</internalNodes>\n          <leafValues>\n            -6.8990731239318848e-01 1.3999509811401367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 4.1991271427832544e-04</internalNodes>\n          <leafValues>\n            -1.8354649841785431e-01 4.9435558915138245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 -5.7089749723672867e-02</internalNodes>\n          <leafValues>\n            6.2607848644256592e-01 -7.8576847910881042e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 2.5699699297547340e-02</internalNodes>\n          <leafValues>\n            1.1557140201330185e-01 -8.1935191154479980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 3.2579619437456131e-02</internalNodes>\n          <leafValues>\n            -1.1767739802598953e-01 4.2776221036911011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 -2.0592249929904938e-02</internalNodes>\n          <leafValues>\n            4.8685240745544434e-01 -2.1318539977073669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 -1.7485279589891434e-02</internalNodes>\n          <leafValues>\n            -5.2287340164184570e-01 1.3397049903869629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 8.9153228327631950e-04</internalNodes>\n          <leafValues>\n            9.6304491162300110e-02 -6.8863070011138916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 5.7533901184797287e-02</internalNodes>\n          <leafValues>\n            -8.7080523371696472e-02 4.0480649471282959e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>25</maxWeakCount>\n      <stageThreshold>-1.3538850545883179e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 57 -4.6606198884546757e-04</internalNodes>\n          <leafValues>\n            4.2773741483688354e-01 -3.5420769453048706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 3.0554559826850891e-01</internalNodes>\n          <leafValues>\n            -1.6392810642719269e-01 8.6065232753753662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 -1.1449400335550308e-02</internalNodes>\n          <leafValues>\n            5.9727329015731812e-01 -2.3234340548515320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 6.3891541212797165e-03</internalNodes>\n          <leafValues>\n            -1.2915410101413727e-01 6.1052042245864868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 -8.4334248676896095e-03</internalNodes>\n          <leafValues>\n            4.7928538918495178e-01 -1.9002729654312134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 5.3808931261301041e-02</internalNodes>\n          <leafValues>\n            -1.1493770033121109e-01 5.3394538164138794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 -4.7580219688825309e-04</internalNodes>\n          <leafValues>\n            -3.4598541259765625e-01 2.5488048791885376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 -1.3450840197037905e-04</internalNodes>\n          <leafValues>\n            2.2414590418338776e-01 -1.9550070166587830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 5.0016911700367928e-04</internalNodes>\n          <leafValues>\n            -1.9720549881458282e-01 4.9677640199661255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 1.5063269995152950e-02</internalNodes>\n          <leafValues>\n            1.0630770027637482e-01 -4.1138210892677307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 7.7588870190083981e-03</internalNodes>\n          <leafValues>\n            -1.5373119711875916e-01 4.8931619524955750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 4.5410118997097015e-02</internalNodes>\n          <leafValues>\n            -7.3559306561946869e-02 2.7737921476364136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 -1.4599669724702835e-02</internalNodes>\n          <leafValues>\n            -7.0966827869415283e-01 9.7515560686588287e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 1.7236070707440376e-02</internalNodes>\n          <leafValues>\n            1.6869539394974709e-02 -5.7388329505920410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 1.4230710454285145e-02</internalNodes>\n          <leafValues>\n            9.4714500010013580e-02 -7.8395259380340576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 -4.3706860393285751e-02</internalNodes>\n          <leafValues>\n            6.0979652404785156e-01 -1.5601889789104462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 -6.2343222089111805e-04</internalNodes>\n          <leafValues>\n            3.4851190447807312e-01 -2.1704910695552826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 1.9245050847530365e-02</internalNodes>\n          <leafValues>\n            -1.1710979789495468e-01 3.0701160430908203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 2.7035778760910034e-01</internalNodes>\n          <leafValues>\n            -9.0096436440944672e-02 7.6656961441040039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 -3.5394480801187456e-04</internalNodes>\n          <leafValues>\n            -2.0024789869785309e-01 1.2493360042572021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 -3.6013960838317871e-02</internalNodes>\n          <leafValues>\n            6.7028558254241943e-01 -1.0571879893541336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 9.2952791601419449e-03</internalNodes>\n          <leafValues>\n            -1.0574710369110107e-01 4.5093879103660583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 -3.3304709359072149e-04</internalNodes>\n          <leafValues>\n            2.7933821082115173e-01 -2.4576769769191742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 -2.9147620807634667e-05</internalNodes>\n          <leafValues>\n            8.5813812911510468e-02 -9.5469586551189423e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 4.4382669148035347e-04</internalNodes>\n          <leafValues>\n            -2.0220080018043518e-01 5.4543578624725342e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>23</maxWeakCount>\n      <stageThreshold>-1.3707510232925415e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 82 7.9610757529735565e-03</internalNodes>\n          <leafValues>\n            -3.6722078919410706e-01 4.3154349923133850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 6.3394829630851746e-02</internalNodes>\n          <leafValues>\n            -2.0739710330963135e-01 5.7426017522811890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 -5.3193349391222000e-02</internalNodes>\n          <leafValues>\n            7.2550922632217407e-01 -1.4342020452022552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 1.5460769645869732e-02</internalNodes>\n          <leafValues>\n            -9.6053816378116608e-02 7.5785237550735474e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 -1.7643140628933907e-02</internalNodes>\n          <leafValues>\n            6.6815620660781860e-01 -1.4176729321479797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 9.5065636560320854e-03</internalNodes>\n          <leafValues>\n            -9.6259742975234985e-02 4.6996331214904785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 4.0446049533784389e-03</internalNodes>\n          <leafValues>\n            -1.9732519984245300e-01 4.2838010191917419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 3.2312041148543358e-03</internalNodes>\n          <leafValues>\n            1.1861690133810043e-01 -6.1039632558822632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 -4.0159050375223160e-02</internalNodes>\n          <leafValues>\n            -4.1664341092109680e-01 2.1672329306602478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 2.8524258732795715e-01</internalNodes>\n          <leafValues>\n            -1.0435750335454941e-01 8.5733968019485474e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 -4.9264221452176571e-03</internalNodes>\n          <leafValues>\n            4.7060468792915344e-01 -1.3997459411621094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 1.3781700283288956e-02</internalNodes>\n          <leafValues>\n            -1.2713569402694702e-01 4.4618919491767883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 -4.9873598618432879e-04</internalNodes>\n          <leafValues>\n            4.7026631236076355e-01 -1.5483739972114563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 -1.5621389320585877e-04</internalNodes>\n          <leafValues>\n            1.8854810297489166e-01 -7.7839776873588562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 -3.7597760092467070e-04</internalNodes>\n          <leafValues>\n            5.7697701454162598e-01 -1.3356220722198486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -1.0665910318493843e-02</internalNodes>\n          <leafValues>\n            -4.1065299510955811e-01 1.5562120079994202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -3.4135230816900730e-03</internalNodes>\n          <leafValues>\n            -7.6363432407379150e-01 1.0209649801254272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 5.6471868447260931e-05</internalNodes>\n          <leafValues>\n            -1.6443930566310883e-01 2.2908419370651245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 2.1611599368043244e-04</internalNodes>\n          <leafValues>\n            -1.6290329396724701e-01 4.5756360888481140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 -1.0822719894349575e-02</internalNodes>\n          <leafValues>\n            -2.4462530016899109e-01 1.3888940215110779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 -1.5084910206496716e-02</internalNodes>\n          <leafValues>\n            -5.7813477516174316e-01 1.1564119905233383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 2.5715960189700127e-02</internalNodes>\n          <leafValues>\n            3.9631199091672897e-02 -6.5270012617111206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 2.6093570049852133e-03</internalNodes>\n          <leafValues>\n            1.1421889811754227e-01 -5.6801080703735352e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>26</maxWeakCount>\n      <stageThreshold>-1.3303329944610596e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 105 -5.1861900836229324e-02</internalNodes>\n          <leafValues>\n            7.0431172847747803e-01 -2.2143700718879700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 -5.0341628491878510e-02</internalNodes>\n          <leafValues>\n            -4.6397829055786133e-01 2.8047460317611694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 2.5709730386734009e-01</internalNodes>\n          <leafValues>\n            -1.3124279677867889e-01 8.2395941019058228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 1.1031899601221085e-02</internalNodes>\n          <leafValues>\n            -1.4258140325546265e-01 6.3823902606964111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 1.8565090373158455e-02</internalNodes>\n          <leafValues>\n            -1.5123879909515381e-01 5.9881192445755005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 1.7502350732684135e-02</internalNodes>\n          <leafValues>\n            -1.2619799375534058e-01 3.8178038597106934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 7.2723729535937309e-03</internalNodes>\n          <leafValues>\n            -1.5103289484977722e-01 5.8128422498703003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 8.1504750996828079e-03</internalNodes>\n          <leafValues>\n            -6.5464757382869720e-02 5.6397551298141479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 -1.8552739173173904e-02</internalNodes>\n          <leafValues>\n            5.3157097101211548e-01 -1.2526570260524750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 -2.3101480677723885e-02</internalNodes>\n          <leafValues>\n            -6.7949390411376953e-01 1.1046259850263596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -1.8539339362177998e-04</internalNodes>\n          <leafValues>\n            3.0100038647651672e-01 -2.1206699311733246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 1.7319120466709137e-02</internalNodes>\n          <leafValues>\n            -9.3738131225109100e-02 2.1008560061454773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 1.4305620454251766e-02</internalNodes>\n          <leafValues>\n            1.8005949258804321e-01 -3.9776718616485596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 2.5763340294361115e-02</internalNodes>\n          <leafValues>\n            8.7056998163461685e-03 -6.2894952297210693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 -1.5383340418338776e-02</internalNodes>\n          <leafValues>\n            -5.3415471315383911e-01 1.0380730032920837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 1.0605469578877091e-03</internalNodes>\n          <leafValues>\n            -9.0128518640995026e-02 1.6792120039463043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 3.5230729263275862e-03</internalNodes>\n          <leafValues>\n            -1.7110690474510193e-01 3.2596540451049805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 -1.0789279825985432e-02</internalNodes>\n          <leafValues>\n            3.6109921336174011e-01 -6.6339150071144104e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 2.7950939536094666e-01</internalNodes>\n          <leafValues>\n            -7.4605897068977356e-02 7.3369878530502319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 3.8369540125131607e-03</internalNodes>\n          <leafValues>\n            4.4873539358377457e-02 -1.8602700531482697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 1.6195949865505099e-03</internalNodes>\n          <leafValues>\n            -1.3922490179538727e-01 4.3437001109123230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 1.1647949926555157e-02</internalNodes>\n          <leafValues>\n            -7.4357591569423676e-02 5.4201442003250122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -5.9066400863230228e-03</internalNodes>\n          <leafValues>\n            -7.0557588338851929e-01 8.6433619260787964e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 3.9686840772628784e-01</internalNodes>\n          <leafValues>\n            -7.4898369610309601e-02 9.4062858819961548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 5.7663779705762863e-02</internalNodes>\n          <leafValues>\n            -9.6558406949043274e-02 5.4182428121566772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 6.0319568961858749e-02</internalNodes>\n          <leafValues>\n            -6.6501073539257050e-02 6.4023548364639282e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>37</maxWeakCount>\n      <stageThreshold>-1.5300060510635376e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 131 1.9050249829888344e-02</internalNodes>\n          <leafValues>\n            -4.4433408975601196e-01 4.3948569893836975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 -2.0198300480842590e-02</internalNodes>\n          <leafValues>\n            -3.1706219911575317e-01 1.0432930290699005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 2.1478030830621719e-02</internalNodes>\n          <leafValues>\n            -3.5024839639663696e-01 2.6355370879173279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 -1.0187759995460510e-01</internalNodes>\n          <leafValues>\n            -5.9889578819274902e-01 1.7685799300670624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 1.0974160395562649e-02</internalNodes>\n          <leafValues>\n            -1.4895239472389221e-01 6.0115218162536621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 -1.1476710438728333e-02</internalNodes>\n          <leafValues>\n            4.0665709972381592e-01 -1.2404689937829971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 -2.3431150242686272e-02</internalNodes>\n          <leafValues>\n            -7.1487832069396973e-01 1.4278119802474976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 1.4963559806346893e-03</internalNodes>\n          <leafValues>\n            -1.7045859992504120e-01 1.7193080484867096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -5.4855772759765387e-04</internalNodes>\n          <leafValues>\n            3.1553238630294800e-01 -2.1444450318813324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 7.4912630021572113e-02</internalNodes>\n          <leafValues>\n            9.1240562498569489e-02 -6.3951212167739868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 6.8816398270428181e-03</internalNodes>\n          <leafValues>\n            -1.4904409646987915e-01 4.7952368855476379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 -3.8212578743696213e-02</internalNodes>\n          <leafValues>\n            5.2887737751007080e-01 -6.1894729733467102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 4.4051730073988438e-03</internalNodes>\n          <leafValues>\n            -1.1934129893779755e-01 5.0613421201705933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 2.3966899141669273e-02</internalNodes>\n          <leafValues>\n            -8.9720509946346283e-02 3.3152779936790466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 -3.4162990748882294e-02</internalNodes>\n          <leafValues>\n            5.3134781122207642e-01 -1.4666500687599182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 1.9642219413071871e-03</internalNodes>\n          <leafValues>\n            9.0783588588237762e-02 -4.3032559752464294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 9.6757910796441138e-05</internalNodes>\n          <leafValues>\n            2.2552539408206940e-01 -2.8220710158348083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 -3.2862399239093065e-03</internalNodes>\n          <leafValues>\n            4.0515020489692688e-01 -1.1776199936866760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 1.1688309721648693e-02</internalNodes>\n          <leafValues>\n            -9.1857127845287323e-02 6.2834888696670532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 -6.0287420637905598e-03</internalNodes>\n          <leafValues>\n            3.9261808991432190e-01 -1.2287150323390961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 -1.3721340335905552e-02</internalNodes>\n          <leafValues>\n            -5.5298799276351929e-01 9.1041281819343567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 7.5626641511917114e-02</internalNodes>\n          <leafValues>\n            -4.4929590076208115e-02 1.7442759871482849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 9.3434482812881470e-02</internalNodes>\n          <leafValues>\n            -8.4593951702117920e-02 6.0131162405014038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 5.8748829178512096e-03</internalNodes>\n          <leafValues>\n            -4.4131498783826828e-02 3.9565709233283997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 4.0064537897706032e-03</internalNodes>\n          <leafValues>\n            -1.1414399743080139e-01 3.7925380468368530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 2.2945459932088852e-02</internalNodes>\n          <leafValues>\n            2.4673189967870712e-02 -4.1521999239921570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -1.2810460291802883e-02</internalNodes>\n          <leafValues>\n            -5.1557427644729614e-01 9.1319613158702850e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 2.0425529778003693e-01</internalNodes>\n          <leafValues>\n            -6.5927542746067047e-02 7.5942492485046387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 4.9796327948570251e-03</internalNodes>\n          <leafValues>\n            1.0806279629468918e-01 -5.0016272068023682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 2.8397630900144577e-02</internalNodes>\n          <leafValues>\n            -3.7152960896492004e-02 5.4010647535324097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 6.0867150314152241e-03</internalNodes>\n          <leafValues>\n            -1.1978609859943390e-01 3.5692268610000610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -2.1456899412441999e-04</internalNodes>\n          <leafValues>\n            1.8740150332450867e-01 -8.8417202234268188e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 2.8941858909092844e-04</internalNodes>\n          <leafValues>\n            -1.2597979605197906e-01 3.9982271194458008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 -1.3047619722783566e-03</internalNodes>\n          <leafValues>\n            1.5499970316886902e-01 -7.5386047363281250e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 -1.2975010089576244e-02</internalNodes>\n          <leafValues>\n            -5.5344110727310181e-01 8.2354247570037842e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 7.7442410401999950e-03</internalNodes>\n          <leafValues>\n            2.7699800208210945e-02 -3.4835991263389587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 2.4850629270076752e-03</internalNodes>\n          <leafValues>\n            -1.2976129353046417e-01 3.7908831238746643e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>21</maxWeakCount>\n      <stageThreshold>-1.4114329814910889e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 168 -4.0386881679296494e-02</internalNodes>\n          <leafValues>\n            5.9603548049926758e-01 -3.5741761326789856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 -6.6068649175576866e-05</internalNodes>\n          <leafValues>\n            4.4628980755805969e-01 -3.5959470272064209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 3.7622239906340837e-03</internalNodes>\n          <leafValues>\n            1.7947019636631012e-01 -7.5631511211395264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 -3.0967719852924347e-02</internalNodes>\n          <leafValues>\n            -2.8847050666809082e-01 7.6870530843734741e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 3.0566560104489326e-02</internalNodes>\n          <leafValues>\n            1.4003600180149078e-01 -7.1755367517471313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 9.9054910242557526e-04</internalNodes>\n          <leafValues>\n            8.2915589213371277e-02 -2.9197171330451965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 1.2577700428664684e-02</internalNodes>\n          <leafValues>\n            1.5380719304084778e-01 -4.6882930397987366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 1.2392920255661011e-01</internalNodes>\n          <leafValues>\n            -9.0823858976364136e-02 7.3837572336196899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 3.7737488746643066e-01</internalNodes>\n          <leafValues>\n            -5.4232951253652573e-02 9.2291218042373657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 1.0996370017528534e-01</internalNodes>\n          <leafValues>\n            9.1596268117427826e-02 -6.5977168083190918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 -1.2721329694613814e-03</internalNodes>\n          <leafValues>\n            3.3475750684738159e-01 -1.8290689587593079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 4.6906251460313797e-02</internalNodes>\n          <leafValues>\n            -8.3971053361892700e-02 6.9847589731216431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 3.2869930146262050e-04</internalNodes>\n          <leafValues>\n            1.8794630467891693e-01 -2.9290059208869934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 1.7333080177195370e-04</internalNodes>\n          <leafValues>\n            -2.6964160799980164e-01 3.4947571158409119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 1.9800959154963493e-02</internalNodes>\n          <leafValues>\n            -1.4679229259490967e-01 4.3995618820190430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 2.0056760695297271e-04</internalNodes>\n          <leafValues>\n            -1.3727410137653351e-01 2.2213310003280640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 -1.4923149719834328e-03</internalNodes>\n          <leafValues>\n            3.4735259413719177e-01 -1.5948210656642914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 -4.2736999603221193e-05</internalNodes>\n          <leafValues>\n            3.1527870893478394e-01 -2.3066949844360352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 6.6625140607357025e-04</internalNodes>\n          <leafValues>\n            -2.0131100714206696e-01 2.8691890835762024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 1.3850460163666867e-05</internalNodes>\n          <leafValues>\n            -2.0219239592552185e-01 2.3073309659957886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 4.0972631424665451e-02</internalNodes>\n          <leafValues>\n            7.9543180763721466e-02 -8.0795639753341675e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>23</maxWeakCount>\n      <stageThreshold>-1.3777890205383301e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 189 -4.6982929110527039e-02</internalNodes>\n          <leafValues>\n            7.0822530984878540e-01 -3.7034240365028381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 -7.5753079727292061e-04</internalNodes>\n          <leafValues>\n            -1.2550309300422668e-01 1.3944420218467712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 1.5327299945056438e-02</internalNodes>\n          <leafValues>\n            2.1613539755344391e-01 -5.6293952465057373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 1.8147040158510208e-02</internalNodes>\n          <leafValues>\n            -3.2079648226499557e-02 3.2347559928894043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 4.7347191721200943e-02</internalNodes>\n          <leafValues>\n            -1.7381580173969269e-01 5.7580447196960449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 -5.9837941080331802e-02</internalNodes>\n          <leafValues>\n            4.7797870635986328e-01 -1.0260280221700668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 -5.2796799689531326e-02</internalNodes>\n          <leafValues>\n            -4.7988489270210266e-01 1.8787759542465210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 -2.4385429918766022e-02</internalNodes>\n          <leafValues>\n            -3.0841669440269470e-01 8.7605630978941917e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 2.5288300588726997e-02</internalNodes>\n          <leafValues>\n            1.3914039731025696e-01 -7.1094942092895508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 -2.1612450480461121e-02</internalNodes>\n          <leafValues>\n            -2.3282539844512939e-01 8.0994680523872375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 3.4023479092866182e-03</internalNodes>\n          <leafValues>\n            -2.2989900410175323e-01 3.7889510393142700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 1.1274600028991699e-01</internalNodes>\n          <leafValues>\n            -1.5474709682166576e-02 5.7030540704727173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 3.4516870975494385e-02</internalNodes>\n          <leafValues>\n            -1.2300080060958862e-01 5.6775367259979248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 7.8984811902046204e-02</internalNodes>\n          <leafValues>\n            -1.4242169260978699e-01 4.6941858530044556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 -1.5377859584987164e-02</internalNodes>\n          <leafValues>\n            6.3946861028671265e-01 -1.1236190050840378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 -2.2373620595317334e-04</internalNodes>\n          <leafValues>\n            5.5583298206329346e-01 -2.7247580885887146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 -2.4762390181422234e-02</internalNodes>\n          <leafValues>\n            -5.0404858589172363e-01 1.4077790081501007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 -9.4061157142277807e-05</internalNodes>\n          <leafValues>\n            3.7195280194282532e-01 -2.2502990067005157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 -2.0256359130144119e-02</internalNodes>\n          <leafValues>\n            5.1051008701324463e-01 -1.4298759400844574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 4.8122879117727280e-02</internalNodes>\n          <leafValues>\n            -6.6979512572288513e-02 3.6622309684753418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 -2.3787800222635269e-02</internalNodes>\n          <leafValues>\n            5.0813251733779907e-01 -1.2908150255680084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -1.0520319920033216e-03</internalNodes>\n          <leafValues>\n            -1.5604670345783234e-01 6.6213317215442657e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 -2.6640200521796942e-03</internalNodes>\n          <leafValues>\n            -7.2545582056045532e-01 8.2365453243255615e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>25</maxWeakCount>\n      <stageThreshold>-1.3266400098800659e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 212 -5.0224620848894119e-02</internalNodes>\n          <leafValues>\n            7.0845657587051392e-01 -2.5585499405860901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 1.4072869904339314e-02</internalNodes>\n          <leafValues>\n            6.3033178448677063e-02 -5.9838529676198959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 1.7804009839892387e-02</internalNodes>\n          <leafValues>\n            1.9414719939231873e-01 -5.8444267511367798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 1.3046739995479584e-01</internalNodes>\n          <leafValues>\n            -1.1516980081796646e-01 8.5040301084518433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 1.7506800591945648e-02</internalNodes>\n          <leafValues>\n            -2.0718969404697418e-01 4.6438288688659668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 -7.4240020476281643e-03</internalNodes>\n          <leafValues>\n            -6.6565167903900146e-01 1.4034989476203918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 -3.4571118652820587e-02</internalNodes>\n          <leafValues>\n            6.5112978219985962e-01 -1.4901919662952423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 4.2270249687135220e-03</internalNodes>\n          <leafValues>\n            -1.6027219826355577e-03 3.8956061005592346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 -5.0662040710449219e-02</internalNodes>\n          <leafValues>\n            5.8035767078399658e-01 -1.5141439437866211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 -7.0715770125389099e-03</internalNodes>\n          <leafValues>\n            5.3008967638015747e-01 -1.4498309791088104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 -1.1863510124385357e-02</internalNodes>\n          <leafValues>\n            6.7297422885894775e-01 -1.1063549667596817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 -6.0520030558109283e-02</internalNodes>\n          <leafValues>\n            -3.3164489269256592e-01 2.1195560693740845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 -7.7340779826045036e-03</internalNodes>\n          <leafValues>\n            -6.9414401054382324e-01 7.2705313563346863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 -3.2486140727996826e-02</internalNodes>\n          <leafValues>\n            -5.1850819587707520e-01 5.9212621301412582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 8.3279706537723541e-02</internalNodes>\n          <leafValues>\n            1.2067940086126328e-01 -5.3095632791519165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 7.8782817581668496e-04</internalNodes>\n          <leafValues>\n            -2.7376559376716614e-01 2.7162519097328186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 -1.7539180815219879e-02</internalNodes>\n          <leafValues>\n            -5.6902301311492920e-01 1.2287370115518570e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 -5.8226347900927067e-03</internalNodes>\n          <leafValues>\n            4.3865859508514404e-01 -1.4937420189380646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 -1.0057560168206692e-02</internalNodes>\n          <leafValues>\n            -6.6168862581253052e-01 1.1445429921150208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 9.0345427393913269e-02</internalNodes>\n          <leafValues>\n            -6.6665247082710266e-02 2.8706479072570801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 -6.7587293684482574e-02</internalNodes>\n          <leafValues>\n            -5.3637611865997314e-01 1.1237519979476929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 -8.1747528165578842e-03</internalNodes>\n          <leafValues>\n            4.4342419505119324e-01 -1.2977659702301025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 -1.1550550349056721e-02</internalNodes>\n          <leafValues>\n            3.2731580734252930e-01 -1.7007610201835632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 -1.7406829283572733e-04</internalNodes>\n          <leafValues>\n            1.3278679549694061e-01 -1.0812939703464508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 4.6040047891438007e-03</internalNodes>\n          <leafValues>\n            -1.2265820056200027e-01 4.4125801324844360e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>17</maxWeakCount>\n      <stageThreshold>-1.4497200250625610e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 237 -4.6943280845880508e-02</internalNodes>\n          <leafValues>\n            6.0943442583084106e-01 -2.6378008723258972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 -1.6899159527383745e-04</internalNodes>\n          <leafValues>\n            1.6658750176429749e-01 -1.2541960179805756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 2.7983370237052441e-03</internalNodes>\n          <leafValues>\n            1.9057449698448181e-01 -6.5680772066116333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 4.0413960814476013e-03</internalNodes>\n          <leafValues>\n            -1.7317469418048859e-01 6.3620752096176147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -8.6033362895250320e-03</internalNodes>\n          <leafValues>\n            6.0258418321609497e-01 -2.3169369995594025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 8.8247945532202721e-03</internalNodes>\n          <leafValues>\n            -1.7565830051898956e-01 7.1041667461395264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 -9.2786159366369247e-03</internalNodes>\n          <leafValues>\n            -6.8908572196960449e-01 1.7896500229835510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 6.0826768167316914e-03</internalNodes>\n          <leafValues>\n            -1.7063720524311066e-01 5.3757482767105103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 -3.9007369428873062e-02</internalNodes>\n          <leafValues>\n            -6.8346357345581055e-01 1.4417080581188202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 -7.0337951183319092e-02</internalNodes>\n          <leafValues>\n            -6.5085667371749878e-01 1.0085479915142059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 3.3166699111461639e-02</internalNodes>\n          <leafValues>\n            -1.9325719773769379e-01 4.7798651456832886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 7.5288906693458557e-02</internalNodes>\n          <leafValues>\n            -6.9567732512950897e-02 4.1250649094581604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 -7.0501729846000671e-02</internalNodes>\n          <leafValues>\n            7.1573007106781006e-01 -1.0222700238227844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 1.2249490246176720e-02</internalNodes>\n          <leafValues>\n            -1.0612429678440094e-01 6.2959581613540649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 7.0644676685333252e-02</internalNodes>\n          <leafValues>\n            -9.7374632954597473e-02 6.7622041702270508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 1.6248880326747894e-01</internalNodes>\n          <leafValues>\n            5.2713360637426376e-02 -8.4946572780609131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 1.3808250427246094e-01</internalNodes>\n          <leafValues>\n            1.4064790308475494e-01 -4.7647210955619812e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>20</maxWeakCount>\n      <stageThreshold>-1.4622910022735596e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 254 -4.1882339864969254e-02</internalNodes>\n          <leafValues>\n            -8.0774527788162231e-01 2.6409670710563660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 -5.3622990846633911e-02</internalNodes>\n          <leafValues>\n            5.5807042121887207e-01 -2.4989689886569977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 9.3709938228130341e-03</internalNodes>\n          <leafValues>\n            2.6501700282096863e-01 -5.9906947612762451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 1.3909730128943920e-02</internalNodes>\n          <leafValues>\n            -1.4709180593490601e-01 7.3546671867370605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 1.9003570079803467e-02</internalNodes>\n          <leafValues>\n            -1.8875110149383545e-01 7.4874222278594971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 5.9199850074946880e-03</internalNodes>\n          <leafValues>\n            -1.5995639562606812e-01 5.6735777854919434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 -2.4705139920115471e-02</internalNodes>\n          <leafValues>\n            7.5569921731948853e-01 -1.2350880354642868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 1.6058359295129776e-02</internalNodes>\n          <leafValues>\n            -1.2824609875679016e-01 5.1294547319412231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 8.8288700208067894e-03</internalNodes>\n          <leafValues>\n            -1.6866639256477356e-01 6.1521852016448975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 1.7556339502334595e-02</internalNodes>\n          <leafValues>\n            -1.0901699960231781e-01 5.8031761646270752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 4.2188119143247604e-02</internalNodes>\n          <leafValues>\n            1.4866240322589874e-01 -6.9222331047058105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 5.0687207840383053e-04</internalNodes>\n          <leafValues>\n            3.1580869108438492e-02 -3.7009951472282410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 2.7651190757751465e-03</internalNodes>\n          <leafValues>\n            -2.1337540447711945e-01 4.7043010592460632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 -1.2231520377099514e-03</internalNodes>\n          <leafValues>\n            -7.8189671039581299e-01 2.0954260602593422e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 8.5432287305593491e-03</internalNodes>\n          <leafValues>\n            -1.4553520083427429e-01 6.7895042896270752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 -2.0657219283748418e-04</internalNodes>\n          <leafValues>\n            2.4376240372657776e-01 -6.7558802664279938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 -4.6798270195722580e-03</internalNodes>\n          <leafValues>\n            6.6841697692871094e-01 -1.3887880742549896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 1.2201759964227676e-01</internalNodes>\n          <leafValues>\n            1.1028160154819489e-01 -7.5307422876358032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 2.0404340699315071e-02</internalNodes>\n          <leafValues>\n            1.6453839838504791e-01 -5.2231621742248535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 8.0343370791524649e-04</internalNodes>\n          <leafValues>\n            -1.3012850284576416e-01 2.6358529925346375e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>28</maxWeakCount>\n      <stageThreshold>-1.3885619640350342e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 274 7.2791710495948792e-02</internalNodes>\n          <leafValues>\n            -1.3727900385856628e-01 8.2915747165679932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 7.5939209200441837e-03</internalNodes>\n          <leafValues>\n            -1.6780120134353638e-01 5.6839722394943237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 -2.3562390357255936e-02</internalNodes>\n          <leafValues>\n            6.5005600452423096e-01 -1.4245350658893585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 1.7392950132489204e-02</internalNodes>\n          <leafValues>\n            -1.5291449427604675e-01 3.4253540635108948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 7.1825802326202393e-02</internalNodes>\n          <leafValues>\n            -9.9131137132644653e-02 8.2796788215637207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 1.3673800043761730e-02</internalNodes>\n          <leafValues>\n            -4.1787270456552505e-02 5.0781482458114624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 -2.8585959225893021e-02</internalNodes>\n          <leafValues>\n            7.0115321874618530e-01 -1.3144710659980774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 -4.1845720261335373e-04</internalNodes>\n          <leafValues>\n            2.8454670310020447e-01 -3.1232029199600220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 -5.2095681428909302e-02</internalNodes>\n          <leafValues>\n            4.1812941431999207e-01 -1.6993130743503571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 3.2256329432129860e-03</internalNodes>\n          <leafValues>\n            -9.0466208755970001e-02 3.0086231231689453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 3.4771639853715897e-02</internalNodes>\n          <leafValues>\n            -8.4216788411140442e-02 7.8016638755798340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 -1.3356630224734545e-03</internalNodes>\n          <leafValues>\n            3.3164530992507935e-01 -1.6960920393466949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 2.5101980566978455e-01</internalNodes>\n          <leafValues>\n            -1.3920469582080841e-01 6.6338932514190674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -9.9689997732639313e-03</internalNodes>\n          <leafValues>\n            -3.7138170003890991e-01 1.2900120019912720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 1.4303729869425297e-02</internalNodes>\n          <leafValues>\n            1.5729199349880219e-01 -5.0938212871551514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -7.0856059901416302e-03</internalNodes>\n          <leafValues>\n            4.6567910909652710e-01 -6.6270820796489716e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 -4.6260809176601470e-04</internalNodes>\n          <leafValues>\n            2.9337310791015625e-01 -2.3339860141277313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 -3.4435480833053589e-02</internalNodes>\n          <leafValues>\n            7.0024740695953369e-01 -1.0133510082960129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 -7.2570890188217163e-03</internalNodes>\n          <leafValues>\n            -5.6286412477493286e-01 1.3148620724678040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 4.8352940939366817e-04</internalNodes>\n          <leafValues>\n            2.6227489113807678e-02 -2.6050800085067749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 -1.2999939732253551e-02</internalNodes>\n          <leafValues>\n            5.3117001056671143e-01 -1.2023050338029861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 -1.0009329998865724e-03</internalNodes>\n          <leafValues>\n            3.9641299843788147e-01 -1.5995159745216370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 4.1314200498163700e-03</internalNodes>\n          <leafValues>\n            -1.4929920434951782e-01 4.2959120869636536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 8.7364455685019493e-03</internalNodes>\n          <leafValues>\n            -1.1271020025014877e-01 4.9456471204757690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 2.6352869463153183e-04</internalNodes>\n          <leafValues>\n            -1.2124919891357422e-01 4.9439379572868347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 -5.3885959088802338e-02</internalNodes>\n          <leafValues>\n            7.0355987548828125e-01 -1.3230550102889538e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 4.2885672301054001e-03</internalNodes>\n          <leafValues>\n            -1.7540550231933594e-01 3.5679468512535095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 7.9539399594068527e-03</internalNodes>\n          <leafValues>\n            -9.9884003400802612e-02 3.1371670961380005e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>53</maxWeakCount>\n      <stageThreshold>-1.2766569852828979e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 302 5.6752368807792664e-02</internalNodes>\n          <leafValues>\n            -3.2576480507850647e-01 3.7375938892364502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 7.0906039327383041e-03</internalNodes>\n          <leafValues>\n            -1.3918629288673401e-01 1.5039840340614319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 -4.1298821568489075e-02</internalNodes>\n          <leafValues>\n            4.7026079893112183e-01 -1.6179360449314117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 4.7750189900398254e-01</internalNodes>\n          <leafValues>\n            -1.0061579942703247e-01 7.6350742578506470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 4.2266491055488586e-01</internalNodes>\n          <leafValues>\n            -3.5190910100936890e-02 8.3031260967254639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 -3.3031899482011795e-02</internalNodes>\n          <leafValues>\n            -3.7505549192428589e-01 4.8902619630098343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 1.1923770216526464e-04</internalNodes>\n          <leafValues>\n            -2.6614668965339661e-01 2.2346520423889160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 4.2101400904357433e-03</internalNodes>\n          <leafValues>\n            8.7575968354940414e-03 -5.9383517503738403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 3.3337279455736279e-04</internalNodes>\n          <leafValues>\n            -2.1227659285068512e-01 2.4735039472579956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 1.1793890036642551e-02</internalNodes>\n          <leafValues>\n            -6.8997949361801147e-02 5.8980828523635864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 -1.1432079970836639e-01</internalNodes>\n          <leafValues>\n            -7.7333682775497437e-01 6.2862291932106018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 8.2401007413864136e-02</internalNodes>\n          <leafValues>\n            1.6825279220938683e-02 -6.1700117588043213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 1.8126150593161583e-02</internalNodes>\n          <leafValues>\n            9.9533468484878540e-02 -3.8309159874916077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 8.9282449334859848e-03</internalNodes>\n          <leafValues>\n            -1.0109739750623703e-01 2.9483050107955933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 -1.7437100410461426e-02</internalNodes>\n          <leafValues>\n            4.6149870753288269e-01 -1.0506360232830048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 -1.1280310340225697e-02</internalNodes>\n          <leafValues>\n            4.5611649751663208e-01 -1.0131160169839859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 7.0190089754760265e-03</internalNodes>\n          <leafValues>\n            -1.3686269521713257e-01 4.1732659935951233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 -3.2439709175378084e-03</internalNodes>\n          <leafValues>\n            2.3216480016708374e-01 -1.7915369570255280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 3.5615891218185425e-01</internalNodes>\n          <leafValues>\n            -4.8626810312271118e-02 9.5373457670211792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 3.8440749049186707e-03</internalNodes>\n          <leafValues>\n            -1.0288280248641968e-01 3.6717781424522400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 6.0950029641389847e-02</internalNodes>\n          <leafValues>\n            5.6141741573810577e-02 -6.4585697650909424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 1.8149229884147644e-01</internalNodes>\n          <leafValues>\n            3.0806390568614006e-02 -4.6048960089683533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 -9.2359259724617004e-02</internalNodes>\n          <leafValues>\n            -4.5248210430145264e-01 8.8152237236499786e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 7.6072998344898224e-03</internalNodes>\n          <leafValues>\n            -9.7122326493263245e-02 2.1552249789237976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 -4.6946710790507495e-04</internalNodes>\n          <leafValues>\n            -4.0893718600273132e-01 8.0042190849781036e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 1.0301820293534547e-04</internalNodes>\n          <leafValues>\n            -1.1530359834432602e-01 2.7955350279808044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 2.7936851256527007e-04</internalNodes>\n          <leafValues>\n            -1.1396100372076035e-01 2.9316601157188416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 2.4675959348678589e-01</internalNodes>\n          <leafValues>\n            -3.8595631718635559e-02 8.2649981975555420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 -8.4232958033680916e-03</internalNodes>\n          <leafValues>\n            3.2995969057083130e-01 -1.1645369976758957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 -4.2311567813158035e-03</internalNodes>\n          <leafValues>\n            2.7142119407653809e-01 -1.0811480134725571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 1.5653009759262204e-03</internalNodes>\n          <leafValues>\n            7.8253783285617828e-02 -5.2097660303115845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 -5.0341398455202579e-03</internalNodes>\n          <leafValues>\n            2.9488059878349304e-01 -4.6960510313510895e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 1.4283140189945698e-03</internalNodes>\n          <leafValues>\n            -1.3794599473476410e-01 2.4323709309101105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 1.9031369686126709e-01</internalNodes>\n          <leafValues>\n            -5.2093509584665298e-02 6.8708032369613647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 8.1368777900934219e-03</internalNodes>\n          <leafValues>\n            -5.3311519324779510e-02 5.8272719383239746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 -4.6728368848562241e-02</internalNodes>\n          <leafValues>\n            3.5525360703468323e-01 -1.7806259915232658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 1.4317169785499573e-02</internalNodes>\n          <leafValues>\n            -1.2626640498638153e-01 2.6961010694503784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 -9.6109732985496521e-02</internalNodes>\n          <leafValues>\n            3.4117481112480164e-01 -3.9217609912157059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 7.4878811836242676e-02</internalNodes>\n          <leafValues>\n            -6.4819902181625366e-02 5.6711381673812866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 -5.1972299843328074e-05</internalNodes>\n          <leafValues>\n            2.8742098808288574e-01 -1.6428899765014648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 -2.0099039829801768e-04</internalNodes>\n          <leafValues>\n            2.6590210199356079e-01 -1.2990359961986542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 1.5583490021526814e-02</internalNodes>\n          <leafValues>\n            3.6322619765996933e-02 -8.8743317127227783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 6.7313341423869133e-03</internalNodes>\n          <leafValues>\n            1.6281859576702118e-01 -1.9716200232505798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 -4.5251410454511642e-02</internalNodes>\n          <leafValues>\n            -2.0315009355545044e-01 1.5734089910984039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 2.8729529003612697e-04</internalNodes>\n          <leafValues>\n            -1.2449590116739273e-01 2.5658228993415833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 -2.1028579212725163e-03</internalNodes>\n          <leafValues>\n            -5.0887292623519897e-01 3.4083180129528046e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 -3.9328099228441715e-03</internalNodes>\n          <leafValues>\n            -3.3933758735656738e-01 9.3055568635463715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 3.1205590348690748e-03</internalNodes>\n          <leafValues>\n            -2.2794060409069061e-02 2.3793530464172363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 7.8028678894042969e-02</internalNodes>\n          <leafValues>\n            -4.4503621757030487e-02 6.7763942480087280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 4.2476978152990341e-02</internalNodes>\n          <leafValues>\n            9.2582106590270996e-02 -3.5363018512725830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 -2.5768300518393517e-02</internalNodes>\n          <leafValues>\n            -9.0919911861419678e-01 2.6692839339375496e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 6.1444669961929321e-02</internalNodes>\n          <leafValues>\n            -2.4954399093985558e-02 7.2120499610900879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 3.5776318982243538e-03</internalNodes>\n          <leafValues>\n            1.7728990316390991e-01 -1.9723449647426605e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>38</maxWeakCount>\n      <stageThreshold>-1.4061349630355835e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 355 2.8585961461067200e-01</internalNodes>\n          <leafValues>\n            -1.5396049618721008e-01 6.6246771812438965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 9.2271259054541588e-03</internalNodes>\n          <leafValues>\n            -1.0746339708566666e-01 4.3118068575859070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 2.2924109362065792e-03</internalNodes>\n          <leafValues>\n            -1.9830130040645599e-01 3.8422289490699768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 1.4004509896039963e-02</internalNodes>\n          <leafValues>\n            -1.9249489903450012e-01 3.4424918889999390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 9.6023201942443848e-02</internalNodes>\n          <leafValues>\n            1.2990599870681763e-01 -6.0653048753738403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 6.1803720891475677e-03</internalNodes>\n          <leafValues>\n            -1.9046460092067719e-01 1.8918620049953461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 8.2172285765409470e-03</internalNodes>\n          <leafValues>\n            -2.5182679295539856e-01 2.6644590497016907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 -1.4542760327458382e-03</internalNodes>\n          <leafValues>\n            2.7102690935134888e-01 -1.2041489779949188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 3.0185449868440628e-03</internalNodes>\n          <leafValues>\n            -1.3538609445095062e-01 4.7336030006408691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 -3.4214779734611511e-03</internalNodes>\n          <leafValues>\n            -5.0499719381332397e-01 1.0424809902906418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 9.5980763435363770e-03</internalNodes>\n          <leafValues>\n            -1.0347290337085724e-01 5.8372837305068970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 4.1849957779049873e-03</internalNodes>\n          <leafValues>\n            5.8896709233522415e-02 -4.6232289075851440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 -4.6107750385999680e-03</internalNodes>\n          <leafValues>\n            3.7835618853569031e-01 -1.2590229511260986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 2.8978679329156876e-03</internalNodes>\n          <leafValues>\n            -1.3699549436569214e-01 2.5951480865478516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 4.2606070637702942e-03</internalNodes>\n          <leafValues>\n            8.8233962655067444e-02 -6.3902848958969116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 -4.2996238917112350e-03</internalNodes>\n          <leafValues>\n            -7.9539728164672852e-01 1.7093559727072716e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 3.5423618555068970e-01</internalNodes>\n          <leafValues>\n            -5.9345040470361710e-02 8.5579198598861694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 -3.0245838570408523e-04</internalNodes>\n          <leafValues>\n            3.1470650434494019e-01 -1.4486099779605865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 2.7169490233063698e-02</internalNodes>\n          <leafValues>\n            -1.2492950260639191e-01 4.2809039354324341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 3.4571529831737280e-03</internalNodes>\n          <leafValues>\n            3.9709329605102539e-02 -7.0891571044921875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 2.1742798853665590e-03</internalNodes>\n          <leafValues>\n            6.5872453153133392e-02 -6.9496941566467285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 2.5263810530304909e-02</internalNodes>\n          <leafValues>\n            -1.1693959683179855e-01 1.9049769639968872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -2.4720989167690277e-02</internalNodes>\n          <leafValues>\n            -4.9657958745956421e-01 1.0175380110740662e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 1.0384880006313324e-02</internalNodes>\n          <leafValues>\n            -1.1486739665269852e-01 3.3741530776023865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 5.0045028328895569e-03</internalNodes>\n          <leafValues>\n            -1.0963550209999084e-01 3.9255198836326599e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 7.1279620751738548e-03</internalNodes>\n          <leafValues>\n            -6.4908191561698914e-02 4.0420401096343994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 1.9700419157743454e-02</internalNodes>\n          <leafValues>\n            -7.9375877976417542e-02 5.3082340955734253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 4.2097331024706364e-03</internalNodes>\n          <leafValues>\n            4.0797021239995956e-02 -6.0440987348556519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 4.4459570199251175e-03</internalNodes>\n          <leafValues>\n            -1.0386230051517487e-01 4.0935981273651123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 -5.9610428288578987e-03</internalNodes>\n          <leafValues>\n            -5.2914947271347046e-01 8.0539450049400330e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 5.7519221445545554e-04</internalNodes>\n          <leafValues>\n            6.3804402947425842e-02 -5.8636617660522461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 6.0524851083755493e-02</internalNodes>\n          <leafValues>\n            -3.3712800592184067e-02 2.6311159133911133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 -1.0353810153901577e-02</internalNodes>\n          <leafValues>\n            -4.7920021414756775e-01 8.0043956637382507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 -2.2777510806918144e-02</internalNodes>\n          <leafValues>\n            -3.1162750720977783e-01 1.1899980157613754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 -2.2468879818916321e-02</internalNodes>\n          <leafValues>\n            -6.6083461046218872e-01 5.2234489470720291e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 5.8432162040844560e-04</internalNodes>\n          <leafValues>\n            5.4630339145660400e-02 -4.6395659446716309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 -3.6177870351821184e-03</internalNodes>\n          <leafValues>\n            6.7447042465209961e-01 -5.8789528906345367e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 3.0088860541582108e-02</internalNodes>\n          <leafValues>\n            3.3133521676063538e-02 -4.6461370587348938e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>40</maxWeakCount>\n      <stageThreshold>-1.3384460210800171e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 393 -7.2600990533828735e-02</internalNodes>\n          <leafValues>\n            6.3907092809677124e-01 -1.5124550461769104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 3.4712558984756470e-01</internalNodes>\n          <leafValues>\n            -7.9024657607078552e-02 7.9550421237945557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 3.4297230839729309e-01</internalNodes>\n          <leafValues>\n            -1.2300959974527359e-01 6.5728098154067993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 3.5616940259933472e-01</internalNodes>\n          <leafValues>\n            -5.3733438253402710e-02 8.2851082086563110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 6.0840700753033161e-03</internalNodes>\n          <leafValues>\n            -1.2847210466861725e-01 3.3822679519653320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 -1.6281309945043176e-04</internalNodes>\n          <leafValues>\n            3.0356609821319580e-01 -2.5182029604911804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 1.1281900107860565e-02</internalNodes>\n          <leafValues>\n            -8.3914346992969513e-02 4.3475928902626038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 7.4357059784233570e-03</internalNodes>\n          <leafValues>\n            -6.7088037729263306e-02 3.7227979302406311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 -9.0576216578483582e-02</internalNodes>\n          <leafValues>\n            -5.8319610357284546e-01 8.0146759748458862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 8.8247694075107574e-03</internalNodes>\n          <leafValues>\n            1.2901930510997772e-01 -4.7603130340576172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 -2.6147770695388317e-03</internalNodes>\n          <leafValues>\n            -4.0002208948135376e-01 1.1246310174465179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 -2.5541300419718027e-04</internalNodes>\n          <leafValues>\n            3.2386159896850586e-01 -2.3331870138645172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 2.6547629386186600e-02</internalNodes>\n          <leafValues>\n            7.2333872318267822e-02 -5.8378398418426514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 -5.1383141428232193e-02</internalNodes>\n          <leafValues>\n            -2.2446189820766449e-01 4.0949739515781403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 3.3701129723340273e-03</internalNodes>\n          <leafValues>\n            -1.6717089712619781e-01 2.5526970624923706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 -2.2581920493394136e-03</internalNodes>\n          <leafValues>\n            -9.2079228162765503e-01 3.4371060319244862e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 -1.3282749569043517e-04</internalNodes>\n          <leafValues>\n            1.8573220074176788e-01 -2.2498969733715057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 -2.8032590635120869e-03</internalNodes>\n          <leafValues>\n            -8.5897541046142578e-01 4.6384520828723907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 1.3141379458829761e-03</internalNodes>\n          <leafValues>\n            7.9627066850662231e-02 -4.6105968952178955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 6.3884541392326355e-02</internalNodes>\n          <leafValues>\n            -5.3440149873495102e-02 8.1045001745223999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 -1.9811019301414490e-03</internalNodes>\n          <leafValues>\n            -6.3825148344039917e-01 7.6643556356430054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 1.3359859585762024e-02</internalNodes>\n          <leafValues>\n            -9.5037549734115601e-02 6.2533348798751831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 -1.0935300088021904e-04</internalNodes>\n          <leafValues>\n            1.7479540407657623e-01 -2.2876030206680298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 1.1910630390048027e-02</internalNodes>\n          <leafValues>\n            -7.7041983604431152e-02 5.0458377599716187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 2.3951700329780579e-01</internalNodes>\n          <leafValues>\n            -6.5122887492179871e-02 5.0420749187469482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 3.9831408858299255e-01</internalNodes>\n          <leafValues>\n            -2.9999820515513420e-02 7.9685479402542114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 6.1875800602138042e-03</internalNodes>\n          <leafValues>\n            -8.5339173674583435e-02 3.9451768994331360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 -9.4047123566269875e-03</internalNodes>\n          <leafValues>\n            -4.3441331386566162e-01 8.2619100809097290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 1.1736630462110043e-02</internalNodes>\n          <leafValues>\n            6.9483160972595215e-02 -4.8706498742103577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 -1.5176770277321339e-02</internalNodes>\n          <leafValues>\n            -5.8541208505630493e-01 3.2879561185836792e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 3.0744259711354971e-03</internalNodes>\n          <leafValues>\n            -1.3146080076694489e-01 2.5466740131378174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 2.9391339048743248e-03</internalNodes>\n          <leafValues>\n            -1.0860230028629303e-01 2.7834960818290710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 2.1510310471057892e-03</internalNodes>\n          <leafValues>\n            -1.5750579535961151e-01 2.0877860486507416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 5.3775361739099026e-03</internalNodes>\n          <leafValues>\n            -1.3207030296325684e-01 3.7672939896583557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 2.2174179553985596e-02</internalNodes>\n          <leafValues>\n            -9.0180292725563049e-02 4.1575270891189575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 -1.9948610570281744e-03</internalNodes>\n          <leafValues>\n            2.5608581304550171e-01 -9.9084928631782532e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 3.1557559967041016e-02</internalNodes>\n          <leafValues>\n            7.4188999831676483e-02 -5.4940229654312134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 -4.3111158447572961e-05</internalNodes>\n          <leafValues>\n            3.0324628949165344e-01 -1.7781810462474823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 -3.2675920519977808e-03</internalNodes>\n          <leafValues>\n            -6.7212432622909546e-01 5.9188328683376312e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 4.2293380829505622e-04</internalNodes>\n          <leafValues>\n            -1.1034099757671356e-01 1.2573179602622986e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>45</maxWeakCount>\n      <stageThreshold>-1.2722699642181396e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 433 -4.2562019079923630e-02</internalNodes>\n          <leafValues>\n            3.3346658945083618e-01 -2.9861980676651001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 4.1827198863029480e-01</internalNodes>\n          <leafValues>\n            -9.5138698816299438e-02 7.5709921121597290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 -2.0256379619240761e-02</internalNodes>\n          <leafValues>\n            4.7783890366554260e-01 -1.4592100679874420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 -1.8948309123516083e-02</internalNodes>\n          <leafValues>\n            -3.8727501034736633e-01 5.2479889243841171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 -4.0550589561462402e-02</internalNodes>\n          <leafValues>\n            5.4646247625350952e-01 -8.1399857997894287e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 5.1872748136520386e-01</internalNodes>\n          <leafValues>\n            -2.7930539101362228e-02 8.4580981731414795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 2.0713619887828827e-01</internalNodes>\n          <leafValues>\n            -5.8850869536399841e-02 7.9601562023162842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 8.1972572952508926e-03</internalNodes>\n          <leafValues>\n            -9.9966369569301605e-02 4.9831560254096985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 1.7445389181375504e-02</internalNodes>\n          <leafValues>\n            6.8040959537029266e-02 -5.6699818372726440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 -5.6310281157493591e-02</internalNodes>\n          <leafValues>\n            -6.8628042936325073e-01 7.4222557246685028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 1.8095560371875763e-01</internalNodes>\n          <leafValues>\n            -5.2808128297328949e-02 8.4483182430267334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 -2.3450690787285566e-03</internalNodes>\n          <leafValues>\n            2.8396940231323242e-01 -1.1123369634151459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 3.8937770295888186e-03</internalNodes>\n          <leafValues>\n            6.5499313175678253e-02 -5.7920962572097778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 3.9383721741614863e-05</internalNodes>\n          <leafValues>\n            -3.0930471420288086e-01 4.2237108945846558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 3.3899158239364624e-02</internalNodes>\n          <leafValues>\n            3.0707539990544319e-02 -7.2299808263778687e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 -3.3644389361143112e-02</internalNodes>\n          <leafValues>\n            4.2664441466331482e-01 -7.2005778551101685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 3.8807760924100876e-02</internalNodes>\n          <leafValues>\n            -4.1713520884513855e-02 6.5995568037033081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -3.9149548683781177e-05</internalNodes>\n          <leafValues>\n            4.9335500597953796e-01 -2.4260109663009644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 -2.7580570895224810e-04</internalNodes>\n          <leafValues>\n            1.7910109460353851e-01 -2.1925190091133118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 1.2636659666895866e-02</internalNodes>\n          <leafValues>\n            -7.1233622729778290e-02 2.5342619419097900e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 -3.3681739587336779e-03</internalNodes>\n          <leafValues>\n            3.3100861310958862e-01 -1.0207779705524445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -4.1184529662132263e-02</internalNodes>\n          <leafValues>\n            -4.7871989011764526e-01 2.7444809675216675e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 1.7285279929637909e-02</internalNodes>\n          <leafValues>\n            -2.3733820021152496e-01 1.5414300560951233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 -5.8373320847749710e-02</internalNodes>\n          <leafValues>\n            3.6355251073837280e-01 -6.2911927700042725e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 2.5229319930076599e-02</internalNodes>\n          <leafValues>\n            -9.4345822930335999e-02 4.3224421143531799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 4.7925519756972790e-03</internalNodes>\n          <leafValues>\n            4.8664271831512451e-02 -4.7046890854835510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 -1.3549529830925167e-04</internalNodes>\n          <leafValues>\n            1.9361880421638489e-01 -1.9338470697402954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 -1.7969410866498947e-02</internalNodes>\n          <leafValues>\n            2.9000860452651978e-01 -5.4545279592275620e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 1.1141040362417698e-02</internalNodes>\n          <leafValues>\n            -1.0802250355482101e-01 3.3327960968017578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 3.9759509265422821e-02</internalNodes>\n          <leafValues>\n            1.9240869209170341e-02 -4.8899960517883301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 -2.2652709856629372e-02</internalNodes>\n          <leafValues>\n            -5.0369280576705933e-01 8.0773733556270599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 1.0915650054812431e-03</internalNodes>\n          <leafValues>\n            6.5554052591323853e-02 -2.4443879723548889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 6.8754747509956360e-02</internalNodes>\n          <leafValues>\n            8.9196808636188507e-02 -3.5653901100158691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 -3.3071058988571167e-01</internalNodes>\n          <leafValues>\n            4.6495699882507324e-01 -5.8183699846267700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 -1.9307229667901993e-02</internalNodes>\n          <leafValues>\n            -4.4157180190086365e-01 8.3050116896629333e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 3.4808758646249771e-02</internalNodes>\n          <leafValues>\n            5.3480580449104309e-02 -5.0377398729324341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 -3.8908151327632368e-04</internalNodes>\n          <leafValues>\n            3.4271261096000671e-01 -8.9923180639743805e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 -2.1421869751065969e-03</internalNodes>\n          <leafValues>\n            -6.0642802715301514e-01 5.5589240044355392e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 1.1015810072422028e-01</internalNodes>\n          <leafValues>\n            -5.4774720221757889e-02 6.8780910968780518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 3.0875208904035389e-04</internalNodes>\n          <leafValues>\n            -5.5834218859672546e-02 9.3168236315250397e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 2.1960400044918060e-03</internalNodes>\n          <leafValues>\n            5.3955748677253723e-02 -6.0503059625625610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 -1.2606250122189522e-02</internalNodes>\n          <leafValues>\n            -4.6864029765129089e-01 5.9943869709968567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 -2.7497899718582630e-03</internalNodes>\n          <leafValues>\n            2.8942531347274780e-01 -1.1297850310802460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 6.0962641239166260e-01</internalNodes>\n          <leafValues>\n            -4.7885991632938385e-02 5.9465491771697998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 4.5023251324892044e-02</internalNodes>\n          <leafValues>\n            6.3831068575382233e-02 -5.2956801652908325e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>-1.3022350072860718e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 478 1.5907280147075653e-02</internalNodes>\n          <leafValues>\n            -3.8192328810691833e-01 2.9411768913269043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 -3.0483009293675423e-02</internalNodes>\n          <leafValues>\n            6.4014548063278198e-01 -1.1338239908218384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 2.5841239839792252e-02</internalNodes>\n          <leafValues>\n            -1.7654690146446228e-01 2.5563400983810425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 1.2160619720816612e-02</internalNodes>\n          <leafValues>\n            -4.9461990594863892e-02 3.4733989834785461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -1.5910159796476364e-02</internalNodes>\n          <leafValues>\n            4.7966769337654114e-01 -1.3009509444236755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 3.5282061435282230e-04</internalNodes>\n          <leafValues>\n            -3.4184929728507996e-01 2.3091129958629608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 6.7633582511916757e-04</internalNodes>\n          <leafValues>\n            -1.5432509779930115e-01 2.6687300205230713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 -5.9936139732599258e-02</internalNodes>\n          <leafValues>\n            -4.8802581429481506e-01 9.3327447772026062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 -1.1342409998178482e-01</internalNodes>\n          <leafValues>\n            -6.5771442651748657e-01 5.9166818857192993e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 -4.3361280113458633e-03</internalNodes>\n          <leafValues>\n            -1.5936520695686340e-01 5.0237040966749191e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 -1.8627740209922194e-03</internalNodes>\n          <leafValues>\n            3.0730259418487549e-01 -1.2540669739246368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 1.2653009966015816e-02</internalNodes>\n          <leafValues>\n            -1.0044930130243301e-01 3.7496179342269897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 6.9118577241897583e-01</internalNodes>\n          <leafValues>\n            -4.7146409749984741e-02 8.3212441205978394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 -2.6093868655152619e-04</internalNodes>\n          <leafValues>\n            3.1987738609313965e-01 -2.7183309197425842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 -7.6345056295394897e-02</internalNodes>\n          <leafValues>\n            4.3091300129890442e-01 -9.0888269245624542e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 2.8098300099372864e-03</internalNodes>\n          <leafValues>\n            5.8731120079755783e-02 -6.1996752023696899e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 -1.3322039740160108e-04</internalNodes>\n          <leafValues>\n            2.0000059902667999e-01 -2.0120109617710114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 -1.3717629946768284e-02</internalNodes>\n          <leafValues>\n            -7.3095452785491943e-01 2.7178529649972916e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 -6.2303808517754078e-03</internalNodes>\n          <leafValues>\n            -5.4780989885330200e-01 6.8749949336051941e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 4.9922719597816467e-02</internalNodes>\n          <leafValues>\n            -4.7304309904575348e-02 8.2423102855682373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 -1.9126719562336802e-03</internalNodes>\n          <leafValues>\n            -5.3940171003341675e-01 7.7447593212127686e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 1.1384560493752360e-03</internalNodes>\n          <leafValues>\n            -9.6537686884403229e-02 1.5485690534114838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 -2.4732090532779694e-03</internalNodes>\n          <leafValues>\n            3.5590788722038269e-01 -9.3169830739498138e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 -7.1464257780462503e-04</internalNodes>\n          <leafValues>\n            1.4520190656185150e-01 -7.4194207787513733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 -2.0437149330973625e-02</internalNodes>\n          <leafValues>\n            4.4163769483566284e-01 -8.0942437052726746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -4.0483791381120682e-03</internalNodes>\n          <leafValues>\n            -5.9992778301239014e-01 3.3025380223989487e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 1.1148050427436829e-02</internalNodes>\n          <leafValues>\n            -1.1358329653739929e-01 3.2644999027252197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 9.8842009902000427e-03</internalNodes>\n          <leafValues>\n            5.5404480546712875e-02 -3.2730978727340698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 3.1296359375119209e-03</internalNodes>\n          <leafValues>\n            7.7408656477928162e-02 -4.5953071117401123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 2.9721839819103479e-03</internalNodes>\n          <leafValues>\n            -1.2917269766330719e-01 1.5523110330104828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 2.0554479211568832e-02</internalNodes>\n          <leafValues>\n            8.7600469589233398e-02 -4.5774188637733459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 -2.3027280345559120e-02</internalNodes>\n          <leafValues>\n            3.5488089919090271e-01 -2.0566919818520546e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 -8.3903772756457329e-03</internalNodes>\n          <leafValues>\n            -4.3240728974342346e-01 9.2067979276180267e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 -1.1431539896875620e-03</internalNodes>\n          <leafValues>\n            3.9591339230537415e-01 -2.3192889988422394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 -4.9133709399029613e-04</internalNodes>\n          <leafValues>\n            4.2749640345573425e-01 -8.5524216294288635e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 5.1292928401380777e-04</internalNodes>\n          <leafValues>\n            -1.6196739673614502e-01 1.9614970684051514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 -5.8478871360421181e-03</internalNodes>\n          <leafValues>\n            -5.9116369485855103e-01 6.2448240816593170e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 -9.4133049249649048e-02</internalNodes>\n          <leafValues>\n            4.7701609134674072e-01 -5.6710161268711090e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 1.0079269850393757e-04</internalNodes>\n          <leafValues>\n            -1.6257099807262421e-01 2.1402290463447571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 3.2930231100181118e-05</internalNodes>\n          <leafValues>\n            -1.8596050143241882e-01 1.9647690653800964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 -1.1743210052372888e-04</internalNodes>\n          <leafValues>\n            3.1821349263191223e-01 -1.3287380337715149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 1.2751810252666473e-01</internalNodes>\n          <leafValues>\n            3.0140079557895660e-02 -7.4110358953475952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 8.0326296389102936e-02</internalNodes>\n          <leafValues>\n            4.1555039584636688e-02 -8.2636839151382446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 1.6904190415516496e-03</internalNodes>\n          <leafValues>\n            -1.0290619730949402e-01 2.9724180698394775e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>47</maxWeakCount>\n      <stageThreshold>-1.1933319568634033e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 522 -4.6122789382934570e-02</internalNodes>\n          <leafValues>\n            4.4252589344978333e-01 -2.9913198947906494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 3.6723318696022034e-01</internalNodes>\n          <leafValues>\n            -6.3011750578880310e-02 7.7125382423400879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 -3.0962929595261812e-03</internalNodes>\n          <leafValues>\n            3.5142418742179871e-01 -1.7306439578533173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 9.2647131532430649e-03</internalNodes>\n          <leafValues>\n            -1.6072809696197510e-01 1.8532909452915192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 3.1748649198561907e-03</internalNodes>\n          <leafValues>\n            -1.9688999652862549e-01 2.4097280204296112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 8.0439839512109756e-03</internalNodes>\n          <leafValues>\n            8.9862972497940063e-02 -3.6552259325981140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 3.2752490043640137e-01</internalNodes>\n          <leafValues>\n            -5.6879680603742599e-02 7.7493369579315186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 -1.9074430689215660e-02</internalNodes>\n          <leafValues>\n            -2.8953808546066284e-01 6.2291670590639114e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 -2.0501749590039253e-02</internalNodes>\n          <leafValues>\n            -6.2625300884246826e-01 6.8276971578598022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 5.3187010053079575e-05</internalNodes>\n          <leafValues>\n            -2.5149559974670410e-01 2.6131960749626160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 3.3275580499321222e-03</internalNodes>\n          <leafValues>\n            -1.1990779638290405e-01 3.6519300937652588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 5.8408430777490139e-03</internalNodes>\n          <leafValues>\n            -8.2748517394065857e-02 2.3650820553302765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 -4.6462330967187881e-02</internalNodes>\n          <leafValues>\n            -6.9285649061203003e-01 7.8197672963142395e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 -3.7785700988024473e-03</internalNodes>\n          <leafValues>\n            3.4372571110725403e-01 -1.0275450348854065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 1.6655459767207503e-03</internalNodes>\n          <leafValues>\n            -1.1605279892683029e-01 3.7162029743194580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 -5.7107670727418736e-05</internalNodes>\n          <leafValues>\n            4.5893669128417969e-01 -2.1236430108547211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 -9.0066380798816681e-03</internalNodes>\n          <leafValues>\n            -5.9533411264419556e-01 8.0876402556896210e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 -1.3789710402488708e-01</internalNodes>\n          <leafValues>\n            3.9570671319961548e-01 -8.9885376393795013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 5.7599872350692749e-01</internalNodes>\n          <leafValues>\n            -5.3810819983482361e-02 8.1703948974609375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 -2.3918158840388060e-03</internalNodes>\n          <leafValues>\n            1.3933740556240082e-01 -4.2155928909778595e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 2.4896071408875287e-04</internalNodes>\n          <leafValues>\n            -1.4858660101890564e-01 2.6263329386711121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 3.3062491565942764e-02</internalNodes>\n          <leafValues>\n            3.0659910291433334e-02 -3.2318601012229919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 4.4321879744529724e-02</internalNodes>\n          <leafValues>\n            4.7853820025920868e-02 -7.8135901689529419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 -1.8718190491199493e-02</internalNodes>\n          <leafValues>\n            1.2012620270252228e-01 -1.1211469769477844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 9.2309370636940002e-02</internalNodes>\n          <leafValues>\n            4.2463079094886780e-02 -8.0097001791000366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 9.0665437281131744e-02</internalNodes>\n          <leafValues>\n            -2.2304529324173927e-02 1.2847979366779327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 -5.8294929563999176e-02</internalNodes>\n          <leafValues>\n            -3.9368540048599243e-01 9.5482140779495239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 4.6649780124425888e-03</internalNodes>\n          <leafValues>\n            -6.5641947090625763e-02 3.6407178640365601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 5.2480432204902172e-03</internalNodes>\n          <leafValues>\n            6.8765781819820404e-02 -5.0508302450180054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 2.5315659586340189e-03</internalNodes>\n          <leafValues>\n            -9.3347169458866119e-02 1.6496129333972931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 2.4391160695813596e-04</internalNodes>\n          <leafValues>\n            -1.8885439634323120e-01 1.6956700384616852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 -6.3037211075425148e-03</internalNodes>\n          <leafValues>\n            3.8263529539108276e-01 -5.9042099863290787e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 2.2754059173166752e-03</internalNodes>\n          <leafValues>\n            -1.2248820066452026e-01 2.8283658623695374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 -2.7694869041442871e-01</internalNodes>\n          <leafValues>\n            4.8514971137046814e-01 -4.0482539683580399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 5.8051547966897488e-03</internalNodes>\n          <leafValues>\n            -8.3558417856693268e-02 4.2151498794555664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 2.4654529988765717e-03</internalNodes>\n          <leafValues>\n            -1.2816859781742096e-01 2.0776629447937012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 7.8863510861992836e-03</internalNodes>\n          <leafValues>\n            -1.7197540402412415e-01 2.0790819823741913e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 -1.1817130260169506e-02</internalNodes>\n          <leafValues>\n            -5.7880669832229614e-01 5.8959141373634338e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 -6.4139917492866516e-02</internalNodes>\n          <leafValues>\n            -6.3689261674880981e-01 4.1797500103712082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 561 -1.2179970508441329e-03</internalNodes>\n          <leafValues>\n            2.3568700253963470e-01 -8.0515258014202118e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 2.8652620967477560e-03</internalNodes>\n          <leafValues>\n            -9.3137197196483612e-02 3.9025950431823730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 -5.7746102102100849e-03</internalNodes>\n          <leafValues>\n            -5.7539868354797363e-01 5.9677690267562866e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 6.5377086400985718e-02</internalNodes>\n          <leafValues>\n            3.4166071563959122e-02 -7.4253422021865845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 1.6265710815787315e-02</internalNodes>\n          <leafValues>\n            5.3654260933399200e-02 -2.3658609390258789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 2.2717609535902739e-03</internalNodes>\n          <leafValues>\n            5.3359109908342361e-02 -5.4940742254257202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 2.2626020014286041e-01</internalNodes>\n          <leafValues>\n            -4.2046058923006058e-02 7.7912521362304688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 -2.9377460479736328e-02</internalNodes>\n          <leafValues>\n            -5.9470587968826294e-01 5.4817870259284973e-02</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          0 0 2 4 -1.</_>\n        <_>\n          0 2 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 10 2 8 -1.</_>\n        <_>\n          34 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 2 8 -1.</_>\n        <_>\n          0 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 18 10 -1.</_>\n        <_>\n          24 0 9 5 2.</_>\n        <_>\n          15 5 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 4 -1.</_>\n        <_>\n          7 0 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 5 6 4 -1.</_>\n        <_>\n          15 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 8 3 -1.</_>\n        <_>\n          13 7 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 8 4 -1.</_>\n        <_>\n          14 7 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 2 8 -1.</_>\n        <_>\n          0 14 2 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 0 2 16 -1.</_>\n        <_>\n          35 0 1 8 2.</_>\n        <_>\n          34 8 1 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 7 -1.</_>\n        <_>\n          3 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 28 3 -1.</_>\n        <_>\n          11 7 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 0 2 2 -1.</_>\n        <_>\n          34 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 4 6 -1.</_>\n        <_>\n          0 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 0 2 2 -1.</_>\n        <_>\n          34 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 2 -1.</_>\n        <_>\n          0 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 9 12 -1.</_>\n        <_>\n          20 5 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 9 12 -1.</_>\n        <_>\n          13 5 3 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 32 1 -1.</_>\n        <_>\n          4 0 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 3 -1.</_>\n        <_>\n          1 0 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          32 7 4 7 -1.</_>\n        <_>\n          33 8 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 6 -1.</_>\n        <_>\n          7 0 4 3 2.</_>\n        <_>\n          11 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 2 -1.</_>\n        <_>\n          0 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 1 8 9 -1.</_>\n        <_>\n          29 3 4 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 10 1 8 -1.</_>\n        <_>\n          1 14 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 30 9 -1.</_>\n        <_>\n          13 9 10 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 8 6 -1.</_>\n        <_>\n          12 7 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 6 3 -1.</_>\n        <_>\n          16 5 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 18 -1.</_>\n        <_>\n          0 0 1 9 2.</_>\n        <_>\n          1 9 1 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 2 2 14 -1.</_>\n        <_>\n          35 2 1 7 2.</_>\n        <_>\n          34 9 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 2 14 -1.</_>\n        <_>\n          0 2 1 7 2.</_>\n        <_>\n          1 9 1 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 0 1 4 -1.</_>\n        <_>\n          35 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 24 18 -1.</_>\n        <_>\n          5 0 12 9 2.</_>\n        <_>\n          17 9 12 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 16 1 2 -1.</_>\n        <_>\n          35 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 1 2 -1.</_>\n        <_>\n          0 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 8 12 -1.</_>\n        <_>\n          19 6 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 8 13 -1.</_>\n        <_>\n          13 5 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 16 1 2 -1.</_>\n        <_>\n          35 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 12 3 -1.</_>\n        <_>\n          10 10 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 1 8 -1.</_>\n        <_>\n          0 14 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 10 10 -1.</_>\n        <_>\n          25 0 5 5 2.</_>\n        <_>\n          20 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 4 -1.</_>\n        <_>\n          0 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 13 18 -1.</_>\n        <_>\n          19 9 13 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 6 -1.</_>\n        <_>\n          4 0 7 3 2.</_>\n        <_>\n          11 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 6 6 -1.</_>\n        <_>\n          16 7 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 7 8 -1.</_>\n        <_>\n          13 9 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          33 0 3 1 -1.</_>\n        <_>\n          34 0 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 4 -1.</_>\n        <_>\n          6 2 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 2 6 16 -1.</_>\n        <_>\n          18 2 3 8 2.</_>\n        <_>\n          15 10 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 1 8 -1.</_>\n        <_>\n          0 14 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 4 6 6 -1.</_>\n        <_>\n          29 6 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 8 8 -1.</_>\n        <_>\n          16 5 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 5 6 6 -1.</_>\n        <_>\n          29 7 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          7 7 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 12 9 -1.</_>\n        <_>\n          15 5 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 1 -1.</_>\n        <_>\n          1 0 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 18 6 -1.</_>\n        <_>\n          15 6 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 1 6 -1.</_>\n        <_>\n          0 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 30 6 -1.</_>\n        <_>\n          13 8 10 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 12 4 -1.</_>\n        <_>\n          11 8 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 9 3 -1.</_>\n        <_>\n          14 9 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 7 4 -1.</_>\n        <_>\n          14 9 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 18 6 -1.</_>\n        <_>\n          12 9 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 10 -1.</_>\n        <_>\n          7 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 10 1 6 -1.</_>\n        <_>\n          35 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 1 6 -1.</_>\n        <_>\n          0 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 13 9 5 -1.</_>\n        <_>\n          21 13 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 6 4 -1.</_>\n        <_>\n          15 10 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 18 8 -1.</_>\n        <_>\n          16 6 18 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 9 3 -1.</_>\n        <_>\n          12 14 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          32 0 4 6 -1.</_>\n        <_>\n          32 0 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 6 -1.</_>\n        <_>\n          2 0 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 0 6 7 -1.</_>\n        <_>\n          29 2 2 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 4 -1.</_>\n        <_>\n          0 2 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 8 6 4 -1.</_>\n        <_>\n          29 10 2 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 27 6 -1.</_>\n        <_>\n          13 11 9 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          31 14 2 3 -1.</_>\n        <_>\n          31 14 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 5 6 -1.</_>\n        <_>\n          8 2 5 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 7 11 3 -1.</_>\n        <_>\n          14 8 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 2 6 -1.</_>\n        <_>\n          0 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 13 2 4 -1.</_>\n        <_>\n          34 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 2 4 -1.</_>\n        <_>\n          0 15 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 4 12 -1.</_>\n        <_>\n          3 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 22 12 -1.</_>\n        <_>\n          25 0 11 6 2.</_>\n        <_>\n          14 6 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 7 6 -1.</_>\n        <_>\n          6 3 7 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 14 3 -1.</_>\n        <_>\n          12 6 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 7 4 -1.</_>\n        <_>\n          6 7 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 3 6 4 -1.</_>\n        <_>\n          18 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 5 6 -1.</_>\n        <_>\n          4 7 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          33 0 3 4 -1.</_>\n        <_>\n          34 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 18 -1.</_>\n        <_>\n          9 9 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 24 6 -1.</_>\n        <_>\n          14 8 8 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 4 -1.</_>\n        <_>\n          16 9 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 13 4 -1.</_>\n        <_>\n          13 9 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 2 -1.</_>\n        <_>\n          0 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 14 1 4 -1.</_>\n        <_>\n          35 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 1 4 -1.</_>\n        <_>\n          0 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 9 7 -1.</_>\n        <_>\n          18 6 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 3 4 -1.</_>\n        <_>\n          1 0 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 16 2 2 -1.</_>\n        <_>\n          35 16 1 1 2.</_>\n        <_>\n          34 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 2 -1.</_>\n        <_>\n          0 16 1 1 2.</_>\n        <_>\n          1 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          22 0 10 4 -1.</_>\n        <_>\n          22 0 5 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 4 6 14 -1.</_>\n        <_>\n          15 4 3 7 2.</_>\n        <_>\n          18 11 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 8 10 -1.</_>\n        <_>\n          17 3 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 5 -1.</_>\n        <_>\n          1 0 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 6 -1.</_>\n        <_>\n          5 3 8 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 0 11 18 -1.</_>\n        <_>\n          19 9 11 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 24 6 -1.</_>\n        <_>\n          14 10 8 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 10 3 -1.</_>\n        <_>\n          14 7 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 11 4 -1.</_>\n        <_>\n          12 8 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 16 6 -1.</_>\n        <_>\n          26 0 8 3 2.</_>\n        <_>\n          18 3 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 7 3 -1.</_>\n        <_>\n          4 4 7 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 4 -1.</_>\n        <_>\n          18 5 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 4 -1.</_>\n        <_>\n          4 4 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 8 8 10 -1.</_>\n        <_>\n          18 8 4 5 2.</_>\n        <_>\n          14 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 1 -1.</_>\n        <_>\n          5 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 10 8 -1.</_>\n        <_>\n          25 0 5 4 2.</_>\n        <_>\n          20 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 10 8 -1.</_>\n        <_>\n          13 0 5 4 2.</_>\n        <_>\n          18 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          21 5 6 13 -1.</_>\n        <_>\n          23 5 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 13 -1.</_>\n        <_>\n          11 5 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 5 5 3 -1.</_>\n        <_>\n          27 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 6 -1.</_>\n        <_>\n          10 2 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          26 6 3 6 -1.</_>\n        <_>\n          26 8 3 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 36 7 -1.</_>\n        <_>\n          18 11 18 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 5 5 3 -1.</_>\n        <_>\n          27 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 5 3 -1.</_>\n        <_>\n          4 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          28 6 4 4 -1.</_>\n        <_>\n          29 7 2 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 15 8 2 -1.</_>\n        <_>\n          16 15 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 30 6 -1.</_>\n        <_>\n          13 7 10 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 16 6 -1.</_>\n        <_>\n          6 9 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 12 6 -1.</_>\n        <_>\n          14 12 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 10 -1.</_>\n        <_>\n          6 0 6 5 2.</_>\n        <_>\n          12 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          25 2 7 16 -1.</_>\n        <_>\n          25 10 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 18 7 -1.</_>\n        <_>\n          15 6 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 26 18 -1.</_>\n        <_>\n          18 0 13 9 2.</_>\n        <_>\n          5 9 13 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 10 3 -1.</_>\n        <_>\n          10 7 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 6 4 -1.</_>\n        <_>\n          17 7 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 6 7 -1.</_>\n        <_>\n          18 6 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          26 6 5 4 -1.</_>\n        <_>\n          26 7 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 1 6 -1.</_>\n        <_>\n          0 15 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 18 14 -1.</_>\n        <_>\n          18 4 9 7 2.</_>\n        <_>\n          9 11 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 3 -1.</_>\n        <_>\n          6 6 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          27 5 6 3 -1.</_>\n        <_>\n          29 7 2 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 3 3 -1.</_>\n        <_>\n          6 9 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          28 5 6 5 -1.</_>\n        <_>\n          30 7 2 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 5 6 -1.</_>\n        <_>\n          6 7 5 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          31 0 4 1 -1.</_>\n        <_>\n          31 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 1 -1.</_>\n        <_>\n          3 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 4 3 -1.</_>\n        <_>\n          17 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 7 4 -1.</_>\n        <_>\n          12 4 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 9 3 -1.</_>\n        <_>\n          14 10 9 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 21 1 -1.</_>\n        <_>\n          8 17 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 20 4 -1.</_>\n        <_>\n          12 9 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 22 4 -1.</_>\n        <_>\n          14 9 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          25 0 3 3 -1.</_>\n        <_>\n          26 1 1 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 9 4 3 -1.</_>\n        <_>\n          14 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 9 3 -1.</_>\n        <_>\n          22 4 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 9 3 -1.</_>\n        <_>\n          11 4 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 36 3 -1.</_>\n        <_>\n          12 16 12 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 2 -1.</_>\n        <_>\n          2 0 4 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 9 2 9 -1.</_>\n        <_>\n          19 12 2 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 8 3 -1.</_>\n        <_>\n          13 8 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          30 4 2 2 -1.</_>\n        <_>\n          31 4 1 1 2.</_>\n        <_>\n          30 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 2 2 -1.</_>\n        <_>\n          4 4 1 1 2.</_>\n        <_>\n          5 5 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 4 3 -1.</_>\n        <_>\n          18 8 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 1 8 -1.</_>\n        <_>\n          9 0 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          25 6 10 3 -1.</_>\n        <_>\n          25 7 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 10 3 -1.</_>\n        <_>\n          1 7 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 12 -1.</_>\n        <_>\n          6 6 7 6 2.</_>\n        <_>\n          13 12 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          31 14 3 4 -1.</_>\n        <_>\n          31 16 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 2 4 -1.</_>\n        <_>\n          1 14 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 12 5 -1.</_>\n        <_>\n          19 0 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 14 -1.</_>\n        <_>\n          12 0 4 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          28 1 8 7 -1.</_>\n        <_>\n          30 3 4 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 14 20 4 -1.</_>\n        <_>\n          8 14 10 2 2.</_>\n        <_>\n          18 16 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 24 3 -1.</_>\n        <_>\n          14 12 8 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 27 6 -1.</_>\n        <_>\n          13 7 9 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 22 18 -1.</_>\n        <_>\n          18 0 11 9 2.</_>\n        <_>\n          7 9 11 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 2 -1.</_>\n        <_>\n          16 1 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 36 1 -1.</_>\n        <_>\n          9 17 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 1 -1.</_>\n        <_>\n          5 5 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          34 15 2 1 -1.</_>\n        <_>\n          34 15 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 8 16 4 -1.</_>\n        <_>\n          7 9 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 10 1 6 -1.</_>\n        <_>\n          35 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 3 4 -1.</_>\n        <_>\n          13 9 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 10 1 6 -1.</_>\n        <_>\n          35 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 1 4 -1.</_>\n        <_>\n          11 1 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          35 10 1 6 -1.</_>\n        <_>\n          35 12 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 1 14 -1.</_>\n        <_>\n          18 0 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 6 16 12 -1.</_>\n        <_>\n          5 6 8 6 2.</_>\n        <_>\n          13 12 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 7 8 -1.</_>\n        <_>\n          16 3 7 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 4 8 10 -1.</_>\n        <_>\n          14 4 4 5 2.</_>\n        <_>\n          18 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          22 0 9 3 -1.</_>\n        <_>\n          25 0 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 26 8 -1.</_>\n        <_>\n          0 10 13 4 2.</_>\n        <_>\n          13 14 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 16 8 -1.</_>\n        <_>\n          23 10 8 4 2.</_>\n        <_>\n          15 14 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 24 18 -1.</_>\n        <_>\n          6 0 12 9 2.</_>\n        <_>\n          18 9 12 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 9 6 -1.</_>\n        <_>\n          21 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 9 6 -1.</_>\n        <_>\n          12 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          30 1 5 14 -1.</_>\n        <_>\n          30 8 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 5 14 -1.</_>\n        <_>\n          1 8 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 26 6 -1.</_>\n        <_>\n          23 8 13 3 2.</_>\n        <_>\n          10 11 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 28 6 -1.</_>\n        <_>\n          0 8 14 3 2.</_>\n        <_>\n          14 11 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 24 12 -1.</_>\n        <_>\n          24 0 12 6 2.</_>\n        <_>\n          12 6 12 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 2 -1.</_>\n        <_>\n          3 1 14 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          33 16 3 2 -1.</_>\n        <_>\n          33 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 9 14 -1.</_>\n        <_>\n          15 0 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          28 16 8 2 -1.</_>\n        <_>\n          32 16 4 1 2.</_>\n        <_>\n          28 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 6 6 -1.</_>\n        <_>\n          15 10 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 22 6 -1.</_>\n        <_>\n          24 6 11 3 2.</_>\n        <_>\n          13 9 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 26 4 -1.</_>\n        <_>\n          0 10 13 2 2.</_>\n        <_>\n          13 12 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          24 16 4 2 -1.</_>\n        <_>\n          24 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 3 2 -1.</_>\n        <_>\n          9 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 8 -1.</_>\n        <_>\n          3 7 9 4 2.</_>\n        <_>\n          12 11 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          23 0 8 4 -1.</_>\n        <_>\n          23 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 4 -1.</_>\n        <_>\n          9 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 24 3 -1.</_>\n        <_>\n          14 11 8 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 5 6 -1.</_>\n        <_>\n          5 7 5 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 16 26 2 -1.</_>\n        <_>\n          18 16 13 1 2.</_>\n        <_>\n          5 17 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 4 -1.</_>\n        <_>\n          0 7 12 2 2.</_>\n        <_>\n          12 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          23 14 13 4 -1.</_>\n        <_>\n          23 15 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 8 -1.</_>\n        <_>\n          2 10 9 4 2.</_>\n        <_>\n          11 14 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 6 4 -1.</_>\n        <_>\n          15 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 2 -1.</_>\n        <_>\n          0 6 12 1 2.</_>\n        <_>\n          12 7 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 18 18 -1.</_>\n        <_>\n          17 9 18 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 11 2 -1.</_>\n        <_>\n          1 1 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 8 12 -1.</_>\n        <_>\n          19 6 4 6 2.</_>\n        <_>\n          15 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 32 12 -1.</_>\n        <_>\n          2 1 16 6 2.</_>\n        <_>\n          18 7 16 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          29 10 7 8 -1.</_>\n        <_>\n          29 12 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 8 10 -1.</_>\n        <_>\n          12 2 4 5 2.</_>\n        <_>\n          16 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 6 4 -1.</_>\n        <_>\n          15 13 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 6 -1.</_>\n        <_>\n          0 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 26 8 -1.</_>\n        <_>\n          23 9 13 4 2.</_>\n        <_>\n          10 13 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 22 10 -1.</_>\n        <_>\n          7 8 11 5 2.</_>\n        <_>\n          18 13 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 8 3 -1.</_>\n        <_>\n          14 10 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 4 9 -1.</_>\n        <_>\n          11 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          29 14 2 2 -1.</_>\n        <_>\n          29 14 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 13 8 3 -1.</_>\n        <_>\n          14 14 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 7 8 -1.</_>\n        <_>\n          9 5 7 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          28 13 1 4 -1.</_>\n        <_>\n          28 13 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 13 4 1 -1.</_>\n        <_>\n          8 13 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 9 4 3 -1.</_>\n        <_>\n          16 10 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 10 4 -1.</_>\n        <_>\n          13 9 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 8 3 -1.</_>\n        <_>\n          14 9 8 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 2 -1.</_>\n        <_>\n          4 12 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 10 6 3 -1.</_>\n        <_>\n          16 11 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 13 -1.</_>\n        <_>\n          12 5 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 36 8 -1.</_>\n        <_>\n          18 0 18 4 2.</_>\n        <_>\n          0 4 18 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 8 12 -1.</_>\n        <_>\n          1 5 4 6 2.</_>\n        <_>\n          5 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 18 10 -1.</_>\n        <_>\n          27 8 9 5 2.</_>\n        <_>\n          18 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 10 -1.</_>\n        <_>\n          0 8 9 5 2.</_>\n        <_>\n          9 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 14 3 -1.</_>\n        <_>\n          11 6 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 16 6 -1.</_>\n        <_>\n          10 8 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 24 16 -1.</_>\n        <_>\n          19 2 12 8 2.</_>\n        <_>\n          7 10 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 15 -1.</_>\n        <_>\n          6 6 6 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 6 -1.</_>\n        <_>\n          12 5 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          29 0 6 11 -1.</_>\n        <_>\n          31 2 2 11 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 9 1 -1.</_>\n        <_>\n          5 11 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 17 3 -1.</_>\n        <_>\n          10 7 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 6 2 -1.</_>\n        <_>\n          20 8 2 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 11 12 3 -1.</_>\n        <_>\n          13 12 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 8 8 -1.</_>\n        <_>\n          2 3 4 4 2.</_>\n        <_>\n          6 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 12 18 4 -1.</_>\n        <_>\n          27 12 9 2 2.</_>\n        <_>\n          18 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 11 3 -1.</_>\n        <_>\n          11 6 11 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 14 4 -1.</_>\n        <_>\n          14 8 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 16 10 -1.</_>\n        <_>\n          9 8 8 5 2.</_>\n        <_>\n          17 13 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 1 -1.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 5 3 -1.</_>\n        <_>\n          13 11 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 1 -1.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 8 3 -1.</_>\n        <_>\n          6 6 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 1 -1.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 5 3 -1.</_>\n        <_>\n          10 6 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 34 10 -1.</_>\n        <_>\n          19 5 17 5 2.</_>\n        <_>\n          2 10 17 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 3 -1.</_>\n        <_>\n          6 5 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          35 6 1 6 -1.</_>\n        <_>\n          35 8 1 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 13 6 -1.</_>\n        <_>\n          10 8 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 6 4 -1.</_>\n        <_>\n          15 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 11 4 -1.</_>\n        <_>\n          4 3 11 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          26 6 10 6 -1.</_>\n        <_>\n          31 6 5 3 2.</_>\n        <_>\n          26 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 11 8 -1.</_>\n        <_>\n          10 9 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          28 2 4 9 -1.</_>\n        <_>\n          29 3 2 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 2 10 4 -1.</_>\n        <_>\n          7 3 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          31 0 5 2 -1.</_>\n        <_>\n          31 1 5 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 16 12 -1.</_>\n        <_>\n          10 10 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 3 -1.</_>\n        <_>\n          18 5 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 6 -1.</_>\n        <_>\n          11 12 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 8 1 10 -1.</_>\n        <_>\n          35 13 1 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 36 8 -1.</_>\n        <_>\n          18 10 18 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 6 8 -1.</_>\n        <_>\n          19 7 3 4 2.</_>\n        <_>\n          16 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 4 -1.</_>\n        <_>\n          7 6 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 11 4 3 -1.</_>\n        <_>\n          21 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 1 8 -1.</_>\n        <_>\n          0 13 1 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 7 6 4 -1.</_>\n        <_>\n          29 9 2 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 14 8 4 -1.</_>\n        <_>\n          12 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 17 2 1 -1.</_>\n        <_>\n          18 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 11 4 -1.</_>\n        <_>\n          10 5 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 12 2 4 -1.</_>\n        <_>\n          17 13 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 5 3 -1.</_>\n        <_>\n          13 5 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 11 2 -1.</_>\n        <_>\n          13 13 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 2 2 -1.</_>\n        <_>\n          1 16 1 1 2.</_>\n        <_>\n          2 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 7 6 4 -1.</_>\n        <_>\n          29 9 2 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 6 -1.</_>\n        <_>\n          4 9 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          30 6 4 5 -1.</_>\n        <_>\n          31 7 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 20 7 -1.</_>\n        <_>\n          13 5 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          30 2 3 12 -1.</_>\n        <_>\n          30 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 4 -1.</_>\n        <_>\n          4 2 12 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 36 6 -1.</_>\n        <_>\n          12 10 12 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 30 6 -1.</_>\n        <_>\n          13 7 10 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 12 9 -1.</_>\n        <_>\n          18 4 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 6 1 -1.</_>\n        <_>\n          3 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 0 1 2 -1.</_>\n        <_>\n          34 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 2 1 -1.</_>\n        <_>\n          2 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          31 3 3 8 -1.</_>\n        <_>\n          32 4 1 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 6 26 12 -1.</_>\n        <_>\n          5 6 13 6 2.</_>\n        <_>\n          18 12 13 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 12 9 -1.</_>\n        <_>\n          18 4 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 10 10 -1.</_>\n        <_>\n          13 7 5 5 2.</_>\n        <_>\n          18 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          30 5 4 6 -1.</_>\n        <_>\n          31 6 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 4 -1.</_>\n        <_>\n          5 6 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          29 5 4 5 -1.</_>\n        <_>\n          30 6 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 5 4 -1.</_>\n        <_>\n          6 6 5 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 36 1 -1.</_>\n        <_>\n          12 0 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 24 6 -1.</_>\n        <_>\n          14 5 8 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 6 3 -1.</_>\n        <_>\n          15 13 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 9 17 -1.</_>\n        <_>\n          14 1 3 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 18 10 -1.</_>\n        <_>\n          18 1 9 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 10 -1.</_>\n        <_>\n          9 1 9 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          30 7 4 5 -1.</_>\n        <_>\n          31 8 2 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 1 3 -1.</_>\n        <_>\n          0 11 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          33 16 2 2 -1.</_>\n        <_>\n          34 16 1 1 2.</_>\n        <_>\n          33 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 2 2 -1.</_>\n        <_>\n          1 16 1 1 2.</_>\n        <_>\n          2 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 36 3 -1.</_>\n        <_>\n          12 9 12 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 8 4 -1.</_>\n        <_>\n          14 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 5 3 -1.</_>\n        <_>\n          17 10 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 1 2 -1.</_>\n        <_>\n          4 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          31 0 3 2 -1.</_>\n        <_>\n          31 0 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 3 -1.</_>\n        <_>\n          5 0 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 13 36 5 -1.</_>\n        <_>\n          0 13 18 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 3 -1.</_>\n        <_>\n          5 4 4 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          28 7 6 3 -1.</_>\n        <_>\n          30 9 2 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 7 3 6 -1.</_>\n        <_>\n          6 9 3 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 18 10 -1.</_>\n        <_>\n          23 5 9 5 2.</_>\n        <_>\n          14 10 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 18 10 -1.</_>\n        <_>\n          4 5 9 5 2.</_>\n        <_>\n          13 10 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          32 17 3 1 -1.</_>\n        <_>\n          33 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 3 1 -1.</_>\n        <_>\n          2 17 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 26 2 -1.</_>\n        <_>\n          18 0 13 1 2.</_>\n        <_>\n          5 1 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 27 9 -1.</_>\n        <_>\n          9 6 9 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 18 12 -1.</_>\n        <_>\n          13 6 18 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 4 1 -1.</_>\n        <_>\n          1 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          29 13 1 3 -1.</_>\n        <_>\n          28 14 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 6 -1.</_>\n        <_>\n          0 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          23 7 3 3 -1.</_>\n        <_>\n          24 7 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 12 6 -1.</_>\n        <_>\n          11 3 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 26 8 -1.</_>\n        <_>\n          18 10 13 4 2.</_>\n        <_>\n          5 14 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 9 6 -1.</_>\n        <_>\n          14 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 12 3 -1.</_>\n        <_>\n          18 13 4 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 12 3 -1.</_>\n        <_>\n          14 13 4 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 27 6 -1.</_>\n        <_>\n          13 8 9 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 5 4 -1.</_>\n        <_>\n          17 10 5 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 2 -1.</_>\n        <_>\n          0 0 8 1 2.</_>\n        <_>\n          8 1 8 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          22 0 8 8 -1.</_>\n        <_>\n          26 0 4 4 2.</_>\n        <_>\n          22 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 32 12 -1.</_>\n        <_>\n          1 0 16 6 2.</_>\n        <_>\n          17 6 16 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          28 7 6 10 -1.</_>\n        <_>\n          31 7 3 5 2.</_>\n        <_>\n          28 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 10 -1.</_>\n        <_>\n          2 7 3 5 2.</_>\n        <_>\n          5 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 10 3 3 -1.</_>\n        <_>\n          20 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 3 3 -1.</_>\n        <_>\n          13 11 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 6 2 -1.</_>\n        <_>\n          19 16 2 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 7 3 -1.</_>\n        <_>\n          13 12 7 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          25 13 3 2 -1.</_>\n        <_>\n          25 13 3 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 10 4 4 -1.</_>\n        <_>\n          13 11 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 16 18 2 -1.</_>\n        <_>\n          26 16 9 1 2.</_>\n        <_>\n          17 17 9 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 4 1 -1.</_>\n        <_>\n          9 13 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          34 1 2 1 -1.</_>\n        <_>\n          34 1 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 24 6 -1.</_>\n        <_>\n          13 6 8 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          33 16 3 2 -1.</_>\n        <_>\n          33 17 3 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 36 1 -1.</_>\n        <_>\n          18 17 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 1 2 1 -1.</_>\n        <_>\n          34 1 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 1 1 2 -1.</_>\n        <_>\n          2 1 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 0 8 10 -1.</_>\n        <_>\n          24 2 4 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 8 12 -1.</_>\n        <_>\n          12 4 4 6 2.</_>\n        <_>\n          16 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          26 6 6 6 -1.</_>\n        <_>\n          29 6 3 3 2.</_>\n        <_>\n          26 9 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 6 -1.</_>\n        <_>\n          5 6 2 3 2.</_>\n        <_>\n          7 9 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          29 5 2 4 -1.</_>\n        <_>\n          29 5 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 18 3 -1.</_>\n        <_>\n          7 5 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          29 13 2 3 -1.</_>\n        <_>\n          28 14 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 3 3 -1.</_>\n        <_>\n          8 6 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 16 22 2 -1.</_>\n        <_>\n          18 16 11 1 2.</_>\n        <_>\n          7 17 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 1 3 -1.</_>\n        <_>\n          0 3 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 20 6 -1.</_>\n        <_>\n          26 3 10 3 2.</_>\n        <_>\n          16 6 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 6 -1.</_>\n        <_>\n          12 5 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 34 8 -1.</_>\n        <_>\n          18 8 17 4 2.</_>\n        <_>\n          1 12 17 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 8 8 -1.</_>\n        <_>\n          14 9 4 4 2.</_>\n        <_>\n          18 13 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 0 1 3 -1.</_>\n        <_>\n          35 1 1 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 3 5 -1.</_>\n        <_>\n          16 8 1 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 10 1 -1.</_>\n        <_>\n          19 0 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 3 9 6 -1.</_>\n        <_>\n          7 5 9 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 24 6 -1.</_>\n        <_>\n          14 8 8 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 27 6 -1.</_>\n        <_>\n          13 10 9 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 27 6 -1.</_>\n        <_>\n          14 6 9 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 5 6 -1.</_>\n        <_>\n          5 8 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 0 1 2 -1.</_>\n        <_>\n          35 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 10 3 -1.</_>\n        <_>\n          3 4 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          29 5 2 4 -1.</_>\n        <_>\n          29 5 1 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 28 16 -1.</_>\n        <_>\n          3 0 14 8 2.</_>\n        <_>\n          17 8 14 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          31 0 4 2 -1.</_>\n        <_>\n          31 0 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 3 9 -1.</_>\n        <_>\n          4 12 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          32 16 4 2 -1.</_>\n        <_>\n          32 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 1 10 -1.</_>\n        <_>\n          17 0 1 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 4 14 8 -1.</_>\n        <_>\n          17 4 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 11 4 -1.</_>\n        <_>\n          6 2 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 0 1 2 -1.</_>\n        <_>\n          35 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 1 2 -1.</_>\n        <_>\n          0 1 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          33 0 2 1 -1.</_>\n        <_>\n          33 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 1 2 -1.</_>\n        <_>\n          3 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 17 36 1 -1.</_>\n        <_>\n          9 17 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 3 1 -1.</_>\n        <_>\n          8 14 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 4 14 8 -1.</_>\n        <_>\n          17 4 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 4 2 -1.</_>\n        <_>\n          0 17 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 10 3 -1.</_>\n        <_>\n          13 13 10 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 36 6 -1.</_>\n        <_>\n          18 12 18 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 27 6 -1.</_>\n        <_>\n          14 5 9 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 5 3 -1.</_>\n        <_>\n          8 6 5 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 12 4 -1.</_>\n        <_>\n          15 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 8 4 -1.</_>\n        <_>\n          15 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 6 4 -1.</_>\n        <_>\n          16 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 5 3 -1.</_>\n        <_>\n          14 11 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          25 3 6 4 -1.</_>\n        <_>\n          25 4 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 8 -1.</_>\n        <_>\n          3 8 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 4 5 6 -1.</_>\n        <_>\n          27 6 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 9 -1.</_>\n        <_>\n          4 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          21 9 2 4 -1.</_>\n        <_>\n          21 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 34 4 -1.</_>\n        <_>\n          1 10 17 2 2.</_>\n        <_>\n          18 12 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 15 2 3 -1.</_>\n        <_>\n          34 16 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 2 2 -1.</_>\n        <_>\n          3 0 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          33 0 1 2 -1.</_>\n        <_>\n          33 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 8 -1.</_>\n        <_>\n          6 2 10 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 30 6 -1.</_>\n        <_>\n          13 8 10 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 10 4 -1.</_>\n        <_>\n          13 8 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 6 12 -1.</_>\n        <_>\n          19 5 3 6 2.</_>\n        <_>\n          16 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 6 -1.</_>\n        <_>\n          8 3 4 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 7 33 6 -1.</_>\n        <_>\n          13 9 11 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 30 3 -1.</_>\n        <_>\n          13 7 10 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 6 3 -1.</_>\n        <_>\n          15 12 6 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 12 -1.</_>\n        <_>\n          14 5 3 6 2.</_>\n        <_>\n          17 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 26 6 -1.</_>\n        <_>\n          18 12 13 3 2.</_>\n        <_>\n          5 15 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 27 3 -1.</_>\n        <_>\n          13 13 9 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 11 4 3 -1.</_>\n        <_>\n          16 12 4 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 4 2 -1.</_>\n        <_>\n          6 13 2 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          34 17 2 1 -1.</_>\n        <_>\n          34 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 1 12 -1.</_>\n        <_>\n          16 0 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 17 34 1 -1.</_>\n        <_>\n          2 17 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 18 4 -1.</_>\n        <_>\n          5 4 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 17 2 1 -1.</_>\n        <_>\n          34 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 2 -1.</_>\n        <_>\n          0 1 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 16 3 -1.</_>\n        <_>\n          15 6 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 3 3 -1.</_>\n        <_>\n          13 10 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 4 8 14 -1.</_>\n        <_>\n          22 4 4 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 20 6 -1.</_>\n        <_>\n          12 5 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          26 3 6 6 -1.</_>\n        <_>\n          28 5 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 6 -1.</_>\n        <_>\n          8 5 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          34 0 2 3 -1.</_>\n        <_>\n          34 0 1 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 16 2 2 -1.</_>\n        <_>\n          0 17 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          30 6 4 8 -1.</_>\n        <_>\n          31 7 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 7 4 -1.</_>\n        <_>\n          5 7 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          20 4 8 14 -1.</_>\n        <_>\n          22 4 4 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 14 -1.</_>\n        <_>\n          10 4 4 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 17 6 1 -1.</_>\n        <_>\n          19 17 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 6 -1.</_>\n        <_>\n          10 0 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 22 18 -1.</_>\n        <_>\n          8 0 11 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 8 12 -1.</_>\n        <_>\n          13 2 4 6 2.</_>\n        <_>\n          17 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 14 8 -1.</_>\n        <_>\n          18 10 7 4 2.</_>\n        <_>\n          11 14 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 2 2 -1.</_>\n        <_>\n          1 16 1 1 2.</_>\n        <_>\n          2 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 0 2 1 -1.</_>\n        <_>\n          34 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 24 4 -1.</_>\n        <_>\n          12 3 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 2 3 -1.</_>\n        <_>\n          19 2 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 1 2 -1.</_>\n        <_>\n          2 0 1 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 3 6 8 -1.</_>\n        <_>\n          18 3 3 4 2.</_>\n        <_>\n          15 7 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 4 2 -1.</_>\n        <_>\n          14 6 4 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 30 9 -1.</_>\n        <_>\n          13 10 10 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 12 9 -1.</_>\n        <_>\n          12 8 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 16 5 -1.</_>\n        <_>\n          14 8 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          30 1 4 10 -1.</_>\n        <_>\n          31 2 2 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 0 10 8 -1.</_>\n        <_>\n          11 2 10 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          32 2 2 14 -1.</_>\n        <_>\n          32 2 1 14 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 14 2 -1.</_>\n        <_>\n          4 2 14 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          30 14 6 4 -1.</_>\n        <_>\n          30 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 1 4 -1.</_>\n        <_>\n          11 15 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 14 18 -1.</_>\n        <_>\n          18 0 7 9 2.</_>\n        <_>\n          11 9 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 9 -1.</_>\n        <_>\n          10 1 10 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          21 3 8 3 -1.</_>\n        <_>\n          23 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 2 4 -1.</_>\n        <_>\n          13 10 2 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 11 2 -1.</_>\n        <_>\n          14 10 11 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 36 9 -1.</_>\n        <_>\n          12 5 12 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 12 2 6 -1.</_>\n        <_>\n          34 15 2 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 14 6 -1.</_>\n        <_>\n          11 6 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          31 0 4 1 -1.</_>\n        <_>\n          31 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 1 -1.</_>\n        <_>\n          3 0 2 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 14 6 4 -1.</_>\n        <_>\n          21 14 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 4 -1.</_>\n        <_>\n          13 14 2 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 36 1 -1.</_>\n        <_>\n          9 14 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 2 -1.</_>\n        <_>\n          5 0 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          26 3 5 3 -1.</_>\n        <_>\n          26 4 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 1 3 -1.</_>\n        <_>\n          15 9 1 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 11 2 3 -1.</_>\n        <_>\n          21 12 2 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 4 -1.</_>\n        <_>\n          8 6 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          31 0 2 2 -1.</_>\n        <_>\n          31 0 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 3 9 -1.</_>\n        <_>\n          6 7 3 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 11 2 -1.</_>\n        <_>\n          19 0 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 2 -1.</_>\n        <_>\n          5 0 2 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          22 0 14 4 -1.</_>\n        <_>\n          29 0 7 2 2.</_>\n        <_>\n          22 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 4 13 -1.</_>\n        <_>\n          15 1 2 13 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 3 8 4 -1.</_>\n        <_>\n          23 3 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 8 4 -1.</_>\n        <_>\n          9 3 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          32 14 2 2 -1.</_>\n        <_>\n          33 14 1 1 2.</_>\n        <_>\n          32 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 2 2 -1.</_>\n        <_>\n          2 14 1 1 2.</_>\n        <_>\n          3 15 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          35 5 1 12 -1.</_>\n        <_>\n          35 9 1 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 1 9 -1.</_>\n        <_>\n          0 10 1 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 15 6 -1.</_>\n        <_>\n          12 4 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 2 1 -1.</_>\n        <_>\n          1 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 17 2 1 -1.</_>\n        <_>\n          34 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 2 1 -1.</_>\n        <_>\n          1 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 16 10 -1.</_>\n        <_>\n          15 0 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 24 8 -1.</_>\n        <_>\n          5 10 12 4 2.</_>\n        <_>\n          17 14 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 4 3 3 -1.</_>\n        <_>\n          27 5 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 12 -1.</_>\n        <_>\n          6 6 7 6 2.</_>\n        <_>\n          13 12 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 24 6 -1.</_>\n        <_>\n          14 7 8 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 4 -1.</_>\n        <_>\n          12 7 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          30 7 6 10 -1.</_>\n        <_>\n          33 7 3 5 2.</_>\n        <_>\n          30 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 6 -1.</_>\n        <_>\n          3 12 3 3 2.</_>\n        <_>\n          6 15 3 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 13 2 -1.</_>\n        <_>\n          20 0 13 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 24 6 -1.</_>\n        <_>\n          14 12 8 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 8 8 -1.</_>\n        <_>\n          19 4 4 4 2.</_>\n        <_>\n          15 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 8 8 -1.</_>\n        <_>\n          13 4 4 4 2.</_>\n        <_>\n          17 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 16 2 2 -1.</_>\n        <_>\n          34 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 3 -1.</_>\n        <_>\n          12 7 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          21 7 4 4 -1.</_>\n        <_>\n          21 8 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 30 4 -1.</_>\n        <_>\n          2 8 15 2 2.</_>\n        <_>\n          17 10 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          27 4 3 4 -1.</_>\n        <_>\n          27 5 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 4 -1.</_>\n        <_>\n          5 5 3 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          34 16 2 2 -1.</_>\n        <_>\n          34 16 1 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 34 2 -1.</_>\n        <_>\n          0 16 17 1 2.</_>\n        <_>\n          17 17 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 15 12 -1.</_>\n        <_>\n          12 9 15 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 36 6 -1.</_>\n        <_>\n          12 10 12 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          25 4 6 2 -1.</_>\n        <_>\n          25 5 6 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 2 1 -1.</_>\n        <_>\n          1 17 1 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 9 9 -1.</_>\n        <_>\n          19 0 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 9 -1.</_>\n        <_>\n          14 0 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 5 16 5 -1.</_>\n        <_>\n          24 5 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 16 9 -1.</_>\n        <_>\n          4 3 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 26 12 -1.</_>\n        <_>\n          20 6 13 6 2.</_>\n        <_>\n          7 12 13 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 24 12 -1.</_>\n        <_>\n          5 6 12 6 2.</_>\n        <_>\n          17 12 12 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 3 12 -1.</_>\n        <_>\n          18 4 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 1 -1.</_>\n        <_>\n          3 13 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          21 12 14 2 -1.</_>\n        <_>\n          28 12 7 1 2.</_>\n        <_>\n          21 13 7 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 2 3 -1.</_>\n        <_>\n          2 13 1 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          26 8 3 2 -1.</_>\n        <_>\n          27 9 1 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 8 2 3 -1.</_>\n        <_>\n          9 9 2 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 18 18 -1.</_>\n        <_>\n          12 0 9 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 3 3 -1.</_>\n        <_>\n          7 10 3 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          28 5 5 6 -1.</_>\n        <_>\n          28 7 5 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 9 8 -1.</_>\n        <_>\n          9 1 9 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 36 2 -1.</_>\n        <_>\n          18 0 18 1 2.</_>\n        <_>\n          0 1 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 26 6 -1.</_>\n        <_>\n          5 0 13 3 2.</_>\n        <_>\n          18 3 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          28 3 3 3 -1.</_>\n        <_>\n          28 4 3 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 5 3 -1.</_>\n        <_>\n          5 4 5 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 8 2 -1.</_>\n        <_>\n          16 12 4 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 9 14 -1.</_>\n        <_>\n          16 0 3 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          23 0 10 1 -1.</_>\n        <_>\n          23 0 5 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 14 2 2 -1.</_>\n        <_>\n          8 14 1 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 12 36 3 -1.</_>\n        <_>\n          12 13 12 1 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 34 4 -1.</_>\n        <_>\n          0 13 17 2 2.</_>\n        <_>\n          17 15 17 2 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/haarcascades/haarcascade_upperbody.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n   22x18 upperbody detector (see the detailed description below). \n\n//////////////////////////////////////////////////////////////////////////\n| Contributors License Agreement\n| IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n|   By downloading, copying, installing or using the software you agree \n|   to this license.\n|   If you do not agree to this license, do not download, install,\n|   copy or use the software.\n|\n| Copyright (c) 2004, Hannes Kruppa and Bernt Schiele (ETH Zurich, Switzerland).\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\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|    * The name of Contributor may not used to endorse or promote products \n|      derived 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\n| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n| PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n| PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n| LIABILITY, 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.  Back to\n| Top\n//////////////////////////////////////////////////////////////////////////\n\n\"Haar\"-based Detectors For Pedestrian Detection\n===============================================\nby Hannes Kruppa and Bernt Schiele, ETH Zurich, Switzerland\n\nThis archive provides the following three detectors:\n- upper body detector (most fun, useful in many scenarios!)\n- lower body detector\n- full body detector\n\nThese detectors have been successfully applied to pedestrian detection\nin still images. They can be directly passed as parameters to the\nprogram HaarFaceDetect.\nNOTE: These detectors deal with frontal and backside views but not\nwith side views (also see \"Known limitations\" below).\n\nRESEARCHERS:\nIf you are using any of the detectors or involved ideas please cite\nthis paper (available at www.vision.ethz.ch/publications/):\n\n@InProceedings{Kruppa03-bmvc,\n  author =       \"Hannes Kruppa, Modesto Castrillon-Santana and Bernt Schiele\",\n  title =        \"Fast and Robust Face Finding via Local Context.\"\n  booktitle =    \"Joint IEEE International Workshop on Visual Surveillance and Performance Evaluation of Tracking and Surveillance\"\n  year =         \"2003\",\n  month =        \"October\"\n}\n\nCOMMERCIAL:\nIf you have any commercial interest in this work please contact \nhkruppa@inf.ethz.ch\n\n\nADDITIONAL INFORMATION \n====================== \nCheck out the demo movie, e.g. using mplayer or any (Windows/Linux-) player\nthat can play back .mpg movies.\nUnder Linux that's:\n> ffplay demo.mpg\nor:\n> mplayer demo.mpg\n\nThe movie shows a person walking towards the camera in a realistic\nindoor setting. Using ffplay or mplayer you can pause and continue the\nmovie by pressing the space bar.\n\nDetections coming from the different detectors are visualized using\ndifferent line styles: \nupper body : dotted line\nlower body : dashed line\nfull body  : solid line\n\nYou will notice that successful detections containing the target do\nnot sit tightly on the body but also include some of the background\nleft and right.  This is not a bug but accurately reflects the\nemployed training data which also includes portions of the background\nto ensure proper silhouette representation. If you want to get a\nfeeling for the training data check out the CBCL data set:\nhttp://www.ai.mit.edu/projects/cbcl/software-datasets/PedestrianData.html\n\nThere is also a small number of false alarms in this sequence.  \nNOTE: This is per frame detection, not tracking (which is also one of\nthe reasons why it is not mislead by the person's shadow on the back\nwall). \n\nOn an Intel Xeon 1.7GHz machine the detectors operate at something\nbetween 6Hz to 14 Hz (on 352 x 288 frames per second) depending on the\ndetector. The detectors work as well on much lower image resolutions\nwhich is always an interesting possibility for speed-ups or\n\"coarse-to-fine\" search strategies.\n\nAdditional information e.g. on training parameters, detector\ncombination, detecting other types of objects (e.g. cars) etc. is\navailable in my PhD thesis report (available end of June). Check out\nwww.vision.ethz.ch/kruppa/\n\n\nKNOWN LIMITATIONS\n==================\n1) the detectors only support frontal and back views but not sideviews.\n   Sideviews are trickier and it makes a lot of sense to include additional\n   modalities for their detection, e.g. motion information. I recommend\n   Viola and Jones' ICCV 2003 paper if this further interests you.\n\n2) dont expect these detectors to be as accurate as a frontal face detector.\n   A frontal face as a pattern is pretty distinct with respect to other\n   patterns occuring in the world (i.e. image \"background\"). This is not so\n   for upper, lower and especially full bodies, because they have to rely\n   on fragile silhouette information rather than internal (facial) features.\n   Still, we found especially the upper body detector to perform amazingly well.\n   In contrast to a face detector these detectors will also work at very low\n   image resolutions \n\nAcknowledgements\n================\nThanks to Martin Spengler, ETH Zurich, for providing the demo movie.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>18</height>\n  <width>22</width>\n  <stageParams>\n    <maxWeakCount>152</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>30</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>20</maxWeakCount>\n      <stageThreshold>-1.1264339685440063e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 -1.3696029782295227e-02</internalNodes>\n          <leafValues>\n            4.5076468586921692e-01 -4.2179030179977417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 1.2441449798643589e-02</internalNodes>\n          <leafValues>\n            1.6493250429630280e-01 -7.4793487787246704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 -2.7094660326838493e-03</internalNodes>\n          <leafValues>\n            3.1004700064659119e-01 -3.7617141008377075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3 -1.0008010268211365e-01</internalNodes>\n          <leafValues>\n            7.6182198524475098e-01 -7.4556976556777954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 -2.5114119052886963e-01</internalNodes>\n          <leafValues>\n            -6.4154028892517090e-01 1.5139220654964447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 -1.0510650277137756e-01</internalNodes>\n          <leafValues>\n            7.1459370851516724e-01 -1.4498579502105713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 -8.8448017835617065e-02</internalNodes>\n          <leafValues>\n            7.5773179531097412e-01 -6.8586893379688263e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 1.0874910280108452e-02</internalNodes>\n          <leafValues>\n            1.4610609412193298e-01 -5.4263710975646973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 1.2690570205450058e-02</internalNodes>\n          <leafValues>\n            1.1674589663743973e-01 -4.9649459123611450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 -3.2198399305343628e-02</internalNodes>\n          <leafValues>\n            -3.8529390096664429e-01 9.8437972366809845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 -3.4077179152518511e-03</internalNodes>\n          <leafValues>\n            2.5200870633125305e-01 -2.2382549941539764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 3.0324390158057213e-02</internalNodes>\n          <leafValues>\n            -1.0534449666738510e-01 6.5735417604446411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 4.1930507868528366e-03</internalNodes>\n          <leafValues>\n            1.2872399389743805e-01 -5.3160661458969116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 8.0501407384872437e-02</internalNodes>\n          <leafValues>\n            4.1696660220623016e-02 -7.2123032808303833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -3.4822080284357071e-02</internalNodes>\n          <leafValues>\n            -4.9751108884811401e-01 1.3959939777851105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 7.5519368983805180e-03</internalNodes>\n          <leafValues>\n            -9.2147678136825562e-02 1.1294340342283249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 -1.7572140321135521e-02</internalNodes>\n          <leafValues>\n            -5.6784427165985107e-01 9.3572810292243958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 5.2012042142450809e-03</internalNodes>\n          <leafValues>\n            -7.9238079488277435e-02 6.1878960579633713e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 -3.0798919498920441e-02</internalNodes>\n          <leafValues>\n            -5.6658512353897095e-01 9.5271490514278412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 -1.3465429656207561e-03</internalNodes>\n          <leafValues>\n            2.4011470377445221e-01 -2.6026639342308044e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>33</maxWeakCount>\n      <stageThreshold>-1.1226719617843628e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 20 1.9108939450234175e-03</internalNodes>\n          <leafValues>\n            -4.6240958571434021e-01 3.0612170696258545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 9.5464065670967102e-03</internalNodes>\n          <leafValues>\n            9.1956138610839844e-02 -5.3501170873641968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 -4.3402809649705887e-02</internalNodes>\n          <leafValues>\n            5.6817841529846191e-01 -1.1284930258989334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 5.0386030226945877e-02</internalNodes>\n          <leafValues>\n            -8.0316931009292603e-02 7.3521858453750610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 -6.8480317713692784e-04</internalNodes>\n          <leafValues>\n            2.5798648595809937e-01 -2.8049409389495850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 1.1548049747943878e-01</internalNodes>\n          <leafValues>\n            9.2065572738647461e-02 -7.5556892156600952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 -1.9348369678482413e-03</internalNodes>\n          <leafValues>\n            2.9440790414810181e-01 -2.4102710187435150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 -4.3528810143470764e-02</internalNodes>\n          <leafValues>\n            4.9202969670295715e-01 -3.9650101214647293e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -3.0218150466680527e-02</internalNodes>\n          <leafValues>\n            7.7227920293807983e-01 -8.6786523461341858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 2.4536589160561562e-02</internalNodes>\n          <leafValues>\n            9.5944821834564209e-02 -4.8642969131469727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 2.3958990350365639e-02</internalNodes>\n          <leafValues>\n            1.0437840223312378e-01 -5.1219838857650757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 -2.5370830669999123e-02</internalNodes>\n          <leafValues>\n            -3.1981548666954041e-01 9.1486573219299316e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 -1.8606419907882810e-03</internalNodes>\n          <leafValues>\n            2.2783969342708588e-01 -2.4307970702648163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 2.2550800815224648e-02</internalNodes>\n          <leafValues>\n            6.9207556545734406e-02 -3.0054280161857605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -4.9752090126276016e-02</internalNodes>\n          <leafValues>\n            -6.1078047752380371e-01 9.4472773373126984e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 -2.6602389290928841e-02</internalNodes>\n          <leafValues>\n            5.9581768512725830e-01 -9.2046052217483521e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 1.0760000348091125e-01</internalNodes>\n          <leafValues>\n            1.0278519988059998e-01 -5.4303371906280518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 1.7690699547529221e-02</internalNodes>\n          <leafValues>\n            6.6057138144969940e-02 -6.3213908672332764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 -6.2409918755292892e-02</internalNodes>\n          <leafValues>\n            6.8724197149276733e-01 -6.7070558667182922e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 -1.9801619928330183e-03</internalNodes>\n          <leafValues>\n            9.4411551952362061e-02 -8.7819486856460571e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 6.3668429851531982e-02</internalNodes>\n          <leafValues>\n            1.1531739681959152e-01 -4.8129761219024658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 -3.0797829851508141e-02</internalNodes>\n          <leafValues>\n            3.5854768753051758e-01 -1.2593799829483032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 -1.8353419727645814e-04</internalNodes>\n          <leafValues>\n            1.4788399636745453e-01 -2.8546810150146484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 1.7074620118364692e-03</internalNodes>\n          <leafValues>\n            7.9929657280445099e-02 -2.5233370065689087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 -1.5325199812650681e-02</internalNodes>\n          <leafValues>\n            -5.7711857557296753e-01 9.8908327519893646e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 4.1389189660549164e-02</internalNodes>\n          <leafValues>\n            -6.5550796687602997e-02 5.7363802194595337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 -4.5577771379612386e-04</internalNodes>\n          <leafValues>\n            2.2593089938163757e-01 -1.9105580449104309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 -1.3455689884722233e-02</internalNodes>\n          <leafValues>\n            -4.0233930945396423e-01 8.6477622389793396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 -3.7978399544954300e-02</internalNodes>\n          <leafValues>\n            5.5257588624954224e-01 -8.1541016697883606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 -1.7197500914335251e-02</internalNodes>\n          <leafValues>\n            -1.8363009393215179e-01 5.1999870687723160e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 -1.2581580085679889e-03</internalNodes>\n          <leafValues>\n            1.8830040097236633e-01 -2.5726661086082458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 6.7725107073783875e-02</internalNodes>\n          <leafValues>\n            -8.0956451594829559e-02 7.1803241968154907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 52 3.5489428788423538e-02</internalNodes>\n          <leafValues>\n            1.0068070143461227e-01 -5.3774142265319824e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>29</maxWeakCount>\n      <stageThreshold>-1.0127470493316650e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 53 -5.3695798851549625e-03</internalNodes>\n          <leafValues>\n            2.7479499578475952e-01 -3.4178960323333740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 6.2695867381989956e-04</internalNodes>\n          <leafValues>\n            -9.8646633327007294e-02 1.0728420317173004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 -1.6484269872307777e-02</internalNodes>\n          <leafValues>\n            -6.4972907304763794e-01 9.6037752926349640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 -2.2104099392890930e-02</internalNodes>\n          <leafValues>\n            -4.5984488725662231e-01 1.6304630041122437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 1.1904139816761017e-01</internalNodes>\n          <leafValues>\n            -9.9600397050380707e-02 7.3729759454727173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 -2.0222070161253214e-03</internalNodes>\n          <leafValues>\n            2.1029269695281982e-01 -2.4577130377292633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 6.7500352859497070e-02</internalNodes>\n          <leafValues>\n            -1.2467789649963379e-01 5.7654231786727905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 -1.9655939936637878e-01</internalNodes>\n          <leafValues>\n            -6.0891747474670410e-01 9.9672056734561920e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 4.9431171268224716e-02</internalNodes>\n          <leafValues>\n            1.3752749562263489e-01 -4.5580869913101196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 2.3380089551210403e-02</internalNodes>\n          <leafValues>\n            4.7141890972852707e-02 -3.5027709603309631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 1.3998650247231126e-03</internalNodes>\n          <leafValues>\n            -2.0643049478530884e-01 2.4322299659252167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 1.1432689614593983e-02</internalNodes>\n          <leafValues>\n            5.5187370628118515e-02 -3.2619899511337280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 4.8775069415569305e-02</internalNodes>\n          <leafValues>\n            -6.8992510437965393e-02 7.1171808242797852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 6.5284021198749542e-02</internalNodes>\n          <leafValues>\n            3.7155740428715944e-03 5.9318971633911133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 6.1603228095918894e-04</internalNodes>\n          <leafValues>\n            -2.3272520303726196e-01 2.0441530644893646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -1.0527499951422215e-02</internalNodes>\n          <leafValues>\n            -3.1773790717124939e-01 1.0171309858560562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 1.6231339424848557e-02</internalNodes>\n          <leafValues>\n            9.1734193265438080e-02 -4.7143009305000305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 3.8958500954322517e-04</internalNodes>\n          <leafValues>\n            -1.2997549772262573e-01 1.3475489616394043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 -4.4165689498186111e-02</internalNodes>\n          <leafValues>\n            -6.0331028699874878e-01 6.4766876399517059e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 -1.3663209974765778e-02</internalNodes>\n          <leafValues>\n            -5.2762842178344727e-01 6.3485741615295410e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 -8.8231859263032675e-04</internalNodes>\n          <leafValues>\n            1.4510250091552734e-01 -2.7845200896263123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 -2.7819190174341202e-02</internalNodes>\n          <leafValues>\n            4.3640869855880737e-01 -8.5191860795021057e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 6.2560990452766418e-02</internalNodes>\n          <leafValues>\n            1.0027889907360077e-01 -4.2235919833183289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 -4.4808178790844977e-04</internalNodes>\n          <leafValues>\n            1.4851489663124084e-01 -1.7731289565563202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 -2.1363180130720139e-02</internalNodes>\n          <leafValues>\n            -6.1334460973739624e-01 6.0539398342370987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 -6.9122329354286194e-02</internalNodes>\n          <leafValues>\n            -8.6845761537551880e-01 3.9347749203443527e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 -3.0542839318513870e-02</internalNodes>\n          <leafValues>\n            -6.4021718502044678e-01 4.9593821167945862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 -1.0101160034537315e-02</internalNodes>\n          <leafValues>\n            -1.6199150681495667e-01 5.7256899774074554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 -2.2010109387338161e-04</internalNodes>\n          <leafValues>\n            2.1350930631160736e-01 -2.0198999345302582e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>42</maxWeakCount>\n      <stageThreshold>-1.0684469938278198e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 82 5.7967850007116795e-03</internalNodes>\n          <leafValues>\n            -3.3844178915023804e-01 2.5066271424293518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 6.3795179128646851e-02</internalNodes>\n          <leafValues>\n            -4.2111620306968689e-02 3.5746571421623230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 -6.4332038164138794e-02</internalNodes>\n          <leafValues>\n            -5.0660789012908936e-01 1.1717739701271057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 -1.1574289947748184e-01</internalNodes>\n          <leafValues>\n            -5.6678497791290283e-01 9.5880903303623199e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 -3.9005130529403687e-03</internalNodes>\n          <leafValues>\n            -4.1498228907585144e-01 1.4858320355415344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 1.2512929737567902e-02</internalNodes>\n          <leafValues>\n            5.3696669638156891e-02 -1.4163960516452789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 1.5871099894866347e-03</internalNodes>\n          <leafValues>\n            -2.5962340831756592e-01 1.9418330490589142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 1.6291120648384094e-01</internalNodes>\n          <leafValues>\n            -6.1243768781423569e-02 7.8567212820053101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 -3.3258220553398132e-01</internalNodes>\n          <leafValues>\n            7.8020131587982178e-01 -4.4036459177732468e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 -1.0288899764418602e-02</internalNodes>\n          <leafValues>\n            -1.5289680659770966e-01 6.2096230685710907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 2.8956029564142227e-02</internalNodes>\n          <leafValues>\n            8.4707796573638916e-02 -4.7820711135864258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 -3.2221511355601251e-04</internalNodes>\n          <leafValues>\n            1.3951259851455688e-01 -1.8819390237331390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 1.5835289657115936e-01</internalNodes>\n          <leafValues>\n            6.6667810082435608e-02 -5.4572361707687378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 -4.2584311217069626e-02</internalNodes>\n          <leafValues>\n            2.7040338516235352e-01 -5.6654509156942368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 2.7505140751600266e-02</internalNodes>\n          <leafValues>\n            4.9271158874034882e-02 -7.3157638311386108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 8.6879700422286987e-02</internalNodes>\n          <leafValues>\n            -1.7532400786876678e-02 8.6782652139663696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -2.0130439661443233e-03</internalNodes>\n          <leafValues>\n            1.6593940556049347e-01 -2.5266230106353760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 4.2330170981585979e-04</internalNodes>\n          <leafValues>\n            9.4223551452159882e-02 -2.4629700183868408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 1.5194499865174294e-02</internalNodes>\n          <leafValues>\n            7.3695637285709381e-02 -5.0068622827529907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 -6.1203669756650925e-03</internalNodes>\n          <leafValues>\n            2.1381899714469910e-01 -1.6738100349903107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 2.0660240203142166e-02</internalNodes>\n          <leafValues>\n            -8.0636158585548401e-02 5.7828348875045776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 -6.0398250818252563e-02</internalNodes>\n          <leafValues>\n            -6.3411772251129150e-01 5.0899010151624680e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 3.5386480391025543e-02</internalNodes>\n          <leafValues>\n            7.3191151022911072e-02 -5.6426662206649780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 -6.5997838973999023e-02</internalNodes>\n          <leafValues>\n            3.2833808660507202e-01 -2.6310259476304054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 1.1004590196534991e-03</internalNodes>\n          <leafValues>\n            -2.3114609718322754e-01 2.0206519961357117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 8.4488153457641602e-02</internalNodes>\n          <leafValues>\n            7.4589841067790985e-02 -4.3710339069366455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 -2.9235990718007088e-02</internalNodes>\n          <leafValues>\n            6.5064769983291626e-01 -5.4531838744878769e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 -3.3916950225830078e-02</internalNodes>\n          <leafValues>\n            -2.8804349899291992e-01 3.2172881066799164e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 -7.9108700156211853e-03</internalNodes>\n          <leafValues>\n            -3.3660379052162170e-01 1.0100690275430679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 5.1930431276559830e-02</internalNodes>\n          <leafValues>\n            3.2920960336923599e-02 -1.3176530599594116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 -6.8586103618144989e-02</internalNodes>\n          <leafValues>\n            5.2153557538986206e-01 -6.6718578338623047e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 -1.9451669650152326e-03</internalNodes>\n          <leafValues>\n            1.5396790206432343e-01 -1.9895760715007782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 7.1366228163242340e-02</internalNodes>\n          <leafValues>\n            -8.2927159965038300e-02 4.5292338728904724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -2.6624239981174469e-02</internalNodes>\n          <leafValues>\n            -4.4009739160537720e-01 1.0267119854688644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 2.5266060605645180e-02</internalNodes>\n          <leafValues>\n            5.5799201130867004e-02 -5.5569338798522949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 5.5255689658224583e-03</internalNodes>\n          <leafValues>\n            -1.3640299439430237e-01 2.8255200386047363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 -2.9929999727755785e-03</internalNodes>\n          <leafValues>\n            -3.2421571016311646e-01 1.2122060358524323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 2.2192109376192093e-02</internalNodes>\n          <leafValues>\n            -6.0741018503904343e-02 4.3473160266876221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 -9.4268741086125374e-03</internalNodes>\n          <leafValues>\n            -3.3458408713340759e-01 1.0029699653387070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 3.4395330585539341e-03</internalNodes>\n          <leafValues>\n            -8.3829909563064575e-02 1.7925940454006195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 -3.2996390946209431e-03</internalNodes>\n          <leafValues>\n            1.9990429282188416e-01 -2.1068470180034637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 2.6152150705456734e-02</internalNodes>\n          <leafValues>\n            -8.0667406320571899e-02 3.5581269860267639e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>45</maxWeakCount>\n      <stageThreshold>-1.1520069837570190e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 124 -2.2792650386691093e-02</internalNodes>\n          <leafValues>\n            4.0725260972976685e-01 -3.3609920740127563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 -5.7334620505571365e-03</internalNodes>\n          <leafValues>\n            2.6882189512252808e-01 -2.2775350511074066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 9.6941202878952026e-02</internalNodes>\n          <leafValues>\n            -8.0905012786388397e-02 7.4328738451004028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -2.8288999572396278e-02</internalNodes>\n          <leafValues>\n            4.5610108971595764e-01 -6.1096340417861938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 3.8522849790751934e-03</internalNodes>\n          <leafValues>\n            -2.5241801142692566e-01 2.0907109975814819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 2.3100129328668118e-03</internalNodes>\n          <leafValues>\n            -1.4713400602340698e-01 1.5460389852523804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 1.1361920041963458e-03</internalNodes>\n          <leafValues>\n            1.7680479586124420e-01 -3.0537289381027222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 2.4962890893220901e-02</internalNodes>\n          <leafValues>\n            -1.2652909755706787e-01 3.7442651391029358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 -5.8984099887311459e-03</internalNodes>\n          <leafValues>\n            2.6738989353179932e-01 -1.7762570083141327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 1.1804900132119656e-02</internalNodes>\n          <leafValues>\n            6.6077977418899536e-02 -3.3482131361961365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 6.4400159753859043e-03</internalNodes>\n          <leafValues>\n            1.0994800180196762e-01 -3.6303481459617615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 -8.9407369494438171e-02</internalNodes>\n          <leafValues>\n            -4.3580460548400879e-01 1.4944310300052166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 -3.1404230743646622e-02</internalNodes>\n          <leafValues>\n            6.9523447751998901e-01 -5.4854288697242737e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 -1.4607949554920197e-01</internalNodes>\n          <leafValues>\n            -2.5650060176849365e-01 5.6956540793180466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 2.1142649929970503e-03</internalNodes>\n          <leafValues>\n            -2.4987550079822540e-01 1.6792559623718262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -1.5119359828531742e-02</internalNodes>\n          <leafValues>\n            -3.0179870128631592e-01 1.0393589735031128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 2.5620959699153900e-02</internalNodes>\n          <leafValues>\n            -7.4821300804615021e-02 5.3600782155990601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 -1.4417800307273865e-01</internalNodes>\n          <leafValues>\n            -2.0490899682044983e-01 7.4457786977291107e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 2.5954779237508774e-02</internalNodes>\n          <leafValues>\n            -9.0574868023395538e-02 4.8442208766937256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 -2.1130720153450966e-02</internalNodes>\n          <leafValues>\n            -2.2689810395240784e-01 6.4876057207584381e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 1.6474459320306778e-02</internalNodes>\n          <leafValues>\n            1.0768000036478043e-01 -3.6570599675178528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 1.0922150313854218e-01</internalNodes>\n          <leafValues>\n            5.6827351450920105e-02 -3.4728559851646423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -7.4581061198841780e-05</internalNodes>\n          <leafValues>\n            1.3904270529747009e-01 -2.5942608714103699e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 -2.7753600850701332e-02</internalNodes>\n          <leafValues>\n            3.8111299276351929e-01 -4.2896129190921783e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 3.2721430063247681e-02</internalNodes>\n          <leafValues>\n            -9.0872153639793396e-02 3.9289179444313049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 5.5606258101761341e-03</internalNodes>\n          <leafValues>\n            8.4002248942852020e-02 -1.9396039843559265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 -1.0710290074348450e-01</internalNodes>\n          <leafValues>\n            -5.8981472253799438e-01 5.6862760335206985e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 -8.0517623573541641e-03</internalNodes>\n          <leafValues>\n            1.1790599673986435e-01 -1.1595659703016281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 -1.3850019872188568e-01</internalNodes>\n          <leafValues>\n            -9.0805321931838989e-01 4.1411358863115311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 2.8620919212698936e-02</internalNodes>\n          <leafValues>\n            1.9928589463233948e-02 -7.3697662353515625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 2.6208970695734024e-02</internalNodes>\n          <leafValues>\n            -6.1577551066875458e-02 6.0899931192398071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 2.6527039706707001e-02</internalNodes>\n          <leafValues>\n            5.7193860411643982e-02 -6.2992326915264130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 -4.4622488319873810e-02</internalNodes>\n          <leafValues>\n            -3.3318150043487549e-01 9.3214571475982666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -1.4283119700849056e-02</internalNodes>\n          <leafValues>\n            1.9125230610370636e-01 -1.1530569940805435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 -1.9681209232658148e-03</internalNodes>\n          <leafValues>\n            -3.1295120716094971e-01 9.9682807922363281e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 5.2851080894470215e-02</internalNodes>\n          <leafValues>\n            -5.8919548988342285e-02 5.7887911796569824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 -6.3711861148476601e-03</internalNodes>\n          <leafValues>\n            1.9182190299034119e-01 -1.9094540178775787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 -6.4727910794317722e-03</internalNodes>\n          <leafValues>\n            -2.4721039831638336e-01 1.2252929806709290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -1.6690989956259727e-02</internalNodes>\n          <leafValues>\n            -4.9174660444259644e-01 5.0315100699663162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 -1.4882409945130348e-02</internalNodes>\n          <leafValues>\n            1.9646610319614410e-01 -5.8250389993190765e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 1.7529709264636040e-02</internalNodes>\n          <leafValues>\n            7.6357498764991760e-02 -3.6559268832206726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 4.2221389710903168e-02</internalNodes>\n          <leafValues>\n            -3.1560491770505905e-02 3.6011269688606262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 -6.5581746399402618e-02</internalNodes>\n          <leafValues>\n            3.4334710240364075e-01 -8.8556960225105286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 1.6703210771083832e-02</internalNodes>\n          <leafValues>\n            4.8210039734840393e-02 -1.5273620188236237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 -6.9328742101788521e-03</internalNodes>\n          <leafValues>\n            -3.0573639273643494e-01 1.1821140348911285e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>46</maxWeakCount>\n      <stageThreshold>-1.0648390054702759e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 169 -6.3434438779950142e-03</internalNodes>\n          <leafValues>\n            3.3840280771255493e-01 -3.3474850654602051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 5.2472548559308052e-03</internalNodes>\n          <leafValues>\n            -9.3596532940864563e-02 1.6791179776191711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 -3.6585088819265366e-02</internalNodes>\n          <leafValues>\n            5.3676098585128784e-01 -8.5433527827262878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 5.3153699263930321e-03</internalNodes>\n          <leafValues>\n            -1.2804119288921356e-01 1.4443910121917725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 -3.9569609798491001e-03</internalNodes>\n          <leafValues>\n            1.8605449795722961e-01 -2.2311410307884216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 3.3965419977903366e-02</internalNodes>\n          <leafValues>\n            2.7835709974169731e-02 -5.1203387975692749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 -1.4852879568934441e-02</internalNodes>\n          <leafValues>\n            -4.6814951300621033e-01 1.1351560056209564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 -2.9641329310834408e-03</internalNodes>\n          <leafValues>\n            2.6591798663139343e-01 -2.8183770179748535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 -1.0795590281486511e-01</internalNodes>\n          <leafValues>\n            -5.7527697086334229e-01 1.0991639643907547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 2.1237600594758987e-02</internalNodes>\n          <leafValues>\n            -1.0451590269804001e-01 4.6613770723342896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 -2.6189640164375305e-02</internalNodes>\n          <leafValues>\n            4.2544820904731750e-01 -9.2278912663459778e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 -3.5010561347007751e-02</internalNodes>\n          <leafValues>\n            -7.1801197528839111e-01 7.2877250611782074e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 1.5026619621494319e-05</internalNodes>\n          <leafValues>\n            -2.7199760079383850e-01 1.0682159662246704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 -2.7760250493884087e-02</internalNodes>\n          <leafValues>\n            -5.0185692310333252e-01 1.0118210315704346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 -3.7439178675413132e-02</internalNodes>\n          <leafValues>\n            -3.7141519784927368e-01 8.3709038794040680e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 -1.4152259565889835e-02</internalNodes>\n          <leafValues>\n            3.0982801318168640e-01 -7.3767662048339844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 -1.2331079691648483e-02</internalNodes>\n          <leafValues>\n            -3.9507681131362915e-01 8.3215177059173584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 2.6666349731385708e-03</internalNodes>\n          <leafValues>\n            -1.3776129484176636e-01 2.4245689809322357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 -2.9443199746310711e-03</internalNodes>\n          <leafValues>\n            2.4460780620574951e-01 -1.3937890529632568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -1.5788920223712921e-01</internalNodes>\n          <leafValues>\n            -5.6832242012023926e-01 3.6140721291303635e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 2.1553030237555504e-03</internalNodes>\n          <leafValues>\n            8.3660557866096497e-02 -4.1380259394645691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 -8.5367091000080109e-02</internalNodes>\n          <leafValues>\n            -5.7053291797637939e-01 5.2995659410953522e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 3.4761740826070309e-03</internalNodes>\n          <leafValues>\n            -1.2189819663763046e-01 2.6553291082382202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 -2.4104220792651176e-02</internalNodes>\n          <leafValues>\n            -5.2315437793731689e-01 2.5505660101771355e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 -3.0729150399565697e-02</internalNodes>\n          <leafValues>\n            -4.6735408902168274e-01 7.0844426751136780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 -1.1937420349568129e-03</internalNodes>\n          <leafValues>\n            1.4596860110759735e-01 -2.3086270689964294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 3.2304100692272186e-02</internalNodes>\n          <leafValues>\n            -6.5350927412509918e-02 5.5091381072998047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 1.4955499768257141e-01</internalNodes>\n          <leafValues>\n            1.5002089552581310e-02 -8.9400452375411987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 -4.7254669480025768e-03</internalNodes>\n          <leafValues>\n            1.4857460558414459e-01 -2.1019940078258514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 3.6360718309879303e-02</internalNodes>\n          <leafValues>\n            2.8547950088977814e-02 -6.3668930530548096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 -2.7109999209642410e-02</internalNodes>\n          <leafValues>\n            4.9661910533905029e-01 -7.3661573231220245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 -9.5398407429456711e-03</internalNodes>\n          <leafValues>\n            -1.9384680688381195e-01 5.8507081121206284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 1.0541989654302597e-01</internalNodes>\n          <leafValues>\n            -7.4785731732845306e-02 4.3781110644340515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 6.3801761716604233e-03</internalNodes>\n          <leafValues>\n            5.3971529006958008e-02 -3.3829790353775024e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 -2.2759849205613136e-02</internalNodes>\n          <leafValues>\n            -5.9374898672103882e-01 4.8046529293060303e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 -1.7323749139904976e-02</internalNodes>\n          <leafValues>\n            -1.6034699976444244e-01 1.5187160111963749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 2.9854409396648407e-02</internalNodes>\n          <leafValues>\n            -6.5698243677616119e-02 4.5057341456413269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 2.3269839584827423e-02</internalNodes>\n          <leafValues>\n            3.8805499672889709e-02 -3.5354879498481750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 4.0833871811628342e-02</internalNodes>\n          <leafValues>\n            4.9404840916395187e-02 -5.6222450733184814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 -1.2498889863491058e-01</internalNodes>\n          <leafValues>\n            6.7763668298721313e-01 -1.5484940260648727e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 -6.5579377114772797e-02</internalNodes>\n          <leafValues>\n            6.7363232374191284e-01 -4.5269690454006195e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -3.7901759147644043e-01</internalNodes>\n          <leafValues>\n            -4.9853721261024475e-01 2.3955229669809341e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 2.9792459681630135e-03</internalNodes>\n          <leafValues>\n            -1.8436419963836670e-01 1.6265830397605896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 1.3803659938275814e-02</internalNodes>\n          <leafValues>\n            6.3698217272758484e-02 -4.3389800190925598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 3.5606899764388800e-03</internalNodes>\n          <leafValues>\n            -1.1455070227384567e-01 2.3618610203266144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 8.8772783055901527e-03</internalNodes>\n          <leafValues>\n            8.6416840553283691e-02 -1.7590980231761932e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>45</maxWeakCount>\n      <stageThreshold>-9.5069932937622070e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 215 -6.7344820126891136e-03</internalNodes>\n          <leafValues>\n            3.0758589506149292e-01 -2.9761791229248047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 -1.3902880251407623e-02</internalNodes>\n          <leafValues>\n            2.0400699973106384e-01 -2.2967250645160675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 -4.1963551193475723e-02</internalNodes>\n          <leafValues>\n            -5.6575411558151245e-01 8.6745493113994598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 -5.9794791013700888e-05</internalNodes>\n          <leafValues>\n            1.5832610428333282e-01 -2.3109050095081329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 8.4739532321691513e-03</internalNodes>\n          <leafValues>\n            -1.1501230299472809e-01 3.9758589863777161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 -6.5317057073116302e-02</internalNodes>\n          <leafValues>\n            -2.3887279629707336e-01 1.1391709744930267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 -4.2358501814305782e-03</internalNodes>\n          <leafValues>\n            2.2337220609188080e-01 -2.4218839406967163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 4.6229299157857895e-02</internalNodes>\n          <leafValues>\n            9.6837401390075684e-02 -5.3427702188491821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 5.2246701670810580e-05</internalNodes>\n          <leafValues>\n            -2.4189360439777374e-01 1.5932360291481018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 -4.1420090943574905e-02</internalNodes>\n          <leafValues>\n            -3.4044981002807617e-01 4.3712481856346130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 -1.0224279947578907e-02</internalNodes>\n          <leafValues>\n            -2.4752390384674072e-01 1.5512530505657196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 6.8581208586692810e-02</internalNodes>\n          <leafValues>\n            9.7173796966671944e-03 -6.1821222305297852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 -4.0700301527976990e-02</internalNodes>\n          <leafValues>\n            -6.0284787416458130e-01 7.0963069796562195e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 -8.9998699724674225e-02</internalNodes>\n          <leafValues>\n            4.6664720773696899e-01 -4.8549890518188477e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 1.5307360328733921e-02</internalNodes>\n          <leafValues>\n            1.4783670008182526e-01 -2.7114608883857727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 3.7016849964857101e-03</internalNodes>\n          <leafValues>\n            -1.5153409540653229e-01 2.0931409299373627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 -3.1937099993228912e-02</internalNodes>\n          <leafValues>\n            -7.2332257032394409e-01 3.7420161068439484e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 4.7493908554315567e-02</internalNodes>\n          <leafValues>\n            4.9000091850757599e-02 -4.8303189873695374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 4.4620381668210030e-03</internalNodes>\n          <leafValues>\n            -1.7698319256305695e-01 1.9820910692214966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 -8.1284176558256149e-03</internalNodes>\n          <leafValues>\n            1.1222189664840698e-01 -5.0805520266294479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 -1.2596019543707371e-02</internalNodes>\n          <leafValues>\n            4.3889060616493225e-01 -8.2898952066898346e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -1.0689930059015751e-03</internalNodes>\n          <leafValues>\n            6.8766087293624878e-02 -8.2667008042335510e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 -4.8213090747594833e-02</internalNodes>\n          <leafValues>\n            -4.6671348810195923e-01 7.4310712516307831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 -2.3418650380335748e-04</internalNodes>\n          <leafValues>\n            8.8725142180919647e-02 -1.0919640213251114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 1.0095000267028809e-01</internalNodes>\n          <leafValues>\n            5.5444270372390747e-02 -5.5205368995666504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 3.2340411096811295e-02</internalNodes>\n          <leafValues>\n            4.9762740731239319e-02 -3.6636400222778320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 1.7699210345745087e-01</internalNodes>\n          <leafValues>\n            -7.3765642940998077e-02 5.4300791025161743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 -1.8634319712873548e-04</internalNodes>\n          <leafValues>\n            9.5718666911125183e-02 -1.8214109539985657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 6.6473139449954033e-03</internalNodes>\n          <leafValues>\n            -1.2173130363225937e-01 3.0331039428710938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 -9.9276658147573471e-03</internalNodes>\n          <leafValues>\n            3.2638520002365112e-01 -8.8533706963062286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 5.2587099373340607e-02</internalNodes>\n          <leafValues>\n            1.1303950101137161e-01 -3.3436870574951172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 4.9553681164979935e-03</internalNodes>\n          <leafValues>\n            -1.3183289766311646e-01 9.7614809870719910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 -2.3817660287022591e-02</internalNodes>\n          <leafValues>\n            -4.1027650237083435e-01 8.4849812090396881e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 -1.1363780125975609e-02</internalNodes>\n          <leafValues>\n            1.8874420225620270e-01 -8.3536416292190552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 -1.9515539752319455e-03</internalNodes>\n          <leafValues>\n            1.8985089659690857e-01 -1.7776779830455780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 -1.3576669618487358e-02</internalNodes>\n          <leafValues>\n            2.0975759625434875e-01 -3.7115450948476791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 1.6466820612549782e-02</internalNodes>\n          <leafValues>\n            -8.2349412143230438e-02 3.8047221302986145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 -1.0136260092258453e-01</internalNodes>\n          <leafValues>\n            -1.1633230000734329e-01 6.7804910242557526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 -1.0248430073261261e-01</internalNodes>\n          <leafValues>\n            -2.8850209712982178e-01 1.2139680236577988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 -2.8717568516731262e-01</internalNodes>\n          <leafValues>\n            4.6935141086578369e-01 -8.2954309880733490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 5.0812978297472000e-02</internalNodes>\n          <leafValues>\n            5.5393878370523453e-02 -6.2383282184600830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 9.1063417494297028e-02</internalNodes>\n          <leafValues>\n            -2.3379560559988022e-02 4.7155299782752991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 -5.1845338195562363e-02</internalNodes>\n          <leafValues>\n            -6.9031542539596558e-01 4.5454118400812149e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 1.5031239390373230e-01</internalNodes>\n          <leafValues>\n            4.5906711369752884e-02 -5.2067738771438599e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 4.1596319526433945e-02</internalNodes>\n          <leafValues>\n            5.3706299513578415e-02 -4.8782169818878174e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>43</maxWeakCount>\n      <stageThreshold>-8.5045951604843140e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 260 -5.9847710654139519e-03</internalNodes>\n          <leafValues>\n            2.7858960628509521e-01 -3.0923390388488770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 -3.9032639469951391e-03</internalNodes>\n          <leafValues>\n            2.2257049381732941e-01 -2.8928229212760925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 -2.2362179151969030e-05</internalNodes>\n          <leafValues>\n            1.4084370434284210e-01 -3.0143168568611145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 -9.1167002916336060e-02</internalNodes>\n          <leafValues>\n            -6.7608010768890381e-01 5.6040819734334946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 5.2755638957023621e-02</internalNodes>\n          <leafValues>\n            7.4688747525215149e-02 -6.3256257772445679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 6.9458536803722382e-02</internalNodes>\n          <leafValues>\n            -1.1754920333623886e-01 6.3863641023635864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 -4.8209438100457191e-03</internalNodes>\n          <leafValues>\n            2.9225930571556091e-01 -1.3872410356998444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 3.2156750559806824e-02</internalNodes>\n          <leafValues>\n            7.5575239956378937e-02 -5.7927912473678589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 -4.4298470020294189e-02</internalNodes>\n          <leafValues>\n            4.0226811170578003e-01 -1.0264609754085541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 -7.0452108047902584e-03</internalNodes>\n          <leafValues>\n            1.5128499269485474e-01 -5.6725870817899704e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 5.1606830675154924e-04</internalNodes>\n          <leafValues>\n            -2.3022100329399109e-01 1.6343879699707031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 -6.1528358608484268e-02</internalNodes>\n          <leafValues>\n            2.5559040904045105e-01 -4.6751510351896286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 -5.1367811858654022e-02</internalNodes>\n          <leafValues>\n            -2.4755829572677612e-01 1.4305450022220612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 9.0107098221778870e-03</internalNodes>\n          <leafValues>\n            -1.0648769885301590e-01 3.1271860003471375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 2.2352259606122971e-02</internalNodes>\n          <leafValues>\n            1.5494219958782196e-01 -3.1736290454864502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 3.1493891030550003e-02</internalNodes>\n          <leafValues>\n            7.2037532925605774e-02 -2.8946670889854431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 -5.2064459770917892e-02</internalNodes>\n          <leafValues>\n            -2.7082020044326782e-01 1.2260189652442932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 -6.1549381352961063e-03</internalNodes>\n          <leafValues>\n            1.6442950069904327e-01 -1.0657779872417450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 3.0305041000247002e-03</internalNodes>\n          <leafValues>\n            -1.5234139561653137e-01 2.0446379482746124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 -6.8027540110051632e-03</internalNodes>\n          <leafValues>\n            7.1448147296905518e-02 -4.1458301246166229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 6.8647533655166626e-02</internalNodes>\n          <leafValues>\n            -5.2833538502454758e-02 5.7638901472091675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 -9.2883080244064331e-02</internalNodes>\n          <leafValues>\n            -2.6236709952354431e-01 8.2425810396671295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 -5.2907038480043411e-03</internalNodes>\n          <leafValues>\n            1.4090450108051300e-01 -2.2050650417804718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 1.5640209894627333e-03</internalNodes>\n          <leafValues>\n            -1.0143549740314484e-01 1.3026970624923706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 1.0752620175480843e-02</internalNodes>\n          <leafValues>\n            9.1515362262725830e-02 -3.2133978605270386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 -2.1106360480189323e-02</internalNodes>\n          <leafValues>\n            -2.7410230040550232e-01 9.1773197054862976e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 4.8663117922842503e-03</internalNodes>\n          <leafValues>\n            -1.5258720517158508e-01 1.9711069762706757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 6.5396472811698914e-02</internalNodes>\n          <leafValues>\n            6.5921088680624962e-03 -6.4343088865280151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 4.4902609661221504e-03</internalNodes>\n          <leafValues>\n            -1.0377249866724014e-01 2.8005209565162659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 4.6614840626716614e-02</internalNodes>\n          <leafValues>\n            5.4715849459171295e-02 -5.2179151773452759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 1.1597450077533722e-01</internalNodes>\n          <leafValues>\n            3.9613999426364899e-02 -6.4784902334213257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 5.7222661562263966e-03</internalNodes>\n          <leafValues>\n            -5.4838169366121292e-02 1.2828019261360168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 -4.1633259505033493e-02</internalNodes>\n          <leafValues>\n            -8.0665838718414307e-01 3.5942289978265762e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 -4.7252390533685684e-02</internalNodes>\n          <leafValues>\n            -7.9193192720413208e-01 1.2737370096147060e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 -1.6451090341433883e-03</internalNodes>\n          <leafValues>\n            2.0376729965209961e-01 -1.3230639696121216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 2.5758889969438314e-03</internalNodes>\n          <leafValues>\n            -6.3503406941890717e-02 1.3530080020427704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 2.0758589729666710e-02</internalNodes>\n          <leafValues>\n            4.7286979854106903e-02 -5.8212000131607056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 -2.8601480647921562e-02</internalNodes>\n          <leafValues>\n            -4.1221970319747925e-01 2.4210980162024498e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 -2.8691580519080162e-02</internalNodes>\n          <leafValues>\n            -5.5404680967330933e-01 4.5068629086017609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 -2.6637869887053967e-03</internalNodes>\n          <leafValues>\n            1.2570230662822723e-01 -1.6319499909877777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -4.4750720262527466e-03</internalNodes>\n          <leafValues>\n            -2.7138069272041321e-01 1.0293100029230118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 4.0937099605798721e-02</internalNodes>\n          <leafValues>\n            -3.2065469771623611e-02 1.3092640042304993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 7.5827181339263916e-02</internalNodes>\n          <leafValues>\n            -5.1221519708633423e-02 5.6596297025680542e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>58</maxWeakCount>\n      <stageThreshold>-9.1252201795578003e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 303 -4.2669968679547310e-03</internalNodes>\n          <leafValues>\n            1.7704419791698456e-01 -2.8265419602394104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 -2.2577939555048943e-02</internalNodes>\n          <leafValues>\n            2.3657959699630737e-01 -4.2326368391513824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 -9.8107997328042984e-03</internalNodes>\n          <leafValues>\n            -3.8568308949470520e-01 9.0982303023338318e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 3.8510379381477833e-03</internalNodes>\n          <leafValues>\n            -1.0270400345325470e-01 1.9267590343952179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 -2.0688450895249844e-03</internalNodes>\n          <leafValues>\n            1.6656570136547089e-01 -2.1394389867782593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 -5.8368500322103500e-02</internalNodes>\n          <leafValues>\n            3.4833571314811707e-01 -8.0605462193489075e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 5.6290920823812485e-02</internalNodes>\n          <leafValues>\n            -6.1617989093065262e-02 6.9421827793121338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 5.5776340886950493e-03</internalNodes>\n          <leafValues>\n            7.8374862670898438e-02 -4.0764930844306946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 5.0974669866263866e-03</internalNodes>\n          <leafValues>\n            1.5001790225505829e-01 -2.7620849013328552e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 2.4134019389748573e-02</internalNodes>\n          <leafValues>\n            -3.7685971707105637e-02 4.0111309289932251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 2.6251180097460747e-03</internalNodes>\n          <leafValues>\n            -1.8986889719963074e-01 1.6666570305824280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -2.3179719224572182e-02</internalNodes>\n          <leafValues>\n            -6.0807460546493530e-01 3.3016931265592575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 -1.7960369586944580e-03</internalNodes>\n          <leafValues>\n            1.8328389525413513e-01 -1.6300560534000397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 1.1327250301837921e-01</internalNodes>\n          <leafValues>\n            1.6392359510064125e-02 -3.8521450757980347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 -1.1120930314064026e-02</internalNodes>\n          <leafValues>\n            -2.6789391040802002e-01 1.2030880153179169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 8.9298561215400696e-03</internalNodes>\n          <leafValues>\n            -6.4766243100166321e-02 5.2446700632572174e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 3.0264519155025482e-02</internalNodes>\n          <leafValues>\n            -5.3343709558248520e-02 4.9170601367950439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 1.3036240637302399e-01</internalNodes>\n          <leafValues>\n            9.9123492836952209e-03 -8.0775249004364014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 -4.8941900022327900e-03</internalNodes>\n          <leafValues>\n            1.4153289794921875e-01 -2.4222679436206818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 -1.8009349703788757e-02</internalNodes>\n          <leafValues>\n            -1.8352709710597992e-01 5.3784269839525223e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 323 6.3028637669049203e-05</internalNodes>\n          <leafValues>\n            -2.0836220681667328e-01 1.3861179351806641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 -3.8127291202545166e-01</internalNodes>\n          <leafValues>\n            -7.6527822017669678e-01 3.4578099846839905e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 1.6168570145964622e-02</internalNodes>\n          <leafValues>\n            -7.8577049076557159e-02 3.6086350679397583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 -2.0725380629301071e-02</internalNodes>\n          <leafValues>\n            -3.2905191183090210e-01 8.1693336367607117e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 -1.4763489889446646e-04</internalNodes>\n          <leafValues>\n            1.0449170321226120e-01 -2.7624139189720154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 -1.6959169879555702e-02</internalNodes>\n          <leafValues>\n            -2.4150790274143219e-01 5.4569680243730545e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 -1.5221100300550461e-02</internalNodes>\n          <leafValues>\n            4.1033148765563965e-01 -6.8333253264427185e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 -9.6041243523359299e-03</internalNodes>\n          <leafValues>\n            -3.3569648861885071e-01 8.6250491440296173e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 -1.6476860037073493e-03</internalNodes>\n          <leafValues>\n            1.6236330568790436e-01 -1.9044490158557892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 -1.0705839842557907e-01</internalNodes>\n          <leafValues>\n            -8.6767107248306274e-01 7.3941340669989586e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 -1.8818160519003868e-02</internalNodes>\n          <leafValues>\n            -3.6879110336303711e-01 6.8846642971038818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 -5.6142187677323818e-03</internalNodes>\n          <leafValues>\n            1.7322039604187012e-01 -1.2514470517635345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 7.3969298973679543e-03</internalNodes>\n          <leafValues>\n            -8.5467368364334106e-02 3.2027161121368408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 9.4870915636420250e-03</internalNodes>\n          <leafValues>\n            6.3168406486511230e-02 -2.0918910205364227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 1.8458140548318624e-03</internalNodes>\n          <leafValues>\n            -1.5436279773712158e-01 1.8517020344734192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 -1.9747359678149223e-02</internalNodes>\n          <leafValues>\n            3.3071118593215942e-01 -7.6775848865509033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 3.2421160489320755e-02</internalNodes>\n          <leafValues>\n            8.2021132111549377e-02 -4.0147501230239868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 2.9075390193611383e-03</internalNodes>\n          <leafValues>\n            -7.7174037694931030e-02 1.0620699822902679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 1.5189359895884991e-02</internalNodes>\n          <leafValues>\n            6.0363899916410446e-02 -4.1365239024162292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 -3.0683739110827446e-02</internalNodes>\n          <leafValues>\n            4.3470621109008789e-01 -5.9381321072578430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 -1.0973449796438217e-02</internalNodes>\n          <leafValues>\n            -2.9535230994224548e-01 8.5516467690467834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 -3.9540361613035202e-02</internalNodes>\n          <leafValues>\n            -2.8765881061553955e-01 3.4472968429327011e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 -3.7935871630907059e-02</internalNodes>\n          <leafValues>\n            3.8199868798255920e-01 -8.5364766418933868e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 3.0669810250401497e-02</internalNodes>\n          <leafValues>\n            4.4738098978996277e-02 -1.7703640460968018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 1.7194509506225586e-01</internalNodes>\n          <leafValues>\n            -5.9214178472757339e-02 4.9291038513183594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 -6.7055500112473965e-03</internalNodes>\n          <leafValues>\n            1.6410259902477264e-01 -2.1826469898223877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 -3.8577869534492493e-01</internalNodes>\n          <leafValues>\n            -6.7176771163940430e-01 4.2349591851234436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 2.7213040739297867e-02</internalNodes>\n          <leafValues>\n            1.2266149744391441e-02 -2.2954210638999939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 -1.9294980913400650e-02</internalNodes>\n          <leafValues>\n            -5.8373439311981201e-01 3.8380999118089676e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 7.6792249456048012e-03</internalNodes>\n          <leafValues>\n            -4.7490350902080536e-02 1.5964460372924805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 6.0242269682930782e-05</internalNodes>\n          <leafValues>\n            -1.1734239757061005e-01 1.8236650526523590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 -6.6498141677584499e-05</internalNodes>\n          <leafValues>\n            7.4745140969753265e-02 -1.6989439725875854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 4.3275849893689156e-03</internalNodes>\n          <leafValues>\n            7.3789797723293304e-02 -2.8444349765777588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 -3.3140469342470169e-02</internalNodes>\n          <leafValues>\n            -4.0606608986854553e-01 1.0028730146586895e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 9.9181402474641800e-03</internalNodes>\n          <leafValues>\n            -7.9339787364006042e-02 2.8190010786056519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 -2.3577339015901089e-03</internalNodes>\n          <leafValues>\n            1.5301220118999481e-01 -1.0475979745388031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 -2.6200819760560989e-02</internalNodes>\n          <leafValues>\n            -5.4185032844543457e-01 4.4369250535964966e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 4.7328658401966095e-02</internalNodes>\n          <leafValues>\n            1.8897749483585358e-02 -8.2665932178497314e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>-1.1653599739074707e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 361 2.9921719804406166e-02</internalNodes>\n          <leafValues>\n            -3.2315000891685486e-01 5.1092821359634399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 5.6147608906030655e-02</internalNodes>\n          <leafValues>\n            -1.2574400007724762e-01 6.6749179363250732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 -1.3759849593043327e-02</internalNodes>\n          <leafValues>\n            4.0691190958023071e-01 -2.1075299382209778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 -4.3788701295852661e-03</internalNodes>\n          <leafValues>\n            2.7940139174461365e-01 -2.0955459773540497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 1.9208889454603195e-02</internalNodes>\n          <leafValues>\n            -8.9800693094730377e-02 5.0936561822891235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 -8.9393591042608023e-04</internalNodes>\n          <leafValues>\n            1.0703620314598083e-01 -1.2294200062751770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 -6.2918022740632296e-04</internalNodes>\n          <leafValues>\n            -3.7847930192947388e-01 1.3008819520473480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -1.6248769825324416e-03</internalNodes>\n          <leafValues>\n            1.7750020325183868e-01 -2.7811211347579956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 -4.6151960268616676e-03</internalNodes>\n          <leafValues>\n            2.4071510136127472e-01 -1.4269010722637177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 5.7162828743457794e-02</internalNodes>\n          <leafValues>\n            -1.8474869430065155e-02 4.5086058974266052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 -3.8265369366854429e-03</internalNodes>\n          <leafValues>\n            2.5951761007308960e-01 -1.1455159634351730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 -4.5235190540552139e-02</internalNodes>\n          <leafValues>\n            -3.3849009871482849e-01 3.4538950771093369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 3.8135750219225883e-03</internalNodes>\n          <leafValues>\n            1.1333999782800674e-01 -2.7620390057563782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 4.5108258724212646e-02</internalNodes>\n          <leafValues>\n            2.8602050617337227e-02 -1.5837669372558594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 -2.7794970665127039e-03</internalNodes>\n          <leafValues>\n            2.8897428512573242e-01 -1.0822720080614090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 5.6366869248449802e-03</internalNodes>\n          <leafValues>\n            -1.0184790194034576e-01 7.8787103295326233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -5.2986819297075272e-02</internalNodes>\n          <leafValues>\n            5.2964997291564941e-01 -6.5543353557586670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 7.4737891554832458e-02</internalNodes>\n          <leafValues>\n            2.6320660486817360e-02 -3.0487209558486938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 4.1559520177543163e-03</internalNodes>\n          <leafValues>\n            -2.2977170348167419e-01 1.5662179887294769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 -2.9388200491666794e-03</internalNodes>\n          <leafValues>\n            -1.6916410624980927e-01 9.6996672451496124e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 -1.3065510429441929e-02</internalNodes>\n          <leafValues>\n            4.0258568525314331e-01 -7.1614369750022888e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 -3.4928251057863235e-02</internalNodes>\n          <leafValues>\n            -4.9449989199638367e-01 2.2547820582985878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 2.1728971041738987e-03</internalNodes>\n          <leafValues>\n            -1.5552569925785065e-01 2.0136219263076782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 1.4387349598109722e-02</internalNodes>\n          <leafValues>\n            3.6348100751638412e-02 -2.9468619823455811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 6.7830132320523262e-03</internalNodes>\n          <leafValues>\n            -8.2248352468013763e-02 3.3857500553131104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 -7.2883836925029755e-02</internalNodes>\n          <leafValues>\n            -3.4577670693397522e-01 1.9601320847868919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 -4.5158518478274345e-03</internalNodes>\n          <leafValues>\n            1.7059490084648132e-01 -1.9742819666862488e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 -1.3742079958319664e-02</internalNodes>\n          <leafValues>\n            -2.1214349567890167e-01 3.3953689038753510e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 7.8056701458990574e-03</internalNodes>\n          <leafValues>\n            7.1426697075366974e-02 -3.4223988652229309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 2.1649990230798721e-02</internalNodes>\n          <leafValues>\n            -6.1925049871206284e-02 3.7267661094665527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 -6.7706637084484100e-02</internalNodes>\n          <leafValues>\n            -3.0304160714149475e-01 9.4357587397098541e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 -2.1855749655514956e-03</internalNodes>\n          <leafValues>\n            1.0831770300865173e-01 -1.5530540049076080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 -2.5483060162514448e-03</internalNodes>\n          <leafValues>\n            -2.4103440344333649e-01 9.2916287481784821e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 -6.7207813262939453e-02</internalNodes>\n          <leafValues>\n            -6.6259348392486572e-01 1.6074649989604950e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 4.7799371182918549e-02</internalNodes>\n          <leafValues>\n            -4.4412638992071152e-02 6.0569787025451660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 -9.1178417205810547e-02</internalNodes>\n          <leafValues>\n            2.4761490523815155e-01 -3.4762401133775711e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 -3.8592480123043060e-03</internalNodes>\n          <leafValues>\n            -2.5366741418838501e-01 1.0194999724626541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 2.4100970476865768e-03</internalNodes>\n          <leafValues>\n            -1.2133970111608505e-01 1.9767910242080688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 -5.3831469267606735e-03</internalNodes>\n          <leafValues>\n            1.7103940248489380e-01 -1.6189830005168915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 9.1004222631454468e-03</internalNodes>\n          <leafValues>\n            -6.0921549797058105e-02 1.7695249617099762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 2.2724110167473555e-03</internalNodes>\n          <leafValues>\n            -9.0476967394351959e-02 2.7440631389617920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 -8.0621562898159027e-02</internalNodes>\n          <leafValues>\n            -8.8045567274093628e-01 1.7193239182233810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 3.8965709973126650e-03</internalNodes>\n          <leafValues>\n            -1.7037920653820038e-01 1.7979580163955688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 -4.3093641288578510e-03</internalNodes>\n          <leafValues>\n            -2.9382050037384033e-01 8.6317472159862518e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>44</maxWeakCount>\n      <stageThreshold>-9.4284927845001221e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 405 -6.3116192817687988e-02</internalNodes>\n          <leafValues>\n            5.5512517690658569e-01 -3.5997709631919861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 406 8.4350287914276123e-02</internalNodes>\n          <leafValues>\n            -1.2531270086765289e-01 5.3567689657211304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 -2.1390730142593384e-01</internalNodes>\n          <leafValues>\n            7.5156861543655396e-01 -8.8270872831344604e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 -2.9744980856776237e-02</internalNodes>\n          <leafValues>\n            2.0106209814548492e-01 -1.2106689810752869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 -1.1987680196762085e-01</internalNodes>\n          <leafValues>\n            6.4692199230194092e-01 -7.7747613191604614e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 3.0843529384583235e-03</internalNodes>\n          <leafValues>\n            -6.3067637383937836e-02 7.7889077365398407e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 -4.5560211874544621e-03</internalNodes>\n          <leafValues>\n            1.8972270190715790e-01 -1.9929079711437225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 4.4629329931922257e-04</internalNodes>\n          <leafValues>\n            1.4051589369773865e-01 -3.0292418599128723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 -6.4954371191561222e-03</internalNodes>\n          <leafValues>\n            3.1942290067672729e-01 -1.1072000116109848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 -2.1751760505139828e-03</internalNodes>\n          <leafValues>\n            1.6477259993553162e-01 -8.0424778163433075e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 6.5875840373337269e-03</internalNodes>\n          <leafValues>\n            1.4716550707817078e-01 -3.0198150873184204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 2.0701209083199501e-02</internalNodes>\n          <leafValues>\n            -4.2996689677238464e-02 4.0123820304870605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 2.5877119041979313e-03</internalNodes>\n          <leafValues>\n            1.2630540132522583e-01 -2.7518120408058167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 -1.0545079596340656e-02</internalNodes>\n          <leafValues>\n            1.9637629389762878e-01 -3.9772778749465942e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 6.2396968714892864e-03</internalNodes>\n          <leafValues>\n            -8.3563409745693207e-02 3.6655488610267639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 1.4458670280873775e-02</internalNodes>\n          <leafValues>\n            6.3301697373390198e-02 -5.8498907089233398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 3.1263440847396851e-02</internalNodes>\n          <leafValues>\n            -1.0675270110368729e-01 3.4852859377861023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 1.4865349512547255e-03</internalNodes>\n          <leafValues>\n            1.3709670305252075e-01 -1.3731659948825836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 -1.7898039368446916e-04</internalNodes>\n          <leafValues>\n            1.7839649319648743e-01 -2.5751718878746033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 7.7714473009109497e-02</internalNodes>\n          <leafValues>\n            5.7081848382949829e-02 -2.4273400008678436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 2.2228270769119263e-02</internalNodes>\n          <leafValues>\n            1.4593790471553802e-01 -2.0994609594345093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 1.6969949938356876e-03</internalNodes>\n          <leafValues>\n            -1.4418889582157135e-01 2.7375409007072449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 -2.0023470744490623e-02</internalNodes>\n          <leafValues>\n            -3.7556248903274536e-01 8.1627696752548218e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 3.8644319865852594e-03</internalNodes>\n          <leafValues>\n            -6.4490430057048798e-02 1.5921689569950104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 -3.0527650378644466e-03</internalNodes>\n          <leafValues>\n            2.6751521229743958e-01 -1.0531850159168243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 5.6112320162355900e-03</internalNodes>\n          <leafValues>\n            -6.8567730486392975e-02 2.1234990656375885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 4.6622268855571747e-03</internalNodes>\n          <leafValues>\n            1.4254149794578552e-01 -2.0892719924449921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 2.4710448924452066e-03</internalNodes>\n          <leafValues>\n            7.2614386677742004e-02 -1.8833909928798676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 1.2655000202357769e-02</internalNodes>\n          <leafValues>\n            -8.3605259656906128e-02 4.3262240290641785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 -1.7724519595503807e-02</internalNodes>\n          <leafValues>\n            1.7432230710983276e-01 -2.8479820117354393e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 -7.2321272455155849e-04</internalNodes>\n          <leafValues>\n            1.5343970060348511e-01 -2.4012179672718048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 -6.2155709601938725e-03</internalNodes>\n          <leafValues>\n            2.5166681408882141e-01 -8.5519887506961823e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 4.1632771492004395e-02</internalNodes>\n          <leafValues>\n            5.0593800842761993e-02 -6.0965442657470703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 2.3918300867080688e-02</internalNodes>\n          <leafValues>\n            -3.6809660494327545e-02 3.9055478572845459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 -7.4353138916194439e-03</internalNodes>\n          <leafValues>\n            1.5018579363822937e-01 -1.8627819418907166e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 -2.0571449771523476e-02</internalNodes>\n          <leafValues>\n            -2.8574559092521667e-01 4.8302378505468369e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 -7.3831980116665363e-03</internalNodes>\n          <leafValues>\n            3.6680561304092407e-01 -9.6067756414413452e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 9.7222924232482910e-03</internalNodes>\n          <leafValues>\n            6.3898019492626190e-02 -1.7262579500675201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 -2.1807629615068436e-02</internalNodes>\n          <leafValues>\n            1.8027269840240479e-01 -1.9109119474887848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 5.8147668838500977e-02</internalNodes>\n          <leafValues>\n            8.5709961131215096e-03 -4.6250829100608826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 -9.4539504498243332e-03</internalNodes>\n          <leafValues>\n            -2.8908729553222656e-01 1.1421570181846619e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 -2.1080709993839264e-02</internalNodes>\n          <leafValues>\n            3.7570050358772278e-01 -2.5591030716896057e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 -4.0629571303725243e-03</internalNodes>\n          <leafValues>\n            2.7146670222282410e-01 -1.0845380276441574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 -1.2826620042324066e-01</internalNodes>\n          <leafValues>\n            1. -1.0962430387735367e-03</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>61</maxWeakCount>\n      <stageThreshold>-9.5620310306549072e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 449 -1.2662290036678314e-01</internalNodes>\n          <leafValues>\n            6.2268221378326416e-01 -1.4810459315776825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -7.0846290327608585e-03</internalNodes>\n          <leafValues>\n            2.0133779942989349e-01 -1.7728950083255768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 1.1459200084209442e-01</internalNodes>\n          <leafValues>\n            -8.8975846767425537e-02 5.7395541667938232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 3.3472150098532438e-03</internalNodes>\n          <leafValues>\n            7.5708203017711639e-02 -2.8222179412841797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 5.1924228668212891e-02</internalNodes>\n          <leafValues>\n            -1.3948489725589752e-01 2.5681090354919434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -4.1343908756971359e-02</internalNodes>\n          <leafValues>\n            2.2414180636405945e-01 -4.3653670698404312e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 -3.2056469470262527e-02</internalNodes>\n          <leafValues>\n            -5.9409761428833008e-01 5.1891159266233444e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 -4.0590870194137096e-03</internalNodes>\n          <leafValues>\n            1.6402080655097961e-01 -1.5528389811515808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 -9.1876718215644360e-05</internalNodes>\n          <leafValues>\n            1.0587870329618454e-01 -2.8261598944664001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 2.8358219191431999e-02</internalNodes>\n          <leafValues>\n            5.7384029030799866e-02 -6.7094147205352783e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 -7.4662521481513977e-02</internalNodes>\n          <leafValues>\n            5.6916707754135132e-01 -4.8785641789436340e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 -3.6556490231305361e-03</internalNodes>\n          <leafValues>\n            2.2369490563869476e-01 -1.2202149629592896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 3.1778779812157154e-03</internalNodes>\n          <leafValues>\n            1.2240319699048996e-01 -2.7681729197502136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 3.8044340908527374e-02</internalNodes>\n          <leafValues>\n            2.3216400295495987e-02 -5.3732901811599731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 8.7831392884254456e-03</internalNodes>\n          <leafValues>\n            -7.4337556958198547e-02 3.2851231098175049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 -5.9818099252879620e-03</internalNodes>\n          <leafValues>\n            -1.9504779577255249e-01 6.6976852715015411e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 -1.6369449440389872e-03</internalNodes>\n          <leafValues>\n            1.4674800634384155e-01 -1.8024149537086487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 -9.9193133413791656e-02</internalNodes>\n          <leafValues>\n            6.8363517522811890e-01 -2.9652720317244530e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 -1.0352009907364845e-02</internalNodes>\n          <leafValues>\n            3.4225308895111084e-01 -8.1141538918018341e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 2.5637909770011902e-02</internalNodes>\n          <leafValues>\n            5.1416900008916855e-02 -1.6697999835014343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 -1.2416959507390857e-03</internalNodes>\n          <leafValues>\n            1.2488900125026703e-01 -2.1346220374107361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 1.5018839621916413e-03</internalNodes>\n          <leafValues>\n            9.7934387624263763e-02 -2.6385021209716797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 -3.2703679054975510e-02</internalNodes>\n          <leafValues>\n            5.7504880428314209e-01 -4.5875400304794312e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 2.1297169849276543e-02</internalNodes>\n          <leafValues>\n            6.1069380491971970e-02 -2.2480219602584839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 -8.8358018547296524e-04</internalNodes>\n          <leafValues>\n            9.5625787973403931e-02 -2.7564591169357300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 -3.6556860432028770e-03</internalNodes>\n          <leafValues>\n            2.4107089638710022e-01 -1.0359519720077515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 3.4300461411476135e-02</internalNodes>\n          <leafValues>\n            3.9062701165676117e-02 -6.2445348501205444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 1.1492350138723850e-02</internalNodes>\n          <leafValues>\n            -6.9246053695678711e-02 3.8258171081542969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 -3.1294790096580982e-03</internalNodes>\n          <leafValues>\n            1.1273369938135147e-01 -2.3122510313987732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 -4.0945871733129025e-03</internalNodes>\n          <leafValues>\n            -1.7195980250835419e-01 1.3112659752368927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 -3.0921408906579018e-03</internalNodes>\n          <leafValues>\n            -2.5460389256477356e-01 9.6659161150455475e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 -4.1672129184007645e-02</internalNodes>\n          <leafValues>\n            2.7327769994735718e-01 -6.3094623386859894e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 1.1384460143744946e-02</internalNodes>\n          <leafValues>\n            -7.1872517466545105e-02 4.1160398721694946e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -2.3934150114655495e-02</internalNodes>\n          <leafValues>\n            1.3192340731620789e-01 -1.7954839766025543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 -3.1554169952869415e-02</internalNodes>\n          <leafValues>\n            -5.8792132139205933e-01 4.1782889515161514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 -2.4033859372138977e-02</internalNodes>\n          <leafValues>\n            -1.5534760057926178e-01 2.7700260281562805e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 3.1589470803737640e-02</internalNodes>\n          <leafValues>\n            -3.9150279015302658e-02 6.0951721668243408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 -2.4214860051870346e-02</internalNodes>\n          <leafValues>\n            -2.4587619304656982e-01 9.1133296489715576e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 1.9322870066389441e-03</internalNodes>\n          <leafValues>\n            -1.1647839844226837e-01 1.8819290399551392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 -3.6017759703099728e-03</internalNodes>\n          <leafValues>\n            9.7600512206554413e-02 -4.8918090760707855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 3.1516118906438351e-03</internalNodes>\n          <leafValues>\n            6.5808869898319244e-02 -3.1577658653259277e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 -6.3677072525024414e-02</internalNodes>\n          <leafValues>\n            -8.6415481567382812e-01 -9.9097320344299078e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 -3.9085028693079948e-03</internalNodes>\n          <leafValues>\n            2.0826210081577301e-01 -1.0560230165719986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 -2.6837719604372978e-02</internalNodes>\n          <leafValues>\n            -1.8375129997730255e-01 2.9545329511165619e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 3.1312298960983753e-03</internalNodes>\n          <leafValues>\n            -1.2626689672470093e-01 1.6888590157032013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 -7.3491871356964111e-02</internalNodes>\n          <leafValues>\n            -1. 5.6774187833070755e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 1.8034819513559341e-02</internalNodes>\n          <leafValues>\n            -6.8617410957813263e-02 3.3438131213188171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 6.8655997514724731e-02</internalNodes>\n          <leafValues>\n            4.6462309546768665e-03 -8.0664628744125366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 497 -4.6970890834927559e-03</internalNodes>\n          <leafValues>\n            -2.0121769607067108e-01 1.1580040305852890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 4.6783890575170517e-02</internalNodes>\n          <leafValues>\n            -3.5802699625492096e-02 4.1625639796257019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 4.5946058817207813e-03</internalNodes>\n          <leafValues>\n            8.8457576930522919e-02 -2.6894488930702209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 -1.3852829579263926e-03</internalNodes>\n          <leafValues>\n            8.1391222774982452e-02 -1.4880420267581940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 2.1788759157061577e-02</internalNodes>\n          <leafValues>\n            -9.1640457510948181e-02 2.1261249482631683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 -1.3380090240389109e-04</internalNodes>\n          <leafValues>\n            9.6424743533134460e-02 -1.4717370271682739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -4.7990411520004272e-02</internalNodes>\n          <leafValues>\n            -6.1987131834030151e-01 3.8760710507631302e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 2.0026009529829025e-02</internalNodes>\n          <leafValues>\n            -3.5972420126199722e-02 1.9393420219421387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 1.0723130544647574e-03</internalNodes>\n          <leafValues>\n            -1.9447499513626099e-01 1.2064950168132782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 2.2665090858936310e-02</internalNodes>\n          <leafValues>\n            4.8719439655542374e-02 -2.3640799522399902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 -1.1042109690606594e-02</internalNodes>\n          <leafValues>\n            -2.6107341051101685e-01 1.0075490176677704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 -1.2811049818992615e-02</internalNodes>\n          <leafValues>\n            1.5199629962444305e-01 -8.8552959263324738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 -3.6628648638725281e-02</internalNodes>\n          <leafValues>\n            3.8858860731124878e-01 -7.7304549515247345e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>72</maxWeakCount>\n      <stageThreshold>-8.7708407640457153e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 510 -5.4606638848781586e-02</internalNodes>\n          <leafValues>\n            5.5801349878311157e-01 -1.4168889820575714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 3.3533740788698196e-02</internalNodes>\n          <leafValues>\n            -2.7386279776692390e-02 4.4381770491600037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 -9.9635301157832146e-03</internalNodes>\n          <leafValues>\n            2.5193908810615540e-01 -1.4647540450096130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 1.8188880058005452e-03</internalNodes>\n          <leafValues>\n            -1.1264120042324066e-01 1.1523260176181793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 -4.8793829977512360e-02</internalNodes>\n          <leafValues>\n            5.1317107677459717e-01 -7.8665018081665039e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 -1.3357769697904587e-02</internalNodes>\n          <leafValues>\n            -1.4197979867458344e-01 1.1862599849700928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 1.1562240542843938e-03</internalNodes>\n          <leafValues>\n            -2.0949220657348633e-01 1.5693040192127228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 -6.2384512275457382e-03</internalNodes>\n          <leafValues>\n            -1.4336450397968292e-01 1.1303550004959106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 4.4234818778932095e-03</internalNodes>\n          <leafValues>\n            -1.0358580201864243e-01 2.4589489400386810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 5.2964448928833008e-02</internalNodes>\n          <leafValues>\n            1.2561550363898277e-02 -6.2551808357238770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 5.5844681337475777e-03</internalNodes>\n          <leafValues>\n            8.3967886865139008e-02 -2.4653799831867218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 -4.1809541289694607e-04</internalNodes>\n          <leafValues>\n            6.9588072597980499e-02 -1.3558819890022278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 -8.9637134224176407e-03</internalNodes>\n          <leafValues>\n            -3.0442738533020020e-01 6.9894723594188690e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 2.4479050189256668e-02</internalNodes>\n          <leafValues>\n            -3.1651828438043594e-02 2.0308789610862732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 -2.5842329487204552e-02</internalNodes>\n          <leafValues>\n            5.0401061773300171e-01 -6.3922062516212463e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 -2.0785620436072350e-03</internalNodes>\n          <leafValues>\n            1.0980220139026642e-01 -1.1839559674263000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 6.8030342459678650e-02</internalNodes>\n          <leafValues>\n            4.2290739715099335e-02 -5.1855510473251343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 -7.0639760233461857e-03</internalNodes>\n          <leafValues>\n            -2.0031100511550903e-01 2.4955609813332558e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 -3.4848200157284737e-03</internalNodes>\n          <leafValues>\n            2.3135329782962799e-01 -9.6989557147026062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 1.3147160410881042e-02</internalNodes>\n          <leafValues>\n            -3.7450950592756271e-02 2.5842788815498352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 -1.4271659776568413e-02</internalNodes>\n          <leafValues>\n            -3.0110171437263489e-01 7.9672336578369141e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 1.2653480283915997e-02</internalNodes>\n          <leafValues>\n            4.9039140343666077e-02 -1.4988109469413757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 -4.4893440790474415e-03</internalNodes>\n          <leafValues>\n            1.7208859324455261e-01 -1.5355649590492249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 3.2365400344133377e-02</internalNodes>\n          <leafValues>\n            -9.0493112802505493e-02 3.5779160261154175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 4.6125808730721474e-03</internalNodes>\n          <leafValues>\n            1.1445190012454987e-01 -2.6519489288330078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 2.8645930811762810e-02</internalNodes>\n          <leafValues>\n            -3.5988539457321167e-02 3.0025520920753479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 -2.3571979254484177e-02</internalNodes>\n          <leafValues>\n            -2.4872820079326630e-01 9.1967120766639709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 -1.0739799588918686e-02</internalNodes>\n          <leafValues>\n            -2.1367760002613068e-01 9.6477411687374115e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 2.3728659376502037e-02</internalNodes>\n          <leafValues>\n            -7.0916198194026947e-02 4.3828758597373962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 -3.2800701260566711e-01</internalNodes>\n          <leafValues>\n            5.8840030431747437e-01 -3.1756788492202759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 7.5008560997957829e-06</internalNodes>\n          <leafValues>\n            -1.8288560211658478e-01 1.2022940069437027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 3.0071409419178963e-02</internalNodes>\n          <leafValues>\n            2.7802020311355591e-02 -4.3224281072616577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 -2.1936609409749508e-03</internalNodes>\n          <leafValues>\n            1.3592420518398285e-01 -1.4038629829883575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 2.0174339413642883e-02</internalNodes>\n          <leafValues>\n            -6.1628919094800949e-02 3.1579768657684326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 9.7460206598043442e-03</internalNodes>\n          <leafValues>\n            8.8958032429218292e-02 -2.2594009339809418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 -1.2958340346813202e-02</internalNodes>\n          <leafValues>\n            -1.2200850248336792e-01 8.6518086493015289e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 1.1445499956607819e-02</internalNodes>\n          <leafValues>\n            -6.4182333648204803e-02 3.0279749631881714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 -3.3802569378167391e-03</internalNodes>\n          <leafValues>\n            1.1177670210599899e-01 -1.2922379374504089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 2.0366210490465164e-02</internalNodes>\n          <leafValues>\n            1.0104539990425110e-01 -2.5991159677505493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 3.8058649748563766e-02</internalNodes>\n          <leafValues>\n            1.3168349862098694e-02 -7.5580632686614990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 2.3050000891089439e-03</internalNodes>\n          <leafValues>\n            -1.0766649991273880e-01 1.8757669627666473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 5.1847118884325027e-02</internalNodes>\n          <leafValues>\n            -2.2320529446005821e-02 1.8795830011367798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 1.1383029632270336e-02</internalNodes>\n          <leafValues>\n            6.0226161032915115e-02 -3.5961788892745972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 8.2553178071975708e-03</internalNodes>\n          <leafValues>\n            -8.5131391882896423e-02 2.3493440449237823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 -2.6984339579939842e-02</internalNodes>\n          <leafValues>\n            -2.1479399502277374e-01 9.3656733632087708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 -1.0289980098605156e-02</internalNodes>\n          <leafValues>\n            5.8254890143871307e-02 -8.3950929343700409e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -1.4419780200114474e-05</internalNodes>\n          <leafValues>\n            1.0392870008945465e-01 -1.7317299544811249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 1.0065140202641487e-02</internalNodes>\n          <leafValues>\n            -4.1311118751764297e-02 1.7616020143032074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 -1.4870229642838240e-04</internalNodes>\n          <leafValues>\n            1.5657539665699005e-01 -1.2030059844255447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 -3.1059589236974716e-03</internalNodes>\n          <leafValues>\n            1.1674880236387253e-01 -9.1372460126876831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 1.0708030313253403e-02</internalNodes>\n          <leafValues>\n            -7.7608227729797363e-02 2.7916100621223450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 561 -9.7792129963636398e-03</internalNodes>\n          <leafValues>\n            -2.9060921072959900e-01 7.1562640368938446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 2.0121980458498001e-02</internalNodes>\n          <leafValues>\n            4.3994959443807602e-02 -4.2539501190185547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 -6.3295163214206696e-02</internalNodes>\n          <leafValues>\n            3.7034231424331665e-01 -5.2549809217453003e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 -8.7289556860923767e-02</internalNodes>\n          <leafValues>\n            -6.4299279451370239e-01 3.1952869147062302e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 2.0398540422320366e-02</internalNodes>\n          <leafValues>\n            -4.5955598354339600e-02 4.6266159415245056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 -4.0313000790774822e-03</internalNodes>\n          <leafValues>\n            1.3840849697589874e-01 -1.7980839312076569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 -1.5734519809484482e-02</internalNodes>\n          <leafValues>\n            -1.8477180600166321e-01 6.9983080029487610e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 3.3332880120724440e-03</internalNodes>\n          <leafValues>\n            1.1277650296688080e-01 -1.9513790309429169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 4.3689161539077759e-02</internalNodes>\n          <leafValues>\n            5.9510939754545689e-03 -5.5423438549041748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 -2.0920610986649990e-03</internalNodes>\n          <leafValues>\n            1.9163469970226288e-01 -9.7136110067367554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 2.0574270747601986e-03</internalNodes>\n          <leafValues>\n            -1.0197430104017258e-01 1.4083810150623322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 8.8018123060464859e-03</internalNodes>\n          <leafValues>\n            1.1987809836864471e-01 -1.5638549625873566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 -1.6882529482245445e-02</internalNodes>\n          <leafValues>\n            -1.8438099324703217e-01 1.9492870196700096e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 -6.1647890834137797e-04</internalNodes>\n          <leafValues>\n            1.0665109753608704e-01 -2.2164009511470795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 1.0317339911125600e-04</internalNodes>\n          <leafValues>\n            -1.1228899657726288e-01 1.3858650624752045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 1.5316329896450043e-02</internalNodes>\n          <leafValues>\n            -5.0639409571886063e-02 4.1119828820228577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 1.0660690255463123e-02</internalNodes>\n          <leafValues>\n            5.8820810168981552e-02 -1.6454669833183289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 -1.9296869635581970e-02</internalNodes>\n          <leafValues>\n            3.9260959625244141e-01 -5.2761189639568329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 1.0018110275268555e-02</internalNodes>\n          <leafValues>\n            1.0068470239639282e-01 -1.9756269454956055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 -2.7263790369033813e-02</internalNodes>\n          <leafValues>\n            3.5332089662551880e-01 -5.5305551737546921e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 5.4494310170412064e-03</internalNodes>\n          <leafValues>\n            6.7253768444061279e-02 -1.8384470045566559e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>75</maxWeakCount>\n      <stageThreshold>-8.5267168283462524e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 582 -5.7434860616922379e-02</internalNodes>\n          <leafValues>\n            5.0582551956176758e-01 -1.2274570018053055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 -1.2750659883022308e-01</internalNodes>\n          <leafValues>\n            5.7605969905853271e-01 -4.3710928410291672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 -6.3675642013549805e-02</internalNodes>\n          <leafValues>\n            5.7122522592544556e-01 -4.9968320876359940e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 -1.1928480118513107e-02</internalNodes>\n          <leafValues>\n            2.1641939878463745e-01 -1.8480269610881805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 1.3247699826024473e-04</internalNodes>\n          <leafValues>\n            -2.2685679793357849e-01 1.0648279637098312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 6.4140267204493284e-04</internalNodes>\n          <leafValues>\n            9.4751678407192230e-02 -2.6892009377479553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 -2.9463530518114567e-03</internalNodes>\n          <leafValues>\n            1.3910910487174988e-01 -1.7091070115566254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 5.3384741768240929e-03</internalNodes>\n          <leafValues>\n            8.3969242870807648e-02 -9.5441989600658417e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 5.8703150600194931e-02</internalNodes>\n          <leafValues>\n            -6.9647520780563354e-02 3.3629441261291504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 -2.5406300555914640e-03</internalNodes>\n          <leafValues>\n            9.6176013350486755e-02 -1.5758140385150909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 -3.1899519264698029e-02</internalNodes>\n          <leafValues>\n            -2.7956488728523254e-01 7.0359513163566589e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 -3.2022708654403687e-01</internalNodes>\n          <leafValues>\n            -9.0805047750473022e-01 7.5922380201518536e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 3.5796251147985458e-02</internalNodes>\n          <leafValues>\n            -5.0070770084857941e-02 4.2101579904556274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 -1.9079160690307617e-01</internalNodes>\n          <leafValues>\n            -2.2061030566692352e-01 6.5184786915779114e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 596 -1.2181829661130905e-02</internalNodes>\n          <leafValues>\n            1.3479439914226532e-01 -1.6667750477790833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 -3.2165799289941788e-02</internalNodes>\n          <leafValues>\n            -2.5105410814285278e-01 1.9344560801982880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 3.6299630999565125e-02</internalNodes>\n          <leafValues>\n            -5.9490781277418137e-02 4.0007731318473816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 2.0224580541253090e-02</internalNodes>\n          <leafValues>\n            5.6489799171686172e-02 -1.3418239355087280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 -2.5393130257725716e-02</internalNodes>\n          <leafValues>\n            3.6507838964462280e-01 -6.6002182662487030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 -1.2022369541227818e-02</internalNodes>\n          <leafValues>\n            -1.7655059695243835e-01 7.3997639119625092e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 4.7965139150619507e-02</internalNodes>\n          <leafValues>\n            4.4668558984994888e-02 -4.4584980607032776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 -2.0564019680023193e-01</internalNodes>\n          <leafValues>\n            -7.3254501819610596e-01 1.9955230876803398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 -1.6601709648966789e-03</internalNodes>\n          <leafValues>\n            1.1633270233869553e-01 -1.5488509833812714e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 8.6899623274803162e-02</internalNodes>\n          <leafValues>\n            -5.4107550531625748e-02 2.6952400803565979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 -1.1374129680916667e-03</internalNodes>\n          <leafValues>\n            -1.4314429461956024e-01 1.2444330006837845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 3.0976340174674988e-02</internalNodes>\n          <leafValues>\n            2.9864860698580742e-02 -3.2607930898666382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 2.6978010311722755e-02</internalNodes>\n          <leafValues>\n            -4.5098248869180679e-02 3.6128848791122437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 1.9421820342540741e-01</internalNodes>\n          <leafValues>\n            3.2255191355943680e-02 -6.8981701135635376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 -2.0443359389901161e-02</internalNodes>\n          <leafValues>\n            2.9300108551979065e-01 -6.4483217895030975e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 -4.0420450270175934e-02</internalNodes>\n          <leafValues>\n            -7.6823359727859497e-01 1.2281980365514755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 -1.2641429901123047e-02</internalNodes>\n          <leafValues>\n            -2.7573791146278381e-01 6.1901118606328964e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 -3.9670299738645554e-02</internalNodes>\n          <leafValues>\n            3.2828390598297119e-01 -2.0364999771118164e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 2.0246729254722595e-02</internalNodes>\n          <leafValues>\n            -5.8393601328134537e-02 3.3060538768768311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 8.9611168950796127e-03</internalNodes>\n          <leafValues>\n            9.0096317231655121e-02 -2.2343009710311890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 -8.3055719733238220e-03</internalNodes>\n          <leafValues>\n            1.4175349473953247e-01 -1.2607260048389435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 -2.8248139642528258e-05</internalNodes>\n          <leafValues>\n            9.4516962766647339e-02 -2.1810370683670044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 -5.1939398981630802e-03</internalNodes>\n          <leafValues>\n            1.3304319977760315e-01 -1.3341580331325531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 1.1773110181093216e-01</internalNodes>\n          <leafValues>\n            2.9586199671030045e-02 -2.4020829796791077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 6.7896701395511627e-02</internalNodes>\n          <leafValues>\n            8.0913707613945007e-02 -2.3454460501670837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 -2.6683699339628220e-02</internalNodes>\n          <leafValues>\n            3.0590981245040894e-01 -6.4152047038078308e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 3.5058211069554090e-03</internalNodes>\n          <leafValues>\n            8.9341968297958374e-02 -2.2773680090904236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 -6.5844372147694230e-04</internalNodes>\n          <leafValues>\n            1.2458139657974243e-01 -9.1352440416812897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 7.2530400939285755e-03</internalNodes>\n          <leafValues>\n            -6.9285176694393158e-02 2.5482881069183350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 -2.8056129813194275e-02</internalNodes>\n          <leafValues>\n            -2.0867039263248444e-01 3.3539578318595886e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 -5.1205180585384369e-02</internalNodes>\n          <leafValues>\n            -2.4107429385185242e-01 6.4439408481121063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 2.9234649613499641e-02</internalNodes>\n          <leafValues>\n            -5.0803840160369873e-02 3.6485049128532410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 -1.0219520330429077e-01</internalNodes>\n          <leafValues>\n            4.0123480558395386e-01 -4.2902119457721710e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 1.5104969963431358e-02</internalNodes>\n          <leafValues>\n            1.0481490194797516e-01 -1.8472430109977722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 -1.2570650316774845e-02</internalNodes>\n          <leafValues>\n            -2.0540939271450043e-01 9.3013197183609009e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 1.2253070250153542e-02</internalNodes>\n          <leafValues>\n            -5.9285100549459457e-02 2.3927310109138489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 -2.6166990399360657e-02</internalNodes>\n          <leafValues>\n            -6.9966787099838257e-01 2.4906709790229797e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 7.0817661471664906e-03</internalNodes>\n          <leafValues>\n            2.4173120036721230e-02 -5.5144792795181274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 2.1426850929856300e-02</internalNodes>\n          <leafValues>\n            6.4168840646743774e-02 -2.5997900962829590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 1.8189709633588791e-02</internalNodes>\n          <leafValues>\n            3.5838250070810318e-02 -1.8020580708980560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 1.7415799200534821e-02</internalNodes>\n          <leafValues>\n            -8.3862036466598511e-02 3.3338528871536255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 -1.4878029469400644e-03</internalNodes>\n          <leafValues>\n            1.2078859657049179e-01 -1.2769320607185364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 7.5296638533473015e-03</internalNodes>\n          <leafValues>\n            -7.0014707744121552e-02 3.2181090116500854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 -6.1499018222093582e-02</internalNodes>\n          <leafValues>\n            4.6469798684120178e-01 -1.0073710232973099e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 -1.9133290334139019e-04</internalNodes>\n          <leafValues>\n            -1.4094290137290955e-01 1.3830110430717468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 -2.4422289803624153e-02</internalNodes>\n          <leafValues>\n            -2.5292310118675232e-01 6.7684173583984375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 -2.6136320829391479e-01</internalNodes>\n          <leafValues>\n            3.4003540873527527e-01 -5.8462549000978470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 -7.6046779751777649e-02</internalNodes>\n          <leafValues>\n            -7.8514158725738525e-01 5.2708541043102741e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 -3.0279329512268305e-03</internalNodes>\n          <leafValues>\n            1.8527059257030487e-01 -9.0691961348056793e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 -8.0219199880957603e-03</internalNodes>\n          <leafValues>\n            -1.2540580332279205e-01 3.0594889074563980e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 -2.0705960690975189e-01</internalNodes>\n          <leafValues>\n            -7.5411921739578247e-01 2.1201130002737045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 -9.5322817564010620e-02</internalNodes>\n          <leafValues>\n            -2.9623070359230042e-01 1.3138709589838982e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 9.5921624451875687e-03</internalNodes>\n          <leafValues>\n            8.4324322640895844e-02 -2.1746580302715302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 -1.3089469633996487e-02</internalNodes>\n          <leafValues>\n            9.3607500195503235e-02 -6.5754130482673645e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 1.1732880026102066e-02</internalNodes>\n          <leafValues>\n            -8.0039046704769135e-02 2.3291939496994019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 1.5239049494266510e-01</internalNodes>\n          <leafValues>\n            9.9299130961298943e-03 -6.5196067094802856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 -6.4591512084007263e-02</internalNodes>\n          <leafValues>\n            2.8372219204902649e-01 -6.0058828443288803e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 -5.5493030697107315e-02</internalNodes>\n          <leafValues>\n            2.6659101247787476e-01 -1.0336419567465782e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 -5.0287410616874695e-02</internalNodes>\n          <leafValues>\n            -6.9501471519470215e-01 2.7849879115819931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 -4.7794249653816223e-01</internalNodes>\n          <leafValues>\n            -9.2871952056884766e-01 5.9050112031400204e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 -1.4398519881069660e-02</internalNodes>\n          <leafValues>\n            -4.5541068911552429e-01 3.6409981548786163e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>67</maxWeakCount>\n      <stageThreshold>-7.4186658859252930e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 657 1.9511899445205927e-03</internalNodes>\n          <leafValues>\n            -2.4936990439891815e-01 1.4111639559268951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 -4.6634670346975327e-02</internalNodes>\n          <leafValues>\n            3.7840589880943298e-01 -7.8401736915111542e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 1.6193749383091927e-02</internalNodes>\n          <leafValues>\n            7.5213313102722168e-02 -4.1991469264030457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 -1.2459639401640743e-04</internalNodes>\n          <leafValues>\n            6.8576186895370483e-02 -1.7935420572757721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 7.3257791809737682e-03</internalNodes>\n          <leafValues>\n            1.0322099924087524e-01 -2.6099279522895813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 -1.5020779756014235e-05</internalNodes>\n          <leafValues>\n            7.3122598230838776e-02 -1.6718889772891998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 -3.4522008150815964e-02</internalNodes>\n          <leafValues>\n            -3.9326989650726318e-01 7.6727166771888733e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 -8.2679510116577148e-02</internalNodes>\n          <leafValues>\n            -7.4677819013595581e-01 1.5530600212514400e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 8.2162402570247650e-02</internalNodes>\n          <leafValues>\n            -6.9249503314495087e-02 3.7914600968360901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 3.4187830984592438e-02</internalNodes>\n          <leafValues>\n            4.2608659714460373e-02 -1.5429890155792236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 -1.7891369760036469e-02</internalNodes>\n          <leafValues>\n            -3.0639570951461792e-01 7.8118398785591125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 3.3130999654531479e-02</internalNodes>\n          <leafValues>\n            -5.6183800101280212e-02 3.7405240535736084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 -5.7486710138618946e-03</internalNodes>\n          <leafValues>\n            1.2490350008010864e-01 -2.0527860522270203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 3.3536829054355621e-02</internalNodes>\n          <leafValues>\n            -4.8344220966100693e-02 2.6724401116371155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 2.4723829701542854e-02</internalNodes>\n          <leafValues>\n            8.3678968250751495e-02 -3.3730649948120117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 2.2355809342116117e-03</internalNodes>\n          <leafValues>\n            1.0374590009450912e-01 -1.3071919977664948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 -2.4322168901562691e-03</internalNodes>\n          <leafValues>\n            1.5645089745521545e-01 -1.3284459710121155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 2.5999119505286217e-02</internalNodes>\n          <leafValues>\n            -8.0343127250671387e-02 2.1610119938850403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 3.6965688195778057e-05</internalNodes>\n          <leafValues>\n            -1.7871010303497314e-01 1.0563120245933533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 -1.6291500627994537e-01</internalNodes>\n          <leafValues>\n            -6.9141697883605957e-01 2.2374730557203293e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 1.3008140027523041e-01</internalNodes>\n          <leafValues>\n            -4.2769040912389755e-02 4.6373569965362549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 678 2.7658540755510330e-02</internalNodes>\n          <leafValues>\n            -3.7108600139617920e-02 3.8386580348014832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 -1.0020419955253601e-02</internalNodes>\n          <leafValues>\n            -2.6328051090240479e-01 7.4858680367469788e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 -3.0459940433502197e-02</internalNodes>\n          <leafValues>\n            3.2300901412963867e-01 -2.5858370587229729e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 1.3251040363684297e-03</internalNodes>\n          <leafValues>\n            1.4447669684886932e-01 -2.1082170307636261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 -2.7931010350584984e-02</internalNodes>\n          <leafValues>\n            1.4374519884586334e-01 -1.6162300109863281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 -8.8642723858356476e-03</internalNodes>\n          <leafValues>\n            2.3000620305538177e-01 -9.5095098018646240e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 -1.2213969603180885e-02</internalNodes>\n          <leafValues>\n            -2.4646399915218353e-01 6.5522022545337677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 -4.8737529665231705e-02</internalNodes>\n          <leafValues>\n            -7.9127711057662964e-01 2.5416409596800804e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 6.1185289174318314e-02</internalNodes>\n          <leafValues>\n            -1.2226430408190936e-04 -9.0545868873596191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 2.6453679427504539e-02</internalNodes>\n          <leafValues>\n            2.6562800630927086e-02 -6.3954341411590576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 8.8589917868375778e-03</internalNodes>\n          <leafValues>\n            5.4145850241184235e-02 -2.1601280570030212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 3.4847941249608994e-02</internalNodes>\n          <leafValues>\n            -4.5749358832836151e-02 4.3935400247573853e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 -1.4598210155963898e-01</internalNodes>\n          <leafValues>\n            -5.5561769008636475e-01 9.5249973237514496e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 -5.0456568598747253e-02</internalNodes>\n          <leafValues>\n            -7.5287848711013794e-01 2.0214710384607315e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 -8.5443779826164246e-02</internalNodes>\n          <leafValues>\n            -1. -1.3681349810212851e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 1.3248980045318604e-02</internalNodes>\n          <leafValues>\n            6.3400700688362122e-02 -2.5411811470985413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 -6.5935611724853516e-01</internalNodes>\n          <leafValues>\n            -1. 7.7378489077091217e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 5.0879311747848988e-03</internalNodes>\n          <leafValues>\n            -8.3207741379737854e-02 1.8876290321350098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 -3.4071630798280239e-03</internalNodes>\n          <leafValues>\n            1.4578290283679962e-01 -9.1960333287715912e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 -2.1656269207596779e-02</internalNodes>\n          <leafValues>\n            -6.5364891290664673e-01 2.7129750698804855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 9.4357347115874290e-03</internalNodes>\n          <leafValues>\n            6.4360111951828003e-02 -2.3885479569435120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 699 -7.5177568942308426e-03</internalNodes>\n          <leafValues>\n            2.4519060552120209e-01 -6.8221837282180786e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 1.6067629680037498e-02</internalNodes>\n          <leafValues>\n            7.6069780625402927e-03 -3.1668719649314880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 -1.8057749839499593e-03</internalNodes>\n          <leafValues>\n            1.2710370123386383e-01 -1.2145719677209854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 -4.4154901057481766e-02</internalNodes>\n          <leafValues>\n            -4.8579609394073486e-01 2.3444859310984612e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 7.5462698005139828e-03</internalNodes>\n          <leafValues>\n            6.8430766463279724e-02 -2.3316520452499390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 1.0868260264396667e-01</internalNodes>\n          <leafValues>\n            -4.1663911193609238e-02 3.9452219009399414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 6.1248701810836792e-01</internalNodes>\n          <leafValues>\n            2.0702170208096504e-02 -9.8494791984558105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 4.9828290939331055e-02</internalNodes>\n          <leafValues>\n            2.7304550167173147e-03 -4.0181699395179749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 -7.2768718004226685e-02</internalNodes>\n          <leafValues>\n            3.2676479220390320e-01 -4.9144338816404343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 2.4314310401678085e-02</internalNodes>\n          <leafValues>\n            -7.8135710209608078e-03 5.8223301172256470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 -1.7177179688587785e-04</internalNodes>\n          <leafValues>\n            8.1669911742210388e-02 -2.0376220345497131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 -4.0095269680023193e-02</internalNodes>\n          <leafValues>\n            5.4681521654129028e-01 -1.7179539427161217e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 711 -8.9634567499160767e-02</internalNodes>\n          <leafValues>\n            -8.1614011526107788e-01 2.1283889189362526e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 1.8692140281200409e-01</internalNodes>\n          <leafValues>\n            8.3980746567249298e-03 -6.0185301303863525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 -4.3038379400968552e-02</internalNodes>\n          <leafValues>\n            -8.7898987531661987e-01 1.4930729754269123e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 -1.8602630007080734e-04</internalNodes>\n          <leafValues>\n            4.0156241506338120e-02 -8.2604438066482544e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 -1.4392189914360642e-03</internalNodes>\n          <leafValues>\n            -1.7102399468421936e-01 9.1203540563583374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 4.2160619050264359e-02</internalNodes>\n          <leafValues>\n            -3.5861019045114517e-02 1.5174309909343719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 7.5991409830749035e-03</internalNodes>\n          <leafValues>\n            1.0874529927968979e-01 -1.6147160530090332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 -5.7539329864084721e-03</internalNodes>\n          <leafValues>\n            -2.5677061080932617e-01 5.8457151055335999e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 -2.7736749500036240e-02</internalNodes>\n          <leafValues>\n            2.2325170040130615e-01 -7.4071511626243591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 -2.5676110759377480e-02</internalNodes>\n          <leafValues>\n            1.8831080198287964e-01 -5.3860381245613098e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 1.5890730544924736e-02</internalNodes>\n          <leafValues>\n            5.1709540188312531e-02 -3.8476571440696716e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 -8.6374267935752869e-02</internalNodes>\n          <leafValues>\n            -5.5680698156356812e-01 9.4922119751572609e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 1.9480630289763212e-03</internalNodes>\n          <leafValues>\n            -1.0807219892740250e-01 1.4771680533885956e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>88</maxWeakCount>\n      <stageThreshold>-8.3640968799591064e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 724 -6.8531660363078117e-03</internalNodes>\n          <leafValues>\n            2.8935509920120239e-01 -2.7689141035079956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 -6.9217637181282043e-02</internalNodes>\n          <leafValues>\n            3.4909790754318237e-01 -4.9741089344024658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 -1.3092979788780212e-01</internalNodes>\n          <leafValues>\n            4.2791560292243958e-01 -9.6156008541584015e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 -2.9759139579255134e-05</internalNodes>\n          <leafValues>\n            1.1675780266523361e-01 -2.4678389728069305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 -4.7100789844989777e-02</internalNodes>\n          <leafValues>\n            3.7259110808372498e-01 -5.9072919189929962e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 4.4124510139226913e-02</internalNodes>\n          <leafValues>\n            7.8904099762439728e-02 -2.5528541207313538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 4.2540309950709343e-03</internalNodes>\n          <leafValues>\n            -2.3612380027770996e-01 1.2856779992580414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -1.0833570268005133e-03</internalNodes>\n          <leafValues>\n            1.4347310364246368e-01 -1.4203630387783051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 5.9925230743829161e-05</internalNodes>\n          <leafValues>\n            -1.9927270710468292e-01 8.8502913713455200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 -7.3021486401557922e-02</internalNodes>\n          <leafValues>\n            -8.0666261911392212e-01 3.2041858881711960e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 7.9495050013065338e-03</internalNodes>\n          <leafValues>\n            -6.5878443419933319e-02 2.7071261405944824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 -3.3911041100509465e-04</internalNodes>\n          <leafValues>\n            1.3490739464759827e-01 -1.3354760408401489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 -2.6010179892182350e-02</internalNodes>\n          <leafValues>\n            -2.8074580430984497e-01 7.7902659773826599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 -3.1153090298175812e-02</internalNodes>\n          <leafValues>\n            2.7022659778594971e-01 -2.6994340121746063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 1.0946249589323997e-02</internalNodes>\n          <leafValues>\n            -1.5993720293045044e-01 1.0350699722766876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 7.3101207613945007e-02</internalNodes>\n          <leafValues>\n            -4.1365791112184525e-03 5.2339828014373779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 3.0207149684429169e-02</internalNodes>\n          <leafValues>\n            -4.9229420721530914e-02 4.2848989367485046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 6.4985260367393494e-02</internalNodes>\n          <leafValues>\n            3.9118612185120583e-03 -1.0003379583358765e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 -2.9119249433279037e-02</internalNodes>\n          <leafValues>\n            -7.7025991678237915e-01 2.3930810391902924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 5.0458308309316635e-02</internalNodes>\n          <leafValues>\n            6.9283558987081051e-03 -5.1854777336120605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 -3.8890179246664047e-02</internalNodes>\n          <leafValues>\n            -4.8176848888397217e-01 3.0270289629697800e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 745 5.8319371193647385e-02</internalNodes>\n          <leafValues>\n            -2.2101389244198799e-02 2.8393501043319702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 -1.0803690180182457e-02</internalNodes>\n          <leafValues>\n            1.2842060625553131e-01 -1.3849779963493347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 9.4525264576077461e-03</internalNodes>\n          <leafValues>\n            -5.7194419205188751e-02 1.7759050428867340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 1.5229170210659504e-02</internalNodes>\n          <leafValues>\n            1.0501170158386230e-01 -2.0518389344215393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 -8.9435698464512825e-04</internalNodes>\n          <leafValues>\n            6.8668253719806671e-02 -1.4666010439395905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 -1.8322499468922615e-02</internalNodes>\n          <leafValues>\n            -2.3613719642162323e-01 8.3538331091403961e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 2.5474189314991236e-03</internalNodes>\n          <leafValues>\n            -8.4731526672840118e-02 1.7211520671844482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 -1.4951790217310190e-03</internalNodes>\n          <leafValues>\n            1.8642990291118622e-01 -1.2753330171108246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 2.4796150624752045e-02</internalNodes>\n          <leafValues>\n            3.2923560589551926e-02 -4.0954729914665222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 -2.8976860921829939e-03</internalNodes>\n          <leafValues>\n            1.4480039477348328e-01 -1.0404679924249649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 7.0361169055104256e-03</internalNodes>\n          <leafValues>\n            -6.7916557192802429e-02 2.1544350683689117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 -1.1870389804244041e-02</internalNodes>\n          <leafValues>\n            -2.5537449121475220e-01 7.4443407356739044e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 2.4765899870544672e-03</internalNodes>\n          <leafValues>\n            6.8313367664813995e-02 -1.6111320257186890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 2.1284550428390503e-02</internalNodes>\n          <leafValues>\n            3.7090871483087540e-02 -4.6916520595550537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 -1.0369479656219482e-02</internalNodes>\n          <leafValues>\n            1.0807839781045914e-01 -6.0489870607852936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 1.0732480324804783e-02</internalNodes>\n          <leafValues>\n            -5.8582380414009094e-02 3.1958609819412231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 -2.3235160112380981e-01</internalNodes>\n          <leafValues>\n            -1. 8.2511743530631065e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 -6.0572529037017375e-05</internalNodes>\n          <leafValues>\n            8.0201767385005951e-02 -2.3583050072193146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 -2.7367009315639734e-03</internalNodes>\n          <leafValues>\n            1.5369090437889099e-01 -7.8800879418849945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 3.1168010085821152e-02</internalNodes>\n          <leafValues>\n            -4.1852951049804688e-02 3.7374469637870789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 4.5415129512548447e-02</internalNodes>\n          <leafValues>\n            6.6594500094652176e-03 -9.9975287914276123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 -1.3742819428443909e-03</internalNodes>\n          <leafValues>\n            1.0587850213050842e-01 -1.9234779477119446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 3.0089360661804676e-03</internalNodes>\n          <leafValues>\n            9.4038642942905426e-02 -1.5442730486392975e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 -7.1071386337280273e-02</internalNodes>\n          <leafValues>\n            -5.4955267906188965e-01 2.5523129850625992e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 1.0958979837596416e-03</internalNodes>\n          <leafValues>\n            -6.1327658593654633e-02 5.7677619159221649e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 -2.3706799373030663e-02</internalNodes>\n          <leafValues>\n            2.9486098885536194e-01 -6.6553473472595215e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 6.8882037885487080e-03</internalNodes>\n          <leafValues>\n            7.3861703276634216e-02 -2.5727730989456177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 -4.9158040434122086e-02</internalNodes>\n          <leafValues>\n            3.2406309247016907e-01 -5.2785839885473251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 7.1369417011737823e-02</internalNodes>\n          <leafValues>\n            1.3209920376539230e-02 -7.4821132421493530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 -8.4517486393451691e-03</internalNodes>\n          <leafValues>\n            -2.0652799308300018e-01 9.3139596283435822e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 -1.5554410219192505e-01</internalNodes>\n          <leafValues>\n            -5.0736141204833984e-01 1.1575420387089252e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 -4.5976821333169937e-02</internalNodes>\n          <leafValues>\n            3.3433321118354797e-01 -5.6558281183242798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 1.7900219187140465e-02</internalNodes>\n          <leafValues>\n            3.4091990441083908e-02 -2.8565031290054321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 6.7351139150559902e-03</internalNodes>\n          <leafValues>\n            -6.6538818180561066e-02 2.3322120308876038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 6.4544100314378738e-03</internalNodes>\n          <leafValues>\n            4.7224499285221100e-02 -1.4422370493412018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 780 -1.1029049754142761e-02</internalNodes>\n          <leafValues>\n            -2.6442399621009827e-01 6.2542691826820374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 -3.3727919217199087e-03</internalNodes>\n          <leafValues>\n            1.2575919926166534e-01 -6.8357646465301514e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 -2.2960419300943613e-03</internalNodes>\n          <leafValues>\n            -1.5573309361934662e-01 9.4681970775127411e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 -7.9503163695335388e-02</internalNodes>\n          <leafValues>\n            -3.8246139883995056e-01 1.7201259732246399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 -2.5240880250930786e-01</internalNodes>\n          <leafValues>\n            3.0139809846878052e-01 -5.8942809700965881e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 3.6313079297542572e-02</internalNodes>\n          <leafValues>\n            2.1105870604515076e-02 -2.0811690390110016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 6.8737521767616272e-02</internalNodes>\n          <leafValues>\n            -3.2400298863649368e-02 5.1345300674438477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 -2.1814550459384918e-01</internalNodes>\n          <leafValues>\n            -7.0093291997909546e-01 1.6260979697108269e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 -1.9770899415016174e-01</internalNodes>\n          <leafValues>\n            -6.7817360162734985e-01 1.7937550321221352e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 -1.0131119936704636e-01</internalNodes>\n          <leafValues>\n            3.6470630764961243e-01 -4.9969438463449478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 5.4146698676049709e-03</internalNodes>\n          <leafValues>\n            6.6086590290069580e-02 -2.3327399790287018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 -4.0590178221464157e-02</internalNodes>\n          <leafValues>\n            2.1464720368385315e-01 -4.3033309280872345e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 -1.3324919855222106e-03</internalNodes>\n          <leafValues>\n            1.2975679337978363e-01 -1.2794280052185059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 5.7570589706301689e-03</internalNodes>\n          <leafValues>\n            4.3469998985528946e-02 -1.1977300047874451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 -4.0872758254408836e-03</internalNodes>\n          <leafValues>\n            -2.0180100202560425e-01 9.2624872922897339e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 2.1345280110836029e-02</internalNodes>\n          <leafValues>\n            -2.6310870423913002e-02 2.9142528772354126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 -2.4241849314421415e-03</internalNodes>\n          <leafValues>\n            1.7131569981575012e-01 -1.1723010241985321e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 6.0677550733089447e-02</internalNodes>\n          <leafValues>\n            -4.8347217962145805e-03 5.6577122211456299e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 3.1573011074215174e-04</internalNodes>\n          <leafValues>\n            -1.1499550193548203e-01 1.3094860315322876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 -1.4639530563727021e-03</internalNodes>\n          <leafValues>\n            1.0708429664373398e-01 -8.2188747823238373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 -8.1629276275634766e-02</internalNodes>\n          <leafValues>\n            -7.0090162754058838e-01 2.1318640559911728e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 -2.2923630604054779e-04</internalNodes>\n          <leafValues>\n            5.2449010312557220e-02 -5.7273399084806442e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 8.6732655763626099e-03</internalNodes>\n          <leafValues>\n            -1.0944409668445587e-01 1.4530800282955170e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 -9.5603411318734288e-04</internalNodes>\n          <leafValues>\n            5.4728660732507706e-02 -7.6677009463310242e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 -5.6814689189195633e-02</internalNodes>\n          <leafValues>\n            -7.2493737936019897e-01 1.7791330814361572e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 6.4268838614225388e-03</internalNodes>\n          <leafValues>\n            -3.7768699228763580e-02 8.3454750478267670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 5.2451258525252342e-03</internalNodes>\n          <leafValues>\n            -7.5806751847267151e-02 2.1549069881439209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 6.7577441222965717e-03</internalNodes>\n          <leafValues>\n            7.7163867652416229e-02 -2.4957199394702911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 -5.7494179345667362e-03</internalNodes>\n          <leafValues>\n            1.4245559275150299e-01 -1.2740920484066010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 -6.7760650999844074e-03</internalNodes>\n          <leafValues>\n            -2.3316009342670441e-01 3.9975211024284363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 3.5247279447503388e-04</internalNodes>\n          <leafValues>\n            -1.3083159923553467e-01 1.1577410250902176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 1.4523849822580814e-03</internalNodes>\n          <leafValues>\n            -9.2724457383155823e-02 6.5486960113048553e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>80</maxWeakCount>\n      <stageThreshold>-7.2322398424148560e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 812 -3.1163799762725830e-01</internalNodes>\n          <leafValues>\n            3.8062000274658203e-01 -1.1115840077400208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 -3.0338248610496521e-01</internalNodes>\n          <leafValues>\n            5.1236808300018311e-01 -5.0459731370210648e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 -1.0945170186460018e-02</internalNodes>\n          <leafValues>\n            -2.2292029857635498e-01 1.0548099875450134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 -2.8011079877614975e-02</internalNodes>\n          <leafValues>\n            7.0687793195247650e-02 -8.6478509008884430e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 -5.2256159484386444e-02</internalNodes>\n          <leafValues>\n            5.7856267690658569e-01 -8.7944902479648590e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 -5.9455442242324352e-03</internalNodes>\n          <leafValues>\n            -2.5641980767250061e-01 9.4584532082080841e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 2.5594399776309729e-03</internalNodes>\n          <leafValues>\n            -2.5718480348587036e-01 1.2882429361343384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -1.2099260091781616e-01</internalNodes>\n          <leafValues>\n            -1.2293220311403275e-01 2.5829430669546127e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 -4.4208219647407532e-01</internalNodes>\n          <leafValues>\n            -7.4546551704406738e-01 4.2586710304021835e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 -6.6842641681432724e-03</internalNodes>\n          <leafValues>\n            1.3515649735927582e-01 -1.6409300267696381e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 9.8270708695054054e-03</internalNodes>\n          <leafValues>\n            -8.0305352807044983e-02 2.9853299260139465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 5.8638598769903183e-02</internalNodes>\n          <leafValues>\n            2.7556419372558594e-02 -8.2242500782012939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 -3.0546959023922682e-03</internalNodes>\n          <leafValues>\n            -1.9292749464511871e-01 1.1082729697227478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 -7.3340102098882198e-03</internalNodes>\n          <leafValues>\n            -2.4307939410209656e-01 6.6744603216648102e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 -1.0526229627430439e-02</internalNodes>\n          <leafValues>\n            -3.1136021018028259e-01 6.2850847840309143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 827 1.0481160134077072e-01</internalNodes>\n          <leafValues>\n            1.2621720321476460e-02 -6.7376089096069336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 9.4269379042088985e-04</internalNodes>\n          <leafValues>\n            -1.7071670293807983e-01 1.0280650109052658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 8.4397383034229279e-03</internalNodes>\n          <leafValues>\n            -5.3014568984508514e-02 8.8599078357219696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 -3.0551670119166374e-02</internalNodes>\n          <leafValues>\n            3.5264891386032104e-01 -6.9148473441600800e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 -4.9112379550933838e-02</internalNodes>\n          <leafValues>\n            -5.8219379186630249e-01 1.4043220318853855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 5.8098030276596546e-03</internalNodes>\n          <leafValues>\n            7.0872433483600616e-02 -2.5362819433212280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 2.5541070848703384e-02</internalNodes>\n          <leafValues>\n            -4.5136939734220505e-02 4.0674450993537903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 -4.8711288720369339e-02</internalNodes>\n          <leafValues>\n            -7.0240157842636108e-01 2.4317869916558266e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 -3.2624390721321106e-01</internalNodes>\n          <leafValues>\n            -5.0619047880172729e-01 5.5445302277803421e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 -1.8120040476787835e-04</internalNodes>\n          <leafValues>\n            1.3132590055465698e-01 -1.2139549851417542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -1.2980769574642181e-01</internalNodes>\n          <leafValues>\n            -6.8208992481231689e-01 1.6414549201726913e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 838 8.3528067916631699e-03</internalNodes>\n          <leafValues>\n            3.0040390789508820e-02 -5.0909137725830078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 5.4547088220715523e-03</internalNodes>\n          <leafValues>\n            -8.2402072846889496e-02 1.8007980287075043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 -3.1699541211128235e-01</internalNodes>\n          <leafValues>\n            -8.6613011360168457e-01 1.8229139968752861e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 5.8424862800166011e-04</internalNodes>\n          <leafValues>\n            4.2409729212522507e-02 -1.3118089735507965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 -9.7046848386526108e-03</internalNodes>\n          <leafValues>\n            -2.7432689070701599e-01 5.5920429527759552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 1.6834320500493050e-02</internalNodes>\n          <leafValues>\n            -8.3306416869163513e-02 6.7792758345603943e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 -3.0685380101203918e-02</internalNodes>\n          <leafValues>\n            4.2126908898353577e-01 -4.5339331030845642e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 4.1394919157028198e-02</internalNodes>\n          <leafValues>\n            1.9971750676631927e-02 -1.9722190499305725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 3.4910149872303009e-02</internalNodes>\n          <leafValues>\n            -5.3826879709959030e-02 3.5040271282196045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 -5.2495039999485016e-03</internalNodes>\n          <leafValues>\n            -1.1363890022039413e-01 5.5080570280551910e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 1.2045619636774063e-01</internalNodes>\n          <leafValues>\n            1.7451599240303040e-02 -9.3958032131195068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 4.2130421847105026e-02</internalNodes>\n          <leafValues>\n            -1.4343280345201492e-02 6.0059851408004761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 1.9120849668979645e-02</internalNodes>\n          <leafValues>\n            8.5864506661891937e-02 -1.8586499989032745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 8.4470612928271294e-03</internalNodes>\n          <leafValues>\n            -6.9452181458473206e-02 7.3461420834064484e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 1.7696130089461803e-03</internalNodes>\n          <leafValues>\n            -7.9996660351753235e-02 1.9479809701442719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 5.7995948940515518e-02</internalNodes>\n          <leafValues>\n            2.7633000165224075e-02 -5.4097008705139160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 -7.9884022474288940e-02</internalNodes>\n          <leafValues>\n            -5.4307681322097778e-01 2.3219829425215721e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 6.6576242446899414e-02</internalNodes>\n          <leafValues>\n            6.8416809663176537e-03 -8.1224560737609863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 6.4169943332672119e-02</internalNodes>\n          <leafValues>\n            -2.4846689775586128e-02 6.0798132419586182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 -2.9404780268669128e-01</internalNodes>\n          <leafValues>\n            -1. 4.6440181322395802e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 -9.5727723091840744e-03</internalNodes>\n          <leafValues>\n            -1.4157359302043915e-01 1.0121650248765945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 -2.3574449121952057e-02</internalNodes>\n          <leafValues>\n            1.1715450137853622e-01 -1.3184690475463867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 -5.1256217993795872e-03</internalNodes>\n          <leafValues>\n            -1.7623250186443329e-01 1.0177359730005264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 9.7663059830665588e-02</internalNodes>\n          <leafValues>\n            4.4896239414811134e-03 -8.0415552854537964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 3.2088689506053925e-02</internalNodes>\n          <leafValues>\n            -5.8048430830240250e-02 3.0194890499114990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 -8.6517207324504852e-02</internalNodes>\n          <leafValues>\n            -7.5529891252517700e-01 2.8089359402656555e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 -2.8540970757603645e-02</internalNodes>\n          <leafValues>\n            -3.5085019469261169e-01 4.4081591069698334e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 -5.3844689391553402e-03</internalNodes>\n          <leafValues>\n            9.2348903417587280e-02 -7.0033848285675049e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 -2.2280439734458923e-02</internalNodes>\n          <leafValues>\n            2.4949419498443604e-01 -7.0658676326274872e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 5.1025422289967537e-03</internalNodes>\n          <leafValues>\n            6.0899689793586731e-02 -1.5473949909210205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 3.7133800797164440e-03</internalNodes>\n          <leafValues>\n            -8.7124302983283997e-02 1.7195260524749756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 -4.0405280888080597e-03</internalNodes>\n          <leafValues>\n            1.5054519474506378e-01 -9.9685050547122955e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 4.8944901674985886e-02</internalNodes>\n          <leafValues>\n            2.0637780427932739e-02 -7.1113997697830200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 -4.0832208469510078e-03</internalNodes>\n          <leafValues>\n            -1.6104909777641296e-01 8.8675007224082947e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 -2.2145630791783333e-03</internalNodes>\n          <leafValues>\n            -2.1901540458202362e-01 1.0045240074396133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 -6.4257450401782990e-02</internalNodes>\n          <leafValues>\n            -5.7694709300994873e-01 1.0253880172967911e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 1.1895420029759407e-02</internalNodes>\n          <leafValues>\n            -7.0560596883296967e-02 2.6147291064262390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 -4.4988259673118591e-02</internalNodes>\n          <leafValues>\n            -6.8440282344818115e-01 9.9674779921770096e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 6.3484339043498039e-03</internalNodes>\n          <leafValues>\n            8.4738656878471375e-02 -1.6299989819526672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 -5.6587439030408859e-02</internalNodes>\n          <leafValues>\n            4.8960050940513611e-01 -1.9641140475869179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 3.5853400826454163e-02</internalNodes>\n          <leafValues>\n            1.9695440307259560e-02 -6.8108338117599487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 -4.5450981706380844e-03</internalNodes>\n          <leafValues>\n            6.9072656333446503e-02 -9.1276638209819794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 1.0608570277690887e-01</internalNodes>\n          <leafValues>\n            -4.9993991851806641e-02 3.2139471173286438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 -4.5924410223960876e-02</internalNodes>\n          <leafValues>\n            -8.2744181156158447e-01 1.2149419635534286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 -1.2273239903151989e-02</internalNodes>\n          <leafValues>\n            -3.0669289827346802e-01 5.1693398505449295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 8.0667391419410706e-02</internalNodes>\n          <leafValues>\n            2.1730009466409683e-03 -1.0002529621124268e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 -2.3044859990477562e-02</internalNodes>\n          <leafValues>\n            4.5085349678993225e-01 -3.6273978650569916e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 1.8702909350395203e-02</internalNodes>\n          <leafValues>\n            4.6945460140705109e-02 -2.1796269714832306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 -9.6820026636123657e-02</internalNodes>\n          <leafValues>\n            4.0398910641670227e-01 -3.7819091230630875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 6.0525789856910706e-02</internalNodes>\n          <leafValues>\n            1.5727160498499870e-02 -4.5661678910255432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 1.0418569669127464e-02</internalNodes>\n          <leafValues>\n            6.2726646661758423e-02 -2.4441179633140564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 1.0726209729909897e-02</internalNodes>\n          <leafValues>\n            -7.1968853473663330e-02 2.2099970281124115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 -2.7160700410604477e-03</internalNodes>\n          <leafValues>\n            1.2882749736309052e-01 -1.4629630744457245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 8.5867568850517273e-03</internalNodes>\n          <leafValues>\n            -6.8645663559436798e-02 2.5840589404106140e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>103</maxWeakCount>\n      <stageThreshold>-7.6886308193206787e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 892 -2.5851670652627945e-02</internalNodes>\n          <leafValues>\n            1.8011799454689026e-01 -2.4745930731296539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 1.4054620265960693e-01</internalNodes>\n          <leafValues>\n            -5.1319289952516556e-02 4.0766909718513489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 -2.7255079150199890e-01</internalNodes>\n          <leafValues>\n            4.9941259622573853e-01 -4.5033931732177734e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 1.3978329952806234e-03</internalNodes>\n          <leafValues>\n            5.3600508719682693e-02 -2.1793389320373535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 -3.5059880465269089e-02</internalNodes>\n          <leafValues>\n            -2.9943290352821350e-01 8.9991323649883270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 -3.2894399482756853e-03</internalNodes>\n          <leafValues>\n            1.0264199972152710e-01 -9.4711251556873322e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 1.8242290616035461e-01</internalNodes>\n          <leafValues>\n            2.5626670569181442e-02 -6.8765729665756226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 -7.8741081058979034e-02</internalNodes>\n          <leafValues>\n            1.0810419917106628e-01 -1.4497520029544830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 1.3945129700005054e-02</internalNodes>\n          <leafValues>\n            -7.1371912956237793e-02 3.1315749883651733e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 4.4680278748273849e-02</internalNodes>\n          <leafValues>\n            -3.0446149408817291e-02 3.9263629913330078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 -2.6441770605742931e-03</internalNodes>\n          <leafValues>\n            1.1596699804067612e-01 -1.7800450325012207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 -5.1071979105472565e-03</internalNodes>\n          <leafValues>\n            -1.1739940196275711e-01 6.7823447287082672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 -3.2582178711891174e-02</internalNodes>\n          <leafValues>\n            -5.9129017591476440e-01 3.3352021127939224e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 -2.7755839750170708e-02</internalNodes>\n          <leafValues>\n            -7.0649361610412598e-01 1.6761489212512970e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 -6.0038521041860804e-05</internalNodes>\n          <leafValues>\n            7.3832668364048004e-02 -2.2933359444141388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 3.0506180599331856e-02</internalNodes>\n          <leafValues>\n            -3.8056060671806335e-02 4.4115358591079712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 -6.2056961469352245e-03</internalNodes>\n          <leafValues>\n            -1.7757239937782288e-01 9.3707472085952759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 -8.0766230821609497e-03</internalNodes>\n          <leafValues>\n            -2.0256699621677399e-01 7.4059642851352692e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 -3.3209908753633499e-02</internalNodes>\n          <leafValues>\n            4.6372228860855103e-01 -3.4903008490800858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 3.5530608147382736e-02</internalNodes>\n          <leafValues>\n            -3.1679518520832062e-02 4.5202499628067017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 1.6297640278935432e-02</internalNodes>\n          <leafValues>\n            4.4189039617776871e-02 -3.4845370054244995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 9.9985357373952866e-03</internalNodes>\n          <leafValues>\n            -4.8255320638418198e-02 1.6078050434589386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 -5.2390778437256813e-03</internalNodes>\n          <leafValues>\n            2.3236599564552307e-01 -7.6032742857933044e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 915 -3.2508899457752705e-03</internalNodes>\n          <leafValues>\n            5.4369390010833740e-02 -9.1040253639221191e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 5.5640790611505508e-02</internalNodes>\n          <leafValues>\n            -3.8811128586530685e-02 4.2034021019935608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 3.3998981118202209e-02</internalNodes>\n          <leafValues>\n            2.2251330316066742e-02 -3.5615360736846924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 -4.3103890493512154e-03</internalNodes>\n          <leafValues>\n            1.1287429928779602e-01 -1.7630730569362640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 -7.9246461391448975e-03</internalNodes>\n          <leafValues>\n            -1.0992339998483658e-01 3.5099629312753677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 4.4273380190134048e-02</internalNodes>\n          <leafValues>\n            2.8094569221138954e-02 -6.0921418666839600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 5.9907328337430954e-02</internalNodes>\n          <leafValues>\n            9.7544339951127768e-04 -9.0523207187652588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 3.3378869295120239e-02</internalNodes>\n          <leafValues>\n            1.7723279073834419e-02 -8.5254609584808350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 1.4694170095026493e-02</internalNodes>\n          <leafValues>\n            -4.9031510949134827e-02 2.7998331189155579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 -5.3877499885857105e-03</internalNodes>\n          <leafValues>\n            1.8219049274921417e-01 -8.2382522523403168e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -1.7976889386773109e-02</internalNodes>\n          <leafValues>\n            -1.9384689629077911e-01 8.4984757006168365e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 -4.4651641510426998e-03</internalNodes>\n          <leafValues>\n            1.7632910609245300e-01 -9.5075771212577820e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 6.9372296333312988e-02</internalNodes>\n          <leafValues>\n            3.1770321074873209e-03 -6.7554402351379395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 -1.7002269625663757e-02</internalNodes>\n          <leafValues>\n            -3.3827948570251465e-01 4.4731728732585907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 1.7274240031838417e-02</internalNodes>\n          <leafValues>\n            -2.4769710376858711e-02 1.1852029711008072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 4.0388729423284531e-02</internalNodes>\n          <leafValues>\n            -3.2967679202556610e-02 4.7323140501976013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 1.4215400442481041e-02</internalNodes>\n          <leafValues>\n            2.9846860095858574e-02 -4.4157060980796814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 4.1627719998359680e-02</internalNodes>\n          <leafValues>\n            -4.5953918248414993e-02 3.2978388667106628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 -1.7416840419173241e-03</internalNodes>\n          <leafValues>\n            8.7286308407783508e-02 -8.8862203061580658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 -9.8077040165662766e-03</internalNodes>\n          <leafValues>\n            -2.1026679873466492e-01 7.7401876449584961e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 2.1836649626493454e-02</internalNodes>\n          <leafValues>\n            4.3211769312620163e-02 -1.5330420434474945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 -7.0743098855018616e-02</internalNodes>\n          <leafValues>\n            3.3019039034843445e-01 -5.2747949957847595e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 -1.1181020177900791e-02</internalNodes>\n          <leafValues>\n            -1.1493939906358719e-01 2.7858460322022438e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 -1.4623560011386871e-02</internalNodes>\n          <leafValues>\n            3.2327070832252502e-01 -4.4166058301925659e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 -9.6702557057142258e-03</internalNodes>\n          <leafValues>\n            -1.8157319724559784e-01 3.6154530942440033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 8.3439601585268974e-03</internalNodes>\n          <leafValues>\n            -5.2473910152912140e-02 2.7444839477539062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 2.2970559075474739e-02</internalNodes>\n          <leafValues>\n            3.4930050373077393e-02 -1.5773670375347137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 -8.2734245806932449e-03</internalNodes>\n          <leafValues>\n            1.1612790077924728e-01 -1.1965770274400711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 8.7074404582381248e-03</internalNodes>\n          <leafValues>\n            -4.0829788893461227e-02 1.0481330007314682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 -1.8825819715857506e-02</internalNodes>\n          <leafValues>\n            -3.8794550299644470e-01 4.7350700944662094e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 -7.2092940099537373e-03</internalNodes>\n          <leafValues>\n            -1.9886960089206696e-01 7.5952850282192230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 1.6543369565624744e-04</internalNodes>\n          <leafValues>\n            -1.0674829781055450e-01 1.5510599315166473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 8.9294537901878357e-03</internalNodes>\n          <leafValues>\n            -6.7059643566608429e-02 9.0206786990165710e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 3.1991640571504831e-03</internalNodes>\n          <leafValues>\n            7.4445746839046478e-02 -1.9682839512825012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 -1.1280879698460922e-04</internalNodes>\n          <leafValues>\n            7.9703390598297119e-02 -1.3661189377307892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 -6.9613799452781677e-02</internalNodes>\n          <leafValues>\n            -2.1010529994964600e-01 6.5771616995334625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 -2.6066679507493973e-02</internalNodes>\n          <leafValues>\n            2.8696510195732117e-01 -5.7495791465044022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 1.2050740420818329e-02</internalNodes>\n          <leafValues>\n            -4.6820510178804398e-02 2.7994769811630249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 -3.9625849574804306e-02</internalNodes>\n          <leafValues>\n            -3.7054508924484253e-01 1.1476139537990093e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 -2.7379901148378849e-03</internalNodes>\n          <leafValues>\n            9.4371132552623749e-02 -1.6203230619430542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 -6.5262563526630402e-02</internalNodes>\n          <leafValues>\n            -6.7808389663696289e-01 1.9430469721555710e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 2.3191619664430618e-02</internalNodes>\n          <leafValues>\n            2.6134310290217400e-02 -4.6664249897003174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 4.7741930931806564e-02</internalNodes>\n          <leafValues>\n            -2.5291189551353455e-02 2.9092490673065186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 -1.2830020487308502e-01</internalNodes>\n          <leafValues>\n            -8.7187117338180542e-01 1.3883540406823158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 -4.2689260095357895e-02</internalNodes>\n          <leafValues>\n            -6.7644822597503662e-01 6.8771280348300934e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 6.2811248935759068e-03</internalNodes>\n          <leafValues>\n            -6.4803749322891235e-02 2.0994420349597931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 2.7532080188393593e-02</internalNodes>\n          <leafValues>\n            1.5366540290415287e-02 -2.1457369625568390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 -3.4494648571126163e-04</internalNodes>\n          <leafValues>\n            1.1829499900341034e-01 -1.0641119629144669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 -3.2187011092901230e-02</internalNodes>\n          <leafValues>\n            2.0676319301128387e-01 -2.7804749086499214e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 -2.4451729841530323e-03</internalNodes>\n          <leafValues>\n            -1.8970219790935516e-01 7.6612837612628937e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 3.9631120860576630e-02</internalNodes>\n          <leafValues>\n            1.1457280255854130e-02 -4.4112280011177063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 -9.0082110837101936e-03</internalNodes>\n          <leafValues>\n            -2.0329099893569946e-01 7.1997888386249542e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 -6.0594908893108368e-02</internalNodes>\n          <leafValues>\n            2.5831830501556396e-01 -3.2274000346660614e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 3.3678639680147171e-02</internalNodes>\n          <leafValues>\n            3.6565639078617096e-02 -3.3233150839805603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 1.4565410092473030e-02</internalNodes>\n          <leafValues>\n            -4.9269210547208786e-02 1.8280670046806335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 4.0103439241647720e-03</internalNodes>\n          <leafValues>\n            -1.2435600161552429e-01 1.1247640103101730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 1.7989509506151080e-03</internalNodes>\n          <leafValues>\n            -5.4675988852977753e-02 1.0701840370893478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 -1.6359580331481993e-04</internalNodes>\n          <leafValues>\n            8.1755228340625763e-02 -1.6235500574111938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 973 -3.1993899494409561e-02</internalNodes>\n          <leafValues>\n            1.8631230294704437e-01 -1.7350630834698677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 -8.1737667322158813e-02</internalNodes>\n          <leafValues>\n            -7.5961482524871826e-01 1.4419900253415108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 -8.8262550532817841e-02</internalNodes>\n          <leafValues>\n            -1. 5.3146481513977051e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 -5.7997900992631912e-02</internalNodes>\n          <leafValues>\n            -8.9391511678695679e-01 1.2495099566876888e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 977 2.0691409707069397e-02</internalNodes>\n          <leafValues>\n            -3.7167508155107498e-02 9.7208552062511444e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 -6.0336058959364891e-03</internalNodes>\n          <leafValues>\n            1.7547790706157684e-01 -8.6916856467723846e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 1.5789760649204254e-01</internalNodes>\n          <leafValues>\n            3.0604960396885872e-02 -2.2199299931526184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 3.3271119464188814e-03</internalNodes>\n          <leafValues>\n            1.1201520264148712e-01 -1.6384710371494293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 1.1383239924907684e-01</internalNodes>\n          <leafValues>\n            1.8078039865940809e-03 -9.9981439113616943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 3.9188969880342484e-02</internalNodes>\n          <leafValues>\n            -3.9494428783655167e-02 3.4139481186866760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 -4.7382968477904797e-03</internalNodes>\n          <leafValues>\n            -8.1601403653621674e-02 3.5498451441526413e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 2.3458160459995270e-02</internalNodes>\n          <leafValues>\n            -4.0767479687929153e-02 3.4792768955230713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 1.6505220904946327e-02</internalNodes>\n          <leafValues>\n            2.0170280709862709e-02 -1.5532009303569794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 2.0262949168682098e-02</internalNodes>\n          <leafValues>\n            2.1292379125952721e-02 -6.2611502408981323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 -9.1393236070871353e-03</internalNodes>\n          <leafValues>\n            -1.3637480139732361e-01 6.3891842961311340e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 -5.6207980960607529e-02</internalNodes>\n          <leafValues>\n            4.0671119093894958e-01 -3.3258218318223953e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 6.6868839785456657e-03</internalNodes>\n          <leafValues>\n            6.4174309372901917e-02 -9.3966238200664520e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 990 5.8862278237938881e-03</internalNodes>\n          <leafValues>\n            -6.5789960324764252e-02 2.0181339979171753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 991 -1.1517380177974701e-01</internalNodes>\n          <leafValues>\n            -1. 2.5347759947180748e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 992 5.5793710052967072e-03</internalNodes>\n          <leafValues>\n            7.0642203092575073e-02 -1.9637429714202881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 993 3.2180000096559525e-02</internalNodes>\n          <leafValues>\n            -1.4737719669938087e-02 2.2420160472393036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 994 -9.1598782455548644e-04</internalNodes>\n          <leafValues>\n            1.1478749662637711e-01 -1.1767079681158066e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>83</maxWeakCount>\n      <stageThreshold>-7.7573090791702271e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 995 9.1346232220530510e-03</internalNodes>\n          <leafValues>\n            8.8698662817478180e-02 -3.8595649600028992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 996 -2.4696369655430317e-03</internalNodes>\n          <leafValues>\n            1.6772060096263885e-01 -1.4649170637130737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 997 5.8935020118951797e-02</internalNodes>\n          <leafValues>\n            -1.3394000008702278e-02 6.1832672357559204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 998 -8.9100059121847153e-03</internalNodes>\n          <leafValues>\n            -2.6950231194496155e-01 7.2939813137054443e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 999 1.7743879929184914e-02</internalNodes>\n          <leafValues>\n            -5.0217188894748688e-02 4.3166020512580872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1000 1.1056650429964066e-02</internalNodes>\n          <leafValues>\n            3.9155859500169754e-02 -5.2860772609710693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1001 1.6161320731043816e-02</internalNodes>\n          <leafValues>\n            6.9581039249897003e-02 -3.7610140442848206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1002 -2.7879089117050171e-02</internalNodes>\n          <leafValues>\n            2.3220659792423248e-01 -5.5979579687118530e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1003 -1.1556839570403099e-02</internalNodes>\n          <leafValues>\n            -3.1231081485748291e-01 7.4339963495731354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1004 -6.9651477038860321e-02</internalNodes>\n          <leafValues>\n            -4.1905689239501953e-01 6.9694789126515388e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1005 -5.0344727933406830e-03</internalNodes>\n          <leafValues>\n            1.3183620572090149e-01 -1.9702030718326569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1006 -8.6098119616508484e-02</internalNodes>\n          <leafValues>\n            6.5727752447128296e-01 -9.5664570108056068e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1007 2.5546319782733917e-02</internalNodes>\n          <leafValues>\n            -4.0136341005563736e-02 5.4847037792205811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1008 -2.6870880275964737e-02</internalNodes>\n          <leafValues>\n            -2.5306650996208191e-01 4.4181719422340393e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1009 9.5859682187438011e-03</internalNodes>\n          <leafValues>\n            -8.1882461905479431e-02 2.6894670724868774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1010 2.6683809235692024e-02</internalNodes>\n          <leafValues>\n            2.6593349874019623e-02 -4.4127041101455688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1011 -1.4490840025246143e-02</internalNodes>\n          <leafValues>\n            -3.5697469115257263e-01 7.0072941482067108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1012 -2.2448399104177952e-03</internalNodes>\n          <leafValues>\n            2.0088230073451996e-01 -1.2228170037269592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1013 4.8795710317790508e-03</internalNodes>\n          <leafValues>\n            4.5820981264114380e-02 -3.9498189091682434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1014 -6.1262990348041058e-03</internalNodes>\n          <leafValues>\n            -1.8826089799404144e-01 7.8812077641487122e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1015 1.6952969133853912e-02</internalNodes>\n          <leafValues>\n            -6.1684221029281616e-02 3.3603700995445251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1016 -4.5547191984951496e-03</internalNodes>\n          <leafValues>\n            -1.9471390545368195e-01 5.3147189319133759e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1017 -1.2753040064126253e-03</internalNodes>\n          <leafValues>\n            1.4800879359245300e-01 -1.4244349300861359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1018 2.2060280665755272e-02</internalNodes>\n          <leafValues>\n            -3.5406738519668579e-02 3.3775308728218079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1019 2.1050389856100082e-02</internalNodes>\n          <leafValues>\n            4.2289130389690399e-02 -4.5886451005935669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1020 9.5637209713459015e-02</internalNodes>\n          <leafValues>\n            -1.3171649537980556e-02 5.5534982681274414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1021 -3.6728319246321917e-03</internalNodes>\n          <leafValues>\n            -1.8842899799346924e-01 9.5458142459392548e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1022 1.6345079347956926e-04</internalNodes>\n          <leafValues>\n            -6.0444809496402740e-02 1.0536730289459229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1023 2.5338289141654968e-01</internalNodes>\n          <leafValues>\n            1.6026260331273079e-02 -9.9994468688964844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1024 -4.6113330870866776e-02</internalNodes>\n          <leafValues>\n            5.4247987270355225e-01 -2.7890209108591080e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1025 5.2588270045816898e-03</internalNodes>\n          <leafValues>\n            7.9867303371429443e-02 -2.0700709521770477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1026 -1.3449570536613464e-01</internalNodes>\n          <leafValues>\n            -4.1270101070404053e-01 8.1500215455889702e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1027 1.6953679732978344e-03</internalNodes>\n          <leafValues>\n            1.1035349965095520e-01 -1.6802120208740234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1028 3.9492141455411911e-02</internalNodes>\n          <leafValues>\n            -1.3410010375082493e-02 3.8447639346122742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1029 -9.3634781660512090e-04</internalNodes>\n          <leafValues>\n            1.0986819863319397e-01 -1.7310489714145660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1030 -4.4495709240436554e-02</internalNodes>\n          <leafValues>\n            1.9471199810504913e-01 -4.0768899023532867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1031 6.0630109161138535e-02</internalNodes>\n          <leafValues>\n            -4.2252369225025177e-02 5.1412987709045410e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1032 7.5067640282213688e-03</internalNodes>\n          <leafValues>\n            4.2086970061063766e-02 -1.6080400347709656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1033 9.9260415881872177e-03</internalNodes>\n          <leafValues>\n            6.4119532704353333e-02 -2.6215308904647827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1034 6.0528520494699478e-02</internalNodes>\n          <leafValues>\n            2.4189969524741173e-02 -3.6608389019966125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1035 -6.8054231815040112e-03</internalNodes>\n          <leafValues>\n            1.2508389353752136e-01 -1.3889710605144501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1036 -2.0940289832651615e-03</internalNodes>\n          <leafValues>\n            1.3996599614620209e-01 -8.2706399261951447e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1037 -9.6904346719384193e-03</internalNodes>\n          <leafValues>\n            2.6681360602378845e-01 -7.1576990187168121e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1038 1.8320349976420403e-02</internalNodes>\n          <leafValues>\n            3.1321980059146881e-02 -2.3460610210895538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1039 5.0429959082975984e-04</internalNodes>\n          <leafValues>\n            -1.1669719964265823e-01 1.6514649987220764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1040 -4.7016288153827190e-03</internalNodes>\n          <leafValues>\n            -1.2006150186061859e-01 5.9200428426265717e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1041 -1.9926870241761208e-02</internalNodes>\n          <leafValues>\n            -3.9485099911689758e-01 4.1143018752336502e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1042 7.4013080447912216e-03</internalNodes>\n          <leafValues>\n            -7.6331257820129395e-02 2.1065360307693481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1043 1.4879629947245121e-02</internalNodes>\n          <leafValues>\n            4.7979071736335754e-02 -3.4014761447906494e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1044 1.5527559816837311e-01</internalNodes>\n          <leafValues>\n            3.2225880771875381e-02 -4.6938079595565796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1045 -7.0786331780254841e-03</internalNodes>\n          <leafValues>\n            1.2199480086565018e-01 -1.2004940211772919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1046 2.9872169718146324e-02</internalNodes>\n          <leafValues>\n            -4.3677508831024170e-02 2.3529820144176483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1047 3.0555170029401779e-02</internalNodes>\n          <leafValues>\n            3.1775880604982376e-02 -5.7825452089309692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1048 1.0284570045769215e-02</internalNodes>\n          <leafValues>\n            4.7202810645103455e-02 -2.9566499590873718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1049 1.9808709621429443e-02</internalNodes>\n          <leafValues>\n            -4.5775938779115677e-02 3.3231019973754883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1050 2.7218880131840706e-02</internalNodes>\n          <leafValues>\n            2.5577219203114510e-02 -3.3180880546569824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1051 1.4097680337727070e-02</internalNodes>\n          <leafValues>\n            5.2157420665025711e-02 -2.9358381032943726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1052 2.4286569654941559e-01</internalNodes>\n          <leafValues>\n            1.4692460186779499e-02 -6.9854879379272461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1053 1.2419570237398148e-02</internalNodes>\n          <leafValues>\n            -4.7105878591537476e-02 3.6695051193237305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1054 1.3503880472853780e-03</internalNodes>\n          <leafValues>\n            5.3791359066963196e-02 -2.0953659713268280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1055 -1.5626290813088417e-02</internalNodes>\n          <leafValues>\n            2.7888458967208862e-01 -6.0053750872612000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1056 1.5850139781832695e-02</internalNodes>\n          <leafValues>\n            -3.0324909836053848e-02 1.0287520289421082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1057 -4.0868919342756271e-02</internalNodes>\n          <leafValues>\n            -8.0402207374572754e-01 1.7601499333977699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1058 6.4108639955520630e-02</internalNodes>\n          <leafValues>\n            2.5845379568636417e-03 -5.3854942321777344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1059 4.9927100539207458e-02</internalNodes>\n          <leafValues>\n            2.1863300353288651e-02 -6.1780720949172974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1060 1.4655419625341892e-02</internalNodes>\n          <leafValues>\n            1.9663369283080101e-02 -2.0426170527935028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1061 -2.4094810709357262e-02</internalNodes>\n          <leafValues>\n            3.7609130144119263e-01 -4.0954101830720901e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1062 2.9417769983410835e-02</internalNodes>\n          <leafValues>\n            -8.6903842166066170e-03 4.0447419881820679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1063 -1.4158640056848526e-02</internalNodes>\n          <leafValues>\n            3.7811711430549622e-01 -4.0321640670299530e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1064 -4.6754989773035049e-02</internalNodes>\n          <leafValues>\n            2.2104309499263763e-01 -2.8996109962463379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1065 -1.1437949724495411e-02</internalNodes>\n          <leafValues>\n            -2.5033089518547058e-01 5.8214288204908371e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1066 -4.2598780244588852e-02</internalNodes>\n          <leafValues>\n            3.7562200427055359e-01 -1.6349090263247490e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1067 -1.5201159752905369e-02</internalNodes>\n          <leafValues>\n            -3.5637819766998291e-01 3.8690369576215744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1068 4.3378848582506180e-02</internalNodes>\n          <leafValues>\n            3.3045639283955097e-03 -4.6729469299316406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1069 5.5153011344373226e-03</internalNodes>\n          <leafValues>\n            -8.3583608269691467e-02 1.8793170154094696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1070 -7.8126927837729454e-03</internalNodes>\n          <leafValues>\n            -1.6586859524250031e-01 4.3801128864288330e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1071 4.1652601212263107e-02</internalNodes>\n          <leafValues>\n            -3.1804520636796951e-02 4.3517521023750305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1072 3.4417589195072651e-03</internalNodes>\n          <leafValues>\n            4.2282279580831528e-02 -1.3088959455490112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1073 1.3004569336771965e-04</internalNodes>\n          <leafValues>\n            -1.1260010302066803e-01 1.3964599370956421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1074 -7.7347733080387115e-02</internalNodes>\n          <leafValues>\n            7.0750647783279419e-01 -5.4134069941937923e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1075 -1.6143550164997578e-03</internalNodes>\n          <leafValues>\n            1.1920420080423355e-01 -1.1884269863367081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1076 -9.8279246594756842e-04</internalNodes>\n          <leafValues>\n            6.3156276941299438e-02 -5.2781101316213608e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1077 -4.5667469501495361e-02</internalNodes>\n          <leafValues>\n            -3.4500870108604431e-01 4.4600728899240494e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>101</maxWeakCount>\n      <stageThreshold>-6.9763368368148804e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1078 7.3315978050231934e-02</internalNodes>\n          <leafValues>\n            -1.1410109698772430e-01 4.0035811066627502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1079 2.5275669991970062e-02</internalNodes>\n          <leafValues>\n            -7.2013877332210541e-02 3.6095780134201050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1080 1.8873859196901321e-02</internalNodes>\n          <leafValues>\n            -1.7234370112419128e-01 1.8223220109939575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1081 7.4607720307540148e-05</internalNodes>\n          <leafValues>\n            -8.1627286970615387e-02 8.8888503611087799e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1082 4.2250280966982245e-04</internalNodes>\n          <leafValues>\n            -1.2840239703655243e-01 1.1791419982910156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1083 1.4402460306882858e-02</internalNodes>\n          <leafValues>\n            2.0960340276360512e-02 1.9024699926376343e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1084 -2.0460959058254957e-03</internalNodes>\n          <leafValues>\n            9.5712497830390930e-02 -2.1517060697078705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1085 7.1128448471426964e-03</internalNodes>\n          <leafValues>\n            -5.6100480258464813e-02 2.0984320342540741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1086 -6.5832170657813549e-03</internalNodes>\n          <leafValues>\n            -2.1138189733028412e-01 7.6094150543212891e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1087 -4.1252959636040032e-04</internalNodes>\n          <leafValues>\n            1.3107340037822723e-01 -1.5670859813690186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1088 -4.4330831617116928e-02</internalNodes>\n          <leafValues>\n            5.4048037528991699e-01 -1.9059479236602783e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1089 1.1700130067765713e-02</internalNodes>\n          <leafValues>\n            5.1712401211261749e-02 -1.7216169834136963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1090 3.5091140307486057e-03</internalNodes>\n          <leafValues>\n            -7.6767951250076294e-02 1.7776259779930115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1091 1.5597569756209850e-02</internalNodes>\n          <leafValues>\n            3.8307890295982361e-02 -1.4730019867420197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1092 -3.6285370588302612e-02</internalNodes>\n          <leafValues>\n            3.5347661375999451e-01 -4.5018490403890610e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1093 -4.5118298381567001e-02</internalNodes>\n          <leafValues>\n            -5.7074141502380371e-01 1.0646710172295570e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1094 1.3734580017626286e-02</internalNodes>\n          <leafValues>\n            6.6018357872962952e-02 -2.0480890572071075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1095 -2.7120979502797127e-02</internalNodes>\n          <leafValues>\n            4.8094209283590317e-02 -5.1394961774349213e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1096 -1.5354059869423509e-03</internalNodes>\n          <leafValues>\n            -2.3548009991645813e-01 5.3074609488248825e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1097 3.6000818945467472e-03</internalNodes>\n          <leafValues>\n            -5.8944340795278549e-02 1.1825410276651382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1098 6.8916529417037964e-03</internalNodes>\n          <leafValues>\n            -5.0014488399028778e-02 2.6909399032592773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1099 3.5373449791222811e-03</internalNodes>\n          <leafValues>\n            -1.2947039306163788e-01 8.8697038590908051e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1100 -4.1431561112403870e-03</internalNodes>\n          <leafValues>\n            -1.7883630096912384e-01 6.9098107516765594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1101 -1.0762579739093781e-01</internalNodes>\n          <leafValues>\n            -1. 4.7263409942388535e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1102 9.7946207970380783e-03</internalNodes>\n          <leafValues>\n            -5.4038770496845245e-02 2.4115470051765442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1103 1.0054280050098896e-02</internalNodes>\n          <leafValues>\n            -8.0624893307685852e-02 1.1627560108900070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1104 -8.7350717512890697e-04</internalNodes>\n          <leafValues>\n            -1.8193979561328888e-01 7.7468506991863251e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1105 9.4283261569216847e-04</internalNodes>\n          <leafValues>\n            4.6265050768852234e-02 -2.2732029855251312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1106 3.5424059024080634e-04</internalNodes>\n          <leafValues>\n            -1.1824289709329605e-01 1.1095699667930603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1107 -3.8587789982557297e-02</internalNodes>\n          <leafValues>\n            -3.0286869406700134e-01 3.1856179703027010e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1108 -4.9504679627716541e-03</internalNodes>\n          <leafValues>\n            1.3758100569248199e-01 -9.1690346598625183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1109 -2.5453630834817886e-02</internalNodes>\n          <leafValues>\n            -2.3013520240783691e-01 1.9747929647564888e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1110 1.5836700797080994e-02</internalNodes>\n          <leafValues>\n            -4.5252159237861633e-02 2.9337081313133240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1111 1.0379879735410213e-02</internalNodes>\n          <leafValues>\n            5.9706691652536392e-02 -1.6415530443191528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1112 4.3178450316190720e-02</internalNodes>\n          <leafValues>\n            6.3460536301136017e-02 -2.1360489726066589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1113 -2.2508678957819939e-03</internalNodes>\n          <leafValues>\n            1.0645110160112381e-01 -5.9539180248975754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1114 5.0743711180984974e-03</internalNodes>\n          <leafValues>\n            -9.4377033412456512e-02 2.2999720275402069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1115 -3.0670650303363800e-02</internalNodes>\n          <leafValues>\n            2.5975760817527771e-01 -2.3188209161162376e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1116 2.4162670597434044e-03</internalNodes>\n          <leafValues>\n            8.7919056415557861e-02 -1.9287380576133728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1117 -9.3405842781066895e-03</internalNodes>\n          <leafValues>\n            -1.0935559868812561e-01 2.9358500614762306e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1118 2.0513730123639107e-02</internalNodes>\n          <leafValues>\n            -5.2511349320411682e-02 3.0545449256896973e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1119 -4.3630380183458328e-02</internalNodes>\n          <leafValues>\n            -4.5310449600219727e-01 1.8261570483446121e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1120 3.4857920836657286e-03</internalNodes>\n          <leafValues>\n            -9.7093120217323303e-02 1.4877100288867950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1121 1.0411609895527363e-02</internalNodes>\n          <leafValues>\n            4.2915731668472290e-02 -2.4849639832973480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1122 -7.5155291706323624e-03</internalNodes>\n          <leafValues>\n            -2.6623341441154480e-01 5.1602318882942200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1123 7.2157550603151321e-03</internalNodes>\n          <leafValues>\n            -6.1878159642219543e-02 1.8314969539642334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1124 9.1090862406417727e-04</internalNodes>\n          <leafValues>\n            -9.7420282661914825e-02 1.2223699688911438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1125 -4.0069910883903503e-01</internalNodes>\n          <leafValues>\n            -8.1831091642379761e-01 4.7453590668737888e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1126 -4.8033627681434155e-03</internalNodes>\n          <leafValues>\n            9.4193987548351288e-02 -1.4436510205268860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1127 -2.1147429943084717e-02</internalNodes>\n          <leafValues>\n            2.9532408714294434e-01 -4.4751271605491638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1128 1.8602259457111359e-02</internalNodes>\n          <leafValues>\n            -4.2993780225515366e-02 2.9706719517707825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1129 -8.1051718443632126e-03</internalNodes>\n          <leafValues>\n            1.2369229644536972e-01 -1.3246449828147888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1130 -8.3215925842523575e-03</internalNodes>\n          <leafValues>\n            -1.9022589921951294e-01 8.9151017367839813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1131 3.1376329716295004e-03</internalNodes>\n          <leafValues>\n            4.1584819555282593e-02 -7.9552896320819855e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1132 1.6556069254875183e-02</internalNodes>\n          <leafValues>\n            4.4908858835697174e-02 -3.6947301030158997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1133 2.9919730499386787e-02</internalNodes>\n          <leafValues>\n            -3.7720259279012680e-02 2.4280619621276855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1134 -5.1988288760185242e-02</internalNodes>\n          <leafValues>\n            -6.9372260570526123e-01 1.8926780670881271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1135 7.5528107583522797e-02</internalNodes>\n          <leafValues>\n            -1.2611350044608116e-02 2.5732690095901489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1136 -2.5031189434230328e-03</internalNodes>\n          <leafValues>\n            1.3807280361652374e-01 -9.1662466526031494e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1137 -5.9646938461810350e-04</internalNodes>\n          <leafValues>\n            -6.3654616475105286e-02 2.5937270373106003e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1138 1.0319340042769909e-02</internalNodes>\n          <leafValues>\n            8.3791837096214294e-02 -1.7408309876918793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1139 9.3816686421632767e-03</internalNodes>\n          <leafValues>\n            2.7871530503034592e-02 -1.1141580343246460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1140 1.0023410432040691e-02</internalNodes>\n          <leafValues>\n            -6.9966249167919159e-02 2.1900640428066254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1141 -8.3700200775638223e-04</internalNodes>\n          <leafValues>\n            1.0097689926624298e-01 -1.4261360466480255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1142 2.2468710318207741e-02</internalNodes>\n          <leafValues>\n            9.4028212130069733e-02 -1.3807420432567596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1143 3.9115209132432938e-02</internalNodes>\n          <leafValues>\n            -5.3969398140907288e-03 6.5187507867813110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1144 -1.5670569846406579e-03</internalNodes>\n          <leafValues>\n            7.0886030793190002e-02 -2.0010609924793243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1145 6.0749892145395279e-03</internalNodes>\n          <leafValues>\n            3.5395938903093338e-02 -4.3918590992689133e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1146 -4.3166890740394592e-02</internalNodes>\n          <leafValues>\n            5.9881848096847534e-01 -2.3480180650949478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1147 2.3302088957279921e-03</internalNodes>\n          <leafValues>\n            -7.2818689048290253e-02 4.3940208852291107e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1148 5.5236589163541794e-02</internalNodes>\n          <leafValues>\n            -3.5117920488119125e-02 3.6355149745941162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1149 2.7774399146437645e-02</internalNodes>\n          <leafValues>\n            3.0074290931224823e-02 -1.0026770085096359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1150 8.4784086793661118e-03</internalNodes>\n          <leafValues>\n            -5.6243300437927246e-02 2.1711349487304688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1151 1.3269360177218914e-02</internalNodes>\n          <leafValues>\n            4.3138369917869568e-02 -1.6429780423641205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1152 -3.4072279930114746e-02</internalNodes>\n          <leafValues>\n            3.9418798685073853e-01 -3.2914638519287109e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1153 -5.9365970082581043e-03</internalNodes>\n          <leafValues>\n            6.4854122698307037e-02 -8.6971588432788849e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1154 -5.1997308619320393e-03</internalNodes>\n          <leafValues>\n            -2.1710740029811859e-01 6.5441012382507324e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1155 3.0441130511462688e-03</internalNodes>\n          <leafValues>\n            -4.7171641141176224e-02 9.4662867486476898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1156 -2.2375459957402200e-04</internalNodes>\n          <leafValues>\n            1.1739899963140488e-01 -1.0451590269804001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1157 4.9494139850139618e-02</internalNodes>\n          <leafValues>\n            9.9552040919661522e-03 -8.8205021619796753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1158 7.7127031981945038e-02</internalNodes>\n          <leafValues>\n            -3.6638759076595306e-02 3.7156999111175537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1159 -3.7054829299449921e-03</internalNodes>\n          <leafValues>\n            4.6213079243898392e-02 -7.9498499631881714e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1160 1.3655430078506470e-01</internalNodes>\n          <leafValues>\n            2.0802579820156097e-02 -6.4692282676696777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1161 -1.6919399797916412e-01</internalNodes>\n          <leafValues>\n            -9.0144991874694824e-01 4.3158119660802186e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1162 5.2525149658322334e-03</internalNodes>\n          <leafValues>\n            8.6686216294765472e-02 -1.5751640498638153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1163 5.7952258735895157e-02</internalNodes>\n          <leafValues>\n            1.3485850067809224e-03 -1.0001620054244995e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1164 -3.0681459233164787e-02</internalNodes>\n          <leafValues>\n            -6.7346888780593872e-01 1.7730809748172760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1165 -2.8556400910019875e-02</internalNodes>\n          <leafValues>\n            2.4913530051708221e-01 -2.1807359531521797e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1166 5.8311191387474537e-03</internalNodes>\n          <leafValues>\n            1.0109650343656540e-01 -1.2586539983749390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1167 2.8870739042758942e-03</internalNodes>\n          <leafValues>\n            -4.5462280511856079e-02 1.4794190227985382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1168 -5.3575891070067883e-03</internalNodes>\n          <leafValues>\n            1.0845459997653961e-01 -2.0636059343814850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1169 2.0851830020546913e-02</internalNodes>\n          <leafValues>\n            -2.5641430169343948e-02 1.2000799924135208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1170 2.9372319113463163e-03</internalNodes>\n          <leafValues>\n            -5.8832980692386627e-02 2.3967139422893524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1171 1.0109069757163525e-02</internalNodes>\n          <leafValues>\n            4.4724740087985992e-02 -2.5024959444999695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1172 6.2002640217542648e-02</internalNodes>\n          <leafValues>\n            3.1236680224537849e-02 -3.8775479793548584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1173 1.7331680282950401e-03</internalNodes>\n          <leafValues>\n            -7.6642520725727081e-02 5.8738309890031815e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1174 -4.6648900955915451e-02</internalNodes>\n          <leafValues>\n            4.7800371050834656e-01 -2.8223259374499321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1175 -4.0585011243820190e-02</internalNodes>\n          <leafValues>\n            1.9591329991817474e-01 -2.9608549550175667e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1176 1.4297359623014927e-02</internalNodes>\n          <leafValues>\n            8.0422781407833099e-02 -2.0024399459362030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1177 -1.4215649571269751e-03</internalNodes>\n          <leafValues>\n            9.7693942487239838e-02 -1.3090120255947113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1178 5.2683628164231777e-03</internalNodes>\n          <leafValues>\n            -5.8376371860504150e-02 2.4378040432929993e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>104</maxWeakCount>\n      <stageThreshold>-6.8976742029190063e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1179 -2.6198190171271563e-03</internalNodes>\n          <leafValues>\n            1.8673700094223022e-01 -1.9126529991626740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1180 -2.8629099950194359e-02</internalNodes>\n          <leafValues>\n            1.2887109816074371e-01 -2.6186849921941757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1181 7.1718869730830193e-03</internalNodes>\n          <leafValues>\n            8.8158592581748962e-02 -2.0327340066432953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1182 1.1641040444374084e-02</internalNodes>\n          <leafValues>\n            -2.1058250218629837e-02 1.7591789364814758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1183 5.6764329783618450e-03</internalNodes>\n          <leafValues>\n            4.9941159784793854e-02 -2.7329298853874207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1184 -4.4392690062522888e-02</internalNodes>\n          <leafValues>\n            5.6766128540039062e-01 -1.8674779683351517e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1185 1.3367610517889261e-04</internalNodes>\n          <leafValues>\n            -1.2990309298038483e-01 1.3542290031909943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1186 -4.4111948460340500e-02</internalNodes>\n          <leafValues>\n            2.2684830427169800e-01 -1.3318399898707867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1187 2.9443150851875544e-03</internalNodes>\n          <leafValues>\n            4.3161459267139435e-02 -2.9311171174049377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1188 3.5300010349601507e-03</internalNodes>\n          <leafValues>\n            7.7193722128868103e-02 -2.6324981451034546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1189 1.0119210183620453e-01</internalNodes>\n          <leafValues>\n            -5.4924260824918747e-02 3.2430219650268555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1190 -2.2348569706082344e-02</internalNodes>\n          <leafValues>\n            3.0803111195564270e-01 -2.2518489509820938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1191 6.4755380153656006e-03</internalNodes>\n          <leafValues>\n            -1.2045770138502121e-01 1.3186110556125641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1192 1.0904319584369659e-02</internalNodes>\n          <leafValues>\n            1.0217989981174469e-01 -1.8308849632740021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1193 -1.1256629601120949e-02</internalNodes>\n          <leafValues>\n            -2.9186639189720154e-01 5.5491220206022263e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1194 3.6791800521314144e-03</internalNodes>\n          <leafValues>\n            -5.0614688545465469e-02 8.2663312554359436e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1195 -9.1721288859844208e-02</internalNodes>\n          <leafValues>\n            -7.7127552032470703e-01 1.9312959164381027e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1196 4.0099889039993286e-02</internalNodes>\n          <leafValues>\n            7.8663527965545654e-03 -8.1302827596664429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1197 -5.4956428706645966e-02</internalNodes>\n          <leafValues>\n            2.9059520363807678e-01 -5.9825580567121506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1198 2.4804650247097015e-01</internalNodes>\n          <leafValues>\n            1.1665189638733864e-02 -6.9121950864791870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1199 -3.4284800291061401e-02</internalNodes>\n          <leafValues>\n            4.5358398556709290e-01 -3.2071251422166824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1200 2.5439230725169182e-02</internalNodes>\n          <leafValues>\n            1.9467150792479515e-02 -3.7927991151809692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1201 -1.2720660306513309e-02</internalNodes>\n          <leafValues>\n            -2.1211430430412292e-01 6.1533831059932709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1202 1.0831000283360481e-02</internalNodes>\n          <leafValues>\n            -5.1443681120872498e-02 1.6947689652442932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1203 -2.1931570023298264e-02</internalNodes>\n          <leafValues>\n            2.4839389324188232e-01 -5.6636359542608261e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1204 2.9397898912429810e-01</internalNodes>\n          <leafValues>\n            1.1411529965698719e-02 -9.3696069717407227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1205 -1.6342259943485260e-02</internalNodes>\n          <leafValues>\n            -3.1589549779891968e-01 4.4371981173753738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1206 -4.4280499219894409e-02</internalNodes>\n          <leafValues>\n            2.0337340235710144e-01 -2.1462319418787956e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1207 2.6503309607505798e-01</internalNodes>\n          <leafValues>\n            1.1633150279521942e-02 -9.1220170259475708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1208 -7.6378479599952698e-02</internalNodes>\n          <leafValues>\n            1.8688270449638367e-01 -1.9672080874443054e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1209 -1.0061570443212986e-02</internalNodes>\n          <leafValues>\n            -2.6462039351463318e-01 4.6620260924100876e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1210 2.4921730160713196e-02</internalNodes>\n          <leafValues>\n            -1.9131390377879143e-02 2.0154500007629395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1211 1.5098409676284064e-05</internalNodes>\n          <leafValues>\n            -1.6241690516471863e-01 7.6183967292308807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1212 -1.0081910341978073e-01</internalNodes>\n          <leafValues>\n            -1. 7.4751500505954027e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1213 6.5058596432209015e-02</internalNodes>\n          <leafValues>\n            -4.0468640625476837e-02 3.5160079598426819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1214 -1.2190239876508713e-01</internalNodes>\n          <leafValues>\n            -5.3624558448791504e-01 1.8637020140886307e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1215 -9.8520738538354635e-04</internalNodes>\n          <leafValues>\n            1.1398199945688248e-01 -1.1298830062150955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1216 -2.5300619006156921e-01</internalNodes>\n          <leafValues>\n            -4.3375909328460693e-01 1.2367400340735912e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1217 7.5246659107506275e-03</internalNodes>\n          <leafValues>\n            6.7355476319789886e-02 -1.8583969771862030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1218 4.8102210275828838e-03</internalNodes>\n          <leafValues>\n            -6.5870061516761780e-02 1.2848910689353943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1219 -1.4562129508703947e-03</internalNodes>\n          <leafValues>\n            1.8110689520835876e-01 -1.1248459666967392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1220 -5.6546321138739586e-03</internalNodes>\n          <leafValues>\n            1.0369840264320374e-01 -1.4115570485591888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1221 -3.1951289623975754e-02</internalNodes>\n          <leafValues>\n            -3.2971608638763428e-01 4.8281811177730560e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1222 4.2190380394458771e-02</internalNodes>\n          <leafValues>\n            -1.1644810438156128e-02 1.3701300323009491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1223 1.2606659904122353e-02</internalNodes>\n          <leafValues>\n            -6.0395881533622742e-02 2.4210059642791748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1224 -6.0083861462771893e-03</internalNodes>\n          <leafValues>\n            9.5677606761455536e-02 -2.0248259603977203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1225 4.0676388889551163e-02</internalNodes>\n          <leafValues>\n            -3.8506429642438889e-02 3.9824029803276062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1226 -1.3010219670832157e-02</internalNodes>\n          <leafValues>\n            -7.7870443463325500e-02 3.2533310353755951e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1227 -5.6646969169378281e-02</internalNodes>\n          <leafValues>\n            -9.5293551683425903e-01 1.7375659197568893e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1228 3.7307970225811005e-02</internalNodes>\n          <leafValues>\n            -3.3261440694332123e-02 4.6856319904327393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1229 -2.7986379340291023e-02</internalNodes>\n          <leafValues>\n            -4.6356698870658875e-01 2.8524029999971390e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1230 -7.5014896690845490e-02</internalNodes>\n          <leafValues>\n            2.4519899487495422e-01 -1.5830159187316895e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1231 2.7673080563545227e-02</internalNodes>\n          <leafValues>\n            -3.6458358168601990e-02 3.7215578556060791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1232 -1.7312960699200630e-02</internalNodes>\n          <leafValues>\n            -2.2117659449577332e-01 4.3232619762420654e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1233 -5.8893948793411255e-02</internalNodes>\n          <leafValues>\n            3.9726749062538147e-01 -3.7632528692483902e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1234 1.3193679973483086e-02</internalNodes>\n          <leafValues>\n            2.4857729673385620e-02 -1.7514359951019287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1235 3.8230679929256439e-02</internalNodes>\n          <leafValues>\n            2.9635110870003700e-02 -4.3452748656272888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1236 1.6845399513840675e-02</internalNodes>\n          <leafValues>\n            3.9338748902082443e-02 -2.3765720427036285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1237 -1.1559460312128067e-01</internalNodes>\n          <leafValues>\n            -4.0006878972053528e-01 3.2390538603067398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1238 -1.7385910032317042e-03</internalNodes>\n          <leafValues>\n            4.8545818775892258e-02 -6.1474680900573730e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1239 -3.3697668462991714e-02</internalNodes>\n          <leafValues>\n            2.4345000088214874e-01 -6.5504603087902069e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1240 -3.4722799062728882e-01</internalNodes>\n          <leafValues>\n            -3.3612060546875000e-01 1.5501200221478939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1241 5.8668039739131927e-02</internalNodes>\n          <leafValues>\n            6.8068057298660278e-02 -2.2104929387569427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1242 2.3718189448118210e-02</internalNodes>\n          <leafValues>\n            -1.4779569581151009e-02 4.7328341007232666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1243 2.8812700882554054e-02</internalNodes>\n          <leafValues>\n            3.3309880644083023e-02 -4.6797698736190796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1244 4.1023749858140945e-02</internalNodes>\n          <leafValues>\n            -2.8293000534176826e-02 4.9427551031112671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1245 -1.2017590051982552e-04</internalNodes>\n          <leafValues>\n            1.0363650321960449e-01 -1.2107490003108978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1246 -1.0908070206642151e-01</internalNodes>\n          <leafValues>\n            -1. 3.2971999607980251e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1247 -4.5967359095811844e-02</internalNodes>\n          <leafValues>\n            6.4819461107254028e-01 -1.9233519211411476e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1248 -1.9345719367265701e-02</internalNodes>\n          <leafValues>\n            -3.3145549893379211e-01 3.9008539170026779e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1249 1.2312790378928185e-02</internalNodes>\n          <leafValues>\n            4.1029628366231918e-02 -2.7943921089172363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1250 2.1535221021622419e-03</internalNodes>\n          <leafValues>\n            -6.7545056343078613e-02 1.1647740006446838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1251 -3.2158788293600082e-02</internalNodes>\n          <leafValues>\n            5.4741638898849487e-01 -2.3730229586362839e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1252 -2.7592359110713005e-02</internalNodes>\n          <leafValues>\n            -7.5319421291351318e-01 8.4066214039921761e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1253 2.2264510393142700e-02</internalNodes>\n          <leafValues>\n            1.2146740220487118e-02 -9.0291297435760498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1254 1.5361379832029343e-02</internalNodes>\n          <leafValues>\n            -3.1641189008951187e-02 3.2132801413536072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1255 -1.2360660359263420e-02</internalNodes>\n          <leafValues>\n            2.9248631000518799e-01 -4.5303758233785629e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1256 2.2978749126195908e-02</internalNodes>\n          <leafValues>\n            -1.2054479680955410e-02 1.9060949981212616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1257 2.3296380415558815e-02</internalNodes>\n          <leafValues>\n            3.1409051269292831e-02 -5.1856082677841187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1258 5.7384249521419406e-04</internalNodes>\n          <leafValues>\n            -1.0293489694595337e-01 8.1548452377319336e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1259 -3.3020470291376114e-02</internalNodes>\n          <leafValues>\n            4.2470559477806091e-01 -4.4794678688049316e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1260 -2.1713029593229294e-02</internalNodes>\n          <leafValues>\n            -1.4825260639190674e-01 1.2959879823029041e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1261 -9.7430922323837876e-05</internalNodes>\n          <leafValues>\n            1.1899639666080475e-01 -1.4753970503807068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1262 -9.2907734215259552e-03</internalNodes>\n          <leafValues>\n            -1.1635430157184601e-01 5.4104641079902649e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1263 3.7244848906993866e-02</internalNodes>\n          <leafValues>\n            -3.4421201795339584e-02 3.7943929433822632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1264 1.5277029573917389e-01</internalNodes>\n          <leafValues>\n            7.2725401259958744e-03 -3.4155088663101196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1265 -1.2663450092077255e-02</internalNodes>\n          <leafValues>\n            -3.0596670508384705e-01 3.8231261074542999e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1266 -7.4888423085212708e-02</internalNodes>\n          <leafValues>\n            -3.4658950567245483e-01 1.5501650050282478e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1267 -4.0114589035511017e-02</internalNodes>\n          <leafValues>\n            3.2629820704460144e-01 -4.1313670575618744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1268 -9.6492111682891846e-02</internalNodes>\n          <leafValues>\n            1.0172849893569946e-01 -1.7156010493636131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1269 -1.6712839901447296e-01</internalNodes>\n          <leafValues>\n            -7.7655118703842163e-01 1.8029559403657913e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1270 -8.2981940358877182e-03</internalNodes>\n          <leafValues>\n            -1.4397139847278595e-01 5.8948140591382980e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1271 -3.7844169419258833e-03</internalNodes>\n          <leafValues>\n            1.7095179855823517e-01 -7.8256443142890930e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1272 -1.6076420247554779e-01</internalNodes>\n          <leafValues>\n            2.3138229548931122e-01 -1.3428050093352795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1273 6.4544437918812037e-04</internalNodes>\n          <leafValues>\n            -1.4424400031566620e-01 8.3287820219993591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1274 2.2737309336662292e-02</internalNodes>\n          <leafValues>\n            -3.4155819565057755e-02 3.5519808530807495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1275 -3.9030050393193960e-03</internalNodes>\n          <leafValues>\n            -1.8736769258975983e-01 6.4628012478351593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1276 -5.1145430654287338e-02</internalNodes>\n          <leafValues>\n            6.6892707347869873e-01 -1.1180049739778042e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1277 -6.0482369735836983e-03</internalNodes>\n          <leafValues>\n            1.8622750043869019e-01 -6.3018701970577240e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1278 1.1743569746613503e-02</internalNodes>\n          <leafValues>\n            2.5449279695749283e-02 -1.3331249356269836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1279 8.4120890824124217e-04</internalNodes>\n          <leafValues>\n            -9.3333467841148376e-02 1.3315880298614502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1280 -3.7756171077489853e-02</internalNodes>\n          <leafValues>\n            -2.3138800263404846e-01 4.0569789707660675e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1281 -2.0867560058832169e-02</internalNodes>\n          <leafValues>\n            1.0056090354919434e-01 -1.1744190007448196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1282 -3.9802178740501404e-02</internalNodes>\n          <leafValues>\n            -1.1585719883441925e-01 1.2668189406394958e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>111</maxWeakCount>\n      <stageThreshold>-6.8169009685516357e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1283 8.4546189755201340e-03</internalNodes>\n          <leafValues>\n            -1.6289660334587097e-01 1.9834390282630920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1284 5.1610451191663742e-02</internalNodes>\n          <leafValues>\n            -3.0827090144157410e-02 3.3742550015449524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1285 -6.4909443259239197e-02</internalNodes>\n          <leafValues>\n            2.8602281212806702e-01 -5.9848651289939880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1286 -4.3951408006250858e-03</internalNodes>\n          <leafValues>\n            1.1302659660577774e-01 -1.2632089853286743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1287 -8.2756802439689636e-02</internalNodes>\n          <leafValues>\n            -6.0790950059890747e-01 2.1967180073261261e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1288 -4.8698862083256245e-03</internalNodes>\n          <leafValues>\n            8.5866190493106842e-02 -8.9009523391723633e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1289 9.1512441635131836e-02</internalNodes>\n          <leafValues>\n            -5.3345348685979843e-02 2.6732870936393738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1290 3.6815661005675793e-03</internalNodes>\n          <leafValues>\n            7.0915699005126953e-02 -1.7941209673881531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1291 6.3032708130776882e-03</internalNodes>\n          <leafValues>\n            1.2378150224685669e-01 -1.2391480058431625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1292 5.8764131972566247e-04</internalNodes>\n          <leafValues>\n            -6.3813656568527222e-02 9.5545768737792969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1293 1.4680320397019386e-02</internalNodes>\n          <leafValues>\n            -4.9183528870344162e-02 2.9040598869323730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1294 3.5624930169433355e-03</internalNodes>\n          <leafValues>\n            -9.7563147544860840e-02 4.8932831734418869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1295 -7.4473340064287186e-03</internalNodes>\n          <leafValues>\n            -1.5952460467815399e-01 8.4772646427154541e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1296 5.4010991007089615e-02</internalNodes>\n          <leafValues>\n            -2.0565150305628777e-02 5.7340717315673828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1297 -2.3613919038325548e-03</internalNodes>\n          <leafValues>\n            1.4957650005817413e-01 -7.5148113071918488e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1298 4.0665458887815475e-02</internalNodes>\n          <leafValues>\n            1.4762399718165398e-02 -5.9685671329498291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1299 9.3258380889892578e-02</internalNodes>\n          <leafValues>\n            1.3036210089921951e-02 -6.8643862009048462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1300 2.8593749739229679e-03</internalNodes>\n          <leafValues>\n            -5.4904639720916748e-02 9.8074667155742645e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1301 -4.9756402149796486e-03</internalNodes>\n          <leafValues>\n            1.6751970350742340e-01 -8.2563832402229309e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1302 -2.2061138879507780e-03</internalNodes>\n          <leafValues>\n            7.1486182510852814e-02 -8.4684796631336212e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1303 4.3787518516182899e-03</internalNodes>\n          <leafValues>\n            7.5296439230442047e-02 -1.6988970339298248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1304 -4.9143321812152863e-03</internalNodes>\n          <leafValues>\n            1.6274330019950867e-01 -5.7579189538955688e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1305 -3.0191219411790371e-03</internalNodes>\n          <leafValues>\n            -1.2450099736452103e-01 1.1526980251073837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1306 6.8227178417146206e-03</internalNodes>\n          <leafValues>\n            3.7166971713304520e-02 -1.0093449801206589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1307 3.5116981714963913e-02</internalNodes>\n          <leafValues>\n            -4.2997431010007858e-02 3.2959198951721191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1308 -1.4400649815797806e-03</internalNodes>\n          <leafValues>\n            -9.8922260105609894e-02 6.7108891904354095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1309 -4.6699359081685543e-03</internalNodes>\n          <leafValues>\n            -1.8003439903259277e-01 6.8038396537303925e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1310 3.7647720426321030e-02</internalNodes>\n          <leafValues>\n            -2.1031750366091728e-02 1.6627119481563568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1311 5.1745469681918621e-03</internalNodes>\n          <leafValues>\n            -1.1846090108156204e-01 1.0919190198183060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1312 7.7274879440665245e-03</internalNodes>\n          <leafValues>\n            -5.5097330361604691e-02 2.2752280533313751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1313 2.9158849269151688e-02</internalNodes>\n          <leafValues>\n            7.7885583043098450e-02 -1.7775520682334900e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1314 2.9885378899052739e-04</internalNodes>\n          <leafValues>\n            -7.8875280916690826e-02 5.1163110882043839e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1315 1.4456070493906736e-04</internalNodes>\n          <leafValues>\n            -1.6097649931907654e-01 8.1574030220508575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1316 4.7840740531682968e-02</internalNodes>\n          <leafValues>\n            1.4210550114512444e-02 -3.1316679716110229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1317 4.3943468481302261e-02</internalNodes>\n          <leafValues>\n            -3.1002480536699295e-02 4.2450350522994995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1318 -1.7603389918804169e-01</internalNodes>\n          <leafValues>\n            -2.1625219285488129e-01 1.3710640370845795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1319 -2.7010550722479820e-02</internalNodes>\n          <leafValues>\n            4.5448291301727295e-01 -2.8507620096206665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1320 6.4534661360085011e-03</internalNodes>\n          <leafValues>\n            -4.9660708755254745e-02 8.3071723580360413e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1321 -7.1115070022642612e-03</internalNodes>\n          <leafValues>\n            -2.2509810328483582e-01 6.5033361315727234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1322 -2.5184849277138710e-02</internalNodes>\n          <leafValues>\n            -1.7480330169200897e-01 1.8751099705696106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1323 -8.8047432655002922e-05</internalNodes>\n          <leafValues>\n            1.2677890062332153e-01 -1.0704579949378967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1324 -3.6020219326019287e-02</internalNodes>\n          <leafValues>\n            2.4649600684642792e-01 -4.9772080034017563e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1325 7.6084570027887821e-03</internalNodes>\n          <leafValues>\n            1.0041440278291702e-01 -1.3673840463161469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1326 -8.2404967397451401e-03</internalNodes>\n          <leafValues>\n            1.1703260242938995e-01 -5.2781961858272552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1327 -7.2474818443879485e-04</internalNodes>\n          <leafValues>\n            -1.1650030314922333e-01 1.1333490163087845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1328 -7.8272278187796474e-05</internalNodes>\n          <leafValues>\n            6.4425677061080933e-02 -1.5894609689712524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1329 -2.0254699047654867e-03</internalNodes>\n          <leafValues>\n            -1.7027080059051514e-01 7.1216866374015808e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1330 -1.1882030218839645e-01</internalNodes>\n          <leafValues>\n            3.2878550887107849e-01 -1.5325210057199001e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1331 -1.6258429735898972e-02</internalNodes>\n          <leafValues>\n            2.1848890185356140e-01 -5.6253198534250259e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1332 -6.8429792299866676e-03</internalNodes>\n          <leafValues>\n            -2.3313499987125397e-01 5.7107821106910706e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1333 3.4939710050821304e-02</internalNodes>\n          <leafValues>\n            -2.7333829551935196e-02 4.5651969313621521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1334 2.2979779541492462e-01</internalNodes>\n          <leafValues>\n            1.4508989639580250e-02 -8.7165087461471558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1335 4.3360598385334015e-02</internalNodes>\n          <leafValues>\n            8.4467595443129539e-03 -8.7500327825546265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1336 -1.1806190013885498e-03</internalNodes>\n          <leafValues>\n            7.8186698257923126e-02 -5.2834209054708481e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1337 -4.1772681474685669e-01</internalNodes>\n          <leafValues>\n            -8.0729222297668457e-01 1.3048130087554455e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1338 -4.6315230429172516e-02</internalNodes>\n          <leafValues>\n            2.9375079274177551e-01 -3.5192389041185379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1339 -4.0271300822496414e-02</internalNodes>\n          <leafValues>\n            -5.8174532651901245e-01 1.9768500700592995e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1340 -4.3012440204620361e-02</internalNodes>\n          <leafValues>\n            1.0882510244846344e-01 -2.6977609843015671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1341 2.8285770677030087e-03</internalNodes>\n          <leafValues>\n            7.6837047934532166e-02 -1.5720550715923309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1342 -3.3204611390829086e-02</internalNodes>\n          <leafValues>\n            -2.3152589797973633e-01 1.5932539477944374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1343 -4.8097351100295782e-04</internalNodes>\n          <leafValues>\n            1.1043740063905716e-01 -1.1589460074901581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1344 2.9704240150749683e-03</internalNodes>\n          <leafValues>\n            -3.4243740141391754e-02 6.9107398390769958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1345 1.1893190443515778e-02</internalNodes>\n          <leafValues>\n            8.0122880637645721e-02 -2.0503090322017670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1346 -6.3963606953620911e-02</internalNodes>\n          <leafValues>\n            -8.5530751943588257e-01 6.4783529378473759e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1347 -5.6093540042638779e-03</internalNodes>\n          <leafValues>\n            1.6278949379920959e-01 -1.0079070180654526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1348 7.5979339890182018e-03</internalNodes>\n          <leafValues>\n            5.4123409092426300e-02 -1.2431269884109497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1349 1.3480819761753082e-02</internalNodes>\n          <leafValues>\n            -6.3751302659511566e-02 2.5250628590583801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1350 -9.4613758847117424e-04</internalNodes>\n          <leafValues>\n            4.2835868895053864e-02 -7.6837100088596344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1351 -3.8062490522861481e-02</internalNodes>\n          <leafValues>\n            1.9252179563045502e-01 -6.3947133719921112e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1352 1.2410899996757507e-01</internalNodes>\n          <leafValues>\n            7.9416595399379730e-03 -4.2653021216392517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1353 -9.2228442430496216e-02</internalNodes>\n          <leafValues>\n            -5.5210620164871216e-01 2.8964910656213760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1354 1.5106770209968090e-02</internalNodes>\n          <leafValues>\n            2.7609340846538544e-02 -1.6688449680805206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1355 -2.3654250428080559e-02</internalNodes>\n          <leafValues>\n            -3.4379678964614868e-01 3.9513330906629562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1356 4.7881390899419785e-02</internalNodes>\n          <leafValues>\n            8.0661084502935410e-03 -1.8185199797153473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1357 8.5415288805961609e-02</internalNodes>\n          <leafValues>\n            -4.6752408146858215e-02 2.7169001102447510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1358 3.1524940859526396e-03</internalNodes>\n          <leafValues>\n            -8.6421400308609009e-02 6.8336002528667450e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1359 -3.0099870637059212e-03</internalNodes>\n          <leafValues>\n            8.9336208999156952e-02 -1.3626849651336670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1360 -5.8112520724534988e-02</internalNodes>\n          <leafValues>\n            -1.9748120009899139e-01 2.6536440476775169e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1361 1.2775669991970062e-01</internalNodes>\n          <leafValues>\n            -4.9838040024042130e-02 3.4896400570869446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1362 1.2011290341615677e-01</internalNodes>\n          <leafValues>\n            -6.3313432037830353e-03 3.7937548756599426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1363 4.7567482106387615e-03</internalNodes>\n          <leafValues>\n            1.0490419715642929e-01 -1.3542570173740387e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1364 -1.5902349725365639e-02</internalNodes>\n          <leafValues>\n            6.1786301434040070e-02 -9.8376080393791199e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1365 -5.6423708796501160e-02</internalNodes>\n          <leafValues>\n            -6.3371032476425171e-01 2.0224599167704582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1366 -7.9641327261924744e-02</internalNodes>\n          <leafValues>\n            -1. 8.7428308324888349e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1367 -2.0731301046907902e-03</internalNodes>\n          <leafValues>\n            1.3846459984779358e-01 -9.5865301787853241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1368 5.8470368385314941e-03</internalNodes>\n          <leafValues>\n            -5.7033840566873550e-02 1.1691799759864807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1369 -2.6138950139284134e-02</internalNodes>\n          <leafValues>\n            -2.2362439334392548e-01 5.5546630173921585e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1370 -6.5781630109995604e-04</internalNodes>\n          <leafValues>\n            9.2999227344989777e-02 -8.4152117371559143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1371 -5.6041389703750610e-02</internalNodes>\n          <leafValues>\n            3.5072851181030273e-01 -3.1472280621528625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1372 9.7799800336360931e-02</internalNodes>\n          <leafValues>\n            1.0124430060386658e-02 -3.7714061141014099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1373 4.5515140518546104e-03</internalNodes>\n          <leafValues>\n            -7.8311361372470856e-02 1.4166970551013947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1374 1.0168380104005337e-02</internalNodes>\n          <leafValues>\n            5.2113991230726242e-02 -2.4422790110111237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1375 6.2885403633117676e-02</internalNodes>\n          <leafValues>\n            -1.8255509436130524e-02 6.2847292423248291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1376 -4.8064131289720535e-02</internalNodes>\n          <leafValues>\n            -8.6817431449890137e-01 6.6064838320016861e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1377 1.8479900434613228e-02</internalNodes>\n          <leafValues>\n            6.9977812469005585e-02 -1.5929399430751801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1378 2.4549840018153191e-02</internalNodes>\n          <leafValues>\n            -1.7519120126962662e-02 1.7961919307708740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1379 3.9227470755577087e-02</internalNodes>\n          <leafValues>\n            -4.7417990863323212e-02 2.7945789694786072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1380 4.1248198598623276e-02</internalNodes>\n          <leafValues>\n            1.1459370143711567e-02 -4.3477478623390198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1381 -8.4321142639964819e-04</internalNodes>\n          <leafValues>\n            1.2758859992027283e-01 -9.7010560333728790e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1382 -1.3688740320503712e-02</internalNodes>\n          <leafValues>\n            -1.6236190497875214e-01 4.3290950357913971e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1383 -5.5982511490583420e-02</internalNodes>\n          <leafValues>\n            -7.5431138277053833e-01 1.5797710046172142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1384 7.3578268289566040e-02</internalNodes>\n          <leafValues>\n            -1.4777439646422863e-03 -1.0000350475311279e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1385 3.7084969226270914e-03</internalNodes>\n          <leafValues>\n            -9.7184643149375916e-02 1.2435329705476761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1386 -1.4889879821566865e-05</internalNodes>\n          <leafValues>\n            7.1465343236923218e-02 -1.6840849816799164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1387 1.0487560182809830e-01</internalNodes>\n          <leafValues>\n            1.5076650306582451e-02 -7.1159482002258301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1388 1.2587489560246468e-02</internalNodes>\n          <leafValues>\n            -2.0771300420165062e-02 1.7468680441379547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1389 -2.2228389570955187e-04</internalNodes>\n          <leafValues>\n            1.1781640350818634e-01 -9.2627458274364471e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1390 -7.7760413289070129e-02</internalNodes>\n          <leafValues>\n            -7.4605411291122437e-01 3.6328181158751249e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1391 4.5043420046567917e-02</internalNodes>\n          <leafValues>\n            2.2217869758605957e-02 -5.0052911043167114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1392 3.5614410880953074e-03</internalNodes>\n          <leafValues>\n            -5.1213219761848450e-02 8.9986503124237061e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1393 -7.4102368671447039e-04</internalNodes>\n          <leafValues>\n            1.3938049972057343e-01 -1.0272219777107239e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>107</maxWeakCount>\n      <stageThreshold>-6.0689288377761841e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1394 -8.5600130259990692e-03</internalNodes>\n          <leafValues>\n            1.6578909754753113e-01 -1.6412919759750366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1395 3.0798809602856636e-02</internalNodes>\n          <leafValues>\n            -3.3495649695396423e-02 2.8578650951385498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1396 -3.7319411057978868e-04</internalNodes>\n          <leafValues>\n            1.2523449957370758e-01 -1.2115170061588287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1397 -1.9253849983215332e-02</internalNodes>\n          <leafValues>\n            -8.7740883231163025e-02 3.9066571742296219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1398 -8.5401646792888641e-03</internalNodes>\n          <leafValues>\n            1.3152270019054413e-01 -1.3007740676403046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1399 1.2424349784851074e-01</internalNodes>\n          <leafValues>\n            1.9019979983568192e-02 -7.8247052431106567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1400 4.0093418210744858e-02</internalNodes>\n          <leafValues>\n            -4.0743768215179443e-02 3.8851749897003174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1401 -4.4169559259898961e-05</internalNodes>\n          <leafValues>\n            4.5526970177888870e-02 -8.8063806295394897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1402 -1.7662849277257919e-02</internalNodes>\n          <leafValues>\n            -3.1371811032295227e-01 5.1794338971376419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1403 5.2368510514497757e-02</internalNodes>\n          <leafValues>\n            -3.5845998674631119e-02 1.5009739995002747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1404 -2.8719279915094376e-02</internalNodes>\n          <leafValues>\n            -1.9849379360675812e-01 7.8099071979522705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1405 6.9435790181159973e-02</internalNodes>\n          <leafValues>\n            -5.5073730647563934e-02 2.1780849993228912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1406 5.4794438183307648e-02</internalNodes>\n          <leafValues>\n            -3.0223689973354340e-02 6.2993967533111572e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1407 -1.5315500088036060e-02</internalNodes>\n          <leafValues>\n            -1.5052799880504608e-01 2.0194370299577713e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1408 2.9001969844102859e-02</internalNodes>\n          <leafValues>\n            -2.0738989114761353e-02 4.5645099878311157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1409 -2.3264769464731216e-02</internalNodes>\n          <leafValues>\n            1.4672529697418213e-01 -3.8081351667642593e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1410 1.9063109531998634e-02</internalNodes>\n          <leafValues>\n            7.2921238839626312e-02 -2.2723700106143951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1411 1.2208239641040564e-03</internalNodes>\n          <leafValues>\n            7.3471322655677795e-02 -1.9122929871082306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1412 -1.7565910518169403e-01</internalNodes>\n          <leafValues>\n            2.5924688577651978e-01 -5.6015118956565857e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1413 -3.8042131811380386e-02</internalNodes>\n          <leafValues>\n            1.6113610565662384e-01 -4.3758820742368698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1414 3.0130259692668915e-02</internalNodes>\n          <leafValues>\n            5.7830829173326492e-02 -2.9774171113967896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1415 2.0089220255613327e-02</internalNodes>\n          <leafValues>\n            -6.0509629547595978e-02 3.3441681414842606e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1416 2.6193389203399420e-04</internalNodes>\n          <leafValues>\n            -1.5175449848175049e-01 1.1094109714031219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1417 4.0310628712177277e-02</internalNodes>\n          <leafValues>\n            1.7477119341492653e-02 -1.4185379445552826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1418 -2.9343019705265760e-03</internalNodes>\n          <leafValues>\n            -1.6960139572620392e-01 9.3530252575874329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1419 1.4554520137608051e-02</internalNodes>\n          <leafValues>\n            -7.5844526290893555e-02 2.7771660685539246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1420 3.4086001105606556e-03</internalNodes>\n          <leafValues>\n            7.3933310806751251e-02 -1.9626590609550476e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1421 -6.7988429218530655e-03</internalNodes>\n          <leafValues>\n            -2.0132480561733246e-01 5.8276038616895676e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1422 -5.0457930192351341e-03</internalNodes>\n          <leafValues>\n            1.9446060061454773e-01 -7.1691580116748810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1423 1.0465010069310665e-02</internalNodes>\n          <leafValues>\n            -4.7314591705799103e-02 1.9316110014915466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1424 -1.6713530058041215e-03</internalNodes>\n          <leafValues>\n            9.2915147542953491e-02 -1.1890129745006561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1425 -4.2704358696937561e-02</internalNodes>\n          <leafValues>\n            1.6961039602756500e-01 -2.0632650703191757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1426 2.0367829501628876e-01</internalNodes>\n          <leafValues>\n            2.3246899247169495e-02 -4.9420261383056641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1427 -8.3379482384771109e-04</internalNodes>\n          <leafValues>\n            5.0001069903373718e-02 -7.3779806494712830e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1428 1.7854769527912140e-01</internalNodes>\n          <leafValues>\n            1.5588290058076382e-02 -7.7650082111358643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1429 -1.3535289466381073e-01</internalNodes>\n          <leafValues>\n            -5.2299112081527710e-01 3.1595760956406593e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1430 4.6555269509553909e-02</internalNodes>\n          <leafValues>\n            -4.1891060769557953e-02 3.0324798822402954e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1431 2.2663649171590805e-02</internalNodes>\n          <leafValues>\n            3.8851160556077957e-02 -8.5196226835250854e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1432 -2.3027729988098145e-01</internalNodes>\n          <leafValues>\n            -9.3503099679946899e-01 1.3942349702119827e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1433 2.5714140385389328e-02</internalNodes>\n          <leafValues>\n            -9.1460775583982468e-03 7.8063201904296875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1434 -7.3728510869841557e-06</internalNodes>\n          <leafValues>\n            6.2730923295021057e-02 -2.0042170584201813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1435 -1.9757889211177826e-02</internalNodes>\n          <leafValues>\n            -2.3434729874134064e-01 1.4600900001823902e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1436 -4.1893101297318935e-03</internalNodes>\n          <leafValues>\n            1.4971399307250977e-01 -6.9368869066238403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1437 1.1314969742670655e-03</internalNodes>\n          <leafValues>\n            -6.9203592836856842e-02 1.0447440296411514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1438 6.3914088532328606e-03</internalNodes>\n          <leafValues>\n            5.6134030222892761e-02 -1.9862769544124603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1439 -3.7047569639980793e-03</internalNodes>\n          <leafValues>\n            9.6817292273044586e-02 -9.5282286405563354e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1440 3.0627459287643433e-02</internalNodes>\n          <leafValues>\n            -5.0079640001058578e-02 2.6023888587951660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1441 3.2444439828395844e-02</internalNodes>\n          <leafValues>\n            3.1099939718842506e-02 -2.0788609981536865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1442 1.1651559732854366e-02</internalNodes>\n          <leafValues>\n            -5.8311950415372849e-02 2.5374108552932739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1443 -3.6515220999717712e-02</internalNodes>\n          <leafValues>\n            -2.6749190688133240e-01 2.0536249503493309e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1444 1.7474630847573280e-02</internalNodes>\n          <leafValues>\n            4.7416981309652328e-02 -3.3719009160995483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1445 -1.5204170485958457e-03</internalNodes>\n          <leafValues>\n            5.8933809399604797e-02 -9.5844946801662445e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1446 4.7761179506778717e-02</internalNodes>\n          <leafValues>\n            1.0849700309336185e-02 -8.6635017395019531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1447 -6.3569113612174988e-02</internalNodes>\n          <leafValues>\n            2.5858598947525024e-01 -1.8156580626964569e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1448 -1.7476839711889625e-03</internalNodes>\n          <leafValues>\n            7.5750246644020081e-02 -1.4295279979705811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1449 -4.6762558631598949e-03</internalNodes>\n          <leafValues>\n            -9.1223396360874176e-02 1.3135279715061188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1450 2.2202100604772568e-02</internalNodes>\n          <leafValues>\n            -5.3397450596094131e-02 2.0743979513645172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1451 -2.4647359549999237e-01</internalNodes>\n          <leafValues>\n            -4.5610219240188599e-01 3.5777890589088202e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1452 5.0148782320320606e-03</internalNodes>\n          <leafValues>\n            8.8871829211711884e-02 -1.6236490011215210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1453 -4.2023971676826477e-02</internalNodes>\n          <leafValues>\n            1.2805579602718353e-01 -1.1926759965717793e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1454 -1.0895519703626633e-01</internalNodes>\n          <leafValues>\n            -6.6466122865676880e-01 1.5905549749732018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1455 -3.6672928929328918e-01</internalNodes>\n          <leafValues>\n            3.6374801397323608e-01 -3.1206229701638222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1456 9.5884501934051514e-03</internalNodes>\n          <leafValues>\n            9.1073550283908844e-02 -1.2492360174655914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1457 1.6124530229717493e-03</internalNodes>\n          <leafValues>\n            3.3751979470252991e-02 -5.8749239891767502e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1458 -1.7882430925965309e-02</internalNodes>\n          <leafValues>\n            2.0992769300937653e-01 -6.3215233385562897e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1459 -6.6655018599703908e-05</internalNodes>\n          <leafValues>\n            5.5020030587911606e-02 -1.7908810079097748e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1460 -1.0912610217928886e-02</internalNodes>\n          <leafValues>\n            -1.7878860235214233e-01 6.4088903367519379e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1461 -1.9031569827347994e-03</internalNodes>\n          <leafValues>\n            1.1012560129165649e-01 -6.2576442956924438e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1462 4.7322059981524944e-03</internalNodes>\n          <leafValues>\n            6.0611810535192490e-02 -1.7521250247955322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1463 1.7955000698566437e-01</internalNodes>\n          <leafValues>\n            -2.6413710787892342e-02 5.1463198661804199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1464 -1.8869279883801937e-03</internalNodes>\n          <leafValues>\n            7.0732869207859039e-02 -1.8977560102939606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1465 -3.5322420299053192e-03</internalNodes>\n          <leafValues>\n            9.5800288021564484e-02 -4.9251660704612732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1466 1.0818409500643611e-03</internalNodes>\n          <leafValues>\n            -9.7082488238811493e-02 1.4092449843883514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1467 -9.5455259084701538e-02</internalNodes>\n          <leafValues>\n            -6.8376517295837402e-01 8.8187018409371376e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1468 1.6179149970412254e-03</internalNodes>\n          <leafValues>\n            -9.5129579305648804e-02 1.1351480334997177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1469 6.5547877550125122e-01</internalNodes>\n          <leafValues>\n            9.7635984420776367e-03 -5.6581187248229980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1470 -7.7973723411560059e-02</internalNodes>\n          <leafValues>\n            3.5573729872703552e-01 -3.3126130700111389e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1471 2.0209029316902161e-02</internalNodes>\n          <leafValues>\n            3.9301611483097076e-02 -1.3580250740051270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1472 9.0323589742183685e-02</internalNodes>\n          <leafValues>\n            -1.5932930633425713e-02 6.9409132003784180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1473 -6.2048831023275852e-03</internalNodes>\n          <leafValues>\n            -1.7037659883499146e-01 6.8090677261352539e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1474 -1.5737250447273254e-02</internalNodes>\n          <leafValues>\n            1.6250109672546387e-01 -6.6528938710689545e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1475 -3.5397041589021683e-02</internalNodes>\n          <leafValues>\n            -8.9766547083854675e-02 4.9135740846395493e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1476 3.2850861549377441e-02</internalNodes>\n          <leafValues>\n            8.5158139467239380e-02 -1.3002319633960724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1477 -8.4024056792259216e-02</internalNodes>\n          <leafValues>\n            3.0658489465713501e-01 -3.9313621819019318e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1478 2.1347659640014172e-03</internalNodes>\n          <leafValues>\n            8.3386950194835663e-02 -1.2239480018615723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1479 1.7922610044479370e-01</internalNodes>\n          <leafValues>\n            2.6004109531641006e-03 -9.9989092350006104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1480 1.1854390054941177e-01</internalNodes>\n          <leafValues>\n            1.1098369956016541e-02 -8.9629507064819336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1481 -2.7351840399205685e-03</internalNodes>\n          <leafValues>\n            1.1589130014181137e-01 -6.3589207828044891e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1482 6.6092880442738533e-03</internalNodes>\n          <leafValues>\n            -7.9491429030895233e-02 1.8501229584217072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1483 -2.1072009578347206e-02</internalNodes>\n          <leafValues>\n            -1.4708499610424042e-01 2.6071280241012573e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1484 1.3411619700491428e-02</internalNodes>\n          <leafValues>\n            4.8645589500665665e-02 -2.2041800618171692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1485 -2.0661540329456329e-02</internalNodes>\n          <leafValues>\n            2.1374049782752991e-01 -2.2243229672312737e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1486 -1.0939250141382217e-01</internalNodes>\n          <leafValues>\n            -7.9235088825225830e-01 1.1932499706745148e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1487 5.4573271423578262e-02</internalNodes>\n          <leafValues>\n            -8.7064085528254509e-03 3.8226109743118286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1488 -2.7845989912748337e-02</internalNodes>\n          <leafValues>\n            4.2096340656280518e-01 -3.4300819039344788e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1489 1.4973179996013641e-01</internalNodes>\n          <leafValues>\n            5.5857440456748009e-03 -7.1027070283889771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1490 5.4548021405935287e-02</internalNodes>\n          <leafValues>\n            1.9289769232273102e-02 -5.5061852931976318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1491 5.4990737698972225e-03</internalNodes>\n          <leafValues>\n            4.3643891811370850e-02 -1.2233699858188629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1492 3.5988059244118631e-04</internalNodes>\n          <leafValues>\n            -9.5005020499229431e-02 1.2501640617847443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1493 -5.1003068685531616e-02</internalNodes>\n          <leafValues>\n            -3.4648188948631287e-01 1.4124399982392788e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1494 -5.9379130601882935e-02</internalNodes>\n          <leafValues>\n            6.8840432167053223e-01 -2.0780999213457108e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1495 6.8976037204265594e-02</internalNodes>\n          <leafValues>\n            8.5678137838840485e-03 -6.9098550081253052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1496 -4.3954830616712570e-03</internalNodes>\n          <leafValues>\n            -1.7382889986038208e-01 6.9105990231037140e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1497 1.3838030397891998e-02</internalNodes>\n          <leafValues>\n            -2.9398119077086449e-02 1.9685789942741394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1498 -7.5316978618502617e-03</internalNodes>\n          <leafValues>\n            -3.5790848731994629e-01 3.9685450494289398e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1499 -8.8299706578254700e-02</internalNodes>\n          <leafValues>\n            -2.3770420253276825e-01 3.0232321005314589e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1500 -4.4138759374618530e-02</internalNodes>\n          <leafValues>\n            2.6541408896446228e-01 -5.1865179091691971e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>107</maxWeakCount>\n      <stageThreshold>-5.6881058216094971e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1501 -9.2582583427429199e-02</internalNodes>\n          <leafValues>\n            3.6183288693428040e-01 -7.8275963664054871e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1502 -4.8143980093300343e-03</internalNodes>\n          <leafValues>\n            -1.2681719660758972e-01 6.7723788321018219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1503 3.2365128397941589e-02</internalNodes>\n          <leafValues>\n            -4.6087108552455902e-02 3.2692021131515503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1504 -1.7028570175170898e-02</internalNodes>\n          <leafValues>\n            9.1306403279304504e-02 -1.1660590022802353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1505 -1.1308620125055313e-01</internalNodes>\n          <leafValues>\n            -7.9631358385086060e-01 5.8426991105079651e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1506 -3.5633759107440710e-03</internalNodes>\n          <leafValues>\n            -8.2610622048377991e-02 1.0166700184345245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1507 -2.4109560251235962e-01</internalNodes>\n          <leafValues>\n            2.7927228808403015e-01 -8.0744966864585876e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1508 2.2599289193749428e-02</internalNodes>\n          <leafValues>\n            5.1744598895311356e-02 -2.8865408897399902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1509 2.0002270117402077e-02</internalNodes>\n          <leafValues>\n            -5.7962361723184586e-02 2.9044789075851440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1510 -1.9348099594935775e-03</internalNodes>\n          <leafValues>\n            9.8808683454990387e-02 -1.2368459999561310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1511 -7.5757717713713646e-03</internalNodes>\n          <leafValues>\n            -2.0071910321712494e-01 9.2741288244724274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1512 3.3381819725036621e-02</internalNodes>\n          <leafValues>\n            -3.4530758857727051e-02 3.0876499414443970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1513 4.7418981790542603e-02</internalNodes>\n          <leafValues>\n            -1.3563269376754761e-01 1.1016750335693359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1514 -5.4173129610717297e-03</internalNodes>\n          <leafValues>\n            -1.6050089895725250e-01 7.2612293064594269e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1515 -9.6942558884620667e-03</internalNodes>\n          <leafValues>\n            -1.6376489400863647e-01 8.4426470100879669e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1516 -6.0632169246673584e-02</internalNodes>\n          <leafValues>\n            1.6474419832229614e-01 -2.6981400325894356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1517 5.0302860327064991e-03</internalNodes>\n          <leafValues>\n            -1.0996829718351364e-01 1.3480730354785919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1518 -8.7792202830314636e-02</internalNodes>\n          <leafValues>\n            -6.8317967653274536e-01 1.0834610089659691e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1519 3.0390409752726555e-02</internalNodes>\n          <leafValues>\n            -4.2450569570064545e-02 3.0770599842071533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1520 -5.1566340029239655e-02</internalNodes>\n          <leafValues>\n            -6.2840008735656738e-01 9.7069833427667618e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1521 -4.2446999577805400e-04</internalNodes>\n          <leafValues>\n            8.4595613181591034e-02 -1.8075129389762878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1522 -1.2135359644889832e-01</internalNodes>\n          <leafValues>\n            -1.2717489898204803e-01 9.6575058996677399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1523 -1.5150560066103935e-02</internalNodes>\n          <leafValues>\n            9.3037553131580353e-02 -1.3127900660037994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1524 3.9446409791707993e-02</internalNodes>\n          <leafValues>\n            2.5543639436364174e-02 -1.1460640281438828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1525 -8.2465475425124168e-03</internalNodes>\n          <leafValues>\n            2.4008710682392120e-01 -5.1680248230695724e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1526 3.5262361168861389e-02</internalNodes>\n          <leafValues>\n            -3.3555049449205399e-02 2.0575499534606934e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1527 1.1703060008585453e-02</internalNodes>\n          <leafValues>\n            2.3529250174760818e-02 -4.9983900785446167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1528 4.2969968169927597e-02</internalNodes>\n          <leafValues>\n            -1.2683330103754997e-02 5.4043388366699219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1529 -1.5811799094080925e-02</internalNodes>\n          <leafValues>\n            3.9564150571823120e-01 -3.5568390041589737e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1530 4.6253358013927937e-03</internalNodes>\n          <leafValues>\n            5.2370540797710419e-02 -2.2989930212497711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1531 -1.5898230485618114e-03</internalNodes>\n          <leafValues>\n            1.3792009651660919e-01 -8.6783193051815033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1532 6.2329089269042015e-04</internalNodes>\n          <leafValues>\n            -8.6643829941749573e-02 5.7710029184818268e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1533 7.0994929410517216e-03</internalNodes>\n          <leafValues>\n            7.5797617435455322e-02 -1.6898870468139648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1534 6.9608777761459351e-02</internalNodes>\n          <leafValues>\n            -1.2454699724912643e-02 2.0845200121402740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1535 -1.8759520724415779e-02</internalNodes>\n          <leafValues>\n            -5.5008620023727417e-01 2.1040279418230057e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1536 4.6513788402080536e-02</internalNodes>\n          <leafValues>\n            -2.5904009118676186e-02 1.8322019279003143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1537 2.1638579666614532e-02</internalNodes>\n          <leafValues>\n            -3.8873910903930664e-02 2.9919698834419250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1538 -7.6772570610046387e-02</internalNodes>\n          <leafValues>\n            -1. 3.9020550902932882e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1539 4.0535528212785721e-02</internalNodes>\n          <leafValues>\n            1.8880680203437805e-02 -6.6033887863159180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1540 4.0338758379220963e-02</internalNodes>\n          <leafValues>\n            9.2877401039004326e-03 -3.4422031044960022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1541 4.3404240161180496e-02</internalNodes>\n          <leafValues>\n            -2.2111779078841209e-02 5.1227712631225586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1542 1.6895130276679993e-02</internalNodes>\n          <leafValues>\n            3.0058480799198151e-02 -1.8648600578308105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1543 3.0269259586930275e-03</internalNodes>\n          <leafValues>\n            -1.3979099690914154e-01 8.7544560432434082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1544 -3.7171840667724609e-01</internalNodes>\n          <leafValues>\n            -2.9676678776741028e-01 1.6241550445556641e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1545 -2.5798739865422249e-02</internalNodes>\n          <leafValues>\n            -4.3713501095771790e-01 2.6768149808049202e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1546 -9.0826600790023804e-03</internalNodes>\n          <leafValues>\n            9.9548496305942535e-02 -3.8500539958477020e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1547 -1.7977179959416389e-03</internalNodes>\n          <leafValues>\n            1.3810199499130249e-01 -7.5387232005596161e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1548 1.2435699999332428e-01</internalNodes>\n          <leafValues>\n            4.6064029447734356e-03 -3.6909800767898560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1549 -1.2901489622890949e-02</internalNodes>\n          <leafValues>\n            -2.0433300733566284e-01 5.3133610635995865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1550 -1.3352099806070328e-02</internalNodes>\n          <leafValues>\n            -1.0512170195579529e-01 5.9746239334344864e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1551 -3.0650520697236061e-02</internalNodes>\n          <leafValues>\n            3.4366500377655029e-01 -3.9617810398340225e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1552 2.0778391044586897e-03</internalNodes>\n          <leafValues>\n            -5.0755288451910019e-02 7.2930753231048584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1553 -6.1161179095506668e-02</internalNodes>\n          <leafValues>\n            7.8371667861938477e-01 -1.3940130360424519e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1554 -6.6681973636150360e-02</internalNodes>\n          <leafValues>\n            -6.7010307312011719e-01 4.2770858854055405e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1555 2.7359850704669952e-02</internalNodes>\n          <leafValues>\n            2.4253180250525475e-02 -4.2671859264373779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1556 -2.4731201119720936e-03</internalNodes>\n          <leafValues>\n            9.6493236720561981e-02 -5.7433839887380600e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1557 -1.0721489787101746e-02</internalNodes>\n          <leafValues>\n            -2.1575610339641571e-01 4.4256970286369324e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1558 -1.3936980068683624e-01</internalNodes>\n          <leafValues>\n            -3.6377531290054321e-01 1.0005139745771885e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1559 -5.6867711246013641e-02</internalNodes>\n          <leafValues>\n            3.0327269434928894e-01 -3.7230789661407471e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1560 -6.5776512026786804e-02</internalNodes>\n          <leafValues>\n            -1. 1.2443619780242443e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1561 -1.5500129666179419e-03</internalNodes>\n          <leafValues>\n            1.2898580729961395e-01 -8.5528247058391571e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1562 8.7909551803022623e-04</internalNodes>\n          <leafValues>\n            -7.9906381666660309e-02 1.2847130000591278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1563 2.9614660888910294e-03</internalNodes>\n          <leafValues>\n            8.9433841407299042e-02 -1.7047980427742004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1564 -5.0735038518905640e-01</internalNodes>\n          <leafValues>\n            -8.4197628498077393e-01 2.3592109791934490e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1565 3.5409200936555862e-02</internalNodes>\n          <leafValues>\n            1.7137490212917328e-02 -5.9052079916000366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1566 -4.6220239251852036e-02</internalNodes>\n          <leafValues>\n            4.7383689880371094e-01 -1.1423089541494846e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1567 4.0875099599361420e-02</internalNodes>\n          <leafValues>\n            -2.6714079082012177e-02 4.2139878869056702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1568 -5.7651810348033905e-02</internalNodes>\n          <leafValues>\n            5.6021291017532349e-01 -9.5757292583584785e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1569 3.3733060117810965e-03</internalNodes>\n          <leafValues>\n            7.2323620319366455e-02 -1.5510480105876923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1570 -3.4096160531044006e-01</internalNodes>\n          <leafValues>\n            -1. -3.1605950789526105e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1571 -5.5850511416792870e-03</internalNodes>\n          <leafValues>\n            -1.5768070518970490e-01 7.3625743389129639e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1572 -1.1067239940166473e-01</internalNodes>\n          <leafValues>\n            2.3640440404415131e-01 -1.2670779600739479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1573 4.3246410787105560e-02</internalNodes>\n          <leafValues>\n            -4.9346420913934708e-02 3.0113101005554199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1574 -5.8916499838232994e-03</internalNodes>\n          <leafValues>\n            -1.4727650582790375e-01 6.1345700174570084e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1575 -2.8674090572167188e-05</internalNodes>\n          <leafValues>\n            1.1539240181446075e-01 -1.4692650735378265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1576 2.6174910366535187e-02</internalNodes>\n          <leafValues>\n            -2.2960580885410309e-02 2.1004410088062286e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1577 -1.9902619533240795e-03</internalNodes>\n          <leafValues>\n            9.7250632941722870e-02 -1.3244929909706116e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1578 -1.6960840672254562e-02</internalNodes>\n          <leafValues>\n            -3.1949061155319214e-01 3.6188289523124695e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1579 -1.5634739398956299e-01</internalNodes>\n          <leafValues>\n            3.1934529542922974e-01 -4.1917070746421814e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1580 -2.3863950371742249e-01</internalNodes>\n          <leafValues>\n            3.8183578848838806e-01 -8.6567532271146774e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1581 -7.7641502022743225e-02</internalNodes>\n          <leafValues>\n            -3.3156651258468628e-01 3.3491149544715881e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1582 -4.5257899910211563e-02</internalNodes>\n          <leafValues>\n            4.6058529615402222e-01 -3.1354859471321106e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1583 -3.3390790224075317e-02</internalNodes>\n          <leafValues>\n            -7.2974747419357300e-01 1.6206990927457809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1584 7.3079466819763184e-02</internalNodes>\n          <leafValues>\n            -1.9201450049877167e-02 3.4011909365653992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1585 -5.4536230862140656e-02</internalNodes>\n          <leafValues>\n            3.3227160573005676e-01 -3.3163428306579590e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1586 3.9552688598632812e-02</internalNodes>\n          <leafValues>\n            1.1817559599876404e-02 -3.2131719589233398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1587 5.9160130331292748e-04</internalNodes>\n          <leafValues>\n            -1.1766350269317627e-01 8.8002361357212067e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1588 3.5379730165004730e-02</internalNodes>\n          <leafValues>\n            1.8286190927028656e-02 -1.6206890344619751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1589 2.0152490586042404e-02</internalNodes>\n          <leafValues>\n            2.2825939580798149e-02 -4.3034788966178894e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1590 -2.9185289517045021e-02</internalNodes>\n          <leafValues>\n            1.8256959319114685e-01 -1.6376309096813202e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1591 -2.1705780178308487e-02</internalNodes>\n          <leafValues>\n            -6.6977721452713013e-01 1.6782360151410103e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1592 4.2584270238876343e-02</internalNodes>\n          <leafValues>\n            -1.6852499917149544e-02 3.4360399842262268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1593 -1.2663739919662476e-01</internalNodes>\n          <leafValues>\n            2.6748588681221008e-01 -3.6107789725065231e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1594 1.4260070025920868e-01</internalNodes>\n          <leafValues>\n            1.4445270411670208e-02 -1.9729509949684143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1595 5.3560931235551834e-02</internalNodes>\n          <leafValues>\n            1.7324799671769142e-02 -5.9609222412109375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1596 -5.9380959719419479e-03</internalNodes>\n          <leafValues>\n            -6.5156273543834686e-02 5.9645600616931915e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1597 -6.6497321240603924e-03</internalNodes>\n          <leafValues>\n            1.4270019531250000e-01 -7.9669818282127380e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1598 -3.0137640424072742e-03</internalNodes>\n          <leafValues>\n            1.3996289670467377e-01 -9.4831757247447968e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1599 -1.7213050276041031e-02</internalNodes>\n          <leafValues>\n            -1.7265740036964417e-01 6.9451652467250824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1600 1.0775709897279739e-01</internalNodes>\n          <leafValues>\n            -4.6757548116147518e-03 9.2161870002746582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1601 5.8738540858030319e-02</internalNodes>\n          <leafValues>\n            -4.2458981275558472e-02 2.8832349181175232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1602 -3.0475479364395142e-01</internalNodes>\n          <leafValues>\n            -1. 2.6918480216409080e-05</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1603 2.0395779609680176e-01</internalNodes>\n          <leafValues>\n            2.5317989289760590e-02 -5.0275158882141113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1604 -9.7794281318783760e-03</internalNodes>\n          <leafValues>\n            -1.9060879945755005e-01 3.0577139928936958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1605 -2.2775499150156975e-02</internalNodes>\n          <leafValues>\n            2.7048370242118835e-01 -5.1001209765672684e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1606 9.8080374300479889e-03</internalNodes>\n          <leafValues>\n            2.4180250242352486e-02 -7.5000837445259094e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1607 -1.1130969971418381e-02</internalNodes>\n          <leafValues>\n            -2.3825749754905701e-01 6.4388722181320190e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>123</maxWeakCount>\n      <stageThreshold>-6.5824240446090698e-01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1608 -2.1380689740180969e-01</internalNodes>\n          <leafValues>\n            2.7686640620231628e-01 -9.2777818441390991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1609 -3.3374479971826077e-03</internalNodes>\n          <leafValues>\n            1.4119230210781097e-01 -5.1907159388065338e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1610 -2.8738550841808319e-02</internalNodes>\n          <leafValues>\n            -3.6243250966072083e-01 3.1938020139932632e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1611 -3.5554158966988325e-03</internalNodes>\n          <leafValues>\n            1.1969120055437088e-01 -5.2306748926639557e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1612 -1.0732459835708141e-02</internalNodes>\n          <leafValues>\n            2.8602668642997742e-01 -6.0555059462785721e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1613 8.7310239672660828e-02</internalNodes>\n          <leafValues>\n            -3.3613391220569611e-02 4.7786781191825867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1614 2.1971999667584896e-03</internalNodes>\n          <leafValues>\n            6.0207970440387726e-02 -2.1543750166893005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1615 -7.4302748544141650e-05</internalNodes>\n          <leafValues>\n            1.4141289889812469e-01 -1.2711560726165771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1616 -2.9314011335372925e-01</internalNodes>\n          <leafValues>\n            -5.5598288774490356e-01 7.8105749562382698e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1617 7.7996537089347839e-02</internalNodes>\n          <leafValues>\n            -2.0238140597939491e-02 2.2233769297599792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1618 4.9733570776879787e-03</internalNodes>\n          <leafValues>\n            -1.5410329401493073e-01 9.8874516785144806e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1619 -6.2232650816440582e-02</internalNodes>\n          <leafValues>\n            -2.5253909826278687e-01 2.5864329189062119e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1620 -7.4750548228621483e-03</internalNodes>\n          <leafValues>\n            -1.9071790575981140e-01 8.4528200328350067e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1621 2.2246010601520538e-02</internalNodes>\n          <leafValues>\n            -3.1024629250168800e-02 1.5289239585399628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1622 -1.2305259704589844e-02</internalNodes>\n          <leafValues>\n            1.1693249642848969e-01 -1.1092559993267059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1623 -1.3985290424898267e-03</internalNodes>\n          <leafValues>\n            -2.0435670018196106e-01 8.7592259049415588e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1624 3.6361250281333923e-01</internalNodes>\n          <leafValues>\n            -1.8750319257378578e-02 8.5054528713226318e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1625 -3.8815739098936319e-03</internalNodes>\n          <leafValues>\n            8.0643877387046814e-02 -1.0520999878644943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1626 -5.2500631660223007e-02</internalNodes>\n          <leafValues>\n            3.8002520799636841e-01 -3.6049079149961472e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1627 -7.9602311598137021e-04</internalNodes>\n          <leafValues>\n            3.3794969320297241e-02 -7.5603879988193512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1628 -2.0066089928150177e-02</internalNodes>\n          <leafValues>\n            -4.3842989206314087e-01 3.3389199525117874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1629 -2.4233239237219095e-03</internalNodes>\n          <leafValues>\n            -9.3005247414112091e-02 4.9772828817367554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1630 -6.8737422116100788e-03</internalNodes>\n          <leafValues>\n            2.0374830067157745e-01 -5.8165848255157471e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1631 6.5535600297152996e-03</internalNodes>\n          <leafValues>\n            -7.0293396711349487e-02 1.4400149881839752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1632 -1.6780680045485497e-02</internalNodes>\n          <leafValues>\n            -3.2226520776748657e-01 4.3717250227928162e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1633 2.5448070839047432e-02</internalNodes>\n          <leafValues>\n            4.3461918830871582e-02 -1.5376989543437958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1634 3.4656568896025419e-03</internalNodes>\n          <leafValues>\n            -6.3119992613792419e-02 2.1394529938697815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1635 1.0132250189781189e-01</internalNodes>\n          <leafValues>\n            -1.7095830291509628e-02 1.8853299319744110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1636 1.0714309662580490e-01</internalNodes>\n          <leafValues>\n            3.5406891256570816e-02 -3.4869039058685303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1637 -1.4500999823212624e-02</internalNodes>\n          <leafValues>\n            3.7903580814599991e-02 -4.9169208854436874e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1638 -1.5354759991168976e-01</internalNodes>\n          <leafValues>\n            3.5048320889472961e-01 -3.2774008810520172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1639 -6.5137587487697601e-02</internalNodes>\n          <leafValues>\n            -4.1380020976066589e-01 7.3137627914547920e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1640 -2.9204839374870062e-03</internalNodes>\n          <leafValues>\n            -1.3756680488586426e-01 9.0795390307903290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1641 -3.4104570746421814e-01</internalNodes>\n          <leafValues>\n            -6.7252027988433838e-01 1.5200230292975903e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1642 -4.4478259951574728e-05</internalNodes>\n          <leafValues>\n            9.6579946577548981e-02 -1.0403420031070709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1643 -1.1172229796648026e-01</internalNodes>\n          <leafValues>\n            -4.2234420776367188e-01 4.9457307904958725e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1644 2.0429869182407856e-03</internalNodes>\n          <leafValues>\n            9.9474698305130005e-02 -1.0384540259838104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1645 -7.2571309283375740e-03</internalNodes>\n          <leafValues>\n            -1.5049630403518677e-01 2.9724840074777603e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1646 -8.4451176226139069e-03</internalNodes>\n          <leafValues>\n            9.5648579299449921e-02 -1.1805369704961777e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1647 -3.0194969847798347e-02</internalNodes>\n          <leafValues>\n            4.6570628881454468e-01 -1.4386899769306183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1648 5.7423918042331934e-04</internalNodes>\n          <leafValues>\n            -1.0382310301065445e-01 1.5052829682826996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1649 8.2014611689373851e-04</internalNodes>\n          <leafValues>\n            -7.5132526457309723e-02 1.0363759845495224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1650 7.0748180150985718e-03</internalNodes>\n          <leafValues>\n            6.6062167286872864e-02 -1.7638419568538666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1651 4.8304669559001923e-02</internalNodes>\n          <leafValues>\n            -1.7767660319805145e-02 2.6820158958435059e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1652 7.9041812568902969e-03</internalNodes>\n          <leafValues>\n            5.1522739231586456e-02 -2.0632369816303253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1653 8.4705486893653870e-02</internalNodes>\n          <leafValues>\n            7.2250380180776119e-03 -5.9514737129211426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1654 3.9120440487749875e-04</internalNodes>\n          <leafValues>\n            -1.0663530230522156e-01 1.1103810369968414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1655 1.5959320589900017e-02</internalNodes>\n          <leafValues>\n            -4.8573691397905350e-02 2.5832009315490723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1656 -1.8649259582161903e-03</internalNodes>\n          <leafValues>\n            1.1551269888877869e-01 -1.5048590302467346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1657 1.2727979570627213e-02</internalNodes>\n          <leafValues>\n            4.7930240631103516e-02 -3.0310231447219849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1658 -1.5954229747876525e-03</internalNodes>\n          <leafValues>\n            -1.5537570416927338e-01 8.3214886486530304e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1659 2.0234890282154083e-01</internalNodes>\n          <leafValues>\n            1.1625860352069139e-03 -1.0000209808349609e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1660 -3.9196871221065521e-02</internalNodes>\n          <leafValues>\n            3.0884549021720886e-01 -4.4524021446704865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1661 1.5810640528798103e-02</internalNodes>\n          <leafValues>\n            -1.5927329659461975e-02 1.0144449770450592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1662 -2.1568681113421917e-03</internalNodes>\n          <leafValues>\n            9.5205381512641907e-02 -1.2910960614681244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1663 -3.4604359418153763e-02</internalNodes>\n          <leafValues>\n            2.7843558788299561e-01 -1.0775060392916203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1664 -2.6206790935248137e-03</internalNodes>\n          <leafValues>\n            -1.3744530081748962e-01 9.2945456504821777e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1665 4.6692821197211742e-03</internalNodes>\n          <leafValues>\n            -5.8331821113824844e-02 1.5733839571475983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1666 7.8623533248901367e-02</internalNodes>\n          <leafValues>\n            1.1130830273032188e-02 -9.7138148546218872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1667 3.9556730538606644e-02</internalNodes>\n          <leafValues>\n            2.1708509884774685e-03 -4.3425449728965759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1668 4.0571438148617744e-03</internalNodes>\n          <leafValues>\n            8.6120717227458954e-02 -1.5579399466514587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1669 -1.5014669857919216e-02</internalNodes>\n          <leafValues>\n            1.3523979485034943e-01 -2.5724019855260849e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1670 4.6183250378817320e-04</internalNodes>\n          <leafValues>\n            -1.0766889899969101e-01 1.3633869588375092e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1671 5.2875209599733353e-02</internalNodes>\n          <leafValues>\n            5.4555749520659447e-03 -3.9382910728454590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1672 -5.9510860592126846e-02</internalNodes>\n          <leafValues>\n            2.8690820932388306e-01 -4.2876079678535461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1673 1.6650360077619553e-02</internalNodes>\n          <leafValues>\n            2.8605299070477486e-02 -3.0349490046501160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1674 1.4959629625082016e-02</internalNodes>\n          <leafValues>\n            -5.2699029445648193e-02 2.1825259923934937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1675 -9.6224267035722733e-03</internalNodes>\n          <leafValues>\n            -2.1431450545787811e-01 4.8350628465414047e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1676 -4.5304261147975922e-02</internalNodes>\n          <leafValues>\n            -8.7308478355407715e-01 1.2449770234525204e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1677 -7.4465242214500904e-03</internalNodes>\n          <leafValues>\n            -1.3586209714412689e-01 3.3087320625782013e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1678 -1.1953880311921239e-03</internalNodes>\n          <leafValues>\n            1.4848570525646210e-01 -8.5291646420955658e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1679 5.6622507981956005e-03</internalNodes>\n          <leafValues>\n            -5.3212448954582214e-02 1.2967950105667114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1680 1.3971360400319099e-02</internalNodes>\n          <leafValues>\n            2.5338830426335335e-02 -4.2097410559654236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1681 -4.5216218568384647e-03</internalNodes>\n          <leafValues>\n            1.2621529400348663e-01 -6.3135430216789246e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1682 4.7776158899068832e-03</internalNodes>\n          <leafValues>\n            -6.2899917364120483e-02 1.7724449932575226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1683 -5.8305878192186356e-03</internalNodes>\n          <leafValues>\n            8.7906002998352051e-02 -1.5553380548954010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1684 -1.5879280865192413e-02</internalNodes>\n          <leafValues>\n            -1.2694430351257324e-01 1.0280299931764603e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1685 1.9526369869709015e-03</internalNodes>\n          <leafValues>\n            -7.6803453266620636e-02 4.7297749668359756e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1686 2.4521650746464729e-02</internalNodes>\n          <leafValues>\n            -2.7714680880308151e-02 4.0350469946861267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1687 -8.4529399871826172e-02</internalNodes>\n          <leafValues>\n            1. -2.1367999725043774e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1688 1.6844070050865412e-03</internalNodes>\n          <leafValues>\n            7.4043400585651398e-02 -1.6334819793701172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1689 1.3399059884250164e-02</internalNodes>\n          <leafValues>\n            -4.2453180998563766e-02 2.4164129793643951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1690 4.4182639569044113e-02</internalNodes>\n          <leafValues>\n            1.8039569258689880e-02 -6.4396840333938599e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1691 3.8327239453792572e-02</internalNodes>\n          <leafValues>\n            7.5849238783121109e-03 -3.6534211039543152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1692 2.5997089687734842e-03</internalNodes>\n          <leafValues>\n            -8.8553480803966522e-02 1.3763660192489624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1693 1.0775480419397354e-02</internalNodes>\n          <leafValues>\n            4.5753169804811478e-02 -1.1956000328063965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1694 -2.0433649420738220e-02</internalNodes>\n          <leafValues>\n            2.2020170092582703e-01 -5.1925841718912125e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1695 -1.2402729690074921e-01</internalNodes>\n          <leafValues>\n            8.8846582174301147e-01 -5.1234480924904346e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1696 4.7838478349149227e-03</internalNodes>\n          <leafValues>\n            5.3047031164169312e-02 -2.1085900068283081e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1697 -4.5895349234342575e-02</internalNodes>\n          <leafValues>\n            4.4482690095901489e-01 -1.5117119997739792e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1698 1.4473790302872658e-02</internalNodes>\n          <leafValues>\n            -4.5201409608125687e-02 2.3556250333786011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1699 1.8887920305132866e-03</internalNodes>\n          <leafValues>\n            7.6443381607532501e-02 -1.6385370492935181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1700 -1.9082069396972656e-01</internalNodes>\n          <leafValues>\n            6.4662021398544312e-01 -1.8242619931697845e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1701 7.2158463299274445e-02</internalNodes>\n          <leafValues>\n            6.2836478464305401e-03 -7.4822348356246948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1702 9.7802944947034121e-04</internalNodes>\n          <leafValues>\n            7.9063102602958679e-02 -1.3163650035858154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1703 4.8602250171825290e-04</internalNodes>\n          <leafValues>\n            -4.2594909667968750e-02 6.9462761282920837e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1704 -1.0882800444960594e-02</internalNodes>\n          <leafValues>\n            -2.4503070116043091e-01 5.2326161414384842e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1705 1.1573769734241068e-04</internalNodes>\n          <leafValues>\n            -6.6729307174682617e-02 8.7088912725448608e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1706 2.0960739348083735e-03</internalNodes>\n          <leafValues>\n            -7.6154567301273346e-02 1.3598169386386871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1707 4.3664351105690002e-02</internalNodes>\n          <leafValues>\n            8.4812156856060028e-03 -8.1097167730331421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1708 -1.1464370181784034e-03</internalNodes>\n          <leafValues>\n            1.2721230089664459e-01 -8.4783419966697693e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1709 -5.5613541044294834e-03</internalNodes>\n          <leafValues>\n            -1.9722530245780945e-01 5.4411068558692932e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1710 3.4083850681781769e-02</internalNodes>\n          <leafValues>\n            -3.2338548451662064e-02 3.4062281250953674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1711 5.1227081567049026e-02</internalNodes>\n          <leafValues>\n            -1.3262039981782436e-02 2.3953630030155182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1712 3.3531729131937027e-02</internalNodes>\n          <leafValues>\n            2.0279919728636742e-02 -4.8339051008224487e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1713 1.5396219678223133e-02</internalNodes>\n          <leafValues>\n            -2.9320189729332924e-02 1.5866099298000336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1714 -1.7550770193338394e-02</internalNodes>\n          <leafValues>\n            2.7488970756530762e-01 -3.7798319011926651e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1715 -7.5705647468566895e-02</internalNodes>\n          <leafValues>\n            -8.2214397192001343e-01 3.8814740255475044e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1716 -5.3475350141525269e-03</internalNodes>\n          <leafValues>\n            -1.6710759699344635e-01 7.7180616557598114e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1717 -3.3435279037803411e-03</internalNodes>\n          <leafValues>\n            -1.0673490166664124e-01 4.7575470060110092e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1718 1.9328270107507706e-02</internalNodes>\n          <leafValues>\n            -4.6563290059566498e-02 2.4716560542583466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1719 8.5368983447551727e-02</internalNodes>\n          <leafValues>\n            2.3296920582652092e-02 -5.0002247095108032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1720 2.5927850510925055e-03</internalNodes>\n          <leafValues>\n            -1.1182250082492828e-01 1.1046089977025986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1721 -9.1061238199472427e-03</internalNodes>\n          <leafValues>\n            4.7107011079788208e-02 -5.5807661265134811e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1722 1.0170699656009674e-01</internalNodes>\n          <leafValues>\n            -1.5966609120368958e-02 6.9857317209243774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1723 2.2854980081319809e-02</internalNodes>\n          <leafValues>\n            -1.7226219177246094e-02 1.2225689738988876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1724 -1.6577079892158508e-02</internalNodes>\n          <leafValues>\n            -2.2225829958915710e-01 5.6578300893306732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1725 -2.3641420528292656e-02</internalNodes>\n          <leafValues>\n            -2.7734050154685974e-01 1.6076890751719475e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1726 5.6385230273008347e-03</internalNodes>\n          <leafValues>\n            4.5439280569553375e-02 -2.2549630701541901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1727 5.7422029785811901e-03</internalNodes>\n          <leafValues>\n            -7.8568778932094574e-02 1.5234960615634918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1728 -4.3363519944250584e-04</internalNodes>\n          <leafValues>\n            9.5920950174331665e-02 -1.1274240165948868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1729 1.0267919860780239e-02</internalNodes>\n          <leafValues>\n            -4.9332991242408752e-02 2.4810829758644104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1730 1.3865719549357891e-02</internalNodes>\n          <leafValues>\n            7.0547938346862793e-02 -1.8594330549240112e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>127</maxWeakCount>\n      <stageThreshold>-3.0620599746704102e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1731 -4.6980630606412888e-02</internalNodes>\n          <leafValues>\n            1.7078550159931183e-01 -1.5687310695648193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1732 -1.1967960000038147e-01</internalNodes>\n          <leafValues>\n            5.1738417148590088e-01 -1.1747590266168118e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1733 -2.8477180749177933e-02</internalNodes>\n          <leafValues>\n            2.3505200445652008e-01 -5.7424411177635193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1734 1.9697479903697968e-01</internalNodes>\n          <leafValues>\n            -9.3123828992247581e-04 1.0037239789962769e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1735 7.9039083793759346e-03</internalNodes>\n          <leafValues>\n            8.3357498049736023e-02 -1.6527499258518219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1736 3.9338979870080948e-02</internalNodes>\n          <leafValues>\n            -6.5605872077867389e-04 3.2361468672752380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1737 -1.5762429684400558e-03</internalNodes>\n          <leafValues>\n            9.1129466891288757e-02 -1.4164330065250397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1738 2.0851049339398742e-04</internalNodes>\n          <leafValues>\n            -1.3802680373191833e-01 7.7212989330291748e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1739 -2.6843539671972394e-04</internalNodes>\n          <leafValues>\n            1.3646720349788666e-01 -9.4255752861499786e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1740 8.8506387546658516e-03</internalNodes>\n          <leafValues>\n            2.4603420868515968e-02 -1.6884680092334747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1741 -8.4813922876492143e-04</internalNodes>\n          <leafValues>\n            -1.3972400128841400e-01 1.1566729843616486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1742 -3.7090150726726279e-05</internalNodes>\n          <leafValues>\n            7.5284272432327271e-02 -1.7708149552345276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1743 -2.1533910185098648e-02</internalNodes>\n          <leafValues>\n            2.0233030617237091e-01 -6.6978476941585541e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1744 1.1713660322129726e-02</internalNodes>\n          <leafValues>\n            8.6853489279747009e-02 -1.1251810193061829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1745 -9.8365638405084610e-03</internalNodes>\n          <leafValues>\n            3.0164790153503418e-01 -5.0179660320281982e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1746 -6.2104999087750912e-03</internalNodes>\n          <leafValues>\n            6.8224228918552399e-02 -9.4441823661327362e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1747 -2.0034300163388252e-02</internalNodes>\n          <leafValues>\n            -2.8657549619674683e-01 4.5728500932455063e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1748 -2.2154829639475793e-04</internalNodes>\n          <leafValues>\n            7.1603760123252869e-02 -8.7115049362182617e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1749 -5.2436119876801968e-03</internalNodes>\n          <leafValues>\n            1.3439500331878662e-01 -9.0288907289505005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1750 -1.1711229570209980e-02</internalNodes>\n          <leafValues>\n            1.4874699711799622e-01 -2.5951780378818512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1751 5.8587929233908653e-03</internalNodes>\n          <leafValues>\n            -6.6982023417949677e-02 1.8096329271793365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1752 1.0432569682598114e-01</internalNodes>\n          <leafValues>\n            1.0209330357611179e-02 -7.9540812969207764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1753 -1.7049130052328110e-02</internalNodes>\n          <leafValues>\n            -2.0516310632228851e-01 6.4470991492271423e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1754 2.5877699255943298e-02</internalNodes>\n          <leafValues>\n            -3.0079720541834831e-02 1.6041970252990723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1755 -4.0637338533997536e-03</internalNodes>\n          <leafValues>\n            1.0870960354804993e-01 -1.1665400117635727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1756 -1.9286720082163811e-02</internalNodes>\n          <leafValues>\n            -1.2503950297832489e-01 2.8055189177393913e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1757 -7.2130301305151079e-06</internalNodes>\n          <leafValues>\n            1.1845260113477707e-01 -1.2367019802331924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1758 -2.6098350062966347e-03</internalNodes>\n          <leafValues>\n            -1.4498670399188995e-01 8.2318760454654694e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1759 3.2303779153153300e-04</internalNodes>\n          <leafValues>\n            -9.5855496823787689e-02 1.1992660164833069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1760 -1.1308960383757949e-03</internalNodes>\n          <leafValues>\n            1.2882959842681885e-01 -8.2697473466396332e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1761 1.7176469787955284e-02</internalNodes>\n          <leafValues>\n            3.6024659872055054e-02 -3.0873811244964600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1762 -1.0515330359339714e-02</internalNodes>\n          <leafValues>\n            9.6330337226390839e-02 -1.0785780102014542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1763 5.0583500415086746e-02</internalNodes>\n          <leafValues>\n            -3.4715801477432251e-02 4.5134508609771729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1764 8.7582931155338883e-04</internalNodes>\n          <leafValues>\n            -9.5677152276039124e-02 7.3631688952445984e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1765 -3.1957220286130905e-02</internalNodes>\n          <leafValues>\n            -3.1473490595817566e-01 3.6329280585050583e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1766 5.9863331262022257e-04</internalNodes>\n          <leafValues>\n            -4.2676690965890884e-02 5.4342899471521378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1767 -6.6270949319005013e-03</internalNodes>\n          <leafValues>\n            7.3510922491550446e-02 -1.7309080064296722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1768 -7.3186516761779785e-02</internalNodes>\n          <leafValues>\n            6.8777692317962646e-01 -5.6781149469316006e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1769 2.0290840417146683e-02</internalNodes>\n          <leafValues>\n            -4.0720541030168533e-02 3.0450868606567383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1770 -3.0989840161055326e-03</internalNodes>\n          <leafValues>\n            -1.2787370383739471e-01 5.4329689592123032e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1771 -1.1258859885856509e-03</internalNodes>\n          <leafValues>\n            1.1980079859495163e-01 -8.3477236330509186e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1772 3.9993048994801939e-04</internalNodes>\n          <leafValues>\n            -9.5427073538303375e-02 7.6952911913394928e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1773 1.1202540248632431e-02</internalNodes>\n          <leafValues>\n            2.5125309824943542e-02 -4.0314701199531555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1774 -2.1753970533609390e-02</internalNodes>\n          <leafValues>\n            -2.3042400181293488e-01 1.5338519588112831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1775 7.6912459917366505e-05</internalNodes>\n          <leafValues>\n            -9.5581486821174622e-02 1.0388170182704926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1776 9.1011539101600647e-02</internalNodes>\n          <leafValues>\n            -8.7168300524353981e-03 7.5593751668930054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1777 -4.3160789646208286e-03</internalNodes>\n          <leafValues>\n            1.3494439423084259e-01 -7.0152096450328827e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1778 -5.0581190735101700e-02</internalNodes>\n          <leafValues>\n            -6.6112691164016724e-01 2.2676400840282440e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1779 -8.3926003426313400e-03</internalNodes>\n          <leafValues>\n            -1.2883609533309937e-01 7.7920481562614441e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1780 5.5040661245584488e-02</internalNodes>\n          <leafValues>\n            7.7853789553046227e-03 -2.7820050716400146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1781 -4.1862551122903824e-02</internalNodes>\n          <leafValues>\n            4.3335449695587158e-01 -2.9194639995694160e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1782 -7.4230520986020565e-03</internalNodes>\n          <leafValues>\n            1.3154500722885132e-01 -3.2047510147094727e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1783 1.9948489498347044e-03</internalNodes>\n          <leafValues>\n            8.3299688994884491e-02 -1.1662559956312180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1784 4.1851431131362915e-02</internalNodes>\n          <leafValues>\n            4.1461169719696045e-02 -1.2815159559249878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1785 2.7844381332397461e-01</internalNodes>\n          <leafValues>\n            -2.2612810134887695e-02 5.2236318588256836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1786 -7.1095931343734264e-03</internalNodes>\n          <leafValues>\n            1.2902510166168213e-01 -2.7944799512624741e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1787 1.1175610125064850e-02</internalNodes>\n          <leafValues>\n            5.1366660743951797e-02 -1.9559539854526520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1788 -1.0364210233092308e-02</internalNodes>\n          <leafValues>\n            -7.2631381452083588e-02 1.5199509263038635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1789 -9.4094304367899895e-03</internalNodes>\n          <leafValues>\n            -2.0993369817733765e-01 5.3346861153841019e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1790 -1.0375010222196579e-01</internalNodes>\n          <leafValues>\n            -3.3693191409111023e-01 3.9442018605768681e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1791 -9.5977628370746970e-04</internalNodes>\n          <leafValues>\n            1.0307610034942627e-01 -1.0574100166559219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1792 -5.5816810578107834e-02</internalNodes>\n          <leafValues>\n            2.6074001193046570e-01 -4.4885180890560150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1793 -1.3430939614772797e-01</internalNodes>\n          <leafValues>\n            -8.1660747528076172e-01 1.5410860069096088e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1794 6.0456950217485428e-02</internalNodes>\n          <leafValues>\n            -3.0265029054135084e-03 -9.9991780519485474e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1795 2.4359079077839851e-02</internalNodes>\n          <leafValues>\n            2.4191310629248619e-02 -4.6632158756256104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1796 5.2735779434442520e-02</internalNodes>\n          <leafValues>\n            -2.4266760796308517e-02 2.1460479497909546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1797 -5.5626039393246174e-03</internalNodes>\n          <leafValues>\n            1.0879939794540405e-01 -1.2120909988880157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1798 9.0855263173580170e-02</internalNodes>\n          <leafValues>\n            1.0956900223391131e-04 -9.9975770711898804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1799 -3.4681189805269241e-02</internalNodes>\n          <leafValues>\n            -4.5409980416297913e-01 2.3691149428486824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1800 -2.9579090551123954e-05</internalNodes>\n          <leafValues>\n            4.8031318932771683e-02 -4.9872968345880508e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1801 2.6277130469679832e-02</internalNodes>\n          <leafValues>\n            -2.9456760734319687e-02 3.3974370360374451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1802 -4.6276021748781204e-02</internalNodes>\n          <leafValues>\n            4.5496609807014465e-01 -1.0359579697251320e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1803 1.2048200005665421e-04</internalNodes>\n          <leafValues>\n            -1.0575199872255325e-01 1.0096730291843414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1804 6.8154390901327133e-03</internalNodes>\n          <leafValues>\n            2.8495609760284424e-02 -9.9765069782733917e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1805 1.6169620212167501e-03</internalNodes>\n          <leafValues>\n            -1.3256169855594635e-01 8.7828978896141052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1806 1.4563379809260368e-02</internalNodes>\n          <leafValues>\n            -4.3079901486635208e-02 2.5113260746002197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1807 2.0352909341454506e-02</internalNodes>\n          <leafValues>\n            3.9463639259338379e-02 -3.2518970966339111e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1808 -2.0789269357919693e-02</internalNodes>\n          <leafValues>\n            1.8993359804153442e-01 -2.1271999925374985e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1809 3.1780101358890533e-02</internalNodes>\n          <leafValues>\n            -2.3768220096826553e-02 4.3957829475402832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1810 1.2459229677915573e-01</internalNodes>\n          <leafValues>\n            6.5275398083031178e-03 -9.9991798400878906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1811 -8.4007039666175842e-02</internalNodes>\n          <leafValues>\n            -3.5620281100273132e-01 2.8916560113430023e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1812 9.6772145479917526e-03</internalNodes>\n          <leafValues>\n            6.4073942601680756e-02 -1.5482710301876068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1813 1.0405039787292480e-01</internalNodes>\n          <leafValues>\n            -2.2652050480246544e-02 5.7623207569122314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1814 4.0814410895109177e-02</internalNodes>\n          <leafValues>\n            -3.7368569523096085e-02 7.7298507094383240e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1815 -4.6916189789772034e-01</internalNodes>\n          <leafValues>\n            -7.7304631471633911e-01 1.3607080094516277e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1816 -1.3723419606685638e-01</internalNodes>\n          <leafValues>\n            -1. -1.7328710528090596e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1817 3.7569448351860046e-02</internalNodes>\n          <leafValues>\n            3.1412709504365921e-02 -3.5512429475784302e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1818 -1.2645379640161991e-02</internalNodes>\n          <leafValues>\n            -7.1322880685329437e-02 4.1889548301696777e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1819 3.9933860301971436e-02</internalNodes>\n          <leafValues>\n            -3.3447001129388809e-02 3.5932940244674683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1820 1.7207439988851547e-02</internalNodes>\n          <leafValues>\n            2.6126530021429062e-02 -7.7634379267692566e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1821 5.9702228754758835e-02</internalNodes>\n          <leafValues>\n            -2.3717980831861496e-02 5.7321798801422119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1822 7.9917803406715393e-02</internalNodes>\n          <leafValues>\n            -9.7547564655542374e-03 4.3467441201210022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1823 1.1351720243692398e-01</internalNodes>\n          <leafValues>\n            -3.8921970874071121e-02 2.6120808720588684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1824 4.8379451036453247e-01</internalNodes>\n          <leafValues>\n            7.8452667221426964e-03 -6.5024161338806152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1825 -1.0045070201158524e-01</internalNodes>\n          <leafValues>\n            -8.0072021484375000e-01 1.2250199913978577e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1826 2.7176019549369812e-01</internalNodes>\n          <leafValues>\n            4.4636582024395466e-03 -6.9393122196197510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1827 -1.2301249802112579e-01</internalNodes>\n          <leafValues>\n            3.2483839988708496e-01 -3.3841550350189209e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1828 6.1188749969005585e-02</internalNodes>\n          <leafValues>\n            7.1536018513143063e-03 -7.7817517518997192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1829 -7.8828241676092148e-03</internalNodes>\n          <leafValues>\n            -1.9754239916801453e-01 6.7795433104038239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1830 -2.5584879517555237e-01</internalNodes>\n          <leafValues>\n            -1. 1.4300020411610603e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1831 1.3098469376564026e-01</internalNodes>\n          <leafValues>\n            -1.6668310388922691e-02 7.4547207355499268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1832 -8.4553077816963196e-02</internalNodes>\n          <leafValues>\n            -6.3423901796340942e-01 8.3142798393964767e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1833 -8.8297717273235321e-02</internalNodes>\n          <leafValues>\n            -8.5705971717834473e-01 1.0549940168857574e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1834 -1.0374879837036133e-01</internalNodes>\n          <leafValues>\n            1.2073180079460144e-01 -2.2488579154014587e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1835 1.4872249448671937e-03</internalNodes>\n          <leafValues>\n            -1.1096440255641937e-01 1.0405410081148148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1836 2.1364030241966248e-01</internalNodes>\n          <leafValues>\n            7.3841079138219357e-03 -4.9760338664054871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1837 2.6294309645891190e-02</internalNodes>\n          <leafValues>\n            -6.3212700188159943e-02 2.6284760236740112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1838 -2.6777000166475773e-03</internalNodes>\n          <leafValues>\n            5.6488350033760071e-02 -1.0174310207366943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1839 -2.1261540241539478e-03</internalNodes>\n          <leafValues>\n            -1.6442880034446716e-01 6.6159963607788086e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1840 -8.2200914621353149e-03</internalNodes>\n          <leafValues>\n            -1.6132779419422150e-01 8.3515472710132599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1841 -1.1701880022883415e-02</internalNodes>\n          <leafValues>\n            2.1516199409961700e-01 -5.9116050601005554e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1842 -7.0460740244016051e-04</internalNodes>\n          <leafValues>\n            9.6142299473285675e-02 -1.3008759915828705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1843 -1.9671309273689985e-03</internalNodes>\n          <leafValues>\n            1.2605039775371552e-01 -8.8542640209197998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1844 -9.5004076138138771e-03</internalNodes>\n          <leafValues>\n            -2.3604579269886017e-01 4.5922629535198212e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1845 2.6802370324730873e-02</internalNodes>\n          <leafValues>\n            -4.8966769129037857e-02 2.3887130618095398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1846 2.2177420556545258e-02</internalNodes>\n          <leafValues>\n            -1.2560590170323849e-02 2.7084270119667053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1847 9.3382880091667175e-02</internalNodes>\n          <leafValues>\n            3.3835850656032562e-02 -3.9707890152931213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1848 -1.3151080347597599e-02</internalNodes>\n          <leafValues>\n            -1.1364260315895081e-01 2.5930739939212799e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1849 2.6929581072181463e-03</internalNodes>\n          <leafValues>\n            6.8202346563339233e-02 -1.6290910542011261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1850 -5.7519129477441311e-03</internalNodes>\n          <leafValues>\n            1.3197720050811768e-01 -5.7711899280548096e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1851 -1.1071159970015287e-03</internalNodes>\n          <leafValues>\n            1.4550089836120605e-01 -7.7300041913986206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1852 3.1805180013179779e-02</internalNodes>\n          <leafValues>\n            1.4181279577314854e-02 -2.1803429722785950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1853 4.0729498863220215e-01</internalNodes>\n          <leafValues>\n            -1.3772940263152122e-02 7.4853348731994629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1854 7.0173077285289764e-02</internalNodes>\n          <leafValues>\n            1.1535810306668282e-02 -8.6094629764556885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1855 -1.9437450100667775e-04</internalNodes>\n          <leafValues>\n            6.3009992241859436e-02 -1.5111440420150757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1856 3.9425559341907501e-02</internalNodes>\n          <leafValues>\n            2.4115329608321190e-02 -4.7253820300102234e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1857 2.6128459721803665e-03</internalNodes>\n          <leafValues>\n            5.3963150829076767e-02 -1.7429760098457336e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>152</maxWeakCount>\n      <stageThreshold>-3.0691600799560547e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1858 1.0468430072069168e-01</internalNodes>\n          <leafValues>\n            -4.7570109367370605e-02 4.2454048991203308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1859 -4.2946420609951019e-02</internalNodes>\n          <leafValues>\n            1.6328890621662140e-01 -1.2655169703066349e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1860 -8.1577729433774948e-03</internalNodes>\n          <leafValues>\n            1.0235799849033356e-01 -1.0876630246639252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1861 2.1813691128045321e-03</internalNodes>\n          <leafValues>\n            8.7985247373580933e-02 -5.5899761617183685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1862 -6.5157511271536350e-03</internalNodes>\n          <leafValues>\n            8.2863852381706238e-02 -1.3736319541931152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1863 2.4716500192880630e-02</internalNodes>\n          <leafValues>\n            1.6755210235714912e-02 1.3371250033378601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1864 -5.9396267170086503e-04</internalNodes>\n          <leafValues>\n            -1.3771370053291321e-01 1.0501290112733841e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1865 2.9373820871114731e-02</internalNodes>\n          <leafValues>\n            -4.4581398367881775e-02 4.2731860280036926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1866 -1.6576919704675674e-02</internalNodes>\n          <leafValues>\n            -2.9827460646629333e-01 2.9718369245529175e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1867 9.4569493085145950e-03</internalNodes>\n          <leafValues>\n            5.3616948425769806e-02 -7.6675526797771454e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1868 7.4581913650035858e-02</internalNodes>\n          <leafValues>\n            -4.6554408967494965e-02 3.0179610848426819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1869 -3.8055621087551117e-02</internalNodes>\n          <leafValues>\n            -2.8255119919776917e-01 2.0355690270662308e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1870 1.1065539903938770e-02</internalNodes>\n          <leafValues>\n            -5.3942598402500153e-02 2.3132629692554474e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1871 1.3538219965994358e-02</internalNodes>\n          <leafValues>\n            2.8102980926632881e-02 -2.1802890300750732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1872 4.6914750710129738e-03</internalNodes>\n          <leafValues>\n            6.3617020845413208e-02 -1.7460820078849792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1873 4.3054440617561340e-01</internalNodes>\n          <leafValues>\n            -2.1062379702925682e-02 5.7197797298431396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1874 1.4298999449238181e-03</internalNodes>\n          <leafValues>\n            -1.6780039668083191e-01 7.6851062476634979e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1875 2.7855230495333672e-02</internalNodes>\n          <leafValues>\n            -3.5647969692945480e-02 2.8956910967826843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1876 1.4391670003533363e-02</internalNodes>\n          <leafValues>\n            8.3300426602363586e-02 -1.2951320409774780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1877 -7.7637381851673126e-02</internalNodes>\n          <leafValues>\n            -1. 8.1426621181890368e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1878 1.6051199287176132e-02</internalNodes>\n          <leafValues>\n            -5.4008588194847107e-02 2.1967799961566925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1879 -7.0988729596138000e-02</internalNodes>\n          <leafValues>\n            6.1602139472961426e-01 -1.6476400196552277e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1880 -5.8310989290475845e-02</internalNodes>\n          <leafValues>\n            -9.5955359935760498e-01 1.2517100200057030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1881 -7.9547446221113205e-03</internalNodes>\n          <leafValues>\n            -9.3684002757072449e-02 3.3896960318088531e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1882 -4.9685798585414886e-02</internalNodes>\n          <leafValues>\n            3.1466799974441528e-01 -2.9716050252318382e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1883 9.7751528024673462e-02</internalNodes>\n          <leafValues>\n            7.5905729318037629e-04 -6.7009872198104858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1884 7.5908802449703217e-02</internalNodes>\n          <leafValues>\n            1.6073329374194145e-02 -6.6251361370086670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1885 1.3333460083231330e-03</internalNodes>\n          <leafValues>\n            5.2241399884223938e-02 -1.8808710575103760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1886 6.9728610105812550e-04</internalNodes>\n          <leafValues>\n            -8.9044801890850067e-02 1.6642339527606964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1887 2.0889509469270706e-02</internalNodes>\n          <leafValues>\n            2.1368719637393951e-02 -1.6083440184593201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1888 -1.7649700166657567e-03</internalNodes>\n          <leafValues>\n            1.2398529797792435e-01 -8.5922397673130035e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1889 2.7779850643128157e-03</internalNodes>\n          <leafValues>\n            -4.4366151094436646e-02 2.9322549700737000e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1890 7.9974532127380371e-04</internalNodes>\n          <leafValues>\n            -1.2351520359516144e-01 8.8818296790122986e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1891 7.0215959567576647e-04</internalNodes>\n          <leafValues>\n            -8.0154180526733398e-02 1.4544290304183960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1892 -4.0604420006275177e-02</internalNodes>\n          <leafValues>\n            -3.6047580838203430e-01 3.4314859658479691e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1893 -4.1686851531267166e-02</internalNodes>\n          <leafValues>\n            -2.0927760004997253e-01 8.5808392614126205e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1894 -4.6390198171138763e-02</internalNodes>\n          <leafValues>\n            5.3768527507781982e-01 -2.2632500156760216e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1895 -1.5822030603885651e-01</internalNodes>\n          <leafValues>\n            -1. 1.4312319690361619e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1896 -7.5683370232582092e-02</internalNodes>\n          <leafValues>\n            -8.0503028631210327e-01 1.2843839824199677e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1897 -5.7808328419923782e-02</internalNodes>\n          <leafValues>\n            3.8675680756568909e-01 -1.2630320154130459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1898 -4.5112581574358046e-05</internalNodes>\n          <leafValues>\n            7.4958987534046173e-02 -1.3433749973773956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1899 3.9205480366945267e-02</internalNodes>\n          <leafValues>\n            2.1980579942464828e-02 -4.5748621225357056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1900 4.4945240020751953e-02</internalNodes>\n          <leafValues>\n            -2.3763459175825119e-02 4.8715281486511230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1901 -5.7849191129207611e-02</internalNodes>\n          <leafValues>\n            3.5563638806343079e-01 -6.2380530871450901e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1902 -1.0397239774465561e-01</internalNodes>\n          <leafValues>\n            -6.2262791395187378e-01 1.5022880397737026e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1903 -2.5238281488418579e-01</internalNodes>\n          <leafValues>\n            -5.9059482812881470e-01 -1.9238379900343716e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1904 1.9675880670547485e-01</internalNodes>\n          <leafValues>\n            1.2625159695744514e-02 -7.2753208875656128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1905 3.7412419915199280e-02</internalNodes>\n          <leafValues>\n            -2.3478340357542038e-02 1.2147639691829681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1906 -8.0470675602555275e-03</internalNodes>\n          <leafValues>\n            -1.8167789280414581e-01 4.9743499606847763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1907 4.1297491639852524e-02</internalNodes>\n          <leafValues>\n            1.0259049944579601e-02 -1.4679500460624695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1908 -5.0735730677843094e-02</internalNodes>\n          <leafValues>\n            2.2679640352725983e-01 -4.9807049334049225e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1909 -3.6145109334029257e-04</internalNodes>\n          <leafValues>\n            4.1798278689384460e-02 -7.0410832762718201e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1910 -1.2359450012445450e-01</internalNodes>\n          <leafValues>\n            5.8283501863479614e-01 -1.6822429373860359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1911 5.7071618735790253e-02</internalNodes>\n          <leafValues>\n            -4.0532071143388748e-02 1.7078270018100739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1912 5.8561540208756924e-03</internalNodes>\n          <leafValues>\n            -1.3827900588512421e-01 8.2565233111381531e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1913 -1.1472850292921066e-01</internalNodes>\n          <leafValues>\n            -4.6754041314125061e-01 3.4348990302532911e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1914 2.0518699660897255e-02</internalNodes>\n          <leafValues>\n            8.1507943570613861e-02 -1.6894109547138214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1915 5.4629769176244736e-02</internalNodes>\n          <leafValues>\n            -7.4763749726116657e-03 2.3640379309654236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1916 -6.9312967360019684e-02</internalNodes>\n          <leafValues>\n            3.0071571469306946e-01 -3.4785300493240356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1917 -7.4176848866045475e-03</internalNodes>\n          <leafValues>\n            -2.8766560554504395e-01 4.7531820833683014e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1918 1.0223260149359703e-02</internalNodes>\n          <leafValues>\n            -3.0834799632430077e-02 3.9249539375305176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1919 -2.7346659451723099e-02</internalNodes>\n          <leafValues>\n            -1.5695489943027496e-01 1.3967529870569706e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1920 3.3875100314617157e-02</internalNodes>\n          <leafValues>\n            2.6063309982419014e-02 -3.9006409049034119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1921 4.5174721628427505e-02</internalNodes>\n          <leafValues>\n            8.9199207723140717e-03 -5.6769150495529175e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1922 1.1488229967653751e-02</internalNodes>\n          <leafValues>\n            -4.5491419732570648e-02 2.5109928846359253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1923 -1.0496149770915508e-02</internalNodes>\n          <leafValues>\n            6.4895443618297577e-02 -1.0623539984226227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1924 6.0881208628416061e-03</internalNodes>\n          <leafValues>\n            8.0929182469844818e-02 -1.4776149392127991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1925 -2.6524660643190145e-03</internalNodes>\n          <leafValues>\n            1.2062519788742065e-01 -7.2674863040447235e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1926 2.3559860419481993e-03</internalNodes>\n          <leafValues>\n            -8.1811271607875824e-02 1.4126540720462799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1927 -2.6777219772338867e-01</internalNodes>\n          <leafValues>\n            -7.8083831071853638e-01 4.4526048004627228e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1928 1.5965799987316132e-01</internalNodes>\n          <leafValues>\n            2.8381649404764175e-02 -3.8967838883399963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1929 5.1899369806051254e-02</internalNodes>\n          <leafValues>\n            -3.4305319190025330e-02 1.5921010076999664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1930 -1.3652780326083302e-03</internalNodes>\n          <leafValues>\n            -1.3755479454994202e-01 7.2719998657703400e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1931 2.2497299313545227e-01</internalNodes>\n          <leafValues>\n            -4.8017292283475399e-03 9.9994850158691406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1932 3.1434150878340006e-03</internalNodes>\n          <leafValues>\n            5.5151570588350296e-02 -1.6643160581588745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1933 -6.2940339557826519e-03</internalNodes>\n          <leafValues>\n            6.2896028161048889e-02 -6.0436379164457321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1934 5.1301911473274231e-02</internalNodes>\n          <leafValues>\n            -3.1671810895204544e-02 3.8534939289093018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1935 -6.6980808973312378e-02</internalNodes>\n          <leafValues>\n            -1.0925900191068649e-01 8.9958757162094116e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1936 5.1464758813381195e-02</internalNodes>\n          <leafValues>\n            2.6210019364953041e-02 -4.2159339785575867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1937 -9.0982139110565186e-02</internalNodes>\n          <leafValues>\n            3.2760378718376160e-01 -7.8134387731552124e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1938 5.2848970517516136e-03</internalNodes>\n          <leafValues>\n            -7.9399570822715759e-02 1.4998179674148560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1939 -1.5017699915915728e-03</internalNodes>\n          <leafValues>\n            9.7703106701374054e-02 -7.3532037436962128e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1940 -2.5415199343115091e-03</internalNodes>\n          <leafValues>\n            6.7801132798194885e-02 -1.4883249998092651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1941 4.4252820312976837e-02</internalNodes>\n          <leafValues>\n            1.6475830227136612e-02 -2.2880180180072784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1942 -3.3457159996032715e-02</internalNodes>\n          <leafValues>\n            4.1966789960861206e-01 -3.2553531229496002e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1943 1.3529899716377258e-01</internalNodes>\n          <leafValues>\n            9.0894084423780441e-03 -7.3839122056961060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1944 -3.7440970540046692e-02</internalNodes>\n          <leafValues>\n            -4.2613020539283752e-01 2.3972390219569206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1945 -1.4479730452876538e-05</internalNodes>\n          <leafValues>\n            5.6783780455589294e-02 -1.5888829529285431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1946 -1.1839280277490616e-01</internalNodes>\n          <leafValues>\n            5.0500631332397461e-01 -2.1859649568796158e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1947 -8.5000684484839439e-03</internalNodes>\n          <leafValues>\n            5.2339930087327957e-02 -4.5925021171569824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1948 -1.4189509674906731e-02</internalNodes>\n          <leafValues>\n            -2.3597060143947601e-01 4.0358349680900574e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1949 7.3599420487880707e-02</internalNodes>\n          <leafValues>\n            3.2680039294064045e-03 -5.8853602409362793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1950 5.4971270263195038e-02</internalNodes>\n          <leafValues>\n            -2.0196519792079926e-02 5.5482727289199829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1951 -2.2816160693764687e-02</internalNodes>\n          <leafValues>\n            -1.7589579522609711e-01 1.7851740121841431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1952 2.3204670287668705e-03</internalNodes>\n          <leafValues>\n            -8.1749923527240753e-02 1.2833079695701599e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1953 -1.0797909647226334e-01</internalNodes>\n          <leafValues>\n            -1. 1.7423679819330573e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1954 -4.1111931204795837e-02</internalNodes>\n          <leafValues>\n            5.8432698249816895e-01 -1.8878869712352753e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1955 -3.5695650149136782e-03</internalNodes>\n          <leafValues>\n            -1.7558470368385315e-01 6.4731426537036896e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1956 -6.6358670592308044e-02</internalNodes>\n          <leafValues>\n            -1. 9.2067662626504898e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1957 -1.8944580107927322e-02</internalNodes>\n          <leafValues>\n            2.5783088803291321e-01 -1.8944939598441124e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1958 -1.2871269881725311e-01</internalNodes>\n          <leafValues>\n            -5.8477258682250977e-01 1.4466489665210247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1959 2.4218629114329815e-03</internalNodes>\n          <leafValues>\n            -7.3590897023677826e-02 7.0332102477550507e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1960 2.9718460515141487e-02</internalNodes>\n          <leafValues>\n            -2.3011969402432442e-02 4.0542769432067871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1961 1.7555029690265656e-01</internalNodes>\n          <leafValues>\n            2.0808730274438858e-02 -3.7285649776458740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1962 3.7122450768947601e-02</internalNodes>\n          <leafValues>\n            -2.7959629893302917e-02 3.5908779501914978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1963 -3.8044541142880917e-03</internalNodes>\n          <leafValues>\n            -1.3337990641593933e-01 9.2061348259449005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1964 -1.0930700227618217e-02</internalNodes>\n          <leafValues>\n            2.3196309804916382e-01 -4.4535879045724869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1965 1.6103629767894745e-01</internalNodes>\n          <leafValues>\n            -8.7691349908709526e-03 2.2045169770717621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1966 2.5971230119466782e-02</internalNodes>\n          <leafValues>\n            6.4421012997627258e-02 -1.8919080495834351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1967 1.2638209760189056e-01</internalNodes>\n          <leafValues>\n            -1.0362179949879646e-02 1.7057189345359802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1968 -9.1393403708934784e-03</internalNodes>\n          <leafValues>\n            -1.3828249275684357e-01 8.6790062487125397e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1969 1.7722090706229210e-02</internalNodes>\n          <leafValues>\n            3.9719890803098679e-02 -1.2294259667396545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1970 -8.2425750792026520e-02</internalNodes>\n          <leafValues>\n            3.0023100972175598e-01 -3.3165920525789261e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1971 4.3892528861761093e-02</internalNodes>\n          <leafValues>\n            -1.3056339696049690e-02 9.8728686571121216e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1972 3.5575369838625193e-03</internalNodes>\n          <leafValues>\n            1.1186280101537704e-01 -9.2797823250293732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1973 -1.5298820100724697e-02</internalNodes>\n          <leafValues>\n            -1.3007879257202148e-01 2.3159010335803032e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1974 -2.6504450943320990e-03</internalNodes>\n          <leafValues>\n            1.3526280224323273e-01 -7.3355458676815033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1975 4.1636861860752106e-02</internalNodes>\n          <leafValues>\n            -1.9068980589509010e-02 3.5857999324798584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1976 -7.5290258973836899e-03</internalNodes>\n          <leafValues>\n            -1.8672360479831696e-01 5.8248449116945267e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1977 -4.0031488984823227e-02</internalNodes>\n          <leafValues>\n            2.2969779372215271e-01 -1.4608230441808701e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1978 -1.3624709844589233e-01</internalNodes>\n          <leafValues>\n            -8.7086462974548340e-01 1.1211199685931206e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1979 4.5124008320271969e-03</internalNodes>\n          <leafValues>\n            -3.5644959658384323e-02 1.0103099793195724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1980 5.4118070751428604e-02</internalNodes>\n          <leafValues>\n            -1.4689410105347633e-02 6.7652267217636108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1981 -3.4553959965705872e-02</internalNodes>\n          <leafValues>\n            2.1854560077190399e-01 -9.7846649587154388e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1982 -2.5520840659737587e-02</internalNodes>\n          <leafValues>\n            -4.6898001432418823e-01 2.4060370400547981e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1983 -3.5473700612783432e-02</internalNodes>\n          <leafValues>\n            1.3427549600601196e-01 -2.1438699215650558e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1984 2.8683411073870957e-04</internalNodes>\n          <leafValues>\n            -9.7300283610820770e-02 1.0760939866304398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1985 -7.8717589378356934e-02</internalNodes>\n          <leafValues>\n            -1. 2.7187850791960955e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1986 -1.5701749362051487e-04</internalNodes>\n          <leafValues>\n            1.1199659854173660e-01 -9.9441379308700562e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1987 1.6026569530367851e-02</internalNodes>\n          <leafValues>\n            3.4198261797428131e-02 -1.9100490212440491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1988 -1.9164729863405228e-02</internalNodes>\n          <leafValues>\n            8.9024826884269714e-02 -1.1919700354337692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1989 -3.9445150643587112e-02</internalNodes>\n          <leafValues>\n            -1.0717990249395370e-01 3.7615209817886353e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1990 2.2417430300265551e-03</internalNodes>\n          <leafValues>\n            -9.0581007301807404e-02 1.7547470331192017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1991 -3.8842540234327316e-03</internalNodes>\n          <leafValues>\n            9.2697329819202423e-02 -4.2431369423866272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1992 -2.1914629265666008e-02</internalNodes>\n          <leafValues>\n            -2.8017508983612061e-01 3.7537671625614166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1993 -3.7512119859457016e-02</internalNodes>\n          <leafValues>\n            3.6218520998954773e-01 -1.7507450655102730e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1994 -8.4374047582969069e-04</internalNodes>\n          <leafValues>\n            1.2348400056362152e-01 -8.0245867371559143e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1995 -2.6424999814480543e-03</internalNodes>\n          <leafValues>\n            5.2565738558769226e-02 -8.3335436880588531e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1996 -9.2836812138557434e-02</internalNodes>\n          <leafValues>\n            -4.2060381174087524e-01 2.3360429331660271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1997 8.2463070750236511e-02</internalNodes>\n          <leafValues>\n            -2.9815400484949350e-03 7.8999197483062744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1998 -6.9864951074123383e-02</internalNodes>\n          <leafValues>\n            7.3802971839904785e-01 -1.4021299779415131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1999 4.5439340174198151e-02</internalNodes>\n          <leafValues>\n            -1.1321160010993481e-02 1.9973699748516083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2000 -5.0297789275646210e-02</internalNodes>\n          <leafValues>\n            6.0764670372009277e-01 -1.7632890492677689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2001 6.0456149280071259e-02</internalNodes>\n          <leafValues>\n            -5.9354598633944988e-03 3.1622889637947083e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2002 -4.6769347973167896e-03</internalNodes>\n          <leafValues>\n            -1.8090610206127167e-01 5.9660188853740692e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2003 3.6530068609863520e-04</internalNodes>\n          <leafValues>\n            -9.1220043599605560e-02 1.1092729866504669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2004 -1.9491260871291161e-02</internalNodes>\n          <leafValues>\n            -3.7075570225715637e-01 2.8416309505701065e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2005 2.0056450739502907e-02</internalNodes>\n          <leafValues>\n            -5.8159679174423218e-02 7.8105233609676361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2006 -3.9371181279420853e-02</internalNodes>\n          <leafValues>\n            2.9012489318847656e-01 -4.1875660419464111e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2007 2.1523650735616684e-02</internalNodes>\n          <leafValues>\n            1.6573080793023109e-02 -2.3614850640296936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2008 -3.1294699292629957e-03</internalNodes>\n          <leafValues>\n            -1.6466400027275085e-01 6.2233809381723404e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2009 2.8589619323611259e-03</internalNodes>\n          <leafValues>\n            -3.8098409771919250e-02 5.5751629173755646e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>135</maxWeakCount>\n      <stageThreshold>-3.0609300613403320e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2010 -2.0576130598783493e-02</internalNodes>\n          <leafValues>\n            1.7351129651069641e-01 -1.5058030188083649e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2011 1.6125949099659920e-02</internalNodes>\n          <leafValues>\n            -4.1612371802330017e-02 2.3984450101852417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2012 -1.2352580204606056e-02</internalNodes>\n          <leafValues>\n            9.7780853509902954e-02 -1.2391830235719681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2013 -5.7473899796605110e-03</internalNodes>\n          <leafValues>\n            7.7615208923816681e-02 -9.6236728131771088e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2014 2.9579061083495617e-03</internalNodes>\n          <leafValues>\n            -6.7683719098567963e-02 2.6594209671020508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2015 -8.3472225815057755e-03</internalNodes>\n          <leafValues>\n            -1.1188179999589920e-01 1.3736370205879211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2016 -5.8408780023455620e-04</internalNodes>\n          <leafValues>\n            4.5943111181259155e-02 -1.6486530005931854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2017 -3.5136839142069221e-04</internalNodes>\n          <leafValues>\n            9.7791008651256561e-02 -6.4357861876487732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2018 8.4126877482049167e-05</internalNodes>\n          <leafValues>\n            -1.3847629725933075e-01 8.8727742433547974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2019 -2.6592490077018738e-01</internalNodes>\n          <leafValues>\n            -6.7525398731231689e-01 1.6188669949769974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2020 4.3727741576731205e-03</internalNodes>\n          <leafValues>\n            7.2884798049926758e-02 -1.2560360133647919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2021 -2.2660531103610992e-03</internalNodes>\n          <leafValues>\n            8.7269246578216553e-02 -6.8355433642864227e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2022 -6.5290732309222221e-03</internalNodes>\n          <leafValues>\n            -1.2197560071945190e-01 8.0927930772304535e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2023 9.6436247229576111e-02</internalNodes>\n          <leafValues>\n            -8.2637304440140724e-03 4.9127399921417236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2024 -4.3594818562269211e-02</internalNodes>\n          <leafValues>\n            4.5575308799743652e-01 -2.5600390508770943e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2025 -2.1098319441080093e-02</internalNodes>\n          <leafValues>\n            -1.1892750114202499e-01 2.3539589717984200e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2026 -2.5200019590556622e-03</internalNodes>\n          <leafValues>\n            1.2724469602108002e-01 -9.0751722455024719e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2027 -8.9241685345768929e-03</internalNodes>\n          <leafValues>\n            -1.1514320224523544e-01 4.3497029691934586e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2028 3.4590170253068209e-03</internalNodes>\n          <leafValues>\n            6.3537172973155975e-02 -1.8261429667472839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2029 -3.6076800897717476e-03</internalNodes>\n          <leafValues>\n            1.2005910277366638e-01 -5.2449110895395279e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2030 5.3778890520334244e-02</internalNodes>\n          <leafValues>\n            -1.8675789237022400e-02 5.2313017845153809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2031 4.5245189219713211e-02</internalNodes>\n          <leafValues>\n            -1.7504919320344925e-02 2.1871849894523621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2032 1.3272929936647415e-03</internalNodes>\n          <leafValues>\n            7.8659959137439728e-02 -1.3551670312881470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2033 1.2393640354275703e-02</internalNodes>\n          <leafValues>\n            2.8952300548553467e-02 -7.2149537503719330e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2034 -3.7702780216932297e-02</internalNodes>\n          <leafValues>\n            4.1850051283836365e-01 -3.0355349183082581e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2035 -4.8910409212112427e-02</internalNodes>\n          <leafValues>\n            3.7365001440048218e-01 -5.6771109811961651e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2036 -5.9961699880659580e-03</internalNodes>\n          <leafValues>\n            -2.0756420493125916e-01 7.0438846945762634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2037 5.6631930172443390e-02</internalNodes>\n          <leafValues>\n            -1.7292939126491547e-02 2.5498399138450623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2038 3.1650230288505554e-02</internalNodes>\n          <leafValues>\n            -2.0658250898122787e-02 4.8398271203041077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2039 -2.1152989938855171e-02</internalNodes>\n          <leafValues>\n            2.0028789341449738e-01 -2.4872610345482826e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2040 8.7676532566547394e-02</internalNodes>\n          <leafValues>\n            -2.4999700486660004e-02 4.1126599907875061e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2041 5.3299881517887115e-02</internalNodes>\n          <leafValues>\n            -8.6766229942440987e-03 3.7446591258049011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2042 -2.6251509552821517e-04</internalNodes>\n          <leafValues>\n            9.9231846630573273e-02 -1.1989200115203857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2043 -8.5897604003548622e-03</internalNodes>\n          <leafValues>\n            -1.8593010306358337e-01 3.4370779991149902e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2044 1.6940470784902573e-02</internalNodes>\n          <leafValues>\n            -3.4768261015415192e-02 2.7288261055946350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2045 5.0596110522747040e-02</internalNodes>\n          <leafValues>\n            3.6170349922031164e-03 -3.9460760354995728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2046 -8.3048436790704727e-03</internalNodes>\n          <leafValues>\n            9.8577797412872314e-02 -1.1666280031204224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2047 1.0586270131170750e-02</internalNodes>\n          <leafValues>\n            3.9117150008678436e-02 -8.5843667387962341e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2048 -3.2558601349592209e-02</internalNodes>\n          <leafValues>\n            -3.7352150678634644e-01 2.5410100817680359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2049 -3.2352130860090256e-02</internalNodes>\n          <leafValues>\n            2.6129978895187378e-01 -2.8631040826439857e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2050 2.5547049939632416e-02</internalNodes>\n          <leafValues>\n            3.3884890377521515e-02 -3.0452328920364380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2051 4.2252440005540848e-02</internalNodes>\n          <leafValues>\n            8.9510334655642509e-03 -2.4091260135173798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2052 3.8109479937702417e-03</internalNodes>\n          <leafValues>\n            -7.2638936340808868e-02 1.4634390175342560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2053 2.0821709185838699e-02</internalNodes>\n          <leafValues>\n            -3.6271940916776657e-02 1.8324719369411469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2054 2.6497790589928627e-02</internalNodes>\n          <leafValues>\n            2.8160110116004944e-02 -3.9517199993133545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2055 2.0283530652523041e-01</internalNodes>\n          <leafValues>\n            -9.3782292678952217e-03 4.4868949055671692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2056 -1.7996610701084137e-01</internalNodes>\n          <leafValues>\n            -7.9595959186553955e-01 1.2027840130031109e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2057 -7.0968091487884521e-02</internalNodes>\n          <leafValues>\n            -7.6951277256011963e-01 1.0918079642578959e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2058 2.7555041015148163e-03</internalNodes>\n          <leafValues>\n            7.0150263607501984e-02 -1.2915180623531342e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2059 -7.7004402875900269e-02</internalNodes>\n          <leafValues>\n            -4.9155071377754211e-01 2.8067480307072401e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2060 -2.0257910713553429e-02</internalNodes>\n          <leafValues>\n            2.3568239808082581e-01 -4.3432798236608505e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2061 -8.6421817541122437e-02</internalNodes>\n          <leafValues>\n            -3.4541681408882141e-01 1.1248850263655186e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2062 -6.7245952785015106e-02</internalNodes>\n          <leafValues>\n            -6.8752902746200562e-01 1.1868669651448727e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2063 -1.2990389764308929e-01</internalNodes>\n          <leafValues>\n            -7.9069268703460693e-01 2.5537670589983463e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2064 -3.0394670367240906e-01</internalNodes>\n          <leafValues>\n            -8.9989352226257324e-01 8.1501724198460579e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2065 -4.1988548636436462e-01</internalNodes>\n          <leafValues>\n            -7.7303320169448853e-01 1.3665149454027414e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2066 -1.6851289570331573e-01</internalNodes>\n          <leafValues>\n            2.4319399893283844e-01 -4.1280739009380341e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2067 2.8788880445063114e-03</internalNodes>\n          <leafValues>\n            2.0577169954776764e-02 -1.8590900301933289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2068 -4.0223840624094009e-02</internalNodes>\n          <leafValues>\n            4.3099269270896912e-01 -2.3104710504412651e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2069 3.9687040261924267e-03</internalNodes>\n          <leafValues>\n            4.3601520359516144e-02 -9.2233568429946899e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2070 -2.7650719508528709e-02</internalNodes>\n          <leafValues>\n            -6.1707872152328491e-01 1.4680569991469383e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2071 -2.3034301120787859e-03</internalNodes>\n          <leafValues>\n            9.0349592268466949e-02 -6.1664551496505737e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2072 -2.9040789231657982e-02</internalNodes>\n          <leafValues>\n            2.7737939357757568e-01 -3.9218869060277939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2073 1.3288260437548161e-02</internalNodes>\n          <leafValues>\n            3.1138259917497635e-02 -1.3558749854564667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2074 3.3968928619287908e-05</internalNodes>\n          <leafValues>\n            -1.3562929630279541e-01 7.6467581093311310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2075 -6.8583860993385315e-03</internalNodes>\n          <leafValues>\n            -1.0365810245275497e-01 2.5939159095287323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2076 -1.4360919594764709e-02</internalNodes>\n          <leafValues>\n            -2.1136499941349030e-01 5.2973140031099319e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2077 -1.7468679696321487e-02</internalNodes>\n          <leafValues>\n            -1.0518109798431396e-01 1.7715079709887505e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2078 -9.8544567823410034e-02</internalNodes>\n          <leafValues>\n            2.5649461150169373e-01 -4.4229641556739807e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2079 -2.8123459778726101e-03</internalNodes>\n          <leafValues>\n            -7.3800362646579742e-02 1.5400940179824829e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2080 2.1941340528428555e-03</internalNodes>\n          <leafValues>\n            -1.4216299355030060e-01 8.9139223098754883e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2081 4.6820759773254395e-02</internalNodes>\n          <leafValues>\n            2.9364090412855148e-02 -6.2754891812801361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2082 3.2891759276390076e-01</internalNodes>\n          <leafValues>\n            1.3015690259635448e-02 -7.8347128629684448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2083 -2.0470520481467247e-02</internalNodes>\n          <leafValues>\n            -7.6814353466033936e-02 3.9800468832254410e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2084 8.8677026331424713e-02</internalNodes>\n          <leafValues>\n            -4.0312368422746658e-02 2.8453868627548218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2085 -1.1557979742065072e-03</internalNodes>\n          <leafValues>\n            4.2199321091175079e-02 -4.1446208953857422e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2086 6.0524538159370422e-02</internalNodes>\n          <leafValues>\n            -1.6918700188398361e-02 6.7237138748168945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2087 4.0830459445714951e-02</internalNodes>\n          <leafValues>\n            1.3364840298891068e-02 -3.1113299727439880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2088 -3.1132870353758335e-03</internalNodes>\n          <leafValues>\n            -1.7262780666351318e-01 5.9382218867540359e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2089 -4.3638627976179123e-03</internalNodes>\n          <leafValues>\n            1.7265330255031586e-01 -6.2423970550298691e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2090 -3.2834090292453766e-02</internalNodes>\n          <leafValues>\n            4.0275371074676514e-01 -2.5799039751291275e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2091 6.4377002418041229e-02</internalNodes>\n          <leafValues>\n            -4.7380630858242512e-03 7.5221067667007446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2092 2.7642730623483658e-02</internalNodes>\n          <leafValues>\n            3.7644479423761368e-02 -2.9220271110534668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2093 2.2171199321746826e-02</internalNodes>\n          <leafValues>\n            -2.4654069915413857e-02 2.0533810555934906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2094 1.5859310515224934e-03</internalNodes>\n          <leafValues>\n            8.9463792741298676e-02 -1.2611730396747589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2095 -1.8872050568461418e-02</internalNodes>\n          <leafValues>\n            1.3072650134563446e-01 -3.6953710019588470e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2096 -1.3306169770658016e-02</internalNodes>\n          <leafValues>\n            -2.2963209450244904e-01 4.2687188833951950e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2097 -7.0407122373580933e-02</internalNodes>\n          <leafValues>\n            -7.1117508411407471e-01 6.6957580856978893e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2098 4.1748929768800735e-02</internalNodes>\n          <leafValues>\n            -3.2927870750427246e-02 3.0035281181335449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2099 5.3282231092453003e-03</internalNodes>\n          <leafValues>\n            5.1811750978231430e-02 -1.9069090485572815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2100 2.4094989057630301e-03</internalNodes>\n          <leafValues>\n            -8.0687969923019409e-02 1.2510129809379578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2101 -6.2405979260802269e-03</internalNodes>\n          <leafValues>\n            1.0740630328655243e-01 -3.9979010820388794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2102 -6.7312467098236084e-01</internalNodes>\n          <leafValues>\n            -1. 1.0070810094475746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2103 -9.2983558773994446e-02</internalNodes>\n          <leafValues>\n            -1. -2.4261360522359610e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2104 3.3629760146141052e-02</internalNodes>\n          <leafValues>\n            2.4122869595885277e-02 -4.1387900710105896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2105 2.3880619555711746e-02</internalNodes>\n          <leafValues>\n            9.6614202484488487e-03 -2.1973779797554016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2106 1.2738780351355672e-03</internalNodes>\n          <leafValues>\n            -8.3555117249488831e-02 1.2269689887762070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2107 1.8414139747619629e-02</internalNodes>\n          <leafValues>\n            3.0798140913248062e-02 -3.5609170794487000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2108 -5.6469578295946121e-02</internalNodes>\n          <leafValues>\n            8.8631778955459595e-01 -1.2698300182819366e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2109 -4.6219761134125292e-04</internalNodes>\n          <leafValues>\n            3.4681901335716248e-02 -8.2850828766822815e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2110 -1.9060859456658363e-02</internalNodes>\n          <leafValues>\n            3.5369411110877991e-01 -2.7611760422587395e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2111 1.5762279508635402e-03</internalNodes>\n          <leafValues>\n            4.0939908474683762e-02 -2.2517409920692444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2112 2.0101880654692650e-02</internalNodes>\n          <leafValues>\n            -2.3995550349354744e-02 4.1091251373291016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2113 2.7211669366806746e-03</internalNodes>\n          <leafValues>\n            2.8122449293732643e-02 -1.4200119674205780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2114 -1.0944429785013199e-01</internalNodes>\n          <leafValues>\n            9.5085740089416504e-01 -9.4355372712016106e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2115 -1.2755279894918203e-03</internalNodes>\n          <leafValues>\n            5.6902900338172913e-02 -8.3429783582687378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2116 -8.0578401684761047e-02</internalNodes>\n          <leafValues>\n            -9.5139288902282715e-01 8.2268668338656425e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2117 -1.2047989666461945e-01</internalNodes>\n          <leafValues>\n            -3.0273869633674622e-01 2.8489340096712112e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2118 -1.8294970691204071e-01</internalNodes>\n          <leafValues>\n            2.3866130411624908e-01 -6.2773942947387695e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2119 -1.7106409370899200e-01</internalNodes>\n          <leafValues>\n            -5.9394681453704834e-01 3.1515269074589014e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2120 -7.3414877057075500e-02</internalNodes>\n          <leafValues>\n            -8.6933082342147827e-01 1.0084389708936214e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2121 2.4238299578428268e-02</internalNodes>\n          <leafValues>\n            -2.1756110712885857e-02 1.6218559443950653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2122 -7.1713668294250965e-03</internalNodes>\n          <leafValues>\n            -9.7345590591430664e-02 9.2148497700691223e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2123 -3.3344399183988571e-02</internalNodes>\n          <leafValues>\n            7.4645392596721649e-02 -2.2160679101943970e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2124 7.2907900903373957e-04</internalNodes>\n          <leafValues>\n            -9.4971813261508942e-02 1.1826740205287933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2125 -1.0217289673164487e-03</internalNodes>\n          <leafValues>\n            5.6426230818033218e-02 -3.7573829293251038e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2126 -8.4900937508791685e-04</internalNodes>\n          <leafValues>\n            -1.3883149623870850e-01 7.0047326385974884e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2127 9.9850513041019440e-02</internalNodes>\n          <leafValues>\n            -1.4011589810252190e-02 2.6115679740905762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2128 -1.3090069591999054e-01</internalNodes>\n          <leafValues>\n            7.1379351615905762e-01 -1.1643799953162670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2129 9.1210529208183289e-03</internalNodes>\n          <leafValues>\n            4.5402809977531433e-02 -2.1830010414123535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2130 2.0106479525566101e-01</internalNodes>\n          <leafValues>\n            -2.0753270015120506e-02 5.1230221986770630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2131 4.7389309853315353e-02</internalNodes>\n          <leafValues>\n            9.4779124483466148e-03 -4.7942391037940979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2132 -5.7118538767099380e-02</internalNodes>\n          <leafValues>\n            3.9166051149368286e-01 -2.6703910902142525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2133 -8.3700623363256454e-03</internalNodes>\n          <leafValues>\n            -1.3399459421634674e-01 4.8460900783538818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2134 4.0913890115916729e-03</internalNodes>\n          <leafValues>\n            -5.9489779174327850e-02 1.7438539862632751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2135 7.1899488568305969e-02</internalNodes>\n          <leafValues>\n            1.1723180301487446e-02 -3.6274778842926025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2136 -3.6888250615447760e-03</internalNodes>\n          <leafValues>\n            7.5763627886772156e-02 -1.5033599734306335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2137 -7.4795219115912914e-03</internalNodes>\n          <leafValues>\n            1.5027859807014465e-01 -4.5870490372180939e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2138 -1.2582589872181416e-02</internalNodes>\n          <leafValues>\n            -1.9915549457073212e-01 6.3917450606822968e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2139 3.5687079653143883e-03</internalNodes>\n          <leafValues>\n            -1.2117239832878113e-01 1.0956080257892609e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2140 1.7363800434395671e-03</internalNodes>\n          <leafValues>\n            1.2258529663085938e-01 -9.3556262552738190e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2141 -1.4523629797622561e-03</internalNodes>\n          <leafValues>\n            9.6722528338432312e-02 -8.0739699304103851e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2142 3.1017749570310116e-03</internalNodes>\n          <leafValues>\n            -6.9076471030712128e-02 1.5396459400653839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2143 -8.5509587079286575e-03</internalNodes>\n          <leafValues>\n            -1.5186290442943573e-01 4.0346920490264893e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2144 -1.8966189818456769e-03</internalNodes>\n          <leafValues>\n            1.2172549962997437e-01 -9.8543442785739899e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>135</maxWeakCount>\n      <stageThreshold>-3.0601499557495117e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2145 -2.3754740133881569e-02</internalNodes>\n          <leafValues>\n            1.7095300555229187e-01 -1.1534280329942703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2146 -7.3806629516184330e-03</internalNodes>\n          <leafValues>\n            8.8067196309566498e-02 -4.0317770093679428e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2147 1.1198900174349546e-03</internalNodes>\n          <leafValues>\n            -7.9895302653312683e-02 1.3448899984359741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2148 3.3718731254339218e-02</internalNodes>\n          <leafValues>\n            -1.5220030210912228e-02 2.9914170503616333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2149 -2.8022660990245640e-04</internalNodes>\n          <leafValues>\n            6.3599728047847748e-02 -1.5619190037250519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2150 -3.9523928426206112e-03</internalNodes>\n          <leafValues>\n            -9.7961323335766792e-03 1.0571649670600891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2151 2.1397129166871309e-03</internalNodes>\n          <leafValues>\n            8.9953586459159851e-02 -1.4483779668807983e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2152 -6.7521296441555023e-02</internalNodes>\n          <leafValues>\n            2.0932430028915405e-01 -5.3923811763525009e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2153 1.0378950275480747e-02</internalNodes>\n          <leafValues>\n            -6.4177162945270538e-02 2.7814629673957825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2154 6.2903137877583504e-03</internalNodes>\n          <leafValues>\n            -4.9253720790147781e-02 8.2168422639369965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2155 9.3974275514483452e-03</internalNodes>\n          <leafValues>\n            8.4537737071514130e-02 -2.2885300219058990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2156 1.0120930150151253e-02</internalNodes>\n          <leafValues>\n            3.3337119966745377e-02 -8.1664256751537323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2157 3.1531939748674631e-03</internalNodes>\n          <leafValues>\n            -1.0220990329980850e-01 1.1837360262870789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2158 7.5137287378311157e-02</internalNodes>\n          <leafValues>\n            2.7504051104187965e-03 -1.0000959634780884e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2159 -2.3692219983786345e-03</internalNodes>\n          <leafValues>\n            9.9092483520507812e-02 -1.1425189673900604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2160 -2.4510379880666733e-02</internalNodes>\n          <leafValues>\n            2.8708320856094360e-01 -1.6148800030350685e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2161 -1.9670750480145216e-03</internalNodes>\n          <leafValues>\n            -1.1531370133161545e-01 8.6816556751728058e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2162 3.0845379456877708e-02</internalNodes>\n          <leafValues>\n            -2.4090610444545746e-02 1.9607549905776978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2163 2.3816309869289398e-02</internalNodes>\n          <leafValues>\n            3.2824039459228516e-02 -3.5710439085960388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2164 -4.0199130773544312e-02</internalNodes>\n          <leafValues>\n            -5.2850788831710815e-01 6.0749719850718975e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2165 -6.8876100704073906e-03</internalNodes>\n          <leafValues>\n            2.2058850526809692e-01 -5.9151489287614822e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2166 -2.5466730585321784e-04</internalNodes>\n          <leafValues>\n            7.1897879242897034e-02 -8.4962032735347748e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2167 9.8468195647001266e-03</internalNodes>\n          <leafValues>\n            4.1366759687662125e-02 -2.3984520137310028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2168 2.7934400364756584e-02</internalNodes>\n          <leafValues>\n            -2.3647159337997437e-02 2.4738009274005890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2169 -2.2960390895605087e-02</internalNodes>\n          <leafValues>\n            -4.5187929272651672e-01 2.2305779159069061e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2170 3.2323438790626824e-04</internalNodes>\n          <leafValues>\n            -8.7536007165908813e-02 7.8490957617759705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2171 3.1954899430274963e-02</internalNodes>\n          <leafValues>\n            -2.6202389970421791e-02 3.9204901456832886e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2172 1.9027979578822851e-03</internalNodes>\n          <leafValues>\n            6.2762781977653503e-02 -1.6107350587844849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2173 -3.2691629603505135e-03</internalNodes>\n          <leafValues>\n            1.0168000310659409e-01 -1.0432480275630951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2174 1.0040200315415859e-02</internalNodes>\n          <leafValues>\n            -2.8046580031514168e-02 1.2117899954319000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2175 -3.4158680588006973e-02</internalNodes>\n          <leafValues>\n            -2.8974449634552002e-01 3.5282660275697708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2176 1.7615250544622540e-03</internalNodes>\n          <leafValues>\n            -5.5583070963621140e-02 7.4158452451229095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2177 -2.1134650334715843e-02</internalNodes>\n          <leafValues>\n            2.5130590796470642e-01 -4.0354639291763306e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2178 2.9759369790554047e-02</internalNodes>\n          <leafValues>\n            3.8029540330171585e-02 -1.4226369559764862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2179 1.4866080135107040e-02</internalNodes>\n          <leafValues>\n            -3.9721690118312836e-02 2.7522540092468262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2180 -3.5829428583383560e-02</internalNodes>\n          <leafValues>\n            -3.3451971411705017e-01 9.6839247271418571e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2181 -3.2887340057641268e-03</internalNodes>\n          <leafValues>\n            -1.4258219301700592e-01 6.8576209247112274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2182 4.2714878916740417e-02</internalNodes>\n          <leafValues>\n            -1.4240439981222153e-02 3.8765299320220947e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2183 1.2328879674896598e-03</internalNodes>\n          <leafValues>\n            7.8623853623867035e-02 -1.1869420111179352e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2184 -1.0447620414197445e-02</internalNodes>\n          <leafValues>\n            -1.4882990717887878e-01 3.1571168452501297e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2185 1.2656359933316708e-02</internalNodes>\n          <leafValues>\n            -4.6572461724281311e-02 2.6212608814239502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2186 4.9849718809127808e-02</internalNodes>\n          <leafValues>\n            1.7015339806675911e-02 -1.4268730580806732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2187 -1.8607240170240402e-02</internalNodes>\n          <leafValues>\n            2.3338650166988373e-01 -4.7094941139221191e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2188 -5.4397370666265488e-02</internalNodes>\n          <leafValues>\n            -4.0511301159858704e-01 8.1606470048427582e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2189 2.9153900686651468e-03</internalNodes>\n          <leafValues>\n            -8.9313946664333344e-02 1.3335379958152771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2190 -5.9154080227017403e-03</internalNodes>\n          <leafValues>\n            -2.0414529740810394e-01 4.8475701361894608e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2191 -1.9841329194605350e-03</internalNodes>\n          <leafValues>\n            1.3428109884262085e-01 -7.5892791152000427e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2192 -4.4047520495951176e-03</internalNodes>\n          <leafValues>\n            4.1852138936519623e-02 -1.0119090229272842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2193 1.7982879653573036e-02</internalNodes>\n          <leafValues>\n            4.3978679925203323e-02 -2.5054019689559937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2194 -7.8059501945972443e-02</internalNodes>\n          <leafValues>\n            -3.3025071024894714e-01 6.3089421018958092e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2195 7.2548650205135345e-03</internalNodes>\n          <leafValues>\n            -1.0872170329093933e-01 9.9411018192768097e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2196 -2.7871869970113039e-03</internalNodes>\n          <leafValues>\n            1.3659299910068512e-01 -8.4799639880657196e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2197 -9.3798413872718811e-03</internalNodes>\n          <leafValues>\n            -1.1872450262308121e-01 7.9108059406280518e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2198 -5.4926410317420959e-02</internalNodes>\n          <leafValues>\n            1.4382070302963257e-01 -3.0072269961237907e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2199 -4.4219079427421093e-03</internalNodes>\n          <leafValues>\n            1.0666429996490479e-01 -1.0838100314140320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2200 1.0763059835880995e-03</internalNodes>\n          <leafValues>\n            2.7380989864468575e-02 -5.5446051061153412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2201 -7.2514012455940247e-02</internalNodes>\n          <leafValues>\n            -1.0893449932336807e-01 1.0097540169954300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2202 -1.6472190618515015e-01</internalNodes>\n          <leafValues>\n            3.0365368723869324e-01 -4.3666210025548935e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2203 7.9837806522846222e-02</internalNodes>\n          <leafValues>\n            -1.0828680358827114e-02 8.9977437257766724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2204 -5.2413612138479948e-04</internalNodes>\n          <leafValues>\n            8.5230633616447449e-02 -1.2053979933261871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2205 -2.1632270887494087e-02</internalNodes>\n          <leafValues>\n            -2.1092039346694946e-01 6.5582543611526489e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2206 1.2691530585289001e-01</internalNodes>\n          <leafValues>\n            -4.5935749076306820e-03 4.5089641213417053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2207 9.5472350716590881e-02</internalNodes>\n          <leafValues>\n            -2.0798899233341217e-02 5.2474659681320190e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2208 -8.2936078310012817e-02</internalNodes>\n          <leafValues>\n            8.4976738691329956e-01 -5.0510508008301258e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2209 7.7482969500124454e-03</internalNodes>\n          <leafValues>\n            -5.5318288505077362e-02 1.7145830392837524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2210 -2.1768439561128616e-02</internalNodes>\n          <leafValues>\n            -1.5947930514812469e-01 6.0873799026012421e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2211 -1.1072609777329490e-04</internalNodes>\n          <leafValues>\n            7.8877292573451996e-02 -1.3177630305290222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2212 3.1122909858822823e-03</internalNodes>\n          <leafValues>\n            -4.3046839535236359e-02 6.2392581254243851e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2213 -2.8692940250039101e-03</internalNodes>\n          <leafValues>\n            1.3746979832649231e-01 -8.0494217574596405e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2214 1.0575760155916214e-01</internalNodes>\n          <leafValues>\n            1.0569440200924873e-03 -9.9993818998336792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2215 4.6192679554224014e-02</internalNodes>\n          <leafValues>\n            1.7228020355105400e-02 -5.2604919672012329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2216 -2.5476190447807312e-01</internalNodes>\n          <leafValues>\n            -6.2927299737930298e-01 1.3698619790375233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2217 -2.7374029159545898e-03</internalNodes>\n          <leafValues>\n            1.2747539579868317e-01 -6.9591522216796875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2218 2.1854760125279427e-03</internalNodes>\n          <leafValues>\n            4.1854761540889740e-02 -2.6481458544731140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2219 -2.4050710722804070e-02</internalNodes>\n          <leafValues>\n            -2.6191109418869019e-01 3.4489940851926804e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2220 1.0211429744958878e-01</internalNodes>\n          <leafValues>\n            -1.5302860178053379e-02 3.9992758631706238e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2221 1.0281659662723541e-01</internalNodes>\n          <leafValues>\n            -2.9020670801401138e-02 3.6887159943580627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2222 3.9206489920616150e-02</internalNodes>\n          <leafValues>\n            8.9045017957687378e-03 -4.3242999911308289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2223 -3.7830859422683716e-02</internalNodes>\n          <leafValues>\n            -6.2731212377548218e-01 1.4882829971611500e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2224 1.2507890351116657e-02</internalNodes>\n          <leafValues>\n            -1.7865059897303581e-02 1.4156140387058258e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2225 -1.5477590262889862e-02</internalNodes>\n          <leafValues>\n            3.1676650047302246e-01 -3.3510830253362656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2226 -4.5885699801146984e-03</internalNodes>\n          <leafValues>\n            -1.5222150087356567e-01 7.3211863636970520e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2227 -2.0505970343947411e-02</internalNodes>\n          <leafValues>\n            1.1725380271673203e-01 -9.7457922995090485e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2228 -1.3098320364952087e-01</internalNodes>\n          <leafValues>\n            5.4338067770004272e-01 -5.8803129941225052e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2229 4.7888278961181641e-02</internalNodes>\n          <leafValues>\n            -2.7120810002088547e-02 3.5723638534545898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2230 2.5441530346870422e-01</internalNodes>\n          <leafValues>\n            2.5680949911475182e-03 -9.9988257884979248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2231 2.0652529783546925e-03</internalNodes>\n          <leafValues>\n            -9.4255000352859497e-02 1.0068359971046448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2232 3.0141780152916908e-02</internalNodes>\n          <leafValues>\n            -1.5984520316123962e-02 2.4209509789943695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2233 1.2305500358343124e-01</internalNodes>\n          <leafValues>\n            4.3902460485696793e-02 -2.9046860337257385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2234 1.1436889879405499e-02</internalNodes>\n          <leafValues>\n            3.1826701015233994e-02 -1.0569609701633453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2235 1.4229659922420979e-02</internalNodes>\n          <leafValues>\n            -6.4518727362155914e-02 1.6178989410400391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2236 -1.9808039069175720e-02</internalNodes>\n          <leafValues>\n            2.0909899473190308e-01 -2.7245460078120232e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2237 -3.2634709030389786e-02</internalNodes>\n          <leafValues>\n            -4.6265149116516113e-01 2.3877989500761032e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2238 8.1568211317062378e-02</internalNodes>\n          <leafValues>\n            -1.0983820073306561e-02 7.4517530202865601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2239 1.7331159906461835e-03</internalNodes>\n          <leafValues>\n            6.2832579016685486e-02 -1.5800160169601440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2240 4.1524558328092098e-03</internalNodes>\n          <leafValues>\n            2.8520949184894562e-02 -8.3923816680908203e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2241 2.0917340589221567e-04</internalNodes>\n          <leafValues>\n            -1.6536650061607361e-01 8.3170376718044281e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2242 -6.9550168700516224e-04</internalNodes>\n          <leafValues>\n            5.7298898696899414e-02 -9.8668128252029419e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2243 1.0114730149507523e-01</internalNodes>\n          <leafValues>\n            -2.7031859382987022e-02 5.0937288999557495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2244 2.0371530205011368e-02</internalNodes>\n          <leafValues>\n            -1.5991339460015297e-02 2.1110190451145172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2245 1.9490359723567963e-01</internalNodes>\n          <leafValues>\n            1.1169149540364742e-02 -8.0626577138900757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2246 -1.5187750104814768e-03</internalNodes>\n          <leafValues>\n            8.8670432567596436e-02 -6.5779693424701691e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2247 -2.2300280761555769e-05</internalNodes>\n          <leafValues>\n            7.0237100124359131e-02 -1.3656799495220184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2248 7.0241810753941536e-03</internalNodes>\n          <leafValues>\n            4.5264270156621933e-02 -1.2246630340814590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2249 -5.8513730764389038e-03</internalNodes>\n          <leafValues>\n            1.4548699557781219e-01 -7.7512867748737335e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2250 -1.2228869833052158e-02</internalNodes>\n          <leafValues>\n            -1.5762320160865784e-01 3.3091600984334946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2251 -2.7475339174270630e-01</internalNodes>\n          <leafValues>\n            4.1415899991989136e-01 -2.3306179791688919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2252 -8.3073312416672707e-03</internalNodes>\n          <leafValues>\n            -6.6158972680568695e-02 4.5423369854688644e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2253 1.4967099763453007e-02</internalNodes>\n          <leafValues>\n            3.9580021053552628e-02 -2.4474979937076569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2254 3.5121920518577099e-03</internalNodes>\n          <leafValues>\n            -3.2608591020107269e-02 7.2080552577972412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2255 6.0676191933453083e-03</internalNodes>\n          <leafValues>\n            -6.6284246742725372e-02 1.6455779969692230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2256 -6.0948841273784637e-03</internalNodes>\n          <leafValues>\n            -1.6784119606018066e-01 6.8097747862339020e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2257 -4.4710501097142696e-03</internalNodes>\n          <leafValues>\n            1.4348860085010529e-01 -7.5286053121089935e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2258 2.7629999443888664e-02</internalNodes>\n          <leafValues>\n            -6.0715568251907825e-03 4.6235299110412598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2259 -4.1778348386287689e-03</internalNodes>\n          <leafValues>\n            -9.4480186700820923e-02 1.0268689692020416e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2260 -1.4997010293882340e-04</internalNodes>\n          <leafValues>\n            4.5903969556093216e-02 -1.2689989805221558e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2261 9.3421656638383865e-03</internalNodes>\n          <leafValues>\n            -4.7851350158452988e-02 2.3776920139789581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2262 -9.0454798191785812e-03</internalNodes>\n          <leafValues>\n            -1.4881759881973267e-01 2.5717660784721375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2263 -1.0563050163909793e-03</internalNodes>\n          <leafValues>\n            -1.2465219944715500e-01 8.2118943333625793e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2264 -1.5602169558405876e-02</internalNodes>\n          <leafValues>\n            3.0471551418304443e-01 -2.4503290653228760e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2265 -8.9588612318038940e-03</internalNodes>\n          <leafValues>\n            -2.3624059557914734e-01 4.6290140599012375e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2266 -7.6452922075986862e-03</internalNodes>\n          <leafValues>\n            1.1393140256404877e-01 -2.6573060080409050e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2267 -1.9294900819659233e-02</internalNodes>\n          <leafValues>\n            2.8820019960403442e-01 -3.5906881093978882e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2268 8.6250286549329758e-03</internalNodes>\n          <leafValues>\n            6.1006020754575729e-02 -1.6832630336284637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2269 2.5883490219712257e-02</internalNodes>\n          <leafValues>\n            -4.0142849087715149e-02 2.3263120651245117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2270 -7.4946112930774689e-02</internalNodes>\n          <leafValues>\n            7.1168798208236694e-01 -6.0237408615648746e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2271 -2.6808120310306549e-04</internalNodes>\n          <leafValues>\n            7.7717900276184082e-02 -1.5358750522136688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2272 6.1041440814733505e-02</internalNodes>\n          <leafValues>\n            -3.4070160239934921e-02 2.5833290815353394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2273 -4.7920648939907551e-03</internalNodes>\n          <leafValues>\n            -1.5077829360961914e-01 8.4577240049839020e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2274 -1.2610630691051483e-01</internalNodes>\n          <leafValues>\n            -4.8404538631439209e-01 8.6965439841151237e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2275 -2.2879270836710930e-02</internalNodes>\n          <leafValues>\n            6.7734187841415405e-01 -1.4856100082397461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2276 -6.2760512810200453e-04</internalNodes>\n          <leafValues>\n            5.0910349935293198e-02 -1.4076440036296844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2277 -1.0543179698288441e-02</internalNodes>\n          <leafValues>\n            -9.0707249939441681e-02 1.1281900107860565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2278 -2.4953829124569893e-03</internalNodes>\n          <leafValues>\n            8.9523762464523315e-02 -7.5541287660598755e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2279 6.0986150056123734e-02</internalNodes>\n          <leafValues>\n            -3.2006978988647461e-02 3.3000910282135010e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>143</maxWeakCount>\n      <stageThreshold>-3.0555000305175781e+01</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2280 -4.1241809725761414e-02</internalNodes>\n          <leafValues>\n            2.4841840565204620e-01 -6.9879129528999329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2281 -7.4663497507572174e-02</internalNodes>\n          <leafValues>\n            -7.5433689355850220e-01 4.0493709966540337e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2282 -2.3803679272532463e-02</internalNodes>\n          <leafValues>\n            2.4313099682331085e-01 -4.5283928513526917e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2283 3.2028619199991226e-02</internalNodes>\n          <leafValues>\n            -1.2230539694428444e-02 3.9811220765113831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2284 3.8454410969279706e-04</internalNodes>\n          <leafValues>\n            6.9244839251041412e-02 -1.7288799583911896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2285 -2.0599530544131994e-03</internalNodes>\n          <leafValues>\n            4.5083250850439072e-02 -6.3824482262134552e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2286 5.9174500405788422e-02</internalNodes>\n          <leafValues>\n            1.3756089843809605e-02 5.8063977956771851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2287 -8.1204501911997795e-03</internalNodes>\n          <leafValues>\n            -7.9060196876525879e-02 3.2097879797220230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2288 -5.4362448863685131e-03</internalNodes>\n          <leafValues>\n            8.0285012722015381e-02 -1.3880789279937744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2289 4.0768779814243317e-02</internalNodes>\n          <leafValues>\n            3.5265129059553146e-02 -1.6821040213108063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2290 -1.0705769993364811e-02</internalNodes>\n          <leafValues>\n            -1.3227799534797668e-01 9.7147703170776367e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2291 -2.1374409552663565e-03</internalNodes>\n          <leafValues>\n            -1.1135129630565643e-01 1.0501199960708618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2292 -6.0069030150771141e-03</internalNodes>\n          <leafValues>\n            7.9701423645019531e-02 -1.4503550529479980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2293 6.8584359250962734e-03</internalNodes>\n          <leafValues>\n            -2.8629170730710030e-02 1.5494349598884583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2294 8.4308702498674393e-03</internalNodes>\n          <leafValues>\n            -6.8725876510143280e-02 1.3571439683437347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2295 -3.1918209046125412e-02</internalNodes>\n          <leafValues>\n            -9.0021647512912750e-02 7.0172756910324097e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2296 1.4346960186958313e-01</internalNodes>\n          <leafValues>\n            3.7936199456453323e-02 -3.3849731087684631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2297 -5.3501531481742859e-02</internalNodes>\n          <leafValues>\n            -1. -1.3069049455225468e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2298 -4.3198501225560904e-04</internalNodes>\n          <leafValues>\n            6.3140459358692169e-02 -1.4891080558300018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2299 -3.6825511604547501e-02</internalNodes>\n          <leafValues>\n            1.6418960690498352e-01 -3.6547198891639709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2300 -9.3230612576007843e-02</internalNodes>\n          <leafValues>\n            -8.1855481863021851e-01 1.0488729923963547e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2301 -7.5886500999331474e-03</internalNodes>\n          <leafValues>\n            9.6189923584461212e-02 -3.2392729073762894e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2302 1.9316580146551132e-03</internalNodes>\n          <leafValues>\n            -9.7133457660675049e-02 9.6836537122726440e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2303 -1.7610849440097809e-01</internalNodes>\n          <leafValues>\n            -1. 3.9064860902726650e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2304 -4.5753358863294125e-03</internalNodes>\n          <leafValues>\n            -1.4245940744876862e-01 7.2629533708095551e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2305 -7.1555696427822113e-02</internalNodes>\n          <leafValues>\n            7.0124769210815430e-01 -8.1192785874009132e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2306 -5.1939189434051514e-03</internalNodes>\n          <leafValues>\n            -1.7593400180339813e-01 6.6920258104801178e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2307 9.7410175949335098e-03</internalNodes>\n          <leafValues>\n            -4.0632858872413635e-02 1.5366269648075104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2308 -1.9197730347514153e-02</internalNodes>\n          <leafValues>\n            8.8404722511768341e-02 -1.1119589954614639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2309 7.7713979408144951e-03</internalNodes>\n          <leafValues>\n            -5.1531080156564713e-02 2.3341870307922363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2310 4.6741779893636703e-02</internalNodes>\n          <leafValues>\n            5.8658950030803680e-02 -2.1825340390205383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2311 -6.7051820456981659e-02</internalNodes>\n          <leafValues>\n            -7.6968950033187866e-01 2.2733330260962248e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2312 1.0403609834611416e-02</internalNodes>\n          <leafValues>\n            -5.7208269834518433e-02 1.9874769449234009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2313 6.8136617541313171e-02</internalNodes>\n          <leafValues>\n            1.0924750007688999e-02 -2.3514769971370697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2314 5.5462731979787350e-03</internalNodes>\n          <leafValues>\n            7.6430208981037140e-02 -1.5048150718212128e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2315 3.5827890038490295e-02</internalNodes>\n          <leafValues>\n            5.2330200560390949e-03 -9.0509557723999023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2316 1.0099080391228199e-02</internalNodes>\n          <leafValues>\n            -4.9438349902629852e-02 1.9236649572849274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2317 -7.3000352131202817e-04</internalNodes>\n          <leafValues>\n            8.0038689076900482e-02 -5.9875860810279846e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2318 -6.2627308070659637e-02</internalNodes>\n          <leafValues>\n            -6.8771952390670776e-01 1.4409339986741543e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2319 4.1463607922196388e-03</internalNodes>\n          <leafValues>\n            6.2068879604339600e-02 -1.4138600230216980e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2320 -1.4136059582233429e-01</internalNodes>\n          <leafValues>\n            5.9439867734909058e-01 -1.6910530626773834e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2321 7.0147067308425903e-02</internalNodes>\n          <leafValues>\n            3.5781029146164656e-03 -8.4541380405426025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2322 1.8181180348619819e-03</internalNodes>\n          <leafValues>\n            -5.9031128883361816e-02 1.7709979414939880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2323 6.3149541616439819e-02</internalNodes>\n          <leafValues>\n            -7.9691512510180473e-03 2.4575470387935638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2324 1.7065559513866901e-03</internalNodes>\n          <leafValues>\n            -1.3776679337024689e-01 7.2286598384380341e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2325 -4.1844159364700317e-02</internalNodes>\n          <leafValues>\n            -1.0204549878835678e-01 1.9412880763411522e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2326 6.1876028776168823e-02</internalNodes>\n          <leafValues>\n            1.7572570592164993e-02 -5.9611201286315918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2327 8.6206607520580292e-02</internalNodes>\n          <leafValues>\n            -8.3246696740388870e-03 5.9274739027023315e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2328 1.5561250038444996e-02</internalNodes>\n          <leafValues>\n            5.5908791720867157e-02 -2.0174680650234222e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2329 1.9683360587805510e-03</internalNodes>\n          <leafValues>\n            8.4109783172607422e-02 -9.5114283263683319e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2330 -3.2295130658894777e-03</internalNodes>\n          <leafValues>\n            1.9859789311885834e-01 -6.0371041297912598e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2331 4.3861459940671921e-02</internalNodes>\n          <leafValues>\n            -7.5495638884603977e-03 2.7785310149192810e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2332 -7.1588042192161083e-04</internalNodes>\n          <leafValues>\n            1.0671679675579071e-01 -1.1605340242385864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2333 -1.1585080064833164e-02</internalNodes>\n          <leafValues>\n            1.3923209905624390e-01 -7.2681717574596405e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2334 -2.4132030084729195e-02</internalNodes>\n          <leafValues>\n            -3.4343299269676208e-01 2.8587639331817627e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2335 -5.9670167975127697e-03</internalNodes>\n          <leafValues>\n            6.2854968011379242e-02 -6.3237912952899933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2336 -5.7298261672258377e-02</internalNodes>\n          <leafValues>\n            3.3512100577354431e-01 -3.4425679594278336e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2337 -1.4440530538558960e-01</internalNodes>\n          <leafValues>\n            -1. -2.0486500579863787e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2338 -1.6152009367942810e-02</internalNodes>\n          <leafValues>\n            -1.8017260730266571e-01 6.0698080807924271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2339 3.1132341246120632e-04</internalNodes>\n          <leafValues>\n            -8.7393969297409058e-02 1.0814479738473892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2340 -3.4905138891190290e-03</internalNodes>\n          <leafValues>\n            1.3089099526405334e-01 -8.2502506673336029e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2341 -5.1078200340270996e-02</internalNodes>\n          <leafValues>\n            -6.6744989156723022e-01 9.7670806571841240e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2342 2.3027899861335754e-01</internalNodes>\n          <leafValues>\n            8.9318687096238136e-03 -8.8892549276351929e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2343 3.3260289579629898e-02</internalNodes>\n          <leafValues>\n            -3.8846820592880249e-02 1.1871550232172012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2344 3.6332090385258198e-03</internalNodes>\n          <leafValues>\n            -8.1865288317203522e-02 1.2006369978189468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2345 -1.3659459364134818e-04</internalNodes>\n          <leafValues>\n            2.9094040393829346e-02 -8.6412712931632996e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2346 4.2663831263780594e-03</internalNodes>\n          <leafValues>\n            5.9642590582370758e-02 -1.6777870059013367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2347 -3.7726368755102158e-02</internalNodes>\n          <leafValues>\n            2.5201418995857239e-01 -1.1480459943413734e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2348 -3.7723951041698456e-02</internalNodes>\n          <leafValues>\n            3.6150801181793213e-01 -2.5164980441331863e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2349 -3.5217531025409698e-02</internalNodes>\n          <leafValues>\n            -2.0768259465694427e-01 1.5659499913454056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2350 -2.6250150054693222e-02</internalNodes>\n          <leafValues>\n            6.4363038539886475e-01 -1.3971080072224140e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2351 7.1132831275463104e-02</internalNodes>\n          <leafValues>\n            5.0701410509645939e-03 -8.1053668260574341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2352 2.8358760755509138e-03</internalNodes>\n          <leafValues>\n            8.0034732818603516e-02 -1.1766050010919571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2353 3.4837881103157997e-03</internalNodes>\n          <leafValues>\n            6.9709457457065582e-02 -1.2136720120906830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2354 2.9538539820350707e-05</internalNodes>\n          <leafValues>\n            -1.7090520262718201e-01 7.0092067122459412e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2355 2.6345230638980865e-02</internalNodes>\n          <leafValues>\n            -1.1046449653804302e-02 3.5467839241027832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2356 3.3180779428221285e-04</internalNodes>\n          <leafValues>\n            -8.9763849973678589e-02 1.0402739793062210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2357 9.9607985466718674e-03</internalNodes>\n          <leafValues>\n            -1.0574670135974884e-01 8.7481163442134857e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2358 6.9068476557731628e-02</internalNodes>\n          <leafValues>\n            -2.3135760799050331e-02 3.7765979766845703e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2359 -3.3804871141910553e-02</internalNodes>\n          <leafValues>\n            -8.0052927136421204e-02 6.6171988844871521e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2360 -2.1103899925947189e-03</internalNodes>\n          <leafValues>\n            7.2913236916065216e-02 -1.6986669600009918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2361 7.1675583720207214e-02</internalNodes>\n          <leafValues>\n            -2.2668020799756050e-02 4.3757459521293640e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2362 -1.7637129873037338e-02</internalNodes>\n          <leafValues>\n            1.4710550010204315e-01 -7.7648147940635681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2363 2.1559430751949549e-03</internalNodes>\n          <leafValues>\n            -4.4561479240655899e-02 8.0616250634193420e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2364 -2.9923371039330959e-03</internalNodes>\n          <leafValues>\n            1.6013230383396149e-01 -7.2628170251846313e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2365 -2.8351619839668274e-02</internalNodes>\n          <leafValues>\n            -2.4835529923439026e-01 7.8493626788258553e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2366 -5.3842412307858467e-03</internalNodes>\n          <leafValues>\n            -1.3290390372276306e-01 7.8615352511405945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2367 1.6513720154762268e-02</internalNodes>\n          <leafValues>\n            -3.0867580324411392e-02 2.2910499572753906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2368 -2.3480059579014778e-02</internalNodes>\n          <leafValues>\n            -3.4656900167465210e-01 2.8477910906076431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2369 6.4804457128047943e-02</internalNodes>\n          <leafValues>\n            3.2681180164217949e-03 -8.1848317384719849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2370 2.9363438952714205e-03</internalNodes>\n          <leafValues>\n            6.8371996283531189e-02 -1.6038259863853455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2371 1.9352639093995094e-02</internalNodes>\n          <leafValues>\n            1.2330809608101845e-02 -1.7751510441303253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2372 -1.4157049590721726e-03</internalNodes>\n          <leafValues>\n            1.6248740255832672e-01 -8.4821969270706177e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2373 -3.2165680080652237e-02</internalNodes>\n          <leafValues>\n            2.5495579838752747e-01 -1.5387820079922676e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2374 9.9883928894996643e-02</internalNodes>\n          <leafValues>\n            1.1630980297923088e-02 -8.6939221620559692e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2375 -8.5509859491139650e-04</internalNodes>\n          <leafValues>\n            3.7509139627218246e-02 -4.1315130889415741e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2376 1.9948679953813553e-02</internalNodes>\n          <leafValues>\n            -3.3211439847946167e-02 2.6546698808670044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2377 -1.6821360215544701e-02</internalNodes>\n          <leafValues>\n            -1.9504530727863312e-01 4.5578271150588989e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2378 -8.1685081124305725e-02</internalNodes>\n          <leafValues>\n            8.0823719501495361e-01 -1.0028379969298840e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2379 -3.9467110764235258e-04</internalNodes>\n          <leafValues>\n            3.7868868559598923e-02 -7.4321702122688293e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2380 -4.1939578950405121e-02</internalNodes>\n          <leafValues>\n            -7.5310271978378296e-01 1.2494780123233795e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2381 1.2319780141115189e-01</internalNodes>\n          <leafValues>\n            1.5212129801511765e-03 -8.7456828355789185e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2382 4.3162349611520767e-03</internalNodes>\n          <leafValues>\n            9.5917366445064545e-02 -9.8286882042884827e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2383 1.7064419807866216e-03</internalNodes>\n          <leafValues>\n            -6.7283846437931061e-02 5.8372668921947479e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2384 6.8853497505187988e-02</internalNodes>\n          <leafValues>\n            3.9853271096944809e-02 -2.7014040946960449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2385 1.5133110573515296e-03</internalNodes>\n          <leafValues>\n            3.6803830415010452e-02 -7.8638777136802673e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2386 1.6671700403094292e-02</internalNodes>\n          <leafValues>\n            -5.2208479493856430e-02 2.5476139783859253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2387 -2.4927379563450813e-03</internalNodes>\n          <leafValues>\n            -6.8352922797203064e-02 3.9182528853416443e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2388 1.7946650041267276e-03</internalNodes>\n          <leafValues>\n            7.5641617178916931e-02 -1.8443019688129425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2389 6.5764516592025757e-02</internalNodes>\n          <leafValues>\n            -2.7957379817962646e-02 1.3770729303359985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2390 -3.2415628433227539e-02</internalNodes>\n          <leafValues>\n            2.4957719445228577e-01 -3.8401741534471512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2391 1.5985220670700073e-01</internalNodes>\n          <leafValues>\n            2.3139530792832375e-02 -4.5876979827880859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2392 3.3003050833940506e-02</internalNodes>\n          <leafValues>\n            -2.8549650683999062e-02 3.6482268571853638e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2393 8.3292415365576744e-03</internalNodes>\n          <leafValues>\n            2.3422110825777054e-02 -1.2992739677429199e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2394 -1.4707380533218384e-01</internalNodes>\n          <leafValues>\n            -1. 1.0342770256102085e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2395 1.0625930130481720e-01</internalNodes>\n          <leafValues>\n            2.8901589103043079e-03 -6.2105101346969604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2396 4.7905001789331436e-02</internalNodes>\n          <leafValues>\n            -2.5437310338020325e-02 3.8595038652420044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2397 4.3562948703765869e-02</internalNodes>\n          <leafValues>\n            1.2963670305907726e-02 -3.1574508547782898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2398 -6.6401511430740356e-02</internalNodes>\n          <leafValues>\n            3.7184339761734009e-01 -2.4248229339718819e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2399 1.0357169667258859e-03</internalNodes>\n          <leafValues>\n            -3.3857159316539764e-02 7.2818137705326080e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2400 -1.0010260343551636e-01</internalNodes>\n          <leafValues>\n            -2.6162430644035339e-01 4.0561348199844360e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2401 -1.4029429852962494e-01</internalNodes>\n          <leafValues>\n            1.6186380386352539e-01 -3.7463869899511337e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2402 -3.6629181355237961e-02</internalNodes>\n          <leafValues>\n            -3.7988689541816711e-01 2.2493759170174599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2403 1.8527939915657043e-01</internalNodes>\n          <leafValues>\n            -3.4648380242288113e-03 9.9972921609878540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2404 1.3452930375933647e-02</internalNodes>\n          <leafValues>\n            6.6191017627716064e-02 -1.5208050608634949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2405 8.4628060460090637e-02</internalNodes>\n          <leafValues>\n            -3.2134260982275009e-02 2.2877800464630127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2406 -8.7568372488021851e-02</internalNodes>\n          <leafValues>\n            4.3229681253433228e-01 -2.4735029786825180e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2407 2.6502339169383049e-02</internalNodes>\n          <leafValues>\n            2.3526629433035851e-02 -2.9849499464035034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2408 -1.8273059278726578e-02</internalNodes>\n          <leafValues>\n            5.0878030061721802e-01 -1.9735949113965034e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2409 -1.1995369568467140e-03</internalNodes>\n          <leafValues>\n            7.4867762625217438e-02 -7.3861390352249146e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2410 3.1381230801343918e-02</internalNodes>\n          <leafValues>\n            -2.6280479505658150e-02 3.6583951115608215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2411 2.3178670555353165e-02</internalNodes>\n          <leafValues>\n            3.7155259400606155e-02 -2.5468569993972778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2412 -1.3644699938595295e-02</internalNodes>\n          <leafValues>\n            2.0717699825763702e-01 -4.2792771011590958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2413 7.8315278515219688e-03</internalNodes>\n          <leafValues>\n            3.6028519272804260e-02 -8.0337040126323700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2414 -1.0035780258476734e-02</internalNodes>\n          <leafValues>\n            -2.2253769636154175e-01 4.2950030416250229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2415 -5.1132131367921829e-02</internalNodes>\n          <leafValues>\n            3.0586650967597961e-01 -2.7054589241743088e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2416 -6.9544702768325806e-02</internalNodes>\n          <leafValues>\n            3.4688460826873779e-01 -3.1736221164464951e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2417 -2.4079360067844391e-02</internalNodes>\n          <leafValues>\n            1.3291560113430023e-01 -3.0277779325842857e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2418 -6.6630518995225430e-03</internalNodes>\n          <leafValues>\n            -1.8473480641841888e-01 7.8750252723693848e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2419 4.3147690594196320e-02</internalNodes>\n          <leafValues>\n            -9.1566536575555801e-03 2.9485818743705750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2420 -1.3808339834213257e-02</internalNodes>\n          <leafValues>\n            -2.8479158878326416e-01 3.2622188329696655e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2421 1.6351899504661560e-01</internalNodes>\n          <leafValues>\n            -3.7377059925347567e-03 5.6042182445526123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2422 -2.4086149409413338e-02</internalNodes>\n          <leafValues>\n            1.5841430425643921e-01 -6.6294513642787933e-02</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          5 5 12 6 -1.</_>\n        <_>\n          9 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 10 4 -1.</_>\n        <_>\n          7 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 9 4 -1.</_>\n        <_>\n          6 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 5 6 -1.</_>\n        <_>\n          15 6 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 1 22 14 -1.</_>\n        <_>\n          11 1 11 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 4 -1.</_>\n        <_>\n          6 11 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 5 -1.</_>\n        <_>\n          7 6 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 13 12 4 -1.</_>\n        <_>\n          11 13 6 2 2.</_>\n        <_>\n          5 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 8 6 -1.</_>\n        <_>\n          7 12 4 3 2.</_>\n        <_>\n          11 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 2 18 -1.</_>\n        <_>\n          20 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 12 -1.</_>\n        <_>\n          10 6 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 6 -1.</_>\n        <_>\n          10 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 2 -1.</_>\n        <_>\n          5 16 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 2 18 -1.</_>\n        <_>\n          20 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 18 -1.</_>\n        <_>\n          0 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          13 7 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 14 7 4 -1.</_>\n        <_>\n          2 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 7 4 -1.</_>\n        <_>\n          13 7 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 12 -1.</_>\n        <_>\n          4 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 10 -1.</_>\n        <_>\n          11 4 3 5 2.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 10 -1.</_>\n        <_>\n          6 8 3 5 2.</_>\n        <_>\n          9 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 6 6 -1.</_>\n        <_>\n          11 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 8 3 -1.</_>\n        <_>\n          5 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 10 4 -1.</_>\n        <_>\n          6 11 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 8 3 -1.</_>\n        <_>\n          10 6 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 13 22 5 -1.</_>\n        <_>\n          0 13 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 14 3 -1.</_>\n        <_>\n          9 13 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 2 10 -1.</_>\n        <_>\n          11 5 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 10 2 -1.</_>\n        <_>\n          11 5 10 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 0 8 8 -1.</_>\n        <_>\n          18 0 4 4 2.</_>\n        <_>\n          14 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 10 -1.</_>\n        <_>\n          5 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 12 -1.</_>\n        <_>\n          16 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 4 -1.</_>\n        <_>\n          3 3 6 2 2.</_>\n        <_>\n          9 5 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 20 3 -1.</_>\n        <_>\n          7 2 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 8 -1.</_>\n        <_>\n          11 7 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 18 3 -1.</_>\n        <_>\n          4 10 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 16 14 -1.</_>\n        <_>\n          3 3 8 7 2.</_>\n        <_>\n          11 10 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 8 4 -1.</_>\n        <_>\n          7 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 7 -1.</_>\n        <_>\n          10 7 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 5 -1.</_>\n        <_>\n          11 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 22 4 -1.</_>\n        <_>\n          11 6 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 12 -1.</_>\n        <_>\n          17 6 3 6 2.</_>\n        <_>\n          14 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 6 4 -1.</_>\n        <_>\n          4 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 6 4 -1.</_>\n        <_>\n          12 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 6 4 -1.</_>\n        <_>\n          4 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 6 -1.</_>\n        <_>\n          12 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 11 3 -1.</_>\n        <_>\n          8 1 11 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 4 -1.</_>\n        <_>\n          13 0 6 2 2.</_>\n        <_>\n          7 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 6 -1.</_>\n        <_>\n          8 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 3 8 -1.</_>\n        <_>\n          15 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 7 -1.</_>\n        <_>\n          9 2 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 4 -1.</_>\n        <_>\n          9 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 7 -1.</_>\n        <_>\n          7 3 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 14 6 4 -1.</_>\n        <_>\n          5 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 6 -1.</_>\n        <_>\n          13 4 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 12 4 -1.</_>\n        <_>\n          5 14 6 2 2.</_>\n        <_>\n          11 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 16 6 -1.</_>\n        <_>\n          11 12 8 3 2.</_>\n        <_>\n          3 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 4 -1.</_>\n        <_>\n          6 11 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 10 -1.</_>\n        <_>\n          14 0 5 5 2.</_>\n        <_>\n          9 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 6 -1.</_>\n        <_>\n          8 8 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 7 20 11 -1.</_>\n        <_>\n          1 7 10 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 12 3 -1.</_>\n        <_>\n          9 0 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 6 -1.</_>\n        <_>\n          13 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 8 -1.</_>\n        <_>\n          5 2 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 8 6 -1.</_>\n        <_>\n          18 0 4 3 2.</_>\n        <_>\n          14 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 6 -1.</_>\n        <_>\n          9 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 6 -1.</_>\n        <_>\n          13 3 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 6 -1.</_>\n        <_>\n          7 3 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 8 6 -1.</_>\n        <_>\n          17 0 4 3 2.</_>\n        <_>\n          13 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 6 -1.</_>\n        <_>\n          0 0 4 3 2.</_>\n        <_>\n          4 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 6 -1.</_>\n        <_>\n          12 0 5 3 2.</_>\n        <_>\n          7 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 22 2 -1.</_>\n        <_>\n          11 15 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 12 4 -1.</_>\n        <_>\n          5 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 6 4 -1.</_>\n        <_>\n          5 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 17 3 -1.</_>\n        <_>\n          3 10 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 16 10 -1.</_>\n        <_>\n          3 8 8 5 2.</_>\n        <_>\n          11 13 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 6 -1.</_>\n        <_>\n          14 0 5 3 2.</_>\n        <_>\n          9 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 4 -1.</_>\n        <_>\n          3 0 6 2 2.</_>\n        <_>\n          9 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 14 3 -1.</_>\n        <_>\n          4 10 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 11 4 -1.</_>\n        <_>\n          1 16 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 6 -1.</_>\n        <_>\n          13 0 6 3 2.</_>\n        <_>\n          7 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 10 6 -1.</_>\n        <_>\n          3 0 5 3 2.</_>\n        <_>\n          8 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 3 -1.</_>\n        <_>\n          6 0 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 4 -1.</_>\n        <_>\n          14 8 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 5 16 -1.</_>\n        <_>\n          0 10 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 22 5 -1.</_>\n        <_>\n          0 3 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 3 -1.</_>\n        <_>\n          10 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 14 -1.</_>\n        <_>\n          15 0 1 14 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 14 2 -1.</_>\n        <_>\n          7 0 14 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 5 -1.</_>\n        <_>\n          6 11 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 9 -1.</_>\n        <_>\n          9 6 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 12 3 -1.</_>\n        <_>\n          14 1 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 3 -1.</_>\n        <_>\n          4 1 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 6 -1.</_>\n        <_>\n          14 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 22 7 -1.</_>\n        <_>\n          11 10 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 11 -1.</_>\n        <_>\n          11 2 2 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 14 16 4 -1.</_>\n        <_>\n          3 14 8 2 2.</_>\n        <_>\n          11 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 6 -1.</_>\n        <_>\n          14 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 6 6 -1.</_>\n        <_>\n          6 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 4 -1.</_>\n        <_>\n          11 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 4 -1.</_>\n        <_>\n          0 0 6 2 2.</_>\n        <_>\n          6 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 4 6 -1.</_>\n        <_>\n          15 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 4 6 -1.</_>\n        <_>\n          5 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 4 7 -1.</_>\n        <_>\n          18 5 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 5 7 4 -1.</_>\n        <_>\n          4 5 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 12 3 -1.</_>\n        <_>\n          13 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 12 3 -1.</_>\n        <_>\n          5 6 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 22 10 -1.</_>\n        <_>\n          11 0 11 5 2.</_>\n        <_>\n          0 5 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 3 -1.</_>\n        <_>\n          2 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 8 6 -1.</_>\n        <_>\n          17 3 4 3 2.</_>\n        <_>\n          13 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 14 4 -1.</_>\n        <_>\n          4 14 7 2 2.</_>\n        <_>\n          11 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 11 -1.</_>\n        <_>\n          11 2 2 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 11 4 -1.</_>\n        <_>\n          11 2 11 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 12 3 -1.</_>\n        <_>\n          10 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 4 6 -1.</_>\n        <_>\n          9 7 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 16 6 -1.</_>\n        <_>\n          11 11 8 3 2.</_>\n        <_>\n          3 14 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 8 6 -1.</_>\n        <_>\n          1 3 4 3 2.</_>\n        <_>\n          5 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 12 3 -1.</_>\n        <_>\n          5 5 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 8 4 -1.</_>\n        <_>\n          11 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 15 3 -1.</_>\n        <_>\n          7 4 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 4 -1.</_>\n        <_>\n          6 8 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 12 3 -1.</_>\n        <_>\n          10 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 3 -1.</_>\n        <_>\n          6 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 4 -1.</_>\n        <_>\n          10 7 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 16 -1.</_>\n        <_>\n          6 10 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 6 -1.</_>\n        <_>\n          10 4 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 3 -1.</_>\n        <_>\n          6 11 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 8 -1.</_>\n        <_>\n          17 9 3 4 2.</_>\n        <_>\n          14 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 4 -1.</_>\n        <_>\n          11 0 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 8 -1.</_>\n        <_>\n          14 10 3 4 2.</_>\n        <_>\n          11 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 12 2 -1.</_>\n        <_>\n          5 17 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 14 4 -1.</_>\n        <_>\n          5 11 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 6 8 -1.</_>\n        <_>\n          2 9 3 4 2.</_>\n        <_>\n          5 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 6 4 -1.</_>\n        <_>\n          15 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 4 -1.</_>\n        <_>\n          4 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 8 5 -1.</_>\n        <_>\n          13 5 4 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 9 2 -1.</_>\n        <_>\n          11 5 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 9 12 -1.</_>\n        <_>\n          15 10 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 8 -1.</_>\n        <_>\n          5 10 3 4 2.</_>\n        <_>\n          8 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 5 12 -1.</_>\n        <_>\n          9 8 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 9 2 -1.</_>\n        <_>\n          11 5 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 12 -1.</_>\n        <_>\n          10 4 5 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 8 5 -1.</_>\n        <_>\n          5 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 4 -1.</_>\n        <_>\n          14 8 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 6 -1.</_>\n        <_>\n          8 8 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 9 -1.</_>\n        <_>\n          11 3 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 4 -1.</_>\n        <_>\n          7 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 10 -1.</_>\n        <_>\n          13 7 3 5 2.</_>\n        <_>\n          10 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 6 10 -1.</_>\n        <_>\n          6 7 3 5 2.</_>\n        <_>\n          9 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 2 -1.</_>\n        <_>\n          7 0 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 9 -1.</_>\n        <_>\n          2 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 15 -1.</_>\n        <_>\n          12 2 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 15 -1.</_>\n        <_>\n          7 2 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 12 4 -1.</_>\n        <_>\n          7 13 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 4 14 -1.</_>\n        <_>\n          4 4 2 7 2.</_>\n        <_>\n          6 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 9 12 -1.</_>\n        <_>\n          15 10 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 9 12 -1.</_>\n        <_>\n          4 10 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 8 12 -1.</_>\n        <_>\n          17 6 4 6 2.</_>\n        <_>\n          13 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 8 3 -1.</_>\n        <_>\n          11 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 3 -1.</_>\n        <_>\n          9 5 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 2 18 -1.</_>\n        <_>\n          10 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 14 2 -1.</_>\n        <_>\n          4 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 4 -1.</_>\n        <_>\n          6 0 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 4 -1.</_>\n        <_>\n          13 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 4 -1.</_>\n        <_>\n          5 0 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 14 4 -1.</_>\n        <_>\n          14 9 7 2 2.</_>\n        <_>\n          7 11 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 18 -1.</_>\n        <_>\n          1 0 4 9 2.</_>\n        <_>\n          5 9 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 4 -1.</_>\n        <_>\n          13 8 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 6 -1.</_>\n        <_>\n          9 8 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 6 4 -1.</_>\n        <_>\n          6 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 7 -1.</_>\n        <_>\n          13 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 4 -1.</_>\n        <_>\n          6 8 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 12 5 -1.</_>\n        <_>\n          13 7 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 3 -1.</_>\n        <_>\n          9 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 6 -1.</_>\n        <_>\n          13 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 6 -1.</_>\n        <_>\n          5 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 6 -1.</_>\n        <_>\n          15 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 10 -1.</_>\n        <_>\n          10 2 4 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 6 -1.</_>\n        <_>\n          15 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 6 -1.</_>\n        <_>\n          5 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 6 6 -1.</_>\n        <_>\n          11 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 8 6 -1.</_>\n        <_>\n          5 12 4 3 2.</_>\n        <_>\n          9 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 6 -1.</_>\n        <_>\n          11 11 6 3 2.</_>\n        <_>\n          5 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 22 8 -1.</_>\n        <_>\n          0 9 11 4 2.</_>\n        <_>\n          11 13 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 13 3 -1.</_>\n        <_>\n          6 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 6 -1.</_>\n        <_>\n          0 2 4 3 2.</_>\n        <_>\n          4 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 16 3 -1.</_>\n        <_>\n          4 10 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 12 3 -1.</_>\n        <_>\n          4 10 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 5 16 -1.</_>\n        <_>\n          16 10 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 7 4 -1.</_>\n        <_>\n          6 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 20 8 -1.</_>\n        <_>\n          11 7 10 4 2.</_>\n        <_>\n          1 11 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 3 -1.</_>\n        <_>\n          5 3 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 6 4 -1.</_>\n        <_>\n          13 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 5 8 -1.</_>\n        <_>\n          1 4 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 13 8 -1.</_>\n        <_>\n          5 4 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 8 -1.</_>\n        <_>\n          9 5 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 8 8 -1.</_>\n        <_>\n          9 4 8 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 8 8 -1.</_>\n        <_>\n          13 4 4 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 14 4 -1.</_>\n        <_>\n          15 0 7 2 2.</_>\n        <_>\n          8 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 12 4 -1.</_>\n        <_>\n          0 10 6 2 2.</_>\n        <_>\n          6 12 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 14 4 -1.</_>\n        <_>\n          15 0 7 2 2.</_>\n        <_>\n          8 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 16 14 -1.</_>\n        <_>\n          7 4 8 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 6 4 -1.</_>\n        <_>\n          13 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 6 4 -1.</_>\n        <_>\n          3 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 2 10 -1.</_>\n        <_>\n          11 5 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 10 2 -1.</_>\n        <_>\n          11 5 10 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 18 4 -1.</_>\n        <_>\n          13 0 9 2 2.</_>\n        <_>\n          4 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 6 -1.</_>\n        <_>\n          6 5 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 6 6 6 -1.</_>\n        <_>\n          14 8 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 6 -1.</_>\n        <_>\n          8 8 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 18 12 -1.</_>\n        <_>\n          4 0 9 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 6 -1.</_>\n        <_>\n          2 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 8 6 -1.</_>\n        <_>\n          7 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 12 -1.</_>\n        <_>\n          8 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 6 6 -1.</_>\n        <_>\n          15 5 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 12 8 3 -1.</_>\n        <_>\n          6 12 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 18 3 -1.</_>\n        <_>\n          8 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 22 2 -1.</_>\n        <_>\n          11 11 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 4 -1.</_>\n        <_>\n          10 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 4 -1.</_>\n        <_>\n          6 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 12 -1.</_>\n        <_>\n          14 0 4 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 4 -1.</_>\n        <_>\n          8 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 20 6 -1.</_>\n        <_>\n          11 12 10 3 2.</_>\n        <_>\n          1 15 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 3 -1.</_>\n        <_>\n          9 15 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 10 -1.</_>\n        <_>\n          13 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 10 4 -1.</_>\n        <_>\n          9 0 5 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 10 -1.</_>\n        <_>\n          13 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 3 10 -1.</_>\n        <_>\n          6 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 10 4 -1.</_>\n        <_>\n          11 4 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 8 -1.</_>\n        <_>\n          0 10 10 4 2.</_>\n        <_>\n          10 14 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 6 7 -1.</_>\n        <_>\n          17 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 9 4 -1.</_>\n        <_>\n          4 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 8 -1.</_>\n        <_>\n          15 4 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 7 -1.</_>\n        <_>\n          3 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 8 4 -1.</_>\n        <_>\n          12 6 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 2 -1.</_>\n        <_>\n          11 2 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 11 8 -1.</_>\n        <_>\n          11 4 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 22 6 -1.</_>\n        <_>\n          0 1 11 3 2.</_>\n        <_>\n          11 4 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 12 -1.</_>\n        <_>\n          12 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 14 7 -1.</_>\n        <_>\n          7 1 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 4 6 -1.</_>\n        <_>\n          16 8 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 7 -1.</_>\n        <_>\n          6 11 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 4 6 -1.</_>\n        <_>\n          13 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 13 3 -1.</_>\n        <_>\n          0 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 3 -1.</_>\n        <_>\n          6 4 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 22 10 -1.</_>\n        <_>\n          0 4 11 5 2.</_>\n        <_>\n          11 9 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 8 4 -1.</_>\n        <_>\n          14 3 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 6 -1.</_>\n        <_>\n          5 5 6 3 2.</_>\n        <_>\n          11 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 6 -1.</_>\n        <_>\n          13 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 4 13 -1.</_>\n        <_>\n          10 4 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 13 -1.</_>\n        <_>\n          12 3 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 6 -1.</_>\n        <_>\n          11 5 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 12 15 -1.</_>\n        <_>\n          11 7 4 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 15 -1.</_>\n        <_>\n          7 7 4 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 12 -1.</_>\n        <_>\n          9 6 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 12 -1.</_>\n        <_>\n          8 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 8 7 -1.</_>\n        <_>\n          10 9 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 7 -1.</_>\n        <_>\n          8 9 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 22 14 -1.</_>\n        <_>\n          11 4 11 7 2.</_>\n        <_>\n          0 11 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 6 -1.</_>\n        <_>\n          2 14 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 5 -1.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 9 4 -1.</_>\n        <_>\n          14 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 6 4 -1.</_>\n        <_>\n          6 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 6 5 -1.</_>\n        <_>\n          15 6 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 6 5 6 -1.</_>\n        <_>\n          7 6 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 12 8 6 -1.</_>\n        <_>\n          13 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 10 8 -1.</_>\n        <_>\n          6 12 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 2 -1.</_>\n        <_>\n          2 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 8 3 -1.</_>\n        <_>\n          5 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 4 -1.</_>\n        <_>\n          14 7 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 7 2 -1.</_>\n        <_>\n          10 0 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 4 6 -1.</_>\n        <_>\n          17 8 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 9 -1.</_>\n        <_>\n          7 3 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 6 -1.</_>\n        <_>\n          9 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 12 -1.</_>\n        <_>\n          3 6 16 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 10 -1.</_>\n        <_>\n          11 0 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 22 14 -1.</_>\n        <_>\n          11 3 11 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 7 -1.</_>\n        <_>\n          12 3 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 11 4 -1.</_>\n        <_>\n          10 2 11 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 4 -1.</_>\n        <_>\n          14 7 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 12 -1.</_>\n        <_>\n          5 11 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 20 9 -1.</_>\n        <_>\n          2 6 10 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 3 -1.</_>\n        <_>\n          7 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 6 -1.</_>\n        <_>\n          13 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 6 4 -1.</_>\n        <_>\n          11 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 4 -1.</_>\n        <_>\n          10 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 6 -1.</_>\n        <_>\n          7 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 8 -1.</_>\n        <_>\n          16 1 1 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 3 -1.</_>\n        <_>\n          9 8 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 4 -1.</_>\n        <_>\n          2 9 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 10 4 -1.</_>\n        <_>\n          11 1 5 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 8 -1.</_>\n        <_>\n          16 1 1 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 3 -1.</_>\n        <_>\n          6 1 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 12 4 -1.</_>\n        <_>\n          16 0 6 2 2.</_>\n        <_>\n          10 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 3 -1.</_>\n        <_>\n          5 3 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 14 3 -1.</_>\n        <_>\n          8 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 4 -1.</_>\n        <_>\n          0 0 6 2 2.</_>\n        <_>\n          6 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 14 4 -1.</_>\n        <_>\n          15 0 7 2 2.</_>\n        <_>\n          8 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 8 6 -1.</_>\n        <_>\n          0 5 4 3 2.</_>\n        <_>\n          4 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 6 4 -1.</_>\n        <_>\n          14 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 10 4 -1.</_>\n        <_>\n          11 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 6 -1.</_>\n        <_>\n          12 8 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 6 -1.</_>\n        <_>\n          10 8 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 10 -1.</_>\n        <_>\n          2 8 3 5 2.</_>\n        <_>\n          5 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 4 9 -1.</_>\n        <_>\n          12 4 2 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 0 12 4 -1.</_>\n        <_>\n          2 0 6 2 2.</_>\n        <_>\n          8 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 9 -1.</_>\n        <_>\n          12 6 1 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 9 4 -1.</_>\n        <_>\n          10 4 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 13 8 5 -1.</_>\n        <_>\n          13 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 8 5 -1.</_>\n        <_>\n          5 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 8 3 -1.</_>\n        <_>\n          7 13 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 6 4 -1.</_>\n        <_>\n          11 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 8 -1.</_>\n        <_>\n          12 8 1 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 8 -1.</_>\n        <_>\n          7 1 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 6 4 -1.</_>\n        <_>\n          14 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 3 -1.</_>\n        <_>\n          10 8 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 12 -1.</_>\n        <_>\n          8 7 3 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 5 6 -1.</_>\n        <_>\n          8 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 4 -1.</_>\n        <_>\n          11 3 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 8 6 -1.</_>\n        <_>\n          9 5 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 6 -1.</_>\n        <_>\n          9 6 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 6 -1.</_>\n        <_>\n          13 6 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 4 -1.</_>\n        <_>\n          12 8 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 8 3 -1.</_>\n        <_>\n          9 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 22 13 -1.</_>\n        <_>\n          0 5 11 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 9 6 -1.</_>\n        <_>\n          5 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 3 10 -1.</_>\n        <_>\n          19 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 12 4 -1.</_>\n        <_>\n          5 16 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 10 4 -1.</_>\n        <_>\n          10 16 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 14 3 -1.</_>\n        <_>\n          1 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 16 4 -1.</_>\n        <_>\n          11 14 8 2 2.</_>\n        <_>\n          3 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 6 4 -1.</_>\n        <_>\n          3 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 11 4 -1.</_>\n        <_>\n          10 3 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 11 4 -1.</_>\n        <_>\n          1 3 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 6 -1.</_>\n        <_>\n          9 5 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 3 -1.</_>\n        <_>\n          4 6 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 7 6 -1.</_>\n        <_>\n          12 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 16 4 -1.</_>\n        <_>\n          1 4 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 15 3 -1.</_>\n        <_>\n          4 10 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 18 6 -1.</_>\n        <_>\n          2 4 9 3 2.</_>\n        <_>\n          11 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 13 -1.</_>\n        <_>\n          14 5 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 4 -1.</_>\n        <_>\n          4 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 5 -1.</_>\n        <_>\n          8 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 4 6 -1.</_>\n        <_>\n          10 8 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 12 12 4 -1.</_>\n        <_>\n          6 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 10 3 -1.</_>\n        <_>\n          8 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 3 12 -1.</_>\n        <_>\n          12 2 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 2 14 16 -1.</_>\n        <_>\n          7 2 7 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 20 4 -1.</_>\n        <_>\n          6 5 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 15 -1.</_>\n        <_>\n          9 1 9 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 6 8 -1.</_>\n        <_>\n          15 4 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 13 4 -1.</_>\n        <_>\n          4 15 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 12 -1.</_>\n        <_>\n          12 2 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 15 2 -1.</_>\n        <_>\n          0 17 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 6 4 -1.</_>\n        <_>\n          12 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 12 4 -1.</_>\n        <_>\n          5 14 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 6 -1.</_>\n        <_>\n          12 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 15 3 -1.</_>\n        <_>\n          0 10 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 14 3 -1.</_>\n        <_>\n          6 10 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 7 6 -1.</_>\n        <_>\n          4 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 6 -1.</_>\n        <_>\n          11 6 5 3 2.</_>\n        <_>\n          6 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 2 -1.</_>\n        <_>\n          3 0 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 9 -1.</_>\n        <_>\n          5 12 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 10 6 -1.</_>\n        <_>\n          6 12 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 8 6 -1.</_>\n        <_>\n          7 6 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 12 -1.</_>\n        <_>\n          6 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 6 -1.</_>\n        <_>\n          14 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 3 -1.</_>\n        <_>\n          10 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 14 4 -1.</_>\n        <_>\n          4 15 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 11 3 -1.</_>\n        <_>\n          9 5 11 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 4 9 -1.</_>\n        <_>\n          12 5 2 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 13 3 -1.</_>\n        <_>\n          0 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 10 -1.</_>\n        <_>\n          16 2 3 5 2.</_>\n        <_>\n          13 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 10 -1.</_>\n        <_>\n          3 2 3 5 2.</_>\n        <_>\n          6 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 11 -1.</_>\n        <_>\n          11 2 2 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 3 -1.</_>\n        <_>\n          4 3 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 12 -1.</_>\n        <_>\n          12 1 2 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 11 4 -1.</_>\n        <_>\n          11 2 11 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 9 -1.</_>\n        <_>\n          11 0 2 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 4 -1.</_>\n        <_>\n          11 0 9 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 2 6 10 -1.</_>\n        <_>\n          19 2 3 5 2.</_>\n        <_>\n          16 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 3 -1.</_>\n        <_>\n          10 1 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 8 -1.</_>\n        <_>\n          12 1 1 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 3 -1.</_>\n        <_>\n          10 1 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 1 4 12 -1.</_>\n        <_>\n          19 1 2 6 2.</_>\n        <_>\n          17 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 4 -1.</_>\n        <_>\n          8 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 5 -1.</_>\n        <_>\n          8 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 13 -1.</_>\n        <_>\n          10 4 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 6 8 -1.</_>\n        <_>\n          19 3 3 4 2.</_>\n        <_>\n          16 7 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 8 -1.</_>\n        <_>\n          0 3 3 4 2.</_>\n        <_>\n          3 7 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 12 4 -1.</_>\n        <_>\n          16 9 6 2 2.</_>\n        <_>\n          10 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 9 12 -1.</_>\n        <_>\n          4 6 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 4 6 -1.</_>\n        <_>\n          15 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 3 -1.</_>\n        <_>\n          11 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 20 2 -1.</_>\n        <_>\n          2 16 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 10 6 -1.</_>\n        <_>\n          1 8 5 3 2.</_>\n        <_>\n          6 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 16 14 -1.</_>\n        <_>\n          14 3 8 7 2.</_>\n        <_>\n          6 10 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 8 -1.</_>\n        <_>\n          1 4 3 4 2.</_>\n        <_>\n          4 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 12 4 -1.</_>\n        <_>\n          7 3 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 6 9 -1.</_>\n        <_>\n          4 9 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 10 4 -1.</_>\n        <_>\n          12 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 12 5 -1.</_>\n        <_>\n          5 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 6 6 -1.</_>\n        <_>\n          17 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 6 6 -1.</_>\n        <_>\n          3 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 6 -1.</_>\n        <_>\n          10 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 16 -1.</_>\n        <_>\n          5 10 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 18 14 -1.</_>\n        <_>\n          4 9 18 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 12 14 -1.</_>\n        <_>\n          5 11 12 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 20 8 -1.</_>\n        <_>\n          7 5 10 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 7 -1.</_>\n        <_>\n          8 0 5 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 5 8 -1.</_>\n        <_>\n          12 0 5 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 13 -1.</_>\n        <_>\n          10 4 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 8 4 -1.</_>\n        <_>\n          7 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 12 -1.</_>\n        <_>\n          9 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 12 -1.</_>\n        <_>\n          12 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 3 12 -1.</_>\n        <_>\n          4 4 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 15 -1.</_>\n        <_>\n          12 3 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 7 6 -1.</_>\n        <_>\n          5 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 12 -1.</_>\n        <_>\n          12 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 12 -1.</_>\n        <_>\n          9 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 12 2 -1.</_>\n        <_>\n          5 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 20 6 -1.</_>\n        <_>\n          6 12 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 9 4 -1.</_>\n        <_>\n          11 11 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 9 4 -1.</_>\n        <_>\n          8 11 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 9 12 -1.</_>\n        <_>\n          14 10 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 9 12 -1.</_>\n        <_>\n          5 10 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 12 2 -1.</_>\n        <_>\n          5 10 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 16 3 -1.</_>\n        <_>\n          4 3 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 12 -1.</_>\n        <_>\n          12 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 14 3 -1.</_>\n        <_>\n          0 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 12 3 -1.</_>\n        <_>\n          10 3 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 12 3 -1.</_>\n        <_>\n          11 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 8 3 -1.</_>\n        <_>\n          8 13 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 8 -1.</_>\n        <_>\n          9 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 11 -1.</_>\n        <_>\n          16 2 1 11 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 10 4 -1.</_>\n        <_>\n          7 2 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 5 15 3 -1.</_>\n        <_>\n          5 6 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 9 5 -1.</_>\n        <_>\n          8 1 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 18 -1.</_>\n        <_>\n          15 0 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 5 16 -1.</_>\n        <_>\n          6 8 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 8 -1.</_>\n        <_>\n          12 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 10 2 -1.</_>\n        <_>\n          11 4 10 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 12 3 -1.</_>\n        <_>\n          14 0 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 20 13 -1.</_>\n        <_>\n          5 2 10 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 8 -1.</_>\n        <_>\n          12 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 8 -1.</_>\n        <_>\n          6 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 12 -1.</_>\n        <_>\n          12 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 12 -1.</_>\n        <_>\n          9 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 14 2 -1.</_>\n        <_>\n          7 1 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 14 10 -1.</_>\n        <_>\n          4 13 14 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 9 4 -1.</_>\n        <_>\n          14 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 17 8 -1.</_>\n        <_>\n          1 11 17 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 7 6 -1.</_>\n        <_>\n          10 15 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 8 9 -1.</_>\n        <_>\n          10 1 4 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 11 -1.</_>\n        <_>\n          11 2 2 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 9 -1.</_>\n        <_>\n          8 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 4 -1.</_>\n        <_>\n          14 3 6 2 2.</_>\n        <_>\n          8 5 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 7 4 -1.</_>\n        <_>\n          5 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 13 -1.</_>\n        <_>\n          13 0 2 13 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 13 4 -1.</_>\n        <_>\n          9 0 13 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 9 4 9 -1.</_>\n        <_>\n          12 12 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 12 2 -1.</_>\n        <_>\n          7 4 12 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 10 6 -1.</_>\n        <_>\n          17 5 5 3 2.</_>\n        <_>\n          12 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 17 3 -1.</_>\n        <_>\n          1 1 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 6 8 -1.</_>\n        <_>\n          18 4 3 4 2.</_>\n        <_>\n          15 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 14 -1.</_>\n        <_>\n          3 2 2 7 2.</_>\n        <_>\n          5 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 4 -1.</_>\n        <_>\n          14 8 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 6 -1.</_>\n        <_>\n          8 8 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 16 -1.</_>\n        <_>\n          14 1 2 8 2.</_>\n        <_>\n          12 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 8 -1.</_>\n        <_>\n          7 0 3 4 2.</_>\n        <_>\n          10 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 5 -1.</_>\n        <_>\n          8 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 12 -1.</_>\n        <_>\n          7 5 3 6 2.</_>\n        <_>\n          10 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 6 6 -1.</_>\n        <_>\n          15 5 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 10 3 8 -1.</_>\n        <_>\n          6 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 3 -1.</_>\n        <_>\n          4 1 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 8 3 -1.</_>\n        <_>\n          4 9 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 6 -1.</_>\n        <_>\n          9 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 10 10 -1.</_>\n        <_>\n          3 0 5 5 2.</_>\n        <_>\n          8 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 12 4 -1.</_>\n        <_>\n          5 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 10 3 -1.</_>\n        <_>\n          11 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 15 10 3 -1.</_>\n        <_>\n          12 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 10 3 -1.</_>\n        <_>\n          5 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 14 -1.</_>\n        <_>\n          3 7 17 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 16 -1.</_>\n        <_>\n          9 0 2 8 2.</_>\n        <_>\n          11 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 8 -1.</_>\n        <_>\n          11 8 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 3 -1.</_>\n        <_>\n          0 10 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 20 8 -1.</_>\n        <_>\n          11 5 10 4 2.</_>\n        <_>\n          1 9 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 13 3 -1.</_>\n        <_>\n          1 9 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 14 3 -1.</_>\n        <_>\n          8 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 14 2 -1.</_>\n        <_>\n          4 17 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 6 -1.</_>\n        <_>\n          12 2 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 3 -1.</_>\n        <_>\n          10 2 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 10 -1.</_>\n        <_>\n          16 1 3 5 2.</_>\n        <_>\n          13 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 10 3 -1.</_>\n        <_>\n          10 1 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          13 2 1 12 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 12 3 -1.</_>\n        <_>\n          9 2 12 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 10 -1.</_>\n        <_>\n          16 1 3 5 2.</_>\n        <_>\n          13 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 10 -1.</_>\n        <_>\n          3 1 3 5 2.</_>\n        <_>\n          6 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 6 10 -1.</_>\n        <_>\n          17 7 3 5 2.</_>\n        <_>\n          14 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 8 -1.</_>\n        <_>\n          3 2 3 4 2.</_>\n        <_>\n          6 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 9 4 -1.</_>\n        <_>\n          14 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 15 8 -1.</_>\n        <_>\n          1 12 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 8 4 -1.</_>\n        <_>\n          9 14 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 7 6 -1.</_>\n        <_>\n          6 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 5 -1.</_>\n        <_>\n          9 5 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 6 -1.</_>\n        <_>\n          2 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 4 -1.</_>\n        <_>\n          14 8 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 6 -1.</_>\n        <_>\n          8 8 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 8 -1.</_>\n        <_>\n          11 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 8 -1.</_>\n        <_>\n          9 4 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 10 3 -1.</_>\n        <_>\n          5 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 9 -1.</_>\n        <_>\n          12 6 1 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 9 3 -1.</_>\n        <_>\n          10 6 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 8 4 -1.</_>\n        <_>\n          12 6 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 8 -1.</_>\n        <_>\n          10 6 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 0 5 12 -1.</_>\n        <_>\n          13 0 5 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 3 12 4 -1.</_>\n        <_>\n          4 3 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 6 5 -1.</_>\n        <_>\n          15 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 3 -1.</_>\n        <_>\n          1 8 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 6 5 -1.</_>\n        <_>\n          15 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 5 -1.</_>\n        <_>\n          4 7 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 6 4 -1.</_>\n        <_>\n          12 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 12 6 -1.</_>\n        <_>\n          5 12 6 3 2.</_>\n        <_>\n          11 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 2 9 -1.</_>\n        <_>\n          11 5 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 9 2 -1.</_>\n        <_>\n          11 5 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 12 9 4 -1.</_>\n        <_>\n          13 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 6 -1.</_>\n        <_>\n          8 6 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 4 -1.</_>\n        <_>\n          10 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 14 3 -1.</_>\n        <_>\n          0 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 12 3 -1.</_>\n        <_>\n          8 3 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 5 6 -1.</_>\n        <_>\n          8 7 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 8 3 -1.</_>\n        <_>\n          12 6 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 4 6 -1.</_>\n        <_>\n          6 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 4 -1.</_>\n        <_>\n          6 11 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 8 7 -1.</_>\n        <_>\n          8 10 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 9 -1.</_>\n        <_>\n          12 4 1 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 8 22 4 -1.</_>\n        <_>\n          11 8 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 3 -1.</_>\n        <_>\n          3 10 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 9 3 -1.</_>\n        <_>\n          10 4 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 9 -1.</_>\n        <_>\n          9 6 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 6 -1.</_>\n        <_>\n          9 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 6 -1.</_>\n        <_>\n          9 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 16 5 -1.</_>\n        <_>\n          10 13 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 3 -1.</_>\n        <_>\n          12 12 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 12 2 -1.</_>\n        <_>\n          10 4 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 4 -1.</_>\n        <_>\n          11 3 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 3 -1.</_>\n        <_>\n          9 6 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 8 -1.</_>\n        <_>\n          13 1 3 4 2.</_>\n        <_>\n          10 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 6 -1.</_>\n        <_>\n          11 1 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 4 -1.</_>\n        <_>\n          11 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 12 3 -1.</_>\n        <_>\n          2 3 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 8 4 -1.</_>\n        <_>\n          11 3 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 6 -1.</_>\n        <_>\n          1 0 4 3 2.</_>\n        <_>\n          5 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 14 3 -1.</_>\n        <_>\n          8 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 4 8 -1.</_>\n        <_>\n          11 3 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 10 -1.</_>\n        <_>\n          9 0 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 14 2 -1.</_>\n        <_>\n          4 17 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 12 3 -1.</_>\n        <_>\n          10 12 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 6 -1.</_>\n        <_>\n          5 0 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 6 4 -1.</_>\n        <_>\n          16 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 10 4 -1.</_>\n        <_>\n          5 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 16 4 -1.</_>\n        <_>\n          11 1 8 2 2.</_>\n        <_>\n          3 3 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 11 4 -1.</_>\n        <_>\n          0 3 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 11 6 -1.</_>\n        <_>\n          6 11 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 5 10 -1.</_>\n        <_>\n          8 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 6 -1.</_>\n        <_>\n          9 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 12 6 -1.</_>\n        <_>\n          2 3 6 3 2.</_>\n        <_>\n          8 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 7 9 -1.</_>\n        <_>\n          13 6 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 7 9 -1.</_>\n        <_>\n          2 6 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 6 -1.</_>\n        <_>\n          12 1 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 3 13 3 -1.</_>\n        <_>\n          3 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 14 3 -1.</_>\n        <_>\n          8 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 7 12 -1.</_>\n        <_>\n          3 9 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 6 4 -1.</_>\n        <_>\n          12 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 4 -1.</_>\n        <_>\n          4 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 15 2 -1.</_>\n        <_>\n          6 2 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 3 12 -1.</_>\n        <_>\n          5 3 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 2 12 -1.</_>\n        <_>\n          14 4 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 3 -1.</_>\n        <_>\n          10 1 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 9 14 5 -1.</_>\n        <_>\n          4 9 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 10 3 -1.</_>\n        <_>\n          10 3 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 12 7 6 -1.</_>\n        <_>\n          9 14 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 8 10 -1.</_>\n        <_>\n          1 8 4 5 2.</_>\n        <_>\n          5 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 5 -1.</_>\n        <_>\n          9 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 6 -1.</_>\n        <_>\n          8 8 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 6 8 10 -1.</_>\n        <_>\n          7 11 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 6 4 -1.</_>\n        <_>\n          9 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 2 -1.</_>\n        <_>\n          5 16 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 10 6 -1.</_>\n        <_>\n          6 6 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 8 6 -1.</_>\n        <_>\n          9 14 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 5 -1.</_>\n        <_>\n          6 11 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 8 4 -1.</_>\n        <_>\n          10 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 18 6 -1.</_>\n        <_>\n          2 6 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 12 11 -1.</_>\n        <_>\n          8 4 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 11 2 -1.</_>\n        <_>\n          11 5 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 9 -1.</_>\n        <_>\n          9 9 6 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 10 9 -1.</_>\n        <_>\n          8 2 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 6 -1.</_>\n        <_>\n          16 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 6 -1.</_>\n        <_>\n          8 5 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 10 4 -1.</_>\n        <_>\n          11 3 5 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 6 -1.</_>\n        <_>\n          6 3 4 3 2.</_>\n        <_>\n          10 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 15 -1.</_>\n        <_>\n          16 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 15 -1.</_>\n        <_>\n          3 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 16 -1.</_>\n        <_>\n          8 2 6 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 4 6 -1.</_>\n        <_>\n          8 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 13 9 -1.</_>\n        <_>\n          5 12 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 3 -1.</_>\n        <_>\n          11 7 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 4 -1.</_>\n        <_>\n          10 0 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 5 -1.</_>\n        <_>\n          10 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 6 -1.</_>\n        <_>\n          8 9 6 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 10 3 -1.</_>\n        <_>\n          10 5 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 14 8 4 -1.</_>\n        <_>\n          13 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 8 4 -1.</_>\n        <_>\n          1 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 10 -1.</_>\n        <_>\n          12 5 1 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 10 3 -1.</_>\n        <_>\n          10 5 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 6 -1.</_>\n        <_>\n          11 12 9 3 2.</_>\n        <_>\n          2 15 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 6 -1.</_>\n        <_>\n          5 2 4 3 2.</_>\n        <_>\n          9 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 4 -1.</_>\n        <_>\n          8 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 8 -1.</_>\n        <_>\n          1 10 3 4 2.</_>\n        <_>\n          4 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 15 9 -1.</_>\n        <_>\n          12 5 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 15 9 -1.</_>\n        <_>\n          5 5 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 7 -1.</_>\n        <_>\n          12 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 12 4 -1.</_>\n        <_>\n          5 14 6 2 2.</_>\n        <_>\n          11 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 12 3 -1.</_>\n        <_>\n          10 2 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 3 12 -1.</_>\n        <_>\n          9 1 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 7 -1.</_>\n        <_>\n          14 2 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 12 9 -1.</_>\n        <_>\n          5 3 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 7 6 -1.</_>\n        <_>\n          8 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 20 3 -1.</_>\n        <_>\n          6 12 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 16 -1.</_>\n        <_>\n          5 6 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 7 6 -1.</_>\n        <_>\n          4 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          11 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 2 -1.</_>\n        <_>\n          7 0 8 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 14 12 2 -1.</_>\n        <_>\n          5 15 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 16 6 -1.</_>\n        <_>\n          3 13 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 8 -1.</_>\n        <_>\n          11 5 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 15 12 3 -1.</_>\n        <_>\n          8 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 15 3 -1.</_>\n        <_>\n          9 13 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 12 4 -1.</_>\n        <_>\n          2 3 6 2 2.</_>\n        <_>\n          8 5 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 4 7 -1.</_>\n        <_>\n          17 5 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 7 4 -1.</_>\n        <_>\n          5 4 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 3 -1.</_>\n        <_>\n          8 2 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 9 -1.</_>\n        <_>\n          8 5 6 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 6 4 -1.</_>\n        <_>\n          15 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 3 -1.</_>\n        <_>\n          0 2 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 6 4 -1.</_>\n        <_>\n          16 2 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 14 6 -1.</_>\n        <_>\n          7 9 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 8 4 -1.</_>\n        <_>\n          13 5 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 8 -1.</_>\n        <_>\n          9 5 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 14 -1.</_>\n        <_>\n          12 11 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 20 5 -1.</_>\n        <_>\n          6 13 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 14 -1.</_>\n        <_>\n          12 11 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 14 -1.</_>\n        <_>\n          7 11 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 6 4 -1.</_>\n        <_>\n          16 2 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 6 -1.</_>\n        <_>\n          6 2 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 15 14 -1.</_>\n        <_>\n          7 11 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 16 2 -1.</_>\n        <_>\n          1 17 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 12 4 -1.</_>\n        <_>\n          3 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 10 9 -1.</_>\n        <_>\n          6 12 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 5 -1.</_>\n        <_>\n          3 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 4 -1.</_>\n        <_>\n          11 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 8 2 -1.</_>\n        <_>\n          7 8 8 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 13 7 4 -1.</_>\n        <_>\n          10 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 20 2 -1.</_>\n        <_>\n          11 16 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 14 4 -1.</_>\n        <_>\n          5 12 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 4 6 -1.</_>\n        <_>\n          8 8 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 2 2 14 -1.</_>\n        <_>\n          17 2 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 4 -1.</_>\n        <_>\n          11 1 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 12 3 -1.</_>\n        <_>\n          9 7 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 6 4 -1.</_>\n        <_>\n          5 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 12 4 -1.</_>\n        <_>\n          16 9 6 2 2.</_>\n        <_>\n          10 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 9 4 -1.</_>\n        <_>\n          9 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 2 6 -1.</_>\n        <_>\n          11 9 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 9 14 9 -1.</_>\n        <_>\n          3 12 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 16 6 -1.</_>\n        <_>\n          5 12 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 10 6 -1.</_>\n        <_>\n          5 12 5 3 2.</_>\n        <_>\n          10 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 18 5 -1.</_>\n        <_>\n          4 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 18 5 -1.</_>\n        <_>\n          9 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 16 3 -1.</_>\n        <_>\n          4 10 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 15 2 -1.</_>\n        <_>\n          5 1 15 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 9 -1.</_>\n        <_>\n          13 5 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 2 -1.</_>\n        <_>\n          9 5 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 5 -1.</_>\n        <_>\n          6 11 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 13 3 -1.</_>\n        <_>\n          3 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 4 12 -1.</_>\n        <_>\n          20 5 2 6 2.</_>\n        <_>\n          18 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 5 6 -1.</_>\n        <_>\n          4 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 2 8 -1.</_>\n        <_>\n          15 1 1 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 2 -1.</_>\n        <_>\n          7 1 8 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 5 4 12 -1.</_>\n        <_>\n          20 5 2 6 2.</_>\n        <_>\n          18 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 10 2 -1.</_>\n        <_>\n          10 4 10 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 20 4 -1.</_>\n        <_>\n          7 4 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 8 3 -1.</_>\n        <_>\n          5 9 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 4 12 -1.</_>\n        <_>\n          20 5 2 6 2.</_>\n        <_>\n          18 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 12 -1.</_>\n        <_>\n          0 5 2 6 2.</_>\n        <_>\n          2 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 18 -1.</_>\n        <_>\n          6 9 14 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 12 3 -1.</_>\n        <_>\n          4 5 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 14 3 -1.</_>\n        <_>\n          8 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 14 3 -1.</_>\n        <_>\n          4 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 14 -1.</_>\n        <_>\n          11 2 3 7 2.</_>\n        <_>\n          8 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 15 4 -1.</_>\n        <_>\n          0 14 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 7 4 -1.</_>\n        <_>\n          11 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 7 3 -1.</_>\n        <_>\n          10 8 7 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 6 -1.</_>\n        <_>\n          10 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 14 -1.</_>\n        <_>\n          2 0 2 7 2.</_>\n        <_>\n          4 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 18 5 -1.</_>\n        <_>\n          8 6 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 18 -1.</_>\n        <_>\n          8 0 6 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 8 -1.</_>\n        <_>\n          14 2 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 18 -1.</_>\n        <_>\n          4 0 6 9 2.</_>\n        <_>\n          10 9 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 6 4 -1.</_>\n        <_>\n          12 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 6 4 -1.</_>\n        <_>\n          4 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 2 6 -1.</_>\n        <_>\n          11 8 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 10 20 6 -1.</_>\n        <_>\n          1 10 10 3 2.</_>\n        <_>\n          11 13 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 9 -1.</_>\n        <_>\n          10 4 7 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 3 4 6 -1.</_>\n        <_>\n          5 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 12 -1.</_>\n        <_>\n          13 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 8 3 -1.</_>\n        <_>\n          11 11 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 12 11 -1.</_>\n        <_>\n          12 6 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 10 9 -1.</_>\n        <_>\n          11 8 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 4 -1.</_>\n        <_>\n          11 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 12 4 -1.</_>\n        <_>\n          7 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 7 -1.</_>\n        <_>\n          12 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 4 -1.</_>\n        <_>\n          11 0 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 12 -1.</_>\n        <_>\n          12 6 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 12 -1.</_>\n        <_>\n          8 6 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 6 -1.</_>\n        <_>\n          6 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 6 -1.</_>\n        <_>\n          14 6 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 13 20 5 -1.</_>\n        <_>\n          6 13 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 4 -1.</_>\n        <_>\n          8 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 8 3 -1.</_>\n        <_>\n          4 7 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 15 -1.</_>\n        <_>\n          16 0 1 15 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 3 12 2 -1.</_>\n        <_>\n          9 3 12 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 6 -1.</_>\n        <_>\n          9 1 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 3 -1.</_>\n        <_>\n          10 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 6 -1.</_>\n        <_>\n          10 3 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 3 -1.</_>\n        <_>\n          1 2 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 12 3 -1.</_>\n        <_>\n          9 2 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 22 6 -1.</_>\n        <_>\n          0 0 11 3 2.</_>\n        <_>\n          11 3 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 6 -1.</_>\n        <_>\n          10 5 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 5 -1.</_>\n        <_>\n          10 0 4 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 10 -1.</_>\n        <_>\n          13 5 2 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 10 4 -1.</_>\n        <_>\n          9 5 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 1 2 8 -1.</_>\n        <_>\n          15 1 1 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 2 -1.</_>\n        <_>\n          7 1 8 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 11 -1.</_>\n        <_>\n          18 1 1 11 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 6 -1.</_>\n        <_>\n          9 8 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 12 -1.</_>\n        <_>\n          17 6 3 6 2.</_>\n        <_>\n          14 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 6 -1.</_>\n        <_>\n          8 14 6 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 10 -1.</_>\n        <_>\n          14 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 16 10 -1.</_>\n        <_>\n          3 8 8 5 2.</_>\n        <_>\n          11 13 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 4 6 -1.</_>\n        <_>\n          15 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 18 10 -1.</_>\n        <_>\n          2 8 9 5 2.</_>\n        <_>\n          11 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 12 3 -1.</_>\n        <_>\n          10 2 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 12 3 -1.</_>\n        <_>\n          1 2 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 14 4 -1.</_>\n        <_>\n          15 0 7 2 2.</_>\n        <_>\n          8 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 14 4 -1.</_>\n        <_>\n          2 5 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 12 3 -1.</_>\n        <_>\n          8 5 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 8 -1.</_>\n        <_>\n          1 0 4 4 2.</_>\n        <_>\n          5 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 8 6 -1.</_>\n        <_>\n          17 0 4 3 2.</_>\n        <_>\n          13 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 6 -1.</_>\n        <_>\n          1 0 4 3 2.</_>\n        <_>\n          5 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 5 -1.</_>\n        <_>\n          9 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 3 -1.</_>\n        <_>\n          9 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 6 9 -1.</_>\n        <_>\n          10 6 6 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 3 9 6 -1.</_>\n        <_>\n          12 6 3 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 18 3 -1.</_>\n        <_>\n          4 12 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 15 4 -1.</_>\n        <_>\n          5 13 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 4 6 -1.</_>\n        <_>\n          15 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 4 6 -1.</_>\n        <_>\n          3 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 6 -1.</_>\n        <_>\n          11 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 7 -1.</_>\n        <_>\n          9 9 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 8 -1.</_>\n        <_>\n          16 10 3 4 2.</_>\n        <_>\n          13 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 8 -1.</_>\n        <_>\n          3 10 3 4 2.</_>\n        <_>\n          6 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 8 4 -1.</_>\n        <_>\n          7 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 11 -1.</_>\n        <_>\n          10 5 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 6 -1.</_>\n        <_>\n          10 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 6 -1.</_>\n        <_>\n          6 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 12 8 -1.</_>\n        <_>\n          12 6 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 12 3 -1.</_>\n        <_>\n          6 11 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 8 -1.</_>\n        <_>\n          17 3 3 4 2.</_>\n        <_>\n          14 7 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 13 3 -1.</_>\n        <_>\n          0 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 6 -1.</_>\n        <_>\n          14 2 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 6 -1.</_>\n        <_>\n          3 2 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 14 3 -1.</_>\n        <_>\n          8 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 15 -1.</_>\n        <_>\n          8 2 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 16 4 -1.</_>\n        <_>\n          4 14 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 20 12 -1.</_>\n        <_>\n          6 6 10 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 16 6 -1.</_>\n        <_>\n          13 10 8 3 2.</_>\n        <_>\n          5 13 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 16 6 -1.</_>\n        <_>\n          1 10 8 3 2.</_>\n        <_>\n          9 13 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 14 6 -1.</_>\n        <_>\n          8 8 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 14 6 -1.</_>\n        <_>\n          7 8 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 11 -1.</_>\n        <_>\n          8 6 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 8 6 -1.</_>\n        <_>\n          1 3 4 3 2.</_>\n        <_>\n          5 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 7 6 -1.</_>\n        <_>\n          13 1 7 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 5 10 -1.</_>\n        <_>\n          1 9 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 3 8 -1.</_>\n        <_>\n          18 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 3 8 -1.</_>\n        <_>\n          1 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 13 3 -1.</_>\n        <_>\n          8 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 13 3 -1.</_>\n        <_>\n          1 6 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 3 12 -1.</_>\n        <_>\n          19 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 12 -1.</_>\n        <_>\n          2 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 18 2 -1.</_>\n        <_>\n          4 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 6 -1.</_>\n        <_>\n          9 3 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 12 11 -1.</_>\n        <_>\n          12 5 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 12 11 -1.</_>\n        <_>\n          4 5 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 8 -1.</_>\n        <_>\n          8 4 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 22 4 -1.</_>\n        <_>\n          0 8 11 2 2.</_>\n        <_>\n          11 10 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 4 -1.</_>\n        <_>\n          8 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 8 8 -1.</_>\n        <_>\n          10 3 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 16 4 -1.</_>\n        <_>\n          11 6 8 2 2.</_>\n        <_>\n          3 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 16 4 -1.</_>\n        <_>\n          10 14 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 6 5 -1.</_>\n        <_>\n          11 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 6 5 -1.</_>\n        <_>\n          8 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 2 7 -1.</_>\n        <_>\n          12 2 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 21 9 -1.</_>\n        <_>\n          7 12 7 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 9 -1.</_>\n        <_>\n          9 6 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 16 8 -1.</_>\n        <_>\n          3 9 8 4 2.</_>\n        <_>\n          11 13 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 14 18 -1.</_>\n        <_>\n          7 0 7 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 4 -1.</_>\n        <_>\n          5 8 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 11 16 4 -1.</_>\n        <_>\n          11 11 8 2 2.</_>\n        <_>\n          3 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 8 -1.</_>\n        <_>\n          6 9 3 4 2.</_>\n        <_>\n          9 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 14 18 -1.</_>\n        <_>\n          7 0 7 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 14 18 -1.</_>\n        <_>\n          8 0 7 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 8 3 -1.</_>\n        <_>\n          13 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 4 -1.</_>\n        <_>\n          8 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 4 -1.</_>\n        <_>\n          13 6 7 2 2.</_>\n        <_>\n          6 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 11 4 -1.</_>\n        <_>\n          6 4 11 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 4 -1.</_>\n        <_>\n          13 0 6 2 2.</_>\n        <_>\n          7 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 4 -1.</_>\n        <_>\n          4 0 7 2 2.</_>\n        <_>\n          11 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 6 9 -1.</_>\n        <_>\n          17 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 9 -1.</_>\n        <_>\n          3 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 5 9 -1.</_>\n        <_>\n          12 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 5 9 -1.</_>\n        <_>\n          5 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 4 6 -1.</_>\n        <_>\n          17 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 4 6 -1.</_>\n        <_>\n          3 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 14 3 -1.</_>\n        <_>\n          4 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 3 -1.</_>\n        <_>\n          5 1 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 11 14 -1.</_>\n        <_>\n          10 11 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 6 -1.</_>\n        <_>\n          2 7 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 5 12 -1.</_>\n        <_>\n          12 6 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 12 2 -1.</_>\n        <_>\n          5 17 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 18 3 -1.</_>\n        <_>\n          3 5 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 11 14 -1.</_>\n        <_>\n          1 11 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 11 4 -1.</_>\n        <_>\n          8 14 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 8 7 -1.</_>\n        <_>\n          11 11 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 11 -1.</_>\n        <_>\n          12 2 2 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 11 2 -1.</_>\n        <_>\n          10 4 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 14 -1.</_>\n        <_>\n          16 0 1 14 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 2 -1.</_>\n        <_>\n          6 0 14 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 4 2 12 -1.</_>\n        <_>\n          19 4 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 10 -1.</_>\n        <_>\n          8 7 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 2 12 -1.</_>\n        <_>\n          19 4 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 8 -1.</_>\n        <_>\n          11 3 6 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 10 6 -1.</_>\n        <_>\n          11 2 5 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 13 2 -1.</_>\n        <_>\n          3 6 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 12 6 -1.</_>\n        <_>\n          5 6 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 9 9 -1.</_>\n        <_>\n          9 9 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 3 12 -1.</_>\n        <_>\n          20 2 1 12 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 13 9 5 -1.</_>\n        <_>\n          5 13 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 10 6 -1.</_>\n        <_>\n          11 2 5 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 10 -1.</_>\n        <_>\n          11 2 6 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 21 3 -1.</_>\n        <_>\n          8 6 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 8 -1.</_>\n        <_>\n          5 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 7 6 -1.</_>\n        <_>\n          10 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 7 6 -1.</_>\n        <_>\n          8 2 7 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 6 -1.</_>\n        <_>\n          13 7 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 7 6 -1.</_>\n        <_>\n          5 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 8 -1.</_>\n        <_>\n          12 1 3 4 2.</_>\n        <_>\n          9 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 8 -1.</_>\n        <_>\n          7 1 3 4 2.</_>\n        <_>\n          10 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 4 -1.</_>\n        <_>\n          10 0 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 14 3 -1.</_>\n        <_>\n          1 10 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 15 3 -1.</_>\n        <_>\n          5 10 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 12 3 -1.</_>\n        <_>\n          2 2 12 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 12 12 6 -1.</_>\n        <_>\n          11 12 6 3 2.</_>\n        <_>\n          5 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 12 4 -1.</_>\n        <_>\n          5 12 6 2 2.</_>\n        <_>\n          11 14 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 3 9 -1.</_>\n        <_>\n          16 5 1 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 9 3 -1.</_>\n        <_>\n          6 5 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 3 7 4 -1.</_>\n        <_>\n          13 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 9 5 -1.</_>\n        <_>\n          7 0 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 6 -1.</_>\n        <_>\n          12 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 12 4 -1.</_>\n        <_>\n          0 6 6 2 2.</_>\n        <_>\n          6 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 9 6 -1.</_>\n        <_>\n          13 11 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 16 8 -1.</_>\n        <_>\n          2 10 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 10 -1.</_>\n        <_>\n          17 0 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 2 -1.</_>\n        <_>\n          5 0 10 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 11 13 3 -1.</_>\n        <_>\n          9 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 13 3 -1.</_>\n        <_>\n          0 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 4 12 -1.</_>\n        <_>\n          18 9 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 9 7 -1.</_>\n        <_>\n          9 4 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 6 7 -1.</_>\n        <_>\n          13 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 7 -1.</_>\n        <_>\n          7 9 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 20 5 -1.</_>\n        <_>\n          6 13 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 8 6 -1.</_>\n        <_>\n          9 9 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 4 -1.</_>\n        <_>\n          8 5 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 6 -1.</_>\n        <_>\n          6 11 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 20 7 -1.</_>\n        <_>\n          6 8 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 6 -1.</_>\n        <_>\n          8 11 6 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 9 4 -1.</_>\n        <_>\n          8 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 6 -1.</_>\n        <_>\n          1 15 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 8 6 -1.</_>\n        <_>\n          13 2 4 3 2.</_>\n        <_>\n          9 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 22 5 -1.</_>\n        <_>\n          11 5 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 18 -1.</_>\n        <_>\n          2 9 18 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 3 8 -1.</_>\n        <_>\n          6 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 8 6 -1.</_>\n        <_>\n          13 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 6 8 -1.</_>\n        <_>\n          3 8 3 4 2.</_>\n        <_>\n          6 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 7 4 -1.</_>\n        <_>\n          11 8 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 6 -1.</_>\n        <_>\n          11 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 16 4 -1.</_>\n        <_>\n          11 14 8 2 2.</_>\n        <_>\n          3 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 6 4 -1.</_>\n        <_>\n          5 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 4 6 -1.</_>\n        <_>\n          9 5 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 12 6 -1.</_>\n        <_>\n          8 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 8 4 -1.</_>\n        <_>\n          7 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 18 3 -1.</_>\n        <_>\n          1 4 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 14 3 -1.</_>\n        <_>\n          8 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 14 4 -1.</_>\n        <_>\n          1 0 7 2 2.</_>\n        <_>\n          8 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 12 3 -1.</_>\n        <_>\n          10 11 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 12 3 -1.</_>\n        <_>\n          1 11 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 8 3 -1.</_>\n        <_>\n          10 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 6 -1.</_>\n        <_>\n          9 2 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 10 -1.</_>\n        <_>\n          17 0 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 7 8 3 -1.</_>\n        <_>\n          8 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 8 6 -1.</_>\n        <_>\n          13 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 6 -1.</_>\n        <_>\n          1 2 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 10 -1.</_>\n        <_>\n          17 0 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 10 2 -1.</_>\n        <_>\n          5 0 10 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 4 -1.</_>\n        <_>\n          10 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 14 3 -1.</_>\n        <_>\n          0 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 16 10 -1.</_>\n        <_>\n          11 3 8 5 2.</_>\n        <_>\n          3 8 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 12 3 -1.</_>\n        <_>\n          1 6 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 13 4 -1.</_>\n        <_>\n          9 8 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 8 6 -1.</_>\n        <_>\n          7 5 4 3 2.</_>\n        <_>\n          11 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 4 11 -1.</_>\n        <_>\n          14 4 2 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 11 2 -1.</_>\n        <_>\n          9 2 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 13 12 4 -1.</_>\n        <_>\n          5 14 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 16 4 -1.</_>\n        <_>\n          0 9 8 2 2.</_>\n        <_>\n          8 11 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 9 7 -1.</_>\n        <_>\n          10 10 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 5 6 -1.</_>\n        <_>\n          10 7 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 10 3 -1.</_>\n        <_>\n          11 5 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 13 12 5 -1.</_>\n        <_>\n          5 13 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 4 7 -1.</_>\n        <_>\n          17 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 12 3 -1.</_>\n        <_>\n          0 7 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 10 -1.</_>\n        <_>\n          18 6 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 14 8 3 -1.</_>\n        <_>\n          5 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 3 -1.</_>\n        <_>\n          10 11 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 8 3 -1.</_>\n        <_>\n          4 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 16 3 -1.</_>\n        <_>\n          9 11 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 4 7 -1.</_>\n        <_>\n          3 9 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 10 6 -1.</_>\n        <_>\n          6 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 12 2 -1.</_>\n        <_>\n          0 17 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 12 -1.</_>\n        <_>\n          14 5 2 6 2.</_>\n        <_>\n          12 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 6 -1.</_>\n        <_>\n          8 11 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 15 2 -1.</_>\n        <_>\n          4 17 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 9 -1.</_>\n        <_>\n          9 3 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          8 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 13 -1.</_>\n        <_>\n          2 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 4 -1.</_>\n        <_>\n          10 1 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 9 -1.</_>\n        <_>\n          10 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 6 -1.</_>\n        <_>\n          10 3 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 11 2 -1.</_>\n        <_>\n          3 5 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          11 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 10 -1.</_>\n        <_>\n          6 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 12 -1.</_>\n        <_>\n          12 2 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 12 -1.</_>\n        <_>\n          9 2 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 4 9 -1.</_>\n        <_>\n          18 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 6 -1.</_>\n        <_>\n          1 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 6 -1.</_>\n        <_>\n          12 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 2 12 -1.</_>\n        <_>\n          11 2 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 5 6 -1.</_>\n        <_>\n          11 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 5 6 -1.</_>\n        <_>\n          6 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 5 8 -1.</_>\n        <_>\n          13 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 20 2 -1.</_>\n        <_>\n          10 9 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 10 -1.</_>\n        <_>\n          14 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 11 2 -1.</_>\n        <_>\n          11 5 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 10 -1.</_>\n        <_>\n          14 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 12 2 -1.</_>\n        <_>\n          5 14 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 9 -1.</_>\n        <_>\n          11 11 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 12 6 -1.</_>\n        <_>\n          1 10 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 3 8 -1.</_>\n        <_>\n          16 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 3 8 -1.</_>\n        <_>\n          3 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 9 -1.</_>\n        <_>\n          11 11 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 4 9 -1.</_>\n        <_>\n          7 11 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 15 12 -1.</_>\n        <_>\n          12 7 5 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 14 4 -1.</_>\n        <_>\n          4 10 7 2 2.</_>\n        <_>\n          11 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 10 6 -1.</_>\n        <_>\n          14 10 5 3 2.</_>\n        <_>\n          9 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 10 6 -1.</_>\n        <_>\n          3 10 5 3 2.</_>\n        <_>\n          8 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 6 6 -1.</_>\n        <_>\n          18 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 14 2 -1.</_>\n        <_>\n          10 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 4 12 -1.</_>\n        <_>\n          20 2 2 6 2.</_>\n        <_>\n          18 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 12 4 -1.</_>\n        <_>\n          3 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 6 -1.</_>\n        <_>\n          7 9 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 4 -1.</_>\n        <_>\n          4 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 5 12 -1.</_>\n        <_>\n          12 8 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 17 -1.</_>\n        <_>\n          6 0 1 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 6 6 -1.</_>\n        <_>\n          18 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 6 -1.</_>\n        <_>\n          2 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 18 -1.</_>\n        <_>\n          15 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 5 10 -1.</_>\n        <_>\n          0 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 12 4 -1.</_>\n        <_>\n          5 13 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 8 6 -1.</_>\n        <_>\n          7 11 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 15 4 -1.</_>\n        <_>\n          2 12 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 3 -1.</_>\n        <_>\n          5 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 3 14 -1.</_>\n        <_>\n          8 4 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 8 3 -1.</_>\n        <_>\n          7 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 6 -1.</_>\n        <_>\n          1 2 4 3 2.</_>\n        <_>\n          5 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 8 -1.</_>\n        <_>\n          17 9 3 4 2.</_>\n        <_>\n          14 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 8 -1.</_>\n        <_>\n          0 0 3 4 2.</_>\n        <_>\n          3 4 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 8 -1.</_>\n        <_>\n          17 9 3 4 2.</_>\n        <_>\n          14 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 6 8 -1.</_>\n        <_>\n          2 9 3 4 2.</_>\n        <_>\n          5 13 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 8 -1.</_>\n        <_>\n          17 10 3 4 2.</_>\n        <_>\n          14 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 8 -1.</_>\n        <_>\n          2 10 3 4 2.</_>\n        <_>\n          5 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 8 -1.</_>\n        <_>\n          16 1 3 4 2.</_>\n        <_>\n          13 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 3 -1.</_>\n        <_>\n          3 4 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 8 -1.</_>\n        <_>\n          16 1 3 4 2.</_>\n        <_>\n          13 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 8 -1.</_>\n        <_>\n          3 1 3 4 2.</_>\n        <_>\n          6 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 16 3 -1.</_>\n        <_>\n          3 4 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 4 -1.</_>\n        <_>\n          7 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 4 -1.</_>\n        <_>\n          10 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 15 3 -1.</_>\n        <_>\n          2 11 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 8 6 -1.</_>\n        <_>\n          10 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 13 4 -1.</_>\n        <_>\n          2 5 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 12 3 -1.</_>\n        <_>\n          9 10 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 16 4 -1.</_>\n        <_>\n          3 13 8 2 2.</_>\n        <_>\n          11 15 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 8 6 -1.</_>\n        <_>\n          10 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 8 6 -1.</_>\n        <_>\n          8 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 13 2 -1.</_>\n        <_>\n          9 5 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 8 12 -1.</_>\n        <_>\n          7 9 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 17 3 -1.</_>\n        <_>\n          3 7 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 14 4 -1.</_>\n        <_>\n          3 0 7 2 2.</_>\n        <_>\n          10 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 5 -1.</_>\n        <_>\n          11 4 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 5 6 -1.</_>\n        <_>\n          11 4 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 6 -1.</_>\n        <_>\n          10 5 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 3 -1.</_>\n        <_>\n          8 12 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 7 -1.</_>\n        <_>\n          8 6 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 12 -1.</_>\n        <_>\n          5 0 4 6 2.</_>\n        <_>\n          9 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 4 -1.</_>\n        <_>\n          13 0 6 2 2.</_>\n        <_>\n          7 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 6 5 -1.</_>\n        <_>\n          4 4 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 7 4 -1.</_>\n        <_>\n          15 0 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 6 -1.</_>\n        <_>\n          5 2 4 3 2.</_>\n        <_>\n          9 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 15 3 -1.</_>\n        <_>\n          4 3 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 3 -1.</_>\n        <_>\n          4 2 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 6 -1.</_>\n        <_>\n          15 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 17 2 -1.</_>\n        <_>\n          0 2 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 6 -1.</_>\n        <_>\n          15 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 6 -1.</_>\n        <_>\n          3 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 3 -1.</_>\n        <_>\n          3 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 4 -1.</_>\n        <_>\n          10 1 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 22 7 -1.</_>\n        <_>\n          0 11 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 12 -1.</_>\n        <_>\n          3 5 2 6 2.</_>\n        <_>\n          5 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 10 -1.</_>\n        <_>\n          14 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 14 4 -1.</_>\n        <_>\n          4 11 7 2 2.</_>\n        <_>\n          11 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 8 6 -1.</_>\n        <_>\n          11 11 4 3 2.</_>\n        <_>\n          7 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 3 13 -1.</_>\n        <_>\n          4 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 4 12 -1.</_>\n        <_>\n          19 1 2 6 2.</_>\n        <_>\n          17 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 4 12 -1.</_>\n        <_>\n          1 1 2 6 2.</_>\n        <_>\n          3 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 13 16 -1.</_>\n        <_>\n          7 4 13 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 13 2 -1.</_>\n        <_>\n          1 5 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 6 4 -1.</_>\n        <_>\n          9 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 17 3 -1.</_>\n        <_>\n          2 5 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 10 -1.</_>\n        <_>\n          15 1 1 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 3 -1.</_>\n        <_>\n          6 1 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 10 -1.</_>\n        <_>\n          15 1 1 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 3 -1.</_>\n        <_>\n          7 1 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 7 -1.</_>\n        <_>\n          11 1 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 14 -1.</_>\n        <_>\n          9 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 7 -1.</_>\n        <_>\n          11 1 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 7 2 -1.</_>\n        <_>\n          11 1 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 9 8 -1.</_>\n        <_>\n          10 9 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 4 8 -1.</_>\n        <_>\n          3 7 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 11 4 6 -1.</_>\n        <_>\n          17 11 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 6 -1.</_>\n        <_>\n          10 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 6 -1.</_>\n        <_>\n          12 1 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 3 -1.</_>\n        <_>\n          10 1 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 14 9 4 -1.</_>\n        <_>\n          12 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 4 -1.</_>\n        <_>\n          8 2 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 4 6 -1.</_>\n        <_>\n          10 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 2 -1.</_>\n        <_>\n          1 9 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 14 3 -1.</_>\n        <_>\n          8 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 14 3 -1.</_>\n        <_>\n          10 15 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 14 3 -1.</_>\n        <_>\n          8 9 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 9 4 -1.</_>\n        <_>\n          7 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 8 -1.</_>\n        <_>\n          10 6 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 3 -1.</_>\n        <_>\n          8 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 12 4 -1.</_>\n        <_>\n          10 0 12 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 6 16 4 -1.</_>\n        <_>\n          14 6 8 2 2.</_>\n        <_>\n          6 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 14 -1.</_>\n        <_>\n          7 3 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 6 -1.</_>\n        <_>\n          14 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 6 6 -1.</_>\n        <_>\n          6 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 3 8 -1.</_>\n        <_>\n          14 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 16 4 -1.</_>\n        <_>\n          0 6 8 2 2.</_>\n        <_>\n          8 8 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 5 6 -1.</_>\n        <_>\n          9 13 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 12 -1.</_>\n        <_>\n          7 5 3 6 2.</_>\n        <_>\n          10 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 21 9 -1.</_>\n        <_>\n          8 8 7 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 12 -1.</_>\n        <_>\n          9 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 11 -1.</_>\n        <_>\n          12 4 1 11 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 9 3 -1.</_>\n        <_>\n          10 6 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 6 -1.</_>\n        <_>\n          12 13 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 9 9 -1.</_>\n        <_>\n          3 1 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 12 -1.</_>\n        <_>\n          9 0 6 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 4 -1.</_>\n        <_>\n          10 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 13 3 -1.</_>\n        <_>\n          8 8 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 12 4 -1.</_>\n        <_>\n          5 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 13 -1.</_>\n        <_>\n          15 3 1 13 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 11 2 -1.</_>\n        <_>\n          9 5 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 16 -1.</_>\n        <_>\n          13 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 2 16 -1.</_>\n        <_>\n          7 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 7 6 -1.</_>\n        <_>\n          12 2 7 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 12 -1.</_>\n        <_>\n          7 3 3 6 2.</_>\n        <_>\n          10 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 8 4 -1.</_>\n        <_>\n          9 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 11 3 -1.</_>\n        <_>\n          10 4 11 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 6 -1.</_>\n        <_>\n          12 2 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 4 -1.</_>\n        <_>\n          10 2 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 8 -1.</_>\n        <_>\n          12 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 12 4 -1.</_>\n        <_>\n          2 4 6 2 2.</_>\n        <_>\n          8 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 10 -1.</_>\n        <_>\n          15 2 1 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 22 7 -1.</_>\n        <_>\n          11 7 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 14 3 -1.</_>\n        <_>\n          8 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 14 3 -1.</_>\n        <_>\n          0 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 3 10 -1.</_>\n        <_>\n          15 2 1 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 1 10 3 -1.</_>\n        <_>\n          7 2 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 10 -1.</_>\n        <_>\n          13 4 1 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 10 3 -1.</_>\n        <_>\n          10 5 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 7 6 -1.</_>\n        <_>\n          12 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 3 -1.</_>\n        <_>\n          0 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 4 -1.</_>\n        <_>\n          14 0 6 2 2.</_>\n        <_>\n          8 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 12 4 -1.</_>\n        <_>\n          2 0 6 2 2.</_>\n        <_>\n          8 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 12 3 -1.</_>\n        <_>\n          8 5 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 14 2 -1.</_>\n        <_>\n          7 1 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 11 -1.</_>\n        <_>\n          10 0 5 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 11 -1.</_>\n        <_>\n          7 0 5 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 12 -1.</_>\n        <_>\n          14 6 3 6 2.</_>\n        <_>\n          11 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 6 -1.</_>\n        <_>\n          9 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 5 -1.</_>\n        <_>\n          14 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 8 -1.</_>\n        <_>\n          8 10 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 6 6 -1.</_>\n        <_>\n          12 10 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 6 -1.</_>\n        <_>\n          8 10 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 14 3 -1.</_>\n        <_>\n          6 11 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 7 6 -1.</_>\n        <_>\n          3 3 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 6 10 -1.</_>\n        <_>\n          14 8 3 5 2.</_>\n        <_>\n          11 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 3 13 -1.</_>\n        <_>\n          9 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 4 -1.</_>\n        <_>\n          11 0 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 6 -1.</_>\n        <_>\n          11 0 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 3 2 12 -1.</_>\n        <_>\n          14 3 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 10 7 -1.</_>\n        <_>\n          10 4 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 6 -1.</_>\n        <_>\n          10 9 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 9 -1.</_>\n        <_>\n          4 11 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 4 6 -1.</_>\n        <_>\n          13 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 5 6 -1.</_>\n        <_>\n          5 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 2 11 -1.</_>\n        <_>\n          12 4 1 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 4 11 2 -1.</_>\n        <_>\n          9 4 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 6 10 -1.</_>\n        <_>\n          14 8 3 5 2.</_>\n        <_>\n          11 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 10 -1.</_>\n        <_>\n          5 8 3 5 2.</_>\n        <_>\n          8 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 10 -1.</_>\n        <_>\n          14 7 3 5 2.</_>\n        <_>\n          11 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 3 -1.</_>\n        <_>\n          2 2 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 6 7 -1.</_>\n        <_>\n          16 4 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 10 -1.</_>\n        <_>\n          5 7 3 5 2.</_>\n        <_>\n          8 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 14 -1.</_>\n        <_>\n          12 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 8 7 -1.</_>\n        <_>\n          11 10 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 3 -1.</_>\n        <_>\n          8 1 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 13 4 -1.</_>\n        <_>\n          3 1 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 12 4 -1.</_>\n        <_>\n          7 12 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 18 -1.</_>\n        <_>\n          4 0 4 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 5 -1.</_>\n        <_>\n          14 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 22 4 -1.</_>\n        <_>\n          11 5 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 10 9 -1.</_>\n        <_>\n          11 5 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 10 9 -1.</_>\n        <_>\n          1 5 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 2 12 -1.</_>\n        <_>\n          18 6 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 2 12 -1.</_>\n        <_>\n          3 6 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 12 -1.</_>\n        <_>\n          15 9 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 4 12 -1.</_>\n        <_>\n          3 9 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 5 -1.</_>\n        <_>\n          14 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 6 5 -1.</_>\n        <_>\n          5 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 12 5 -1.</_>\n        <_>\n          11 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 12 5 -1.</_>\n        <_>\n          5 12 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 6 -1.</_>\n        <_>\n          12 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 16 8 -1.</_>\n        <_>\n          4 10 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 8 8 -1.</_>\n        <_>\n          15 1 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 8 -1.</_>\n        <_>\n          3 1 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 3 8 -1.</_>\n        <_>\n          14 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 7 6 -1.</_>\n        <_>\n          10 4 7 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 10 4 8 -1.</_>\n        <_>\n          9 14 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 8 -1.</_>\n        <_>\n          5 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 4 9 -1.</_>\n        <_>\n          6 12 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 16 4 -1.</_>\n        <_>\n          14 3 8 2 2.</_>\n        <_>\n          6 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 20 4 -1.</_>\n        <_>\n          1 3 10 2 2.</_>\n        <_>\n          11 5 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 12 -1.</_>\n        <_>\n          12 5 3 6 2.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 12 -1.</_>\n        <_>\n          2 6 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 2 16 -1.</_>\n        <_>\n          19 0 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 2 16 -1.</_>\n        <_>\n          2 0 1 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 5 9 -1.</_>\n        <_>\n          13 8 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 12 2 -1.</_>\n        <_>\n          5 17 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 12 4 -1.</_>\n        <_>\n          5 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 9 -1.</_>\n        <_>\n          9 6 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 13 2 -1.</_>\n        <_>\n          7 6 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 12 2 -1.</_>\n        <_>\n          8 1 12 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 4 22 8 -1.</_>\n        <_>\n          11 4 11 4 2.</_>\n        <_>\n          0 8 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 6 4 -1.</_>\n        <_>\n          5 3 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 15 3 -1.</_>\n        <_>\n          7 12 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 7 -1.</_>\n        <_>\n          8 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 12 4 -1.</_>\n        <_>\n          13 12 6 2 2.</_>\n        <_>\n          7 14 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 16 2 -1.</_>\n        <_>\n          8 11 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 4 10 -1.</_>\n        <_>\n          18 3 4 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 2 17 3 -1.</_>\n        <_>\n          2 3 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 12 4 -1.</_>\n        <_>\n          16 14 6 2 2.</_>\n        <_>\n          10 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 11 6 -1.</_>\n        <_>\n          1 11 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 18 3 -1.</_>\n        <_>\n          4 10 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 3 -1.</_>\n        <_>\n          0 10 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 11 12 -1.</_>\n        <_>\n          11 11 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 6 -1.</_>\n        <_>\n          5 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 8 -1.</_>\n        <_>\n          17 10 3 4 2.</_>\n        <_>\n          14 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 11 12 -1.</_>\n        <_>\n          0 11 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 12 -1.</_>\n        <_>\n          15 3 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 12 4 -1.</_>\n        <_>\n          3 0 6 2 2.</_>\n        <_>\n          9 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 8 -1.</_>\n        <_>\n          17 10 3 4 2.</_>\n        <_>\n          14 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 8 6 -1.</_>\n        <_>\n          5 12 4 3 2.</_>\n        <_>\n          9 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 10 5 -1.</_>\n        <_>\n          8 11 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 10 5 -1.</_>\n        <_>\n          9 11 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 12 -1.</_>\n        <_>\n          12 6 6 6 2.</_>\n        <_>\n          6 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 6 8 -1.</_>\n        <_>\n          7 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 15 10 -1.</_>\n        <_>\n          7 13 15 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 22 4 -1.</_>\n        <_>\n          0 0 11 2 2.</_>\n        <_>\n          11 2 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 12 3 -1.</_>\n        <_>\n          10 4 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 13 3 -1.</_>\n        <_>\n          0 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 12 -1.</_>\n        <_>\n          9 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 9 6 -1.</_>\n        <_>\n          4 8 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 9 -1.</_>\n        <_>\n          11 6 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 8 -1.</_>\n        <_>\n          9 6 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 10 -1.</_>\n        <_>\n          7 5 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 9 2 -1.</_>\n        <_>\n          11 5 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 11 -1.</_>\n        <_>\n          18 1 1 11 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 11 3 -1.</_>\n        <_>\n          4 1 11 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 7 -1.</_>\n        <_>\n          9 6 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 6 6 -1.</_>\n        <_>\n          3 13 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 16 8 -1.</_>\n        <_>\n          6 12 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 9 3 -1.</_>\n        <_>\n          10 7 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 11 8 6 -1.</_>\n        <_>\n          12 13 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 16 8 -1.</_>\n        <_>\n          0 12 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 12 4 -1.</_>\n        <_>\n          16 14 6 2 2.</_>\n        <_>\n          10 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 8 6 -1.</_>\n        <_>\n          2 13 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 16 4 -1.</_>\n        <_>\n          14 11 8 2 2.</_>\n        <_>\n          6 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 22 6 -1.</_>\n        <_>\n          11 11 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 8 -1.</_>\n        <_>\n          17 10 3 4 2.</_>\n        <_>\n          14 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 6 8 -1.</_>\n        <_>\n          2 10 3 4 2.</_>\n        <_>\n          5 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 15 12 -1.</_>\n        <_>\n          11 8 5 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 18 12 -1.</_>\n        <_>\n          6 8 6 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 2 8 -1.</_>\n        <_>\n          15 7 1 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 3 10 3 -1.</_>\n        <_>\n          2 4 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 2 14 3 -1.</_>\n        <_>\n          4 3 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 8 2 -1.</_>\n        <_>\n          10 8 8 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 5 4 7 -1.</_>\n        <_>\n          15 5 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 6 5 6 -1.</_>\n        <_>\n          3 9 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 8 6 -1.</_>\n        <_>\n          18 1 4 3 2.</_>\n        <_>\n          14 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 6 -1.</_>\n        <_>\n          0 1 4 3 2.</_>\n        <_>\n          4 4 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 4 12 -1.</_>\n        <_>\n          18 0 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 12 -1.</_>\n        <_>\n          2 0 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 12 2 -1.</_>\n        <_>\n          9 17 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 12 2 -1.</_>\n        <_>\n          1 17 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 12 3 -1.</_>\n        <_>\n          10 16 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 12 3 -1.</_>\n        <_>\n          0 16 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 12 4 -1.</_>\n        <_>\n          16 14 6 2 2.</_>\n        <_>\n          10 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 12 4 -1.</_>\n        <_>\n          0 14 6 2 2.</_>\n        <_>\n          6 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 12 4 -1.</_>\n        <_>\n          15 11 6 2 2.</_>\n        <_>\n          9 13 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 16 4 -1.</_>\n        <_>\n          0 11 8 2 2.</_>\n        <_>\n          8 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 9 6 -1.</_>\n        <_>\n          8 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 9 6 -1.</_>\n        <_>\n          5 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 2 -1.</_>\n        <_>\n          4 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 10 8 -1.</_>\n        <_>\n          1 10 5 4 2.</_>\n        <_>\n          6 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 5 9 -1.</_>\n        <_>\n          13 5 5 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 4 4 6 -1.</_>\n        <_>\n          6 4 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 9 7 -1.</_>\n        <_>\n          12 2 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 9 7 -1.</_>\n        <_>\n          7 2 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 5 9 -1.</_>\n        <_>\n          13 5 5 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 5 -1.</_>\n        <_>\n          9 5 3 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 12 14 6 -1.</_>\n        <_>\n          5 14 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 12 -1.</_>\n        <_>\n          6 4 2 6 2.</_>\n        <_>\n          8 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 10 8 -1.</_>\n        <_>\n          9 4 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 8 -1.</_>\n        <_>\n          7 5 3 4 2.</_>\n        <_>\n          10 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 8 -1.</_>\n        <_>\n          11 7 3 4 2.</_>\n        <_>\n          8 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 11 2 -1.</_>\n        <_>\n          2 4 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 13 -1.</_>\n        <_>\n          17 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 3 -1.</_>\n        <_>\n          2 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 6 4 -1.</_>\n        <_>\n          15 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 13 3 -1.</_>\n        <_>\n          2 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 18 4 -1.</_>\n        <_>\n          4 6 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 10 9 -1.</_>\n        <_>\n          8 3 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 6 -1.</_>\n        <_>\n          8 9 6 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 11 2 -1.</_>\n        <_>\n          10 4 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 12 -1.</_>\n        <_>\n          17 6 3 6 2.</_>\n        <_>\n          14 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 6 12 -1.</_>\n        <_>\n          2 6 3 6 2.</_>\n        <_>\n          5 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 16 6 -1.</_>\n        <_>\n          3 6 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 16 3 -1.</_>\n        <_>\n          5 11 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 8 3 -1.</_>\n        <_>\n          12 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 17 9 -1.</_>\n        <_>\n          0 12 17 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 10 -1.</_>\n        <_>\n          11 4 3 5 2.</_>\n        <_>\n          8 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 16 8 -1.</_>\n        <_>\n          2 4 8 4 2.</_>\n        <_>\n          10 8 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 12 4 -1.</_>\n        <_>\n          15 6 6 2 2.</_>\n        <_>\n          9 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 6 -1.</_>\n        <_>\n          9 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 7 4 -1.</_>\n        <_>\n          15 5 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 6 -1.</_>\n        <_>\n          0 6 9 3 2.</_>\n        <_>\n          9 9 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 15 3 -1.</_>\n        <_>\n          4 3 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 6 -1.</_>\n        <_>\n          5 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 8 6 -1.</_>\n        <_>\n          17 4 4 3 2.</_>\n        <_>\n          13 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 13 6 -1.</_>\n        <_>\n          4 4 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 12 3 -1.</_>\n        <_>\n          9 9 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 16 3 -1.</_>\n        <_>\n          1 9 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 5 8 -1.</_>\n        <_>\n          11 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 11 2 -1.</_>\n        <_>\n          3 4 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 12 3 -1.</_>\n        <_>\n          10 8 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 7 8 -1.</_>\n        <_>\n          9 3 7 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 12 -1.</_>\n        <_>\n          13 2 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 4 -1.</_>\n        <_>\n          0 9 6 2 2.</_>\n        <_>\n          6 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 6 -1.</_>\n        <_>\n          13 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 6 -1.</_>\n        <_>\n          2 8 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 6 -1.</_>\n        <_>\n          13 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 8 6 -1.</_>\n        <_>\n          5 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 4 -1.</_>\n        <_>\n          10 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 12 10 -1.</_>\n        <_>\n          4 8 6 5 2.</_>\n        <_>\n          10 13 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 6 10 -1.</_>\n        <_>\n          17 7 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 6 4 -1.</_>\n        <_>\n          9 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 10 4 -1.</_>\n        <_>\n          8 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 4 18 -1.</_>\n        <_>\n          4 0 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 10 -1.</_>\n        <_>\n          11 0 8 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 3 -1.</_>\n        <_>\n          0 8 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 10 -1.</_>\n        <_>\n          17 0 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 4 -1.</_>\n        <_>\n          5 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 7 6 -1.</_>\n        <_>\n          15 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 7 6 -1.</_>\n        <_>\n          0 12 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 6 -1.</_>\n        <_>\n          15 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 7 -1.</_>\n        <_>\n          11 11 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 4 9 -1.</_>\n        <_>\n          13 8 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 8 6 -1.</_>\n        <_>\n          2 12 4 3 2.</_>\n        <_>\n          6 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 6 4 -1.</_>\n        <_>\n          9 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 8 6 -1.</_>\n        <_>\n          7 12 4 3 2.</_>\n        <_>\n          11 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 14 -1.</_>\n        <_>\n          12 1 6 7 2.</_>\n        <_>\n          6 8 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 4 9 -1.</_>\n        <_>\n          5 8 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 12 4 -1.</_>\n        <_>\n          11 13 6 2 2.</_>\n        <_>\n          5 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 8 3 -1.</_>\n        <_>\n          8 8 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 8 10 -1.</_>\n        <_>\n          7 10 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 3 -1.</_>\n        <_>\n          6 2 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 14 12 3 -1.</_>\n        <_>\n          10 15 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 18 12 -1.</_>\n        <_>\n          0 12 18 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 6 -1.</_>\n        <_>\n          9 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 4 12 -1.</_>\n        <_>\n          3 2 2 6 2.</_>\n        <_>\n          5 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 12 -1.</_>\n        <_>\n          13 2 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 8 -1.</_>\n        <_>\n          2 4 3 4 2.</_>\n        <_>\n          5 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 4 6 -1.</_>\n        <_>\n          14 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 12 -1.</_>\n        <_>\n          0 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 12 -1.</_>\n        <_>\n          13 2 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 12 2 -1.</_>\n        <_>\n          9 2 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 9 12 4 -1.</_>\n        <_>\n          16 9 6 2 2.</_>\n        <_>\n          10 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 4 -1.</_>\n        <_>\n          0 9 6 2 2.</_>\n        <_>\n          6 11 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 4 9 -1.</_>\n        <_>\n          17 12 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 10 6 -1.</_>\n        <_>\n          1 9 5 3 2.</_>\n        <_>\n          6 12 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 9 4 -1.</_>\n        <_>\n          8 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 10 -1.</_>\n        <_>\n          2 8 3 5 2.</_>\n        <_>\n          5 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 12 6 -1.</_>\n        <_>\n          10 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 12 6 -1.</_>\n        <_>\n          6 10 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 2 12 -1.</_>\n        <_>\n          20 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 12 -1.</_>\n        <_>\n          0 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 4 15 -1.</_>\n        <_>\n          14 3 2 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 14 -1.</_>\n        <_>\n          0 1 8 7 2.</_>\n        <_>\n          8 8 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 10 -1.</_>\n        <_>\n          11 0 8 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 16 4 -1.</_>\n        <_>\n          0 3 8 2 2.</_>\n        <_>\n          8 5 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 7 12 -1.</_>\n        <_>\n          13 4 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 11 15 -1.</_>\n        <_>\n          5 8 11 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 7 12 -1.</_>\n        <_>\n          13 4 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 7 12 -1.</_>\n        <_>\n          2 4 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 18 12 -1.</_>\n        <_>\n          10 9 6 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 14 6 -1.</_>\n        <_>\n          4 7 7 3 2.</_>\n        <_>\n          11 10 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 13 3 -1.</_>\n        <_>\n          7 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 13 3 -1.</_>\n        <_>\n          2 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 17 3 -1.</_>\n        <_>\n          5 10 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 10 9 -1.</_>\n        <_>\n          1 4 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 8 -1.</_>\n        <_>\n          4 3 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 12 -1.</_>\n        <_>\n          8 5 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 5 -1.</_>\n        <_>\n          11 7 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 5 -1.</_>\n        <_>\n          8 4 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 4 -1.</_>\n        <_>\n          11 12 9 2 2.</_>\n        <_>\n          2 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 9 3 -1.</_>\n        <_>\n          10 5 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 10 -1.</_>\n        <_>\n          15 0 1 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 12 -1.</_>\n        <_>\n          6 9 6 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 4 6 -1.</_>\n        <_>\n          14 9 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 3 12 -1.</_>\n        <_>\n          5 10 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 9 -1.</_>\n        <_>\n          12 1 1 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 9 4 9 -1.</_>\n        <_>\n          1 12 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 4 9 -1.</_>\n        <_>\n          18 12 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 6 4 -1.</_>\n        <_>\n          9 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 9 -1.</_>\n        <_>\n          12 1 1 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 9 3 -1.</_>\n        <_>\n          10 1 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 2 -1.</_>\n        <_>\n          5 16 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 22 2 -1.</_>\n        <_>\n          11 0 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 2 13 -1.</_>\n        <_>\n          20 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 13 -1.</_>\n        <_>\n          1 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 6 -1.</_>\n        <_>\n          12 1 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 6 -1.</_>\n        <_>\n          8 1 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 12 3 -1.</_>\n        <_>\n          10 8 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 3 -1.</_>\n        <_>\n          0 8 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 8 6 -1.</_>\n        <_>\n          1 9 4 3 2.</_>\n        <_>\n          5 12 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 7 4 -1.</_>\n        <_>\n          10 12 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 6 -1.</_>\n        <_>\n          10 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 8 4 -1.</_>\n        <_>\n          13 6 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 8 7 -1.</_>\n        <_>\n          12 3 4 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 7 -1.</_>\n        <_>\n          8 5 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 7 -1.</_>\n        <_>\n          10 5 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 16 12 -1.</_>\n        <_>\n          14 3 8 6 2.</_>\n        <_>\n          6 9 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 6 6 -1.</_>\n        <_>\n          4 13 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 18 14 -1.</_>\n        <_>\n          13 2 9 7 2.</_>\n        <_>\n          4 9 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 11 12 -1.</_>\n        <_>\n          5 3 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 16 9 -1.</_>\n        <_>\n          4 10 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 3 -1.</_>\n        <_>\n          0 2 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 6 4 -1.</_>\n        <_>\n          12 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 8 -1.</_>\n        <_>\n          1 10 3 4 2.</_>\n        <_>\n          4 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 8 6 -1.</_>\n        <_>\n          18 12 4 3 2.</_>\n        <_>\n          14 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 12 3 -1.</_>\n        <_>\n          13 7 4 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 6 -1.</_>\n        <_>\n          8 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 14 10 -1.</_>\n        <_>\n          4 13 14 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 8 8 -1.</_>\n        <_>\n          11 2 4 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 8 -1.</_>\n        <_>\n          9 6 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 3 4 10 -1.</_>\n        <_>\n          18 3 4 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 3 -1.</_>\n        <_>\n          9 15 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 4 6 -1.</_>\n        <_>\n          11 8 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 8 6 4 -1.</_>\n        <_>\n          11 8 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 13 16 5 -1.</_>\n        <_>\n          7 13 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 4 12 -1.</_>\n        <_>\n          6 2 2 6 2.</_>\n        <_>\n          8 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 18 4 -1.</_>\n        <_>\n          11 14 9 2 2.</_>\n        <_>\n          2 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 12 3 -1.</_>\n        <_>\n          3 2 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 16 3 -1.</_>\n        <_>\n          6 2 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 8 3 -1.</_>\n        <_>\n          9 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 4 6 -1.</_>\n        <_>\n          16 3 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 3 10 4 -1.</_>\n        <_>\n          4 3 5 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 8 -1.</_>\n        <_>\n          17 5 3 4 2.</_>\n        <_>\n          14 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 14 12 -1.</_>\n        <_>\n          1 5 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 12 -1.</_>\n        <_>\n          11 5 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 12 -1.</_>\n        <_>\n          5 5 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 8 5 -1.</_>\n        <_>\n          11 5 4 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 9 18 -1.</_>\n        <_>\n          7 0 3 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 4 -1.</_>\n        <_>\n          11 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 6 4 -1.</_>\n        <_>\n          5 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 6 4 -1.</_>\n        <_>\n          12 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 13 3 -1.</_>\n        <_>\n          1 7 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 12 3 -1.</_>\n        <_>\n          10 7 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 4 -1.</_>\n        <_>\n          4 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 6 -1.</_>\n        <_>\n          16 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 6 -1.</_>\n        <_>\n          4 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 12 3 -1.</_>\n        <_>\n          11 15 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 8 5 -1.</_>\n        <_>\n          5 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 8 -1.</_>\n        <_>\n          17 5 3 4 2.</_>\n        <_>\n          14 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 8 -1.</_>\n        <_>\n          2 5 3 4 2.</_>\n        <_>\n          5 9 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 8 6 -1.</_>\n        <_>\n          18 11 4 3 2.</_>\n        <_>\n          14 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 6 -1.</_>\n        <_>\n          4 0 4 3 2.</_>\n        <_>\n          8 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 7 4 -1.</_>\n        <_>\n          14 3 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 6 -1.</_>\n        <_>\n          0 11 4 3 2.</_>\n        <_>\n          4 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 14 4 -1.</_>\n        <_>\n          4 15 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 9 8 -1.</_>\n        <_>\n          8 3 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 8 -1.</_>\n        <_>\n          10 0 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 15 8 -1.</_>\n        <_>\n          7 0 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 11 -1.</_>\n        <_>\n          16 0 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 2 -1.</_>\n        <_>\n          6 16 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 9 -1.</_>\n        <_>\n          9 6 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 7 -1.</_>\n        <_>\n          8 3 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 6 8 -1.</_>\n        <_>\n          12 3 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 8 -1.</_>\n        <_>\n          8 3 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 12 4 -1.</_>\n        <_>\n          7 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 16 8 -1.</_>\n        <_>\n          3 9 8 4 2.</_>\n        <_>\n          11 13 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 13 3 -1.</_>\n        <_>\n          9 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 4 12 -1.</_>\n        <_>\n          4 0 2 6 2.</_>\n        <_>\n          6 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 4 -1.</_>\n        <_>\n          6 11 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 6 4 -1.</_>\n        <_>\n          6 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 12 3 -1.</_>\n        <_>\n          10 7 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 12 3 -1.</_>\n        <_>\n          0 7 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 14 6 -1.</_>\n        <_>\n          6 4 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 4 -1.</_>\n        <_>\n          4 1 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 0 21 18 -1.</_>\n        <_>\n          8 0 7 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 2 -1.</_>\n        <_>\n          5 0 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 8 4 9 -1.</_>\n        <_>\n          14 11 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 10 -1.</_>\n        <_>\n          4 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 4 -1.</_>\n        <_>\n          11 11 6 2 2.</_>\n        <_>\n          5 13 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 6 -1.</_>\n        <_>\n          10 5 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 15 9 -1.</_>\n        <_>\n          12 4 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 15 9 -1.</_>\n        <_>\n          5 4 5 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 16 -1.</_>\n        <_>\n          11 0 6 8 2.</_>\n        <_>\n          5 8 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 5 -1.</_>\n        <_>\n          11 10 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 9 -1.</_>\n        <_>\n          10 7 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 8 9 -1.</_>\n        <_>\n          4 7 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 3 -1.</_>\n        <_>\n          8 4 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 13 3 -1.</_>\n        <_>\n          0 4 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 12 3 -1.</_>\n        <_>\n          14 1 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 3 -1.</_>\n        <_>\n          4 1 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 3 -1.</_>\n        <_>\n          8 4 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 4 -1.</_>\n        <_>\n          8 4 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 2 11 -1.</_>\n        <_>\n          13 2 1 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 11 2 -1.</_>\n        <_>\n          9 2 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 16 -1.</_>\n        <_>\n          11 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 9 -1.</_>\n        <_>\n          7 4 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 8 -1.</_>\n        <_>\n          12 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 4 -1.</_>\n        <_>\n          1 9 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 4 8 -1.</_>\n        <_>\n          12 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 8 -1.</_>\n        <_>\n          6 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 3 12 -1.</_>\n        <_>\n          20 4 1 12 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 3 12 3 -1.</_>\n        <_>\n          2 4 12 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 6 3 7 -1.</_>\n        <_>\n          14 7 1 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 4 -1.</_>\n        <_>\n          11 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 10 10 -1.</_>\n        <_>\n          15 8 5 5 2.</_>\n        <_>\n          10 13 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 10 10 -1.</_>\n        <_>\n          2 8 5 5 2.</_>\n        <_>\n          7 13 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 20 3 -1.</_>\n        <_>\n          6 11 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 4 -1.</_>\n        <_>\n          13 8 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 11 8 4 -1.</_>\n        <_>\n          8 11 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 6 -1.</_>\n        <_>\n          9 5 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 9 -1.</_>\n        <_>\n          7 8 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 4 -1.</_>\n        <_>\n          4 5 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 18 6 -1.</_>\n        <_>\n          8 6 6 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 11 -1.</_>\n        <_>\n          11 1 1 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 8 -1.</_>\n        <_>\n          7 1 3 4 2.</_>\n        <_>\n          10 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 8 6 -1.</_>\n        <_>\n          9 10 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 9 4 -1.</_>\n        <_>\n          9 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 9 4 -1.</_>\n        <_>\n          13 12 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 8 -1.</_>\n        <_>\n          8 0 5 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 6 12 4 -1.</_>\n        <_>\n          15 6 6 2 2.</_>\n        <_>\n          9 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 14 5 -1.</_>\n        <_>\n          11 9 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 6 -1.</_>\n        <_>\n          12 8 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 7 -1.</_>\n        <_>\n          8 4 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 6 -1.</_>\n        <_>\n          14 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 6 6 -1.</_>\n        <_>\n          2 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 4 8 -1.</_>\n        <_>\n          13 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 9 -1.</_>\n        <_>\n          7 8 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 18 12 -1.</_>\n        <_>\n          8 8 6 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 10 6 -1.</_>\n        <_>\n          8 5 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 8 -1.</_>\n        <_>\n          6 0 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 8 7 -1.</_>\n        <_>\n          2 11 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 11 6 7 -1.</_>\n        <_>\n          17 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 14 2 -1.</_>\n        <_>\n          3 17 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 13 3 -1.</_>\n        <_>\n          9 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 13 3 -1.</_>\n        <_>\n          0 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 12 3 -1.</_>\n        <_>\n          5 14 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 14 3 -1.</_>\n        <_>\n          0 15 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 6 -1.</_>\n        <_>\n          15 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 6 -1.</_>\n        <_>\n          5 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 20 4 -1.</_>\n        <_>\n          7 3 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 12 2 -1.</_>\n        <_>\n          4 14 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 6 -1.</_>\n        <_>\n          12 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 7 -1.</_>\n        <_>\n          10 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 10 -1.</_>\n        <_>\n          16 1 1 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 3 -1.</_>\n        <_>\n          6 1 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 8 6 -1.</_>\n        <_>\n          15 4 4 3 2.</_>\n        <_>\n          11 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 3 -1.</_>\n        <_>\n          6 1 12 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          19 4 3 11 -1.</_>\n        <_>\n          20 5 1 11 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 7 -1.</_>\n        <_>\n          3 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 15 14 -1.</_>\n        <_>\n          7 11 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 11 3 -1.</_>\n        <_>\n          2 5 11 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 8 -1.</_>\n        <_>\n          15 7 1 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 3 18 -1.</_>\n        <_>\n          4 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 8 4 -1.</_>\n        <_>\n          14 3 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 8 -1.</_>\n        <_>\n          8 3 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 2 4 12 -1.</_>\n        <_>\n          15 5 4 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 9 17 3 -1.</_>\n        <_>\n          2 10 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 14 3 -1.</_>\n        <_>\n          7 10 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 8 -1.</_>\n        <_>\n          8 2 3 4 2.</_>\n        <_>\n          11 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 8 6 -1.</_>\n        <_>\n          15 4 4 3 2.</_>\n        <_>\n          11 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 8 6 -1.</_>\n        <_>\n          3 4 4 3 2.</_>\n        <_>\n          7 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 3 -1.</_>\n        <_>\n          3 2 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 8 3 -1.</_>\n        <_>\n          4 9 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 9 10 -1.</_>\n        <_>\n          13 7 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 12 -1.</_>\n        <_>\n          1 2 4 6 2.</_>\n        <_>\n          5 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 8 6 -1.</_>\n        <_>\n          16 5 4 3 2.</_>\n        <_>\n          12 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 17 3 -1.</_>\n        <_>\n          1 1 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 2 -1.</_>\n        <_>\n          4 1 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 4 -1.</_>\n        <_>\n          5 2 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 15 14 -1.</_>\n        <_>\n          7 11 15 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 9 2 -1.</_>\n        <_>\n          8 2 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 13 -1.</_>\n        <_>\n          16 0 1 13 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 13 2 -1.</_>\n        <_>\n          6 0 13 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 2 9 -1.</_>\n        <_>\n          12 7 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 9 2 -1.</_>\n        <_>\n          10 7 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 11 10 -1.</_>\n        <_>\n          9 5 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 9 2 -1.</_>\n        <_>\n          8 5 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 2 9 10 -1.</_>\n        <_>\n          13 7 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 9 10 -1.</_>\n        <_>\n          0 7 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 3 8 -1.</_>\n        <_>\n          17 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 3 8 -1.</_>\n        <_>\n          2 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 18 4 -1.</_>\n        <_>\n          13 4 9 2 2.</_>\n        <_>\n          4 6 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 18 4 -1.</_>\n        <_>\n          0 4 9 2 2.</_>\n        <_>\n          9 6 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 4 -1.</_>\n        <_>\n          11 1 7 2 2.</_>\n        <_>\n          4 3 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 21 8 -1.</_>\n        <_>\n          7 0 7 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 18 -1.</_>\n        <_>\n          12 0 7 9 2.</_>\n        <_>\n          5 9 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 16 4 -1.</_>\n        <_>\n          5 11 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 10 6 -1.</_>\n        <_>\n          6 11 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 4 -1.</_>\n        <_>\n          5 11 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 6 6 -1.</_>\n        <_>\n          15 4 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 6 -1.</_>\n        <_>\n          7 4 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 5 8 6 -1.</_>\n        <_>\n          16 5 4 3 2.</_>\n        <_>\n          12 8 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 4 -1.</_>\n        <_>\n          5 5 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 12 -1.</_>\n        <_>\n          17 10 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 9 2 -1.</_>\n        <_>\n          5 7 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 8 -1.</_>\n        <_>\n          15 7 1 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 12 2 -1.</_>\n        <_>\n          5 8 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 18 3 -1.</_>\n        <_>\n          4 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 15 9 -1.</_>\n        <_>\n          6 6 5 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 3 10 -1.</_>\n        <_>\n          19 4 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 12 18 6 -1.</_>\n        <_>\n          0 15 18 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 13 4 -1.</_>\n        <_>\n          6 15 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 8 9 -1.</_>\n        <_>\n          3 8 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 10 8 -1.</_>\n        <_>\n          6 10 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 13 6 -1.</_>\n        <_>\n          4 9 13 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 2 12 -1.</_>\n        <_>\n          14 3 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 2 -1.</_>\n        <_>\n          8 3 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 1 5 12 -1.</_>\n        <_>\n          13 1 5 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 12 5 -1.</_>\n        <_>\n          9 1 6 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 12 8 3 -1.</_>\n        <_>\n          8 12 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 12 4 -1.</_>\n        <_>\n          8 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 6 4 -1.</_>\n        <_>\n          13 8 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 8 4 6 -1.</_>\n        <_>\n          9 8 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 7 20 11 -1.</_>\n        <_>\n          6 7 10 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 12 3 -1.</_>\n        <_>\n          10 14 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 4 -1.</_>\n        <_>\n          4 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 6 4 -1.</_>\n        <_>\n          15 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 12 3 -1.</_>\n        <_>\n          0 14 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 14 8 -1.</_>\n        <_>\n          4 14 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 12 4 -1.</_>\n        <_>\n          5 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 12 2 -1.</_>\n        <_>\n          5 17 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 20 12 -1.</_>\n        <_>\n          6 0 10 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 15 5 -1.</_>\n        <_>\n          12 12 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 15 2 -1.</_>\n        <_>\n          6 0 15 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 8 -1.</_>\n        <_>\n          12 5 6 4 2.</_>\n        <_>\n          6 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 8 -1.</_>\n        <_>\n          4 5 6 4 2.</_>\n        <_>\n          10 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 16 6 -1.</_>\n        <_>\n          14 2 8 3 2.</_>\n        <_>\n          6 5 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 16 14 -1.</_>\n        <_>\n          1 2 8 7 2.</_>\n        <_>\n          9 9 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 4 -1.</_>\n        <_>\n          11 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 12 9 -1.</_>\n        <_>\n          7 11 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 14 4 -1.</_>\n        <_>\n          15 3 7 2 2.</_>\n        <_>\n          8 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 8 -1.</_>\n        <_>\n          11 2 2 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 13 6 4 -1.</_>\n        <_>\n          12 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 4 -1.</_>\n        <_>\n          4 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 16 2 -1.</_>\n        <_>\n          6 17 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 12 3 -1.</_>\n        <_>\n          0 4 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 14 3 -1.</_>\n        <_>\n          8 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 16 -1.</_>\n        <_>\n          6 6 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 14 -1.</_>\n        <_>\n          12 2 7 7 2.</_>\n        <_>\n          5 9 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 3 8 -1.</_>\n        <_>\n          5 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 7 4 -1.</_>\n        <_>\n          14 7 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 9 -1.</_>\n        <_>\n          8 9 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 15 6 -1.</_>\n        <_>\n          12 11 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 15 6 -1.</_>\n        <_>\n          5 11 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 6 8 -1.</_>\n        <_>\n          18 7 3 4 2.</_>\n        <_>\n          15 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 22 10 -1.</_>\n        <_>\n          0 7 11 5 2.</_>\n        <_>\n          11 12 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 20 8 -1.</_>\n        <_>\n          6 8 10 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 7 6 -1.</_>\n        <_>\n          2 7 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 15 8 -1.</_>\n        <_>\n          7 4 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 14 8 -1.</_>\n        <_>\n          3 3 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 13 2 -1.</_>\n        <_>\n          9 3 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 8 -1.</_>\n        <_>\n          10 3 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 15 2 -1.</_>\n        <_>\n          7 2 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 15 2 -1.</_>\n        <_>\n          0 2 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 3 -1.</_>\n        <_>\n          6 1 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 9 4 -1.</_>\n        <_>\n          7 0 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 8 3 -1.</_>\n        <_>\n          12 3 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 4 -1.</_>\n        <_>\n          11 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 10 4 -1.</_>\n        <_>\n          12 1 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 10 4 -1.</_>\n        <_>\n          5 1 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 6 5 -1.</_>\n        <_>\n          16 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 5 -1.</_>\n        <_>\n          3 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 11 4 7 -1.</_>\n        <_>\n          18 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 4 7 -1.</_>\n        <_>\n          2 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 14 -1.</_>\n        <_>\n          17 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 14 -1.</_>\n        <_>\n          3 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 14 -1.</_>\n        <_>\n          15 0 2 7 2.</_>\n        <_>\n          13 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 14 -1.</_>\n        <_>\n          5 0 2 7 2.</_>\n        <_>\n          7 7 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 4 -1.</_>\n        <_>\n          13 2 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 12 4 -1.</_>\n        <_>\n          1 7 6 2 2.</_>\n        <_>\n          7 9 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 18 3 -1.</_>\n        <_>\n          4 14 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 2 12 -1.</_>\n        <_>\n          2 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 16 4 -1.</_>\n        <_>\n          12 11 8 2 2.</_>\n        <_>\n          4 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 4 -1.</_>\n        <_>\n          2 11 8 2 2.</_>\n        <_>\n          10 13 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 12 4 -1.</_>\n        <_>\n          16 12 6 2 2.</_>\n        <_>\n          10 14 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 12 4 -1.</_>\n        <_>\n          0 12 6 2 2.</_>\n        <_>\n          6 14 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 10 6 -1.</_>\n        <_>\n          17 12 5 3 2.</_>\n        <_>\n          12 15 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 10 8 -1.</_>\n        <_>\n          0 10 5 4 2.</_>\n        <_>\n          5 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 7 4 -1.</_>\n        <_>\n          8 2 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 3 -1.</_>\n        <_>\n          0 4 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 6 8 -1.</_>\n        <_>\n          18 1 3 4 2.</_>\n        <_>\n          15 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 7 4 -1.</_>\n        <_>\n          2 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 4 -1.</_>\n        <_>\n          13 2 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 4 -1.</_>\n        <_>\n          6 2 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 16 4 -1.</_>\n        <_>\n          5 2 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 13 3 -1.</_>\n        <_>\n          4 16 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 12 -1.</_>\n        <_>\n          13 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 16 2 -1.</_>\n        <_>\n          8 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 16 10 -1.</_>\n        <_>\n          3 7 16 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 12 4 -1.</_>\n        <_>\n          10 4 6 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 9 -1.</_>\n        <_>\n          14 1 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 10 3 8 -1.</_>\n        <_>\n          4 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 6 6 -1.</_>\n        <_>\n          11 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 6 -1.</_>\n        <_>\n          5 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 12 -1.</_>\n        <_>\n          13 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 8 3 -1.</_>\n        <_>\n          9 7 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 12 -1.</_>\n        <_>\n          13 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 12 -1.</_>\n        <_>\n          8 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 9 -1.</_>\n        <_>\n          14 1 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 10 3 -1.</_>\n        <_>\n          10 5 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 11 9 4 -1.</_>\n        <_>\n          11 11 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 2 12 -1.</_>\n        <_>\n          8 5 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 16 -1.</_>\n        <_>\n          14 1 1 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 6 -1.</_>\n        <_>\n          9 4 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 2 12 -1.</_>\n        <_>\n          10 4 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 5 -1.</_>\n        <_>\n          9 0 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 2 12 -1.</_>\n        <_>\n          16 3 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 2 -1.</_>\n        <_>\n          6 3 12 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 6 4 7 -1.</_>\n        <_>\n          14 7 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 3 13 2 -1.</_>\n        <_>\n          7 3 13 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 14 17 4 -1.</_>\n        <_>\n          5 15 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 18 3 -1.</_>\n        <_>\n          0 14 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 14 3 -1.</_>\n        <_>\n          6 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 14 3 -1.</_>\n        <_>\n          2 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 12 2 -1.</_>\n        <_>\n          5 14 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 4 8 -1.</_>\n        <_>\n          0 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 6 8 -1.</_>\n        <_>\n          18 7 3 4 2.</_>\n        <_>\n          15 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 7 -1.</_>\n        <_>\n          11 2 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 14 3 -1.</_>\n        <_>\n          8 5 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 12 3 -1.</_>\n        <_>\n          0 5 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 9 -1.</_>\n        <_>\n          13 5 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 9 -1.</_>\n        <_>\n          5 5 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 4 -1.</_>\n        <_>\n          12 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 3 -1.</_>\n        <_>\n          11 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 12 -1.</_>\n        <_>\n          7 4 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 7 -1.</_>\n        <_>\n          11 5 2 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 9 6 -1.</_>\n        <_>\n          10 3 9 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 7 8 3 -1.</_>\n        <_>\n          11 7 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 9 -1.</_>\n        <_>\n          14 1 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 8 -1.</_>\n        <_>\n          1 7 3 4 2.</_>\n        <_>\n          4 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 6 -1.</_>\n        <_>\n          11 0 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 6 -1.</_>\n        <_>\n          9 0 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 22 4 -1.</_>\n        <_>\n          11 7 11 2 2.</_>\n        <_>\n          0 9 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 8 -1.</_>\n        <_>\n          3 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 12 3 -1.</_>\n        <_>\n          9 4 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 12 3 -1.</_>\n        <_>\n          10 2 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 16 -1.</_>\n        <_>\n          5 10 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 8 4 -1.</_>\n        <_>\n          12 6 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 6 -1.</_>\n        <_>\n          5 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 1 3 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 12 3 -1.</_>\n        <_>\n          10 1 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 4 -1.</_>\n        <_>\n          8 8 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 4 6 -1.</_>\n        <_>\n          8 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 9 4 -1.</_>\n        <_>\n          10 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 4 7 -1.</_>\n        <_>\n          10 10 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 4 6 -1.</_>\n        <_>\n          12 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 6 -1.</_>\n        <_>\n          8 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 4 6 -1.</_>\n        <_>\n          9 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 6 -1.</_>\n        <_>\n          7 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 11 16 -1.</_>\n        <_>\n          6 6 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 2 -1.</_>\n        <_>\n          11 2 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 6 8 -1.</_>\n        <_>\n          13 1 3 4 2.</_>\n        <_>\n          10 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 2 -1.</_>\n        <_>\n          11 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 8 3 -1.</_>\n        <_>\n          10 13 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 6 -1.</_>\n        <_>\n          11 0 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 12 3 -1.</_>\n        <_>\n          10 8 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 12 3 -1.</_>\n        <_>\n          0 8 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 2 18 -1.</_>\n        <_>\n          20 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 2 18 -1.</_>\n        <_>\n          0 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 12 -1.</_>\n        <_>\n          17 6 3 6 2.</_>\n        <_>\n          14 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 10 -1.</_>\n        <_>\n          1 10 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 4 12 -1.</_>\n        <_>\n          16 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 4 12 -1.</_>\n        <_>\n          2 5 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 16 4 -1.</_>\n        <_>\n          11 12 8 2 2.</_>\n        <_>\n          3 14 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 2 -1.</_>\n        <_>\n          0 3 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 13 3 -1.</_>\n        <_>\n          6 3 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 10 6 -1.</_>\n        <_>\n          1 0 5 3 2.</_>\n        <_>\n          6 3 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 12 5 -1.</_>\n        <_>\n          13 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 6 12 -1.</_>\n        <_>\n          2 6 3 6 2.</_>\n        <_>\n          5 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 8 6 -1.</_>\n        <_>\n          13 12 4 3 2.</_>\n        <_>\n          9 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 8 -1.</_>\n        <_>\n          1 7 3 4 2.</_>\n        <_>\n          4 11 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 8 -1.</_>\n        <_>\n          15 7 1 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 14 12 4 -1.</_>\n        <_>\n          6 14 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 2 11 -1.</_>\n        <_>\n          14 4 1 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 3 -1.</_>\n        <_>\n          7 7 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 12 12 3 -1.</_>\n        <_>\n          6 13 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 18 3 -1.</_>\n        <_>\n          2 4 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 9 9 -1.</_>\n        <_>\n          14 6 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 11 4 -1.</_>\n        <_>\n          3 15 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 4 6 -1.</_>\n        <_>\n          17 5 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 4 6 -1.</_>\n        <_>\n          3 5 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 16 3 -1.</_>\n        <_>\n          10 0 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 12 -1.</_>\n        <_>\n          9 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 8 -1.</_>\n        <_>\n          14 2 1 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 0 12 3 -1.</_>\n        <_>\n          9 0 6 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 16 3 -1.</_>\n        <_>\n          10 0 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 3 -1.</_>\n        <_>\n          4 0 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 14 3 -1.</_>\n        <_>\n          8 13 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 11 2 -1.</_>\n        <_>\n          8 4 11 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 5 20 13 -1.</_>\n        <_>\n          2 5 10 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 9 -1.</_>\n        <_>\n          6 5 6 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 12 3 -1.</_>\n        <_>\n          10 14 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 7 -1.</_>\n        <_>\n          10 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 11 -1.</_>\n        <_>\n          9 6 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 6 -1.</_>\n        <_>\n          5 6 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 13 -1.</_>\n        <_>\n          15 4 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 13 -1.</_>\n        <_>\n          5 4 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 3 -1.</_>\n        <_>\n          9 10 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 6 -1.</_>\n        <_>\n          8 8 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 8 -1.</_>\n        <_>\n          14 2 1 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 2 -1.</_>\n        <_>\n          8 2 8 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 6 9 5 -1.</_>\n        <_>\n          11 6 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 4 -1.</_>\n        <_>\n          0 3 7 2 2.</_>\n        <_>\n          7 5 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 8 -1.</_>\n        <_>\n          13 2 1 8 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 8 3 -1.</_>\n        <_>\n          9 2 8 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 6 -1.</_>\n        <_>\n          14 5 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 6 10 -1.</_>\n        <_>\n          4 1 3 5 2.</_>\n        <_>\n          7 6 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 3 13 -1.</_>\n        <_>\n          19 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 3 13 -1.</_>\n        <_>\n          2 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 8 -1.</_>\n        <_>\n          11 1 1 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 8 2 -1.</_>\n        <_>\n          11 1 8 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 6 -1.</_>\n        <_>\n          8 6 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 7 6 -1.</_>\n        <_>\n          5 6 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 13 3 -1.</_>\n        <_>\n          9 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 13 3 -1.</_>\n        <_>\n          0 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 9 8 -1.</_>\n        <_>\n          12 14 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 9 8 -1.</_>\n        <_>\n          1 14 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 18 8 -1.</_>\n        <_>\n          13 10 9 4 2.</_>\n        <_>\n          4 14 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 8 -1.</_>\n        <_>\n          0 10 9 4 2.</_>\n        <_>\n          9 14 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 12 -1.</_>\n        <_>\n          12 2 2 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 5 20 13 -1.</_>\n        <_>\n          10 5 10 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 9 6 -1.</_>\n        <_>\n          10 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 9 6 -1.</_>\n        <_>\n          3 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 15 8 -1.</_>\n        <_>\n          7 6 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 12 2 -1.</_>\n        <_>\n          9 2 12 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 4 -1.</_>\n        <_>\n          12 6 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 0 13 3 -1.</_>\n        <_>\n          6 1 13 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 2 -1.</_>\n        <_>\n          3 0 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 13 12 -1.</_>\n        <_>\n          4 9 13 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 18 9 -1.</_>\n        <_>\n          10 9 6 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 11 -1.</_>\n        <_>\n          10 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 16 16 -1.</_>\n        <_>\n          6 6 16 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 16 16 -1.</_>\n        <_>\n          0 6 16 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 2 12 -1.</_>\n        <_>\n          18 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 2 12 -1.</_>\n        <_>\n          2 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 14 9 -1.</_>\n        <_>\n          8 6 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 14 9 -1.</_>\n        <_>\n          0 6 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          10 9 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 3 12 -1.</_>\n        <_>\n          0 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 6 9 -1.</_>\n        <_>\n          13 5 6 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 12 4 -1.</_>\n        <_>\n          9 1 12 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 10 18 -1.</_>\n        <_>\n          16 0 5 9 2.</_>\n        <_>\n          11 9 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 10 18 -1.</_>\n        <_>\n          1 0 5 9 2.</_>\n        <_>\n          6 9 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 14 3 -1.</_>\n        <_>\n          7 12 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 8 3 -1.</_>\n        <_>\n          11 11 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 4 -1.</_>\n        <_>\n          2 13 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 6 -1.</_>\n        <_>\n          10 6 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 9 -1.</_>\n        <_>\n          10 9 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 13 3 -1.</_>\n        <_>\n          3 12 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 4 6 -1.</_>\n        <_>\n          18 10 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 9 5 -1.</_>\n        <_>\n          8 5 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 14 -1.</_>\n        <_>\n          13 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 7 -1.</_>\n        <_>\n          8 0 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 6 8 -1.</_>\n        <_>\n          16 4 3 4 2.</_>\n        <_>\n          13 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 8 -1.</_>\n        <_>\n          3 4 3 4 2.</_>\n        <_>\n          6 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 2 -1.</_>\n        <_>\n          8 6 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 12 -1.</_>\n        <_>\n          8 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 10 -1.</_>\n        <_>\n          16 1 1 10 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 4 12 12 -1.</_>\n        <_>\n          6 8 4 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 13 3 -1.</_>\n        <_>\n          5 11 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 2 -1.</_>\n        <_>\n          5 16 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 5 6 -1.</_>\n        <_>\n          17 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 6 -1.</_>\n        <_>\n          5 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 7 -1.</_>\n        <_>\n          10 6 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 4 10 -1.</_>\n        <_>\n          13 4 2 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 10 4 -1.</_>\n        <_>\n          9 4 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 2 12 -1.</_>\n        <_>\n          12 4 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 11 15 3 -1.</_>\n        <_>\n          6 11 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 9 -1.</_>\n        <_>\n          13 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 9 -1.</_>\n        <_>\n          7 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 6 -1.</_>\n        <_>\n          10 5 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 8 -1.</_>\n        <_>\n          1 2 3 4 2.</_>\n        <_>\n          4 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 9 -1.</_>\n        <_>\n          14 3 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 9 -1.</_>\n        <_>\n          0 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 5 12 -1.</_>\n        <_>\n          9 8 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 16 3 -1.</_>\n        <_>\n          3 6 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 6 8 -1.</_>\n        <_>\n          19 2 3 4 2.</_>\n        <_>\n          16 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 8 -1.</_>\n        <_>\n          0 2 3 4 2.</_>\n        <_>\n          3 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 16 -1.</_>\n        <_>\n          5 10 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 8 6 -1.</_>\n        <_>\n          5 11 4 3 2.</_>\n        <_>\n          9 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 8 -1.</_>\n        <_>\n          11 2 3 4 2.</_>\n        <_>\n          8 6 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 7 12 -1.</_>\n        <_>\n          0 10 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 6 8 -1.</_>\n        <_>\n          16 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 8 -1.</_>\n        <_>\n          0 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 17 3 -1.</_>\n        <_>\n          4 1 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 14 -1.</_>\n        <_>\n          8 4 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 5 12 -1.</_>\n        <_>\n          9 8 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 10 4 -1.</_>\n        <_>\n          9 5 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 13 -1.</_>\n        <_>\n          14 2 1 13 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 13 3 -1.</_>\n        <_>\n          8 2 13 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 16 14 2 -1.</_>\n        <_>\n          4 17 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 15 2 -1.</_>\n        <_>\n          0 17 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 2 6 -1.</_>\n        <_>\n          11 4 1 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 9 -1.</_>\n        <_>\n          0 9 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 7 6 -1.</_>\n        <_>\n          12 2 7 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 10 -1.</_>\n        <_>\n          8 4 3 5 2.</_>\n        <_>\n          11 9 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 8 10 -1.</_>\n        <_>\n          11 7 4 5 2.</_>\n        <_>\n          7 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 8 -1.</_>\n        <_>\n          5 6 6 4 2.</_>\n        <_>\n          11 10 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 8 -1.</_>\n        <_>\n          12 6 4 4 2.</_>\n        <_>\n          8 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 8 8 -1.</_>\n        <_>\n          6 6 4 4 2.</_>\n        <_>\n          10 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 6 6 -1.</_>\n        <_>\n          10 6 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 8 -1.</_>\n        <_>\n          5 7 5 4 2.</_>\n        <_>\n          10 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 18 3 -1.</_>\n        <_>\n          4 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 15 2 -1.</_>\n        <_>\n          3 17 15 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 16 2 -1.</_>\n        <_>\n          3 11 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 6 -1.</_>\n        <_>\n          5 12 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 3 13 -1.</_>\n        <_>\n          19 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 4 -1.</_>\n        <_>\n          8 10 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 14 7 -1.</_>\n        <_>\n          7 7 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 14 7 -1.</_>\n        <_>\n          8 7 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 13 -1.</_>\n        <_>\n          11 0 4 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 12 -1.</_>\n        <_>\n          0 6 2 6 2.</_>\n        <_>\n          2 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 12 -1.</_>\n        <_>\n          14 2 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 2 8 12 -1.</_>\n        <_>\n          2 2 4 6 2.</_>\n        <_>\n          6 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 4 16 -1.</_>\n        <_>\n          17 8 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 16 -1.</_>\n        <_>\n          1 8 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 16 16 -1.</_>\n        <_>\n          6 9 16 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 7 -1.</_>\n        <_>\n          10 2 2 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 1 6 6 -1.</_>\n        <_>\n          13 3 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 1 6 6 -1.</_>\n        <_>\n          9 3 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 12 -1.</_>\n        <_>\n          14 2 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 6 -1.</_>\n        <_>\n          5 14 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 12 4 -1.</_>\n        <_>\n          5 14 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 18 2 -1.</_>\n        <_>\n          2 16 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 14 -1.</_>\n        <_>\n          20 4 2 7 2.</_>\n        <_>\n          18 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 14 -1.</_>\n        <_>\n          0 4 2 7 2.</_>\n        <_>\n          2 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 12 -1.</_>\n        <_>\n          12 0 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 6 -1.</_>\n        <_>\n          9 6 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 15 10 -1.</_>\n        <_>\n          7 9 15 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 9 12 -1.</_>\n        <_>\n          4 6 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 17 3 -1.</_>\n        <_>\n          3 2 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 16 3 -1.</_>\n        <_>\n          0 2 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 15 10 -1.</_>\n        <_>\n          7 9 15 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 15 10 -1.</_>\n        <_>\n          0 9 15 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 18 -1.</_>\n        <_>\n          15 9 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 12 4 -1.</_>\n        <_>\n          3 14 6 2 2.</_>\n        <_>\n          9 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 9 5 -1.</_>\n        <_>\n          16 3 3 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 9 2 -1.</_>\n        <_>\n          9 7 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 7 -1.</_>\n        <_>\n          13 7 1 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 4 8 8 -1.</_>\n        <_>\n          7 4 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 12 3 -1.</_>\n        <_>\n          11 8 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 5 6 -1.</_>\n        <_>\n          8 6 5 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 7 10 6 -1.</_>\n        <_>\n          10 10 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 16 3 -1.</_>\n        <_>\n          0 10 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 12 3 -1.</_>\n        <_>\n          7 10 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 8 6 -1.</_>\n        <_>\n          2 13 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 4 12 -1.</_>\n        <_>\n          16 9 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 8 6 -1.</_>\n        <_>\n          3 11 4 3 2.</_>\n        <_>\n          7 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 10 -1.</_>\n        <_>\n          12 5 8 5 2.</_>\n        <_>\n          4 10 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 3 8 -1.</_>\n        <_>\n          7 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 6 4 -1.</_>\n        <_>\n          9 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 15 9 -1.</_>\n        <_>\n          2 12 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 8 6 -1.</_>\n        <_>\n          15 2 4 3 2.</_>\n        <_>\n          11 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 8 6 -1.</_>\n        <_>\n          4 13 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 2 14 -1.</_>\n        <_>\n          16 0 1 14 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 2 -1.</_>\n        <_>\n          6 0 14 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 9 7 6 -1.</_>\n        <_>\n          13 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 7 3 -1.</_>\n        <_>\n          9 7 7 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 2 3 13 -1.</_>\n        <_>\n          19 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 3 13 -1.</_>\n        <_>\n          2 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 12 4 -1.</_>\n        <_>\n          11 1 6 2 2.</_>\n        <_>\n          5 3 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 6 -1.</_>\n        <_>\n          7 10 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 14 3 -1.</_>\n        <_>\n          8 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 6 -1.</_>\n        <_>\n          12 7 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 8 -1.</_>\n        <_>\n          16 7 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 4 -1.</_>\n        <_>\n          0 13 7 2 2.</_>\n        <_>\n          7 15 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 21 6 -1.</_>\n        <_>\n          8 9 7 2 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 8 -1.</_>\n        <_>\n          7 4 3 4 2.</_>\n        <_>\n          10 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 8 8 -1.</_>\n        <_>\n          11 4 4 4 2.</_>\n        <_>\n          7 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 7 4 -1.</_>\n        <_>\n          9 7 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 7 -1.</_>\n        <_>\n          11 2 3 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 2 7 6 -1.</_>\n        <_>\n          11 2 7 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 8 6 -1.</_>\n        <_>\n          11 4 4 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 8 -1.</_>\n        <_>\n          11 4 6 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 8 5 -1.</_>\n        <_>\n          12 3 4 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 5 8 -1.</_>\n        <_>\n          10 3 5 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 0 9 5 -1.</_>\n        <_>\n          16 3 3 5 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 6 10 12 -1.</_>\n        <_>\n          2 9 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 5 12 -1.</_>\n        <_>\n          15 9 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 13 3 -1.</_>\n        <_>\n          3 8 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 17 3 -1.</_>\n        <_>\n          4 8 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 7 6 -1.</_>\n        <_>\n          2 11 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 9 4 -1.</_>\n        <_>\n          13 11 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 5 9 -1.</_>\n        <_>\n          6 3 5 3 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 3 8 3 -1.</_>\n        <_>\n          9 3 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 13 -1.</_>\n        <_>\n          4 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 8 6 -1.</_>\n        <_>\n          15 0 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 5 -1.</_>\n        <_>\n          6 0 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 12 5 -1.</_>\n        <_>\n          9 0 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 8 -1.</_>\n        <_>\n          3 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 4 6 -1.</_>\n        <_>\n          18 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 6 -1.</_>\n        <_>\n          2 2 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 6 6 -1.</_>\n        <_>\n          16 11 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 12 6 -1.</_>\n        <_>\n          13 3 6 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 2 3 12 -1.</_>\n        <_>\n          10 6 3 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 7 -1.</_>\n        <_>\n          11 3 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 3 15 -1.</_>\n        <_>\n          17 1 1 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 8 -1.</_>\n        <_>\n          2 1 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 3 14 -1.</_>\n        <_>\n          14 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 14 -1.</_>\n        <_>\n          7 0 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 18 2 -1.</_>\n        <_>\n          4 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 15 3 -1.</_>\n        <_>\n          7 9 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 6 -1.</_>\n        <_>\n          14 5 5 3 2.</_>\n        <_>\n          9 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 10 6 -1.</_>\n        <_>\n          3 5 5 3 2.</_>\n        <_>\n          8 8 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 2 12 -1.</_>\n        <_>\n          14 3 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 2 -1.</_>\n        <_>\n          8 3 12 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 7 6 6 -1.</_>\n        <_>\n          14 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 6 6 -1.</_>\n        <_>\n          6 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 8 3 -1.</_>\n        <_>\n          7 0 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 6 -1.</_>\n        <_>\n          11 0 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 12 12 -1.</_>\n        <_>\n          13 0 6 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 12 -1.</_>\n        <_>\n          3 0 6 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 6 4 -1.</_>\n        <_>\n          16 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 4 -1.</_>\n        <_>\n          3 5 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 12 5 -1.</_>\n        <_>\n          9 0 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 8 10 -1.</_>\n        <_>\n          1 8 4 5 2.</_>\n        <_>\n          5 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 14 2 -1.</_>\n        <_>\n          8 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 16 3 -1.</_>\n        <_>\n          8 11 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 12 2 -1.</_>\n        <_>\n          10 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 12 2 -1.</_>\n        <_>\n          6 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 18 6 -1.</_>\n        <_>\n          12 11 9 3 2.</_>\n        <_>\n          3 14 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 4 -1.</_>\n        <_>\n          7 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 6 6 -1.</_>\n        <_>\n          10 13 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 9 4 -1.</_>\n        <_>\n          9 14 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 16 10 -1.</_>\n        <_>\n          5 9 16 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 3 8 -1.</_>\n        <_>\n          11 7 3 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 6 -1.</_>\n        <_>\n          13 12 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 22 12 -1.</_>\n        <_>\n          0 6 11 6 2.</_>\n        <_>\n          11 12 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 12 -1.</_>\n        <_>\n          12 5 3 6 2.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 12 -1.</_>\n        <_>\n          7 5 3 6 2.</_>\n        <_>\n          10 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 9 -1.</_>\n        <_>\n          14 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 9 -1.</_>\n        <_>\n          2 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 6 -1.</_>\n        <_>\n          13 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 6 -1.</_>\n        <_>\n          5 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 12 3 -1.</_>\n        <_>\n          10 14 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 15 3 -1.</_>\n        <_>\n          3 4 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 9 -1.</_>\n        <_>\n          13 5 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 2 -1.</_>\n        <_>\n          9 5 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 2 14 10 -1.</_>\n        <_>\n          6 2 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 12 2 -1.</_>\n        <_>\n          8 2 12 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 0 2 13 -1.</_>\n        <_>\n          17 0 1 13 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 0 13 2 -1.</_>\n        <_>\n          5 0 13 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 10 -1.</_>\n        <_>\n          12 4 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 6 12 3 -1.</_>\n        <_>\n          0 7 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 15 3 -1.</_>\n        <_>\n          6 7 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 5 9 -1.</_>\n        <_>\n          8 11 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 7 6 -1.</_>\n        <_>\n          10 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 7 6 -1.</_>\n        <_>\n          5 13 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 13 4 -1.</_>\n        <_>\n          5 13 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 4 6 -1.</_>\n        <_>\n          9 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 2 9 -1.</_>\n        <_>\n          13 1 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 6 -1.</_>\n        <_>\n          5 2 4 3 2.</_>\n        <_>\n          9 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 8 -1.</_>\n        <_>\n          12 1 2 8 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 4 -1.</_>\n        <_>\n          10 1 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 9 15 3 -1.</_>\n        <_>\n          7 10 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 3 -1.</_>\n        <_>\n          5 11 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 7 6 -1.</_>\n        <_>\n          15 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 7 6 -1.</_>\n        <_>\n          0 4 7 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 2 7 -1.</_>\n        <_>\n          12 3 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 3 7 2 -1.</_>\n        <_>\n          10 3 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 3 20 14 -1.</_>\n        <_>\n          12 3 10 7 2.</_>\n        <_>\n          2 10 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 8 -1.</_>\n        <_>\n          11 2 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 8 -1.</_>\n        <_>\n          18 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 8 -1.</_>\n        <_>\n          6 4 3 4 2.</_>\n        <_>\n          9 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 4 6 -1.</_>\n        <_>\n          12 2 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 4 -1.</_>\n        <_>\n          10 2 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 3 8 15 -1.</_>\n        <_>\n          11 3 4 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 8 7 -1.</_>\n        <_>\n          3 11 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 10 -1.</_>\n        <_>\n          15 7 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 10 14 -1.</_>\n        <_>\n          7 3 5 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 15 12 -1.</_>\n        <_>\n          11 5 5 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 15 12 -1.</_>\n        <_>\n          6 5 5 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 8 4 -1.</_>\n        <_>\n          9 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 10 -1.</_>\n        <_>\n          11 6 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 10 4 -1.</_>\n        <_>\n          8 8 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 7 4 -1.</_>\n        <_>\n          2 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 15 3 -1.</_>\n        <_>\n          7 10 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 16 4 -1.</_>\n        <_>\n          0 10 8 2 2.</_>\n        <_>\n          8 12 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 6 7 -1.</_>\n        <_>\n          12 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 6 5 -1.</_>\n        <_>\n          11 13 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 6 7 -1.</_>\n        <_>\n          12 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 7 -1.</_>\n        <_>\n          8 11 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 8 -1.</_>\n        <_>\n          18 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 8 11 -1.</_>\n        <_>\n          8 6 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 8 12 -1.</_>\n        <_>\n          9 5 4 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 6 6 -1.</_>\n        <_>\n          7 3 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 10 6 -1.</_>\n        <_>\n          11 2 10 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 8 9 -1.</_>\n        <_>\n          11 1 4 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 10 -1.</_>\n        <_>\n          12 4 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 11 4 -1.</_>\n        <_>\n          11 1 11 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 8 -1.</_>\n        <_>\n          18 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 8 -1.</_>\n        <_>\n          0 8 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 2 12 -1.</_>\n        <_>\n          12 2 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 12 12 3 -1.</_>\n        <_>\n          4 13 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 18 3 -1.</_>\n        <_>\n          2 13 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 16 3 -1.</_>\n        <_>\n          0 1 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 2 12 -1.</_>\n        <_>\n          12 2 1 12 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 2 12 2 -1.</_>\n        <_>\n          10 2 12 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 7 -1.</_>\n        <_>\n          15 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 12 2 -1.</_>\n        <_>\n          11 13 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 6 8 -1.</_>\n        <_>\n          19 8 3 4 2.</_>\n        <_>\n          16 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 8 6 -1.</_>\n        <_>\n          4 3 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 4 9 -1.</_>\n        <_>\n          18 3 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 8 -1.</_>\n        <_>\n          8 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 4 -1.</_>\n        <_>\n          8 3 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 3 -1.</_>\n        <_>\n          1 3 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 12 3 -1.</_>\n        <_>\n          7 3 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 16 18 -1.</_>\n        <_>\n          1 9 16 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 6 8 -1.</_>\n        <_>\n          19 8 3 4 2.</_>\n        <_>\n          16 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 8 -1.</_>\n        <_>\n          0 8 3 4 2.</_>\n        <_>\n          3 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 6 -1.</_>\n        <_>\n          18 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 14 3 -1.</_>\n        <_>\n          0 13 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 16 3 -1.</_>\n        <_>\n          3 13 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 6 -1.</_>\n        <_>\n          0 7 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 8 4 -1.</_>\n        <_>\n          9 16 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 3 -1.</_>\n        <_>\n          0 14 14 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 14 2 -1.</_>\n        <_>\n          4 15 14 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 15 6 -1.</_>\n        <_>\n          3 15 15 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 14 6 -1.</_>\n        <_>\n          7 15 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 14 4 -1.</_>\n        <_>\n          0 2 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 7 -1.</_>\n        <_>\n          15 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 7 -1.</_>\n        <_>\n          5 10 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 18 4 -1.</_>\n        <_>\n          8 4 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 12 9 -1.</_>\n        <_>\n          9 6 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 10 7 -1.</_>\n        <_>\n          10 8 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 4 16 -1.</_>\n        <_>\n          5 6 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 6 8 -1.</_>\n        <_>\n          19 8 3 4 2.</_>\n        <_>\n          16 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 17 4 -1.</_>\n        <_>\n          0 14 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 14 6 -1.</_>\n        <_>\n          7 15 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 12 4 -1.</_>\n        <_>\n          0 13 6 2 2.</_>\n        <_>\n          6 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 12 3 -1.</_>\n        <_>\n          10 14 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 8 6 -1.</_>\n        <_>\n          7 11 4 3 2.</_>\n        <_>\n          11 14 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 12 9 -1.</_>\n        <_>\n          12 6 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 12 8 -1.</_>\n        <_>\n          4 6 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 6 6 -1.</_>\n        <_>\n          8 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 20 14 -1.</_>\n        <_>\n          1 4 10 7 2.</_>\n        <_>\n          11 11 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 4 10 -1.</_>\n        <_>\n          19 1 2 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 2 6 12 -1.</_>\n        <_>\n          2 5 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 4 9 -1.</_>\n        <_>\n          16 8 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 8 4 -1.</_>\n        <_>\n          10 9 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 14 3 -1.</_>\n        <_>\n          7 8 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 3 -1.</_>\n        <_>\n          9 8 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 8 4 -1.</_>\n        <_>\n          14 6 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 3 18 2 -1.</_>\n        <_>\n          9 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 10 8 -1.</_>\n        <_>\n          6 8 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 10 12 -1.</_>\n        <_>\n          1 8 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 12 -1.</_>\n        <_>\n          12 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 12 -1.</_>\n        <_>\n          9 6 1 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 13 -1.</_>\n        <_>\n          12 1 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 13 -1.</_>\n        <_>\n          9 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 2 12 -1.</_>\n        <_>\n          6 12 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 4 2 9 -1.</_>\n        <_>\n          17 4 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 4 -1.</_>\n        <_>\n          0 1 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 12 4 -1.</_>\n        <_>\n          14 4 6 2 2.</_>\n        <_>\n          8 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 4 -1.</_>\n        <_>\n          6 15 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 12 4 -1.</_>\n        <_>\n          7 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 4 -1.</_>\n        <_>\n          4 8 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 6 10 -1.</_>\n        <_>\n          15 8 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 10 -1.</_>\n        <_>\n          4 8 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 6 4 -1.</_>\n        <_>\n          16 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 6 8 -1.</_>\n        <_>\n          1 6 3 4 2.</_>\n        <_>\n          4 10 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 11 -1.</_>\n        <_>\n          12 2 2 11 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 1 11 4 -1.</_>\n        <_>\n          10 2 11 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 0 4 7 -1.</_>\n        <_>\n          13 1 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 0 7 4 -1.</_>\n        <_>\n          9 1 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 5 2 12 -1.</_>\n        <_>\n          13 5 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 2 12 -1.</_>\n        <_>\n          8 5 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 9 4 -1.</_>\n        <_>\n          11 5 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 3 -1.</_>\n        <_>\n          6 1 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 4 2 9 -1.</_>\n        <_>\n          17 4 1 9 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 2 -1.</_>\n        <_>\n          5 4 9 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 10 4 8 -1.</_>\n        <_>\n          12 10 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 12 4 -1.</_>\n        <_>\n          2 0 6 2 2.</_>\n        <_>\n          8 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 15 3 -1.</_>\n        <_>\n          7 8 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 12 4 -1.</_>\n        <_>\n          2 0 6 2 2.</_>\n        <_>\n          8 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 4 -1.</_>\n        <_>\n          10 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 17 3 -1.</_>\n        <_>\n          0 9 17 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 10 5 -1.</_>\n        <_>\n          6 13 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 8 5 -1.</_>\n        <_>\n          9 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 4 6 -1.</_>\n        <_>\n          14 8 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 5 8 -1.</_>\n        <_>\n          0 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 15 3 -1.</_>\n        <_>\n          7 8 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 7 4 -1.</_>\n        <_>\n          2 13 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 11 12 -1.</_>\n        <_>\n          8 6 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 12 4 -1.</_>\n        <_>\n          2 4 6 2 2.</_>\n        <_>\n          8 6 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 3 12 -1.</_>\n        <_>\n          20 3 1 12 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 6 12 4 -1.</_>\n        <_>\n          1 6 6 2 2.</_>\n        <_>\n          7 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 13 3 -1.</_>\n        <_>\n          9 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 6 -1.</_>\n        <_>\n          0 5 6 3 2.</_>\n        <_>\n          6 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 13 -1.</_>\n        <_>\n          12 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 3 13 -1.</_>\n        <_>\n          9 0 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 8 8 -1.</_>\n        <_>\n          14 10 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 6 -1.</_>\n        <_>\n          0 10 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 13 3 -1.</_>\n        <_>\n          9 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 13 3 -1.</_>\n        <_>\n          0 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 14 4 -1.</_>\n        <_>\n          11 14 7 2 2.</_>\n        <_>\n          4 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 6 -1.</_>\n        <_>\n          2 3 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 20 4 -1.</_>\n        <_>\n          7 6 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 6 -1.</_>\n        <_>\n          4 7 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 6 10 -1.</_>\n        <_>\n          17 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 6 10 -1.</_>\n        <_>\n          3 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 13 3 -1.</_>\n        <_>\n          9 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 4 6 -1.</_>\n        <_>\n          6 8 4 3 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          16 5 6 13 -1.</_>\n        <_>\n          16 5 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 13 -1.</_>\n        <_>\n          3 5 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 18 2 -1.</_>\n        <_>\n          4 10 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 21 7 -1.</_>\n        <_>\n          7 7 7 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 12 -1.</_>\n        <_>\n          9 6 4 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 10 3 -1.</_>\n        <_>\n          9 5 10 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 9 9 7 -1.</_>\n        <_>\n          12 9 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 9 4 -1.</_>\n        <_>\n          14 8 3 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 10 -1.</_>\n        <_>\n          12 3 3 5 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 3 12 2 -1.</_>\n        <_>\n          8 3 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          14 6 4 8 -1.</_>\n        <_>\n          14 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 8 -1.</_>\n        <_>\n          4 10 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 11 12 -1.</_>\n        <_>\n          6 3 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 6 -1.</_>\n        <_>\n          8 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 10 4 -1.</_>\n        <_>\n          10 0 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 10 4 -1.</_>\n        <_>\n          7 0 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 8 8 -1.</_>\n        <_>\n          14 3 4 4 2.</_>\n        <_>\n          10 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 8 8 -1.</_>\n        <_>\n          4 3 4 4 2.</_>\n        <_>\n          8 7 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 5 -1.</_>\n        <_>\n          8 9 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 16 3 -1.</_>\n        <_>\n          0 16 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 12 2 -1.</_>\n        <_>\n          6 17 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 8 -1.</_>\n        <_>\n          3 4 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 6 6 -1.</_>\n        <_>\n          13 8 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 6 -1.</_>\n        <_>\n          9 8 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 6 -1.</_>\n        <_>\n          13 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 6 -1.</_>\n        <_>\n          3 14 6 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 14 4 -1.</_>\n        <_>\n          8 14 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 4 -1.</_>\n        <_>\n          0 14 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 17 2 -1.</_>\n        <_>\n          3 14 17 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 4 -1.</_>\n        <_>\n          8 6 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 4 -1.</_>\n        <_>\n          11 7 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 8 -1.</_>\n        <_>\n          8 2 6 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 12 12 -1.</_>\n        <_>\n          9 6 12 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 3 -1.</_>\n        <_>\n          10 1 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 7 -1.</_>\n        <_>\n          14 2 1 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          2 3 12 9 -1.</_>\n        <_>\n          6 6 4 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 3 12 -1.</_>\n        <_>\n          20 3 1 12 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 5 -1.</_>\n        <_>\n          7 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 3 7 -1.</_>\n        <_>\n          14 2 1 7 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 7 3 -1.</_>\n        <_>\n          8 2 7 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 7 8 6 -1.</_>\n        <_>\n          13 7 4 3 2.</_>\n        <_>\n          9 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 14 4 -1.</_>\n        <_>\n          4 15 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 4 -1.</_>\n        <_>\n          10 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 6 4 -1.</_>\n        <_>\n          9 14 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 4 16 -1.</_>\n        <_>\n          16 0 2 8 2.</_>\n        <_>\n          14 8 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 3 -1.</_>\n        <_>\n          5 15 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 13 -1.</_>\n        <_>\n          17 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 13 8 -1.</_>\n        <_>\n          2 10 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 13 -1.</_>\n        <_>\n          17 5 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 7 4 -1.</_>\n        <_>\n          7 14 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 4 9 -1.</_>\n        <_>\n          15 4 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 16 2 -1.</_>\n        <_>\n          0 5 16 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 12 2 -1.</_>\n        <_>\n          8 5 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 9 15 -1.</_>\n        <_>\n          9 8 3 5 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 3 8 -1.</_>\n        <_>\n          12 7 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 4 -1.</_>\n        <_>\n          5 6 6 2 2.</_>\n        <_>\n          11 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 3 14 -1.</_>\n        <_>\n          17 3 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 3 14 -1.</_>\n        <_>\n          4 3 1 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 22 4 -1.</_>\n        <_>\n          11 4 11 2 2.</_>\n        <_>\n          0 6 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 4 9 -1.</_>\n        <_>\n          1 7 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 12 4 -1.</_>\n        <_>\n          7 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 12 4 -1.</_>\n        <_>\n          3 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 4 -1.</_>\n        <_>\n          11 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 13 3 -1.</_>\n        <_>\n          1 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 4 -1.</_>\n        <_>\n          11 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 14 4 -1.</_>\n        <_>\n          4 14 7 2 2.</_>\n        <_>\n          11 16 7 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 2 -1.</_>\n        <_>\n          6 1 12 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 4 -1.</_>\n        <_>\n          5 2 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 6 -1.</_>\n        <_>\n          12 1 1 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 3 -1.</_>\n        <_>\n          10 1 6 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 12 8 6 -1.</_>\n        <_>\n          9 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 5 10 -1.</_>\n        <_>\n          1 6 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 12 -1.</_>\n        <_>\n          13 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 12 -1.</_>\n        <_>\n          7 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 8 14 -1.</_>\n        <_>\n          16 1 4 7 2.</_>\n        <_>\n          12 8 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 10 -1.</_>\n        <_>\n          1 0 4 5 2.</_>\n        <_>\n          5 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 16 4 -1.</_>\n        <_>\n          10 6 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 13 2 -1.</_>\n        <_>\n          1 15 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 20 3 -1.</_>\n        <_>\n          7 7 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 9 4 -1.</_>\n        <_>\n          14 5 3 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 5 13 2 -1.</_>\n        <_>\n          6 6 13 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 15 -1.</_>\n        <_>\n          6 0 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 8 6 -1.</_>\n        <_>\n          5 12 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 7 -1.</_>\n        <_>\n          14 2 2 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 1 7 4 -1.</_>\n        <_>\n          8 2 7 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 11 6 4 -1.</_>\n        <_>\n          11 13 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 6 -1.</_>\n        <_>\n          0 12 4 3 2.</_>\n        <_>\n          4 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 6 4 -1.</_>\n        <_>\n          11 13 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 6 12 -1.</_>\n        <_>\n          2 6 3 6 2.</_>\n        <_>\n          5 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 6 4 -1.</_>\n        <_>\n          11 13 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 9 4 -1.</_>\n        <_>\n          8 11 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 9 5 -1.</_>\n        <_>\n          11 13 3 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 8 3 -1.</_>\n        <_>\n          7 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 14 6 -1.</_>\n        <_>\n          11 12 7 3 2.</_>\n        <_>\n          4 15 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 8 3 -1.</_>\n        <_>\n          6 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 6 4 -1.</_>\n        <_>\n          11 13 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 7 -1.</_>\n        <_>\n          8 5 2 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 9 12 -1.</_>\n        <_>\n          11 8 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 9 12 -1.</_>\n        <_>\n          8 8 3 4 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 4 -1.</_>\n        <_>\n          14 14 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 4 -1.</_>\n        <_>\n          2 14 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 8 -1.</_>\n        <_>\n          11 6 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 8 6 -1.</_>\n        <_>\n          7 6 8 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 7 6 4 -1.</_>\n        <_>\n          13 7 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 2 12 3 -1.</_>\n        <_>\n          9 3 12 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 4 6 6 -1.</_>\n        <_>\n          14 6 2 6 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 6 -1.</_>\n        <_>\n          8 6 6 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 5 3 9 -1.</_>\n        <_>\n          12 6 1 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 2 -1.</_>\n        <_>\n          4 0 16 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 3 -1.</_>\n        <_>\n          12 12 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 12 6 -1.</_>\n        <_>\n          13 3 6 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          9 2 4 6 -1.</_>\n        <_>\n          9 5 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 9 -1.</_>\n        <_>\n          6 5 6 3 9.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 3 9 -1.</_>\n        <_>\n          17 3 1 9 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 3 -1.</_>\n        <_>\n          5 3 9 1 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 1 12 4 -1.</_>\n        <_>\n          14 1 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 12 4 -1.</_>\n        <_>\n          4 1 4 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 12 4 -1.</_>\n        <_>\n          12 14 6 2 2.</_>\n        <_>\n          6 16 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 13 3 -1.</_>\n        <_>\n          4 3 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 13 3 -1.</_>\n        <_>\n          7 3 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 20 2 -1.</_>\n        <_>\n          11 12 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 3 -1.</_>\n        <_>\n          9 2 4 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 14 9 -1.</_>\n        <_>\n          11 8 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 8 -1.</_>\n        <_>\n          10 2 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 8 -1.</_>\n        <_>\n          10 2 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 2 16 -1.</_>\n        <_>\n          16 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 9 4 -1.</_>\n        <_>\n          5 8 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 2 16 -1.</_>\n        <_>\n          16 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 2 16 -1.</_>\n        <_>\n          4 9 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 8 6 -1.</_>\n        <_>\n          14 7 4 3 2.</_>\n        <_>\n          10 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 8 6 -1.</_>\n        <_>\n          4 7 4 3 2.</_>\n        <_>\n          8 10 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 2 7 -1.</_>\n        <_>\n          12 8 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 6 8 -1.</_>\n        <_>\n          5 8 3 4 2.</_>\n        <_>\n          8 12 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 2 7 -1.</_>\n        <_>\n          12 8 1 7 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          10 8 7 2 -1.</_>\n        <_>\n          10 8 7 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 9 13 8 -1.</_>\n        <_>\n          5 11 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 4 9 -1.</_>\n        <_>\n          9 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 10 -1.</_>\n        <_>\n          11 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 10 -1.</_>\n        <_>\n          9 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 14 6 -1.</_>\n        <_>\n          13 0 7 3 2.</_>\n        <_>\n          6 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 14 6 -1.</_>\n        <_>\n          2 0 7 3 2.</_>\n        <_>\n          9 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 16 3 -1.</_>\n        <_>\n          3 7 16 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 15 3 -1.</_>\n        <_>\n          1 7 15 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 8 4 -1.</_>\n        <_>\n          8 7 8 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 12 10 -1.</_>\n        <_>\n          8 4 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 14 16 -1.</_>\n        <_>\n          7 0 7 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 18 3 -1.</_>\n        <_>\n          10 1 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 12 2 -1.</_>\n        <_>\n          8 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 4 -1.</_>\n        <_>\n          11 1 3 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 4 10 -1.</_>\n        <_>\n          12 1 2 10 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          11 0 10 4 -1.</_>\n        <_>\n          10 1 10 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 7 9 4 -1.</_>\n        <_>\n          16 7 3 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 2 -1.</_>\n        <_>\n          11 1 6 1 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          8 8 12 2 -1.</_>\n        <_>\n          8 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 6 5 -1.</_>\n        <_>\n          10 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 9 11 -1.</_>\n        <_>\n          13 7 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 8 3 -1.</_>\n        <_>\n          10 15 4 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 2 12 -1.</_>\n        <_>\n          19 3 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 2 12 -1.</_>\n        <_>\n          2 3 1 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 9 10 -1.</_>\n        <_>\n          14 1 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 16 6 -1.</_>\n        <_>\n          5 3 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 12 12 -1.</_>\n        <_>\n          11 1 4 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 2 -1.</_>\n        <_>\n          8 8 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 10 -1.</_>\n        <_>\n          14 12 3 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 18 3 -1.</_>\n        <_>\n          10 15 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 13 3 -1.</_>\n        <_>\n          9 1 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 12 3 -1.</_>\n        <_>\n          5 1 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 2 15 -1.</_>\n        <_>\n          12 1 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 2 15 -1.</_>\n        <_>\n          9 1 1 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 3 13 -1.</_>\n        <_>\n          13 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 8 -1.</_>\n        <_>\n          3 6 2 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 4 12 -1.</_>\n        <_>\n          19 1 2 6 2.</_>\n        <_>\n          17 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 4 12 -1.</_>\n        <_>\n          1 1 2 6 2.</_>\n        <_>\n          3 7 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 4 7 -1.</_>\n        <_>\n          17 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 7 -1.</_>\n        <_>\n          3 0 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 3 13 -1.</_>\n        <_>\n          13 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 5 9 -1.</_>\n        <_>\n          7 7 5 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 3 13 -1.</_>\n        <_>\n          13 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 3 13 -1.</_>\n        <_>\n          8 2 1 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 17 4 -1.</_>\n        <_>\n          3 6 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 18 3 -1.</_>\n        <_>\n          2 4 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 11 6 4 -1.</_>\n        <_>\n          11 13 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 4 -1.</_>\n        <_>\n          5 13 6 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 6 4 -1.</_>\n        <_>\n          15 5 6 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          7 5 4 6 -1.</_>\n        <_>\n          7 5 2 6 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          13 1 8 8 -1.</_>\n        <_>\n          15 1 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 12 12 -1.</_>\n        <_>\n          7 1 4 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 4 12 -1.</_>\n        <_>\n          14 2 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 4 12 -1.</_>\n        <_>\n          6 2 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 14 -1.</_>\n        <_>\n          15 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 2 14 -1.</_>\n        <_>\n          6 0 1 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 7 15 -1.</_>\n        <_>\n          15 6 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 7 6 -1.</_>\n        <_>\n          4 3 7 2 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          1 4 20 14 -1.</_>\n        <_>\n          11 4 10 7 2.</_>\n        <_>\n          1 11 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 8 -1.</_>\n        <_>\n          3 2 2 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 13 -1.</_>\n        <_>\n          15 0 1 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 9 10 -1.</_>\n        <_>\n          5 1 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 6 -1.</_>\n        <_>\n          11 9 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 8 4 -1.</_>\n        <_>\n          5 5 8 2 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          5 8 14 4 -1.</_>\n        <_>\n          5 9 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 20 2 -1.</_>\n        <_>\n          10 7 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 10 10 -1.</_>\n        <_>\n          8 0 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 10 10 -1.</_>\n        <_>\n          9 0 5 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 15 10 -1.</_>\n        <_>\n          10 1 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 18 4 -1.</_>\n        <_>\n          0 10 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 10 6 -1.</_>\n        <_>\n          8 10 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 10 6 -1.</_>\n        <_>\n          4 10 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 10 12 -1.</_>\n        <_>\n          11 10 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 8 -1.</_>\n        <_>\n          8 5 4 4 2.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          17 8 5 6 -1.</_>\n        <_>\n          17 11 5 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 4 7 -1.</_>\n        <_>\n          10 11 2 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 12 3 -1.</_>\n        <_>\n          9 6 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 13 3 -1.</_>\n        <_>\n          2 10 13 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 16 3 -1.</_>\n        <_>\n          3 13 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 8 4 -1.</_>\n        <_>\n          9 12 4 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 9 -1.</_>\n        <_>\n          14 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 12 3 -1.</_>\n        <_>\n          4 11 12 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 11 9 -1.</_>\n        <_>\n          6 10 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 9 4 -1.</_>\n        <_>\n          7 4 3 4 3.</_></rects>\n      <tilted>1</tilted></_>\n    <_>\n      <rects>\n        <_>\n          12 1 9 9 -1.</_>\n        <_>\n          15 1 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 9 9 -1.</_>\n        <_>\n          4 1 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 6 6 -1.</_>\n        <_>\n          16 1 2 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 4 6 -1.</_>\n        <_>\n          6 6 2 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 12 7 -1.</_>\n        <_>\n          10 5 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 12 7 -1.</_>\n        <_>\n          6 5 6 7 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/lbpcascades/lbpcascade_frontalcatface.xml",
    "content": "<?xml version=\"1.0\"?>\n<!----------------------------------------------------------------------------\n A frontal cat face detector using LBP features.\n\n Contributed by Joseph Howse (josephhowse@nummist.com).\n\n More information can be found in the following publications and\n presentations:\n\n Joseph Howse. OpenCV for Secret Agents (book). Packt Publishing, January\n   2015.\n Joseph Howse. \"Training Detectors and Recognizers in Python and OpenCV\"\n   (tutorial). ISMAR 2014. September 9, 2014.\n   http://nummist.com/opencv/Howse_ISMAR_20140909.pdf\n Joseph Howse. \"Training Intelligent Camera Systems with Python and OpenCV\"\n   (webcast). O’Reilly Media. June 17, 2014.\n   http://www.oreilly.com/pub/e/3077\n\n Build scripts and demo applications can be found in the following repository:\n https://bitbucket.org/Joe_Howse/angora-blue\n\n KNOWN LIMITATIONS:\n\n Sometimes, the detector mistakenly thinks that a human face is a cat face. In\n situations where either a human or a cat might be encountered, use both a\n human face detector and a cat face detector. Then, if a detected human face\n and a detected cat face intersect, reject the cat face.\n\n An upright subject is assumed. In situations where the cat's face might be\n sideways or upside down (e.g. the cat is rolling over), try various rotations\n of the input image.\n\n //////////////////////////////////////////////////////////////////////////\n | Contributors License Agreement\n | IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n |   By downloading, copying, installing or using the software you agree\n |   to this license.\n |   If you do not agree to this license, do not download, install,\n |   copy or use the software.\n |\n | Copyright (c) 2014, Joseph Howse (Nummist Media Corporation Limited,\n | Halifax, Nova Scotia, Canada). 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\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 |    * The name of Contributor may not used to endorse or promote products\n |      derived 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\n | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n | LIABILITY, 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.  Back to\n | Top\n //////////////////////////////////////////////////////////////////////////\n ---------------------------------------------------------------------------->\n<opencv_storage>\n<cascade>\n  <stageType>BOOST</stageType>\n  <featureType>LBP</featureType>\n  <height>24</height>\n  <width>24</width>\n  <stageParams>\n    <boostType>GAB</boostType>\n    <minHitRate>9.9900001287460327e-01</minHitRate>\n    <maxFalseAlarm>5.0000000000000000e-01</maxFalseAlarm>\n    <weightTrimRate>9.4999999999999996e-01</weightTrimRate>\n    <maxDepth>1</maxDepth>\n    <maxWeakCount>100</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>256</maxCatCount>\n    <featSize>1</featSize></featureParams>\n  <stageNum>15</stageNum>\n  <stages>\n    <!-- stage 0 -->\n    <_>\n      <maxWeakCount>12</maxWeakCount>\n      <stageThreshold>-1.7687875032424927e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 102 391095182 -138018897 -1311235414 -134348801\n            -10637363 1363472332 -168428565 -170000676</internalNodes>\n          <leafValues>\n            -3.8902848958969116e-01 7.1630239486694336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 135269620 1065172957 761273949 1068766640\n            -285409281 -1075109889 -1073808385 -1073741825</internalNodes>\n          <leafValues>\n            -5.0905084609985352e-01 4.4736129045486450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 -882714626 -11077637 -2105857 -5255203 1594642431\n            -536896039 -540028929 266295295</internalNodes>\n          <leafValues>\n            -4.0175846219062805e-01 4.7943404316902161e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 -617089137 -547883529 1911919584 -2239534 1530067199\n            1140914475 -1092824836 1892022980</internalNodes>\n          <leafValues>\n            -4.2830348014831543e-01 4.3316614627838135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 251265151 2145342812 1501453661 1046368729\n            -1975908196 -1105592134 -1897996802 -88470342</internalNodes>\n          <leafValues>\n            -3.9837184548377991e-01 4.3966090679168701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 653255651 -1427184958 -736368649 -1052429\n            1722766161 -455896464 1155912595 -167811855</internalNodes>\n          <leafValues>\n            -3.9872139692306519e-01 3.9076396822929382e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -147601648 452990736 522407185 1599686417 1169689768\n            407507112 -1762308210 1599803223</internalNodes>\n          <leafValues>\n            -4.5285862684249878e-01 3.3382070064544678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 805836816 1351616140 -1629160611 -1696006160\n            2133143824 -1418430667 -1093085224 -91160647</internalNodes>\n          <leafValues>\n            -5.1765918731689453e-01 2.8637027740478516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 771753813 1072999924 -637907073 1072594908\n            1022435188 -1073874507 -1076936836 -1141628556</internalNodes>\n          <leafValues>\n            -4.5144259929656982e-01 3.3236411213874817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -1493176369 712675187 -55120016 -1570308126\n            1845183255 -34048033 -1090533504 -386469418</internalNodes>\n          <leafValues>\n            -3.6836385726928711e-01 4.1354060173034668e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 1876927247 -103435857 821334050 -202379046\n            -607136374 354198146 1878387370 -455740474</internalNodes>\n          <leafValues>\n            -3.8681995868682861e-01 3.9221677184104919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 70388767 580795691 -83467 1051082410 -287417474\n            -1076176594 -57439237 -1430597793</internalNodes>\n          <leafValues>\n            -4.1789534687995911e-01 3.5533955693244934e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 1 -->\n    <_>\n      <maxWeakCount>13</maxWeakCount>\n      <stageThreshold>-1.3504111766815186e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 52 -582353192 453631753 -1189740547 490856223\n            -1064974120 -1927684129 1413925631 151519071</internalNodes>\n          <leafValues>\n            -2.2373910248279572e-01 6.7752838134765625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 -576729857 454575443 -1996943617 536547583\n            206047452 -1088734277 210521343 264241151</internalNodes>\n          <leafValues>\n            -3.7819463014602661e-01 5.2549731731414795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 -249562832 -1181502479 -174589519 -1112427119\n            -1189167448 -1081345300 -1534158677 -1431310669</internalNodes>\n          <leafValues>\n            -3.6486798524856567e-01 4.7923672199249268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 -1405482952 -15924365 -1147527681 -10535319\n            -1345282310 -1103133 698354938 -1073790989</internalNodes>\n          <leafValues>\n            -4.9668836593627930e-01 3.3489266037940979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 2135911182 -553255561 -1835761112 -744206088\n            1443360719 1427151980 -208273409 -136971281</internalNodes>\n          <leafValues>\n            -4.9673599004745483e-01 2.9186215996742249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 750650461 -1141224741 228524031 1066678329\n            -392530945 -1119829 -389633282 -1909948481</internalNodes>\n          <leafValues>\n            -4.4474920630455017e-01 3.3087861537933350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 -8364 961050640 -337450 -170150085 -4518372\n            1480613384 -270925857 -203948193</internalNodes>\n          <leafValues>\n            -3.6774283647537231e-01 3.8125535845756531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 -1279559723 488853328 894958865 523048208\n            -1111801861 -1113625095 -1410843652 -1615113099</internalNodes>\n          <leafValues>\n            -3.8107365369796753e-01 3.7617510557174683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 -1038891372 866262272 -1124866827 -7307515 2556056\n            -1947784189 145625549 -537934001</internalNodes>\n          <leafValues>\n            -3.3774635195732117e-01 4.1467228531837463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 1313841735 674152170 -1368464720 -1597048870\n            759309825 -295860621 1709856085 -587729545</internalNodes>\n          <leafValues>\n            -4.4100293517112732e-01 3.1954705715179443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 -1432731787 -1219055176 -42533035 -1126253868\n            -2038280772 -55715078 -2000923144 -1936931520</internalNodes>\n          <leafValues>\n            -4.3541839718818665e-01 3.1401738524436951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 232552309 -537305729 -3104297 -67617446 -1211085572\n            -20391173 -1968567044 -1392871087</internalNodes>\n          <leafValues>\n            -3.7881413102149963e-01 3.5767501592636108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 -36984309 904630143 823414970 -188744006 1900770270\n            1399711367 -473188378 1969748707</internalNodes>\n          <leafValues>\n            -4.0620720386505127e-01 3.2759186625480652e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 2 -->\n    <_>\n      <maxWeakCount>19</maxWeakCount>\n      <stageThreshold>-1.3998974561691284e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 128 -236980233 16777207 -520752904 15793139 -168428203\n            1979187191 -33554947 -251920389</internalNodes>\n          <leafValues>\n            -1.7629407346248627e-01 6.5313565731048584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 -871825409 -580752385 -713042433 -540061189\n            1549092351 -587761733 1607687679 1577014783</internalNodes>\n          <leafValues>\n            -3.1553706526756287e-01 4.9262753129005432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 -545306406 -547422721 474111600 -570360321 -507816\n            1599364180 -11379845 -12845089</internalNodes>\n          <leafValues>\n            -3.5872745513916016e-01 4.0607807040214539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 -252337502 -658267397 7348400 821935103 1377280435\n            47000107 -169347101 939467707</internalNodes>\n          <leafValues>\n            -5.1070415973663330e-01 2.8583043813705444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 645859107 708031411 -168346241 -1330581136 81734679\n            783767351 -45193 -34341517</internalNodes>\n          <leafValues>\n            -4.4308465719223022e-01 2.9009637236595154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -154214396 268437506 -680474855 864167714 684199820\n            204876327 -52122180 -262209</internalNodes>\n          <leafValues>\n            -4.1140288114547729e-01 2.9478433728218079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 -1365070662 -380938 -1139629826 -35735556 49021040\n            1020949984 219416278 -293</internalNodes>\n          <leafValues>\n            -3.9993125200271606e-01 2.9704034328460693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 217001265 -1346379851 1862205053 -1342447907\n            30277700 -1360008036 -1988349004 -287317952</internalNodes>\n          <leafValues>\n            -3.9956006407737732e-01 2.8518736362457275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 290390927 534606847 534719466 -100668033 1607942091\n            1499327373 -101712435 -187324532</internalNodes>\n          <leafValues>\n            -3.0478826165199280e-01 3.7477290630340576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 136 -285336459 2110655990 -2013274145 2143051605\n            -1124443700 -9506961 -604210584 -1161806512</internalNodes>\n          <leafValues>\n            -4.0837058424949646e-01 2.7444043755531311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 -62093618 -581362746 -141373441 -10940834 -840543755\n            -638181765 1859448799 996361303</internalNodes>\n          <leafValues>\n            -3.7610772252082825e-01 3.0961802601814270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 -404233212 134685696 -2016460609 -1379932177\n            -540018825 -2163729 806790835 607646519</internalNodes>\n          <leafValues>\n            -4.3601146340370178e-01 2.5886246562004089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 -907025790 1474249959 -806494209 -10763 -283444824\n            -364917254 -828244229 -1968201565</internalNodes>\n          <leafValues>\n            -2.6032009720802307e-01 4.3652611970901489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 -18370769 -757680277 788372142 -2072580242\n            -273678553 745365463 -134222107 -229310606</internalNodes>\n          <leafValues>\n            -3.0938607454299927e-01 3.5719990730285645e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -1603048865 578088863 -390533121 140676846\n            -495489499 -42082971 -4194586 -26017865</internalNodes>\n          <leafValues>\n            -3.1977957487106323e-01 3.4310647845268250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 1643111394 -1211240000 1172894578 -641010466\n            1181712375 -2068614428 1433624934 -671119917</internalNodes>\n          <leafValues>\n            -3.3919364213943481e-01 3.4504517912864685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 1606136599 587595301 -21521312 1079307891 62912316\n            2136471350 -285346140 -201854089</internalNodes>\n          <leafValues>\n            -3.1577944755554199e-01 3.4307131171226501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 785525471 1052180799 1060533999 2120755670\n            1316621908 -270833354 -73736274 -361439920</internalNodes>\n          <leafValues>\n            -3.4840318560600281e-01 3.2924604415893555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 1824524292 1056221828 -268623876 -1615033532\n            -2092452655 144493033 502744181 -571159100</internalNodes>\n          <leafValues>\n            -4.5537719130516052e-01 2.4885603785514832e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 3 -->\n    <_>\n      <maxWeakCount>17</maxWeakCount>\n      <stageThreshold>-1.6478537321090698e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 99 1126020910 939511791 -137494546 -134218002 928378510\n            667815688 -131090 -21878</internalNodes>\n          <leafValues>\n            -1.9173553586006165e-01 6.1490827798843384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 1066647483 -1078215472 -1078199809 -515 -1078280194\n            -1079276888 -1112801281 -1077956952</internalNodes>\n          <leafValues>\n            -2.5890102982521057e-01 6.0596489906311035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 -1347239939 -1078263848 -6291491 -1073954860\n            -1883246595 -1075838997 -1346850307 -1393015372</internalNodes>\n          <leafValues>\n            -3.5419720411300659e-01 3.9201220870018005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 -16582767 990936848 -15337711 1024534289 522275741\n            530061615 1786740027 2132761183</internalNodes>\n          <leafValues>\n            -4.0790781378746033e-01 3.3604335784912109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -1024790785 -33673381 -715534345 -5787889 -721957121\n            -17850629 -654587205 -27048190</internalNodes>\n          <leafValues>\n            -3.0084383487701416e-01 4.4991242885589600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 779038223 578498431 -26263553 -1430717601\n            1426011767 1870118397 -726064396 -184550929</internalNodes>\n          <leafValues>\n            -4.3469619750976562e-01 2.9388919472694397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 11804501 -1074249744 2143289343 -1359077380\n            2074886065 -262692 -1075003396 -1431820272</internalNodes>\n          <leafValues>\n            -4.1263562440872192e-01 2.8357046842575073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 -620104768 -83232282 -548406795 -1074143767\n            -828717122 -21770245 251698105 68943602</internalNodes>\n          <leafValues>\n            -3.8648277521133423e-01 3.0467325448989868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 1391411790 41936415 -228930992 1892677067\n            1987802112 1480885434 -1362 -219942962</internalNodes>\n          <leafValues>\n            -3.7596645951271057e-01 3.1412878632545471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 248452913 1071429554 -251663105 -538972499\n            -1928628395 -1346437645 -1745150348 -33596064</internalNodes>\n          <leafValues>\n            -3.9380916953086853e-01 2.8952071070671082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 626985985 930297719 -286325569 -147866829\n            -692197027 2138802865 -117701012 -118164992</internalNodes>\n          <leafValues>\n            -3.5818240046501160e-01 3.2363671064376831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 -1361623937 -1149491078 5825754 508056955 -88210408\n            -655077264 -1174209542 -33408130</internalNodes>\n          <leafValues>\n            -3.4054177999496460e-01 3.2592311501502991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 1311738415 -1375274001 1726672390 -829228034\n            2070837764 1208920803 -67308591 -419954764</internalNodes>\n          <leafValues>\n            -3.7184986472129822e-01 2.8876912593841553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 -566173704 -81765536 -328487245 -545227007 8650948\n            -1342492099 8915104 -307505157</internalNodes>\n          <leafValues>\n            -3.2362362742424011e-01 3.4028744697570801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 787644405 1052643324 -671622145 1060113936\n            -1543669260 -621052931 497506684 -1094759403</internalNodes>\n          <leafValues>\n            -3.8580575585365295e-01 2.8625565767288208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 -754941560 -598092101 -1244290303 281751211\n            1463866633 1153550863 -806946917 38740739</internalNodes>\n          <leafValues>\n            -4.4092047214508057e-01 2.5595286488533020e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 184294525 -9037826 -21186597 -1497857980\n            -1372058532 -1233225231 -341673474 -1099675796</internalNodes>\n          <leafValues>\n            -3.7506091594696045e-01 2.9585087299346924e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 4 -->\n    <_>\n      <maxWeakCount>21</maxWeakCount>\n      <stageThreshold>-1.4008288383483887e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 233 -814746846 -2111111254 -553913104 -2097922\n            2004869959 1141046786 1970763104 -134744334</internalNodes>\n          <leafValues>\n            -2.1097929775714874e-01 5.7671958208084106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 -8396836 -538976473 -16384001 -10879489 -8397857\n            -10498599 -45416465 1595899679</internalNodes>\n          <leafValues>\n            -3.1942996382713318e-01 4.6969848871231079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 -824512541 -524299 -344077 -72323247 206048519\n            -1409589837 -84975873 -805875917</internalNodes>\n          <leafValues>\n            -3.0280569195747375e-01 4.2180880904197693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 -1086615304 956872912 223108216 496889077\n            -1097860099 956429808 1601034749 -538976769</internalNodes>\n          <leafValues>\n            -3.5371550917625427e-01 3.6481952667236328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -85985781 1914665473 1351604943 269482959\n            -118967717 -264571342 -71633409 -1574764609</internalNodes>\n          <leafValues>\n            -3.5075160861015320e-01 3.4602758288383484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 -579450864 489695248 -568994533 -671905287\n            1484394168 -21040594 -1132978498 -4358</internalNodes>\n          <leafValues>\n            -3.6514815688133240e-01 3.3418157696723938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -1071640576 -1794071852 -589571267 -622299971\n            -128680624 -107152175 -1128604712 -93782371</internalNodes>\n          <leafValues>\n            -4.3749809265136719e-01 2.3641848564147949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 1347789474 278788859 1078009887 1450704633 755482275\n            -890279806 1601682923 1145430595</internalNodes>\n          <leafValues>\n            -4.5889991521835327e-01 2.1458856761455536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 -67811136 507778012 2090770170 940627838 -547680164\n            -564395008 -1507362 -15533189</internalNodes>\n          <leafValues>\n            -3.4613710641860962e-01 2.9729354381561279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 708451453 915939127 2086399799 -1364049961\n            -111247856 -278977 -562528515 -1432293672</internalNodes>\n          <leafValues>\n            -4.1620507836341858e-01 2.4089127779006958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 -1423966541 177905074 -199210 -1914114123\n            1966529760 -2068908586 -574294864 -841165576</internalNodes>\n          <leafValues>\n            -3.1373840570449829e-01 3.2040333747863770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 1848585743 -1940984369 1618804030 -285289836\n            1994084869 67912305 -4262128 -303498266</internalNodes>\n          <leafValues>\n            -3.6098247766494751e-01 2.7308923006057739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 -34593 -42134437 83156217 534796439 -206958426\n            -542489456 -301270341 -1910021</internalNodes>\n          <leafValues>\n            -2.1900075674057007e-01 4.6534782648086548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 -732498730 808132612 -1694705650 637674514\n            -856846932 790002977 -1523128100 -5768257</internalNodes>\n          <leafValues>\n            -3.0635869503021240e-01 3.2308223843574524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 -272658653 -2039881873 -1093759223 -295772198\n            316478038 1219928242 1542411604 -523960875</internalNodes>\n          <leafValues>\n            -4.1005435585975647e-01 2.4376337230205536e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -1886651248 233035768 -579887888 -644481803\n            -1924527808 72215888 -813972012 -838860849</internalNodes>\n          <leafValues>\n            -3.2710522413253784e-01 3.0177840590476990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 -626385315 -541893255 -289637249 -2982538\n            -285318128 -335644678 -934750724 -1937614</internalNodes>\n          <leafValues>\n            -3.0264344811439514e-01 3.4333297610282898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -675308008 858262544 -546392130 -86565344 889738476\n            1024209296 -539034113 -17892421</internalNodes>\n          <leafValues>\n            -3.0164864659309387e-01 3.2610884308815002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 289874895 1574889454 356325874 -1257339986\n            2013148111 1523362314 -209587256 -51584276</internalNodes>\n          <leafValues>\n            -3.0728715658187866e-01 3.2666257023811340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 207364212 -1629723097 -69798913 180098791 445713016\n            -1342538933 -112443395 -1436022512</internalNodes>\n          <leafValues>\n            -4.8653569817543030e-01 2.1469378471374512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 -1891992271 534502897 -709725931 -1133905467\n            -1625325679 -1098169635 -1377993223 -1175556795</internalNodes>\n          <leafValues>\n            -3.6775574088096619e-01 2.6944977045059204e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 5 -->\n    <_>\n      <maxWeakCount>20</maxWeakCount>\n      <stageThreshold>-1.6370692253112793e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 246 -544546902 -40378434 1166794751 -553126475\n            1124863438 -6684681 252464271 252663279</internalNodes>\n          <leafValues>\n            -1.7677198350429535e-01 5.9283459186553955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 -1688231254 -136322578 542408738 -167781650\n            -284181590 88186882 -74646534 -254480182</internalNodes>\n          <leafValues>\n            -4.8250266909599304e-01 3.2293373346328735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 -1087113223 -1153788752 923893117 -40019499\n            -1444151361 -1145394000 520297981 -7610887</internalNodes>\n          <leafValues>\n            -2.7269113063812256e-01 4.6762999892234802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 1431698391 477399807 5291197 215258107 2097218267\n            1070271552 1347764095 1497759739</internalNodes>\n          <leafValues>\n            -3.6439743638038635e-01 3.3937779068946838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 -494878000 -1408572168 -1216184843 -570753839\n            -1385631492 -1572929 -37698091 -140075</internalNodes>\n          <leafValues>\n            -3.4019106626510620e-01 3.2104432582855225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 -15196934 2140689563 1546672602 1591347871\n            1544035576 488135152 2142261182 -4259841</internalNodes>\n          <leafValues>\n            -3.7342280149459839e-01 2.8317087888717651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 -357586129 70201151 -292424585 -1468006937\n            1163158101 45494091 -492310284 -184618257</internalNodes>\n          <leafValues>\n            -4.2928436398506165e-01 2.4182404577732086e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 -346034385 -1509510400 -590396300 -56691898\n            -2013314811 -11148442 -790137804 -17301901</internalNodes>\n          <leafValues>\n            -3.2902050018310547e-01 3.1380781531333923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 51573280 869252567 856020959 2136817673 -1825854798\n            1786292453 1863958011 51070032</internalNodes>\n          <leafValues>\n            -4.4989612698554993e-01 2.3105476796627045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 221945781 -1351824656 -369627303 -1616906768\n            180205816 -1398111810 986511580 -2002860624</internalNodes>\n          <leafValues>\n            -3.3374428749084473e-01 3.0387389659881592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 -12577 1384049145 -1464090918 -265274512 1423314444\n            -330608884 -134684970 -95228557</internalNodes>\n          <leafValues>\n            -2.9424193501472473e-01 3.4667330980300903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 -349179217 304152230 -725813534 -44849422 206658671\n            1343674791 1143817582 1414000887</internalNodes>\n          <leafValues>\n            -3.5459104180335999e-01 2.8464645147323608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 2135942447 398828943 961557154 -85264382 -9441329\n            191609019 -135559186 1155988198</internalNodes>\n          <leafValues>\n            -3.9276805520057678e-01 2.5532895326614380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 792354069 -1442292348 -725922817 -1075650752\n            -1345299339 -270808291 1585978709 -1363456899</internalNodes>\n          <leafValues>\n            -4.0223011374473572e-01 2.3934543132781982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 -963985190 526195161 -632047017 -13433768 -170216210\n            -584509261 -1147462405 2122007633</internalNodes>\n          <leafValues>\n            -3.5836115479469299e-01 2.7841308712959290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 1282640527 -221028405 -1115770991 -1312815327\n            518459295 -5010698 -8421409 -52340448</internalNodes>\n          <leafValues>\n            -3.0360385775566101e-01 3.3305782079696655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 240090463 1543015448 1657994909 1376934782\n            2121953054 -3393448 774963198 -364875945</internalNodes>\n          <leafValues>\n            -3.1514179706573486e-01 3.1063860654830933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 -117441008 272437552 -2011728848 808844177\n            -115035003 901066096 -392587048 829815772</internalNodes>\n          <leafValues>\n            -4.1897901892662048e-01 2.3548045754432678e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 -285250029 -1342531469 -1337688454 76061301\n            2140621344 -26490526 -230505742 -498673325</internalNodes>\n          <leafValues>\n            -3.7328067421913147e-01 2.7277800440788269e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 197109511 113539807 -1663738276 652405614\n            2079664708 -1381909716 -83887277 -340414799</internalNodes>\n          <leafValues>\n            -3.5890376567840576e-01 2.7977034449577332e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 6 -->\n    <_>\n      <maxWeakCount>24</maxWeakCount>\n      <stageThreshold>-1.3530069589614868e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 231 -607125512 -203956738 -146407939 -549587593\n            2106032085 -7015967 1296916047 1465901007</internalNodes>\n          <leafValues>\n            -1.2551400065422058e-01 6.0037857294082642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 -12041 289127191 -1961178373 858913587 -452995643\n            -573056619 -184946437 811859443</internalNodes>\n          <leafValues>\n            -3.1659016013145447e-01 4.0386086702346802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 -4456453 -1079345488 1601271281 1566430416\n            -1145044997 -1363497544 -807547663 -846209539</internalNodes>\n          <leafValues>\n            -2.4047850072383881e-01 4.9467754364013672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 -422843738 730826189 -93007646 -1561338070\n            1156254860 82792447 -359691576 -318767125</internalNodes>\n          <leafValues>\n            -4.0942522883415222e-01 2.8118029236793518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 286242991 1430640951 -1315388758 -5384739\n            1897658847 1435892732 -241122312 -190447622</internalNodes>\n          <leafValues>\n            -3.6675310134887695e-01 2.7747273445129395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 -360711817 1044065557 -202645505 -1078462473\n            -554253058 -123796300 -991681292 -117447077</internalNodes>\n          <leafValues>\n            -2.2938863933086395e-01 4.3152013421058655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 -486546689 -38568697 -114385161 -1078244605\n            -1398768130 -16859405 -387455605 -95221245</internalNodes>\n          <leafValues>\n            -2.5292310118675232e-01 4.0669292211532593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 -347108861 707787566 -271712714 -286066182\n            1660625669 23327763 -118368650 -16781581</internalNodes>\n          <leafValues>\n            -3.2693040370941162e-01 2.9912397265434265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 44773155 -1400496480 -2013315201 -2130179 1928269391\n            2146108387 1871512017 -2109991</internalNodes>\n          <leafValues>\n            -3.1153312325477600e-01 3.0730357766151428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 817397681 -4651712 -1074593921 -4489223 -1464975366\n            -1080350544 1068207931 -1414856608</internalNodes>\n          <leafValues>\n            -2.7505692839622498e-01 3.4677764773368835e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 -805311870 -1362548369 -186736224 -220270666\n            1742698308 1147947264 -251792176 -789512618</internalNodes>\n          <leafValues>\n            -3.9942753314971924e-01 2.4047489464282990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 -700036014 -675626240 648044818 -69944464 -389395237\n            -215288017 -1719763715 -12588054</internalNodes>\n          <leafValues>\n            -3.1749448180198669e-01 3.0149078369140625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 765664309 -1401170476 -22282241 -1880818860\n            -1688316571 -52824373 -1730200112 -889291499</internalNodes>\n          <leafValues>\n            -3.5558241605758667e-01 2.6557549834251404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 -1164201800 -1716289100 -378039852 -1409579788\n            -1121338919 -1880520559 932112367 -1869871980</internalNodes>\n          <leafValues>\n            -3.6485251784324646e-01 2.5734969973564148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 -21049601 -25866473 325725 1043995470 1592678894\n            -269259937 -971837858 -8913089</internalNodes>\n          <leafValues>\n            -2.2092992067337036e-01 4.2716163396835327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 763233167 2004741991 -277961986 -35997914 897543679\n            1741158903 -50331667 -1578882304</internalNodes>\n          <leafValues>\n            -3.0084916949272156e-01 3.0936580896377563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 66036611 -2133412515 2136683646 -184645734\n            1604280073 202711897 -1379383 -186590399</internalNodes>\n          <leafValues>\n            -3.7059250473976135e-01 2.4178710579872131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 -326382376 361846096 -2045590179 1068964371\n            705563792 -1156488704 1208497115 994048507</internalNodes>\n          <leafValues>\n            -3.2299432158470154e-01 2.8366291522979736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 -412097022 -1568018524 -1342448718 -1253932\n            -1260185663 1258275150 -2067820288 -138937659</internalNodes>\n          <leafValues>\n            -3.5679051280021667e-01 2.6213440299034119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 -714615533 270672129 -306258157 -1758339253\n            47808742 -1902768889 -1941903362 -893526249</internalNodes>\n          <leafValues>\n            -2.5351437926292419e-01 3.6361116170883179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 -318796273 1227399022 -1369769360 -675875878\n            -344383672 1582766693 -86017024 -344793116</internalNodes>\n          <leafValues>\n            -3.1456202268600464e-01 3.0873265862464905e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 -1045815078 -235892117 -571835429 -3460789\n            -108525848 -1332172392 -1503517894 -1300229375</internalNodes>\n          <leafValues>\n            -3.5038644075393677e-01 2.6677846908569336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 -1976677263 3726998 -392242219 214976380 -1048834204\n            -44384235 -81855380 -1434428367</internalNodes>\n          <leafValues>\n            -4.1762107610702515e-01 2.1475161612033844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 209059956 2146573530 1933758719 -1670893344\n            -1206231472 -538281424 -605128624 -88975308</internalNodes>\n          <leafValues>\n            -4.3403875827789307e-01 2.1460674703121185e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 7 -->\n    <_>\n      <maxWeakCount>26</maxWeakCount>\n      <stageThreshold>-1.3850060701370239e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 250 1118499839 -796332098 -134253196 -6424581 259721215\n            -1671186434 100533499 1170700287</internalNodes>\n          <leafValues>\n            -1.3170924782752991e-01 5.9910702705383301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 1570566140 2106702270 -577478657 -9625925 -36328709\n            -75449636 -394325 1071454459</internalNodes>\n          <leafValues>\n            -3.8424813747406006e-01 3.6834198236465454e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 -136315975 -1187792752 1568109937 -571788877\n            -86048838 -1433673030 -1190563400 -1984968261</internalNodes>\n          <leafValues>\n            -2.4970491230487823e-01 4.7245621681213379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 -25692619 573911103 -1090519553 -1074266633\n            -1124204292 -1199619017 -387151619 -1363171157</internalNodes>\n          <leafValues>\n            -2.7256563305854797e-01 4.0413850545883179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 270536720 -82027755 -542052353 -744834006\n            -172433515 -36839897 -2048335877 -1356137589</internalNodes>\n          <leafValues>\n            -3.7769773602485657e-01 2.3510186374187469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 133774 1573843455 290464424 -173151905 771865036\n            1430562872 -109382744 -246039832</internalNodes>\n          <leafValues>\n            -4.7037139534950256e-01 2.0533446967601776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -618460144 -1256386552 -1618575940 1972721552\n            469800920 504635776 -846791686 -69254485</internalNodes>\n          <leafValues>\n            -3.5127875208854675e-01 2.5741419196128845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 150343455 40910711 -1248068641 -1430372421\n            -1895949361 -21272033 -331755522 -1431642114</internalNodes>\n          <leafValues>\n            -3.7984871864318848e-01 2.3182238638401031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 -13916067 -237157163 1069283741 -7496371\n            -1771992641 -17192227 -1383805025 -2004252467</internalNodes>\n          <leafValues>\n            -2.1929037570953369e-01 3.8296228647232056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 9705301 508957948 -71469059 431911901 2041834229\n            -1141023756 -38047748 -1432742364</internalNodes>\n          <leafValues>\n            -3.4404903650283813e-01 2.3727993667125702e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -28187574 1457201967 -1799949806 542855772\n            -22592508 347566595 -86051214 -254279713</internalNodes>\n          <leafValues>\n            -3.3773353695869446e-01 2.3899486660957336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 1353317010 -353449217 14955059 233737419 1113314227\n            1272002592 2140215167 200230499</internalNodes>\n          <leafValues>\n            -3.5864931344985962e-01 2.1981315314769745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 -592281584 1487966200 -1782854276 -34165307\n            -911392552 -588393496 -86945955 -302569115</internalNodes>\n          <leafValues>\n            -2.9026558995246887e-01 2.8104048967361450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 -14053072 -2064062200 -928567823 -983051523\n            201916593 150423153 -1859132687 -1929383993</internalNodes>\n          <leafValues>\n            -3.2115238904953003e-01 2.5486564636230469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 -607531822 2133030428 1045592120 922799991\n            -1958080364 -631876516 -551887109 -116138161</internalNodes>\n          <leafValues>\n            -2.5716596841812134e-01 3.1999784708023071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 -1897370238 2088280021 -27542220 955523029 143789824\n            -1732421377 -270311431 -319465097</internalNodes>\n          <leafValues>\n            -3.7310892343521118e-01 2.2297158837318420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 2117994623 -596493511 -42869249 2123389533\n            -102873516 -1194255940 -1077870956 -1369933454</internalNodes>\n          <leafValues>\n            -3.2065725326538086e-01 2.5838941335678101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 -402659162 81777018 894353956 -1095917410\n            1470100164 1429538625 -675679616 22405077</internalNodes>\n          <leafValues>\n            -3.9470222592353821e-01 2.1365866065025330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 371408657 -1390197839 -610304075 -1084394735\n            740911518 -1442850385 1025329500 -1085287308</internalNodes>\n          <leafValues>\n            -3.5310438275337219e-01 2.2878694534301758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 1411399848 1607023650 2118667161 2115963630\n            825267416 -1300086616 866705067 1593838595</internalNodes>\n          <leafValues>\n            -3.7212049961090088e-01 2.1682462096214294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -1023751505 1654647882 654289424 -221611870\n            1142643327 2865238 1353434162 -218116589</internalNodes>\n          <leafValues>\n            -3.0895259976387024e-01 2.7360698580741882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 25 263714691 -1500250442 -572970029 1029922655\n            461194497 -1384691616 902512981 -831890189</internalNodes>\n          <leafValues>\n            -2.8019675612449646e-01 2.8230005502700806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -1009275158 703439343 1881063906 1407643120\n            1357622212 1698779727 -175905592 -799737222</internalNodes>\n          <leafValues>\n            -3.0597987771034241e-01 2.6828068494796753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 -655102849 1007864659 -1544094705 -1540313220\n            -574699 -47065227 -1091975362 -278732953</internalNodes>\n          <leafValues>\n            -2.5672450661659241e-01 3.1667667627334595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 347621596 1037305260 358617181 753140063 -61713220\n            -610393186 -1106322953 -1350956022</internalNodes>\n          <leafValues>\n            -3.4445220232009888e-01 2.3471401631832123e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 -923349290 256096042 219291806 -1155987134\n            2086406828 1508909094 -2007541485 1887403703</internalNodes>\n          <leafValues>\n            -3.4530115127563477e-01 2.3805907368659973e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 8 -->\n    <_>\n      <maxWeakCount>25</maxWeakCount>\n      <stageThreshold>-1.2224140167236328e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 252 -22088450 -5325374 -33282 -258 12993776 67429556\n            1976988926 2005923583</internalNodes>\n          <leafValues>\n            -1.9573126733303070e-01 5.5536717176437378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 -941896961 288549683 -965260547 1902502507\n            1287981311 723742655 1157582079 1173354239</internalNodes>\n          <leafValues>\n            -3.0669313669204712e-01 3.6197665333747864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 -571494657 -2099490 -25243649 -1082480054 2115633354\n            -130996 -329130274 -67419570</internalNodes>\n          <leafValues>\n            -2.4500623345375061e-01 4.3682980537414551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 -704647185 2113917365 -428522838 -141168226\n            2123362255 2006664827 -254348594 1459088068</internalNodes>\n          <leafValues>\n            -3.4159252047538757e-01 2.9353541135787964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 -138414285 -168045645 -550635909 -240708569\n            -36728913 -33554641 -890270582 -2069142366</internalNodes>\n          <leafValues>\n            -2.8817924857139587e-01 3.4106674790382385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 -220544510 -184926009 2147213135 -209757985\n            -1177821558 -139002180 845151099 -8701317</internalNodes>\n          <leafValues>\n            -2.2831186652183533e-01 3.8085940480232239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 12976195 569051735 -1044464777 -2131832853\n            -1863693873 -889525281 -1060633090 -1024468017</internalNodes>\n          <leafValues>\n            -3.4035223722457886e-01 2.4870637059211731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 243431285 -1342397538 -1074439183 -198404\n            -1147339787 -1950366979 -1176535299 -1346857836</internalNodes>\n          <leafValues>\n            -2.9916274547576904e-01 2.7878564596176147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 -389107962 -1496674445 -1433293856 1650520822\n            -808004780 -340166498 -270808076 -327882656</internalNodes>\n          <leafValues>\n            -3.6523097753524780e-01 2.3002453148365021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 -1561660693 -1964116758 -433068176 -674252332\n            76465114 -86789644 1441781719 -167788045</internalNodes>\n          <leafValues>\n            -2.6452550292015076e-01 3.1857562065124512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 83758542 1352905533 -25477260 888412977 1174342621\n            -581240613 -1877419 954559493</internalNodes>\n          <leafValues>\n            -3.9430552721023560e-01 2.1380217373371124e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 1060338993 -1618339632 1411411797 -1111518927\n            1038801631 -1171216200 431569585 -1627714192</internalNodes>\n          <leafValues>\n            -3.1174781918525696e-01 2.5848281383514404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 1272433155 241160959 -187054076 -1428167714\n            1656705620 178680903 -188744156 -92279086</internalNodes>\n          <leafValues>\n            -3.5104271769523621e-01 2.4124261736869812e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 276007552 1448970891 1624277552 1433388541\n            -144262781 203467264 -747113541 1187367471</internalNodes>\n          <leafValues>\n            -4.3640381097793579e-01 2.0373314619064331e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 514492090 -1084506382 802327294 -574652997\n            -1951495942 -1115800400 -1734105369 -745080833</internalNodes>\n          <leafValues>\n            -2.6869311928749084e-01 3.1262946128845215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 975568369 -1078429260 -1073778819 -1246039248\n            -566763547 -574710393 -1879731715 -1363518280</internalNodes>\n          <leafValues>\n            -2.5506082177162170e-01 3.2470330595970154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 -197130578 -69435407 25570034 -1282381057\n            -736477475 1078203406 1072176808 -224107914</internalNodes>\n          <leafValues>\n            -3.3984503149986267e-01 2.3857665061950684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 2006936207 2046780255 -906124674 -571018634\n            465548283 1995414095 -469838166 -53152636</internalNodes>\n          <leafValues>\n            -2.3337669670581818e-01 3.4638467431068420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 -1993607757 -1984171376 -1964620068 -1377319864\n            -878651982 2100351409 -540935193 -846344047</internalNodes>\n          <leafValues>\n            -2.5745591521263123e-01 3.1530505418777466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 -585119904 520350737 -1602237728 387020659\n            -316697172 -809628610 -341521253 1937239575</internalNodes>\n          <leafValues>\n            -3.0576938390731812e-01 2.6786401867866516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 -48760835 -1382112048 1192391029 185356020\n            783760374 -1402171184 959454513 -1431708544</internalNodes>\n          <leafValues>\n            -2.8466665744781494e-01 3.0237734317779541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 700150833 -1366030659 -590225483 -1393138060\n            -1364311531 -1142207587 2140558729 -1370849424</internalNodes>\n          <leafValues>\n            -3.7198981642723083e-01 2.3002536594867706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 -1054166 -201341212 1923367016 1916986952\n            1992519431 1213361995 1174402160 -1068174746</internalNodes>\n          <leafValues>\n            -3.4979847073554993e-01 2.4561876058578491e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 -1907696549 -268565315 -1342514689 336742770\n            -1439790339 -1301623122 -1342275841 -1440064298</internalNodes>\n          <leafValues>\n            -2.6577013731002808e-01 3.1544610857963562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -257776636 1915752044 -1649103180 -1095126373\n            1422147805 210473965 2022068463 1660109363</internalNodes>\n          <leafValues>\n            -3.7758591771125793e-01 2.2004681825637817e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 9 -->\n    <_>\n      <maxWeakCount>28</maxWeakCount>\n      <stageThreshold>-1.3550500869750977e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 273 1595195384 1608363967 1595766713 -572674083\n            1226391547 -44180227 2111155631 531574527</internalNodes>\n          <leafValues>\n            -1.6430117189884186e-01 5.4418802261352539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 -5377 -57601 538639103 -347397 -17301286 -4259105\n            -79502593 -77380901</internalNodes>\n          <leafValues>\n            -1.8002209067344666e-01 5.2194720506668091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 1566441471 2103287797 492075325 500554077\n            1998422011 -155652 192249721 1565917179</internalNodes>\n          <leafValues>\n            -2.7448469400405884e-01 3.6767318844795227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3 -524550921 -1669383407 -574620225 -33590459 143458441\n            256708119 -805314577 -6324385</internalNodes>\n          <leafValues>\n            -2.3465685546398163e-01 4.0192386507987976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 -846691120 1439476212 -690689 -2237091 -67570179\n            -36374787 -2105923 -143907</internalNodes>\n          <leafValues>\n            -2.7146762609481812e-01 3.2002952694892883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 263139089 -581452515 2010774399 -2106799 477955253\n            -72357417 267875276 -1097712</internalNodes>\n          <leafValues>\n            -3.5161617398262024e-01 2.3248630762100220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 -15214854 -1884686344 167600312 -581052707 37857013\n            202028220 1305828853 -840957953</internalNodes>\n          <leafValues>\n            -2.6214873790740967e-01 3.0466583371162415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 613396271 2003697295 1738141229 -35000540\n            2147446463 2131993840 -10096690 1690603136</internalNodes>\n          <leafValues>\n            -3.2117179036140442e-01 2.4732810258865356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 -1355025965 -1961980240 -671219723 -283264688\n            -1936837383 -1952736320 -908474131 -875701004</internalNodes>\n          <leafValues>\n            -2.4713008105754852e-01 3.1776627898216248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 -894441054 -1880167002 -853281294 -338827028\n            1348301603 877440640 1936192066 -135400158</internalNodes>\n          <leafValues>\n            -3.2655048370361328e-01 2.4388861656188965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 -553260894 -155221559 -13927175 -570440513\n            -23332102 -93644167 -1079190789 -1431330575</internalNodes>\n          <leafValues>\n            -2.4785453081130981e-01 3.1448525190353394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 672423253 -570534469 -174826505 -1074210146\n            -1158800264 -67208458 802954712 -1079507880</internalNodes>\n          <leafValues>\n            -3.1213754415512085e-01 2.4356111884117126e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 -656932646 -651487779 -956164148 2064599515\n            -136440708 -588512112 -1232981444 -1979159765</internalNodes>\n          <leafValues>\n            -3.0449146032333374e-01 2.5301957130432129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 1649084931 672964650 -1105808049 713205535\n            2036285460 -666148121 -55162040 -18875393</internalNodes>\n          <leafValues>\n            -3.4271252155303955e-01 2.1502359211444855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 -152656190 868356183 -501591426 -201146046\n            -546953661 1982915527 -759837225 -751304729</internalNodes>\n          <leafValues>\n            -3.6129125952720642e-01 2.0629832148551941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 -537765384 1060665394 2014012895 -1179616664\n            -22202433 -1074072677 -147975202 -1147076845</internalNodes>\n          <leafValues>\n            -2.9889339208602905e-01 2.5862032175064087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 -328257785 -858932225 -530764942 -826874930\n            -82742922 -1671853892 -218380796 -169018736</internalNodes>\n          <leafValues>\n            -3.1055119633674622e-01 2.3958165943622589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 494120195 870143859 -1647046746 -36192340\n            2139319279 803383587 -332148852 -175859072</internalNodes>\n          <leafValues>\n            -2.8900969028472900e-01 2.5575104355812073e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 -811560420 827561735 -12914945 -80101505\n            -1361111928 -1185616587 -1407676420 -16973965</internalNodes>\n          <leafValues>\n            -2.4221476912498474e-01 3.2213848829269409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 -1807515438 -1923894982 -1525713421 -149168351\n            240714426 -1418935881 419048443 426584671</internalNodes>\n          <leafValues>\n            -3.4787160158157349e-01 2.1293328702449799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 -67165120 453708801 -1303483468 895300097\n            1246742261 -70442158 -982536969 1920335427</internalNodes>\n          <leafValues>\n            -3.4275433421134949e-01 2.1697193384170532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 84 1234906919 2103279727 -1846517728 -34739694\n            2067706763 1171293376 -104744214 -776609560</internalNodes>\n          <leafValues>\n            -3.1936296820640564e-01 2.2989478707313538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 -148968905 1008481713 788164595 781877169 240125438\n            -1348980802 1087673598 -1963666822</internalNodes>\n          <leafValues>\n            -2.6340115070343018e-01 2.8225165605545044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 1837891345 -1365117008 931935797 254075285\n            1304075707 781882527 284906609 -1998401051</internalNodes>\n          <leafValues>\n            -3.0138608813285828e-01 2.5070127844810486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 -2141011328 549559667 -576755279 -1989065165\n            -1471060704 -1108160073 -825160949 47662087</internalNodes>\n          <leafValues>\n            -4.3011611700057983e-01 1.7580580711364746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 -747375089 -747702293 -219779522 1890186598\n            -335684346 1718484847 1643894306 -206110753</internalNodes>\n          <leafValues>\n            -2.3109740018844604e-01 3.2786485552787781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 -1784488175 -36553927 -1031147589 -369559501\n            125374437 -1648822347 8863969 -1498451769</internalNodes>\n          <leafValues>\n            -2.3490820825099945e-01 3.1162357330322266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 -1071476830 -1095595629 -1920078129 -1444498449\n            810365109 -21630982 -290653569 -392299569</internalNodes>\n          <leafValues>\n            -2.5611433386802673e-01 2.9074308276176453e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 10 -->\n    <_>\n      <maxWeakCount>30</maxWeakCount>\n      <stageThreshold>-1.3058989048004150e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 262 -270610434 -134359075 -811399758 -681603633\n            -286489698 -45513244 -1344862513 227476639</internalNodes>\n          <leafValues>\n            -1.0025274008512497e-01 5.5719470977783203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 -2097187 353744664 -1074283233 962461525 -17042946\n            2132074456 -185611768 173014862</internalNodes>\n          <leafValues>\n            -2.9774430394172668e-01 3.4969726204872131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 -201591309 322053939 -66051 -1150042305 -1967374172\n            720309079 -1929450275 -9437249</internalNodes>\n          <leafValues>\n            -2.2600507736206055e-01 3.8218078017234802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 -1690568520 1023449340 21823732 -1646306859\n            -661660161 529059241 -845261571 -536871425</internalNodes>\n          <leafValues>\n            -2.8739321231842041e-01 2.8658962249755859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 -894497022 101363498 -1468636304 174491490\n            1306476909 100485583 -17240860 -50397265</internalNodes>\n          <leafValues>\n            -4.0346711874008179e-01 1.7318421602249146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 -318927617 2139044223 -1908122241 779509119\n            -1159705360 -13892400 239132095 -1357193897</internalNodes>\n          <leafValues>\n            -2.4370998144149780e-01 3.1787887215614319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 -1372487695 -1464797736 -608961161 -539484303\n            -1347732485 -1107560232 -1770177028 -1397928683</internalNodes>\n          <leafValues>\n            -2.9030051827430725e-01 2.7010890841484070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -77617562 1723582851 -388105926 10740970 2075870464\n            2001443802 -264144166 1912602619</internalNodes>\n          <leafValues>\n            -3.6183983087539673e-01 2.2234350442886353e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 1737993987 575323583 570599958 -1593901402\n            -537396969 800103342 -218367233 -210440396</internalNodes>\n          <leafValues>\n            -3.0187138915061951e-01 2.5218242406845093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -3692022 -33948459 -1481085416 -169476374\n            -243802706 1464294676 -138677344 -135135404</internalNodes>\n          <leafValues>\n            -2.6393750309944153e-01 2.8237256407737732e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 652099711 -1564843973 104523854 704662580 2126923816\n            -548581264 -351211922 -63803885</internalNodes>\n          <leafValues>\n            -3.4199714660644531e-01 2.2430206835269928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 -1969279581 -1481414863 -1376914049 -1163909120\n            207957301 -1456248013 -347640417 -358126493</internalNodes>\n          <leafValues>\n            -3.2226172089576721e-01 2.3534862697124481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -721363152 486579872 1882454289 1434257045\n            1611566751 1289487287 996045691 1005540351</internalNodes>\n          <leafValues>\n            -3.4691241383552551e-01 2.1465319395065308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -613203450 1931612930 -221388928 2357067 -95798262\n            -1633004965 -1206355046 -1305281858</internalNodes>\n          <leafValues>\n            -3.5142555832862854e-01 2.2679552435874939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 726466699 -783429313 -1320406822 -3624870 1498638047\n            293610405 -545215571 -171145013</internalNodes>\n          <leafValues>\n            -2.8053104877471924e-01 2.5749957561492920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 -96033630 1940556686 -497037664 -252647058\n            703265613 1079474790 -142103350 1089273046</internalNodes>\n          <leafValues>\n            -3.5805869102478027e-01 1.9770637154579163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 801058311 -1581801242 219502516 -808469412 264711475\n            -2031926289 805127380 -840973936</internalNodes>\n          <leafValues>\n            -3.1421071290969849e-01 2.3023897409439087e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 -431184122 -2146638145 -899408814 -320144615\n            -413827291 -936008940 -1376277757 -856306909</internalNodes>\n          <leafValues>\n            -3.3034646511077881e-01 2.2980070114135742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 -1934886608 -1103642657 -1616127841 2141970916\n            12401112 -606080117 -28750412 -975218195</internalNodes>\n          <leafValues>\n            -3.0468633770942688e-01 2.4846823513507843e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 1828669055 -890173322 1056472031 1383623540\n            -356497848 -275776488 -319784148 -45023438</internalNodes>\n          <leafValues>\n            -2.7311590313911438e-01 2.6826277375221252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 9 1255206898 -1667881507 -10989766 54528930 1868912080\n            1497103356 -1096470729 195839511</internalNodes>\n          <leafValues>\n            -3.6629125475883484e-01 2.0582148432731628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 -374953039 110804926 -627248196 1059075576\n            -271092824 -1449292838 -306539616 -1950680360</internalNodes>\n          <leafValues>\n            -2.7446079254150391e-01 2.6614543795585632e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 1079656456 1450316376 -44560086 -86675865 821811859\n            -203750610 1644870683 862142514</internalNodes>\n          <leafValues>\n            -4.1938367486000061e-01 1.8087086081504822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 0 -290783281 -303164749 -1470447878 -1487432078\n            916915428 -88877852 1774133328 -992512778</internalNodes>\n          <leafValues>\n            -2.6362594962120056e-01 2.8109744191169739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 -756036050 839304974 -287378334 -278205702\n            1541888379 252445922 1089229910 1534066638</internalNodes>\n          <leafValues>\n            -3.4634828567504883e-01 2.1581955254077911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 855880616 863230344 1428139679 995299387\n            -1190999286 -2031656420 -1089224709 393285777</internalNodes>\n          <leafValues>\n            -3.6159241199493408e-01 2.0310276746749878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 -1512047005 -894771811 -1683823949 -598542090\n            1995129382 -1899059137 1498537061 -838863787</internalNodes>\n          <leafValues>\n            -2.8326958417892456e-01 2.6241222023963928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 -1885077515 -1147345968 765009497 190991824\n            -1880224543 -1444116296 170661041 -1880099595</internalNodes>\n          <leafValues>\n            -2.7807191014289856e-01 2.6050725579261780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 -678450904 253998378 1239066322 -181932174\n            1262701314 1057893524 -413531308 -638649353</internalNodes>\n          <leafValues>\n            -3.3198201656341553e-01 2.2709015011787415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -581179905 -1848462196 1945061311 -5371768\n            -323621137 -1263209313 1589634526 -1983639545</internalNodes>\n          <leafValues>\n            -2.1172577142715454e-01 3.3727011084556580e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 11 -->\n    <_>\n      <maxWeakCount>28</maxWeakCount>\n      <stageThreshold>-1.5291974544525146e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 118 1460139419 453084545 822327865 822292283 352929169\n            417272919 135004047 924844031</internalNodes>\n          <leafValues>\n            -8.1135094165802002e-02 5.6568491458892822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 -715128994 1934810962 -672407682 -201597282\n            -35692578 809635668 -268435489 2147483551</internalNodes>\n          <leafValues>\n            -3.0913391709327698e-01 3.3743736147880554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 1122941951 1555757531 -694977567 -540019318\n            137302463 470541003 1136607934 1306525407</internalNodes>\n          <leafValues>\n            -3.1006491184234619e-01 3.1824222207069397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 -720124792 -536901237 1570357663 -1650861895\n            -552270619 -68301133 1302024703 79667599</internalNodes>\n          <leafValues>\n            -3.3839857578277588e-01 2.5523734092712402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 -8193062 -6097966 -1548746898 -379066394 143198346\n            -645407521 12583050 -472923985</internalNodes>\n          <leafValues>\n            -2.4971115589141846e-01 3.2822373509407043e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 -825768185 724487963 -390073602 -330379374\n            1107247415 83879931 -993921692 -452988933</internalNodes>\n          <leafValues>\n            -3.0709245800971985e-01 2.5717419385910034e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 -824653104 303085300 -1502438950 676395390\n            1255626832 486565974 -815202689 -79167553</internalNodes>\n          <leafValues>\n            -3.6309060454368591e-01 2.1628698706626892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 1465723394 105884335 67529631 1199566589 -1622165645\n            1811892772 1549268950 1652352758</internalNodes>\n          <leafValues>\n            -4.2343840003013611e-01 1.6860494017601013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 148088327 717657079 -1158484046 -2098532510\n            1870465024 1417516115 -834205 -218760204</internalNodes>\n          <leafValues>\n            -3.6911985278129578e-01 2.0653814077377319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -461242368 1477725653 -1215242820 -90145126\n            1009057732 -704735 -1141055496 -1162708353</internalNodes>\n          <leafValues>\n            -3.3464974164962769e-01 2.3336097598075867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 -1423237359 -1789315824 -574109707 -1107438219\n            -1363603597 -872691976 -1657075536 -1933638287</internalNodes>\n          <leafValues>\n            -3.1273457407951355e-01 2.2250117361545563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 -144708057 1699343849 -1838157252 -177211402\n            -159396385 625472608 -135793676 -521076854</internalNodes>\n          <leafValues>\n            -2.3151670396327972e-01 3.2311838865280151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 -1931608011 913325143 -171254849 266627963\n            -2035524252 -69309961 -81258276 -98535933</internalNodes>\n          <leafValues>\n            -2.9178491234779358e-01 2.4896363914012909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 1087671428 82841500 -823391220 -1623396996\n            -102804027 1314177621 -1141613796 -1074263479</internalNodes>\n          <leafValues>\n            -3.8546600937843323e-01 1.7542295157909393e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 -933240178 -1878596882 1715175556 -1194366298\n            411894039 268454833 -470873276 719547915</internalNodes>\n          <leafValues>\n            -3.2228979468345642e-01 2.1430800855159760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 -939528673 -1404420134 -369182724 1002367802\n            15711733 -1410089155 1960793528 -2001995142</internalNodes>\n          <leafValues>\n            -2.3454265296459198e-01 3.0028054118156433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 536155908 470828324 -1369532674 -1364256937\n            965751798 -35376543 78916068 750088039</internalNodes>\n          <leafValues>\n            -4.0617641806602478e-01 1.7761451005935669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 -2071666137 -5603018 -1985288769 -1434200 1335921899\n            -1427144213 -1685518963 -1157538765</internalNodes>\n          <leafValues>\n            -2.4697369337081909e-01 2.9498186707496643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 -288895194 586300718 -1428684760 -123278042\n            -121959099 946274053 -1125681616 1348531058</internalNodes>\n          <leafValues>\n            -4.4196075201034546e-01 1.6939437389373779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 -1431908781 2021291639 -1130434561 980837616\n            575372375 -335353565 -1127443082 -8913481</internalNodes>\n          <leafValues>\n            -2.6150795817375183e-01 2.7675113081932068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -1163937995 319737271 1308060341 -1120611591\n            215961812 -849912353 -825672464 -121636649</internalNodes>\n          <leafValues>\n            -2.0028464496135712e-01 3.5346552729606628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 -1550874873 68414247 420172119 -1144260794\n            -508579405 -134226281 -772565676 -204480722</internalNodes>\n          <leafValues>\n            -2.3316873610019684e-01 3.1222426891326904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 -541341454 531709016 -1735251873 1326185481\n            -1933801064 801776562 1154066423 1474264822</internalNodes>\n          <leafValues>\n            -2.6953682303428650e-01 2.8109839558601379e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 1280835701 -19635873 -1961789445 -282569314\n            2036092788 -1093054601 -151512323 -1347805666</internalNodes>\n          <leafValues>\n            -2.9192847013473511e-01 2.4838224053382874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 -311496552 764872328 -498934241 504728371\n            -1669213988 -1084285404 -22094113 977657810</internalNodes>\n          <leafValues>\n            -3.2798394560813904e-01 2.1226845681667328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 -830243037 -455709770 -1109557600 -394303915\n            1283690960 229296318 285572161 -1936864027</internalNodes>\n          <leafValues>\n            -2.9578369855880737e-01 2.4679656326770782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 -353374409 -1910657629 -153750156 -291312600\n            -824232155 -1323582188 -1830135484 -1029119357</internalNodes>\n          <leafValues>\n            -3.0753603577613831e-01 2.2499974071979523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 1861152279 336385887 -1598237261 1532541780\n            717032533 845016530 -1129812228 -567126192</internalNodes>\n          <leafValues>\n            -2.7896767854690552e-01 2.5912684202194214e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 12 -->\n    <_>\n      <maxWeakCount>32</maxWeakCount>\n      <stageThreshold>-1.3275781869888306e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 235 -9764865 -604078086 -173773889 -2987398 1279545343\n            -557388648 1149200335 1195863143</internalNodes>\n          <leafValues>\n            -2.8027681633830070e-02 5.9074550867080688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 -715992866 -553046580 -170277985 -572962233\n            -202911505 -562080269 -271361 2136426523</internalNodes>\n          <leafValues>\n            -2.9094350337982178e-01 3.2474684715270996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 -285213773 -97321424 -537973381 -1342251019 249102355\n            186786323 -1879110913 -269489669</internalNodes>\n          <leafValues>\n            -2.4952219426631927e-01 3.3645749092102051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 -5251811 -46589657 -577170147 -1649982203 -147523\n            -67650657 -307360312 -1945170545</internalNodes>\n          <leafValues>\n            -2.2803187370300293e-01 3.6403229832649231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 1587350780 -6418628 -1073864867 -604037841\n            -21053701 -1195406672 784076557 -1342501334</internalNodes>\n          <leafValues>\n            -2.9213908314704895e-01 2.7659067511558533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 -826544217 -1431112397 -488065488 540212786\n            -722778748 1157429871 -270294508 -520884270</internalNodes>\n          <leafValues>\n            -3.5402128100395203e-01 2.1517892181873322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 712975879 79833691 -1361412946 686460060 -691335585\n            -125978095 -285512546 -1430258133</internalNodes>\n          <leafValues>\n            -3.1391125917434692e-01 2.2734560072422028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 -976172866 286760680 6735455 198928110 1074026973\n            990905122 10809743 255401983</internalNodes>\n          <leafValues>\n            -3.5261881351470947e-01 2.0989060401916504e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 774125429 -1154154632 -439675595 -1111523364\n            1012643517 -1454645 798207228 -1128575640</internalNodes>\n          <leafValues>\n            -2.6199585199356079e-01 2.7558091282844543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 251 -487657822 48661756 -659241758 -135899942\n            1153834238 10993310 1170301815 1424455655</internalNodes>\n          <leafValues>\n            -4.2886912822723389e-01 1.5836857259273529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 721311231 -1653716997 -1990311447 531501487\n            -1965404323 -67478251 171464059 184576600</internalNodes>\n          <leafValues>\n            -3.8873490691184998e-01 1.7470200359821320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 327418278 390873324 -1341550100 -1277569843\n            890828715 1352696428 762946218 871965384</internalNodes>\n          <leafValues>\n            -4.1405329108238220e-01 1.7622730135917664e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 1356549140 -1631210850 -1129431843 -1204505275\n            -93539215 -1074227267 -386080853 -84902083</internalNodes>\n          <leafValues>\n            -2.7681437134742737e-01 2.4316167831420898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -488643058 180875078 -329274718 -236520514\n            -1068514035 1145270019 1940253924 1625680036</internalNodes>\n          <leafValues>\n            -3.7754905223846436e-01 1.7737720906734467e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 1568653099 -1486684233 -270730127 -320215680\n            -1480112719 -1448552587 444420880 -859837569</internalNodes>\n          <leafValues>\n            -2.4140998721122742e-01 2.7932175993919373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 189 -17905025 1950769147 -402672769 2131932059\n            251095909 -1377736845 -268624424 1935896624</internalNodes>\n          <leafValues>\n            -2.4894605576992035e-01 2.6565098762512207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 -229980658 1379962893 -378530289 -1286386082\n            541532620 -136587009 1094085135 657713951</internalNodes>\n          <leafValues>\n            -2.9520252346992493e-01 2.2449728846549988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 -383212128 -6160449 -283244184 -1365334076\n            762609077 1768025015 -304497187 -1344499269</internalNodes>\n          <leafValues>\n            -2.8447866439819336e-01 2.4520753324031830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 -823677149 33812366 63268002 -1196492664 759909893\n            73716507 -306223978 -151718043</internalNodes>\n          <leafValues>\n            -3.2939437031745911e-01 2.0377136766910553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 -1374019853 713820810 -669067463 -2043769806\n            -847767619 -1963069954 1575449037 -450464140</internalNodes>\n          <leafValues>\n            -3.0366918444633484e-01 2.2024095058441162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 -470316922 717621094 -923928028 -172110089\n            -175398463 2009855399 -194461440 -243275802</internalNodes>\n          <leafValues>\n            -2.6190644502639771e-01 2.6647549867630005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 1951769299 1434447053 -1336849665 -721425681\n            -78677193 -2902011 2045245095 -24300714</internalNodes>\n          <leafValues>\n            -2.2465880215167999e-01 3.1657159328460693e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 -861210968 688568240 -1004941864 -35890713\n            -662335344 8503434 1128813796 1162868189</internalNodes>\n          <leafValues>\n            -4.0748140215873718e-01 1.7012281715869904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 1909956778 -958730002 73759065 117326543 -170462666\n            -1638796928 -144999309 1180628626</internalNodes>\n          <leafValues>\n            -3.5050147771835327e-01 1.8371912837028503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 -1007695481 -1609761269 -218186094 -1297941718\n            1501545350 1348355905 -785383567 -535441850</internalNodes>\n          <leafValues>\n            -2.8428241610527039e-01 2.3429898917675018e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 -1088815371 1060734832 -4223497 1069000375\n            -1138325508 -23580996 -1751106129 -1447097814</internalNodes>\n          <leafValues>\n            -2.0420564711093903e-01 3.2137596607208252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 1861672606 -668397946 1208024407 1141008467\n            793079834 440603748 -705639574 -48042237</internalNodes>\n          <leafValues>\n            -2.7496239542961121e-01 2.4548499286174774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 -992769979 767790999 -48337487 2140880143 215229748\n            418870965 -320966916 1188940671</internalNodes>\n          <leafValues>\n            -2.7034837007522583e-01 2.4777430295944214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 -1532809423 -1493812843 -1351098395 -172312296\n            -515160205 -1498547284 268291320 -1426238432</internalNodes>\n          <leafValues>\n            -2.8834709525108337e-01 2.2686660289764404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 -3221657 908227842 -305164460 942829106 -357061387\n            -1565722789 -9463718 -360710886</internalNodes>\n          <leafValues>\n            -2.2364138066768646e-01 3.1509658694267273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 -735960950 -170126554 1909113855 -23709394\n            -1542321238 -737632549 -361625941 867181313</internalNodes>\n          <leafValues>\n            -3.6416807770729065e-01 1.8943277001380920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 -1427114189 -1498618581 -224896028 -1392720912\n            -1096677881 -972078302 -136092556 -1000345005</internalNodes>\n          <leafValues>\n            -3.1630918383598328e-01 2.1302369236946106e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 13 -->\n    <_>\n      <maxWeakCount>36</maxWeakCount>\n      <stageThreshold>-1.3241410255432129e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 264 -1886982258 -671648799 -570864297 -606221228\n            -1899852152 -3292975 236208719 1600077909</internalNodes>\n          <leafValues>\n            -7.9810082912445068e-02 5.2391374111175537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 -85990657 570624531 -67109121 992976191 -386251554\n            -1965159927 -83923475 -1048581</internalNodes>\n          <leafValues>\n            -1.8287384510040283e-01 4.4005623459815979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 -37758029 -1146357328 -206212751 -572669447\n            -3147333 -1147409733 -67110471 -1714697285</internalNodes>\n          <leafValues>\n            -2.0388080179691315e-01 4.2895537614822388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 -183247173 1023475216 1027163441 1527839249\n            1017224859 1738217629 1060840379 1065315199</internalNodes>\n          <leafValues>\n            -3.3740916848182678e-01 2.1529236435890198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 481318143 -134278060 -1749526563 -1078064995\n            -1372435270 -1162474278 -358945793 -1431173974</internalNodes>\n          <leafValues>\n            -2.8765675425529480e-01 2.5110965967178345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 -805831759 -302189077 -591401807 -305135631\n            144606625 -1936723969 -992408563 -855769927</internalNodes>\n          <leafValues>\n            -2.2018201649188995e-01 3.1721305847167969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 -534756686 1380106992 -2462279 -33757488 28591869\n            -456875269 -1610624779 -1051657</internalNodes>\n          <leafValues>\n            -2.6303508877754211e-01 2.5412750244140625e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 1342137858 36560521 -895533800 683603905 1263879488\n            1146407324 -1450126 -537788681</internalNodes>\n          <leafValues>\n            -3.6383235454559326e-01 1.9057570397853851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 1340125183 -134742145 -692979981 -1214109056\n            1289101223 -4839633 -21061633 -369409502</internalNodes>\n          <leafValues>\n            -2.0452670753002167e-01 3.3919993042945862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 193720319 100840569 -303833102 763156184 978053077\n            531299573 -839056136 -1929622308</internalNodes>\n          <leafValues>\n            -2.7057421207427979e-01 2.3806059360504150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 1437966890 -129122561 1958795834 1556596447\n            1598142386 1074702522 -272384141 1205144459</internalNodes>\n          <leafValues>\n            -3.8338547945022583e-01 1.6122914850711823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 1115680527 115249619 895027446 -92284851 1599078213\n            1735769988 -537445018 1689910980</internalNodes>\n          <leafValues>\n            -3.6433032155036926e-01 1.7980493605136871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 1900011604 2069139451 1149891166 -1061030506\n            1967646922 -937402003 -1292100642 838974267</internalNodes>\n          <leafValues>\n            -3.2297107577323914e-01 1.9990013539791107e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 1216302162 1437731410 -1922152432 -586510344\n            -937599750 1065827099 -621007040 -86024589</internalNodes>\n          <leafValues>\n            -2.9406809806823730e-01 2.1769714355468750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 34597026 -688274366 1187213567 -671108889\n            -1508901182 -1308638469 -559091031 247438496</internalNodes>\n          <leafValues>\n            -3.2822206616401672e-01 1.8776336312294006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 103046517 133606652 1733190463 -1346628911\n            -1148684048 -22091807 901613945 -1460139888</internalNodes>\n          <leafValues>\n            -3.3780130743980408e-01 1.9073766469955444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 -746085629 -676994367 1095924655 -1122388257\n            -212397823 -202506293 -205057719 -208672818</internalNodes>\n          <leafValues>\n            -1.8210665881633759e-01 3.4192490577697754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 -425549783 -371579759 -351371857 -575060349\n            -1214609473 -88295489 419684031 -1624088569</internalNodes>\n          <leafValues>\n            -2.2647747397422791e-01 2.7878209948539734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 -894491986 -219288836 1075036258 -1764754717\n            -573582558 -1807733298 1383817634 -196806592</internalNodes>\n          <leafValues>\n            -2.9377350211143494e-01 2.1309736371040344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 -2106874097 -931096794 1687396770 -828052004\n            2015982962 -126682795 -294764796 -323961156</internalNodes>\n          <leafValues>\n            -3.2405611872673035e-01 1.9604462385177612e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 -2042653379 1051606960 500611353 1069291288\n            -1453967943 -1919900749 -547038872 -1414655812</internalNodes>\n          <leafValues>\n            -2.6115354895591736e-01 2.3542492091655731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -588537600 -844176924 1464154596 -637687780\n            487338116 68063409 -1978163723 -840968737</internalNodes>\n          <leafValues>\n            -2.7114504575729370e-01 2.3290830850601196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 120290097 -1288032431 1651243885 -76200631\n            -2068365766 -1346655489 246316733 -1108265899</internalNodes>\n          <leafValues>\n            -3.0526432394981384e-01 2.0446150004863739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 -822121865 -768454985 -352395443 -367512593\n            -1091080379 -202815919 -279024202 -28119438</internalNodes>\n          <leafValues>\n            -2.4680423736572266e-01 2.5303974747657776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 -624497410 423430210 168884479 707847256 -901496725\n            2133000198 -1135412149 1936933458</internalNodes>\n          <leafValues>\n            -3.1653416156768799e-01 2.0023956894874573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 1650942474 1345050478 886355088 1168828219\n            1112207884 1231876612 1550108076 1951460330</internalNodes>\n          <leafValues>\n            -3.2898175716400146e-01 1.8093948066234589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 369300756 891056133 -1916674564 -1374783349\n            996154237 -1145226207 -5607004 744775764</internalNodes>\n          <leafValues>\n            -3.2225444912910461e-01 1.9573701918125153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 205577554 1071184148 -1263948549 1998946051\n            1260935961 -304903199 -606843718 1677159567</internalNodes>\n          <leafValues>\n            -3.0931469798088074e-01 2.0338173210620880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 -591418226 177508317 -1342069760 -4867939\n            1927953629 272683209 -1222155904 1886512754</internalNodes>\n          <leafValues>\n            -3.4405741095542908e-01 1.8495233356952667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 -21049686 -28131359 1073478397 -34340880\n            -2075882246 -1093124168 -64807690 -1243108611</internalNodes>\n          <leafValues>\n            -2.2883313894271851e-01 2.9109308123588562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 781346419 639805680 -546181353 -1174989674\n            -1555551183 -893031525 -2006836811 -1392561707</internalNodes>\n          <leafValues>\n            -3.0891278386116028e-01 2.1537151932716370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 -26563529 576995058 1442217478 -1427177744\n            -68769859 -1241776649 -424779152 -285805586</internalNodes>\n          <leafValues>\n            -2.3855516314506531e-01 2.6137462258338928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 -491860352 1783772447 -1761018371 989361018\n            2037451840 -988741302 2128769468 1865931536</internalNodes>\n          <leafValues>\n            -3.3605426549911499e-01 1.9781108200550079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 -1359078146 -21349537 1081098827 794979703 147593312\n            -343136234 308281456 -1121813221</internalNodes>\n          <leafValues>\n            -3.4179690480232239e-01 1.8693566322326660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 -467418588 607934740 -510185553 -839002645\n            2000942967 1793376114 710533396 209909344</internalNodes>\n          <leafValues>\n            -3.9927759766578674e-01 1.5319514274597168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 -251463749 -1087866735 954640701 -1345720208\n            257393053 -1721918337 71237772 -522239782</internalNodes>\n          <leafValues>\n            -2.0329028367996216e-01 3.1257370114326477e-01</leafValues></_></weakClassifiers></_>\n    <!-- stage 14 -->\n    <_>\n      <maxWeakCount>36</maxWeakCount>\n      <stageThreshold>-1.3515049219131470e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 121 -583157832 -41345124 -1667477754 -47472728\n            -1631649861 -192782657 -1106464817 1060048799</internalNodes>\n          <leafValues>\n            -6.6292375326156616e-02 5.3096652030944824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 -961874181 -589629441 -202714187 -33687726\n            246352127 -1125919869 1090470655 1441756927</internalNodes>\n          <leafValues>\n            -2.9468271136283875e-01 2.9257065057754517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 -219161456 1561959797 -1157910723 -644253203\n            -37769852 -1175163461 -358812998 -1146105857</internalNodes>\n          <leafValues>\n            -2.2191908955574036e-01 3.5355353355407715e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 -1395773932 -19337 -872592385 -1082417169\n            -268501000 -203988001 -1360523750 -1430265925</internalNodes>\n          <leafValues>\n            -2.6642906665802002e-01 2.7330449223518372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 937245647 533051903 22876957 837784063 -113164289\n            1593942211 1207413693 1942338443</internalNodes>\n          <leafValues>\n            -3.1208184361457825e-01 2.1690289676189423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 -135270614 1911454511 -694266878 1894711038\n            1380414469 1078062543 -200939772 1616172018</internalNodes>\n          <leafValues>\n            -3.7340530753135681e-01 2.0424529910087585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 -673199910 2132653981 -1105191310 -1622098985\n            -279161640 1874615084 2066898922 -82575381</internalNodes>\n          <leafValues>\n            -2.7581161260604858e-01 2.3679631948471069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 -88609193 -764250339 -21964208 1785903000\n            -705804525 -281542881 -17301633 -29425689</internalNodes>\n          <leafValues>\n            -2.1142585575580597e-01 3.1125506758689880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 2117156824 2142892795 -1715733421 -1118208017\n            1981329130 -1132205343 -531030662 218086646</internalNodes>\n          <leafValues>\n            -3.1311789155006409e-01 2.2028388082981110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 657173799 1208409516 -304231172 -319884740\n            829234695 822389124 -1816709292 -725510</internalNodes>\n          <leafValues>\n            -3.4273931384086609e-01 1.9222305715084076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 -102301694 -135807070 -1880672401 -253298777\n            -354657254 -100668629 2011055773 -155453461</internalNodes>\n          <leafValues>\n            -2.4226696789264679e-01 2.7088710665702820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 215240020 -1148310119 -707214049 -1112003969\n            1860719544 -6638593 -4317491 -1414921888</internalNodes>\n          <leafValues>\n            -3.1184914708137512e-01 2.1366736292839050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 -873476105 -30229647 -168296643 -1682912767\n            161284371 -1972125919 -12305 -268965957</internalNodes>\n          <leafValues>\n            -2.1284404397010803e-01 3.0867013335227966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -449986302 74968807 2145360303 20911369 1088274818\n            1642837031 -1026366551 53429507</internalNodes>\n          <leafValues>\n            -3.2960832118988037e-01 1.9843052327632904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 -294473945 1289282231 -69736418 -366809570\n            585961254 -894112782 -352349116 -857431116</internalNodes>\n          <leafValues>\n            -3.4131202101707458e-01 1.7822383344173431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 -260075316 810653599 -307212416 -1090154618\n            1085218542 2014454434 -889360754 840974879</internalNodes>\n          <leafValues>\n            -2.8617727756500244e-01 2.1801990270614624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 683352887 144804986 883838777 -470815534 749351701\n            -1376201987 -1007927147 -269498899</internalNodes>\n          <leafValues>\n            -2.7213591337203979e-01 2.3029308021068573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 -221779237 2055449126 1356126973 1739434813\n            -69756111 -78052576 -724205593 927834891</internalNodes>\n          <leafValues>\n            -2.1148133277893066e-01 2.9901567101478577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 -327161337 -541288917 -1074706625 2069214763\n            1422886542 -570618263 1425911455 1965665867</internalNodes>\n          <leafValues>\n            -1.9790525734424591e-01 3.1719624996185303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 -286652406 -1499051796 -2055991469 557910223\n            226286607 -307013288 537285247 1340571263</internalNodes>\n          <leafValues>\n            -3.5588899254798889e-01 1.8802331387996674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 -440754172 -1969605175 -11230786 -1369112738\n            -164163787 -439228643 -440438364 -855854880</internalNodes>\n          <leafValues>\n            -3.3756810426712036e-01 1.8606249988079071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 -2103276886 1587028506 -1920974049 -382890163\n            -50953603 -625169247 -75998374 847320848</internalNodes>\n          <leafValues>\n            -3.3854812383651733e-01 1.8501213192939758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 -912264192 1437763456 -117442116 1477965101\n            -109596288 -782313675 -520249859 -174065925</internalNodes>\n          <leafValues>\n            -2.3874689638614655e-01 2.6692461967468262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 -74761 -1193108610 -1627717634 -1141359812\n            -1350594860 -1212204947 -1900803076 -68466436</internalNodes>\n          <leafValues>\n            -1.8434369564056396e-01 3.4898519515991211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 -806388957 -1603323478 -319904391 -1889144109\n            -1427144299 -1074553867 -1577597820 -822218338</internalNodes>\n          <leafValues>\n            -1.9554206728935242e-01 3.1441712379455566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 -495530405 -1200567737 -562818530 1426283955\n            -646798267 -42047966 -283939201 -15210669</internalNodes>\n          <leafValues>\n            -2.0684894919395447e-01 3.0842429399490356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 -204473205 -111677525 1659697788 -168822810\n            164468462 95878471 1418323918 -705698930</internalNodes>\n          <leafValues>\n            -1.5447042882442474e-01 4.0702703595161438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 332207055 1368372207 1371537916 1541155303\n            1377022927 1195687084 -845629564 -191055413</internalNodes>\n          <leafValues>\n            -2.6908680796623230e-01 2.3349469900131226e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 2095555624 -1858958714 880848550 -1086881165\n            1278302507 2017585116 -2100032289 83174071</internalNodes>\n          <leafValues>\n            -3.3865603804588318e-01 1.8762224912643433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 -1599264894 1347540775 548331985 566406079\n            -490018643 2125284619 -542620802 -507647254</internalNodes>\n          <leafValues>\n            -2.4964332580566406e-01 2.5305619835853577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 -928904029 -73474081 -431055591 -1365072480\n            1082731439 -1163105435 -401696790 -331068832</internalNodes>\n          <leafValues>\n            -2.4641251564025879e-01 2.5806349515914917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 -1551324256 227211248 -139191220 -1912739520\n            1712117749 1864425601 1605297047 232734801</internalNodes>\n          <leafValues>\n            -3.6956688761711121e-01 1.7259617149829865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 2062683840 -1171226870 -634334626 -42988729\n            -177907627 1819501884 -1554858149 -81568901</internalNodes>\n          <leafValues>\n            -2.8280401229858398e-01 2.3210345208644867e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 -52896752 2073648803 -104703392 -1877326687\n            1482183868 486564792 -1181155586 -1078764545</internalNodes>\n          <leafValues>\n            -2.6182973384857178e-01 2.4921841919422150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 931876834 -1689820513 -175925869 295803187\n            1288847768 -1394638455 -527053926 -1609099725</internalNodes>\n          <leafValues>\n            -2.8890526294708252e-01 2.2244787216186523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 674383927 640705886 -1980567045 775069703 941246324\n            -1074502869 821615185 -1439559299</internalNodes>\n          <leafValues>\n            -3.7707689404487610e-01 1.7476500570774078e-01</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rect>\n        0 0 2 2</rect></_>\n    <_>\n      <rect>\n        0 0 3 4</rect></_>\n    <_>\n      <rect>\n        0 0 5 3</rect></_>\n    <_>\n      <rect>\n        0 0 5 4</rect></_>\n    <_>\n      <rect>\n        0 0 6 3</rect></_>\n    <_>\n      <rect>\n        0 0 8 1</rect></_>\n    <_>\n      <rect>\n        0 1 2 3</rect></_>\n    <_>\n      <rect>\n        0 1 6 4</rect></_>\n    <_>\n      <rect>\n        0 2 8 5</rect></_>\n    <_>\n      <rect>\n        0 7 6 2</rect></_>\n    <_>\n      <rect>\n        0 9 2 2</rect></_>\n    <_>\n      <rect>\n        0 9 3 1</rect></_>\n    <_>\n      <rect>\n        0 9 5 3</rect></_>\n    <_>\n      <rect>\n        0 14 3 3</rect></_>\n    <_>\n      <rect>\n        0 15 2 2</rect></_>\n    <_>\n      <rect>\n        0 16 1 2</rect></_>\n    <_>\n      <rect>\n        0 17 2 2</rect></_>\n    <_>\n      <rect>\n        1 0 2 4</rect></_>\n    <_>\n      <rect>\n        1 0 5 3</rect></_>\n    <_>\n      <rect>\n        1 0 7 1</rect></_>\n    <_>\n      <rect>\n        1 6 2 1</rect></_>\n    <_>\n      <rect>\n        1 9 1 1</rect></_>\n    <_>\n      <rect>\n        1 9 2 2</rect></_>\n    <_>\n      <rect>\n        1 15 1 2</rect></_>\n    <_>\n      <rect>\n        1 16 2 2</rect></_>\n    <_>\n      <rect>\n        2 0 2 2</rect></_>\n    <_>\n      <rect>\n        2 0 2 3</rect></_>\n    <_>\n      <rect>\n        2 0 3 4</rect></_>\n    <_>\n      <rect>\n        2 1 3 7</rect></_>\n    <_>\n      <rect>\n        2 4 1 1</rect></_>\n    <_>\n      <rect>\n        2 4 5 2</rect></_>\n    <_>\n      <rect>\n        2 4 5 4</rect></_>\n    <_>\n      <rect>\n        2 5 1 1</rect></_>\n    <_>\n      <rect>\n        2 6 2 2</rect></_>\n    <_>\n      <rect>\n        2 7 1 1</rect></_>\n    <_>\n      <rect>\n        2 7 2 1</rect></_>\n    <_>\n      <rect>\n        2 8 3 3</rect></_>\n    <_>\n      <rect>\n        2 9 1 1</rect></_>\n    <_>\n      <rect>\n        2 10 1 1</rect></_>\n    <_>\n      <rect>\n        2 10 2 1</rect></_>\n    <_>\n      <rect>\n        2 15 1 2</rect></_>\n    <_>\n      <rect>\n        2 19 2 1</rect></_>\n    <_>\n      <rect>\n        3 0 4 3</rect></_>\n    <_>\n      <rect>\n        3 0 6 6</rect></_>\n    <_>\n      <rect>\n        3 0 7 1</rect></_>\n    <_>\n      <rect>\n        3 2 4 2</rect></_>\n    <_>\n      <rect>\n        3 2 6 1</rect></_>\n    <_>\n      <rect>\n        3 4 2 2</rect></_>\n    <_>\n      <rect>\n        3 5 1 1</rect></_>\n    <_>\n      <rect>\n        3 6 1 1</rect></_>\n    <_>\n      <rect>\n        3 6 2 1</rect></_>\n    <_>\n      <rect>\n        3 6 2 3</rect></_>\n    <_>\n      <rect>\n        3 6 3 3</rect></_>\n    <_>\n      <rect>\n        3 6 6 1</rect></_>\n    <_>\n      <rect>\n        3 7 2 1</rect></_>\n    <_>\n      <rect>\n        3 7 2 2</rect></_>\n    <_>\n      <rect>\n        3 8 1 1</rect></_>\n    <_>\n      <rect>\n        3 8 6 1</rect></_>\n    <_>\n      <rect>\n        3 9 1 1</rect></_>\n    <_>\n      <rect>\n        3 9 1 2</rect></_>\n    <_>\n      <rect>\n        3 10 1 1</rect></_>\n    <_>\n      <rect>\n        3 10 1 2</rect></_>\n    <_>\n      <rect>\n        3 10 2 1</rect></_>\n    <_>\n      <rect>\n        3 11 1 1</rect></_>\n    <_>\n      <rect>\n        3 11 1 3</rect></_>\n    <_>\n      <rect>\n        3 13 3 3</rect></_>\n    <_>\n      <rect>\n        4 0 4 2</rect></_>\n    <_>\n      <rect>\n        4 0 6 7</rect></_>\n    <_>\n      <rect>\n        4 1 1 1</rect></_>\n    <_>\n      <rect>\n        4 1 4 3</rect></_>\n    <_>\n      <rect>\n        4 4 2 1</rect></_>\n    <_>\n      <rect>\n        4 6 1 1</rect></_>\n    <_>\n      <rect>\n        4 6 5 1</rect></_>\n    <_>\n      <rect>\n        4 6 5 4</rect></_>\n    <_>\n      <rect>\n        4 7 1 1</rect></_>\n    <_>\n      <rect>\n        4 7 2 2</rect></_>\n    <_>\n      <rect>\n        4 7 5 1</rect></_>\n    <_>\n      <rect>\n        4 8 1 1</rect></_>\n    <_>\n      <rect>\n        4 8 5 4</rect></_>\n    <_>\n      <rect>\n        4 9 1 1</rect></_>\n    <_>\n      <rect>\n        4 9 2 1</rect></_>\n    <_>\n      <rect>\n        4 9 3 5</rect></_>\n    <_>\n      <rect>\n        4 9 5 1</rect></_>\n    <_>\n      <rect>\n        4 10 1 1</rect></_>\n    <_>\n      <rect>\n        4 10 5 1</rect></_>\n    <_>\n      <rect>\n        4 12 1 2</rect></_>\n    <_>\n      <rect>\n        4 14 3 3</rect></_>\n    <_>\n      <rect>\n        4 15 1 1</rect></_>\n    <_>\n      <rect>\n        4 18 2 1</rect></_>\n    <_>\n      <rect>\n        5 2 5 3</rect></_>\n    <_>\n      <rect>\n        5 3 4 4</rect></_>\n    <_>\n      <rect>\n        5 6 1 1</rect></_>\n    <_>\n      <rect>\n        5 6 4 1</rect></_>\n    <_>\n      <rect>\n        5 7 1 1</rect></_>\n    <_>\n      <rect>\n        5 7 1 2</rect></_>\n    <_>\n      <rect>\n        5 7 2 2</rect></_>\n    <_>\n      <rect>\n        5 8 1 1</rect></_>\n    <_>\n      <rect>\n        5 8 3 4</rect></_>\n    <_>\n      <rect>\n        5 8 3 5</rect></_>\n    <_>\n      <rect>\n        5 8 5 1</rect></_>\n    <_>\n      <rect>\n        5 8 5 3</rect></_>\n    <_>\n      <rect>\n        5 9 1 1</rect></_>\n    <_>\n      <rect>\n        5 9 5 1</rect></_>\n    <_>\n      <rect>\n        5 10 1 1</rect></_>\n    <_>\n      <rect>\n        5 10 2 1</rect></_>\n    <_>\n      <rect>\n        5 10 5 1</rect></_>\n    <_>\n      <rect>\n        5 11 1 1</rect></_>\n    <_>\n      <rect>\n        5 13 1 3</rect></_>\n    <_>\n      <rect>\n        5 16 1 1</rect></_>\n    <_>\n      <rect>\n        5 18 1 2</rect></_>\n    <_>\n      <rect>\n        6 0 6 5</rect></_>\n    <_>\n      <rect>\n        6 1 1 2</rect></_>\n    <_>\n      <rect>\n        6 3 1 1</rect></_>\n    <_>\n      <rect>\n        6 3 6 3</rect></_>\n    <_>\n      <rect>\n        6 4 1 1</rect></_>\n    <_>\n      <rect>\n        6 5 1 1</rect></_>\n    <_>\n      <rect>\n        6 5 1 2</rect></_>\n    <_>\n      <rect>\n        6 6 2 2</rect></_>\n    <_>\n      <rect>\n        6 6 2 4</rect></_>\n    <_>\n      <rect>\n        6 6 3 3</rect></_>\n    <_>\n      <rect>\n        6 7 1 1</rect></_>\n    <_>\n      <rect>\n        6 7 1 2</rect></_>\n    <_>\n      <rect>\n        6 7 4 1</rect></_>\n    <_>\n      <rect>\n        6 7 4 4</rect></_>\n    <_>\n      <rect>\n        6 7 6 1</rect></_>\n    <_>\n      <rect>\n        6 8 1 4</rect></_>\n    <_>\n      <rect>\n        6 8 2 2</rect></_>\n    <_>\n      <rect>\n        6 9 1 1</rect></_>\n    <_>\n      <rect>\n        6 9 2 1</rect></_>\n    <_>\n      <rect>\n        6 9 2 2</rect></_>\n    <_>\n      <rect>\n        6 9 5 1</rect></_>\n    <_>\n      <rect>\n        6 9 6 2</rect></_>\n    <_>\n      <rect>\n        6 10 1 1</rect></_>\n    <_>\n      <rect>\n        6 11 1 1</rect></_>\n    <_>\n      <rect>\n        6 13 1 1</rect></_>\n    <_>\n      <rect>\n        6 13 2 1</rect></_>\n    <_>\n      <rect>\n        6 18 1 2</rect></_>\n    <_>\n      <rect>\n        6 20 1 1</rect></_>\n    <_>\n      <rect>\n        7 0 3 1</rect></_>\n    <_>\n      <rect>\n        7 2 1 3</rect></_>\n    <_>\n      <rect>\n        7 3 4 5</rect></_>\n    <_>\n      <rect>\n        7 5 1 1</rect></_>\n    <_>\n      <rect>\n        7 5 2 1</rect></_>\n    <_>\n      <rect>\n        7 6 1 1</rect></_>\n    <_>\n      <rect>\n        7 7 1 2</rect></_>\n    <_>\n      <rect>\n        7 7 2 4</rect></_>\n    <_>\n      <rect>\n        7 8 1 1</rect></_>\n    <_>\n      <rect>\n        7 8 1 2</rect></_>\n    <_>\n      <rect>\n        7 8 2 4</rect></_>\n    <_>\n      <rect>\n        7 9 1 1</rect></_>\n    <_>\n      <rect>\n        7 16 1 1</rect></_>\n    <_>\n      <rect>\n        7 21 1 1</rect></_>\n    <_>\n      <rect>\n        7 21 2 1</rect></_>\n    <_>\n      <rect>\n        8 0 2 1</rect></_>\n    <_>\n      <rect>\n        8 0 3 1</rect></_>\n    <_>\n      <rect>\n        8 0 5 3</rect></_>\n    <_>\n      <rect>\n        8 3 1 1</rect></_>\n    <_>\n      <rect>\n        8 4 1 1</rect></_>\n    <_>\n      <rect>\n        8 5 1 1</rect></_>\n    <_>\n      <rect>\n        8 5 1 2</rect></_>\n    <_>\n      <rect>\n        8 7 3 4</rect></_>\n    <_>\n      <rect>\n        8 8 1 1</rect></_>\n    <_>\n      <rect>\n        8 9 1 1</rect></_>\n    <_>\n      <rect>\n        8 9 3 5</rect></_>\n    <_>\n      <rect>\n        8 11 1 1</rect></_>\n    <_>\n      <rect>\n        8 14 1 1</rect></_>\n    <_>\n      <rect>\n        8 19 1 1</rect></_>\n    <_>\n      <rect>\n        8 20 1 1</rect></_>\n    <_>\n      <rect>\n        8 21 1 1</rect></_>\n    <_>\n      <rect>\n        9 0 2 3</rect></_>\n    <_>\n      <rect>\n        9 1 2 1</rect></_>\n    <_>\n      <rect>\n        9 5 2 1</rect></_>\n    <_>\n      <rect>\n        9 5 2 3</rect></_>\n    <_>\n      <rect>\n        9 5 4 1</rect></_>\n    <_>\n      <rect>\n        9 7 1 1</rect></_>\n    <_>\n      <rect>\n        9 9 1 1</rect></_>\n    <_>\n      <rect>\n        9 11 1 1</rect></_>\n    <_>\n      <rect>\n        9 12 2 4</rect></_>\n    <_>\n      <rect>\n        9 15 1 1</rect></_>\n    <_>\n      <rect>\n        9 17 1 1</rect></_>\n    <_>\n      <rect>\n        9 18 1 2</rect></_>\n    <_>\n      <rect>\n        9 20 1 1</rect></_>\n    <_>\n      <rect>\n        10 0 2 2</rect></_>\n    <_>\n      <rect>\n        10 6 3 3</rect></_>\n    <_>\n      <rect>\n        10 7 1 1</rect></_>\n    <_>\n      <rect>\n        10 8 1 1</rect></_>\n    <_>\n      <rect>\n        10 9 1 1</rect></_>\n    <_>\n      <rect>\n        10 11 1 1</rect></_>\n    <_>\n      <rect>\n        10 12 1 1</rect></_>\n    <_>\n      <rect>\n        10 15 1 1</rect></_>\n    <_>\n      <rect>\n        10 20 1 1</rect></_>\n    <_>\n      <rect>\n        10 21 1 1</rect></_>\n    <_>\n      <rect>\n        11 0 4 4</rect></_>\n    <_>\n      <rect>\n        11 1 4 4</rect></_>\n    <_>\n      <rect>\n        11 3 1 1</rect></_>\n    <_>\n      <rect>\n        11 4 3 1</rect></_>\n    <_>\n      <rect>\n        11 6 3 6</rect></_>\n    <_>\n      <rect>\n        11 7 1 1</rect></_>\n    <_>\n      <rect>\n        11 8 1 1</rect></_>\n    <_>\n      <rect>\n        11 9 1 1</rect></_>\n    <_>\n      <rect>\n        11 9 2 3</rect></_>\n    <_>\n      <rect>\n        11 10 1 1</rect></_>\n    <_>\n      <rect>\n        11 11 1 1</rect></_>\n    <_>\n      <rect>\n        11 12 2 3</rect></_>\n    <_>\n      <rect>\n        11 13 1 1</rect></_>\n    <_>\n      <rect>\n        11 15 3 1</rect></_>\n    <_>\n      <rect>\n        11 20 1 1</rect></_>\n    <_>\n      <rect>\n        11 21 1 1</rect></_>\n    <_>\n      <rect>\n        12 3 1 1</rect></_>\n    <_>\n      <rect>\n        12 5 1 1</rect></_>\n    <_>\n      <rect>\n        12 5 2 3</rect></_>\n    <_>\n      <rect>\n        12 5 3 3</rect></_>\n    <_>\n      <rect>\n        12 6 1 1</rect></_>\n    <_>\n      <rect>\n        12 7 2 4</rect></_>\n    <_>\n      <rect>\n        12 8 1 1</rect></_>\n    <_>\n      <rect>\n        12 8 2 2</rect></_>\n    <_>\n      <rect>\n        12 8 2 3</rect></_>\n    <_>\n      <rect>\n        12 9 1 1</rect></_>\n    <_>\n      <rect>\n        12 10 2 3</rect></_>\n    <_>\n      <rect>\n        12 11 1 1</rect></_>\n    <_>\n      <rect>\n        12 16 1 1</rect></_>\n    <_>\n      <rect>\n        12 17 1 1</rect></_>\n    <_>\n      <rect>\n        12 18 1 1</rect></_>\n    <_>\n      <rect>\n        12 18 1 2</rect></_>\n    <_>\n      <rect>\n        12 20 1 1</rect></_>\n    <_>\n      <rect>\n        12 21 1 1</rect></_>\n    <_>\n      <rect>\n        13 0 3 3</rect></_>\n    <_>\n      <rect>\n        13 3 1 1</rect></_>\n    <_>\n      <rect>\n        13 4 1 1</rect></_>\n    <_>\n      <rect>\n        13 5 1 1</rect></_>\n    <_>\n      <rect>\n        13 6 2 3</rect></_>\n    <_>\n      <rect>\n        13 7 3 2</rect></_>\n    <_>\n      <rect>\n        13 8 1 1</rect></_>\n    <_>\n      <rect>\n        13 9 1 1</rect></_>\n    <_>\n      <rect>\n        13 10 1 1</rect></_>\n    <_>\n      <rect>\n        13 10 2 1</rect></_>\n    <_>\n      <rect>\n        13 11 1 1</rect></_>\n    <_>\n      <rect>\n        13 13 1 1</rect></_>\n    <_>\n      <rect>\n        13 19 1 1</rect></_>\n    <_>\n      <rect>\n        13 20 1 1</rect></_>\n    <_>\n      <rect>\n        13 21 1 1</rect></_>\n    <_>\n      <rect>\n        14 0 3 4</rect></_>\n    <_>\n      <rect>\n        14 3 1 2</rect></_>\n    <_>\n      <rect>\n        14 3 2 1</rect></_>\n    <_>\n      <rect>\n        14 4 1 1</rect></_>\n    <_>\n      <rect>\n        14 5 1 1</rect></_>\n    <_>\n      <rect>\n        14 6 2 3</rect></_>\n    <_>\n      <rect>\n        14 7 1 3</rect></_>\n    <_>\n      <rect>\n        14 7 2 2</rect></_>\n    <_>\n      <rect>\n        14 8 1 1</rect></_>\n    <_>\n      <rect>\n        14 8 1 2</rect></_>\n    <_>\n      <rect>\n        14 9 1 1</rect></_>\n    <_>\n      <rect>\n        14 9 2 1</rect></_>\n    <_>\n      <rect>\n        14 13 1 1</rect></_>\n    <_>\n      <rect>\n        14 21 1 1</rect></_>\n    <_>\n      <rect>\n        15 0 3 4</rect></_>\n    <_>\n      <rect>\n        15 1 1 2</rect></_>\n    <_>\n      <rect>\n        15 2 1 2</rect></_>\n    <_>\n      <rect>\n        15 5 1 1</rect></_>\n    <_>\n      <rect>\n        15 6 2 1</rect></_>\n    <_>\n      <rect>\n        15 6 2 2</rect></_>\n    <_>\n      <rect>\n        15 7 1 1</rect></_>\n    <_>\n      <rect>\n        15 7 1 2</rect></_>\n    <_>\n      <rect>\n        15 7 2 2</rect></_>\n    <_>\n      <rect>\n        15 8 1 1</rect></_>\n    <_>\n      <rect>\n        15 9 1 1</rect></_>\n    <_>\n      <rect>\n        15 9 1 5</rect></_>\n    <_>\n      <rect>\n        15 9 2 1</rect></_>\n    <_>\n      <rect>\n        15 15 3 3</rect></_>\n    <_>\n      <rect>\n        15 17 1 1</rect></_>\n    <_>\n      <rect>\n        16 4 1 1</rect></_>\n    <_>\n      <rect>\n        16 6 1 1</rect></_>\n    <_>\n      <rect>\n        16 7 1 1</rect></_>\n    <_>\n      <rect>\n        16 7 1 2</rect></_>\n    <_>\n      <rect>\n        16 7 2 1</rect></_>\n    <_>\n      <rect>\n        16 7 2 2</rect></_>\n    <_>\n      <rect>\n        16 8 1 1</rect></_>\n    <_>\n      <rect>\n        16 10 1 1</rect></_>\n    <_>\n      <rect>\n        16 10 2 1</rect></_>\n    <_>\n      <rect>\n        16 17 1 1</rect></_>\n    <_>\n      <rect>\n        16 17 1 2</rect></_>\n    <_>\n      <rect>\n        16 18 1 1</rect></_>\n    <_>\n      <rect>\n        17 4 2 2</rect></_>\n    <_>\n      <rect>\n        17 5 1 1</rect></_>\n    <_>\n      <rect>\n        17 6 2 1</rect></_>\n    <_>\n      <rect>\n        17 6 2 2</rect></_>\n    <_>\n      <rect>\n        17 7 1 1</rect></_>\n    <_>\n      <rect>\n        17 7 1 2</rect></_>\n    <_>\n      <rect>\n        17 8 1 1</rect></_>\n    <_>\n      <rect>\n        17 8 2 1</rect></_>\n    <_>\n      <rect>\n        17 9 1 1</rect></_>\n    <_>\n      <rect>\n        17 10 1 1</rect></_>\n    <_>\n      <rect>\n        17 10 2 2</rect></_>\n    <_>\n      <rect>\n        17 11 1 1</rect></_>\n    <_>\n      <rect>\n        17 12 1 2</rect></_>\n    <_>\n      <rect>\n        17 13 1 2</rect></_>\n    <_>\n      <rect>\n        17 13 1 3</rect></_>\n    <_>\n      <rect>\n        17 21 2 1</rect></_>\n    <_>\n      <rect>\n        18 0 2 2</rect></_>\n    <_>\n      <rect>\n        18 4 1 2</rect></_>\n    <_>\n      <rect>\n        18 6 1 1</rect></_>\n    <_>\n      <rect>\n        18 8 2 2</rect></_>\n    <_>\n      <rect>\n        18 9 1 1</rect></_>\n    <_>\n      <rect>\n        18 9 1 2</rect></_>\n    <_>\n      <rect>\n        18 9 1 3</rect></_>\n    <_>\n      <rect>\n        18 10 1 1</rect></_>\n    <_>\n      <rect>\n        18 11 1 2</rect></_>\n    <_>\n      <rect>\n        18 12 1 1</rect></_>\n    <_>\n      <rect>\n        18 13 1 2</rect></_>\n    <_>\n      <rect>\n        18 17 2 2</rect></_>\n    <_>\n      <rect>\n        18 18 1 2</rect></_>\n    <_>\n      <rect>\n        18 19 2 1</rect></_>\n    <_>\n      <rect>\n        19 0 1 1</rect></_>\n    <_>\n      <rect>\n        19 6 1 1</rect></_>\n    <_>\n      <rect>\n        19 9 1 1</rect></_>\n    <_>\n      <rect>\n        19 9 1 2</rect></_>\n    <_>\n      <rect>\n        19 10 1 4</rect></_>\n    <_>\n      <rect>\n        19 12 1 2</rect></_>\n    <_>\n      <rect>\n        20 10 1 1</rect></_>\n    <_>\n      <rect>\n        20 15 1 2</rect></_>\n    <_>\n      <rect>\n        21 10 1 1</rect></_>\n    <_>\n      <rect>\n        21 14 1 2</rect></_>\n    <_>\n      <rect>\n        21 15 1 3</rect></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/lbpcascades/lbpcascade_frontalface.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<!--\r\nnumber of positive samples 3000\r\nnumber of negative samples 1500\r\n-->\r\n<opencv_storage>\r\n<cascade type_id=\"opencv-cascade-classifier\">\r\n  <stageType>BOOST</stageType>\r\n  <featureType>LBP</featureType>\r\n  <height>24</height>\r\n  <width>24</width>\r\n  <stageParams>\r\n    <boostType>GAB</boostType>\r\n    <minHitRate>0.9950000047683716</minHitRate>\r\n    <maxFalseAlarm>0.5000000000000000</maxFalseAlarm>\r\n    <weightTrimRate>0.9500000000000000</weightTrimRate>\r\n    <maxDepth>1</maxDepth>\r\n    <maxWeakCount>100</maxWeakCount></stageParams>\r\n  <featureParams>\r\n    <maxCatCount>256</maxCatCount></featureParams>\r\n  <stageNum>20</stageNum>\r\n  <stages>\r\n    <!-- stage 0 -->\r\n    <_>\r\n      <maxWeakCount>3</maxWeakCount>\r\n      <stageThreshold>-0.7520892024040222</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 46 -67130709 -21569 -1426120013 -1275125205 -21585\r\n            -16385 587145899 -24005</internalNodes>\r\n          <leafValues>\r\n            -0.6543210148811340 0.8888888955116272</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 13 -163512766 -769593758 -10027009 -262145 -514457854\r\n            -193593353 -524289 -1</internalNodes>\r\n          <leafValues>\r\n            -0.7739216089248657 0.7278633713722229</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 2 -363936790 -893203669 -1337948010 -136907894\r\n            1088782736 -134217726 -741544961 -1590337</internalNodes>\r\n          <leafValues>\r\n            -0.7068563103675842 0.6761534214019775</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 1 -->\r\n    <_>\r\n      <maxWeakCount>4</maxWeakCount>\r\n      <stageThreshold>-0.4872078299522400</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 84 2147483647 1946124287 -536870913 2147450879\r\n            738132490 1061101567 243204619 2147446655</internalNodes>\r\n          <leafValues>\r\n            -0.8083735704421997 0.7685696482658386</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 21 2147483647 263176079 1879048191 254749487 1879048191\r\n            -134252545 -268435457 801111999</internalNodes>\r\n          <leafValues>\r\n            -0.7698410153388977 0.6592915654182434</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 106 -98110272 1610939566 -285484400 -850010381\r\n            -189334372 -1671954433 -571026695 -262145</internalNodes>\r\n          <leafValues>\r\n            -0.7506558895111084 0.5444605946540833</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 48 -798690576 -131075 1095771153 -237144073 -65569 -1\r\n            -216727745 -69206049</internalNodes>\r\n          <leafValues>\r\n            -0.7775990366935730 0.5465461611747742</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 2 -->\r\n    <_>\r\n      <maxWeakCount>4</maxWeakCount>\r\n      <stageThreshold>-1.1592328548431396</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 47 -21585 -20549 -100818262 -738254174 -20561 -36865\r\n            -151016790 -134238549</internalNodes>\r\n          <leafValues>\r\n            -0.5601882934570313 0.7743113040924072</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 12 -286003217 183435247 -268994614 -421330945\r\n            -402686081 1090387966 -286785545 -402653185</internalNodes>\r\n          <leafValues>\r\n            -0.6124526262283325 0.6978127956390381</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 26 -50347012 970882927 -50463492 -1253377 -134218251\r\n            -50364513 -33619992 -172490753</internalNodes>\r\n          <leafValues>\r\n            -0.6114496588706970 0.6537628173828125</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 8 -273 -135266321 1877977738 -2088243418 -134217987\r\n            2146926575 -18910642 1095231247</internalNodes>\r\n          <leafValues>\r\n            -0.6854077577590942 0.5403239130973816</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 3 -->\r\n    <_>\r\n      <maxWeakCount>5</maxWeakCount>\r\n      <stageThreshold>-0.7562355995178223</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 96 -1273 1870659519 -20971602 -67633153 -134250731\r\n            2004875127 -250 -150995969</internalNodes>\r\n          <leafValues>\r\n            -0.4051094949245453 0.7584033608436585</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 33 -868162224 -76810262 -4262145 -257 1465211989\r\n            -268959873 -2656269 -524289</internalNodes>\r\n          <leafValues>\r\n            -0.7388162612915039 0.5340843200683594</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 57 -12817 -49 -541103378 -152950 -38993 -20481 -1153876\r\n            -72478976</internalNodes>\r\n          <leafValues>\r\n            -0.6582943797111511 0.5339496731758118</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 125 -269484161 -452984961 -319816180 -1594032130 -2111\r\n            -990117891 -488975296 -520947741</internalNodes>\r\n          <leafValues>\r\n            -0.5981323719024658 0.5323504805564880</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 53 557787431 670265215 -1342193665 -1075892225\r\n            1998528318 1056964607 -33570977 -1</internalNodes>\r\n          <leafValues>\r\n            -0.6498787999153137 0.4913350641727448</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 4 -->\r\n    <_>\r\n      <maxWeakCount>5</maxWeakCount>\r\n      <stageThreshold>-0.8085358142852783</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 60 -536873708 880195381 -16842788 -20971521 -176687276\r\n            -168427659 -16777260 -33554626</internalNodes>\r\n          <leafValues>\r\n            -0.5278195738792419 0.6946372389793396</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 7 -1 -62981529 -1090591130 805330978 -8388827 -41945787\r\n            -39577 -531118985</internalNodes>\r\n          <leafValues>\r\n            -0.5206505060195923 0.6329920291900635</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 98 -725287348 1347747543 -852489 -16809993 1489881036\r\n            -167903241 -1 -1</internalNodes>\r\n          <leafValues>\r\n            -0.7516061067581177 0.4232024252414703</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 44 -32777 1006582562 -65 935312171 -8388609 -1078198273\r\n            -1 733886267</internalNodes>\r\n          <leafValues>\r\n            -0.7639313936233521 0.4123568832874298</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 24 -85474705 2138828511 -1036436754 817625855\r\n            1123369029 -58796809 -1013468481 -194513409</internalNodes>\r\n          <leafValues>\r\n            -0.5123769044876099 0.5791834592819214</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 5 -->\r\n    <_>\r\n      <maxWeakCount>5</maxWeakCount>\r\n      <stageThreshold>-0.5549971461296082</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 42 -17409 -20481 -268457797 -134239493 -17473 -1 -21829\r\n            -21846</internalNodes>\r\n          <leafValues>\r\n            -0.3763174116611481 0.7298233509063721</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 6 -805310737 -2098262358 -269504725 682502698\r\n            2147483519 1740574719 -1090519233 -268472385</internalNodes>\r\n          <leafValues>\r\n            -0.5352765917778015 0.5659480094909668</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 61 -67109678 -6145 -8 -87884584 -20481 -1073762305\r\n            -50856216 -16849696</internalNodes>\r\n          <leafValues>\r\n            -0.5678374171257019 0.4961479902267456</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 123 -138428633 1002418167 -1359008245 -1908670465\r\n            -1346685918 910098423 -1359010520 -1346371657</internalNodes>\r\n          <leafValues>\r\n            -0.5706262588500977 0.4572288393974304</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 9 -89138513 -4196353 1256531674 -1330665426 1216308261\r\n            -36190633 33498198 -151796633</internalNodes>\r\n          <leafValues>\r\n            -0.5344601869583130 0.4672054052352905</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 6 -->\r\n    <_>\r\n      <maxWeakCount>5</maxWeakCount>\r\n      <stageThreshold>-0.8776460289955139</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 105 1073769576 206601725 -34013449 -33554433 -789514004\r\n            -101384321 -690225153 -264193</internalNodes>\r\n          <leafValues>\r\n            -0.7700348496437073 0.5943940877914429</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 30 -1432340997 -823623681 -49153 -34291724 -269484035\r\n            -1342767105 -1078198273 -1277955</internalNodes>\r\n          <leafValues>\r\n            -0.5043668746948242 0.6151274442672730</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 35 -1067385040 -195758209 -436748425 -134217731\r\n            -50855988 -129 -1 -1</internalNodes>\r\n          <leafValues>\r\n            -0.6808040738105774 0.4667325913906097</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 119 832534325 -34111555 -26050561 -423659521 -268468364\r\n            2105014143 -2114244 -17367185</internalNodes>\r\n          <leafValues>\r\n            -0.4927591383457184 0.5401885509490967</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 82 -1089439888 -1080524865 2143059967 -1114121\r\n            -1140949004 -3 -2361356 -739516</internalNodes>\r\n          <leafValues>\r\n            -0.6445107460021973 0.4227822124958038</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 7 -->\r\n    <_>\r\n      <maxWeakCount>6</maxWeakCount>\r\n      <stageThreshold>-1.1139287948608398</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 52 -1074071553 -1074003969 -1 -1280135430 -5324817 -1\r\n            -335548482 582134442</internalNodes>\r\n          <leafValues>\r\n            -0.5307556986808777 0.6258179545402527</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 99 -706937396 -705364068 -540016724 -570495027\r\n            -570630659 -587857963 -33628164 -35848193</internalNodes>\r\n          <leafValues>\r\n            -0.5227634310722351 0.5049746036529541</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 18 -2035630093 42119158 -268503053 -1671444 261017599\r\n            1325432815 1954394111 -805306449</internalNodes>\r\n          <leafValues>\r\n            -0.4983572661876679 0.5106441378593445</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 111 -282529488 -1558073088 1426018736 -170526448\r\n            -546832487 -5113037 -34243375 -570427929</internalNodes>\r\n          <leafValues>\r\n            -0.4990860521793366 0.5060507059097290</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 92 1016332500 -606301707 915094269 -1080086049\r\n            -1837027144 -1361600280 2147318747 1067975613</internalNodes>\r\n          <leafValues>\r\n            -0.5695009231567383 0.4460467398166657</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 51 -656420166 -15413034 -141599534 -603435836\r\n            1505950458 -787556946 -79823438 -1326199134</internalNodes>\r\n          <leafValues>\r\n            -0.6590405106544495 0.3616424500942230</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 8 -->\r\n    <_>\r\n      <maxWeakCount>7</maxWeakCount>\r\n      <stageThreshold>-0.8243625760078430</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 28 -901591776 -201916417 -262 -67371009 -143312112\r\n            -524289 -41943178 -1</internalNodes>\r\n          <leafValues>\r\n            -0.4972776770591736 0.6027074456214905</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 112 -4507851 -411340929 -268437513 -67502145 -17350859\r\n            -32901 -71344315 -29377</internalNodes>\r\n          <leafValues>\r\n            -0.4383158981800079 0.5966237187385559</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 69 -75894785 -117379438 -239063587 -12538500 1485072126\r\n            2076233213 2123118847 801906927</internalNodes>\r\n          <leafValues>\r\n            -0.6386105418205261 0.3977999985218048</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 19 -823480413 786628589 -16876049 -1364262914 242165211\r\n            1315930109 -696268833 -455082829</internalNodes>\r\n          <leafValues>\r\n            -0.5512794256210327 0.4282079637050629</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 73 -521411968 6746762 -1396236286 -2038436114\r\n            -185612509 57669627 -143132877 -1041235973</internalNodes>\r\n          <leafValues>\r\n            -0.6418755054473877 0.3549866080284119</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 126 -478153869 1076028979 -1645895615 1365298272\r\n            -557859073 -339771473 1442574528 -1058802061</internalNodes>\r\n          <leafValues>\r\n            -0.4841901361942291 0.4668019413948059</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 45 -246350404 -1650402048 -1610612745 -788400696\r\n            1467604861 -2787397 1476263935 -4481349</internalNodes>\r\n          <leafValues>\r\n            -0.5855734348297119 0.3879135847091675</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 9 -->\r\n    <_>\r\n      <maxWeakCount>7</maxWeakCount>\r\n      <stageThreshold>-1.2237116098403931</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 114 -24819 1572863935 -16809993 -67108865 2146778388\r\n            1433927541 -268608444 -34865205</internalNodes>\r\n          <leafValues>\r\n            -0.2518476545810700 0.7088654041290283</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 97 -1841359 -134271049 -32769 -5767369 -1116675 -2185\r\n            -8231 -33603327</internalNodes>\r\n          <leafValues>\r\n            -0.4303432404994965 0.5283288359642029</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 25 -1359507589 -1360593090 -1073778729 -269553812\r\n            -809512977 1744707583 -41959433 -134758978</internalNodes>\r\n          <leafValues>\r\n            -0.4259553551673889 0.5440809130668640</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 34 729753407 -134270989 -1140907329 -235200777\r\n            658456383 2147467263 -1140900929 -16385</internalNodes>\r\n          <leafValues>\r\n            -0.5605589151382446 0.4220733344554901</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 134 -310380553 -420675595 -193005472 -353568129\r\n            1205338070 -990380036 887604324 -420544526</internalNodes>\r\n          <leafValues>\r\n            -0.5192656517028809 0.4399855434894562</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 16 -1427119361 1978920959 -287119734 -487068946\r\n            114759245 -540578051 -707510259 -671660453</internalNodes>\r\n          <leafValues>\r\n            -0.5013077259063721 0.4570254683494568</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 74 -738463762 -889949281 -328301948 -121832450\r\n            -1142658284 -1863576559 2146417353 -263185</internalNodes>\r\n          <leafValues>\r\n            -0.4631414115428925 0.4790246188640595</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 10 -->\r\n    <_>\r\n      <maxWeakCount>7</maxWeakCount>\r\n      <stageThreshold>-0.5544230937957764</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 113 -76228780 -65538 -1 -67174401 -148007 -33 -221796\r\n            -272842924</internalNodes>\r\n          <leafValues>\r\n            -0.3949716091156006 0.6082032322883606</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 110 369147696 -1625232112 2138570036 -1189900 790708019\r\n            -1212613127 799948719 -4456483</internalNodes>\r\n          <leafValues>\r\n            -0.4855885505676270 0.4785369932651520</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 37 784215839 -290015241 536832799 -402984963\r\n            -1342414991 -838864897 -176769 -268456129</internalNodes>\r\n          <leafValues>\r\n            -0.4620285332202911 0.4989669024944305</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 41 -486418688 -171915327 -340294900 -21938 -519766032\r\n            -772751172 -73096060 -585322623</internalNodes>\r\n          <leafValues>\r\n            -0.6420643329620361 0.3624351918697357</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 117 -33554953 -475332625 -1423463824 -2077230421\r\n            -4849669 -2080505925 -219032928 -1071915349</internalNodes>\r\n          <leafValues>\r\n            -0.4820112884044647 0.4632140696048737</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 65 -834130468 -134217476 -1349314083 -1073803559\r\n            -619913764 -1449131844 -1386890321 -1979118423</internalNodes>\r\n          <leafValues>\r\n            -0.4465552568435669 0.5061788558959961</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 56 -285249779 1912569855 -16530 -1731022870 -1161904146\r\n            -1342177297 -268439634 -1464078708</internalNodes>\r\n          <leafValues>\r\n            -0.5190586447715759 0.4441480338573456</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 11 -->\r\n    <_>\r\n      <maxWeakCount>7</maxWeakCount>\r\n      <stageThreshold>-0.7161560654640198</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 20 1246232575 1078001186 -10027057 60102 -277348353\r\n            -43646987 -1210581153 1195769615</internalNodes>\r\n          <leafValues>\r\n            -0.4323809444904327 0.5663768053054810</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 15 -778583572 -612921106 -578775890 -4036478\r\n            -1946580497 -1164766570 -1986687009 -12103599</internalNodes>\r\n          <leafValues>\r\n            -0.4588732719421387 0.4547033011913300</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 129 -1073759445 2013231743 -1363169553 -1082459201\r\n            -1414286549 868185983 -1356133589 -1077936257</internalNodes>\r\n          <leafValues>\r\n            -0.5218553543090820 0.4111092388629913</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 102 -84148365 -2093417722 -1204850272 564290299\r\n            -67121221 -1342177350 -1309195902 -776734797</internalNodes>\r\n          <leafValues>\r\n            -0.4920000731945038 0.4326725304126740</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 88 -25694458 67104495 -290216278 -168563037 2083877442\r\n            1702788383 -144191964 -234882162</internalNodes>\r\n          <leafValues>\r\n            -0.4494568109512329 0.4448510706424713</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 59 -857980836 904682741 -1612267521 232279415\r\n            1550862252 -574825221 -357380888 -4579409</internalNodes>\r\n          <leafValues>\r\n            -0.5180826783180237 0.3888972699642181</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 27 -98549440 -137838400 494928389 -246013630 939541351\r\n            -1196072350 -620603549 2137216273</internalNodes>\r\n          <leafValues>\r\n            -0.6081240773200989 0.3333222270011902</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 12 -->\r\n    <_>\r\n      <maxWeakCount>8</maxWeakCount>\r\n      <stageThreshold>-0.6743940711021423</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 29 -150995201 2071191945 -1302151626 536934335\r\n            -1059008937 914128709 1147328110 -268369925</internalNodes>\r\n          <leafValues>\r\n            -0.1790193915367127 0.6605972051620483</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 128 -134509479 1610575703 -1342177289 1861484541\r\n            -1107833788 1577058173 -333558568 -136319041</internalNodes>\r\n          <leafValues>\r\n            -0.3681024610996246 0.5139749646186829</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 70 -1 1060154476 -1090984524 -630918524 -539492875\r\n            779616255 -839568424 -321</internalNodes>\r\n          <leafValues>\r\n            -0.3217232525348663 0.6171553134918213</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 4 -269562385 -285029906 -791084350 -17923776 235286671\r\n            1275504943 1344390399 -966276889</internalNodes>\r\n          <leafValues>\r\n            -0.4373284578323364 0.4358185231685638</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 76 17825984 -747628419 595427229 1474759671 575672208\r\n            -1684005538 872217086 -1155858277</internalNodes>\r\n          <leafValues>\r\n            -0.4404836893081665 0.4601220190525055</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 124 -336593039 1873735591 -822231622 -355795238\r\n            -470820869 -1997537409 -1057132384 -1015285005</internalNodes>\r\n          <leafValues>\r\n            -0.4294152259826660 0.4452161788940430</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 54 -834212130 -593694721 -322142257 -364892500\r\n            -951029539 -302125121 -1615106053 -79249765</internalNodes>\r\n          <leafValues>\r\n            -0.3973052501678467 0.4854526817798615</leafValues></_>\r\n        <!-- tree 7 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 95 1342144479 2147431935 -33554561 -47873 -855685912 -1\r\n            1988052447 536827383</internalNodes>\r\n          <leafValues>\r\n            -0.7054683566093445 0.2697997391223908</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 13 -->\r\n    <_>\r\n      <maxWeakCount>9</maxWeakCount>\r\n      <stageThreshold>-1.2042298316955566</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 39 1431368960 -183437936 -537002499 -137497097\r\n            1560590321 -84611081 -2097193 -513</internalNodes>\r\n          <leafValues>\r\n            -0.5905947685241699 0.5101932883262634</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 120 -1645259691 2105491231 2130706431 1458995007\r\n            -8567536 -42483883 -33780003 -21004417</internalNodes>\r\n          <leafValues>\r\n            -0.4449204802513123 0.4490709304809570</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 89 -612381022 -505806938 -362027516 -452985106\r\n            275854917 1920431639 -12600561 -134221825</internalNodes>\r\n          <leafValues>\r\n            -0.4693818688392639 0.4061094820499420</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 14 -805573153 -161 -554172679 -530519488 -16779441\r\n            2000682871 -33604275 -150997129</internalNodes>\r\n          <leafValues>\r\n            -0.3600351214408875 0.5056326985359192</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 67 6192 435166195 1467449341 2046691505 -1608493775\r\n            -4755729 -1083162625 -71365637</internalNodes>\r\n          <leafValues>\r\n            -0.4459891915321350 0.4132415652275085</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 86 -41689215 -3281034 1853357967 -420712635 -415924289\r\n            -270209208 -1088293113 -825311232</internalNodes>\r\n          <leafValues>\r\n            -0.4466069042682648 0.4135067760944367</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 80 -117391116 -42203396 2080374461 -188709 -542008165\r\n            -356831940 -1091125345 -1073796897</internalNodes>\r\n          <leafValues>\r\n            -0.3394956290721893 0.5658645033836365</leafValues></_>\r\n        <!-- tree 7 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 75 -276830049 1378714472 -1342181951 757272098\r\n            1073740607 -282199241 -415761549 170896931</internalNodes>\r\n          <leafValues>\r\n            -0.5346512198448181 0.3584479391574860</leafValues></_>\r\n        <!-- tree 8 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 55 -796075825 -123166849 2113667055 -217530421\r\n            -1107432194 -16385 -806359809 -391188771</internalNodes>\r\n          <leafValues>\r\n            -0.4379335641860962 0.4123645126819611</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 14 -->\r\n    <_>\r\n      <maxWeakCount>10</maxWeakCount>\r\n      <stageThreshold>-0.8402050137519836</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 71 -890246622 15525883 -487690486 47116238 -1212319899\r\n            -1291847681 -68159890 -469829921</internalNodes>\r\n          <leafValues>\r\n            -0.2670986354351044 0.6014143228530884</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 31 -1361180685 -1898008841 -1090588811 -285410071\r\n            -1074016265 -840443905 2147221487 -262145</internalNodes>\r\n          <leafValues>\r\n            -0.4149844348430634 0.4670888185501099</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 40 1426190596 1899364271 2142731795 -142607505\r\n            -508232452 -21563393 -41960001 -65</internalNodes>\r\n          <leafValues>\r\n            -0.4985891580581665 0.3719584941864014</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 109 -201337965 10543906 -236498096 -746195597\r\n            1974565825 -15204415 921907633 -190058309</internalNodes>\r\n          <leafValues>\r\n            -0.4568729996681213 0.3965812027454376</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 130 -595026732 -656401928 -268649235 -571490699\r\n            -440600392 -133131 -358810952 -2004088646</internalNodes>\r\n          <leafValues>\r\n            -0.4770836830139160 0.3862601518630981</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 66 941674740 -1107882114 1332789109 -67691015\r\n            -1360463693 -1556612430 -609108546 733546933</internalNodes>\r\n          <leafValues>\r\n            -0.4877715110778809 0.3778986334800720</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 49 -17114945 -240061474 1552871558 -82775604 -932393844\r\n            -1308544889 -532635478 -99042357</internalNodes>\r\n          <leafValues>\r\n            -0.3721654713153839 0.4994400143623352</leafValues></_>\r\n        <!-- tree 7 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 133 -655906006 1405502603 -939205164 1884929228\r\n            -498859222 559417357 -1928559445 -286264385</internalNodes>\r\n          <leafValues>\r\n            -0.3934195041656494 0.4769641458988190</leafValues></_>\r\n        <!-- tree 8 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 0 -335837777 1860677295 -90 -1946186226 931096183\r\n            251612987 2013265917 -671232197</internalNodes>\r\n          <leafValues>\r\n            -0.4323300719261169 0.4342164099216461</leafValues></_>\r\n        <!-- tree 9 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 103 37769424 -137772680 374692301 2002666345 -536176194\r\n            -1644484728 807009019 1069089930</internalNodes>\r\n          <leafValues>\r\n            -0.4993278682231903 0.3665378093719482</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 15 -->\r\n    <_>\r\n      <maxWeakCount>9</maxWeakCount>\r\n      <stageThreshold>-1.1974394321441650</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 43 -5505 2147462911 2143265466 -4511070 -16450 -257\r\n            -201348440 -71333206</internalNodes>\r\n          <leafValues>\r\n            -0.3310225307941437 0.5624626278877258</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 90 -136842268 -499330741 2015250980 -87107126\r\n            -641665744 -788524639 -1147864792 -134892563</internalNodes>\r\n          <leafValues>\r\n            -0.5266560912132263 0.3704403042793274</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 104 -146800880 -1780368555 2111170033 -140904684\r\n            -16777551 -1946681885 -1646463595 -839131947</internalNodes>\r\n          <leafValues>\r\n            -0.4171888828277588 0.4540435671806335</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 85 -832054034 -981663763 -301990281 -578814081\r\n            -932319000 -1997406723 -33555201 -69206017</internalNodes>\r\n          <leafValues>\r\n            -0.4556705355644226 0.3704262077808380</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 24 -118492417 -1209026825 1119023838 -1334313353\r\n            1112948738 -297319313 1378887291 -139469193</internalNodes>\r\n          <leafValues>\r\n            -0.4182529747486115 0.4267231225967407</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 78 -1714382628 -2353704 -112094959 -549613092\r\n            -1567058760 -1718550464 -342315012 -1074972227</internalNodes>\r\n          <leafValues>\r\n            -0.3625369668006897 0.4684656262397766</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 5 -85219702 316836394 -33279 1904970288 2117267315\r\n            -260901769 -621461759 -88607770</internalNodes>\r\n          <leafValues>\r\n            -0.4742925167083740 0.3689507246017456</leafValues></_>\r\n        <!-- tree 7 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 11 -294654041 -353603585 -1641159686 -50331921\r\n            -2080899877 1145569279 -143132713 -152044037</internalNodes>\r\n          <leafValues>\r\n            -0.3666271567344666 0.4580127298831940</leafValues></_>\r\n        <!-- tree 8 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 32 1887453658 -638545712 -1877976819 -34320972\r\n            -1071067983 -661345416 -583338277 1060190561</internalNodes>\r\n          <leafValues>\r\n            -0.4567637443542481 0.3894708156585693</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 16 -->\r\n    <_>\r\n      <maxWeakCount>9</maxWeakCount>\r\n      <stageThreshold>-0.5733128190040588</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 122 -994063296 1088745462 -318837116 -319881377\r\n            1102566613 1165490103 -121679694 -134744129</internalNodes>\r\n          <leafValues>\r\n            -0.4055117964744568 0.5487945079803467</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 68 -285233233 -538992907 1811935199 -369234005 -529\r\n            -20593 -20505 -1561401854</internalNodes>\r\n          <leafValues>\r\n            -0.3787897229194641 0.4532003402709961</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 58 -1335245632 1968917183 1940861695 536816369\r\n            -1226071367 -570908176 457026619 1000020667</internalNodes>\r\n          <leafValues>\r\n            -0.4258328974246979 0.4202791750431061</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 94 -1360318719 -1979797897 -50435249 -18646473\r\n            -608879292 -805306691 -269304244 -17840167</internalNodes>\r\n          <leafValues>\r\n            -0.4561023116111755 0.4002747833728790</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 87 2062765935 -16449 -1275080721 -16406 45764335\r\n            -1090552065 -772846337 -570464322</internalNodes>\r\n          <leafValues>\r\n            -0.4314672648906708 0.4086346626281738</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 127 -536896021 1080817663 -738234288 -965478709\r\n            -2082767969 1290855887 1993822934 -990381609</internalNodes>\r\n          <leafValues>\r\n            -0.4174543321132660 0.4249868988990784</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 3 -818943025 168730891 -293610428 -79249354 669224671\r\n            621166734 1086506807 1473768907</internalNodes>\r\n          <leafValues>\r\n            -0.4321364760398865 0.4090838730335236</leafValues></_>\r\n        <!-- tree 7 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 79 -68895696 -67107736 -1414315879 -841676168\r\n            -619843344 -1180610531 -1081990469 1043203389</internalNodes>\r\n          <leafValues>\r\n            -0.5018386244773865 0.3702533841133118</leafValues></_>\r\n        <!-- tree 8 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 116 -54002134 -543485719 -2124882422 -1437445858\r\n            -115617074 -1195787391 -1096024366 -2140472445</internalNodes>\r\n          <leafValues>\r\n            -0.5037505626678467 0.3564981222152710</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 17 -->\r\n    <_>\r\n      <maxWeakCount>9</maxWeakCount>\r\n      <stageThreshold>-0.4892596900463104</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 132 -67113211 2003808111 1862135111 846461923 -2752\r\n            2002237273 -273154752 1937223539</internalNodes>\r\n          <leafValues>\r\n            -0.2448196411132813 0.5689709186553955</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 62 1179423888 -78064940 -611839555 -539167899\r\n            -1289358360 -1650810108 -892540499 -1432827684</internalNodes>\r\n          <leafValues>\r\n            -0.4633283913135529 0.3587929606437683</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 23 -285212705 -78450761 -656212031 -264050110 -27787425\r\n            -1334349961 -547662981 -135796924</internalNodes>\r\n          <leafValues>\r\n            -0.3731099069118500 0.4290455579757690</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 77 341863476 403702016 -550588417 1600194541\r\n            -1080690735 951127993 -1388580949 -1153717473</internalNodes>\r\n          <leafValues>\r\n            -0.3658909499645233 0.4556473195552826</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 22 -586880702 -204831512 -100644596 -39319550\r\n            -1191150794 705692513 457203315 -75806957</internalNodes>\r\n          <leafValues>\r\n            -0.5214384198188782 0.3221037387847900</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 72 -416546870 545911370 -673716192 -775559454\r\n            -264113598 139424 -183369982 -204474641</internalNodes>\r\n          <leafValues>\r\n            -0.4289036989212036 0.4004956185817719</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 50 -1026505020 -589692154 -1740499937 -1563770497\r\n            1348491006 -60710713 -1109853489 -633909413</internalNodes>\r\n          <leafValues>\r\n            -0.4621542394161224 0.3832748532295227</leafValues></_>\r\n        <!-- tree 7 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 108 -1448872304 -477895040 -1778390608 -772418127\r\n            -1789923416 -1612057181 -805306693 -1415842113</internalNodes>\r\n          <leafValues>\r\n            -0.3711548447608948 0.4612701535224915</leafValues></_>\r\n        <!-- tree 8 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 92 407905424 -582449988 52654751 -1294472 -285103725\r\n            -74633006 1871559083 1057955850</internalNodes>\r\n          <leafValues>\r\n            -0.5180652141571045 0.3205870389938355</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 18 -->\r\n    <_>\r\n      <maxWeakCount>10</maxWeakCount>\r\n      <stageThreshold>-0.5911940932273865</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 81 4112 -1259563825 -846671428 -100902460 1838164148\r\n            -74153752 -90653988 -1074263896</internalNodes>\r\n          <leafValues>\r\n            -0.2592592537403107 0.5873016119003296</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 1 -285216785 -823206977 -1085589 -1081346 1207959293\r\n            1157103471 2097133565 -2097169</internalNodes>\r\n          <leafValues>\r\n            -0.3801195919513702 0.4718827307224274</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 121 -12465 -536875169 2147478367 2130706303 -37765492\r\n            -866124467 -318782328 -1392509185</internalNodes>\r\n          <leafValues>\r\n            -0.3509117066860199 0.5094807147979736</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 38 2147449663 -20741 -16794757 1945873146 -16710 -1\r\n            -8406341 -67663041</internalNodes>\r\n          <leafValues>\r\n            -0.4068757295608521 0.4130136370658875</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 17 -155191713 866117231 1651407483 548272812 -479201468\r\n            -447742449 1354229504 -261884429</internalNodes>\r\n          <leafValues>\r\n            -0.4557141065597534 0.3539792001247406</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 100 -225319378 -251682065 -492783986 -792341777\r\n            -1287261695 1393643841 -11274182 -213909521</internalNodes>\r\n          <leafValues>\r\n            -0.4117803275585175 0.4118592441082001</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 63 -382220122 -2002072729 -51404800 -371201558\r\n            -923011069 -2135301457 -2066104743 -1042557441</internalNodes>\r\n          <leafValues>\r\n            -0.4008397758007050 0.4034757018089294</leafValues></_>\r\n        <!-- tree 7 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 101 -627353764 -48295149 1581203952 -436258614\r\n            -105268268 -1435893445 -638126888 -1061107126</internalNodes>\r\n          <leafValues>\r\n            -0.5694189667701721 0.2964762747287750</leafValues></_>\r\n        <!-- tree 8 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 118 -8399181 1058107691 -621022752 -251003468 -12582915\r\n            -574619739 -994397789 -1648362021</internalNodes>\r\n          <leafValues>\r\n            -0.3195341229438782 0.5294018983840942</leafValues></_>\r\n        <!-- tree 9 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 92 -348343812 -1078389516 1717960437 364735981\r\n            -1783841602 -4883137 -457572354 -1076950384</internalNodes>\r\n          <leafValues>\r\n            -0.3365339040756226 0.5067458748817444</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 19 -->\r\n    <_>\r\n      <maxWeakCount>10</maxWeakCount>\r\n      <stageThreshold>-0.7612916231155396</stageThreshold>\r\n      <weakClassifiers>\r\n        <!-- tree 0 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 10 -1976661318 -287957604 -1659497122 -782068 43591089\r\n            -453637880 1435470000 -1077438561</internalNodes>\r\n          <leafValues>\r\n            -0.4204545319080353 0.5165745615959168</leafValues></_>\r\n        <!-- tree 1 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 131 -67110925 14874979 -142633168 -1338923040\r\n            2046713291 -2067933195 1473503712 -789579837</internalNodes>\r\n          <leafValues>\r\n            -0.3762553930282593 0.4075302779674530</leafValues></_>\r\n        <!-- tree 2 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 83 -272814301 -1577073 -1118685 -305156120 -1052289\r\n            -1073813756 -538971154 -355523038</internalNodes>\r\n          <leafValues>\r\n            -0.4253497421741486 0.3728055357933044</leafValues></_>\r\n        <!-- tree 3 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 135 -2233 -214486242 -538514758 573747007 -159390971\r\n            1994225489 -973738098 -203424005</internalNodes>\r\n          <leafValues>\r\n            -0.3601998090744019 0.4563256204128265</leafValues></_>\r\n        <!-- tree 4 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 115 -261031688 -1330369299 -641860609 1029570301\r\n            -1306461192 -1196149518 -1529767778 683139823</internalNodes>\r\n          <leafValues>\r\n            -0.4034293889999390 0.4160816967487335</leafValues></_>\r\n        <!-- tree 5 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 64 -572993608 -34042628 -417865 -111109 -1433365268\r\n            -19869715 -1920939864 -1279457063</internalNodes>\r\n          <leafValues>\r\n            -0.3620899617671967 0.4594142735004425</leafValues></_>\r\n        <!-- tree 6 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 36 -626275097 -615256993 1651946018 805366393\r\n            2016559730 -430780849 -799868165 -16580645</internalNodes>\r\n          <leafValues>\r\n            -0.3903816640377045 0.4381459355354309</leafValues></_>\r\n        <!-- tree 7 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 93 1354797300 -1090957603 1976418270 -1342502178\r\n            -1851873892 -1194637077 -1153521668 -1108399474</internalNodes>\r\n          <leafValues>\r\n            -0.3591445386409760 0.4624078869819641</leafValues></_>\r\n        <!-- tree 8 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 91 68157712 1211368313 -304759523 1063017136 798797750\r\n            -275513546 648167355 -1145357350</internalNodes>\r\n          <leafValues>\r\n            -0.4297670423984528 0.4023293554782867</leafValues></_>\r\n        <!-- tree 9 -->\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 107 -546318240 -1628569602 -163577944 -537002306\r\n            -545456389 -1325465645 -380446736 -1058473386</internalNodes>\r\n          <leafValues>\r\n            -0.5727006793022156 0.2995934784412384</leafValues></_></weakClassifiers></_></stages>\r\n  <features>\r\n    <_>\r\n      <rect>\r\n        0 0 3 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 0 4 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 0 6 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 1 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 1 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 1 3 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 4 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 11 3 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 12 8 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 14 4 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 0 5 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 1 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 3 3 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 7 4 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 12 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 13 4 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 14 4 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 17 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 0 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 1 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 2 4 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 3 4 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 7 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 11 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 17 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 0 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 1 7 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 7 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 7 2 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 18 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 0 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 3 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 6 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 6 2 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 7 5 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 8 4 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 18 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 0 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 3 4 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 6 2 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 9 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 10 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 3 4 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 4 4 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 5 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 5 2 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 5 4 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 6 4 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 6 4 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 18 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 21 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 0 3 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 4 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 9 5 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 21 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 0 1 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 5 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 5 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 17 3 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 18 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 0 5 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 2 2 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 5 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 11 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 16 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 16 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 17 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 18 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 5 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 5 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 7 1 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 8 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 9 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 10 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 10 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 14 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 15 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 15 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 16 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 16 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 17 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 21 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 3 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 5 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 5 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 5 4 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 6 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 7 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 8 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 10 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 10 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 15 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 17 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 18 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 0 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 1 2 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 2 4 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 3 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 7 3 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 10 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 11 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 12 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 14 4 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 17 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 21 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        13 6 2 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        13 7 3 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        13 11 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        13 17 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        13 17 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        13 18 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        13 18 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 0 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 1 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 2 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 7 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 13 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 13 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 17 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        15 0 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        15 0 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        15 4 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        15 4 3 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        15 6 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        15 11 3 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        15 13 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        15 17 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        15 17 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        16 1 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        16 3 2 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        16 6 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        16 16 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        17 1 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        17 1 2 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        17 12 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        18 0 2 2</rect></_></features></cascade>\r\n</opencv_storage>\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/lbpcascades/lbpcascade_profileface.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<!--\r\n    This is 20x34 detector of profile faces using LBP features.\r\n    It was created by Attila Novak during GSoC 2012.\r\n    Note that the detector only detects faces rotated to the right,\r\n    so you may want to run it on the original and on\r\n    the flipped image to detect different profile faces.\r\n-->\r\n<opencv_storage>\r\n<cascade>\r\n  <stageType>BOOST</stageType>\r\n  <featureType>LBP</featureType>\r\n  <height>34</height>\r\n  <width>20</width>\r\n  <stageParams>\r\n    <boostType>GAB</boostType>\r\n    <minHitRate>9.9500000476837158e-001</minHitRate>\r\n    <maxFalseAlarm>3.0000001192092896e-001</maxFalseAlarm>\r\n    <weightTrimRate>9.4999999999999996e-001</weightTrimRate>\r\n    <maxDepth>1</maxDepth>\r\n    <maxWeakCount>100</maxWeakCount></stageParams>\r\n  <featureParams>\r\n    <maxCatCount>256</maxCatCount>\r\n    <featSize>1</featSize></featureParams>\r\n  <stageNum>16</stageNum>\r\n  <stages>\r\n    <!-- stage 0 -->\r\n    <_>\r\n      <maxWeakCount>4</maxWeakCount>\r\n      <stageThreshold>-5.9480339288711548e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 114 -2360321 -82228595 -771518211 -713436773\r\n            -1060447799 -810385271 -2004135683 -2566104</internalNodes>\r\n          <leafValues>\r\n            -8.0942183732986450e-001 5.9530025720596313e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 54 -649134608 -1060077114 1375916272 -719981432\r\n            1073801352 33024 281198795 -5246465</internalNodes>\r\n          <leafValues>\r\n            -7.7979278564453125e-001 5.4052764177322388e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 12 -960266913 -495857599 -1068498864 -867970987\r\n            457398579 -1174173695 1749041235 1849162079</internalNodes>\r\n          <leafValues>\r\n            -8.0028575658798218e-001 5.0435048341751099e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 120 -1228145793 -807247727 18059735 -138644520\r\n            998980043 -41250583 673112549 -1930366540</internalNodes>\r\n          <leafValues>\r\n            -7.7902388572692871e-001 4.9006074666976929e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 1 -->\r\n    <_>\r\n      <maxWeakCount>6</maxWeakCount>\r\n      <stageThreshold>-5.4879629611968994e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 6 -254346881 -746143606 -1039596583 1963430479\r\n            -263790449 -1073545213 698505999 -1349357</internalNodes>\r\n          <leafValues>\r\n            -6.6315788030624390e-001 6.0000002384185791e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 112 -134225985 -684228389 -988213089 -684716007\r\n            -1966960899 -896630615 152815840 -864497420</internalNodes>\r\n          <leafValues>\r\n            -7.0195454359054565e-001 5.8843690156936646e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 53 -35923461 520818827 -1862167847 856916291 68141197\r\n            2072530978 304306417 526079163</internalNodes>\r\n          <leafValues>\r\n            -6.4593964815139771e-001 5.7274609804153442e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 101 -2097665 -1781432163 588321018 -1677405808\r\n            -1968469982 -1450147831 -1467632684 -593693808</internalNodes>\r\n          <leafValues>\r\n            -7.2959578037261963e-001 4.9470889568328857e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 79 -205847273 -1088716541 285266431 1393693056\r\n            293931101 -1634205688 -452263692 -111136684</internalNodes>\r\n          <leafValues>\r\n            -7.0331865549087524e-001 5.2564400434494019e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 126 579801457 -670613495 -1065269989 -117095565\r\n            -1295163359 -779534335 -1744220101 -1355860</internalNodes>\r\n          <leafValues>\r\n            -7.5121974945068359e-001 4.5217981934547424e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 2 -->\r\n    <_>\r\n      <maxWeakCount>4</maxWeakCount>\r\n      <stageThreshold>-4.3886357545852661e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 20 -346563793 1217040543 -1324639677 206303367\r\n            -260894653 1165249072 1359168335 1652518863</internalNodes>\r\n          <leafValues>\r\n            -8.3054625988006592e-001 5.5417186021804810e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 69 -925898078 -917290147 -2147368790 -1995968378\r\n            1203961890 1765910571 789128481 -4201473</internalNodes>\r\n          <leafValues>\r\n            -7.5220447778701782e-001 6.1290657520294189e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 7 -425790473 -368916470 -1065172848 -1877712894\r\n            -1067360254 -847191997 1342400518 -680037517</internalNodes>\r\n          <leafValues>\r\n            -7.8469508886337280e-001 5.9731280803680420e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 5 -260315918 -1567751150 -805289977 1721229843\r\n            1644296976 1954742530 824530213 -8392601</internalNodes>\r\n          <leafValues>\r\n            -7.3686408996582031e-001 5.6347119808197021e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 3 -->\r\n    <_>\r\n      <maxWeakCount>6</maxWeakCount>\r\n      <stageThreshold>-4.6629825234413147e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 111 -67634177 -72175593 -246181185 -144772036\r\n            -1465917455 -1426934837 -345249307 -539041852</internalNodes>\r\n          <leafValues>\r\n            -7.1692305803298950e-001 5.5034482479095459e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 47 -1048705 -96415158 -1996126927 67301684 -659873481\r\n            1800863745 -402143413 1647570815</internalNodes>\r\n          <leafValues>\r\n            -7.6134461164474487e-001 4.7370144724845886e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 119 1905247351 -1111526689 1426654203 -116427277\r\n            1731664419 -81052249 1051905317 -1628448513</internalNodes>\r\n          <leafValues>\r\n            -5.9460461139678955e-001 6.1952447891235352e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 2 578486263 -2115313530 -788268733 -1122507629\r\n            -343408719 2127242147 -85406399 -37295</internalNodes>\r\n          <leafValues>\r\n            -6.0801470279693604e-001 5.8719038963317871e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 127 -1147176065 52139167 21156225 -540503783 -771529299\r\n            -33325024 -671045243 -1913073360</internalNodes>\r\n          <leafValues>\r\n            -7.4383884668350220e-001 5.1643568277359009e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 93 -319091633 -58633529 1166906391 1854443149\r\n            1267403009 -1198817246 1208634960 -35661669</internalNodes>\r\n          <leafValues>\r\n            -6.8595260381698608e-001 5.5931246280670166e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 4 -->\r\n    <_>\r\n      <maxWeakCount>8</maxWeakCount>\r\n      <stageThreshold>-6.0948312282562256e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 102 -747899393 -543522675 545333467 -34230241\r\n            -1572626245 -17790840 -1182162691 -1078427420</internalNodes>\r\n          <leafValues>\r\n            -6.0826772451400757e-001 4.6491229534149170e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 38 -103812609 503024467 -2121908081 722834075\r\n            1375757518 2022089353 197321677 2077719203</internalNodes>\r\n          <leafValues>\r\n            -6.2948691844940186e-001 4.8044654726982117e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 19 -774429826 -607461158 1158791644 -971587409\r\n            -1732167611 2015560010 -1278549257 -159911361</internalNodes>\r\n          <leafValues>\r\n            -5.9694272279739380e-001 4.7999730706214905e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 122 735837495 -875325281 152208339 -741020481\r\n            -1471817477 -1165246433 -1450830159 -1696546384</internalNodes>\r\n          <leafValues>\r\n            -6.4947181940078735e-001 4.2661586403846741e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 104 -629063145 -49708711 50692231 1973945160 157637120\r\n            2056259593 1771350547 -78911181</internalNodes>\r\n          <leafValues>\r\n            -6.2496536970138550e-001 4.4524449110031128e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 67 -74189973 -803307502 688005268 1600057378 -131870050\r\n            -1600503318 571446250 -386668002</internalNodes>\r\n          <leafValues>\r\n            -5.5046343803405762e-001 5.6090569496154785e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 81 586347861 -2071051852 -250078020 -1455374076\r\n            546287843 1216708619 -1853707673 -35130912</internalNodes>\r\n          <leafValues>\r\n            -6.3877129554748535e-001 4.7911971807479858e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 22 -1436568057 1555188001 164315 2084672259 1809869105\r\n            1132626050 1223430266 -596124761</internalNodes>\r\n          <leafValues>\r\n            -6.4428490400314331e-001 4.7921949625015259e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 5 -->\r\n    <_>\r\n      <maxWeakCount>8</maxWeakCount>\r\n      <stageThreshold>-5.4387503862380981e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 44 -783680003 -771883143 -302055943 -5898247 -253370375\r\n            -1996628131 1625947386 -2004157446</internalNodes>\r\n          <leafValues>\r\n            -5.2870607376098633e-001 5.9474670886993408e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 49 -586034977 -41205679 352424062 -163145456 151126042\r\n            -1171652503 1208036058 -9019322</internalNodes>\r\n          <leafValues>\r\n            -5.6763833761215210e-001 4.8789894580841064e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 39 1402589836 1363509256 103583 823365787 -1861443377\r\n            412131360 539718283 1002160350</internalNodes>\r\n          <leafValues>\r\n            -5.9899079799652100e-001 4.9562713503837585e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 113 -783429121 -1559215981 286355953 -794820602\r\n            461510679 -611662910 -2136237584 -96429424</internalNodes>\r\n          <leafValues>\r\n            -6.3842493295669556e-001 4.3330931663513184e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 99 -1365839532 -1291265163 1091604493 965968977\r\n            147472779 -1466925055 -2013090821 -1410703205</internalNodes>\r\n          <leafValues>\r\n            -5.8633142709732056e-001 5.0152444839477539e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 26 1846469631 -788479850 268796195 -754872317\r\n            1630603451 -896532480 1208092751 -72652777</internalNodes>\r\n          <leafValues>\r\n            -5.9243172407150269e-001 4.7917708754539490e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 85 -715395062 -113037167 1342198133 -552594287\r\n            411123713 11059209 -2012512153 -877809205</internalNodes>\r\n          <leafValues>\r\n            -6.9079184532165527e-001 4.2610234022140503e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 100 -526391817 -921022135 -1593630697 671093393\r\n            -2004270453 -1962835840 -1870413655 -1597095644</internalNodes>\r\n          <leafValues>\r\n            -6.5030521154403687e-001 4.4748127460479736e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 6 -->\r\n    <_>\r\n      <maxWeakCount>8</maxWeakCount>\r\n      <stageThreshold>-6.3195121288299561e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 109 -674761315 -581726065 352407899 -83717423\r\n            -660870145 -1165915966 -326837763 -927182608</internalNodes>\r\n          <leafValues>\r\n            -7.3185729980468750e-001 3.3258172869682312e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 97 860755579 -707063662 1361264863 1065505299\r\n            -1022866435 -1776123776 -1865661700 -1615196136</internalNodes>\r\n          <leafValues>\r\n            -6.1147916316986084e-001 3.7205791473388672e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 15 -678435969 -106962866 268652561 -826396597\r\n            -802066313 1931092070 1208025439 1211582847</internalNodes>\r\n          <leafValues>\r\n            -6.8679082393646240e-001 3.6285603046417236e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 86 -1573074550 -2080337595 299991 110482176 268552379\r\n            -310373944 596185787 -1428952165</internalNodes>\r\n          <leafValues>\r\n            -6.4654982089996338e-001 4.1456297039985657e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 30 -72637790 -1258143612 1342937104 -544352374\r\n            -1046875163 -121076606 -786059128 -71702400</internalNodes>\r\n          <leafValues>\r\n            -5.2772462368011475e-001 4.9787566065788269e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 89 -683288417 -218031996 33734999 -16115386 -2013259561\r\n            -2008907509 -1978533232 -352342880</internalNodes>\r\n          <leafValues>\r\n            -5.2718847990036011e-001 5.2839303016662598e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 10 -268764033 -1078984772 -65537 -281182212 -524291 -1\r\n            -8489090 -4227265</internalNodes>\r\n          <leafValues>\r\n            -5.0513482093811035e-001 5.8522778749465942e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 82 -570445845 784662143 -268435661 -1292701712\r\n            -436263043 -1367507075 -671091243 -751108132</internalNodes>\r\n          <leafValues>\r\n            -5.2438414096832275e-001 5.4709094762802124e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 7 -->\r\n    <_>\r\n      <maxWeakCount>8</maxWeakCount>\r\n      <stageThreshold>-5.9874147176742554e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 27 -721421649 -1001940437 2300046 -720004829 -792686333\r\n            1908900882 -160055232 -134763633</internalNodes>\r\n          <leafValues>\r\n            -5.7692307233810425e-001 3.7921348214149475e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 78 -1764279809 -1755824061 1937871313 -42069793\r\n            -1241158993 -1196293937 -1576828673 -70371296</internalNodes>\r\n          <leafValues>\r\n            -4.7039109468460083e-001 4.8607903718948364e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 29 -795875130 432079111 285457049 -620658641 -780072971\r\n            1158283432 -226254016 1839935243</internalNodes>\r\n          <leafValues>\r\n            -6.2938809394836426e-001 4.1353255510330200e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 33 -37236389 1654493543 202129823 1788182787\r\n            -1186162321 1912913933 -122942838 1968176815</internalNodes>\r\n          <leafValues>\r\n            -5.9031385183334351e-001 4.1488575935363770e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 88 1903888863 -286828472 -2125248034 -623115882\r\n            -268301806 -894826357 -2046633148 -696873056</internalNodes>\r\n          <leafValues>\r\n            -6.3875061273574829e-001 4.0209171175956726e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 123 -87223501 -1873424249 -1878929092 -586710990\r\n            -643825151 -1039040192 -285122488 -264093</internalNodes>\r\n          <leafValues>\r\n            -5.4196298122406006e-001 4.5856228470802307e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 52 -780030833 1363755203 -385150929 25502018 1214818435\r\n            -1020786271 -1870036478 1200354241</internalNodes>\r\n          <leafValues>\r\n            -5.2826374769210815e-001 5.3351372480392456e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 84 -1724706499 -184429355 620844509 -179010317\r\n            -1610327896 -341801844 -1190328066 1755915264</internalNodes>\r\n          <leafValues>\r\n            -5.7672232389450073e-001 4.4138705730438232e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 8 -->\r\n    <_>\r\n      <maxWeakCount>9</maxWeakCount>\r\n      <stageThreshold>-5.4533123970031738e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 48 -254347649 -565919658 1079050328 1090502875\r\n            1895985446 2013437961 -916419445 -53481573</internalNodes>\r\n          <leafValues>\r\n            -5.8105266094207764e-001 3.3599999547004700e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 65 2030928895 1438877010 1124143121 258207763\r\n            1361199276 1527410834 2072519624 1004267991</internalNodes>\r\n          <leafValues>\r\n            -5.9629368782043457e-001 3.6112698912620544e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 45 -247204964 -242712316 54544644 892459288 1888023456\r\n            -2138044280 -802615208 13199500</internalNodes>\r\n          <leafValues>\r\n            -6.5467655658721924e-001 3.0486112833023071e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 3 -430509345 -1865653973 554091143 -1069121312\r\n            1091180718 50577994 -1031731181 -211321225</internalNodes>\r\n          <leafValues>\r\n            -5.8759629726409912e-001 3.9526104927062988e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 106 -741412064 -255623164 1090945848 -1687760764\r\n            42428760 -1064762741 -1861683196 -81029101</internalNodes>\r\n          <leafValues>\r\n            -6.5875691175460815e-001 3.4154877066612244e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 128 -464010241 762112 285299147 -589082223 1373135017\r\n            -2138955645 1057005712 -526876236</internalNodes>\r\n          <leafValues>\r\n            -6.5968728065490723e-001 3.3614772558212280e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 80 -666744719 -635780797 33637339 -887860848\r\n            -1073532217 -108904320 440608996 -1100753973</internalNodes>\r\n          <leafValues>\r\n            -5.0520354509353638e-001 4.4810971617698669e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 28 -1580738774 -1506653838 302055688 -721223615\r\n            1427604224 -1566332144 1078565791 -558431977</internalNodes>\r\n          <leafValues>\r\n            -5.5560898780822754e-001 4.3426483869552612e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 103 957796629 538644536 352997725 80838797 453085387\r\n            -1165492198 285346042 1487077737</internalNodes>\r\n          <leafValues>\r\n            -5.5915868282318115e-001 4.0778505802154541e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 9 -->\r\n    <_>\r\n      <maxWeakCount>9</maxWeakCount>\r\n      <stageThreshold>-6.7299038171768188e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 0 -882973185 -620584737 279035921 -673986422\r\n            -1568464349 -2105466877 1468391879 -38825</internalNodes>\r\n          <leafValues>\r\n            -5.7544225454330444e-001 3.4235453605651855e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 90 -1820101795 -1336770299 285245717 -57216724\r\n            -502134548 -1425341984 -1475618680 -1195896480</internalNodes>\r\n          <leafValues>\r\n            -6.6810834407806396e-001 2.7653357386589050e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 9 -100197449 -457893579 200991 1964749325 -754875920\r\n            1897044675 1669843618 -70792821</internalNodes>\r\n          <leafValues>\r\n            -4.9064287543296814e-001 4.3120625615119934e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 117 -792114173 -544111547 537001999 2034569362\r\n            -1065213888 1630052634 -1450583484 -532405661</internalNodes>\r\n          <leafValues>\r\n            -6.4218991994857788e-001 3.6113587021827698e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 107 -1564241697 -1429683702 -2062974587 -1900539448\r\n            -1040078205 -394262006 -188628336 -390485984</internalNodes>\r\n          <leafValues>\r\n            -5.9181970357894897e-001 3.5756480693817139e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 4 1893434787 -1945108258 82458 -318734161 -939347837\r\n            684196040 1078496869 2133023515</internalNodes>\r\n          <leafValues>\r\n            -6.1955446004867554e-001 3.4674292802810669e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 31 -196247204 1964277780 -1810886012 21827851\r\n            -364280891 -1062338560 -536741128 -362562814</internalNodes>\r\n          <leafValues>\r\n            -5.2849757671356201e-001 4.1380330920219421e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 61 -1929140897 353472529 -721412674 -1228123782\r\n            -392951233 -1442693096 672800826 -232914898</internalNodes>\r\n          <leafValues>\r\n            -5.7934975624084473e-001 3.9208874106407166e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 72 -1004361296 -1069243858 268710018 1393598601\r\n            213956864 417530145 -912735606 1327495627</internalNodes>\r\n          <leafValues>\r\n            -7.5585323572158813e-001 2.6728668808937073e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 10 -->\r\n    <_>\r\n      <maxWeakCount>9</maxWeakCount>\r\n      <stageThreshold>-7.1303337812423706e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 23 -557797393 1524138462 277074064 -737259367\r\n            -1878818960 -81600384 -1740109301 -59267505</internalNodes>\r\n          <leafValues>\r\n            -6.7397260665893555e-001 1.9793814420700073e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 42 -1222377543 960610456 -2013138684 -989277927\r\n            -1010064731 -802979830 -645806439 -885143219</internalNodes>\r\n          <leafValues>\r\n            -4.5935314893722534e-001 4.1904711723327637e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 124 -783292542 -728791016 1342570700 1481418249\r\n            1258825942 -1580563964 -1178136688 -272306640</internalNodes>\r\n          <leafValues>\r\n            -6.3012123107910156e-001 2.9463621973991394e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 46 1369396573 -188563225 22085642 -1005861886\r\n            2023260232 -1123842045 -2146991925 1245170171</internalNodes>\r\n          <leafValues>\r\n            -5.2092707157135010e-001 3.9743596315383911e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 64 1540188400 1976259599 -805025279 864127692 544944\r\n            1484935304 -2147056504 1002584738</internalNodes>\r\n          <leafValues>\r\n            -6.5315401554107666e-001 3.1758561730384827e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 77 -188606981 -1873391210 16842830 -117157654\r\n            -1576842600 -1454767992 -518835576 -1625272280</internalNodes>\r\n          <leafValues>\r\n            -5.8580338954925537e-001 3.4936144948005676e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 18 -473497030 -477572088 16842905 -12164860 184698994\r\n            1350566019 -2143169323 1405313030</internalNodes>\r\n          <leafValues>\r\n            -6.0962837934494019e-001 3.0044576525688171e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 92 -528022006 -611028904 1075937757 -577660920\r\n            1073809492 -1341620207 -1475846395 -162412743</internalNodes>\r\n          <leafValues>\r\n            -6.6547930240631104e-001 3.1993752717971802e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 116 -2062347245 35311783 406966429 -640155632\r\n            -1904205761 -2012610494 399245455 -937752211</internalNodes>\r\n          <leafValues>\r\n            -4.8515367507934570e-001 4.3642494082450867e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 11 -->\r\n    <_>\r\n      <maxWeakCount>10</maxWeakCount>\r\n      <stageThreshold>-1.1831332445144653e+000</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 115 -912525479 -2146793066 247327 -554139184 320582141\r\n            -1442774971 1552517769 -1464330096</internalNodes>\r\n          <leafValues>\r\n            -7.2892564535140991e-001 1.2876711785793304e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 41 -182757566 -683667118 268566545 -540408959\r\n            1547915506 2014497074 1817806103 -549486525</internalNodes>\r\n          <leafValues>\r\n            -5.6024330854415894e-001 2.8734233975410461e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 13 -1396013057 -175218480 536903951 -35946104 -92067077\r\n            956498056 -200474487 1331907188</internalNodes>\r\n          <leafValues>\r\n            -5.5237007141113281e-001 3.2844060659408569e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 17 2110443855 1547702666 -1874853670 1083212172\r\n            -2004008413 -498614008 572624451 1179093527</internalNodes>\r\n          <leafValues>\r\n            -7.2481799125671387e-001 2.6627025008201599e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 43 -1751428966 -1626324992 -1073540847 -783806124\r\n            -2146909454 -913440767 -2138941303 -558233160</internalNodes>\r\n          <leafValues>\r\n            -4.4304186105728149e-001 4.1505634784698486e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 37 -576405461 -1625709950 1627439763 1116373274\r\n            1622902452 1107834529 975868423 2074176171</internalNodes>\r\n          <leafValues>\r\n            -5.6509882211685181e-001 3.5433205962181091e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 118 1171205664 1426522307 49281 563122240 -791985520\r\n            -930869245 -364148081 -590624140</internalNodes>\r\n          <leafValues>\r\n            -5.6250953674316406e-001 3.3341854810714722e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 76 1162033968 1180991656 16859165 230787289 -2104786299\r\n            -1819967351 1118240928 -343561865</internalNodes>\r\n          <leafValues>\r\n            -4.7331553697586060e-001 4.1576251387596130e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 110 -2147085315 -1228897088 -2146839339 -1751314339\r\n            -531605907 -393183232 1804153563 -1399324416</internalNodes>\r\n          <leafValues>\r\n            -5.8979070186614990e-001 3.7525305151939392e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 55 1581887865 999817729 151311688 331546624 -991625824\r\n            -938834941 1837335184 852075394</internalNodes>\r\n          <leafValues>\r\n            -5.4071021080017090e-001 4.0077716112136841e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 12 -->\r\n    <_>\r\n      <maxWeakCount>10</maxWeakCount>\r\n      <stageThreshold>-6.4480733871459961e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 16 -510660401 -884555766 272896026 -12189566\r\n            -1685363509 -662568805 1073840823 -545105785</internalNodes>\r\n          <leafValues>\r\n            -5.3361344337463379e-001 2.7807486057281494e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 48 -557408354 2115155922 -2130669353 1616707591\r\n            693193240 -1569554175 -1743918878 1983596555</internalNodes>\r\n          <leafValues>\r\n            -5.3364741802215576e-001 3.1411096453666687e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 108 -413278733 83935516 536961502 1452278484\r\n            -2004277212 -391683967 -1426466672 -85395040</internalNodes>\r\n          <leafValues>\r\n            -7.4530494213104248e-001 2.3025059700012207e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 32 -938623022 1469386887 822151432 421593370\r\n            -1433793568 -1602191360 -527916919 680112651</internalNodes>\r\n          <leafValues>\r\n            -4.6078306436538696e-001 4.0021440386772156e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 50 1619785226 -1004367410 1417725137 126732357\r\n            148062614 -625983352 -712398335 -412918226</internalNodes>\r\n          <leafValues>\r\n            -4.9818846583366394e-001 3.6678382754325867e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 24 -1064322531 1351938204 196691 -561840073 -1978859471\r\n            -649944954 -2003664885 -1172094197</internalNodes>\r\n          <leafValues>\r\n            -4.7309580445289612e-001 4.2868506908416748e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 96 -1878961904 1360035888 -1073721317 -1051487863\r\n            -431841087 1628112896 -2112640640 -1829440828</internalNodes>\r\n          <leafValues>\r\n            -6.9250243902206421e-001 2.8783574700355530e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 62 67496095 391741589 -2146154237 96245592 -893992548\r\n            982687872 571488264 278906307</internalNodes>\r\n          <leafValues>\r\n            -6.4613574743270874e-001 3.0145862698554993e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 73 -415771792 1208487966 339825796 1792117580\r\n            1128517807 144965669 -536376816 732856538</internalNodes>\r\n          <leafValues>\r\n            -6.9449120759963989e-001 3.0338683724403381e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 40 -1991530440 324215457 -2080275930 -1857940798\r\n            1342685625 721420800 1250592988 1493903457</internalNodes>\r\n          <leafValues>\r\n            -7.0043331384658813e-001 2.5916099548339844e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 13 -->\r\n    <_>\r\n      <maxWeakCount>10</maxWeakCount>\r\n      <stageThreshold>-6.0248321294784546e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 21 -16537745 2114438797 1409323561 1691064397\r\n            -207434939 822260754 -384857461 2031088579</internalNodes>\r\n          <leafValues>\r\n            -6.1256545782089233e-001 1.7948718369007111e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 1 -95427858 67117166 -1308426467 -1962693439 601886855\r\n            924320187 1661215701 2078945158</internalNodes>\r\n          <leafValues>\r\n            -6.8756872415542603e-001 2.2317354381084442e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 121 -1853361185 -619857007 16793601 -184516476\r\n            -1422775873 -488996831 1476610285 -926297672</internalNodes>\r\n          <leafValues>\r\n            -5.2260422706604004e-001 3.2479336857795715e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 105 -267171326 1436635177 1937772829 -2092859315\r\n            -769638067 -2122268534 1502103583 -18894227</internalNodes>\r\n          <leafValues>\r\n            -5.2588832378387451e-001 3.4061828255653381e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 83 1880187281 -1862250368 303299 960921986 -2002701917\r\n            -1593343958 -334888263 1058018448</internalNodes>\r\n          <leafValues>\r\n            -6.9037044048309326e-001 2.7262538671493530e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 34 -2125487365 1347551377 -1861970752 1368654274\r\n            -1064675233 436275211 327448684 2068015115</internalNodes>\r\n          <leafValues>\r\n            -5.3338903188705444e-001 3.2425448298454285e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 36 1192659162 235536712 1078002258 428089414\r\n            -2138651204 -1937242101 507742421 1932739127</internalNodes>\r\n          <leafValues>\r\n            -6.4654779434204102e-001 3.0722403526306152e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 14 -805047416 -1962622822 -2013265442 2030239751\r\n            1082134810 1744963592 -1836871485 -249326965</internalNodes>\r\n          <leafValues>\r\n            -5.7250964641571045e-001 3.1499111652374268e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 75 -650653297 170234379 -2063527695 448823424\r\n            -2139088862 319586315 -2067685344 -1347692410</internalNodes>\r\n          <leafValues>\r\n            -5.4618871212005615e-001 3.8171616196632385e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 56 -168821125 -1107300354 -536871052 -1125515426\r\n            -1795721360 -1672085508 1845358040 -2114327569</internalNodes>\r\n          <leafValues>\r\n            -4.2669427394866943e-001 5.0532561540603638e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 14 -->\r\n    <_>\r\n      <maxWeakCount>11</maxWeakCount>\r\n      <stageThreshold>-1.1912760734558105e+000</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 11 -1043414305 -1735900650 268517385 -1137929054\r\n            -1048411462 -2011152253 -1957405841 -497557425</internalNodes>\r\n          <leafValues>\r\n            -5.7042253017425537e-001 2.1933962404727936e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 71 -233469310 1360073157 376971 626087057 -1180588024\r\n            -1191067261 -1474310132 830601690</internalNodes>\r\n          <leafValues>\r\n            -5.3927713632583618e-001 2.9026004672050476e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 35 -1599643389 42074270 -1811918838 -949960625\r\n            1564707361 289538187 1204527649 -112006873</internalNodes>\r\n          <leafValues>\r\n            -6.0980087518692017e-001 2.8851604461669922e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 59 585529126 -1100070936 -1342177537 833961983\r\n            1306961797 1986559992 -810088568 -1082149201</internalNodes>\r\n          <leafValues>\r\n            -3.2345715165138245e-001 5.5635309219360352e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 95 1107806555 2030223765 17039707 -1224163308\r\n            -1073053535 -1291837432 822618633 -121972608</internalNodes>\r\n          <leafValues>\r\n            -6.5054124593734741e-001 3.1912675499916077e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 51 -171583461 -1660890605 268504396 453157697\r\n            -1065215606 -1740602879 1824636801 1940062923</internalNodes>\r\n          <leafValues>\r\n            -4.7275745868682861e-001 4.2362514138221741e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 87 -799546379 -2097769968 293605405 -21571376 285294733\r\n            136347650 -930405536 -69420863</internalNodes>\r\n          <leafValues>\r\n            -5.5549502372741699e-001 3.3842340111732483e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 60 -594509036 -267114166 35413 -1052598126 545325639\r\n            -1207959408 -1073643381 682827807</internalNodes>\r\n          <leafValues>\r\n            -5.4805672168731689e-001 3.7224516272544861e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 63 1513710022 194882313 1109000450 28010496 -601835264\r\n            -645791614 -1041880446 1561822180</internalNodes>\r\n          <leafValues>\r\n            -5.3384119272232056e-001 3.7635508179664612e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 125 -754581391 -246595569 -2113336948 -1855323709\r\n            1090531337 -931133310 950984 -3971805</internalNodes>\r\n          <leafValues>\r\n            -5.2334308624267578e-001 4.0167775750160217e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 58 -361268680 662383988 2147483638 -209756289\r\n            -1375932428 -1895890954 -1744855042 -1142215109</internalNodes>\r\n          <leafValues>\r\n            -3.4343415498733521e-001 6.1590969562530518e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 15 -->\r\n    <_>\r\n      <maxWeakCount>10</maxWeakCount>\r\n      <stageThreshold>-7.7425497770309448e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 66 -716447302 -602037376 1090519043 -150261760\r\n            342934202 -2034138749 1141152394 -351301493</internalNodes>\r\n          <leafValues>\r\n            -4.8867926001548767e-001 3.4062498807907104e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 98 -2071985592 -700120831 1078417460 672719121\r\n            1082264136 -209075063 -1438988203 -1465205245</internalNodes>\r\n          <leafValues>\r\n            -7.1539443731307983e-001 2.4058867990970612e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 74 872558624 331821072 1610649929 -1181384552\r\n            -2130081587 -92209146 -612134248 -1199562344</internalNodes>\r\n          <leafValues>\r\n            -4.4142067432403564e-001 3.7935256958007813e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 68 -791554721 -737771072 2425605 740044819 1208549387\r\n            973897998 1124108962 802102203</internalNodes>\r\n          <leafValues>\r\n            -4.6558478474617004e-001 4.2193859815597534e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 8 1893114270 -1013792636 360523 -586362838 -1073151001\r\n            -2146917824 -2104934391 -875596965</internalNodes>\r\n          <leafValues>\r\n            -5.0676107406616211e-001 3.5864940285682678e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 91 574816266 -2011773950 1476495634 580227538\r\n            -2146781128 -2147448830 1901535891 -692616573</internalNodes>\r\n          <leafValues>\r\n            -6.1020326614379883e-001 3.0061775445938110e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 70 2125429880 2080309246 -285282561 2142961407\r\n            -1259516274 1073741823 754945025 867497448</internalNodes>\r\n          <leafValues>\r\n            -4.3854746222496033e-001 4.7815895080566406e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 94 -1727736509 -1979678624 285229334 1115689064\r\n            537927788 -1207402368 1098914016 -91503488</internalNodes>\r\n          <leafValues>\r\n            -6.8697202205657959e-001 3.5183742642402649e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 57 -528465144 -707035113 -1048575869 1372127361 8651416\r\n            -526909310 -1845360374 -1451016182</internalNodes>\r\n          <leafValues>\r\n            -4.5901125669479370e-001 4.5875525474548340e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 25 -2076984798 -533130869 -1060954112 1639977472\r\n            828440586 1792508680 -1693988801 -13285232</internalNodes>\r\n          <leafValues>\r\n            -4.8493441939353943e-001 4.3403539061546326e-001</leafValues></_></weakClassifiers></_></stages>\r\n  <features>\r\n    <_>\r\n      <rect>\r\n        0 1 1 9</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 1 4 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 2 2 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 2 2 10</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 2 3 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 3 3 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 4 1 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 5 2 9</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 7 1 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 7 5 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 9 1 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 9 2 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 10 3 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 11 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 12 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 13 3 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 14 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 14 3 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 16 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 19 3 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 20 3 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 21 3 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 22 2 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 25 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 25 4 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 0 5 10</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 2 1 9</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 4 4 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 4 5 9</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 6 3 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 9 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 11 2 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 15 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 20 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 28 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 0 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 0 3 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 0 4 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 3 4 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 4 5 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 5 2 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 7 5 9</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 8 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 12 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 13 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 14 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 16 3 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 18 3 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 22 2 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 31 3 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 0 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 1 3 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 1 3 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 2 3 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 8 4 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 10 2 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 14 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 16 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 18 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 19 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 19 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 31 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 4 4 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 5 2 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 6 2 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 6 3 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 7 2 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 12 3 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 19 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 0 5 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 3 4 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 3 5 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 5 2 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 12 4 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 22 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 21 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 26 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 30 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 31 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 31 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 0 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 9 3 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 17 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 31 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 31 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 0 4 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 5 2 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 10 3 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 16 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 25 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 30 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 0 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 0 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 0 3 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 15 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 24 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 29 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 31 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 4 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 8 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 15 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 26 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 30 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        10 31 3 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 0 3 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 1 3 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 5 3 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 14 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 23 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 27 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        11 31 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 22 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        12 29 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        13 23 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        13 24 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        13 29 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        13 31 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 1 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 1 2 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 2 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 24 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 26 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        14 28 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        15 4 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        15 24 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        17 0 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        17 3 1 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        17 23 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        17 27 1 1</rect></_></features></cascade>\r\n</opencv_storage>\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/etc/lbpcascades/lbpcascade_silverware.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<!--\r\n    This is 12x80 detector of the silverware (forks, spoons, knives) using LBP features.\r\n    It was created by Attila Novak during GSoC 2012.\r\n    Note that the detector only detects vertically oriented silverware,\r\n    so you should care of the proper image orientation\r\n    (probably should run detector several times).\r\n    It also assumes the \"top view\" when the camera optical axis is orthogonal to the table plane.\r\n-->\r\n<opencv_storage>\r\n<cascade>\r\n  <stageType>BOOST</stageType>\r\n  <featureType>LBP</featureType>\r\n  <height>80</height>\r\n  <width>12</width>\r\n  <stageParams>\r\n    <boostType>GAB</boostType>\r\n    <minHitRate>9.9500000476837158e-001</minHitRate>\r\n    <maxFalseAlarm>3.0000001192092896e-001</maxFalseAlarm>\r\n    <weightTrimRate>9.4999999999999996e-001</weightTrimRate>\r\n    <maxDepth>1</maxDepth>\r\n    <maxWeakCount>100</maxWeakCount></stageParams>\r\n  <featureParams>\r\n    <maxCatCount>256</maxCatCount>\r\n    <featSize>1</featSize></featureParams>\r\n  <stageNum>16</stageNum>\r\n  <stages>\r\n    <!-- stage 0 -->\r\n    <_>\r\n      <maxWeakCount>4</maxWeakCount>\r\n      <stageThreshold>-8.2867860794067383e-002</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 99 -268435521 -486543361 -258 1659633406 -134217857\r\n            1702887279 -134217929 -184549377</internalNodes>\r\n          <leafValues>\r\n            -7.5000000000000000e-001 8.6380833387374878e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 39 -540541017 -1060113913 -781245688 -477121697\r\n            -1818664155 1105186857 -505961467 -152575569</internalNodes>\r\n          <leafValues>\r\n            -7.9976779222488403e-001 7.5056612491607666e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 101 -479208497 -353380921 -855254781 -1566689761\r\n            -454302869 1893310787 -271591561 -134222965</internalNodes>\r\n          <leafValues>\r\n            -7.1062028408050537e-001 7.7380746603012085e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 41 -338958865 -925383977 -1438297681 -981777969\r\n            -882901177 1913369038 -135286729 1995959223</internalNodes>\r\n          <leafValues>\r\n            -7.8616768121719360e-001 6.9309240579605103e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 1 -->\r\n    <_>\r\n      <maxWeakCount>5</maxWeakCount>\r\n      <stageThreshold>-7.7058833837509155e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 14 -34089161 -2245 1878980471 -8687769 -134316045\r\n            1744797563 -8388737 1795146607</internalNodes>\r\n          <leafValues>\r\n            -6.1089491844177246e-001 7.3594772815704346e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 32 -707274321 1896302609 1132560802 -183140351 17019099\r\n            830472347 -1993621429 1440074510</internalNodes>\r\n          <leafValues>\r\n            -6.4869755506515503e-001 5.6941097974777222e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 4 -1055898237 -104492975 -1795141251 1464975384\r\n            -1602043461 -914358144 1111543953 -2067496448</internalNodes>\r\n          <leafValues>\r\n            -6.0432785749435425e-001 5.5685383081436157e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 96 -520160401 2063466495 -65665 -134217729 -50462805\r\n            1761476478 1693969709 1910503031</internalNodes>\r\n          <leafValues>\r\n            -5.6237226724624634e-001 6.2263637781143188e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 6 -1479564374 -954482597 16859161 -799804534 268468874\r\n            713187329 1108033665 -714619755</internalNodes>\r\n          <leafValues>\r\n            -6.9048601388931274e-001 5.3264212608337402e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 2 -->\r\n    <_>\r\n      <maxWeakCount>5</maxWeakCount>\r\n      <stageThreshold>-7.1249550580978394e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 21 -34638473 -553976197 -134217865 -159715533\r\n            -142901385 -272629761 -8421377 -956303361</internalNodes>\r\n          <leafValues>\r\n            -6.4170038700103760e-001 7.0683228969573975e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 100 -8389777 -185860353 -277 -2097152001 -161\r\n            -209780865 -1 -529006609</internalNodes>\r\n          <leafValues>\r\n            -5.5270516872406006e-001 6.9983023405075073e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 118 -545259537 -276857217 -1258291302 1652358910\r\n            -134236308 1735819126 -16812809 -221249673</internalNodes>\r\n          <leafValues>\r\n            -5.6243920326232910e-001 6.2150186300277710e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 19 -342885713 -1369882213 -2079215310 -765214587\r\n            -2113207945 1074365452 1393631959 1409022707</internalNodes>\r\n          <leafValues>\r\n            -6.8943935632705688e-001 5.3469669818878174e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 23 -506991005 1360417115 -1844809365 -821575604\r\n            21178499 986120459 1347943419 -969541850</internalNodes>\r\n          <leafValues>\r\n            -6.7428857088088989e-001 5.5008578300476074e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 3 -->\r\n    <_>\r\n      <maxWeakCount>6</maxWeakCount>\r\n      <stageThreshold>-3.0183684825897217e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 31 -144703505 -143130625 -17 -134381841 -143130625\r\n            2012741567 -134218802 -134217841</internalNodes>\r\n          <leafValues>\r\n            -5.3079712390899658e-001 7.5616836547851563e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 35 -137887809 -1924805943 1363218446 -817782134\r\n            1099022547 1082327168 -1279204784 1128784467</internalNodes>\r\n          <leafValues>\r\n            -6.4090979099273682e-001 5.3444361686706543e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 15 -786433589 -515129128 277173650 -132673121\r\n            -884037451 1137229866 1938662135 -676336865</internalNodes>\r\n          <leafValues>\r\n            -5.2920126914978027e-001 5.9623366594314575e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 92 -1897400451 -1627924747 -335548553 -1 1257762559\r\n            -2113929417 -419433067 -235309193</internalNodes>\r\n          <leafValues>\r\n            -5.5294114351272583e-001 5.8814722299575806e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 112 -187176146 1743897116 -1878957040 542033563\r\n            1372582934 823282242 -158609727 -779295046</internalNodes>\r\n          <leafValues>\r\n            -6.8665105104446411e-001 4.4378995895385742e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 9 1676637640 1887961346 16875658 1977614736 1682145753\r\n            813744265 -842338550 1930548135</internalNodes>\r\n          <leafValues>\r\n            -7.5830078125000000e-001 3.9562159776687622e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 4 -->\r\n    <_>\r\n      <maxWeakCount>8</maxWeakCount>\r\n      <stageThreshold>-3.9228534698486328e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 25 -167774345 -6689161 -2097153 -4194541 -282329093 -1\r\n            -1 -352323601</internalNodes>\r\n          <leafValues>\r\n            -4.7727271914482117e-001 7.4114018678665161e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 2 -1051598753 -1005571964 1900827102 2065404120\r\n            -1207262247 -120553331 -1725955392 -494812414</internalNodes>\r\n          <leafValues>\r\n            -5.2365595102310181e-001 5.3981113433837891e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 116 -2142770433 -1601462143 16842760 -804892128 1032369\r\n            268763273 1091011104 -1142957585</internalNodes>\r\n          <leafValues>\r\n            -4.7790464758872986e-001 5.4881525039672852e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 87 -532155537 1351188929 1073823759 -1253637875\r\n            -721321497 -662691837 -955278809 1623500836</internalNodes>\r\n          <leafValues>\r\n            -6.8072116374969482e-001 3.7135115265846252e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 113 -1996457508 -2146282492 -1728016135 -578347007\r\n            -1609004859 193626505 1153570968 -1920333632</internalNodes>\r\n          <leafValues>\r\n            -5.7289212942123413e-001 4.6210876107215881e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 56 -972008109 -691003372 -2147413749 2098355010\r\n            143009971 -1744174583 -1073051430 617488921</internalNodes>\r\n          <leafValues>\r\n            -5.9549087285995483e-001 4.8842963576316833e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 48 26 1971388449 419479901 2080931848 -1140292918\r\n            -1719074813 -2130476842 -268398592</internalNodes>\r\n          <leafValues>\r\n            -5.8355164527893066e-001 4.7890499234199524e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 57 -1052266874 167813132 -2130690045 -703061621\r\n            -131874777 -662142838 -1064730555 1119947703</internalNodes>\r\n          <leafValues>\r\n            -6.9379311800003052e-001 3.9936643838882446e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 5 -->\r\n    <_>\r\n      <maxWeakCount>9</maxWeakCount>\r\n      <stageThreshold>-6.6581231355667114e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 29 2080314175 -112910205 805323551 1024016674\r\n            1073891387 -2137847805 1653140111 -7676933</internalNodes>\r\n          <leafValues>\r\n            -5.5957448482513428e-001 5.4044550657272339e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 94 -1358956801 -100880986 -1887436809 1073741823\r\n            -1896350220 -838860811 268434686 -1912602633</internalNodes>\r\n          <leafValues>\r\n            -4.3124794960021973e-001 5.6135851144790649e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 76 -26230993 1357905647 -1358958674 -135266305 -524434\r\n            -176291841 -142622837 -1005125829</internalNodes>\r\n          <leafValues>\r\n            -4.6799373626708984e-001 5.1660954952239990e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 30 -313836176 -742240245 16818511 -1391787262\r\n            1632363443 -156630911 -83631445 248984215</internalNodes>\r\n          <leafValues>\r\n            -6.2023061513900757e-001 3.9792594313621521e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 91 -612895966 591778561 1073812490 369347088\r\n            -1870223303 556335107 553910792 1907094058</internalNodes>\r\n          <leafValues>\r\n            -6.2148678302764893e-001 4.1758581995964050e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 46 -1430257749 -672663689 -218104082 -135266322\r\n            -1493174275 -873463809 -276826113 -690006715</internalNodes>\r\n          <leafValues>\r\n            -5.1617449522018433e-001 5.2012032270431519e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 123 1088746207 1489289603 16781456 -443461355\r\n            -762795606 -670564192 -1465814774 -101527550</internalNodes>\r\n          <leafValues>\r\n            -5.0202989578247070e-001 5.0987190008163452e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 53 -1001679641 -955695103 25248080 -738078457 671123502\r\n            193003713 -1836523327 -216026117</internalNodes>\r\n          <leafValues>\r\n            -5.2692401409149170e-001 5.3243070840835571e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 89 2147417937 -1048642 -1039 -1766457361 -134236382\r\n            -1922646177 -16777473 -1534591162</internalNodes>\r\n          <leafValues>\r\n            -4.6150138974189758e-001 5.6634509563446045e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 6 -->\r\n    <_>\r\n      <maxWeakCount>8</maxWeakCount>\r\n      <stageThreshold>-1.2349532842636108e+000</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 67 -142902409 -67142273 1878982639 -1182802113 -75841\r\n            -274219146 -88604929 -31817921</internalNodes>\r\n          <leafValues>\r\n            -4.5625588297843933e-001 5.7534247636795044e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 128 -808330661 1390004234 1107406871 -2098932967\r\n            -767440829 1208655939 -1971196977 1351600587</internalNodes>\r\n          <leafValues>\r\n            -5.7236993312835693e-001 4.1942635178565979e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 0 -805307409 -1052697 -65684 -4233 -134217745 -4194453\r\n            -696778831 -708062879</internalNodes>\r\n          <leafValues>\r\n            -4.5485407114028931e-001 5.5909335613250732e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 119 -169888509 1150652435 1074791064 541757442\r\n            -645182635 989929472 1262741126 1963976639</internalNodes>\r\n          <leafValues>\r\n            -6.4869618415832520e-001 3.9796143770217896e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 38 -912524801 811171970 33644801 -717151469 -2108956437\r\n            294158344 1109713681 1900266000</internalNodes>\r\n          <leafValues>\r\n            -5.0387507677078247e-001 5.1329559087753296e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 20 -746687625 -200802301 1073872962 285491202\r\n            1208512717 -2138664446 -1837102693 1174835902</internalNodes>\r\n          <leafValues>\r\n            -5.9465301036834717e-001 4.4057011604309082e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 16 -442903927 -988184502 -717209211 1443168395\r\n            -1465793521 1252524168 1107337938 -1050414557</internalNodes>\r\n          <leafValues>\r\n            -5.9043467044830322e-001 4.3687704205513000e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 104 -1692667790 -612286452 -1056931520 437452806\r\n            -2136309078 -401536992 -1987928929 -1033981310</internalNodes>\r\n          <leafValues>\r\n            -5.0495445728302002e-001 4.9910807609558105e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 7 -->\r\n    <_>\r\n      <maxWeakCount>9</maxWeakCount>\r\n      <stageThreshold>-5.4583048820495605e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 97 -419954689 -570949699 2147417599 -1 -872415749\r\n            -301989897 -872433670 -268443689</internalNodes>\r\n          <leafValues>\r\n            -4.0734556317329407e-001 7.1092438697814941e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 3 -1062674253 1929486475 197402 1841550219 135268235\r\n            -1165491808 956369290 1258896162</internalNodes>\r\n          <leafValues>\r\n            -5.4886269569396973e-001 4.1644170880317688e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 37 -620271105 -901300206 1359008346 -603537150\r\n            1355455189 596312193 -247999129 -728767550</internalNodes>\r\n          <leafValues>\r\n            -5.1914668083190918e-001 3.9419922232627869e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 17 -1072700149 546031429 12798103 1881656595 35238042\r\n            682232321 176931799 1148695251</internalNodes>\r\n          <leafValues>\r\n            -5.4100900888442993e-001 4.0588796138763428e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 71 -522857685 1350893957 17339597 1999601732 -779974469\r\n            -359071607 1879296642 -1236927697</internalNodes>\r\n          <leafValues>\r\n            -4.9249285459518433e-001 4.4877073168754578e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 93 2037497904 492944831 -2013291075 -754983169\r\n            1837104414 -671812233 -1660989976 -973105033</internalNodes>\r\n          <leafValues>\r\n            -4.6483671665191650e-001 4.8267844319343567e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 33 -553943182 -100663369 -1327169 -181207174 -805896236\r\n            -16777225 -32770 -344459717</internalNodes>\r\n          <leafValues>\r\n            -3.9679497480392456e-001 5.6408804655075073e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 44 -8439301 -9502850 2147412095 2134171367 1467968283\r\n            -555876513 1719612907 -959121</internalNodes>\r\n          <leafValues>\r\n            -3.7275579571723938e-001 6.2219065427780151e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 62 -2086686357 -2143072184 1073745988 -1878839231\r\n            1221503177 -2113732606 1133091218 1470880455</internalNodes>\r\n          <leafValues>\r\n            -5.5160778760910034e-001 4.4197219610214233e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 8 -->\r\n    <_>\r\n      <maxWeakCount>8</maxWeakCount>\r\n      <stageThreshold>-4.9482953548431396e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 124 803987455 -1207959557 -1073747969 -3 -1879048193\r\n            -1720221705 -1073744641 -1212159499</internalNodes>\r\n          <leafValues>\r\n            -4.2883211374282837e-001 5.8106172084808350e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 1 -1520569905 -125497088 1360134399 -49444069\r\n            -1065189105 -612134877 -1497194288 -1006112575</internalNodes>\r\n          <leafValues>\r\n            -4.8296096920967102e-001 4.3431344628334045e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 108 -67112229 -797503462 268623881 1083056391\r\n            -1874187198 1879638016 -804355463 1985162053</internalNodes>\r\n          <leafValues>\r\n            -6.1597704887390137e-001 3.4508374333381653e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 26 -686760009 1468434576 1140918535 -880733942 12599987\r\n            -1304752000 -1593784081 115557220</internalNodes>\r\n          <leafValues>\r\n            -5.7973521947860718e-001 4.0324980020523071e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 115 -753405796 4259842 -872415136 85172613 154534824\r\n            8454145 -2147292968 1094185899</internalNodes>\r\n          <leafValues>\r\n            -4.7171372175216675e-001 4.6018373966217041e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 64 -737160572 2107229470 1478238399 386729999 46739708\r\n            -1717532540 134302191 1502456202</internalNodes>\r\n          <leafValues>\r\n            -4.7625115513801575e-001 4.6307522058486938e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 63 574973114 1079378118 151608 -1089433600 683881170\r\n            1234370560 25761968 1305471639</internalNodes>\r\n          <leafValues>\r\n            -5.4804503917694092e-001 4.2817059159278870e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 126 -913048353 -1333444591 303141015 1107341569\r\n            -1727960821 1644167297 -1190753878 1418524891</internalNodes>\r\n          <leafValues>\r\n            -6.3843786716461182e-001 3.2018747925758362e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 9 -->\r\n    <_>\r\n      <maxWeakCount>10</maxWeakCount>\r\n      <stageThreshold>-4.7552201151847839e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 54 -17825929 -8718489 -34111631 -135004289 -1358954497\r\n            -16814213 -151556225 -285220369</internalNodes>\r\n          <leafValues>\r\n            -4.1965106129646301e-001 5.5681818723678589e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 88 -1856526326 -645691871 337711324 1464176998\r\n            -1602581814 -1710751608 168420078 -1341468062</internalNodes>\r\n          <leafValues>\r\n            -4.0517404675483704e-001 4.9981650710105896e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 45 -741223945 -1627185101 822169913 407916675\r\n            -897447857 589300224 540099855 -1156899883</internalNodes>\r\n          <leafValues>\r\n            -4.4794428348541260e-001 4.3524059653282166e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 66 258608606 -1120993285 -419517441 -578240642\r\n            -1879056401 -1101037569 -13383 -28301584</internalNodes>\r\n          <leafValues>\r\n            -3.9371734857559204e-001 5.2872020006179810e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 117 -350280689 -829730738 -1073461695 38377489\r\n            -645158785 839057410 -1249137694 1882566387</internalNodes>\r\n          <leafValues>\r\n            -5.7474929094314575e-001 3.8859930634498596e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 34 1536523031 -952168281 -1855975139 -854621937\r\n            -939095838 -1744699368 -796270511 1582955555</internalNodes>\r\n          <leafValues>\r\n            -5.4318642616271973e-001 4.1631007194519043e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 51 1393782562 319525363 8471383 1368384004 889651722\r\n            1921550554 -1836930098 1660195204</internalNodes>\r\n          <leafValues>\r\n            -7.2387772798538208e-001 2.8236424922943115e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 78 1675075922 637567168 -2130116204 -1890844654\r\n            34255055 167907336 1091555477 -2142773065</internalNodes>\r\n          <leafValues>\r\n            -5.3113341331481934e-001 3.7920853495597839e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 7 1164149387 1433912608 16876979 1595080980 1275865262\r\n            -1446313974 1241665562 173580528</internalNodes>\r\n          <leafValues>\r\n            -5.0643980503082275e-001 4.4159597158432007e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 129 -111949961 -783789413 268583504 -923765997\r\n            -1073657336 -1340440574 -394149886 1216081042</internalNodes>\r\n          <leafValues>\r\n            -5.0880813598632813e-001 4.1170257329940796e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 10 -->\r\n    <_>\r\n      <maxWeakCount>11</maxWeakCount>\r\n      <stageThreshold>-6.9445723295211792e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 106 -487588613 -118095873 -1 2109472735 -1258291202\r\n            -101712129 -33832963 -67652237</internalNodes>\r\n          <leafValues>\r\n            -4.0311419963836670e-001 6.2951332330703735e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 49 -268435473 -353372166 2138045906 -4121 -276824105\r\n            1317007308 -41945099 -134484017</internalNodes>\r\n          <leafValues>\r\n            -3.5493713617324829e-001 5.5815106630325317e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 5 1460877355 -15613689 558207061 -1623109371\r\n            -1926723379 244908044 -113047169 1414649856</internalNodes>\r\n          <leafValues>\r\n            -5.8201593160629272e-001 3.5618588328361511e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 103 -669296387 189940185 -1860046723 -1760460773\r\n            -1740078915 -931100536 276828352 -1917868015</internalNodes>\r\n          <leafValues>\r\n            -4.2647001147270203e-001 4.6035429835319519e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 107 -2109233498 -602287230 -1054785005 1360101827\r\n            1099137177 -318504822 -1341497202 232232049</internalNodes>\r\n          <leafValues>\r\n            -4.9850422143936157e-001 4.4256457686424255e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 40 -54286241 -1608934766 286327519 -1270398764\r\n            1267376258 1636335746 542720627 1966594122</internalNodes>\r\n          <leafValues>\r\n            -5.5573022365570068e-001 3.9825862646102905e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 18 -904213325 1133543618 67508251 -714997735 1094779186\r\n            160088201 872654991 -903019733</internalNodes>\r\n          <leafValues>\r\n            -5.2738076448440552e-001 3.8662704825401306e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 70 1275766299 1347454976 150995380 -217382907\r\n            1661501627 -788494333 1259046051 -1006600122</internalNodes>\r\n          <leafValues>\r\n            -4.6260216832160950e-001 4.6852749586105347e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 121 -367803633 420562962 36765796 -502050533 1380984391\r\n            268601345 536897573 -995624251</internalNodes>\r\n          <leafValues>\r\n            -5.2821987867355347e-001 4.4226339459419250e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 68 -470086117 1069514507 -268472471 1936420849\r\n            -1904232854 1475346303 -160432647 -258802070</internalNodes>\r\n          <leafValues>\r\n            -4.5063796639442444e-001 5.2728754281997681e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 85 -698610339 -1504477166 1267372697 822280328\r\n            -909606742 -561903583 -1658732533 962675013</internalNodes>\r\n          <leafValues>\r\n            -5.5067950487136841e-001 3.9346820116043091e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 11 -->\r\n    <_>\r\n      <maxWeakCount>9</maxWeakCount>\r\n      <stageThreshold>-7.5511032342910767e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 27 -485801045 -1031585761 285212749 -1013038975\r\n            427848842 -1006632832 -1039468406 -162905189</internalNodes>\r\n          <leafValues>\r\n            -4.8945146799087524e-001 4.7218933701515198e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 114 -962887670 1547862275 -1827077881 1140871689\r\n            -536829941 -763363328 -264142181 1112595267</internalNodes>\r\n          <leafValues>\r\n            -6.1379230022430420e-001 3.4447920322418213e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 111 -784109321 320069633 1073811463 1074292770\r\n            -2138957664 -2130001880 -2147252214 315289683</internalNodes>\r\n          <leafValues>\r\n            -5.6861025094985962e-001 3.7049382925033569e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 80 -679857295 -17928596 -328961 991442748 1064728144\r\n            -357040523 -1082493190 -1368229638</internalNodes>\r\n          <leafValues>\r\n            -3.9095887541770935e-001 6.0248941183090210e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 82 175736687 -17072405 2130705262 -218107907\r\n            -1358978530 1692925804 787824558 -672137257</internalNodes>\r\n          <leafValues>\r\n            -4.0445902943611145e-001 6.0857713222503662e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 47 -985116365 -553647839 420626839 1968635918\r\n            -1576924981 -360119808 142606465 -795508656</internalNodes>\r\n          <leafValues>\r\n            -4.8094493150711060e-001 5.1770961284637451e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 50 -1459109750 33792144 21514342 1343230978 1124110539\r\n            50364672 441024643 -202393597</internalNodes>\r\n          <leafValues>\r\n            -5.2261912822723389e-001 4.6680617332458496e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 98 -259008926 1378975745 -1476362162 1888485505\r\n            1082744897 571146241 1367392642 -1073229683</internalNodes>\r\n          <leafValues>\r\n            -6.1712646484375000e-001 3.8970091938972473e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 125 34318799 1090695442 25199491 1342177299 -2060943181\r\n            143360000 -2097010032 -907873592</internalNodes>\r\n          <leafValues>\r\n            -5.3400212526321411e-001 4.4268184900283813e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 12 -->\r\n    <_>\r\n      <maxWeakCount>10</maxWeakCount>\r\n      <stageThreshold>-4.8388049006462097e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 120 -1477443585 -1140940929 -1342185476 1308588029\r\n            -1376256001 218070525 1073741181 -41951875</internalNodes>\r\n          <leafValues>\r\n            -5.0602412223815918e-001 5.5081558227539063e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 36 -73936261 -2137816955 -1073659749 -553533419\r\n            -1073706765 -30799693 -972443088 1998113303</internalNodes>\r\n          <leafValues>\r\n            -4.8420175909996033e-001 4.5527526736259460e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 77 454566983 420696071 16777221 -2130608117 -1719576352\r\n            -644874174 -2111166071 577795078</internalNodes>\r\n          <leafValues>\r\n            -6.1467814445495605e-001 3.4610831737518311e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 60 -1592753970 -251404269 570458176 486621571\r\n            -2130476982 -1207431030 25803086 -2029039551</internalNodes>\r\n          <leafValues>\r\n            -5.2004736661911011e-001 4.5498979091644287e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 72 694105913 1907355278 -37129 821280759 931135417\r\n            -923336907 1073716718 -68419540</internalNodes>\r\n          <leafValues>\r\n            -4.1492795944213867e-001 5.7309722900390625e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 79 1393265851 -1032732526 264196 -920530793 754211\r\n            169623560 1149456611 1135983235</internalNodes>\r\n          <leafValues>\r\n            -5.1638025045394897e-001 4.7242832183837891e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 73 706130001 -1708251305 1056944760 1006373626\r\n            -1303178409 -813991949 -1183128387 -604048669</internalNodes>\r\n          <leafValues>\r\n            -4.1649991273880005e-001 5.9589266777038574e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 95 -904859491 -134017015 1090589192 -587038719\r\n            -167673709 -897449815 152141841 886696449</internalNodes>\r\n          <leafValues>\r\n            -6.4827072620391846e-001 3.5843926668167114e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 90 -717057392 690163912 822149263 65803 -1706982525\r\n            -1736400884 534537 -1630082545</internalNodes>\r\n          <leafValues>\r\n            -5.0309199094772339e-001 5.1634097099304199e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 12 -1366843350 -2126376671 1041 -566034432 142770176\r\n            12583104 51712 1116198165</internalNodes>\r\n          <leafValues>\r\n            -7.9860860109329224e-001 3.1541401147842407e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 13 -->\r\n    <_>\r\n      <maxWeakCount>10</maxWeakCount>\r\n      <stageThreshold>-5.6616169214248657e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 28 -143395977 2004844407 -32897 1840447419 -852257\r\n            -4097 -272630497 -1165502065</internalNodes>\r\n          <leafValues>\r\n            -4.4186046719551086e-001 5.1379764080047607e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 8 -519577109 -427718635 -1862262703 -65943231 9163380\r\n            1112064264 553714225 1157599521</internalNodes>\r\n          <leafValues>\r\n            -6.9529622793197632e-001 2.9373377561569214e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 109 990036221 -1392408495 85 -1455423472 537079956\r\n            -1451032448 -2121658180 -1917118335</internalNodes>\r\n          <leafValues>\r\n            -4.6548900008201599e-001 4.4904062151908875e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 83 -307263958 1726969598 602799716 -587284627\r\n            -2110304757 -1500547078 1400237979 -194002951</internalNodes>\r\n          <leafValues>\r\n            -4.4492045044898987e-001 5.2867370843887329e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 84 -696132137 331497536 -1868546039 -1859480056\r\n            1753940107 -1029504896 -1341584891 937520647</internalNodes>\r\n          <leafValues>\r\n            -4.9129620194435120e-001 4.4696673750877380e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 61 -1056718371 -912911872 67113021 1498447874 134777514\r\n            -1412955989 -2138406733 1082270464</internalNodes>\r\n          <leafValues>\r\n            -5.8106380701065063e-001 4.1291686892509460e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 43 -648808770 -703963135 -2147401712 -1858043831\r\n            1073823883 1074266248 159924795 1879588907</internalNodes>\r\n          <leafValues>\r\n            -5.2166140079498291e-001 4.6159252524375916e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 65 538123210 285607041 -2122121208 -1651965941\r\n            -1047953261 1661077920 591915 1689841382</internalNodes>\r\n          <leafValues>\r\n            -7.4180144071578979e-001 3.0022916197776794e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 55 805390529 407044123 285213203 211421255 -1702852378\r\n            -1919942528 -2134294375 2066729839</internalNodes>\r\n          <leafValues>\r\n            -4.8658525943756104e-001 5.4231238365173340e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 69 -490280822 -1274937328 268439820 1359003776\r\n            -931126870 1220674050 268681287 1997226373</internalNodes>\r\n          <leafValues>\r\n            -5.6268626451492310e-001 4.5061412453651428e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 14 -->\r\n    <_>\r\n      <maxWeakCount>10</maxWeakCount>\r\n      <stageThreshold>-9.9649858474731445e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 122 -1745100805 -1209164803 -1073770531 -436207891\r\n            -1090560009 234354687 -1610664449 -1082138881</internalNodes>\r\n          <leafValues>\r\n            -4.0143370628356934e-001 5.6573116779327393e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 11 -644493203 -1021149047 16847288 -804977263\r\n            1074438223 1375879170 1099505907 -233072125</internalNodes>\r\n          <leafValues>\r\n            -4.9022576212882996e-001 4.1356840729713440e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 110 -1092637138 -1127253650 -604013462 309325799\r\n            511047567 -562074754 -700452946 -763371997</internalNodes>\r\n          <leafValues>\r\n            -4.2038223147392273e-001 5.0647193193435669e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 24 1223739637 -1419051417 1043595135 -215335105\r\n            376670206 -167870465 -4194306 -222771398</internalNodes>\r\n          <leafValues>\r\n            -4.0432786941528320e-001 5.9335744380950928e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 75 -1761937577 -1076383745 -286361737 -9060559\r\n            2013197781 2013265783 -98370 -1002109842</internalNodes>\r\n          <leafValues>\r\n            -4.4517979025840759e-001 5.2503407001495361e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 102 1359075611 -233766656 65681 -1878048735 -1610570746\r\n            1379991688 -1073689784 -221669373</internalNodes>\r\n          <leafValues>\r\n            -4.9918147921562195e-001 4.6203434467315674e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 52 1186053495 -36241670 -268451888 519745529 175382495\r\n            788381687 2147319804 1327036346</internalNodes>\r\n          <leafValues>\r\n            -4.6265572309494019e-001 5.1841813325881958e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 59 -1040035797 1946189894 50247 -1862266624 1090519113\r\n            268961800 679544907 757613389</internalNodes>\r\n          <leafValues>\r\n            -5.5006593465805054e-001 4.4656375050544739e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 10 1610993732 -939524096 1073877397 -267910919\r\n            151167146 537427968 -769096510 -181428117</internalNodes>\r\n          <leafValues>\r\n            -5.6329357624053955e-001 4.2267900705337524e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 86 -1596021624 2047393801 -2130673584 -1856700352\r\n            327207619 272728192 -2004808112 491069440</internalNodes>\r\n          <leafValues>\r\n            -6.3942277431488037e-001 3.8081073760986328e-001</leafValues></_></weakClassifiers></_>\r\n    <!-- stage 15 -->\r\n    <_>\r\n      <maxWeakCount>8</maxWeakCount>\r\n      <stageThreshold>-5.5261385440826416e-001</stageThreshold>\r\n      <weakClassifiers>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 13 -648185009 -1315897313 -2139077632 1367998985\r\n            1744840211 -1005502457 -935198613 -74777841</internalNodes>\r\n          <leafValues>\r\n            -5.3191488981246948e-001 4.0654698014259338e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 105 1699432742 -1890377581 1343232064 -1039957887\r\n            -2142687167 637566976 -2122282989 -460871217</internalNodes>\r\n          <leafValues>\r\n            -5.4315727949142456e-001 3.6683899164199829e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 81 -67160267 2105388843 -1619001345 1937768302\r\n            -1359003974 -1098989786 -805322771 -1874678652</internalNodes>\r\n          <leafValues>\r\n            -3.9974156022071838e-001 5.5645257234573364e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 58 -1072656189 1095241792 16777487 -352059374 4718723\r\n            1109393544 1074438486 -1848987381</internalNodes>\r\n          <leafValues>\r\n            -5.0869542360305786e-001 4.9633875489234924e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 22 226493774 -1911816127 1091108968 26214662 26222970\r\n            -1123287032 -1987040599 -882898875</internalNodes>\r\n          <leafValues>\r\n            -6.0312920808792114e-001 3.5752627253532410e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 127 -259153461 -805273578 50364730 -1060208632\r\n            -1708161014 947912705 -2147450710 80388754</internalNodes>\r\n          <leafValues>\r\n            -6.9576680660247803e-001 3.3376914262771606e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 42 -800800303 1368954882 75795 2031108096 -2013069281\r\n            212336778 538680 2064105488</internalNodes>\r\n          <leafValues>\r\n            -5.6596046686172485e-001 4.3809539079666138e-001</leafValues></_>\r\n        <_>\r\n          <internalNodes>\r\n            0 -1 74 -2108215089 1260109955 -1207926768 268812673\r\n            -2146893693 167788680 55189712 -140564306</internalNodes>\r\n          <leafValues>\r\n            -5.1393473148345947e-001 4.8148322105407715e-001</leafValues></_></weakClassifiers></_></stages>\r\n  <features>\r\n    <_>\r\n      <rect>\r\n        0 0 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 0 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 0 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 0 2 11</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 0 3 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 0 4 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 1 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 1 3 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 2 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 2 4 17</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 3 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 4 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 4 1 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 4 1 18</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 4 2 21</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 5 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 5 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 5 1 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 5 2 11</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 6 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 7 1 15</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 7 2 18</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 13 3 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 13 3 19</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 14 2 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 14 2 14</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 16 3 17</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 17 1 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 17 2 9</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 18 1 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 19 2 17</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 21 4 13</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 21 4 16</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 22 2 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 36 1 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 40 2 12</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 43 1 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 46 2 10</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 48 1 9</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 48 2 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 50 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 56 2 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 71 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 74 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 77 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        0 77 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 0 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 0 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 0 3 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 2 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 4 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 4 3 23</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 5 2 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 9 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 10 2 15</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 12 2 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 14 2 9</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 25 2 18</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 39 2 10</rect></_>\r\n    <_>\r\n      <rect>\r\n        1 71 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 0 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 0 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 3 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 4 1 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 16 3 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 18 3 14</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 21 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 22 1 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 24 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        2 64 1 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 0 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 1 3 25</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 2 3 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 3 2 11</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 6 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 17 1 11</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 22 3 17</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 23 1 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 42 1 10</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 52 1 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        3 77 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 0 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 1 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        4 2 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 7 2 20</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 12 2 19</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 14 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        5 19 2 15</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 0 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 0 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 1 2 13</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 5 2 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 7 2 17</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 10 2 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 13 2 10</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 14 2 13</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 16 2 14</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 19 2 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 36 1 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 39 2 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 41 2 9</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 44 2 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 51 2 6</rect></_>\r\n    <_>\r\n      <rect>\r\n        6 77 2 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 0 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 9 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 20 1 9</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 23 1 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 45 1 7</rect></_>\r\n    <_>\r\n      <rect>\r\n        7 77 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 0 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 47 1 11</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 53 1 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        8 77 1 1</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 0 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 0 1 15</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 0 1 20</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 2 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 3 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 6 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 9 1 13</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 13 1 2</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 13 1 8</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 19 1 16</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 20 1 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 25 1 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 43 1 5</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 48 1 4</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 59 1 3</rect></_>\r\n    <_>\r\n      <rect>\r\n        9 61 1 5</rect></_></features></cascade>\r\n</opencv_storage>\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv/cv.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OLD_CV_H__\n#define __OPENCV_OLD_CV_H__\n\n#if defined(_MSC_VER)\n    #define CV_DO_PRAGMA(x) __pragma(x)\n    #define __CVSTR2__(x) #x\n    #define __CVSTR1__(x) __CVSTR2__(x)\n    #define __CVMSVCLOC__ __FILE__ \"(\"__CVSTR1__(__LINE__)\") : \"\n    #define CV_MSG_PRAGMA(_msg) CV_DO_PRAGMA(message (__CVMSVCLOC__ _msg))\n#elif defined(__GNUC__)\n    #define CV_DO_PRAGMA(x) _Pragma (#x)\n    #define CV_MSG_PRAGMA(_msg) CV_DO_PRAGMA(message (_msg))\n#else\n    #define CV_DO_PRAGMA(x)\n    #define CV_MSG_PRAGMA(_msg)\n#endif\n#define CV_WARNING(x) CV_MSG_PRAGMA(\"Warning: \" #x)\n\n//CV_WARNING(\"This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module\")\n\n#include \"opencv2/core/core_c.h\"\n#include \"opencv2/imgproc/imgproc_c.h\"\n#include \"opencv2/photo/photo_c.h\"\n#include \"opencv2/video/tracking_c.h\"\n#include \"opencv2/objdetect/objdetect_c.h\"\n\n#if !defined(CV_IMPL)\n#define CV_IMPL extern \"C\"\n#endif //CV_IMPL\n\n#endif // __OPENCV_OLD_CV_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv/cv.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OLD_CV_HPP__\n#define __OPENCV_OLD_CV_HPP__\n\n//#if defined(__GNUC__)\n//#warning \"This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module\"\n//#endif\n\n#include \"cv.h\"\n#include \"opencv2/core.hpp\"\n#include \"opencv2/imgproc.hpp\"\n#include \"opencv2/photo.hpp\"\n#include \"opencv2/video.hpp\"\n#include \"opencv2/highgui.hpp\"\n#include \"opencv2/features2d.hpp\"\n#include \"opencv2/calib3d.hpp\"\n#include \"opencv2/objdetect.hpp\"\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv/cvaux.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                        Intel License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000, Intel Corporation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of Intel Corporation may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OLD_AUX_H__\n#define __OPENCV_OLD_AUX_H__\n\n//#if defined(__GNUC__)\n//#warning \"This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module\"\n//#endif\n\n#include \"opencv2/core/core_c.h\"\n#include \"opencv2/imgproc/imgproc_c.h\"\n#include \"opencv2/photo/photo_c.h\"\n#include \"opencv2/video/tracking_c.h\"\n#include \"opencv2/objdetect/objdetect_c.h\"\n\n#endif\n\n/* End of file. */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv/cvaux.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                        Intel License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000, Intel Corporation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of Intel Corporation may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OLD_AUX_HPP__\n#define __OPENCV_OLD_AUX_HPP__\n\n//#if defined(__GNUC__)\n//#warning \"This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module\"\n//#endif\n\n#include \"cvaux.h\"\n#include \"opencv2/core/utility.hpp\"\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv/cvwimage.h",
    "content": "///////////////////////////////////////////////////////////////////////////////\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to\n//  this license.  If you do not agree to this license, do not download,\n//  install, copy or use the software.\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2008, Google, all rights reserved.\n// Third party copyrights are property of their respective owners.\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//  * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//  * Redistribution's 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//  * The name of Intel Corporation or contributors may not be used to endorse\n//     or promote products derived from this software without specific\n//     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\n// are disclaimed. In no event shall the Intel Corporation or contributors be\n// liable for any direct, indirect, incidental, special, exemplary, or\n// consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n\n\n#ifndef __OPENCV_OLD_WIMAGE_HPP__\n#define __OPENCV_OLD_WIMAGE_HPP__\n\n#include \"opencv2/core/wimage.hpp\"\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv/cxcore.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OLD_CXCORE_H__\n#define __OPENCV_OLD_CXCORE_H__\n\n//#if defined(__GNUC__)\n//#warning \"This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module\"\n//#endif\n\n#include \"opencv2/core/core_c.h\"\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv/cxcore.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OLD_CXCORE_HPP__\n#define __OPENCV_OLD_CXCORE_HPP__\n\n//#if defined(__GNUC__)\n//#warning \"This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module\"\n//#endif\n\n#include \"cxcore.h\"\n#include \"opencv2/core.hpp\"\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv/cxeigen.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OLD_EIGEN_HPP__\n#define __OPENCV_OLD_EIGEN_HPP__\n\n#include \"opencv2/core/eigen.hpp\"\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv/cxmisc.h",
    "content": "#ifndef __OPENCV_OLD_CXMISC_H__\n#define __OPENCV_OLD_CXMISC_H__\n\n#ifdef __cplusplus\n#  include \"opencv2/core/utility.hpp\"\n#endif\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv/highgui.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                        Intel License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000, Intel Corporation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of Intel Corporation may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OLD_HIGHGUI_H__\n#define __OPENCV_OLD_HIGHGUI_H__\n\n#include \"opencv2/core/core_c.h\"\n#include \"opencv2/highgui/highgui_c.h\"\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv/ml.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                        Intel License Agreement\n//\n// Copyright (C) 2000, Intel Corporation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of Intel Corporation may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OLD_ML_H__\n#define __OPENCV_OLD_ML_H__\n\n#include \"opencv2/core/core_c.h\"\n#include \"opencv2/ml.hpp\"\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/calib3d/calib3d.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/calib3d.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/calib3d/calib3d_c.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CALIB3D_C_H__\n#define __OPENCV_CALIB3D_C_H__\n\n#include \"opencv2/core/core_c.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup calib3d_c\n  @{\n  */\n\n/****************************************************************************************\\\n*                      Camera Calibration, Pose Estimation and Stereo                    *\n\\****************************************************************************************/\n\ntypedef struct CvPOSITObject CvPOSITObject;\n\n/* Allocates and initializes CvPOSITObject structure before doing cvPOSIT */\nCVAPI(CvPOSITObject*)  cvCreatePOSITObject( CvPoint3D32f* points, int point_count );\n\n\n/* Runs POSIT (POSe from ITeration) algorithm for determining 3d position of\n   an object given its model and projection in a weak-perspective case */\nCVAPI(void)  cvPOSIT(  CvPOSITObject* posit_object, CvPoint2D32f* image_points,\n                       double focal_length, CvTermCriteria criteria,\n                       float* rotation_matrix, float* translation_vector);\n\n/* Releases CvPOSITObject structure */\nCVAPI(void)  cvReleasePOSITObject( CvPOSITObject**  posit_object );\n\n/* updates the number of RANSAC iterations */\nCVAPI(int) cvRANSACUpdateNumIters( double p, double err_prob,\n                                   int model_points, int max_iters );\n\nCVAPI(void) cvConvertPointsHomogeneous( const CvMat* src, CvMat* dst );\n\n/* Calculates fundamental matrix given a set of corresponding points */\n#define CV_FM_7POINT 1\n#define CV_FM_8POINT 2\n\n#define CV_LMEDS 4\n#define CV_RANSAC 8\n\n#define CV_FM_LMEDS_ONLY  CV_LMEDS\n#define CV_FM_RANSAC_ONLY CV_RANSAC\n#define CV_FM_LMEDS CV_LMEDS\n#define CV_FM_RANSAC CV_RANSAC\n\nenum\n{\n    CV_ITERATIVE = 0,\n    CV_EPNP = 1, // F.Moreno-Noguer, V.Lepetit and P.Fua \"EPnP: Efficient Perspective-n-Point Camera Pose Estimation\"\n    CV_P3P = 2, // X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang; \"Complete Solution Classification for the Perspective-Three-Point Problem\"\n    CV_DLS = 3 // Joel A. Hesch and Stergios I. Roumeliotis. \"A Direct Least-Squares (DLS) Method for PnP\"\n};\n\nCVAPI(int) cvFindFundamentalMat( const CvMat* points1, const CvMat* points2,\n                                 CvMat* fundamental_matrix,\n                                 int method CV_DEFAULT(CV_FM_RANSAC),\n                                 double param1 CV_DEFAULT(3.), double param2 CV_DEFAULT(0.99),\n                                 CvMat* status CV_DEFAULT(NULL) );\n\n/* For each input point on one of images\n   computes parameters of the corresponding\n   epipolar line on the other image */\nCVAPI(void) cvComputeCorrespondEpilines( const CvMat* points,\n                                         int which_image,\n                                         const CvMat* fundamental_matrix,\n                                         CvMat* correspondent_lines );\n\n/* Triangulation functions */\n\nCVAPI(void) cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2,\n                                CvMat* projPoints1, CvMat* projPoints2,\n                                CvMat* points4D);\n\nCVAPI(void) cvCorrectMatches(CvMat* F, CvMat* points1, CvMat* points2,\n                             CvMat* new_points1, CvMat* new_points2);\n\n\n/* Computes the optimal new camera matrix according to the free scaling parameter alpha:\n   alpha=0 - only valid pixels will be retained in the undistorted image\n   alpha=1 - all the source image pixels will be retained in the undistorted image\n*/\nCVAPI(void) cvGetOptimalNewCameraMatrix( const CvMat* camera_matrix,\n                                         const CvMat* dist_coeffs,\n                                         CvSize image_size, double alpha,\n                                         CvMat* new_camera_matrix,\n                                         CvSize new_imag_size CV_DEFAULT(cvSize(0,0)),\n                                         CvRect* valid_pixel_ROI CV_DEFAULT(0),\n                                         int center_principal_point CV_DEFAULT(0));\n\n/* Converts rotation vector to rotation matrix or vice versa */\nCVAPI(int) cvRodrigues2( const CvMat* src, CvMat* dst,\n                         CvMat* jacobian CV_DEFAULT(0) );\n\n/* Finds perspective transformation between the object plane and image (view) plane */\nCVAPI(int) cvFindHomography( const CvMat* src_points,\n                             const CvMat* dst_points,\n                             CvMat* homography,\n                             int method CV_DEFAULT(0),\n                             double ransacReprojThreshold CV_DEFAULT(3),\n                             CvMat* mask CV_DEFAULT(0),\n                             int maxIters CV_DEFAULT(2000),\n                             double confidence CV_DEFAULT(0.995));\n\n/* Computes RQ decomposition for 3x3 matrices */\nCVAPI(void) cvRQDecomp3x3( const CvMat *matrixM, CvMat *matrixR, CvMat *matrixQ,\n                           CvMat *matrixQx CV_DEFAULT(NULL),\n                           CvMat *matrixQy CV_DEFAULT(NULL),\n                           CvMat *matrixQz CV_DEFAULT(NULL),\n                           CvPoint3D64f *eulerAngles CV_DEFAULT(NULL));\n\n/* Computes projection matrix decomposition */\nCVAPI(void) cvDecomposeProjectionMatrix( const CvMat *projMatr, CvMat *calibMatr,\n                                         CvMat *rotMatr, CvMat *posVect,\n                                         CvMat *rotMatrX CV_DEFAULT(NULL),\n                                         CvMat *rotMatrY CV_DEFAULT(NULL),\n                                         CvMat *rotMatrZ CV_DEFAULT(NULL),\n                                         CvPoint3D64f *eulerAngles CV_DEFAULT(NULL));\n\n/* Computes d(AB)/dA and d(AB)/dB */\nCVAPI(void) cvCalcMatMulDeriv( const CvMat* A, const CvMat* B, CvMat* dABdA, CvMat* dABdB );\n\n/* Computes r3 = rodrigues(rodrigues(r2)*rodrigues(r1)),\n   t3 = rodrigues(r2)*t1 + t2 and the respective derivatives */\nCVAPI(void) cvComposeRT( const CvMat* _rvec1, const CvMat* _tvec1,\n                         const CvMat* _rvec2, const CvMat* _tvec2,\n                         CvMat* _rvec3, CvMat* _tvec3,\n                         CvMat* dr3dr1 CV_DEFAULT(0), CvMat* dr3dt1 CV_DEFAULT(0),\n                         CvMat* dr3dr2 CV_DEFAULT(0), CvMat* dr3dt2 CV_DEFAULT(0),\n                         CvMat* dt3dr1 CV_DEFAULT(0), CvMat* dt3dt1 CV_DEFAULT(0),\n                         CvMat* dt3dr2 CV_DEFAULT(0), CvMat* dt3dt2 CV_DEFAULT(0) );\n\n/* Projects object points to the view plane using\n   the specified extrinsic and intrinsic camera parameters */\nCVAPI(void) cvProjectPoints2( const CvMat* object_points, const CvMat* rotation_vector,\n                              const CvMat* translation_vector, const CvMat* camera_matrix,\n                              const CvMat* distortion_coeffs, CvMat* image_points,\n                              CvMat* dpdrot CV_DEFAULT(NULL), CvMat* dpdt CV_DEFAULT(NULL),\n                              CvMat* dpdf CV_DEFAULT(NULL), CvMat* dpdc CV_DEFAULT(NULL),\n                              CvMat* dpddist CV_DEFAULT(NULL),\n                              double aspect_ratio CV_DEFAULT(0));\n\n/* Finds extrinsic camera parameters from\n   a few known corresponding point pairs and intrinsic parameters */\nCVAPI(void) cvFindExtrinsicCameraParams2( const CvMat* object_points,\n                                          const CvMat* image_points,\n                                          const CvMat* camera_matrix,\n                                          const CvMat* distortion_coeffs,\n                                          CvMat* rotation_vector,\n                                          CvMat* translation_vector,\n                                          int use_extrinsic_guess CV_DEFAULT(0) );\n\n/* Computes initial estimate of the intrinsic camera parameters\n   in case of planar calibration target (e.g. chessboard) */\nCVAPI(void) cvInitIntrinsicParams2D( const CvMat* object_points,\n                                     const CvMat* image_points,\n                                     const CvMat* npoints, CvSize image_size,\n                                     CvMat* camera_matrix,\n                                     double aspect_ratio CV_DEFAULT(1.) );\n\n#define CV_CALIB_CB_ADAPTIVE_THRESH  1\n#define CV_CALIB_CB_NORMALIZE_IMAGE  2\n#define CV_CALIB_CB_FILTER_QUADS     4\n#define CV_CALIB_CB_FAST_CHECK       8\n\n// Performs a fast check if a chessboard is in the input image. This is a workaround to\n// a problem of cvFindChessboardCorners being slow on images with no chessboard\n// - src: input image\n// - size: chessboard size\n// Returns 1 if a chessboard can be in this image and findChessboardCorners should be called,\n// 0 if there is no chessboard, -1 in case of error\nCVAPI(int) cvCheckChessboard(IplImage* src, CvSize size);\n\n    /* Detects corners on a chessboard calibration pattern */\nCVAPI(int) cvFindChessboardCorners( const void* image, CvSize pattern_size,\n                                    CvPoint2D32f* corners,\n                                    int* corner_count CV_DEFAULT(NULL),\n                                    int flags CV_DEFAULT(CV_CALIB_CB_ADAPTIVE_THRESH+CV_CALIB_CB_NORMALIZE_IMAGE) );\n\n/* Draws individual chessboard corners or the whole chessboard detected */\nCVAPI(void) cvDrawChessboardCorners( CvArr* image, CvSize pattern_size,\n                                     CvPoint2D32f* corners,\n                                     int count, int pattern_was_found );\n\n#define CV_CALIB_USE_INTRINSIC_GUESS  1\n#define CV_CALIB_FIX_ASPECT_RATIO     2\n#define CV_CALIB_FIX_PRINCIPAL_POINT  4\n#define CV_CALIB_ZERO_TANGENT_DIST    8\n#define CV_CALIB_FIX_FOCAL_LENGTH 16\n#define CV_CALIB_FIX_K1  32\n#define CV_CALIB_FIX_K2  64\n#define CV_CALIB_FIX_K3  128\n#define CV_CALIB_FIX_K4  2048\n#define CV_CALIB_FIX_K5  4096\n#define CV_CALIB_FIX_K6  8192\n#define CV_CALIB_RATIONAL_MODEL 16384\n#define CV_CALIB_THIN_PRISM_MODEL 32768\n#define CV_CALIB_FIX_S1_S2_S3_S4  65536\n\n\n/* Finds intrinsic and extrinsic camera parameters\n   from a few views of known calibration pattern */\nCVAPI(double) cvCalibrateCamera2( const CvMat* object_points,\n                                const CvMat* image_points,\n                                const CvMat* point_counts,\n                                CvSize image_size,\n                                CvMat* camera_matrix,\n                                CvMat* distortion_coeffs,\n                                CvMat* rotation_vectors CV_DEFAULT(NULL),\n                                CvMat* translation_vectors CV_DEFAULT(NULL),\n                                int flags CV_DEFAULT(0),\n                                CvTermCriteria term_crit CV_DEFAULT(cvTermCriteria(\n                                    CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,DBL_EPSILON)) );\n\n/* Computes various useful characteristics of the camera from the data computed by\n   cvCalibrateCamera2 */\nCVAPI(void) cvCalibrationMatrixValues( const CvMat *camera_matrix,\n                                CvSize image_size,\n                                double aperture_width CV_DEFAULT(0),\n                                double aperture_height CV_DEFAULT(0),\n                                double *fovx CV_DEFAULT(NULL),\n                                double *fovy CV_DEFAULT(NULL),\n                                double *focal_length CV_DEFAULT(NULL),\n                                CvPoint2D64f *principal_point CV_DEFAULT(NULL),\n                                double *pixel_aspect_ratio CV_DEFAULT(NULL));\n\n#define CV_CALIB_FIX_INTRINSIC  256\n#define CV_CALIB_SAME_FOCAL_LENGTH 512\n\n/* Computes the transformation from one camera coordinate system to another one\n   from a few correspondent views of the same calibration target. Optionally, calibrates\n   both cameras */\nCVAPI(double) cvStereoCalibrate( const CvMat* object_points, const CvMat* image_points1,\n                               const CvMat* image_points2, const CvMat* npoints,\n                               CvMat* camera_matrix1, CvMat* dist_coeffs1,\n                               CvMat* camera_matrix2, CvMat* dist_coeffs2,\n                               CvSize image_size, CvMat* R, CvMat* T,\n                               CvMat* E CV_DEFAULT(0), CvMat* F CV_DEFAULT(0),\n                               int flags CV_DEFAULT(CV_CALIB_FIX_INTRINSIC),\n                               CvTermCriteria term_crit CV_DEFAULT(cvTermCriteria(\n                                   CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,1e-6)) );\n\n#define CV_CALIB_ZERO_DISPARITY 1024\n\n/* Computes 3D rotations (+ optional shift) for each camera coordinate system to make both\n   views parallel (=> to make all the epipolar lines horizontal or vertical) */\nCVAPI(void) cvStereoRectify( const CvMat* camera_matrix1, const CvMat* camera_matrix2,\n                             const CvMat* dist_coeffs1, const CvMat* dist_coeffs2,\n                             CvSize image_size, const CvMat* R, const CvMat* T,\n                             CvMat* R1, CvMat* R2, CvMat* P1, CvMat* P2,\n                             CvMat* Q CV_DEFAULT(0),\n                             int flags CV_DEFAULT(CV_CALIB_ZERO_DISPARITY),\n                             double alpha CV_DEFAULT(-1),\n                             CvSize new_image_size CV_DEFAULT(cvSize(0,0)),\n                             CvRect* valid_pix_ROI1 CV_DEFAULT(0),\n                             CvRect* valid_pix_ROI2 CV_DEFAULT(0));\n\n/* Computes rectification transformations for uncalibrated pair of images using a set\n   of point correspondences */\nCVAPI(int) cvStereoRectifyUncalibrated( const CvMat* points1, const CvMat* points2,\n                                        const CvMat* F, CvSize img_size,\n                                        CvMat* H1, CvMat* H2,\n                                        double threshold CV_DEFAULT(5));\n\n\n\n/* stereo correspondence parameters and functions */\n\n#define CV_STEREO_BM_NORMALIZED_RESPONSE  0\n#define CV_STEREO_BM_XSOBEL               1\n\n/* Block matching algorithm structure */\ntypedef struct CvStereoBMState\n{\n    // pre-filtering (normalization of input images)\n    int preFilterType; // =CV_STEREO_BM_NORMALIZED_RESPONSE now\n    int preFilterSize; // averaging window size: ~5x5..21x21\n    int preFilterCap; // the output of pre-filtering is clipped by [-preFilterCap,preFilterCap]\n\n    // correspondence using Sum of Absolute Difference (SAD)\n    int SADWindowSize; // ~5x5..21x21\n    int minDisparity;  // minimum disparity (can be negative)\n    int numberOfDisparities; // maximum disparity - minimum disparity (> 0)\n\n    // post-filtering\n    int textureThreshold;  // the disparity is only computed for pixels\n                           // with textured enough neighborhood\n    int uniquenessRatio;   // accept the computed disparity d* only if\n                           // SAD(d) >= SAD(d*)*(1 + uniquenessRatio/100.)\n                           // for any d != d*+/-1 within the search range.\n    int speckleWindowSize; // disparity variation window\n    int speckleRange; // acceptable range of variation in window\n\n    int trySmallerWindows; // if 1, the results may be more accurate,\n                           // at the expense of slower processing\n    CvRect roi1, roi2;\n    int disp12MaxDiff;\n\n    // temporary buffers\n    CvMat* preFilteredImg0;\n    CvMat* preFilteredImg1;\n    CvMat* slidingSumBuf;\n    CvMat* cost;\n    CvMat* disp;\n} CvStereoBMState;\n\n#define CV_STEREO_BM_BASIC 0\n#define CV_STEREO_BM_FISH_EYE 1\n#define CV_STEREO_BM_NARROW 2\n\nCVAPI(CvStereoBMState*) cvCreateStereoBMState(int preset CV_DEFAULT(CV_STEREO_BM_BASIC),\n                                              int numberOfDisparities CV_DEFAULT(0));\n\nCVAPI(void) cvReleaseStereoBMState( CvStereoBMState** state );\n\nCVAPI(void) cvFindStereoCorrespondenceBM( const CvArr* left, const CvArr* right,\n                                          CvArr* disparity, CvStereoBMState* state );\n\nCVAPI(CvRect) cvGetValidDisparityROI( CvRect roi1, CvRect roi2, int minDisparity,\n                                      int numberOfDisparities, int SADWindowSize );\n\nCVAPI(void) cvValidateDisparity( CvArr* disparity, const CvArr* cost,\n                                 int minDisparity, int numberOfDisparities,\n                                 int disp12MaxDiff CV_DEFAULT(1) );\n\n/* Reprojects the computed disparity image to the 3D space using the specified 4x4 matrix */\nCVAPI(void)  cvReprojectImageTo3D( const CvArr* disparityImage,\n                                   CvArr* _3dImage, const CvMat* Q,\n                                   int handleMissingValues CV_DEFAULT(0) );\n\n/** @} calib3d_c */\n\n#ifdef __cplusplus\n} // extern \"C\"\n\n//////////////////////////////////////////////////////////////////////////////////////////\nclass CV_EXPORTS CvLevMarq\n{\npublic:\n    CvLevMarq();\n    CvLevMarq( int nparams, int nerrs, CvTermCriteria criteria=\n              cvTermCriteria(CV_TERMCRIT_EPS+CV_TERMCRIT_ITER,30,DBL_EPSILON),\n              bool completeSymmFlag=false );\n    ~CvLevMarq();\n    void init( int nparams, int nerrs, CvTermCriteria criteria=\n              cvTermCriteria(CV_TERMCRIT_EPS+CV_TERMCRIT_ITER,30,DBL_EPSILON),\n              bool completeSymmFlag=false );\n    bool update( const CvMat*& param, CvMat*& J, CvMat*& err );\n    bool updateAlt( const CvMat*& param, CvMat*& JtJ, CvMat*& JtErr, double*& errNorm );\n\n    void clear();\n    void step();\n    enum { DONE=0, STARTED=1, CALC_J=2, CHECK_ERR=3 };\n\n    cv::Ptr<CvMat> mask;\n    cv::Ptr<CvMat> prevParam;\n    cv::Ptr<CvMat> param;\n    cv::Ptr<CvMat> J;\n    cv::Ptr<CvMat> err;\n    cv::Ptr<CvMat> JtJ;\n    cv::Ptr<CvMat> JtJN;\n    cv::Ptr<CvMat> JtErr;\n    cv::Ptr<CvMat> JtJV;\n    cv::Ptr<CvMat> JtJW;\n    double prevErrNorm, errNorm;\n    int lambdaLg10;\n    CvTermCriteria criteria;\n    int state;\n    int iters;\n    bool completeSymmFlag;\n};\n\n#endif\n\n#endif /* __OPENCV_CALIB3D_C_H__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/calib3d.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CALIB3D_HPP__\n#define __OPENCV_CALIB3D_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/features2d.hpp\"\n#include \"opencv2/core/affine.hpp\"\n\n/**\n  @defgroup calib3d Camera Calibration and 3D Reconstruction\n\nThe functions in this section use a so-called pinhole camera model. In this model, a scene view is\nformed by projecting 3D points into the image plane using a perspective transformation.\n\n\\f[s  \\; m' = A [R|t] M'\\f]\n\nor\n\n\\f[s  \\vecthree{u}{v}{1} = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\n\\begin{bmatrix}\nr_{11} & r_{12} & r_{13} & t_1  \\\\\nr_{21} & r_{22} & r_{23} & t_2  \\\\\nr_{31} & r_{32} & r_{33} & t_3\n\\end{bmatrix}\n\\begin{bmatrix}\nX \\\\\nY \\\\\nZ \\\\\n1\n\\end{bmatrix}\\f]\n\nwhere:\n\n-   \\f$(X, Y, Z)\\f$ are the coordinates of a 3D point in the world coordinate space\n-   \\f$(u, v)\\f$ are the coordinates of the projection point in pixels\n-   \\f$A\\f$ is a camera matrix, or a matrix of intrinsic parameters\n-   \\f$(cx, cy)\\f$ is a principal point that is usually at the image center\n-   \\f$fx, fy\\f$ are the focal lengths expressed in pixel units.\n\nThus, if an image from the camera is scaled by a factor, all of these parameters should be scaled\n(multiplied/divided, respectively) by the same factor. The matrix of intrinsic parameters does not\ndepend on the scene viewed. So, once estimated, it can be re-used as long as the focal length is\nfixed (in case of zoom lens). The joint rotation-translation matrix \\f$[R|t]\\f$ is called a matrix of\nextrinsic parameters. It is used to describe the camera motion around a static scene, or vice versa,\nrigid motion of an object in front of a still camera. That is, \\f$[R|t]\\f$ translates coordinates of a\npoint \\f$(X, Y, Z)\\f$ to a coordinate system, fixed with respect to the camera. The transformation above\nis equivalent to the following (when \\f$z \\ne 0\\f$ ):\n\n\\f[\\begin{array}{l}\n\\vecthree{x}{y}{z} = R  \\vecthree{X}{Y}{Z} + t \\\\\nx' = x/z \\\\\ny' = y/z \\\\\nu = f_x*x' + c_x \\\\\nv = f_y*y' + c_y\n\\end{array}\\f]\n\nReal lenses usually have some distortion, mostly radial distortion and slight tangential distortion.\nSo, the above model is extended as:\n\n\\f[\\begin{array}{l} \\vecthree{x}{y}{z} = R  \\vecthree{X}{Y}{Z} + t \\\\ x' = x/z \\\\ y' = y/z \\\\ x'' = x'  \\frac{1 + k_1 r^2 + k_2 r^4 + k_3 r^6}{1 + k_4 r^2 + k_5 r^4 + k_6 r^6} + 2 p_1 x' y' + p_2(r^2 + 2 x'^2) + s_1 r^2 + s_2 r^4 \\\\ y'' = y'  \\frac{1 + k_1 r^2 + k_2 r^4 + k_3 r^6}{1 + k_4 r^2 + k_5 r^4 + k_6 r^6} + p_1 (r^2 + 2 y'^2) + 2 p_2 x' y' + s_1 r^2 + s_2 r^4 \\\\ \\text{where} \\quad r^2 = x'^2 + y'^2  \\\\ u = f_x*x'' + c_x \\\\ v = f_y*y'' + c_y \\end{array}\\f]\n\n\\f$k_1\\f$, \\f$k_2\\f$, \\f$k_3\\f$, \\f$k_4\\f$, \\f$k_5\\f$, and \\f$k_6\\f$ are radial distortion coefficients. \\f$p_1\\f$ and \\f$p_2\\f$ are\ntangential distortion coefficients. \\f$s_1\\f$, \\f$s_2\\f$, \\f$s_3\\f$, and \\f$s_4\\f$, are the thin prism distortion\ncoefficients. Higher-order coefficients are not considered in OpenCV. In the functions below the\ncoefficients are passed or returned as\n\n\\f[(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\\f]\n\nvector. That is, if the vector contains four elements, it means that \\f$k_3=0\\f$ . The distortion\ncoefficients do not depend on the scene viewed. Thus, they also belong to the intrinsic camera\nparameters. And they remain the same regardless of the captured image resolution. If, for example, a\ncamera has been calibrated on images of 320 x 240 resolution, absolutely the same distortion\ncoefficients can be used for 640 x 480 images from the same camera while \\f$f_x\\f$, \\f$f_y\\f$, \\f$c_x\\f$, and\n\\f$c_y\\f$ need to be scaled appropriately.\n\nThe functions below use the above model to do the following:\n\n-   Project 3D points to the image plane given intrinsic and extrinsic parameters.\n-   Compute extrinsic parameters given intrinsic parameters, a few 3D points, and their\nprojections.\n-   Estimate intrinsic and extrinsic camera parameters from several views of a known calibration\npattern (every view is described by several 3D-2D point correspondences).\n-   Estimate the relative position and orientation of the stereo camera \"heads\" and compute the\n*rectification* transformation that makes the camera optical axes parallel.\n\n@note\n   -   A calibration sample for 3 cameras in horizontal position can be found at\n        opencv_source_code/samples/cpp/3calibration.cpp\n    -   A calibration sample based on a sequence of images can be found at\n        opencv_source_code/samples/cpp/calibration.cpp\n    -   A calibration sample in order to do 3D reconstruction can be found at\n        opencv_source_code/samples/cpp/build3dmodel.cpp\n    -   A calibration sample of an artificially generated camera and chessboard patterns can be\n        found at opencv_source_code/samples/cpp/calibration_artificial.cpp\n    -   A calibration example on stereo calibration can be found at\n        opencv_source_code/samples/cpp/stereo_calib.cpp\n    -   A calibration example on stereo matching can be found at\n        opencv_source_code/samples/cpp/stereo_match.cpp\n    -   (Python) A camera calibration sample can be found at\n        opencv_source_code/samples/python2/calibrate.py\n\n  @{\n    @defgroup calib3d_fisheye Fisheye camera model\n\n    Definitions: Let P be a point in 3D of coordinates X in the world reference frame (stored in the\n    matrix X) The coordinate vector of P in the camera reference frame is:\n\n    \\f[Xc = R X + T\\f]\n\n    where R is the rotation matrix corresponding to the rotation vector om: R = rodrigues(om); call x, y\n    and z the 3 coordinates of Xc:\n\n    \\f[x = Xc_1 \\\\ y = Xc_2 \\\\ z = Xc_3\\f]\n\n    The pinehole projection coordinates of P is [a; b] where\n\n    \\f[a = x / z \\ and \\ b = y / z \\\\ r^2 = a^2 + b^2 \\\\ \\theta = atan(r)\\f]\n\n    Fisheye distortion:\n\n    \\f[\\theta_d = \\theta (1 + k_1 \\theta^2 + k_2 \\theta^4 + k_3 \\theta^6 + k_4 \\theta^8)\\f]\n\n    The distorted point coordinates are [x'; y'] where\n\n    \\f[x' = (\\theta_d / r) x \\\\ y' = (\\theta_d / r) y \\f]\n\n    Finally, conversion into pixel coordinates: The final pixel coordinates vector [u; v] where:\n\n    \\f[u = f_x (x' + \\alpha y') + c_x \\\\\n    v = f_y yy + c_y\\f]\n\n    @defgroup calib3d_c C API\n\n  @}\n */\n\nnamespace cv\n{\n\n//! @addtogroup calib3d\n//! @{\n\n//! type of the robust estimation algorithm\nenum { LMEDS  = 4, //!< least-median algorithm\n       RANSAC = 8, //!< RANSAC algorithm\n       RHO    = 16 //!< RHO algorithm\n     };\n\nenum { SOLVEPNP_ITERATIVE = 0,\n       SOLVEPNP_EPNP      = 1, // F.Moreno-Noguer, V.Lepetit and P.Fua \"EPnP: Efficient Perspective-n-Point Camera Pose Estimation\"\n       SOLVEPNP_P3P       = 2, // X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang; \"Complete Solution Classification for the Perspective-Three-Point Problem\"\n       SOLVEPNP_DLS       = 3, // Joel A. Hesch and Stergios I. Roumeliotis. \"A Direct Least-Squares (DLS) Method for PnP\"\n       SOLVEPNP_UPNP      = 4  // A.Penate-Sanchez, J.Andrade-Cetto, F.Moreno-Noguer. \"Exhaustive Linearization for Robust Camera Pose and Focal Length Estimation\"\n\n};\n\nenum { CALIB_CB_ADAPTIVE_THRESH = 1,\n       CALIB_CB_NORMALIZE_IMAGE = 2,\n       CALIB_CB_FILTER_QUADS    = 4,\n       CALIB_CB_FAST_CHECK      = 8\n     };\n\nenum { CALIB_CB_SYMMETRIC_GRID  = 1,\n       CALIB_CB_ASYMMETRIC_GRID = 2,\n       CALIB_CB_CLUSTERING      = 4\n     };\n\nenum { CALIB_USE_INTRINSIC_GUESS = 0x00001,\n       CALIB_FIX_ASPECT_RATIO    = 0x00002,\n       CALIB_FIX_PRINCIPAL_POINT = 0x00004,\n       CALIB_ZERO_TANGENT_DIST   = 0x00008,\n       CALIB_FIX_FOCAL_LENGTH    = 0x00010,\n       CALIB_FIX_K1              = 0x00020,\n       CALIB_FIX_K2              = 0x00040,\n       CALIB_FIX_K3              = 0x00080,\n       CALIB_FIX_K4              = 0x00800,\n       CALIB_FIX_K5              = 0x01000,\n       CALIB_FIX_K6              = 0x02000,\n       CALIB_RATIONAL_MODEL      = 0x04000,\n       CALIB_THIN_PRISM_MODEL    = 0x08000,\n       CALIB_FIX_S1_S2_S3_S4     = 0x10000,\n       // only for stereo\n       CALIB_FIX_INTRINSIC       = 0x00100,\n       CALIB_SAME_FOCAL_LENGTH   = 0x00200,\n       // for stereo rectification\n       CALIB_ZERO_DISPARITY      = 0x00400\n     };\n\n//! the algorithm for finding fundamental matrix\nenum { FM_7POINT = 1, //!< 7-point algorithm\n       FM_8POINT = 2, //!< 8-point algorithm\n       FM_LMEDS  = 4, //!< least-median algorithm\n       FM_RANSAC = 8  //!< RANSAC algorithm\n     };\n\n\n\n/** @brief Converts a rotation matrix to a rotation vector or vice versa.\n\n@param src Input rotation vector (3x1 or 1x3) or rotation matrix (3x3).\n@param dst Output rotation matrix (3x3) or rotation vector (3x1 or 1x3), respectively.\n@param jacobian Optional output Jacobian matrix, 3x9 or 9x3, which is a matrix of partial\nderivatives of the output array components with respect to the input array components.\n\n\\f[\\begin{array}{l} \\theta \\leftarrow norm(r) \\\\ r  \\leftarrow r/ \\theta \\\\ R =  \\cos{\\theta} I + (1- \\cos{\\theta} ) r r^T +  \\sin{\\theta} \\vecthreethree{0}{-r_z}{r_y}{r_z}{0}{-r_x}{-r_y}{r_x}{0} \\end{array}\\f]\n\nInverse transformation can be also done easily, since\n\n\\f[\\sin ( \\theta ) \\vecthreethree{0}{-r_z}{r_y}{r_z}{0}{-r_x}{-r_y}{r_x}{0} = \\frac{R - R^T}{2}\\f]\n\nA rotation vector is a convenient and most compact representation of a rotation matrix (since any\nrotation matrix has just 3 degrees of freedom). The representation is used in the global 3D geometry\noptimization procedures like calibrateCamera, stereoCalibrate, or solvePnP .\n */\nCV_EXPORTS_W void Rodrigues( InputArray src, OutputArray dst, OutputArray jacobian = noArray() );\n\n/** @brief Finds a perspective transformation between two planes.\n\n@param srcPoints Coordinates of the points in the original plane, a matrix of the type CV_32FC2\nor vector\\<Point2f\\> .\n@param dstPoints Coordinates of the points in the target plane, a matrix of the type CV_32FC2 or\na vector\\<Point2f\\> .\n@param method Method used to computed a homography matrix. The following methods are possible:\n-   **0** - a regular method using all the points\n-   **RANSAC** - RANSAC-based robust method\n-   **LMEDS** - Least-Median robust method\n-   **RHO**    - PROSAC-based robust method\n@param ransacReprojThreshold Maximum allowed reprojection error to treat a point pair as an inlier\n(used in the RANSAC and RHO methods only). That is, if\n\\f[\\| \\texttt{dstPoints} _i -  \\texttt{convertPointsHomogeneous} ( \\texttt{H} * \\texttt{srcPoints} _i) \\|  >  \\texttt{ransacReprojThreshold}\\f]\nthen the point \\f$i\\f$ is considered an outlier. If srcPoints and dstPoints are measured in pixels,\nit usually makes sense to set this parameter somewhere in the range of 1 to 10.\n@param mask Optional output mask set by a robust method ( RANSAC or LMEDS ). Note that the input\nmask values are ignored.\n@param maxIters The maximum number of RANSAC iterations, 2000 is the maximum it can be.\n@param confidence Confidence level, between 0 and 1.\n\nThe functions find and return the perspective transformation \\f$H\\f$ between the source and the\ndestination planes:\n\n\\f[s_i  \\vecthree{x'_i}{y'_i}{1} \\sim H  \\vecthree{x_i}{y_i}{1}\\f]\n\nso that the back-projection error\n\n\\f[\\sum _i \\left ( x'_i- \\frac{h_{11} x_i + h_{12} y_i + h_{13}}{h_{31} x_i + h_{32} y_i + h_{33}} \\right )^2+ \\left ( y'_i- \\frac{h_{21} x_i + h_{22} y_i + h_{23}}{h_{31} x_i + h_{32} y_i + h_{33}} \\right )^2\\f]\n\nis minimized. If the parameter method is set to the default value 0, the function uses all the point\npairs to compute an initial homography estimate with a simple least-squares scheme.\n\nHowever, if not all of the point pairs ( \\f$srcPoints_i\\f$, \\f$dstPoints_i\\f$ ) fit the rigid perspective\ntransformation (that is, there are some outliers), this initial estimate will be poor. In this case,\nyou can use one of the three robust methods. The methods RANSAC, LMeDS and RHO try many different\nrandom subsets of the corresponding point pairs (of four pairs each), estimate the homography matrix\nusing this subset and a simple least-square algorithm, and then compute the quality/goodness of the\ncomputed homography (which is the number of inliers for RANSAC or the median re-projection error for\nLMeDs). The best subset is then used to produce the initial estimate of the homography matrix and\nthe mask of inliers/outliers.\n\nRegardless of the method, robust or not, the computed homography matrix is refined further (using\ninliers only in case of a robust method) with the Levenberg-Marquardt method to reduce the\nre-projection error even more.\n\nThe methods RANSAC and RHO can handle practically any ratio of outliers but need a threshold to\ndistinguish inliers from outliers. The method LMeDS does not need any threshold but it works\ncorrectly only when there are more than 50% of inliers. Finally, if there are no outliers and the\nnoise is rather small, use the default method (method=0).\n\nThe function is used to find initial intrinsic and extrinsic matrices. Homography matrix is\ndetermined up to a scale. Thus, it is normalized so that \\f$h_{33}=1\\f$. Note that whenever an H matrix\ncannot be estimated, an empty one will be returned.\n\n@sa\n   getAffineTransform, getPerspectiveTransform, estimateRigidTransform, warpPerspective,\n    perspectiveTransform\n\n@note\n   -   A example on calculating a homography for image matching can be found at\n        opencv_source_code/samples/cpp/video_homography.cpp\n\n */\nCV_EXPORTS_W Mat findHomography( InputArray srcPoints, InputArray dstPoints,\n                                 int method = 0, double ransacReprojThreshold = 3,\n                                 OutputArray mask=noArray(), const int maxIters = 2000,\n                                 const double confidence = 0.995);\n\n/** @overload */\nCV_EXPORTS Mat findHomography( InputArray srcPoints, InputArray dstPoints,\n                               OutputArray mask, int method = 0, double ransacReprojThreshold = 3 );\n\n/** @brief Computes an RQ decomposition of 3x3 matrices.\n\n@param src 3x3 input matrix.\n@param mtxR Output 3x3 upper-triangular matrix.\n@param mtxQ Output 3x3 orthogonal matrix.\n@param Qx Optional output 3x3 rotation matrix around x-axis.\n@param Qy Optional output 3x3 rotation matrix around y-axis.\n@param Qz Optional output 3x3 rotation matrix around z-axis.\n\nThe function computes a RQ decomposition using the given rotations. This function is used in\ndecomposeProjectionMatrix to decompose the left 3x3 submatrix of a projection matrix into a camera\nand a rotation matrix.\n\nIt optionally returns three rotation matrices, one for each axis, and the three Euler angles in\ndegrees (as the return value) that could be used in OpenGL. Note, there is always more than one\nsequence of rotations about the three principle axes that results in the same orientation of an\nobject, eg. see @cite Slabaugh . Returned tree rotation matrices and corresponding three Euler angules\nare only one of the possible solutions.\n */\nCV_EXPORTS_W Vec3d RQDecomp3x3( InputArray src, OutputArray mtxR, OutputArray mtxQ,\n                                OutputArray Qx = noArray(),\n                                OutputArray Qy = noArray(),\n                                OutputArray Qz = noArray());\n\n/** @brief Decomposes a projection matrix into a rotation matrix and a camera matrix.\n\n@param projMatrix 3x4 input projection matrix P.\n@param cameraMatrix Output 3x3 camera matrix K.\n@param rotMatrix Output 3x3 external rotation matrix R.\n@param transVect Output 4x1 translation vector T.\n@param rotMatrixX Optional 3x3 rotation matrix around x-axis.\n@param rotMatrixY Optional 3x3 rotation matrix around y-axis.\n@param rotMatrixZ Optional 3x3 rotation matrix around z-axis.\n@param eulerAngles Optional three-element vector containing three Euler angles of rotation in\ndegrees.\n\nThe function computes a decomposition of a projection matrix into a calibration and a rotation\nmatrix and the position of a camera.\n\nIt optionally returns three rotation matrices, one for each axis, and three Euler angles that could\nbe used in OpenGL. Note, there is always more than one sequence of rotations about the three\nprinciple axes that results in the same orientation of an object, eg. see @cite Slabaugh . Returned\ntree rotation matrices and corresponding three Euler angules are only one of the possible solutions.\n\nThe function is based on RQDecomp3x3 .\n */\nCV_EXPORTS_W void decomposeProjectionMatrix( InputArray projMatrix, OutputArray cameraMatrix,\n                                             OutputArray rotMatrix, OutputArray transVect,\n                                             OutputArray rotMatrixX = noArray(),\n                                             OutputArray rotMatrixY = noArray(),\n                                             OutputArray rotMatrixZ = noArray(),\n                                             OutputArray eulerAngles =noArray() );\n\n/** @brief Computes partial derivatives of the matrix product for each multiplied matrix.\n\n@param A First multiplied matrix.\n@param B Second multiplied matrix.\n@param dABdA First output derivative matrix d(A\\*B)/dA of size\n\\f$\\texttt{A.rows*B.cols} \\times {A.rows*A.cols}\\f$ .\n@param dABdB Second output derivative matrix d(A\\*B)/dB of size\n\\f$\\texttt{A.rows*B.cols} \\times {B.rows*B.cols}\\f$ .\n\nThe function computes partial derivatives of the elements of the matrix product \\f$A*B\\f$ with regard to\nthe elements of each of the two input matrices. The function is used to compute the Jacobian\nmatrices in stereoCalibrate but can also be used in any other similar optimization function.\n */\nCV_EXPORTS_W void matMulDeriv( InputArray A, InputArray B, OutputArray dABdA, OutputArray dABdB );\n\n/** @brief Combines two rotation-and-shift transformations.\n\n@param rvec1 First rotation vector.\n@param tvec1 First translation vector.\n@param rvec2 Second rotation vector.\n@param tvec2 Second translation vector.\n@param rvec3 Output rotation vector of the superposition.\n@param tvec3 Output translation vector of the superposition.\n@param dr3dr1\n@param dr3dt1\n@param dr3dr2\n@param dr3dt2\n@param dt3dr1\n@param dt3dt1\n@param dt3dr2\n@param dt3dt2 Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and\ntvec2, respectively.\n\nThe functions compute:\n\n\\f[\\begin{array}{l} \\texttt{rvec3} =  \\mathrm{rodrigues} ^{-1} \\left ( \\mathrm{rodrigues} ( \\texttt{rvec2} )  \\cdot \\mathrm{rodrigues} ( \\texttt{rvec1} ) \\right )  \\\\ \\texttt{tvec3} =  \\mathrm{rodrigues} ( \\texttt{rvec2} )  \\cdot \\texttt{tvec1} +  \\texttt{tvec2} \\end{array} ,\\f]\n\nwhere \\f$\\mathrm{rodrigues}\\f$ denotes a rotation vector to a rotation matrix transformation, and\n\\f$\\mathrm{rodrigues}^{-1}\\f$ denotes the inverse transformation. See Rodrigues for details.\n\nAlso, the functions can compute the derivatives of the output vectors with regards to the input\nvectors (see matMulDeriv ). The functions are used inside stereoCalibrate but can also be used in\nyour own code where Levenberg-Marquardt or another gradient-based solver is used to optimize a\nfunction that contains a matrix multiplication.\n */\nCV_EXPORTS_W void composeRT( InputArray rvec1, InputArray tvec1,\n                             InputArray rvec2, InputArray tvec2,\n                             OutputArray rvec3, OutputArray tvec3,\n                             OutputArray dr3dr1 = noArray(), OutputArray dr3dt1 = noArray(),\n                             OutputArray dr3dr2 = noArray(), OutputArray dr3dt2 = noArray(),\n                             OutputArray dt3dr1 = noArray(), OutputArray dt3dt1 = noArray(),\n                             OutputArray dt3dr2 = noArray(), OutputArray dt3dt2 = noArray() );\n\n/** @brief Projects 3D points to an image plane.\n\n@param objectPoints Array of object points, 3xN/Nx3 1-channel or 1xN/Nx1 3-channel (or\nvector\\<Point3f\\> ), where N is the number of points in the view.\n@param rvec Rotation vector. See Rodrigues for details.\n@param tvec Translation vector.\n@param cameraMatrix Camera matrix \\f$A = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}\\f$ .\n@param distCoeffs Input vector of distortion coefficients\n\\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\\f$ of 4, 5, 8 or 12 elements. If\nthe vector is NULL/empty, the zero distortion coefficients are assumed.\n@param imagePoints Output array of image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel, or\nvector\\<Point2f\\> .\n@param jacobian Optional output 2Nx(10+\\<numDistCoeffs\\>) jacobian matrix of derivatives of image\npoints with respect to components of the rotation vector, translation vector, focal lengths,\ncoordinates of the principal point and the distortion coefficients. In the old interface different\ncomponents of the jacobian are returned via different output parameters.\n@param aspectRatio Optional \"fixed aspect ratio\" parameter. If the parameter is not 0, the\nfunction assumes that the aspect ratio (*fx/fy*) is fixed and correspondingly adjusts the jacobian\nmatrix.\n\nThe function computes projections of 3D points to the image plane given intrinsic and extrinsic\ncamera parameters. Optionally, the function computes Jacobians - matrices of partial derivatives of\nimage points coordinates (as functions of all the input parameters) with respect to the particular\nparameters, intrinsic and/or extrinsic. The Jacobians are used during the global optimization in\ncalibrateCamera, solvePnP, and stereoCalibrate . The function itself can also be used to compute a\nre-projection error given the current intrinsic and extrinsic parameters.\n\n@note By setting rvec=tvec=(0,0,0) or by setting cameraMatrix to a 3x3 identity matrix, or by\npassing zero distortion coefficients, you can get various useful partial cases of the function. This\nmeans that you can compute the distorted coordinates for a sparse set of points or apply a\nperspective transformation (and also compute the derivatives) in the ideal zero-distortion setup.\n */\nCV_EXPORTS_W void projectPoints( InputArray objectPoints,\n                                 InputArray rvec, InputArray tvec,\n                                 InputArray cameraMatrix, InputArray distCoeffs,\n                                 OutputArray imagePoints,\n                                 OutputArray jacobian = noArray(),\n                                 double aspectRatio = 0 );\n\n/** @brief Finds an object pose from 3D-2D point correspondences.\n\n@param objectPoints Array of object points in the object coordinate space, 3xN/Nx3 1-channel or\n1xN/Nx1 3-channel, where N is the number of points. vector\\<Point3f\\> can be also passed here.\n@param imagePoints Array of corresponding image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel,\nwhere N is the number of points. vector\\<Point2f\\> can be also passed here.\n@param cameraMatrix Input camera matrix \\f$A = \\vecthreethree{fx}{0}{cx}{0}{fy}{cy}{0}{0}{1}\\f$ .\n@param distCoeffs Input vector of distortion coefficients\n\\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\\f$ of 4, 5, 8 or 12 elements. If\nthe vector is NULL/empty, the zero distortion coefficients are assumed.\n@param rvec Output rotation vector (see Rodrigues ) that, together with tvec , brings points from\nthe model coordinate system to the camera coordinate system.\n@param tvec Output translation vector.\n@param useExtrinsicGuess Parameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses\nthe provided rvec and tvec values as initial approximations of the rotation and translation\nvectors, respectively, and further optimizes them.\n@param flags Method for solving a PnP problem:\n-   **SOLVEPNP_ITERATIVE** Iterative method is based on Levenberg-Marquardt optimization. In\nthis case the function finds such a pose that minimizes reprojection error, that is the sum\nof squared distances between the observed projections imagePoints and the projected (using\nprojectPoints ) objectPoints .\n-   **SOLVEPNP_P3P** Method is based on the paper of X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang\n\"Complete Solution Classification for the Perspective-Three-Point Problem\". In this case the\nfunction requires exactly four object and image points.\n-   **SOLVEPNP_EPNP** Method has been introduced by F.Moreno-Noguer, V.Lepetit and P.Fua in the\npaper \"EPnP: Efficient Perspective-n-Point Camera Pose Estimation\".\n-   **SOLVEPNP_DLS** Method is based on the paper of Joel A. Hesch and Stergios I. Roumeliotis.\n\"A Direct Least-Squares (DLS) Method for PnP\".\n-   **SOLVEPNP_UPNP** Method is based on the paper of A.Penate-Sanchez, J.Andrade-Cetto,\nF.Moreno-Noguer. \"Exhaustive Linearization for Robust Camera Pose and Focal Length\nEstimation\". In this case the function also estimates the parameters \\f$f_x\\f$ and \\f$f_y\\f$\nassuming that both have the same value. Then the cameraMatrix is updated with the estimated\nfocal length.\n\nThe function estimates the object pose given a set of object points, their corresponding image\nprojections, as well as the camera matrix and the distortion coefficients.\n\n@note\n   -   An example of how to use solvePnP for planar augmented reality can be found at\n        opencv_source_code/samples/python2/plane_ar.py\n   -   If you are using Python:\n        - Numpy array slices won't work as input because solvePnP requires contiguous\n        arrays (enforced by the assertion using cv::Mat::checkVector() around line 55 of\n        modules/calib3d/src/solvepnp.cpp version 2.4.9)\n        - The P3P algorithm requires image points to be in an array of shape (N,1,2) due\n        to its calling of cv::undistortPoints (around line 75 of modules/calib3d/src/solvepnp.cpp version 2.4.9)\n        which requires 2-channel information.\n        - Thus, given some data D = np.array(...) where D.shape = (N,M), in order to use a subset of\n        it as, e.g., imagePoints, one must effectively copy it into a new array: imagePoints =\n        np.ascontiguousarray(D[:,:2]).reshape((N,1,2))\n */\nCV_EXPORTS_W bool solvePnP( InputArray objectPoints, InputArray imagePoints,\n                            InputArray cameraMatrix, InputArray distCoeffs,\n                            OutputArray rvec, OutputArray tvec,\n                            bool useExtrinsicGuess = false, int flags = SOLVEPNP_ITERATIVE );\n\n/** @brief Finds an object pose from 3D-2D point correspondences using the RANSAC scheme.\n\n@param objectPoints Array of object points in the object coordinate space, 3xN/Nx3 1-channel or\n1xN/Nx1 3-channel, where N is the number of points. vector\\<Point3f\\> can be also passed here.\n@param imagePoints Array of corresponding image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel,\nwhere N is the number of points. vector\\<Point2f\\> can be also passed here.\n@param cameraMatrix Input camera matrix \\f$A = \\vecthreethree{fx}{0}{cx}{0}{fy}{cy}{0}{0}{1}\\f$ .\n@param distCoeffs Input vector of distortion coefficients\n\\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\\f$ of 4, 5, 8 or 12 elements. If\nthe vector is NULL/empty, the zero distortion coefficients are assumed.\n@param rvec Output rotation vector (see Rodrigues ) that, together with tvec , brings points from\nthe model coordinate system to the camera coordinate system.\n@param tvec Output translation vector.\n@param useExtrinsicGuess Parameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses\nthe provided rvec and tvec values as initial approximations of the rotation and translation\nvectors, respectively, and further optimizes them.\n@param iterationsCount Number of iterations.\n@param reprojectionError Inlier threshold value used by the RANSAC procedure. The parameter value\nis the maximum allowed distance between the observed and computed point projections to consider it\nan inlier.\n@param confidence The probability that the algorithm produces a useful result.\n@param inliers Output vector that contains indices of inliers in objectPoints and imagePoints .\n@param flags Method for solving a PnP problem (see solvePnP ).\n\nThe function estimates an object pose given a set of object points, their corresponding image\nprojections, as well as the camera matrix and the distortion coefficients. This function finds such\na pose that minimizes reprojection error, that is, the sum of squared distances between the observed\nprojections imagePoints and the projected (using projectPoints ) objectPoints. The use of RANSAC\nmakes the function resistant to outliers.\n\n@note\n   -   An example of how to use solvePNPRansac for object detection can be found at\n        opencv_source_code/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/\n */\nCV_EXPORTS_W bool solvePnPRansac( InputArray objectPoints, InputArray imagePoints,\n                                  InputArray cameraMatrix, InputArray distCoeffs,\n                                  OutputArray rvec, OutputArray tvec,\n                                  bool useExtrinsicGuess = false, int iterationsCount = 100,\n                                  float reprojectionError = 8.0, double confidence = 0.99,\n                                  OutputArray inliers = noArray(), int flags = SOLVEPNP_ITERATIVE );\n\n/** @brief Finds an initial camera matrix from 3D-2D point correspondences.\n\n@param objectPoints Vector of vectors of the calibration pattern points in the calibration pattern\ncoordinate space. In the old interface all the per-view vectors are concatenated. See\ncalibrateCamera for details.\n@param imagePoints Vector of vectors of the projections of the calibration pattern points. In the\nold interface all the per-view vectors are concatenated.\n@param imageSize Image size in pixels used to initialize the principal point.\n@param aspectRatio If it is zero or negative, both \\f$f_x\\f$ and \\f$f_y\\f$ are estimated independently.\nOtherwise, \\f$f_x = f_y * \\texttt{aspectRatio}\\f$ .\n\nThe function estimates and returns an initial camera matrix for the camera calibration process.\nCurrently, the function only supports planar calibration patterns, which are patterns where each\nobject point has z-coordinate =0.\n */\nCV_EXPORTS_W Mat initCameraMatrix2D( InputArrayOfArrays objectPoints,\n                                     InputArrayOfArrays imagePoints,\n                                     Size imageSize, double aspectRatio = 1.0 );\n\n/** @brief Finds the positions of internal corners of the chessboard.\n\n@param image Source chessboard view. It must be an 8-bit grayscale or color image.\n@param patternSize Number of inner corners per a chessboard row and column\n( patternSize = cvSize(points_per_row,points_per_colum) = cvSize(columns,rows) ).\n@param corners Output array of detected corners.\n@param flags Various operation flags that can be zero or a combination of the following values:\n-   **CV_CALIB_CB_ADAPTIVE_THRESH** Use adaptive thresholding to convert the image to black\nand white, rather than a fixed threshold level (computed from the average image brightness).\n-   **CV_CALIB_CB_NORMALIZE_IMAGE** Normalize the image gamma with equalizeHist before\napplying fixed or adaptive thresholding.\n-   **CV_CALIB_CB_FILTER_QUADS** Use additional criteria (like contour area, perimeter,\nsquare-like shape) to filter out false quads extracted at the contour retrieval stage.\n-   **CALIB_CB_FAST_CHECK** Run a fast check on the image that looks for chessboard corners,\nand shortcut the call if none is found. This can drastically speed up the call in the\ndegenerate condition when no chessboard is observed.\n\nThe function attempts to determine whether the input image is a view of the chessboard pattern and\nlocate the internal chessboard corners. The function returns a non-zero value if all of the corners\nare found and they are placed in a certain order (row by row, left to right in every row).\nOtherwise, if the function fails to find all the corners or reorder them, it returns 0. For example,\na regular chessboard has 8 x 8 squares and 7 x 7 internal corners, that is, points where the black\nsquares touch each other. The detected coordinates are approximate, and to determine their positions\nmore accurately, the function calls cornerSubPix. You also may use the function cornerSubPix with\ndifferent parameters if returned coordinates are not accurate enough.\n\nSample usage of detecting and drawing chessboard corners: :\n@code\n    Size patternsize(8,6); //interior number of corners\n    Mat gray = ....; //source image\n    vector<Point2f> corners; //this will be filled by the detected corners\n\n    //CALIB_CB_FAST_CHECK saves a lot of time on images\n    //that do not contain any chessboard corners\n    bool patternfound = findChessboardCorners(gray, patternsize, corners,\n            CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE\n            + CALIB_CB_FAST_CHECK);\n\n    if(patternfound)\n      cornerSubPix(gray, corners, Size(11, 11), Size(-1, -1),\n        TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));\n\n    drawChessboardCorners(img, patternsize, Mat(corners), patternfound);\n@endcode\n@note The function requires white space (like a square-thick border, the wider the better) around\nthe board to make the detection more robust in various environments. Otherwise, if there is no\nborder and the background is dark, the outer black squares cannot be segmented properly and so the\nsquare grouping and ordering algorithm fails.\n */\nCV_EXPORTS_W bool findChessboardCorners( InputArray image, Size patternSize, OutputArray corners,\n                                         int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE );\n\n//! finds subpixel-accurate positions of the chessboard corners\nCV_EXPORTS bool find4QuadCornerSubpix( InputArray img, InputOutputArray corners, Size region_size );\n\n/** @brief Renders the detected chessboard corners.\n\n@param image Destination image. It must be an 8-bit color image.\n@param patternSize Number of inner corners per a chessboard row and column\n(patternSize = cv::Size(points_per_row,points_per_column)).\n@param corners Array of detected corners, the output of findChessboardCorners.\n@param patternWasFound Parameter indicating whether the complete board was found or not. The\nreturn value of findChessboardCorners should be passed here.\n\nThe function draws individual chessboard corners detected either as red circles if the board was not\nfound, or as colored corners connected with lines if the board was found.\n */\nCV_EXPORTS_W void drawChessboardCorners( InputOutputArray image, Size patternSize,\n                                         InputArray corners, bool patternWasFound );\n\n/** @brief Finds centers in the grid of circles.\n\n@param image grid view of input circles; it must be an 8-bit grayscale or color image.\n@param patternSize number of circles per row and column\n( patternSize = Size(points_per_row, points_per_colum) ).\n@param centers output array of detected centers.\n@param flags various operation flags that can be one of the following values:\n-   **CALIB_CB_SYMMETRIC_GRID** uses symmetric pattern of circles.\n-   **CALIB_CB_ASYMMETRIC_GRID** uses asymmetric pattern of circles.\n-   **CALIB_CB_CLUSTERING** uses a special algorithm for grid detection. It is more robust to\nperspective distortions but much more sensitive to background clutter.\n@param blobDetector feature detector that finds blobs like dark circles on light background.\n\nThe function attempts to determine whether the input image contains a grid of circles. If it is, the\nfunction locates centers of the circles. The function returns a non-zero value if all of the centers\nhave been found and they have been placed in a certain order (row by row, left to right in every\nrow). Otherwise, if the function fails to find all the corners or reorder them, it returns 0.\n\nSample usage of detecting and drawing the centers of circles: :\n@code\n    Size patternsize(7,7); //number of centers\n    Mat gray = ....; //source image\n    vector<Point2f> centers; //this will be filled by the detected centers\n\n    bool patternfound = findCirclesGrid(gray, patternsize, centers);\n\n    drawChessboardCorners(img, patternsize, Mat(centers), patternfound);\n@endcode\n@note The function requires white space (like a square-thick border, the wider the better) around\nthe board to make the detection more robust in various environments.\n */\nCV_EXPORTS_W bool findCirclesGrid( InputArray image, Size patternSize,\n                                   OutputArray centers, int flags = CALIB_CB_SYMMETRIC_GRID,\n                                   const Ptr<FeatureDetector> &blobDetector = SimpleBlobDetector::create());\n\n/** @brief Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.\n\n@param objectPoints In the new interface it is a vector of vectors of calibration pattern points in\nthe calibration pattern coordinate space (e.g. std::vector<std::vector<cv::Vec3f>>). The outer\nvector contains as many elements as the number of the pattern views. If the same calibration pattern\nis shown in each view and it is fully visible, all the vectors will be the same. Although, it is\npossible to use partially occluded patterns, or even different patterns in different views. Then,\nthe vectors will be different. The points are 3D, but since they are in a pattern coordinate system,\nthen, if the rig is planar, it may make sense to put the model to a XY coordinate plane so that\nZ-coordinate of each input object point is 0.\nIn the old interface all the vectors of object points from different views are concatenated\ntogether.\n@param imagePoints In the new interface it is a vector of vectors of the projections of calibration\npattern points (e.g. std::vector<std::vector<cv::Vec2f>>). imagePoints.size() and\nobjectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.\nIn the old interface all the vectors of object points from different views are concatenated\ntogether.\n@param imageSize Size of the image used only to initialize the intrinsic camera matrix.\n@param cameraMatrix Output 3x3 floating-point camera matrix\n\\f$A = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\\f$ . If CV\\_CALIB\\_USE\\_INTRINSIC\\_GUESS\nand/or CV_CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be\ninitialized before calling the function.\n@param distCoeffs Output vector of distortion coefficients\n\\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\\f$ of 4, 5, 8 or 12 elements.\n@param rvecs Output vector of rotation vectors (see Rodrigues ) estimated for each pattern view\n(e.g. std::vector<cv::Mat>>). That is, each k-th rotation vector together with the corresponding\nk-th translation vector (see the next output parameter description) brings the calibration pattern\nfrom the model coordinate space (in which object points are specified) to the world coordinate\nspace, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. *M* -1).\n@param tvecs Output vector of translation vectors estimated for each pattern view.\n@param flags Different flags that may be zero or a combination of the following values:\n-   **CV_CALIB_USE_INTRINSIC_GUESS** cameraMatrix contains valid initial values of\nfx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image\ncenter ( imageSize is used), and focal distances are computed in a least-squares fashion.\nNote, that if intrinsic parameters are known, there is no need to use this function just to\nestimate extrinsic parameters. Use solvePnP instead.\n-   **CV_CALIB_FIX_PRINCIPAL_POINT** The principal point is not changed during the global\noptimization. It stays at the center or at a different location specified when\nCV_CALIB_USE_INTRINSIC_GUESS is set too.\n-   **CV_CALIB_FIX_ASPECT_RATIO** The functions considers only fy as a free parameter. The\nratio fx/fy stays the same as in the input cameraMatrix . When\nCV_CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are\nignored, only their ratio is computed and used further.\n-   **CV_CALIB_ZERO_TANGENT_DIST** Tangential distortion coefficients \\f$(p_1, p_2)\\f$ are set\nto zeros and stay zero.\n-   **CV_CALIB_FIX_K1,...,CV_CALIB_FIX_K6** The corresponding radial distortion\ncoefficient is not changed during the optimization. If CV_CALIB_USE_INTRINSIC_GUESS is\nset, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.\n-   **CV_CALIB_RATIONAL_MODEL** Coefficients k4, k5, and k6 are enabled. To provide the\nbackward compatibility, this extra flag should be explicitly specified to make the\ncalibration function use the rational model and return 8 coefficients. If the flag is not\nset, the function computes and returns only 5 distortion coefficients.\n-   **CALIB_THIN_PRISM_MODEL** Coefficients s1, s2, s3 and s4 are enabled. To provide the\nbackward compatibility, this extra flag should be explicitly specified to make the\ncalibration function use the thin prism model and return 12 coefficients. If the flag is not\nset, the function computes and returns only 5 distortion coefficients.\n-   **CALIB_FIX_S1_S2_S3_S4** The thin prism distortion coefficients are not changed during\nthe optimization. If CV_CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the\nsupplied distCoeffs matrix is used. Otherwise, it is set to 0.\n@param criteria Termination criteria for the iterative optimization algorithm.\n\nThe function estimates the intrinsic camera parameters and extrinsic parameters for each of the\nviews. The algorithm is based on @cite Zhang2000 and @cite BouguetMCT . The coordinates of 3D object\npoints and their corresponding 2D projections in each view must be specified. That may be achieved\nby using an object with a known geometry and easily detectable feature points. Such an object is\ncalled a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as\na calibration rig (see findChessboardCorners ). Currently, initialization of intrinsic parameters\n(when CV_CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration\npatterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also\nbe used as long as initial cameraMatrix is provided.\n\nThe algorithm performs the following steps:\n\n-   Compute the initial intrinsic parameters (the option only available for planar calibration\n    patterns) or read them from the input parameters. The distortion coefficients are all set to\n    zeros initially unless some of CV_CALIB_FIX_K? are specified.\n\n-   Estimate the initial camera pose as if the intrinsic parameters have been already known. This is\n    done using solvePnP .\n\n-   Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error,\n    that is, the total sum of squared distances between the observed feature points imagePoints and\n    the projected (using the current estimates for camera parameters and the poses) object points\n    objectPoints. See projectPoints for details.\n\nThe function returns the final re-projection error.\n\n@note\n   If you use a non-square (=non-NxN) grid and findChessboardCorners for calibration, and\n    calibrateCamera returns bad values (zero distortion coefficients, an image center very far from\n    (w/2-0.5,h/2-0.5), and/or large differences between \\f$f_x\\f$ and \\f$f_y\\f$ (ratios of 10:1 or more)),\n    then you have probably used patternSize=cvSize(rows,cols) instead of using\n    patternSize=cvSize(cols,rows) in findChessboardCorners .\n\n@sa\n   findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort\n */\nCV_EXPORTS_W double calibrateCamera( InputArrayOfArrays objectPoints,\n                                     InputArrayOfArrays imagePoints, Size imageSize,\n                                     InputOutputArray cameraMatrix, InputOutputArray distCoeffs,\n                                     OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs,\n                                     int flags = 0, TermCriteria criteria = TermCriteria(\n                                        TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON) );\n\n/** @brief Computes useful camera characteristics from the camera matrix.\n\n@param cameraMatrix Input camera matrix that can be estimated by calibrateCamera or\nstereoCalibrate .\n@param imageSize Input image size in pixels.\n@param apertureWidth Physical width in mm of the sensor.\n@param apertureHeight Physical height in mm of the sensor.\n@param fovx Output field of view in degrees along the horizontal sensor axis.\n@param fovy Output field of view in degrees along the vertical sensor axis.\n@param focalLength Focal length of the lens in mm.\n@param principalPoint Principal point in mm.\n@param aspectRatio \\f$f_y/f_x\\f$\n\nThe function computes various useful camera characteristics from the previously estimated camera\nmatrix.\n\n@note\n   Do keep in mind that the unity measure 'mm' stands for whatever unit of measure one chooses for\n    the chessboard pitch (it can thus be any value).\n */\nCV_EXPORTS_W void calibrationMatrixValues( InputArray cameraMatrix, Size imageSize,\n                                           double apertureWidth, double apertureHeight,\n                                           CV_OUT double& fovx, CV_OUT double& fovy,\n                                           CV_OUT double& focalLength, CV_OUT Point2d& principalPoint,\n                                           CV_OUT double& aspectRatio );\n\n/** @brief Calibrates the stereo camera.\n\n@param objectPoints Vector of vectors of the calibration pattern points.\n@param imagePoints1 Vector of vectors of the projections of the calibration pattern points,\nobserved by the first camera.\n@param imagePoints2 Vector of vectors of the projections of the calibration pattern points,\nobserved by the second camera.\n@param cameraMatrix1 Input/output first camera matrix:\n\\f$\\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\\f$ , \\f$j = 0,\\, 1\\f$ . If\nany of CV_CALIB_USE_INTRINSIC_GUESS , CV_CALIB_FIX_ASPECT_RATIO ,\nCV_CALIB_FIX_INTRINSIC , or CV_CALIB_FIX_FOCAL_LENGTH are specified, some or all of the\nmatrix components must be initialized. See the flags description for details.\n@param distCoeffs1 Input/output vector of distortion coefficients\n\\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\\f$ of 4, 5, 8 ot 12 elements. The\noutput vector length depends on the flags.\n@param cameraMatrix2 Input/output second camera matrix. The parameter is similar to cameraMatrix1\n@param distCoeffs2 Input/output lens distortion coefficients for the second camera. The parameter\nis similar to distCoeffs1 .\n@param imageSize Size of the image used only to initialize intrinsic camera matrix.\n@param R Output rotation matrix between the 1st and the 2nd camera coordinate systems.\n@param T Output translation vector between the coordinate systems of the cameras.\n@param E Output essential matrix.\n@param F Output fundamental matrix.\n@param flags Different flags that may be zero or a combination of the following values:\n-   **CV_CALIB_FIX_INTRINSIC** Fix cameraMatrix? and distCoeffs? so that only R, T, E , and F\nmatrices are estimated.\n-   **CV_CALIB_USE_INTRINSIC_GUESS** Optimize some or all of the intrinsic parameters\naccording to the specified flags. Initial values are provided by the user.\n-   **CV_CALIB_FIX_PRINCIPAL_POINT** Fix the principal points during the optimization.\n-   **CV_CALIB_FIX_FOCAL_LENGTH** Fix \\f$f^{(j)}_x\\f$ and \\f$f^{(j)}_y\\f$ .\n-   **CV_CALIB_FIX_ASPECT_RATIO** Optimize \\f$f^{(j)}_y\\f$ . Fix the ratio \\f$f^{(j)}_x/f^{(j)}_y\\f$\n.\n-   **CV_CALIB_SAME_FOCAL_LENGTH** Enforce \\f$f^{(0)}_x=f^{(1)}_x\\f$ and \\f$f^{(0)}_y=f^{(1)}_y\\f$ .\n-   **CV_CALIB_ZERO_TANGENT_DIST** Set tangential distortion coefficients for each camera to\nzeros and fix there.\n-   **CV_CALIB_FIX_K1,...,CV_CALIB_FIX_K6** Do not change the corresponding radial\ndistortion coefficient during the optimization. If CV_CALIB_USE_INTRINSIC_GUESS is set,\nthe coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.\n-   **CV_CALIB_RATIONAL_MODEL** Enable coefficients k4, k5, and k6. To provide the backward\ncompatibility, this extra flag should be explicitly specified to make the calibration\nfunction use the rational model and return 8 coefficients. If the flag is not set, the\nfunction computes and returns only 5 distortion coefficients.\n-   **CALIB_THIN_PRISM_MODEL** Coefficients s1, s2, s3 and s4 are enabled. To provide the\nbackward compatibility, this extra flag should be explicitly specified to make the\ncalibration function use the thin prism model and return 12 coefficients. If the flag is not\nset, the function computes and returns only 5 distortion coefficients.\n-   **CALIB_FIX_S1_S2_S3_S4** The thin prism distortion coefficients are not changed during\nthe optimization. If CV_CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the\nsupplied distCoeffs matrix is used. Otherwise, it is set to 0.\n@param criteria Termination criteria for the iterative optimization algorithm.\n\nThe function estimates transformation between two cameras making a stereo pair. If you have a stereo\ncamera where the relative position and orientation of two cameras is fixed, and if you computed\nposes of an object relative to the first camera and to the second camera, (R1, T1) and (R2, T2),\nrespectively (this can be done with solvePnP ), then those poses definitely relate to each other.\nThis means that, given ( \\f$R_1\\f$,\\f$T_1\\f$ ), it should be possible to compute ( \\f$R_2\\f$,\\f$T_2\\f$ ). You only\nneed to know the position and orientation of the second camera relative to the first camera. This is\nwhat the described function does. It computes ( \\f$R\\f$,\\f$T\\f$ ) so that:\n\n\\f[R_2=R*R_1\nT_2=R*T_1 + T,\\f]\n\nOptionally, it computes the essential matrix E:\n\n\\f[E= \\vecthreethree{0}{-T_2}{T_1}{T_2}{0}{-T_0}{-T_1}{T_0}{0} *R\\f]\n\nwhere \\f$T_i\\f$ are components of the translation vector \\f$T\\f$ : \\f$T=[T_0, T_1, T_2]^T\\f$ . And the function\ncan also compute the fundamental matrix F:\n\n\\f[F = cameraMatrix2^{-T} E cameraMatrix1^{-1}\\f]\n\nBesides the stereo-related information, the function can also perform a full calibration of each of\ntwo cameras. However, due to the high dimensionality of the parameter space and noise in the input\ndata, the function can diverge from the correct solution. If the intrinsic parameters can be\nestimated with high accuracy for each of the cameras individually (for example, using\ncalibrateCamera ), you are recommended to do so and then pass CV_CALIB_FIX_INTRINSIC flag to the\nfunction along with the computed intrinsic parameters. Otherwise, if all the parameters are\nestimated at once, it makes sense to restrict some parameters, for example, pass\nCV_CALIB_SAME_FOCAL_LENGTH and CV_CALIB_ZERO_TANGENT_DIST flags, which is usually a\nreasonable assumption.\n\nSimilarly to calibrateCamera , the function minimizes the total re-projection error for all the\npoints in all the available views from both cameras. The function returns the final value of the\nre-projection error.\n */\nCV_EXPORTS_W double stereoCalibrate( InputArrayOfArrays objectPoints,\n                                     InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2,\n                                     InputOutputArray cameraMatrix1, InputOutputArray distCoeffs1,\n                                     InputOutputArray cameraMatrix2, InputOutputArray distCoeffs2,\n                                     Size imageSize, OutputArray R,OutputArray T, OutputArray E, OutputArray F,\n                                     int flags = CALIB_FIX_INTRINSIC,\n                                     TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6) );\n\n\n/** @brief Computes rectification transforms for each head of a calibrated stereo camera.\n\n@param cameraMatrix1 First camera matrix.\n@param cameraMatrix2 Second camera matrix.\n@param distCoeffs1 First camera distortion parameters.\n@param distCoeffs2 Second camera distortion parameters.\n@param imageSize Size of the image used for stereo calibration.\n@param R Rotation matrix between the coordinate systems of the first and the second cameras.\n@param T Translation vector between coordinate systems of the cameras.\n@param R1 Output 3x3 rectification transform (rotation matrix) for the first camera.\n@param R2 Output 3x3 rectification transform (rotation matrix) for the second camera.\n@param P1 Output 3x4 projection matrix in the new (rectified) coordinate systems for the first\ncamera.\n@param P2 Output 3x4 projection matrix in the new (rectified) coordinate systems for the second\ncamera.\n@param Q Output \\f$4 \\times 4\\f$ disparity-to-depth mapping matrix (see reprojectImageTo3D ).\n@param flags Operation flags that may be zero or CV_CALIB_ZERO_DISPARITY . If the flag is set,\nthe function makes the principal points of each camera have the same pixel coordinates in the\nrectified views. And if the flag is not set, the function may still shift the images in the\nhorizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the\nuseful image area.\n@param alpha Free scaling parameter. If it is -1 or absent, the function performs the default\nscaling. Otherwise, the parameter should be between 0 and 1. alpha=0 means that the rectified\nimages are zoomed and shifted so that only valid pixels are visible (no black areas after\nrectification). alpha=1 means that the rectified image is decimated and shifted so that all the\npixels from the original images from the cameras are retained in the rectified images (no source\nimage pixels are lost). Obviously, any intermediate value yields an intermediate result between\nthose two extreme cases.\n@param newImageSize New image resolution after rectification. The same size should be passed to\ninitUndistortRectifyMap (see the stereo_calib.cpp sample in OpenCV samples directory). When (0,0)\nis passed (default), it is set to the original imageSize . Setting it to larger value can help you\npreserve details in the original image, especially when there is a big radial distortion.\n@param validPixROI1 Optional output rectangles inside the rectified images where all the pixels\nare valid. If alpha=0 , the ROIs cover the whole images. Otherwise, they are likely to be smaller\n(see the picture below).\n@param validPixROI2 Optional output rectangles inside the rectified images where all the pixels\nare valid. If alpha=0 , the ROIs cover the whole images. Otherwise, they are likely to be smaller\n(see the picture below).\n\nThe function computes the rotation matrices for each camera that (virtually) make both camera image\nplanes the same plane. Consequently, this makes all the epipolar lines parallel and thus simplifies\nthe dense stereo correspondence problem. The function takes the matrices computed by stereoCalibrate\nas input. As output, it provides two rotation matrices and also two projection matrices in the new\ncoordinates. The function distinguishes the following two cases:\n\n-   **Horizontal stereo**: the first and the second camera views are shifted relative to each other\n    mainly along the x axis (with possible small vertical shift). In the rectified images, the\n    corresponding epipolar lines in the left and right cameras are horizontal and have the same\n    y-coordinate. P1 and P2 look like:\n\n    \\f[\\texttt{P1} = \\begin{bmatrix} f & 0 & cx_1 & 0 \\\\ 0 & f & cy & 0 \\\\ 0 & 0 & 1 & 0 \\end{bmatrix}\\f]\n\n    \\f[\\texttt{P2} = \\begin{bmatrix} f & 0 & cx_2 & T_x*f \\\\ 0 & f & cy & 0 \\\\ 0 & 0 & 1 & 0 \\end{bmatrix} ,\\f]\n\n    where \\f$T_x\\f$ is a horizontal shift between the cameras and \\f$cx_1=cx_2\\f$ if\n    CV_CALIB_ZERO_DISPARITY is set.\n\n-   **Vertical stereo**: the first and the second camera views are shifted relative to each other\n    mainly in vertical direction (and probably a bit in the horizontal direction too). The epipolar\n    lines in the rectified images are vertical and have the same x-coordinate. P1 and P2 look like:\n\n    \\f[\\texttt{P1} = \\begin{bmatrix} f & 0 & cx & 0 \\\\ 0 & f & cy_1 & 0 \\\\ 0 & 0 & 1 & 0 \\end{bmatrix}\\f]\n\n    \\f[\\texttt{P2} = \\begin{bmatrix} f & 0 & cx & 0 \\\\ 0 & f & cy_2 & T_y*f \\\\ 0 & 0 & 1 & 0 \\end{bmatrix} ,\\f]\n\n    where \\f$T_y\\f$ is a vertical shift between the cameras and \\f$cy_1=cy_2\\f$ if CALIB_ZERO_DISPARITY is\n    set.\n\nAs you can see, the first three columns of P1 and P2 will effectively be the new \"rectified\" camera\nmatrices. The matrices, together with R1 and R2 , can then be passed to initUndistortRectifyMap to\ninitialize the rectification map for each camera.\n\nSee below the screenshot from the stereo_calib.cpp sample. Some red horizontal lines pass through\nthe corresponding image regions. This means that the images are well rectified, which is what most\nstereo correspondence algorithms rely on. The green rectangles are roi1 and roi2 . You see that\ntheir interiors are all valid pixels.\n\n![image](pics/stereo_undistort.jpg)\n */\nCV_EXPORTS_W void stereoRectify( InputArray cameraMatrix1, InputArray distCoeffs1,\n                                 InputArray cameraMatrix2, InputArray distCoeffs2,\n                                 Size imageSize, InputArray R, InputArray T,\n                                 OutputArray R1, OutputArray R2,\n                                 OutputArray P1, OutputArray P2,\n                                 OutputArray Q, int flags = CALIB_ZERO_DISPARITY,\n                                 double alpha = -1, Size newImageSize = Size(),\n                                 CV_OUT Rect* validPixROI1 = 0, CV_OUT Rect* validPixROI2 = 0 );\n\n/** @brief Computes a rectification transform for an uncalibrated stereo camera.\n\n@param points1 Array of feature points in the first image.\n@param points2 The corresponding points in the second image. The same formats as in\nfindFundamentalMat are supported.\n@param F Input fundamental matrix. It can be computed from the same set of point pairs using\nfindFundamentalMat .\n@param imgSize Size of the image.\n@param H1 Output rectification homography matrix for the first image.\n@param H2 Output rectification homography matrix for the second image.\n@param threshold Optional threshold used to filter out the outliers. If the parameter is greater\nthan zero, all the point pairs that do not comply with the epipolar geometry (that is, the points\nfor which \\f$|\\texttt{points2[i]}^T*\\texttt{F}*\\texttt{points1[i]}|>\\texttt{threshold}\\f$ ) are\nrejected prior to computing the homographies. Otherwise,all the points are considered inliers.\n\nThe function computes the rectification transformations without knowing intrinsic parameters of the\ncameras and their relative position in the space, which explains the suffix \"uncalibrated\". Another\nrelated difference from stereoRectify is that the function outputs not the rectification\ntransformations in the object (3D) space, but the planar perspective transformations encoded by the\nhomography matrices H1 and H2 . The function implements the algorithm @cite Hartley99 .\n\n@note\n   While the algorithm does not need to know the intrinsic parameters of the cameras, it heavily\n    depends on the epipolar geometry. Therefore, if the camera lenses have a significant distortion,\n    it would be better to correct it before computing the fundamental matrix and calling this\n    function. For example, distortion coefficients can be estimated for each head of stereo camera\n    separately by using calibrateCamera . Then, the images can be corrected using undistort , or\n    just the point coordinates can be corrected with undistortPoints .\n */\nCV_EXPORTS_W bool stereoRectifyUncalibrated( InputArray points1, InputArray points2,\n                                             InputArray F, Size imgSize,\n                                             OutputArray H1, OutputArray H2,\n                                             double threshold = 5 );\n\n//! computes the rectification transformations for 3-head camera, where all the heads are on the same line.\nCV_EXPORTS_W float rectify3Collinear( InputArray cameraMatrix1, InputArray distCoeffs1,\n                                      InputArray cameraMatrix2, InputArray distCoeffs2,\n                                      InputArray cameraMatrix3, InputArray distCoeffs3,\n                                      InputArrayOfArrays imgpt1, InputArrayOfArrays imgpt3,\n                                      Size imageSize, InputArray R12, InputArray T12,\n                                      InputArray R13, InputArray T13,\n                                      OutputArray R1, OutputArray R2, OutputArray R3,\n                                      OutputArray P1, OutputArray P2, OutputArray P3,\n                                      OutputArray Q, double alpha, Size newImgSize,\n                                      CV_OUT Rect* roi1, CV_OUT Rect* roi2, int flags );\n\n/** @brief Returns the new camera matrix based on the free scaling parameter.\n\n@param cameraMatrix Input camera matrix.\n@param distCoeffs Input vector of distortion coefficients\n\\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\\f$ of 4, 5, 8 or 12 elements. If\nthe vector is NULL/empty, the zero distortion coefficients are assumed.\n@param imageSize Original image size.\n@param alpha Free scaling parameter between 0 (when all the pixels in the undistorted image are\nvalid) and 1 (when all the source image pixels are retained in the undistorted image). See\nstereoRectify for details.\n@param newImgSize Image size after rectification. By default,it is set to imageSize .\n@param validPixROI Optional output rectangle that outlines all-good-pixels region in the\nundistorted image. See roi1, roi2 description in stereoRectify .\n@param centerPrincipalPoint Optional flag that indicates whether in the new camera matrix the\nprincipal point should be at the image center or not. By default, the principal point is chosen to\nbest fit a subset of the source image (determined by alpha) to the corrected image.\n@return new_camera_matrix Output new camera matrix.\n\nThe function computes and returns the optimal new camera matrix based on the free scaling parameter.\nBy varying this parameter, you may retrieve only sensible pixels alpha=0 , keep all the original\nimage pixels if there is valuable information in the corners alpha=1 , or get something in between.\nWhen alpha\\>0 , the undistortion result is likely to have some black pixels corresponding to\n\"virtual\" pixels outside of the captured distorted image. The original camera matrix, distortion\ncoefficients, the computed new camera matrix, and newImageSize should be passed to\ninitUndistortRectifyMap to produce the maps for remap .\n */\nCV_EXPORTS_W Mat getOptimalNewCameraMatrix( InputArray cameraMatrix, InputArray distCoeffs,\n                                            Size imageSize, double alpha, Size newImgSize = Size(),\n                                            CV_OUT Rect* validPixROI = 0,\n                                            bool centerPrincipalPoint = false);\n\n/** @brief Converts points from Euclidean to homogeneous space.\n\n@param src Input vector of N-dimensional points.\n@param dst Output vector of N+1-dimensional points.\n\nThe function converts points from Euclidean to homogeneous space by appending 1's to the tuple of\npoint coordinates. That is, each point (x1, x2, ..., xn) is converted to (x1, x2, ..., xn, 1).\n */\nCV_EXPORTS_W void convertPointsToHomogeneous( InputArray src, OutputArray dst );\n\n/** @brief Converts points from homogeneous to Euclidean space.\n\n@param src Input vector of N-dimensional points.\n@param dst Output vector of N-1-dimensional points.\n\nThe function converts points homogeneous to Euclidean space using perspective projection. That is,\neach point (x1, x2, ... x(n-1), xn) is converted to (x1/xn, x2/xn, ..., x(n-1)/xn). When xn=0, the\noutput point coordinates will be (0,0,0,...).\n */\nCV_EXPORTS_W void convertPointsFromHomogeneous( InputArray src, OutputArray dst );\n\n/** @brief Converts points to/from homogeneous coordinates.\n\n@param src Input array or vector of 2D, 3D, or 4D points.\n@param dst Output vector of 2D, 3D, or 4D points.\n\nThe function converts 2D or 3D points from/to homogeneous coordinates by calling either\nconvertPointsToHomogeneous or convertPointsFromHomogeneous.\n\n@note The function is obsolete. Use one of the previous two functions instead.\n */\nCV_EXPORTS void convertPointsHomogeneous( InputArray src, OutputArray dst );\n\n/** @brief Calculates a fundamental matrix from the corresponding points in two images.\n\n@param points1 Array of N points from the first image. The point coordinates should be\nfloating-point (single or double precision).\n@param points2 Array of the second image points of the same size and format as points1 .\n@param method Method for computing a fundamental matrix.\n-   **CV_FM_7POINT** for a 7-point algorithm. \\f$N = 7\\f$\n-   **CV_FM_8POINT** for an 8-point algorithm. \\f$N \\ge 8\\f$\n-   **CV_FM_RANSAC** for the RANSAC algorithm. \\f$N \\ge 8\\f$\n-   **CV_FM_LMEDS** for the LMedS algorithm. \\f$N \\ge 8\\f$\n@param param1 Parameter used for RANSAC. It is the maximum distance from a point to an epipolar\nline in pixels, beyond which the point is considered an outlier and is not used for computing the\nfinal fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the\npoint localization, image resolution, and the image noise.\n@param param2 Parameter used for the RANSAC or LMedS methods only. It specifies a desirable level\nof confidence (probability) that the estimated matrix is correct.\n@param mask\n\nThe epipolar geometry is described by the following equation:\n\n\\f[[p_2; 1]^T F [p_1; 1] = 0\\f]\n\nwhere \\f$F\\f$ is a fundamental matrix, \\f$p_1\\f$ and \\f$p_2\\f$ are corresponding points in the first and the\nsecond images, respectively.\n\nThe function calculates the fundamental matrix using one of four methods listed above and returns\nthe found fundamental matrix. Normally just one matrix is found. But in case of the 7-point\nalgorithm, the function may return up to 3 solutions ( \\f$9 \\times 3\\f$ matrix that stores all 3\nmatrices sequentially).\n\nThe calculated fundamental matrix may be passed further to computeCorrespondEpilines that finds the\nepipolar lines corresponding to the specified points. It can also be passed to\nstereoRectifyUncalibrated to compute the rectification transformation. :\n@code\n    // Example. Estimation of fundamental matrix using the RANSAC algorithm\n    int point_count = 100;\n    vector<Point2f> points1(point_count);\n    vector<Point2f> points2(point_count);\n\n    // initialize the points here ...\n    for( int i = 0; i < point_count; i++ )\n    {\n        points1[i] = ...;\n        points2[i] = ...;\n    }\n\n    Mat fundamental_matrix =\n     findFundamentalMat(points1, points2, FM_RANSAC, 3, 0.99);\n@endcode\n */\nCV_EXPORTS_W Mat findFundamentalMat( InputArray points1, InputArray points2,\n                                     int method = FM_RANSAC,\n                                     double param1 = 3., double param2 = 0.99,\n                                     OutputArray mask = noArray() );\n\n/** @overload */\nCV_EXPORTS Mat findFundamentalMat( InputArray points1, InputArray points2,\n                                   OutputArray mask, int method = FM_RANSAC,\n                                   double param1 = 3., double param2 = 0.99 );\n\n/** @brief Calculates an essential matrix from the corresponding points in two images.\n\n@param points1 Array of N (N \\>= 5) 2D points from the first image. The point coordinates should\nbe floating-point (single or double precision).\n@param points2 Array of the second image points of the same size and format as points1 .\n@param focal focal length of the camera. Note that this function assumes that points1 and points2\nare feature points from cameras with same focal length and principle point.\n@param pp principle point of the camera.\n@param method Method for computing a fundamental matrix.\n-   **RANSAC** for the RANSAC algorithm.\n-   **MEDS** for the LMedS algorithm.\n@param threshold Parameter used for RANSAC. It is the maximum distance from a point to an epipolar\nline in pixels, beyond which the point is considered an outlier and is not used for computing the\nfinal fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the\npoint localization, image resolution, and the image noise.\n@param prob Parameter used for the RANSAC or LMedS methods only. It specifies a desirable level of\nconfidence (probability) that the estimated matrix is correct.\n@param mask Output array of N elements, every element of which is set to 0 for outliers and to 1\nfor the other points. The array is computed only in the RANSAC and LMedS methods.\n\nThis function estimates essential matrix based on the five-point algorithm solver in @cite Nister03 .\n@cite SteweniusCFS is also a related. The epipolar geometry is described by the following equation:\n\n\\f[[p_2; 1]^T K^{-T} E K^{-1} [p_1; 1] = 0 \\\\\\f]\\f[K =\n\\begin{bmatrix}\nf & 0 & x_{pp}  \\\\\n0 & f & y_{pp}  \\\\\n0 & 0 & 1\n\\end{bmatrix}\\f]\n\nwhere \\f$E\\f$ is an essential matrix, \\f$p_1\\f$ and \\f$p_2\\f$ are corresponding points in the first and the\nsecond images, respectively. The result of this function may be passed further to\ndecomposeEssentialMat or recoverPose to recover the relative pose between cameras.\n */\nCV_EXPORTS_W Mat findEssentialMat( InputArray points1, InputArray points2,\n                                 double focal = 1.0, Point2d pp = Point2d(0, 0),\n                                 int method = RANSAC, double prob = 0.999,\n                                 double threshold = 1.0, OutputArray mask = noArray() );\n\n/** @brief Decompose an essential matrix to possible rotations and translation.\n\n@param E The input essential matrix.\n@param R1 One possible rotation matrix.\n@param R2 Another possible rotation matrix.\n@param t One possible translation.\n\nThis function decompose an essential matrix E using svd decomposition @cite HartleyZ00 . Generally 4\npossible poses exists for a given E. They are \\f$[R_1, t]\\f$, \\f$[R_1, -t]\\f$, \\f$[R_2, t]\\f$, \\f$[R_2, -t]\\f$. By\ndecomposing E, you can only get the direction of the translation, so the function returns unit t.\n */\nCV_EXPORTS_W void decomposeEssentialMat( InputArray E, OutputArray R1, OutputArray R2, OutputArray t );\n\n/** @brief Recover relative camera rotation and translation from an estimated essential matrix and the\ncorresponding points in two images, using cheirality check. Returns the number of inliers which pass\nthe check.\n\n@param E The input essential matrix.\n@param points1 Array of N 2D points from the first image. The point coordinates should be\nfloating-point (single or double precision).\n@param points2 Array of the second image points of the same size and format as points1 .\n@param R Recovered relative rotation.\n@param t Recoverd relative translation.\n@param focal Focal length of the camera. Note that this function assumes that points1 and points2\nare feature points from cameras with same focal length and principle point.\n@param pp Principle point of the camera.\n@param mask Input/output mask for inliers in points1 and points2.\n:   If it is not empty, then it marks inliers in points1 and points2 for then given essential\nmatrix E. Only these inliers will be used to recover pose. In the output mask only inliers\nwhich pass the cheirality check.\nThis function decomposes an essential matrix using decomposeEssentialMat and then verifies possible\npose hypotheses by doing cheirality check. The cheirality check basically means that the\ntriangulated 3D points should have positive depth. Some details can be found in @cite Nister03 .\n\nThis function can be used to process output E and mask from findEssentialMat. In this scenario,\npoints1 and points2 are the same input for findEssentialMat. :\n@code\n    // Example. Estimation of fundamental matrix using the RANSAC algorithm\n    int point_count = 100;\n    vector<Point2f> points1(point_count);\n    vector<Point2f> points2(point_count);\n\n    // initialize the points here ...\n    for( int i = 0; i < point_count; i++ )\n    {\n        points1[i] = ...;\n        points2[i] = ...;\n    }\n\n    double focal = 1.0;\n    cv::Point2d pp(0.0, 0.0);\n    Mat E, R, t, mask;\n\n    E = findEssentialMat(points1, points2, focal, pp, RANSAC, 0.999, 1.0, mask);\n    recoverPose(E, points1, points2, R, t, focal, pp, mask);\n@endcode\n */\nCV_EXPORTS_W int recoverPose( InputArray E, InputArray points1, InputArray points2,\n                            OutputArray R, OutputArray t,\n                            double focal = 1.0, Point2d pp = Point2d(0, 0),\n                            InputOutputArray mask = noArray() );\n\n\n/** @brief For points in an image of a stereo pair, computes the corresponding epilines in the other image.\n\n@param points Input points. \\f$N \\times 1\\f$ or \\f$1 \\times N\\f$ matrix of type CV_32FC2 or\nvector\\<Point2f\\> .\n@param whichImage Index of the image (1 or 2) that contains the points .\n@param F Fundamental matrix that can be estimated using findFundamentalMat or stereoRectify .\n@param lines Output vector of the epipolar lines corresponding to the points in the other image.\nEach line \\f$ax + by + c=0\\f$ is encoded by 3 numbers \\f$(a, b, c)\\f$ .\n\nFor every point in one of the two images of a stereo pair, the function finds the equation of the\ncorresponding epipolar line in the other image.\n\nFrom the fundamental matrix definition (see findFundamentalMat ), line \\f$l^{(2)}_i\\f$ in the second\nimage for the point \\f$p^{(1)}_i\\f$ in the first image (when whichImage=1 ) is computed as:\n\n\\f[l^{(2)}_i = F p^{(1)}_i\\f]\n\nAnd vice versa, when whichImage=2, \\f$l^{(1)}_i\\f$ is computed from \\f$p^{(2)}_i\\f$ as:\n\n\\f[l^{(1)}_i = F^T p^{(2)}_i\\f]\n\nLine coefficients are defined up to a scale. They are normalized so that \\f$a_i^2+b_i^2=1\\f$ .\n */\nCV_EXPORTS_W void computeCorrespondEpilines( InputArray points, int whichImage,\n                                             InputArray F, OutputArray lines );\n\n/** @brief Reconstructs points by triangulation.\n\n@param projMatr1 3x4 projection matrix of the first camera.\n@param projMatr2 3x4 projection matrix of the second camera.\n@param projPoints1 2xN array of feature points in the first image. In case of c++ version it can\nbe also a vector of feature points or two-channel matrix of size 1xN or Nx1.\n@param projPoints2 2xN array of corresponding points in the second image. In case of c++ version\nit can be also a vector of feature points or two-channel matrix of size 1xN or Nx1.\n@param points4D 4xN array of reconstructed points in homogeneous coordinates.\n\nThe function reconstructs 3-dimensional points (in homogeneous coordinates) by using their\nobservations with a stereo camera. Projections matrices can be obtained from stereoRectify.\n\n@note\n   Keep in mind that all input data should be of float type in order for this function to work.\n\n@sa\n   reprojectImageTo3D\n */\nCV_EXPORTS_W void triangulatePoints( InputArray projMatr1, InputArray projMatr2,\n                                     InputArray projPoints1, InputArray projPoints2,\n                                     OutputArray points4D );\n\n/** @brief Refines coordinates of corresponding points.\n\n@param F 3x3 fundamental matrix.\n@param points1 1xN array containing the first set of points.\n@param points2 1xN array containing the second set of points.\n@param newPoints1 The optimized points1.\n@param newPoints2 The optimized points2.\n\nThe function implements the Optimal Triangulation Method (see Multiple View Geometry for details).\nFor each given point correspondence points1[i] \\<-\\> points2[i], and a fundamental matrix F, it\ncomputes the corrected correspondences newPoints1[i] \\<-\\> newPoints2[i] that minimize the geometric\nerror \\f$d(points1[i], newPoints1[i])^2 + d(points2[i],newPoints2[i])^2\\f$ (where \\f$d(a,b)\\f$ is the\ngeometric distance between points \\f$a\\f$ and \\f$b\\f$ ) subject to the epipolar constraint\n\\f$newPoints2^T * F * newPoints1 = 0\\f$ .\n */\nCV_EXPORTS_W void correctMatches( InputArray F, InputArray points1, InputArray points2,\n                                  OutputArray newPoints1, OutputArray newPoints2 );\n\n/** @brief Filters off small noise blobs (speckles) in the disparity map\n\n@param img The input 16-bit signed disparity image\n@param newVal The disparity value used to paint-off the speckles\n@param maxSpeckleSize The maximum speckle size to consider it a speckle. Larger blobs are not\naffected by the algorithm\n@param maxDiff Maximum difference between neighbor disparity pixels to put them into the same\nblob. Note that since StereoBM, StereoSGBM and may be other algorithms return a fixed-point\ndisparity map, where disparity values are multiplied by 16, this scale factor should be taken into\naccount when specifying this parameter value.\n@param buf The optional temporary buffer to avoid memory allocation within the function.\n */\nCV_EXPORTS_W void filterSpeckles( InputOutputArray img, double newVal,\n                                  int maxSpeckleSize, double maxDiff,\n                                  InputOutputArray buf = noArray() );\n\n//! computes valid disparity ROI from the valid ROIs of the rectified images (that are returned by cv::stereoRectify())\nCV_EXPORTS_W Rect getValidDisparityROI( Rect roi1, Rect roi2,\n                                        int minDisparity, int numberOfDisparities,\n                                        int SADWindowSize );\n\n//! validates disparity using the left-right check. The matrix \"cost\" should be computed by the stereo correspondence algorithm\nCV_EXPORTS_W void validateDisparity( InputOutputArray disparity, InputArray cost,\n                                     int minDisparity, int numberOfDisparities,\n                                     int disp12MaxDisp = 1 );\n\n/** @brief Reprojects a disparity image to 3D space.\n\n@param disparity Input single-channel 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit\nfloating-point disparity image.\n@param _3dImage Output 3-channel floating-point image of the same size as disparity . Each\nelement of _3dImage(x,y) contains 3D coordinates of the point (x,y) computed from the disparity\nmap.\n@param Q \\f$4 \\times 4\\f$ perspective transformation matrix that can be obtained with stereoRectify.\n@param handleMissingValues Indicates, whether the function should handle missing values (i.e.\npoints where the disparity was not computed). If handleMissingValues=true, then pixels with the\nminimal disparity that corresponds to the outliers (see StereoMatcher::compute ) are transformed\nto 3D points with a very large Z value (currently set to 10000).\n@param ddepth The optional output array depth. If it is -1, the output image will have CV_32F\ndepth. ddepth can also be set to CV_16S, CV_32S or CV_32F.\n\nThe function transforms a single-channel disparity map to a 3-channel image representing a 3D\nsurface. That is, for each pixel (x,y) andthe corresponding disparity d=disparity(x,y) , it\ncomputes:\n\n\\f[\\begin{array}{l} [X \\; Y \\; Z \\; W]^T =  \\texttt{Q} *[x \\; y \\; \\texttt{disparity} (x,y) \\; 1]^T  \\\\ \\texttt{\\_3dImage} (x,y) = (X/W, \\; Y/W, \\; Z/W) \\end{array}\\f]\n\nThe matrix Q can be an arbitrary \\f$4 \\times 4\\f$ matrix (for example, the one computed by\nstereoRectify). To reproject a sparse set of points {(x,y,d),...} to 3D space, use\nperspectiveTransform .\n */\nCV_EXPORTS_W void reprojectImageTo3D( InputArray disparity,\n                                      OutputArray _3dImage, InputArray Q,\n                                      bool handleMissingValues = false,\n                                      int ddepth = -1 );\n\n/** @brief Computes an optimal affine transformation between two 3D point sets.\n\n@param src First input 3D point set.\n@param dst Second input 3D point set.\n@param out Output 3D affine transformation matrix \\f$3 \\times 4\\f$ .\n@param inliers Output vector indicating which points are inliers.\n@param ransacThreshold Maximum reprojection error in the RANSAC algorithm to consider a point as\nan inlier.\n@param confidence Confidence level, between 0 and 1, for the estimated transformation. Anything\nbetween 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation\nsignificantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation.\n\nThe function estimates an optimal 3D affine transformation between two 3D point sets using the\nRANSAC algorithm.\n */\nCV_EXPORTS_W  int estimateAffine3D(InputArray src, InputArray dst,\n                                   OutputArray out, OutputArray inliers,\n                                   double ransacThreshold = 3, double confidence = 0.99);\n\n/** @brief Decompose a homography matrix to rotation(s), translation(s) and plane normal(s).\n\n@param H The input homography matrix between two images.\n@param K The input intrinsic camera calibration matrix.\n@param rotations Array of rotation matrices.\n@param translations Array of translation matrices.\n@param normals Array of plane normal matrices.\n\nThis function extracts relative camera motion between two views observing a planar object from the\nhomography H induced by the plane. The intrinsic camera matrix K must also be provided. The function\nmay return up to four mathematical solution sets. At least two of the solutions may further be\ninvalidated if point correspondences are available by applying positive depth constraint (all points\nmust be in front of the camera). The decomposition method is described in detail in @cite Malis .\n */\nCV_EXPORTS_W int decomposeHomographyMat(InputArray H,\n                                        InputArray K,\n                                        OutputArrayOfArrays rotations,\n                                        OutputArrayOfArrays translations,\n                                        OutputArrayOfArrays normals);\n\n/** @brief The base class for stereo correspondence algorithms.\n */\nclass CV_EXPORTS_W StereoMatcher : public Algorithm\n{\npublic:\n    enum { DISP_SHIFT = 4,\n           DISP_SCALE = (1 << DISP_SHIFT)\n         };\n\n    /** @brief Computes disparity map for the specified stereo pair\n\n    @param left Left 8-bit single-channel image.\n    @param right Right image of the same size and the same type as the left one.\n    @param disparity Output disparity map. It has the same size as the input images. Some algorithms,\n    like StereoBM or StereoSGBM compute 16-bit fixed-point disparity map (where each disparity value\n    has 4 fractional bits), whereas other algorithms output 32-bit floating-point disparity map.\n     */\n    CV_WRAP virtual void compute( InputArray left, InputArray right,\n                                  OutputArray disparity ) = 0;\n\n    CV_WRAP virtual int getMinDisparity() const = 0;\n    CV_WRAP virtual void setMinDisparity(int minDisparity) = 0;\n\n    CV_WRAP virtual int getNumDisparities() const = 0;\n    CV_WRAP virtual void setNumDisparities(int numDisparities) = 0;\n\n    CV_WRAP virtual int getBlockSize() const = 0;\n    CV_WRAP virtual void setBlockSize(int blockSize) = 0;\n\n    CV_WRAP virtual int getSpeckleWindowSize() const = 0;\n    CV_WRAP virtual void setSpeckleWindowSize(int speckleWindowSize) = 0;\n\n    CV_WRAP virtual int getSpeckleRange() const = 0;\n    CV_WRAP virtual void setSpeckleRange(int speckleRange) = 0;\n\n    CV_WRAP virtual int getDisp12MaxDiff() const = 0;\n    CV_WRAP virtual void setDisp12MaxDiff(int disp12MaxDiff) = 0;\n};\n\n\n/** @brief Class for computing stereo correspondence using the block matching algorithm, introduced and\ncontributed to OpenCV by K. Konolige.\n */\nclass CV_EXPORTS_W StereoBM : public StereoMatcher\n{\npublic:\n    enum { PREFILTER_NORMALIZED_RESPONSE = 0,\n           PREFILTER_XSOBEL              = 1\n         };\n\n    CV_WRAP virtual int getPreFilterType() const = 0;\n    CV_WRAP virtual void setPreFilterType(int preFilterType) = 0;\n\n    CV_WRAP virtual int getPreFilterSize() const = 0;\n    CV_WRAP virtual void setPreFilterSize(int preFilterSize) = 0;\n\n    CV_WRAP virtual int getPreFilterCap() const = 0;\n    CV_WRAP virtual void setPreFilterCap(int preFilterCap) = 0;\n\n    CV_WRAP virtual int getTextureThreshold() const = 0;\n    CV_WRAP virtual void setTextureThreshold(int textureThreshold) = 0;\n\n    CV_WRAP virtual int getUniquenessRatio() const = 0;\n    CV_WRAP virtual void setUniquenessRatio(int uniquenessRatio) = 0;\n\n    CV_WRAP virtual int getSmallerBlockSize() const = 0;\n    CV_WRAP virtual void setSmallerBlockSize(int blockSize) = 0;\n\n    CV_WRAP virtual Rect getROI1() const = 0;\n    CV_WRAP virtual void setROI1(Rect roi1) = 0;\n\n    CV_WRAP virtual Rect getROI2() const = 0;\n    CV_WRAP virtual void setROI2(Rect roi2) = 0;\n\n    /** @brief Creates StereoBM object\n\n    @param numDisparities the disparity search range. For each pixel algorithm will find the best\n    disparity from 0 (default minimum disparity) to numDisparities. The search range can then be\n    shifted by changing the minimum disparity.\n    @param blockSize the linear size of the blocks compared by the algorithm. The size should be odd\n    (as the block is centered at the current pixel). Larger block size implies smoother, though less\n    accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher\n    chance for algorithm to find a wrong correspondence.\n\n    The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for\n    a specific stereo pair.\n     */\n    CV_WRAP static Ptr<StereoBM> create(int numDisparities = 0, int blockSize = 21);\n};\n\n/** @brief The class implements the modified H. Hirschmuller algorithm @cite HH08 that differs from the original\none as follows:\n\n-   By default, the algorithm is single-pass, which means that you consider only 5 directions\ninstead of 8. Set mode=StereoSGBM::MODE_HH in createStereoSGBM to run the full variant of the\nalgorithm but beware that it may consume a lot of memory.\n-   The algorithm matches blocks, not individual pixels. Though, setting blockSize=1 reduces the\nblocks to single pixels.\n-   Mutual information cost function is not implemented. Instead, a simpler Birchfield-Tomasi\nsub-pixel metric from @cite BT98 is used. Though, the color images are supported as well.\n-   Some pre- and post- processing steps from K. Konolige algorithm StereoBM are included, for\nexample: pre-filtering (StereoBM::PREFILTER_XSOBEL type) and post-filtering (uniqueness\ncheck, quadratic interpolation and speckle filtering).\n\n@note\n   -   (Python) An example illustrating the use of the StereoSGBM matching algorithm can be found\n        at opencv_source_code/samples/python2/stereo_match.py\n */\nclass CV_EXPORTS_W StereoSGBM : public StereoMatcher\n{\npublic:\n    enum\n    {\n        MODE_SGBM = 0,\n        MODE_HH   = 1\n    };\n\n    CV_WRAP virtual int getPreFilterCap() const = 0;\n    CV_WRAP virtual void setPreFilterCap(int preFilterCap) = 0;\n\n    CV_WRAP virtual int getUniquenessRatio() const = 0;\n    CV_WRAP virtual void setUniquenessRatio(int uniquenessRatio) = 0;\n\n    CV_WRAP virtual int getP1() const = 0;\n    CV_WRAP virtual void setP1(int P1) = 0;\n\n    CV_WRAP virtual int getP2() const = 0;\n    CV_WRAP virtual void setP2(int P2) = 0;\n\n    CV_WRAP virtual int getMode() const = 0;\n    CV_WRAP virtual void setMode(int mode) = 0;\n\n    /** @brief Creates StereoSGBM object\n\n    @param minDisparity Minimum possible disparity value. Normally, it is zero but sometimes\n    rectification algorithms can shift images, so this parameter needs to be adjusted accordingly.\n    @param numDisparities Maximum disparity minus minimum disparity. The value is always greater than\n    zero. In the current implementation, this parameter must be divisible by 16.\n    @param blockSize Matched block size. It must be an odd number \\>=1 . Normally, it should be\n    somewhere in the 3..11 range.\n    @param P1 The first parameter controlling the disparity smoothness. See below.\n    @param P2 The second parameter controlling the disparity smoothness. The larger the values are,\n    the smoother the disparity is. P1 is the penalty on the disparity change by plus or minus 1\n    between neighbor pixels. P2 is the penalty on the disparity change by more than 1 between neighbor\n    pixels. The algorithm requires P2 \\> P1 . See stereo_match.cpp sample where some reasonably good\n    P1 and P2 values are shown (like 8\\*number_of_image_channels\\*SADWindowSize\\*SADWindowSize and\n    32\\*number_of_image_channels\\*SADWindowSize\\*SADWindowSize , respectively).\n    @param disp12MaxDiff Maximum allowed difference (in integer pixel units) in the left-right\n    disparity check. Set it to a non-positive value to disable the check.\n    @param preFilterCap Truncation value for the prefiltered image pixels. The algorithm first\n    computes x-derivative at each pixel and clips its value by [-preFilterCap, preFilterCap] interval.\n    The result values are passed to the Birchfield-Tomasi pixel cost function.\n    @param uniquenessRatio Margin in percentage by which the best (minimum) computed cost function\n    value should \"win\" the second best value to consider the found match correct. Normally, a value\n    within the 5-15 range is good enough.\n    @param speckleWindowSize Maximum size of smooth disparity regions to consider their noise speckles\n    and invalidate. Set it to 0 to disable speckle filtering. Otherwise, set it somewhere in the\n    50-200 range.\n    @param speckleRange Maximum disparity variation within each connected component. If you do speckle\n    filtering, set the parameter to a positive value, it will be implicitly multiplied by 16.\n    Normally, 1 or 2 is good enough.\n    @param mode Set it to StereoSGBM::MODE_HH to run the full-scale two-pass dynamic programming\n    algorithm. It will consume O(W\\*H\\*numDisparities) bytes, which is large for 640x480 stereo and\n    huge for HD-size pictures. By default, it is set to false .\n\n    The first constructor initializes StereoSGBM with all the default parameters. So, you only have to\n    set StereoSGBM::numDisparities at minimum. The second constructor enables you to set each parameter\n    to a custom value.\n     */\n    CV_WRAP static Ptr<StereoSGBM> create(int minDisparity, int numDisparities, int blockSize,\n                                          int P1 = 0, int P2 = 0, int disp12MaxDiff = 0,\n                                          int preFilterCap = 0, int uniquenessRatio = 0,\n                                          int speckleWindowSize = 0, int speckleRange = 0,\n                                          int mode = StereoSGBM::MODE_SGBM);\n};\n\n//! @} calib3d\n\n/** @brief The methods in this namespace use a so-called fisheye camera model.\n  @ingroup calib3d_fisheye\n*/\nnamespace fisheye\n{\n//! @addtogroup calib3d_fisheye\n//! @{\n\n    enum{\n        CALIB_USE_INTRINSIC_GUESS   = 1,\n        CALIB_RECOMPUTE_EXTRINSIC   = 2,\n        CALIB_CHECK_COND            = 4,\n        CALIB_FIX_SKEW              = 8,\n        CALIB_FIX_K1                = 16,\n        CALIB_FIX_K2                = 32,\n        CALIB_FIX_K3                = 64,\n        CALIB_FIX_K4                = 128,\n        CALIB_FIX_INTRINSIC         = 256\n    };\n\n    /** @brief Projects points using fisheye model\n\n    @param objectPoints Array of object points, 1xN/Nx1 3-channel (or vector\\<Point3f\\> ), where N is\n    the number of points in the view.\n    @param imagePoints Output array of image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel, or\n    vector\\<Point2f\\>.\n    @param affine\n    @param K Camera matrix \\f$K = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}\\f$.\n    @param D Input vector of distortion coefficients \\f$(k_1, k_2, k_3, k_4)\\f$.\n    @param alpha The skew coefficient.\n    @param jacobian Optional output 2Nx15 jacobian matrix of derivatives of image points with respect\n    to components of the focal lengths, coordinates of the principal point, distortion coefficients,\n    rotation vector, translation vector, and the skew. In the old interface different components of\n    the jacobian are returned via different output parameters.\n\n    The function computes projections of 3D points to the image plane given intrinsic and extrinsic\n    camera parameters. Optionally, the function computes Jacobians - matrices of partial derivatives of\n    image points coordinates (as functions of all the input parameters) with respect to the particular\n    parameters, intrinsic and/or extrinsic.\n     */\n    CV_EXPORTS void projectPoints(InputArray objectPoints, OutputArray imagePoints, const Affine3d& affine,\n        InputArray K, InputArray D, double alpha = 0, OutputArray jacobian = noArray());\n\n    /** @overload */\n    CV_EXPORTS_W void projectPoints(InputArray objectPoints, OutputArray imagePoints, InputArray rvec, InputArray tvec,\n        InputArray K, InputArray D, double alpha = 0, OutputArray jacobian = noArray());\n\n    /** @brief Distorts 2D points using fisheye model.\n\n    @param undistorted Array of object points, 1xN/Nx1 2-channel (or vector\\<Point2f\\> ), where N is\n    the number of points in the view.\n    @param K Camera matrix \\f$K = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}\\f$.\n    @param D Input vector of distortion coefficients \\f$(k_1, k_2, k_3, k_4)\\f$.\n    @param alpha The skew coefficient.\n    @param distorted Output array of image points, 1xN/Nx1 2-channel, or vector\\<Point2f\\> .\n     */\n    CV_EXPORTS_W void distortPoints(InputArray undistorted, OutputArray distorted, InputArray K, InputArray D, double alpha = 0);\n\n    /** @brief Undistorts 2D points using fisheye model\n\n    @param distorted Array of object points, 1xN/Nx1 2-channel (or vector\\<Point2f\\> ), where N is the\n    number of points in the view.\n    @param K Camera matrix \\f$K = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}\\f$.\n    @param D Input vector of distortion coefficients \\f$(k_1, k_2, k_3, k_4)\\f$.\n    @param R Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3\n    1-channel or 1x1 3-channel\n    @param P New camera matrix (3x3) or new projection matrix (3x4)\n    @param undistorted Output array of image points, 1xN/Nx1 2-channel, or vector\\<Point2f\\> .\n     */\n    CV_EXPORTS_W void undistortPoints(InputArray distorted, OutputArray undistorted,\n        InputArray K, InputArray D, InputArray R = noArray(), InputArray P  = noArray());\n\n    /** @brief Computes undistortion and rectification maps for image transform by cv::remap(). If D is empty zero\n    distortion is used, if R or P is empty identity matrixes are used.\n\n    @param K Camera matrix \\f$K = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}\\f$.\n    @param D Input vector of distortion coefficients \\f$(k_1, k_2, k_3, k_4)\\f$.\n    @param R Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3\n    1-channel or 1x1 3-channel\n    @param P New camera matrix (3x3) or new projection matrix (3x4)\n    @param size Undistorted image size.\n    @param m1type Type of the first output map that can be CV_32FC1 or CV_16SC2 . See convertMaps()\n    for details.\n    @param map1 The first output map.\n    @param map2 The second output map.\n     */\n    CV_EXPORTS_W void initUndistortRectifyMap(InputArray K, InputArray D, InputArray R, InputArray P,\n        const cv::Size& size, int m1type, OutputArray map1, OutputArray map2);\n\n    /** @brief Transforms an image to compensate for fisheye lens distortion.\n\n    @param distorted image with fisheye lens distortion.\n    @param undistorted Output image with compensated fisheye lens distortion.\n    @param K Camera matrix \\f$K = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}\\f$.\n    @param D Input vector of distortion coefficients \\f$(k_1, k_2, k_3, k_4)\\f$.\n    @param Knew Camera matrix of the distorted image. By default, it is the identity matrix but you\n    may additionally scale and shift the result by using a different matrix.\n    @param new_size\n\n    The function transforms an image to compensate radial and tangential lens distortion.\n\n    The function is simply a combination of fisheye::initUndistortRectifyMap (with unity R ) and remap\n    (with bilinear interpolation). See the former function for details of the transformation being\n    performed.\n\n    See below the results of undistortImage.\n       -   a\\) result of undistort of perspective camera model (all possible coefficients (k_1, k_2, k_3,\n            k_4, k_5, k_6) of distortion were optimized under calibration)\n        -   b\\) result of fisheye::undistortImage of fisheye camera model (all possible coefficients (k_1, k_2,\n            k_3, k_4) of fisheye distortion were optimized under calibration)\n        -   c\\) original image was captured with fisheye lens\n\n    Pictures a) and b) almost the same. But if we consider points of image located far from the center\n    of image, we can notice that on image a) these points are distorted.\n\n    ![image](pics/fisheye_undistorted.jpg)\n     */\n    CV_EXPORTS_W void undistortImage(InputArray distorted, OutputArray undistorted,\n        InputArray K, InputArray D, InputArray Knew = cv::noArray(), const Size& new_size = Size());\n\n    /** @brief Estimates new camera matrix for undistortion or rectification.\n\n    @param K Camera matrix \\f$K = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}\\f$.\n    @param image_size\n    @param D Input vector of distortion coefficients \\f$(k_1, k_2, k_3, k_4)\\f$.\n    @param R Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3\n    1-channel or 1x1 3-channel\n    @param P New camera matrix (3x3) or new projection matrix (3x4)\n    @param balance Sets the new focal length in range between the min focal length and the max focal\n    length. Balance is in range of [0, 1].\n    @param new_size\n    @param fov_scale Divisor for new focal length.\n     */\n    CV_EXPORTS_W void estimateNewCameraMatrixForUndistortRectify(InputArray K, InputArray D, const Size &image_size, InputArray R,\n        OutputArray P, double balance = 0.0, const Size& new_size = Size(), double fov_scale = 1.0);\n\n    /** @brief Performs camera calibaration\n\n    @param objectPoints vector of vectors of calibration pattern points in the calibration pattern\n    coordinate space.\n    @param imagePoints vector of vectors of the projections of calibration pattern points.\n    imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to\n    objectPoints[i].size() for each i.\n    @param image_size Size of the image used only to initialize the intrinsic camera matrix.\n    @param K Output 3x3 floating-point camera matrix\n    \\f$A = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\\f$ . If\n    fisheye::CALIB_USE_INTRINSIC_GUESS/ is specified, some or all of fx, fy, cx, cy must be\n    initialized before calling the function.\n    @param D Output vector of distortion coefficients \\f$(k_1, k_2, k_3, k_4)\\f$.\n    @param rvecs Output vector of rotation vectors (see Rodrigues ) estimated for each pattern view.\n    That is, each k-th rotation vector together with the corresponding k-th translation vector (see\n    the next output parameter description) brings the calibration pattern from the model coordinate\n    space (in which object points are specified) to the world coordinate space, that is, a real\n    position of the calibration pattern in the k-th pattern view (k=0.. *M* -1).\n    @param tvecs Output vector of translation vectors estimated for each pattern view.\n    @param flags Different flags that may be zero or a combination of the following values:\n    -   **fisheye::CALIB_USE_INTRINSIC_GUESS** cameraMatrix contains valid initial values of\n    fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image\n    center ( imageSize is used), and focal distances are computed in a least-squares fashion.\n    -   **fisheye::CALIB_RECOMPUTE_EXTRINSIC** Extrinsic will be recomputed after each iteration\n    of intrinsic optimization.\n    -   **fisheye::CALIB_CHECK_COND** The functions will check validity of condition number.\n    -   **fisheye::CALIB_FIX_SKEW** Skew coefficient (alpha) is set to zero and stay zero.\n    -   **fisheye::CALIB_FIX_K1..4** Selected distortion coefficients are set to zeros and stay\n    zero.\n    @param criteria Termination criteria for the iterative optimization algorithm.\n     */\n    CV_EXPORTS_W double calibrate(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints, const Size& image_size,\n        InputOutputArray K, InputOutputArray D, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs, int flags = 0,\n            TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON));\n\n    /** @brief Stereo rectification for fisheye camera model\n\n    @param K1 First camera matrix.\n    @param D1 First camera distortion parameters.\n    @param K2 Second camera matrix.\n    @param D2 Second camera distortion parameters.\n    @param imageSize Size of the image used for stereo calibration.\n    @param R Rotation matrix between the coordinate systems of the first and the second\n    cameras.\n    @param tvec Translation vector between coordinate systems of the cameras.\n    @param R1 Output 3x3 rectification transform (rotation matrix) for the first camera.\n    @param R2 Output 3x3 rectification transform (rotation matrix) for the second camera.\n    @param P1 Output 3x4 projection matrix in the new (rectified) coordinate systems for the first\n    camera.\n    @param P2 Output 3x4 projection matrix in the new (rectified) coordinate systems for the second\n    camera.\n    @param Q Output \\f$4 \\times 4\\f$ disparity-to-depth mapping matrix (see reprojectImageTo3D ).\n    @param flags Operation flags that may be zero or CV_CALIB_ZERO_DISPARITY . If the flag is set,\n    the function makes the principal points of each camera have the same pixel coordinates in the\n    rectified views. And if the flag is not set, the function may still shift the images in the\n    horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the\n    useful image area.\n    @param newImageSize New image resolution after rectification. The same size should be passed to\n    initUndistortRectifyMap (see the stereo_calib.cpp sample in OpenCV samples directory). When (0,0)\n    is passed (default), it is set to the original imageSize . Setting it to larger value can help you\n    preserve details in the original image, especially when there is a big radial distortion.\n    @param balance Sets the new focal length in range between the min focal length and the max focal\n    length. Balance is in range of [0, 1].\n    @param fov_scale Divisor for new focal length.\n     */\n    CV_EXPORTS_W void stereoRectify(InputArray K1, InputArray D1, InputArray K2, InputArray D2, const Size &imageSize, InputArray R, InputArray tvec,\n        OutputArray R1, OutputArray R2, OutputArray P1, OutputArray P2, OutputArray Q, int flags, const Size &newImageSize = Size(),\n        double balance = 0.0, double fov_scale = 1.0);\n\n    /** @brief Performs stereo calibration\n\n    @param objectPoints Vector of vectors of the calibration pattern points.\n    @param imagePoints1 Vector of vectors of the projections of the calibration pattern points,\n    observed by the first camera.\n    @param imagePoints2 Vector of vectors of the projections of the calibration pattern points,\n    observed by the second camera.\n    @param K1 Input/output first camera matrix:\n    \\f$\\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\\f$ , \\f$j = 0,\\, 1\\f$ . If\n    any of fisheye::CALIB_USE_INTRINSIC_GUESS , fisheye::CV_CALIB_FIX_INTRINSIC are specified,\n    some or all of the matrix components must be initialized.\n    @param D1 Input/output vector of distortion coefficients \\f$(k_1, k_2, k_3, k_4)\\f$ of 4 elements.\n    @param K2 Input/output second camera matrix. The parameter is similar to K1 .\n    @param D2 Input/output lens distortion coefficients for the second camera. The parameter is\n    similar to D1 .\n    @param imageSize Size of the image used only to initialize intrinsic camera matrix.\n    @param R Output rotation matrix between the 1st and the 2nd camera coordinate systems.\n    @param T Output translation vector between the coordinate systems of the cameras.\n    @param flags Different flags that may be zero or a combination of the following values:\n    -   **fisheye::CV_CALIB_FIX_INTRINSIC** Fix K1, K2? and D1, D2? so that only R, T matrices\n    are estimated.\n    -   **fisheye::CALIB_USE_INTRINSIC_GUESS** K1, K2 contains valid initial values of\n    fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image\n    center (imageSize is used), and focal distances are computed in a least-squares fashion.\n    -   **fisheye::CALIB_RECOMPUTE_EXTRINSIC** Extrinsic will be recomputed after each iteration\n    of intrinsic optimization.\n    -   **fisheye::CALIB_CHECK_COND** The functions will check validity of condition number.\n    -   **fisheye::CALIB_FIX_SKEW** Skew coefficient (alpha) is set to zero and stay zero.\n    -   **fisheye::CALIB_FIX_K1..4** Selected distortion coefficients are set to zeros and stay\n    zero.\n    @param criteria Termination criteria for the iterative optimization algorithm.\n     */\n    CV_EXPORTS_W double stereoCalibrate(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2,\n                                  InputOutputArray K1, InputOutputArray D1, InputOutputArray K2, InputOutputArray D2, Size imageSize,\n                                  OutputArray R, OutputArray T, int flags = fisheye::CALIB_FIX_INTRINSIC,\n                                  TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON));\n\n//! @} calib3d_fisheye\n}\n\n} // cv\n\n#ifndef DISABLE_OPENCV_24_COMPATIBILITY\n#include \"opencv2/calib3d/calib3d_c.h\"\n#endif\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/affine.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_AFFINE3_HPP__\n#define __OPENCV_CORE_AFFINE3_HPP__\n\n#ifdef __cplusplus\n\n#include <opencv2/core.hpp>\n\nnamespace cv\n{\n\n//! @addtogroup core\n//! @{\n\n    /** @brief Affine transform\n      @todo document\n     */\n    template<typename T>\n    class Affine3\n    {\n    public:\n        typedef T float_type;\n        typedef Matx<float_type, 3, 3> Mat3;\n        typedef Matx<float_type, 4, 4> Mat4;\n        typedef Vec<float_type, 3> Vec3;\n\n        Affine3();\n\n        //! Augmented affine matrix\n        Affine3(const Mat4& affine);\n\n        //! Rotation matrix\n        Affine3(const Mat3& R, const Vec3& t = Vec3::all(0));\n\n        //! Rodrigues vector\n        Affine3(const Vec3& rvec, const Vec3& t = Vec3::all(0));\n\n        //! Combines all contructors above. Supports 4x4, 4x3, 3x3, 1x3, 3x1 sizes of data matrix\n        explicit Affine3(const Mat& data, const Vec3& t = Vec3::all(0));\n\n        //! From 16th element array\n        explicit Affine3(const float_type* vals);\n\n        //! Create identity transform\n        static Affine3 Identity();\n\n        //! Rotation matrix\n        void rotation(const Mat3& R);\n\n        //! Rodrigues vector\n        void rotation(const Vec3& rvec);\n\n        //! Combines rotation methods above. Suports 3x3, 1x3, 3x1 sizes of data matrix;\n        void rotation(const Mat& data);\n\n        void linear(const Mat3& L);\n        void translation(const Vec3& t);\n\n        Mat3 rotation() const;\n        Mat3 linear() const;\n        Vec3 translation() const;\n\n        //! Rodrigues vector\n        Vec3 rvec() const;\n\n        Affine3 inv(int method = cv::DECOMP_SVD) const;\n\n        //! a.rotate(R) is equivalent to Affine(R, 0) * a;\n        Affine3 rotate(const Mat3& R) const;\n\n        //! a.rotate(R) is equivalent to Affine(rvec, 0) * a;\n        Affine3 rotate(const Vec3& rvec) const;\n\n        //! a.translate(t) is equivalent to Affine(E, t) * a;\n        Affine3 translate(const Vec3& t) const;\n\n        //! a.concatenate(affine) is equivalent to affine * a;\n        Affine3 concatenate(const Affine3& affine) const;\n\n        template <typename Y> operator Affine3<Y>() const;\n\n        template <typename Y> Affine3<Y> cast() const;\n\n        Mat4 matrix;\n\n#if defined EIGEN_WORLD_VERSION && defined EIGEN_GEOMETRY_MODULE_H\n        Affine3(const Eigen::Transform<T, 3, Eigen::Affine, (Eigen::RowMajor)>& affine);\n        Affine3(const Eigen::Transform<T, 3, Eigen::Affine>& affine);\n        operator Eigen::Transform<T, 3, Eigen::Affine, (Eigen::RowMajor)>() const;\n        operator Eigen::Transform<T, 3, Eigen::Affine>() const;\n#endif\n    };\n\n    template<typename T> static\n    Affine3<T> operator*(const Affine3<T>& affine1, const Affine3<T>& affine2);\n\n    template<typename T, typename V> static\n    V operator*(const Affine3<T>& affine, const V& vector);\n\n    typedef Affine3<float> Affine3f;\n    typedef Affine3<double> Affine3d;\n\n    static Vec3f operator*(const Affine3f& affine, const Vec3f& vector);\n    static Vec3d operator*(const Affine3d& affine, const Vec3d& vector);\n\n    template<typename _Tp> class DataType< Affine3<_Tp> >\n    {\n    public:\n        typedef Affine3<_Tp>                               value_type;\n        typedef Affine3<typename DataType<_Tp>::work_type> work_type;\n        typedef _Tp                                        channel_type;\n\n        enum { generic_type = 0,\n               depth        = DataType<channel_type>::depth,\n               channels     = 16,\n               fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n               type         = CV_MAKETYPE(depth, channels)\n             };\n\n        typedef Vec<channel_type, channels> vec_type;\n    };\n\n//! @} core\n\n}\n\n//! @cond IGNORED\n\n///////////////////////////////////////////////////////////////////////////////////\n// Implementaiton\n\ntemplate<typename T> inline\ncv::Affine3<T>::Affine3()\n    : matrix(Mat4::eye())\n{}\n\ntemplate<typename T> inline\ncv::Affine3<T>::Affine3(const Mat4& affine)\n    : matrix(affine)\n{}\n\ntemplate<typename T> inline\ncv::Affine3<T>::Affine3(const Mat3& R, const Vec3& t)\n{\n    rotation(R);\n    translation(t);\n    matrix.val[12] = matrix.val[13] = matrix.val[14] = 0;\n    matrix.val[15] = 1;\n}\n\ntemplate<typename T> inline\ncv::Affine3<T>::Affine3(const Vec3& _rvec, const Vec3& t)\n{\n    rotation(_rvec);\n    translation(t);\n    matrix.val[12] = matrix.val[13] = matrix.val[14] = 0;\n    matrix.val[15] = 1;\n}\n\ntemplate<typename T> inline\ncv::Affine3<T>::Affine3(const cv::Mat& data, const Vec3& t)\n{\n    CV_Assert(data.type() == cv::DataType<T>::type);\n\n    if (data.cols == 4 && data.rows == 4)\n    {\n        data.copyTo(matrix);\n        return;\n    }\n    else if (data.cols == 4 && data.rows == 3)\n    {\n        rotation(data(Rect(0, 0, 3, 3)));\n        translation(data(Rect(3, 0, 1, 3)));\n        return;\n    }\n\n    rotation(data);\n    translation(t);\n    matrix.val[12] = matrix.val[13] = matrix.val[14] = 0;\n    matrix.val[15] = 1;\n}\n\ntemplate<typename T> inline\ncv::Affine3<T>::Affine3(const float_type* vals) : matrix(vals)\n{}\n\ntemplate<typename T> inline\ncv::Affine3<T> cv::Affine3<T>::Identity()\n{\n    return Affine3<T>(cv::Affine3<T>::Mat4::eye());\n}\n\ntemplate<typename T> inline\nvoid cv::Affine3<T>::rotation(const Mat3& R)\n{\n    linear(R);\n}\n\ntemplate<typename T> inline\nvoid cv::Affine3<T>::rotation(const Vec3& _rvec)\n{\n    double rx = _rvec[0], ry = _rvec[1], rz = _rvec[2];\n    double theta = std::sqrt(rx*rx + ry*ry + rz*rz);\n\n    if (theta < DBL_EPSILON)\n        rotation(Mat3::eye());\n    else\n    {\n        const double I[] = { 1, 0, 0, 0, 1, 0, 0, 0, 1 };\n\n        double c = std::cos(theta);\n        double s = std::sin(theta);\n        double c1 = 1. - c;\n        double itheta = (theta != 0) ? 1./theta : 0.;\n\n        rx *= itheta; ry *= itheta; rz *= itheta;\n\n        double rrt[] = { rx*rx, rx*ry, rx*rz, rx*ry, ry*ry, ry*rz, rx*rz, ry*rz, rz*rz };\n        double _r_x_[] = { 0, -rz, ry, rz, 0, -rx, -ry, rx, 0 };\n        Mat3 R;\n\n        // R = cos(theta)*I + (1 - cos(theta))*r*rT + sin(theta)*[r_x]\n        // where [r_x] is [0 -rz ry; rz 0 -rx; -ry rx 0]\n        for(int k = 0; k < 9; ++k)\n            R.val[k] = static_cast<float_type>(c*I[k] + c1*rrt[k] + s*_r_x_[k]);\n\n        rotation(R);\n    }\n}\n\n//Combines rotation methods above. Suports 3x3, 1x3, 3x1 sizes of data matrix;\ntemplate<typename T> inline\nvoid cv::Affine3<T>::rotation(const cv::Mat& data)\n{\n    CV_Assert(data.type() == cv::DataType<T>::type);\n\n    if (data.cols == 3 && data.rows == 3)\n    {\n        Mat3 R;\n        data.copyTo(R);\n        rotation(R);\n    }\n    else if ((data.cols == 3 && data.rows == 1) || (data.cols == 1 && data.rows == 3))\n    {\n        Vec3 _rvec;\n        data.reshape(1, 3).copyTo(_rvec);\n        rotation(_rvec);\n    }\n    else\n        CV_Assert(!\"Input marix can be 3x3, 1x3 or 3x1\");\n}\n\ntemplate<typename T> inline\nvoid cv::Affine3<T>::linear(const Mat3& L)\n{\n    matrix.val[0] = L.val[0]; matrix.val[1] = L.val[1];  matrix.val[ 2] = L.val[2];\n    matrix.val[4] = L.val[3]; matrix.val[5] = L.val[4];  matrix.val[ 6] = L.val[5];\n    matrix.val[8] = L.val[6]; matrix.val[9] = L.val[7];  matrix.val[10] = L.val[8];\n}\n\ntemplate<typename T> inline\nvoid cv::Affine3<T>::translation(const Vec3& t)\n{\n    matrix.val[3] = t[0]; matrix.val[7] = t[1]; matrix.val[11] = t[2];\n}\n\ntemplate<typename T> inline\ntypename cv::Affine3<T>::Mat3 cv::Affine3<T>::rotation() const\n{\n    return linear();\n}\n\ntemplate<typename T> inline\ntypename cv::Affine3<T>::Mat3 cv::Affine3<T>::linear() const\n{\n    typename cv::Affine3<T>::Mat3 R;\n    R.val[0] = matrix.val[0];  R.val[1] = matrix.val[1];  R.val[2] = matrix.val[ 2];\n    R.val[3] = matrix.val[4];  R.val[4] = matrix.val[5];  R.val[5] = matrix.val[ 6];\n    R.val[6] = matrix.val[8];  R.val[7] = matrix.val[9];  R.val[8] = matrix.val[10];\n    return R;\n}\n\ntemplate<typename T> inline\ntypename cv::Affine3<T>::Vec3 cv::Affine3<T>::translation() const\n{\n    return Vec3(matrix.val[3], matrix.val[7], matrix.val[11]);\n}\n\ntemplate<typename T> inline\ntypename cv::Affine3<T>::Vec3 cv::Affine3<T>::rvec() const\n{\n    cv::Vec3d w;\n    cv::Matx33d u, vt, R = rotation();\n    cv::SVD::compute(R, w, u, vt, cv::SVD::FULL_UV + cv::SVD::MODIFY_A);\n    R = u * vt;\n\n    double rx = R.val[7] - R.val[5];\n    double ry = R.val[2] - R.val[6];\n    double rz = R.val[3] - R.val[1];\n\n    double s = std::sqrt((rx*rx + ry*ry + rz*rz)*0.25);\n    double c = (R.val[0] + R.val[4] + R.val[8] - 1) * 0.5;\n    c = c > 1.0 ? 1.0 : c < -1.0 ? -1.0 : c;\n    double theta = acos(c);\n\n    if( s < 1e-5 )\n    {\n        if( c > 0 )\n            rx = ry = rz = 0;\n        else\n        {\n            double t;\n            t = (R.val[0] + 1) * 0.5;\n            rx = std::sqrt(std::max(t, 0.0));\n            t = (R.val[4] + 1) * 0.5;\n            ry = std::sqrt(std::max(t, 0.0)) * (R.val[1] < 0 ? -1.0 : 1.0);\n            t = (R.val[8] + 1) * 0.5;\n            rz = std::sqrt(std::max(t, 0.0)) * (R.val[2] < 0 ? -1.0 : 1.0);\n\n            if( fabs(rx) < fabs(ry) && fabs(rx) < fabs(rz) && (R.val[5] > 0) != (ry*rz > 0) )\n                rz = -rz;\n            theta /= std::sqrt(rx*rx + ry*ry + rz*rz);\n            rx *= theta;\n            ry *= theta;\n            rz *= theta;\n        }\n    }\n    else\n    {\n        double vth = 1/(2*s);\n        vth *= theta;\n        rx *= vth; ry *= vth; rz *= vth;\n    }\n\n    return cv::Vec3d(rx, ry, rz);\n}\n\ntemplate<typename T> inline\ncv::Affine3<T> cv::Affine3<T>::inv(int method) const\n{\n    return matrix.inv(method);\n}\n\ntemplate<typename T> inline\ncv::Affine3<T> cv::Affine3<T>::rotate(const Mat3& R) const\n{\n    Mat3 Lc = linear();\n    Vec3 tc = translation();\n    Mat4 result;\n    result.val[12] = result.val[13] = result.val[14] = 0;\n    result.val[15] = 1;\n\n    for(int j = 0; j < 3; ++j)\n    {\n        for(int i = 0; i < 3; ++i)\n        {\n            float_type value = 0;\n            for(int k = 0; k < 3; ++k)\n                value += R(j, k) * Lc(k, i);\n            result(j, i) = value;\n        }\n\n        result(j, 3) = R.row(j).dot(tc.t());\n    }\n    return result;\n}\n\ntemplate<typename T> inline\ncv::Affine3<T> cv::Affine3<T>::rotate(const Vec3& _rvec) const\n{\n    return rotate(Affine3f(_rvec).rotation());\n}\n\ntemplate<typename T> inline\ncv::Affine3<T> cv::Affine3<T>::translate(const Vec3& t) const\n{\n    Mat4 m = matrix;\n    m.val[ 3] += t[0];\n    m.val[ 7] += t[1];\n    m.val[11] += t[2];\n    return m;\n}\n\ntemplate<typename T> inline\ncv::Affine3<T> cv::Affine3<T>::concatenate(const Affine3<T>& affine) const\n{\n    return (*this).rotate(affine.rotation()).translate(affine.translation());\n}\n\ntemplate<typename T> template <typename Y> inline\ncv::Affine3<T>::operator Affine3<Y>() const\n{\n    return Affine3<Y>(matrix);\n}\n\ntemplate<typename T> template <typename Y> inline\ncv::Affine3<Y> cv::Affine3<T>::cast() const\n{\n    return Affine3<Y>(matrix);\n}\n\ntemplate<typename T> inline\ncv::Affine3<T> cv::operator*(const cv::Affine3<T>& affine1, const cv::Affine3<T>& affine2)\n{\n    return affine2.concatenate(affine1);\n}\n\ntemplate<typename T, typename V> inline\nV cv::operator*(const cv::Affine3<T>& affine, const V& v)\n{\n    const typename Affine3<T>::Mat4& m = affine.matrix;\n\n    V r;\n    r.x = m.val[0] * v.x + m.val[1] * v.y + m.val[ 2] * v.z + m.val[ 3];\n    r.y = m.val[4] * v.x + m.val[5] * v.y + m.val[ 6] * v.z + m.val[ 7];\n    r.z = m.val[8] * v.x + m.val[9] * v.y + m.val[10] * v.z + m.val[11];\n    return r;\n}\n\nstatic inline\ncv::Vec3f cv::operator*(const cv::Affine3f& affine, const cv::Vec3f& v)\n{\n    const cv::Matx44f& m = affine.matrix;\n    cv::Vec3f r;\n    r.val[0] = m.val[0] * v[0] + m.val[1] * v[1] + m.val[ 2] * v[2] + m.val[ 3];\n    r.val[1] = m.val[4] * v[0] + m.val[5] * v[1] + m.val[ 6] * v[2] + m.val[ 7];\n    r.val[2] = m.val[8] * v[0] + m.val[9] * v[1] + m.val[10] * v[2] + m.val[11];\n    return r;\n}\n\nstatic inline\ncv::Vec3d cv::operator*(const cv::Affine3d& affine, const cv::Vec3d& v)\n{\n    const cv::Matx44d& m = affine.matrix;\n    cv::Vec3d r;\n    r.val[0] = m.val[0] * v[0] + m.val[1] * v[1] + m.val[ 2] * v[2] + m.val[ 3];\n    r.val[1] = m.val[4] * v[0] + m.val[5] * v[1] + m.val[ 6] * v[2] + m.val[ 7];\n    r.val[2] = m.val[8] * v[0] + m.val[9] * v[1] + m.val[10] * v[2] + m.val[11];\n    return r;\n}\n\n\n\n#if defined EIGEN_WORLD_VERSION && defined EIGEN_GEOMETRY_MODULE_H\n\ntemplate<typename T> inline\ncv::Affine3<T>::Affine3(const Eigen::Transform<T, 3, Eigen::Affine, (Eigen::RowMajor)>& affine)\n{\n    cv::Mat(4, 4, cv::DataType<T>::type, affine.matrix().data()).copyTo(matrix);\n}\n\ntemplate<typename T> inline\ncv::Affine3<T>::Affine3(const Eigen::Transform<T, 3, Eigen::Affine>& affine)\n{\n    Eigen::Transform<T, 3, Eigen::Affine, (Eigen::RowMajor)> a = affine;\n    cv::Mat(4, 4, cv::DataType<T>::type, a.matrix().data()).copyTo(matrix);\n}\n\ntemplate<typename T> inline\ncv::Affine3<T>::operator Eigen::Transform<T, 3, Eigen::Affine, (Eigen::RowMajor)>() const\n{\n    Eigen::Transform<T, 3, Eigen::Affine, (Eigen::RowMajor)> r;\n    cv::Mat hdr(4, 4, cv::DataType<T>::type, r.matrix().data());\n    cv::Mat(matrix, false).copyTo(hdr);\n    return r;\n}\n\ntemplate<typename T> inline\ncv::Affine3<T>::operator Eigen::Transform<T, 3, Eigen::Affine>() const\n{\n    return this->operator Eigen::Transform<T, 3, Eigen::Affine, (Eigen::RowMajor)>();\n}\n\n#endif /* defined EIGEN_WORLD_VERSION && defined EIGEN_GEOMETRY_MODULE_H */\n\n//! @endcond\n\n#endif /* __cplusplus */\n\n#endif /* __OPENCV_CORE_AFFINE3_HPP__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/base.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2014, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_BASE_HPP__\n#define __OPENCV_CORE_BASE_HPP__\n\n#ifndef __cplusplus\n#  error base.hpp header must be compiled as C++\n#endif\n\n#include <climits>\n\n#include \"opencv2/core/cvdef.h\"\n#include \"opencv2/core/cvstd.hpp\"\n#include \"opencv2/hal.hpp\"\n\nnamespace cv\n{\n\n//! @addtogroup core_utils\n//! @{\n\nnamespace Error {\n//! error codes\nenum Code {\n    StsOk=                       0,  //!< everithing is ok\n    StsBackTrace=               -1,  //!< pseudo error for back trace\n    StsError=                   -2,  //!< unknown /unspecified error\n    StsInternal=                -3,  //!< internal error (bad state)\n    StsNoMem=                   -4,  //!< insufficient memory\n    StsBadArg=                  -5,  //!< function arg/param is bad\n    StsBadFunc=                 -6,  //!< unsupported function\n    StsNoConv=                  -7,  //!< iter. didn't converge\n    StsAutoTrace=               -8,  //!< tracing\n    HeaderIsNull=               -9,  //!< image header is NULL\n    BadImageSize=              -10,  //!< image size is invalid\n    BadOffset=                 -11,  //!< offset is invalid\n    BadDataPtr=                -12,  //!<\n    BadStep=                   -13,  //!<\n    BadModelOrChSeq=           -14,  //!<\n    BadNumChannels=            -15,  //!<\n    BadNumChannel1U=           -16,  //!<\n    BadDepth=                  -17,  //!<\n    BadAlphaChannel=           -18,  //!<\n    BadOrder=                  -19,  //!<\n    BadOrigin=                 -20,  //!<\n    BadAlign=                  -21,  //!<\n    BadCallBack=               -22,  //!<\n    BadTileSize=               -23,  //!<\n    BadCOI=                    -24,  //!<\n    BadROISize=                -25,  //!<\n    MaskIsTiled=               -26,  //!<\n    StsNullPtr=                -27,  //!< null pointer\n    StsVecLengthErr=           -28,  //!< incorrect vector length\n    StsFilterStructContentErr= -29,  //!< incorr. filter structure content\n    StsKernelStructContentErr= -30,  //!< incorr. transform kernel content\n    StsFilterOffsetErr=        -31,  //!< incorrect filter ofset value\n    StsBadSize=                -201, //!< the input/output structure size is incorrect\n    StsDivByZero=              -202, //!< division by zero\n    StsInplaceNotSupported=    -203, //!< in-place operation is not supported\n    StsObjectNotFound=         -204, //!< request can't be completed\n    StsUnmatchedFormats=       -205, //!< formats of input/output arrays differ\n    StsBadFlag=                -206, //!< flag is wrong or not supported\n    StsBadPoint=               -207, //!< bad CvPoint\n    StsBadMask=                -208, //!< bad format of mask (neither 8uC1 nor 8sC1)\n    StsUnmatchedSizes=         -209, //!< sizes of input/output structures do not match\n    StsUnsupportedFormat=      -210, //!< the data format/type is not supported by the function\n    StsOutOfRange=             -211, //!< some of parameters are out of range\n    StsParseError=             -212, //!< invalid syntax/structure of the parsed file\n    StsNotImplemented=         -213, //!< the requested function/feature is not implemented\n    StsBadMemBlock=            -214, //!< an allocated block has been corrupted\n    StsAssert=                 -215, //!< assertion failed\n    GpuNotSupported=           -216,\n    GpuApiCallError=           -217,\n    OpenGlNotSupported=        -218,\n    OpenGlApiCallError=        -219,\n    OpenCLApiCallError=        -220,\n    OpenCLDoubleNotSupported=  -221,\n    OpenCLInitError=           -222,\n    OpenCLNoAMDBlasFft=        -223\n};\n} //Error\n\n//! @} core_utils\n\n//! @addtogroup core_array\n//! @{\n\n//! matrix decomposition types\nenum DecompTypes {\n    /** Gaussian elimination with the optimal pivot element chosen. */\n    DECOMP_LU       = 0,\n    /** singular value decomposition (SVD) method; the system can be over-defined and/or the matrix\n    src1 can be singular */\n    DECOMP_SVD      = 1,\n    /** eigenvalue decomposition; the matrix src1 must be symmetrical */\n    DECOMP_EIG      = 2,\n    /** Cholesky \\f$LL^T\\f$ factorization; the matrix src1 must be symmetrical and positively\n    defined */\n    DECOMP_CHOLESKY = 3,\n    /** QR factorization; the system can be over-defined and/or the matrix src1 can be singular */\n    DECOMP_QR       = 4,\n    /** while all the previous flags are mutually exclusive, this flag can be used together with\n    any of the previous; it means that the normal equations\n    \\f$\\texttt{src1}^T\\cdot\\texttt{src1}\\cdot\\texttt{dst}=\\texttt{src1}^T\\texttt{src2}\\f$ are\n    solved instead of the original system\n    \\f$\\texttt{src1}\\cdot\\texttt{dst}=\\texttt{src2}\\f$ */\n    DECOMP_NORMAL   = 16\n};\n\n/** norm types\n- For one array:\n\\f[norm =  \\forkthree{\\|\\texttt{src1}\\|_{L_{\\infty}} =  \\max _I | \\texttt{src1} (I)|}{if  \\(\\texttt{normType} = \\texttt{NORM\\_INF}\\) }\n{ \\| \\texttt{src1} \\| _{L_1} =  \\sum _I | \\texttt{src1} (I)|}{if  \\(\\texttt{normType} = \\texttt{NORM\\_L1}\\) }\n{ \\| \\texttt{src1} \\| _{L_2} =  \\sqrt{\\sum_I \\texttt{src1}(I)^2} }{if  \\(\\texttt{normType} = \\texttt{NORM\\_L2}\\) }\\f]\n\n- Absolute norm for two arrays\n\\f[norm =  \\forkthree{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_{\\infty}} =  \\max _I | \\texttt{src1} (I) -  \\texttt{src2} (I)|}{if  \\(\\texttt{normType} = \\texttt{NORM\\_INF}\\) }\n{ \\| \\texttt{src1} - \\texttt{src2} \\| _{L_1} =  \\sum _I | \\texttt{src1} (I) -  \\texttt{src2} (I)|}{if  \\(\\texttt{normType} = \\texttt{NORM\\_L1}\\) }\n{ \\| \\texttt{src1} - \\texttt{src2} \\| _{L_2} =  \\sqrt{\\sum_I (\\texttt{src1}(I) - \\texttt{src2}(I))^2} }{if  \\(\\texttt{normType} = \\texttt{NORM\\_L2}\\) }\\f]\n\n- Relative norm for two arrays\n\\f[norm =  \\forkthree{\\frac{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_{\\infty}}    }{\\|\\texttt{src2}\\|_{L_{\\infty}} }}{if  \\(\\texttt{normType} = \\texttt{NORM\\_RELATIVE\\_INF}\\) }\n{ \\frac{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_1} }{\\|\\texttt{src2}\\|_{L_1}} }{if  \\(\\texttt{normType} = \\texttt{NORM\\_RELATIVE\\_L1}\\) }\n{ \\frac{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_2} }{\\|\\texttt{src2}\\|_{L_2}} }{if  \\(\\texttt{normType} = \\texttt{NORM\\_RELATIVE\\_L2}\\) }\\f]\n  */\nenum NormTypes { NORM_INF       = 1,\n                 NORM_L1        = 2,\n                 NORM_L2        = 4,\n                 NORM_L2SQR     = 5,\n                 NORM_HAMMING   = 6,\n                 NORM_HAMMING2  = 7,\n                 NORM_TYPE_MASK = 7,\n                 NORM_RELATIVE  = 8, //!< flag\n                 NORM_MINMAX    = 32 //!< flag\n               };\n\n//! comparison types\nenum CmpTypes { CMP_EQ = 0, //!< src1 is equal to src2.\n                CMP_GT = 1, //!< src1 is greater than src2.\n                CMP_GE = 2, //!< src1 is greater than or equal to src2.\n                CMP_LT = 3, //!< src1 is less than src2.\n                CMP_LE = 4, //!< src1 is less than or equal to src2.\n                CMP_NE = 5  //!< src1 is unequal to src2.\n              };\n\n//! generalized matrix multiplication flags\nenum GemmFlags { GEMM_1_T = 1, //!< transposes src1\n                 GEMM_2_T = 2, //!< transposes src2\n                 GEMM_3_T = 4 //!< transposes src3\n               };\n\nenum DftFlags {\n    /** performs an inverse 1D or 2D transform instead of the default forward\n        transform. */\n    DFT_INVERSE        = 1,\n    /** scales the result: divide it by the number of array elements. Normally, it is\n        combined with DFT_INVERSE. */\n    DFT_SCALE          = 2,\n    /** performs a forward or inverse transform of every individual row of the input\n        matrix; this flag enables you to transform multiple vectors simultaneously and can be used to\n        decrease the overhead (which is sometimes several times larger than the processing itself) to\n        perform 3D and higher-dimensional transformations and so forth.*/\n    DFT_ROWS           = 4,\n    /** performs a forward transformation of 1D or 2D real array; the result,\n        though being a complex array, has complex-conjugate symmetry (*CCS*, see the function\n        description below for details), and such an array can be packed into a real array of the same\n        size as input, which is the fastest option and which is what the function does by default;\n        however, you may wish to get a full complex array (for simpler spectrum analysis, and so on) -\n        pass the flag to enable the function to produce a full-size complex output array. */\n    DFT_COMPLEX_OUTPUT = 16,\n    /** performs an inverse transformation of a 1D or 2D complex array; the\n        result is normally a complex array of the same size, however, if the input array has\n        conjugate-complex symmetry (for example, it is a result of forward transformation with\n        DFT_COMPLEX_OUTPUT flag), the output is a real array; while the function itself does not\n        check whether the input is symmetrical or not, you can pass the flag and then the function\n        will assume the symmetry and produce the real output array (note that when the input is packed\n        into a real array and inverse transformation is executed, the function treats the input as a\n        packed complex-conjugate symmetrical array, and the output will also be a real array). */\n    DFT_REAL_OUTPUT    = 32,\n    /** performs an inverse 1D or 2D transform instead of the default forward transform. */\n    DCT_INVERSE        = DFT_INVERSE,\n    /** performs a forward or inverse transform of every individual row of the input\n        matrix. This flag enables you to transform multiple vectors simultaneously and can be used to\n        decrease the overhead (which is sometimes several times larger than the processing itself) to\n        perform 3D and higher-dimensional transforms and so forth.*/\n    DCT_ROWS           = DFT_ROWS\n};\n\n//! Various border types, image boundaries are denoted with `|`\n//! @see borderInterpolate, copyMakeBorder\nenum BorderTypes {\n    BORDER_CONSTANT    = 0, //!< `iiiiii|abcdefgh|iiiiiii`  with some specified `i`\n    BORDER_REPLICATE   = 1, //!< `aaaaaa|abcdefgh|hhhhhhh`\n    BORDER_REFLECT     = 2, //!< `fedcba|abcdefgh|hgfedcb`\n    BORDER_WRAP        = 3, //!< `cdefgh|abcdefgh|abcdefg`\n    BORDER_REFLECT_101 = 4, //!< `gfedcb|abcdefgh|gfedcba`\n    BORDER_TRANSPARENT = 5, //!< `uvwxyz|absdefgh|ijklmno`\n\n    BORDER_REFLECT101  = BORDER_REFLECT_101, //!< same as BORDER_REFLECT_101\n    BORDER_DEFAULT     = BORDER_REFLECT_101, //!< same as BORDER_REFLECT_101\n    BORDER_ISOLATED    = 16 //!< do not look outside of ROI\n};\n\n//! @} core_array\n\n//! @addtogroup core_utils\n//! @{\n\n//! @cond IGNORED\n\n//////////////// static assert /////////////////\n#define CVAUX_CONCAT_EXP(a, b) a##b\n#define CVAUX_CONCAT(a, b) CVAUX_CONCAT_EXP(a,b)\n\n#if defined(__clang__)\n#  ifndef __has_extension\n#    define __has_extension __has_feature /* compatibility, for older versions of clang */\n#  endif\n#  if __has_extension(cxx_static_assert)\n#    define CV_StaticAssert(condition, reason)    static_assert((condition), reason \" \" #condition)\n#  endif\n#elif defined(__GNUC__)\n#  if (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)\n#    define CV_StaticAssert(condition, reason)    static_assert((condition), reason \" \" #condition)\n#  endif\n#elif defined(_MSC_VER)\n#  if _MSC_VER >= 1600 /* MSVC 10 */\n#    define CV_StaticAssert(condition, reason)    static_assert((condition), reason \" \" #condition)\n#  endif\n#endif\n#ifndef CV_StaticAssert\n#  if defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 2)\n#    define CV_StaticAssert(condition, reason) ({ extern int __attribute__((error(\"CV_StaticAssert: \" reason \" \" #condition))) CV_StaticAssert(); ((condition) ? 0 : CV_StaticAssert()); })\n#  else\n     template <bool x> struct CV_StaticAssert_failed;\n     template <> struct CV_StaticAssert_failed<true> { enum { val = 1 }; };\n     template<int x> struct CV_StaticAssert_test {};\n#    define CV_StaticAssert(condition, reason)\\\n       typedef cv::CV_StaticAssert_test< sizeof(cv::CV_StaticAssert_failed< static_cast<bool>(condition) >) > CVAUX_CONCAT(CV_StaticAssert_failed_at_, __LINE__)\n#  endif\n#endif\n\n// Suppress warning \"-Wdeprecated-declarations\" / C4996\n#if defined(_MSC_VER)\n    #define CV_DO_PRAGMA(x) __pragma(x)\n#elif defined(__GNUC__)\n    #define CV_DO_PRAGMA(x) _Pragma (#x)\n#else\n    #define CV_DO_PRAGMA(x)\n#endif\n\n#ifdef _MSC_VER\n#define CV_SUPPRESS_DEPRECATED_START \\\n    CV_DO_PRAGMA(warning(push)) \\\n    CV_DO_PRAGMA(warning(disable: 4996))\n#define CV_SUPPRESS_DEPRECATED_END CV_DO_PRAGMA(warning(pop))\n#elif defined (__clang__) || ((__GNUC__)  && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))))\n#define CV_SUPPRESS_DEPRECATED_START \\\n    CV_DO_PRAGMA(GCC diagnostic push) \\\n    CV_DO_PRAGMA(GCC diagnostic ignored \"-Wdeprecated-declarations\")\n#define CV_SUPPRESS_DEPRECATED_END CV_DO_PRAGMA(GCC diagnostic pop)\n#else\n#define CV_SUPPRESS_DEPRECATED_START\n#define CV_SUPPRESS_DEPRECATED_END\n#endif\n//! @endcond\n\n/*! @brief Signals an error and raises the exception.\n\nBy default the function prints information about the error to stderr,\nthen it either stops if setBreakOnError() had been called before or raises the exception.\nIt is possible to alternate error processing by using redirectError().\n@param _code - error code (Error::Code)\n@param _err - error description\n@param _func - function name. Available only when the compiler supports getting it\n@param _file - source file name where the error has occured\n@param _line - line number in the source file where the error has occured\n@see CV_Error, CV_Error_, CV_ErrorNoReturn, CV_ErrorNoReturn_, CV_Assert, CV_DbgAssert\n */\nCV_EXPORTS void error(int _code, const String& _err, const char* _func, const char* _file, int _line);\n\n#ifdef __GNUC__\n# if defined __clang__ || defined __APPLE__\n#   pragma GCC diagnostic push\n#   pragma GCC diagnostic ignored \"-Winvalid-noreturn\"\n# endif\n#endif\n\n/** same as cv::error, but does not return */\nCV_INLINE CV_NORETURN void errorNoReturn(int _code, const String& _err, const char* _func, const char* _file, int _line)\n{\n    error(_code, _err, _func, _file, _line);\n#ifdef __GNUC__\n# if !defined __clang__ && !defined __APPLE__\n    // this suppresses this warning: \"noreturn\" function does return [enabled by default]\n    __builtin_trap();\n    // or use infinite loop: for (;;) {}\n# endif\n#endif\n}\n#ifdef __GNUC__\n# if defined __clang__ || defined __APPLE__\n#   pragma GCC diagnostic pop\n# endif\n#endif\n\n#if defined __GNUC__\n#define CV_Func __func__\n#elif defined _MSC_VER\n#define CV_Func __FUNCTION__\n#else\n#define CV_Func \"\"\n#endif\n\n/** @brief Call the error handler.\n\nCurrently, the error handler prints the error code and the error message to the standard\nerror stream `stderr`. In the Debug configuration, it then provokes memory access violation, so that\nthe execution stack and all the parameters can be analyzed by the debugger. In the Release\nconfiguration, the exception is thrown.\n\n@param code one of Error::Code\n@param msg error message\n*/\n#define CV_Error( code, msg ) cv::error( code, msg, CV_Func, __FILE__, __LINE__ )\n\n/**  @brief Call the error handler.\n\nThis macro can be used to construct an error message on-fly to include some dynamic information,\nfor example:\n@code\n    // note the extra parentheses around the formatted text message\n    CV_Error_( CV_StsOutOfRange,\n    (\"the value at (%d, %d)=%g is out of range\", badPt.x, badPt.y, badValue));\n@endcode\n@param code one of Error::Code\n@param args printf-like formatted error message in parentheses\n*/\n#define CV_Error_( code, args ) cv::error( code, cv::format args, CV_Func, __FILE__, __LINE__ )\n\n/** @brief Checks a condition at runtime and throws exception if it fails\n\nThe macros CV_Assert (and CV_DbgAssert(expr)) evaluate the specified expression. If it is 0, the macros\nraise an error (see cv::error). The macro CV_Assert checks the condition in both Debug and Release\nconfigurations while CV_DbgAssert is only retained in the Debug configuration.\n*/\n#define CV_Assert( expr ) if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ )\n\n/** same as CV_Error(code,msg), but does not return */\n#define CV_ErrorNoReturn( code, msg ) cv::errorNoReturn( code, msg, CV_Func, __FILE__, __LINE__ )\n\n/** same as CV_Error_(code,args), but does not return */\n#define CV_ErrorNoReturn_( code, args ) cv::errorNoReturn( code, cv::format args, CV_Func, __FILE__, __LINE__ )\n\n/** replaced with CV_Assert(expr) in Debug configuration */\n#ifdef _DEBUG\n#  define CV_DbgAssert(expr) CV_Assert(expr)\n#else\n#  define CV_DbgAssert(expr)\n#endif\n\n/*\n * Hamming distance functor - counts the bit differences between two strings - useful for the Brief descriptor\n * bit count of A exclusive XOR'ed with B\n */\nstruct CV_EXPORTS Hamming\n{\n    enum { normType = NORM_HAMMING };\n    typedef unsigned char ValueType;\n    typedef int ResultType;\n\n    /** this will count the bits in a ^ b\n     */\n    ResultType operator()( const unsigned char* a, const unsigned char* b, int size ) const;\n};\n\ntypedef Hamming HammingLUT;\n\n/////////////////////////////////// inline norms ////////////////////////////////////\n\ntemplate<typename _Tp> inline _Tp cv_abs(_Tp x) { return std::abs(x); }\ninline int cv_abs(uchar x) { return x; }\ninline int cv_abs(schar x) { return std::abs(x); }\ninline int cv_abs(ushort x) { return x; }\ninline int cv_abs(short x) { return std::abs(x); }\n\ntemplate<typename _Tp, typename _AccTp> static inline\n_AccTp normL2Sqr(const _Tp* a, int n)\n{\n    _AccTp s = 0;\n    int i=0;\n#if CV_ENABLE_UNROLLED\n    for( ; i <= n - 4; i += 4 )\n    {\n        _AccTp v0 = a[i], v1 = a[i+1], v2 = a[i+2], v3 = a[i+3];\n        s += v0*v0 + v1*v1 + v2*v2 + v3*v3;\n    }\n#endif\n    for( ; i < n; i++ )\n    {\n        _AccTp v = a[i];\n        s += v*v;\n    }\n    return s;\n}\n\ntemplate<typename _Tp, typename _AccTp> static inline\n_AccTp normL1(const _Tp* a, int n)\n{\n    _AccTp s = 0;\n    int i = 0;\n#if CV_ENABLE_UNROLLED\n    for(; i <= n - 4; i += 4 )\n    {\n        s += (_AccTp)cv_abs(a[i]) + (_AccTp)cv_abs(a[i+1]) +\n            (_AccTp)cv_abs(a[i+2]) + (_AccTp)cv_abs(a[i+3]);\n    }\n#endif\n    for( ; i < n; i++ )\n        s += cv_abs(a[i]);\n    return s;\n}\n\ntemplate<typename _Tp, typename _AccTp> static inline\n_AccTp normInf(const _Tp* a, int n)\n{\n    _AccTp s = 0;\n    for( int i = 0; i < n; i++ )\n        s = std::max(s, (_AccTp)cv_abs(a[i]));\n    return s;\n}\n\ntemplate<typename _Tp, typename _AccTp> static inline\n_AccTp normL2Sqr(const _Tp* a, const _Tp* b, int n)\n{\n    _AccTp s = 0;\n    int i= 0;\n#if CV_ENABLE_UNROLLED\n    for(; i <= n - 4; i += 4 )\n    {\n        _AccTp v0 = _AccTp(a[i] - b[i]), v1 = _AccTp(a[i+1] - b[i+1]), v2 = _AccTp(a[i+2] - b[i+2]), v3 = _AccTp(a[i+3] - b[i+3]);\n        s += v0*v0 + v1*v1 + v2*v2 + v3*v3;\n    }\n#endif\n    for( ; i < n; i++ )\n    {\n        _AccTp v = _AccTp(a[i] - b[i]);\n        s += v*v;\n    }\n    return s;\n}\n\nstatic inline float normL2Sqr(const float* a, const float* b, int n)\n{\n    float s = 0.f;\n    for( int i = 0; i < n; i++ )\n    {\n        float v = a[i] - b[i];\n        s += v*v;\n    }\n    return s;\n}\n\ntemplate<typename _Tp, typename _AccTp> static inline\n_AccTp normL1(const _Tp* a, const _Tp* b, int n)\n{\n    _AccTp s = 0;\n    int i= 0;\n#if CV_ENABLE_UNROLLED\n    for(; i <= n - 4; i += 4 )\n    {\n        _AccTp v0 = _AccTp(a[i] - b[i]), v1 = _AccTp(a[i+1] - b[i+1]), v2 = _AccTp(a[i+2] - b[i+2]), v3 = _AccTp(a[i+3] - b[i+3]);\n        s += std::abs(v0) + std::abs(v1) + std::abs(v2) + std::abs(v3);\n    }\n#endif\n    for( ; i < n; i++ )\n    {\n        _AccTp v = _AccTp(a[i] - b[i]);\n        s += std::abs(v);\n    }\n    return s;\n}\n\ninline float normL1(const float* a, const float* b, int n)\n{\n    float s = 0.f;\n    for( int i = 0; i < n; i++ )\n    {\n        s += std::abs(a[i] - b[i]);\n    }\n    return s;\n}\n\ninline int normL1(const uchar* a, const uchar* b, int n)\n{\n    int s = 0;\n    for( int i = 0; i < n; i++ )\n    {\n        s += std::abs(a[i] - b[i]);\n    }\n    return s;\n}\n\ntemplate<typename _Tp, typename _AccTp> static inline\n_AccTp normInf(const _Tp* a, const _Tp* b, int n)\n{\n    _AccTp s = 0;\n    for( int i = 0; i < n; i++ )\n    {\n        _AccTp v0 = a[i] - b[i];\n        s = std::max(s, std::abs(v0));\n    }\n    return s;\n}\n\n/** @brief Computes the cube root of an argument.\n\n The function cubeRoot computes \\f$\\sqrt[3]{\\texttt{val}}\\f$. Negative arguments are handled correctly.\n NaN and Inf are not handled. The accuracy approaches the maximum possible accuracy for\n single-precision data.\n @param val A function argument.\n */\nCV_EXPORTS_W float cubeRoot(float val);\n\n/** @brief Calculates the angle of a 2D vector in degrees.\n\n The function fastAtan2 calculates the full-range angle of an input 2D vector. The angle is measured\n in degrees and varies from 0 to 360 degrees. The accuracy is about 0.3 degrees.\n @param x x-coordinate of the vector.\n @param y y-coordinate of the vector.\n */\nCV_EXPORTS_W float fastAtan2(float y, float x);\n\n/** proxy for hal::LU */\nCV_EXPORTS int LU(float* A, size_t astep, int m, float* b, size_t bstep, int n);\n/** proxy for hal::LU */\nCV_EXPORTS int LU(double* A, size_t astep, int m, double* b, size_t bstep, int n);\n/** proxy for hal::Cholesky */\nCV_EXPORTS bool Cholesky(float* A, size_t astep, int m, float* b, size_t bstep, int n);\n/** proxy for hal::Cholesky */\nCV_EXPORTS bool Cholesky(double* A, size_t astep, int m, double* b, size_t bstep, int n);\n\n////////////////// forward declarations for important OpenCV types //////////////////\n\n//! @cond IGNORED\n\ntemplate<typename _Tp, int cn> class Vec;\ntemplate<typename _Tp, int m, int n> class Matx;\n\ntemplate<typename _Tp> class Complex;\ntemplate<typename _Tp> class Point_;\ntemplate<typename _Tp> class Point3_;\ntemplate<typename _Tp> class Size_;\ntemplate<typename _Tp> class Rect_;\ntemplate<typename _Tp> class Scalar_;\n\nclass CV_EXPORTS RotatedRect;\nclass CV_EXPORTS Range;\nclass CV_EXPORTS TermCriteria;\nclass CV_EXPORTS KeyPoint;\nclass CV_EXPORTS DMatch;\nclass CV_EXPORTS RNG;\n\nclass CV_EXPORTS Mat;\nclass CV_EXPORTS MatExpr;\n\nclass CV_EXPORTS UMat;\n\nclass CV_EXPORTS SparseMat;\ntypedef Mat MatND;\n\ntemplate<typename _Tp> class Mat_;\ntemplate<typename _Tp> class SparseMat_;\n\nclass CV_EXPORTS MatConstIterator;\nclass CV_EXPORTS SparseMatIterator;\nclass CV_EXPORTS SparseMatConstIterator;\ntemplate<typename _Tp> class MatIterator_;\ntemplate<typename _Tp> class MatConstIterator_;\ntemplate<typename _Tp> class SparseMatIterator_;\ntemplate<typename _Tp> class SparseMatConstIterator_;\n\nnamespace ogl\n{\n    class CV_EXPORTS Buffer;\n    class CV_EXPORTS Texture2D;\n    class CV_EXPORTS Arrays;\n}\n\nnamespace cuda\n{\n    class CV_EXPORTS GpuMat;\n    class CV_EXPORTS HostMem;\n    class CV_EXPORTS Stream;\n    class CV_EXPORTS Event;\n}\n\nnamespace cudev\n{\n    template <typename _Tp> class GpuMat_;\n}\n\nnamespace ipp\n{\nCV_EXPORTS void setIppStatus(int status, const char * const funcname = NULL, const char * const filename = NULL,\n                             int line = 0);\nCV_EXPORTS int getIppStatus();\nCV_EXPORTS String getIppErrorLocation();\nCV_EXPORTS bool useIPP();\nCV_EXPORTS void setUseIPP(bool flag);\n\n} // ipp\n\n//! @endcond\n\n//! @} core_utils\n\n//! @addtogroup core_utils_neon\n//! @{\n\n#if CV_NEON\n\ninline int32x2_t cv_vrnd_s32_f32(float32x2_t v)\n{\n    static int32x2_t v_sign = vdup_n_s32(1 << 31),\n        v_05 = vreinterpret_s32_f32(vdup_n_f32(0.5f));\n\n    int32x2_t v_addition = vorr_s32(v_05, vand_s32(v_sign, vreinterpret_s32_f32(v)));\n    return vcvt_s32_f32(vadd_f32(v, vreinterpret_f32_s32(v_addition)));\n}\n\ninline int32x4_t cv_vrndq_s32_f32(float32x4_t v)\n{\n    static int32x4_t v_sign = vdupq_n_s32(1 << 31),\n        v_05 = vreinterpretq_s32_f32(vdupq_n_f32(0.5f));\n\n    int32x4_t v_addition = vorrq_s32(v_05, vandq_s32(v_sign, vreinterpretq_s32_f32(v)));\n    return vcvtq_s32_f32(vaddq_f32(v, vreinterpretq_f32_s32(v_addition)));\n}\n\ninline uint32x2_t cv_vrnd_u32_f32(float32x2_t v)\n{\n    static float32x2_t v_05 = vdup_n_f32(0.5f);\n    return vcvt_u32_f32(vadd_f32(v, v_05));\n}\n\ninline uint32x4_t cv_vrndq_u32_f32(float32x4_t v)\n{\n    static float32x4_t v_05 = vdupq_n_f32(0.5f);\n    return vcvtq_u32_f32(vaddq_f32(v, v_05));\n}\n\ninline float32x4_t cv_vrecpq_f32(float32x4_t val)\n{\n    float32x4_t reciprocal = vrecpeq_f32(val);\n    reciprocal = vmulq_f32(vrecpsq_f32(val, reciprocal), reciprocal);\n    reciprocal = vmulq_f32(vrecpsq_f32(val, reciprocal), reciprocal);\n    return reciprocal;\n}\n\ninline float32x2_t cv_vrecp_f32(float32x2_t val)\n{\n    float32x2_t reciprocal = vrecpe_f32(val);\n    reciprocal = vmul_f32(vrecps_f32(val, reciprocal), reciprocal);\n    reciprocal = vmul_f32(vrecps_f32(val, reciprocal), reciprocal);\n    return reciprocal;\n}\n\ninline float32x4_t cv_vrsqrtq_f32(float32x4_t val)\n{\n    float32x4_t e = vrsqrteq_f32(val);\n    e = vmulq_f32(vrsqrtsq_f32(vmulq_f32(e, e), val), e);\n    e = vmulq_f32(vrsqrtsq_f32(vmulq_f32(e, e), val), e);\n    return e;\n}\n\ninline float32x2_t cv_vrsqrt_f32(float32x2_t val)\n{\n    float32x2_t e = vrsqrte_f32(val);\n    e = vmul_f32(vrsqrts_f32(vmul_f32(e, e), val), e);\n    e = vmul_f32(vrsqrts_f32(vmul_f32(e, e), val), e);\n    return e;\n}\n\ninline float32x4_t cv_vsqrtq_f32(float32x4_t val)\n{\n    return cv_vrecpq_f32(cv_vrsqrtq_f32(val));\n}\n\ninline float32x2_t cv_vsqrt_f32(float32x2_t val)\n{\n    return cv_vrecp_f32(cv_vrsqrt_f32(val));\n}\n\n#endif\n\n//! @} core_utils_neon\n\n} // cv\n\n#include \"sse_utils.hpp\"\n\n#endif //__OPENCV_CORE_BASE_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/bufferpool.hpp",
    "content": "// This file is part of OpenCV project.\n// It is subject to the license terms in the LICENSE file found in the top-level directory\n// of this distribution and at http://opencv.org/license.html.\n//\n// Copyright (C) 2014, Advanced Micro Devices, Inc., all rights reserved.\n\n#ifndef __OPENCV_CORE_BUFFER_POOL_HPP__\n#define __OPENCV_CORE_BUFFER_POOL_HPP__\n\nnamespace cv\n{\n\n//! @addtogroup core\n//! @{\n\nclass BufferPoolController\n{\nprotected:\n    ~BufferPoolController() { }\npublic:\n    virtual size_t getReservedSize() const = 0;\n    virtual size_t getMaxReservedSize() const = 0;\n    virtual void setMaxReservedSize(size_t size) = 0;\n    virtual void freeAllReservedBuffers() = 0;\n};\n\n//! @}\n\n}\n\n#endif // __OPENCV_CORE_BUFFER_POOL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/core.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/core.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/core_c.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n\n#ifndef __OPENCV_CORE_C_H__\n#define __OPENCV_CORE_C_H__\n\n#include \"opencv2/core/types_c.h\"\n\n#ifdef __cplusplus\n#  ifdef _MSC_VER\n/* disable warning C4190: 'function' has C-linkage specified, but returns UDT 'typename'\n                          which is incompatible with C\n\n   It is OK to disable it because we only extend few plain structures with\n   C++ construrtors for simpler interoperability with C++ API of the library\n*/\n#    pragma warning(disable:4190)\n#  elif defined __clang__ && __clang_major__ >= 3\n#    pragma GCC diagnostic ignored \"-Wreturn-type-c-linkage\"\n#  endif\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup core_c\n    @{\n*/\n\n/****************************************************************************************\\\n*          Array allocation, deallocation, initialization and access to elements         *\n\\****************************************************************************************/\n\n/** `malloc` wrapper.\n   If there is no enough memory, the function\n   (as well as other OpenCV functions that call cvAlloc)\n   raises an error. */\nCVAPI(void*)  cvAlloc( size_t size );\n\n/** `free` wrapper.\n   Here and further all the memory releasing functions\n   (that all call cvFree) take double pointer in order to\n   to clear pointer to the data after releasing it.\n   Passing pointer to NULL pointer is Ok: nothing happens in this case\n*/\nCVAPI(void)   cvFree_( void* ptr );\n#define cvFree(ptr) (cvFree_(*(ptr)), *(ptr)=0)\n\n/** @brief Creates an image header but does not allocate the image data.\n\n@param size Image width and height\n@param depth Image depth (see cvCreateImage )\n@param channels Number of channels (see cvCreateImage )\n */\nCVAPI(IplImage*)  cvCreateImageHeader( CvSize size, int depth, int channels );\n\n/** @brief Initializes an image header that was previously allocated.\n\nThe returned IplImage\\* points to the initialized header.\n@param image Image header to initialize\n@param size Image width and height\n@param depth Image depth (see cvCreateImage )\n@param channels Number of channels (see cvCreateImage )\n@param origin Top-left IPL_ORIGIN_TL or bottom-left IPL_ORIGIN_BL\n@param align Alignment for image rows, typically 4 or 8 bytes\n */\nCVAPI(IplImage*) cvInitImageHeader( IplImage* image, CvSize size, int depth,\n                                   int channels, int origin CV_DEFAULT(0),\n                                   int align CV_DEFAULT(4));\n\n/** @brief Creates an image header and allocates the image data.\n\nThis function call is equivalent to the following code:\n@code\n    header = cvCreateImageHeader(size, depth, channels);\n    cvCreateData(header);\n@endcode\n@param size Image width and height\n@param depth Bit depth of image elements. See IplImage for valid depths.\n@param channels Number of channels per pixel. See IplImage for details. This function only creates\nimages with interleaved channels.\n */\nCVAPI(IplImage*)  cvCreateImage( CvSize size, int depth, int channels );\n\n/** @brief Deallocates an image header.\n\nThis call is an analogue of :\n@code\n    if(image )\n    {\n        iplDeallocate(*image, IPL_IMAGE_HEADER | IPL_IMAGE_ROI);\n        *image = 0;\n    }\n@endcode\nbut it does not use IPL functions by default (see the CV_TURN_ON_IPL_COMPATIBILITY macro).\n@param image Double pointer to the image header\n */\nCVAPI(void)  cvReleaseImageHeader( IplImage** image );\n\n/** @brief Deallocates the image header and the image data.\n\nThis call is a shortened form of :\n@code\n    if(*image )\n    {\n        cvReleaseData(*image);\n        cvReleaseImageHeader(image);\n    }\n@endcode\n@param image Double pointer to the image header\n*/\nCVAPI(void)  cvReleaseImage( IplImage** image );\n\n/** Creates a copy of IPL image (widthStep may differ) */\nCVAPI(IplImage*) cvCloneImage( const IplImage* image );\n\n/** @brief Sets the channel of interest in an IplImage.\n\nIf the ROI is set to NULL and the coi is *not* 0, the ROI is allocated. Most OpenCV functions do\n*not* support the COI setting, so to process an individual image/matrix channel one may copy (via\ncvCopy or cvSplit) the channel to a separate image/matrix, process it and then copy the result\nback (via cvCopy or cvMerge) if needed.\n@param image A pointer to the image header\n@param coi The channel of interest. 0 - all channels are selected, 1 - first channel is selected,\netc. Note that the channel indices become 1-based.\n */\nCVAPI(void)  cvSetImageCOI( IplImage* image, int coi );\n\n/** @brief Returns the index of the channel of interest.\n\nReturns the channel of interest of in an IplImage. Returned values correspond to the coi in\ncvSetImageCOI.\n@param image A pointer to the image header\n */\nCVAPI(int)  cvGetImageCOI( const IplImage* image );\n\n/** @brief Sets an image Region Of Interest (ROI) for a given rectangle.\n\nIf the original image ROI was NULL and the rect is not the whole image, the ROI structure is\nallocated.\n\nMost OpenCV functions support the use of ROI and treat the image rectangle as a separate image. For\nexample, all of the pixel coordinates are counted from the top-left (or bottom-left) corner of the\nROI, not the original image.\n@param image A pointer to the image header\n@param rect The ROI rectangle\n */\nCVAPI(void)  cvSetImageROI( IplImage* image, CvRect rect );\n\n/** @brief Resets the image ROI to include the entire image and releases the ROI structure.\n\nThis produces a similar result to the following, but in addition it releases the ROI structure. :\n@code\n    cvSetImageROI(image, cvRect(0, 0, image->width, image->height ));\n    cvSetImageCOI(image, 0);\n@endcode\n@param image A pointer to the image header\n */\nCVAPI(void)  cvResetImageROI( IplImage* image );\n\n/** @brief Returns the image ROI.\n\nIf there is no ROI set, cvRect(0,0,image-\\>width,image-\\>height) is returned.\n@param image A pointer to the image header\n */\nCVAPI(CvRect) cvGetImageROI( const IplImage* image );\n\n/** @brief Creates a matrix header but does not allocate the matrix data.\n\nThe function allocates a new matrix header and returns a pointer to it. The matrix data can then be\nallocated using cvCreateData or set explicitly to user-allocated data via cvSetData.\n@param rows Number of rows in the matrix\n@param cols Number of columns in the matrix\n@param type Type of the matrix elements, see cvCreateMat\n */\nCVAPI(CvMat*)  cvCreateMatHeader( int rows, int cols, int type );\n\n#define CV_AUTOSTEP  0x7fffffff\n\n/** @brief Initializes a pre-allocated matrix header.\n\nThis function is often used to process raw data with OpenCV matrix functions. For example, the\nfollowing code computes the matrix product of two matrices, stored as ordinary arrays:\n@code\n    double a[] = { 1, 2, 3, 4,\n                   5, 6, 7, 8,\n                   9, 10, 11, 12 };\n\n    double b[] = { 1, 5, 9,\n                   2, 6, 10,\n                   3, 7, 11,\n                   4, 8, 12 };\n\n    double c[9];\n    CvMat Ma, Mb, Mc ;\n\n    cvInitMatHeader(&Ma, 3, 4, CV_64FC1, a);\n    cvInitMatHeader(&Mb, 4, 3, CV_64FC1, b);\n    cvInitMatHeader(&Mc, 3, 3, CV_64FC1, c);\n\n    cvMatMulAdd(&Ma, &Mb, 0, &Mc);\n    // the c array now contains the product of a (3x4) and b (4x3)\n@endcode\n@param mat A pointer to the matrix header to be initialized\n@param rows Number of rows in the matrix\n@param cols Number of columns in the matrix\n@param type Type of the matrix elements, see cvCreateMat .\n@param data Optional: data pointer assigned to the matrix header\n@param step Optional: full row width in bytes of the assigned data. By default, the minimal\npossible step is used which assumes there are no gaps between subsequent rows of the matrix.\n */\nCVAPI(CvMat*) cvInitMatHeader( CvMat* mat, int rows, int cols,\n                              int type, void* data CV_DEFAULT(NULL),\n                              int step CV_DEFAULT(CV_AUTOSTEP) );\n\n/** @brief Creates a matrix header and allocates the matrix data.\n\nThe function call is equivalent to the following code:\n@code\n    CvMat* mat = cvCreateMatHeader(rows, cols, type);\n    cvCreateData(mat);\n@endcode\n@param rows Number of rows in the matrix\n@param cols Number of columns in the matrix\n@param type The type of the matrix elements in the form\nCV_\\<bit depth\\>\\<S|U|F\\>C\\<number of channels\\> , where S=signed, U=unsigned, F=float. For\nexample, CV _ 8UC1 means the elements are 8-bit unsigned and the there is 1 channel, and CV _\n32SC2 means the elements are 32-bit signed and there are 2 channels.\n */\nCVAPI(CvMat*)  cvCreateMat( int rows, int cols, int type );\n\n/** @brief Deallocates a matrix.\n\nThe function decrements the matrix data reference counter and deallocates matrix header. If the data\nreference counter is 0, it also deallocates the data. :\n@code\n    if(*mat )\n        cvDecRefData(*mat);\n    cvFree((void**)mat);\n@endcode\n@param mat Double pointer to the matrix\n */\nCVAPI(void)  cvReleaseMat( CvMat** mat );\n\n/** @brief Decrements an array data reference counter.\n\nThe function decrements the data reference counter in a CvMat or CvMatND if the reference counter\n\npointer is not NULL. If the counter reaches zero, the data is deallocated. In the current\nimplementation the reference counter is not NULL only if the data was allocated using the\ncvCreateData function. The counter will be NULL in other cases such as: external data was assigned\nto the header using cvSetData, header is part of a larger matrix or image, or the header was\nconverted from an image or n-dimensional matrix header.\n@param arr Pointer to an array header\n */\nCV_INLINE  void  cvDecRefData( CvArr* arr )\n{\n    if( CV_IS_MAT( arr ))\n    {\n        CvMat* mat = (CvMat*)arr;\n        mat->data.ptr = NULL;\n        if( mat->refcount != NULL && --*mat->refcount == 0 )\n            cvFree( &mat->refcount );\n        mat->refcount = NULL;\n    }\n    else if( CV_IS_MATND( arr ))\n    {\n        CvMatND* mat = (CvMatND*)arr;\n        mat->data.ptr = NULL;\n        if( mat->refcount != NULL && --*mat->refcount == 0 )\n            cvFree( &mat->refcount );\n        mat->refcount = NULL;\n    }\n}\n\n/** @brief Increments array data reference counter.\n\nThe function increments CvMat or CvMatND data reference counter and returns the new counter value if\nthe reference counter pointer is not NULL, otherwise it returns zero.\n@param arr Array header\n */\nCV_INLINE  int  cvIncRefData( CvArr* arr )\n{\n    int refcount = 0;\n    if( CV_IS_MAT( arr ))\n    {\n        CvMat* mat = (CvMat*)arr;\n        if( mat->refcount != NULL )\n            refcount = ++*mat->refcount;\n    }\n    else if( CV_IS_MATND( arr ))\n    {\n        CvMatND* mat = (CvMatND*)arr;\n        if( mat->refcount != NULL )\n            refcount = ++*mat->refcount;\n    }\n    return refcount;\n}\n\n\n/** Creates an exact copy of the input matrix (except, may be, step value) */\nCVAPI(CvMat*) cvCloneMat( const CvMat* mat );\n\n\n/** @brief Returns matrix header corresponding to the rectangular sub-array of input image or matrix.\n\nThe function returns header, corresponding to a specified rectangle of the input array. In other\n\nwords, it allows the user to treat a rectangular part of input array as a stand-alone array. ROI is\ntaken into account by the function so the sub-array of ROI is actually extracted.\n@param arr Input array\n@param submat Pointer to the resultant sub-array header\n@param rect Zero-based coordinates of the rectangle of interest\n */\nCVAPI(CvMat*) cvGetSubRect( const CvArr* arr, CvMat* submat, CvRect rect );\n#define cvGetSubArr cvGetSubRect\n\n/** @brief Returns array row or row span.\n\nThe functions return the header, corresponding to a specified row/row span of the input array.\ncvGetRow(arr, submat, row) is a shortcut for cvGetRows(arr, submat, row, row+1).\n@param arr Input array\n@param submat Pointer to the resulting sub-array header\n@param start_row Zero-based index of the starting row (inclusive) of the span\n@param end_row Zero-based index of the ending row (exclusive) of the span\n@param delta_row Index step in the row span. That is, the function extracts every delta_row -th\nrow from start_row and up to (but not including) end_row .\n */\nCVAPI(CvMat*) cvGetRows( const CvArr* arr, CvMat* submat,\n                        int start_row, int end_row,\n                        int delta_row CV_DEFAULT(1));\n\n/** @overload\n@param arr Input array\n@param submat Pointer to the resulting sub-array header\n@param row Zero-based index of the selected row\n*/\nCV_INLINE  CvMat*  cvGetRow( const CvArr* arr, CvMat* submat, int row )\n{\n    return cvGetRows( arr, submat, row, row + 1, 1 );\n}\n\n\n/** @brief Returns one of more array columns.\n\nThe functions return the header, corresponding to a specified column span of the input array. That\n\nis, no data is copied. Therefore, any modifications of the submatrix will affect the original array.\nIf you need to copy the columns, use cvCloneMat. cvGetCol(arr, submat, col) is a shortcut for\ncvGetCols(arr, submat, col, col+1).\n@param arr Input array\n@param submat Pointer to the resulting sub-array header\n@param start_col Zero-based index of the starting column (inclusive) of the span\n@param end_col Zero-based index of the ending column (exclusive) of the span\n */\nCVAPI(CvMat*) cvGetCols( const CvArr* arr, CvMat* submat,\n                        int start_col, int end_col );\n\n/** @overload\n@param arr Input array\n@param submat Pointer to the resulting sub-array header\n@param col Zero-based index of the selected column\n*/\nCV_INLINE  CvMat*  cvGetCol( const CvArr* arr, CvMat* submat, int col )\n{\n    return cvGetCols( arr, submat, col, col + 1 );\n}\n\n/** @brief Returns one of array diagonals.\n\nThe function returns the header, corresponding to a specified diagonal of the input array.\n@param arr Input array\n@param submat Pointer to the resulting sub-array header\n@param diag Index of the array diagonal. Zero value corresponds to the main diagonal, -1\ncorresponds to the diagonal above the main, 1 corresponds to the diagonal below the main, and so\nforth.\n */\nCVAPI(CvMat*) cvGetDiag( const CvArr* arr, CvMat* submat,\n                            int diag CV_DEFAULT(0));\n\n/** low-level scalar <-> raw data conversion functions */\nCVAPI(void) cvScalarToRawData( const CvScalar* scalar, void* data, int type,\n                              int extend_to_12 CV_DEFAULT(0) );\n\nCVAPI(void) cvRawDataToScalar( const void* data, int type, CvScalar* scalar );\n\n/** @brief Creates a new matrix header but does not allocate the matrix data.\n\nThe function allocates a header for a multi-dimensional dense array. The array data can further be\nallocated using cvCreateData or set explicitly to user-allocated data via cvSetData.\n@param dims Number of array dimensions\n@param sizes Array of dimension sizes\n@param type Type of array elements, see cvCreateMat\n */\nCVAPI(CvMatND*)  cvCreateMatNDHeader( int dims, const int* sizes, int type );\n\n/** @brief Creates the header and allocates the data for a multi-dimensional dense array.\n\nThis function call is equivalent to the following code:\n@code\n    CvMatND* mat = cvCreateMatNDHeader(dims, sizes, type);\n    cvCreateData(mat);\n@endcode\n@param dims Number of array dimensions. This must not exceed CV_MAX_DIM (32 by default, but can be\nchanged at build time).\n@param sizes Array of dimension sizes.\n@param type Type of array elements, see cvCreateMat .\n */\nCVAPI(CvMatND*)  cvCreateMatND( int dims, const int* sizes, int type );\n\n/** @brief Initializes a pre-allocated multi-dimensional array header.\n\n@param mat A pointer to the array header to be initialized\n@param dims The number of array dimensions\n@param sizes An array of dimension sizes\n@param type Type of array elements, see cvCreateMat\n@param data Optional data pointer assigned to the matrix header\n */\nCVAPI(CvMatND*)  cvInitMatNDHeader( CvMatND* mat, int dims, const int* sizes,\n                                    int type, void* data CV_DEFAULT(NULL) );\n\n/** @brief Deallocates a multi-dimensional array.\n\nThe function decrements the array data reference counter and releases the array header. If the\nreference counter reaches 0, it also deallocates the data. :\n@code\n    if(*mat )\n        cvDecRefData(*mat);\n    cvFree((void**)mat);\n@endcode\n@param mat Double pointer to the array\n */\nCV_INLINE  void  cvReleaseMatND( CvMatND** mat )\n{\n    cvReleaseMat( (CvMat**)mat );\n}\n\n/** Creates a copy of CvMatND (except, may be, steps) */\nCVAPI(CvMatND*) cvCloneMatND( const CvMatND* mat );\n\n/** @brief Creates sparse array.\n\nThe function allocates a multi-dimensional sparse array. Initially the array contain no elements,\nthat is PtrND and other related functions will return 0 for every index.\n@param dims Number of array dimensions. In contrast to the dense matrix, the number of dimensions is\npractically unlimited (up to \\f$2^{16}\\f$ ).\n@param sizes Array of dimension sizes\n@param type Type of array elements. The same as for CvMat\n */\nCVAPI(CvSparseMat*)  cvCreateSparseMat( int dims, const int* sizes, int type );\n\n/** @brief Deallocates sparse array.\n\nThe function releases the sparse array and clears the array pointer upon exit.\n@param mat Double pointer to the array\n */\nCVAPI(void)  cvReleaseSparseMat( CvSparseMat** mat );\n\n/** Creates a copy of CvSparseMat (except, may be, zero items) */\nCVAPI(CvSparseMat*) cvCloneSparseMat( const CvSparseMat* mat );\n\n/** @brief Initializes sparse array elements iterator.\n\nThe function initializes iterator of sparse array elements and returns pointer to the first element,\nor NULL if the array is empty.\n@param mat Input array\n@param mat_iterator Initialized iterator\n */\nCVAPI(CvSparseNode*) cvInitSparseMatIterator( const CvSparseMat* mat,\n                                              CvSparseMatIterator* mat_iterator );\n\n/** @brief Returns the next sparse matrix element\n\nThe function moves iterator to the next sparse matrix element and returns pointer to it. In the\ncurrent version there is no any particular order of the elements, because they are stored in the\nhash table. The sample below demonstrates how to iterate through the sparse matrix:\n@code\n    // print all the non-zero sparse matrix elements and compute their sum\n    double sum = 0;\n    int i, dims = cvGetDims(sparsemat);\n    CvSparseMatIterator it;\n    CvSparseNode* node = cvInitSparseMatIterator(sparsemat, &it);\n\n    for(; node != 0; node = cvGetNextSparseNode(&it))\n    {\n        int* idx = CV_NODE_IDX(array, node);\n        float val = *(float*)CV_NODE_VAL(array, node);\n        printf(\"M\");\n        for(i = 0; i < dims; i++ )\n            printf(\"[%d]\", idx[i]);\n        printf(\"=%g\\n\", val);\n\n        sum += val;\n    }\n\n    printf(\"nTotal sum = %g\\n\", sum);\n@endcode\n@param mat_iterator Sparse array iterator\n */\nCV_INLINE CvSparseNode* cvGetNextSparseNode( CvSparseMatIterator* mat_iterator )\n{\n    if( mat_iterator->node->next )\n        return mat_iterator->node = mat_iterator->node->next;\n    else\n    {\n        int idx;\n        for( idx = ++mat_iterator->curidx; idx < mat_iterator->mat->hashsize; idx++ )\n        {\n            CvSparseNode* node = (CvSparseNode*)mat_iterator->mat->hashtable[idx];\n            if( node )\n            {\n                mat_iterator->curidx = idx;\n                return mat_iterator->node = node;\n            }\n        }\n        return NULL;\n    }\n}\n\n\n#define CV_MAX_ARR 10\n\n/** matrix iterator: used for n-ary operations on dense arrays */\ntypedef struct CvNArrayIterator\n{\n    int count; /**< number of arrays */\n    int dims; /**< number of dimensions to iterate */\n    CvSize size; /**< maximal common linear size: { width = size, height = 1 } */\n    uchar* ptr[CV_MAX_ARR]; /**< pointers to the array slices */\n    int stack[CV_MAX_DIM]; /**< for internal use */\n    CvMatND* hdr[CV_MAX_ARR]; /**< pointers to the headers of the\n                                 matrices that are processed */\n}\nCvNArrayIterator;\n\n#define CV_NO_DEPTH_CHECK     1\n#define CV_NO_CN_CHECK        2\n#define CV_NO_SIZE_CHECK      4\n\n/** initializes iterator that traverses through several arrays simulteneously\n   (the function together with cvNextArraySlice is used for\n    N-ari element-wise operations) */\nCVAPI(int) cvInitNArrayIterator( int count, CvArr** arrs,\n                                 const CvArr* mask, CvMatND* stubs,\n                                 CvNArrayIterator* array_iterator,\n                                 int flags CV_DEFAULT(0) );\n\n/** returns zero value if iteration is finished, non-zero (slice length) otherwise */\nCVAPI(int) cvNextNArraySlice( CvNArrayIterator* array_iterator );\n\n\n/** @brief Returns type of array elements.\n\nThe function returns type of the array elements. In the case of IplImage the type is converted to\nCvMat-like representation. For example, if the image has been created as:\n@code\n    IplImage* img = cvCreateImage(cvSize(640, 480), IPL_DEPTH_8U, 3);\n@endcode\nThe code cvGetElemType(img) will return CV_8UC3.\n@param arr Input array\n */\nCVAPI(int) cvGetElemType( const CvArr* arr );\n\n/** @brief Return number of array dimensions\n\nThe function returns the array dimensionality and the array of dimension sizes. In the case of\nIplImage or CvMat it always returns 2 regardless of number of image/matrix rows. For example, the\nfollowing code calculates total number of array elements:\n@code\n    int sizes[CV_MAX_DIM];\n    int i, total = 1;\n    int dims = cvGetDims(arr, size);\n    for(i = 0; i < dims; i++ )\n        total *= sizes[i];\n@endcode\n@param arr Input array\n@param sizes Optional output vector of the array dimension sizes. For 2d arrays the number of rows\n(height) goes first, number of columns (width) next.\n */\nCVAPI(int) cvGetDims( const CvArr* arr, int* sizes CV_DEFAULT(NULL) );\n\n\n/** @brief Returns array size along the specified dimension.\n\n@param arr Input array\n@param index Zero-based dimension index (for matrices 0 means number of rows, 1 means number of\ncolumns; for images 0 means height, 1 means width)\n */\nCVAPI(int) cvGetDimSize( const CvArr* arr, int index );\n\n\n/** @brief Return pointer to a particular array element.\n\nThe functions return a pointer to a specific array element. Number of array dimension should match\nto the number of indices passed to the function except for cvPtr1D function that can be used for\nsequential access to 1D, 2D or nD dense arrays.\n\nThe functions can be used for sparse arrays as well - if the requested node does not exist they\ncreate it and set it to zero.\n\nAll these as well as other functions accessing array elements ( cvGetND , cvGetRealND , cvSet\n, cvSetND , cvSetRealND ) raise an error in case if the element index is out of range.\n@param arr Input array\n@param idx0 The first zero-based component of the element index\n@param type Optional output parameter: type of matrix elements\n */\nCVAPI(uchar*) cvPtr1D( const CvArr* arr, int idx0, int* type CV_DEFAULT(NULL));\n/** @overload */\nCVAPI(uchar*) cvPtr2D( const CvArr* arr, int idx0, int idx1, int* type CV_DEFAULT(NULL) );\n/** @overload */\nCVAPI(uchar*) cvPtr3D( const CvArr* arr, int idx0, int idx1, int idx2,\n                      int* type CV_DEFAULT(NULL));\n/** @overload\n@param arr Input array\n@param idx Array of the element indices\n@param type Optional output parameter: type of matrix elements\n@param create_node Optional input parameter for sparse matrices. Non-zero value of the parameter\nmeans that the requested element is created if it does not exist already.\n@param precalc_hashval Optional input parameter for sparse matrices. If the pointer is not NULL,\nthe function does not recalculate the node hash value, but takes it from the specified location.\nIt is useful for speeding up pair-wise operations (TODO: provide an example)\n*/\nCVAPI(uchar*) cvPtrND( const CvArr* arr, const int* idx, int* type CV_DEFAULT(NULL),\n                      int create_node CV_DEFAULT(1),\n                      unsigned* precalc_hashval CV_DEFAULT(NULL));\n\n/** @brief Return a specific array element.\n\nThe functions return a specific array element. In the case of a sparse array the functions return 0\nif the requested node does not exist (no new node is created by the functions).\n@param arr Input array\n@param idx0 The first zero-based component of the element index\n */\nCVAPI(CvScalar) cvGet1D( const CvArr* arr, int idx0 );\n/** @overload */\nCVAPI(CvScalar) cvGet2D( const CvArr* arr, int idx0, int idx1 );\n/** @overload */\nCVAPI(CvScalar) cvGet3D( const CvArr* arr, int idx0, int idx1, int idx2 );\n/** @overload\n@param arr Input array\n@param idx Array of the element indices\n*/\nCVAPI(CvScalar) cvGetND( const CvArr* arr, const int* idx );\n\n/** @brief Return a specific element of single-channel 1D, 2D, 3D or nD array.\n\nReturns a specific element of a single-channel array. If the array has multiple channels, a runtime\nerror is raised. Note that Get?D functions can be used safely for both single-channel and\nmultiple-channel arrays though they are a bit slower.\n\nIn the case of a sparse array the functions return 0 if the requested node does not exist (no new\nnode is created by the functions).\n@param arr Input array. Must have a single channel.\n@param idx0 The first zero-based component of the element index\n */\nCVAPI(double) cvGetReal1D( const CvArr* arr, int idx0 );\n/** @overload */\nCVAPI(double) cvGetReal2D( const CvArr* arr, int idx0, int idx1 );\n/** @overload */\nCVAPI(double) cvGetReal3D( const CvArr* arr, int idx0, int idx1, int idx2 );\n/** @overload\n@param arr Input array. Must have a single channel.\n@param idx Array of the element indices\n*/\nCVAPI(double) cvGetRealND( const CvArr* arr, const int* idx );\n\n/** @brief Change the particular array element.\n\nThe functions assign the new value to a particular array element. In the case of a sparse array the\nfunctions create the node if it does not exist yet.\n@param arr Input array\n@param idx0 The first zero-based component of the element index\n@param value The assigned value\n */\nCVAPI(void) cvSet1D( CvArr* arr, int idx0, CvScalar value );\n/** @overload */\nCVAPI(void) cvSet2D( CvArr* arr, int idx0, int idx1, CvScalar value );\n/** @overload */\nCVAPI(void) cvSet3D( CvArr* arr, int idx0, int idx1, int idx2, CvScalar value );\n/** @overload\n@param arr Input array\n@param idx Array of the element indices\n@param value The assigned value\n*/\nCVAPI(void) cvSetND( CvArr* arr, const int* idx, CvScalar value );\n\n/** @brief Change a specific array element.\n\nThe functions assign a new value to a specific element of a single-channel array. If the array has\nmultiple channels, a runtime error is raised. Note that the Set\\*D function can be used safely for\nboth single-channel and multiple-channel arrays, though they are a bit slower.\n\nIn the case of a sparse array the functions create the node if it does not yet exist.\n@param arr Input array\n@param idx0 The first zero-based component of the element index\n@param value The assigned value\n */\nCVAPI(void) cvSetReal1D( CvArr* arr, int idx0, double value );\n/** @overload */\nCVAPI(void) cvSetReal2D( CvArr* arr, int idx0, int idx1, double value );\n/** @overload */\nCVAPI(void) cvSetReal3D( CvArr* arr, int idx0,\n                        int idx1, int idx2, double value );\n/** @overload\n@param arr Input array\n@param idx Array of the element indices\n@param value The assigned value\n*/\nCVAPI(void) cvSetRealND( CvArr* arr, const int* idx, double value );\n\n/** clears element of ND dense array,\n   in case of sparse arrays it deletes the specified node */\nCVAPI(void) cvClearND( CvArr* arr, const int* idx );\n\n/** @brief Returns matrix header for arbitrary array.\n\nThe function returns a matrix header for the input array that can be a matrix - CvMat, an image -\nIplImage, or a multi-dimensional dense array - CvMatND (the third option is allowed only if\nallowND != 0) . In the case of matrix the function simply returns the input pointer. In the case of\nIplImage\\* or CvMatND it initializes the header structure with parameters of the current image ROI\nand returns &header. Because COI is not supported by CvMat, it is returned separately.\n\nThe function provides an easy way to handle both types of arrays - IplImage and CvMat using the same\ncode. Input array must have non-zero data pointer, otherwise the function will report an error.\n\n@note If the input array is IplImage with planar data layout and COI set, the function returns the\npointer to the selected plane and COI == 0. This feature allows user to process IplImage structures\nwith planar data layout, even though OpenCV does not support such images.\n@param arr Input array\n@param header Pointer to CvMat structure used as a temporary buffer\n@param coi Optional output parameter for storing COI\n@param allowND If non-zero, the function accepts multi-dimensional dense arrays (CvMatND\\*) and\nreturns 2D matrix (if CvMatND has two dimensions) or 1D matrix (when CvMatND has 1 dimension or\nmore than 2 dimensions). The CvMatND array must be continuous.\n@sa cvGetImage, cvarrToMat.\n */\nCVAPI(CvMat*) cvGetMat( const CvArr* arr, CvMat* header,\n                       int* coi CV_DEFAULT(NULL),\n                       int allowND CV_DEFAULT(0));\n\n/** @brief Returns image header for arbitrary array.\n\nThe function returns the image header for the input array that can be a matrix (CvMat) or image\n(IplImage). In the case of an image the function simply returns the input pointer. In the case of\nCvMat it initializes an image_header structure with the parameters of the input matrix. Note that\nif we transform IplImage to CvMat using cvGetMat and then transform CvMat back to IplImage using\nthis function, we will get different headers if the ROI is set in the original image.\n@param arr Input array\n@param image_header Pointer to IplImage structure used as a temporary buffer\n */\nCVAPI(IplImage*) cvGetImage( const CvArr* arr, IplImage* image_header );\n\n\n/** @brief Changes the shape of a multi-dimensional array without copying the data.\n\nThe function is an advanced version of cvReshape that can work with multi-dimensional arrays as\nwell (though it can work with ordinary images and matrices) and change the number of dimensions.\n\nBelow are the two samples from the cvReshape description rewritten using cvReshapeMatND:\n@code\n    IplImage* color_img = cvCreateImage(cvSize(320,240), IPL_DEPTH_8U, 3);\n    IplImage gray_img_hdr, *gray_img;\n    gray_img = (IplImage*)cvReshapeMatND(color_img, sizeof(gray_img_hdr), &gray_img_hdr, 1, 0, 0);\n    ...\n    int size[] = { 2, 2, 2 };\n    CvMatND* mat = cvCreateMatND(3, size, CV_32F);\n    CvMat row_header, *row;\n    row = (CvMat*)cvReshapeMatND(mat, sizeof(row_header), &row_header, 0, 1, 0);\n@endcode\nIn C, the header file for this function includes a convenient macro cvReshapeND that does away with\nthe sizeof_header parameter. So, the lines containing the call to cvReshapeMatND in the examples\nmay be replaced as follow:\n@code\n    gray_img = (IplImage*)cvReshapeND(color_img, &gray_img_hdr, 1, 0, 0);\n    ...\n    row = (CvMat*)cvReshapeND(mat, &row_header, 0, 1, 0);\n@endcode\n@param arr Input array\n@param sizeof_header Size of output header to distinguish between IplImage, CvMat and CvMatND\noutput headers\n@param header Output header to be filled\n@param new_cn New number of channels. new_cn = 0 means that the number of channels remains\nunchanged.\n@param new_dims New number of dimensions. new_dims = 0 means that the number of dimensions\nremains the same.\n@param new_sizes Array of new dimension sizes. Only new_dims-1 values are used, because the\ntotal number of elements must remain the same. Thus, if new_dims = 1, new_sizes array is not\nused.\n */\nCVAPI(CvArr*) cvReshapeMatND( const CvArr* arr,\n                             int sizeof_header, CvArr* header,\n                             int new_cn, int new_dims, int* new_sizes );\n\n#define cvReshapeND( arr, header, new_cn, new_dims, new_sizes )   \\\n      cvReshapeMatND( (arr), sizeof(*(header)), (header),         \\\n                      (new_cn), (new_dims), (new_sizes))\n\n/** @brief Changes shape of matrix/image without copying data.\n\nThe function initializes the CvMat header so that it points to the same data as the original array\nbut has a different shape - different number of channels, different number of rows, or both.\n\nThe following example code creates one image buffer and two image headers, the first is for a\n320x240x3 image and the second is for a 960x240x1 image:\n@code\n    IplImage* color_img = cvCreateImage(cvSize(320,240), IPL_DEPTH_8U, 3);\n    CvMat gray_mat_hdr;\n    IplImage gray_img_hdr, *gray_img;\n    cvReshape(color_img, &gray_mat_hdr, 1);\n    gray_img = cvGetImage(&gray_mat_hdr, &gray_img_hdr);\n@endcode\nAnd the next example converts a 3x3 matrix to a single 1x9 vector:\n@code\n    CvMat* mat = cvCreateMat(3, 3, CV_32F);\n    CvMat row_header, *row;\n    row = cvReshape(mat, &row_header, 0, 1);\n@endcode\n@param arr Input array\n@param header Output header to be filled\n@param new_cn New number of channels. 'new_cn = 0' means that the number of channels remains\nunchanged.\n@param new_rows New number of rows. 'new_rows = 0' means that the number of rows remains\nunchanged unless it needs to be changed according to new_cn value.\n*/\nCVAPI(CvMat*) cvReshape( const CvArr* arr, CvMat* header,\n                        int new_cn, int new_rows CV_DEFAULT(0) );\n\n/** Repeats source 2d array several times in both horizontal and\n   vertical direction to fill destination array */\nCVAPI(void) cvRepeat( const CvArr* src, CvArr* dst );\n\n/** @brief Allocates array data\n\nThe function allocates image, matrix or multi-dimensional dense array data. Note that in the case of\nmatrix types OpenCV allocation functions are used. In the case of IplImage they are used unless\nCV_TURN_ON_IPL_COMPATIBILITY() has been called before. In the latter case IPL functions are used\nto allocate the data.\n@param arr Array header\n */\nCVAPI(void)  cvCreateData( CvArr* arr );\n\n/** @brief Releases array data.\n\nThe function releases the array data. In the case of CvMat or CvMatND it simply calls\ncvDecRefData(), that is the function can not deallocate external data. See also the note to\ncvCreateData .\n@param arr Array header\n */\nCVAPI(void)  cvReleaseData( CvArr* arr );\n\n/** @brief Assigns user data to the array header.\n\nThe function assigns user data to the array header. Header should be initialized before using\ncvCreateMatHeader, cvCreateImageHeader, cvCreateMatNDHeader, cvInitMatHeader,\ncvInitImageHeader or cvInitMatNDHeader.\n@param arr Array header\n@param data User data\n@param step Full row length in bytes\n */\nCVAPI(void)  cvSetData( CvArr* arr, void* data, int step );\n\n/** @brief Retrieves low-level information about the array.\n\nThe function fills output variables with low-level information about the array data. All output\n\nparameters are optional, so some of the pointers may be set to NULL. If the array is IplImage with\nROI set, the parameters of ROI are returned.\n\nThe following example shows how to get access to array elements. It computes absolute values of the\narray elements :\n@code\n    float* data;\n    int step;\n    CvSize size;\n\n    cvGetRawData(array, (uchar**)&data, &step, &size);\n    step /= sizeof(data[0]);\n\n    for(int y = 0; y < size.height; y++, data += step )\n        for(int x = 0; x < size.width; x++ )\n            data[x] = (float)fabs(data[x]);\n@endcode\n@param arr Array header\n@param data Output pointer to the whole image origin or ROI origin if ROI is set\n@param step Output full row length in bytes\n@param roi_size Output ROI size\n */\nCVAPI(void) cvGetRawData( const CvArr* arr, uchar** data,\n                         int* step CV_DEFAULT(NULL),\n                         CvSize* roi_size CV_DEFAULT(NULL));\n\n/** @brief Returns size of matrix or image ROI.\n\nThe function returns number of rows (CvSize::height) and number of columns (CvSize::width) of the\ninput matrix or image. In the case of image the size of ROI is returned.\n@param arr array header\n */\nCVAPI(CvSize) cvGetSize( const CvArr* arr );\n\n/** @brief Copies one array to another.\n\nThe function copies selected elements from an input array to an output array:\n\n\\f[\\texttt{dst} (I)= \\texttt{src} (I)  \\quad \\text{if} \\quad \\texttt{mask} (I)  \\ne 0.\\f]\n\nIf any of the passed arrays is of IplImage type, then its ROI and COI fields are used. Both arrays\nmust have the same type, the same number of dimensions, and the same size. The function can also\ncopy sparse arrays (mask is not supported in this case).\n@param src The source array\n@param dst The destination array\n@param mask Operation mask, 8-bit single channel array; specifies elements of the destination array\nto be changed\n */\nCVAPI(void)  cvCopy( const CvArr* src, CvArr* dst,\n                     const CvArr* mask CV_DEFAULT(NULL) );\n\n/** @brief Sets every element of an array to a given value.\n\nThe function copies the scalar value to every selected element of the destination array:\n\\f[\\texttt{arr} (I)= \\texttt{value} \\quad \\text{if} \\quad \\texttt{mask} (I)  \\ne 0\\f]\nIf array arr is of IplImage type, then is ROI used, but COI must not be set.\n@param arr The destination array\n@param value Fill value\n@param mask Operation mask, 8-bit single channel array; specifies elements of the destination\narray to be changed\n */\nCVAPI(void)  cvSet( CvArr* arr, CvScalar value,\n                    const CvArr* mask CV_DEFAULT(NULL) );\n\n/** @brief Clears the array.\n\nThe function clears the array. In the case of dense arrays (CvMat, CvMatND or IplImage),\ncvZero(array) is equivalent to cvSet(array,cvScalarAll(0),0). In the case of sparse arrays all the\nelements are removed.\n@param arr Array to be cleared\n */\nCVAPI(void)  cvSetZero( CvArr* arr );\n#define cvZero  cvSetZero\n\n\n/** Splits a multi-channel array into the set of single-channel arrays or\n   extracts particular [color] plane */\nCVAPI(void)  cvSplit( const CvArr* src, CvArr* dst0, CvArr* dst1,\n                      CvArr* dst2, CvArr* dst3 );\n\n/** Merges a set of single-channel arrays into the single multi-channel array\n   or inserts one particular [color] plane to the array */\nCVAPI(void)  cvMerge( const CvArr* src0, const CvArr* src1,\n                      const CvArr* src2, const CvArr* src3,\n                      CvArr* dst );\n\n/** Copies several channels from input arrays to\n   certain channels of output arrays */\nCVAPI(void)  cvMixChannels( const CvArr** src, int src_count,\n                            CvArr** dst, int dst_count,\n                            const int* from_to, int pair_count );\n\n/** @brief Converts one array to another with optional linear transformation.\n\nThe function has several different purposes, and thus has several different names. It copies one\narray to another with optional scaling, which is performed first, and/or optional type conversion,\nperformed after:\n\n\\f[\\texttt{dst} (I) =  \\texttt{scale} \\texttt{src} (I) + ( \\texttt{shift} _0, \\texttt{shift} _1,...)\\f]\n\nAll the channels of multi-channel arrays are processed independently.\n\nThe type of conversion is done with rounding and saturation, that is if the result of scaling +\nconversion can not be represented exactly by a value of the destination array element type, it is\nset to the nearest representable value on the real axis.\n@param src Source array\n@param dst Destination array\n@param scale Scale factor\n@param shift Value added to the scaled source array elements\n */\nCVAPI(void)  cvConvertScale( const CvArr* src, CvArr* dst,\n                             double scale CV_DEFAULT(1),\n                             double shift CV_DEFAULT(0) );\n#define cvCvtScale cvConvertScale\n#define cvScale  cvConvertScale\n#define cvConvert( src, dst )  cvConvertScale( (src), (dst), 1, 0 )\n\n\n/** Performs linear transformation on every source array element,\n   stores absolute value of the result:\n   dst(x,y,c) = abs(scale*src(x,y,c)+shift).\n   destination array must have 8u type.\n   In other cases one may use cvConvertScale + cvAbsDiffS */\nCVAPI(void)  cvConvertScaleAbs( const CvArr* src, CvArr* dst,\n                                double scale CV_DEFAULT(1),\n                                double shift CV_DEFAULT(0) );\n#define cvCvtScaleAbs  cvConvertScaleAbs\n\n\n/** checks termination criteria validity and\n   sets eps to default_eps (if it is not set),\n   max_iter to default_max_iters (if it is not set)\n*/\nCVAPI(CvTermCriteria) cvCheckTermCriteria( CvTermCriteria criteria,\n                                           double default_eps,\n                                           int default_max_iters );\n\n/****************************************************************************************\\\n*                   Arithmetic, logic and comparison operations                          *\n\\****************************************************************************************/\n\n/** dst(mask) = src1(mask) + src2(mask) */\nCVAPI(void)  cvAdd( const CvArr* src1, const CvArr* src2, CvArr* dst,\n                    const CvArr* mask CV_DEFAULT(NULL));\n\n/** dst(mask) = src(mask) + value */\nCVAPI(void)  cvAddS( const CvArr* src, CvScalar value, CvArr* dst,\n                     const CvArr* mask CV_DEFAULT(NULL));\n\n/** dst(mask) = src1(mask) - src2(mask) */\nCVAPI(void)  cvSub( const CvArr* src1, const CvArr* src2, CvArr* dst,\n                    const CvArr* mask CV_DEFAULT(NULL));\n\n/** dst(mask) = src(mask) - value = src(mask) + (-value) */\nCV_INLINE  void  cvSubS( const CvArr* src, CvScalar value, CvArr* dst,\n                         const CvArr* mask CV_DEFAULT(NULL))\n{\n    cvAddS( src, cvScalar( -value.val[0], -value.val[1], -value.val[2], -value.val[3]),\n            dst, mask );\n}\n\n/** dst(mask) = value - src(mask) */\nCVAPI(void)  cvSubRS( const CvArr* src, CvScalar value, CvArr* dst,\n                      const CvArr* mask CV_DEFAULT(NULL));\n\n/** dst(idx) = src1(idx) * src2(idx) * scale\n   (scaled element-wise multiplication of 2 arrays) */\nCVAPI(void)  cvMul( const CvArr* src1, const CvArr* src2,\n                    CvArr* dst, double scale CV_DEFAULT(1) );\n\n/** element-wise division/inversion with scaling:\n    dst(idx) = src1(idx) * scale / src2(idx)\n    or dst(idx) = scale / src2(idx) if src1 == 0 */\nCVAPI(void)  cvDiv( const CvArr* src1, const CvArr* src2,\n                    CvArr* dst, double scale CV_DEFAULT(1));\n\n/** dst = src1 * scale + src2 */\nCVAPI(void)  cvScaleAdd( const CvArr* src1, CvScalar scale,\n                         const CvArr* src2, CvArr* dst );\n#define cvAXPY( A, real_scalar, B, C ) cvScaleAdd(A, cvRealScalar(real_scalar), B, C)\n\n/** dst = src1 * alpha + src2 * beta + gamma */\nCVAPI(void)  cvAddWeighted( const CvArr* src1, double alpha,\n                            const CvArr* src2, double beta,\n                            double gamma, CvArr* dst );\n\n/** @brief Calculates the dot product of two arrays in Euclidean metrics.\n\nThe function calculates and returns the Euclidean dot product of two arrays.\n\n\\f[src1  \\bullet src2 =  \\sum _I ( \\texttt{src1} (I)  \\texttt{src2} (I))\\f]\n\nIn the case of multiple channel arrays, the results for all channels are accumulated. In particular,\ncvDotProduct(a,a) where a is a complex vector, will return \\f$||\\texttt{a}||^2\\f$. The function can\nprocess multi-dimensional arrays, row by row, layer by layer, and so on.\n@param src1 The first source array\n@param src2 The second source array\n */\nCVAPI(double)  cvDotProduct( const CvArr* src1, const CvArr* src2 );\n\n/** dst(idx) = src1(idx) & src2(idx) */\nCVAPI(void) cvAnd( const CvArr* src1, const CvArr* src2,\n                  CvArr* dst, const CvArr* mask CV_DEFAULT(NULL));\n\n/** dst(idx) = src(idx) & value */\nCVAPI(void) cvAndS( const CvArr* src, CvScalar value,\n                   CvArr* dst, const CvArr* mask CV_DEFAULT(NULL));\n\n/** dst(idx) = src1(idx) | src2(idx) */\nCVAPI(void) cvOr( const CvArr* src1, const CvArr* src2,\n                 CvArr* dst, const CvArr* mask CV_DEFAULT(NULL));\n\n/** dst(idx) = src(idx) | value */\nCVAPI(void) cvOrS( const CvArr* src, CvScalar value,\n                  CvArr* dst, const CvArr* mask CV_DEFAULT(NULL));\n\n/** dst(idx) = src1(idx) ^ src2(idx) */\nCVAPI(void) cvXor( const CvArr* src1, const CvArr* src2,\n                  CvArr* dst, const CvArr* mask CV_DEFAULT(NULL));\n\n/** dst(idx) = src(idx) ^ value */\nCVAPI(void) cvXorS( const CvArr* src, CvScalar value,\n                   CvArr* dst, const CvArr* mask CV_DEFAULT(NULL));\n\n/** dst(idx) = ~src(idx) */\nCVAPI(void) cvNot( const CvArr* src, CvArr* dst );\n\n/** dst(idx) = lower(idx) <= src(idx) < upper(idx) */\nCVAPI(void) cvInRange( const CvArr* src, const CvArr* lower,\n                      const CvArr* upper, CvArr* dst );\n\n/** dst(idx) = lower <= src(idx) < upper */\nCVAPI(void) cvInRangeS( const CvArr* src, CvScalar lower,\n                       CvScalar upper, CvArr* dst );\n\n#define CV_CMP_EQ   0\n#define CV_CMP_GT   1\n#define CV_CMP_GE   2\n#define CV_CMP_LT   3\n#define CV_CMP_LE   4\n#define CV_CMP_NE   5\n\n/** The comparison operation support single-channel arrays only.\n   Destination image should be 8uC1 or 8sC1 */\n\n/** dst(idx) = src1(idx) _cmp_op_ src2(idx) */\nCVAPI(void) cvCmp( const CvArr* src1, const CvArr* src2, CvArr* dst, int cmp_op );\n\n/** dst(idx) = src1(idx) _cmp_op_ value */\nCVAPI(void) cvCmpS( const CvArr* src, double value, CvArr* dst, int cmp_op );\n\n/** dst(idx) = min(src1(idx),src2(idx)) */\nCVAPI(void) cvMin( const CvArr* src1, const CvArr* src2, CvArr* dst );\n\n/** dst(idx) = max(src1(idx),src2(idx)) */\nCVAPI(void) cvMax( const CvArr* src1, const CvArr* src2, CvArr* dst );\n\n/** dst(idx) = min(src(idx),value) */\nCVAPI(void) cvMinS( const CvArr* src, double value, CvArr* dst );\n\n/** dst(idx) = max(src(idx),value) */\nCVAPI(void) cvMaxS( const CvArr* src, double value, CvArr* dst );\n\n/** dst(x,y,c) = abs(src1(x,y,c) - src2(x,y,c)) */\nCVAPI(void) cvAbsDiff( const CvArr* src1, const CvArr* src2, CvArr* dst );\n\n/** dst(x,y,c) = abs(src(x,y,c) - value(c)) */\nCVAPI(void) cvAbsDiffS( const CvArr* src, CvArr* dst, CvScalar value );\n#define cvAbs( src, dst ) cvAbsDiffS( (src), (dst), cvScalarAll(0))\n\n/****************************************************************************************\\\n*                                Math operations                                         *\n\\****************************************************************************************/\n\n/** Does cartesian->polar coordinates conversion.\n   Either of output components (magnitude or angle) is optional */\nCVAPI(void)  cvCartToPolar( const CvArr* x, const CvArr* y,\n                            CvArr* magnitude, CvArr* angle CV_DEFAULT(NULL),\n                            int angle_in_degrees CV_DEFAULT(0));\n\n/** Does polar->cartesian coordinates conversion.\n   Either of output components (magnitude or angle) is optional.\n   If magnitude is missing it is assumed to be all 1's */\nCVAPI(void)  cvPolarToCart( const CvArr* magnitude, const CvArr* angle,\n                            CvArr* x, CvArr* y,\n                            int angle_in_degrees CV_DEFAULT(0));\n\n/** Does powering: dst(idx) = src(idx)^power */\nCVAPI(void)  cvPow( const CvArr* src, CvArr* dst, double power );\n\n/** Does exponention: dst(idx) = exp(src(idx)).\n   Overflow is not handled yet. Underflow is handled.\n   Maximal relative error is ~7e-6 for single-precision input */\nCVAPI(void)  cvExp( const CvArr* src, CvArr* dst );\n\n/** Calculates natural logarithms: dst(idx) = log(abs(src(idx))).\n   Logarithm of 0 gives large negative number(~-700)\n   Maximal relative error is ~3e-7 for single-precision output\n*/\nCVAPI(void)  cvLog( const CvArr* src, CvArr* dst );\n\n/** Fast arctangent calculation */\nCVAPI(float) cvFastArctan( float y, float x );\n\n/** Fast cubic root calculation */\nCVAPI(float)  cvCbrt( float value );\n\n#define  CV_CHECK_RANGE    1\n#define  CV_CHECK_QUIET    2\n/** Checks array values for NaNs, Infs or simply for too large numbers\n   (if CV_CHECK_RANGE is set). If CV_CHECK_QUIET is set,\n   no runtime errors is raised (function returns zero value in case of \"bad\" values).\n   Otherwise cvError is called */\nCVAPI(int)  cvCheckArr( const CvArr* arr, int flags CV_DEFAULT(0),\n                        double min_val CV_DEFAULT(0), double max_val CV_DEFAULT(0));\n#define cvCheckArray cvCheckArr\n\n#define CV_RAND_UNI      0\n#define CV_RAND_NORMAL   1\n\n/** @brief Fills an array with random numbers and updates the RNG state.\n\nThe function fills the destination array with uniformly or normally distributed random numbers.\n@param rng CvRNG state initialized by cvRNG\n@param arr The destination array\n@param dist_type Distribution type\n> -   **CV_RAND_UNI** uniform distribution\n> -   **CV_RAND_NORMAL** normal or Gaussian distribution\n@param param1 The first parameter of the distribution. In the case of a uniform distribution it is\nthe inclusive lower boundary of the random numbers range. In the case of a normal distribution it\nis the mean value of the random numbers.\n@param param2 The second parameter of the distribution. In the case of a uniform distribution it\nis the exclusive upper boundary of the random numbers range. In the case of a normal distribution\nit is the standard deviation of the random numbers.\n@sa randu, randn, RNG::fill.\n */\nCVAPI(void) cvRandArr( CvRNG* rng, CvArr* arr, int dist_type,\n                      CvScalar param1, CvScalar param2 );\n\nCVAPI(void) cvRandShuffle( CvArr* mat, CvRNG* rng,\n                           double iter_factor CV_DEFAULT(1.));\n\n#define CV_SORT_EVERY_ROW 0\n#define CV_SORT_EVERY_COLUMN 1\n#define CV_SORT_ASCENDING 0\n#define CV_SORT_DESCENDING 16\n\nCVAPI(void) cvSort( const CvArr* src, CvArr* dst CV_DEFAULT(NULL),\n                    CvArr* idxmat CV_DEFAULT(NULL),\n                    int flags CV_DEFAULT(0));\n\n/** Finds real roots of a cubic equation */\nCVAPI(int) cvSolveCubic( const CvMat* coeffs, CvMat* roots );\n\n/** Finds all real and complex roots of a polynomial equation */\nCVAPI(void) cvSolvePoly(const CvMat* coeffs, CvMat *roots2,\n      int maxiter CV_DEFAULT(20), int fig CV_DEFAULT(100));\n\n/****************************************************************************************\\\n*                                Matrix operations                                       *\n\\****************************************************************************************/\n\n/** @brief Calculates the cross product of two 3D vectors.\n\nThe function calculates the cross product of two 3D vectors:\n\\f[\\texttt{dst} =  \\texttt{src1} \\times \\texttt{src2}\\f]\nor:\n\\f[\\begin{array}{l} \\texttt{dst} _1 =  \\texttt{src1} _2  \\texttt{src2} _3 -  \\texttt{src1} _3  \\texttt{src2} _2 \\\\ \\texttt{dst} _2 =  \\texttt{src1} _3  \\texttt{src2} _1 -  \\texttt{src1} _1  \\texttt{src2} _3 \\\\ \\texttt{dst} _3 =  \\texttt{src1} _1  \\texttt{src2} _2 -  \\texttt{src1} _2  \\texttt{src2} _1 \\end{array}\\f]\n@param src1 The first source vector\n@param src2 The second source vector\n@param dst The destination vector\n */\nCVAPI(void)  cvCrossProduct( const CvArr* src1, const CvArr* src2, CvArr* dst );\n\n/** Matrix transform: dst = A*B + C, C is optional */\n#define cvMatMulAdd( src1, src2, src3, dst ) cvGEMM( (src1), (src2), 1., (src3), 1., (dst), 0 )\n#define cvMatMul( src1, src2, dst )  cvMatMulAdd( (src1), (src2), NULL, (dst))\n\n#define CV_GEMM_A_T 1\n#define CV_GEMM_B_T 2\n#define CV_GEMM_C_T 4\n/** Extended matrix transform:\n   dst = alpha*op(A)*op(B) + beta*op(C), where op(X) is X or X^T */\nCVAPI(void)  cvGEMM( const CvArr* src1, const CvArr* src2, double alpha,\n                     const CvArr* src3, double beta, CvArr* dst,\n                     int tABC CV_DEFAULT(0));\n#define cvMatMulAddEx cvGEMM\n\n/** Transforms each element of source array and stores\n   resultant vectors in destination array */\nCVAPI(void)  cvTransform( const CvArr* src, CvArr* dst,\n                          const CvMat* transmat,\n                          const CvMat* shiftvec CV_DEFAULT(NULL));\n#define cvMatMulAddS cvTransform\n\n/** Does perspective transform on every element of input array */\nCVAPI(void)  cvPerspectiveTransform( const CvArr* src, CvArr* dst,\n                                     const CvMat* mat );\n\n/** Calculates (A-delta)*(A-delta)^T (order=0) or (A-delta)^T*(A-delta) (order=1) */\nCVAPI(void) cvMulTransposed( const CvArr* src, CvArr* dst, int order,\n                             const CvArr* delta CV_DEFAULT(NULL),\n                             double scale CV_DEFAULT(1.) );\n\n/** Tranposes matrix. Square matrices can be transposed in-place */\nCVAPI(void)  cvTranspose( const CvArr* src, CvArr* dst );\n#define cvT cvTranspose\n\n/** Completes the symmetric matrix from the lower (LtoR=0) or from the upper (LtoR!=0) part */\nCVAPI(void)  cvCompleteSymm( CvMat* matrix, int LtoR CV_DEFAULT(0) );\n\n/** Mirror array data around horizontal (flip=0),\n   vertical (flip=1) or both(flip=-1) axises:\n   cvFlip(src) flips images vertically and sequences horizontally (inplace) */\nCVAPI(void)  cvFlip( const CvArr* src, CvArr* dst CV_DEFAULT(NULL),\n                     int flip_mode CV_DEFAULT(0));\n#define cvMirror cvFlip\n\n\n#define CV_SVD_MODIFY_A   1\n#define CV_SVD_U_T        2\n#define CV_SVD_V_T        4\n\n/** Performs Singular Value Decomposition of a matrix */\nCVAPI(void)   cvSVD( CvArr* A, CvArr* W, CvArr* U CV_DEFAULT(NULL),\n                     CvArr* V CV_DEFAULT(NULL), int flags CV_DEFAULT(0));\n\n/** Performs Singular Value Back Substitution (solves A*X = B):\n   flags must be the same as in cvSVD */\nCVAPI(void)   cvSVBkSb( const CvArr* W, const CvArr* U,\n                        const CvArr* V, const CvArr* B,\n                        CvArr* X, int flags );\n\n#define CV_LU  0\n#define CV_SVD 1\n#define CV_SVD_SYM 2\n#define CV_CHOLESKY 3\n#define CV_QR  4\n#define CV_NORMAL 16\n\n/** Inverts matrix */\nCVAPI(double)  cvInvert( const CvArr* src, CvArr* dst,\n                         int method CV_DEFAULT(CV_LU));\n#define cvInv cvInvert\n\n/** Solves linear system (src1)*(dst) = (src2)\n   (returns 0 if src1 is a singular and CV_LU method is used) */\nCVAPI(int)  cvSolve( const CvArr* src1, const CvArr* src2, CvArr* dst,\n                     int method CV_DEFAULT(CV_LU));\n\n/** Calculates determinant of input matrix */\nCVAPI(double) cvDet( const CvArr* mat );\n\n/** Calculates trace of the matrix (sum of elements on the main diagonal) */\nCVAPI(CvScalar) cvTrace( const CvArr* mat );\n\n/** Finds eigen values and vectors of a symmetric matrix */\nCVAPI(void)  cvEigenVV( CvArr* mat, CvArr* evects, CvArr* evals,\n                        double eps CV_DEFAULT(0),\n                        int lowindex CV_DEFAULT(-1),\n                        int highindex CV_DEFAULT(-1));\n\n///* Finds selected eigen values and vectors of a symmetric matrix */\n//CVAPI(void)  cvSelectedEigenVV( CvArr* mat, CvArr* evects, CvArr* evals,\n//                                int lowindex, int highindex );\n\n/** Makes an identity matrix (mat_ij = i == j) */\nCVAPI(void)  cvSetIdentity( CvArr* mat, CvScalar value CV_DEFAULT(cvRealScalar(1)) );\n\n/** Fills matrix with given range of numbers */\nCVAPI(CvArr*)  cvRange( CvArr* mat, double start, double end );\n\n/**   @anchor core_c_CovarFlags\n@name Flags for cvCalcCovarMatrix\n@see cvCalcCovarMatrix\n  @{\n*/\n\n/** flag for cvCalcCovarMatrix, transpose([v1-avg, v2-avg,...]) * [v1-avg,v2-avg,...] */\n#define CV_COVAR_SCRAMBLED 0\n\n/** flag for cvCalcCovarMatrix, [v1-avg, v2-avg,...] * transpose([v1-avg,v2-avg,...]) */\n#define CV_COVAR_NORMAL    1\n\n/** flag for cvCalcCovarMatrix, do not calc average (i.e. mean vector) - use the input vector instead\n   (useful for calculating covariance matrix by parts) */\n#define CV_COVAR_USE_AVG   2\n\n/** flag for cvCalcCovarMatrix, scale the covariance matrix coefficients by number of the vectors */\n#define CV_COVAR_SCALE     4\n\n/** flag for cvCalcCovarMatrix, all the input vectors are stored in a single matrix, as its rows */\n#define CV_COVAR_ROWS      8\n\n/** flag for cvCalcCovarMatrix, all the input vectors are stored in a single matrix, as its columns */\n#define CV_COVAR_COLS     16\n\n/** @} */\n\n/** Calculates covariation matrix for a set of vectors\n@see @ref core_c_CovarFlags \"flags\"\n*/\nCVAPI(void)  cvCalcCovarMatrix( const CvArr** vects, int count,\n                                CvArr* cov_mat, CvArr* avg, int flags );\n\n#define CV_PCA_DATA_AS_ROW 0\n#define CV_PCA_DATA_AS_COL 1\n#define CV_PCA_USE_AVG 2\nCVAPI(void)  cvCalcPCA( const CvArr* data, CvArr* mean,\n                        CvArr* eigenvals, CvArr* eigenvects, int flags );\n\nCVAPI(void)  cvProjectPCA( const CvArr* data, const CvArr* mean,\n                           const CvArr* eigenvects, CvArr* result );\n\nCVAPI(void)  cvBackProjectPCA( const CvArr* proj, const CvArr* mean,\n                               const CvArr* eigenvects, CvArr* result );\n\n/** Calculates Mahalanobis(weighted) distance */\nCVAPI(double)  cvMahalanobis( const CvArr* vec1, const CvArr* vec2, const CvArr* mat );\n#define cvMahalonobis  cvMahalanobis\n\n/****************************************************************************************\\\n*                                    Array Statistics                                    *\n\\****************************************************************************************/\n\n/** Finds sum of array elements */\nCVAPI(CvScalar)  cvSum( const CvArr* arr );\n\n/** Calculates number of non-zero pixels */\nCVAPI(int)  cvCountNonZero( const CvArr* arr );\n\n/** Calculates mean value of array elements */\nCVAPI(CvScalar)  cvAvg( const CvArr* arr, const CvArr* mask CV_DEFAULT(NULL) );\n\n/** Calculates mean and standard deviation of pixel values */\nCVAPI(void)  cvAvgSdv( const CvArr* arr, CvScalar* mean, CvScalar* std_dev,\n                       const CvArr* mask CV_DEFAULT(NULL) );\n\n/** Finds global minimum, maximum and their positions */\nCVAPI(void)  cvMinMaxLoc( const CvArr* arr, double* min_val, double* max_val,\n                          CvPoint* min_loc CV_DEFAULT(NULL),\n                          CvPoint* max_loc CV_DEFAULT(NULL),\n                          const CvArr* mask CV_DEFAULT(NULL) );\n\n/** @anchor core_c_NormFlags\n  @name Flags for cvNorm and cvNormalize\n  @{\n*/\n#define CV_C            1\n#define CV_L1           2\n#define CV_L2           4\n#define CV_NORM_MASK    7\n#define CV_RELATIVE     8\n#define CV_DIFF         16\n#define CV_MINMAX       32\n\n#define CV_DIFF_C       (CV_DIFF | CV_C)\n#define CV_DIFF_L1      (CV_DIFF | CV_L1)\n#define CV_DIFF_L2      (CV_DIFF | CV_L2)\n#define CV_RELATIVE_C   (CV_RELATIVE | CV_C)\n#define CV_RELATIVE_L1  (CV_RELATIVE | CV_L1)\n#define CV_RELATIVE_L2  (CV_RELATIVE | CV_L2)\n/** @} */\n\n/** Finds norm, difference norm or relative difference norm for an array (or two arrays)\n@see ref core_c_NormFlags \"flags\"\n*/\nCVAPI(double)  cvNorm( const CvArr* arr1, const CvArr* arr2 CV_DEFAULT(NULL),\n                       int norm_type CV_DEFAULT(CV_L2),\n                       const CvArr* mask CV_DEFAULT(NULL) );\n\n/** @see ref core_c_NormFlags \"flags\" */\nCVAPI(void)  cvNormalize( const CvArr* src, CvArr* dst,\n                          double a CV_DEFAULT(1.), double b CV_DEFAULT(0.),\n                          int norm_type CV_DEFAULT(CV_L2),\n                          const CvArr* mask CV_DEFAULT(NULL) );\n\n/** @anchor core_c_ReduceFlags\n  @name Flags for cvReduce\n  @{\n*/\n#define CV_REDUCE_SUM 0\n#define CV_REDUCE_AVG 1\n#define CV_REDUCE_MAX 2\n#define CV_REDUCE_MIN 3\n/** @} */\n\n/** @see @ref core_c_ReduceFlags \"flags\" */\nCVAPI(void)  cvReduce( const CvArr* src, CvArr* dst, int dim CV_DEFAULT(-1),\n                       int op CV_DEFAULT(CV_REDUCE_SUM) );\n\n/****************************************************************************************\\\n*                      Discrete Linear Transforms and Related Functions                  *\n\\****************************************************************************************/\n\n/** @anchor core_c_DftFlags\n  @name Flags for cvDFT, cvDCT and cvMulSpectrums\n  @{\n  */\n#define CV_DXT_FORWARD  0\n#define CV_DXT_INVERSE  1\n#define CV_DXT_SCALE    2 /**< divide result by size of array */\n#define CV_DXT_INV_SCALE (CV_DXT_INVERSE + CV_DXT_SCALE)\n#define CV_DXT_INVERSE_SCALE CV_DXT_INV_SCALE\n#define CV_DXT_ROWS     4 /**< transform each row individually */\n#define CV_DXT_MUL_CONJ 8 /**< conjugate the second argument of cvMulSpectrums */\n/** @} */\n\n/** Discrete Fourier Transform:\n    complex->complex,\n    real->ccs (forward),\n    ccs->real (inverse)\n@see core_c_DftFlags \"flags\"\n*/\nCVAPI(void)  cvDFT( const CvArr* src, CvArr* dst, int flags,\n                    int nonzero_rows CV_DEFAULT(0) );\n#define cvFFT cvDFT\n\n/** Multiply results of DFTs: DFT(X)*DFT(Y) or DFT(X)*conj(DFT(Y))\n@see core_c_DftFlags \"flags\"\n*/\nCVAPI(void)  cvMulSpectrums( const CvArr* src1, const CvArr* src2,\n                             CvArr* dst, int flags );\n\n/** Finds optimal DFT vector size >= size0 */\nCVAPI(int)  cvGetOptimalDFTSize( int size0 );\n\n/** Discrete Cosine Transform\n@see core_c_DftFlags \"flags\"\n*/\nCVAPI(void)  cvDCT( const CvArr* src, CvArr* dst, int flags );\n\n/****************************************************************************************\\\n*                              Dynamic data structures                                   *\n\\****************************************************************************************/\n\n/** Calculates length of sequence slice (with support of negative indices). */\nCVAPI(int) cvSliceLength( CvSlice slice, const CvSeq* seq );\n\n\n/** Creates new memory storage.\n   block_size == 0 means that default,\n   somewhat optimal size, is used (currently, it is 64K) */\nCVAPI(CvMemStorage*)  cvCreateMemStorage( int block_size CV_DEFAULT(0));\n\n\n/** Creates a memory storage that will borrow memory blocks from parent storage */\nCVAPI(CvMemStorage*)  cvCreateChildMemStorage( CvMemStorage* parent );\n\n\n/** Releases memory storage. All the children of a parent must be released before\n   the parent. A child storage returns all the blocks to parent when it is released */\nCVAPI(void)  cvReleaseMemStorage( CvMemStorage** storage );\n\n\n/** Clears memory storage. This is the only way(!!!) (besides cvRestoreMemStoragePos)\n   to reuse memory allocated for the storage - cvClearSeq,cvClearSet ...\n   do not free any memory.\n   A child storage returns all the blocks to the parent when it is cleared */\nCVAPI(void)  cvClearMemStorage( CvMemStorage* storage );\n\n/** Remember a storage \"free memory\" position */\nCVAPI(void)  cvSaveMemStoragePos( const CvMemStorage* storage, CvMemStoragePos* pos );\n\n/** Restore a storage \"free memory\" position */\nCVAPI(void)  cvRestoreMemStoragePos( CvMemStorage* storage, CvMemStoragePos* pos );\n\n/** Allocates continuous buffer of the specified size in the storage */\nCVAPI(void*) cvMemStorageAlloc( CvMemStorage* storage, size_t size );\n\n/** Allocates string in memory storage */\nCVAPI(CvString) cvMemStorageAllocString( CvMemStorage* storage, const char* ptr,\n                                         int len CV_DEFAULT(-1) );\n\n/** Creates new empty sequence that will reside in the specified storage */\nCVAPI(CvSeq*)  cvCreateSeq( int seq_flags, size_t header_size,\n                            size_t elem_size, CvMemStorage* storage );\n\n/** Changes default size (granularity) of sequence blocks.\n   The default size is ~1Kbyte */\nCVAPI(void)  cvSetSeqBlockSize( CvSeq* seq, int delta_elems );\n\n\n/** Adds new element to the end of sequence. Returns pointer to the element */\nCVAPI(schar*)  cvSeqPush( CvSeq* seq, const void* element CV_DEFAULT(NULL));\n\n\n/** Adds new element to the beginning of sequence. Returns pointer to it */\nCVAPI(schar*)  cvSeqPushFront( CvSeq* seq, const void* element CV_DEFAULT(NULL));\n\n\n/** Removes the last element from sequence and optionally saves it */\nCVAPI(void)  cvSeqPop( CvSeq* seq, void* element CV_DEFAULT(NULL));\n\n\n/** Removes the first element from sequence and optioanally saves it */\nCVAPI(void)  cvSeqPopFront( CvSeq* seq, void* element CV_DEFAULT(NULL));\n\n\n#define CV_FRONT 1\n#define CV_BACK 0\n/** Adds several new elements to the end of sequence */\nCVAPI(void)  cvSeqPushMulti( CvSeq* seq, const void* elements,\n                             int count, int in_front CV_DEFAULT(0) );\n\n/** Removes several elements from the end of sequence and optionally saves them */\nCVAPI(void)  cvSeqPopMulti( CvSeq* seq, void* elements,\n                            int count, int in_front CV_DEFAULT(0) );\n\n/** Inserts a new element in the middle of sequence.\n   cvSeqInsert(seq,0,elem) == cvSeqPushFront(seq,elem) */\nCVAPI(schar*)  cvSeqInsert( CvSeq* seq, int before_index,\n                            const void* element CV_DEFAULT(NULL));\n\n/** Removes specified sequence element */\nCVAPI(void)  cvSeqRemove( CvSeq* seq, int index );\n\n\n/** Removes all the elements from the sequence. The freed memory\n   can be reused later only by the same sequence unless cvClearMemStorage\n   or cvRestoreMemStoragePos is called */\nCVAPI(void)  cvClearSeq( CvSeq* seq );\n\n\n/** Retrieves pointer to specified sequence element.\n   Negative indices are supported and mean counting from the end\n   (e.g -1 means the last sequence element) */\nCVAPI(schar*)  cvGetSeqElem( const CvSeq* seq, int index );\n\n/** Calculates index of the specified sequence element.\n   Returns -1 if element does not belong to the sequence */\nCVAPI(int)  cvSeqElemIdx( const CvSeq* seq, const void* element,\n                         CvSeqBlock** block CV_DEFAULT(NULL) );\n\n/** Initializes sequence writer. The new elements will be added to the end of sequence */\nCVAPI(void)  cvStartAppendToSeq( CvSeq* seq, CvSeqWriter* writer );\n\n\n/** Combination of cvCreateSeq and cvStartAppendToSeq */\nCVAPI(void)  cvStartWriteSeq( int seq_flags, int header_size,\n                              int elem_size, CvMemStorage* storage,\n                              CvSeqWriter* writer );\n\n/** Closes sequence writer, updates sequence header and returns pointer\n   to the resultant sequence\n   (which may be useful if the sequence was created using cvStartWriteSeq))\n*/\nCVAPI(CvSeq*)  cvEndWriteSeq( CvSeqWriter* writer );\n\n\n/** Updates sequence header. May be useful to get access to some of previously\n   written elements via cvGetSeqElem or sequence reader */\nCVAPI(void)   cvFlushSeqWriter( CvSeqWriter* writer );\n\n\n/** Initializes sequence reader.\n   The sequence can be read in forward or backward direction */\nCVAPI(void) cvStartReadSeq( const CvSeq* seq, CvSeqReader* reader,\n                           int reverse CV_DEFAULT(0) );\n\n\n/** Returns current sequence reader position (currently observed sequence element) */\nCVAPI(int)  cvGetSeqReaderPos( CvSeqReader* reader );\n\n\n/** Changes sequence reader position. It may seek to an absolute or\n   to relative to the current position */\nCVAPI(void)   cvSetSeqReaderPos( CvSeqReader* reader, int index,\n                                 int is_relative CV_DEFAULT(0));\n\n/** Copies sequence content to a continuous piece of memory */\nCVAPI(void*)  cvCvtSeqToArray( const CvSeq* seq, void* elements,\n                               CvSlice slice CV_DEFAULT(CV_WHOLE_SEQ) );\n\n/** Creates sequence header for array.\n   After that all the operations on sequences that do not alter the content\n   can be applied to the resultant sequence */\nCVAPI(CvSeq*) cvMakeSeqHeaderForArray( int seq_type, int header_size,\n                                       int elem_size, void* elements, int total,\n                                       CvSeq* seq, CvSeqBlock* block );\n\n/** Extracts sequence slice (with or without copying sequence elements) */\nCVAPI(CvSeq*) cvSeqSlice( const CvSeq* seq, CvSlice slice,\n                         CvMemStorage* storage CV_DEFAULT(NULL),\n                         int copy_data CV_DEFAULT(0));\n\nCV_INLINE CvSeq* cvCloneSeq( const CvSeq* seq, CvMemStorage* storage CV_DEFAULT(NULL))\n{\n    return cvSeqSlice( seq, CV_WHOLE_SEQ, storage, 1 );\n}\n\n/** Removes sequence slice */\nCVAPI(void)  cvSeqRemoveSlice( CvSeq* seq, CvSlice slice );\n\n/** Inserts a sequence or array into another sequence */\nCVAPI(void)  cvSeqInsertSlice( CvSeq* seq, int before_index, const CvArr* from_arr );\n\n/** a < b ? -1 : a > b ? 1 : 0 */\ntypedef int (CV_CDECL* CvCmpFunc)(const void* a, const void* b, void* userdata );\n\n/** Sorts sequence in-place given element comparison function */\nCVAPI(void) cvSeqSort( CvSeq* seq, CvCmpFunc func, void* userdata CV_DEFAULT(NULL) );\n\n/** Finds element in a [sorted] sequence */\nCVAPI(schar*) cvSeqSearch( CvSeq* seq, const void* elem, CvCmpFunc func,\n                           int is_sorted, int* elem_idx,\n                           void* userdata CV_DEFAULT(NULL) );\n\n/** Reverses order of sequence elements in-place */\nCVAPI(void) cvSeqInvert( CvSeq* seq );\n\n/** Splits sequence into one or more equivalence classes using the specified criteria */\nCVAPI(int)  cvSeqPartition( const CvSeq* seq, CvMemStorage* storage,\n                            CvSeq** labels, CvCmpFunc is_equal, void* userdata );\n\n/************ Internal sequence functions ************/\nCVAPI(void)  cvChangeSeqBlock( void* reader, int direction );\nCVAPI(void)  cvCreateSeqBlock( CvSeqWriter* writer );\n\n\n/** Creates a new set */\nCVAPI(CvSet*)  cvCreateSet( int set_flags, int header_size,\n                            int elem_size, CvMemStorage* storage );\n\n/** Adds new element to the set and returns pointer to it */\nCVAPI(int)  cvSetAdd( CvSet* set_header, CvSetElem* elem CV_DEFAULT(NULL),\n                      CvSetElem** inserted_elem CV_DEFAULT(NULL) );\n\n/** Fast variant of cvSetAdd */\nCV_INLINE  CvSetElem* cvSetNew( CvSet* set_header )\n{\n    CvSetElem* elem = set_header->free_elems;\n    if( elem )\n    {\n        set_header->free_elems = elem->next_free;\n        elem->flags = elem->flags & CV_SET_ELEM_IDX_MASK;\n        set_header->active_count++;\n    }\n    else\n        cvSetAdd( set_header, NULL, &elem );\n    return elem;\n}\n\n/** Removes set element given its pointer */\nCV_INLINE  void cvSetRemoveByPtr( CvSet* set_header, void* elem )\n{\n    CvSetElem* _elem = (CvSetElem*)elem;\n    assert( _elem->flags >= 0 /*&& (elem->flags & CV_SET_ELEM_IDX_MASK) < set_header->total*/ );\n    _elem->next_free = set_header->free_elems;\n    _elem->flags = (_elem->flags & CV_SET_ELEM_IDX_MASK) | CV_SET_ELEM_FREE_FLAG;\n    set_header->free_elems = _elem;\n    set_header->active_count--;\n}\n\n/** Removes element from the set by its index  */\nCVAPI(void)   cvSetRemove( CvSet* set_header, int index );\n\n/** Returns a set element by index. If the element doesn't belong to the set,\n   NULL is returned */\nCV_INLINE CvSetElem* cvGetSetElem( const CvSet* set_header, int idx )\n{\n    CvSetElem* elem = (CvSetElem*)(void *)cvGetSeqElem( (CvSeq*)set_header, idx );\n    return elem && CV_IS_SET_ELEM( elem ) ? elem : 0;\n}\n\n/** Removes all the elements from the set */\nCVAPI(void)  cvClearSet( CvSet* set_header );\n\n/** Creates new graph */\nCVAPI(CvGraph*)  cvCreateGraph( int graph_flags, int header_size,\n                                int vtx_size, int edge_size,\n                                CvMemStorage* storage );\n\n/** Adds new vertex to the graph */\nCVAPI(int)  cvGraphAddVtx( CvGraph* graph, const CvGraphVtx* vtx CV_DEFAULT(NULL),\n                           CvGraphVtx** inserted_vtx CV_DEFAULT(NULL) );\n\n\n/** Removes vertex from the graph together with all incident edges */\nCVAPI(int)  cvGraphRemoveVtx( CvGraph* graph, int index );\nCVAPI(int)  cvGraphRemoveVtxByPtr( CvGraph* graph, CvGraphVtx* vtx );\n\n\n/** Link two vertices specifed by indices or pointers if they\n   are not connected or return pointer to already existing edge\n   connecting the vertices.\n   Functions return 1 if a new edge was created, 0 otherwise */\nCVAPI(int)  cvGraphAddEdge( CvGraph* graph,\n                            int start_idx, int end_idx,\n                            const CvGraphEdge* edge CV_DEFAULT(NULL),\n                            CvGraphEdge** inserted_edge CV_DEFAULT(NULL) );\n\nCVAPI(int)  cvGraphAddEdgeByPtr( CvGraph* graph,\n                               CvGraphVtx* start_vtx, CvGraphVtx* end_vtx,\n                               const CvGraphEdge* edge CV_DEFAULT(NULL),\n                               CvGraphEdge** inserted_edge CV_DEFAULT(NULL) );\n\n/** Remove edge connecting two vertices */\nCVAPI(void)  cvGraphRemoveEdge( CvGraph* graph, int start_idx, int end_idx );\nCVAPI(void)  cvGraphRemoveEdgeByPtr( CvGraph* graph, CvGraphVtx* start_vtx,\n                                     CvGraphVtx* end_vtx );\n\n/** Find edge connecting two vertices */\nCVAPI(CvGraphEdge*)  cvFindGraphEdge( const CvGraph* graph, int start_idx, int end_idx );\nCVAPI(CvGraphEdge*)  cvFindGraphEdgeByPtr( const CvGraph* graph,\n                                           const CvGraphVtx* start_vtx,\n                                           const CvGraphVtx* end_vtx );\n#define cvGraphFindEdge cvFindGraphEdge\n#define cvGraphFindEdgeByPtr cvFindGraphEdgeByPtr\n\n/** Remove all vertices and edges from the graph */\nCVAPI(void)  cvClearGraph( CvGraph* graph );\n\n\n/** Count number of edges incident to the vertex */\nCVAPI(int)  cvGraphVtxDegree( const CvGraph* graph, int vtx_idx );\nCVAPI(int)  cvGraphVtxDegreeByPtr( const CvGraph* graph, const CvGraphVtx* vtx );\n\n\n/** Retrieves graph vertex by given index */\n#define cvGetGraphVtx( graph, idx ) (CvGraphVtx*)cvGetSetElem((CvSet*)(graph), (idx))\n\n/** Retrieves index of a graph vertex given its pointer */\n#define cvGraphVtxIdx( graph, vtx ) ((vtx)->flags & CV_SET_ELEM_IDX_MASK)\n\n/** Retrieves index of a graph edge given its pointer */\n#define cvGraphEdgeIdx( graph, edge ) ((edge)->flags & CV_SET_ELEM_IDX_MASK)\n\n#define cvGraphGetVtxCount( graph ) ((graph)->active_count)\n#define cvGraphGetEdgeCount( graph ) ((graph)->edges->active_count)\n\n#define  CV_GRAPH_VERTEX        1\n#define  CV_GRAPH_TREE_EDGE     2\n#define  CV_GRAPH_BACK_EDGE     4\n#define  CV_GRAPH_FORWARD_EDGE  8\n#define  CV_GRAPH_CROSS_EDGE    16\n#define  CV_GRAPH_ANY_EDGE      30\n#define  CV_GRAPH_NEW_TREE      32\n#define  CV_GRAPH_BACKTRACKING  64\n#define  CV_GRAPH_OVER          -1\n\n#define  CV_GRAPH_ALL_ITEMS    -1\n\n/** flags for graph vertices and edges */\n#define  CV_GRAPH_ITEM_VISITED_FLAG  (1 << 30)\n#define  CV_IS_GRAPH_VERTEX_VISITED(vtx) \\\n    (((CvGraphVtx*)(vtx))->flags & CV_GRAPH_ITEM_VISITED_FLAG)\n#define  CV_IS_GRAPH_EDGE_VISITED(edge) \\\n    (((CvGraphEdge*)(edge))->flags & CV_GRAPH_ITEM_VISITED_FLAG)\n#define  CV_GRAPH_SEARCH_TREE_NODE_FLAG   (1 << 29)\n#define  CV_GRAPH_FORWARD_EDGE_FLAG       (1 << 28)\n\ntypedef struct CvGraphScanner\n{\n    CvGraphVtx* vtx;       /* current graph vertex (or current edge origin) */\n    CvGraphVtx* dst;       /* current graph edge destination vertex */\n    CvGraphEdge* edge;     /* current edge */\n\n    CvGraph* graph;        /* the graph */\n    CvSeq*   stack;        /* the graph vertex stack */\n    int      index;        /* the lower bound of certainly visited vertices */\n    int      mask;         /* event mask */\n}\nCvGraphScanner;\n\n/** Creates new graph scanner. */\nCVAPI(CvGraphScanner*)  cvCreateGraphScanner( CvGraph* graph,\n                                             CvGraphVtx* vtx CV_DEFAULT(NULL),\n                                             int mask CV_DEFAULT(CV_GRAPH_ALL_ITEMS));\n\n/** Releases graph scanner. */\nCVAPI(void) cvReleaseGraphScanner( CvGraphScanner** scanner );\n\n/** Get next graph element */\nCVAPI(int)  cvNextGraphItem( CvGraphScanner* scanner );\n\n/** Creates a copy of graph */\nCVAPI(CvGraph*) cvCloneGraph( const CvGraph* graph, CvMemStorage* storage );\n\n\n/** Does look-up transformation. Elements of the source array\n   (that should be 8uC1 or 8sC1) are used as indexes in lutarr 256-element table */\nCVAPI(void) cvLUT( const CvArr* src, CvArr* dst, const CvArr* lut );\n\n\n/******************* Iteration through the sequence tree *****************/\ntypedef struct CvTreeNodeIterator\n{\n    const void* node;\n    int level;\n    int max_level;\n}\nCvTreeNodeIterator;\n\nCVAPI(void) cvInitTreeNodeIterator( CvTreeNodeIterator* tree_iterator,\n                                   const void* first, int max_level );\nCVAPI(void*) cvNextTreeNode( CvTreeNodeIterator* tree_iterator );\nCVAPI(void*) cvPrevTreeNode( CvTreeNodeIterator* tree_iterator );\n\n/** Inserts sequence into tree with specified \"parent\" sequence.\n   If parent is equal to frame (e.g. the most external contour),\n   then added contour will have null pointer to parent. */\nCVAPI(void) cvInsertNodeIntoTree( void* node, void* parent, void* frame );\n\n/** Removes contour from tree (together with the contour children). */\nCVAPI(void) cvRemoveNodeFromTree( void* node, void* frame );\n\n/** Gathers pointers to all the sequences,\n   accessible from the `first`, to the single sequence */\nCVAPI(CvSeq*) cvTreeToNodeSeq( const void* first, int header_size,\n                              CvMemStorage* storage );\n\n/** The function implements the K-means algorithm for clustering an array of sample\n   vectors in a specified number of classes */\n#define CV_KMEANS_USE_INITIAL_LABELS    1\nCVAPI(int) cvKMeans2( const CvArr* samples, int cluster_count, CvArr* labels,\n                      CvTermCriteria termcrit, int attempts CV_DEFAULT(1),\n                      CvRNG* rng CV_DEFAULT(0), int flags CV_DEFAULT(0),\n                      CvArr* _centers CV_DEFAULT(0), double* compactness CV_DEFAULT(0) );\n\n/****************************************************************************************\\\n*                                    System functions                                    *\n\\****************************************************************************************/\n\n/** Loads optimized functions from IPP, MKL etc. or switches back to pure C code */\nCVAPI(int)  cvUseOptimized( int on_off );\n\ntypedef IplImage* (CV_STDCALL* Cv_iplCreateImageHeader)\n                            (int,int,int,char*,char*,int,int,int,int,int,\n                            IplROI*,IplImage*,void*,IplTileInfo*);\ntypedef void (CV_STDCALL* Cv_iplAllocateImageData)(IplImage*,int,int);\ntypedef void (CV_STDCALL* Cv_iplDeallocate)(IplImage*,int);\ntypedef IplROI* (CV_STDCALL* Cv_iplCreateROI)(int,int,int,int,int);\ntypedef IplImage* (CV_STDCALL* Cv_iplCloneImage)(const IplImage*);\n\n/** @brief Makes OpenCV use IPL functions for allocating IplImage and IplROI structures.\n\nNormally, the function is not called directly. Instead, a simple macro\nCV_TURN_ON_IPL_COMPATIBILITY() is used that calls cvSetIPLAllocators and passes there pointers\nto IPL allocation functions. :\n@code\n    ...\n    CV_TURN_ON_IPL_COMPATIBILITY()\n    ...\n@endcode\n@param create_header pointer to a function, creating IPL image header.\n@param allocate_data pointer to a function, allocating IPL image data.\n@param deallocate pointer to a function, deallocating IPL image.\n@param create_roi pointer to a function, creating IPL image ROI (i.e. Region of Interest).\n@param clone_image pointer to a function, cloning an IPL image.\n */\nCVAPI(void) cvSetIPLAllocators( Cv_iplCreateImageHeader create_header,\n                               Cv_iplAllocateImageData allocate_data,\n                               Cv_iplDeallocate deallocate,\n                               Cv_iplCreateROI create_roi,\n                               Cv_iplCloneImage clone_image );\n\n#define CV_TURN_ON_IPL_COMPATIBILITY()                                  \\\n    cvSetIPLAllocators( iplCreateImageHeader, iplAllocateImage,         \\\n                        iplDeallocate, iplCreateROI, iplCloneImage )\n\n/****************************************************************************************\\\n*                                    Data Persistence                                    *\n\\****************************************************************************************/\n\n/********************************** High-level functions ********************************/\n\n/** @brief Opens file storage for reading or writing data.\n\nThe function opens file storage for reading or writing data. In the latter case, a new file is\ncreated or an existing file is rewritten. The type of the read or written file is determined by the\nfilename extension: .xml for XML and .yml or .yaml for YAML. The function returns a pointer to the\nCvFileStorage structure. If the file cannot be opened then the function returns NULL.\n@param filename Name of the file associated with the storage\n@param memstorage Memory storage used for temporary data and for\n:   storing dynamic structures, such as CvSeq or CvGraph . If it is NULL, a temporary memory\n    storage is created and used.\n@param flags Can be one of the following:\n> -   **CV_STORAGE_READ** the storage is open for reading\n> -   **CV_STORAGE_WRITE** the storage is open for writing\n@param encoding\n */\nCVAPI(CvFileStorage*)  cvOpenFileStorage( const char* filename, CvMemStorage* memstorage,\n                                          int flags, const char* encoding CV_DEFAULT(NULL) );\n\n/** @brief Releases file storage.\n\nThe function closes the file associated with the storage and releases all the temporary structures.\nIt must be called after all I/O operations with the storage are finished.\n@param fs Double pointer to the released file storage\n */\nCVAPI(void) cvReleaseFileStorage( CvFileStorage** fs );\n\n/** returns attribute value or 0 (NULL) if there is no such attribute */\nCVAPI(const char*) cvAttrValue( const CvAttrList* attr, const char* attr_name );\n\n/** @brief Starts writing a new structure.\n\nThe function starts writing a compound structure (collection) that can be a sequence or a map. After\nall the structure fields, which can be scalars or structures, are written, cvEndWriteStruct should\nbe called. The function can be used to group some objects or to implement the write function for a\nsome user object (see CvTypeInfo).\n@param fs File storage\n@param name Name of the written structure. The structure can be accessed by this name when the\nstorage is read.\n@param struct_flags A combination one of the following values:\n-   **CV_NODE_SEQ** the written structure is a sequence (see discussion of CvFileStorage ),\n    that is, its elements do not have a name.\n-   **CV_NODE_MAP** the written structure is a map (see discussion of CvFileStorage ), that\n    is, all its elements have names.\nOne and only one of the two above flags must be specified\n-   **CV_NODE_FLOW** the optional flag that makes sense only for YAML streams. It means that\n     the structure is written as a flow (not as a block), which is more compact. It is\n     recommended to use this flag for structures or arrays whose elements are all scalars.\n@param type_name Optional parameter - the object type name. In\n    case of XML it is written as a type_id attribute of the structure opening tag. In the case of\n    YAML it is written after a colon following the structure name (see the example in\n    CvFileStorage description). Mainly it is used with user objects. When the storage is read, the\n    encoded type name is used to determine the object type (see CvTypeInfo and cvFindType ).\n@param attributes This parameter is not used in the current implementation\n */\nCVAPI(void) cvStartWriteStruct( CvFileStorage* fs, const char* name,\n                                int struct_flags, const char* type_name CV_DEFAULT(NULL),\n                                CvAttrList attributes CV_DEFAULT(cvAttrList()));\n\n/** @brief Finishes writing to a file node collection.\n@param fs File storage\n@sa cvStartWriteStruct.\n */\nCVAPI(void) cvEndWriteStruct( CvFileStorage* fs );\n\n/** @brief Writes an integer value.\n\nThe function writes a single integer value (with or without a name) to the file storage.\n@param fs File storage\n@param name Name of the written value. Should be NULL if and only if the parent structure is a\nsequence.\n@param value The written value\n */\nCVAPI(void) cvWriteInt( CvFileStorage* fs, const char* name, int value );\n\n/** @brief Writes a floating-point value.\n\nThe function writes a single floating-point value (with or without a name) to file storage. Special\nvalues are encoded as follows: NaN (Not A Number) as .NaN, infinity as +.Inf or -.Inf.\n\nThe following example shows how to use the low-level writing functions to store custom structures,\nsuch as termination criteria, without registering a new type. :\n@code\n    void write_termcriteria( CvFileStorage* fs, const char* struct_name,\n                             CvTermCriteria* termcrit )\n    {\n        cvStartWriteStruct( fs, struct_name, CV_NODE_MAP, NULL, cvAttrList(0,0));\n        cvWriteComment( fs, \"termination criteria\", 1 ); // just a description\n        if( termcrit->type & CV_TERMCRIT_ITER )\n            cvWriteInteger( fs, \"max_iterations\", termcrit->max_iter );\n        if( termcrit->type & CV_TERMCRIT_EPS )\n            cvWriteReal( fs, \"accuracy\", termcrit->epsilon );\n        cvEndWriteStruct( fs );\n    }\n@endcode\n@param fs File storage\n@param name Name of the written value. Should be NULL if and only if the parent structure is a\nsequence.\n@param value The written value\n*/\nCVAPI(void) cvWriteReal( CvFileStorage* fs, const char* name, double value );\n\n/** @brief Writes a text string.\n\nThe function writes a text string to file storage.\n@param fs File storage\n@param name Name of the written string . Should be NULL if and only if the parent structure is a\nsequence.\n@param str The written text string\n@param quote If non-zero, the written string is put in quotes, regardless of whether they are\nrequired. Otherwise, if the flag is zero, quotes are used only when they are required (e.g. when\nthe string starts with a digit or contains spaces).\n */\nCVAPI(void) cvWriteString( CvFileStorage* fs, const char* name,\n                           const char* str, int quote CV_DEFAULT(0) );\n\n/** @brief Writes a comment.\n\nThe function writes a comment into file storage. The comments are skipped when the storage is read.\n@param fs File storage\n@param comment The written comment, single-line or multi-line\n@param eol_comment If non-zero, the function tries to put the comment at the end of current line.\nIf the flag is zero, if the comment is multi-line, or if it does not fit at the end of the current\nline, the comment starts a new line.\n */\nCVAPI(void) cvWriteComment( CvFileStorage* fs, const char* comment,\n                            int eol_comment );\n\n/** @brief Writes an object to file storage.\n\nThe function writes an object to file storage. First, the appropriate type info is found using\ncvTypeOf. Then, the write method associated with the type info is called.\n\nAttributes are used to customize the writing procedure. The standard types support the following\nattributes (all the dt attributes have the same format as in cvWriteRawData):\n\n-# CvSeq\n    -   **header_dt** description of user fields of the sequence header that follow CvSeq, or\n        CvChain (if the sequence is a Freeman chain) or CvContour (if the sequence is a contour or\n        point sequence)\n    -   **dt** description of the sequence elements.\n    -   **recursive** if the attribute is present and is not equal to \"0\" or \"false\", the whole\n        tree of sequences (contours) is stored.\n-# CvGraph\n    -   **header_dt** description of user fields of the graph header that follows CvGraph;\n    -   **vertex_dt** description of user fields of graph vertices\n    -   **edge_dt** description of user fields of graph edges (note that the edge weight is\n        always written, so there is no need to specify it explicitly)\n\nBelow is the code that creates the YAML file shown in the CvFileStorage description:\n@code\n    #include \"cxcore.h\"\n\n    int main( int argc, char** argv )\n    {\n        CvMat* mat = cvCreateMat( 3, 3, CV_32F );\n        CvFileStorage* fs = cvOpenFileStorage( \"example.yml\", 0, CV_STORAGE_WRITE );\n\n        cvSetIdentity( mat );\n        cvWrite( fs, \"A\", mat, cvAttrList(0,0) );\n\n        cvReleaseFileStorage( &fs );\n        cvReleaseMat( &mat );\n        return 0;\n    }\n@endcode\n@param fs File storage\n@param name Name of the written object. Should be NULL if and only if the parent structure is a\nsequence.\n@param ptr Pointer to the object\n@param attributes The attributes of the object. They are specific for each particular type (see\nthe discussion below).\n */\nCVAPI(void) cvWrite( CvFileStorage* fs, const char* name, const void* ptr,\n                         CvAttrList attributes CV_DEFAULT(cvAttrList()));\n\n/** @brief Starts the next stream.\n\nThe function finishes the currently written stream and starts the next stream. In the case of XML\nthe file with multiple streams looks like this:\n@code{.xml}\n    <opencv_storage>\n    <!-- stream #1 data -->\n    </opencv_storage>\n    <opencv_storage>\n    <!-- stream #2 data -->\n    </opencv_storage>\n    ...\n@endcode\nThe YAML file will look like this:\n@code{.yaml}\n    %YAML:1.0\n    # stream #1 data\n    ...\n    ---\n    # stream #2 data\n@endcode\nThis is useful for concatenating files or for resuming the writing process.\n@param fs File storage\n */\nCVAPI(void) cvStartNextStream( CvFileStorage* fs );\n\n/** @brief Writes multiple numbers.\n\nThe function writes an array, whose elements consist of single or multiple numbers. The function\ncall can be replaced with a loop containing a few cvWriteInt and cvWriteReal calls, but a single\ncall is more efficient. Note that because none of the elements have a name, they should be written\nto a sequence rather than a map.\n@param fs File storage\n@param src Pointer to the written array\n@param len Number of the array elements to write\n@param dt Specification of each array element, see @ref format_spec \"format specification\"\n */\nCVAPI(void) cvWriteRawData( CvFileStorage* fs, const void* src,\n                                int len, const char* dt );\n\n/** @brief Returns a unique pointer for a given name.\n\nThe function returns a unique pointer for each particular file node name. This pointer can be then\npassed to the cvGetFileNode function that is faster than cvGetFileNodeByName because it compares\ntext strings by comparing pointers rather than the strings' content.\n\nConsider the following example where an array of points is encoded as a sequence of 2-entry maps:\n@code\n    points:\n      - { x: 10, y: 10 }\n      - { x: 20, y: 20 }\n      - { x: 30, y: 30 }\n      # ...\n@endcode\nThen, it is possible to get hashed \"x\" and \"y\" pointers to speed up decoding of the points. :\n@code\n    #include \"cxcore.h\"\n\n    int main( int argc, char** argv )\n    {\n        CvFileStorage* fs = cvOpenFileStorage( \"points.yml\", 0, CV_STORAGE_READ );\n        CvStringHashNode* x_key = cvGetHashedNode( fs, \"x\", -1, 1 );\n        CvStringHashNode* y_key = cvGetHashedNode( fs, \"y\", -1, 1 );\n        CvFileNode* points = cvGetFileNodeByName( fs, 0, \"points\" );\n\n        if( CV_NODE_IS_SEQ(points->tag) )\n        {\n            CvSeq* seq = points->data.seq;\n            int i, total = seq->total;\n            CvSeqReader reader;\n            cvStartReadSeq( seq, &reader, 0 );\n            for( i = 0; i < total; i++ )\n            {\n                CvFileNode* pt = (CvFileNode*)reader.ptr;\n    #if 1 // faster variant\n                CvFileNode* xnode = cvGetFileNode( fs, pt, x_key, 0 );\n                CvFileNode* ynode = cvGetFileNode( fs, pt, y_key, 0 );\n                assert( xnode && CV_NODE_IS_INT(xnode->tag) &&\n                        ynode && CV_NODE_IS_INT(ynode->tag));\n                int x = xnode->data.i; // or x = cvReadInt( xnode, 0 );\n                int y = ynode->data.i; // or y = cvReadInt( ynode, 0 );\n    #elif 1 // slower variant; does not use x_key & y_key\n                CvFileNode* xnode = cvGetFileNodeByName( fs, pt, \"x\" );\n                CvFileNode* ynode = cvGetFileNodeByName( fs, pt, \"y\" );\n                assert( xnode && CV_NODE_IS_INT(xnode->tag) &&\n                        ynode && CV_NODE_IS_INT(ynode->tag));\n                int x = xnode->data.i; // or x = cvReadInt( xnode, 0 );\n                int y = ynode->data.i; // or y = cvReadInt( ynode, 0 );\n    #else // the slowest yet the easiest to use variant\n                int x = cvReadIntByName( fs, pt, \"x\", 0 );\n                int y = cvReadIntByName( fs, pt, \"y\", 0 );\n    #endif\n                CV_NEXT_SEQ_ELEM( seq->elem_size, reader );\n                printf(\"\n            }\n        }\n        cvReleaseFileStorage( &fs );\n        return 0;\n    }\n@endcode\nPlease note that whatever method of accessing a map you are using, it is still much slower than\nusing plain sequences; for example, in the above example, it is more efficient to encode the points\nas pairs of integers in a single numeric sequence.\n@param fs File storage\n@param name Literal node name\n@param len Length of the name (if it is known apriori), or -1 if it needs to be calculated\n@param create_missing Flag that specifies, whether an absent key should be added into the hash table\n*/\nCVAPI(CvStringHashNode*) cvGetHashedKey( CvFileStorage* fs, const char* name,\n                                        int len CV_DEFAULT(-1),\n                                        int create_missing CV_DEFAULT(0));\n\n/** @brief Retrieves one of the top-level nodes of the file storage.\n\nThe function returns one of the top-level file nodes. The top-level nodes do not have a name, they\ncorrespond to the streams that are stored one after another in the file storage. If the index is out\nof range, the function returns a NULL pointer, so all the top-level nodes can be iterated by\nsubsequent calls to the function with stream_index=0,1,..., until the NULL pointer is returned.\nThis function can be used as a base for recursive traversal of the file storage.\n@param fs File storage\n@param stream_index Zero-based index of the stream. See cvStartNextStream . In most cases,\nthere is only one stream in the file; however, there can be several.\n */\nCVAPI(CvFileNode*) cvGetRootFileNode( const CvFileStorage* fs,\n                                     int stream_index CV_DEFAULT(0) );\n\n/** @brief Finds a node in a map or file storage.\n\nThe function finds a file node. It is a faster version of cvGetFileNodeByName (see\ncvGetHashedKey discussion). Also, the function can insert a new node, if it is not in the map yet.\n@param fs File storage\n@param map The parent map. If it is NULL, the function searches a top-level node. If both map and\nkey are NULLs, the function returns the root file node - a map that contains top-level nodes.\n@param key Unique pointer to the node name, retrieved with cvGetHashedKey\n@param create_missing Flag that specifies whether an absent node should be added to the map\n */\nCVAPI(CvFileNode*) cvGetFileNode( CvFileStorage* fs, CvFileNode* map,\n                                 const CvStringHashNode* key,\n                                 int create_missing CV_DEFAULT(0) );\n\n/** @brief Finds a node in a map or file storage.\n\nThe function finds a file node by name. The node is searched either in map or, if the pointer is\nNULL, among the top-level file storage nodes. Using this function for maps and cvGetSeqElem (or\nsequence reader) for sequences, it is possible to navigate through the file storage. To speed up\nmultiple queries for a certain key (e.g., in the case of an array of structures) one may use a\ncombination of cvGetHashedKey and cvGetFileNode.\n@param fs File storage\n@param map The parent map. If it is NULL, the function searches in all the top-level nodes\n(streams), starting with the first one.\n@param name The file node name\n */\nCVAPI(CvFileNode*) cvGetFileNodeByName( const CvFileStorage* fs,\n                                       const CvFileNode* map,\n                                       const char* name );\n\n/** @brief Retrieves an integer value from a file node.\n\nThe function returns an integer that is represented by the file node. If the file node is NULL, the\ndefault_value is returned (thus, it is convenient to call the function right after cvGetFileNode\nwithout checking for a NULL pointer). If the file node has type CV_NODE_INT, then node-\\>data.i is\nreturned. If the file node has type CV_NODE_REAL, then node-\\>data.f is converted to an integer\nand returned. Otherwise the error is reported.\n@param node File node\n@param default_value The value that is returned if node is NULL\n */\nCV_INLINE int cvReadInt( const CvFileNode* node, int default_value CV_DEFAULT(0) )\n{\n    return !node ? default_value :\n        CV_NODE_IS_INT(node->tag) ? node->data.i :\n        CV_NODE_IS_REAL(node->tag) ? cvRound(node->data.f) : 0x7fffffff;\n}\n\n/** @brief Finds a file node and returns its value.\n\nThe function is a simple superposition of cvGetFileNodeByName and cvReadInt.\n@param fs File storage\n@param map The parent map. If it is NULL, the function searches a top-level node.\n@param name The node name\n@param default_value The value that is returned if the file node is not found\n */\nCV_INLINE int cvReadIntByName( const CvFileStorage* fs, const CvFileNode* map,\n                         const char* name, int default_value CV_DEFAULT(0) )\n{\n    return cvReadInt( cvGetFileNodeByName( fs, map, name ), default_value );\n}\n\n/** @brief Retrieves a floating-point value from a file node.\n\nThe function returns a floating-point value that is represented by the file node. If the file node\nis NULL, the default_value is returned (thus, it is convenient to call the function right after\ncvGetFileNode without checking for a NULL pointer). If the file node has type CV_NODE_REAL ,\nthen node-\\>data.f is returned. If the file node has type CV_NODE_INT , then node-:math:\\>data.f\nis converted to floating-point and returned. Otherwise the result is not determined.\n@param node File node\n@param default_value The value that is returned if node is NULL\n */\nCV_INLINE double cvReadReal( const CvFileNode* node, double default_value CV_DEFAULT(0.) )\n{\n    return !node ? default_value :\n        CV_NODE_IS_INT(node->tag) ? (double)node->data.i :\n        CV_NODE_IS_REAL(node->tag) ? node->data.f : 1e300;\n}\n\n/** @brief Finds a file node and returns its value.\n\nThe function is a simple superposition of cvGetFileNodeByName and cvReadReal .\n@param fs File storage\n@param map The parent map. If it is NULL, the function searches a top-level node.\n@param name The node name\n@param default_value The value that is returned if the file node is not found\n */\nCV_INLINE double cvReadRealByName( const CvFileStorage* fs, const CvFileNode* map,\n                        const char* name, double default_value CV_DEFAULT(0.) )\n{\n    return cvReadReal( cvGetFileNodeByName( fs, map, name ), default_value );\n}\n\n/** @brief Retrieves a text string from a file node.\n\nThe function returns a text string that is represented by the file node. If the file node is NULL,\nthe default_value is returned (thus, it is convenient to call the function right after\ncvGetFileNode without checking for a NULL pointer). If the file node has type CV_NODE_STR , then\nnode-:math:\\>data.str.ptr is returned. Otherwise the result is not determined.\n@param node File node\n@param default_value The value that is returned if node is NULL\n */\nCV_INLINE const char* cvReadString( const CvFileNode* node,\n                        const char* default_value CV_DEFAULT(NULL) )\n{\n    return !node ? default_value : CV_NODE_IS_STRING(node->tag) ? node->data.str.ptr : 0;\n}\n\n/** @brief Finds a file node by its name and returns its value.\n\nThe function is a simple superposition of cvGetFileNodeByName and cvReadString .\n@param fs File storage\n@param map The parent map. If it is NULL, the function searches a top-level node.\n@param name The node name\n@param default_value The value that is returned if the file node is not found\n */\nCV_INLINE const char* cvReadStringByName( const CvFileStorage* fs, const CvFileNode* map,\n                        const char* name, const char* default_value CV_DEFAULT(NULL) )\n{\n    return cvReadString( cvGetFileNodeByName( fs, map, name ), default_value );\n}\n\n\n/** @brief Decodes an object and returns a pointer to it.\n\nThe function decodes a user object (creates an object in a native representation from the file\nstorage subtree) and returns it. The object to be decoded must be an instance of a registered type\nthat supports the read method (see CvTypeInfo). The type of the object is determined by the type\nname that is encoded in the file. If the object is a dynamic structure, it is created either in\nmemory storage and passed to cvOpenFileStorage or, if a NULL pointer was passed, in temporary\nmemory storage, which is released when cvReleaseFileStorage is called. Otherwise, if the object is\nnot a dynamic structure, it is created in a heap and should be released with a specialized function\nor by using the generic cvRelease.\n@param fs File storage\n@param node The root object node\n@param attributes Unused parameter\n */\nCVAPI(void*) cvRead( CvFileStorage* fs, CvFileNode* node,\n                        CvAttrList* attributes CV_DEFAULT(NULL));\n\n/** @brief Finds an object by name and decodes it.\n\nThe function is a simple superposition of cvGetFileNodeByName and cvRead.\n@param fs File storage\n@param map The parent map. If it is NULL, the function searches a top-level node.\n@param name The node name\n@param attributes Unused parameter\n */\nCV_INLINE void* cvReadByName( CvFileStorage* fs, const CvFileNode* map,\n                              const char* name, CvAttrList* attributes CV_DEFAULT(NULL) )\n{\n    return cvRead( fs, cvGetFileNodeByName( fs, map, name ), attributes );\n}\n\n\n/** @brief Initializes the file node sequence reader.\n\nThe function initializes the sequence reader to read data from a file node. The initialized reader\ncan be then passed to cvReadRawDataSlice.\n@param fs File storage\n@param src The file node (a sequence) to read numbers from\n@param reader Pointer to the sequence reader\n */\nCVAPI(void) cvStartReadRawData( const CvFileStorage* fs, const CvFileNode* src,\n                               CvSeqReader* reader );\n\n/** @brief Initializes file node sequence reader.\n\nThe function reads one or more elements from the file node, representing a sequence, to a\nuser-specified array. The total number of read sequence elements is a product of total and the\nnumber of components in each array element. For example, if dt=2if, the function will read total\\*3\nsequence elements. As with any sequence, some parts of the file node sequence can be skipped or read\nrepeatedly by repositioning the reader using cvSetSeqReaderPos.\n@param fs File storage\n@param reader The sequence reader. Initialize it with cvStartReadRawData .\n@param count The number of elements to read\n@param dst Pointer to the destination array\n@param dt Specification of each array element. It has the same format as in cvWriteRawData .\n */\nCVAPI(void) cvReadRawDataSlice( const CvFileStorage* fs, CvSeqReader* reader,\n                               int count, void* dst, const char* dt );\n\n/** @brief Reads multiple numbers.\n\nThe function reads elements from a file node that represents a sequence of scalars.\n@param fs File storage\n@param src The file node (a sequence) to read numbers from\n@param dst Pointer to the destination array\n@param dt Specification of each array element. It has the same format as in cvWriteRawData .\n */\nCVAPI(void) cvReadRawData( const CvFileStorage* fs, const CvFileNode* src,\n                          void* dst, const char* dt );\n\n/** @brief Writes a file node to another file storage.\n\nThe function writes a copy of a file node to file storage. Possible applications of the function are\nmerging several file storages into one and conversion between XML and YAML formats.\n@param fs Destination file storage\n@param new_node_name New name of the file node in the destination file storage. To keep the\nexisting name, use cvcvGetFileNodeName\n@param node The written node\n@param embed If the written node is a collection and this parameter is not zero, no extra level of\nhierarchy is created. Instead, all the elements of node are written into the currently written\nstructure. Of course, map elements can only be embedded into another map, and sequence elements\ncan only be embedded into another sequence.\n */\nCVAPI(void) cvWriteFileNode( CvFileStorage* fs, const char* new_node_name,\n                            const CvFileNode* node, int embed );\n\n/** @brief Returns the name of a file node.\n\nThe function returns the name of a file node or NULL, if the file node does not have a name or if\nnode is NULL.\n@param node File node\n */\nCVAPI(const char*) cvGetFileNodeName( const CvFileNode* node );\n\n/*********************************** Adding own types ***********************************/\n\n/** @brief Registers a new type.\n\nThe function registers a new type, which is described by info . The function creates a copy of the\nstructure, so the user should delete it after calling the function.\n@param info Type info structure\n */\nCVAPI(void) cvRegisterType( const CvTypeInfo* info );\n\n/** @brief Unregisters the type.\n\nThe function unregisters a type with a specified name. If the name is unknown, it is possible to\nlocate the type info by an instance of the type using cvTypeOf or by iterating the type list,\nstarting from cvFirstType, and then calling cvUnregisterType(info-\\>typeName).\n@param type_name Name of an unregistered type\n */\nCVAPI(void) cvUnregisterType( const char* type_name );\n\n/** @brief Returns the beginning of a type list.\n\nThe function returns the first type in the list of registered types. Navigation through the list can\nbe done via the prev and next fields of the CvTypeInfo structure.\n */\nCVAPI(CvTypeInfo*) cvFirstType(void);\n\n/** @brief Finds a type by its name.\n\nThe function finds a registered type by its name. It returns NULL if there is no type with the\nspecified name.\n@param type_name Type name\n */\nCVAPI(CvTypeInfo*) cvFindType( const char* type_name );\n\n/** @brief Returns the type of an object.\n\nThe function finds the type of a given object. It iterates through the list of registered types and\ncalls the is_instance function/method for every type info structure with that object until one of\nthem returns non-zero or until the whole list has been traversed. In the latter case, the function\nreturns NULL.\n@param struct_ptr The object pointer\n */\nCVAPI(CvTypeInfo*) cvTypeOf( const void* struct_ptr );\n\n/** @brief Releases an object.\n\nThe function finds the type of a given object and calls release with the double pointer.\n@param struct_ptr Double pointer to the object\n */\nCVAPI(void) cvRelease( void** struct_ptr );\n\n/** @brief Makes a clone of an object.\n\nThe function finds the type of a given object and calls clone with the passed object. Of course, if\nyou know the object type, for example, struct_ptr is CvMat\\*, it is faster to call the specific\nfunction, like cvCloneMat.\n@param struct_ptr The object to clone\n */\nCVAPI(void*) cvClone( const void* struct_ptr );\n\n/** @brief Saves an object to a file.\n\nThe function saves an object to a file. It provides a simple interface to cvWrite .\n@param filename File name\n@param struct_ptr Object to save\n@param name Optional object name. If it is NULL, the name will be formed from filename .\n@param comment Optional comment to put in the beginning of the file\n@param attributes Optional attributes passed to cvWrite\n */\nCVAPI(void) cvSave( const char* filename, const void* struct_ptr,\n                    const char* name CV_DEFAULT(NULL),\n                    const char* comment CV_DEFAULT(NULL),\n                    CvAttrList attributes CV_DEFAULT(cvAttrList()));\n\n/** @brief Loads an object from a file.\n\nThe function loads an object from a file. It basically reads the specified file, find the first\ntop-level node and calls cvRead for that node. If the file node does not have type information or\nthe type information can not be found by the type name, the function returns NULL. After the object\nis loaded, the file storage is closed and all the temporary buffers are deleted. Thus, to load a\ndynamic structure, such as a sequence, contour, or graph, one should pass a valid memory storage\ndestination to the function.\n@param filename File name\n@param memstorage Memory storage for dynamic structures, such as CvSeq or CvGraph . It is not used\nfor matrices or images.\n@param name Optional object name. If it is NULL, the first top-level object in the storage will be\nloaded.\n@param real_name Optional output parameter that will contain the name of the loaded object\n(useful if name=NULL )\n */\nCVAPI(void*) cvLoad( const char* filename,\n                     CvMemStorage* memstorage CV_DEFAULT(NULL),\n                     const char* name CV_DEFAULT(NULL),\n                     const char** real_name CV_DEFAULT(NULL) );\n\n/*********************************** Measuring Execution Time ***************************/\n\n/** helper functions for RNG initialization and accurate time measurement:\n   uses internal clock counter on x86 */\nCVAPI(int64)  cvGetTickCount( void );\nCVAPI(double) cvGetTickFrequency( void );\n\n/*********************************** CPU capabilities ***********************************/\n\nCVAPI(int) cvCheckHardwareSupport(int feature);\n\n/*********************************** Multi-Threading ************************************/\n\n/** retrieve/set the number of threads used in OpenMP implementations */\nCVAPI(int)  cvGetNumThreads( void );\nCVAPI(void) cvSetNumThreads( int threads CV_DEFAULT(0) );\n/** get index of the thread being executed */\nCVAPI(int)  cvGetThreadNum( void );\n\n\n/********************************** Error Handling **************************************/\n\n/** Get current OpenCV error status */\nCVAPI(int) cvGetErrStatus( void );\n\n/** Sets error status silently */\nCVAPI(void) cvSetErrStatus( int status );\n\n#define CV_ErrModeLeaf     0   /* Print error and exit program */\n#define CV_ErrModeParent   1   /* Print error and continue */\n#define CV_ErrModeSilent   2   /* Don't print and continue */\n\n/** Retrives current error processing mode */\nCVAPI(int)  cvGetErrMode( void );\n\n/** Sets error processing mode, returns previously used mode */\nCVAPI(int) cvSetErrMode( int mode );\n\n/** Sets error status and performs some additonal actions (displaying message box,\n writing message to stderr, terminating application etc.)\n depending on the current error mode */\nCVAPI(void) cvError( int status, const char* func_name,\n                    const char* err_msg, const char* file_name, int line );\n\n/** Retrieves textual description of the error given its code */\nCVAPI(const char*) cvErrorStr( int status );\n\n/** Retrieves detailed information about the last error occured */\nCVAPI(int) cvGetErrInfo( const char** errcode_desc, const char** description,\n                        const char** filename, int* line );\n\n/** Maps IPP error codes to the counterparts from OpenCV */\nCVAPI(int) cvErrorFromIppStatus( int ipp_status );\n\ntypedef int (CV_CDECL *CvErrorCallback)( int status, const char* func_name,\n                                        const char* err_msg, const char* file_name, int line, void* userdata );\n\n/** Assigns a new error-handling function */\nCVAPI(CvErrorCallback) cvRedirectError( CvErrorCallback error_handler,\n                                       void* userdata CV_DEFAULT(NULL),\n                                       void** prev_userdata CV_DEFAULT(NULL) );\n\n/** Output nothing */\nCVAPI(int) cvNulDevReport( int status, const char* func_name, const char* err_msg,\n                          const char* file_name, int line, void* userdata );\n\n/** Output to console(fprintf(stderr,...)) */\nCVAPI(int) cvStdErrReport( int status, const char* func_name, const char* err_msg,\n                          const char* file_name, int line, void* userdata );\n\n/** Output to MessageBox(WIN32) */\nCVAPI(int) cvGuiBoxReport( int status, const char* func_name, const char* err_msg,\n                          const char* file_name, int line, void* userdata );\n\n#define OPENCV_ERROR(status,func,context)                           \\\ncvError((status),(func),(context),__FILE__,__LINE__)\n\n#define OPENCV_ASSERT(expr,func,context)                            \\\n{if (! (expr))                                      \\\n{OPENCV_ERROR(CV_StsInternal,(func),(context));}}\n\n#define OPENCV_CALL( Func )                                         \\\n{                                                                   \\\nFunc;                                                           \\\n}\n\n\n/** CV_FUNCNAME macro defines icvFuncName constant which is used by CV_ERROR macro */\n#ifdef CV_NO_FUNC_NAMES\n#define CV_FUNCNAME( Name )\n#define cvFuncName \"\"\n#else\n#define CV_FUNCNAME( Name )  \\\nstatic char cvFuncName[] = Name\n#endif\n\n\n/**\n CV_ERROR macro unconditionally raises error with passed code and message.\n After raising error, control will be transferred to the exit label.\n */\n#define CV_ERROR( Code, Msg )                                       \\\n{                                                                   \\\n    cvError( (Code), cvFuncName, Msg, __FILE__, __LINE__ );        \\\n    __CV_EXIT__;                                                   \\\n}\n\n/**\n CV_CHECK macro checks error status after CV (or IPL)\n function call. If error detected, control will be transferred to the exit\n label.\n */\n#define CV_CHECK()                                                  \\\n{                                                                   \\\n    if( cvGetErrStatus() < 0 )                                      \\\n        CV_ERROR( CV_StsBackTrace, \"Inner function failed.\" );      \\\n}\n\n\n/**\n CV_CALL macro calls CV (or IPL) function, checks error status and\n signals a error if the function failed. Useful in \"parent node\"\n error procesing mode\n */\n#define CV_CALL( Func )                                             \\\n{                                                                   \\\n    Func;                                                           \\\n    CV_CHECK();                                                     \\\n}\n\n\n/** Runtime assertion macro */\n#define CV_ASSERT( Condition )                                          \\\n{                                                                       \\\n    if( !(Condition) )                                                  \\\n        CV_ERROR( CV_StsInternal, \"Assertion: \" #Condition \" failed\" ); \\\n}\n\n#define __CV_BEGIN__       {\n#define __CV_END__         goto exit; exit: ; }\n#define __CV_EXIT__        goto exit\n\n/** @} core_c */\n\n#ifdef __cplusplus\n} // extern \"C\"\n#endif\n\n#ifdef __cplusplus\n\n//! @addtogroup core_c_glue\n//! @{\n\n//! class for automatic module/RTTI data registration/unregistration\nstruct CV_EXPORTS CvType\n{\n    CvType( const char* type_name,\n            CvIsInstanceFunc is_instance, CvReleaseFunc release=0,\n            CvReadFunc read=0, CvWriteFunc write=0, CvCloneFunc clone=0 );\n    ~CvType();\n    CvTypeInfo* info;\n\n    static CvTypeInfo* first;\n    static CvTypeInfo* last;\n};\n\n//! @}\n\n#include \"opencv2/core/utility.hpp\"\n\nnamespace cv\n{\n\n//! @addtogroup core_c_glue\n//! @{\n\n/////////////////////////////////////////// glue ///////////////////////////////////////////\n\n//! converts array (CvMat or IplImage) to cv::Mat\nCV_EXPORTS Mat cvarrToMat(const CvArr* arr, bool copyData=false,\n                          bool allowND=true, int coiMode=0,\n                          AutoBuffer<double>* buf=0);\n\nstatic inline Mat cvarrToMatND(const CvArr* arr, bool copyData=false, int coiMode=0)\n{\n    return cvarrToMat(arr, copyData, true, coiMode);\n}\n\n\n//! extracts Channel of Interest from CvMat or IplImage and makes cv::Mat out of it.\nCV_EXPORTS void extractImageCOI(const CvArr* arr, OutputArray coiimg, int coi=-1);\n//! inserts single-channel cv::Mat into a multi-channel CvMat or IplImage\nCV_EXPORTS void insertImageCOI(InputArray coiimg, CvArr* arr, int coi=-1);\n\n\n\n////// specialized implementations of DefaultDeleter::operator() for classic OpenCV types //////\n\ntemplate<> CV_EXPORTS void DefaultDeleter<CvMat>::operator ()(CvMat* obj) const;\ntemplate<> CV_EXPORTS void DefaultDeleter<IplImage>::operator ()(IplImage* obj) const;\ntemplate<> CV_EXPORTS void DefaultDeleter<CvMatND>::operator ()(CvMatND* obj) const;\ntemplate<> CV_EXPORTS void DefaultDeleter<CvSparseMat>::operator ()(CvSparseMat* obj) const;\ntemplate<> CV_EXPORTS void DefaultDeleter<CvMemStorage>::operator ()(CvMemStorage* obj) const;\n\n////////////// convenient wrappers for operating old-style dynamic structures //////////////\n\ntemplate<typename _Tp> class SeqIterator;\n\ntypedef Ptr<CvMemStorage> MemStorage;\n\n/*!\n Template Sequence Class derived from CvSeq\n\n The class provides more convenient access to sequence elements,\n STL-style operations and iterators.\n\n \\note The class is targeted for simple data types,\n    i.e. no constructors or destructors\n    are called for the sequence elements.\n*/\ntemplate<typename _Tp> class Seq\n{\npublic:\n    typedef SeqIterator<_Tp> iterator;\n    typedef SeqIterator<_Tp> const_iterator;\n\n    //! the default constructor\n    Seq();\n    //! the constructor for wrapping CvSeq structure. The real element type in CvSeq should match _Tp.\n    Seq(const CvSeq* seq);\n    //! creates the empty sequence that resides in the specified storage\n    Seq(MemStorage& storage, int headerSize = sizeof(CvSeq));\n    //! returns read-write reference to the specified element\n    _Tp& operator [](int idx);\n    //! returns read-only reference to the specified element\n    const _Tp& operator[](int idx) const;\n    //! returns iterator pointing to the beginning of the sequence\n    SeqIterator<_Tp> begin() const;\n    //! returns iterator pointing to the element following the last sequence element\n    SeqIterator<_Tp> end() const;\n    //! returns the number of elements in the sequence\n    size_t size() const;\n    //! returns the type of sequence elements (CV_8UC1 ... CV_64FC(CV_CN_MAX) ...)\n    int type() const;\n    //! returns the depth of sequence elements (CV_8U ... CV_64F)\n    int depth() const;\n    //! returns the number of channels in each sequence element\n    int channels() const;\n    //! returns the size of each sequence element\n    size_t elemSize() const;\n    //! returns index of the specified sequence element\n    size_t index(const _Tp& elem) const;\n    //! appends the specified element to the end of the sequence\n    void push_back(const _Tp& elem);\n    //! appends the specified element to the front of the sequence\n    void push_front(const _Tp& elem);\n    //! appends zero or more elements to the end of the sequence\n    void push_back(const _Tp* elems, size_t count);\n    //! appends zero or more elements to the front of the sequence\n    void push_front(const _Tp* elems, size_t count);\n    //! inserts the specified element to the specified position\n    void insert(int idx, const _Tp& elem);\n    //! inserts zero or more elements to the specified position\n    void insert(int idx, const _Tp* elems, size_t count);\n    //! removes element at the specified position\n    void remove(int idx);\n    //! removes the specified subsequence\n    void remove(const Range& r);\n\n    //! returns reference to the first sequence element\n    _Tp& front();\n    //! returns read-only reference to the first sequence element\n    const _Tp& front() const;\n    //! returns reference to the last sequence element\n    _Tp& back();\n    //! returns read-only reference to the last sequence element\n    const _Tp& back() const;\n    //! returns true iff the sequence contains no elements\n    bool empty() const;\n\n    //! removes all the elements from the sequence\n    void clear();\n    //! removes the first element from the sequence\n    void pop_front();\n    //! removes the last element from the sequence\n    void pop_back();\n    //! removes zero or more elements from the beginning of the sequence\n    void pop_front(_Tp* elems, size_t count);\n    //! removes zero or more elements from the end of the sequence\n    void pop_back(_Tp* elems, size_t count);\n\n    //! copies the whole sequence or the sequence slice to the specified vector\n    void copyTo(std::vector<_Tp>& vec, const Range& range=Range::all()) const;\n    //! returns the vector containing all the sequence elements\n    operator std::vector<_Tp>() const;\n\n    CvSeq* seq;\n};\n\n\n/*!\n STL-style Sequence Iterator inherited from the CvSeqReader structure\n*/\ntemplate<typename _Tp> class SeqIterator : public CvSeqReader\n{\npublic:\n    //! the default constructor\n    SeqIterator();\n    //! the constructor setting the iterator to the beginning or to the end of the sequence\n    SeqIterator(const Seq<_Tp>& seq, bool seekEnd=false);\n    //! positions the iterator within the sequence\n    void seek(size_t pos);\n    //! reports the current iterator position\n    size_t tell() const;\n    //! returns reference to the current sequence element\n    _Tp& operator *();\n    //! returns read-only reference to the current sequence element\n    const _Tp& operator *() const;\n    //! moves iterator to the next sequence element\n    SeqIterator& operator ++();\n    //! moves iterator to the next sequence element\n    SeqIterator operator ++(int) const;\n    //! moves iterator to the previous sequence element\n    SeqIterator& operator --();\n    //! moves iterator to the previous sequence element\n    SeqIterator operator --(int) const;\n\n    //! moves iterator forward by the specified offset (possibly negative)\n    SeqIterator& operator +=(int);\n    //! moves iterator backward by the specified offset (possibly negative)\n    SeqIterator& operator -=(int);\n\n    // this is index of the current element module seq->total*2\n    // (to distinguish between 0 and seq->total)\n    int index;\n};\n\n\n\n// bridge C++ => C Seq API\nCV_EXPORTS schar*  seqPush( CvSeq* seq, const void* element=0);\nCV_EXPORTS schar*  seqPushFront( CvSeq* seq, const void* element=0);\nCV_EXPORTS void  seqPop( CvSeq* seq, void* element=0);\nCV_EXPORTS void  seqPopFront( CvSeq* seq, void* element=0);\nCV_EXPORTS void  seqPopMulti( CvSeq* seq, void* elements,\n                              int count, int in_front=0 );\nCV_EXPORTS void  seqRemove( CvSeq* seq, int index );\nCV_EXPORTS void  clearSeq( CvSeq* seq );\nCV_EXPORTS schar*  getSeqElem( const CvSeq* seq, int index );\nCV_EXPORTS void  seqRemoveSlice( CvSeq* seq, CvSlice slice );\nCV_EXPORTS void  seqInsertSlice( CvSeq* seq, int before_index, const CvArr* from_arr );\n\ntemplate<typename _Tp> inline Seq<_Tp>::Seq() : seq(0) {}\ntemplate<typename _Tp> inline Seq<_Tp>::Seq( const CvSeq* _seq ) : seq((CvSeq*)_seq)\n{\n    CV_Assert(!_seq || _seq->elem_size == sizeof(_Tp));\n}\n\ntemplate<typename _Tp> inline Seq<_Tp>::Seq( MemStorage& storage,\n                                             int headerSize )\n{\n    CV_Assert(headerSize >= (int)sizeof(CvSeq));\n    seq = cvCreateSeq(DataType<_Tp>::type, headerSize, sizeof(_Tp), storage);\n}\n\ntemplate<typename _Tp> inline _Tp& Seq<_Tp>::operator [](int idx)\n{ return *(_Tp*)getSeqElem(seq, idx); }\n\ntemplate<typename _Tp> inline const _Tp& Seq<_Tp>::operator [](int idx) const\n{ return *(_Tp*)getSeqElem(seq, idx); }\n\ntemplate<typename _Tp> inline SeqIterator<_Tp> Seq<_Tp>::begin() const\n{ return SeqIterator<_Tp>(*this); }\n\ntemplate<typename _Tp> inline SeqIterator<_Tp> Seq<_Tp>::end() const\n{ return SeqIterator<_Tp>(*this, true); }\n\ntemplate<typename _Tp> inline size_t Seq<_Tp>::size() const\n{ return seq ? seq->total : 0; }\n\ntemplate<typename _Tp> inline int Seq<_Tp>::type() const\n{ return seq ? CV_MAT_TYPE(seq->flags) : 0; }\n\ntemplate<typename _Tp> inline int Seq<_Tp>::depth() const\n{ return seq ? CV_MAT_DEPTH(seq->flags) : 0; }\n\ntemplate<typename _Tp> inline int Seq<_Tp>::channels() const\n{ return seq ? CV_MAT_CN(seq->flags) : 0; }\n\ntemplate<typename _Tp> inline size_t Seq<_Tp>::elemSize() const\n{ return seq ? seq->elem_size : 0; }\n\ntemplate<typename _Tp> inline size_t Seq<_Tp>::index(const _Tp& elem) const\n{ return cvSeqElemIdx(seq, &elem); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::push_back(const _Tp& elem)\n{ cvSeqPush(seq, &elem); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::push_front(const _Tp& elem)\n{ cvSeqPushFront(seq, &elem); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::push_back(const _Tp* elem, size_t count)\n{ cvSeqPushMulti(seq, elem, (int)count, 0); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::push_front(const _Tp* elem, size_t count)\n{ cvSeqPushMulti(seq, elem, (int)count, 1); }\n\ntemplate<typename _Tp> inline _Tp& Seq<_Tp>::back()\n{ return *(_Tp*)getSeqElem(seq, -1); }\n\ntemplate<typename _Tp> inline const _Tp& Seq<_Tp>::back() const\n{ return *(const _Tp*)getSeqElem(seq, -1); }\n\ntemplate<typename _Tp> inline _Tp& Seq<_Tp>::front()\n{ return *(_Tp*)getSeqElem(seq, 0); }\n\ntemplate<typename _Tp> inline const _Tp& Seq<_Tp>::front() const\n{ return *(const _Tp*)getSeqElem(seq, 0); }\n\ntemplate<typename _Tp> inline bool Seq<_Tp>::empty() const\n{ return !seq || seq->total == 0; }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::clear()\n{ if(seq) clearSeq(seq); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::pop_back()\n{ seqPop(seq); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::pop_front()\n{ seqPopFront(seq); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::pop_back(_Tp* elem, size_t count)\n{ seqPopMulti(seq, elem, (int)count, 0); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::pop_front(_Tp* elem, size_t count)\n{ seqPopMulti(seq, elem, (int)count, 1); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::insert(int idx, const _Tp& elem)\n{ seqInsert(seq, idx, &elem); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::insert(int idx, const _Tp* elems, size_t count)\n{\n    CvMat m = cvMat(1, count, DataType<_Tp>::type, elems);\n    seqInsertSlice(seq, idx, &m);\n}\n\ntemplate<typename _Tp> inline void Seq<_Tp>::remove(int idx)\n{ seqRemove(seq, idx); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::remove(const Range& r)\n{ seqRemoveSlice(seq, cvSlice(r.start, r.end)); }\n\ntemplate<typename _Tp> inline void Seq<_Tp>::copyTo(std::vector<_Tp>& vec, const Range& range) const\n{\n    size_t len = !seq ? 0 : range == Range::all() ? seq->total : range.end - range.start;\n    vec.resize(len);\n    if( seq && len )\n        cvCvtSeqToArray(seq, &vec[0], range);\n}\n\ntemplate<typename _Tp> inline Seq<_Tp>::operator std::vector<_Tp>() const\n{\n    std::vector<_Tp> vec;\n    copyTo(vec);\n    return vec;\n}\n\ntemplate<typename _Tp> inline SeqIterator<_Tp>::SeqIterator()\n{ memset(this, 0, sizeof(*this)); }\n\ntemplate<typename _Tp> inline SeqIterator<_Tp>::SeqIterator(const Seq<_Tp>& _seq, bool seekEnd)\n{\n    cvStartReadSeq(_seq.seq, this);\n    index = seekEnd ? _seq.seq->total : 0;\n}\n\ntemplate<typename _Tp> inline void SeqIterator<_Tp>::seek(size_t pos)\n{\n    cvSetSeqReaderPos(this, (int)pos, false);\n    index = pos;\n}\n\ntemplate<typename _Tp> inline size_t SeqIterator<_Tp>::tell() const\n{ return index; }\n\ntemplate<typename _Tp> inline _Tp& SeqIterator<_Tp>::operator *()\n{ return *(_Tp*)ptr; }\n\ntemplate<typename _Tp> inline const _Tp& SeqIterator<_Tp>::operator *() const\n{ return *(const _Tp*)ptr; }\n\ntemplate<typename _Tp> inline SeqIterator<_Tp>& SeqIterator<_Tp>::operator ++()\n{\n    CV_NEXT_SEQ_ELEM(sizeof(_Tp), *this);\n    if( ++index >= seq->total*2 )\n        index = 0;\n    return *this;\n}\n\ntemplate<typename _Tp> inline SeqIterator<_Tp> SeqIterator<_Tp>::operator ++(int) const\n{\n    SeqIterator<_Tp> it = *this;\n    ++*this;\n    return it;\n}\n\ntemplate<typename _Tp> inline SeqIterator<_Tp>& SeqIterator<_Tp>::operator --()\n{\n    CV_PREV_SEQ_ELEM(sizeof(_Tp), *this);\n    if( --index < 0 )\n        index = seq->total*2-1;\n    return *this;\n}\n\ntemplate<typename _Tp> inline SeqIterator<_Tp> SeqIterator<_Tp>::operator --(int) const\n{\n    SeqIterator<_Tp> it = *this;\n    --*this;\n    return it;\n}\n\ntemplate<typename _Tp> inline SeqIterator<_Tp>& SeqIterator<_Tp>::operator +=(int delta)\n{\n    cvSetSeqReaderPos(this, delta, 1);\n    index += delta;\n    int n = seq->total*2;\n    if( index < 0 )\n        index += n;\n    if( index >= n )\n        index -= n;\n    return *this;\n}\n\ntemplate<typename _Tp> inline SeqIterator<_Tp>& SeqIterator<_Tp>::operator -=(int delta)\n{\n    return (*this += -delta);\n}\n\ntemplate<typename _Tp> inline ptrdiff_t operator - (const SeqIterator<_Tp>& a,\n                                                    const SeqIterator<_Tp>& b)\n{\n    ptrdiff_t delta = a.index - b.index, n = a.seq->total;\n    if( delta > n || delta < -n )\n        delta += delta < 0 ? n : -n;\n    return delta;\n}\n\ntemplate<typename _Tp> inline bool operator == (const SeqIterator<_Tp>& a,\n                                                const SeqIterator<_Tp>& b)\n{\n    return a.seq == b.seq && a.index == b.index;\n}\n\ntemplate<typename _Tp> inline bool operator != (const SeqIterator<_Tp>& a,\n                                                const SeqIterator<_Tp>& b)\n{\n    return !(a == b);\n}\n\n//! @}\n\n} // cv\n\n#endif\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/block.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_DEVICE_BLOCK_HPP__\n#define __OPENCV_CUDA_DEVICE_BLOCK_HPP__\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    struct Block\n    {\n        static __device__ __forceinline__ unsigned int id()\n        {\n            return blockIdx.x;\n        }\n\n        static __device__ __forceinline__ unsigned int stride()\n        {\n            return blockDim.x * blockDim.y * blockDim.z;\n        }\n\n        static __device__ __forceinline__ void sync()\n        {\n            __syncthreads();\n        }\n\n        static __device__ __forceinline__ int flattenedThreadId()\n        {\n            return threadIdx.z * blockDim.x * blockDim.y + threadIdx.y * blockDim.x + threadIdx.x;\n        }\n\n        template<typename It, typename T>\n        static __device__ __forceinline__ void fill(It beg, It end, const T& value)\n        {\n            int STRIDE = stride();\n            It t = beg + flattenedThreadId();\n\n            for(; t < end; t += STRIDE)\n                *t = value;\n        }\n\n        template<typename OutIt, typename T>\n        static __device__ __forceinline__ void yota(OutIt beg, OutIt end, T value)\n        {\n            int STRIDE = stride();\n            int tid = flattenedThreadId();\n            value += tid;\n\n            for(OutIt t = beg + tid; t < end; t += STRIDE, value += STRIDE)\n                *t = value;\n        }\n\n        template<typename InIt, typename OutIt>\n        static __device__ __forceinline__ void copy(InIt beg, InIt end, OutIt out)\n        {\n            int STRIDE = stride();\n            InIt  t = beg + flattenedThreadId();\n            OutIt o = out + (t - beg);\n\n            for(; t < end; t += STRIDE, o += STRIDE)\n                *o = *t;\n        }\n\n        template<typename InIt, typename OutIt, class UnOp>\n        static __device__ __forceinline__ void transfrom(InIt beg, InIt end, OutIt out, UnOp op)\n        {\n            int STRIDE = stride();\n            InIt  t = beg + flattenedThreadId();\n            OutIt o = out + (t - beg);\n\n            for(; t < end; t += STRIDE, o += STRIDE)\n                *o = op(*t);\n        }\n\n        template<typename InIt1, typename InIt2, typename OutIt, class BinOp>\n        static __device__ __forceinline__ void transfrom(InIt1 beg1, InIt1 end1, InIt2 beg2, OutIt out, BinOp op)\n        {\n            int STRIDE = stride();\n            InIt1 t1 = beg1 + flattenedThreadId();\n            InIt2 t2 = beg2 + flattenedThreadId();\n            OutIt o  = out + (t1 - beg1);\n\n            for(; t1 < end1; t1 += STRIDE, t2 += STRIDE, o += STRIDE)\n                *o = op(*t1, *t2);\n        }\n\n        template<int CTA_SIZE, typename T, class BinOp>\n        static __device__ __forceinline__ void reduce(volatile T* buffer, BinOp op)\n        {\n            int tid = flattenedThreadId();\n            T val =  buffer[tid];\n\n            if (CTA_SIZE >= 1024) { if (tid < 512) buffer[tid] = val = op(val, buffer[tid + 512]); __syncthreads(); }\n            if (CTA_SIZE >=  512) { if (tid < 256) buffer[tid] = val = op(val, buffer[tid + 256]); __syncthreads(); }\n            if (CTA_SIZE >=  256) { if (tid < 128) buffer[tid] = val = op(val, buffer[tid + 128]); __syncthreads(); }\n            if (CTA_SIZE >=  128) { if (tid <  64) buffer[tid] = val = op(val, buffer[tid +  64]); __syncthreads(); }\n\n            if (tid < 32)\n            {\n                if (CTA_SIZE >=   64) { buffer[tid] = val = op(val, buffer[tid +  32]); }\n                if (CTA_SIZE >=   32) { buffer[tid] = val = op(val, buffer[tid +  16]); }\n                if (CTA_SIZE >=   16) { buffer[tid] = val = op(val, buffer[tid +   8]); }\n                if (CTA_SIZE >=    8) { buffer[tid] = val = op(val, buffer[tid +   4]); }\n                if (CTA_SIZE >=    4) { buffer[tid] = val = op(val, buffer[tid +   2]); }\n                if (CTA_SIZE >=    2) { buffer[tid] = val = op(val, buffer[tid +   1]); }\n            }\n        }\n\n        template<int CTA_SIZE, typename T, class BinOp>\n        static __device__ __forceinline__ T reduce(volatile T* buffer, T init, BinOp op)\n        {\n            int tid = flattenedThreadId();\n            T val =  buffer[tid] = init;\n            __syncthreads();\n\n            if (CTA_SIZE >= 1024) { if (tid < 512) buffer[tid] = val = op(val, buffer[tid + 512]); __syncthreads(); }\n            if (CTA_SIZE >=  512) { if (tid < 256) buffer[tid] = val = op(val, buffer[tid + 256]); __syncthreads(); }\n            if (CTA_SIZE >=  256) { if (tid < 128) buffer[tid] = val = op(val, buffer[tid + 128]); __syncthreads(); }\n            if (CTA_SIZE >=  128) { if (tid <  64) buffer[tid] = val = op(val, buffer[tid +  64]); __syncthreads(); }\n\n            if (tid < 32)\n            {\n                if (CTA_SIZE >=   64) { buffer[tid] = val = op(val, buffer[tid +  32]); }\n                if (CTA_SIZE >=   32) { buffer[tid] = val = op(val, buffer[tid +  16]); }\n                if (CTA_SIZE >=   16) { buffer[tid] = val = op(val, buffer[tid +   8]); }\n                if (CTA_SIZE >=    8) { buffer[tid] = val = op(val, buffer[tid +   4]); }\n                if (CTA_SIZE >=    4) { buffer[tid] = val = op(val, buffer[tid +   2]); }\n                if (CTA_SIZE >=    2) { buffer[tid] = val = op(val, buffer[tid +   1]); }\n            }\n            __syncthreads();\n            return buffer[0];\n        }\n\n        template <typename T, class BinOp>\n        static __device__ __forceinline__ void reduce_n(T* data, unsigned int n, BinOp op)\n        {\n            int ftid = flattenedThreadId();\n            int sft = stride();\n\n            if (sft < n)\n            {\n                for (unsigned int i = sft + ftid; i < n; i += sft)\n                    data[ftid] = op(data[ftid], data[i]);\n\n                __syncthreads();\n\n                n = sft;\n            }\n\n            while (n > 1)\n            {\n                unsigned int half = n/2;\n\n                if (ftid < half)\n                    data[ftid] = op(data[ftid], data[n - ftid - 1]);\n\n                __syncthreads();\n\n                n = n - half;\n            }\n        }\n    };\n}}}\n\n//! @endcond\n\n#endif /* __OPENCV_CUDA_DEVICE_BLOCK_HPP__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/border_interpolate.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_BORDER_INTERPOLATE_HPP__\n#define __OPENCV_CUDA_BORDER_INTERPOLATE_HPP__\n\n#include \"saturate_cast.hpp\"\n#include \"vec_traits.hpp\"\n#include \"vec_math.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    //////////////////////////////////////////////////////////////\n    // BrdConstant\n\n    template <typename D> struct BrdRowConstant\n    {\n        typedef D result_type;\n\n        explicit __host__ __device__ __forceinline__ BrdRowConstant(int width_, const D& val_ = VecTraits<D>::all(0)) : width(width_), val(val_) {}\n\n        template <typename T> __device__ __forceinline__ D at_low(int x, const T* data) const\n        {\n            return x >= 0 ? saturate_cast<D>(data[x]) : val;\n        }\n\n        template <typename T> __device__ __forceinline__ D at_high(int x, const T* data) const\n        {\n            return x < width ? saturate_cast<D>(data[x]) : val;\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int x, const T* data) const\n        {\n            return (x >= 0 && x < width) ? saturate_cast<D>(data[x]) : val;\n        }\n\n        int width;\n        D val;\n    };\n\n    template <typename D> struct BrdColConstant\n    {\n        typedef D result_type;\n\n        explicit __host__ __device__ __forceinline__ BrdColConstant(int height_, const D& val_ = VecTraits<D>::all(0)) : height(height_), val(val_) {}\n\n        template <typename T> __device__ __forceinline__ D at_low(int y, const T* data, size_t step) const\n        {\n            return y >= 0 ? saturate_cast<D>(*(const T*)((const char*)data + y * step)) : val;\n        }\n\n        template <typename T> __device__ __forceinline__ D at_high(int y, const T* data, size_t step) const\n        {\n            return y < height ? saturate_cast<D>(*(const T*)((const char*)data + y * step)) : val;\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int y, const T* data, size_t step) const\n        {\n            return (y >= 0 && y < height) ? saturate_cast<D>(*(const T*)((const char*)data + y * step)) : val;\n        }\n\n        int height;\n        D val;\n    };\n\n    template <typename D> struct BrdConstant\n    {\n        typedef D result_type;\n\n        __host__ __device__ __forceinline__ BrdConstant(int height_, int width_, const D& val_ = VecTraits<D>::all(0)) : height(height_), width(width_), val(val_)\n        {\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int y, int x, const T* data, size_t step) const\n        {\n            return (x >= 0 && x < width && y >= 0 && y < height) ? saturate_cast<D>(((const T*)((const uchar*)data + y * step))[x]) : val;\n        }\n\n        template <typename Ptr2D> __device__ __forceinline__ D at(typename Ptr2D::index_type y, typename Ptr2D::index_type x, const Ptr2D& src) const\n        {\n            return (x >= 0 && x < width && y >= 0 && y < height) ? saturate_cast<D>(src(y, x)) : val;\n        }\n\n        int height;\n        int width;\n        D val;\n    };\n\n    //////////////////////////////////////////////////////////////\n    // BrdReplicate\n\n    template <typename D> struct BrdRowReplicate\n    {\n        typedef D result_type;\n\n        explicit __host__ __device__ __forceinline__ BrdRowReplicate(int width) : last_col(width - 1) {}\n        template <typename U> __host__ __device__ __forceinline__ BrdRowReplicate(int width, U) : last_col(width - 1) {}\n\n        __device__ __forceinline__ int idx_col_low(int x) const\n        {\n            return ::max(x, 0);\n        }\n\n        __device__ __forceinline__ int idx_col_high(int x) const\n        {\n            return ::min(x, last_col);\n        }\n\n        __device__ __forceinline__ int idx_col(int x) const\n        {\n            return idx_col_low(idx_col_high(x));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_low(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col_low(x)]);\n        }\n\n        template <typename T> __device__ __forceinline__ D at_high(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col_high(x)]);\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col(x)]);\n        }\n\n        int last_col;\n    };\n\n    template <typename D> struct BrdColReplicate\n    {\n        typedef D result_type;\n\n        explicit __host__ __device__ __forceinline__ BrdColReplicate(int height) : last_row(height - 1) {}\n        template <typename U> __host__ __device__ __forceinline__ BrdColReplicate(int height, U) : last_row(height - 1) {}\n\n        __device__ __forceinline__ int idx_row_low(int y) const\n        {\n            return ::max(y, 0);\n        }\n\n        __device__ __forceinline__ int idx_row_high(int y) const\n        {\n            return ::min(y, last_row);\n        }\n\n        __device__ __forceinline__ int idx_row(int y) const\n        {\n            return idx_row_low(idx_row_high(y));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_low(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const T*)((const char*)data + idx_row_low(y) * step));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_high(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const T*)((const char*)data + idx_row_high(y) * step));\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const T*)((const char*)data + idx_row(y) * step));\n        }\n\n        int last_row;\n    };\n\n    template <typename D> struct BrdReplicate\n    {\n        typedef D result_type;\n\n        __host__ __device__ __forceinline__ BrdReplicate(int height, int width) : last_row(height - 1), last_col(width - 1) {}\n        template <typename U> __host__ __device__ __forceinline__ BrdReplicate(int height, int width, U) : last_row(height - 1), last_col(width - 1) {}\n\n        __device__ __forceinline__ int idx_row_low(int y) const\n        {\n            return ::max(y, 0);\n        }\n\n        __device__ __forceinline__ int idx_row_high(int y) const\n        {\n            return ::min(y, last_row);\n        }\n\n        __device__ __forceinline__ int idx_row(int y) const\n        {\n            return idx_row_low(idx_row_high(y));\n        }\n\n        __device__ __forceinline__ int idx_col_low(int x) const\n        {\n            return ::max(x, 0);\n        }\n\n        __device__ __forceinline__ int idx_col_high(int x) const\n        {\n            return ::min(x, last_col);\n        }\n\n        __device__ __forceinline__ int idx_col(int x) const\n        {\n            return idx_col_low(idx_col_high(x));\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int y, int x, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(((const T*)((const char*)data + idx_row(y) * step))[idx_col(x)]);\n        }\n\n        template <typename Ptr2D> __device__ __forceinline__ D at(typename Ptr2D::index_type y, typename Ptr2D::index_type x, const Ptr2D& src) const\n        {\n            return saturate_cast<D>(src(idx_row(y), idx_col(x)));\n        }\n\n        int last_row;\n        int last_col;\n    };\n\n    //////////////////////////////////////////////////////////////\n    // BrdReflect101\n\n    template <typename D> struct BrdRowReflect101\n    {\n        typedef D result_type;\n\n        explicit __host__ __device__ __forceinline__ BrdRowReflect101(int width) : last_col(width - 1) {}\n        template <typename U> __host__ __device__ __forceinline__ BrdRowReflect101(int width, U) : last_col(width - 1) {}\n\n        __device__ __forceinline__ int idx_col_low(int x) const\n        {\n            return ::abs(x) % (last_col + 1);\n        }\n\n        __device__ __forceinline__ int idx_col_high(int x) const\n        {\n            return ::abs(last_col - ::abs(last_col - x)) % (last_col + 1);\n        }\n\n        __device__ __forceinline__ int idx_col(int x) const\n        {\n            return idx_col_low(idx_col_high(x));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_low(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col_low(x)]);\n        }\n\n        template <typename T> __device__ __forceinline__ D at_high(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col_high(x)]);\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col(x)]);\n        }\n\n        int last_col;\n    };\n\n    template <typename D> struct BrdColReflect101\n    {\n        typedef D result_type;\n\n        explicit __host__ __device__ __forceinline__ BrdColReflect101(int height) : last_row(height - 1) {}\n        template <typename U> __host__ __device__ __forceinline__ BrdColReflect101(int height, U) : last_row(height - 1) {}\n\n        __device__ __forceinline__ int idx_row_low(int y) const\n        {\n            return ::abs(y) % (last_row + 1);\n        }\n\n        __device__ __forceinline__ int idx_row_high(int y) const\n        {\n            return ::abs(last_row - ::abs(last_row - y)) % (last_row + 1);\n        }\n\n        __device__ __forceinline__ int idx_row(int y) const\n        {\n            return idx_row_low(idx_row_high(y));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_low(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const D*)((const char*)data + idx_row_low(y) * step));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_high(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const D*)((const char*)data + idx_row_high(y) * step));\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const D*)((const char*)data + idx_row(y) * step));\n        }\n\n        int last_row;\n    };\n\n    template <typename D> struct BrdReflect101\n    {\n        typedef D result_type;\n\n        __host__ __device__ __forceinline__ BrdReflect101(int height, int width) : last_row(height - 1), last_col(width - 1) {}\n        template <typename U> __host__ __device__ __forceinline__ BrdReflect101(int height, int width, U) : last_row(height - 1), last_col(width - 1) {}\n\n        __device__ __forceinline__ int idx_row_low(int y) const\n        {\n            return ::abs(y) % (last_row + 1);\n        }\n\n        __device__ __forceinline__ int idx_row_high(int y) const\n        {\n            return ::abs(last_row - ::abs(last_row - y)) % (last_row + 1);\n        }\n\n        __device__ __forceinline__ int idx_row(int y) const\n        {\n            return idx_row_low(idx_row_high(y));\n        }\n\n        __device__ __forceinline__ int idx_col_low(int x) const\n        {\n            return ::abs(x) % (last_col + 1);\n        }\n\n        __device__ __forceinline__ int idx_col_high(int x) const\n        {\n            return ::abs(last_col - ::abs(last_col - x)) % (last_col + 1);\n        }\n\n        __device__ __forceinline__ int idx_col(int x) const\n        {\n            return idx_col_low(idx_col_high(x));\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int y, int x, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(((const T*)((const char*)data + idx_row(y) * step))[idx_col(x)]);\n        }\n\n        template <typename Ptr2D> __device__ __forceinline__ D at(typename Ptr2D::index_type y, typename Ptr2D::index_type x, const Ptr2D& src) const\n        {\n            return saturate_cast<D>(src(idx_row(y), idx_col(x)));\n        }\n\n        int last_row;\n        int last_col;\n    };\n\n    //////////////////////////////////////////////////////////////\n    // BrdReflect\n\n    template <typename D> struct BrdRowReflect\n    {\n        typedef D result_type;\n\n        explicit __host__ __device__ __forceinline__ BrdRowReflect(int width) : last_col(width - 1) {}\n        template <typename U> __host__ __device__ __forceinline__ BrdRowReflect(int width, U) : last_col(width - 1) {}\n\n        __device__ __forceinline__ int idx_col_low(int x) const\n        {\n            return (::abs(x) - (x < 0)) % (last_col + 1);\n        }\n\n        __device__ __forceinline__ int idx_col_high(int x) const\n        {\n            return ::abs(last_col - ::abs(last_col - x) + (x > last_col)) % (last_col + 1);\n        }\n\n        __device__ __forceinline__ int idx_col(int x) const\n        {\n            return idx_col_high(::abs(x) - (x < 0));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_low(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col_low(x)]);\n        }\n\n        template <typename T> __device__ __forceinline__ D at_high(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col_high(x)]);\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col(x)]);\n        }\n\n        int last_col;\n    };\n\n    template <typename D> struct BrdColReflect\n    {\n        typedef D result_type;\n\n        explicit __host__ __device__ __forceinline__ BrdColReflect(int height) : last_row(height - 1) {}\n        template <typename U> __host__ __device__ __forceinline__ BrdColReflect(int height, U) : last_row(height - 1) {}\n\n        __device__ __forceinline__ int idx_row_low(int y) const\n        {\n            return (::abs(y) - (y < 0)) % (last_row + 1);\n        }\n\n        __device__ __forceinline__ int idx_row_high(int y) const\n        {\n            return ::abs(last_row - ::abs(last_row - y) + (y > last_row)) % (last_row + 1);\n        }\n\n        __device__ __forceinline__ int idx_row(int y) const\n        {\n            return idx_row_high(::abs(y) - (y < 0));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_low(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const D*)((const char*)data + idx_row_low(y) * step));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_high(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const D*)((const char*)data + idx_row_high(y) * step));\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const D*)((const char*)data + idx_row(y) * step));\n        }\n\n        int last_row;\n    };\n\n    template <typename D> struct BrdReflect\n    {\n        typedef D result_type;\n\n        __host__ __device__ __forceinline__ BrdReflect(int height, int width) : last_row(height - 1), last_col(width - 1) {}\n        template <typename U> __host__ __device__ __forceinline__ BrdReflect(int height, int width, U) : last_row(height - 1), last_col(width - 1) {}\n\n        __device__ __forceinline__ int idx_row_low(int y) const\n        {\n            return (::abs(y) - (y < 0)) % (last_row + 1);\n        }\n\n        __device__ __forceinline__ int idx_row_high(int y) const\n        {\n            return /*::abs*/(last_row - ::abs(last_row - y) + (y > last_row)) /*% (last_row + 1)*/;\n        }\n\n        __device__ __forceinline__ int idx_row(int y) const\n        {\n            return idx_row_low(idx_row_high(y));\n        }\n\n        __device__ __forceinline__ int idx_col_low(int x) const\n        {\n            return (::abs(x) - (x < 0)) % (last_col + 1);\n        }\n\n        __device__ __forceinline__ int idx_col_high(int x) const\n        {\n            return (last_col - ::abs(last_col - x) + (x > last_col));\n        }\n\n        __device__ __forceinline__ int idx_col(int x) const\n        {\n            return idx_col_low(idx_col_high(x));\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int y, int x, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(((const T*)((const char*)data + idx_row(y) * step))[idx_col(x)]);\n        }\n\n        template <typename Ptr2D> __device__ __forceinline__ D at(typename Ptr2D::index_type y, typename Ptr2D::index_type x, const Ptr2D& src) const\n        {\n            return saturate_cast<D>(src(idx_row(y), idx_col(x)));\n        }\n\n        int last_row;\n        int last_col;\n    };\n\n    //////////////////////////////////////////////////////////////\n    // BrdWrap\n\n    template <typename D> struct BrdRowWrap\n    {\n        typedef D result_type;\n\n        explicit __host__ __device__ __forceinline__ BrdRowWrap(int width_) : width(width_) {}\n        template <typename U> __host__ __device__ __forceinline__ BrdRowWrap(int width_, U) : width(width_) {}\n\n        __device__ __forceinline__ int idx_col_low(int x) const\n        {\n            return (x >= 0) * x + (x < 0) * (x - ((x - width + 1) / width) * width);\n        }\n\n        __device__ __forceinline__ int idx_col_high(int x) const\n        {\n            return (x < width) * x + (x >= width) * (x % width);\n        }\n\n        __device__ __forceinline__ int idx_col(int x) const\n        {\n            return idx_col_high(idx_col_low(x));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_low(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col_low(x)]);\n        }\n\n        template <typename T> __device__ __forceinline__ D at_high(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col_high(x)]);\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int x, const T* data) const\n        {\n            return saturate_cast<D>(data[idx_col(x)]);\n        }\n\n        int width;\n    };\n\n    template <typename D> struct BrdColWrap\n    {\n        typedef D result_type;\n\n        explicit __host__ __device__ __forceinline__ BrdColWrap(int height_) : height(height_) {}\n        template <typename U> __host__ __device__ __forceinline__ BrdColWrap(int height_, U) : height(height_) {}\n\n        __device__ __forceinline__ int idx_row_low(int y) const\n        {\n            return (y >= 0) * y + (y < 0) * (y - ((y - height + 1) / height) * height);\n        }\n\n        __device__ __forceinline__ int idx_row_high(int y) const\n        {\n            return (y < height) * y + (y >= height) * (y % height);\n        }\n\n        __device__ __forceinline__ int idx_row(int y) const\n        {\n            return idx_row_high(idx_row_low(y));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_low(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const D*)((const char*)data + idx_row_low(y) * step));\n        }\n\n        template <typename T> __device__ __forceinline__ D at_high(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const D*)((const char*)data + idx_row_high(y) * step));\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int y, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(*(const D*)((const char*)data + idx_row(y) * step));\n        }\n\n        int height;\n    };\n\n    template <typename D> struct BrdWrap\n    {\n        typedef D result_type;\n\n        __host__ __device__ __forceinline__ BrdWrap(int height_, int width_) :\n            height(height_), width(width_)\n        {\n        }\n        template <typename U>\n        __host__ __device__ __forceinline__ BrdWrap(int height_, int width_, U) :\n            height(height_), width(width_)\n        {\n        }\n\n        __device__ __forceinline__ int idx_row_low(int y) const\n        {\n            return (y >= 0) * y + (y < 0) * (y - ((y - height + 1) / height) * height);\n        }\n\n        __device__ __forceinline__ int idx_row_high(int y) const\n        {\n            return (y < height) * y + (y >= height) * (y % height);\n        }\n\n        __device__ __forceinline__ int idx_row(int y) const\n        {\n            return idx_row_high(idx_row_low(y));\n        }\n\n        __device__ __forceinline__ int idx_col_low(int x) const\n        {\n            return (x >= 0) * x + (x < 0) * (x - ((x - width + 1) / width) * width);\n        }\n\n        __device__ __forceinline__ int idx_col_high(int x) const\n        {\n            return (x < width) * x + (x >= width) * (x % width);\n        }\n\n        __device__ __forceinline__ int idx_col(int x) const\n        {\n            return idx_col_high(idx_col_low(x));\n        }\n\n        template <typename T> __device__ __forceinline__ D at(int y, int x, const T* data, size_t step) const\n        {\n            return saturate_cast<D>(((const T*)((const char*)data + idx_row(y) * step))[idx_col(x)]);\n        }\n\n        template <typename Ptr2D> __device__ __forceinline__ D at(typename Ptr2D::index_type y, typename Ptr2D::index_type x, const Ptr2D& src) const\n        {\n            return saturate_cast<D>(src(idx_row(y), idx_col(x)));\n        }\n\n        int height;\n        int width;\n    };\n\n    //////////////////////////////////////////////////////////////\n    // BorderReader\n\n    template <typename Ptr2D, typename B> struct BorderReader\n    {\n        typedef typename B::result_type elem_type;\n        typedef typename Ptr2D::index_type index_type;\n\n        __host__ __device__ __forceinline__ BorderReader(const Ptr2D& ptr_, const B& b_) : ptr(ptr_), b(b_) {}\n\n        __device__ __forceinline__ elem_type operator ()(index_type y, index_type x) const\n        {\n            return b.at(y, x, ptr);\n        }\n\n        Ptr2D ptr;\n        B b;\n    };\n\n    // under win32 there is some bug with templated types that passed as kernel parameters\n    // with this specialization all works fine\n    template <typename Ptr2D, typename D> struct BorderReader< Ptr2D, BrdConstant<D> >\n    {\n        typedef typename BrdConstant<D>::result_type elem_type;\n        typedef typename Ptr2D::index_type index_type;\n\n        __host__ __device__ __forceinline__ BorderReader(const Ptr2D& src_, const BrdConstant<D>& b) :\n            src(src_), height(b.height), width(b.width), val(b.val)\n        {\n        }\n\n        __device__ __forceinline__ D operator ()(index_type y, index_type x) const\n        {\n            return (x >= 0 && x < width && y >= 0 && y < height) ? saturate_cast<D>(src(y, x)) : val;\n        }\n\n        Ptr2D src;\n        int height;\n        int width;\n        D val;\n    };\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_BORDER_INTERPOLATE_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/color.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_COLOR_HPP__\n#define __OPENCV_CUDA_COLOR_HPP__\n\n#include \"detail/color_detail.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    // All OPENCV_CUDA_IMPLEMENT_*_TRAITS(ColorSpace1_to_ColorSpace2, ...) macros implements\n    // template <typename T> class ColorSpace1_to_ColorSpace2_traits\n    // {\n    //     typedef ... functor_type;\n    //     static __host__ __device__ functor_type create_functor();\n    // };\n\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgr_to_rgb, 3, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgr_to_bgra, 3, 4, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgr_to_rgba, 3, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgra_to_bgr, 4, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgra_to_rgb, 4, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgra_to_rgba, 4, 4, 2)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(bgr_to_bgr555, 3, 0, 5)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(bgr_to_bgr565, 3, 0, 6)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(rgb_to_bgr555, 3, 2, 5)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(rgb_to_bgr565, 3, 2, 6)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(bgra_to_bgr555, 4, 0, 5)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(bgra_to_bgr565, 4, 0, 6)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(rgba_to_bgr555, 4, 2, 5)\n    OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(rgba_to_bgr565, 4, 2, 6)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_rgb, 3, 2, 5)\n    OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_rgb, 3, 2, 6)\n    OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_bgr, 3, 0, 5)\n    OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_bgr, 3, 0, 6)\n    OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_rgba, 4, 2, 5)\n    OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_rgba, 4, 2, 6)\n    OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_bgra, 4, 0, 5)\n    OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_bgra, 4, 0, 6)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_GRAY2RGB_TRAITS(gray_to_bgr, 3)\n    OPENCV_CUDA_IMPLEMENT_GRAY2RGB_TRAITS(gray_to_bgra, 4)\n\n    #undef OPENCV_CUDA_IMPLEMENT_GRAY2RGB_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_GRAY2RGB5x5_TRAITS(gray_to_bgr555, 5)\n    OPENCV_CUDA_IMPLEMENT_GRAY2RGB5x5_TRAITS(gray_to_bgr565, 6)\n\n    #undef OPENCV_CUDA_IMPLEMENT_GRAY2RGB5x5_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_RGB5x52GRAY_TRAITS(bgr555_to_gray, 5)\n    OPENCV_CUDA_IMPLEMENT_RGB5x52GRAY_TRAITS(bgr565_to_gray, 6)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB5x52GRAY_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS(rgb_to_gray, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS(bgr_to_gray, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS(rgba_to_gray, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS(bgra_to_gray, 4, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(rgb_to_yuv, 3, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(rgba_to_yuv, 4, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(rgb_to_yuv4, 3, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(rgba_to_yuv4, 4, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(bgr_to_yuv, 3, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(bgra_to_yuv, 4, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(bgr_to_yuv4, 3, 4, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(bgra_to_yuv4, 4, 4, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_rgb, 3, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_rgba, 3, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_rgb, 4, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_rgba, 4, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_bgr, 3, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_bgra, 3, 4, 0)\n    OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_bgr, 4, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_bgra, 4, 4, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(rgb_to_YCrCb, 3, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(rgba_to_YCrCb, 4, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(rgb_to_YCrCb4, 3, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(rgba_to_YCrCb4, 4, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(bgr_to_YCrCb, 3, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(bgra_to_YCrCb, 4, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(bgr_to_YCrCb4, 3, 4, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(bgra_to_YCrCb4, 4, 4, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_rgb, 3, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_rgba, 3, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_rgb, 4, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_rgba, 4, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_bgr, 3, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_bgra, 3, 4, 0)\n    OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_bgr, 4, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_bgra, 4, 4, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(rgb_to_xyz, 3, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(rgba_to_xyz, 4, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(rgb_to_xyz4, 3, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(rgba_to_xyz4, 4, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(bgr_to_xyz, 3, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(bgra_to_xyz, 4, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(bgr_to_xyz4, 3, 4, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(bgra_to_xyz4, 4, 4, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_rgb, 3, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_rgb, 4, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_rgba, 3, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_rgba, 4, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_bgr, 3, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_bgr, 4, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_bgra, 3, 4, 0)\n    OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_bgra, 4, 4, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(rgb_to_hsv, 3, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(rgba_to_hsv, 4, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(rgb_to_hsv4, 3, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(rgba_to_hsv4, 4, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(bgr_to_hsv, 3, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(bgra_to_hsv, 4, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(bgr_to_hsv4, 3, 4, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(bgra_to_hsv4, 4, 4, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_rgb, 3, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_rgba, 3, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_rgb, 4, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_rgba, 4, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_bgr, 3, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_bgra, 3, 4, 0)\n    OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_bgr, 4, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_bgra, 4, 4, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(rgb_to_hls, 3, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(rgba_to_hls, 4, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(rgb_to_hls4, 3, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(rgba_to_hls4, 4, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(bgr_to_hls, 3, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(bgra_to_hls, 4, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(bgr_to_hls4, 3, 4, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(bgra_to_hls4, 4, 4, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls_to_rgb, 3, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls_to_rgba, 3, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_rgb, 4, 3, 2)\n    OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_rgba, 4, 4, 2)\n    OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls_to_bgr, 3, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls_to_bgra, 3, 4, 0)\n    OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_bgr, 4, 3, 0)\n    OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_bgra, 4, 4, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(rgb_to_lab, 3, 3, true, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(rgba_to_lab, 4, 3, true, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(rgb_to_lab4, 3, 4, true, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(rgba_to_lab4, 4, 4, true, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(bgr_to_lab, 3, 3, true, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(bgra_to_lab, 4, 3, true, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(bgr_to_lab4, 3, 4, true, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(bgra_to_lab4, 4, 4, true, 0)\n\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lrgb_to_lab, 3, 3, false, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lrgba_to_lab, 4, 3, false, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lrgb_to_lab4, 3, 4, false, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lrgba_to_lab4, 4, 4, false, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lbgr_to_lab, 3, 3, false, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lbgra_to_lab, 4, 3, false, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lbgr_to_lab4, 3, 4, false, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lbgra_to_lab4, 4, 4, false, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_rgb, 3, 3, true, 2)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_rgb, 4, 3, true, 2)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_rgba, 3, 4, true, 2)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_rgba, 4, 4, true, 2)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_bgr, 3, 3, true, 0)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_bgr, 4, 3, true, 0)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_bgra, 3, 4, true, 0)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_bgra, 4, 4, true, 0)\n\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lrgb, 3, 3, false, 2)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lrgb, 4, 3, false, 2)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lrgba, 3, 4, false, 2)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lrgba, 4, 4, false, 2)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lbgr, 3, 3, false, 0)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lbgr, 4, 3, false, 0)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lbgra, 3, 4, false, 0)\n    OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lbgra, 4, 4, false, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(rgb_to_luv, 3, 3, true, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(rgba_to_luv, 4, 3, true, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(rgb_to_luv4, 3, 4, true, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(rgba_to_luv4, 4, 4, true, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(bgr_to_luv, 3, 3, true, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(bgra_to_luv, 4, 3, true, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(bgr_to_luv4, 3, 4, true, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(bgra_to_luv4, 4, 4, true, 0)\n\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lrgb_to_luv, 3, 3, false, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lrgba_to_luv, 4, 3, false, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lrgb_to_luv4, 3, 4, false, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lrgba_to_luv4, 4, 4, false, 2)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lbgr_to_luv, 3, 3, false, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lbgra_to_luv, 4, 3, false, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lbgr_to_luv4, 3, 4, false, 0)\n    OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lbgra_to_luv4, 4, 4, false, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS\n\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_rgb, 3, 3, true, 2)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_rgb, 4, 3, true, 2)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_rgba, 3, 4, true, 2)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_rgba, 4, 4, true, 2)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_bgr, 3, 3, true, 0)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_bgr, 4, 3, true, 0)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_bgra, 3, 4, true, 0)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_bgra, 4, 4, true, 0)\n\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lrgb, 3, 3, false, 2)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lrgb, 4, 3, false, 2)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lrgba, 3, 4, false, 2)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lrgba, 4, 4, false, 2)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lbgr, 3, 3, false, 0)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lbgr, 4, 3, false, 0)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lbgra, 3, 4, false, 0)\n    OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lbgra, 4, 4, false, 0)\n\n    #undef OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_BORDER_INTERPOLATE_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/common.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_COMMON_HPP__\n#define __OPENCV_CUDA_COMMON_HPP__\n\n#include <cuda_runtime.h>\n#include \"opencv2/core/cuda_types.hpp\"\n#include \"opencv2/core/cvdef.h\"\n#include \"opencv2/core/base.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\n#ifndef CV_PI_F\n    #ifndef CV_PI\n        #define CV_PI_F 3.14159265f\n    #else\n        #define CV_PI_F ((float)CV_PI)\n    #endif\n#endif\n\nnamespace cv { namespace cuda {\n    static inline void checkCudaError(cudaError_t err, const char* file, const int line, const char* func)\n    {\n        if (cudaSuccess != err)\n            cv::error(cv::Error::GpuApiCallError, cudaGetErrorString(err), func, file, line);\n    }\n}}\n\n#ifndef cudaSafeCall\n    #define cudaSafeCall(expr)  cv::cuda::checkCudaError(expr, __FILE__, __LINE__, CV_Func)\n#endif\n\nnamespace cv { namespace cuda\n{\n    template <typename T> static inline bool isAligned(const T* ptr, size_t size)\n    {\n        return reinterpret_cast<size_t>(ptr) % size == 0;\n    }\n\n    static inline bool isAligned(size_t step, size_t size)\n    {\n        return step % size == 0;\n    }\n}}\n\nnamespace cv { namespace cuda\n{\n    namespace device\n    {\n        __host__ __device__ __forceinline__ int divUp(int total, int grain)\n        {\n            return (total + grain - 1) / grain;\n        }\n\n        template<class T> inline void bindTexture(const textureReference* tex, const PtrStepSz<T>& img)\n        {\n            cudaChannelFormatDesc desc = cudaCreateChannelDesc<T>();\n            cudaSafeCall( cudaBindTexture2D(0, tex, img.ptr(), &desc, img.cols, img.rows, img.step) );\n        }\n    }\n}}\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_COMMON_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/datamov_utils.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_DATAMOV_UTILS_HPP__\n#define __OPENCV_CUDA_DATAMOV_UTILS_HPP__\n\n#include \"common.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    #if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 200\n\n        // for Fermi memory space is detected automatically\n        template <typename T> struct ForceGlob\n        {\n            __device__ __forceinline__ static void Load(const T* ptr, int offset, T& val)  { val = ptr[offset];  }\n        };\n\n    #else // __CUDA_ARCH__ >= 200\n\n        #if defined(_WIN64) || defined(__LP64__)\n            // 64-bit register modifier for inlined asm\n            #define OPENCV_CUDA_ASM_PTR \"l\"\n        #else\n            // 32-bit register modifier for inlined asm\n            #define OPENCV_CUDA_ASM_PTR \"r\"\n        #endif\n\n        template<class T> struct ForceGlob;\n\n        #define OPENCV_CUDA_DEFINE_FORCE_GLOB(base_type, ptx_type, reg_mod) \\\n            template <> struct ForceGlob<base_type> \\\n            { \\\n                __device__ __forceinline__ static void Load(const base_type* ptr, int offset, base_type& val) \\\n                { \\\n                    asm(\"ld.global.\"#ptx_type\" %0, [%1];\" : \"=\"#reg_mod(val) : OPENCV_CUDA_ASM_PTR(ptr + offset)); \\\n                } \\\n            };\n\n        #define OPENCV_CUDA_DEFINE_FORCE_GLOB_B(base_type, ptx_type) \\\n            template <> struct ForceGlob<base_type> \\\n            { \\\n                __device__ __forceinline__ static void Load(const base_type* ptr, int offset, base_type& val) \\\n                { \\\n                    asm(\"ld.global.\"#ptx_type\" %0, [%1];\" : \"=r\"(*reinterpret_cast<uint*>(&val)) : OPENCV_CUDA_ASM_PTR(ptr + offset)); \\\n                } \\\n            };\n\n            OPENCV_CUDA_DEFINE_FORCE_GLOB_B(uchar,  u8)\n            OPENCV_CUDA_DEFINE_FORCE_GLOB_B(schar,  s8)\n            OPENCV_CUDA_DEFINE_FORCE_GLOB_B(char,   b8)\n            OPENCV_CUDA_DEFINE_FORCE_GLOB  (ushort, u16, h)\n            OPENCV_CUDA_DEFINE_FORCE_GLOB  (short,  s16, h)\n            OPENCV_CUDA_DEFINE_FORCE_GLOB  (uint,   u32, r)\n            OPENCV_CUDA_DEFINE_FORCE_GLOB  (int,    s32, r)\n            OPENCV_CUDA_DEFINE_FORCE_GLOB  (float,  f32, f)\n            OPENCV_CUDA_DEFINE_FORCE_GLOB  (double, f64, d)\n\n        #undef OPENCV_CUDA_DEFINE_FORCE_GLOB\n        #undef OPENCV_CUDA_DEFINE_FORCE_GLOB_B\n        #undef OPENCV_CUDA_ASM_PTR\n\n    #endif // __CUDA_ARCH__ >= 200\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_DATAMOV_UTILS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/detail/color_detail.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_COLOR_DETAIL_HPP__\n#define __OPENCV_CUDA_COLOR_DETAIL_HPP__\n\n#include \"../common.hpp\"\n#include \"../vec_traits.hpp\"\n#include \"../saturate_cast.hpp\"\n#include \"../limits.hpp\"\n#include \"../functional.hpp\"\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    #ifndef CV_DESCALE\n        #define CV_DESCALE(x, n) (((x) + (1 << ((n)-1))) >> (n))\n    #endif\n\n    namespace color_detail\n    {\n        template<typename T> struct ColorChannel\n        {\n            typedef float worktype_f;\n            static __device__ __forceinline__ T max() { return numeric_limits<T>::max(); }\n            static __device__ __forceinline__ T half() { return (T)(max()/2 + 1); }\n        };\n\n        template<> struct ColorChannel<float>\n        {\n            typedef float worktype_f;\n            static __device__ __forceinline__ float max() { return 1.f; }\n            static __device__ __forceinline__ float half() { return 0.5f; }\n        };\n\n        template <typename T> static __device__ __forceinline__ void setAlpha(typename TypeVec<T, 3>::vec_type& vec, T val)\n        {\n        }\n\n        template <typename T> static __device__ __forceinline__ void setAlpha(typename TypeVec<T, 4>::vec_type& vec, T val)\n        {\n            vec.w = val;\n        }\n\n        template <typename T> static __device__ __forceinline__ T getAlpha(const typename TypeVec<T, 3>::vec_type& vec)\n        {\n            return ColorChannel<T>::max();\n        }\n\n        template <typename T> static __device__ __forceinline__ T getAlpha(const typename TypeVec<T, 4>::vec_type& vec)\n        {\n            return vec.w;\n        }\n\n        enum\n        {\n            yuv_shift  = 14,\n            xyz_shift  = 12,\n            R2Y        = 4899,\n            G2Y        = 9617,\n            B2Y        = 1868,\n            BLOCK_SIZE = 256\n        };\n    }\n\n////////////////// Various 3/4-channel to 3/4-channel RGB transformations /////////////////\n\n    namespace color_detail\n    {\n        template <typename T, int scn, int dcn, int bidx> struct RGB2RGB\n            : unary_function<typename TypeVec<T, scn>::vec_type, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ typename TypeVec<T, dcn>::vec_type operator()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n\n                dst.x = (&src.x)[bidx];\n                dst.y = src.y;\n                dst.z = (&src.x)[bidx^2];\n                setAlpha(dst, getAlpha<T>(src));\n\n                return dst;\n            }\n\n            __host__ __device__ __forceinline__ RGB2RGB() {}\n            __host__ __device__ __forceinline__ RGB2RGB(const RGB2RGB&) {}\n        };\n\n        template <> struct RGB2RGB<uchar, 4, 4, 2> : unary_function<uint, uint>\n        {\n            __device__ uint operator()(uint src) const\n            {\n                uint dst = 0;\n\n                dst |= (0xffu & (src >> 16));\n                dst |= (0xffu & (src >> 8)) << 8;\n                dst |= (0xffu & (src)) << 16;\n                dst |= (0xffu & (src >> 24)) << 24;\n\n                return dst;\n            }\n\n            __host__ __device__ __forceinline__ RGB2RGB() {}\n            __host__ __device__ __forceinline__ RGB2RGB(const RGB2RGB&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(name, scn, dcn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2RGB<T, scn, dcn, bidx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n/////////// Transforming 16-bit (565 or 555) RGB to/from 24/32-bit (888[8]) RGB //////////\n\n    namespace color_detail\n    {\n        template <int green_bits, int bidx> struct RGB2RGB5x5Converter;\n        template<int bidx> struct RGB2RGB5x5Converter<6, bidx>\n        {\n            static __device__ __forceinline__ ushort cvt(const uchar3& src)\n            {\n                return (ushort)(((&src.x)[bidx] >> 3) | ((src.y & ~3) << 3) | (((&src.x)[bidx^2] & ~7) << 8));\n            }\n\n            static __device__ __forceinline__ ushort cvt(uint src)\n            {\n                uint b = 0xffu & (src >> (bidx * 8));\n                uint g = 0xffu & (src >> 8);\n                uint r = 0xffu & (src >> ((bidx ^ 2) * 8));\n                return (ushort)((b >> 3) | ((g & ~3) << 3) | ((r & ~7) << 8));\n            }\n        };\n\n        template<int bidx> struct RGB2RGB5x5Converter<5, bidx>\n        {\n            static __device__ __forceinline__ ushort cvt(const uchar3& src)\n            {\n                return (ushort)(((&src.x)[bidx] >> 3) | ((src.y & ~7) << 2) | (((&src.x)[bidx^2] & ~7) << 7));\n            }\n\n            static __device__ __forceinline__ ushort cvt(uint src)\n            {\n                uint b = 0xffu & (src >> (bidx * 8));\n                uint g = 0xffu & (src >> 8);\n                uint r = 0xffu & (src >> ((bidx ^ 2) * 8));\n                uint a = 0xffu & (src >> 24);\n                return (ushort)((b >> 3) | ((g & ~7) << 2) | ((r & ~7) << 7) | (a * 0x8000));\n            }\n        };\n\n        template<int scn, int bidx, int green_bits> struct RGB2RGB5x5;\n\n        template<int bidx, int green_bits> struct RGB2RGB5x5<3, bidx,green_bits> : unary_function<uchar3, ushort>\n        {\n            __device__ __forceinline__ ushort operator()(const uchar3& src) const\n            {\n                return RGB2RGB5x5Converter<green_bits, bidx>::cvt(src);\n            }\n\n            __host__ __device__ __forceinline__ RGB2RGB5x5() {}\n            __host__ __device__ __forceinline__ RGB2RGB5x5(const RGB2RGB5x5&) {}\n        };\n\n        template<int bidx, int green_bits> struct RGB2RGB5x5<4, bidx,green_bits> : unary_function<uint, ushort>\n        {\n            __device__ __forceinline__ ushort operator()(uint src) const\n            {\n                return RGB2RGB5x5Converter<green_bits, bidx>::cvt(src);\n            }\n\n            __host__ __device__ __forceinline__ RGB2RGB5x5() {}\n            __host__ __device__ __forceinline__ RGB2RGB5x5(const RGB2RGB5x5&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(name, scn, bidx, green_bits) \\\n    struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2RGB5x5<scn, bidx, green_bits> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n    namespace color_detail\n    {\n        template <int green_bits, int bidx> struct RGB5x52RGBConverter;\n\n        template <int bidx> struct RGB5x52RGBConverter<5, bidx>\n        {\n            static __device__ __forceinline__ void cvt(uint src, uchar3& dst)\n            {\n                (&dst.x)[bidx] = src << 3;\n                dst.y = (src >> 2) & ~7;\n                (&dst.x)[bidx ^ 2] = (src >> 7) & ~7;\n            }\n\n            static __device__ __forceinline__ void cvt(uint src, uint& dst)\n            {\n                dst = 0;\n\n                dst |= (0xffu & (src << 3)) << (bidx * 8);\n                dst |= (0xffu & ((src >> 2) & ~7)) << 8;\n                dst |= (0xffu & ((src >> 7) & ~7)) << ((bidx ^ 2) * 8);\n                dst |= ((src & 0x8000) * 0xffu) << 24;\n            }\n        };\n\n        template <int bidx> struct RGB5x52RGBConverter<6, bidx>\n        {\n            static __device__ __forceinline__ void cvt(uint src, uchar3& dst)\n            {\n                (&dst.x)[bidx] = src << 3;\n                dst.y = (src >> 3) & ~3;\n                (&dst.x)[bidx ^ 2] = (src >> 8) & ~7;\n            }\n\n            static __device__ __forceinline__ void cvt(uint src, uint& dst)\n            {\n                dst = 0xffu << 24;\n\n                dst |= (0xffu & (src << 3)) << (bidx * 8);\n                dst |= (0xffu &((src >> 3) & ~3)) << 8;\n                dst |= (0xffu & ((src >> 8) & ~7)) << ((bidx ^ 2) * 8);\n            }\n        };\n\n        template <int dcn, int bidx, int green_bits> struct RGB5x52RGB;\n\n        template <int bidx, int green_bits> struct RGB5x52RGB<3, bidx, green_bits> : unary_function<ushort, uchar3>\n        {\n            __device__ __forceinline__ uchar3 operator()(ushort src) const\n            {\n                uchar3 dst;\n                RGB5x52RGBConverter<green_bits, bidx>::cvt(src, dst);\n                return dst;\n            }\n            __host__ __device__ __forceinline__ RGB5x52RGB() {}\n            __host__ __device__ __forceinline__ RGB5x52RGB(const RGB5x52RGB&) {}\n\n        };\n\n        template <int bidx, int green_bits> struct RGB5x52RGB<4, bidx, green_bits> : unary_function<ushort, uint>\n        {\n            __device__ __forceinline__ uint operator()(ushort src) const\n            {\n                uint dst;\n                RGB5x52RGBConverter<green_bits, bidx>::cvt(src, dst);\n                return dst;\n            }\n            __host__ __device__ __forceinline__ RGB5x52RGB() {}\n            __host__ __device__ __forceinline__ RGB5x52RGB(const RGB5x52RGB&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(name, dcn, bidx, green_bits) \\\n    struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB5x52RGB<dcn, bidx, green_bits> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n///////////////////////////////// Grayscale to Color ////////////////////////////////\n\n    namespace color_detail\n    {\n        template <typename T, int dcn> struct Gray2RGB : unary_function<T, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<T, dcn>::vec_type operator()(T src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n\n                dst.z = dst.y = dst.x = src;\n                setAlpha(dst, ColorChannel<T>::max());\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ Gray2RGB() {}\n            __host__ __device__ __forceinline__ Gray2RGB(const Gray2RGB&) {}\n        };\n\n        template <> struct Gray2RGB<uchar, 4> : unary_function<uchar, uint>\n        {\n            __device__ __forceinline__ uint operator()(uint src) const\n            {\n                uint dst = 0xffu << 24;\n\n                dst |= src;\n                dst |= src << 8;\n                dst |= src << 16;\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ Gray2RGB() {}\n            __host__ __device__ __forceinline__ Gray2RGB(const Gray2RGB&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_GRAY2RGB_TRAITS(name, dcn) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::Gray2RGB<T, dcn> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n    namespace color_detail\n    {\n        template <int green_bits> struct Gray2RGB5x5Converter;\n        template<> struct Gray2RGB5x5Converter<6>\n        {\n            static __device__ __forceinline__ ushort cvt(uint t)\n            {\n                return (ushort)((t >> 3) | ((t & ~3) << 3) | ((t & ~7) << 8));\n            }\n        };\n\n        template<> struct Gray2RGB5x5Converter<5>\n        {\n            static __device__ __forceinline__ ushort cvt(uint t)\n            {\n                t >>= 3;\n                return (ushort)(t | (t << 5) | (t << 10));\n            }\n        };\n\n        template<int green_bits> struct Gray2RGB5x5 : unary_function<uchar, ushort>\n        {\n            __device__ __forceinline__ ushort operator()(uint src) const\n            {\n                return Gray2RGB5x5Converter<green_bits>::cvt(src);\n            }\n\n            __host__ __device__ __forceinline__ Gray2RGB5x5() {}\n            __host__ __device__ __forceinline__ Gray2RGB5x5(const Gray2RGB5x5&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_GRAY2RGB5x5_TRAITS(name, green_bits) \\\n    struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::Gray2RGB5x5<green_bits> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n///////////////////////////////// Color to Grayscale ////////////////////////////////\n\n    namespace color_detail\n    {\n        template <int green_bits> struct RGB5x52GrayConverter;\n        template <> struct RGB5x52GrayConverter<6>\n        {\n            static __device__ __forceinline__ uchar cvt(uint t)\n            {\n                return (uchar)CV_DESCALE(((t << 3) & 0xf8) * B2Y + ((t >> 3) & 0xfc) * G2Y + ((t >> 8) & 0xf8) * R2Y, yuv_shift);\n            }\n        };\n\n        template <> struct RGB5x52GrayConverter<5>\n        {\n            static __device__ __forceinline__ uchar cvt(uint t)\n            {\n                return (uchar)CV_DESCALE(((t << 3) & 0xf8) * B2Y + ((t >> 2) & 0xf8) * G2Y + ((t >> 7) & 0xf8) * R2Y, yuv_shift);\n            }\n        };\n\n        template<int green_bits> struct RGB5x52Gray : unary_function<ushort, uchar>\n        {\n            __device__ __forceinline__ uchar operator()(uint src) const\n            {\n                return RGB5x52GrayConverter<green_bits>::cvt(src);\n            }\n            __host__ __device__ __forceinline__ RGB5x52Gray() {}\n            __host__ __device__ __forceinline__ RGB5x52Gray(const RGB5x52Gray&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB5x52GRAY_TRAITS(name, green_bits) \\\n    struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB5x52Gray<green_bits> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n    namespace color_detail\n    {\n        template <int bidx, typename T> static __device__ __forceinline__ T RGB2GrayConvert(const T* src)\n        {\n            return (T)CV_DESCALE((unsigned)(src[bidx] * B2Y + src[1] * G2Y + src[bidx^2] * R2Y), yuv_shift);\n        }\n\n        template <int bidx> static __device__ __forceinline__ uchar RGB2GrayConvert(uint src)\n        {\n            uint b = 0xffu & (src >> (bidx * 8));\n            uint g = 0xffu & (src >> 8);\n            uint r = 0xffu & (src >> ((bidx ^ 2) * 8));\n            return CV_DESCALE((uint)(b * B2Y + g * G2Y + r * R2Y), yuv_shift);\n        }\n\n        template <int bidx> static __device__ __forceinline__ float RGB2GrayConvert(const float* src)\n        {\n            return src[bidx] * 0.114f + src[1] * 0.587f + src[bidx^2] * 0.299f;\n        }\n\n        template <typename T, int scn, int bidx> struct RGB2Gray : unary_function<typename TypeVec<T, scn>::vec_type, T>\n        {\n            __device__ __forceinline__ T operator()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                return RGB2GrayConvert<bidx>(&src.x);\n            }\n            __host__ __device__ __forceinline__ RGB2Gray() {}\n            __host__ __device__ __forceinline__ RGB2Gray(const RGB2Gray&) {}\n        };\n\n        template <int bidx> struct RGB2Gray<uchar, 4, bidx> : unary_function<uint, uchar>\n        {\n            __device__ __forceinline__ uchar operator()(uint src) const\n            {\n                return RGB2GrayConvert<bidx>(src);\n            }\n            __host__ __device__ __forceinline__ RGB2Gray() {}\n            __host__ __device__ __forceinline__ RGB2Gray(const RGB2Gray&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS(name, scn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2Gray<T, scn, bidx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n///////////////////////////////////// RGB <-> YUV //////////////////////////////////////\n\n    namespace color_detail\n    {\n        __constant__ float c_RGB2YUVCoeffs_f[5] = { 0.114f, 0.587f, 0.299f, 0.492f, 0.877f };\n        __constant__ int   c_RGB2YUVCoeffs_i[5] = { B2Y, G2Y, R2Y, 8061, 14369 };\n\n        template <int bidx, typename T, typename D> static __device__ void RGB2YUVConvert(const T* src, D& dst)\n        {\n            const int delta = ColorChannel<T>::half() * (1 << yuv_shift);\n\n            const int Y = CV_DESCALE(src[0] * c_RGB2YUVCoeffs_i[bidx^2] + src[1] * c_RGB2YUVCoeffs_i[1] + src[2] * c_RGB2YUVCoeffs_i[bidx], yuv_shift);\n            const int Cr = CV_DESCALE((src[bidx^2] - Y) * c_RGB2YUVCoeffs_i[3] + delta, yuv_shift);\n            const int Cb = CV_DESCALE((src[bidx] - Y) * c_RGB2YUVCoeffs_i[4] + delta, yuv_shift);\n\n            dst.x = saturate_cast<T>(Y);\n            dst.y = saturate_cast<T>(Cr);\n            dst.z = saturate_cast<T>(Cb);\n        }\n\n        template <int bidx, typename D> static __device__ __forceinline__ void RGB2YUVConvert(const float* src, D& dst)\n        {\n            dst.x = src[0] * c_RGB2YUVCoeffs_f[bidx^2] + src[1] * c_RGB2YUVCoeffs_f[1] + src[2] * c_RGB2YUVCoeffs_f[bidx];\n            dst.y = (src[bidx^2] - dst.x) * c_RGB2YUVCoeffs_f[3] + ColorChannel<float>::half();\n            dst.z = (src[bidx] - dst.x) * c_RGB2YUVCoeffs_f[4] + ColorChannel<float>::half();\n        }\n\n        template <typename T, int scn, int dcn, int bidx> struct RGB2YUV\n            : unary_function<typename TypeVec<T, scn>::vec_type, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<T, dcn>::vec_type operator ()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n                RGB2YUVConvert<bidx>(&src.x, dst);\n                return dst;\n            }\n            __host__ __device__ __forceinline__ RGB2YUV() {}\n            __host__ __device__ __forceinline__ RGB2YUV(const RGB2YUV&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(name, scn, dcn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2YUV<T, scn, dcn, bidx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n    namespace color_detail\n    {\n        __constant__ float c_YUV2RGBCoeffs_f[5] = { 2.032f, -0.395f, -0.581f, 1.140f };\n        __constant__ int   c_YUV2RGBCoeffs_i[5] = { 33292, -6472, -9519, 18678 };\n\n        template <int bidx, typename T, typename D> static __device__ void YUV2RGBConvert(const T& src, D* dst)\n        {\n            const int b = src.x + CV_DESCALE((src.z - ColorChannel<D>::half()) * c_YUV2RGBCoeffs_i[3], yuv_shift);\n\n            const int g = src.x + CV_DESCALE((src.z - ColorChannel<D>::half()) * c_YUV2RGBCoeffs_i[2]\n                                             + (src.y - ColorChannel<D>::half()) * c_YUV2RGBCoeffs_i[1], yuv_shift);\n\n            const int r = src.x + CV_DESCALE((src.y - ColorChannel<D>::half()) * c_YUV2RGBCoeffs_i[0], yuv_shift);\n\n            dst[bidx] = saturate_cast<D>(b);\n            dst[1] = saturate_cast<D>(g);\n            dst[bidx^2] = saturate_cast<D>(r);\n        }\n\n        template <int bidx> static __device__ uint YUV2RGBConvert(uint src)\n        {\n            const int x = 0xff & (src);\n            const int y = 0xff & (src >> 8);\n            const int z = 0xff & (src >> 16);\n\n            const int b = x + CV_DESCALE((z - ColorChannel<uchar>::half()) * c_YUV2RGBCoeffs_i[3], yuv_shift);\n\n            const int g = x + CV_DESCALE((z - ColorChannel<uchar>::half()) * c_YUV2RGBCoeffs_i[2]\n                                         + (y - ColorChannel<uchar>::half()) * c_YUV2RGBCoeffs_i[1], yuv_shift);\n\n            const int r = x + CV_DESCALE((y - ColorChannel<uchar>::half()) * c_YUV2RGBCoeffs_i[0], yuv_shift);\n\n            uint dst = 0xffu << 24;\n\n            dst |= saturate_cast<uchar>(b) << (bidx * 8);\n            dst |= saturate_cast<uchar>(g) << 8;\n            dst |= saturate_cast<uchar>(r) << ((bidx ^ 2) * 8);\n\n            return dst;\n        }\n\n        template <int bidx, typename T> static __device__ __forceinline__ void YUV2RGBConvert(const T& src, float* dst)\n        {\n            dst[bidx] = src.x + (src.z - ColorChannel<float>::half()) * c_YUV2RGBCoeffs_f[3];\n\n            dst[1] = src.x + (src.z - ColorChannel<float>::half()) * c_YUV2RGBCoeffs_f[2]\n                     + (src.y - ColorChannel<float>::half()) * c_YUV2RGBCoeffs_f[1];\n\n            dst[bidx^2] = src.x + (src.y - ColorChannel<float>::half()) * c_YUV2RGBCoeffs_f[0];\n        }\n\n        template <typename T, int scn, int dcn, int bidx> struct YUV2RGB\n            : unary_function<typename TypeVec<T, scn>::vec_type, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<T, dcn>::vec_type operator ()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n\n                YUV2RGBConvert<bidx>(src, &dst.x);\n                setAlpha(dst, ColorChannel<T>::max());\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ YUV2RGB() {}\n            __host__ __device__ __forceinline__ YUV2RGB(const YUV2RGB&) {}\n        };\n\n        template <int bidx> struct YUV2RGB<uchar, 4, 4, bidx> : unary_function<uint, uint>\n        {\n            __device__ __forceinline__ uint operator ()(uint src) const\n            {\n                return YUV2RGBConvert<bidx>(src);\n            }\n            __host__ __device__ __forceinline__ YUV2RGB() {}\n            __host__ __device__ __forceinline__ YUV2RGB(const YUV2RGB&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(name, scn, dcn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::YUV2RGB<T, scn, dcn, bidx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n///////////////////////////////////// RGB <-> YCrCb //////////////////////////////////////\n\n    namespace color_detail\n    {\n        __constant__ float c_RGB2YCrCbCoeffs_f[5] = {0.299f, 0.587f, 0.114f, 0.713f, 0.564f};\n        __constant__ int   c_RGB2YCrCbCoeffs_i[5] = {R2Y, G2Y, B2Y, 11682, 9241};\n\n        template <int bidx, typename T, typename D> static __device__ void RGB2YCrCbConvert(const T* src, D& dst)\n        {\n            const int delta = ColorChannel<T>::half() * (1 << yuv_shift);\n\n            const int Y = CV_DESCALE(src[0] * c_RGB2YCrCbCoeffs_i[bidx^2] + src[1] * c_RGB2YCrCbCoeffs_i[1] + src[2] * c_RGB2YCrCbCoeffs_i[bidx], yuv_shift);\n            const int Cr = CV_DESCALE((src[bidx^2] - Y) * c_RGB2YCrCbCoeffs_i[3] + delta, yuv_shift);\n            const int Cb = CV_DESCALE((src[bidx] - Y) * c_RGB2YCrCbCoeffs_i[4] + delta, yuv_shift);\n\n            dst.x = saturate_cast<T>(Y);\n            dst.y = saturate_cast<T>(Cr);\n            dst.z = saturate_cast<T>(Cb);\n        }\n\n        template <int bidx> static __device__ uint RGB2YCrCbConvert(uint src)\n        {\n            const int delta = ColorChannel<uchar>::half() * (1 << yuv_shift);\n\n            const int Y = CV_DESCALE((0xffu & src) * c_RGB2YCrCbCoeffs_i[bidx^2] + (0xffu & (src >> 8)) * c_RGB2YCrCbCoeffs_i[1] + (0xffu & (src >> 16)) * c_RGB2YCrCbCoeffs_i[bidx], yuv_shift);\n            const int Cr = CV_DESCALE(((0xffu & (src >> ((bidx ^ 2) * 8))) - Y) * c_RGB2YCrCbCoeffs_i[3] + delta, yuv_shift);\n            const int Cb = CV_DESCALE(((0xffu & (src >> (bidx * 8))) - Y) * c_RGB2YCrCbCoeffs_i[4] + delta, yuv_shift);\n\n            uint dst = 0;\n\n            dst |= saturate_cast<uchar>(Y);\n            dst |= saturate_cast<uchar>(Cr) << 8;\n            dst |= saturate_cast<uchar>(Cb) << 16;\n\n            return dst;\n        }\n\n        template <int bidx, typename D> static __device__ __forceinline__ void RGB2YCrCbConvert(const float* src, D& dst)\n        {\n            dst.x = src[0] * c_RGB2YCrCbCoeffs_f[bidx^2] + src[1] * c_RGB2YCrCbCoeffs_f[1] + src[2] * c_RGB2YCrCbCoeffs_f[bidx];\n            dst.y = (src[bidx^2] - dst.x) * c_RGB2YCrCbCoeffs_f[3] + ColorChannel<float>::half();\n            dst.z = (src[bidx] - dst.x) * c_RGB2YCrCbCoeffs_f[4] + ColorChannel<float>::half();\n        }\n\n        template <typename T, int scn, int dcn, int bidx> struct RGB2YCrCb\n            : unary_function<typename TypeVec<T, scn>::vec_type, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<T, dcn>::vec_type operator ()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n                RGB2YCrCbConvert<bidx>(&src.x, dst);\n                return dst;\n            }\n            __host__ __device__ __forceinline__ RGB2YCrCb() {}\n            __host__ __device__ __forceinline__ RGB2YCrCb(const RGB2YCrCb&) {}\n        };\n\n        template <int bidx> struct RGB2YCrCb<uchar, 4, 4, bidx> : unary_function<uint, uint>\n        {\n            __device__ __forceinline__ uint operator ()(uint src) const\n            {\n                return RGB2YCrCbConvert<bidx>(src);\n            }\n\n            __host__ __device__ __forceinline__ RGB2YCrCb() {}\n            __host__ __device__ __forceinline__ RGB2YCrCb(const RGB2YCrCb&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(name, scn, dcn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2YCrCb<T, scn, dcn, bidx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n    namespace color_detail\n    {\n        __constant__ float c_YCrCb2RGBCoeffs_f[5] = {1.403f, -0.714f, -0.344f, 1.773f};\n        __constant__ int   c_YCrCb2RGBCoeffs_i[5] = {22987, -11698, -5636, 29049};\n\n        template <int bidx, typename T, typename D> static __device__ void YCrCb2RGBConvert(const T& src, D* dst)\n        {\n            const int b = src.x + CV_DESCALE((src.z - ColorChannel<D>::half()) * c_YCrCb2RGBCoeffs_i[3], yuv_shift);\n            const int g = src.x + CV_DESCALE((src.z - ColorChannel<D>::half()) * c_YCrCb2RGBCoeffs_i[2] + (src.y - ColorChannel<D>::half()) * c_YCrCb2RGBCoeffs_i[1], yuv_shift);\n            const int r = src.x + CV_DESCALE((src.y - ColorChannel<D>::half()) * c_YCrCb2RGBCoeffs_i[0], yuv_shift);\n\n            dst[bidx] = saturate_cast<D>(b);\n            dst[1] = saturate_cast<D>(g);\n            dst[bidx^2] = saturate_cast<D>(r);\n        }\n\n        template <int bidx> static __device__ uint YCrCb2RGBConvert(uint src)\n        {\n            const int x = 0xff & (src);\n            const int y = 0xff & (src >> 8);\n            const int z = 0xff & (src >> 16);\n\n            const int b = x + CV_DESCALE((z - ColorChannel<uchar>::half()) * c_YCrCb2RGBCoeffs_i[3], yuv_shift);\n            const int g = x + CV_DESCALE((z - ColorChannel<uchar>::half()) * c_YCrCb2RGBCoeffs_i[2] + (y - ColorChannel<uchar>::half()) * c_YCrCb2RGBCoeffs_i[1], yuv_shift);\n            const int r = x + CV_DESCALE((y - ColorChannel<uchar>::half()) * c_YCrCb2RGBCoeffs_i[0], yuv_shift);\n\n            uint dst = 0xffu << 24;\n\n            dst |= saturate_cast<uchar>(b) << (bidx * 8);\n            dst |= saturate_cast<uchar>(g) << 8;\n            dst |= saturate_cast<uchar>(r) << ((bidx ^ 2) * 8);\n\n            return dst;\n        }\n\n        template <int bidx, typename T> __device__ __forceinline__ void YCrCb2RGBConvert(const T& src, float* dst)\n        {\n            dst[bidx] = src.x + (src.z - ColorChannel<float>::half()) * c_YCrCb2RGBCoeffs_f[3];\n            dst[1] = src.x + (src.z - ColorChannel<float>::half()) * c_YCrCb2RGBCoeffs_f[2] + (src.y - ColorChannel<float>::half()) * c_YCrCb2RGBCoeffs_f[1];\n            dst[bidx^2] = src.x + (src.y - ColorChannel<float>::half()) * c_YCrCb2RGBCoeffs_f[0];\n        }\n\n        template <typename T, int scn, int dcn, int bidx> struct YCrCb2RGB\n            : unary_function<typename TypeVec<T, scn>::vec_type, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<T, dcn>::vec_type operator ()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n\n                YCrCb2RGBConvert<bidx>(src, &dst.x);\n                setAlpha(dst, ColorChannel<T>::max());\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ YCrCb2RGB() {}\n            __host__ __device__ __forceinline__ YCrCb2RGB(const YCrCb2RGB&) {}\n        };\n\n        template <int bidx> struct YCrCb2RGB<uchar, 4, 4, bidx> : unary_function<uint, uint>\n        {\n            __device__ __forceinline__ uint operator ()(uint src) const\n            {\n                return YCrCb2RGBConvert<bidx>(src);\n            }\n            __host__ __device__ __forceinline__ YCrCb2RGB() {}\n            __host__ __device__ __forceinline__ YCrCb2RGB(const YCrCb2RGB&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(name, scn, dcn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::YCrCb2RGB<T, scn, dcn, bidx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n////////////////////////////////////// RGB <-> XYZ ///////////////////////////////////////\n\n    namespace color_detail\n    {\n        __constant__ float c_RGB2XYZ_D65f[9] = { 0.412453f, 0.357580f, 0.180423f, 0.212671f, 0.715160f, 0.072169f, 0.019334f, 0.119193f, 0.950227f };\n        __constant__ int   c_RGB2XYZ_D65i[9] = { 1689, 1465, 739, 871, 2929, 296, 79, 488, 3892 };\n\n        template <int bidx, typename T, typename D> static __device__ __forceinline__ void RGB2XYZConvert(const T* src, D& dst)\n        {\n            dst.z = saturate_cast<T>(CV_DESCALE(src[bidx^2] * c_RGB2XYZ_D65i[6] + src[1] * c_RGB2XYZ_D65i[7] + src[bidx] * c_RGB2XYZ_D65i[8], xyz_shift));\n            dst.x = saturate_cast<T>(CV_DESCALE(src[bidx^2] * c_RGB2XYZ_D65i[0] + src[1] * c_RGB2XYZ_D65i[1] + src[bidx] * c_RGB2XYZ_D65i[2], xyz_shift));\n            dst.y = saturate_cast<T>(CV_DESCALE(src[bidx^2] * c_RGB2XYZ_D65i[3] + src[1] * c_RGB2XYZ_D65i[4] + src[bidx] * c_RGB2XYZ_D65i[5], xyz_shift));\n        }\n\n        template <int bidx> static __device__ __forceinline__ uint RGB2XYZConvert(uint src)\n        {\n            const uint b = 0xffu & (src >> (bidx * 8));\n            const uint g = 0xffu & (src >> 8);\n            const uint r = 0xffu & (src >> ((bidx ^ 2) * 8));\n\n            const uint x = saturate_cast<uchar>(CV_DESCALE(r * c_RGB2XYZ_D65i[0] + g * c_RGB2XYZ_D65i[1] + b * c_RGB2XYZ_D65i[2], xyz_shift));\n            const uint y = saturate_cast<uchar>(CV_DESCALE(r * c_RGB2XYZ_D65i[3] + g * c_RGB2XYZ_D65i[4] + b * c_RGB2XYZ_D65i[5], xyz_shift));\n            const uint z = saturate_cast<uchar>(CV_DESCALE(r * c_RGB2XYZ_D65i[6] + g * c_RGB2XYZ_D65i[7] + b * c_RGB2XYZ_D65i[8], xyz_shift));\n\n            uint dst = 0;\n\n            dst |= x;\n            dst |= y << 8;\n            dst |= z << 16;\n\n            return dst;\n        }\n\n        template <int bidx, typename D> static __device__ __forceinline__ void RGB2XYZConvert(const float* src, D& dst)\n        {\n            dst.x = src[bidx^2] * c_RGB2XYZ_D65f[0] + src[1] * c_RGB2XYZ_D65f[1] + src[bidx] * c_RGB2XYZ_D65f[2];\n            dst.y = src[bidx^2] * c_RGB2XYZ_D65f[3] + src[1] * c_RGB2XYZ_D65f[4] + src[bidx] * c_RGB2XYZ_D65f[5];\n            dst.z = src[bidx^2] * c_RGB2XYZ_D65f[6] + src[1] * c_RGB2XYZ_D65f[7] + src[bidx] * c_RGB2XYZ_D65f[8];\n        }\n\n        template <typename T, int scn, int dcn, int bidx> struct RGB2XYZ\n            : unary_function<typename TypeVec<T, scn>::vec_type, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<T, dcn>::vec_type operator()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n\n                RGB2XYZConvert<bidx>(&src.x, dst);\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ RGB2XYZ() {}\n            __host__ __device__ __forceinline__ RGB2XYZ(const RGB2XYZ&) {}\n        };\n\n        template <int bidx> struct RGB2XYZ<uchar, 4, 4, bidx> : unary_function<uint, uint>\n        {\n            __device__ __forceinline__ uint operator()(uint src) const\n            {\n                return RGB2XYZConvert<bidx>(src);\n            }\n            __host__ __device__ __forceinline__ RGB2XYZ() {}\n            __host__ __device__ __forceinline__ RGB2XYZ(const RGB2XYZ&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(name, scn, dcn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2XYZ<T, scn, dcn, bidx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n    namespace color_detail\n    {\n        __constant__ float c_XYZ2sRGB_D65f[9] = { 3.240479f, -1.53715f, -0.498535f, -0.969256f, 1.875991f, 0.041556f, 0.055648f, -0.204043f, 1.057311f };\n        __constant__ int   c_XYZ2sRGB_D65i[9] = { 13273, -6296, -2042, -3970, 7684, 170, 228, -836, 4331 };\n\n        template <int bidx, typename T, typename D> static __device__ __forceinline__ void XYZ2RGBConvert(const T& src, D* dst)\n        {\n            dst[bidx^2] = saturate_cast<D>(CV_DESCALE(src.x * c_XYZ2sRGB_D65i[0] + src.y * c_XYZ2sRGB_D65i[1] + src.z * c_XYZ2sRGB_D65i[2], xyz_shift));\n            dst[1]      = saturate_cast<D>(CV_DESCALE(src.x * c_XYZ2sRGB_D65i[3] + src.y * c_XYZ2sRGB_D65i[4] + src.z * c_XYZ2sRGB_D65i[5], xyz_shift));\n            dst[bidx]   = saturate_cast<D>(CV_DESCALE(src.x * c_XYZ2sRGB_D65i[6] + src.y * c_XYZ2sRGB_D65i[7] + src.z * c_XYZ2sRGB_D65i[8], xyz_shift));\n        }\n\n        template <int bidx> static __device__ __forceinline__ uint XYZ2RGBConvert(uint src)\n        {\n            const int x = 0xff & src;\n            const int y = 0xff & (src >> 8);\n            const int z = 0xff & (src >> 16);\n\n            const uint r = saturate_cast<uchar>(CV_DESCALE(x * c_XYZ2sRGB_D65i[0] + y * c_XYZ2sRGB_D65i[1] + z * c_XYZ2sRGB_D65i[2], xyz_shift));\n            const uint g = saturate_cast<uchar>(CV_DESCALE(x * c_XYZ2sRGB_D65i[3] + y * c_XYZ2sRGB_D65i[4] + z * c_XYZ2sRGB_D65i[5], xyz_shift));\n            const uint b = saturate_cast<uchar>(CV_DESCALE(x * c_XYZ2sRGB_D65i[6] + y * c_XYZ2sRGB_D65i[7] + z * c_XYZ2sRGB_D65i[8], xyz_shift));\n\n            uint dst = 0xffu << 24;\n\n            dst |= b << (bidx * 8);\n            dst |= g << 8;\n            dst |= r << ((bidx ^ 2) * 8);\n\n            return dst;\n        }\n\n        template <int bidx, typename T> static __device__ __forceinline__ void XYZ2RGBConvert(const T& src, float* dst)\n        {\n            dst[bidx^2] = src.x * c_XYZ2sRGB_D65f[0] + src.y * c_XYZ2sRGB_D65f[1] + src.z * c_XYZ2sRGB_D65f[2];\n            dst[1]      = src.x * c_XYZ2sRGB_D65f[3] + src.y * c_XYZ2sRGB_D65f[4] + src.z * c_XYZ2sRGB_D65f[5];\n            dst[bidx]   = src.x * c_XYZ2sRGB_D65f[6] + src.y * c_XYZ2sRGB_D65f[7] + src.z * c_XYZ2sRGB_D65f[8];\n        }\n\n        template <typename T, int scn, int dcn, int bidx> struct XYZ2RGB\n            : unary_function<typename TypeVec<T, scn>::vec_type, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<T, dcn>::vec_type operator()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n\n                XYZ2RGBConvert<bidx>(src, &dst.x);\n                setAlpha(dst, ColorChannel<T>::max());\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ XYZ2RGB() {}\n            __host__ __device__ __forceinline__ XYZ2RGB(const XYZ2RGB&) {}\n        };\n\n        template <int bidx> struct XYZ2RGB<uchar, 4, 4, bidx> : unary_function<uint, uint>\n        {\n            __device__ __forceinline__ uint operator()(uint src) const\n            {\n                return XYZ2RGBConvert<bidx>(src);\n            }\n            __host__ __device__ __forceinline__ XYZ2RGB() {}\n            __host__ __device__ __forceinline__ XYZ2RGB(const XYZ2RGB&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(name, scn, dcn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::XYZ2RGB<T, scn, dcn, bidx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n////////////////////////////////////// RGB <-> HSV ///////////////////////////////////////\n\n    namespace color_detail\n    {\n        __constant__ int c_HsvDivTable   [256] = {0, 1044480, 522240, 348160, 261120, 208896, 174080, 149211, 130560, 116053, 104448, 94953, 87040, 80345, 74606, 69632, 65280, 61440, 58027, 54973, 52224, 49737, 47476, 45412, 43520, 41779, 40172, 38684, 37303, 36017, 34816, 33693, 32640, 31651, 30720, 29842, 29013, 28229, 27486, 26782, 26112, 25475, 24869, 24290, 23738, 23211, 22706, 22223, 21760, 21316, 20890, 20480, 20086, 19707, 19342, 18991, 18651, 18324, 18008, 17703, 17408, 17123, 16846, 16579, 16320, 16069, 15825, 15589, 15360, 15137, 14921, 14711, 14507, 14308, 14115, 13926, 13743, 13565, 13391, 13221, 13056, 12895, 12738, 12584, 12434, 12288, 12145, 12006, 11869, 11736, 11605, 11478, 11353, 11231, 11111, 10995, 10880, 10768, 10658, 10550, 10445, 10341, 10240, 10141, 10043, 9947, 9854, 9761, 9671, 9582, 9495, 9410, 9326, 9243, 9162, 9082, 9004, 8927, 8852, 8777, 8704, 8632, 8561, 8492, 8423, 8356, 8290, 8224, 8160, 8097, 8034, 7973, 7913, 7853, 7795, 7737, 7680, 7624, 7569, 7514, 7461, 7408, 7355, 7304, 7253, 7203, 7154, 7105, 7057, 7010, 6963, 6917, 6872, 6827, 6782, 6739, 6695, 6653, 6611, 6569, 6528, 6487, 6447, 6408, 6369, 6330, 6292, 6254, 6217, 6180, 6144, 6108, 6073, 6037, 6003, 5968, 5935, 5901, 5868, 5835, 5803, 5771, 5739, 5708, 5677, 5646, 5615, 5585, 5556, 5526, 5497, 5468, 5440, 5412, 5384, 5356, 5329, 5302, 5275, 5249, 5222, 5196, 5171, 5145, 5120, 5095, 5070, 5046, 5022, 4998, 4974, 4950, 4927, 4904, 4881, 4858, 4836, 4813, 4791, 4769, 4748, 4726, 4705, 4684, 4663, 4642, 4622, 4601, 4581, 4561, 4541, 4522, 4502, 4483, 4464, 4445, 4426, 4407, 4389, 4370, 4352, 4334, 4316, 4298, 4281, 4263, 4246, 4229, 4212, 4195, 4178, 4161, 4145, 4128, 4112, 4096};\n        __constant__ int c_HsvDivTable180[256] = {0, 122880, 61440, 40960, 30720, 24576, 20480, 17554, 15360, 13653, 12288, 11171, 10240, 9452, 8777, 8192, 7680, 7228, 6827, 6467, 6144, 5851, 5585, 5343, 5120, 4915, 4726, 4551, 4389, 4237, 4096, 3964, 3840, 3724, 3614, 3511, 3413, 3321, 3234, 3151, 3072, 2997, 2926, 2858, 2793, 2731, 2671, 2614, 2560, 2508, 2458, 2409, 2363, 2318, 2276, 2234, 2194, 2156, 2119, 2083, 2048, 2014, 1982, 1950, 1920, 1890, 1862, 1834, 1807, 1781, 1755, 1731, 1707, 1683, 1661, 1638, 1617, 1596, 1575, 1555, 1536, 1517, 1499, 1480, 1463, 1446, 1429, 1412, 1396, 1381, 1365, 1350, 1336, 1321, 1307, 1293, 1280, 1267, 1254, 1241, 1229, 1217, 1205, 1193, 1182, 1170, 1159, 1148, 1138, 1127, 1117, 1107, 1097, 1087, 1078, 1069, 1059, 1050, 1041, 1033, 1024, 1016, 1007, 999, 991, 983, 975, 968, 960, 953, 945, 938, 931, 924, 917, 910, 904, 897, 890, 884, 878, 871, 865, 859, 853, 847, 842, 836, 830, 825, 819, 814, 808, 803, 798, 793, 788, 783, 778, 773, 768, 763, 759, 754, 749, 745, 740, 736, 731, 727, 723, 719, 714, 710, 706, 702, 698, 694, 690, 686, 683, 679, 675, 671, 668, 664, 661, 657, 654, 650, 647, 643, 640, 637, 633, 630, 627, 624, 621, 617, 614, 611, 608, 605, 602, 599, 597, 594, 591, 588, 585, 582, 580, 577, 574, 572, 569, 566, 564, 561, 559, 556, 554, 551, 549, 546, 544, 541, 539, 537, 534, 532, 530, 527, 525, 523, 521, 518, 516, 514, 512, 510, 508, 506, 504, 502, 500, 497, 495, 493, 492, 490, 488, 486, 484, 482};\n        __constant__ int c_HsvDivTable256[256] = {0, 174763, 87381, 58254, 43691, 34953, 29127, 24966, 21845, 19418, 17476, 15888, 14564, 13443, 12483, 11651, 10923, 10280, 9709, 9198, 8738, 8322, 7944, 7598, 7282, 6991, 6722, 6473, 6242, 6026, 5825, 5638, 5461, 5296, 5140, 4993, 4855, 4723, 4599, 4481, 4369, 4263, 4161, 4064, 3972, 3884, 3799, 3718, 3641, 3567, 3495, 3427, 3361, 3297, 3236, 3178, 3121, 3066, 3013, 2962, 2913, 2865, 2819, 2774, 2731, 2689, 2648, 2608, 2570, 2533, 2497, 2461, 2427, 2394, 2362, 2330, 2300, 2270, 2241, 2212, 2185, 2158, 2131, 2106, 2081, 2056, 2032, 2009, 1986, 1964, 1942, 1920, 1900, 1879, 1859, 1840, 1820, 1802, 1783, 1765, 1748, 1730, 1713, 1697, 1680, 1664, 1649, 1633, 1618, 1603, 1589, 1574, 1560, 1547, 1533, 1520, 1507, 1494, 1481, 1469, 1456, 1444, 1432, 1421, 1409, 1398, 1387, 1376, 1365, 1355, 1344, 1334, 1324, 1314, 1304, 1295, 1285, 1276, 1266, 1257, 1248, 1239, 1231, 1222, 1214, 1205, 1197, 1189, 1181, 1173, 1165, 1157, 1150, 1142, 1135, 1128, 1120, 1113, 1106, 1099, 1092, 1085, 1079, 1072, 1066, 1059, 1053, 1046, 1040, 1034, 1028, 1022, 1016, 1010, 1004, 999, 993, 987, 982, 976, 971, 966, 960, 955, 950, 945, 940, 935, 930, 925, 920, 915, 910, 906, 901, 896, 892, 887, 883, 878, 874, 869, 865, 861, 857, 853, 848, 844, 840, 836, 832, 828, 824, 820, 817, 813, 809, 805, 802, 798, 794, 791, 787, 784, 780, 777, 773, 770, 767, 763, 760, 757, 753, 750, 747, 744, 741, 737, 734, 731, 728, 725, 722, 719, 716, 713, 710, 708, 705, 702, 699, 696, 694, 691, 688, 685};\n\n        template <int bidx, int hr, typename D> static __device__ void RGB2HSVConvert(const uchar* src, D& dst)\n        {\n            const int hsv_shift = 12;\n            const int* hdiv_table = hr == 180 ? c_HsvDivTable180 : c_HsvDivTable256;\n\n            int b = src[bidx], g = src[1], r = src[bidx^2];\n            int h, s, v = b;\n            int vmin = b, diff;\n            int vr, vg;\n\n            v = ::max(v, g);\n            v = ::max(v, r);\n            vmin = ::min(vmin, g);\n            vmin = ::min(vmin, r);\n\n            diff = v - vmin;\n            vr = (v == r) * -1;\n            vg = (v == g) * -1;\n\n            s = (diff * c_HsvDivTable[v] + (1 << (hsv_shift-1))) >> hsv_shift;\n            h = (vr & (g - b)) + (~vr & ((vg & (b - r + 2 * diff)) + ((~vg) & (r - g + 4 * diff))));\n            h = (h * hdiv_table[diff] + (1 << (hsv_shift-1))) >> hsv_shift;\n            h += (h < 0) * hr;\n\n            dst.x = saturate_cast<uchar>(h);\n            dst.y = (uchar)s;\n            dst.z = (uchar)v;\n        }\n\n        template <int bidx, int hr> static __device__ uint RGB2HSVConvert(uint src)\n        {\n            const int hsv_shift = 12;\n            const int* hdiv_table = hr == 180 ? c_HsvDivTable180 : c_HsvDivTable256;\n\n            const int b = 0xff & (src >> (bidx * 8));\n            const int g = 0xff & (src >> 8);\n            const int r = 0xff & (src >> ((bidx ^ 2) * 8));\n\n            int h, s, v = b;\n            int vmin = b, diff;\n            int vr, vg;\n\n            v = ::max(v, g);\n            v = ::max(v, r);\n            vmin = ::min(vmin, g);\n            vmin = ::min(vmin, r);\n\n            diff = v - vmin;\n            vr = (v == r) * -1;\n            vg = (v == g) * -1;\n\n            s = (diff * c_HsvDivTable[v] + (1 << (hsv_shift-1))) >> hsv_shift;\n            h = (vr & (g - b)) + (~vr & ((vg & (b - r + 2 * diff)) + ((~vg) & (r - g + 4 * diff))));\n            h = (h * hdiv_table[diff] + (1 << (hsv_shift-1))) >> hsv_shift;\n            h += (h < 0) * hr;\n\n            uint dst = 0;\n\n            dst |= saturate_cast<uchar>(h);\n            dst |= (0xffu & s) << 8;\n            dst |= (0xffu & v) << 16;\n\n            return dst;\n        }\n\n        template <int bidx, int hr, typename D> static __device__ void RGB2HSVConvert(const float* src, D& dst)\n        {\n            const float hscale = hr * (1.f / 360.f);\n\n            float b = src[bidx], g = src[1], r = src[bidx^2];\n            float h, s, v;\n\n            float vmin, diff;\n\n            v = vmin = r;\n            v = fmax(v, g);\n            v = fmax(v, b);\n            vmin = fmin(vmin, g);\n            vmin = fmin(vmin, b);\n\n            diff = v - vmin;\n            s = diff / (float)(::fabs(v) + numeric_limits<float>::epsilon());\n            diff = (float)(60. / (diff + numeric_limits<float>::epsilon()));\n\n            h  = (v == r) * (g - b) * diff;\n            h += (v != r && v == g) * ((b - r) * diff + 120.f);\n            h += (v != r && v != g) * ((r - g) * diff + 240.f);\n            h += (h < 0) * 360.f;\n\n            dst.x = h * hscale;\n            dst.y = s;\n            dst.z = v;\n        }\n\n        template <typename T, int scn, int dcn, int bidx, int hr> struct RGB2HSV\n            : unary_function<typename TypeVec<T, scn>::vec_type, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<T, dcn>::vec_type operator()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n\n                RGB2HSVConvert<bidx, hr>(&src.x, dst);\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ RGB2HSV() {}\n            __host__ __device__ __forceinline__ RGB2HSV(const RGB2HSV&) {}\n        };\n\n        template <int bidx, int hr> struct RGB2HSV<uchar, 4, 4, bidx, hr> : unary_function<uint, uint>\n        {\n            __device__ __forceinline__ uint operator()(uint src) const\n            {\n                return RGB2HSVConvert<bidx, hr>(src);\n            }\n            __host__ __device__ __forceinline__ RGB2HSV() {}\n            __host__ __device__ __forceinline__ RGB2HSV(const RGB2HSV&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(name, scn, dcn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2HSV<T, scn, dcn, bidx, 180> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <typename T> struct name ## _full_traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2HSV<T, scn, dcn, bidx, 256> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <> struct name ## _traits<float> \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2HSV<float, scn, dcn, bidx, 360> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <> struct name ## _full_traits<float> \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2HSV<float, scn, dcn, bidx, 360> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n    namespace color_detail\n    {\n        __constant__ int c_HsvSectorData[6][3] = { {1,3,0}, {1,0,2}, {3,0,1}, {0,2,1}, {0,1,3}, {2,1,0} };\n\n        template <int bidx, int hr, typename T> static __device__ void HSV2RGBConvert(const T& src, float* dst)\n        {\n            const float hscale = 6.f / hr;\n\n            float h = src.x, s = src.y, v = src.z;\n            float b = v, g = v, r = v;\n\n            if (s != 0)\n            {\n                h *= hscale;\n\n                if( h < 0 )\n                    do h += 6; while( h < 0 );\n                else if( h >= 6 )\n                    do h -= 6; while( h >= 6 );\n\n                int sector = __float2int_rd(h);\n                h -= sector;\n\n                if ( (unsigned)sector >= 6u )\n                {\n                    sector = 0;\n                    h = 0.f;\n                }\n\n                float tab[4];\n                tab[0] = v;\n                tab[1] = v * (1.f - s);\n                tab[2] = v * (1.f - s * h);\n                tab[3] = v * (1.f - s * (1.f - h));\n\n                b = tab[c_HsvSectorData[sector][0]];\n                g = tab[c_HsvSectorData[sector][1]];\n                r = tab[c_HsvSectorData[sector][2]];\n            }\n\n            dst[bidx] = b;\n            dst[1] = g;\n            dst[bidx^2] = r;\n        }\n\n        template <int bidx, int HR, typename T> static __device__ void HSV2RGBConvert(const T& src, uchar* dst)\n        {\n            float3 buf;\n\n            buf.x = src.x;\n            buf.y = src.y * (1.f / 255.f);\n            buf.z = src.z * (1.f / 255.f);\n\n            HSV2RGBConvert<bidx, HR>(buf, &buf.x);\n\n            dst[0] = saturate_cast<uchar>(buf.x * 255.f);\n            dst[1] = saturate_cast<uchar>(buf.y * 255.f);\n            dst[2] = saturate_cast<uchar>(buf.z * 255.f);\n        }\n\n        template <int bidx, int hr> static __device__ uint HSV2RGBConvert(uint src)\n        {\n            float3 buf;\n\n            buf.x = src & 0xff;\n            buf.y = ((src >> 8) & 0xff) * (1.f/255.f);\n            buf.z = ((src >> 16) & 0xff) * (1.f/255.f);\n\n            HSV2RGBConvert<bidx, hr>(buf, &buf.x);\n\n            uint dst = 0xffu << 24;\n\n            dst |= saturate_cast<uchar>(buf.x * 255.f);\n            dst |= saturate_cast<uchar>(buf.y * 255.f) << 8;\n            dst |= saturate_cast<uchar>(buf.z * 255.f) << 16;\n\n            return dst;\n        }\n\n        template <typename T, int scn, int dcn, int bidx, int hr> struct HSV2RGB\n            : unary_function<typename TypeVec<T, scn>::vec_type, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<T, dcn>::vec_type operator()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n\n                HSV2RGBConvert<bidx, hr>(src, &dst.x);\n                setAlpha(dst, ColorChannel<T>::max());\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ HSV2RGB() {}\n            __host__ __device__ __forceinline__ HSV2RGB(const HSV2RGB&) {}\n        };\n\n        template <int bidx, int hr> struct HSV2RGB<uchar, 4, 4, bidx, hr> : unary_function<uint, uint>\n        {\n            __device__ __forceinline__ uint operator()(uint src) const\n            {\n                return HSV2RGBConvert<bidx, hr>(src);\n            }\n            __host__ __device__ __forceinline__ HSV2RGB() {}\n            __host__ __device__ __forceinline__ HSV2RGB(const HSV2RGB&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(name, scn, dcn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::HSV2RGB<T, scn, dcn, bidx, 180> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <typename T> struct name ## _full_traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::HSV2RGB<T, scn, dcn, bidx, 255> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <> struct name ## _traits<float> \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::HSV2RGB<float, scn, dcn, bidx, 360> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <> struct name ## _full_traits<float> \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::HSV2RGB<float, scn, dcn, bidx, 360> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n/////////////////////////////////////// RGB <-> HLS ////////////////////////////////////////\n\n    namespace color_detail\n    {\n        template <int bidx, int hr, typename D> static __device__ void RGB2HLSConvert(const float* src, D& dst)\n        {\n            const float hscale = hr * (1.f / 360.f);\n\n            float b = src[bidx], g = src[1], r = src[bidx^2];\n            float h = 0.f, s = 0.f, l;\n            float vmin, vmax, diff;\n\n            vmax = vmin = r;\n            vmax = fmax(vmax, g);\n            vmax = fmax(vmax, b);\n            vmin = fmin(vmin, g);\n            vmin = fmin(vmin, b);\n\n            diff = vmax - vmin;\n            l = (vmax + vmin) * 0.5f;\n\n            if (diff > numeric_limits<float>::epsilon())\n            {\n                s = (l < 0.5f) * diff / (vmax + vmin);\n                s += (l >= 0.5f) * diff / (2.0f - vmax - vmin);\n\n                diff = 60.f / diff;\n\n                h  = (vmax == r) * (g - b) * diff;\n                h += (vmax != r && vmax == g) * ((b - r) * diff + 120.f);\n                h += (vmax != r && vmax != g) * ((r - g) * diff + 240.f);\n                h += (h < 0.f) * 360.f;\n            }\n\n            dst.x = h * hscale;\n            dst.y = l;\n            dst.z = s;\n        }\n\n        template <int bidx, int hr, typename D> static __device__ void RGB2HLSConvert(const uchar* src, D& dst)\n        {\n            float3 buf;\n\n            buf.x = src[0] * (1.f / 255.f);\n            buf.y = src[1] * (1.f / 255.f);\n            buf.z = src[2] * (1.f / 255.f);\n\n            RGB2HLSConvert<bidx, hr>(&buf.x, buf);\n\n            dst.x = saturate_cast<uchar>(buf.x);\n            dst.y = saturate_cast<uchar>(buf.y*255.f);\n            dst.z = saturate_cast<uchar>(buf.z*255.f);\n        }\n\n        template <int bidx, int hr> static __device__ uint RGB2HLSConvert(uint src)\n        {\n            float3 buf;\n\n            buf.x = (0xff & src) * (1.f / 255.f);\n            buf.y = (0xff & (src >> 8)) * (1.f / 255.f);\n            buf.z = (0xff & (src >> 16)) * (1.f / 255.f);\n\n            RGB2HLSConvert<bidx, hr>(&buf.x, buf);\n\n            uint dst = 0xffu << 24;\n\n            dst |= saturate_cast<uchar>(buf.x);\n            dst |= saturate_cast<uchar>(buf.y * 255.f) << 8;\n            dst |= saturate_cast<uchar>(buf.z * 255.f) << 16;\n\n            return dst;\n        }\n\n        template <typename T, int scn, int dcn, int bidx, int hr> struct RGB2HLS\n            : unary_function<typename TypeVec<T, scn>::vec_type, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<T, dcn>::vec_type operator()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n\n                RGB2HLSConvert<bidx, hr>(&src.x, dst);\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ RGB2HLS() {}\n            __host__ __device__ __forceinline__ RGB2HLS(const RGB2HLS&) {}\n        };\n\n        template <int bidx, int hr> struct RGB2HLS<uchar, 4, 4, bidx, hr> : unary_function<uint, uint>\n        {\n            __device__ __forceinline__ uint operator()(uint src) const\n            {\n                return RGB2HLSConvert<bidx, hr>(src);\n            }\n            __host__ __device__ __forceinline__ RGB2HLS() {}\n            __host__ __device__ __forceinline__ RGB2HLS(const RGB2HLS&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(name, scn, dcn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2HLS<T, scn, dcn, bidx, 180> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <typename T> struct name ## _full_traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2HLS<T, scn, dcn, bidx, 256> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <> struct name ## _traits<float> \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2HLS<float, scn, dcn, bidx, 360> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <> struct name ## _full_traits<float> \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2HLS<float, scn, dcn, bidx, 360> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n    namespace color_detail\n    {\n        __constant__ int c_HlsSectorData[6][3] = { {1,3,0}, {1,0,2}, {3,0,1}, {0,2,1}, {0,1,3}, {2,1,0} };\n\n        template <int bidx, int hr, typename T> static __device__ void HLS2RGBConvert(const T& src, float* dst)\n        {\n            const float hscale = 6.0f / hr;\n\n            float h = src.x, l = src.y, s = src.z;\n            float b = l, g = l, r = l;\n\n            if (s != 0)\n            {\n                float p2  = (l <= 0.5f) * l * (1 + s);\n                      p2 += (l > 0.5f) * (l + s - l * s);\n                float p1 = 2 * l - p2;\n\n                h *= hscale;\n\n                if( h < 0 )\n                    do h += 6; while( h < 0 );\n                else if( h >= 6 )\n                    do h -= 6; while( h >= 6 );\n\n                int sector;\n                sector = __float2int_rd(h);\n\n                h -= sector;\n\n                float tab[4];\n                tab[0] = p2;\n                tab[1] = p1;\n                tab[2] = p1 + (p2 - p1) * (1 - h);\n                tab[3] = p1 + (p2 - p1) * h;\n\n                b = tab[c_HlsSectorData[sector][0]];\n                g = tab[c_HlsSectorData[sector][1]];\n                r = tab[c_HlsSectorData[sector][2]];\n            }\n\n            dst[bidx] = b;\n            dst[1] = g;\n            dst[bidx^2] = r;\n        }\n\n        template <int bidx, int hr, typename T> static __device__ void HLS2RGBConvert(const T& src, uchar* dst)\n        {\n            float3 buf;\n\n            buf.x = src.x;\n            buf.y = src.y * (1.f / 255.f);\n            buf.z = src.z * (1.f / 255.f);\n\n            HLS2RGBConvert<bidx, hr>(buf, &buf.x);\n\n            dst[0] = saturate_cast<uchar>(buf.x * 255.f);\n            dst[1] = saturate_cast<uchar>(buf.y * 255.f);\n            dst[2] = saturate_cast<uchar>(buf.z * 255.f);\n        }\n\n        template <int bidx, int hr> static __device__ uint HLS2RGBConvert(uint src)\n        {\n            float3 buf;\n\n            buf.x = 0xff & src;\n            buf.y = (0xff & (src >> 8)) * (1.f / 255.f);\n            buf.z = (0xff & (src >> 16)) * (1.f / 255.f);\n\n            HLS2RGBConvert<bidx, hr>(buf, &buf.x);\n\n            uint dst = 0xffu << 24;\n\n            dst |= saturate_cast<uchar>(buf.x * 255.f);\n            dst |= saturate_cast<uchar>(buf.y * 255.f) << 8;\n            dst |= saturate_cast<uchar>(buf.z * 255.f) << 16;\n\n            return dst;\n        }\n\n        template <typename T, int scn, int dcn, int bidx, int hr> struct HLS2RGB\n            : unary_function<typename TypeVec<T, scn>::vec_type, typename TypeVec<T, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<T, dcn>::vec_type operator()(const typename TypeVec<T, scn>::vec_type& src) const\n            {\n                typename TypeVec<T, dcn>::vec_type dst;\n\n                HLS2RGBConvert<bidx, hr>(src, &dst.x);\n                setAlpha(dst, ColorChannel<T>::max());\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ HLS2RGB() {}\n            __host__ __device__ __forceinline__ HLS2RGB(const HLS2RGB&) {}\n        };\n\n        template <int bidx, int hr> struct HLS2RGB<uchar, 4, 4, bidx, hr> : unary_function<uint, uint>\n        {\n            __device__ __forceinline__ uint operator()(uint src) const\n            {\n                return HLS2RGBConvert<bidx, hr>(src);\n            }\n            __host__ __device__ __forceinline__ HLS2RGB() {}\n            __host__ __device__ __forceinline__ HLS2RGB(const HLS2RGB&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(name, scn, dcn, bidx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::HLS2RGB<T, scn, dcn, bidx, 180> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <typename T> struct name ## _full_traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::HLS2RGB<T, scn, dcn, bidx, 255> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <> struct name ## _traits<float> \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::HLS2RGB<float, scn, dcn, bidx, 360> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    }; \\\n    template <> struct name ## _full_traits<float> \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::HLS2RGB<float, scn, dcn, bidx, 360> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n///////////////////////////////////// RGB <-> Lab /////////////////////////////////////\n\n    namespace color_detail\n    {\n        enum\n        {\n            LAB_CBRT_TAB_SIZE = 1024,\n            GAMMA_TAB_SIZE = 1024,\n            lab_shift = xyz_shift,\n            gamma_shift = 3,\n            lab_shift2 = (lab_shift + gamma_shift),\n            LAB_CBRT_TAB_SIZE_B = (256 * 3 / 2 * (1 << gamma_shift))\n        };\n\n        __constant__ ushort c_sRGBGammaTab_b[] = {0,1,1,2,2,3,4,4,5,6,6,7,8,8,9,10,11,11,12,13,14,15,16,17,19,20,21,22,24,25,26,28,29,31,33,34,36,38,40,41,43,45,47,49,51,54,56,58,60,63,65,68,70,73,75,78,81,83,86,89,92,95,98,101,105,108,111,115,118,121,125,129,132,136,140,144,147,151,155,160,164,168,172,176,181,185,190,194,199,204,209,213,218,223,228,233,239,244,249,255,260,265,271,277,282,288,294,300,306,312,318,324,331,337,343,350,356,363,370,376,383,390,397,404,411,418,426,433,440,448,455,463,471,478,486,494,502,510,518,527,535,543,552,560,569,578,586,595,604,613,622,631,641,650,659,669,678,688,698,707,717,727,737,747,757,768,778,788,799,809,820,831,842,852,863,875,886,897,908,920,931,943,954,966,978,990,1002,1014,1026,1038,1050,1063,1075,1088,1101,1113,1126,1139,1152,1165,1178,1192,1205,1218,1232,1245,1259,1273,1287,1301,1315,1329,1343,1357,1372,1386,1401,1415,1430,1445,1460,1475,1490,1505,1521,1536,1551,1567,1583,1598,1614,1630,1646,1662,1678,1695,1711,1728,1744,1761,1778,1794,1811,1828,1846,1863,1880,1897,1915,1933,1950,1968,1986,2004,2022,2040};\n\n        __device__ __forceinline__ int LabCbrt_b(int i)\n        {\n            float x = i * (1.f / (255.f * (1 << gamma_shift)));\n            return (1 << lab_shift2) * (x < 0.008856f ? x * 7.787f + 0.13793103448275862f : ::cbrtf(x));\n        }\n\n        template <bool srgb, int blueIdx, typename T, typename D>\n        __device__ __forceinline__ void RGB2LabConvert_b(const T& src, D& dst)\n        {\n            const int Lscale = (116 * 255 + 50) / 100;\n            const int Lshift = -((16 * 255 * (1 << lab_shift2) + 50) / 100);\n\n            int B = blueIdx == 0 ? src.x : src.z;\n            int G = src.y;\n            int R = blueIdx == 0 ? src.z : src.x;\n\n            if (srgb)\n            {\n                B = c_sRGBGammaTab_b[B];\n                G = c_sRGBGammaTab_b[G];\n                R = c_sRGBGammaTab_b[R];\n            }\n            else\n            {\n                B <<= 3;\n                G <<= 3;\n                R <<= 3;\n            }\n\n            int fX = LabCbrt_b(CV_DESCALE(B * 778 + G * 1541 + R * 1777, lab_shift));\n            int fY = LabCbrt_b(CV_DESCALE(B * 296 + G * 2929 + R * 871, lab_shift));\n            int fZ = LabCbrt_b(CV_DESCALE(B * 3575 + G * 448 + R * 73, lab_shift));\n\n            int L = CV_DESCALE(Lscale * fY + Lshift, lab_shift2);\n            int a = CV_DESCALE(500 * (fX - fY) + 128 * (1 << lab_shift2), lab_shift2);\n            int b = CV_DESCALE(200 * (fY - fZ) + 128 * (1 << lab_shift2), lab_shift2);\n\n            dst.x = saturate_cast<uchar>(L);\n            dst.y = saturate_cast<uchar>(a);\n            dst.z = saturate_cast<uchar>(b);\n        }\n\n        __device__ __forceinline__ float splineInterpolate(float x, const float* tab, int n)\n        {\n            int ix = ::min(::max(int(x), 0), n-1);\n            x -= ix;\n            tab += ix * 4;\n            return ((tab[3] * x + tab[2]) * x + tab[1]) * x + tab[0];\n        }\n\n        __constant__ float c_sRGBGammaTab[] = {0,7.55853e-05,0.,-7.51331e-13,7.55853e-05,7.55853e-05,-2.25399e-12,3.75665e-12,0.000151171,7.55853e-05,9.01597e-12,-6.99932e-12,0.000226756,7.55853e-05,-1.1982e-11,2.41277e-12,0.000302341,7.55853e-05,-4.74369e-12,1.19001e-11,0.000377927,7.55853e-05,3.09568e-11,-2.09095e-11,0.000453512,7.55853e-05,-3.17718e-11,1.35303e-11,0.000529097,7.55853e-05,8.81905e-12,-4.10782e-12,0.000604683,7.55853e-05,-3.50439e-12,2.90097e-12,0.000680268,7.55853e-05,5.19852e-12,-7.49607e-12,0.000755853,7.55853e-05,-1.72897e-11,2.70833e-11,0.000831439,7.55854e-05,6.39602e-11,-4.26295e-11,0.000907024,7.55854e-05,-6.39282e-11,2.70193e-11,0.000982609,7.55853e-05,1.71298e-11,-7.24017e-12,0.00105819,7.55853e-05,-4.59077e-12,1.94137e-12,0.00113378,7.55853e-05,1.23333e-12,-5.25291e-13,0.00120937,7.55853e-05,-3.42545e-13,1.59799e-13,0.00128495,7.55853e-05,1.36852e-13,-1.13904e-13,0.00136054,7.55853e-05,-2.04861e-13,2.95818e-13,0.00143612,7.55853e-05,6.82594e-13,-1.06937e-12,0.00151171,7.55853e-05,-2.52551e-12,3.98166e-12,0.00158729,7.55853e-05,9.41946e-12,-1.48573e-11,0.00166288,7.55853e-05,-3.51523e-11,5.54474e-11,0.00173846,7.55854e-05,1.3119e-10,-9.0517e-11,0.00181405,7.55854e-05,-1.40361e-10,7.37899e-11,0.00188963,7.55853e-05,8.10085e-11,-8.82272e-11,0.00196522,7.55852e-05,-1.83673e-10,1.62704e-10,0.0020408,7.55853e-05,3.04438e-10,-2.13341e-10,0.00211639,7.55853e-05,-3.35586e-10,2.25e-10,0.00219197,7.55853e-05,3.39414e-10,-2.20997e-10,0.00226756,7.55853e-05,-3.23576e-10,1.93326e-10,0.00234315,7.55853e-05,2.564e-10,-8.66446e-11,0.00241873,7.55855e-05,-3.53328e-12,-7.9578e-11,0.00249432,7.55853e-05,-2.42267e-10,1.72126e-10,0.0025699,7.55853e-05,2.74111e-10,-1.43265e-10,0.00264549,7.55854e-05,-1.55683e-10,-6.47292e-11,0.00272107,7.55849e-05,-3.4987e-10,8.67842e-10,0.00279666,7.55868e-05,2.25366e-09,-3.8723e-09,0.00287224,7.55797e-05,-9.36325e-09,1.5087e-08,0.00294783,7.56063e-05,3.58978e-08,-5.69415e-08,0.00302341,7.55072e-05,-1.34927e-07,2.13144e-07,0.003099,7.58768e-05,5.04507e-07,1.38713e-07,0.00317552,7.7302e-05,9.20646e-07,-1.55186e-07,0.00325359,7.86777e-05,4.55087e-07,4.26813e-08,0.00333276,7.97159e-05,5.83131e-07,-1.06495e-08,0.00341305,8.08502e-05,5.51182e-07,3.87467e-09,0.00349446,8.19642e-05,5.62806e-07,-1.92586e-10,0.00357698,8.30892e-05,5.62228e-07,1.0866e-09,0.00366063,8.4217e-05,5.65488e-07,5.02818e-10,0.00374542,8.53494e-05,5.66997e-07,8.60211e-10,0.00383133,8.6486e-05,5.69577e-07,7.13044e-10,0.00391839,8.76273e-05,5.71716e-07,4.78527e-10,0.00400659,8.87722e-05,5.73152e-07,1.09818e-09,0.00409594,8.99218e-05,5.76447e-07,2.50964e-10,0.00418644,9.10754e-05,5.772e-07,1.15762e-09,0.00427809,9.22333e-05,5.80672e-07,2.40865e-10,0.0043709,9.33954e-05,5.81395e-07,1.13854e-09,0.00446488,9.45616e-05,5.84811e-07,3.27267e-10,0.00456003,9.57322e-05,5.85792e-07,8.1197e-10,0.00465635,9.69062e-05,5.88228e-07,6.15823e-10,0.00475384,9.80845e-05,5.90076e-07,9.15747e-10,0.00485252,9.92674e-05,5.92823e-07,3.778e-10,0.00495238,0.000100454,5.93956e-07,8.32623e-10,0.00505343,0.000101645,5.96454e-07,4.82695e-10,0.00515567,0.000102839,5.97902e-07,9.61904e-10,0.00525911,0.000104038,6.00788e-07,3.26281e-10,0.00536375,0.00010524,6.01767e-07,9.926e-10,0.00546959,0.000106447,6.04745e-07,3.59933e-10,0.00557664,0.000107657,6.05824e-07,8.2728e-10,0.0056849,0.000108871,6.08306e-07,5.21898e-10,0.00579438,0.00011009,6.09872e-07,8.10492e-10,0.00590508,0.000111312,6.12303e-07,4.27046e-10,0.00601701,0.000112538,6.13585e-07,7.40878e-10,0.00613016,0.000113767,6.15807e-07,8.00469e-10,0.00624454,0.000115001,6.18209e-07,2.48178e-10,0.00636016,0.000116238,6.18953e-07,1.00073e-09,0.00647702,0.000117479,6.21955e-07,4.05654e-10,0.00659512,0.000118724,6.23172e-07,6.36192e-10,0.00671447,0.000119973,6.25081e-07,7.74927e-10,0.00683507,0.000121225,6.27406e-07,4.54975e-10,0.00695692,0.000122481,6.28771e-07,6.64841e-10,0.00708003,0.000123741,6.30765e-07,6.10972e-10,0.00720441,0.000125004,6.32598e-07,6.16543e-10,0.00733004,0.000126271,6.34448e-07,6.48204e-10,0.00745695,0.000127542,6.36392e-07,5.15835e-10,0.00758513,0.000128816,6.3794e-07,5.48103e-10,0.00771458,0.000130094,6.39584e-07,1.01706e-09,0.00784532,0.000131376,6.42635e-07,4.0283e-11,0.00797734,0.000132661,6.42756e-07,6.84471e-10,0.00811064,0.000133949,6.4481e-07,9.47144e-10,0.00824524,0.000135241,6.47651e-07,1.83472e-10,0.00838112,0.000136537,6.48201e-07,1.11296e-09,0.00851831,0.000137837,6.5154e-07,2.13163e-11,0.0086568,0.00013914,6.51604e-07,6.64462e-10,0.00879659,0.000140445,6.53598e-07,1.04613e-09,0.00893769,0.000141756,6.56736e-07,-1.92377e-10,0.0090801,0.000143069,6.56159e-07,1.58601e-09,0.00922383,0.000144386,6.60917e-07,-5.63754e-10,0.00936888,0.000145706,6.59226e-07,1.60033e-09,0.00951524,0.000147029,6.64027e-07,-2.49543e-10,0.00966294,0.000148356,6.63278e-07,1.26043e-09,0.00981196,0.000149687,6.67059e-07,-1.35572e-10,0.00996231,0.00015102,6.66653e-07,1.14458e-09,0.010114,0.000152357,6.70086e-07,2.13864e-10,0.010267,0.000153698,6.70728e-07,7.93856e-10,0.0104214,0.000155042,6.73109e-07,3.36077e-10,0.0105771,0.000156389,6.74118e-07,6.55765e-10,0.0107342,0.000157739,6.76085e-07,7.66211e-10,0.0108926,0.000159094,6.78384e-07,4.66116e-12,0.0110524,0.000160451,6.78398e-07,1.07775e-09,0.0112135,0.000161811,6.81631e-07,3.41023e-10,0.011376,0.000163175,6.82654e-07,3.5205e-10,0.0115398,0.000164541,6.8371e-07,1.04473e-09,0.0117051,0.000165912,6.86844e-07,1.25757e-10,0.0118717,0.000167286,6.87222e-07,3.14818e-10,0.0120396,0.000168661,6.88166e-07,1.40886e-09,0.012209,0.000170042,6.92393e-07,-3.62244e-10,0.0123797,0.000171425,6.91306e-07,9.71397e-10,0.0125518,0.000172811,6.9422e-07,2.02003e-10,0.0127253,0.0001742,6.94826e-07,1.01448e-09,0.0129002,0.000175593,6.97869e-07,3.96653e-10,0.0130765,0.00017699,6.99059e-07,1.92927e-10,0.0132542,0.000178388,6.99638e-07,6.94305e-10,0.0134333,0.00017979,7.01721e-07,7.55108e-10,0.0136138,0.000181195,7.03986e-07,1.05918e-11,0.0137957,0.000182603,7.04018e-07,1.06513e-09,0.013979,0.000184015,7.07214e-07,3.85512e-10,0.0141637,0.00018543,7.0837e-07,1.86769e-10,0.0143499,0.000186848,7.0893e-07,7.30116e-10,0.0145374,0.000188268,7.11121e-07,6.17983e-10,0.0147264,0.000189692,7.12975e-07,5.23282e-10,0.0149168,0.000191119,7.14545e-07,8.28398e-11,0.0151087,0.000192549,7.14793e-07,1.0081e-09,0.0153019,0.000193981,7.17817e-07,5.41244e-10,0.0154966,0.000195418,7.19441e-07,-3.7907e-10,0.0156928,0.000196856,7.18304e-07,1.90641e-09,0.0158903,0.000198298,7.24023e-07,-7.27387e-10,0.0160893,0.000199744,7.21841e-07,1.00317e-09,0.0162898,0.000201191,7.24851e-07,4.39949e-10,0.0164917,0.000202642,7.2617e-07,9.6234e-10,0.0166951,0.000204097,7.29057e-07,-5.64019e-10,0.0168999,0.000205554,7.27365e-07,1.29374e-09,0.0171062,0.000207012,7.31247e-07,9.77025e-10,0.017314,0.000208478,7.34178e-07,-1.47651e-09,0.0175232,0.000209942,7.29748e-07,3.06636e-09,0.0177338,0.00021141,7.38947e-07,-1.47573e-09,0.017946,0.000212884,7.3452e-07,9.7386e-10,0.0181596,0.000214356,7.37442e-07,1.30562e-09,0.0183747,0.000215835,7.41358e-07,-6.08376e-10,0.0185913,0.000217315,7.39533e-07,1.12785e-09,0.0188093,0.000218798,7.42917e-07,-1.77711e-10,0.0190289,0.000220283,7.42384e-07,1.44562e-09,0.0192499,0.000221772,7.46721e-07,-1.68825e-11,0.0194724,0.000223266,7.4667e-07,4.84533e-10,0.0196964,0.000224761,7.48124e-07,-5.85298e-11,0.0199219,0.000226257,7.47948e-07,1.61217e-09,0.0201489,0.000227757,7.52785e-07,-8.02136e-10,0.0203775,0.00022926,7.50378e-07,1.59637e-09,0.0206075,0.000230766,7.55167e-07,4.47168e-12,0.020839,0.000232276,7.55181e-07,2.48387e-10,0.021072,0.000233787,7.55926e-07,8.6474e-10,0.0213066,0.000235302,7.5852e-07,1.78299e-11,0.0215426,0.000236819,7.58573e-07,9.26567e-10,0.0217802,0.000238339,7.61353e-07,1.34529e-12,0.0220193,0.000239862,7.61357e-07,9.30659e-10,0.0222599,0.000241387,7.64149e-07,1.34529e-12,0.0225021,0.000242915,7.64153e-07,9.26567e-10,0.0227458,0.000244447,7.66933e-07,1.76215e-11,0.022991,0.00024598,7.66986e-07,8.65536e-10,0.0232377,0.000247517,7.69582e-07,2.45677e-10,0.023486,0.000249057,7.70319e-07,1.44193e-11,0.0237358,0.000250598,7.70363e-07,1.55918e-09,0.0239872,0.000252143,7.7504e-07,-6.63173e-10,0.0242401,0.000253691,7.73051e-07,1.09357e-09,0.0244946,0.000255241,7.76331e-07,1.41919e-11,0.0247506,0.000256793,7.76374e-07,7.12248e-10,0.0250082,0.000258348,7.78511e-07,8.62049e-10,0.0252673,0.000259908,7.81097e-07,-4.35061e-10,0.025528,0.000261469,7.79792e-07,8.7825e-10,0.0257902,0.000263031,7.82426e-07,6.47181e-10,0.0260541,0.000264598,7.84368e-07,2.58448e-10,0.0263194,0.000266167,7.85143e-07,1.81558e-10,0.0265864,0.000267738,7.85688e-07,8.78041e-10,0.0268549,0.000269312,7.88322e-07,3.15102e-11,0.027125,0.000270889,7.88417e-07,8.58525e-10,0.0273967,0.000272468,7.90992e-07,2.59812e-10,0.02767,0.000274051,7.91772e-07,-3.5224e-11,0.0279448,0.000275634,7.91666e-07,1.74377e-09,0.0282212,0.000277223,7.96897e-07,-1.35196e-09,0.0284992,0.000278813,7.92841e-07,1.80141e-09,0.0287788,0.000280404,7.98246e-07,-2.65629e-10,0.0290601,0.000281999,7.97449e-07,1.12374e-09,0.0293428,0.000283598,8.0082e-07,-5.04106e-10,0.0296272,0.000285198,7.99308e-07,8.92764e-10,0.0299132,0.000286799,8.01986e-07,6.58379e-10,0.0302008,0.000288405,8.03961e-07,1.98971e-10,0.0304901,0.000290014,8.04558e-07,4.08382e-10,0.0307809,0.000291624,8.05783e-07,3.01839e-11,0.0310733,0.000293236,8.05874e-07,1.33343e-09,0.0313673,0.000294851,8.09874e-07,2.2419e-10,0.031663,0.000296472,8.10547e-07,-3.67606e-10,0.0319603,0.000298092,8.09444e-07,1.24624e-09,0.0322592,0.000299714,8.13182e-07,-8.92025e-10,0.0325597,0.000301338,8.10506e-07,2.32183e-09,0.0328619,0.000302966,8.17472e-07,-9.44719e-10,0.0331657,0.000304598,8.14638e-07,1.45703e-09,0.0334711,0.000306232,8.19009e-07,-1.15805e-09,0.0337781,0.000307866,8.15535e-07,3.17507e-09,0.0340868,0.000309507,8.2506e-07,-4.09161e-09,0.0343971,0.000311145,8.12785e-07,5.74079e-09,0.0347091,0.000312788,8.30007e-07,-3.97034e-09,0.0350227,0.000314436,8.18096e-07,2.68985e-09,0.035338,0.00031608,8.26166e-07,6.61676e-10,0.0356549,0.000317734,8.28151e-07,-1.61123e-09,0.0359734,0.000319386,8.23317e-07,2.05786e-09,0.0362936,0.000321038,8.29491e-07,8.30388e-10,0.0366155,0.0003227,8.31982e-07,-1.65424e-09,0.036939,0.000324359,8.27019e-07,2.06129e-09,0.0372642,0.000326019,8.33203e-07,8.59719e-10,0.0375911,0.000327688,8.35782e-07,-1.77488e-09,0.0379196,0.000329354,8.30458e-07,2.51464e-09,0.0382498,0.000331023,8.38002e-07,-8.33135e-10,0.0385817,0.000332696,8.35502e-07,8.17825e-10,0.0389152,0.00033437,8.37956e-07,1.28718e-09,0.0392504,0.00033605,8.41817e-07,-2.2413e-09,0.0395873,0.000337727,8.35093e-07,3.95265e-09,0.0399258,0.000339409,8.46951e-07,-2.39332e-09,0.0402661,0.000341095,8.39771e-07,1.89533e-09,0.040608,0.000342781,8.45457e-07,-1.46271e-09,0.0409517,0.000344467,8.41069e-07,3.95554e-09,0.041297,0.000346161,8.52936e-07,-3.18369e-09,0.041644,0.000347857,8.43385e-07,1.32873e-09,0.0419927,0.000349548,8.47371e-07,1.59402e-09,0.0423431,0.000351248,8.52153e-07,-2.54336e-10,0.0426952,0.000352951,8.5139e-07,-5.76676e-10,0.043049,0.000354652,8.4966e-07,2.56114e-09,0.0434045,0.000356359,8.57343e-07,-2.21744e-09,0.0437617,0.000358067,8.50691e-07,2.58344e-09,0.0441206,0.000359776,8.58441e-07,-6.65826e-10,0.0444813,0.000361491,8.56444e-07,7.99218e-11,0.0448436,0.000363204,8.56684e-07,3.46063e-10,0.0452077,0.000364919,8.57722e-07,2.26116e-09,0.0455734,0.000366641,8.64505e-07,-1.94005e-09,0.045941,0.000368364,8.58685e-07,1.77384e-09,0.0463102,0.000370087,8.64007e-07,-1.43005e-09,0.0466811,0.000371811,8.59717e-07,3.94634e-09,0.0470538,0.000373542,8.71556e-07,-3.17946e-09,0.0474282,0.000375276,8.62017e-07,1.32104e-09,0.0478043,0.000377003,8.6598e-07,1.62045e-09,0.0481822,0.00037874,8.70842e-07,-3.52297e-10,0.0485618,0.000380481,8.69785e-07,-2.11211e-10,0.0489432,0.00038222,8.69151e-07,1.19716e-09,0.0493263,0.000383962,8.72743e-07,-8.52026e-10,0.0497111,0.000385705,8.70187e-07,2.21092e-09,0.0500977,0.000387452,8.76819e-07,-5.41339e-10,0.050486,0.000389204,8.75195e-07,-4.5361e-11,0.0508761,0.000390954,8.75059e-07,7.22669e-10,0.0512679,0.000392706,8.77227e-07,8.79936e-10,0.0516615,0.000394463,8.79867e-07,-5.17048e-10,0.0520568,0.000396222,8.78316e-07,1.18833e-09,0.0524539,0.000397982,8.81881e-07,-5.11022e-10,0.0528528,0.000399744,8.80348e-07,8.55683e-10,0.0532534,0.000401507,8.82915e-07,8.13562e-10,0.0536558,0.000403276,8.85356e-07,-3.84603e-10,0.05406,0.000405045,8.84202e-07,7.24962e-10,0.0544659,0.000406816,8.86377e-07,1.20986e-09,0.0548736,0.000408592,8.90006e-07,-1.83896e-09,0.0552831,0.000410367,8.84489e-07,2.42071e-09,0.0556944,0.000412143,8.91751e-07,-3.93413e-10,0.0561074,0.000413925,8.90571e-07,-8.46967e-10,0.0565222,0.000415704,8.8803e-07,3.78122e-09,0.0569388,0.000417491,8.99374e-07,-3.1021e-09,0.0573572,0.000419281,8.90068e-07,1.17658e-09,0.0577774,0.000421064,8.93597e-07,2.12117e-09,0.0581993,0.000422858,8.99961e-07,-2.21068e-09,0.0586231,0.000424651,8.93329e-07,2.9961e-09,0.0590486,0.000426447,9.02317e-07,-2.32311e-09,0.059476,0.000428244,8.95348e-07,2.57122e-09,0.0599051,0.000430043,9.03062e-07,-5.11098e-10,0.0603361,0.000431847,9.01528e-07,-5.27166e-10,0.0607688,0.000433649,8.99947e-07,2.61984e-09,0.0612034,0.000435457,9.07806e-07,-2.50141e-09,0.0616397,0.000437265,9.00302e-07,3.66045e-09,0.0620779,0.000439076,9.11283e-07,-4.68977e-09,0.0625179,0.000440885,8.97214e-07,7.64783e-09,0.0629597,0.000442702,9.20158e-07,-7.27499e-09,0.0634033,0.000444521,8.98333e-07,6.55113e-09,0.0638487,0.000446337,9.17986e-07,-4.02844e-09,0.0642959,0.000448161,9.05901e-07,2.11196e-09,0.064745,0.000449979,9.12236e-07,3.03125e-09,0.0651959,0.000451813,9.2133e-07,-6.78648e-09,0.0656486,0.000453635,9.00971e-07,9.21375e-09,0.0661032,0.000455464,9.28612e-07,-7.71684e-09,0.0665596,0.000457299,9.05462e-07,6.7522e-09,0.0670178,0.00045913,9.25718e-07,-4.3907e-09,0.0674778,0.000460968,9.12546e-07,3.36e-09,0.0679397,0.000462803,9.22626e-07,-1.59876e-09,0.0684034,0.000464644,9.1783e-07,3.0351e-09,0.068869,0.000466488,9.26935e-07,-3.09101e-09,0.0693364,0.000468333,9.17662e-07,1.8785e-09,0.0698057,0.000470174,9.23298e-07,3.02733e-09,0.0702768,0.00047203,9.3238e-07,-6.53722e-09,0.0707497,0.000473875,9.12768e-07,8.22054e-09,0.0712245,0.000475725,9.37429e-07,-3.99325e-09,0.0717012,0.000477588,9.2545e-07,3.01839e-10,0.0721797,0.00047944,9.26355e-07,2.78597e-09,0.0726601,0.000481301,9.34713e-07,-3.99507e-09,0.0731423,0.000483158,9.22728e-07,5.7435e-09,0.0736264,0.000485021,9.39958e-07,-4.07776e-09,0.0741123,0.000486888,9.27725e-07,3.11695e-09,0.0746002,0.000488753,9.37076e-07,-9.39394e-10,0.0750898,0.000490625,9.34258e-07,6.4055e-10,0.0755814,0.000492495,9.3618e-07,-1.62265e-09,0.0760748,0.000494363,9.31312e-07,5.84995e-09,0.0765701,0.000496243,9.48861e-07,-6.87601e-09,0.0770673,0.00049812,9.28233e-07,6.75296e-09,0.0775664,0.000499997,9.48492e-07,-5.23467e-09,0.0780673,0.000501878,9.32788e-07,6.73523e-09,0.0785701,0.000503764,9.52994e-07,-6.80514e-09,0.0790748,0.000505649,9.32578e-07,5.5842e-09,0.0795814,0.000507531,9.49331e-07,-6.30583e-10,0.0800899,0.000509428,9.47439e-07,-3.0618e-09,0.0806003,0.000511314,9.38254e-07,5.4273e-09,0.0811125,0.000513206,9.54536e-07,-3.74627e-09,0.0816267,0.000515104,9.43297e-07,2.10713e-09,0.0821427,0.000516997,9.49618e-07,2.76839e-09,0.0826607,0.000518905,9.57924e-07,-5.73006e-09,0.0831805,0.000520803,9.40733e-07,5.25072e-09,0.0837023,0.0005227,9.56486e-07,-3.71718e-10,0.084226,0.000524612,9.5537e-07,-3.76404e-09,0.0847515,0.000526512,9.44078e-07,7.97735e-09,0.085279,0.000528424,9.6801e-07,-5.79367e-09,0.0858084,0.000530343,9.50629e-07,2.96268e-10,0.0863397,0.000532245,9.51518e-07,4.6086e-09,0.0868729,0.000534162,9.65344e-07,-3.82947e-09,0.087408,0.000536081,9.53856e-07,3.25861e-09,0.087945,0.000537998,9.63631e-07,-1.7543e-09,0.088484,0.00053992,9.58368e-07,3.75849e-09,0.0890249,0.000541848,9.69644e-07,-5.82891e-09,0.0895677,0.00054377,9.52157e-07,4.65593e-09,0.0901124,0.000545688,9.66125e-07,2.10643e-09,0.0906591,0.000547627,9.72444e-07,-5.63099e-09,0.0912077,0.000549555,9.55551e-07,5.51627e-09,0.0917582,0.000551483,9.721e-07,-1.53292e-09,0.0923106,0.000553422,9.67501e-07,6.15311e-10,0.092865,0.000555359,9.69347e-07,-9.28291e-10,0.0934213,0.000557295,9.66562e-07,3.09774e-09,0.0939796,0.000559237,9.75856e-07,-4.01186e-09,0.0945398,0.000561177,9.6382e-07,5.49892e-09,0.095102,0.000563121,9.80317e-07,-3.08258e-09,0.0956661,0.000565073,9.71069e-07,-6.19176e-10,0.0962321,0.000567013,9.69212e-07,5.55932e-09,0.0968001,0.000568968,9.8589e-07,-6.71704e-09,0.09737,0.00057092,9.65738e-07,6.40762e-09,0.0979419,0.00057287,9.84961e-07,-4.0122e-09,0.0985158,0.000574828,9.72925e-07,2.19059e-09,0.0990916,0.000576781,9.79496e-07,2.70048e-09,0.0996693,0.000578748,9.87598e-07,-5.54193e-09,0.100249,0.000580706,9.70972e-07,4.56597e-09,0.100831,0.000582662,9.8467e-07,2.17923e-09,0.101414,0.000584638,9.91208e-07,-5.83232e-09,0.102,0.000586603,9.73711e-07,6.24884e-09,0.102588,0.000588569,9.92457e-07,-4.26178e-09,0.103177,0.000590541,9.79672e-07,3.34781e-09,0.103769,0.00059251,9.89715e-07,-1.67904e-09,0.104362,0.000594485,9.84678e-07,3.36839e-09,0.104958,0.000596464,9.94783e-07,-4.34397e-09,0.105555,0.000598441,9.81751e-07,6.55696e-09,0.106155,0.000600424,1.00142e-06,-6.98272e-09,0.106756,0.000602406,9.80474e-07,6.4728e-09,0.107359,0.000604386,9.99893e-07,-4.00742e-09,0.107965,0.000606374,9.8787e-07,2.10654e-09,0.108572,0.000608356,9.9419e-07,3.0318e-09,0.109181,0.000610353,1.00329e-06,-6.7832e-09,0.109793,0.00061234,9.82936e-07,9.1998e-09,0.110406,0.000614333,1.01054e-06,-7.6642e-09,0.111021,0.000616331,9.87543e-07,6.55579e-09,0.111639,0.000618326,1.00721e-06,-3.65791e-09,0.112258,0.000620329,9.96236e-07,6.25467e-10,0.112879,0.000622324,9.98113e-07,1.15593e-09,0.113503,0.000624323,1.00158e-06,2.20158e-09,0.114128,0.000626333,1.00819e-06,-2.51191e-09,0.114755,0.000628342,1.00065e-06,3.95517e-10,0.115385,0.000630345,1.00184e-06,9.29807e-10,0.116016,0.000632351,1.00463e-06,3.33599e-09,0.116649,0.00063437,1.01463e-06,-6.82329e-09,0.117285,0.000636379,9.94163e-07,9.05595e-09,0.117922,0.000638395,1.02133e-06,-7.04862e-09,0.118562,0.000640416,1.00019e-06,4.23737e-09,0.119203,0.000642429,1.0129e-06,-2.45033e-09,0.119847,0.000644448,1.00555e-06,5.56395e-09,0.120492,0.000646475,1.02224e-06,-4.9043e-09,0.121139,0.000648505,1.00753e-06,-8.47952e-10,0.121789,0.000650518,1.00498e-06,8.29622e-09,0.122441,0.000652553,1.02987e-06,-9.98538e-09,0.123094,0.000654582,9.99914e-07,9.2936e-09,0.12375,0.00065661,1.02779e-06,-4.83707e-09,0.124407,0.000658651,1.01328e-06,2.60411e-09,0.125067,0.000660685,1.0211e-06,-5.57945e-09,0.125729,0.000662711,1.00436e-06,1.22631e-08,0.126392,0.000664756,1.04115e-06,-1.36704e-08,0.127058,0.000666798,1.00014e-06,1.26161e-08,0.127726,0.000668836,1.03798e-06,-6.99155e-09,0.128396,0.000670891,1.01701e-06,4.48836e-10,0.129068,0.000672926,1.01836e-06,5.19606e-09,0.129742,0.000674978,1.03394e-06,-6.3319e-09,0.130418,0.000677027,1.01495e-06,5.2305e-09,0.131096,0.000679073,1.03064e-06,3.11123e-10,0.131776,0.000681135,1.03157e-06,-6.47511e-09,0.132458,0.000683179,1.01215e-06,1.06882e-08,0.133142,0.000685235,1.04421e-06,-6.47519e-09,0.133829,0.000687304,1.02479e-06,3.11237e-10,0.134517,0.000689355,1.02572e-06,5.23035e-09,0.135207,0.000691422,1.04141e-06,-6.3316e-09,0.1359,0.000693486,1.02242e-06,5.19484e-09,0.136594,0.000695546,1.038e-06,4.53497e-10,0.137291,0.000697623,1.03936e-06,-7.00891e-09,0.137989,0.000699681,1.01834e-06,1.2681e-08,0.13869,0.000701756,1.05638e-06,-1.39128e-08,0.139393,0.000703827,1.01464e-06,1.31679e-08,0.140098,0.000705896,1.05414e-06,-8.95659e-09,0.140805,0.000707977,1.02727e-06,7.75742e-09,0.141514,0.000710055,1.05055e-06,-7.17182e-09,0.142225,0.000712135,1.02903e-06,6.02862e-09,0.142938,0.000714211,1.04712e-06,-2.04163e-09,0.143653,0.000716299,1.04099e-06,2.13792e-09,0.144371,0.000718387,1.04741e-06,-6.51009e-09,0.14509,0.000720462,1.02787e-06,9.00123e-09,0.145812,0.000722545,1.05488e-06,3.07523e-10,0.146535,0.000724656,1.0558e-06,-1.02312e-08,0.147261,0.000726737,1.02511e-06,1.0815e-08,0.147989,0.000728819,1.05755e-06,-3.22681e-09,0.148719,0.000730925,1.04787e-06,2.09244e-09,0.14945,0.000733027,1.05415e-06,-5.143e-09,0.150185,0.00073512,1.03872e-06,3.57844e-09,0.150921,0.000737208,1.04946e-06,5.73027e-09,0.151659,0.000739324,1.06665e-06,-1.15983e-08,0.152399,0.000741423,1.03185e-06,1.08605e-08,0.153142,0.000743519,1.06443e-06,-2.04106e-09,0.153886,0.000745642,1.05831e-06,-2.69642e-09,0.154633,0.00074775,1.05022e-06,-2.07425e-09,0.155382,0.000749844,1.044e-06,1.09934e-08,0.156133,0.000751965,1.07698e-06,-1.20972e-08,0.156886,0.000754083,1.04069e-06,7.59288e-09,0.157641,0.000756187,1.06347e-06,-3.37305e-09,0.158398,0.000758304,1.05335e-06,5.89921e-09,0.159158,0.000760428,1.07104e-06,-5.32248e-09,0.159919,0.000762554,1.05508e-06,4.8927e-10,0.160683,0.000764666,1.05654e-06,3.36547e-09,0.161448,0.000766789,1.06664e-06,9.50081e-10,0.162216,0.000768925,1.06949e-06,-7.16568e-09,0.162986,0.000771043,1.04799e-06,1.28114e-08,0.163758,0.000773177,1.08643e-06,-1.42774e-08,0.164533,0.000775307,1.0436e-06,1.44956e-08,0.165309,0.000777438,1.08708e-06,-1.39025e-08,0.166087,0.00077957,1.04538e-06,1.13118e-08,0.166868,0.000781695,1.07931e-06,-1.54224e-09,0.167651,0.000783849,1.07468e-06,-5.14312e-09,0.168436,0.000785983,1.05925e-06,7.21381e-09,0.169223,0.000788123,1.0809e-06,-8.81096e-09,0.170012,0.000790259,1.05446e-06,1.31289e-08,0.170803,0.000792407,1.09385e-06,-1.39022e-08,0.171597,0.000794553,1.05214e-06,1.26775e-08,0.172392,0.000796695,1.09018e-06,-7.00557e-09,0.17319,0.000798855,1.06916e-06,4.43796e-10,0.17399,0.000800994,1.07049e-06,5.23031e-09,0.174792,0.000803151,1.08618e-06,-6.46397e-09,0.175596,0.000805304,1.06679e-06,5.72444e-09,0.176403,0.000807455,1.08396e-06,-1.53254e-09,0.177211,0.000809618,1.07937e-06,4.05673e-10,0.178022,0.000811778,1.08058e-06,-9.01916e-11,0.178835,0.000813939,1.08031e-06,-4.49821e-11,0.17965,0.000816099,1.08018e-06,2.70234e-10,0.180467,0.00081826,1.08099e-06,-1.03603e-09,0.181286,0.000820419,1.07788e-06,3.87392e-09,0.182108,0.000822587,1.0895e-06,4.41522e-10,0.182932,0.000824767,1.09083e-06,-5.63997e-09,0.183758,0.000826932,1.07391e-06,7.21707e-09,0.184586,0.000829101,1.09556e-06,-8.32718e-09,0.185416,0.000831267,1.07058e-06,1.11907e-08,0.186248,0.000833442,1.10415e-06,-6.63336e-09,0.187083,0.00083563,1.08425e-06,4.41484e-10,0.187919,0.0008378,1.08557e-06,4.86754e-09,0.188758,0.000839986,1.10017e-06,-5.01041e-09,0.189599,0.000842171,1.08514e-06,2.72811e-10,0.190443,0.000844342,1.08596e-06,3.91916e-09,0.191288,0.000846526,1.09772e-06,-1.04819e-09,0.192136,0.000848718,1.09457e-06,2.73531e-10,0.192985,0.000850908,1.0954e-06,-4.58916e-11,0.193837,0.000853099,1.09526e-06,-9.01158e-11,0.194692,0.000855289,1.09499e-06,4.06506e-10,0.195548,0.00085748,1.09621e-06,-1.53595e-09,0.196407,0.000859668,1.0916e-06,5.73717e-09,0.197267,0.000861869,1.10881e-06,-6.51164e-09,0.19813,0.000864067,1.08928e-06,5.40831e-09,0.198995,0.000866261,1.1055e-06,-2.20401e-10,0.199863,0.000868472,1.10484e-06,-4.52652e-09,0.200732,0.000870668,1.09126e-06,3.42508e-09,0.201604,0.000872861,1.10153e-06,5.72762e-09,0.202478,0.000875081,1.11872e-06,-1.14344e-08,0.203354,0.000877284,1.08441e-06,1.02076e-08,0.204233,0.000879484,1.11504e-06,4.06355e-10,0.205113,0.000881715,1.11626e-06,-1.18329e-08,0.205996,0.000883912,1.08076e-06,1.71227e-08,0.206881,0.000886125,1.13213e-06,-1.19546e-08,0.207768,0.000888353,1.09626e-06,8.93465e-10,0.208658,0.000890548,1.09894e-06,8.38062e-09,0.209549,0.000892771,1.12408e-06,-4.61353e-09,0.210443,0.000895006,1.11024e-06,-4.82756e-09,0.211339,0.000897212,1.09576e-06,9.02245e-09,0.212238,0.00089943,1.12283e-06,-1.45997e-09,0.213138,0.000901672,1.11845e-06,-3.18255e-09,0.214041,0.000903899,1.1089e-06,-7.11073e-10,0.214946,0.000906115,1.10677e-06,6.02692e-09,0.215853,0.000908346,1.12485e-06,-8.49548e-09,0.216763,0.00091057,1.09936e-06,1.30537e-08,0.217675,0.000912808,1.13852e-06,-1.3917e-08,0.218588,0.000915044,1.09677e-06,1.28121e-08,0.219505,0.000917276,1.13521e-06,-7.5288e-09,0.220423,0.000919523,1.11262e-06,2.40205e-09,0.221344,0.000921756,1.11983e-06,-2.07941e-09,0.222267,0.000923989,1.11359e-06,5.91551e-09,0.223192,0.000926234,1.13134e-06,-6.68149e-09,0.224119,0.000928477,1.11129e-06,5.90929e-09,0.225049,0.000930717,1.12902e-06,-2.05436e-09,0.22598,0.000932969,1.12286e-06,2.30807e-09,0.226915,0.000935222,1.12978e-06,-7.17796e-09,0.227851,0.00093746,1.10825e-06,1.15028e-08,0.228789,0.000939711,1.14276e-06,-9.03083e-09,0.22973,0.000941969,1.11566e-06,9.71932e-09,0.230673,0.00094423,1.14482e-06,-1.49452e-08,0.231619,0.000946474,1.09998e-06,2.02591e-08,0.232566,0.000948735,1.16076e-06,-2.13879e-08,0.233516,0.000950993,1.0966e-06,2.05888e-08,0.234468,0.000953247,1.15837e-06,-1.62642e-08,0.235423,0.000955515,1.10957e-06,1.46658e-08,0.236379,0.000957779,1.15357e-06,-1.25966e-08,0.237338,0.000960048,1.11578e-06,5.91793e-09,0.238299,0.000962297,1.13353e-06,3.82602e-09,0.239263,0.000964576,1.14501e-06,-6.3208e-09,0.240229,0.000966847,1.12605e-06,6.55613e-09,0.241197,0.000969119,1.14572e-06,-5.00268e-09,0.242167,0.000971395,1.13071e-06,-1.44659e-09,0.243139,0.000973652,1.12637e-06,1.07891e-08,0.244114,0.000975937,1.15874e-06,-1.19073e-08,0.245091,0.000978219,1.12302e-06,7.03782e-09,0.246071,0.000980486,1.14413e-06,-1.34276e-09,0.247052,0.00098277,1.1401e-06,-1.66669e-09,0.248036,0.000985046,1.1351e-06,8.00935e-09,0.249022,0.00098734,1.15913e-06,-1.54694e-08,0.250011,0.000989612,1.11272e-06,2.4066e-08,0.251002,0.000991909,1.18492e-06,-2.11901e-08,0.251995,0.000994215,1.12135e-06,1.08973e-09,0.25299,0.000996461,1.12462e-06,1.68311e-08,0.253988,0.000998761,1.17511e-06,-8.8094e-09,0.254987,0.00100109,1.14868e-06,-1.13958e-08,0.25599,0.00100335,1.1145e-06,2.45902e-08,0.256994,0.00100565,1.18827e-06,-2.73603e-08,0.258001,0.00100795,1.10618e-06,2.52464e-08,0.25901,0.00101023,1.18192e-06,-1.40207e-08,0.260021,0.00101256,1.13986e-06,1.03387e-09,0.261035,0.00101484,1.14296e-06,9.8853e-09,0.262051,0.00101715,1.17262e-06,-1.07726e-08,0.263069,0.00101947,1.1403e-06,3.40272e-09,0.26409,0.00102176,1.15051e-06,-2.83827e-09,0.265113,0.00102405,1.142e-06,7.95039e-09,0.266138,0.00102636,1.16585e-06,8.39047e-10,0.267166,0.00102869,1.16836e-06,-1.13066e-08,0.268196,0.00103099,1.13444e-06,1.4585e-08,0.269228,0.00103331,1.1782e-06,-1.72314e-08,0.270262,0.00103561,1.1265e-06,2.45382e-08,0.271299,0.00103794,1.20012e-06,-2.13166e-08,0.272338,0.00104028,1.13617e-06,1.12364e-09,0.273379,0.00104255,1.13954e-06,1.68221e-08,0.274423,0.00104488,1.19001e-06,-8.80736e-09,0.275469,0.00104723,1.16358e-06,-1.13948e-08,0.276518,0.00104953,1.1294e-06,2.45839e-08,0.277568,0.00105186,1.20315e-06,-2.73361e-08,0.278621,0.00105418,1.12114e-06,2.51559e-08,0.279677,0.0010565,1.19661e-06,-1.36832e-08,0.280734,0.00105885,1.15556e-06,-2.25706e-10,0.281794,0.00106116,1.15488e-06,1.45862e-08,0.282857,0.00106352,1.19864e-06,-2.83167e-08,0.283921,0.00106583,1.11369e-06,3.90759e-08,0.284988,0.00106817,1.23092e-06,-3.85801e-08,0.286058,0.00107052,1.11518e-06,2.58375e-08,0.287129,0.00107283,1.19269e-06,-5.16498e-09,0.288203,0.0010752,1.1772e-06,-5.17768e-09,0.28928,0.00107754,1.16167e-06,-3.92671e-09,0.290358,0.00107985,1.14988e-06,2.08846e-08,0.29144,0.00108221,1.21254e-06,-2.00072e-08,0.292523,0.00108458,1.15252e-06,-4.60659e-10,0.293609,0.00108688,1.15114e-06,2.18499e-08,0.294697,0.00108925,1.21669e-06,-2.73343e-08,0.295787,0.0010916,1.13468e-06,2.78826e-08,0.29688,0.00109395,1.21833e-06,-2.45915e-08,0.297975,0.00109632,1.14456e-06,1.08787e-08,0.299073,0.00109864,1.17719e-06,1.08788e-08,0.300172,0.00110102,1.20983e-06,-2.45915e-08,0.301275,0.00110337,1.13605e-06,2.78828e-08,0.302379,0.00110573,1.2197e-06,-2.73348e-08,0.303486,0.00110808,1.1377e-06,2.18518e-08,0.304595,0.00111042,1.20325e-06,-4.67556e-10,0.305707,0.00111283,1.20185e-06,-1.99816e-08,0.306821,0.00111517,1.14191e-06,2.07891e-08,0.307937,0.00111752,1.20427e-06,-3.57026e-09,0.309056,0.00111992,1.19356e-06,-6.50797e-09,0.310177,0.00112228,1.17404e-06,-2.00165e-10,0.3113,0.00112463,1.17344e-06,7.30874e-09,0.312426,0.001127,1.19536e-06,7.67424e-10,0.313554,0.00112939,1.19767e-06,-1.03784e-08,0.314685,0.00113176,1.16653e-06,1.09437e-08,0.315818,0.00113412,1.19936e-06,-3.59406e-09,0.316953,0.00113651,1.18858e-06,3.43251e-09,0.318091,0.0011389,1.19888e-06,-1.0136e-08,0.319231,0.00114127,1.16847e-06,7.30915e-09,0.320374,0.00114363,1.1904e-06,1.07018e-08,0.321518,0.00114604,1.2225e-06,-2.03137e-08,0.322666,0.00114842,1.16156e-06,1.09484e-08,0.323815,0.00115078,1.19441e-06,6.32224e-09,0.324967,0.00115319,1.21337e-06,-6.43509e-09,0.326122,0.00115559,1.19407e-06,-1.03842e-08,0.327278,0.00115795,1.16291e-06,1.81697e-08,0.328438,0.00116033,1.21742e-06,-2.6901e-09,0.329599,0.00116276,1.20935e-06,-7.40939e-09,0.330763,0.00116515,1.18713e-06,2.52533e-09,0.331929,0.00116754,1.1947e-06,-2.69191e-09,0.333098,0.00116992,1.18663e-06,8.24218e-09,0.334269,0.00117232,1.21135e-06,-4.74377e-10,0.335443,0.00117474,1.20993e-06,-6.34471e-09,0.336619,0.00117714,1.1909e-06,-3.94922e-09,0.337797,0.00117951,1.17905e-06,2.21417e-08,0.338978,0.00118193,1.24547e-06,-2.50128e-08,0.340161,0.00118435,1.17043e-06,1.8305e-08,0.341346,0.00118674,1.22535e-06,-1.84048e-08,0.342534,0.00118914,1.17013e-06,2.55121e-08,0.343725,0.00119156,1.24667e-06,-2.40389e-08,0.344917,0.00119398,1.17455e-06,1.10389e-08,0.346113,0.00119636,1.20767e-06,9.68574e-09,0.34731,0.0011988,1.23673e-06,-1.99797e-08,0.34851,0.00120122,1.17679e-06,1.06284e-08,0.349713,0.0012036,1.20867e-06,7.26868e-09,0.350917,0.00120604,1.23048e-06,-9.90072e-09,0.352125,0.00120847,1.20078e-06,2.53177e-09,0.353334,0.00121088,1.20837e-06,-2.26199e-10,0.354546,0.0012133,1.20769e-06,-1.62705e-09,0.355761,0.00121571,1.20281e-06,6.73435e-09,0.356978,0.00121813,1.22302e-06,4.49207e-09,0.358197,0.00122059,1.23649e-06,-2.47027e-08,0.359419,0.00122299,1.16238e-06,3.47142e-08,0.360643,0.00122542,1.26653e-06,-2.47472e-08,0.36187,0.00122788,1.19229e-06,4.66965e-09,0.363099,0.00123028,1.20629e-06,6.06872e-09,0.36433,0.00123271,1.2245e-06,8.57729e-10,0.365564,0.00123516,1.22707e-06,-9.49952e-09,0.366801,0.00123759,1.19858e-06,7.33792e-09,0.36804,0.00124001,1.22059e-06,9.95025e-09,0.369281,0.00124248,1.25044e-06,-1.73366e-08,0.370525,0.00124493,1.19843e-06,-2.08464e-10,0.371771,0.00124732,1.1978e-06,1.81704e-08,0.373019,0.00124977,1.25232e-06,-1.28683e-08,0.37427,0.00125224,1.21371e-06,3.50042e-09,0.375524,0.00125468,1.22421e-06,-1.1335e-09,0.37678,0.00125712,1.22081e-06,1.03345e-09,0.378038,0.00125957,1.22391e-06,-3.00023e-09,0.379299,0.00126201,1.21491e-06,1.09676e-08,0.380562,0.00126447,1.24781e-06,-1.10676e-08,0.381828,0.00126693,1.21461e-06,3.50042e-09,0.383096,0.00126937,1.22511e-06,-2.93403e-09,0.384366,0.00127181,1.21631e-06,8.23574e-09,0.385639,0.00127427,1.24102e-06,-2.06607e-10,0.386915,0.00127675,1.2404e-06,-7.40935e-09,0.388193,0.00127921,1.21817e-06,4.1761e-11,0.389473,0.00128165,1.21829e-06,7.24223e-09,0.390756,0.0012841,1.24002e-06,7.91564e-10,0.392042,0.00128659,1.2424e-06,-1.04086e-08,0.393329,0.00128904,1.21117e-06,1.10405e-08,0.39462,0.0012915,1.24429e-06,-3.951e-09,0.395912,0.00129397,1.23244e-06,4.7634e-09,0.397208,0.00129645,1.24673e-06,-1.51025e-08,0.398505,0.0012989,1.20142e-06,2.58443e-08,0.399805,0.00130138,1.27895e-06,-2.86702e-08,0.401108,0.00130385,1.19294e-06,2.92318e-08,0.402413,0.00130632,1.28064e-06,-2.86524e-08,0.403721,0.0013088,1.19468e-06,2.57731e-08,0.405031,0.00131127,1.272e-06,-1.48355e-08,0.406343,0.00131377,1.2275e-06,3.76652e-09,0.407658,0.00131623,1.23879e-06,-2.30784e-10,0.408976,0.00131871,1.2381e-06,-2.84331e-09,0.410296,0.00132118,1.22957e-06,1.16041e-08,0.411618,0.00132367,1.26438e-06,-1.37708e-08,0.412943,0.00132616,1.22307e-06,1.36768e-08,0.41427,0.00132865,1.2641e-06,-1.1134e-08,0.4156,0.00133114,1.2307e-06,1.05714e-09,0.416933,0.00133361,1.23387e-06,6.90538e-09,0.418267,0.00133609,1.25459e-06,1.12372e-09,0.419605,0.00133861,1.25796e-06,-1.14002e-08,0.420945,0.00134109,1.22376e-06,1.46747e-08,0.422287,0.00134358,1.26778e-06,-1.7496e-08,0.423632,0.00134606,1.21529e-06,2.5507e-08,0.424979,0.00134857,1.29182e-06,-2.49272e-08,0.426329,0.00135108,1.21703e-06,1.45972e-08,0.427681,0.00135356,1.26083e-06,-3.65935e-09,0.429036,0.00135607,1.24985e-06,4.00178e-11,0.430393,0.00135857,1.24997e-06,3.49917e-09,0.431753,0.00136108,1.26047e-06,-1.40366e-08,0.433116,0.00136356,1.21836e-06,2.28448e-08,0.43448,0.00136606,1.28689e-06,-1.77378e-08,0.435848,0.00136858,1.23368e-06,1.83043e-08,0.437218,0.0013711,1.28859e-06,-2.56769e-08,0.43859,0.0013736,1.21156e-06,2.47987e-08,0.439965,0.0013761,1.28595e-06,-1.39133e-08,0.441342,0.00137863,1.24421e-06,1.05202e-09,0.442722,0.00138112,1.24737e-06,9.70507e-09,0.444104,0.00138365,1.27649e-06,-1.00698e-08,0.445489,0.00138617,1.24628e-06,7.72123e-10,0.446877,0.00138867,1.24859e-06,6.98132e-09,0.448267,0.00139118,1.26954e-06,1.10477e-09,0.449659,0.00139373,1.27285e-06,-1.14003e-08,0.451054,0.00139624,1.23865e-06,1.4694e-08,0.452452,0.00139876,1.28273e-06,-1.75734e-08,0.453852,0.00140127,1.23001e-06,2.5797e-08,0.455254,0.00140381,1.3074e-06,-2.60097e-08,0.456659,0.00140635,1.22937e-06,1.86371e-08,0.458067,0.00140886,1.28529e-06,-1.8736e-08,0.459477,0.00141137,1.22908e-06,2.65048e-08,0.46089,0.00141391,1.30859e-06,-2.76784e-08,0.462305,0.00141645,1.22556e-06,2.46043e-08,0.463722,0.00141897,1.29937e-06,-1.11341e-08,0.465143,0.00142154,1.26597e-06,-9.87033e-09,0.466565,0.00142404,1.23636e-06,2.08131e-08,0.467991,0.00142657,1.2988e-06,-1.37773e-08,0.469419,0.00142913,1.25746e-06,4.49378e-09,0.470849,0.00143166,1.27094e-06,-4.19781e-09,0.472282,0.00143419,1.25835e-06,1.22975e-08,0.473717,0.00143674,1.29524e-06,-1.51902e-08,0.475155,0.00143929,1.24967e-06,1.86608e-08,0.476596,0.00144184,1.30566e-06,-2.96506e-08,0.478039,0.00144436,1.2167e-06,4.03368e-08,0.479485,0.00144692,1.33771e-06,-4.22896e-08,0.480933,0.00144947,1.21085e-06,3.94148e-08,0.482384,0.00145201,1.32909e-06,-2.59626e-08,0.483837,0.00145459,1.2512e-06,4.83124e-09,0.485293,0.0014571,1.2657e-06,6.63757e-09,0.486751,0.00145966,1.28561e-06,-1.57911e-09,0.488212,0.00146222,1.28087e-06,-3.21468e-10,0.489676,0.00146478,1.27991e-06,2.86517e-09,0.491142,0.00146735,1.2885e-06,-1.11392e-08,0.49261,0.00146989,1.25508e-06,1.18893e-08,0.494081,0.00147244,1.29075e-06,-6.61574e-09,0.495555,0.001475,1.27091e-06,1.45736e-08,0.497031,0.00147759,1.31463e-06,-2.18759e-08,0.49851,0.00148015,1.249e-06,1.33252e-08,0.499992,0.00148269,1.28897e-06,-1.62277e-09,0.501476,0.00148526,1.28411e-06,-6.83421e-09,0.502962,0.00148781,1.2636e-06,2.89596e-08,0.504451,0.00149042,1.35048e-06,-4.93997e-08,0.505943,0.00149298,1.20228e-06,4.94299e-08,0.507437,0.00149553,1.35057e-06,-2.91107e-08,0.508934,0.00149814,1.26324e-06,7.40848e-09,0.510434,0.00150069,1.28547e-06,-5.23187e-10,0.511936,0.00150326,1.2839e-06,-5.31585e-09,0.51344,0.00150581,1.26795e-06,2.17866e-08,0.514947,0.00150841,1.33331e-06,-2.22257e-08,0.516457,0.00151101,1.26663e-06,7.51178e-09,0.517969,0.00151357,1.28917e-06,-7.82128e-09,0.519484,0.00151613,1.2657e-06,2.37733e-08,0.521002,0.00151873,1.33702e-06,-2.76674e-08,0.522522,0.00152132,1.25402e-06,2.72917e-08,0.524044,0.00152391,1.3359e-06,-2.18949e-08,0.525569,0.00152652,1.27021e-06,6.83372e-10,0.527097,0.00152906,1.27226e-06,1.91613e-08,0.528628,0.00153166,1.32974e-06,-1.77241e-08,0.53016,0.00153427,1.27657e-06,-7.86963e-09,0.531696,0.0015368,1.25296e-06,4.92027e-08,0.533234,0.00153945,1.40057e-06,-6.9732e-08,0.534775,0.00154204,1.19138e-06,5.09114e-08,0.536318,0.00154458,1.34411e-06,-1.4704e-08,0.537864,0.00154722,1.3e-06,7.9048e-09,0.539413,0.00154984,1.32371e-06,-1.69152e-08,0.540964,0.00155244,1.27297e-06,1.51355e-10,0.542517,0.00155499,1.27342e-06,1.63099e-08,0.544074,0.00155758,1.32235e-06,-5.78647e-09,0.545633,0.00156021,1.30499e-06,6.83599e-09,0.547194,0.00156284,1.3255e-06,-2.15575e-08,0.548758,0.00156543,1.26083e-06,1.97892e-08,0.550325,0.00156801,1.32019e-06,2.00525e-09,0.551894,0.00157065,1.32621e-06,-2.78103e-08,0.553466,0.00157322,1.24278e-06,4.96314e-08,0.555041,0.00157586,1.39167e-06,-5.1506e-08,0.556618,0.00157849,1.23716e-06,3.71835e-08,0.558198,0.00158107,1.34871e-06,-3.76233e-08,0.55978,0.00158366,1.23584e-06,5.37052e-08,0.561365,0.00158629,1.39695e-06,-5.79884e-08,0.562953,0.00158891,1.22299e-06,5.90392e-08,0.564543,0.00159153,1.4001e-06,-5.89592e-08,0.566136,0.00159416,1.22323e-06,5.7588e-08,0.567731,0.00159678,1.39599e-06,-5.21835e-08,0.569329,0.00159941,1.23944e-06,3.19369e-08,0.57093,0.00160199,1.33525e-06,-1.59594e-08,0.572533,0.00160461,1.28737e-06,3.19006e-08,0.574139,0.00160728,1.38307e-06,-5.20383e-08,0.575748,0.00160989,1.22696e-06,5.70431e-08,0.577359,0.00161251,1.39809e-06,-5.69247e-08,0.578973,0.00161514,1.22731e-06,5.14463e-08,0.580589,0.00161775,1.38165e-06,-2.9651e-08,0.582208,0.00162042,1.2927e-06,7.55339e-09,0.58383,0.00162303,1.31536e-06,-5.62636e-10,0.585455,0.00162566,1.31367e-06,-5.30281e-09,0.587081,0.00162827,1.29776e-06,2.17738e-08,0.588711,0.00163093,1.36309e-06,-2.21875e-08,0.590343,0.00163359,1.29652e-06,7.37164e-09,0.591978,0.00163621,1.31864e-06,-7.29907e-09,0.593616,0.00163882,1.29674e-06,2.18247e-08,0.595256,0.00164148,1.36221e-06,-2.03952e-08,0.596899,0.00164414,1.30103e-06,1.51241e-10,0.598544,0.00164675,1.30148e-06,1.97902e-08,0.600192,0.00164941,1.36085e-06,-1.97074e-08,0.601843,0.00165207,1.30173e-06,-5.65175e-10,0.603496,0.00165467,1.30004e-06,2.1968e-08,0.605152,0.00165734,1.36594e-06,-2.77024e-08,0.606811,0.00165999,1.28283e-06,2.92369e-08,0.608472,0.00166264,1.37054e-06,-2.96407e-08,0.610136,0.00166529,1.28162e-06,2.97215e-08,0.611803,0.00166795,1.37079e-06,-2.96408e-08,0.613472,0.0016706,1.28186e-06,2.92371e-08,0.615144,0.00167325,1.36957e-06,-2.77031e-08,0.616819,0.00167591,1.28647e-06,2.19708e-08,0.618496,0.00167855,1.35238e-06,-5.75407e-10,0.620176,0.00168125,1.35065e-06,-1.9669e-08,0.621858,0.00168389,1.29164e-06,1.96468e-08,0.623544,0.00168653,1.35058e-06,6.86403e-10,0.625232,0.00168924,1.35264e-06,-2.23924e-08,0.626922,0.00169187,1.28547e-06,2.92788e-08,0.628615,0.00169453,1.3733e-06,-3.51181e-08,0.630311,0.00169717,1.26795e-06,5.15889e-08,0.63201,0.00169987,1.42272e-06,-5.2028e-08,0.633711,0.00170255,1.26663e-06,3.73139e-08,0.635415,0.0017052,1.37857e-06,-3.76227e-08,0.637121,0.00170784,1.2657e-06,5.35722e-08,0.63883,0.00171054,1.42642e-06,-5.74567e-08,0.640542,0.00171322,1.25405e-06,5.70456e-08,0.642257,0.0017159,1.42519e-06,-5.15163e-08,0.643974,0.00171859,1.27064e-06,2.98103e-08,0.645694,0.00172122,1.36007e-06,-8.12016e-09,0.647417,0.00172392,1.33571e-06,2.67039e-09,0.649142,0.0017266,1.34372e-06,-2.56152e-09,0.65087,0.00172928,1.33604e-06,7.57571e-09,0.6526,0.00173197,1.35876e-06,-2.77413e-08,0.654334,0.00173461,1.27554e-06,4.3785e-08,0.65607,0.00173729,1.40689e-06,-2.81896e-08,0.657808,0.00174002,1.32233e-06,9.36893e-09,0.65955,0.00174269,1.35043e-06,-9.28617e-09,0.661294,0.00174536,1.32257e-06,2.77757e-08,0.66304,0.00174809,1.4059e-06,-4.2212e-08,0.66479,0.00175078,1.27926e-06,2.1863e-08,0.666542,0.0017534,1.34485e-06,1.43648e-08,0.668297,0.00175613,1.38795e-06,-1.97177e-08,0.670054,0.00175885,1.3288e-06,4.90115e-09,0.671814,0.00176152,1.3435e-06,1.13232e-10,0.673577,0.00176421,1.34384e-06,-5.3542e-09,0.675343,0.00176688,1.32778e-06,2.13035e-08,0.677111,0.0017696,1.39169e-06,-2.02553e-08,0.678882,0.00177232,1.33092e-06,1.13005e-10,0.680656,0.00177499,1.33126e-06,1.98031e-08,0.682432,0.00177771,1.39067e-06,-1.97211e-08,0.684211,0.00178043,1.33151e-06,-5.2349e-10,0.685993,0.00178309,1.32994e-06,2.18151e-08,0.687777,0.00178582,1.39538e-06,-2.71325e-08,0.689564,0.00178853,1.31398e-06,2.71101e-08,0.691354,0.00179124,1.39531e-06,-2.17035e-08,0.693147,0.00179396,1.3302e-06,9.92865e-11,0.694942,0.00179662,1.3305e-06,2.13063e-08,0.69674,0.00179935,1.39442e-06,-2.57198e-08,0.698541,0.00180206,1.31726e-06,2.19682e-08,0.700344,0.00180476,1.38317e-06,-2.54852e-09,0.70215,0.00180752,1.37552e-06,-1.17741e-08,0.703959,0.00181023,1.3402e-06,-9.95999e-09,0.705771,0.00181288,1.31032e-06,5.16141e-08,0.707585,0.00181566,1.46516e-06,-7.72869e-08,0.709402,0.00181836,1.2333e-06,7.87197e-08,0.711222,0.00182106,1.46946e-06,-5.87781e-08,0.713044,0.00182382,1.29312e-06,3.71834e-08,0.714869,0.00182652,1.40467e-06,-3.03511e-08,0.716697,0.00182924,1.31362e-06,2.46161e-08,0.718528,0.00183194,1.38747e-06,-8.5087e-09,0.720361,0.00183469,1.36194e-06,9.41892e-09,0.722197,0.00183744,1.3902e-06,-2.91671e-08,0.724036,0.00184014,1.3027e-06,4.76448e-08,0.725878,0.00184288,1.44563e-06,-4.22028e-08,0.727722,0.00184565,1.31902e-06,1.95682e-09,0.729569,0.00184829,1.3249e-06,3.43754e-08,0.731419,0.00185104,1.42802e-06,-2.0249e-08,0.733271,0.00185384,1.36727e-06,-1.29838e-08,0.735126,0.00185654,1.32832e-06,1.25794e-08,0.736984,0.00185923,1.36606e-06,2.22711e-08,0.738845,0.00186203,1.43287e-06,-4.20594e-08,0.740708,0.00186477,1.3067e-06,2.67571e-08,0.742574,0.00186746,1.38697e-06,-5.36424e-09,0.744443,0.00187022,1.37087e-06,-5.30023e-09,0.746315,0.00187295,1.35497e-06,2.65653e-08,0.748189,0.00187574,1.43467e-06,-4.13564e-08,0.750066,0.00187848,1.3106e-06,1.9651e-08,0.751946,0.00188116,1.36955e-06,2.23572e-08,0.753828,0.00188397,1.43663e-06,-4.9475e-08,0.755714,0.00188669,1.2882e-06,5.63335e-08,0.757602,0.00188944,1.4572e-06,-5.66499e-08,0.759493,0.00189218,1.28725e-06,5.10567e-08,0.761386,0.00189491,1.44042e-06,-2.83677e-08,0.763283,0.00189771,1.35532e-06,2.80962e-09,0.765182,0.00190042,1.36375e-06,1.71293e-08,0.767083,0.0019032,1.41513e-06,-1.17221e-08,0.768988,0.001906,1.37997e-06,-2.98453e-08,0.770895,0.00190867,1.29043e-06,7.14987e-08,0.772805,0.00191146,1.50493e-06,-7.73354e-08,0.774718,0.00191424,1.27292e-06,5.90292e-08,0.776634,0.00191697,1.45001e-06,-3.9572e-08,0.778552,0.00191975,1.33129e-06,3.9654e-08,0.780473,0.00192253,1.45026e-06,-5.94395e-08,0.782397,0.00192525,1.27194e-06,7.88945e-08,0.784324,0.00192803,1.50862e-06,-7.73249e-08,0.786253,0.00193082,1.27665e-06,5.15913e-08,0.788185,0.00193352,1.43142e-06,-9.83099e-09,0.79012,0.00193636,1.40193e-06,-1.22672e-08,0.792058,0.00193912,1.36513e-06,-7.05275e-10,0.793999,0.00194185,1.36301e-06,1.50883e-08,0.795942,0.00194462,1.40828e-06,-4.33147e-11,0.797888,0.00194744,1.40815e-06,-1.49151e-08,0.799837,0.00195021,1.3634e-06,9.93244e-11,0.801788,0.00195294,1.3637e-06,1.45179e-08,0.803743,0.00195571,1.40725e-06,1.43363e-09,0.8057,0.00195853,1.41155e-06,-2.02525e-08,0.80766,0.00196129,1.35079e-06,1.99718e-08,0.809622,0.00196405,1.41071e-06,-3.01649e-11,0.811588,0.00196687,1.41062e-06,-1.9851e-08,0.813556,0.00196964,1.35107e-06,1.98296e-08,0.815527,0.0019724,1.41056e-06,1.37485e-10,0.817501,0.00197522,1.41097e-06,-2.03796e-08,0.819477,0.00197798,1.34983e-06,2.17763e-08,0.821457,0.00198074,1.41516e-06,-7.12085e-09,0.823439,0.00198355,1.3938e-06,6.70707e-09,0.825424,0.00198636,1.41392e-06,-1.97074e-08,0.827412,0.00198913,1.35479e-06,1.25179e-08,0.829402,0.00199188,1.39235e-06,2.92405e-08,0.831396,0.00199475,1.48007e-06,-6.98755e-08,0.833392,0.0019975,1.27044e-06,7.14477e-08,0.835391,0.00200026,1.48479e-06,-3.71014e-08,0.837392,0.00200311,1.37348e-06,1.73533e-08,0.839397,0.00200591,1.42554e-06,-3.23118e-08,0.841404,0.00200867,1.32861e-06,5.2289e-08,0.843414,0.00201148,1.48547e-06,-5.76348e-08,0.845427,0.00201428,1.31257e-06,5.9041e-08,0.847443,0.00201708,1.48969e-06,-5.93197e-08,0.849461,0.00201988,1.31173e-06,5.90289e-08,0.851482,0.00202268,1.48882e-06,-5.75864e-08,0.853507,0.00202549,1.31606e-06,5.21075e-08,0.855533,0.00202828,1.47238e-06,-3.16344e-08,0.857563,0.00203113,1.37748e-06,1.48257e-08,0.859596,0.00203393,1.42196e-06,-2.76684e-08,0.861631,0.00203669,1.33895e-06,3.62433e-08,0.863669,0.00203947,1.44768e-06,1.90463e-09,0.86571,0.00204237,1.45339e-06,-4.38617e-08,0.867754,0.00204515,1.32181e-06,5.43328e-08,0.8698,0.00204796,1.48481e-06,-5.42603e-08,0.87185,0.00205076,1.32203e-06,4.34989e-08,0.873902,0.00205354,1.45252e-06,-5.26029e-10,0.875957,0.00205644,1.45095e-06,-4.13949e-08,0.878015,0.00205922,1.32676e-06,4.68962e-08,0.880075,0.00206201,1.46745e-06,-2.69807e-08,0.882139,0.00206487,1.38651e-06,1.42181e-09,0.884205,0.00206764,1.39077e-06,2.12935e-08,0.886274,0.00207049,1.45465e-06,-2.69912e-08,0.888346,0.00207332,1.37368e-06,2.70664e-08,0.890421,0.00207615,1.45488e-06,-2.16698e-08,0.892498,0.00207899,1.38987e-06,8.14756e-12,0.894579,0.00208177,1.38989e-06,2.16371e-08,0.896662,0.00208462,1.45481e-06,-2.6952e-08,0.898748,0.00208744,1.37395e-06,2.65663e-08,0.900837,0.00209027,1.45365e-06,-1.97084e-08,0.902928,0.00209312,1.39452e-06,-7.33731e-09,0.905023,0.00209589,1.37251e-06,4.90578e-08,0.90712,0.00209878,1.51968e-06,-6.96845e-08,0.90922,0.00210161,1.31063e-06,5.08664e-08,0.911323,0.00210438,1.46323e-06,-1.45717e-08,0.913429,0.00210727,1.41952e-06,7.42038e-09,0.915538,0.00211013,1.44178e-06,-1.51097e-08,0.917649,0.00211297,1.39645e-06,-6.58618e-09,0.919764,0.00211574,1.37669e-06,4.14545e-08,0.921881,0.00211862,1.50105e-06,-4.00222e-08,0.924001,0.0021215,1.38099e-06,-5.7518e-10,0.926124,0.00212426,1.37926e-06,4.23229e-08,0.92825,0.00212714,1.50623e-06,-4.9507e-08,0.930378,0.00213001,1.35771e-06,3.64958e-08,0.93251,0.00213283,1.4672e-06,-3.68713e-08,0.934644,0.00213566,1.35658e-06,5.13848e-08,0.936781,0.00213852,1.51074e-06,-4.94585e-08,0.938921,0.0021414,1.36236e-06,2.72399e-08,0.941064,0.0021442,1.44408e-06,1.0372e-10,0.943209,0.00214709,1.44439e-06,-2.76547e-08,0.945358,0.0021499,1.36143e-06,5.09106e-08,0.947509,0.00215277,1.51416e-06,-5.67784e-08,0.949663,0.00215563,1.34382e-06,5.69935e-08,0.95182,0.00215849,1.5148e-06,-5.19861e-08,0.95398,0.00216136,1.35885e-06,3.17417e-08,0.956143,0.00216418,1.45407e-06,-1.53758e-08,0.958309,0.00216704,1.40794e-06,2.97615e-08,0.960477,0.00216994,1.49723e-06,-4.40657e-08,0.962649,0.00217281,1.36503e-06,2.72919e-08,0.964823,0.00217562,1.44691e-06,-5.49729e-09,0.967,0.0021785,1.43041e-06,-5.30273e-09,0.96918,0.00218134,1.41451e-06,2.67084e-08,0.971363,0.00218425,1.49463e-06,-4.19265e-08,0.973548,0.00218711,1.36885e-06,2.17881e-08,0.975737,0.00218992,1.43422e-06,1.43789e-08,0.977928,0.00219283,1.47735e-06,-1.96989e-08,0.980122,0.00219572,1.41826e-06,4.81221e-09,0.98232,0.00219857,1.43269e-06,4.50048e-10,0.98452,0.00220144,1.43404e-06,-6.61237e-09,0.986722,0.00220429,1.41421e-06,2.59993e-08,0.988928,0.0022072,1.4922e-06,-3.77803e-08,0.991137,0.00221007,1.37886e-06,5.9127e-09,0.993348,0.00221284,1.3966e-06,1.33339e-07,0.995563,0.00221604,1.79662e-06,-5.98872e-07,0.99778,0.00222015,0.,0.};\n\n        template <bool srgb, int blueIdx, typename T, typename D>\n        __device__ __forceinline__ void RGB2LabConvert_f(const T& src, D& dst)\n        {\n            const float _1_3 = 1.0f / 3.0f;\n            const float _a = 16.0f / 116.0f;\n\n            float B = blueIdx == 0 ? src.x : src.z;\n            float G = src.y;\n            float R = blueIdx == 0 ? src.z : src.x;\n\n            if (srgb)\n            {\n                B = splineInterpolate(B * GAMMA_TAB_SIZE, c_sRGBGammaTab, GAMMA_TAB_SIZE);\n                G = splineInterpolate(G * GAMMA_TAB_SIZE, c_sRGBGammaTab, GAMMA_TAB_SIZE);\n                R = splineInterpolate(R * GAMMA_TAB_SIZE, c_sRGBGammaTab, GAMMA_TAB_SIZE);\n            }\n\n            float X = B * 0.189828f + G * 0.376219f + R * 0.433953f;\n            float Y = B * 0.072169f + G * 0.715160f + R * 0.212671f;\n            float Z = B * 0.872766f + G * 0.109477f + R * 0.017758f;\n\n            float FX = X > 0.008856f ? ::powf(X, _1_3) : (7.787f * X + _a);\n            float FY = Y > 0.008856f ? ::powf(Y, _1_3) : (7.787f * Y + _a);\n            float FZ = Z > 0.008856f ? ::powf(Z, _1_3) : (7.787f * Z + _a);\n\n            float L = Y > 0.008856f ? (116.f * FY - 16.f) : (903.3f * Y);\n            float a = 500.f * (FX - FY);\n            float b = 200.f * (FY - FZ);\n\n            dst.x = L;\n            dst.y = a;\n            dst.z = b;\n        }\n\n        template <typename T, int scn, int dcn, bool srgb, int blueIdx> struct RGB2Lab;\n        template <int scn, int dcn, bool srgb, int blueIdx>\n        struct RGB2Lab<uchar, scn, dcn, srgb, blueIdx>\n            : unary_function<typename TypeVec<uchar, scn>::vec_type, typename TypeVec<uchar, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<uchar, dcn>::vec_type operator ()(const typename TypeVec<uchar, scn>::vec_type& src) const\n            {\n                typename TypeVec<uchar, dcn>::vec_type dst;\n\n                RGB2LabConvert_b<srgb, blueIdx>(src, dst);\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ RGB2Lab() {}\n            __host__ __device__ __forceinline__ RGB2Lab(const RGB2Lab&) {}\n        };\n        template <int scn, int dcn, bool srgb, int blueIdx>\n        struct RGB2Lab<float, scn, dcn, srgb, blueIdx>\n            : unary_function<typename TypeVec<float, scn>::vec_type, typename TypeVec<float, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<float, dcn>::vec_type operator ()(const typename TypeVec<float, scn>::vec_type& src) const\n            {\n                typename TypeVec<float, dcn>::vec_type dst;\n\n                RGB2LabConvert_f<srgb, blueIdx>(src, dst);\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ RGB2Lab() {}\n            __host__ __device__ __forceinline__ RGB2Lab(const RGB2Lab&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(name, scn, dcn, srgb, blueIdx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2Lab<T, scn, dcn, srgb, blueIdx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n    namespace color_detail\n    {\n        __constant__ float c_sRGBInvGammaTab[] = {0,0.0126255,0.,-8.33961e-06,0.0126172,0.0126005,-2.50188e-05,4.1698e-05,0.0252344,0.0126756,0.000100075,-0.000158451,0.0378516,0.0124004,-0.000375277,-0.000207393,0.0496693,0.0110276,-0.000997456,0.00016837,0.0598678,0.00953783,-0.000492346,2.07235e-05,0.068934,0.00861531,-0.000430176,3.62876e-05,0.0771554,0.00786382,-0.000321313,1.87625e-05,0.0847167,0.00727748,-0.000265025,1.53594e-05,0.0917445,0.00679351,-0.000218947,1.10545e-05,0.0983301,0.00638877,-0.000185784,8.66984e-06,0.104542,0.00604322,-0.000159774,6.82996e-06,0.110432,0.00574416,-0.000139284,5.51008e-06,0.116042,0.00548212,-0.000122754,4.52322e-06,0.121406,0.00525018,-0.000109184,3.75557e-06,0.126551,0.00504308,-9.79177e-05,3.17134e-06,0.131499,0.00485676,-8.84037e-05,2.68469e-06,0.13627,0.004688,-8.03496e-05,2.31725e-06,0.14088,0.00453426,-7.33978e-05,2.00868e-06,0.145343,0.00439349,-6.73718e-05,1.74775e-06,0.149671,0.00426399,-6.21286e-05,1.53547e-06,0.153875,0.00414434,-5.75222e-05,1.364e-06,0.157963,0.00403338,-5.34301e-05,1.20416e-06,0.161944,0.00393014,-4.98177e-05,1.09114e-06,0.165825,0.00383377,-4.65443e-05,9.57987e-07,0.169613,0.00374356,-4.36703e-05,8.88359e-07,0.173314,0.00365888,-4.10052e-05,7.7849e-07,0.176933,0.00357921,-3.86697e-05,7.36254e-07,0.180474,0.00350408,-3.6461e-05,6.42534e-07,0.183942,0.00343308,-3.45334e-05,6.12614e-07,0.187342,0.00336586,-3.26955e-05,5.42894e-07,0.190675,0.00330209,-3.10669e-05,5.08967e-07,0.193947,0.00324149,-2.954e-05,4.75977e-07,0.197159,0.00318383,-2.8112e-05,4.18343e-07,0.200315,0.00312887,-2.6857e-05,4.13651e-07,0.203418,0.00307639,-2.5616e-05,3.70847e-07,0.206469,0.00302627,-2.45035e-05,3.3813e-07,0.209471,0.00297828,-2.34891e-05,3.32999e-07,0.212426,0.0029323,-2.24901e-05,2.96826e-07,0.215336,0.00288821,-2.15996e-05,2.82736e-07,0.218203,0.00284586,-2.07514e-05,2.70961e-07,0.221029,0.00280517,-1.99385e-05,2.42744e-07,0.223814,0.00276602,-1.92103e-05,2.33277e-07,0.226561,0.0027283,-1.85105e-05,2.2486e-07,0.229271,0.00269195,-1.78359e-05,2.08383e-07,0.231945,0.00265691,-1.72108e-05,1.93305e-07,0.234585,0.00262307,-1.66308e-05,1.80687e-07,0.237192,0.00259035,-1.60888e-05,1.86632e-07,0.239766,0.00255873,-1.55289e-05,1.60569e-07,0.24231,0.00252815,-1.50472e-05,1.54566e-07,0.244823,0.00249852,-1.45835e-05,1.59939e-07,0.247307,0.00246983,-1.41037e-05,1.29549e-07,0.249763,0.00244202,-1.3715e-05,1.41429e-07,0.252191,0.00241501,-1.32907e-05,1.39198e-07,0.254593,0.00238885,-1.28731e-05,1.06444e-07,0.256969,0.00236342,-1.25538e-05,1.2048e-07,0.25932,0.00233867,-1.21924e-05,1.26892e-07,0.261647,0.00231467,-1.18117e-05,8.72084e-08,0.26395,0.00229131,-1.15501e-05,1.20323e-07,0.26623,0.00226857,-1.11891e-05,8.71514e-08,0.268487,0.00224645,-1.09276e-05,9.73165e-08,0.270723,0.00222489,-1.06357e-05,8.98259e-08,0.272937,0.00220389,-1.03662e-05,7.98218e-08,0.275131,0.00218339,-1.01267e-05,9.75254e-08,0.277304,0.00216343,-9.83416e-06,6.65195e-08,0.279458,0.00214396,-9.63461e-06,8.34313e-08,0.281592,0.00212494,-9.38431e-06,7.65919e-08,0.283708,0.00210641,-9.15454e-06,5.7236e-08,0.285805,0.00208827,-8.98283e-06,8.18939e-08,0.287885,0.00207055,-8.73715e-06,6.2224e-08,0.289946,0.00205326,-8.55047e-06,5.66388e-08,0.291991,0.00203633,-8.38056e-06,6.88491e-08,0.294019,0.00201978,-8.17401e-06,5.53955e-08,0.296031,0.00200359,-8.00782e-06,6.71971e-08,0.298027,0.00198778,-7.80623e-06,3.34439e-08,0.300007,0.00197227,-7.7059e-06,6.7248e-08,0.301971,0.00195706,-7.50416e-06,5.51915e-08,0.303921,0.00194221,-7.33858e-06,3.98124e-08,0.305856,0.00192766,-7.21915e-06,5.37795e-08,0.307776,0.00191338,-7.05781e-06,4.30919e-08,0.309683,0.00189939,-6.92853e-06,4.20744e-08,0.311575,0.00188566,-6.80231e-06,5.68321e-08,0.313454,0.00187223,-6.63181e-06,2.86195e-08,0.31532,0.00185905,-6.54595e-06,3.73075e-08,0.317172,0.00184607,-6.43403e-06,6.05684e-08,0.319012,0.00183338,-6.25233e-06,1.84426e-08,0.320839,0.00182094,-6.197e-06,4.44757e-08,0.322654,0.00180867,-6.06357e-06,4.20729e-08,0.324456,0.00179667,-5.93735e-06,2.56511e-08,0.326247,0.00178488,-5.8604e-06,3.41368e-08,0.328026,0.00177326,-5.75799e-06,4.64177e-08,0.329794,0.00176188,-5.61874e-06,1.86107e-08,0.33155,0.0017507,-5.5629e-06,2.81511e-08,0.333295,0.00173966,-5.47845e-06,4.75987e-08,0.335029,0.00172884,-5.33565e-06,1.98726e-08,0.336753,0.00171823,-5.27604e-06,2.19226e-08,0.338466,0.00170775,-5.21027e-06,4.14483e-08,0.340169,0.00169745,-5.08592e-06,2.09017e-08,0.341861,0.00168734,-5.02322e-06,2.39561e-08,0.343543,0.00167737,-4.95135e-06,3.22852e-08,0.345216,0.00166756,-4.85449e-06,2.57173e-08,0.346878,0.00165793,-4.77734e-06,1.38569e-08,0.348532,0.00164841,-4.73577e-06,3.80634e-08,0.350175,0.00163906,-4.62158e-06,1.27043e-08,0.35181,0.00162985,-4.58347e-06,3.03279e-08,0.353435,0.00162078,-4.49249e-06,1.49961e-08,0.355051,0.00161184,-4.4475e-06,2.88977e-08,0.356659,0.00160303,-4.3608e-06,1.84241e-08,0.358257,0.00159436,-4.30553e-06,1.6616e-08,0.359848,0.0015858,-4.25568e-06,3.43218e-08,0.361429,0.00157739,-4.15272e-06,-4.89172e-09,0.363002,0.00156907,-4.16739e-06,4.48498e-08,0.364567,0.00156087,-4.03284e-06,4.30676e-09,0.366124,0.00155282,-4.01992e-06,2.73303e-08,0.367673,0.00154486,-3.93793e-06,5.58036e-09,0.369214,0.001537,-3.92119e-06,3.97554e-08,0.370747,0.00152928,-3.80193e-06,-1.55904e-08,0.372272,0.00152163,-3.8487e-06,5.24081e-08,0.37379,0.00151409,-3.69147e-06,-1.52272e-08,0.375301,0.00150666,-3.73715e-06,3.83028e-08,0.376804,0.0014993,-3.62225e-06,1.10278e-08,0.378299,0.00149209,-3.58916e-06,6.99326e-09,0.379788,0.00148493,-3.56818e-06,2.06038e-08,0.381269,0.00147786,-3.50637e-06,2.98009e-08,0.382744,0.00147093,-3.41697e-06,-2.05978e-08,0.384211,0.00146404,-3.47876e-06,5.25899e-08,0.385672,0.00145724,-3.32099e-06,-1.09471e-08,0.387126,0.00145056,-3.35383e-06,2.10009e-08,0.388573,0.00144392,-3.29083e-06,1.63501e-08,0.390014,0.00143739,-3.24178e-06,3.00641e-09,0.391448,0.00143091,-3.23276e-06,3.12282e-08,0.392875,0.00142454,-3.13908e-06,-8.70932e-09,0.394297,0.00141824,-3.16521e-06,3.34114e-08,0.395712,0.00141201,-3.06497e-06,-5.72754e-09,0.397121,0.00140586,-3.08215e-06,1.9301e-08,0.398524,0.00139975,-3.02425e-06,1.7931e-08,0.39992,0.00139376,-2.97046e-06,-1.61822e-09,0.401311,0.00138781,-2.97531e-06,1.83442e-08,0.402696,0.00138192,-2.92028e-06,1.76485e-08,0.404075,0.00137613,-2.86733e-06,4.68617e-10,0.405448,0.00137039,-2.86593e-06,1.02794e-08,0.406816,0.00136469,-2.83509e-06,1.80179e-08,0.408178,0.00135908,-2.78104e-06,7.05594e-09,0.409534,0.00135354,-2.75987e-06,1.33633e-08,0.410885,0.00134806,-2.71978e-06,-9.04568e-10,0.41223,0.00134261,-2.72249e-06,2.0057e-08,0.41357,0.00133723,-2.66232e-06,1.00841e-08,0.414905,0.00133194,-2.63207e-06,-7.88835e-10,0.416234,0.00132667,-2.63444e-06,2.28734e-08,0.417558,0.00132147,-2.56582e-06,-1.29785e-09,0.418877,0.00131633,-2.56971e-06,1.21205e-08,0.420191,0.00131123,-2.53335e-06,1.24202e-08,0.421499,0.0013062,-2.49609e-06,-2.19681e-09,0.422803,0.0013012,-2.50268e-06,2.61696e-08,0.424102,0.00129628,-2.42417e-06,-1.30747e-08,0.425396,0.00129139,-2.46339e-06,2.6129e-08,0.426685,0.00128654,-2.38501e-06,-2.03454e-09,0.427969,0.00128176,-2.39111e-06,1.18115e-08,0.429248,0.00127702,-2.35567e-06,1.43932e-08,0.430523,0.00127235,-2.31249e-06,-9.77965e-09,0.431793,0.00126769,-2.34183e-06,2.47253e-08,0.433058,0.00126308,-2.26766e-06,2.85278e-10,0.434319,0.00125855,-2.2668e-06,3.93614e-09,0.435575,0.00125403,-2.25499e-06,1.37722e-08,0.436827,0.00124956,-2.21368e-06,5.79803e-10,0.438074,0.00124513,-2.21194e-06,1.37112e-08,0.439317,0.00124075,-2.1708e-06,4.17973e-09,0.440556,0.00123642,-2.15826e-06,-6.27703e-10,0.44179,0.0012321,-2.16015e-06,2.81332e-08,0.44302,0.00122787,-2.07575e-06,-2.24985e-08,0.444246,0.00122365,-2.14324e-06,3.20586e-08,0.445467,0.00121946,-2.04707e-06,-1.6329e-08,0.446685,0.00121532,-2.09605e-06,3.32573e-08,0.447898,0.00121122,-1.99628e-06,-2.72927e-08,0.449107,0.00120715,-2.07816e-06,4.6111e-08,0.450312,0.00120313,-1.93983e-06,-3.79416e-08,0.451514,0.00119914,-2.05365e-06,4.60507e-08,0.452711,0.00119517,-1.9155e-06,-2.7052e-08,0.453904,0.00119126,-1.99666e-06,3.23551e-08,0.455093,0.00118736,-1.89959e-06,-1.29613e-08,0.456279,0.00118352,-1.93848e-06,1.94905e-08,0.45746,0.0011797,-1.88e-06,-5.39588e-09,0.458638,0.00117593,-1.89619e-06,2.09282e-09,0.459812,0.00117214,-1.88991e-06,2.68267e-08,0.460982,0.00116844,-1.80943e-06,-1.99925e-08,0.462149,0.00116476,-1.86941e-06,2.3341e-08,0.463312,0.00116109,-1.79939e-06,-1.37674e-08,0.464471,0.00115745,-1.84069e-06,3.17287e-08,0.465627,0.00115387,-1.7455e-06,-2.37407e-08,0.466779,0.00115031,-1.81673e-06,3.34315e-08,0.467927,0.00114677,-1.71643e-06,-2.05786e-08,0.469073,0.00114328,-1.77817e-06,1.90802e-08,0.470214,0.00113978,-1.72093e-06,3.86247e-09,0.471352,0.00113635,-1.70934e-06,-4.72759e-09,0.472487,0.00113292,-1.72352e-06,1.50478e-08,0.473618,0.00112951,-1.67838e-06,4.14108e-09,0.474746,0.00112617,-1.66595e-06,-1.80986e-09,0.47587,0.00112283,-1.67138e-06,3.09816e-09,0.476991,0.0011195,-1.66209e-06,1.92198e-08,0.478109,0.00111623,-1.60443e-06,-2.03726e-08,0.479224,0.00111296,-1.66555e-06,3.2468e-08,0.480335,0.00110973,-1.56814e-06,-2.00922e-08,0.481443,0.00110653,-1.62842e-06,1.80983e-08,0.482548,0.00110333,-1.57413e-06,7.30362e-09,0.48365,0.0011002,-1.55221e-06,-1.75107e-08,0.484749,0.00109705,-1.60475e-06,3.29373e-08,0.485844,0.00109393,-1.50594e-06,-2.48315e-08,0.486937,0.00109085,-1.58043e-06,3.65865e-08,0.488026,0.0010878,-1.47067e-06,-3.21078e-08,0.489112,0.00108476,-1.56699e-06,3.22397e-08,0.490195,0.00108172,-1.47027e-06,-7.44391e-09,0.491276,0.00107876,-1.49261e-06,-2.46428e-09,0.492353,0.00107577,-1.5e-06,1.73011e-08,0.493427,0.00107282,-1.4481e-06,-7.13552e-09,0.494499,0.0010699,-1.4695e-06,1.1241e-08,0.495567,0.001067,-1.43578e-06,-8.02637e-09,0.496633,0.0010641,-1.45986e-06,2.08645e-08,0.497695,0.00106124,-1.39726e-06,-1.58271e-08,0.498755,0.0010584,-1.44475e-06,1.26415e-08,0.499812,0.00105555,-1.40682e-06,2.48655e-08,0.500866,0.00105281,-1.33222e-06,-5.24988e-08,0.501918,0.00104999,-1.48972e-06,6.59206e-08,0.502966,0.00104721,-1.29196e-06,-3.237e-08,0.504012,0.00104453,-1.38907e-06,3.95479e-09,0.505055,0.00104176,-1.3772e-06,1.65509e-08,0.506096,0.00103905,-1.32755e-06,-1.05539e-08,0.507133,0.00103637,-1.35921e-06,2.56648e-08,0.508168,0.00103373,-1.28222e-06,-3.25007e-08,0.509201,0.00103106,-1.37972e-06,4.47336e-08,0.51023,0.00102844,-1.24552e-06,-2.72245e-08,0.511258,0.00102587,-1.32719e-06,4.55952e-09,0.512282,0.00102323,-1.31352e-06,8.98645e-09,0.513304,0.00102063,-1.28656e-06,1.90992e-08,0.514323,0.00101811,-1.22926e-06,-2.57786e-08,0.51534,0.00101557,-1.30659e-06,2.44104e-08,0.516355,0.00101303,-1.23336e-06,-1.22581e-08,0.517366,0.00101053,-1.27014e-06,2.4622e-08,0.518376,0.00100806,-1.19627e-06,-2.66253e-08,0.519383,0.00100559,-1.27615e-06,2.22744e-08,0.520387,0.00100311,-1.20932e-06,-2.8679e-09,0.521389,0.00100068,-1.21793e-06,-1.08029e-08,0.522388,0.000998211,-1.25034e-06,4.60795e-08,0.523385,0.000995849,-1.1121e-06,-5.4306e-08,0.52438,0.000993462,-1.27502e-06,5.19354e-08,0.525372,0.000991067,-1.11921e-06,-3.42262e-08,0.526362,0.000988726,-1.22189e-06,2.53646e-08,0.52735,0.000986359,-1.14579e-06,-7.62782e-09,0.528335,0.000984044,-1.16868e-06,5.14668e-09,0.529318,0.000981722,-1.15324e-06,-1.29589e-08,0.530298,0.000979377,-1.19211e-06,4.66888e-08,0.531276,0.000977133,-1.05205e-06,-5.45868e-08,0.532252,0.000974865,-1.21581e-06,5.24495e-08,0.533226,0.000972591,-1.05846e-06,-3.60019e-08,0.534198,0.000970366,-1.16647e-06,3.19537e-08,0.535167,0.000968129,-1.07061e-06,-3.2208e-08,0.536134,0.000965891,-1.16723e-06,3.72738e-08,0.537099,0.000963668,-1.05541e-06,2.32205e-09,0.538061,0.000961564,-1.04844e-06,-4.65618e-08,0.539022,0.000959328,-1.18813e-06,6.47159e-08,0.53998,0.000957146,-9.93979e-07,-3.3488e-08,0.540936,0.000955057,-1.09444e-06,9.63166e-09,0.54189,0.000952897,-1.06555e-06,-5.03871e-09,0.542842,0.000950751,-1.08066e-06,1.05232e-08,0.543792,0.000948621,-1.04909e-06,2.25503e-08,0.544739,0.000946591,-9.81444e-07,-4.11195e-08,0.545685,0.000944504,-1.1048e-06,2.27182e-08,0.546628,0.000942363,-1.03665e-06,9.85146e-09,0.54757,0.000940319,-1.00709e-06,-2.51938e-09,0.548509,0.000938297,-1.01465e-06,2.25858e-10,0.549446,0.000936269,-1.01397e-06,1.61598e-09,0.550381,0.000934246,-1.00913e-06,-6.68983e-09,0.551315,0.000932207,-1.0292e-06,2.51434e-08,0.552246,0.000930224,-9.53765e-07,-3.42793e-08,0.553175,0.000928214,-1.0566e-06,5.23688e-08,0.554102,0.000926258,-8.99497e-07,-5.59865e-08,0.555028,0.000924291,-1.06746e-06,5.23679e-08,0.555951,0.000922313,-9.10352e-07,-3.42763e-08,0.556872,0.00092039,-1.01318e-06,2.51326e-08,0.557792,0.000918439,-9.37783e-07,-6.64954e-09,0.558709,0.000916543,-9.57732e-07,1.46554e-09,0.559625,0.000914632,-9.53335e-07,7.87281e-10,0.560538,0.000912728,-9.50973e-07,-4.61466e-09,0.56145,0.000910812,-9.64817e-07,1.76713e-08,0.56236,0.000908935,-9.11804e-07,-6.46564e-09,0.563268,0.000907092,-9.312e-07,8.19121e-09,0.564174,0.000905255,-9.06627e-07,-2.62992e-08,0.565078,0.000903362,-9.85524e-07,3.74007e-08,0.565981,0.000901504,-8.73322e-07,-4.0942e-09,0.566882,0.000899745,-8.85605e-07,-2.1024e-08,0.56778,0.00089791,-9.48677e-07,2.85854e-08,0.568677,0.000896099,-8.62921e-07,-3.3713e-08,0.569573,0.000894272,-9.64059e-07,4.6662e-08,0.570466,0.000892484,-8.24073e-07,-3.37258e-08,0.571358,0.000890734,-9.25251e-07,2.86365e-08,0.572247,0.00088897,-8.39341e-07,-2.12155e-08,0.573135,0.000887227,-9.02988e-07,-3.37913e-09,0.574022,0.000885411,-9.13125e-07,3.47319e-08,0.574906,0.000883689,-8.08929e-07,-1.63394e-08,0.575789,0.000882022,-8.57947e-07,-2.8979e-08,0.57667,0.00088022,-9.44885e-07,7.26509e-08,0.57755,0.000878548,-7.26932e-07,-8.28106e-08,0.578427,0.000876845,-9.75364e-07,7.97774e-08,0.579303,0.000875134,-7.36032e-07,-5.74849e-08,0.580178,0.00087349,-9.08486e-07,3.09529e-08,0.58105,0.000871765,-8.15628e-07,-6.72206e-09,0.581921,0.000870114,-8.35794e-07,-4.06451e-09,0.582791,0.00086843,-8.47987e-07,2.29799e-08,0.583658,0.000866803,-7.79048e-07,-2.82503e-08,0.584524,0.00086516,-8.63799e-07,3.04167e-08,0.585388,0.000863524,-7.72548e-07,-3.38119e-08,0.586251,0.000861877,-8.73984e-07,4.52264e-08,0.587112,0.000860265,-7.38305e-07,-2.78842e-08,0.587972,0.000858705,-8.21958e-07,6.70567e-09,0.58883,0.000857081,-8.01841e-07,1.06161e-09,0.589686,0.000855481,-7.98656e-07,-1.09521e-08,0.590541,0.00085385,-8.31512e-07,4.27468e-08,0.591394,0.000852316,-7.03272e-07,-4.08257e-08,0.592245,0.000850787,-8.25749e-07,1.34677e-09,0.593095,0.000849139,-8.21709e-07,3.54387e-08,0.593944,0.000847602,-7.15393e-07,-2.38924e-08,0.59479,0.0008461,-7.8707e-07,5.26143e-10,0.595636,0.000844527,-7.85491e-07,2.17879e-08,0.596479,0.000843021,-7.20127e-07,-2.80733e-08,0.597322,0.000841497,-8.04347e-07,3.09005e-08,0.598162,0.000839981,-7.11646e-07,-3.5924e-08,0.599002,0.00083845,-8.19418e-07,5.3191e-08,0.599839,0.000836971,-6.59845e-07,-5.76307e-08,0.600676,0.000835478,-8.32737e-07,5.81227e-08,0.60151,0.000833987,-6.58369e-07,-5.56507e-08,0.602344,0.000832503,-8.25321e-07,4.52706e-08,0.603175,0.000830988,-6.89509e-07,-6.22236e-09,0.604006,0.000829591,-7.08176e-07,-2.03811e-08,0.604834,0.000828113,-7.6932e-07,2.8142e-08,0.605662,0.000826659,-6.84894e-07,-3.25822e-08,0.606488,0.000825191,-7.8264e-07,4.25823e-08,0.607312,0.000823754,-6.54893e-07,-1.85376e-08,0.608135,0.000822389,-7.10506e-07,-2.80365e-08,0.608957,0.000820883,-7.94616e-07,7.1079e-08,0.609777,0.000819507,-5.81379e-07,-7.74655e-08,0.610596,0.000818112,-8.13775e-07,5.9969e-08,0.611413,0.000816665,-6.33868e-07,-4.32013e-08,0.612229,0.000815267,-7.63472e-07,5.32313e-08,0.613044,0.0008139,-6.03778e-07,-5.05148e-08,0.613857,0.000812541,-7.55323e-07,2.96187e-08,0.614669,0.000811119,-6.66466e-07,-8.35545e-09,0.615479,0.000809761,-6.91533e-07,3.80301e-09,0.616288,0.00080839,-6.80124e-07,-6.85666e-09,0.617096,0.000807009,-7.00694e-07,2.36237e-08,0.617903,0.000805678,-6.29822e-07,-2.80336e-08,0.618708,0.000804334,-7.13923e-07,2.8906e-08,0.619511,0.000802993,-6.27205e-07,-2.79859e-08,0.620314,0.000801655,-7.11163e-07,2.34329e-08,0.621114,0.000800303,-6.40864e-07,-6.14108e-09,0.621914,0.000799003,-6.59287e-07,1.13151e-09,0.622712,0.000797688,-6.55893e-07,1.61507e-09,0.62351,0.000796381,-6.51048e-07,-7.59186e-09,0.624305,0.000795056,-6.73823e-07,2.87524e-08,0.6251,0.000793794,-5.87566e-07,-4.7813e-08,0.625893,0.000792476,-7.31005e-07,4.32901e-08,0.626685,0.000791144,-6.01135e-07,-6.13814e-09,0.627475,0.000789923,-6.19549e-07,-1.87376e-08,0.628264,0.000788628,-6.75762e-07,2.14837e-08,0.629052,0.000787341,-6.11311e-07,-7.59265e-09,0.629839,0.000786095,-6.34089e-07,8.88692e-09,0.630625,0.000784854,-6.07428e-07,-2.7955e-08,0.631409,0.000783555,-6.91293e-07,4.33285e-08,0.632192,0.000782302,-5.61307e-07,-2.61497e-08,0.632973,0.000781101,-6.39757e-07,1.6658e-09,0.633754,0.000779827,-6.34759e-07,1.94866e-08,0.634533,0.000778616,-5.76299e-07,-2.00076e-08,0.635311,0.000777403,-6.36322e-07,9.39091e-10,0.636088,0.000776133,-6.33505e-07,1.62512e-08,0.636863,0.000774915,-5.84751e-07,-6.33937e-09,0.637638,0.000773726,-6.03769e-07,9.10609e-09,0.638411,0.000772546,-5.76451e-07,-3.00849e-08,0.639183,0.000771303,-6.66706e-07,5.1629e-08,0.639953,0.000770125,-5.11819e-07,-5.7222e-08,0.640723,0.000768929,-6.83485e-07,5.80497e-08,0.641491,0.000767736,-5.09336e-07,-5.57674e-08,0.642259,0.000766551,-6.76638e-07,4.58105e-08,0.643024,0.000765335,-5.39206e-07,-8.26541e-09,0.643789,0.000764231,-5.64002e-07,-1.27488e-08,0.644553,0.000763065,-6.02249e-07,-3.44168e-10,0.645315,0.00076186,-6.03281e-07,1.41254e-08,0.646077,0.000760695,-5.60905e-07,3.44727e-09,0.646837,0.000759584,-5.50563e-07,-2.79144e-08,0.647596,0.000758399,-6.34307e-07,4.86057e-08,0.648354,0.000757276,-4.88489e-07,-4.72989e-08,0.64911,0.000756158,-6.30386e-07,2.13807e-08,0.649866,0.000754961,-5.66244e-07,2.13808e-08,0.65062,0.000753893,-5.02102e-07,-4.7299e-08,0.651374,0.000752746,-6.43999e-07,4.86059e-08,0.652126,0.000751604,-4.98181e-07,-2.79154e-08,0.652877,0.000750524,-5.81927e-07,3.45089e-09,0.653627,0.000749371,-5.71575e-07,1.41119e-08,0.654376,0.00074827,-5.29239e-07,-2.93748e-10,0.655123,0.00074721,-5.3012e-07,-1.29368e-08,0.65587,0.000746111,-5.68931e-07,-7.56355e-09,0.656616,0.000744951,-5.91621e-07,4.3191e-08,0.65736,0.000743897,-4.62048e-07,-4.59911e-08,0.658103,0.000742835,-6.00022e-07,2.15642e-08,0.658846,0.0007417,-5.35329e-07,1.93389e-08,0.659587,0.000740687,-4.77312e-07,-3.93152e-08,0.660327,0.000739615,-5.95258e-07,1.87126e-08,0.661066,0.00073848,-5.3912e-07,2.40695e-08,0.661804,0.000737474,-4.66912e-07,-5.53859e-08,0.662541,0.000736374,-6.33069e-07,7.82648e-08,0.663277,0.000735343,-3.98275e-07,-7.88593e-08,0.664012,0.00073431,-6.34853e-07,5.83585e-08,0.664745,0.000733215,-4.59777e-07,-3.53656e-08,0.665478,0.000732189,-5.65874e-07,2.34994e-08,0.66621,0.000731128,-4.95376e-07,9.72743e-10,0.66694,0.00073014,-4.92458e-07,-2.73903e-08,0.66767,0.000729073,-5.74629e-07,4.89839e-08,0.668398,0.000728071,-4.27677e-07,-4.93359e-08,0.669126,0.000727068,-5.75685e-07,2.91504e-08,0.669853,0.000726004,-4.88234e-07,-7.66109e-09,0.670578,0.000725004,-5.11217e-07,1.49392e-09,0.671303,0.000723986,-5.06735e-07,1.68533e-09,0.672026,0.000722978,-5.01679e-07,-8.23525e-09,0.672749,0.00072195,-5.26385e-07,3.12556e-08,0.67347,0.000720991,-4.32618e-07,-5.71825e-08,0.674191,0.000719954,-6.04166e-07,7.8265e-08,0.67491,0.00071898,-3.69371e-07,-7.70634e-08,0.675628,0.00071801,-6.00561e-07,5.11747e-08,0.676346,0.000716963,-4.47037e-07,-8.42615e-09,0.677062,0.000716044,-4.72315e-07,-1.747e-08,0.677778,0.000715046,-5.24725e-07,1.87015e-08,0.678493,0.000714053,-4.68621e-07,2.26856e-09,0.679206,0.000713123,-4.61815e-07,-2.77758e-08,0.679919,0.000712116,-5.45142e-07,4.92298e-08,0.68063,0.000711173,-3.97453e-07,-4.99339e-08,0.681341,0.000710228,-5.47255e-07,3.12967e-08,0.682051,0.000709228,-4.53365e-07,-1.56481e-08,0.68276,0.000708274,-5.00309e-07,3.12958e-08,0.683467,0.000707367,-4.06422e-07,-4.99303e-08,0.684174,0.000706405,-5.56213e-07,4.9216e-08,0.68488,0.00070544,-4.08565e-07,-2.77245e-08,0.685585,0.00070454,-4.91738e-07,2.07748e-09,0.686289,0.000703562,-4.85506e-07,1.94146e-08,0.686992,0.00070265,-4.27262e-07,-2.01314e-08,0.687695,0.000701735,-4.87656e-07,1.50616e-09,0.688396,0.000700764,-4.83137e-07,1.41067e-08,0.689096,0.00069984,-4.40817e-07,1.67168e-09,0.689795,0.000698963,-4.35802e-07,-2.07934e-08,0.690494,0.000698029,-4.98182e-07,2.18972e-08,0.691192,0.000697099,-4.32491e-07,-7.19092e-09,0.691888,0.000696212,-4.54064e-07,6.86642e-09,0.692584,0.000695325,-4.33464e-07,-2.02747e-08,0.693279,0.000694397,-4.94288e-07,1.46279e-08,0.693973,0.000693452,-4.50405e-07,2.13678e-08,0.694666,0.000692616,-3.86301e-07,-4.04945e-08,0.695358,0.000691721,-5.07785e-07,2.14009e-08,0.696049,0.00069077,-4.43582e-07,1.44955e-08,0.69674,0.000689926,-4.00096e-07,-1.97783e-08,0.697429,0.000689067,-4.5943e-07,5.01296e-09,0.698118,0.000688163,-4.44392e-07,-2.73521e-10,0.698805,0.000687273,-4.45212e-07,-3.91893e-09,0.699492,0.000686371,-4.56969e-07,1.59493e-08,0.700178,0.000685505,-4.09121e-07,-2.73351e-10,0.700863,0.000684686,-4.09941e-07,-1.4856e-08,0.701548,0.000683822,-4.54509e-07,9.25979e-11,0.702231,0.000682913,-4.54231e-07,1.44855e-08,0.702913,0.000682048,-4.10775e-07,1.56992e-09,0.703595,0.000681231,-4.06065e-07,-2.07652e-08,0.704276,0.000680357,-4.68361e-07,2.18864e-08,0.704956,0.000679486,-4.02701e-07,-7.17595e-09,0.705635,0.000678659,-4.24229e-07,6.81748e-09,0.706313,0.000677831,-4.03777e-07,-2.0094e-08,0.70699,0.000676963,-4.64059e-07,1.39538e-08,0.707667,0.000676077,-4.22197e-07,2.38835e-08,0.708343,0.000675304,-3.50547e-07,-4.98831e-08,0.709018,0.000674453,-5.00196e-07,5.64395e-08,0.709692,0.000673622,-3.30878e-07,-5.66657e-08,0.710365,0.00067279,-5.00875e-07,5.1014e-08,0.711037,0.000671942,-3.47833e-07,-2.81809e-08,0.711709,0.000671161,-4.32376e-07,2.10513e-09,0.712379,0.000670303,-4.2606e-07,1.97604e-08,0.713049,0.00066951,-3.66779e-07,-2.15422e-08,0.713718,0.000668712,-4.31406e-07,6.8038e-09,0.714387,0.000667869,-4.10994e-07,-5.67295e-09,0.715054,0.00066703,-4.28013e-07,1.5888e-08,0.715721,0.000666222,-3.80349e-07,1.72576e-09,0.716387,0.000665467,-3.75172e-07,-2.27911e-08,0.717052,0.000664648,-4.43545e-07,2.9834e-08,0.717716,0.00066385,-3.54043e-07,-3.69401e-08,0.718379,0.000663031,-4.64864e-07,5.83219e-08,0.719042,0.000662277,-2.89898e-07,-7.71382e-08,0.719704,0.000661465,-5.21313e-07,7.14171e-08,0.720365,0.000660637,-3.07061e-07,-2.97161e-08,0.721025,0.000659934,-3.96209e-07,-1.21575e-08,0.721685,0.000659105,-4.32682e-07,1.87412e-08,0.722343,0.000658296,-3.76458e-07,-3.2029e-09,0.723001,0.000657533,-3.86067e-07,-5.9296e-09,0.723659,0.000656743,-4.03856e-07,2.69213e-08,0.724315,0.000656016,-3.23092e-07,-4.21511e-08,0.724971,0.000655244,-4.49545e-07,2.24737e-08,0.725625,0.000654412,-3.82124e-07,1.18611e-08,0.726279,0.000653683,-3.46541e-07,-1.03132e-08,0.726933,0.000652959,-3.7748e-07,-3.02128e-08,0.727585,0.000652114,-4.68119e-07,7.15597e-08,0.728237,0.000651392,-2.5344e-07,-7.72119e-08,0.728888,0.000650654,-4.85075e-07,5.8474e-08,0.729538,0.000649859,-3.09654e-07,-3.74746e-08,0.730188,0.000649127,-4.22077e-07,3.18197e-08,0.730837,0.000648379,-3.26618e-07,-3.01997e-08,0.731485,0.000647635,-4.17217e-07,2.93747e-08,0.732132,0.000646888,-3.29093e-07,-2.76943e-08,0.732778,0.000646147,-4.12176e-07,2.17979e-08,0.733424,0.000645388,-3.46783e-07,1.07292e-10,0.734069,0.000644695,-3.46461e-07,-2.22271e-08,0.734713,0.000643935,-4.13142e-07,2.91963e-08,0.735357,0.000643197,-3.25553e-07,-3.49536e-08,0.736,0.000642441,-4.30414e-07,5.10133e-08,0.736642,0.000641733,-2.77374e-07,-4.98904e-08,0.737283,0.000641028,-4.27045e-07,2.93392e-08,0.737924,0.000640262,-3.39028e-07,-7.86156e-09,0.738564,0.000639561,-3.62612e-07,2.10703e-09,0.739203,0.000638842,-3.56291e-07,-5.6653e-10,0.739842,0.000638128,-3.57991e-07,1.59086e-10,0.740479,0.000637412,-3.57513e-07,-6.98321e-11,0.741116,0.000636697,-3.57723e-07,1.20214e-10,0.741753,0.000635982,-3.57362e-07,-4.10987e-10,0.742388,0.000635266,-3.58595e-07,1.5237e-09,0.743023,0.000634553,-3.54024e-07,-5.68376e-09,0.743657,0.000633828,-3.71075e-07,2.12113e-08,0.744291,0.00063315,-3.07441e-07,-1.95569e-08,0.744924,0.000632476,-3.66112e-07,-2.58816e-09,0.745556,0.000631736,-3.73877e-07,2.99096e-08,0.746187,0.000631078,-2.84148e-07,-5.74454e-08,0.746818,0.000630337,-4.56484e-07,8.06629e-08,0.747448,0.000629666,-2.14496e-07,-8.63922e-08,0.748077,0.000628978,-4.73672e-07,8.60918e-08,0.748706,0.000628289,-2.15397e-07,-7.91613e-08,0.749334,0.000627621,-4.5288e-07,5.17393e-08,0.749961,0.00062687,-2.97663e-07,-8.58662e-09,0.750588,0.000626249,-3.23422e-07,-1.73928e-08,0.751214,0.00062555,-3.75601e-07,1.85532e-08,0.751839,0.000624855,-3.19941e-07,2.78479e-09,0.752463,0.000624223,-3.11587e-07,-2.96923e-08,0.753087,0.000623511,-4.00664e-07,5.63799e-08,0.75371,0.000622879,-2.31524e-07,-7.66179e-08,0.754333,0.000622186,-4.61378e-07,7.12778e-08,0.754955,0.000621477,-2.47545e-07,-2.96794e-08,0.755576,0.000620893,-3.36583e-07,-1.21648e-08,0.756196,0.000620183,-3.73077e-07,1.87339e-08,0.756816,0.000619493,-3.16875e-07,-3.16622e-09,0.757435,0.00061885,-3.26374e-07,-6.0691e-09,0.758054,0.000618179,-3.44581e-07,2.74426e-08,0.758672,0.000617572,-2.62254e-07,-4.40968e-08,0.759289,0.000616915,-3.94544e-07,2.97352e-08,0.759906,0.000616215,-3.05338e-07,-1.52393e-08,0.760522,0.000615559,-3.51056e-07,3.12221e-08,0.761137,0.000614951,-2.5739e-07,-5.00443e-08,0.761751,0.000614286,-4.07523e-07,4.9746e-08,0.762365,0.00061362,-2.58285e-07,-2.97303e-08,0.762979,0.000613014,-3.47476e-07,9.57079e-09,0.763591,0.000612348,-3.18764e-07,-8.55287e-09,0.764203,0.000611685,-3.44422e-07,2.46407e-08,0.764815,0.00061107,-2.705e-07,-3.04053e-08,0.765426,0.000610437,-3.61716e-07,3.73759e-08,0.766036,0.000609826,-2.49589e-07,-5.94935e-08,0.766645,0.000609149,-4.28069e-07,8.13889e-08,0.767254,0.000608537,-1.83902e-07,-8.72483e-08,0.767862,0.000607907,-4.45647e-07,8.87901e-08,0.76847,0.000607282,-1.79277e-07,-8.90983e-08,0.769077,0.000606656,-4.46572e-07,8.87892e-08,0.769683,0.000606029,-1.80204e-07,-8.72446e-08,0.770289,0.000605407,-4.41938e-07,8.13752e-08,0.770894,0.000604768,-1.97812e-07,-5.94423e-08,0.771498,0.000604194,-3.76139e-07,3.71848e-08,0.772102,0.000603553,-2.64585e-07,-2.96922e-08,0.772705,0.000602935,-3.53661e-07,2.19793e-08,0.773308,0.000602293,-2.87723e-07,1.37955e-09,0.77391,0.000601722,-2.83585e-07,-2.74976e-08,0.774512,0.000601072,-3.66077e-07,4.9006e-08,0.775112,0.000600487,-2.19059e-07,-4.93171e-08,0.775712,0.000599901,-3.67011e-07,2.90531e-08,0.776312,0.000599254,-2.79851e-07,-7.29081e-09,0.776911,0.000598673,-3.01724e-07,1.10077e-10,0.777509,0.00059807,-3.01393e-07,6.85053e-09,0.778107,0.000597487,-2.80842e-07,-2.75123e-08,0.778704,0.000596843,-3.63379e-07,4.35939e-08,0.779301,0.000596247,-2.32597e-07,-2.7654e-08,0.779897,0.000595699,-3.15559e-07,7.41741e-09,0.780492,0.00059509,-2.93307e-07,-2.01562e-09,0.781087,0.000594497,-2.99354e-07,6.45059e-10,0.781681,0.000593901,-2.97418e-07,-5.64635e-10,0.782275,0.000593304,-2.99112e-07,1.61347e-09,0.782868,0.000592711,-2.94272e-07,-5.88926e-09,0.78346,0.000592105,-3.1194e-07,2.19436e-08,0.784052,0.000591546,-2.46109e-07,-2.22805e-08,0.784643,0.000590987,-3.1295e-07,7.57368e-09,0.785234,0.000590384,-2.90229e-07,-8.01428e-09,0.785824,0.00058978,-3.14272e-07,2.44834e-08,0.786414,0.000589225,-2.40822e-07,-3.03148e-08,0.787003,0.000588652,-3.31766e-07,3.7171e-08,0.787591,0.0005881,-2.20253e-07,-5.87646e-08,0.788179,0.000587483,-3.96547e-07,7.86782e-08,0.788766,0.000586926,-1.60512e-07,-7.71342e-08,0.789353,0.000586374,-3.91915e-07,5.10444e-08,0.789939,0.000585743,-2.38782e-07,-7.83422e-09,0.790524,0.000585242,-2.62284e-07,-1.97076e-08,0.791109,0.000584658,-3.21407e-07,2.70598e-08,0.791693,0.000584097,-2.40228e-07,-2.89269e-08,0.792277,0.000583529,-3.27008e-07,2.90431e-08,0.792861,0.000582963,-2.39879e-07,-2.76409e-08,0.793443,0.0005824,-3.22802e-07,2.1916e-08,0.794025,0.00058182,-2.57054e-07,-4.18368e-10,0.794607,0.000581305,-2.58309e-07,-2.02425e-08,0.795188,0.000580727,-3.19036e-07,2.17838e-08,0.795768,0.000580155,-2.53685e-07,-7.28814e-09,0.796348,0.000579625,-2.75549e-07,7.36871e-09,0.796928,0.000579096,-2.53443e-07,-2.21867e-08,0.797506,0.000578523,-3.20003e-07,2.17736e-08,0.798085,0.000577948,-2.54683e-07,-5.30296e-09,0.798662,0.000577423,-2.70592e-07,-5.61698e-10,0.799239,0.00057688,-2.72277e-07,7.54977e-09,0.799816,0.000576358,-2.49627e-07,-2.96374e-08,0.800392,0.00057577,-3.38539e-07,5.1395e-08,0.800968,0.000575247,-1.84354e-07,-5.67335e-08,0.801543,0.000574708,-3.54555e-07,5.63297e-08,0.802117,0.000574168,-1.85566e-07,-4.93759e-08,0.802691,0.000573649,-3.33693e-07,2.19646e-08,0.803264,0.000573047,-2.678e-07,2.1122e-08,0.803837,0.000572575,-2.04433e-07,-4.68482e-08,0.804409,0.000572026,-3.44978e-07,4.70613e-08,0.804981,0.000571477,-2.03794e-07,-2.21877e-08,0.805552,0.000571003,-2.70357e-07,-1.79153e-08,0.806123,0.000570408,-3.24103e-07,3.42443e-08,0.806693,0.000569863,-2.2137e-07,1.47556e-10,0.807263,0.000569421,-2.20928e-07,-3.48345e-08,0.807832,0.000568874,-3.25431e-07,1.99812e-08,0.808401,0.000568283,-2.65487e-07,1.45143e-08,0.808969,0.000567796,-2.21945e-07,-1.84338e-08,0.809536,0.000567297,-2.77246e-07,-3.83608e-10,0.810103,0.000566741,-2.78397e-07,1.99683e-08,0.81067,0.000566244,-2.18492e-07,-1.98848e-08,0.811236,0.000565747,-2.78146e-07,-3.38976e-11,0.811801,0.000565191,-2.78248e-07,2.00204e-08,0.812366,0.000564695,-2.18187e-07,-2.04429e-08,0.812931,0.000564197,-2.79516e-07,2.1467e-09,0.813495,0.000563644,-2.73076e-07,1.18561e-08,0.814058,0.000563134,-2.37507e-07,1.00334e-08,0.814621,0.000562689,-2.07407e-07,-5.19898e-08,0.815183,0.000562118,-3.63376e-07,7.87163e-08,0.815745,0.000561627,-1.27227e-07,-8.40616e-08,0.816306,0.000561121,-3.79412e-07,7.87163e-08,0.816867,0.000560598,-1.43263e-07,-5.19898e-08,0.817428,0.000560156,-2.99233e-07,1.00335e-08,0.817988,0.000559587,-2.69132e-07,1.18559e-08,0.818547,0.000559085,-2.33564e-07,2.14764e-09,0.819106,0.000558624,-2.27122e-07,-2.04464e-08,0.819664,0.000558108,-2.88461e-07,2.00334e-08,0.820222,0.000557591,-2.28361e-07,-8.24277e-11,0.820779,0.000557135,-2.28608e-07,-1.97037e-08,0.821336,0.000556618,-2.87719e-07,1.92925e-08,0.821893,0.000556101,-2.29841e-07,2.13831e-09,0.822448,0.000555647,-2.23427e-07,-2.78458e-08,0.823004,0.000555117,-3.06964e-07,4.96402e-08,0.823559,0.000554652,-1.58043e-07,-5.15058e-08,0.824113,0.000554181,-3.12561e-07,3.71737e-08,0.824667,0.000553668,-2.0104e-07,-3.75844e-08,0.82522,0.000553153,-3.13793e-07,5.35592e-08,0.825773,0.000552686,-1.53115e-07,-5.74431e-08,0.826326,0.000552207,-3.25444e-07,5.7004e-08,0.826878,0.000551728,-1.54433e-07,-5.13635e-08,0.827429,0.000551265,-3.08523e-07,2.92406e-08,0.82798,0.000550735,-2.20801e-07,-5.99424e-09,0.828531,0.000550276,-2.38784e-07,-5.26363e-09,0.829081,0.000549782,-2.54575e-07,2.70488e-08,0.82963,0.000549354,-1.73429e-07,-4.33268e-08,0.83018,0.000548878,-3.03409e-07,2.7049e-08,0.830728,0.000548352,-2.22262e-07,-5.26461e-09,0.831276,0.000547892,-2.38056e-07,-5.99057e-09,0.831824,0.000547397,-2.56027e-07,2.92269e-08,0.832371,0.000546973,-1.68347e-07,-5.13125e-08,0.832918,0.000546482,-3.22284e-07,5.68139e-08,0.833464,0.000546008,-1.51843e-07,-5.67336e-08,0.83401,0.000545534,-3.22043e-07,5.09113e-08,0.834555,0.000545043,-1.6931e-07,-2.77022e-08,0.8351,0.000544621,-2.52416e-07,2.92924e-10,0.835644,0.000544117,-2.51537e-07,2.65305e-08,0.836188,0.000543694,-1.71946e-07,-4.68105e-08,0.836732,0.00054321,-3.12377e-07,4.15021e-08,0.837275,0.000542709,-1.87871e-07,1.13355e-11,0.837817,0.000542334,-1.87837e-07,-4.15474e-08,0.838359,0.000541833,-3.12479e-07,4.69691e-08,0.838901,0.000541349,-1.71572e-07,-2.71196e-08,0.839442,0.000540925,-2.52931e-07,1.90462e-09,0.839983,0.000540425,-2.47217e-07,1.95011e-08,0.840523,0.000539989,-1.88713e-07,-2.03045e-08,0.841063,0.00053955,-2.49627e-07,2.11216e-09,0.841602,0.000539057,-2.4329e-07,1.18558e-08,0.842141,0.000538606,-2.07723e-07,1.00691e-08,0.842679,0.000538221,-1.77516e-07,-5.21324e-08,0.843217,0.00053771,-3.33913e-07,7.92513e-08,0.843755,0.00053728,-9.6159e-08,-8.60587e-08,0.844292,0.000536829,-3.54335e-07,8.61696e-08,0.844828,0.000536379,-9.58263e-08,-7.98057e-08,0.845364,0.000535948,-3.35243e-07,5.42394e-08,0.8459,0.00053544,-1.72525e-07,-1.79426e-08,0.846435,0.000535041,-2.26353e-07,1.75308e-08,0.84697,0.000534641,-1.73761e-07,-5.21806e-08,0.847505,0.000534137,-3.30302e-07,7.19824e-08,0.848038,0.000533692,-1.14355e-07,-5.69349e-08,0.848572,0.000533293,-2.8516e-07,3.65479e-08,0.849105,0.000532832,-1.75516e-07,-2.96519e-08,0.849638,0.000532392,-2.64472e-07,2.2455e-08,0.85017,0.000531931,-1.97107e-07,-5.63451e-10,0.850702,0.000531535,-1.98797e-07,-2.02011e-08,0.851233,0.000531077,-2.59401e-07,2.17634e-08,0.851764,0.000530623,-1.94111e-07,-7.24794e-09,0.852294,0.000530213,-2.15854e-07,7.22832e-09,0.852824,0.000529803,-1.94169e-07,-2.16653e-08,0.853354,0.00052935,-2.59165e-07,1.98283e-08,0.853883,0.000528891,-1.9968e-07,1.95678e-09,0.854412,0.000528497,-1.9381e-07,-2.76554e-08,0.85494,0.000528027,-2.76776e-07,4.90603e-08,0.855468,0.00052762,-1.29596e-07,-4.93764e-08,0.855995,0.000527213,-2.77725e-07,2.92361e-08,0.856522,0.000526745,-1.90016e-07,-7.96341e-09,0.857049,0.000526341,-2.13907e-07,2.61752e-09,0.857575,0.000525922,-2.06054e-07,-2.50665e-09,0.8581,0.000525502,-2.13574e-07,7.40906e-09,0.858626,0.000525097,-1.91347e-07,-2.71296e-08,0.859151,0.000524633,-2.72736e-07,4.15048e-08,0.859675,0.000524212,-1.48221e-07,-1.96802e-08,0.860199,0.000523856,-2.07262e-07,-2.23886e-08,0.860723,0.000523375,-2.74428e-07,4.96299e-08,0.861246,0.000522975,-1.25538e-07,-5.69216e-08,0.861769,0.000522553,-2.96303e-07,5.88473e-08,0.862291,0.000522137,-1.19761e-07,-5.92584e-08,0.862813,0.00052172,-2.97536e-07,5.8977e-08,0.863334,0.000521301,-1.20605e-07,-5.74403e-08,0.863855,0.000520888,-2.92926e-07,5.15751e-08,0.864376,0.000520457,-1.38201e-07,-2.96506e-08,0.864896,0.000520091,-2.27153e-07,7.42277e-09,0.865416,0.000519659,-2.04885e-07,-4.05057e-11,0.865936,0.00051925,-2.05006e-07,-7.26074e-09,0.866455,0.000518818,-2.26788e-07,2.90835e-08,0.866973,0.000518451,-1.39538e-07,-4.94686e-08,0.867492,0.000518024,-2.87944e-07,4.95814e-08,0.868009,0.000517597,-1.39199e-07,-2.96479e-08,0.868527,0.000517229,-2.28143e-07,9.40539e-09,0.869044,0.000516801,-1.99927e-07,-7.9737e-09,0.86956,0.000516378,-2.23848e-07,2.24894e-08,0.870077,0.000515997,-1.5638e-07,-2.23793e-08,0.870592,0.000515617,-2.23517e-07,7.42302e-09,0.871108,0.000515193,-2.01248e-07,-7.31283e-09,0.871623,0.000514768,-2.23187e-07,2.18283e-08,0.872137,0.000514387,-1.57702e-07,-2.03959e-08,0.872652,0.000514011,-2.1889e-07,1.50711e-10,0.873165,0.000513573,-2.18437e-07,1.97931e-08,0.873679,0.000513196,-1.59058e-07,-1.97183e-08,0.874192,0.000512819,-2.18213e-07,-5.24324e-10,0.874704,0.000512381,-2.19786e-07,2.18156e-08,0.875217,0.000512007,-1.54339e-07,-2.71336e-08,0.875728,0.000511616,-2.3574e-07,2.71141e-08,0.87624,0.000511226,-1.54398e-07,-2.17182e-08,0.876751,0.000510852,-2.19552e-07,1.54131e-10,0.877262,0.000510414,-2.1909e-07,2.11017e-08,0.877772,0.000510039,-1.55785e-07,-2.49562e-08,0.878282,0.000509652,-2.30654e-07,1.91183e-08,0.878791,0.000509248,-1.73299e-07,8.08751e-09,0.8793,0.000508926,-1.49036e-07,-5.14684e-08,0.879809,0.000508474,-3.03441e-07,7.85766e-08,0.880317,0.000508103,-6.77112e-08,-8.40242e-08,0.880825,0.000507715,-3.19784e-07,7.87063e-08,0.881333,0.000507312,-8.36649e-08,-5.19871e-08,0.88184,0.000506988,-2.39626e-07,1.00327e-08,0.882346,0.000506539,-2.09528e-07,1.18562e-08,0.882853,0.000506156,-1.73959e-07,2.14703e-09,0.883359,0.000505814,-1.67518e-07,-2.04444e-08,0.883864,0.000505418,-2.28851e-07,2.00258e-08,0.88437,0.00050502,-1.68774e-07,-5.42855e-11,0.884874,0.000504682,-1.68937e-07,-1.98087e-08,0.885379,0.000504285,-2.28363e-07,1.96842e-08,0.885883,0.000503887,-1.6931e-07,6.76342e-10,0.886387,0.000503551,-1.67281e-07,-2.23896e-08,0.88689,0.000503149,-2.3445e-07,2.92774e-08,0.887393,0.000502768,-1.46618e-07,-3.51152e-08,0.887896,0.00050237,-2.51963e-07,5.15787e-08,0.888398,0.00050202,-9.72271e-08,-5.19903e-08,0.8889,0.00050167,-2.53198e-07,3.71732e-08,0.889401,0.000501275,-1.41678e-07,-3.70978e-08,0.889902,0.00050088,-2.52972e-07,5.16132e-08,0.890403,0.000500529,-9.81321e-08,-5.01459e-08,0.890903,0.000500183,-2.4857e-07,2.9761e-08,0.891403,0.000499775,-1.59287e-07,-9.29351e-09,0.891903,0.000499428,-1.87167e-07,7.41301e-09,0.892402,0.000499076,-1.64928e-07,-2.03585e-08,0.892901,0.000498685,-2.26004e-07,1.44165e-08,0.893399,0.000498276,-1.82754e-07,2.22974e-08,0.893898,0.000497978,-1.15862e-07,-4.40013e-08,0.894395,0.000497614,-2.47866e-07,3.44985e-08,0.894893,0.000497222,-1.44371e-07,-3.43882e-08,0.89539,0.00049683,-2.47535e-07,4.34497e-08,0.895886,0.000496465,-1.17186e-07,-2.02012e-08,0.896383,0.00049617,-1.7779e-07,-2.22497e-08,0.896879,0.000495748,-2.44539e-07,4.95952e-08,0.897374,0.000495408,-9.57532e-08,-5.69217e-08,0.89787,0.000495045,-2.66518e-07,5.88823e-08,0.898364,0.000494689,-8.98713e-08,-5.93983e-08,0.898859,0.000494331,-2.68066e-07,5.95017e-08,0.899353,0.000493973,-8.95613e-08,-5.9399e-08,0.899847,0.000493616,-2.67758e-07,5.8885e-08,0.90034,0.000493257,-9.11033e-08,-5.69317e-08,0.900833,0.000492904,-2.61898e-07,4.96326e-08,0.901326,0.000492529,-1.13001e-07,-2.23893e-08,0.901819,0.000492236,-1.80169e-07,-1.968e-08,0.902311,0.000491817,-2.39209e-07,4.15047e-08,0.902802,0.000491463,-1.14694e-07,-2.71296e-08,0.903293,0.000491152,-1.96083e-07,7.409e-09,0.903784,0.000490782,-1.73856e-07,-2.50645e-09,0.904275,0.000490427,-1.81376e-07,2.61679e-09,0.904765,0.000490072,-1.73525e-07,-7.96072e-09,0.905255,0.000489701,-1.97407e-07,2.92261e-08,0.905745,0.000489394,-1.09729e-07,-4.93389e-08,0.906234,0.000489027,-2.57746e-07,4.89204e-08,0.906723,0.000488658,-1.10985e-07,-2.71333e-08,0.907211,0.000488354,-1.92385e-07,8.30861e-12,0.907699,0.00048797,-1.9236e-07,2.71001e-08,0.908187,0.000487666,-1.1106e-07,-4.88041e-08,0.908675,0.000487298,-2.57472e-07,4.89069e-08,0.909162,0.000486929,-1.10751e-07,-2.76143e-08,0.909649,0.000486625,-1.93594e-07,1.9457e-09,0.910135,0.000486244,-1.87757e-07,1.98315e-08,0.910621,0.000485928,-1.28262e-07,-2.16671e-08,0.911107,0.000485606,-1.93264e-07,7.23216e-09,0.911592,0.000485241,-1.71567e-07,-7.26152e-09,0.912077,0.000484877,-1.93352e-07,2.18139e-08,0.912562,0.000484555,-1.2791e-07,-2.03895e-08,0.913047,0.000484238,-1.89078e-07,1.39494e-10,0.913531,0.000483861,-1.8866e-07,1.98315e-08,0.914014,0.000483543,-1.29165e-07,-1.98609e-08,0.914498,0.000483225,-1.88748e-07,7.39912e-12,0.914981,0.000482847,-1.88726e-07,1.98313e-08,0.915463,0.000482529,-1.29232e-07,-1.9728e-08,0.915946,0.000482212,-1.88416e-07,-5.24035e-10,0.916428,0.000481833,-1.89988e-07,2.18241e-08,0.916909,0.000481519,-1.24516e-07,-2.71679e-08,0.917391,0.000481188,-2.06019e-07,2.72427e-08,0.917872,0.000480858,-1.24291e-07,-2.21985e-08,0.918353,0.000480543,-1.90886e-07,1.94644e-09,0.918833,0.000480167,-1.85047e-07,1.44127e-08,0.919313,0.00047984,-1.41809e-07,7.39438e-12,0.919793,0.000479556,-1.41787e-07,-1.44423e-08,0.920272,0.000479229,-1.85114e-07,-1.84291e-09,0.920751,0.000478854,-1.90642e-07,2.18139e-08,0.92123,0.000478538,-1.25201e-07,-2.58081e-08,0.921708,0.00047821,-2.02625e-07,2.18139e-08,0.922186,0.00047787,-1.37183e-07,-1.84291e-09,0.922664,0.00047759,-1.42712e-07,-1.44423e-08,0.923141,0.000477262,-1.86039e-07,7.34701e-12,0.923618,0.00047689,-1.86017e-07,1.44129e-08,0.924095,0.000476561,-1.42778e-07,1.94572e-09,0.924572,0.000476281,-1.36941e-07,-2.21958e-08,0.925048,0.000475941,-2.03528e-07,2.72327e-08,0.925523,0.000475615,-1.2183e-07,-2.71304e-08,0.925999,0.00047529,-2.03221e-07,2.16843e-08,0.926474,0.000474949,-1.38168e-07,-2.16005e-12,0.926949,0.000474672,-1.38175e-07,-2.16756e-08,0.927423,0.000474331,-2.03202e-07,2.71001e-08,0.927897,0.000474006,-1.21902e-07,-2.71201e-08,0.928371,0.000473681,-2.03262e-07,2.17757e-08,0.928845,0.00047334,-1.37935e-07,-3.78028e-10,0.929318,0.000473063,-1.39069e-07,-2.02636e-08,0.929791,0.000472724,-1.9986e-07,2.18276e-08,0.930263,0.000472389,-1.34377e-07,-7.44231e-09,0.930736,0.000472098,-1.56704e-07,7.94165e-09,0.931208,0.000471809,-1.32879e-07,-2.43243e-08,0.931679,0.00047147,-2.05851e-07,2.97508e-08,0.932151,0.000471148,-1.16599e-07,-3.50742e-08,0.932622,0.000470809,-2.21822e-07,5.09414e-08,0.933092,0.000470518,-6.89976e-08,-4.94821e-08,0.933563,0.000470232,-2.17444e-07,2.77775e-08,0.934033,0.00046988,-1.34111e-07,-2.02351e-09,0.934502,0.000469606,-1.40182e-07,-1.96835e-08,0.934972,0.000469267,-1.99232e-07,2.11529e-08,0.935441,0.000468932,-1.35774e-07,-5.32332e-09,0.93591,0.000468644,-1.51743e-07,1.40413e-10,0.936378,0.000468341,-1.51322e-07,4.76166e-09,0.936846,0.000468053,-1.37037e-07,-1.9187e-08,0.937314,0.000467721,-1.94598e-07,1.23819e-08,0.937782,0.000467369,-1.57453e-07,2.92642e-08,0.938249,0.000467142,-6.96601e-08,-6.98342e-08,0.938716,0.000466793,-2.79163e-07,7.12586e-08,0.939183,0.000466449,-6.53869e-08,-3.63863e-08,0.939649,0.000466209,-1.74546e-07,1.46818e-08,0.940115,0.000465904,-1.305e-07,-2.2341e-08,0.940581,0.000465576,-1.97523e-07,1.50774e-08,0.941046,0.000465226,-1.52291e-07,2.16359e-08,0.941511,0.000464986,-8.73832e-08,-4.20162e-08,0.941976,0.000464685,-2.13432e-07,2.72198e-08,0.942441,0.00046434,-1.31773e-07,-7.2581e-09,0.942905,0.000464055,-1.53547e-07,1.81263e-09,0.943369,0.000463753,-1.48109e-07,7.58386e-12,0.943832,0.000463457,-1.48086e-07,-1.84298e-09,0.944296,0.000463155,-1.53615e-07,7.36433e-09,0.944759,0.00046287,-1.31522e-07,-2.76143e-08,0.945221,0.000462524,-2.14365e-07,4.34883e-08,0.945684,0.000462226,-8.39003e-08,-2.71297e-08,0.946146,0.000461977,-1.65289e-07,5.42595e-09,0.946608,0.000461662,-1.49012e-07,5.42593e-09,0.947069,0.000461381,-1.32734e-07,-2.71297e-08,0.94753,0.000461034,-2.14123e-07,4.34881e-08,0.947991,0.000460736,-8.36585e-08,-2.76134e-08,0.948452,0.000460486,-1.66499e-07,7.36083e-09,0.948912,0.000460175,-1.44416e-07,-1.82993e-09,0.949372,0.000459881,-1.49906e-07,-4.11073e-11,0.949832,0.000459581,-1.50029e-07,1.99434e-09,0.950291,0.000459287,-1.44046e-07,-7.93627e-09,0.950751,0.000458975,-1.67855e-07,2.97507e-08,0.951209,0.000458728,-7.86029e-08,-5.1462e-08,0.951668,0.000458417,-2.32989e-07,5.6888e-08,0.952126,0.000458121,-6.2325e-08,-5.68806e-08,0.952584,0.000457826,-2.32967e-07,5.14251e-08,0.953042,0.000457514,-7.86914e-08,-2.96107e-08,0.953499,0.000457268,-1.67523e-07,7.41296e-09,0.953956,0.000456955,-1.45285e-07,-4.11262e-11,0.954413,0.000456665,-1.45408e-07,-7.24847e-09,0.95487,0.000456352,-1.67153e-07,2.9035e-08,0.955326,0.000456105,-8.00484e-08,-4.92869e-08,0.955782,0.000455797,-2.27909e-07,4.89032e-08,0.956238,0.000455488,-8.11994e-08,-2.71166e-08,0.956693,0.000455244,-1.62549e-07,-4.13678e-11,0.957148,0.000454919,-1.62673e-07,2.72821e-08,0.957603,0.000454675,-8.0827e-08,-4.94824e-08,0.958057,0.000454365,-2.29274e-07,5.14382e-08,0.958512,0.000454061,-7.49597e-08,-3.7061e-08,0.958965,0.0004538,-1.86143e-07,3.72013e-08,0.959419,0.000453539,-7.45389e-08,-5.21396e-08,0.959873,0.000453234,-2.30958e-07,5.21476e-08,0.960326,0.000452928,-7.45146e-08,-3.72416e-08,0.960778,0.000452667,-1.8624e-07,3.72143e-08,0.961231,0.000452407,-7.45967e-08,-5.20109e-08,0.961683,0.000452101,-2.30629e-07,5.16199e-08,0.962135,0.000451795,-7.57696e-08,-3.52595e-08,0.962587,0.000451538,-1.81548e-07,2.98133e-08,0.963038,0.000451264,-9.2108e-08,-2.43892e-08,0.963489,0.000451007,-1.65276e-07,8.13892e-09,0.96394,0.000450701,-1.40859e-07,-8.16647e-09,0.964391,0.000450394,-1.65358e-07,2.45269e-08,0.964841,0.000450137,-9.17775e-08,-3.03367e-08,0.965291,0.000449863,-1.82787e-07,3.7215e-08,0.965741,0.000449609,-7.11424e-08,-5.89188e-08,0.96619,0.00044929,-2.47899e-07,7.92509e-08,0.966639,0.000449032,-1.01462e-08,-7.92707e-08,0.967088,0.000448773,-2.47958e-07,5.90181e-08,0.967537,0.000448455,-7.0904e-08,-3.75925e-08,0.967985,0.0004482,-1.83681e-07,3.17471e-08,0.968433,0.000447928,-8.84401e-08,-2.97913e-08,0.968881,0.000447662,-1.77814e-07,2.78133e-08,0.969329,0.000447389,-9.4374e-08,-2.18572e-08,0.969776,0.000447135,-1.59946e-07,1.10134e-11,0.970223,0.000446815,-1.59913e-07,2.18132e-08,0.97067,0.000446561,-9.44732e-08,-2.76591e-08,0.971116,0.000446289,-1.7745e-07,2.92185e-08,0.971562,0.000446022,-8.97948e-08,-2.96104e-08,0.972008,0.000445753,-1.78626e-07,2.96185e-08,0.972454,0.000445485,-8.97706e-08,-2.92588e-08,0.972899,0.000445218,-1.77547e-07,2.78123e-08,0.973344,0.000444946,-9.41103e-08,-2.23856e-08,0.973789,0.000444691,-1.61267e-07,2.12559e-09,0.974233,0.000444374,-1.5489e-07,1.38833e-08,0.974678,0.000444106,-1.13241e-07,1.94591e-09,0.975122,0.000443886,-1.07403e-07,-2.16669e-08,0.975565,0.000443606,-1.72404e-07,2.5117e-08,0.976009,0.000443336,-9.70526e-08,-1.91963e-08,0.976452,0.000443085,-1.54642e-07,-7.93627e-09,0.976895,0.000442752,-1.7845e-07,5.09414e-08,0.977338,0.000442548,-2.56262e-08,-7.66201e-08,0.97778,0.000442266,-2.55486e-07,7.67249e-08,0.978222,0.000441986,-2.53118e-08,-5.14655e-08,0.978664,0.000441781,-1.79708e-07,9.92773e-09,0.979106,0.000441451,-1.49925e-07,1.17546e-08,0.979547,0.000441186,-1.14661e-07,2.65868e-09,0.979988,0.000440965,-1.06685e-07,-2.23893e-08,0.980429,0.000440684,-1.73853e-07,2.72939e-08,0.980869,0.000440419,-9.19716e-08,-2.71816e-08,0.98131,0.000440153,-1.73516e-07,2.18278e-08,0.98175,0.000439872,-1.08033e-07,-5.24833e-10,0.982189,0.000439654,-1.09607e-07,-1.97284e-08,0.982629,0.000439376,-1.68793e-07,1.98339e-08,0.983068,0.000439097,-1.09291e-07,-2.62901e-12,0.983507,0.000438879,-1.09299e-07,-1.98234e-08,0.983946,0.000438601,-1.68769e-07,1.96916e-08,0.984384,0.000438322,-1.09694e-07,6.6157e-10,0.984823,0.000438105,-1.0771e-07,-2.23379e-08,0.985261,0.000437823,-1.74723e-07,2.90855e-08,0.985698,0.00043756,-8.74669e-08,-3.43992e-08,0.986136,0.000437282,-1.90665e-07,4.89068e-08,0.986573,0.000437048,-4.39442e-08,-4.20188e-08,0.98701,0.000436834,-1.7e-07,-4.11073e-11,0.987446,0.000436494,-1.70124e-07,4.21832e-08,0.987883,0.00043628,-4.35742e-08,-4.94824e-08,0.988319,0.000436044,-1.92021e-07,3.6537e-08,0.988755,0.00043577,-8.24102e-08,-3.70611e-08,0.989191,0.000435494,-1.93593e-07,5.21026e-08,0.989626,0.000435263,-3.72855e-08,-5.21402e-08,0.990061,0.000435032,-1.93706e-07,3.7249e-08,0.990496,0.000434756,-8.19592e-08,-3.72512e-08,0.990931,0.000434481,-1.93713e-07,5.21511e-08,0.991365,0.00043425,-3.72595e-08,-5.21439e-08,0.991799,0.000434019,-1.93691e-07,3.72152e-08,0.992233,0.000433743,-8.20456e-08,-3.71123e-08,0.992667,0.000433468,-1.93382e-07,5.16292e-08,0.9931,0.000433236,-3.84947e-08,-5.01953e-08,0.993533,0.000433008,-1.89081e-07,2.99427e-08,0.993966,0.00043272,-9.92525e-08,-9.9708e-09,0.994399,0.000432491,-1.29165e-07,9.94051e-09,0.994831,0.000432263,-9.93434e-08,-2.97912e-08,0.995263,0.000431975,-1.88717e-07,4.96198e-08,0.995695,0.000431746,-3.98578e-08,-4.94785e-08,0.996127,0.000431518,-1.88293e-07,2.9085e-08,0.996558,0.000431229,-1.01038e-07,-7.25675e-09,0.996989,0.000431005,-1.22809e-07,-5.79945e-11,0.99742,0.000430759,-1.22983e-07,7.48873e-09,0.997851,0.000430536,-1.00516e-07,-2.98969e-08,0.998281,0.000430245,-1.90207e-07,5.24942e-08,0.998711,0.000430022,-3.27246e-08,-6.08706e-08,0.999141,0.000429774,-2.15336e-07,7.17788e-08,0.999571,0.000429392,0.,0.};\n\n        template <bool srgb, int blueIdx, typename T, typename D>\n        __device__ __forceinline__ void Lab2RGBConvert_f(const T& src, D& dst)\n        {\n            const float lThresh = 0.008856f * 903.3f;\n            const float fThresh = 7.787f * 0.008856f + 16.0f / 116.0f;\n\n            float Y, fy;\n\n            if (src.x <= lThresh)\n            {\n                Y = src.x / 903.3f;\n                fy = 7.787f * Y + 16.0f / 116.0f;\n            }\n            else\n            {\n                fy = (src.x + 16.0f) / 116.0f;\n                Y = fy * fy * fy;\n            }\n\n            float X = src.y / 500.0f + fy;\n            float Z = fy - src.z / 200.0f;\n\n            if (X <= fThresh)\n                X = (X - 16.0f / 116.0f) / 7.787f;\n            else\n                X = X * X * X;\n\n            if (Z <= fThresh)\n                Z = (Z - 16.0f / 116.0f) / 7.787f;\n            else\n                Z = Z * Z * Z;\n\n            float B = 0.052891f * X - 0.204043f * Y + 1.151152f * Z;\n            float G = -0.921235f * X + 1.875991f * Y + 0.045244f * Z;\n            float R = 3.079933f * X - 1.537150f * Y - 0.542782f * Z;\n\n            if (srgb)\n            {\n                B = splineInterpolate(B * GAMMA_TAB_SIZE, c_sRGBInvGammaTab, GAMMA_TAB_SIZE);\n                G = splineInterpolate(G * GAMMA_TAB_SIZE, c_sRGBInvGammaTab, GAMMA_TAB_SIZE);\n                R = splineInterpolate(R * GAMMA_TAB_SIZE, c_sRGBInvGammaTab, GAMMA_TAB_SIZE);\n            }\n\n            dst.x = blueIdx == 0 ? B : R;\n            dst.y = G;\n            dst.z = blueIdx == 0 ? R : B;\n            setAlpha(dst, ColorChannel<float>::max());\n        }\n\n        template <bool srgb, int blueIdx, typename T, typename D>\n        __device__ __forceinline__ void Lab2RGBConvert_b(const T& src, D& dst)\n        {\n            float3 srcf, dstf;\n\n            srcf.x = src.x * (100.f / 255.f);\n            srcf.y = src.y - 128;\n            srcf.z = src.z - 128;\n\n            Lab2RGBConvert_f<srgb, blueIdx>(srcf, dstf);\n\n            dst.x = saturate_cast<uchar>(dstf.x * 255.f);\n            dst.y = saturate_cast<uchar>(dstf.y * 255.f);\n            dst.z = saturate_cast<uchar>(dstf.z * 255.f);\n            setAlpha(dst, ColorChannel<uchar>::max());\n        }\n\n        template <typename T, int scn, int dcn, bool srgb, int blueIdx> struct Lab2RGB;\n        template <int scn, int dcn, bool srgb, int blueIdx>\n        struct Lab2RGB<uchar, scn, dcn, srgb, blueIdx>\n            : unary_function<typename TypeVec<uchar, scn>::vec_type, typename TypeVec<uchar, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<uchar, dcn>::vec_type operator ()(const typename TypeVec<uchar, scn>::vec_type& src) const\n            {\n                typename TypeVec<uchar, dcn>::vec_type dst;\n\n                Lab2RGBConvert_b<srgb, blueIdx>(src, dst);\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ Lab2RGB() {}\n            __host__ __device__ __forceinline__ Lab2RGB(const Lab2RGB&) {}\n        };\n        template <int scn, int dcn, bool srgb, int blueIdx>\n        struct Lab2RGB<float, scn, dcn, srgb, blueIdx>\n            : unary_function<typename TypeVec<float, scn>::vec_type, typename TypeVec<float, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<float, dcn>::vec_type operator ()(const typename TypeVec<float, scn>::vec_type& src) const\n            {\n                typename TypeVec<float, dcn>::vec_type dst;\n\n                Lab2RGBConvert_f<srgb, blueIdx>(src, dst);\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ Lab2RGB() {}\n            __host__ __device__ __forceinline__ Lab2RGB(const Lab2RGB&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(name, scn, dcn, srgb, blueIdx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::Lab2RGB<T, scn, dcn, srgb, blueIdx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n///////////////////////////////////// RGB <-> Luv /////////////////////////////////////\n\n    namespace color_detail\n    {\n        __constant__ float c_LabCbrtTab[] = {0.137931,0.0114066,0.,1.18859e-07,0.149338,0.011407,3.56578e-07,-5.79396e-07,0.160745,0.0114059,-1.38161e-06,2.16892e-06,0.172151,0.0114097,5.12516e-06,-8.0814e-06,0.183558,0.0113957,-1.9119e-05,3.01567e-05,0.194965,0.0114479,7.13509e-05,-0.000112545,0.206371,0.011253,-0.000266285,-0.000106493,0.217252,0.0104009,-0.000585765,7.32149e-05,0.22714,0.00944906,-0.00036612,1.21917e-05,0.236235,0.0087534,-0.000329545,2.01753e-05,0.244679,0.00815483,-0.000269019,1.24435e-05,0.252577,0.00765412,-0.000231689,1.05618e-05,0.26001,0.00722243,-0.000200003,8.26662e-06,0.267041,0.00684723,-0.000175203,6.76746e-06,0.27372,0.00651712,-0.000154901,5.61192e-06,0.280088,0.00622416,-0.000138065,4.67009e-06,0.286179,0.00596204,-0.000124055,3.99012e-06,0.292021,0.0057259,-0.000112085,3.36032e-06,0.297638,0.00551181,-0.000102004,2.95338e-06,0.30305,0.00531666,-9.31435e-05,2.52875e-06,0.308277,0.00513796,-8.55572e-05,2.22022e-06,0.313331,0.00497351,-7.88966e-05,1.97163e-06,0.318228,0.00482163,-7.29817e-05,1.7248e-06,0.322978,0.00468084,-6.78073e-05,1.55998e-06,0.327593,0.0045499,-6.31274e-05,1.36343e-06,0.332081,0.00442774,-5.90371e-05,1.27136e-06,0.336451,0.00431348,-5.5223e-05,1.09111e-06,0.34071,0.00420631,-5.19496e-05,1.0399e-06,0.344866,0.00410553,-4.88299e-05,9.18347e-07,0.348923,0.00401062,-4.60749e-05,8.29942e-07,0.352889,0.00392096,-4.35851e-05,7.98478e-07,0.356767,0.00383619,-4.11896e-05,6.84917e-07,0.360562,0.00375586,-3.91349e-05,6.63976e-07,0.36428,0.00367959,-3.7143e-05,5.93086e-07,0.367923,0.00360708,-3.53637e-05,5.6976e-07,0.371495,0.00353806,-3.36544e-05,4.95533e-07,0.375,0.00347224,-3.21678e-05,4.87951e-07,0.378441,0.00340937,-3.0704e-05,4.4349e-07,0.38182,0.00334929,-2.93735e-05,4.20297e-07,0.38514,0.0032918,-2.81126e-05,3.7872e-07,0.388404,0.00323671,-2.69764e-05,3.596e-07,0.391614,0.00318384,-2.58976e-05,3.5845e-07,0.394772,0.00313312,-2.48223e-05,2.92765e-07,0.397881,0.00308435,-2.3944e-05,3.18232e-07,0.400942,0.00303742,-2.29893e-05,2.82046e-07,0.403957,0.00299229,-2.21432e-05,2.52315e-07,0.406927,0.00294876,-2.13862e-05,2.58416e-07,0.409855,0.00290676,-2.0611e-05,2.33939e-07,0.412741,0.00286624,-1.99092e-05,2.36342e-07,0.415587,0.00282713,-1.92001e-05,1.916e-07,0.418396,0.00278931,-1.86253e-05,2.1915e-07,0.421167,0.00275271,-1.79679e-05,1.83498e-07,0.423901,0.00271733,-1.74174e-05,1.79343e-07,0.426602,0.00268303,-1.68794e-05,1.72013e-07,0.429268,0.00264979,-1.63633e-05,1.75686e-07,0.431901,0.00261759,-1.58363e-05,1.3852e-07,0.434503,0.00258633,-1.54207e-05,1.64304e-07,0.437074,0.00255598,-1.49278e-05,1.28136e-07,0.439616,0.00252651,-1.45434e-05,1.57618e-07,0.442128,0.0024979,-1.40705e-05,1.0566e-07,0.444612,0.00247007,-1.37535e-05,1.34998e-07,0.447068,0.00244297,-1.33485e-05,1.29207e-07,0.449498,0.00241666,-1.29609e-05,9.32347e-08,0.451902,0.00239102,-1.26812e-05,1.23703e-07,0.45428,0.00236603,-1.23101e-05,9.74072e-08,0.456634,0.0023417,-1.20179e-05,1.12518e-07,0.458964,0.002318,-1.16803e-05,7.83681e-08,0.46127,0.00229488,-1.14452e-05,1.10452e-07,0.463554,0.00227232,-1.11139e-05,7.58719e-08,0.465815,0.00225032,-1.08863e-05,9.2699e-08,0.468055,0.00222882,-1.06082e-05,8.97738e-08,0.470273,0.00220788,-1.03388e-05,5.4845e-08,0.47247,0.00218736,-1.01743e-05,1.0808e-07,0.474648,0.00216734,-9.85007e-06,4.9277e-08,0.476805,0.00214779,-9.70224e-06,8.22408e-08,0.478943,0.00212863,-9.45551e-06,6.87942e-08,0.481063,0.00210993,-9.24913e-06,5.98144e-08,0.483163,0.00209161,-9.06969e-06,7.93789e-08,0.485246,0.00207371,-8.83155e-06,3.99032e-08,0.487311,0.00205616,-8.71184e-06,8.88325e-08,0.489358,0.002039,-8.44534e-06,2.20004e-08,0.491389,0.00202218,-8.37934e-06,9.13872e-08,0.493403,0.0020057,-8.10518e-06,2.96829e-08,0.495401,0.00198957,-8.01613e-06,5.81028e-08,0.497382,0.00197372,-7.84183e-06,6.5731e-08,0.499348,0.00195823,-7.64463e-06,3.66019e-08,0.501299,0.00194305,-7.53483e-06,2.62811e-08,0.503234,0.00192806,-7.45598e-06,9.66907e-08,0.505155,0.00191344,-7.16591e-06,4.18928e-09,0.507061,0.00189912,-7.15334e-06,6.53665e-08,0.508953,0.00188501,-6.95724e-06,3.23686e-08,0.510831,0.00187119,-6.86014e-06,4.35774e-08,0.512696,0.0018576,-6.72941e-06,3.17406e-08,0.514547,0.00184424,-6.63418e-06,6.78785e-08,0.516384,0.00183117,-6.43055e-06,-5.23126e-09,0.518209,0.0018183,-6.44624e-06,7.22562e-08,0.520021,0.00180562,-6.22947e-06,1.42292e-08,0.52182,0.0017932,-6.18679e-06,4.9641e-08,0.523607,0.00178098,-6.03786e-06,2.56259e-08,0.525382,0.00176898,-5.96099e-06,2.66696e-08,0.527145,0.00175714,-5.88098e-06,4.65094e-08,0.528897,0.00174552,-5.74145e-06,2.57114e-08,0.530637,0.00173411,-5.66431e-06,2.94588e-08,0.532365,0.00172287,-5.57594e-06,3.52667e-08,0.534082,0.00171182,-5.47014e-06,8.28868e-09,0.535789,0.00170091,-5.44527e-06,5.07871e-08,0.537484,0.00169017,-5.29291e-06,2.69817e-08,0.539169,0.00167967,-5.21197e-06,2.01009e-08,0.540844,0.0016693,-5.15166e-06,1.18237e-08,0.542508,0.00165903,-5.11619e-06,5.18135e-08,0.544162,0.00164896,-4.96075e-06,1.9341e-08,0.545806,0.00163909,-4.90273e-06,-9.96867e-09,0.54744,0.00162926,-4.93263e-06,8.01382e-08,0.549064,0.00161963,-4.69222e-06,-1.25601e-08,0.550679,0.00161021,-4.7299e-06,2.97067e-08,0.552285,0.00160084,-4.64078e-06,1.29426e-08,0.553881,0.0015916,-4.60195e-06,3.77327e-08,0.555468,0.00158251,-4.48875e-06,1.49412e-08,0.557046,0.00157357,-4.44393e-06,2.17118e-08,0.558615,0.00156475,-4.3788e-06,1.74206e-08,0.560176,0.00155605,-4.32653e-06,2.78152e-08,0.561727,0.00154748,-4.24309e-06,-9.47239e-09,0.563271,0.00153896,-4.27151e-06,6.9679e-08,0.564805,0.00153063,-4.06247e-06,-3.08246e-08,0.566332,0.00152241,-4.15494e-06,5.36188e-08,0.56785,0.00151426,-3.99409e-06,-4.83594e-09,0.56936,0.00150626,-4.00859e-06,2.53293e-08,0.570863,0.00149832,-3.93261e-06,2.27286e-08,0.572357,0.00149052,-3.86442e-06,2.96541e-09,0.573844,0.0014828,-3.85552e-06,2.50147e-08,0.575323,0.00147516,-3.78048e-06,1.61842e-08,0.576794,0.00146765,-3.73193e-06,2.94582e-08,0.578258,0.00146028,-3.64355e-06,-1.48076e-08,0.579715,0.00145295,-3.68798e-06,2.97724e-08,0.581164,0.00144566,-3.59866e-06,1.49272e-08,0.582606,0.00143851,-3.55388e-06,2.97285e-08,0.584041,0.00143149,-3.46469e-06,-1.46323e-08,0.585469,0.00142451,-3.50859e-06,2.88004e-08,0.58689,0.00141758,-3.42219e-06,1.864e-08,0.588304,0.00141079,-3.36627e-06,1.58482e-08,0.589712,0.00140411,-3.31872e-06,-2.24279e-08,0.591112,0.00139741,-3.38601e-06,7.38639e-08,0.592507,0.00139085,-3.16441e-06,-3.46088e-08,0.593894,0.00138442,-3.26824e-06,4.96675e-09,0.595275,0.0013779,-3.25334e-06,7.4346e-08,0.59665,0.00137162,-3.0303e-06,-6.39319e-08,0.598019,0.00136536,-3.2221e-06,6.21725e-08,0.599381,0.00135911,-3.03558e-06,-5.94423e-09,0.600737,0.00135302,-3.05341e-06,2.12091e-08,0.602087,0.00134697,-2.98979e-06,-1.92876e-08,0.603431,0.00134094,-3.04765e-06,5.5941e-08,0.604769,0.00133501,-2.87983e-06,-2.56622e-08,0.606101,0.00132917,-2.95681e-06,4.67078e-08,0.607427,0.0013234,-2.81669e-06,-4.19592e-08,0.608748,0.00131764,-2.94257e-06,6.15243e-08,0.610062,0.00131194,-2.75799e-06,-2.53244e-08,0.611372,0.00130635,-2.83397e-06,3.97739e-08,0.612675,0.0013008,-2.71465e-06,-1.45618e-08,0.613973,0.00129533,-2.75833e-06,1.84733e-08,0.615266,0.00128986,-2.70291e-06,2.73606e-10,0.616553,0.00128446,-2.70209e-06,4.00367e-08,0.617835,0.00127918,-2.58198e-06,-4.12113e-08,0.619111,0.00127389,-2.70561e-06,6.52039e-08,0.620383,0.00126867,-2.51e-06,-4.07901e-08,0.621649,0.00126353,-2.63237e-06,3.83516e-08,0.62291,0.00125838,-2.51732e-06,6.59315e-09,0.624166,0.00125337,-2.49754e-06,-5.11939e-09,0.625416,0.00124836,-2.5129e-06,1.38846e-08,0.626662,0.00124337,-2.47124e-06,9.18514e-09,0.627903,0.00123846,-2.44369e-06,8.97952e-09,0.629139,0.0012336,-2.41675e-06,1.45012e-08,0.63037,0.00122881,-2.37325e-06,-7.37949e-09,0.631597,0.00122404,-2.39538e-06,1.50169e-08,0.632818,0.00121929,-2.35033e-06,6.91648e-09,0.634035,0.00121461,-2.32958e-06,1.69219e-08,0.635248,0.00121,-2.27882e-06,-1.49997e-08,0.636455,0.0012054,-2.32382e-06,4.30769e-08,0.637659,0.00120088,-2.19459e-06,-3.80986e-08,0.638857,0.00119638,-2.30888e-06,4.97134e-08,0.640051,0.00119191,-2.15974e-06,-4.15463e-08,0.641241,0.00118747,-2.28438e-06,5.68667e-08,0.642426,0.00118307,-2.11378e-06,-7.10641e-09,0.643607,0.00117882,-2.1351e-06,-2.8441e-08,0.644784,0.00117446,-2.22042e-06,6.12658e-08,0.645956,0.00117021,-2.03663e-06,-3.78083e-08,0.647124,0.00116602,-2.15005e-06,3.03627e-08,0.648288,0.00116181,-2.05896e-06,-2.40379e-08,0.649448,0.00115762,-2.13108e-06,6.57887e-08,0.650603,0.00115356,-1.93371e-06,-6.03028e-08,0.651755,0.00114951,-2.11462e-06,5.62134e-08,0.652902,0.00114545,-1.94598e-06,-4.53417e-08,0.654046,0.00114142,-2.082e-06,6.55489e-08,0.655185,0.00113745,-1.88536e-06,-3.80396e-08,0.656321,0.00113357,-1.99948e-06,2.70049e-08,0.657452,0.00112965,-1.91846e-06,-1.03755e-08,0.65858,0.00112578,-1.94959e-06,1.44973e-08,0.659704,0.00112192,-1.9061e-06,1.1991e-08,0.660824,0.00111815,-1.87012e-06,-2.85634e-09,0.66194,0.0011144,-1.87869e-06,-5.65782e-10,0.663053,0.00111064,-1.88039e-06,5.11947e-09,0.664162,0.0011069,-1.86503e-06,3.96924e-08,0.665267,0.00110328,-1.74595e-06,-4.46795e-08,0.666368,0.00109966,-1.87999e-06,1.98161e-08,0.667466,0.00109596,-1.82054e-06,2.502e-08,0.66856,0.00109239,-1.74548e-06,-6.86593e-10,0.669651,0.0010889,-1.74754e-06,-2.22739e-08,0.670738,0.00108534,-1.81437e-06,3.01776e-08,0.671821,0.0010818,-1.72383e-06,2.07732e-08,0.672902,0.00107841,-1.66151e-06,-5.36658e-08,0.673978,0.00107493,-1.82251e-06,7.46802e-08,0.675051,0.00107151,-1.59847e-06,-6.62411e-08,0.676121,0.00106811,-1.79719e-06,7.10748e-08,0.677188,0.00106473,-1.58397e-06,-3.92441e-08,0.678251,0.00106145,-1.7017e-06,2.62973e-08,0.679311,0.00105812,-1.62281e-06,-6.34035e-09,0.680367,0.00105486,-1.64183e-06,-9.36249e-10,0.68142,0.00105157,-1.64464e-06,1.00854e-08,0.68247,0.00104831,-1.61438e-06,2.01995e-08,0.683517,0.00104514,-1.55378e-06,-3.1279e-08,0.68456,0.00104194,-1.64762e-06,4.53114e-08,0.685601,0.00103878,-1.51169e-06,-3.07573e-08,0.686638,0.00103567,-1.60396e-06,1.81133e-08,0.687672,0.00103251,-1.54962e-06,1.79085e-08,0.688703,0.00102947,-1.49589e-06,-3.01428e-08,0.689731,0.00102639,-1.58632e-06,4.30583e-08,0.690756,0.00102334,-1.45715e-06,-2.28814e-08,0.691778,0.00102036,-1.52579e-06,-1.11373e-08,0.692797,0.00101727,-1.5592e-06,6.74305e-08,0.693812,0.00101436,-1.35691e-06,-7.97709e-08,0.694825,0.0010114,-1.59622e-06,7.28391e-08,0.695835,0.00100843,-1.37771e-06,-3.27715e-08,0.696842,0.00100558,-1.47602e-06,-1.35807e-09,0.697846,0.00100262,-1.48009e-06,3.82037e-08,0.698847,0.000999775,-1.36548e-06,-3.22474e-08,0.699846,0.000996948,-1.46223e-06,3.11809e-08,0.700841,0.000994117,-1.36868e-06,-3.28714e-08,0.701834,0.000991281,-1.4673e-06,4.07001e-08,0.702824,0.000988468,-1.3452e-06,-1.07197e-08,0.703811,0.000985746,-1.37736e-06,2.17866e-09,0.704795,0.000982998,-1.37082e-06,2.00521e-09,0.705777,0.000980262,-1.3648e-06,-1.01996e-08,0.706756,0.000977502,-1.3954e-06,3.87931e-08,0.707732,0.000974827,-1.27902e-06,-2.57632e-08,0.708706,0.000972192,-1.35631e-06,4.65513e-09,0.709676,0.000969493,-1.34235e-06,7.14257e-09,0.710645,0.00096683,-1.32092e-06,2.63791e-08,0.71161,0.000964267,-1.24178e-06,-5.30543e-08,0.712573,0.000961625,-1.40095e-06,6.66289e-08,0.713533,0.000959023,-1.20106e-06,-3.46474e-08,0.714491,0.000956517,-1.305e-06,1.23559e-08,0.715446,0.000953944,-1.26793e-06,-1.47763e-08,0.716399,0.000951364,-1.31226e-06,4.67494e-08,0.717349,0.000948879,-1.17201e-06,-5.3012e-08,0.718297,0.000946376,-1.33105e-06,4.60894e-08,0.719242,0.000943852,-1.19278e-06,-1.21366e-08,0.720185,0.00094143,-1.22919e-06,2.45673e-09,0.721125,0.000938979,-1.22182e-06,2.30966e-09,0.722063,0.000936543,-1.21489e-06,-1.16954e-08,0.722998,0.000934078,-1.24998e-06,4.44718e-08,0.723931,0.000931711,-1.11656e-06,-4.69823e-08,0.724861,0.000929337,-1.25751e-06,2.4248e-08,0.725789,0.000926895,-1.18477e-06,9.5949e-09,0.726715,0.000924554,-1.15598e-06,-3.02286e-09,0.727638,0.000922233,-1.16505e-06,2.49649e-09,0.72856,0.00091991,-1.15756e-06,-6.96321e-09,0.729478,0.000917575,-1.17845e-06,2.53564e-08,0.730395,0.000915294,-1.10238e-06,-3.48578e-08,0.731309,0.000912984,-1.20695e-06,5.44704e-08,0.732221,0.000910734,-1.04354e-06,-6.38144e-08,0.73313,0.000908455,-1.23499e-06,8.15781e-08,0.734038,0.00090623,-9.90253e-07,-8.3684e-08,0.734943,0.000903999,-1.2413e-06,7.43441e-08,0.735846,0.000901739,-1.01827e-06,-3.48787e-08,0.736746,0.000899598,-1.12291e-06,5.56596e-09,0.737645,0.000897369,-1.10621e-06,1.26148e-08,0.738541,0.000895194,-1.06837e-06,3.57935e-09,0.739435,0.000893068,-1.05763e-06,-2.69322e-08,0.740327,0.000890872,-1.13842e-06,4.45448e-08,0.741217,0.000888729,-1.00479e-06,-3.20376e-08,0.742105,0.000886623,-1.1009e-06,2.40011e-08,0.74299,0.000884493,-1.0289e-06,-4.36209e-09,0.743874,0.000882422,-1.04199e-06,-6.55268e-09,0.744755,0.000880319,-1.06164e-06,3.05728e-08,0.745634,0.000878287,-9.69926e-07,-5.61338e-08,0.746512,0.000876179,-1.13833e-06,7.4753e-08,0.747387,0.000874127,-9.14068e-07,-6.40644e-08,0.74826,0.000872106,-1.10626e-06,6.22955e-08,0.749131,0.000870081,-9.19375e-07,-6.59083e-08,0.75,0.000868044,-1.1171e-06,8.21284e-08,0.750867,0.000866056,-8.70714e-07,-8.37915e-08,0.751732,0.000864064,-1.12209e-06,7.42237e-08,0.752595,0.000862042,-8.99418e-07,-3.42894e-08,0.753456,0.00086014,-1.00229e-06,3.32955e-09,0.754315,0.000858146,-9.92297e-07,2.09712e-08,0.755173,0.000856224,-9.29384e-07,-2.76096e-08,0.756028,0.000854282,-1.01221e-06,2.98627e-08,0.756881,0.000852348,-9.22625e-07,-3.22365e-08,0.757733,0.000850406,-1.01933e-06,3.94786e-08,0.758582,0.000848485,-9.00898e-07,-6.46833e-09,0.75943,0.000846664,-9.20303e-07,-1.36052e-08,0.760275,0.000844783,-9.61119e-07,1.28447e-09,0.761119,0.000842864,-9.57266e-07,8.4674e-09,0.761961,0.000840975,-9.31864e-07,2.44506e-08,0.762801,0.000839185,-8.58512e-07,-4.6665e-08,0.763639,0.000837328,-9.98507e-07,4.30001e-08,0.764476,0.00083546,-8.69507e-07,-6.12609e-09,0.76531,0.000833703,-8.87885e-07,-1.84959e-08,0.766143,0.000831871,-9.43372e-07,2.05052e-08,0.766974,0.000830046,-8.81857e-07,-3.92026e-09,0.767803,0.000828271,-8.93618e-07,-4.82426e-09,0.768631,0.000826469,-9.0809e-07,2.32172e-08,0.769456,0.000824722,-8.38439e-07,-2.84401e-08,0.77028,0.00082296,-9.23759e-07,3.09386e-08,0.771102,0.000821205,-8.30943e-07,-3.57099e-08,0.771922,0.000819436,-9.38073e-07,5.22963e-08,0.772741,0.000817717,-7.81184e-07,-5.42658e-08,0.773558,0.000815992,-9.43981e-07,4.55579e-08,0.774373,0.000814241,-8.07308e-07,-8.75656e-09,0.775186,0.0008126,-8.33578e-07,-1.05315e-08,0.775998,0.000810901,-8.65172e-07,-8.72188e-09,0.776808,0.000809145,-8.91338e-07,4.54191e-08,0.777616,0.000807498,-7.5508e-07,-5.37454e-08,0.778423,0.000805827,-9.16317e-07,5.03532e-08,0.779228,0.000804145,-7.65257e-07,-2.84584e-08,0.780031,0.000802529,-8.50632e-07,3.87579e-09,0.780833,0.00080084,-8.39005e-07,1.29552e-08,0.781633,0.0007992,-8.00139e-07,3.90804e-09,0.782432,0.000797612,-7.88415e-07,-2.85874e-08,0.783228,0.000795949,-8.74177e-07,5.0837e-08,0.784023,0.000794353,-7.21666e-07,-5.55513e-08,0.784817,0.000792743,-8.8832e-07,5.21587e-08,0.785609,0.000791123,-7.31844e-07,-3.38744e-08,0.786399,0.000789558,-8.33467e-07,2.37342e-08,0.787188,0.000787962,-7.62264e-07,-1.45775e-09,0.787975,0.000786433,-7.66638e-07,-1.79034e-08,0.788761,0.000784846,-8.20348e-07,1.34665e-08,0.789545,0.000783246,-7.79948e-07,2.3642e-08,0.790327,0.000781757,-7.09022e-07,-4.84297e-08,0.791108,0.000780194,-8.54311e-07,5.08674e-08,0.791888,0.000778638,-7.01709e-07,-3.58303e-08,0.792666,0.000777127,-8.092e-07,3.28493e-08,0.793442,0.000775607,-7.10652e-07,-3.59624e-08,0.794217,0.000774078,-8.1854e-07,5.13959e-08,0.79499,0.000772595,-6.64352e-07,-5.04121e-08,0.795762,0.000771115,-8.15588e-07,3.10431e-08,0.796532,0.000769577,-7.22459e-07,-1.41557e-08,0.797301,0.00076809,-7.64926e-07,2.55795e-08,0.798069,0.000766636,-6.88187e-07,-2.85578e-08,0.798835,0.000765174,-7.73861e-07,2.90472e-08,0.799599,0.000763714,-6.86719e-07,-2.80262e-08,0.800362,0.000762256,-7.70798e-07,2.34531e-08,0.801123,0.000760785,-7.00438e-07,-6.18144e-09,0.801884,0.000759366,-7.18983e-07,1.27263e-09,0.802642,0.000757931,-7.15165e-07,1.09101e-09,0.803399,0.000756504,-7.11892e-07,-5.63675e-09,0.804155,0.000755064,-7.28802e-07,2.14559e-08,0.80491,0.00075367,-6.64434e-07,-2.05821e-08,0.805663,0.00075228,-7.26181e-07,1.26812e-09,0.806414,0.000750831,-7.22377e-07,1.55097e-08,0.807164,0.000749433,-6.75848e-07,-3.70216e-09,0.807913,0.00074807,-6.86954e-07,-7.0105e-10,0.80866,0.000746694,-6.89057e-07,6.5063e-09,0.809406,0.000745336,-6.69538e-07,-2.53242e-08,0.810151,0.000743921,-7.45511e-07,3.51858e-08,0.810894,0.000742535,-6.39953e-07,3.79034e-09,0.811636,0.000741267,-6.28582e-07,-5.03471e-08,0.812377,0.000739858,-7.79624e-07,7.83886e-08,0.813116,0.000738534,-5.44458e-07,-8.43935e-08,0.813854,0.000737192,-7.97638e-07,8.03714e-08,0.81459,0.000735838,-5.56524e-07,-5.82784e-08,0.815325,0.00073455,-7.31359e-07,3.35329e-08,0.816059,0.000733188,-6.3076e-07,-1.62486e-08,0.816792,0.000731878,-6.79506e-07,3.14614e-08,0.817523,0.000730613,-5.85122e-07,-4.99925e-08,0.818253,0.000729293,-7.35099e-07,4.92994e-08,0.818982,0.000727971,-5.87201e-07,-2.79959e-08,0.819709,0.000726712,-6.71189e-07,3.07959e-09,0.820435,0.000725379,-6.6195e-07,1.56777e-08,0.82116,0.000724102,-6.14917e-07,-6.18564e-09,0.821883,0.000722854,-6.33474e-07,9.06488e-09,0.822606,0.000721614,-6.06279e-07,-3.00739e-08,0.823327,0.000720311,-6.96501e-07,5.16262e-08,0.824046,0.000719073,-5.41623e-07,-5.72214e-08,0.824765,0.000717818,-7.13287e-07,5.80503e-08,0.825482,0.000716566,-5.39136e-07,-5.57703e-08,0.826198,0.00071532,-7.06447e-07,4.58215e-08,0.826912,0.000714045,-5.68983e-07,-8.30636e-09,0.827626,0.000712882,-5.93902e-07,-1.25961e-08,0.828338,0.000711656,-6.3169e-07,-9.13985e-10,0.829049,0.00071039,-6.34432e-07,1.62519e-08,0.829759,0.00070917,-5.85676e-07,-4.48904e-09,0.830468,0.000707985,-5.99143e-07,1.70418e-09,0.831175,0.000706792,-5.9403e-07,-2.32768e-09,0.831881,0.000705597,-6.01014e-07,7.60648e-09,0.832586,0.000704418,-5.78194e-07,-2.80982e-08,0.83329,0.000703177,-6.62489e-07,4.51817e-08,0.833993,0.000701988,-5.26944e-07,-3.34192e-08,0.834694,0.000700834,-6.27201e-07,2.88904e-08,0.835394,0.000699666,-5.4053e-07,-2.25378e-08,0.836093,0.000698517,-6.08143e-07,1.65589e-09,0.836791,0.000697306,-6.03176e-07,1.59142e-08,0.837488,0.000696147,-5.55433e-07,-5.70801e-09,0.838184,0.000695019,-5.72557e-07,6.91792e-09,0.838878,0.000693895,-5.51803e-07,-2.19637e-08,0.839571,0.000692725,-6.17694e-07,2.13321e-08,0.840263,0.000691554,-5.53698e-07,-3.75996e-09,0.840954,0.000690435,-5.64978e-07,-6.29219e-09,0.841644,0.000689287,-5.83855e-07,2.89287e-08,0.842333,0.000688206,-4.97068e-07,-4.98181e-08,0.843021,0.000687062,-6.46523e-07,5.11344e-08,0.843707,0.000685922,-4.9312e-07,-3.55102e-08,0.844393,0.00068483,-5.9965e-07,3.13019e-08,0.845077,0.000683724,-5.05745e-07,-3.00925e-08,0.84576,0.000682622,-5.96022e-07,2.94636e-08,0.846442,0.000681519,-5.07631e-07,-2.81572e-08,0.847123,0.000680419,-5.92103e-07,2.35606e-08,0.847803,0.000679306,-5.21421e-07,-6.48045e-09,0.848482,0.000678243,-5.40863e-07,2.36124e-09,0.849159,0.000677169,-5.33779e-07,-2.96461e-09,0.849836,0.000676092,-5.42673e-07,9.49728e-09,0.850512,0.000675035,-5.14181e-07,-3.50245e-08,0.851186,0.000673902,-6.19254e-07,7.09959e-08,0.851859,0.000672876,-4.06267e-07,-7.01453e-08,0.852532,0.000671853,-6.16703e-07,3.07714e-08,0.853203,0.000670712,-5.24388e-07,6.66423e-09,0.853873,0.000669684,-5.04396e-07,2.17629e-09,0.854542,0.000668681,-4.97867e-07,-1.53693e-08,0.855211,0.000667639,-5.43975e-07,-3.03752e-10,0.855878,0.000666551,-5.44886e-07,1.65844e-08,0.856544,0.000665511,-4.95133e-07,-6.42907e-09,0.857209,0.000664501,-5.1442e-07,9.13195e-09,0.857873,0.0006635,-4.87024e-07,-3.00987e-08,0.858536,0.000662435,-5.7732e-07,5.16584e-08,0.859198,0.000661436,-4.22345e-07,-5.73255e-08,0.859859,0.000660419,-5.94322e-07,5.84343e-08,0.860518,0.000659406,-4.19019e-07,-5.72022e-08,0.861177,0.000658396,-5.90626e-07,5.11653e-08,0.861835,0.000657368,-4.3713e-07,-2.82495e-08,0.862492,0.000656409,-5.21878e-07,2.22788e-09,0.863148,0.000655372,-5.15195e-07,1.9338e-08,0.863803,0.0006544,-4.5718e-07,-1.99754e-08,0.864457,0.000653425,-5.17107e-07,9.59024e-10,0.86511,0.000652394,-5.1423e-07,1.61393e-08,0.865762,0.000651414,-4.65812e-07,-5.91149e-09,0.866413,0.000650465,-4.83546e-07,7.50665e-09,0.867063,0.00064952,-4.61026e-07,-2.4115e-08,0.867712,0.000648526,-5.33371e-07,2.93486e-08,0.86836,0.000647547,-4.45325e-07,-3.36748e-08,0.869007,0.000646555,-5.4635e-07,4.57461e-08,0.869653,0.0006456,-4.09112e-07,-3.01002e-08,0.870298,0.000644691,-4.99412e-07,1.50501e-08,0.870942,0.000643738,-4.54262e-07,-3.01002e-08,0.871585,0.000642739,-5.44563e-07,4.57461e-08,0.872228,0.000641787,-4.07324e-07,-3.36748e-08,0.872869,0.000640871,-5.08349e-07,2.93486e-08,0.873509,0.000639943,-4.20303e-07,-2.4115e-08,0.874149,0.00063903,-4.92648e-07,7.50655e-09,0.874787,0.000638067,-4.70128e-07,-5.91126e-09,0.875425,0.000637109,-4.87862e-07,1.61385e-08,0.876062,0.000636182,-4.39447e-07,9.61961e-10,0.876697,0.000635306,-4.36561e-07,-1.99863e-08,0.877332,0.000634373,-4.9652e-07,1.93785e-08,0.877966,0.000633438,-4.38384e-07,2.07697e-09,0.878599,0.000632567,-4.32153e-07,-2.76864e-08,0.879231,0.00063162,-5.15212e-07,4.90641e-08,0.879862,0.000630737,-3.6802e-07,-4.93606e-08,0.880493,0.000629852,-5.16102e-07,2.9169e-08,0.881122,0.000628908,-4.28595e-07,-7.71083e-09,0.881751,0.000628027,-4.51727e-07,1.6744e-09,0.882378,0.000627129,-4.46704e-07,1.01317e-09,0.883005,0.000626239,-4.43665e-07,-5.72703e-09,0.883631,0.000625334,-4.60846e-07,2.1895e-08,0.884255,0.000624478,-3.95161e-07,-2.22481e-08,0.88488,0.000623621,-4.61905e-07,7.4928e-09,0.885503,0.00062272,-4.39427e-07,-7.72306e-09,0.886125,0.000621818,-4.62596e-07,2.33995e-08,0.886746,0.000620963,-3.92398e-07,-2.62704e-08,0.887367,0.000620099,-4.71209e-07,2.20775e-08,0.887987,0.000619223,-4.04976e-07,-2.43496e-09,0.888605,0.000618406,-4.12281e-07,-1.23377e-08,0.889223,0.000617544,-4.49294e-07,-7.81876e-09,0.88984,0.000616622,-4.72751e-07,4.36128e-08,0.890457,0.000615807,-3.41912e-07,-4.7423e-08,0.891072,0.000614981,-4.84181e-07,2.68698e-08,0.891687,0.000614093,-4.03572e-07,-4.51384e-10,0.8923,0.000613285,-4.04926e-07,-2.50643e-08,0.892913,0.0006124,-4.80119e-07,4.11038e-08,0.893525,0.000611563,-3.56808e-07,-2.01414e-08,0.894136,0.000610789,-4.17232e-07,-2.01426e-08,0.894747,0.000609894,-4.7766e-07,4.11073e-08,0.895356,0.000609062,-3.54338e-07,-2.50773e-08,0.895965,0.000608278,-4.2957e-07,-4.02954e-10,0.896573,0.000607418,-4.30779e-07,2.66891e-08,0.89718,0.000606636,-3.50711e-07,-4.67489e-08,0.897786,0.000605795,-4.90958e-07,4.10972e-08,0.898391,0.000604936,-3.67666e-07,1.56948e-09,0.898996,0.000604205,-3.62958e-07,-4.73751e-08,0.8996,0.000603337,-5.05083e-07,6.87214e-08,0.900202,0.000602533,-2.98919e-07,-4.86966e-08,0.900805,0.000601789,-4.45009e-07,6.85589e-09,0.901406,0.00060092,-4.24441e-07,2.1273e-08,0.902007,0.000600135,-3.60622e-07,-3.23434e-08,0.902606,0.000599317,-4.57652e-07,4.84959e-08,0.903205,0.000598547,-3.12164e-07,-4.24309e-08,0.903803,0.000597795,-4.39457e-07,2.01844e-09,0.904401,0.000596922,-4.33402e-07,3.43571e-08,0.904997,0.000596159,-3.30331e-07,-2.02374e-08,0.905593,0.000595437,-3.91043e-07,-1.30123e-08,0.906188,0.000594616,-4.3008e-07,1.26819e-08,0.906782,0.000593794,-3.92034e-07,2.18894e-08,0.907376,0.000593076,-3.26366e-07,-4.06349e-08,0.907968,0.000592301,-4.4827e-07,2.1441e-08,0.90856,0.000591469,-3.83947e-07,1.44754e-08,0.909151,0.000590744,-3.40521e-07,-1.97379e-08,0.909742,0.000590004,-3.99735e-07,4.87161e-09,0.910331,0.000589219,-3.8512e-07,2.51532e-10,0.91092,0.00058845,-3.84366e-07,-5.87776e-09,0.911508,0.000587663,-4.01999e-07,2.32595e-08,0.912096,0.000586929,-3.3222e-07,-2.75554e-08,0.912682,0.000586182,-4.14887e-07,2.73573e-08,0.913268,0.000585434,-3.32815e-07,-2.22692e-08,0.913853,0.000584702,-3.99622e-07,2.11486e-09,0.914437,0.000583909,-3.93278e-07,1.38098e-08,0.915021,0.000583164,-3.51848e-07,2.25042e-09,0.915604,0.000582467,-3.45097e-07,-2.28115e-08,0.916186,0.000581708,-4.13531e-07,2.93911e-08,0.916767,0.000580969,-3.25358e-07,-3.51481e-08,0.917348,0.000580213,-4.30803e-07,5.15967e-08,0.917928,0.000579506,-2.76012e-07,-5.20296e-08,0.918507,0.000578798,-4.32101e-07,3.73124e-08,0.919085,0.000578046,-3.20164e-07,-3.76154e-08,0.919663,0.000577293,-4.3301e-07,5.35447e-08,0.92024,0.000576587,-2.72376e-07,-5.7354e-08,0.920816,0.000575871,-4.44438e-07,5.66621e-08,0.921391,0.000575152,-2.74452e-07,-5.00851e-08,0.921966,0.000574453,-4.24707e-07,2.4469e-08,0.92254,0.000573677,-3.513e-07,1.18138e-08,0.923114,0.000573009,-3.15859e-07,-1.21195e-08,0.923686,0.000572341,-3.52217e-07,-2.29403e-08,0.924258,0.000571568,-4.21038e-07,4.4276e-08,0.924829,0.000570859,-2.8821e-07,-3.49546e-08,0.9254,0.000570178,-3.93074e-07,3.59377e-08,0.92597,0.000569499,-2.85261e-07,-4.91915e-08,0.926539,0.000568781,-4.32835e-07,4.16189e-08,0.927107,0.00056804,-3.07979e-07,1.92523e-09,0.927675,0.00056743,-3.02203e-07,-4.93198e-08,0.928242,0.000566678,-4.50162e-07,7.61447e-08,0.928809,0.000566006,-2.21728e-07,-7.6445e-08,0.929374,0.000565333,-4.51063e-07,5.08216e-08,0.929939,0.000564583,-2.98599e-07,-7.63212e-09,0.930503,0.000563963,-3.21495e-07,-2.02931e-08,0.931067,0.000563259,-3.82374e-07,2.92001e-08,0.93163,0.000562582,-2.94774e-07,-3.69025e-08,0.932192,0.000561882,-4.05482e-07,5.88053e-08,0.932754,0.000561247,-2.29066e-07,-7.91094e-08,0.933315,0.000560552,-4.66394e-07,7.88184e-08,0.933875,0.000559856,-2.29939e-07,-5.73501e-08,0.934434,0.000559224,-4.01989e-07,3.13727e-08,0.934993,0.000558514,-3.07871e-07,-8.53611e-09,0.935551,0.000557873,-3.33479e-07,2.77175e-09,0.936109,0.000557214,-3.25164e-07,-2.55091e-09,0.936666,0.000556556,-3.32817e-07,7.43188e-09,0.937222,0.000555913,-3.10521e-07,-2.71766e-08,0.937778,0.00055521,-3.92051e-07,4.167e-08,0.938333,0.000554551,-2.67041e-07,-2.02941e-08,0.938887,0.000553956,-3.27923e-07,-2.00984e-08,0.93944,0.00055324,-3.88218e-07,4.10828e-08,0.939993,0.000552587,-2.6497e-07,-2.50237e-08,0.940546,0.000551982,-3.40041e-07,-5.92583e-10,0.941097,0.0005513,-3.41819e-07,2.7394e-08,0.941648,0.000550698,-2.59637e-07,-4.93788e-08,0.942199,0.000550031,-4.07773e-07,5.09119e-08,0.942748,0.000549368,-2.55038e-07,-3.50595e-08,0.943297,0.000548753,-3.60216e-07,2.97214e-08,0.943846,0.000548122,-2.71052e-07,-2.42215e-08,0.944394,0.000547507,-3.43716e-07,7.55985e-09,0.944941,0.000546842,-3.21037e-07,-6.01796e-09,0.945487,0.000546182,-3.3909e-07,1.65119e-08,0.946033,0.000545553,-2.89555e-07,-4.2498e-10,0.946578,0.000544973,-2.9083e-07,-1.4812e-08,0.947123,0.000544347,-3.35266e-07,6.83068e-11,0.947667,0.000543676,-3.35061e-07,1.45388e-08,0.94821,0.00054305,-2.91444e-07,1.38123e-09,0.948753,0.000542471,-2.87301e-07,-2.00637e-08,0.949295,0.000541836,-3.47492e-07,1.92688e-08,0.949837,0.000541199,-2.89685e-07,2.59298e-09,0.950378,0.000540628,-2.81906e-07,-2.96407e-08,0.950918,0.000539975,-3.70829e-07,5.63652e-08,0.951458,0.000539402,-2.01733e-07,-7.66107e-08,0.951997,0.000538769,-4.31565e-07,7.12638e-08,0.952535,0.00053812,-2.17774e-07,-2.96305e-08,0.953073,0.000537595,-3.06665e-07,-1.23464e-08,0.95361,0.000536945,-3.43704e-07,1.94114e-08,0.954147,0.000536316,-2.8547e-07,-5.69451e-09,0.954683,0.000535728,-3.02554e-07,3.36666e-09,0.955219,0.000535133,-2.92454e-07,-7.77208e-09,0.955753,0.000534525,-3.1577e-07,2.77216e-08,0.956288,0.000533976,-2.32605e-07,-4.35097e-08,0.956821,0.00053338,-3.63134e-07,2.7108e-08,0.957354,0.000532735,-2.8181e-07,-5.31772e-09,0.957887,0.000532156,-2.97764e-07,-5.83718e-09,0.958419,0.000531543,-3.15275e-07,2.86664e-08,0.95895,0.000530998,-2.29276e-07,-4.9224e-08,0.959481,0.000530392,-3.76948e-07,4.90201e-08,0.960011,0.000529785,-2.29887e-07,-2.76471e-08,0.96054,0.000529243,-3.12829e-07,1.96385e-09,0.961069,0.000528623,-3.06937e-07,1.97917e-08,0.961598,0.000528068,-2.47562e-07,-2.15261e-08,0.962125,0.000527508,-3.1214e-07,6.70795e-09,0.962653,0.000526904,-2.92016e-07,-5.30573e-09,0.963179,0.000526304,-3.07934e-07,1.4515e-08,0.963705,0.000525732,-2.64389e-07,6.85048e-09,0.964231,0.000525224,-2.43837e-07,-4.19169e-08,0.964756,0.00052461,-3.69588e-07,4.1608e-08,0.96528,0.000523996,-2.44764e-07,-5.30598e-09,0.965804,0.000523491,-2.60682e-07,-2.03841e-08,0.966327,0.000522908,-3.21834e-07,2.72378e-08,0.966849,0.000522346,-2.40121e-07,-2.89625e-08,0.967371,0.000521779,-3.27008e-07,2.90075e-08,0.967893,0.000521212,-2.39986e-07,-2.74629e-08,0.968414,0.00052065,-3.22374e-07,2.12396e-08,0.968934,0.000520069,-2.58656e-07,2.10922e-09,0.969454,0.000519558,-2.52328e-07,-2.96765e-08,0.969973,0.000518964,-3.41357e-07,5.6992e-08,0.970492,0.000518452,-1.70382e-07,-7.90821e-08,0.97101,0.000517874,-4.07628e-07,8.05224e-08,0.971528,0.000517301,-1.66061e-07,-6.41937e-08,0.972045,0.000516776,-3.58642e-07,5.70429e-08,0.972561,0.00051623,-1.87513e-07,-4.47686e-08,0.973077,0.00051572,-3.21819e-07,2.82237e-09,0.973593,0.000515085,-3.13352e-07,3.34792e-08,0.974108,0.000514559,-2.12914e-07,-1.75298e-08,0.974622,0.000514081,-2.65503e-07,-2.29648e-08,0.975136,0.000513481,-3.34398e-07,4.97843e-08,0.975649,0.000512961,-1.85045e-07,-5.6963e-08,0.976162,0.00051242,-3.55934e-07,5.88585e-08,0.976674,0.000511885,-1.79359e-07,-5.92616e-08,0.977185,0.000511348,-3.57143e-07,5.89785e-08,0.977696,0.000510811,-1.80208e-07,-5.74433e-08,0.978207,0.000510278,-3.52538e-07,5.15854e-08,0.978717,0.000509728,-1.97781e-07,-2.9689e-08,0.979226,0.000509243,-2.86848e-07,7.56591e-09,0.979735,0.000508692,-2.64151e-07,-5.74649e-10,0.980244,0.000508162,-2.65875e-07,-5.26732e-09,0.980752,0.000507615,-2.81677e-07,2.16439e-08,0.981259,0.000507116,-2.16745e-07,-2.17037e-08,0.981766,0.000506618,-2.81856e-07,5.56636e-09,0.982272,0.000506071,-2.65157e-07,-5.61689e-10,0.982778,0.000505539,-2.66842e-07,-3.31963e-09,0.983283,0.000504995,-2.76801e-07,1.38402e-08,0.983788,0.000504483,-2.3528e-07,7.56339e-09,0.984292,0.000504035,-2.1259e-07,-4.40938e-08,0.984796,0.000503478,-3.44871e-07,4.96026e-08,0.985299,0.000502937,-1.96064e-07,-3.51071e-08,0.985802,0.000502439,-3.01385e-07,3.12212e-08,0.986304,0.00050193,-2.07721e-07,-3.0173e-08,0.986806,0.000501424,-2.9824e-07,2.9866e-08,0.987307,0.000500917,-2.08642e-07,-2.96865e-08,0.987808,0.000500411,-2.97702e-07,2.92753e-08,0.988308,0.000499903,-2.09876e-07,-2.78101e-08,0.988807,0.0004994,-2.93306e-07,2.23604e-08,0.989307,0.000498881,-2.26225e-07,-2.02681e-09,0.989805,0.000498422,-2.32305e-07,-1.42531e-08,0.990303,0.000497915,-2.75065e-07,-5.65232e-10,0.990801,0.000497363,-2.76761e-07,1.65141e-08,0.991298,0.000496859,-2.27218e-07,-5.88639e-09,0.991795,0.000496387,-2.44878e-07,7.0315e-09,0.992291,0.000495918,-2.23783e-07,-2.22396e-08,0.992787,0.000495404,-2.90502e-07,2.23224e-08,0.993282,0.00049489,-2.23535e-07,-7.44543e-09,0.993776,0.000494421,-2.45871e-07,7.45924e-09,0.994271,0.000493951,-2.23493e-07,-2.23915e-08,0.994764,0.000493437,-2.90668e-07,2.25021e-08,0.995257,0.000492923,-2.23161e-07,-8.01218e-09,0.99575,0.000492453,-2.47198e-07,9.54669e-09,0.996242,0.000491987,-2.18558e-07,-3.01746e-08,0.996734,0.000491459,-3.09082e-07,5.1547e-08,0.997225,0.000490996,-1.54441e-07,-5.68039e-08,0.997716,0.000490517,-3.24853e-07,5.64594e-08,0.998206,0.000490036,-1.55474e-07,-4.98245e-08,0.998696,0.000489576,-3.04948e-07,2.36292e-08,0.999186,0.000489037,-2.3406e-07,1.49121e-08,0.999674,0.000488613,-1.89324e-07,-2.3673e-08,1.00016,0.000488164,-2.60343e-07,2.01754e-08,1.00065,0.000487704,-1.99816e-07,-5.70288e-08,1.00114,0.000487133,-3.70903e-07,8.87303e-08,1.00162,0.000486657,-1.04712e-07,-5.94737e-08,1.00211,0.000486269,-2.83133e-07,2.99553e-08,1.0026,0.000485793,-1.93267e-07,-6.03474e-08,1.00308,0.000485225,-3.74309e-07,9.2225e-08,1.00357,0.000484754,-9.76345e-08,-7.0134e-08,1.00405,0.000484348,-3.08036e-07,6.91016e-08,1.00454,0.000483939,-1.00731e-07,-8.70633e-08,1.00502,0.000483476,-3.61921e-07,4.07328e-08,1.0055,0.000482875,-2.39723e-07,4.33413e-08,1.00599,0.000482525,-1.09699e-07,-9.48886e-08,1.00647,0.000482021,-3.94365e-07,9.77947e-08,1.00695,0.000481526,-1.00981e-07,-5.78713e-08,1.00743,0.00048115,-2.74595e-07,1.44814e-08,1.00791,0.000480645,-2.31151e-07,-5.42665e-11,1.00839,0.000480182,-2.31314e-07,-1.42643e-08,1.00887,0.000479677,-2.74106e-07,5.71115e-08,1.00935,0.0004793,-1.02772e-07,-9.49724e-08,1.00983,0.000478809,-3.87689e-07,8.43596e-08,1.01031,0.000478287,-1.3461e-07,-4.04755e-09,1.01079,0.000478006,-1.46753e-07,-6.81694e-08,1.01127,0.000477508,-3.51261e-07,3.83067e-08,1.01174,0.00047692,-2.36341e-07,3.41521e-08,1.01222,0.00047655,-1.33885e-07,-5.57058e-08,1.0127,0.000476115,-3.01002e-07,6.94616e-08,1.01317,0.000475721,-9.26174e-08,-1.02931e-07,1.01365,0.000475227,-4.01412e-07,1.03846e-07,1.01412,0.000474736,-8.98751e-08,-7.40321e-08,1.0146,0.000474334,-3.11971e-07,7.30735e-08,1.01507,0.00047393,-9.27508e-08,-9.90527e-08,1.01554,0.000473447,-3.89909e-07,8.47188e-08,1.01602,0.000472921,-1.35753e-07,-1.40381e-09,1.01649,0.000472645,-1.39964e-07,-7.91035e-08,1.01696,0.000472128,-3.77275e-07,7.93993e-08,1.01744,0.000471612,-1.39077e-07,-7.52607e-11,1.01791,0.000471334,-1.39302e-07,-7.90983e-08,1.01838,0.000470818,-3.76597e-07,7.80499e-08,1.01885,0.000470299,-1.42448e-07,5.31733e-09,1.01932,0.00047003,-1.26496e-07,-9.93193e-08,1.01979,0.000469479,-4.24453e-07,1.53541e-07,1.02026,0.00046909,3.617e-08,-1.57217e-07,1.02073,0.000468691,-4.35482e-07,1.177e-07,1.02119,0.000468173,-8.23808e-08,-7.51659e-08,1.02166,0.000467783,-3.07878e-07,6.37538e-08,1.02213,0.000467358,-1.16617e-07,-6.064e-08,1.0226,0.000466943,-2.98537e-07,5.9597e-08,1.02306,0.000466525,-1.19746e-07,-5.85386e-08,1.02353,0.00046611,-2.95362e-07,5.53482e-08,1.024,0.000465685,-1.29317e-07,-4.36449e-08,1.02446,0.000465296,-2.60252e-07,2.20268e-11,1.02493,0.000464775,-2.60186e-07,4.35568e-08,1.02539,0.000464386,-1.29516e-07,-5.50398e-08,1.02586,0.000463961,-2.94635e-07,5.73932e-08,1.02632,0.000463544,-1.22456e-07,-5.53236e-08,1.02678,0.000463133,-2.88426e-07,4.46921e-08,1.02725,0.000462691,-1.5435e-07,-4.23534e-09,1.02771,0.000462369,-1.67056e-07,-2.77507e-08,1.02817,0.000461952,-2.50308e-07,-3.97101e-09,1.02863,0.000461439,-2.62221e-07,4.36348e-08,1.02909,0.000461046,-1.31317e-07,-5.13589e-08,1.02955,0.000460629,-2.85394e-07,4.25913e-08,1.03001,0.000460186,-1.5762e-07,2.0285e-10,1.03047,0.000459871,-1.57011e-07,-4.34027e-08,1.03093,0.000459427,-2.87219e-07,5.41987e-08,1.03139,0.000459015,-1.24623e-07,-5.4183e-08,1.03185,0.000458604,-2.87172e-07,4.33239e-08,1.03231,0.000458159,-1.572e-07,9.65817e-11,1.03277,0.000457845,-1.56911e-07,-4.37103e-08,1.03323,0.0004574,-2.88041e-07,5.55351e-08,1.03368,0.000456991,-1.21436e-07,-5.9221e-08,1.03414,0.00045657,-2.99099e-07,6.21394e-08,1.0346,0.000456158,-1.1268e-07,-7.01275e-08,1.03505,0.000455723,-3.23063e-07,9.91614e-08,1.03551,0.000455374,-2.55788e-08,-8.80996e-08,1.03596,0.000455058,-2.89878e-07,1.48184e-08,1.03642,0.000454523,-2.45422e-07,2.88258e-08,1.03687,0.000454119,-1.58945e-07,-1.09125e-08,1.03733,0.000453768,-1.91682e-07,1.48241e-08,1.03778,0.000453429,-1.4721e-07,-4.83838e-08,1.03823,0.00045299,-2.92361e-07,5.95019e-08,1.03869,0.000452584,-1.13856e-07,-7.04146e-08,1.03914,0.000452145,-3.25099e-07,1.02947e-07,1.03959,0.000451803,-1.62583e-08,-1.02955e-07,1.04004,0.000451462,-3.25123e-07,7.04544e-08,1.04049,0.000451023,-1.1376e-07,-5.96534e-08,1.04094,0.000450616,-2.9272e-07,4.89499e-08,1.04139,0.000450178,-1.45871e-07,-1.69369e-08,1.04184,0.000449835,-1.96681e-07,1.87977e-08,1.04229,0.000449498,-1.40288e-07,-5.82539e-08,1.04274,0.000449043,-3.1505e-07,9.50087e-08,1.04319,0.000448698,-3.00238e-08,-8.33623e-08,1.04364,0.000448388,-2.80111e-07,2.20363e-11,1.04409,0.000447828,-2.80045e-07,8.32742e-08,1.04454,0.000447517,-3.02221e-08,-9.47002e-08,1.04498,0.000447173,-3.14323e-07,5.7108e-08,1.04543,0.000446716,-1.42999e-07,-1.45225e-08,1.04588,0.000446386,-1.86566e-07,9.82022e-10,1.04632,0.000446016,-1.8362e-07,1.05944e-08,1.04677,0.00044568,-1.51837e-07,-4.33597e-08,1.04721,0.000445247,-2.81916e-07,4.36352e-08,1.04766,0.000444814,-1.51011e-07,-1.19717e-08,1.0481,0.000444476,-1.86926e-07,4.25158e-09,1.04855,0.000444115,-1.74171e-07,-5.03461e-09,1.04899,0.000443751,-1.89275e-07,1.58868e-08,1.04944,0.00044342,-1.41614e-07,-5.85127e-08,1.04988,0.000442961,-3.17152e-07,9.89548e-08,1.05032,0.000442624,-2.0288e-08,-9.88878e-08,1.05076,0.000442287,-3.16951e-07,5.81779e-08,1.05121,0.000441827,-1.42418e-07,-1.46144e-08,1.05165,0.000441499,-1.86261e-07,2.79892e-10,1.05209,0.000441127,-1.85421e-07,1.34949e-08,1.05253,0.000440797,-1.44937e-07,-5.42594e-08,1.05297,0.000440344,-3.07715e-07,8.43335e-08,1.05341,0.000439982,-5.47146e-08,-4.46558e-08,1.05385,0.000439738,-1.88682e-07,-2.49193e-08,1.05429,0.000439286,-2.6344e-07,2.5124e-08,1.05473,0.000438835,-1.88068e-07,4.36328e-08,1.05517,0.000438589,-5.71699e-08,-8.04459e-08,1.05561,0.000438234,-2.98508e-07,3.97324e-08,1.05605,0.000437756,-1.79311e-07,4.07258e-08,1.05648,0.000437519,-5.71332e-08,-8.34263e-08,1.05692,0.000437155,-3.07412e-07,5.45608e-08,1.05736,0.000436704,-1.4373e-07,-1.56078e-08,1.05779,0.000436369,-1.90553e-07,7.87043e-09,1.05823,0.000436012,-1.66942e-07,-1.58739e-08,1.05867,0.00043563,-2.14563e-07,5.56251e-08,1.0591,0.000435368,-4.76881e-08,-8.74172e-08,1.05954,0.000435011,-3.0994e-07,5.56251e-08,1.05997,0.000434558,-1.43064e-07,-1.58739e-08,1.06041,0.000434224,-1.90686e-07,7.87042e-09,1.06084,0.000433866,-1.67075e-07,-1.56078e-08,1.06127,0.000433485,-2.13898e-07,5.45609e-08,1.06171,0.000433221,-5.02157e-08,-8.34263e-08,1.06214,0.00043287,-3.00495e-07,4.07258e-08,1.06257,0.000432391,-1.78317e-07,3.97325e-08,1.063,0.000432154,-5.91198e-08,-8.04464e-08,1.06344,0.000431794,-3.00459e-07,4.36347e-08,1.06387,0.000431324,-1.69555e-07,2.5117e-08,1.0643,0.000431061,-9.42041e-08,-2.48934e-08,1.06473,0.000430798,-1.68884e-07,-4.47527e-08,1.06516,0.000430326,-3.03142e-07,8.46951e-08,1.06559,0.000429973,-4.90573e-08,-5.56089e-08,1.06602,0.000429708,-2.15884e-07,1.85314e-08,1.06645,0.000429332,-1.6029e-07,-1.85166e-08,1.06688,0.000428956,-2.1584e-07,5.5535e-08,1.06731,0.000428691,-4.92347e-08,-8.44142e-08,1.06774,0.000428339,-3.02477e-07,4.37032e-08,1.06816,0.000427865,-1.71368e-07,2.88107e-08,1.06859,0.000427609,-8.49356e-08,-3.97367e-08,1.06902,0.00042732,-2.04146e-07,1.09267e-08,1.06945,0.000426945,-1.71365e-07,-3.97023e-09,1.06987,0.00042659,-1.83276e-07,4.9542e-09,1.0703,0.000426238,-1.68414e-07,-1.58466e-08,1.07073,0.000425854,-2.15953e-07,5.84321e-08,1.07115,0.000425597,-4.0657e-08,-9.86725e-08,1.07158,0.00042522,-3.36674e-07,9.78392e-08,1.072,0.00042484,-4.31568e-08,-5.42658e-08,1.07243,0.000424591,-2.05954e-07,1.45377e-11,1.07285,0.000424179,-2.0591e-07,5.42076e-08,1.07328,0.00042393,-4.32877e-08,-9.76357e-08,1.0737,0.00042355,-3.36195e-07,9.79165e-08,1.07412,0.000423172,-4.24451e-08,-5.56118e-08,1.07455,0.00042292,-2.09281e-07,5.32143e-09,1.07497,0.000422518,-1.93316e-07,3.43261e-08,1.07539,0.000422234,-9.0338e-08,-2.34165e-08,1.07581,0.000421983,-1.60588e-07,-5.98692e-08,1.07623,0.000421482,-3.40195e-07,1.43684e-07,1.07666,0.000421233,9.08574e-08,-1.5724e-07,1.07708,0.000420943,-3.80862e-07,1.27647e-07,1.0775,0.000420564,2.0791e-09,-1.1493e-07,1.07792,0.000420223,-3.4271e-07,9.36534e-08,1.07834,0.000419819,-6.17499e-08,-2.12653e-08,1.07876,0.000419632,-1.25546e-07,-8.59219e-09,1.07918,0.000419355,-1.51322e-07,-6.35752e-08,1.0796,0.000418861,-3.42048e-07,1.43684e-07,1.08002,0.000418608,8.90034e-08,-1.53532e-07,1.08043,0.000418326,-3.71593e-07,1.12817e-07,1.08085,0.000417921,-3.31414e-08,-5.93184e-08,1.08127,0.000417677,-2.11097e-07,5.24697e-09,1.08169,0.00041727,-1.95356e-07,3.83305e-08,1.0821,0.000416995,-8.03642e-08,-3.93597e-08,1.08252,0.000416716,-1.98443e-07,-1.0094e-10,1.08294,0.000416319,-1.98746e-07,3.97635e-08,1.08335,0.00041604,-7.94557e-08,-3.97437e-08,1.08377,0.000415762,-1.98687e-07,1.94215e-12,1.08419,0.000415365,-1.98681e-07,3.97359e-08,1.0846,0.000415087,-7.94732e-08,-3.97362e-08,1.08502,0.000414809,-1.98682e-07,-4.31063e-13,1.08543,0.000414411,-1.98683e-07,3.97379e-08,1.08584,0.000414133,-7.94694e-08,-3.97418e-08,1.08626,0.000413855,-1.98695e-07,2.00563e-11,1.08667,0.000413458,-1.98635e-07,3.96616e-08,1.08709,0.000413179,-7.965e-08,-3.9457e-08,1.0875,0.000412902,-1.98021e-07,-1.04281e-09,1.08791,0.000412502,-2.01149e-07,4.36282e-08,1.08832,0.000412231,-7.02648e-08,-5.42608e-08,1.08874,0.000411928,-2.33047e-07,5.42057e-08,1.08915,0.000411624,-7.04301e-08,-4.33527e-08,1.08956,0.000411353,-2.00488e-07,-4.07378e-12,1.08997,0.000410952,-2.005e-07,4.3369e-08,1.09038,0.000410681,-7.03934e-08,-5.42627e-08,1.09079,0.000410378,-2.33182e-07,5.44726e-08,1.0912,0.000410075,-6.97637e-08,-4.44186e-08,1.09161,0.000409802,-2.03019e-07,3.99235e-09,1.09202,0.000409408,-1.91042e-07,2.84491e-08,1.09243,0.000409111,-1.05695e-07,1.42043e-09,1.09284,0.000408904,-1.01434e-07,-3.41308e-08,1.09325,0.000408599,-2.03826e-07,1.58937e-08,1.09366,0.000408239,-1.56145e-07,-2.94438e-08,1.09406,0.000407838,-2.44476e-07,1.01881e-07,1.09447,0.000407655,6.11676e-08,-1.39663e-07,1.09488,0.000407358,-3.57822e-07,9.91432e-08,1.09529,0.00040694,-6.03921e-08,-1.84912e-08,1.09569,0.000406764,-1.15866e-07,-2.51785e-08,1.0961,0.000406457,-1.91401e-07,-4.03115e-12,1.09651,0.000406074,-1.91413e-07,2.51947e-08,1.09691,0.000405767,-1.15829e-07,1.84346e-08,1.09732,0.00040559,-6.05254e-08,-9.89332e-08,1.09772,0.000405172,-3.57325e-07,1.3888e-07,1.09813,0.000404874,5.93136e-08,-9.8957e-08,1.09853,0.000404696,-2.37557e-07,1.853e-08,1.09894,0.000404277,-1.81968e-07,2.48372e-08,1.09934,0.000403987,-1.07456e-07,1.33047e-09,1.09975,0.000403776,-1.03465e-07,-3.01591e-08,1.10015,0.000403479,-1.93942e-07,9.66054e-11,1.10055,0.000403091,-1.93652e-07,2.97727e-08,1.10096,0.000402793,-1.04334e-07,2.19273e-11,1.10136,0.000402585,-1.04268e-07,-2.98604e-08,1.10176,0.000402287,-1.93849e-07,2.10325e-10,1.10216,0.0004019,-1.93218e-07,2.90191e-08,1.10256,0.0004016,-1.06161e-07,2.92264e-09,1.10297,0.000401397,-9.73931e-08,-4.07096e-08,1.10337,0.00040108,-2.19522e-07,4.07067e-08,1.10377,0.000400763,-9.7402e-08,-2.90783e-09,1.10417,0.000400559,-1.06126e-07,-2.90754e-08,1.10457,0.00040026,-1.93352e-07,9.00021e-14,1.10497,0.000399873,-1.93351e-07,2.9075e-08,1.10537,0.000399574,-1.06126e-07,2.90902e-09,1.10577,0.00039937,-9.73992e-08,-4.07111e-08,1.10617,0.000399053,-2.19533e-07,4.07262e-08,1.10657,0.000398736,-9.73541e-08,-2.98424e-09,1.10697,0.000398533,-1.06307e-07,-2.87892e-08,1.10736,0.000398234,-1.92674e-07,-1.06824e-09,1.10776,0.000397845,-1.95879e-07,3.30622e-08,1.10816,0.000397552,-9.66926e-08,-1.19712e-08,1.10856,0.000397323,-1.32606e-07,1.48225e-08,1.10895,0.000397102,-8.81387e-08,-4.73187e-08,1.10935,0.000396784,-2.30095e-07,5.52429e-08,1.10975,0.00039649,-6.4366e-08,-5.44437e-08,1.11014,0.000396198,-2.27697e-07,4.33226e-08,1.11054,0.000395872,-9.77293e-08,3.62656e-10,1.11094,0.000395678,-9.66414e-08,-4.47732e-08,1.11133,0.00039535,-2.30961e-07,5.95208e-08,1.11173,0.000395067,-5.23985e-08,-7.41008e-08,1.11212,0.00039474,-2.74701e-07,1.17673e-07,1.11252,0.000394543,7.83181e-08,-1.58172e-07,1.11291,0.000394225,-3.96199e-07,1.57389e-07,1.1133,0.000393905,7.59679e-08,-1.13756e-07,1.1137,0.000393716,-2.653e-07,5.92165e-08,1.11409,0.000393363,-8.76507e-08,-3.90074e-09,1.11449,0.000393176,-9.93529e-08,-4.36136e-08,1.11488,0.000392846,-2.30194e-07,5.91457e-08,1.11527,0.000392563,-5.27564e-08,-7.376e-08,1.11566,0.000392237,-2.74037e-07,1.16685e-07,1.11606,0.000392039,7.60189e-08,-1.54562e-07,1.11645,0.000391727,-3.87667e-07,1.43935e-07,1.11684,0.000391384,4.4137e-08,-6.35487e-08,1.11723,0.000391281,-1.46509e-07,-8.94896e-09,1.11762,0.000390961,-1.73356e-07,-1.98647e-08,1.11801,0.000390555,-2.3295e-07,8.8408e-08,1.1184,0.000390354,3.22736e-08,-9.53486e-08,1.11879,0.000390133,-2.53772e-07,5.45677e-08,1.11918,0.000389789,-9.0069e-08,-3.71296e-09,1.11957,0.000389598,-1.01208e-07,-3.97159e-08,1.11996,0.000389276,-2.20355e-07,4.33671e-08,1.12035,0.000388966,-9.02542e-08,-1.45431e-08,1.12074,0.000388741,-1.33883e-07,1.48052e-08,1.12113,0.000388518,-8.94678e-08,-4.46778e-08,1.12152,0.000388205,-2.23501e-07,4.46966e-08,1.12191,0.000387892,-8.94114e-08,-1.48992e-08,1.12229,0.000387669,-1.34109e-07,1.49003e-08,1.12268,0.000387445,-8.94082e-08,-4.47019e-08,1.12307,0.000387132,-2.23514e-07,4.4698e-08,1.12345,0.000386819,-8.942e-08,-1.48806e-08,1.12384,0.000386596,-1.34062e-07,1.48245e-08,1.12423,0.000386372,-8.95885e-08,-4.44172e-08,1.12461,0.00038606,-2.2284e-07,4.36351e-08,1.125,0.000385745,-9.19348e-08,-1.09139e-08,1.12539,0.000385528,-1.24677e-07,2.05584e-11,1.12577,0.000385279,-1.24615e-07,1.08317e-08,1.12616,0.000385062,-9.21198e-08,-4.33473e-08,1.12654,0.000384748,-2.22162e-07,4.33481e-08,1.12693,0.000384434,-9.21174e-08,-1.08356e-08,1.12731,0.000384217,-1.24624e-07,-5.50907e-12,1.12769,0.000383968,-1.24641e-07,1.08577e-08,1.12808,0.000383751,-9.20679e-08,-4.34252e-08,1.12846,0.000383437,-2.22343e-07,4.36337e-08,1.12884,0.000383123,-9.14422e-08,-1.19005e-08,1.12923,0.000382904,-1.27144e-07,3.96813e-09,1.12961,0.000382662,-1.15239e-07,-3.97207e-09,1.12999,0.000382419,-1.27155e-07,1.19201e-08,1.13038,0.000382201,-9.1395e-08,-4.37085e-08,1.13076,0.000381887,-2.2252e-07,4.37046e-08,1.13114,0.000381573,-9.14068e-08,-1.19005e-08,1.13152,0.000381355,-1.27108e-07,3.89734e-09,1.1319,0.000381112,-1.15416e-07,-3.68887e-09,1.13228,0.00038087,-1.26483e-07,1.08582e-08,1.13266,0.00038065,-9.39083e-08,-3.97438e-08,1.13304,0.000380343,-2.1314e-07,2.89076e-08,1.13342,0.000380003,-1.26417e-07,4.33225e-08,1.1338,0.00037988,3.55072e-09,-8.29883e-08,1.13418,0.000379638,-2.45414e-07,5.0212e-08,1.13456,0.000379298,-9.47781e-08,1.34964e-09,1.13494,0.000379113,-9.07292e-08,-5.56105e-08,1.13532,0.000378764,-2.57561e-07,1.01883e-07,1.1357,0.000378555,4.80889e-08,-1.13504e-07,1.13608,0.000378311,-2.92423e-07,1.13713e-07,1.13646,0.000378067,4.87176e-08,-1.02931e-07,1.13683,0.000377856,-2.60076e-07,5.95923e-08,1.13721,0.000377514,-8.12988e-08,-1.62288e-08,1.13759,0.000377303,-1.29985e-07,5.32278e-09,1.13797,0.000377059,-1.14017e-07,-5.06237e-09,1.13834,0.000376816,-1.29204e-07,1.49267e-08,1.13872,0.000376602,-8.44237e-08,-5.46444e-08,1.1391,0.000376269,-2.48357e-07,8.44417e-08,1.13947,0.000376026,4.96815e-09,-4.47039e-08,1.13985,0.000375902,-1.29143e-07,-2.48355e-08,1.14023,0.000375569,-2.0365e-07,2.48368e-08,1.1406,0.000375236,-1.2914e-07,4.46977e-08,1.14098,0.000375112,4.95341e-09,-8.44184e-08,1.14135,0.000374869,-2.48302e-07,5.45572e-08,1.14173,0.000374536,-8.463e-08,-1.46013e-08,1.1421,0.000374323,-1.28434e-07,3.8478e-09,1.14247,0.000374077,-1.1689e-07,-7.89941e-10,1.14285,0.000373841,-1.1926e-07,-6.88042e-10,1.14322,0.0003736,-1.21324e-07,3.54213e-09,1.1436,0.000373368,-1.10698e-07,-1.34805e-08,1.14397,0.000373107,-1.51139e-07,5.03798e-08,1.14434,0.000372767,0.,0.};\n\n        template <bool srgb, int blueIdx, typename T, typename D>\n        __device__ __forceinline__ void RGB2LuvConvert_f(const T& src, D& dst)\n        {\n            const float _d = 1.f / (0.950456f + 15 + 1.088754f * 3);\n            const float _un = 13 * (4 * 0.950456f * _d);\n            const float _vn = 13 * (9 * _d);\n\n            float B = blueIdx == 0 ? src.x : src.z;\n            float G = src.y;\n            float R = blueIdx == 0 ? src.z : src.x;\n\n            if (srgb)\n            {\n                B = splineInterpolate(B * GAMMA_TAB_SIZE, c_sRGBGammaTab, GAMMA_TAB_SIZE);\n                G = splineInterpolate(G * GAMMA_TAB_SIZE, c_sRGBGammaTab, GAMMA_TAB_SIZE);\n                R = splineInterpolate(R * GAMMA_TAB_SIZE, c_sRGBGammaTab, GAMMA_TAB_SIZE);\n            }\n\n            float X = R * 0.412453f + G * 0.357580f + B * 0.180423f;\n            float Y = R * 0.212671f + G * 0.715160f + B * 0.072169f;\n            float Z = R * 0.019334f + G * 0.119193f + B * 0.950227f;\n\n            float L = splineInterpolate(Y * (LAB_CBRT_TAB_SIZE / 1.5f), c_LabCbrtTab, LAB_CBRT_TAB_SIZE);\n            L = 116.f * L - 16.f;\n\n            const float d = (4 * 13) / ::fmaxf(X + 15 * Y + 3 * Z, numeric_limits<float>::epsilon());\n            float u = L * (X * d - _un);\n            float v = L * ((9 * 0.25f) * Y * d - _vn);\n\n            dst.x = L;\n            dst.y = u;\n            dst.z = v;\n        }\n\n        template <bool srgb, int blueIdx, typename T, typename D>\n        __device__ __forceinline__ void RGB2LuvConvert_b(const T& src, D& dst)\n        {\n            float3 srcf, dstf;\n\n            srcf.x = src.x * (1.f / 255.f);\n            srcf.y = src.y * (1.f / 255.f);\n            srcf.z = src.z * (1.f / 255.f);\n\n            RGB2LuvConvert_f<srgb, blueIdx>(srcf, dstf);\n\n            dst.x = saturate_cast<uchar>(dstf.x * 2.55f);\n            dst.y = saturate_cast<uchar>(dstf.y * 0.72033898305084743f + 96.525423728813564f);\n            dst.z = saturate_cast<uchar>(dstf.z * 0.9732824427480916f + 136.259541984732824f);\n        }\n\n        template <typename T, int scn, int dcn, bool srgb, int blueIdx> struct RGB2Luv;\n        template <int scn, int dcn, bool srgb, int blueIdx>\n        struct RGB2Luv<uchar, scn, dcn, srgb, blueIdx>\n            : unary_function<typename TypeVec<uchar, scn>::vec_type, typename TypeVec<uchar, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<uchar, dcn>::vec_type operator ()(const typename TypeVec<uchar, scn>::vec_type& src) const\n            {\n                typename TypeVec<uchar, dcn>::vec_type dst;\n\n                RGB2LuvConvert_b<srgb, blueIdx>(src, dst);\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ RGB2Luv() {}\n            __host__ __device__ __forceinline__ RGB2Luv(const RGB2Luv&) {}\n        };\n        template <int scn, int dcn, bool srgb, int blueIdx>\n        struct RGB2Luv<float, scn, dcn, srgb, blueIdx>\n            : unary_function<typename TypeVec<float, scn>::vec_type, typename TypeVec<float, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<float, dcn>::vec_type operator ()(const typename TypeVec<float, scn>::vec_type& src) const\n            {\n                typename TypeVec<float, dcn>::vec_type dst;\n\n                RGB2LuvConvert_f<srgb, blueIdx>(src, dst);\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ RGB2Luv() {}\n            __host__ __device__ __forceinline__ RGB2Luv(const RGB2Luv&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(name, scn, dcn, srgb, blueIdx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::RGB2Luv<T, scn, dcn, srgb, blueIdx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n    namespace color_detail\n    {\n        template <bool srgb, int blueIdx, typename T, typename D>\n        __device__ __forceinline__ void Luv2RGBConvert_f(const T& src, D& dst)\n        {\n            const float _d = 1.f / (0.950456f + 15 + 1.088754f * 3);\n            const float _un = 4 * 0.950456f * _d;\n            const float _vn = 9 * _d;\n\n            float L = src.x;\n            float u = src.y;\n            float v = src.z;\n\n            float Y = (L + 16.f) * (1.f / 116.f);\n            Y = Y * Y * Y;\n\n            float d = (1.f / 13.f) / L;\n            u = u * d + _un;\n            v = v * d + _vn;\n\n            float iv = 1.f / v;\n            float X = 2.25f * u * Y * iv;\n            float Z = (12 - 3 * u - 20 * v) * Y * 0.25f * iv;\n\n            float B = 0.055648f * X - 0.204043f * Y + 1.057311f * Z;\n            float G = -0.969256f * X + 1.875991f * Y + 0.041556f * Z;\n            float R = 3.240479f * X - 1.537150f * Y - 0.498535f * Z;\n\n            if (srgb)\n            {\n                B = splineInterpolate(B * GAMMA_TAB_SIZE, c_sRGBInvGammaTab, GAMMA_TAB_SIZE);\n                G = splineInterpolate(G * GAMMA_TAB_SIZE, c_sRGBInvGammaTab, GAMMA_TAB_SIZE);\n                R = splineInterpolate(R * GAMMA_TAB_SIZE, c_sRGBInvGammaTab, GAMMA_TAB_SIZE);\n            }\n\n            dst.x = blueIdx == 0 ? B : R;\n            dst.y = G;\n            dst.z = blueIdx == 0 ? R : B;\n            setAlpha(dst, ColorChannel<float>::max());\n        }\n\n        template <bool srgb, int blueIdx, typename T, typename D>\n        __device__ __forceinline__ void Luv2RGBConvert_b(const T& src, D& dst)\n        {\n            float3 srcf, dstf;\n\n            srcf.x = src.x * (100.f / 255.f);\n            srcf.y = src.y * 1.388235294117647f - 134.f;\n            srcf.z = src.z * 1.027450980392157f - 140.f;\n\n            Luv2RGBConvert_f<srgb, blueIdx>(srcf, dstf);\n\n            dst.x = saturate_cast<uchar>(dstf.x * 255.f);\n            dst.y = saturate_cast<uchar>(dstf.y * 255.f);\n            dst.z = saturate_cast<uchar>(dstf.z * 255.f);\n            setAlpha(dst, ColorChannel<uchar>::max());\n        }\n\n        template <typename T, int scn, int dcn, bool srgb, int blueIdx> struct Luv2RGB;\n        template <int scn, int dcn, bool srgb, int blueIdx>\n        struct Luv2RGB<uchar, scn, dcn, srgb, blueIdx>\n            : unary_function<typename TypeVec<uchar, scn>::vec_type, typename TypeVec<uchar, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<uchar, dcn>::vec_type operator ()(const typename TypeVec<uchar, scn>::vec_type& src) const\n            {\n                typename TypeVec<uchar, dcn>::vec_type dst;\n\n                Luv2RGBConvert_b<srgb, blueIdx>(src, dst);\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ Luv2RGB() {}\n            __host__ __device__ __forceinline__ Luv2RGB(const Luv2RGB&) {}\n        };\n        template <int scn, int dcn, bool srgb, int blueIdx>\n        struct Luv2RGB<float, scn, dcn, srgb, blueIdx>\n            : unary_function<typename TypeVec<float, scn>::vec_type, typename TypeVec<float, dcn>::vec_type>\n        {\n            __device__ __forceinline__ typename TypeVec<float, dcn>::vec_type operator ()(const typename TypeVec<float, scn>::vec_type& src) const\n            {\n                typename TypeVec<float, dcn>::vec_type dst;\n\n                Luv2RGBConvert_f<srgb, blueIdx>(src, dst);\n\n                return dst;\n            }\n            __host__ __device__ __forceinline__ Luv2RGB() {}\n            __host__ __device__ __forceinline__ Luv2RGB(const Luv2RGB&) {}\n        };\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(name, scn, dcn, srgb, blueIdx) \\\n    template <typename T> struct name ## _traits \\\n    { \\\n        typedef ::cv::cuda::device::color_detail::Luv2RGB<T, scn, dcn, srgb, blueIdx> functor_type; \\\n        static __host__ __device__ __forceinline__ functor_type create_functor() \\\n        { \\\n            return functor_type(); \\\n        } \\\n    };\n\n    #undef CV_DESCALE\n\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_COLOR_DETAIL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/detail/reduce.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_REDUCE_DETAIL_HPP__\n#define __OPENCV_CUDA_REDUCE_DETAIL_HPP__\n\n#include <thrust/tuple.h>\n#include \"../warp.hpp\"\n#include \"../warp_shuffle.hpp\"\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    namespace reduce_detail\n    {\n        template <typename T> struct GetType;\n        template <typename T> struct GetType<T*>\n        {\n            typedef T type;\n        };\n        template <typename T> struct GetType<volatile T*>\n        {\n            typedef T type;\n        };\n        template <typename T> struct GetType<T&>\n        {\n            typedef T type;\n        };\n\n        template <unsigned int I, unsigned int N>\n        struct For\n        {\n            template <class PointerTuple, class ValTuple>\n            static __device__ void loadToSmem(const PointerTuple& smem, const ValTuple& val, unsigned int tid)\n            {\n                thrust::get<I>(smem)[tid] = thrust::get<I>(val);\n\n                For<I + 1, N>::loadToSmem(smem, val, tid);\n            }\n            template <class PointerTuple, class ValTuple>\n            static __device__ void loadFromSmem(const PointerTuple& smem, const ValTuple& val, unsigned int tid)\n            {\n                thrust::get<I>(val) = thrust::get<I>(smem)[tid];\n\n                For<I + 1, N>::loadFromSmem(smem, val, tid);\n            }\n\n            template <class PointerTuple, class ValTuple, class OpTuple>\n            static __device__ void merge(const PointerTuple& smem, const ValTuple& val, unsigned int tid, unsigned int delta, const OpTuple& op)\n            {\n                typename GetType<typename thrust::tuple_element<I, PointerTuple>::type>::type reg = thrust::get<I>(smem)[tid + delta];\n                thrust::get<I>(smem)[tid] = thrust::get<I>(val) = thrust::get<I>(op)(thrust::get<I>(val), reg);\n\n                For<I + 1, N>::merge(smem, val, tid, delta, op);\n            }\n            template <class ValTuple, class OpTuple>\n            static __device__ void mergeShfl(const ValTuple& val, unsigned int delta, unsigned int width, const OpTuple& op)\n            {\n                typename GetType<typename thrust::tuple_element<I, ValTuple>::type>::type reg = shfl_down(thrust::get<I>(val), delta, width);\n                thrust::get<I>(val) = thrust::get<I>(op)(thrust::get<I>(val), reg);\n\n                For<I + 1, N>::mergeShfl(val, delta, width, op);\n            }\n        };\n        template <unsigned int N>\n        struct For<N, N>\n        {\n            template <class PointerTuple, class ValTuple>\n            static __device__ void loadToSmem(const PointerTuple&, const ValTuple&, unsigned int)\n            {\n            }\n            template <class PointerTuple, class ValTuple>\n            static __device__ void loadFromSmem(const PointerTuple&, const ValTuple&, unsigned int)\n            {\n            }\n\n            template <class PointerTuple, class ValTuple, class OpTuple>\n            static __device__ void merge(const PointerTuple&, const ValTuple&, unsigned int, unsigned int, const OpTuple&)\n            {\n            }\n            template <class ValTuple, class OpTuple>\n            static __device__ void mergeShfl(const ValTuple&, unsigned int, unsigned int, const OpTuple&)\n            {\n            }\n        };\n\n        template <typename T>\n        __device__ __forceinline__ void loadToSmem(volatile T* smem, T& val, unsigned int tid)\n        {\n            smem[tid] = val;\n        }\n        template <typename T>\n        __device__ __forceinline__ void loadFromSmem(volatile T* smem, T& val, unsigned int tid)\n        {\n            val = smem[tid];\n        }\n        template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9,\n                  typename R0, typename R1, typename R2, typename R3, typename R4, typename R5, typename R6, typename R7, typename R8, typename R9>\n        __device__ __forceinline__ void loadToSmem(const thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,\n                                                       const thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9>& val,\n                                                       unsigned int tid)\n        {\n            For<0, thrust::tuple_size<thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> >::value>::loadToSmem(smem, val, tid);\n        }\n        template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9,\n                  typename R0, typename R1, typename R2, typename R3, typename R4, typename R5, typename R6, typename R7, typename R8, typename R9>\n        __device__ __forceinline__ void loadFromSmem(const thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,\n                                                         const thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9>& val,\n                                                         unsigned int tid)\n        {\n            For<0, thrust::tuple_size<thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> >::value>::loadFromSmem(smem, val, tid);\n        }\n\n        template <typename T, class Op>\n        __device__ __forceinline__ void merge(volatile T* smem, T& val, unsigned int tid, unsigned int delta, const Op& op)\n        {\n            T reg = smem[tid + delta];\n            smem[tid] = val = op(val, reg);\n        }\n        template <typename T, class Op>\n        __device__ __forceinline__ void mergeShfl(T& val, unsigned int delta, unsigned int width, const Op& op)\n        {\n            T reg = shfl_down(val, delta, width);\n            val = op(val, reg);\n        }\n        template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9,\n                  typename R0, typename R1, typename R2, typename R3, typename R4, typename R5, typename R6, typename R7, typename R8, typename R9,\n                  class Op0, class Op1, class Op2, class Op3, class Op4, class Op5, class Op6, class Op7, class Op8, class Op9>\n        __device__ __forceinline__ void merge(const thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,\n                                              const thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9>& val,\n                                              unsigned int tid,\n                                              unsigned int delta,\n                                              const thrust::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9>& op)\n        {\n            For<0, thrust::tuple_size<thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> >::value>::merge(smem, val, tid, delta, op);\n        }\n        template <typename R0, typename R1, typename R2, typename R3, typename R4, typename R5, typename R6, typename R7, typename R8, typename R9,\n                  class Op0, class Op1, class Op2, class Op3, class Op4, class Op5, class Op6, class Op7, class Op8, class Op9>\n        __device__ __forceinline__ void mergeShfl(const thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9>& val,\n                                                  unsigned int delta,\n                                                  unsigned int width,\n                                                  const thrust::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9>& op)\n        {\n            For<0, thrust::tuple_size<thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9> >::value>::mergeShfl(val, delta, width, op);\n        }\n\n        template <unsigned int N> struct Generic\n        {\n            template <typename Pointer, typename Reference, class Op>\n            static __device__ void reduce(Pointer smem, Reference val, unsigned int tid, Op op)\n            {\n                loadToSmem(smem, val, tid);\n                if (N >= 32)\n                    __syncthreads();\n\n                if (N >= 2048)\n                {\n                    if (tid < 1024)\n                        merge(smem, val, tid, 1024, op);\n\n                    __syncthreads();\n                }\n                if (N >= 1024)\n                {\n                    if (tid < 512)\n                        merge(smem, val, tid, 512, op);\n\n                    __syncthreads();\n                }\n                if (N >= 512)\n                {\n                    if (tid < 256)\n                        merge(smem, val, tid, 256, op);\n\n                    __syncthreads();\n                }\n                if (N >= 256)\n                {\n                    if (tid < 128)\n                        merge(smem, val, tid, 128, op);\n\n                    __syncthreads();\n                }\n                if (N >= 128)\n                {\n                    if (tid < 64)\n                        merge(smem, val, tid, 64, op);\n\n                    __syncthreads();\n                }\n                if (N >= 64)\n                {\n                    if (tid < 32)\n                        merge(smem, val, tid, 32, op);\n                }\n\n                if (tid < 16)\n                {\n                    merge(smem, val, tid, 16, op);\n                    merge(smem, val, tid, 8, op);\n                    merge(smem, val, tid, 4, op);\n                    merge(smem, val, tid, 2, op);\n                    merge(smem, val, tid, 1, op);\n                }\n            }\n        };\n\n        template <unsigned int I, typename Pointer, typename Reference, class Op>\n        struct Unroll\n        {\n            static __device__ void loopShfl(Reference val, Op op, unsigned int N)\n            {\n                mergeShfl(val, I, N, op);\n                Unroll<I / 2, Pointer, Reference, Op>::loopShfl(val, op, N);\n            }\n            static __device__ void loop(Pointer smem, Reference val, unsigned int tid, Op op)\n            {\n                merge(smem, val, tid, I, op);\n                Unroll<I / 2, Pointer, Reference, Op>::loop(smem, val, tid, op);\n            }\n        };\n        template <typename Pointer, typename Reference, class Op>\n        struct Unroll<0, Pointer, Reference, Op>\n        {\n            static __device__ void loopShfl(Reference, Op, unsigned int)\n            {\n            }\n            static __device__ void loop(Pointer, Reference, unsigned int, Op)\n            {\n            }\n        };\n\n        template <unsigned int N> struct WarpOptimized\n        {\n            template <typename Pointer, typename Reference, class Op>\n            static __device__ void reduce(Pointer smem, Reference val, unsigned int tid, Op op)\n            {\n            #if __CUDA_ARCH__ >= 300\n                (void) smem;\n                (void) tid;\n\n                Unroll<N / 2, Pointer, Reference, Op>::loopShfl(val, op, N);\n            #else\n                loadToSmem(smem, val, tid);\n\n                if (tid < N / 2)\n                    Unroll<N / 2, Pointer, Reference, Op>::loop(smem, val, tid, op);\n            #endif\n            }\n        };\n\n        template <unsigned int N> struct GenericOptimized32\n        {\n            enum { M = N / 32 };\n\n            template <typename Pointer, typename Reference, class Op>\n            static __device__ void reduce(Pointer smem, Reference val, unsigned int tid, Op op)\n            {\n                const unsigned int laneId = Warp::laneId();\n\n            #if __CUDA_ARCH__ >= 300\n                Unroll<16, Pointer, Reference, Op>::loopShfl(val, op, warpSize);\n\n                if (laneId == 0)\n                    loadToSmem(smem, val, tid / 32);\n            #else\n                loadToSmem(smem, val, tid);\n\n                if (laneId < 16)\n                    Unroll<16, Pointer, Reference, Op>::loop(smem, val, tid, op);\n\n                __syncthreads();\n\n                if (laneId == 0)\n                    loadToSmem(smem, val, tid / 32);\n            #endif\n\n                __syncthreads();\n\n                loadFromSmem(smem, val, tid);\n\n                if (tid < 32)\n                {\n                #if __CUDA_ARCH__ >= 300\n                    Unroll<M / 2, Pointer, Reference, Op>::loopShfl(val, op, M);\n                #else\n                    Unroll<M / 2, Pointer, Reference, Op>::loop(smem, val, tid, op);\n                #endif\n                }\n            }\n        };\n\n        template <bool val, class T1, class T2> struct StaticIf;\n        template <class T1, class T2> struct StaticIf<true, T1, T2>\n        {\n            typedef T1 type;\n        };\n        template <class T1, class T2> struct StaticIf<false, T1, T2>\n        {\n            typedef T2 type;\n        };\n\n        template <unsigned int N> struct IsPowerOf2\n        {\n            enum { value = ((N != 0) && !(N & (N - 1))) };\n        };\n\n        template <unsigned int N> struct Dispatcher\n        {\n            typedef typename StaticIf<\n                (N <= 32) && IsPowerOf2<N>::value,\n                WarpOptimized<N>,\n                typename StaticIf<\n                    (N <= 1024) && IsPowerOf2<N>::value,\n                    GenericOptimized32<N>,\n                    Generic<N>\n                >::type\n            >::type reductor;\n        };\n    }\n}}}\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_REDUCE_DETAIL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/detail/reduce_key_val.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_PRED_VAL_REDUCE_DETAIL_HPP__\n#define __OPENCV_CUDA_PRED_VAL_REDUCE_DETAIL_HPP__\n\n#include <thrust/tuple.h>\n#include \"../warp.hpp\"\n#include \"../warp_shuffle.hpp\"\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    namespace reduce_key_val_detail\n    {\n        template <typename T> struct GetType;\n        template <typename T> struct GetType<T*>\n        {\n            typedef T type;\n        };\n        template <typename T> struct GetType<volatile T*>\n        {\n            typedef T type;\n        };\n        template <typename T> struct GetType<T&>\n        {\n            typedef T type;\n        };\n\n        template <unsigned int I, unsigned int N>\n        struct For\n        {\n            template <class PointerTuple, class ReferenceTuple>\n            static __device__ void loadToSmem(const PointerTuple& smem, const ReferenceTuple& data, unsigned int tid)\n            {\n                thrust::get<I>(smem)[tid] = thrust::get<I>(data);\n\n                For<I + 1, N>::loadToSmem(smem, data, tid);\n            }\n            template <class PointerTuple, class ReferenceTuple>\n            static __device__ void loadFromSmem(const PointerTuple& smem, const ReferenceTuple& data, unsigned int tid)\n            {\n                thrust::get<I>(data) = thrust::get<I>(smem)[tid];\n\n                For<I + 1, N>::loadFromSmem(smem, data, tid);\n            }\n\n            template <class ReferenceTuple>\n            static __device__ void copyShfl(const ReferenceTuple& val, unsigned int delta, int width)\n            {\n                thrust::get<I>(val) = shfl_down(thrust::get<I>(val), delta, width);\n\n                For<I + 1, N>::copyShfl(val, delta, width);\n            }\n            template <class PointerTuple, class ReferenceTuple>\n            static __device__ void copy(const PointerTuple& svals, const ReferenceTuple& val, unsigned int tid, unsigned int delta)\n            {\n                thrust::get<I>(svals)[tid] = thrust::get<I>(val) = thrust::get<I>(svals)[tid + delta];\n\n                For<I + 1, N>::copy(svals, val, tid, delta);\n            }\n\n            template <class KeyReferenceTuple, class ValReferenceTuple, class CmpTuple>\n            static __device__ void mergeShfl(const KeyReferenceTuple& key, const ValReferenceTuple& val, const CmpTuple& cmp, unsigned int delta, int width)\n            {\n                typename GetType<typename thrust::tuple_element<I, KeyReferenceTuple>::type>::type reg = shfl_down(thrust::get<I>(key), delta, width);\n\n                if (thrust::get<I>(cmp)(reg, thrust::get<I>(key)))\n                {\n                    thrust::get<I>(key) = reg;\n                    thrust::get<I>(val) = shfl_down(thrust::get<I>(val), delta, width);\n                }\n\n                For<I + 1, N>::mergeShfl(key, val, cmp, delta, width);\n            }\n            template <class KeyPointerTuple, class KeyReferenceTuple, class ValPointerTuple, class ValReferenceTuple, class CmpTuple>\n            static __device__ void merge(const KeyPointerTuple& skeys, const KeyReferenceTuple& key,\n                                         const ValPointerTuple& svals, const ValReferenceTuple& val,\n                                         const CmpTuple& cmp,\n                                         unsigned int tid, unsigned int delta)\n            {\n                typename GetType<typename thrust::tuple_element<I, KeyPointerTuple>::type>::type reg = thrust::get<I>(skeys)[tid + delta];\n\n                if (thrust::get<I>(cmp)(reg, thrust::get<I>(key)))\n                {\n                    thrust::get<I>(skeys)[tid] = thrust::get<I>(key) = reg;\n                    thrust::get<I>(svals)[tid] = thrust::get<I>(val) = thrust::get<I>(svals)[tid + delta];\n                }\n\n                For<I + 1, N>::merge(skeys, key, svals, val, cmp, tid, delta);\n            }\n        };\n        template <unsigned int N>\n        struct For<N, N>\n        {\n            template <class PointerTuple, class ReferenceTuple>\n            static __device__ void loadToSmem(const PointerTuple&, const ReferenceTuple&, unsigned int)\n            {\n            }\n            template <class PointerTuple, class ReferenceTuple>\n            static __device__ void loadFromSmem(const PointerTuple&, const ReferenceTuple&, unsigned int)\n            {\n            }\n\n            template <class ReferenceTuple>\n            static __device__ void copyShfl(const ReferenceTuple&, unsigned int, int)\n            {\n            }\n            template <class PointerTuple, class ReferenceTuple>\n            static __device__ void copy(const PointerTuple&, const ReferenceTuple&, unsigned int, unsigned int)\n            {\n            }\n\n            template <class KeyReferenceTuple, class ValReferenceTuple, class CmpTuple>\n            static __device__ void mergeShfl(const KeyReferenceTuple&, const ValReferenceTuple&, const CmpTuple&, unsigned int, int)\n            {\n            }\n            template <class KeyPointerTuple, class KeyReferenceTuple, class ValPointerTuple, class ValReferenceTuple, class CmpTuple>\n            static __device__ void merge(const KeyPointerTuple&, const KeyReferenceTuple&,\n                                         const ValPointerTuple&, const ValReferenceTuple&,\n                                         const CmpTuple&,\n                                         unsigned int, unsigned int)\n            {\n            }\n        };\n\n        //////////////////////////////////////////////////////\n        // loadToSmem\n\n        template <typename T>\n        __device__ __forceinline__ void loadToSmem(volatile T* smem, T& data, unsigned int tid)\n        {\n            smem[tid] = data;\n        }\n        template <typename T>\n        __device__ __forceinline__ void loadFromSmem(volatile T* smem, T& data, unsigned int tid)\n        {\n            data = smem[tid];\n        }\n        template <typename VP0, typename VP1, typename VP2, typename VP3, typename VP4, typename VP5, typename VP6, typename VP7, typename VP8, typename VP9,\n                  typename VR0, typename VR1, typename VR2, typename VR3, typename VR4, typename VR5, typename VR6, typename VR7, typename VR8, typename VR9>\n        __device__ __forceinline__ void loadToSmem(const thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9>& smem,\n                                                   const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>& data,\n                                                   unsigned int tid)\n        {\n            For<0, thrust::tuple_size<thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9> >::value>::loadToSmem(smem, data, tid);\n        }\n        template <typename VP0, typename VP1, typename VP2, typename VP3, typename VP4, typename VP5, typename VP6, typename VP7, typename VP8, typename VP9,\n                  typename VR0, typename VR1, typename VR2, typename VR3, typename VR4, typename VR5, typename VR6, typename VR7, typename VR8, typename VR9>\n        __device__ __forceinline__ void loadFromSmem(const thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9>& smem,\n                                                     const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>& data,\n                                                     unsigned int tid)\n        {\n            For<0, thrust::tuple_size<thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9> >::value>::loadFromSmem(smem, data, tid);\n        }\n\n        //////////////////////////////////////////////////////\n        // copyVals\n\n        template <typename V>\n        __device__ __forceinline__ void copyValsShfl(V& val, unsigned int delta, int width)\n        {\n            val = shfl_down(val, delta, width);\n        }\n        template <typename V>\n        __device__ __forceinline__ void copyVals(volatile V* svals, V& val, unsigned int tid, unsigned int delta)\n        {\n            svals[tid] = val = svals[tid + delta];\n        }\n        template <typename VR0, typename VR1, typename VR2, typename VR3, typename VR4, typename VR5, typename VR6, typename VR7, typename VR8, typename VR9>\n        __device__ __forceinline__ void copyValsShfl(const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>& val,\n                                                     unsigned int delta,\n                                                     int width)\n        {\n            For<0, thrust::tuple_size<thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9> >::value>::copyShfl(val, delta, width);\n        }\n        template <typename VP0, typename VP1, typename VP2, typename VP3, typename VP4, typename VP5, typename VP6, typename VP7, typename VP8, typename VP9,\n                  typename VR0, typename VR1, typename VR2, typename VR3, typename VR4, typename VR5, typename VR6, typename VR7, typename VR8, typename VR9>\n        __device__ __forceinline__ void copyVals(const thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9>& svals,\n                                                 const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>& val,\n                                                 unsigned int tid, unsigned int delta)\n        {\n            For<0, thrust::tuple_size<thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9> >::value>::copy(svals, val, tid, delta);\n        }\n\n        //////////////////////////////////////////////////////\n        // merge\n\n        template <typename K, typename V, class Cmp>\n        __device__ __forceinline__ void mergeShfl(K& key, V& val, const Cmp& cmp, unsigned int delta, int width)\n        {\n            K reg = shfl_down(key, delta, width);\n\n            if (cmp(reg, key))\n            {\n                key = reg;\n                copyValsShfl(val, delta, width);\n            }\n        }\n        template <typename K, typename V, class Cmp>\n        __device__ __forceinline__ void merge(volatile K* skeys, K& key, volatile V* svals, V& val, const Cmp& cmp, unsigned int tid, unsigned int delta)\n        {\n            K reg = skeys[tid + delta];\n\n            if (cmp(reg, key))\n            {\n                skeys[tid] = key = reg;\n                copyVals(svals, val, tid, delta);\n            }\n        }\n        template <typename K,\n                  typename VR0, typename VR1, typename VR2, typename VR3, typename VR4, typename VR5, typename VR6, typename VR7, typename VR8, typename VR9,\n                  class Cmp>\n        __device__ __forceinline__ void mergeShfl(K& key,\n                                                  const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>& val,\n                                                  const Cmp& cmp,\n                                                  unsigned int delta, int width)\n        {\n            K reg = shfl_down(key, delta, width);\n\n            if (cmp(reg, key))\n            {\n                key = reg;\n                copyValsShfl(val, delta, width);\n            }\n        }\n        template <typename K,\n                  typename VP0, typename VP1, typename VP2, typename VP3, typename VP4, typename VP5, typename VP6, typename VP7, typename VP8, typename VP9,\n                  typename VR0, typename VR1, typename VR2, typename VR3, typename VR4, typename VR5, typename VR6, typename VR7, typename VR8, typename VR9,\n                  class Cmp>\n        __device__ __forceinline__ void merge(volatile K* skeys, K& key,\n                                              const thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9>& svals,\n                                              const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>& val,\n                                              const Cmp& cmp, unsigned int tid, unsigned int delta)\n        {\n            K reg = skeys[tid + delta];\n\n            if (cmp(reg, key))\n            {\n                skeys[tid] = key = reg;\n                copyVals(svals, val, tid, delta);\n            }\n        }\n        template <typename KR0, typename KR1, typename KR2, typename KR3, typename KR4, typename KR5, typename KR6, typename KR7, typename KR8, typename KR9,\n                  typename VR0, typename VR1, typename VR2, typename VR3, typename VR4, typename VR5, typename VR6, typename VR7, typename VR8, typename VR9,\n                  class Cmp0, class Cmp1, class Cmp2, class Cmp3, class Cmp4, class Cmp5, class Cmp6, class Cmp7, class Cmp8, class Cmp9>\n        __device__ __forceinline__ void mergeShfl(const thrust::tuple<KR0, KR1, KR2, KR3, KR4, KR5, KR6, KR7, KR8, KR9>& key,\n                                                  const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>& val,\n                                                  const thrust::tuple<Cmp0, Cmp1, Cmp2, Cmp3, Cmp4, Cmp5, Cmp6, Cmp7, Cmp8, Cmp9>& cmp,\n                                                  unsigned int delta, int width)\n        {\n            For<0, thrust::tuple_size<thrust::tuple<KR0, KR1, KR2, KR3, KR4, KR5, KR6, KR7, KR8, KR9> >::value>::mergeShfl(key, val, cmp, delta, width);\n        }\n        template <typename KP0, typename KP1, typename KP2, typename KP3, typename KP4, typename KP5, typename KP6, typename KP7, typename KP8, typename KP9,\n                  typename KR0, typename KR1, typename KR2, typename KR3, typename KR4, typename KR5, typename KR6, typename KR7, typename KR8, typename KR9,\n                  typename VP0, typename VP1, typename VP2, typename VP3, typename VP4, typename VP5, typename VP6, typename VP7, typename VP8, typename VP9,\n                  typename VR0, typename VR1, typename VR2, typename VR3, typename VR4, typename VR5, typename VR6, typename VR7, typename VR8, typename VR9,\n                  class Cmp0, class Cmp1, class Cmp2, class Cmp3, class Cmp4, class Cmp5, class Cmp6, class Cmp7, class Cmp8, class Cmp9>\n        __device__ __forceinline__ void merge(const thrust::tuple<KP0, KP1, KP2, KP3, KP4, KP5, KP6, KP7, KP8, KP9>& skeys,\n                                              const thrust::tuple<KR0, KR1, KR2, KR3, KR4, KR5, KR6, KR7, KR8, KR9>& key,\n                                              const thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9>& svals,\n                                              const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>& val,\n                                              const thrust::tuple<Cmp0, Cmp1, Cmp2, Cmp3, Cmp4, Cmp5, Cmp6, Cmp7, Cmp8, Cmp9>& cmp,\n                                              unsigned int tid, unsigned int delta)\n        {\n            For<0, thrust::tuple_size<thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9> >::value>::merge(skeys, key, svals, val, cmp, tid, delta);\n        }\n\n        //////////////////////////////////////////////////////\n        // Generic\n\n        template <unsigned int N> struct Generic\n        {\n            template <class KP, class KR, class VP, class VR, class Cmp>\n            static __device__ void reduce(KP skeys, KR key, VP svals, VR val, unsigned int tid, Cmp cmp)\n            {\n                loadToSmem(skeys, key, tid);\n                loadValsToSmem(svals, val, tid);\n                if (N >= 32)\n                    __syncthreads();\n\n                if (N >= 2048)\n                {\n                    if (tid < 1024)\n                        merge(skeys, key, svals, val, cmp, tid, 1024);\n\n                    __syncthreads();\n                }\n                if (N >= 1024)\n                {\n                    if (tid < 512)\n                        merge(skeys, key, svals, val, cmp, tid, 512);\n\n                    __syncthreads();\n                }\n                if (N >= 512)\n                {\n                    if (tid < 256)\n                        merge(skeys, key, svals, val, cmp, tid, 256);\n\n                    __syncthreads();\n                }\n                if (N >= 256)\n                {\n                    if (tid < 128)\n                        merge(skeys, key, svals, val, cmp, tid, 128);\n\n                    __syncthreads();\n                }\n                if (N >= 128)\n                {\n                    if (tid < 64)\n                        merge(skeys, key, svals, val, cmp, tid, 64);\n\n                    __syncthreads();\n                }\n                if (N >= 64)\n                {\n                    if (tid < 32)\n                        merge(skeys, key, svals, val, cmp, tid, 32);\n                }\n\n                if (tid < 16)\n                {\n                    merge(skeys, key, svals, val, cmp, tid, 16);\n                    merge(skeys, key, svals, val, cmp, tid, 8);\n                    merge(skeys, key, svals, val, cmp, tid, 4);\n                    merge(skeys, key, svals, val, cmp, tid, 2);\n                    merge(skeys, key, svals, val, cmp, tid, 1);\n                }\n            }\n        };\n\n        template <unsigned int I, class KP, class KR, class VP, class VR, class Cmp>\n        struct Unroll\n        {\n            static __device__ void loopShfl(KR key, VR val, Cmp cmp, unsigned int N)\n            {\n                mergeShfl(key, val, cmp, I, N);\n                Unroll<I / 2, KP, KR, VP, VR, Cmp>::loopShfl(key, val, cmp, N);\n            }\n            static __device__ void loop(KP skeys, KR key, VP svals, VR val, unsigned int tid, Cmp cmp)\n            {\n                merge(skeys, key, svals, val, cmp, tid, I);\n                Unroll<I / 2, KP, KR, VP, VR, Cmp>::loop(skeys, key, svals, val, tid, cmp);\n            }\n        };\n        template <class KP, class KR, class VP, class VR, class Cmp>\n        struct Unroll<0, KP, KR, VP, VR, Cmp>\n        {\n            static __device__ void loopShfl(KR, VR, Cmp, unsigned int)\n            {\n            }\n            static __device__ void loop(KP, KR, VP, VR, unsigned int, Cmp)\n            {\n            }\n        };\n\n        template <unsigned int N> struct WarpOptimized\n        {\n            template <class KP, class KR, class VP, class VR, class Cmp>\n            static __device__ void reduce(KP skeys, KR key, VP svals, VR val, unsigned int tid, Cmp cmp)\n            {\n            #if 0 // __CUDA_ARCH__ >= 300\n                (void) skeys;\n                (void) svals;\n                (void) tid;\n\n                Unroll<N / 2, KP, KR, VP, VR, Cmp>::loopShfl(key, val, cmp, N);\n            #else\n                loadToSmem(skeys, key, tid);\n                loadToSmem(svals, val, tid);\n\n                if (tid < N / 2)\n                    Unroll<N / 2, KP, KR, VP, VR, Cmp>::loop(skeys, key, svals, val, tid, cmp);\n            #endif\n            }\n        };\n\n        template <unsigned int N> struct GenericOptimized32\n        {\n            enum { M = N / 32 };\n\n            template <class KP, class KR, class VP, class VR, class Cmp>\n            static __device__ void reduce(KP skeys, KR key, VP svals, VR val, unsigned int tid, Cmp cmp)\n            {\n                const unsigned int laneId = Warp::laneId();\n\n            #if 0 // __CUDA_ARCH__ >= 300\n                Unroll<16, KP, KR, VP, VR, Cmp>::loopShfl(key, val, cmp, warpSize);\n\n                if (laneId == 0)\n                {\n                    loadToSmem(skeys, key, tid / 32);\n                    loadToSmem(svals, val, tid / 32);\n                }\n            #else\n                loadToSmem(skeys, key, tid);\n                loadToSmem(svals, val, tid);\n\n                if (laneId < 16)\n                    Unroll<16, KP, KR, VP, VR, Cmp>::loop(skeys, key, svals, val, tid, cmp);\n\n                __syncthreads();\n\n                if (laneId == 0)\n                {\n                    loadToSmem(skeys, key, tid / 32);\n                    loadToSmem(svals, val, tid / 32);\n                }\n            #endif\n\n                __syncthreads();\n\n                loadFromSmem(skeys, key, tid);\n\n                if (tid < 32)\n                {\n                #if 0 // __CUDA_ARCH__ >= 300\n                    loadFromSmem(svals, val, tid);\n\n                    Unroll<M / 2, KP, KR, VP, VR, Cmp>::loopShfl(key, val, cmp, M);\n                #else\n                    Unroll<M / 2, KP, KR, VP, VR, Cmp>::loop(skeys, key, svals, val, tid, cmp);\n                #endif\n                }\n            }\n        };\n\n        template <bool val, class T1, class T2> struct StaticIf;\n        template <class T1, class T2> struct StaticIf<true, T1, T2>\n        {\n            typedef T1 type;\n        };\n        template <class T1, class T2> struct StaticIf<false, T1, T2>\n        {\n            typedef T2 type;\n        };\n\n        template <unsigned int N> struct IsPowerOf2\n        {\n            enum { value = ((N != 0) && !(N & (N - 1))) };\n        };\n\n        template <unsigned int N> struct Dispatcher\n        {\n            typedef typename StaticIf<\n                (N <= 32) && IsPowerOf2<N>::value,\n                WarpOptimized<N>,\n                typename StaticIf<\n                    (N <= 1024) && IsPowerOf2<N>::value,\n                    GenericOptimized32<N>,\n                    Generic<N>\n                >::type\n            >::type reductor;\n        };\n    }\n}}}\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_PRED_VAL_REDUCE_DETAIL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/detail/transform_detail.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_TRANSFORM_DETAIL_HPP__\n#define __OPENCV_CUDA_TRANSFORM_DETAIL_HPP__\n\n#include \"../common.hpp\"\n#include \"../vec_traits.hpp\"\n#include \"../functional.hpp\"\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    namespace transform_detail\n    {\n        //! Read Write Traits\n\n        template <typename T, typename D, int shift> struct UnaryReadWriteTraits\n        {\n            typedef typename TypeVec<T, shift>::vec_type read_type;\n            typedef typename TypeVec<D, shift>::vec_type write_type;\n        };\n\n        template <typename T1, typename T2, typename D, int shift> struct BinaryReadWriteTraits\n        {\n            typedef typename TypeVec<T1, shift>::vec_type read_type1;\n            typedef typename TypeVec<T2, shift>::vec_type read_type2;\n            typedef typename TypeVec<D, shift>::vec_type write_type;\n        };\n\n        //! Transform kernels\n\n        template <int shift> struct OpUnroller;\n        template <> struct OpUnroller<1>\n        {\n            template <typename T, typename D, typename UnOp, typename Mask>\n            static __device__ __forceinline__ void unroll(const T& src, D& dst, const Mask& mask, UnOp& op, int x_shifted, int y)\n            {\n                if (mask(y, x_shifted))\n                    dst.x = op(src.x);\n            }\n\n            template <typename T1, typename T2, typename D, typename BinOp, typename Mask>\n            static __device__ __forceinline__ void unroll(const T1& src1, const T2& src2, D& dst, const Mask& mask, BinOp& op, int x_shifted, int y)\n            {\n                if (mask(y, x_shifted))\n                    dst.x = op(src1.x, src2.x);\n            }\n        };\n        template <> struct OpUnroller<2>\n        {\n            template <typename T, typename D, typename UnOp, typename Mask>\n            static __device__ __forceinline__ void unroll(const T& src, D& dst, const Mask& mask, UnOp& op, int x_shifted, int y)\n            {\n                if (mask(y, x_shifted))\n                    dst.x = op(src.x);\n                if (mask(y, x_shifted + 1))\n                    dst.y = op(src.y);\n            }\n\n            template <typename T1, typename T2, typename D, typename BinOp, typename Mask>\n            static __device__ __forceinline__ void unroll(const T1& src1, const T2& src2, D& dst, const Mask& mask, BinOp& op, int x_shifted, int y)\n            {\n                if (mask(y, x_shifted))\n                    dst.x = op(src1.x, src2.x);\n                if (mask(y, x_shifted + 1))\n                    dst.y = op(src1.y, src2.y);\n            }\n        };\n        template <> struct OpUnroller<3>\n        {\n            template <typename T, typename D, typename UnOp, typename Mask>\n            static __device__ __forceinline__ void unroll(const T& src, D& dst, const Mask& mask, const UnOp& op, int x_shifted, int y)\n            {\n                if (mask(y, x_shifted))\n                    dst.x = op(src.x);\n                if (mask(y, x_shifted + 1))\n                    dst.y = op(src.y);\n                if (mask(y, x_shifted + 2))\n                    dst.z = op(src.z);\n            }\n\n            template <typename T1, typename T2, typename D, typename BinOp, typename Mask>\n            static __device__ __forceinline__ void unroll(const T1& src1, const T2& src2, D& dst, const Mask& mask, const BinOp& op, int x_shifted, int y)\n            {\n                if (mask(y, x_shifted))\n                    dst.x = op(src1.x, src2.x);\n                if (mask(y, x_shifted + 1))\n                    dst.y = op(src1.y, src2.y);\n                if (mask(y, x_shifted + 2))\n                    dst.z = op(src1.z, src2.z);\n            }\n        };\n        template <> struct OpUnroller<4>\n        {\n            template <typename T, typename D, typename UnOp, typename Mask>\n            static __device__ __forceinline__ void unroll(const T& src, D& dst, const Mask& mask, const UnOp& op, int x_shifted, int y)\n            {\n                if (mask(y, x_shifted))\n                    dst.x = op(src.x);\n                if (mask(y, x_shifted + 1))\n                    dst.y = op(src.y);\n                if (mask(y, x_shifted + 2))\n                    dst.z = op(src.z);\n                if (mask(y, x_shifted + 3))\n                    dst.w = op(src.w);\n            }\n\n            template <typename T1, typename T2, typename D, typename BinOp, typename Mask>\n            static __device__ __forceinline__ void unroll(const T1& src1, const T2& src2, D& dst, const Mask& mask, const BinOp& op, int x_shifted, int y)\n            {\n                if (mask(y, x_shifted))\n                    dst.x = op(src1.x, src2.x);\n                if (mask(y, x_shifted + 1))\n                    dst.y = op(src1.y, src2.y);\n                if (mask(y, x_shifted + 2))\n                    dst.z = op(src1.z, src2.z);\n                if (mask(y, x_shifted + 3))\n                    dst.w = op(src1.w, src2.w);\n            }\n        };\n        template <> struct OpUnroller<8>\n        {\n            template <typename T, typename D, typename UnOp, typename Mask>\n            static __device__ __forceinline__ void unroll(const T& src, D& dst, const Mask& mask, const UnOp& op, int x_shifted, int y)\n            {\n                if (mask(y, x_shifted))\n                    dst.a0 = op(src.a0);\n                if (mask(y, x_shifted + 1))\n                    dst.a1 = op(src.a1);\n                if (mask(y, x_shifted + 2))\n                    dst.a2 = op(src.a2);\n                if (mask(y, x_shifted + 3))\n                    dst.a3 = op(src.a3);\n                if (mask(y, x_shifted + 4))\n                    dst.a4 = op(src.a4);\n                if (mask(y, x_shifted + 5))\n                    dst.a5 = op(src.a5);\n                if (mask(y, x_shifted + 6))\n                    dst.a6 = op(src.a6);\n                if (mask(y, x_shifted + 7))\n                    dst.a7 = op(src.a7);\n            }\n\n            template <typename T1, typename T2, typename D, typename BinOp, typename Mask>\n            static __device__ __forceinline__ void unroll(const T1& src1, const T2& src2, D& dst, const Mask& mask, const BinOp& op, int x_shifted, int y)\n            {\n                if (mask(y, x_shifted))\n                    dst.a0 = op(src1.a0, src2.a0);\n                if (mask(y, x_shifted + 1))\n                    dst.a1 = op(src1.a1, src2.a1);\n                if (mask(y, x_shifted + 2))\n                    dst.a2 = op(src1.a2, src2.a2);\n                if (mask(y, x_shifted + 3))\n                    dst.a3 = op(src1.a3, src2.a3);\n                if (mask(y, x_shifted + 4))\n                    dst.a4 = op(src1.a4, src2.a4);\n                if (mask(y, x_shifted + 5))\n                    dst.a5 = op(src1.a5, src2.a5);\n                if (mask(y, x_shifted + 6))\n                    dst.a6 = op(src1.a6, src2.a6);\n                if (mask(y, x_shifted + 7))\n                    dst.a7 = op(src1.a7, src2.a7);\n            }\n        };\n\n        template <typename T, typename D, typename UnOp, typename Mask>\n        static __global__ void transformSmart(const PtrStepSz<T> src_, PtrStep<D> dst_, const Mask mask, const UnOp op)\n        {\n            typedef TransformFunctorTraits<UnOp> ft;\n            typedef typename UnaryReadWriteTraits<T, D, ft::smart_shift>::read_type read_type;\n            typedef typename UnaryReadWriteTraits<T, D, ft::smart_shift>::write_type write_type;\n\n            const int x = threadIdx.x + blockIdx.x * blockDim.x;\n            const int y = threadIdx.y + blockIdx.y * blockDim.y;\n            const int x_shifted = x * ft::smart_shift;\n\n            if (y < src_.rows)\n            {\n                const T* src = src_.ptr(y);\n                D* dst = dst_.ptr(y);\n\n                if (x_shifted + ft::smart_shift - 1 < src_.cols)\n                {\n                    const read_type src_n_el = ((const read_type*)src)[x];\n                    write_type dst_n_el = ((const write_type*)dst)[x];\n\n                    OpUnroller<ft::smart_shift>::unroll(src_n_el, dst_n_el, mask, op, x_shifted, y);\n\n                    ((write_type*)dst)[x] = dst_n_el;\n                }\n                else\n                {\n                    for (int real_x = x_shifted; real_x < src_.cols; ++real_x)\n                    {\n                        if (mask(y, real_x))\n                            dst[real_x] = op(src[real_x]);\n                    }\n                }\n            }\n        }\n\n        template <typename T, typename D, typename UnOp, typename Mask>\n        __global__ static void transformSimple(const PtrStepSz<T> src, PtrStep<D> dst, const Mask mask, const UnOp op)\n        {\n            const int x = blockDim.x * blockIdx.x + threadIdx.x;\n            const int y = blockDim.y * blockIdx.y + threadIdx.y;\n\n            if (x < src.cols && y < src.rows && mask(y, x))\n            {\n                dst.ptr(y)[x] = op(src.ptr(y)[x]);\n            }\n        }\n\n        template <typename T1, typename T2, typename D, typename BinOp, typename Mask>\n        static __global__ void transformSmart(const PtrStepSz<T1> src1_, const PtrStep<T2> src2_, PtrStep<D> dst_,\n            const Mask mask, const BinOp op)\n        {\n            typedef TransformFunctorTraits<BinOp> ft;\n            typedef typename BinaryReadWriteTraits<T1, T2, D, ft::smart_shift>::read_type1 read_type1;\n            typedef typename BinaryReadWriteTraits<T1, T2, D, ft::smart_shift>::read_type2 read_type2;\n            typedef typename BinaryReadWriteTraits<T1, T2, D, ft::smart_shift>::write_type write_type;\n\n            const int x = threadIdx.x + blockIdx.x * blockDim.x;\n            const int y = threadIdx.y + blockIdx.y * blockDim.y;\n            const int x_shifted = x * ft::smart_shift;\n\n            if (y < src1_.rows)\n            {\n                const T1* src1 = src1_.ptr(y);\n                const T2* src2 = src2_.ptr(y);\n                D* dst = dst_.ptr(y);\n\n                if (x_shifted + ft::smart_shift - 1 < src1_.cols)\n                {\n                    const read_type1 src1_n_el = ((const read_type1*)src1)[x];\n                    const read_type2 src2_n_el = ((const read_type2*)src2)[x];\n                    write_type dst_n_el = ((const write_type*)dst)[x];\n\n                    OpUnroller<ft::smart_shift>::unroll(src1_n_el, src2_n_el, dst_n_el, mask, op, x_shifted, y);\n\n                    ((write_type*)dst)[x] = dst_n_el;\n                }\n                else\n                {\n                    for (int real_x = x_shifted; real_x < src1_.cols; ++real_x)\n                    {\n                        if (mask(y, real_x))\n                            dst[real_x] = op(src1[real_x], src2[real_x]);\n                    }\n                }\n            }\n        }\n\n        template <typename T1, typename T2, typename D, typename BinOp, typename Mask>\n        static __global__ void transformSimple(const PtrStepSz<T1> src1, const PtrStep<T2> src2, PtrStep<D> dst,\n            const Mask mask, const BinOp op)\n        {\n            const int x = blockDim.x * blockIdx.x + threadIdx.x;\n            const int y = blockDim.y * blockIdx.y + threadIdx.y;\n\n            if (x < src1.cols && y < src1.rows && mask(y, x))\n            {\n                const T1 src1_data = src1.ptr(y)[x];\n                const T2 src2_data = src2.ptr(y)[x];\n                dst.ptr(y)[x] = op(src1_data, src2_data);\n            }\n        }\n\n        template <bool UseSmart> struct TransformDispatcher;\n        template<> struct TransformDispatcher<false>\n        {\n            template <typename T, typename D, typename UnOp, typename Mask>\n            static void call(PtrStepSz<T> src, PtrStepSz<D> dst, UnOp op, Mask mask, cudaStream_t stream)\n            {\n                typedef TransformFunctorTraits<UnOp> ft;\n\n                const dim3 threads(ft::simple_block_dim_x, ft::simple_block_dim_y, 1);\n                const dim3 grid(divUp(src.cols, threads.x), divUp(src.rows, threads.y), 1);\n\n                transformSimple<T, D><<<grid, threads, 0, stream>>>(src, dst, mask, op);\n                cudaSafeCall( cudaGetLastError() );\n\n                if (stream == 0)\n                    cudaSafeCall( cudaDeviceSynchronize() );\n            }\n\n            template <typename T1, typename T2, typename D, typename BinOp, typename Mask>\n            static void call(PtrStepSz<T1> src1, PtrStepSz<T2> src2, PtrStepSz<D> dst, BinOp op, Mask mask, cudaStream_t stream)\n            {\n                typedef TransformFunctorTraits<BinOp> ft;\n\n                const dim3 threads(ft::simple_block_dim_x, ft::simple_block_dim_y, 1);\n                const dim3 grid(divUp(src1.cols, threads.x), divUp(src1.rows, threads.y), 1);\n\n                transformSimple<T1, T2, D><<<grid, threads, 0, stream>>>(src1, src2, dst, mask, op);\n                cudaSafeCall( cudaGetLastError() );\n\n                if (stream == 0)\n                    cudaSafeCall( cudaDeviceSynchronize() );\n            }\n        };\n        template<> struct TransformDispatcher<true>\n        {\n            template <typename T, typename D, typename UnOp, typename Mask>\n            static void call(PtrStepSz<T> src, PtrStepSz<D> dst, UnOp op, Mask mask, cudaStream_t stream)\n            {\n                typedef TransformFunctorTraits<UnOp> ft;\n\n                CV_StaticAssert(ft::smart_shift != 1, \"\");\n\n                if (!isAligned(src.data, ft::smart_shift * sizeof(T)) || !isAligned(src.step, ft::smart_shift * sizeof(T)) ||\n                    !isAligned(dst.data, ft::smart_shift * sizeof(D)) || !isAligned(dst.step, ft::smart_shift * sizeof(D)))\n                {\n                    TransformDispatcher<false>::call(src, dst, op, mask, stream);\n                    return;\n                }\n\n                const dim3 threads(ft::smart_block_dim_x, ft::smart_block_dim_y, 1);\n                const dim3 grid(divUp(src.cols, threads.x * ft::smart_shift), divUp(src.rows, threads.y), 1);\n\n                transformSmart<T, D><<<grid, threads, 0, stream>>>(src, dst, mask, op);\n                cudaSafeCall( cudaGetLastError() );\n\n                if (stream == 0)\n                    cudaSafeCall( cudaDeviceSynchronize() );\n            }\n\n            template <typename T1, typename T2, typename D, typename BinOp, typename Mask>\n            static void call(PtrStepSz<T1> src1, PtrStepSz<T2> src2, PtrStepSz<D> dst, BinOp op, Mask mask, cudaStream_t stream)\n            {\n                typedef TransformFunctorTraits<BinOp> ft;\n\n                CV_StaticAssert(ft::smart_shift != 1, \"\");\n\n                if (!isAligned(src1.data, ft::smart_shift * sizeof(T1)) || !isAligned(src1.step, ft::smart_shift * sizeof(T1)) ||\n                    !isAligned(src2.data, ft::smart_shift * sizeof(T2)) || !isAligned(src2.step, ft::smart_shift * sizeof(T2)) ||\n                    !isAligned(dst.data, ft::smart_shift * sizeof(D)) || !isAligned(dst.step, ft::smart_shift * sizeof(D)))\n                {\n                    TransformDispatcher<false>::call(src1, src2, dst, op, mask, stream);\n                    return;\n                }\n\n                const dim3 threads(ft::smart_block_dim_x, ft::smart_block_dim_y, 1);\n                const dim3 grid(divUp(src1.cols, threads.x * ft::smart_shift), divUp(src1.rows, threads.y), 1);\n\n                transformSmart<T1, T2, D><<<grid, threads, 0, stream>>>(src1, src2, dst, mask, op);\n                cudaSafeCall( cudaGetLastError() );\n\n                if (stream == 0)\n                    cudaSafeCall( cudaDeviceSynchronize() );\n            }\n        };\n    } // namespace transform_detail\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_TRANSFORM_DETAIL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/detail/type_traits_detail.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_TYPE_TRAITS_DETAIL_HPP__\n#define __OPENCV_CUDA_TYPE_TRAITS_DETAIL_HPP__\n\n#include \"../common.hpp\"\n#include \"../vec_traits.hpp\"\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    namespace type_traits_detail\n    {\n        template <bool, typename T1, typename T2> struct Select { typedef T1 type; };\n        template <typename T1, typename T2> struct Select<false, T1, T2> { typedef T2 type; };\n\n        template <typename T> struct IsSignedIntergral { enum {value = 0}; };\n        template <> struct IsSignedIntergral<schar> { enum {value = 1}; };\n        template <> struct IsSignedIntergral<char1> { enum {value = 1}; };\n        template <> struct IsSignedIntergral<short> { enum {value = 1}; };\n        template <> struct IsSignedIntergral<short1> { enum {value = 1}; };\n        template <> struct IsSignedIntergral<int> { enum {value = 1}; };\n        template <> struct IsSignedIntergral<int1> { enum {value = 1}; };\n\n        template <typename T> struct IsUnsignedIntegral { enum {value = 0}; };\n        template <> struct IsUnsignedIntegral<uchar> { enum {value = 1}; };\n        template <> struct IsUnsignedIntegral<uchar1> { enum {value = 1}; };\n        template <> struct IsUnsignedIntegral<ushort> { enum {value = 1}; };\n        template <> struct IsUnsignedIntegral<ushort1> { enum {value = 1}; };\n        template <> struct IsUnsignedIntegral<uint> { enum {value = 1}; };\n        template <> struct IsUnsignedIntegral<uint1> { enum {value = 1}; };\n\n        template <typename T> struct IsIntegral { enum {value = IsSignedIntergral<T>::value || IsUnsignedIntegral<T>::value}; };\n        template <> struct IsIntegral<char> { enum {value = 1}; };\n        template <> struct IsIntegral<bool> { enum {value = 1}; };\n\n        template <typename T> struct IsFloat { enum {value = 0}; };\n        template <> struct IsFloat<float> { enum {value = 1}; };\n        template <> struct IsFloat<double> { enum {value = 1}; };\n\n        template <typename T> struct IsVec { enum {value = 0}; };\n        template <> struct IsVec<uchar1> { enum {value = 1}; };\n        template <> struct IsVec<uchar2> { enum {value = 1}; };\n        template <> struct IsVec<uchar3> { enum {value = 1}; };\n        template <> struct IsVec<uchar4> { enum {value = 1}; };\n        template <> struct IsVec<uchar8> { enum {value = 1}; };\n        template <> struct IsVec<char1> { enum {value = 1}; };\n        template <> struct IsVec<char2> { enum {value = 1}; };\n        template <> struct IsVec<char3> { enum {value = 1}; };\n        template <> struct IsVec<char4> { enum {value = 1}; };\n        template <> struct IsVec<char8> { enum {value = 1}; };\n        template <> struct IsVec<ushort1> { enum {value = 1}; };\n        template <> struct IsVec<ushort2> { enum {value = 1}; };\n        template <> struct IsVec<ushort3> { enum {value = 1}; };\n        template <> struct IsVec<ushort4> { enum {value = 1}; };\n        template <> struct IsVec<ushort8> { enum {value = 1}; };\n        template <> struct IsVec<short1> { enum {value = 1}; };\n        template <> struct IsVec<short2> { enum {value = 1}; };\n        template <> struct IsVec<short3> { enum {value = 1}; };\n        template <> struct IsVec<short4> { enum {value = 1}; };\n        template <> struct IsVec<short8> { enum {value = 1}; };\n        template <> struct IsVec<uint1> { enum {value = 1}; };\n        template <> struct IsVec<uint2> { enum {value = 1}; };\n        template <> struct IsVec<uint3> { enum {value = 1}; };\n        template <> struct IsVec<uint4> { enum {value = 1}; };\n        template <> struct IsVec<uint8> { enum {value = 1}; };\n        template <> struct IsVec<int1> { enum {value = 1}; };\n        template <> struct IsVec<int2> { enum {value = 1}; };\n        template <> struct IsVec<int3> { enum {value = 1}; };\n        template <> struct IsVec<int4> { enum {value = 1}; };\n        template <> struct IsVec<int8> { enum {value = 1}; };\n        template <> struct IsVec<float1> { enum {value = 1}; };\n        template <> struct IsVec<float2> { enum {value = 1}; };\n        template <> struct IsVec<float3> { enum {value = 1}; };\n        template <> struct IsVec<float4> { enum {value = 1}; };\n        template <> struct IsVec<float8> { enum {value = 1}; };\n        template <> struct IsVec<double1> { enum {value = 1}; };\n        template <> struct IsVec<double2> { enum {value = 1}; };\n        template <> struct IsVec<double3> { enum {value = 1}; };\n        template <> struct IsVec<double4> { enum {value = 1}; };\n        template <> struct IsVec<double8> { enum {value = 1}; };\n\n        template <class U> struct AddParameterType { typedef const U& type; };\n        template <class U> struct AddParameterType<U&> { typedef U& type; };\n        template <> struct AddParameterType<void> { typedef void type; };\n\n        template <class U> struct ReferenceTraits\n        {\n            enum { value = false };\n            typedef U type;\n        };\n        template <class U> struct ReferenceTraits<U&>\n        {\n            enum { value = true };\n            typedef U type;\n        };\n\n        template <class U> struct PointerTraits\n        {\n            enum { value = false };\n            typedef void type;\n        };\n        template <class U> struct PointerTraits<U*>\n        {\n            enum { value = true };\n            typedef U type;\n        };\n        template <class U> struct PointerTraits<U*&>\n        {\n            enum { value = true };\n            typedef U type;\n        };\n\n        template <class U> struct UnConst\n        {\n            typedef U type;\n            enum { value = 0 };\n        };\n        template <class U> struct UnConst<const U>\n        {\n            typedef U type;\n            enum { value = 1 };\n        };\n        template <class U> struct UnConst<const U&>\n        {\n            typedef U& type;\n            enum { value = 1 };\n        };\n\n        template <class U> struct UnVolatile\n        {\n            typedef U type;\n            enum { value = 0 };\n        };\n        template <class U> struct UnVolatile<volatile U>\n        {\n            typedef U type;\n            enum { value = 1 };\n        };\n        template <class U> struct UnVolatile<volatile U&>\n        {\n            typedef U& type;\n            enum { value = 1 };\n        };\n    } // namespace type_traits_detail\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_TYPE_TRAITS_DETAIL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/detail/vec_distance_detail.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_VEC_DISTANCE_DETAIL_HPP__\n#define __OPENCV_CUDA_VEC_DISTANCE_DETAIL_HPP__\n\n#include \"../datamov_utils.hpp\"\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    namespace vec_distance_detail\n    {\n        template <int THREAD_DIM, int N> struct UnrollVecDiffCached\n        {\n            template <typename Dist, typename T1, typename T2>\n            static __device__ void calcCheck(const T1* vecCached, const T2* vecGlob, int len, Dist& dist, int ind)\n            {\n                if (ind < len)\n                {\n                    T1 val1 = *vecCached++;\n\n                    T2 val2;\n                    ForceGlob<T2>::Load(vecGlob, ind, val2);\n\n                    dist.reduceIter(val1, val2);\n\n                    UnrollVecDiffCached<THREAD_DIM, N - 1>::calcCheck(vecCached, vecGlob, len, dist, ind + THREAD_DIM);\n                }\n            }\n\n            template <typename Dist, typename T1, typename T2>\n            static __device__ void calcWithoutCheck(const T1* vecCached, const T2* vecGlob, Dist& dist)\n            {\n                T1 val1 = *vecCached++;\n\n                T2 val2;\n                ForceGlob<T2>::Load(vecGlob, 0, val2);\n                vecGlob += THREAD_DIM;\n\n                dist.reduceIter(val1, val2);\n\n                UnrollVecDiffCached<THREAD_DIM, N - 1>::calcWithoutCheck(vecCached, vecGlob, dist);\n            }\n        };\n        template <int THREAD_DIM> struct UnrollVecDiffCached<THREAD_DIM, 0>\n        {\n            template <typename Dist, typename T1, typename T2>\n            static __device__ __forceinline__ void calcCheck(const T1*, const T2*, int, Dist&, int)\n            {\n            }\n\n            template <typename Dist, typename T1, typename T2>\n            static __device__ __forceinline__ void calcWithoutCheck(const T1*, const T2*, Dist&)\n            {\n            }\n        };\n\n        template <int THREAD_DIM, int MAX_LEN, bool LEN_EQ_MAX_LEN> struct VecDiffCachedCalculator;\n        template <int THREAD_DIM, int MAX_LEN> struct VecDiffCachedCalculator<THREAD_DIM, MAX_LEN, false>\n        {\n            template <typename Dist, typename T1, typename T2>\n            static __device__ __forceinline__ void calc(const T1* vecCached, const T2* vecGlob, int len, Dist& dist, int tid)\n            {\n                UnrollVecDiffCached<THREAD_DIM, MAX_LEN / THREAD_DIM>::calcCheck(vecCached, vecGlob, len, dist, tid);\n            }\n        };\n        template <int THREAD_DIM, int MAX_LEN> struct VecDiffCachedCalculator<THREAD_DIM, MAX_LEN, true>\n        {\n            template <typename Dist, typename T1, typename T2>\n            static __device__ __forceinline__ void calc(const T1* vecCached, const T2* vecGlob, int len, Dist& dist, int tid)\n            {\n                UnrollVecDiffCached<THREAD_DIM, MAX_LEN / THREAD_DIM>::calcWithoutCheck(vecCached, vecGlob + tid, dist);\n            }\n        };\n    } // namespace vec_distance_detail\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_VEC_DISTANCE_DETAIL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/dynamic_smem.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_DYNAMIC_SMEM_HPP__\n#define __OPENCV_CUDA_DYNAMIC_SMEM_HPP__\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    template<class T> struct DynamicSharedMem\n    {\n        __device__ __forceinline__ operator T*()\n        {\n            extern __shared__ int __smem[];\n            return (T*)__smem;\n        }\n\n        __device__ __forceinline__ operator const T*() const\n        {\n            extern __shared__ int __smem[];\n            return (T*)__smem;\n        }\n    };\n\n    // specialize for double to avoid unaligned memory access compile errors\n    template<> struct DynamicSharedMem<double>\n    {\n        __device__ __forceinline__ operator double*()\n        {\n            extern __shared__ double __smem_d[];\n            return (double*)__smem_d;\n        }\n\n        __device__ __forceinline__ operator const double*() const\n        {\n            extern __shared__ double __smem_d[];\n            return (double*)__smem_d;\n        }\n    };\n}}}\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_DYNAMIC_SMEM_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/emulation.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef OPENCV_CUDA_EMULATION_HPP_\n#define OPENCV_CUDA_EMULATION_HPP_\n\n#include \"common.hpp\"\n#include \"warp_reduce.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    struct Emulation\n    {\n\n        static __device__ __forceinline__ int syncthreadsOr(int pred)\n        {\n#if defined (__CUDA_ARCH__) && (__CUDA_ARCH__ < 200)\n                // just campilation stab\n                return 0;\n#else\n                return __syncthreads_or(pred);\n#endif\n        }\n\n        template<int CTA_SIZE>\n        static __forceinline__ __device__ int Ballot(int predicate)\n        {\n#if defined (__CUDA_ARCH__) && (__CUDA_ARCH__ >= 200)\n            return __ballot(predicate);\n#else\n            __shared__ volatile int cta_buffer[CTA_SIZE];\n\n            int tid = threadIdx.x;\n            cta_buffer[tid] = predicate ? (1 << (tid & 31)) : 0;\n            return warp_reduce(cta_buffer);\n#endif\n        }\n\n        struct smem\n        {\n            enum { TAG_MASK = (1U << ( (sizeof(unsigned int) << 3) - 5U)) - 1U };\n\n            template<typename T>\n            static __device__ __forceinline__ T atomicInc(T* address, T val)\n            {\n#if defined (__CUDA_ARCH__) && (__CUDA_ARCH__ < 120)\n                T count;\n                unsigned int tag = threadIdx.x << ( (sizeof(unsigned int) << 3) - 5U);\n                do\n                {\n                    count = *address & TAG_MASK;\n                    count = tag | (count + 1);\n                    *address = count;\n                } while (*address != count);\n\n                return (count & TAG_MASK) - 1;\n#else\n                return ::atomicInc(address, val);\n#endif\n            }\n\n            template<typename T>\n            static __device__ __forceinline__ T atomicAdd(T* address, T val)\n            {\n#if defined (__CUDA_ARCH__) && (__CUDA_ARCH__ < 120)\n                T count;\n                unsigned int tag = threadIdx.x << ( (sizeof(unsigned int) << 3) - 5U);\n                do\n                {\n                    count = *address & TAG_MASK;\n                    count = tag | (count + val);\n                    *address = count;\n                } while (*address != count);\n\n                return (count & TAG_MASK) - val;\n#else\n                return ::atomicAdd(address, val);\n#endif\n            }\n\n            template<typename T>\n            static __device__ __forceinline__ T atomicMin(T* address, T val)\n            {\n#if defined (__CUDA_ARCH__) && (__CUDA_ARCH__ < 120)\n                T count = ::min(*address, val);\n                do\n                {\n                    *address = count;\n                } while (*address > count);\n\n                return count;\n#else\n                return ::atomicMin(address, val);\n#endif\n            }\n        }; // struct cmem\n\n        struct glob\n        {\n            static __device__ __forceinline__ int atomicAdd(int* address, int val)\n            {\n                return ::atomicAdd(address, val);\n            }\n            static __device__ __forceinline__ unsigned int atomicAdd(unsigned int* address, unsigned int val)\n            {\n                return ::atomicAdd(address, val);\n            }\n            static __device__ __forceinline__ float atomicAdd(float* address, float val)\n            {\n            #if __CUDA_ARCH__ >= 200\n                return ::atomicAdd(address, val);\n            #else\n                int* address_as_i = (int*) address;\n                int old = *address_as_i, assumed;\n                do {\n                    assumed = old;\n                    old = ::atomicCAS(address_as_i, assumed,\n                        __float_as_int(val + __int_as_float(assumed)));\n                } while (assumed != old);\n                return __int_as_float(old);\n            #endif\n            }\n            static __device__ __forceinline__ double atomicAdd(double* address, double val)\n            {\n            #if __CUDA_ARCH__ >= 130\n                unsigned long long int* address_as_ull = (unsigned long long int*) address;\n                unsigned long long int old = *address_as_ull, assumed;\n                do {\n                    assumed = old;\n                    old = ::atomicCAS(address_as_ull, assumed,\n                        __double_as_longlong(val + __longlong_as_double(assumed)));\n                } while (assumed != old);\n                return __longlong_as_double(old);\n            #else\n                (void) address;\n                (void) val;\n                return 0.0;\n            #endif\n            }\n\n            static __device__ __forceinline__ int atomicMin(int* address, int val)\n            {\n                return ::atomicMin(address, val);\n            }\n            static __device__ __forceinline__ float atomicMin(float* address, float val)\n            {\n            #if __CUDA_ARCH__ >= 120\n                int* address_as_i = (int*) address;\n                int old = *address_as_i, assumed;\n                do {\n                    assumed = old;\n                    old = ::atomicCAS(address_as_i, assumed,\n                        __float_as_int(::fminf(val, __int_as_float(assumed))));\n                } while (assumed != old);\n                return __int_as_float(old);\n            #else\n                (void) address;\n                (void) val;\n                return 0.0f;\n            #endif\n            }\n            static __device__ __forceinline__ double atomicMin(double* address, double val)\n            {\n            #if __CUDA_ARCH__ >= 130\n                unsigned long long int* address_as_ull = (unsigned long long int*) address;\n                unsigned long long int old = *address_as_ull, assumed;\n                do {\n                    assumed = old;\n                    old = ::atomicCAS(address_as_ull, assumed,\n                        __double_as_longlong(::fmin(val, __longlong_as_double(assumed))));\n                } while (assumed != old);\n                return __longlong_as_double(old);\n            #else\n                (void) address;\n                (void) val;\n                return 0.0;\n            #endif\n            }\n\n            static __device__ __forceinline__ int atomicMax(int* address, int val)\n            {\n                return ::atomicMax(address, val);\n            }\n            static __device__ __forceinline__ float atomicMax(float* address, float val)\n            {\n            #if __CUDA_ARCH__ >= 120\n                int* address_as_i = (int*) address;\n                int old = *address_as_i, assumed;\n                do {\n                    assumed = old;\n                    old = ::atomicCAS(address_as_i, assumed,\n                        __float_as_int(::fmaxf(val, __int_as_float(assumed))));\n                } while (assumed != old);\n                return __int_as_float(old);\n            #else\n                (void) address;\n                (void) val;\n                return 0.0f;\n            #endif\n            }\n            static __device__ __forceinline__ double atomicMax(double* address, double val)\n            {\n            #if __CUDA_ARCH__ >= 130\n                unsigned long long int* address_as_ull = (unsigned long long int*) address;\n                unsigned long long int old = *address_as_ull, assumed;\n                do {\n                    assumed = old;\n                    old = ::atomicCAS(address_as_ull, assumed,\n                        __double_as_longlong(::fmax(val, __longlong_as_double(assumed))));\n                } while (assumed != old);\n                return __longlong_as_double(old);\n            #else\n                (void) address;\n                (void) val;\n                return 0.0;\n            #endif\n            }\n        };\n    }; //struct Emulation\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif /* OPENCV_CUDA_EMULATION_HPP_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/filters.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_FILTERS_HPP__\n#define __OPENCV_CUDA_FILTERS_HPP__\n\n#include \"saturate_cast.hpp\"\n#include \"vec_traits.hpp\"\n#include \"vec_math.hpp\"\n#include \"type_traits.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    template <typename Ptr2D> struct PointFilter\n    {\n        typedef typename Ptr2D::elem_type elem_type;\n        typedef float index_type;\n\n        explicit __host__ __device__ __forceinline__ PointFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f)\n        : src(src_)\n        {\n            (void)fx;\n            (void)fy;\n        }\n\n        __device__ __forceinline__ elem_type operator ()(float y, float x) const\n        {\n            return src(__float2int_rz(y), __float2int_rz(x));\n        }\n\n        Ptr2D src;\n    };\n\n    template <typename Ptr2D> struct LinearFilter\n    {\n        typedef typename Ptr2D::elem_type elem_type;\n        typedef float index_type;\n\n        explicit __host__ __device__ __forceinline__ LinearFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f)\n        : src(src_)\n        {\n            (void)fx;\n            (void)fy;\n        }\n        __device__ __forceinline__ elem_type operator ()(float y, float x) const\n        {\n            typedef typename TypeVec<float, VecTraits<elem_type>::cn>::vec_type work_type;\n\n            work_type out = VecTraits<work_type>::all(0);\n\n            const int x1 = __float2int_rd(x);\n            const int y1 = __float2int_rd(y);\n            const int x2 = x1 + 1;\n            const int y2 = y1 + 1;\n\n            elem_type src_reg = src(y1, x1);\n            out = out + src_reg * ((x2 - x) * (y2 - y));\n\n            src_reg = src(y1, x2);\n            out = out + src_reg * ((x - x1) * (y2 - y));\n\n            src_reg = src(y2, x1);\n            out = out + src_reg * ((x2 - x) * (y - y1));\n\n            src_reg = src(y2, x2);\n            out = out + src_reg * ((x - x1) * (y - y1));\n\n            return saturate_cast<elem_type>(out);\n        }\n\n        Ptr2D src;\n    };\n\n    template <typename Ptr2D> struct CubicFilter\n    {\n        typedef typename Ptr2D::elem_type elem_type;\n        typedef float index_type;\n        typedef typename TypeVec<float, VecTraits<elem_type>::cn>::vec_type work_type;\n\n        explicit __host__ __device__ __forceinline__ CubicFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f)\n        : src(src_)\n        {\n            (void)fx;\n            (void)fy;\n        }\n\n        static __device__ __forceinline__ float bicubicCoeff(float x_)\n        {\n            float x = fabsf(x_);\n            if (x <= 1.0f)\n            {\n                return x * x * (1.5f * x - 2.5f) + 1.0f;\n            }\n            else if (x < 2.0f)\n            {\n                return x * (x * (-0.5f * x + 2.5f) - 4.0f) + 2.0f;\n            }\n            else\n            {\n                return 0.0f;\n            }\n        }\n\n        __device__ elem_type operator ()(float y, float x) const\n        {\n            const float xmin = ::ceilf(x - 2.0f);\n            const float xmax = ::floorf(x + 2.0f);\n\n            const float ymin = ::ceilf(y - 2.0f);\n            const float ymax = ::floorf(y + 2.0f);\n\n            work_type sum = VecTraits<work_type>::all(0);\n            float wsum = 0.0f;\n\n            for (float cy = ymin; cy <= ymax; cy += 1.0f)\n            {\n                for (float cx = xmin; cx <= xmax; cx += 1.0f)\n                {\n                    const float w = bicubicCoeff(x - cx) * bicubicCoeff(y - cy);\n                    sum = sum + w * src(__float2int_rd(cy), __float2int_rd(cx));\n                    wsum += w;\n                }\n            }\n\n            work_type res = (!wsum)? VecTraits<work_type>::all(0) : sum / wsum;\n\n            return saturate_cast<elem_type>(res);\n        }\n\n        Ptr2D src;\n    };\n    // for integer scaling\n    template <typename Ptr2D> struct IntegerAreaFilter\n    {\n        typedef typename Ptr2D::elem_type elem_type;\n        typedef float index_type;\n\n        explicit __host__ __device__ __forceinline__ IntegerAreaFilter(const Ptr2D& src_, float scale_x_, float scale_y_)\n            : src(src_), scale_x(scale_x_), scale_y(scale_y_), scale(1.f / (scale_x * scale_y)) {}\n\n        __device__ __forceinline__ elem_type operator ()(float y, float x) const\n        {\n            float fsx1 = x * scale_x;\n            float fsx2 = fsx1 + scale_x;\n\n            int sx1 = __float2int_ru(fsx1);\n            int sx2 = __float2int_rd(fsx2);\n\n            float fsy1 = y * scale_y;\n            float fsy2 = fsy1 + scale_y;\n\n            int sy1 = __float2int_ru(fsy1);\n            int sy2 = __float2int_rd(fsy2);\n\n            typedef typename TypeVec<float, VecTraits<elem_type>::cn>::vec_type work_type;\n            work_type out = VecTraits<work_type>::all(0.f);\n\n            for(int dy = sy1; dy < sy2; ++dy)\n                for(int dx = sx1; dx < sx2; ++dx)\n                {\n                    out = out + src(dy, dx) * scale;\n                }\n\n            return saturate_cast<elem_type>(out);\n        }\n\n        Ptr2D src;\n        float scale_x, scale_y ,scale;\n    };\n\n    template <typename Ptr2D> struct AreaFilter\n    {\n        typedef typename Ptr2D::elem_type elem_type;\n        typedef float index_type;\n\n        explicit __host__ __device__ __forceinline__ AreaFilter(const Ptr2D& src_, float scale_x_, float scale_y_)\n            : src(src_), scale_x(scale_x_), scale_y(scale_y_){}\n\n        __device__ __forceinline__ elem_type operator ()(float y, float x) const\n        {\n            float fsx1 = x * scale_x;\n            float fsx2 = fsx1 + scale_x;\n\n            int sx1 = __float2int_ru(fsx1);\n            int sx2 = __float2int_rd(fsx2);\n\n            float fsy1 = y * scale_y;\n            float fsy2 = fsy1 + scale_y;\n\n            int sy1 = __float2int_ru(fsy1);\n            int sy2 = __float2int_rd(fsy2);\n\n            float scale = 1.f / (fminf(scale_x, src.width - fsx1) * fminf(scale_y, src.height - fsy1));\n\n            typedef typename TypeVec<float, VecTraits<elem_type>::cn>::vec_type work_type;\n            work_type out = VecTraits<work_type>::all(0.f);\n\n            for (int dy = sy1; dy < sy2; ++dy)\n            {\n                for (int dx = sx1; dx < sx2; ++dx)\n                    out = out + src(dy, dx) * scale;\n\n                if (sx1 > fsx1)\n                    out = out + src(dy, (sx1 -1) ) * ((sx1 - fsx1) * scale);\n\n                if (sx2 < fsx2)\n                    out = out + src(dy, sx2) * ((fsx2 -sx2) * scale);\n            }\n\n            if (sy1 > fsy1)\n                for (int dx = sx1; dx < sx2; ++dx)\n                    out = out + src( (sy1 - 1) , dx) * ((sy1 -fsy1) * scale);\n\n            if (sy2 < fsy2)\n                for (int dx = sx1; dx < sx2; ++dx)\n                    out = out + src(sy2, dx) * ((fsy2 -sy2) * scale);\n\n            if ((sy1 > fsy1) &&  (sx1 > fsx1))\n                out = out + src( (sy1 - 1) , (sx1 - 1)) * ((sy1 -fsy1) * (sx1 -fsx1) * scale);\n\n            if ((sy1 > fsy1) &&  (sx2 < fsx2))\n                out = out + src( (sy1 - 1) , sx2) * ((sy1 -fsy1) * (fsx2 -sx2) * scale);\n\n            if ((sy2 < fsy2) &&  (sx2 < fsx2))\n                out = out + src(sy2, sx2) * ((fsy2 -sy2) * (fsx2 -sx2) * scale);\n\n            if ((sy2 < fsy2) &&  (sx1 > fsx1))\n                out = out + src(sy2, (sx1 - 1)) * ((fsy2 -sy2) * (sx1 -fsx1) * scale);\n\n            return saturate_cast<elem_type>(out);\n        }\n\n        Ptr2D src;\n        float scale_x, scale_y;\n        int width, haight;\n    };\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_FILTERS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/funcattrib.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_DEVICE_FUNCATTRIB_HPP_\n#define __OPENCV_CUDA_DEVICE_FUNCATTRIB_HPP_\n\n#include <cstdio>\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    template<class Func>\n    void printFuncAttrib(Func& func)\n    {\n\n        cudaFuncAttributes attrs;\n        cudaFuncGetAttributes(&attrs, func);\n\n        printf(\"=== Function stats ===\\n\");\n        printf(\"Name: \\n\");\n        printf(\"sharedSizeBytes    = %d\\n\", attrs.sharedSizeBytes);\n        printf(\"constSizeBytes     = %d\\n\", attrs.constSizeBytes);\n        printf(\"localSizeBytes     = %d\\n\", attrs.localSizeBytes);\n        printf(\"maxThreadsPerBlock = %d\\n\", attrs.maxThreadsPerBlock);\n        printf(\"numRegs            = %d\\n\", attrs.numRegs);\n        printf(\"ptxVersion         = %d\\n\", attrs.ptxVersion);\n        printf(\"binaryVersion      = %d\\n\", attrs.binaryVersion);\n        printf(\"\\n\");\n        fflush(stdout);\n    }\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif  /* __OPENCV_CUDA_DEVICE_FUNCATTRIB_HPP_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/functional.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_FUNCTIONAL_HPP__\n#define __OPENCV_CUDA_FUNCTIONAL_HPP__\n\n#include <functional>\n#include \"saturate_cast.hpp\"\n#include \"vec_traits.hpp\"\n#include \"type_traits.hpp\"\n#include \"device_functions.h\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    // Function Objects\n    template<typename Argument, typename Result> struct unary_function : public std::unary_function<Argument, Result> {};\n    template<typename Argument1, typename Argument2, typename Result> struct binary_function : public std::binary_function<Argument1, Argument2, Result> {};\n\n    // Arithmetic Operations\n    template <typename T> struct plus : binary_function<T, T, T>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType a,\n                                                 typename TypeTraits<T>::ParameterType b) const\n        {\n            return a + b;\n        }\n        __host__ __device__ __forceinline__ plus() {}\n        __host__ __device__ __forceinline__ plus(const plus&) {}\n    };\n\n    template <typename T> struct minus : binary_function<T, T, T>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType a,\n                                                 typename TypeTraits<T>::ParameterType b) const\n        {\n            return a - b;\n        }\n        __host__ __device__ __forceinline__ minus() {}\n        __host__ __device__ __forceinline__ minus(const minus&) {}\n    };\n\n    template <typename T> struct multiplies : binary_function<T, T, T>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType a,\n                                                 typename TypeTraits<T>::ParameterType b) const\n        {\n            return a * b;\n        }\n        __host__ __device__ __forceinline__ multiplies() {}\n        __host__ __device__ __forceinline__ multiplies(const multiplies&) {}\n    };\n\n    template <typename T> struct divides : binary_function<T, T, T>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType a,\n                                                 typename TypeTraits<T>::ParameterType b) const\n        {\n            return a / b;\n        }\n        __host__ __device__ __forceinline__ divides() {}\n        __host__ __device__ __forceinline__ divides(const divides&) {}\n    };\n\n    template <typename T> struct modulus : binary_function<T, T, T>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType a,\n                                                 typename TypeTraits<T>::ParameterType b) const\n        {\n            return a % b;\n        }\n        __host__ __device__ __forceinline__ modulus() {}\n        __host__ __device__ __forceinline__ modulus(const modulus&) {}\n    };\n\n    template <typename T> struct negate : unary_function<T, T>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType a) const\n        {\n            return -a;\n        }\n        __host__ __device__ __forceinline__ negate() {}\n        __host__ __device__ __forceinline__ negate(const negate&) {}\n    };\n\n    // Comparison Operations\n    template <typename T> struct equal_to : binary_function<T, T, bool>\n    {\n        __device__ __forceinline__ bool operator ()(typename TypeTraits<T>::ParameterType a,\n                                                    typename TypeTraits<T>::ParameterType b) const\n        {\n            return a == b;\n        }\n        __host__ __device__ __forceinline__ equal_to() {}\n        __host__ __device__ __forceinline__ equal_to(const equal_to&) {}\n    };\n\n    template <typename T> struct not_equal_to : binary_function<T, T, bool>\n    {\n        __device__ __forceinline__ bool operator ()(typename TypeTraits<T>::ParameterType a,\n                                                    typename TypeTraits<T>::ParameterType b) const\n        {\n            return a != b;\n        }\n        __host__ __device__ __forceinline__ not_equal_to() {}\n        __host__ __device__ __forceinline__ not_equal_to(const not_equal_to&) {}\n    };\n\n    template <typename T> struct greater : binary_function<T, T, bool>\n    {\n        __device__ __forceinline__ bool operator ()(typename TypeTraits<T>::ParameterType a,\n                                                    typename TypeTraits<T>::ParameterType b) const\n        {\n            return a > b;\n        }\n        __host__ __device__ __forceinline__ greater() {}\n        __host__ __device__ __forceinline__ greater(const greater&) {}\n    };\n\n    template <typename T> struct less : binary_function<T, T, bool>\n    {\n        __device__ __forceinline__ bool operator ()(typename TypeTraits<T>::ParameterType a,\n                                                    typename TypeTraits<T>::ParameterType b) const\n        {\n            return a < b;\n        }\n        __host__ __device__ __forceinline__ less() {}\n        __host__ __device__ __forceinline__ less(const less&) {}\n    };\n\n    template <typename T> struct greater_equal : binary_function<T, T, bool>\n    {\n        __device__ __forceinline__ bool operator ()(typename TypeTraits<T>::ParameterType a,\n                                                    typename TypeTraits<T>::ParameterType b) const\n        {\n            return a >= b;\n        }\n        __host__ __device__ __forceinline__ greater_equal() {}\n        __host__ __device__ __forceinline__ greater_equal(const greater_equal&) {}\n    };\n\n    template <typename T> struct less_equal : binary_function<T, T, bool>\n    {\n        __device__ __forceinline__ bool operator ()(typename TypeTraits<T>::ParameterType a,\n                                                    typename TypeTraits<T>::ParameterType b) const\n        {\n            return a <= b;\n        }\n        __host__ __device__ __forceinline__ less_equal() {}\n        __host__ __device__ __forceinline__ less_equal(const less_equal&) {}\n    };\n\n    // Logical Operations\n    template <typename T> struct logical_and : binary_function<T, T, bool>\n    {\n        __device__ __forceinline__ bool operator ()(typename TypeTraits<T>::ParameterType a,\n                                                    typename TypeTraits<T>::ParameterType b) const\n        {\n            return a && b;\n        }\n        __host__ __device__ __forceinline__ logical_and() {}\n        __host__ __device__ __forceinline__ logical_and(const logical_and&) {}\n    };\n\n    template <typename T> struct logical_or : binary_function<T, T, bool>\n    {\n        __device__ __forceinline__ bool operator ()(typename TypeTraits<T>::ParameterType a,\n                                                    typename TypeTraits<T>::ParameterType b) const\n        {\n            return a || b;\n        }\n        __host__ __device__ __forceinline__ logical_or() {}\n        __host__ __device__ __forceinline__ logical_or(const logical_or&) {}\n    };\n\n    template <typename T> struct logical_not : unary_function<T, bool>\n    {\n        __device__ __forceinline__ bool operator ()(typename TypeTraits<T>::ParameterType a) const\n        {\n            return !a;\n        }\n        __host__ __device__ __forceinline__ logical_not() {}\n        __host__ __device__ __forceinline__ logical_not(const logical_not&) {}\n    };\n\n    // Bitwise Operations\n    template <typename T> struct bit_and : binary_function<T, T, T>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType a,\n                                                 typename TypeTraits<T>::ParameterType b) const\n        {\n            return a & b;\n        }\n        __host__ __device__ __forceinline__ bit_and() {}\n        __host__ __device__ __forceinline__ bit_and(const bit_and&) {}\n    };\n\n    template <typename T> struct bit_or : binary_function<T, T, T>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType a,\n                                                 typename TypeTraits<T>::ParameterType b) const\n        {\n            return a | b;\n        }\n        __host__ __device__ __forceinline__ bit_or() {}\n        __host__ __device__ __forceinline__ bit_or(const bit_or&) {}\n    };\n\n    template <typename T> struct bit_xor : binary_function<T, T, T>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType a,\n                                                 typename TypeTraits<T>::ParameterType b) const\n        {\n            return a ^ b;\n        }\n        __host__ __device__ __forceinline__ bit_xor() {}\n        __host__ __device__ __forceinline__ bit_xor(const bit_xor&) {}\n    };\n\n    template <typename T> struct bit_not : unary_function<T, T>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType v) const\n        {\n            return ~v;\n        }\n        __host__ __device__ __forceinline__ bit_not() {}\n        __host__ __device__ __forceinline__ bit_not(const bit_not&) {}\n    };\n\n    // Generalized Identity Operations\n    template <typename T> struct identity : unary_function<T, T>\n    {\n        __device__ __forceinline__ typename TypeTraits<T>::ParameterType operator()(typename TypeTraits<T>::ParameterType x) const\n        {\n            return x;\n        }\n        __host__ __device__ __forceinline__ identity() {}\n        __host__ __device__ __forceinline__ identity(const identity&) {}\n    };\n\n    template <typename T1, typename T2> struct project1st : binary_function<T1, T2, T1>\n    {\n        __device__ __forceinline__ typename TypeTraits<T1>::ParameterType operator()(typename TypeTraits<T1>::ParameterType lhs, typename TypeTraits<T2>::ParameterType rhs) const\n        {\n            return lhs;\n        }\n        __host__ __device__ __forceinline__ project1st() {}\n        __host__ __device__ __forceinline__ project1st(const project1st&) {}\n    };\n\n    template <typename T1, typename T2> struct project2nd : binary_function<T1, T2, T2>\n    {\n        __device__ __forceinline__ typename TypeTraits<T2>::ParameterType operator()(typename TypeTraits<T1>::ParameterType lhs, typename TypeTraits<T2>::ParameterType rhs) const\n        {\n            return rhs;\n        }\n        __host__ __device__ __forceinline__ project2nd() {}\n        __host__ __device__ __forceinline__ project2nd(const project2nd&) {}\n    };\n\n    // Min/Max Operations\n\n#define OPENCV_CUDA_IMPLEMENT_MINMAX(name, type, op) \\\n    template <> struct name<type> : binary_function<type, type, type> \\\n    { \\\n        __device__ __forceinline__ type operator()(type lhs, type rhs) const {return op(lhs, rhs);} \\\n        __host__ __device__ __forceinline__ name() {}\\\n        __host__ __device__ __forceinline__ name(const name&) {}\\\n    };\n\n    template <typename T> struct maximum : binary_function<T, T, T>\n    {\n        __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType lhs, typename TypeTraits<T>::ParameterType rhs) const\n        {\n            return max(lhs, rhs);\n        }\n        __host__ __device__ __forceinline__ maximum() {}\n        __host__ __device__ __forceinline__ maximum(const maximum&) {}\n    };\n\n    OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, uchar, ::max)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, schar, ::max)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, char, ::max)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, ushort, ::max)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, short, ::max)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, int, ::max)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, uint, ::max)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, float, ::fmax)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, double, ::fmax)\n\n    template <typename T> struct minimum : binary_function<T, T, T>\n    {\n        __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType lhs, typename TypeTraits<T>::ParameterType rhs) const\n        {\n            return min(lhs, rhs);\n        }\n        __host__ __device__ __forceinline__ minimum() {}\n        __host__ __device__ __forceinline__ minimum(const minimum&) {}\n    };\n\n    OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, uchar, ::min)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, schar, ::min)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, char, ::min)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, ushort, ::min)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, short, ::min)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, int, ::min)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, uint, ::min)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, float, ::fmin)\n    OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, double, ::fmin)\n\n#undef OPENCV_CUDA_IMPLEMENT_MINMAX\n\n    // Math functions\n\n    template <typename T> struct abs_func : unary_function<T, T>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType x) const\n        {\n            return abs(x);\n        }\n\n        __host__ __device__ __forceinline__ abs_func() {}\n        __host__ __device__ __forceinline__ abs_func(const abs_func&) {}\n    };\n    template <> struct abs_func<unsigned char> : unary_function<unsigned char, unsigned char>\n    {\n        __device__ __forceinline__ unsigned char operator ()(unsigned char x) const\n        {\n            return x;\n        }\n\n        __host__ __device__ __forceinline__ abs_func() {}\n        __host__ __device__ __forceinline__ abs_func(const abs_func&) {}\n    };\n    template <> struct abs_func<signed char> : unary_function<signed char, signed char>\n    {\n        __device__ __forceinline__ signed char operator ()(signed char x) const\n        {\n            return ::abs((int)x);\n        }\n\n        __host__ __device__ __forceinline__ abs_func() {}\n        __host__ __device__ __forceinline__ abs_func(const abs_func&) {}\n    };\n    template <> struct abs_func<char> : unary_function<char, char>\n    {\n        __device__ __forceinline__ char operator ()(char x) const\n        {\n            return ::abs((int)x);\n        }\n\n        __host__ __device__ __forceinline__ abs_func() {}\n        __host__ __device__ __forceinline__ abs_func(const abs_func&) {}\n    };\n    template <> struct abs_func<unsigned short> : unary_function<unsigned short, unsigned short>\n    {\n        __device__ __forceinline__ unsigned short operator ()(unsigned short x) const\n        {\n            return x;\n        }\n\n        __host__ __device__ __forceinline__ abs_func() {}\n        __host__ __device__ __forceinline__ abs_func(const abs_func&) {}\n    };\n    template <> struct abs_func<short> : unary_function<short, short>\n    {\n        __device__ __forceinline__ short operator ()(short x) const\n        {\n            return ::abs((int)x);\n        }\n\n        __host__ __device__ __forceinline__ abs_func() {}\n        __host__ __device__ __forceinline__ abs_func(const abs_func&) {}\n    };\n    template <> struct abs_func<unsigned int> : unary_function<unsigned int, unsigned int>\n    {\n        __device__ __forceinline__ unsigned int operator ()(unsigned int x) const\n        {\n            return x;\n        }\n\n        __host__ __device__ __forceinline__ abs_func() {}\n        __host__ __device__ __forceinline__ abs_func(const abs_func&) {}\n    };\n    template <> struct abs_func<int> : unary_function<int, int>\n    {\n        __device__ __forceinline__ int operator ()(int x) const\n        {\n            return ::abs(x);\n        }\n\n        __host__ __device__ __forceinline__ abs_func() {}\n        __host__ __device__ __forceinline__ abs_func(const abs_func&) {}\n    };\n    template <> struct abs_func<float> : unary_function<float, float>\n    {\n        __device__ __forceinline__ float operator ()(float x) const\n        {\n            return ::fabsf(x);\n        }\n\n        __host__ __device__ __forceinline__ abs_func() {}\n        __host__ __device__ __forceinline__ abs_func(const abs_func&) {}\n    };\n    template <> struct abs_func<double> : unary_function<double, double>\n    {\n        __device__ __forceinline__ double operator ()(double x) const\n        {\n            return ::fabs(x);\n        }\n\n        __host__ __device__ __forceinline__ abs_func() {}\n        __host__ __device__ __forceinline__ abs_func(const abs_func&) {}\n    };\n\n#define OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(name, func) \\\n    template <typename T> struct name ## _func : unary_function<T, float> \\\n    { \\\n        __device__ __forceinline__ float operator ()(typename TypeTraits<T>::ParameterType v) const \\\n        { \\\n            return func ## f(v); \\\n        } \\\n        __host__ __device__ __forceinline__ name ## _func() {} \\\n        __host__ __device__ __forceinline__ name ## _func(const name ## _func&) {} \\\n    }; \\\n    template <> struct name ## _func<double> : unary_function<double, double> \\\n    { \\\n        __device__ __forceinline__ double operator ()(double v) const \\\n        { \\\n            return func(v); \\\n        } \\\n        __host__ __device__ __forceinline__ name ## _func() {} \\\n        __host__ __device__ __forceinline__ name ## _func(const name ## _func&) {} \\\n    };\n\n#define OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR(name, func) \\\n    template <typename T> struct name ## _func : binary_function<T, T, float> \\\n    { \\\n        __device__ __forceinline__ float operator ()(typename TypeTraits<T>::ParameterType v1, typename TypeTraits<T>::ParameterType v2) const \\\n        { \\\n            return func ## f(v1, v2); \\\n        } \\\n        __host__ __device__ __forceinline__ name ## _func() {} \\\n        __host__ __device__ __forceinline__ name ## _func(const name ## _func&) {} \\\n    }; \\\n    template <> struct name ## _func<double> : binary_function<double, double, double> \\\n    { \\\n        __device__ __forceinline__ double operator ()(double v1, double v2) const \\\n        { \\\n            return func(v1, v2); \\\n        } \\\n        __host__ __device__ __forceinline__ name ## _func() {} \\\n        __host__ __device__ __forceinline__ name ## _func(const name ## _func&) {} \\\n    };\n\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(sqrt, ::sqrt)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(exp, ::exp)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(exp2, ::exp2)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(exp10, ::exp10)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(log, ::log)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(log2, ::log2)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(log10, ::log10)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(sin, ::sin)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(cos, ::cos)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(tan, ::tan)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(asin, ::asin)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(acos, ::acos)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(atan, ::atan)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(sinh, ::sinh)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(cosh, ::cosh)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(tanh, ::tanh)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(asinh, ::asinh)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(acosh, ::acosh)\n    OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(atanh, ::atanh)\n\n    OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR(hypot, ::hypot)\n    OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR(atan2, ::atan2)\n    OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR(pow, ::pow)\n\n    #undef OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR\n    #undef OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR_NO_DOUBLE\n    #undef OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR\n\n    template<typename T> struct hypot_sqr_func : binary_function<T, T, float>\n    {\n        __device__ __forceinline__ T operator ()(typename TypeTraits<T>::ParameterType src1, typename TypeTraits<T>::ParameterType src2) const\n        {\n            return src1 * src1 + src2 * src2;\n        }\n        __host__ __device__ __forceinline__ hypot_sqr_func() {}\n        __host__ __device__ __forceinline__ hypot_sqr_func(const hypot_sqr_func&) {}\n    };\n\n    // Saturate Cast Functor\n    template <typename T, typename D> struct saturate_cast_func : unary_function<T, D>\n    {\n        __device__ __forceinline__ D operator ()(typename TypeTraits<T>::ParameterType v) const\n        {\n            return saturate_cast<D>(v);\n        }\n        __host__ __device__ __forceinline__ saturate_cast_func() {}\n        __host__ __device__ __forceinline__ saturate_cast_func(const saturate_cast_func&) {}\n    };\n\n    // Threshold Functors\n    template <typename T> struct thresh_binary_func : unary_function<T, T>\n    {\n        __host__ __device__ __forceinline__ thresh_binary_func(T thresh_, T maxVal_) : thresh(thresh_), maxVal(maxVal_) {}\n\n        __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const\n        {\n            return (src > thresh) * maxVal;\n        }\n\n        __host__ __device__ __forceinline__ thresh_binary_func() {}\n        __host__ __device__ __forceinline__ thresh_binary_func(const thresh_binary_func& other)\n            : thresh(other.thresh), maxVal(other.maxVal) {}\n\n        T thresh;\n        T maxVal;\n    };\n\n    template <typename T> struct thresh_binary_inv_func : unary_function<T, T>\n    {\n        __host__ __device__ __forceinline__ thresh_binary_inv_func(T thresh_, T maxVal_) : thresh(thresh_), maxVal(maxVal_) {}\n\n        __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const\n        {\n            return (src <= thresh) * maxVal;\n        }\n\n        __host__ __device__ __forceinline__ thresh_binary_inv_func() {}\n        __host__ __device__ __forceinline__ thresh_binary_inv_func(const thresh_binary_inv_func& other)\n            : thresh(other.thresh), maxVal(other.maxVal) {}\n\n        T thresh;\n        T maxVal;\n    };\n\n    template <typename T> struct thresh_trunc_func : unary_function<T, T>\n    {\n        explicit __host__ __device__ __forceinline__ thresh_trunc_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;}\n\n        __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const\n        {\n            return minimum<T>()(src, thresh);\n        }\n\n        __host__ __device__ __forceinline__ thresh_trunc_func() {}\n        __host__ __device__ __forceinline__ thresh_trunc_func(const thresh_trunc_func& other)\n            : thresh(other.thresh) {}\n\n        T thresh;\n    };\n\n    template <typename T> struct thresh_to_zero_func : unary_function<T, T>\n    {\n        explicit __host__ __device__ __forceinline__ thresh_to_zero_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;}\n\n        __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const\n        {\n            return (src > thresh) * src;\n        }\n\n        __host__ __device__ __forceinline__ thresh_to_zero_func() {}\n       __host__  __device__ __forceinline__ thresh_to_zero_func(const thresh_to_zero_func& other)\n            : thresh(other.thresh) {}\n\n        T thresh;\n    };\n\n    template <typename T> struct thresh_to_zero_inv_func : unary_function<T, T>\n    {\n        explicit __host__ __device__ __forceinline__ thresh_to_zero_inv_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;}\n\n        __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const\n        {\n            return (src <= thresh) * src;\n        }\n\n        __host__ __device__ __forceinline__ thresh_to_zero_inv_func() {}\n        __host__ __device__ __forceinline__ thresh_to_zero_inv_func(const thresh_to_zero_inv_func& other)\n            : thresh(other.thresh) {}\n\n        T thresh;\n    };\n\n    // Function Object Adaptors\n    template <typename Predicate> struct unary_negate : unary_function<typename Predicate::argument_type, bool>\n    {\n      explicit __host__ __device__ __forceinline__ unary_negate(const Predicate& p) : pred(p) {}\n\n      __device__ __forceinline__ bool operator()(typename TypeTraits<typename Predicate::argument_type>::ParameterType x) const\n      {\n          return !pred(x);\n      }\n\n      __host__ __device__ __forceinline__ unary_negate() {}\n      __host__ __device__ __forceinline__ unary_negate(const unary_negate& other) : pred(other.pred) {}\n\n      Predicate pred;\n    };\n\n    template <typename Predicate> __host__ __device__ __forceinline__ unary_negate<Predicate> not1(const Predicate& pred)\n    {\n        return unary_negate<Predicate>(pred);\n    }\n\n    template <typename Predicate> struct binary_negate : binary_function<typename Predicate::first_argument_type, typename Predicate::second_argument_type, bool>\n    {\n        explicit __host__ __device__ __forceinline__ binary_negate(const Predicate& p) : pred(p) {}\n\n        __device__ __forceinline__ bool operator()(typename TypeTraits<typename Predicate::first_argument_type>::ParameterType x,\n                                                   typename TypeTraits<typename Predicate::second_argument_type>::ParameterType y) const\n        {\n            return !pred(x,y);\n        }\n\n        __host__ __device__ __forceinline__ binary_negate() {}\n        __host__ __device__ __forceinline__ binary_negate(const binary_negate& other) : pred(other.pred) {}\n\n        Predicate pred;\n    };\n\n    template <typename BinaryPredicate> __host__ __device__ __forceinline__ binary_negate<BinaryPredicate> not2(const BinaryPredicate& pred)\n    {\n        return binary_negate<BinaryPredicate>(pred);\n    }\n\n    template <typename Op> struct binder1st : unary_function<typename Op::second_argument_type, typename Op::result_type>\n    {\n        __host__ __device__ __forceinline__ binder1st(const Op& op_, const typename Op::first_argument_type& arg1_) : op(op_), arg1(arg1_) {}\n\n        __device__ __forceinline__ typename Op::result_type operator ()(typename TypeTraits<typename Op::second_argument_type>::ParameterType a) const\n        {\n            return op(arg1, a);\n        }\n\n        __host__ __device__ __forceinline__ binder1st() {}\n        __host__ __device__ __forceinline__ binder1st(const binder1st& other) : op(other.op), arg1(other.arg1) {}\n\n        Op op;\n        typename Op::first_argument_type arg1;\n    };\n\n    template <typename Op, typename T> __host__ __device__ __forceinline__ binder1st<Op> bind1st(const Op& op, const T& x)\n    {\n        return binder1st<Op>(op, typename Op::first_argument_type(x));\n    }\n\n    template <typename Op> struct binder2nd : unary_function<typename Op::first_argument_type, typename Op::result_type>\n    {\n        __host__ __device__ __forceinline__ binder2nd(const Op& op_, const typename Op::second_argument_type& arg2_) : op(op_), arg2(arg2_) {}\n\n        __forceinline__ __device__ typename Op::result_type operator ()(typename TypeTraits<typename Op::first_argument_type>::ParameterType a) const\n        {\n            return op(a, arg2);\n        }\n\n        __host__ __device__ __forceinline__ binder2nd() {}\n        __host__ __device__ __forceinline__ binder2nd(const binder2nd& other) : op(other.op), arg2(other.arg2) {}\n\n        Op op;\n        typename Op::second_argument_type arg2;\n    };\n\n    template <typename Op, typename T> __host__ __device__ __forceinline__ binder2nd<Op> bind2nd(const Op& op, const T& x)\n    {\n        return binder2nd<Op>(op, typename Op::second_argument_type(x));\n    }\n\n    // Functor Traits\n    template <typename F> struct IsUnaryFunction\n    {\n        typedef char Yes;\n        struct No {Yes a[2];};\n\n        template <typename T, typename D> static Yes check(unary_function<T, D>);\n        static No check(...);\n\n        static F makeF();\n\n        enum { value = (sizeof(check(makeF())) == sizeof(Yes)) };\n    };\n\n    template <typename F> struct IsBinaryFunction\n    {\n        typedef char Yes;\n        struct No {Yes a[2];};\n\n        template <typename T1, typename T2, typename D> static Yes check(binary_function<T1, T2, D>);\n        static No check(...);\n\n        static F makeF();\n\n        enum { value = (sizeof(check(makeF())) == sizeof(Yes)) };\n    };\n\n    namespace functional_detail\n    {\n        template <size_t src_elem_size, size_t dst_elem_size> struct UnOpShift { enum { shift = 1 }; };\n        template <size_t src_elem_size> struct UnOpShift<src_elem_size, 1> { enum { shift = 4 }; };\n        template <size_t src_elem_size> struct UnOpShift<src_elem_size, 2> { enum { shift = 2 }; };\n\n        template <typename T, typename D> struct DefaultUnaryShift\n        {\n            enum { shift = UnOpShift<sizeof(T), sizeof(D)>::shift };\n        };\n\n        template <size_t src_elem_size1, size_t src_elem_size2, size_t dst_elem_size> struct BinOpShift { enum { shift = 1 }; };\n        template <size_t src_elem_size1, size_t src_elem_size2> struct BinOpShift<src_elem_size1, src_elem_size2, 1> { enum { shift = 4 }; };\n        template <size_t src_elem_size1, size_t src_elem_size2> struct BinOpShift<src_elem_size1, src_elem_size2, 2> { enum { shift = 2 }; };\n\n        template <typename T1, typename T2, typename D> struct DefaultBinaryShift\n        {\n            enum { shift = BinOpShift<sizeof(T1), sizeof(T2), sizeof(D)>::shift };\n        };\n\n        template <typename Func, bool unary = IsUnaryFunction<Func>::value> struct ShiftDispatcher;\n        template <typename Func> struct ShiftDispatcher<Func, true>\n        {\n            enum { shift = DefaultUnaryShift<typename Func::argument_type, typename Func::result_type>::shift };\n        };\n        template <typename Func> struct ShiftDispatcher<Func, false>\n        {\n            enum { shift = DefaultBinaryShift<typename Func::first_argument_type, typename Func::second_argument_type, typename Func::result_type>::shift };\n        };\n    }\n\n    template <typename Func> struct DefaultTransformShift\n    {\n        enum { shift = functional_detail::ShiftDispatcher<Func>::shift };\n    };\n\n    template <typename Func> struct DefaultTransformFunctorTraits\n    {\n        enum { simple_block_dim_x = 16 };\n        enum { simple_block_dim_y = 16 };\n\n        enum { smart_block_dim_x = 16 };\n        enum { smart_block_dim_y = 16 };\n        enum { smart_shift = DefaultTransformShift<Func>::shift };\n    };\n\n    template <typename Func> struct TransformFunctorTraits : DefaultTransformFunctorTraits<Func> {};\n\n#define OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(type) \\\n    template <> struct TransformFunctorTraits< type > : DefaultTransformFunctorTraits< type >\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_FUNCTIONAL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/limits.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_LIMITS_HPP__\n#define __OPENCV_CUDA_LIMITS_HPP__\n\n#include <limits.h>\n#include <float.h>\n#include \"common.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\ntemplate <class T> struct numeric_limits;\n\ntemplate <> struct numeric_limits<bool>\n{\n    __device__ __forceinline__ static bool min() { return false; }\n    __device__ __forceinline__ static bool max() { return true;  }\n    static const bool is_signed = false;\n};\n\ntemplate <> struct numeric_limits<signed char>\n{\n    __device__ __forceinline__ static signed char min() { return SCHAR_MIN; }\n    __device__ __forceinline__ static signed char max() { return SCHAR_MAX; }\n    static const bool is_signed = true;\n};\n\ntemplate <> struct numeric_limits<unsigned char>\n{\n    __device__ __forceinline__ static unsigned char min() { return 0; }\n    __device__ __forceinline__ static unsigned char max() { return UCHAR_MAX; }\n    static const bool is_signed = false;\n};\n\ntemplate <> struct numeric_limits<short>\n{\n    __device__ __forceinline__ static short min() { return SHRT_MIN; }\n    __device__ __forceinline__ static short max() { return SHRT_MAX; }\n    static const bool is_signed = true;\n};\n\ntemplate <> struct numeric_limits<unsigned short>\n{\n    __device__ __forceinline__ static unsigned short min() { return 0; }\n    __device__ __forceinline__ static unsigned short max() { return USHRT_MAX; }\n    static const bool is_signed = false;\n};\n\ntemplate <> struct numeric_limits<int>\n{\n    __device__ __forceinline__ static int min() { return INT_MIN; }\n    __device__ __forceinline__ static int max() { return INT_MAX; }\n    static const bool is_signed = true;\n};\n\ntemplate <> struct numeric_limits<unsigned int>\n{\n    __device__ __forceinline__ static unsigned int min() { return 0; }\n    __device__ __forceinline__ static unsigned int max() { return UINT_MAX; }\n    static const bool is_signed = false;\n};\n\ntemplate <> struct numeric_limits<float>\n{\n    __device__ __forceinline__ static float min() { return FLT_MIN; }\n    __device__ __forceinline__ static float max() { return FLT_MAX; }\n    __device__ __forceinline__ static float epsilon() { return FLT_EPSILON; }\n    static const bool is_signed = true;\n};\n\ntemplate <> struct numeric_limits<double>\n{\n    __device__ __forceinline__ static double min() { return DBL_MIN; }\n    __device__ __forceinline__ static double max() { return DBL_MAX; }\n    __device__ __forceinline__ static double epsilon() { return DBL_EPSILON; }\n    static const bool is_signed = true;\n};\n}}} // namespace cv { namespace cuda { namespace cudev {\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_LIMITS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/reduce.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_REDUCE_HPP__\n#define __OPENCV_CUDA_REDUCE_HPP__\n\n#include <thrust/tuple.h>\n#include \"detail/reduce.hpp\"\n#include \"detail/reduce_key_val.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    template <int N, typename T, class Op>\n    __device__ __forceinline__ void reduce(volatile T* smem, T& val, unsigned int tid, const Op& op)\n    {\n        reduce_detail::Dispatcher<N>::reductor::template reduce<volatile T*, T&, const Op&>(smem, val, tid, op);\n    }\n    template <int N,\n              typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9,\n              typename R0, typename R1, typename R2, typename R3, typename R4, typename R5, typename R6, typename R7, typename R8, typename R9,\n              class Op0, class Op1, class Op2, class Op3, class Op4, class Op5, class Op6, class Op7, class Op8, class Op9>\n    __device__ __forceinline__ void reduce(const thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,\n                                           const thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9>& val,\n                                           unsigned int tid,\n                                           const thrust::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9>& op)\n    {\n        reduce_detail::Dispatcher<N>::reductor::template reduce<\n                const thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>&,\n                const thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9>&,\n                const thrust::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9>&>(smem, val, tid, op);\n    }\n\n    template <unsigned int N, typename K, typename V, class Cmp>\n    __device__ __forceinline__ void reduceKeyVal(volatile K* skeys, K& key, volatile V* svals, V& val, unsigned int tid, const Cmp& cmp)\n    {\n        reduce_key_val_detail::Dispatcher<N>::reductor::template reduce<volatile K*, K&, volatile V*, V&, const Cmp&>(skeys, key, svals, val, tid, cmp);\n    }\n    template <unsigned int N,\n              typename K,\n              typename VP0, typename VP1, typename VP2, typename VP3, typename VP4, typename VP5, typename VP6, typename VP7, typename VP8, typename VP9,\n              typename VR0, typename VR1, typename VR2, typename VR3, typename VR4, typename VR5, typename VR6, typename VR7, typename VR8, typename VR9,\n              class Cmp>\n    __device__ __forceinline__ void reduceKeyVal(volatile K* skeys, K& key,\n                                                 const thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9>& svals,\n                                                 const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>& val,\n                                                 unsigned int tid, const Cmp& cmp)\n    {\n        reduce_key_val_detail::Dispatcher<N>::reductor::template reduce<volatile K*, K&,\n                const thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9>&,\n                const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>&,\n                const Cmp&>(skeys, key, svals, val, tid, cmp);\n    }\n    template <unsigned int N,\n              typename KP0, typename KP1, typename KP2, typename KP3, typename KP4, typename KP5, typename KP6, typename KP7, typename KP8, typename KP9,\n              typename KR0, typename KR1, typename KR2, typename KR3, typename KR4, typename KR5, typename KR6, typename KR7, typename KR8, typename KR9,\n              typename VP0, typename VP1, typename VP2, typename VP3, typename VP4, typename VP5, typename VP6, typename VP7, typename VP8, typename VP9,\n              typename VR0, typename VR1, typename VR2, typename VR3, typename VR4, typename VR5, typename VR6, typename VR7, typename VR8, typename VR9,\n              class Cmp0, class Cmp1, class Cmp2, class Cmp3, class Cmp4, class Cmp5, class Cmp6, class Cmp7, class Cmp8, class Cmp9>\n    __device__ __forceinline__ void reduceKeyVal(const thrust::tuple<KP0, KP1, KP2, KP3, KP4, KP5, KP6, KP7, KP8, KP9>& skeys,\n                                                 const thrust::tuple<KR0, KR1, KR2, KR3, KR4, KR5, KR6, KR7, KR8, KR9>& key,\n                                                 const thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9>& svals,\n                                                 const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>& val,\n                                                 unsigned int tid,\n                                                 const thrust::tuple<Cmp0, Cmp1, Cmp2, Cmp3, Cmp4, Cmp5, Cmp6, Cmp7, Cmp8, Cmp9>& cmp)\n    {\n        reduce_key_val_detail::Dispatcher<N>::reductor::template reduce<\n                const thrust::tuple<KP0, KP1, KP2, KP3, KP4, KP5, KP6, KP7, KP8, KP9>&,\n                const thrust::tuple<KR0, KR1, KR2, KR3, KR4, KR5, KR6, KR7, KR8, KR9>&,\n                const thrust::tuple<VP0, VP1, VP2, VP3, VP4, VP5, VP6, VP7, VP8, VP9>&,\n                const thrust::tuple<VR0, VR1, VR2, VR3, VR4, VR5, VR6, VR7, VR8, VR9>&,\n                const thrust::tuple<Cmp0, Cmp1, Cmp2, Cmp3, Cmp4, Cmp5, Cmp6, Cmp7, Cmp8, Cmp9>&\n                >(skeys, key, svals, val, tid, cmp);\n    }\n\n    // smem_tuple\n\n    template <typename T0>\n    __device__ __forceinline__\n    thrust::tuple<volatile T0*>\n    smem_tuple(T0* t0)\n    {\n        return thrust::make_tuple((volatile T0*) t0);\n    }\n\n    template <typename T0, typename T1>\n    __device__ __forceinline__\n    thrust::tuple<volatile T0*, volatile T1*>\n    smem_tuple(T0* t0, T1* t1)\n    {\n        return thrust::make_tuple((volatile T0*) t0, (volatile T1*) t1);\n    }\n\n    template <typename T0, typename T1, typename T2>\n    __device__ __forceinline__\n    thrust::tuple<volatile T0*, volatile T1*, volatile T2*>\n    smem_tuple(T0* t0, T1* t1, T2* t2)\n    {\n        return thrust::make_tuple((volatile T0*) t0, (volatile T1*) t1, (volatile T2*) t2);\n    }\n\n    template <typename T0, typename T1, typename T2, typename T3>\n    __device__ __forceinline__\n    thrust::tuple<volatile T0*, volatile T1*, volatile T2*, volatile T3*>\n    smem_tuple(T0* t0, T1* t1, T2* t2, T3* t3)\n    {\n        return thrust::make_tuple((volatile T0*) t0, (volatile T1*) t1, (volatile T2*) t2, (volatile T3*) t3);\n    }\n\n    template <typename T0, typename T1, typename T2, typename T3, typename T4>\n    __device__ __forceinline__\n    thrust::tuple<volatile T0*, volatile T1*, volatile T2*, volatile T3*, volatile T4*>\n    smem_tuple(T0* t0, T1* t1, T2* t2, T3* t3, T4* t4)\n    {\n        return thrust::make_tuple((volatile T0*) t0, (volatile T1*) t1, (volatile T2*) t2, (volatile T3*) t3, (volatile T4*) t4);\n    }\n\n    template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>\n    __device__ __forceinline__\n    thrust::tuple<volatile T0*, volatile T1*, volatile T2*, volatile T3*, volatile T4*, volatile T5*>\n    smem_tuple(T0* t0, T1* t1, T2* t2, T3* t3, T4* t4, T5* t5)\n    {\n        return thrust::make_tuple((volatile T0*) t0, (volatile T1*) t1, (volatile T2*) t2, (volatile T3*) t3, (volatile T4*) t4, (volatile T5*) t5);\n    }\n\n    template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>\n    __device__ __forceinline__\n    thrust::tuple<volatile T0*, volatile T1*, volatile T2*, volatile T3*, volatile T4*, volatile T5*, volatile T6*>\n    smem_tuple(T0* t0, T1* t1, T2* t2, T3* t3, T4* t4, T5* t5, T6* t6)\n    {\n        return thrust::make_tuple((volatile T0*) t0, (volatile T1*) t1, (volatile T2*) t2, (volatile T3*) t3, (volatile T4*) t4, (volatile T5*) t5, (volatile T6*) t6);\n    }\n\n    template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>\n    __device__ __forceinline__\n    thrust::tuple<volatile T0*, volatile T1*, volatile T2*, volatile T3*, volatile T4*, volatile T5*, volatile T6*, volatile T7*>\n    smem_tuple(T0* t0, T1* t1, T2* t2, T3* t3, T4* t4, T5* t5, T6* t6, T7* t7)\n    {\n        return thrust::make_tuple((volatile T0*) t0, (volatile T1*) t1, (volatile T2*) t2, (volatile T3*) t3, (volatile T4*) t4, (volatile T5*) t5, (volatile T6*) t6, (volatile T7*) t7);\n    }\n\n    template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>\n    __device__ __forceinline__\n    thrust::tuple<volatile T0*, volatile T1*, volatile T2*, volatile T3*, volatile T4*, volatile T5*, volatile T6*, volatile T7*, volatile T8*>\n    smem_tuple(T0* t0, T1* t1, T2* t2, T3* t3, T4* t4, T5* t5, T6* t6, T7* t7, T8* t8)\n    {\n        return thrust::make_tuple((volatile T0*) t0, (volatile T1*) t1, (volatile T2*) t2, (volatile T3*) t3, (volatile T4*) t4, (volatile T5*) t5, (volatile T6*) t6, (volatile T7*) t7, (volatile T8*) t8);\n    }\n\n    template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>\n    __device__ __forceinline__\n    thrust::tuple<volatile T0*, volatile T1*, volatile T2*, volatile T3*, volatile T4*, volatile T5*, volatile T6*, volatile T7*, volatile T8*, volatile T9*>\n    smem_tuple(T0* t0, T1* t1, T2* t2, T3* t3, T4* t4, T5* t5, T6* t6, T7* t7, T8* t8, T9* t9)\n    {\n        return thrust::make_tuple((volatile T0*) t0, (volatile T1*) t1, (volatile T2*) t2, (volatile T3*) t3, (volatile T4*) t4, (volatile T5*) t5, (volatile T6*) t6, (volatile T7*) t7, (volatile T8*) t8, (volatile T9*) t9);\n    }\n}}}\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_UTILITY_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/saturate_cast.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_SATURATE_CAST_HPP__\n#define __OPENCV_CUDA_SATURATE_CAST_HPP__\n\n#include \"common.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    template<typename _Tp> __device__ __forceinline__ _Tp saturate_cast(uchar v) { return _Tp(v); }\n    template<typename _Tp> __device__ __forceinline__ _Tp saturate_cast(schar v) { return _Tp(v); }\n    template<typename _Tp> __device__ __forceinline__ _Tp saturate_cast(ushort v) { return _Tp(v); }\n    template<typename _Tp> __device__ __forceinline__ _Tp saturate_cast(short v) { return _Tp(v); }\n    template<typename _Tp> __device__ __forceinline__ _Tp saturate_cast(uint v) { return _Tp(v); }\n    template<typename _Tp> __device__ __forceinline__ _Tp saturate_cast(int v) { return _Tp(v); }\n    template<typename _Tp> __device__ __forceinline__ _Tp saturate_cast(float v) { return _Tp(v); }\n    template<typename _Tp> __device__ __forceinline__ _Tp saturate_cast(double v) { return _Tp(v); }\n\n    template<> __device__ __forceinline__ uchar saturate_cast<uchar>(schar v)\n    {\n        uint res = 0;\n        int vi = v;\n        asm(\"cvt.sat.u8.s8 %0, %1;\" : \"=r\"(res) : \"r\"(vi));\n        return res;\n    }\n    template<> __device__ __forceinline__ uchar saturate_cast<uchar>(short v)\n    {\n        uint res = 0;\n        asm(\"cvt.sat.u8.s16 %0, %1;\" : \"=r\"(res) : \"h\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ uchar saturate_cast<uchar>(ushort v)\n    {\n        uint res = 0;\n        asm(\"cvt.sat.u8.u16 %0, %1;\" : \"=r\"(res) : \"h\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ uchar saturate_cast<uchar>(int v)\n    {\n        uint res = 0;\n        asm(\"cvt.sat.u8.s32 %0, %1;\" : \"=r\"(res) : \"r\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ uchar saturate_cast<uchar>(uint v)\n    {\n        uint res = 0;\n        asm(\"cvt.sat.u8.u32 %0, %1;\" : \"=r\"(res) : \"r\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ uchar saturate_cast<uchar>(float v)\n    {\n        uint res = 0;\n        asm(\"cvt.rni.sat.u8.f32 %0, %1;\" : \"=r\"(res) : \"f\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ uchar saturate_cast<uchar>(double v)\n    {\n    #if __CUDA_ARCH__ >= 130\n        uint res = 0;\n        asm(\"cvt.rni.sat.u8.f64 %0, %1;\" : \"=r\"(res) : \"d\"(v));\n        return res;\n    #else\n        return saturate_cast<uchar>((float)v);\n    #endif\n    }\n\n    template<> __device__ __forceinline__ schar saturate_cast<schar>(uchar v)\n    {\n        uint res = 0;\n        uint vi = v;\n        asm(\"cvt.sat.s8.u8 %0, %1;\" : \"=r\"(res) : \"r\"(vi));\n        return res;\n    }\n    template<> __device__ __forceinline__ schar saturate_cast<schar>(short v)\n    {\n        uint res = 0;\n        asm(\"cvt.sat.s8.s16 %0, %1;\" : \"=r\"(res) : \"h\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ schar saturate_cast<schar>(ushort v)\n    {\n        uint res = 0;\n        asm(\"cvt.sat.s8.u16 %0, %1;\" : \"=r\"(res) : \"h\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ schar saturate_cast<schar>(int v)\n    {\n        uint res = 0;\n        asm(\"cvt.sat.s8.s32 %0, %1;\" : \"=r\"(res) : \"r\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ schar saturate_cast<schar>(uint v)\n    {\n        uint res = 0;\n        asm(\"cvt.sat.s8.u32 %0, %1;\" : \"=r\"(res) : \"r\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ schar saturate_cast<schar>(float v)\n    {\n        uint res = 0;\n        asm(\"cvt.rni.sat.s8.f32 %0, %1;\" : \"=r\"(res) : \"f\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ schar saturate_cast<schar>(double v)\n    {\n    #if __CUDA_ARCH__ >= 130\n        uint res = 0;\n        asm(\"cvt.rni.sat.s8.f64 %0, %1;\" : \"=r\"(res) : \"d\"(v));\n        return res;\n    #else\n        return saturate_cast<schar>((float)v);\n    #endif\n    }\n\n    template<> __device__ __forceinline__ ushort saturate_cast<ushort>(schar v)\n    {\n        ushort res = 0;\n        int vi = v;\n        asm(\"cvt.sat.u16.s8 %0, %1;\" : \"=h\"(res) : \"r\"(vi));\n        return res;\n    }\n    template<> __device__ __forceinline__ ushort saturate_cast<ushort>(short v)\n    {\n        ushort res = 0;\n        asm(\"cvt.sat.u16.s16 %0, %1;\" : \"=h\"(res) : \"h\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ ushort saturate_cast<ushort>(int v)\n    {\n        ushort res = 0;\n        asm(\"cvt.sat.u16.s32 %0, %1;\" : \"=h\"(res) : \"r\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ ushort saturate_cast<ushort>(uint v)\n    {\n        ushort res = 0;\n        asm(\"cvt.sat.u16.u32 %0, %1;\" : \"=h\"(res) : \"r\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ ushort saturate_cast<ushort>(float v)\n    {\n        ushort res = 0;\n        asm(\"cvt.rni.sat.u16.f32 %0, %1;\" : \"=h\"(res) : \"f\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ ushort saturate_cast<ushort>(double v)\n    {\n    #if __CUDA_ARCH__ >= 130\n        ushort res = 0;\n        asm(\"cvt.rni.sat.u16.f64 %0, %1;\" : \"=h\"(res) : \"d\"(v));\n        return res;\n    #else\n        return saturate_cast<ushort>((float)v);\n    #endif\n    }\n\n    template<> __device__ __forceinline__ short saturate_cast<short>(ushort v)\n    {\n        short res = 0;\n        asm(\"cvt.sat.s16.u16 %0, %1;\" : \"=h\"(res) : \"h\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ short saturate_cast<short>(int v)\n    {\n        short res = 0;\n        asm(\"cvt.sat.s16.s32 %0, %1;\" : \"=h\"(res) : \"r\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ short saturate_cast<short>(uint v)\n    {\n        short res = 0;\n        asm(\"cvt.sat.s16.u32 %0, %1;\" : \"=h\"(res) : \"r\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ short saturate_cast<short>(float v)\n    {\n        short res = 0;\n        asm(\"cvt.rni.sat.s16.f32 %0, %1;\" : \"=h\"(res) : \"f\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ short saturate_cast<short>(double v)\n    {\n    #if __CUDA_ARCH__ >= 130\n        short res = 0;\n        asm(\"cvt.rni.sat.s16.f64 %0, %1;\" : \"=h\"(res) : \"d\"(v));\n        return res;\n    #else\n        return saturate_cast<short>((float)v);\n    #endif\n    }\n\n    template<> __device__ __forceinline__ int saturate_cast<int>(uint v)\n    {\n        int res = 0;\n        asm(\"cvt.sat.s32.u32 %0, %1;\" : \"=r\"(res) : \"r\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ int saturate_cast<int>(float v)\n    {\n        return __float2int_rn(v);\n    }\n    template<> __device__ __forceinline__ int saturate_cast<int>(double v)\n    {\n    #if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 130\n        return __double2int_rn(v);\n    #else\n        return saturate_cast<int>((float)v);\n    #endif\n    }\n\n    template<> __device__ __forceinline__ uint saturate_cast<uint>(schar v)\n    {\n        uint res = 0;\n        int vi = v;\n        asm(\"cvt.sat.u32.s8 %0, %1;\" : \"=r\"(res) : \"r\"(vi));\n        return res;\n    }\n    template<> __device__ __forceinline__ uint saturate_cast<uint>(short v)\n    {\n        uint res = 0;\n        asm(\"cvt.sat.u32.s16 %0, %1;\" : \"=r\"(res) : \"h\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ uint saturate_cast<uint>(int v)\n    {\n        uint res = 0;\n        asm(\"cvt.sat.u32.s32 %0, %1;\" : \"=r\"(res) : \"r\"(v));\n        return res;\n    }\n    template<> __device__ __forceinline__ uint saturate_cast<uint>(float v)\n    {\n        return __float2uint_rn(v);\n    }\n    template<> __device__ __forceinline__ uint saturate_cast<uint>(double v)\n    {\n    #if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 130\n        return __double2uint_rn(v);\n    #else\n        return saturate_cast<uint>((float)v);\n    #endif\n    }\n}}}\n\n//! @endcond\n\n#endif /* __OPENCV_CUDA_SATURATE_CAST_HPP__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/scan.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_SCAN_HPP__\n#define __OPENCV_CUDA_SCAN_HPP__\n\n#include \"opencv2/core/cuda/common.hpp\"\n#include \"opencv2/core/cuda/utility.hpp\"\n#include \"opencv2/core/cuda/warp.hpp\"\n#include \"opencv2/core/cuda/warp_shuffle.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    enum ScanKind { EXCLUSIVE = 0,  INCLUSIVE = 1 };\n\n    template <ScanKind Kind, typename T, typename F> struct WarpScan\n    {\n        __device__ __forceinline__ WarpScan() {}\n        __device__ __forceinline__ WarpScan(const WarpScan& other) { (void)other; }\n\n        __device__ __forceinline__ T operator()( volatile T *ptr , const unsigned int idx)\n        {\n            const unsigned int lane = idx & 31;\n            F op;\n\n            if ( lane >=  1) ptr [idx ] = op(ptr [idx -  1], ptr [idx]);\n            if ( lane >=  2) ptr [idx ] = op(ptr [idx -  2], ptr [idx]);\n            if ( lane >=  4) ptr [idx ] = op(ptr [idx -  4], ptr [idx]);\n            if ( lane >=  8) ptr [idx ] = op(ptr [idx -  8], ptr [idx]);\n            if ( lane >= 16) ptr [idx ] = op(ptr [idx - 16], ptr [idx]);\n\n            if( Kind == INCLUSIVE )\n                return ptr [idx];\n            else\n                return (lane > 0) ? ptr [idx - 1] : 0;\n        }\n\n        __device__ __forceinline__ unsigned int index(const unsigned int tid)\n        {\n            return tid;\n        }\n\n        __device__ __forceinline__ void init(volatile T *ptr){}\n\n        static const int warp_offset      = 0;\n\n        typedef WarpScan<INCLUSIVE, T, F>  merge;\n    };\n\n    template <ScanKind Kind , typename T, typename F> struct WarpScanNoComp\n    {\n        __device__ __forceinline__ WarpScanNoComp() {}\n        __device__ __forceinline__ WarpScanNoComp(const WarpScanNoComp& other) { (void)other; }\n\n        __device__ __forceinline__ T operator()( volatile T *ptr , const unsigned int idx)\n        {\n            const unsigned int lane = threadIdx.x & 31;\n            F op;\n\n            ptr [idx ] = op(ptr [idx -  1], ptr [idx]);\n            ptr [idx ] = op(ptr [idx -  2], ptr [idx]);\n            ptr [idx ] = op(ptr [idx -  4], ptr [idx]);\n            ptr [idx ] = op(ptr [idx -  8], ptr [idx]);\n            ptr [idx ] = op(ptr [idx - 16], ptr [idx]);\n\n            if( Kind == INCLUSIVE )\n                return ptr [idx];\n            else\n                return (lane > 0) ? ptr [idx - 1] : 0;\n        }\n\n        __device__ __forceinline__ unsigned int index(const unsigned int tid)\n        {\n            return (tid >> warp_log) * warp_smem_stride + 16 + (tid & warp_mask);\n        }\n\n        __device__ __forceinline__ void init(volatile T *ptr)\n        {\n            ptr[threadIdx.x] = 0;\n        }\n\n        static const int warp_smem_stride = 32 + 16 + 1;\n        static const int warp_offset      = 16;\n        static const int warp_log         = 5;\n        static const int warp_mask        = 31;\n\n        typedef WarpScanNoComp<INCLUSIVE, T, F> merge;\n    };\n\n    template <ScanKind Kind , typename T, typename Sc, typename F> struct BlockScan\n    {\n        __device__ __forceinline__ BlockScan() {}\n        __device__ __forceinline__ BlockScan(const BlockScan& other) { (void)other; }\n\n        __device__ __forceinline__ T operator()(volatile T *ptr)\n        {\n            const unsigned int tid  = threadIdx.x;\n            const unsigned int lane = tid & warp_mask;\n            const unsigned int warp = tid >> warp_log;\n\n            Sc scan;\n            typename Sc::merge merge_scan;\n            const unsigned int idx = scan.index(tid);\n\n            T val = scan(ptr, idx);\n            __syncthreads ();\n\n            if( warp == 0)\n                scan.init(ptr);\n            __syncthreads ();\n\n            if( lane == 31 )\n                ptr [scan.warp_offset + warp ] = (Kind == INCLUSIVE) ? val : ptr [idx];\n            __syncthreads ();\n\n            if( warp == 0 )\n                merge_scan(ptr, idx);\n            __syncthreads();\n\n            if ( warp > 0)\n                val = ptr [scan.warp_offset + warp - 1] + val;\n            __syncthreads ();\n\n            ptr[idx] = val;\n            __syncthreads ();\n\n            return val ;\n        }\n\n        static const int warp_log  = 5;\n        static const int warp_mask = 31;\n    };\n\n    template <typename T>\n    __device__ T warpScanInclusive(T idata, volatile T* s_Data, unsigned int tid)\n    {\n    #if __CUDA_ARCH__ >= 300\n        const unsigned int laneId = cv::cuda::device::Warp::laneId();\n\n        // scan on shuffl functions\n        #pragma unroll\n        for (int i = 1; i <= (OPENCV_CUDA_WARP_SIZE / 2); i *= 2)\n        {\n            const T n = cv::cuda::device::shfl_up(idata, i);\n            if (laneId >= i)\n                  idata += n;\n        }\n\n        return idata;\n    #else\n        unsigned int pos = 2 * tid - (tid & (OPENCV_CUDA_WARP_SIZE - 1));\n        s_Data[pos] = 0;\n        pos += OPENCV_CUDA_WARP_SIZE;\n        s_Data[pos] = idata;\n\n        s_Data[pos] += s_Data[pos - 1];\n        s_Data[pos] += s_Data[pos - 2];\n        s_Data[pos] += s_Data[pos - 4];\n        s_Data[pos] += s_Data[pos - 8];\n        s_Data[pos] += s_Data[pos - 16];\n\n        return s_Data[pos];\n    #endif\n    }\n\n    template <typename T>\n    __device__ __forceinline__ T warpScanExclusive(T idata, volatile T* s_Data, unsigned int tid)\n    {\n        return warpScanInclusive(idata, s_Data, tid) - idata;\n    }\n\n    template <int tiNumScanThreads, typename T>\n    __device__ T blockScanInclusive(T idata, volatile T* s_Data, unsigned int tid)\n    {\n        if (tiNumScanThreads > OPENCV_CUDA_WARP_SIZE)\n        {\n            //Bottom-level inclusive warp scan\n            T warpResult = warpScanInclusive(idata, s_Data, tid);\n\n            //Save top elements of each warp for exclusive warp scan\n            //sync to wait for warp scans to complete (because s_Data is being overwritten)\n            __syncthreads();\n            if ((tid & (OPENCV_CUDA_WARP_SIZE - 1)) == (OPENCV_CUDA_WARP_SIZE - 1))\n            {\n                s_Data[tid >> OPENCV_CUDA_LOG_WARP_SIZE] = warpResult;\n            }\n\n            //wait for warp scans to complete\n            __syncthreads();\n\n            if (tid < (tiNumScanThreads / OPENCV_CUDA_WARP_SIZE) )\n            {\n                //grab top warp elements\n                T val = s_Data[tid];\n                //calculate exclusive scan and write back to shared memory\n                s_Data[tid] = warpScanExclusive(val, s_Data, tid);\n            }\n\n            //return updated warp scans with exclusive scan results\n            __syncthreads();\n\n            return warpResult + s_Data[tid >> OPENCV_CUDA_LOG_WARP_SIZE];\n        }\n        else\n        {\n            return warpScanInclusive(idata, s_Data, tid);\n        }\n    }\n}}}\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_SCAN_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/simd_functions.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n/*\n * Copyright (c) 2013 NVIDIA Corporation. 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 *   Redistributions of source code must retain the above copyright notice,\n *   this list of conditions and the following disclaimer.\n *\n *   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 *   Neither the name of NVIDIA Corporation nor the names of its contributors\n *   may 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 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\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef __OPENCV_CUDA_SIMD_FUNCTIONS_HPP__\n#define __OPENCV_CUDA_SIMD_FUNCTIONS_HPP__\n\n#include \"common.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    // 2\n\n    static __device__ __forceinline__ unsigned int vadd2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vadd2.u32.u32.u32.sat %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #elif __CUDA_ARCH__ >= 200\n        asm(\"vadd.u32.u32.u32.sat %0.h0, %1.h0, %2.h0, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vadd.u32.u32.u32.sat %0.h1, %1.h1, %2.h1, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int s;\n        s = a ^ b;          // sum bits\n        r = a + b;          // actual sum\n        s = s ^ r;          // determine carry-ins for each bit position\n        s = s & 0x00010000; // carry-in to high word (= carry-out from low word)\n        r = r - s;          // subtract out carry-out from low word\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsub2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vsub2.u32.u32.u32.sat %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #elif __CUDA_ARCH__ >= 200\n        asm(\"vsub.u32.u32.u32.sat %0.h0, %1.h0, %2.h0, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vsub.u32.u32.u32.sat %0.h1, %1.h1, %2.h1, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int s;\n        s = a ^ b;          // sum bits\n        r = a - b;          // actual sum\n        s = s ^ r;          // determine carry-ins for each bit position\n        s = s & 0x00010000; // borrow to high word\n        r = r + s;          // compensate for borrow from low word\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vabsdiff2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vabsdiff2.u32.u32.u32.sat %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #elif __CUDA_ARCH__ >= 200\n        asm(\"vabsdiff.u32.u32.u32.sat %0.h0, %1.h0, %2.h0, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vabsdiff.u32.u32.u32.sat %0.h1, %1.h1, %2.h1, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int s, t, u, v;\n        s = a & 0x0000ffff; // extract low halfword\n        r = b & 0x0000ffff; // extract low halfword\n        u = ::max(r, s);    // maximum of low halfwords\n        v = ::min(r, s);    // minimum of low halfwords\n        s = a & 0xffff0000; // extract high halfword\n        r = b & 0xffff0000; // extract high halfword\n        t = ::max(r, s);    // maximum of high halfwords\n        s = ::min(r, s);    // minimum of high halfwords\n        r = u | t;          // maximum of both halfwords\n        s = v | s;          // minimum of both halfwords\n        r = r - s;          // |a - b| = max(a,b) - min(a,b);\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vavg2(unsigned int a, unsigned int b)\n    {\n        unsigned int r, s;\n\n        // HAKMEM #23: a + b = 2 * (a & b) + (a ^ b) ==>\n        // (a + b) / 2 = (a & b) + ((a ^ b) >> 1)\n        s = a ^ b;\n        r = a & b;\n        s = s & 0xfffefffe; // ensure shift doesn't cross halfword boundaries\n        s = s >> 1;\n        s = r + s;\n\n        return s;\n    }\n\n    static __device__ __forceinline__ unsigned int vavrg2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vavrg2.u32.u32.u32 %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        // HAKMEM #23: a + b = 2 * (a | b) - (a ^ b) ==>\n        // (a + b + 1) / 2 = (a | b) - ((a ^ b) >> 1)\n        unsigned int s;\n        s = a ^ b;\n        r = a | b;\n        s = s & 0xfffefffe; // ensure shift doesn't cross half-word boundaries\n        s = s >> 1;\n        r = r - s;\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vseteq2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vset2.u32.u32.eq %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        // inspired by Alan Mycroft's null-byte detection algorithm:\n        // null_byte(x) = ((x - 0x01010101) & (~x & 0x80808080))\n        unsigned int c;\n        r = a ^ b;          // 0x0000 if a == b\n        c = r | 0x80008000; // set msbs, to catch carry out\n        r = r ^ c;          // extract msbs, msb = 1 if r < 0x8000\n        c = c - 0x00010001; // msb = 0, if r was 0x0000 or 0x8000\n        c = r & ~c;         // msb = 1, if r was 0x0000\n        r = c >> 15;        // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmpeq2(unsigned int a, unsigned int b)\n    {\n        unsigned int r, c;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vseteq2(a, b);\n        c = r << 16;        // convert bool\n        r = c - r;          //  into mask\n    #else\n        // inspired by Alan Mycroft's null-byte detection algorithm:\n        // null_byte(x) = ((x - 0x01010101) & (~x & 0x80808080))\n        r = a ^ b;          // 0x0000 if a == b\n        c = r | 0x80008000; // set msbs, to catch carry out\n        r = r ^ c;          // extract msbs, msb = 1 if r < 0x8000\n        c = c - 0x00010001; // msb = 0, if r was 0x0000 or 0x8000\n        c = r & ~c;         // msb = 1, if r was 0x0000\n        r = c >> 15;        // convert\n        r = c - r;          //  msbs to\n        r = c | r;          //   mask\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsetge2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vset2.u32.u32.ge %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int c;\n        asm(\"not.b32 %0, %0;\" : \"+r\"(b));\n        c = vavrg2(a, b);   // (a + ~b + 1) / 2 = (a - b) / 2\n        c = c & 0x80008000; // msb = carry-outs\n        r = c >> 15;        // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmpge2(unsigned int a, unsigned int b)\n    {\n        unsigned int r, c;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vsetge2(a, b);\n        c = r << 16;        // convert bool\n        r = c - r;          //  into mask\n    #else\n        asm(\"not.b32 %0, %0;\" : \"+r\"(b));\n        c = vavrg2(a, b);   // (a + ~b + 1) / 2 = (a - b) / 2\n        c = c & 0x80008000; // msb = carry-outs\n        r = c >> 15;        // convert\n        r = c - r;          //  msbs to\n        r = c | r;          //   mask\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsetgt2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vset2.u32.u32.gt %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int c;\n        asm(\"not.b32 %0, %0;\" : \"+r\"(b));\n        c = vavg2(a, b);    // (a + ~b) / 2 = (a - b) / 2 [rounded down]\n        c = c & 0x80008000; // msbs = carry-outs\n        r = c >> 15;        // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmpgt2(unsigned int a, unsigned int b)\n    {\n        unsigned int r, c;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vsetgt2(a, b);\n        c = r << 16;        // convert bool\n        r = c - r;          //  into mask\n    #else\n        asm(\"not.b32 %0, %0;\" : \"+r\"(b));\n        c = vavg2(a, b);    // (a + ~b) / 2 = (a - b) / 2 [rounded down]\n        c = c & 0x80008000; // msbs = carry-outs\n        r = c >> 15;        // convert\n        r = c - r;          //  msbs to\n        r = c | r;          //   mask\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsetle2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vset2.u32.u32.le %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int c;\n        asm(\"not.b32 %0, %0;\" : \"+r\"(a));\n        c = vavrg2(a, b);   // (b + ~a + 1) / 2 = (b - a) / 2\n        c = c & 0x80008000; // msb = carry-outs\n        r = c >> 15;        // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmple2(unsigned int a, unsigned int b)\n    {\n        unsigned int r, c;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vsetle2(a, b);\n        c = r << 16;        // convert bool\n        r = c - r;          //  into mask\n    #else\n        asm(\"not.b32 %0, %0;\" : \"+r\"(a));\n        c = vavrg2(a, b);   // (b + ~a + 1) / 2 = (b - a) / 2\n        c = c & 0x80008000; // msb = carry-outs\n        r = c >> 15;        // convert\n        r = c - r;          //  msbs to\n        r = c | r;          //   mask\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsetlt2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vset2.u32.u32.lt %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int c;\n        asm(\"not.b32 %0, %0;\" : \"+r\"(a));\n        c = vavg2(a, b);    // (b + ~a) / 2 = (b - a) / 2 [rounded down]\n        c = c & 0x80008000; // msb = carry-outs\n        r = c >> 15;        // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmplt2(unsigned int a, unsigned int b)\n    {\n        unsigned int r, c;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vsetlt2(a, b);\n        c = r << 16;        // convert bool\n        r = c - r;          //  into mask\n    #else\n        asm(\"not.b32 %0, %0;\" : \"+r\"(a));\n        c = vavg2(a, b);    // (b + ~a) / 2 = (b - a) / 2 [rounded down]\n        c = c & 0x80008000; // msb = carry-outs\n        r = c >> 15;        // convert\n        r = c - r;          //  msbs to\n        r = c | r;          //   mask\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsetne2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm (\"vset2.u32.u32.ne %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        // inspired by Alan Mycroft's null-byte detection algorithm:\n        // null_byte(x) = ((x - 0x01010101) & (~x & 0x80808080))\n        unsigned int c;\n        r = a ^ b;          // 0x0000 if a == b\n        c = r | 0x80008000; // set msbs, to catch carry out\n        c = c - 0x00010001; // msb = 0, if r was 0x0000 or 0x8000\n        c = r | c;          // msb = 1, if r was not 0x0000\n        c = c & 0x80008000; // extract msbs\n        r = c >> 15;        // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmpne2(unsigned int a, unsigned int b)\n    {\n        unsigned int r, c;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vsetne2(a, b);\n        c = r << 16;        // convert bool\n        r = c - r;          //  into mask\n    #else\n        // inspired by Alan Mycroft's null-byte detection algorithm:\n        // null_byte(x) = ((x - 0x01010101) & (~x & 0x80808080))\n        r = a ^ b;          // 0x0000 if a == b\n        c = r | 0x80008000; // set msbs, to catch carry out\n        c = c - 0x00010001; // msb = 0, if r was 0x0000 or 0x8000\n        c = r | c;          // msb = 1, if r was not 0x0000\n        c = c & 0x80008000; // extract msbs\n        r = c >> 15;        // convert\n        r = c - r;          //  msbs to\n        r = c | r;          //   mask\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vmax2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vmax2.u32.u32.u32 %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #elif __CUDA_ARCH__ >= 200\n        asm(\"vmax.u32.u32.u32 %0.h0, %1.h0, %2.h0, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vmax.u32.u32.u32 %0.h1, %1.h1, %2.h1, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int s, t, u;\n        r = a & 0x0000ffff; // extract low halfword\n        s = b & 0x0000ffff; // extract low halfword\n        t = ::max(r, s);    // maximum of low halfwords\n        r = a & 0xffff0000; // extract high halfword\n        s = b & 0xffff0000; // extract high halfword\n        u = ::max(r, s);    // maximum of high halfwords\n        r = t | u;          // combine halfword maximums\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vmin2(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vmin2.u32.u32.u32 %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #elif __CUDA_ARCH__ >= 200\n        asm(\"vmin.u32.u32.u32 %0.h0, %1.h0, %2.h0, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vmin.u32.u32.u32 %0.h1, %1.h1, %2.h1, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int s, t, u;\n        r = a & 0x0000ffff; // extract low halfword\n        s = b & 0x0000ffff; // extract low halfword\n        t = ::min(r, s);    // minimum of low halfwords\n        r = a & 0xffff0000; // extract high halfword\n        s = b & 0xffff0000; // extract high halfword\n        u = ::min(r, s);    // minimum of high halfwords\n        r = t | u;          // combine halfword minimums\n    #endif\n\n        return r;\n    }\n\n    // 4\n\n    static __device__ __forceinline__ unsigned int vadd4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vadd4.u32.u32.u32.sat %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #elif __CUDA_ARCH__ >= 200\n        asm(\"vadd.u32.u32.u32.sat %0.b0, %1.b0, %2.b0, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vadd.u32.u32.u32.sat %0.b1, %1.b1, %2.b1, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vadd.u32.u32.u32.sat %0.b2, %1.b2, %2.b2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vadd.u32.u32.u32.sat %0.b3, %1.b3, %2.b3, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int s, t;\n        s = a ^ b;          // sum bits\n        r = a & 0x7f7f7f7f; // clear msbs\n        t = b & 0x7f7f7f7f; // clear msbs\n        s = s & 0x80808080; // msb sum bits\n        r = r + t;          // add without msbs, record carry-out in msbs\n        r = r ^ s;          // sum of msb sum and carry-in bits, w/o carry-out\n    #endif /* __CUDA_ARCH__ >= 300 */\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsub4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vsub4.u32.u32.u32.sat %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #elif __CUDA_ARCH__ >= 200\n        asm(\"vsub.u32.u32.u32.sat %0.b0, %1.b0, %2.b0, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vsub.u32.u32.u32.sat %0.b1, %1.b1, %2.b1, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vsub.u32.u32.u32.sat %0.b2, %1.b2, %2.b2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vsub.u32.u32.u32.sat %0.b3, %1.b3, %2.b3, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int s, t;\n        s = a ^ ~b;         // inverted sum bits\n        r = a | 0x80808080; // set msbs\n        t = b & 0x7f7f7f7f; // clear msbs\n        s = s & 0x80808080; // inverted msb sum bits\n        r = r - t;          // subtract w/o msbs, record inverted borrows in msb\n        r = r ^ s;          // combine inverted msb sum bits and borrows\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vavg4(unsigned int a, unsigned int b)\n    {\n        unsigned int r, s;\n\n        // HAKMEM #23: a + b = 2 * (a & b) + (a ^ b) ==>\n        // (a + b) / 2 = (a & b) + ((a ^ b) >> 1)\n        s = a ^ b;\n        r = a & b;\n        s = s & 0xfefefefe; // ensure following shift doesn't cross byte boundaries\n        s = s >> 1;\n        s = r + s;\n\n        return s;\n    }\n\n    static __device__ __forceinline__ unsigned int vavrg4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vavrg4.u32.u32.u32 %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        // HAKMEM #23: a + b = 2 * (a | b) - (a ^ b) ==>\n        // (a + b + 1) / 2 = (a | b) - ((a ^ b) >> 1)\n        unsigned int c;\n        c = a ^ b;\n        r = a | b;\n        c = c & 0xfefefefe; // ensure following shift doesn't cross byte boundaries\n        c = c >> 1;\n        r = r - c;\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vseteq4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vset4.u32.u32.eq %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        // inspired by Alan Mycroft's null-byte detection algorithm:\n        // null_byte(x) = ((x - 0x01010101) & (~x & 0x80808080))\n        unsigned int c;\n        r = a ^ b;          // 0x00 if a == b\n        c = r | 0x80808080; // set msbs, to catch carry out\n        r = r ^ c;          // extract msbs, msb = 1 if r < 0x80\n        c = c - 0x01010101; // msb = 0, if r was 0x00 or 0x80\n        c = r & ~c;         // msb = 1, if r was 0x00\n        r = c >> 7;         // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmpeq4(unsigned int a, unsigned int b)\n    {\n        unsigned int r, t;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vseteq4(a, b);\n        t = r << 8;         // convert bool\n        r = t - r;          //  to mask\n    #else\n        // inspired by Alan Mycroft's null-byte detection algorithm:\n        // null_byte(x) = ((x - 0x01010101) & (~x & 0x80808080))\n        t = a ^ b;          // 0x00 if a == b\n        r = t | 0x80808080; // set msbs, to catch carry out\n        t = t ^ r;          // extract msbs, msb = 1 if t < 0x80\n        r = r - 0x01010101; // msb = 0, if t was 0x00 or 0x80\n        r = t & ~r;         // msb = 1, if t was 0x00\n        t = r >> 7;         // build mask\n        t = r - t;          //  from\n        r = t | r;          //   msbs\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsetle4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vset4.u32.u32.le %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int c;\n        asm(\"not.b32 %0, %0;\" : \"+r\"(a));\n        c = vavrg4(a, b);   // (b + ~a + 1) / 2 = (b - a) / 2\n        c = c & 0x80808080; // msb = carry-outs\n        r = c >> 7;         // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmple4(unsigned int a, unsigned int b)\n    {\n        unsigned int r, c;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vsetle4(a, b);\n        c = r << 8;         // convert bool\n        r = c - r;          //  to mask\n    #else\n        asm(\"not.b32 %0, %0;\" : \"+r\"(a));\n        c = vavrg4(a, b);   // (b + ~a + 1) / 2 = (b - a) / 2\n        c = c & 0x80808080; // msbs = carry-outs\n        r = c >> 7;         // convert\n        r = c - r;          //  msbs to\n        r = c | r;          //   mask\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsetlt4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vset4.u32.u32.lt %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int c;\n        asm(\"not.b32 %0, %0;\" : \"+r\"(a));\n        c = vavg4(a, b);    // (b + ~a) / 2 = (b - a) / 2 [rounded down]\n        c = c & 0x80808080; // msb = carry-outs\n        r = c >> 7;         // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmplt4(unsigned int a, unsigned int b)\n    {\n        unsigned int r, c;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vsetlt4(a, b);\n        c = r << 8;         // convert bool\n        r = c - r;          //  to mask\n    #else\n        asm(\"not.b32 %0, %0;\" : \"+r\"(a));\n        c = vavg4(a, b);    // (b + ~a) / 2 = (b - a) / 2 [rounded down]\n        c = c & 0x80808080; // msbs = carry-outs\n        r = c >> 7;         // convert\n        r = c - r;          //  msbs to\n        r = c | r;          //   mask\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsetge4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vset4.u32.u32.ge %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int c;\n        asm(\"not.b32 %0, %0;\" : \"+r\"(b));\n        c = vavrg4(a, b);   // (a + ~b + 1) / 2 = (a - b) / 2\n        c = c & 0x80808080; // msb = carry-outs\n        r = c >> 7;         // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmpge4(unsigned int a, unsigned int b)\n    {\n        unsigned int r, s;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vsetge4(a, b);\n        s = r << 8;         // convert bool\n        r = s - r;          //  to mask\n    #else\n        asm (\"not.b32 %0,%0;\" : \"+r\"(b));\n        r = vavrg4 (a, b);  // (a + ~b + 1) / 2 = (a - b) / 2\n        r = r & 0x80808080; // msb = carry-outs\n        s = r >> 7;         // build mask\n        s = r - s;          //  from\n        r = s | r;          //   msbs\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsetgt4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vset4.u32.u32.gt %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int c;\n        asm(\"not.b32 %0, %0;\" : \"+r\"(b));\n        c = vavg4(a, b);    // (a + ~b) / 2 = (a - b) / 2 [rounded down]\n        c = c & 0x80808080; // msb = carry-outs\n        r = c >> 7;         // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmpgt4(unsigned int a, unsigned int b)\n    {\n        unsigned int r, c;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vsetgt4(a, b);\n        c = r << 8;         // convert bool\n        r = c - r;          //  to mask\n    #else\n        asm(\"not.b32 %0, %0;\" : \"+r\"(b));\n        c = vavg4(a, b);    // (a + ~b) / 2 = (a - b) / 2 [rounded down]\n        c = c & 0x80808080; // msb = carry-outs\n        r = c >> 7;         // convert\n        r = c - r;          //  msbs to\n        r = c | r;          //   mask\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vsetne4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vset4.u32.u32.ne %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        // inspired by Alan Mycroft's null-byte detection algorithm:\n        // null_byte(x) = ((x - 0x01010101) & (~x & 0x80808080))\n        unsigned int c;\n        r = a ^ b;          // 0x00 if a == b\n        c = r | 0x80808080; // set msbs, to catch carry out\n        c = c - 0x01010101; // msb = 0, if r was 0x00 or 0x80\n        c = r | c;          // msb = 1, if r was not 0x00\n        c = c & 0x80808080; // extract msbs\n        r = c >> 7;         // convert to bool\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vcmpne4(unsigned int a, unsigned int b)\n    {\n        unsigned int r, c;\n\n    #if __CUDA_ARCH__ >= 300\n        r = vsetne4(a, b);\n        c = r << 8;         // convert bool\n        r = c - r;          //  to mask\n    #else\n        // inspired by Alan Mycroft's null-byte detection algorithm:\n        // null_byte(x) = ((x - 0x01010101) & (~x & 0x80808080))\n        r = a ^ b;          // 0x00 if a == b\n        c = r | 0x80808080; // set msbs, to catch carry out\n        c = c - 0x01010101; // msb = 0, if r was 0x00 or 0x80\n        c = r | c;          // msb = 1, if r was not 0x00\n        c = c & 0x80808080; // extract msbs\n        r = c >> 7;         // convert\n        r = c - r;          //  msbs to\n        r = c | r;          //   mask\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vabsdiff4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vabsdiff4.u32.u32.u32.sat %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #elif __CUDA_ARCH__ >= 200\n        asm(\"vabsdiff.u32.u32.u32.sat %0.b0, %1.b0, %2.b0, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vabsdiff.u32.u32.u32.sat %0.b1, %1.b1, %2.b1, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vabsdiff.u32.u32.u32.sat %0.b2, %1.b2, %2.b2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vabsdiff.u32.u32.u32.sat %0.b3, %1.b3, %2.b3, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int s;\n        s = vcmpge4(a, b);  // mask = 0xff if a >= b\n        r = a ^ b;          //\n        s = (r &  s) ^ b;   // select a when a >= b, else select b => max(a,b)\n        r = s ^ r;          // select a when b >= a, else select b => min(a,b)\n        r = s - r;          // |a - b| = max(a,b) - min(a,b);\n    #endif\n\n        return r;\n    }\n\n    static __device__ __forceinline__ unsigned int vmax4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vmax4.u32.u32.u32 %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #elif __CUDA_ARCH__ >= 200\n        asm(\"vmax.u32.u32.u32 %0.b0, %1.b0, %2.b0, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vmax.u32.u32.u32 %0.b1, %1.b1, %2.b1, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vmax.u32.u32.u32 %0.b2, %1.b2, %2.b2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vmax.u32.u32.u32 %0.b3, %1.b3, %2.b3, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int s;\n        s = vcmpge4(a, b);  // mask = 0xff if a >= b\n        r = a & s;          // select a when b >= a\n        s = b & ~s;         // select b when b < a\n        r = r | s;          // combine byte selections\n    #endif\n\n        return r;           // byte-wise unsigned maximum\n    }\n\n    static __device__ __forceinline__ unsigned int vmin4(unsigned int a, unsigned int b)\n    {\n        unsigned int r = 0;\n\n    #if __CUDA_ARCH__ >= 300\n        asm(\"vmin4.u32.u32.u32 %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #elif __CUDA_ARCH__ >= 200\n        asm(\"vmin.u32.u32.u32 %0.b0, %1.b0, %2.b0, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vmin.u32.u32.u32 %0.b1, %1.b1, %2.b1, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vmin.u32.u32.u32 %0.b2, %1.b2, %2.b2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n        asm(\"vmin.u32.u32.u32 %0.b3, %1.b3, %2.b3, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(r));\n    #else\n        unsigned int s;\n        s = vcmpge4(b, a);  // mask = 0xff if a >= b\n        r = a & s;          // select a when b >= a\n        s = b & ~s;         // select b when b < a\n        r = r | s;          // combine byte selections\n    #endif\n\n        return r;\n    }\n}}}\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_SIMD_FUNCTIONS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/transform.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_TRANSFORM_HPP__\n#define __OPENCV_CUDA_TRANSFORM_HPP__\n\n#include \"common.hpp\"\n#include \"utility.hpp\"\n#include \"detail/transform_detail.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    template <typename T, typename D, typename UnOp, typename Mask>\n    static inline void transform(PtrStepSz<T> src, PtrStepSz<D> dst, UnOp op, const Mask& mask, cudaStream_t stream)\n    {\n        typedef TransformFunctorTraits<UnOp> ft;\n        transform_detail::TransformDispatcher<VecTraits<T>::cn == 1 && VecTraits<D>::cn == 1 && ft::smart_shift != 1>::call(src, dst, op, mask, stream);\n    }\n\n    template <typename T1, typename T2, typename D, typename BinOp, typename Mask>\n    static inline void transform(PtrStepSz<T1> src1, PtrStepSz<T2> src2, PtrStepSz<D> dst, BinOp op, const Mask& mask, cudaStream_t stream)\n    {\n        typedef TransformFunctorTraits<BinOp> ft;\n        transform_detail::TransformDispatcher<VecTraits<T1>::cn == 1 && VecTraits<T2>::cn == 1 && VecTraits<D>::cn == 1 && ft::smart_shift != 1>::call(src1, src2, dst, op, mask, stream);\n    }\n}}}\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_TRANSFORM_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/type_traits.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_TYPE_TRAITS_HPP__\n#define __OPENCV_CUDA_TYPE_TRAITS_HPP__\n\n#include \"detail/type_traits_detail.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    template <typename T> struct IsSimpleParameter\n    {\n        enum {value = type_traits_detail::IsIntegral<T>::value || type_traits_detail::IsFloat<T>::value ||\n            type_traits_detail::PointerTraits<typename type_traits_detail::ReferenceTraits<T>::type>::value};\n    };\n\n    template <typename T> struct TypeTraits\n    {\n        typedef typename type_traits_detail::UnConst<T>::type                                                NonConstType;\n        typedef typename type_traits_detail::UnVolatile<T>::type                                             NonVolatileType;\n        typedef typename type_traits_detail::UnVolatile<typename type_traits_detail::UnConst<T>::type>::type UnqualifiedType;\n        typedef typename type_traits_detail::PointerTraits<UnqualifiedType>::type                            PointeeType;\n        typedef typename type_traits_detail::ReferenceTraits<T>::type                                        ReferredType;\n\n        enum { isConst          = type_traits_detail::UnConst<T>::value };\n        enum { isVolatile       = type_traits_detail::UnVolatile<T>::value };\n\n        enum { isReference      = type_traits_detail::ReferenceTraits<UnqualifiedType>::value };\n        enum { isPointer        = type_traits_detail::PointerTraits<typename type_traits_detail::ReferenceTraits<UnqualifiedType>::type>::value };\n\n        enum { isUnsignedInt    = type_traits_detail::IsUnsignedIntegral<UnqualifiedType>::value };\n        enum { isSignedInt      = type_traits_detail::IsSignedIntergral<UnqualifiedType>::value };\n        enum { isIntegral       = type_traits_detail::IsIntegral<UnqualifiedType>::value };\n        enum { isFloat          = type_traits_detail::IsFloat<UnqualifiedType>::value };\n        enum { isArith          = isIntegral || isFloat };\n        enum { isVec            = type_traits_detail::IsVec<UnqualifiedType>::value };\n\n        typedef typename type_traits_detail::Select<IsSimpleParameter<UnqualifiedType>::value,\n            T, typename type_traits_detail::AddParameterType<T>::type>::type ParameterType;\n    };\n}}}\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_TYPE_TRAITS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/utility.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_UTILITY_HPP__\n#define __OPENCV_CUDA_UTILITY_HPP__\n\n#include \"saturate_cast.hpp\"\n#include \"datamov_utils.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    #define OPENCV_CUDA_LOG_WARP_SIZE        (5)\n    #define OPENCV_CUDA_WARP_SIZE            (1 << OPENCV_CUDA_LOG_WARP_SIZE)\n    #define OPENCV_CUDA_LOG_MEM_BANKS        ((__CUDA_ARCH__ >= 200) ? 5 : 4) // 32 banks on fermi, 16 on tesla\n    #define OPENCV_CUDA_MEM_BANKS            (1 << OPENCV_CUDA_LOG_MEM_BANKS)\n\n    ///////////////////////////////////////////////////////////////////////////////\n    // swap\n\n    template <typename T> void __device__ __host__ __forceinline__ swap(T& a, T& b)\n    {\n        const T temp = a;\n        a = b;\n        b = temp;\n    }\n\n    ///////////////////////////////////////////////////////////////////////////////\n    // Mask Reader\n\n    struct SingleMask\n    {\n        explicit __host__ __device__ __forceinline__ SingleMask(PtrStepb mask_) : mask(mask_) {}\n        __host__ __device__ __forceinline__ SingleMask(const SingleMask& mask_): mask(mask_.mask){}\n\n        __device__ __forceinline__ bool operator()(int y, int x) const\n        {\n            return mask.ptr(y)[x] != 0;\n        }\n\n        PtrStepb mask;\n    };\n\n    struct SingleMaskChannels\n    {\n        __host__ __device__ __forceinline__ SingleMaskChannels(PtrStepb mask_, int channels_)\n        : mask(mask_), channels(channels_) {}\n        __host__ __device__ __forceinline__ SingleMaskChannels(const SingleMaskChannels& mask_)\n            :mask(mask_.mask), channels(mask_.channels){}\n\n        __device__ __forceinline__ bool operator()(int y, int x) const\n        {\n            return mask.ptr(y)[x / channels] != 0;\n        }\n\n        PtrStepb mask;\n        int channels;\n    };\n\n    struct MaskCollection\n    {\n        explicit __host__ __device__ __forceinline__ MaskCollection(PtrStepb* maskCollection_)\n            : maskCollection(maskCollection_) {}\n\n        __device__ __forceinline__ MaskCollection(const MaskCollection& masks_)\n            : maskCollection(masks_.maskCollection), curMask(masks_.curMask){}\n\n        __device__ __forceinline__ void next()\n        {\n            curMask = *maskCollection++;\n        }\n        __device__ __forceinline__ void setMask(int z)\n        {\n            curMask = maskCollection[z];\n        }\n\n        __device__ __forceinline__ bool operator()(int y, int x) const\n        {\n            uchar val;\n            return curMask.data == 0 || (ForceGlob<uchar>::Load(curMask.ptr(y), x, val), (val != 0));\n        }\n\n        const PtrStepb* maskCollection;\n        PtrStepb curMask;\n    };\n\n    struct WithOutMask\n    {\n        __host__ __device__ __forceinline__ WithOutMask(){}\n        __host__ __device__ __forceinline__ WithOutMask(const WithOutMask&){}\n\n        __device__ __forceinline__ void next() const\n        {\n        }\n        __device__ __forceinline__ void setMask(int) const\n        {\n        }\n\n        __device__ __forceinline__ bool operator()(int, int) const\n        {\n            return true;\n        }\n\n        __device__ __forceinline__ bool operator()(int, int, int) const\n        {\n            return true;\n        }\n\n        static __device__ __forceinline__ bool check(int, int)\n        {\n            return true;\n        }\n\n        static __device__ __forceinline__ bool check(int, int, int)\n        {\n            return true;\n        }\n    };\n\n    ///////////////////////////////////////////////////////////////////////////////\n    // Solve linear system\n\n    // solve 2x2 linear system Ax=b\n    template <typename T> __device__ __forceinline__ bool solve2x2(const T A[2][2], const T b[2], T x[2])\n    {\n        T det = A[0][0] * A[1][1] - A[1][0] * A[0][1];\n\n        if (det != 0)\n        {\n            double invdet = 1.0 / det;\n\n            x[0] = saturate_cast<T>(invdet * (b[0] * A[1][1] - b[1] * A[0][1]));\n\n            x[1] = saturate_cast<T>(invdet * (A[0][0] * b[1] - A[1][0] * b[0]));\n\n            return true;\n        }\n\n        return false;\n    }\n\n    // solve 3x3 linear system Ax=b\n    template <typename T> __device__ __forceinline__ bool solve3x3(const T A[3][3], const T b[3], T x[3])\n    {\n        T det = A[0][0] * (A[1][1] * A[2][2] - A[1][2] * A[2][1])\n              - A[0][1] * (A[1][0] * A[2][2] - A[1][2] * A[2][0])\n              + A[0][2] * (A[1][0] * A[2][1] - A[1][1] * A[2][0]);\n\n        if (det != 0)\n        {\n            double invdet = 1.0 / det;\n\n            x[0] = saturate_cast<T>(invdet *\n                (b[0]    * (A[1][1] * A[2][2] - A[1][2] * A[2][1]) -\n                 A[0][1] * (b[1]    * A[2][2] - A[1][2] * b[2]   ) +\n                 A[0][2] * (b[1]    * A[2][1] - A[1][1] * b[2]   )));\n\n            x[1] = saturate_cast<T>(invdet *\n                (A[0][0] * (b[1]    * A[2][2] - A[1][2] * b[2]   ) -\n                 b[0]    * (A[1][0] * A[2][2] - A[1][2] * A[2][0]) +\n                 A[0][2] * (A[1][0] * b[2]    - b[1]    * A[2][0])));\n\n            x[2] = saturate_cast<T>(invdet *\n                (A[0][0] * (A[1][1] * b[2]    - b[1]    * A[2][1]) -\n                 A[0][1] * (A[1][0] * b[2]    - b[1]    * A[2][0]) +\n                 b[0]    * (A[1][0] * A[2][1] - A[1][1] * A[2][0])));\n\n            return true;\n        }\n\n        return false;\n    }\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_UTILITY_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/vec_distance.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_VEC_DISTANCE_HPP__\n#define __OPENCV_CUDA_VEC_DISTANCE_HPP__\n\n#include \"reduce.hpp\"\n#include \"functional.hpp\"\n#include \"detail/vec_distance_detail.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    template <typename T> struct L1Dist\n    {\n        typedef int value_type;\n        typedef int result_type;\n\n        __device__ __forceinline__ L1Dist() : mySum(0) {}\n\n        __device__ __forceinline__ void reduceIter(int val1, int val2)\n        {\n            mySum = __sad(val1, val2, mySum);\n        }\n\n        template <int THREAD_DIM> __device__ __forceinline__ void reduceAll(int* smem, int tid)\n        {\n            reduce<THREAD_DIM>(smem, mySum, tid, plus<int>());\n        }\n\n        __device__ __forceinline__ operator int() const\n        {\n            return mySum;\n        }\n\n        int mySum;\n    };\n    template <> struct L1Dist<float>\n    {\n        typedef float value_type;\n        typedef float result_type;\n\n        __device__ __forceinline__ L1Dist() : mySum(0.0f) {}\n\n        __device__ __forceinline__ void reduceIter(float val1, float val2)\n        {\n            mySum += ::fabs(val1 - val2);\n        }\n\n        template <int THREAD_DIM> __device__ __forceinline__ void reduceAll(float* smem, int tid)\n        {\n            reduce<THREAD_DIM>(smem, mySum, tid, plus<float>());\n        }\n\n        __device__ __forceinline__ operator float() const\n        {\n            return mySum;\n        }\n\n        float mySum;\n    };\n\n    struct L2Dist\n    {\n        typedef float value_type;\n        typedef float result_type;\n\n        __device__ __forceinline__ L2Dist() : mySum(0.0f) {}\n\n        __device__ __forceinline__ void reduceIter(float val1, float val2)\n        {\n            float reg = val1 - val2;\n            mySum += reg * reg;\n        }\n\n        template <int THREAD_DIM> __device__ __forceinline__ void reduceAll(float* smem, int tid)\n        {\n            reduce<THREAD_DIM>(smem, mySum, tid, plus<float>());\n        }\n\n        __device__ __forceinline__ operator float() const\n        {\n            return sqrtf(mySum);\n        }\n\n        float mySum;\n    };\n\n    struct HammingDist\n    {\n        typedef int value_type;\n        typedef int result_type;\n\n        __device__ __forceinline__ HammingDist() : mySum(0) {}\n\n        __device__ __forceinline__ void reduceIter(int val1, int val2)\n        {\n            mySum += __popc(val1 ^ val2);\n        }\n\n        template <int THREAD_DIM> __device__ __forceinline__ void reduceAll(int* smem, int tid)\n        {\n            reduce<THREAD_DIM>(smem, mySum, tid, plus<int>());\n        }\n\n        __device__ __forceinline__ operator int() const\n        {\n            return mySum;\n        }\n\n        int mySum;\n    };\n\n    // calc distance between two vectors in global memory\n    template <int THREAD_DIM, typename Dist, typename T1, typename T2>\n    __device__ void calcVecDiffGlobal(const T1* vec1, const T2* vec2, int len, Dist& dist, typename Dist::result_type* smem, int tid)\n    {\n        for (int i = tid; i < len; i += THREAD_DIM)\n        {\n            T1 val1;\n            ForceGlob<T1>::Load(vec1, i, val1);\n\n            T2 val2;\n            ForceGlob<T2>::Load(vec2, i, val2);\n\n            dist.reduceIter(val1, val2);\n        }\n\n        dist.reduceAll<THREAD_DIM>(smem, tid);\n    }\n\n    // calc distance between two vectors, first vector is cached in register or shared memory, second vector is in global memory\n    template <int THREAD_DIM, int MAX_LEN, bool LEN_EQ_MAX_LEN, typename Dist, typename T1, typename T2>\n    __device__ __forceinline__ void calcVecDiffCached(const T1* vecCached, const T2* vecGlob, int len, Dist& dist, typename Dist::result_type* smem, int tid)\n    {\n        vec_distance_detail::VecDiffCachedCalculator<THREAD_DIM, MAX_LEN, LEN_EQ_MAX_LEN>::calc(vecCached, vecGlob, len, dist, tid);\n\n        dist.reduceAll<THREAD_DIM>(smem, tid);\n    }\n\n    // calc distance between two vectors in global memory\n    template <int THREAD_DIM, typename T1> struct VecDiffGlobal\n    {\n        explicit __device__ __forceinline__ VecDiffGlobal(const T1* vec1_, int = 0, void* = 0, int = 0, int = 0)\n        {\n            vec1 = vec1_;\n        }\n\n        template <typename T2, typename Dist>\n        __device__ __forceinline__ void calc(const T2* vec2, int len, Dist& dist, typename Dist::result_type* smem, int tid) const\n        {\n            calcVecDiffGlobal<THREAD_DIM>(vec1, vec2, len, dist, smem, tid);\n        }\n\n        const T1* vec1;\n    };\n\n    // calc distance between two vectors, first vector is cached in register memory, second vector is in global memory\n    template <int THREAD_DIM, int MAX_LEN, bool LEN_EQ_MAX_LEN, typename U> struct VecDiffCachedRegister\n    {\n        template <typename T1> __device__ __forceinline__ VecDiffCachedRegister(const T1* vec1, int len, U* smem, int glob_tid, int tid)\n        {\n            if (glob_tid < len)\n                smem[glob_tid] = vec1[glob_tid];\n            __syncthreads();\n\n            U* vec1ValsPtr = vec1Vals;\n\n            #pragma unroll\n            for (int i = tid; i < MAX_LEN; i += THREAD_DIM)\n                *vec1ValsPtr++ = smem[i];\n\n            __syncthreads();\n        }\n\n        template <typename T2, typename Dist>\n        __device__ __forceinline__ void calc(const T2* vec2, int len, Dist& dist, typename Dist::result_type* smem, int tid) const\n        {\n            calcVecDiffCached<THREAD_DIM, MAX_LEN, LEN_EQ_MAX_LEN>(vec1Vals, vec2, len, dist, smem, tid);\n        }\n\n        U vec1Vals[MAX_LEN / THREAD_DIM];\n    };\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_VEC_DISTANCE_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/vec_math.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_VECMATH_HPP__\n#define __OPENCV_CUDA_VECMATH_HPP__\n\n#include \"vec_traits.hpp\"\n#include \"saturate_cast.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n\n// saturate_cast\n\nnamespace vec_math_detail\n{\n    template <int cn, typename VecD> struct SatCastHelper;\n    template <typename VecD> struct SatCastHelper<1, VecD>\n    {\n        template <typename VecS> static __device__ __forceinline__ VecD cast(const VecS& v)\n        {\n            typedef typename VecTraits<VecD>::elem_type D;\n            return VecTraits<VecD>::make(saturate_cast<D>(v.x));\n        }\n    };\n    template <typename VecD> struct SatCastHelper<2, VecD>\n    {\n        template <typename VecS> static __device__ __forceinline__ VecD cast(const VecS& v)\n        {\n            typedef typename VecTraits<VecD>::elem_type D;\n            return VecTraits<VecD>::make(saturate_cast<D>(v.x), saturate_cast<D>(v.y));\n        }\n    };\n    template <typename VecD> struct SatCastHelper<3, VecD>\n    {\n        template <typename VecS> static __device__ __forceinline__ VecD cast(const VecS& v)\n        {\n            typedef typename VecTraits<VecD>::elem_type D;\n            return VecTraits<VecD>::make(saturate_cast<D>(v.x), saturate_cast<D>(v.y), saturate_cast<D>(v.z));\n        }\n    };\n    template <typename VecD> struct SatCastHelper<4, VecD>\n    {\n        template <typename VecS> static __device__ __forceinline__ VecD cast(const VecS& v)\n        {\n            typedef typename VecTraits<VecD>::elem_type D;\n            return VecTraits<VecD>::make(saturate_cast<D>(v.x), saturate_cast<D>(v.y), saturate_cast<D>(v.z), saturate_cast<D>(v.w));\n        }\n    };\n\n    template <typename VecD, typename VecS> static __device__ __forceinline__ VecD saturate_cast_helper(const VecS& v)\n    {\n        return SatCastHelper<VecTraits<VecD>::cn, VecD>::cast(v);\n    }\n}\n\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uchar1& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const char1& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const ushort1& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const short1& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uint1& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const int1& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const float1& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const double1& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\n\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uchar2& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const char2& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const ushort2& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const short2& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uint2& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const int2& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const float2& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const double2& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\n\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uchar3& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const char3& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const ushort3& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const short3& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uint3& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const int3& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const float3& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const double3& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\n\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uchar4& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const char4& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const ushort4& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const short4& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uint4& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const int4& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const float4& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\ntemplate<typename T> static __device__ __forceinline__ T saturate_cast(const double4& v) {return vec_math_detail::saturate_cast_helper<T>(v);}\n\n// unary operators\n\n#define CV_CUDEV_IMPLEMENT_VEC_UNARY_OP(op, input_type, output_type) \\\n    __device__ __forceinline__ output_type ## 1 operator op(const input_type ## 1 & a) \\\n    { \\\n        return VecTraits<output_type ## 1>::make(op (a.x)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 2 operator op(const input_type ## 2 & a) \\\n    { \\\n        return VecTraits<output_type ## 2>::make(op (a.x), op (a.y)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 3 operator op(const input_type ## 3 & a) \\\n    { \\\n        return VecTraits<output_type ## 3>::make(op (a.x), op (a.y), op (a.z)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 4 operator op(const input_type ## 4 & a) \\\n    { \\\n        return VecTraits<output_type ## 4>::make(op (a.x), op (a.y), op (a.z), op (a.w)); \\\n    }\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(-, char, char)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(-, short, short)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(-, int, int)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(-, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(-, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, char, uchar)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, ushort, uchar)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, short, uchar)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, int, uchar)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, uint, uchar)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, float, uchar)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, double, uchar)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, char, char)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, ushort, ushort)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, short, short)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, int, int)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, uint, uint)\n\n#undef CV_CUDEV_IMPLEMENT_VEC_UNARY_OP\n\n// unary functions\n\n#define CV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(func_name, func, input_type, output_type) \\\n    __device__ __forceinline__ output_type ## 1 func_name(const input_type ## 1 & a) \\\n    { \\\n        return VecTraits<output_type ## 1>::make(func (a.x)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 2 func_name(const input_type ## 2 & a) \\\n    { \\\n        return VecTraits<output_type ## 2>::make(func (a.x), func (a.y)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 3 func_name(const input_type ## 3 & a) \\\n    { \\\n        return VecTraits<output_type ## 3>::make(func (a.x), func (a.y), func (a.z)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 4 func_name(const input_type ## 4 & a) \\\n    { \\\n        return VecTraits<output_type ## 4>::make(func (a.x), func (a.y), func (a.z), func (a.w)); \\\n    }\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, /*::abs*/, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, ::abs, char, char)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, /*::abs*/, ushort, ushort)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, ::abs, short, short)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, ::abs, int, int)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, /*::abs*/, uint, uint)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, ::fabsf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, ::fabs, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrt, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::exp, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::log, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sin, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cos, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tan, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asin, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acos, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atan, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinh, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::cosh, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanh, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinh, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acosh, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanh, double, double)\n\n#undef CV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC\n\n// binary operators (vec & vec)\n\n#define CV_CUDEV_IMPLEMENT_VEC_BINARY_OP(op, input_type, output_type) \\\n    __device__ __forceinline__ output_type ## 1 operator op(const input_type ## 1 & a, const input_type ## 1 & b) \\\n    { \\\n        return VecTraits<output_type ## 1>::make(a.x op b.x); \\\n    } \\\n    __device__ __forceinline__ output_type ## 2 operator op(const input_type ## 2 & a, const input_type ## 2 & b) \\\n    { \\\n        return VecTraits<output_type ## 2>::make(a.x op b.x, a.y op b.y); \\\n    } \\\n    __device__ __forceinline__ output_type ## 3 operator op(const input_type ## 3 & a, const input_type ## 3 & b) \\\n    { \\\n        return VecTraits<output_type ## 3>::make(a.x op b.x, a.y op b.y, a.z op b.z); \\\n    } \\\n    __device__ __forceinline__ output_type ## 4 operator op(const input_type ## 4 & a, const input_type ## 4 & b) \\\n    { \\\n        return VecTraits<output_type ## 4>::make(a.x op b.x, a.y op b.y, a.z op b.z, a.w op b.w); \\\n    }\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, uchar, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, char, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, ushort, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, short, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, int, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, uint, uint)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, float, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, uchar, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, char, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, ushort, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, short, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, int, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, uint, uint)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, float, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, uchar, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, char, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, ushort, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, short, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, int, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, uint, uint)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, float, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, uchar, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, char, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, ushort, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, short, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, int, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, uint, uint)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, float, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, char, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, ushort, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, short, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, int, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, uint, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, float, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, double, uchar)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, char, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, ushort, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, short, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, int, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, uint, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, float, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, double, uchar)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, char, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, ushort, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, short, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, int, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, uint, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, float, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, double, uchar)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, char, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, ushort, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, short, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, int, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, uint, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, float, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, double, uchar)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, char, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, ushort, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, short, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, int, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, uint, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, float, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, double, uchar)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, char, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, ushort, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, short, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, int, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, uint, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, float, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, double, uchar)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, char, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, ushort, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, short, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, int, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, uint, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, float, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, double, uchar)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, char, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, ushort, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, short, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, int, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, uint, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, float, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, double, uchar)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, char, char)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, ushort, ushort)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, short, short)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, int, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, uint, uint)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, char, char)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, ushort, ushort)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, short, short)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, int, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, uint, uint)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, char, char)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, ushort, ushort)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, short, short)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, int, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, uint, uint)\n\n#undef CV_CUDEV_IMPLEMENT_VEC_BINARY_OP\n\n// binary operators (vec & scalar)\n\n#define CV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(op, input_type, scalar_type, output_type) \\\n    __device__ __forceinline__ output_type ## 1 operator op(const input_type ## 1 & a, scalar_type s) \\\n    { \\\n        return VecTraits<output_type ## 1>::make(a.x op s); \\\n    } \\\n    __device__ __forceinline__ output_type ## 1 operator op(scalar_type s, const input_type ## 1 & b) \\\n    { \\\n        return VecTraits<output_type ## 1>::make(s op b.x); \\\n    } \\\n    __device__ __forceinline__ output_type ## 2 operator op(const input_type ## 2 & a, scalar_type s) \\\n    { \\\n        return VecTraits<output_type ## 2>::make(a.x op s, a.y op s); \\\n    } \\\n    __device__ __forceinline__ output_type ## 2 operator op(scalar_type s, const input_type ## 2 & b) \\\n    { \\\n        return VecTraits<output_type ## 2>::make(s op b.x, s op b.y); \\\n    } \\\n    __device__ __forceinline__ output_type ## 3 operator op(const input_type ## 3 & a, scalar_type s) \\\n    { \\\n        return VecTraits<output_type ## 3>::make(a.x op s, a.y op s, a.z op s); \\\n    } \\\n    __device__ __forceinline__ output_type ## 3 operator op(scalar_type s, const input_type ## 3 & b) \\\n    { \\\n        return VecTraits<output_type ## 3>::make(s op b.x, s op b.y, s op b.z); \\\n    } \\\n    __device__ __forceinline__ output_type ## 4 operator op(const input_type ## 4 & a, scalar_type s) \\\n    { \\\n        return VecTraits<output_type ## 4>::make(a.x op s, a.y op s, a.z op s, a.w op s); \\\n    } \\\n    __device__ __forceinline__ output_type ## 4 operator op(scalar_type s, const input_type ## 4 & b) \\\n    { \\\n        return VecTraits<output_type ## 4>::make(s op b.x, s op b.y, s op b.z, s op b.w); \\\n    }\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uchar, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uchar, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uchar, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, char, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, char, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, char, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, ushort, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, ushort, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, ushort, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, short, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, short, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, short, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, int, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, int, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, int, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uint, uint, uint)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uint, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uint, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, float, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, float, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, double, double, double)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uchar, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uchar, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uchar, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, char, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, char, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, char, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, ushort, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, ushort, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, ushort, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, short, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, short, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, short, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, int, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, int, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, int, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uint, uint, uint)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uint, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uint, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, float, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, float, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, double, double, double)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uchar, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uchar, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uchar, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, char, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, char, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, char, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, ushort, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, ushort, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, ushort, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, short, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, short, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, short, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, int, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, int, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, int, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uint, uint, uint)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uint, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uint, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, float, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, float, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, double, double, double)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uchar, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uchar, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uchar, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, char, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, char, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, char, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, ushort, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, ushort, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, ushort, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, short, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, short, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, short, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, int, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, int, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, int, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uint, uint, uint)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uint, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uint, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, float, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, float, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, double, double, double)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, char, char, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, ushort, ushort, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, short, short, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, int, int, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, uint, uint, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, float, float, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, double, double, uchar)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, char, char, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, ushort, ushort, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, short, short, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, int, int, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, uint, uint, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, float, float, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, double, double, uchar)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, char, char, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, ushort, ushort, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, short, short, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, int, int, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, uint, uint, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, float, float, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, double, double, uchar)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, char, char, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, ushort, ushort, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, short, short, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, int, int, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, uint, uint, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, float, float, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, double, double, uchar)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, char, char, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, ushort, ushort, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, short, short, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, int, int, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, uint, uint, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, float, float, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, double, double, uchar)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, char, char, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, ushort, ushort, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, short, short, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, int, int, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, uint, uint, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, float, float, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, double, double, uchar)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, char, char, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, ushort, ushort, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, short, short, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, int, int, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, uint, uint, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, float, float, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, double, double, uchar)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, char, char, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, ushort, ushort, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, short, short, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, int, int, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, uint, uint, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, float, float, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, double, double, uchar)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, char, char, char)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, ushort, ushort, ushort)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, short, short, short)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, int, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, uint, uint, uint)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, char, char, char)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, ushort, ushort, ushort)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, short, short, short)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, int, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, uint, uint, uint)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, char, char, char)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, ushort, ushort, ushort)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, short, short, short)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, int, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, uint, uint, uint)\n\n#undef CV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP\n\n// binary function (vec & vec)\n\n#define CV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(func_name, func, input_type, output_type) \\\n    __device__ __forceinline__ output_type ## 1 func_name(const input_type ## 1 & a, const input_type ## 1 & b) \\\n    { \\\n        return VecTraits<output_type ## 1>::make(func (a.x, b.x)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 2 func_name(const input_type ## 2 & a, const input_type ## 2 & b) \\\n    { \\\n        return VecTraits<output_type ## 2>::make(func (a.x, b.x), func (a.y, b.y)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 3 func_name(const input_type ## 3 & a, const input_type ## 3 & b) \\\n    { \\\n        return VecTraits<output_type ## 3>::make(func (a.x, b.x), func (a.y, b.y), func (a.z, b.z)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 4 func_name(const input_type ## 4 & a, const input_type ## 4 & b) \\\n    { \\\n        return VecTraits<output_type ## 4>::make(func (a.x, b.x), func (a.y, b.y), func (a.z, b.z), func (a.w, b.w)); \\\n    }\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, char, char)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, ushort, ushort)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, short, short)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, uint, uint)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, int, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::fmaxf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::fmax, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, uchar, uchar)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, char, char)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, ushort, ushort)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, short, short)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, uint, uint)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, int, int)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::fminf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::fmin, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, char, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, short, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, int, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, float, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypot, double, double)\n\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, uchar, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, char, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, ushort, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, short, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, uint, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, int, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, float, float)\nCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2, double, double)\n\n#undef CV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC\n\n// binary function (vec & scalar)\n\n#define CV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(func_name, func, input_type, scalar_type, output_type) \\\n    __device__ __forceinline__ output_type ## 1 func_name(const input_type ## 1 & a, scalar_type s) \\\n    { \\\n        return VecTraits<output_type ## 1>::make(func ((output_type) a.x, (output_type) s)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 1 func_name(scalar_type s, const input_type ## 1 & b) \\\n    { \\\n        return VecTraits<output_type ## 1>::make(func ((output_type) s, (output_type) b.x)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 2 func_name(const input_type ## 2 & a, scalar_type s) \\\n    { \\\n        return VecTraits<output_type ## 2>::make(func ((output_type) a.x, (output_type) s), func ((output_type) a.y, (output_type) s)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 2 func_name(scalar_type s, const input_type ## 2 & b) \\\n    { \\\n        return VecTraits<output_type ## 2>::make(func ((output_type) s, (output_type) b.x), func ((output_type) s, (output_type) b.y)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 3 func_name(const input_type ## 3 & a, scalar_type s) \\\n    { \\\n        return VecTraits<output_type ## 3>::make(func ((output_type) a.x, (output_type) s), func ((output_type) a.y, (output_type) s), func ((output_type) a.z, (output_type) s)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 3 func_name(scalar_type s, const input_type ## 3 & b) \\\n    { \\\n        return VecTraits<output_type ## 3>::make(func ((output_type) s, (output_type) b.x), func ((output_type) s, (output_type) b.y), func ((output_type) s, (output_type) b.z)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 4 func_name(const input_type ## 4 & a, scalar_type s) \\\n    { \\\n        return VecTraits<output_type ## 4>::make(func ((output_type) a.x, (output_type) s), func ((output_type) a.y, (output_type) s), func ((output_type) a.z, (output_type) s), func ((output_type) a.w, (output_type) s)); \\\n    } \\\n    __device__ __forceinline__ output_type ## 4 func_name(scalar_type s, const input_type ## 4 & b) \\\n    { \\\n        return VecTraits<output_type ## 4>::make(func ((output_type) s, (output_type) b.x), func ((output_type) s, (output_type) b.y), func ((output_type) s, (output_type) b.z), func ((output_type) s, (output_type) b.w)); \\\n    }\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, uchar, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, uchar, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, char, char, char)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, char, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, char, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, ushort, ushort, ushort)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, ushort, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, ushort, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, short, short, short)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, short, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, short, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, uint, uint, uint)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, uint, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, uint, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, int, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, int, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, int, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, float, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, float, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, double, double, double)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, uchar, uchar, uchar)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, uchar, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, uchar, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, char, char, char)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, char, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, char, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, ushort, ushort, ushort)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, ushort, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, ushort, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, short, short, short)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, short, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, short, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, uint, uint, uint)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, uint, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, uint, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, int, int, int)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, int, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, int, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, float, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, float, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, double, double, double)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, uchar, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, uchar, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, char, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, char, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, ushort, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, ushort, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, short, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, short, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, uint, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, uint, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, int, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, int, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, float, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, float, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, double, double, double)\n\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, uchar, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, uchar, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, char, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, char, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, ushort, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, ushort, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, short, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, short, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, uint, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, uint, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, int, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, int, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, float, float, float)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, float, double, double)\nCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, double, double, double)\n\n#undef CV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC\n\n}}} // namespace cv { namespace cuda { namespace device\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_VECMATH_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/vec_traits.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_VEC_TRAITS_HPP__\n#define __OPENCV_CUDA_VEC_TRAITS_HPP__\n\n#include \"common.hpp\"\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    template<typename T, int N> struct TypeVec;\n\n    struct __align__(8) uchar8\n    {\n        uchar a0, a1, a2, a3, a4, a5, a6, a7;\n    };\n    static __host__ __device__ __forceinline__ uchar8 make_uchar8(uchar a0, uchar a1, uchar a2, uchar a3, uchar a4, uchar a5, uchar a6, uchar a7)\n    {\n        uchar8 val = {a0, a1, a2, a3, a4, a5, a6, a7};\n        return val;\n    }\n    struct __align__(8) char8\n    {\n        schar a0, a1, a2, a3, a4, a5, a6, a7;\n    };\n    static __host__ __device__ __forceinline__ char8 make_char8(schar a0, schar a1, schar a2, schar a3, schar a4, schar a5, schar a6, schar a7)\n    {\n        char8 val = {a0, a1, a2, a3, a4, a5, a6, a7};\n        return val;\n    }\n    struct __align__(16) ushort8\n    {\n        ushort a0, a1, a2, a3, a4, a5, a6, a7;\n    };\n    static __host__ __device__ __forceinline__ ushort8 make_ushort8(ushort a0, ushort a1, ushort a2, ushort a3, ushort a4, ushort a5, ushort a6, ushort a7)\n    {\n        ushort8 val = {a0, a1, a2, a3, a4, a5, a6, a7};\n        return val;\n    }\n    struct __align__(16) short8\n    {\n        short a0, a1, a2, a3, a4, a5, a6, a7;\n    };\n    static __host__ __device__ __forceinline__ short8 make_short8(short a0, short a1, short a2, short a3, short a4, short a5, short a6, short a7)\n    {\n        short8 val = {a0, a1, a2, a3, a4, a5, a6, a7};\n        return val;\n    }\n    struct __align__(32) uint8\n    {\n        uint a0, a1, a2, a3, a4, a5, a6, a7;\n    };\n    static __host__ __device__ __forceinline__ uint8 make_uint8(uint a0, uint a1, uint a2, uint a3, uint a4, uint a5, uint a6, uint a7)\n    {\n        uint8 val = {a0, a1, a2, a3, a4, a5, a6, a7};\n        return val;\n    }\n    struct __align__(32) int8\n    {\n        int a0, a1, a2, a3, a4, a5, a6, a7;\n    };\n    static __host__ __device__ __forceinline__ int8 make_int8(int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7)\n    {\n        int8 val = {a0, a1, a2, a3, a4, a5, a6, a7};\n        return val;\n    }\n    struct __align__(32) float8\n    {\n        float a0, a1, a2, a3, a4, a5, a6, a7;\n    };\n    static __host__ __device__ __forceinline__ float8 make_float8(float a0, float a1, float a2, float a3, float a4, float a5, float a6, float a7)\n    {\n        float8 val = {a0, a1, a2, a3, a4, a5, a6, a7};\n        return val;\n    }\n    struct double8\n    {\n        double a0, a1, a2, a3, a4, a5, a6, a7;\n    };\n    static __host__ __device__ __forceinline__ double8 make_double8(double a0, double a1, double a2, double a3, double a4, double a5, double a6, double a7)\n    {\n        double8 val = {a0, a1, a2, a3, a4, a5, a6, a7};\n        return val;\n    }\n\n#define OPENCV_CUDA_IMPLEMENT_TYPE_VEC(type) \\\n    template<> struct TypeVec<type, 1> { typedef type vec_type; }; \\\n    template<> struct TypeVec<type ## 1, 1> { typedef type ## 1 vec_type; }; \\\n    template<> struct TypeVec<type, 2> { typedef type ## 2 vec_type; }; \\\n    template<> struct TypeVec<type ## 2, 2> { typedef type ## 2 vec_type; }; \\\n    template<> struct TypeVec<type, 3> { typedef type ## 3 vec_type; }; \\\n    template<> struct TypeVec<type ## 3, 3> { typedef type ## 3 vec_type; }; \\\n    template<> struct TypeVec<type, 4> { typedef type ## 4 vec_type; }; \\\n    template<> struct TypeVec<type ## 4, 4> { typedef type ## 4 vec_type; }; \\\n    template<> struct TypeVec<type, 8> { typedef type ## 8 vec_type; }; \\\n    template<> struct TypeVec<type ## 8, 8> { typedef type ## 8 vec_type; };\n\n    OPENCV_CUDA_IMPLEMENT_TYPE_VEC(uchar)\n    OPENCV_CUDA_IMPLEMENT_TYPE_VEC(char)\n    OPENCV_CUDA_IMPLEMENT_TYPE_VEC(ushort)\n    OPENCV_CUDA_IMPLEMENT_TYPE_VEC(short)\n    OPENCV_CUDA_IMPLEMENT_TYPE_VEC(int)\n    OPENCV_CUDA_IMPLEMENT_TYPE_VEC(uint)\n    OPENCV_CUDA_IMPLEMENT_TYPE_VEC(float)\n    OPENCV_CUDA_IMPLEMENT_TYPE_VEC(double)\n\n    #undef OPENCV_CUDA_IMPLEMENT_TYPE_VEC\n\n    template<> struct TypeVec<schar, 1> { typedef schar vec_type; };\n    template<> struct TypeVec<schar, 2> { typedef char2 vec_type; };\n    template<> struct TypeVec<schar, 3> { typedef char3 vec_type; };\n    template<> struct TypeVec<schar, 4> { typedef char4 vec_type; };\n    template<> struct TypeVec<schar, 8> { typedef char8 vec_type; };\n\n    template<> struct TypeVec<bool, 1> { typedef uchar vec_type; };\n    template<> struct TypeVec<bool, 2> { typedef uchar2 vec_type; };\n    template<> struct TypeVec<bool, 3> { typedef uchar3 vec_type; };\n    template<> struct TypeVec<bool, 4> { typedef uchar4 vec_type; };\n    template<> struct TypeVec<bool, 8> { typedef uchar8 vec_type; };\n\n    template<typename T> struct VecTraits;\n\n#define OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(type) \\\n    template<> struct VecTraits<type> \\\n    { \\\n        typedef type elem_type; \\\n        enum {cn=1}; \\\n        static __device__ __host__ __forceinline__ type all(type v) {return v;} \\\n        static __device__ __host__ __forceinline__ type make(type x) {return x;} \\\n        static __device__ __host__ __forceinline__ type make(const type* v) {return *v;} \\\n    }; \\\n    template<> struct VecTraits<type ## 1> \\\n    { \\\n        typedef type elem_type; \\\n        enum {cn=1}; \\\n        static __device__ __host__ __forceinline__ type ## 1 all(type v) {return make_ ## type ## 1(v);} \\\n        static __device__ __host__ __forceinline__ type ## 1 make(type x) {return make_ ## type ## 1(x);} \\\n        static __device__ __host__ __forceinline__ type ## 1 make(const type* v) {return make_ ## type ## 1(*v);} \\\n    }; \\\n    template<> struct VecTraits<type ## 2> \\\n    { \\\n        typedef type elem_type; \\\n        enum {cn=2}; \\\n        static __device__ __host__ __forceinline__ type ## 2 all(type v) {return make_ ## type ## 2(v, v);} \\\n        static __device__ __host__ __forceinline__ type ## 2 make(type x, type y) {return make_ ## type ## 2(x, y);} \\\n        static __device__ __host__ __forceinline__ type ## 2 make(const type* v) {return make_ ## type ## 2(v[0], v[1]);} \\\n    }; \\\n    template<> struct VecTraits<type ## 3> \\\n    { \\\n        typedef type elem_type; \\\n        enum {cn=3}; \\\n        static __device__ __host__ __forceinline__ type ## 3 all(type v) {return make_ ## type ## 3(v, v, v);} \\\n        static __device__ __host__ __forceinline__ type ## 3 make(type x, type y, type z) {return make_ ## type ## 3(x, y, z);} \\\n        static __device__ __host__ __forceinline__ type ## 3 make(const type* v) {return make_ ## type ## 3(v[0], v[1], v[2]);} \\\n    }; \\\n    template<> struct VecTraits<type ## 4> \\\n    { \\\n        typedef type elem_type; \\\n        enum {cn=4}; \\\n        static __device__ __host__ __forceinline__ type ## 4 all(type v) {return make_ ## type ## 4(v, v, v, v);} \\\n        static __device__ __host__ __forceinline__ type ## 4 make(type x, type y, type z, type w) {return make_ ## type ## 4(x, y, z, w);} \\\n        static __device__ __host__ __forceinline__ type ## 4 make(const type* v) {return make_ ## type ## 4(v[0], v[1], v[2], v[3]);} \\\n    }; \\\n    template<> struct VecTraits<type ## 8> \\\n    { \\\n        typedef type elem_type; \\\n        enum {cn=8}; \\\n        static __device__ __host__ __forceinline__ type ## 8 all(type v) {return make_ ## type ## 8(v, v, v, v, v, v, v, v);} \\\n        static __device__ __host__ __forceinline__ type ## 8 make(type a0, type a1, type a2, type a3, type a4, type a5, type a6, type a7) {return make_ ## type ## 8(a0, a1, a2, a3, a4, a5, a6, a7);} \\\n        static __device__ __host__ __forceinline__ type ## 8 make(const type* v) {return make_ ## type ## 8(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);} \\\n    };\n\n    OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(uchar)\n    OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(ushort)\n    OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(short)\n    OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(int)\n    OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(uint)\n    OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(float)\n    OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(double)\n\n    #undef OPENCV_CUDA_IMPLEMENT_VEC_TRAITS\n\n    template<> struct VecTraits<char>\n    {\n        typedef char elem_type;\n        enum {cn=1};\n        static __device__ __host__ __forceinline__ char all(char v) {return v;}\n        static __device__ __host__ __forceinline__ char make(char x) {return x;}\n        static __device__ __host__ __forceinline__ char make(const char* x) {return *x;}\n    };\n    template<> struct VecTraits<schar>\n    {\n        typedef schar elem_type;\n        enum {cn=1};\n        static __device__ __host__ __forceinline__ schar all(schar v) {return v;}\n        static __device__ __host__ __forceinline__ schar make(schar x) {return x;}\n        static __device__ __host__ __forceinline__ schar make(const schar* x) {return *x;}\n    };\n    template<> struct VecTraits<char1>\n    {\n        typedef schar elem_type;\n        enum {cn=1};\n        static __device__ __host__ __forceinline__ char1 all(schar v) {return make_char1(v);}\n        static __device__ __host__ __forceinline__ char1 make(schar x) {return make_char1(x);}\n        static __device__ __host__ __forceinline__ char1 make(const schar* v) {return make_char1(v[0]);}\n    };\n    template<> struct VecTraits<char2>\n    {\n        typedef schar elem_type;\n        enum {cn=2};\n        static __device__ __host__ __forceinline__ char2 all(schar v) {return make_char2(v, v);}\n        static __device__ __host__ __forceinline__ char2 make(schar x, schar y) {return make_char2(x, y);}\n        static __device__ __host__ __forceinline__ char2 make(const schar* v) {return make_char2(v[0], v[1]);}\n    };\n    template<> struct VecTraits<char3>\n    {\n        typedef schar elem_type;\n        enum {cn=3};\n        static __device__ __host__ __forceinline__ char3 all(schar v) {return make_char3(v, v, v);}\n        static __device__ __host__ __forceinline__ char3 make(schar x, schar y, schar z) {return make_char3(x, y, z);}\n        static __device__ __host__ __forceinline__ char3 make(const schar* v) {return make_char3(v[0], v[1], v[2]);}\n    };\n    template<> struct VecTraits<char4>\n    {\n        typedef schar elem_type;\n        enum {cn=4};\n        static __device__ __host__ __forceinline__ char4 all(schar v) {return make_char4(v, v, v, v);}\n        static __device__ __host__ __forceinline__ char4 make(schar x, schar y, schar z, schar w) {return make_char4(x, y, z, w);}\n        static __device__ __host__ __forceinline__ char4 make(const schar* v) {return make_char4(v[0], v[1], v[2], v[3]);}\n    };\n    template<> struct VecTraits<char8>\n    {\n        typedef schar elem_type;\n        enum {cn=8};\n        static __device__ __host__ __forceinline__ char8 all(schar v) {return make_char8(v, v, v, v, v, v, v, v);}\n        static __device__ __host__ __forceinline__ char8 make(schar a0, schar a1, schar a2, schar a3, schar a4, schar a5, schar a6, schar a7) {return make_char8(a0, a1, a2, a3, a4, a5, a6, a7);}\n        static __device__ __host__ __forceinline__ char8 make(const schar* v) {return make_char8(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);}\n    };\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_VEC_TRAITS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/warp.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_DEVICE_WARP_HPP__\n#define __OPENCV_CUDA_DEVICE_WARP_HPP__\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    struct Warp\n    {\n        enum\n        {\n            LOG_WARP_SIZE = 5,\n            WARP_SIZE     = 1 << LOG_WARP_SIZE,\n            STRIDE        = WARP_SIZE\n        };\n\n        /** \\brief Returns the warp lane ID of the calling thread. */\n        static __device__ __forceinline__ unsigned int laneId()\n        {\n            unsigned int ret;\n            asm(\"mov.u32 %0, %laneid;\" : \"=r\"(ret) );\n            return ret;\n        }\n\n        template<typename It, typename T>\n        static __device__ __forceinline__ void fill(It beg, It end, const T& value)\n        {\n            for(It t = beg + laneId(); t < end; t += STRIDE)\n                *t = value;\n        }\n\n        template<typename InIt, typename OutIt>\n        static __device__ __forceinline__ OutIt copy(InIt beg, InIt end, OutIt out)\n        {\n            for(InIt t = beg + laneId(); t < end; t += STRIDE, out += STRIDE)\n                *out = *t;\n            return out;\n        }\n\n        template<typename InIt, typename OutIt, class UnOp>\n        static __device__ __forceinline__ OutIt transform(InIt beg, InIt end, OutIt out, UnOp op)\n        {\n            for(InIt t = beg + laneId(); t < end; t += STRIDE, out += STRIDE)\n                *out = op(*t);\n            return out;\n        }\n\n        template<typename InIt1, typename InIt2, typename OutIt, class BinOp>\n        static __device__ __forceinline__ OutIt transform(InIt1 beg1, InIt1 end1, InIt2 beg2, OutIt out, BinOp op)\n        {\n            unsigned int lane = laneId();\n\n            InIt1 t1 = beg1 + lane;\n            InIt2 t2 = beg2 + lane;\n            for(; t1 < end1; t1 += STRIDE, t2 += STRIDE, out += STRIDE)\n                *out = op(*t1, *t2);\n            return out;\n        }\n\n        template <class T, class BinOp>\n        static __device__ __forceinline__ T reduce(volatile T *ptr, BinOp op)\n        {\n            const unsigned int lane = laneId();\n\n            if (lane < 16)\n            {\n                T partial = ptr[lane];\n\n                ptr[lane] = partial = op(partial, ptr[lane + 16]);\n                ptr[lane] = partial = op(partial, ptr[lane + 8]);\n                ptr[lane] = partial = op(partial, ptr[lane + 4]);\n                ptr[lane] = partial = op(partial, ptr[lane + 2]);\n                ptr[lane] = partial = op(partial, ptr[lane + 1]);\n            }\n\n            return *ptr;\n        }\n\n        template<typename OutIt, typename T>\n        static __device__ __forceinline__ void yota(OutIt beg, OutIt end, T value)\n        {\n            unsigned int lane = laneId();\n            value += lane;\n\n            for(OutIt t = beg + lane; t < end; t += STRIDE, value += STRIDE)\n                *t = value;\n        }\n    };\n}}} // namespace cv { namespace cuda { namespace cudev\n\n//! @endcond\n\n#endif /* __OPENCV_CUDA_DEVICE_WARP_HPP__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/warp_reduce.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef OPENCV_CUDA_WARP_REDUCE_HPP__\n#define OPENCV_CUDA_WARP_REDUCE_HPP__\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    template <class T>\n    __device__ __forceinline__ T warp_reduce(volatile T *ptr , const unsigned int tid = threadIdx.x)\n    {\n        const unsigned int lane = tid & 31; // index of thread in warp (0..31)\n\n        if (lane < 16)\n        {\n            T partial = ptr[tid];\n\n            ptr[tid] = partial = partial + ptr[tid + 16];\n            ptr[tid] = partial = partial + ptr[tid + 8];\n            ptr[tid] = partial = partial + ptr[tid + 4];\n            ptr[tid] = partial = partial + ptr[tid + 2];\n            ptr[tid] = partial = partial + ptr[tid + 1];\n        }\n\n        return ptr[tid - lane];\n    }\n}}} // namespace cv { namespace cuda { namespace cudev {\n\n//! @endcond\n\n#endif /* OPENCV_CUDA_WARP_REDUCE_HPP__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda/warp_shuffle.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CUDA_WARP_SHUFFLE_HPP__\n#define __OPENCV_CUDA_WARP_SHUFFLE_HPP__\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda { namespace device\n{\n    template <typename T>\n    __device__ __forceinline__ T shfl(T val, int srcLane, int width = warpSize)\n    {\n    #if __CUDA_ARCH__ >= 300\n        return __shfl(val, srcLane, width);\n    #else\n        return T();\n    #endif\n    }\n    __device__ __forceinline__ unsigned int shfl(unsigned int val, int srcLane, int width = warpSize)\n    {\n    #if __CUDA_ARCH__ >= 300\n        return (unsigned int) __shfl((int) val, srcLane, width);\n    #else\n        return 0;\n    #endif\n    }\n    __device__ __forceinline__ double shfl(double val, int srcLane, int width = warpSize)\n    {\n    #if __CUDA_ARCH__ >= 300\n        int lo = __double2loint(val);\n        int hi = __double2hiint(val);\n\n        lo = __shfl(lo, srcLane, width);\n        hi = __shfl(hi, srcLane, width);\n\n        return __hiloint2double(hi, lo);\n    #else\n        return 0.0;\n    #endif\n    }\n\n    template <typename T>\n    __device__ __forceinline__ T shfl_down(T val, unsigned int delta, int width = warpSize)\n    {\n    #if __CUDA_ARCH__ >= 300\n        return __shfl_down(val, delta, width);\n    #else\n        return T();\n    #endif\n    }\n    __device__ __forceinline__ unsigned int shfl_down(unsigned int val, unsigned int delta, int width = warpSize)\n    {\n    #if __CUDA_ARCH__ >= 300\n        return (unsigned int) __shfl_down((int) val, delta, width);\n    #else\n        return 0;\n    #endif\n    }\n    __device__ __forceinline__ double shfl_down(double val, unsigned int delta, int width = warpSize)\n    {\n    #if __CUDA_ARCH__ >= 300\n        int lo = __double2loint(val);\n        int hi = __double2hiint(val);\n\n        lo = __shfl_down(lo, delta, width);\n        hi = __shfl_down(hi, delta, width);\n\n        return __hiloint2double(hi, lo);\n    #else\n        return 0.0;\n    #endif\n    }\n\n    template <typename T>\n    __device__ __forceinline__ T shfl_up(T val, unsigned int delta, int width = warpSize)\n    {\n    #if __CUDA_ARCH__ >= 300\n        return __shfl_up(val, delta, width);\n    #else\n        return T();\n    #endif\n    }\n    __device__ __forceinline__ unsigned int shfl_up(unsigned int val, unsigned int delta, int width = warpSize)\n    {\n    #if __CUDA_ARCH__ >= 300\n        return (unsigned int) __shfl_up((int) val, delta, width);\n    #else\n        return 0;\n    #endif\n    }\n    __device__ __forceinline__ double shfl_up(double val, unsigned int delta, int width = warpSize)\n    {\n    #if __CUDA_ARCH__ >= 300\n        int lo = __double2loint(val);\n        int hi = __double2hiint(val);\n\n        lo = __shfl_up(lo, delta, width);\n        hi = __shfl_up(hi, delta, width);\n\n        return __hiloint2double(hi, lo);\n    #else\n        return 0.0;\n    #endif\n    }\n}}}\n\n//! @endcond\n\n#endif // __OPENCV_CUDA_WARP_SHUFFLE_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_CUDA_HPP__\n#define __OPENCV_CORE_CUDA_HPP__\n\n#ifndef __cplusplus\n#  error cuda.hpp header must be compiled as C++\n#endif\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/core/cuda_types.hpp\"\n\n/**\n  @defgroup cuda CUDA-accelerated Computer Vision\n  @{\n    @defgroup cudacore Core part\n    @{\n      @defgroup cudacore_init Initalization and Information\n      @defgroup cudacore_struct Data Structures\n    @}\n  @}\n */\n\nnamespace cv { namespace cuda {\n\n//! @addtogroup cudacore_struct\n//! @{\n\n//===================================================================================\n// GpuMat\n//===================================================================================\n\n/** @brief Base storage class for GPU memory with reference counting.\n\nIts interface matches the Mat interface with the following limitations:\n\n-   no arbitrary dimensions support (only 2D)\n-   no functions that return references to their data (because references on GPU are not valid for\n    CPU)\n-   no expression templates technique support\n\nBeware that the latter limitation may lead to overloaded matrix operators that cause memory\nallocations. The GpuMat class is convertible to cuda::PtrStepSz and cuda::PtrStep so it can be\npassed directly to the kernel.\n\n@note In contrast with Mat, in most cases GpuMat::isContinuous() == false . This means that rows are\naligned to a size depending on the hardware. Single-row GpuMat is always a continuous matrix.\n\n@note You are not recommended to leave static or global GpuMat variables allocated, that is, to rely\non its destructor. The destruction order of such variables and CUDA context is undefined. GPU memory\nrelease function returns error if the CUDA context has been destroyed before.\n\n@sa Mat\n */\nclass CV_EXPORTS GpuMat\n{\npublic:\n    class CV_EXPORTS Allocator\n    {\n    public:\n        virtual ~Allocator() {}\n\n        // allocator must fill data, step and refcount fields\n        virtual bool allocate(GpuMat* mat, int rows, int cols, size_t elemSize) = 0;\n        virtual void free(GpuMat* mat) = 0;\n    };\n\n    //! default allocator\n    static Allocator* defaultAllocator();\n    static void setDefaultAllocator(Allocator* allocator);\n\n    //! default constructor\n    explicit GpuMat(Allocator* allocator = defaultAllocator());\n\n    //! constructs GpuMat of the specified size and type\n    GpuMat(int rows, int cols, int type, Allocator* allocator = defaultAllocator());\n    GpuMat(Size size, int type, Allocator* allocator = defaultAllocator());\n\n    //! constucts GpuMat and fills it with the specified value _s\n    GpuMat(int rows, int cols, int type, Scalar s, Allocator* allocator = defaultAllocator());\n    GpuMat(Size size, int type, Scalar s, Allocator* allocator = defaultAllocator());\n\n    //! copy constructor\n    GpuMat(const GpuMat& m);\n\n    //! constructor for GpuMat headers pointing to user-allocated data\n    GpuMat(int rows, int cols, int type, void* data, size_t step = Mat::AUTO_STEP);\n    GpuMat(Size size, int type, void* data, size_t step = Mat::AUTO_STEP);\n\n    //! creates a GpuMat header for a part of the bigger matrix\n    GpuMat(const GpuMat& m, Range rowRange, Range colRange);\n    GpuMat(const GpuMat& m, Rect roi);\n\n    //! builds GpuMat from host memory (Blocking call)\n    explicit GpuMat(InputArray arr, Allocator* allocator = defaultAllocator());\n\n    //! destructor - calls release()\n    ~GpuMat();\n\n    //! assignment operators\n    GpuMat& operator =(const GpuMat& m);\n\n    //! allocates new GpuMat data unless the GpuMat already has specified size and type\n    void create(int rows, int cols, int type);\n    void create(Size size, int type);\n\n    //! decreases reference counter, deallocate the data when reference counter reaches 0\n    void release();\n\n    //! swaps with other smart pointer\n    void swap(GpuMat& mat);\n\n    //! pefroms upload data to GpuMat (Blocking call)\n    void upload(InputArray arr);\n\n    //! pefroms upload data to GpuMat (Non-Blocking call)\n    void upload(InputArray arr, Stream& stream);\n\n    //! pefroms download data from device to host memory (Blocking call)\n    void download(OutputArray dst) const;\n\n    //! pefroms download data from device to host memory (Non-Blocking call)\n    void download(OutputArray dst, Stream& stream) const;\n\n    //! returns deep copy of the GpuMat, i.e. the data is copied\n    GpuMat clone() const;\n\n    //! copies the GpuMat content to device memory (Blocking call)\n    void copyTo(OutputArray dst) const;\n\n    //! copies the GpuMat content to device memory (Non-Blocking call)\n    void copyTo(OutputArray dst, Stream& stream) const;\n\n    //! copies those GpuMat elements to \"m\" that are marked with non-zero mask elements (Blocking call)\n    void copyTo(OutputArray dst, InputArray mask) const;\n\n    //! copies those GpuMat elements to \"m\" that are marked with non-zero mask elements (Non-Blocking call)\n    void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;\n\n    //! sets some of the GpuMat elements to s (Blocking call)\n    GpuMat& setTo(Scalar s);\n\n    //! sets some of the GpuMat elements to s (Non-Blocking call)\n    GpuMat& setTo(Scalar s, Stream& stream);\n\n    //! sets some of the GpuMat elements to s, according to the mask (Blocking call)\n    GpuMat& setTo(Scalar s, InputArray mask);\n\n    //! sets some of the GpuMat elements to s, according to the mask (Non-Blocking call)\n    GpuMat& setTo(Scalar s, InputArray mask, Stream& stream);\n\n    //! converts GpuMat to another datatype (Blocking call)\n    void convertTo(OutputArray dst, int rtype) const;\n\n    //! converts GpuMat to another datatype (Non-Blocking call)\n    void convertTo(OutputArray dst, int rtype, Stream& stream) const;\n\n    //! converts GpuMat to another datatype with scaling (Blocking call)\n    void convertTo(OutputArray dst, int rtype, double alpha, double beta = 0.0) const;\n\n    //! converts GpuMat to another datatype with scaling (Non-Blocking call)\n    void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;\n\n    //! converts GpuMat to another datatype with scaling (Non-Blocking call)\n    void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;\n\n    void assignTo(GpuMat& m, int type=-1) const;\n\n    //! returns pointer to y-th row\n    uchar* ptr(int y = 0);\n    const uchar* ptr(int y = 0) const;\n\n    //! template version of the above method\n    template<typename _Tp> _Tp* ptr(int y = 0);\n    template<typename _Tp> const _Tp* ptr(int y = 0) const;\n\n    template <typename _Tp> operator PtrStepSz<_Tp>() const;\n    template <typename _Tp> operator PtrStep<_Tp>() const;\n\n    //! returns a new GpuMat header for the specified row\n    GpuMat row(int y) const;\n\n    //! returns a new GpuMat header for the specified column\n    GpuMat col(int x) const;\n\n    //! ... for the specified row span\n    GpuMat rowRange(int startrow, int endrow) const;\n    GpuMat rowRange(Range r) const;\n\n    //! ... for the specified column span\n    GpuMat colRange(int startcol, int endcol) const;\n    GpuMat colRange(Range r) const;\n\n    //! extracts a rectangular sub-GpuMat (this is a generalized form of row, rowRange etc.)\n    GpuMat operator ()(Range rowRange, Range colRange) const;\n    GpuMat operator ()(Rect roi) const;\n\n    //! creates alternative GpuMat header for the same data, with different\n    //! number of channels and/or different number of rows\n    GpuMat reshape(int cn, int rows = 0) const;\n\n    //! locates GpuMat header within a parent GpuMat\n    void locateROI(Size& wholeSize, Point& ofs) const;\n\n    //! moves/resizes the current GpuMat ROI inside the parent GpuMat\n    GpuMat& adjustROI(int dtop, int dbottom, int dleft, int dright);\n\n    //! returns true iff the GpuMat data is continuous\n    //! (i.e. when there are no gaps between successive rows)\n    bool isContinuous() const;\n\n    //! returns element size in bytes\n    size_t elemSize() const;\n\n    //! returns the size of element channel in bytes\n    size_t elemSize1() const;\n\n    //! returns element type\n    int type() const;\n\n    //! returns element type\n    int depth() const;\n\n    //! returns number of channels\n    int channels() const;\n\n    //! returns step/elemSize1()\n    size_t step1() const;\n\n    //! returns GpuMat size : width == number of columns, height == number of rows\n    Size size() const;\n\n    //! returns true if GpuMat data is NULL\n    bool empty() const;\n\n    /*! includes several bit-fields:\n    - the magic signature\n    - continuity flag\n    - depth\n    - number of channels\n    */\n    int flags;\n\n    //! the number of rows and columns\n    int rows, cols;\n\n    //! a distance between successive rows in bytes; includes the gap if any\n    size_t step;\n\n    //! pointer to the data\n    uchar* data;\n\n    //! pointer to the reference counter;\n    //! when GpuMat points to user-allocated data, the pointer is NULL\n    int* refcount;\n\n    //! helper fields used in locateROI and adjustROI\n    uchar* datastart;\n    const uchar* dataend;\n\n    //! allocator\n    Allocator* allocator;\n};\n\n/** @brief Creates a continuous matrix.\n\n@param rows Row count.\n@param cols Column count.\n@param type Type of the matrix.\n@param arr Destination matrix. This parameter changes only if it has a proper type and area (\n\\f$\\texttt{rows} \\times \\texttt{cols}\\f$ ).\n\nMatrix is called continuous if its elements are stored continuously, that is, without gaps at the\nend of each row.\n */\nCV_EXPORTS void createContinuous(int rows, int cols, int type, OutputArray arr);\n\n/** @brief Ensures that the size of a matrix is big enough and the matrix has a proper type.\n\n@param rows Minimum desired number of rows.\n@param cols Minimum desired number of columns.\n@param type Desired matrix type.\n@param arr Destination matrix.\n\nThe function does not reallocate memory if the matrix has proper attributes already.\n */\nCV_EXPORTS void ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr);\n\n//! BufferPool management (must be called before Stream creation)\nCV_EXPORTS void setBufferPoolUsage(bool on);\nCV_EXPORTS void setBufferPoolConfig(int deviceId, size_t stackSize, int stackCount);\n\n//===================================================================================\n// HostMem\n//===================================================================================\n\n/** @brief Class with reference counting wrapping special memory type allocation functions from CUDA.\n\nIts interface is also Mat-like but with additional memory type parameters.\n\n-   **PAGE_LOCKED** sets a page locked memory type used commonly for fast and asynchronous\n    uploading/downloading data from/to GPU.\n-   **SHARED** specifies a zero copy memory allocation that enables mapping the host memory to GPU\n    address space, if supported.\n-   **WRITE_COMBINED** sets the write combined buffer that is not cached by CPU. Such buffers are\n    used to supply GPU with data when GPU only reads it. The advantage is a better CPU cache\n    utilization.\n\n@note Allocation size of such memory types is usually limited. For more details, see *CUDA 2.2\nPinned Memory APIs* document or *CUDA C Programming Guide*.\n */\nclass CV_EXPORTS HostMem\n{\npublic:\n    enum AllocType { PAGE_LOCKED = 1, SHARED = 2, WRITE_COMBINED = 4 };\n\n    static MatAllocator* getAllocator(AllocType alloc_type = PAGE_LOCKED);\n\n    explicit HostMem(AllocType alloc_type = PAGE_LOCKED);\n\n    HostMem(const HostMem& m);\n\n    HostMem(int rows, int cols, int type, AllocType alloc_type = PAGE_LOCKED);\n    HostMem(Size size, int type, AllocType alloc_type = PAGE_LOCKED);\n\n    //! creates from host memory with coping data\n    explicit HostMem(InputArray arr, AllocType alloc_type = PAGE_LOCKED);\n\n    ~HostMem();\n\n    HostMem& operator =(const HostMem& m);\n\n    //! swaps with other smart pointer\n    void swap(HostMem& b);\n\n    //! returns deep copy of the matrix, i.e. the data is copied\n    HostMem clone() const;\n\n    //! allocates new matrix data unless the matrix already has specified size and type.\n    void create(int rows, int cols, int type);\n    void create(Size size, int type);\n\n    //! creates alternative HostMem header for the same data, with different\n    //! number of channels and/or different number of rows\n    HostMem reshape(int cn, int rows = 0) const;\n\n    //! decrements reference counter and released memory if needed.\n    void release();\n\n    //! returns matrix header with disabled reference counting for HostMem data.\n    Mat createMatHeader() const;\n\n    /** @brief Maps CPU memory to GPU address space and creates the cuda::GpuMat header without reference counting\n    for it.\n\n    This can be done only if memory was allocated with the SHARED flag and if it is supported by the\n    hardware. Laptops often share video and CPU memory, so address spaces can be mapped, which\n    eliminates an extra copy.\n     */\n    GpuMat createGpuMatHeader() const;\n\n    // Please see cv::Mat for descriptions\n    bool isContinuous() const;\n    size_t elemSize() const;\n    size_t elemSize1() const;\n    int type() const;\n    int depth() const;\n    int channels() const;\n    size_t step1() const;\n    Size size() const;\n    bool empty() const;\n\n    // Please see cv::Mat for descriptions\n    int flags;\n    int rows, cols;\n    size_t step;\n\n    uchar* data;\n    int* refcount;\n\n    uchar* datastart;\n    const uchar* dataend;\n\n    AllocType alloc_type;\n};\n\n/** @brief Page-locks the memory of matrix and maps it for the device(s).\n\n@param m Input matrix.\n */\nCV_EXPORTS void registerPageLocked(Mat& m);\n\n/** @brief Unmaps the memory of matrix and makes it pageable again.\n\n@param m Input matrix.\n */\nCV_EXPORTS void unregisterPageLocked(Mat& m);\n\n//===================================================================================\n// Stream\n//===================================================================================\n\n/** @brief This class encapsulates a queue of asynchronous calls.\n\n@note Currently, you may face problems if an operation is enqueued twice with different data. Some\nfunctions use the constant GPU memory, and next call may update the memory before the previous one\nhas been finished. But calling different operations asynchronously is safe because each operation\nhas its own constant buffer. Memory copy/upload/download/set operations to the buffers you hold are\nalso safe. :\n */\nclass CV_EXPORTS Stream\n{\n    typedef void (Stream::*bool_type)() const;\n    void this_type_does_not_support_comparisons() const {}\n\npublic:\n    typedef void (*StreamCallback)(int status, void* userData);\n\n    //! creates a new asynchronous stream\n    Stream();\n\n    /** @brief Returns true if the current stream queue is finished. Otherwise, it returns false.\n    */\n    bool queryIfComplete() const;\n\n    /** @brief Blocks the current CPU thread until all operations in the stream are complete.\n    */\n    void waitForCompletion();\n\n    /** @brief Makes a compute stream wait on an event.\n    */\n    void waitEvent(const Event& event);\n\n    /** @brief Adds a callback to be called on the host after all currently enqueued items in the stream have\n    completed.\n\n    @note Callbacks must not make any CUDA API calls. Callbacks must not perform any synchronization\n    that may depend on outstanding device work or other callbacks that are not mandated to run earlier.\n    Callbacks without a mandated order (in independent streams) execute in undefined order and may be\n    serialized.\n     */\n    void enqueueHostCallback(StreamCallback callback, void* userData);\n\n    //! return Stream object for default CUDA stream\n    static Stream& Null();\n\n    //! returns true if stream object is not default (!= 0)\n    operator bool_type() const;\n\n    class Impl;\n\nprivate:\n    Ptr<Impl> impl_;\n    Stream(const Ptr<Impl>& impl);\n\n    friend struct StreamAccessor;\n    friend class BufferPool;\n    friend class DefaultDeviceInitializer;\n};\n\nclass CV_EXPORTS Event\n{\npublic:\n    enum CreateFlags\n    {\n        DEFAULT        = 0x00,  /**< Default event flag */\n        BLOCKING_SYNC  = 0x01,  /**< Event uses blocking synchronization */\n        DISABLE_TIMING = 0x02,  /**< Event will not record timing data */\n        INTERPROCESS   = 0x04   /**< Event is suitable for interprocess use. DisableTiming must be set */\n    };\n\n    explicit Event(CreateFlags flags = DEFAULT);\n\n    //! records an event\n    void record(Stream& stream = Stream::Null());\n\n    //! queries an event's status\n    bool queryIfComplete() const;\n\n    //! waits for an event to complete\n    void waitForCompletion();\n\n    //! computes the elapsed time between events\n    static float elapsedTime(const Event& start, const Event& end);\n\n    class Impl;\n\nprivate:\n    Ptr<Impl> impl_;\n\n    friend struct EventAccessor;\n};\n\n//! @} cudacore_struct\n\n//===================================================================================\n// Initialization & Info\n//===================================================================================\n\n//! @addtogroup cudacore_init\n//! @{\n\n/** @brief Returns the number of installed CUDA-enabled devices.\n\nUse this function before any other CUDA functions calls. If OpenCV is compiled without CUDA support,\nthis function returns 0.\n */\nCV_EXPORTS int getCudaEnabledDeviceCount();\n\n/** @brief Sets a device and initializes it for the current thread.\n\n@param device System index of a CUDA device starting with 0.\n\nIf the call of this function is omitted, a default device is initialized at the fist CUDA usage.\n */\nCV_EXPORTS void setDevice(int device);\n\n/** @brief Returns the current device index set by cuda::setDevice or initialized by default.\n */\nCV_EXPORTS int getDevice();\n\n/** @brief Explicitly destroys and cleans up all resources associated with the current device in the current\nprocess.\n\nAny subsequent API call to this device will reinitialize the device.\n */\nCV_EXPORTS void resetDevice();\n\n/** @brief Enumeration providing CUDA computing features.\n */\nenum FeatureSet\n{\n    FEATURE_SET_COMPUTE_10 = 10,\n    FEATURE_SET_COMPUTE_11 = 11,\n    FEATURE_SET_COMPUTE_12 = 12,\n    FEATURE_SET_COMPUTE_13 = 13,\n    FEATURE_SET_COMPUTE_20 = 20,\n    FEATURE_SET_COMPUTE_21 = 21,\n    FEATURE_SET_COMPUTE_30 = 30,\n    FEATURE_SET_COMPUTE_32 = 32,\n    FEATURE_SET_COMPUTE_35 = 35,\n    FEATURE_SET_COMPUTE_50 = 50,\n\n    GLOBAL_ATOMICS = FEATURE_SET_COMPUTE_11,\n    SHARED_ATOMICS = FEATURE_SET_COMPUTE_12,\n    NATIVE_DOUBLE = FEATURE_SET_COMPUTE_13,\n    WARP_SHUFFLE_FUNCTIONS = FEATURE_SET_COMPUTE_30,\n    DYNAMIC_PARALLELISM = FEATURE_SET_COMPUTE_35\n};\n\n//! checks whether current device supports the given feature\nCV_EXPORTS bool deviceSupports(FeatureSet feature_set);\n\n/** @brief Class providing a set of static methods to check what NVIDIA\\* card architecture the CUDA module was\nbuilt for.\n\nAccording to the CUDA C Programming Guide Version 3.2: \"PTX code produced for some specific compute\ncapability can always be compiled to binary code of greater or equal compute capability\".\n */\nclass CV_EXPORTS TargetArchs\n{\npublic:\n    /** @brief The following method checks whether the module was built with the support of the given feature:\n\n    @param feature_set Features to be checked. See :ocvcuda::FeatureSet.\n     */\n    static bool builtWith(FeatureSet feature_set);\n\n    /** @brief There is a set of methods to check whether the module contains intermediate (PTX) or binary CUDA\n    code for the given architecture(s):\n\n    @param major Major compute capability version.\n    @param minor Minor compute capability version.\n     */\n    static bool has(int major, int minor);\n    static bool hasPtx(int major, int minor);\n    static bool hasBin(int major, int minor);\n\n    static bool hasEqualOrLessPtx(int major, int minor);\n    static bool hasEqualOrGreater(int major, int minor);\n    static bool hasEqualOrGreaterPtx(int major, int minor);\n    static bool hasEqualOrGreaterBin(int major, int minor);\n};\n\n/** @brief Class providing functionality for querying the specified GPU properties.\n */\nclass CV_EXPORTS DeviceInfo\n{\npublic:\n    //! creates DeviceInfo object for the current GPU\n    DeviceInfo();\n\n    /** @brief The constructors.\n\n    @param device_id System index of the CUDA device starting with 0.\n\n    Constructs the DeviceInfo object for the specified device. If device_id parameter is missed, it\n    constructs an object for the current device.\n     */\n    DeviceInfo(int device_id);\n\n    /** @brief Returns system index of the CUDA device starting with 0.\n    */\n    int deviceID() const;\n\n    //! ASCII string identifying device\n    const char* name() const;\n\n    //! global memory available on device in bytes\n    size_t totalGlobalMem() const;\n\n    //! shared memory available per block in bytes\n    size_t sharedMemPerBlock() const;\n\n    //! 32-bit registers available per block\n    int regsPerBlock() const;\n\n    //! warp size in threads\n    int warpSize() const;\n\n    //! maximum pitch in bytes allowed by memory copies\n    size_t memPitch() const;\n\n    //! maximum number of threads per block\n    int maxThreadsPerBlock() const;\n\n    //! maximum size of each dimension of a block\n    Vec3i maxThreadsDim() const;\n\n    //! maximum size of each dimension of a grid\n    Vec3i maxGridSize() const;\n\n    //! clock frequency in kilohertz\n    int clockRate() const;\n\n    //! constant memory available on device in bytes\n    size_t totalConstMem() const;\n\n    //! major compute capability\n    int majorVersion() const;\n\n    //! minor compute capability\n    int minorVersion() const;\n\n    //! alignment requirement for textures\n    size_t textureAlignment() const;\n\n    //! pitch alignment requirement for texture references bound to pitched memory\n    size_t texturePitchAlignment() const;\n\n    //! number of multiprocessors on device\n    int multiProcessorCount() const;\n\n    //! specified whether there is a run time limit on kernels\n    bool kernelExecTimeoutEnabled() const;\n\n    //! device is integrated as opposed to discrete\n    bool integrated() const;\n\n    //! device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer\n    bool canMapHostMemory() const;\n\n    enum ComputeMode\n    {\n        ComputeModeDefault,         /**< default compute mode (Multiple threads can use cudaSetDevice with this device) */\n        ComputeModeExclusive,       /**< compute-exclusive-thread mode (Only one thread in one process will be able to use cudaSetDevice with this device) */\n        ComputeModeProhibited,      /**< compute-prohibited mode (No threads can use cudaSetDevice with this device) */\n        ComputeModeExclusiveProcess /**< compute-exclusive-process mode (Many threads in one process will be able to use cudaSetDevice with this device) */\n    };\n\n    //! compute mode\n    ComputeMode computeMode() const;\n\n    //! maximum 1D texture size\n    int maxTexture1D() const;\n\n    //! maximum 1D mipmapped texture size\n    int maxTexture1DMipmap() const;\n\n    //! maximum size for 1D textures bound to linear memory\n    int maxTexture1DLinear() const;\n\n    //! maximum 2D texture dimensions\n    Vec2i maxTexture2D() const;\n\n    //! maximum 2D mipmapped texture dimensions\n    Vec2i maxTexture2DMipmap() const;\n\n    //! maximum dimensions (width, height, pitch) for 2D textures bound to pitched memory\n    Vec3i maxTexture2DLinear() const;\n\n    //! maximum 2D texture dimensions if texture gather operations have to be performed\n    Vec2i maxTexture2DGather() const;\n\n    //! maximum 3D texture dimensions\n    Vec3i maxTexture3D() const;\n\n    //! maximum Cubemap texture dimensions\n    int maxTextureCubemap() const;\n\n    //! maximum 1D layered texture dimensions\n    Vec2i maxTexture1DLayered() const;\n\n    //! maximum 2D layered texture dimensions\n    Vec3i maxTexture2DLayered() const;\n\n    //! maximum Cubemap layered texture dimensions\n    Vec2i maxTextureCubemapLayered() const;\n\n    //! maximum 1D surface size\n    int maxSurface1D() const;\n\n    //! maximum 2D surface dimensions\n    Vec2i maxSurface2D() const;\n\n    //! maximum 3D surface dimensions\n    Vec3i maxSurface3D() const;\n\n    //! maximum 1D layered surface dimensions\n    Vec2i maxSurface1DLayered() const;\n\n    //! maximum 2D layered surface dimensions\n    Vec3i maxSurface2DLayered() const;\n\n    //! maximum Cubemap surface dimensions\n    int maxSurfaceCubemap() const;\n\n    //! maximum Cubemap layered surface dimensions\n    Vec2i maxSurfaceCubemapLayered() const;\n\n    //! alignment requirements for surfaces\n    size_t surfaceAlignment() const;\n\n    //! device can possibly execute multiple kernels concurrently\n    bool concurrentKernels() const;\n\n    //! device has ECC support enabled\n    bool ECCEnabled() const;\n\n    //! PCI bus ID of the device\n    int pciBusID() const;\n\n    //! PCI device ID of the device\n    int pciDeviceID() const;\n\n    //! PCI domain ID of the device\n    int pciDomainID() const;\n\n    //! true if device is a Tesla device using TCC driver, false otherwise\n    bool tccDriver() const;\n\n    //! number of asynchronous engines\n    int asyncEngineCount() const;\n\n    //! device shares a unified address space with the host\n    bool unifiedAddressing() const;\n\n    //! peak memory clock frequency in kilohertz\n    int memoryClockRate() const;\n\n    //! global memory bus width in bits\n    int memoryBusWidth() const;\n\n    //! size of L2 cache in bytes\n    int l2CacheSize() const;\n\n    //! maximum resident threads per multiprocessor\n    int maxThreadsPerMultiProcessor() const;\n\n    //! gets free and total device memory\n    void queryMemory(size_t& totalMemory, size_t& freeMemory) const;\n    size_t freeMemory() const;\n    size_t totalMemory() const;\n\n    /** @brief Provides information on CUDA feature support.\n\n    @param feature_set Features to be checked. See cuda::FeatureSet.\n\n    This function returns true if the device has the specified CUDA feature. Otherwise, it returns false\n     */\n    bool supports(FeatureSet feature_set) const;\n\n    /** @brief Checks the CUDA module and device compatibility.\n\n    This function returns true if the CUDA module can be run on the specified device. Otherwise, it\n    returns false .\n     */\n    bool isCompatible() const;\n\nprivate:\n    int device_id_;\n};\n\nCV_EXPORTS void printCudaDeviceInfo(int device);\nCV_EXPORTS void printShortCudaDeviceInfo(int device);\n\n//! @} cudacore_init\n\n}} // namespace cv { namespace cuda {\n\n\n#include \"opencv2/core/cuda.inl.hpp\"\n\n#endif /* __OPENCV_CORE_CUDA_HPP__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda.inl.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_CUDAINL_HPP__\n#define __OPENCV_CORE_CUDAINL_HPP__\n\n#include \"opencv2/core/cuda.hpp\"\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda {\n\n//===================================================================================\n// GpuMat\n//===================================================================================\n\ninline\nGpuMat::GpuMat(Allocator* allocator_)\n    : flags(0), rows(0), cols(0), step(0), data(0), refcount(0), datastart(0), dataend(0), allocator(allocator_)\n{}\n\ninline\nGpuMat::GpuMat(int rows_, int cols_, int type_, Allocator* allocator_)\n    : flags(0), rows(0), cols(0), step(0), data(0), refcount(0), datastart(0), dataend(0), allocator(allocator_)\n{\n    if (rows_ > 0 && cols_ > 0)\n        create(rows_, cols_, type_);\n}\n\ninline\nGpuMat::GpuMat(Size size_, int type_, Allocator* allocator_)\n    : flags(0), rows(0), cols(0), step(0), data(0), refcount(0), datastart(0), dataend(0), allocator(allocator_)\n{\n    if (size_.height > 0 && size_.width > 0)\n        create(size_.height, size_.width, type_);\n}\n\ninline\nGpuMat::GpuMat(int rows_, int cols_, int type_, Scalar s_, Allocator* allocator_)\n    : flags(0), rows(0), cols(0), step(0), data(0), refcount(0), datastart(0), dataend(0), allocator(allocator_)\n{\n    if (rows_ > 0 && cols_ > 0)\n    {\n        create(rows_, cols_, type_);\n        setTo(s_);\n    }\n}\n\ninline\nGpuMat::GpuMat(Size size_, int type_, Scalar s_, Allocator* allocator_)\n    : flags(0), rows(0), cols(0), step(0), data(0), refcount(0), datastart(0), dataend(0), allocator(allocator_)\n{\n    if (size_.height > 0 && size_.width > 0)\n    {\n        create(size_.height, size_.width, type_);\n        setTo(s_);\n    }\n}\n\ninline\nGpuMat::GpuMat(const GpuMat& m)\n    : flags(m.flags), rows(m.rows), cols(m.cols), step(m.step), data(m.data), refcount(m.refcount), datastart(m.datastart), dataend(m.dataend), allocator(m.allocator)\n{\n    if (refcount)\n        CV_XADD(refcount, 1);\n}\n\ninline\nGpuMat::GpuMat(InputArray arr, Allocator* allocator_) :\n    flags(0), rows(0), cols(0), step(0), data(0), refcount(0), datastart(0), dataend(0), allocator(allocator_)\n{\n    upload(arr);\n}\n\ninline\nGpuMat::~GpuMat()\n{\n    release();\n}\n\ninline\nGpuMat& GpuMat::operator =(const GpuMat& m)\n{\n    if (this != &m)\n    {\n        GpuMat temp(m);\n        swap(temp);\n    }\n\n    return *this;\n}\n\ninline\nvoid GpuMat::create(Size size_, int type_)\n{\n    create(size_.height, size_.width, type_);\n}\n\ninline\nvoid GpuMat::swap(GpuMat& b)\n{\n    std::swap(flags, b.flags);\n    std::swap(rows, b.rows);\n    std::swap(cols, b.cols);\n    std::swap(step, b.step);\n    std::swap(data, b.data);\n    std::swap(datastart, b.datastart);\n    std::swap(dataend, b.dataend);\n    std::swap(refcount, b.refcount);\n    std::swap(allocator, b.allocator);\n}\n\ninline\nGpuMat GpuMat::clone() const\n{\n    GpuMat m;\n    copyTo(m);\n    return m;\n}\n\ninline\nvoid GpuMat::copyTo(OutputArray dst, InputArray mask) const\n{\n    copyTo(dst, mask, Stream::Null());\n}\n\ninline\nGpuMat& GpuMat::setTo(Scalar s)\n{\n    return setTo(s, Stream::Null());\n}\n\ninline\nGpuMat& GpuMat::setTo(Scalar s, InputArray mask)\n{\n    return setTo(s, mask, Stream::Null());\n}\n\ninline\nvoid GpuMat::convertTo(OutputArray dst, int rtype) const\n{\n    convertTo(dst, rtype, Stream::Null());\n}\n\ninline\nvoid GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const\n{\n    convertTo(dst, rtype, alpha, beta, Stream::Null());\n}\n\ninline\nvoid GpuMat::convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const\n{\n    convertTo(dst, rtype, alpha, 0.0, stream);\n}\n\ninline\nvoid GpuMat::assignTo(GpuMat& m, int _type) const\n{\n    if (_type < 0)\n        m = *this;\n    else\n        convertTo(m, _type);\n}\n\ninline\nuchar* GpuMat::ptr(int y)\n{\n    CV_DbgAssert( (unsigned)y < (unsigned)rows );\n    return data + step * y;\n}\n\ninline\nconst uchar* GpuMat::ptr(int y) const\n{\n    CV_DbgAssert( (unsigned)y < (unsigned)rows );\n    return data + step * y;\n}\n\ntemplate<typename _Tp> inline\n_Tp* GpuMat::ptr(int y)\n{\n    return (_Tp*)ptr(y);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp* GpuMat::ptr(int y) const\n{\n    return (const _Tp*)ptr(y);\n}\n\ntemplate <class T> inline\nGpuMat::operator PtrStepSz<T>() const\n{\n    return PtrStepSz<T>(rows, cols, (T*)data, step);\n}\n\ntemplate <class T> inline\nGpuMat::operator PtrStep<T>() const\n{\n    return PtrStep<T>((T*)data, step);\n}\n\ninline\nGpuMat GpuMat::row(int y) const\n{\n    return GpuMat(*this, Range(y, y+1), Range::all());\n}\n\ninline\nGpuMat GpuMat::col(int x) const\n{\n    return GpuMat(*this, Range::all(), Range(x, x+1));\n}\n\ninline\nGpuMat GpuMat::rowRange(int startrow, int endrow) const\n{\n    return GpuMat(*this, Range(startrow, endrow), Range::all());\n}\n\ninline\nGpuMat GpuMat::rowRange(Range r) const\n{\n    return GpuMat(*this, r, Range::all());\n}\n\ninline\nGpuMat GpuMat::colRange(int startcol, int endcol) const\n{\n    return GpuMat(*this, Range::all(), Range(startcol, endcol));\n}\n\ninline\nGpuMat GpuMat::colRange(Range r) const\n{\n    return GpuMat(*this, Range::all(), r);\n}\n\ninline\nGpuMat GpuMat::operator ()(Range rowRange_, Range colRange_) const\n{\n    return GpuMat(*this, rowRange_, colRange_);\n}\n\ninline\nGpuMat GpuMat::operator ()(Rect roi) const\n{\n    return GpuMat(*this, roi);\n}\n\ninline\nbool GpuMat::isContinuous() const\n{\n    return (flags & Mat::CONTINUOUS_FLAG) != 0;\n}\n\ninline\nsize_t GpuMat::elemSize() const\n{\n    return CV_ELEM_SIZE(flags);\n}\n\ninline\nsize_t GpuMat::elemSize1() const\n{\n    return CV_ELEM_SIZE1(flags);\n}\n\ninline\nint GpuMat::type() const\n{\n    return CV_MAT_TYPE(flags);\n}\n\ninline\nint GpuMat::depth() const\n{\n    return CV_MAT_DEPTH(flags);\n}\n\ninline\nint GpuMat::channels() const\n{\n    return CV_MAT_CN(flags);\n}\n\ninline\nsize_t GpuMat::step1() const\n{\n    return step / elemSize1();\n}\n\ninline\nSize GpuMat::size() const\n{\n    return Size(cols, rows);\n}\n\ninline\nbool GpuMat::empty() const\n{\n    return data == 0;\n}\n\nstatic inline\nGpuMat createContinuous(int rows, int cols, int type)\n{\n    GpuMat m;\n    createContinuous(rows, cols, type, m);\n    return m;\n}\n\nstatic inline\nvoid createContinuous(Size size, int type, OutputArray arr)\n{\n    createContinuous(size.height, size.width, type, arr);\n}\n\nstatic inline\nGpuMat createContinuous(Size size, int type)\n{\n    GpuMat m;\n    createContinuous(size, type, m);\n    return m;\n}\n\nstatic inline\nvoid ensureSizeIsEnough(Size size, int type, OutputArray arr)\n{\n    ensureSizeIsEnough(size.height, size.width, type, arr);\n}\n\nstatic inline\nvoid swap(GpuMat& a, GpuMat& b)\n{\n    a.swap(b);\n}\n\n//===================================================================================\n// HostMem\n//===================================================================================\n\ninline\nHostMem::HostMem(AllocType alloc_type_)\n    : flags(0), rows(0), cols(0), step(0), data(0), refcount(0), datastart(0), dataend(0), alloc_type(alloc_type_)\n{\n}\n\ninline\nHostMem::HostMem(const HostMem& m)\n    : flags(m.flags), rows(m.rows), cols(m.cols), step(m.step), data(m.data), refcount(m.refcount), datastart(m.datastart), dataend(m.dataend), alloc_type(m.alloc_type)\n{\n    if( refcount )\n        CV_XADD(refcount, 1);\n}\n\ninline\nHostMem::HostMem(int rows_, int cols_, int type_, AllocType alloc_type_)\n    : flags(0), rows(0), cols(0), step(0), data(0), refcount(0), datastart(0), dataend(0), alloc_type(alloc_type_)\n{\n    if (rows_ > 0 && cols_ > 0)\n        create(rows_, cols_, type_);\n}\n\ninline\nHostMem::HostMem(Size size_, int type_, AllocType alloc_type_)\n    : flags(0), rows(0), cols(0), step(0), data(0), refcount(0), datastart(0), dataend(0), alloc_type(alloc_type_)\n{\n    if (size_.height > 0 && size_.width > 0)\n        create(size_.height, size_.width, type_);\n}\n\ninline\nHostMem::HostMem(InputArray arr, AllocType alloc_type_)\n    : flags(0), rows(0), cols(0), step(0), data(0), refcount(0), datastart(0), dataend(0), alloc_type(alloc_type_)\n{\n    arr.getMat().copyTo(*this);\n}\n\ninline\nHostMem::~HostMem()\n{\n    release();\n}\n\ninline\nHostMem& HostMem::operator =(const HostMem& m)\n{\n    if (this != &m)\n    {\n        HostMem temp(m);\n        swap(temp);\n    }\n\n    return *this;\n}\n\ninline\nvoid HostMem::swap(HostMem& b)\n{\n    std::swap(flags, b.flags);\n    std::swap(rows, b.rows);\n    std::swap(cols, b.cols);\n    std::swap(step, b.step);\n    std::swap(data, b.data);\n    std::swap(datastart, b.datastart);\n    std::swap(dataend, b.dataend);\n    std::swap(refcount, b.refcount);\n    std::swap(alloc_type, b.alloc_type);\n}\n\ninline\nHostMem HostMem::clone() const\n{\n    HostMem m(size(), type(), alloc_type);\n    createMatHeader().copyTo(m);\n    return m;\n}\n\ninline\nvoid HostMem::create(Size size_, int type_)\n{\n    create(size_.height, size_.width, type_);\n}\n\ninline\nMat HostMem::createMatHeader() const\n{\n    return Mat(size(), type(), data, step);\n}\n\ninline\nbool HostMem::isContinuous() const\n{\n    return (flags & Mat::CONTINUOUS_FLAG) != 0;\n}\n\ninline\nsize_t HostMem::elemSize() const\n{\n    return CV_ELEM_SIZE(flags);\n}\n\ninline\nsize_t HostMem::elemSize1() const\n{\n    return CV_ELEM_SIZE1(flags);\n}\n\ninline\nint HostMem::type() const\n{\n    return CV_MAT_TYPE(flags);\n}\n\ninline\nint HostMem::depth() const\n{\n    return CV_MAT_DEPTH(flags);\n}\n\ninline\nint HostMem::channels() const\n{\n    return CV_MAT_CN(flags);\n}\n\ninline\nsize_t HostMem::step1() const\n{\n    return step / elemSize1();\n}\n\ninline\nSize HostMem::size() const\n{\n    return Size(cols, rows);\n}\n\ninline\nbool HostMem::empty() const\n{\n    return data == 0;\n}\n\nstatic inline\nvoid swap(HostMem& a, HostMem& b)\n{\n    a.swap(b);\n}\n\n//===================================================================================\n// Stream\n//===================================================================================\n\ninline\nStream::Stream(const Ptr<Impl>& impl)\n    : impl_(impl)\n{\n}\n\n//===================================================================================\n// Initialization & Info\n//===================================================================================\n\ninline\nbool TargetArchs::has(int major, int minor)\n{\n    return hasPtx(major, minor) || hasBin(major, minor);\n}\n\ninline\nbool TargetArchs::hasEqualOrGreater(int major, int minor)\n{\n    return hasEqualOrGreaterPtx(major, minor) || hasEqualOrGreaterBin(major, minor);\n}\n\ninline\nDeviceInfo::DeviceInfo()\n{\n    device_id_ = getDevice();\n}\n\ninline\nDeviceInfo::DeviceInfo(int device_id)\n{\n    CV_Assert( device_id >= 0 && device_id < getCudaEnabledDeviceCount() );\n    device_id_ = device_id;\n}\n\ninline\nint DeviceInfo::deviceID() const\n{\n    return device_id_;\n}\n\ninline\nsize_t DeviceInfo::freeMemory() const\n{\n    size_t _totalMemory, _freeMemory;\n    queryMemory(_totalMemory, _freeMemory);\n    return _freeMemory;\n}\n\ninline\nsize_t DeviceInfo::totalMemory() const\n{\n    size_t _totalMemory, _freeMemory;\n    queryMemory(_totalMemory, _freeMemory);\n    return _totalMemory;\n}\n\ninline\nbool DeviceInfo::supports(FeatureSet feature_set) const\n{\n    int version = majorVersion() * 10 + minorVersion();\n    return version >= feature_set;\n}\n\n\n}} // namespace cv { namespace cuda {\n\n//===================================================================================\n// Mat\n//===================================================================================\n\nnamespace cv {\n\ninline\nMat::Mat(const cuda::GpuMat& m)\n    : flags(0), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0), datalimit(0), allocator(0), u(0), size(&rows)\n{\n    m.download(*this);\n}\n\n}\n\n//! @endcond\n\n#endif // __OPENCV_CORE_CUDAINL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda_stream_accessor.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP__\n#define __OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP__\n\n#ifndef __cplusplus\n#  error cuda_stream_accessor.hpp header must be compiled as C++\n#endif\n\n/** @file cuda_stream_accessor.hpp\n * This is only header file that depends on CUDA Runtime API. All other headers are independent.\n */\n\n#include <cuda_runtime.h>\n#include \"opencv2/core/cvdef.h\"\n\nnamespace cv\n{\n    namespace cuda\n    {\n\n//! @addtogroup cudacore_struct\n//! @{\n\n        class Stream;\n        class Event;\n\n        /** @brief Class that enables getting cudaStream_t from cuda::Stream\n         */\n        struct StreamAccessor\n        {\n            CV_EXPORTS static cudaStream_t getStream(const Stream& stream);\n        };\n\n        /** @brief Class that enables getting cudaEvent_t from cuda::Event\n         */\n        struct EventAccessor\n        {\n            CV_EXPORTS static cudaEvent_t getEvent(const Event& event);\n        };\n\n//! @}\n\n    }\n}\n\n#endif /* __OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cuda_types.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_CUDA_TYPES_HPP__\n#define __OPENCV_CORE_CUDA_TYPES_HPP__\n\n#ifndef __cplusplus\n#  error cuda_types.hpp header must be compiled as C++\n#endif\n\n/** @file\n * @deprecated Use @ref cudev instead.\n */\n\n//! @cond IGNORED\n\n#ifdef __CUDACC__\n    #define __CV_CUDA_HOST_DEVICE__ __host__ __device__ __forceinline__\n#else\n    #define __CV_CUDA_HOST_DEVICE__\n#endif\n\nnamespace cv\n{\n    namespace cuda\n    {\n\n        // Simple lightweight structures that encapsulates information about an image on device.\n        // It is intended to pass to nvcc-compiled code. GpuMat depends on headers that nvcc can't compile\n\n        template <typename T> struct DevPtr\n        {\n            typedef T elem_type;\n            typedef int index_type;\n\n            enum { elem_size = sizeof(elem_type) };\n\n            T* data;\n\n            __CV_CUDA_HOST_DEVICE__ DevPtr() : data(0) {}\n            __CV_CUDA_HOST_DEVICE__ DevPtr(T* data_) : data(data_) {}\n\n            __CV_CUDA_HOST_DEVICE__ size_t elemSize() const { return elem_size; }\n            __CV_CUDA_HOST_DEVICE__ operator       T*()       { return data; }\n            __CV_CUDA_HOST_DEVICE__ operator const T*() const { return data; }\n        };\n\n        template <typename T> struct PtrSz : public DevPtr<T>\n        {\n            __CV_CUDA_HOST_DEVICE__ PtrSz() : size(0) {}\n            __CV_CUDA_HOST_DEVICE__ PtrSz(T* data_, size_t size_) : DevPtr<T>(data_), size(size_) {}\n\n            size_t size;\n        };\n\n        template <typename T> struct PtrStep : public DevPtr<T>\n        {\n            __CV_CUDA_HOST_DEVICE__ PtrStep() : step(0) {}\n            __CV_CUDA_HOST_DEVICE__ PtrStep(T* data_, size_t step_) : DevPtr<T>(data_), step(step_) {}\n\n            size_t step;\n\n            __CV_CUDA_HOST_DEVICE__       T* ptr(int y = 0)       { return (      T*)( (      char*)DevPtr<T>::data + y * step); }\n            __CV_CUDA_HOST_DEVICE__ const T* ptr(int y = 0) const { return (const T*)( (const char*)DevPtr<T>::data + y * step); }\n\n            __CV_CUDA_HOST_DEVICE__       T& operator ()(int y, int x)       { return ptr(y)[x]; }\n            __CV_CUDA_HOST_DEVICE__ const T& operator ()(int y, int x) const { return ptr(y)[x]; }\n        };\n\n        template <typename T> struct PtrStepSz : public PtrStep<T>\n        {\n            __CV_CUDA_HOST_DEVICE__ PtrStepSz() : cols(0), rows(0) {}\n            __CV_CUDA_HOST_DEVICE__ PtrStepSz(int rows_, int cols_, T* data_, size_t step_)\n                : PtrStep<T>(data_, step_), cols(cols_), rows(rows_) {}\n\n            template <typename U>\n            explicit PtrStepSz(const PtrStepSz<U>& d) : PtrStep<T>((T*)d.data, d.step), cols(d.cols), rows(d.rows){}\n\n            int cols;\n            int rows;\n        };\n\n        typedef PtrStepSz<unsigned char> PtrStepSzb;\n        typedef PtrStepSz<float> PtrStepSzf;\n        typedef PtrStepSz<int> PtrStepSzi;\n\n        typedef PtrStep<unsigned char> PtrStepb;\n        typedef PtrStep<float> PtrStepf;\n        typedef PtrStep<int> PtrStepi;\n\n    }\n}\n\n//! @endcond\n\n#endif /* __OPENCV_CORE_CUDA_TYPES_HPP__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cvdef.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_CVDEF_H__\n#define __OPENCV_CORE_CVDEF_H__\n\n#if !defined _CRT_SECURE_NO_DEPRECATE && defined _MSC_VER && _MSC_VER > 1300\n#  define _CRT_SECURE_NO_DEPRECATE /* to avoid multiple Visual Studio warnings */\n#endif\n\n// undef problematic defines sometimes defined by system headers (windows.h in particular)\n#undef small\n#undef min\n#undef max\n#undef abs\n#undef Complex\n\n#include \"opencv2/hal/defs.h\"\n\n#ifdef __OPENCV_BUILD\n#  define DISABLE_OPENCV_24_COMPATIBILITY\n#endif\n\n#if (defined WIN32 || defined _WIN32 || defined WINCE || defined __CYGWIN__) && defined CVAPI_EXPORTS\n#  define CV_EXPORTS __declspec(dllexport)\n#elif defined __GNUC__ && __GNUC__ >= 4\n#  define CV_EXPORTS __attribute__ ((visibility (\"default\")))\n#else\n#  define CV_EXPORTS\n#endif\n\n#ifndef CV_EXTERN_C\n#  ifdef __cplusplus\n#    define CV_EXTERN_C extern \"C\"\n#  else\n#    define CV_EXTERN_C\n#  endif\n#endif\n\n/* special informative macros for wrapper generators */\n#define CV_EXPORTS_W CV_EXPORTS\n#define CV_EXPORTS_W_SIMPLE CV_EXPORTS\n#define CV_EXPORTS_AS(synonym) CV_EXPORTS\n#define CV_EXPORTS_W_MAP CV_EXPORTS\n#define CV_IN_OUT\n#define CV_OUT\n#define CV_PROP\n#define CV_PROP_RW\n#define CV_WRAP\n#define CV_WRAP_AS(synonym)\n\n/****************************************************************************************\\\n*                                  Matrix type (Mat)                                     *\n\\****************************************************************************************/\n\n#define CV_CN_MAX     512\n#define CV_CN_SHIFT   3\n#define CV_DEPTH_MAX  (1 << CV_CN_SHIFT)\n\n#define CV_8U   0\n#define CV_8S   1\n#define CV_16U  2\n#define CV_16S  3\n#define CV_32S  4\n#define CV_32F  5\n#define CV_64F  6\n#define CV_USRTYPE1 7\n\n#define CV_MAT_DEPTH_MASK       (CV_DEPTH_MAX - 1)\n#define CV_MAT_DEPTH(flags)     ((flags) & CV_MAT_DEPTH_MASK)\n\n#define CV_MAKETYPE(depth,cn) (CV_MAT_DEPTH(depth) + (((cn)-1) << CV_CN_SHIFT))\n#define CV_MAKE_TYPE CV_MAKETYPE\n\n#define CV_8UC1 CV_MAKETYPE(CV_8U,1)\n#define CV_8UC2 CV_MAKETYPE(CV_8U,2)\n#define CV_8UC3 CV_MAKETYPE(CV_8U,3)\n#define CV_8UC4 CV_MAKETYPE(CV_8U,4)\n#define CV_8UC(n) CV_MAKETYPE(CV_8U,(n))\n\n#define CV_8SC1 CV_MAKETYPE(CV_8S,1)\n#define CV_8SC2 CV_MAKETYPE(CV_8S,2)\n#define CV_8SC3 CV_MAKETYPE(CV_8S,3)\n#define CV_8SC4 CV_MAKETYPE(CV_8S,4)\n#define CV_8SC(n) CV_MAKETYPE(CV_8S,(n))\n\n#define CV_16UC1 CV_MAKETYPE(CV_16U,1)\n#define CV_16UC2 CV_MAKETYPE(CV_16U,2)\n#define CV_16UC3 CV_MAKETYPE(CV_16U,3)\n#define CV_16UC4 CV_MAKETYPE(CV_16U,4)\n#define CV_16UC(n) CV_MAKETYPE(CV_16U,(n))\n\n#define CV_16SC1 CV_MAKETYPE(CV_16S,1)\n#define CV_16SC2 CV_MAKETYPE(CV_16S,2)\n#define CV_16SC3 CV_MAKETYPE(CV_16S,3)\n#define CV_16SC4 CV_MAKETYPE(CV_16S,4)\n#define CV_16SC(n) CV_MAKETYPE(CV_16S,(n))\n\n#define CV_32SC1 CV_MAKETYPE(CV_32S,1)\n#define CV_32SC2 CV_MAKETYPE(CV_32S,2)\n#define CV_32SC3 CV_MAKETYPE(CV_32S,3)\n#define CV_32SC4 CV_MAKETYPE(CV_32S,4)\n#define CV_32SC(n) CV_MAKETYPE(CV_32S,(n))\n\n#define CV_32FC1 CV_MAKETYPE(CV_32F,1)\n#define CV_32FC2 CV_MAKETYPE(CV_32F,2)\n#define CV_32FC3 CV_MAKETYPE(CV_32F,3)\n#define CV_32FC4 CV_MAKETYPE(CV_32F,4)\n#define CV_32FC(n) CV_MAKETYPE(CV_32F,(n))\n\n#define CV_64FC1 CV_MAKETYPE(CV_64F,1)\n#define CV_64FC2 CV_MAKETYPE(CV_64F,2)\n#define CV_64FC3 CV_MAKETYPE(CV_64F,3)\n#define CV_64FC4 CV_MAKETYPE(CV_64F,4)\n#define CV_64FC(n) CV_MAKETYPE(CV_64F,(n))\n\n#define CV_MAT_CN_MASK          ((CV_CN_MAX - 1) << CV_CN_SHIFT)\n#define CV_MAT_CN(flags)        ((((flags) & CV_MAT_CN_MASK) >> CV_CN_SHIFT) + 1)\n#define CV_MAT_TYPE_MASK        (CV_DEPTH_MAX*CV_CN_MAX - 1)\n#define CV_MAT_TYPE(flags)      ((flags) & CV_MAT_TYPE_MASK)\n#define CV_MAT_CONT_FLAG_SHIFT  14\n#define CV_MAT_CONT_FLAG        (1 << CV_MAT_CONT_FLAG_SHIFT)\n#define CV_IS_MAT_CONT(flags)   ((flags) & CV_MAT_CONT_FLAG)\n#define CV_IS_CONT_MAT          CV_IS_MAT_CONT\n#define CV_SUBMAT_FLAG_SHIFT    15\n#define CV_SUBMAT_FLAG          (1 << CV_SUBMAT_FLAG_SHIFT)\n#define CV_IS_SUBMAT(flags)     ((flags) & CV_MAT_SUBMAT_FLAG)\n\n/* Size of each channel item,\n   0x124489 = 1000 0100 0100 0010 0010 0001 0001 ~ array of sizeof(arr_type_elem) */\n#define CV_ELEM_SIZE1(type) \\\n    ((((sizeof(size_t)<<28)|0x8442211) >> CV_MAT_DEPTH(type)*4) & 15)\n\n/* 0x3a50 = 11 10 10 01 01 00 00 ~ array of log2(sizeof(arr_type_elem)) */\n#define CV_ELEM_SIZE(type) \\\n    (CV_MAT_CN(type) << ((((sizeof(size_t)/4+1)*16384|0x3a50) >> CV_MAT_DEPTH(type)*2) & 3))\n\n#ifndef MIN\n#  define MIN(a,b)  ((a) > (b) ? (b) : (a))\n#endif\n\n#ifndef MAX\n#  define MAX(a,b)  ((a) < (b) ? (b) : (a))\n#endif\n\n/****************************************************************************************\\\n*          exchange-add operation for atomic operations on reference counters            *\n\\****************************************************************************************/\n\n#if defined __INTEL_COMPILER && !(defined WIN32 || defined _WIN32)\n   // atomic increment on the linux version of the Intel(tm) compiler\n#  define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(addr)), delta)\n#elif defined __GNUC__\n#  if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ && !defined __EMSCRIPTEN__ && !defined(__CUDACC__)\n#    ifdef __ATOMIC_ACQ_REL\n#      define CV_XADD(addr, delta) __c11_atomic_fetch_add((_Atomic(int)*)(addr), delta, __ATOMIC_ACQ_REL)\n#    else\n#      define CV_XADD(addr, delta) __atomic_fetch_add((_Atomic(int)*)(addr), delta, 4)\n#    endif\n#  else\n#    if defined __ATOMIC_ACQ_REL && !defined __clang__\n       // version for gcc >= 4.7\n#      define CV_XADD(addr, delta) (int)__atomic_fetch_add((unsigned*)(addr), (unsigned)(delta), __ATOMIC_ACQ_REL)\n#    else\n#      define CV_XADD(addr, delta) (int)__sync_fetch_and_add((unsigned*)(addr), (unsigned)(delta))\n#    endif\n#  endif\n#elif defined _MSC_VER && !defined RC_INVOKED\n#  include <intrin.h>\n#  define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd((long volatile*)addr, delta)\n#else\n   CV_INLINE CV_XADD(int* addr, int delta) { int tmp = *addr; *addr += delta; return tmp; }\n#endif\n\n\n/****************************************************************************************\\\n*                                  CV_NORETURN attribute                                 *\n\\****************************************************************************************/\n\n#ifndef CV_NORETURN\n#  if defined(__GNUC__)\n#    define CV_NORETURN __attribute__((__noreturn__))\n#  elif defined(_MSC_VER) && (_MSC_VER >= 1300)\n#    define CV_NORETURN __declspec(noreturn)\n#  else\n#    define CV_NORETURN /* nothing by default */\n#  endif\n#endif\n\n#endif // __OPENCV_CORE_CVDEF_H__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cvstd.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_CVSTD_HPP__\n#define __OPENCV_CORE_CVSTD_HPP__\n\n#ifndef __cplusplus\n#  error cvstd.hpp header must be compiled as C++\n#endif\n\n#include \"opencv2/core/cvdef.h\"\n\n#include <cstddef>\n#include <cstring>\n#include <cctype>\n\n#ifndef OPENCV_NOSTL\n#  include <string>\n#endif\n\n// import useful primitives from stl\n#ifndef OPENCV_NOSTL_TRANSITIONAL\n#  include <algorithm>\n#  include <utility>\n#  include <cstdlib> //for abs(int)\n#  include <cmath>\n\nnamespace cv\n{\n    using std::min;\n    using std::max;\n    using std::abs;\n    using std::swap;\n    using std::sqrt;\n    using std::exp;\n    using std::pow;\n    using std::log;\n}\n\nnamespace std\n{\n    static inline uchar abs(uchar a) { return a; }\n    static inline ushort abs(ushort a) { return a; }\n    static inline unsigned abs(unsigned a) { return a; }\n    static inline uint64 abs(uint64 a) { return a; }\n}\n\n#else\nnamespace cv\n{\n    template<typename T> static inline T min(T a, T b) { return a < b ? a : b; }\n    template<typename T> static inline T max(T a, T b) { return a > b ? a : b; }\n    template<typename T> static inline T abs(T a) { return a < 0 ? -a : a; }\n    template<typename T> static inline void swap(T& a, T& b) { T tmp = a; a = b; b = tmp; }\n\n    template<> inline uchar abs(uchar a) { return a; }\n    template<> inline ushort abs(ushort a) { return a; }\n    template<> inline unsigned abs(unsigned a) { return a; }\n    template<> inline uint64 abs(uint64 a) { return a; }\n}\n#endif\n\nnamespace cv {\n\n//! @addtogroup core_utils\n//! @{\n\n//////////////////////////// memory management functions ////////////////////////////\n\n/** @brief Allocates an aligned memory buffer.\n\nThe function allocates the buffer of the specified size and returns it. When the buffer size is 16\nbytes or more, the returned buffer is aligned to 16 bytes.\n@param bufSize Allocated buffer size.\n */\nCV_EXPORTS void* fastMalloc(size_t bufSize);\n\n/** @brief Deallocates a memory buffer.\n\nThe function deallocates the buffer allocated with fastMalloc . If NULL pointer is passed, the\nfunction does nothing. C version of the function clears the pointer *pptr* to avoid problems with\ndouble memory deallocation.\n@param ptr Pointer to the allocated buffer.\n */\nCV_EXPORTS void fastFree(void* ptr);\n\n/*!\n  The STL-compilant memory Allocator based on cv::fastMalloc() and cv::fastFree()\n*/\ntemplate<typename _Tp> class Allocator\n{\npublic:\n    typedef _Tp value_type;\n    typedef value_type* pointer;\n    typedef const value_type* const_pointer;\n    typedef value_type& reference;\n    typedef const value_type& const_reference;\n    typedef size_t size_type;\n    typedef ptrdiff_t difference_type;\n    template<typename U> class rebind { typedef Allocator<U> other; };\n\n    explicit Allocator() {}\n    ~Allocator() {}\n    explicit Allocator(Allocator const&) {}\n    template<typename U>\n    explicit Allocator(Allocator<U> const&) {}\n\n    // address\n    pointer address(reference r) { return &r; }\n    const_pointer address(const_reference r) { return &r; }\n\n    pointer allocate(size_type count, const void* =0) { return reinterpret_cast<pointer>(fastMalloc(count * sizeof (_Tp))); }\n    void deallocate(pointer p, size_type) { fastFree(p); }\n\n    void construct(pointer p, const _Tp& v) { new(static_cast<void*>(p)) _Tp(v); }\n    void destroy(pointer p) { p->~_Tp(); }\n\n    size_type max_size() const { return cv::max(static_cast<_Tp>(-1)/sizeof(_Tp), 1); }\n};\n\n//! @} core_utils\n\n//! @cond IGNORED\n\nnamespace detail\n{\n\n// Metafunction to avoid taking a reference to void.\ntemplate<typename T>\nstruct RefOrVoid { typedef T& type; };\n\ntemplate<>\nstruct RefOrVoid<void>{ typedef void type; };\n\ntemplate<>\nstruct RefOrVoid<const void>{ typedef const void type; };\n\ntemplate<>\nstruct RefOrVoid<volatile void>{ typedef volatile void type; };\n\ntemplate<>\nstruct RefOrVoid<const volatile void>{ typedef const volatile void type; };\n\n// This class would be private to Ptr, if it didn't have to be a non-template.\nstruct PtrOwner;\n\n}\n\ntemplate<typename Y>\nstruct DefaultDeleter\n{\n    void operator () (Y* p) const;\n};\n\n//! @endcond\n\n//! @addtogroup core_basic\n//! @{\n\n/** @brief Template class for smart pointers with shared ownership\n\nA Ptr\\<T\\> pretends to be a pointer to an object of type T. Unlike an ordinary pointer, however, the\nobject will be automatically cleaned up once all Ptr instances pointing to it are destroyed.\n\nPtr is similar to boost::shared_ptr that is part of the Boost library\n(<http://www.boost.org/doc/libs/release/libs/smart_ptr/shared_ptr.htm>) and std::shared_ptr from\nthe [C++11](http://en.wikipedia.org/wiki/C++11) standard.\n\nThis class provides the following advantages:\n-   Default constructor, copy constructor, and assignment operator for an arbitrary C++ class or C\n    structure. For some objects, like files, windows, mutexes, sockets, and others, a copy\n    constructor or an assignment operator are difficult to define. For some other objects, like\n    complex classifiers in OpenCV, copy constructors are absent and not easy to implement. Finally,\n    some of complex OpenCV and your own data structures may be written in C. However, copy\n    constructors and default constructors can simplify programming a lot. Besides, they are often\n    required (for example, by STL containers). By using a Ptr to such an object instead of the\n    object itself, you automatically get all of the necessary constructors and the assignment\n    operator.\n-   *O(1)* complexity of the above-mentioned operations. While some structures, like std::vector,\n    provide a copy constructor and an assignment operator, the operations may take a considerable\n    amount of time if the data structures are large. But if the structures are put into a Ptr, the\n    overhead is small and independent of the data size.\n-   Automatic and customizable cleanup, even for C structures. See the example below with FILE\\*.\n-   Heterogeneous collections of objects. The standard STL and most other C++ and OpenCV containers\n    can store only objects of the same type and the same size. The classical solution to store\n    objects of different types in the same container is to store pointers to the base class (Base\\*)\n    instead but then you lose the automatic memory management. Again, by using Ptr\\<Base\\> instead\n    of raw pointers, you can solve the problem.\n\nA Ptr is said to *own* a pointer - that is, for each Ptr there is a pointer that will be deleted\nonce all Ptr instances that own it are destroyed. The owned pointer may be null, in which case\nnothing is deleted. Each Ptr also *stores* a pointer. The stored pointer is the pointer the Ptr\npretends to be; that is, the one you get when you use Ptr::get or the conversion to T\\*. It's\nusually the same as the owned pointer, but if you use casts or the general shared-ownership\nconstructor, the two may diverge: the Ptr will still own the original pointer, but will itself point\nto something else.\n\nThe owned pointer is treated as a black box. The only thing Ptr needs to know about it is how to\ndelete it. This knowledge is encapsulated in the *deleter* - an auxiliary object that is associated\nwith the owned pointer and shared between all Ptr instances that own it. The default deleter is an\ninstance of DefaultDeleter, which uses the standard C++ delete operator; as such it will work with\nany pointer allocated with the standard new operator.\n\nHowever, if the pointer must be deleted in a different way, you must specify a custom deleter upon\nPtr construction. A deleter is simply a callable object that accepts the pointer as its sole\nargument. For example, if you want to wrap FILE, you may do so as follows:\n@code\n    Ptr<FILE> f(fopen(\"myfile.txt\", \"w\"), fclose);\n    if(!f) throw ...;\n    fprintf(f, ....);\n    ...\n    // the file will be closed automatically by f's destructor.\n@endcode\nAlternatively, if you want all pointers of a particular type to be deleted the same way, you can\nspecialize DefaultDeleter<T>::operator() for that type, like this:\n@code\n    namespace cv {\n    template<> void DefaultDeleter<FILE>::operator ()(FILE * obj) const\n    {\n        fclose(obj);\n    }\n    }\n@endcode\nFor convenience, the following types from the OpenCV C API already have such a specialization that\ncalls the appropriate release function:\n-   CvCapture\n-   CvFileStorage\n-   CvHaarClassifierCascade\n-   CvMat\n-   CvMatND\n-   CvMemStorage\n-   CvSparseMat\n-   CvVideoWriter\n-   IplImage\n@note The shared ownership mechanism is implemented with reference counting. As such, cyclic\nownership (e.g. when object a contains a Ptr to object b, which contains a Ptr to object a) will\nlead to all involved objects never being cleaned up. Avoid such situations.\n@note It is safe to concurrently read (but not write) a Ptr instance from multiple threads and\ntherefore it is normally safe to use it in multi-threaded applications. The same is true for Mat and\nother C++ OpenCV classes that use internal reference counts.\n*/\ntemplate<typename T>\nstruct Ptr\n{\n    /** Generic programming support. */\n    typedef T element_type;\n\n    /** The default constructor creates a null Ptr - one that owns and stores a null pointer.\n    */\n    Ptr();\n\n    /**\n    If p is null, these are equivalent to the default constructor.\n    Otherwise, these constructors assume ownership of p - that is, the created Ptr owns and stores p\n    and assumes it is the sole owner of it. Don't use them if p is already owned by another Ptr, or\n    else p will get deleted twice.\n    With the first constructor, DefaultDeleter\\<Y\\>() becomes the associated deleter (so p will\n    eventually be deleted with the standard delete operator). Y must be a complete type at the point\n    of invocation.\n    With the second constructor, d becomes the associated deleter.\n    Y\\* must be convertible to T\\*.\n    @param p Pointer to own.\n    @note It is often easier to use makePtr instead.\n     */\n    template<typename Y>\n#ifdef DISABLE_OPENCV_24_COMPATIBILITY\n    explicit\n#endif\n    Ptr(Y* p);\n\n    /** @overload\n    @param d Deleter to use for the owned pointer.\n    @param p Pointer to own.\n    */\n    template<typename Y, typename D>\n    Ptr(Y* p, D d);\n\n    /**\n    These constructors create a Ptr that shares ownership with another Ptr - that is, own the same\n    pointer as o.\n    With the first two, the same pointer is stored, as well; for the second, Y\\* must be convertible\n    to T\\*.\n    With the third, p is stored, and Y may be any type. This constructor allows to have completely\n    unrelated owned and stored pointers, and should be used with care to avoid confusion. A relatively\n    benign use is to create a non-owning Ptr, like this:\n    @code\n        ptr = Ptr<T>(Ptr<T>(), dont_delete_me); // owns nothing; will not delete the pointer.\n    @endcode\n    @param o Ptr to share ownership with.\n    */\n    Ptr(const Ptr& o);\n\n    /** @overload\n    @param o Ptr to share ownership with.\n    */\n    template<typename Y>\n    Ptr(const Ptr<Y>& o);\n\n    /** @overload\n    @param o Ptr to share ownership with.\n    @param p Pointer to store.\n    */\n    template<typename Y>\n    Ptr(const Ptr<Y>& o, T* p);\n\n    /** The destructor is equivalent to calling Ptr::release. */\n    ~Ptr();\n\n    /**\n    Assignment replaces the current Ptr instance with one that owns and stores same pointers as o and\n    then destroys the old instance.\n    @param o Ptr to share ownership with.\n     */\n    Ptr& operator = (const Ptr& o);\n\n    /** @overload */\n    template<typename Y>\n    Ptr& operator = (const Ptr<Y>& o);\n\n    /** If no other Ptr instance owns the owned pointer, deletes it with the associated deleter. Then sets\n    both the owned and the stored pointers to NULL.\n    */\n    void release();\n\n    /**\n    `ptr.reset(...)` is equivalent to `ptr = Ptr<T>(...)`.\n    @param p Pointer to own.\n    */\n    template<typename Y>\n    void reset(Y* p);\n\n    /** @overload\n    @param d Deleter to use for the owned pointer.\n    @param p Pointer to own.\n    */\n    template<typename Y, typename D>\n    void reset(Y* p, D d);\n\n    /**\n    Swaps the owned and stored pointers (and deleters, if any) of this and o.\n    @param o Ptr to swap with.\n    */\n    void swap(Ptr& o);\n\n    /** Returns the stored pointer. */\n    T* get() const;\n\n    /** Ordinary pointer emulation. */\n    typename detail::RefOrVoid<T>::type operator * () const;\n\n    /** Ordinary pointer emulation. */\n    T* operator -> () const;\n\n    /** Equivalent to get(). */\n    operator T* () const;\n\n    /** ptr.empty() is equivalent to `!ptr.get()`. */\n    bool empty() const;\n\n    /** Returns a Ptr that owns the same pointer as this, and stores the same\n       pointer as this, except converted via static_cast to Y*.\n    */\n    template<typename Y>\n    Ptr<Y> staticCast() const;\n\n    /** Ditto for const_cast. */\n    template<typename Y>\n    Ptr<Y> constCast() const;\n\n    /** Ditto for dynamic_cast. */\n    template<typename Y>\n    Ptr<Y> dynamicCast() const;\n\nprivate:\n    detail::PtrOwner* owner;\n    T* stored;\n\n    template<typename Y>\n    friend struct Ptr; // have to do this for the cross-type copy constructor\n};\n\n/** Equivalent to ptr1.swap(ptr2). Provided to help write generic algorithms. */\ntemplate<typename T>\nvoid swap(Ptr<T>& ptr1, Ptr<T>& ptr2);\n\n/** Return whether ptr1.get() and ptr2.get() are equal and not equal, respectively. */\ntemplate<typename T>\nbool operator == (const Ptr<T>& ptr1, const Ptr<T>& ptr2);\ntemplate<typename T>\nbool operator != (const Ptr<T>& ptr1, const Ptr<T>& ptr2);\n\n/** `makePtr<T>(...)` is equivalent to `Ptr<T>(new T(...))`. It is shorter than the latter, and it's\nmarginally safer than using a constructor or Ptr::reset, since it ensures that the owned pointer\nis new and thus not owned by any other Ptr instance.\nUnfortunately, perfect forwarding is impossible to implement in C++03, and so makePtr is limited\nto constructors of T that have up to 10 arguments, none of which are non-const references.\n */\ntemplate<typename T>\nPtr<T> makePtr();\n/** @overload */\ntemplate<typename T, typename A1>\nPtr<T> makePtr(const A1& a1);\n/** @overload */\ntemplate<typename T, typename A1, typename A2>\nPtr<T> makePtr(const A1& a1, const A2& a2);\n/** @overload */\ntemplate<typename T, typename A1, typename A2, typename A3>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3);\n/** @overload */\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4);\n/** @overload */\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5);\n/** @overload */\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6);\n/** @overload */\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7);\n/** @overload */\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8);\n/** @overload */\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9);\n/** @overload */\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9, typename A10>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10);\n\n//////////////////////////////// string class ////////////////////////////////\n\nclass CV_EXPORTS FileNode; //for string constructor from FileNode\n\nclass CV_EXPORTS String\n{\npublic:\n    typedef char value_type;\n    typedef char& reference;\n    typedef const char& const_reference;\n    typedef char* pointer;\n    typedef const char* const_pointer;\n    typedef ptrdiff_t difference_type;\n    typedef size_t size_type;\n    typedef char* iterator;\n    typedef const char* const_iterator;\n\n    static const size_t npos = size_t(-1);\n\n    explicit String();\n    String(const String& str);\n    String(const String& str, size_t pos, size_t len = npos);\n    String(const char* s);\n    String(const char* s, size_t n);\n    String(size_t n, char c);\n    String(const char* first, const char* last);\n    template<typename Iterator> String(Iterator first, Iterator last);\n    explicit String(const FileNode& fn);\n    ~String();\n\n    String& operator=(const String& str);\n    String& operator=(const char* s);\n    String& operator=(char c);\n\n    String& operator+=(const String& str);\n    String& operator+=(const char* s);\n    String& operator+=(char c);\n\n    size_t size() const;\n    size_t length() const;\n\n    char operator[](size_t idx) const;\n    char operator[](int idx) const;\n\n    const char* begin() const;\n    const char* end() const;\n\n    const char* c_str() const;\n\n    bool empty() const;\n    void clear();\n\n    int compare(const char* s) const;\n    int compare(const String& str) const;\n\n    void swap(String& str);\n    String substr(size_t pos = 0, size_t len = npos) const;\n\n    size_t find(const char* s, size_t pos, size_t n) const;\n    size_t find(char c, size_t pos = 0) const;\n    size_t find(const String& str, size_t pos = 0) const;\n    size_t find(const char* s, size_t pos = 0) const;\n\n    size_t rfind(const char* s, size_t pos, size_t n) const;\n    size_t rfind(char c, size_t pos = npos) const;\n    size_t rfind(const String& str, size_t pos = npos) const;\n    size_t rfind(const char* s, size_t pos = npos) const;\n\n    size_t find_first_of(const char* s, size_t pos, size_t n) const;\n    size_t find_first_of(char c, size_t pos = 0) const;\n    size_t find_first_of(const String& str, size_t pos = 0) const;\n    size_t find_first_of(const char* s, size_t pos = 0) const;\n\n    size_t find_last_of(const char* s, size_t pos, size_t n) const;\n    size_t find_last_of(char c, size_t pos = npos) const;\n    size_t find_last_of(const String& str, size_t pos = npos) const;\n    size_t find_last_of(const char* s, size_t pos = npos) const;\n\n    friend String operator+ (const String& lhs, const String& rhs);\n    friend String operator+ (const String& lhs, const char*   rhs);\n    friend String operator+ (const char*   lhs, const String& rhs);\n    friend String operator+ (const String& lhs, char          rhs);\n    friend String operator+ (char          lhs, const String& rhs);\n\n    String toLowerCase() const;\n\n#ifndef OPENCV_NOSTL\n    String(const std::string& str);\n    String(const std::string& str, size_t pos, size_t len = npos);\n    String& operator=(const std::string& str);\n    String& operator+=(const std::string& str);\n    operator std::string() const;\n\n    friend String operator+ (const String& lhs, const std::string& rhs);\n    friend String operator+ (const std::string& lhs, const String& rhs);\n#endif\n\nprivate:\n    char*  cstr_;\n    size_t len_;\n\n    char* allocate(size_t len); // len without trailing 0\n    void deallocate();\n};\n\n//! @} core_basic\n\n////////////////////////// cv::String implementation /////////////////////////\n\n//! @cond IGNORED\n\ninline\nString::String()\n    : cstr_(0), len_(0)\n{}\n\ninline\nString::String(const String& str)\n    : cstr_(str.cstr_), len_(str.len_)\n{\n    if (cstr_)\n        CV_XADD(((int*)cstr_)-1, 1);\n}\n\ninline\nString::String(const String& str, size_t pos, size_t len)\n    : cstr_(0), len_(0)\n{\n    pos = min(pos, str.len_);\n    len = min(str.len_ - pos, len);\n    if (!len) return;\n    if (len == str.len_)\n    {\n        CV_XADD(((int*)str.cstr_)-1, 1);\n        cstr_ = str.cstr_;\n        len_ = str.len_;\n        return;\n    }\n    memcpy(allocate(len), str.cstr_ + pos, len);\n}\n\ninline\nString::String(const char* s)\n    : cstr_(0), len_(0)\n{\n    if (!s) return;\n    size_t len = strlen(s);\n    memcpy(allocate(len), s, len);\n}\n\ninline\nString::String(const char* s, size_t n)\n    : cstr_(0), len_(0)\n{\n    if (!n) return;\n    memcpy(allocate(n), s, n);\n}\n\ninline\nString::String(size_t n, char c)\n    : cstr_(0), len_(0)\n{\n    memset(allocate(n), c, n);\n}\n\ninline\nString::String(const char* first, const char* last)\n    : cstr_(0), len_(0)\n{\n    size_t len = (size_t)(last - first);\n    memcpy(allocate(len), first, len);\n}\n\ntemplate<typename Iterator> inline\nString::String(Iterator first, Iterator last)\n    : cstr_(0), len_(0)\n{\n    size_t len = (size_t)(last - first);\n    char* str = allocate(len);\n    while (first != last)\n    {\n        *str++ = *first;\n        ++first;\n    }\n}\n\ninline\nString::~String()\n{\n    deallocate();\n}\n\ninline\nString& String::operator=(const String& str)\n{\n    if (&str == this) return *this;\n\n    deallocate();\n    if (str.cstr_) CV_XADD(((int*)str.cstr_)-1, 1);\n    cstr_ = str.cstr_;\n    len_ = str.len_;\n    return *this;\n}\n\ninline\nString& String::operator=(const char* s)\n{\n    deallocate();\n    if (!s) return *this;\n    size_t len = strlen(s);\n    memcpy(allocate(len), s, len);\n    return *this;\n}\n\ninline\nString& String::operator=(char c)\n{\n    deallocate();\n    allocate(1)[0] = c;\n    return *this;\n}\n\ninline\nString& String::operator+=(const String& str)\n{\n    *this = *this + str;\n    return *this;\n}\n\ninline\nString& String::operator+=(const char* s)\n{\n    *this = *this + s;\n    return *this;\n}\n\ninline\nString& String::operator+=(char c)\n{\n    *this = *this + c;\n    return *this;\n}\n\ninline\nsize_t String::size() const\n{\n    return len_;\n}\n\ninline\nsize_t String::length() const\n{\n    return len_;\n}\n\ninline\nchar String::operator[](size_t idx) const\n{\n    return cstr_[idx];\n}\n\ninline\nchar String::operator[](int idx) const\n{\n    return cstr_[idx];\n}\n\ninline\nconst char* String::begin() const\n{\n    return cstr_;\n}\n\ninline\nconst char* String::end() const\n{\n    return len_ ? cstr_ + 1 : 0;\n}\n\ninline\nbool String::empty() const\n{\n    return len_ == 0;\n}\n\ninline\nconst char* String::c_str() const\n{\n    return cstr_ ? cstr_ : \"\";\n}\n\ninline\nvoid String::swap(String& str)\n{\n    cv::swap(cstr_, str.cstr_);\n    cv::swap(len_, str.len_);\n}\n\ninline\nvoid String::clear()\n{\n    deallocate();\n}\n\ninline\nint String::compare(const char* s) const\n{\n    if (cstr_ == s) return 0;\n    return strcmp(c_str(), s);\n}\n\ninline\nint String::compare(const String& str) const\n{\n    if (cstr_ == str.cstr_) return 0;\n    return strcmp(c_str(), str.c_str());\n}\n\ninline\nString String::substr(size_t pos, size_t len) const\n{\n    return String(*this, pos, len);\n}\n\ninline\nsize_t String::find(const char* s, size_t pos, size_t n) const\n{\n    if (n == 0 || pos + n > len_) return npos;\n    const char* lmax = cstr_ + len_ - n;\n    for (const char* i = cstr_ + pos; i <= lmax; ++i)\n    {\n        size_t j = 0;\n        while (j < n && s[j] == i[j]) ++j;\n        if (j == n) return (size_t)(i - cstr_);\n    }\n    return npos;\n}\n\ninline\nsize_t String::find(char c, size_t pos) const\n{\n    return find(&c, pos, 1);\n}\n\ninline\nsize_t String::find(const String& str, size_t pos) const\n{\n    return find(str.c_str(), pos, str.len_);\n}\n\ninline\nsize_t String::find(const char* s, size_t pos) const\n{\n    if (pos >= len_ || !s[0]) return npos;\n    const char* lmax = cstr_ + len_;\n    for (const char* i = cstr_ + pos; i < lmax; ++i)\n    {\n        size_t j = 0;\n        while (s[j] && s[j] == i[j])\n        {   if(i + j >= lmax) return npos;\n            ++j;\n        }\n        if (!s[j]) return (size_t)(i - cstr_);\n    }\n    return npos;\n}\n\ninline\nsize_t String::rfind(const char* s, size_t pos, size_t n) const\n{\n    if (n > len_) return npos;\n    if (pos > len_ - n) pos = len_ - n;\n    for (const char* i = cstr_ + pos; i >= cstr_; --i)\n    {\n        size_t j = 0;\n        while (j < n && s[j] == i[j]) ++j;\n        if (j == n) return (size_t)(i - cstr_);\n    }\n    return npos;\n}\n\ninline\nsize_t String::rfind(char c, size_t pos) const\n{\n    return rfind(&c, pos, 1);\n}\n\ninline\nsize_t String::rfind(const String& str, size_t pos) const\n{\n    return rfind(str.c_str(), pos, str.len_);\n}\n\ninline\nsize_t String::rfind(const char* s, size_t pos) const\n{\n    return rfind(s, pos, strlen(s));\n}\n\ninline\nsize_t String::find_first_of(const char* s, size_t pos, size_t n) const\n{\n    if (n == 0 || pos + n > len_) return npos;\n    const char* lmax = cstr_ + len_;\n    for (const char* i = cstr_ + pos; i < lmax; ++i)\n    {\n        for (size_t j = 0; j < n; ++j)\n            if (s[j] == *i)\n                return (size_t)(i - cstr_);\n    }\n    return npos;\n}\n\ninline\nsize_t String::find_first_of(char c, size_t pos) const\n{\n    return find_first_of(&c, pos, 1);\n}\n\ninline\nsize_t String::find_first_of(const String& str, size_t pos) const\n{\n    return find_first_of(str.c_str(), pos, str.len_);\n}\n\ninline\nsize_t String::find_first_of(const char* s, size_t pos) const\n{\n    if (pos >= len_ || !s[0]) return npos;\n    const char* lmax = cstr_ + len_;\n    for (const char* i = cstr_ + pos; i < lmax; ++i)\n    {\n        for (size_t j = 0; s[j]; ++j)\n            if (s[j] == *i)\n                return (size_t)(i - cstr_);\n    }\n    return npos;\n}\n\ninline\nsize_t String::find_last_of(const char* s, size_t pos, size_t n) const\n{\n    if (pos >= len_) pos = len_ - 1;\n    for (const char* i = cstr_ + pos; i >= cstr_; --i)\n    {\n        for (size_t j = 0; j < n; ++j)\n            if (s[j] == *i)\n                return (size_t)(i - cstr_);\n    }\n    return npos;\n}\n\ninline\nsize_t String::find_last_of(char c, size_t pos) const\n{\n    return find_last_of(&c, pos, 1);\n}\n\ninline\nsize_t String::find_last_of(const String& str, size_t pos) const\n{\n    return find_last_of(str.c_str(), pos, str.len_);\n}\n\ninline\nsize_t String::find_last_of(const char* s, size_t pos) const\n{\n    if (pos >= len_) pos = len_ - 1;\n    for (const char* i = cstr_ + pos; i >= cstr_; --i)\n    {\n        for (size_t j = 0; s[j]; ++j)\n            if (s[j] == *i)\n                return (size_t)(i - cstr_);\n    }\n    return npos;\n}\n\ninline\nString String::toLowerCase() const\n{\n    String res(cstr_, len_);\n\n    for (size_t i = 0; i < len_; ++i)\n        res.cstr_[i] = (char) ::tolower(cstr_[i]);\n\n    return res;\n}\n\n//! @endcond\n\n// ************************* cv::String non-member functions *************************\n\n//! @relates cv::String\n//! @{\n\ninline\nString operator + (const String& lhs, const String& rhs)\n{\n    String s;\n    s.allocate(lhs.len_ + rhs.len_);\n    memcpy(s.cstr_, lhs.cstr_, lhs.len_);\n    memcpy(s.cstr_ + lhs.len_, rhs.cstr_, rhs.len_);\n    return s;\n}\n\ninline\nString operator + (const String& lhs, const char* rhs)\n{\n    String s;\n    size_t rhslen = strlen(rhs);\n    s.allocate(lhs.len_ + rhslen);\n    memcpy(s.cstr_, lhs.cstr_, lhs.len_);\n    memcpy(s.cstr_ + lhs.len_, rhs, rhslen);\n    return s;\n}\n\ninline\nString operator + (const char* lhs, const String& rhs)\n{\n    String s;\n    size_t lhslen = strlen(lhs);\n    s.allocate(lhslen + rhs.len_);\n    memcpy(s.cstr_, lhs, lhslen);\n    memcpy(s.cstr_ + lhslen, rhs.cstr_, rhs.len_);\n    return s;\n}\n\ninline\nString operator + (const String& lhs, char rhs)\n{\n    String s;\n    s.allocate(lhs.len_ + 1);\n    memcpy(s.cstr_, lhs.cstr_, lhs.len_);\n    s.cstr_[lhs.len_] = rhs;\n    return s;\n}\n\ninline\nString operator + (char lhs, const String& rhs)\n{\n    String s;\n    s.allocate(rhs.len_ + 1);\n    s.cstr_[0] = lhs;\n    memcpy(s.cstr_ + 1, rhs.cstr_, rhs.len_);\n    return s;\n}\n\nstatic inline bool operator== (const String& lhs, const String& rhs) { return 0 == lhs.compare(rhs); }\nstatic inline bool operator== (const char*   lhs, const String& rhs) { return 0 == rhs.compare(lhs); }\nstatic inline bool operator== (const String& lhs, const char*   rhs) { return 0 == lhs.compare(rhs); }\nstatic inline bool operator!= (const String& lhs, const String& rhs) { return 0 != lhs.compare(rhs); }\nstatic inline bool operator!= (const char*   lhs, const String& rhs) { return 0 != rhs.compare(lhs); }\nstatic inline bool operator!= (const String& lhs, const char*   rhs) { return 0 != lhs.compare(rhs); }\nstatic inline bool operator<  (const String& lhs, const String& rhs) { return lhs.compare(rhs) <  0; }\nstatic inline bool operator<  (const char*   lhs, const String& rhs) { return rhs.compare(lhs) >  0; }\nstatic inline bool operator<  (const String& lhs, const char*   rhs) { return lhs.compare(rhs) <  0; }\nstatic inline bool operator<= (const String& lhs, const String& rhs) { return lhs.compare(rhs) <= 0; }\nstatic inline bool operator<= (const char*   lhs, const String& rhs) { return rhs.compare(lhs) >= 0; }\nstatic inline bool operator<= (const String& lhs, const char*   rhs) { return lhs.compare(rhs) <= 0; }\nstatic inline bool operator>  (const String& lhs, const String& rhs) { return lhs.compare(rhs) >  0; }\nstatic inline bool operator>  (const char*   lhs, const String& rhs) { return rhs.compare(lhs) <  0; }\nstatic inline bool operator>  (const String& lhs, const char*   rhs) { return lhs.compare(rhs) >  0; }\nstatic inline bool operator>= (const String& lhs, const String& rhs) { return lhs.compare(rhs) >= 0; }\nstatic inline bool operator>= (const char*   lhs, const String& rhs) { return rhs.compare(lhs) <= 0; }\nstatic inline bool operator>= (const String& lhs, const char*   rhs) { return lhs.compare(rhs) >= 0; }\n\n//! @} relates cv::String\n\n} // cv\n\n#ifndef OPENCV_NOSTL_TRANSITIONAL\nnamespace std\n{\n    static inline void swap(cv::String& a, cv::String& b) { a.swap(b); }\n}\n#else\nnamespace cv\n{\n    template<> inline\n    void swap<cv::String>(cv::String& a, cv::String& b)\n    {\n        a.swap(b);\n    }\n}\n#endif\n\n#include \"opencv2/core/ptr.inl.hpp\"\n\n#endif //__OPENCV_CORE_CVSTD_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/cvstd.inl.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_CVSTDINL_HPP__\n#define __OPENCV_CORE_CVSTDINL_HPP__\n\n#ifndef OPENCV_NOSTL\n#  include <complex>\n#  include <ostream>\n#endif\n\n//! @cond IGNORED\n\nnamespace cv\n{\n#ifndef OPENCV_NOSTL\n\ntemplate<typename _Tp> class DataType< std::complex<_Tp> >\n{\npublic:\n    typedef std::complex<_Tp>  value_type;\n    typedef value_type         work_type;\n    typedef _Tp                channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = 2,\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels) };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\ninline\nString::String(const std::string& str)\n    : cstr_(0), len_(0)\n{\n    if (!str.empty())\n    {\n        size_t len = str.size();\n        memcpy(allocate(len), str.c_str(), len);\n    }\n}\n\ninline\nString::String(const std::string& str, size_t pos, size_t len)\n    : cstr_(0), len_(0)\n{\n    size_t strlen = str.size();\n    pos = max(pos, strlen);\n    len = min(strlen - pos, len);\n    if (!len) return;\n    memcpy(allocate(len), str.c_str() + pos, len);\n}\n\ninline\nString& String::operator = (const std::string& str)\n{\n    deallocate();\n    if (!str.empty())\n    {\n        size_t len = str.size();\n        memcpy(allocate(len), str.c_str(), len);\n    }\n    return *this;\n}\n\ninline\nString& String::operator += (const std::string& str)\n{\n    *this = *this + str;\n    return *this;\n}\n\ninline\nString::operator std::string() const\n{\n    return std::string(cstr_, len_);\n}\n\ninline\nString operator + (const String& lhs, const std::string& rhs)\n{\n    String s;\n    size_t rhslen = rhs.size();\n    s.allocate(lhs.len_ + rhslen);\n    memcpy(s.cstr_, lhs.cstr_, lhs.len_);\n    memcpy(s.cstr_ + lhs.len_, rhs.c_str(), rhslen);\n    return s;\n}\n\ninline\nString operator + (const std::string& lhs, const String& rhs)\n{\n    String s;\n    size_t lhslen = lhs.size();\n    s.allocate(lhslen + rhs.len_);\n    memcpy(s.cstr_, lhs.c_str(), lhslen);\n    memcpy(s.cstr_ + lhslen, rhs.cstr_, rhs.len_);\n    return s;\n}\n\ninline\nFileNode::operator std::string() const\n{\n    String value;\n    read(*this, value, value);\n    return value;\n}\n\ntemplate<> inline\nvoid operator >> (const FileNode& n, std::string& value)\n{\n    String val;\n    read(n, val, val);\n    value = val;\n}\n\ntemplate<> inline\nFileStorage& operator << (FileStorage& fs, const std::string& value)\n{\n    return fs << cv::String(value);\n}\n\nstatic inline\nstd::ostream& operator << (std::ostream& os, const String& str)\n{\n    return os << str.c_str();\n}\n\nstatic inline\nstd::ostream& operator << (std::ostream& out, Ptr<Formatted> fmtd)\n{\n    fmtd->reset();\n    for(const char* str = fmtd->next(); str; str = fmtd->next())\n        out << str;\n    return out;\n}\n\nstatic inline\nstd::ostream& operator << (std::ostream& out, const Mat& mtx)\n{\n    return out << Formatter::get()->format(mtx);\n}\n\ntemplate<typename _Tp> static inline\nstd::ostream& operator << (std::ostream& out, const std::vector<Point_<_Tp> >& vec)\n{\n    return out << Formatter::get()->format(Mat(vec));\n}\n\n\ntemplate<typename _Tp> static inline\nstd::ostream& operator << (std::ostream& out, const std::vector<Point3_<_Tp> >& vec)\n{\n    return out << Formatter::get()->format(Mat(vec));\n}\n\n\ntemplate<typename _Tp, int m, int n> static inline\nstd::ostream& operator << (std::ostream& out, const Matx<_Tp, m, n>& matx)\n{\n    return out << Formatter::get()->format(Mat(matx));\n}\n\ntemplate<typename _Tp> static inline\nstd::ostream& operator << (std::ostream& out, const Point_<_Tp>& p)\n{\n    out << \"[\" << p.x << \", \" << p.y << \"]\";\n    return out;\n}\n\ntemplate<typename _Tp> static inline\nstd::ostream& operator << (std::ostream& out, const Point3_<_Tp>& p)\n{\n    out << \"[\" << p.x << \", \" << p.y << \", \" << p.z << \"]\";\n    return out;\n}\n\ntemplate<typename _Tp, int n> static inline\nstd::ostream& operator << (std::ostream& out, const Vec<_Tp, n>& vec)\n{\n    out << \"[\";\n#ifdef _MSC_VER\n#pragma warning( push )\n#pragma warning( disable: 4127 )\n#endif\n    if(Vec<_Tp, n>::depth < CV_32F)\n#ifdef _MSC_VER\n#pragma warning( pop )\n#endif\n    {\n        for (int i = 0; i < n - 1; ++i) {\n            out << (int)vec[i] << \", \";\n        }\n        out << (int)vec[n-1] << \"]\";\n    }\n    else\n    {\n        for (int i = 0; i < n - 1; ++i) {\n            out << vec[i] << \", \";\n        }\n        out << vec[n-1] << \"]\";\n    }\n\n    return out;\n}\n\ntemplate<typename _Tp> static inline\nstd::ostream& operator << (std::ostream& out, const Size_<_Tp>& size)\n{\n    return out << \"[\" << size.width << \" x \" << size.height << \"]\";\n}\n\ntemplate<typename _Tp> static inline\nstd::ostream& operator << (std::ostream& out, const Rect_<_Tp>& rect)\n{\n    return out << \"[\" << rect.width << \" x \" << rect.height << \" from (\" << rect.x << \", \" << rect.y << \")]\";\n}\n\n\n#endif // OPENCV_NOSTL\n} // cv\n\n//! @endcond\n\n#endif // __OPENCV_CORE_CVSTDINL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/directx.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors as is and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the copyright holders or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_DIRECTX_HPP__\n#define __OPENCV_CORE_DIRECTX_HPP__\n\n#include \"mat.hpp\"\n#include \"ocl.hpp\"\n\n#if !defined(__d3d11_h__)\nstruct ID3D11Device;\nstruct ID3D11Texture2D;\n#endif\n\n#if !defined(__d3d10_h__)\nstruct ID3D10Device;\nstruct ID3D10Texture2D;\n#endif\n\n#if !defined(_D3D9_H_)\nstruct IDirect3DDevice9;\nstruct IDirect3DDevice9Ex;\nstruct IDirect3DSurface9;\n#endif\n\n\nnamespace cv { namespace directx {\n\nnamespace ocl {\nusing namespace cv::ocl;\n\n//! @addtogroup core_directx\n//! @{\n\n// TODO static functions in the Context class\nCV_EXPORTS Context& initializeContextFromD3D11Device(ID3D11Device* pD3D11Device);\nCV_EXPORTS Context& initializeContextFromD3D10Device(ID3D10Device* pD3D10Device);\nCV_EXPORTS Context& initializeContextFromDirect3DDevice9Ex(IDirect3DDevice9Ex* pDirect3DDevice9Ex);\nCV_EXPORTS Context& initializeContextFromDirect3DDevice9(IDirect3DDevice9* pDirect3DDevice9);\n\n//! @}\n\n} // namespace cv::directx::ocl\n\n//! @addtogroup core_directx\n//! @{\n\nCV_EXPORTS void convertToD3D11Texture2D(InputArray src, ID3D11Texture2D* pD3D11Texture2D);\nCV_EXPORTS void convertFromD3D11Texture2D(ID3D11Texture2D* pD3D11Texture2D, OutputArray dst);\n\nCV_EXPORTS void convertToD3D10Texture2D(InputArray src, ID3D10Texture2D* pD3D10Texture2D);\nCV_EXPORTS void convertFromD3D10Texture2D(ID3D10Texture2D* pD3D10Texture2D, OutputArray dst);\n\nCV_EXPORTS void convertToDirect3DSurface9(InputArray src, IDirect3DSurface9* pDirect3DSurface9, void* surfaceSharedHandle = NULL);\nCV_EXPORTS void convertFromDirect3DSurface9(IDirect3DSurface9* pDirect3DSurface9, OutputArray dst, void* surfaceSharedHandle = NULL);\n\n// Get OpenCV type from DirectX type, return -1 if there is no equivalent\nCV_EXPORTS int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT); // enum DXGI_FORMAT for D3D10/D3D11\n\n// Get OpenCV type from DirectX type, return -1 if there is no equivalent\nCV_EXPORTS int getTypeFromD3DFORMAT(const int iD3DFORMAT); // enum D3DTYPE for D3D9\n\n//! @}\n\n} } // namespace cv::directx\n\n#endif // __OPENCV_CORE_DIRECTX_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/eigen.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n\n#ifndef __OPENCV_CORE_EIGEN_HPP__\n#define __OPENCV_CORE_EIGEN_HPP__\n\n#include \"opencv2/core.hpp\"\n\n#if defined _MSC_VER && _MSC_VER >= 1200\n#pragma warning( disable: 4714 ) //__forceinline is not inlined\n#pragma warning( disable: 4127 ) //conditional expression is constant\n#pragma warning( disable: 4244 ) //conversion from '__int64' to 'int', possible loss of data\n#endif\n\nnamespace cv\n{\n\n//! @addtogroup core_eigen\n//! @{\n\ntemplate<typename _Tp, int _rows, int _cols, int _options, int _maxRows, int _maxCols> static inline\nvoid eigen2cv( const Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxCols>& src, Mat& dst )\n{\n    if( !(src.Flags & Eigen::RowMajorBit) )\n    {\n        Mat _src(src.cols(), src.rows(), DataType<_Tp>::type,\n              (void*)src.data(), src.stride()*sizeof(_Tp));\n        transpose(_src, dst);\n    }\n    else\n    {\n        Mat _src(src.rows(), src.cols(), DataType<_Tp>::type,\n                 (void*)src.data(), src.stride()*sizeof(_Tp));\n        _src.copyTo(dst);\n    }\n}\n\n// Matx case\ntemplate<typename _Tp, int _rows, int _cols, int _options, int _maxRows, int _maxCols> static inline\nvoid eigen2cv( const Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxCols>& src,\n               Matx<_Tp, _rows, _cols>& dst )\n{\n    if( !(src.Flags & Eigen::RowMajorBit) )\n    {\n        dst = Matx<_Tp, _cols, _rows>(static_cast<const _Tp*>(src.data())).t();\n    }\n    else\n    {\n        dst = Matx<_Tp, _rows, _cols>(static_cast<const _Tp*>(src.data()));\n    }\n}\n\ntemplate<typename _Tp, int _rows, int _cols, int _options, int _maxRows, int _maxCols> static inline\nvoid cv2eigen( const Mat& src,\n               Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxCols>& dst )\n{\n    CV_DbgAssert(src.rows == _rows && src.cols == _cols);\n    if( !(dst.Flags & Eigen::RowMajorBit) )\n    {\n        const Mat _dst(src.cols, src.rows, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        if( src.type() == _dst.type() )\n            transpose(src, _dst);\n        else if( src.cols == src.rows )\n        {\n            src.convertTo(_dst, _dst.type());\n            transpose(_dst, _dst);\n        }\n        else\n            Mat(src.t()).convertTo(_dst, _dst.type());\n    }\n    else\n    {\n        const Mat _dst(src.rows, src.cols, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        src.convertTo(_dst, _dst.type());\n    }\n}\n\n// Matx case\ntemplate<typename _Tp, int _rows, int _cols, int _options, int _maxRows, int _maxCols> static inline\nvoid cv2eigen( const Matx<_Tp, _rows, _cols>& src,\n               Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxCols>& dst )\n{\n    if( !(dst.Flags & Eigen::RowMajorBit) )\n    {\n        const Mat _dst(_cols, _rows, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        transpose(src, _dst);\n    }\n    else\n    {\n        const Mat _dst(_rows, _cols, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        Mat(src).copyTo(_dst);\n    }\n}\n\ntemplate<typename _Tp>  static inline\nvoid cv2eigen( const Mat& src,\n               Eigen::Matrix<_Tp, Eigen::Dynamic, Eigen::Dynamic>& dst )\n{\n    dst.resize(src.rows, src.cols);\n    if( !(dst.Flags & Eigen::RowMajorBit) )\n    {\n        const Mat _dst(src.cols, src.rows, DataType<_Tp>::type,\n             dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        if( src.type() == _dst.type() )\n            transpose(src, _dst);\n        else if( src.cols == src.rows )\n        {\n            src.convertTo(_dst, _dst.type());\n            transpose(_dst, _dst);\n        }\n        else\n            Mat(src.t()).convertTo(_dst, _dst.type());\n    }\n    else\n    {\n        const Mat _dst(src.rows, src.cols, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        src.convertTo(_dst, _dst.type());\n    }\n}\n\n// Matx case\ntemplate<typename _Tp, int _rows, int _cols> static inline\nvoid cv2eigen( const Matx<_Tp, _rows, _cols>& src,\n               Eigen::Matrix<_Tp, Eigen::Dynamic, Eigen::Dynamic>& dst )\n{\n    dst.resize(_rows, _cols);\n    if( !(dst.Flags & Eigen::RowMajorBit) )\n    {\n        const Mat _dst(_cols, _rows, DataType<_Tp>::type,\n             dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        transpose(src, _dst);\n    }\n    else\n    {\n        const Mat _dst(_rows, _cols, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        Mat(src).copyTo(_dst);\n    }\n}\n\ntemplate<typename _Tp> static inline\nvoid cv2eigen( const Mat& src,\n               Eigen::Matrix<_Tp, Eigen::Dynamic, 1>& dst )\n{\n    CV_Assert(src.cols == 1);\n    dst.resize(src.rows);\n\n    if( !(dst.Flags & Eigen::RowMajorBit) )\n    {\n        const Mat _dst(src.cols, src.rows, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        if( src.type() == _dst.type() )\n            transpose(src, _dst);\n        else\n            Mat(src.t()).convertTo(_dst, _dst.type());\n    }\n    else\n    {\n        const Mat _dst(src.rows, src.cols, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        src.convertTo(_dst, _dst.type());\n    }\n}\n\n// Matx case\ntemplate<typename _Tp, int _rows> static inline\nvoid cv2eigen( const Matx<_Tp, _rows, 1>& src,\n               Eigen::Matrix<_Tp, Eigen::Dynamic, 1>& dst )\n{\n    dst.resize(_rows);\n\n    if( !(dst.Flags & Eigen::RowMajorBit) )\n    {\n        const Mat _dst(1, _rows, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        transpose(src, _dst);\n    }\n    else\n    {\n        const Mat _dst(_rows, 1, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        src.copyTo(_dst);\n    }\n}\n\n\ntemplate<typename _Tp> static inline\nvoid cv2eigen( const Mat& src,\n               Eigen::Matrix<_Tp, 1, Eigen::Dynamic>& dst )\n{\n    CV_Assert(src.rows == 1);\n    dst.resize(src.cols);\n    if( !(dst.Flags & Eigen::RowMajorBit) )\n    {\n        const Mat _dst(src.cols, src.rows, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        if( src.type() == _dst.type() )\n            transpose(src, _dst);\n        else\n            Mat(src.t()).convertTo(_dst, _dst.type());\n    }\n    else\n    {\n        const Mat _dst(src.rows, src.cols, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        src.convertTo(_dst, _dst.type());\n    }\n}\n\n//Matx\ntemplate<typename _Tp, int _cols> static inline\nvoid cv2eigen( const Matx<_Tp, 1, _cols>& src,\n               Eigen::Matrix<_Tp, 1, Eigen::Dynamic>& dst )\n{\n    dst.resize(_cols);\n    if( !(dst.Flags & Eigen::RowMajorBit) )\n    {\n        const Mat _dst(_cols, 1, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        transpose(src, _dst);\n    }\n    else\n    {\n        const Mat _dst(1, _cols, DataType<_Tp>::type,\n                 dst.data(), (size_t)(dst.stride()*sizeof(_Tp)));\n        Mat(src).copyTo(_dst);\n    }\n}\n\n//! @}\n\n} // cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/ippasync.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2015, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_IPPASYNC_HPP__\n#define __OPENCV_CORE_IPPASYNC_HPP__\n\n#ifdef HAVE_IPP_A\n\n#include \"opencv2/core.hpp\"\n#include <ipp_async_op.h>\n#include <ipp_async_accel.h>\n\nnamespace cv\n{\n\nnamespace hpp\n{\n\n/** @addtogroup core_ipp\nThis section describes conversion between OpenCV and [Intel&reg; IPP Asynchronous\nC/C++](http://software.intel.com/en-us/intel-ipp-preview) library. [Getting Started\nGuide](http://registrationcenter.intel.com/irc_nas/3727/ipp_async_get_started.htm) help you to\ninstall the library, configure header and library build paths.\n */\n//! @{\n\n    //! convert OpenCV data type to hppDataType\n    inline int toHppType(const int cvType)\n    {\n        int depth = CV_MAT_DEPTH(cvType);\n        int hppType = depth == CV_8U ? HPP_DATA_TYPE_8U :\n                     depth == CV_16U ? HPP_DATA_TYPE_16U :\n                     depth == CV_16S ? HPP_DATA_TYPE_16S :\n                     depth == CV_32S ? HPP_DATA_TYPE_32S :\n                     depth == CV_32F ? HPP_DATA_TYPE_32F :\n                     depth == CV_64F ? HPP_DATA_TYPE_64F : -1;\n        CV_Assert( hppType >= 0 );\n        return hppType;\n    }\n\n    //! convert hppDataType to OpenCV data type\n    inline int toCvType(const int hppType)\n    {\n        int cvType = hppType == HPP_DATA_TYPE_8U ? CV_8U :\n                    hppType == HPP_DATA_TYPE_16U ? CV_16U :\n                    hppType == HPP_DATA_TYPE_16S ? CV_16S :\n                    hppType == HPP_DATA_TYPE_32S ? CV_32S :\n                    hppType == HPP_DATA_TYPE_32F ? CV_32F :\n                    hppType == HPP_DATA_TYPE_64F ? CV_64F : -1;\n        CV_Assert( cvType >= 0 );\n        return cvType;\n    }\n\n    /** @brief Convert hppiMatrix to Mat.\n\n    This function allocates and initializes new matrix (if needed) that has the same size and type as\n    input matrix. Supports CV_8U, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F.\n    @param src input hppiMatrix.\n    @param dst output matrix.\n    @param accel accelerator instance (see hpp::getHpp for the list of acceleration framework types).\n    @param cn number of channels.\n     */\n    inline void copyHppToMat(hppiMatrix* src, Mat& dst, hppAccel accel, int cn)\n    {\n        hppDataType type;\n        hpp32u width, height;\n        hppStatus sts;\n\n        if (src == NULL)\n            return dst.release();\n\n        sts = hppiInquireMatrix(src, &type, &width, &height);\n\n        CV_Assert( sts == HPP_STATUS_NO_ERROR);\n\n        int matType = CV_MAKETYPE(toCvType(type), cn);\n\n        CV_Assert(width%cn == 0);\n\n        width /= cn;\n\n        dst.create((int)height, (int)width, (int)matType);\n\n        size_t newSize = (size_t)(height*(hpp32u)(dst.step));\n\n        sts = hppiGetMatrixData(accel,src,(hpp32u)(dst.step),dst.data,&newSize);\n\n        CV_Assert( sts == HPP_STATUS_NO_ERROR);\n    }\n\n    /** @brief Create Mat from hppiMatrix.\n\n    This function allocates and initializes the Mat that has the same size and type as input matrix.\n    Supports CV_8U, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F.\n    @param src input hppiMatrix.\n    @param accel accelerator instance (see hpp::getHpp for the list of acceleration framework types).\n    @param cn number of channels.\n    @sa howToUseIPPAconversion, hpp::copyHppToMat, hpp::getHpp.\n     */\n    inline Mat getMat(hppiMatrix* src, hppAccel accel, int cn)\n    {\n        Mat dst;\n        copyHppToMat(src, dst, accel, cn);\n        return dst;\n    }\n\n    /** @brief Create hppiMatrix from Mat.\n\n    This function allocates and initializes the hppiMatrix that has the same size and type as input\n    matrix, returns the hppiMatrix*.\n\n    If you want to use zero-copy for GPU you should to have 4KB aligned matrix data. See details\n    [hppiCreateSharedMatrix](http://software.intel.com/ru-ru/node/501697).\n\n    Supports CV_8U, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F.\n\n    @note The hppiMatrix pointer to the image buffer in system memory refers to the src.data. Control\n    the lifetime of the matrix and don't change its data, if there is no special need.\n    @param src input matrix.\n    @param accel accelerator instance. Supports type:\n    -   **HPP_ACCEL_TYPE_CPU** - accelerated by optimized CPU instructions.\n    -   **HPP_ACCEL_TYPE_GPU** - accelerated by GPU programmable units or fixed-function\n        accelerators.\n    -   **HPP_ACCEL_TYPE_ANY** - any acceleration or no acceleration available.\n    @sa howToUseIPPAconversion, hpp::getMat\n     */\n    inline hppiMatrix* getHpp(const Mat& src, hppAccel accel)\n    {\n        int htype = toHppType(src.type());\n        int cn = src.channels();\n\n        CV_Assert(src.data);\n        hppAccelType accelType = hppQueryAccelType(accel);\n\n        if (accelType!=HPP_ACCEL_TYPE_CPU)\n        {\n            hpp32u pitch, size;\n            hppQueryMatrixAllocParams(accel, src.cols*cn, src.rows, htype, &pitch, &size);\n            if (pitch!=0 && size!=0)\n                if ((int)(src.data)%4096==0 && pitch==(hpp32u)(src.step))\n                {\n                    return hppiCreateSharedMatrix(htype, src.cols*cn, src.rows, src.data, pitch, size);\n                }\n        }\n\n        return hppiCreateMatrix(htype, src.cols*cn, src.rows, src.data, (hpp32s)(src.step));;\n    }\n\n//! @}\n}}\n\n#endif\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/mat.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_MAT_HPP__\n#define __OPENCV_CORE_MAT_HPP__\n\n#ifndef __cplusplus\n#  error mat.hpp header must be compiled as C++\n#endif\n\n#include \"opencv2/core/matx.hpp\"\n#include \"opencv2/core/types.hpp\"\n\n#include \"opencv2/core/bufferpool.hpp\"\n\nnamespace cv\n{\n\n//! @addtogroup core_basic\n//! @{\n\nenum { ACCESS_READ=1<<24, ACCESS_WRITE=1<<25,\n    ACCESS_RW=3<<24, ACCESS_MASK=ACCESS_RW, ACCESS_FAST=1<<26 };\n\nclass CV_EXPORTS _OutputArray;\n\n//////////////////////// Input/Output Array Arguments /////////////////////////////////\n\n/** @brief This is the proxy class for passing read-only input arrays into OpenCV functions.\n\nIt is defined as:\n@code\n    typedef const _InputArray& InputArray;\n@endcode\nwhere _InputArray is a class that can be constructed from `Mat`, `Mat_<T>`, `Matx<T, m, n>`,\n`std::vector<T>`, `std::vector<std::vector<T> >` or `std::vector<Mat>`. It can also be constructed\nfrom a matrix expression.\n\nSince this is mostly implementation-level class, and its interface may change in future versions, we\ndo not describe it in details. There are a few key things, though, that should be kept in mind:\n\n-   When you see in the reference manual or in OpenCV source code a function that takes\n    InputArray, it means that you can actually pass `Mat`, `Matx`, `vector<T>` etc. (see above the\n    complete list).\n-   Optional input arguments: If some of the input arrays may be empty, pass cv::noArray() (or\n    simply cv::Mat() as you probably did before).\n-   The class is designed solely for passing parameters. That is, normally you *should not*\n    declare class members, local and global variables of this type.\n-   If you want to design your own function or a class method that can operate of arrays of\n    multiple types, you can use InputArray (or OutputArray) for the respective parameters. Inside\n    a function you should use _InputArray::getMat() method to construct a matrix header for the\n    array (without copying data). _InputArray::kind() can be used to distinguish Mat from\n    `vector<>` etc., but normally it is not needed.\n\nHere is how you can use a function that takes InputArray :\n@code\n    std::vector<Point2f> vec;\n    // points or a circle\n    for( int i = 0; i < 30; i++ )\n        vec.push_back(Point2f((float)(100 + 30*cos(i*CV_PI*2/5)),\n                              (float)(100 - 30*sin(i*CV_PI*2/5))));\n    cv::transform(vec, vec, cv::Matx23f(0.707, -0.707, 10, 0.707, 0.707, 20));\n@endcode\nThat is, we form an STL vector containing points, and apply in-place affine transformation to the\nvector using the 2x3 matrix created inline as `Matx<float, 2, 3>` instance.\n\nHere is how such a function can be implemented (for simplicity, we implement a very specific case of\nit, according to the assertion statement inside) :\n@code\n    void myAffineTransform(InputArray _src, OutputArray _dst, InputArray _m)\n    {\n        // get Mat headers for input arrays. This is O(1) operation,\n        // unless _src and/or _m are matrix expressions.\n        Mat src = _src.getMat(), m = _m.getMat();\n        CV_Assert( src.type() == CV_32FC2 && m.type() == CV_32F && m.size() == Size(3, 2) );\n\n        // [re]create the output array so that it has the proper size and type.\n        // In case of Mat it calls Mat::create, in case of STL vector it calls vector::resize.\n        _dst.create(src.size(), src.type());\n        Mat dst = _dst.getMat();\n\n        for( int i = 0; i < src.rows; i++ )\n            for( int j = 0; j < src.cols; j++ )\n            {\n                Point2f pt = src.at<Point2f>(i, j);\n                dst.at<Point2f>(i, j) = Point2f(m.at<float>(0, 0)*pt.x +\n                                                m.at<float>(0, 1)*pt.y +\n                                                m.at<float>(0, 2),\n                                                m.at<float>(1, 0)*pt.x +\n                                                m.at<float>(1, 1)*pt.y +\n                                                m.at<float>(1, 2));\n            }\n    }\n@endcode\nThere is another related type, InputArrayOfArrays, which is currently defined as a synonym for\nInputArray:\n@code\n    typedef InputArray InputArrayOfArrays;\n@endcode\nIt denotes function arguments that are either vectors of vectors or vectors of matrices. A separate\nsynonym is needed to generate Python/Java etc. wrappers properly. At the function implementation\nlevel their use is similar, but _InputArray::getMat(idx) should be used to get header for the\nidx-th component of the outer vector and _InputArray::size().area() should be used to find the\nnumber of components (vectors/matrices) of the outer vector.\n */\nclass CV_EXPORTS _InputArray\n{\npublic:\n    enum {\n        KIND_SHIFT = 16,\n        FIXED_TYPE = 0x8000 << KIND_SHIFT,\n        FIXED_SIZE = 0x4000 << KIND_SHIFT,\n        KIND_MASK = 31 << KIND_SHIFT,\n\n        NONE              = 0 << KIND_SHIFT,\n        MAT               = 1 << KIND_SHIFT,\n        MATX              = 2 << KIND_SHIFT,\n        STD_VECTOR        = 3 << KIND_SHIFT,\n        STD_VECTOR_VECTOR = 4 << KIND_SHIFT,\n        STD_VECTOR_MAT    = 5 << KIND_SHIFT,\n        EXPR              = 6 << KIND_SHIFT,\n        OPENGL_BUFFER     = 7 << KIND_SHIFT,\n        CUDA_HOST_MEM     = 8 << KIND_SHIFT,\n        CUDA_GPU_MAT      = 9 << KIND_SHIFT,\n        UMAT              =10 << KIND_SHIFT,\n        STD_VECTOR_UMAT   =11 << KIND_SHIFT,\n        STD_BOOL_VECTOR   =12 << KIND_SHIFT\n    };\n\n    _InputArray();\n    _InputArray(int _flags, void* _obj);\n    _InputArray(const Mat& m);\n    _InputArray(const MatExpr& expr);\n    _InputArray(const std::vector<Mat>& vec);\n    template<typename _Tp> _InputArray(const Mat_<_Tp>& m);\n    template<typename _Tp> _InputArray(const std::vector<_Tp>& vec);\n    _InputArray(const std::vector<bool>& vec);\n    template<typename _Tp> _InputArray(const std::vector<std::vector<_Tp> >& vec);\n    template<typename _Tp> _InputArray(const std::vector<Mat_<_Tp> >& vec);\n    template<typename _Tp> _InputArray(const _Tp* vec, int n);\n    template<typename _Tp, int m, int n> _InputArray(const Matx<_Tp, m, n>& matx);\n    _InputArray(const double& val);\n    _InputArray(const cuda::GpuMat& d_mat);\n    _InputArray(const ogl::Buffer& buf);\n    _InputArray(const cuda::HostMem& cuda_mem);\n    template<typename _Tp> _InputArray(const cudev::GpuMat_<_Tp>& m);\n    _InputArray(const UMat& um);\n    _InputArray(const std::vector<UMat>& umv);\n\n    Mat getMat(int idx=-1) const;\n    Mat getMat_(int idx=-1) const;\n    UMat getUMat(int idx=-1) const;\n    void getMatVector(std::vector<Mat>& mv) const;\n    void getUMatVector(std::vector<UMat>& umv) const;\n    cuda::GpuMat getGpuMat() const;\n    ogl::Buffer getOGlBuffer() const;\n\n    int getFlags() const;\n    void* getObj() const;\n    Size getSz() const;\n\n    int kind() const;\n    int dims(int i=-1) const;\n    int cols(int i=-1) const;\n    int rows(int i=-1) const;\n    Size size(int i=-1) const;\n    int sizend(int* sz, int i=-1) const;\n    bool sameSize(const _InputArray& arr) const;\n    size_t total(int i=-1) const;\n    int type(int i=-1) const;\n    int depth(int i=-1) const;\n    int channels(int i=-1) const;\n    bool isContinuous(int i=-1) const;\n    bool isSubmatrix(int i=-1) const;\n    bool empty() const;\n    void copyTo(const _OutputArray& arr) const;\n    void copyTo(const _OutputArray& arr, const _InputArray & mask) const;\n    size_t offset(int i=-1) const;\n    size_t step(int i=-1) const;\n    bool isMat() const;\n    bool isUMat() const;\n    bool isMatVector() const;\n    bool isUMatVector() const;\n    bool isMatx() const;\n\n    ~_InputArray();\n\nprotected:\n    int flags;\n    void* obj;\n    Size sz;\n\n    void init(int _flags, const void* _obj);\n    void init(int _flags, const void* _obj, Size _sz);\n};\n\n\n/** @brief This type is very similar to InputArray except that it is used for input/output and output function\nparameters.\n\nJust like with InputArray, OpenCV users should not care about OutputArray, they just pass `Mat`,\n`vector<T>` etc. to the functions. The same limitation as for `InputArray`: *Do not explicitly\ncreate OutputArray instances* applies here too.\n\nIf you want to make your function polymorphic (i.e. accept different arrays as output parameters),\nit is also not very difficult. Take the sample above as the reference. Note that\n_OutputArray::create() needs to be called before _OutputArray::getMat(). This way you guarantee\nthat the output array is properly allocated.\n\nOptional output parameters. If you do not need certain output array to be computed and returned to\nyou, pass cv::noArray(), just like you would in the case of optional input array. At the\nimplementation level, use _OutputArray::needed() to check if certain output array needs to be\ncomputed or not.\n\nThere are several synonyms for OutputArray that are used to assist automatic Python/Java/... wrapper\ngenerators:\n@code\n    typedef OutputArray OutputArrayOfArrays;\n    typedef OutputArray InputOutputArray;\n    typedef OutputArray InputOutputArrayOfArrays;\n@endcode\n */\nclass CV_EXPORTS _OutputArray : public _InputArray\n{\npublic:\n    enum\n    {\n        DEPTH_MASK_8U = 1 << CV_8U,\n        DEPTH_MASK_8S = 1 << CV_8S,\n        DEPTH_MASK_16U = 1 << CV_16U,\n        DEPTH_MASK_16S = 1 << CV_16S,\n        DEPTH_MASK_32S = 1 << CV_32S,\n        DEPTH_MASK_32F = 1 << CV_32F,\n        DEPTH_MASK_64F = 1 << CV_64F,\n        DEPTH_MASK_ALL = (DEPTH_MASK_64F<<1)-1,\n        DEPTH_MASK_ALL_BUT_8S = DEPTH_MASK_ALL & ~DEPTH_MASK_8S,\n        DEPTH_MASK_FLT = DEPTH_MASK_32F + DEPTH_MASK_64F\n    };\n\n    _OutputArray();\n    _OutputArray(int _flags, void* _obj);\n    _OutputArray(Mat& m);\n    _OutputArray(std::vector<Mat>& vec);\n    _OutputArray(cuda::GpuMat& d_mat);\n    _OutputArray(ogl::Buffer& buf);\n    _OutputArray(cuda::HostMem& cuda_mem);\n    template<typename _Tp> _OutputArray(cudev::GpuMat_<_Tp>& m);\n    template<typename _Tp> _OutputArray(std::vector<_Tp>& vec);\n    _OutputArray(std::vector<bool>& vec);\n    template<typename _Tp> _OutputArray(std::vector<std::vector<_Tp> >& vec);\n    template<typename _Tp> _OutputArray(std::vector<Mat_<_Tp> >& vec);\n    template<typename _Tp> _OutputArray(Mat_<_Tp>& m);\n    template<typename _Tp> _OutputArray(_Tp* vec, int n);\n    template<typename _Tp, int m, int n> _OutputArray(Matx<_Tp, m, n>& matx);\n    _OutputArray(UMat& m);\n    _OutputArray(std::vector<UMat>& vec);\n\n    _OutputArray(const Mat& m);\n    _OutputArray(const std::vector<Mat>& vec);\n    _OutputArray(const cuda::GpuMat& d_mat);\n    _OutputArray(const ogl::Buffer& buf);\n    _OutputArray(const cuda::HostMem& cuda_mem);\n    template<typename _Tp> _OutputArray(const cudev::GpuMat_<_Tp>& m);\n    template<typename _Tp> _OutputArray(const std::vector<_Tp>& vec);\n    template<typename _Tp> _OutputArray(const std::vector<std::vector<_Tp> >& vec);\n    template<typename _Tp> _OutputArray(const std::vector<Mat_<_Tp> >& vec);\n    template<typename _Tp> _OutputArray(const Mat_<_Tp>& m);\n    template<typename _Tp> _OutputArray(const _Tp* vec, int n);\n    template<typename _Tp, int m, int n> _OutputArray(const Matx<_Tp, m, n>& matx);\n    _OutputArray(const UMat& m);\n    _OutputArray(const std::vector<UMat>& vec);\n\n    bool fixedSize() const;\n    bool fixedType() const;\n    bool needed() const;\n    Mat& getMatRef(int i=-1) const;\n    UMat& getUMatRef(int i=-1) const;\n    cuda::GpuMat& getGpuMatRef() const;\n    ogl::Buffer& getOGlBufferRef() const;\n    cuda::HostMem& getHostMemRef() const;\n    void create(Size sz, int type, int i=-1, bool allowTransposed=false, int fixedDepthMask=0) const;\n    void create(int rows, int cols, int type, int i=-1, bool allowTransposed=false, int fixedDepthMask=0) const;\n    void create(int dims, const int* size, int type, int i=-1, bool allowTransposed=false, int fixedDepthMask=0) const;\n    void createSameSize(const _InputArray& arr, int mtype) const;\n    void release() const;\n    void clear() const;\n    void setTo(const _InputArray& value, const _InputArray & mask = _InputArray()) const;\n\n    void assign(const UMat& u) const;\n    void assign(const Mat& m) const;\n};\n\n\nclass CV_EXPORTS _InputOutputArray : public _OutputArray\n{\npublic:\n    _InputOutputArray();\n    _InputOutputArray(int _flags, void* _obj);\n    _InputOutputArray(Mat& m);\n    _InputOutputArray(std::vector<Mat>& vec);\n    _InputOutputArray(cuda::GpuMat& d_mat);\n    _InputOutputArray(ogl::Buffer& buf);\n    _InputOutputArray(cuda::HostMem& cuda_mem);\n    template<typename _Tp> _InputOutputArray(cudev::GpuMat_<_Tp>& m);\n    template<typename _Tp> _InputOutputArray(std::vector<_Tp>& vec);\n    _InputOutputArray(std::vector<bool>& vec);\n    template<typename _Tp> _InputOutputArray(std::vector<std::vector<_Tp> >& vec);\n    template<typename _Tp> _InputOutputArray(std::vector<Mat_<_Tp> >& vec);\n    template<typename _Tp> _InputOutputArray(Mat_<_Tp>& m);\n    template<typename _Tp> _InputOutputArray(_Tp* vec, int n);\n    template<typename _Tp, int m, int n> _InputOutputArray(Matx<_Tp, m, n>& matx);\n    _InputOutputArray(UMat& m);\n    _InputOutputArray(std::vector<UMat>& vec);\n\n    _InputOutputArray(const Mat& m);\n    _InputOutputArray(const std::vector<Mat>& vec);\n    _InputOutputArray(const cuda::GpuMat& d_mat);\n    _InputOutputArray(const ogl::Buffer& buf);\n    _InputOutputArray(const cuda::HostMem& cuda_mem);\n    template<typename _Tp> _InputOutputArray(const cudev::GpuMat_<_Tp>& m);\n    template<typename _Tp> _InputOutputArray(const std::vector<_Tp>& vec);\n    template<typename _Tp> _InputOutputArray(const std::vector<std::vector<_Tp> >& vec);\n    template<typename _Tp> _InputOutputArray(const std::vector<Mat_<_Tp> >& vec);\n    template<typename _Tp> _InputOutputArray(const Mat_<_Tp>& m);\n    template<typename _Tp> _InputOutputArray(const _Tp* vec, int n);\n    template<typename _Tp, int m, int n> _InputOutputArray(const Matx<_Tp, m, n>& matx);\n    _InputOutputArray(const UMat& m);\n    _InputOutputArray(const std::vector<UMat>& vec);\n};\n\ntypedef const _InputArray& InputArray;\ntypedef InputArray InputArrayOfArrays;\ntypedef const _OutputArray& OutputArray;\ntypedef OutputArray OutputArrayOfArrays;\ntypedef const _InputOutputArray& InputOutputArray;\ntypedef InputOutputArray InputOutputArrayOfArrays;\n\nCV_EXPORTS InputOutputArray noArray();\n\n/////////////////////////////////// MatAllocator //////////////////////////////////////\n\n//! Usage flags for allocator\nenum UMatUsageFlags\n{\n    USAGE_DEFAULT = 0,\n\n    // buffer allocation policy is platform and usage specific\n    USAGE_ALLOCATE_HOST_MEMORY = 1 << 0,\n    USAGE_ALLOCATE_DEVICE_MEMORY = 1 << 1,\n    USAGE_ALLOCATE_SHARED_MEMORY = 1 << 2, // It is not equal to: USAGE_ALLOCATE_HOST_MEMORY | USAGE_ALLOCATE_DEVICE_MEMORY\n\n    __UMAT_USAGE_FLAGS_32BIT = 0x7fffffff // Binary compatibility hint\n};\n\nstruct CV_EXPORTS UMatData;\n\n/** @brief  Custom array allocator\n*/\nclass CV_EXPORTS MatAllocator\n{\npublic:\n    MatAllocator() {}\n    virtual ~MatAllocator() {}\n\n    // let's comment it off for now to detect and fix all the uses of allocator\n    //virtual void allocate(int dims, const int* sizes, int type, int*& refcount,\n    //                      uchar*& datastart, uchar*& data, size_t* step) = 0;\n    //virtual void deallocate(int* refcount, uchar* datastart, uchar* data) = 0;\n    virtual UMatData* allocate(int dims, const int* sizes, int type,\n                               void* data, size_t* step, int flags, UMatUsageFlags usageFlags) const = 0;\n    virtual bool allocate(UMatData* data, int accessflags, UMatUsageFlags usageFlags) const = 0;\n    virtual void deallocate(UMatData* data) const = 0;\n    virtual void map(UMatData* data, int accessflags) const;\n    virtual void unmap(UMatData* data) const;\n    virtual void download(UMatData* data, void* dst, int dims, const size_t sz[],\n                          const size_t srcofs[], const size_t srcstep[],\n                          const size_t dststep[]) const;\n    virtual void upload(UMatData* data, const void* src, int dims, const size_t sz[],\n                        const size_t dstofs[], const size_t dststep[],\n                        const size_t srcstep[]) const;\n    virtual void copy(UMatData* srcdata, UMatData* dstdata, int dims, const size_t sz[],\n                      const size_t srcofs[], const size_t srcstep[],\n                      const size_t dstofs[], const size_t dststep[], bool sync) const;\n\n    // default implementation returns DummyBufferPoolController\n    virtual BufferPoolController* getBufferPoolController(const char* id = NULL) const;\n};\n\n\n//////////////////////////////// MatCommaInitializer //////////////////////////////////\n\n/** @brief  Comma-separated Matrix Initializer\n\n The class instances are usually not created explicitly.\n Instead, they are created on \"matrix << firstValue\" operator.\n\n The sample below initializes 2x2 rotation matrix:\n\n \\code\n double angle = 30, a = cos(angle*CV_PI/180), b = sin(angle*CV_PI/180);\n Mat R = (Mat_<double>(2,2) << a, -b, b, a);\n \\endcode\n*/\ntemplate<typename _Tp> class MatCommaInitializer_\n{\npublic:\n    //! the constructor, created by \"matrix << firstValue\" operator, where matrix is cv::Mat\n    MatCommaInitializer_(Mat_<_Tp>* _m);\n    //! the operator that takes the next value and put it to the matrix\n    template<typename T2> MatCommaInitializer_<_Tp>& operator , (T2 v);\n    //! another form of conversion operator\n    operator Mat_<_Tp>() const;\nprotected:\n    MatIterator_<_Tp> it;\n};\n\n\n/////////////////////////////////////// Mat ///////////////////////////////////////////\n\n// note that umatdata might be allocated together\n// with the matrix data, not as a separate object.\n// therefore, it does not have constructor or destructor;\n// it should be explicitly initialized using init().\nstruct CV_EXPORTS UMatData\n{\n    enum { COPY_ON_MAP=1, HOST_COPY_OBSOLETE=2,\n        DEVICE_COPY_OBSOLETE=4, TEMP_UMAT=8, TEMP_COPIED_UMAT=24,\n        USER_ALLOCATED=32, DEVICE_MEM_MAPPED=64};\n    UMatData(const MatAllocator* allocator);\n    ~UMatData();\n\n    // provide atomic access to the structure\n    void lock();\n    void unlock();\n\n    bool hostCopyObsolete() const;\n    bool deviceCopyObsolete() const;\n    bool deviceMemMapped() const;\n    bool copyOnMap() const;\n    bool tempUMat() const;\n    bool tempCopiedUMat() const;\n    void markHostCopyObsolete(bool flag);\n    void markDeviceCopyObsolete(bool flag);\n    void markDeviceMemMapped(bool flag);\n\n    const MatAllocator* prevAllocator;\n    const MatAllocator* currAllocator;\n    int urefcount;\n    int refcount;\n    uchar* data;\n    uchar* origdata;\n    size_t size;\n\n    int flags;\n    void* handle;\n    void* userdata;\n    int allocatorFlags_;\n};\n\n\nstruct CV_EXPORTS UMatDataAutoLock\n{\n    explicit UMatDataAutoLock(UMatData* u);\n    ~UMatDataAutoLock();\n    UMatData* u;\n};\n\n\nstruct CV_EXPORTS MatSize\n{\n    explicit MatSize(int* _p);\n    Size operator()() const;\n    const int& operator[](int i) const;\n    int& operator[](int i);\n    operator const int*() const;\n    bool operator == (const MatSize& sz) const;\n    bool operator != (const MatSize& sz) const;\n\n    int* p;\n};\n\nstruct CV_EXPORTS MatStep\n{\n    MatStep();\n    explicit MatStep(size_t s);\n    const size_t& operator[](int i) const;\n    size_t& operator[](int i);\n    operator size_t() const;\n    MatStep& operator = (size_t s);\n\n    size_t* p;\n    size_t buf[2];\nprotected:\n    MatStep& operator = (const MatStep&);\n};\n\n/** @example cout_mat.cpp\nAn example demonstrating the serial out capabilities of cv::Mat\n*/\n\n /** @brief n-dimensional dense array class\n\nThe class Mat represents an n-dimensional dense numerical single-channel or multi-channel array. It\ncan be used to store real or complex-valued vectors and matrices, grayscale or color images, voxel\nvolumes, vector fields, point clouds, tensors, histograms (though, very high-dimensional histograms\nmay be better stored in a SparseMat ). The data layout of the array `M` is defined by the array\n`M.step[]`, so that the address of element \\f$(i_0,...,i_{M.dims-1})\\f$, where \\f$0\\leq i_k<M.size[k]\\f$, is\ncomputed as:\n\\f[addr(M_{i_0,...,i_{M.dims-1}}) = M.data + M.step[0]*i_0 + M.step[1]*i_1 + ... + M.step[M.dims-1]*i_{M.dims-1}\\f]\nIn case of a 2-dimensional array, the above formula is reduced to:\n\\f[addr(M_{i,j}) = M.data + M.step[0]*i + M.step[1]*j\\f]\nNote that `M.step[i] >= M.step[i+1]` (in fact, `M.step[i] >= M.step[i+1]*M.size[i+1]` ). This means\nthat 2-dimensional matrices are stored row-by-row, 3-dimensional matrices are stored plane-by-plane,\nand so on. M.step[M.dims-1] is minimal and always equal to the element size M.elemSize() .\n\nSo, the data layout in Mat is fully compatible with CvMat, IplImage, and CvMatND types from OpenCV\n1.x. It is also compatible with the majority of dense array types from the standard toolkits and\nSDKs, such as Numpy (ndarray), Win32 (independent device bitmaps), and others, that is, with any\narray that uses *steps* (or *strides*) to compute the position of a pixel. Due to this\ncompatibility, it is possible to make a Mat header for user-allocated data and process it in-place\nusing OpenCV functions.\n\nThere are many different ways to create a Mat object. The most popular options are listed below:\n\n- Use the create(nrows, ncols, type) method or the similar Mat(nrows, ncols, type[, fillValue])\nconstructor. A new array of the specified size and type is allocated. type has the same meaning as\nin the cvCreateMat method. For example, CV_8UC1 means a 8-bit single-channel array, CV_32FC2\nmeans a 2-channel (complex) floating-point array, and so on.\n@code\n    // make a 7x7 complex matrix filled with 1+3j.\n    Mat M(7,7,CV_32FC2,Scalar(1,3));\n    // and now turn M to a 100x60 15-channel 8-bit matrix.\n    // The old content will be deallocated\n    M.create(100,60,CV_8UC(15));\n@endcode\nAs noted in the introduction to this chapter, create() allocates only a new array when the shape\nor type of the current array are different from the specified ones.\n\n- Create a multi-dimensional array:\n@code\n    // create a 100x100x100 8-bit array\n    int sz[] = {100, 100, 100};\n    Mat bigCube(3, sz, CV_8U, Scalar::all(0));\n@endcode\nIt passes the number of dimensions =1 to the Mat constructor but the created array will be\n2-dimensional with the number of columns set to 1. So, Mat::dims is always \\>= 2 (can also be 0\nwhen the array is empty).\n\n- Use a copy constructor or assignment operator where there can be an array or expression on the\nright side (see below). As noted in the introduction, the array assignment is an O(1) operation\nbecause it only copies the header and increases the reference counter. The Mat::clone() method can\nbe used to get a full (deep) copy of the array when you need it.\n\n- Construct a header for a part of another array. It can be a single row, single column, several\nrows, several columns, rectangular region in the array (called a *minor* in algebra) or a\ndiagonal. Such operations are also O(1) because the new header references the same data. You can\nactually modify a part of the array using this feature, for example:\n@code\n    // add the 5-th row, multiplied by 3 to the 3rd row\n    M.row(3) = M.row(3) + M.row(5)*3;\n    // now copy the 7-th column to the 1-st column\n    // M.col(1) = M.col(7); // this will not work\n    Mat M1 = M.col(1);\n    M.col(7).copyTo(M1);\n    // create a new 320x240 image\n    Mat img(Size(320,240),CV_8UC3);\n    // select a ROI\n    Mat roi(img, Rect(10,10,100,100));\n    // fill the ROI with (0,255,0) (which is green in RGB space);\n    // the original 320x240 image will be modified\n    roi = Scalar(0,255,0);\n@endcode\nDue to the additional datastart and dataend members, it is possible to compute a relative\nsub-array position in the main *container* array using locateROI():\n@code\n    Mat A = Mat::eye(10, 10, CV_32S);\n    // extracts A columns, 1 (inclusive) to 3 (exclusive).\n    Mat B = A(Range::all(), Range(1, 3));\n    // extracts B rows, 5 (inclusive) to 9 (exclusive).\n    // that is, C \\~ A(Range(5, 9), Range(1, 3))\n    Mat C = B(Range(5, 9), Range::all());\n    Size size; Point ofs;\n    C.locateROI(size, ofs);\n    // size will be (width=10,height=10) and the ofs will be (x=1, y=5)\n@endcode\nAs in case of whole matrices, if you need a deep copy, use the `clone()` method of the extracted\nsub-matrices.\n\n- Make a header for user-allocated data. It can be useful to do the following:\n    -# Process \"foreign\" data using OpenCV (for example, when you implement a DirectShow\\* filter or\n    a processing module for gstreamer, and so on). For example:\n    @code\n        void process_video_frame(const unsigned char* pixels,\n                                 int width, int height, int step)\n        {\n            Mat img(height, width, CV_8UC3, pixels, step);\n            GaussianBlur(img, img, Size(7,7), 1.5, 1.5);\n        }\n    @endcode\n    -# Quickly initialize small matrices and/or get a super-fast element access.\n    @code\n        double m[3][3] = {{a, b, c}, {d, e, f}, {g, h, i}};\n        Mat M = Mat(3, 3, CV_64F, m).inv();\n    @endcode\n    .\n    Partial yet very common cases of this *user-allocated data* case are conversions from CvMat and\n    IplImage to Mat. For this purpose, there is function cv::cvarrToMat taking pointers to CvMat or\n    IplImage and the optional flag indicating whether to copy the data or not.\n    @snippet samples/cpp/image.cpp iplimage\n\n- Use MATLAB-style array initializers, zeros(), ones(), eye(), for example:\n@code\n    // create a double-precision identity martix and add it to M.\n    M += Mat::eye(M.rows, M.cols, CV_64F);\n@endcode\n\n- Use a comma-separated initializer:\n@code\n    // create a 3x3 double-precision identity matrix\n    Mat M = (Mat_<double>(3,3) << 1, 0, 0, 0, 1, 0, 0, 0, 1);\n@endcode\nWith this approach, you first call a constructor of the Mat class with the proper parameters, and\nthen you just put `<< operator` followed by comma-separated values that can be constants,\nvariables, expressions, and so on. Also, note the extra parentheses required to avoid compilation\nerrors.\n\nOnce the array is created, it is automatically managed via a reference-counting mechanism. If the\narray header is built on top of user-allocated data, you should handle the data by yourself. The\narray data is deallocated when no one points to it. If you want to release the data pointed by a\narray header before the array destructor is called, use Mat::release().\n\nThe next important thing to learn about the array class is element access. This manual already\ndescribed how to compute an address of each array element. Normally, you are not required to use the\nformula directly in the code. If you know the array element type (which can be retrieved using the\nmethod Mat::type() ), you can access the element \\f$M_{ij}\\f$ of a 2-dimensional array as:\n@code\n    M.at<double>(i,j) += 1.f;\n@endcode\nassuming that `M` is a double-precision floating-point array. There are several variants of the method\nat for a different number of dimensions.\n\nIf you need to process a whole row of a 2D array, the most efficient way is to get the pointer to\nthe row first, and then just use the plain C operator [] :\n@code\n    // compute sum of positive matrix elements\n    // (assuming that M isa double-precision matrix)\n    double sum=0;\n    for(int i = 0; i < M.rows; i++)\n    {\n        const double* Mi = M.ptr<double>(i);\n        for(int j = 0; j < M.cols; j++)\n            sum += std::max(Mi[j], 0.);\n    }\n@endcode\nSome operations, like the one above, do not actually depend on the array shape. They just process\nelements of an array one by one (or elements from multiple arrays that have the same coordinates,\nfor example, array addition). Such operations are called *element-wise*. It makes sense to check\nwhether all the input/output arrays are continuous, namely, have no gaps at the end of each row. If\nyes, process them as a long single row:\n@code\n    // compute the sum of positive matrix elements, optimized variant\n    double sum=0;\n    int cols = M.cols, rows = M.rows;\n    if(M.isContinuous())\n    {\n        cols *= rows;\n        rows = 1;\n    }\n    for(int i = 0; i < rows; i++)\n    {\n        const double* Mi = M.ptr<double>(i);\n        for(int j = 0; j < cols; j++)\n            sum += std::max(Mi[j], 0.);\n    }\n@endcode\nIn case of the continuous matrix, the outer loop body is executed just once. So, the overhead is\nsmaller, which is especially noticeable in case of small matrices.\n\nFinally, there are STL-style iterators that are smart enough to skip gaps between successive rows:\n@code\n    // compute sum of positive matrix elements, iterator-based variant\n    double sum=0;\n    MatConstIterator_<double> it = M.begin<double>(), it_end = M.end<double>();\n    for(; it != it_end; ++it)\n        sum += std::max(*it, 0.);\n@endcode\nThe matrix iterators are random-access iterators, so they can be passed to any STL algorithm,\nincluding std::sort().\n*/\nclass CV_EXPORTS Mat\n{\npublic:\n    /**\n    These are various constructors that form a matrix. As noted in the AutomaticAllocation, often\n    the default constructor is enough, and the proper matrix will be allocated by an OpenCV function.\n    The constructed matrix can further be assigned to another matrix or matrix expression or can be\n    allocated with Mat::create . In the former case, the old content is de-referenced.\n     */\n    Mat();\n\n    /** @overload\n    @param rows Number of rows in a 2D array.\n    @param cols Number of columns in a 2D array.\n    @param type Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or\n    CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.\n    */\n    Mat(int rows, int cols, int type);\n\n    /** @overload\n    @param size 2D array size: Size(cols, rows) . In the Size() constructor, the number of rows and the\n    number of columns go in the reverse order.\n    @param type Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or\n    CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.\n      */\n    Mat(Size size, int type);\n\n    /** @overload\n    @param rows Number of rows in a 2D array.\n    @param cols Number of columns in a 2D array.\n    @param type Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or\n    CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.\n    @param s An optional value to initialize each matrix element with. To set all the matrix elements to\n    the particular value after the construction, use the assignment operator\n    Mat::operator=(const Scalar& value) .\n    */\n    Mat(int rows, int cols, int type, const Scalar& s);\n\n    /** @overload\n    @param size 2D array size: Size(cols, rows) . In the Size() constructor, the number of rows and the\n    number of columns go in the reverse order.\n    @param type Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or\n    CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.\n    @param s An optional value to initialize each matrix element with. To set all the matrix elements to\n    the particular value after the construction, use the assignment operator\n    Mat::operator=(const Scalar& value) .\n      */\n    Mat(Size size, int type, const Scalar& s);\n\n    /** @overload\n    @param ndims Array dimensionality.\n    @param sizes Array of integers specifying an n-dimensional array shape.\n    @param type Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or\n    CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.\n    */\n    Mat(int ndims, const int* sizes, int type);\n\n    /** @overload\n    @param ndims Array dimensionality.\n    @param sizes Array of integers specifying an n-dimensional array shape.\n    @param type Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or\n    CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.\n    @param s An optional value to initialize each matrix element with. To set all the matrix elements to\n    the particular value after the construction, use the assignment operator\n    Mat::operator=(const Scalar& value) .\n    */\n    Mat(int ndims, const int* sizes, int type, const Scalar& s);\n\n    /** @overload\n    @param m Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied\n    by these constructors. Instead, the header pointing to m data or its sub-array is constructed and\n    associated with it. The reference counter, if any, is incremented. So, when you modify the matrix\n    formed using such a constructor, you also modify the corresponding elements of m . If you want to\n    have an independent copy of the sub-array, use Mat::clone() .\n    */\n    Mat(const Mat& m);\n\n    /** @overload\n    @param rows Number of rows in a 2D array.\n    @param cols Number of columns in a 2D array.\n    @param type Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or\n    CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.\n    @param data Pointer to the user data. Matrix constructors that take data and step parameters do not\n    allocate matrix data. Instead, they just initialize the matrix header that points to the specified\n    data, which means that no data is copied. This operation is very efficient and can be used to\n    process external data using OpenCV functions. The external data is not automatically deallocated, so\n    you should take care of it.\n    @param step Number of bytes each matrix row occupies. The value should include the padding bytes at\n    the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no padding is assumed\n    and the actual step is calculated as cols*elemSize(). See Mat::elemSize.\n    */\n    Mat(int rows, int cols, int type, void* data, size_t step=AUTO_STEP);\n\n    /** @overload\n    @param size 2D array size: Size(cols, rows) . In the Size() constructor, the number of rows and the\n    number of columns go in the reverse order.\n    @param type Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or\n    CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.\n    @param data Pointer to the user data. Matrix constructors that take data and step parameters do not\n    allocate matrix data. Instead, they just initialize the matrix header that points to the specified\n    data, which means that no data is copied. This operation is very efficient and can be used to\n    process external data using OpenCV functions. The external data is not automatically deallocated, so\n    you should take care of it.\n    @param step Number of bytes each matrix row occupies. The value should include the padding bytes at\n    the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no padding is assumed\n    and the actual step is calculated as cols*elemSize(). See Mat::elemSize.\n    */\n    Mat(Size size, int type, void* data, size_t step=AUTO_STEP);\n\n    /** @overload\n    @param ndims Array dimensionality.\n    @param sizes Array of integers specifying an n-dimensional array shape.\n    @param type Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or\n    CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.\n    @param data Pointer to the user data. Matrix constructors that take data and step parameters do not\n    allocate matrix data. Instead, they just initialize the matrix header that points to the specified\n    data, which means that no data is copied. This operation is very efficient and can be used to\n    process external data using OpenCV functions. The external data is not automatically deallocated, so\n    you should take care of it.\n    @param steps Array of ndims-1 steps in case of a multi-dimensional array (the last step is always\n    set to the element size). If not specified, the matrix is assumed to be continuous.\n    */\n    Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);\n\n    /** @overload\n    @param m Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied\n    by these constructors. Instead, the header pointing to m data or its sub-array is constructed and\n    associated with it. The reference counter, if any, is incremented. So, when you modify the matrix\n    formed using such a constructor, you also modify the corresponding elements of m . If you want to\n    have an independent copy of the sub-array, use Mat::clone() .\n    @param rowRange Range of the m rows to take. As usual, the range start is inclusive and the range\n    end is exclusive. Use Range::all() to take all the rows.\n    @param colRange Range of the m columns to take. Use Range::all() to take all the columns.\n    */\n    Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());\n\n    /** @overload\n    @param m Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied\n    by these constructors. Instead, the header pointing to m data or its sub-array is constructed and\n    associated with it. The reference counter, if any, is incremented. So, when you modify the matrix\n    formed using such a constructor, you also modify the corresponding elements of m . If you want to\n    have an independent copy of the sub-array, use Mat::clone() .\n    @param roi Region of interest.\n    */\n    Mat(const Mat& m, const Rect& roi);\n\n    /** @overload\n    @param m Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied\n    by these constructors. Instead, the header pointing to m data or its sub-array is constructed and\n    associated with it. The reference counter, if any, is incremented. So, when you modify the matrix\n    formed using such a constructor, you also modify the corresponding elements of m . If you want to\n    have an independent copy of the sub-array, use Mat::clone() .\n    @param ranges Array of selected ranges of m along each dimensionality.\n    */\n    Mat(const Mat& m, const Range* ranges);\n\n    /** @overload\n    @param vec STL vector whose elements form the matrix. The matrix has a single column and the number\n    of rows equal to the number of vector elements. Type of the matrix matches the type of vector\n    elements. The constructor can handle arbitrary types, for which there is a properly declared\n    DataType . This means that the vector elements must be primitive numbers or uni-type numerical\n    tuples of numbers. Mixed-type structures are not supported. The corresponding constructor is\n    explicit. Since STL vectors are not automatically converted to Mat instances, you should write\n    Mat(vec) explicitly. Unless you copy the data into the matrix ( copyData=true ), no new elements\n    will be added to the vector because it can potentially yield vector data reallocation, and, thus,\n    the matrix data pointer will be invalid.\n    @param copyData Flag to specify whether the underlying data of the STL vector should be copied\n    to (true) or shared with (false) the newly constructed matrix. When the data is copied, the\n    allocated buffer is managed using Mat reference counting mechanism. While the data is shared,\n    the reference counter is NULL, and you should not deallocate the data until the matrix is not\n    destructed.\n    */\n    template<typename _Tp> explicit Mat(const std::vector<_Tp>& vec, bool copyData=false);\n\n    /** @overload\n    */\n    template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);\n\n    /** @overload\n    */\n    template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);\n\n    /** @overload\n    */\n    template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);\n\n    /** @overload\n    */\n    template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);\n\n    /** @overload\n    */\n    template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);\n\n    //! download data from GpuMat\n    explicit Mat(const cuda::GpuMat& m);\n\n    //! destructor - calls release()\n    ~Mat();\n\n    /** @brief assignment operators\n\n    These are available assignment operators. Since they all are very different, make sure to read the\n    operator parameters description.\n    @param m Assigned, right-hand-side matrix. Matrix assignment is an O(1) operation. This means that\n    no data is copied but the data is shared and the reference counter, if any, is incremented. Before\n    assigning new data, the old data is de-referenced via Mat::release .\n     */\n    Mat& operator = (const Mat& m);\n\n    /** @overload\n    @param expr Assigned matrix expression object. As opposite to the first form of the assignment\n    operation, the second form can reuse already allocated matrix if it has the right size and type to\n    fit the matrix expression result. It is automatically handled by the real function that the matrix\n    expressions is expanded to. For example, C=A+B is expanded to add(A, B, C), and add takes care of\n    automatic C reallocation.\n    */\n    Mat& operator = (const MatExpr& expr);\n\n    //! retrieve UMat from Mat\n    UMat getUMat(int accessFlags, UMatUsageFlags usageFlags = USAGE_DEFAULT) const;\n\n    /** @brief Creates a matrix header for the specified matrix row.\n\n    The method makes a new header for the specified matrix row and returns it. This is an O(1)\n    operation, regardless of the matrix size. The underlying data of the new matrix is shared with the\n    original matrix. Here is the example of one of the classical basic matrix processing operations,\n    axpy, used by LU and many other algorithms:\n    @code\n        inline void matrix_axpy(Mat& A, int i, int j, double alpha)\n        {\n            A.row(i) += A.row(j)*alpha;\n        }\n    @endcode\n    @note In the current implementation, the following code does not work as expected:\n    @code\n        Mat A;\n        ...\n        A.row(i) = A.row(j); // will not work\n    @endcode\n    This happens because A.row(i) forms a temporary header that is further assigned to another header.\n    Remember that each of these operations is O(1), that is, no data is copied. Thus, the above\n    assignment is not true if you may have expected the j-th row to be copied to the i-th row. To\n    achieve that, you should either turn this simple assignment into an expression or use the\n    Mat::copyTo method:\n    @code\n        Mat A;\n        ...\n        // works, but looks a bit obscure.\n        A.row(i) = A.row(j) + 0;\n        // this is a bit longer, but the recommended method.\n        A.row(j).copyTo(A.row(i));\n    @endcode\n    @param y A 0-based row index.\n     */\n    Mat row(int y) const;\n\n    /** @brief Creates a matrix header for the specified matrix column.\n\n    The method makes a new header for the specified matrix column and returns it. This is an O(1)\n    operation, regardless of the matrix size. The underlying data of the new matrix is shared with the\n    original matrix. See also the Mat::row description.\n    @param x A 0-based column index.\n     */\n    Mat col(int x) const;\n\n    /** @brief Creates a matrix header for the specified row span.\n\n    The method makes a new header for the specified row span of the matrix. Similarly to Mat::row and\n    Mat::col , this is an O(1) operation.\n    @param startrow An inclusive 0-based start index of the row span.\n    @param endrow An exclusive 0-based ending index of the row span.\n     */\n    Mat rowRange(int startrow, int endrow) const;\n\n    /** @overload\n    @param r Range structure containing both the start and the end indices.\n    */\n    Mat rowRange(const Range& r) const;\n\n    /** @brief Creates a matrix header for the specified column span.\n\n    The method makes a new header for the specified column span of the matrix. Similarly to Mat::row and\n    Mat::col , this is an O(1) operation.\n    @param startcol An inclusive 0-based start index of the column span.\n    @param endcol An exclusive 0-based ending index of the column span.\n     */\n    Mat colRange(int startcol, int endcol) const;\n\n    /** @overload\n    @param r Range structure containing both the start and the end indices.\n    */\n    Mat colRange(const Range& r) const;\n\n    /** @brief Extracts a diagonal from a matrix\n\n    The method makes a new header for the specified matrix diagonal. The new matrix is represented as a\n    single-column matrix. Similarly to Mat::row and Mat::col, this is an O(1) operation.\n    @param d index of the diagonal, with the following values:\n    - `d=0` is the main diagonal.\n    - `d>0` is a diagonal from the lower half. For example, d=1 means the diagonal is set\n      immediately below the main one.\n    - `d<0` is a diagonal from the upper half. For example, d=-1 means the diagonal is set\n      immediately above the main one.\n     */\n    Mat diag(int d=0) const;\n\n    /** @brief creates a diagonal matrix\n\n    The method makes a new header for the specified matrix diagonal. The new matrix is represented as a\n    single-column matrix. Similarly to Mat::row and Mat::col, this is an O(1) operation.\n    @param d Single-column matrix that forms a diagonal matrix\n     */\n    static Mat diag(const Mat& d);\n\n    /** @brief Creates a full copy of the array and the underlying data.\n\n    The method creates a full copy of the array. The original step[] is not taken into account. So, the\n    array copy is a continuous array occupying total()*elemSize() bytes.\n     */\n    Mat clone() const;\n\n    /** @brief Copies the matrix to another one.\n\n    The method copies the matrix data to another matrix. Before copying the data, the method invokes :\n    @code\n        m.create(this->size(), this->type());\n    @endcode\n    so that the destination matrix is reallocated if needed. While m.copyTo(m); works flawlessly, the\n    function does not handle the case of a partial overlap between the source and the destination\n    matrices.\n\n    When the operation mask is specified, if the Mat::create call shown above reallocates the matrix,\n    the newly allocated matrix is initialized with all zeros before copying the data.\n    @param m Destination matrix. If it does not have a proper size or type before the operation, it is\n    reallocated.\n     */\n    void copyTo( OutputArray m ) const;\n\n    /** @overload\n    @param m Destination matrix. If it does not have a proper size or type before the operation, it is\n    reallocated.\n    @param mask Operation mask. Its non-zero elements indicate which matrix elements need to be copied.\n    */\n    void copyTo( OutputArray m, InputArray mask ) const;\n\n    /** @brief Converts an array to another data type with optional scaling.\n\n    The method converts source pixel values to the target data type. saturate_cast\\<\\> is applied at\n    the end to avoid possible overflows:\n\n    \\f[m(x,y) = saturate \\_ cast<rType>( \\alpha (*this)(x,y) +  \\beta )\\f]\n    @param m output matrix; if it does not have a proper size or type before the operation, it is\n    reallocated.\n    @param rtype desired output matrix type or, rather, the depth since the number of channels are the\n    same as the input has; if rtype is negative, the output matrix will have the same type as the input.\n    @param alpha optional scale factor.\n    @param beta optional delta added to the scaled values.\n     */\n    void convertTo( OutputArray m, int rtype, double alpha=1, double beta=0 ) const;\n\n    /** @brief Provides a functional form of convertTo.\n\n    This is an internally used method called by the @ref MatrixExpressions engine.\n    @param m Destination array.\n    @param type Desired destination array depth (or -1 if it should be the same as the source type).\n     */\n    void assignTo( Mat& m, int type=-1 ) const;\n\n    /** @brief Sets all or some of the array elements to the specified value.\n    @param s Assigned scalar converted to the actual array type.\n    */\n    Mat& operator = (const Scalar& s);\n\n    /** @brief Sets all or some of the array elements to the specified value.\n\n    This is an advanced variant of the Mat::operator=(const Scalar& s) operator.\n    @param value Assigned scalar converted to the actual array type.\n    @param mask Operation mask of the same size as \\*this.\n     */\n    Mat& setTo(InputArray value, InputArray mask=noArray());\n\n    /** @brief Changes the shape and/or the number of channels of a 2D matrix without copying the data.\n\n    The method makes a new matrix header for \\*this elements. The new matrix may have a different size\n    and/or different number of channels. Any combination is possible if:\n    -   No extra elements are included into the new matrix and no elements are excluded. Consequently,\n        the product rows\\*cols\\*channels() must stay the same after the transformation.\n    -   No data is copied. That is, this is an O(1) operation. Consequently, if you change the number of\n        rows, or the operation changes the indices of elements row in some other way, the matrix must be\n        continuous. See Mat::isContinuous .\n\n    For example, if there is a set of 3D points stored as an STL vector, and you want to represent the\n    points as a 3xN matrix, do the following:\n    @code\n        std::vector<Point3f> vec;\n        ...\n        Mat pointMat = Mat(vec). // convert vector to Mat, O(1) operation\n                          reshape(1). // make Nx3 1-channel matrix out of Nx1 3-channel.\n                                      // Also, an O(1) operation\n                             t(); // finally, transpose the Nx3 matrix.\n                                  // This involves copying all the elements\n    @endcode\n    @param cn New number of channels. If the parameter is 0, the number of channels remains the same.\n    @param rows New number of rows. If the parameter is 0, the number of rows remains the same.\n     */\n    Mat reshape(int cn, int rows=0) const;\n\n    /** @overload */\n    Mat reshape(int cn, int newndims, const int* newsz) const;\n\n    /** @brief Transposes a matrix.\n\n    The method performs matrix transposition by means of matrix expressions. It does not perform the\n    actual transposition but returns a temporary matrix transposition object that can be further used as\n    a part of more complex matrix expressions or can be assigned to a matrix:\n    @code\n        Mat A1 = A + Mat::eye(A.size(), A.type())*lambda;\n        Mat C = A1.t()*A1; // compute (A + lambda*I)^t * (A + lamda*I)\n    @endcode\n     */\n    MatExpr t() const;\n\n    /** @brief Inverses a matrix.\n\n    The method performs a matrix inversion by means of matrix expressions. This means that a temporary\n    matrix inversion object is returned by the method and can be used further as a part of more complex\n    matrix expressions or can be assigned to a matrix.\n    @param method Matrix inversion method. One of cv::DecompTypes\n     */\n    MatExpr inv(int method=DECOMP_LU) const;\n\n    /** @brief Performs an element-wise multiplication or division of the two matrices.\n\n    The method returns a temporary object encoding per-element array multiplication, with optional\n    scale. Note that this is not a matrix multiplication that corresponds to a simpler \"\\*\" operator.\n\n    Example:\n    @code\n        Mat C = A.mul(5/B); // equivalent to divide(A, B, C, 5)\n    @endcode\n    @param m Another array of the same type and the same size as \\*this, or a matrix expression.\n    @param scale Optional scale factor.\n     */\n    MatExpr mul(InputArray m, double scale=1) const;\n\n    /** @brief Computes a cross-product of two 3-element vectors.\n\n    The method computes a cross-product of two 3-element vectors. The vectors must be 3-element\n    floating-point vectors of the same shape and size. The result is another 3-element vector of the\n    same shape and type as operands.\n    @param m Another cross-product operand.\n     */\n    Mat cross(InputArray m) const;\n\n    /** @brief Computes a dot-product of two vectors.\n\n    The method computes a dot-product of two matrices. If the matrices are not single-column or\n    single-row vectors, the top-to-bottom left-to-right scan ordering is used to treat them as 1D\n    vectors. The vectors must have the same size and type. If the matrices have more than one channel,\n    the dot products from all the channels are summed together.\n    @param m another dot-product operand.\n     */\n    double dot(InputArray m) const;\n\n    /** @brief Returns a zero array of the specified size and type.\n\n    The method returns a Matlab-style zero array initializer. It can be used to quickly form a constant\n    array as a function parameter, part of a matrix expression, or as a matrix initializer. :\n    @code\n        Mat A;\n        A = Mat::zeros(3, 3, CV_32F);\n    @endcode\n    In the example above, a new matrix is allocated only if A is not a 3x3 floating-point matrix.\n    Otherwise, the existing matrix A is filled with zeros.\n    @param rows Number of rows.\n    @param cols Number of columns.\n    @param type Created matrix type.\n     */\n    static MatExpr zeros(int rows, int cols, int type);\n\n    /** @overload\n    @param size Alternative to the matrix size specification Size(cols, rows) .\n    @param type Created matrix type.\n    */\n    static MatExpr zeros(Size size, int type);\n\n    /** @overload\n    @param ndims Array dimensionality.\n    @param sz Array of integers specifying the array shape.\n    @param type Created matrix type.\n    */\n    static MatExpr zeros(int ndims, const int* sz, int type);\n\n    /** @brief Returns an array of all 1's of the specified size and type.\n\n    The method returns a Matlab-style 1's array initializer, similarly to Mat::zeros. Note that using\n    this method you can initialize an array with an arbitrary value, using the following Matlab idiom:\n    @code\n        Mat A = Mat::ones(100, 100, CV_8U)*3; // make 100x100 matrix filled with 3.\n    @endcode\n    The above operation does not form a 100x100 matrix of 1's and then multiply it by 3. Instead, it\n    just remembers the scale factor (3 in this case) and use it when actually invoking the matrix\n    initializer.\n    @param rows Number of rows.\n    @param cols Number of columns.\n    @param type Created matrix type.\n     */\n    static MatExpr ones(int rows, int cols, int type);\n\n    /** @overload\n    @param size Alternative to the matrix size specification Size(cols, rows) .\n    @param type Created matrix type.\n    */\n    static MatExpr ones(Size size, int type);\n\n    /** @overload\n    @param ndims Array dimensionality.\n    @param sz Array of integers specifying the array shape.\n    @param type Created matrix type.\n    */\n    static MatExpr ones(int ndims, const int* sz, int type);\n\n    /** @brief Returns an identity matrix of the specified size and type.\n\n    The method returns a Matlab-style identity matrix initializer, similarly to Mat::zeros. Similarly to\n    Mat::ones, you can use a scale operation to create a scaled identity matrix efficiently:\n    @code\n        // make a 4x4 diagonal matrix with 0.1's on the diagonal.\n        Mat A = Mat::eye(4, 4, CV_32F)*0.1;\n    @endcode\n    @param rows Number of rows.\n    @param cols Number of columns.\n    @param type Created matrix type.\n     */\n    static MatExpr eye(int rows, int cols, int type);\n\n    /** @overload\n    @param size Alternative matrix size specification as Size(cols, rows) .\n    @param type Created matrix type.\n    */\n    static MatExpr eye(Size size, int type);\n\n    /** @brief Allocates new array data if needed.\n\n    This is one of the key Mat methods. Most new-style OpenCV functions and methods that produce arrays\n    call this method for each output array. The method uses the following algorithm:\n\n    -# If the current array shape and the type match the new ones, return immediately. Otherwise,\n       de-reference the previous data by calling Mat::release.\n    -# Initialize the new header.\n    -# Allocate the new data of total()\\*elemSize() bytes.\n    -# Allocate the new, associated with the data, reference counter and set it to 1.\n\n    Such a scheme makes the memory management robust and efficient at the same time and helps avoid\n    extra typing for you. This means that usually there is no need to explicitly allocate output arrays.\n    That is, instead of writing:\n    @code\n        Mat color;\n        ...\n        Mat gray(color.rows, color.cols, color.depth());\n        cvtColor(color, gray, COLOR_BGR2GRAY);\n    @endcode\n    you can simply write:\n    @code\n        Mat color;\n        ...\n        Mat gray;\n        cvtColor(color, gray, COLOR_BGR2GRAY);\n    @endcode\n    because cvtColor, as well as the most of OpenCV functions, calls Mat::create() for the output array\n    internally.\n    @param rows New number of rows.\n    @param cols New number of columns.\n    @param type New matrix type.\n     */\n    void create(int rows, int cols, int type);\n\n    /** @overload\n    @param size Alternative new matrix size specification: Size(cols, rows)\n    @param type New matrix type.\n    */\n    void create(Size size, int type);\n\n    /** @overload\n    @param ndims New array dimensionality.\n    @param sizes Array of integers specifying a new array shape.\n    @param type New matrix type.\n    */\n    void create(int ndims, const int* sizes, int type);\n\n    /** @brief Increments the reference counter.\n\n    The method increments the reference counter associated with the matrix data. If the matrix header\n    points to an external data set (see Mat::Mat ), the reference counter is NULL, and the method has no\n    effect in this case. Normally, to avoid memory leaks, the method should not be called explicitly. It\n    is called implicitly by the matrix assignment operator. The reference counter increment is an atomic\n    operation on the platforms that support it. Thus, it is safe to operate on the same matrices\n    asynchronously in different threads.\n     */\n    void addref();\n\n    /** @brief Decrements the reference counter and deallocates the matrix if needed.\n\n    The method decrements the reference counter associated with the matrix data. When the reference\n    counter reaches 0, the matrix data is deallocated and the data and the reference counter pointers\n    are set to NULL's. If the matrix header points to an external data set (see Mat::Mat ), the\n    reference counter is NULL, and the method has no effect in this case.\n\n    This method can be called manually to force the matrix data deallocation. But since this method is\n    automatically called in the destructor, or by any other method that changes the data pointer, it is\n    usually not needed. The reference counter decrement and check for 0 is an atomic operation on the\n    platforms that support it. Thus, it is safe to operate on the same matrices asynchronously in\n    different threads.\n     */\n    void release();\n\n    //! deallocates the matrix data\n    void deallocate();\n    //! internal use function; properly re-allocates _size, _step arrays\n    void copySize(const Mat& m);\n\n    /** @brief Reserves space for the certain number of rows.\n\n    The method reserves space for sz rows. If the matrix already has enough space to store sz rows,\n    nothing happens. If the matrix is reallocated, the first Mat::rows rows are preserved. The method\n    emulates the corresponding method of the STL vector class.\n    @param sz Number of rows.\n     */\n    void reserve(size_t sz);\n\n    /** @brief Changes the number of matrix rows.\n\n    The methods change the number of matrix rows. If the matrix is reallocated, the first\n    min(Mat::rows, sz) rows are preserved. The methods emulate the corresponding methods of the STL\n    vector class.\n    @param sz New number of rows.\n     */\n    void resize(size_t sz);\n\n    /** @overload\n    @param sz New number of rows.\n    @param s Value assigned to the newly added elements.\n     */\n    void resize(size_t sz, const Scalar& s);\n\n    //! internal function\n    void push_back_(const void* elem);\n\n    /** @brief Adds elements to the bottom of the matrix.\n\n    The methods add one or more elements to the bottom of the matrix. They emulate the corresponding\n    method of the STL vector class. When elem is Mat , its type and the number of columns must be the\n    same as in the container matrix.\n    @param elem Added element(s).\n     */\n    template<typename _Tp> void push_back(const _Tp& elem);\n\n    /** @overload\n    @param elem Added element(s).\n    */\n    template<typename _Tp> void push_back(const Mat_<_Tp>& elem);\n\n    /** @overload\n    @param m Added line(s).\n    */\n    void push_back(const Mat& m);\n\n    /** @brief Removes elements from the bottom of the matrix.\n\n    The method removes one or more rows from the bottom of the matrix.\n    @param nelems Number of removed rows. If it is greater than the total number of rows, an exception\n    is thrown.\n     */\n    void pop_back(size_t nelems=1);\n\n    /** @brief Locates the matrix header within a parent matrix.\n\n    After you extracted a submatrix from a matrix using Mat::row, Mat::col, Mat::rowRange,\n    Mat::colRange, and others, the resultant submatrix points just to the part of the original big\n    matrix. However, each submatrix contains information (represented by datastart and dataend\n    fields) that helps reconstruct the original matrix size and the position of the extracted\n    submatrix within the original matrix. The method locateROI does exactly that.\n    @param wholeSize Output parameter that contains the size of the whole matrix containing *this*\n    as a part.\n    @param ofs Output parameter that contains an offset of *this* inside the whole matrix.\n     */\n    void locateROI( Size& wholeSize, Point& ofs ) const;\n\n    /** @brief Adjusts a submatrix size and position within the parent matrix.\n\n    The method is complimentary to Mat::locateROI . The typical use of these functions is to determine\n    the submatrix position within the parent matrix and then shift the position somehow. Typically, it\n    can be required for filtering operations when pixels outside of the ROI should be taken into\n    account. When all the method parameters are positive, the ROI needs to grow in all directions by the\n    specified amount, for example:\n    @code\n        A.adjustROI(2, 2, 2, 2);\n    @endcode\n    In this example, the matrix size is increased by 4 elements in each direction. The matrix is shifted\n    by 2 elements to the left and 2 elements up, which brings in all the necessary pixels for the\n    filtering with the 5x5 kernel.\n\n    adjustROI forces the adjusted ROI to be inside of the parent matrix that is boundaries of the\n    adjusted ROI are constrained by boundaries of the parent matrix. For example, if the submatrix A is\n    located in the first row of a parent matrix and you called A.adjustROI(2, 2, 2, 2) then A will not\n    be increased in the upward direction.\n\n    The function is used internally by the OpenCV filtering functions, like filter2D , morphological\n    operations, and so on.\n    @param dtop Shift of the top submatrix boundary upwards.\n    @param dbottom Shift of the bottom submatrix boundary downwards.\n    @param dleft Shift of the left submatrix boundary to the left.\n    @param dright Shift of the right submatrix boundary to the right.\n    @sa copyMakeBorder\n     */\n    Mat& adjustROI( int dtop, int dbottom, int dleft, int dright );\n\n    /** @brief Extracts a rectangular submatrix.\n\n    The operators make a new header for the specified sub-array of \\*this . They are the most\n    generalized forms of Mat::row, Mat::col, Mat::rowRange, and Mat::colRange . For example,\n    `A(Range(0, 10), Range::all())` is equivalent to `A.rowRange(0, 10)`. Similarly to all of the above,\n    the operators are O(1) operations, that is, no matrix data is copied.\n    @param rowRange Start and end row of the extracted submatrix. The upper boundary is not included. To\n    select all the rows, use Range::all().\n    @param colRange Start and end column of the extracted submatrix. The upper boundary is not included.\n    To select all the columns, use Range::all().\n     */\n    Mat operator()( Range rowRange, Range colRange ) const;\n\n    /** @overload\n    @param roi Extracted submatrix specified as a rectangle.\n    */\n    Mat operator()( const Rect& roi ) const;\n\n    /** @overload\n    @param ranges Array of selected ranges along each array dimension.\n    */\n    Mat operator()( const Range* ranges ) const;\n\n    // //! converts header to CvMat; no data is copied\n    // operator CvMat() const;\n    // //! converts header to CvMatND; no data is copied\n    // operator CvMatND() const;\n    // //! converts header to IplImage; no data is copied\n    // operator IplImage() const;\n\n    template<typename _Tp> operator std::vector<_Tp>() const;\n    template<typename _Tp, int n> operator Vec<_Tp, n>() const;\n    template<typename _Tp, int m, int n> operator Matx<_Tp, m, n>() const;\n\n    /** @brief Reports whether the matrix is continuous or not.\n\n    The method returns true if the matrix elements are stored continuously without gaps at the end of\n    each row. Otherwise, it returns false. Obviously, 1x1 or 1xN matrices are always continuous.\n    Matrices created with Mat::create are always continuous. But if you extract a part of the matrix\n    using Mat::col, Mat::diag, and so on, or constructed a matrix header for externally allocated data,\n    such matrices may no longer have this property.\n\n    The continuity flag is stored as a bit in the Mat::flags field and is computed automatically when\n    you construct a matrix header. Thus, the continuity check is a very fast operation, though\n    theoretically it could be done as follows:\n    @code\n        // alternative implementation of Mat::isContinuous()\n        bool myCheckMatContinuity(const Mat& m)\n        {\n            //return (m.flags & Mat::CONTINUOUS_FLAG) != 0;\n            return m.rows == 1 || m.step == m.cols*m.elemSize();\n        }\n    @endcode\n    The method is used in quite a few of OpenCV functions. The point is that element-wise operations\n    (such as arithmetic and logical operations, math functions, alpha blending, color space\n    transformations, and others) do not depend on the image geometry. Thus, if all the input and output\n    arrays are continuous, the functions can process them as very long single-row vectors. The example\n    below illustrates how an alpha-blending function can be implemented:\n    @code\n        template<typename T>\n        void alphaBlendRGBA(const Mat& src1, const Mat& src2, Mat& dst)\n        {\n            const float alpha_scale = (float)std::numeric_limits<T>::max(),\n                        inv_scale = 1.f/alpha_scale;\n\n            CV_Assert( src1.type() == src2.type() &&\n                       src1.type() == CV_MAKETYPE(DataType<T>::depth, 4) &&\n                       src1.size() == src2.size());\n            Size size = src1.size();\n            dst.create(size, src1.type());\n\n            // here is the idiom: check the arrays for continuity and,\n            // if this is the case,\n            // treat the arrays as 1D vectors\n            if( src1.isContinuous() && src2.isContinuous() && dst.isContinuous() )\n            {\n                size.width *= size.height;\n                size.height = 1;\n            }\n            size.width *= 4;\n\n            for( int i = 0; i < size.height; i++ )\n            {\n                // when the arrays are continuous,\n                // the outer loop is executed only once\n                const T* ptr1 = src1.ptr<T>(i);\n                const T* ptr2 = src2.ptr<T>(i);\n                T* dptr = dst.ptr<T>(i);\n\n                for( int j = 0; j < size.width; j += 4 )\n                {\n                    float alpha = ptr1[j+3]*inv_scale, beta = ptr2[j+3]*inv_scale;\n                    dptr[j] = saturate_cast<T>(ptr1[j]*alpha + ptr2[j]*beta);\n                    dptr[j+1] = saturate_cast<T>(ptr1[j+1]*alpha + ptr2[j+1]*beta);\n                    dptr[j+2] = saturate_cast<T>(ptr1[j+2]*alpha + ptr2[j+2]*beta);\n                    dptr[j+3] = saturate_cast<T>((1 - (1-alpha)*(1-beta))*alpha_scale);\n                }\n            }\n        }\n    @endcode\n    This approach, while being very simple, can boost the performance of a simple element-operation by\n    10-20 percents, especially if the image is rather small and the operation is quite simple.\n\n    Another OpenCV idiom in this function, a call of Mat::create for the destination array, that\n    allocates the destination array unless it already has the proper size and type. And while the newly\n    allocated arrays are always continuous, you still need to check the destination array because\n    Mat::create does not always allocate a new matrix.\n     */\n    bool isContinuous() const;\n\n    //! returns true if the matrix is a submatrix of another matrix\n    bool isSubmatrix() const;\n\n    /** @brief Returns the matrix element size in bytes.\n\n    The method returns the matrix element size in bytes. For example, if the matrix type is CV_16SC3 ,\n    the method returns 3\\*sizeof(short) or 6.\n     */\n    size_t elemSize() const;\n\n    /** @brief Returns the size of each matrix element channel in bytes.\n\n    The method returns the matrix element channel size in bytes, that is, it ignores the number of\n    channels. For example, if the matrix type is CV_16SC3 , the method returns sizeof(short) or 2.\n     */\n    size_t elemSize1() const;\n\n    /** @brief Returns the type of a matrix element.\n\n    The method returns a matrix element type. This is an identifier compatible with the CvMat type\n    system, like CV_16SC3 or 16-bit signed 3-channel array, and so on.\n     */\n    int type() const;\n\n    /** @brief Returns the depth of a matrix element.\n\n    The method returns the identifier of the matrix element depth (the type of each individual channel).\n    For example, for a 16-bit signed element array, the method returns CV_16S . A complete list of\n    matrix types contains the following values:\n    -   CV_8U - 8-bit unsigned integers ( 0..255 )\n    -   CV_8S - 8-bit signed integers ( -128..127 )\n    -   CV_16U - 16-bit unsigned integers ( 0..65535 )\n    -   CV_16S - 16-bit signed integers ( -32768..32767 )\n    -   CV_32S - 32-bit signed integers ( -2147483648..2147483647 )\n    -   CV_32F - 32-bit floating-point numbers ( -FLT_MAX..FLT_MAX, INF, NAN )\n    -   CV_64F - 64-bit floating-point numbers ( -DBL_MAX..DBL_MAX, INF, NAN )\n     */\n    int depth() const;\n\n    /** @brief Returns the number of matrix channels.\n\n    The method returns the number of matrix channels.\n     */\n    int channels() const;\n\n    /** @brief Returns a normalized step.\n\n    The method returns a matrix step divided by Mat::elemSize1() . It can be useful to quickly access an\n    arbitrary matrix element.\n     */\n    size_t step1(int i=0) const;\n\n    /** @brief Returns true if the array has no elements.\n\n    The method returns true if Mat::total() is 0 or if Mat::data is NULL. Because of pop_back() and\n    resize() methods `M.total() == 0` does not imply that `M.data == NULL`.\n     */\n    bool empty() const;\n\n    /** @brief Returns the total number of array elements.\n\n    The method returns the number of array elements (a number of pixels if the array represents an\n    image).\n     */\n    size_t total() const;\n\n    //! returns N if the matrix is 1-channel (N x ptdim) or ptdim-channel (1 x N) or (N x 1); negative number otherwise\n    int checkVector(int elemChannels, int depth=-1, bool requireContinuous=true) const;\n\n    /** @brief Returns a pointer to the specified matrix row.\n\n    The methods return `uchar*` or typed pointer to the specified matrix row. See the sample in\n    Mat::isContinuous to know how to use these methods.\n    @param i0 A 0-based row index.\n     */\n    uchar* ptr(int i0=0);\n    /** @overload */\n    const uchar* ptr(int i0=0) const;\n\n    /** @overload */\n    uchar* ptr(int i0, int i1);\n    /** @overload */\n    const uchar* ptr(int i0, int i1) const;\n\n    /** @overload */\n    uchar* ptr(int i0, int i1, int i2);\n    /** @overload */\n    const uchar* ptr(int i0, int i1, int i2) const;\n\n    /** @overload */\n    uchar* ptr(const int* idx);\n    /** @overload */\n    const uchar* ptr(const int* idx) const;\n    /** @overload */\n    template<int n> uchar* ptr(const Vec<int, n>& idx);\n    /** @overload */\n    template<int n> const uchar* ptr(const Vec<int, n>& idx) const;\n\n    /** @overload */\n    template<typename _Tp> _Tp* ptr(int i0=0);\n    /** @overload */\n    template<typename _Tp> const _Tp* ptr(int i0=0) const;\n    /** @overload */\n    template<typename _Tp> _Tp* ptr(int i0, int i1);\n    /** @overload */\n    template<typename _Tp> const _Tp* ptr(int i0, int i1) const;\n    /** @overload */\n    template<typename _Tp> _Tp* ptr(int i0, int i1, int i2);\n    /** @overload */\n    template<typename _Tp> const _Tp* ptr(int i0, int i1, int i2) const;\n    /** @overload */\n    template<typename _Tp> _Tp* ptr(const int* idx);\n    /** @overload */\n    template<typename _Tp> const _Tp* ptr(const int* idx) const;\n    /** @overload */\n    template<typename _Tp, int n> _Tp* ptr(const Vec<int, n>& idx);\n    /** @overload */\n    template<typename _Tp, int n> const _Tp* ptr(const Vec<int, n>& idx) const;\n\n    /** @brief Returns a reference to the specified array element.\n\n    The template methods return a reference to the specified array element. For the sake of higher\n    performance, the index range checks are only performed in the Debug configuration.\n\n    Note that the variants with a single index (i) can be used to access elements of single-row or\n    single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and\n    B is an M x 1 integer matrix, you can simply write `A.at<float>(k+4)` and `B.at<int>(2*i+1)`\n    instead of `A.at<float>(0,k+4)` and `B.at<int>(2*i+1,0)`, respectively.\n\n    The example below initializes a Hilbert matrix:\n    @code\n        Mat H(100, 100, CV_64F);\n        for(int i = 0; i < H.rows; i++)\n            for(int j = 0; j < H.cols; j++)\n                H.at<double>(i,j)=1./(i+j+1);\n    @endcode\n    @param i0 Index along the dimension 0\n     */\n    template<typename _Tp> _Tp& at(int i0=0);\n    /** @overload\n    @param i0 Index along the dimension 0\n    */\n    template<typename _Tp> const _Tp& at(int i0=0) const;\n    /** @overload\n    @param i0 Index along the dimension 0\n    @param i1 Index along the dimension 1\n    */\n    template<typename _Tp> _Tp& at(int i0, int i1);\n    /** @overload\n    @param i0 Index along the dimension 0\n    @param i1 Index along the dimension 1\n    */\n    template<typename _Tp> const _Tp& at(int i0, int i1) const;\n\n    /** @overload\n    @param i0 Index along the dimension 0\n    @param i1 Index along the dimension 1\n    @param i2 Index along the dimension 2\n    */\n    template<typename _Tp> _Tp& at(int i0, int i1, int i2);\n    /** @overload\n    @param i0 Index along the dimension 0\n    @param i1 Index along the dimension 1\n    @param i2 Index along the dimension 2\n    */\n    template<typename _Tp> const _Tp& at(int i0, int i1, int i2) const;\n\n    /** @overload\n    @param idx Array of Mat::dims indices.\n    */\n    template<typename _Tp> _Tp& at(const int* idx);\n    /** @overload\n    @param idx Array of Mat::dims indices.\n    */\n    template<typename _Tp> const _Tp& at(const int* idx) const;\n\n    /** @overload */\n    template<typename _Tp, int n> _Tp& at(const Vec<int, n>& idx);\n    /** @overload */\n    template<typename _Tp, int n> const _Tp& at(const Vec<int, n>& idx) const;\n\n    /** @overload\n    special versions for 2D arrays (especially convenient for referencing image pixels)\n    @param pt Element position specified as Point(j,i) .\n    */\n    template<typename _Tp> _Tp& at(Point pt);\n    /** @overload\n    special versions for 2D arrays (especially convenient for referencing image pixels)\n    @param pt Element position specified as Point(j,i) .\n    */\n    template<typename _Tp> const _Tp& at(Point pt) const;\n\n    /** @brief Returns the matrix iterator and sets it to the first matrix element.\n\n    The methods return the matrix read-only or read-write iterators. The use of matrix iterators is very\n    similar to the use of bi-directional STL iterators. In the example below, the alpha blending\n    function is rewritten using the matrix iterators:\n    @code\n        template<typename T>\n        void alphaBlendRGBA(const Mat& src1, const Mat& src2, Mat& dst)\n        {\n            typedef Vec<T, 4> VT;\n\n            const float alpha_scale = (float)std::numeric_limits<T>::max(),\n                        inv_scale = 1.f/alpha_scale;\n\n            CV_Assert( src1.type() == src2.type() &&\n                       src1.type() == DataType<VT>::type &&\n                       src1.size() == src2.size());\n            Size size = src1.size();\n            dst.create(size, src1.type());\n\n            MatConstIterator_<VT> it1 = src1.begin<VT>(), it1_end = src1.end<VT>();\n            MatConstIterator_<VT> it2 = src2.begin<VT>();\n            MatIterator_<VT> dst_it = dst.begin<VT>();\n\n            for( ; it1 != it1_end; ++it1, ++it2, ++dst_it )\n            {\n                VT pix1 = *it1, pix2 = *it2;\n                float alpha = pix1[3]*inv_scale, beta = pix2[3]*inv_scale;\n                *dst_it = VT(saturate_cast<T>(pix1[0]*alpha + pix2[0]*beta),\n                             saturate_cast<T>(pix1[1]*alpha + pix2[1]*beta),\n                             saturate_cast<T>(pix1[2]*alpha + pix2[2]*beta),\n                             saturate_cast<T>((1 - (1-alpha)*(1-beta))*alpha_scale));\n            }\n        }\n    @endcode\n     */\n    template<typename _Tp> MatIterator_<_Tp> begin();\n    template<typename _Tp> MatConstIterator_<_Tp> begin() const;\n\n    /** @brief Returns the matrix iterator and sets it to the after-last matrix element.\n\n    The methods return the matrix read-only or read-write iterators, set to the point following the last\n    matrix element.\n     */\n    template<typename _Tp> MatIterator_<_Tp> end();\n    template<typename _Tp> MatConstIterator_<_Tp> end() const;\n\n    /** @brief Invoke with arguments functor, and runs the functor over all matrix element.\n\n    The methos runs operation in parallel. Operation is passed by arguments. Operation have to be a\n    function pointer, a function object or a lambda(C++11).\n\n    All of below operation is equal. Put 0xFF to first channel of all matrix elements:\n    @code\n        Mat image(1920, 1080, CV_8UC3);\n        typedef cv::Point3_<uint8_t> Pixel;\n\n        // first. raw pointer access.\n        for (int r = 0; r < image.rows; ++r) {\n            Pixel* ptr = image.ptr<Pixel>(0, r);\n            const Pixel* ptr_end = ptr + image.cols;\n            for (; ptr != ptr_end; ++ptr) {\n                ptr->x = 255;\n            }\n        }\n\n        // Using MatIterator. (Simple but there are a Iterator's overhead)\n        for (Pixel &p : cv::Mat_<Pixel>(image)) {\n            p.x = 255;\n        }\n\n        // Parallel execution with function object.\n        struct Operator {\n            void operator ()(Pixel &pixel, const int * position) {\n                pixel.x = 255;\n            }\n        };\n        image.forEach<Pixel>(Operator());\n\n        // Parallel execution using C++11 lambda.\n        image.forEach<Pixel>([](Pixel &p, const int * position) -> void {\n            p.x = 255;\n        });\n    @endcode\n    position parameter is index of current pixel:\n    @code\n        // Creating 3D matrix (255 x 255 x 255) typed uint8_t,\n        //  and initialize all elements by the value which equals elements position.\n        //  i.e. pixels (x,y,z) = (1,2,3) is (b,g,r) = (1,2,3).\n\n        int sizes[] = { 255, 255, 255 };\n        typedef cv::Point3_<uint8_t> Pixel;\n\n        Mat_<Pixel> image = Mat::zeros(3, sizes, CV_8UC3);\n\n        image.forEachWithPosition([&](Pixel& pixel, const int position[]) -> void{\n            pixel.x = position[0];\n            pixel.y = position[1];\n            pixel.z = position[2];\n        });\n    @endcode\n     */\n    template<typename _Tp, typename Functor> void forEach(const Functor& operation);\n    /** @overload */\n    template<typename _Tp, typename Functor> void forEach(const Functor& operation) const;\n\n    enum { MAGIC_VAL  = 0x42FF0000, AUTO_STEP = 0, CONTINUOUS_FLAG = CV_MAT_CONT_FLAG, SUBMATRIX_FLAG = CV_SUBMAT_FLAG };\n    enum { MAGIC_MASK = 0xFFFF0000, TYPE_MASK = 0x00000FFF, DEPTH_MASK = 7 };\n\n    /*! includes several bit-fields:\n         - the magic signature\n         - continuity flag\n         - depth\n         - number of channels\n     */\n    int flags;\n    //! the matrix dimensionality, >= 2\n    int dims;\n    //! the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions\n    int rows, cols;\n    //! pointer to the data\n    uchar* data;\n\n    //! helper fields used in locateROI and adjustROI\n    const uchar* datastart;\n    const uchar* dataend;\n    const uchar* datalimit;\n\n    //! custom allocator\n    MatAllocator* allocator;\n    //! and the standard allocator\n    static MatAllocator* getStdAllocator();\n\n    //! interaction with UMat\n    UMatData* u;\n\n    MatSize size;\n    MatStep step;\n\nprotected:\n    template<typename _Tp, typename Functor> void forEach_impl(const Functor& operation);\n};\n\n\n///////////////////////////////// Mat_<_Tp> ////////////////////////////////////\n\n/** @brief Template matrix class derived from Mat\n\n@code\n    template<typename _Tp> class Mat_ : public Mat\n    {\n    public:\n        // ... some specific methods\n        //         and\n        // no new extra fields\n    };\n@endcode\nThe class `Mat_<_Tp>` is a *thin* template wrapper on top of the Mat class. It does not have any\nextra data fields. Nor this class nor Mat has any virtual methods. Thus, references or pointers to\nthese two classes can be freely but carefully converted one to another. For example:\n@code\n    // create a 100x100 8-bit matrix\n    Mat M(100,100,CV_8U);\n    // this will be compiled fine. no any data conversion will be done.\n    Mat_<float>& M1 = (Mat_<float>&)M;\n    // the program is likely to crash at the statement below\n    M1(99,99) = 1.f;\n@endcode\nWhile Mat is sufficient in most cases, Mat_ can be more convenient if you use a lot of element\naccess operations and if you know matrix type at the compilation time. Note that\n`Mat::at(int y,int x)` and `Mat_::operator()(int y,int x)` do absolutely the same\nand run at the same speed, but the latter is certainly shorter:\n@code\n    Mat_<double> M(20,20);\n    for(int i = 0; i < M.rows; i++)\n        for(int j = 0; j < M.cols; j++)\n            M(i,j) = 1./(i+j+1);\n    Mat E, V;\n    eigen(M,E,V);\n    cout << E.at<double>(0,0)/E.at<double>(M.rows-1,0);\n@endcode\nTo use Mat_ for multi-channel images/matrices, pass Vec as a Mat_ parameter:\n@code\n    // allocate a 320x240 color image and fill it with green (in RGB space)\n    Mat_<Vec3b> img(240, 320, Vec3b(0,255,0));\n    // now draw a diagonal white line\n    for(int i = 0; i < 100; i++)\n        img(i,i)=Vec3b(255,255,255);\n    // and now scramble the 2nd (red) channel of each pixel\n    for(int i = 0; i < img.rows; i++)\n        for(int j = 0; j < img.cols; j++)\n            img(i,j)[2] ^= (uchar)(i ^ j);\n@endcode\n */\ntemplate<typename _Tp> class Mat_ : public Mat\n{\npublic:\n    typedef _Tp value_type;\n    typedef typename DataType<_Tp>::channel_type channel_type;\n    typedef MatIterator_<_Tp> iterator;\n    typedef MatConstIterator_<_Tp> const_iterator;\n\n    //! default constructor\n    Mat_();\n    //! equivalent to Mat(_rows, _cols, DataType<_Tp>::type)\n    Mat_(int _rows, int _cols);\n    //! constructor that sets each matrix element to specified value\n    Mat_(int _rows, int _cols, const _Tp& value);\n    //! equivalent to Mat(_size, DataType<_Tp>::type)\n    explicit Mat_(Size _size);\n    //! constructor that sets each matrix element to specified value\n    Mat_(Size _size, const _Tp& value);\n    //! n-dim array constructor\n    Mat_(int _ndims, const int* _sizes);\n    //! n-dim array constructor that sets each matrix element to specified value\n    Mat_(int _ndims, const int* _sizes, const _Tp& value);\n    //! copy/conversion contructor. If m is of different type, it's converted\n    Mat_(const Mat& m);\n    //! copy constructor\n    Mat_(const Mat_& m);\n    //! constructs a matrix on top of user-allocated data. step is in bytes(!!!), regardless of the type\n    Mat_(int _rows, int _cols, _Tp* _data, size_t _step=AUTO_STEP);\n    //! constructs n-dim matrix on top of user-allocated data. steps are in bytes(!!!), regardless of the type\n    Mat_(int _ndims, const int* _sizes, _Tp* _data, const size_t* _steps=0);\n    //! selects a submatrix\n    Mat_(const Mat_& m, const Range& rowRange, const Range& colRange=Range::all());\n    //! selects a submatrix\n    Mat_(const Mat_& m, const Rect& roi);\n    //! selects a submatrix, n-dim version\n    Mat_(const Mat_& m, const Range* ranges);\n    //! from a matrix expression\n    explicit Mat_(const MatExpr& e);\n    //! makes a matrix out of Vec, std::vector, Point_ or Point3_. The matrix will have a single column\n    explicit Mat_(const std::vector<_Tp>& vec, bool copyData=false);\n    template<int n> explicit Mat_(const Vec<typename DataType<_Tp>::channel_type, n>& vec, bool copyData=true);\n    template<int m, int n> explicit Mat_(const Matx<typename DataType<_Tp>::channel_type, m, n>& mtx, bool copyData=true);\n    explicit Mat_(const Point_<typename DataType<_Tp>::channel_type>& pt, bool copyData=true);\n    explicit Mat_(const Point3_<typename DataType<_Tp>::channel_type>& pt, bool copyData=true);\n    explicit Mat_(const MatCommaInitializer_<_Tp>& commaInitializer);\n\n    Mat_& operator = (const Mat& m);\n    Mat_& operator = (const Mat_& m);\n    //! set all the elements to s.\n    Mat_& operator = (const _Tp& s);\n    //! assign a matrix expression\n    Mat_& operator = (const MatExpr& e);\n\n    //! iterators; they are smart enough to skip gaps in the end of rows\n    iterator begin();\n    iterator end();\n    const_iterator begin() const;\n    const_iterator end() const;\n\n    //! template methods for for operation over all matrix elements.\n    // the operations take care of skipping gaps in the end of rows (if any)\n    template<typename Functor> void forEach(const Functor& operation);\n    template<typename Functor> void forEach(const Functor& operation) const;\n\n    //! equivalent to Mat::create(_rows, _cols, DataType<_Tp>::type)\n    void create(int _rows, int _cols);\n    //! equivalent to Mat::create(_size, DataType<_Tp>::type)\n    void create(Size _size);\n    //! equivalent to Mat::create(_ndims, _sizes, DatType<_Tp>::type)\n    void create(int _ndims, const int* _sizes);\n    //! cross-product\n    Mat_ cross(const Mat_& m) const;\n    //! data type conversion\n    template<typename T2> operator Mat_<T2>() const;\n    //! overridden forms of Mat::row() etc.\n    Mat_ row(int y) const;\n    Mat_ col(int x) const;\n    Mat_ diag(int d=0) const;\n    Mat_ clone() const;\n\n    //! overridden forms of Mat::elemSize() etc.\n    size_t elemSize() const;\n    size_t elemSize1() const;\n    int type() const;\n    int depth() const;\n    int channels() const;\n    size_t step1(int i=0) const;\n    //! returns step()/sizeof(_Tp)\n    size_t stepT(int i=0) const;\n\n    //! overridden forms of Mat::zeros() etc. Data type is omitted, of course\n    static MatExpr zeros(int rows, int cols);\n    static MatExpr zeros(Size size);\n    static MatExpr zeros(int _ndims, const int* _sizes);\n    static MatExpr ones(int rows, int cols);\n    static MatExpr ones(Size size);\n    static MatExpr ones(int _ndims, const int* _sizes);\n    static MatExpr eye(int rows, int cols);\n    static MatExpr eye(Size size);\n\n    //! some more overriden methods\n    Mat_& adjustROI( int dtop, int dbottom, int dleft, int dright );\n    Mat_ operator()( const Range& rowRange, const Range& colRange ) const;\n    Mat_ operator()( const Rect& roi ) const;\n    Mat_ operator()( const Range* ranges ) const;\n\n    //! more convenient forms of row and element access operators\n    _Tp* operator [](int y);\n    const _Tp* operator [](int y) const;\n\n    //! returns reference to the specified element\n    _Tp& operator ()(const int* idx);\n    //! returns read-only reference to the specified element\n    const _Tp& operator ()(const int* idx) const;\n\n    //! returns reference to the specified element\n    template<int n> _Tp& operator ()(const Vec<int, n>& idx);\n    //! returns read-only reference to the specified element\n    template<int n> const _Tp& operator ()(const Vec<int, n>& idx) const;\n\n    //! returns reference to the specified element (1D case)\n    _Tp& operator ()(int idx0);\n    //! returns read-only reference to the specified element (1D case)\n    const _Tp& operator ()(int idx0) const;\n    //! returns reference to the specified element (2D case)\n    _Tp& operator ()(int idx0, int idx1);\n    //! returns read-only reference to the specified element (2D case)\n    const _Tp& operator ()(int idx0, int idx1) const;\n    //! returns reference to the specified element (3D case)\n    _Tp& operator ()(int idx0, int idx1, int idx2);\n    //! returns read-only reference to the specified element (3D case)\n    const _Tp& operator ()(int idx0, int idx1, int idx2) const;\n\n    _Tp& operator ()(Point pt);\n    const _Tp& operator ()(Point pt) const;\n\n    //! conversion to vector.\n    operator std::vector<_Tp>() const;\n    //! conversion to Vec\n    template<int n> operator Vec<typename DataType<_Tp>::channel_type, n>() const;\n    //! conversion to Matx\n    template<int m, int n> operator Matx<typename DataType<_Tp>::channel_type, m, n>() const;\n};\n\ntypedef Mat_<uchar> Mat1b;\ntypedef Mat_<Vec2b> Mat2b;\ntypedef Mat_<Vec3b> Mat3b;\ntypedef Mat_<Vec4b> Mat4b;\n\ntypedef Mat_<short> Mat1s;\ntypedef Mat_<Vec2s> Mat2s;\ntypedef Mat_<Vec3s> Mat3s;\ntypedef Mat_<Vec4s> Mat4s;\n\ntypedef Mat_<ushort> Mat1w;\ntypedef Mat_<Vec2w> Mat2w;\ntypedef Mat_<Vec3w> Mat3w;\ntypedef Mat_<Vec4w> Mat4w;\n\ntypedef Mat_<int>   Mat1i;\ntypedef Mat_<Vec2i> Mat2i;\ntypedef Mat_<Vec3i> Mat3i;\ntypedef Mat_<Vec4i> Mat4i;\n\ntypedef Mat_<float> Mat1f;\ntypedef Mat_<Vec2f> Mat2f;\ntypedef Mat_<Vec3f> Mat3f;\ntypedef Mat_<Vec4f> Mat4f;\n\ntypedef Mat_<double> Mat1d;\ntypedef Mat_<Vec2d> Mat2d;\ntypedef Mat_<Vec3d> Mat3d;\ntypedef Mat_<Vec4d> Mat4d;\n\n/** @todo document */\nclass CV_EXPORTS UMat\n{\npublic:\n    //! default constructor\n    UMat(UMatUsageFlags usageFlags = USAGE_DEFAULT);\n    //! constructs 2D matrix of the specified size and type\n    // (_type is CV_8UC1, CV_64FC3, CV_32SC(12) etc.)\n    UMat(int rows, int cols, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT);\n    UMat(Size size, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT);\n    //! constucts 2D matrix and fills it with the specified value _s.\n    UMat(int rows, int cols, int type, const Scalar& s, UMatUsageFlags usageFlags = USAGE_DEFAULT);\n    UMat(Size size, int type, const Scalar& s, UMatUsageFlags usageFlags = USAGE_DEFAULT);\n\n    //! constructs n-dimensional matrix\n    UMat(int ndims, const int* sizes, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT);\n    UMat(int ndims, const int* sizes, int type, const Scalar& s, UMatUsageFlags usageFlags = USAGE_DEFAULT);\n\n    //! copy constructor\n    UMat(const UMat& m);\n\n    //! creates a matrix header for a part of the bigger matrix\n    UMat(const UMat& m, const Range& rowRange, const Range& colRange=Range::all());\n    UMat(const UMat& m, const Rect& roi);\n    UMat(const UMat& m, const Range* ranges);\n    //! builds matrix from std::vector with or without copying the data\n    template<typename _Tp> explicit UMat(const std::vector<_Tp>& vec, bool copyData=false);\n    //! builds matrix from cv::Vec; the data is copied by default\n    template<typename _Tp, int n> explicit UMat(const Vec<_Tp, n>& vec, bool copyData=true);\n    //! builds matrix from cv::Matx; the data is copied by default\n    template<typename _Tp, int m, int n> explicit UMat(const Matx<_Tp, m, n>& mtx, bool copyData=true);\n    //! builds matrix from a 2D point\n    template<typename _Tp> explicit UMat(const Point_<_Tp>& pt, bool copyData=true);\n    //! builds matrix from a 3D point\n    template<typename _Tp> explicit UMat(const Point3_<_Tp>& pt, bool copyData=true);\n    //! builds matrix from comma initializer\n    template<typename _Tp> explicit UMat(const MatCommaInitializer_<_Tp>& commaInitializer);\n\n    //! destructor - calls release()\n    ~UMat();\n    //! assignment operators\n    UMat& operator = (const UMat& m);\n\n    Mat getMat(int flags) const;\n\n    //! returns a new matrix header for the specified row\n    UMat row(int y) const;\n    //! returns a new matrix header for the specified column\n    UMat col(int x) const;\n    //! ... for the specified row span\n    UMat rowRange(int startrow, int endrow) const;\n    UMat rowRange(const Range& r) const;\n    //! ... for the specified column span\n    UMat colRange(int startcol, int endcol) const;\n    UMat colRange(const Range& r) const;\n    //! ... for the specified diagonal\n    // (d=0 - the main diagonal,\n    //  >0 - a diagonal from the lower half,\n    //  <0 - a diagonal from the upper half)\n    UMat diag(int d=0) const;\n    //! constructs a square diagonal matrix which main diagonal is vector \"d\"\n    static UMat diag(const UMat& d);\n\n    //! returns deep copy of the matrix, i.e. the data is copied\n    UMat clone() const;\n    //! copies the matrix content to \"m\".\n    // It calls m.create(this->size(), this->type()).\n    void copyTo( OutputArray m ) const;\n    //! copies those matrix elements to \"m\" that are marked with non-zero mask elements.\n    void copyTo( OutputArray m, InputArray mask ) const;\n    //! converts matrix to another datatype with optional scalng. See cvConvertScale.\n    void convertTo( OutputArray m, int rtype, double alpha=1, double beta=0 ) const;\n\n    void assignTo( UMat& m, int type=-1 ) const;\n\n    //! sets every matrix element to s\n    UMat& operator = (const Scalar& s);\n    //! sets some of the matrix elements to s, according to the mask\n    UMat& setTo(InputArray value, InputArray mask=noArray());\n    //! creates alternative matrix header for the same data, with different\n    // number of channels and/or different number of rows. see cvReshape.\n    UMat reshape(int cn, int rows=0) const;\n    UMat reshape(int cn, int newndims, const int* newsz) const;\n\n    //! matrix transposition by means of matrix expressions\n    UMat t() const;\n    //! matrix inversion by means of matrix expressions\n    UMat inv(int method=DECOMP_LU) const;\n    //! per-element matrix multiplication by means of matrix expressions\n    UMat mul(InputArray m, double scale=1) const;\n\n    //! computes dot-product\n    double dot(InputArray m) const;\n\n    //! Matlab-style matrix initialization\n    static UMat zeros(int rows, int cols, int type);\n    static UMat zeros(Size size, int type);\n    static UMat zeros(int ndims, const int* sz, int type);\n    static UMat ones(int rows, int cols, int type);\n    static UMat ones(Size size, int type);\n    static UMat ones(int ndims, const int* sz, int type);\n    static UMat eye(int rows, int cols, int type);\n    static UMat eye(Size size, int type);\n\n    //! allocates new matrix data unless the matrix already has specified size and type.\n    // previous data is unreferenced if needed.\n    void create(int rows, int cols, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT);\n    void create(Size size, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT);\n    void create(int ndims, const int* sizes, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT);\n\n    //! increases the reference counter; use with care to avoid memleaks\n    void addref();\n    //! decreases reference counter;\n    // deallocates the data when reference counter reaches 0.\n    void release();\n\n    //! deallocates the matrix data\n    void deallocate();\n    //! internal use function; properly re-allocates _size, _step arrays\n    void copySize(const UMat& m);\n\n    //! locates matrix header within a parent matrix. See below\n    void locateROI( Size& wholeSize, Point& ofs ) const;\n    //! moves/resizes the current matrix ROI inside the parent matrix.\n    UMat& adjustROI( int dtop, int dbottom, int dleft, int dright );\n    //! extracts a rectangular sub-matrix\n    // (this is a generalized form of row, rowRange etc.)\n    UMat operator()( Range rowRange, Range colRange ) const;\n    UMat operator()( const Rect& roi ) const;\n    UMat operator()( const Range* ranges ) const;\n\n    //! returns true iff the matrix data is continuous\n    // (i.e. when there are no gaps between successive rows).\n    // similar to CV_IS_MAT_CONT(cvmat->type)\n    bool isContinuous() const;\n\n    //! returns true if the matrix is a submatrix of another matrix\n    bool isSubmatrix() const;\n\n    //! returns element size in bytes,\n    // similar to CV_ELEM_SIZE(cvmat->type)\n    size_t elemSize() const;\n    //! returns the size of element channel in bytes.\n    size_t elemSize1() const;\n    //! returns element type, similar to CV_MAT_TYPE(cvmat->type)\n    int type() const;\n    //! returns element type, similar to CV_MAT_DEPTH(cvmat->type)\n    int depth() const;\n    //! returns element type, similar to CV_MAT_CN(cvmat->type)\n    int channels() const;\n    //! returns step/elemSize1()\n    size_t step1(int i=0) const;\n    //! returns true if matrix data is NULL\n    bool empty() const;\n    //! returns the total number of matrix elements\n    size_t total() const;\n\n    //! returns N if the matrix is 1-channel (N x ptdim) or ptdim-channel (1 x N) or (N x 1); negative number otherwise\n    int checkVector(int elemChannels, int depth=-1, bool requireContinuous=true) const;\n\n    void* handle(int accessFlags) const;\n    void ndoffset(size_t* ofs) const;\n\n    enum { MAGIC_VAL  = 0x42FF0000, AUTO_STEP = 0, CONTINUOUS_FLAG = CV_MAT_CONT_FLAG, SUBMATRIX_FLAG = CV_SUBMAT_FLAG };\n    enum { MAGIC_MASK = 0xFFFF0000, TYPE_MASK = 0x00000FFF, DEPTH_MASK = 7 };\n\n    /*! includes several bit-fields:\n         - the magic signature\n         - continuity flag\n         - depth\n         - number of channels\n     */\n    int flags;\n    //! the matrix dimensionality, >= 2\n    int dims;\n    //! the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions\n    int rows, cols;\n\n    //! custom allocator\n    MatAllocator* allocator;\n    UMatUsageFlags usageFlags; // usage flags for allocator\n    //! and the standard allocator\n    static MatAllocator* getStdAllocator();\n\n    // black-box container of UMat data\n    UMatData* u;\n\n    // offset of the submatrix (or 0)\n    size_t offset;\n\n    MatSize size;\n    MatStep step;\n\nprotected:\n};\n\n\n/////////////////////////// multi-dimensional sparse matrix //////////////////////////\n\n/** @brief The class SparseMat represents multi-dimensional sparse numerical arrays.\n\nSuch a sparse array can store elements of any type that Mat can store. *Sparse* means that only\nnon-zero elements are stored (though, as a result of operations on a sparse matrix, some of its\nstored elements can actually become 0. It is up to you to detect such elements and delete them\nusing SparseMat::erase ). The non-zero elements are stored in a hash table that grows when it is\nfilled so that the search time is O(1) in average (regardless of whether element is there or not).\nElements can be accessed using the following methods:\n-   Query operations (SparseMat::ptr and the higher-level SparseMat::ref, SparseMat::value and\n    SparseMat::find), for example:\n    @code\n        const int dims = 5;\n        int size[] = {10, 10, 10, 10, 10};\n        SparseMat sparse_mat(dims, size, CV_32F);\n        for(int i = 0; i < 1000; i++)\n        {\n            int idx[dims];\n            for(int k = 0; k < dims; k++)\n                idx[k] = rand()\n            sparse_mat.ref<float>(idx) += 1.f;\n        }\n    @endcode\n-   Sparse matrix iterators. They are similar to MatIterator but different from NAryMatIterator.\n    That is, the iteration loop is familiar to STL users:\n    @code\n        // prints elements of a sparse floating-point matrix\n        // and the sum of elements.\n        SparseMatConstIterator_<float>\n            it = sparse_mat.begin<float>(),\n            it_end = sparse_mat.end<float>();\n        double s = 0;\n        int dims = sparse_mat.dims();\n        for(; it != it_end; ++it)\n        {\n            // print element indices and the element value\n            const SparseMat::Node* n = it.node();\n            printf(\"(\");\n            for(int i = 0; i < dims; i++)\n                printf(\"%d%s\", n->idx[i], i < dims-1 ? \", \" : \")\");\n            printf(\": %g\\n\", it.value<float>());\n            s += *it;\n        }\n        printf(\"Element sum is %g\\n\", s);\n    @endcode\n    If you run this loop, you will notice that elements are not enumerated in a logical order\n    (lexicographical, and so on). They come in the same order as they are stored in the hash table\n    (semi-randomly). You may collect pointers to the nodes and sort them to get the proper ordering.\n    Note, however, that pointers to the nodes may become invalid when you add more elements to the\n    matrix. This may happen due to possible buffer reallocation.\n-   Combination of the above 2 methods when you need to process 2 or more sparse matrices\n    simultaneously. For example, this is how you can compute unnormalized cross-correlation of the 2\n    floating-point sparse matrices:\n    @code\n        double cross_corr(const SparseMat& a, const SparseMat& b)\n        {\n            const SparseMat *_a = &a, *_b = &b;\n            // if b contains less elements than a,\n            // it is faster to iterate through b\n            if(_a->nzcount() > _b->nzcount())\n                std::swap(_a, _b);\n            SparseMatConstIterator_<float> it = _a->begin<float>(),\n                                           it_end = _a->end<float>();\n            double ccorr = 0;\n            for(; it != it_end; ++it)\n            {\n                // take the next element from the first matrix\n                float avalue = *it;\n                const Node* anode = it.node();\n                // and try to find an element with the same index in the second matrix.\n                // since the hash value depends only on the element index,\n                // reuse the hash value stored in the node\n                float bvalue = _b->value<float>(anode->idx,&anode->hashval);\n                ccorr += avalue*bvalue;\n            }\n            return ccorr;\n        }\n    @endcode\n */\nclass CV_EXPORTS SparseMat\n{\npublic:\n    typedef SparseMatIterator iterator;\n    typedef SparseMatConstIterator const_iterator;\n\n    enum { MAGIC_VAL=0x42FD0000, MAX_DIM=32, HASH_SCALE=0x5bd1e995, HASH_BIT=0x80000000 };\n\n    //! the sparse matrix header\n    struct CV_EXPORTS Hdr\n    {\n        Hdr(int _dims, const int* _sizes, int _type);\n        void clear();\n        int refcount;\n        int dims;\n        int valueOffset;\n        size_t nodeSize;\n        size_t nodeCount;\n        size_t freeList;\n        std::vector<uchar> pool;\n        std::vector<size_t> hashtab;\n        int size[MAX_DIM];\n    };\n\n    //! sparse matrix node - element of a hash table\n    struct CV_EXPORTS Node\n    {\n        //! hash value\n        size_t hashval;\n        //! index of the next node in the same hash table entry\n        size_t next;\n        //! index of the matrix element\n        int idx[MAX_DIM];\n    };\n\n    /** @brief Various SparseMat constructors.\n     */\n    SparseMat();\n\n    /** @overload\n    @param dims Array dimensionality.\n    @param _sizes Sparce matrix size on all dementions.\n    @param _type Sparse matrix data type.\n    */\n    SparseMat(int dims, const int* _sizes, int _type);\n\n    /** @overload\n    @param m Source matrix for copy constructor. If m is dense matrix (ocvMat) then it will be converted\n    to sparse representation.\n    */\n    SparseMat(const SparseMat& m);\n\n    /** @overload\n    @param m Source matrix for copy constructor. If m is dense matrix (ocvMat) then it will be converted\n    to sparse representation.\n    */\n    explicit SparseMat(const Mat& m);\n\n    //! the destructor\n    ~SparseMat();\n\n    //! assignment operator. This is O(1) operation, i.e. no data is copied\n    SparseMat& operator = (const SparseMat& m);\n    //! equivalent to the corresponding constructor\n    SparseMat& operator = (const Mat& m);\n\n    //! creates full copy of the matrix\n    SparseMat clone() const;\n\n    //! copies all the data to the destination matrix. All the previous content of m is erased\n    void copyTo( SparseMat& m ) const;\n    //! converts sparse matrix to dense matrix.\n    void copyTo( Mat& m ) const;\n    //! multiplies all the matrix elements by the specified scale factor alpha and converts the results to the specified data type\n    void convertTo( SparseMat& m, int rtype, double alpha=1 ) const;\n    //! converts sparse matrix to dense n-dim matrix with optional type conversion and scaling.\n    /*!\n        @param [out] m - output matrix; if it does not have a proper size or type before the operation,\n            it is reallocated\n        @param [in] rtype – desired output matrix type or, rather, the depth since the number of channels\n            are the same as the input has; if rtype is negative, the output matrix will have the\n            same type as the input.\n        @param [in] alpha – optional scale factor\n        @param [in] beta – optional delta added to the scaled values\n    */\n    void convertTo( Mat& m, int rtype, double alpha=1, double beta=0 ) const;\n\n    // not used now\n    void assignTo( SparseMat& m, int type=-1 ) const;\n\n    //! reallocates sparse matrix.\n    /*!\n        If the matrix already had the proper size and type,\n        it is simply cleared with clear(), otherwise,\n        the old matrix is released (using release()) and the new one is allocated.\n    */\n    void create(int dims, const int* _sizes, int _type);\n    //! sets all the sparse matrix elements to 0, which means clearing the hash table.\n    void clear();\n    //! manually increments the reference counter to the header.\n    void addref();\n    // decrements the header reference counter. When the counter reaches 0, the header and all the underlying data are deallocated.\n    void release();\n\n    //! converts sparse matrix to the old-style representation; all the elements are copied.\n    //operator CvSparseMat*() const;\n    //! returns the size of each element in bytes (not including the overhead - the space occupied by SparseMat::Node elements)\n    size_t elemSize() const;\n    //! returns elemSize()/channels()\n    size_t elemSize1() const;\n\n    //! returns type of sparse matrix elements\n    int type() const;\n    //! returns the depth of sparse matrix elements\n    int depth() const;\n    //! returns the number of channels\n    int channels() const;\n\n    //! returns the array of sizes, or NULL if the matrix is not allocated\n    const int* size() const;\n    //! returns the size of i-th matrix dimension (or 0)\n    int size(int i) const;\n    //! returns the matrix dimensionality\n    int dims() const;\n    //! returns the number of non-zero elements (=the number of hash table nodes)\n    size_t nzcount() const;\n\n    //! computes the element hash value (1D case)\n    size_t hash(int i0) const;\n    //! computes the element hash value (2D case)\n    size_t hash(int i0, int i1) const;\n    //! computes the element hash value (3D case)\n    size_t hash(int i0, int i1, int i2) const;\n    //! computes the element hash value (nD case)\n    size_t hash(const int* idx) const;\n\n    //!@{\n    /*!\n     specialized variants for 1D, 2D, 3D cases and the generic_type one for n-D case.\n     return pointer to the matrix element.\n      - if the element is there (it's non-zero), the pointer to it is returned\n      - if it's not there and createMissing=false, NULL pointer is returned\n      - if it's not there and createMissing=true, then the new element\n        is created and initialized with 0. Pointer to it is returned\n      - if the optional hashval pointer is not NULL, the element hash value is\n        not computed, but *hashval is taken instead.\n    */\n    //! returns pointer to the specified element (1D case)\n    uchar* ptr(int i0, bool createMissing, size_t* hashval=0);\n    //! returns pointer to the specified element (2D case)\n    uchar* ptr(int i0, int i1, bool createMissing, size_t* hashval=0);\n    //! returns pointer to the specified element (3D case)\n    uchar* ptr(int i0, int i1, int i2, bool createMissing, size_t* hashval=0);\n    //! returns pointer to the specified element (nD case)\n    uchar* ptr(const int* idx, bool createMissing, size_t* hashval=0);\n    //!@}\n\n    //!@{\n    /*!\n     return read-write reference to the specified sparse matrix element.\n\n     `ref<_Tp>(i0,...[,hashval])` is equivalent to `*(_Tp*)ptr(i0,...,true[,hashval])`.\n     The methods always return a valid reference.\n     If the element did not exist, it is created and initialiazed with 0.\n    */\n    //! returns reference to the specified element (1D case)\n    template<typename _Tp> _Tp& ref(int i0, size_t* hashval=0);\n    //! returns reference to the specified element (2D case)\n    template<typename _Tp> _Tp& ref(int i0, int i1, size_t* hashval=0);\n    //! returns reference to the specified element (3D case)\n    template<typename _Tp> _Tp& ref(int i0, int i1, int i2, size_t* hashval=0);\n    //! returns reference to the specified element (nD case)\n    template<typename _Tp> _Tp& ref(const int* idx, size_t* hashval=0);\n    //!@}\n\n    //!@{\n    /*!\n     return value of the specified sparse matrix element.\n\n     `value<_Tp>(i0,...[,hashval])` is equivalent to\n     @code\n     { const _Tp* p = find<_Tp>(i0,...[,hashval]); return p ? *p : _Tp(); }\n     @endcode\n\n     That is, if the element did not exist, the methods return 0.\n     */\n    //! returns value of the specified element (1D case)\n    template<typename _Tp> _Tp value(int i0, size_t* hashval=0) const;\n    //! returns value of the specified element (2D case)\n    template<typename _Tp> _Tp value(int i0, int i1, size_t* hashval=0) const;\n    //! returns value of the specified element (3D case)\n    template<typename _Tp> _Tp value(int i0, int i1, int i2, size_t* hashval=0) const;\n    //! returns value of the specified element (nD case)\n    template<typename _Tp> _Tp value(const int* idx, size_t* hashval=0) const;\n    //!@}\n\n    //!@{\n    /*!\n     Return pointer to the specified sparse matrix element if it exists\n\n     `find<_Tp>(i0,...[,hashval])` is equivalent to `(_const Tp*)ptr(i0,...false[,hashval])`.\n\n     If the specified element does not exist, the methods return NULL.\n    */\n    //! returns pointer to the specified element (1D case)\n    template<typename _Tp> const _Tp* find(int i0, size_t* hashval=0) const;\n    //! returns pointer to the specified element (2D case)\n    template<typename _Tp> const _Tp* find(int i0, int i1, size_t* hashval=0) const;\n    //! returns pointer to the specified element (3D case)\n    template<typename _Tp> const _Tp* find(int i0, int i1, int i2, size_t* hashval=0) const;\n    //! returns pointer to the specified element (nD case)\n    template<typename _Tp> const _Tp* find(const int* idx, size_t* hashval=0) const;\n    //!@}\n\n    //! erases the specified element (2D case)\n    void erase(int i0, int i1, size_t* hashval=0);\n    //! erases the specified element (3D case)\n    void erase(int i0, int i1, int i2, size_t* hashval=0);\n    //! erases the specified element (nD case)\n    void erase(const int* idx, size_t* hashval=0);\n\n    //!@{\n    /*!\n       return the sparse matrix iterator pointing to the first sparse matrix element\n    */\n    //! returns the sparse matrix iterator at the matrix beginning\n    SparseMatIterator begin();\n    //! returns the sparse matrix iterator at the matrix beginning\n    template<typename _Tp> SparseMatIterator_<_Tp> begin();\n    //! returns the read-only sparse matrix iterator at the matrix beginning\n    SparseMatConstIterator begin() const;\n    //! returns the read-only sparse matrix iterator at the matrix beginning\n    template<typename _Tp> SparseMatConstIterator_<_Tp> begin() const;\n    //!@}\n    /*!\n       return the sparse matrix iterator pointing to the element following the last sparse matrix element\n    */\n    //! returns the sparse matrix iterator at the matrix end\n    SparseMatIterator end();\n    //! returns the read-only sparse matrix iterator at the matrix end\n    SparseMatConstIterator end() const;\n    //! returns the typed sparse matrix iterator at the matrix end\n    template<typename _Tp> SparseMatIterator_<_Tp> end();\n    //! returns the typed read-only sparse matrix iterator at the matrix end\n    template<typename _Tp> SparseMatConstIterator_<_Tp> end() const;\n\n    //! returns the value stored in the sparse martix node\n    template<typename _Tp> _Tp& value(Node* n);\n    //! returns the value stored in the sparse martix node\n    template<typename _Tp> const _Tp& value(const Node* n) const;\n\n    ////////////// some internal-use methods ///////////////\n    Node* node(size_t nidx);\n    const Node* node(size_t nidx) const;\n\n    uchar* newNode(const int* idx, size_t hashval);\n    void removeNode(size_t hidx, size_t nidx, size_t previdx);\n    void resizeHashTab(size_t newsize);\n\n    int flags;\n    Hdr* hdr;\n};\n\n\n\n///////////////////////////////// SparseMat_<_Tp> ////////////////////////////////////\n\n/** @brief Template sparse n-dimensional array class derived from SparseMat\n\nSparseMat_ is a thin wrapper on top of SparseMat created in the same way as Mat_ . It simplifies\nnotation of some operations:\n@code\n    int sz[] = {10, 20, 30};\n    SparseMat_<double> M(3, sz);\n    ...\n    M.ref(1, 2, 3) = M(4, 5, 6) + M(7, 8, 9);\n@endcode\n */\ntemplate<typename _Tp> class SparseMat_ : public SparseMat\n{\npublic:\n    typedef SparseMatIterator_<_Tp> iterator;\n    typedef SparseMatConstIterator_<_Tp> const_iterator;\n\n    //! the default constructor\n    SparseMat_();\n    //! the full constructor equivelent to SparseMat(dims, _sizes, DataType<_Tp>::type)\n    SparseMat_(int dims, const int* _sizes);\n    //! the copy constructor. If DataType<_Tp>.type != m.type(), the m elements are converted\n    SparseMat_(const SparseMat& m);\n    //! the copy constructor. This is O(1) operation - no data is copied\n    SparseMat_(const SparseMat_& m);\n    //! converts dense matrix to the sparse form\n    SparseMat_(const Mat& m);\n    //! converts the old-style sparse matrix to the C++ class. All the elements are copied\n    //SparseMat_(const CvSparseMat* m);\n    //! the assignment operator. If DataType<_Tp>.type != m.type(), the m elements are converted\n    SparseMat_& operator = (const SparseMat& m);\n    //! the assignment operator. This is O(1) operation - no data is copied\n    SparseMat_& operator = (const SparseMat_& m);\n    //! converts dense matrix to the sparse form\n    SparseMat_& operator = (const Mat& m);\n\n    //! makes full copy of the matrix. All the elements are duplicated\n    SparseMat_ clone() const;\n    //! equivalent to cv::SparseMat::create(dims, _sizes, DataType<_Tp>::type)\n    void create(int dims, const int* _sizes);\n    //! converts sparse matrix to the old-style CvSparseMat. All the elements are copied\n    //operator CvSparseMat*() const;\n\n    //! returns type of the matrix elements\n    int type() const;\n    //! returns depth of the matrix elements\n    int depth() const;\n    //! returns the number of channels in each matrix element\n    int channels() const;\n\n    //! equivalent to SparseMat::ref<_Tp>(i0, hashval)\n    _Tp& ref(int i0, size_t* hashval=0);\n    //! equivalent to SparseMat::ref<_Tp>(i0, i1, hashval)\n    _Tp& ref(int i0, int i1, size_t* hashval=0);\n    //! equivalent to SparseMat::ref<_Tp>(i0, i1, i2, hashval)\n    _Tp& ref(int i0, int i1, int i2, size_t* hashval=0);\n    //! equivalent to SparseMat::ref<_Tp>(idx, hashval)\n    _Tp& ref(const int* idx, size_t* hashval=0);\n\n    //! equivalent to SparseMat::value<_Tp>(i0, hashval)\n    _Tp operator()(int i0, size_t* hashval=0) const;\n    //! equivalent to SparseMat::value<_Tp>(i0, i1, hashval)\n    _Tp operator()(int i0, int i1, size_t* hashval=0) const;\n    //! equivalent to SparseMat::value<_Tp>(i0, i1, i2, hashval)\n    _Tp operator()(int i0, int i1, int i2, size_t* hashval=0) const;\n    //! equivalent to SparseMat::value<_Tp>(idx, hashval)\n    _Tp operator()(const int* idx, size_t* hashval=0) const;\n\n    //! returns sparse matrix iterator pointing to the first sparse matrix element\n    SparseMatIterator_<_Tp> begin();\n    //! returns read-only sparse matrix iterator pointing to the first sparse matrix element\n    SparseMatConstIterator_<_Tp> begin() const;\n    //! returns sparse matrix iterator pointing to the element following the last sparse matrix element\n    SparseMatIterator_<_Tp> end();\n    //! returns read-only sparse matrix iterator pointing to the element following the last sparse matrix element\n    SparseMatConstIterator_<_Tp> end() const;\n};\n\n\n\n////////////////////////////////// MatConstIterator //////////////////////////////////\n\nclass CV_EXPORTS MatConstIterator\n{\npublic:\n    typedef uchar* value_type;\n    typedef ptrdiff_t difference_type;\n    typedef const uchar** pointer;\n    typedef uchar* reference;\n\n#ifndef OPENCV_NOSTL\n    typedef std::random_access_iterator_tag iterator_category;\n#endif\n\n    //! default constructor\n    MatConstIterator();\n    //! constructor that sets the iterator to the beginning of the matrix\n    MatConstIterator(const Mat* _m);\n    //! constructor that sets the iterator to the specified element of the matrix\n    MatConstIterator(const Mat* _m, int _row, int _col=0);\n    //! constructor that sets the iterator to the specified element of the matrix\n    MatConstIterator(const Mat* _m, Point _pt);\n    //! constructor that sets the iterator to the specified element of the matrix\n    MatConstIterator(const Mat* _m, const int* _idx);\n    //! copy constructor\n    MatConstIterator(const MatConstIterator& it);\n\n    //! copy operator\n    MatConstIterator& operator = (const MatConstIterator& it);\n    //! returns the current matrix element\n    const uchar* operator *() const;\n    //! returns the i-th matrix element, relative to the current\n    const uchar* operator [](ptrdiff_t i) const;\n\n    //! shifts the iterator forward by the specified number of elements\n    MatConstIterator& operator += (ptrdiff_t ofs);\n    //! shifts the iterator backward by the specified number of elements\n    MatConstIterator& operator -= (ptrdiff_t ofs);\n    //! decrements the iterator\n    MatConstIterator& operator --();\n    //! decrements the iterator\n    MatConstIterator operator --(int);\n    //! increments the iterator\n    MatConstIterator& operator ++();\n    //! increments the iterator\n    MatConstIterator operator ++(int);\n    //! returns the current iterator position\n    Point pos() const;\n    //! returns the current iterator position\n    void pos(int* _idx) const;\n\n    ptrdiff_t lpos() const;\n    void seek(ptrdiff_t ofs, bool relative = false);\n    void seek(const int* _idx, bool relative = false);\n\n    const Mat* m;\n    size_t elemSize;\n    const uchar* ptr;\n    const uchar* sliceStart;\n    const uchar* sliceEnd;\n};\n\n\n\n////////////////////////////////// MatConstIterator_ /////////////////////////////////\n\n/** @brief Matrix read-only iterator\n */\ntemplate<typename _Tp>\nclass MatConstIterator_ : public MatConstIterator\n{\npublic:\n    typedef _Tp value_type;\n    typedef ptrdiff_t difference_type;\n    typedef const _Tp* pointer;\n    typedef const _Tp& reference;\n\n#ifndef OPENCV_NOSTL\n    typedef std::random_access_iterator_tag iterator_category;\n#endif\n\n    //! default constructor\n    MatConstIterator_();\n    //! constructor that sets the iterator to the beginning of the matrix\n    MatConstIterator_(const Mat_<_Tp>* _m);\n    //! constructor that sets the iterator to the specified element of the matrix\n    MatConstIterator_(const Mat_<_Tp>* _m, int _row, int _col=0);\n    //! constructor that sets the iterator to the specified element of the matrix\n    MatConstIterator_(const Mat_<_Tp>* _m, Point _pt);\n    //! constructor that sets the iterator to the specified element of the matrix\n    MatConstIterator_(const Mat_<_Tp>* _m, const int* _idx);\n    //! copy constructor\n    MatConstIterator_(const MatConstIterator_& it);\n\n    //! copy operator\n    MatConstIterator_& operator = (const MatConstIterator_& it);\n    //! returns the current matrix element\n    _Tp operator *() const;\n    //! returns the i-th matrix element, relative to the current\n    _Tp operator [](ptrdiff_t i) const;\n\n    //! shifts the iterator forward by the specified number of elements\n    MatConstIterator_& operator += (ptrdiff_t ofs);\n    //! shifts the iterator backward by the specified number of elements\n    MatConstIterator_& operator -= (ptrdiff_t ofs);\n    //! decrements the iterator\n    MatConstIterator_& operator --();\n    //! decrements the iterator\n    MatConstIterator_ operator --(int);\n    //! increments the iterator\n    MatConstIterator_& operator ++();\n    //! increments the iterator\n    MatConstIterator_ operator ++(int);\n    //! returns the current iterator position\n    Point pos() const;\n};\n\n\n\n//////////////////////////////////// MatIterator_ ////////////////////////////////////\n\n/** @brief Matrix read-write iterator\n*/\ntemplate<typename _Tp>\nclass MatIterator_ : public MatConstIterator_<_Tp>\n{\npublic:\n    typedef _Tp* pointer;\n    typedef _Tp& reference;\n\n#ifndef OPENCV_NOSTL\n    typedef std::random_access_iterator_tag iterator_category;\n#endif\n\n    //! the default constructor\n    MatIterator_();\n    //! constructor that sets the iterator to the beginning of the matrix\n    MatIterator_(Mat_<_Tp>* _m);\n    //! constructor that sets the iterator to the specified element of the matrix\n    MatIterator_(Mat_<_Tp>* _m, int _row, int _col=0);\n    //! constructor that sets the iterator to the specified element of the matrix\n    MatIterator_(Mat_<_Tp>* _m, Point _pt);\n    //! constructor that sets the iterator to the specified element of the matrix\n    MatIterator_(Mat_<_Tp>* _m, const int* _idx);\n    //! copy constructor\n    MatIterator_(const MatIterator_& it);\n    //! copy operator\n    MatIterator_& operator = (const MatIterator_<_Tp>& it );\n\n    //! returns the current matrix element\n    _Tp& operator *() const;\n    //! returns the i-th matrix element, relative to the current\n    _Tp& operator [](ptrdiff_t i) const;\n\n    //! shifts the iterator forward by the specified number of elements\n    MatIterator_& operator += (ptrdiff_t ofs);\n    //! shifts the iterator backward by the specified number of elements\n    MatIterator_& operator -= (ptrdiff_t ofs);\n    //! decrements the iterator\n    MatIterator_& operator --();\n    //! decrements the iterator\n    MatIterator_ operator --(int);\n    //! increments the iterator\n    MatIterator_& operator ++();\n    //! increments the iterator\n    MatIterator_ operator ++(int);\n};\n\n\n\n/////////////////////////////// SparseMatConstIterator ///////////////////////////////\n\n/**  @brief Read-Only Sparse Matrix Iterator.\n\n Here is how to use the iterator to compute the sum of floating-point sparse matrix elements:\n\n \\code\n SparseMatConstIterator it = m.begin(), it_end = m.end();\n double s = 0;\n CV_Assert( m.type() == CV_32F );\n for( ; it != it_end; ++it )\n    s += it.value<float>();\n \\endcode\n*/\nclass CV_EXPORTS SparseMatConstIterator\n{\npublic:\n    //! the default constructor\n    SparseMatConstIterator();\n    //! the full constructor setting the iterator to the first sparse matrix element\n    SparseMatConstIterator(const SparseMat* _m);\n    //! the copy constructor\n    SparseMatConstIterator(const SparseMatConstIterator& it);\n\n    //! the assignment operator\n    SparseMatConstIterator& operator = (const SparseMatConstIterator& it);\n\n    //! template method returning the current matrix element\n    template<typename _Tp> const _Tp& value() const;\n    //! returns the current node of the sparse matrix. it.node->idx is the current element index\n    const SparseMat::Node* node() const;\n\n    //! moves iterator to the previous element\n    SparseMatConstIterator& operator --();\n    //! moves iterator to the previous element\n    SparseMatConstIterator operator --(int);\n    //! moves iterator to the next element\n    SparseMatConstIterator& operator ++();\n    //! moves iterator to the next element\n    SparseMatConstIterator operator ++(int);\n\n    //! moves iterator to the element after the last element\n    void seekEnd();\n\n    const SparseMat* m;\n    size_t hashidx;\n    uchar* ptr;\n};\n\n\n\n////////////////////////////////// SparseMatIterator /////////////////////////////////\n\n/** @brief  Read-write Sparse Matrix Iterator\n\n The class is similar to cv::SparseMatConstIterator,\n but can be used for in-place modification of the matrix elements.\n*/\nclass CV_EXPORTS SparseMatIterator : public SparseMatConstIterator\n{\npublic:\n    //! the default constructor\n    SparseMatIterator();\n    //! the full constructor setting the iterator to the first sparse matrix element\n    SparseMatIterator(SparseMat* _m);\n    //! the full constructor setting the iterator to the specified sparse matrix element\n    SparseMatIterator(SparseMat* _m, const int* idx);\n    //! the copy constructor\n    SparseMatIterator(const SparseMatIterator& it);\n\n    //! the assignment operator\n    SparseMatIterator& operator = (const SparseMatIterator& it);\n    //! returns read-write reference to the current sparse matrix element\n    template<typename _Tp> _Tp& value() const;\n    //! returns pointer to the current sparse matrix node. it.node->idx is the index of the current element (do not modify it!)\n    SparseMat::Node* node() const;\n\n    //! moves iterator to the next element\n    SparseMatIterator& operator ++();\n    //! moves iterator to the next element\n    SparseMatIterator operator ++(int);\n};\n\n\n\n/////////////////////////////// SparseMatConstIterator_ //////////////////////////////\n\n/** @brief  Template Read-Only Sparse Matrix Iterator Class.\n\n This is the derived from SparseMatConstIterator class that\n introduces more convenient operator *() for accessing the current element.\n*/\ntemplate<typename _Tp> class SparseMatConstIterator_ : public SparseMatConstIterator\n{\npublic:\n\n#ifndef OPENCV_NOSTL\n    typedef std::forward_iterator_tag iterator_category;\n#endif\n\n    //! the default constructor\n    SparseMatConstIterator_();\n    //! the full constructor setting the iterator to the first sparse matrix element\n    SparseMatConstIterator_(const SparseMat_<_Tp>* _m);\n    SparseMatConstIterator_(const SparseMat* _m);\n    //! the copy constructor\n    SparseMatConstIterator_(const SparseMatConstIterator_& it);\n\n    //! the assignment operator\n    SparseMatConstIterator_& operator = (const SparseMatConstIterator_& it);\n    //! the element access operator\n    const _Tp& operator *() const;\n\n    //! moves iterator to the next element\n    SparseMatConstIterator_& operator ++();\n    //! moves iterator to the next element\n    SparseMatConstIterator_ operator ++(int);\n};\n\n\n\n///////////////////////////////// SparseMatIterator_ /////////////////////////////////\n\n/** @brief  Template Read-Write Sparse Matrix Iterator Class.\n\n This is the derived from cv::SparseMatConstIterator_ class that\n introduces more convenient operator *() for accessing the current element.\n*/\ntemplate<typename _Tp> class SparseMatIterator_ : public SparseMatConstIterator_<_Tp>\n{\npublic:\n\n#ifndef OPENCV_NOSTL\n    typedef std::forward_iterator_tag iterator_category;\n#endif\n\n    //! the default constructor\n    SparseMatIterator_();\n    //! the full constructor setting the iterator to the first sparse matrix element\n    SparseMatIterator_(SparseMat_<_Tp>* _m);\n    SparseMatIterator_(SparseMat* _m);\n    //! the copy constructor\n    SparseMatIterator_(const SparseMatIterator_& it);\n\n    //! the assignment operator\n    SparseMatIterator_& operator = (const SparseMatIterator_& it);\n    //! returns the reference to the current element\n    _Tp& operator *() const;\n\n    //! moves the iterator to the next element\n    SparseMatIterator_& operator ++();\n    //! moves the iterator to the next element\n    SparseMatIterator_ operator ++(int);\n};\n\n\n\n/////////////////////////////////// NAryMatIterator //////////////////////////////////\n\n/** @brief n-ary multi-dimensional array iterator.\n\nUse the class to implement unary, binary, and, generally, n-ary element-wise operations on\nmulti-dimensional arrays. Some of the arguments of an n-ary function may be continuous arrays, some\nmay be not. It is possible to use conventional MatIterator 's for each array but incrementing all of\nthe iterators after each small operations may be a big overhead. In this case consider using\nNAryMatIterator to iterate through several matrices simultaneously as long as they have the same\ngeometry (dimensionality and all the dimension sizes are the same). On each iteration `it.planes[0]`,\n`it.planes[1]`,... will be the slices of the corresponding matrices.\n\nThe example below illustrates how you can compute a normalized and threshold 3D color histogram:\n@code\n    void computeNormalizedColorHist(const Mat& image, Mat& hist, int N, double minProb)\n    {\n        const int histSize[] = {N, N, N};\n\n        // make sure that the histogram has a proper size and type\n        hist.create(3, histSize, CV_32F);\n\n        // and clear it\n        hist = Scalar(0);\n\n        // the loop below assumes that the image\n        // is a 8-bit 3-channel. check it.\n        CV_Assert(image.type() == CV_8UC3);\n        MatConstIterator_<Vec3b> it = image.begin<Vec3b>(),\n                                 it_end = image.end<Vec3b>();\n        for( ; it != it_end; ++it )\n        {\n            const Vec3b& pix = *it;\n            hist.at<float>(pix[0]*N/256, pix[1]*N/256, pix[2]*N/256) += 1.f;\n        }\n\n        minProb *= image.rows*image.cols;\n        Mat plane;\n        NAryMatIterator it(&hist, &plane, 1);\n        double s = 0;\n        // iterate through the matrix. on each iteration\n        // it.planes[*] (of type Mat) will be set to the current plane.\n        for(int p = 0; p < it.nplanes; p++, ++it)\n        {\n            threshold(it.planes[0], it.planes[0], minProb, 0, THRESH_TOZERO);\n            s += sum(it.planes[0])[0];\n        }\n\n        s = 1./s;\n        it = NAryMatIterator(&hist, &plane, 1);\n        for(int p = 0; p < it.nplanes; p++, ++it)\n            it.planes[0] *= s;\n    }\n@endcode\n */\nclass CV_EXPORTS NAryMatIterator\n{\npublic:\n    //! the default constructor\n    NAryMatIterator();\n    //! the full constructor taking arbitrary number of n-dim matrices\n    NAryMatIterator(const Mat** arrays, uchar** ptrs, int narrays=-1);\n    //! the full constructor taking arbitrary number of n-dim matrices\n    NAryMatIterator(const Mat** arrays, Mat* planes, int narrays=-1);\n    //! the separate iterator initialization method\n    void init(const Mat** arrays, Mat* planes, uchar** ptrs, int narrays=-1);\n\n    //! proceeds to the next plane of every iterated matrix\n    NAryMatIterator& operator ++();\n    //! proceeds to the next plane of every iterated matrix (postfix increment operator)\n    NAryMatIterator operator ++(int);\n\n    //! the iterated arrays\n    const Mat** arrays;\n    //! the current planes\n    Mat* planes;\n    //! data pointers\n    uchar** ptrs;\n    //! the number of arrays\n    int narrays;\n    //! the number of hyper-planes that the iterator steps through\n    size_t nplanes;\n    //! the size of each segment (in elements)\n    size_t size;\nprotected:\n    int iterdepth;\n    size_t idx;\n};\n\n\n\n///////////////////////////////// Matrix Expressions /////////////////////////////////\n\nclass CV_EXPORTS MatOp\n{\npublic:\n    MatOp();\n    virtual ~MatOp();\n\n    virtual bool elementWise(const MatExpr& expr) const;\n    virtual void assign(const MatExpr& expr, Mat& m, int type=-1) const = 0;\n    virtual void roi(const MatExpr& expr, const Range& rowRange,\n                     const Range& colRange, MatExpr& res) const;\n    virtual void diag(const MatExpr& expr, int d, MatExpr& res) const;\n    virtual void augAssignAdd(const MatExpr& expr, Mat& m) const;\n    virtual void augAssignSubtract(const MatExpr& expr, Mat& m) const;\n    virtual void augAssignMultiply(const MatExpr& expr, Mat& m) const;\n    virtual void augAssignDivide(const MatExpr& expr, Mat& m) const;\n    virtual void augAssignAnd(const MatExpr& expr, Mat& m) const;\n    virtual void augAssignOr(const MatExpr& expr, Mat& m) const;\n    virtual void augAssignXor(const MatExpr& expr, Mat& m) const;\n\n    virtual void add(const MatExpr& expr1, const MatExpr& expr2, MatExpr& res) const;\n    virtual void add(const MatExpr& expr1, const Scalar& s, MatExpr& res) const;\n\n    virtual void subtract(const MatExpr& expr1, const MatExpr& expr2, MatExpr& res) const;\n    virtual void subtract(const Scalar& s, const MatExpr& expr, MatExpr& res) const;\n\n    virtual void multiply(const MatExpr& expr1, const MatExpr& expr2, MatExpr& res, double scale=1) const;\n    virtual void multiply(const MatExpr& expr1, double s, MatExpr& res) const;\n\n    virtual void divide(const MatExpr& expr1, const MatExpr& expr2, MatExpr& res, double scale=1) const;\n    virtual void divide(double s, const MatExpr& expr, MatExpr& res) const;\n\n    virtual void abs(const MatExpr& expr, MatExpr& res) const;\n\n    virtual void transpose(const MatExpr& expr, MatExpr& res) const;\n    virtual void matmul(const MatExpr& expr1, const MatExpr& expr2, MatExpr& res) const;\n    virtual void invert(const MatExpr& expr, int method, MatExpr& res) const;\n\n    virtual Size size(const MatExpr& expr) const;\n    virtual int type(const MatExpr& expr) const;\n};\n\n/** @brief Matrix expression representation\n@anchor MatrixExpressions\nThis is a list of implemented matrix operations that can be combined in arbitrary complex\nexpressions (here A, B stand for matrices ( Mat ), s for a scalar ( Scalar ), alpha for a\nreal-valued scalar ( double )):\n-   Addition, subtraction, negation: `A+B`, `A-B`, `A+s`, `A-s`, `s+A`, `s-A`, `-A`\n-   Scaling: `A*alpha`\n-   Per-element multiplication and division: `A.mul(B)`, `A/B`, `alpha/A`\n-   Matrix multiplication: `A*B`\n-   Transposition: `A.t()` (means A<sup>T</sup>)\n-   Matrix inversion and pseudo-inversion, solving linear systems and least-squares problems:\n    `A.inv([method]) (~ A<sup>-1</sup>)`,   `A.inv([method])*B (~ X: AX=B)`\n-   Comparison: `A cmpop B`, `A cmpop alpha`, `alpha cmpop A`, where *cmpop* is one of\n  `>`, `>=`, `==`, `!=`, `<=`, `<`. The result of comparison is an 8-bit single channel mask whose\n    elements are set to 255 (if the particular element or pair of elements satisfy the condition) or\n    0.\n-   Bitwise logical operations: `A logicop B`, `A logicop s`, `s logicop A`, `~A`, where *logicop* is one of\n  `&`, `|`, `^`.\n-   Element-wise minimum and maximum: `min(A, B)`, `min(A, alpha)`, `max(A, B)`, `max(A, alpha)`\n-   Element-wise absolute value: `abs(A)`\n-   Cross-product, dot-product: `A.cross(B)`, `A.dot(B)`\n-   Any function of matrix or matrices and scalars that returns a matrix or a scalar, such as norm,\n    mean, sum, countNonZero, trace, determinant, repeat, and others.\n-   Matrix initializers ( Mat::eye(), Mat::zeros(), Mat::ones() ), matrix comma-separated\n    initializers, matrix constructors and operators that extract sub-matrices (see Mat description).\n-   Mat_<destination_type>() constructors to cast the result to the proper type.\n@note Comma-separated initializers and probably some other operations may require additional\nexplicit Mat() or Mat_<T>() constructor calls to resolve a possible ambiguity.\n\nHere are examples of matrix expressions:\n@code\n    // compute pseudo-inverse of A, equivalent to A.inv(DECOMP_SVD)\n    SVD svd(A);\n    Mat pinvA = svd.vt.t()*Mat::diag(1./svd.w)*svd.u.t();\n\n    // compute the new vector of parameters in the Levenberg-Marquardt algorithm\n    x -= (A.t()*A + lambda*Mat::eye(A.cols,A.cols,A.type())).inv(DECOMP_CHOLESKY)*(A.t()*err);\n\n    // sharpen image using \"unsharp mask\" algorithm\n    Mat blurred; double sigma = 1, threshold = 5, amount = 1;\n    GaussianBlur(img, blurred, Size(), sigma, sigma);\n    Mat lowConstrastMask = abs(img - blurred) < threshold;\n    Mat sharpened = img*(1+amount) + blurred*(-amount);\n    img.copyTo(sharpened, lowContrastMask);\n@endcode\n*/\nclass CV_EXPORTS MatExpr\n{\npublic:\n    MatExpr();\n    explicit MatExpr(const Mat& m);\n\n    MatExpr(const MatOp* _op, int _flags, const Mat& _a = Mat(), const Mat& _b = Mat(),\n            const Mat& _c = Mat(), double _alpha = 1, double _beta = 1, const Scalar& _s = Scalar());\n\n    operator Mat() const;\n    template<typename _Tp> operator Mat_<_Tp>() const;\n\n    Size size() const;\n    int type() const;\n\n    MatExpr row(int y) const;\n    MatExpr col(int x) const;\n    MatExpr diag(int d = 0) const;\n    MatExpr operator()( const Range& rowRange, const Range& colRange ) const;\n    MatExpr operator()( const Rect& roi ) const;\n\n    MatExpr t() const;\n    MatExpr inv(int method = DECOMP_LU) const;\n    MatExpr mul(const MatExpr& e, double scale=1) const;\n    MatExpr mul(const Mat& m, double scale=1) const;\n\n    Mat cross(const Mat& m) const;\n    double dot(const Mat& m) const;\n\n    const MatOp* op;\n    int flags;\n\n    Mat a, b, c;\n    double alpha, beta;\n    Scalar s;\n};\n\n//! @} core_basic\n\n//! @relates cv::MatExpr\n//! @{\nCV_EXPORTS MatExpr operator + (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator + (const Mat& a, const Scalar& s);\nCV_EXPORTS MatExpr operator + (const Scalar& s, const Mat& a);\nCV_EXPORTS MatExpr operator + (const MatExpr& e, const Mat& m);\nCV_EXPORTS MatExpr operator + (const Mat& m, const MatExpr& e);\nCV_EXPORTS MatExpr operator + (const MatExpr& e, const Scalar& s);\nCV_EXPORTS MatExpr operator + (const Scalar& s, const MatExpr& e);\nCV_EXPORTS MatExpr operator + (const MatExpr& e1, const MatExpr& e2);\n\nCV_EXPORTS MatExpr operator - (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator - (const Mat& a, const Scalar& s);\nCV_EXPORTS MatExpr operator - (const Scalar& s, const Mat& a);\nCV_EXPORTS MatExpr operator - (const MatExpr& e, const Mat& m);\nCV_EXPORTS MatExpr operator - (const Mat& m, const MatExpr& e);\nCV_EXPORTS MatExpr operator - (const MatExpr& e, const Scalar& s);\nCV_EXPORTS MatExpr operator - (const Scalar& s, const MatExpr& e);\nCV_EXPORTS MatExpr operator - (const MatExpr& e1, const MatExpr& e2);\n\nCV_EXPORTS MatExpr operator - (const Mat& m);\nCV_EXPORTS MatExpr operator - (const MatExpr& e);\n\nCV_EXPORTS MatExpr operator * (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator * (const Mat& a, double s);\nCV_EXPORTS MatExpr operator * (double s, const Mat& a);\nCV_EXPORTS MatExpr operator * (const MatExpr& e, const Mat& m);\nCV_EXPORTS MatExpr operator * (const Mat& m, const MatExpr& e);\nCV_EXPORTS MatExpr operator * (const MatExpr& e, double s);\nCV_EXPORTS MatExpr operator * (double s, const MatExpr& e);\nCV_EXPORTS MatExpr operator * (const MatExpr& e1, const MatExpr& e2);\n\nCV_EXPORTS MatExpr operator / (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator / (const Mat& a, double s);\nCV_EXPORTS MatExpr operator / (double s, const Mat& a);\nCV_EXPORTS MatExpr operator / (const MatExpr& e, const Mat& m);\nCV_EXPORTS MatExpr operator / (const Mat& m, const MatExpr& e);\nCV_EXPORTS MatExpr operator / (const MatExpr& e, double s);\nCV_EXPORTS MatExpr operator / (double s, const MatExpr& e);\nCV_EXPORTS MatExpr operator / (const MatExpr& e1, const MatExpr& e2);\n\nCV_EXPORTS MatExpr operator < (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator < (const Mat& a, double s);\nCV_EXPORTS MatExpr operator < (double s, const Mat& a);\n\nCV_EXPORTS MatExpr operator <= (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator <= (const Mat& a, double s);\nCV_EXPORTS MatExpr operator <= (double s, const Mat& a);\n\nCV_EXPORTS MatExpr operator == (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator == (const Mat& a, double s);\nCV_EXPORTS MatExpr operator == (double s, const Mat& a);\n\nCV_EXPORTS MatExpr operator != (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator != (const Mat& a, double s);\nCV_EXPORTS MatExpr operator != (double s, const Mat& a);\n\nCV_EXPORTS MatExpr operator >= (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator >= (const Mat& a, double s);\nCV_EXPORTS MatExpr operator >= (double s, const Mat& a);\n\nCV_EXPORTS MatExpr operator > (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator > (const Mat& a, double s);\nCV_EXPORTS MatExpr operator > (double s, const Mat& a);\n\nCV_EXPORTS MatExpr operator & (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator & (const Mat& a, const Scalar& s);\nCV_EXPORTS MatExpr operator & (const Scalar& s, const Mat& a);\n\nCV_EXPORTS MatExpr operator | (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator | (const Mat& a, const Scalar& s);\nCV_EXPORTS MatExpr operator | (const Scalar& s, const Mat& a);\n\nCV_EXPORTS MatExpr operator ^ (const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr operator ^ (const Mat& a, const Scalar& s);\nCV_EXPORTS MatExpr operator ^ (const Scalar& s, const Mat& a);\n\nCV_EXPORTS MatExpr operator ~(const Mat& m);\n\nCV_EXPORTS MatExpr min(const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr min(const Mat& a, double s);\nCV_EXPORTS MatExpr min(double s, const Mat& a);\n\nCV_EXPORTS MatExpr max(const Mat& a, const Mat& b);\nCV_EXPORTS MatExpr max(const Mat& a, double s);\nCV_EXPORTS MatExpr max(double s, const Mat& a);\n\n/** @brief Calculates an absolute value of each matrix element.\n\nabs is a meta-function that is expanded to one of absdiff or convertScaleAbs forms:\n- C = abs(A-B) is equivalent to `absdiff(A, B, C)`\n- C = abs(A) is equivalent to `absdiff(A, Scalar::all(0), C)`\n- C = `Mat_<Vec<uchar,n> >(abs(A*alpha + beta))` is equivalent to `convertScaleAbs(A, C, alpha,\nbeta)`\n\nThe output matrix has the same size and the same type as the input one except for the last case,\nwhere C is depth=CV_8U .\n@param m matrix.\n@sa @ref MatrixExpressions, absdiff, convertScaleAbs\n */\nCV_EXPORTS MatExpr abs(const Mat& m);\n/** @overload\n@param e matrix expression.\n*/\nCV_EXPORTS MatExpr abs(const MatExpr& e);\n//! @} relates cv::MatExpr\n\n} // cv\n\n#include \"opencv2/core/mat.inl.hpp\"\n\n#endif // __OPENCV_CORE_MAT_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/mat.inl.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_MATRIX_OPERATIONS_HPP__\n#define __OPENCV_CORE_MATRIX_OPERATIONS_HPP__\n\n#ifndef __cplusplus\n#  error mat.inl.hpp header must be compiled as C++\n#endif\n\nnamespace cv\n{\n\n//! @cond IGNORED\n\n//////////////////////// Input/Output Arrays ////////////////////////\n\ninline void _InputArray::init(int _flags, const void* _obj)\n{ flags = _flags; obj = (void*)_obj; }\n\ninline void _InputArray::init(int _flags, const void* _obj, Size _sz)\n{ flags = _flags; obj = (void*)_obj; sz = _sz; }\n\ninline void* _InputArray::getObj() const { return obj; }\ninline int _InputArray::getFlags() const { return flags; }\ninline Size _InputArray::getSz() const { return sz; }\n\ninline _InputArray::_InputArray() { init(NONE, 0); }\ninline _InputArray::_InputArray(int _flags, void* _obj) { init(_flags, _obj); }\ninline _InputArray::_InputArray(const Mat& m) { init(MAT+ACCESS_READ, &m); }\ninline _InputArray::_InputArray(const std::vector<Mat>& vec) { init(STD_VECTOR_MAT+ACCESS_READ, &vec); }\ninline _InputArray::_InputArray(const UMat& m) { init(UMAT+ACCESS_READ, &m); }\ninline _InputArray::_InputArray(const std::vector<UMat>& vec) { init(STD_VECTOR_UMAT+ACCESS_READ, &vec); }\n\ntemplate<typename _Tp> inline\n_InputArray::_InputArray(const std::vector<_Tp>& vec)\n{ init(FIXED_TYPE + STD_VECTOR + DataType<_Tp>::type + ACCESS_READ, &vec); }\n\ninline\n_InputArray::_InputArray(const std::vector<bool>& vec)\n{ init(FIXED_TYPE + STD_BOOL_VECTOR + DataType<bool>::type + ACCESS_READ, &vec); }\n\ntemplate<typename _Tp> inline\n_InputArray::_InputArray(const std::vector<std::vector<_Tp> >& vec)\n{ init(FIXED_TYPE + STD_VECTOR_VECTOR + DataType<_Tp>::type + ACCESS_READ, &vec); }\n\ntemplate<typename _Tp> inline\n_InputArray::_InputArray(const std::vector<Mat_<_Tp> >& vec)\n{ init(FIXED_TYPE + STD_VECTOR_MAT + DataType<_Tp>::type + ACCESS_READ, &vec); }\n\ntemplate<typename _Tp, int m, int n> inline\n_InputArray::_InputArray(const Matx<_Tp, m, n>& mtx)\n{ init(FIXED_TYPE + FIXED_SIZE + MATX + DataType<_Tp>::type + ACCESS_READ, &mtx, Size(n, m)); }\n\ntemplate<typename _Tp> inline\n_InputArray::_InputArray(const _Tp* vec, int n)\n{ init(FIXED_TYPE + FIXED_SIZE + MATX + DataType<_Tp>::type + ACCESS_READ, vec, Size(n, 1)); }\n\ntemplate<typename _Tp> inline\n_InputArray::_InputArray(const Mat_<_Tp>& m)\n{ init(FIXED_TYPE + MAT + DataType<_Tp>::type + ACCESS_READ, &m); }\n\ninline _InputArray::_InputArray(const double& val)\n{ init(FIXED_TYPE + FIXED_SIZE + MATX + CV_64F + ACCESS_READ, &val, Size(1,1)); }\n\ninline _InputArray::_InputArray(const MatExpr& expr)\n{ init(FIXED_TYPE + FIXED_SIZE + EXPR + ACCESS_READ, &expr); }\n\ninline _InputArray::_InputArray(const cuda::GpuMat& d_mat)\n{ init(CUDA_GPU_MAT + ACCESS_READ, &d_mat); }\n\ninline _InputArray::_InputArray(const ogl::Buffer& buf)\n{ init(OPENGL_BUFFER + ACCESS_READ, &buf); }\n\ninline _InputArray::_InputArray(const cuda::HostMem& cuda_mem)\n{ init(CUDA_HOST_MEM + ACCESS_READ, &cuda_mem); }\n\ninline _InputArray::~_InputArray() {}\n\ninline Mat _InputArray::getMat(int i) const\n{\n    if( kind() == MAT && i < 0 )\n        return *(const Mat*)obj;\n    return getMat_(i);\n}\n\ninline bool _InputArray::isMat() const { return kind() == _InputArray::MAT; }\ninline bool _InputArray::isUMat() const  { return kind() == _InputArray::UMAT; }\ninline bool _InputArray::isMatVector() const { return kind() == _InputArray::STD_VECTOR_MAT; }\ninline bool _InputArray::isUMatVector() const  { return kind() == _InputArray::STD_VECTOR_UMAT; }\ninline bool _InputArray::isMatx() const { return kind() == _InputArray::MATX; }\n\n////////////////////////////////////////////////////////////////////////////////////////\n\ninline _OutputArray::_OutputArray() { init(ACCESS_WRITE, 0); }\ninline _OutputArray::_OutputArray(int _flags, void* _obj) { init(_flags|ACCESS_WRITE, _obj); }\ninline _OutputArray::_OutputArray(Mat& m) { init(MAT+ACCESS_WRITE, &m); }\ninline _OutputArray::_OutputArray(std::vector<Mat>& vec) { init(STD_VECTOR_MAT+ACCESS_WRITE, &vec); }\ninline _OutputArray::_OutputArray(UMat& m) { init(UMAT+ACCESS_WRITE, &m); }\ninline _OutputArray::_OutputArray(std::vector<UMat>& vec) { init(STD_VECTOR_UMAT+ACCESS_WRITE, &vec); }\n\ntemplate<typename _Tp> inline\n_OutputArray::_OutputArray(std::vector<_Tp>& vec)\n{ init(FIXED_TYPE + STD_VECTOR + DataType<_Tp>::type + ACCESS_WRITE, &vec); }\n\ninline\n_OutputArray::_OutputArray(std::vector<bool>&)\n{ CV_Error(Error::StsUnsupportedFormat, \"std::vector<bool> cannot be an output array\\n\"); }\n\ntemplate<typename _Tp> inline\n_OutputArray::_OutputArray(std::vector<std::vector<_Tp> >& vec)\n{ init(FIXED_TYPE + STD_VECTOR_VECTOR + DataType<_Tp>::type + ACCESS_WRITE, &vec); }\n\ntemplate<typename _Tp> inline\n_OutputArray::_OutputArray(std::vector<Mat_<_Tp> >& vec)\n{ init(FIXED_TYPE + STD_VECTOR_MAT + DataType<_Tp>::type + ACCESS_WRITE, &vec); }\n\ntemplate<typename _Tp> inline\n_OutputArray::_OutputArray(Mat_<_Tp>& m)\n{ init(FIXED_TYPE + MAT + DataType<_Tp>::type + ACCESS_WRITE, &m); }\n\ntemplate<typename _Tp, int m, int n> inline\n_OutputArray::_OutputArray(Matx<_Tp, m, n>& mtx)\n{ init(FIXED_TYPE + FIXED_SIZE + MATX + DataType<_Tp>::type + ACCESS_WRITE, &mtx, Size(n, m)); }\n\ntemplate<typename _Tp> inline\n_OutputArray::_OutputArray(_Tp* vec, int n)\n{ init(FIXED_TYPE + FIXED_SIZE + MATX + DataType<_Tp>::type + ACCESS_WRITE, vec, Size(n, 1)); }\n\ntemplate<typename _Tp> inline\n_OutputArray::_OutputArray(const std::vector<_Tp>& vec)\n{ init(FIXED_TYPE + FIXED_SIZE + STD_VECTOR + DataType<_Tp>::type + ACCESS_WRITE, &vec); }\n\ntemplate<typename _Tp> inline\n_OutputArray::_OutputArray(const std::vector<std::vector<_Tp> >& vec)\n{ init(FIXED_TYPE + FIXED_SIZE + STD_VECTOR_VECTOR + DataType<_Tp>::type + ACCESS_WRITE, &vec); }\n\ntemplate<typename _Tp> inline\n_OutputArray::_OutputArray(const std::vector<Mat_<_Tp> >& vec)\n{ init(FIXED_TYPE + FIXED_SIZE + STD_VECTOR_MAT + DataType<_Tp>::type + ACCESS_WRITE, &vec); }\n\ntemplate<typename _Tp> inline\n_OutputArray::_OutputArray(const Mat_<_Tp>& m)\n{ init(FIXED_TYPE + FIXED_SIZE + MAT + DataType<_Tp>::type + ACCESS_WRITE, &m); }\n\ntemplate<typename _Tp, int m, int n> inline\n_OutputArray::_OutputArray(const Matx<_Tp, m, n>& mtx)\n{ init(FIXED_TYPE + FIXED_SIZE + MATX + DataType<_Tp>::type + ACCESS_WRITE, &mtx, Size(n, m)); }\n\ntemplate<typename _Tp> inline\n_OutputArray::_OutputArray(const _Tp* vec, int n)\n{ init(FIXED_TYPE + FIXED_SIZE + MATX + DataType<_Tp>::type + ACCESS_WRITE, vec, Size(n, 1)); }\n\ninline _OutputArray::_OutputArray(cuda::GpuMat& d_mat)\n{ init(CUDA_GPU_MAT + ACCESS_WRITE, &d_mat); }\n\ninline _OutputArray::_OutputArray(ogl::Buffer& buf)\n{ init(OPENGL_BUFFER + ACCESS_WRITE, &buf); }\n\ninline _OutputArray::_OutputArray(cuda::HostMem& cuda_mem)\n{ init(CUDA_HOST_MEM + ACCESS_WRITE, &cuda_mem); }\n\ninline _OutputArray::_OutputArray(const Mat& m)\n{ init(FIXED_TYPE + FIXED_SIZE + MAT + ACCESS_WRITE, &m); }\n\ninline _OutputArray::_OutputArray(const std::vector<Mat>& vec)\n{ init(FIXED_SIZE + STD_VECTOR_MAT + ACCESS_WRITE, &vec); }\n\ninline _OutputArray::_OutputArray(const UMat& m)\n{ init(FIXED_TYPE + FIXED_SIZE + UMAT + ACCESS_WRITE, &m); }\n\ninline _OutputArray::_OutputArray(const std::vector<UMat>& vec)\n{ init(FIXED_SIZE + STD_VECTOR_UMAT + ACCESS_WRITE, &vec); }\n\ninline _OutputArray::_OutputArray(const cuda::GpuMat& d_mat)\n{ init(FIXED_TYPE + FIXED_SIZE + CUDA_GPU_MAT + ACCESS_WRITE, &d_mat); }\n\ninline _OutputArray::_OutputArray(const ogl::Buffer& buf)\n{ init(FIXED_TYPE + FIXED_SIZE + OPENGL_BUFFER + ACCESS_WRITE, &buf); }\n\ninline _OutputArray::_OutputArray(const cuda::HostMem& cuda_mem)\n{ init(FIXED_TYPE + FIXED_SIZE + CUDA_HOST_MEM + ACCESS_WRITE, &cuda_mem); }\n\n///////////////////////////////////////////////////////////////////////////////////////////\n\ninline _InputOutputArray::_InputOutputArray() { init(ACCESS_RW, 0); }\ninline _InputOutputArray::_InputOutputArray(int _flags, void* _obj) { init(_flags|ACCESS_RW, _obj); }\ninline _InputOutputArray::_InputOutputArray(Mat& m) { init(MAT+ACCESS_RW, &m); }\ninline _InputOutputArray::_InputOutputArray(std::vector<Mat>& vec) { init(STD_VECTOR_MAT+ACCESS_RW, &vec); }\ninline _InputOutputArray::_InputOutputArray(UMat& m) { init(UMAT+ACCESS_RW, &m); }\ninline _InputOutputArray::_InputOutputArray(std::vector<UMat>& vec) { init(STD_VECTOR_UMAT+ACCESS_RW, &vec); }\n\ntemplate<typename _Tp> inline\n_InputOutputArray::_InputOutputArray(std::vector<_Tp>& vec)\n{ init(FIXED_TYPE + STD_VECTOR + DataType<_Tp>::type + ACCESS_RW, &vec); }\n\ninline _InputOutputArray::_InputOutputArray(std::vector<bool>&)\n{ CV_Error(Error::StsUnsupportedFormat, \"std::vector<bool> cannot be an input/output array\\n\"); }\n\ntemplate<typename _Tp> inline\n_InputOutputArray::_InputOutputArray(std::vector<std::vector<_Tp> >& vec)\n{ init(FIXED_TYPE + STD_VECTOR_VECTOR + DataType<_Tp>::type + ACCESS_RW, &vec); }\n\ntemplate<typename _Tp> inline\n_InputOutputArray::_InputOutputArray(std::vector<Mat_<_Tp> >& vec)\n{ init(FIXED_TYPE + STD_VECTOR_MAT + DataType<_Tp>::type + ACCESS_RW, &vec); }\n\ntemplate<typename _Tp> inline\n_InputOutputArray::_InputOutputArray(Mat_<_Tp>& m)\n{ init(FIXED_TYPE + MAT + DataType<_Tp>::type + ACCESS_RW, &m); }\n\ntemplate<typename _Tp, int m, int n> inline\n_InputOutputArray::_InputOutputArray(Matx<_Tp, m, n>& mtx)\n{ init(FIXED_TYPE + FIXED_SIZE + MATX + DataType<_Tp>::type + ACCESS_RW, &mtx, Size(n, m)); }\n\ntemplate<typename _Tp> inline\n_InputOutputArray::_InputOutputArray(_Tp* vec, int n)\n{ init(FIXED_TYPE + FIXED_SIZE + MATX + DataType<_Tp>::type + ACCESS_RW, vec, Size(n, 1)); }\n\ntemplate<typename _Tp> inline\n_InputOutputArray::_InputOutputArray(const std::vector<_Tp>& vec)\n{ init(FIXED_TYPE + FIXED_SIZE + STD_VECTOR + DataType<_Tp>::type + ACCESS_RW, &vec); }\n\ntemplate<typename _Tp> inline\n_InputOutputArray::_InputOutputArray(const std::vector<std::vector<_Tp> >& vec)\n{ init(FIXED_TYPE + FIXED_SIZE + STD_VECTOR_VECTOR + DataType<_Tp>::type + ACCESS_RW, &vec); }\n\ntemplate<typename _Tp> inline\n_InputOutputArray::_InputOutputArray(const std::vector<Mat_<_Tp> >& vec)\n{ init(FIXED_TYPE + FIXED_SIZE + STD_VECTOR_MAT + DataType<_Tp>::type + ACCESS_RW, &vec); }\n\ntemplate<typename _Tp> inline\n_InputOutputArray::_InputOutputArray(const Mat_<_Tp>& m)\n{ init(FIXED_TYPE + FIXED_SIZE + MAT + DataType<_Tp>::type + ACCESS_RW, &m); }\n\ntemplate<typename _Tp, int m, int n> inline\n_InputOutputArray::_InputOutputArray(const Matx<_Tp, m, n>& mtx)\n{ init(FIXED_TYPE + FIXED_SIZE + MATX + DataType<_Tp>::type + ACCESS_RW, &mtx, Size(n, m)); }\n\ntemplate<typename _Tp> inline\n_InputOutputArray::_InputOutputArray(const _Tp* vec, int n)\n{ init(FIXED_TYPE + FIXED_SIZE + MATX + DataType<_Tp>::type + ACCESS_RW, vec, Size(n, 1)); }\n\ninline _InputOutputArray::_InputOutputArray(cuda::GpuMat& d_mat)\n{ init(CUDA_GPU_MAT + ACCESS_RW, &d_mat); }\n\ninline _InputOutputArray::_InputOutputArray(ogl::Buffer& buf)\n{ init(OPENGL_BUFFER + ACCESS_RW, &buf); }\n\ninline _InputOutputArray::_InputOutputArray(cuda::HostMem& cuda_mem)\n{ init(CUDA_HOST_MEM + ACCESS_RW, &cuda_mem); }\n\ninline _InputOutputArray::_InputOutputArray(const Mat& m)\n{ init(FIXED_TYPE + FIXED_SIZE + MAT + ACCESS_RW, &m); }\n\ninline _InputOutputArray::_InputOutputArray(const std::vector<Mat>& vec)\n{ init(FIXED_SIZE + STD_VECTOR_MAT + ACCESS_RW, &vec); }\n\ninline _InputOutputArray::_InputOutputArray(const UMat& m)\n{ init(FIXED_TYPE + FIXED_SIZE + UMAT + ACCESS_RW, &m); }\n\ninline _InputOutputArray::_InputOutputArray(const std::vector<UMat>& vec)\n{ init(FIXED_SIZE + STD_VECTOR_UMAT + ACCESS_RW, &vec); }\n\ninline _InputOutputArray::_InputOutputArray(const cuda::GpuMat& d_mat)\n{ init(FIXED_TYPE + FIXED_SIZE + CUDA_GPU_MAT + ACCESS_RW, &d_mat); }\n\ninline _InputOutputArray::_InputOutputArray(const ogl::Buffer& buf)\n{ init(FIXED_TYPE + FIXED_SIZE + OPENGL_BUFFER + ACCESS_RW, &buf); }\n\ninline _InputOutputArray::_InputOutputArray(const cuda::HostMem& cuda_mem)\n{ init(FIXED_TYPE + FIXED_SIZE + CUDA_HOST_MEM + ACCESS_RW, &cuda_mem); }\n\n//////////////////////////////////////////// Mat //////////////////////////////////////////\n\ninline\nMat::Mat()\n    : flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0),\n      datalimit(0), allocator(0), u(0), size(&rows)\n{}\n\ninline\nMat::Mat(int _rows, int _cols, int _type)\n    : flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0),\n      datalimit(0), allocator(0), u(0), size(&rows)\n{\n    create(_rows, _cols, _type);\n}\n\ninline\nMat::Mat(int _rows, int _cols, int _type, const Scalar& _s)\n    : flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0),\n      datalimit(0), allocator(0), u(0), size(&rows)\n{\n    create(_rows, _cols, _type);\n    *this = _s;\n}\n\ninline\nMat::Mat(Size _sz, int _type)\n    : flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0),\n      datalimit(0), allocator(0), u(0), size(&rows)\n{\n    create( _sz.height, _sz.width, _type );\n}\n\ninline\nMat::Mat(Size _sz, int _type, const Scalar& _s)\n    : flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0),\n      datalimit(0), allocator(0), u(0), size(&rows)\n{\n    create(_sz.height, _sz.width, _type);\n    *this = _s;\n}\n\ninline\nMat::Mat(int _dims, const int* _sz, int _type)\n    : flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0),\n      datalimit(0), allocator(0), u(0), size(&rows)\n{\n    create(_dims, _sz, _type);\n}\n\ninline\nMat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s)\n    : flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0),\n      datalimit(0), allocator(0), u(0), size(&rows)\n{\n    create(_dims, _sz, _type);\n    *this = _s;\n}\n\ninline\nMat::Mat(const Mat& m)\n    : flags(m.flags), dims(m.dims), rows(m.rows), cols(m.cols), data(m.data),\n      datastart(m.datastart), dataend(m.dataend), datalimit(m.datalimit), allocator(m.allocator),\n      u(m.u), size(&rows)\n{\n    if( u )\n        CV_XADD(&u->refcount, 1);\n    if( m.dims <= 2 )\n    {\n        step[0] = m.step[0]; step[1] = m.step[1];\n    }\n    else\n    {\n        dims = 0;\n        copySize(m);\n    }\n}\n\ninline\nMat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)\n    : flags(MAGIC_VAL + (_type & TYPE_MASK)), dims(2), rows(_rows), cols(_cols),\n      data((uchar*)_data), datastart((uchar*)_data), dataend(0), datalimit(0),\n      allocator(0), u(0), size(&rows)\n{\n    size_t esz = CV_ELEM_SIZE(_type), esz1 = CV_ELEM_SIZE1(_type);\n    size_t minstep = cols * esz;\n    if( _step == AUTO_STEP )\n    {\n        _step = minstep;\n        flags |= CONTINUOUS_FLAG;\n    }\n    else\n    {\n        if( rows == 1 ) _step = minstep;\n        CV_DbgAssert( _step >= minstep );\n\n        if (_step % esz1 != 0)\n        {\n            CV_Error(Error::BadStep, \"Step must be a multiple of esz1\");\n        }\n\n        flags |= _step == minstep ? CONTINUOUS_FLAG : 0;\n    }\n    step[0] = _step;\n    step[1] = esz;\n    datalimit = datastart + _step * rows;\n    dataend = datalimit - _step + minstep;\n}\n\ninline\nMat::Mat(Size _sz, int _type, void* _data, size_t _step)\n    : flags(MAGIC_VAL + (_type & TYPE_MASK)), dims(2), rows(_sz.height), cols(_sz.width),\n      data((uchar*)_data), datastart((uchar*)_data), dataend(0), datalimit(0),\n      allocator(0), u(0), size(&rows)\n{\n    size_t esz = CV_ELEM_SIZE(_type), esz1 = CV_ELEM_SIZE1(_type);\n    size_t minstep = cols*esz;\n    if( _step == AUTO_STEP )\n    {\n        _step = minstep;\n        flags |= CONTINUOUS_FLAG;\n    }\n    else\n    {\n        if( rows == 1 ) _step = minstep;\n        CV_DbgAssert( _step >= minstep );\n\n        if (_step % esz1 != 0)\n        {\n            CV_Error(Error::BadStep, \"Step must be a multiple of esz1\");\n        }\n\n        flags |= _step == minstep ? CONTINUOUS_FLAG : 0;\n    }\n    step[0] = _step;\n    step[1] = esz;\n    datalimit = datastart + _step*rows;\n    dataend = datalimit - _step + minstep;\n}\n\ntemplate<typename _Tp> inline\nMat::Mat(const std::vector<_Tp>& vec, bool copyData)\n    : flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows((int)vec.size()),\n      cols(1), data(0), datastart(0), dataend(0), allocator(0), u(0), size(&rows)\n{\n    if(vec.empty())\n        return;\n    if( !copyData )\n    {\n        step[0] = step[1] = sizeof(_Tp);\n        datastart = data = (uchar*)&vec[0];\n        datalimit = dataend = datastart + rows * step[0];\n    }\n    else\n        Mat((int)vec.size(), 1, DataType<_Tp>::type, (uchar*)&vec[0]).copyTo(*this);\n}\n\ntemplate<typename _Tp, int n> inline\nMat::Mat(const Vec<_Tp, n>& vec, bool copyData)\n    : flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows(n), cols(1), data(0),\n      datastart(0), dataend(0), allocator(0), u(0), size(&rows)\n{\n    if( !copyData )\n    {\n        step[0] = step[1] = sizeof(_Tp);\n        datastart = data = (uchar*)vec.val;\n        datalimit = dataend = datastart + rows * step[0];\n    }\n    else\n        Mat(n, 1, DataType<_Tp>::type, (void*)vec.val).copyTo(*this);\n}\n\n\ntemplate<typename _Tp, int m, int n> inline\nMat::Mat(const Matx<_Tp,m,n>& M, bool copyData)\n    : flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows(m), cols(n), data(0),\n      datastart(0), dataend(0), allocator(0), u(0), size(&rows)\n{\n    if( !copyData )\n    {\n        step[0] = cols * sizeof(_Tp);\n        step[1] = sizeof(_Tp);\n        datastart = data = (uchar*)M.val;\n        datalimit = dataend = datastart + rows * step[0];\n    }\n    else\n        Mat(m, n, DataType<_Tp>::type, (uchar*)M.val).copyTo(*this);\n}\n\ntemplate<typename _Tp> inline\nMat::Mat(const Point_<_Tp>& pt, bool copyData)\n    : flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows(2), cols(1), data(0),\n      datastart(0), dataend(0), allocator(0), u(0), size(&rows)\n{\n    if( !copyData )\n    {\n        step[0] = step[1] = sizeof(_Tp);\n        datastart = data = (uchar*)&pt.x;\n        datalimit = dataend = datastart + rows * step[0];\n    }\n    else\n    {\n        create(2, 1, DataType<_Tp>::type);\n        ((_Tp*)data)[0] = pt.x;\n        ((_Tp*)data)[1] = pt.y;\n    }\n}\n\ntemplate<typename _Tp> inline\nMat::Mat(const Point3_<_Tp>& pt, bool copyData)\n    : flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows(3), cols(1), data(0),\n      datastart(0), dataend(0), allocator(0), u(0), size(&rows)\n{\n    if( !copyData )\n    {\n        step[0] = step[1] = sizeof(_Tp);\n        datastart = data = (uchar*)&pt.x;\n        datalimit = dataend = datastart + rows * step[0];\n    }\n    else\n    {\n        create(3, 1, DataType<_Tp>::type);\n        ((_Tp*)data)[0] = pt.x;\n        ((_Tp*)data)[1] = pt.y;\n        ((_Tp*)data)[2] = pt.z;\n    }\n}\n\ntemplate<typename _Tp> inline\nMat::Mat(const MatCommaInitializer_<_Tp>& commaInitializer)\n    : flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(0), rows(0), cols(0), data(0),\n      datastart(0), dataend(0), allocator(0), u(0), size(&rows)\n{\n    *this = commaInitializer.operator Mat_<_Tp>();\n}\n\ninline\nMat::~Mat()\n{\n    release();\n    if( step.p != step.buf )\n        fastFree(step.p);\n}\n\ninline\nMat& Mat::operator = (const Mat& m)\n{\n    if( this != &m )\n    {\n        if( m.u )\n            CV_XADD(&m.u->refcount, 1);\n        release();\n        flags = m.flags;\n        if( dims <= 2 && m.dims <= 2 )\n        {\n            dims = m.dims;\n            rows = m.rows;\n            cols = m.cols;\n            step[0] = m.step[0];\n            step[1] = m.step[1];\n        }\n        else\n            copySize(m);\n        data = m.data;\n        datastart = m.datastart;\n        dataend = m.dataend;\n        datalimit = m.datalimit;\n        allocator = m.allocator;\n        u = m.u;\n    }\n    return *this;\n}\n\ninline\nMat Mat::row(int y) const\n{\n    return Mat(*this, Range(y, y + 1), Range::all());\n}\n\ninline\nMat Mat::col(int x) const\n{\n    return Mat(*this, Range::all(), Range(x, x + 1));\n}\n\ninline\nMat Mat::rowRange(int startrow, int endrow) const\n{\n    return Mat(*this, Range(startrow, endrow), Range::all());\n}\n\ninline\nMat Mat::rowRange(const Range& r) const\n{\n    return Mat(*this, r, Range::all());\n}\n\ninline\nMat Mat::colRange(int startcol, int endcol) const\n{\n    return Mat(*this, Range::all(), Range(startcol, endcol));\n}\n\ninline\nMat Mat::colRange(const Range& r) const\n{\n    return Mat(*this, Range::all(), r);\n}\n\ninline\nMat Mat::clone() const\n{\n    Mat m;\n    copyTo(m);\n    return m;\n}\n\ninline\nvoid Mat::assignTo( Mat& m, int _type ) const\n{\n    if( _type < 0 )\n        m = *this;\n    else\n        convertTo(m, _type);\n}\n\ninline\nvoid Mat::create(int _rows, int _cols, int _type)\n{\n    _type &= TYPE_MASK;\n    if( dims <= 2 && rows == _rows && cols == _cols && type() == _type && data )\n        return;\n    int sz[] = {_rows, _cols};\n    create(2, sz, _type);\n}\n\ninline\nvoid Mat::create(Size _sz, int _type)\n{\n    create(_sz.height, _sz.width, _type);\n}\n\ninline\nvoid Mat::addref()\n{\n    if( u )\n        CV_XADD(&u->refcount, 1);\n}\n\ninline void Mat::release()\n{\n    if( u && CV_XADD(&u->refcount, -1) == 1 )\n        deallocate();\n    u = NULL;\n    datastart = dataend = datalimit = data = 0;\n    for(int i = 0; i < dims; i++)\n        size.p[i] = 0;\n}\n\ninline\nMat Mat::operator()( Range _rowRange, Range _colRange ) const\n{\n    return Mat(*this, _rowRange, _colRange);\n}\n\ninline\nMat Mat::operator()( const Rect& roi ) const\n{\n    return Mat(*this, roi);\n}\n\ninline\nMat Mat::operator()(const Range* ranges) const\n{\n    return Mat(*this, ranges);\n}\n\ninline\nbool Mat::isContinuous() const\n{\n    return (flags & CONTINUOUS_FLAG) != 0;\n}\n\ninline\nbool Mat::isSubmatrix() const\n{\n    return (flags & SUBMATRIX_FLAG) != 0;\n}\n\ninline\nsize_t Mat::elemSize() const\n{\n    return dims > 0 ? step.p[dims - 1] : 0;\n}\n\ninline\nsize_t Mat::elemSize1() const\n{\n    return CV_ELEM_SIZE1(flags);\n}\n\ninline\nint Mat::type() const\n{\n    return CV_MAT_TYPE(flags);\n}\n\ninline\nint Mat::depth() const\n{\n    return CV_MAT_DEPTH(flags);\n}\n\ninline\nint Mat::channels() const\n{\n    return CV_MAT_CN(flags);\n}\n\ninline\nsize_t Mat::step1(int i) const\n{\n    return step.p[i] / elemSize1();\n}\n\ninline\nbool Mat::empty() const\n{\n    return data == 0 || total() == 0;\n}\n\ninline\nsize_t Mat::total() const\n{\n    if( dims <= 2 )\n        return (size_t)rows * cols;\n    size_t p = 1;\n    for( int i = 0; i < dims; i++ )\n        p *= size[i];\n    return p;\n}\n\ninline\nuchar* Mat::ptr(int y)\n{\n    CV_DbgAssert( y == 0 || (data && dims >= 1 && (unsigned)y < (unsigned)size.p[0]) );\n    return data + step.p[0] * y;\n}\n\ninline\nconst uchar* Mat::ptr(int y) const\n{\n    CV_DbgAssert( y == 0 || (data && dims >= 1 && (unsigned)y < (unsigned)size.p[0]) );\n    return data + step.p[0] * y;\n}\n\ntemplate<typename _Tp> inline\n_Tp* Mat::ptr(int y)\n{\n    CV_DbgAssert( y == 0 || (data && dims >= 1 && (unsigned)y < (unsigned)size.p[0]) );\n    return (_Tp*)(data + step.p[0] * y);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp* Mat::ptr(int y) const\n{\n    CV_DbgAssert( y == 0 || (data && dims >= 1 && data && (unsigned)y < (unsigned)size.p[0]) );\n    return (const _Tp*)(data + step.p[0] * y);\n}\n\ninline\nuchar* Mat::ptr(int i0, int i1)\n{\n    CV_DbgAssert( dims >= 2 && data &&\n                  (unsigned)i0 < (unsigned)size.p[0] &&\n                  (unsigned)i1 < (unsigned)size.p[1] );\n    return data + i0 * step.p[0] + i1 * step.p[1];\n}\n\ninline\nconst uchar* Mat::ptr(int i0, int i1) const\n{\n    CV_DbgAssert( dims >= 2 && data &&\n                 (unsigned)i0 < (unsigned)size.p[0] &&\n                 (unsigned)i1 < (unsigned)size.p[1] );\n    return data + i0 * step.p[0] + i1 * step.p[1];\n}\n\ntemplate<typename _Tp> inline\n_Tp* Mat::ptr(int i0, int i1)\n{\n    CV_DbgAssert( dims >= 2 && data &&\n                  (unsigned)i0 < (unsigned)size.p[0] &&\n                  (unsigned)i1 < (unsigned)size.p[1] );\n    return (_Tp*)(data + i0 * step.p[0] + i1 * step.p[1]);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp* Mat::ptr(int i0, int i1) const\n{\n    CV_DbgAssert( dims >= 2 && data &&\n                  (unsigned)i0 < (unsigned)size.p[0] &&\n                  (unsigned)i1 < (unsigned)size.p[1] );\n    return (const _Tp*)(data + i0 * step.p[0] + i1 * step.p[1]);\n}\n\ninline\nuchar* Mat::ptr(int i0, int i1, int i2)\n{\n    CV_DbgAssert( dims >= 3 && data &&\n                  (unsigned)i0 < (unsigned)size.p[0] &&\n                  (unsigned)i1 < (unsigned)size.p[1] &&\n                  (unsigned)i2 < (unsigned)size.p[2] );\n    return data + i0 * step.p[0] + i1 * step.p[1] + i2 * step.p[2];\n}\n\ninline\nconst uchar* Mat::ptr(int i0, int i1, int i2) const\n{\n    CV_DbgAssert( dims >= 3 && data &&\n                  (unsigned)i0 < (unsigned)size.p[0] &&\n                  (unsigned)i1 < (unsigned)size.p[1] &&\n                  (unsigned)i2 < (unsigned)size.p[2] );\n    return data + i0 * step.p[0] + i1 * step.p[1] + i2 * step.p[2];\n}\n\ntemplate<typename _Tp> inline\n_Tp* Mat::ptr(int i0, int i1, int i2)\n{\n    CV_DbgAssert( dims >= 3 && data &&\n                  (unsigned)i0 < (unsigned)size.p[0] &&\n                  (unsigned)i1 < (unsigned)size.p[1] &&\n                  (unsigned)i2 < (unsigned)size.p[2] );\n    return (_Tp*)(data + i0 * step.p[0] + i1 * step.p[1] + i2 * step.p[2]);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp* Mat::ptr(int i0, int i1, int i2) const\n{\n    CV_DbgAssert( dims >= 3 && data &&\n                  (unsigned)i0 < (unsigned)size.p[0] &&\n                  (unsigned)i1 < (unsigned)size.p[1] &&\n                  (unsigned)i2 < (unsigned)size.p[2] );\n    return (const _Tp*)(data + i0 * step.p[0] + i1 * step.p[1] + i2 * step.p[2]);\n}\n\ninline\nuchar* Mat::ptr(const int* idx)\n{\n    int i, d = dims;\n    uchar* p = data;\n    CV_DbgAssert( d >= 1 && p );\n    for( i = 0; i < d; i++ )\n    {\n        CV_DbgAssert( (unsigned)idx[i] < (unsigned)size.p[i] );\n        p += idx[i] * step.p[i];\n    }\n    return p;\n}\n\ninline\nconst uchar* Mat::ptr(const int* idx) const\n{\n    int i, d = dims;\n    uchar* p = data;\n    CV_DbgAssert( d >= 1 && p );\n    for( i = 0; i < d; i++ )\n    {\n        CV_DbgAssert( (unsigned)idx[i] < (unsigned)size.p[i] );\n        p += idx[i] * step.p[i];\n    }\n    return p;\n}\n\ntemplate<typename _Tp> inline\n_Tp& Mat::at(int i0, int i1)\n{\n    CV_DbgAssert( dims <= 2 && data && (unsigned)i0 < (unsigned)size.p[0] &&\n        (unsigned)(i1 * DataType<_Tp>::channels) < (unsigned)(size.p[1] * channels()) &&\n        CV_ELEM_SIZE1(DataType<_Tp>::depth) == elemSize1());\n    return ((_Tp*)(data + step.p[0] * i0))[i1];\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& Mat::at(int i0, int i1) const\n{\n    CV_DbgAssert( dims <= 2 && data && (unsigned)i0 < (unsigned)size.p[0] &&\n        (unsigned)(i1 * DataType<_Tp>::channels) < (unsigned)(size.p[1] * channels()) &&\n        CV_ELEM_SIZE1(DataType<_Tp>::depth) == elemSize1());\n    return ((const _Tp*)(data + step.p[0] * i0))[i1];\n}\n\ntemplate<typename _Tp> inline\n_Tp& Mat::at(Point pt)\n{\n    CV_DbgAssert( dims <= 2 && data && (unsigned)pt.y < (unsigned)size.p[0] &&\n        (unsigned)(pt.x * DataType<_Tp>::channels) < (unsigned)(size.p[1] * channels()) &&\n        CV_ELEM_SIZE1(DataType<_Tp>::depth) == elemSize1());\n    return ((_Tp*)(data + step.p[0] * pt.y))[pt.x];\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& Mat::at(Point pt) const\n{\n    CV_DbgAssert( dims <= 2 && data && (unsigned)pt.y < (unsigned)size.p[0] &&\n        (unsigned)(pt.x * DataType<_Tp>::channels) < (unsigned)(size.p[1] * channels()) &&\n        CV_ELEM_SIZE1(DataType<_Tp>::depth) == elemSize1());\n    return ((const _Tp*)(data + step.p[0] * pt.y))[pt.x];\n}\n\ntemplate<typename _Tp> inline\n_Tp& Mat::at(int i0)\n{\n    CV_DbgAssert( dims <= 2 && data &&\n                 (unsigned)i0 < (unsigned)(size.p[0] * size.p[1]) &&\n                 elemSize() == CV_ELEM_SIZE(DataType<_Tp>::type) );\n    if( isContinuous() || size.p[0] == 1 )\n        return ((_Tp*)data)[i0];\n    if( size.p[1] == 1 )\n        return *(_Tp*)(data + step.p[0] * i0);\n    int i = i0 / cols, j = i0 - i * cols;\n    return ((_Tp*)(data + step.p[0] * i))[j];\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& Mat::at(int i0) const\n{\n    CV_DbgAssert( dims <= 2 && data &&\n                 (unsigned)i0 < (unsigned)(size.p[0] * size.p[1]) &&\n                 elemSize() == CV_ELEM_SIZE(DataType<_Tp>::type) );\n    if( isContinuous() || size.p[0] == 1 )\n        return ((const _Tp*)data)[i0];\n    if( size.p[1] == 1 )\n        return *(const _Tp*)(data + step.p[0] * i0);\n    int i = i0 / cols, j = i0 - i * cols;\n    return ((const _Tp*)(data + step.p[0] * i))[j];\n}\n\ntemplate<typename _Tp> inline\n_Tp& Mat::at(int i0, int i1, int i2)\n{\n    CV_DbgAssert( elemSize() == CV_ELEM_SIZE(DataType<_Tp>::type) );\n    return *(_Tp*)ptr(i0, i1, i2);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& Mat::at(int i0, int i1, int i2) const\n{\n    CV_DbgAssert( elemSize() == CV_ELEM_SIZE(DataType<_Tp>::type) );\n    return *(const _Tp*)ptr(i0, i1, i2);\n}\n\ntemplate<typename _Tp> inline\n_Tp& Mat::at(const int* idx)\n{\n    CV_DbgAssert( elemSize() == CV_ELEM_SIZE(DataType<_Tp>::type) );\n    return *(_Tp*)ptr(idx);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& Mat::at(const int* idx) const\n{\n    CV_DbgAssert( elemSize() == CV_ELEM_SIZE(DataType<_Tp>::type) );\n    return *(const _Tp*)ptr(idx);\n}\n\ntemplate<typename _Tp, int n> inline\n_Tp& Mat::at(const Vec<int, n>& idx)\n{\n    CV_DbgAssert( elemSize() == CV_ELEM_SIZE(DataType<_Tp>::type) );\n    return *(_Tp*)ptr(idx.val);\n}\n\ntemplate<typename _Tp, int n> inline\nconst _Tp& Mat::at(const Vec<int, n>& idx) const\n{\n    CV_DbgAssert( elemSize() == CV_ELEM_SIZE(DataType<_Tp>::type) );\n    return *(const _Tp*)ptr(idx.val);\n}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp> Mat::begin() const\n{\n    CV_DbgAssert( elemSize() == sizeof(_Tp) );\n    return MatConstIterator_<_Tp>((const Mat_<_Tp>*)this);\n}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp> Mat::end() const\n{\n    CV_DbgAssert( elemSize() == sizeof(_Tp) );\n    MatConstIterator_<_Tp> it((const Mat_<_Tp>*)this);\n    it += total();\n    return it;\n}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp> Mat::begin()\n{\n    CV_DbgAssert( elemSize() == sizeof(_Tp) );\n    return MatIterator_<_Tp>((Mat_<_Tp>*)this);\n}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp> Mat::end()\n{\n    CV_DbgAssert( elemSize() == sizeof(_Tp) );\n    MatIterator_<_Tp> it((Mat_<_Tp>*)this);\n    it += total();\n    return it;\n}\n\ntemplate<typename _Tp, typename Functor> inline\nvoid Mat::forEach(const Functor& operation) {\n    this->forEach_impl<_Tp>(operation);\n}\n\ntemplate<typename _Tp, typename Functor> inline\nvoid Mat::forEach(const Functor& operation) const {\n    // call as not const\n    (const_cast<Mat*>(this))->forEach<const _Tp>(operation);\n}\n\ntemplate<typename _Tp> inline\nMat::operator std::vector<_Tp>() const\n{\n    std::vector<_Tp> v;\n    copyTo(v);\n    return v;\n}\n\ntemplate<typename _Tp, int n> inline\nMat::operator Vec<_Tp, n>() const\n{\n    CV_Assert( data && dims <= 2 && (rows == 1 || cols == 1) &&\n               rows + cols - 1 == n && channels() == 1 );\n\n    if( isContinuous() && type() == DataType<_Tp>::type )\n        return Vec<_Tp, n>((_Tp*)data);\n    Vec<_Tp, n> v;\n    Mat tmp(rows, cols, DataType<_Tp>::type, v.val);\n    convertTo(tmp, tmp.type());\n    return v;\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMat::operator Matx<_Tp, m, n>() const\n{\n    CV_Assert( data && dims <= 2 && rows == m && cols == n && channels() == 1 );\n\n    if( isContinuous() && type() == DataType<_Tp>::type )\n        return Matx<_Tp, m, n>((_Tp*)data);\n    Matx<_Tp, m, n> mtx;\n    Mat tmp(rows, cols, DataType<_Tp>::type, mtx.val);\n    convertTo(tmp, tmp.type());\n    return mtx;\n}\n\ntemplate<typename _Tp> inline\nvoid Mat::push_back(const _Tp& elem)\n{\n    if( !data )\n    {\n        *this = Mat(1, 1, DataType<_Tp>::type, (void*)&elem).clone();\n        return;\n    }\n    CV_Assert(DataType<_Tp>::type == type() && cols == 1\n              /* && dims == 2 (cols == 1 implies dims == 2) */);\n    const uchar* tmp = dataend + step[0];\n    if( !isSubmatrix() && isContinuous() && tmp <= datalimit )\n    {\n        *(_Tp*)(data + (size.p[0]++) * step.p[0]) = elem;\n        dataend = tmp;\n    }\n    else\n        push_back_(&elem);\n}\n\ntemplate<typename _Tp> inline\nvoid Mat::push_back(const Mat_<_Tp>& m)\n{\n    push_back((const Mat&)m);\n}\n\n///////////////////////////// MatSize ////////////////////////////\n\ninline\nMatSize::MatSize(int* _p)\n    : p(_p) {}\n\ninline\nSize MatSize::operator()() const\n{\n    CV_DbgAssert(p[-1] <= 2);\n    return Size(p[1], p[0]);\n}\n\ninline\nconst int& MatSize::operator[](int i) const\n{\n    return p[i];\n}\n\ninline\nint& MatSize::operator[](int i)\n{\n    return p[i];\n}\n\ninline\nMatSize::operator const int*() const\n{\n    return p;\n}\n\ninline\nbool MatSize::operator == (const MatSize& sz) const\n{\n    int d = p[-1];\n    int dsz = sz.p[-1];\n    if( d != dsz )\n        return false;\n    if( d == 2 )\n        return p[0] == sz.p[0] && p[1] == sz.p[1];\n\n    for( int i = 0; i < d; i++ )\n        if( p[i] != sz.p[i] )\n            return false;\n    return true;\n}\n\ninline\nbool MatSize::operator != (const MatSize& sz) const\n{\n    return !(*this == sz);\n}\n\n\n\n///////////////////////////// MatStep ////////////////////////////\n\ninline\nMatStep::MatStep()\n{\n    p = buf; p[0] = p[1] = 0;\n}\n\ninline\nMatStep::MatStep(size_t s)\n{\n    p = buf; p[0] = s; p[1] = 0;\n}\n\ninline\nconst size_t& MatStep::operator[](int i) const\n{\n    return p[i];\n}\n\ninline\nsize_t& MatStep::operator[](int i)\n{\n    return p[i];\n}\n\ninline MatStep::operator size_t() const\n{\n    CV_DbgAssert( p == buf );\n    return buf[0];\n}\n\ninline MatStep& MatStep::operator = (size_t s)\n{\n    CV_DbgAssert( p == buf );\n    buf[0] = s;\n    return *this;\n}\n\n\n\n////////////////////////////// Mat_<_Tp> ////////////////////////////\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_()\n    : Mat()\n{\n    flags = (flags & ~CV_MAT_TYPE_MASK) | DataType<_Tp>::type;\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(int _rows, int _cols)\n    : Mat(_rows, _cols, DataType<_Tp>::type)\n{\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(int _rows, int _cols, const _Tp& value)\n    : Mat(_rows, _cols, DataType<_Tp>::type)\n{\n    *this = value;\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(Size _sz)\n    : Mat(_sz.height, _sz.width, DataType<_Tp>::type)\n{}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(Size _sz, const _Tp& value)\n    : Mat(_sz.height, _sz.width, DataType<_Tp>::type)\n{\n    *this = value;\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(int _dims, const int* _sz)\n    : Mat(_dims, _sz, DataType<_Tp>::type)\n{}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(int _dims, const int* _sz, const _Tp& _s)\n    : Mat(_dims, _sz, DataType<_Tp>::type, Scalar(_s))\n{}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(const Mat_<_Tp>& m, const Range* ranges)\n    : Mat(m, ranges)\n{}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(const Mat& m)\n    : Mat()\n{\n    flags = (flags & ~CV_MAT_TYPE_MASK) | DataType<_Tp>::type;\n    *this = m;\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(const Mat_& m)\n    : Mat(m)\n{}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(int _rows, int _cols, _Tp* _data, size_t steps)\n    : Mat(_rows, _cols, DataType<_Tp>::type, _data, steps)\n{}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(const Mat_& m, const Range& _rowRange, const Range& _colRange)\n    : Mat(m, _rowRange, _colRange)\n{}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(const Mat_& m, const Rect& roi)\n    : Mat(m, roi)\n{}\n\ntemplate<typename _Tp> template<int n> inline\nMat_<_Tp>::Mat_(const Vec<typename DataType<_Tp>::channel_type, n>& vec, bool copyData)\n    : Mat(n / DataType<_Tp>::channels, 1, DataType<_Tp>::type, (void*)&vec)\n{\n    CV_Assert(n%DataType<_Tp>::channels == 0);\n    if( copyData )\n        *this = clone();\n}\n\ntemplate<typename _Tp> template<int m, int n> inline\nMat_<_Tp>::Mat_(const Matx<typename DataType<_Tp>::channel_type, m, n>& M, bool copyData)\n    : Mat(m, n / DataType<_Tp>::channels, DataType<_Tp>::type, (void*)&M)\n{\n    CV_Assert(n % DataType<_Tp>::channels == 0);\n    if( copyData )\n        *this = clone();\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(const Point_<typename DataType<_Tp>::channel_type>& pt, bool copyData)\n    : Mat(2 / DataType<_Tp>::channels, 1, DataType<_Tp>::type, (void*)&pt)\n{\n    CV_Assert(2 % DataType<_Tp>::channels == 0);\n    if( copyData )\n        *this = clone();\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(const Point3_<typename DataType<_Tp>::channel_type>& pt, bool copyData)\n    : Mat(3 / DataType<_Tp>::channels, 1, DataType<_Tp>::type, (void*)&pt)\n{\n    CV_Assert(3 % DataType<_Tp>::channels == 0);\n    if( copyData )\n        *this = clone();\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(const MatCommaInitializer_<_Tp>& commaInitializer)\n    : Mat(commaInitializer)\n{}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(const std::vector<_Tp>& vec, bool copyData)\n    : Mat(vec, copyData)\n{}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>& Mat_<_Tp>::operator = (const Mat& m)\n{\n    if( DataType<_Tp>::type == m.type() )\n    {\n        Mat::operator = (m);\n        return *this;\n    }\n    if( DataType<_Tp>::depth == m.depth() )\n    {\n        return (*this = m.reshape(DataType<_Tp>::channels, m.dims, 0));\n    }\n    CV_DbgAssert(DataType<_Tp>::channels == m.channels());\n    m.convertTo(*this, type());\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>& Mat_<_Tp>::operator = (const Mat_& m)\n{\n    Mat::operator=(m);\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>& Mat_<_Tp>::operator = (const _Tp& s)\n{\n    typedef typename DataType<_Tp>::vec_type VT;\n    Mat::operator=(Scalar((const VT&)s));\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nvoid Mat_<_Tp>::create(int _rows, int _cols)\n{\n    Mat::create(_rows, _cols, DataType<_Tp>::type);\n}\n\ntemplate<typename _Tp> inline\nvoid Mat_<_Tp>::create(Size _sz)\n{\n    Mat::create(_sz, DataType<_Tp>::type);\n}\n\ntemplate<typename _Tp> inline\nvoid Mat_<_Tp>::create(int _dims, const int* _sz)\n{\n    Mat::create(_dims, _sz, DataType<_Tp>::type);\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp> Mat_<_Tp>::cross(const Mat_& m) const\n{\n    return Mat_<_Tp>(Mat::cross(m));\n}\n\ntemplate<typename _Tp> template<typename T2> inline\nMat_<_Tp>::operator Mat_<T2>() const\n{\n    return Mat_<T2>(*this);\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp> Mat_<_Tp>::row(int y) const\n{\n    return Mat_(*this, Range(y, y+1), Range::all());\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp> Mat_<_Tp>::col(int x) const\n{\n    return Mat_(*this, Range::all(), Range(x, x+1));\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp> Mat_<_Tp>::diag(int d) const\n{\n    return Mat_(Mat::diag(d));\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp> Mat_<_Tp>::clone() const\n{\n    return Mat_(Mat::clone());\n}\n\ntemplate<typename _Tp> inline\nsize_t Mat_<_Tp>::elemSize() const\n{\n    CV_DbgAssert( Mat::elemSize() == sizeof(_Tp) );\n    return sizeof(_Tp);\n}\n\ntemplate<typename _Tp> inline\nsize_t Mat_<_Tp>::elemSize1() const\n{\n    CV_DbgAssert( Mat::elemSize1() == sizeof(_Tp) / DataType<_Tp>::channels );\n    return sizeof(_Tp) / DataType<_Tp>::channels;\n}\n\ntemplate<typename _Tp> inline\nint Mat_<_Tp>::type() const\n{\n    CV_DbgAssert( Mat::type() == DataType<_Tp>::type );\n    return DataType<_Tp>::type;\n}\n\ntemplate<typename _Tp> inline\nint Mat_<_Tp>::depth() const\n{\n    CV_DbgAssert( Mat::depth() == DataType<_Tp>::depth );\n    return DataType<_Tp>::depth;\n}\n\ntemplate<typename _Tp> inline\nint Mat_<_Tp>::channels() const\n{\n    CV_DbgAssert( Mat::channels() == DataType<_Tp>::channels );\n    return DataType<_Tp>::channels;\n}\n\ntemplate<typename _Tp> inline\nsize_t Mat_<_Tp>::stepT(int i) const\n{\n    return step.p[i] / elemSize();\n}\n\ntemplate<typename _Tp> inline\nsize_t Mat_<_Tp>::step1(int i) const\n{\n    return step.p[i] / elemSize1();\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>& Mat_<_Tp>::adjustROI( int dtop, int dbottom, int dleft, int dright )\n{\n    return (Mat_<_Tp>&)(Mat::adjustROI(dtop, dbottom, dleft, dright));\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp> Mat_<_Tp>::operator()( const Range& _rowRange, const Range& _colRange ) const\n{\n    return Mat_<_Tp>(*this, _rowRange, _colRange);\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp> Mat_<_Tp>::operator()( const Rect& roi ) const\n{\n    return Mat_<_Tp>(*this, roi);\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp> Mat_<_Tp>::operator()( const Range* ranges ) const\n{\n    return Mat_<_Tp>(*this, ranges);\n}\n\ntemplate<typename _Tp> inline\n_Tp* Mat_<_Tp>::operator [](int y)\n{\n    CV_DbgAssert( 0 <= y && y < rows );\n    return (_Tp*)(data + y*step.p[0]);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp* Mat_<_Tp>::operator [](int y) const\n{\n    CV_DbgAssert( 0 <= y && y < rows );\n    return (const _Tp*)(data + y*step.p[0]);\n}\n\ntemplate<typename _Tp> inline\n_Tp& Mat_<_Tp>::operator ()(int i0, int i1)\n{\n    CV_DbgAssert( dims <= 2 && data &&\n                  (unsigned)i0 < (unsigned)size.p[0] &&\n                  (unsigned)i1 < (unsigned)size.p[1] &&\n                  type() == DataType<_Tp>::type );\n    return ((_Tp*)(data + step.p[0] * i0))[i1];\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& Mat_<_Tp>::operator ()(int i0, int i1) const\n{\n    CV_DbgAssert( dims <= 2 && data &&\n                  (unsigned)i0 < (unsigned)size.p[0] &&\n                  (unsigned)i1 < (unsigned)size.p[1] &&\n                  type() == DataType<_Tp>::type );\n    return ((const _Tp*)(data + step.p[0] * i0))[i1];\n}\n\ntemplate<typename _Tp> inline\n_Tp& Mat_<_Tp>::operator ()(Point pt)\n{\n    CV_DbgAssert( dims <= 2 && data &&\n                  (unsigned)pt.y < (unsigned)size.p[0] &&\n                  (unsigned)pt.x < (unsigned)size.p[1] &&\n                  type() == DataType<_Tp>::type );\n    return ((_Tp*)(data + step.p[0] * pt.y))[pt.x];\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& Mat_<_Tp>::operator ()(Point pt) const\n{\n    CV_DbgAssert( dims <= 2 && data &&\n                  (unsigned)pt.y < (unsigned)size.p[0] &&\n                  (unsigned)pt.x < (unsigned)size.p[1] &&\n                 type() == DataType<_Tp>::type );\n    return ((const _Tp*)(data + step.p[0] * pt.y))[pt.x];\n}\n\ntemplate<typename _Tp> inline\n_Tp& Mat_<_Tp>::operator ()(const int* idx)\n{\n    return Mat::at<_Tp>(idx);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& Mat_<_Tp>::operator ()(const int* idx) const\n{\n    return Mat::at<_Tp>(idx);\n}\n\ntemplate<typename _Tp> template<int n> inline\n_Tp& Mat_<_Tp>::operator ()(const Vec<int, n>& idx)\n{\n    return Mat::at<_Tp>(idx);\n}\n\ntemplate<typename _Tp> template<int n> inline\nconst _Tp& Mat_<_Tp>::operator ()(const Vec<int, n>& idx) const\n{\n    return Mat::at<_Tp>(idx);\n}\n\ntemplate<typename _Tp> inline\n_Tp& Mat_<_Tp>::operator ()(int i0)\n{\n    return this->at<_Tp>(i0);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& Mat_<_Tp>::operator ()(int i0) const\n{\n    return this->at<_Tp>(i0);\n}\n\ntemplate<typename _Tp> inline\n_Tp& Mat_<_Tp>::operator ()(int i0, int i1, int i2)\n{\n    return this->at<_Tp>(i0, i1, i2);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& Mat_<_Tp>::operator ()(int i0, int i1, int i2) const\n{\n    return this->at<_Tp>(i0, i1, i2);\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::operator std::vector<_Tp>() const\n{\n    std::vector<_Tp> v;\n    copyTo(v);\n    return v;\n}\n\ntemplate<typename _Tp> template<int n> inline\nMat_<_Tp>::operator Vec<typename DataType<_Tp>::channel_type, n>() const\n{\n    CV_Assert(n % DataType<_Tp>::channels == 0);\n    return this->Mat::operator Vec<typename DataType<_Tp>::channel_type, n>();\n}\n\ntemplate<typename _Tp> template<int m, int n> inline\nMat_<_Tp>::operator Matx<typename DataType<_Tp>::channel_type, m, n>() const\n{\n    CV_Assert(n % DataType<_Tp>::channels == 0);\n\n    Matx<typename DataType<_Tp>::channel_type, m, n> res = this->Mat::operator Matx<typename DataType<_Tp>::channel_type, m, n>();\n    return res;\n}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp> Mat_<_Tp>::begin() const\n{\n    return Mat::begin<_Tp>();\n}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp> Mat_<_Tp>::end() const\n{\n    return Mat::end<_Tp>();\n}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp> Mat_<_Tp>::begin()\n{\n    return Mat::begin<_Tp>();\n}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp> Mat_<_Tp>::end()\n{\n    return Mat::end<_Tp>();\n}\n\ntemplate<typename _Tp> template<typename Functor> inline\nvoid Mat_<_Tp>::forEach(const Functor& operation) {\n    Mat::forEach<_Tp, Functor>(operation);\n}\n\ntemplate<typename _Tp> template<typename Functor> inline\nvoid Mat_<_Tp>::forEach(const Functor& operation) const {\n    Mat::forEach<_Tp, Functor>(operation);\n}\n\n///////////////////////////// SparseMat /////////////////////////////\n\ninline\nSparseMat::SparseMat()\n    : flags(MAGIC_VAL), hdr(0)\n{}\n\ninline\nSparseMat::SparseMat(int _dims, const int* _sizes, int _type)\n    : flags(MAGIC_VAL), hdr(0)\n{\n    create(_dims, _sizes, _type);\n}\n\ninline\nSparseMat::SparseMat(const SparseMat& m)\n    : flags(m.flags), hdr(m.hdr)\n{\n    addref();\n}\n\ninline\nSparseMat::~SparseMat()\n{\n    release();\n}\n\ninline\nSparseMat& SparseMat::operator = (const SparseMat& m)\n{\n    if( this != &m )\n    {\n        if( m.hdr )\n            CV_XADD(&m.hdr->refcount, 1);\n        release();\n        flags = m.flags;\n        hdr = m.hdr;\n    }\n    return *this;\n}\n\ninline\nSparseMat& SparseMat::operator = (const Mat& m)\n{\n    return (*this = SparseMat(m));\n}\n\ninline\nSparseMat SparseMat::clone() const\n{\n    SparseMat temp;\n    this->copyTo(temp);\n    return temp;\n}\n\ninline\nvoid SparseMat::assignTo( SparseMat& m, int _type ) const\n{\n    if( _type < 0 )\n        m = *this;\n    else\n        convertTo(m, _type);\n}\n\ninline\nvoid SparseMat::addref()\n{\n    if( hdr )\n        CV_XADD(&hdr->refcount, 1);\n}\n\ninline\nvoid SparseMat::release()\n{\n    if( hdr && CV_XADD(&hdr->refcount, -1) == 1 )\n        delete hdr;\n    hdr = 0;\n}\n\ninline\nsize_t SparseMat::elemSize() const\n{\n    return CV_ELEM_SIZE(flags);\n}\n\ninline\nsize_t SparseMat::elemSize1() const\n{\n    return CV_ELEM_SIZE1(flags);\n}\n\ninline\nint SparseMat::type() const\n{\n    return CV_MAT_TYPE(flags);\n}\n\ninline\nint SparseMat::depth() const\n{\n    return CV_MAT_DEPTH(flags);\n}\n\ninline\nint SparseMat::channels() const\n{\n    return CV_MAT_CN(flags);\n}\n\ninline\nconst int* SparseMat::size() const\n{\n    return hdr ? hdr->size : 0;\n}\n\ninline\nint SparseMat::size(int i) const\n{\n    if( hdr )\n    {\n        CV_DbgAssert((unsigned)i < (unsigned)hdr->dims);\n        return hdr->size[i];\n    }\n    return 0;\n}\n\ninline\nint SparseMat::dims() const\n{\n    return hdr ? hdr->dims : 0;\n}\n\ninline\nsize_t SparseMat::nzcount() const\n{\n    return hdr ? hdr->nodeCount : 0;\n}\n\ninline\nsize_t SparseMat::hash(int i0) const\n{\n    return (size_t)i0;\n}\n\ninline\nsize_t SparseMat::hash(int i0, int i1) const\n{\n    return (size_t)(unsigned)i0 * HASH_SCALE + (unsigned)i1;\n}\n\ninline\nsize_t SparseMat::hash(int i0, int i1, int i2) const\n{\n    return ((size_t)(unsigned)i0 * HASH_SCALE + (unsigned)i1) * HASH_SCALE + (unsigned)i2;\n}\n\ninline\nsize_t SparseMat::hash(const int* idx) const\n{\n    size_t h = (unsigned)idx[0];\n    if( !hdr )\n        return 0;\n    int d = hdr->dims;\n    for(int i = 1; i < d; i++ )\n        h = h * HASH_SCALE + (unsigned)idx[i];\n    return h;\n}\n\ntemplate<typename _Tp> inline\n_Tp& SparseMat::ref(int i0, size_t* hashval)\n{\n    return *(_Tp*)((SparseMat*)this)->ptr(i0, true, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp& SparseMat::ref(int i0, int i1, size_t* hashval)\n{\n    return *(_Tp*)((SparseMat*)this)->ptr(i0, i1, true, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp& SparseMat::ref(int i0, int i1, int i2, size_t* hashval)\n{\n    return *(_Tp*)((SparseMat*)this)->ptr(i0, i1, i2, true, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp& SparseMat::ref(const int* idx, size_t* hashval)\n{\n    return *(_Tp*)((SparseMat*)this)->ptr(idx, true, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp SparseMat::value(int i0, size_t* hashval) const\n{\n    const _Tp* p = (const _Tp*)((SparseMat*)this)->ptr(i0, false, hashval);\n    return p ? *p : _Tp();\n}\n\ntemplate<typename _Tp> inline\n_Tp SparseMat::value(int i0, int i1, size_t* hashval) const\n{\n    const _Tp* p = (const _Tp*)((SparseMat*)this)->ptr(i0, i1, false, hashval);\n    return p ? *p : _Tp();\n}\n\ntemplate<typename _Tp> inline\n_Tp SparseMat::value(int i0, int i1, int i2, size_t* hashval) const\n{\n    const _Tp* p = (const _Tp*)((SparseMat*)this)->ptr(i0, i1, i2, false, hashval);\n    return p ? *p : _Tp();\n}\n\ntemplate<typename _Tp> inline\n_Tp SparseMat::value(const int* idx, size_t* hashval) const\n{\n    const _Tp* p = (const _Tp*)((SparseMat*)this)->ptr(idx, false, hashval);\n    return p ? *p : _Tp();\n}\n\ntemplate<typename _Tp> inline\nconst _Tp* SparseMat::find(int i0, size_t* hashval) const\n{\n    return (const _Tp*)((SparseMat*)this)->ptr(i0, false, hashval);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp* SparseMat::find(int i0, int i1, size_t* hashval) const\n{\n    return (const _Tp*)((SparseMat*)this)->ptr(i0, i1, false, hashval);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp* SparseMat::find(int i0, int i1, int i2, size_t* hashval) const\n{\n    return (const _Tp*)((SparseMat*)this)->ptr(i0, i1, i2, false, hashval);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp* SparseMat::find(const int* idx, size_t* hashval) const\n{\n    return (const _Tp*)((SparseMat*)this)->ptr(idx, false, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp& SparseMat::value(Node* n)\n{\n    return *(_Tp*)((uchar*)n + hdr->valueOffset);\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& SparseMat::value(const Node* n) const\n{\n    return *(const _Tp*)((const uchar*)n + hdr->valueOffset);\n}\n\ninline\nSparseMat::Node* SparseMat::node(size_t nidx)\n{\n    return (Node*)(void*)&hdr->pool[nidx];\n}\n\ninline\nconst SparseMat::Node* SparseMat::node(size_t nidx) const\n{\n    return (const Node*)(const void*)&hdr->pool[nidx];\n}\n\ninline\nSparseMatIterator SparseMat::begin()\n{\n    return SparseMatIterator(this);\n}\n\ninline\nSparseMatConstIterator SparseMat::begin() const\n{\n    return SparseMatConstIterator(this);\n}\n\ninline\nSparseMatIterator SparseMat::end()\n{\n    SparseMatIterator it(this);\n    it.seekEnd();\n    return it;\n}\n\ninline\nSparseMatConstIterator SparseMat::end() const\n{\n    SparseMatConstIterator it(this);\n    it.seekEnd();\n    return it;\n}\n\ntemplate<typename _Tp> inline\nSparseMatIterator_<_Tp> SparseMat::begin()\n{\n    return SparseMatIterator_<_Tp>(this);\n}\n\ntemplate<typename _Tp> inline\nSparseMatConstIterator_<_Tp> SparseMat::begin() const\n{\n    return SparseMatConstIterator_<_Tp>(this);\n}\n\ntemplate<typename _Tp> inline\nSparseMatIterator_<_Tp> SparseMat::end()\n{\n    SparseMatIterator_<_Tp> it(this);\n    it.seekEnd();\n    return it;\n}\n\ntemplate<typename _Tp> inline\nSparseMatConstIterator_<_Tp> SparseMat::end() const\n{\n    SparseMatConstIterator_<_Tp> it(this);\n    it.seekEnd();\n    return it;\n}\n\n\n\n///////////////////////////// SparseMat_ ////////////////////////////\n\ntemplate<typename _Tp> inline\nSparseMat_<_Tp>::SparseMat_()\n{\n    flags = MAGIC_VAL | DataType<_Tp>::type;\n}\n\ntemplate<typename _Tp> inline\nSparseMat_<_Tp>::SparseMat_(int _dims, const int* _sizes)\n    : SparseMat(_dims, _sizes, DataType<_Tp>::type)\n{}\n\ntemplate<typename _Tp> inline\nSparseMat_<_Tp>::SparseMat_(const SparseMat& m)\n{\n    if( m.type() == DataType<_Tp>::type )\n        *this = (const SparseMat_<_Tp>&)m;\n    else\n        m.convertTo(*this, DataType<_Tp>::type);\n}\n\ntemplate<typename _Tp> inline\nSparseMat_<_Tp>::SparseMat_(const SparseMat_<_Tp>& m)\n{\n    this->flags = m.flags;\n    this->hdr = m.hdr;\n    if( this->hdr )\n        CV_XADD(&this->hdr->refcount, 1);\n}\n\ntemplate<typename _Tp> inline\nSparseMat_<_Tp>::SparseMat_(const Mat& m)\n{\n    SparseMat sm(m);\n    *this = sm;\n}\n\ntemplate<typename _Tp> inline\nSparseMat_<_Tp>& SparseMat_<_Tp>::operator = (const SparseMat_<_Tp>& m)\n{\n    if( this != &m )\n    {\n        if( m.hdr ) CV_XADD(&m.hdr->refcount, 1);\n        release();\n        flags = m.flags;\n        hdr = m.hdr;\n    }\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nSparseMat_<_Tp>& SparseMat_<_Tp>::operator = (const SparseMat& m)\n{\n    if( m.type() == DataType<_Tp>::type )\n        return (*this = (const SparseMat_<_Tp>&)m);\n    m.convertTo(*this, DataType<_Tp>::type);\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nSparseMat_<_Tp>& SparseMat_<_Tp>::operator = (const Mat& m)\n{\n    return (*this = SparseMat(m));\n}\n\ntemplate<typename _Tp> inline\nSparseMat_<_Tp> SparseMat_<_Tp>::clone() const\n{\n    SparseMat_<_Tp> m;\n    this->copyTo(m);\n    return m;\n}\n\ntemplate<typename _Tp> inline\nvoid SparseMat_<_Tp>::create(int _dims, const int* _sizes)\n{\n    SparseMat::create(_dims, _sizes, DataType<_Tp>::type);\n}\n\ntemplate<typename _Tp> inline\nint SparseMat_<_Tp>::type() const\n{\n    return DataType<_Tp>::type;\n}\n\ntemplate<typename _Tp> inline\nint SparseMat_<_Tp>::depth() const\n{\n    return DataType<_Tp>::depth;\n}\n\ntemplate<typename _Tp> inline\nint SparseMat_<_Tp>::channels() const\n{\n    return DataType<_Tp>::channels;\n}\n\ntemplate<typename _Tp> inline\n_Tp& SparseMat_<_Tp>::ref(int i0, size_t* hashval)\n{\n    return SparseMat::ref<_Tp>(i0, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp SparseMat_<_Tp>::operator()(int i0, size_t* hashval) const\n{\n    return SparseMat::value<_Tp>(i0, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp& SparseMat_<_Tp>::ref(int i0, int i1, size_t* hashval)\n{\n    return SparseMat::ref<_Tp>(i0, i1, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp SparseMat_<_Tp>::operator()(int i0, int i1, size_t* hashval) const\n{\n    return SparseMat::value<_Tp>(i0, i1, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp& SparseMat_<_Tp>::ref(int i0, int i1, int i2, size_t* hashval)\n{\n    return SparseMat::ref<_Tp>(i0, i1, i2, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp SparseMat_<_Tp>::operator()(int i0, int i1, int i2, size_t* hashval) const\n{\n    return SparseMat::value<_Tp>(i0, i1, i2, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp& SparseMat_<_Tp>::ref(const int* idx, size_t* hashval)\n{\n    return SparseMat::ref<_Tp>(idx, hashval);\n}\n\ntemplate<typename _Tp> inline\n_Tp SparseMat_<_Tp>::operator()(const int* idx, size_t* hashval) const\n{\n    return SparseMat::value<_Tp>(idx, hashval);\n}\n\ntemplate<typename _Tp> inline\nSparseMatIterator_<_Tp> SparseMat_<_Tp>::begin()\n{\n    return SparseMatIterator_<_Tp>(this);\n}\n\ntemplate<typename _Tp> inline\nSparseMatConstIterator_<_Tp> SparseMat_<_Tp>::begin() const\n{\n    return SparseMatConstIterator_<_Tp>(this);\n}\n\ntemplate<typename _Tp> inline\nSparseMatIterator_<_Tp> SparseMat_<_Tp>::end()\n{\n    SparseMatIterator_<_Tp> it(this);\n    it.seekEnd();\n    return it;\n}\n\ntemplate<typename _Tp> inline\nSparseMatConstIterator_<_Tp> SparseMat_<_Tp>::end() const\n{\n    SparseMatConstIterator_<_Tp> it(this);\n    it.seekEnd();\n    return it;\n}\n\n\n\n////////////////////////// MatConstIterator /////////////////////////\n\ninline\nMatConstIterator::MatConstIterator()\n    : m(0), elemSize(0), ptr(0), sliceStart(0), sliceEnd(0)\n{}\n\ninline\nMatConstIterator::MatConstIterator(const Mat* _m)\n    : m(_m), elemSize(_m->elemSize()), ptr(0), sliceStart(0), sliceEnd(0)\n{\n    if( m && m->isContinuous() )\n    {\n        sliceStart = m->ptr();\n        sliceEnd = sliceStart + m->total()*elemSize;\n    }\n    seek((const int*)0);\n}\n\ninline\nMatConstIterator::MatConstIterator(const Mat* _m, int _row, int _col)\n    : m(_m), elemSize(_m->elemSize()), ptr(0), sliceStart(0), sliceEnd(0)\n{\n    CV_Assert(m && m->dims <= 2);\n    if( m->isContinuous() )\n    {\n        sliceStart = m->ptr();\n        sliceEnd = sliceStart + m->total()*elemSize;\n    }\n    int idx[] = {_row, _col};\n    seek(idx);\n}\n\ninline\nMatConstIterator::MatConstIterator(const Mat* _m, Point _pt)\n    : m(_m), elemSize(_m->elemSize()), ptr(0), sliceStart(0), sliceEnd(0)\n{\n    CV_Assert(m && m->dims <= 2);\n    if( m->isContinuous() )\n    {\n        sliceStart = m->ptr();\n        sliceEnd = sliceStart + m->total()*elemSize;\n    }\n    int idx[] = {_pt.y, _pt.x};\n    seek(idx);\n}\n\ninline\nMatConstIterator::MatConstIterator(const MatConstIterator& it)\n    : m(it.m), elemSize(it.elemSize), ptr(it.ptr), sliceStart(it.sliceStart), sliceEnd(it.sliceEnd)\n{}\n\ninline\nMatConstIterator& MatConstIterator::operator = (const MatConstIterator& it )\n{\n    m = it.m; elemSize = it.elemSize; ptr = it.ptr;\n    sliceStart = it.sliceStart; sliceEnd = it.sliceEnd;\n    return *this;\n}\n\ninline\nconst uchar* MatConstIterator::operator *() const\n{\n    return ptr;\n}\n\ninline MatConstIterator& MatConstIterator::operator += (ptrdiff_t ofs)\n{\n    if( !m || ofs == 0 )\n        return *this;\n    ptrdiff_t ofsb = ofs*elemSize;\n    ptr += ofsb;\n    if( ptr < sliceStart || sliceEnd <= ptr )\n    {\n        ptr -= ofsb;\n        seek(ofs, true);\n    }\n    return *this;\n}\n\ninline\nMatConstIterator& MatConstIterator::operator -= (ptrdiff_t ofs)\n{\n    return (*this += -ofs);\n}\n\ninline\nMatConstIterator& MatConstIterator::operator --()\n{\n    if( m && (ptr -= elemSize) < sliceStart )\n    {\n        ptr += elemSize;\n        seek(-1, true);\n    }\n    return *this;\n}\n\ninline\nMatConstIterator MatConstIterator::operator --(int)\n{\n    MatConstIterator b = *this;\n    *this += -1;\n    return b;\n}\n\ninline\nMatConstIterator& MatConstIterator::operator ++()\n{\n    if( m && (ptr += elemSize) >= sliceEnd )\n    {\n        ptr -= elemSize;\n        seek(1, true);\n    }\n    return *this;\n}\n\ninline MatConstIterator MatConstIterator::operator ++(int)\n{\n    MatConstIterator b = *this;\n    *this += 1;\n    return b;\n}\n\n\nstatic inline\nbool operator == (const MatConstIterator& a, const MatConstIterator& b)\n{\n    return a.m == b.m && a.ptr == b.ptr;\n}\n\nstatic inline\nbool operator != (const MatConstIterator& a, const MatConstIterator& b)\n{\n    return !(a == b);\n}\n\nstatic inline\nbool operator < (const MatConstIterator& a, const MatConstIterator& b)\n{\n    return a.ptr < b.ptr;\n}\n\nstatic inline\nbool operator > (const MatConstIterator& a, const MatConstIterator& b)\n{\n    return a.ptr > b.ptr;\n}\n\nstatic inline\nbool operator <= (const MatConstIterator& a, const MatConstIterator& b)\n{\n    return a.ptr <= b.ptr;\n}\n\nstatic inline\nbool operator >= (const MatConstIterator& a, const MatConstIterator& b)\n{\n    return a.ptr >= b.ptr;\n}\n\nstatic inline\nptrdiff_t operator - (const MatConstIterator& b, const MatConstIterator& a)\n{\n    if( a.m != b.m )\n        return ((size_t)(-1) >> 1);\n    if( a.sliceEnd == b.sliceEnd )\n        return (b.ptr - a.ptr)/b.elemSize;\n\n    return b.lpos() - a.lpos();\n}\n\nstatic inline\nMatConstIterator operator + (const MatConstIterator& a, ptrdiff_t ofs)\n{\n    MatConstIterator b = a;\n    return b += ofs;\n}\n\nstatic inline\nMatConstIterator operator + (ptrdiff_t ofs, const MatConstIterator& a)\n{\n    MatConstIterator b = a;\n    return b += ofs;\n}\n\nstatic inline\nMatConstIterator operator - (const MatConstIterator& a, ptrdiff_t ofs)\n{\n    MatConstIterator b = a;\n    return b += -ofs;\n}\n\n\ninline\nconst uchar* MatConstIterator::operator [](ptrdiff_t i) const\n{\n    return *(*this + i);\n}\n\n\n\n///////////////////////// MatConstIterator_ /////////////////////////\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp>::MatConstIterator_()\n{}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp>::MatConstIterator_(const Mat_<_Tp>* _m)\n    : MatConstIterator(_m)\n{}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp>::MatConstIterator_(const Mat_<_Tp>* _m, int _row, int _col)\n    : MatConstIterator(_m, _row, _col)\n{}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp>::MatConstIterator_(const Mat_<_Tp>* _m, Point _pt)\n    : MatConstIterator(_m, _pt)\n{}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp>::MatConstIterator_(const MatConstIterator_& it)\n    : MatConstIterator(it)\n{}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp>& MatConstIterator_<_Tp>::operator = (const MatConstIterator_& it )\n{\n    MatConstIterator::operator = (it);\n    return *this;\n}\n\ntemplate<typename _Tp> inline\n_Tp MatConstIterator_<_Tp>::operator *() const\n{\n    return *(_Tp*)(this->ptr);\n}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp>& MatConstIterator_<_Tp>::operator += (ptrdiff_t ofs)\n{\n    MatConstIterator::operator += (ofs);\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp>& MatConstIterator_<_Tp>::operator -= (ptrdiff_t ofs)\n{\n    return (*this += -ofs);\n}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp>& MatConstIterator_<_Tp>::operator --()\n{\n    MatConstIterator::operator --();\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp> MatConstIterator_<_Tp>::operator --(int)\n{\n    MatConstIterator_ b = *this;\n    MatConstIterator::operator --();\n    return b;\n}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp>& MatConstIterator_<_Tp>::operator ++()\n{\n    MatConstIterator::operator ++();\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMatConstIterator_<_Tp> MatConstIterator_<_Tp>::operator ++(int)\n{\n    MatConstIterator_ b = *this;\n    MatConstIterator::operator ++();\n    return b;\n}\n\n\ntemplate<typename _Tp> inline\nPoint MatConstIterator_<_Tp>::pos() const\n{\n    if( !m )\n        return Point();\n    CV_DbgAssert( m->dims <= 2 );\n    if( m->isContinuous() )\n    {\n        ptrdiff_t ofs = (const _Tp*)ptr - (const _Tp*)m->data;\n        int y = (int)(ofs / m->cols);\n        int x = (int)(ofs - (ptrdiff_t)y * m->cols);\n        return Point(x, y);\n    }\n    else\n    {\n        ptrdiff_t ofs = (uchar*)ptr - m->data;\n        int y = (int)(ofs / m->step);\n        int x = (int)((ofs - y * m->step)/sizeof(_Tp));\n        return Point(x, y);\n    }\n}\n\n\ntemplate<typename _Tp> static inline\nbool operator == (const MatConstIterator_<_Tp>& a, const MatConstIterator_<_Tp>& b)\n{\n    return a.m == b.m && a.ptr == b.ptr;\n}\n\ntemplate<typename _Tp> static inline\nbool operator != (const MatConstIterator_<_Tp>& a, const MatConstIterator_<_Tp>& b)\n{\n    return a.m != b.m || a.ptr != b.ptr;\n}\n\ntemplate<typename _Tp> static inline\nMatConstIterator_<_Tp> operator + (const MatConstIterator_<_Tp>& a, ptrdiff_t ofs)\n{\n    MatConstIterator t = (const MatConstIterator&)a + ofs;\n    return (MatConstIterator_<_Tp>&)t;\n}\n\ntemplate<typename _Tp> static inline\nMatConstIterator_<_Tp> operator + (ptrdiff_t ofs, const MatConstIterator_<_Tp>& a)\n{\n    MatConstIterator t = (const MatConstIterator&)a + ofs;\n    return (MatConstIterator_<_Tp>&)t;\n}\n\ntemplate<typename _Tp> static inline\nMatConstIterator_<_Tp> operator - (const MatConstIterator_<_Tp>& a, ptrdiff_t ofs)\n{\n    MatConstIterator t = (const MatConstIterator&)a - ofs;\n    return (MatConstIterator_<_Tp>&)t;\n}\n\ntemplate<typename _Tp> inline\n_Tp MatConstIterator_<_Tp>::operator [](ptrdiff_t i) const\n{\n    return *(_Tp*)MatConstIterator::operator [](i);\n}\n\n\n\n//////////////////////////// MatIterator_ ///////////////////////////\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp>::MatIterator_()\n    : MatConstIterator_<_Tp>()\n{}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp>::MatIterator_(Mat_<_Tp>* _m)\n    : MatConstIterator_<_Tp>(_m)\n{}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp>::MatIterator_(Mat_<_Tp>* _m, int _row, int _col)\n    : MatConstIterator_<_Tp>(_m, _row, _col)\n{}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp>::MatIterator_(Mat_<_Tp>* _m, Point _pt)\n    : MatConstIterator_<_Tp>(_m, _pt)\n{}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp>::MatIterator_(Mat_<_Tp>* _m, const int* _idx)\n    : MatConstIterator_<_Tp>(_m, _idx)\n{}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp>::MatIterator_(const MatIterator_& it)\n    : MatConstIterator_<_Tp>(it)\n{}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp>& MatIterator_<_Tp>::operator = (const MatIterator_<_Tp>& it )\n{\n    MatConstIterator::operator = (it);\n    return *this;\n}\n\ntemplate<typename _Tp> inline\n_Tp& MatIterator_<_Tp>::operator *() const\n{\n    return *(_Tp*)(this->ptr);\n}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp>& MatIterator_<_Tp>::operator += (ptrdiff_t ofs)\n{\n    MatConstIterator::operator += (ofs);\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp>& MatIterator_<_Tp>::operator -= (ptrdiff_t ofs)\n{\n    MatConstIterator::operator += (-ofs);\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp>& MatIterator_<_Tp>::operator --()\n{\n    MatConstIterator::operator --();\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp> MatIterator_<_Tp>::operator --(int)\n{\n    MatIterator_ b = *this;\n    MatConstIterator::operator --();\n    return b;\n}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp>& MatIterator_<_Tp>::operator ++()\n{\n    MatConstIterator::operator ++();\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMatIterator_<_Tp> MatIterator_<_Tp>::operator ++(int)\n{\n    MatIterator_ b = *this;\n    MatConstIterator::operator ++();\n    return b;\n}\n\ntemplate<typename _Tp> inline\n_Tp& MatIterator_<_Tp>::operator [](ptrdiff_t i) const\n{\n    return *(*this + i);\n}\n\n\ntemplate<typename _Tp> static inline\nbool operator == (const MatIterator_<_Tp>& a, const MatIterator_<_Tp>& b)\n{\n    return a.m == b.m && a.ptr == b.ptr;\n}\n\ntemplate<typename _Tp> static inline\nbool operator != (const MatIterator_<_Tp>& a, const MatIterator_<_Tp>& b)\n{\n    return a.m != b.m || a.ptr != b.ptr;\n}\n\ntemplate<typename _Tp> static inline\nMatIterator_<_Tp> operator + (const MatIterator_<_Tp>& a, ptrdiff_t ofs)\n{\n    MatConstIterator t = (const MatConstIterator&)a + ofs;\n    return (MatIterator_<_Tp>&)t;\n}\n\ntemplate<typename _Tp> static inline\nMatIterator_<_Tp> operator + (ptrdiff_t ofs, const MatIterator_<_Tp>& a)\n{\n    MatConstIterator t = (const MatConstIterator&)a + ofs;\n    return (MatIterator_<_Tp>&)t;\n}\n\ntemplate<typename _Tp> static inline\nMatIterator_<_Tp> operator - (const MatIterator_<_Tp>& a, ptrdiff_t ofs)\n{\n    MatConstIterator t = (const MatConstIterator&)a - ofs;\n    return (MatIterator_<_Tp>&)t;\n}\n\n\n\n/////////////////////// SparseMatConstIterator //////////////////////\n\ninline\nSparseMatConstIterator::SparseMatConstIterator()\n    : m(0), hashidx(0), ptr(0)\n{}\n\ninline\nSparseMatConstIterator::SparseMatConstIterator(const SparseMatConstIterator& it)\n    : m(it.m), hashidx(it.hashidx), ptr(it.ptr)\n{}\n\ninline SparseMatConstIterator& SparseMatConstIterator::operator = (const SparseMatConstIterator& it)\n{\n    if( this != &it )\n    {\n        m = it.m;\n        hashidx = it.hashidx;\n        ptr = it.ptr;\n    }\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& SparseMatConstIterator::value() const\n{\n    return *(const _Tp*)ptr;\n}\n\ninline\nconst SparseMat::Node* SparseMatConstIterator::node() const\n{\n    return (ptr && m && m->hdr) ? (const SparseMat::Node*)(const void*)(ptr - m->hdr->valueOffset) : 0;\n}\n\ninline\nSparseMatConstIterator SparseMatConstIterator::operator ++(int)\n{\n    SparseMatConstIterator it = *this;\n    ++*this;\n    return it;\n}\n\ninline\nvoid SparseMatConstIterator::seekEnd()\n{\n    if( m && m->hdr )\n    {\n        hashidx = m->hdr->hashtab.size();\n        ptr = 0;\n    }\n}\n\n\nstatic inline\nbool operator == (const SparseMatConstIterator& it1, const SparseMatConstIterator& it2)\n{\n    return it1.m == it2.m && it1.ptr == it2.ptr;\n}\n\nstatic inline\nbool operator != (const SparseMatConstIterator& it1, const SparseMatConstIterator& it2)\n{\n    return !(it1 == it2);\n}\n\n\n\n///////////////////////// SparseMatIterator /////////////////////////\n\ninline\nSparseMatIterator::SparseMatIterator()\n{}\n\ninline\nSparseMatIterator::SparseMatIterator(SparseMat* _m)\n    : SparseMatConstIterator(_m)\n{}\n\ninline\nSparseMatIterator::SparseMatIterator(const SparseMatIterator& it)\n    : SparseMatConstIterator(it)\n{}\n\ninline\nSparseMatIterator& SparseMatIterator::operator = (const SparseMatIterator& it)\n{\n    (SparseMatConstIterator&)*this = it;\n    return *this;\n}\n\ntemplate<typename _Tp> inline\n_Tp& SparseMatIterator::value() const\n{\n    return *(_Tp*)ptr;\n}\n\ninline\nSparseMat::Node* SparseMatIterator::node() const\n{\n    return (SparseMat::Node*)SparseMatConstIterator::node();\n}\n\ninline\nSparseMatIterator& SparseMatIterator::operator ++()\n{\n    SparseMatConstIterator::operator ++();\n    return *this;\n}\n\ninline\nSparseMatIterator SparseMatIterator::operator ++(int)\n{\n    SparseMatIterator it = *this;\n    ++*this;\n    return it;\n}\n\n\n\n////////////////////// SparseMatConstIterator_ //////////////////////\n\ntemplate<typename _Tp> inline\nSparseMatConstIterator_<_Tp>::SparseMatConstIterator_()\n{}\n\ntemplate<typename _Tp> inline\nSparseMatConstIterator_<_Tp>::SparseMatConstIterator_(const SparseMat_<_Tp>* _m)\n    : SparseMatConstIterator(_m)\n{}\n\ntemplate<typename _Tp> inline\nSparseMatConstIterator_<_Tp>::SparseMatConstIterator_(const SparseMat* _m)\n    : SparseMatConstIterator(_m)\n{\n    CV_Assert( _m->type() == DataType<_Tp>::type );\n}\n\ntemplate<typename _Tp> inline\nSparseMatConstIterator_<_Tp>::SparseMatConstIterator_(const SparseMatConstIterator_<_Tp>& it)\n    : SparseMatConstIterator(it)\n{}\n\ntemplate<typename _Tp> inline\nSparseMatConstIterator_<_Tp>& SparseMatConstIterator_<_Tp>::operator = (const SparseMatConstIterator_<_Tp>& it)\n{\n    return reinterpret_cast<SparseMatConstIterator_<_Tp>&>\n         (*reinterpret_cast<SparseMatConstIterator*>(this) =\n           reinterpret_cast<const SparseMatConstIterator&>(it));\n}\n\ntemplate<typename _Tp> inline\nconst _Tp& SparseMatConstIterator_<_Tp>::operator *() const\n{\n    return *(const _Tp*)this->ptr;\n}\n\ntemplate<typename _Tp> inline\nSparseMatConstIterator_<_Tp>& SparseMatConstIterator_<_Tp>::operator ++()\n{\n    SparseMatConstIterator::operator ++();\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nSparseMatConstIterator_<_Tp> SparseMatConstIterator_<_Tp>::operator ++(int)\n{\n    SparseMatConstIterator_<_Tp> it = *this;\n    SparseMatConstIterator::operator ++();\n    return it;\n}\n\n\n\n///////////////////////// SparseMatIterator_ ////////////////////////\n\ntemplate<typename _Tp> inline\nSparseMatIterator_<_Tp>::SparseMatIterator_()\n{}\n\ntemplate<typename _Tp> inline\nSparseMatIterator_<_Tp>::SparseMatIterator_(SparseMat_<_Tp>* _m)\n    : SparseMatConstIterator_<_Tp>(_m)\n{}\n\ntemplate<typename _Tp> inline\nSparseMatIterator_<_Tp>::SparseMatIterator_(SparseMat* _m)\n    : SparseMatConstIterator_<_Tp>(_m)\n{}\n\ntemplate<typename _Tp> inline\nSparseMatIterator_<_Tp>::SparseMatIterator_(const SparseMatIterator_<_Tp>& it)\n    : SparseMatConstIterator_<_Tp>(it)\n{}\n\ntemplate<typename _Tp> inline\nSparseMatIterator_<_Tp>& SparseMatIterator_<_Tp>::operator = (const SparseMatIterator_<_Tp>& it)\n{\n    return reinterpret_cast<SparseMatIterator_<_Tp>&>\n         (*reinterpret_cast<SparseMatConstIterator*>(this) =\n           reinterpret_cast<const SparseMatConstIterator&>(it));\n}\n\ntemplate<typename _Tp> inline\n_Tp& SparseMatIterator_<_Tp>::operator *() const\n{\n    return *(_Tp*)this->ptr;\n}\n\ntemplate<typename _Tp> inline\nSparseMatIterator_<_Tp>& SparseMatIterator_<_Tp>::operator ++()\n{\n    SparseMatConstIterator::operator ++();\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nSparseMatIterator_<_Tp> SparseMatIterator_<_Tp>::operator ++(int)\n{\n    SparseMatIterator_<_Tp> it = *this;\n    SparseMatConstIterator::operator ++();\n    return it;\n}\n\n\n\n//////////////////////// MatCommaInitializer_ ///////////////////////\n\ntemplate<typename _Tp> inline\nMatCommaInitializer_<_Tp>::MatCommaInitializer_(Mat_<_Tp>* _m)\n    : it(_m)\n{}\n\ntemplate<typename _Tp> template<typename T2> inline\nMatCommaInitializer_<_Tp>& MatCommaInitializer_<_Tp>::operator , (T2 v)\n{\n    CV_DbgAssert( this->it < ((const Mat_<_Tp>*)this->it.m)->end() );\n    *this->it = _Tp(v);\n    ++this->it;\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMatCommaInitializer_<_Tp>::operator Mat_<_Tp>() const\n{\n    CV_DbgAssert( this->it == ((const Mat_<_Tp>*)this->it.m)->end() );\n    return Mat_<_Tp>(*this->it.m);\n}\n\n\ntemplate<typename _Tp, typename T2> static inline\nMatCommaInitializer_<_Tp> operator << (const Mat_<_Tp>& m, T2 val)\n{\n    MatCommaInitializer_<_Tp> commaInitializer((Mat_<_Tp>*)&m);\n    return (commaInitializer, val);\n}\n\n\n\n///////////////////////// Matrix Expressions ////////////////////////\n\ninline\nMat& Mat::operator = (const MatExpr& e)\n{\n    e.op->assign(e, *this);\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>::Mat_(const MatExpr& e)\n{\n    e.op->assign(e, *this, DataType<_Tp>::type);\n}\n\ntemplate<typename _Tp> inline\nMat_<_Tp>& Mat_<_Tp>::operator = (const MatExpr& e)\n{\n    e.op->assign(e, *this, DataType<_Tp>::type);\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nMatExpr Mat_<_Tp>::zeros(int rows, int cols)\n{\n    return Mat::zeros(rows, cols, DataType<_Tp>::type);\n}\n\ntemplate<typename _Tp> inline\nMatExpr Mat_<_Tp>::zeros(Size sz)\n{\n    return Mat::zeros(sz, DataType<_Tp>::type);\n}\n\ntemplate<typename _Tp> inline\nMatExpr Mat_<_Tp>::ones(int rows, int cols)\n{\n    return Mat::ones(rows, cols, DataType<_Tp>::type);\n}\n\ntemplate<typename _Tp> inline\nMatExpr Mat_<_Tp>::ones(Size sz)\n{\n    return Mat::ones(sz, DataType<_Tp>::type);\n}\n\ntemplate<typename _Tp> inline\nMatExpr Mat_<_Tp>::eye(int rows, int cols)\n{\n    return Mat::eye(rows, cols, DataType<_Tp>::type);\n}\n\ntemplate<typename _Tp> inline\nMatExpr Mat_<_Tp>::eye(Size sz)\n{\n    return Mat::eye(sz, DataType<_Tp>::type);\n}\n\ninline\nMatExpr::MatExpr()\n    : op(0), flags(0), a(Mat()), b(Mat()), c(Mat()), alpha(0), beta(0), s()\n{}\n\ninline\nMatExpr::MatExpr(const MatOp* _op, int _flags, const Mat& _a, const Mat& _b,\n                 const Mat& _c, double _alpha, double _beta, const Scalar& _s)\n    : op(_op), flags(_flags), a(_a), b(_b), c(_c), alpha(_alpha), beta(_beta), s(_s)\n{}\n\ninline\nMatExpr::operator Mat() const\n{\n    Mat m;\n    op->assign(*this, m);\n    return m;\n}\n\ntemplate<typename _Tp> inline\nMatExpr::operator Mat_<_Tp>() const\n{\n    Mat_<_Tp> m;\n    op->assign(*this, m, DataType<_Tp>::type);\n    return m;\n}\n\n\ntemplate<typename _Tp> static inline\nMatExpr min(const Mat_<_Tp>& a, const Mat_<_Tp>& b)\n{\n    return cv::min((const Mat&)a, (const Mat&)b);\n}\n\ntemplate<typename _Tp> static inline\nMatExpr min(const Mat_<_Tp>& a, double s)\n{\n    return cv::min((const Mat&)a, s);\n}\n\ntemplate<typename _Tp> static inline\nMatExpr min(double s, const Mat_<_Tp>& a)\n{\n    return cv::min((const Mat&)a, s);\n}\n\ntemplate<typename _Tp> static inline\nMatExpr max(const Mat_<_Tp>& a, const Mat_<_Tp>& b)\n{\n    return cv::max((const Mat&)a, (const Mat&)b);\n}\n\ntemplate<typename _Tp> static inline\nMatExpr max(const Mat_<_Tp>& a, double s)\n{\n    return cv::max((const Mat&)a, s);\n}\n\ntemplate<typename _Tp> static inline\nMatExpr max(double s, const Mat_<_Tp>& a)\n{\n    return cv::max((const Mat&)a, s);\n}\n\ntemplate<typename _Tp> static inline\nMatExpr abs(const Mat_<_Tp>& m)\n{\n    return cv::abs((const Mat&)m);\n}\n\n\nstatic inline\nMat& operator += (Mat& a, const MatExpr& b)\n{\n    b.op->augAssignAdd(b, a);\n    return a;\n}\n\nstatic inline\nconst Mat& operator += (const Mat& a, const MatExpr& b)\n{\n    b.op->augAssignAdd(b, (Mat&)a);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nMat_<_Tp>& operator += (Mat_<_Tp>& a, const MatExpr& b)\n{\n    b.op->augAssignAdd(b, a);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nconst Mat_<_Tp>& operator += (const Mat_<_Tp>& a, const MatExpr& b)\n{\n    b.op->augAssignAdd(b, (Mat&)a);\n    return a;\n}\n\nstatic inline\nMat& operator -= (Mat& a, const MatExpr& b)\n{\n    b.op->augAssignSubtract(b, a);\n    return a;\n}\n\nstatic inline\nconst Mat& operator -= (const Mat& a, const MatExpr& b)\n{\n    b.op->augAssignSubtract(b, (Mat&)a);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nMat_<_Tp>& operator -= (Mat_<_Tp>& a, const MatExpr& b)\n{\n    b.op->augAssignSubtract(b, a);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nconst Mat_<_Tp>& operator -= (const Mat_<_Tp>& a, const MatExpr& b)\n{\n    b.op->augAssignSubtract(b, (Mat&)a);\n    return a;\n}\n\nstatic inline\nMat& operator *= (Mat& a, const MatExpr& b)\n{\n    b.op->augAssignMultiply(b, a);\n    return a;\n}\n\nstatic inline\nconst Mat& operator *= (const Mat& a, const MatExpr& b)\n{\n    b.op->augAssignMultiply(b, (Mat&)a);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nMat_<_Tp>& operator *= (Mat_<_Tp>& a, const MatExpr& b)\n{\n    b.op->augAssignMultiply(b, a);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nconst Mat_<_Tp>& operator *= (const Mat_<_Tp>& a, const MatExpr& b)\n{\n    b.op->augAssignMultiply(b, (Mat&)a);\n    return a;\n}\n\nstatic inline\nMat& operator /= (Mat& a, const MatExpr& b)\n{\n    b.op->augAssignDivide(b, a);\n    return a;\n}\n\nstatic inline\nconst Mat& operator /= (const Mat& a, const MatExpr& b)\n{\n    b.op->augAssignDivide(b, (Mat&)a);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nMat_<_Tp>& operator /= (Mat_<_Tp>& a, const MatExpr& b)\n{\n    b.op->augAssignDivide(b, a);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nconst Mat_<_Tp>& operator /= (const Mat_<_Tp>& a, const MatExpr& b)\n{\n    b.op->augAssignDivide(b, (Mat&)a);\n    return a;\n}\n\n\n//////////////////////////////// UMat ////////////////////////////////\n\ninline\nUMat::UMat(UMatUsageFlags _usageFlags)\n: flags(MAGIC_VAL), dims(0), rows(0), cols(0), allocator(0), usageFlags(_usageFlags), u(0), offset(0), size(&rows)\n{}\n\ninline\nUMat::UMat(int _rows, int _cols, int _type, UMatUsageFlags _usageFlags)\n: flags(MAGIC_VAL), dims(0), rows(0), cols(0), allocator(0), usageFlags(_usageFlags), u(0), offset(0), size(&rows)\n{\n    create(_rows, _cols, _type);\n}\n\ninline\nUMat::UMat(int _rows, int _cols, int _type, const Scalar& _s, UMatUsageFlags _usageFlags)\n: flags(MAGIC_VAL), dims(0), rows(0), cols(0), allocator(0), usageFlags(_usageFlags), u(0), offset(0), size(&rows)\n{\n    create(_rows, _cols, _type);\n    *this = _s;\n}\n\ninline\nUMat::UMat(Size _sz, int _type, UMatUsageFlags _usageFlags)\n: flags(MAGIC_VAL), dims(0), rows(0), cols(0), allocator(0), usageFlags(_usageFlags), u(0), offset(0), size(&rows)\n{\n    create( _sz.height, _sz.width, _type );\n}\n\ninline\nUMat::UMat(Size _sz, int _type, const Scalar& _s, UMatUsageFlags _usageFlags)\n: flags(MAGIC_VAL), dims(0), rows(0), cols(0), allocator(0), usageFlags(_usageFlags), u(0), offset(0), size(&rows)\n{\n    create(_sz.height, _sz.width, _type);\n    *this = _s;\n}\n\ninline\nUMat::UMat(int _dims, const int* _sz, int _type, UMatUsageFlags _usageFlags)\n: flags(MAGIC_VAL), dims(0), rows(0), cols(0), allocator(0), usageFlags(_usageFlags), u(0), offset(0), size(&rows)\n{\n    create(_dims, _sz, _type);\n}\n\ninline\nUMat::UMat(int _dims, const int* _sz, int _type, const Scalar& _s, UMatUsageFlags _usageFlags)\n: flags(MAGIC_VAL), dims(0), rows(0), cols(0), allocator(0), usageFlags(_usageFlags), u(0), offset(0), size(&rows)\n{\n    create(_dims, _sz, _type);\n    *this = _s;\n}\n\ninline\nUMat::UMat(const UMat& m)\n: flags(m.flags), dims(m.dims), rows(m.rows), cols(m.cols), allocator(m.allocator),\n  usageFlags(m.usageFlags), u(m.u), offset(m.offset), size(&rows)\n{\n    addref();\n    if( m.dims <= 2 )\n    {\n        step[0] = m.step[0]; step[1] = m.step[1];\n    }\n    else\n    {\n        dims = 0;\n        copySize(m);\n    }\n}\n\n\ntemplate<typename _Tp> inline\nUMat::UMat(const std::vector<_Tp>& vec, bool copyData)\n: flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows((int)vec.size()),\ncols(1), allocator(0), usageFlags(USAGE_DEFAULT), u(0), offset(0), size(&rows)\n{\n    if(vec.empty())\n        return;\n    if( !copyData )\n    {\n        // !!!TODO!!!\n        CV_Error(Error::StsNotImplemented, \"\");\n    }\n    else\n        Mat((int)vec.size(), 1, DataType<_Tp>::type, (uchar*)&vec[0]).copyTo(*this);\n}\n\n\ninline\nUMat& UMat::operator = (const UMat& m)\n{\n    if( this != &m )\n    {\n        const_cast<UMat&>(m).addref();\n        release();\n        flags = m.flags;\n        if( dims <= 2 && m.dims <= 2 )\n        {\n            dims = m.dims;\n            rows = m.rows;\n            cols = m.cols;\n            step[0] = m.step[0];\n            step[1] = m.step[1];\n        }\n        else\n            copySize(m);\n        allocator = m.allocator;\n        if (usageFlags == USAGE_DEFAULT)\n            usageFlags = m.usageFlags;\n        u = m.u;\n        offset = m.offset;\n    }\n    return *this;\n}\n\ninline\nUMat UMat::row(int y) const\n{\n    return UMat(*this, Range(y, y + 1), Range::all());\n}\n\ninline\nUMat UMat::col(int x) const\n{\n    return UMat(*this, Range::all(), Range(x, x + 1));\n}\n\ninline\nUMat UMat::rowRange(int startrow, int endrow) const\n{\n    return UMat(*this, Range(startrow, endrow), Range::all());\n}\n\ninline\nUMat UMat::rowRange(const Range& r) const\n{\n    return UMat(*this, r, Range::all());\n}\n\ninline\nUMat UMat::colRange(int startcol, int endcol) const\n{\n    return UMat(*this, Range::all(), Range(startcol, endcol));\n}\n\ninline\nUMat UMat::colRange(const Range& r) const\n{\n    return UMat(*this, Range::all(), r);\n}\n\ninline\nUMat UMat::clone() const\n{\n    UMat m;\n    copyTo(m);\n    return m;\n}\n\ninline\nvoid UMat::assignTo( UMat& m, int _type ) const\n{\n    if( _type < 0 )\n        m = *this;\n    else\n        convertTo(m, _type);\n}\n\ninline\nvoid UMat::create(int _rows, int _cols, int _type, UMatUsageFlags _usageFlags)\n{\n    _type &= TYPE_MASK;\n    if( dims <= 2 && rows == _rows && cols == _cols && type() == _type && u )\n        return;\n    int sz[] = {_rows, _cols};\n    create(2, sz, _type, _usageFlags);\n}\n\ninline\nvoid UMat::create(Size _sz, int _type, UMatUsageFlags _usageFlags)\n{\n    create(_sz.height, _sz.width, _type, _usageFlags);\n}\n\ninline\nvoid UMat::addref()\n{\n    if( u )\n        CV_XADD(&(u->urefcount), 1);\n}\n\ninline void UMat::release()\n{\n    if( u && CV_XADD(&(u->urefcount), -1) == 1 )\n        deallocate();\n    for(int i = 0; i < dims; i++)\n        size.p[i] = 0;\n    u = 0;\n}\n\ninline\nUMat UMat::operator()( Range _rowRange, Range _colRange ) const\n{\n    return UMat(*this, _rowRange, _colRange);\n}\n\ninline\nUMat UMat::operator()( const Rect& roi ) const\n{\n    return UMat(*this, roi);\n}\n\ninline\nUMat UMat::operator()(const Range* ranges) const\n{\n    return UMat(*this, ranges);\n}\n\ninline\nbool UMat::isContinuous() const\n{\n    return (flags & CONTINUOUS_FLAG) != 0;\n}\n\ninline\nbool UMat::isSubmatrix() const\n{\n    return (flags & SUBMATRIX_FLAG) != 0;\n}\n\ninline\nsize_t UMat::elemSize() const\n{\n    return dims > 0 ? step.p[dims - 1] : 0;\n}\n\ninline\nsize_t UMat::elemSize1() const\n{\n    return CV_ELEM_SIZE1(flags);\n}\n\ninline\nint UMat::type() const\n{\n    return CV_MAT_TYPE(flags);\n}\n\ninline\nint UMat::depth() const\n{\n    return CV_MAT_DEPTH(flags);\n}\n\ninline\nint UMat::channels() const\n{\n    return CV_MAT_CN(flags);\n}\n\ninline\nsize_t UMat::step1(int i) const\n{\n    return step.p[i] / elemSize1();\n}\n\ninline\nbool UMat::empty() const\n{\n    return u == 0 || total() == 0;\n}\n\ninline\nsize_t UMat::total() const\n{\n    if( dims <= 2 )\n        return (size_t)rows * cols;\n    size_t p = 1;\n    for( int i = 0; i < dims; i++ )\n        p *= size[i];\n    return p;\n}\n\ninline bool UMatData::hostCopyObsolete() const { return (flags & HOST_COPY_OBSOLETE) != 0; }\ninline bool UMatData::deviceCopyObsolete() const { return (flags & DEVICE_COPY_OBSOLETE) != 0; }\ninline bool UMatData::deviceMemMapped() const { return (flags & DEVICE_MEM_MAPPED) != 0; }\ninline bool UMatData::copyOnMap() const { return (flags & COPY_ON_MAP) != 0; }\ninline bool UMatData::tempUMat() const { return (flags & TEMP_UMAT) != 0; }\ninline bool UMatData::tempCopiedUMat() const { return (flags & TEMP_COPIED_UMAT) == TEMP_COPIED_UMAT; }\n\ninline void UMatData::markDeviceMemMapped(bool flag)\n{\n  if(flag)\n    flags |= DEVICE_MEM_MAPPED;\n  else\n    flags &= ~DEVICE_MEM_MAPPED;\n}\n\ninline void UMatData::markHostCopyObsolete(bool flag)\n{\n    if(flag)\n        flags |= HOST_COPY_OBSOLETE;\n    else\n        flags &= ~HOST_COPY_OBSOLETE;\n}\ninline void UMatData::markDeviceCopyObsolete(bool flag)\n{\n    if(flag)\n        flags |= DEVICE_COPY_OBSOLETE;\n    else\n        flags &= ~DEVICE_COPY_OBSOLETE;\n}\n\ninline UMatDataAutoLock::UMatDataAutoLock(UMatData* _u) : u(_u) { u->lock(); }\ninline UMatDataAutoLock::~UMatDataAutoLock() { u->unlock(); }\n\n//! @endcond\n\n} //cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/matx.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_MATX_HPP__\n#define __OPENCV_CORE_MATX_HPP__\n\n#ifndef __cplusplus\n#  error matx.hpp header must be compiled as C++\n#endif\n\n#include \"opencv2/core/cvdef.h\"\n#include \"opencv2/core/base.hpp\"\n#include \"opencv2/core/traits.hpp\"\n\nnamespace cv\n{\n\n//! @addtogroup core_basic\n//! @{\n\n////////////////////////////// Small Matrix ///////////////////////////\n\n//! @cond IGNORED\nstruct CV_EXPORTS Matx_AddOp {};\nstruct CV_EXPORTS Matx_SubOp {};\nstruct CV_EXPORTS Matx_ScaleOp {};\nstruct CV_EXPORTS Matx_MulOp {};\nstruct CV_EXPORTS Matx_DivOp {};\nstruct CV_EXPORTS Matx_MatMulOp {};\nstruct CV_EXPORTS Matx_TOp {};\n//! @endcond\n\n/** @brief Template class for small matrices whose type and size are known at compilation time\n\nIf you need a more flexible type, use Mat . The elements of the matrix M are accessible using the\nM(i,j) notation. Most of the common matrix operations (see also @ref MatrixExpressions ) are\navailable. To do an operation on Matx that is not implemented, you can easily convert the matrix to\nMat and backwards:\n@code\n    Matx33f m(1, 2, 3,\n              4, 5, 6,\n              7, 8, 9);\n    cout << sum(Mat(m*m.t())) << endl;\n @endcode\n */\ntemplate<typename _Tp, int m, int n> class Matx\n{\npublic:\n    enum { depth    = DataType<_Tp>::depth,\n           rows     = m,\n           cols     = n,\n           channels = rows*cols,\n           type     = CV_MAKETYPE(depth, channels),\n           shortdim = (m < n ? m : n)\n         };\n\n    typedef _Tp                           value_type;\n    typedef Matx<_Tp, m, n>               mat_type;\n    typedef Matx<_Tp, shortdim, 1> diag_type;\n\n    //! default constructor\n    Matx();\n\n    Matx(_Tp v0); //!< 1x1 matrix\n    Matx(_Tp v0, _Tp v1); //!< 1x2 or 2x1 matrix\n    Matx(_Tp v0, _Tp v1, _Tp v2); //!< 1x3 or 3x1 matrix\n    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3); //!< 1x4, 2x2 or 4x1 matrix\n    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4); //!< 1x5 or 5x1 matrix\n    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5); //!< 1x6, 2x3, 3x2 or 6x1 matrix\n    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6); //!< 1x7 or 7x1 matrix\n    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7); //!< 1x8, 2x4, 4x2 or 8x1 matrix\n    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8); //!< 1x9, 3x3 or 9x1 matrix\n    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9); //!< 1x10, 2x5 or 5x2 or 10x1 matrix\n    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3,\n         _Tp v4, _Tp v5, _Tp v6, _Tp v7,\n         _Tp v8, _Tp v9, _Tp v10, _Tp v11); //!< 1x12, 2x6, 3x4, 4x3, 6x2 or 12x1 matrix\n    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3,\n         _Tp v4, _Tp v5, _Tp v6, _Tp v7,\n         _Tp v8, _Tp v9, _Tp v10, _Tp v11,\n         _Tp v12, _Tp v13, _Tp v14, _Tp v15); //!< 1x16, 4x4 or 16x1 matrix\n    explicit Matx(const _Tp* vals); //!< initialize from a plain array\n\n    static Matx all(_Tp alpha);\n    static Matx zeros();\n    static Matx ones();\n    static Matx eye();\n    static Matx diag(const diag_type& d);\n    static Matx randu(_Tp a, _Tp b);\n    static Matx randn(_Tp a, _Tp b);\n\n    //! dot product computed with the default precision\n    _Tp dot(const Matx<_Tp, m, n>& v) const;\n\n    //! dot product computed in double-precision arithmetics\n    double ddot(const Matx<_Tp, m, n>& v) const;\n\n    //! conversion to another data type\n    template<typename T2> operator Matx<T2, m, n>() const;\n\n    //! change the matrix shape\n    template<int m1, int n1> Matx<_Tp, m1, n1> reshape() const;\n\n    //! extract part of the matrix\n    template<int m1, int n1> Matx<_Tp, m1, n1> get_minor(int i, int j) const;\n\n    //! extract the matrix row\n    Matx<_Tp, 1, n> row(int i) const;\n\n    //! extract the matrix column\n    Matx<_Tp, m, 1> col(int i) const;\n\n    //! extract the matrix diagonal\n    diag_type diag() const;\n\n    //! transpose the matrix\n    Matx<_Tp, n, m> t() const;\n\n    //! invert the matrix\n    Matx<_Tp, n, m> inv(int method=DECOMP_LU, bool *p_is_ok = NULL) const;\n\n    //! solve linear system\n    template<int l> Matx<_Tp, n, l> solve(const Matx<_Tp, m, l>& rhs, int flags=DECOMP_LU) const;\n    Vec<_Tp, n> solve(const Vec<_Tp, m>& rhs, int method) const;\n\n    //! multiply two matrices element-wise\n    Matx<_Tp, m, n> mul(const Matx<_Tp, m, n>& a) const;\n\n    //! divide two matrices element-wise\n    Matx<_Tp, m, n> div(const Matx<_Tp, m, n>& a) const;\n\n    //! element access\n    const _Tp& operator ()(int i, int j) const;\n    _Tp& operator ()(int i, int j);\n\n    //! 1D element access\n    const _Tp& operator ()(int i) const;\n    _Tp& operator ()(int i);\n\n    Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_AddOp);\n    Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_SubOp);\n    template<typename _T2> Matx(const Matx<_Tp, m, n>& a, _T2 alpha, Matx_ScaleOp);\n    Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_MulOp);\n    Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_DivOp);\n    template<int l> Matx(const Matx<_Tp, m, l>& a, const Matx<_Tp, l, n>& b, Matx_MatMulOp);\n    Matx(const Matx<_Tp, n, m>& a, Matx_TOp);\n\n    _Tp val[m*n]; //< matrix elements\n};\n\ntypedef Matx<float, 1, 2> Matx12f;\ntypedef Matx<double, 1, 2> Matx12d;\ntypedef Matx<float, 1, 3> Matx13f;\ntypedef Matx<double, 1, 3> Matx13d;\ntypedef Matx<float, 1, 4> Matx14f;\ntypedef Matx<double, 1, 4> Matx14d;\ntypedef Matx<float, 1, 6> Matx16f;\ntypedef Matx<double, 1, 6> Matx16d;\n\ntypedef Matx<float, 2, 1> Matx21f;\ntypedef Matx<double, 2, 1> Matx21d;\ntypedef Matx<float, 3, 1> Matx31f;\ntypedef Matx<double, 3, 1> Matx31d;\ntypedef Matx<float, 4, 1> Matx41f;\ntypedef Matx<double, 4, 1> Matx41d;\ntypedef Matx<float, 6, 1> Matx61f;\ntypedef Matx<double, 6, 1> Matx61d;\n\ntypedef Matx<float, 2, 2> Matx22f;\ntypedef Matx<double, 2, 2> Matx22d;\ntypedef Matx<float, 2, 3> Matx23f;\ntypedef Matx<double, 2, 3> Matx23d;\ntypedef Matx<float, 3, 2> Matx32f;\ntypedef Matx<double, 3, 2> Matx32d;\n\ntypedef Matx<float, 3, 3> Matx33f;\ntypedef Matx<double, 3, 3> Matx33d;\n\ntypedef Matx<float, 3, 4> Matx34f;\ntypedef Matx<double, 3, 4> Matx34d;\ntypedef Matx<float, 4, 3> Matx43f;\ntypedef Matx<double, 4, 3> Matx43d;\n\ntypedef Matx<float, 4, 4> Matx44f;\ntypedef Matx<double, 4, 4> Matx44d;\ntypedef Matx<float, 6, 6> Matx66f;\ntypedef Matx<double, 6, 6> Matx66d;\n\n/*!\n  traits\n*/\ntemplate<typename _Tp, int m, int n> class DataType< Matx<_Tp, m, n> >\n{\npublic:\n    typedef Matx<_Tp, m, n>                               value_type;\n    typedef Matx<typename DataType<_Tp>::work_type, m, n> work_type;\n    typedef _Tp                                           channel_type;\n    typedef value_type                                    vec_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = m * n,\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n};\n\n/** @brief  Comma-separated Matrix Initializer\n*/\ntemplate<typename _Tp, int m, int n> class MatxCommaInitializer\n{\npublic:\n    MatxCommaInitializer(Matx<_Tp, m, n>* _mtx);\n    template<typename T2> MatxCommaInitializer<_Tp, m, n>& operator , (T2 val);\n    Matx<_Tp, m, n> operator *() const;\n\n    Matx<_Tp, m, n>* dst;\n    int idx;\n};\n\n/*\n Utility methods\n*/\ntemplate<typename _Tp, int m> static double determinant(const Matx<_Tp, m, m>& a);\ntemplate<typename _Tp, int m, int n> static double trace(const Matx<_Tp, m, n>& a);\ntemplate<typename _Tp, int m, int n> static double norm(const Matx<_Tp, m, n>& M);\ntemplate<typename _Tp, int m, int n> static double norm(const Matx<_Tp, m, n>& M, int normType);\n\n\n\n/////////////////////// Vec (used as element of multi-channel images /////////////////////\n\n/** @brief Template class for short numerical vectors, a partial case of Matx\n\nThis template class represents short numerical vectors (of 1, 2, 3, 4 ... elements) on which you\ncan perform basic arithmetical operations, access individual elements using [] operator etc. The\nvectors are allocated on stack, as opposite to std::valarray, std::vector, cv::Mat etc., which\nelements are dynamically allocated in the heap.\n\nThe template takes 2 parameters:\n@tparam _Tp element type\n@tparam cn the number of elements\n\nIn addition to the universal notation like Vec<float, 3>, you can use shorter aliases\nfor the most popular specialized variants of Vec, e.g. Vec3f ~ Vec<float, 3>.\n\nIt is possible to convert Vec\\<T,2\\> to/from Point_, Vec\\<T,3\\> to/from Point3_ , and Vec\\<T,4\\>\nto CvScalar or Scalar_. Use operator[] to access the elements of Vec.\n\nAll the expected vector operations are also implemented:\n-   v1 = v2 + v3\n-   v1 = v2 - v3\n-   v1 = v2 \\* scale\n-   v1 = scale \\* v2\n-   v1 = -v2\n-   v1 += v2 and other augmenting operations\n-   v1 == v2, v1 != v2\n-   norm(v1) (euclidean norm)\nThe Vec class is commonly used to describe pixel types of multi-channel arrays. See Mat for details.\n*/\ntemplate<typename _Tp, int cn> class Vec : public Matx<_Tp, cn, 1>\n{\npublic:\n    typedef _Tp value_type;\n    enum { depth    = Matx<_Tp, cn, 1>::depth,\n           channels = cn,\n           type     = CV_MAKETYPE(depth, channels)\n         };\n\n    //! default constructor\n    Vec();\n\n    Vec(_Tp v0); //!< 1-element vector constructor\n    Vec(_Tp v0, _Tp v1); //!< 2-element vector constructor\n    Vec(_Tp v0, _Tp v1, _Tp v2); //!< 3-element vector constructor\n    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3); //!< 4-element vector constructor\n    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4); //!< 5-element vector constructor\n    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5); //!< 6-element vector constructor\n    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6); //!< 7-element vector constructor\n    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7); //!< 8-element vector constructor\n    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8); //!< 9-element vector constructor\n    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9); //!< 10-element vector constructor\n    explicit Vec(const _Tp* values);\n\n    Vec(const Vec<_Tp, cn>& v);\n\n    static Vec all(_Tp alpha);\n\n    //! per-element multiplication\n    Vec mul(const Vec<_Tp, cn>& v) const;\n\n    //! conjugation (makes sense for complex numbers and quaternions)\n    Vec conj() const;\n\n    /*!\n      cross product of the two 3D vectors.\n\n      For other dimensionalities the exception is raised\n    */\n    Vec cross(const Vec& v) const;\n    //! conversion to another data type\n    template<typename T2> operator Vec<T2, cn>() const;\n\n    /*! element access */\n    const _Tp& operator [](int i) const;\n    _Tp& operator[](int i);\n    const _Tp& operator ()(int i) const;\n    _Tp& operator ()(int i);\n\n    Vec(const Matx<_Tp, cn, 1>& a, const Matx<_Tp, cn, 1>& b, Matx_AddOp);\n    Vec(const Matx<_Tp, cn, 1>& a, const Matx<_Tp, cn, 1>& b, Matx_SubOp);\n    template<typename _T2> Vec(const Matx<_Tp, cn, 1>& a, _T2 alpha, Matx_ScaleOp);\n};\n\n/** @name Shorter aliases for the most popular specializations of Vec<T,n>\n  @{\n*/\ntypedef Vec<uchar, 2> Vec2b;\ntypedef Vec<uchar, 3> Vec3b;\ntypedef Vec<uchar, 4> Vec4b;\n\ntypedef Vec<short, 2> Vec2s;\ntypedef Vec<short, 3> Vec3s;\ntypedef Vec<short, 4> Vec4s;\n\ntypedef Vec<ushort, 2> Vec2w;\ntypedef Vec<ushort, 3> Vec3w;\ntypedef Vec<ushort, 4> Vec4w;\n\ntypedef Vec<int, 2> Vec2i;\ntypedef Vec<int, 3> Vec3i;\ntypedef Vec<int, 4> Vec4i;\ntypedef Vec<int, 6> Vec6i;\ntypedef Vec<int, 8> Vec8i;\n\ntypedef Vec<float, 2> Vec2f;\ntypedef Vec<float, 3> Vec3f;\ntypedef Vec<float, 4> Vec4f;\ntypedef Vec<float, 6> Vec6f;\n\ntypedef Vec<double, 2> Vec2d;\ntypedef Vec<double, 3> Vec3d;\ntypedef Vec<double, 4> Vec4d;\ntypedef Vec<double, 6> Vec6d;\n/** @} */\n\n/*!\n  traits\n*/\ntemplate<typename _Tp, int cn> class DataType< Vec<_Tp, cn> >\n{\npublic:\n    typedef Vec<_Tp, cn>                               value_type;\n    typedef Vec<typename DataType<_Tp>::work_type, cn> work_type;\n    typedef _Tp                                        channel_type;\n    typedef value_type                                 vec_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = cn,\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n};\n\n/** @brief  Comma-separated Vec Initializer\n*/\ntemplate<typename _Tp, int m> class VecCommaInitializer : public MatxCommaInitializer<_Tp, m, 1>\n{\npublic:\n    VecCommaInitializer(Vec<_Tp, m>* _vec);\n    template<typename T2> VecCommaInitializer<_Tp, m>& operator , (T2 val);\n    Vec<_Tp, m> operator *() const;\n};\n\ntemplate<typename _Tp, int cn> static Vec<_Tp, cn> normalize(const Vec<_Tp, cn>& v);\n\n//! @} core_basic\n\n//! @cond IGNORED\n\n///////////////////////////////////// helper classes /////////////////////////////////////\nnamespace internal\n{\n\ntemplate<typename _Tp, int m> struct Matx_DetOp\n{\n    double operator ()(const Matx<_Tp, m, m>& a) const\n    {\n        Matx<_Tp, m, m> temp = a;\n        double p = LU(temp.val, m*sizeof(_Tp), m, 0, 0, 0);\n        if( p == 0 )\n            return p;\n        for( int i = 0; i < m; i++ )\n            p *= temp(i, i);\n        return 1./p;\n    }\n};\n\ntemplate<typename _Tp> struct Matx_DetOp<_Tp, 1>\n{\n    double operator ()(const Matx<_Tp, 1, 1>& a) const\n    {\n        return a(0,0);\n    }\n};\n\ntemplate<typename _Tp> struct Matx_DetOp<_Tp, 2>\n{\n    double operator ()(const Matx<_Tp, 2, 2>& a) const\n    {\n        return a(0,0)*a(1,1) - a(0,1)*a(1,0);\n    }\n};\n\ntemplate<typename _Tp> struct Matx_DetOp<_Tp, 3>\n{\n    double operator ()(const Matx<_Tp, 3, 3>& a) const\n    {\n        return a(0,0)*(a(1,1)*a(2,2) - a(2,1)*a(1,2)) -\n            a(0,1)*(a(1,0)*a(2,2) - a(2,0)*a(1,2)) +\n            a(0,2)*(a(1,0)*a(2,1) - a(2,0)*a(1,1));\n    }\n};\n\ntemplate<typename _Tp> Vec<_Tp, 2> inline conjugate(const Vec<_Tp, 2>& v)\n{\n    return Vec<_Tp, 2>(v[0], -v[1]);\n}\n\ntemplate<typename _Tp> Vec<_Tp, 4> inline conjugate(const Vec<_Tp, 4>& v)\n{\n    return Vec<_Tp, 4>(v[0], -v[1], -v[2], -v[3]);\n}\n\n} // internal\n\n\n\n////////////////////////////////// Matx Implementation ///////////////////////////////////\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx()\n{\n    for(int i = 0; i < channels; i++) val[i] = _Tp(0);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx(_Tp v0)\n{\n    val[0] = v0;\n    for(int i = 1; i < channels; i++) val[i] = _Tp(0);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx(_Tp v0, _Tp v1)\n{\n    CV_StaticAssert(channels >= 2, \"Matx should have at least 2 elaments.\");\n    val[0] = v0; val[1] = v1;\n    for(int i = 2; i < channels; i++) val[i] = _Tp(0);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx(_Tp v0, _Tp v1, _Tp v2)\n{\n    CV_StaticAssert(channels >= 3, \"Matx should have at least 3 elaments.\");\n    val[0] = v0; val[1] = v1; val[2] = v2;\n    for(int i = 3; i < channels; i++) val[i] = _Tp(0);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3)\n{\n    CV_StaticAssert(channels >= 4, \"Matx should have at least 4 elaments.\");\n    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;\n    for(int i = 4; i < channels; i++) val[i] = _Tp(0);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4)\n{\n    CV_StaticAssert(channels >= 5, \"Matx should have at least 5 elaments.\");\n    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3; val[4] = v4;\n    for(int i = 5; i < channels; i++) val[i] = _Tp(0);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5)\n{\n    CV_StaticAssert(channels >= 6, \"Matx should have at least 6 elaments.\");\n    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;\n    val[4] = v4; val[5] = v5;\n    for(int i = 6; i < channels; i++) val[i] = _Tp(0);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6)\n{\n    CV_StaticAssert(channels >= 7, \"Matx should have at least 7 elaments.\");\n    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;\n    val[4] = v4; val[5] = v5; val[6] = v6;\n    for(int i = 7; i < channels; i++) val[i] = _Tp(0);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7)\n{\n    CV_StaticAssert(channels >= 8, \"Matx should have at least 8 elaments.\");\n    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;\n    val[4] = v4; val[5] = v5; val[6] = v6; val[7] = v7;\n    for(int i = 8; i < channels; i++) val[i] = _Tp(0);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8)\n{\n    CV_StaticAssert(channels >= 9, \"Matx should have at least 9 elaments.\");\n    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;\n    val[4] = v4; val[5] = v5; val[6] = v6; val[7] = v7;\n    val[8] = v8;\n    for(int i = 9; i < channels; i++) val[i] = _Tp(0);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9)\n{\n    CV_StaticAssert(channels >= 10, \"Matx should have at least 10 elaments.\");\n    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;\n    val[4] = v4; val[5] = v5; val[6] = v6; val[7] = v7;\n    val[8] = v8; val[9] = v9;\n    for(int i = 10; i < channels; i++) val[i] = _Tp(0);\n}\n\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11)\n{\n    CV_StaticAssert(channels == 12, \"Matx should have at least 12 elaments.\");\n    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;\n    val[4] = v4; val[5] = v5; val[6] = v6; val[7] = v7;\n    val[8] = v8; val[9] = v9; val[10] = v10; val[11] = v11;\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11, _Tp v12, _Tp v13, _Tp v14, _Tp v15)\n{\n    CV_StaticAssert(channels == 16, \"Matx should have at least 16 elaments.\");\n    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;\n    val[4] = v4; val[5] = v5; val[6] = v6; val[7] = v7;\n    val[8] = v8; val[9] = v9; val[10] = v10; val[11] = v11;\n    val[12] = v12; val[13] = v13; val[14] = v14; val[15] = v15;\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n>::Matx(const _Tp* values)\n{\n    for( int i = 0; i < channels; i++ ) val[i] = values[i];\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n> Matx<_Tp, m, n>::all(_Tp alpha)\n{\n    Matx<_Tp, m, n> M;\n    for( int i = 0; i < m*n; i++ ) M.val[i] = alpha;\n    return M;\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n> Matx<_Tp,m,n>::zeros()\n{\n    return all(0);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n> Matx<_Tp,m,n>::ones()\n{\n    return all(1);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n> Matx<_Tp,m,n>::eye()\n{\n    Matx<_Tp,m,n> M;\n    for(int i = 0; i < shortdim; i++)\n        M(i,i) = 1;\n    return M;\n}\n\ntemplate<typename _Tp, int m, int n> inline\n_Tp Matx<_Tp, m, n>::dot(const Matx<_Tp, m, n>& M) const\n{\n    _Tp s = 0;\n    for( int i = 0; i < channels; i++ ) s += val[i]*M.val[i];\n    return s;\n}\n\ntemplate<typename _Tp, int m, int n> inline\ndouble Matx<_Tp, m, n>::ddot(const Matx<_Tp, m, n>& M) const\n{\n    double s = 0;\n    for( int i = 0; i < channels; i++ ) s += (double)val[i]*M.val[i];\n    return s;\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n> Matx<_Tp,m,n>::diag(const typename Matx<_Tp,m,n>::diag_type& d)\n{\n    Matx<_Tp,m,n> M;\n    for(int i = 0; i < shortdim; i++)\n        M(i,i) = d(i, 0);\n    return M;\n}\n\ntemplate<typename _Tp, int m, int n> template<typename T2>\ninline Matx<_Tp, m, n>::operator Matx<T2, m, n>() const\n{\n    Matx<T2, m, n> M;\n    for( int i = 0; i < m*n; i++ ) M.val[i] = saturate_cast<T2>(val[i]);\n    return M;\n}\n\ntemplate<typename _Tp, int m, int n> template<int m1, int n1> inline\nMatx<_Tp, m1, n1> Matx<_Tp, m, n>::reshape() const\n{\n    CV_StaticAssert(m1*n1 == m*n, \"Input and destnarion matrices must have the same number of elements\");\n    return (const Matx<_Tp, m1, n1>&)*this;\n}\n\ntemplate<typename _Tp, int m, int n>\ntemplate<int m1, int n1> inline\nMatx<_Tp, m1, n1> Matx<_Tp, m, n>::get_minor(int i, int j) const\n{\n    CV_DbgAssert(0 <= i && i+m1 <= m && 0 <= j && j+n1 <= n);\n    Matx<_Tp, m1, n1> s;\n    for( int di = 0; di < m1; di++ )\n        for( int dj = 0; dj < n1; dj++ )\n            s(di, dj) = (*this)(i+di, j+dj);\n    return s;\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, 1, n> Matx<_Tp, m, n>::row(int i) const\n{\n    CV_DbgAssert((unsigned)i < (unsigned)m);\n    return Matx<_Tp, 1, n>(&val[i*n]);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, 1> Matx<_Tp, m, n>::col(int j) const\n{\n    CV_DbgAssert((unsigned)j < (unsigned)n);\n    Matx<_Tp, m, 1> v;\n    for( int i = 0; i < m; i++ )\n        v.val[i] = val[i*n + j];\n    return v;\n}\n\ntemplate<typename _Tp, int m, int n> inline\ntypename Matx<_Tp, m, n>::diag_type Matx<_Tp, m, n>::diag() const\n{\n    diag_type d;\n    for( int i = 0; i < shortdim; i++ )\n        d.val[i] = val[i*n + i];\n    return d;\n}\n\ntemplate<typename _Tp, int m, int n> inline\nconst _Tp& Matx<_Tp, m, n>::operator()(int i, int j) const\n{\n    CV_DbgAssert( (unsigned)i < (unsigned)m && (unsigned)j < (unsigned)n );\n    return this->val[i*n + j];\n}\n\ntemplate<typename _Tp, int m, int n> inline\n_Tp& Matx<_Tp, m, n>::operator ()(int i, int j)\n{\n    CV_DbgAssert( (unsigned)i < (unsigned)m && (unsigned)j < (unsigned)n );\n    return val[i*n + j];\n}\n\ntemplate<typename _Tp, int m, int n> inline\nconst _Tp& Matx<_Tp, m, n>::operator ()(int i) const\n{\n    CV_StaticAssert(m == 1 || n == 1, \"Single index indexation requires matrix to be a column or a row\");\n    CV_DbgAssert( (unsigned)i < (unsigned)(m+n-1) );\n    return val[i];\n}\n\ntemplate<typename _Tp, int m, int n> inline\n_Tp& Matx<_Tp, m, n>::operator ()(int i)\n{\n    CV_StaticAssert(m == 1 || n == 1, \"Single index indexation requires matrix to be a column or a row\");\n    CV_DbgAssert( (unsigned)i < (unsigned)(m+n-1) );\n    return val[i];\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n>::Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_AddOp)\n{\n    for( int i = 0; i < channels; i++ )\n        val[i] = saturate_cast<_Tp>(a.val[i] + b.val[i]);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n>::Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_SubOp)\n{\n    for( int i = 0; i < channels; i++ )\n        val[i] = saturate_cast<_Tp>(a.val[i] - b.val[i]);\n}\n\ntemplate<typename _Tp, int m, int n> template<typename _T2> inline\nMatx<_Tp,m,n>::Matx(const Matx<_Tp, m, n>& a, _T2 alpha, Matx_ScaleOp)\n{\n    for( int i = 0; i < channels; i++ )\n        val[i] = saturate_cast<_Tp>(a.val[i] * alpha);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n>::Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_MulOp)\n{\n    for( int i = 0; i < channels; i++ )\n        val[i] = saturate_cast<_Tp>(a.val[i] * b.val[i]);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n>::Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_DivOp)\n{\n    for( int i = 0; i < channels; i++ )\n        val[i] = saturate_cast<_Tp>(a.val[i] / b.val[i]);\n}\n\ntemplate<typename _Tp, int m, int n> template<int l> inline\nMatx<_Tp,m,n>::Matx(const Matx<_Tp, m, l>& a, const Matx<_Tp, l, n>& b, Matx_MatMulOp)\n{\n    for( int i = 0; i < m; i++ )\n        for( int j = 0; j < n; j++ )\n        {\n            _Tp s = 0;\n            for( int k = 0; k < l; k++ )\n                s += a(i, k) * b(k, j);\n            val[i*n + j] = s;\n        }\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n>::Matx(const Matx<_Tp, n, m>& a, Matx_TOp)\n{\n    for( int i = 0; i < m; i++ )\n        for( int j = 0; j < n; j++ )\n            val[i*n + j] = a(j, i);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n> Matx<_Tp, m, n>::mul(const Matx<_Tp, m, n>& a) const\n{\n    return Matx<_Tp, m, n>(*this, a, Matx_MulOp());\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n> Matx<_Tp, m, n>::div(const Matx<_Tp, m, n>& a) const\n{\n    return Matx<_Tp, m, n>(*this, a, Matx_DivOp());\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, n, m> Matx<_Tp, m, n>::t() const\n{\n    return Matx<_Tp, n, m>(*this, Matx_TOp());\n}\n\ntemplate<typename _Tp, int m, int n> inline\nVec<_Tp, n> Matx<_Tp, m, n>::solve(const Vec<_Tp, m>& rhs, int method) const\n{\n    Matx<_Tp, n, 1> x = solve((const Matx<_Tp, m, 1>&)(rhs), method);\n    return (Vec<_Tp, n>&)(x);\n}\n\ntemplate<typename _Tp, int m> static inline\ndouble determinant(const Matx<_Tp, m, m>& a)\n{\n    return cv::internal::Matx_DetOp<_Tp, m>()(a);\n}\n\ntemplate<typename _Tp, int m, int n> static inline\ndouble trace(const Matx<_Tp, m, n>& a)\n{\n    _Tp s = 0;\n    for( int i = 0; i < std::min(m, n); i++ )\n        s += a(i,i);\n    return s;\n}\n\ntemplate<typename _Tp, int m, int n> static inline\ndouble norm(const Matx<_Tp, m, n>& M)\n{\n    return std::sqrt(normL2Sqr<_Tp, double>(M.val, m*n));\n}\n\ntemplate<typename _Tp, int m, int n> static inline\ndouble norm(const Matx<_Tp, m, n>& M, int normType)\n{\n    return normType == NORM_INF ? (double)normInf<_Tp, typename DataType<_Tp>::work_type>(M.val, m*n) :\n        normType == NORM_L1 ? (double)normL1<_Tp, typename DataType<_Tp>::work_type>(M.val, m*n) :\n        std::sqrt((double)normL2Sqr<_Tp, typename DataType<_Tp>::work_type>(M.val, m*n));\n}\n\n\n\n//////////////////////////////// matx comma initializer //////////////////////////////////\n\ntemplate<typename _Tp, typename _T2, int m, int n> static inline\nMatxCommaInitializer<_Tp, m, n> operator << (const Matx<_Tp, m, n>& mtx, _T2 val)\n{\n    MatxCommaInitializer<_Tp, m, n> commaInitializer((Matx<_Tp, m, n>*)&mtx);\n    return (commaInitializer, val);\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatxCommaInitializer<_Tp, m, n>::MatxCommaInitializer(Matx<_Tp, m, n>* _mtx)\n    : dst(_mtx), idx(0)\n{}\n\ntemplate<typename _Tp, int m, int n> template<typename _T2> inline\nMatxCommaInitializer<_Tp, m, n>& MatxCommaInitializer<_Tp, m, n>::operator , (_T2 value)\n{\n    CV_DbgAssert( idx < m*n );\n    dst->val[idx++] = saturate_cast<_Tp>(value);\n    return *this;\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, m, n> MatxCommaInitializer<_Tp, m, n>::operator *() const\n{\n    CV_DbgAssert( idx == n*m );\n    return *dst;\n}\n\n\n\n/////////////////////////////////// Vec Implementation ///////////////////////////////////\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec() {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(_Tp v0)\n    : Matx<_Tp, cn, 1>(v0) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(_Tp v0, _Tp v1)\n    : Matx<_Tp, cn, 1>(v0, v1) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(_Tp v0, _Tp v1, _Tp v2)\n    : Matx<_Tp, cn, 1>(v0, v1, v2) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3)\n    : Matx<_Tp, cn, 1>(v0, v1, v2, v3) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4)\n    : Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5)\n    : Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4, v5) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6)\n    : Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4, v5, v6) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7)\n    : Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4, v5, v6, v7) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8)\n    : Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4, v5, v6, v7, v8) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9)\n    : Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(const _Tp* values)\n    : Matx<_Tp, cn, 1>(values) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(const Vec<_Tp, cn>& m)\n    : Matx<_Tp, cn, 1>(m.val) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(const Matx<_Tp, cn, 1>& a, const Matx<_Tp, cn, 1>& b, Matx_AddOp op)\n    : Matx<_Tp, cn, 1>(a, b, op) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn>::Vec(const Matx<_Tp, cn, 1>& a, const Matx<_Tp, cn, 1>& b, Matx_SubOp op)\n    : Matx<_Tp, cn, 1>(a, b, op) {}\n\ntemplate<typename _Tp, int cn> template<typename _T2> inline\nVec<_Tp, cn>::Vec(const Matx<_Tp, cn, 1>& a, _T2 alpha, Matx_ScaleOp op)\n    : Matx<_Tp, cn, 1>(a, alpha, op) {}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn> Vec<_Tp, cn>::all(_Tp alpha)\n{\n    Vec v;\n    for( int i = 0; i < cn; i++ ) v.val[i] = alpha;\n    return v;\n}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn> Vec<_Tp, cn>::mul(const Vec<_Tp, cn>& v) const\n{\n    Vec<_Tp, cn> w;\n    for( int i = 0; i < cn; i++ ) w.val[i] = saturate_cast<_Tp>(this->val[i]*v.val[i]);\n    return w;\n}\n\ntemplate<> inline\nVec<float, 2> Vec<float, 2>::conj() const\n{\n    return cv::internal::conjugate(*this);\n}\n\ntemplate<> inline\nVec<double, 2> Vec<double, 2>::conj() const\n{\n    return cv::internal::conjugate(*this);\n}\n\ntemplate<> inline\nVec<float, 4> Vec<float, 4>::conj() const\n{\n    return cv::internal::conjugate(*this);\n}\n\ntemplate<> inline\nVec<double, 4> Vec<double, 4>::conj() const\n{\n    return cv::internal::conjugate(*this);\n}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn> Vec<_Tp, cn>::cross(const Vec<_Tp, cn>&) const\n{\n    CV_StaticAssert(cn == 3, \"for arbitrary-size vector there is no cross-product defined\");\n    return Vec<_Tp, cn>();\n}\n\ntemplate<> inline\nVec<float, 3> Vec<float, 3>::cross(const Vec<float, 3>& v) const\n{\n    return Vec<float,3>(val[1]*v.val[2] - val[2]*v.val[1],\n                     val[2]*v.val[0] - val[0]*v.val[2],\n                     val[0]*v.val[1] - val[1]*v.val[0]);\n}\n\ntemplate<> inline\nVec<double, 3> Vec<double, 3>::cross(const Vec<double, 3>& v) const\n{\n    return Vec<double,3>(val[1]*v.val[2] - val[2]*v.val[1],\n                     val[2]*v.val[0] - val[0]*v.val[2],\n                     val[0]*v.val[1] - val[1]*v.val[0]);\n}\n\ntemplate<typename _Tp, int cn> template<typename T2> inline\nVec<_Tp, cn>::operator Vec<T2, cn>() const\n{\n    Vec<T2, cn> v;\n    for( int i = 0; i < cn; i++ ) v.val[i] = saturate_cast<T2>(this->val[i]);\n    return v;\n}\n\ntemplate<typename _Tp, int cn> inline\nconst _Tp& Vec<_Tp, cn>::operator [](int i) const\n{\n    CV_DbgAssert( (unsigned)i < (unsigned)cn );\n    return this->val[i];\n}\n\ntemplate<typename _Tp, int cn> inline\n_Tp& Vec<_Tp, cn>::operator [](int i)\n{\n    CV_DbgAssert( (unsigned)i < (unsigned)cn );\n    return this->val[i];\n}\n\ntemplate<typename _Tp, int cn> inline\nconst _Tp& Vec<_Tp, cn>::operator ()(int i) const\n{\n    CV_DbgAssert( (unsigned)i < (unsigned)cn );\n    return this->val[i];\n}\n\ntemplate<typename _Tp, int cn> inline\n_Tp& Vec<_Tp, cn>::operator ()(int i)\n{\n    CV_DbgAssert( (unsigned)i < (unsigned)cn );\n    return this->val[i];\n}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn> normalize(const Vec<_Tp, cn>& v)\n{\n    double nv = norm(v);\n    return v * (nv ? 1./nv : 0.);\n}\n\n\n\n//////////////////////////////// matx comma initializer //////////////////////////////////\n\n\ntemplate<typename _Tp, typename _T2, int cn> static inline\nVecCommaInitializer<_Tp, cn> operator << (const Vec<_Tp, cn>& vec, _T2 val)\n{\n    VecCommaInitializer<_Tp, cn> commaInitializer((Vec<_Tp, cn>*)&vec);\n    return (commaInitializer, val);\n}\n\ntemplate<typename _Tp, int cn> inline\nVecCommaInitializer<_Tp, cn>::VecCommaInitializer(Vec<_Tp, cn>* _vec)\n    : MatxCommaInitializer<_Tp, cn, 1>(_vec)\n{}\n\ntemplate<typename _Tp, int cn> template<typename _T2> inline\nVecCommaInitializer<_Tp, cn>& VecCommaInitializer<_Tp, cn>::operator , (_T2 value)\n{\n    CV_DbgAssert( this->idx < cn );\n    this->dst->val[this->idx++] = saturate_cast<_Tp>(value);\n    return *this;\n}\n\ntemplate<typename _Tp, int cn> inline\nVec<_Tp, cn> VecCommaInitializer<_Tp, cn>::operator *() const\n{\n    CV_DbgAssert( this->idx == cn );\n    return *this->dst;\n}\n\n//! @endcond\n\n///////////////////////////// Matx out-of-class operators ////////////////////////////////\n\n//! @relates cv::Matx\n//! @{\n\ntemplate<typename _Tp1, typename _Tp2, int m, int n> static inline\nMatx<_Tp1, m, n>& operator += (Matx<_Tp1, m, n>& a, const Matx<_Tp2, m, n>& b)\n{\n    for( int i = 0; i < m*n; i++ )\n        a.val[i] = saturate_cast<_Tp1>(a.val[i] + b.val[i]);\n    return a;\n}\n\ntemplate<typename _Tp1, typename _Tp2, int m, int n> static inline\nMatx<_Tp1, m, n>& operator -= (Matx<_Tp1, m, n>& a, const Matx<_Tp2, m, n>& b)\n{\n    for( int i = 0; i < m*n; i++ )\n        a.val[i] = saturate_cast<_Tp1>(a.val[i] - b.val[i]);\n    return a;\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n> operator + (const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b)\n{\n    return Matx<_Tp, m, n>(a, b, Matx_AddOp());\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n> operator - (const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b)\n{\n    return Matx<_Tp, m, n>(a, b, Matx_SubOp());\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n>& operator *= (Matx<_Tp, m, n>& a, int alpha)\n{\n    for( int i = 0; i < m*n; i++ )\n        a.val[i] = saturate_cast<_Tp>(a.val[i] * alpha);\n    return a;\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n>& operator *= (Matx<_Tp, m, n>& a, float alpha)\n{\n    for( int i = 0; i < m*n; i++ )\n        a.val[i] = saturate_cast<_Tp>(a.val[i] * alpha);\n    return a;\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n>& operator *= (Matx<_Tp, m, n>& a, double alpha)\n{\n    for( int i = 0; i < m*n; i++ )\n        a.val[i] = saturate_cast<_Tp>(a.val[i] * alpha);\n    return a;\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n> operator * (const Matx<_Tp, m, n>& a, int alpha)\n{\n    return Matx<_Tp, m, n>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n> operator * (const Matx<_Tp, m, n>& a, float alpha)\n{\n    return Matx<_Tp, m, n>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n> operator * (const Matx<_Tp, m, n>& a, double alpha)\n{\n    return Matx<_Tp, m, n>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n> operator * (int alpha, const Matx<_Tp, m, n>& a)\n{\n    return Matx<_Tp, m, n>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n> operator * (float alpha, const Matx<_Tp, m, n>& a)\n{\n    return Matx<_Tp, m, n>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n> operator * (double alpha, const Matx<_Tp, m, n>& a)\n{\n    return Matx<_Tp, m, n>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nMatx<_Tp, m, n> operator - (const Matx<_Tp, m, n>& a)\n{\n    return Matx<_Tp, m, n>(a, -1, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int m, int n, int l> static inline\nMatx<_Tp, m, n> operator * (const Matx<_Tp, m, l>& a, const Matx<_Tp, l, n>& b)\n{\n    return Matx<_Tp, m, n>(a, b, Matx_MatMulOp());\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nVec<_Tp, m> operator * (const Matx<_Tp, m, n>& a, const Vec<_Tp, n>& b)\n{\n    Matx<_Tp, m, 1> c(a, b, Matx_MatMulOp());\n    return (const Vec<_Tp, m>&)(c);\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nbool operator == (const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b)\n{\n    for( int i = 0; i < m*n; i++ )\n        if( a.val[i] != b.val[i] ) return false;\n    return true;\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nbool operator != (const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b)\n{\n    return !(a == b);\n}\n\n//! @}\n\n////////////////////////////// Vec out-of-class operators ////////////////////////////////\n\n//! @relates cv::Vec\n//! @{\n\ntemplate<typename _Tp1, typename _Tp2, int cn> static inline\nVec<_Tp1, cn>& operator += (Vec<_Tp1, cn>& a, const Vec<_Tp2, cn>& b)\n{\n    for( int i = 0; i < cn; i++ )\n        a.val[i] = saturate_cast<_Tp1>(a.val[i] + b.val[i]);\n    return a;\n}\n\ntemplate<typename _Tp1, typename _Tp2, int cn> static inline\nVec<_Tp1, cn>& operator -= (Vec<_Tp1, cn>& a, const Vec<_Tp2, cn>& b)\n{\n    for( int i = 0; i < cn; i++ )\n        a.val[i] = saturate_cast<_Tp1>(a.val[i] - b.val[i]);\n    return a;\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator + (const Vec<_Tp, cn>& a, const Vec<_Tp, cn>& b)\n{\n    return Vec<_Tp, cn>(a, b, Matx_AddOp());\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator - (const Vec<_Tp, cn>& a, const Vec<_Tp, cn>& b)\n{\n    return Vec<_Tp, cn>(a, b, Matx_SubOp());\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn>& operator *= (Vec<_Tp, cn>& a, int alpha)\n{\n    for( int i = 0; i < cn; i++ )\n        a[i] = saturate_cast<_Tp>(a[i]*alpha);\n    return a;\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn>& operator *= (Vec<_Tp, cn>& a, float alpha)\n{\n    for( int i = 0; i < cn; i++ )\n        a[i] = saturate_cast<_Tp>(a[i]*alpha);\n    return a;\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn>& operator *= (Vec<_Tp, cn>& a, double alpha)\n{\n    for( int i = 0; i < cn; i++ )\n        a[i] = saturate_cast<_Tp>(a[i]*alpha);\n    return a;\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn>& operator /= (Vec<_Tp, cn>& a, int alpha)\n{\n    double ialpha = 1./alpha;\n    for( int i = 0; i < cn; i++ )\n        a[i] = saturate_cast<_Tp>(a[i]*ialpha);\n    return a;\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn>& operator /= (Vec<_Tp, cn>& a, float alpha)\n{\n    float ialpha = 1.f/alpha;\n    for( int i = 0; i < cn; i++ )\n        a[i] = saturate_cast<_Tp>(a[i]*ialpha);\n    return a;\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn>& operator /= (Vec<_Tp, cn>& a, double alpha)\n{\n    double ialpha = 1./alpha;\n    for( int i = 0; i < cn; i++ )\n        a[i] = saturate_cast<_Tp>(a[i]*ialpha);\n    return a;\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator * (const Vec<_Tp, cn>& a, int alpha)\n{\n    return Vec<_Tp, cn>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator * (int alpha, const Vec<_Tp, cn>& a)\n{\n    return Vec<_Tp, cn>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator * (const Vec<_Tp, cn>& a, float alpha)\n{\n    return Vec<_Tp, cn>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator * (float alpha, const Vec<_Tp, cn>& a)\n{\n    return Vec<_Tp, cn>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator * (const Vec<_Tp, cn>& a, double alpha)\n{\n    return Vec<_Tp, cn>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator * (double alpha, const Vec<_Tp, cn>& a)\n{\n    return Vec<_Tp, cn>(a, alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator / (const Vec<_Tp, cn>& a, int alpha)\n{\n    return Vec<_Tp, cn>(a, 1./alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator / (const Vec<_Tp, cn>& a, float alpha)\n{\n    return Vec<_Tp, cn>(a, 1.f/alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator / (const Vec<_Tp, cn>& a, double alpha)\n{\n    return Vec<_Tp, cn>(a, 1./alpha, Matx_ScaleOp());\n}\n\ntemplate<typename _Tp, int cn> static inline\nVec<_Tp, cn> operator - (const Vec<_Tp, cn>& a)\n{\n    Vec<_Tp,cn> t;\n    for( int i = 0; i < cn; i++ ) t.val[i] = saturate_cast<_Tp>(-a.val[i]);\n    return t;\n}\n\ntemplate<typename _Tp> inline Vec<_Tp, 4> operator * (const Vec<_Tp, 4>& v1, const Vec<_Tp, 4>& v2)\n{\n    return Vec<_Tp, 4>(saturate_cast<_Tp>(v1[0]*v2[0] - v1[1]*v2[1] - v1[2]*v2[2] - v1[3]*v2[3]),\n                       saturate_cast<_Tp>(v1[0]*v2[1] + v1[1]*v2[0] + v1[2]*v2[3] - v1[3]*v2[2]),\n                       saturate_cast<_Tp>(v1[0]*v2[2] - v1[1]*v2[3] + v1[2]*v2[0] + v1[3]*v2[1]),\n                       saturate_cast<_Tp>(v1[0]*v2[3] + v1[1]*v2[2] - v1[2]*v2[1] + v1[3]*v2[0]));\n}\n\ntemplate<typename _Tp> inline Vec<_Tp, 4>& operator *= (Vec<_Tp, 4>& v1, const Vec<_Tp, 4>& v2)\n{\n    v1 = v1 * v2;\n    return v1;\n}\n\n//! @}\n\n} // cv\n\n#endif // __OPENCV_CORE_MATX_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/ocl.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the OpenCV Foundation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OPENCL_HPP__\n#define __OPENCV_OPENCL_HPP__\n\n#include \"opencv2/core.hpp\"\n\nnamespace cv { namespace ocl {\n\n//! @addtogroup core_opencl\n//! @{\n\nCV_EXPORTS_W bool haveOpenCL();\nCV_EXPORTS_W bool useOpenCL();\nCV_EXPORTS_W bool haveAmdBlas();\nCV_EXPORTS_W bool haveAmdFft();\nCV_EXPORTS_W void setUseOpenCL(bool flag);\nCV_EXPORTS_W void finish();\n\nCV_EXPORTS bool haveSVM();\n\nclass CV_EXPORTS Context;\nclass CV_EXPORTS Device;\nclass CV_EXPORTS Kernel;\nclass CV_EXPORTS Program;\nclass CV_EXPORTS ProgramSource;\nclass CV_EXPORTS Queue;\nclass CV_EXPORTS PlatformInfo;\nclass CV_EXPORTS Image2D;\n\nclass CV_EXPORTS Device\n{\npublic:\n    Device();\n    explicit Device(void* d);\n    Device(const Device& d);\n    Device& operator = (const Device& d);\n    ~Device();\n\n    void set(void* d);\n\n    enum\n    {\n        TYPE_DEFAULT     = (1 << 0),\n        TYPE_CPU         = (1 << 1),\n        TYPE_GPU         = (1 << 2),\n        TYPE_ACCELERATOR = (1 << 3),\n        TYPE_DGPU        = TYPE_GPU + (1 << 16),\n        TYPE_IGPU        = TYPE_GPU + (1 << 17),\n        TYPE_ALL         = 0xFFFFFFFF\n    };\n\n    String name() const;\n    String extensions() const;\n    String version() const;\n    String vendorName() const;\n    String OpenCL_C_Version() const;\n    String OpenCLVersion() const;\n    int deviceVersionMajor() const;\n    int deviceVersionMinor() const;\n    String driverVersion() const;\n    void* ptr() const;\n\n    int type() const;\n\n    int addressBits() const;\n    bool available() const;\n    bool compilerAvailable() const;\n    bool linkerAvailable() const;\n\n    enum\n    {\n        FP_DENORM=(1 << 0),\n        FP_INF_NAN=(1 << 1),\n        FP_ROUND_TO_NEAREST=(1 << 2),\n        FP_ROUND_TO_ZERO=(1 << 3),\n        FP_ROUND_TO_INF=(1 << 4),\n        FP_FMA=(1 << 5),\n        FP_SOFT_FLOAT=(1 << 6),\n        FP_CORRECTLY_ROUNDED_DIVIDE_SQRT=(1 << 7)\n    };\n    int doubleFPConfig() const;\n    int singleFPConfig() const;\n    int halfFPConfig() const;\n\n    bool endianLittle() const;\n    bool errorCorrectionSupport() const;\n\n    enum\n    {\n        EXEC_KERNEL=(1 << 0),\n        EXEC_NATIVE_KERNEL=(1 << 1)\n    };\n    int executionCapabilities() const;\n\n    size_t globalMemCacheSize() const;\n\n    enum\n    {\n        NO_CACHE=0,\n        READ_ONLY_CACHE=1,\n        READ_WRITE_CACHE=2\n    };\n    int globalMemCacheType() const;\n    int globalMemCacheLineSize() const;\n    size_t globalMemSize() const;\n\n    size_t localMemSize() const;\n    enum\n    {\n        NO_LOCAL_MEM=0,\n        LOCAL_IS_LOCAL=1,\n        LOCAL_IS_GLOBAL=2\n    };\n    int localMemType() const;\n    bool hostUnifiedMemory() const;\n\n    bool imageSupport() const;\n\n    bool imageFromBufferSupport() const;\n    uint imagePitchAlignment() const;\n    uint imageBaseAddressAlignment() const;\n\n    size_t image2DMaxWidth() const;\n    size_t image2DMaxHeight() const;\n\n    size_t image3DMaxWidth() const;\n    size_t image3DMaxHeight() const;\n    size_t image3DMaxDepth() const;\n\n    size_t imageMaxBufferSize() const;\n    size_t imageMaxArraySize() const;\n\n    enum\n    {\n        UNKNOWN_VENDOR=0,\n        VENDOR_AMD=1,\n        VENDOR_INTEL=2,\n        VENDOR_NVIDIA=3\n    };\n    int vendorID() const;\n    // FIXIT\n    // dev.isAMD() doesn't work for OpenCL CPU devices from AMD OpenCL platform.\n    // This method should use platform name instead of vendor name.\n    // After fix restore code in arithm.cpp: ocl_compare()\n    inline bool isAMD() const { return vendorID() == VENDOR_AMD; }\n    inline bool isIntel() const { return vendorID() == VENDOR_INTEL; }\n    inline bool isNVidia() const { return vendorID() == VENDOR_NVIDIA; }\n\n    int maxClockFrequency() const;\n    int maxComputeUnits() const;\n    int maxConstantArgs() const;\n    size_t maxConstantBufferSize() const;\n\n    size_t maxMemAllocSize() const;\n    size_t maxParameterSize() const;\n\n    int maxReadImageArgs() const;\n    int maxWriteImageArgs() const;\n    int maxSamplers() const;\n\n    size_t maxWorkGroupSize() const;\n    int maxWorkItemDims() const;\n    void maxWorkItemSizes(size_t*) const;\n\n    int memBaseAddrAlign() const;\n\n    int nativeVectorWidthChar() const;\n    int nativeVectorWidthShort() const;\n    int nativeVectorWidthInt() const;\n    int nativeVectorWidthLong() const;\n    int nativeVectorWidthFloat() const;\n    int nativeVectorWidthDouble() const;\n    int nativeVectorWidthHalf() const;\n\n    int preferredVectorWidthChar() const;\n    int preferredVectorWidthShort() const;\n    int preferredVectorWidthInt() const;\n    int preferredVectorWidthLong() const;\n    int preferredVectorWidthFloat() const;\n    int preferredVectorWidthDouble() const;\n    int preferredVectorWidthHalf() const;\n\n    size_t printfBufferSize() const;\n    size_t profilingTimerResolution() const;\n\n    static const Device& getDefault();\n\nprotected:\n    struct Impl;\n    Impl* p;\n};\n\n\nclass CV_EXPORTS Context\n{\npublic:\n    Context();\n    explicit Context(int dtype);\n    ~Context();\n    Context(const Context& c);\n    Context& operator = (const Context& c);\n\n    bool create();\n    bool create(int dtype);\n    size_t ndevices() const;\n    const Device& device(size_t idx) const;\n    Program getProg(const ProgramSource& prog,\n                    const String& buildopt, String& errmsg);\n\n    static Context& getDefault(bool initialize = true);\n    void* ptr() const;\n\n    friend void initializeContextFromHandle(Context& ctx, void* platform, void* context, void* device);\n\n    bool useSVM() const;\n    void setUseSVM(bool enabled);\n\n    struct Impl;\n    Impl* p;\n};\n\nclass CV_EXPORTS Platform\n{\npublic:\n    Platform();\n    ~Platform();\n    Platform(const Platform& p);\n    Platform& operator = (const Platform& p);\n\n    void* ptr() const;\n    static Platform& getDefault();\n\n    friend void initializeContextFromHandle(Context& ctx, void* platform, void* context, void* device);\nprotected:\n    struct Impl;\n    Impl* p;\n};\n\n// TODO Move to internal header\nvoid initializeContextFromHandle(Context& ctx, void* platform, void* context, void* device);\n\nclass CV_EXPORTS Queue\n{\npublic:\n    Queue();\n    explicit Queue(const Context& c, const Device& d=Device());\n    ~Queue();\n    Queue(const Queue& q);\n    Queue& operator = (const Queue& q);\n\n    bool create(const Context& c=Context(), const Device& d=Device());\n    void finish();\n    void* ptr() const;\n    static Queue& getDefault();\n\nprotected:\n    struct Impl;\n    Impl* p;\n};\n\n\nclass CV_EXPORTS KernelArg\n{\npublic:\n    enum { LOCAL=1, READ_ONLY=2, WRITE_ONLY=4, READ_WRITE=6, CONSTANT=8, PTR_ONLY = 16, NO_SIZE=256 };\n    KernelArg(int _flags, UMat* _m, int wscale=1, int iwscale=1, const void* _obj=0, size_t _sz=0);\n    KernelArg();\n\n    static KernelArg Local() { return KernelArg(LOCAL, 0); }\n    static KernelArg PtrWriteOnly(const UMat& m)\n    { return KernelArg(PTR_ONLY+WRITE_ONLY, (UMat*)&m); }\n    static KernelArg PtrReadOnly(const UMat& m)\n    { return KernelArg(PTR_ONLY+READ_ONLY, (UMat*)&m); }\n    static KernelArg PtrReadWrite(const UMat& m)\n    { return KernelArg(PTR_ONLY+READ_WRITE, (UMat*)&m); }\n    static KernelArg ReadWrite(const UMat& m, int wscale=1, int iwscale=1)\n    { return KernelArg(READ_WRITE, (UMat*)&m, wscale, iwscale); }\n    static KernelArg ReadWriteNoSize(const UMat& m, int wscale=1, int iwscale=1)\n    { return KernelArg(READ_WRITE+NO_SIZE, (UMat*)&m, wscale, iwscale); }\n    static KernelArg ReadOnly(const UMat& m, int wscale=1, int iwscale=1)\n    { return KernelArg(READ_ONLY, (UMat*)&m, wscale, iwscale); }\n    static KernelArg WriteOnly(const UMat& m, int wscale=1, int iwscale=1)\n    { return KernelArg(WRITE_ONLY, (UMat*)&m, wscale, iwscale); }\n    static KernelArg ReadOnlyNoSize(const UMat& m, int wscale=1, int iwscale=1)\n    { return KernelArg(READ_ONLY+NO_SIZE, (UMat*)&m, wscale, iwscale); }\n    static KernelArg WriteOnlyNoSize(const UMat& m, int wscale=1, int iwscale=1)\n    { return KernelArg(WRITE_ONLY+NO_SIZE, (UMat*)&m, wscale, iwscale); }\n    static KernelArg Constant(const Mat& m);\n    template<typename _Tp> static KernelArg Constant(const _Tp* arr, size_t n)\n    { return KernelArg(CONSTANT, 0, 1, 1, (void*)arr, n); }\n\n    int flags;\n    UMat* m;\n    const void* obj;\n    size_t sz;\n    int wscale, iwscale;\n};\n\n\nclass CV_EXPORTS Kernel\n{\npublic:\n    Kernel();\n    Kernel(const char* kname, const Program& prog);\n    Kernel(const char* kname, const ProgramSource& prog,\n           const String& buildopts = String(), String* errmsg=0);\n    ~Kernel();\n    Kernel(const Kernel& k);\n    Kernel& operator = (const Kernel& k);\n\n    bool empty() const;\n    bool create(const char* kname, const Program& prog);\n    bool create(const char* kname, const ProgramSource& prog,\n                const String& buildopts, String* errmsg=0);\n\n    int set(int i, const void* value, size_t sz);\n    int set(int i, const Image2D& image2D);\n    int set(int i, const UMat& m);\n    int set(int i, const KernelArg& arg);\n    template<typename _Tp> int set(int i, const _Tp& value)\n    { return set(i, &value, sizeof(value)); }\n\n    template<typename _Tp0>\n    Kernel& args(const _Tp0& a0)\n    {\n        set(0, a0); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1)\n    {\n        int i = set(0, a0); set(i, a1); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2)\n    {\n        int i = set(0, a0); i = set(i, a1); set(i, a2); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2, const _Tp3& a3)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2); i = set(i, a3); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3, typename _Tp4>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2,\n                 const _Tp3& a3, const _Tp4& a4)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2);\n        i = set(i, a3); set(i, a4); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2,\n             typename _Tp3, typename _Tp4, typename _Tp5>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2,\n                 const _Tp3& a3, const _Tp4& a4, const _Tp5& a5)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2);\n        i = set(i, a3); i = set(i, a4); set(i, a5); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,\n             typename _Tp4, typename _Tp5, typename _Tp6>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2, const _Tp3& a3,\n                 const _Tp4& a4, const _Tp5& a5, const _Tp6& a6)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2); i = set(i, a3);\n        i = set(i, a4); i = set(i, a5); set(i, a6); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,\n             typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2, const _Tp3& a3,\n                 const _Tp4& a4, const _Tp5& a5, const _Tp6& a6, const _Tp7& a7)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2); i = set(i, a3);\n        i = set(i, a4); i = set(i, a5); i = set(i, a6); set(i, a7); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3, typename _Tp4,\n             typename _Tp5, typename _Tp6, typename _Tp7, typename _Tp8>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2, const _Tp3& a3,\n                 const _Tp4& a4, const _Tp5& a5, const _Tp6& a6, const _Tp7& a7,\n                 const _Tp8& a8)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2); i = set(i, a3); i = set(i, a4);\n        i = set(i, a5); i = set(i, a6); i = set(i, a7); set(i, a8); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3, typename _Tp4,\n             typename _Tp5, typename _Tp6, typename _Tp7, typename _Tp8, typename _Tp9>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2, const _Tp3& a3,\n                 const _Tp4& a4, const _Tp5& a5, const _Tp6& a6, const _Tp7& a7,\n                 const _Tp8& a8, const _Tp9& a9)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2); i = set(i, a3); i = set(i, a4); i = set(i, a5);\n        i = set(i, a6); i = set(i, a7); i = set(i, a8); set(i, a9); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,\n             typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,\n             typename _Tp8, typename _Tp9, typename _Tp10>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2, const _Tp3& a3,\n                 const _Tp4& a4, const _Tp5& a5, const _Tp6& a6, const _Tp7& a7,\n                 const _Tp8& a8, const _Tp9& a9, const _Tp10& a10)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2); i = set(i, a3); i = set(i, a4); i = set(i, a5);\n        i = set(i, a6); i = set(i, a7); i = set(i, a8); i = set(i, a9); set(i, a10); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,\n             typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,\n             typename _Tp8, typename _Tp9, typename _Tp10, typename _Tp11>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2, const _Tp3& a3,\n                 const _Tp4& a4, const _Tp5& a5, const _Tp6& a6, const _Tp7& a7,\n                 const _Tp8& a8, const _Tp9& a9, const _Tp10& a10, const _Tp11& a11)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2); i = set(i, a3); i = set(i, a4); i = set(i, a5);\n        i = set(i, a6); i = set(i, a7); i = set(i, a8); i = set(i, a9); i = set(i, a10); set(i, a11); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,\n             typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,\n             typename _Tp8, typename _Tp9, typename _Tp10, typename _Tp11, typename _Tp12>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2, const _Tp3& a3,\n                 const _Tp4& a4, const _Tp5& a5, const _Tp6& a6, const _Tp7& a7,\n                 const _Tp8& a8, const _Tp9& a9, const _Tp10& a10, const _Tp11& a11,\n                 const _Tp12& a12)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2); i = set(i, a3); i = set(i, a4); i = set(i, a5);\n        i = set(i, a6); i = set(i, a7); i = set(i, a8); i = set(i, a9); i = set(i, a10); i = set(i, a11);\n        set(i, a12); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,\n             typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,\n             typename _Tp8, typename _Tp9, typename _Tp10, typename _Tp11, typename _Tp12,\n             typename _Tp13>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2, const _Tp3& a3,\n                 const _Tp4& a4, const _Tp5& a5, const _Tp6& a6, const _Tp7& a7,\n                 const _Tp8& a8, const _Tp9& a9, const _Tp10& a10, const _Tp11& a11,\n                 const _Tp12& a12, const _Tp13& a13)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2); i = set(i, a3); i = set(i, a4); i = set(i, a5);\n        i = set(i, a6); i = set(i, a7); i = set(i, a8); i = set(i, a9); i = set(i, a10); i = set(i, a11);\n        i = set(i, a12); set(i, a13); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,\n             typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,\n             typename _Tp8, typename _Tp9, typename _Tp10, typename _Tp11, typename _Tp12,\n             typename _Tp13, typename _Tp14>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2, const _Tp3& a3,\n                 const _Tp4& a4, const _Tp5& a5, const _Tp6& a6, const _Tp7& a7,\n                 const _Tp8& a8, const _Tp9& a9, const _Tp10& a10, const _Tp11& a11,\n                 const _Tp12& a12, const _Tp13& a13, const _Tp14& a14)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2); i = set(i, a3); i = set(i, a4); i = set(i, a5);\n        i = set(i, a6); i = set(i, a7); i = set(i, a8); i = set(i, a9); i = set(i, a10); i = set(i, a11);\n        i = set(i, a12); i = set(i, a13); set(i, a14); return *this;\n    }\n\n    template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,\n             typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,\n             typename _Tp8, typename _Tp9, typename _Tp10, typename _Tp11, typename _Tp12,\n             typename _Tp13, typename _Tp14, typename _Tp15>\n    Kernel& args(const _Tp0& a0, const _Tp1& a1, const _Tp2& a2, const _Tp3& a3,\n                 const _Tp4& a4, const _Tp5& a5, const _Tp6& a6, const _Tp7& a7,\n                 const _Tp8& a8, const _Tp9& a9, const _Tp10& a10, const _Tp11& a11,\n                 const _Tp12& a12, const _Tp13& a13, const _Tp14& a14, const _Tp15& a15)\n    {\n        int i = set(0, a0); i = set(i, a1); i = set(i, a2); i = set(i, a3); i = set(i, a4); i = set(i, a5);\n        i = set(i, a6); i = set(i, a7); i = set(i, a8); i = set(i, a9); i = set(i, a10); i = set(i, a11);\n        i = set(i, a12); i = set(i, a13); i = set(i, a14); set(i, a15); return *this;\n    }\n\n    bool run(int dims, size_t globalsize[],\n             size_t localsize[], bool sync, const Queue& q=Queue());\n    bool runTask(bool sync, const Queue& q=Queue());\n\n    size_t workGroupSize() const;\n    size_t preferedWorkGroupSizeMultiple() const;\n    bool compileWorkGroupSize(size_t wsz[]) const;\n    size_t localMemSize() const;\n\n    void* ptr() const;\n    struct Impl;\n\nprotected:\n    Impl* p;\n};\n\nclass CV_EXPORTS Program\n{\npublic:\n    Program();\n    Program(const ProgramSource& src,\n            const String& buildflags, String& errmsg);\n    explicit Program(const String& buf);\n    Program(const Program& prog);\n\n    Program& operator = (const Program& prog);\n    ~Program();\n\n    bool create(const ProgramSource& src,\n                const String& buildflags, String& errmsg);\n    bool read(const String& buf, const String& buildflags);\n    bool write(String& buf) const;\n\n    const ProgramSource& source() const;\n    void* ptr() const;\n\n    String getPrefix() const;\n    static String getPrefix(const String& buildflags);\n\nprotected:\n    struct Impl;\n    Impl* p;\n};\n\n\nclass CV_EXPORTS ProgramSource\n{\npublic:\n    typedef uint64 hash_t;\n\n    ProgramSource();\n    explicit ProgramSource(const String& prog);\n    explicit ProgramSource(const char* prog);\n    ~ProgramSource();\n    ProgramSource(const ProgramSource& prog);\n    ProgramSource& operator = (const ProgramSource& prog);\n\n    const String& source() const;\n    hash_t hash() const;\n\nprotected:\n    struct Impl;\n    Impl* p;\n};\n\nclass CV_EXPORTS PlatformInfo\n{\npublic:\n    PlatformInfo();\n    explicit PlatformInfo(void* id);\n    ~PlatformInfo();\n\n    PlatformInfo(const PlatformInfo& i);\n    PlatformInfo& operator =(const PlatformInfo& i);\n\n    String name() const;\n    String vendor() const;\n    String version() const;\n    int deviceNumber() const;\n    void getDevice(Device& device, int d) const;\n\nprotected:\n    struct Impl;\n    Impl* p;\n};\n\nCV_EXPORTS const char* convertTypeStr(int sdepth, int ddepth, int cn, char* buf);\nCV_EXPORTS const char* typeToStr(int t);\nCV_EXPORTS const char* memopTypeToStr(int t);\nCV_EXPORTS const char* vecopTypeToStr(int t);\nCV_EXPORTS String kernelToStr(InputArray _kernel, int ddepth = -1, const char * name = NULL);\nCV_EXPORTS void getPlatfomsInfo(std::vector<PlatformInfo>& platform_info);\n\n\nenum OclVectorStrategy\n{\n    // all matrices have its own vector width\n    OCL_VECTOR_OWN = 0,\n    // all matrices have maximal vector width among all matrices\n    // (useful for cases when matrices have different data types)\n    OCL_VECTOR_MAX = 1,\n\n    // default strategy\n    OCL_VECTOR_DEFAULT = OCL_VECTOR_OWN\n};\n\nCV_EXPORTS int predictOptimalVectorWidth(InputArray src1, InputArray src2 = noArray(), InputArray src3 = noArray(),\n                                         InputArray src4 = noArray(), InputArray src5 = noArray(), InputArray src6 = noArray(),\n                                         InputArray src7 = noArray(), InputArray src8 = noArray(), InputArray src9 = noArray(),\n                                         OclVectorStrategy strat = OCL_VECTOR_DEFAULT);\n\nCV_EXPORTS int checkOptimalVectorWidth(const int *vectorWidths,\n                                       InputArray src1, InputArray src2 = noArray(), InputArray src3 = noArray(),\n                                       InputArray src4 = noArray(), InputArray src5 = noArray(), InputArray src6 = noArray(),\n                                       InputArray src7 = noArray(), InputArray src8 = noArray(), InputArray src9 = noArray(),\n                                       OclVectorStrategy strat = OCL_VECTOR_DEFAULT);\n\n// with OCL_VECTOR_MAX strategy\nCV_EXPORTS int predictOptimalVectorWidthMax(InputArray src1, InputArray src2 = noArray(), InputArray src3 = noArray(),\n                                            InputArray src4 = noArray(), InputArray src5 = noArray(), InputArray src6 = noArray(),\n                                            InputArray src7 = noArray(), InputArray src8 = noArray(), InputArray src9 = noArray());\n\nCV_EXPORTS void buildOptionsAddMatrixDescription(String& buildOptions, const String& name, InputArray _m);\n\nclass CV_EXPORTS Image2D\n{\npublic:\n    Image2D();\n\n    // src:     The UMat from which to get image properties and data\n    // norm:    Flag to enable the use of normalized channel data types\n    // alias:   Flag indicating that the image should alias the src UMat.\n    //          If true, changes to the image or src will be reflected in\n    //          both objects.\n    explicit Image2D(const UMat &src, bool norm = false, bool alias = false);\n    Image2D(const Image2D & i);\n    ~Image2D();\n\n    Image2D & operator = (const Image2D & i);\n\n    // Indicates if creating an aliased image should succeed.  Depends on the\n    // underlying platform and the dimensions of the UMat.\n    static bool canCreateAlias(const UMat &u);\n\n    // Indicates if the image format is supported.\n    static bool isFormatSupported(int depth, int cn, bool norm);\n\n    void* ptr() const;\nprotected:\n    struct Impl;\n    Impl* p;\n};\n\n\nCV_EXPORTS MatAllocator* getOpenCLAllocator();\n\n\n#ifdef __OPENCV_BUILD\nnamespace internal {\n\nCV_EXPORTS bool isPerformanceCheckBypassed();\n#define OCL_PERFORMANCE_CHECK(condition) (cv::ocl::internal::isPerformanceCheckBypassed() || (condition))\n\nCV_EXPORTS bool isCLBuffer(UMat& u);\n\n} // namespace internal\n#endif\n\n//! @}\n\n}}\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/ocl_genbase.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the OpenCV Foundation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OPENCL_GENBASE_HPP__\n#define __OPENCV_OPENCL_GENBASE_HPP__\n\nnamespace cv\n{\nnamespace ocl\n{\n\n//! @cond IGNORED\n\nstruct ProgramEntry\n{\n    const char* name;\n    const char* programStr;\n    const char* programHash;\n};\n\n//! @endcond\n\n}\n}\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/opengl.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_OPENGL_HPP__\n#define __OPENCV_CORE_OPENGL_HPP__\n\n#ifndef __cplusplus\n#  error opengl.hpp header must be compiled as C++\n#endif\n\n#include \"opencv2/core.hpp\"\n\nnamespace cv { namespace ogl {\n\n/** @addtogroup core_opengl\nThis section describes OpenGL interoperability.\n\nTo enable OpenGL support, configure OpenCV using CMake with WITH_OPENGL=ON . Currently OpenGL is\nsupported only with WIN32, GTK and Qt backends on Windows and Linux (MacOS and Android are not\nsupported). For GTK backend gtkglext-1.0 library is required.\n\nTo use OpenGL functionality you should first create OpenGL context (window or frame buffer). You can\ndo this with namedWindow function or with other OpenGL toolkit (GLUT, for example).\n*/\n//! @{\n\n/////////////////// OpenGL Objects ///////////////////\n\n/** @brief Smart pointer for OpenGL buffer object with reference counting.\n\nBuffer Objects are OpenGL objects that store an array of unformatted memory allocated by the OpenGL\ncontext. These can be used to store vertex data, pixel data retrieved from images or the\nframebuffer, and a variety of other things.\n\nogl::Buffer has interface similar with Mat interface and represents 2D array memory.\n\nogl::Buffer supports memory transfers between host and device and also can be mapped to CUDA memory.\n */\nclass CV_EXPORTS Buffer\n{\npublic:\n    /** @brief The target defines how you intend to use the buffer object.\n    */\n    enum Target\n    {\n        ARRAY_BUFFER         = 0x8892, //!< The buffer will be used as a source for vertex data\n        ELEMENT_ARRAY_BUFFER = 0x8893, //!< The buffer will be used for indices (in glDrawElements, for example)\n        PIXEL_PACK_BUFFER    = 0x88EB, //!< The buffer will be used for reading from OpenGL textures\n        PIXEL_UNPACK_BUFFER  = 0x88EC  //!< The buffer will be used for writing to OpenGL textures\n    };\n\n    enum Access\n    {\n        READ_ONLY  = 0x88B8,\n        WRITE_ONLY = 0x88B9,\n        READ_WRITE = 0x88BA\n    };\n\n    /** @brief The constructors.\n\n    Creates empty ogl::Buffer object, creates ogl::Buffer object from existed buffer ( abufId\n    parameter), allocates memory for ogl::Buffer object or copies from host/device memory.\n     */\n    Buffer();\n\n    /** @overload\n    @param arows Number of rows in a 2D array.\n    @param acols Number of columns in a 2D array.\n    @param atype Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details.\n    @param abufId Buffer object name.\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n    */\n    Buffer(int arows, int acols, int atype, unsigned int abufId, bool autoRelease = false);\n\n    /** @overload\n    @param asize 2D array size.\n    @param atype Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details.\n    @param abufId Buffer object name.\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n    */\n    Buffer(Size asize, int atype, unsigned int abufId, bool autoRelease = false);\n\n    /** @overload\n    @param arows Number of rows in a 2D array.\n    @param acols Number of columns in a 2D array.\n    @param atype Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details.\n    @param target Buffer usage. See cv::ogl::Buffer::Target .\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n    */\n    Buffer(int arows, int acols, int atype, Target target = ARRAY_BUFFER, bool autoRelease = false);\n\n    /** @overload\n    @param asize 2D array size.\n    @param atype Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details.\n    @param target Buffer usage. See cv::ogl::Buffer::Target .\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n    */\n    Buffer(Size asize, int atype, Target target = ARRAY_BUFFER, bool autoRelease = false);\n\n    /** @overload\n    @param arr Input array (host or device memory, it can be Mat , cuda::GpuMat or std::vector ).\n    @param target Buffer usage. See cv::ogl::Buffer::Target .\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n    */\n    explicit Buffer(InputArray arr, Target target = ARRAY_BUFFER, bool autoRelease = false);\n\n    /** @brief Allocates memory for ogl::Buffer object.\n\n    @param arows Number of rows in a 2D array.\n    @param acols Number of columns in a 2D array.\n    @param atype Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details.\n    @param target Buffer usage. See cv::ogl::Buffer::Target .\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n     */\n    void create(int arows, int acols, int atype, Target target = ARRAY_BUFFER, bool autoRelease = false);\n\n    /** @overload\n    @param asize 2D array size.\n    @param atype Array type ( CV_8UC1, ..., CV_64FC4 ). See Mat for details.\n    @param target Buffer usage. See cv::ogl::Buffer::Target .\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n    */\n    void create(Size asize, int atype, Target target = ARRAY_BUFFER, bool autoRelease = false);\n\n    /** @brief Decrements the reference counter and destroys the buffer object if needed.\n\n    The function will call setAutoRelease(true) .\n     */\n    void release();\n\n    /** @brief Sets auto release mode.\n\n    The lifetime of the OpenGL object is tied to the lifetime of the context. If OpenGL context was\n    bound to a window it could be released at any time (user can close a window). If object's destructor\n    is called after destruction of the context it will cause an error. Thus ogl::Buffer doesn't destroy\n    OpenGL object in destructor by default (all OpenGL resources will be released with OpenGL context).\n    This function can force ogl::Buffer destructor to destroy OpenGL object.\n    @param flag Auto release mode (if true, release will be called in object's destructor).\n     */\n    void setAutoRelease(bool flag);\n\n    /** @brief Copies from host/device memory to OpenGL buffer.\n    @param arr Input array (host or device memory, it can be Mat , cuda::GpuMat or std::vector ).\n    @param target Buffer usage. See cv::ogl::Buffer::Target .\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n     */\n    void copyFrom(InputArray arr, Target target = ARRAY_BUFFER, bool autoRelease = false);\n\n    /** @overload */\n    void copyFrom(InputArray arr, cuda::Stream& stream, Target target = ARRAY_BUFFER, bool autoRelease = false);\n\n    /** @brief Copies from OpenGL buffer to host/device memory or another OpenGL buffer object.\n\n    @param arr Destination array (host or device memory, can be Mat , cuda::GpuMat , std::vector or\n    ogl::Buffer ).\n     */\n    void copyTo(OutputArray arr) const;\n\n    /** @overload */\n    void copyTo(OutputArray arr, cuda::Stream& stream) const;\n\n    /** @brief Creates a full copy of the buffer object and the underlying data.\n\n    @param target Buffer usage for destination buffer.\n    @param autoRelease Auto release mode for destination buffer.\n     */\n    Buffer clone(Target target = ARRAY_BUFFER, bool autoRelease = false) const;\n\n    /** @brief Binds OpenGL buffer to the specified buffer binding point.\n\n    @param target Binding point. See cv::ogl::Buffer::Target .\n     */\n    void bind(Target target) const;\n\n    /** @brief Unbind any buffers from the specified binding point.\n\n    @param target Binding point. See cv::ogl::Buffer::Target .\n     */\n    static void unbind(Target target);\n\n    /** @brief Maps OpenGL buffer to host memory.\n\n    mapHost maps to the client's address space the entire data store of the buffer object. The data can\n    then be directly read and/or written relative to the returned pointer, depending on the specified\n    access policy.\n\n    A mapped data store must be unmapped with ogl::Buffer::unmapHost before its buffer object is used.\n\n    This operation can lead to memory transfers between host and device.\n\n    Only one buffer object can be mapped at a time.\n    @param access Access policy, indicating whether it will be possible to read from, write to, or both\n    read from and write to the buffer object's mapped data store. The symbolic constant must be\n    ogl::Buffer::READ_ONLY , ogl::Buffer::WRITE_ONLY or ogl::Buffer::READ_WRITE .\n     */\n    Mat mapHost(Access access);\n\n    /** @brief Unmaps OpenGL buffer.\n    */\n    void unmapHost();\n\n    //! map to device memory (blocking)\n    cuda::GpuMat mapDevice();\n    void unmapDevice();\n\n    /** @brief Maps OpenGL buffer to CUDA device memory.\n\n    This operatation doesn't copy data. Several buffer objects can be mapped to CUDA memory at a time.\n\n    A mapped data store must be unmapped with ogl::Buffer::unmapDevice before its buffer object is used.\n     */\n    cuda::GpuMat mapDevice(cuda::Stream& stream);\n\n    /** @brief Unmaps OpenGL buffer.\n    */\n    void unmapDevice(cuda::Stream& stream);\n\n    int rows() const;\n    int cols() const;\n    Size size() const;\n    bool empty() const;\n\n    int type() const;\n    int depth() const;\n    int channels() const;\n    int elemSize() const;\n    int elemSize1() const;\n\n    //! get OpenGL opject id\n    unsigned int bufId() const;\n\n    class Impl;\n\nprivate:\n    Ptr<Impl> impl_;\n    int rows_;\n    int cols_;\n    int type_;\n};\n\n/** @brief Smart pointer for OpenGL 2D texture memory with reference counting.\n */\nclass CV_EXPORTS Texture2D\n{\npublic:\n    /** @brief An Image Format describes the way that the images in Textures store their data.\n    */\n    enum Format\n    {\n        NONE            = 0,\n        DEPTH_COMPONENT = 0x1902, //!< Depth\n        RGB             = 0x1907, //!< Red, Green, Blue\n        RGBA            = 0x1908  //!< Red, Green, Blue, Alpha\n    };\n\n    /** @brief The constructors.\n\n    Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from\n    host/device memory.\n     */\n    Texture2D();\n\n    /** @overload */\n    Texture2D(int arows, int acols, Format aformat, unsigned int atexId, bool autoRelease = false);\n\n    /** @overload */\n    Texture2D(Size asize, Format aformat, unsigned int atexId, bool autoRelease = false);\n\n    /** @overload\n    @param arows Number of rows.\n    @param acols Number of columns.\n    @param aformat Image format. See cv::ogl::Texture2D::Format .\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n    */\n    Texture2D(int arows, int acols, Format aformat, bool autoRelease = false);\n\n    /** @overload\n    @param asize 2D array size.\n    @param aformat Image format. See cv::ogl::Texture2D::Format .\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n    */\n    Texture2D(Size asize, Format aformat, bool autoRelease = false);\n\n    /** @overload\n    @param arr Input array (host or device memory, it can be Mat , cuda::GpuMat or ogl::Buffer ).\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n    */\n    explicit Texture2D(InputArray arr, bool autoRelease = false);\n\n    /** @brief Allocates memory for ogl::Texture2D object.\n\n    @param arows Number of rows.\n    @param acols Number of columns.\n    @param aformat Image format. See cv::ogl::Texture2D::Format .\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n     */\n    void create(int arows, int acols, Format aformat, bool autoRelease = false);\n    /** @overload\n    @param asize 2D array size.\n    @param aformat Image format. See cv::ogl::Texture2D::Format .\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n    */\n    void create(Size asize, Format aformat, bool autoRelease = false);\n\n    /** @brief Decrements the reference counter and destroys the texture object if needed.\n\n    The function will call setAutoRelease(true) .\n     */\n    void release();\n\n    /** @brief Sets auto release mode.\n\n    @param flag Auto release mode (if true, release will be called in object's destructor).\n\n    The lifetime of the OpenGL object is tied to the lifetime of the context. If OpenGL context was\n    bound to a window it could be released at any time (user can close a window). If object's destructor\n    is called after destruction of the context it will cause an error. Thus ogl::Texture2D doesn't\n    destroy OpenGL object in destructor by default (all OpenGL resources will be released with OpenGL\n    context). This function can force ogl::Texture2D destructor to destroy OpenGL object.\n     */\n    void setAutoRelease(bool flag);\n\n    /** @brief Copies from host/device memory to OpenGL texture.\n\n    @param arr Input array (host or device memory, it can be Mat , cuda::GpuMat or ogl::Buffer ).\n    @param autoRelease Auto release mode (if true, release will be called in object's destructor).\n     */\n    void copyFrom(InputArray arr, bool autoRelease = false);\n\n    /** @brief Copies from OpenGL texture to host/device memory or another OpenGL texture object.\n\n    @param arr Destination array (host or device memory, can be Mat , cuda::GpuMat , ogl::Buffer or\n    ogl::Texture2D ).\n    @param ddepth Destination depth.\n    @param autoRelease Auto release mode for destination buffer (if arr is OpenGL buffer or texture).\n     */\n    void copyTo(OutputArray arr, int ddepth = CV_32F, bool autoRelease = false) const;\n\n    /** @brief Binds texture to current active texture unit for GL_TEXTURE_2D target.\n    */\n    void bind() const;\n\n    int rows() const;\n    int cols() const;\n    Size size() const;\n    bool empty() const;\n\n    Format format() const;\n\n    //! get OpenGL opject id\n    unsigned int texId() const;\n\n    class Impl;\n\nprivate:\n    Ptr<Impl> impl_;\n    int rows_;\n    int cols_;\n    Format format_;\n};\n\n/** @brief Wrapper for OpenGL Client-Side Vertex arrays.\n\nogl::Arrays stores vertex data in ogl::Buffer objects.\n */\nclass CV_EXPORTS Arrays\n{\npublic:\n    /** @brief Default constructor\n     */\n    Arrays();\n\n    /** @brief Sets an array of vertex coordinates.\n    @param vertex array with vertex coordinates, can be both host and device memory.\n    */\n    void setVertexArray(InputArray vertex);\n\n    /** @brief Resets vertex coordinates.\n    */\n    void resetVertexArray();\n\n    /** @brief Sets an array of vertex colors.\n    @param color array with vertex colors, can be both host and device memory.\n     */\n    void setColorArray(InputArray color);\n\n    /** @brief Resets vertex colors.\n    */\n    void resetColorArray();\n\n    /** @brief Sets an array of vertex normals.\n    @param normal array with vertex normals, can be both host and device memory.\n     */\n    void setNormalArray(InputArray normal);\n\n    /** @brief Resets vertex normals.\n    */\n    void resetNormalArray();\n\n    /** @brief Sets an array of vertex texture coordinates.\n    @param texCoord array with vertex texture coordinates, can be both host and device memory.\n     */\n    void setTexCoordArray(InputArray texCoord);\n\n    /** @brief Resets vertex texture coordinates.\n    */\n    void resetTexCoordArray();\n\n    /** @brief Releases all inner buffers.\n    */\n    void release();\n\n    /** @brief Sets auto release mode all inner buffers.\n    @param flag Auto release mode.\n     */\n    void setAutoRelease(bool flag);\n\n    /** @brief Binds all vertex arrays.\n    */\n    void bind() const;\n\n    /** @brief Returns the vertex count.\n    */\n    int size() const;\n    bool empty() const;\n\nprivate:\n    int size_;\n    Buffer vertex_;\n    Buffer color_;\n    Buffer normal_;\n    Buffer texCoord_;\n};\n\n/////////////////// Render Functions ///////////////////\n\n//! render mode\nenum RenderModes {\n    POINTS         = 0x0000,\n    LINES          = 0x0001,\n    LINE_LOOP      = 0x0002,\n    LINE_STRIP     = 0x0003,\n    TRIANGLES      = 0x0004,\n    TRIANGLE_STRIP = 0x0005,\n    TRIANGLE_FAN   = 0x0006,\n    QUADS          = 0x0007,\n    QUAD_STRIP     = 0x0008,\n    POLYGON        = 0x0009\n};\n\n/** @brief Render OpenGL texture or primitives.\n@param tex Texture to draw.\n@param wndRect Region of window, where to draw a texture (normalized coordinates).\n@param texRect Region of texture to draw (normalized coordinates).\n */\nCV_EXPORTS void render(const Texture2D& tex,\n    Rect_<double> wndRect = Rect_<double>(0.0, 0.0, 1.0, 1.0),\n    Rect_<double> texRect = Rect_<double>(0.0, 0.0, 1.0, 1.0));\n\n/** @overload\n@param arr Array of privitives vertices.\n@param mode Render mode. One of cv::ogl::RenderModes\n@param color Color for all vertices. Will be used if arr doesn't contain color array.\n*/\nCV_EXPORTS void render(const Arrays& arr, int mode = POINTS, Scalar color = Scalar::all(255));\n\n/** @overload\n@param arr Array of privitives vertices.\n@param indices Array of vertices indices (host or device memory).\n@param mode Render mode. One of cv::ogl::RenderModes\n@param color Color for all vertices. Will be used if arr doesn't contain color array.\n*/\nCV_EXPORTS void render(const Arrays& arr, InputArray indices, int mode = POINTS, Scalar color = Scalar::all(255));\n\n//! @} core_opengl\n\n}} // namespace cv::ogl\n\nnamespace cv { namespace cuda {\n\n//! @addtogroup cuda\n//! @{\n\n/** @brief Sets a CUDA device and initializes it for the current thread with OpenGL interoperability.\n\nThis function should be explicitly called after OpenGL context creation and before any CUDA calls.\n@param device System index of a CUDA device starting with 0.\n@ingroup core_opengl\n */\nCV_EXPORTS void setGlDevice(int device = 0);\n\n//! @}\n\n}}\n\n//! @cond IGNORED\n\n////////////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////////////\n\ninline\ncv::ogl::Buffer::Buffer(int arows, int acols, int atype, Target target, bool autoRelease) : rows_(0), cols_(0), type_(0)\n{\n    create(arows, acols, atype, target, autoRelease);\n}\n\ninline\ncv::ogl::Buffer::Buffer(Size asize, int atype, Target target, bool autoRelease) : rows_(0), cols_(0), type_(0)\n{\n    create(asize, atype, target, autoRelease);\n}\n\ninline\nvoid cv::ogl::Buffer::create(Size asize, int atype, Target target, bool autoRelease)\n{\n    create(asize.height, asize.width, atype, target, autoRelease);\n}\n\ninline\nint cv::ogl::Buffer::rows() const\n{\n    return rows_;\n}\n\ninline\nint cv::ogl::Buffer::cols() const\n{\n    return cols_;\n}\n\ninline\ncv::Size cv::ogl::Buffer::size() const\n{\n    return Size(cols_, rows_);\n}\n\ninline\nbool cv::ogl::Buffer::empty() const\n{\n    return rows_ == 0 || cols_ == 0;\n}\n\ninline\nint cv::ogl::Buffer::type() const\n{\n    return type_;\n}\n\ninline\nint cv::ogl::Buffer::depth() const\n{\n    return CV_MAT_DEPTH(type_);\n}\n\ninline\nint cv::ogl::Buffer::channels() const\n{\n    return CV_MAT_CN(type_);\n}\n\ninline\nint cv::ogl::Buffer::elemSize() const\n{\n    return CV_ELEM_SIZE(type_);\n}\n\ninline\nint cv::ogl::Buffer::elemSize1() const\n{\n    return CV_ELEM_SIZE1(type_);\n}\n\n///////\n\ninline\ncv::ogl::Texture2D::Texture2D(int arows, int acols, Format aformat, bool autoRelease) : rows_(0), cols_(0), format_(NONE)\n{\n    create(arows, acols, aformat, autoRelease);\n}\n\ninline\ncv::ogl::Texture2D::Texture2D(Size asize, Format aformat, bool autoRelease) : rows_(0), cols_(0), format_(NONE)\n{\n    create(asize, aformat, autoRelease);\n}\n\ninline\nvoid cv::ogl::Texture2D::create(Size asize, Format aformat, bool autoRelease)\n{\n    create(asize.height, asize.width, aformat, autoRelease);\n}\n\ninline\nint cv::ogl::Texture2D::rows() const\n{\n    return rows_;\n}\n\ninline\nint cv::ogl::Texture2D::cols() const\n{\n    return cols_;\n}\n\ninline\ncv::Size cv::ogl::Texture2D::size() const\n{\n    return Size(cols_, rows_);\n}\n\ninline\nbool cv::ogl::Texture2D::empty() const\n{\n    return rows_ == 0 || cols_ == 0;\n}\n\ninline\ncv::ogl::Texture2D::Format cv::ogl::Texture2D::format() const\n{\n    return format_;\n}\n\n///////\n\ninline\ncv::ogl::Arrays::Arrays() : size_(0)\n{\n}\n\ninline\nint cv::ogl::Arrays::size() const\n{\n    return size_;\n}\n\ninline\nbool cv::ogl::Arrays::empty() const\n{\n    return size_ == 0;\n}\n\n//! @endcond\n\n#endif /* __OPENCV_CORE_OPENGL_HPP__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/operations.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_OPERATIONS_HPP__\n#define __OPENCV_CORE_OPERATIONS_HPP__\n\n#ifndef __cplusplus\n#  error operations.hpp header must be compiled as C++\n#endif\n\n#include <cstdio>\n\n//! @cond IGNORED\n\nnamespace cv\n{\n\n////////////////////////////// Matx methods depending on core API /////////////////////////////\n\nnamespace internal\n{\n\ntemplate<typename _Tp, int m> struct Matx_FastInvOp\n{\n    bool operator()(const Matx<_Tp, m, m>& a, Matx<_Tp, m, m>& b, int method) const\n    {\n        Matx<_Tp, m, m> temp = a;\n\n        // assume that b is all 0's on input => make it a unity matrix\n        for( int i = 0; i < m; i++ )\n            b(i, i) = (_Tp)1;\n\n        if( method == DECOMP_CHOLESKY )\n            return Cholesky(temp.val, m*sizeof(_Tp), m, b.val, m*sizeof(_Tp), m);\n\n        return LU(temp.val, m*sizeof(_Tp), m, b.val, m*sizeof(_Tp), m) != 0;\n    }\n};\n\ntemplate<typename _Tp> struct Matx_FastInvOp<_Tp, 2>\n{\n    bool operator()(const Matx<_Tp, 2, 2>& a, Matx<_Tp, 2, 2>& b, int) const\n    {\n        _Tp d = determinant(a);\n        if( d == 0 )\n            return false;\n        d = 1/d;\n        b(1,1) = a(0,0)*d;\n        b(0,0) = a(1,1)*d;\n        b(0,1) = -a(0,1)*d;\n        b(1,0) = -a(1,0)*d;\n        return true;\n    }\n};\n\ntemplate<typename _Tp> struct Matx_FastInvOp<_Tp, 3>\n{\n    bool operator()(const Matx<_Tp, 3, 3>& a, Matx<_Tp, 3, 3>& b, int) const\n    {\n        _Tp d = (_Tp)determinant(a);\n        if( d == 0 )\n            return false;\n        d = 1/d;\n        b(0,0) = (a(1,1) * a(2,2) - a(1,2) * a(2,1)) * d;\n        b(0,1) = (a(0,2) * a(2,1) - a(0,1) * a(2,2)) * d;\n        b(0,2) = (a(0,1) * a(1,2) - a(0,2) * a(1,1)) * d;\n\n        b(1,0) = (a(1,2) * a(2,0) - a(1,0) * a(2,2)) * d;\n        b(1,1) = (a(0,0) * a(2,2) - a(0,2) * a(2,0)) * d;\n        b(1,2) = (a(0,2) * a(1,0) - a(0,0) * a(1,2)) * d;\n\n        b(2,0) = (a(1,0) * a(2,1) - a(1,1) * a(2,0)) * d;\n        b(2,1) = (a(0,1) * a(2,0) - a(0,0) * a(2,1)) * d;\n        b(2,2) = (a(0,0) * a(1,1) - a(0,1) * a(1,0)) * d;\n        return true;\n    }\n};\n\n\ntemplate<typename _Tp, int m, int n> struct Matx_FastSolveOp\n{\n    bool operator()(const Matx<_Tp, m, m>& a, const Matx<_Tp, m, n>& b,\n                    Matx<_Tp, m, n>& x, int method) const\n    {\n        Matx<_Tp, m, m> temp = a;\n        x = b;\n        if( method == DECOMP_CHOLESKY )\n            return Cholesky(temp.val, m*sizeof(_Tp), m, x.val, n*sizeof(_Tp), n);\n\n        return LU(temp.val, m*sizeof(_Tp), m, x.val, n*sizeof(_Tp), n) != 0;\n    }\n};\n\ntemplate<typename _Tp> struct Matx_FastSolveOp<_Tp, 2, 1>\n{\n    bool operator()(const Matx<_Tp, 2, 2>& a, const Matx<_Tp, 2, 1>& b,\n                    Matx<_Tp, 2, 1>& x, int) const\n    {\n        _Tp d = determinant(a);\n        if( d == 0 )\n            return false;\n        d = 1/d;\n        x(0) = (b(0)*a(1,1) - b(1)*a(0,1))*d;\n        x(1) = (b(1)*a(0,0) - b(0)*a(1,0))*d;\n        return true;\n    }\n};\n\ntemplate<typename _Tp> struct Matx_FastSolveOp<_Tp, 3, 1>\n{\n    bool operator()(const Matx<_Tp, 3, 3>& a, const Matx<_Tp, 3, 1>& b,\n                    Matx<_Tp, 3, 1>& x, int) const\n    {\n        _Tp d = (_Tp)determinant(a);\n        if( d == 0 )\n            return false;\n        d = 1/d;\n        x(0) = d*(b(0)*(a(1,1)*a(2,2) - a(1,2)*a(2,1)) -\n                a(0,1)*(b(1)*a(2,2) - a(1,2)*b(2)) +\n                a(0,2)*(b(1)*a(2,1) - a(1,1)*b(2)));\n\n        x(1) = d*(a(0,0)*(b(1)*a(2,2) - a(1,2)*b(2)) -\n                b(0)*(a(1,0)*a(2,2) - a(1,2)*a(2,0)) +\n                a(0,2)*(a(1,0)*b(2) - b(1)*a(2,0)));\n\n        x(2) = d*(a(0,0)*(a(1,1)*b(2) - b(1)*a(2,1)) -\n                a(0,1)*(a(1,0)*b(2) - b(1)*a(2,0)) +\n                b(0)*(a(1,0)*a(2,1) - a(1,1)*a(2,0)));\n        return true;\n    }\n};\n\n} // internal\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n> Matx<_Tp,m,n>::randu(_Tp a, _Tp b)\n{\n    Matx<_Tp,m,n> M;\n    cv::randu(M, Scalar(a), Scalar(b));\n    return M;\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp,m,n> Matx<_Tp,m,n>::randn(_Tp a, _Tp b)\n{\n    Matx<_Tp,m,n> M;\n    cv::randn(M, Scalar(a), Scalar(b));\n    return M;\n}\n\ntemplate<typename _Tp, int m, int n> inline\nMatx<_Tp, n, m> Matx<_Tp, m, n>::inv(int method, bool *p_is_ok /*= NULL*/) const\n{\n    Matx<_Tp, n, m> b;\n    bool ok;\n    if( method == DECOMP_LU || method == DECOMP_CHOLESKY )\n        ok = cv::internal::Matx_FastInvOp<_Tp, m>()(*this, b, method);\n    else\n    {\n        Mat A(*this, false), B(b, false);\n        ok = (invert(A, B, method) != 0);\n    }\n    if( NULL != p_is_ok ) { *p_is_ok = ok; }\n    return ok ? b : Matx<_Tp, n, m>::zeros();\n}\n\ntemplate<typename _Tp, int m, int n> template<int l> inline\nMatx<_Tp, n, l> Matx<_Tp, m, n>::solve(const Matx<_Tp, m, l>& rhs, int method) const\n{\n    Matx<_Tp, n, l> x;\n    bool ok;\n    if( method == DECOMP_LU || method == DECOMP_CHOLESKY )\n        ok = cv::internal::Matx_FastSolveOp<_Tp, m, l>()(*this, rhs, x, method);\n    else\n    {\n        Mat A(*this, false), B(rhs, false), X(x, false);\n        ok = cv::solve(A, B, X, method);\n    }\n\n    return ok ? x : Matx<_Tp, n, l>::zeros();\n}\n\n\n\n////////////////////////// Augmenting algebraic & logical operations //////////////////////////\n\n#define CV_MAT_AUG_OPERATOR1(op, cvop, A, B) \\\n    static inline A& operator op (A& a, const B& b) { cvop; return a; }\n\n#define CV_MAT_AUG_OPERATOR(op, cvop, A, B)   \\\n    CV_MAT_AUG_OPERATOR1(op, cvop, A, B)      \\\n    CV_MAT_AUG_OPERATOR1(op, cvop, const A, B)\n\n#define CV_MAT_AUG_OPERATOR_T(op, cvop, A, B)                   \\\n    template<typename _Tp> CV_MAT_AUG_OPERATOR1(op, cvop, A, B) \\\n    template<typename _Tp> CV_MAT_AUG_OPERATOR1(op, cvop, const A, B)\n\nCV_MAT_AUG_OPERATOR  (+=, cv::add(a,b,a), Mat, Mat)\nCV_MAT_AUG_OPERATOR  (+=, cv::add(a,b,a), Mat, Scalar)\nCV_MAT_AUG_OPERATOR_T(+=, cv::add(a,b,a), Mat_<_Tp>, Mat)\nCV_MAT_AUG_OPERATOR_T(+=, cv::add(a,b,a), Mat_<_Tp>, Scalar)\nCV_MAT_AUG_OPERATOR_T(+=, cv::add(a,b,a), Mat_<_Tp>, Mat_<_Tp>)\n\nCV_MAT_AUG_OPERATOR  (-=, cv::subtract(a,b,a), Mat, Mat)\nCV_MAT_AUG_OPERATOR  (-=, cv::subtract(a,b,a), Mat, Scalar)\nCV_MAT_AUG_OPERATOR_T(-=, cv::subtract(a,b,a), Mat_<_Tp>, Mat)\nCV_MAT_AUG_OPERATOR_T(-=, cv::subtract(a,b,a), Mat_<_Tp>, Scalar)\nCV_MAT_AUG_OPERATOR_T(-=, cv::subtract(a,b,a), Mat_<_Tp>, Mat_<_Tp>)\n\nCV_MAT_AUG_OPERATOR  (*=, cv::gemm(a, b, 1, Mat(), 0, a, 0), Mat, Mat)\nCV_MAT_AUG_OPERATOR_T(*=, cv::gemm(a, b, 1, Mat(), 0, a, 0), Mat_<_Tp>, Mat)\nCV_MAT_AUG_OPERATOR_T(*=, cv::gemm(a, b, 1, Mat(), 0, a, 0), Mat_<_Tp>, Mat_<_Tp>)\nCV_MAT_AUG_OPERATOR  (*=, a.convertTo(a, -1, b), Mat, double)\nCV_MAT_AUG_OPERATOR_T(*=, a.convertTo(a, -1, b), Mat_<_Tp>, double)\n\nCV_MAT_AUG_OPERATOR  (/=, cv::divide(a,b,a), Mat, Mat)\nCV_MAT_AUG_OPERATOR_T(/=, cv::divide(a,b,a), Mat_<_Tp>, Mat)\nCV_MAT_AUG_OPERATOR_T(/=, cv::divide(a,b,a), Mat_<_Tp>, Mat_<_Tp>)\nCV_MAT_AUG_OPERATOR  (/=, a.convertTo((Mat&)a, -1, 1./b), Mat, double)\nCV_MAT_AUG_OPERATOR_T(/=, a.convertTo((Mat&)a, -1, 1./b), Mat_<_Tp>, double)\n\nCV_MAT_AUG_OPERATOR  (&=, cv::bitwise_and(a,b,a), Mat, Mat)\nCV_MAT_AUG_OPERATOR  (&=, cv::bitwise_and(a,b,a), Mat, Scalar)\nCV_MAT_AUG_OPERATOR_T(&=, cv::bitwise_and(a,b,a), Mat_<_Tp>, Mat)\nCV_MAT_AUG_OPERATOR_T(&=, cv::bitwise_and(a,b,a), Mat_<_Tp>, Scalar)\nCV_MAT_AUG_OPERATOR_T(&=, cv::bitwise_and(a,b,a), Mat_<_Tp>, Mat_<_Tp>)\n\nCV_MAT_AUG_OPERATOR  (|=, cv::bitwise_or(a,b,a), Mat, Mat)\nCV_MAT_AUG_OPERATOR  (|=, cv::bitwise_or(a,b,a), Mat, Scalar)\nCV_MAT_AUG_OPERATOR_T(|=, cv::bitwise_or(a,b,a), Mat_<_Tp>, Mat)\nCV_MAT_AUG_OPERATOR_T(|=, cv::bitwise_or(a,b,a), Mat_<_Tp>, Scalar)\nCV_MAT_AUG_OPERATOR_T(|=, cv::bitwise_or(a,b,a), Mat_<_Tp>, Mat_<_Tp>)\n\nCV_MAT_AUG_OPERATOR  (^=, cv::bitwise_xor(a,b,a), Mat, Mat)\nCV_MAT_AUG_OPERATOR  (^=, cv::bitwise_xor(a,b,a), Mat, Scalar)\nCV_MAT_AUG_OPERATOR_T(^=, cv::bitwise_xor(a,b,a), Mat_<_Tp>, Mat)\nCV_MAT_AUG_OPERATOR_T(^=, cv::bitwise_xor(a,b,a), Mat_<_Tp>, Scalar)\nCV_MAT_AUG_OPERATOR_T(^=, cv::bitwise_xor(a,b,a), Mat_<_Tp>, Mat_<_Tp>)\n\n#undef CV_MAT_AUG_OPERATOR_T\n#undef CV_MAT_AUG_OPERATOR\n#undef CV_MAT_AUG_OPERATOR1\n\n\n\n///////////////////////////////////////////// SVD /////////////////////////////////////////////\n\ninline SVD::SVD() {}\ninline SVD::SVD( InputArray m, int flags ) { operator ()(m, flags); }\ninline void SVD::solveZ( InputArray m, OutputArray _dst )\n{\n    Mat mtx = m.getMat();\n    SVD svd(mtx, (mtx.rows >= mtx.cols ? 0 : SVD::FULL_UV));\n    _dst.create(svd.vt.cols, 1, svd.vt.type());\n    Mat dst = _dst.getMat();\n    svd.vt.row(svd.vt.rows-1).reshape(1,svd.vt.cols).copyTo(dst);\n}\n\ntemplate<typename _Tp, int m, int n, int nm> inline void\n    SVD::compute( const Matx<_Tp, m, n>& a, Matx<_Tp, nm, 1>& w, Matx<_Tp, m, nm>& u, Matx<_Tp, n, nm>& vt )\n{\n    CV_StaticAssert( nm == MIN(m, n), \"Invalid size of output vector.\");\n    Mat _a(a, false), _u(u, false), _w(w, false), _vt(vt, false);\n    SVD::compute(_a, _w, _u, _vt);\n    CV_Assert(_w.data == (uchar*)&w.val[0] && _u.data == (uchar*)&u.val[0] && _vt.data == (uchar*)&vt.val[0]);\n}\n\ntemplate<typename _Tp, int m, int n, int nm> inline void\nSVD::compute( const Matx<_Tp, m, n>& a, Matx<_Tp, nm, 1>& w )\n{\n    CV_StaticAssert( nm == MIN(m, n), \"Invalid size of output vector.\");\n    Mat _a(a, false), _w(w, false);\n    SVD::compute(_a, _w);\n    CV_Assert(_w.data == (uchar*)&w.val[0]);\n}\n\ntemplate<typename _Tp, int m, int n, int nm, int nb> inline void\nSVD::backSubst( const Matx<_Tp, nm, 1>& w, const Matx<_Tp, m, nm>& u,\n                const Matx<_Tp, n, nm>& vt, const Matx<_Tp, m, nb>& rhs,\n                Matx<_Tp, n, nb>& dst )\n{\n    CV_StaticAssert( nm == MIN(m, n), \"Invalid size of output vector.\");\n    Mat _u(u, false), _w(w, false), _vt(vt, false), _rhs(rhs, false), _dst(dst, false);\n    SVD::backSubst(_w, _u, _vt, _rhs, _dst);\n    CV_Assert(_dst.data == (uchar*)&dst.val[0]);\n}\n\n\n\n/////////////////////////////////// Multiply-with-Carry RNG ///////////////////////////////////\n\ninline RNG::RNG()              { state = 0xffffffff; }\ninline RNG::RNG(uint64 _state) { state = _state ? _state : 0xffffffff; }\n\ninline RNG::operator uchar()    { return (uchar)next(); }\ninline RNG::operator schar()    { return (schar)next(); }\ninline RNG::operator ushort()   { return (ushort)next(); }\ninline RNG::operator short()    { return (short)next(); }\ninline RNG::operator int()      { return (int)next(); }\ninline RNG::operator unsigned() { return next(); }\ninline RNG::operator float()    { return next()*2.3283064365386962890625e-10f; }\ninline RNG::operator double()   { unsigned t = next(); return (((uint64)t << 32) | next()) * 5.4210108624275221700372640043497e-20; }\n\ninline unsigned RNG::operator ()(unsigned N) { return (unsigned)uniform(0,N); }\ninline unsigned RNG::operator ()()           { return next(); }\n\ninline int    RNG::uniform(int a, int b)       { return a == b ? a : (int)(next() % (b - a) + a); }\ninline float  RNG::uniform(float a, float b)   { return ((float)*this)*(b - a) + a; }\ninline double RNG::uniform(double a, double b) { return ((double)*this)*(b - a) + a; }\n\ninline unsigned RNG::next()\n{\n    state = (uint64)(unsigned)state* /*CV_RNG_COEFF*/ 4164903690U + (unsigned)(state >> 32);\n    return (unsigned)state;\n}\n\n//! returns the next unifomly-distributed random number of the specified type\ntemplate<typename _Tp> static inline _Tp randu()\n{\n  return (_Tp)theRNG();\n}\n\n///////////////////////////////// Formatted string generation /////////////////////////////////\n\nCV_EXPORTS String format( const char* fmt, ... );\n\n///////////////////////////////// Formatted output of cv::Mat /////////////////////////////////\n\nstatic inline\nPtr<Formatted> format(InputArray mtx, int fmt)\n{\n    return Formatter::get(fmt)->format(mtx.getMat());\n}\n\nstatic inline\nint print(Ptr<Formatted> fmtd, FILE* stream = stdout)\n{\n    int written = 0;\n    fmtd->reset();\n    for(const char* str = fmtd->next(); str; str = fmtd->next())\n        written += fputs(str, stream);\n\n    return written;\n}\n\nstatic inline\nint print(const Mat& mtx, FILE* stream = stdout)\n{\n    return print(Formatter::get()->format(mtx), stream);\n}\n\nstatic inline\nint print(const UMat& mtx, FILE* stream = stdout)\n{\n    return print(Formatter::get()->format(mtx.getMat(ACCESS_READ)), stream);\n}\n\ntemplate<typename _Tp> static inline\nint print(const std::vector<Point_<_Tp> >& vec, FILE* stream = stdout)\n{\n    return print(Formatter::get()->format(Mat(vec)), stream);\n}\n\ntemplate<typename _Tp> static inline\nint print(const std::vector<Point3_<_Tp> >& vec, FILE* stream = stdout)\n{\n    return print(Formatter::get()->format(Mat(vec)), stream);\n}\n\ntemplate<typename _Tp, int m, int n> static inline\nint print(const Matx<_Tp, m, n>& matx, FILE* stream = stdout)\n{\n    return print(Formatter::get()->format(cv::Mat(matx)), stream);\n}\n\n//! @endcond\n\n/****************************************************************************************\\\n*                                  Auxiliary algorithms                                  *\n\\****************************************************************************************/\n\n/** @brief Splits an element set into equivalency classes.\n\nThe generic function partition implements an \\f$O(N^2)\\f$ algorithm for splitting a set of \\f$N\\f$ elements\ninto one or more equivalency classes, as described in\n<http://en.wikipedia.org/wiki/Disjoint-set_data_structure> . The function returns the number of\nequivalency classes.\n@param _vec Set of elements stored as a vector.\n@param labels Output vector of labels. It contains as many elements as vec. Each label labels[i] is\na 0-based cluster index of `vec[i]`.\n@param predicate Equivalence predicate (pointer to a boolean function of two arguments or an\ninstance of the class that has the method bool operator()(const _Tp& a, const _Tp& b) ). The\npredicate returns true when the elements are certainly in the same class, and returns false if they\nmay or may not be in the same class.\n@ingroup core_cluster\n*/\ntemplate<typename _Tp, class _EqPredicate> int\npartition( const std::vector<_Tp>& _vec, std::vector<int>& labels,\n          _EqPredicate predicate=_EqPredicate())\n{\n    int i, j, N = (int)_vec.size();\n    const _Tp* vec = &_vec[0];\n\n    const int PARENT=0;\n    const int RANK=1;\n\n    std::vector<int> _nodes(N*2);\n    int (*nodes)[2] = (int(*)[2])&_nodes[0];\n\n    // The first O(N) pass: create N single-vertex trees\n    for(i = 0; i < N; i++)\n    {\n        nodes[i][PARENT]=-1;\n        nodes[i][RANK] = 0;\n    }\n\n    // The main O(N^2) pass: merge connected components\n    for( i = 0; i < N; i++ )\n    {\n        int root = i;\n\n        // find root\n        while( nodes[root][PARENT] >= 0 )\n            root = nodes[root][PARENT];\n\n        for( j = 0; j < N; j++ )\n        {\n            if( i == j || !predicate(vec[i], vec[j]))\n                continue;\n            int root2 = j;\n\n            while( nodes[root2][PARENT] >= 0 )\n                root2 = nodes[root2][PARENT];\n\n            if( root2 != root )\n            {\n                // unite both trees\n                int rank = nodes[root][RANK], rank2 = nodes[root2][RANK];\n                if( rank > rank2 )\n                    nodes[root2][PARENT] = root;\n                else\n                {\n                    nodes[root][PARENT] = root2;\n                    nodes[root2][RANK] += rank == rank2;\n                    root = root2;\n                }\n                CV_Assert( nodes[root][PARENT] < 0 );\n\n                int k = j, parent;\n\n                // compress the path from node2 to root\n                while( (parent = nodes[k][PARENT]) >= 0 )\n                {\n                    nodes[k][PARENT] = root;\n                    k = parent;\n                }\n\n                // compress the path from node to root\n                k = i;\n                while( (parent = nodes[k][PARENT]) >= 0 )\n                {\n                    nodes[k][PARENT] = root;\n                    k = parent;\n                }\n            }\n        }\n    }\n\n    // Final O(N) pass: enumerate classes\n    labels.resize(N);\n    int nclasses = 0;\n\n    for( i = 0; i < N; i++ )\n    {\n        int root = i;\n        while( nodes[root][PARENT] >= 0 )\n            root = nodes[root][PARENT];\n        // re-use the rank as the class label\n        if( nodes[root][RANK] >= 0 )\n            nodes[root][RANK] = ~nclasses++;\n        labels[i] = ~nodes[root][RANK];\n    }\n\n    return nclasses;\n}\n\n} // cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/optim.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the OpenCV Foundation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OPTIM_HPP__\n#define __OPENCV_OPTIM_HPP__\n\n#include \"opencv2/core.hpp\"\n\nnamespace cv\n{\n\n/** @addtogroup core_optim\nThe algorithms in this section minimize or maximize function value within specified constraints or\nwithout any constraints.\n@{\n*/\n\n/** @brief Basic interface for all solvers\n */\nclass CV_EXPORTS MinProblemSolver : public Algorithm\n{\npublic:\n    /** @brief Represents function being optimized\n     */\n    class CV_EXPORTS Function\n    {\n    public:\n        virtual ~Function() {}\n        virtual int getDims() const = 0;\n        virtual double getGradientEps() const;\n        virtual double calc(const double* x) const = 0;\n        virtual void getGradient(const double* x,double* grad);\n    };\n\n    /** @brief Getter for the optimized function.\n\n    The optimized function is represented by Function interface, which requires derivatives to\n    implement the sole method calc(double*) to evaluate the function.\n\n    @return Smart-pointer to an object that implements Function interface - it represents the\n    function that is being optimized. It can be empty, if no function was given so far.\n     */\n    virtual Ptr<Function> getFunction() const = 0;\n\n    /** @brief Setter for the optimized function.\n\n    *It should be called at least once before the call to* minimize(), as default value is not usable.\n\n    @param f The new function to optimize.\n     */\n    virtual void setFunction(const Ptr<Function>& f) = 0;\n\n    /** @brief Getter for the previously set terminal criteria for this algorithm.\n\n    @return Deep copy of the terminal criteria used at the moment.\n     */\n    virtual TermCriteria getTermCriteria() const = 0;\n\n    /** @brief Set terminal criteria for solver.\n\n    This method *is not necessary* to be called before the first call to minimize(), as the default\n    value is sensible.\n\n    Algorithm stops when the number of function evaluations done exceeds termcrit.maxCount, when\n    the function values at the vertices of simplex are within termcrit.epsilon range or simplex\n    becomes so small that it can enclosed in a box with termcrit.epsilon sides, whatever comes\n    first.\n    @param termcrit Terminal criteria to be used, represented as cv::TermCriteria structure.\n     */\n    virtual void setTermCriteria(const TermCriteria& termcrit) = 0;\n\n    /** @brief actually runs the algorithm and performs the minimization.\n\n    The sole input parameter determines the centroid of the starting simplex (roughly, it tells\n    where to start), all the others (terminal criteria, initial step, function to be minimized) are\n    supposed to be set via the setters before the call to this method or the default values (not\n    always sensible) will be used.\n\n    @param x The initial point, that will become a centroid of an initial simplex. After the algorithm\n    will terminate, it will be setted to the point where the algorithm stops, the point of possible\n    minimum.\n    @return The value of a function at the point found.\n     */\n    virtual double minimize(InputOutputArray x) = 0;\n};\n\n/** @brief This class is used to perform the non-linear non-constrained minimization of a function,\n\ndefined on an `n`-dimensional Euclidean space, using the **Nelder-Mead method**, also known as\n**downhill simplex method**. The basic idea about the method can be obtained from\n<http://en.wikipedia.org/wiki/Nelder-Mead_method>.\n\nIt should be noted, that this method, although deterministic, is rather a heuristic and therefore\nmay converge to a local minima, not necessary a global one. It is iterative optimization technique,\nwhich at each step uses an information about the values of a function evaluated only at `n+1`\npoints, arranged as a *simplex* in `n`-dimensional space (hence the second name of the method). At\neach step new point is chosen to evaluate function at, obtained value is compared with previous\nones and based on this information simplex changes it's shape , slowly moving to the local minimum.\nThus this method is using *only* function values to make decision, on contrary to, say, Nonlinear\nConjugate Gradient method (which is also implemented in optim).\n\nAlgorithm stops when the number of function evaluations done exceeds termcrit.maxCount, when the\nfunction values at the vertices of simplex are within termcrit.epsilon range or simplex becomes so\nsmall that it can enclosed in a box with termcrit.epsilon sides, whatever comes first, for some\ndefined by user positive integer termcrit.maxCount and positive non-integer termcrit.epsilon.\n\n@note DownhillSolver is a derivative of the abstract interface\ncv::MinProblemSolver, which in turn is derived from the Algorithm interface and is used to\nencapsulate the functionality, common to all non-linear optimization algorithms in the optim\nmodule.\n\n@note term criteria should meet following condition:\n@code\n    termcrit.type == (TermCriteria::MAX_ITER + TermCriteria::EPS) && termcrit.epsilon > 0 && termcrit.maxCount > 0\n@endcode\n */\nclass CV_EXPORTS DownhillSolver : public MinProblemSolver\n{\npublic:\n    /** @brief Returns the initial step that will be used in downhill simplex algorithm.\n\n    @param step Initial step that will be used in algorithm. Note, that although corresponding setter\n    accepts column-vectors as well as row-vectors, this method will return a row-vector.\n    @see DownhillSolver::setInitStep\n     */\n    virtual void getInitStep(OutputArray step) const=0;\n\n    /** @brief Sets the initial step that will be used in downhill simplex algorithm.\n\n    Step, together with initial point (givin in DownhillSolver::minimize) are two `n`-dimensional\n    vectors that are used to determine the shape of initial simplex. Roughly said, initial point\n    determines the position of a simplex (it will become simplex's centroid), while step determines the\n    spread (size in each dimension) of a simplex. To be more precise, if \\f$s,x_0\\in\\mathbb{R}^n\\f$ are\n    the initial step and initial point respectively, the vertices of a simplex will be:\n    \\f$v_0:=x_0-\\frac{1}{2} s\\f$ and \\f$v_i:=x_0+s_i\\f$ for \\f$i=1,2,\\dots,n\\f$ where \\f$s_i\\f$ denotes\n    projections of the initial step of *n*-th coordinate (the result of projection is treated to be\n    vector given by \\f$s_i:=e_i\\cdot\\left<e_i\\cdot s\\right>\\f$, where \\f$e_i\\f$ form canonical basis)\n\n    @param step Initial step that will be used in algorithm. Roughly said, it determines the spread\n    (size in each dimension) of an initial simplex.\n     */\n    virtual void setInitStep(InputArray step)=0;\n\n    /** @brief This function returns the reference to the ready-to-use DownhillSolver object.\n\n    All the parameters are optional, so this procedure can be called even without parameters at\n    all. In this case, the default values will be used. As default value for terminal criteria are\n    the only sensible ones, MinProblemSolver::setFunction() and DownhillSolver::setInitStep()\n    should be called upon the obtained object, if the respective parameters were not given to\n    create(). Otherwise, the two ways (give parameters to createDownhillSolver() or miss them out\n    and call the MinProblemSolver::setFunction() and DownhillSolver::setInitStep()) are absolutely\n    equivalent (and will drop the same errors in the same way, should invalid input be detected).\n    @param f Pointer to the function that will be minimized, similarly to the one you submit via\n    MinProblemSolver::setFunction.\n    @param initStep Initial step, that will be used to construct the initial simplex, similarly to the one\n    you submit via MinProblemSolver::setInitStep.\n    @param termcrit Terminal criteria to the algorithm, similarly to the one you submit via\n    MinProblemSolver::setTermCriteria.\n     */\n    static Ptr<DownhillSolver> create(const Ptr<MinProblemSolver::Function>& f=Ptr<MinProblemSolver::Function>(),\n                                      InputArray initStep=Mat_<double>(1,1,0.0),\n                                      TermCriteria termcrit=TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5000,0.000001));\n};\n\n/** @brief This class is used to perform the non-linear non-constrained minimization of a function\nwith known gradient,\n\ndefined on an *n*-dimensional Euclidean space, using the **Nonlinear Conjugate Gradient method**.\nThe implementation was done based on the beautifully clear explanatory article [An Introduction to\nthe Conjugate Gradient Method Without the Agonizing\nPain](http://www.cs.cmu.edu/~quake-papers/painless-conjugate-gradient.pdf) by Jonathan Richard\nShewchuk. The method can be seen as an adaptation of a standard Conjugate Gradient method (see, for\nexample <http://en.wikipedia.org/wiki/Conjugate_gradient_method>) for numerically solving the\nsystems of linear equations.\n\nIt should be noted, that this method, although deterministic, is rather a heuristic method and\ntherefore may converge to a local minima, not necessary a global one. What is even more disastrous,\nmost of its behaviour is ruled by gradient, therefore it essentially cannot distinguish between\nlocal minima and maxima. Therefore, if it starts sufficiently near to the local maximum, it may\nconverge to it. Another obvious restriction is that it should be possible to compute the gradient of\na function at any point, thus it is preferable to have analytic expression for gradient and\ncomputational burden should be born by the user.\n\nThe latter responsibility is accompilished via the getGradient method of a\nMinProblemSolver::Function interface (which represents function being optimized). This method takes\npoint a point in *n*-dimensional space (first argument represents the array of coordinates of that\npoint) and comput its gradient (it should be stored in the second argument as an array).\n\n@note class ConjGradSolver thus does not add any new methods to the basic MinProblemSolver interface.\n\n@note term criteria should meet following condition:\n@code\n    termcrit.type == (TermCriteria::MAX_ITER + TermCriteria::EPS) && termcrit.epsilon > 0 && termcrit.maxCount > 0\n    // or\n    termcrit.type == TermCriteria::MAX_ITER) && termcrit.maxCount > 0\n@endcode\n */\nclass CV_EXPORTS ConjGradSolver : public MinProblemSolver\n{\npublic:\n    /** @brief This function returns the reference to the ready-to-use ConjGradSolver object.\n\n    All the parameters are optional, so this procedure can be called even without parameters at\n    all. In this case, the default values will be used. As default value for terminal criteria are\n    the only sensible ones, MinProblemSolver::setFunction() should be called upon the obtained\n    object, if the function was not given to create(). Otherwise, the two ways (submit it to\n    create() or miss it out and call the MinProblemSolver::setFunction()) are absolutely equivalent\n    (and will drop the same errors in the same way, should invalid input be detected).\n    @param f Pointer to the function that will be minimized, similarly to the one you submit via\n    MinProblemSolver::setFunction.\n    @param termcrit Terminal criteria to the algorithm, similarly to the one you submit via\n    MinProblemSolver::setTermCriteria.\n    */\n    static Ptr<ConjGradSolver> create(const Ptr<MinProblemSolver::Function>& f=Ptr<ConjGradSolver::Function>(),\n                                      TermCriteria termcrit=TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5000,0.000001));\n};\n\n//! return codes for cv::solveLP() function\nenum SolveLPResult\n{\n    SOLVELP_UNBOUNDED    = -2, //!< problem is unbounded (target function can achieve arbitrary high values)\n    SOLVELP_UNFEASIBLE    = -1, //!< problem is unfeasible (there are no points that satisfy all the constraints imposed)\n    SOLVELP_SINGLE    = 0, //!< there is only one maximum for target function\n    SOLVELP_MULTI    = 1 //!< there are multiple maxima for target function - the arbitrary one is returned\n};\n\n/** @brief Solve given (non-integer) linear programming problem using the Simplex Algorithm (Simplex Method).\n\nWhat we mean here by \"linear programming problem\" (or LP problem, for short) can be formulated as:\n\n\\f[\\mbox{Maximize } c\\cdot x\\\\\n \\mbox{Subject to:}\\\\\n Ax\\leq b\\\\\n x\\geq 0\\f]\n\nWhere \\f$c\\f$ is fixed `1`-by-`n` row-vector, \\f$A\\f$ is fixed `m`-by-`n` matrix, \\f$b\\f$ is fixed `m`-by-`1`\ncolumn vector and \\f$x\\f$ is an arbitrary `n`-by-`1` column vector, which satisfies the constraints.\n\nSimplex algorithm is one of many algorithms that are designed to handle this sort of problems\nefficiently. Although it is not optimal in theoretical sense (there exist algorithms that can solve\nany problem written as above in polynomial time, while simplex method degenerates to exponential\ntime for some special cases), it is well-studied, easy to implement and is shown to work well for\nreal-life purposes.\n\nThe particular implementation is taken almost verbatim from **Introduction to Algorithms, third\nedition** by T. H. Cormen, C. E. Leiserson, R. L. Rivest and Clifford Stein. In particular, the\nBland's rule <http://en.wikipedia.org/wiki/Bland%27s_rule> is used to prevent cycling.\n\n@param Func This row-vector corresponds to \\f$c\\f$ in the LP problem formulation (see above). It should\ncontain 32- or 64-bit floating point numbers. As a convenience, column-vector may be also submitted,\nin the latter case it is understood to correspond to \\f$c^T\\f$.\n@param Constr `m`-by-`n+1` matrix, whose rightmost column corresponds to \\f$b\\f$ in formulation above\nand the remaining to \\f$A\\f$. It should containt 32- or 64-bit floating point numbers.\n@param z The solution will be returned here as a column-vector - it corresponds to \\f$c\\f$ in the\nformulation above. It will contain 64-bit floating point numbers.\n@return One of cv::SolveLPResult\n */\nCV_EXPORTS_W int solveLP(const Mat& Func, const Mat& Constr, Mat& z);\n\n//! @}\n\n}// cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/persistence.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_PERSISTENCE_HPP__\n#define __OPENCV_CORE_PERSISTENCE_HPP__\n\n#ifndef __cplusplus\n#  error persistence.hpp header must be compiled as C++\n#endif\n\n//! @addtogroup core_c\n//! @{\n\n/** @brief \"black box\" representation of the file storage associated with a file on disk.\n\nSeveral functions that are described below take CvFileStorage\\* as inputs and allow the user to\nsave or to load hierarchical collections that consist of scalar values, standard CXCore objects\n(such as matrices, sequences, graphs), and user-defined objects.\n\nOpenCV can read and write data in XML (<http://www.w3c.org/XML>) or YAML (<http://www.yaml.org>)\nformats. Below is an example of 3x3 floating-point identity matrix A, stored in XML and YAML files\nusing CXCore functions:\nXML:\n@code{.xml}\n    <?xml version=\"1.0\">\n    <opencv_storage>\n    <A type_id=\"opencv-matrix\">\n      <rows>3</rows>\n      <cols>3</cols>\n      <dt>f</dt>\n      <data>1. 0. 0. 0. 1. 0. 0. 0. 1.</data>\n    </A>\n    </opencv_storage>\n@endcode\nYAML:\n@code{.yaml}\n    %YAML:1.0\n    A: !!opencv-matrix\n      rows: 3\n      cols: 3\n      dt: f\n      data: [ 1., 0., 0., 0., 1., 0., 0., 0., 1.]\n@endcode\nAs it can be seen from the examples, XML uses nested tags to represent hierarchy, while YAML uses\nindentation for that purpose (similar to the Python programming language).\n\nThe same functions can read and write data in both formats; the particular format is determined by\nthe extension of the opened file, \".xml\" for XML files and \".yml\" or \".yaml\" for YAML.\n */\ntypedef struct CvFileStorage CvFileStorage;\ntypedef struct CvFileNode CvFileNode;\n\n//! @} core_c\n\n#include \"opencv2/core/types.hpp\"\n#include \"opencv2/core/mat.hpp\"\n\nnamespace cv {\n\n/** @addtogroup core_xml\n\nXML/YAML file storages.     {#xml_storage}\n=======================\nWriting to a file storage.\n--------------------------\nYou can store and then restore various OpenCV data structures to/from XML (<http://www.w3c.org/XML>)\nor YAML (<http://www.yaml.org>) formats. Also, it is possible store and load arbitrarily complex\ndata structures, which include OpenCV data structures, as well as primitive data types (integer and\nfloating-point numbers and text strings) as their elements.\n\nUse the following procedure to write something to XML or YAML:\n-# Create new FileStorage and open it for writing. It can be done with a single call to\nFileStorage::FileStorage constructor that takes a filename, or you can use the default constructor\nand then call FileStorage::open. Format of the file (XML or YAML) is determined from the filename\nextension (\".xml\" and \".yml\"/\".yaml\", respectively)\n-# Write all the data you want using the streaming operator `<<`, just like in the case of STL\nstreams.\n-# Close the file using FileStorage::release. FileStorage destructor also closes the file.\n\nHere is an example:\n@code\n    #include \"opencv2/opencv.hpp\"\n    #include <time.h>\n\n    using namespace cv;\n\n    int main(int, char** argv)\n    {\n        FileStorage fs(\"test.yml\", FileStorage::WRITE);\n\n        fs << \"frameCount\" << 5;\n        time_t rawtime; time(&rawtime);\n        fs << \"calibrationDate\" << asctime(localtime(&rawtime));\n        Mat cameraMatrix = (Mat_<double>(3,3) << 1000, 0, 320, 0, 1000, 240, 0, 0, 1);\n        Mat distCoeffs = (Mat_<double>(5,1) << 0.1, 0.01, -0.001, 0, 0);\n        fs << \"cameraMatrix\" << cameraMatrix << \"distCoeffs\" << distCoeffs;\n        fs << \"features\" << \"[\";\n        for( int i = 0; i < 3; i++ )\n        {\n            int x = rand() % 640;\n            int y = rand() % 480;\n            uchar lbp = rand() % 256;\n\n            fs << \"{:\" << \"x\" << x << \"y\" << y << \"lbp\" << \"[:\";\n            for( int j = 0; j < 8; j++ )\n                fs << ((lbp >> j) & 1);\n            fs << \"]\" << \"}\";\n        }\n        fs << \"]\";\n        fs.release();\n        return 0;\n    }\n@endcode\nThe sample above stores to XML and integer, text string (calibration date), 2 matrices, and a custom\nstructure \"feature\", which includes feature coordinates and LBP (local binary pattern) value. Here\nis output of the sample:\n@code{.yaml}\n%YAML:1.0\nframeCount: 5\ncalibrationDate: \"Fri Jun 17 14:09:29 2011\\n\"\ncameraMatrix: !!opencv-matrix\n   rows: 3\n   cols: 3\n   dt: d\n   data: [ 1000., 0., 320., 0., 1000., 240., 0., 0., 1. ]\ndistCoeffs: !!opencv-matrix\n   rows: 5\n   cols: 1\n   dt: d\n   data: [ 1.0000000000000001e-01, 1.0000000000000000e-02,\n       -1.0000000000000000e-03, 0., 0. ]\nfeatures:\n   - { x:167, y:49, lbp:[ 1, 0, 0, 1, 1, 0, 1, 1 ] }\n   - { x:298, y:130, lbp:[ 0, 0, 0, 1, 0, 0, 1, 1 ] }\n   - { x:344, y:158, lbp:[ 1, 1, 0, 0, 0, 0, 1, 0 ] }\n@endcode\n\nAs an exercise, you can replace \".yml\" with \".xml\" in the sample above and see, how the\ncorresponding XML file will look like.\n\nSeveral things can be noted by looking at the sample code and the output:\n\n-   The produced YAML (and XML) consists of heterogeneous collections that can be nested. There are 2\n    types of collections: named collections (mappings) and unnamed collections (sequences). In mappings\n    each element has a name and is accessed by name. This is similar to structures and std::map in\n    C/C++ and dictionaries in Python. In sequences elements do not have names, they are accessed by\n    indices. This is similar to arrays and std::vector in C/C++ and lists, tuples in Python.\n    \"Heterogeneous\" means that elements of each single collection can have different types.\n\n    Top-level collection in YAML/XML is a mapping. Each matrix is stored as a mapping, and the matrix\n    elements are stored as a sequence. Then, there is a sequence of features, where each feature is\n    represented a mapping, and lbp value in a nested sequence.\n\n-   When you write to a mapping (a structure), you write element name followed by its value. When you\n    write to a sequence, you simply write the elements one by one. OpenCV data structures (such as\n    cv::Mat) are written in absolutely the same way as simple C data structures - using `<<`\n    operator.\n\n-   To write a mapping, you first write the special string `{` to the storage, then write the\n    elements as pairs (`fs << <element_name> << <element_value>`) and then write the closing\n    `}`.\n\n-   To write a sequence, you first write the special string `[`, then write the elements, then\n    write the closing `]`.\n\n-   In YAML (but not XML), mappings and sequences can be written in a compact Python-like inline\n    form. In the sample above matrix elements, as well as each feature, including its lbp value, is\n    stored in such inline form. To store a mapping/sequence in a compact form, put `:` after the\n    opening character, e.g. use `{:` instead of `{` and `[:` instead of `[`. When the\n    data is written to XML, those extra `:` are ignored.\n\nReading data from a file storage.\n---------------------------------\nTo read the previously written XML or YAML file, do the following:\n-#  Open the file storage using FileStorage::FileStorage constructor or FileStorage::open method.\n    In the current implementation the whole file is parsed and the whole representation of file\n    storage is built in memory as a hierarchy of file nodes (see FileNode)\n\n-#  Read the data you are interested in. Use FileStorage::operator [], FileNode::operator []\n    and/or FileNodeIterator.\n\n-#  Close the storage using FileStorage::release.\n\nHere is how to read the file created by the code sample above:\n@code\n    FileStorage fs2(\"test.yml\", FileStorage::READ);\n\n    // first method: use (type) operator on FileNode.\n    int frameCount = (int)fs2[\"frameCount\"];\n\n    String date;\n    // second method: use FileNode::operator >>\n    fs2[\"calibrationDate\"] >> date;\n\n    Mat cameraMatrix2, distCoeffs2;\n    fs2[\"cameraMatrix\"] >> cameraMatrix2;\n    fs2[\"distCoeffs\"] >> distCoeffs2;\n\n    cout << \"frameCount: \" << frameCount << endl\n         << \"calibration date: \" << date << endl\n         << \"camera matrix: \" << cameraMatrix2 << endl\n         << \"distortion coeffs: \" << distCoeffs2 << endl;\n\n    FileNode features = fs2[\"features\"];\n    FileNodeIterator it = features.begin(), it_end = features.end();\n    int idx = 0;\n    std::vector<uchar> lbpval;\n\n    // iterate through a sequence using FileNodeIterator\n    for( ; it != it_end; ++it, idx++ )\n    {\n        cout << \"feature #\" << idx << \": \";\n        cout << \"x=\" << (int)(*it)[\"x\"] << \", y=\" << (int)(*it)[\"y\"] << \", lbp: (\";\n        // you can also easily read numerical arrays using FileNode >> std::vector operator.\n        (*it)[\"lbp\"] >> lbpval;\n        for( int i = 0; i < (int)lbpval.size(); i++ )\n            cout << \" \" << (int)lbpval[i];\n        cout << \")\" << endl;\n    }\n    fs2.release();\n@endcode\n\nFormat specification    {#format_spec}\n--------------------\n`([count]{u|c|w|s|i|f|d})`... where the characters correspond to fundamental C++ types:\n-   `u` 8-bit unsigned number\n-   `c` 8-bit signed number\n-   `w` 16-bit unsigned number\n-   `s` 16-bit signed number\n-   `i` 32-bit signed number\n-   `f` single precision floating-point number\n-   `d` double precision floating-point number\n-   `r` pointer, 32 lower bits of which are written as a signed integer. The type can be used to\n    store structures with links between the elements.\n\n`count` is the optional counter of values of a given type. For example, `2if` means that each array\nelement is a structure of 2 integers, followed by a single-precision floating-point number. The\nequivalent notations of the above specification are `iif`, `2i1f` and so forth. Other examples: `u`\nmeans that the array consists of bytes, and `2d` means the array consists of pairs of doubles.\n\n@see @ref filestorage.cpp\n*/\n\n//! @{\n\n/** @example filestorage.cpp\nA complete example using the FileStorage interface\n*/\n\n////////////////////////// XML & YAML I/O //////////////////////////\n\nclass CV_EXPORTS FileNode;\nclass CV_EXPORTS FileNodeIterator;\n\n/** @brief XML/YAML file storage class that encapsulates all the information necessary for writing or reading\ndata to/from a file.\n */\nclass CV_EXPORTS_W FileStorage\n{\npublic:\n    //! file storage mode\n    enum Mode\n    {\n        READ        = 0, //!< value, open the file for reading\n        WRITE       = 1, //!< value, open the file for writing\n        APPEND      = 2, //!< value, open the file for appending\n        MEMORY      = 4, //!< flag, read data from source or write data to the internal buffer (which is\n                         //!< returned by FileStorage::release)\n        FORMAT_MASK = (7<<3), //!< mask for format flags\n        FORMAT_AUTO = 0,      //!< flag, auto format\n        FORMAT_XML  = (1<<3), //!< flag, XML format\n        FORMAT_YAML = (2<<3)  //!< flag, YAML format\n    };\n    enum\n    {\n        UNDEFINED      = 0,\n        VALUE_EXPECTED = 1,\n        NAME_EXPECTED  = 2,\n        INSIDE_MAP     = 4\n    };\n\n    /** @brief The constructors.\n\n    The full constructor opens the file. Alternatively you can use the default constructor and then\n    call FileStorage::open.\n     */\n    CV_WRAP FileStorage();\n\n    /** @overload\n    @param source Name of the file to open or the text string to read the data from. Extension of the\n    file (.xml or .yml/.yaml) determines its format (XML or YAML respectively). Also you can append .gz\n    to work with compressed files, for example myHugeMatrix.xml.gz. If both FileStorage::WRITE and\n    FileStorage::MEMORY flags are specified, source is used just to specify the output file format (e.g.\n    mydata.xml, .yml etc.).\n    @param flags Mode of operation. See  FileStorage::Mode\n    @param encoding Encoding of the file. Note that UTF-16 XML encoding is not supported currently and\n    you should use 8-bit encoding instead of it.\n    */\n    CV_WRAP FileStorage(const String& source, int flags, const String& encoding=String());\n\n    /** @overload */\n    FileStorage(CvFileStorage* fs, bool owning=true);\n\n    //! the destructor. calls release()\n    virtual ~FileStorage();\n\n    /** @brief Opens a file.\n\n    See description of parameters in FileStorage::FileStorage. The method calls FileStorage::release\n    before opening the file.\n    @param filename Name of the file to open or the text string to read the data from.\n       Extension of the file (.xml or .yml/.yaml) determines its format (XML or YAML respectively).\n        Also you can append .gz to work with compressed files, for example myHugeMatrix.xml.gz. If both\n        FileStorage::WRITE and FileStorage::MEMORY flags are specified, source is used just to specify\n        the output file format (e.g. mydata.xml, .yml etc.).\n    @param flags Mode of operation. One of FileStorage::Mode\n    @param encoding Encoding of the file. Note that UTF-16 XML encoding is not supported currently and\n    you should use 8-bit encoding instead of it.\n     */\n    CV_WRAP virtual bool open(const String& filename, int flags, const String& encoding=String());\n\n    /** @brief Checks whether the file is opened.\n\n    @returns true if the object is associated with the current file and false otherwise. It is a\n    good practice to call this method after you tried to open a file.\n     */\n    CV_WRAP virtual bool isOpened() const;\n\n    /** @brief Closes the file and releases all the memory buffers.\n\n    Call this method after all I/O operations with the storage are finished.\n     */\n    CV_WRAP virtual void release();\n\n    /** @brief Closes the file and releases all the memory buffers.\n\n    Call this method after all I/O operations with the storage are finished. If the storage was\n    opened for writing data and FileStorage::WRITE was specified\n     */\n    CV_WRAP virtual String releaseAndGetString();\n\n    /** @brief Returns the first element of the top-level mapping.\n    @returns The first element of the top-level mapping.\n     */\n    CV_WRAP FileNode getFirstTopLevelNode() const;\n\n    /** @brief Returns the top-level mapping\n    @param streamidx Zero-based index of the stream. In most cases there is only one stream in the file.\n    However, YAML supports multiple streams and so there can be several.\n    @returns The top-level mapping.\n     */\n    CV_WRAP FileNode root(int streamidx=0) const;\n\n    /** @brief Returns the specified element of the top-level mapping.\n    @param nodename Name of the file node.\n    @returns Node with the given name.\n     */\n    FileNode operator[](const String& nodename) const;\n\n    /** @overload */\n    CV_WRAP FileNode operator[](const char* nodename) const;\n\n    /** @brief Returns the obsolete C FileStorage structure.\n    @returns Pointer to the underlying C FileStorage structure\n     */\n    CvFileStorage* operator *() { return fs.get(); }\n\n    /** @overload */\n    const CvFileStorage* operator *() const { return fs.get(); }\n\n    /** @brief Writes multiple numbers.\n\n    Writes one or more numbers of the specified format to the currently written structure. Usually it is\n    more convenient to use operator `<<` instead of this method.\n    @param fmt Specification of each array element, see @ref format_spec \"format specification\"\n    @param vec Pointer to the written array.\n    @param len Number of the uchar elements to write.\n     */\n    void writeRaw( const String& fmt, const uchar* vec, size_t len );\n\n    /** @brief Writes the registered C structure (CvMat, CvMatND, CvSeq).\n    @param name Name of the written object.\n    @param obj Pointer to the object.\n    @see ocvWrite for details.\n     */\n    void writeObj( const String& name, const void* obj );\n\n    /** @brief Returns the normalized object name for the specified name of a file.\n    @param filename Name of a file\n    @returns The normalized object name.\n     */\n    static String getDefaultObjectName(const String& filename);\n\n    Ptr<CvFileStorage> fs; //!< the underlying C FileStorage structure\n    String elname; //!< the currently written element\n    std::vector<char> structs; //!< the stack of written structures\n    int state; //!< the writer state\n};\n\ntemplate<> CV_EXPORTS void DefaultDeleter<CvFileStorage>::operator ()(CvFileStorage* obj) const;\n\n/** @brief File Storage Node class.\n\nThe node is used to store each and every element of the file storage opened for reading. When\nXML/YAML file is read, it is first parsed and stored in the memory as a hierarchical collection of\nnodes. Each node can be a “leaf” that is contain a single number or a string, or be a collection of\nother nodes. There can be named collections (mappings) where each element has a name and it is\naccessed by a name, and ordered collections (sequences) where elements do not have names but rather\naccessed by index. Type of the file node can be determined using FileNode::type method.\n\nNote that file nodes are only used for navigating file storages opened for reading. When a file\nstorage is opened for writing, no data is stored in memory after it is written.\n */\nclass CV_EXPORTS_W_SIMPLE FileNode\n{\npublic:\n    //! type of the file storage node\n    enum Type\n    {\n        NONE      = 0, //!< empty node\n        INT       = 1, //!< an integer\n        REAL      = 2, //!< floating-point number\n        FLOAT     = REAL, //!< synonym or REAL\n        STR       = 3, //!< text string in UTF-8 encoding\n        STRING    = STR, //!< synonym for STR\n        REF       = 4, //!< integer of size size_t. Typically used for storing complex dynamic structures where some elements reference the others\n        SEQ       = 5, //!< sequence\n        MAP       = 6, //!< mapping\n        TYPE_MASK = 7,\n        FLOW      = 8,  //!< compact representation of a sequence or mapping. Used only by YAML writer\n        USER      = 16, //!< a registered object (e.g. a matrix)\n        EMPTY     = 32, //!< empty structure (sequence or mapping)\n        NAMED     = 64  //!< the node has a name (i.e. it is element of a mapping)\n    };\n    /** @brief The constructors.\n\n    These constructors are used to create a default file node, construct it from obsolete structures or\n    from the another file node.\n     */\n    CV_WRAP FileNode();\n\n    /** @overload\n    @param fs Pointer to the obsolete file storage structure.\n    @param node File node to be used as initialization for the created file node.\n    */\n    FileNode(const CvFileStorage* fs, const CvFileNode* node);\n\n    /** @overload\n    @param node File node to be used as initialization for the created file node.\n    */\n    FileNode(const FileNode& node);\n\n    /** @brief Returns element of a mapping node or a sequence node.\n    @param nodename Name of an element in the mapping node.\n    @returns Returns the element with the given identifier.\n     */\n    FileNode operator[](const String& nodename) const;\n\n    /** @overload\n    @param nodename Name of an element in the mapping node.\n    */\n    CV_WRAP FileNode operator[](const char* nodename) const;\n\n    /** @overload\n    @param i Index of an element in the sequence node.\n    */\n    CV_WRAP FileNode operator[](int i) const;\n\n    /** @brief Returns type of the node.\n    @returns Type of the node. See FileNode::Type\n     */\n    CV_WRAP int type() const;\n\n    //! returns true if the node is empty\n    CV_WRAP bool empty() const;\n    //! returns true if the node is a \"none\" object\n    CV_WRAP bool isNone() const;\n    //! returns true if the node is a sequence\n    CV_WRAP bool isSeq() const;\n    //! returns true if the node is a mapping\n    CV_WRAP bool isMap() const;\n    //! returns true if the node is an integer\n    CV_WRAP bool isInt() const;\n    //! returns true if the node is a floating-point number\n    CV_WRAP bool isReal() const;\n    //! returns true if the node is a text string\n    CV_WRAP bool isString() const;\n    //! returns true if the node has a name\n    CV_WRAP bool isNamed() const;\n    //! returns the node name or an empty string if the node is nameless\n    CV_WRAP String name() const;\n    //! returns the number of elements in the node, if it is a sequence or mapping, or 1 otherwise.\n    CV_WRAP size_t size() const;\n    //! returns the node content as an integer. If the node stores floating-point number, it is rounded.\n    operator int() const;\n    //! returns the node content as float\n    operator float() const;\n    //! returns the node content as double\n    operator double() const;\n    //! returns the node content as text string\n    operator String() const;\n#ifndef OPENCV_NOSTL\n    operator std::string() const;\n#endif\n\n    //! returns pointer to the underlying file node\n    CvFileNode* operator *();\n    //! returns pointer to the underlying file node\n    const CvFileNode* operator* () const;\n\n    //! returns iterator pointing to the first node element\n    FileNodeIterator begin() const;\n    //! returns iterator pointing to the element following the last node element\n    FileNodeIterator end() const;\n\n    /** @brief Reads node elements to the buffer with the specified format.\n\n    Usually it is more convenient to use operator `>>` instead of this method.\n    @param fmt Specification of each array element. See @ref format_spec \"format specification\"\n    @param vec Pointer to the destination array.\n    @param len Number of elements to read. If it is greater than number of remaining elements then all\n    of them will be read.\n     */\n    void readRaw( const String& fmt, uchar* vec, size_t len ) const;\n\n    //! reads the registered object and returns pointer to it\n    void* readObj() const;\n\n    // do not use wrapper pointer classes for better efficiency\n    const CvFileStorage* fs;\n    const CvFileNode* node;\n};\n\n\n/** @brief used to iterate through sequences and mappings.\n\nA standard STL notation, with node.begin(), node.end() denoting the beginning and the end of a\nsequence, stored in node. See the data reading sample in the beginning of the section.\n */\nclass CV_EXPORTS FileNodeIterator\n{\npublic:\n    /** @brief The constructors.\n\n    These constructors are used to create a default iterator, set it to specific element in a file node\n    or construct it from another iterator.\n     */\n    FileNodeIterator();\n\n    /** @overload\n    @param fs File storage for the iterator.\n    @param node File node for the iterator.\n    @param ofs Index of the element in the node. The created iterator will point to this element.\n    */\n    FileNodeIterator(const CvFileStorage* fs, const CvFileNode* node, size_t ofs=0);\n\n    /** @overload\n    @param it Iterator to be used as initialization for the created iterator.\n    */\n    FileNodeIterator(const FileNodeIterator& it);\n\n    //! returns the currently observed element\n    FileNode operator *() const;\n    //! accesses the currently observed element methods\n    FileNode operator ->() const;\n\n    //! moves iterator to the next node\n    FileNodeIterator& operator ++ ();\n    //! moves iterator to the next node\n    FileNodeIterator operator ++ (int);\n    //! moves iterator to the previous node\n    FileNodeIterator& operator -- ();\n    //! moves iterator to the previous node\n    FileNodeIterator operator -- (int);\n    //! moves iterator forward by the specified offset (possibly negative)\n    FileNodeIterator& operator += (int ofs);\n    //! moves iterator backward by the specified offset (possibly negative)\n    FileNodeIterator& operator -= (int ofs);\n\n    /** @brief Reads node elements to the buffer with the specified format.\n\n    Usually it is more convenient to use operator `>>` instead of this method.\n    @param fmt Specification of each array element. See @ref format_spec \"format specification\"\n    @param vec Pointer to the destination array.\n    @param maxCount Number of elements to read. If it is greater than number of remaining elements then\n    all of them will be read.\n     */\n    FileNodeIterator& readRaw( const String& fmt, uchar* vec,\n                               size_t maxCount=(size_t)INT_MAX );\n\n    struct SeqReader\n    {\n      int          header_size;\n      void*        seq;        /* sequence, beign read; CvSeq      */\n      void*        block;      /* current block;        CvSeqBlock */\n      schar*       ptr;        /* pointer to element be read next */\n      schar*       block_min;  /* pointer to the beginning of block */\n      schar*       block_max;  /* pointer to the end of block */\n      int          delta_index;/* = seq->first->start_index   */\n      schar*       prev_elem;  /* pointer to previous element */\n    };\n\n    const CvFileStorage* fs;\n    const CvFileNode* container;\n    SeqReader reader;\n    size_t remaining;\n};\n\n//! @} core_xml\n\n/////////////////// XML & YAML I/O implementation //////////////////\n\n//! @relates cv::FileStorage\n//! @{\n\nCV_EXPORTS void write( FileStorage& fs, const String& name, int value );\nCV_EXPORTS void write( FileStorage& fs, const String& name, float value );\nCV_EXPORTS void write( FileStorage& fs, const String& name, double value );\nCV_EXPORTS void write( FileStorage& fs, const String& name, const String& value );\nCV_EXPORTS void write( FileStorage& fs, const String& name, const Mat& value );\nCV_EXPORTS void write( FileStorage& fs, const String& name, const SparseMat& value );\nCV_EXPORTS void write( FileStorage& fs, const String& name, const std::vector<KeyPoint>& value);\nCV_EXPORTS void write( FileStorage& fs, const String& name, const std::vector<DMatch>& value);\n\nCV_EXPORTS void writeScalar( FileStorage& fs, int value );\nCV_EXPORTS void writeScalar( FileStorage& fs, float value );\nCV_EXPORTS void writeScalar( FileStorage& fs, double value );\nCV_EXPORTS void writeScalar( FileStorage& fs, const String& value );\n\n//! @}\n\n//! @relates cv::FileNode\n//! @{\n\nCV_EXPORTS void read(const FileNode& node, int& value, int default_value);\nCV_EXPORTS void read(const FileNode& node, float& value, float default_value);\nCV_EXPORTS void read(const FileNode& node, double& value, double default_value);\nCV_EXPORTS void read(const FileNode& node, String& value, const String& default_value);\nCV_EXPORTS void read(const FileNode& node, Mat& mat, const Mat& default_mat = Mat() );\nCV_EXPORTS void read(const FileNode& node, SparseMat& mat, const SparseMat& default_mat = SparseMat() );\nCV_EXPORTS void read(const FileNode& node, std::vector<KeyPoint>& keypoints);\nCV_EXPORTS void read(const FileNode& node, std::vector<DMatch>& matches);\n\ntemplate<typename _Tp> static inline void read(const FileNode& node, Point_<_Tp>& value, const Point_<_Tp>& default_value)\n{\n    std::vector<_Tp> temp; FileNodeIterator it = node.begin(); it >> temp;\n    value = temp.size() != 2 ? default_value : Point_<_Tp>(saturate_cast<_Tp>(temp[0]), saturate_cast<_Tp>(temp[1]));\n}\n\ntemplate<typename _Tp> static inline void read(const FileNode& node, Point3_<_Tp>& value, const Point3_<_Tp>& default_value)\n{\n    std::vector<_Tp> temp; FileNodeIterator it = node.begin(); it >> temp;\n    value = temp.size() != 3 ? default_value : Point3_<_Tp>(saturate_cast<_Tp>(temp[0]), saturate_cast<_Tp>(temp[1]),\n                                                            saturate_cast<_Tp>(temp[2]));\n}\n\ntemplate<typename _Tp> static inline void read(const FileNode& node, Size_<_Tp>& value, const Size_<_Tp>& default_value)\n{\n    std::vector<_Tp> temp; FileNodeIterator it = node.begin(); it >> temp;\n    value = temp.size() != 2 ? default_value : Size_<_Tp>(saturate_cast<_Tp>(temp[0]), saturate_cast<_Tp>(temp[1]));\n}\n\ntemplate<typename _Tp> static inline void read(const FileNode& node, Complex<_Tp>& value, const Complex<_Tp>& default_value)\n{\n    std::vector<_Tp> temp; FileNodeIterator it = node.begin(); it >> temp;\n    value = temp.size() != 2 ? default_value : Complex<_Tp>(saturate_cast<_Tp>(temp[0]), saturate_cast<_Tp>(temp[1]));\n}\n\ntemplate<typename _Tp> static inline void read(const FileNode& node, Rect_<_Tp>& value, const Rect_<_Tp>& default_value)\n{\n    std::vector<_Tp> temp; FileNodeIterator it = node.begin(); it >> temp;\n    value = temp.size() != 4 ? default_value : Rect_<_Tp>(saturate_cast<_Tp>(temp[0]), saturate_cast<_Tp>(temp[1]),\n                                                          saturate_cast<_Tp>(temp[2]), saturate_cast<_Tp>(temp[3]));\n}\n\ntemplate<typename _Tp, int cn> static inline void read(const FileNode& node, Vec<_Tp, cn>& value, const Vec<_Tp, cn>& default_value)\n{\n    std::vector<_Tp> temp; FileNodeIterator it = node.begin(); it >> temp;\n    value = temp.size() != cn ? default_value : Vec<_Tp, cn>(&temp[0]);\n}\n\ntemplate<typename _Tp> static inline void read(const FileNode& node, Scalar_<_Tp>& value, const Scalar_<_Tp>& default_value)\n{\n    std::vector<_Tp> temp; FileNodeIterator it = node.begin(); it >> temp;\n    value = temp.size() != 4 ? default_value : Scalar_<_Tp>(saturate_cast<_Tp>(temp[0]), saturate_cast<_Tp>(temp[1]),\n                                                            saturate_cast<_Tp>(temp[2]), saturate_cast<_Tp>(temp[3]));\n}\n\nstatic inline void read(const FileNode& node, Range& value, const Range& default_value)\n{\n    Point2i temp(value.start, value.end); const Point2i default_temp = Point2i(default_value.start, default_value.end);\n    read(node, temp, default_temp);\n    value.start = temp.x; value.end = temp.y;\n}\n\n//! @}\n\n/** @brief Writes string to a file storage.\n@relates cv::FileStorage\n */\nCV_EXPORTS FileStorage& operator << (FileStorage& fs, const String& str);\n\n//! @cond IGNORED\n\nnamespace internal\n{\n    class CV_EXPORTS WriteStructContext\n    {\n    public:\n        WriteStructContext(FileStorage& _fs, const String& name, int flags, const String& typeName = String());\n        ~WriteStructContext();\n    private:\n        FileStorage* fs;\n    };\n\n    template<typename _Tp, int numflag> class VecWriterProxy\n    {\n    public:\n        VecWriterProxy( FileStorage* _fs ) : fs(_fs) {}\n        void operator()(const std::vector<_Tp>& vec) const\n        {\n            size_t count = vec.size();\n            for (size_t i = 0; i < count; i++)\n                write(*fs, vec[i]);\n        }\n    private:\n        FileStorage* fs;\n    };\n\n    template<typename _Tp> class VecWriterProxy<_Tp, 1>\n    {\n    public:\n        VecWriterProxy( FileStorage* _fs ) : fs(_fs) {}\n        void operator()(const std::vector<_Tp>& vec) const\n        {\n            int _fmt = DataType<_Tp>::fmt;\n            char fmt[] = { (char)((_fmt >> 8) + '1'), (char)_fmt, '\\0' };\n            fs->writeRaw(fmt, !vec.empty() ? (uchar*)&vec[0] : 0, vec.size() * sizeof(_Tp));\n        }\n    private:\n        FileStorage* fs;\n    };\n\n    template<typename _Tp, int numflag> class VecReaderProxy\n    {\n    public:\n        VecReaderProxy( FileNodeIterator* _it ) : it(_it) {}\n        void operator()(std::vector<_Tp>& vec, size_t count) const\n        {\n            count = std::min(count, it->remaining);\n            vec.resize(count);\n            for (size_t i = 0; i < count; i++, ++(*it))\n                read(**it, vec[i], _Tp());\n        }\n    private:\n        FileNodeIterator* it;\n    };\n\n    template<typename _Tp> class VecReaderProxy<_Tp, 1>\n    {\n    public:\n        VecReaderProxy( FileNodeIterator* _it ) : it(_it) {}\n        void operator()(std::vector<_Tp>& vec, size_t count) const\n        {\n            size_t remaining = it->remaining;\n            size_t cn = DataType<_Tp>::channels;\n            int _fmt = DataType<_Tp>::fmt;\n            char fmt[] = { (char)((_fmt >> 8)+'1'), (char)_fmt, '\\0' };\n            size_t remaining1 = remaining / cn;\n            count = count < remaining1 ? count : remaining1;\n            vec.resize(count);\n            it->readRaw(fmt, !vec.empty() ? (uchar*)&vec[0] : 0, count*sizeof(_Tp));\n        }\n    private:\n        FileNodeIterator* it;\n    };\n\n} // internal\n\n//! @endcond\n\n//! @relates cv::FileStorage\n//! @{\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const _Tp& value)\n{\n    write(fs, String(), value);\n}\n\ntemplate<> inline\nvoid write( FileStorage& fs, const int& value )\n{\n    writeScalar(fs, value);\n}\n\ntemplate<> inline\nvoid write( FileStorage& fs, const float& value )\n{\n    writeScalar(fs, value);\n}\n\ntemplate<> inline\nvoid write( FileStorage& fs, const double& value )\n{\n    writeScalar(fs, value);\n}\n\ntemplate<> inline\nvoid write( FileStorage& fs, const String& value )\n{\n    writeScalar(fs, value);\n}\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const Point_<_Tp>& pt )\n{\n    write(fs, pt.x);\n    write(fs, pt.y);\n}\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const Point3_<_Tp>& pt )\n{\n    write(fs, pt.x);\n    write(fs, pt.y);\n    write(fs, pt.z);\n}\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const Size_<_Tp>& sz )\n{\n    write(fs, sz.width);\n    write(fs, sz.height);\n}\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const Complex<_Tp>& c )\n{\n    write(fs, c.re);\n    write(fs, c.im);\n}\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const Rect_<_Tp>& r )\n{\n    write(fs, r.x);\n    write(fs, r.y);\n    write(fs, r.width);\n    write(fs, r.height);\n}\n\ntemplate<typename _Tp, int cn> static inline\nvoid write(FileStorage& fs, const Vec<_Tp, cn>& v )\n{\n    for(int i = 0; i < cn; i++)\n        write(fs, v.val[i]);\n}\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const Scalar_<_Tp>& s )\n{\n    write(fs, s.val[0]);\n    write(fs, s.val[1]);\n    write(fs, s.val[2]);\n    write(fs, s.val[3]);\n}\n\nstatic inline\nvoid write(FileStorage& fs, const Range& r )\n{\n    write(fs, r.start);\n    write(fs, r.end);\n}\n\ntemplate<typename _Tp> static inline\nvoid write( FileStorage& fs, const std::vector<_Tp>& vec )\n{\n    cv::internal::VecWriterProxy<_Tp, DataType<_Tp>::fmt != 0> w(&fs);\n    w(vec);\n}\n\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const String& name, const Point_<_Tp>& pt )\n{\n    cv::internal::WriteStructContext ws(fs, name, FileNode::SEQ+FileNode::FLOW);\n    write(fs, pt);\n}\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const String& name, const Point3_<_Tp>& pt )\n{\n    cv::internal::WriteStructContext ws(fs, name, FileNode::SEQ+FileNode::FLOW);\n    write(fs, pt);\n}\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const String& name, const Size_<_Tp>& sz )\n{\n    cv::internal::WriteStructContext ws(fs, name, FileNode::SEQ+FileNode::FLOW);\n    write(fs, sz);\n}\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const String& name, const Complex<_Tp>& c )\n{\n    cv::internal::WriteStructContext ws(fs, name, FileNode::SEQ+FileNode::FLOW);\n    write(fs, c);\n}\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const String& name, const Rect_<_Tp>& r )\n{\n    cv::internal::WriteStructContext ws(fs, name, FileNode::SEQ+FileNode::FLOW);\n    write(fs, r);\n}\n\ntemplate<typename _Tp, int cn> static inline\nvoid write(FileStorage& fs, const String& name, const Vec<_Tp, cn>& v )\n{\n    cv::internal::WriteStructContext ws(fs, name, FileNode::SEQ+FileNode::FLOW);\n    write(fs, v);\n}\n\ntemplate<typename _Tp> static inline\nvoid write(FileStorage& fs, const String& name, const Scalar_<_Tp>& s )\n{\n    cv::internal::WriteStructContext ws(fs, name, FileNode::SEQ+FileNode::FLOW);\n    write(fs, s);\n}\n\nstatic inline\nvoid write(FileStorage& fs, const String& name, const Range& r )\n{\n    cv::internal::WriteStructContext ws(fs, name, FileNode::SEQ+FileNode::FLOW);\n    write(fs, r);\n}\n\ntemplate<typename _Tp> static inline\nvoid write( FileStorage& fs, const String& name, const std::vector<_Tp>& vec )\n{\n    cv::internal::WriteStructContext ws(fs, name, FileNode::SEQ+(DataType<_Tp>::fmt != 0 ? FileNode::FLOW : 0));\n    write(fs, vec);\n}\n\n//! @} FileStorage\n\n//! @relates cv::FileNode\n//! @{\n\nstatic inline\nvoid read(const FileNode& node, bool& value, bool default_value)\n{\n    int temp;\n    read(node, temp, (int)default_value);\n    value = temp != 0;\n}\n\nstatic inline\nvoid read(const FileNode& node, uchar& value, uchar default_value)\n{\n    int temp;\n    read(node, temp, (int)default_value);\n    value = saturate_cast<uchar>(temp);\n}\n\nstatic inline\nvoid read(const FileNode& node, schar& value, schar default_value)\n{\n    int temp;\n    read(node, temp, (int)default_value);\n    value = saturate_cast<schar>(temp);\n}\n\nstatic inline\nvoid read(const FileNode& node, ushort& value, ushort default_value)\n{\n    int temp;\n    read(node, temp, (int)default_value);\n    value = saturate_cast<ushort>(temp);\n}\n\nstatic inline\nvoid read(const FileNode& node, short& value, short default_value)\n{\n    int temp;\n    read(node, temp, (int)default_value);\n    value = saturate_cast<short>(temp);\n}\n\ntemplate<typename _Tp> static inline\nvoid read( FileNodeIterator& it, std::vector<_Tp>& vec, size_t maxCount = (size_t)INT_MAX )\n{\n    cv::internal::VecReaderProxy<_Tp, DataType<_Tp>::fmt != 0> r(&it);\n    r(vec, maxCount);\n}\n\ntemplate<typename _Tp> static inline\nvoid read( const FileNode& node, std::vector<_Tp>& vec, const std::vector<_Tp>& default_value = std::vector<_Tp>() )\n{\n    if(!node.node)\n        vec = default_value;\n    else\n    {\n        FileNodeIterator it = node.begin();\n        read( it, vec );\n    }\n}\n\n//! @} FileNode\n\n//! @relates cv::FileStorage\n//! @{\n\n/** @brief Writes data to a file storage.\n */\ntemplate<typename _Tp> static inline\nFileStorage& operator << (FileStorage& fs, const _Tp& value)\n{\n    if( !fs.isOpened() )\n        return fs;\n    if( fs.state == FileStorage::NAME_EXPECTED + FileStorage::INSIDE_MAP )\n        CV_Error( Error::StsError, \"No element name has been given\" );\n    write( fs, fs.elname, value );\n    if( fs.state & FileStorage::INSIDE_MAP )\n        fs.state = FileStorage::NAME_EXPECTED + FileStorage::INSIDE_MAP;\n    return fs;\n}\n\n/** @brief Writes data to a file storage.\n */\nstatic inline\nFileStorage& operator << (FileStorage& fs, const char* str)\n{\n    return (fs << String(str));\n}\n\n/** @brief Writes data to a file storage.\n */\nstatic inline\nFileStorage& operator << (FileStorage& fs, char* value)\n{\n    return (fs << String(value));\n}\n\n//! @} FileStorage\n\n//! @relates cv::FileNodeIterator\n//! @{\n\n/** @brief Reads data from a file storage.\n */\ntemplate<typename _Tp> static inline\nFileNodeIterator& operator >> (FileNodeIterator& it, _Tp& value)\n{\n    read( *it, value, _Tp());\n    return ++it;\n}\n\n/** @brief Reads data from a file storage.\n */\ntemplate<typename _Tp> static inline\nFileNodeIterator& operator >> (FileNodeIterator& it, std::vector<_Tp>& vec)\n{\n    cv::internal::VecReaderProxy<_Tp, DataType<_Tp>::fmt != 0> r(&it);\n    r(vec, (size_t)INT_MAX);\n    return it;\n}\n\n//! @} FileNodeIterator\n\n//! @relates cv::FileNode\n//! @{\n\n/** @brief Reads data from a file storage.\n */\ntemplate<typename _Tp> static inline\nvoid operator >> (const FileNode& n, _Tp& value)\n{\n    read( n, value, _Tp());\n}\n\n/** @brief Reads data from a file storage.\n */\ntemplate<typename _Tp> static inline\nvoid operator >> (const FileNode& n, std::vector<_Tp>& vec)\n{\n    FileNodeIterator it = n.begin();\n    it >> vec;\n}\n\n//! @} FileNode\n\n//! @relates cv::FileNodeIterator\n//! @{\n\nstatic inline\nbool operator == (const FileNodeIterator& it1, const FileNodeIterator& it2)\n{\n    return it1.fs == it2.fs && it1.container == it2.container &&\n        it1.reader.ptr == it2.reader.ptr && it1.remaining == it2.remaining;\n}\n\nstatic inline\nbool operator != (const FileNodeIterator& it1, const FileNodeIterator& it2)\n{\n    return !(it1 == it2);\n}\n\nstatic inline\nptrdiff_t operator - (const FileNodeIterator& it1, const FileNodeIterator& it2)\n{\n    return it2.remaining - it1.remaining;\n}\n\nstatic inline\nbool operator < (const FileNodeIterator& it1, const FileNodeIterator& it2)\n{\n    return it1.remaining > it2.remaining;\n}\n\n//! @} FileNodeIterator\n\n//! @cond IGNORED\n\ninline FileNode FileStorage::getFirstTopLevelNode() const { FileNode r = root(); FileNodeIterator it = r.begin(); return it != r.end() ? *it : FileNode(); }\ninline FileNode::FileNode() : fs(0), node(0) {}\ninline FileNode::FileNode(const CvFileStorage* _fs, const CvFileNode* _node) : fs(_fs), node(_node) {}\ninline FileNode::FileNode(const FileNode& _node) : fs(_node.fs), node(_node.node) {}\ninline bool FileNode::empty() const    { return node   == 0;    }\ninline bool FileNode::isNone() const   { return type() == NONE; }\ninline bool FileNode::isSeq() const    { return type() == SEQ;  }\ninline bool FileNode::isMap() const    { return type() == MAP;  }\ninline bool FileNode::isInt() const    { return type() == INT;  }\ninline bool FileNode::isReal() const   { return type() == REAL; }\ninline bool FileNode::isString() const { return type() == STR;  }\ninline CvFileNode* FileNode::operator *() { return (CvFileNode*)node; }\ninline const CvFileNode* FileNode::operator* () const { return node; }\ninline FileNode::operator int() const    { int value;    read(*this, value, 0);     return value; }\ninline FileNode::operator float() const  { float value;  read(*this, value, 0.f);   return value; }\ninline FileNode::operator double() const { double value; read(*this, value, 0.);    return value; }\ninline FileNode::operator String() const { String value; read(*this, value, value); return value; }\ninline FileNodeIterator FileNode::begin() const { return FileNodeIterator(fs, node); }\ninline FileNodeIterator FileNode::end() const   { return FileNodeIterator(fs, node, size()); }\ninline void FileNode::readRaw( const String& fmt, uchar* vec, size_t len ) const { begin().readRaw( fmt, vec, len ); }\ninline FileNode FileNodeIterator::operator *() const  { return FileNode(fs, (const CvFileNode*)(const void*)reader.ptr); }\ninline FileNode FileNodeIterator::operator ->() const { return FileNode(fs, (const CvFileNode*)(const void*)reader.ptr); }\ninline String::String(const FileNode& fn): cstr_(0), len_(0) { read(fn, *this, *this); }\n\n//! @endcond\n\n} // cv\n\n#endif // __OPENCV_CORE_PERSISTENCE_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/private.cuda.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_PRIVATE_CUDA_HPP__\n#define __OPENCV_CORE_PRIVATE_CUDA_HPP__\n\n#ifndef __OPENCV_BUILD\n#  error this is a private header which should not be used from outside of the OpenCV library\n#endif\n\n#include \"cvconfig.h\"\n\n#include \"opencv2/core/cvdef.h\"\n#include \"opencv2/core/base.hpp\"\n\n#include \"opencv2/core/cuda.hpp\"\n\n#ifdef HAVE_CUDA\n#  include <cuda.h>\n#  include <cuda_runtime.h>\n#  include <npp.h>\n#  include \"opencv2/core/cuda_stream_accessor.hpp\"\n#  include \"opencv2/core/cuda/common.hpp\"\n\n#  define NPP_VERSION (NPP_VERSION_MAJOR * 1000 + NPP_VERSION_MINOR * 100 + NPP_VERSION_BUILD)\n\n#  define CUDART_MINIMUM_REQUIRED_VERSION 4020\n\n#  if (CUDART_VERSION < CUDART_MINIMUM_REQUIRED_VERSION)\n#    error \"Insufficient Cuda Runtime library version, please update it.\"\n#  endif\n\n#  if defined(CUDA_ARCH_BIN_OR_PTX_10)\n#    error \"OpenCV CUDA module doesn't support NVIDIA compute capability 1.0\"\n#  endif\n#endif\n\n//! @cond IGNORED\n\nnamespace cv { namespace cuda {\n    CV_EXPORTS cv::String getNppErrorMessage(int code);\n    CV_EXPORTS cv::String getCudaDriverApiErrorMessage(int code);\n\n    CV_EXPORTS GpuMat getInputMat(InputArray _src, Stream& stream);\n\n    CV_EXPORTS GpuMat getOutputMat(OutputArray _dst, int rows, int cols, int type, Stream& stream);\n    static inline GpuMat getOutputMat(OutputArray _dst, Size size, int type, Stream& stream)\n    {\n        return getOutputMat(_dst, size.height, size.width, type, stream);\n    }\n\n    CV_EXPORTS void syncOutput(const GpuMat& dst, OutputArray _dst, Stream& stream);\n}}\n\n#ifndef HAVE_CUDA\n\nstatic inline void throw_no_cuda() { CV_Error(cv::Error::GpuNotSupported, \"The library is compiled without CUDA support\"); }\n\n#else // HAVE_CUDA\n\nstatic inline void throw_no_cuda() { CV_Error(cv::Error::StsNotImplemented, \"The called functionality is disabled for current build or platform\"); }\n\nnamespace cv { namespace cuda\n{\n    class CV_EXPORTS BufferPool\n    {\n    public:\n        explicit BufferPool(Stream& stream);\n\n        GpuMat getBuffer(int rows, int cols, int type);\n        GpuMat getBuffer(Size size, int type) { return getBuffer(size.height, size.width, type); }\n\n        GpuMat::Allocator* getAllocator() const { return allocator_; }\n\n    private:\n        GpuMat::Allocator* allocator_;\n    };\n\n    static inline void checkNppError(int code, const char* file, const int line, const char* func)\n    {\n        if (code < 0)\n            cv::error(cv::Error::GpuApiCallError, getNppErrorMessage(code), func, file, line);\n    }\n\n    static inline void checkCudaDriverApiError(int code, const char* file, const int line, const char* func)\n    {\n        if (code != CUDA_SUCCESS)\n            cv::error(cv::Error::GpuApiCallError, getCudaDriverApiErrorMessage(code), func, file, line);\n    }\n\n    template<int n> struct NPPTypeTraits;\n    template<> struct NPPTypeTraits<CV_8U>  { typedef Npp8u npp_type; };\n    template<> struct NPPTypeTraits<CV_8S>  { typedef Npp8s npp_type; };\n    template<> struct NPPTypeTraits<CV_16U> { typedef Npp16u npp_type; };\n    template<> struct NPPTypeTraits<CV_16S> { typedef Npp16s npp_type; };\n    template<> struct NPPTypeTraits<CV_32S> { typedef Npp32s npp_type; };\n    template<> struct NPPTypeTraits<CV_32F> { typedef Npp32f npp_type; };\n    template<> struct NPPTypeTraits<CV_64F> { typedef Npp64f npp_type; };\n\n    class NppStreamHandler\n    {\n    public:\n        inline explicit NppStreamHandler(Stream& newStream)\n        {\n            oldStream = nppGetStream();\n            nppSetStream(StreamAccessor::getStream(newStream));\n        }\n\n        inline explicit NppStreamHandler(cudaStream_t newStream)\n        {\n            oldStream = nppGetStream();\n            nppSetStream(newStream);\n        }\n\n        inline ~NppStreamHandler()\n        {\n            nppSetStream(oldStream);\n        }\n\n    private:\n        cudaStream_t oldStream;\n    };\n}}\n\n#define nppSafeCall(expr)  cv::cuda::checkNppError(expr, __FILE__, __LINE__, CV_Func)\n#define cuSafeCall(expr)  cv::cuda::checkCudaDriverApiError(expr, __FILE__, __LINE__, CV_Func)\n\n#endif // HAVE_CUDA\n\n//! @endcond\n\n#endif // __OPENCV_CORE_CUDA_PRIVATE_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/private.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_PRIVATE_HPP__\n#define __OPENCV_CORE_PRIVATE_HPP__\n\n#ifndef __OPENCV_BUILD\n#  error this is a private header which should not be used from outside of the OpenCV library\n#endif\n\n#include \"opencv2/core.hpp\"\n#include \"cvconfig.h\"\n\n#ifdef HAVE_EIGEN\n#  if defined __GNUC__ && defined __APPLE__\n#    pragma GCC diagnostic ignored \"-Wshadow\"\n#  endif\n#  include <Eigen/Core>\n#  include \"opencv2/core/eigen.hpp\"\n#endif\n\n#ifdef HAVE_TBB\n#  include \"tbb/tbb_stddef.h\"\n#  if TBB_VERSION_MAJOR*100 + TBB_VERSION_MINOR >= 202\n#    include \"tbb/tbb.h\"\n#    include \"tbb/task.h\"\n#    undef min\n#    undef max\n#  else\n#    undef HAVE_TBB\n#  endif\n#endif\n\n//! @cond IGNORED\n\nnamespace cv\n{\n#ifdef HAVE_TBB\n\n    typedef tbb::blocked_range<int> BlockedRange;\n\n    template<typename Body> static inline\n    void parallel_for( const BlockedRange& range, const Body& body )\n    {\n        tbb::parallel_for(range, body);\n    }\n\n    typedef tbb::split Split;\n\n    template<typename Body> static inline\n    void parallel_reduce( const BlockedRange& range, Body& body )\n    {\n        tbb::parallel_reduce(range, body);\n    }\n\n    typedef tbb::concurrent_vector<Rect> ConcurrentRectVector;\n#else\n    class BlockedRange\n    {\n    public:\n        BlockedRange() : _begin(0), _end(0), _grainsize(0) {}\n        BlockedRange(int b, int e, int g=1) : _begin(b), _end(e), _grainsize(g) {}\n        int begin() const { return _begin; }\n        int end() const { return _end; }\n        int grainsize() const { return _grainsize; }\n\n    protected:\n        int _begin, _end, _grainsize;\n    };\n\n    template<typename Body> static inline\n    void parallel_for( const BlockedRange& range, const Body& body )\n    {\n        body(range);\n    }\n    typedef std::vector<Rect> ConcurrentRectVector;\n\n    class Split {};\n\n    template<typename Body> static inline\n    void parallel_reduce( const BlockedRange& range, Body& body )\n    {\n        body(range);\n    }\n#endif\n\n    // Returns a static string if there is a parallel framework,\n    // NULL otherwise.\n    CV_EXPORTS const char* currentParallelFramework();\n} //namespace cv\n\n/****************************************************************************************\\\n*                                  Common declarations                                   *\n\\****************************************************************************************/\n\n/* the alignment of all the allocated buffers */\n#define  CV_MALLOC_ALIGN    16\n\n/* IEEE754 constants and macros */\n#define  CV_TOGGLE_FLT(x) ((x)^((int)(x) < 0 ? 0x7fffffff : 0))\n#define  CV_TOGGLE_DBL(x) ((x)^((int64)(x) < 0 ? CV_BIG_INT(0x7fffffffffffffff) : 0))\n\nstatic inline void* cvAlignPtr( const void* ptr, int align = 32 )\n{\n    CV_DbgAssert ( (align & (align-1)) == 0 );\n    return (void*)( ((size_t)ptr + align - 1) & ~(size_t)(align-1) );\n}\n\nstatic inline int cvAlign( int size, int align )\n{\n    CV_DbgAssert( (align & (align-1)) == 0 && size < INT_MAX );\n    return (size + align - 1) & -align;\n}\n\n#ifdef IPL_DEPTH_8U\nstatic inline cv::Size cvGetMatSize( const CvMat* mat )\n{\n    return cv::Size(mat->cols, mat->rows);\n}\n#endif\n\nnamespace cv\n{\nCV_EXPORTS void scalarToRawData(const cv::Scalar& s, void* buf, int type, int unroll_to = 0);\n}\n\n// property implementation macros\n\n#define CV_IMPL_PROPERTY_RO(type, name, member) \\\n    inline type get##name() const { return member; }\n\n#define CV_HELP_IMPL_PROPERTY(r_type, w_type, name, member) \\\n    CV_IMPL_PROPERTY_RO(r_type, name, member) \\\n    inline void set##name(w_type val) { member = val; }\n\n#define CV_HELP_WRAP_PROPERTY(r_type, w_type, name, internal_name, internal_obj) \\\n    r_type get##name() const { return internal_obj.get##internal_name(); } \\\n    void set##name(w_type val) { internal_obj.set##internal_name(val); }\n\n#define CV_IMPL_PROPERTY(type, name, member) CV_HELP_IMPL_PROPERTY(type, type, name, member)\n#define CV_IMPL_PROPERTY_S(type, name, member) CV_HELP_IMPL_PROPERTY(type, const type &, name, member)\n\n#define CV_WRAP_PROPERTY(type, name, internal_name, internal_obj)  CV_HELP_WRAP_PROPERTY(type, type, name, internal_name, internal_obj)\n#define CV_WRAP_PROPERTY_S(type, name, internal_name, internal_obj) CV_HELP_WRAP_PROPERTY(type, const type &, name, internal_name, internal_obj)\n\n#define CV_WRAP_SAME_PROPERTY(type, name, internal_obj) CV_WRAP_PROPERTY(type, name, name, internal_obj)\n#define CV_WRAP_SAME_PROPERTY_S(type, name, internal_obj) CV_WRAP_PROPERTY_S(type, name, name, internal_obj)\n\n/****************************************************************************************\\\n*                     Structures and macros for integration with IPP                     *\n\\****************************************************************************************/\n\n#ifdef HAVE_IPP\n#  include \"ipp.h\"\n\n#  define IPP_VERSION_X100 (IPP_VERSION_MAJOR * 100 + IPP_VERSION_MINOR)\n\n#define IPP_ALIGN 32 // required for AVX optimization\n\n#define setIppErrorStatus() cv::ipp::setIppStatus(-1, CV_Func, __FILE__, __LINE__)\n\nstatic inline IppiSize ippiSize(int width, int height)\n{\n    IppiSize size = { width, height };\n    return size;\n}\n\nstatic inline IppiSize ippiSize(const cv::Size & _size)\n{\n    IppiSize size = { _size.width, _size.height };\n    return size;\n}\n\nstatic inline IppiBorderType ippiGetBorderType(int borderTypeNI)\n{\n    return borderTypeNI == cv::BORDER_CONSTANT ? ippBorderConst :\n        borderTypeNI == cv::BORDER_WRAP ? ippBorderWrap :\n        borderTypeNI == cv::BORDER_REPLICATE ? ippBorderRepl :\n        borderTypeNI == cv::BORDER_REFLECT_101 ? ippBorderMirror :\n        borderTypeNI == cv::BORDER_REFLECT ? ippBorderMirrorR : (IppiBorderType)-1;\n}\n\nstatic inline IppDataType ippiGetDataType(int depth)\n{\n    return depth == CV_8U ? ipp8u :\n        depth == CV_8S ? ipp8s :\n        depth == CV_16U ? ipp16u :\n        depth == CV_16S ? ipp16s :\n        depth == CV_32S ? ipp32s :\n        depth == CV_32F ? ipp32f :\n        depth == CV_64F ? ipp64f : (IppDataType)-1;\n}\n\n#else\n#  define IPP_VERSION_X100 0\n#endif\n\n#define CV_IPP_CHECK_COND (cv::ipp::useIPP())\n#define CV_IPP_CHECK() if(CV_IPP_CHECK_COND)\n\n#ifndef IPPI_CALL\n#  define IPPI_CALL(func) CV_Assert((func) >= 0)\n#endif\n\n/* IPP-compatible return codes */\ntypedef enum CvStatus\n{\n    CV_BADMEMBLOCK_ERR          = -113,\n    CV_INPLACE_NOT_SUPPORTED_ERR= -112,\n    CV_UNMATCHED_ROI_ERR        = -111,\n    CV_NOTFOUND_ERR             = -110,\n    CV_BADCONVERGENCE_ERR       = -109,\n\n    CV_BADDEPTH_ERR             = -107,\n    CV_BADROI_ERR               = -106,\n    CV_BADHEADER_ERR            = -105,\n    CV_UNMATCHED_FORMATS_ERR    = -104,\n    CV_UNSUPPORTED_COI_ERR      = -103,\n    CV_UNSUPPORTED_CHANNELS_ERR = -102,\n    CV_UNSUPPORTED_DEPTH_ERR    = -101,\n    CV_UNSUPPORTED_FORMAT_ERR   = -100,\n\n    CV_BADARG_ERR               = -49,  //ipp comp\n    CV_NOTDEFINED_ERR           = -48,  //ipp comp\n\n    CV_BADCHANNELS_ERR          = -47,  //ipp comp\n    CV_BADRANGE_ERR             = -44,  //ipp comp\n    CV_BADSTEP_ERR              = -29,  //ipp comp\n\n    CV_BADFLAG_ERR              =  -12,\n    CV_DIV_BY_ZERO_ERR          =  -11, //ipp comp\n    CV_BADCOEF_ERR              =  -10,\n\n    CV_BADFACTOR_ERR            =  -7,\n    CV_BADPOINT_ERR             =  -6,\n    CV_BADSCALE_ERR             =  -4,\n    CV_OUTOFMEM_ERR             =  -3,\n    CV_NULLPTR_ERR              =  -2,\n    CV_BADSIZE_ERR              =  -1,\n    CV_NO_ERR                   =   0,\n    CV_OK                       =   CV_NO_ERR\n}\nCvStatus;\n\n#ifdef HAVE_TEGRA_OPTIMIZATION\nnamespace tegra {\n\nCV_EXPORTS bool useTegra();\nCV_EXPORTS void setUseTegra(bool flag);\n\n}\n#endif\n\n//! @endcond\n\n#endif // __OPENCV_CORE_PRIVATE_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/ptr.inl.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2013, NVIDIA Corporation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the copyright holders or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_PTR_INL_HPP__\n#define __OPENCV_CORE_PTR_INL_HPP__\n\n#include <algorithm>\n\n//! @cond IGNORED\n\nnamespace cv {\n\ntemplate<typename Y>\nvoid DefaultDeleter<Y>::operator () (Y* p) const\n{\n    delete p;\n}\n\nnamespace detail\n{\n\nstruct PtrOwner\n{\n    PtrOwner() : refCount(1)\n    {}\n\n    void incRef()\n    {\n        CV_XADD(&refCount, 1);\n    }\n\n    void decRef()\n    {\n        if (CV_XADD(&refCount, -1) == 1) deleteSelf();\n    }\n\nprotected:\n    /* This doesn't really need to be virtual, since PtrOwner is never deleted\n       directly, but it doesn't hurt and it helps avoid warnings. */\n    virtual ~PtrOwner()\n    {}\n\n    virtual void deleteSelf() = 0;\n\nprivate:\n    unsigned int refCount;\n\n    // noncopyable\n    PtrOwner(const PtrOwner&);\n    PtrOwner& operator = (const PtrOwner&);\n};\n\ntemplate<typename Y, typename D>\nstruct PtrOwnerImpl : PtrOwner\n{\n    PtrOwnerImpl(Y* p, D d) : owned(p), deleter(d)\n    {}\n\n    void deleteSelf()\n    {\n        deleter(owned);\n        delete this;\n    }\n\nprivate:\n    Y* owned;\n    D deleter;\n};\n\n\n}\n\ntemplate<typename T>\nPtr<T>::Ptr() : owner(NULL), stored(NULL)\n{}\n\ntemplate<typename T>\ntemplate<typename Y>\nPtr<T>::Ptr(Y* p)\n  : owner(p\n      ? new detail::PtrOwnerImpl<Y, DefaultDeleter<Y> >(p, DefaultDeleter<Y>())\n      : NULL),\n    stored(p)\n{}\n\ntemplate<typename T>\ntemplate<typename Y, typename D>\nPtr<T>::Ptr(Y* p, D d)\n  : owner(p\n      ? new detail::PtrOwnerImpl<Y, D>(p, d)\n      : NULL),\n    stored(p)\n{}\n\ntemplate<typename T>\nPtr<T>::Ptr(const Ptr& o) : owner(o.owner), stored(o.stored)\n{\n    if (owner) owner->incRef();\n}\n\ntemplate<typename T>\ntemplate<typename Y>\nPtr<T>::Ptr(const Ptr<Y>& o) : owner(o.owner), stored(o.stored)\n{\n    if (owner) owner->incRef();\n}\n\ntemplate<typename T>\ntemplate<typename Y>\nPtr<T>::Ptr(const Ptr<Y>& o, T* p) : owner(o.owner), stored(p)\n{\n    if (owner) owner->incRef();\n}\n\ntemplate<typename T>\nPtr<T>::~Ptr()\n{\n    release();\n}\n\ntemplate<typename T>\nPtr<T>& Ptr<T>::operator = (const Ptr<T>& o)\n{\n    Ptr(o).swap(*this);\n    return *this;\n}\n\ntemplate<typename T>\ntemplate<typename Y>\nPtr<T>& Ptr<T>::operator = (const Ptr<Y>& o)\n{\n    Ptr(o).swap(*this);\n    return *this;\n}\n\ntemplate<typename T>\nvoid Ptr<T>::release()\n{\n    if (owner) owner->decRef();\n    owner = NULL;\n    stored = NULL;\n}\n\ntemplate<typename T>\ntemplate<typename Y>\nvoid Ptr<T>::reset(Y* p)\n{\n    Ptr(p).swap(*this);\n}\n\ntemplate<typename T>\ntemplate<typename Y, typename D>\nvoid Ptr<T>::reset(Y* p, D d)\n{\n    Ptr(p, d).swap(*this);\n}\n\ntemplate<typename T>\nvoid Ptr<T>::swap(Ptr<T>& o)\n{\n    std::swap(owner, o.owner);\n    std::swap(stored, o.stored);\n}\n\ntemplate<typename T>\nT* Ptr<T>::get() const\n{\n    return stored;\n}\n\ntemplate<typename T>\ntypename detail::RefOrVoid<T>::type Ptr<T>::operator * () const\n{\n    return *stored;\n}\n\ntemplate<typename T>\nT* Ptr<T>::operator -> () const\n{\n    return stored;\n}\n\ntemplate<typename T>\nPtr<T>::operator T* () const\n{\n    return stored;\n}\n\n\ntemplate<typename T>\nbool Ptr<T>::empty() const\n{\n    return !stored;\n}\n\ntemplate<typename T>\ntemplate<typename Y>\nPtr<Y> Ptr<T>::staticCast() const\n{\n    return Ptr<Y>(*this, static_cast<Y*>(stored));\n}\n\ntemplate<typename T>\ntemplate<typename Y>\nPtr<Y> Ptr<T>::constCast() const\n{\n    return Ptr<Y>(*this, const_cast<Y*>(stored));\n}\n\ntemplate<typename T>\ntemplate<typename Y>\nPtr<Y> Ptr<T>::dynamicCast() const\n{\n    return Ptr<Y>(*this, dynamic_cast<Y*>(stored));\n}\n\ntemplate<typename T>\nvoid swap(Ptr<T>& ptr1, Ptr<T>& ptr2){\n    ptr1.swap(ptr2);\n}\n\ntemplate<typename T>\nbool operator == (const Ptr<T>& ptr1, const Ptr<T>& ptr2)\n{\n    return ptr1.get() == ptr2.get();\n}\n\ntemplate<typename T>\nbool operator != (const Ptr<T>& ptr1, const Ptr<T>& ptr2)\n{\n    return ptr1.get() != ptr2.get();\n}\n\ntemplate<typename T>\nPtr<T> makePtr()\n{\n    return Ptr<T>(new T());\n}\n\ntemplate<typename T, typename A1>\nPtr<T> makePtr(const A1& a1)\n{\n    return Ptr<T>(new T(a1));\n}\n\ntemplate<typename T, typename A1, typename A2>\nPtr<T> makePtr(const A1& a1, const A2& a2)\n{\n    return Ptr<T>(new T(a1, a2));\n}\n\ntemplate<typename T, typename A1, typename A2, typename A3>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3)\n{\n    return Ptr<T>(new T(a1, a2, a3));\n}\n\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4)\n{\n    return Ptr<T>(new T(a1, a2, a3, a4));\n}\n\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5)\n{\n    return Ptr<T>(new T(a1, a2, a3, a4, a5));\n}\n\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6)\n{\n    return Ptr<T>(new T(a1, a2, a3, a4, a5, a6));\n}\n\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7)\n{\n    return Ptr<T>(new T(a1, a2, a3, a4, a5, a6, a7));\n}\n\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8)\n{\n    return Ptr<T>(new T(a1, a2, a3, a4, a5, a6, a7, a8));\n}\n\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9)\n{\n    return Ptr<T>(new T(a1, a2, a3, a4, a5, a6, a7, a8, a9));\n}\n\ntemplate<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9, typename A10>\nPtr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10)\n{\n    return Ptr<T>(new T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10));\n}\n\n} // namespace cv\n\n//! @endcond\n\n#endif // __OPENCV_CORE_PTR_INL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/sse_utils.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_SSE_UTILS_HPP__\n#define __OPENCV_CORE_SSE_UTILS_HPP__\n\n#ifndef __cplusplus\n#  error sse_utils.hpp header must be compiled as C++\n#endif\n\n#if CV_SSE2\n\ninline void _mm_deinterleave_epi8(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0, __m128i & v_g1)\n{\n    __m128i layer1_chunk0 = _mm_unpacklo_epi8(v_r0, v_g0);\n    __m128i layer1_chunk1 = _mm_unpackhi_epi8(v_r0, v_g0);\n    __m128i layer1_chunk2 = _mm_unpacklo_epi8(v_r1, v_g1);\n    __m128i layer1_chunk3 = _mm_unpackhi_epi8(v_r1, v_g1);\n\n    __m128i layer2_chunk0 = _mm_unpacklo_epi8(layer1_chunk0, layer1_chunk2);\n    __m128i layer2_chunk1 = _mm_unpackhi_epi8(layer1_chunk0, layer1_chunk2);\n    __m128i layer2_chunk2 = _mm_unpacklo_epi8(layer1_chunk1, layer1_chunk3);\n    __m128i layer2_chunk3 = _mm_unpackhi_epi8(layer1_chunk1, layer1_chunk3);\n\n    __m128i layer3_chunk0 = _mm_unpacklo_epi8(layer2_chunk0, layer2_chunk2);\n    __m128i layer3_chunk1 = _mm_unpackhi_epi8(layer2_chunk0, layer2_chunk2);\n    __m128i layer3_chunk2 = _mm_unpacklo_epi8(layer2_chunk1, layer2_chunk3);\n    __m128i layer3_chunk3 = _mm_unpackhi_epi8(layer2_chunk1, layer2_chunk3);\n\n    __m128i layer4_chunk0 = _mm_unpacklo_epi8(layer3_chunk0, layer3_chunk2);\n    __m128i layer4_chunk1 = _mm_unpackhi_epi8(layer3_chunk0, layer3_chunk2);\n    __m128i layer4_chunk2 = _mm_unpacklo_epi8(layer3_chunk1, layer3_chunk3);\n    __m128i layer4_chunk3 = _mm_unpackhi_epi8(layer3_chunk1, layer3_chunk3);\n\n    v_r0 = _mm_unpacklo_epi8(layer4_chunk0, layer4_chunk2);\n    v_r1 = _mm_unpackhi_epi8(layer4_chunk0, layer4_chunk2);\n    v_g0 = _mm_unpacklo_epi8(layer4_chunk1, layer4_chunk3);\n    v_g1 = _mm_unpackhi_epi8(layer4_chunk1, layer4_chunk3);\n}\n\ninline void _mm_deinterleave_epi8(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0,\n                                  __m128i & v_g1, __m128i & v_b0, __m128i & v_b1)\n{\n    __m128i layer1_chunk0 = _mm_unpacklo_epi8(v_r0, v_g1);\n    __m128i layer1_chunk1 = _mm_unpackhi_epi8(v_r0, v_g1);\n    __m128i layer1_chunk2 = _mm_unpacklo_epi8(v_r1, v_b0);\n    __m128i layer1_chunk3 = _mm_unpackhi_epi8(v_r1, v_b0);\n    __m128i layer1_chunk4 = _mm_unpacklo_epi8(v_g0, v_b1);\n    __m128i layer1_chunk5 = _mm_unpackhi_epi8(v_g0, v_b1);\n\n    __m128i layer2_chunk0 = _mm_unpacklo_epi8(layer1_chunk0, layer1_chunk3);\n    __m128i layer2_chunk1 = _mm_unpackhi_epi8(layer1_chunk0, layer1_chunk3);\n    __m128i layer2_chunk2 = _mm_unpacklo_epi8(layer1_chunk1, layer1_chunk4);\n    __m128i layer2_chunk3 = _mm_unpackhi_epi8(layer1_chunk1, layer1_chunk4);\n    __m128i layer2_chunk4 = _mm_unpacklo_epi8(layer1_chunk2, layer1_chunk5);\n    __m128i layer2_chunk5 = _mm_unpackhi_epi8(layer1_chunk2, layer1_chunk5);\n\n    __m128i layer3_chunk0 = _mm_unpacklo_epi8(layer2_chunk0, layer2_chunk3);\n    __m128i layer3_chunk1 = _mm_unpackhi_epi8(layer2_chunk0, layer2_chunk3);\n    __m128i layer3_chunk2 = _mm_unpacklo_epi8(layer2_chunk1, layer2_chunk4);\n    __m128i layer3_chunk3 = _mm_unpackhi_epi8(layer2_chunk1, layer2_chunk4);\n    __m128i layer3_chunk4 = _mm_unpacklo_epi8(layer2_chunk2, layer2_chunk5);\n    __m128i layer3_chunk5 = _mm_unpackhi_epi8(layer2_chunk2, layer2_chunk5);\n\n    __m128i layer4_chunk0 = _mm_unpacklo_epi8(layer3_chunk0, layer3_chunk3);\n    __m128i layer4_chunk1 = _mm_unpackhi_epi8(layer3_chunk0, layer3_chunk3);\n    __m128i layer4_chunk2 = _mm_unpacklo_epi8(layer3_chunk1, layer3_chunk4);\n    __m128i layer4_chunk3 = _mm_unpackhi_epi8(layer3_chunk1, layer3_chunk4);\n    __m128i layer4_chunk4 = _mm_unpacklo_epi8(layer3_chunk2, layer3_chunk5);\n    __m128i layer4_chunk5 = _mm_unpackhi_epi8(layer3_chunk2, layer3_chunk5);\n\n    v_r0 = _mm_unpacklo_epi8(layer4_chunk0, layer4_chunk3);\n    v_r1 = _mm_unpackhi_epi8(layer4_chunk0, layer4_chunk3);\n    v_g0 = _mm_unpacklo_epi8(layer4_chunk1, layer4_chunk4);\n    v_g1 = _mm_unpackhi_epi8(layer4_chunk1, layer4_chunk4);\n    v_b0 = _mm_unpacklo_epi8(layer4_chunk2, layer4_chunk5);\n    v_b1 = _mm_unpackhi_epi8(layer4_chunk2, layer4_chunk5);\n}\n\ninline void _mm_deinterleave_epi8(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0, __m128i & v_g1,\n                                  __m128i & v_b0, __m128i & v_b1, __m128i & v_a0, __m128i & v_a1)\n{\n    __m128i layer1_chunk0 = _mm_unpacklo_epi8(v_r0, v_b0);\n    __m128i layer1_chunk1 = _mm_unpackhi_epi8(v_r0, v_b0);\n    __m128i layer1_chunk2 = _mm_unpacklo_epi8(v_r1, v_b1);\n    __m128i layer1_chunk3 = _mm_unpackhi_epi8(v_r1, v_b1);\n    __m128i layer1_chunk4 = _mm_unpacklo_epi8(v_g0, v_a0);\n    __m128i layer1_chunk5 = _mm_unpackhi_epi8(v_g0, v_a0);\n    __m128i layer1_chunk6 = _mm_unpacklo_epi8(v_g1, v_a1);\n    __m128i layer1_chunk7 = _mm_unpackhi_epi8(v_g1, v_a1);\n\n    __m128i layer2_chunk0 = _mm_unpacklo_epi8(layer1_chunk0, layer1_chunk4);\n    __m128i layer2_chunk1 = _mm_unpackhi_epi8(layer1_chunk0, layer1_chunk4);\n    __m128i layer2_chunk2 = _mm_unpacklo_epi8(layer1_chunk1, layer1_chunk5);\n    __m128i layer2_chunk3 = _mm_unpackhi_epi8(layer1_chunk1, layer1_chunk5);\n    __m128i layer2_chunk4 = _mm_unpacklo_epi8(layer1_chunk2, layer1_chunk6);\n    __m128i layer2_chunk5 = _mm_unpackhi_epi8(layer1_chunk2, layer1_chunk6);\n    __m128i layer2_chunk6 = _mm_unpacklo_epi8(layer1_chunk3, layer1_chunk7);\n    __m128i layer2_chunk7 = _mm_unpackhi_epi8(layer1_chunk3, layer1_chunk7);\n\n    __m128i layer3_chunk0 = _mm_unpacklo_epi8(layer2_chunk0, layer2_chunk4);\n    __m128i layer3_chunk1 = _mm_unpackhi_epi8(layer2_chunk0, layer2_chunk4);\n    __m128i layer3_chunk2 = _mm_unpacklo_epi8(layer2_chunk1, layer2_chunk5);\n    __m128i layer3_chunk3 = _mm_unpackhi_epi8(layer2_chunk1, layer2_chunk5);\n    __m128i layer3_chunk4 = _mm_unpacklo_epi8(layer2_chunk2, layer2_chunk6);\n    __m128i layer3_chunk5 = _mm_unpackhi_epi8(layer2_chunk2, layer2_chunk6);\n    __m128i layer3_chunk6 = _mm_unpacklo_epi8(layer2_chunk3, layer2_chunk7);\n    __m128i layer3_chunk7 = _mm_unpackhi_epi8(layer2_chunk3, layer2_chunk7);\n\n    __m128i layer4_chunk0 = _mm_unpacklo_epi8(layer3_chunk0, layer3_chunk4);\n    __m128i layer4_chunk1 = _mm_unpackhi_epi8(layer3_chunk0, layer3_chunk4);\n    __m128i layer4_chunk2 = _mm_unpacklo_epi8(layer3_chunk1, layer3_chunk5);\n    __m128i layer4_chunk3 = _mm_unpackhi_epi8(layer3_chunk1, layer3_chunk5);\n    __m128i layer4_chunk4 = _mm_unpacklo_epi8(layer3_chunk2, layer3_chunk6);\n    __m128i layer4_chunk5 = _mm_unpackhi_epi8(layer3_chunk2, layer3_chunk6);\n    __m128i layer4_chunk6 = _mm_unpacklo_epi8(layer3_chunk3, layer3_chunk7);\n    __m128i layer4_chunk7 = _mm_unpackhi_epi8(layer3_chunk3, layer3_chunk7);\n\n    v_r0 = _mm_unpacklo_epi8(layer4_chunk0, layer4_chunk4);\n    v_r1 = _mm_unpackhi_epi8(layer4_chunk0, layer4_chunk4);\n    v_g0 = _mm_unpacklo_epi8(layer4_chunk1, layer4_chunk5);\n    v_g1 = _mm_unpackhi_epi8(layer4_chunk1, layer4_chunk5);\n    v_b0 = _mm_unpacklo_epi8(layer4_chunk2, layer4_chunk6);\n    v_b1 = _mm_unpackhi_epi8(layer4_chunk2, layer4_chunk6);\n    v_a0 = _mm_unpacklo_epi8(layer4_chunk3, layer4_chunk7);\n    v_a1 = _mm_unpackhi_epi8(layer4_chunk3, layer4_chunk7);\n}\n\ninline void _mm_interleave_epi8(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0, __m128i & v_g1)\n{\n    __m128i v_mask = _mm_set1_epi16(0x00ff);\n\n    __m128i layer4_chunk0 = _mm_packus_epi16(_mm_and_si128(v_r0, v_mask), _mm_and_si128(v_r1, v_mask));\n    __m128i layer4_chunk2 = _mm_packus_epi16(_mm_srli_epi16(v_r0, 8), _mm_srli_epi16(v_r1, 8));\n    __m128i layer4_chunk1 = _mm_packus_epi16(_mm_and_si128(v_g0, v_mask), _mm_and_si128(v_g1, v_mask));\n    __m128i layer4_chunk3 = _mm_packus_epi16(_mm_srli_epi16(v_g0, 8), _mm_srli_epi16(v_g1, 8));\n\n    __m128i layer3_chunk0 = _mm_packus_epi16(_mm_and_si128(layer4_chunk0, v_mask), _mm_and_si128(layer4_chunk1, v_mask));\n    __m128i layer3_chunk2 = _mm_packus_epi16(_mm_srli_epi16(layer4_chunk0, 8), _mm_srli_epi16(layer4_chunk1, 8));\n    __m128i layer3_chunk1 = _mm_packus_epi16(_mm_and_si128(layer4_chunk2, v_mask), _mm_and_si128(layer4_chunk3, v_mask));\n    __m128i layer3_chunk3 = _mm_packus_epi16(_mm_srli_epi16(layer4_chunk2, 8), _mm_srli_epi16(layer4_chunk3, 8));\n\n    __m128i layer2_chunk0 = _mm_packus_epi16(_mm_and_si128(layer3_chunk0, v_mask), _mm_and_si128(layer3_chunk1, v_mask));\n    __m128i layer2_chunk2 = _mm_packus_epi16(_mm_srli_epi16(layer3_chunk0, 8), _mm_srli_epi16(layer3_chunk1, 8));\n    __m128i layer2_chunk1 = _mm_packus_epi16(_mm_and_si128(layer3_chunk2, v_mask), _mm_and_si128(layer3_chunk3, v_mask));\n    __m128i layer2_chunk3 = _mm_packus_epi16(_mm_srli_epi16(layer3_chunk2, 8), _mm_srli_epi16(layer3_chunk3, 8));\n\n    __m128i layer1_chunk0 = _mm_packus_epi16(_mm_and_si128(layer2_chunk0, v_mask), _mm_and_si128(layer2_chunk1, v_mask));\n    __m128i layer1_chunk2 = _mm_packus_epi16(_mm_srli_epi16(layer2_chunk0, 8), _mm_srli_epi16(layer2_chunk1, 8));\n    __m128i layer1_chunk1 = _mm_packus_epi16(_mm_and_si128(layer2_chunk2, v_mask), _mm_and_si128(layer2_chunk3, v_mask));\n    __m128i layer1_chunk3 = _mm_packus_epi16(_mm_srli_epi16(layer2_chunk2, 8), _mm_srli_epi16(layer2_chunk3, 8));\n\n    v_r0 = _mm_packus_epi16(_mm_and_si128(layer1_chunk0, v_mask), _mm_and_si128(layer1_chunk1, v_mask));\n    v_g0 = _mm_packus_epi16(_mm_srli_epi16(layer1_chunk0, 8), _mm_srli_epi16(layer1_chunk1, 8));\n    v_r1 = _mm_packus_epi16(_mm_and_si128(layer1_chunk2, v_mask), _mm_and_si128(layer1_chunk3, v_mask));\n    v_g1 = _mm_packus_epi16(_mm_srli_epi16(layer1_chunk2, 8), _mm_srli_epi16(layer1_chunk3, 8));\n}\n\ninline void _mm_interleave_epi8(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0,\n                                __m128i & v_g1, __m128i & v_b0, __m128i & v_b1)\n{\n    __m128i v_mask = _mm_set1_epi16(0x00ff);\n\n    __m128i layer4_chunk0 = _mm_packus_epi16(_mm_and_si128(v_r0, v_mask), _mm_and_si128(v_r1, v_mask));\n    __m128i layer4_chunk3 = _mm_packus_epi16(_mm_srli_epi16(v_r0, 8), _mm_srli_epi16(v_r1, 8));\n    __m128i layer4_chunk1 = _mm_packus_epi16(_mm_and_si128(v_g0, v_mask), _mm_and_si128(v_g1, v_mask));\n    __m128i layer4_chunk4 = _mm_packus_epi16(_mm_srli_epi16(v_g0, 8), _mm_srli_epi16(v_g1, 8));\n    __m128i layer4_chunk2 = _mm_packus_epi16(_mm_and_si128(v_b0, v_mask), _mm_and_si128(v_b1, v_mask));\n    __m128i layer4_chunk5 = _mm_packus_epi16(_mm_srli_epi16(v_b0, 8), _mm_srli_epi16(v_b1, 8));\n\n    __m128i layer3_chunk0 = _mm_packus_epi16(_mm_and_si128(layer4_chunk0, v_mask), _mm_and_si128(layer4_chunk1, v_mask));\n    __m128i layer3_chunk3 = _mm_packus_epi16(_mm_srli_epi16(layer4_chunk0, 8), _mm_srli_epi16(layer4_chunk1, 8));\n    __m128i layer3_chunk1 = _mm_packus_epi16(_mm_and_si128(layer4_chunk2, v_mask), _mm_and_si128(layer4_chunk3, v_mask));\n    __m128i layer3_chunk4 = _mm_packus_epi16(_mm_srli_epi16(layer4_chunk2, 8), _mm_srli_epi16(layer4_chunk3, 8));\n    __m128i layer3_chunk2 = _mm_packus_epi16(_mm_and_si128(layer4_chunk4, v_mask), _mm_and_si128(layer4_chunk5, v_mask));\n    __m128i layer3_chunk5 = _mm_packus_epi16(_mm_srli_epi16(layer4_chunk4, 8), _mm_srli_epi16(layer4_chunk5, 8));\n\n    __m128i layer2_chunk0 = _mm_packus_epi16(_mm_and_si128(layer3_chunk0, v_mask), _mm_and_si128(layer3_chunk1, v_mask));\n    __m128i layer2_chunk3 = _mm_packus_epi16(_mm_srli_epi16(layer3_chunk0, 8), _mm_srli_epi16(layer3_chunk1, 8));\n    __m128i layer2_chunk1 = _mm_packus_epi16(_mm_and_si128(layer3_chunk2, v_mask), _mm_and_si128(layer3_chunk3, v_mask));\n    __m128i layer2_chunk4 = _mm_packus_epi16(_mm_srli_epi16(layer3_chunk2, 8), _mm_srli_epi16(layer3_chunk3, 8));\n    __m128i layer2_chunk2 = _mm_packus_epi16(_mm_and_si128(layer3_chunk4, v_mask), _mm_and_si128(layer3_chunk5, v_mask));\n    __m128i layer2_chunk5 = _mm_packus_epi16(_mm_srli_epi16(layer3_chunk4, 8), _mm_srli_epi16(layer3_chunk5, 8));\n\n    __m128i layer1_chunk0 = _mm_packus_epi16(_mm_and_si128(layer2_chunk0, v_mask), _mm_and_si128(layer2_chunk1, v_mask));\n    __m128i layer1_chunk3 = _mm_packus_epi16(_mm_srli_epi16(layer2_chunk0, 8), _mm_srli_epi16(layer2_chunk1, 8));\n    __m128i layer1_chunk1 = _mm_packus_epi16(_mm_and_si128(layer2_chunk2, v_mask), _mm_and_si128(layer2_chunk3, v_mask));\n    __m128i layer1_chunk4 = _mm_packus_epi16(_mm_srli_epi16(layer2_chunk2, 8), _mm_srli_epi16(layer2_chunk3, 8));\n    __m128i layer1_chunk2 = _mm_packus_epi16(_mm_and_si128(layer2_chunk4, v_mask), _mm_and_si128(layer2_chunk5, v_mask));\n    __m128i layer1_chunk5 = _mm_packus_epi16(_mm_srli_epi16(layer2_chunk4, 8), _mm_srli_epi16(layer2_chunk5, 8));\n\n    v_r0 = _mm_packus_epi16(_mm_and_si128(layer1_chunk0, v_mask), _mm_and_si128(layer1_chunk1, v_mask));\n    v_g1 = _mm_packus_epi16(_mm_srli_epi16(layer1_chunk0, 8), _mm_srli_epi16(layer1_chunk1, 8));\n    v_r1 = _mm_packus_epi16(_mm_and_si128(layer1_chunk2, v_mask), _mm_and_si128(layer1_chunk3, v_mask));\n    v_b0 = _mm_packus_epi16(_mm_srli_epi16(layer1_chunk2, 8), _mm_srli_epi16(layer1_chunk3, 8));\n    v_g0 = _mm_packus_epi16(_mm_and_si128(layer1_chunk4, v_mask), _mm_and_si128(layer1_chunk5, v_mask));\n    v_b1 = _mm_packus_epi16(_mm_srli_epi16(layer1_chunk4, 8), _mm_srli_epi16(layer1_chunk5, 8));\n}\n\ninline void _mm_interleave_epi8(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0, __m128i & v_g1,\n                                __m128i & v_b0, __m128i & v_b1, __m128i & v_a0, __m128i & v_a1)\n{\n    __m128i v_mask = _mm_set1_epi16(0x00ff);\n\n    __m128i layer4_chunk0 = _mm_packus_epi16(_mm_and_si128(v_r0, v_mask), _mm_and_si128(v_r1, v_mask));\n    __m128i layer4_chunk4 = _mm_packus_epi16(_mm_srli_epi16(v_r0, 8), _mm_srli_epi16(v_r1, 8));\n    __m128i layer4_chunk1 = _mm_packus_epi16(_mm_and_si128(v_g0, v_mask), _mm_and_si128(v_g1, v_mask));\n    __m128i layer4_chunk5 = _mm_packus_epi16(_mm_srli_epi16(v_g0, 8), _mm_srli_epi16(v_g1, 8));\n    __m128i layer4_chunk2 = _mm_packus_epi16(_mm_and_si128(v_b0, v_mask), _mm_and_si128(v_b1, v_mask));\n    __m128i layer4_chunk6 = _mm_packus_epi16(_mm_srli_epi16(v_b0, 8), _mm_srli_epi16(v_b1, 8));\n    __m128i layer4_chunk3 = _mm_packus_epi16(_mm_and_si128(v_a0, v_mask), _mm_and_si128(v_a1, v_mask));\n    __m128i layer4_chunk7 = _mm_packus_epi16(_mm_srli_epi16(v_a0, 8), _mm_srli_epi16(v_a1, 8));\n\n    __m128i layer3_chunk0 = _mm_packus_epi16(_mm_and_si128(layer4_chunk0, v_mask), _mm_and_si128(layer4_chunk1, v_mask));\n    __m128i layer3_chunk4 = _mm_packus_epi16(_mm_srli_epi16(layer4_chunk0, 8), _mm_srli_epi16(layer4_chunk1, 8));\n    __m128i layer3_chunk1 = _mm_packus_epi16(_mm_and_si128(layer4_chunk2, v_mask), _mm_and_si128(layer4_chunk3, v_mask));\n    __m128i layer3_chunk5 = _mm_packus_epi16(_mm_srli_epi16(layer4_chunk2, 8), _mm_srli_epi16(layer4_chunk3, 8));\n    __m128i layer3_chunk2 = _mm_packus_epi16(_mm_and_si128(layer4_chunk4, v_mask), _mm_and_si128(layer4_chunk5, v_mask));\n    __m128i layer3_chunk6 = _mm_packus_epi16(_mm_srli_epi16(layer4_chunk4, 8), _mm_srli_epi16(layer4_chunk5, 8));\n    __m128i layer3_chunk3 = _mm_packus_epi16(_mm_and_si128(layer4_chunk6, v_mask), _mm_and_si128(layer4_chunk7, v_mask));\n    __m128i layer3_chunk7 = _mm_packus_epi16(_mm_srli_epi16(layer4_chunk6, 8), _mm_srli_epi16(layer4_chunk7, 8));\n\n    __m128i layer2_chunk0 = _mm_packus_epi16(_mm_and_si128(layer3_chunk0, v_mask), _mm_and_si128(layer3_chunk1, v_mask));\n    __m128i layer2_chunk4 = _mm_packus_epi16(_mm_srli_epi16(layer3_chunk0, 8), _mm_srli_epi16(layer3_chunk1, 8));\n    __m128i layer2_chunk1 = _mm_packus_epi16(_mm_and_si128(layer3_chunk2, v_mask), _mm_and_si128(layer3_chunk3, v_mask));\n    __m128i layer2_chunk5 = _mm_packus_epi16(_mm_srli_epi16(layer3_chunk2, 8), _mm_srli_epi16(layer3_chunk3, 8));\n    __m128i layer2_chunk2 = _mm_packus_epi16(_mm_and_si128(layer3_chunk4, v_mask), _mm_and_si128(layer3_chunk5, v_mask));\n    __m128i layer2_chunk6 = _mm_packus_epi16(_mm_srli_epi16(layer3_chunk4, 8), _mm_srli_epi16(layer3_chunk5, 8));\n    __m128i layer2_chunk3 = _mm_packus_epi16(_mm_and_si128(layer3_chunk6, v_mask), _mm_and_si128(layer3_chunk7, v_mask));\n    __m128i layer2_chunk7 = _mm_packus_epi16(_mm_srli_epi16(layer3_chunk6, 8), _mm_srli_epi16(layer3_chunk7, 8));\n\n    __m128i layer1_chunk0 = _mm_packus_epi16(_mm_and_si128(layer2_chunk0, v_mask), _mm_and_si128(layer2_chunk1, v_mask));\n    __m128i layer1_chunk4 = _mm_packus_epi16(_mm_srli_epi16(layer2_chunk0, 8), _mm_srli_epi16(layer2_chunk1, 8));\n    __m128i layer1_chunk1 = _mm_packus_epi16(_mm_and_si128(layer2_chunk2, v_mask), _mm_and_si128(layer2_chunk3, v_mask));\n    __m128i layer1_chunk5 = _mm_packus_epi16(_mm_srli_epi16(layer2_chunk2, 8), _mm_srli_epi16(layer2_chunk3, 8));\n    __m128i layer1_chunk2 = _mm_packus_epi16(_mm_and_si128(layer2_chunk4, v_mask), _mm_and_si128(layer2_chunk5, v_mask));\n    __m128i layer1_chunk6 = _mm_packus_epi16(_mm_srli_epi16(layer2_chunk4, 8), _mm_srli_epi16(layer2_chunk5, 8));\n    __m128i layer1_chunk3 = _mm_packus_epi16(_mm_and_si128(layer2_chunk6, v_mask), _mm_and_si128(layer2_chunk7, v_mask));\n    __m128i layer1_chunk7 = _mm_packus_epi16(_mm_srli_epi16(layer2_chunk6, 8), _mm_srli_epi16(layer2_chunk7, 8));\n\n    v_r0 = _mm_packus_epi16(_mm_and_si128(layer1_chunk0, v_mask), _mm_and_si128(layer1_chunk1, v_mask));\n    v_b0 = _mm_packus_epi16(_mm_srli_epi16(layer1_chunk0, 8), _mm_srli_epi16(layer1_chunk1, 8));\n    v_r1 = _mm_packus_epi16(_mm_and_si128(layer1_chunk2, v_mask), _mm_and_si128(layer1_chunk3, v_mask));\n    v_b1 = _mm_packus_epi16(_mm_srli_epi16(layer1_chunk2, 8), _mm_srli_epi16(layer1_chunk3, 8));\n    v_g0 = _mm_packus_epi16(_mm_and_si128(layer1_chunk4, v_mask), _mm_and_si128(layer1_chunk5, v_mask));\n    v_a0 = _mm_packus_epi16(_mm_srli_epi16(layer1_chunk4, 8), _mm_srli_epi16(layer1_chunk5, 8));\n    v_g1 = _mm_packus_epi16(_mm_and_si128(layer1_chunk6, v_mask), _mm_and_si128(layer1_chunk7, v_mask));\n    v_a1 = _mm_packus_epi16(_mm_srli_epi16(layer1_chunk6, 8), _mm_srli_epi16(layer1_chunk7, 8));\n}\n\ninline void _mm_deinterleave_epi16(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0, __m128i & v_g1)\n{\n    __m128i layer1_chunk0 = _mm_unpacklo_epi16(v_r0, v_g0);\n    __m128i layer1_chunk1 = _mm_unpackhi_epi16(v_r0, v_g0);\n    __m128i layer1_chunk2 = _mm_unpacklo_epi16(v_r1, v_g1);\n    __m128i layer1_chunk3 = _mm_unpackhi_epi16(v_r1, v_g1);\n\n    __m128i layer2_chunk0 = _mm_unpacklo_epi16(layer1_chunk0, layer1_chunk2);\n    __m128i layer2_chunk1 = _mm_unpackhi_epi16(layer1_chunk0, layer1_chunk2);\n    __m128i layer2_chunk2 = _mm_unpacklo_epi16(layer1_chunk1, layer1_chunk3);\n    __m128i layer2_chunk3 = _mm_unpackhi_epi16(layer1_chunk1, layer1_chunk3);\n\n    __m128i layer3_chunk0 = _mm_unpacklo_epi16(layer2_chunk0, layer2_chunk2);\n    __m128i layer3_chunk1 = _mm_unpackhi_epi16(layer2_chunk0, layer2_chunk2);\n    __m128i layer3_chunk2 = _mm_unpacklo_epi16(layer2_chunk1, layer2_chunk3);\n    __m128i layer3_chunk3 = _mm_unpackhi_epi16(layer2_chunk1, layer2_chunk3);\n\n    v_r0 = _mm_unpacklo_epi16(layer3_chunk0, layer3_chunk2);\n    v_r1 = _mm_unpackhi_epi16(layer3_chunk0, layer3_chunk2);\n    v_g0 = _mm_unpacklo_epi16(layer3_chunk1, layer3_chunk3);\n    v_g1 = _mm_unpackhi_epi16(layer3_chunk1, layer3_chunk3);\n}\n\ninline void _mm_deinterleave_epi16(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0,\n                                   __m128i & v_g1, __m128i & v_b0, __m128i & v_b1)\n{\n    __m128i layer1_chunk0 = _mm_unpacklo_epi16(v_r0, v_g1);\n    __m128i layer1_chunk1 = _mm_unpackhi_epi16(v_r0, v_g1);\n    __m128i layer1_chunk2 = _mm_unpacklo_epi16(v_r1, v_b0);\n    __m128i layer1_chunk3 = _mm_unpackhi_epi16(v_r1, v_b0);\n    __m128i layer1_chunk4 = _mm_unpacklo_epi16(v_g0, v_b1);\n    __m128i layer1_chunk5 = _mm_unpackhi_epi16(v_g0, v_b1);\n\n    __m128i layer2_chunk0 = _mm_unpacklo_epi16(layer1_chunk0, layer1_chunk3);\n    __m128i layer2_chunk1 = _mm_unpackhi_epi16(layer1_chunk0, layer1_chunk3);\n    __m128i layer2_chunk2 = _mm_unpacklo_epi16(layer1_chunk1, layer1_chunk4);\n    __m128i layer2_chunk3 = _mm_unpackhi_epi16(layer1_chunk1, layer1_chunk4);\n    __m128i layer2_chunk4 = _mm_unpacklo_epi16(layer1_chunk2, layer1_chunk5);\n    __m128i layer2_chunk5 = _mm_unpackhi_epi16(layer1_chunk2, layer1_chunk5);\n\n    __m128i layer3_chunk0 = _mm_unpacklo_epi16(layer2_chunk0, layer2_chunk3);\n    __m128i layer3_chunk1 = _mm_unpackhi_epi16(layer2_chunk0, layer2_chunk3);\n    __m128i layer3_chunk2 = _mm_unpacklo_epi16(layer2_chunk1, layer2_chunk4);\n    __m128i layer3_chunk3 = _mm_unpackhi_epi16(layer2_chunk1, layer2_chunk4);\n    __m128i layer3_chunk4 = _mm_unpacklo_epi16(layer2_chunk2, layer2_chunk5);\n    __m128i layer3_chunk5 = _mm_unpackhi_epi16(layer2_chunk2, layer2_chunk5);\n\n    v_r0 = _mm_unpacklo_epi16(layer3_chunk0, layer3_chunk3);\n    v_r1 = _mm_unpackhi_epi16(layer3_chunk0, layer3_chunk3);\n    v_g0 = _mm_unpacklo_epi16(layer3_chunk1, layer3_chunk4);\n    v_g1 = _mm_unpackhi_epi16(layer3_chunk1, layer3_chunk4);\n    v_b0 = _mm_unpacklo_epi16(layer3_chunk2, layer3_chunk5);\n    v_b1 = _mm_unpackhi_epi16(layer3_chunk2, layer3_chunk5);\n}\n\ninline void _mm_deinterleave_epi16(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0, __m128i & v_g1,\n                                   __m128i & v_b0, __m128i & v_b1, __m128i & v_a0, __m128i & v_a1)\n{\n    __m128i layer1_chunk0 = _mm_unpacklo_epi16(v_r0, v_b0);\n    __m128i layer1_chunk1 = _mm_unpackhi_epi16(v_r0, v_b0);\n    __m128i layer1_chunk2 = _mm_unpacklo_epi16(v_r1, v_b1);\n    __m128i layer1_chunk3 = _mm_unpackhi_epi16(v_r1, v_b1);\n    __m128i layer1_chunk4 = _mm_unpacklo_epi16(v_g0, v_a0);\n    __m128i layer1_chunk5 = _mm_unpackhi_epi16(v_g0, v_a0);\n    __m128i layer1_chunk6 = _mm_unpacklo_epi16(v_g1, v_a1);\n    __m128i layer1_chunk7 = _mm_unpackhi_epi16(v_g1, v_a1);\n\n    __m128i layer2_chunk0 = _mm_unpacklo_epi16(layer1_chunk0, layer1_chunk4);\n    __m128i layer2_chunk1 = _mm_unpackhi_epi16(layer1_chunk0, layer1_chunk4);\n    __m128i layer2_chunk2 = _mm_unpacklo_epi16(layer1_chunk1, layer1_chunk5);\n    __m128i layer2_chunk3 = _mm_unpackhi_epi16(layer1_chunk1, layer1_chunk5);\n    __m128i layer2_chunk4 = _mm_unpacklo_epi16(layer1_chunk2, layer1_chunk6);\n    __m128i layer2_chunk5 = _mm_unpackhi_epi16(layer1_chunk2, layer1_chunk6);\n    __m128i layer2_chunk6 = _mm_unpacklo_epi16(layer1_chunk3, layer1_chunk7);\n    __m128i layer2_chunk7 = _mm_unpackhi_epi16(layer1_chunk3, layer1_chunk7);\n\n    __m128i layer3_chunk0 = _mm_unpacklo_epi16(layer2_chunk0, layer2_chunk4);\n    __m128i layer3_chunk1 = _mm_unpackhi_epi16(layer2_chunk0, layer2_chunk4);\n    __m128i layer3_chunk2 = _mm_unpacklo_epi16(layer2_chunk1, layer2_chunk5);\n    __m128i layer3_chunk3 = _mm_unpackhi_epi16(layer2_chunk1, layer2_chunk5);\n    __m128i layer3_chunk4 = _mm_unpacklo_epi16(layer2_chunk2, layer2_chunk6);\n    __m128i layer3_chunk5 = _mm_unpackhi_epi16(layer2_chunk2, layer2_chunk6);\n    __m128i layer3_chunk6 = _mm_unpacklo_epi16(layer2_chunk3, layer2_chunk7);\n    __m128i layer3_chunk7 = _mm_unpackhi_epi16(layer2_chunk3, layer2_chunk7);\n\n    v_r0 = _mm_unpacklo_epi16(layer3_chunk0, layer3_chunk4);\n    v_r1 = _mm_unpackhi_epi16(layer3_chunk0, layer3_chunk4);\n    v_g0 = _mm_unpacklo_epi16(layer3_chunk1, layer3_chunk5);\n    v_g1 = _mm_unpackhi_epi16(layer3_chunk1, layer3_chunk5);\n    v_b0 = _mm_unpacklo_epi16(layer3_chunk2, layer3_chunk6);\n    v_b1 = _mm_unpackhi_epi16(layer3_chunk2, layer3_chunk6);\n    v_a0 = _mm_unpacklo_epi16(layer3_chunk3, layer3_chunk7);\n    v_a1 = _mm_unpackhi_epi16(layer3_chunk3, layer3_chunk7);\n}\n\n#if CV_SSE4_1\n\ninline void _mm_interleave_epi16(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0, __m128i & v_g1)\n{\n    __m128i v_mask = _mm_set1_epi32(0x0000ffff);\n\n    __m128i layer3_chunk0 = _mm_packus_epi32(_mm_and_si128(v_r0, v_mask), _mm_and_si128(v_r1, v_mask));\n    __m128i layer3_chunk2 = _mm_packus_epi32(_mm_srli_epi32(v_r0, 16), _mm_srli_epi32(v_r1, 16));\n    __m128i layer3_chunk1 = _mm_packus_epi32(_mm_and_si128(v_g0, v_mask), _mm_and_si128(v_g1, v_mask));\n    __m128i layer3_chunk3 = _mm_packus_epi32(_mm_srli_epi32(v_g0, 16), _mm_srli_epi32(v_g1, 16));\n\n    __m128i layer2_chunk0 = _mm_packus_epi32(_mm_and_si128(layer3_chunk0, v_mask), _mm_and_si128(layer3_chunk1, v_mask));\n    __m128i layer2_chunk2 = _mm_packus_epi32(_mm_srli_epi32(layer3_chunk0, 16), _mm_srli_epi32(layer3_chunk1, 16));\n    __m128i layer2_chunk1 = _mm_packus_epi32(_mm_and_si128(layer3_chunk2, v_mask), _mm_and_si128(layer3_chunk3, v_mask));\n    __m128i layer2_chunk3 = _mm_packus_epi32(_mm_srli_epi32(layer3_chunk2, 16), _mm_srli_epi32(layer3_chunk3, 16));\n\n    __m128i layer1_chunk0 = _mm_packus_epi32(_mm_and_si128(layer2_chunk0, v_mask), _mm_and_si128(layer2_chunk1, v_mask));\n    __m128i layer1_chunk2 = _mm_packus_epi32(_mm_srli_epi32(layer2_chunk0, 16), _mm_srli_epi32(layer2_chunk1, 16));\n    __m128i layer1_chunk1 = _mm_packus_epi32(_mm_and_si128(layer2_chunk2, v_mask), _mm_and_si128(layer2_chunk3, v_mask));\n    __m128i layer1_chunk3 = _mm_packus_epi32(_mm_srli_epi32(layer2_chunk2, 16), _mm_srli_epi32(layer2_chunk3, 16));\n\n    v_r0 = _mm_packus_epi32(_mm_and_si128(layer1_chunk0, v_mask), _mm_and_si128(layer1_chunk1, v_mask));\n    v_g0 = _mm_packus_epi32(_mm_srli_epi32(layer1_chunk0, 16), _mm_srli_epi32(layer1_chunk1, 16));\n    v_r1 = _mm_packus_epi32(_mm_and_si128(layer1_chunk2, v_mask), _mm_and_si128(layer1_chunk3, v_mask));\n    v_g1 = _mm_packus_epi32(_mm_srli_epi32(layer1_chunk2, 16), _mm_srli_epi32(layer1_chunk3, 16));\n}\n\ninline void _mm_interleave_epi16(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0,\n                                 __m128i & v_g1, __m128i & v_b0, __m128i & v_b1)\n{\n    __m128i v_mask = _mm_set1_epi32(0x0000ffff);\n\n    __m128i layer3_chunk0 = _mm_packus_epi32(_mm_and_si128(v_r0, v_mask), _mm_and_si128(v_r1, v_mask));\n    __m128i layer3_chunk3 = _mm_packus_epi32(_mm_srli_epi32(v_r0, 16), _mm_srli_epi32(v_r1, 16));\n    __m128i layer3_chunk1 = _mm_packus_epi32(_mm_and_si128(v_g0, v_mask), _mm_and_si128(v_g1, v_mask));\n    __m128i layer3_chunk4 = _mm_packus_epi32(_mm_srli_epi32(v_g0, 16), _mm_srli_epi32(v_g1, 16));\n    __m128i layer3_chunk2 = _mm_packus_epi32(_mm_and_si128(v_b0, v_mask), _mm_and_si128(v_b1, v_mask));\n    __m128i layer3_chunk5 = _mm_packus_epi32(_mm_srli_epi32(v_b0, 16), _mm_srli_epi32(v_b1, 16));\n\n    __m128i layer2_chunk0 = _mm_packus_epi32(_mm_and_si128(layer3_chunk0, v_mask), _mm_and_si128(layer3_chunk1, v_mask));\n    __m128i layer2_chunk3 = _mm_packus_epi32(_mm_srli_epi32(layer3_chunk0, 16), _mm_srli_epi32(layer3_chunk1, 16));\n    __m128i layer2_chunk1 = _mm_packus_epi32(_mm_and_si128(layer3_chunk2, v_mask), _mm_and_si128(layer3_chunk3, v_mask));\n    __m128i layer2_chunk4 = _mm_packus_epi32(_mm_srli_epi32(layer3_chunk2, 16), _mm_srli_epi32(layer3_chunk3, 16));\n    __m128i layer2_chunk2 = _mm_packus_epi32(_mm_and_si128(layer3_chunk4, v_mask), _mm_and_si128(layer3_chunk5, v_mask));\n    __m128i layer2_chunk5 = _mm_packus_epi32(_mm_srli_epi32(layer3_chunk4, 16), _mm_srli_epi32(layer3_chunk5, 16));\n\n    __m128i layer1_chunk0 = _mm_packus_epi32(_mm_and_si128(layer2_chunk0, v_mask), _mm_and_si128(layer2_chunk1, v_mask));\n    __m128i layer1_chunk3 = _mm_packus_epi32(_mm_srli_epi32(layer2_chunk0, 16), _mm_srli_epi32(layer2_chunk1, 16));\n    __m128i layer1_chunk1 = _mm_packus_epi32(_mm_and_si128(layer2_chunk2, v_mask), _mm_and_si128(layer2_chunk3, v_mask));\n    __m128i layer1_chunk4 = _mm_packus_epi32(_mm_srli_epi32(layer2_chunk2, 16), _mm_srli_epi32(layer2_chunk3, 16));\n    __m128i layer1_chunk2 = _mm_packus_epi32(_mm_and_si128(layer2_chunk4, v_mask), _mm_and_si128(layer2_chunk5, v_mask));\n    __m128i layer1_chunk5 = _mm_packus_epi32(_mm_srli_epi32(layer2_chunk4, 16), _mm_srli_epi32(layer2_chunk5, 16));\n\n    v_r0 = _mm_packus_epi32(_mm_and_si128(layer1_chunk0, v_mask), _mm_and_si128(layer1_chunk1, v_mask));\n    v_g1 = _mm_packus_epi32(_mm_srli_epi32(layer1_chunk0, 16), _mm_srli_epi32(layer1_chunk1, 16));\n    v_r1 = _mm_packus_epi32(_mm_and_si128(layer1_chunk2, v_mask), _mm_and_si128(layer1_chunk3, v_mask));\n    v_b0 = _mm_packus_epi32(_mm_srli_epi32(layer1_chunk2, 16), _mm_srli_epi32(layer1_chunk3, 16));\n    v_g0 = _mm_packus_epi32(_mm_and_si128(layer1_chunk4, v_mask), _mm_and_si128(layer1_chunk5, v_mask));\n    v_b1 = _mm_packus_epi32(_mm_srli_epi32(layer1_chunk4, 16), _mm_srli_epi32(layer1_chunk5, 16));\n}\n\ninline void _mm_interleave_epi16(__m128i & v_r0, __m128i & v_r1, __m128i & v_g0, __m128i & v_g1,\n                                 __m128i & v_b0, __m128i & v_b1, __m128i & v_a0, __m128i & v_a1)\n{\n    __m128i v_mask = _mm_set1_epi32(0x0000ffff);\n\n    __m128i layer3_chunk0 = _mm_packus_epi32(_mm_and_si128(v_r0, v_mask), _mm_and_si128(v_r1, v_mask));\n    __m128i layer3_chunk4 = _mm_packus_epi32(_mm_srli_epi32(v_r0, 16), _mm_srli_epi32(v_r1, 16));\n    __m128i layer3_chunk1 = _mm_packus_epi32(_mm_and_si128(v_g0, v_mask), _mm_and_si128(v_g1, v_mask));\n    __m128i layer3_chunk5 = _mm_packus_epi32(_mm_srli_epi32(v_g0, 16), _mm_srli_epi32(v_g1, 16));\n    __m128i layer3_chunk2 = _mm_packus_epi32(_mm_and_si128(v_b0, v_mask), _mm_and_si128(v_b1, v_mask));\n    __m128i layer3_chunk6 = _mm_packus_epi32(_mm_srli_epi32(v_b0, 16), _mm_srli_epi32(v_b1, 16));\n    __m128i layer3_chunk3 = _mm_packus_epi32(_mm_and_si128(v_a0, v_mask), _mm_and_si128(v_a1, v_mask));\n    __m128i layer3_chunk7 = _mm_packus_epi32(_mm_srli_epi32(v_a0, 16), _mm_srli_epi32(v_a1, 16));\n\n    __m128i layer2_chunk0 = _mm_packus_epi32(_mm_and_si128(layer3_chunk0, v_mask), _mm_and_si128(layer3_chunk1, v_mask));\n    __m128i layer2_chunk4 = _mm_packus_epi32(_mm_srli_epi32(layer3_chunk0, 16), _mm_srli_epi32(layer3_chunk1, 16));\n    __m128i layer2_chunk1 = _mm_packus_epi32(_mm_and_si128(layer3_chunk2, v_mask), _mm_and_si128(layer3_chunk3, v_mask));\n    __m128i layer2_chunk5 = _mm_packus_epi32(_mm_srli_epi32(layer3_chunk2, 16), _mm_srli_epi32(layer3_chunk3, 16));\n    __m128i layer2_chunk2 = _mm_packus_epi32(_mm_and_si128(layer3_chunk4, v_mask), _mm_and_si128(layer3_chunk5, v_mask));\n    __m128i layer2_chunk6 = _mm_packus_epi32(_mm_srli_epi32(layer3_chunk4, 16), _mm_srli_epi32(layer3_chunk5, 16));\n    __m128i layer2_chunk3 = _mm_packus_epi32(_mm_and_si128(layer3_chunk6, v_mask), _mm_and_si128(layer3_chunk7, v_mask));\n    __m128i layer2_chunk7 = _mm_packus_epi32(_mm_srli_epi32(layer3_chunk6, 16), _mm_srli_epi32(layer3_chunk7, 16));\n\n    __m128i layer1_chunk0 = _mm_packus_epi32(_mm_and_si128(layer2_chunk0, v_mask), _mm_and_si128(layer2_chunk1, v_mask));\n    __m128i layer1_chunk4 = _mm_packus_epi32(_mm_srli_epi32(layer2_chunk0, 16), _mm_srli_epi32(layer2_chunk1, 16));\n    __m128i layer1_chunk1 = _mm_packus_epi32(_mm_and_si128(layer2_chunk2, v_mask), _mm_and_si128(layer2_chunk3, v_mask));\n    __m128i layer1_chunk5 = _mm_packus_epi32(_mm_srli_epi32(layer2_chunk2, 16), _mm_srli_epi32(layer2_chunk3, 16));\n    __m128i layer1_chunk2 = _mm_packus_epi32(_mm_and_si128(layer2_chunk4, v_mask), _mm_and_si128(layer2_chunk5, v_mask));\n    __m128i layer1_chunk6 = _mm_packus_epi32(_mm_srli_epi32(layer2_chunk4, 16), _mm_srli_epi32(layer2_chunk5, 16));\n    __m128i layer1_chunk3 = _mm_packus_epi32(_mm_and_si128(layer2_chunk6, v_mask), _mm_and_si128(layer2_chunk7, v_mask));\n    __m128i layer1_chunk7 = _mm_packus_epi32(_mm_srli_epi32(layer2_chunk6, 16), _mm_srli_epi32(layer2_chunk7, 16));\n\n    v_r0 = _mm_packus_epi32(_mm_and_si128(layer1_chunk0, v_mask), _mm_and_si128(layer1_chunk1, v_mask));\n    v_b0 = _mm_packus_epi32(_mm_srli_epi32(layer1_chunk0, 16), _mm_srli_epi32(layer1_chunk1, 16));\n    v_r1 = _mm_packus_epi32(_mm_and_si128(layer1_chunk2, v_mask), _mm_and_si128(layer1_chunk3, v_mask));\n    v_b1 = _mm_packus_epi32(_mm_srli_epi32(layer1_chunk2, 16), _mm_srli_epi32(layer1_chunk3, 16));\n    v_g0 = _mm_packus_epi32(_mm_and_si128(layer1_chunk4, v_mask), _mm_and_si128(layer1_chunk5, v_mask));\n    v_a0 = _mm_packus_epi32(_mm_srli_epi32(layer1_chunk4, 16), _mm_srli_epi32(layer1_chunk5, 16));\n    v_g1 = _mm_packus_epi32(_mm_and_si128(layer1_chunk6, v_mask), _mm_and_si128(layer1_chunk7, v_mask));\n    v_a1 = _mm_packus_epi32(_mm_srli_epi32(layer1_chunk6, 16), _mm_srli_epi32(layer1_chunk7, 16));\n}\n\n#endif // CV_SSE4_1\n\ninline void _mm_deinterleave_ps(__m128 & v_r0, __m128 & v_r1, __m128 & v_g0, __m128 & v_g1)\n{\n    __m128 layer1_chunk0 = _mm_unpacklo_ps(v_r0, v_g0);\n    __m128 layer1_chunk1 = _mm_unpackhi_ps(v_r0, v_g0);\n    __m128 layer1_chunk2 = _mm_unpacklo_ps(v_r1, v_g1);\n    __m128 layer1_chunk3 = _mm_unpackhi_ps(v_r1, v_g1);\n\n    __m128 layer2_chunk0 = _mm_unpacklo_ps(layer1_chunk0, layer1_chunk2);\n    __m128 layer2_chunk1 = _mm_unpackhi_ps(layer1_chunk0, layer1_chunk2);\n    __m128 layer2_chunk2 = _mm_unpacklo_ps(layer1_chunk1, layer1_chunk3);\n    __m128 layer2_chunk3 = _mm_unpackhi_ps(layer1_chunk1, layer1_chunk3);\n\n    v_r0 = _mm_unpacklo_ps(layer2_chunk0, layer2_chunk2);\n    v_r1 = _mm_unpackhi_ps(layer2_chunk0, layer2_chunk2);\n    v_g0 = _mm_unpacklo_ps(layer2_chunk1, layer2_chunk3);\n    v_g1 = _mm_unpackhi_ps(layer2_chunk1, layer2_chunk3);\n}\n\ninline void _mm_deinterleave_ps(__m128 & v_r0, __m128 & v_r1, __m128 & v_g0,\n                                __m128 & v_g1, __m128 & v_b0, __m128 & v_b1)\n{\n    __m128 layer1_chunk0 = _mm_unpacklo_ps(v_r0, v_g1);\n    __m128 layer1_chunk1 = _mm_unpackhi_ps(v_r0, v_g1);\n    __m128 layer1_chunk2 = _mm_unpacklo_ps(v_r1, v_b0);\n    __m128 layer1_chunk3 = _mm_unpackhi_ps(v_r1, v_b0);\n    __m128 layer1_chunk4 = _mm_unpacklo_ps(v_g0, v_b1);\n    __m128 layer1_chunk5 = _mm_unpackhi_ps(v_g0, v_b1);\n\n    __m128 layer2_chunk0 = _mm_unpacklo_ps(layer1_chunk0, layer1_chunk3);\n    __m128 layer2_chunk1 = _mm_unpackhi_ps(layer1_chunk0, layer1_chunk3);\n    __m128 layer2_chunk2 = _mm_unpacklo_ps(layer1_chunk1, layer1_chunk4);\n    __m128 layer2_chunk3 = _mm_unpackhi_ps(layer1_chunk1, layer1_chunk4);\n    __m128 layer2_chunk4 = _mm_unpacklo_ps(layer1_chunk2, layer1_chunk5);\n    __m128 layer2_chunk5 = _mm_unpackhi_ps(layer1_chunk2, layer1_chunk5);\n\n    v_r0 = _mm_unpacklo_ps(layer2_chunk0, layer2_chunk3);\n    v_r1 = _mm_unpackhi_ps(layer2_chunk0, layer2_chunk3);\n    v_g0 = _mm_unpacklo_ps(layer2_chunk1, layer2_chunk4);\n    v_g1 = _mm_unpackhi_ps(layer2_chunk1, layer2_chunk4);\n    v_b0 = _mm_unpacklo_ps(layer2_chunk2, layer2_chunk5);\n    v_b1 = _mm_unpackhi_ps(layer2_chunk2, layer2_chunk5);\n}\n\ninline void _mm_deinterleave_ps(__m128 & v_r0, __m128 & v_r1, __m128 & v_g0, __m128 & v_g1,\n                                __m128 & v_b0, __m128 & v_b1, __m128 & v_a0, __m128 & v_a1)\n{\n    __m128 layer1_chunk0 = _mm_unpacklo_ps(v_r0, v_b0);\n    __m128 layer1_chunk1 = _mm_unpackhi_ps(v_r0, v_b0);\n    __m128 layer1_chunk2 = _mm_unpacklo_ps(v_r1, v_b1);\n    __m128 layer1_chunk3 = _mm_unpackhi_ps(v_r1, v_b1);\n    __m128 layer1_chunk4 = _mm_unpacklo_ps(v_g0, v_a0);\n    __m128 layer1_chunk5 = _mm_unpackhi_ps(v_g0, v_a0);\n    __m128 layer1_chunk6 = _mm_unpacklo_ps(v_g1, v_a1);\n    __m128 layer1_chunk7 = _mm_unpackhi_ps(v_g1, v_a1);\n\n    __m128 layer2_chunk0 = _mm_unpacklo_ps(layer1_chunk0, layer1_chunk4);\n    __m128 layer2_chunk1 = _mm_unpackhi_ps(layer1_chunk0, layer1_chunk4);\n    __m128 layer2_chunk2 = _mm_unpacklo_ps(layer1_chunk1, layer1_chunk5);\n    __m128 layer2_chunk3 = _mm_unpackhi_ps(layer1_chunk1, layer1_chunk5);\n    __m128 layer2_chunk4 = _mm_unpacklo_ps(layer1_chunk2, layer1_chunk6);\n    __m128 layer2_chunk5 = _mm_unpackhi_ps(layer1_chunk2, layer1_chunk6);\n    __m128 layer2_chunk6 = _mm_unpacklo_ps(layer1_chunk3, layer1_chunk7);\n    __m128 layer2_chunk7 = _mm_unpackhi_ps(layer1_chunk3, layer1_chunk7);\n\n    v_r0 = _mm_unpacklo_ps(layer2_chunk0, layer2_chunk4);\n    v_r1 = _mm_unpackhi_ps(layer2_chunk0, layer2_chunk4);\n    v_g0 = _mm_unpacklo_ps(layer2_chunk1, layer2_chunk5);\n    v_g1 = _mm_unpackhi_ps(layer2_chunk1, layer2_chunk5);\n    v_b0 = _mm_unpacklo_ps(layer2_chunk2, layer2_chunk6);\n    v_b1 = _mm_unpackhi_ps(layer2_chunk2, layer2_chunk6);\n    v_a0 = _mm_unpacklo_ps(layer2_chunk3, layer2_chunk7);\n    v_a1 = _mm_unpackhi_ps(layer2_chunk3, layer2_chunk7);\n}\n\ninline void _mm_interleave_ps(__m128 & v_r0, __m128 & v_r1, __m128 & v_g0, __m128 & v_g1)\n{\n    const int mask_lo = _MM_SHUFFLE(2, 0, 2, 0), mask_hi = _MM_SHUFFLE(3, 1, 3, 1);\n\n    __m128 layer2_chunk0 = _mm_shuffle_ps(v_r0, v_r1, mask_lo);\n    __m128 layer2_chunk2 = _mm_shuffle_ps(v_r0, v_r1, mask_hi);\n    __m128 layer2_chunk1 = _mm_shuffle_ps(v_g0, v_g1, mask_lo);\n    __m128 layer2_chunk3 = _mm_shuffle_ps(v_g0, v_g1, mask_hi);\n\n    __m128 layer1_chunk0 = _mm_shuffle_ps(layer2_chunk0, layer2_chunk1, mask_lo);\n    __m128 layer1_chunk2 = _mm_shuffle_ps(layer2_chunk0, layer2_chunk1, mask_hi);\n    __m128 layer1_chunk1 = _mm_shuffle_ps(layer2_chunk2, layer2_chunk3, mask_lo);\n    __m128 layer1_chunk3 = _mm_shuffle_ps(layer2_chunk2, layer2_chunk3, mask_hi);\n\n    v_r0 = _mm_shuffle_ps(layer1_chunk0, layer1_chunk1, mask_lo);\n    v_g0 = _mm_shuffle_ps(layer1_chunk0, layer1_chunk1, mask_hi);\n    v_r1 = _mm_shuffle_ps(layer1_chunk2, layer1_chunk3, mask_lo);\n    v_g1 = _mm_shuffle_ps(layer1_chunk2, layer1_chunk3, mask_hi);\n}\n\ninline void _mm_interleave_ps(__m128 & v_r0, __m128 & v_r1, __m128 & v_g0,\n                              __m128 & v_g1, __m128 & v_b0, __m128 & v_b1)\n{\n    const int mask_lo = _MM_SHUFFLE(2, 0, 2, 0), mask_hi = _MM_SHUFFLE(3, 1, 3, 1);\n\n    __m128 layer2_chunk0 = _mm_shuffle_ps(v_r0, v_r1, mask_lo);\n    __m128 layer2_chunk3 = _mm_shuffle_ps(v_r0, v_r1, mask_hi);\n    __m128 layer2_chunk1 = _mm_shuffle_ps(v_g0, v_g1, mask_lo);\n    __m128 layer2_chunk4 = _mm_shuffle_ps(v_g0, v_g1, mask_hi);\n    __m128 layer2_chunk2 = _mm_shuffle_ps(v_b0, v_b1, mask_lo);\n    __m128 layer2_chunk5 = _mm_shuffle_ps(v_b0, v_b1, mask_hi);\n\n    __m128 layer1_chunk0 = _mm_shuffle_ps(layer2_chunk0, layer2_chunk1, mask_lo);\n    __m128 layer1_chunk3 = _mm_shuffle_ps(layer2_chunk0, layer2_chunk1, mask_hi);\n    __m128 layer1_chunk1 = _mm_shuffle_ps(layer2_chunk2, layer2_chunk3, mask_lo);\n    __m128 layer1_chunk4 = _mm_shuffle_ps(layer2_chunk2, layer2_chunk3, mask_hi);\n    __m128 layer1_chunk2 = _mm_shuffle_ps(layer2_chunk4, layer2_chunk5, mask_lo);\n    __m128 layer1_chunk5 = _mm_shuffle_ps(layer2_chunk4, layer2_chunk5, mask_hi);\n\n    v_r0 = _mm_shuffle_ps(layer1_chunk0, layer1_chunk1, mask_lo);\n    v_g1 = _mm_shuffle_ps(layer1_chunk0, layer1_chunk1, mask_hi);\n    v_r1 = _mm_shuffle_ps(layer1_chunk2, layer1_chunk3, mask_lo);\n    v_b0 = _mm_shuffle_ps(layer1_chunk2, layer1_chunk3, mask_hi);\n    v_g0 = _mm_shuffle_ps(layer1_chunk4, layer1_chunk5, mask_lo);\n    v_b1 = _mm_shuffle_ps(layer1_chunk4, layer1_chunk5, mask_hi);\n}\n\ninline void _mm_interleave_ps(__m128 & v_r0, __m128 & v_r1, __m128 & v_g0, __m128 & v_g1,\n                              __m128 & v_b0, __m128 & v_b1, __m128 & v_a0, __m128 & v_a1)\n{\n    const int mask_lo = _MM_SHUFFLE(2, 0, 2, 0), mask_hi = _MM_SHUFFLE(3, 1, 3, 1);\n\n    __m128 layer2_chunk0 = _mm_shuffle_ps(v_r0, v_r1, mask_lo);\n    __m128 layer2_chunk4 = _mm_shuffle_ps(v_r0, v_r1, mask_hi);\n    __m128 layer2_chunk1 = _mm_shuffle_ps(v_g0, v_g1, mask_lo);\n    __m128 layer2_chunk5 = _mm_shuffle_ps(v_g0, v_g1, mask_hi);\n    __m128 layer2_chunk2 = _mm_shuffle_ps(v_b0, v_b1, mask_lo);\n    __m128 layer2_chunk6 = _mm_shuffle_ps(v_b0, v_b1, mask_hi);\n    __m128 layer2_chunk3 = _mm_shuffle_ps(v_a0, v_a1, mask_lo);\n    __m128 layer2_chunk7 = _mm_shuffle_ps(v_a0, v_a1, mask_hi);\n\n    __m128 layer1_chunk0 = _mm_shuffle_ps(layer2_chunk0, layer2_chunk1, mask_lo);\n    __m128 layer1_chunk4 = _mm_shuffle_ps(layer2_chunk0, layer2_chunk1, mask_hi);\n    __m128 layer1_chunk1 = _mm_shuffle_ps(layer2_chunk2, layer2_chunk3, mask_lo);\n    __m128 layer1_chunk5 = _mm_shuffle_ps(layer2_chunk2, layer2_chunk3, mask_hi);\n    __m128 layer1_chunk2 = _mm_shuffle_ps(layer2_chunk4, layer2_chunk5, mask_lo);\n    __m128 layer1_chunk6 = _mm_shuffle_ps(layer2_chunk4, layer2_chunk5, mask_hi);\n    __m128 layer1_chunk3 = _mm_shuffle_ps(layer2_chunk6, layer2_chunk7, mask_lo);\n    __m128 layer1_chunk7 = _mm_shuffle_ps(layer2_chunk6, layer2_chunk7, mask_hi);\n\n    v_r0 = _mm_shuffle_ps(layer1_chunk0, layer1_chunk1, mask_lo);\n    v_b0 = _mm_shuffle_ps(layer1_chunk0, layer1_chunk1, mask_hi);\n    v_r1 = _mm_shuffle_ps(layer1_chunk2, layer1_chunk3, mask_lo);\n    v_b1 = _mm_shuffle_ps(layer1_chunk2, layer1_chunk3, mask_hi);\n    v_g0 = _mm_shuffle_ps(layer1_chunk4, layer1_chunk5, mask_lo);\n    v_a0 = _mm_shuffle_ps(layer1_chunk4, layer1_chunk5, mask_hi);\n    v_g1 = _mm_shuffle_ps(layer1_chunk6, layer1_chunk7, mask_lo);\n    v_a1 = _mm_shuffle_ps(layer1_chunk6, layer1_chunk7, mask_hi);\n}\n\n#endif // CV_SSE2\n\n#endif //__OPENCV_CORE_SSE_UTILS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/traits.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_TRAITS_HPP__\n#define __OPENCV_CORE_TRAITS_HPP__\n\n#include \"opencv2/core/cvdef.h\"\n\nnamespace cv\n{\n\n//! @addtogroup core_basic\n//! @{\n\n/** @brief Template \"trait\" class for OpenCV primitive data types.\n\nA primitive OpenCV data type is one of unsigned char, bool, signed char, unsigned short, signed\nshort, int, float, double, or a tuple of values of one of these types, where all the values in the\ntuple have the same type. Any primitive type from the list can be defined by an identifier in the\nform CV_\\<bit-depth\\>{U|S|F}C(\\<number_of_channels\\>), for example: uchar \\~ CV_8UC1, 3-element\nfloating-point tuple \\~ CV_32FC3, and so on. A universal OpenCV structure that is able to store a\nsingle instance of such a primitive data type is Vec. Multiple instances of such a type can be\nstored in a std::vector, Mat, Mat_, SparseMat, SparseMat_, or any other container that is able to\nstore Vec instances.\n\nThe DataType class is basically used to provide a description of such primitive data types without\nadding any fields or methods to the corresponding classes (and it is actually impossible to add\nanything to primitive C/C++ data types). This technique is known in C++ as class traits. It is not\nDataType itself that is used but its specialized versions, such as:\n@code\n    template<> class DataType<uchar>\n    {\n        typedef uchar value_type;\n        typedef int work_type;\n        typedef uchar channel_type;\n        enum { channel_type = CV_8U, channels = 1, fmt='u', type = CV_8U };\n    };\n    ...\n    template<typename _Tp> DataType<std::complex<_Tp> >\n    {\n        typedef std::complex<_Tp> value_type;\n        typedef std::complex<_Tp> work_type;\n        typedef _Tp channel_type;\n        // DataDepth is another helper trait class\n        enum { depth = DataDepth<_Tp>::value, channels=2,\n            fmt=(channels-1)*256+DataDepth<_Tp>::fmt,\n            type=CV_MAKETYPE(depth, channels) };\n    };\n    ...\n@endcode\nThe main purpose of this class is to convert compilation-time type information to an\nOpenCV-compatible data type identifier, for example:\n@code\n    // allocates a 30x40 floating-point matrix\n    Mat A(30, 40, DataType<float>::type);\n\n    Mat B = Mat_<std::complex<double> >(3, 3);\n    // the statement below will print 6, 2 , that is depth == CV_64F, channels == 2\n    cout << B.depth() << \", \" << B.channels() << endl;\n@endcode\nSo, such traits are used to tell OpenCV which data type you are working with, even if such a type is\nnot native to OpenCV. For example, the matrix B initialization above is compiled because OpenCV\ndefines the proper specialized template class DataType\\<complex\\<_Tp\\> \\> . This mechanism is also\nuseful (and used in OpenCV this way) for generic algorithms implementations.\n*/\ntemplate<typename _Tp> class DataType\n{\npublic:\n    typedef _Tp         value_type;\n    typedef value_type  work_type;\n    typedef value_type  channel_type;\n    typedef value_type  vec_type;\n    enum { generic_type = 1,\n           depth        = -1,\n           channels     = 1,\n           fmt          = 0,\n           type = CV_MAKETYPE(depth, channels)\n         };\n};\n\ntemplate<> class DataType<bool>\n{\npublic:\n    typedef bool        value_type;\n    typedef int         work_type;\n    typedef value_type  channel_type;\n    typedef value_type  vec_type;\n    enum { generic_type = 0,\n           depth        = CV_8U,\n           channels     = 1,\n           fmt          = (int)'u',\n           type         = CV_MAKETYPE(depth, channels)\n         };\n};\n\ntemplate<> class DataType<uchar>\n{\npublic:\n    typedef uchar       value_type;\n    typedef int         work_type;\n    typedef value_type  channel_type;\n    typedef value_type  vec_type;\n    enum { generic_type = 0,\n           depth        = CV_8U,\n           channels     = 1,\n           fmt          = (int)'u',\n           type         = CV_MAKETYPE(depth, channels)\n         };\n};\n\ntemplate<> class DataType<schar>\n{\npublic:\n    typedef schar       value_type;\n    typedef int         work_type;\n    typedef value_type  channel_type;\n    typedef value_type  vec_type;\n    enum { generic_type = 0,\n           depth        = CV_8S,\n           channels     = 1,\n           fmt          = (int)'c',\n           type         = CV_MAKETYPE(depth, channels)\n         };\n};\n\ntemplate<> class DataType<char>\n{\npublic:\n    typedef schar       value_type;\n    typedef int         work_type;\n    typedef value_type  channel_type;\n    typedef value_type  vec_type;\n    enum { generic_type = 0,\n           depth        = CV_8S,\n           channels     = 1,\n           fmt          = (int)'c',\n           type         = CV_MAKETYPE(depth, channels)\n         };\n};\n\ntemplate<> class DataType<ushort>\n{\npublic:\n    typedef ushort      value_type;\n    typedef int         work_type;\n    typedef value_type  channel_type;\n    typedef value_type  vec_type;\n    enum { generic_type = 0,\n           depth        = CV_16U,\n           channels     = 1,\n           fmt          = (int)'w',\n           type         = CV_MAKETYPE(depth, channels)\n         };\n};\n\ntemplate<> class DataType<short>\n{\npublic:\n    typedef short       value_type;\n    typedef int         work_type;\n    typedef value_type  channel_type;\n    typedef value_type  vec_type;\n    enum { generic_type = 0,\n           depth        = CV_16S,\n           channels     = 1,\n           fmt          = (int)'s',\n           type         = CV_MAKETYPE(depth, channels)\n         };\n};\n\ntemplate<> class DataType<int>\n{\npublic:\n    typedef int         value_type;\n    typedef value_type  work_type;\n    typedef value_type  channel_type;\n    typedef value_type  vec_type;\n    enum { generic_type = 0,\n           depth        = CV_32S,\n           channels     = 1,\n           fmt          = (int)'i',\n           type         = CV_MAKETYPE(depth, channels)\n         };\n};\n\ntemplate<> class DataType<float>\n{\npublic:\n    typedef float       value_type;\n    typedef value_type  work_type;\n    typedef value_type  channel_type;\n    typedef value_type  vec_type;\n    enum { generic_type = 0,\n           depth        = CV_32F,\n           channels     = 1,\n           fmt          = (int)'f',\n           type         = CV_MAKETYPE(depth, channels)\n         };\n};\n\ntemplate<> class DataType<double>\n{\npublic:\n    typedef double      value_type;\n    typedef value_type  work_type;\n    typedef value_type  channel_type;\n    typedef value_type  vec_type;\n    enum { generic_type = 0,\n           depth        = CV_64F,\n           channels     = 1,\n           fmt          = (int)'d',\n           type         = CV_MAKETYPE(depth, channels)\n         };\n};\n\n\n/** @brief A helper class for cv::DataType\n\nThe class is specialized for each fundamental numerical data type supported by OpenCV. It provides\nDataDepth<T>::value constant.\n*/\ntemplate<typename _Tp> class DataDepth\n{\npublic:\n    enum\n    {\n        value = DataType<_Tp>::depth,\n        fmt   = DataType<_Tp>::fmt\n    };\n};\n\n\n\ntemplate<int _depth> class TypeDepth\n{\n    enum { depth = CV_USRTYPE1 };\n    typedef void value_type;\n};\n\ntemplate<> class TypeDepth<CV_8U>\n{\n    enum { depth = CV_8U };\n    typedef uchar value_type;\n};\n\ntemplate<> class TypeDepth<CV_8S>\n{\n    enum { depth = CV_8S };\n    typedef schar value_type;\n};\n\ntemplate<> class TypeDepth<CV_16U>\n{\n    enum { depth = CV_16U };\n    typedef ushort value_type;\n};\n\ntemplate<> class TypeDepth<CV_16S>\n{\n    enum { depth = CV_16S };\n    typedef short value_type;\n};\n\ntemplate<> class TypeDepth<CV_32S>\n{\n    enum { depth = CV_32S };\n    typedef int value_type;\n};\n\ntemplate<> class TypeDepth<CV_32F>\n{\n    enum { depth = CV_32F };\n    typedef float value_type;\n};\n\ntemplate<> class TypeDepth<CV_64F>\n{\n    enum { depth = CV_64F };\n    typedef double value_type;\n};\n\n//! @}\n\n} // cv\n\n#endif // __OPENCV_CORE_TRAITS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/types.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_TYPES_HPP__\n#define __OPENCV_CORE_TYPES_HPP__\n\n#ifndef __cplusplus\n#  error types.hpp header must be compiled as C++\n#endif\n\n#include <climits>\n#include <cfloat>\n#include <vector>\n\n#include \"opencv2/core/cvdef.h\"\n#include \"opencv2/core/cvstd.hpp\"\n#include \"opencv2/core/matx.hpp\"\n\nnamespace cv\n{\n\n//! @addtogroup core_basic\n//! @{\n\n//////////////////////////////// Complex //////////////////////////////\n\n/** @brief  A complex number class.\n\n  The template class is similar and compatible with std::complex, however it provides slightly\n  more convenient access to the real and imaginary parts using through the simple field access, as opposite\n  to std::complex::real() and std::complex::imag().\n*/\ntemplate<typename _Tp> class Complex\n{\npublic:\n\n    //! constructors\n    Complex();\n    Complex( _Tp _re, _Tp _im = 0 );\n\n    //! conversion to another data type\n    template<typename T2> operator Complex<T2>() const;\n    //! conjugation\n    Complex conj() const;\n\n    _Tp re, im; //< the real and the imaginary parts\n};\n\ntypedef Complex<float> Complexf;\ntypedef Complex<double> Complexd;\n\ntemplate<typename _Tp> class DataType< Complex<_Tp> >\n{\npublic:\n    typedef Complex<_Tp> value_type;\n    typedef value_type   work_type;\n    typedef _Tp          channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = 2,\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels) };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\n\n\n//////////////////////////////// Point_ ////////////////////////////////\n\n/** @brief Template class for 2D points specified by its coordinates `x` and `y`.\n\nAn instance of the class is interchangeable with C structures, CvPoint and CvPoint2D32f . There is\nalso a cast operator to convert point coordinates to the specified type. The conversion from\nfloating-point coordinates to integer coordinates is done by rounding. Commonly, the conversion\nuses this operation for each of the coordinates. Besides the class members listed in the\ndeclaration above, the following operations on points are implemented:\n@code\n    pt1 = pt2 + pt3;\n    pt1 = pt2 - pt3;\n    pt1 = pt2 * a;\n    pt1 = a * pt2;\n    pt1 = pt2 / a;\n    pt1 += pt2;\n    pt1 -= pt2;\n    pt1 *= a;\n    pt1 /= a;\n    double value = norm(pt); // L2 norm\n    pt1 == pt2;\n    pt1 != pt2;\n@endcode\nFor your convenience, the following type aliases are defined:\n@code\n    typedef Point_<int> Point2i;\n    typedef Point2i Point;\n    typedef Point_<float> Point2f;\n    typedef Point_<double> Point2d;\n@endcode\nExample:\n@code\n    Point2f a(0.3f, 0.f), b(0.f, 0.4f);\n    Point pt = (a + b)*10.f;\n    cout << pt.x << \", \" << pt.y << endl;\n@endcode\n*/\ntemplate<typename _Tp> class Point_\n{\npublic:\n    typedef _Tp value_type;\n\n    // various constructors\n    Point_();\n    Point_(_Tp _x, _Tp _y);\n    Point_(const Point_& pt);\n    Point_(const Size_<_Tp>& sz);\n    Point_(const Vec<_Tp, 2>& v);\n\n    Point_& operator = (const Point_& pt);\n    //! conversion to another data type\n    template<typename _Tp2> operator Point_<_Tp2>() const;\n\n    //! conversion to the old-style C structures\n    operator Vec<_Tp, 2>() const;\n\n    //! dot product\n    _Tp dot(const Point_& pt) const;\n    //! dot product computed in double-precision arithmetics\n    double ddot(const Point_& pt) const;\n    //! cross-product\n    double cross(const Point_& pt) const;\n    //! checks whether the point is inside the specified rectangle\n    bool inside(const Rect_<_Tp>& r) const;\n\n    _Tp x, y; //< the point coordinates\n};\n\ntypedef Point_<int> Point2i;\ntypedef Point_<float> Point2f;\ntypedef Point_<double> Point2d;\ntypedef Point2i Point;\n\ntemplate<typename _Tp> class DataType< Point_<_Tp> >\n{\npublic:\n    typedef Point_<_Tp>                               value_type;\n    typedef Point_<typename DataType<_Tp>::work_type> work_type;\n    typedef _Tp                                       channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = 2,\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\n\n\n//////////////////////////////// Point3_ ////////////////////////////////\n\n/** @brief Template class for 3D points specified by its coordinates `x`, `y` and `z`.\n\nAn instance of the class is interchangeable with the C structure CvPoint2D32f . Similarly to\nPoint_ , the coordinates of 3D points can be converted to another type. The vector arithmetic and\ncomparison operations are also supported.\n\nThe following Point3_\\<\\> aliases are available:\n@code\n    typedef Point3_<int> Point3i;\n    typedef Point3_<float> Point3f;\n    typedef Point3_<double> Point3d;\n@endcode\n@see cv::Point3i, cv::Point3f and cv::Point3d\n*/\ntemplate<typename _Tp> class Point3_\n{\npublic:\n    typedef _Tp value_type;\n\n    // various constructors\n    Point3_();\n    Point3_(_Tp _x, _Tp _y, _Tp _z);\n    Point3_(const Point3_& pt);\n    explicit Point3_(const Point_<_Tp>& pt);\n    Point3_(const Vec<_Tp, 3>& v);\n\n    Point3_& operator = (const Point3_& pt);\n    //! conversion to another data type\n    template<typename _Tp2> operator Point3_<_Tp2>() const;\n    //! conversion to cv::Vec<>\n    operator Vec<_Tp, 3>() const;\n\n    //! dot product\n    _Tp dot(const Point3_& pt) const;\n    //! dot product computed in double-precision arithmetics\n    double ddot(const Point3_& pt) const;\n    //! cross product of the 2 3D points\n    Point3_ cross(const Point3_& pt) const;\n\n    _Tp x, y, z; //< the point coordinates\n};\n\ntypedef Point3_<int> Point3i;\ntypedef Point3_<float> Point3f;\ntypedef Point3_<double> Point3d;\n\ntemplate<typename _Tp> class DataType< Point3_<_Tp> >\n{\npublic:\n    typedef Point3_<_Tp>                               value_type;\n    typedef Point3_<typename DataType<_Tp>::work_type> work_type;\n    typedef _Tp                                        channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = 3,\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\n\n\n//////////////////////////////// Size_ ////////////////////////////////\n\n/** @brief Template class for specifying the size of an image or rectangle.\n\nThe class includes two members called width and height. The structure can be converted to and from\nthe old OpenCV structures CvSize and CvSize2D32f . The same set of arithmetic and comparison\noperations as for Point_ is available.\n\nOpenCV defines the following Size_\\<\\> aliases:\n@code\n    typedef Size_<int> Size2i;\n    typedef Size2i Size;\n    typedef Size_<float> Size2f;\n@endcode\n*/\ntemplate<typename _Tp> class Size_\n{\npublic:\n    typedef _Tp value_type;\n\n    //! various constructors\n    Size_();\n    Size_(_Tp _width, _Tp _height);\n    Size_(const Size_& sz);\n    Size_(const Point_<_Tp>& pt);\n\n    Size_& operator = (const Size_& sz);\n    //! the area (width*height)\n    _Tp area() const;\n\n    //! conversion of another data type.\n    template<typename _Tp2> operator Size_<_Tp2>() const;\n\n    _Tp width, height; // the width and the height\n};\n\ntypedef Size_<int> Size2i;\ntypedef Size_<float> Size2f;\ntypedef Size_<double> Size2d;\ntypedef Size2i Size;\n\ntemplate<typename _Tp> class DataType< Size_<_Tp> >\n{\npublic:\n    typedef Size_<_Tp>                               value_type;\n    typedef Size_<typename DataType<_Tp>::work_type> work_type;\n    typedef _Tp                                      channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = 2,\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\n\n\n//////////////////////////////// Rect_ ////////////////////////////////\n\n/** @brief Template class for 2D rectangles\n\ndescribed by the following parameters:\n-   Coordinates of the top-left corner. This is a default interpretation of Rect_::x and Rect_::y\n    in OpenCV. Though, in your algorithms you may count x and y from the bottom-left corner.\n-   Rectangle width and height.\n\nOpenCV typically assumes that the top and left boundary of the rectangle are inclusive, while the\nright and bottom boundaries are not. For example, the method Rect_::contains returns true if\n\n\\f[x  \\leq pt.x < x+width,\n      y  \\leq pt.y < y+height\\f]\n\nVirtually every loop over an image ROI in OpenCV (where ROI is specified by Rect_\\<int\\> ) is\nimplemented as:\n@code\n    for(int y = roi.y; y < roi.y + roi.height; y++)\n        for(int x = roi.x; x < roi.x + roi.width; x++)\n        {\n            // ...\n        }\n@endcode\nIn addition to the class members, the following operations on rectangles are implemented:\n-   \\f$\\texttt{rect} = \\texttt{rect} \\pm \\texttt{point}\\f$ (shifting a rectangle by a certain offset)\n-   \\f$\\texttt{rect} = \\texttt{rect} \\pm \\texttt{size}\\f$ (expanding or shrinking a rectangle by a\n    certain amount)\n-   rect += point, rect -= point, rect += size, rect -= size (augmenting operations)\n-   rect = rect1 & rect2 (rectangle intersection)\n-   rect = rect1 | rect2 (minimum area rectangle containing rect1 and rect2 )\n-   rect &= rect1, rect |= rect1 (and the corresponding augmenting operations)\n-   rect == rect1, rect != rect1 (rectangle comparison)\n\nThis is an example how the partial ordering on rectangles can be established (rect1 \\f$\\subseteq\\f$\nrect2):\n@code\n    template<typename _Tp> inline bool\n    operator <= (const Rect_<_Tp>& r1, const Rect_<_Tp>& r2)\n    {\n        return (r1 & r2) == r1;\n    }\n@endcode\nFor your convenience, the Rect_\\<\\> alias is available: cv::Rect\n*/\ntemplate<typename _Tp> class Rect_\n{\npublic:\n    typedef _Tp value_type;\n\n    //! various constructors\n    Rect_();\n    Rect_(_Tp _x, _Tp _y, _Tp _width, _Tp _height);\n    Rect_(const Rect_& r);\n    Rect_(const Point_<_Tp>& org, const Size_<_Tp>& sz);\n    Rect_(const Point_<_Tp>& pt1, const Point_<_Tp>& pt2);\n\n    Rect_& operator = ( const Rect_& r );\n    //! the top-left corner\n    Point_<_Tp> tl() const;\n    //! the bottom-right corner\n    Point_<_Tp> br() const;\n\n    //! size (width, height) of the rectangle\n    Size_<_Tp> size() const;\n    //! area (width*height) of the rectangle\n    _Tp area() const;\n\n    //! conversion to another data type\n    template<typename _Tp2> operator Rect_<_Tp2>() const;\n\n    //! checks whether the rectangle contains the point\n    bool contains(const Point_<_Tp>& pt) const;\n\n    _Tp x, y, width, height; //< the top-left corner, as well as width and height of the rectangle\n};\n\ntypedef Rect_<int> Rect2i;\ntypedef Rect_<float> Rect2f;\ntypedef Rect_<double> Rect2d;\ntypedef Rect2i Rect;\n\ntemplate<typename _Tp> class DataType< Rect_<_Tp> >\n{\npublic:\n    typedef Rect_<_Tp>                               value_type;\n    typedef Rect_<typename DataType<_Tp>::work_type> work_type;\n    typedef _Tp                                      channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = 4,\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\n\n\n///////////////////////////// RotatedRect /////////////////////////////\n\n/** @brief The class represents rotated (i.e. not up-right) rectangles on a plane.\n\nEach rectangle is specified by the center point (mass center), length of each side (represented by\ncv::Size2f structure) and the rotation angle in degrees.\n\nThe sample below demonstrates how to use RotatedRect:\n@code\n    Mat image(200, 200, CV_8UC3, Scalar(0));\n    RotatedRect rRect = RotatedRect(Point2f(100,100), Size2f(100,50), 30);\n\n    Point2f vertices[4];\n    rRect.points(vertices);\n    for (int i = 0; i < 4; i++)\n        line(image, vertices[i], vertices[(i+1)%4], Scalar(0,255,0));\n\n    Rect brect = rRect.boundingRect();\n    rectangle(image, brect, Scalar(255,0,0));\n\n    imshow(\"rectangles\", image);\n    waitKey(0);\n@endcode\n![image](pics/rotatedrect.png)\n\n@sa CamShift, fitEllipse, minAreaRect, CvBox2D\n*/\nclass CV_EXPORTS RotatedRect\n{\npublic:\n    //! various constructors\n    RotatedRect();\n    /**\n    @param center The rectangle mass center.\n    @param size Width and height of the rectangle.\n    @param angle The rotation angle in a clockwise direction. When the angle is 0, 90, 180, 270 etc.,\n    the rectangle becomes an up-right rectangle.\n    */\n    RotatedRect(const Point2f& center, const Size2f& size, float angle);\n    /**\n    Any 3 end points of the RotatedRect. They must be given in order (either clockwise or\n    anticlockwise).\n     */\n    RotatedRect(const Point2f& point1, const Point2f& point2, const Point2f& point3);\n\n    /** returns 4 vertices of the rectangle\n    @param pts The points array for storing rectangle vertices.\n    */\n    void points(Point2f pts[]) const;\n    //! returns the minimal up-right rectangle containing the rotated rectangle\n    Rect boundingRect() const;\n\n    Point2f center; //< the rectangle mass center\n    Size2f size;    //< width and height of the rectangle\n    float angle;    //< the rotation angle. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle.\n};\n\ntemplate<> class DataType< RotatedRect >\n{\npublic:\n    typedef RotatedRect  value_type;\n    typedef value_type   work_type;\n    typedef float        channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = (int)sizeof(value_type)/sizeof(channel_type), // 5\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\n\n\n//////////////////////////////// Range /////////////////////////////////\n\n/** @brief Template class specifying a continuous subsequence (slice) of a sequence.\n\nThe class is used to specify a row or a column span in a matrix ( Mat ) and for many other purposes.\nRange(a,b) is basically the same as a:b in Matlab or a..b in Python. As in Python, start is an\ninclusive left boundary of the range and end is an exclusive right boundary of the range. Such a\nhalf-opened interval is usually denoted as \\f$[start,end)\\f$ .\n\nThe static method Range::all() returns a special variable that means \"the whole sequence\" or \"the\nwhole range\", just like \" : \" in Matlab or \" ... \" in Python. All the methods and functions in\nOpenCV that take Range support this special Range::all() value. But, of course, in case of your own\ncustom processing, you will probably have to check and handle it explicitly:\n@code\n    void my_function(..., const Range& r, ....)\n    {\n        if(r == Range::all()) {\n            // process all the data\n        }\n        else {\n            // process [r.start, r.end)\n        }\n    }\n@endcode\n*/\nclass CV_EXPORTS Range\n{\npublic:\n    Range();\n    Range(int _start, int _end);\n    int size() const;\n    bool empty() const;\n    static Range all();\n\n    int start, end;\n};\n\ntemplate<> class DataType<Range>\n{\npublic:\n    typedef Range      value_type;\n    typedef value_type work_type;\n    typedef int        channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = 2,\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\n\n\n//////////////////////////////// Scalar_ ///////////////////////////////\n\n/** @brief Template class for a 4-element vector derived from Vec.\n\nBeing derived from Vec\\<_Tp, 4\\> , Scalar_ and Scalar can be used just as typical 4-element\nvectors. In addition, they can be converted to/from CvScalar . The type Scalar is widely used in\nOpenCV to pass pixel values.\n*/\ntemplate<typename _Tp> class Scalar_ : public Vec<_Tp, 4>\n{\npublic:\n    //! various constructors\n    Scalar_();\n    Scalar_(_Tp v0, _Tp v1, _Tp v2=0, _Tp v3=0);\n    Scalar_(_Tp v0);\n\n    template<typename _Tp2, int cn>\n    Scalar_(const Vec<_Tp2, cn>& v);\n\n    //! returns a scalar with all elements set to v0\n    static Scalar_<_Tp> all(_Tp v0);\n\n    //! conversion to another data type\n    template<typename T2> operator Scalar_<T2>() const;\n\n    //! per-element product\n    Scalar_<_Tp> mul(const Scalar_<_Tp>& a, double scale=1 ) const;\n\n    // returns (v0, -v1, -v2, -v3)\n    Scalar_<_Tp> conj() const;\n\n    // returns true iff v1 == v2 == v3 == 0\n    bool isReal() const;\n};\n\ntypedef Scalar_<double> Scalar;\n\ntemplate<typename _Tp> class DataType< Scalar_<_Tp> >\n{\npublic:\n    typedef Scalar_<_Tp>                               value_type;\n    typedef Scalar_<typename DataType<_Tp>::work_type> work_type;\n    typedef _Tp                                        channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = 4,\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\n\n\n/////////////////////////////// KeyPoint ////////////////////////////////\n\n/** @brief Data structure for salient point detectors.\n\nThe class instance stores a keypoint, i.e. a point feature found by one of many available keypoint\ndetectors, such as Harris corner detector, cv::FAST, cv::StarDetector, cv::SURF, cv::SIFT,\ncv::LDetector etc.\n\nThe keypoint is characterized by the 2D position, scale (proportional to the diameter of the\nneighborhood that needs to be taken into account), orientation and some other parameters. The\nkeypoint neighborhood is then analyzed by another algorithm that builds a descriptor (usually\nrepresented as a feature vector). The keypoints representing the same object in different images\ncan then be matched using cv::KDTree or another method.\n*/\nclass CV_EXPORTS_W_SIMPLE KeyPoint\n{\npublic:\n    //! the default constructor\n    CV_WRAP KeyPoint();\n    /**\n    @param _pt x & y coordinates of the keypoint\n    @param _size keypoint diameter\n    @param _angle keypoint orientation\n    @param _response keypoint detector response on the keypoint (that is, strength of the keypoint)\n    @param _octave pyramid octave in which the keypoint has been detected\n    @param _class_id object id\n     */\n    KeyPoint(Point2f _pt, float _size, float _angle=-1, float _response=0, int _octave=0, int _class_id=-1);\n    /**\n    @param x x-coordinate of the keypoint\n    @param y y-coordinate of the keypoint\n    @param _size keypoint diameter\n    @param _angle keypoint orientation\n    @param _response keypoint detector response on the keypoint (that is, strength of the keypoint)\n    @param _octave pyramid octave in which the keypoint has been detected\n    @param _class_id object id\n     */\n    CV_WRAP KeyPoint(float x, float y, float _size, float _angle=-1, float _response=0, int _octave=0, int _class_id=-1);\n\n    size_t hash() const;\n\n    /**\n    This method converts vector of keypoints to vector of points or the reverse, where each keypoint is\n    assigned the same size and the same orientation.\n\n    @param keypoints Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORB\n    @param points2f Array of (x,y) coordinates of each keypoint\n    @param keypointIndexes Array of indexes of keypoints to be converted to points. (Acts like a mask to\n    convert only specified keypoints)\n    */\n    CV_WRAP static void convert(const std::vector<KeyPoint>& keypoints,\n                                CV_OUT std::vector<Point2f>& points2f,\n                                const std::vector<int>& keypointIndexes=std::vector<int>());\n    /** @overload\n    @param points2f Array of (x,y) coordinates of each keypoint\n    @param keypoints Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORB\n    @param size keypoint diameter\n    @param response keypoint detector response on the keypoint (that is, strength of the keypoint)\n    @param octave pyramid octave in which the keypoint has been detected\n    @param class_id object id\n    */\n    CV_WRAP static void convert(const std::vector<Point2f>& points2f,\n                                CV_OUT std::vector<KeyPoint>& keypoints,\n                                float size=1, float response=1, int octave=0, int class_id=-1);\n\n    /**\n    This method computes overlap for pair of keypoints. Overlap is the ratio between area of keypoint\n    regions' intersection and area of keypoint regions' union (considering keypoint region as circle).\n    If they don't overlap, we get zero. If they coincide at same location with same size, we get 1.\n    @param kp1 First keypoint\n    @param kp2 Second keypoint\n    */\n    CV_WRAP static float overlap(const KeyPoint& kp1, const KeyPoint& kp2);\n\n    CV_PROP_RW Point2f pt; //!< coordinates of the keypoints\n    CV_PROP_RW float size; //!< diameter of the meaningful keypoint neighborhood\n    CV_PROP_RW float angle; //!< computed orientation of the keypoint (-1 if not applicable);\n                            //!< it's in [0,360) degrees and measured relative to\n                            //!< image coordinate system, ie in clockwise.\n    CV_PROP_RW float response; //!< the response by which the most strong keypoints have been selected. Can be used for the further sorting or subsampling\n    CV_PROP_RW int octave; //!< octave (pyramid layer) from which the keypoint has been extracted\n    CV_PROP_RW int class_id; //!< object class (if the keypoints need to be clustered by an object they belong to)\n};\n\ntemplate<> class DataType<KeyPoint>\n{\npublic:\n    typedef KeyPoint      value_type;\n    typedef float         work_type;\n    typedef float         channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = (int)(sizeof(value_type)/sizeof(channel_type)), // 7\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\n\n\n//////////////////////////////// DMatch /////////////////////////////////\n\n/** @brief Class for matching keypoint descriptors\n\nquery descriptor index, train descriptor index, train image index, and distance between\ndescriptors.\n*/\nclass CV_EXPORTS_W_SIMPLE DMatch\n{\npublic:\n    CV_WRAP DMatch();\n    CV_WRAP DMatch(int _queryIdx, int _trainIdx, float _distance);\n    CV_WRAP DMatch(int _queryIdx, int _trainIdx, int _imgIdx, float _distance);\n\n    CV_PROP_RW int queryIdx; // query descriptor index\n    CV_PROP_RW int trainIdx; // train descriptor index\n    CV_PROP_RW int imgIdx;   // train image index\n\n    CV_PROP_RW float distance;\n\n    // less is better\n    bool operator<(const DMatch &m) const;\n};\n\ntemplate<> class DataType<DMatch>\n{\npublic:\n    typedef DMatch      value_type;\n    typedef int         work_type;\n    typedef int         channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = (int)(sizeof(value_type)/sizeof(channel_type)), // 4\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\n\n\n///////////////////////////// TermCriteria //////////////////////////////\n\n/** @brief The class defining termination criteria for iterative algorithms.\n\nYou can initialize it by default constructor and then override any parameters, or the structure may\nbe fully initialized using the advanced variant of the constructor.\n*/\nclass CV_EXPORTS TermCriteria\n{\npublic:\n    /**\n      Criteria type, can be one of: COUNT, EPS or COUNT + EPS\n    */\n    enum Type\n    {\n        COUNT=1, //!< the maximum number of iterations or elements to compute\n        MAX_ITER=COUNT, //!< ditto\n        EPS=2 //!< the desired accuracy or change in parameters at which the iterative algorithm stops\n    };\n\n    //! default constructor\n    TermCriteria();\n    /**\n    @param type The type of termination criteria, one of TermCriteria::Type\n    @param maxCount The maximum number of iterations or elements to compute.\n    @param epsilon The desired accuracy or change in parameters at which the iterative algorithm stops.\n    */\n    TermCriteria(int type, int maxCount, double epsilon);\n\n    int type; //!< the type of termination criteria: COUNT, EPS or COUNT + EPS\n    int maxCount; // the maximum number of iterations/elements\n    double epsilon; // the desired accuracy\n};\n\n\n//! @} core_basic\n\n///////////////////////// raster image moments //////////////////////////\n\n//! @addtogroup imgproc_shape\n//! @{\n\n/** @brief struct returned by cv::moments\n\nThe spatial moments \\f$\\texttt{Moments::m}_{ji}\\f$ are computed as:\n\n\\f[\\texttt{m} _{ji}= \\sum _{x,y}  \\left ( \\texttt{array} (x,y)  \\cdot x^j  \\cdot y^i \\right )\\f]\n\nThe central moments \\f$\\texttt{Moments::mu}_{ji}\\f$ are computed as:\n\n\\f[\\texttt{mu} _{ji}= \\sum _{x,y}  \\left ( \\texttt{array} (x,y)  \\cdot (x -  \\bar{x} )^j  \\cdot (y -  \\bar{y} )^i \\right )\\f]\n\nwhere \\f$(\\bar{x}, \\bar{y})\\f$ is the mass center:\n\n\\f[\\bar{x} = \\frac{\\texttt{m}_{10}}{\\texttt{m}_{00}} , \\; \\bar{y} = \\frac{\\texttt{m}_{01}}{\\texttt{m}_{00}}\\f]\n\nThe normalized central moments \\f$\\texttt{Moments::nu}_{ij}\\f$ are computed as:\n\n\\f[\\texttt{nu} _{ji}= \\frac{\\texttt{mu}_{ji}}{\\texttt{m}_{00}^{(i+j)/2+1}} .\\f]\n\n@note\n\\f$\\texttt{mu}_{00}=\\texttt{m}_{00}\\f$, \\f$\\texttt{nu}_{00}=1\\f$\n\\f$\\texttt{nu}_{10}=\\texttt{mu}_{10}=\\texttt{mu}_{01}=\\texttt{mu}_{10}=0\\f$ , hence the values are not\nstored.\n\nThe moments of a contour are defined in the same way but computed using the Green's formula (see\n<http://en.wikipedia.org/wiki/Green_theorem>). So, due to a limited raster resolution, the moments\ncomputed for a contour are slightly different from the moments computed for the same rasterized\ncontour.\n\n@note\nSince the contour moments are computed using Green formula, you may get seemingly odd results for\ncontours with self-intersections, e.g. a zero area (m00) for butterfly-shaped contours.\n */\nclass CV_EXPORTS_W_MAP Moments\n{\npublic:\n    //! the default constructor\n    Moments();\n    //! the full constructor\n    Moments(double m00, double m10, double m01, double m20, double m11,\n            double m02, double m30, double m21, double m12, double m03 );\n    ////! the conversion from CvMoments\n    //Moments( const CvMoments& moments );\n    ////! the conversion to CvMoments\n    //operator CvMoments() const;\n\n    //! @name spatial moments\n    //! @{\n    CV_PROP_RW double  m00, m10, m01, m20, m11, m02, m30, m21, m12, m03;\n    //! @}\n\n    //! @name central moments\n    //! @{\n    CV_PROP_RW double  mu20, mu11, mu02, mu30, mu21, mu12, mu03;\n    //! @}\n\n    //! @name central normalized moments\n    //! @{\n    CV_PROP_RW double  nu20, nu11, nu02, nu30, nu21, nu12, nu03;\n    //! @}\n};\n\ntemplate<> class DataType<Moments>\n{\npublic:\n    typedef Moments     value_type;\n    typedef double      work_type;\n    typedef double      channel_type;\n\n    enum { generic_type = 0,\n           depth        = DataType<channel_type>::depth,\n           channels     = (int)(sizeof(value_type)/sizeof(channel_type)), // 24\n           fmt          = DataType<channel_type>::fmt + ((channels - 1) << 8),\n           type         = CV_MAKETYPE(depth, channels)\n         };\n\n    typedef Vec<channel_type, channels> vec_type;\n};\n\n//! @} imgproc_shape\n\n//! @cond IGNORED\n\n/////////////////////////////////////////////////////////////////////////\n///////////////////////////// Implementation ////////////////////////////\n/////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////// Complex ////////////////////////////////\n\ntemplate<typename _Tp> inline\nComplex<_Tp>::Complex()\n    : re(0), im(0) {}\n\ntemplate<typename _Tp> inline\nComplex<_Tp>::Complex( _Tp _re, _Tp _im )\n    : re(_re), im(_im) {}\n\ntemplate<typename _Tp> template<typename T2> inline\nComplex<_Tp>::operator Complex<T2>() const\n{\n    return Complex<T2>(saturate_cast<T2>(re), saturate_cast<T2>(im));\n}\n\ntemplate<typename _Tp> inline\nComplex<_Tp> Complex<_Tp>::conj() const\n{\n    return Complex<_Tp>(re, -im);\n}\n\n\ntemplate<typename _Tp> static inline\nbool operator == (const Complex<_Tp>& a, const Complex<_Tp>& b)\n{\n    return a.re == b.re && a.im == b.im;\n}\n\ntemplate<typename _Tp> static inline\nbool operator != (const Complex<_Tp>& a, const Complex<_Tp>& b)\n{\n    return a.re != b.re || a.im != b.im;\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator + (const Complex<_Tp>& a, const Complex<_Tp>& b)\n{\n    return Complex<_Tp>( a.re + b.re, a.im + b.im );\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp>& operator += (Complex<_Tp>& a, const Complex<_Tp>& b)\n{\n    a.re += b.re; a.im += b.im;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator - (const Complex<_Tp>& a, const Complex<_Tp>& b)\n{\n    return Complex<_Tp>( a.re - b.re, a.im - b.im );\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp>& operator -= (Complex<_Tp>& a, const Complex<_Tp>& b)\n{\n    a.re -= b.re; a.im -= b.im;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator - (const Complex<_Tp>& a)\n{\n    return Complex<_Tp>(-a.re, -a.im);\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator * (const Complex<_Tp>& a, const Complex<_Tp>& b)\n{\n    return Complex<_Tp>( a.re*b.re - a.im*b.im, a.re*b.im + a.im*b.re );\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator * (const Complex<_Tp>& a, _Tp b)\n{\n    return Complex<_Tp>( a.re*b, a.im*b );\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator * (_Tp b, const Complex<_Tp>& a)\n{\n    return Complex<_Tp>( a.re*b, a.im*b );\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator + (const Complex<_Tp>& a, _Tp b)\n{\n    return Complex<_Tp>( a.re + b, a.im );\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator - (const Complex<_Tp>& a, _Tp b)\n{ return Complex<_Tp>( a.re - b, a.im ); }\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator + (_Tp b, const Complex<_Tp>& a)\n{\n    return Complex<_Tp>( a.re + b, a.im );\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator - (_Tp b, const Complex<_Tp>& a)\n{\n    return Complex<_Tp>( b - a.re, -a.im );\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp>& operator += (Complex<_Tp>& a, _Tp b)\n{\n    a.re += b; return a;\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp>& operator -= (Complex<_Tp>& a, _Tp b)\n{\n    a.re -= b; return a;\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp>& operator *= (Complex<_Tp>& a, _Tp b)\n{\n    a.re *= b; a.im *= b; return a;\n}\n\ntemplate<typename _Tp> static inline\ndouble abs(const Complex<_Tp>& a)\n{\n    return std::sqrt( (double)a.re*a.re + (double)a.im*a.im);\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator / (const Complex<_Tp>& a, const Complex<_Tp>& b)\n{\n    double t = 1./((double)b.re*b.re + (double)b.im*b.im);\n    return Complex<_Tp>( (_Tp)((a.re*b.re + a.im*b.im)*t),\n                        (_Tp)((-a.re*b.im + a.im*b.re)*t) );\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp>& operator /= (Complex<_Tp>& a, const Complex<_Tp>& b)\n{\n    return (a = a / b);\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator / (const Complex<_Tp>& a, _Tp b)\n{\n    _Tp t = (_Tp)1/b;\n    return Complex<_Tp>( a.re*t, a.im*t );\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator / (_Tp b, const Complex<_Tp>& a)\n{\n    return Complex<_Tp>(b)/a;\n}\n\ntemplate<typename _Tp> static inline\nComplex<_Tp> operator /= (const Complex<_Tp>& a, _Tp b)\n{\n    _Tp t = (_Tp)1/b;\n    a.re *= t; a.im *= t; return a;\n}\n\n\n\n//////////////////////////////// 2D Point ///////////////////////////////\n\ntemplate<typename _Tp> inline\nPoint_<_Tp>::Point_()\n    : x(0), y(0) {}\n\ntemplate<typename _Tp> inline\nPoint_<_Tp>::Point_(_Tp _x, _Tp _y)\n    : x(_x), y(_y) {}\n\ntemplate<typename _Tp> inline\nPoint_<_Tp>::Point_(const Point_& pt)\n    : x(pt.x), y(pt.y) {}\n\ntemplate<typename _Tp> inline\nPoint_<_Tp>::Point_(const Size_<_Tp>& sz)\n    : x(sz.width), y(sz.height) {}\n\ntemplate<typename _Tp> inline\nPoint_<_Tp>::Point_(const Vec<_Tp,2>& v)\n    : x(v[0]), y(v[1]) {}\n\ntemplate<typename _Tp> inline\nPoint_<_Tp>& Point_<_Tp>::operator = (const Point_& pt)\n{\n    x = pt.x; y = pt.y;\n    return *this;\n}\n\ntemplate<typename _Tp> template<typename _Tp2> inline\nPoint_<_Tp>::operator Point_<_Tp2>() const\n{\n    return Point_<_Tp2>(saturate_cast<_Tp2>(x), saturate_cast<_Tp2>(y));\n}\n\ntemplate<typename _Tp> inline\nPoint_<_Tp>::operator Vec<_Tp, 2>() const\n{\n    return Vec<_Tp, 2>(x, y);\n}\n\ntemplate<typename _Tp> inline\n_Tp Point_<_Tp>::dot(const Point_& pt) const\n{\n    return saturate_cast<_Tp>(x*pt.x + y*pt.y);\n}\n\ntemplate<typename _Tp> inline\ndouble Point_<_Tp>::ddot(const Point_& pt) const\n{\n    return (double)x*pt.x + (double)y*pt.y;\n}\n\ntemplate<typename _Tp> inline\ndouble Point_<_Tp>::cross(const Point_& pt) const\n{\n    return (double)x*pt.y - (double)y*pt.x;\n}\n\ntemplate<typename _Tp> inline bool\nPoint_<_Tp>::inside( const Rect_<_Tp>& r ) const\n{\n    return r.contains(*this);\n}\n\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp>& operator += (Point_<_Tp>& a, const Point_<_Tp>& b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp>& operator -= (Point_<_Tp>& a, const Point_<_Tp>& b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp>& operator *= (Point_<_Tp>& a, int b)\n{\n    a.x = saturate_cast<_Tp>(a.x * b);\n    a.y = saturate_cast<_Tp>(a.y * b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp>& operator *= (Point_<_Tp>& a, float b)\n{\n    a.x = saturate_cast<_Tp>(a.x * b);\n    a.y = saturate_cast<_Tp>(a.y * b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp>& operator *= (Point_<_Tp>& a, double b)\n{\n    a.x = saturate_cast<_Tp>(a.x * b);\n    a.y = saturate_cast<_Tp>(a.y * b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp>& operator /= (Point_<_Tp>& a, int b)\n{\n    a.x = saturate_cast<_Tp>(a.x / b);\n    a.y = saturate_cast<_Tp>(a.y / b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp>& operator /= (Point_<_Tp>& a, float b)\n{\n    a.x = saturate_cast<_Tp>(a.x / b);\n    a.y = saturate_cast<_Tp>(a.y / b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp>& operator /= (Point_<_Tp>& a, double b)\n{\n    a.x = saturate_cast<_Tp>(a.x / b);\n    a.y = saturate_cast<_Tp>(a.y / b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\ndouble norm(const Point_<_Tp>& pt)\n{\n    return std::sqrt((double)pt.x*pt.x + (double)pt.y*pt.y);\n}\n\ntemplate<typename _Tp> static inline\nbool operator == (const Point_<_Tp>& a, const Point_<_Tp>& b)\n{\n    return a.x == b.x && a.y == b.y;\n}\n\ntemplate<typename _Tp> static inline\nbool operator != (const Point_<_Tp>& a, const Point_<_Tp>& b)\n{\n    return a.x != b.x || a.y != b.y;\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator + (const Point_<_Tp>& a, const Point_<_Tp>& b)\n{\n    return Point_<_Tp>( saturate_cast<_Tp>(a.x + b.x), saturate_cast<_Tp>(a.y + b.y) );\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator - (const Point_<_Tp>& a, const Point_<_Tp>& b)\n{\n    return Point_<_Tp>( saturate_cast<_Tp>(a.x - b.x), saturate_cast<_Tp>(a.y - b.y) );\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator - (const Point_<_Tp>& a)\n{\n    return Point_<_Tp>( saturate_cast<_Tp>(-a.x), saturate_cast<_Tp>(-a.y) );\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator * (const Point_<_Tp>& a, int b)\n{\n    return Point_<_Tp>( saturate_cast<_Tp>(a.x*b), saturate_cast<_Tp>(a.y*b) );\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator * (int a, const Point_<_Tp>& b)\n{\n    return Point_<_Tp>( saturate_cast<_Tp>(b.x*a), saturate_cast<_Tp>(b.y*a) );\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator * (const Point_<_Tp>& a, float b)\n{\n    return Point_<_Tp>( saturate_cast<_Tp>(a.x*b), saturate_cast<_Tp>(a.y*b) );\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator * (float a, const Point_<_Tp>& b)\n{\n    return Point_<_Tp>( saturate_cast<_Tp>(b.x*a), saturate_cast<_Tp>(b.y*a) );\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator * (const Point_<_Tp>& a, double b)\n{\n    return Point_<_Tp>( saturate_cast<_Tp>(a.x*b), saturate_cast<_Tp>(a.y*b) );\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator * (double a, const Point_<_Tp>& b)\n{\n    return Point_<_Tp>( saturate_cast<_Tp>(b.x*a), saturate_cast<_Tp>(b.y*a) );\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator * (const Matx<_Tp, 2, 2>& a, const Point_<_Tp>& b)\n{\n    Matx<_Tp, 2, 1> tmp = a * Vec<_Tp,2>(b.x, b.y);\n    return Point_<_Tp>(tmp.val[0], tmp.val[1]);\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator * (const Matx<_Tp, 3, 3>& a, const Point_<_Tp>& b)\n{\n    Matx<_Tp, 3, 1> tmp = a * Vec<_Tp,3>(b.x, b.y, 1);\n    return Point3_<_Tp>(tmp.val[0], tmp.val[1], tmp.val[2]);\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator / (const Point_<_Tp>& a, int b)\n{\n    Point_<_Tp> tmp(a);\n    tmp /= b;\n    return tmp;\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator / (const Point_<_Tp>& a, float b)\n{\n    Point_<_Tp> tmp(a);\n    tmp /= b;\n    return tmp;\n}\n\ntemplate<typename _Tp> static inline\nPoint_<_Tp> operator / (const Point_<_Tp>& a, double b)\n{\n    Point_<_Tp> tmp(a);\n    tmp /= b;\n    return tmp;\n}\n\n\n\n//////////////////////////////// 3D Point ///////////////////////////////\n\ntemplate<typename _Tp> inline\nPoint3_<_Tp>::Point3_()\n    : x(0), y(0), z(0) {}\n\ntemplate<typename _Tp> inline\nPoint3_<_Tp>::Point3_(_Tp _x, _Tp _y, _Tp _z)\n    : x(_x), y(_y), z(_z) {}\n\ntemplate<typename _Tp> inline\nPoint3_<_Tp>::Point3_(const Point3_& pt)\n    : x(pt.x), y(pt.y), z(pt.z) {}\n\ntemplate<typename _Tp> inline\nPoint3_<_Tp>::Point3_(const Point_<_Tp>& pt)\n    : x(pt.x), y(pt.y), z(_Tp()) {}\n\ntemplate<typename _Tp> inline\nPoint3_<_Tp>::Point3_(const Vec<_Tp, 3>& v)\n    : x(v[0]), y(v[1]), z(v[2]) {}\n\ntemplate<typename _Tp> template<typename _Tp2> inline\nPoint3_<_Tp>::operator Point3_<_Tp2>() const\n{\n    return Point3_<_Tp2>(saturate_cast<_Tp2>(x), saturate_cast<_Tp2>(y), saturate_cast<_Tp2>(z));\n}\n\ntemplate<typename _Tp> inline\nPoint3_<_Tp>::operator Vec<_Tp, 3>() const\n{\n    return Vec<_Tp, 3>(x, y, z);\n}\n\ntemplate<typename _Tp> inline\nPoint3_<_Tp>& Point3_<_Tp>::operator = (const Point3_& pt)\n{\n    x = pt.x; y = pt.y; z = pt.z;\n    return *this;\n}\n\ntemplate<typename _Tp> inline\n_Tp Point3_<_Tp>::dot(const Point3_& pt) const\n{\n    return saturate_cast<_Tp>(x*pt.x + y*pt.y + z*pt.z);\n}\n\ntemplate<typename _Tp> inline\ndouble Point3_<_Tp>::ddot(const Point3_& pt) const\n{\n    return (double)x*pt.x + (double)y*pt.y + (double)z*pt.z;\n}\n\ntemplate<typename _Tp> inline\nPoint3_<_Tp> Point3_<_Tp>::cross(const Point3_<_Tp>& pt) const\n{\n    return Point3_<_Tp>(y*pt.z - z*pt.y, z*pt.x - x*pt.z, x*pt.y - y*pt.x);\n}\n\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp>& operator += (Point3_<_Tp>& a, const Point3_<_Tp>& b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp>& operator -= (Point3_<_Tp>& a, const Point3_<_Tp>& b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp>& operator *= (Point3_<_Tp>& a, int b)\n{\n    a.x = saturate_cast<_Tp>(a.x * b);\n    a.y = saturate_cast<_Tp>(a.y * b);\n    a.z = saturate_cast<_Tp>(a.z * b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp>& operator *= (Point3_<_Tp>& a, float b)\n{\n    a.x = saturate_cast<_Tp>(a.x * b);\n    a.y = saturate_cast<_Tp>(a.y * b);\n    a.z = saturate_cast<_Tp>(a.z * b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp>& operator *= (Point3_<_Tp>& a, double b)\n{\n    a.x = saturate_cast<_Tp>(a.x * b);\n    a.y = saturate_cast<_Tp>(a.y * b);\n    a.z = saturate_cast<_Tp>(a.z * b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp>& operator /= (Point3_<_Tp>& a, int b)\n{\n    a.x = saturate_cast<_Tp>(a.x / b);\n    a.y = saturate_cast<_Tp>(a.y / b);\n    a.z = saturate_cast<_Tp>(a.z / b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp>& operator /= (Point3_<_Tp>& a, float b)\n{\n    a.x = saturate_cast<_Tp>(a.x / b);\n    a.y = saturate_cast<_Tp>(a.y / b);\n    a.z = saturate_cast<_Tp>(a.z / b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp>& operator /= (Point3_<_Tp>& a, double b)\n{\n    a.x = saturate_cast<_Tp>(a.x / b);\n    a.y = saturate_cast<_Tp>(a.y / b);\n    a.z = saturate_cast<_Tp>(a.z / b);\n    return a;\n}\n\ntemplate<typename _Tp> static inline\ndouble norm(const Point3_<_Tp>& pt)\n{\n    return std::sqrt((double)pt.x*pt.x + (double)pt.y*pt.y + (double)pt.z*pt.z);\n}\n\ntemplate<typename _Tp> static inline\nbool operator == (const Point3_<_Tp>& a, const Point3_<_Tp>& b)\n{\n    return a.x == b.x && a.y == b.y && a.z == b.z;\n}\n\ntemplate<typename _Tp> static inline\nbool operator != (const Point3_<_Tp>& a, const Point3_<_Tp>& b)\n{\n    return a.x != b.x || a.y != b.y || a.z != b.z;\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator + (const Point3_<_Tp>& a, const Point3_<_Tp>& b)\n{\n    return Point3_<_Tp>( saturate_cast<_Tp>(a.x + b.x), saturate_cast<_Tp>(a.y + b.y), saturate_cast<_Tp>(a.z + b.z));\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator - (const Point3_<_Tp>& a, const Point3_<_Tp>& b)\n{\n    return Point3_<_Tp>( saturate_cast<_Tp>(a.x - b.x), saturate_cast<_Tp>(a.y - b.y), saturate_cast<_Tp>(a.z - b.z));\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator - (const Point3_<_Tp>& a)\n{\n    return Point3_<_Tp>( saturate_cast<_Tp>(-a.x), saturate_cast<_Tp>(-a.y), saturate_cast<_Tp>(-a.z) );\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator * (const Point3_<_Tp>& a, int b)\n{\n    return Point3_<_Tp>( saturate_cast<_Tp>(a.x*b), saturate_cast<_Tp>(a.y*b), saturate_cast<_Tp>(a.z*b) );\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator * (int a, const Point3_<_Tp>& b)\n{\n    return Point3_<_Tp>( saturate_cast<_Tp>(b.x * a), saturate_cast<_Tp>(b.y * a), saturate_cast<_Tp>(b.z * a) );\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator * (const Point3_<_Tp>& a, float b)\n{\n    return Point3_<_Tp>( saturate_cast<_Tp>(a.x * b), saturate_cast<_Tp>(a.y * b), saturate_cast<_Tp>(a.z * b) );\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator * (float a, const Point3_<_Tp>& b)\n{\n    return Point3_<_Tp>( saturate_cast<_Tp>(b.x * a), saturate_cast<_Tp>(b.y * a), saturate_cast<_Tp>(b.z * a) );\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator * (const Point3_<_Tp>& a, double b)\n{\n    return Point3_<_Tp>( saturate_cast<_Tp>(a.x * b), saturate_cast<_Tp>(a.y * b), saturate_cast<_Tp>(a.z * b) );\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator * (double a, const Point3_<_Tp>& b)\n{\n    return Point3_<_Tp>( saturate_cast<_Tp>(b.x * a), saturate_cast<_Tp>(b.y * a), saturate_cast<_Tp>(b.z * a) );\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator * (const Matx<_Tp, 3, 3>& a, const Point3_<_Tp>& b)\n{\n    Matx<_Tp, 3, 1> tmp = a * Vec<_Tp,3>(b.x, b.y, b.z);\n    return Point3_<_Tp>(tmp.val[0], tmp.val[1], tmp.val[2]);\n}\n\ntemplate<typename _Tp> static inline\nMatx<_Tp, 4, 1> operator * (const Matx<_Tp, 4, 4>& a, const Point3_<_Tp>& b)\n{\n    return a * Matx<_Tp, 4, 1>(b.x, b.y, b.z, 1);\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator / (const Point3_<_Tp>& a, int b)\n{\n    Point3_<_Tp> tmp(a);\n    tmp /= b;\n    return tmp;\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator / (const Point3_<_Tp>& a, float b)\n{\n    Point3_<_Tp> tmp(a);\n    tmp /= b;\n    return tmp;\n}\n\ntemplate<typename _Tp> static inline\nPoint3_<_Tp> operator / (const Point3_<_Tp>& a, double b)\n{\n    Point3_<_Tp> tmp(a);\n    tmp /= b;\n    return tmp;\n}\n\n\n\n////////////////////////////////// Size /////////////////////////////////\n\ntemplate<typename _Tp> inline\nSize_<_Tp>::Size_()\n    : width(0), height(0) {}\n\ntemplate<typename _Tp> inline\nSize_<_Tp>::Size_(_Tp _width, _Tp _height)\n    : width(_width), height(_height) {}\n\ntemplate<typename _Tp> inline\nSize_<_Tp>::Size_(const Size_& sz)\n    : width(sz.width), height(sz.height) {}\n\ntemplate<typename _Tp> inline\nSize_<_Tp>::Size_(const Point_<_Tp>& pt)\n    : width(pt.x), height(pt.y) {}\n\ntemplate<typename _Tp> template<typename _Tp2> inline\nSize_<_Tp>::operator Size_<_Tp2>() const\n{\n    return Size_<_Tp2>(saturate_cast<_Tp2>(width), saturate_cast<_Tp2>(height));\n}\n\ntemplate<typename _Tp> inline\nSize_<_Tp>& Size_<_Tp>::operator = (const Size_<_Tp>& sz)\n{\n    width = sz.width; height = sz.height;\n    return *this;\n}\n\ntemplate<typename _Tp> inline\n_Tp Size_<_Tp>::area() const\n{\n    return width * height;\n}\n\ntemplate<typename _Tp> static inline\nSize_<_Tp>& operator *= (Size_<_Tp>& a, _Tp b)\n{\n    a.width *= b;\n    a.height *= b;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nSize_<_Tp> operator * (const Size_<_Tp>& a, _Tp b)\n{\n    Size_<_Tp> tmp(a);\n    tmp *= b;\n    return tmp;\n}\n\ntemplate<typename _Tp> static inline\nSize_<_Tp>& operator /= (Size_<_Tp>& a, _Tp b)\n{\n    a.width /= b;\n    a.height /= b;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nSize_<_Tp> operator / (const Size_<_Tp>& a, _Tp b)\n{\n    Size_<_Tp> tmp(a);\n    tmp /= b;\n    return tmp;\n}\n\ntemplate<typename _Tp> static inline\nSize_<_Tp>& operator += (Size_<_Tp>& a, const Size_<_Tp>& b)\n{\n    a.width += b.width;\n    a.height += b.height;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nSize_<_Tp> operator + (const Size_<_Tp>& a, const Size_<_Tp>& b)\n{\n    Size_<_Tp> tmp(a);\n    tmp += b;\n    return tmp;\n}\n\ntemplate<typename _Tp> static inline\nSize_<_Tp>& operator -= (Size_<_Tp>& a, const Size_<_Tp>& b)\n{\n    a.width -= b.width;\n    a.height -= b.height;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nSize_<_Tp> operator - (const Size_<_Tp>& a, const Size_<_Tp>& b)\n{\n    Size_<_Tp> tmp(a);\n    tmp -= b;\n    return tmp;\n}\n\ntemplate<typename _Tp> static inline\nbool operator == (const Size_<_Tp>& a, const Size_<_Tp>& b)\n{\n    return a.width == b.width && a.height == b.height;\n}\n\ntemplate<typename _Tp> static inline\nbool operator != (const Size_<_Tp>& a, const Size_<_Tp>& b)\n{\n    return !(a == b);\n}\n\n\n\n////////////////////////////////// Rect /////////////////////////////////\n\ntemplate<typename _Tp> inline\nRect_<_Tp>::Rect_()\n    : x(0), y(0), width(0), height(0) {}\n\ntemplate<typename _Tp> inline\nRect_<_Tp>::Rect_(_Tp _x, _Tp _y, _Tp _width, _Tp _height)\n    : x(_x), y(_y), width(_width), height(_height) {}\n\ntemplate<typename _Tp> inline\nRect_<_Tp>::Rect_(const Rect_<_Tp>& r)\n    : x(r.x), y(r.y), width(r.width), height(r.height) {}\n\ntemplate<typename _Tp> inline\nRect_<_Tp>::Rect_(const Point_<_Tp>& org, const Size_<_Tp>& sz)\n    : x(org.x), y(org.y), width(sz.width), height(sz.height) {}\n\ntemplate<typename _Tp> inline\nRect_<_Tp>::Rect_(const Point_<_Tp>& pt1, const Point_<_Tp>& pt2)\n{\n    x = std::min(pt1.x, pt2.x);\n    y = std::min(pt1.y, pt2.y);\n    width = std::max(pt1.x, pt2.x) - x;\n    height = std::max(pt1.y, pt2.y) - y;\n}\n\ntemplate<typename _Tp> inline\nRect_<_Tp>& Rect_<_Tp>::operator = ( const Rect_<_Tp>& r )\n{\n    x = r.x;\n    y = r.y;\n    width = r.width;\n    height = r.height;\n    return *this;\n}\n\ntemplate<typename _Tp> inline\nPoint_<_Tp> Rect_<_Tp>::tl() const\n{\n    return Point_<_Tp>(x,y);\n}\n\ntemplate<typename _Tp> inline\nPoint_<_Tp> Rect_<_Tp>::br() const\n{\n    return Point_<_Tp>(x + width, y + height);\n}\n\ntemplate<typename _Tp> inline\nSize_<_Tp> Rect_<_Tp>::size() const\n{\n    return Size_<_Tp>(width, height);\n}\n\ntemplate<typename _Tp> inline\n_Tp Rect_<_Tp>::area() const\n{\n    return width * height;\n}\n\ntemplate<typename _Tp> template<typename _Tp2> inline\nRect_<_Tp>::operator Rect_<_Tp2>() const\n{\n    return Rect_<_Tp2>(saturate_cast<_Tp2>(x), saturate_cast<_Tp2>(y), saturate_cast<_Tp2>(width), saturate_cast<_Tp2>(height));\n}\n\ntemplate<typename _Tp> inline\nbool Rect_<_Tp>::contains(const Point_<_Tp>& pt) const\n{\n    return x <= pt.x && pt.x < x + width && y <= pt.y && pt.y < y + height;\n}\n\n\ntemplate<typename _Tp> static inline\nRect_<_Tp>& operator += ( Rect_<_Tp>& a, const Point_<_Tp>& b )\n{\n    a.x += b.x;\n    a.y += b.y;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nRect_<_Tp>& operator -= ( Rect_<_Tp>& a, const Point_<_Tp>& b )\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nRect_<_Tp>& operator += ( Rect_<_Tp>& a, const Size_<_Tp>& b )\n{\n    a.width += b.width;\n    a.height += b.height;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nRect_<_Tp>& operator -= ( Rect_<_Tp>& a, const Size_<_Tp>& b )\n{\n    a.width -= b.width;\n    a.height -= b.height;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nRect_<_Tp>& operator &= ( Rect_<_Tp>& a, const Rect_<_Tp>& b )\n{\n    _Tp x1 = std::max(a.x, b.x);\n    _Tp y1 = std::max(a.y, b.y);\n    a.width = std::min(a.x + a.width, b.x + b.width) - x1;\n    a.height = std::min(a.y + a.height, b.y + b.height) - y1;\n    a.x = x1;\n    a.y = y1;\n    if( a.width <= 0 || a.height <= 0 )\n        a = Rect();\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nRect_<_Tp>& operator |= ( Rect_<_Tp>& a, const Rect_<_Tp>& b )\n{\n    _Tp x1 = std::min(a.x, b.x);\n    _Tp y1 = std::min(a.y, b.y);\n    a.width = std::max(a.x + a.width, b.x + b.width) - x1;\n    a.height = std::max(a.y + a.height, b.y + b.height) - y1;\n    a.x = x1;\n    a.y = y1;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nbool operator == (const Rect_<_Tp>& a, const Rect_<_Tp>& b)\n{\n    return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height;\n}\n\ntemplate<typename _Tp> static inline\nbool operator != (const Rect_<_Tp>& a, const Rect_<_Tp>& b)\n{\n    return a.x != b.x || a.y != b.y || a.width != b.width || a.height != b.height;\n}\n\ntemplate<typename _Tp> static inline\nRect_<_Tp> operator + (const Rect_<_Tp>& a, const Point_<_Tp>& b)\n{\n    return Rect_<_Tp>( a.x + b.x, a.y + b.y, a.width, a.height );\n}\n\ntemplate<typename _Tp> static inline\nRect_<_Tp> operator - (const Rect_<_Tp>& a, const Point_<_Tp>& b)\n{\n    return Rect_<_Tp>( a.x - b.x, a.y - b.y, a.width, a.height );\n}\n\ntemplate<typename _Tp> static inline\nRect_<_Tp> operator + (const Rect_<_Tp>& a, const Size_<_Tp>& b)\n{\n    return Rect_<_Tp>( a.x, a.y, a.width + b.width, a.height + b.height );\n}\n\ntemplate<typename _Tp> static inline\nRect_<_Tp> operator & (const Rect_<_Tp>& a, const Rect_<_Tp>& b)\n{\n    Rect_<_Tp> c = a;\n    return c &= b;\n}\n\ntemplate<typename _Tp> static inline\nRect_<_Tp> operator | (const Rect_<_Tp>& a, const Rect_<_Tp>& b)\n{\n    Rect_<_Tp> c = a;\n    return c |= b;\n}\n\n\n\n////////////////////////////// RotatedRect //////////////////////////////\n\ninline\nRotatedRect::RotatedRect()\n    : center(), size(), angle(0) {}\n\ninline\nRotatedRect::RotatedRect(const Point2f& _center, const Size2f& _size, float _angle)\n    : center(_center), size(_size), angle(_angle) {}\n\n\n\n///////////////////////////////// Range /////////////////////////////////\n\ninline\nRange::Range()\n    : start(0), end(0) {}\n\ninline\nRange::Range(int _start, int _end)\n    : start(_start), end(_end) {}\n\ninline\nint Range::size() const\n{\n    return end - start;\n}\n\ninline\nbool Range::empty() const\n{\n    return start == end;\n}\n\ninline\nRange Range::all()\n{\n    return Range(INT_MIN, INT_MAX);\n}\n\n\nstatic inline\nbool operator == (const Range& r1, const Range& r2)\n{\n    return r1.start == r2.start && r1.end == r2.end;\n}\n\nstatic inline\nbool operator != (const Range& r1, const Range& r2)\n{\n    return !(r1 == r2);\n}\n\nstatic inline\nbool operator !(const Range& r)\n{\n    return r.start == r.end;\n}\n\nstatic inline\nRange operator & (const Range& r1, const Range& r2)\n{\n    Range r(std::max(r1.start, r2.start), std::min(r1.end, r2.end));\n    r.end = std::max(r.end, r.start);\n    return r;\n}\n\nstatic inline\nRange& operator &= (Range& r1, const Range& r2)\n{\n    r1 = r1 & r2;\n    return r1;\n}\n\nstatic inline\nRange operator + (const Range& r1, int delta)\n{\n    return Range(r1.start + delta, r1.end + delta);\n}\n\nstatic inline\nRange operator + (int delta, const Range& r1)\n{\n    return Range(r1.start + delta, r1.end + delta);\n}\n\nstatic inline\nRange operator - (const Range& r1, int delta)\n{\n    return r1 + (-delta);\n}\n\n\n\n///////////////////////////////// Scalar ////////////////////////////////\n\ntemplate<typename _Tp> inline\nScalar_<_Tp>::Scalar_()\n{\n    this->val[0] = this->val[1] = this->val[2] = this->val[3] = 0;\n}\n\ntemplate<typename _Tp> inline\nScalar_<_Tp>::Scalar_(_Tp v0, _Tp v1, _Tp v2, _Tp v3)\n{\n    this->val[0] = v0;\n    this->val[1] = v1;\n    this->val[2] = v2;\n    this->val[3] = v3;\n}\n\ntemplate<typename _Tp> template<typename _Tp2, int cn> inline\nScalar_<_Tp>::Scalar_(const Vec<_Tp2, cn>& v)\n{\n    int i;\n    for( i = 0; i < (cn < 4 ? cn : 4); i++ )\n        this->val[i] = cv::saturate_cast<_Tp>(v.val[i]);\n    for( ; i < 4; i++ )\n        this->val[i] = 0;\n}\n\ntemplate<typename _Tp> inline\nScalar_<_Tp>::Scalar_(_Tp v0)\n{\n    this->val[0] = v0;\n    this->val[1] = this->val[2] = this->val[3] = 0;\n}\n\ntemplate<typename _Tp> inline\nScalar_<_Tp> Scalar_<_Tp>::all(_Tp v0)\n{\n    return Scalar_<_Tp>(v0, v0, v0, v0);\n}\n\n\ntemplate<typename _Tp> inline\nScalar_<_Tp> Scalar_<_Tp>::mul(const Scalar_<_Tp>& a, double scale ) const\n{\n    return Scalar_<_Tp>(saturate_cast<_Tp>(this->val[0] * a.val[0] * scale),\n                        saturate_cast<_Tp>(this->val[1] * a.val[1] * scale),\n                        saturate_cast<_Tp>(this->val[2] * a.val[2] * scale),\n                        saturate_cast<_Tp>(this->val[3] * a.val[3] * scale));\n}\n\ntemplate<typename _Tp> inline\nScalar_<_Tp> Scalar_<_Tp>::conj() const\n{\n    return Scalar_<_Tp>(saturate_cast<_Tp>( this->val[0]),\n                        saturate_cast<_Tp>(-this->val[1]),\n                        saturate_cast<_Tp>(-this->val[2]),\n                        saturate_cast<_Tp>(-this->val[3]));\n}\n\ntemplate<typename _Tp> inline\nbool Scalar_<_Tp>::isReal() const\n{\n    return this->val[1] == 0 && this->val[2] == 0 && this->val[3] == 0;\n}\n\n\ntemplate<typename _Tp> template<typename T2> inline\nScalar_<_Tp>::operator Scalar_<T2>() const\n{\n    return Scalar_<T2>(saturate_cast<T2>(this->val[0]),\n                       saturate_cast<T2>(this->val[1]),\n                       saturate_cast<T2>(this->val[2]),\n                       saturate_cast<T2>(this->val[3]));\n}\n\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp>& operator += (Scalar_<_Tp>& a, const Scalar_<_Tp>& b)\n{\n    a.val[0] += b.val[0];\n    a.val[1] += b.val[1];\n    a.val[2] += b.val[2];\n    a.val[3] += b.val[3];\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp>& operator -= (Scalar_<_Tp>& a, const Scalar_<_Tp>& b)\n{\n    a.val[0] -= b.val[0];\n    a.val[1] -= b.val[1];\n    a.val[2] -= b.val[2];\n    a.val[3] -= b.val[3];\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp>& operator *= ( Scalar_<_Tp>& a, _Tp v )\n{\n    a.val[0] *= v;\n    a.val[1] *= v;\n    a.val[2] *= v;\n    a.val[3] *= v;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nbool operator == ( const Scalar_<_Tp>& a, const Scalar_<_Tp>& b )\n{\n    return a.val[0] == b.val[0] && a.val[1] == b.val[1] &&\n           a.val[2] == b.val[2] && a.val[3] == b.val[3];\n}\n\ntemplate<typename _Tp> static inline\nbool operator != ( const Scalar_<_Tp>& a, const Scalar_<_Tp>& b )\n{\n    return a.val[0] != b.val[0] || a.val[1] != b.val[1] ||\n           a.val[2] != b.val[2] || a.val[3] != b.val[3];\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp> operator + (const Scalar_<_Tp>& a, const Scalar_<_Tp>& b)\n{\n    return Scalar_<_Tp>(a.val[0] + b.val[0],\n                        a.val[1] + b.val[1],\n                        a.val[2] + b.val[2],\n                        a.val[3] + b.val[3]);\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp> operator - (const Scalar_<_Tp>& a, const Scalar_<_Tp>& b)\n{\n    return Scalar_<_Tp>(saturate_cast<_Tp>(a.val[0] - b.val[0]),\n                        saturate_cast<_Tp>(a.val[1] - b.val[1]),\n                        saturate_cast<_Tp>(a.val[2] - b.val[2]),\n                        saturate_cast<_Tp>(a.val[3] - b.val[3]));\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp> operator * (const Scalar_<_Tp>& a, _Tp alpha)\n{\n    return Scalar_<_Tp>(a.val[0] * alpha,\n                        a.val[1] * alpha,\n                        a.val[2] * alpha,\n                        a.val[3] * alpha);\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp> operator * (_Tp alpha, const Scalar_<_Tp>& a)\n{\n    return a*alpha;\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp> operator - (const Scalar_<_Tp>& a)\n{\n    return Scalar_<_Tp>(saturate_cast<_Tp>(-a.val[0]),\n                        saturate_cast<_Tp>(-a.val[1]),\n                        saturate_cast<_Tp>(-a.val[2]),\n                        saturate_cast<_Tp>(-a.val[3]));\n}\n\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp> operator * (const Scalar_<_Tp>& a, const Scalar_<_Tp>& b)\n{\n    return Scalar_<_Tp>(saturate_cast<_Tp>(a[0]*b[0] - a[1]*b[1] - a[2]*b[2] - a[3]*b[3]),\n                        saturate_cast<_Tp>(a[0]*b[1] + a[1]*b[0] + a[2]*b[3] - a[3]*b[2]),\n                        saturate_cast<_Tp>(a[0]*b[2] - a[1]*b[3] + a[2]*b[0] + a[3]*b[1]),\n                        saturate_cast<_Tp>(a[0]*b[3] + a[1]*b[2] - a[2]*b[1] + a[3]*b[0]));\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp>& operator *= (Scalar_<_Tp>& a, const Scalar_<_Tp>& b)\n{\n    a = a * b;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp> operator / (const Scalar_<_Tp>& a, _Tp alpha)\n{\n    return Scalar_<_Tp>(a.val[0] / alpha,\n                        a.val[1] / alpha,\n                        a.val[2] / alpha,\n                        a.val[3] / alpha);\n}\n\ntemplate<typename _Tp> static inline\nScalar_<float> operator / (const Scalar_<float>& a, float alpha)\n{\n    float s = 1 / alpha;\n    return Scalar_<float>(a.val[0] * s, a.val[1] * s, a.val[2] * s, a.val[3] * s);\n}\n\ntemplate<typename _Tp> static inline\nScalar_<double> operator / (const Scalar_<double>& a, double alpha)\n{\n    double s = 1 / alpha;\n    return Scalar_<double>(a.val[0] * s, a.val[1] * s, a.val[2] * s, a.val[3] * s);\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp>& operator /= (Scalar_<_Tp>& a, _Tp alpha)\n{\n    a = a / alpha;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp> operator / (_Tp a, const Scalar_<_Tp>& b)\n{\n    _Tp s = a / (b[0]*b[0] + b[1]*b[1] + b[2]*b[2] + b[3]*b[3]);\n    return b.conj() * s;\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp> operator / (const Scalar_<_Tp>& a, const Scalar_<_Tp>& b)\n{\n    return a * ((_Tp)1 / b);\n}\n\ntemplate<typename _Tp> static inline\nScalar_<_Tp>& operator /= (Scalar_<_Tp>& a, const Scalar_<_Tp>& b)\n{\n    a = a / b;\n    return a;\n}\n\ntemplate<typename _Tp> static inline\nScalar operator * (const Matx<_Tp, 4, 4>& a, const Scalar& b)\n{\n    Matx<double, 4, 1> c((Matx<double, 4, 4>)a, b, Matx_MatMulOp());\n    return reinterpret_cast<const Scalar&>(c);\n}\n\ntemplate<> inline\nScalar operator * (const Matx<double, 4, 4>& a, const Scalar& b)\n{\n    Matx<double, 4, 1> c(a, b, Matx_MatMulOp());\n    return reinterpret_cast<const Scalar&>(c);\n}\n\n\n\n//////////////////////////////// KeyPoint ///////////////////////////////\n\ninline\nKeyPoint::KeyPoint()\n    : pt(0,0), size(0), angle(-1), response(0), octave(0), class_id(-1) {}\n\ninline\nKeyPoint::KeyPoint(Point2f _pt, float _size, float _angle, float _response, int _octave, int _class_id)\n    : pt(_pt), size(_size), angle(_angle), response(_response), octave(_octave), class_id(_class_id) {}\n\ninline\nKeyPoint::KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave, int _class_id)\n    : pt(x, y), size(_size), angle(_angle), response(_response), octave(_octave), class_id(_class_id) {}\n\n\n\n///////////////////////////////// DMatch ////////////////////////////////\n\ninline\nDMatch::DMatch()\n    : queryIdx(-1), trainIdx(-1), imgIdx(-1), distance(FLT_MAX) {}\n\ninline\nDMatch::DMatch(int _queryIdx, int _trainIdx, float _distance)\n    : queryIdx(_queryIdx), trainIdx(_trainIdx), imgIdx(-1), distance(_distance) {}\n\ninline\nDMatch::DMatch(int _queryIdx, int _trainIdx, int _imgIdx, float _distance)\n    : queryIdx(_queryIdx), trainIdx(_trainIdx), imgIdx(_imgIdx), distance(_distance) {}\n\ninline\nbool DMatch::operator < (const DMatch &m) const\n{\n    return distance < m.distance;\n}\n\n\n\n////////////////////////////// TermCriteria /////////////////////////////\n\ninline\nTermCriteria::TermCriteria()\n    : type(0), maxCount(0), epsilon(0) {}\n\ninline\nTermCriteria::TermCriteria(int _type, int _maxCount, double _epsilon)\n    : type(_type), maxCount(_maxCount), epsilon(_epsilon) {}\n\n//! @endcond\n\n} // cv\n\n#endif //__OPENCV_CORE_TYPES_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/types_c.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_TYPES_H__\n#define __OPENCV_CORE_TYPES_H__\n\n#ifdef HAVE_IPL\n#  ifndef __IPL_H__\n#    if defined WIN32 || defined _WIN32\n#      include <ipl.h>\n#    else\n#      include <ipl/ipl.h>\n#    endif\n#  endif\n#elif defined __IPL_H__\n#  define HAVE_IPL\n#endif\n\n#include \"opencv2/core/cvdef.h\"\n\n#ifndef SKIP_INCLUDES\n#include <assert.h>\n#include <stdlib.h>\n#include <string.h>\n#include <float.h>\n#endif // SKIP_INCLUDES\n\n#if defined WIN32 || defined _WIN32\n#  define CV_CDECL __cdecl\n#  define CV_STDCALL __stdcall\n#else\n#  define CV_CDECL\n#  define CV_STDCALL\n#endif\n\n#ifndef CV_DEFAULT\n#  ifdef __cplusplus\n#    define CV_DEFAULT(val) = val\n#  else\n#    define CV_DEFAULT(val)\n#  endif\n#endif\n\n#ifndef CV_EXTERN_C_FUNCPTR\n#  ifdef __cplusplus\n#    define CV_EXTERN_C_FUNCPTR(x) extern \"C\" { typedef x; }\n#  else\n#    define CV_EXTERN_C_FUNCPTR(x) typedef x\n#  endif\n#endif\n\n#ifndef CVAPI\n#  define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL\n#endif\n\n#ifndef CV_IMPL\n#  define CV_IMPL CV_EXTERN_C\n#endif\n\n#ifdef __cplusplus\n#  include \"opencv2/core.hpp\"\n#endif\n\n/** @addtogroup core_c\n    @{\n*/\n\n/** @brief This is the \"metatype\" used *only* as a function parameter.\n\nIt denotes that the function accepts arrays of multiple types, such as IplImage*, CvMat* or even\nCvSeq* sometimes. The particular array type is determined at runtime by analyzing the first 4\nbytes of the header. In C++ interface the role of CvArr is played by InputArray and OutputArray.\n */\ntypedef void CvArr;\n\ntypedef int CVStatus;\n\n/** @see cv::Error::Code */\nenum {\n CV_StsOk=                       0,  /**< everything is ok                */\n CV_StsBackTrace=               -1,  /**< pseudo error for back trace     */\n CV_StsError=                   -2,  /**< unknown /unspecified error      */\n CV_StsInternal=                -3,  /**< internal error (bad state)      */\n CV_StsNoMem=                   -4,  /**< insufficient memory             */\n CV_StsBadArg=                  -5,  /**< function arg/param is bad       */\n CV_StsBadFunc=                 -6,  /**< unsupported function            */\n CV_StsNoConv=                  -7,  /**< iter. didn't converge           */\n CV_StsAutoTrace=               -8,  /**< tracing                         */\n CV_HeaderIsNull=               -9,  /**< image header is NULL            */\n CV_BadImageSize=              -10,  /**< image size is invalid           */\n CV_BadOffset=                 -11,  /**< offset is invalid               */\n CV_BadDataPtr=                -12,  /**/\n CV_BadStep=                   -13,  /**/\n CV_BadModelOrChSeq=           -14,  /**/\n CV_BadNumChannels=            -15,  /**/\n CV_BadNumChannel1U=           -16,  /**/\n CV_BadDepth=                  -17,  /**/\n CV_BadAlphaChannel=           -18,  /**/\n CV_BadOrder=                  -19,  /**/\n CV_BadOrigin=                 -20,  /**/\n CV_BadAlign=                  -21,  /**/\n CV_BadCallBack=               -22,  /**/\n CV_BadTileSize=               -23,  /**/\n CV_BadCOI=                    -24,  /**/\n CV_BadROISize=                -25,  /**/\n CV_MaskIsTiled=               -26,  /**/\n CV_StsNullPtr=                -27,  /**< null pointer */\n CV_StsVecLengthErr=           -28,  /**< incorrect vector length */\n CV_StsFilterStructContentErr= -29,  /**< incorr. filter structure content */\n CV_StsKernelStructContentErr= -30,  /**< incorr. transform kernel content */\n CV_StsFilterOffsetErr=        -31,  /**< incorrect filter offset value */\n CV_StsBadSize=                -201, /**< the input/output structure size is incorrect  */\n CV_StsDivByZero=              -202, /**< division by zero */\n CV_StsInplaceNotSupported=    -203, /**< in-place operation is not supported */\n CV_StsObjectNotFound=         -204, /**< request can't be completed */\n CV_StsUnmatchedFormats=       -205, /**< formats of input/output arrays differ */\n CV_StsBadFlag=                -206, /**< flag is wrong or not supported */\n CV_StsBadPoint=               -207, /**< bad CvPoint */\n CV_StsBadMask=                -208, /**< bad format of mask (neither 8uC1 nor 8sC1)*/\n CV_StsUnmatchedSizes=         -209, /**< sizes of input/output structures do not match */\n CV_StsUnsupportedFormat=      -210, /**< the data format/type is not supported by the function*/\n CV_StsOutOfRange=             -211, /**< some of parameters are out of range */\n CV_StsParseError=             -212, /**< invalid syntax/structure of the parsed file */\n CV_StsNotImplemented=         -213, /**< the requested function/feature is not implemented */\n CV_StsBadMemBlock=            -214, /**< an allocated block has been corrupted */\n CV_StsAssert=                 -215, /**< assertion failed */\n CV_GpuNotSupported=           -216,\n CV_GpuApiCallError=           -217,\n CV_OpenGlNotSupported=        -218,\n CV_OpenGlApiCallError=        -219,\n CV_OpenCLApiCallError=        -220,\n CV_OpenCLDoubleNotSupported=  -221,\n CV_OpenCLInitError=           -222,\n CV_OpenCLNoAMDBlasFft=        -223\n};\n\n/****************************************************************************************\\\n*                             Common macros and inline functions                         *\n\\****************************************************************************************/\n\n#define CV_SWAP(a,b,t) ((t) = (a), (a) = (b), (b) = (t))\n\n/** min & max without jumps */\n#define  CV_IMIN(a, b)  ((a) ^ (((a)^(b)) & (((a) < (b)) - 1)))\n\n#define  CV_IMAX(a, b)  ((a) ^ (((a)^(b)) & (((a) > (b)) - 1)))\n\n/** absolute value without jumps */\n#ifndef __cplusplus\n#  define  CV_IABS(a)     (((a) ^ ((a) < 0 ? -1 : 0)) - ((a) < 0 ? -1 : 0))\n#else\n#  define  CV_IABS(a)     abs(a)\n#endif\n#define  CV_CMP(a,b)    (((a) > (b)) - ((a) < (b)))\n#define  CV_SIGN(a)     CV_CMP((a),0)\n\n#define cvInvSqrt(value) ((float)(1./sqrt(value)))\n#define cvSqrt(value)  ((float)sqrt(value))\n\n\n/*************** Random number generation *******************/\n\ntypedef uint64 CvRNG;\n\n#define CV_RNG_COEFF 4164903690U\n\n/** @brief Initializes a random number generator state.\n\nThe function initializes a random number generator and returns the state. The pointer to the state\ncan be then passed to the cvRandInt, cvRandReal and cvRandArr functions. In the current\nimplementation a multiply-with-carry generator is used.\n@param seed 64-bit value used to initiate a random sequence\n@sa the C++ class RNG replaced CvRNG.\n */\nCV_INLINE CvRNG cvRNG( int64 seed CV_DEFAULT(-1))\n{\n    CvRNG rng = seed ? (uint64)seed : (uint64)(int64)-1;\n    return rng;\n}\n\n/** @brief Returns a 32-bit unsigned integer and updates RNG.\n\nThe function returns a uniformly-distributed random 32-bit unsigned integer and updates the RNG\nstate. It is similar to the rand() function from the C runtime library, except that OpenCV functions\nalways generates a 32-bit random number, regardless of the platform.\n@param rng CvRNG state initialized by cvRNG.\n */\nCV_INLINE unsigned cvRandInt( CvRNG* rng )\n{\n    uint64 temp = *rng;\n    temp = (uint64)(unsigned)temp*CV_RNG_COEFF + (temp >> 32);\n    *rng = temp;\n    return (unsigned)temp;\n}\n\n/** @brief Returns a floating-point random number and updates RNG.\n\nThe function returns a uniformly-distributed random floating-point number between 0 and 1 (1 is not\nincluded).\n@param rng RNG state initialized by cvRNG\n */\nCV_INLINE double cvRandReal( CvRNG* rng )\n{\n    return cvRandInt(rng)*2.3283064365386962890625e-10 /* 2^-32 */;\n}\n\n/****************************************************************************************\\\n*                                  Image type (IplImage)                                 *\n\\****************************************************************************************/\n\n#ifndef HAVE_IPL\n\n/*\n * The following definitions (until #endif)\n * is an extract from IPL headers.\n * Copyright (c) 1995 Intel Corporation.\n */\n#define IPL_DEPTH_SIGN 0x80000000\n\n#define IPL_DEPTH_1U     1\n#define IPL_DEPTH_8U     8\n#define IPL_DEPTH_16U   16\n#define IPL_DEPTH_32F   32\n\n#define IPL_DEPTH_8S  (IPL_DEPTH_SIGN| 8)\n#define IPL_DEPTH_16S (IPL_DEPTH_SIGN|16)\n#define IPL_DEPTH_32S (IPL_DEPTH_SIGN|32)\n\n#define IPL_DATA_ORDER_PIXEL  0\n#define IPL_DATA_ORDER_PLANE  1\n\n#define IPL_ORIGIN_TL 0\n#define IPL_ORIGIN_BL 1\n\n#define IPL_ALIGN_4BYTES   4\n#define IPL_ALIGN_8BYTES   8\n#define IPL_ALIGN_16BYTES 16\n#define IPL_ALIGN_32BYTES 32\n\n#define IPL_ALIGN_DWORD   IPL_ALIGN_4BYTES\n#define IPL_ALIGN_QWORD   IPL_ALIGN_8BYTES\n\n#define IPL_BORDER_CONSTANT   0\n#define IPL_BORDER_REPLICATE  1\n#define IPL_BORDER_REFLECT    2\n#define IPL_BORDER_WRAP       3\n\n/** The IplImage is taken from the Intel Image Processing Library, in which the format is native. OpenCV\nonly supports a subset of possible IplImage formats, as outlined in the parameter list above.\n\nIn addition to the above restrictions, OpenCV handles ROIs differently. OpenCV functions require\nthat the image size or ROI size of all source and destination images match exactly. On the other\nhand, the Intel Image Processing Library processes the area of intersection between the source and\ndestination images (or ROIs), allowing them to vary independently.\n*/\ntypedef struct\n#ifdef __cplusplus\n  CV_EXPORTS\n#endif\n_IplImage\n{\n    int  nSize;             /**< sizeof(IplImage) */\n    int  ID;                /**< version (=0)*/\n    int  nChannels;         /**< Most of OpenCV functions support 1,2,3 or 4 channels */\n    int  alphaChannel;      /**< Ignored by OpenCV */\n    int  depth;             /**< Pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S,\n                               IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported.  */\n    char colorModel[4];     /**< Ignored by OpenCV */\n    char channelSeq[4];     /**< ditto */\n    int  dataOrder;         /**< 0 - interleaved color channels, 1 - separate color channels.\n                               cvCreateImage can only create interleaved images */\n    int  origin;            /**< 0 - top-left origin,\n                               1 - bottom-left origin (Windows bitmaps style).  */\n    int  align;             /**< Alignment of image rows (4 or 8).\n                               OpenCV ignores it and uses widthStep instead.    */\n    int  width;             /**< Image width in pixels.                           */\n    int  height;            /**< Image height in pixels.                          */\n    struct _IplROI *roi;    /**< Image ROI. If NULL, the whole image is selected. */\n    struct _IplImage *maskROI;      /**< Must be NULL. */\n    void  *imageId;                 /**< \"           \" */\n    struct _IplTileInfo *tileInfo;  /**< \"           \" */\n    int  imageSize;         /**< Image data size in bytes\n                               (==image->height*image->widthStep\n                               in case of interleaved data)*/\n    char *imageData;        /**< Pointer to aligned image data.         */\n    int  widthStep;         /**< Size of aligned image row in bytes.    */\n    int  BorderMode[4];     /**< Ignored by OpenCV.                     */\n    int  BorderConst[4];    /**< Ditto.                                 */\n    char *imageDataOrigin;  /**< Pointer to very origin of image data\n                               (not necessarily aligned) -\n                               needed for correct deallocation */\n\n#ifdef __cplusplus\n    _IplImage() {}\n    _IplImage(const cv::Mat& m);\n#endif\n}\nIplImage;\n\ntypedef struct _IplTileInfo IplTileInfo;\n\ntypedef struct _IplROI\n{\n    int  coi; /**< 0 - no COI (all channels are selected), 1 - 0th channel is selected ...*/\n    int  xOffset;\n    int  yOffset;\n    int  width;\n    int  height;\n}\nIplROI;\n\ntypedef struct _IplConvKernel\n{\n    int  nCols;\n    int  nRows;\n    int  anchorX;\n    int  anchorY;\n    int *values;\n    int  nShiftR;\n}\nIplConvKernel;\n\ntypedef struct _IplConvKernelFP\n{\n    int  nCols;\n    int  nRows;\n    int  anchorX;\n    int  anchorY;\n    float *values;\n}\nIplConvKernelFP;\n\n#define IPL_IMAGE_HEADER 1\n#define IPL_IMAGE_DATA   2\n#define IPL_IMAGE_ROI    4\n\n#endif/*HAVE_IPL*/\n\n/** extra border mode */\n#define IPL_BORDER_REFLECT_101    4\n#define IPL_BORDER_TRANSPARENT    5\n\n#define IPL_IMAGE_MAGIC_VAL  ((int)sizeof(IplImage))\n#define CV_TYPE_NAME_IMAGE \"opencv-image\"\n\n#define CV_IS_IMAGE_HDR(img) \\\n    ((img) != NULL && ((const IplImage*)(img))->nSize == sizeof(IplImage))\n\n#define CV_IS_IMAGE(img) \\\n    (CV_IS_IMAGE_HDR(img) && ((IplImage*)img)->imageData != NULL)\n\n/** for storing double-precision\n   floating point data in IplImage's */\n#define IPL_DEPTH_64F  64\n\n/** get reference to pixel at (col,row),\n   for multi-channel images (col) should be multiplied by number of channels */\n#define CV_IMAGE_ELEM( image, elemtype, row, col )       \\\n    (((elemtype*)((image)->imageData + (image)->widthStep*(row)))[(col)])\n\n/****************************************************************************************\\\n*                                  Matrix type (CvMat)                                   *\n\\****************************************************************************************/\n\n#define CV_AUTO_STEP  0x7fffffff\n#define CV_WHOLE_ARR  cvSlice( 0, 0x3fffffff )\n\n#define CV_MAGIC_MASK       0xFFFF0000\n#define CV_MAT_MAGIC_VAL    0x42420000\n#define CV_TYPE_NAME_MAT    \"opencv-matrix\"\n\n/** Matrix elements are stored row by row. Element (i, j) (i - 0-based row index, j - 0-based column\nindex) of a matrix can be retrieved or modified using CV_MAT_ELEM macro:\n\n    uchar pixval = CV_MAT_ELEM(grayimg, uchar, i, j)\n    CV_MAT_ELEM(cameraMatrix, float, 0, 2) = image.width*0.5f;\n\nTo access multiple-channel matrices, you can use\nCV_MAT_ELEM(matrix, type, i, j\\*nchannels + channel_idx).\n\n@deprecated CvMat is now obsolete; consider using Mat instead.\n */\ntypedef struct CvMat\n{\n    int type;\n    int step;\n\n    /* for internal use only */\n    int* refcount;\n    int hdr_refcount;\n\n    union\n    {\n        uchar* ptr;\n        short* s;\n        int* i;\n        float* fl;\n        double* db;\n    } data;\n\n#ifdef __cplusplus\n    union\n    {\n        int rows;\n        int height;\n    };\n\n    union\n    {\n        int cols;\n        int width;\n    };\n#else\n    int rows;\n    int cols;\n#endif\n\n\n#ifdef __cplusplus\n    CvMat() {}\n    CvMat(const CvMat& m) { memcpy(this, &m, sizeof(CvMat));}\n    CvMat(const cv::Mat& m);\n#endif\n\n}\nCvMat;\n\n\n#define CV_IS_MAT_HDR(mat) \\\n    ((mat) != NULL && \\\n    (((const CvMat*)(mat))->type & CV_MAGIC_MASK) == CV_MAT_MAGIC_VAL && \\\n    ((const CvMat*)(mat))->cols > 0 && ((const CvMat*)(mat))->rows > 0)\n\n#define CV_IS_MAT_HDR_Z(mat) \\\n    ((mat) != NULL && \\\n    (((const CvMat*)(mat))->type & CV_MAGIC_MASK) == CV_MAT_MAGIC_VAL && \\\n    ((const CvMat*)(mat))->cols >= 0 && ((const CvMat*)(mat))->rows >= 0)\n\n#define CV_IS_MAT(mat) \\\n    (CV_IS_MAT_HDR(mat) && ((const CvMat*)(mat))->data.ptr != NULL)\n\n#define CV_IS_MASK_ARR(mat) \\\n    (((mat)->type & (CV_MAT_TYPE_MASK & ~CV_8SC1)) == 0)\n\n#define CV_ARE_TYPES_EQ(mat1, mat2) \\\n    ((((mat1)->type ^ (mat2)->type) & CV_MAT_TYPE_MASK) == 0)\n\n#define CV_ARE_CNS_EQ(mat1, mat2) \\\n    ((((mat1)->type ^ (mat2)->type) & CV_MAT_CN_MASK) == 0)\n\n#define CV_ARE_DEPTHS_EQ(mat1, mat2) \\\n    ((((mat1)->type ^ (mat2)->type) & CV_MAT_DEPTH_MASK) == 0)\n\n#define CV_ARE_SIZES_EQ(mat1, mat2) \\\n    ((mat1)->rows == (mat2)->rows && (mat1)->cols == (mat2)->cols)\n\n#define CV_IS_MAT_CONST(mat)  \\\n    (((mat)->rows|(mat)->cols) == 1)\n\n#define IPL2CV_DEPTH(depth) \\\n    ((((CV_8U)+(CV_16U<<4)+(CV_32F<<8)+(CV_64F<<16)+(CV_8S<<20)+ \\\n    (CV_16S<<24)+(CV_32S<<28)) >> ((((depth) & 0xF0) >> 2) + \\\n    (((depth) & IPL_DEPTH_SIGN) ? 20 : 0))) & 15)\n\n/** Inline constructor. No data is allocated internally!!!\n * (Use together with cvCreateData, or use cvCreateMat instead to\n * get a matrix with allocated data):\n */\nCV_INLINE CvMat cvMat( int rows, int cols, int type, void* data CV_DEFAULT(NULL))\n{\n    CvMat m;\n\n    assert( (unsigned)CV_MAT_DEPTH(type) <= CV_64F );\n    type = CV_MAT_TYPE(type);\n    m.type = CV_MAT_MAGIC_VAL | CV_MAT_CONT_FLAG | type;\n    m.cols = cols;\n    m.rows = rows;\n    m.step = m.cols*CV_ELEM_SIZE(type);\n    m.data.ptr = (uchar*)data;\n    m.refcount = NULL;\n    m.hdr_refcount = 0;\n\n    return m;\n}\n\n#ifdef __cplusplus\ninline CvMat::CvMat(const cv::Mat& m)\n{\n    CV_DbgAssert(m.dims <= 2);\n    *this = cvMat(m.rows, m.dims == 1 ? 1 : m.cols, m.type(), m.data);\n    step = (int)m.step[0];\n    type = (type & ~cv::Mat::CONTINUOUS_FLAG) | (m.flags & cv::Mat::CONTINUOUS_FLAG);\n}\n#endif\n\n\n#define CV_MAT_ELEM_PTR_FAST( mat, row, col, pix_size )  \\\n    (assert( (unsigned)(row) < (unsigned)(mat).rows &&   \\\n             (unsigned)(col) < (unsigned)(mat).cols ),   \\\n     (mat).data.ptr + (size_t)(mat).step*(row) + (pix_size)*(col))\n\n#define CV_MAT_ELEM_PTR( mat, row, col )                 \\\n    CV_MAT_ELEM_PTR_FAST( mat, row, col, CV_ELEM_SIZE((mat).type) )\n\n#define CV_MAT_ELEM( mat, elemtype, row, col )           \\\n    (*(elemtype*)CV_MAT_ELEM_PTR_FAST( mat, row, col, sizeof(elemtype)))\n\n/** @brief Returns the particular element of single-channel floating-point matrix.\n\nThe function is a fast replacement for cvGetReal2D in the case of single-channel floating-point\nmatrices. It is faster because it is inline, it does fewer checks for array type and array element\ntype, and it checks for the row and column ranges only in debug mode.\n@param mat Input matrix\n@param row The zero-based index of row\n@param col The zero-based index of column\n */\nCV_INLINE  double  cvmGet( const CvMat* mat, int row, int col )\n{\n    int type;\n\n    type = CV_MAT_TYPE(mat->type);\n    assert( (unsigned)row < (unsigned)mat->rows &&\n            (unsigned)col < (unsigned)mat->cols );\n\n    if( type == CV_32FC1 )\n        return ((float*)(void*)(mat->data.ptr + (size_t)mat->step*row))[col];\n    else\n    {\n        assert( type == CV_64FC1 );\n        return ((double*)(void*)(mat->data.ptr + (size_t)mat->step*row))[col];\n    }\n}\n\n/** @brief Sets a specific element of a single-channel floating-point matrix.\n\nThe function is a fast replacement for cvSetReal2D in the case of single-channel floating-point\nmatrices. It is faster because it is inline, it does fewer checks for array type and array element\ntype, and it checks for the row and column ranges only in debug mode.\n@param mat The matrix\n@param row The zero-based index of row\n@param col The zero-based index of column\n@param value The new value of the matrix element\n */\nCV_INLINE  void  cvmSet( CvMat* mat, int row, int col, double value )\n{\n    int type;\n    type = CV_MAT_TYPE(mat->type);\n    assert( (unsigned)row < (unsigned)mat->rows &&\n            (unsigned)col < (unsigned)mat->cols );\n\n    if( type == CV_32FC1 )\n        ((float*)(void*)(mat->data.ptr + (size_t)mat->step*row))[col] = (float)value;\n    else\n    {\n        assert( type == CV_64FC1 );\n        ((double*)(void*)(mat->data.ptr + (size_t)mat->step*row))[col] = value;\n    }\n}\n\n\nCV_INLINE int cvIplDepth( int type )\n{\n    int depth = CV_MAT_DEPTH(type);\n    return CV_ELEM_SIZE1(depth)*8 | (depth == CV_8S || depth == CV_16S ||\n           depth == CV_32S ? IPL_DEPTH_SIGN : 0);\n}\n\n\n/****************************************************************************************\\\n*                       Multi-dimensional dense array (CvMatND)                          *\n\\****************************************************************************************/\n\n#define CV_MATND_MAGIC_VAL    0x42430000\n#define CV_TYPE_NAME_MATND    \"opencv-nd-matrix\"\n\n#define CV_MAX_DIM            32\n#define CV_MAX_DIM_HEAP       1024\n\n/**\n  @deprecated consider using cv::Mat instead\n  */\ntypedef struct\n#ifdef __cplusplus\n  CV_EXPORTS\n#endif\nCvMatND\n{\n    int type;\n    int dims;\n\n    int* refcount;\n    int hdr_refcount;\n\n    union\n    {\n        uchar* ptr;\n        float* fl;\n        double* db;\n        int* i;\n        short* s;\n    } data;\n\n    struct\n    {\n        int size;\n        int step;\n    }\n    dim[CV_MAX_DIM];\n\n#ifdef __cplusplus\n    CvMatND() {}\n    CvMatND(const cv::Mat& m);\n#endif\n}\nCvMatND;\n\n#define CV_IS_MATND_HDR(mat) \\\n    ((mat) != NULL && (((const CvMatND*)(mat))->type & CV_MAGIC_MASK) == CV_MATND_MAGIC_VAL)\n\n#define CV_IS_MATND(mat) \\\n    (CV_IS_MATND_HDR(mat) && ((const CvMatND*)(mat))->data.ptr != NULL)\n\n\n/****************************************************************************************\\\n*                      Multi-dimensional sparse array (CvSparseMat)                      *\n\\****************************************************************************************/\n\n#define CV_SPARSE_MAT_MAGIC_VAL    0x42440000\n#define CV_TYPE_NAME_SPARSE_MAT    \"opencv-sparse-matrix\"\n\nstruct CvSet;\n\ntypedef struct\n#ifdef __cplusplus\n  CV_EXPORTS\n#endif\nCvSparseMat\n{\n    int type;\n    int dims;\n    int* refcount;\n    int hdr_refcount;\n\n    struct CvSet* heap;\n    void** hashtable;\n    int hashsize;\n    int valoffset;\n    int idxoffset;\n    int size[CV_MAX_DIM];\n\n#ifdef __cplusplus\n    void copyToSparseMat(cv::SparseMat& m) const;\n#endif\n}\nCvSparseMat;\n\n#ifdef __cplusplus\n    CV_EXPORTS CvSparseMat* cvCreateSparseMat(const cv::SparseMat& m);\n#endif\n\n#define CV_IS_SPARSE_MAT_HDR(mat) \\\n    ((mat) != NULL && \\\n    (((const CvSparseMat*)(mat))->type & CV_MAGIC_MASK) == CV_SPARSE_MAT_MAGIC_VAL)\n\n#define CV_IS_SPARSE_MAT(mat) \\\n    CV_IS_SPARSE_MAT_HDR(mat)\n\n/**************** iteration through a sparse array *****************/\n\ntypedef struct CvSparseNode\n{\n    unsigned hashval;\n    struct CvSparseNode* next;\n}\nCvSparseNode;\n\ntypedef struct CvSparseMatIterator\n{\n    CvSparseMat* mat;\n    CvSparseNode* node;\n    int curidx;\n}\nCvSparseMatIterator;\n\n#define CV_NODE_VAL(mat,node)   ((void*)((uchar*)(node) + (mat)->valoffset))\n#define CV_NODE_IDX(mat,node)   ((int*)((uchar*)(node) + (mat)->idxoffset))\n\n/****************************************************************************************\\\n*                                         Histogram                                      *\n\\****************************************************************************************/\n\ntypedef int CvHistType;\n\n#define CV_HIST_MAGIC_VAL     0x42450000\n#define CV_HIST_UNIFORM_FLAG  (1 << 10)\n\n/** indicates whether bin ranges are set already or not */\n#define CV_HIST_RANGES_FLAG   (1 << 11)\n\n#define CV_HIST_ARRAY         0\n#define CV_HIST_SPARSE        1\n#define CV_HIST_TREE          CV_HIST_SPARSE\n\n/** should be used as a parameter only,\n   it turns to CV_HIST_UNIFORM_FLAG of hist->type */\n#define CV_HIST_UNIFORM       1\n\ntypedef struct CvHistogram\n{\n    int     type;\n    CvArr*  bins;\n    float   thresh[CV_MAX_DIM][2];  /**< For uniform histograms.                      */\n    float** thresh2;                /**< For non-uniform histograms.                  */\n    CvMatND mat;                    /**< Embedded matrix header for array histograms. */\n}\nCvHistogram;\n\n#define CV_IS_HIST( hist ) \\\n    ((hist) != NULL  && \\\n     (((CvHistogram*)(hist))->type & CV_MAGIC_MASK) == CV_HIST_MAGIC_VAL && \\\n     (hist)->bins != NULL)\n\n#define CV_IS_UNIFORM_HIST( hist ) \\\n    (((hist)->type & CV_HIST_UNIFORM_FLAG) != 0)\n\n#define CV_IS_SPARSE_HIST( hist ) \\\n    CV_IS_SPARSE_MAT((hist)->bins)\n\n#define CV_HIST_HAS_RANGES( hist ) \\\n    (((hist)->type & CV_HIST_RANGES_FLAG) != 0)\n\n/****************************************************************************************\\\n*                      Other supplementary data type definitions                         *\n\\****************************************************************************************/\n\n/*************************************** CvRect *****************************************/\n/** @sa Rect_ */\ntypedef struct CvRect\n{\n    int x;\n    int y;\n    int width;\n    int height;\n\n#ifdef __cplusplus\n    CvRect(int _x = 0, int _y = 0, int w = 0, int h = 0): x(_x), y(_y), width(w), height(h) {}\n    template<typename _Tp>\n    CvRect(const cv::Rect_<_Tp>& r): x(cv::saturate_cast<int>(r.x)), y(cv::saturate_cast<int>(r.y)), width(cv::saturate_cast<int>(r.width)), height(cv::saturate_cast<int>(r.height)) {}\n    template<typename _Tp>\n    operator cv::Rect_<_Tp>() const { return cv::Rect_<_Tp>((_Tp)x, (_Tp)y, (_Tp)width, (_Tp)height); }\n#endif\n}\nCvRect;\n\n/** constructs CvRect structure. */\nCV_INLINE  CvRect  cvRect( int x, int y, int width, int height )\n{\n    CvRect r;\n\n    r.x = x;\n    r.y = y;\n    r.width = width;\n    r.height = height;\n\n    return r;\n}\n\n\nCV_INLINE  IplROI  cvRectToROI( CvRect rect, int coi )\n{\n    IplROI roi;\n    roi.xOffset = rect.x;\n    roi.yOffset = rect.y;\n    roi.width = rect.width;\n    roi.height = rect.height;\n    roi.coi = coi;\n\n    return roi;\n}\n\n\nCV_INLINE  CvRect  cvROIToRect( IplROI roi )\n{\n    return cvRect( roi.xOffset, roi.yOffset, roi.width, roi.height );\n}\n\n/*********************************** CvTermCriteria *************************************/\n\n#define CV_TERMCRIT_ITER    1\n#define CV_TERMCRIT_NUMBER  CV_TERMCRIT_ITER\n#define CV_TERMCRIT_EPS     2\n\n/** @sa TermCriteria\n */\ntypedef struct CvTermCriteria\n{\n    int    type;  /**< may be combination of\n                     CV_TERMCRIT_ITER\n                     CV_TERMCRIT_EPS */\n    int    max_iter;\n    double epsilon;\n\n#ifdef __cplusplus\n    CvTermCriteria(int _type = 0, int _iter = 0, double _eps = 0) : type(_type), max_iter(_iter), epsilon(_eps)  {}\n    CvTermCriteria(const cv::TermCriteria& t) : type(t.type), max_iter(t.maxCount), epsilon(t.epsilon)  {}\n    operator cv::TermCriteria() const { return cv::TermCriteria(type, max_iter, epsilon); }\n#endif\n\n}\nCvTermCriteria;\n\nCV_INLINE  CvTermCriteria  cvTermCriteria( int type, int max_iter, double epsilon )\n{\n    CvTermCriteria t;\n\n    t.type = type;\n    t.max_iter = max_iter;\n    t.epsilon = (float)epsilon;\n\n    return t;\n}\n\n\n/******************************* CvPoint and variants ***********************************/\n\ntypedef struct CvPoint\n{\n    int x;\n    int y;\n\n#ifdef __cplusplus\n    CvPoint(int _x = 0, int _y = 0): x(_x), y(_y) {}\n    template<typename _Tp>\n    CvPoint(const cv::Point_<_Tp>& pt): x((int)pt.x), y((int)pt.y) {}\n    template<typename _Tp>\n    operator cv::Point_<_Tp>() const { return cv::Point_<_Tp>(cv::saturate_cast<_Tp>(x), cv::saturate_cast<_Tp>(y)); }\n#endif\n}\nCvPoint;\n\n/** constructs CvPoint structure. */\nCV_INLINE  CvPoint  cvPoint( int x, int y )\n{\n    CvPoint p;\n\n    p.x = x;\n    p.y = y;\n\n    return p;\n}\n\n\ntypedef struct CvPoint2D32f\n{\n    float x;\n    float y;\n\n#ifdef __cplusplus\n    CvPoint2D32f(float _x = 0, float _y = 0): x(_x), y(_y) {}\n    template<typename _Tp>\n    CvPoint2D32f(const cv::Point_<_Tp>& pt): x((float)pt.x), y((float)pt.y) {}\n    template<typename _Tp>\n    operator cv::Point_<_Tp>() const { return cv::Point_<_Tp>(cv::saturate_cast<_Tp>(x), cv::saturate_cast<_Tp>(y)); }\n#endif\n}\nCvPoint2D32f;\n\n/** constructs CvPoint2D32f structure. */\nCV_INLINE  CvPoint2D32f  cvPoint2D32f( double x, double y )\n{\n    CvPoint2D32f p;\n\n    p.x = (float)x;\n    p.y = (float)y;\n\n    return p;\n}\n\n/** converts CvPoint to CvPoint2D32f. */\nCV_INLINE  CvPoint2D32f  cvPointTo32f( CvPoint point )\n{\n    return cvPoint2D32f( (float)point.x, (float)point.y );\n}\n\n/** converts CvPoint2D32f to CvPoint. */\nCV_INLINE  CvPoint  cvPointFrom32f( CvPoint2D32f point )\n{\n    CvPoint ipt;\n    ipt.x = cvRound(point.x);\n    ipt.y = cvRound(point.y);\n\n    return ipt;\n}\n\n\ntypedef struct CvPoint3D32f\n{\n    float x;\n    float y;\n    float z;\n\n#ifdef __cplusplus\n    CvPoint3D32f(float _x = 0, float _y = 0, float _z = 0): x(_x), y(_y), z(_z) {}\n    template<typename _Tp>\n    CvPoint3D32f(const cv::Point3_<_Tp>& pt): x((float)pt.x), y((float)pt.y), z((float)pt.z) {}\n    template<typename _Tp>\n    operator cv::Point3_<_Tp>() const { return cv::Point3_<_Tp>(cv::saturate_cast<_Tp>(x), cv::saturate_cast<_Tp>(y), cv::saturate_cast<_Tp>(z)); }\n#endif\n}\nCvPoint3D32f;\n\n/** constructs CvPoint3D32f structure. */\nCV_INLINE  CvPoint3D32f  cvPoint3D32f( double x, double y, double z )\n{\n    CvPoint3D32f p;\n\n    p.x = (float)x;\n    p.y = (float)y;\n    p.z = (float)z;\n\n    return p;\n}\n\n\ntypedef struct CvPoint2D64f\n{\n    double x;\n    double y;\n}\nCvPoint2D64f;\n\n/** constructs CvPoint2D64f structure.*/\nCV_INLINE  CvPoint2D64f  cvPoint2D64f( double x, double y )\n{\n    CvPoint2D64f p;\n\n    p.x = x;\n    p.y = y;\n\n    return p;\n}\n\n\ntypedef struct CvPoint3D64f\n{\n    double x;\n    double y;\n    double z;\n}\nCvPoint3D64f;\n\n/** constructs CvPoint3D64f structure. */\nCV_INLINE  CvPoint3D64f  cvPoint3D64f( double x, double y, double z )\n{\n    CvPoint3D64f p;\n\n    p.x = x;\n    p.y = y;\n    p.z = z;\n\n    return p;\n}\n\n\n/******************************** CvSize's & CvBox **************************************/\n\ntypedef struct CvSize\n{\n    int width;\n    int height;\n\n#ifdef __cplusplus\n    CvSize(int w = 0, int h = 0): width(w), height(h) {}\n    template<typename _Tp>\n    CvSize(const cv::Size_<_Tp>& sz): width(cv::saturate_cast<int>(sz.width)), height(cv::saturate_cast<int>(sz.height)) {}\n    template<typename _Tp>\n    operator cv::Size_<_Tp>() const { return cv::Size_<_Tp>(cv::saturate_cast<_Tp>(width), cv::saturate_cast<_Tp>(height)); }\n#endif\n}\nCvSize;\n\n/** constructs CvSize structure. */\nCV_INLINE  CvSize  cvSize( int width, int height )\n{\n    CvSize s;\n\n    s.width = width;\n    s.height = height;\n\n    return s;\n}\n\ntypedef struct CvSize2D32f\n{\n    float width;\n    float height;\n\n#ifdef __cplusplus\n    CvSize2D32f(float w = 0, float h = 0): width(w), height(h) {}\n    template<typename _Tp>\n    CvSize2D32f(const cv::Size_<_Tp>& sz): width(cv::saturate_cast<float>(sz.width)), height(cv::saturate_cast<float>(sz.height)) {}\n    template<typename _Tp>\n    operator cv::Size_<_Tp>() const { return cv::Size_<_Tp>(cv::saturate_cast<_Tp>(width), cv::saturate_cast<_Tp>(height)); }\n#endif\n}\nCvSize2D32f;\n\n/** constructs CvSize2D32f structure. */\nCV_INLINE  CvSize2D32f  cvSize2D32f( double width, double height )\n{\n    CvSize2D32f s;\n\n    s.width = (float)width;\n    s.height = (float)height;\n\n    return s;\n}\n\n/** @sa RotatedRect\n */\ntypedef struct CvBox2D\n{\n    CvPoint2D32f center;  /**< Center of the box.                          */\n    CvSize2D32f  size;    /**< Box width and length.                       */\n    float angle;          /**< Angle between the horizontal axis           */\n                          /**< and the first side (i.e. length) in degrees */\n\n#ifdef __cplusplus\n    CvBox2D(CvPoint2D32f c = CvPoint2D32f(), CvSize2D32f s = CvSize2D32f(), float a = 0) : center(c), size(s), angle(a) {}\n    CvBox2D(const cv::RotatedRect& rr) : center(rr.center), size(rr.size), angle(rr.angle) {}\n    operator cv::RotatedRect() const { return cv::RotatedRect(center, size, angle); }\n#endif\n}\nCvBox2D;\n\n\n/** Line iterator state: */\ntypedef struct CvLineIterator\n{\n    /** Pointer to the current point: */\n    uchar* ptr;\n\n    /* Bresenham algorithm state: */\n    int  err;\n    int  plus_delta;\n    int  minus_delta;\n    int  plus_step;\n    int  minus_step;\n}\nCvLineIterator;\n\n\n\n/************************************* CvSlice ******************************************/\n#define CV_WHOLE_SEQ_END_INDEX 0x3fffffff\n#define CV_WHOLE_SEQ  cvSlice(0, CV_WHOLE_SEQ_END_INDEX)\n\ntypedef struct CvSlice\n{\n    int  start_index, end_index;\n\n#if defined(__cplusplus) && !defined(__CUDACC__)\n    CvSlice(int start = 0, int end = 0) : start_index(start), end_index(end) {}\n    CvSlice(const cv::Range& r) { *this = (r.start != INT_MIN && r.end != INT_MAX) ? CvSlice(r.start, r.end) : CvSlice(0, CV_WHOLE_SEQ_END_INDEX); }\n    operator cv::Range() const { return (start_index == 0 && end_index == CV_WHOLE_SEQ_END_INDEX ) ? cv::Range::all() : cv::Range(start_index, end_index); }\n#endif\n}\nCvSlice;\n\nCV_INLINE  CvSlice  cvSlice( int start, int end )\n{\n    CvSlice slice;\n    slice.start_index = start;\n    slice.end_index = end;\n\n    return slice;\n}\n\n\n\n/************************************* CvScalar *****************************************/\n/** @sa Scalar_\n */\ntypedef struct CvScalar\n{\n    double val[4];\n\n#ifdef __cplusplus\n    CvScalar() {}\n    CvScalar(double d0, double d1 = 0, double d2 = 0, double d3 = 0) { val[0] = d0; val[1] = d1; val[2] = d2; val[3] = d3; }\n    template<typename _Tp>\n    CvScalar(const cv::Scalar_<_Tp>& s) { val[0] = s.val[0]; val[1] = s.val[1]; val[2] = s.val[2]; val[3] = s.val[3]; }\n    template<typename _Tp>\n    operator cv::Scalar_<_Tp>() const { return cv::Scalar_<_Tp>(cv::saturate_cast<_Tp>(val[0]), cv::saturate_cast<_Tp>(val[1]), cv::saturate_cast<_Tp>(val[2]), cv::saturate_cast<_Tp>(val[3])); }\n    template<typename _Tp, int cn>\n    CvScalar(const cv::Vec<_Tp, cn>& v)\n    {\n        int i;\n        for( i = 0; i < (cn < 4 ? cn : 4); i++ ) val[i] = v.val[i];\n        for( ; i < 4; i++ ) val[i] = 0;\n    }\n#endif\n}\nCvScalar;\n\nCV_INLINE  CvScalar  cvScalar( double val0, double val1 CV_DEFAULT(0),\n                               double val2 CV_DEFAULT(0), double val3 CV_DEFAULT(0))\n{\n    CvScalar scalar;\n    scalar.val[0] = val0; scalar.val[1] = val1;\n    scalar.val[2] = val2; scalar.val[3] = val3;\n    return scalar;\n}\n\n\nCV_INLINE  CvScalar  cvRealScalar( double val0 )\n{\n    CvScalar scalar;\n    scalar.val[0] = val0;\n    scalar.val[1] = scalar.val[2] = scalar.val[3] = 0;\n    return scalar;\n}\n\nCV_INLINE  CvScalar  cvScalarAll( double val0123 )\n{\n    CvScalar scalar;\n    scalar.val[0] = val0123;\n    scalar.val[1] = val0123;\n    scalar.val[2] = val0123;\n    scalar.val[3] = val0123;\n    return scalar;\n}\n\n/****************************************************************************************\\\n*                                   Dynamic Data structures                              *\n\\****************************************************************************************/\n\n/******************************** Memory storage ****************************************/\n\ntypedef struct CvMemBlock\n{\n    struct CvMemBlock*  prev;\n    struct CvMemBlock*  next;\n}\nCvMemBlock;\n\n#define CV_STORAGE_MAGIC_VAL    0x42890000\n\ntypedef struct CvMemStorage\n{\n    int signature;\n    CvMemBlock* bottom;           /**< First allocated block.                   */\n    CvMemBlock* top;              /**< Current memory block - top of the stack. */\n    struct  CvMemStorage* parent; /**< We get new blocks from parent as needed. */\n    int block_size;               /**< Block size.                              */\n    int free_space;               /**< Remaining free space in current block.   */\n}\nCvMemStorage;\n\n#define CV_IS_STORAGE(storage)  \\\n    ((storage) != NULL &&       \\\n    (((CvMemStorage*)(storage))->signature & CV_MAGIC_MASK) == CV_STORAGE_MAGIC_VAL)\n\n\ntypedef struct CvMemStoragePos\n{\n    CvMemBlock* top;\n    int free_space;\n}\nCvMemStoragePos;\n\n\n/*********************************** Sequence *******************************************/\n\ntypedef struct CvSeqBlock\n{\n    struct CvSeqBlock*  prev; /**< Previous sequence block.                   */\n    struct CvSeqBlock*  next; /**< Next sequence block.                       */\n  int    start_index;         /**< Index of the first element in the block +  */\n                              /**< sequence->first->start_index.              */\n    int    count;             /**< Number of elements in the block.           */\n    schar* data;              /**< Pointer to the first element of the block. */\n}\nCvSeqBlock;\n\n\n#define CV_TREE_NODE_FIELDS(node_type)                               \\\n    int       flags;             /**< Miscellaneous flags.     */      \\\n    int       header_size;       /**< Size of sequence header. */      \\\n    struct    node_type* h_prev; /**< Previous sequence.       */      \\\n    struct    node_type* h_next; /**< Next sequence.           */      \\\n    struct    node_type* v_prev; /**< 2nd previous sequence.   */      \\\n    struct    node_type* v_next  /**< 2nd next sequence.       */\n\n/**\n   Read/Write sequence.\n   Elements can be dynamically inserted to or deleted from the sequence.\n*/\n#define CV_SEQUENCE_FIELDS()                                              \\\n    CV_TREE_NODE_FIELDS(CvSeq);                                           \\\n    int       total;          /**< Total number of elements.            */  \\\n    int       elem_size;      /**< Size of sequence element in bytes.   */  \\\n    schar*    block_max;      /**< Maximal bound of the last block.     */  \\\n    schar*    ptr;            /**< Current write pointer.               */  \\\n    int       delta_elems;    /**< Grow seq this many at a time.        */  \\\n    CvMemStorage* storage;    /**< Where the seq is stored.             */  \\\n    CvSeqBlock* free_blocks;  /**< Free blocks list.                    */  \\\n    CvSeqBlock* first;        /**< Pointer to the first sequence block. */\n\ntypedef struct CvSeq\n{\n    CV_SEQUENCE_FIELDS()\n}\nCvSeq;\n\n#define CV_TYPE_NAME_SEQ             \"opencv-sequence\"\n#define CV_TYPE_NAME_SEQ_TREE        \"opencv-sequence-tree\"\n\n/*************************************** Set ********************************************/\n/** @brief Set\n  Order is not preserved. There can be gaps between sequence elements.\n  After the element has been inserted it stays in the same place all the time.\n  The MSB(most-significant or sign bit) of the first field (flags) is 0 iff the element exists.\n*/\n#define CV_SET_ELEM_FIELDS(elem_type)   \\\n    int  flags;                         \\\n    struct elem_type* next_free;\n\ntypedef struct CvSetElem\n{\n    CV_SET_ELEM_FIELDS(CvSetElem)\n}\nCvSetElem;\n\n#define CV_SET_FIELDS()      \\\n    CV_SEQUENCE_FIELDS()     \\\n    CvSetElem* free_elems;   \\\n    int active_count;\n\ntypedef struct CvSet\n{\n    CV_SET_FIELDS()\n}\nCvSet;\n\n\n#define CV_SET_ELEM_IDX_MASK   ((1 << 26) - 1)\n#define CV_SET_ELEM_FREE_FLAG  (1 << (sizeof(int)*8-1))\n\n/** Checks whether the element pointed by ptr belongs to a set or not */\n#define CV_IS_SET_ELEM( ptr )  (((CvSetElem*)(ptr))->flags >= 0)\n\n/************************************* Graph ********************************************/\n\n/** @name Graph\n\nWe represent a graph as a set of vertices. Vertices contain their adjacency lists (more exactly,\npointers to first incoming or outcoming edge (or 0 if isolated vertex)). Edges are stored in\nanother set. There is a singly-linked list of incoming/outcoming edges for each vertex.\n\nEach edge consists of:\n\n- Two pointers to the starting and ending vertices (vtx[0] and vtx[1] respectively).\n\n    A graph may be oriented or not. In the latter case, edges between vertex i to vertex j are not\ndistinguished during search operations.\n\n- Two pointers to next edges for the starting and ending vertices, where next[0] points to the\nnext edge in the vtx[0] adjacency list and next[1] points to the next edge in the vtx[1]\nadjacency list.\n\n@see CvGraphEdge, CvGraphVtx, CvGraphVtx2D, CvGraph\n@{\n*/\n#define CV_GRAPH_EDGE_FIELDS()      \\\n    int flags;                      \\\n    float weight;                   \\\n    struct CvGraphEdge* next[2];    \\\n    struct CvGraphVtx* vtx[2];\n\n\n#define CV_GRAPH_VERTEX_FIELDS()    \\\n    int flags;                      \\\n    struct CvGraphEdge* first;\n\n\ntypedef struct CvGraphEdge\n{\n    CV_GRAPH_EDGE_FIELDS()\n}\nCvGraphEdge;\n\ntypedef struct CvGraphVtx\n{\n    CV_GRAPH_VERTEX_FIELDS()\n}\nCvGraphVtx;\n\ntypedef struct CvGraphVtx2D\n{\n    CV_GRAPH_VERTEX_FIELDS()\n    CvPoint2D32f* ptr;\n}\nCvGraphVtx2D;\n\n/**\n   Graph is \"derived\" from the set (this is set a of vertices)\n   and includes another set (edges)\n*/\n#define  CV_GRAPH_FIELDS()   \\\n    CV_SET_FIELDS()          \\\n    CvSet* edges;\n\ntypedef struct CvGraph\n{\n    CV_GRAPH_FIELDS()\n}\nCvGraph;\n\n#define CV_TYPE_NAME_GRAPH \"opencv-graph\"\n\n/** @} */\n\n/*********************************** Chain/Countour *************************************/\n\ntypedef struct CvChain\n{\n    CV_SEQUENCE_FIELDS()\n    CvPoint  origin;\n}\nCvChain;\n\n#define CV_CONTOUR_FIELDS()  \\\n    CV_SEQUENCE_FIELDS()     \\\n    CvRect rect;             \\\n    int color;               \\\n    int reserved[3];\n\ntypedef struct CvContour\n{\n    CV_CONTOUR_FIELDS()\n}\nCvContour;\n\ntypedef CvContour CvPoint2DSeq;\n\n/****************************************************************************************\\\n*                                    Sequence types                                      *\n\\****************************************************************************************/\n\n#define CV_SEQ_MAGIC_VAL             0x42990000\n\n#define CV_IS_SEQ(seq) \\\n    ((seq) != NULL && (((CvSeq*)(seq))->flags & CV_MAGIC_MASK) == CV_SEQ_MAGIC_VAL)\n\n#define CV_SET_MAGIC_VAL             0x42980000\n#define CV_IS_SET(set) \\\n    ((set) != NULL && (((CvSeq*)(set))->flags & CV_MAGIC_MASK) == CV_SET_MAGIC_VAL)\n\n#define CV_SEQ_ELTYPE_BITS           12\n#define CV_SEQ_ELTYPE_MASK           ((1 << CV_SEQ_ELTYPE_BITS) - 1)\n\n#define CV_SEQ_ELTYPE_POINT          CV_32SC2  /**< (x,y) */\n#define CV_SEQ_ELTYPE_CODE           CV_8UC1   /**< freeman code: 0..7 */\n#define CV_SEQ_ELTYPE_GENERIC        0\n#define CV_SEQ_ELTYPE_PTR            CV_USRTYPE1\n#define CV_SEQ_ELTYPE_PPOINT         CV_SEQ_ELTYPE_PTR  /**< &(x,y) */\n#define CV_SEQ_ELTYPE_INDEX          CV_32SC1  /**< #(x,y) */\n#define CV_SEQ_ELTYPE_GRAPH_EDGE     0  /**< &next_o, &next_d, &vtx_o, &vtx_d */\n#define CV_SEQ_ELTYPE_GRAPH_VERTEX   0  /**< first_edge, &(x,y) */\n#define CV_SEQ_ELTYPE_TRIAN_ATR      0  /**< vertex of the binary tree   */\n#define CV_SEQ_ELTYPE_CONNECTED_COMP 0  /**< connected component  */\n#define CV_SEQ_ELTYPE_POINT3D        CV_32FC3  /**< (x,y,z)  */\n\n#define CV_SEQ_KIND_BITS        2\n#define CV_SEQ_KIND_MASK        (((1 << CV_SEQ_KIND_BITS) - 1)<<CV_SEQ_ELTYPE_BITS)\n\n/** types of sequences */\n#define CV_SEQ_KIND_GENERIC     (0 << CV_SEQ_ELTYPE_BITS)\n#define CV_SEQ_KIND_CURVE       (1 << CV_SEQ_ELTYPE_BITS)\n#define CV_SEQ_KIND_BIN_TREE    (2 << CV_SEQ_ELTYPE_BITS)\n\n/** types of sparse sequences (sets) */\n#define CV_SEQ_KIND_GRAPH       (1 << CV_SEQ_ELTYPE_BITS)\n#define CV_SEQ_KIND_SUBDIV2D    (2 << CV_SEQ_ELTYPE_BITS)\n\n#define CV_SEQ_FLAG_SHIFT       (CV_SEQ_KIND_BITS + CV_SEQ_ELTYPE_BITS)\n\n/** flags for curves */\n#define CV_SEQ_FLAG_CLOSED     (1 << CV_SEQ_FLAG_SHIFT)\n#define CV_SEQ_FLAG_SIMPLE     (0 << CV_SEQ_FLAG_SHIFT)\n#define CV_SEQ_FLAG_CONVEX     (0 << CV_SEQ_FLAG_SHIFT)\n#define CV_SEQ_FLAG_HOLE       (2 << CV_SEQ_FLAG_SHIFT)\n\n/** flags for graphs */\n#define CV_GRAPH_FLAG_ORIENTED (1 << CV_SEQ_FLAG_SHIFT)\n\n#define CV_GRAPH               CV_SEQ_KIND_GRAPH\n#define CV_ORIENTED_GRAPH      (CV_SEQ_KIND_GRAPH|CV_GRAPH_FLAG_ORIENTED)\n\n/** point sets */\n#define CV_SEQ_POINT_SET       (CV_SEQ_KIND_GENERIC| CV_SEQ_ELTYPE_POINT)\n#define CV_SEQ_POINT3D_SET     (CV_SEQ_KIND_GENERIC| CV_SEQ_ELTYPE_POINT3D)\n#define CV_SEQ_POLYLINE        (CV_SEQ_KIND_CURVE  | CV_SEQ_ELTYPE_POINT)\n#define CV_SEQ_POLYGON         (CV_SEQ_FLAG_CLOSED | CV_SEQ_POLYLINE )\n#define CV_SEQ_CONTOUR         CV_SEQ_POLYGON\n#define CV_SEQ_SIMPLE_POLYGON  (CV_SEQ_FLAG_SIMPLE | CV_SEQ_POLYGON  )\n\n/** chain-coded curves */\n#define CV_SEQ_CHAIN           (CV_SEQ_KIND_CURVE  | CV_SEQ_ELTYPE_CODE)\n#define CV_SEQ_CHAIN_CONTOUR   (CV_SEQ_FLAG_CLOSED | CV_SEQ_CHAIN)\n\n/** binary tree for the contour */\n#define CV_SEQ_POLYGON_TREE    (CV_SEQ_KIND_BIN_TREE  | CV_SEQ_ELTYPE_TRIAN_ATR)\n\n/** sequence of the connected components */\n#define CV_SEQ_CONNECTED_COMP  (CV_SEQ_KIND_GENERIC  | CV_SEQ_ELTYPE_CONNECTED_COMP)\n\n/** sequence of the integer numbers */\n#define CV_SEQ_INDEX           (CV_SEQ_KIND_GENERIC  | CV_SEQ_ELTYPE_INDEX)\n\n#define CV_SEQ_ELTYPE( seq )   ((seq)->flags & CV_SEQ_ELTYPE_MASK)\n#define CV_SEQ_KIND( seq )     ((seq)->flags & CV_SEQ_KIND_MASK )\n\n/** flag checking */\n#define CV_IS_SEQ_INDEX( seq )      ((CV_SEQ_ELTYPE(seq) == CV_SEQ_ELTYPE_INDEX) && \\\n                                     (CV_SEQ_KIND(seq) == CV_SEQ_KIND_GENERIC))\n\n#define CV_IS_SEQ_CURVE( seq )      (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE)\n#define CV_IS_SEQ_CLOSED( seq )     (((seq)->flags & CV_SEQ_FLAG_CLOSED) != 0)\n#define CV_IS_SEQ_CONVEX( seq )     0\n#define CV_IS_SEQ_HOLE( seq )       (((seq)->flags & CV_SEQ_FLAG_HOLE) != 0)\n#define CV_IS_SEQ_SIMPLE( seq )     1\n\n/** type checking macros */\n#define CV_IS_SEQ_POINT_SET( seq ) \\\n    ((CV_SEQ_ELTYPE(seq) == CV_32SC2 || CV_SEQ_ELTYPE(seq) == CV_32FC2))\n\n#define CV_IS_SEQ_POINT_SUBSET( seq ) \\\n    (CV_IS_SEQ_INDEX( seq ) || CV_SEQ_ELTYPE(seq) == CV_SEQ_ELTYPE_PPOINT)\n\n#define CV_IS_SEQ_POLYLINE( seq )   \\\n    (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE && CV_IS_SEQ_POINT_SET(seq))\n\n#define CV_IS_SEQ_POLYGON( seq )   \\\n    (CV_IS_SEQ_POLYLINE(seq) && CV_IS_SEQ_CLOSED(seq))\n\n#define CV_IS_SEQ_CHAIN( seq )   \\\n    (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE && (seq)->elem_size == 1)\n\n#define CV_IS_SEQ_CONTOUR( seq )   \\\n    (CV_IS_SEQ_CLOSED(seq) && (CV_IS_SEQ_POLYLINE(seq) || CV_IS_SEQ_CHAIN(seq)))\n\n#define CV_IS_SEQ_CHAIN_CONTOUR( seq ) \\\n    (CV_IS_SEQ_CHAIN( seq ) && CV_IS_SEQ_CLOSED( seq ))\n\n#define CV_IS_SEQ_POLYGON_TREE( seq ) \\\n    (CV_SEQ_ELTYPE (seq) ==  CV_SEQ_ELTYPE_TRIAN_ATR &&    \\\n    CV_SEQ_KIND( seq ) ==  CV_SEQ_KIND_BIN_TREE )\n\n#define CV_IS_GRAPH( seq )    \\\n    (CV_IS_SET(seq) && CV_SEQ_KIND((CvSet*)(seq)) == CV_SEQ_KIND_GRAPH)\n\n#define CV_IS_GRAPH_ORIENTED( seq )   \\\n    (((seq)->flags & CV_GRAPH_FLAG_ORIENTED) != 0)\n\n#define CV_IS_SUBDIV2D( seq )  \\\n    (CV_IS_SET(seq) && CV_SEQ_KIND((CvSet*)(seq)) == CV_SEQ_KIND_SUBDIV2D)\n\n/****************************************************************************************/\n/*                            Sequence writer & reader                                  */\n/****************************************************************************************/\n\n#define CV_SEQ_WRITER_FIELDS()                                     \\\n    int          header_size;                                      \\\n    CvSeq*       seq;        /**< the sequence written */            \\\n    CvSeqBlock*  block;      /**< current block */                   \\\n    schar*       ptr;        /**< pointer to free space */           \\\n    schar*       block_min;  /**< pointer to the beginning of block*/\\\n    schar*       block_max;  /**< pointer to the end of block */\n\ntypedef struct CvSeqWriter\n{\n    CV_SEQ_WRITER_FIELDS()\n}\nCvSeqWriter;\n\n\n#define CV_SEQ_READER_FIELDS()                                      \\\n    int          header_size;                                       \\\n    CvSeq*       seq;        /**< sequence, beign read */             \\\n    CvSeqBlock*  block;      /**< current block */                    \\\n    schar*       ptr;        /**< pointer to element be read next */  \\\n    schar*       block_min;  /**< pointer to the beginning of block */\\\n    schar*       block_max;  /**< pointer to the end of block */      \\\n    int          delta_index;/**< = seq->first->start_index   */      \\\n    schar*       prev_elem;  /**< pointer to previous element */\n\ntypedef struct CvSeqReader\n{\n    CV_SEQ_READER_FIELDS()\n}\nCvSeqReader;\n\n/****************************************************************************************/\n/*                                Operations on sequences                               */\n/****************************************************************************************/\n\n#define  CV_SEQ_ELEM( seq, elem_type, index )                    \\\n/** assert gives some guarantee that <seq> parameter is valid */  \\\n(   assert(sizeof((seq)->first[0]) == sizeof(CvSeqBlock) &&      \\\n    (seq)->elem_size == sizeof(elem_type)),                      \\\n    (elem_type*)((seq)->first && (unsigned)index <               \\\n    (unsigned)((seq)->first->count) ?                            \\\n    (seq)->first->data + (index) * sizeof(elem_type) :           \\\n    cvGetSeqElem( (CvSeq*)(seq), (index) )))\n#define CV_GET_SEQ_ELEM( elem_type, seq, index ) CV_SEQ_ELEM( (seq), elem_type, (index) )\n\n/** Add element to sequence: */\n#define CV_WRITE_SEQ_ELEM_VAR( elem_ptr, writer )     \\\n{                                                     \\\n    if( (writer).ptr >= (writer).block_max )          \\\n    {                                                 \\\n        cvCreateSeqBlock( &writer);                   \\\n    }                                                 \\\n    memcpy((writer).ptr, elem_ptr, (writer).seq->elem_size);\\\n    (writer).ptr += (writer).seq->elem_size;          \\\n}\n\n#define CV_WRITE_SEQ_ELEM( elem, writer )             \\\n{                                                     \\\n    assert( (writer).seq->elem_size == sizeof(elem)); \\\n    if( (writer).ptr >= (writer).block_max )          \\\n    {                                                 \\\n        cvCreateSeqBlock( &writer);                   \\\n    }                                                 \\\n    assert( (writer).ptr <= (writer).block_max - sizeof(elem));\\\n    memcpy((writer).ptr, &(elem), sizeof(elem));      \\\n    (writer).ptr += sizeof(elem);                     \\\n}\n\n\n/** Move reader position forward: */\n#define CV_NEXT_SEQ_ELEM( elem_size, reader )                 \\\n{                                                             \\\n    if( ((reader).ptr += (elem_size)) >= (reader).block_max ) \\\n    {                                                         \\\n        cvChangeSeqBlock( &(reader), 1 );                     \\\n    }                                                         \\\n}\n\n\n/** Move reader position backward: */\n#define CV_PREV_SEQ_ELEM( elem_size, reader )                \\\n{                                                            \\\n    if( ((reader).ptr -= (elem_size)) < (reader).block_min ) \\\n    {                                                        \\\n        cvChangeSeqBlock( &(reader), -1 );                   \\\n    }                                                        \\\n}\n\n/** Read element and move read position forward: */\n#define CV_READ_SEQ_ELEM( elem, reader )                       \\\n{                                                              \\\n    assert( (reader).seq->elem_size == sizeof(elem));          \\\n    memcpy( &(elem), (reader).ptr, sizeof((elem)));            \\\n    CV_NEXT_SEQ_ELEM( sizeof(elem), reader )                   \\\n}\n\n/** Read element and move read position backward: */\n#define CV_REV_READ_SEQ_ELEM( elem, reader )                     \\\n{                                                                \\\n    assert( (reader).seq->elem_size == sizeof(elem));            \\\n    memcpy(&(elem), (reader).ptr, sizeof((elem)));               \\\n    CV_PREV_SEQ_ELEM( sizeof(elem), reader )                     \\\n}\n\n\n#define CV_READ_CHAIN_POINT( _pt, reader )                              \\\n{                                                                       \\\n    (_pt) = (reader).pt;                                                \\\n    if( (reader).ptr )                                                  \\\n    {                                                                   \\\n        CV_READ_SEQ_ELEM( (reader).code, (reader));                     \\\n        assert( ((reader).code & ~7) == 0 );                            \\\n        (reader).pt.x += (reader).deltas[(int)(reader).code][0];        \\\n        (reader).pt.y += (reader).deltas[(int)(reader).code][1];        \\\n    }                                                                   \\\n}\n\n#define CV_CURRENT_POINT( reader )  (*((CvPoint*)((reader).ptr)))\n#define CV_PREV_POINT( reader )     (*((CvPoint*)((reader).prev_elem)))\n\n#define CV_READ_EDGE( pt1, pt2, reader )               \\\n{                                                      \\\n    assert( sizeof(pt1) == sizeof(CvPoint) &&          \\\n            sizeof(pt2) == sizeof(CvPoint) &&          \\\n            reader.seq->elem_size == sizeof(CvPoint)); \\\n    (pt1) = CV_PREV_POINT( reader );                   \\\n    (pt2) = CV_CURRENT_POINT( reader );                \\\n    (reader).prev_elem = (reader).ptr;                 \\\n    CV_NEXT_SEQ_ELEM( sizeof(CvPoint), (reader));      \\\n}\n\n/************ Graph macros ************/\n\n/** Return next graph edge for given vertex: */\n#define  CV_NEXT_GRAPH_EDGE( edge, vertex )                              \\\n     (assert((edge)->vtx[0] == (vertex) || (edge)->vtx[1] == (vertex)),  \\\n      (edge)->next[(edge)->vtx[1] == (vertex)])\n\n\n\n/****************************************************************************************\\\n*             Data structures for persistence (a.k.a serialization) functionality        *\n\\****************************************************************************************/\n\n/** \"black box\" file storage */\ntypedef struct CvFileStorage CvFileStorage;\n\n/** Storage flags: */\n#define CV_STORAGE_READ          0\n#define CV_STORAGE_WRITE         1\n#define CV_STORAGE_WRITE_TEXT    CV_STORAGE_WRITE\n#define CV_STORAGE_WRITE_BINARY  CV_STORAGE_WRITE\n#define CV_STORAGE_APPEND        2\n#define CV_STORAGE_MEMORY        4\n#define CV_STORAGE_FORMAT_MASK   (7<<3)\n#define CV_STORAGE_FORMAT_AUTO   0\n#define CV_STORAGE_FORMAT_XML    8\n#define CV_STORAGE_FORMAT_YAML  16\n\n/** @brief List of attributes. :\n\nIn the current implementation, attributes are used to pass extra parameters when writing user\nobjects (see cvWrite). XML attributes inside tags are not supported, aside from the object type\nspecification (type_id attribute).\n@see cvAttrList, cvAttrValue\n */\ntypedef struct CvAttrList\n{\n    const char** attr;         /**< NULL-terminated array of (attribute_name,attribute_value) pairs. */\n    struct CvAttrList* next;   /**< Pointer to next chunk of the attributes list.                    */\n}\nCvAttrList;\n\n/** initializes CvAttrList structure */\nCV_INLINE CvAttrList cvAttrList( const char** attr CV_DEFAULT(NULL),\n                                 CvAttrList* next CV_DEFAULT(NULL) )\n{\n    CvAttrList l;\n    l.attr = attr;\n    l.next = next;\n\n    return l;\n}\n\nstruct CvTypeInfo;\n\n#define CV_NODE_NONE        0\n#define CV_NODE_INT         1\n#define CV_NODE_INTEGER     CV_NODE_INT\n#define CV_NODE_REAL        2\n#define CV_NODE_FLOAT       CV_NODE_REAL\n#define CV_NODE_STR         3\n#define CV_NODE_STRING      CV_NODE_STR\n#define CV_NODE_REF         4 /**< not used */\n#define CV_NODE_SEQ         5\n#define CV_NODE_MAP         6\n#define CV_NODE_TYPE_MASK   7\n\n#define CV_NODE_TYPE(flags)  ((flags) & CV_NODE_TYPE_MASK)\n\n/** file node flags */\n#define CV_NODE_FLOW        8 /**<Used only for writing structures in YAML format. */\n#define CV_NODE_USER        16\n#define CV_NODE_EMPTY       32\n#define CV_NODE_NAMED       64\n\n#define CV_NODE_IS_INT(flags)        (CV_NODE_TYPE(flags) == CV_NODE_INT)\n#define CV_NODE_IS_REAL(flags)       (CV_NODE_TYPE(flags) == CV_NODE_REAL)\n#define CV_NODE_IS_STRING(flags)     (CV_NODE_TYPE(flags) == CV_NODE_STRING)\n#define CV_NODE_IS_SEQ(flags)        (CV_NODE_TYPE(flags) == CV_NODE_SEQ)\n#define CV_NODE_IS_MAP(flags)        (CV_NODE_TYPE(flags) == CV_NODE_MAP)\n#define CV_NODE_IS_COLLECTION(flags) (CV_NODE_TYPE(flags) >= CV_NODE_SEQ)\n#define CV_NODE_IS_FLOW(flags)       (((flags) & CV_NODE_FLOW) != 0)\n#define CV_NODE_IS_EMPTY(flags)      (((flags) & CV_NODE_EMPTY) != 0)\n#define CV_NODE_IS_USER(flags)       (((flags) & CV_NODE_USER) != 0)\n#define CV_NODE_HAS_NAME(flags)      (((flags) & CV_NODE_NAMED) != 0)\n\n#define CV_NODE_SEQ_SIMPLE 256\n#define CV_NODE_SEQ_IS_SIMPLE(seq) (((seq)->flags & CV_NODE_SEQ_SIMPLE) != 0)\n\ntypedef struct CvString\n{\n    int len;\n    char* ptr;\n}\nCvString;\n\n/** All the keys (names) of elements in the readed file storage\n   are stored in the hash to speed up the lookup operations: */\ntypedef struct CvStringHashNode\n{\n    unsigned hashval;\n    CvString str;\n    struct CvStringHashNode* next;\n}\nCvStringHashNode;\n\ntypedef struct CvGenericHash CvFileNodeHash;\n\n/** Basic element of the file storage - scalar or collection: */\ntypedef struct CvFileNode\n{\n    int tag;\n    struct CvTypeInfo* info; /**< type information\n            (only for user-defined object, for others it is 0) */\n    union\n    {\n        double f; /**< scalar floating-point number */\n        int i;    /**< scalar integer number */\n        CvString str; /**< text string */\n        CvSeq* seq; /**< sequence (ordered collection of file nodes) */\n        CvFileNodeHash* map; /**< map (collection of named file nodes) */\n    } data;\n}\nCvFileNode;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\ntypedef int (CV_CDECL *CvIsInstanceFunc)( const void* struct_ptr );\ntypedef void (CV_CDECL *CvReleaseFunc)( void** struct_dblptr );\ntypedef void* (CV_CDECL *CvReadFunc)( CvFileStorage* storage, CvFileNode* node );\ntypedef void (CV_CDECL *CvWriteFunc)( CvFileStorage* storage, const char* name,\n                                      const void* struct_ptr, CvAttrList attributes );\ntypedef void* (CV_CDECL *CvCloneFunc)( const void* struct_ptr );\n#ifdef __cplusplus\n}\n#endif\n\n/** @brief Type information\n\nThe structure contains information about one of the standard or user-defined types. Instances of the\ntype may or may not contain a pointer to the corresponding CvTypeInfo structure. In any case, there\nis a way to find the type info structure for a given object using the cvTypeOf function.\nAlternatively, type info can be found by type name using cvFindType, which is used when an object\nis read from file storage. The user can register a new type with cvRegisterType that adds the type\ninformation structure into the beginning of the type list. Thus, it is possible to create\nspecialized types from generic standard types and override the basic methods.\n */\ntypedef struct CvTypeInfo\n{\n    int flags; /**< not used */\n    int header_size; /**< sizeof(CvTypeInfo) */\n    struct CvTypeInfo* prev; /**< previous registered type in the list */\n    struct CvTypeInfo* next; /**< next registered type in the list */\n    const char* type_name; /**< type name, written to file storage */\n    CvIsInstanceFunc is_instance; /**< checks if the passed object belongs to the type */\n    CvReleaseFunc release; /**< releases object (memory etc.) */\n    CvReadFunc read; /**< reads object from file storage */\n    CvWriteFunc write; /**< writes object to file storage */\n    CvCloneFunc clone; /**< creates a copy of the object */\n}\nCvTypeInfo;\n\n\n/**** System data types ******/\n\ntypedef struct CvPluginFuncInfo\n{\n    void** func_addr;\n    void* default_func_addr;\n    const char* func_names;\n    int search_modules;\n    int loaded_from;\n}\nCvPluginFuncInfo;\n\ntypedef struct CvModuleInfo\n{\n    struct CvModuleInfo* next;\n    const char* name;\n    const char* version;\n    CvPluginFuncInfo* func_tab;\n}\nCvModuleInfo;\n\n/** @} */\n\n#endif /*__OPENCV_CORE_TYPES_H__*/\n\n/* End of file. */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/utility.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_UTILITY_H__\n#define __OPENCV_CORE_UTILITY_H__\n\n#ifndef __cplusplus\n#  error utility.hpp header must be compiled as C++\n#endif\n\n#include \"opencv2/core.hpp\"\n\nnamespace cv\n{\n\n#ifdef CV_COLLECT_IMPL_DATA\nCV_EXPORTS void setImpl(int flags); // set implementation flags and reset storage arrays\nCV_EXPORTS void addImpl(int flag, const char* func = 0); // add implementation and function name to storage arrays\n// Get stored implementation flags and fucntions names arrays\n// Each implementation entry correspond to function name entry, so you can find which implementation was executed in which fucntion\nCV_EXPORTS int getImpl(std::vector<int> &impl, std::vector<String> &funName);\n\nCV_EXPORTS bool useCollection(); // return implementation collection state\nCV_EXPORTS void setUseCollection(bool flag); // set implementation collection state\n\n#define CV_IMPL_PLAIN  0x01 // native CPU OpenCV implementation\n#define CV_IMPL_OCL    0x02 // OpenCL implementation\n#define CV_IMPL_IPP    0x04 // IPP implementation\n#define CV_IMPL_MT     0x10 // multithreaded implementation\n\n#define CV_IMPL_ADD(impl)                                                   \\\n    if(cv::useCollection())                                                 \\\n    {                                                                       \\\n        cv::addImpl(impl, CV_Func);                                         \\\n    }\n#else\n#define CV_IMPL_ADD(impl)\n#endif\n\n//! @addtogroup core_utils\n//! @{\n\n/** @brief  Automatically Allocated Buffer Class\n\n The class is used for temporary buffers in functions and methods.\n If a temporary buffer is usually small (a few K's of memory),\n but its size depends on the parameters, it makes sense to create a small\n fixed-size array on stack and use it if it's large enough. If the required buffer size\n is larger than the fixed size, another buffer of sufficient size is allocated dynamically\n and released after the processing. Therefore, in typical cases, when the buffer size is small,\n there is no overhead associated with malloc()/free().\n At the same time, there is no limit on the size of processed data.\n\n This is what AutoBuffer does. The template takes 2 parameters - type of the buffer elements and\n the number of stack-allocated elements. Here is how the class is used:\n\n \\code\n void my_func(const cv::Mat& m)\n {\n    cv::AutoBuffer<float> buf; // create automatic buffer containing 1000 floats\n\n    buf.allocate(m.rows); // if m.rows <= 1000, the pre-allocated buffer is used,\n                          // otherwise the buffer of \"m.rows\" floats will be allocated\n                          // dynamically and deallocated in cv::AutoBuffer destructor\n    ...\n }\n \\endcode\n*/\ntemplate<typename _Tp, size_t fixed_size = 1024/sizeof(_Tp)+8> class AutoBuffer\n{\npublic:\n    typedef _Tp value_type;\n\n    //! the default constructor\n    AutoBuffer();\n    //! constructor taking the real buffer size\n    AutoBuffer(size_t _size);\n\n    //! the copy constructor\n    AutoBuffer(const AutoBuffer<_Tp, fixed_size>& buf);\n    //! the assignment operator\n    AutoBuffer<_Tp, fixed_size>& operator = (const AutoBuffer<_Tp, fixed_size>& buf);\n\n    //! destructor. calls deallocate()\n    ~AutoBuffer();\n\n    //! allocates the new buffer of size _size. if the _size is small enough, stack-allocated buffer is used\n    void allocate(size_t _size);\n    //! deallocates the buffer if it was dynamically allocated\n    void deallocate();\n    //! resizes the buffer and preserves the content\n    void resize(size_t _size);\n    //! returns the current buffer size\n    size_t size() const;\n    //! returns pointer to the real buffer, stack-allocated or head-allocated\n    operator _Tp* ();\n    //! returns read-only pointer to the real buffer, stack-allocated or head-allocated\n    operator const _Tp* () const;\n\nprotected:\n    //! pointer to the real buffer, can point to buf if the buffer is small enough\n    _Tp* ptr;\n    //! size of the real buffer\n    size_t sz;\n    //! pre-allocated buffer. At least 1 element to confirm C++ standard reqirements\n    _Tp buf[(fixed_size > 0) ? fixed_size : 1];\n};\n\n/**  @brief Sets/resets the break-on-error mode.\n\nWhen the break-on-error mode is set, the default error handler issues a hardware exception, which\ncan make debugging more convenient.\n\n\\return the previous state\n */\nCV_EXPORTS bool setBreakOnError(bool flag);\n\nextern \"C\" typedef int (*ErrorCallback)( int status, const char* func_name,\n                                       const char* err_msg, const char* file_name,\n                                       int line, void* userdata );\n\n\n/** @brief Sets the new error handler and the optional user data.\n\n  The function sets the new error handler, called from cv::error().\n\n  \\param errCallback the new error handler. If NULL, the default error handler is used.\n  \\param userdata the optional user data pointer, passed to the callback.\n  \\param prevUserdata the optional output parameter where the previous user data pointer is stored\n\n  \\return the previous error handler\n*/\nCV_EXPORTS ErrorCallback redirectError( ErrorCallback errCallback, void* userdata=0, void** prevUserdata=0);\n\n/** @brief Returns a text string formatted using the printf-like expression.\n\nThe function acts like sprintf but forms and returns an STL string. It can be used to form an error\nmessage in the Exception constructor.\n@param fmt printf-compatible formatting specifiers.\n */\nCV_EXPORTS String format( const char* fmt, ... );\nCV_EXPORTS String tempfile( const char* suffix = 0);\nCV_EXPORTS void glob(String pattern, std::vector<String>& result, bool recursive = false);\n\n/** @brief OpenCV will try to set the number of threads for the next parallel region.\n\nIf threads == 0, OpenCV will disable threading optimizations and run all it's functions\nsequentially. Passing threads \\< 0 will reset threads number to system default. This function must\nbe called outside of parallel region.\n\nOpenCV will try to run it's functions with specified threads number, but some behaviour differs from\nframework:\n-   `TBB` – User-defined parallel constructions will run with the same threads number, if\n    another does not specified. If late on user creates own scheduler, OpenCV will be use it.\n-   `OpenMP` – No special defined behaviour.\n-   `Concurrency` – If threads == 1, OpenCV will disable threading optimizations and run it's\n    functions sequentially.\n-   `GCD` – Supports only values \\<= 0.\n-   `C=` – No special defined behaviour.\n@param nthreads Number of threads used by OpenCV.\n@sa getNumThreads, getThreadNum\n */\nCV_EXPORTS void setNumThreads(int nthreads);\n\n/** @brief Returns the number of threads used by OpenCV for parallel regions.\n\nAlways returns 1 if OpenCV is built without threading support.\n\nThe exact meaning of return value depends on the threading framework used by OpenCV library:\n- `TBB` – The number of threads, that OpenCV will try to use for parallel regions. If there is\n  any tbb::thread_scheduler_init in user code conflicting with OpenCV, then function returns\n  default number of threads used by TBB library.\n- `OpenMP` – An upper bound on the number of threads that could be used to form a new team.\n- `Concurrency` – The number of threads, that OpenCV will try to use for parallel regions.\n- `GCD` – Unsupported; returns the GCD thread pool limit (512) for compatibility.\n- `C=` – The number of threads, that OpenCV will try to use for parallel regions, if before\n  called setNumThreads with threads \\> 0, otherwise returns the number of logical CPUs,\n  available for the process.\n@sa setNumThreads, getThreadNum\n */\nCV_EXPORTS int getNumThreads();\n\n/** @brief Returns the index of the currently executed thread within the current parallel region. Always\nreturns 0 if called outside of parallel region.\n\nThe exact meaning of return value depends on the threading framework used by OpenCV library:\n- `TBB` – Unsupported with current 4.1 TBB release. May be will be supported in future.\n- `OpenMP` – The thread number, within the current team, of the calling thread.\n- `Concurrency` – An ID for the virtual processor that the current context is executing on (0\n  for master thread and unique number for others, but not necessary 1,2,3,...).\n- `GCD` – System calling thread's ID. Never returns 0 inside parallel region.\n- `C=` – The index of the current parallel task.\n@sa setNumThreads, getNumThreads\n */\nCV_EXPORTS int getThreadNum();\n\n/** @brief Returns full configuration time cmake output.\n\nReturned value is raw cmake output including version control system revision, compiler version,\ncompiler flags, enabled modules and third party libraries, etc. Output format depends on target\narchitecture.\n */\nCV_EXPORTS_W const String& getBuildInformation();\n\n/** @brief Returns the number of ticks.\n\nThe function returns the number of ticks after the certain event (for example, when the machine was\nturned on). It can be used to initialize RNG or to measure a function execution time by reading the\ntick count before and after the function call. See also the tick frequency.\n */\nCV_EXPORTS_W int64 getTickCount();\n\n/** @brief Returns the number of ticks per second.\n\nThe function returns the number of ticks per second. That is, the following code computes the\nexecution time in seconds:\n@code\n    double t = (double)getTickCount();\n    // do something ...\n    t = ((double)getTickCount() - t)/getTickFrequency();\n@endcode\n */\nCV_EXPORTS_W double getTickFrequency();\n\n/** @brief Returns the number of CPU ticks.\n\nThe function returns the current number of CPU ticks on some architectures (such as x86, x64,\nPowerPC). On other platforms the function is equivalent to getTickCount. It can also be used for\nvery accurate time measurements, as well as for RNG initialization. Note that in case of multi-CPU\nsystems a thread, from which getCPUTickCount is called, can be suspended and resumed at another CPU\nwith its own counter. So, theoretically (and practically) the subsequent calls to the function do\nnot necessary return the monotonously increasing values. Also, since a modern CPU varies the CPU\nfrequency depending on the load, the number of CPU clocks spent in some code cannot be directly\nconverted to time units. Therefore, getTickCount is generally a preferable solution for measuring\nexecution time.\n */\nCV_EXPORTS_W int64 getCPUTickCount();\n\n/** @brief Available CPU features.\n\nremember to keep this list identical to the one in cvdef.h\n*/\nenum CpuFeatures {\n    CPU_MMX             = 1,\n    CPU_SSE             = 2,\n    CPU_SSE2            = 3,\n    CPU_SSE3            = 4,\n    CPU_SSSE3           = 5,\n    CPU_SSE4_1          = 6,\n    CPU_SSE4_2          = 7,\n    CPU_POPCNT          = 8,\n\n    CPU_AVX             = 10,\n    CPU_AVX2            = 11,\n    CPU_FMA3            = 12,\n\n    CPU_AVX_512F        = 13,\n    CPU_AVX_512BW       = 14,\n    CPU_AVX_512CD       = 15,\n    CPU_AVX_512DQ       = 16,\n    CPU_AVX_512ER       = 17,\n    CPU_AVX_512IFMA512  = 18,\n    CPU_AVX_512PF       = 19,\n    CPU_AVX_512VBMI     = 20,\n    CPU_AVX_512VL       = 21,\n\n    CPU_NEON            = 100\n};\n\n/** @brief Returns true if the specified feature is supported by the host hardware.\n\nThe function returns true if the host hardware supports the specified feature. When user calls\nsetUseOptimized(false), the subsequent calls to checkHardwareSupport() will return false until\nsetUseOptimized(true) is called. This way user can dynamically switch on and off the optimized code\nin OpenCV.\n@param feature The feature of interest, one of cv::CpuFeatures\n */\nCV_EXPORTS_W bool checkHardwareSupport(int feature);\n\n/** @brief Returns the number of logical CPUs available for the process.\n */\nCV_EXPORTS_W int getNumberOfCPUs();\n\n\n/** @brief Aligns a pointer to the specified number of bytes.\n\nThe function returns the aligned pointer of the same type as the input pointer:\n\\f[\\texttt{(\\_Tp*)(((size\\_t)ptr + n-1) \\& -n)}\\f]\n@param ptr Aligned pointer.\n@param n Alignment size that must be a power of two.\n */\ntemplate<typename _Tp> static inline _Tp* alignPtr(_Tp* ptr, int n=(int)sizeof(_Tp))\n{\n    return (_Tp*)(((size_t)ptr + n-1) & -n);\n}\n\n/** @brief Aligns a buffer size to the specified number of bytes.\n\nThe function returns the minimum number that is greater or equal to sz and is divisible by n :\n\\f[\\texttt{(sz + n-1) \\& -n}\\f]\n@param sz Buffer size to align.\n@param n Alignment size that must be a power of two.\n */\nstatic inline size_t alignSize(size_t sz, int n)\n{\n    CV_DbgAssert((n & (n - 1)) == 0); // n is a power of 2\n    return (sz + n-1) & -n;\n}\n\n/** @brief Enables or disables the optimized code.\n\nThe function can be used to dynamically turn on and off optimized code (code that uses SSE2, AVX,\nand other instructions on the platforms that support it). It sets a global flag that is further\nchecked by OpenCV functions. Since the flag is not checked in the inner OpenCV loops, it is only\nsafe to call the function on the very top level in your application where you can be sure that no\nother OpenCV function is currently executed.\n\nBy default, the optimized code is enabled unless you disable it in CMake. The current status can be\nretrieved using useOptimized.\n@param onoff The boolean flag specifying whether the optimized code should be used (onoff=true)\nor not (onoff=false).\n */\nCV_EXPORTS_W void setUseOptimized(bool onoff);\n\n/** @brief Returns the status of optimized code usage.\n\nThe function returns true if the optimized code is enabled. Otherwise, it returns false.\n */\nCV_EXPORTS_W bool useOptimized();\n\nstatic inline size_t getElemSize(int type) { return CV_ELEM_SIZE(type); }\n\n/////////////////////////////// Parallel Primitives //////////////////////////////////\n\n/** @brief Base class for parallel data processors\n*/\nclass CV_EXPORTS ParallelLoopBody\n{\npublic:\n    virtual ~ParallelLoopBody();\n    virtual void operator() (const Range& range) const = 0;\n};\n\n/** @brief Parallel data processor\n*/\nCV_EXPORTS void parallel_for_(const Range& range, const ParallelLoopBody& body, double nstripes=-1.);\n\n/////////////////////////////// forEach method of cv::Mat ////////////////////////////\ntemplate<typename _Tp, typename Functor> inline\nvoid Mat::forEach_impl(const Functor& operation) {\n    if (false) {\n        operation(*reinterpret_cast<_Tp*>(0), reinterpret_cast<int*>(NULL));\n        // If your compiler fail in this line.\n        // Please check that your functor signature is\n        //     (_Tp&, const int*)   <- multidimential\n        //  or (_Tp&, void*)        <- in case of you don't need current idx.\n    }\n\n    CV_Assert(this->total() / this->size[this->dims - 1] <= INT_MAX);\n    const int LINES = static_cast<int>(this->total() / this->size[this->dims - 1]);\n\n    class PixelOperationWrapper :public ParallelLoopBody\n    {\n    public:\n        PixelOperationWrapper(Mat_<_Tp>* const frame, const Functor& _operation)\n            : mat(frame), op(_operation) {};\n        virtual ~PixelOperationWrapper(){};\n        // ! Overloaded virtual operator\n        // convert range call to row call.\n        virtual void operator()(const Range &range) const {\n            const int DIMS = mat->dims;\n            const int COLS = mat->size[DIMS - 1];\n            if (DIMS <= 2) {\n                for (int row = range.start; row < range.end; ++row) {\n                    this->rowCall2(row, COLS);\n                }\n            } else {\n                std::vector<int> idx(COLS); /// idx is modified in this->rowCall\n                idx[DIMS - 2] = range.start - 1;\n\n                for (int line_num = range.start; line_num < range.end; ++line_num) {\n                    idx[DIMS - 2]++;\n                    for (int i = DIMS - 2; i >= 0; --i) {\n                        if (idx[i] >= mat->size[i]) {\n                            idx[i - 1] += idx[i] / mat->size[i];\n                            idx[i] %= mat->size[i];\n                            continue; // carry-over;\n                        }\n                        else {\n                            break;\n                        }\n                    }\n                    this->rowCall(&idx[0], COLS, DIMS);\n                }\n            }\n        };\n    private:\n        Mat_<_Tp>* const mat;\n        const Functor op;\n        // ! Call operator for each elements in this row.\n        inline void rowCall(int* const idx, const int COLS, const int DIMS) const {\n            int &col = idx[DIMS - 1];\n            col = 0;\n            _Tp* pixel = &(mat->template at<_Tp>(idx));\n\n            while (col < COLS) {\n                op(*pixel, const_cast<const int*>(idx));\n                pixel++; col++;\n            }\n            col = 0;\n        }\n        // ! Call operator for each elements in this row. 2d mat special version.\n        inline void rowCall2(const int row, const int COLS) const {\n            union Index{\n                int body[2];\n                operator const int*() const {\n                    return reinterpret_cast<const int*>(this);\n                }\n                int& operator[](const int i) {\n                    return body[i];\n                }\n            } idx = {{row, 0}};\n            // Special union is needed to avoid\n            // \"error: array subscript is above array bounds [-Werror=array-bounds]\"\n            // when call the functor `op` such that access idx[3].\n\n            _Tp* pixel = &(mat->template at<_Tp>(idx));\n            const _Tp* const pixel_end = pixel + COLS;\n            while(pixel < pixel_end) {\n                op(*pixel++, static_cast<const int*>(idx));\n                idx[1]++;\n            }\n        };\n        PixelOperationWrapper& operator=(const PixelOperationWrapper &) {\n            CV_Assert(false);\n            // We can not remove this implementation because Visual Studio warning C4822.\n            return *this;\n        };\n    };\n\n    parallel_for_(cv::Range(0, LINES), PixelOperationWrapper(reinterpret_cast<Mat_<_Tp>*>(this), operation));\n}\n\n/////////////////////////// Synchronization Primitives ///////////////////////////////\n\nclass CV_EXPORTS Mutex\n{\npublic:\n    Mutex();\n    ~Mutex();\n    Mutex(const Mutex& m);\n    Mutex& operator = (const Mutex& m);\n\n    void lock();\n    bool trylock();\n    void unlock();\n\n    struct Impl;\nprotected:\n    Impl* impl;\n};\n\nclass CV_EXPORTS AutoLock\n{\npublic:\n    AutoLock(Mutex& m) : mutex(&m) { mutex->lock(); }\n    ~AutoLock() { mutex->unlock(); }\nprotected:\n    Mutex* mutex;\nprivate:\n    AutoLock(const AutoLock&);\n    AutoLock& operator = (const AutoLock&);\n};\n\nclass CV_EXPORTS TLSDataContainer\n{\nprivate:\n    int key_;\nprotected:\n    TLSDataContainer();\n    virtual ~TLSDataContainer();\npublic:\n    virtual void* createDataInstance() const = 0;\n    virtual void deleteDataInstance(void* data) const = 0;\n\n    void* getData() const;\n};\n\ntemplate <typename T>\nclass TLSData : protected TLSDataContainer\n{\npublic:\n    inline TLSData() {}\n    inline ~TLSData() {}\n    inline T* get() const { return (T*)getData(); }\nprivate:\n    virtual void* createDataInstance() const { return new T; }\n    virtual void deleteDataInstance(void* data) const { delete (T*)data; }\n};\n\n/** @brief Designed for command line parsing\n\nThe sample below demonstrates how to use CommandLineParser:\n@code\n    CommandLineParser parser(argc, argv, keys);\n    parser.about(\"Application name v1.0.0\");\n\n    if (parser.has(\"help\"))\n    {\n        parser.printMessage();\n        return 0;\n    }\n\n    int N = parser.get<int>(\"N\");\n    double fps = parser.get<double>(\"fps\");\n    String path = parser.get<String>(\"path\");\n\n    use_time_stamp = parser.has(\"timestamp\");\n\n    String img1 = parser.get<String>(0);\n    String img2 = parser.get<String>(1);\n\n    int repeat = parser.get<int>(2);\n\n    if (!parser.check())\n    {\n        parser.printErrors();\n        return 0;\n    }\n@endcode\n\n### Keys syntax\n\nThe keys parameter is a string containing several blocks, each one is enclosed in curley braces and\ndescribes one argument. Each argument contains three parts separated by the `|` symbol:\n\n-# argument names is a space-separated list of option synonyms (to mark argument as positional, prefix it with the `@` symbol)\n-# default value will be used if the argument was not provided (can be empty)\n-# help message (can be empty)\n\nFor example:\n\n@code{.cpp}\n    const String keys =\n        \"{help h usage ? |      | print this message   }\"\n        \"{@image1        |      | image1 for compare   }\"\n        \"{@image2        |      | image2 for compare   }\"\n        \"{@repeat        |1     | number               }\"\n        \"{path           |.     | path to file         }\"\n        \"{fps            | -1.0 | fps for output video }\"\n        \"{N count        |100   | count of objects     }\"\n        \"{ts timestamp   |      | use time stamp       }\"\n        ;\n}\n@endcode\n\n### Usage\n\nFor the described keys:\n\n@code{.sh}\n    # Good call (3 positional parameters: image1, image2 and repeat; N is 200, ts is true)\n    $ ./app -N=200 1.png 2.jpg 19 -ts\n\n    # Bad call\n    $ ./app -fps=aaa\n    ERRORS:\n    Exception: can not convert: [aaa] to [double]\n@endcode\n */\nclass CV_EXPORTS CommandLineParser\n{\npublic:\n\n    /** @brief Constructor\n\n    Initializes command line parser object\n\n    @param argc number of command line arguments (from main())\n    @param argv array of command line arguments (from main())\n    @param keys string describing acceptable command line parameters (see class description for syntax)\n    */\n    CommandLineParser(int argc, const char* const argv[], const String& keys);\n\n    /** @brief Copy constructor */\n    CommandLineParser(const CommandLineParser& parser);\n\n    /** @brief Assignment operator */\n    CommandLineParser& operator = (const CommandLineParser& parser);\n\n    /** @brief Destructor */\n    ~CommandLineParser();\n\n    /** @brief Returns application path\n\n    This method returns the path to the executable from the command line (`argv[0]`).\n\n    For example, if the application has been started with such command:\n    @code{.sh}\n    $ ./bin/my-executable\n    @endcode\n    this method will return `./bin`.\n    */\n    String getPathToApplication() const;\n\n    /** @brief Access arguments by name\n\n    Returns argument converted to selected type. If the argument is not known or can not be\n    converted to selected type, the error flag is set (can be checked with @ref check).\n\n    For example, define:\n    @code{.cpp}\n    String keys = \"{N count||}\";\n    @endcode\n\n    Call:\n    @code{.sh}\n    $ ./my-app -N=20\n    # or\n    $ ./my-app --count=20\n    @endcode\n\n    Access:\n    @code{.cpp}\n    int N = parser.get<int>(\"N\");\n    @endcode\n\n    @param name name of the argument\n    @param space_delete remove spaces from the left and right of the string\n    @tparam T the argument will be converted to this type if possible\n\n    @note You can access positional arguments by their `@`-prefixed name:\n    @code{.cpp}\n    parser.get<String>(\"@image\");\n    @endcode\n     */\n    template <typename T>\n    T get(const String& name, bool space_delete = true) const\n    {\n        T val = T();\n        getByName(name, space_delete, ParamType<T>::type, (void*)&val);\n        return val;\n    }\n\n    /** @brief Access positional arguments by index\n\n    Returns argument converted to selected type. Indexes are counted from zero.\n\n    For example, define:\n    @code{.cpp}\n    String keys = \"{@arg1||}{@arg2||}\"\n    @endcode\n\n    Call:\n    @code{.sh}\n    ./my-app abc qwe\n    @endcode\n\n    Access arguments:\n    @code{.cpp}\n    String val_1 = parser.get<String>(0); // returns \"abc\", arg1\n    String val_2 = parser.get<String>(1); // returns \"qwe\", arg2\n    @endcode\n\n    @param index index of the argument\n    @param space_delete remove spaces from the left and right of the string\n    @tparam T the argument will be converted to this type if possible\n     */\n    template <typename T>\n    T get(int index, bool space_delete = true) const\n    {\n        T val = T();\n        getByIndex(index, space_delete, ParamType<T>::type, (void*)&val);\n        return val;\n    }\n\n    /** @brief Check if field was provided in the command line\n\n    @param name argument name to check\n    */\n    bool has(const String& name) const;\n\n    /** @brief Check for parsing errors\n\n    Returns true if error occured while accessing the parameters (bad conversion, missing arguments,\n    etc.). Call @ref printErrors to print error messages list.\n     */\n    bool check() const;\n\n    /** @brief Set the about message\n\n    The about message will be shown when @ref printMessage is called, right before arguments table.\n     */\n    void about(const String& message);\n\n    /** @brief Print help message\n\n    This method will print standard help message containing the about message and arguments description.\n\n    @sa about\n    */\n    void printMessage() const;\n\n    /** @brief Print list of errors occured\n\n    @sa check\n    */\n    void printErrors() const;\n\nprotected:\n    void getByName(const String& name, bool space_delete, int type, void* dst) const;\n    void getByIndex(int index, bool space_delete, int type, void* dst) const;\n\n    struct Impl;\n    Impl* impl;\n};\n\n//! @} core_utils\n\n//! @cond IGNORED\n\n/////////////////////////////// AutoBuffer implementation ////////////////////////////////////////\n\ntemplate<typename _Tp, size_t fixed_size> inline\nAutoBuffer<_Tp, fixed_size>::AutoBuffer()\n{\n    ptr = buf;\n    sz = fixed_size;\n}\n\ntemplate<typename _Tp, size_t fixed_size> inline\nAutoBuffer<_Tp, fixed_size>::AutoBuffer(size_t _size)\n{\n    ptr = buf;\n    sz = fixed_size;\n    allocate(_size);\n}\n\ntemplate<typename _Tp, size_t fixed_size> inline\nAutoBuffer<_Tp, fixed_size>::AutoBuffer(const AutoBuffer<_Tp, fixed_size>& abuf )\n{\n    ptr = buf;\n    sz = fixed_size;\n    allocate(abuf.size());\n    for( size_t i = 0; i < sz; i++ )\n        ptr[i] = abuf.ptr[i];\n}\n\ntemplate<typename _Tp, size_t fixed_size> inline AutoBuffer<_Tp, fixed_size>&\nAutoBuffer<_Tp, fixed_size>::operator = (const AutoBuffer<_Tp, fixed_size>& abuf)\n{\n    if( this != &abuf )\n    {\n        deallocate();\n        allocate(abuf.size());\n        for( size_t i = 0; i < sz; i++ )\n            ptr[i] = abuf.ptr[i];\n    }\n    return *this;\n}\n\ntemplate<typename _Tp, size_t fixed_size> inline\nAutoBuffer<_Tp, fixed_size>::~AutoBuffer()\n{ deallocate(); }\n\ntemplate<typename _Tp, size_t fixed_size> inline void\nAutoBuffer<_Tp, fixed_size>::allocate(size_t _size)\n{\n    if(_size <= sz)\n    {\n        sz = _size;\n        return;\n    }\n    deallocate();\n    if(_size > fixed_size)\n    {\n        ptr = new _Tp[_size];\n        sz = _size;\n    }\n}\n\ntemplate<typename _Tp, size_t fixed_size> inline void\nAutoBuffer<_Tp, fixed_size>::deallocate()\n{\n    if( ptr != buf )\n    {\n        delete[] ptr;\n        ptr = buf;\n        sz = fixed_size;\n    }\n}\n\ntemplate<typename _Tp, size_t fixed_size> inline void\nAutoBuffer<_Tp, fixed_size>::resize(size_t _size)\n{\n    if(_size <= sz)\n    {\n        sz = _size;\n        return;\n    }\n    size_t i, prevsize = sz, minsize = MIN(prevsize, _size);\n    _Tp* prevptr = ptr;\n\n    ptr = _size > fixed_size ? new _Tp[_size] : buf;\n    sz = _size;\n\n    if( ptr != prevptr )\n        for( i = 0; i < minsize; i++ )\n            ptr[i] = prevptr[i];\n    for( i = prevsize; i < _size; i++ )\n        ptr[i] = _Tp();\n\n    if( prevptr != buf )\n        delete[] prevptr;\n}\n\ntemplate<typename _Tp, size_t fixed_size> inline size_t\nAutoBuffer<_Tp, fixed_size>::size() const\n{ return sz; }\n\ntemplate<typename _Tp, size_t fixed_size> inline\nAutoBuffer<_Tp, fixed_size>::operator _Tp* ()\n{ return ptr; }\n\ntemplate<typename _Tp, size_t fixed_size> inline\nAutoBuffer<_Tp, fixed_size>::operator const _Tp* () const\n{ return ptr; }\n\n#ifndef OPENCV_NOSTL\ntemplate<> inline std::string CommandLineParser::get<std::string>(int index, bool space_delete) const\n{\n    return get<String>(index, space_delete);\n}\ntemplate<> inline std::string CommandLineParser::get<std::string>(const String& name, bool space_delete) const\n{\n    return get<String>(name, space_delete);\n}\n#endif // OPENCV_NOSTL\n\n//! @endcond\n\n} //namespace cv\n\n#ifndef DISABLE_OPENCV_24_COMPATIBILITY\n#include \"opencv2/core/core_c.h\"\n#endif\n\n#endif //__OPENCV_CORE_UTILITY_H__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/version.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                        Intel License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright( C) 2000-2015, Intel Corporation, all rights reserved.\n// Copyright (C) 2011-2013, NVIDIA Corporation, all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of Intel Corporation may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n//(including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort(including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n/*\n  definition of the current version of OpenCV\n  Usefull to test in user programs\n*/\n\n#ifndef __OPENCV_VERSION_HPP__\n#define __OPENCV_VERSION_HPP__\n\n#define CV_VERSION_MAJOR    3\n#define CV_VERSION_MINOR    0\n#define CV_VERSION_REVISION 0\n#define CV_VERSION_STATUS   \"\"\n\n#define CVAUX_STR_EXP(__A)  #__A\n#define CVAUX_STR(__A)      CVAUX_STR_EXP(__A)\n\n#define CVAUX_STRW_EXP(__A)  L#__A\n#define CVAUX_STRW(__A)      CVAUX_STRW_EXP(__A)\n\n#define CV_VERSION          CVAUX_STR(CV_VERSION_MAJOR) \".\" CVAUX_STR(CV_VERSION_MINOR) \".\" CVAUX_STR(CV_VERSION_REVISION) CV_VERSION_STATUS\n\n/* old  style version constants*/\n#define CV_MAJOR_VERSION    CV_VERSION_MAJOR\n#define CV_MINOR_VERSION    CV_VERSION_MINOR\n#define CV_SUBMINOR_VERSION CV_VERSION_REVISION\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core/wimage.hpp",
    "content": "/*M//////////////////////////////////////////////////////////////////////////////\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to\n//  this license.  If you do not agree to this license, do not download,\n//  install, copy or use the software.\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2008, Google, all rights reserved.\n// Third party copyrights are property of their respective owners.\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//  * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//  * Redistribution's 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//  * The name of Intel Corporation or contributors may not be used to endorse\n//     or promote products derived from this software without specific\n//     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\n// are disclaimed. In no event shall the Intel Corporation or contributors be\n// liable for any direct, indirect, incidental, special, exemplary, or\n// consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n/////////////////////////////////////////////////////////////////////////////////\n//M*/\n\n#ifndef __OPENCV_CORE_WIMAGE_HPP__\n#define __OPENCV_CORE_WIMAGE_HPP__\n\n#include \"opencv2/core/core_c.h\"\n\n#ifdef __cplusplus\n\nnamespace cv {\n\n//! @addtogroup core\n//! @{\n\ntemplate <typename T> class WImage;\ntemplate <typename T> class WImageBuffer;\ntemplate <typename T> class WImageView;\n\ntemplate<typename T, int C> class WImageC;\ntemplate<typename T, int C> class WImageBufferC;\ntemplate<typename T, int C> class WImageViewC;\n\n// Commonly used typedefs.\ntypedef WImage<uchar>            WImage_b;\ntypedef WImageView<uchar>        WImageView_b;\ntypedef WImageBuffer<uchar>      WImageBuffer_b;\n\ntypedef WImageC<uchar, 1>        WImage1_b;\ntypedef WImageViewC<uchar, 1>    WImageView1_b;\ntypedef WImageBufferC<uchar, 1>  WImageBuffer1_b;\n\ntypedef WImageC<uchar, 3>        WImage3_b;\ntypedef WImageViewC<uchar, 3>    WImageView3_b;\ntypedef WImageBufferC<uchar, 3>  WImageBuffer3_b;\n\ntypedef WImage<float>            WImage_f;\ntypedef WImageView<float>        WImageView_f;\ntypedef WImageBuffer<float>      WImageBuffer_f;\n\ntypedef WImageC<float, 1>        WImage1_f;\ntypedef WImageViewC<float, 1>    WImageView1_f;\ntypedef WImageBufferC<float, 1>  WImageBuffer1_f;\n\ntypedef WImageC<float, 3>        WImage3_f;\ntypedef WImageViewC<float, 3>    WImageView3_f;\ntypedef WImageBufferC<float, 3>  WImageBuffer3_f;\n\n// There isn't a standard for signed and unsigned short so be more\n// explicit in the typename for these cases.\ntypedef WImage<short>            WImage_16s;\ntypedef WImageView<short>        WImageView_16s;\ntypedef WImageBuffer<short>      WImageBuffer_16s;\n\ntypedef WImageC<short, 1>        WImage1_16s;\ntypedef WImageViewC<short, 1>    WImageView1_16s;\ntypedef WImageBufferC<short, 1>  WImageBuffer1_16s;\n\ntypedef WImageC<short, 3>        WImage3_16s;\ntypedef WImageViewC<short, 3>    WImageView3_16s;\ntypedef WImageBufferC<short, 3>  WImageBuffer3_16s;\n\ntypedef WImage<ushort>            WImage_16u;\ntypedef WImageView<ushort>        WImageView_16u;\ntypedef WImageBuffer<ushort>      WImageBuffer_16u;\n\ntypedef WImageC<ushort, 1>        WImage1_16u;\ntypedef WImageViewC<ushort, 1>    WImageView1_16u;\ntypedef WImageBufferC<ushort, 1>  WImageBuffer1_16u;\n\ntypedef WImageC<ushort, 3>        WImage3_16u;\ntypedef WImageViewC<ushort, 3>    WImageView3_16u;\ntypedef WImageBufferC<ushort, 3>  WImageBuffer3_16u;\n\n/** @brief Image class which provides a thin layer around an IplImage.\n\nThe goals of the class design are:\n\n    -# All the data has explicit ownership to avoid memory leaks\n    -# No hidden allocations or copies for performance.\n    -# Easy access to OpenCV methods (which will access IPP if available)\n    -# Can easily treat external data as an image\n    -# Easy to create images which are subsets of other images\n    -# Fast pixel access which can take advantage of number of channels if known at compile time.\n\nThe WImage class is the image class which provides the data accessors. The 'W' comes from the fact\nthat it is also a wrapper around the popular but inconvenient IplImage class. A WImage can be\nconstructed either using a WImageBuffer class which allocates and frees the data, or using a\nWImageView class which constructs a subimage or a view into external data. The view class does no\nmemory management. Each class actually has two versions, one when the number of channels is known\nat compile time and one when it isn't. Using the one with the number of channels specified can\nprovide some compile time optimizations by using the fact that the number of channels is a\nconstant.\n\nWe use the convention (c,r) to refer to column c and row r with (0,0) being the upper left corner.\nThis is similar to standard Euclidean coordinates with the first coordinate varying in the\nhorizontal direction and the second coordinate varying in the vertical direction. Thus (c,r) is\nusually in the domain [0, width) X [0, height)\n\nExample usage:\n@code\nWImageBuffer3_b  im(5,7);  // Make a 5X7 3 channel image of type uchar\nWImageView3_b  sub_im(im, 2,2, 3,3); // 3X3 submatrix\nvector<float> vec(10, 3.0f);\nWImageView1_f user_im(&vec[0], 2, 5);  // 2X5 image w/ supplied data\n\nim.SetZero();  // same as cvSetZero(im.Ipl())\n*im(2, 3) = 15;  // Modify the element at column 2, row 3\nMySetRand(&sub_im);\n\n// Copy the second row into the first.  This can be done with no memory\n// allocation and will use SSE if IPP is available.\nint w = im.Width();\nim.View(0,0, w,1).CopyFrom(im.View(0,1, w,1));\n\n// Doesn't care about source of data since using WImage\nvoid MySetRand(WImage_b* im) { // Works with any number of channels\nfor (int r = 0; r < im->Height(); ++r) {\n float* row = im->Row(r);\n for (int c = 0; c < im->Width(); ++c) {\n    for (int ch = 0; ch < im->Channels(); ++ch, ++row) {\n      *row = uchar(rand() & 255);\n    }\n }\n}\n}\n@endcode\n\nFunctions that are not part of the basic image allocation, viewing, and access should come from\nOpenCV, except some useful functions that are not part of OpenCV can be found in wimage_util.h\n*/\ntemplate<typename T>\nclass WImage\n{\npublic:\n    typedef T BaseType;\n\n    // WImage is an abstract class with no other virtual methods so make the\n    // destructor virtual.\n    virtual ~WImage() = 0;\n\n    // Accessors\n    IplImage* Ipl() {return image_; }\n    const IplImage* Ipl() const {return image_; }\n    T* ImageData() { return reinterpret_cast<T*>(image_->imageData); }\n    const T* ImageData() const {\n        return reinterpret_cast<const T*>(image_->imageData);\n    }\n\n    int Width() const {return image_->width; }\n    int Height() const {return image_->height; }\n\n    // WidthStep is the number of bytes to go to the pixel with the next y coord\n    int WidthStep() const {return image_->widthStep; }\n\n    int Channels() const {return image_->nChannels; }\n    int ChannelSize() const {return sizeof(T); }  // number of bytes per channel\n\n    // Number of bytes per pixel\n    int PixelSize() const {return Channels() * ChannelSize(); }\n\n    // Return depth type (e.g. IPL_DEPTH_8U, IPL_DEPTH_32F) which is the number\n    // of bits per channel and with the signed bit set.\n    // This is known at compile time using specializations.\n    int Depth() const;\n\n    inline const T* Row(int r) const {\n        return reinterpret_cast<T*>(image_->imageData + r*image_->widthStep);\n    }\n\n    inline T* Row(int r) {\n        return reinterpret_cast<T*>(image_->imageData + r*image_->widthStep);\n    }\n\n    // Pixel accessors which returns a pointer to the start of the channel\n    inline T* operator() (int c, int r)  {\n        return reinterpret_cast<T*>(image_->imageData + r*image_->widthStep) +\n            c*Channels();\n    }\n\n    inline const T* operator() (int c, int r) const  {\n        return reinterpret_cast<T*>(image_->imageData + r*image_->widthStep) +\n            c*Channels();\n    }\n\n    // Copy the contents from another image which is just a convenience to cvCopy\n    void CopyFrom(const WImage<T>& src) { cvCopy(src.Ipl(), image_); }\n\n    // Set contents to zero which is just a convenient to cvSetZero\n    void SetZero() { cvSetZero(image_); }\n\n    // Construct a view into a region of this image\n    WImageView<T> View(int c, int r, int width, int height);\n\nprotected:\n    // Disallow copy and assignment\n    WImage(const WImage&);\n    void operator=(const WImage&);\n\n    explicit WImage(IplImage* img) : image_(img) {\n        assert(!img || img->depth == Depth());\n    }\n\n    void SetIpl(IplImage* image) {\n        assert(!image || image->depth == Depth());\n        image_ = image;\n    }\n\n    IplImage* image_;\n};\n\n\n/** Image class when both the pixel type and number of channels\nare known at compile time.  This wrapper will speed up some of the operations\nlike accessing individual pixels using the () operator.\n*/\ntemplate<typename T, int C>\nclass WImageC : public WImage<T>\n{\npublic:\n    typedef typename WImage<T>::BaseType BaseType;\n    enum { kChannels = C };\n\n    explicit WImageC(IplImage* img) : WImage<T>(img) {\n        assert(!img || img->nChannels == Channels());\n    }\n\n    // Construct a view into a region of this image\n    WImageViewC<T, C> View(int c, int r, int width, int height);\n\n    // Copy the contents from another image which is just a convenience to cvCopy\n    void CopyFrom(const WImageC<T, C>& src) {\n        cvCopy(src.Ipl(), WImage<T>::image_);\n    }\n\n    // WImageC is an abstract class with no other virtual methods so make the\n    // destructor virtual.\n    virtual ~WImageC() = 0;\n\n    int Channels() const {return C; }\n\nprotected:\n    // Disallow copy and assignment\n    WImageC(const WImageC&);\n    void operator=(const WImageC&);\n\n    void SetIpl(IplImage* image) {\n        assert(!image || image->depth == WImage<T>::Depth());\n        WImage<T>::SetIpl(image);\n    }\n};\n\n/** Image class which owns the data, so it can be allocated and is always\nfreed.  It cannot be copied but can be explicity cloned.\n*/\ntemplate<typename T>\nclass WImageBuffer : public WImage<T>\n{\npublic:\n    typedef typename WImage<T>::BaseType BaseType;\n\n    // Default constructor which creates an object that can be\n    WImageBuffer() : WImage<T>(0) {}\n\n    WImageBuffer(int width, int height, int nchannels) : WImage<T>(0) {\n        Allocate(width, height, nchannels);\n    }\n\n    // Constructor which takes ownership of a given IplImage so releases\n    // the image on destruction.\n    explicit WImageBuffer(IplImage* img) : WImage<T>(img) {}\n\n    // Allocate an image.  Does nothing if current size is the same as\n    // the new size.\n    void Allocate(int width, int height, int nchannels);\n\n    // Set the data to point to an image, releasing the old data\n    void SetIpl(IplImage* img) {\n        ReleaseImage();\n        WImage<T>::SetIpl(img);\n    }\n\n    // Clone an image which reallocates the image if of a different dimension.\n    void CloneFrom(const WImage<T>& src) {\n        Allocate(src.Width(), src.Height(), src.Channels());\n        CopyFrom(src);\n    }\n\n    ~WImageBuffer() {\n        ReleaseImage();\n    }\n\n    // Release the image if it isn't null.\n    void ReleaseImage() {\n        if (WImage<T>::image_) {\n            IplImage* image = WImage<T>::image_;\n            cvReleaseImage(&image);\n            WImage<T>::SetIpl(0);\n        }\n    }\n\n    bool IsNull() const {return WImage<T>::image_ == NULL; }\n\nprivate:\n    // Disallow copy and assignment\n    WImageBuffer(const WImageBuffer&);\n    void operator=(const WImageBuffer&);\n};\n\n/** Like a WImageBuffer class but when the number of channels is known at compile time.\n*/\ntemplate<typename T, int C>\nclass WImageBufferC : public WImageC<T, C>\n{\npublic:\n    typedef typename WImage<T>::BaseType BaseType;\n    enum { kChannels = C };\n\n    // Default constructor which creates an object that can be\n    WImageBufferC() : WImageC<T, C>(0) {}\n\n    WImageBufferC(int width, int height) : WImageC<T, C>(0) {\n        Allocate(width, height);\n    }\n\n    // Constructor which takes ownership of a given IplImage so releases\n    // the image on destruction.\n    explicit WImageBufferC(IplImage* img) : WImageC<T, C>(img) {}\n\n    // Allocate an image.  Does nothing if current size is the same as\n    // the new size.\n    void Allocate(int width, int height);\n\n    // Set the data to point to an image, releasing the old data\n    void SetIpl(IplImage* img) {\n        ReleaseImage();\n        WImageC<T, C>::SetIpl(img);\n    }\n\n    // Clone an image which reallocates the image if of a different dimension.\n    void CloneFrom(const WImageC<T, C>& src) {\n        Allocate(src.Width(), src.Height());\n        CopyFrom(src);\n    }\n\n    ~WImageBufferC() {\n        ReleaseImage();\n    }\n\n    // Release the image if it isn't null.\n    void ReleaseImage() {\n        if (WImage<T>::image_) {\n            IplImage* image = WImage<T>::image_;\n            cvReleaseImage(&image);\n            WImageC<T, C>::SetIpl(0);\n        }\n    }\n\n    bool IsNull() const {return WImage<T>::image_ == NULL; }\n\nprivate:\n    // Disallow copy and assignment\n    WImageBufferC(const WImageBufferC&);\n    void operator=(const WImageBufferC&);\n};\n\n/** View into an image class which allows treating a subimage as an image or treating external data\nas an image\n*/\ntemplate<typename T> class WImageView : public WImage<T>\n{\npublic:\n    typedef typename WImage<T>::BaseType BaseType;\n\n    // Construct a subimage.  No checks are done that the subimage lies\n    // completely inside the original image.\n    WImageView(WImage<T>* img, int c, int r, int width, int height);\n\n    // Refer to external data.\n    // If not given width_step assumed to be same as width.\n    WImageView(T* data, int width, int height, int channels, int width_step = -1);\n\n    // Refer to external data.  This does NOT take ownership\n    // of the supplied IplImage.\n    WImageView(IplImage* img) : WImage<T>(img) {}\n\n    // Copy constructor\n    WImageView(const WImage<T>& img) : WImage<T>(0) {\n        header_ = *(img.Ipl());\n        WImage<T>::SetIpl(&header_);\n    }\n\n    WImageView& operator=(const WImage<T>& img) {\n        header_ = *(img.Ipl());\n        WImage<T>::SetIpl(&header_);\n        return *this;\n    }\n\nprotected:\n    IplImage header_;\n};\n\n\ntemplate<typename T, int C>\nclass WImageViewC : public WImageC<T, C>\n{\npublic:\n    typedef typename WImage<T>::BaseType BaseType;\n    enum { kChannels = C };\n\n    // Default constructor needed for vectors of views.\n    WImageViewC();\n\n    virtual ~WImageViewC() {}\n\n    // Construct a subimage.  No checks are done that the subimage lies\n    // completely inside the original image.\n    WImageViewC(WImageC<T, C>* img,\n        int c, int r, int width, int height);\n\n    // Refer to external data\n    WImageViewC(T* data, int width, int height, int width_step = -1);\n\n    // Refer to external data.  This does NOT take ownership\n    // of the supplied IplImage.\n    WImageViewC(IplImage* img) : WImageC<T, C>(img) {}\n\n    // Copy constructor which does a shallow copy to allow multiple views\n    // of same data.  gcc-4.1.1 gets confused if both versions of\n    // the constructor and assignment operator are not provided.\n    WImageViewC(const WImageC<T, C>& img) : WImageC<T, C>(0) {\n        header_ = *(img.Ipl());\n        WImageC<T, C>::SetIpl(&header_);\n    }\n    WImageViewC(const WImageViewC<T, C>& img) : WImageC<T, C>(0) {\n        header_ = *(img.Ipl());\n        WImageC<T, C>::SetIpl(&header_);\n    }\n\n    WImageViewC& operator=(const WImageC<T, C>& img) {\n        header_ = *(img.Ipl());\n        WImageC<T, C>::SetIpl(&header_);\n        return *this;\n    }\n    WImageViewC& operator=(const WImageViewC<T, C>& img) {\n        header_ = *(img.Ipl());\n        WImageC<T, C>::SetIpl(&header_);\n        return *this;\n    }\n\nprotected:\n    IplImage header_;\n};\n\n\n// Specializations for depth\ntemplate<>\ninline int WImage<uchar>::Depth() const {return IPL_DEPTH_8U; }\ntemplate<>\ninline int WImage<signed char>::Depth() const {return IPL_DEPTH_8S; }\ntemplate<>\ninline int WImage<short>::Depth() const {return IPL_DEPTH_16S; }\ntemplate<>\ninline int WImage<ushort>::Depth() const {return IPL_DEPTH_16U; }\ntemplate<>\ninline int WImage<int>::Depth() const {return IPL_DEPTH_32S; }\ntemplate<>\ninline int WImage<float>::Depth() const {return IPL_DEPTH_32F; }\ntemplate<>\ninline int WImage<double>::Depth() const {return IPL_DEPTH_64F; }\n\ntemplate<typename T> inline WImage<T>::~WImage() {}\ntemplate<typename T, int C> inline WImageC<T, C>::~WImageC() {}\n\ntemplate<typename T>\ninline void WImageBuffer<T>::Allocate(int width, int height, int nchannels)\n{\n    if (IsNull() || WImage<T>::Width() != width ||\n        WImage<T>::Height() != height || WImage<T>::Channels() != nchannels) {\n        ReleaseImage();\n        WImage<T>::image_ = cvCreateImage(cvSize(width, height),\n            WImage<T>::Depth(), nchannels);\n    }\n}\n\ntemplate<typename T, int C>\ninline void WImageBufferC<T, C>::Allocate(int width, int height)\n{\n    if (IsNull() || WImage<T>::Width() != width || WImage<T>::Height() != height) {\n        ReleaseImage();\n        WImageC<T, C>::SetIpl(cvCreateImage(cvSize(width, height),WImage<T>::Depth(), C));\n    }\n}\n\ntemplate<typename T>\nWImageView<T>::WImageView(WImage<T>* img, int c, int r, int width, int height)\n        : WImage<T>(0)\n{\n    header_ = *(img->Ipl());\n    header_.imageData = reinterpret_cast<char*>((*img)(c, r));\n    header_.width = width;\n    header_.height = height;\n    WImage<T>::SetIpl(&header_);\n}\n\ntemplate<typename T>\nWImageView<T>::WImageView(T* data, int width, int height, int nchannels, int width_step)\n          : WImage<T>(0)\n{\n    cvInitImageHeader(&header_, cvSize(width, height), WImage<T>::Depth(), nchannels);\n    header_.imageData = reinterpret_cast<char*>(data);\n    if (width_step > 0) {\n        header_.widthStep = width_step;\n    }\n    WImage<T>::SetIpl(&header_);\n}\n\ntemplate<typename T, int C>\nWImageViewC<T, C>::WImageViewC(WImageC<T, C>* img, int c, int r, int width, int height)\n        : WImageC<T, C>(0)\n{\n    header_ = *(img->Ipl());\n    header_.imageData = reinterpret_cast<char*>((*img)(c, r));\n    header_.width = width;\n    header_.height = height;\n    WImageC<T, C>::SetIpl(&header_);\n}\n\ntemplate<typename T, int C>\nWImageViewC<T, C>::WImageViewC() : WImageC<T, C>(0) {\n    cvInitImageHeader(&header_, cvSize(0, 0), WImage<T>::Depth(), C);\n    header_.imageData = reinterpret_cast<char*>(0);\n    WImageC<T, C>::SetIpl(&header_);\n}\n\ntemplate<typename T, int C>\nWImageViewC<T, C>::WImageViewC(T* data, int width, int height, int width_step)\n    : WImageC<T, C>(0)\n{\n    cvInitImageHeader(&header_, cvSize(width, height), WImage<T>::Depth(), C);\n    header_.imageData = reinterpret_cast<char*>(data);\n    if (width_step > 0) {\n        header_.widthStep = width_step;\n    }\n    WImageC<T, C>::SetIpl(&header_);\n}\n\n// Construct a view into a region of an image\ntemplate<typename T>\nWImageView<T> WImage<T>::View(int c, int r, int width, int height) {\n    return WImageView<T>(this, c, r, width, height);\n}\n\ntemplate<typename T, int C>\nWImageViewC<T, C> WImageC<T, C>::View(int c, int r, int width, int height) {\n    return WImageViewC<T, C>(this, c, r, width, height);\n}\n\n//! @} core\n\n}  // end of namespace\n\n#endif // __cplusplus\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/core.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2015, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2015, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_CORE_HPP__\n#define __OPENCV_CORE_HPP__\n\n#ifndef __cplusplus\n#  error core.hpp header must be compiled as C++\n#endif\n\n#include \"opencv2/core/cvdef.h\"\n#include \"opencv2/core/version.hpp\"\n#include \"opencv2/core/base.hpp\"\n#include \"opencv2/core/cvstd.hpp\"\n#include \"opencv2/core/traits.hpp\"\n#include \"opencv2/core/matx.hpp\"\n#include \"opencv2/core/types.hpp\"\n#include \"opencv2/core/mat.hpp\"\n#include \"opencv2/core/persistence.hpp\"\n\n/**\n@defgroup core Core functionality\n@{\n    @defgroup core_basic Basic structures\n    @defgroup core_c C structures and operations\n    @{\n        @defgroup core_c_glue Connections with C++\n    @}\n    @defgroup core_array Operations on arrays\n    @defgroup core_xml XML/YAML Persistence\n    @defgroup core_cluster Clustering\n    @defgroup core_utils Utility and system functions and macros\n    @{\n        @defgroup core_utils_neon NEON utilities\n    @}\n    @defgroup core_opengl OpenGL interoperability\n    @defgroup core_ipp Intel IPP Asynchronous C/C++ Converters\n    @defgroup core_optim Optimization Algorithms\n    @defgroup core_directx DirectX interoperability\n    @defgroup core_eigen Eigen support\n    @defgroup core_opencl OpenCL support\n@}\n */\n\nnamespace cv {\n\n//! @addtogroup core_utils\n//! @{\n\n/*! @brief Class passed to an error.\n\nThis class encapsulates all or almost all necessary\ninformation about the error happened in the program. The exception is\nusually constructed and thrown implicitly via CV_Error and CV_Error_ macros.\n@see error\n */\nclass CV_EXPORTS Exception : public std::exception\n{\npublic:\n    /*!\n     Default constructor\n     */\n    Exception();\n    /*!\n     Full constructor. Normally the constuctor is not called explicitly.\n     Instead, the macros CV_Error(), CV_Error_() and CV_Assert() are used.\n    */\n    Exception(int _code, const String& _err, const String& _func, const String& _file, int _line);\n    virtual ~Exception() throw();\n\n    /*!\n     \\return the error description and the context as a text string.\n    */\n    virtual const char *what() const throw();\n    void formatMessage();\n\n    String msg; ///< the formatted error message\n\n    int code; ///< error code @see CVStatus\n    String err; ///< error description\n    String func; ///< function name. Available only when the compiler supports getting it\n    String file; ///< source file name where the error has occured\n    int line; ///< line number in the source file where the error has occured\n};\n\n/*! @brief Signals an error and raises the exception.\n\nBy default the function prints information about the error to stderr,\nthen it either stops if cv::setBreakOnError() had been called before or raises the exception.\nIt is possible to alternate error processing by using cv::redirectError().\n@param exc the exception raisen.\n@deprecated drop this version\n */\nCV_EXPORTS void error( const Exception& exc );\n\nenum SortFlags { SORT_EVERY_ROW    = 0, //!< each matrix row is sorted independently\n                 SORT_EVERY_COLUMN = 1, //!< each matrix column is sorted\n                                        //!< independently; this flag and the previous one are\n                                        //!< mutually exclusive.\n                 SORT_ASCENDING    = 0, //!< each matrix row is sorted in the ascending\n                                        //!< order.\n                 SORT_DESCENDING   = 16 //!< each matrix row is sorted in the\n                                        //!< descending order; this flag and the previous one are also\n                                        //!< mutually exclusive.\n               };\n\n//! @} core_utils\n\n//! @addtogroup core\n//! @{\n\n//! Covariation flags\nenum CovarFlags {\n    /** The output covariance matrix is calculated as:\n       \\f[\\texttt{scale}   \\cdot  [  \\texttt{vects}  [0]-  \\texttt{mean}  , \\texttt{vects}  [1]-  \\texttt{mean}  ,...]^T  \\cdot  [ \\texttt{vects}  [0]- \\texttt{mean}  , \\texttt{vects}  [1]- \\texttt{mean}  ,...],\\f]\n       The covariance matrix will be nsamples x nsamples. Such an unusual covariance matrix is used\n       for fast PCA of a set of very large vectors (see, for example, the EigenFaces technique for\n       face recognition). Eigenvalues of this \"scrambled\" matrix match the eigenvalues of the true\n       covariance matrix. The \"true\" eigenvectors can be easily calculated from the eigenvectors of\n       the \"scrambled\" covariance matrix. */\n    COVAR_SCRAMBLED = 0,\n    /**The output covariance matrix is calculated as:\n        \\f[\\texttt{scale}   \\cdot  [  \\texttt{vects}  [0]-  \\texttt{mean}  , \\texttt{vects}  [1]-  \\texttt{mean}  ,...]  \\cdot  [ \\texttt{vects}  [0]- \\texttt{mean}  , \\texttt{vects}  [1]- \\texttt{mean}  ,...]^T,\\f]\n        covar will be a square matrix of the same size as the total number of elements in each input\n        vector. One and only one of COVAR_SCRAMBLED and COVAR_NORMAL must be specified.*/\n    COVAR_NORMAL    = 1,\n    /** If the flag is specified, the function does not calculate mean from\n        the input vectors but, instead, uses the passed mean vector. This is useful if mean has been\n        pre-calculated or known in advance, or if the covariance matrix is calculated by parts. In\n        this case, mean is not a mean vector of the input sub-set of vectors but rather the mean\n        vector of the whole set.*/\n    COVAR_USE_AVG   = 2,\n    /** If the flag is specified, the covariance matrix is scaled. In the\n        \"normal\" mode, scale is 1./nsamples . In the \"scrambled\" mode, scale is the reciprocal of the\n        total number of elements in each input vector. By default (if the flag is not specified), the\n        covariance matrix is not scaled ( scale=1 ).*/\n    COVAR_SCALE     = 4,\n    /** If the flag is\n        specified, all the input vectors are stored as rows of the samples matrix. mean should be a\n        single-row vector in this case.*/\n    COVAR_ROWS      = 8,\n    /** If the flag is\n        specified, all the input vectors are stored as columns of the samples matrix. mean should be a\n        single-column vector in this case.*/\n    COVAR_COLS      = 16\n};\n\n//! k-Means flags\nenum KmeansFlags {\n    /** Select random initial centers in each attempt.*/\n    KMEANS_RANDOM_CENTERS     = 0,\n    /** Use kmeans++ center initialization by Arthur and Vassilvitskii [Arthur2007].*/\n    KMEANS_PP_CENTERS         = 2,\n    /** During the first (and possibly the only) attempt, use the\n        user-supplied labels instead of computing them from the initial centers. For the second and\n        further attempts, use the random or semi-random centers. Use one of KMEANS_\\*_CENTERS flag\n        to specify the exact method.*/\n    KMEANS_USE_INITIAL_LABELS = 1\n};\n\n//! type of line\nenum LineTypes {\n    FILLED  = -1,\n    LINE_4  = 4, //!< 4-connected line\n    LINE_8  = 8, //!< 8-connected line\n    LINE_AA = 16 //!< antialiased line\n};\n\n//! Only a subset of Hershey fonts\n//! <http://sources.isc.org/utils/misc/hershey-font.txt> are supported\nenum HersheyFonts {\n    FONT_HERSHEY_SIMPLEX        = 0, //!< normal size sans-serif font\n    FONT_HERSHEY_PLAIN          = 1, //!< small size sans-serif font\n    FONT_HERSHEY_DUPLEX         = 2, //!< normal size sans-serif font (more complex than FONT_HERSHEY_SIMPLEX)\n    FONT_HERSHEY_COMPLEX        = 3, //!< normal size serif font\n    FONT_HERSHEY_TRIPLEX        = 4, //!< normal size serif font (more complex than FONT_HERSHEY_COMPLEX)\n    FONT_HERSHEY_COMPLEX_SMALL  = 5, //!< smaller version of FONT_HERSHEY_COMPLEX\n    FONT_HERSHEY_SCRIPT_SIMPLEX = 6, //!< hand-writing style font\n    FONT_HERSHEY_SCRIPT_COMPLEX = 7, //!< more complex variant of FONT_HERSHEY_SCRIPT_SIMPLEX\n    FONT_ITALIC                 = 16 //!< flag for italic font\n};\n\nenum ReduceTypes { REDUCE_SUM = 0, //!< the output is the sum of all rows/columns of the matrix.\n                   REDUCE_AVG = 1, //!< the output is the mean vector of all rows/columns of the matrix.\n                   REDUCE_MAX = 2, //!< the output is the maximum (column/row-wise) of all rows/columns of the matrix.\n                   REDUCE_MIN = 3  //!< the output is the minimum (column/row-wise) of all rows/columns of the matrix.\n                 };\n\n\n/** @brief Swaps two matrices\n*/\nCV_EXPORTS void swap(Mat& a, Mat& b);\n/** @overload */\nCV_EXPORTS void swap( UMat& a, UMat& b );\n\n//! @} core\n\n//! @addtogroup core_array\n//! @{\n\n/** @brief Computes the source location of an extrapolated pixel.\n\nThe function computes and returns the coordinate of a donor pixel corresponding to the specified\nextrapolated pixel when using the specified extrapolation border mode. For example, if you use\ncv::BORDER_WRAP mode in the horizontal direction, cv::BORDER_REFLECT_101 in the vertical direction and\nwant to compute value of the \"virtual\" pixel Point(-5, 100) in a floating-point image img , it\nlooks like:\n@code{.cpp}\n    float val = img.at<float>(borderInterpolate(100, img.rows, cv::BORDER_REFLECT_101),\n                              borderInterpolate(-5, img.cols, cv::BORDER_WRAP));\n@endcode\nNormally, the function is not called directly. It is used inside filtering functions and also in\ncopyMakeBorder.\n@param p 0-based coordinate of the extrapolated pixel along one of the axes, likely \\<0 or \\>= len\n@param len Length of the array along the corresponding axis.\n@param borderType Border type, one of the cv::BorderTypes, except for cv::BORDER_TRANSPARENT and\ncv::BORDER_ISOLATED . When borderType==cv::BORDER_CONSTANT , the function always returns -1, regardless\nof p and len.\n\n@sa copyMakeBorder\n*/\nCV_EXPORTS_W int borderInterpolate(int p, int len, int borderType);\n\n/** @brief Forms a border around an image.\n\nThe function copies the source image into the middle of the destination image. The areas to the\nleft, to the right, above and below the copied source image will be filled with extrapolated\npixels. This is not what filtering functions based on it do (they extrapolate pixels on-fly), but\nwhat other more complex functions, including your own, may do to simplify image boundary handling.\n\nThe function supports the mode when src is already in the middle of dst . In this case, the\nfunction does not copy src itself but simply constructs the border, for example:\n\n@code{.cpp}\n    // let border be the same in all directions\n    int border=2;\n    // constructs a larger image to fit both the image and the border\n    Mat gray_buf(rgb.rows + border*2, rgb.cols + border*2, rgb.depth());\n    // select the middle part of it w/o copying data\n    Mat gray(gray_canvas, Rect(border, border, rgb.cols, rgb.rows));\n    // convert image from RGB to grayscale\n    cvtColor(rgb, gray, COLOR_RGB2GRAY);\n    // form a border in-place\n    copyMakeBorder(gray, gray_buf, border, border,\n                   border, border, BORDER_REPLICATE);\n    // now do some custom filtering ...\n    ...\n@endcode\n@note When the source image is a part (ROI) of a bigger image, the function will try to use the\npixels outside of the ROI to form a border. To disable this feature and always do extrapolation, as\nif src was not a ROI, use borderType | BORDER_ISOLATED.\n\n@param src Source image.\n@param dst Destination image of the same type as src and the size Size(src.cols+left+right,\nsrc.rows+top+bottom) .\n@param top\n@param bottom\n@param left\n@param right Parameter specifying how many pixels in each direction from the source image rectangle\nto extrapolate. For example, top=1, bottom=1, left=1, right=1 mean that 1 pixel-wide border needs\nto be built.\n@param borderType Border type. See borderInterpolate for details.\n@param value Border value if borderType==BORDER_CONSTANT .\n\n@sa  borderInterpolate\n*/\nCV_EXPORTS_W void copyMakeBorder(InputArray src, OutputArray dst,\n                                 int top, int bottom, int left, int right,\n                                 int borderType, const Scalar& value = Scalar() );\n\n/** @brief Calculates the per-element sum of two arrays or an array and a scalar.\n\nThe function add calculates:\n- Sum of two arrays when both input arrays have the same size and the same number of channels:\n\\f[\\texttt{dst}(I) =  \\texttt{saturate} ( \\texttt{src1}(I) +  \\texttt{src2}(I)) \\quad \\texttt{if mask}(I) \\ne0\\f]\n- Sum of an array and a scalar when src2 is constructed from Scalar or has the same number of\nelements as `src1.channels()`:\n\\f[\\texttt{dst}(I) =  \\texttt{saturate} ( \\texttt{src1}(I) +  \\texttt{src2} ) \\quad \\texttt{if mask}(I) \\ne0\\f]\n- Sum of a scalar and an array when src1 is constructed from Scalar or has the same number of\nelements as `src2.channels()`:\n\\f[\\texttt{dst}(I) =  \\texttt{saturate} ( \\texttt{src1} +  \\texttt{src2}(I) ) \\quad \\texttt{if mask}(I) \\ne0\\f]\nwhere `I` is a multi-dimensional index of array elements. In case of multi-channel arrays, each\nchannel is processed independently.\n\nThe first function in the list above can be replaced with matrix expressions:\n@code{.cpp}\n    dst = src1 + src2;\n    dst += src1; // equivalent to add(dst, src1, dst);\n@endcode\nThe input arrays and the output array can all have the same or different depths. For example, you\ncan add a 16-bit unsigned array to a 8-bit signed array and store the sum as a 32-bit\nfloating-point array. Depth of the output array is determined by the dtype parameter. In the second\nand third cases above, as well as in the first case, when src1.depth() == src2.depth(), dtype can\nbe set to the default -1. In this case, the output array will have the same depth as the input\narray, be it src1, src2 or both.\n@note Saturation is not applied when the output array has the depth CV_32S. You may even get\nresult of an incorrect sign in the case of overflow.\n@param src1 first input array or a scalar.\n@param src2 second input array or a scalar.\n@param dst output array that has the same size and number of channels as the input array(s); the\ndepth is defined by dtype or src1/src2.\n@param mask optional operation mask - 8-bit single channel array, that specifies elements of the\noutput array to be changed.\n@param dtype optional depth of the output array (see the discussion below).\n@sa subtract, addWeighted, scaleAdd, Mat::convertTo\n*/\nCV_EXPORTS_W void add(InputArray src1, InputArray src2, OutputArray dst,\n                      InputArray mask = noArray(), int dtype = -1);\n\n/** @brief Calculates the per-element difference between two arrays or array and a scalar.\n\nThe function subtract calculates:\n- Difference between two arrays, when both input arrays have the same size and the same number of\nchannels:\n    \\f[\\texttt{dst}(I) =  \\texttt{saturate} ( \\texttt{src1}(I) -  \\texttt{src2}(I)) \\quad \\texttt{if mask}(I) \\ne0\\f]\n- Difference between an array and a scalar, when src2 is constructed from Scalar or has the same\nnumber of elements as `src1.channels()`:\n    \\f[\\texttt{dst}(I) =  \\texttt{saturate} ( \\texttt{src1}(I) -  \\texttt{src2} ) \\quad \\texttt{if mask}(I) \\ne0\\f]\n- Difference between a scalar and an array, when src1 is constructed from Scalar or has the same\nnumber of elements as `src2.channels()`:\n    \\f[\\texttt{dst}(I) =  \\texttt{saturate} ( \\texttt{src1} -  \\texttt{src2}(I) ) \\quad \\texttt{if mask}(I) \\ne0\\f]\n- The reverse difference between a scalar and an array in the case of `SubRS`:\n    \\f[\\texttt{dst}(I) =  \\texttt{saturate} ( \\texttt{src2} -  \\texttt{src1}(I) ) \\quad \\texttt{if mask}(I) \\ne0\\f]\nwhere I is a multi-dimensional index of array elements. In case of multi-channel arrays, each\nchannel is processed independently.\n\nThe first function in the list above can be replaced with matrix expressions:\n@code{.cpp}\n    dst = src1 - src2;\n    dst -= src1; // equivalent to subtract(dst, src1, dst);\n@endcode\nThe input arrays and the output array can all have the same or different depths. For example, you\ncan subtract to 8-bit unsigned arrays and store the difference in a 16-bit signed array. Depth of\nthe output array is determined by dtype parameter. In the second and third cases above, as well as\nin the first case, when src1.depth() == src2.depth(), dtype can be set to the default -1. In this\ncase the output array will have the same depth as the input array, be it src1, src2 or both.\n@note Saturation is not applied when the output array has the depth CV_32S. You may even get\nresult of an incorrect sign in the case of overflow.\n@param src1 first input array or a scalar.\n@param src2 second input array or a scalar.\n@param dst output array of the same size and the same number of channels as the input array.\n@param mask optional operation mask; this is an 8-bit single channel array that specifies elements\nof the output array to be changed.\n@param dtype optional depth of the output array\n@sa  add, addWeighted, scaleAdd, Mat::convertTo\n  */\nCV_EXPORTS_W void subtract(InputArray src1, InputArray src2, OutputArray dst,\n                           InputArray mask = noArray(), int dtype = -1);\n\n\n/** @brief Calculates the per-element scaled product of two arrays.\n\nThe function multiply calculates the per-element product of two arrays:\n\n\\f[\\texttt{dst} (I)= \\texttt{saturate} ( \\texttt{scale} \\cdot \\texttt{src1} (I)  \\cdot \\texttt{src2} (I))\\f]\n\nThere is also a @ref MatrixExpressions -friendly variant of the first function. See Mat::mul .\n\nFor a not-per-element matrix product, see gemm .\n\n@note Saturation is not applied when the output array has the depth\nCV_32S. You may even get result of an incorrect sign in the case of\noverflow.\n@param src1 first input array.\n@param src2 second input array of the same size and the same type as src1.\n@param dst output array of the same size and type as src1.\n@param scale optional scale factor.\n@param dtype optional depth of the output array\n@sa add, subtract, divide, scaleAdd, addWeighted, accumulate, accumulateProduct, accumulateSquare,\nMat::convertTo\n*/\nCV_EXPORTS_W void multiply(InputArray src1, InputArray src2,\n                           OutputArray dst, double scale = 1, int dtype = -1);\n\n/** @brief Performs per-element division of two arrays or a scalar by an array.\n\nThe functions divide divide one array by another:\n\\f[\\texttt{dst(I) = saturate(src1(I)*scale/src2(I))}\\f]\nor a scalar by an array when there is no src1 :\n\\f[\\texttt{dst(I) = saturate(scale/src2(I))}\\f]\n\nWhen src2(I) is zero, dst(I) will also be zero. Different channels of\nmulti-channel arrays are processed independently.\n\n@note Saturation is not applied when the output array has the depth CV_32S. You may even get\nresult of an incorrect sign in the case of overflow.\n@param src1 first input array.\n@param src2 second input array of the same size and type as src1.\n@param scale scalar factor.\n@param dst output array of the same size and type as src2.\n@param dtype optional depth of the output array; if -1, dst will have depth src2.depth(), but in\ncase of an array-by-array division, you can only pass -1 when src1.depth()==src2.depth().\n@sa  multiply, add, subtract\n*/\nCV_EXPORTS_W void divide(InputArray src1, InputArray src2, OutputArray dst,\n                         double scale = 1, int dtype = -1);\n\n/** @overload */\nCV_EXPORTS_W void divide(double scale, InputArray src2,\n                         OutputArray dst, int dtype = -1);\n\n/** @brief Calculates the sum of a scaled array and another array.\n\nThe function scaleAdd is one of the classical primitive linear algebra operations, known as DAXPY\nor SAXPY in [BLAS](http://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms). It calculates\nthe sum of a scaled array and another array:\n\\f[\\texttt{dst} (I)= \\texttt{scale} \\cdot \\texttt{src1} (I) +  \\texttt{src2} (I)\\f]\nThe function can also be emulated with a matrix expression, for example:\n@code{.cpp}\n    Mat A(3, 3, CV_64F);\n    ...\n    A.row(0) = A.row(1)*2 + A.row(2);\n@endcode\n@param src1 first input array.\n@param alpha scale factor for the first array.\n@param src2 second input array of the same size and type as src1.\n@param dst output array of the same size and type as src1.\n@sa add, addWeighted, subtract, Mat::dot, Mat::convertTo\n*/\nCV_EXPORTS_W void scaleAdd(InputArray src1, double alpha, InputArray src2, OutputArray dst);\n\n/** @brief Calculates the weighted sum of two arrays.\n\nThe function addWeighted calculates the weighted sum of two arrays as follows:\n\\f[\\texttt{dst} (I)= \\texttt{saturate} ( \\texttt{src1} (I)* \\texttt{alpha} +  \\texttt{src2} (I)* \\texttt{beta} +  \\texttt{gamma} )\\f]\nwhere I is a multi-dimensional index of array elements. In case of multi-channel arrays, each\nchannel is processed independently.\nThe function can be replaced with a matrix expression:\n@code{.cpp}\n    dst = src1*alpha + src2*beta + gamma;\n@endcode\n@note Saturation is not applied when the output array has the depth CV_32S. You may even get\nresult of an incorrect sign in the case of overflow.\n@param src1 first input array.\n@param alpha weight of the first array elements.\n@param src2 second input array of the same size and channel number as src1.\n@param beta weight of the second array elements.\n@param gamma scalar added to each sum.\n@param dst output array that has the same size and number of channels as the input arrays.\n@param dtype optional depth of the output array; when both input arrays have the same depth, dtype\ncan be set to -1, which will be equivalent to src1.depth().\n@sa  add, subtract, scaleAdd, Mat::convertTo\n*/\nCV_EXPORTS_W void addWeighted(InputArray src1, double alpha, InputArray src2,\n                              double beta, double gamma, OutputArray dst, int dtype = -1);\n\n/** @brief Scales, calculates absolute values, and converts the result to 8-bit.\n\nOn each element of the input array, the function convertScaleAbs\nperforms three operations sequentially: scaling, taking an absolute\nvalue, conversion to an unsigned 8-bit type:\n\\f[\\texttt{dst} (I)= \\texttt{saturate\\_cast<uchar>} (| \\texttt{src} (I)* \\texttt{alpha} +  \\texttt{beta} |)\\f]\nIn case of multi-channel arrays, the function processes each channel\nindependently. When the output is not 8-bit, the operation can be\nemulated by calling the Mat::convertTo method (or by using matrix\nexpressions) and then by calculating an absolute value of the result.\nFor example:\n@code{.cpp}\n    Mat_<float> A(30,30);\n    randu(A, Scalar(-100), Scalar(100));\n    Mat_<float> B = A*5 + 3;\n    B = abs(B);\n    // Mat_<float> B = abs(A*5+3) will also do the job,\n    // but it will allocate a temporary matrix\n@endcode\n@param src input array.\n@param dst output array.\n@param alpha optional scale factor.\n@param beta optional delta added to the scaled values.\n@sa  Mat::convertTo, cv::abs(const Mat&)\n*/\nCV_EXPORTS_W void convertScaleAbs(InputArray src, OutputArray dst,\n                                  double alpha = 1, double beta = 0);\n\n/** @brief Performs a look-up table transform of an array.\n\nThe function LUT fills the output array with values from the look-up table. Indices of the entries\nare taken from the input array. That is, the function processes each element of src as follows:\n\\f[\\texttt{dst} (I)  \\leftarrow \\texttt{lut(src(I) + d)}\\f]\nwhere\n\\f[d =  \\fork{0}{if \\texttt{src} has depth \\texttt{CV\\_8U}}{128}{if \\texttt{src} has depth \\texttt{CV\\_8S}}\\f]\n@param src input array of 8-bit elements.\n@param lut look-up table of 256 elements; in case of multi-channel input array, the table should\neither have a single channel (in this case the same table is used for all channels) or the same\nnumber of channels as in the input array.\n@param dst output array of the same size and number of channels as src, and the same depth as lut.\n@sa  convertScaleAbs, Mat::convertTo\n*/\nCV_EXPORTS_W void LUT(InputArray src, InputArray lut, OutputArray dst);\n\n/** @brief Calculates the sum of array elements.\n\nThe functions sum calculate and return the sum of array elements,\nindependently for each channel.\n@param src input array that must have from 1 to 4 channels.\n@sa  countNonZero, mean, meanStdDev, norm, minMaxLoc, reduce\n*/\nCV_EXPORTS_AS(sumElems) Scalar sum(InputArray src);\n\n/** @brief Counts non-zero array elements.\n\nThe function returns the number of non-zero elements in src :\n\\f[\\sum _{I: \\; \\texttt{src} (I) \\ne0 } 1\\f]\n@param src single-channel array.\n@sa  mean, meanStdDev, norm, minMaxLoc, calcCovarMatrix\n*/\nCV_EXPORTS_W int countNonZero( InputArray src );\n\n/** @brief Returns the list of locations of non-zero pixels\n\nGiven a binary matrix (likely returned from an operation such\nas threshold(), compare(), >, ==, etc, return all of\nthe non-zero indices as a cv::Mat or std::vector<cv::Point> (x,y)\nFor example:\n@code{.cpp}\n    cv::Mat binaryImage; // input, binary image\n    cv::Mat locations;   // output, locations of non-zero pixels\n    cv::findNonZero(binaryImage, locations);\n\n    // access pixel coordinates\n    Point pnt = locations.at<Point>(i);\n@endcode\nor\n@code{.cpp}\n    cv::Mat binaryImage; // input, binary image\n    vector<Point> locations;   // output, locations of non-zero pixels\n    cv::findNonZero(binaryImage, locations);\n\n    // access pixel coordinates\n    Point pnt = locations[i];\n@endcode\n@param src single-channel array (type CV_8UC1)\n@param idx the output array, type of cv::Mat or std::vector<Point>, corresponding to non-zero indices in the input\n*/\nCV_EXPORTS_W void findNonZero( InputArray src, OutputArray idx );\n\n/** @brief Calculates an average (mean) of array elements.\n\nThe function mean calculates the mean value M of array elements,\nindependently for each channel, and return it:\n\\f[\\begin{array}{l} N =  \\sum _{I: \\; \\texttt{mask} (I) \\ne 0} 1 \\\\ M_c =  \\left ( \\sum _{I: \\; \\texttt{mask} (I) \\ne 0}{ \\texttt{mtx} (I)_c} \\right )/N \\end{array}\\f]\nWhen all the mask elements are 0's, the functions return Scalar::all(0)\n@param src input array that should have from 1 to 4 channels so that the result can be stored in\nScalar_ .\n@param mask optional operation mask.\n@sa  countNonZero, meanStdDev, norm, minMaxLoc\n*/\nCV_EXPORTS_W Scalar mean(InputArray src, InputArray mask = noArray());\n\n/** Calculates a mean and standard deviation of array elements.\n\nThe function meanStdDev calculates the mean and the standard deviation M\nof array elements independently for each channel and returns it via the\noutput parameters:\n\\f[\\begin{array}{l} N =  \\sum _{I, \\texttt{mask} (I)  \\ne 0} 1 \\\\ \\texttt{mean} _c =  \\frac{\\sum_{ I: \\; \\texttt{mask}(I) \\ne 0} \\texttt{src} (I)_c}{N} \\\\ \\texttt{stddev} _c =  \\sqrt{\\frac{\\sum_{ I: \\; \\texttt{mask}(I) \\ne 0} \\left ( \\texttt{src} (I)_c -  \\texttt{mean} _c \\right )^2}{N}} \\end{array}\\f]\nWhen all the mask elements are 0's, the functions return\nmean=stddev=Scalar::all(0).\n@note The calculated standard deviation is only the diagonal of the\ncomplete normalized covariance matrix. If the full matrix is needed, you\ncan reshape the multi-channel array M x N to the single-channel array\nM\\*N x mtx.channels() (only possible when the matrix is continuous) and\nthen pass the matrix to calcCovarMatrix .\n@param src input array that should have from 1 to 4 channels so that the results can be stored in\nScalar_ 's.\n@param mean output parameter: calculated mean value.\n@param stddev output parameter: calculateded standard deviation.\n@param mask optional operation mask.\n@sa  countNonZero, mean, norm, minMaxLoc, calcCovarMatrix\n*/\nCV_EXPORTS_W void meanStdDev(InputArray src, OutputArray mean, OutputArray stddev,\n                             InputArray mask=noArray());\n\n/** @brief Calculates an absolute array norm, an absolute difference norm, or a\nrelative difference norm.\n\nThe functions norm calculate an absolute norm of src1 (when there is no\nsrc2 ):\n\n\\f[norm =  \\forkthree{\\|\\texttt{src1}\\|_{L_{\\infty}} =  \\max _I | \\texttt{src1} (I)|}{if  \\(\\texttt{normType} = \\texttt{NORM\\_INF}\\) }\n{ \\| \\texttt{src1} \\| _{L_1} =  \\sum _I | \\texttt{src1} (I)|}{if  \\(\\texttt{normType} = \\texttt{NORM\\_L1}\\) }\n{ \\| \\texttt{src1} \\| _{L_2} =  \\sqrt{\\sum_I \\texttt{src1}(I)^2} }{if  \\(\\texttt{normType} = \\texttt{NORM\\_L2}\\) }\\f]\n\nor an absolute or relative difference norm if src2 is there:\n\n\\f[norm =  \\forkthree{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_{\\infty}} =  \\max _I | \\texttt{src1} (I) -  \\texttt{src2} (I)|}{if  \\(\\texttt{normType} = \\texttt{NORM\\_INF}\\) }\n{ \\| \\texttt{src1} - \\texttt{src2} \\| _{L_1} =  \\sum _I | \\texttt{src1} (I) -  \\texttt{src2} (I)|}{if  \\(\\texttt{normType} = \\texttt{NORM\\_L1}\\) }\n{ \\| \\texttt{src1} - \\texttt{src2} \\| _{L_2} =  \\sqrt{\\sum_I (\\texttt{src1}(I) - \\texttt{src2}(I))^2} }{if  \\(\\texttt{normType} = \\texttt{NORM\\_L2}\\) }\\f]\n\nor\n\n\\f[norm =  \\forkthree{\\frac{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_{\\infty}}    }{\\|\\texttt{src2}\\|_{L_{\\infty}} }}{if  \\(\\texttt{normType} = \\texttt{NORM\\_RELATIVE\\_INF}\\) }\n{ \\frac{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_1} }{\\|\\texttt{src2}\\|_{L_1}} }{if  \\(\\texttt{normType} = \\texttt{NORM\\_RELATIVE\\_L1}\\) }\n{ \\frac{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_2} }{\\|\\texttt{src2}\\|_{L_2}} }{if  \\(\\texttt{normType} = \\texttt{NORM\\_RELATIVE\\_L2}\\) }\\f]\n\nThe functions norm return the calculated norm.\n\nWhen the mask parameter is specified and it is not empty, the norm is\ncalculated only over the region specified by the mask.\n\nA multi-channel input arrays are treated as a single-channel, that is,\nthe results for all channels are combined.\n\n@param src1 first input array.\n@param normType type of the norm (see cv::NormTypes).\n@param mask optional operation mask; it must have the same size as src1 and CV_8UC1 type.\n*/\nCV_EXPORTS_W double norm(InputArray src1, int normType = NORM_L2, InputArray mask = noArray());\n\n/** @overload\n@param src1 first input array.\n@param src2 second input array of the same size and the same type as src1.\n@param normType type of the norm (cv::NormTypes).\n@param mask optional operation mask; it must have the same size as src1 and CV_8UC1 type.\n*/\nCV_EXPORTS_W double norm(InputArray src1, InputArray src2,\n                         int normType = NORM_L2, InputArray mask = noArray());\n/** @overload\n@param src first input array.\n@param normType type of the norm (see cv::NormTypes).\n*/\nCV_EXPORTS double norm( const SparseMat& src, int normType );\n\n/** @brief computes PSNR image/video quality metric\n\nsee http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio for details\n@todo document\n  */\nCV_EXPORTS_W double PSNR(InputArray src1, InputArray src2);\n\n/** @brief naive nearest neighbor finder\n\nsee http://en.wikipedia.org/wiki/Nearest_neighbor_search\n@todo document\n  */\nCV_EXPORTS_W void batchDistance(InputArray src1, InputArray src2,\n                                OutputArray dist, int dtype, OutputArray nidx,\n                                int normType = NORM_L2, int K = 0,\n                                InputArray mask = noArray(), int update = 0,\n                                bool crosscheck = false);\n\n/** @brief Normalizes the norm or value range of an array.\n\nThe functions normalize scale and shift the input array elements so that\n\\f[\\| \\texttt{dst} \\| _{L_p}= \\texttt{alpha}\\f]\n(where p=Inf, 1 or 2) when normType=NORM_INF, NORM_L1, or NORM_L2, respectively; or so that\n\\f[\\min _I  \\texttt{dst} (I)= \\texttt{alpha} , \\, \\, \\max _I  \\texttt{dst} (I)= \\texttt{beta}\\f]\n\nwhen normType=NORM_MINMAX (for dense arrays only). The optional mask specifies a sub-array to be\nnormalized. This means that the norm or min-n-max are calculated over the sub-array, and then this\nsub-array is modified to be normalized. If you want to only use the mask to calculate the norm or\nmin-max but modify the whole array, you can use norm and Mat::convertTo.\n\nIn case of sparse matrices, only the non-zero values are analyzed and transformed. Because of this,\nthe range transformation for sparse matrices is not allowed since it can shift the zero level.\n\n@param src input array.\n@param dst output array of the same size as src .\n@param alpha norm value to normalize to or the lower range boundary in case of the range\nnormalization.\n@param beta upper range boundary in case of the range normalization; it is not used for the norm\nnormalization.\n@param norm_type normalization type (see cv::NormTypes).\n@param dtype when negative, the output array has the same type as src; otherwise, it has the same\nnumber of channels as src and the depth =CV_MAT_DEPTH(dtype).\n@param mask optional operation mask.\n@sa norm, Mat::convertTo, SparseMat::convertTo\n*/\nCV_EXPORTS_W void normalize( InputArray src, InputOutputArray dst, double alpha = 1, double beta = 0,\n                             int norm_type = NORM_L2, int dtype = -1, InputArray mask = noArray());\n\n/** @overload\n@param src input array.\n@param dst output array of the same size as src .\n@param alpha norm value to normalize to or the lower range boundary in case of the range\nnormalization.\n@param normType normalization type (see cv::NormTypes).\n*/\nCV_EXPORTS void normalize( const SparseMat& src, SparseMat& dst, double alpha, int normType );\n\n/** @brief Finds the global minimum and maximum in an array.\n\nThe functions minMaxLoc find the minimum and maximum element values and their positions. The\nextremums are searched across the whole array or, if mask is not an empty array, in the specified\narray region.\n\nThe functions do not work with multi-channel arrays. If you need to find minimum or maximum\nelements across all the channels, use Mat::reshape first to reinterpret the array as\nsingle-channel. Or you may extract the particular channel using either extractImageCOI , or\nmixChannels , or split .\n@param src input single-channel array.\n@param minVal pointer to the returned minimum value; NULL is used if not required.\n@param maxVal pointer to the returned maximum value; NULL is used if not required.\n@param minLoc pointer to the returned minimum location (in 2D case); NULL is used if not required.\n@param maxLoc pointer to the returned maximum location (in 2D case); NULL is used if not required.\n@param mask optional mask used to select a sub-array.\n@sa max, min, compare, inRange, extractImageCOI, mixChannels, split, Mat::reshape\n*/\nCV_EXPORTS_W void minMaxLoc(InputArray src, CV_OUT double* minVal,\n                            CV_OUT double* maxVal = 0, CV_OUT Point* minLoc = 0,\n                            CV_OUT Point* maxLoc = 0, InputArray mask = noArray());\n\n\n/** @brief Finds the global minimum and maximum in an array\n\nThe function minMaxIdx finds the minimum and maximum element values and their positions. The\nextremums are searched across the whole array or, if mask is not an empty array, in the specified\narray region. The function does not work with multi-channel arrays. If you need to find minimum or\nmaximum elements across all the channels, use Mat::reshape first to reinterpret the array as\nsingle-channel. Or you may extract the particular channel using either extractImageCOI , or\nmixChannels , or split . In case of a sparse matrix, the minimum is found among non-zero elements\nonly.\n@note When minIdx is not NULL, it must have at least 2 elements (as well as maxIdx), even if src is\na single-row or single-column matrix. In OpenCV (following MATLAB) each array has at least 2\ndimensions, i.e. single-column matrix is Mx1 matrix (and therefore minIdx/maxIdx will be\n(i1,0)/(i2,0)) and single-row matrix is 1xN matrix (and therefore minIdx/maxIdx will be\n(0,j1)/(0,j2)).\n@param src input single-channel array.\n@param minVal pointer to the returned minimum value; NULL is used if not required.\n@param maxVal pointer to the returned maximum value; NULL is used if not required.\n@param minIdx pointer to the returned minimum location (in nD case); NULL is used if not required;\nOtherwise, it must point to an array of src.dims elements, the coordinates of the minimum element\nin each dimension are stored there sequentially.\n@param maxIdx pointer to the returned maximum location (in nD case). NULL is used if not required.\n@param mask specified array region\n*/\nCV_EXPORTS void minMaxIdx(InputArray src, double* minVal, double* maxVal = 0,\n                          int* minIdx = 0, int* maxIdx = 0, InputArray mask = noArray());\n\n/** @overload\n@param a input single-channel array.\n@param minVal pointer to the returned minimum value; NULL is used if not required.\n@param maxVal pointer to the returned maximum value; NULL is used if not required.\n@param minIdx pointer to the returned minimum location (in nD case); NULL is used if not required;\nOtherwise, it must point to an array of src.dims elements, the coordinates of the minimum element\nin each dimension are stored there sequentially.\n@param maxIdx pointer to the returned maximum location (in nD case). NULL is used if not required.\n*/\nCV_EXPORTS void minMaxLoc(const SparseMat& a, double* minVal,\n                          double* maxVal, int* minIdx = 0, int* maxIdx = 0);\n\n/** @brief Reduces a matrix to a vector.\n\nThe function reduce reduces the matrix to a vector by treating the matrix rows/columns as a set of\n1D vectors and performing the specified operation on the vectors until a single row/column is\nobtained. For example, the function can be used to compute horizontal and vertical projections of a\nraster image. In case of REDUCE_SUM and REDUCE_AVG , the output may have a larger element\nbit-depth to preserve accuracy. And multi-channel arrays are also supported in these two reduction\nmodes.\n@param src input 2D matrix.\n@param dst output vector. Its size and type is defined by dim and dtype parameters.\n@param dim dimension index along which the matrix is reduced. 0 means that the matrix is reduced to\na single row. 1 means that the matrix is reduced to a single column.\n@param rtype reduction operation that could be one of cv::ReduceTypes\n@param dtype when negative, the output vector will have the same type as the input matrix,\notherwise, its type will be CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), src.channels()).\n@sa repeat\n*/\nCV_EXPORTS_W void reduce(InputArray src, OutputArray dst, int dim, int rtype, int dtype = -1);\n\n/** @brief Creates one multichannel array out of several single-channel ones.\n\nThe functions merge merge several arrays to make a single multi-channel array. That is, each\nelement of the output array will be a concatenation of the elements of the input arrays, where\nelements of i-th input array are treated as mv[i].channels()-element vectors.\n\nThe function split does the reverse operation. If you need to shuffle channels in some other\nadvanced way, use mixChannels .\n@param mv input array of matrices to be merged; all the matrices in mv must have the same\nsize and the same depth.\n@param count number of input matrices when mv is a plain C array; it must be greater than zero.\n@param dst output array of the same size and the same depth as mv[0]; The number of channels will\nbe the total number of channels in the matrix array.\n@sa  mixChannels, split, Mat::reshape\n*/\nCV_EXPORTS void merge(const Mat* mv, size_t count, OutputArray dst);\n\n/** @overload\n@param mv input vector of matrices to be merged; all the matrices in mv must have the same\nsize and the same depth.\n@param dst output array of the same size and the same depth as mv[0]; The number of channels will\nbe the total number of channels in the matrix array.\n  */\nCV_EXPORTS_W void merge(InputArrayOfArrays mv, OutputArray dst);\n\n/** @brief Divides a multi-channel array into several single-channel arrays.\n\nThe functions split split a multi-channel array into separate single-channel arrays:\n\\f[\\texttt{mv} [c](I) =  \\texttt{src} (I)_c\\f]\nIf you need to extract a single channel or do some other sophisticated channel permutation, use\nmixChannels .\n@param src input multi-channel array.\n@param mvbegin output array; the number of arrays must match src.channels(); the arrays themselves are\nreallocated, if needed.\n@sa merge, mixChannels, cvtColor\n*/\nCV_EXPORTS void split(const Mat& src, Mat* mvbegin);\n\n/** @overload\n@param m input multi-channel array.\n@param mv output vector of arrays; the arrays themselves are reallocated, if needed.\n*/\nCV_EXPORTS_W void split(InputArray m, OutputArrayOfArrays mv);\n\n/** @brief Copies specified channels from input arrays to the specified channels of\noutput arrays.\n\nThe functions mixChannels provide an advanced mechanism for shuffling image channels.\n\nsplit and merge and some forms of cvtColor are partial cases of mixChannels .\n\nIn the example below, the code splits a 4-channel RGBA image into a 3-channel BGR (with R and B\nchannels swapped) and a separate alpha-channel image:\n@code{.cpp}\n    Mat rgba( 100, 100, CV_8UC4, Scalar(1,2,3,4) );\n    Mat bgr( rgba.rows, rgba.cols, CV_8UC3 );\n    Mat alpha( rgba.rows, rgba.cols, CV_8UC1 );\n\n    // forming an array of matrices is a quite efficient operation,\n    // because the matrix data is not copied, only the headers\n    Mat out[] = { bgr, alpha };\n    // rgba[0] -> bgr[2], rgba[1] -> bgr[1],\n    // rgba[2] -> bgr[0], rgba[3] -> alpha[0]\n    int from_to[] = { 0,2, 1,1, 2,0, 3,3 };\n    mixChannels( &rgba, 1, out, 2, from_to, 4 );\n@endcode\n@note Unlike many other new-style C++ functions in OpenCV (see the introduction section and\nMat::create ), mixChannels requires the output arrays to be pre-allocated before calling the\nfunction.\n@param src input array or vector of matricesl; all of the matrices must have the same size and the\nsame depth.\n@param nsrcs number of matrices in src.\n@param dst output array or vector of matrices; all the matrices *must be allocated*; their size and\ndepth must be the same as in src[0].\n@param ndsts number of matrices in dst.\n@param fromTo array of index pairs specifying which channels are copied and where; fromTo[k\\*2] is\na 0-based index of the input channel in src, fromTo[k\\*2+1] is an index of the output channel in\ndst; the continuous channel numbering is used: the first input image channels are indexed from 0 to\nsrc[0].channels()-1, the second input image channels are indexed from src[0].channels() to\nsrc[0].channels() + src[1].channels()-1, and so on, the same scheme is used for the output image\nchannels; as a special case, when fromTo[k\\*2] is negative, the corresponding output channel is\nfilled with zero .\n@param npairs number of index pairs in fromTo.\n@sa split, merge, cvtColor\n*/\nCV_EXPORTS void mixChannels(const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts,\n                            const int* fromTo, size_t npairs);\n\n/** @overload\n@param src input array or vector of matricesl; all of the matrices must have the same size and the\nsame depth.\n@param dst output array or vector of matrices; all the matrices *must be allocated*; their size and\ndepth must be the same as in src[0].\n@param fromTo array of index pairs specifying which channels are copied and where; fromTo[k\\*2] is\na 0-based index of the input channel in src, fromTo[k\\*2+1] is an index of the output channel in\ndst; the continuous channel numbering is used: the first input image channels are indexed from 0 to\nsrc[0].channels()-1, the second input image channels are indexed from src[0].channels() to\nsrc[0].channels() + src[1].channels()-1, and so on, the same scheme is used for the output image\nchannels; as a special case, when fromTo[k\\*2] is negative, the corresponding output channel is\nfilled with zero .\n@param npairs number of index pairs in fromTo.\n*/\nCV_EXPORTS void mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst,\n                            const int* fromTo, size_t npairs);\n\n/** @overload\n@param src input array or vector of matricesl; all of the matrices must have the same size and the\nsame depth.\n@param dst output array or vector of matrices; all the matrices *must be allocated*; their size and\ndepth must be the same as in src[0].\n@param fromTo array of index pairs specifying which channels are copied and where; fromTo[k\\*2] is\na 0-based index of the input channel in src, fromTo[k\\*2+1] is an index of the output channel in\ndst; the continuous channel numbering is used: the first input image channels are indexed from 0 to\nsrc[0].channels()-1, the second input image channels are indexed from src[0].channels() to\nsrc[0].channels() + src[1].channels()-1, and so on, the same scheme is used for the output image\nchannels; as a special case, when fromTo[k\\*2] is negative, the corresponding output channel is\nfilled with zero .\n*/\nCV_EXPORTS_W void mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst,\n                              const std::vector<int>& fromTo);\n\n/** @brief extracts a single channel from src (coi is 0-based index)\n@todo document\n*/\nCV_EXPORTS_W void extractChannel(InputArray src, OutputArray dst, int coi);\n\n/** @brief inserts a single channel to dst (coi is 0-based index)\n@todo document\n*/\nCV_EXPORTS_W void insertChannel(InputArray src, InputOutputArray dst, int coi);\n\n/** @brief Flips a 2D array around vertical, horizontal, or both axes.\n\nThe function flip flips the array in one of three different ways (row\nand column indices are 0-based):\n\\f[\\texttt{dst} _{ij} =\n\\left\\{\n\\begin{array}{l l}\n\\texttt{src} _{\\texttt{src.rows}-i-1,j} & if\\;  \\texttt{flipCode} = 0 \\\\\n\\texttt{src} _{i, \\texttt{src.cols} -j-1} & if\\;  \\texttt{flipCode} > 0 \\\\\n\\texttt{src} _{ \\texttt{src.rows} -i-1, \\texttt{src.cols} -j-1} & if\\; \\texttt{flipCode} < 0 \\\\\n\\end{array}\n\\right.\\f]\nThe example scenarios of using the function are the following:\n*   Vertical flipping of the image (flipCode == 0) to switch between\n    top-left and bottom-left image origin. This is a typical operation\n    in video processing on Microsoft Windows\\* OS.\n*   Horizontal flipping of the image with the subsequent horizontal\n    shift and absolute difference calculation to check for a\n    vertical-axis symmetry (flipCode \\> 0).\n*   Simultaneous horizontal and vertical flipping of the image with\n    the subsequent shift and absolute difference calculation to check\n    for a central symmetry (flipCode \\< 0).\n*   Reversing the order of point arrays (flipCode \\> 0 or\n    flipCode == 0).\n@param src input array.\n@param dst output array of the same size and type as src.\n@param flipCode a flag to specify how to flip the array; 0 means\nflipping around the x-axis and positive value (for example, 1) means\nflipping around y-axis. Negative value (for example, -1) means flipping\naround both axes.\n@sa transpose , repeat , completeSymm\n*/\nCV_EXPORTS_W void flip(InputArray src, OutputArray dst, int flipCode);\n\n/** @brief Fills the output array with repeated copies of the input array.\n\nThe functions repeat duplicate the input array one or more times along each of the two axes:\n\\f[\\texttt{dst} _{ij}= \\texttt{src} _{i\\mod src.rows, \\; j\\mod src.cols }\\f]\nThe second variant of the function is more convenient to use with @ref MatrixExpressions.\n@param src input array to replicate.\n@param dst output array of the same type as src.\n@param ny Flag to specify how many times the src is repeated along the\nvertical axis.\n@param nx Flag to specify how many times the src is repeated along the\nhorizontal axis.\n@sa reduce\n*/\nCV_EXPORTS_W void repeat(InputArray src, int ny, int nx, OutputArray dst);\n\n/** @overload\n@param src input array to replicate.\n@param ny Flag to specify how many times the src is repeated along the\nvertical axis.\n@param nx Flag to specify how many times the src is repeated along the\nhorizontal axis.\n  */\nCV_EXPORTS Mat repeat(const Mat& src, int ny, int nx);\n\n/** @brief Applies horizontal concatenation to given matrices.\n\nThe function horizontally concatenates two or more cv::Mat matrices (with the same number of rows).\n@code{.cpp}\n    cv::Mat matArray[] = { cv::Mat(4, 1, CV_8UC1, cv::Scalar(1)),\n                           cv::Mat(4, 1, CV_8UC1, cv::Scalar(2)),\n                           cv::Mat(4, 1, CV_8UC1, cv::Scalar(3)),};\n\n    cv::Mat out;\n    cv::hconcat( matArray, 3, out );\n    //out:\n    //[1, 2, 3;\n    // 1, 2, 3;\n    // 1, 2, 3;\n    // 1, 2, 3]\n@endcode\n@param src input array or vector of matrices. all of the matrices must have the same number of rows and the same depth.\n@param nsrc number of matrices in src.\n@param dst output array. It has the same number of rows and depth as the src, and the sum of cols of the src.\n@sa cv::vconcat(const Mat*, size_t, OutputArray), @sa cv::vconcat(InputArrayOfArrays, OutputArray) and @sa cv::vconcat(InputArray, InputArray, OutputArray)\n*/\nCV_EXPORTS void hconcat(const Mat* src, size_t nsrc, OutputArray dst);\n/** @overload\n @code{.cpp}\n    cv::Mat_<float> A = (cv::Mat_<float>(3, 2) << 1, 4,\n                                                  2, 5,\n                                                  3, 6);\n    cv::Mat_<float> B = (cv::Mat_<float>(3, 2) << 7, 10,\n                                                  8, 11,\n                                                  9, 12);\n\n    cv::Mat C;\n    cv::hconcat(A, B, C);\n    //C:\n    //[1, 4, 7, 10;\n    // 2, 5, 8, 11;\n    // 3, 6, 9, 12]\n @endcode\n @param src1 first input array to be considered for horizontal concatenation.\n @param src2 second input array to be considered for horizontal concatenation.\n @param dst output array. It has the same number of rows and depth as the src1 and src2, and the sum of cols of the src1 and src2.\n */\nCV_EXPORTS void hconcat(InputArray src1, InputArray src2, OutputArray dst);\n/** @overload\n @code{.cpp}\n    std::vector<cv::Mat> matrices = { cv::Mat(4, 1, CV_8UC1, cv::Scalar(1)),\n                                      cv::Mat(4, 1, CV_8UC1, cv::Scalar(2)),\n                                      cv::Mat(4, 1, CV_8UC1, cv::Scalar(3)),};\n\n    cv::Mat out;\n    cv::hconcat( matrices, out );\n    //out:\n    //[1, 2, 3;\n    // 1, 2, 3;\n    // 1, 2, 3;\n    // 1, 2, 3]\n @endcode\n @param src input array or vector of matrices. all of the matrices must have the same number of rows and the same depth.\n @param dst output array. It has the same number of rows and depth as the src, and the sum of cols of the src.\nsame depth.\n */\nCV_EXPORTS_W void hconcat(InputArrayOfArrays src, OutputArray dst);\n\n/** @brief Applies vertical concatenation to given matrices.\n\nThe function vertically concatenates two or more cv::Mat matrices (with the same number of cols).\n@code{.cpp}\n    cv::Mat matArray[] = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)),\n                           cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)),\n                           cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),};\n\n    cv::Mat out;\n    cv::vconcat( matArray, 3, out );\n    //out:\n    //[1,   1,   1,   1;\n    // 2,   2,   2,   2;\n    // 3,   3,   3,   3]\n@endcode\n@param src input array or vector of matrices. all of the matrices must have the same number of cols and the same depth.\n@param nsrc number of matrices in src.\n@param dst output array. It has the same number of cols and depth as the src, and the sum of rows of the src.\n@sa cv::hconcat(const Mat*, size_t, OutputArray), @sa cv::hconcat(InputArrayOfArrays, OutputArray) and @sa cv::hconcat(InputArray, InputArray, OutputArray)\n*/\nCV_EXPORTS void vconcat(const Mat* src, size_t nsrc, OutputArray dst);\n/** @overload\n @code{.cpp}\n    cv::Mat_<float> A = (cv::Mat_<float>(3, 2) << 1, 7,\n                                                  2, 8,\n                                                  3, 9);\n    cv::Mat_<float> B = (cv::Mat_<float>(3, 2) << 4, 10,\n                                                  5, 11,\n                                                  6, 12);\n\n    cv::Mat C;\n    cv::vconcat(A, B, C);\n    //C:\n    //[1, 7;\n    // 2, 8;\n    // 3, 9;\n    // 4, 10;\n    // 5, 11;\n    // 6, 12]\n @endcode\n @param src1 first input array to be considered for vertical concatenation.\n @param src2 second input array to be considered for vertical concatenation.\n @param dst output array. It has the same number of cols and depth as the src1 and src2, and the sum of rows of the src1 and src2.\n */\nCV_EXPORTS void vconcat(InputArray src1, InputArray src2, OutputArray dst);\n/** @overload\n @code{.cpp}\n    std::vector<cv::Mat> matrices = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)),\n                                      cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)),\n                                      cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),};\n\n    cv::Mat out;\n    cv::vconcat( matrices, out );\n    //out:\n    //[1,   1,   1,   1;\n    // 2,   2,   2,   2;\n    // 3,   3,   3,   3]\n @endcode\n @param src input array or vector of matrices. all of the matrices must have the same number of cols and the same depth\n @param dst output array. It has the same number of cols and depth as the src, and the sum of rows of the src.\nsame depth.\n */\nCV_EXPORTS_W void vconcat(InputArrayOfArrays src, OutputArray dst);\n\n/** @brief computes bitwise conjunction of the two arrays (dst = src1 & src2)\nCalculates the per-element bit-wise conjunction of two arrays or an\narray and a scalar.\n\nThe function calculates the per-element bit-wise logical conjunction for:\n*   Two arrays when src1 and src2 have the same size:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1} (I)  \\wedge \\texttt{src2} (I) \\quad \\texttt{if mask} (I) \\ne0\\f]\n*   An array and a scalar when src2 is constructed from Scalar or has\n    the same number of elements as `src1.channels()`:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1} (I)  \\wedge \\texttt{src2} \\quad \\texttt{if mask} (I) \\ne0\\f]\n*   A scalar and an array when src1 is constructed from Scalar or has\n    the same number of elements as `src2.channels()`:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1}  \\wedge \\texttt{src2} (I) \\quad \\texttt{if mask} (I) \\ne0\\f]\nIn case of floating-point arrays, their machine-specific bit\nrepresentations (usually IEEE754-compliant) are used for the operation.\nIn case of multi-channel arrays, each channel is processed\nindependently. In the second and third cases above, the scalar is first\nconverted to the array type.\n@param src1 first input array or a scalar.\n@param src2 second input array or a scalar.\n@param dst output array that has the same size and type as the input\narrays.\n@param mask optional operation mask, 8-bit single channel array, that\nspecifies elements of the output array to be changed.\n*/\nCV_EXPORTS_W void bitwise_and(InputArray src1, InputArray src2,\n                              OutputArray dst, InputArray mask = noArray());\n\n/** @brief Calculates the per-element bit-wise disjunction of two arrays or an\narray and a scalar.\n\nThe function calculates the per-element bit-wise logical disjunction for:\n*   Two arrays when src1 and src2 have the same size:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1} (I)  \\vee \\texttt{src2} (I) \\quad \\texttt{if mask} (I) \\ne0\\f]\n*   An array and a scalar when src2 is constructed from Scalar or has\n    the same number of elements as `src1.channels()`:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1} (I)  \\vee \\texttt{src2} \\quad \\texttt{if mask} (I) \\ne0\\f]\n*   A scalar and an array when src1 is constructed from Scalar or has\n    the same number of elements as `src2.channels()`:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1}  \\vee \\texttt{src2} (I) \\quad \\texttt{if mask} (I) \\ne0\\f]\nIn case of floating-point arrays, their machine-specific bit\nrepresentations (usually IEEE754-compliant) are used for the operation.\nIn case of multi-channel arrays, each channel is processed\nindependently. In the second and third cases above, the scalar is first\nconverted to the array type.\n@param src1 first input array or a scalar.\n@param src2 second input array or a scalar.\n@param dst output array that has the same size and type as the input\narrays.\n@param mask optional operation mask, 8-bit single channel array, that\nspecifies elements of the output array to be changed.\n*/\nCV_EXPORTS_W void bitwise_or(InputArray src1, InputArray src2,\n                             OutputArray dst, InputArray mask = noArray());\n\n/** @brief Calculates the per-element bit-wise \"exclusive or\" operation on two\narrays or an array and a scalar.\n\nThe function calculates the per-element bit-wise logical \"exclusive-or\"\noperation for:\n*   Two arrays when src1 and src2 have the same size:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1} (I)  \\oplus \\texttt{src2} (I) \\quad \\texttt{if mask} (I) \\ne0\\f]\n*   An array and a scalar when src2 is constructed from Scalar or has\n    the same number of elements as `src1.channels()`:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1} (I)  \\oplus \\texttt{src2} \\quad \\texttt{if mask} (I) \\ne0\\f]\n*   A scalar and an array when src1 is constructed from Scalar or has\n    the same number of elements as `src2.channels()`:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1}  \\oplus \\texttt{src2} (I) \\quad \\texttt{if mask} (I) \\ne0\\f]\nIn case of floating-point arrays, their machine-specific bit\nrepresentations (usually IEEE754-compliant) are used for the operation.\nIn case of multi-channel arrays, each channel is processed\nindependently. In the 2nd and 3rd cases above, the scalar is first\nconverted to the array type.\n@param src1 first input array or a scalar.\n@param src2 second input array or a scalar.\n@param dst output array that has the same size and type as the input\narrays.\n@param mask optional operation mask, 8-bit single channel array, that\nspecifies elements of the output array to be changed.\n*/\nCV_EXPORTS_W void bitwise_xor(InputArray src1, InputArray src2,\n                              OutputArray dst, InputArray mask = noArray());\n\n/** @brief  Inverts every bit of an array.\n\nThe function calculates per-element bit-wise inversion of the input\narray:\n\\f[\\texttt{dst} (I) =  \\neg \\texttt{src} (I)\\f]\nIn case of a floating-point input array, its machine-specific bit\nrepresentation (usually IEEE754-compliant) is used for the operation. In\ncase of multi-channel arrays, each channel is processed independently.\n@param src input array.\n@param dst output array that has the same size and type as the input\narray.\n@param mask optional operation mask, 8-bit single channel array, that\nspecifies elements of the output array to be changed.\n*/\nCV_EXPORTS_W void bitwise_not(InputArray src, OutputArray dst,\n                              InputArray mask = noArray());\n\n/** @brief Calculates the per-element absolute difference between two arrays or between an array and a scalar.\n\nThe function absdiff calculates:\n*   Absolute difference between two arrays when they have the same\n    size and type:\n    \\f[\\texttt{dst}(I) =  \\texttt{saturate} (| \\texttt{src1}(I) -  \\texttt{src2}(I)|)\\f]\n*   Absolute difference between an array and a scalar when the second\n    array is constructed from Scalar or has as many elements as the\n    number of channels in `src1`:\n    \\f[\\texttt{dst}(I) =  \\texttt{saturate} (| \\texttt{src1}(I) -  \\texttt{src2} |)\\f]\n*   Absolute difference between a scalar and an array when the first\n    array is constructed from Scalar or has as many elements as the\n    number of channels in `src2`:\n    \\f[\\texttt{dst}(I) =  \\texttt{saturate} (| \\texttt{src1} -  \\texttt{src2}(I) |)\\f]\n    where I is a multi-dimensional index of array elements. In case of\n    multi-channel arrays, each channel is processed independently.\n@note Saturation is not applied when the arrays have the depth CV_32S.\nYou may even get a negative value in the case of overflow.\n@param src1 first input array or a scalar.\n@param src2 second input array or a scalar.\n@param dst output array that has the same size and type as input arrays.\n@sa cv::abs(const Mat&)\n*/\nCV_EXPORTS_W void absdiff(InputArray src1, InputArray src2, OutputArray dst);\n\n/** @brief  Checks if array elements lie between the elements of two other arrays.\n\nThe function checks the range as follows:\n-   For every element of a single-channel input array:\n    \\f[\\texttt{dst} (I)= \\texttt{lowerb} (I)_0  \\leq \\texttt{src} (I)_0 \\leq  \\texttt{upperb} (I)_0\\f]\n-   For two-channel arrays:\n    \\f[\\texttt{dst} (I)= \\texttt{lowerb} (I)_0  \\leq \\texttt{src} (I)_0 \\leq  \\texttt{upperb} (I)_0  \\land \\texttt{lowerb} (I)_1  \\leq \\texttt{src} (I)_1 \\leq  \\texttt{upperb} (I)_1\\f]\n-   and so forth.\n\nThat is, dst (I) is set to 255 (all 1 -bits) if src (I) is within the\nspecified 1D, 2D, 3D, ... box and 0 otherwise.\n\nWhen the lower and/or upper boundary parameters are scalars, the indexes\n(I) at lowerb and upperb in the above formulas should be omitted.\n@param src first input array.\n@param lowerb inclusive lower boundary array or a scalar.\n@param upperb inclusive upper boundary array or a scalar.\n@param dst output array of the same size as src and CV_8U type.\n*/\nCV_EXPORTS_W void inRange(InputArray src, InputArray lowerb,\n                          InputArray upperb, OutputArray dst);\n\n/** @brief Performs the per-element comparison of two arrays or an array and scalar value.\n\nThe function compares:\n*   Elements of two arrays when src1 and src2 have the same size:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1} (I)  \\,\\texttt{cmpop}\\, \\texttt{src2} (I)\\f]\n*   Elements of src1 with a scalar src2 when src2 is constructed from\n    Scalar or has a single element:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1}(I) \\,\\texttt{cmpop}\\,  \\texttt{src2}\\f]\n*   src1 with elements of src2 when src1 is constructed from Scalar or\n    has a single element:\n    \\f[\\texttt{dst} (I) =  \\texttt{src1}  \\,\\texttt{cmpop}\\, \\texttt{src2} (I)\\f]\nWhen the comparison result is true, the corresponding element of output\narray is set to 255. The comparison operations can be replaced with the\nequivalent matrix expressions:\n@code{.cpp}\n    Mat dst1 = src1 >= src2;\n    Mat dst2 = src1 < 8;\n    ...\n@endcode\n@param src1 first input array or a scalar; when it is an array, it must have a single channel.\n@param src2 second input array or a scalar; when it is an array, it must have a single channel.\n@param dst output array of type ref CV_8U that has the same size and the same number of channels as\n    the input arrays.\n@param cmpop a flag, that specifies correspondence between the arrays (cv::CmpTypes)\n@sa checkRange, min, max, threshold\n*/\nCV_EXPORTS_W void compare(InputArray src1, InputArray src2, OutputArray dst, int cmpop);\n\n/** @brief Calculates per-element minimum of two arrays or an array and a scalar.\n\nThe functions min calculate the per-element minimum of two arrays:\n\\f[\\texttt{dst} (I)= \\min ( \\texttt{src1} (I), \\texttt{src2} (I))\\f]\nor array and a scalar:\n\\f[\\texttt{dst} (I)= \\min ( \\texttt{src1} (I), \\texttt{value} )\\f]\n@param src1 first input array.\n@param src2 second input array of the same size and type as src1.\n@param dst output array of the same size and type as src1.\n@sa max, compare, inRange, minMaxLoc\n*/\nCV_EXPORTS_W void min(InputArray src1, InputArray src2, OutputArray dst);\n/** @overload\nneeded to avoid conflicts with const _Tp& std::min(const _Tp&, const _Tp&, _Compare)\n*/\nCV_EXPORTS void min(const Mat& src1, const Mat& src2, Mat& dst);\n/** @overload\nneeded to avoid conflicts with const _Tp& std::min(const _Tp&, const _Tp&, _Compare)\n*/\nCV_EXPORTS void min(const UMat& src1, const UMat& src2, UMat& dst);\n\n/** @brief Calculates per-element maximum of two arrays or an array and a scalar.\n\nThe functions max calculate the per-element maximum of two arrays:\n\\f[\\texttt{dst} (I)= \\max ( \\texttt{src1} (I), \\texttt{src2} (I))\\f]\nor array and a scalar:\n\\f[\\texttt{dst} (I)= \\max ( \\texttt{src1} (I), \\texttt{value} )\\f]\n@param src1 first input array.\n@param src2 second input array of the same size and type as src1 .\n@param dst output array of the same size and type as src1.\n@sa  min, compare, inRange, minMaxLoc, @ref MatrixExpressions\n*/\nCV_EXPORTS_W void max(InputArray src1, InputArray src2, OutputArray dst);\n/** @overload\nneeded to avoid conflicts with const _Tp& std::min(const _Tp&, const _Tp&, _Compare)\n*/\nCV_EXPORTS void max(const Mat& src1, const Mat& src2, Mat& dst);\n/** @overload\nneeded to avoid conflicts with const _Tp& std::min(const _Tp&, const _Tp&, _Compare)\n*/\nCV_EXPORTS void max(const UMat& src1, const UMat& src2, UMat& dst);\n\n/** @brief Calculates a square root of array elements.\n\nThe functions sqrt calculate a square root of each input array element.\nIn case of multi-channel arrays, each channel is processed\nindependently. The accuracy is approximately the same as of the built-in\nstd::sqrt .\n@param src input floating-point array.\n@param dst output array of the same size and type as src.\n*/\nCV_EXPORTS_W void sqrt(InputArray src, OutputArray dst);\n\n/** @brief Raises every array element to a power.\n\nThe function pow raises every element of the input array to power :\n\\f[\\texttt{dst} (I) =  \\fork{\\texttt{src}(I)^power}{if \\texttt{power} is integer}{|\\texttt{src}(I)|^power}{otherwise}\\f]\n\nSo, for a non-integer power exponent, the absolute values of input array\nelements are used. However, it is possible to get true values for\nnegative values using some extra operations. In the example below,\ncomputing the 5th root of array src shows:\n@code{.cpp}\n    Mat mask = src < 0;\n    pow(src, 1./5, dst);\n    subtract(Scalar::all(0), dst, dst, mask);\n@endcode\nFor some values of power, such as integer values, 0.5 and -0.5,\nspecialized faster algorithms are used.\n\nSpecial values (NaN, Inf) are not handled.\n@param src input array.\n@param power exponent of power.\n@param dst output array of the same size and type as src.\n@sa sqrt, exp, log, cartToPolar, polarToCart\n*/\nCV_EXPORTS_W void pow(InputArray src, double power, OutputArray dst);\n\n/** @brief Calculates the exponent of every array element.\n\nThe function exp calculates the exponent of every element of the input\narray:\n\\f[\\texttt{dst} [I] = e^{ src(I) }\\f]\n\nThe maximum relative error is about 7e-6 for single-precision input and\nless than 1e-10 for double-precision input. Currently, the function\nconverts denormalized values to zeros on output. Special values (NaN,\nInf) are not handled.\n@param src input array.\n@param dst output array of the same size and type as src.\n@sa log , cartToPolar , polarToCart , phase , pow , sqrt , magnitude\n*/\nCV_EXPORTS_W void exp(InputArray src, OutputArray dst);\n\n/** @brief Calculates the natural logarithm of every array element.\n\nThe function log calculates the natural logarithm of the absolute value\nof every element of the input array:\n\\f[\\texttt{dst} (I) =  \\fork{\\log |\\texttt{src}(I)|}{if \\(\\texttt{src}(I) \\ne 0\\) }{\\texttt{C}}{otherwise}\\f]\n\nwhere C is a large negative number (about -700 in the current\nimplementation). The maximum relative error is about 7e-6 for\nsingle-precision input and less than 1e-10 for double-precision input.\nSpecial values (NaN, Inf) are not handled.\n@param src input array.\n@param dst output array of the same size and type as src .\n@sa exp, cartToPolar, polarToCart, phase, pow, sqrt, magnitude\n*/\nCV_EXPORTS_W void log(InputArray src, OutputArray dst);\n\n/** @brief Calculates x and y coordinates of 2D vectors from their magnitude and angle.\n\nThe function polarToCart calculates the Cartesian coordinates of each 2D\nvector represented by the corresponding elements of magnitude and angle:\n\\f[\\begin{array}{l} \\texttt{x} (I) =  \\texttt{magnitude} (I) \\cos ( \\texttt{angle} (I)) \\\\ \\texttt{y} (I) =  \\texttt{magnitude} (I) \\sin ( \\texttt{angle} (I)) \\\\ \\end{array}\\f]\n\nThe relative accuracy of the estimated coordinates is about 1e-6.\n@param magnitude input floating-point array of magnitudes of 2D vectors;\nit can be an empty matrix (=Mat()), in this case, the function assumes\nthat all the magnitudes are =1; if it is not empty, it must have the\nsame size and type as angle.\n@param angle input floating-point array of angles of 2D vectors.\n@param x output array of x-coordinates of 2D vectors; it has the same\nsize and type as angle.\n@param y output array of y-coordinates of 2D vectors; it has the same\nsize and type as angle.\n@param angleInDegrees when true, the input angles are measured in\ndegrees, otherwise, they are measured in radians.\n@sa cartToPolar, magnitude, phase, exp, log, pow, sqrt\n*/\nCV_EXPORTS_W void polarToCart(InputArray magnitude, InputArray angle,\n                              OutputArray x, OutputArray y, bool angleInDegrees = false);\n\n/** @brief Calculates the magnitude and angle of 2D vectors.\n\nThe function cartToPolar calculates either the magnitude, angle, or both\nfor every 2D vector (x(I),y(I)):\n\\f[\\begin{array}{l} \\texttt{magnitude} (I)= \\sqrt{\\texttt{x}(I)^2+\\texttt{y}(I)^2} , \\\\ \\texttt{angle} (I)= \\texttt{atan2} ( \\texttt{y} (I), \\texttt{x} (I))[ \\cdot180 / \\pi ] \\end{array}\\f]\n\nThe angles are calculated with accuracy about 0.3 degrees. For the point\n(0,0), the angle is set to 0.\n@param x array of x-coordinates; this must be a single-precision or\ndouble-precision floating-point array.\n@param y array of y-coordinates, that must have the same size and same type as x.\n@param magnitude output array of magnitudes of the same size and type as x.\n@param angle output array of angles that has the same size and type as\nx; the angles are measured in radians (from 0 to 2\\*Pi) or in degrees (0 to 360 degrees).\n@param angleInDegrees a flag, indicating whether the angles are measured\nin radians (which is by default), or in degrees.\n@sa Sobel, Scharr\n*/\nCV_EXPORTS_W void cartToPolar(InputArray x, InputArray y,\n                              OutputArray magnitude, OutputArray angle,\n                              bool angleInDegrees = false);\n\n/** @brief Calculates the rotation angle of 2D vectors.\n\nThe function phase calculates the rotation angle of each 2D vector that\nis formed from the corresponding elements of x and y :\n\\f[\\texttt{angle} (I) =  \\texttt{atan2} ( \\texttt{y} (I), \\texttt{x} (I))\\f]\n\nThe angle estimation accuracy is about 0.3 degrees. When x(I)=y(I)=0 ,\nthe corresponding angle(I) is set to 0.\n@param x input floating-point array of x-coordinates of 2D vectors.\n@param y input array of y-coordinates of 2D vectors; it must have the\nsame size and the same type as x.\n@param angle output array of vector angles; it has the same size and\nsame type as x .\n@param angleInDegrees when true, the function calculates the angle in\ndegrees, otherwise, they are measured in radians.\n*/\nCV_EXPORTS_W void phase(InputArray x, InputArray y, OutputArray angle,\n                        bool angleInDegrees = false);\n\n/** @brief Calculates the magnitude of 2D vectors.\n\nThe function magnitude calculates the magnitude of 2D vectors formed\nfrom the corresponding elements of x and y arrays:\n\\f[\\texttt{dst} (I) =  \\sqrt{\\texttt{x}(I)^2 + \\texttt{y}(I)^2}\\f]\n@param x floating-point array of x-coordinates of the vectors.\n@param y floating-point array of y-coordinates of the vectors; it must\nhave the same size as x.\n@param magnitude output array of the same size and type as x.\n@sa cartToPolar, polarToCart, phase, sqrt\n*/\nCV_EXPORTS_W void magnitude(InputArray x, InputArray y, OutputArray magnitude);\n\n/** @brief Checks every element of an input array for invalid values.\n\nThe functions checkRange check that every array element is neither NaN nor infinite. When minVal \\<\n-DBL_MAX and maxVal \\< DBL_MAX, the functions also check that each value is between minVal and\nmaxVal. In case of multi-channel arrays, each channel is processed independently. If some values\nare out of range, position of the first outlier is stored in pos (when pos != NULL). Then, the\nfunctions either return false (when quiet=true) or throw an exception.\n@param a input array.\n@param quiet a flag, indicating whether the functions quietly return false when the array elements\nare out of range or they throw an exception.\n@param pos optional output parameter, when not NULL, must be a pointer to array of src.dims\nelements.\n@param minVal inclusive lower boundary of valid values range.\n@param maxVal exclusive upper boundary of valid values range.\n*/\nCV_EXPORTS_W bool checkRange(InputArray a, bool quiet = true, CV_OUT Point* pos = 0,\n                            double minVal = -DBL_MAX, double maxVal = DBL_MAX);\n\n/** @brief converts NaN's to the given number\n*/\nCV_EXPORTS_W void patchNaNs(InputOutputArray a, double val = 0);\n\n/** @brief Performs generalized matrix multiplication.\n\nThe function performs generalized matrix multiplication similar to the\ngemm functions in BLAS level 3. For example,\n`gemm(src1, src2, alpha, src3, beta, dst, GEMM_1_T + GEMM_3_T)`\ncorresponds to\n\\f[\\texttt{dst} =  \\texttt{alpha} \\cdot \\texttt{src1} ^T  \\cdot \\texttt{src2} +  \\texttt{beta} \\cdot \\texttt{src3} ^T\\f]\n\nIn case of complex (two-channel) data, performed a complex matrix\nmultiplication.\n\nThe function can be replaced with a matrix expression. For example, the\nabove call can be replaced with:\n@code{.cpp}\n    dst = alpha*src1.t()*src2 + beta*src3.t();\n@endcode\n@param src1 first multiplied input matrix that could be real(CV_32FC1,\nCV_64FC1) or complex(CV_32FC2, CV_64FC2).\n@param src2 second multiplied input matrix of the same type as src1.\n@param alpha weight of the matrix product.\n@param src3 third optional delta matrix added to the matrix product; it\nshould have the same type as src1 and src2.\n@param beta weight of src3.\n@param dst output matrix; it has the proper size and the same type as\ninput matrices.\n@param flags operation flags (cv::GemmFlags)\n@sa mulTransposed , transform\n*/\nCV_EXPORTS_W void gemm(InputArray src1, InputArray src2, double alpha,\n                       InputArray src3, double beta, OutputArray dst, int flags = 0);\n\n/** @brief Calculates the product of a matrix and its transposition.\n\nThe function mulTransposed calculates the product of src and its\ntransposition:\n\\f[\\texttt{dst} = \\texttt{scale} ( \\texttt{src} - \\texttt{delta} )^T ( \\texttt{src} - \\texttt{delta} )\\f]\nif aTa=true , and\n\\f[\\texttt{dst} = \\texttt{scale} ( \\texttt{src} - \\texttt{delta} ) ( \\texttt{src} - \\texttt{delta} )^T\\f]\notherwise. The function is used to calculate the covariance matrix. With\nzero delta, it can be used as a faster substitute for general matrix\nproduct A\\*B when B=A'\n@param src input single-channel matrix. Note that unlike gemm, the\nfunction can multiply not only floating-point matrices.\n@param dst output square matrix.\n@param aTa Flag specifying the multiplication ordering. See the\ndescription below.\n@param delta Optional delta matrix subtracted from src before the\nmultiplication. When the matrix is empty ( delta=noArray() ), it is\nassumed to be zero, that is, nothing is subtracted. If it has the same\nsize as src , it is simply subtracted. Otherwise, it is \"repeated\" (see\nrepeat ) to cover the full src and then subtracted. Type of the delta\nmatrix, when it is not empty, must be the same as the type of created\noutput matrix. See the dtype parameter description below.\n@param scale Optional scale factor for the matrix product.\n@param dtype Optional type of the output matrix. When it is negative,\nthe output matrix will have the same type as src . Otherwise, it will be\ntype=CV_MAT_DEPTH(dtype) that should be either CV_32F or CV_64F .\n@sa calcCovarMatrix, gemm, repeat, reduce\n*/\nCV_EXPORTS_W void mulTransposed( InputArray src, OutputArray dst, bool aTa,\n                                 InputArray delta = noArray(),\n                                 double scale = 1, int dtype = -1 );\n\n/** @brief Transposes a matrix.\n\nThe function transpose transposes the matrix src :\n\\f[\\texttt{dst} (i,j) =  \\texttt{src} (j,i)\\f]\n@note No complex conjugation is done in case of a complex matrix. It it\nshould be done separately if needed.\n@param src input array.\n@param dst output array of the same type as src.\n*/\nCV_EXPORTS_W void transpose(InputArray src, OutputArray dst);\n\n/** @brief Performs the matrix transformation of every array element.\n\nThe function transform performs the matrix transformation of every\nelement of the array src and stores the results in dst :\n\\f[\\texttt{dst} (I) =  \\texttt{m} \\cdot \\texttt{src} (I)\\f]\n(when m.cols=src.channels() ), or\n\\f[\\texttt{dst} (I) =  \\texttt{m} \\cdot [ \\texttt{src} (I); 1]\\f]\n(when m.cols=src.channels()+1 )\n\nEvery element of the N -channel array src is interpreted as N -element\nvector that is transformed using the M x N or M x (N+1) matrix m to\nM-element vector - the corresponding element of the output array dst .\n\nThe function may be used for geometrical transformation of\nN -dimensional points, arbitrary linear color space transformation (such\nas various kinds of RGB to YUV transforms), shuffling the image\nchannels, and so forth.\n@param src input array that must have as many channels (1 to 4) as\nm.cols or m.cols-1.\n@param dst output array of the same size and depth as src; it has as\nmany channels as m.rows.\n@param m transformation 2x2 or 2x3 floating-point matrix.\n@sa perspectiveTransform, getAffineTransform, estimateRigidTransform, warpAffine, warpPerspective\n*/\nCV_EXPORTS_W void transform(InputArray src, OutputArray dst, InputArray m );\n\n/** @brief Performs the perspective matrix transformation of vectors.\n\nThe function perspectiveTransform transforms every element of src by\ntreating it as a 2D or 3D vector, in the following way:\n\\f[(x, y, z)  \\rightarrow (x'/w, y'/w, z'/w)\\f]\nwhere\n\\f[(x', y', z', w') =  \\texttt{mat} \\cdot \\begin{bmatrix} x & y & z & 1  \\end{bmatrix}\\f]\nand\n\\f[w =  \\fork{w'}{if \\(w' \\ne 0\\)}{\\infty}{otherwise}\\f]\n\nHere a 3D vector transformation is shown. In case of a 2D vector\ntransformation, the z component is omitted.\n\n@note The function transforms a sparse set of 2D or 3D vectors. If you\nwant to transform an image using perspective transformation, use\nwarpPerspective . If you have an inverse problem, that is, you want to\ncompute the most probable perspective transformation out of several\npairs of corresponding points, you can use getPerspectiveTransform or\nfindHomography .\n@param src input two-channel or three-channel floating-point array; each\nelement is a 2D/3D vector to be transformed.\n@param dst output array of the same size and type as src.\n@param m 3x3 or 4x4 floating-point transformation matrix.\n@sa  transform, warpPerspective, getPerspectiveTransform, findHomography\n*/\nCV_EXPORTS_W void perspectiveTransform(InputArray src, OutputArray dst, InputArray m );\n\n/** @brief Copies the lower or the upper half of a square matrix to another half.\n\nThe function completeSymm copies the lower half of a square matrix to\nits another half. The matrix diagonal remains unchanged:\n*   \\f$\\texttt{mtx}_{ij}=\\texttt{mtx}_{ji}\\f$ for \\f$i > j\\f$ if\n    lowerToUpper=false\n*   \\f$\\texttt{mtx}_{ij}=\\texttt{mtx}_{ji}\\f$ for \\f$i < j\\f$ if\n    lowerToUpper=true\n@param mtx input-output floating-point square matrix.\n@param lowerToUpper operation flag; if true, the lower half is copied to\nthe upper half. Otherwise, the upper half is copied to the lower half.\n@sa flip, transpose\n*/\nCV_EXPORTS_W void completeSymm(InputOutputArray mtx, bool lowerToUpper = false);\n\n/** @brief Initializes a scaled identity matrix.\n\nThe function setIdentity initializes a scaled identity matrix:\n\\f[\\texttt{mtx} (i,j)= \\fork{\\texttt{value}}{ if \\(i=j\\)}{0}{otherwise}\\f]\n\nThe function can also be emulated using the matrix initializers and the\nmatrix expressions:\n@code\n    Mat A = Mat::eye(4, 3, CV_32F)*5;\n    // A will be set to [[5, 0, 0], [0, 5, 0], [0, 0, 5], [0, 0, 0]]\n@endcode\n@param mtx matrix to initialize (not necessarily square).\n@param s value to assign to diagonal elements.\n@sa Mat::zeros, Mat::ones, Mat::setTo, Mat::operator=\n*/\nCV_EXPORTS_W void setIdentity(InputOutputArray mtx, const Scalar& s = Scalar(1));\n\n/** @brief Returns the determinant of a square floating-point matrix.\n\nThe function determinant calculates and returns the determinant of the\nspecified matrix. For small matrices ( mtx.cols=mtx.rows\\<=3 ), the\ndirect method is used. For larger matrices, the function uses LU\nfactorization with partial pivoting.\n\nFor symmetric positively-determined matrices, it is also possible to use\neigen decomposition to calculate the determinant.\n@param mtx input matrix that must have CV_32FC1 or CV_64FC1 type and\nsquare size.\n@sa trace, invert, solve, eigen, @ref MatrixExpressions\n*/\nCV_EXPORTS_W double determinant(InputArray mtx);\n\n/** @brief Returns the trace of a matrix.\n\nThe function trace returns the sum of the diagonal elements of the\nmatrix mtx .\n\\f[\\mathrm{tr} ( \\texttt{mtx} ) =  \\sum _i  \\texttt{mtx} (i,i)\\f]\n@param mtx input matrix.\n*/\nCV_EXPORTS_W Scalar trace(InputArray mtx);\n\n/** @brief Finds the inverse or pseudo-inverse of a matrix.\n\nThe function invert inverts the matrix src and stores the result in dst\n. When the matrix src is singular or non-square, the function calculates\nthe pseudo-inverse matrix (the dst matrix) so that norm(src\\*dst - I) is\nminimal, where I is an identity matrix.\n\nIn case of the DECOMP_LU method, the function returns non-zero value if\nthe inverse has been successfully calculated and 0 if src is singular.\n\nIn case of the DECOMP_SVD method, the function returns the inverse\ncondition number of src (the ratio of the smallest singular value to the\nlargest singular value) and 0 if src is singular. The SVD method\ncalculates a pseudo-inverse matrix if src is singular.\n\nSimilarly to DECOMP_LU, the method DECOMP_CHOLESKY works only with\nnon-singular square matrices that should also be symmetrical and\npositively defined. In this case, the function stores the inverted\nmatrix in dst and returns non-zero. Otherwise, it returns 0.\n\n@param src input floating-point M x N matrix.\n@param dst output matrix of N x M size and the same type as src.\n@param flags inversion method (cv::DecompTypes)\n@sa solve, SVD\n*/\nCV_EXPORTS_W double invert(InputArray src, OutputArray dst, int flags = DECOMP_LU);\n\n/** @brief Solves one or more linear systems or least-squares problems.\n\nThe function solve solves a linear system or least-squares problem (the\nlatter is possible with SVD or QR methods, or by specifying the flag\nDECOMP_NORMAL ):\n\\f[\\texttt{dst} =  \\arg \\min _X \\| \\texttt{src1} \\cdot \\texttt{X} -  \\texttt{src2} \\|\\f]\n\nIf DECOMP_LU or DECOMP_CHOLESKY method is used, the function returns 1\nif src1 (or \\f$\\texttt{src1}^T\\texttt{src1}\\f$ ) is non-singular. Otherwise,\nit returns 0. In the latter case, dst is not valid. Other methods find a\npseudo-solution in case of a singular left-hand side part.\n\n@note If you want to find a unity-norm solution of an under-defined\nsingular system \\f$\\texttt{src1}\\cdot\\texttt{dst}=0\\f$ , the function solve\nwill not do the work. Use SVD::solveZ instead.\n\n@param src1 input matrix on the left-hand side of the system.\n@param src2 input matrix on the right-hand side of the system.\n@param dst output solution.\n@param flags solution (matrix inversion) method (cv::DecompTypes)\n@sa invert, SVD, eigen\n*/\nCV_EXPORTS_W bool solve(InputArray src1, InputArray src2,\n                        OutputArray dst, int flags = DECOMP_LU);\n\n/** @brief Sorts each row or each column of a matrix.\n\nThe function sort sorts each matrix row or each matrix column in\nascending or descending order. So you should pass two operation flags to\nget desired behaviour. If you want to sort matrix rows or columns\nlexicographically, you can use STL std::sort generic function with the\nproper comparison predicate.\n\n@param src input single-channel array.\n@param dst output array of the same size and type as src.\n@param flags operation flags, a combination of cv::SortFlags\n@sa sortIdx, randShuffle\n*/\nCV_EXPORTS_W void sort(InputArray src, OutputArray dst, int flags);\n\n/** @brief Sorts each row or each column of a matrix.\n\nThe function sortIdx sorts each matrix row or each matrix column in the\nascending or descending order. So you should pass two operation flags to\nget desired behaviour. Instead of reordering the elements themselves, it\nstores the indices of sorted elements in the output array. For example:\n@code\n    Mat A = Mat::eye(3,3,CV_32F), B;\n    sortIdx(A, B, SORT_EVERY_ROW + SORT_ASCENDING);\n    // B will probably contain\n    // (because of equal elements in A some permutations are possible):\n    // [[1, 2, 0], [0, 2, 1], [0, 1, 2]]\n@endcode\n@param src input single-channel array.\n@param dst output integer array of the same size as src.\n@param flags operation flags that could be a combination of cv::SortFlags\n@sa sort, randShuffle\n*/\nCV_EXPORTS_W void sortIdx(InputArray src, OutputArray dst, int flags);\n\n/** @brief Finds the real roots of a cubic equation.\n\nThe function solveCubic finds the real roots of a cubic equation:\n-   if coeffs is a 4-element vector:\n\\f[\\texttt{coeffs} [0] x^3 +  \\texttt{coeffs} [1] x^2 +  \\texttt{coeffs} [2] x +  \\texttt{coeffs} [3] = 0\\f]\n-   if coeffs is a 3-element vector:\n\\f[x^3 +  \\texttt{coeffs} [0] x^2 +  \\texttt{coeffs} [1] x +  \\texttt{coeffs} [2] = 0\\f]\n\nThe roots are stored in the roots array.\n@param coeffs equation coefficients, an array of 3 or 4 elements.\n@param roots output array of real roots that has 1 or 3 elements.\n*/\nCV_EXPORTS_W int solveCubic(InputArray coeffs, OutputArray roots);\n\n/** @brief Finds the real or complex roots of a polynomial equation.\n\nThe function solvePoly finds real and complex roots of a polynomial equation:\n\\f[\\texttt{coeffs} [n] x^{n} +  \\texttt{coeffs} [n-1] x^{n-1} + ... +  \\texttt{coeffs} [1] x +  \\texttt{coeffs} [0] = 0\\f]\n@param coeffs array of polynomial coefficients.\n@param roots output (complex) array of roots.\n@param maxIters maximum number of iterations the algorithm does.\n*/\nCV_EXPORTS_W double solvePoly(InputArray coeffs, OutputArray roots, int maxIters = 300);\n\n/** @brief Calculates eigenvalues and eigenvectors of a symmetric matrix.\n\nThe functions eigen calculate just eigenvalues, or eigenvalues and eigenvectors of the symmetric\nmatrix src:\n@code\n    src*eigenvectors.row(i).t() = eigenvalues.at<srcType>(i)*eigenvectors.row(i).t()\n@endcode\n@note in the new and the old interfaces different ordering of eigenvalues and eigenvectors\nparameters is used.\n@param src input matrix that must have CV_32FC1 or CV_64FC1 type, square size and be symmetrical\n(src ^T^ == src).\n@param eigenvalues output vector of eigenvalues of the same type as src; the eigenvalues are stored\nin the descending order.\n@param eigenvectors output matrix of eigenvectors; it has the same size and type as src; the\neigenvectors are stored as subsequent matrix rows, in the same order as the corresponding\neigenvalues.\n@sa completeSymm , PCA\n*/\nCV_EXPORTS_W bool eigen(InputArray src, OutputArray eigenvalues,\n                        OutputArray eigenvectors = noArray());\n\n/** @brief Calculates the covariance matrix of a set of vectors.\n\nThe functions calcCovarMatrix calculate the covariance matrix and, optionally, the mean vector of\nthe set of input vectors.\n@param samples samples stored as separate matrices\n@param nsamples number of samples\n@param covar output covariance matrix of the type ctype and square size.\n@param mean input or output (depending on the flags) array as the average value of the input vectors.\n@param flags operation flags as a combination of cv::CovarFlags\n@param ctype type of the matrixl; it equals 'CV_64F' by default.\n@sa PCA, mulTransposed, Mahalanobis\n@todo InputArrayOfArrays\n*/\nCV_EXPORTS void calcCovarMatrix( const Mat* samples, int nsamples, Mat& covar, Mat& mean,\n                                 int flags, int ctype = CV_64F);\n\n/** @overload\n@note use cv::COVAR_ROWS or cv::COVAR_COLS flag\n@param samples samples stored as rows/columns of a single matrix.\n@param covar output covariance matrix of the type ctype and square size.\n@param mean input or output (depending on the flags) array as the average value of the input vectors.\n@param flags operation flags as a combination of cv::CovarFlags\n@param ctype type of the matrixl; it equals 'CV_64F' by default.\n*/\nCV_EXPORTS_W void calcCovarMatrix( InputArray samples, OutputArray covar,\n                                   InputOutputArray mean, int flags, int ctype = CV_64F);\n\n/** wrap PCA::operator() */\nCV_EXPORTS_W void PCACompute(InputArray data, InputOutputArray mean,\n                             OutputArray eigenvectors, int maxComponents = 0);\n\n/** wrap PCA::operator() */\nCV_EXPORTS_W void PCACompute(InputArray data, InputOutputArray mean,\n                             OutputArray eigenvectors, double retainedVariance);\n\n/** wrap PCA::project */\nCV_EXPORTS_W void PCAProject(InputArray data, InputArray mean,\n                             InputArray eigenvectors, OutputArray result);\n\n/** wrap PCA::backProject */\nCV_EXPORTS_W void PCABackProject(InputArray data, InputArray mean,\n                                 InputArray eigenvectors, OutputArray result);\n\n/** wrap SVD::compute */\nCV_EXPORTS_W void SVDecomp( InputArray src, OutputArray w, OutputArray u, OutputArray vt, int flags = 0 );\n\n/** wrap SVD::backSubst */\nCV_EXPORTS_W void SVBackSubst( InputArray w, InputArray u, InputArray vt,\n                               InputArray rhs, OutputArray dst );\n\n/** @brief Calculates the Mahalanobis distance between two vectors.\n\nThe function Mahalanobis calculates and returns the weighted distance between two vectors:\n\\f[d( \\texttt{vec1} , \\texttt{vec2} )= \\sqrt{\\sum_{i,j}{\\texttt{icovar(i,j)}\\cdot(\\texttt{vec1}(I)-\\texttt{vec2}(I))\\cdot(\\texttt{vec1(j)}-\\texttt{vec2(j)})} }\\f]\nThe covariance matrix may be calculated using the cv::calcCovarMatrix function and then inverted using\nthe invert function (preferably using the cv::DECOMP_SVD method, as the most accurate).\n@param v1 first 1D input vector.\n@param v2 second 1D input vector.\n@param icovar inverse covariance matrix.\n*/\nCV_EXPORTS_W double Mahalanobis(InputArray v1, InputArray v2, InputArray icovar);\n\n/** @brief Performs a forward or inverse Discrete Fourier transform of a 1D or 2D floating-point array.\n\nThe function performs one of the following:\n-   Forward the Fourier transform of a 1D vector of N elements:\n    \\f[Y = F^{(N)}  \\cdot X,\\f]\n    where \\f$F^{(N)}_{jk}=\\exp(-2\\pi i j k/N)\\f$ and \\f$i=\\sqrt{-1}\\f$\n-   Inverse the Fourier transform of a 1D vector of N elements:\n    \\f[\\begin{array}{l} X'=  \\left (F^{(N)} \\right )^{-1}  \\cdot Y =  \\left (F^{(N)} \\right )^*  \\cdot y  \\\\ X = (1/N)  \\cdot X, \\end{array}\\f]\n    where \\f$F^*=\\left(\\textrm{Re}(F^{(N)})-\\textrm{Im}(F^{(N)})\\right)^T\\f$\n-   Forward the 2D Fourier transform of a M x N matrix:\n    \\f[Y = F^{(M)}  \\cdot X  \\cdot F^{(N)}\\f]\n-   Inverse the 2D Fourier transform of a M x N matrix:\n    \\f[\\begin{array}{l} X'=  \\left (F^{(M)} \\right )^*  \\cdot Y  \\cdot \\left (F^{(N)} \\right )^* \\\\ X =  \\frac{1}{M \\cdot N} \\cdot X' \\end{array}\\f]\n\nIn case of real (single-channel) data, the output spectrum of the forward Fourier transform or input\nspectrum of the inverse Fourier transform can be represented in a packed format called *CCS*\n(complex-conjugate-symmetrical). It was borrowed from IPL (Intel\\* Image Processing Library). Here\nis how 2D *CCS* spectrum looks:\n\\f[\\begin{bmatrix} Re Y_{0,0} & Re Y_{0,1} & Im Y_{0,1} & Re Y_{0,2} & Im Y_{0,2} &  \\cdots & Re Y_{0,N/2-1} & Im Y_{0,N/2-1} & Re Y_{0,N/2}  \\\\ Re Y_{1,0} & Re Y_{1,1} & Im Y_{1,1} & Re Y_{1,2} & Im Y_{1,2} &  \\cdots & Re Y_{1,N/2-1} & Im Y_{1,N/2-1} & Re Y_{1,N/2}  \\\\ Im Y_{1,0} & Re Y_{2,1} & Im Y_{2,1} & Re Y_{2,2} & Im Y_{2,2} &  \\cdots & Re Y_{2,N/2-1} & Im Y_{2,N/2-1} & Im Y_{1,N/2}  \\\\ \\hdotsfor{9} \\\\ Re Y_{M/2-1,0} &  Re Y_{M-3,1}  & Im Y_{M-3,1} &  \\hdotsfor{3} & Re Y_{M-3,N/2-1} & Im Y_{M-3,N/2-1}& Re Y_{M/2-1,N/2}  \\\\ Im Y_{M/2-1,0} &  Re Y_{M-2,1}  & Im Y_{M-2,1} &  \\hdotsfor{3} & Re Y_{M-2,N/2-1} & Im Y_{M-2,N/2-1}& Im Y_{M/2-1,N/2}  \\\\ Re Y_{M/2,0}  &  Re Y_{M-1,1} &  Im Y_{M-1,1} &  \\hdotsfor{3} & Re Y_{M-1,N/2-1} & Im Y_{M-1,N/2-1}& Re Y_{M/2,N/2} \\end{bmatrix}\\f]\n\nIn case of 1D transform of a real vector, the output looks like the first row of the matrix above.\n\nSo, the function chooses an operation mode depending on the flags and size of the input array:\n-   If DFT_ROWS is set or the input array has a single row or single column, the function\n    performs a 1D forward or inverse transform of each row of a matrix when DFT_ROWS is set.\n    Otherwise, it performs a 2D transform.\n-   If the input array is real and DFT_INVERSE is not set, the function performs a forward 1D or\n    2D transform:\n    -   When DFT_COMPLEX_OUTPUT is set, the output is a complex matrix of the same size as\n        input.\n    -   When DFT_COMPLEX_OUTPUT is not set, the output is a real matrix of the same size as\n        input. In case of 2D transform, it uses the packed format as shown above. In case of a\n        single 1D transform, it looks like the first row of the matrix above. In case of\n        multiple 1D transforms (when using the DFT_ROWS flag), each row of the output matrix\n        looks like the first row of the matrix above.\n-   If the input array is complex and either DFT_INVERSE or DFT_REAL_OUTPUT are not set, the\n    output is a complex array of the same size as input. The function performs a forward or\n    inverse 1D or 2D transform of the whole input array or each row of the input array\n    independently, depending on the flags DFT_INVERSE and DFT_ROWS.\n-   When DFT_INVERSE is set and the input array is real, or it is complex but DFT_REAL_OUTPUT\n    is set, the output is a real array of the same size as input. The function performs a 1D or 2D\n    inverse transformation of the whole input array or each individual row, depending on the flags\n    DFT_INVERSE and DFT_ROWS.\n\nIf DFT_SCALE is set, the scaling is done after the transformation.\n\nUnlike dct , the function supports arrays of arbitrary size. But only those arrays are processed\nefficiently, whose sizes can be factorized in a product of small prime numbers (2, 3, and 5 in the\ncurrent implementation). Such an efficient DFT size can be calculated using the getOptimalDFTSize\nmethod.\n\nThe sample below illustrates how to calculate a DFT-based convolution of two 2D real arrays:\n@code\n    void convolveDFT(InputArray A, InputArray B, OutputArray C)\n    {\n        // reallocate the output array if needed\n        C.create(abs(A.rows - B.rows)+1, abs(A.cols - B.cols)+1, A.type());\n        Size dftSize;\n        // calculate the size of DFT transform\n        dftSize.width = getOptimalDFTSize(A.cols + B.cols - 1);\n        dftSize.height = getOptimalDFTSize(A.rows + B.rows - 1);\n\n        // allocate temporary buffers and initialize them with 0's\n        Mat tempA(dftSize, A.type(), Scalar::all(0));\n        Mat tempB(dftSize, B.type(), Scalar::all(0));\n\n        // copy A and B to the top-left corners of tempA and tempB, respectively\n        Mat roiA(tempA, Rect(0,0,A.cols,A.rows));\n        A.copyTo(roiA);\n        Mat roiB(tempB, Rect(0,0,B.cols,B.rows));\n        B.copyTo(roiB);\n\n        // now transform the padded A & B in-place;\n        // use \"nonzeroRows\" hint for faster processing\n        dft(tempA, tempA, 0, A.rows);\n        dft(tempB, tempB, 0, B.rows);\n\n        // multiply the spectrums;\n        // the function handles packed spectrum representations well\n        mulSpectrums(tempA, tempB, tempA);\n\n        // transform the product back from the frequency domain.\n        // Even though all the result rows will be non-zero,\n        // you need only the first C.rows of them, and thus you\n        // pass nonzeroRows == C.rows\n        dft(tempA, tempA, DFT_INVERSE + DFT_SCALE, C.rows);\n\n        // now copy the result back to C.\n        tempA(Rect(0, 0, C.cols, C.rows)).copyTo(C);\n\n        // all the temporary buffers will be deallocated automatically\n    }\n@endcode\nTo optimize this sample, consider the following approaches:\n-   Since nonzeroRows != 0 is passed to the forward transform calls and since A and B are copied to\n    the top-left corners of tempA and tempB, respectively, it is not necessary to clear the whole\n    tempA and tempB. It is only necessary to clear the tempA.cols - A.cols ( tempB.cols - B.cols)\n    rightmost columns of the matrices.\n-   This DFT-based convolution does not have to be applied to the whole big arrays, especially if B\n    is significantly smaller than A or vice versa. Instead, you can calculate convolution by parts.\n    To do this, you need to split the output array C into multiple tiles. For each tile, estimate\n    which parts of A and B are required to calculate convolution in this tile. If the tiles in C are\n    too small, the speed will decrease a lot because of repeated work. In the ultimate case, when\n    each tile in C is a single pixel, the algorithm becomes equivalent to the naive convolution\n    algorithm. If the tiles are too big, the temporary arrays tempA and tempB become too big and\n    there is also a slowdown because of bad cache locality. So, there is an optimal tile size\n    somewhere in the middle.\n-   If different tiles in C can be calculated in parallel and, thus, the convolution is done by\n    parts, the loop can be threaded.\n\nAll of the above improvements have been implemented in matchTemplate and filter2D . Therefore, by\nusing them, you can get the performance even better than with the above theoretically optimal\nimplementation. Though, those two functions actually calculate cross-correlation, not convolution,\nso you need to \"flip\" the second convolution operand B vertically and horizontally using flip .\n@note\n-   An example using the discrete fourier transform can be found at\n    opencv_source_code/samples/cpp/dft.cpp\n-   (Python) An example using the dft functionality to perform Wiener deconvolution can be found\n    at opencv_source/samples/python2/deconvolution.py\n-   (Python) An example rearranging the quadrants of a Fourier image can be found at\n    opencv_source/samples/python2/dft.py\n@param src input array that could be real or complex.\n@param dst output array whose size and type depends on the flags .\n@param flags transformation flags, representing a combination of the cv::DftFlags\n@param nonzeroRows when the parameter is not zero, the function assumes that only the first\nnonzeroRows rows of the input array (DFT_INVERSE is not set) or only the first nonzeroRows of the\noutput array (DFT_INVERSE is set) contain non-zeros, thus, the function can handle the rest of the\nrows more efficiently and save some time; this technique is very useful for calculating array\ncross-correlation or convolution using DFT.\n@sa dct , getOptimalDFTSize , mulSpectrums, filter2D , matchTemplate , flip , cartToPolar ,\nmagnitude , phase\n*/\nCV_EXPORTS_W void dft(InputArray src, OutputArray dst, int flags = 0, int nonzeroRows = 0);\n\n/** @brief Calculates the inverse Discrete Fourier Transform of a 1D or 2D array.\n\nidft(src, dst, flags) is equivalent to dft(src, dst, flags | DFT_INVERSE) .\n@note None of dft and idft scales the result by default. So, you should pass DFT_SCALE to one of\ndft or idft explicitly to make these transforms mutually inverse.\n@sa dft, dct, idct, mulSpectrums, getOptimalDFTSize\n@param src input floating-point real or complex array.\n@param dst output array whose size and type depend on the flags.\n@param flags operation flags (see dft and cv::DftFlags).\n@param nonzeroRows number of dst rows to process; the rest of the rows have undefined content (see\nthe convolution sample in dft description.\n*/\nCV_EXPORTS_W void idft(InputArray src, OutputArray dst, int flags = 0, int nonzeroRows = 0);\n\n/** @brief Performs a forward or inverse discrete Cosine transform of 1D or 2D array.\n\nThe function dct performs a forward or inverse discrete Cosine transform (DCT) of a 1D or 2D\nfloating-point array:\n-   Forward Cosine transform of a 1D vector of N elements:\n    \\f[Y = C^{(N)}  \\cdot X\\f]\n    where\n    \\f[C^{(N)}_{jk}= \\sqrt{\\alpha_j/N} \\cos \\left ( \\frac{\\pi(2k+1)j}{2N} \\right )\\f]\n    and\n    \\f$\\alpha_0=1\\f$, \\f$\\alpha_j=2\\f$ for *j \\> 0*.\n-   Inverse Cosine transform of a 1D vector of N elements:\n    \\f[X =  \\left (C^{(N)} \\right )^{-1}  \\cdot Y =  \\left (C^{(N)} \\right )^T  \\cdot Y\\f]\n    (since \\f$C^{(N)}\\f$ is an orthogonal matrix, \\f$C^{(N)} \\cdot \\left(C^{(N)}\\right)^T = I\\f$ )\n-   Forward 2D Cosine transform of M x N matrix:\n    \\f[Y = C^{(N)}  \\cdot X  \\cdot \\left (C^{(N)} \\right )^T\\f]\n-   Inverse 2D Cosine transform of M x N matrix:\n    \\f[X =  \\left (C^{(N)} \\right )^T  \\cdot X  \\cdot C^{(N)}\\f]\n\nThe function chooses the mode of operation by looking at the flags and size of the input array:\n-   If (flags & DCT_INVERSE) == 0 , the function does a forward 1D or 2D transform. Otherwise, it\n    is an inverse 1D or 2D transform.\n-   If (flags & DCT_ROWS) != 0 , the function performs a 1D transform of each row.\n-   If the array is a single column or a single row, the function performs a 1D transform.\n-   If none of the above is true, the function performs a 2D transform.\n\n@note Currently dct supports even-size arrays (2, 4, 6 ...). For data analysis and approximation, you\ncan pad the array when necessary.\nAlso, the function performance depends very much, and not monotonically, on the array size (see\ngetOptimalDFTSize ). In the current implementation DCT of a vector of size N is calculated via DFT\nof a vector of size N/2 . Thus, the optimal DCT size N1 \\>= N can be calculated as:\n@code\n    size_t getOptimalDCTSize(size_t N) { return 2*getOptimalDFTSize((N+1)/2); }\n    N1 = getOptimalDCTSize(N);\n@endcode\n@param src input floating-point array.\n@param dst output array of the same size and type as src .\n@param flags transformation flags as a combination of cv::DftFlags (DCT_*)\n@sa dft , getOptimalDFTSize , idct\n*/\nCV_EXPORTS_W void dct(InputArray src, OutputArray dst, int flags = 0);\n\n/** @brief Calculates the inverse Discrete Cosine Transform of a 1D or 2D array.\n\nidct(src, dst, flags) is equivalent to dct(src, dst, flags | DCT_INVERSE).\n@param src input floating-point single-channel array.\n@param dst output array of the same size and type as src.\n@param flags operation flags.\n@sa  dct, dft, idft, getOptimalDFTSize\n*/\nCV_EXPORTS_W void idct(InputArray src, OutputArray dst, int flags = 0);\n\n/** @brief Performs the per-element multiplication of two Fourier spectrums.\n\nThe function mulSpectrums performs the per-element multiplication of the two CCS-packed or complex\nmatrices that are results of a real or complex Fourier transform.\n\nThe function, together with dft and idft , may be used to calculate convolution (pass conjB=false )\nor correlation (pass conjB=true ) of two arrays rapidly. When the arrays are complex, they are\nsimply multiplied (per element) with an optional conjugation of the second-array elements. When the\narrays are real, they are assumed to be CCS-packed (see dft for details).\n@param a first input array.\n@param b second input array of the same size and type as src1 .\n@param c output array of the same size and type as src1 .\n@param flags operation flags; currently, the only supported flag is cv::DFT_ROWS, which indicates that\neach row of src1 and src2 is an independent 1D Fourier spectrum. If you do not want to use this flag, then simply add a `0` as value.\n@param conjB optional flag that conjugates the second input array before the multiplication (true)\nor not (false).\n*/\nCV_EXPORTS_W void mulSpectrums(InputArray a, InputArray b, OutputArray c,\n                               int flags, bool conjB = false);\n\n/** @brief Returns the optimal DFT size for a given vector size.\n\nDFT performance is not a monotonic function of a vector size. Therefore, when you calculate\nconvolution of two arrays or perform the spectral analysis of an array, it usually makes sense to\npad the input data with zeros to get a bit larger array that can be transformed much faster than the\noriginal one. Arrays whose size is a power-of-two (2, 4, 8, 16, 32, ...) are the fastest to process.\nThough, the arrays whose size is a product of 2's, 3's, and 5's (for example, 300 = 5\\*5\\*3\\*2\\*2)\nare also processed quite efficiently.\n\nThe function getOptimalDFTSize returns the minimum number N that is greater than or equal to vecsize\nso that the DFT of a vector of size N can be processed efficiently. In the current implementation N\n= 2 ^p^ \\* 3 ^q^ \\* 5 ^r^ for some integer p, q, r.\n\nThe function returns a negative number if vecsize is too large (very close to INT_MAX ).\n\nWhile the function cannot be used directly to estimate the optimal vector size for DCT transform\n(since the current DCT implementation supports only even-size vectors), it can be easily processed\nas getOptimalDFTSize((vecsize+1)/2)\\*2.\n@param vecsize vector size.\n@sa dft , dct , idft , idct , mulSpectrums\n*/\nCV_EXPORTS_W int getOptimalDFTSize(int vecsize);\n\n/** @brief Returns the default random number generator.\n\nThe function theRNG returns the default random number generator. For each thread, there is a\nseparate random number generator, so you can use the function safely in multi-thread environments.\nIf you just need to get a single random number using this generator or initialize an array, you can\nuse randu or randn instead. But if you are going to generate many random numbers inside a loop, it\nis much faster to use this function to retrieve the generator and then use RNG::operator _Tp() .\n@sa RNG, randu, randn\n*/\nCV_EXPORTS RNG& theRNG();\n\n/** @brief Generates a single uniformly-distributed random number or an array of random numbers.\n\nNon-template variant of the function fills the matrix dst with uniformly-distributed\nrandom numbers from the specified range:\n\\f[\\texttt{low} _c  \\leq \\texttt{dst} (I)_c <  \\texttt{high} _c\\f]\n@param dst output array of random numbers; the array must be pre-allocated.\n@param low inclusive lower boundary of the generated random numbers.\n@param high exclusive upper boundary of the generated random numbers.\n@sa RNG, randn, theRNG\n*/\nCV_EXPORTS_W void randu(InputOutputArray dst, InputArray low, InputArray high);\n\n/** @brief Fills the array with normally distributed random numbers.\n\nThe function randn fills the matrix dst with normally distributed random numbers with the specified\nmean vector and the standard deviation matrix. The generated random numbers are clipped to fit the\nvalue range of the output array data type.\n@param dst output array of random numbers; the array must be pre-allocated and have 1 to 4 channels.\n@param mean mean value (expectation) of the generated random numbers.\n@param stddev standard deviation of the generated random numbers; it can be either a vector (in\nwhich case a diagonal standard deviation matrix is assumed) or a square matrix.\n@sa RNG, randu\n*/\nCV_EXPORTS_W void randn(InputOutputArray dst, InputArray mean, InputArray stddev);\n\n/** @brief Shuffles the array elements randomly.\n\nThe function randShuffle shuffles the specified 1D array by randomly choosing pairs of elements and\nswapping them. The number of such swap operations will be dst.rows\\*dst.cols\\*iterFactor .\n@param dst input/output numerical 1D array.\n@param iterFactor scale factor that determines the number of random swap operations (see the details\nbelow).\n@param rng optional random number generator used for shuffling; if it is zero, theRNG () is used\ninstead.\n@sa RNG, sort\n*/\nCV_EXPORTS_W void randShuffle(InputOutputArray dst, double iterFactor = 1., RNG* rng = 0);\n\n/** @brief Principal Component Analysis\n\nThe class is used to calculate a special basis for a set of vectors. The\nbasis will consist of eigenvectors of the covariance matrix calculated\nfrom the input set of vectors. The class %PCA can also transform\nvectors to/from the new coordinate space defined by the basis. Usually,\nin this new coordinate system, each vector from the original set (and\nany linear combination of such vectors) can be quite accurately\napproximated by taking its first few components, corresponding to the\neigenvectors of the largest eigenvalues of the covariance matrix.\nGeometrically it means that you calculate a projection of the vector to\na subspace formed by a few eigenvectors corresponding to the dominant\neigenvalues of the covariance matrix. And usually such a projection is\nvery close to the original vector. So, you can represent the original\nvector from a high-dimensional space with a much shorter vector\nconsisting of the projected vector's coordinates in the subspace. Such a\ntransformation is also known as Karhunen-Loeve Transform, or KLT.\nSee http://en.wikipedia.org/wiki/Principal_component_analysis\n\nThe sample below is the function that takes two matrices. The first\nfunction stores a set of vectors (a row per vector) that is used to\ncalculate PCA. The second function stores another \"test\" set of vectors\n(a row per vector). First, these vectors are compressed with PCA, then\nreconstructed back, and then the reconstruction error norm is computed\nand printed for each vector. :\n\n@code{.cpp}\nusing namespace cv;\n\nPCA compressPCA(const Mat& pcaset, int maxComponents,\n                const Mat& testset, Mat& compressed)\n{\n    PCA pca(pcaset, // pass the data\n            Mat(), // we do not have a pre-computed mean vector,\n                   // so let the PCA engine to compute it\n            PCA::DATA_AS_ROW, // indicate that the vectors\n                                // are stored as matrix rows\n                                // (use PCA::DATA_AS_COL if the vectors are\n                                // the matrix columns)\n            maxComponents // specify, how many principal components to retain\n            );\n    // if there is no test data, just return the computed basis, ready-to-use\n    if( !testset.data )\n        return pca;\n    CV_Assert( testset.cols == pcaset.cols );\n\n    compressed.create(testset.rows, maxComponents, testset.type());\n\n    Mat reconstructed;\n    for( int i = 0; i < testset.rows; i++ )\n    {\n        Mat vec = testset.row(i), coeffs = compressed.row(i), reconstructed;\n        // compress the vector, the result will be stored\n        // in the i-th row of the output matrix\n        pca.project(vec, coeffs);\n        // and then reconstruct it\n        pca.backProject(coeffs, reconstructed);\n        // and measure the error\n        printf(\"%d. diff = %g\\n\", i, norm(vec, reconstructed, NORM_L2));\n    }\n    return pca;\n}\n@endcode\n@sa calcCovarMatrix, mulTransposed, SVD, dft, dct\n*/\nclass CV_EXPORTS PCA\n{\npublic:\n    enum Flags { DATA_AS_ROW = 0, //!< indicates that the input samples are stored as matrix rows\n                 DATA_AS_COL = 1, //!< indicates that the input samples are stored as matrix columns\n                 USE_AVG     = 2  //!\n               };\n\n    /** @brief default constructor\n\n    The default constructor initializes an empty %PCA structure. The other\n    constructors initialize the structure and call PCA::operator()().\n    */\n    PCA();\n\n    /** @overload\n    @param data input samples stored as matrix rows or matrix columns.\n    @param mean optional mean value; if the matrix is empty (@c noArray()),\n    the mean is computed from the data.\n    @param flags operation flags; currently the parameter is only used to\n    specify the data layout (PCA::Flags)\n    @param maxComponents maximum number of components that %PCA should\n    retain; by default, all the components are retained.\n    */\n    PCA(InputArray data, InputArray mean, int flags, int maxComponents = 0);\n\n    /** @overload\n    @param data input samples stored as matrix rows or matrix columns.\n    @param mean optional mean value; if the matrix is empty (noArray()),\n    the mean is computed from the data.\n    @param flags operation flags; currently the parameter is only used to\n    specify the data layout (PCA::Flags)\n    @param retainedVariance Percentage of variance that PCA should retain.\n    Using this parameter will let the PCA decided how many components to\n    retain but it will always keep at least 2.\n    */\n    PCA(InputArray data, InputArray mean, int flags, double retainedVariance);\n\n    /** @brief performs %PCA\n\n    The operator performs %PCA of the supplied dataset. It is safe to reuse\n    the same PCA structure for multiple datasets. That is, if the structure\n    has been previously used with another dataset, the existing internal\n    data is reclaimed and the new eigenvalues, @ref eigenvectors , and @ref\n    mean are allocated and computed.\n\n    The computed eigenvalues are sorted from the largest to the smallest and\n    the corresponding eigenvectors are stored as eigenvectors rows.\n\n    @param data input samples stored as the matrix rows or as the matrix\n    columns.\n    @param mean optional mean value; if the matrix is empty (noArray()),\n    the mean is computed from the data.\n    @param flags operation flags; currently the parameter is only used to\n    specify the data layout. (Flags)\n    @param maxComponents maximum number of components that PCA should\n    retain; by default, all the components are retained.\n    */\n    PCA& operator()(InputArray data, InputArray mean, int flags, int maxComponents = 0);\n\n    /** @overload\n    @param data input samples stored as the matrix rows or as the matrix\n    columns.\n    @param mean optional mean value; if the matrix is empty (noArray()),\n    the mean is computed from the data.\n    @param flags operation flags; currently the parameter is only used to\n    specify the data layout. (PCA::Flags)\n    @param retainedVariance Percentage of variance that %PCA should retain.\n    Using this parameter will let the %PCA decided how many components to\n    retain but it will always keep at least 2.\n     */\n    PCA& operator()(InputArray data, InputArray mean, int flags, double retainedVariance);\n\n    /** @brief Projects vector(s) to the principal component subspace.\n\n    The methods project one or more vectors to the principal component\n    subspace, where each vector projection is represented by coefficients in\n    the principal component basis. The first form of the method returns the\n    matrix that the second form writes to the result. So the first form can\n    be used as a part of expression while the second form can be more\n    efficient in a processing loop.\n    @param vec input vector(s); must have the same dimensionality and the\n    same layout as the input data used at %PCA phase, that is, if\n    DATA_AS_ROW are specified, then `vec.cols==data.cols`\n    (vector dimensionality) and `vec.rows` is the number of vectors to\n    project, and the same is true for the PCA::DATA_AS_COL case.\n    */\n    Mat project(InputArray vec) const;\n\n    /** @overload\n    @param vec input vector(s); must have the same dimensionality and the\n    same layout as the input data used at PCA phase, that is, if\n    DATA_AS_ROW are specified, then `vec.cols==data.cols`\n    (vector dimensionality) and `vec.rows` is the number of vectors to\n    project, and the same is true for the PCA::DATA_AS_COL case.\n    @param result output vectors; in case of PCA::DATA_AS_COL, the\n    output matrix has as many columns as the number of input vectors, this\n    means that `result.cols==vec.cols` and the number of rows match the\n    number of principal components (for example, `maxComponents` parameter\n    passed to the constructor).\n     */\n    void project(InputArray vec, OutputArray result) const;\n\n    /** @brief Reconstructs vectors from their PC projections.\n\n    The methods are inverse operations to PCA::project. They take PC\n    coordinates of projected vectors and reconstruct the original vectors.\n    Unless all the principal components have been retained, the\n    reconstructed vectors are different from the originals. But typically,\n    the difference is small if the number of components is large enough (but\n    still much smaller than the original vector dimensionality). As a\n    result, PCA is used.\n    @param vec coordinates of the vectors in the principal component\n    subspace, the layout and size are the same as of PCA::project output\n    vectors.\n     */\n    Mat backProject(InputArray vec) const;\n\n    /** @overload\n    @param vec coordinates of the vectors in the principal component\n    subspace, the layout and size are the same as of PCA::project output\n    vectors.\n    @param result reconstructed vectors; the layout and size are the same as\n    of PCA::project input vectors.\n     */\n    void backProject(InputArray vec, OutputArray result) const;\n\n    /** @brief write and load PCA matrix\n\n*/\n    void write(FileStorage& fs ) const;\n    void read(const FileNode& fs);\n\n    Mat eigenvectors; //!< eigenvectors of the covariation matrix\n    Mat eigenvalues; //!< eigenvalues of the covariation matrix\n    Mat mean; //!< mean value subtracted before the projection and added after the back projection\n};\n\n/** @example pca.cpp\n  An example using %PCA for dimensionality reduction while maintaining an amount of variance\n */\n\n/**\n   @brief Linear Discriminant Analysis\n   @todo document this class\n */\nclass CV_EXPORTS LDA\n{\npublic:\n    /** @brief constructor\n    Initializes a LDA with num_components (default 0) and specifies how\n    samples are aligned (default dataAsRow=true).\n    */\n    explicit LDA(int num_components = 0);\n\n    /** Initializes and performs a Discriminant Analysis with Fisher's\n     Optimization Criterion on given data in src and corresponding labels\n     in labels. If 0 (or less) number of components are given, they are\n     automatically determined for given data in computation.\n    */\n    LDA(InputArrayOfArrays src, InputArray labels, int num_components = 0);\n\n    /** Serializes this object to a given filename.\n      */\n    void save(const String& filename) const;\n\n    /** Deserializes this object from a given filename.\n      */\n    void load(const String& filename);\n\n    /** Serializes this object to a given cv::FileStorage.\n      */\n    void save(FileStorage& fs) const;\n\n    /** Deserializes this object from a given cv::FileStorage.\n      */\n    void load(const FileStorage& node);\n\n    /** destructor\n      */\n    ~LDA();\n\n    /** Compute the discriminants for data in src and labels.\n      */\n    void compute(InputArrayOfArrays src, InputArray labels);\n\n    /** Projects samples into the LDA subspace.\n      */\n    Mat project(InputArray src);\n\n    /** Reconstructs projections from the LDA subspace.\n      */\n    Mat reconstruct(InputArray src);\n\n    /** Returns the eigenvectors of this LDA.\n      */\n    Mat eigenvectors() const { return _eigenvectors; }\n\n    /** Returns the eigenvalues of this LDA.\n      */\n    Mat eigenvalues() const { return _eigenvalues; }\n\n    static Mat subspaceProject(InputArray W, InputArray mean, InputArray src);\n    static Mat subspaceReconstruct(InputArray W, InputArray mean, InputArray src);\n\nprotected:\n    bool _dataAsRow;\n    int _num_components;\n    Mat _eigenvectors;\n    Mat _eigenvalues;\n\n    void lda(InputArrayOfArrays src, InputArray labels);\n};\n\n/** @brief Singular Value Decomposition\n\nClass for computing Singular Value Decomposition of a floating-point\nmatrix. The Singular Value Decomposition is used to solve least-square\nproblems, under-determined linear systems, invert matrices, compute\ncondition numbers, and so on.\n\nIf you want to compute a condition number of a matrix or an absolute value of\nits determinant, you do not need `u` and `vt`. You can pass\nflags=SVD::NO_UV|... . Another flag SVD::FULL_UV indicates that full-size u\nand vt must be computed, which is not necessary most of the time.\n\n@sa invert, solve, eigen, determinant\n*/\nclass CV_EXPORTS SVD\n{\npublic:\n    enum Flags {\n        /** allow the algorithm to modify the decomposed matrix; it can save space and speed up\n            processing. currently ignored. */\n        MODIFY_A = 1,\n        /** indicates that only a vector of singular values `w` is to be processed, while u and vt\n            will be set to empty matrices */\n        NO_UV    = 2,\n        /** when the matrix is not square, by default the algorithm produces u and vt matrices of\n            sufficiently large size for the further A reconstruction; if, however, FULL_UV flag is\n            specified, u and vt will be full-size square orthogonal matrices.*/\n        FULL_UV  = 4\n    };\n\n    /** @brief the default constructor\n\n    initializes an empty SVD structure\n      */\n    SVD();\n\n    /** @overload\n    initializes an empty SVD structure and then calls SVD::operator()\n    @param src decomposed matrix.\n    @param flags operation flags (SVD::Flags)\n      */\n    SVD( InputArray src, int flags = 0 );\n\n    /** @brief the operator that performs SVD. The previously allocated u, w and vt are released.\n\n    The operator performs the singular value decomposition of the supplied\n    matrix. The u,`vt` , and the vector of singular values w are stored in\n    the structure. The same SVD structure can be reused many times with\n    different matrices. Each time, if needed, the previous u,`vt` , and w\n    are reclaimed and the new matrices are created, which is all handled by\n    Mat::create.\n    @param src decomposed matrix.\n    @param flags operation flags (SVD::Flags)\n      */\n    SVD& operator ()( InputArray src, int flags = 0 );\n\n    /** @brief decomposes matrix and stores the results to user-provided matrices\n\n    The methods/functions perform SVD of matrix. Unlike SVD::SVD constructor\n    and SVD::operator(), they store the results to the user-provided\n    matrices:\n\n    @code{.cpp}\n    Mat A, w, u, vt;\n    SVD::compute(A, w, u, vt);\n    @endcode\n\n    @param src decomposed matrix\n    @param w calculated singular values\n    @param u calculated left singular vectors\n    @param vt transposed matrix of right singular values\n    @param flags operation flags - see SVD::SVD.\n      */\n    static void compute( InputArray src, OutputArray w,\n                         OutputArray u, OutputArray vt, int flags = 0 );\n\n    /** @overload\n    computes singular values of a matrix\n    @param src decomposed matrix\n    @param w calculated singular values\n    @param flags operation flags - see SVD::Flags.\n      */\n    static void compute( InputArray src, OutputArray w, int flags = 0 );\n\n    /** @brief performs back substitution\n      */\n    static void backSubst( InputArray w, InputArray u,\n                           InputArray vt, InputArray rhs,\n                           OutputArray dst );\n\n    /** @brief solves an under-determined singular linear system\n\n    The method finds a unit-length solution x of a singular linear system\n    A\\*x = 0. Depending on the rank of A, there can be no solutions, a\n    single solution or an infinite number of solutions. In general, the\n    algorithm solves the following problem:\n    \\f[dst =  \\arg \\min _{x:  \\| x \\| =1}  \\| src  \\cdot x  \\|\\f]\n    @param src left-hand-side matrix.\n    @param dst found solution.\n      */\n    static void solveZ( InputArray src, OutputArray dst );\n\n    /** @brief performs a singular value back substitution.\n\n    The method calculates a back substitution for the specified right-hand\n    side:\n\n    \\f[\\texttt{x} =  \\texttt{vt} ^T  \\cdot diag( \\texttt{w} )^{-1}  \\cdot \\texttt{u} ^T  \\cdot \\texttt{rhs} \\sim \\texttt{A} ^{-1}  \\cdot \\texttt{rhs}\\f]\n\n    Using this technique you can either get a very accurate solution of the\n    convenient linear system, or the best (in the least-squares terms)\n    pseudo-solution of an overdetermined linear system.\n\n    @param rhs right-hand side of a linear system (u\\*w\\*v')\\*dst = rhs to\n    be solved, where A has been previously decomposed.\n\n    @param dst found solution of the system.\n\n    @note Explicit SVD with the further back substitution only makes sense\n    if you need to solve many linear systems with the same left-hand side\n    (for example, src ). If all you need is to solve a single system\n    (possibly with multiple rhs immediately available), simply call solve\n    add pass DECOMP_SVD there. It does absolutely the same thing.\n      */\n    void backSubst( InputArray rhs, OutputArray dst ) const;\n\n    /** @todo document */\n    template<typename _Tp, int m, int n, int nm> static\n    void compute( const Matx<_Tp, m, n>& a, Matx<_Tp, nm, 1>& w, Matx<_Tp, m, nm>& u, Matx<_Tp, n, nm>& vt );\n\n    /** @todo document */\n    template<typename _Tp, int m, int n, int nm> static\n    void compute( const Matx<_Tp, m, n>& a, Matx<_Tp, nm, 1>& w );\n\n    /** @todo document */\n    template<typename _Tp, int m, int n, int nm, int nb> static\n    void backSubst( const Matx<_Tp, nm, 1>& w, const Matx<_Tp, m, nm>& u, const Matx<_Tp, n, nm>& vt, const Matx<_Tp, m, nb>& rhs, Matx<_Tp, n, nb>& dst );\n\n    Mat u, w, vt;\n};\n\n/** @brief Random Number Generator\n\nRandom number generator. It encapsulates the state (currently, a 64-bit\ninteger) and has methods to return scalar random values and to fill\narrays with random values. Currently it supports uniform and Gaussian\n(normal) distributions. The generator uses Multiply-With-Carry\nalgorithm, introduced by G. Marsaglia (\n<http://en.wikipedia.org/wiki/Multiply-with-carry> ).\nGaussian-distribution random numbers are generated using the Ziggurat\nalgorithm ( <http://en.wikipedia.org/wiki/Ziggurat_algorithm> ),\nintroduced by G. Marsaglia and W. W. Tsang.\n*/\nclass CV_EXPORTS RNG\n{\npublic:\n    enum { UNIFORM = 0,\n           NORMAL  = 1\n         };\n\n    /** @brief constructor\n\n    These are the RNG constructors. The first form sets the state to some\n    pre-defined value, equal to 2\\*\\*32-1 in the current implementation. The\n    second form sets the state to the specified value. If you passed state=0\n    , the constructor uses the above default value instead to avoid the\n    singular random number sequence, consisting of all zeros.\n    */\n    RNG();\n    /** @overload\n    @param state 64-bit value used to initialize the RNG.\n    */\n    RNG(uint64 state);\n    /**The method updates the state using the MWC algorithm and returns the\n    next 32-bit random number.*/\n    unsigned next();\n\n    /**Each of the methods updates the state using the MWC algorithm and\n    returns the next random number of the specified type. In case of integer\n    types, the returned number is from the available value range for the\n    specified type. In case of floating-point types, the returned value is\n    from [0,1) range.\n    */\n    operator uchar();\n    /** @overload */\n    operator schar();\n    /** @overload */\n    operator ushort();\n    /** @overload */\n    operator short();\n    /** @overload */\n    operator unsigned();\n    /** @overload */\n    operator int();\n    /** @overload */\n    operator float();\n    /** @overload */\n    operator double();\n\n    /** @brief returns a random integer sampled uniformly from [0, N).\n\n    The methods transform the state using the MWC algorithm and return the\n    next random number. The first form is equivalent to RNG::next . The\n    second form returns the random number modulo N , which means that the\n    result is in the range [0, N) .\n    */\n    unsigned operator ()();\n    /** @overload\n    @param N upper non-inclusive boundary of the returned random number.\n    */\n    unsigned operator ()(unsigned N);\n\n    /** @brief returns uniformly distributed integer random number from [a,b) range\n\n    The methods transform the state using the MWC algorithm and return the\n    next uniformly-distributed random number of the specified type, deduced\n    from the input parameter type, from the range [a, b) . There is a nuance\n    illustrated by the following sample:\n\n    @code{.cpp}\n    RNG rng;\n\n    // always produces 0\n    double a = rng.uniform(0, 1);\n\n    // produces double from [0, 1)\n    double a1 = rng.uniform((double)0, (double)1);\n\n    // produces float from [0, 1)\n    double b = rng.uniform(0.f, 1.f);\n\n    // produces double from [0, 1)\n    double c = rng.uniform(0., 1.);\n\n    // may cause compiler error because of ambiguity:\n    //  RNG::uniform(0, (int)0.999999)? or RNG::uniform((double)0, 0.99999)?\n    double d = rng.uniform(0, 0.999999);\n    @endcode\n\n    The compiler does not take into account the type of the variable to\n    which you assign the result of RNG::uniform . The only thing that\n    matters to the compiler is the type of a and b parameters. So, if you\n    want a floating-point random number, but the range boundaries are\n    integer numbers, either put dots in the end, if they are constants, or\n    use explicit type cast operators, as in the a1 initialization above.\n    @param a lower inclusive boundary of the returned random numbers.\n    @param b upper non-inclusive boundary of the returned random numbers.\n      */\n    int uniform(int a, int b);\n    /** @overload */\n    float uniform(float a, float b);\n    /** @overload */\n    double uniform(double a, double b);\n\n    /** @brief Fills arrays with random numbers.\n\n    @param mat 2D or N-dimensional matrix; currently matrices with more than\n    4 channels are not supported by the methods, use Mat::reshape as a\n    possible workaround.\n    @param distType distribution type, RNG::UNIFORM or RNG::NORMAL.\n    @param a first distribution parameter; in case of the uniform\n    distribution, this is an inclusive lower boundary, in case of the normal\n    distribution, this is a mean value.\n    @param b second distribution parameter; in case of the uniform\n    distribution, this is a non-inclusive upper boundary, in case of the\n    normal distribution, this is a standard deviation (diagonal of the\n    standard deviation matrix or the full standard deviation matrix).\n    @param saturateRange pre-saturation flag; for uniform distribution only;\n    if true, the method will first convert a and b to the acceptable value\n    range (according to the mat datatype) and then will generate uniformly\n    distributed random numbers within the range [saturate(a), saturate(b)),\n    if saturateRange=false, the method will generate uniformly distributed\n    random numbers in the original range [a, b) and then will saturate them,\n    it means, for example, that\n    <tt>theRNG().fill(mat_8u, RNG::UNIFORM, -DBL_MAX, DBL_MAX)</tt> will likely\n    produce array mostly filled with 0's and 255's, since the range (0, 255)\n    is significantly smaller than [-DBL_MAX, DBL_MAX).\n\n    Each of the methods fills the matrix with the random values from the\n    specified distribution. As the new numbers are generated, the RNG state\n    is updated accordingly. In case of multiple-channel images, every\n    channel is filled independently, which means that RNG cannot generate\n    samples from the multi-dimensional Gaussian distribution with\n    non-diagonal covariance matrix directly. To do that, the method\n    generates samples from multi-dimensional standard Gaussian distribution\n    with zero mean and identity covariation matrix, and then transforms them\n    using transform to get samples from the specified Gaussian distribution.\n    */\n    void fill( InputOutputArray mat, int distType, InputArray a, InputArray b, bool saturateRange = false );\n\n    /** @brief Returns the next random number sampled from the Gaussian distribution\n    @param sigma standard deviation of the distribution.\n\n    The method transforms the state using the MWC algorithm and returns the\n    next random number from the Gaussian distribution N(0,sigma) . That is,\n    the mean value of the returned random numbers is zero and the standard\n    deviation is the specified sigma .\n    */\n    double gaussian(double sigma);\n\n    uint64 state;\n};\n\n/** @brief Mersenne Twister random number generator\n\nInspired by http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c\n@todo document\n */\nclass CV_EXPORTS RNG_MT19937\n{\npublic:\n    RNG_MT19937();\n    RNG_MT19937(unsigned s);\n    void seed(unsigned s);\n\n    unsigned next();\n\n    operator int();\n    operator unsigned();\n    operator float();\n    operator double();\n\n    unsigned operator ()(unsigned N);\n    unsigned operator ()();\n\n    /** @brief returns uniformly distributed integer random number from [a,b) range\n\n*/\n    int uniform(int a, int b);\n    /** @brief returns uniformly distributed floating-point random number from [a,b) range\n\n*/\n    float uniform(float a, float b);\n    /** @brief returns uniformly distributed double-precision floating-point random number from [a,b) range\n\n*/\n    double uniform(double a, double b);\n\nprivate:\n    enum PeriodParameters {N = 624, M = 397};\n    unsigned state[N];\n    int mti;\n};\n\n//! @} core_array\n\n//! @addtogroup core_cluster\n//!  @{\n\n/** @example kmeans.cpp\n  An example on K-means clustering\n*/\n\n/** @brief Finds centers of clusters and groups input samples around the clusters.\n\nThe function kmeans implements a k-means algorithm that finds the centers of cluster_count clusters\nand groups the input samples around the clusters. As an output, \\f$\\texttt{labels}_i\\f$ contains a\n0-based cluster index for the sample stored in the \\f$i^{th}\\f$ row of the samples matrix.\n\n@note\n-   (Python) An example on K-means clustering can be found at\n    opencv_source_code/samples/python2/kmeans.py\n@param data Data for clustering. An array of N-Dimensional points with float coordinates is needed.\nExamples of this array can be:\n-   Mat points(count, 2, CV_32F);\n-   Mat points(count, 1, CV_32FC2);\n-   Mat points(1, count, CV_32FC2);\n-   std::vector\\<cv::Point2f\\> points(sampleCount);\n@param K Number of clusters to split the set by.\n@param bestLabels Input/output integer array that stores the cluster indices for every sample.\n@param criteria The algorithm termination criteria, that is, the maximum number of iterations and/or\nthe desired accuracy. The accuracy is specified as criteria.epsilon. As soon as each of the cluster\ncenters moves by less than criteria.epsilon on some iteration, the algorithm stops.\n@param attempts Flag to specify the number of times the algorithm is executed using different\ninitial labellings. The algorithm returns the labels that yield the best compactness (see the last\nfunction parameter).\n@param flags Flag that can take values of cv::KmeansFlags\n@param centers Output matrix of the cluster centers, one row per each cluster center.\n@return The function returns the compactness measure that is computed as\n\\f[\\sum _i  \\| \\texttt{samples} _i -  \\texttt{centers} _{ \\texttt{labels} _i} \\| ^2\\f]\nafter every attempt. The best (minimum) value is chosen and the corresponding labels and the\ncompactness value are returned by the function. Basically, you can use only the core of the\nfunction, set the number of attempts to 1, initialize labels each time using a custom algorithm,\npass them with the ( flags = KMEANS_USE_INITIAL_LABELS ) flag, and then choose the best\n(most-compact) clustering.\n*/\nCV_EXPORTS_W double kmeans( InputArray data, int K, InputOutputArray bestLabels,\n                            TermCriteria criteria, int attempts,\n                            int flags, OutputArray centers = noArray() );\n\n//! @} core_cluster\n\n//! @addtogroup core_basic\n//! @{\n\n/////////////////////////////// Formatted output of cv::Mat ///////////////////////////\n\n/** @todo document */\nclass CV_EXPORTS Formatted\n{\npublic:\n    virtual const char* next() = 0;\n    virtual void reset() = 0;\n    virtual ~Formatted();\n};\n\n/** @todo document */\nclass CV_EXPORTS Formatter\n{\npublic:\n    enum { FMT_DEFAULT = 0,\n           FMT_MATLAB  = 1,\n           FMT_CSV     = 2,\n           FMT_PYTHON  = 3,\n           FMT_NUMPY   = 4,\n           FMT_C       = 5\n         };\n\n    virtual ~Formatter();\n\n    virtual Ptr<Formatted> format(const Mat& mtx) const = 0;\n\n    virtual void set32fPrecision(int p = 8) = 0;\n    virtual void set64fPrecision(int p = 16) = 0;\n    virtual void setMultiline(bool ml = true) = 0;\n\n    static Ptr<Formatter> get(int fmt = FMT_DEFAULT);\n\n};\n\n//////////////////////////////////////// Algorithm ////////////////////////////////////\n\nclass CV_EXPORTS Algorithm;\n\ntemplate<typename _Tp> struct ParamType {};\n\n\n/** @brief This is a base class for all more or less complex algorithms in OpenCV\n\nespecially for classes of algorithms, for which there can be multiple implementations. The examples\nare stereo correspondence (for which there are algorithms like block matching, semi-global block\nmatching, graph-cut etc.), background subtraction (which can be done using mixture-of-gaussians\nmodels, codebook-based algorithm etc.), optical flow (block matching, Lucas-Kanade, Horn-Schunck\netc.).\n\nHere is example of SIFT use in your application via Algorithm interface:\n@code\n    #include \"opencv2/opencv.hpp\"\n    #include \"opencv2/xfeatures2d.hpp\"\n    using namespace cv::xfeatures2d;\n\n    Ptr<Feature2D> sift = SIFT::create();\n    FileStorage fs(\"sift_params.xml\", FileStorage::READ);\n    if( fs.isOpened() ) // if we have file with parameters, read them\n    {\n        sift->read(fs[\"sift_params\"]);\n        fs.release();\n    }\n    else // else modify the parameters and store them; user can later edit the file to use different parameters\n    {\n        sift->setContrastThreshold(0.01f); // lower the contrast threshold, compared to the default value\n        {\n            WriteStructContext ws(fs, \"sift_params\", CV_NODE_MAP);\n            sift->write(fs);\n        }\n    }\n    Mat image = imread(\"myimage.png\", 0), descriptors;\n    vector<KeyPoint> keypoints;\n    sift->detectAndCompute(image, noArray(), keypoints, descriptors);\n@endcode\n */\nclass CV_EXPORTS_W Algorithm\n{\npublic:\n    Algorithm();\n    virtual ~Algorithm();\n\n    /** @brief Clears the algorithm state\n    */\n    CV_WRAP virtual void clear() {}\n\n    /** @brief Stores algorithm parameters in a file storage\n    */\n    virtual void write(FileStorage& fs) const { (void)fs; }\n\n    /** @brief Reads algorithm parameters from a file storage\n    */\n    virtual void read(const FileNode& fn) { (void)fn; }\n\n    /** @brief Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read\n     */\n    virtual bool empty() const { return false; }\n\n    /** @brief Reads algorithm from the file node\n\n     This is static template method of Algorithm. It's usage is following (in the case of SVM):\n     @code\n     Ptr<SVM> svm = Algorithm::read<SVM>(fn);\n     @endcode\n     In order to make this method work, the derived class must overwrite Algorithm::read(const\n     FileNode& fn) and also have static create() method without parameters\n     (or with all the optional parameters)\n     */\n    template<typename _Tp> static Ptr<_Tp> read(const FileNode& fn)\n    {\n        Ptr<_Tp> obj = _Tp::create();\n        obj->read(fn);\n        return !obj->empty() ? obj : Ptr<_Tp>();\n    }\n\n    /** @brief Loads algorithm from the file\n\n     @param filename Name of the file to read.\n     @param objname The optional name of the node to read (if empty, the first top-level node will be used)\n\n     This is static template method of Algorithm. It's usage is following (in the case of SVM):\n     @code\n     Ptr<SVM> svm = Algorithm::load<SVM>(\"my_svm_model.xml\");\n     @endcode\n     In order to make this method work, the derived class must overwrite Algorithm::read(const\n     FileNode& fn).\n     */\n    template<typename _Tp> static Ptr<_Tp> load(const String& filename, const String& objname=String())\n    {\n        FileStorage fs(filename, FileStorage::READ);\n        FileNode fn = objname.empty() ? fs.getFirstTopLevelNode() : fs[objname];\n        Ptr<_Tp> obj = _Tp::create();\n        obj->read(fn);\n        return !obj->empty() ? obj : Ptr<_Tp>();\n    }\n\n    /** @brief Loads algorithm from a String\n\n     @param strModel The string variable containing the model you want to load.\n     @param objname The optional name of the node to read (if empty, the first top-level node will be used)\n\n     This is static template method of Algorithm. It's usage is following (in the case of SVM):\n     @code\n     Ptr<SVM> svm = Algorithm::loadFromString<SVM>(myStringModel);\n     @endcode\n     */\n    template<typename _Tp> static Ptr<_Tp> loadFromString(const String& strModel, const String& objname=String())\n    {\n        FileStorage fs(strModel, FileStorage::READ + FileStorage::MEMORY);\n        FileNode fn = objname.empty() ? fs.getFirstTopLevelNode() : fs[objname];\n        Ptr<_Tp> obj = _Tp::create();\n        obj->read(fn);\n        return !obj->empty() ? obj : Ptr<_Tp>();\n    }\n\n    /** Saves the algorithm to a file.\n     In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs). */\n    CV_WRAP virtual void save(const String& filename) const;\n\n    /** Returns the algorithm string identifier.\n     This string is used as top level xml/yml node tag when the object is saved to a file or string. */\n    CV_WRAP virtual String getDefaultName() const;\n};\n\nstruct Param {\n    enum { INT=0, BOOLEAN=1, REAL=2, STRING=3, MAT=4, MAT_VECTOR=5, ALGORITHM=6, FLOAT=7,\n           UNSIGNED_INT=8, UINT64=9, UCHAR=11 };\n};\n\n\n\ntemplate<> struct ParamType<bool>\n{\n    typedef bool const_param_type;\n    typedef bool member_type;\n\n    enum { type = Param::BOOLEAN };\n};\n\ntemplate<> struct ParamType<int>\n{\n    typedef int const_param_type;\n    typedef int member_type;\n\n    enum { type = Param::INT };\n};\n\ntemplate<> struct ParamType<double>\n{\n    typedef double const_param_type;\n    typedef double member_type;\n\n    enum { type = Param::REAL };\n};\n\ntemplate<> struct ParamType<String>\n{\n    typedef const String& const_param_type;\n    typedef String member_type;\n\n    enum { type = Param::STRING };\n};\n\ntemplate<> struct ParamType<Mat>\n{\n    typedef const Mat& const_param_type;\n    typedef Mat member_type;\n\n    enum { type = Param::MAT };\n};\n\ntemplate<> struct ParamType<std::vector<Mat> >\n{\n    typedef const std::vector<Mat>& const_param_type;\n    typedef std::vector<Mat> member_type;\n\n    enum { type = Param::MAT_VECTOR };\n};\n\ntemplate<> struct ParamType<Algorithm>\n{\n    typedef const Ptr<Algorithm>& const_param_type;\n    typedef Ptr<Algorithm> member_type;\n\n    enum { type = Param::ALGORITHM };\n};\n\ntemplate<> struct ParamType<float>\n{\n    typedef float const_param_type;\n    typedef float member_type;\n\n    enum { type = Param::FLOAT };\n};\n\ntemplate<> struct ParamType<unsigned>\n{\n    typedef unsigned const_param_type;\n    typedef unsigned member_type;\n\n    enum { type = Param::UNSIGNED_INT };\n};\n\ntemplate<> struct ParamType<uint64>\n{\n    typedef uint64 const_param_type;\n    typedef uint64 member_type;\n\n    enum { type = Param::UINT64 };\n};\n\ntemplate<> struct ParamType<uchar>\n{\n    typedef uchar const_param_type;\n    typedef uchar member_type;\n\n    enum { type = Param::UCHAR };\n};\n\n//! @} core_basic\n\n} //namespace cv\n\n#include \"opencv2/core/operations.hpp\"\n#include \"opencv2/core/cvstd.inl.hpp\"\n#include \"opencv2/core/utility.hpp\"\n#include \"opencv2/core/optim.hpp\"\n\n#endif /*__OPENCV_CORE_HPP__*/\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/cvconfig.h",
    "content": "/* OpenCV compiled as static or dynamic libs */\r\n#define BUILD_SHARED_LIBS\r\n\r\n/* Compile for 'real' NVIDIA GPU architectures */\r\n#define CUDA_ARCH_BIN \"\"\r\n\r\n/* Create PTX or BIN for 1.0 compute capability */\r\n/* #undef CUDA_ARCH_BIN_OR_PTX_10 */\r\n\r\n/* NVIDIA GPU features are used */\r\n#define CUDA_ARCH_FEATURES \"\"\r\n\r\n/* Compile for 'virtual' NVIDIA PTX architectures */\r\n#define CUDA_ARCH_PTX \"\"\r\n\r\n/* AVFoundation video libraries */\r\n/* #undef HAVE_AVFOUNDATION */\r\n\r\n/* V4L capturing support */\r\n/* #undef HAVE_CAMV4L */\r\n\r\n/* V4L2 capturing support */\r\n/* #undef HAVE_CAMV4L2 */\r\n\r\n/* Carbon windowing environment */\r\n/* #undef HAVE_CARBON */\r\n\r\n/* AMD's Basic Linear Algebra Subprograms Library*/\r\n/* #undef HAVE_CLAMDBLAS */\r\n\r\n/* AMD's OpenCL Fast Fourier Transform Library*/\r\n/* #undef HAVE_CLAMDFFT */\r\n\r\n/* Clp support */\r\n/* #undef HAVE_CLP */\r\n\r\n/* Cocoa API */\r\n/* #undef HAVE_COCOA */\r\n\r\n/* C= */\r\n/* #undef HAVE_CSTRIPES */\r\n\r\n/* NVidia Cuda Basic Linear Algebra Subprograms (BLAS) API*/\r\n/* #undef HAVE_CUBLAS */\r\n\r\n/* NVidia Cuda Runtime API*/\r\n/* #undef HAVE_CUDA */\r\n\r\n/* NVidia Cuda Fast Fourier Transform (FFT) API*/\r\n/* #undef HAVE_CUFFT */\r\n\r\n/* IEEE1394 capturing support */\r\n/* #undef HAVE_DC1394 */\r\n\r\n/* IEEE1394 capturing support - libdc1394 v2.x */\r\n/* #undef HAVE_DC1394_2 */\r\n\r\n/* DirectX */\r\n/* #undef HAVE_DIRECTX */\r\n/* #undef HAVE_D3D11 */\r\n/* #undef HAVE_D3D10 */\r\n/* #undef HAVE_D3D9 */\r\n\r\n/* DirectShow Video Capture library */\r\n/* #undef HAVE_DSHOW */\r\n\r\n/* Eigen Matrix & Linear Algebra Library */\r\n/* #undef HAVE_EIGEN */\r\n\r\n/* FFMpeg video library */\r\n/* #undef HAVE_FFMPEG */\r\n\r\n/* ffmpeg's libswscale */\r\n/* #undef HAVE_FFMPEG_SWSCALE */\r\n\r\n/* ffmpeg in Gentoo */\r\n/* #undef HAVE_GENTOO_FFMPEG */\r\n\r\n/* Geospatial Data Abstraction Library */\r\n/* #undef HAVE_GDAL */\r\n\r\n/* GStreamer multimedia framework */\r\n/* #undef HAVE_GSTREAMER */\r\n\r\n/* GTK+ 2.0 Thread support */\r\n/* #undef HAVE_GTHREAD */\r\n\r\n/* GTK+ 2.x toolkit */\r\n/* #undef HAVE_GTK */\r\n\r\n/* Define to 1 if you have the <inttypes.h> header file. */\r\n/* #undef HAVE_INTTYPES_H */\r\n\r\n/* Intel Perceptual Computing SDK library */\r\n/* #undef HAVE_INTELPERC */\r\n\r\n/* Intel Integrated Performance Primitives */\r\n/* #undef HAVE_IPP */\r\n/* #undef HAVE_IPP_ICV_ONLY */\r\n\r\n/* Intel IPP Async */\r\n/* #undef HAVE_IPP_A */\r\n\r\n/* JPEG-2000 codec */\r\n#define HAVE_JASPER\r\n\r\n/* IJG JPEG codec */\r\n#define HAVE_JPEG\r\n\r\n/* libpng/png.h needs to be included */\r\n/* #undef HAVE_LIBPNG_PNG_H */\r\n\r\n/* V4L/V4L2 capturing support via libv4l */\r\n/* #undef HAVE_LIBV4L */\r\n\r\n/* Microsoft Media Foundation Capture library */\r\n/* #undef HAVE_MSMF */\r\n\r\n/* NVidia Video Decoding API*/\r\n/* #undef HAVE_NVCUVID */\r\n\r\n/* OpenCL Support */\r\n/* #undef HAVE_OPENCL */\r\n/* #undef HAVE_OPENCL_STATIC */\r\n/* #undef HAVE_OPENCL_SVM */\r\n\r\n/* OpenEXR codec */\r\n/* #undef HAVE_OPENEXR */\r\n\r\n/* OpenGL support*/\r\n/* #undef HAVE_OPENGL */\r\n\r\n/* OpenNI library */\r\n/* #undef HAVE_OPENNI */\r\n\r\n/* OpenNI library */\r\n/* #undef HAVE_OPENNI2 */\r\n\r\n/* PNG codec */\r\n#define HAVE_PNG\r\n\r\n/* Qt support */\r\n/* #undef HAVE_QT */\r\n\r\n/* Qt OpenGL support */\r\n/* #undef HAVE_QT_OPENGL */\r\n\r\n/* QuickTime video libraries */\r\n/* #undef HAVE_QUICKTIME */\r\n\r\n/* QTKit video libraries */\r\n/* #undef HAVE_QTKIT */\r\n\r\n/* Intel Threading Building Blocks */\r\n/* #undef HAVE_TBB */\r\n\r\n/* TIFF codec */\r\n#define HAVE_TIFF\r\n\r\n/* Unicap video capture library */\r\n/* #undef HAVE_UNICAP */\r\n\r\n/* Video for Windows support */\r\n/* #undef HAVE_VFW */\r\n\r\n/* V4L2 capturing support in videoio.h */\r\n/* #undef HAVE_VIDEOIO */\r\n\r\n/* Win32 UI */\r\n/* #undef HAVE_WIN32UI */\r\n\r\n/* XIMEA camera support */\r\n/* #undef HAVE_XIMEA */\r\n\r\n/* Xine video library */\r\n/* #undef HAVE_XINE */\r\n\r\n/* Define if your processor stores words with the most significant byte\r\n   first (like Motorola and SPARC, unlike Intel and VAX). */\r\n/* #undef WORDS_BIGENDIAN */\r\n\r\n/* gPhoto2 library */\r\n/* #undef HAVE_GPHOTO2 */\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/features2d/features2d.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/features2d.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/features2d.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_FEATURES_2D_HPP__\n#define __OPENCV_FEATURES_2D_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/flann/miniflann.hpp\"\n\n/**\n  @defgroup features2d 2D Features Framework\n  @{\n    @defgroup features2d_main Feature Detection and Description\n    @defgroup features2d_match Descriptor Matchers\n\nMatchers of keypoint descriptors in OpenCV have wrappers with a common interface that enables you to\neasily switch between different algorithms solving the same problem. This section is devoted to\nmatching descriptors that are represented as vectors in a multidimensional space. All objects that\nimplement vector descriptor matchers inherit the DescriptorMatcher interface.\n\n@note\n   -   An example explaining keypoint matching can be found at\n        opencv_source_code/samples/cpp/descriptor_extractor_matcher.cpp\n    -   An example on descriptor matching evaluation can be found at\n        opencv_source_code/samples/cpp/detector_descriptor_matcher_evaluation.cpp\n    -   An example on one to many image matching can be found at\n        opencv_source_code/samples/cpp/matching_to_many_images.cpp\n\n    @defgroup features2d_draw Drawing Function of Keypoints and Matches\n    @defgroup features2d_category Object Categorization\n\nThis section describes approaches based on local 2D features and used to categorize objects.\n\n@note\n   -   A complete Bag-Of-Words sample can be found at\n        opencv_source_code/samples/cpp/bagofwords_classification.cpp\n    -   (Python) An example using the features2D framework to perform object categorization can be\n        found at opencv_source_code/samples/python2/find_obj.py\n\n  @}\n */\n\nnamespace cv\n{\n\n//! @addtogroup features2d\n//! @{\n\n// //! writes vector of keypoints to the file storage\n// CV_EXPORTS void write(FileStorage& fs, const String& name, const std::vector<KeyPoint>& keypoints);\n// //! reads vector of keypoints from the specified file storage node\n// CV_EXPORTS void read(const FileNode& node, CV_OUT std::vector<KeyPoint>& keypoints);\n\n/** @brief A class filters a vector of keypoints.\n\n Because now it is difficult to provide a convenient interface for all usage scenarios of the\n keypoints filter class, it has only several needed by now static methods.\n */\nclass CV_EXPORTS KeyPointsFilter\n{\npublic:\n    KeyPointsFilter(){}\n\n    /*\n     * Remove keypoints within borderPixels of an image edge.\n     */\n    static void runByImageBorder( std::vector<KeyPoint>& keypoints, Size imageSize, int borderSize );\n    /*\n     * Remove keypoints of sizes out of range.\n     */\n    static void runByKeypointSize( std::vector<KeyPoint>& keypoints, float minSize,\n                                   float maxSize=FLT_MAX );\n    /*\n     * Remove keypoints from some image by mask for pixels of this image.\n     */\n    static void runByPixelsMask( std::vector<KeyPoint>& keypoints, const Mat& mask );\n    /*\n     * Remove duplicated keypoints.\n     */\n    static void removeDuplicated( std::vector<KeyPoint>& keypoints );\n\n    /*\n     * Retain the specified number of the best keypoints (according to the response)\n     */\n    static void retainBest( std::vector<KeyPoint>& keypoints, int npoints );\n};\n\n\n/************************************ Base Classes ************************************/\n\n/** @brief Abstract base class for 2D image feature detectors and descriptor extractors\n*/\nclass CV_EXPORTS_W Feature2D : public virtual Algorithm\n{\npublic:\n    virtual ~Feature2D();\n\n    /** @brief Detects keypoints in an image (first variant) or image set (second variant).\n\n    @param image Image.\n    @param keypoints The detected keypoints. In the second variant of the method keypoints[i] is a set\n    of keypoints detected in images[i] .\n    @param mask Mask specifying where to look for keypoints (optional). It must be a 8-bit integer\n    matrix with non-zero values in the region of interest.\n     */\n    CV_WRAP virtual void detect( InputArray image,\n                                 CV_OUT std::vector<KeyPoint>& keypoints,\n                                 InputArray mask=noArray() );\n\n    /** @overload\n    @param images Image set.\n    @param keypoints The detected keypoints. In the second variant of the method keypoints[i] is a set\n    of keypoints detected in images[i] .\n    @param masks Masks for each input image specifying where to look for keypoints (optional).\n    masks[i] is a mask for images[i].\n    */\n    virtual void detect( InputArrayOfArrays images,\n                         std::vector<std::vector<KeyPoint> >& keypoints,\n                         InputArrayOfArrays masks=noArray() );\n\n    /** @brief Computes the descriptors for a set of keypoints detected in an image (first variant) or image set\n    (second variant).\n\n    @param image Image.\n    @param keypoints Input collection of keypoints. Keypoints for which a descriptor cannot be\n    computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint\n    with several dominant orientations (for each orientation).\n    @param descriptors Computed descriptors. In the second variant of the method descriptors[i] are\n    descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the\n    descriptor for keypoint j-th keypoint.\n     */\n    CV_WRAP virtual void compute( InputArray image,\n                                  CV_OUT CV_IN_OUT std::vector<KeyPoint>& keypoints,\n                                  OutputArray descriptors );\n\n    /** @overload\n\n    @param images Image set.\n    @param keypoints Input collection of keypoints. Keypoints for which a descriptor cannot be\n    computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint\n    with several dominant orientations (for each orientation).\n    @param descriptors Computed descriptors. In the second variant of the method descriptors[i] are\n    descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the\n    descriptor for keypoint j-th keypoint.\n    */\n    virtual void compute( InputArrayOfArrays images,\n                          std::vector<std::vector<KeyPoint> >& keypoints,\n                          OutputArrayOfArrays descriptors );\n\n    /** Detects keypoints and computes the descriptors */\n    CV_WRAP virtual void detectAndCompute( InputArray image, InputArray mask,\n                                           CV_OUT std::vector<KeyPoint>& keypoints,\n                                           OutputArray descriptors,\n                                           bool useProvidedKeypoints=false );\n\n    CV_WRAP virtual int descriptorSize() const;\n    CV_WRAP virtual int descriptorType() const;\n    CV_WRAP virtual int defaultNorm() const;\n\n    //! Return true if detector object is empty\n    CV_WRAP virtual bool empty() const;\n};\n\n/** Feature detectors in OpenCV have wrappers with a common interface that enables you to easily switch\nbetween different algorithms solving the same problem. All objects that implement keypoint detectors\ninherit the FeatureDetector interface. */\ntypedef Feature2D FeatureDetector;\n\n/** Extractors of keypoint descriptors in OpenCV have wrappers with a common interface that enables you\nto easily switch between different algorithms solving the same problem. This section is devoted to\ncomputing descriptors represented as vectors in a multidimensional space. All objects that implement\nthe vector descriptor extractors inherit the DescriptorExtractor interface.\n */\ntypedef Feature2D DescriptorExtractor;\n\n//! @addtogroup features2d_main\n//! @{\n\n/** @brief Class implementing the BRISK keypoint detector and descriptor extractor, described in @cite LCS11 .\n */\nclass CV_EXPORTS_W BRISK : public Feature2D\n{\npublic:\n    /** @brief The BRISK constructor\n\n    @param thresh AGAST detection threshold score.\n    @param octaves detection octaves. Use 0 to do single scale.\n    @param patternScale apply this scale to the pattern used for sampling the neighbourhood of a\n    keypoint.\n     */\n    CV_WRAP static Ptr<BRISK> create(int thresh=30, int octaves=3, float patternScale=1.0f);\n\n    /** @brief The BRISK constructor for a custom pattern\n\n    @param radiusList defines the radii (in pixels) where the samples around a keypoint are taken (for\n    keypoint scale 1).\n    @param numberList defines the number of sampling points on the sampling circle. Must be the same\n    size as radiusList..\n    @param dMax threshold for the short pairings used for descriptor formation (in pixels for keypoint\n    scale 1).\n    @param dMin threshold for the long pairings used for orientation determination (in pixels for\n    keypoint scale 1).\n    @param indexChange index remapping of the bits. */\n    CV_WRAP static Ptr<BRISK> create(const std::vector<float> &radiusList, const std::vector<int> &numberList,\n        float dMax=5.85f, float dMin=8.2f, const std::vector<int>& indexChange=std::vector<int>());\n};\n\n/** @brief Class implementing the ORB (*oriented BRIEF*) keypoint detector and descriptor extractor\n\ndescribed in @cite RRKB11 . The algorithm uses FAST in pyramids to detect stable keypoints, selects\nthe strongest features using FAST or Harris response, finds their orientation using first-order\nmoments and computes the descriptors using BRIEF (where the coordinates of random point pairs (or\nk-tuples) are rotated according to the measured orientation).\n */\nclass CV_EXPORTS_W ORB : public Feature2D\n{\npublic:\n    enum { kBytes = 32, HARRIS_SCORE=0, FAST_SCORE=1 };\n\n    /** @brief The ORB constructor\n\n    @param nfeatures The maximum number of features to retain.\n    @param scaleFactor Pyramid decimation ratio, greater than 1. scaleFactor==2 means the classical\n    pyramid, where each next level has 4x less pixels than the previous, but such a big scale factor\n    will degrade feature matching scores dramatically. On the other hand, too close to 1 scale factor\n    will mean that to cover certain scale range you will need more pyramid levels and so the speed\n    will suffer.\n    @param nlevels The number of pyramid levels. The smallest level will have linear size equal to\n    input_image_linear_size/pow(scaleFactor, nlevels).\n    @param edgeThreshold This is size of the border where the features are not detected. It should\n    roughly match the patchSize parameter.\n    @param firstLevel It should be 0 in the current implementation.\n    @param WTA_K The number of points that produce each element of the oriented BRIEF descriptor. The\n    default value 2 means the BRIEF where we take a random point pair and compare their brightnesses,\n    so we get 0/1 response. Other possible values are 3 and 4. For example, 3 means that we take 3\n    random points (of course, those point coordinates are random, but they are generated from the\n    pre-defined seed, so each element of BRIEF descriptor is computed deterministically from the pixel\n    rectangle), find point of maximum brightness and output index of the winner (0, 1 or 2). Such\n    output will occupy 2 bits, and therefore it will need a special variant of Hamming distance,\n    denoted as NORM_HAMMING2 (2 bits per bin). When WTA_K=4, we take 4 random points to compute each\n    bin (that will also occupy 2 bits with possible values 0, 1, 2 or 3).\n    @param scoreType The default HARRIS_SCORE means that Harris algorithm is used to rank features\n    (the score is written to KeyPoint::score and is used to retain best nfeatures features);\n    FAST_SCORE is alternative value of the parameter that produces slightly less stable keypoints,\n    but it is a little faster to compute.\n    @param patchSize size of the patch used by the oriented BRIEF descriptor. Of course, on smaller\n    pyramid layers the perceived image area covered by a feature will be larger.\n    @param fastThreshold\n     */\n    CV_WRAP static Ptr<ORB> create(int nfeatures=500, float scaleFactor=1.2f, int nlevels=8, int edgeThreshold=31,\n        int firstLevel=0, int WTA_K=2, int scoreType=ORB::HARRIS_SCORE, int patchSize=31, int fastThreshold=20);\n\n    CV_WRAP virtual void setMaxFeatures(int maxFeatures) = 0;\n    CV_WRAP virtual int getMaxFeatures() const = 0;\n\n    CV_WRAP virtual void setScaleFactor(double scaleFactor) = 0;\n    CV_WRAP virtual double getScaleFactor() const = 0;\n\n    CV_WRAP virtual void setNLevels(int nlevels) = 0;\n    CV_WRAP virtual int getNLevels() const = 0;\n\n    CV_WRAP virtual void setEdgeThreshold(int edgeThreshold) = 0;\n    CV_WRAP virtual int getEdgeThreshold() const = 0;\n\n    CV_WRAP virtual void setFirstLevel(int firstLevel) = 0;\n    CV_WRAP virtual int getFirstLevel() const = 0;\n\n    CV_WRAP virtual void setWTA_K(int wta_k) = 0;\n    CV_WRAP virtual int getWTA_K() const = 0;\n\n    CV_WRAP virtual void setScoreType(int scoreType) = 0;\n    CV_WRAP virtual int getScoreType() const = 0;\n\n    CV_WRAP virtual void setPatchSize(int patchSize) = 0;\n    CV_WRAP virtual int getPatchSize() const = 0;\n\n    CV_WRAP virtual void setFastThreshold(int fastThreshold) = 0;\n    CV_WRAP virtual int getFastThreshold() const = 0;\n};\n\n/** @brief Maximally stable extremal region extractor. :\n\nThe class encapsulates all the parameters of the MSER extraction algorithm (see\n<http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions>). Also see\n<http://code.opencv.org/projects/opencv/wiki/MSER> for useful comments and parameters description.\n\n@note\n   -   (Python) A complete example showing the use of the MSER detector can be found at\n        opencv_source_code/samples/python2/mser.py\n */\nclass CV_EXPORTS_W MSER : public Feature2D\n{\npublic:\n    //! the full constructor\n    CV_WRAP static Ptr<MSER> create( int _delta=5, int _min_area=60, int _max_area=14400,\n          double _max_variation=0.25, double _min_diversity=.2,\n          int _max_evolution=200, double _area_threshold=1.01,\n          double _min_margin=0.003, int _edge_blur_size=5 );\n\n    CV_WRAP virtual void detectRegions( InputArray image,\n                                        CV_OUT std::vector<std::vector<Point> >& msers,\n                                        std::vector<Rect>& bboxes ) = 0;\n\n    CV_WRAP virtual void setDelta(int delta) = 0;\n    CV_WRAP virtual int getDelta() const = 0;\n\n    CV_WRAP virtual void setMinArea(int minArea) = 0;\n    CV_WRAP virtual int getMinArea() const = 0;\n\n    CV_WRAP virtual void setMaxArea(int maxArea) = 0;\n    CV_WRAP virtual int getMaxArea() const = 0;\n\n    CV_WRAP virtual void setPass2Only(bool f) = 0;\n    CV_WRAP virtual bool getPass2Only() const = 0;\n};\n\n/** @overload */\nCV_EXPORTS void FAST( InputArray image, CV_OUT std::vector<KeyPoint>& keypoints,\n                      int threshold, bool nonmaxSuppression=true );\n\n/** @brief Detects corners using the FAST algorithm\n\n@param image grayscale image where keypoints (corners) are detected.\n@param keypoints keypoints detected on the image.\n@param threshold threshold on difference between intensity of the central pixel and pixels of a\ncircle around this pixel.\n@param nonmaxSuppression if true, non-maximum suppression is applied to detected corners\n(keypoints).\n@param type one of the three neighborhoods as defined in the paper:\nFastFeatureDetector::TYPE_9_16, FastFeatureDetector::TYPE_7_12,\nFastFeatureDetector::TYPE_5_8\n\nDetects corners using the FAST algorithm by @cite Rosten06 .\n\n@note In Python API, types are given as cv2.FAST_FEATURE_DETECTOR_TYPE_5_8,\ncv2.FAST_FEATURE_DETECTOR_TYPE_7_12 and cv2.FAST_FEATURE_DETECTOR_TYPE_9_16. For corner\ndetection, use cv2.FAST.detect() method.\n */\nCV_EXPORTS void FAST( InputArray image, CV_OUT std::vector<KeyPoint>& keypoints,\n                      int threshold, bool nonmaxSuppression, int type );\n\n//! @} features2d_main\n\n//! @addtogroup features2d_main\n//! @{\n\n/** @brief Wrapping class for feature detection using the FAST method. :\n */\nclass CV_EXPORTS_W FastFeatureDetector : public Feature2D\n{\npublic:\n    enum\n    {\n        TYPE_5_8 = 0, TYPE_7_12 = 1, TYPE_9_16 = 2,\n        THRESHOLD = 10000, NONMAX_SUPPRESSION=10001, FAST_N=10002,\n    };\n\n    CV_WRAP static Ptr<FastFeatureDetector> create( int threshold=10,\n                                                    bool nonmaxSuppression=true,\n                                                    int type=FastFeatureDetector::TYPE_9_16 );\n\n    CV_WRAP virtual void setThreshold(int threshold) = 0;\n    CV_WRAP virtual int getThreshold() const = 0;\n\n    CV_WRAP virtual void setNonmaxSuppression(bool f) = 0;\n    CV_WRAP virtual bool getNonmaxSuppression() const = 0;\n\n    CV_WRAP virtual void setType(int type) = 0;\n    CV_WRAP virtual int getType() const = 0;\n};\n\n/** @overload */\nCV_EXPORTS void AGAST( InputArray image, CV_OUT std::vector<KeyPoint>& keypoints,\n                      int threshold, bool nonmaxSuppression=true );\n\n/** @brief Detects corners using the AGAST algorithm\n\n@param image grayscale image where keypoints (corners) are detected.\n@param keypoints keypoints detected on the image.\n@param threshold threshold on difference between intensity of the central pixel and pixels of a\ncircle around this pixel.\n@param nonmaxSuppression if true, non-maximum suppression is applied to detected corners\n(keypoints).\n@param type one of the four neighborhoods as defined in the paper:\nAgastFeatureDetector::AGAST_5_8, AgastFeatureDetector::AGAST_7_12d,\nAgastFeatureDetector::AGAST_7_12s, AgastFeatureDetector::OAST_9_16\n\nDetects corners using the AGAST algorithm by @cite mair2010_agast .\n\n */\nCV_EXPORTS void AGAST( InputArray image, CV_OUT std::vector<KeyPoint>& keypoints,\n                      int threshold, bool nonmaxSuppression, int type );\n//! @} features2d_main\n\n//! @addtogroup features2d_main\n//! @{\n\n/** @brief Wrapping class for feature detection using the AGAST method. :\n */\nclass CV_EXPORTS_W AgastFeatureDetector : public Feature2D\n{\npublic:\n    enum\n    {\n        AGAST_5_8 = 0, AGAST_7_12d = 1, AGAST_7_12s = 2, OAST_9_16 = 3,\n        THRESHOLD = 10000, NONMAX_SUPPRESSION = 10001,\n    };\n\n    CV_WRAP static Ptr<AgastFeatureDetector> create( int threshold=10,\n                                                     bool nonmaxSuppression=true,\n                                                     int type=AgastFeatureDetector::OAST_9_16 );\n\n    CV_WRAP virtual void setThreshold(int threshold) = 0;\n    CV_WRAP virtual int getThreshold() const = 0;\n\n    CV_WRAP virtual void setNonmaxSuppression(bool f) = 0;\n    CV_WRAP virtual bool getNonmaxSuppression() const = 0;\n\n    CV_WRAP virtual void setType(int type) = 0;\n    CV_WRAP virtual int getType() const = 0;\n};\n\n/** @brief Wrapping class for feature detection using the goodFeaturesToTrack function. :\n */\nclass CV_EXPORTS_W GFTTDetector : public Feature2D\n{\npublic:\n    CV_WRAP static Ptr<GFTTDetector> create( int maxCorners=1000, double qualityLevel=0.01, double minDistance=1,\n                                             int blockSize=3, bool useHarrisDetector=false, double k=0.04 );\n    CV_WRAP virtual void setMaxFeatures(int maxFeatures) = 0;\n    CV_WRAP virtual int getMaxFeatures() const = 0;\n\n    CV_WRAP virtual void setQualityLevel(double qlevel) = 0;\n    CV_WRAP virtual double getQualityLevel() const = 0;\n\n    CV_WRAP virtual void setMinDistance(double minDistance) = 0;\n    CV_WRAP virtual double getMinDistance() const = 0;\n\n    CV_WRAP virtual void setBlockSize(int blockSize) = 0;\n    CV_WRAP virtual int getBlockSize() const = 0;\n\n    CV_WRAP virtual void setHarrisDetector(bool val) = 0;\n    CV_WRAP virtual bool getHarrisDetector() const = 0;\n\n    CV_WRAP virtual void setK(double k) = 0;\n    CV_WRAP virtual double getK() const = 0;\n};\n\n/** @brief Class for extracting blobs from an image. :\n\nThe class implements a simple algorithm for extracting blobs from an image:\n\n1.  Convert the source image to binary images by applying thresholding with several thresholds from\n    minThreshold (inclusive) to maxThreshold (exclusive) with distance thresholdStep between\n    neighboring thresholds.\n2.  Extract connected components from every binary image by findContours and calculate their\n    centers.\n3.  Group centers from several binary images by their coordinates. Close centers form one group that\n    corresponds to one blob, which is controlled by the minDistBetweenBlobs parameter.\n4.  From the groups, estimate final centers of blobs and their radiuses and return as locations and\n    sizes of keypoints.\n\nThis class performs several filtrations of returned blobs. You should set filterBy\\* to true/false\nto turn on/off corresponding filtration. Available filtrations:\n\n-   **By color**. This filter compares the intensity of a binary image at the center of a blob to\nblobColor. If they differ, the blob is filtered out. Use blobColor = 0 to extract dark blobs\nand blobColor = 255 to extract light blobs.\n-   **By area**. Extracted blobs have an area between minArea (inclusive) and maxArea (exclusive).\n-   **By circularity**. Extracted blobs have circularity\n(\\f$\\frac{4*\\pi*Area}{perimeter * perimeter}\\f$) between minCircularity (inclusive) and\nmaxCircularity (exclusive).\n-   **By ratio of the minimum inertia to maximum inertia**. Extracted blobs have this ratio\nbetween minInertiaRatio (inclusive) and maxInertiaRatio (exclusive).\n-   **By convexity**. Extracted blobs have convexity (area / area of blob convex hull) between\nminConvexity (inclusive) and maxConvexity (exclusive).\n\nDefault values of parameters are tuned to extract dark circular blobs.\n */\nclass CV_EXPORTS_W SimpleBlobDetector : public Feature2D\n{\npublic:\n  struct CV_EXPORTS_W_SIMPLE Params\n  {\n      CV_WRAP Params();\n      CV_PROP_RW float thresholdStep;\n      CV_PROP_RW float minThreshold;\n      CV_PROP_RW float maxThreshold;\n      CV_PROP_RW size_t minRepeatability;\n      CV_PROP_RW float minDistBetweenBlobs;\n\n      CV_PROP_RW bool filterByColor;\n      CV_PROP_RW uchar blobColor;\n\n      CV_PROP_RW bool filterByArea;\n      CV_PROP_RW float minArea, maxArea;\n\n      CV_PROP_RW bool filterByCircularity;\n      CV_PROP_RW float minCircularity, maxCircularity;\n\n      CV_PROP_RW bool filterByInertia;\n      CV_PROP_RW float minInertiaRatio, maxInertiaRatio;\n\n      CV_PROP_RW bool filterByConvexity;\n      CV_PROP_RW float minConvexity, maxConvexity;\n\n      void read( const FileNode& fn );\n      void write( FileStorage& fs ) const;\n  };\n\n  CV_WRAP static Ptr<SimpleBlobDetector>\n    create(const SimpleBlobDetector::Params &parameters = SimpleBlobDetector::Params());\n};\n\n//! @} features2d_main\n\n//! @addtogroup features2d_main\n//! @{\n\n/** @brief Class implementing the KAZE keypoint detector and descriptor extractor, described in @cite ABD12 .\n\n@note AKAZE descriptor can only be used with KAZE or AKAZE keypoints .. [ABD12] KAZE Features. Pablo\nF. Alcantarilla, Adrien Bartoli and Andrew J. Davison. In European Conference on Computer Vision\n(ECCV), Fiorenze, Italy, October 2012.\n*/\nclass CV_EXPORTS_W KAZE : public Feature2D\n{\npublic:\n    enum\n    {\n        DIFF_PM_G1 = 0,\n        DIFF_PM_G2 = 1,\n        DIFF_WEICKERT = 2,\n        DIFF_CHARBONNIER = 3\n    };\n\n    /** @brief The KAZE constructor\n\n    @param extended Set to enable extraction of extended (128-byte) descriptor.\n    @param upright Set to enable use of upright descriptors (non rotation-invariant).\n    @param threshold Detector response threshold to accept point\n    @param nOctaves Maximum octave evolution of the image\n    @param nOctaveLayers Default number of sublevels per scale level\n    @param diffusivity Diffusivity type. DIFF_PM_G1, DIFF_PM_G2, DIFF_WEICKERT or\n    DIFF_CHARBONNIER\n     */\n    CV_WRAP static Ptr<KAZE> create(bool extended=false, bool upright=false,\n                                    float threshold = 0.001f,\n                                    int nOctaves = 4, int nOctaveLayers = 4,\n                                    int diffusivity = KAZE::DIFF_PM_G2);\n\n    CV_WRAP virtual void setExtended(bool extended) = 0;\n    CV_WRAP virtual bool getExtended() const = 0;\n\n    CV_WRAP virtual void setUpright(bool upright) = 0;\n    CV_WRAP virtual bool getUpright() const = 0;\n\n    CV_WRAP virtual void setThreshold(double threshold) = 0;\n    CV_WRAP virtual double getThreshold() const = 0;\n\n    CV_WRAP virtual void setNOctaves(int octaves) = 0;\n    CV_WRAP virtual int getNOctaves() const = 0;\n\n    CV_WRAP virtual void setNOctaveLayers(int octaveLayers) = 0;\n    CV_WRAP virtual int getNOctaveLayers() const = 0;\n\n    CV_WRAP virtual void setDiffusivity(int diff) = 0;\n    CV_WRAP virtual int getDiffusivity() const = 0;\n};\n\n/** @brief Class implementing the AKAZE keypoint detector and descriptor extractor, described in @cite ANB13 . :\n\n@note AKAZE descriptors can only be used with KAZE or AKAZE keypoints. Try to avoid using *extract*\nand *detect* instead of *operator()* due to performance reasons. .. [ANB13] Fast Explicit Diffusion\nfor Accelerated Features in Nonlinear Scale Spaces. Pablo F. Alcantarilla, Jesús Nuevo and Adrien\nBartoli. In British Machine Vision Conference (BMVC), Bristol, UK, September 2013.\n */\nclass CV_EXPORTS_W AKAZE : public Feature2D\n{\npublic:\n    // AKAZE descriptor type\n    enum\n    {\n        DESCRIPTOR_KAZE_UPRIGHT = 2, ///< Upright descriptors, not invariant to rotation\n        DESCRIPTOR_KAZE = 3,\n        DESCRIPTOR_MLDB_UPRIGHT = 4, ///< Upright descriptors, not invariant to rotation\n        DESCRIPTOR_MLDB = 5\n    };\n\n    /** @brief The AKAZE constructor\n\n    @param descriptor_type Type of the extracted descriptor: DESCRIPTOR_KAZE,\n    DESCRIPTOR_KAZE_UPRIGHT, DESCRIPTOR_MLDB or DESCRIPTOR_MLDB_UPRIGHT.\n    @param descriptor_size Size of the descriptor in bits. 0 -\\> Full size\n    @param descriptor_channels Number of channels in the descriptor (1, 2, 3)\n    @param threshold Detector response threshold to accept point\n    @param nOctaves Maximum octave evolution of the image\n    @param nOctaveLayers Default number of sublevels per scale level\n    @param diffusivity Diffusivity type. DIFF_PM_G1, DIFF_PM_G2, DIFF_WEICKERT or\n    DIFF_CHARBONNIER\n     */\n    CV_WRAP static Ptr<AKAZE> create(int descriptor_type=AKAZE::DESCRIPTOR_MLDB,\n                                     int descriptor_size = 0, int descriptor_channels = 3,\n                                     float threshold = 0.001f, int nOctaves = 4,\n                                     int nOctaveLayers = 4, int diffusivity = KAZE::DIFF_PM_G2);\n\n    CV_WRAP virtual void setDescriptorType(int dtype) = 0;\n    CV_WRAP virtual int getDescriptorType() const = 0;\n\n    CV_WRAP virtual void setDescriptorSize(int dsize) = 0;\n    CV_WRAP virtual int getDescriptorSize() const = 0;\n\n    CV_WRAP virtual void setDescriptorChannels(int dch) = 0;\n    CV_WRAP virtual int getDescriptorChannels() const = 0;\n\n    CV_WRAP virtual void setThreshold(double threshold) = 0;\n    CV_WRAP virtual double getThreshold() const = 0;\n\n    CV_WRAP virtual void setNOctaves(int octaves) = 0;\n    CV_WRAP virtual int getNOctaves() const = 0;\n\n    CV_WRAP virtual void setNOctaveLayers(int octaveLayers) = 0;\n    CV_WRAP virtual int getNOctaveLayers() const = 0;\n\n    CV_WRAP virtual void setDiffusivity(int diff) = 0;\n    CV_WRAP virtual int getDiffusivity() const = 0;\n};\n\n//! @} features2d_main\n\n/****************************************************************************************\\\n*                                      Distance                                          *\n\\****************************************************************************************/\n\ntemplate<typename T>\nstruct CV_EXPORTS Accumulator\n{\n    typedef T Type;\n};\n\ntemplate<> struct Accumulator<unsigned char>  { typedef float Type; };\ntemplate<> struct Accumulator<unsigned short> { typedef float Type; };\ntemplate<> struct Accumulator<char>   { typedef float Type; };\ntemplate<> struct Accumulator<short>  { typedef float Type; };\n\n/*\n * Squared Euclidean distance functor\n */\ntemplate<class T>\nstruct CV_EXPORTS SL2\n{\n    enum { normType = NORM_L2SQR };\n    typedef T ValueType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    ResultType operator()( const T* a, const T* b, int size ) const\n    {\n        return normL2Sqr<ValueType, ResultType>(a, b, size);\n    }\n};\n\n/*\n * Euclidean distance functor\n */\ntemplate<class T>\nstruct CV_EXPORTS L2\n{\n    enum { normType = NORM_L2 };\n    typedef T ValueType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    ResultType operator()( const T* a, const T* b, int size ) const\n    {\n        return (ResultType)std::sqrt((double)normL2Sqr<ValueType, ResultType>(a, b, size));\n    }\n};\n\n/*\n * Manhattan distance (city block distance) functor\n */\ntemplate<class T>\nstruct CV_EXPORTS L1\n{\n    enum { normType = NORM_L1 };\n    typedef T ValueType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    ResultType operator()( const T* a, const T* b, int size ) const\n    {\n        return normL1<ValueType, ResultType>(a, b, size);\n    }\n};\n\n/****************************************************************************************\\\n*                                  DescriptorMatcher                                     *\n\\****************************************************************************************/\n\n//! @addtogroup features2d_match\n//! @{\n\n/** @brief Abstract base class for matching keypoint descriptors.\n\nIt has two groups of match methods: for matching descriptors of an image with another image or with\nan image set.\n */\nclass CV_EXPORTS_W DescriptorMatcher : public Algorithm\n{\npublic:\n    virtual ~DescriptorMatcher();\n\n    /** @brief Adds descriptors to train a CPU(trainDescCollectionis) or GPU(utrainDescCollectionis) descriptor\n    collection.\n\n    If the collection is not empty, the new descriptors are added to existing train descriptors.\n\n    @param descriptors Descriptors to add. Each descriptors[i] is a set of descriptors from the same\n    train image.\n     */\n    CV_WRAP virtual void add( InputArrayOfArrays descriptors );\n\n    /** @brief Returns a constant link to the train descriptor collection trainDescCollection .\n     */\n    CV_WRAP const std::vector<Mat>& getTrainDescriptors() const;\n\n    /** @brief Clears the train descriptor collections.\n     */\n    CV_WRAP virtual void clear();\n\n    /** @brief Returns true if there are no train descriptors in the both collections.\n     */\n    CV_WRAP virtual bool empty() const;\n\n    /** @brief Returns true if the descriptor matcher supports masking permissible matches.\n     */\n    CV_WRAP virtual bool isMaskSupported() const = 0;\n\n    /** @brief Trains a descriptor matcher\n\n    Trains a descriptor matcher (for example, the flann index). In all methods to match, the method\n    train() is run every time before matching. Some descriptor matchers (for example, BruteForceMatcher)\n    have an empty implementation of this method. Other matchers really train their inner structures (for\n    example, FlannBasedMatcher trains flann::Index ).\n     */\n    CV_WRAP virtual void train();\n\n    /** @brief Finds the best match for each descriptor from a query set.\n\n    @param queryDescriptors Query set of descriptors.\n    @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors\n    collection stored in the class object.\n    @param matches Matches. If a query descriptor is masked out in mask , no match is added for this\n    descriptor. So, matches size may be smaller than the query descriptors count.\n    @param mask Mask specifying permissible matches between an input query and train matrices of\n    descriptors.\n\n    In the first variant of this method, the train descriptors are passed as an input argument. In the\n    second variant of the method, train descriptors collection that was set by DescriptorMatcher::add is\n    used. Optional mask (or masks) can be passed to specify which query and training descriptors can be\n    matched. Namely, queryDescriptors[i] can be matched with trainDescriptors[j] only if\n    mask.at\\<uchar\\>(i,j) is non-zero.\n     */\n    CV_WRAP void match( InputArray queryDescriptors, InputArray trainDescriptors,\n                CV_OUT std::vector<DMatch>& matches, InputArray mask=noArray() ) const;\n\n    /** @brief Finds the k best matches for each descriptor from a query set.\n\n    @param queryDescriptors Query set of descriptors.\n    @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors\n    collection stored in the class object.\n    @param mask Mask specifying permissible matches between an input query and train matrices of\n    descriptors.\n    @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.\n    @param k Count of best matches found per each query descriptor or less if a query descriptor has\n    less than k possible matches in total.\n    @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is\n    false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,\n    the matches vector does not contain matches for fully masked-out query descriptors.\n\n    These extended variants of DescriptorMatcher::match methods find several best matches for each query\n    descriptor. The matches are returned in the distance increasing order. See DescriptorMatcher::match\n    for the details about query and train descriptors.\n     */\n    CV_WRAP void knnMatch( InputArray queryDescriptors, InputArray trainDescriptors,\n                   CV_OUT std::vector<std::vector<DMatch> >& matches, int k,\n                   InputArray mask=noArray(), bool compactResult=false ) const;\n\n    /** @brief For each query descriptor, finds the training descriptors not farther than the specified distance.\n\n    @param queryDescriptors Query set of descriptors.\n    @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors\n    collection stored in the class object.\n    @param matches Found matches.\n    @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is\n    false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,\n    the matches vector does not contain matches for fully masked-out query descriptors.\n    @param maxDistance Threshold for the distance between matched descriptors. Distance means here\n    metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured\n    in Pixels)!\n    @param mask Mask specifying permissible matches between an input query and train matrices of\n    descriptors.\n\n    For each query descriptor, the methods find such training descriptors that the distance between the\n    query descriptor and the training descriptor is equal or smaller than maxDistance. Found matches are\n    returned in the distance increasing order.\n     */\n    void radiusMatch( InputArray queryDescriptors, InputArray trainDescriptors,\n                      std::vector<std::vector<DMatch> >& matches, float maxDistance,\n                      InputArray mask=noArray(), bool compactResult=false ) const;\n\n    /** @overload\n    @param queryDescriptors Query set of descriptors.\n    @param matches Matches. If a query descriptor is masked out in mask , no match is added for this\n    descriptor. So, matches size may be smaller than the query descriptors count.\n    @param masks Set of masks. Each masks[i] specifies permissible matches between the input query\n    descriptors and stored train descriptors from the i-th image trainDescCollection[i].\n    */\n    CV_WRAP void match( InputArray queryDescriptors, CV_OUT std::vector<DMatch>& matches,\n                        InputArrayOfArrays masks=noArray() );\n    /** @overload\n    @param queryDescriptors Query set of descriptors.\n    @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.\n    @param k Count of best matches found per each query descriptor or less if a query descriptor has\n    less than k possible matches in total.\n    @param masks Set of masks. Each masks[i] specifies permissible matches between the input query\n    descriptors and stored train descriptors from the i-th image trainDescCollection[i].\n    @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is\n    false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,\n    the matches vector does not contain matches for fully masked-out query descriptors.\n    */\n    CV_WRAP void knnMatch( InputArray queryDescriptors, CV_OUT std::vector<std::vector<DMatch> >& matches, int k,\n                           InputArrayOfArrays masks=noArray(), bool compactResult=false );\n    /** @overload\n    @param queryDescriptors Query set of descriptors.\n    @param matches Found matches.\n    @param maxDistance Threshold for the distance between matched descriptors. Distance means here\n    metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured\n    in Pixels)!\n    @param masks Set of masks. Each masks[i] specifies permissible matches between the input query\n    descriptors and stored train descriptors from the i-th image trainDescCollection[i].\n    @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is\n    false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,\n    the matches vector does not contain matches for fully masked-out query descriptors.\n    */\n    void radiusMatch( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,\n                      InputArrayOfArrays masks=noArray(), bool compactResult=false );\n\n    // Reads matcher object from a file node\n    virtual void read( const FileNode& );\n    // Writes matcher object to a file storage\n    virtual void write( FileStorage& ) const;\n\n    /** @brief Clones the matcher.\n\n    @param emptyTrainData If emptyTrainData is false, the method creates a deep copy of the object,\n    that is, copies both parameters and train data. If emptyTrainData is true, the method creates an\n    object copy with the current parameters but with empty train data.\n     */\n    virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const = 0;\n\n    /** @brief Creates a descriptor matcher of a given type with the default parameters (using default\n    constructor).\n\n    @param descriptorMatcherType Descriptor matcher type. Now the following matcher types are\n    supported:\n    -   `BruteForce` (it uses L2 )\n    -   `BruteForce-L1`\n    -   `BruteForce-Hamming`\n    -   `BruteForce-Hamming(2)`\n    -   `FlannBased`\n     */\n    CV_WRAP static Ptr<DescriptorMatcher> create( const String& descriptorMatcherType );\nprotected:\n    /**\n     * Class to work with descriptors from several images as with one merged matrix.\n     * It is used e.g. in FlannBasedMatcher.\n     */\n    class CV_EXPORTS DescriptorCollection\n    {\n    public:\n        DescriptorCollection();\n        DescriptorCollection( const DescriptorCollection& collection );\n        virtual ~DescriptorCollection();\n\n        // Vector of matrices \"descriptors\" will be merged to one matrix \"mergedDescriptors\" here.\n        void set( const std::vector<Mat>& descriptors );\n        virtual void clear();\n\n        const Mat& getDescriptors() const;\n        const Mat getDescriptor( int imgIdx, int localDescIdx ) const;\n        const Mat getDescriptor( int globalDescIdx ) const;\n        void getLocalIdx( int globalDescIdx, int& imgIdx, int& localDescIdx ) const;\n\n        int size() const;\n\n    protected:\n        Mat mergedDescriptors;\n        std::vector<int> startIdxs;\n    };\n\n    //! In fact the matching is implemented only by the following two methods. These methods suppose\n    //! that the class object has been trained already. Public match methods call these methods\n    //! after calling train().\n    virtual void knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k,\n        InputArrayOfArrays masks=noArray(), bool compactResult=false ) = 0;\n    virtual void radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,\n        InputArrayOfArrays masks=noArray(), bool compactResult=false ) = 0;\n\n    static bool isPossibleMatch( InputArray mask, int queryIdx, int trainIdx );\n    static bool isMaskedOut( InputArrayOfArrays masks, int queryIdx );\n\n    static Mat clone_op( Mat m ) { return m.clone(); }\n    void checkMasks( InputArrayOfArrays masks, int queryDescriptorsCount ) const;\n\n    //! Collection of descriptors from train images.\n    std::vector<Mat> trainDescCollection;\n    std::vector<UMat> utrainDescCollection;\n};\n\n/** @brief Brute-force descriptor matcher.\n\nFor each descriptor in the first set, this matcher finds the closest descriptor in the second set\nby trying each one. This descriptor matcher supports masking permissible matches of descriptor\nsets.\n */\nclass CV_EXPORTS_W BFMatcher : public DescriptorMatcher\n{\npublic:\n    /** @brief Brute-force matcher constructor.\n\n    @param normType One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are\n    preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and\n    BRIEF, NORM_HAMMING2 should be used with ORB when WTA_K==3 or 4 (see ORB::ORB constructor\n    description).\n    @param crossCheck If it is false, this is will be default BFMatcher behaviour when it finds the k\n    nearest neighbors for each query descriptor. If crossCheck==true, then the knnMatch() method with\n    k=1 will only return pairs (i,j) such that for i-th query descriptor the j-th descriptor in the\n    matcher's collection is the nearest and vice versa, i.e. the BFMatcher will only return consistent\n    pairs. Such technique usually produces best results with minimal number of outliers when there are\n    enough matches. This is alternative to the ratio test, used by D. Lowe in SIFT paper.\n     */\n    CV_WRAP BFMatcher( int normType=NORM_L2, bool crossCheck=false );\n    virtual ~BFMatcher() {}\n\n    virtual bool isMaskSupported() const { return true; }\n\n    virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const;\nprotected:\n    virtual void knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k,\n        InputArrayOfArrays masks=noArray(), bool compactResult=false );\n    virtual void radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,\n        InputArrayOfArrays masks=noArray(), bool compactResult=false );\n\n    int normType;\n    bool crossCheck;\n};\n\n\n/** @brief Flann-based descriptor matcher.\n\nThis matcher trains flann::Index_ on a train descriptor collection and calls its nearest search\nmethods to find the best matches. So, this matcher may be faster when matching a large train\ncollection than the brute force matcher. FlannBasedMatcher does not support masking permissible\nmatches of descriptor sets because flann::Index does not support this. :\n */\nclass CV_EXPORTS_W FlannBasedMatcher : public DescriptorMatcher\n{\npublic:\n    CV_WRAP FlannBasedMatcher( const Ptr<flann::IndexParams>& indexParams=makePtr<flann::KDTreeIndexParams>(),\n                       const Ptr<flann::SearchParams>& searchParams=makePtr<flann::SearchParams>() );\n\n    virtual void add( InputArrayOfArrays descriptors );\n    virtual void clear();\n\n    // Reads matcher object from a file node\n    virtual void read( const FileNode& );\n    // Writes matcher object to a file storage\n    virtual void write( FileStorage& ) const;\n\n    virtual void train();\n    virtual bool isMaskSupported() const;\n\n    virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const;\nprotected:\n    static void convertToDMatches( const DescriptorCollection& descriptors,\n                                   const Mat& indices, const Mat& distances,\n                                   std::vector<std::vector<DMatch> >& matches );\n\n    virtual void knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k,\n        InputArrayOfArrays masks=noArray(), bool compactResult=false );\n    virtual void radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,\n        InputArrayOfArrays masks=noArray(), bool compactResult=false );\n\n    Ptr<flann::IndexParams> indexParams;\n    Ptr<flann::SearchParams> searchParams;\n    Ptr<flann::Index> flannIndex;\n\n    DescriptorCollection mergedDescriptors;\n    int addedDescCount;\n};\n\n//! @} features2d_match\n\n/****************************************************************************************\\\n*                                   Drawing functions                                    *\n\\****************************************************************************************/\n\n//! @addtogroup features2d_draw\n//! @{\n\nstruct CV_EXPORTS DrawMatchesFlags\n{\n    enum{ DEFAULT = 0, //!< Output image matrix will be created (Mat::create),\n                       //!< i.e. existing memory of output image may be reused.\n                       //!< Two source image, matches and single keypoints will be drawn.\n                       //!< For each keypoint only the center point will be drawn (without\n                       //!< the circle around keypoint with keypoint size and orientation).\n          DRAW_OVER_OUTIMG = 1, //!< Output image matrix will not be created (Mat::create).\n                                //!< Matches will be drawn on existing content of output image.\n          NOT_DRAW_SINGLE_POINTS = 2, //!< Single keypoints will not be drawn.\n          DRAW_RICH_KEYPOINTS = 4 //!< For each keypoint the circle around keypoint with keypoint size and\n                                  //!< orientation will be drawn.\n        };\n};\n\n/** @brief Draws keypoints.\n\n@param image Source image.\n@param keypoints Keypoints from the source image.\n@param outImage Output image. Its content depends on the flags value defining what is drawn in the\noutput image. See possible flags bit values below.\n@param color Color of keypoints.\n@param flags Flags setting drawing features. Possible flags bit values are defined by\nDrawMatchesFlags. See details above in drawMatches .\n\n@note\nFor Python API, flags are modified as cv2.DRAW_MATCHES_FLAGS_DEFAULT,\ncv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS, cv2.DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG,\ncv2.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS\n */\nCV_EXPORTS_W void drawKeypoints( InputArray image, const std::vector<KeyPoint>& keypoints, InputOutputArray outImage,\n                               const Scalar& color=Scalar::all(-1), int flags=DrawMatchesFlags::DEFAULT );\n\n/** @brief Draws the found matches of keypoints from two images.\n\n@param img1 First source image.\n@param keypoints1 Keypoints from the first source image.\n@param img2 Second source image.\n@param keypoints2 Keypoints from the second source image.\n@param matches1to2 Matches from the first image to the second one, which means that keypoints1[i]\nhas a corresponding point in keypoints2[matches[i]] .\n@param outImg Output image. Its content depends on the flags value defining what is drawn in the\noutput image. See possible flags bit values below.\n@param matchColor Color of matches (lines and connected keypoints). If matchColor==Scalar::all(-1)\n, the color is generated randomly.\n@param singlePointColor Color of single keypoints (circles), which means that keypoints do not\nhave the matches. If singlePointColor==Scalar::all(-1) , the color is generated randomly.\n@param matchesMask Mask determining which matches are drawn. If the mask is empty, all matches are\ndrawn.\n@param flags Flags setting drawing features. Possible flags bit values are defined by\nDrawMatchesFlags.\n\nThis function draws matches of keypoints from two images in the output image. Match is a line\nconnecting two keypoints (circles). See cv::DrawMatchesFlags.\n */\nCV_EXPORTS_W void drawMatches( InputArray img1, const std::vector<KeyPoint>& keypoints1,\n                             InputArray img2, const std::vector<KeyPoint>& keypoints2,\n                             const std::vector<DMatch>& matches1to2, InputOutputArray outImg,\n                             const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1),\n                             const std::vector<char>& matchesMask=std::vector<char>(), int flags=DrawMatchesFlags::DEFAULT );\n\n/** @overload */\nCV_EXPORTS_AS(drawMatchesKnn) void drawMatches( InputArray img1, const std::vector<KeyPoint>& keypoints1,\n                             InputArray img2, const std::vector<KeyPoint>& keypoints2,\n                             const std::vector<std::vector<DMatch> >& matches1to2, InputOutputArray outImg,\n                             const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1),\n                             const std::vector<std::vector<char> >& matchesMask=std::vector<std::vector<char> >(), int flags=DrawMatchesFlags::DEFAULT );\n\n//! @} features2d_draw\n\n/****************************************************************************************\\\n*   Functions to evaluate the feature detectors and [generic] descriptor extractors      *\n\\****************************************************************************************/\n\nCV_EXPORTS void evaluateFeatureDetector( const Mat& img1, const Mat& img2, const Mat& H1to2,\n                                         std::vector<KeyPoint>* keypoints1, std::vector<KeyPoint>* keypoints2,\n                                         float& repeatability, int& correspCount,\n                                         const Ptr<FeatureDetector>& fdetector=Ptr<FeatureDetector>() );\n\nCV_EXPORTS void computeRecallPrecisionCurve( const std::vector<std::vector<DMatch> >& matches1to2,\n                                             const std::vector<std::vector<uchar> >& correctMatches1to2Mask,\n                                             std::vector<Point2f>& recallPrecisionCurve );\n\nCV_EXPORTS float getRecall( const std::vector<Point2f>& recallPrecisionCurve, float l_precision );\nCV_EXPORTS int getNearestPoint( const std::vector<Point2f>& recallPrecisionCurve, float l_precision );\n\n/****************************************************************************************\\\n*                                     Bag of visual words                                *\n\\****************************************************************************************/\n\n//! @addtogroup features2d_category\n//! @{\n\n/** @brief Abstract base class for training the *bag of visual words* vocabulary from a set of descriptors.\n\nFor details, see, for example, *Visual Categorization with Bags of Keypoints* by Gabriella Csurka,\nChristopher R. Dance, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. :\n */\nclass CV_EXPORTS_W BOWTrainer\n{\npublic:\n    BOWTrainer();\n    virtual ~BOWTrainer();\n\n    /** @brief Adds descriptors to a training set.\n\n    @param descriptors Descriptors to add to a training set. Each row of the descriptors matrix is a\n    descriptor.\n\n    The training set is clustered using clustermethod to construct the vocabulary.\n     */\n    CV_WRAP void add( const Mat& descriptors );\n\n    /** @brief Returns a training set of descriptors.\n    */\n    CV_WRAP const std::vector<Mat>& getDescriptors() const;\n\n    /** @brief Returns the count of all descriptors stored in the training set.\n    */\n    CV_WRAP int descriptorsCount() const;\n\n    CV_WRAP virtual void clear();\n\n    /** @overload */\n    CV_WRAP virtual Mat cluster() const = 0;\n\n    /** @brief Clusters train descriptors.\n\n    @param descriptors Descriptors to cluster. Each row of the descriptors matrix is a descriptor.\n    Descriptors are not added to the inner train descriptor set.\n\n    The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first\n    variant of the method, train descriptors stored in the object are clustered. In the second variant,\n    input descriptors are clustered.\n     */\n    CV_WRAP virtual Mat cluster( const Mat& descriptors ) const = 0;\n\nprotected:\n    std::vector<Mat> descriptors;\n    int size;\n};\n\n/** @brief kmeans -based class to train visual vocabulary using the *bag of visual words* approach. :\n */\nclass CV_EXPORTS_W BOWKMeansTrainer : public BOWTrainer\n{\npublic:\n    /** @brief The constructor.\n\n    @see cv::kmeans\n    */\n    CV_WRAP BOWKMeansTrainer( int clusterCount, const TermCriteria& termcrit=TermCriteria(),\n                      int attempts=3, int flags=KMEANS_PP_CENTERS );\n    virtual ~BOWKMeansTrainer();\n\n    // Returns trained vocabulary (i.e. cluster centers).\n    CV_WRAP virtual Mat cluster() const;\n    CV_WRAP virtual Mat cluster( const Mat& descriptors ) const;\n\nprotected:\n\n    int clusterCount;\n    TermCriteria termcrit;\n    int attempts;\n    int flags;\n};\n\n/** @brief Class to compute an image descriptor using the *bag of visual words*.\n\nSuch a computation consists of the following steps:\n\n1.  Compute descriptors for a given image and its keypoints set.\n2.  Find the nearest visual words from the vocabulary for each keypoint descriptor.\n3.  Compute the bag-of-words image descriptor as is a normalized histogram of vocabulary words\nencountered in the image. The i-th bin of the histogram is a frequency of i-th word of the\nvocabulary in the given image.\n */\nclass CV_EXPORTS_W BOWImgDescriptorExtractor\n{\npublic:\n    /** @brief The constructor.\n\n    @param dextractor Descriptor extractor that is used to compute descriptors for an input image and\n    its keypoints.\n    @param dmatcher Descriptor matcher that is used to find the nearest word of the trained vocabulary\n    for each keypoint descriptor of the image.\n     */\n    CV_WRAP BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>& dextractor,\n                               const Ptr<DescriptorMatcher>& dmatcher );\n    /** @overload */\n    BOWImgDescriptorExtractor( const Ptr<DescriptorMatcher>& dmatcher );\n    virtual ~BOWImgDescriptorExtractor();\n\n    /** @brief Sets a visual vocabulary.\n\n    @param vocabulary Vocabulary (can be trained using the inheritor of BOWTrainer ). Each row of the\n    vocabulary is a visual word (cluster center).\n     */\n    CV_WRAP void setVocabulary( const Mat& vocabulary );\n\n    /** @brief Returns the set vocabulary.\n    */\n    CV_WRAP const Mat& getVocabulary() const;\n\n    /** @brief Computes an image descriptor using the set visual vocabulary.\n\n    @param image Image, for which the descriptor is computed.\n    @param keypoints Keypoints detected in the input image.\n    @param imgDescriptor Computed output image descriptor.\n    @param pointIdxsOfClusters Indices of keypoints that belong to the cluster. This means that\n    pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary)\n    returned if it is non-zero.\n    @param descriptors Descriptors of the image keypoints that are returned if they are non-zero.\n     */\n    void compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray imgDescriptor,\n                  std::vector<std::vector<int> >* pointIdxsOfClusters=0, Mat* descriptors=0 );\n    /** @overload\n    @param keypointDescriptors Computed descriptors to match with vocabulary.\n    @param imgDescriptor Computed output image descriptor.\n    @param pointIdxsOfClusters Indices of keypoints that belong to the cluster. This means that\n    pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary)\n    returned if it is non-zero.\n    */\n    void compute( InputArray keypointDescriptors, OutputArray imgDescriptor,\n                  std::vector<std::vector<int> >* pointIdxsOfClusters=0 );\n    // compute() is not constant because DescriptorMatcher::match is not constant\n\n    CV_WRAP_AS(compute) void compute2( const Mat& image, std::vector<KeyPoint>& keypoints, CV_OUT Mat& imgDescriptor )\n    { compute(image,keypoints,imgDescriptor); }\n\n    /** @brief Returns an image descriptor size if the vocabulary is set. Otherwise, it returns 0.\n    */\n    CV_WRAP int descriptorSize() const;\n\n    /** @brief Returns an image descriptor type.\n     */\n    CV_WRAP int descriptorType() const;\n\nprotected:\n    Mat vocabulary;\n    Ptr<DescriptorExtractor> dextractor;\n    Ptr<DescriptorMatcher> dmatcher;\n};\n\n//! @} features2d_category\n\n//! @} features2d\n\n} /* namespace cv */\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/all_indices.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). 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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n\n#ifndef OPENCV_FLANN_ALL_INDICES_H_\n#define OPENCV_FLANN_ALL_INDICES_H_\n\n#include \"general.h\"\n\n#include \"nn_index.h\"\n#include \"kdtree_index.h\"\n#include \"kdtree_single_index.h\"\n#include \"kmeans_index.h\"\n#include \"composite_index.h\"\n#include \"linear_index.h\"\n#include \"hierarchical_clustering_index.h\"\n#include \"lsh_index.h\"\n#include \"autotuned_index.h\"\n\n\nnamespace cvflann\n{\n\ntemplate<typename KDTreeCapability, typename VectorSpace, typename Distance>\nstruct index_creator\n{\n    static NNIndex<Distance>* create(const Matrix<typename Distance::ElementType>& dataset, const IndexParams& params, const Distance& distance)\n    {\n        flann_algorithm_t index_type = get_param<flann_algorithm_t>(params, \"algorithm\");\n\n        NNIndex<Distance>* nnIndex;\n        switch (index_type) {\n        case FLANN_INDEX_LINEAR:\n            nnIndex = new LinearIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_KDTREE_SINGLE:\n            nnIndex = new KDTreeSingleIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_KDTREE:\n            nnIndex = new KDTreeIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_KMEANS:\n            nnIndex = new KMeansIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_COMPOSITE:\n            nnIndex = new CompositeIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_AUTOTUNED:\n            nnIndex = new AutotunedIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_HIERARCHICAL:\n            nnIndex = new HierarchicalClusteringIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_LSH:\n            nnIndex = new LshIndex<Distance>(dataset, params, distance);\n            break;\n        default:\n            throw FLANNException(\"Unknown index type\");\n        }\n\n        return nnIndex;\n    }\n};\n\ntemplate<typename VectorSpace, typename Distance>\nstruct index_creator<False,VectorSpace,Distance>\n{\n    static NNIndex<Distance>* create(const Matrix<typename Distance::ElementType>& dataset, const IndexParams& params, const Distance& distance)\n    {\n        flann_algorithm_t index_type = get_param<flann_algorithm_t>(params, \"algorithm\");\n\n        NNIndex<Distance>* nnIndex;\n        switch (index_type) {\n        case FLANN_INDEX_LINEAR:\n            nnIndex = new LinearIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_KMEANS:\n            nnIndex = new KMeansIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_HIERARCHICAL:\n            nnIndex = new HierarchicalClusteringIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_LSH:\n            nnIndex = new LshIndex<Distance>(dataset, params, distance);\n            break;\n        default:\n            throw FLANNException(\"Unknown index type\");\n        }\n\n        return nnIndex;\n    }\n};\n\ntemplate<typename Distance>\nstruct index_creator<False,False,Distance>\n{\n    static NNIndex<Distance>* create(const Matrix<typename Distance::ElementType>& dataset, const IndexParams& params, const Distance& distance)\n    {\n        flann_algorithm_t index_type = get_param<flann_algorithm_t>(params, \"algorithm\");\n\n        NNIndex<Distance>* nnIndex;\n        switch (index_type) {\n        case FLANN_INDEX_LINEAR:\n            nnIndex = new LinearIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_HIERARCHICAL:\n            nnIndex = new HierarchicalClusteringIndex<Distance>(dataset, params, distance);\n            break;\n        case FLANN_INDEX_LSH:\n            nnIndex = new LshIndex<Distance>(dataset, params, distance);\n            break;\n        default:\n            throw FLANNException(\"Unknown index type\");\n        }\n\n        return nnIndex;\n    }\n};\n\ntemplate<typename Distance>\nNNIndex<Distance>* create_index_by_type(const Matrix<typename Distance::ElementType>& dataset, const IndexParams& params, const Distance& distance)\n{\n    return index_creator<typename Distance::is_kdtree_distance,\n                         typename Distance::is_vector_space_distance,\n                         Distance>::create(dataset, params,distance);\n}\n\n}\n\n#endif /* OPENCV_FLANN_ALL_INDICES_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/allocator.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_ALLOCATOR_H_\n#define OPENCV_FLANN_ALLOCATOR_H_\n\n#include <stdlib.h>\n#include <stdio.h>\n\n\nnamespace cvflann\n{\n\n/**\n * Allocates (using C's malloc) a generic type T.\n *\n * Params:\n *     count = number of instances to allocate.\n * Returns: pointer (of type T*) to memory buffer\n */\ntemplate <typename T>\nT* allocate(size_t count = 1)\n{\n    T* mem = (T*) ::malloc(sizeof(T)*count);\n    return mem;\n}\n\n\n/**\n * Pooled storage allocator\n *\n * The following routines allow for the efficient allocation of storage in\n * small chunks from a specified pool.  Rather than allowing each structure\n * to be freed individually, an entire pool of storage is freed at once.\n * This method has two advantages over just using malloc() and free().  First,\n * it is far more efficient for allocating small objects, as there is\n * no overhead for remembering all the information needed to free each\n * object or consolidating fragmented memory.  Second, the decision about\n * how long to keep an object is made at the time of allocation, and there\n * is no need to track down all the objects to free them.\n *\n */\n\nconst size_t     WORDSIZE=16;\nconst  size_t     BLOCKSIZE=8192;\n\nclass PooledAllocator\n{\n    /* We maintain memory alignment to word boundaries by requiring that all\n        allocations be in multiples of the machine wordsize.  */\n    /* Size of machine word in bytes.  Must be power of 2. */\n    /* Minimum number of bytes requested at a time from\tthe system.  Must be multiple of WORDSIZE. */\n\n\n    int     remaining;  /* Number of bytes left in current block of storage. */\n    void*   base;     /* Pointer to base of current block of storage. */\n    void*   loc;      /* Current location in block to next allocate memory. */\n    int     blocksize;\n\n\npublic:\n    int     usedMemory;\n    int     wastedMemory;\n\n    /**\n        Default constructor. Initializes a new pool.\n     */\n    PooledAllocator(int blockSize = BLOCKSIZE)\n    {\n        blocksize = blockSize;\n        remaining = 0;\n        base = NULL;\n\n        usedMemory = 0;\n        wastedMemory = 0;\n    }\n\n    /**\n     * Destructor. Frees all the memory allocated in this pool.\n     */\n    ~PooledAllocator()\n    {\n        void* prev;\n\n        while (base != NULL) {\n            prev = *((void**) base); /* Get pointer to prev block. */\n            ::free(base);\n            base = prev;\n        }\n    }\n\n    /**\n     * Returns a pointer to a piece of new memory of the given size in bytes\n     * allocated from the pool.\n     */\n    void* allocateMemory(int size)\n    {\n        int blockSize;\n\n        /* Round size up to a multiple of wordsize.  The following expression\n            only works for WORDSIZE that is a power of 2, by masking last bits of\n            incremented size to zero.\n         */\n        size = (size + (WORDSIZE - 1)) & ~(WORDSIZE - 1);\n\n        /* Check whether a new block must be allocated.  Note that the first word\n            of a block is reserved for a pointer to the previous block.\n         */\n        if (size > remaining) {\n\n            wastedMemory += remaining;\n\n            /* Allocate new storage. */\n            blockSize = (size + sizeof(void*) + (WORDSIZE-1) > BLOCKSIZE) ?\n                        size + sizeof(void*) + (WORDSIZE-1) : BLOCKSIZE;\n\n            // use the standard C malloc to allocate memory\n            void* m = ::malloc(blockSize);\n            if (!m) {\n                fprintf(stderr,\"Failed to allocate memory.\\n\");\n                return NULL;\n            }\n\n            /* Fill first word of new block with pointer to previous block. */\n            ((void**) m)[0] = base;\n            base = m;\n\n            int shift = 0;\n            //int shift = (WORDSIZE - ( (((size_t)m) + sizeof(void*)) & (WORDSIZE-1))) & (WORDSIZE-1);\n\n            remaining = blockSize - sizeof(void*) - shift;\n            loc = ((char*)m + sizeof(void*) + shift);\n        }\n        void* rloc = loc;\n        loc = (char*)loc + size;\n        remaining -= size;\n\n        usedMemory += size;\n\n        return rloc;\n    }\n\n    /**\n     * Allocates (using this pool) a generic type T.\n     *\n     * Params:\n     *     count = number of instances to allocate.\n     * Returns: pointer (of type T*) to memory buffer\n     */\n    template <typename T>\n    T* allocate(size_t count = 1)\n    {\n        T* mem = (T*) this->allocateMemory((int)(sizeof(T)*count));\n        return mem;\n    }\n\n};\n\n}\n\n#endif //OPENCV_FLANN_ALLOCATOR_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/any.h",
    "content": "#ifndef OPENCV_FLANN_ANY_H_\n#define OPENCV_FLANN_ANY_H_\n/*\n * (C) Copyright Christopher Diggins 2005-2011\n * (C) Copyright Pablo Aguilar 2005\n * (C) Copyright Kevlin Henney 2001\n *\n * Distributed under the Boost Software License, Version 1.0. (See\n * accompanying file LICENSE_1_0.txt or copy at\n * http://www.boost.org/LICENSE_1_0.txt\n *\n * Adapted for FLANN by Marius Muja\n */\n\n#include \"defines.h\"\n#include <stdexcept>\n#include <ostream>\n#include <typeinfo>\n\nnamespace cvflann\n{\n\nnamespace anyimpl\n{\n\nstruct bad_any_cast\n{\n};\n\nstruct empty_any\n{\n};\n\ninline std::ostream& operator <<(std::ostream& out, const empty_any&)\n{\n    out << \"[empty_any]\";\n    return out;\n}\n\nstruct base_any_policy\n{\n    virtual void static_delete(void** x) = 0;\n    virtual void copy_from_value(void const* src, void** dest) = 0;\n    virtual void clone(void* const* src, void** dest) = 0;\n    virtual void move(void* const* src, void** dest) = 0;\n    virtual void* get_value(void** src) = 0;\n    virtual const void* get_value(void* const * src) = 0;\n    virtual ::size_t get_size() = 0;\n    virtual const std::type_info& type() = 0;\n    virtual void print(std::ostream& out, void* const* src) = 0;\n    virtual ~base_any_policy() {}\n};\n\ntemplate<typename T>\nstruct typed_base_any_policy : base_any_policy\n{\n    virtual ::size_t get_size() { return sizeof(T); }\n    virtual const std::type_info& type() { return typeid(T); }\n\n};\n\ntemplate<typename T>\nstruct small_any_policy : typed_base_any_policy<T>\n{\n    virtual void static_delete(void**) { }\n    virtual void copy_from_value(void const* src, void** dest)\n    {\n        new (dest) T(* reinterpret_cast<T const*>(src));\n    }\n    virtual void clone(void* const* src, void** dest) { *dest = *src; }\n    virtual void move(void* const* src, void** dest) { *dest = *src; }\n    virtual void* get_value(void** src) { return reinterpret_cast<void*>(src); }\n    virtual const void* get_value(void* const * src) { return reinterpret_cast<const void*>(src); }\n    virtual void print(std::ostream& out, void* const* src) { out << *reinterpret_cast<T const*>(src); }\n};\n\ntemplate<typename T>\nstruct big_any_policy : typed_base_any_policy<T>\n{\n    virtual void static_delete(void** x)\n    {\n        if (* x) delete (* reinterpret_cast<T**>(x)); *x = NULL;\n    }\n    virtual void copy_from_value(void const* src, void** dest)\n    {\n        *dest = new T(*reinterpret_cast<T const*>(src));\n    }\n    virtual void clone(void* const* src, void** dest)\n    {\n        *dest = new T(**reinterpret_cast<T* const*>(src));\n    }\n    virtual void move(void* const* src, void** dest)\n    {\n        (*reinterpret_cast<T**>(dest))->~T();\n        **reinterpret_cast<T**>(dest) = **reinterpret_cast<T* const*>(src);\n    }\n    virtual void* get_value(void** src) { return *src; }\n    virtual const void* get_value(void* const * src) { return *src; }\n    virtual void print(std::ostream& out, void* const* src) { out << *reinterpret_cast<T const*>(*src); }\n};\n\ntemplate<> inline void big_any_policy<flann_centers_init_t>::print(std::ostream& out, void* const* src)\n{\n    out << int(*reinterpret_cast<flann_centers_init_t const*>(*src));\n}\n\ntemplate<> inline void big_any_policy<flann_algorithm_t>::print(std::ostream& out, void* const* src)\n{\n    out << int(*reinterpret_cast<flann_algorithm_t const*>(*src));\n}\n\ntemplate<> inline void big_any_policy<cv::String>::print(std::ostream& out, void* const* src)\n{\n    out << (*reinterpret_cast<cv::String const*>(*src)).c_str();\n}\n\ntemplate<typename T>\nstruct choose_policy\n{\n    typedef big_any_policy<T> type;\n};\n\ntemplate<typename T>\nstruct choose_policy<T*>\n{\n    typedef small_any_policy<T*> type;\n};\n\nstruct any;\n\n/// Choosing the policy for an any type is illegal, but should never happen.\n/// This is designed to throw a compiler error.\ntemplate<>\nstruct choose_policy<any>\n{\n    typedef void type;\n};\n\n/// Specializations for small types.\n#define SMALL_POLICY(TYPE) \\\n    template<> \\\n    struct choose_policy<TYPE> { typedef small_any_policy<TYPE> type; \\\n    }\n\nSMALL_POLICY(signed char);\nSMALL_POLICY(unsigned char);\nSMALL_POLICY(signed short);\nSMALL_POLICY(unsigned short);\nSMALL_POLICY(signed int);\nSMALL_POLICY(unsigned int);\nSMALL_POLICY(signed long);\nSMALL_POLICY(unsigned long);\nSMALL_POLICY(float);\nSMALL_POLICY(bool);\n\n#undef SMALL_POLICY\n\ntemplate <typename T>\nclass SinglePolicy\n{\n    SinglePolicy();\n    SinglePolicy(const SinglePolicy& other);\n    SinglePolicy& operator=(const SinglePolicy& other);\n\npublic:\n    static base_any_policy* get_policy();\n\nprivate:\n    static typename choose_policy<T>::type policy;\n};\n\ntemplate <typename T>\ntypename choose_policy<T>::type SinglePolicy<T>::policy;\n\n/// This function will return a different policy for each type.\ntemplate <typename T>\ninline base_any_policy* SinglePolicy<T>::get_policy() { return &policy; }\n\n} // namespace anyimpl\n\nstruct any\n{\nprivate:\n    // fields\n    anyimpl::base_any_policy* policy;\n    void* object;\n\npublic:\n    /// Initializing constructor.\n    template <typename T>\n    any(const T& x)\n        : policy(anyimpl::SinglePolicy<anyimpl::empty_any>::get_policy()), object(NULL)\n    {\n        assign(x);\n    }\n\n    /// Empty constructor.\n    any()\n        : policy(anyimpl::SinglePolicy<anyimpl::empty_any>::get_policy()), object(NULL)\n    { }\n\n    /// Special initializing constructor for string literals.\n    any(const char* x)\n        : policy(anyimpl::SinglePolicy<anyimpl::empty_any>::get_policy()), object(NULL)\n    {\n        assign(x);\n    }\n\n    /// Copy constructor.\n    any(const any& x)\n        : policy(anyimpl::SinglePolicy<anyimpl::empty_any>::get_policy()), object(NULL)\n    {\n        assign(x);\n    }\n\n    /// Destructor.\n    ~any()\n    {\n        policy->static_delete(&object);\n    }\n\n    /// Assignment function from another any.\n    any& assign(const any& x)\n    {\n        reset();\n        policy = x.policy;\n        policy->clone(&x.object, &object);\n        return *this;\n    }\n\n    /// Assignment function.\n    template <typename T>\n    any& assign(const T& x)\n    {\n        reset();\n        policy = anyimpl::SinglePolicy<T>::get_policy();\n        policy->copy_from_value(&x, &object);\n        return *this;\n    }\n\n    /// Assignment operator.\n    template<typename T>\n    any& operator=(const T& x)\n    {\n        return assign(x);\n    }\n\n    /// Assignment operator, specialed for literal strings.\n    /// They have types like const char [6] which don't work as expected.\n    any& operator=(const char* x)\n    {\n        return assign(x);\n    }\n\n    /// Utility functions\n    any& swap(any& x)\n    {\n        std::swap(policy, x.policy);\n        std::swap(object, x.object);\n        return *this;\n    }\n\n    /// Cast operator. You can only cast to the original type.\n    template<typename T>\n    T& cast()\n    {\n        if (policy->type() != typeid(T)) throw anyimpl::bad_any_cast();\n        T* r = reinterpret_cast<T*>(policy->get_value(&object));\n        return *r;\n    }\n\n    /// Cast operator. You can only cast to the original type.\n    template<typename T>\n    const T& cast() const\n    {\n        if (policy->type() != typeid(T)) throw anyimpl::bad_any_cast();\n        const T* r = reinterpret_cast<const T*>(policy->get_value(&object));\n        return *r;\n    }\n\n    /// Returns true if the any contains no value.\n    bool empty() const\n    {\n        return policy->type() == typeid(anyimpl::empty_any);\n    }\n\n    /// Frees any allocated memory, and sets the value to NULL.\n    void reset()\n    {\n        policy->static_delete(&object);\n        policy = anyimpl::SinglePolicy<anyimpl::empty_any>::get_policy();\n    }\n\n    /// Returns true if the two types are the same.\n    bool compatible(const any& x) const\n    {\n        return policy->type() == x.policy->type();\n    }\n\n    /// Returns if the type is compatible with the policy\n    template<typename T>\n    bool has_type()\n    {\n        return policy->type() == typeid(T);\n    }\n\n    const std::type_info& type() const\n    {\n        return policy->type();\n    }\n\n    friend std::ostream& operator <<(std::ostream& out, const any& any_val);\n};\n\ninline std::ostream& operator <<(std::ostream& out, const any& any_val)\n{\n    any_val.policy->print(out,&any_val.object);\n    return out;\n}\n\n}\n\n#endif // OPENCV_FLANN_ANY_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/autotuned_index.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n#ifndef OPENCV_FLANN_AUTOTUNED_INDEX_H_\n#define OPENCV_FLANN_AUTOTUNED_INDEX_H_\n\n#include \"general.h\"\n#include \"nn_index.h\"\n#include \"ground_truth.h\"\n#include \"index_testing.h\"\n#include \"sampling.h\"\n#include \"kdtree_index.h\"\n#include \"kdtree_single_index.h\"\n#include \"kmeans_index.h\"\n#include \"composite_index.h\"\n#include \"linear_index.h\"\n#include \"logger.h\"\n\nnamespace cvflann\n{\n\ntemplate<typename Distance>\nNNIndex<Distance>* create_index_by_type(const Matrix<typename Distance::ElementType>& dataset, const IndexParams& params, const Distance& distance);\n\n\nstruct AutotunedIndexParams : public IndexParams\n{\n    AutotunedIndexParams(float target_precision = 0.8, float build_weight = 0.01, float memory_weight = 0, float sample_fraction = 0.1)\n    {\n        (*this)[\"algorithm\"] = FLANN_INDEX_AUTOTUNED;\n        // precision desired (used for autotuning, -1 otherwise)\n        (*this)[\"target_precision\"] = target_precision;\n        // build tree time weighting factor\n        (*this)[\"build_weight\"] = build_weight;\n        // index memory weighting factor\n        (*this)[\"memory_weight\"] = memory_weight;\n        // what fraction of the dataset to use for autotuning\n        (*this)[\"sample_fraction\"] = sample_fraction;\n    }\n};\n\n\ntemplate <typename Distance>\nclass AutotunedIndex : public NNIndex<Distance>\n{\npublic:\n    typedef typename Distance::ElementType ElementType;\n    typedef typename Distance::ResultType DistanceType;\n\n    AutotunedIndex(const Matrix<ElementType>& inputData, const IndexParams& params = AutotunedIndexParams(), Distance d = Distance()) :\n        dataset_(inputData), distance_(d)\n    {\n        target_precision_ = get_param(params, \"target_precision\",0.8f);\n        build_weight_ =  get_param(params,\"build_weight\", 0.01f);\n        memory_weight_ = get_param(params, \"memory_weight\", 0.0f);\n        sample_fraction_ = get_param(params,\"sample_fraction\", 0.1f);\n        bestIndex_ = NULL;\n    }\n\n    AutotunedIndex(const AutotunedIndex&);\n    AutotunedIndex& operator=(const AutotunedIndex&);\n\n    virtual ~AutotunedIndex()\n    {\n        if (bestIndex_ != NULL) {\n            delete bestIndex_;\n            bestIndex_ = NULL;\n        }\n    }\n\n    /**\n     *          Method responsible with building the index.\n     */\n    virtual void buildIndex()\n    {\n        std::ostringstream stream;\n        bestParams_ = estimateBuildParams();\n        print_params(bestParams_, stream);\n        Logger::info(\"----------------------------------------------------\\n\");\n        Logger::info(\"Autotuned parameters:\\n\");\n        Logger::info(\"%s\", stream.str().c_str());\n        Logger::info(\"----------------------------------------------------\\n\");\n\n        bestIndex_ = create_index_by_type(dataset_, bestParams_, distance_);\n        bestIndex_->buildIndex();\n        speedup_ = estimateSearchParams(bestSearchParams_);\n        stream.str(std::string());\n        print_params(bestSearchParams_, stream);\n        Logger::info(\"----------------------------------------------------\\n\");\n        Logger::info(\"Search parameters:\\n\");\n        Logger::info(\"%s\", stream.str().c_str());\n        Logger::info(\"----------------------------------------------------\\n\");\n    }\n\n    /**\n     *  Saves the index to a stream\n     */\n    virtual void saveIndex(FILE* stream)\n    {\n        save_value(stream, (int)bestIndex_->getType());\n        bestIndex_->saveIndex(stream);\n        save_value(stream, get_param<int>(bestSearchParams_, \"checks\"));\n    }\n\n    /**\n     *  Loads the index from a stream\n     */\n    virtual void loadIndex(FILE* stream)\n    {\n        int index_type;\n\n        load_value(stream, index_type);\n        IndexParams params;\n        params[\"algorithm\"] = (flann_algorithm_t)index_type;\n        bestIndex_ = create_index_by_type<Distance>(dataset_, params, distance_);\n        bestIndex_->loadIndex(stream);\n        int checks;\n        load_value(stream, checks);\n        bestSearchParams_[\"checks\"] = checks;\n    }\n\n    /**\n     *      Method that searches for nearest-neighbors\n     */\n    virtual void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)\n    {\n        int checks = get_param<int>(searchParams,\"checks\",FLANN_CHECKS_AUTOTUNED);\n        if (checks == FLANN_CHECKS_AUTOTUNED) {\n            bestIndex_->findNeighbors(result, vec, bestSearchParams_);\n        }\n        else {\n            bestIndex_->findNeighbors(result, vec, searchParams);\n        }\n    }\n\n\n    IndexParams getParameters() const\n    {\n        return bestIndex_->getParameters();\n    }\n\n    SearchParams getSearchParameters() const\n    {\n        return bestSearchParams_;\n    }\n\n    float getSpeedup() const\n    {\n        return speedup_;\n    }\n\n\n    /**\n     *      Number of features in this index.\n     */\n    virtual size_t size() const\n    {\n        return bestIndex_->size();\n    }\n\n    /**\n     *  The length of each vector in this index.\n     */\n    virtual size_t veclen() const\n    {\n        return bestIndex_->veclen();\n    }\n\n    /**\n     * The amount of memory (in bytes) this index uses.\n     */\n    virtual int usedMemory() const\n    {\n        return bestIndex_->usedMemory();\n    }\n\n    /**\n     * Algorithm name\n     */\n    virtual flann_algorithm_t getType() const\n    {\n        return FLANN_INDEX_AUTOTUNED;\n    }\n\nprivate:\n\n    struct CostData\n    {\n        float searchTimeCost;\n        float buildTimeCost;\n        float memoryCost;\n        float totalCost;\n        IndexParams params;\n    };\n\n    void evaluate_kmeans(CostData& cost)\n    {\n        StartStopTimer t;\n        int checks;\n        const int nn = 1;\n\n        Logger::info(\"KMeansTree using params: max_iterations=%d, branching=%d\\n\",\n                     get_param<int>(cost.params,\"iterations\"),\n                     get_param<int>(cost.params,\"branching\"));\n        KMeansIndex<Distance> kmeans(sampledDataset_, cost.params, distance_);\n        // measure index build time\n        t.start();\n        kmeans.buildIndex();\n        t.stop();\n        float buildTime = (float)t.value;\n\n        // measure search time\n        float searchTime = test_index_precision(kmeans, sampledDataset_, testDataset_, gt_matches_, target_precision_, checks, distance_, nn);\n\n        float datasetMemory = float(sampledDataset_.rows * sampledDataset_.cols * sizeof(float));\n        cost.memoryCost = (kmeans.usedMemory() + datasetMemory) / datasetMemory;\n        cost.searchTimeCost = searchTime;\n        cost.buildTimeCost = buildTime;\n        Logger::info(\"KMeansTree buildTime=%g, searchTime=%g, build_weight=%g\\n\", buildTime, searchTime, build_weight_);\n    }\n\n\n    void evaluate_kdtree(CostData& cost)\n    {\n        StartStopTimer t;\n        int checks;\n        const int nn = 1;\n\n        Logger::info(\"KDTree using params: trees=%d\\n\", get_param<int>(cost.params,\"trees\"));\n        KDTreeIndex<Distance> kdtree(sampledDataset_, cost.params, distance_);\n\n        t.start();\n        kdtree.buildIndex();\n        t.stop();\n        float buildTime = (float)t.value;\n\n        //measure search time\n        float searchTime = test_index_precision(kdtree, sampledDataset_, testDataset_, gt_matches_, target_precision_, checks, distance_, nn);\n\n        float datasetMemory = float(sampledDataset_.rows * sampledDataset_.cols * sizeof(float));\n        cost.memoryCost = (kdtree.usedMemory() + datasetMemory) / datasetMemory;\n        cost.searchTimeCost = searchTime;\n        cost.buildTimeCost = buildTime;\n        Logger::info(\"KDTree buildTime=%g, searchTime=%g\\n\", buildTime, searchTime);\n    }\n\n\n    //    struct KMeansSimpleDownhillFunctor {\n    //\n    //        Autotune& autotuner;\n    //        KMeansSimpleDownhillFunctor(Autotune& autotuner_) : autotuner(autotuner_) {}\n    //\n    //        float operator()(int* params) {\n    //\n    //            float maxFloat = numeric_limits<float>::max();\n    //\n    //            if (params[0]<2) return maxFloat;\n    //            if (params[1]<0) return maxFloat;\n    //\n    //            CostData c;\n    //            c.params[\"algorithm\"] = KMEANS;\n    //            c.params[\"centers-init\"] = CENTERS_RANDOM;\n    //            c.params[\"branching\"] = params[0];\n    //            c.params[\"max-iterations\"] = params[1];\n    //\n    //            autotuner.evaluate_kmeans(c);\n    //\n    //            return c.timeCost;\n    //\n    //        }\n    //    };\n    //\n    //    struct KDTreeSimpleDownhillFunctor {\n    //\n    //        Autotune& autotuner;\n    //        KDTreeSimpleDownhillFunctor(Autotune& autotuner_) : autotuner(autotuner_) {}\n    //\n    //        float operator()(int* params) {\n    //            float maxFloat = numeric_limits<float>::max();\n    //\n    //            if (params[0]<1) return maxFloat;\n    //\n    //            CostData c;\n    //            c.params[\"algorithm\"] = KDTREE;\n    //            c.params[\"trees\"] = params[0];\n    //\n    //            autotuner.evaluate_kdtree(c);\n    //\n    //            return c.timeCost;\n    //\n    //        }\n    //    };\n\n\n\n    void optimizeKMeans(std::vector<CostData>& costs)\n    {\n        Logger::info(\"KMEANS, Step 1: Exploring parameter space\\n\");\n\n        // explore kmeans parameters space using combinations of the parameters below\n        int maxIterations[] = { 1, 5, 10, 15 };\n        int branchingFactors[] = { 16, 32, 64, 128, 256 };\n\n        int kmeansParamSpaceSize = FLANN_ARRAY_LEN(maxIterations) * FLANN_ARRAY_LEN(branchingFactors);\n        costs.reserve(costs.size() + kmeansParamSpaceSize);\n\n        // evaluate kmeans for all parameter combinations\n        for (size_t i = 0; i < FLANN_ARRAY_LEN(maxIterations); ++i) {\n            for (size_t j = 0; j < FLANN_ARRAY_LEN(branchingFactors); ++j) {\n                CostData cost;\n                cost.params[\"algorithm\"] = FLANN_INDEX_KMEANS;\n                cost.params[\"centers_init\"] = FLANN_CENTERS_RANDOM;\n                cost.params[\"iterations\"] = maxIterations[i];\n                cost.params[\"branching\"] = branchingFactors[j];\n\n                evaluate_kmeans(cost);\n                costs.push_back(cost);\n            }\n        }\n\n        //         Logger::info(\"KMEANS, Step 2: simplex-downhill optimization\\n\");\n        //\n        //         const int n = 2;\n        //         // choose initial simplex points as the best parameters so far\n        //         int kmeansNMPoints[n*(n+1)];\n        //         float kmeansVals[n+1];\n        //         for (int i=0;i<n+1;++i) {\n        //             kmeansNMPoints[i*n] = (int)kmeansCosts[i].params[\"branching\"];\n        //             kmeansNMPoints[i*n+1] = (int)kmeansCosts[i].params[\"max-iterations\"];\n        //             kmeansVals[i] = kmeansCosts[i].timeCost;\n        //         }\n        //         KMeansSimpleDownhillFunctor kmeans_cost_func(*this);\n        //         // run optimization\n        //         optimizeSimplexDownhill(kmeansNMPoints,n,kmeans_cost_func,kmeansVals);\n        //         // store results\n        //         for (int i=0;i<n+1;++i) {\n        //             kmeansCosts[i].params[\"branching\"] = kmeansNMPoints[i*2];\n        //             kmeansCosts[i].params[\"max-iterations\"] = kmeansNMPoints[i*2+1];\n        //             kmeansCosts[i].timeCost = kmeansVals[i];\n        //         }\n    }\n\n\n    void optimizeKDTree(std::vector<CostData>& costs)\n    {\n        Logger::info(\"KD-TREE, Step 1: Exploring parameter space\\n\");\n\n        // explore kd-tree parameters space using the parameters below\n        int testTrees[] = { 1, 4, 8, 16, 32 };\n\n        // evaluate kdtree for all parameter combinations\n        for (size_t i = 0; i < FLANN_ARRAY_LEN(testTrees); ++i) {\n            CostData cost;\n            cost.params[\"trees\"] = testTrees[i];\n\n            evaluate_kdtree(cost);\n            costs.push_back(cost);\n        }\n\n        //         Logger::info(\"KD-TREE, Step 2: simplex-downhill optimization\\n\");\n        //\n        //         const int n = 1;\n        //         // choose initial simplex points as the best parameters so far\n        //         int kdtreeNMPoints[n*(n+1)];\n        //         float kdtreeVals[n+1];\n        //         for (int i=0;i<n+1;++i) {\n        //             kdtreeNMPoints[i] = (int)kdtreeCosts[i].params[\"trees\"];\n        //             kdtreeVals[i] = kdtreeCosts[i].timeCost;\n        //         }\n        //         KDTreeSimpleDownhillFunctor kdtree_cost_func(*this);\n        //         // run optimization\n        //         optimizeSimplexDownhill(kdtreeNMPoints,n,kdtree_cost_func,kdtreeVals);\n        //         // store results\n        //         for (int i=0;i<n+1;++i) {\n        //             kdtreeCosts[i].params[\"trees\"] = kdtreeNMPoints[i];\n        //             kdtreeCosts[i].timeCost = kdtreeVals[i];\n        //         }\n    }\n\n    /**\n     *  Chooses the best nearest-neighbor algorithm and estimates the optimal\n     *  parameters to use when building the index (for a given precision).\n     *  Returns a dictionary with the optimal parameters.\n     */\n    IndexParams estimateBuildParams()\n    {\n        std::vector<CostData> costs;\n\n        int sampleSize = int(sample_fraction_ * dataset_.rows);\n        int testSampleSize = std::min(sampleSize / 10, 1000);\n\n        Logger::info(\"Entering autotuning, dataset size: %d, sampleSize: %d, testSampleSize: %d, target precision: %g\\n\", dataset_.rows, sampleSize, testSampleSize, target_precision_);\n\n        // For a very small dataset, it makes no sense to build any fancy index, just\n        // use linear search\n        if (testSampleSize < 10) {\n            Logger::info(\"Choosing linear, dataset too small\\n\");\n            return LinearIndexParams();\n        }\n\n        // We use a fraction of the original dataset to speedup the autotune algorithm\n        sampledDataset_ = random_sample(dataset_, sampleSize);\n        // We use a cross-validation approach, first we sample a testset from the dataset\n        testDataset_ = random_sample(sampledDataset_, testSampleSize, true);\n\n        // We compute the ground truth using linear search\n        Logger::info(\"Computing ground truth... \\n\");\n        gt_matches_ = Matrix<int>(new int[testDataset_.rows], testDataset_.rows, 1);\n        StartStopTimer t;\n        t.start();\n        compute_ground_truth<Distance>(sampledDataset_, testDataset_, gt_matches_, 0, distance_);\n        t.stop();\n\n        CostData linear_cost;\n        linear_cost.searchTimeCost = (float)t.value;\n        linear_cost.buildTimeCost = 0;\n        linear_cost.memoryCost = 0;\n        linear_cost.params[\"algorithm\"] = FLANN_INDEX_LINEAR;\n\n        costs.push_back(linear_cost);\n\n        // Start parameter autotune process\n        Logger::info(\"Autotuning parameters...\\n\");\n\n        optimizeKMeans(costs);\n        optimizeKDTree(costs);\n\n        float bestTimeCost = costs[0].searchTimeCost;\n        for (size_t i = 0; i < costs.size(); ++i) {\n            float timeCost = costs[i].buildTimeCost * build_weight_ + costs[i].searchTimeCost;\n            if (timeCost < bestTimeCost) {\n                bestTimeCost = timeCost;\n            }\n        }\n\n        float bestCost = costs[0].searchTimeCost / bestTimeCost;\n        IndexParams bestParams = costs[0].params;\n        if (bestTimeCost > 0) {\n            for (size_t i = 0; i < costs.size(); ++i) {\n                float crtCost = (costs[i].buildTimeCost * build_weight_ + costs[i].searchTimeCost) / bestTimeCost +\n                                memory_weight_ * costs[i].memoryCost;\n                if (crtCost < bestCost) {\n                    bestCost = crtCost;\n                    bestParams = costs[i].params;\n                }\n            }\n        }\n\n        delete[] gt_matches_.data;\n        delete[] testDataset_.data;\n        delete[] sampledDataset_.data;\n\n        return bestParams;\n    }\n\n\n\n    /**\n     *  Estimates the search time parameters needed to get the desired precision.\n     *  Precondition: the index is built\n     *  Postcondition: the searchParams will have the optimum params set, also the speedup obtained over linear search.\n     */\n    float estimateSearchParams(SearchParams& searchParams)\n    {\n        const int nn = 1;\n        const size_t SAMPLE_COUNT = 1000;\n\n        assert(bestIndex_ != NULL); // must have a valid index\n\n        float speedup = 0;\n\n        int samples = (int)std::min(dataset_.rows / 10, SAMPLE_COUNT);\n        if (samples > 0) {\n            Matrix<ElementType> testDataset = random_sample(dataset_, samples);\n\n            Logger::info(\"Computing ground truth\\n\");\n\n            // we need to compute the ground truth first\n            Matrix<int> gt_matches(new int[testDataset.rows], testDataset.rows, 1);\n            StartStopTimer t;\n            t.start();\n            compute_ground_truth<Distance>(dataset_, testDataset, gt_matches, 1, distance_);\n            t.stop();\n            float linear = (float)t.value;\n\n            int checks;\n            Logger::info(\"Estimating number of checks\\n\");\n\n            float searchTime;\n            float cb_index;\n            if (bestIndex_->getType() == FLANN_INDEX_KMEANS) {\n                Logger::info(\"KMeans algorithm, estimating cluster border factor\\n\");\n                KMeansIndex<Distance>* kmeans = (KMeansIndex<Distance>*)bestIndex_;\n                float bestSearchTime = -1;\n                float best_cb_index = -1;\n                int best_checks = -1;\n                for (cb_index = 0; cb_index < 1.1f; cb_index += 0.2f) {\n                    kmeans->set_cb_index(cb_index);\n                    searchTime = test_index_precision(*kmeans, dataset_, testDataset, gt_matches, target_precision_, checks, distance_, nn, 1);\n                    if ((searchTime < bestSearchTime) || (bestSearchTime == -1)) {\n                        bestSearchTime = searchTime;\n                        best_cb_index = cb_index;\n                        best_checks = checks;\n                    }\n                }\n                searchTime = bestSearchTime;\n                cb_index = best_cb_index;\n                checks = best_checks;\n\n                kmeans->set_cb_index(best_cb_index);\n                Logger::info(\"Optimum cb_index: %g\\n\", cb_index);\n                bestParams_[\"cb_index\"] = cb_index;\n            }\n            else {\n                searchTime = test_index_precision(*bestIndex_, dataset_, testDataset, gt_matches, target_precision_, checks, distance_, nn, 1);\n            }\n\n            Logger::info(\"Required number of checks: %d \\n\", checks);\n            searchParams[\"checks\"] = checks;\n\n            speedup = linear / searchTime;\n\n            delete[] gt_matches.data;\n            delete[] testDataset.data;\n        }\n\n        return speedup;\n    }\n\nprivate:\n    NNIndex<Distance>* bestIndex_;\n\n    IndexParams bestParams_;\n    SearchParams bestSearchParams_;\n\n    Matrix<ElementType> sampledDataset_;\n    Matrix<ElementType> testDataset_;\n    Matrix<int> gt_matches_;\n\n    float speedup_;\n\n    /**\n     * The dataset used by this index\n     */\n    const Matrix<ElementType> dataset_;\n\n    /**\n     * Index parameters\n     */\n    float target_precision_;\n    float build_weight_;\n    float memory_weight_;\n    float sample_fraction_;\n\n    Distance distance_;\n\n\n};\n}\n\n#endif /* OPENCV_FLANN_AUTOTUNED_INDEX_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/composite_index.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_COMPOSITE_INDEX_H_\n#define OPENCV_FLANN_COMPOSITE_INDEX_H_\n\n#include \"general.h\"\n#include \"nn_index.h\"\n#include \"kdtree_index.h\"\n#include \"kmeans_index.h\"\n\nnamespace cvflann\n{\n\n/**\n * Index parameters for the CompositeIndex.\n */\nstruct CompositeIndexParams : public IndexParams\n{\n    CompositeIndexParams(int trees = 4, int branching = 32, int iterations = 11,\n                         flann_centers_init_t centers_init = FLANN_CENTERS_RANDOM, float cb_index = 0.2 )\n    {\n        (*this)[\"algorithm\"] = FLANN_INDEX_KMEANS;\n        // number of randomized trees to use (for kdtree)\n        (*this)[\"trees\"] = trees;\n        // branching factor\n        (*this)[\"branching\"] = branching;\n        // max iterations to perform in one kmeans clustering (kmeans tree)\n        (*this)[\"iterations\"] = iterations;\n        // algorithm used for picking the initial cluster centers for kmeans tree\n        (*this)[\"centers_init\"] = centers_init;\n        // cluster boundary index. Used when searching the kmeans tree\n        (*this)[\"cb_index\"] = cb_index;\n    }\n};\n\n\n/**\n * This index builds a kd-tree index and a k-means index and performs nearest\n * neighbour search both indexes. This gives a slight boost in search performance\n * as some of the neighbours that are missed by one index are found by the other.\n */\ntemplate <typename Distance>\nclass CompositeIndex : public NNIndex<Distance>\n{\npublic:\n    typedef typename Distance::ElementType ElementType;\n    typedef typename Distance::ResultType DistanceType;\n\n    /**\n     * Index constructor\n     * @param inputData dataset containing the points to index\n     * @param params Index parameters\n     * @param d Distance functor\n     * @return\n     */\n    CompositeIndex(const Matrix<ElementType>& inputData, const IndexParams& params = CompositeIndexParams(),\n                   Distance d = Distance()) : index_params_(params)\n    {\n        kdtree_index_ = new KDTreeIndex<Distance>(inputData, params, d);\n        kmeans_index_ = new KMeansIndex<Distance>(inputData, params, d);\n\n    }\n\n    CompositeIndex(const CompositeIndex&);\n    CompositeIndex& operator=(const CompositeIndex&);\n\n    virtual ~CompositeIndex()\n    {\n        delete kdtree_index_;\n        delete kmeans_index_;\n    }\n\n    /**\n     * @return The index type\n     */\n    flann_algorithm_t getType() const\n    {\n        return FLANN_INDEX_COMPOSITE;\n    }\n\n    /**\n     * @return Size of the index\n     */\n    size_t size() const\n    {\n        return kdtree_index_->size();\n    }\n\n    /**\n     * \\returns The dimensionality of the features in this index.\n     */\n    size_t veclen() const\n    {\n        return kdtree_index_->veclen();\n    }\n\n    /**\n     * \\returns The amount of memory (in bytes) used by the index.\n     */\n    int usedMemory() const\n    {\n        return kmeans_index_->usedMemory() + kdtree_index_->usedMemory();\n    }\n\n    /**\n     * \\brief Builds the index\n     */\n    void buildIndex()\n    {\n        Logger::info(\"Building kmeans tree...\\n\");\n        kmeans_index_->buildIndex();\n        Logger::info(\"Building kdtree tree...\\n\");\n        kdtree_index_->buildIndex();\n    }\n\n    /**\n     * \\brief Saves the index to a stream\n     * \\param stream The stream to save the index to\n     */\n    void saveIndex(FILE* stream)\n    {\n        kmeans_index_->saveIndex(stream);\n        kdtree_index_->saveIndex(stream);\n    }\n\n    /**\n     * \\brief Loads the index from a stream\n     * \\param stream The stream from which the index is loaded\n     */\n    void loadIndex(FILE* stream)\n    {\n        kmeans_index_->loadIndex(stream);\n        kdtree_index_->loadIndex(stream);\n    }\n\n    /**\n     * \\returns The index parameters\n     */\n    IndexParams getParameters() const\n    {\n        return index_params_;\n    }\n\n    /**\n     * \\brief Method that searches for nearest-neighbours\n     */\n    void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)\n    {\n        kmeans_index_->findNeighbors(result, vec, searchParams);\n        kdtree_index_->findNeighbors(result, vec, searchParams);\n    }\n\nprivate:\n    /** The k-means index */\n    KMeansIndex<Distance>* kmeans_index_;\n\n    /** The kd-tree index */\n    KDTreeIndex<Distance>* kdtree_index_;\n\n    /** The index parameters */\n    const IndexParams index_params_;\n};\n\n}\n\n#endif //OPENCV_FLANN_COMPOSITE_INDEX_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/config.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2011  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2011  David G. Lowe (lowe@cs.ubc.ca). 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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n\n#ifndef OPENCV_FLANN_CONFIG_H_\n#define OPENCV_FLANN_CONFIG_H_\n\n#ifdef FLANN_VERSION_\n#undef FLANN_VERSION_\n#endif\n#define FLANN_VERSION_ \"1.6.10\"\n\n#endif /* OPENCV_FLANN_CONFIG_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/defines.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2011  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2011  David G. Lowe (lowe@cs.ubc.ca). 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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n\n#ifndef OPENCV_FLANN_DEFINES_H_\n#define OPENCV_FLANN_DEFINES_H_\n\n#include \"config.h\"\n\n#ifdef FLANN_EXPORT\n#undef FLANN_EXPORT\n#endif\n#ifdef WIN32\n/* win32 dll export/import directives */\n #ifdef FLANN_EXPORTS\n  #define FLANN_EXPORT __declspec(dllexport)\n #elif defined(FLANN_STATIC)\n  #define FLANN_EXPORT\n #else\n  #define FLANN_EXPORT __declspec(dllimport)\n #endif\n#else\n/* unix needs nothing */\n #define FLANN_EXPORT\n#endif\n\n\n#ifdef FLANN_DEPRECATED\n#undef FLANN_DEPRECATED\n#endif\n#ifdef __GNUC__\n#define FLANN_DEPRECATED __attribute__ ((deprecated))\n#elif defined(_MSC_VER)\n#define FLANN_DEPRECATED __declspec(deprecated)\n#else\n#pragma message(\"WARNING: You need to implement FLANN_DEPRECATED for this compiler\")\n#define FLANN_DEPRECATED\n#endif\n\n\n#undef FLANN_PLATFORM_32_BIT\n#undef FLANN_PLATFORM_64_BIT\n#if defined __amd64__ || defined __x86_64__ || defined _WIN64 || defined _M_X64\n#define FLANN_PLATFORM_64_BIT\n#else\n#define FLANN_PLATFORM_32_BIT\n#endif\n\n\n#undef FLANN_ARRAY_LEN\n#define FLANN_ARRAY_LEN(a) (sizeof(a)/sizeof(a[0]))\n\nnamespace cvflann {\n\n/* Nearest neighbour index algorithms */\nenum flann_algorithm_t\n{\n    FLANN_INDEX_LINEAR = 0,\n    FLANN_INDEX_KDTREE = 1,\n    FLANN_INDEX_KMEANS = 2,\n    FLANN_INDEX_COMPOSITE = 3,\n    FLANN_INDEX_KDTREE_SINGLE = 4,\n    FLANN_INDEX_HIERARCHICAL = 5,\n    FLANN_INDEX_LSH = 6,\n    FLANN_INDEX_SAVED = 254,\n    FLANN_INDEX_AUTOTUNED = 255,\n\n    // deprecated constants, should use the FLANN_INDEX_* ones instead\n    LINEAR = 0,\n    KDTREE = 1,\n    KMEANS = 2,\n    COMPOSITE = 3,\n    KDTREE_SINGLE = 4,\n    SAVED = 254,\n    AUTOTUNED = 255\n};\n\n\n\nenum flann_centers_init_t\n{\n    FLANN_CENTERS_RANDOM = 0,\n    FLANN_CENTERS_GONZALES = 1,\n    FLANN_CENTERS_KMEANSPP = 2,\n    FLANN_CENTERS_GROUPWISE = 3,\n\n    // deprecated constants, should use the FLANN_CENTERS_* ones instead\n    CENTERS_RANDOM = 0,\n    CENTERS_GONZALES = 1,\n    CENTERS_KMEANSPP = 2\n};\n\nenum flann_log_level_t\n{\n    FLANN_LOG_NONE = 0,\n    FLANN_LOG_FATAL = 1,\n    FLANN_LOG_ERROR = 2,\n    FLANN_LOG_WARN = 3,\n    FLANN_LOG_INFO = 4\n};\n\nenum flann_distance_t\n{\n    FLANN_DIST_EUCLIDEAN = 1,\n    FLANN_DIST_L2 = 1,\n    FLANN_DIST_MANHATTAN = 2,\n    FLANN_DIST_L1 = 2,\n    FLANN_DIST_MINKOWSKI = 3,\n    FLANN_DIST_MAX   = 4,\n    FLANN_DIST_HIST_INTERSECT   = 5,\n    FLANN_DIST_HELLINGER = 6,\n    FLANN_DIST_CHI_SQUARE = 7,\n    FLANN_DIST_CS         = 7,\n    FLANN_DIST_KULLBACK_LEIBLER  = 8,\n    FLANN_DIST_KL                = 8,\n    FLANN_DIST_HAMMING          = 9,\n\n    // deprecated constants, should use the FLANN_DIST_* ones instead\n    EUCLIDEAN = 1,\n    MANHATTAN = 2,\n    MINKOWSKI = 3,\n    MAX_DIST   = 4,\n    HIST_INTERSECT   = 5,\n    HELLINGER = 6,\n    CS         = 7,\n    KL         = 8,\n    KULLBACK_LEIBLER  = 8\n};\n\nenum flann_datatype_t\n{\n    FLANN_INT8 = 0,\n    FLANN_INT16 = 1,\n    FLANN_INT32 = 2,\n    FLANN_INT64 = 3,\n    FLANN_UINT8 = 4,\n    FLANN_UINT16 = 5,\n    FLANN_UINT32 = 6,\n    FLANN_UINT64 = 7,\n    FLANN_FLOAT32 = 8,\n    FLANN_FLOAT64 = 9\n};\n\nenum\n{\n    FLANN_CHECKS_UNLIMITED = -1,\n    FLANN_CHECKS_AUTOTUNED = -2\n};\n\n}\n\n#endif /* OPENCV_FLANN_DEFINES_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/dist.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_DIST_H_\n#define OPENCV_FLANN_DIST_H_\n\n#include <cmath>\n#include <cstdlib>\n#include <string.h>\n#ifdef _MSC_VER\ntypedef unsigned __int32 uint32_t;\ntypedef unsigned __int64 uint64_t;\n#else\n#include <stdint.h>\n#endif\n\n#include \"defines.h\"\n\n#if (defined WIN32 || defined _WIN32) && defined(_M_ARM)\n# include <Intrin.h>\n#endif\n\n#ifdef __ARM_NEON__\n# include \"arm_neon.h\"\n#endif\n\nnamespace cvflann\n{\n\ntemplate<typename T>\ninline T abs(T x) { return (x<0) ? -x : x; }\n\ntemplate<>\ninline int abs<int>(int x) { return ::abs(x); }\n\ntemplate<>\ninline float abs<float>(float x) { return fabsf(x); }\n\ntemplate<>\ninline double abs<double>(double x) { return fabs(x); }\n\ntemplate<typename T>\nstruct Accumulator { typedef T Type; };\ntemplate<>\nstruct Accumulator<unsigned char>  { typedef float Type; };\ntemplate<>\nstruct Accumulator<unsigned short> { typedef float Type; };\ntemplate<>\nstruct Accumulator<unsigned int> { typedef float Type; };\ntemplate<>\nstruct Accumulator<char>   { typedef float Type; };\ntemplate<>\nstruct Accumulator<short>  { typedef float Type; };\ntemplate<>\nstruct Accumulator<int> { typedef float Type; };\n\n#undef True\n#undef False\n\nclass True\n{\n};\n\nclass False\n{\n};\n\n\n/**\n * Squared Euclidean distance functor.\n *\n * This is the simpler, unrolled version. This is preferable for\n * very low dimensionality data (eg 3D points)\n */\ntemplate<class T>\nstruct L2_Simple\n{\n    typedef True is_kdtree_distance;\n    typedef True is_vector_space_distance;\n\n    typedef T ElementType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    template <typename Iterator1, typename Iterator2>\n    ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const\n    {\n        ResultType result = ResultType();\n        ResultType diff;\n        for(size_t i = 0; i < size; ++i ) {\n            diff = *a++ - *b++;\n            result += diff*diff;\n        }\n        return result;\n    }\n\n    template <typename U, typename V>\n    inline ResultType accum_dist(const U& a, const V& b, int) const\n    {\n        return (a-b)*(a-b);\n    }\n};\n\n\n\n/**\n * Squared Euclidean distance functor, optimized version\n */\ntemplate<class T>\nstruct L2\n{\n    typedef True is_kdtree_distance;\n    typedef True is_vector_space_distance;\n\n    typedef T ElementType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    /**\n     *  Compute the squared Euclidean distance between two vectors.\n     *\n     *\tThis is highly optimised, with loop unrolling, as it is one\n     *\tof the most expensive inner loops.\n     *\n     *\tThe computation of squared root at the end is omitted for\n     *\tefficiency.\n     */\n    template <typename Iterator1, typename Iterator2>\n    ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType worst_dist = -1) const\n    {\n        ResultType result = ResultType();\n        ResultType diff0, diff1, diff2, diff3;\n        Iterator1 last = a + size;\n        Iterator1 lastgroup = last - 3;\n\n        /* Process 4 items with each loop for efficiency. */\n        while (a < lastgroup) {\n            diff0 = (ResultType)(a[0] - b[0]);\n            diff1 = (ResultType)(a[1] - b[1]);\n            diff2 = (ResultType)(a[2] - b[2]);\n            diff3 = (ResultType)(a[3] - b[3]);\n            result += diff0 * diff0 + diff1 * diff1 + diff2 * diff2 + diff3 * diff3;\n            a += 4;\n            b += 4;\n\n            if ((worst_dist>0)&&(result>worst_dist)) {\n                return result;\n            }\n        }\n        /* Process last 0-3 pixels.  Not needed for standard vector lengths. */\n        while (a < last) {\n            diff0 = (ResultType)(*a++ - *b++);\n            result += diff0 * diff0;\n        }\n        return result;\n    }\n\n    /**\n     *\tPartial euclidean distance, using just one dimension. This is used by the\n     *\tkd-tree when computing partial distances while traversing the tree.\n     *\n     *\tSquared root is omitted for efficiency.\n     */\n    template <typename U, typename V>\n    inline ResultType accum_dist(const U& a, const V& b, int) const\n    {\n        return (a-b)*(a-b);\n    }\n};\n\n\n/*\n * Manhattan distance functor, optimized version\n */\ntemplate<class T>\nstruct L1\n{\n    typedef True is_kdtree_distance;\n    typedef True is_vector_space_distance;\n\n    typedef T ElementType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    /**\n     *  Compute the Manhattan (L_1) distance between two vectors.\n     *\n     *\tThis is highly optimised, with loop unrolling, as it is one\n     *\tof the most expensive inner loops.\n     */\n    template <typename Iterator1, typename Iterator2>\n    ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType worst_dist = -1) const\n    {\n        ResultType result = ResultType();\n        ResultType diff0, diff1, diff2, diff3;\n        Iterator1 last = a + size;\n        Iterator1 lastgroup = last - 3;\n\n        /* Process 4 items with each loop for efficiency. */\n        while (a < lastgroup) {\n            diff0 = (ResultType)abs(a[0] - b[0]);\n            diff1 = (ResultType)abs(a[1] - b[1]);\n            diff2 = (ResultType)abs(a[2] - b[2]);\n            diff3 = (ResultType)abs(a[3] - b[3]);\n            result += diff0 + diff1 + diff2 + diff3;\n            a += 4;\n            b += 4;\n\n            if ((worst_dist>0)&&(result>worst_dist)) {\n                return result;\n            }\n        }\n        /* Process last 0-3 pixels.  Not needed for standard vector lengths. */\n        while (a < last) {\n            diff0 = (ResultType)abs(*a++ - *b++);\n            result += diff0;\n        }\n        return result;\n    }\n\n    /**\n     * Partial distance, used by the kd-tree.\n     */\n    template <typename U, typename V>\n    inline ResultType accum_dist(const U& a, const V& b, int) const\n    {\n        return abs(a-b);\n    }\n};\n\n\n\ntemplate<class T>\nstruct MinkowskiDistance\n{\n    typedef True is_kdtree_distance;\n    typedef True is_vector_space_distance;\n\n    typedef T ElementType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    int order;\n\n    MinkowskiDistance(int order_) : order(order_) {}\n\n    /**\n     *  Compute the Minkowsky (L_p) distance between two vectors.\n     *\n     *\tThis is highly optimised, with loop unrolling, as it is one\n     *\tof the most expensive inner loops.\n     *\n     *\tThe computation of squared root at the end is omitted for\n     *\tefficiency.\n     */\n    template <typename Iterator1, typename Iterator2>\n    ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType worst_dist = -1) const\n    {\n        ResultType result = ResultType();\n        ResultType diff0, diff1, diff2, diff3;\n        Iterator1 last = a + size;\n        Iterator1 lastgroup = last - 3;\n\n        /* Process 4 items with each loop for efficiency. */\n        while (a < lastgroup) {\n            diff0 = (ResultType)abs(a[0] - b[0]);\n            diff1 = (ResultType)abs(a[1] - b[1]);\n            diff2 = (ResultType)abs(a[2] - b[2]);\n            diff3 = (ResultType)abs(a[3] - b[3]);\n            result += pow(diff0,order) + pow(diff1,order) + pow(diff2,order) + pow(diff3,order);\n            a += 4;\n            b += 4;\n\n            if ((worst_dist>0)&&(result>worst_dist)) {\n                return result;\n            }\n        }\n        /* Process last 0-3 pixels.  Not needed for standard vector lengths. */\n        while (a < last) {\n            diff0 = (ResultType)abs(*a++ - *b++);\n            result += pow(diff0,order);\n        }\n        return result;\n    }\n\n    /**\n     * Partial distance, used by the kd-tree.\n     */\n    template <typename U, typename V>\n    inline ResultType accum_dist(const U& a, const V& b, int) const\n    {\n        return pow(static_cast<ResultType>(abs(a-b)),order);\n    }\n};\n\n\n\ntemplate<class T>\nstruct MaxDistance\n{\n    typedef False is_kdtree_distance;\n    typedef True is_vector_space_distance;\n\n    typedef T ElementType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    /**\n     *  Compute the max distance (L_infinity) between two vectors.\n     *\n     *  This distance is not a valid kdtree distance, it's not dimensionwise additive.\n     */\n    template <typename Iterator1, typename Iterator2>\n    ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType worst_dist = -1) const\n    {\n        ResultType result = ResultType();\n        ResultType diff0, diff1, diff2, diff3;\n        Iterator1 last = a + size;\n        Iterator1 lastgroup = last - 3;\n\n        /* Process 4 items with each loop for efficiency. */\n        while (a < lastgroup) {\n            diff0 = abs(a[0] - b[0]);\n            diff1 = abs(a[1] - b[1]);\n            diff2 = abs(a[2] - b[2]);\n            diff3 = abs(a[3] - b[3]);\n            if (diff0>result) {result = diff0; }\n            if (diff1>result) {result = diff1; }\n            if (diff2>result) {result = diff2; }\n            if (diff3>result) {result = diff3; }\n            a += 4;\n            b += 4;\n\n            if ((worst_dist>0)&&(result>worst_dist)) {\n                return result;\n            }\n        }\n        /* Process last 0-3 pixels.  Not needed for standard vector lengths. */\n        while (a < last) {\n            diff0 = abs(*a++ - *b++);\n            result = (diff0>result) ? diff0 : result;\n        }\n        return result;\n    }\n\n    /* This distance functor is not dimension-wise additive, which\n     * makes it an invalid kd-tree distance, not implementing the accum_dist method */\n\n};\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Hamming distance functor - counts the bit differences between two strings - useful for the Brief descriptor\n * bit count of A exclusive XOR'ed with B\n */\nstruct HammingLUT\n{\n    typedef False is_kdtree_distance;\n    typedef False is_vector_space_distance;\n\n    typedef unsigned char ElementType;\n    typedef int ResultType;\n\n    /** this will count the bits in a ^ b\n     */\n    ResultType operator()(const unsigned char* a, const unsigned char* b, size_t size) const\n    {\n        static const uchar popCountTable[] =\n        {\n            0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,\n            1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n            1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n            2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,\n            1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n            2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,\n            2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,\n            3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8\n        };\n        ResultType result = 0;\n        for (size_t i = 0; i < size; i++) {\n            result += popCountTable[a[i] ^ b[i]];\n        }\n        return result;\n    }\n};\n\n/**\n * Hamming distance functor (pop count between two binary vectors, i.e. xor them and count the number of bits set)\n * That code was taken from brief.cpp in OpenCV\n */\ntemplate<class T>\nstruct Hamming\n{\n    typedef False is_kdtree_distance;\n    typedef False is_vector_space_distance;\n\n\n    typedef T ElementType;\n    typedef int ResultType;\n\n    template<typename Iterator1, typename Iterator2>\n    ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const\n    {\n        ResultType result = 0;\n#ifdef __ARM_NEON__\n        {\n            uint32x4_t bits = vmovq_n_u32(0);\n            for (size_t i = 0; i < size; i += 16) {\n                uint8x16_t A_vec = vld1q_u8 (a + i);\n                uint8x16_t B_vec = vld1q_u8 (b + i);\n                uint8x16_t AxorB = veorq_u8 (A_vec, B_vec);\n                uint8x16_t bitsSet = vcntq_u8 (AxorB);\n                uint16x8_t bitSet8 = vpaddlq_u8 (bitsSet);\n                uint32x4_t bitSet4 = vpaddlq_u16 (bitSet8);\n                bits = vaddq_u32(bits, bitSet4);\n            }\n            uint64x2_t bitSet2 = vpaddlq_u32 (bits);\n            result = vgetq_lane_s32 (vreinterpretq_s32_u64(bitSet2),0);\n            result += vgetq_lane_s32 (vreinterpretq_s32_u64(bitSet2),2);\n        }\n#elif __GNUC__\n        {\n            //for portability just use unsigned long -- and use the __builtin_popcountll (see docs for __builtin_popcountll)\n            typedef unsigned long long pop_t;\n            const size_t modulo = size % sizeof(pop_t);\n            const pop_t* a2 = reinterpret_cast<const pop_t*> (a);\n            const pop_t* b2 = reinterpret_cast<const pop_t*> (b);\n            const pop_t* a2_end = a2 + (size / sizeof(pop_t));\n\n            for (; a2 != a2_end; ++a2, ++b2) result += __builtin_popcountll((*a2) ^ (*b2));\n\n            if (modulo) {\n                //in the case where size is not dividable by sizeof(size_t)\n                //need to mask off the bits at the end\n                pop_t a_final = 0, b_final = 0;\n                memcpy(&a_final, a2, modulo);\n                memcpy(&b_final, b2, modulo);\n                result += __builtin_popcountll(a_final ^ b_final);\n            }\n        }\n#else // NO NEON and NOT GNUC\n        typedef unsigned long long pop_t;\n        HammingLUT lut;\n        result = lut(reinterpret_cast<const unsigned char*> (a),\n                     reinterpret_cast<const unsigned char*> (b), size * sizeof(pop_t));\n#endif\n        return result;\n    }\n};\n\ntemplate<typename T>\nstruct Hamming2\n{\n    typedef False is_kdtree_distance;\n    typedef False is_vector_space_distance;\n\n    typedef T ElementType;\n    typedef int ResultType;\n\n    /** This is popcount_3() from:\n     * http://en.wikipedia.org/wiki/Hamming_weight */\n    unsigned int popcnt32(uint32_t n) const\n    {\n        n -= ((n >> 1) & 0x55555555);\n        n = (n & 0x33333333) + ((n >> 2) & 0x33333333);\n        return (((n + (n >> 4))& 0xF0F0F0F)* 0x1010101) >> 24;\n    }\n\n#ifdef FLANN_PLATFORM_64_BIT\n    unsigned int popcnt64(uint64_t n) const\n    {\n        n -= ((n >> 1) & 0x5555555555555555);\n        n = (n & 0x3333333333333333) + ((n >> 2) & 0x3333333333333333);\n        return (((n + (n >> 4))& 0x0f0f0f0f0f0f0f0f)* 0x0101010101010101) >> 56;\n    }\n#endif\n\n    template <typename Iterator1, typename Iterator2>\n    ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const\n    {\n#ifdef FLANN_PLATFORM_64_BIT\n        const uint64_t* pa = reinterpret_cast<const uint64_t*>(a);\n        const uint64_t* pb = reinterpret_cast<const uint64_t*>(b);\n        ResultType result = 0;\n        size /= (sizeof(uint64_t)/sizeof(unsigned char));\n        for(size_t i = 0; i < size; ++i ) {\n            result += popcnt64(*pa ^ *pb);\n            ++pa;\n            ++pb;\n        }\n#else\n        const uint32_t* pa = reinterpret_cast<const uint32_t*>(a);\n        const uint32_t* pb = reinterpret_cast<const uint32_t*>(b);\n        ResultType result = 0;\n        size /= (sizeof(uint32_t)/sizeof(unsigned char));\n        for(size_t i = 0; i < size; ++i ) {\n            result += popcnt32(*pa ^ *pb);\n            ++pa;\n            ++pb;\n        }\n#endif\n        return result;\n    }\n};\n\n\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\ntemplate<class T>\nstruct HistIntersectionDistance\n{\n    typedef True is_kdtree_distance;\n    typedef True is_vector_space_distance;\n\n    typedef T ElementType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    /**\n     *  Compute the histogram intersection distance\n     */\n    template <typename Iterator1, typename Iterator2>\n    ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType worst_dist = -1) const\n    {\n        ResultType result = ResultType();\n        ResultType min0, min1, min2, min3;\n        Iterator1 last = a + size;\n        Iterator1 lastgroup = last - 3;\n\n        /* Process 4 items with each loop for efficiency. */\n        while (a < lastgroup) {\n            min0 = (ResultType)(a[0] < b[0] ? a[0] : b[0]);\n            min1 = (ResultType)(a[1] < b[1] ? a[1] : b[1]);\n            min2 = (ResultType)(a[2] < b[2] ? a[2] : b[2]);\n            min3 = (ResultType)(a[3] < b[3] ? a[3] : b[3]);\n            result += min0 + min1 + min2 + min3;\n            a += 4;\n            b += 4;\n            if ((worst_dist>0)&&(result>worst_dist)) {\n                return result;\n            }\n        }\n        /* Process last 0-3 pixels.  Not needed for standard vector lengths. */\n        while (a < last) {\n            min0 = (ResultType)(*a < *b ? *a : *b);\n            result += min0;\n            ++a;\n            ++b;\n        }\n        return result;\n    }\n\n    /**\n     * Partial distance, used by the kd-tree.\n     */\n    template <typename U, typename V>\n    inline ResultType accum_dist(const U& a, const V& b, int) const\n    {\n        return a<b ? a : b;\n    }\n};\n\n\n\ntemplate<class T>\nstruct HellingerDistance\n{\n    typedef True is_kdtree_distance;\n    typedef True is_vector_space_distance;\n\n    typedef T ElementType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    /**\n     *  Compute the Hellinger distance\n     */\n    template <typename Iterator1, typename Iterator2>\n    ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const\n    {\n        ResultType result = ResultType();\n        ResultType diff0, diff1, diff2, diff3;\n        Iterator1 last = a + size;\n        Iterator1 lastgroup = last - 3;\n\n        /* Process 4 items with each loop for efficiency. */\n        while (a < lastgroup) {\n            diff0 = sqrt(static_cast<ResultType>(a[0])) - sqrt(static_cast<ResultType>(b[0]));\n            diff1 = sqrt(static_cast<ResultType>(a[1])) - sqrt(static_cast<ResultType>(b[1]));\n            diff2 = sqrt(static_cast<ResultType>(a[2])) - sqrt(static_cast<ResultType>(b[2]));\n            diff3 = sqrt(static_cast<ResultType>(a[3])) - sqrt(static_cast<ResultType>(b[3]));\n            result += diff0 * diff0 + diff1 * diff1 + diff2 * diff2 + diff3 * diff3;\n            a += 4;\n            b += 4;\n        }\n        while (a < last) {\n            diff0 = sqrt(static_cast<ResultType>(*a++)) - sqrt(static_cast<ResultType>(*b++));\n            result += diff0 * diff0;\n        }\n        return result;\n    }\n\n    /**\n     * Partial distance, used by the kd-tree.\n     */\n    template <typename U, typename V>\n    inline ResultType accum_dist(const U& a, const V& b, int) const\n    {\n        ResultType diff = sqrt(static_cast<ResultType>(a)) - sqrt(static_cast<ResultType>(b));\n        return diff * diff;\n    }\n};\n\n\ntemplate<class T>\nstruct ChiSquareDistance\n{\n    typedef True is_kdtree_distance;\n    typedef True is_vector_space_distance;\n\n    typedef T ElementType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    /**\n     *  Compute the chi-square distance\n     */\n    template <typename Iterator1, typename Iterator2>\n    ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType worst_dist = -1) const\n    {\n        ResultType result = ResultType();\n        ResultType sum, diff;\n        Iterator1 last = a + size;\n\n        while (a < last) {\n            sum = (ResultType)(*a + *b);\n            if (sum>0) {\n                diff = (ResultType)(*a - *b);\n                result += diff*diff/sum;\n            }\n            ++a;\n            ++b;\n\n            if ((worst_dist>0)&&(result>worst_dist)) {\n                return result;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * Partial distance, used by the kd-tree.\n     */\n    template <typename U, typename V>\n    inline ResultType accum_dist(const U& a, const V& b, int) const\n    {\n        ResultType result = ResultType();\n        ResultType sum, diff;\n\n        sum = (ResultType)(a+b);\n        if (sum>0) {\n            diff = (ResultType)(a-b);\n            result = diff*diff/sum;\n        }\n        return result;\n    }\n};\n\n\ntemplate<class T>\nstruct KL_Divergence\n{\n    typedef True is_kdtree_distance;\n    typedef True is_vector_space_distance;\n\n    typedef T ElementType;\n    typedef typename Accumulator<T>::Type ResultType;\n\n    /**\n     *  Compute the Kullback–Leibler divergence\n     */\n    template <typename Iterator1, typename Iterator2>\n    ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType worst_dist = -1) const\n    {\n        ResultType result = ResultType();\n        Iterator1 last = a + size;\n\n        while (a < last) {\n            if (* b != 0) {\n                ResultType ratio = (ResultType)(*a / *b);\n                if (ratio>0) {\n                    result += *a * log(ratio);\n                }\n            }\n            ++a;\n            ++b;\n\n            if ((worst_dist>0)&&(result>worst_dist)) {\n                return result;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * Partial distance, used by the kd-tree.\n     */\n    template <typename U, typename V>\n    inline ResultType accum_dist(const U& a, const V& b, int) const\n    {\n        ResultType result = ResultType();\n        if( *b != 0 ) {\n            ResultType ratio = (ResultType)(a / b);\n            if (ratio>0) {\n                result = a * log(ratio);\n            }\n        }\n        return result;\n    }\n};\n\n\n\n/*\n * This is a \"zero iterator\". It basically behaves like a zero filled\n * array to all algorithms that use arrays as iterators (STL style).\n * It's useful when there's a need to compute the distance between feature\n * and origin it and allows for better compiler optimisation than using a\n * zero-filled array.\n */\ntemplate <typename T>\nstruct ZeroIterator\n{\n\n    T operator*()\n    {\n        return 0;\n    }\n\n    T operator[](int)\n    {\n        return 0;\n    }\n\n    const ZeroIterator<T>& operator ++()\n    {\n        return *this;\n    }\n\n    ZeroIterator<T> operator ++(int)\n    {\n        return *this;\n    }\n\n    ZeroIterator<T>& operator+=(int)\n    {\n        return *this;\n    }\n\n};\n\n\n/*\n * Depending on processed distances, some of them are already squared (e.g. L2)\n * and some are not (e.g.Hamming). In KMeans++ for instance we want to be sure\n * we are working on ^2 distances, thus following templates to ensure that.\n */\ntemplate <typename Distance, typename ElementType>\nstruct squareDistance\n{\n    typedef typename Distance::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return dist*dist; }\n};\n\n\ntemplate <typename ElementType>\nstruct squareDistance<L2_Simple<ElementType>, ElementType>\n{\n    typedef typename L2_Simple<ElementType>::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return dist; }\n};\n\ntemplate <typename ElementType>\nstruct squareDistance<L2<ElementType>, ElementType>\n{\n    typedef typename L2<ElementType>::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return dist; }\n};\n\n\ntemplate <typename ElementType>\nstruct squareDistance<MinkowskiDistance<ElementType>, ElementType>\n{\n    typedef typename MinkowskiDistance<ElementType>::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return dist; }\n};\n\ntemplate <typename ElementType>\nstruct squareDistance<HellingerDistance<ElementType>, ElementType>\n{\n    typedef typename HellingerDistance<ElementType>::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return dist; }\n};\n\ntemplate <typename ElementType>\nstruct squareDistance<ChiSquareDistance<ElementType>, ElementType>\n{\n    typedef typename ChiSquareDistance<ElementType>::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return dist; }\n};\n\n\ntemplate <typename Distance>\ntypename Distance::ResultType ensureSquareDistance( typename Distance::ResultType dist )\n{\n    typedef typename Distance::ElementType ElementType;\n\n    squareDistance<Distance, ElementType> dummy;\n    return dummy( dist );\n}\n\n\n/*\n * ...and a template to ensure the user that he will process the normal distance,\n * and not squared distance, without loosing processing time calling sqrt(ensureSquareDistance)\n * that will result in doing actually sqrt(dist*dist) for L1 distance for instance.\n */\ntemplate <typename Distance, typename ElementType>\nstruct simpleDistance\n{\n    typedef typename Distance::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return dist; }\n};\n\n\ntemplate <typename ElementType>\nstruct simpleDistance<L2_Simple<ElementType>, ElementType>\n{\n    typedef typename L2_Simple<ElementType>::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return sqrt(dist); }\n};\n\ntemplate <typename ElementType>\nstruct simpleDistance<L2<ElementType>, ElementType>\n{\n    typedef typename L2<ElementType>::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return sqrt(dist); }\n};\n\n\ntemplate <typename ElementType>\nstruct simpleDistance<MinkowskiDistance<ElementType>, ElementType>\n{\n    typedef typename MinkowskiDistance<ElementType>::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return sqrt(dist); }\n};\n\ntemplate <typename ElementType>\nstruct simpleDistance<HellingerDistance<ElementType>, ElementType>\n{\n    typedef typename HellingerDistance<ElementType>::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return sqrt(dist); }\n};\n\ntemplate <typename ElementType>\nstruct simpleDistance<ChiSquareDistance<ElementType>, ElementType>\n{\n    typedef typename ChiSquareDistance<ElementType>::ResultType ResultType;\n    ResultType operator()( ResultType dist ) { return sqrt(dist); }\n};\n\n\ntemplate <typename Distance>\ntypename Distance::ResultType ensureSimpleDistance( typename Distance::ResultType dist )\n{\n    typedef typename Distance::ElementType ElementType;\n\n    simpleDistance<Distance, ElementType> dummy;\n    return dummy( dist );\n}\n\n}\n\n#endif //OPENCV_FLANN_DIST_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/dummy.h",
    "content": "\n#ifndef OPENCV_FLANN_DUMMY_H_\n#define OPENCV_FLANN_DUMMY_H_\n\nnamespace cvflann\n{\n\n#if (defined WIN32 || defined _WIN32 || defined WINCE) && defined CVAPI_EXPORTS\n__declspec(dllexport)\n#endif\nvoid dummyfunc();\n\n}\n\n\n#endif  /* OPENCV_FLANN_DUMMY_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/dynamic_bitset.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n/***********************************************************************\n * Author: Vincent Rabaud\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_DYNAMIC_BITSET_H_\n#define OPENCV_FLANN_DYNAMIC_BITSET_H_\n\n#ifndef FLANN_USE_BOOST\n#  define FLANN_USE_BOOST 0\n#endif\n//#define FLANN_USE_BOOST 1\n#if FLANN_USE_BOOST\n#include <boost/dynamic_bitset.hpp>\ntypedef boost::dynamic_bitset<> DynamicBitset;\n#else\n\n#include <limits.h>\n\n#include \"dist.h\"\n\nnamespace cvflann {\n\n/** Class re-implementing the boost version of it\n * This helps not depending on boost, it also does not do the bound checks\n * and has a way to reset a block for speed\n */\nclass DynamicBitset\n{\npublic:\n    /** default constructor\n     */\n    DynamicBitset()\n    {\n    }\n\n    /** only constructor we use in our code\n     * @param sz the size of the bitset (in bits)\n     */\n    DynamicBitset(size_t sz)\n    {\n        resize(sz);\n        reset();\n    }\n\n    /** Sets all the bits to 0\n     */\n    void clear()\n    {\n        std::fill(bitset_.begin(), bitset_.end(), 0);\n    }\n\n    /** @brief checks if the bitset is empty\n     * @return true if the bitset is empty\n     */\n    bool empty() const\n    {\n        return bitset_.empty();\n    }\n\n    /** set all the bits to 0\n     */\n    void reset()\n    {\n        std::fill(bitset_.begin(), bitset_.end(), 0);\n    }\n\n    /** @brief set one bit to 0\n     * @param index\n     */\n    void reset(size_t index)\n    {\n        bitset_[index / cell_bit_size_] &= ~(size_t(1) << (index % cell_bit_size_));\n    }\n\n    /** @brief sets a specific bit to 0, and more bits too\n     * This function is useful when resetting a given set of bits so that the\n     * whole bitset ends up being 0: if that's the case, we don't care about setting\n     * other bits to 0\n     * @param index\n     */\n    void reset_block(size_t index)\n    {\n        bitset_[index / cell_bit_size_] = 0;\n    }\n\n    /** resize the bitset so that it contains at least sz bits\n     * @param sz\n     */\n    void resize(size_t sz)\n    {\n        size_ = sz;\n        bitset_.resize(sz / cell_bit_size_ + 1);\n    }\n\n    /** set a bit to true\n     * @param index the index of the bit to set to 1\n     */\n    void set(size_t index)\n    {\n        bitset_[index / cell_bit_size_] |= size_t(1) << (index % cell_bit_size_);\n    }\n\n    /** gives the number of contained bits\n     */\n    size_t size() const\n    {\n        return size_;\n    }\n\n    /** check if a bit is set\n     * @param index the index of the bit to check\n     * @return true if the bit is set\n     */\n    bool test(size_t index) const\n    {\n        return (bitset_[index / cell_bit_size_] & (size_t(1) << (index % cell_bit_size_))) != 0;\n    }\n\nprivate:\n    std::vector<size_t> bitset_;\n    size_t size_;\n    static const unsigned int cell_bit_size_ = CHAR_BIT * sizeof(size_t);\n};\n\n} // namespace cvflann\n\n#endif\n\n#endif // OPENCV_FLANN_DYNAMIC_BITSET_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/flann.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/flann.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/flann_base.hpp",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_BASE_HPP_\n#define OPENCV_FLANN_BASE_HPP_\n\n#include <vector>\n#include <cassert>\n#include <cstdio>\n\n#include \"general.h\"\n#include \"matrix.h\"\n#include \"params.h\"\n#include \"saving.h\"\n\n#include \"all_indices.h\"\n\nnamespace cvflann\n{\n\n/**\n * Sets the log level used for all flann functions\n * @param level Verbosity level\n */\ninline void log_verbosity(int level)\n{\n    if (level >= 0) {\n        Logger::setLevel(level);\n    }\n}\n\n/**\n * (Deprecated) Index parameters for creating a saved index.\n */\nstruct SavedIndexParams : public IndexParams\n{\n    SavedIndexParams(cv::String filename)\n    {\n        (* this)[\"algorithm\"] = FLANN_INDEX_SAVED;\n        (*this)[\"filename\"] = filename;\n    }\n};\n\n\ntemplate<typename Distance>\nNNIndex<Distance>* load_saved_index(const Matrix<typename Distance::ElementType>& dataset, const cv::String& filename, Distance distance)\n{\n    typedef typename Distance::ElementType ElementType;\n\n    FILE* fin = fopen(filename.c_str(), \"rb\");\n    if (fin == NULL) {\n        return NULL;\n    }\n    IndexHeader header = load_header(fin);\n    if (header.data_type != Datatype<ElementType>::type()) {\n        throw FLANNException(\"Datatype of saved index is different than of the one to be created.\");\n    }\n    if ((size_t(header.rows) != dataset.rows)||(size_t(header.cols) != dataset.cols)) {\n        throw FLANNException(\"The index saved belongs to a different dataset\");\n    }\n\n    IndexParams params;\n    params[\"algorithm\"] = header.index_type;\n    NNIndex<Distance>* nnIndex = create_index_by_type<Distance>(dataset, params, distance);\n    nnIndex->loadIndex(fin);\n    fclose(fin);\n\n    return nnIndex;\n}\n\n\ntemplate<typename Distance>\nclass Index : public NNIndex<Distance>\n{\npublic:\n    typedef typename Distance::ElementType ElementType;\n    typedef typename Distance::ResultType DistanceType;\n\n    Index(const Matrix<ElementType>& features, const IndexParams& params, Distance distance = Distance() )\n        : index_params_(params)\n    {\n        flann_algorithm_t index_type = get_param<flann_algorithm_t>(params,\"algorithm\");\n        loaded_ = false;\n\n        if (index_type == FLANN_INDEX_SAVED) {\n            nnIndex_ = load_saved_index<Distance>(features, get_param<cv::String>(params,\"filename\"), distance);\n            loaded_ = true;\n        }\n        else {\n            nnIndex_ = create_index_by_type<Distance>(features, params, distance);\n        }\n    }\n\n    ~Index()\n    {\n        delete nnIndex_;\n    }\n\n    /**\n     * Builds the index.\n     */\n    void buildIndex()\n    {\n        if (!loaded_) {\n            nnIndex_->buildIndex();\n        }\n    }\n\n    void save(cv::String filename)\n    {\n        FILE* fout = fopen(filename.c_str(), \"wb\");\n        if (fout == NULL) {\n            throw FLANNException(\"Cannot open file\");\n        }\n        save_header(fout, *nnIndex_);\n        saveIndex(fout);\n        fclose(fout);\n    }\n\n    /**\n     * \\brief Saves the index to a stream\n     * \\param stream The stream to save the index to\n     */\n    virtual void saveIndex(FILE* stream)\n    {\n        nnIndex_->saveIndex(stream);\n    }\n\n    /**\n     * \\brief Loads the index from a stream\n     * \\param stream The stream from which the index is loaded\n     */\n    virtual void loadIndex(FILE* stream)\n    {\n        nnIndex_->loadIndex(stream);\n    }\n\n    /**\n     * \\returns number of features in this index.\n     */\n    size_t veclen() const\n    {\n        return nnIndex_->veclen();\n    }\n\n    /**\n     * \\returns The dimensionality of the features in this index.\n     */\n    size_t size() const\n    {\n        return nnIndex_->size();\n    }\n\n    /**\n     * \\returns The index type (kdtree, kmeans,...)\n     */\n    flann_algorithm_t getType() const\n    {\n        return nnIndex_->getType();\n    }\n\n    /**\n     * \\returns The amount of memory (in bytes) used by the index.\n     */\n    virtual int usedMemory() const\n    {\n        return nnIndex_->usedMemory();\n    }\n\n\n    /**\n     * \\returns The index parameters\n     */\n    IndexParams getParameters() const\n    {\n        return nnIndex_->getParameters();\n    }\n\n    /**\n     * \\brief Perform k-nearest neighbor search\n     * \\param[in] queries The query points for which to find the nearest neighbors\n     * \\param[out] indices The indices of the nearest neighbors found\n     * \\param[out] dists Distances to the nearest neighbors found\n     * \\param[in] knn Number of nearest neighbors to return\n     * \\param[in] params Search parameters\n     */\n    void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params)\n    {\n        nnIndex_->knnSearch(queries, indices, dists, knn, params);\n    }\n\n    /**\n     * \\brief Perform radius search\n     * \\param[in] query The query point\n     * \\param[out] indices The indinces of the neighbors found within the given radius\n     * \\param[out] dists The distances to the nearest neighbors found\n     * \\param[in] radius The radius used for search\n     * \\param[in] params Search parameters\n     * \\returns Number of neighbors found\n     */\n    int radiusSearch(const Matrix<ElementType>& query, Matrix<int>& indices, Matrix<DistanceType>& dists, float radius, const SearchParams& params)\n    {\n        return nnIndex_->radiusSearch(query, indices, dists, radius, params);\n    }\n\n    /**\n     * \\brief Method that searches for nearest-neighbours\n     */\n    void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)\n    {\n        nnIndex_->findNeighbors(result, vec, searchParams);\n    }\n\n    /**\n     * \\brief Returns actual index\n     */\n    FLANN_DEPRECATED NNIndex<Distance>* getIndex()\n    {\n        return nnIndex_;\n    }\n\n    /**\n     * \\brief Returns index parameters.\n     * \\deprecated use getParameters() instead.\n     */\n    FLANN_DEPRECATED  const IndexParams* getIndexParameters()\n    {\n        return &index_params_;\n    }\n\nprivate:\n    /** Pointer to actual index class */\n    NNIndex<Distance>* nnIndex_;\n    /** Indices if the index was loaded from a file */\n    bool loaded_;\n    /** Parameters passed to the index */\n    IndexParams index_params_;\n};\n\n/**\n * Performs a hierarchical clustering of the points passed as argument and then takes a cut in the\n * the clustering tree to return a flat clustering.\n * @param[in] points Points to be clustered\n * @param centers The computed cluster centres. Matrix should be preallocated and centers.rows is the\n *  number of clusters requested.\n * @param params Clustering parameters (The same as for cvflann::KMeansIndex)\n * @param d Distance to be used for clustering (eg: cvflann::L2)\n * @return number of clusters computed (can be different than clusters.rows and is the highest number\n * of the form (branching-1)*K+1 smaller than clusters.rows).\n */\ntemplate <typename Distance>\nint hierarchicalClustering(const Matrix<typename Distance::ElementType>& points, Matrix<typename Distance::ResultType>& centers,\n                           const KMeansIndexParams& params, Distance d = Distance())\n{\n    KMeansIndex<Distance> kmeans(points, params, d);\n    kmeans.buildIndex();\n\n    int clusterNum = kmeans.getClusterCenters(centers);\n    return clusterNum;\n}\n\n}\n#endif /* OPENCV_FLANN_BASE_HPP_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/general.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_GENERAL_H_\n#define OPENCV_FLANN_GENERAL_H_\n\n#include \"opencv2/core.hpp\"\n\nnamespace cvflann\n{\n\nclass FLANNException : public cv::Exception\n{\npublic:\n    FLANNException(const char* message) : cv::Exception(0, message, \"\", __FILE__, __LINE__) { }\n\n    FLANNException(const cv::String& message) : cv::Exception(0, message, \"\", __FILE__, __LINE__) { }\n};\n\n}\n\n\n#endif  /* OPENCV_FLANN_GENERAL_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/ground_truth.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_GROUND_TRUTH_H_\n#define OPENCV_FLANN_GROUND_TRUTH_H_\n\n#include \"dist.h\"\n#include \"matrix.h\"\n\n\nnamespace cvflann\n{\n\ntemplate <typename Distance>\nvoid find_nearest(const Matrix<typename Distance::ElementType>& dataset, typename Distance::ElementType* query, int* matches, int nn,\n                  int skip = 0, Distance distance = Distance())\n{\n    typedef typename Distance::ResultType DistanceType;\n    int n = nn + skip;\n\n    std::vector<int> match(n);\n    std::vector<DistanceType> dists(n);\n\n    dists[0] = distance(dataset[0], query, dataset.cols);\n    match[0] = 0;\n    int dcnt = 1;\n\n    for (size_t i=1; i<dataset.rows; ++i) {\n        DistanceType tmp = distance(dataset[i], query, dataset.cols);\n\n        if (dcnt<n) {\n            match[dcnt] = (int)i;\n            dists[dcnt++] = tmp;\n        }\n        else if (tmp < dists[dcnt-1]) {\n            dists[dcnt-1] = tmp;\n            match[dcnt-1] = (int)i;\n        }\n\n        int j = dcnt-1;\n        // bubble up\n        while (j>=1 && dists[j]<dists[j-1]) {\n            std::swap(dists[j],dists[j-1]);\n            std::swap(match[j],match[j-1]);\n            j--;\n        }\n    }\n\n    for (int i=0; i<nn; ++i) {\n        matches[i] = match[i+skip];\n    }\n}\n\n\ntemplate <typename Distance>\nvoid compute_ground_truth(const Matrix<typename Distance::ElementType>& dataset, const Matrix<typename Distance::ElementType>& testset, Matrix<int>& matches,\n                          int skip=0, Distance d = Distance())\n{\n    for (size_t i=0; i<testset.rows; ++i) {\n        find_nearest<Distance>(dataset, testset[i], matches[i], (int)matches.cols, skip, d);\n    }\n}\n\n\n}\n\n#endif //OPENCV_FLANN_GROUND_TRUTH_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/hdf5.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). 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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n\n#ifndef OPENCV_FLANN_HDF5_H_\n#define OPENCV_FLANN_HDF5_H_\n\n#include <hdf5.h>\n\n#include \"matrix.h\"\n\n\nnamespace cvflann\n{\n\nnamespace\n{\n\ntemplate<typename T>\nhid_t get_hdf5_type()\n{\n    throw FLANNException(\"Unsupported type for IO operations\");\n}\n\ntemplate<>\nhid_t get_hdf5_type<char>() { return H5T_NATIVE_CHAR; }\ntemplate<>\nhid_t get_hdf5_type<unsigned char>() { return H5T_NATIVE_UCHAR; }\ntemplate<>\nhid_t get_hdf5_type<short int>() { return H5T_NATIVE_SHORT; }\ntemplate<>\nhid_t get_hdf5_type<unsigned short int>() { return H5T_NATIVE_USHORT; }\ntemplate<>\nhid_t get_hdf5_type<int>() { return H5T_NATIVE_INT; }\ntemplate<>\nhid_t get_hdf5_type<unsigned int>() { return H5T_NATIVE_UINT; }\ntemplate<>\nhid_t get_hdf5_type<long>() { return H5T_NATIVE_LONG; }\ntemplate<>\nhid_t get_hdf5_type<unsigned long>() { return H5T_NATIVE_ULONG; }\ntemplate<>\nhid_t get_hdf5_type<float>() { return H5T_NATIVE_FLOAT; }\ntemplate<>\nhid_t get_hdf5_type<double>() { return H5T_NATIVE_DOUBLE; }\n}\n\n\n#define CHECK_ERROR(x,y) if ((x)<0) throw FLANNException((y));\n\ntemplate<typename T>\nvoid save_to_file(const cvflann::Matrix<T>& dataset, const String& filename, const String& name)\n{\n\n#if H5Eset_auto_vers == 2\n    H5Eset_auto( H5E_DEFAULT, NULL, NULL );\n#else\n    H5Eset_auto( NULL, NULL );\n#endif\n\n    herr_t status;\n    hid_t file_id;\n    file_id = H5Fopen(filename.c_str(), H5F_ACC_RDWR, H5P_DEFAULT);\n    if (file_id < 0) {\n        file_id = H5Fcreate(filename.c_str(), H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT);\n    }\n    CHECK_ERROR(file_id,\"Error creating hdf5 file.\");\n\n    hsize_t     dimsf[2];              // dataset dimensions\n    dimsf[0] = dataset.rows;\n    dimsf[1] = dataset.cols;\n\n    hid_t space_id = H5Screate_simple(2, dimsf, NULL);\n    hid_t memspace_id = H5Screate_simple(2, dimsf, NULL);\n\n    hid_t dataset_id;\n#if H5Dcreate_vers == 2\n    dataset_id = H5Dcreate2(file_id, name.c_str(), get_hdf5_type<T>(), space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);\n#else\n    dataset_id = H5Dcreate(file_id, name.c_str(), get_hdf5_type<T>(), space_id, H5P_DEFAULT);\n#endif\n\n    if (dataset_id<0) {\n#if H5Dopen_vers == 2\n        dataset_id = H5Dopen2(file_id, name.c_str(), H5P_DEFAULT);\n#else\n        dataset_id = H5Dopen(file_id, name.c_str());\n#endif\n    }\n    CHECK_ERROR(dataset_id,\"Error creating or opening dataset in file.\");\n\n    status = H5Dwrite(dataset_id, get_hdf5_type<T>(), memspace_id, space_id, H5P_DEFAULT, dataset.data );\n    CHECK_ERROR(status, \"Error writing to dataset\");\n\n    H5Sclose(memspace_id);\n    H5Sclose(space_id);\n    H5Dclose(dataset_id);\n    H5Fclose(file_id);\n\n}\n\n\ntemplate<typename T>\nvoid load_from_file(cvflann::Matrix<T>& dataset, const String& filename, const String& name)\n{\n    herr_t status;\n    hid_t file_id = H5Fopen(filename.c_str(), H5F_ACC_RDWR, H5P_DEFAULT);\n    CHECK_ERROR(file_id,\"Error opening hdf5 file.\");\n\n    hid_t dataset_id;\n#if H5Dopen_vers == 2\n    dataset_id = H5Dopen2(file_id, name.c_str(), H5P_DEFAULT);\n#else\n    dataset_id = H5Dopen(file_id, name.c_str());\n#endif\n    CHECK_ERROR(dataset_id,\"Error opening dataset in file.\");\n\n    hid_t space_id = H5Dget_space(dataset_id);\n\n    hsize_t dims_out[2];\n    H5Sget_simple_extent_dims(space_id, dims_out, NULL);\n\n    dataset = cvflann::Matrix<T>(new T[dims_out[0]*dims_out[1]], dims_out[0], dims_out[1]);\n\n    status = H5Dread(dataset_id, get_hdf5_type<T>(), H5S_ALL, H5S_ALL, H5P_DEFAULT, dataset[0]);\n    CHECK_ERROR(status, \"Error reading dataset\");\n\n    H5Sclose(space_id);\n    H5Dclose(dataset_id);\n    H5Fclose(file_id);\n}\n\n\n#ifdef HAVE_MPI\n\nnamespace mpi\n{\n/**\n * Loads a the hyperslice corresponding to this processor from a hdf5 file.\n * @param flann_dataset Dataset where the data is loaded\n * @param filename HDF5 file name\n * @param name Name of dataset inside file\n */\ntemplate<typename T>\nvoid load_from_file(cvflann::Matrix<T>& dataset, const String& filename, const String& name)\n{\n    MPI_Comm comm  = MPI_COMM_WORLD;\n    MPI_Info info  = MPI_INFO_NULL;\n\n    int mpi_size, mpi_rank;\n    MPI_Comm_size(comm, &mpi_size);\n    MPI_Comm_rank(comm, &mpi_rank);\n\n    herr_t status;\n\n    hid_t plist_id = H5Pcreate(H5P_FILE_ACCESS);\n    H5Pset_fapl_mpio(plist_id, comm, info);\n    hid_t file_id = H5Fopen(filename.c_str(), H5F_ACC_RDWR, plist_id);\n    CHECK_ERROR(file_id,\"Error opening hdf5 file.\");\n    H5Pclose(plist_id);\n    hid_t dataset_id;\n#if H5Dopen_vers == 2\n    dataset_id = H5Dopen2(file_id, name.c_str(), H5P_DEFAULT);\n#else\n    dataset_id = H5Dopen(file_id, name.c_str());\n#endif\n    CHECK_ERROR(dataset_id,\"Error opening dataset in file.\");\n\n    hid_t space_id = H5Dget_space(dataset_id);\n    hsize_t dims[2];\n    H5Sget_simple_extent_dims(space_id, dims, NULL);\n\n    hsize_t count[2];\n    hsize_t offset[2];\n\n    hsize_t item_cnt = dims[0]/mpi_size+(dims[0]%mpi_size==0 ? 0 : 1);\n    hsize_t cnt = (mpi_rank<mpi_size-1 ? item_cnt : dims[0]-item_cnt*(mpi_size-1));\n\n    count[0] = cnt;\n    count[1] = dims[1];\n    offset[0] = mpi_rank*item_cnt;\n    offset[1] = 0;\n\n    hid_t memspace_id = H5Screate_simple(2,count,NULL);\n\n    H5Sselect_hyperslab(space_id, H5S_SELECT_SET, offset, NULL, count, NULL);\n\n    dataset.rows = count[0];\n    dataset.cols = count[1];\n    dataset.data = new T[dataset.rows*dataset.cols];\n\n    plist_id = H5Pcreate(H5P_DATASET_XFER);\n    H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_COLLECTIVE);\n    status = H5Dread(dataset_id, get_hdf5_type<T>(), memspace_id, space_id, plist_id, dataset.data);\n    CHECK_ERROR(status, \"Error reading dataset\");\n\n    H5Pclose(plist_id);\n    H5Sclose(space_id);\n    H5Sclose(memspace_id);\n    H5Dclose(dataset_id);\n    H5Fclose(file_id);\n}\n}\n#endif // HAVE_MPI\n} // namespace cvflann::mpi\n\n#endif /* OPENCV_FLANN_HDF5_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/heap.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_HEAP_H_\n#define OPENCV_FLANN_HEAP_H_\n\n#include <algorithm>\n#include <vector>\n\nnamespace cvflann\n{\n\n/**\n * Priority Queue Implementation\n *\n * The priority queue is implemented with a heap.  A heap is a complete\n * (full) binary tree in which each parent is less than both of its\n * children, but the order of the children is unspecified.\n */\ntemplate <typename T>\nclass Heap\n{\n\n    /**\n     * Storage array for the heap.\n     * Type T must be comparable.\n     */\n    std::vector<T> heap;\n    int length;\n\n    /**\n     * Number of element in the heap\n     */\n    int count;\n\n\n\npublic:\n    /**\n     * Constructor.\n     *\n     * Params:\n     *     sz = heap size\n     */\n\n    Heap(int sz)\n    {\n        length = sz;\n        heap.reserve(length);\n        count = 0;\n    }\n\n    /**\n     *\n     * Returns: heap size\n     */\n    int size()\n    {\n        return count;\n    }\n\n    /**\n     * Tests if the heap is empty\n     *\n     * Returns: true is heap empty, false otherwise\n     */\n    bool empty()\n    {\n        return size()==0;\n    }\n\n    /**\n     * Clears the heap.\n     */\n    void clear()\n    {\n        heap.clear();\n        count = 0;\n    }\n\n    struct CompareT\n    {\n        bool operator()(const T& t_1, const T& t_2) const\n        {\n            return t_2 < t_1;\n        }\n    };\n\n    /**\n     * Insert a new element in the heap.\n     *\n     * We select the next empty leaf node, and then keep moving any larger\n     * parents down until the right location is found to store this element.\n     *\n     * Params:\n     *     value = the new element to be inserted in the heap\n     */\n    void insert(T value)\n    {\n        /* If heap is full, then return without adding this element. */\n        if (count == length) {\n            return;\n        }\n\n        heap.push_back(value);\n        static CompareT compareT;\n        std::push_heap(heap.begin(), heap.end(), compareT);\n        ++count;\n    }\n\n\n\n    /**\n     * Returns the node of minimum value from the heap (top of the heap).\n     *\n     * Params:\n     *     value = out parameter used to return the min element\n     * Returns: false if heap empty\n     */\n    bool popMin(T& value)\n    {\n        if (count == 0) {\n            return false;\n        }\n\n        value = heap[0];\n        static CompareT compareT;\n        std::pop_heap(heap.begin(), heap.end(), compareT);\n        heap.pop_back();\n        --count;\n\n        return true;  /* Return old last node. */\n    }\n};\n\n}\n\n#endif //OPENCV_FLANN_HEAP_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/hierarchical_clustering_index.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2011  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2011  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_HIERARCHICAL_CLUSTERING_INDEX_H_\n#define OPENCV_FLANN_HIERARCHICAL_CLUSTERING_INDEX_H_\n\n#include <algorithm>\n#include <map>\n#include <cassert>\n#include <limits>\n#include <cmath>\n\n#include \"general.h\"\n#include \"nn_index.h\"\n#include \"dist.h\"\n#include \"matrix.h\"\n#include \"result_set.h\"\n#include \"heap.h\"\n#include \"allocator.h\"\n#include \"random.h\"\n#include \"saving.h\"\n\n\nnamespace cvflann\n{\n\nstruct HierarchicalClusteringIndexParams : public IndexParams\n{\n    HierarchicalClusteringIndexParams(int branching = 32,\n                                      flann_centers_init_t centers_init = FLANN_CENTERS_RANDOM,\n                                      int trees = 4, int leaf_size = 100)\n    {\n        (*this)[\"algorithm\"] = FLANN_INDEX_HIERARCHICAL;\n        // The branching factor used in the hierarchical clustering\n        (*this)[\"branching\"] = branching;\n        // Algorithm used for picking the initial cluster centers\n        (*this)[\"centers_init\"] = centers_init;\n        // number of parallel trees to build\n        (*this)[\"trees\"] = trees;\n        // maximum leaf size\n        (*this)[\"leaf_size\"] = leaf_size;\n    }\n};\n\n\n/**\n * Hierarchical index\n *\n * Contains a tree constructed through a hierarchical clustering\n * and other information for indexing a set of points for nearest-neighbour matching.\n */\ntemplate <typename Distance>\nclass HierarchicalClusteringIndex : public NNIndex<Distance>\n{\npublic:\n    typedef typename Distance::ElementType ElementType;\n    typedef typename Distance::ResultType DistanceType;\n\nprivate:\n\n\n    typedef void (HierarchicalClusteringIndex::* centersAlgFunction)(int, int*, int, int*, int&);\n\n    /**\n     * The function used for choosing the cluster centers.\n     */\n    centersAlgFunction chooseCenters;\n\n\n\n    /**\n     * Chooses the initial centers in the k-means clustering in a random manner.\n     *\n     * Params:\n     *     k = number of centers\n     *     vecs = the dataset of points\n     *     indices = indices in the dataset\n     *     indices_length = length of indices vector\n     *\n     */\n    void chooseCentersRandom(int k, int* dsindices, int indices_length, int* centers, int& centers_length)\n    {\n        UniqueRandom r(indices_length);\n\n        int index;\n        for (index=0; index<k; ++index) {\n            bool duplicate = true;\n            int rnd;\n            while (duplicate) {\n                duplicate = false;\n                rnd = r.next();\n                if (rnd<0) {\n                    centers_length = index;\n                    return;\n                }\n\n                centers[index] = dsindices[rnd];\n\n                for (int j=0; j<index; ++j) {\n                    DistanceType sq = distance(dataset[centers[index]], dataset[centers[j]], dataset.cols);\n                    if (sq<1e-16) {\n                        duplicate = true;\n                    }\n                }\n            }\n        }\n\n        centers_length = index;\n    }\n\n\n    /**\n     * Chooses the initial centers in the k-means using Gonzales' algorithm\n     * so that the centers are spaced apart from each other.\n     *\n     * Params:\n     *     k = number of centers\n     *     vecs = the dataset of points\n     *     indices = indices in the dataset\n     * Returns:\n     */\n    void chooseCentersGonzales(int k, int* dsindices, int indices_length, int* centers, int& centers_length)\n    {\n        int n = indices_length;\n\n        int rnd = rand_int(n);\n        assert(rnd >=0 && rnd < n);\n\n        centers[0] = dsindices[rnd];\n\n        int index;\n        for (index=1; index<k; ++index) {\n\n            int best_index = -1;\n            DistanceType best_val = 0;\n            for (int j=0; j<n; ++j) {\n                DistanceType dist = distance(dataset[centers[0]],dataset[dsindices[j]],dataset.cols);\n                for (int i=1; i<index; ++i) {\n                    DistanceType tmp_dist = distance(dataset[centers[i]],dataset[dsindices[j]],dataset.cols);\n                    if (tmp_dist<dist) {\n                        dist = tmp_dist;\n                    }\n                }\n                if (dist>best_val) {\n                    best_val = dist;\n                    best_index = j;\n                }\n            }\n            if (best_index!=-1) {\n                centers[index] = dsindices[best_index];\n            }\n            else {\n                break;\n            }\n        }\n        centers_length = index;\n    }\n\n\n    /**\n     * Chooses the initial centers in the k-means using the algorithm\n     * proposed in the KMeans++ paper:\n     * Arthur, David; Vassilvitskii, Sergei - k-means++: The Advantages of Careful Seeding\n     *\n     * Implementation of this function was converted from the one provided in Arthur's code.\n     *\n     * Params:\n     *     k = number of centers\n     *     vecs = the dataset of points\n     *     indices = indices in the dataset\n     * Returns:\n     */\n    void chooseCentersKMeanspp(int k, int* dsindices, int indices_length, int* centers, int& centers_length)\n    {\n        int n = indices_length;\n\n        double currentPot = 0;\n        DistanceType* closestDistSq = new DistanceType[n];\n\n        // Choose one random center and set the closestDistSq values\n        int index = rand_int(n);\n        assert(index >=0 && index < n);\n        centers[0] = dsindices[index];\n\n        // Computing distance^2 will have the advantage of even higher probability further to pick new centers\n        // far from previous centers (and this complies to \"k-means++: the advantages of careful seeding\" article)\n        for (int i = 0; i < n; i++) {\n            closestDistSq[i] = distance(dataset[dsindices[i]], dataset[dsindices[index]], dataset.cols);\n            closestDistSq[i] = ensureSquareDistance<Distance>( closestDistSq[i] );\n            currentPot += closestDistSq[i];\n        }\n\n\n        const int numLocalTries = 1;\n\n        // Choose each center\n        int centerCount;\n        for (centerCount = 1; centerCount < k; centerCount++) {\n\n            // Repeat several trials\n            double bestNewPot = -1;\n            int bestNewIndex = 0;\n            for (int localTrial = 0; localTrial < numLocalTries; localTrial++) {\n\n                // Choose our center - have to be slightly careful to return a valid answer even accounting\n                // for possible rounding errors\n                double randVal = rand_double(currentPot);\n                for (index = 0; index < n-1; index++) {\n                    if (randVal <= closestDistSq[index]) break;\n                    else randVal -= closestDistSq[index];\n                }\n\n                // Compute the new potential\n                double newPot = 0;\n                for (int i = 0; i < n; i++) {\n                    DistanceType dist = distance(dataset[dsindices[i]], dataset[dsindices[index]], dataset.cols);\n                    newPot += std::min( ensureSquareDistance<Distance>(dist), closestDistSq[i] );\n                }\n\n                // Store the best result\n                if ((bestNewPot < 0)||(newPot < bestNewPot)) {\n                    bestNewPot = newPot;\n                    bestNewIndex = index;\n                }\n            }\n\n            // Add the appropriate center\n            centers[centerCount] = dsindices[bestNewIndex];\n            currentPot = bestNewPot;\n            for (int i = 0; i < n; i++) {\n                DistanceType dist = distance(dataset[dsindices[i]], dataset[dsindices[bestNewIndex]], dataset.cols);\n                closestDistSq[i] = std::min( ensureSquareDistance<Distance>(dist), closestDistSq[i] );\n            }\n        }\n\n        centers_length = centerCount;\n\n        delete[] closestDistSq;\n    }\n\n\n    /**\n     * Chooses the initial centers in a way inspired by Gonzales (by Pierre-Emmanuel Viel):\n     * select the first point of the list as a candidate, then parse the points list. If another\n     * point is further than current candidate from the other centers, test if it is a good center\n     * of a local aggregation. If it is, replace current candidate by this point. And so on...\n     *\n     * Used with KMeansIndex that computes centers coordinates by averaging positions of clusters points,\n     * this doesn't make a real difference with previous methods. But used with HierarchicalClusteringIndex\n     * class that pick centers among existing points instead of computing the barycenters, there is a real\n     * improvement.\n     *\n     * Params:\n     *     k = number of centers\n     *     vecs = the dataset of points\n     *     indices = indices in the dataset\n     * Returns:\n     */\n    void GroupWiseCenterChooser(int k, int* dsindices, int indices_length, int* centers, int& centers_length)\n    {\n        const float kSpeedUpFactor = 1.3f;\n\n        int n = indices_length;\n\n        DistanceType* closestDistSq = new DistanceType[n];\n\n        // Choose one random center and set the closestDistSq values\n        int index = rand_int(n);\n        assert(index >=0 && index < n);\n        centers[0] = dsindices[index];\n\n        for (int i = 0; i < n; i++) {\n            closestDistSq[i] = distance(dataset[dsindices[i]], dataset[dsindices[index]], dataset.cols);\n        }\n\n\n        // Choose each center\n        int centerCount;\n        for (centerCount = 1; centerCount < k; centerCount++) {\n\n            // Repeat several trials\n            double bestNewPot = -1;\n            int bestNewIndex = 0;\n            DistanceType furthest = 0;\n            for (index = 0; index < n; index++) {\n\n                // We will test only the potential of the points further than current candidate\n                if( closestDistSq[index] > kSpeedUpFactor * (float)furthest ) {\n\n                    // Compute the new potential\n                    double newPot = 0;\n                    for (int i = 0; i < n; i++) {\n                        newPot += std::min( distance(dataset[dsindices[i]], dataset[dsindices[index]], dataset.cols)\n                                            , closestDistSq[i] );\n                    }\n\n                    // Store the best result\n                    if ((bestNewPot < 0)||(newPot <= bestNewPot)) {\n                        bestNewPot = newPot;\n                        bestNewIndex = index;\n                        furthest = closestDistSq[index];\n                    }\n                }\n            }\n\n            // Add the appropriate center\n            centers[centerCount] = dsindices[bestNewIndex];\n            for (int i = 0; i < n; i++) {\n                closestDistSq[i] = std::min( distance(dataset[dsindices[i]], dataset[dsindices[bestNewIndex]], dataset.cols)\n                                             , closestDistSq[i] );\n            }\n        }\n\n        centers_length = centerCount;\n\n        delete[] closestDistSq;\n    }\n\n\npublic:\n\n\n    /**\n     * Index constructor\n     *\n     * Params:\n     *          inputData = dataset with the input features\n     *          params = parameters passed to the hierarchical k-means algorithm\n     */\n    HierarchicalClusteringIndex(const Matrix<ElementType>& inputData, const IndexParams& index_params = HierarchicalClusteringIndexParams(),\n                                Distance d = Distance())\n        : dataset(inputData), params(index_params), root(NULL), indices(NULL), distance(d)\n    {\n        memoryCounter = 0;\n\n        size_ = dataset.rows;\n        veclen_ = dataset.cols;\n\n        branching_ = get_param(params,\"branching\",32);\n        centers_init_ = get_param(params,\"centers_init\", FLANN_CENTERS_RANDOM);\n        trees_ = get_param(params,\"trees\",4);\n        leaf_size_ = get_param(params,\"leaf_size\",100);\n\n        if (centers_init_==FLANN_CENTERS_RANDOM) {\n            chooseCenters = &HierarchicalClusteringIndex::chooseCentersRandom;\n        }\n        else if (centers_init_==FLANN_CENTERS_GONZALES) {\n            chooseCenters = &HierarchicalClusteringIndex::chooseCentersGonzales;\n        }\n        else if (centers_init_==FLANN_CENTERS_KMEANSPP) {\n            chooseCenters = &HierarchicalClusteringIndex::chooseCentersKMeanspp;\n        }\n        else if (centers_init_==FLANN_CENTERS_GROUPWISE) {\n            chooseCenters = &HierarchicalClusteringIndex::GroupWiseCenterChooser;\n        }\n        else {\n            throw FLANNException(\"Unknown algorithm for choosing initial centers.\");\n        }\n\n        trees_ = get_param(params,\"trees\",4);\n        root = new NodePtr[trees_];\n        indices = new int*[trees_];\n\n        for (int i=0; i<trees_; ++i) {\n            root[i] = NULL;\n            indices[i] = NULL;\n        }\n    }\n\n    HierarchicalClusteringIndex(const HierarchicalClusteringIndex&);\n    HierarchicalClusteringIndex& operator=(const HierarchicalClusteringIndex&);\n\n    /**\n     * Index destructor.\n     *\n     * Release the memory used by the index.\n     */\n    virtual ~HierarchicalClusteringIndex()\n    {\n        free_elements();\n\n        if (root!=NULL) {\n            delete[] root;\n        }\n\n        if (indices!=NULL) {\n            delete[] indices;\n        }\n    }\n\n\n    /**\n     * Release the inner elements of indices[]\n     */\n    void free_elements()\n    {\n        if (indices!=NULL) {\n            for(int i=0; i<trees_; ++i) {\n                if (indices[i]!=NULL) {\n                    delete[] indices[i];\n                    indices[i] = NULL;\n                }\n            }\n        }\n    }\n\n\n    /**\n     *  Returns size of index.\n     */\n    size_t size() const\n    {\n        return size_;\n    }\n\n    /**\n     * Returns the length of an index feature.\n     */\n    size_t veclen() const\n    {\n        return veclen_;\n    }\n\n\n    /**\n     * Computes the inde memory usage\n     * Returns: memory used by the index\n     */\n    int usedMemory() const\n    {\n        return pool.usedMemory+pool.wastedMemory+memoryCounter;\n    }\n\n    /**\n     * Builds the index\n     */\n    void buildIndex()\n    {\n        if (branching_<2) {\n            throw FLANNException(\"Branching factor must be at least 2\");\n        }\n\n        free_elements();\n\n        for (int i=0; i<trees_; ++i) {\n            indices[i] = new int[size_];\n            for (size_t j=0; j<size_; ++j) {\n                indices[i][j] = (int)j;\n            }\n            root[i] = pool.allocate<Node>();\n            computeClustering(root[i], indices[i], (int)size_, branching_,0);\n        }\n    }\n\n\n    flann_algorithm_t getType() const\n    {\n        return FLANN_INDEX_HIERARCHICAL;\n    }\n\n\n    void saveIndex(FILE* stream)\n    {\n        save_value(stream, branching_);\n        save_value(stream, trees_);\n        save_value(stream, centers_init_);\n        save_value(stream, leaf_size_);\n        save_value(stream, memoryCounter);\n        for (int i=0; i<trees_; ++i) {\n            save_value(stream, *indices[i], size_);\n            save_tree(stream, root[i], i);\n        }\n\n    }\n\n\n    void loadIndex(FILE* stream)\n    {\n        free_elements();\n\n        if (root!=NULL) {\n            delete[] root;\n        }\n\n        if (indices!=NULL) {\n            delete[] indices;\n        }\n\n        load_value(stream, branching_);\n        load_value(stream, trees_);\n        load_value(stream, centers_init_);\n        load_value(stream, leaf_size_);\n        load_value(stream, memoryCounter);\n\n        indices = new int*[trees_];\n        root = new NodePtr[trees_];\n        for (int i=0; i<trees_; ++i) {\n            indices[i] = new int[size_];\n            load_value(stream, *indices[i], size_);\n            load_tree(stream, root[i], i);\n        }\n\n        params[\"algorithm\"] = getType();\n        params[\"branching\"] = branching_;\n        params[\"trees\"] = trees_;\n        params[\"centers_init\"] = centers_init_;\n        params[\"leaf_size\"] = leaf_size_;\n    }\n\n\n    /**\n     * Find set of nearest neighbors to vec. Their indices are stored inside\n     * the result object.\n     *\n     * Params:\n     *     result = the result object in which the indices of the nearest-neighbors are stored\n     *     vec = the vector for which to search the nearest neighbors\n     *     searchParams = parameters that influence the search algorithm (checks)\n     */\n    void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)\n    {\n\n        int maxChecks = get_param(searchParams,\"checks\",32);\n\n        // Priority queue storing intermediate branches in the best-bin-first search\n        Heap<BranchSt>* heap = new Heap<BranchSt>((int)size_);\n\n        std::vector<bool> checked(size_,false);\n        int checks = 0;\n        for (int i=0; i<trees_; ++i) {\n            findNN(root[i], result, vec, checks, maxChecks, heap, checked);\n        }\n\n        BranchSt branch;\n        while (heap->popMin(branch) && (checks<maxChecks || !result.full())) {\n            NodePtr node = branch.node;\n            findNN(node, result, vec, checks, maxChecks, heap, checked);\n        }\n        assert(result.full());\n\n        delete heap;\n\n    }\n\n    IndexParams getParameters() const\n    {\n        return params;\n    }\n\n\nprivate:\n\n    /**\n     * Struture representing a node in the hierarchical k-means tree.\n     */\n    struct Node\n    {\n        /**\n         * The cluster center index\n         */\n        int pivot;\n        /**\n         * The cluster size (number of points in the cluster)\n         */\n        int size;\n        /**\n         * Child nodes (only for non-terminal nodes)\n         */\n        Node** childs;\n        /**\n         * Node points (only for terminal nodes)\n         */\n        int* indices;\n        /**\n         * Level\n         */\n        int level;\n    };\n    typedef Node* NodePtr;\n\n\n\n    /**\n     * Alias definition for a nicer syntax.\n     */\n    typedef BranchStruct<NodePtr, DistanceType> BranchSt;\n\n\n\n    void save_tree(FILE* stream, NodePtr node, int num)\n    {\n        save_value(stream, *node);\n        if (node->childs==NULL) {\n            int indices_offset = (int)(node->indices - indices[num]);\n            save_value(stream, indices_offset);\n        }\n        else {\n            for(int i=0; i<branching_; ++i) {\n                save_tree(stream, node->childs[i], num);\n            }\n        }\n    }\n\n\n    void load_tree(FILE* stream, NodePtr& node, int num)\n    {\n        node = pool.allocate<Node>();\n        load_value(stream, *node);\n        if (node->childs==NULL) {\n            int indices_offset;\n            load_value(stream, indices_offset);\n            node->indices = indices[num] + indices_offset;\n        }\n        else {\n            node->childs = pool.allocate<NodePtr>(branching_);\n            for(int i=0; i<branching_; ++i) {\n                load_tree(stream, node->childs[i], num);\n            }\n        }\n    }\n\n\n\n\n    void computeLabels(int* dsindices, int indices_length,  int* centers, int centers_length, int* labels, DistanceType& cost)\n    {\n        cost = 0;\n        for (int i=0; i<indices_length; ++i) {\n            ElementType* point = dataset[dsindices[i]];\n            DistanceType dist = distance(point, dataset[centers[0]], veclen_);\n            labels[i] = 0;\n            for (int j=1; j<centers_length; ++j) {\n                DistanceType new_dist = distance(point, dataset[centers[j]], veclen_);\n                if (dist>new_dist) {\n                    labels[i] = j;\n                    dist = new_dist;\n                }\n            }\n            cost += dist;\n        }\n    }\n\n    /**\n     * The method responsible with actually doing the recursive hierarchical\n     * clustering\n     *\n     * Params:\n     *     node = the node to cluster\n     *     indices = indices of the points belonging to the current node\n     *     branching = the branching factor to use in the clustering\n     *\n     * TODO: for 1-sized clusters don't store a cluster center (it's the same as the single cluster point)\n     */\n    void computeClustering(NodePtr node, int* dsindices, int indices_length, int branching, int level)\n    {\n        node->size = indices_length;\n        node->level = level;\n\n        if (indices_length < leaf_size_) { // leaf node\n            node->indices = dsindices;\n            std::sort(node->indices,node->indices+indices_length);\n            node->childs = NULL;\n            return;\n        }\n\n        std::vector<int> centers(branching);\n        std::vector<int> labels(indices_length);\n\n        int centers_length;\n        (this->*chooseCenters)(branching, dsindices, indices_length, &centers[0], centers_length);\n\n        if (centers_length<branching) {\n            node->indices = dsindices;\n            std::sort(node->indices,node->indices+indices_length);\n            node->childs = NULL;\n            return;\n        }\n\n\n        //\tassign points to clusters\n        DistanceType cost;\n        computeLabels(dsindices, indices_length, &centers[0], centers_length, &labels[0], cost);\n\n        node->childs = pool.allocate<NodePtr>(branching);\n        int start = 0;\n        int end = start;\n        for (int i=0; i<branching; ++i) {\n            for (int j=0; j<indices_length; ++j) {\n                if (labels[j]==i) {\n                    std::swap(dsindices[j],dsindices[end]);\n                    std::swap(labels[j],labels[end]);\n                    end++;\n                }\n            }\n\n            node->childs[i] = pool.allocate<Node>();\n            node->childs[i]->pivot = centers[i];\n            node->childs[i]->indices = NULL;\n            computeClustering(node->childs[i],dsindices+start, end-start, branching, level+1);\n            start=end;\n        }\n    }\n\n\n\n    /**\n     * Performs one descent in the hierarchical k-means tree. The branches not\n     * visited are stored in a priority queue.\n     *\n     * Params:\n     *      node = node to explore\n     *      result = container for the k-nearest neighbors found\n     *      vec = query points\n     *      checks = how many points in the dataset have been checked so far\n     *      maxChecks = maximum dataset points to checks\n     */\n\n\n    void findNN(NodePtr node, ResultSet<DistanceType>& result, const ElementType* vec, int& checks, int maxChecks,\n                Heap<BranchSt>* heap, std::vector<bool>& checked)\n    {\n        if (node->childs==NULL) {\n            if (checks>=maxChecks) {\n                if (result.full()) return;\n            }\n            for (int i=0; i<node->size; ++i) {\n                int index = node->indices[i];\n                if (!checked[index]) {\n                    DistanceType dist = distance(dataset[index], vec, veclen_);\n                    result.addPoint(dist, index);\n                    checked[index] = true;\n                    ++checks;\n                }\n            }\n        }\n        else {\n            DistanceType* domain_distances = new DistanceType[branching_];\n            int best_index = 0;\n            domain_distances[best_index] = distance(vec, dataset[node->childs[best_index]->pivot], veclen_);\n            for (int i=1; i<branching_; ++i) {\n                domain_distances[i] = distance(vec, dataset[node->childs[i]->pivot], veclen_);\n                if (domain_distances[i]<domain_distances[best_index]) {\n                    best_index = i;\n                }\n            }\n            for (int i=0; i<branching_; ++i) {\n                if (i!=best_index) {\n                    heap->insert(BranchSt(node->childs[i],domain_distances[i]));\n                }\n            }\n            delete[] domain_distances;\n            findNN(node->childs[best_index],result,vec, checks, maxChecks, heap, checked);\n        }\n    }\n\nprivate:\n\n\n    /**\n     * The dataset used by this index\n     */\n    const Matrix<ElementType> dataset;\n\n    /**\n     * Parameters used by this index\n     */\n    IndexParams params;\n\n\n    /**\n     * Number of features in the dataset.\n     */\n    size_t size_;\n\n    /**\n     * Length of each feature.\n     */\n    size_t veclen_;\n\n    /**\n     * The root node in the tree.\n     */\n    NodePtr* root;\n\n    /**\n     *  Array of indices to vectors in the dataset.\n     */\n    int** indices;\n\n\n    /**\n     * The distance\n     */\n    Distance distance;\n\n    /**\n     * Pooled memory allocator.\n     *\n     * Using a pooled memory allocator is more efficient\n     * than allocating memory directly when there is a large\n     * number small of memory allocations.\n     */\n    PooledAllocator pool;\n\n    /**\n     * Memory occupied by the index.\n     */\n    int memoryCounter;\n\n    /** index parameters */\n    int branching_;\n    int trees_;\n    flann_centers_init_t centers_init_;\n    int leaf_size_;\n\n\n};\n\n}\n\n#endif /* OPENCV_FLANN_HIERARCHICAL_CLUSTERING_INDEX_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/index_testing.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_INDEX_TESTING_H_\n#define OPENCV_FLANN_INDEX_TESTING_H_\n\n#include <cstring>\n#include <cassert>\n#include <cmath>\n\n#include \"matrix.h\"\n#include \"nn_index.h\"\n#include \"result_set.h\"\n#include \"logger.h\"\n#include \"timer.h\"\n\n\nnamespace cvflann\n{\n\ninline int countCorrectMatches(int* neighbors, int* groundTruth, int n)\n{\n    int count = 0;\n    for (int i=0; i<n; ++i) {\n        for (int k=0; k<n; ++k) {\n            if (neighbors[i]==groundTruth[k]) {\n                count++;\n                break;\n            }\n        }\n    }\n    return count;\n}\n\n\ntemplate <typename Distance>\ntypename Distance::ResultType computeDistanceRaport(const Matrix<typename Distance::ElementType>& inputData, typename Distance::ElementType* target,\n                                                    int* neighbors, int* groundTruth, int veclen, int n, const Distance& distance)\n{\n    typedef typename Distance::ResultType DistanceType;\n\n    DistanceType ret = 0;\n    for (int i=0; i<n; ++i) {\n        DistanceType den = distance(inputData[groundTruth[i]], target, veclen);\n        DistanceType num = distance(inputData[neighbors[i]], target, veclen);\n\n        if ((den==0)&&(num==0)) {\n            ret += 1;\n        }\n        else {\n            ret += num/den;\n        }\n    }\n\n    return ret;\n}\n\ntemplate <typename Distance>\nfloat search_with_ground_truth(NNIndex<Distance>& index, const Matrix<typename Distance::ElementType>& inputData,\n                               const Matrix<typename Distance::ElementType>& testData, const Matrix<int>& matches, int nn, int checks,\n                               float& time, typename Distance::ResultType& dist, const Distance& distance, int skipMatches)\n{\n    typedef typename Distance::ResultType DistanceType;\n\n    if (matches.cols<size_t(nn)) {\n        Logger::info(\"matches.cols=%d, nn=%d\\n\",matches.cols,nn);\n\n        throw FLANNException(\"Ground truth is not computed for as many neighbors as requested\");\n    }\n\n    KNNResultSet<DistanceType> resultSet(nn+skipMatches);\n    SearchParams searchParams(checks);\n\n    std::vector<int> indices(nn+skipMatches);\n    std::vector<DistanceType> dists(nn+skipMatches);\n    int* neighbors = &indices[skipMatches];\n\n    int correct = 0;\n    DistanceType distR = 0;\n    StartStopTimer t;\n    int repeats = 0;\n    while (t.value<0.2) {\n        repeats++;\n        t.start();\n        correct = 0;\n        distR = 0;\n        for (size_t i = 0; i < testData.rows; i++) {\n            resultSet.init(&indices[0], &dists[0]);\n            index.findNeighbors(resultSet, testData[i], searchParams);\n\n            correct += countCorrectMatches(neighbors,matches[i], nn);\n            distR += computeDistanceRaport<Distance>(inputData, testData[i], neighbors, matches[i], (int)testData.cols, nn, distance);\n        }\n        t.stop();\n    }\n    time = float(t.value/repeats);\n\n    float precicion = (float)correct/(nn*testData.rows);\n\n    dist = distR/(testData.rows*nn);\n\n    Logger::info(\"%8d %10.4g %10.5g %10.5g %10.5g\\n\",\n                 checks, precicion, time, 1000.0 * time / testData.rows, dist);\n\n    return precicion;\n}\n\n\ntemplate <typename Distance>\nfloat test_index_checks(NNIndex<Distance>& index, const Matrix<typename Distance::ElementType>& inputData,\n                        const Matrix<typename Distance::ElementType>& testData, const Matrix<int>& matches,\n                        int checks, float& precision, const Distance& distance, int nn = 1, int skipMatches = 0)\n{\n    typedef typename Distance::ResultType DistanceType;\n\n    Logger::info(\"  Nodes  Precision(%)   Time(s)   Time/vec(ms)  Mean dist\\n\");\n    Logger::info(\"---------------------------------------------------------\\n\");\n\n    float time = 0;\n    DistanceType dist = 0;\n    precision = search_with_ground_truth(index, inputData, testData, matches, nn, checks, time, dist, distance, skipMatches);\n\n    return time;\n}\n\ntemplate <typename Distance>\nfloat test_index_precision(NNIndex<Distance>& index, const Matrix<typename Distance::ElementType>& inputData,\n                           const Matrix<typename Distance::ElementType>& testData, const Matrix<int>& matches,\n                           float precision, int& checks, const Distance& distance, int nn = 1, int skipMatches = 0)\n{\n    typedef typename Distance::ResultType DistanceType;\n    const float SEARCH_EPS = 0.001f;\n\n    Logger::info(\"  Nodes  Precision(%)   Time(s)   Time/vec(ms)  Mean dist\\n\");\n    Logger::info(\"---------------------------------------------------------\\n\");\n\n    int c2 = 1;\n    float p2;\n    int c1 = 1;\n    //float p1;\n    float time;\n    DistanceType dist;\n\n    p2 = search_with_ground_truth(index, inputData, testData, matches, nn, c2, time, dist, distance, skipMatches);\n\n    if (p2>precision) {\n        Logger::info(\"Got as close as I can\\n\");\n        checks = c2;\n        return time;\n    }\n\n    while (p2<precision) {\n        c1 = c2;\n        //p1 = p2;\n        c2 *=2;\n        p2 = search_with_ground_truth(index, inputData, testData, matches, nn, c2, time, dist, distance, skipMatches);\n    }\n\n    int cx;\n    float realPrecision;\n    if (fabs(p2-precision)>SEARCH_EPS) {\n        Logger::info(\"Start linear estimation\\n\");\n        // after we got to values in the vecinity of the desired precision\n        // use linear approximation get a better estimation\n\n        cx = (c1+c2)/2;\n        realPrecision = search_with_ground_truth(index, inputData, testData, matches, nn, cx, time, dist, distance, skipMatches);\n        while (fabs(realPrecision-precision)>SEARCH_EPS) {\n\n            if (realPrecision<precision) {\n                c1 = cx;\n            }\n            else {\n                c2 = cx;\n            }\n            cx = (c1+c2)/2;\n            if (cx==c1) {\n                Logger::info(\"Got as close as I can\\n\");\n                break;\n            }\n            realPrecision = search_with_ground_truth(index, inputData, testData, matches, nn, cx, time, dist, distance, skipMatches);\n        }\n\n        c2 = cx;\n        p2 = realPrecision;\n\n    }\n    else {\n        Logger::info(\"No need for linear estimation\\n\");\n        cx = c2;\n        realPrecision = p2;\n    }\n\n    checks = cx;\n    return time;\n}\n\n\ntemplate <typename Distance>\nvoid test_index_precisions(NNIndex<Distance>& index, const Matrix<typename Distance::ElementType>& inputData,\n                           const Matrix<typename Distance::ElementType>& testData, const Matrix<int>& matches,\n                           float* precisions, int precisions_length, const Distance& distance, int nn = 1, int skipMatches = 0, float maxTime = 0)\n{\n    typedef typename Distance::ResultType DistanceType;\n\n    const float SEARCH_EPS = 0.001;\n\n    // make sure precisions array is sorted\n    std::sort(precisions, precisions+precisions_length);\n\n    int pindex = 0;\n    float precision = precisions[pindex];\n\n    Logger::info(\"  Nodes  Precision(%)   Time(s)   Time/vec(ms)  Mean dist\\n\");\n    Logger::info(\"---------------------------------------------------------\\n\");\n\n    int c2 = 1;\n    float p2;\n\n    int c1 = 1;\n    float p1;\n\n    float time;\n    DistanceType dist;\n\n    p2 = search_with_ground_truth(index, inputData, testData, matches, nn, c2, time, dist, distance, skipMatches);\n\n    // if precision for 1 run down the tree is already\n    // better then some of the requested precisions, then\n    // skip those\n    while (precisions[pindex]<p2 && pindex<precisions_length) {\n        pindex++;\n    }\n\n    if (pindex==precisions_length) {\n        Logger::info(\"Got as close as I can\\n\");\n        return;\n    }\n\n    for (int i=pindex; i<precisions_length; ++i) {\n\n        precision = precisions[i];\n        while (p2<precision) {\n            c1 = c2;\n            p1 = p2;\n            c2 *=2;\n            p2 = search_with_ground_truth(index, inputData, testData, matches, nn, c2, time, dist, distance, skipMatches);\n            if ((maxTime> 0)&&(time > maxTime)&&(p2<precision)) return;\n        }\n\n        int cx;\n        float realPrecision;\n        if (fabs(p2-precision)>SEARCH_EPS) {\n            Logger::info(\"Start linear estimation\\n\");\n            // after we got to values in the vecinity of the desired precision\n            // use linear approximation get a better estimation\n\n            cx = (c1+c2)/2;\n            realPrecision = search_with_ground_truth(index, inputData, testData, matches, nn, cx, time, dist, distance, skipMatches);\n            while (fabs(realPrecision-precision)>SEARCH_EPS) {\n\n                if (realPrecision<precision) {\n                    c1 = cx;\n                }\n                else {\n                    c2 = cx;\n                }\n                cx = (c1+c2)/2;\n                if (cx==c1) {\n                    Logger::info(\"Got as close as I can\\n\");\n                    break;\n                }\n                realPrecision = search_with_ground_truth(index, inputData, testData, matches, nn, cx, time, dist, distance, skipMatches);\n            }\n\n            c2 = cx;\n            p2 = realPrecision;\n\n        }\n        else {\n            Logger::info(\"No need for linear estimation\\n\");\n            cx = c2;\n            realPrecision = p2;\n        }\n\n    }\n}\n\n}\n\n#endif //OPENCV_FLANN_INDEX_TESTING_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/kdtree_index.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_KDTREE_INDEX_H_\n#define OPENCV_FLANN_KDTREE_INDEX_H_\n\n#include <algorithm>\n#include <map>\n#include <cassert>\n#include <cstring>\n\n#include \"general.h\"\n#include \"nn_index.h\"\n#include \"dynamic_bitset.h\"\n#include \"matrix.h\"\n#include \"result_set.h\"\n#include \"heap.h\"\n#include \"allocator.h\"\n#include \"random.h\"\n#include \"saving.h\"\n\n\nnamespace cvflann\n{\n\nstruct KDTreeIndexParams : public IndexParams\n{\n    KDTreeIndexParams(int trees = 4)\n    {\n        (*this)[\"algorithm\"] = FLANN_INDEX_KDTREE;\n        (*this)[\"trees\"] = trees;\n    }\n};\n\n\n/**\n * Randomized kd-tree index\n *\n * Contains the k-d trees and other information for indexing a set of points\n * for nearest-neighbor matching.\n */\ntemplate <typename Distance>\nclass KDTreeIndex : public NNIndex<Distance>\n{\npublic:\n    typedef typename Distance::ElementType ElementType;\n    typedef typename Distance::ResultType DistanceType;\n\n\n    /**\n     * KDTree constructor\n     *\n     * Params:\n     *          inputData = dataset with the input features\n     *          params = parameters passed to the kdtree algorithm\n     */\n    KDTreeIndex(const Matrix<ElementType>& inputData, const IndexParams& params = KDTreeIndexParams(),\n                Distance d = Distance() ) :\n        dataset_(inputData), index_params_(params), distance_(d)\n    {\n        size_ = dataset_.rows;\n        veclen_ = dataset_.cols;\n\n        trees_ = get_param(index_params_,\"trees\",4);\n        tree_roots_ = new NodePtr[trees_];\n\n        // Create a permutable array of indices to the input vectors.\n        vind_.resize(size_);\n        for (size_t i = 0; i < size_; ++i) {\n            vind_[i] = int(i);\n        }\n\n        mean_ = new DistanceType[veclen_];\n        var_ = new DistanceType[veclen_];\n    }\n\n\n    KDTreeIndex(const KDTreeIndex&);\n    KDTreeIndex& operator=(const KDTreeIndex&);\n\n    /**\n     * Standard destructor\n     */\n    ~KDTreeIndex()\n    {\n        if (tree_roots_!=NULL) {\n            delete[] tree_roots_;\n        }\n        delete[] mean_;\n        delete[] var_;\n    }\n\n    /**\n     * Builds the index\n     */\n    void buildIndex()\n    {\n        /* Construct the randomized trees. */\n        for (int i = 0; i < trees_; i++) {\n            /* Randomize the order of vectors to allow for unbiased sampling. */\n            std::random_shuffle(vind_.begin(), vind_.end());\n            tree_roots_[i] = divideTree(&vind_[0], int(size_) );\n        }\n    }\n\n\n    flann_algorithm_t getType() const\n    {\n        return FLANN_INDEX_KDTREE;\n    }\n\n\n    void saveIndex(FILE* stream)\n    {\n        save_value(stream, trees_);\n        for (int i=0; i<trees_; ++i) {\n            save_tree(stream, tree_roots_[i]);\n        }\n    }\n\n\n\n    void loadIndex(FILE* stream)\n    {\n        load_value(stream, trees_);\n        if (tree_roots_!=NULL) {\n            delete[] tree_roots_;\n        }\n        tree_roots_ = new NodePtr[trees_];\n        for (int i=0; i<trees_; ++i) {\n            load_tree(stream,tree_roots_[i]);\n        }\n\n        index_params_[\"algorithm\"] = getType();\n        index_params_[\"trees\"] = tree_roots_;\n    }\n\n    /**\n     *  Returns size of index.\n     */\n    size_t size() const\n    {\n        return size_;\n    }\n\n    /**\n     * Returns the length of an index feature.\n     */\n    size_t veclen() const\n    {\n        return veclen_;\n    }\n\n    /**\n     * Computes the inde memory usage\n     * Returns: memory used by the index\n     */\n    int usedMemory() const\n    {\n        return int(pool_.usedMemory+pool_.wastedMemory+dataset_.rows*sizeof(int));  // pool memory and vind array memory\n    }\n\n    /**\n     * Find set of nearest neighbors to vec. Their indices are stored inside\n     * the result object.\n     *\n     * Params:\n     *     result = the result object in which the indices of the nearest-neighbors are stored\n     *     vec = the vector for which to search the nearest neighbors\n     *     maxCheck = the maximum number of restarts (in a best-bin-first manner)\n     */\n    void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)\n    {\n        int maxChecks = get_param(searchParams,\"checks\", 32);\n        float epsError = 1+get_param(searchParams,\"eps\",0.0f);\n\n        if (maxChecks==FLANN_CHECKS_UNLIMITED) {\n            getExactNeighbors(result, vec, epsError);\n        }\n        else {\n            getNeighbors(result, vec, maxChecks, epsError);\n        }\n    }\n\n    IndexParams getParameters() const\n    {\n        return index_params_;\n    }\n\nprivate:\n\n\n    /*--------------------- Internal Data Structures --------------------------*/\n    struct Node\n    {\n        /**\n         * Dimension used for subdivision.\n         */\n        int divfeat;\n        /**\n         * The values used for subdivision.\n         */\n        DistanceType divval;\n        /**\n         * The child nodes.\n         */\n        Node* child1, * child2;\n    };\n    typedef Node* NodePtr;\n    typedef BranchStruct<NodePtr, DistanceType> BranchSt;\n    typedef BranchSt* Branch;\n\n\n\n    void save_tree(FILE* stream, NodePtr tree)\n    {\n        save_value(stream, *tree);\n        if (tree->child1!=NULL) {\n            save_tree(stream, tree->child1);\n        }\n        if (tree->child2!=NULL) {\n            save_tree(stream, tree->child2);\n        }\n    }\n\n\n    void load_tree(FILE* stream, NodePtr& tree)\n    {\n        tree = pool_.allocate<Node>();\n        load_value(stream, *tree);\n        if (tree->child1!=NULL) {\n            load_tree(stream, tree->child1);\n        }\n        if (tree->child2!=NULL) {\n            load_tree(stream, tree->child2);\n        }\n    }\n\n\n    /**\n     * Create a tree node that subdivides the list of vecs from vind[first]\n     * to vind[last].  The routine is called recursively on each sublist.\n     * Place a pointer to this new tree node in the location pTree.\n     *\n     * Params: pTree = the new node to create\n     *                  first = index of the first vector\n     *                  last = index of the last vector\n     */\n    NodePtr divideTree(int* ind, int count)\n    {\n        NodePtr node = pool_.allocate<Node>(); // allocate memory\n\n        /* If too few exemplars remain, then make this a leaf node. */\n        if ( count == 1) {\n            node->child1 = node->child2 = NULL;    /* Mark as leaf node. */\n            node->divfeat = *ind;    /* Store index of this vec. */\n        }\n        else {\n            int idx;\n            int cutfeat;\n            DistanceType cutval;\n            meanSplit(ind, count, idx, cutfeat, cutval);\n\n            node->divfeat = cutfeat;\n            node->divval = cutval;\n            node->child1 = divideTree(ind, idx);\n            node->child2 = divideTree(ind+idx, count-idx);\n        }\n\n        return node;\n    }\n\n\n    /**\n     * Choose which feature to use in order to subdivide this set of vectors.\n     * Make a random choice among those with the highest variance, and use\n     * its variance as the threshold value.\n     */\n    void meanSplit(int* ind, int count, int& index, int& cutfeat, DistanceType& cutval)\n    {\n        memset(mean_,0,veclen_*sizeof(DistanceType));\n        memset(var_,0,veclen_*sizeof(DistanceType));\n\n        /* Compute mean values.  Only the first SAMPLE_MEAN values need to be\n            sampled to get a good estimate.\n         */\n        int cnt = std::min((int)SAMPLE_MEAN+1, count);\n        for (int j = 0; j < cnt; ++j) {\n            ElementType* v = dataset_[ind[j]];\n            for (size_t k=0; k<veclen_; ++k) {\n                mean_[k] += v[k];\n            }\n        }\n        for (size_t k=0; k<veclen_; ++k) {\n            mean_[k] /= cnt;\n        }\n\n        /* Compute variances (no need to divide by count). */\n        for (int j = 0; j < cnt; ++j) {\n            ElementType* v = dataset_[ind[j]];\n            for (size_t k=0; k<veclen_; ++k) {\n                DistanceType dist = v[k] - mean_[k];\n                var_[k] += dist * dist;\n            }\n        }\n        /* Select one of the highest variance indices at random. */\n        cutfeat = selectDivision(var_);\n        cutval = mean_[cutfeat];\n\n        int lim1, lim2;\n        planeSplit(ind, count, cutfeat, cutval, lim1, lim2);\n\n        if (lim1>count/2) index = lim1;\n        else if (lim2<count/2) index = lim2;\n        else index = count/2;\n\n        /* If either list is empty, it means that all remaining features\n         * are identical. Split in the middle to maintain a balanced tree.\n         */\n        if ((lim1==count)||(lim2==0)) index = count/2;\n    }\n\n\n    /**\n     * Select the top RAND_DIM largest values from v and return the index of\n     * one of these selected at random.\n     */\n    int selectDivision(DistanceType* v)\n    {\n        int num = 0;\n        size_t topind[RAND_DIM];\n\n        /* Create a list of the indices of the top RAND_DIM values. */\n        for (size_t i = 0; i < veclen_; ++i) {\n            if ((num < RAND_DIM)||(v[i] > v[topind[num-1]])) {\n                /* Put this element at end of topind. */\n                if (num < RAND_DIM) {\n                    topind[num++] = i;            /* Add to list. */\n                }\n                else {\n                    topind[num-1] = i;         /* Replace last element. */\n                }\n                /* Bubble end value down to right location by repeated swapping. */\n                int j = num - 1;\n                while (j > 0  &&  v[topind[j]] > v[topind[j-1]]) {\n                    std::swap(topind[j], topind[j-1]);\n                    --j;\n                }\n            }\n        }\n        /* Select a random integer in range [0,num-1], and return that index. */\n        int rnd = rand_int(num);\n        return (int)topind[rnd];\n    }\n\n\n    /**\n     *  Subdivide the list of points by a plane perpendicular on axe corresponding\n     *  to the 'cutfeat' dimension at 'cutval' position.\n     *\n     *  On return:\n     *  dataset[ind[0..lim1-1]][cutfeat]<cutval\n     *  dataset[ind[lim1..lim2-1]][cutfeat]==cutval\n     *  dataset[ind[lim2..count]][cutfeat]>cutval\n     */\n    void planeSplit(int* ind, int count, int cutfeat, DistanceType cutval, int& lim1, int& lim2)\n    {\n        /* Move vector indices for left subtree to front of list. */\n        int left = 0;\n        int right = count-1;\n        for (;; ) {\n            while (left<=right && dataset_[ind[left]][cutfeat]<cutval) ++left;\n            while (left<=right && dataset_[ind[right]][cutfeat]>=cutval) --right;\n            if (left>right) break;\n            std::swap(ind[left], ind[right]); ++left; --right;\n        }\n        lim1 = left;\n        right = count-1;\n        for (;; ) {\n            while (left<=right && dataset_[ind[left]][cutfeat]<=cutval) ++left;\n            while (left<=right && dataset_[ind[right]][cutfeat]>cutval) --right;\n            if (left>right) break;\n            std::swap(ind[left], ind[right]); ++left; --right;\n        }\n        lim2 = left;\n    }\n\n    /**\n     * Performs an exact nearest neighbor search. The exact search performs a full\n     * traversal of the tree.\n     */\n    void getExactNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, float epsError)\n    {\n        //\t\tcheckID -= 1;  /* Set a different unique ID for each search. */\n\n        if (trees_ > 1) {\n            fprintf(stderr,\"It doesn't make any sense to use more than one tree for exact search\");\n        }\n        if (trees_>0) {\n            searchLevelExact(result, vec, tree_roots_[0], 0.0, epsError);\n        }\n        assert(result.full());\n    }\n\n    /**\n     * Performs the approximate nearest-neighbor search. The search is approximate\n     * because the tree traversal is abandoned after a given number of descends in\n     * the tree.\n     */\n    void getNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, int maxCheck, float epsError)\n    {\n        int i;\n        BranchSt branch;\n\n        int checkCount = 0;\n        Heap<BranchSt>* heap = new Heap<BranchSt>((int)size_);\n        DynamicBitset checked(size_);\n\n        /* Search once through each tree down to root. */\n        for (i = 0; i < trees_; ++i) {\n            searchLevel(result, vec, tree_roots_[i], 0, checkCount, maxCheck, epsError, heap, checked);\n        }\n\n        /* Keep searching other branches from heap until finished. */\n        while ( heap->popMin(branch) && (checkCount < maxCheck || !result.full() )) {\n            searchLevel(result, vec, branch.node, branch.mindist, checkCount, maxCheck, epsError, heap, checked);\n        }\n\n        delete heap;\n\n        assert(result.full());\n    }\n\n\n    /**\n     *  Search starting from a given node of the tree.  Based on any mismatches at\n     *  higher levels, all exemplars below this level must have a distance of\n     *  at least \"mindistsq\".\n     */\n    void searchLevel(ResultSet<DistanceType>& result_set, const ElementType* vec, NodePtr node, DistanceType mindist, int& checkCount, int maxCheck,\n                     float epsError, Heap<BranchSt>* heap, DynamicBitset& checked)\n    {\n        if (result_set.worstDist()<mindist) {\n            //\t\t\tprintf(\"Ignoring branch, too far\\n\");\n            return;\n        }\n\n        /* If this is a leaf node, then do check and return. */\n        if ((node->child1 == NULL)&&(node->child2 == NULL)) {\n            /*  Do not check same node more than once when searching multiple trees.\n                Once a vector is checked, we set its location in vind to the\n                current checkID.\n             */\n            int index = node->divfeat;\n            if ( checked.test(index) || ((checkCount>=maxCheck)&& result_set.full()) ) return;\n            checked.set(index);\n            checkCount++;\n\n            DistanceType dist = distance_(dataset_[index], vec, veclen_);\n            result_set.addPoint(dist,index);\n\n            return;\n        }\n\n        /* Which child branch should be taken first? */\n        ElementType val = vec[node->divfeat];\n        DistanceType diff = val - node->divval;\n        NodePtr bestChild = (diff < 0) ? node->child1 : node->child2;\n        NodePtr otherChild = (diff < 0) ? node->child2 : node->child1;\n\n        /* Create a branch record for the branch not taken.  Add distance\n            of this feature boundary (we don't attempt to correct for any\n            use of this feature in a parent node, which is unlikely to\n            happen and would have only a small effect).  Don't bother\n            adding more branches to heap after halfway point, as cost of\n            adding exceeds their value.\n         */\n\n        DistanceType new_distsq = mindist + distance_.accum_dist(val, node->divval, node->divfeat);\n        //\t\tif (2 * checkCount < maxCheck  ||  !result.full()) {\n        if ((new_distsq*epsError < result_set.worstDist())||  !result_set.full()) {\n            heap->insert( BranchSt(otherChild, new_distsq) );\n        }\n\n        /* Call recursively to search next level down. */\n        searchLevel(result_set, vec, bestChild, mindist, checkCount, maxCheck, epsError, heap, checked);\n    }\n\n    /**\n     * Performs an exact search in the tree starting from a node.\n     */\n    void searchLevelExact(ResultSet<DistanceType>& result_set, const ElementType* vec, const NodePtr node, DistanceType mindist, const float epsError)\n    {\n        /* If this is a leaf node, then do check and return. */\n        if ((node->child1 == NULL)&&(node->child2 == NULL)) {\n            int index = node->divfeat;\n            DistanceType dist = distance_(dataset_[index], vec, veclen_);\n            result_set.addPoint(dist,index);\n            return;\n        }\n\n        /* Which child branch should be taken first? */\n        ElementType val = vec[node->divfeat];\n        DistanceType diff = val - node->divval;\n        NodePtr bestChild = (diff < 0) ? node->child1 : node->child2;\n        NodePtr otherChild = (diff < 0) ? node->child2 : node->child1;\n\n        /* Create a branch record for the branch not taken.  Add distance\n            of this feature boundary (we don't attempt to correct for any\n            use of this feature in a parent node, which is unlikely to\n            happen and would have only a small effect).  Don't bother\n            adding more branches to heap after halfway point, as cost of\n            adding exceeds their value.\n         */\n\n        DistanceType new_distsq = mindist + distance_.accum_dist(val, node->divval, node->divfeat);\n\n        /* Call recursively to search next level down. */\n        searchLevelExact(result_set, vec, bestChild, mindist, epsError);\n\n        if (new_distsq*epsError<=result_set.worstDist()) {\n            searchLevelExact(result_set, vec, otherChild, new_distsq, epsError);\n        }\n    }\n\n\nprivate:\n\n    enum\n    {\n        /**\n         * To improve efficiency, only SAMPLE_MEAN random values are used to\n         * compute the mean and variance at each level when building a tree.\n         * A value of 100 seems to perform as well as using all values.\n         */\n        SAMPLE_MEAN = 100,\n        /**\n         * Top random dimensions to consider\n         *\n         * When creating random trees, the dimension on which to subdivide is\n         * selected at random from among the top RAND_DIM dimensions with the\n         * highest variance.  A value of 5 works well.\n         */\n        RAND_DIM=5\n    };\n\n\n    /**\n     * Number of randomized trees that are used\n     */\n    int trees_;\n\n    /**\n     *  Array of indices to vectors in the dataset.\n     */\n    std::vector<int> vind_;\n\n    /**\n     * The dataset used by this index\n     */\n    const Matrix<ElementType> dataset_;\n\n    IndexParams index_params_;\n\n    size_t size_;\n    size_t veclen_;\n\n\n    DistanceType* mean_;\n    DistanceType* var_;\n\n\n    /**\n     * Array of k-d trees used to find neighbours.\n     */\n    NodePtr* tree_roots_;\n\n    /**\n     * Pooled memory allocator.\n     *\n     * Using a pooled memory allocator is more efficient\n     * than allocating memory directly when there is a large\n     * number small of memory allocations.\n     */\n    PooledAllocator pool_;\n\n    Distance distance_;\n\n\n};   // class KDTreeForest\n\n}\n\n#endif //OPENCV_FLANN_KDTREE_INDEX_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/kdtree_single_index.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_KDTREE_SINGLE_INDEX_H_\n#define OPENCV_FLANN_KDTREE_SINGLE_INDEX_H_\n\n#include <algorithm>\n#include <map>\n#include <cassert>\n#include <cstring>\n\n#include \"general.h\"\n#include \"nn_index.h\"\n#include \"matrix.h\"\n#include \"result_set.h\"\n#include \"heap.h\"\n#include \"allocator.h\"\n#include \"random.h\"\n#include \"saving.h\"\n\nnamespace cvflann\n{\n\nstruct KDTreeSingleIndexParams : public IndexParams\n{\n    KDTreeSingleIndexParams(int leaf_max_size = 10, bool reorder = true, int dim = -1)\n    {\n        (*this)[\"algorithm\"] = FLANN_INDEX_KDTREE_SINGLE;\n        (*this)[\"leaf_max_size\"] = leaf_max_size;\n        (*this)[\"reorder\"] = reorder;\n        (*this)[\"dim\"] = dim;\n    }\n};\n\n\n/**\n * Randomized kd-tree index\n *\n * Contains the k-d trees and other information for indexing a set of points\n * for nearest-neighbor matching.\n */\ntemplate <typename Distance>\nclass KDTreeSingleIndex : public NNIndex<Distance>\n{\npublic:\n    typedef typename Distance::ElementType ElementType;\n    typedef typename Distance::ResultType DistanceType;\n\n\n    /**\n     * KDTree constructor\n     *\n     * Params:\n     *          inputData = dataset with the input features\n     *          params = parameters passed to the kdtree algorithm\n     */\n    KDTreeSingleIndex(const Matrix<ElementType>& inputData, const IndexParams& params = KDTreeSingleIndexParams(),\n                      Distance d = Distance() ) :\n        dataset_(inputData), index_params_(params), distance_(d)\n    {\n        size_ = dataset_.rows;\n        dim_ = dataset_.cols;\n        int dim_param = get_param(params,\"dim\",-1);\n        if (dim_param>0) dim_ = dim_param;\n        leaf_max_size_ = get_param(params,\"leaf_max_size\",10);\n        reorder_ = get_param(params,\"reorder\",true);\n\n        // Create a permutable array of indices to the input vectors.\n        vind_.resize(size_);\n        for (size_t i = 0; i < size_; i++) {\n            vind_[i] = (int)i;\n        }\n    }\n\n    KDTreeSingleIndex(const KDTreeSingleIndex&);\n    KDTreeSingleIndex& operator=(const KDTreeSingleIndex&);\n\n    /**\n     * Standard destructor\n     */\n    ~KDTreeSingleIndex()\n    {\n        if (reorder_) delete[] data_.data;\n    }\n\n    /**\n     * Builds the index\n     */\n    void buildIndex()\n    {\n        computeBoundingBox(root_bbox_);\n        root_node_ = divideTree(0, (int)size_, root_bbox_ );   // construct the tree\n\n        if (reorder_) {\n            delete[] data_.data;\n            data_ = cvflann::Matrix<ElementType>(new ElementType[size_*dim_], size_, dim_);\n            for (size_t i=0; i<size_; ++i) {\n                for (size_t j=0; j<dim_; ++j) {\n                    data_[i][j] = dataset_[vind_[i]][j];\n                }\n            }\n        }\n        else {\n            data_ = dataset_;\n        }\n    }\n\n    flann_algorithm_t getType() const\n    {\n        return FLANN_INDEX_KDTREE_SINGLE;\n    }\n\n\n    void saveIndex(FILE* stream)\n    {\n        save_value(stream, size_);\n        save_value(stream, dim_);\n        save_value(stream, root_bbox_);\n        save_value(stream, reorder_);\n        save_value(stream, leaf_max_size_);\n        save_value(stream, vind_);\n        if (reorder_) {\n            save_value(stream, data_);\n        }\n        save_tree(stream, root_node_);\n    }\n\n\n    void loadIndex(FILE* stream)\n    {\n        load_value(stream, size_);\n        load_value(stream, dim_);\n        load_value(stream, root_bbox_);\n        load_value(stream, reorder_);\n        load_value(stream, leaf_max_size_);\n        load_value(stream, vind_);\n        if (reorder_) {\n            load_value(stream, data_);\n        }\n        else {\n            data_ = dataset_;\n        }\n        load_tree(stream, root_node_);\n\n\n        index_params_[\"algorithm\"] = getType();\n        index_params_[\"leaf_max_size\"] = leaf_max_size_;\n        index_params_[\"reorder\"] = reorder_;\n    }\n\n    /**\n     *  Returns size of index.\n     */\n    size_t size() const\n    {\n        return size_;\n    }\n\n    /**\n     * Returns the length of an index feature.\n     */\n    size_t veclen() const\n    {\n        return dim_;\n    }\n\n    /**\n     * Computes the inde memory usage\n     * Returns: memory used by the index\n     */\n    int usedMemory() const\n    {\n        return (int)(pool_.usedMemory+pool_.wastedMemory+dataset_.rows*sizeof(int));  // pool memory and vind array memory\n    }\n\n\n    /**\n     * \\brief Perform k-nearest neighbor search\n     * \\param[in] queries The query points for which to find the nearest neighbors\n     * \\param[out] indices The indices of the nearest neighbors found\n     * \\param[out] dists Distances to the nearest neighbors found\n     * \\param[in] knn Number of nearest neighbors to return\n     * \\param[in] params Search parameters\n     */\n    void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params)\n    {\n        assert(queries.cols == veclen());\n        assert(indices.rows >= queries.rows);\n        assert(dists.rows >= queries.rows);\n        assert(int(indices.cols) >= knn);\n        assert(int(dists.cols) >= knn);\n\n        KNNSimpleResultSet<DistanceType> resultSet(knn);\n        for (size_t i = 0; i < queries.rows; i++) {\n            resultSet.init(indices[i], dists[i]);\n            findNeighbors(resultSet, queries[i], params);\n        }\n    }\n\n    IndexParams getParameters() const\n    {\n        return index_params_;\n    }\n\n    /**\n     * Find set of nearest neighbors to vec. Their indices are stored inside\n     * the result object.\n     *\n     * Params:\n     *     result = the result object in which the indices of the nearest-neighbors are stored\n     *     vec = the vector for which to search the nearest neighbors\n     *     maxCheck = the maximum number of restarts (in a best-bin-first manner)\n     */\n    void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)\n    {\n        float epsError = 1+get_param(searchParams,\"eps\",0.0f);\n\n        std::vector<DistanceType> dists(dim_,0);\n        DistanceType distsq = computeInitialDistances(vec, dists);\n        searchLevel(result, vec, root_node_, distsq, dists, epsError);\n    }\n\nprivate:\n\n\n    /*--------------------- Internal Data Structures --------------------------*/\n    struct Node\n    {\n        /**\n         * Indices of points in leaf node\n         */\n        int left, right;\n        /**\n         * Dimension used for subdivision.\n         */\n        int divfeat;\n        /**\n         * The values used for subdivision.\n         */\n        DistanceType divlow, divhigh;\n        /**\n         * The child nodes.\n         */\n        Node* child1, * child2;\n    };\n    typedef Node* NodePtr;\n\n\n    struct Interval\n    {\n        DistanceType low, high;\n    };\n\n    typedef std::vector<Interval> BoundingBox;\n\n    typedef BranchStruct<NodePtr, DistanceType> BranchSt;\n    typedef BranchSt* Branch;\n\n\n\n\n    void save_tree(FILE* stream, NodePtr tree)\n    {\n        save_value(stream, *tree);\n        if (tree->child1!=NULL) {\n            save_tree(stream, tree->child1);\n        }\n        if (tree->child2!=NULL) {\n            save_tree(stream, tree->child2);\n        }\n    }\n\n\n    void load_tree(FILE* stream, NodePtr& tree)\n    {\n        tree = pool_.allocate<Node>();\n        load_value(stream, *tree);\n        if (tree->child1!=NULL) {\n            load_tree(stream, tree->child1);\n        }\n        if (tree->child2!=NULL) {\n            load_tree(stream, tree->child2);\n        }\n    }\n\n\n    void computeBoundingBox(BoundingBox& bbox)\n    {\n        bbox.resize(dim_);\n        for (size_t i=0; i<dim_; ++i) {\n            bbox[i].low = (DistanceType)dataset_[0][i];\n            bbox[i].high = (DistanceType)dataset_[0][i];\n        }\n        for (size_t k=1; k<dataset_.rows; ++k) {\n            for (size_t i=0; i<dim_; ++i) {\n                if (dataset_[k][i]<bbox[i].low) bbox[i].low = (DistanceType)dataset_[k][i];\n                if (dataset_[k][i]>bbox[i].high) bbox[i].high = (DistanceType)dataset_[k][i];\n            }\n        }\n    }\n\n\n    /**\n     * Create a tree node that subdivides the list of vecs from vind[first]\n     * to vind[last].  The routine is called recursively on each sublist.\n     * Place a pointer to this new tree node in the location pTree.\n     *\n     * Params: pTree = the new node to create\n     *                  first = index of the first vector\n     *                  last = index of the last vector\n     */\n    NodePtr divideTree(int left, int right, BoundingBox& bbox)\n    {\n        NodePtr node = pool_.allocate<Node>(); // allocate memory\n\n        /* If too few exemplars remain, then make this a leaf node. */\n        if ( (right-left) <= leaf_max_size_) {\n            node->child1 = node->child2 = NULL;    /* Mark as leaf node. */\n            node->left = left;\n            node->right = right;\n\n            // compute bounding-box of leaf points\n            for (size_t i=0; i<dim_; ++i) {\n                bbox[i].low = (DistanceType)dataset_[vind_[left]][i];\n                bbox[i].high = (DistanceType)dataset_[vind_[left]][i];\n            }\n            for (int k=left+1; k<right; ++k) {\n                for (size_t i=0; i<dim_; ++i) {\n                    if (bbox[i].low>dataset_[vind_[k]][i]) bbox[i].low=(DistanceType)dataset_[vind_[k]][i];\n                    if (bbox[i].high<dataset_[vind_[k]][i]) bbox[i].high=(DistanceType)dataset_[vind_[k]][i];\n                }\n            }\n        }\n        else {\n            int idx;\n            int cutfeat;\n            DistanceType cutval;\n            middleSplit_(&vind_[0]+left, right-left, idx, cutfeat, cutval, bbox);\n\n            node->divfeat = cutfeat;\n\n            BoundingBox left_bbox(bbox);\n            left_bbox[cutfeat].high = cutval;\n            node->child1 = divideTree(left, left+idx, left_bbox);\n\n            BoundingBox right_bbox(bbox);\n            right_bbox[cutfeat].low = cutval;\n            node->child2 = divideTree(left+idx, right, right_bbox);\n\n            node->divlow = left_bbox[cutfeat].high;\n            node->divhigh = right_bbox[cutfeat].low;\n\n            for (size_t i=0; i<dim_; ++i) {\n                bbox[i].low = std::min(left_bbox[i].low, right_bbox[i].low);\n                bbox[i].high = std::max(left_bbox[i].high, right_bbox[i].high);\n            }\n        }\n\n        return node;\n    }\n\n    void computeMinMax(int* ind, int count, int dim, ElementType& min_elem, ElementType& max_elem)\n    {\n        min_elem = dataset_[ind[0]][dim];\n        max_elem = dataset_[ind[0]][dim];\n        for (int i=1; i<count; ++i) {\n            ElementType val = dataset_[ind[i]][dim];\n            if (val<min_elem) min_elem = val;\n            if (val>max_elem) max_elem = val;\n        }\n    }\n\n    void middleSplit(int* ind, int count, int& index, int& cutfeat, DistanceType& cutval, const BoundingBox& bbox)\n    {\n        // find the largest span from the approximate bounding box\n        ElementType max_span = bbox[0].high-bbox[0].low;\n        cutfeat = 0;\n        cutval = (bbox[0].high+bbox[0].low)/2;\n        for (size_t i=1; i<dim_; ++i) {\n            ElementType span = bbox[i].high-bbox[i].low;\n            if (span>max_span) {\n                max_span = span;\n                cutfeat = i;\n                cutval = (bbox[i].high+bbox[i].low)/2;\n            }\n        }\n\n        // compute exact span on the found dimension\n        ElementType min_elem, max_elem;\n        computeMinMax(ind, count, cutfeat, min_elem, max_elem);\n        cutval = (min_elem+max_elem)/2;\n        max_span = max_elem - min_elem;\n\n        // check if a dimension of a largest span exists\n        size_t k = cutfeat;\n        for (size_t i=0; i<dim_; ++i) {\n            if (i==k) continue;\n            ElementType span = bbox[i].high-bbox[i].low;\n            if (span>max_span) {\n                computeMinMax(ind, count, i, min_elem, max_elem);\n                span = max_elem - min_elem;\n                if (span>max_span) {\n                    max_span = span;\n                    cutfeat = i;\n                    cutval = (min_elem+max_elem)/2;\n                }\n            }\n        }\n        int lim1, lim2;\n        planeSplit(ind, count, cutfeat, cutval, lim1, lim2);\n\n        if (lim1>count/2) index = lim1;\n        else if (lim2<count/2) index = lim2;\n        else index = count/2;\n    }\n\n\n    void middleSplit_(int* ind, int count, int& index, int& cutfeat, DistanceType& cutval, const BoundingBox& bbox)\n    {\n        const float EPS=0.00001f;\n        DistanceType max_span = bbox[0].high-bbox[0].low;\n        for (size_t i=1; i<dim_; ++i) {\n            DistanceType span = bbox[i].high-bbox[i].low;\n            if (span>max_span) {\n                max_span = span;\n            }\n        }\n        DistanceType max_spread = -1;\n        cutfeat = 0;\n        for (size_t i=0; i<dim_; ++i) {\n            DistanceType span = bbox[i].high-bbox[i].low;\n            if (span>(DistanceType)((1-EPS)*max_span)) {\n                ElementType min_elem, max_elem;\n                computeMinMax(ind, count, cutfeat, min_elem, max_elem);\n                DistanceType spread = (DistanceType)(max_elem-min_elem);\n                if (spread>max_spread) {\n                    cutfeat = (int)i;\n                    max_spread = spread;\n                }\n            }\n        }\n        // split in the middle\n        DistanceType split_val = (bbox[cutfeat].low+bbox[cutfeat].high)/2;\n        ElementType min_elem, max_elem;\n        computeMinMax(ind, count, cutfeat, min_elem, max_elem);\n\n        if (split_val<min_elem) cutval = (DistanceType)min_elem;\n        else if (split_val>max_elem) cutval = (DistanceType)max_elem;\n        else cutval = split_val;\n\n        int lim1, lim2;\n        planeSplit(ind, count, cutfeat, cutval, lim1, lim2);\n\n        if (lim1>count/2) index = lim1;\n        else if (lim2<count/2) index = lim2;\n        else index = count/2;\n    }\n\n\n    /**\n     *  Subdivide the list of points by a plane perpendicular on axe corresponding\n     *  to the 'cutfeat' dimension at 'cutval' position.\n     *\n     *  On return:\n     *  dataset[ind[0..lim1-1]][cutfeat]<cutval\n     *  dataset[ind[lim1..lim2-1]][cutfeat]==cutval\n     *  dataset[ind[lim2..count]][cutfeat]>cutval\n     */\n    void planeSplit(int* ind, int count, int cutfeat, DistanceType cutval, int& lim1, int& lim2)\n    {\n        /* Move vector indices for left subtree to front of list. */\n        int left = 0;\n        int right = count-1;\n        for (;; ) {\n            while (left<=right && dataset_[ind[left]][cutfeat]<cutval) ++left;\n            while (left<=right && dataset_[ind[right]][cutfeat]>=cutval) --right;\n            if (left>right) break;\n            std::swap(ind[left], ind[right]); ++left; --right;\n        }\n        /* If either list is empty, it means that all remaining features\n         * are identical. Split in the middle to maintain a balanced tree.\n         */\n        lim1 = left;\n        right = count-1;\n        for (;; ) {\n            while (left<=right && dataset_[ind[left]][cutfeat]<=cutval) ++left;\n            while (left<=right && dataset_[ind[right]][cutfeat]>cutval) --right;\n            if (left>right) break;\n            std::swap(ind[left], ind[right]); ++left; --right;\n        }\n        lim2 = left;\n    }\n\n    DistanceType computeInitialDistances(const ElementType* vec, std::vector<DistanceType>& dists)\n    {\n        DistanceType distsq = 0.0;\n\n        for (size_t i = 0; i < dim_; ++i) {\n            if (vec[i] < root_bbox_[i].low) {\n                dists[i] = distance_.accum_dist(vec[i], root_bbox_[i].low, (int)i);\n                distsq += dists[i];\n            }\n            if (vec[i] > root_bbox_[i].high) {\n                dists[i] = distance_.accum_dist(vec[i], root_bbox_[i].high, (int)i);\n                distsq += dists[i];\n            }\n        }\n\n        return distsq;\n    }\n\n    /**\n     * Performs an exact search in the tree starting from a node.\n     */\n    void searchLevel(ResultSet<DistanceType>& result_set, const ElementType* vec, const NodePtr node, DistanceType mindistsq,\n                     std::vector<DistanceType>& dists, const float epsError)\n    {\n        /* If this is a leaf node, then do check and return. */\n        if ((node->child1 == NULL)&&(node->child2 == NULL)) {\n            DistanceType worst_dist = result_set.worstDist();\n            for (int i=node->left; i<node->right; ++i) {\n                int index = reorder_ ? i : vind_[i];\n                DistanceType dist = distance_(vec, data_[index], dim_, worst_dist);\n                if (dist<worst_dist) {\n                    result_set.addPoint(dist,vind_[i]);\n                }\n            }\n            return;\n        }\n\n        /* Which child branch should be taken first? */\n        int idx = node->divfeat;\n        ElementType val = vec[idx];\n        DistanceType diff1 = val - node->divlow;\n        DistanceType diff2 = val - node->divhigh;\n\n        NodePtr bestChild;\n        NodePtr otherChild;\n        DistanceType cut_dist;\n        if ((diff1+diff2)<0) {\n            bestChild = node->child1;\n            otherChild = node->child2;\n            cut_dist = distance_.accum_dist(val, node->divhigh, idx);\n        }\n        else {\n            bestChild = node->child2;\n            otherChild = node->child1;\n            cut_dist = distance_.accum_dist( val, node->divlow, idx);\n        }\n\n        /* Call recursively to search next level down. */\n        searchLevel(result_set, vec, bestChild, mindistsq, dists, epsError);\n\n        DistanceType dst = dists[idx];\n        mindistsq = mindistsq + cut_dist - dst;\n        dists[idx] = cut_dist;\n        if (mindistsq*epsError<=result_set.worstDist()) {\n            searchLevel(result_set, vec, otherChild, mindistsq, dists, epsError);\n        }\n        dists[idx] = dst;\n    }\n\nprivate:\n\n    /**\n     * The dataset used by this index\n     */\n    const Matrix<ElementType> dataset_;\n\n    IndexParams index_params_;\n\n    int leaf_max_size_;\n    bool reorder_;\n\n\n    /**\n     *  Array of indices to vectors in the dataset.\n     */\n    std::vector<int> vind_;\n\n    Matrix<ElementType> data_;\n\n    size_t size_;\n    size_t dim_;\n\n    /**\n     * Array of k-d trees used to find neighbours.\n     */\n    NodePtr root_node_;\n\n    BoundingBox root_bbox_;\n\n    /**\n     * Pooled memory allocator.\n     *\n     * Using a pooled memory allocator is more efficient\n     * than allocating memory directly when there is a large\n     * number small of memory allocations.\n     */\n    PooledAllocator pool_;\n\n    Distance distance_;\n};   // class KDTree\n\n}\n\n#endif //OPENCV_FLANN_KDTREE_SINGLE_INDEX_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/kmeans_index.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_KMEANS_INDEX_H_\n#define OPENCV_FLANN_KMEANS_INDEX_H_\n\n#include <algorithm>\n#include <map>\n#include <cassert>\n#include <limits>\n#include <cmath>\n\n#include \"general.h\"\n#include \"nn_index.h\"\n#include \"dist.h\"\n#include \"matrix.h\"\n#include \"result_set.h\"\n#include \"heap.h\"\n#include \"allocator.h\"\n#include \"random.h\"\n#include \"saving.h\"\n#include \"logger.h\"\n\n\nnamespace cvflann\n{\n\nstruct KMeansIndexParams : public IndexParams\n{\n    KMeansIndexParams(int branching = 32, int iterations = 11,\n                      flann_centers_init_t centers_init = FLANN_CENTERS_RANDOM, float cb_index = 0.2 )\n    {\n        (*this)[\"algorithm\"] = FLANN_INDEX_KMEANS;\n        // branching factor\n        (*this)[\"branching\"] = branching;\n        // max iterations to perform in one kmeans clustering (kmeans tree)\n        (*this)[\"iterations\"] = iterations;\n        // algorithm used for picking the initial cluster centers for kmeans tree\n        (*this)[\"centers_init\"] = centers_init;\n        // cluster boundary index. Used when searching the kmeans tree\n        (*this)[\"cb_index\"] = cb_index;\n    }\n};\n\n\n/**\n * Hierarchical kmeans index\n *\n * Contains a tree constructed through a hierarchical kmeans clustering\n * and other information for indexing a set of points for nearest-neighbour matching.\n */\ntemplate <typename Distance>\nclass KMeansIndex : public NNIndex<Distance>\n{\npublic:\n    typedef typename Distance::ElementType ElementType;\n    typedef typename Distance::ResultType DistanceType;\n\n\n\n    typedef void (KMeansIndex::* centersAlgFunction)(int, int*, int, int*, int&);\n\n    /**\n     * The function used for choosing the cluster centers.\n     */\n    centersAlgFunction chooseCenters;\n\n\n\n    /**\n     * Chooses the initial centers in the k-means clustering in a random manner.\n     *\n     * Params:\n     *     k = number of centers\n     *     vecs = the dataset of points\n     *     indices = indices in the dataset\n     *     indices_length = length of indices vector\n     *\n     */\n    void chooseCentersRandom(int k, int* indices, int indices_length, int* centers, int& centers_length)\n    {\n        UniqueRandom r(indices_length);\n\n        int index;\n        for (index=0; index<k; ++index) {\n            bool duplicate = true;\n            int rnd;\n            while (duplicate) {\n                duplicate = false;\n                rnd = r.next();\n                if (rnd<0) {\n                    centers_length = index;\n                    return;\n                }\n\n                centers[index] = indices[rnd];\n\n                for (int j=0; j<index; ++j) {\n                    DistanceType sq = distance_(dataset_[centers[index]], dataset_[centers[j]], dataset_.cols);\n                    if (sq<1e-16) {\n                        duplicate = true;\n                    }\n                }\n            }\n        }\n\n        centers_length = index;\n    }\n\n\n    /**\n     * Chooses the initial centers in the k-means using Gonzales' algorithm\n     * so that the centers are spaced apart from each other.\n     *\n     * Params:\n     *     k = number of centers\n     *     vecs = the dataset of points\n     *     indices = indices in the dataset\n     * Returns:\n     */\n    void chooseCentersGonzales(int k, int* indices, int indices_length, int* centers, int& centers_length)\n    {\n        int n = indices_length;\n\n        int rnd = rand_int(n);\n        assert(rnd >=0 && rnd < n);\n\n        centers[0] = indices[rnd];\n\n        int index;\n        for (index=1; index<k; ++index) {\n\n            int best_index = -1;\n            DistanceType best_val = 0;\n            for (int j=0; j<n; ++j) {\n                DistanceType dist = distance_(dataset_[centers[0]],dataset_[indices[j]],dataset_.cols);\n                for (int i=1; i<index; ++i) {\n                    DistanceType tmp_dist = distance_(dataset_[centers[i]],dataset_[indices[j]],dataset_.cols);\n                    if (tmp_dist<dist) {\n                        dist = tmp_dist;\n                    }\n                }\n                if (dist>best_val) {\n                    best_val = dist;\n                    best_index = j;\n                }\n            }\n            if (best_index!=-1) {\n                centers[index] = indices[best_index];\n            }\n            else {\n                break;\n            }\n        }\n        centers_length = index;\n    }\n\n\n    /**\n     * Chooses the initial centers in the k-means using the algorithm\n     * proposed in the KMeans++ paper:\n     * Arthur, David; Vassilvitskii, Sergei - k-means++: The Advantages of Careful Seeding\n     *\n     * Implementation of this function was converted from the one provided in Arthur's code.\n     *\n     * Params:\n     *     k = number of centers\n     *     vecs = the dataset of points\n     *     indices = indices in the dataset\n     * Returns:\n     */\n    void chooseCentersKMeanspp(int k, int* indices, int indices_length, int* centers, int& centers_length)\n    {\n        int n = indices_length;\n\n        double currentPot = 0;\n        DistanceType* closestDistSq = new DistanceType[n];\n\n        // Choose one random center and set the closestDistSq values\n        int index = rand_int(n);\n        assert(index >=0 && index < n);\n        centers[0] = indices[index];\n\n        for (int i = 0; i < n; i++) {\n            closestDistSq[i] = distance_(dataset_[indices[i]], dataset_[indices[index]], dataset_.cols);\n            closestDistSq[i] = ensureSquareDistance<Distance>( closestDistSq[i] );\n            currentPot += closestDistSq[i];\n        }\n\n\n        const int numLocalTries = 1;\n\n        // Choose each center\n        int centerCount;\n        for (centerCount = 1; centerCount < k; centerCount++) {\n\n            // Repeat several trials\n            double bestNewPot = -1;\n            int bestNewIndex = -1;\n            for (int localTrial = 0; localTrial < numLocalTries; localTrial++) {\n\n                // Choose our center - have to be slightly careful to return a valid answer even accounting\n                // for possible rounding errors\n                double randVal = rand_double(currentPot);\n                for (index = 0; index < n-1; index++) {\n                    if (randVal <= closestDistSq[index]) break;\n                    else randVal -= closestDistSq[index];\n                }\n\n                // Compute the new potential\n                double newPot = 0;\n                for (int i = 0; i < n; i++) {\n                    DistanceType dist = distance_(dataset_[indices[i]], dataset_[indices[index]], dataset_.cols);\n                    newPot += std::min( ensureSquareDistance<Distance>(dist), closestDistSq[i] );\n                }\n\n                // Store the best result\n                if ((bestNewPot < 0)||(newPot < bestNewPot)) {\n                    bestNewPot = newPot;\n                    bestNewIndex = index;\n                }\n            }\n\n            // Add the appropriate center\n            centers[centerCount] = indices[bestNewIndex];\n            currentPot = bestNewPot;\n            for (int i = 0; i < n; i++) {\n                DistanceType dist = distance_(dataset_[indices[i]], dataset_[indices[bestNewIndex]], dataset_.cols);\n                closestDistSq[i] = std::min( ensureSquareDistance<Distance>(dist), closestDistSq[i] );\n            }\n        }\n\n        centers_length = centerCount;\n\n        delete[] closestDistSq;\n    }\n\n\n\npublic:\n\n    flann_algorithm_t getType() const\n    {\n        return FLANN_INDEX_KMEANS;\n    }\n\n    class KMeansDistanceComputer : public cv::ParallelLoopBody\n    {\n    public:\n        KMeansDistanceComputer(Distance _distance, const Matrix<ElementType>& _dataset,\n            const int _branching, const int* _indices, const Matrix<double>& _dcenters, const size_t _veclen,\n            int* _count, int* _belongs_to, std::vector<DistanceType>& _radiuses, bool& _converged, cv::Mutex& _mtx)\n            : distance(_distance)\n            , dataset(_dataset)\n            , branching(_branching)\n            , indices(_indices)\n            , dcenters(_dcenters)\n            , veclen(_veclen)\n            , count(_count)\n            , belongs_to(_belongs_to)\n            , radiuses(_radiuses)\n            , converged(_converged)\n            , mtx(_mtx)\n        {\n        }\n\n        void operator()(const cv::Range& range) const\n        {\n            const int begin = range.start;\n            const int end = range.end;\n\n            for( int i = begin; i<end; ++i)\n            {\n                DistanceType sq_dist = distance(dataset[indices[i]], dcenters[0], veclen);\n                int new_centroid = 0;\n                for (int j=1; j<branching; ++j) {\n                    DistanceType new_sq_dist = distance(dataset[indices[i]], dcenters[j], veclen);\n                    if (sq_dist>new_sq_dist) {\n                        new_centroid = j;\n                        sq_dist = new_sq_dist;\n                    }\n                }\n                if (sq_dist > radiuses[new_centroid]) {\n                    radiuses[new_centroid] = sq_dist;\n                }\n                if (new_centroid != belongs_to[i]) {\n                    count[belongs_to[i]]--;\n                    count[new_centroid]++;\n                    belongs_to[i] = new_centroid;\n                    mtx.lock();\n                    converged = false;\n                    mtx.unlock();\n                }\n            }\n        }\n\n    private:\n        Distance distance;\n        const Matrix<ElementType>& dataset;\n        const int branching;\n        const int* indices;\n        const Matrix<double>& dcenters;\n        const size_t veclen;\n        int* count;\n        int* belongs_to;\n        std::vector<DistanceType>& radiuses;\n        bool& converged;\n        cv::Mutex& mtx;\n        KMeansDistanceComputer& operator=( const KMeansDistanceComputer & ) { return *this; }\n    };\n\n    /**\n     * Index constructor\n     *\n     * Params:\n     *          inputData = dataset with the input features\n     *          params = parameters passed to the hierarchical k-means algorithm\n     */\n    KMeansIndex(const Matrix<ElementType>& inputData, const IndexParams& params = KMeansIndexParams(),\n                Distance d = Distance())\n        : dataset_(inputData), index_params_(params), root_(NULL), indices_(NULL), distance_(d)\n    {\n        memoryCounter_ = 0;\n\n        size_ = dataset_.rows;\n        veclen_ = dataset_.cols;\n\n        branching_ = get_param(params,\"branching\",32);\n        iterations_ = get_param(params,\"iterations\",11);\n        if (iterations_<0) {\n            iterations_ = (std::numeric_limits<int>::max)();\n        }\n        centers_init_  = get_param(params,\"centers_init\",FLANN_CENTERS_RANDOM);\n\n        if (centers_init_==FLANN_CENTERS_RANDOM) {\n            chooseCenters = &KMeansIndex::chooseCentersRandom;\n        }\n        else if (centers_init_==FLANN_CENTERS_GONZALES) {\n            chooseCenters = &KMeansIndex::chooseCentersGonzales;\n        }\n        else if (centers_init_==FLANN_CENTERS_KMEANSPP) {\n            chooseCenters = &KMeansIndex::chooseCentersKMeanspp;\n        }\n        else {\n            throw FLANNException(\"Unknown algorithm for choosing initial centers.\");\n        }\n        cb_index_ = 0.4f;\n\n    }\n\n\n    KMeansIndex(const KMeansIndex&);\n    KMeansIndex& operator=(const KMeansIndex&);\n\n\n    /**\n     * Index destructor.\n     *\n     * Release the memory used by the index.\n     */\n    virtual ~KMeansIndex()\n    {\n        if (root_ != NULL) {\n            free_centers(root_);\n        }\n        if (indices_!=NULL) {\n            delete[] indices_;\n        }\n    }\n\n    /**\n     *  Returns size of index.\n     */\n    size_t size() const\n    {\n        return size_;\n    }\n\n    /**\n     * Returns the length of an index feature.\n     */\n    size_t veclen() const\n    {\n        return veclen_;\n    }\n\n\n    void set_cb_index( float index)\n    {\n        cb_index_ = index;\n    }\n\n    /**\n     * Computes the inde memory usage\n     * Returns: memory used by the index\n     */\n    int usedMemory() const\n    {\n        return pool_.usedMemory+pool_.wastedMemory+memoryCounter_;\n    }\n\n    /**\n     * Builds the index\n     */\n    void buildIndex()\n    {\n        if (branching_<2) {\n            throw FLANNException(\"Branching factor must be at least 2\");\n        }\n\n        indices_ = new int[size_];\n        for (size_t i=0; i<size_; ++i) {\n            indices_[i] = int(i);\n        }\n\n        root_ = pool_.allocate<KMeansNode>();\n        computeNodeStatistics(root_, indices_, (int)size_);\n        computeClustering(root_, indices_, (int)size_, branching_,0);\n    }\n\n\n    void saveIndex(FILE* stream)\n    {\n        save_value(stream, branching_);\n        save_value(stream, iterations_);\n        save_value(stream, memoryCounter_);\n        save_value(stream, cb_index_);\n        save_value(stream, *indices_, (int)size_);\n\n        save_tree(stream, root_);\n    }\n\n\n    void loadIndex(FILE* stream)\n    {\n        load_value(stream, branching_);\n        load_value(stream, iterations_);\n        load_value(stream, memoryCounter_);\n        load_value(stream, cb_index_);\n        if (indices_!=NULL) {\n            delete[] indices_;\n        }\n        indices_ = new int[size_];\n        load_value(stream, *indices_, size_);\n\n        if (root_!=NULL) {\n            free_centers(root_);\n        }\n        load_tree(stream, root_);\n\n        index_params_[\"algorithm\"] = getType();\n        index_params_[\"branching\"] = branching_;\n        index_params_[\"iterations\"] = iterations_;\n        index_params_[\"centers_init\"] = centers_init_;\n        index_params_[\"cb_index\"] = cb_index_;\n\n    }\n\n\n    /**\n     * Find set of nearest neighbors to vec. Their indices are stored inside\n     * the result object.\n     *\n     * Params:\n     *     result = the result object in which the indices of the nearest-neighbors are stored\n     *     vec = the vector for which to search the nearest neighbors\n     *     searchParams = parameters that influence the search algorithm (checks, cb_index)\n     */\n    void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)\n    {\n\n        int maxChecks = get_param(searchParams,\"checks\",32);\n\n        if (maxChecks==FLANN_CHECKS_UNLIMITED) {\n            findExactNN(root_, result, vec);\n        }\n        else {\n            // Priority queue storing intermediate branches in the best-bin-first search\n            Heap<BranchSt>* heap = new Heap<BranchSt>((int)size_);\n\n            int checks = 0;\n            findNN(root_, result, vec, checks, maxChecks, heap);\n\n            BranchSt branch;\n            while (heap->popMin(branch) && (checks<maxChecks || !result.full())) {\n                KMeansNodePtr node = branch.node;\n                findNN(node, result, vec, checks, maxChecks, heap);\n            }\n            assert(result.full());\n\n            delete heap;\n        }\n\n    }\n\n    /**\n     * Clustering function that takes a cut in the hierarchical k-means\n     * tree and return the clusters centers of that clustering.\n     * Params:\n     *     numClusters = number of clusters to have in the clustering computed\n     * Returns: number of cluster centers\n     */\n    int getClusterCenters(Matrix<DistanceType>& centers)\n    {\n        int numClusters = centers.rows;\n        if (numClusters<1) {\n            throw FLANNException(\"Number of clusters must be at least 1\");\n        }\n\n        DistanceType variance;\n        KMeansNodePtr* clusters = new KMeansNodePtr[numClusters];\n\n        int clusterCount = getMinVarianceClusters(root_, clusters, numClusters, variance);\n\n        Logger::info(\"Clusters requested: %d, returning %d\\n\",numClusters, clusterCount);\n\n        for (int i=0; i<clusterCount; ++i) {\n            DistanceType* center = clusters[i]->pivot;\n            for (size_t j=0; j<veclen_; ++j) {\n                centers[i][j] = center[j];\n            }\n        }\n        delete[] clusters;\n\n        return clusterCount;\n    }\n\n    IndexParams getParameters() const\n    {\n        return index_params_;\n    }\n\n\nprivate:\n    /**\n     * Struture representing a node in the hierarchical k-means tree.\n     */\n    struct KMeansNode\n    {\n        /**\n         * The cluster center.\n         */\n        DistanceType* pivot;\n        /**\n         * The cluster radius.\n         */\n        DistanceType radius;\n        /**\n         * The cluster mean radius.\n         */\n        DistanceType mean_radius;\n        /**\n         * The cluster variance.\n         */\n        DistanceType variance;\n        /**\n         * The cluster size (number of points in the cluster)\n         */\n        int size;\n        /**\n         * Child nodes (only for non-terminal nodes)\n         */\n        KMeansNode** childs;\n        /**\n         * Node points (only for terminal nodes)\n         */\n        int* indices;\n        /**\n         * Level\n         */\n        int level;\n    };\n    typedef KMeansNode* KMeansNodePtr;\n\n    /**\n     * Alias definition for a nicer syntax.\n     */\n    typedef BranchStruct<KMeansNodePtr, DistanceType> BranchSt;\n\n\n\n\n    void save_tree(FILE* stream, KMeansNodePtr node)\n    {\n        save_value(stream, *node);\n        save_value(stream, *(node->pivot), (int)veclen_);\n        if (node->childs==NULL) {\n            int indices_offset = (int)(node->indices - indices_);\n            save_value(stream, indices_offset);\n        }\n        else {\n            for(int i=0; i<branching_; ++i) {\n                save_tree(stream, node->childs[i]);\n            }\n        }\n    }\n\n\n    void load_tree(FILE* stream, KMeansNodePtr& node)\n    {\n        node = pool_.allocate<KMeansNode>();\n        load_value(stream, *node);\n        node->pivot = new DistanceType[veclen_];\n        load_value(stream, *(node->pivot), (int)veclen_);\n        if (node->childs==NULL) {\n            int indices_offset;\n            load_value(stream, indices_offset);\n            node->indices = indices_ + indices_offset;\n        }\n        else {\n            node->childs = pool_.allocate<KMeansNodePtr>(branching_);\n            for(int i=0; i<branching_; ++i) {\n                load_tree(stream, node->childs[i]);\n            }\n        }\n    }\n\n\n    /**\n     * Helper function\n     */\n    void free_centers(KMeansNodePtr node)\n    {\n        delete[] node->pivot;\n        if (node->childs!=NULL) {\n            for (int k=0; k<branching_; ++k) {\n                free_centers(node->childs[k]);\n            }\n        }\n    }\n\n    /**\n     * Computes the statistics of a node (mean, radius, variance).\n     *\n     * Params:\n     *     node = the node to use\n     *     indices = the indices of the points belonging to the node\n     */\n    void computeNodeStatistics(KMeansNodePtr node, int* indices, int indices_length)\n    {\n\n        DistanceType radius = 0;\n        DistanceType variance = 0;\n        DistanceType* mean = new DistanceType[veclen_];\n        memoryCounter_ += int(veclen_*sizeof(DistanceType));\n\n        memset(mean,0,veclen_*sizeof(DistanceType));\n\n        for (size_t i=0; i<size_; ++i) {\n            ElementType* vec = dataset_[indices[i]];\n            for (size_t j=0; j<veclen_; ++j) {\n                mean[j] += vec[j];\n            }\n            variance += distance_(vec, ZeroIterator<ElementType>(), veclen_);\n        }\n        for (size_t j=0; j<veclen_; ++j) {\n            mean[j] /= size_;\n        }\n        variance /= size_;\n        variance -= distance_(mean, ZeroIterator<ElementType>(), veclen_);\n\n        DistanceType tmp = 0;\n        for (int i=0; i<indices_length; ++i) {\n            tmp = distance_(mean, dataset_[indices[i]], veclen_);\n            if (tmp>radius) {\n                radius = tmp;\n            }\n        }\n\n        node->variance = variance;\n        node->radius = radius;\n        node->pivot = mean;\n    }\n\n\n    /**\n     * The method responsible with actually doing the recursive hierarchical\n     * clustering\n     *\n     * Params:\n     *     node = the node to cluster\n     *     indices = indices of the points belonging to the current node\n     *     branching = the branching factor to use in the clustering\n     *\n     * TODO: for 1-sized clusters don't store a cluster center (it's the same as the single cluster point)\n     */\n    void computeClustering(KMeansNodePtr node, int* indices, int indices_length, int branching, int level)\n    {\n        node->size = indices_length;\n        node->level = level;\n\n        if (indices_length < branching) {\n            node->indices = indices;\n            std::sort(node->indices,node->indices+indices_length);\n            node->childs = NULL;\n            return;\n        }\n\n        cv::AutoBuffer<int> centers_idx_buf(branching);\n        int* centers_idx = (int*)centers_idx_buf;\n        int centers_length;\n        (this->*chooseCenters)(branching, indices, indices_length, centers_idx, centers_length);\n\n        if (centers_length<branching) {\n            node->indices = indices;\n            std::sort(node->indices,node->indices+indices_length);\n            node->childs = NULL;\n            return;\n        }\n\n\n        cv::AutoBuffer<double> dcenters_buf(branching*veclen_);\n        Matrix<double> dcenters((double*)dcenters_buf,branching,veclen_);\n        for (int i=0; i<centers_length; ++i) {\n            ElementType* vec = dataset_[centers_idx[i]];\n            for (size_t k=0; k<veclen_; ++k) {\n                dcenters[i][k] = double(vec[k]);\n            }\n        }\n\n        std::vector<DistanceType> radiuses(branching);\n        cv::AutoBuffer<int> count_buf(branching);\n        int* count = (int*)count_buf;\n        for (int i=0; i<branching; ++i) {\n            radiuses[i] = 0;\n            count[i] = 0;\n        }\n\n        //\tassign points to clusters\n        cv::AutoBuffer<int> belongs_to_buf(indices_length);\n        int* belongs_to = (int*)belongs_to_buf;\n        for (int i=0; i<indices_length; ++i) {\n\n            DistanceType sq_dist = distance_(dataset_[indices[i]], dcenters[0], veclen_);\n            belongs_to[i] = 0;\n            for (int j=1; j<branching; ++j) {\n                DistanceType new_sq_dist = distance_(dataset_[indices[i]], dcenters[j], veclen_);\n                if (sq_dist>new_sq_dist) {\n                    belongs_to[i] = j;\n                    sq_dist = new_sq_dist;\n                }\n            }\n            if (sq_dist>radiuses[belongs_to[i]]) {\n                radiuses[belongs_to[i]] = sq_dist;\n            }\n            count[belongs_to[i]]++;\n        }\n\n        bool converged = false;\n        int iteration = 0;\n        while (!converged && iteration<iterations_) {\n            converged = true;\n            iteration++;\n\n            // compute the new cluster centers\n            for (int i=0; i<branching; ++i) {\n                memset(dcenters[i],0,sizeof(double)*veclen_);\n                radiuses[i] = 0;\n            }\n            for (int i=0; i<indices_length; ++i) {\n                ElementType* vec = dataset_[indices[i]];\n                double* center = dcenters[belongs_to[i]];\n                for (size_t k=0; k<veclen_; ++k) {\n                    center[k] += vec[k];\n                }\n            }\n            for (int i=0; i<branching; ++i) {\n                int cnt = count[i];\n                for (size_t k=0; k<veclen_; ++k) {\n                    dcenters[i][k] /= cnt;\n                }\n            }\n\n            // reassign points to clusters\n            cv::Mutex mtx;\n            KMeansDistanceComputer invoker(distance_, dataset_, branching, indices, dcenters, veclen_, count, belongs_to, radiuses, converged, mtx);\n            parallel_for_(cv::Range(0, (int)indices_length), invoker);\n\n            for (int i=0; i<branching; ++i) {\n                // if one cluster converges to an empty cluster,\n                // move an element into that cluster\n                if (count[i]==0) {\n                    int j = (i+1)%branching;\n                    while (count[j]<=1) {\n                        j = (j+1)%branching;\n                    }\n\n                    for (int k=0; k<indices_length; ++k) {\n                        if (belongs_to[k]==j) {\n                            // for cluster j, we move the furthest element from the center to the empty cluster i\n                            if ( distance_(dataset_[indices[k]], dcenters[j], veclen_) == radiuses[j] ) {\n                                belongs_to[k] = i;\n                                count[j]--;\n                                count[i]++;\n                                break;\n                            }\n                        }\n                    }\n                    converged = false;\n                }\n            }\n\n        }\n\n        DistanceType** centers = new DistanceType*[branching];\n\n        for (int i=0; i<branching; ++i) {\n            centers[i] = new DistanceType[veclen_];\n            memoryCounter_ += (int)(veclen_*sizeof(DistanceType));\n            for (size_t k=0; k<veclen_; ++k) {\n                centers[i][k] = (DistanceType)dcenters[i][k];\n            }\n        }\n\n\n        // compute kmeans clustering for each of the resulting clusters\n        node->childs = pool_.allocate<KMeansNodePtr>(branching);\n        int start = 0;\n        int end = start;\n        for (int c=0; c<branching; ++c) {\n            int s = count[c];\n\n            DistanceType variance = 0;\n            DistanceType mean_radius =0;\n            for (int i=0; i<indices_length; ++i) {\n                if (belongs_to[i]==c) {\n                    DistanceType d = distance_(dataset_[indices[i]], ZeroIterator<ElementType>(), veclen_);\n                    variance += d;\n                    mean_radius += sqrt(d);\n                    std::swap(indices[i],indices[end]);\n                    std::swap(belongs_to[i],belongs_to[end]);\n                    end++;\n                }\n            }\n            variance /= s;\n            mean_radius /= s;\n            variance -= distance_(centers[c], ZeroIterator<ElementType>(), veclen_);\n\n            node->childs[c] = pool_.allocate<KMeansNode>();\n            node->childs[c]->radius = radiuses[c];\n            node->childs[c]->pivot = centers[c];\n            node->childs[c]->variance = variance;\n            node->childs[c]->mean_radius = mean_radius;\n            node->childs[c]->indices = NULL;\n            computeClustering(node->childs[c],indices+start, end-start, branching, level+1);\n            start=end;\n        }\n    }\n\n\n\n    /**\n     * Performs one descent in the hierarchical k-means tree. The branches not\n     * visited are stored in a priority queue.\n     *\n     * Params:\n     *      node = node to explore\n     *      result = container for the k-nearest neighbors found\n     *      vec = query points\n     *      checks = how many points in the dataset have been checked so far\n     *      maxChecks = maximum dataset points to checks\n     */\n\n\n    void findNN(KMeansNodePtr node, ResultSet<DistanceType>& result, const ElementType* vec, int& checks, int maxChecks,\n                Heap<BranchSt>* heap)\n    {\n        // Ignore those clusters that are too far away\n        {\n            DistanceType bsq = distance_(vec, node->pivot, veclen_);\n            DistanceType rsq = node->radius;\n            DistanceType wsq = result.worstDist();\n\n            DistanceType val = bsq-rsq-wsq;\n            DistanceType val2 = val*val-4*rsq*wsq;\n\n            //if (val>0) {\n            if ((val>0)&&(val2>0)) {\n                return;\n            }\n        }\n\n        if (node->childs==NULL) {\n            if (checks>=maxChecks) {\n                if (result.full()) return;\n            }\n            checks += node->size;\n            for (int i=0; i<node->size; ++i) {\n                int index = node->indices[i];\n                DistanceType dist = distance_(dataset_[index], vec, veclen_);\n                result.addPoint(dist, index);\n            }\n        }\n        else {\n            DistanceType* domain_distances = new DistanceType[branching_];\n            int closest_center = exploreNodeBranches(node, vec, domain_distances, heap);\n            delete[] domain_distances;\n            findNN(node->childs[closest_center],result,vec, checks, maxChecks, heap);\n        }\n    }\n\n    /**\n     * Helper function that computes the nearest childs of a node to a given query point.\n     * Params:\n     *     node = the node\n     *     q = the query point\n     *     distances = array with the distances to each child node.\n     * Returns:\n     */\n    int exploreNodeBranches(KMeansNodePtr node, const ElementType* q, DistanceType* domain_distances, Heap<BranchSt>* heap)\n    {\n\n        int best_index = 0;\n        domain_distances[best_index] = distance_(q, node->childs[best_index]->pivot, veclen_);\n        for (int i=1; i<branching_; ++i) {\n            domain_distances[i] = distance_(q, node->childs[i]->pivot, veclen_);\n            if (domain_distances[i]<domain_distances[best_index]) {\n                best_index = i;\n            }\n        }\n\n        //\t\tfloat* best_center = node->childs[best_index]->pivot;\n        for (int i=0; i<branching_; ++i) {\n            if (i != best_index) {\n                domain_distances[i] -= cb_index_*node->childs[i]->variance;\n\n                //\t\t\t\tfloat dist_to_border = getDistanceToBorder(node.childs[i].pivot,best_center,q);\n                //\t\t\t\tif (domain_distances[i]<dist_to_border) {\n                //\t\t\t\t\tdomain_distances[i] = dist_to_border;\n                //\t\t\t\t}\n                heap->insert(BranchSt(node->childs[i],domain_distances[i]));\n            }\n        }\n\n        return best_index;\n    }\n\n\n    /**\n     * Function the performs exact nearest neighbor search by traversing the entire tree.\n     */\n    void findExactNN(KMeansNodePtr node, ResultSet<DistanceType>& result, const ElementType* vec)\n    {\n        // Ignore those clusters that are too far away\n        {\n            DistanceType bsq = distance_(vec, node->pivot, veclen_);\n            DistanceType rsq = node->radius;\n            DistanceType wsq = result.worstDist();\n\n            DistanceType val = bsq-rsq-wsq;\n            DistanceType val2 = val*val-4*rsq*wsq;\n\n            //                  if (val>0) {\n            if ((val>0)&&(val2>0)) {\n                return;\n            }\n        }\n\n\n        if (node->childs==NULL) {\n            for (int i=0; i<node->size; ++i) {\n                int index = node->indices[i];\n                DistanceType dist = distance_(dataset_[index], vec, veclen_);\n                result.addPoint(dist, index);\n            }\n        }\n        else {\n            int* sort_indices = new int[branching_];\n\n            getCenterOrdering(node, vec, sort_indices);\n\n            for (int i=0; i<branching_; ++i) {\n                findExactNN(node->childs[sort_indices[i]],result,vec);\n            }\n\n            delete[] sort_indices;\n        }\n    }\n\n\n    /**\n     * Helper function.\n     *\n     * I computes the order in which to traverse the child nodes of a particular node.\n     */\n    void getCenterOrdering(KMeansNodePtr node, const ElementType* q, int* sort_indices)\n    {\n        DistanceType* domain_distances = new DistanceType[branching_];\n        for (int i=0; i<branching_; ++i) {\n            DistanceType dist = distance_(q, node->childs[i]->pivot, veclen_);\n\n            int j=0;\n            while (domain_distances[j]<dist && j<i) j++;\n            for (int k=i; k>j; --k) {\n                domain_distances[k] = domain_distances[k-1];\n                sort_indices[k] = sort_indices[k-1];\n            }\n            domain_distances[j] = dist;\n            sort_indices[j] = i;\n        }\n        delete[] domain_distances;\n    }\n\n    /**\n     * Method that computes the squared distance from the query point q\n     * from inside region with center c to the border between this\n     * region and the region with center p\n     */\n    DistanceType getDistanceToBorder(DistanceType* p, DistanceType* c, DistanceType* q)\n    {\n        DistanceType sum = 0;\n        DistanceType sum2 = 0;\n\n        for (int i=0; i<veclen_; ++i) {\n            DistanceType t = c[i]-p[i];\n            sum += t*(q[i]-(c[i]+p[i])/2);\n            sum2 += t*t;\n        }\n\n        return sum*sum/sum2;\n    }\n\n\n    /**\n     * Helper function the descends in the hierarchical k-means tree by spliting those clusters that minimize\n     * the overall variance of the clustering.\n     * Params:\n     *     root = root node\n     *     clusters = array with clusters centers (return value)\n     *     varianceValue = variance of the clustering (return value)\n     * Returns:\n     */\n    int getMinVarianceClusters(KMeansNodePtr root, KMeansNodePtr* clusters, int clusters_length, DistanceType& varianceValue)\n    {\n        int clusterCount = 1;\n        clusters[0] = root;\n\n        DistanceType meanVariance = root->variance*root->size;\n\n        while (clusterCount<clusters_length) {\n            DistanceType minVariance = (std::numeric_limits<DistanceType>::max)();\n            int splitIndex = -1;\n\n            for (int i=0; i<clusterCount; ++i) {\n                if (clusters[i]->childs != NULL) {\n\n                    DistanceType variance = meanVariance - clusters[i]->variance*clusters[i]->size;\n\n                    for (int j=0; j<branching_; ++j) {\n                        variance += clusters[i]->childs[j]->variance*clusters[i]->childs[j]->size;\n                    }\n                    if (variance<minVariance) {\n                        minVariance = variance;\n                        splitIndex = i;\n                    }\n                }\n            }\n\n            if (splitIndex==-1) break;\n            if ( (branching_+clusterCount-1) > clusters_length) break;\n\n            meanVariance = minVariance;\n\n            // split node\n            KMeansNodePtr toSplit = clusters[splitIndex];\n            clusters[splitIndex] = toSplit->childs[0];\n            for (int i=1; i<branching_; ++i) {\n                clusters[clusterCount++] = toSplit->childs[i];\n            }\n        }\n\n        varianceValue = meanVariance/root->size;\n        return clusterCount;\n    }\n\nprivate:\n    /** The branching factor used in the hierarchical k-means clustering */\n    int branching_;\n\n    /** Maximum number of iterations to use when performing k-means clustering */\n    int iterations_;\n\n    /** Algorithm for choosing the cluster centers */\n    flann_centers_init_t centers_init_;\n\n    /**\n     * Cluster border index. This is used in the tree search phase when determining\n     * the closest cluster to explore next. A zero value takes into account only\n     * the cluster centres, a value greater then zero also take into account the size\n     * of the cluster.\n     */\n    float cb_index_;\n\n    /**\n     * The dataset used by this index\n     */\n    const Matrix<ElementType> dataset_;\n\n    /** Index parameters */\n    IndexParams index_params_;\n\n    /**\n     * Number of features in the dataset.\n     */\n    size_t size_;\n\n    /**\n     * Length of each feature.\n     */\n    size_t veclen_;\n\n    /**\n     * The root node in the tree.\n     */\n    KMeansNodePtr root_;\n\n    /**\n     *  Array of indices to vectors in the dataset.\n     */\n    int* indices_;\n\n    /**\n     * The distance\n     */\n    Distance distance_;\n\n    /**\n     * Pooled memory allocator.\n     */\n    PooledAllocator pool_;\n\n    /**\n     * Memory occupied by the index.\n     */\n    int memoryCounter_;\n};\n\n}\n\n#endif //OPENCV_FLANN_KMEANS_INDEX_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/linear_index.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_LINEAR_INDEX_H_\n#define OPENCV_FLANN_LINEAR_INDEX_H_\n\n#include \"general.h\"\n#include \"nn_index.h\"\n\nnamespace cvflann\n{\n\nstruct LinearIndexParams : public IndexParams\n{\n    LinearIndexParams()\n    {\n        (* this)[\"algorithm\"] = FLANN_INDEX_LINEAR;\n    }\n};\n\ntemplate <typename Distance>\nclass LinearIndex : public NNIndex<Distance>\n{\npublic:\n\n    typedef typename Distance::ElementType ElementType;\n    typedef typename Distance::ResultType DistanceType;\n\n\n    LinearIndex(const Matrix<ElementType>& inputData, const IndexParams& params = LinearIndexParams(),\n                Distance d = Distance()) :\n        dataset_(inputData), index_params_(params), distance_(d)\n    {\n    }\n\n    LinearIndex(const LinearIndex&);\n    LinearIndex& operator=(const LinearIndex&);\n\n    flann_algorithm_t getType() const\n    {\n        return FLANN_INDEX_LINEAR;\n    }\n\n\n    size_t size() const\n    {\n        return dataset_.rows;\n    }\n\n    size_t veclen() const\n    {\n        return dataset_.cols;\n    }\n\n\n    int usedMemory() const\n    {\n        return 0;\n    }\n\n    void buildIndex()\n    {\n        /* nothing to do here for linear search */\n    }\n\n    void saveIndex(FILE*)\n    {\n        /* nothing to do here for linear search */\n    }\n\n\n    void loadIndex(FILE*)\n    {\n        /* nothing to do here for linear search */\n\n        index_params_[\"algorithm\"] = getType();\n    }\n\n    void findNeighbors(ResultSet<DistanceType>& resultSet, const ElementType* vec, const SearchParams& /*searchParams*/)\n    {\n        ElementType* data = dataset_.data;\n        for (size_t i = 0; i < dataset_.rows; ++i, data += dataset_.cols) {\n            DistanceType dist = distance_(data, vec, dataset_.cols);\n            resultSet.addPoint(dist, (int)i);\n        }\n    }\n\n    IndexParams getParameters() const\n    {\n        return index_params_;\n    }\n\nprivate:\n    /** The dataset */\n    const Matrix<ElementType> dataset_;\n    /** Index parameters */\n    IndexParams index_params_;\n    /** Index distance */\n    Distance distance_;\n\n};\n\n}\n\n#endif // OPENCV_FLANN_LINEAR_INDEX_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/logger.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_LOGGER_H\n#define OPENCV_FLANN_LOGGER_H\n\n#include <stdio.h>\n#include <stdarg.h>\n\n#include \"defines.h\"\n\n\nnamespace cvflann\n{\n\nclass Logger\n{\n    Logger() : stream(stdout), logLevel(FLANN_LOG_WARN) {}\n\n    ~Logger()\n    {\n        if ((stream!=NULL)&&(stream!=stdout)) {\n            fclose(stream);\n        }\n    }\n\n    static Logger& instance()\n    {\n        static Logger logger;\n        return logger;\n    }\n\n    void _setDestination(const char* name)\n    {\n        if (name==NULL) {\n            stream = stdout;\n        }\n        else {\n            stream = fopen(name,\"w\");\n            if (stream == NULL) {\n                stream = stdout;\n            }\n        }\n    }\n\n    int _log(int level, const char* fmt, va_list arglist)\n    {\n        if (level > logLevel ) return -1;\n        int ret = vfprintf(stream, fmt, arglist);\n        return ret;\n    }\n\npublic:\n    /**\n     * Sets the logging level. All messages with lower priority will be ignored.\n     * @param level Logging level\n     */\n    static void setLevel(int level) { instance().logLevel = level; }\n\n    /**\n     * Sets the logging destination\n     * @param name Filename or NULL for console\n     */\n    static void setDestination(const char* name) { instance()._setDestination(name); }\n\n    /**\n     * Print log message\n     * @param level Log level\n     * @param fmt Message format\n     * @return\n     */\n    static int log(int level, const char* fmt, ...)\n    {\n        va_list arglist;\n        va_start(arglist, fmt);\n        int ret = instance()._log(level,fmt,arglist);\n        va_end(arglist);\n        return ret;\n    }\n\n#define LOG_METHOD(NAME,LEVEL) \\\n    static int NAME(const char* fmt, ...) \\\n    { \\\n        va_list ap; \\\n        va_start(ap, fmt); \\\n        int ret = instance()._log(LEVEL, fmt, ap); \\\n        va_end(ap); \\\n        return ret; \\\n    }\n\n    LOG_METHOD(fatal, FLANN_LOG_FATAL)\n    LOG_METHOD(error, FLANN_LOG_ERROR)\n    LOG_METHOD(warn, FLANN_LOG_WARN)\n    LOG_METHOD(info, FLANN_LOG_INFO)\n\nprivate:\n    FILE* stream;\n    int logLevel;\n};\n\n}\n\n#endif //OPENCV_FLANN_LOGGER_H\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/lsh_index.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n/***********************************************************************\n * Author: Vincent Rabaud\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_LSH_INDEX_H_\n#define OPENCV_FLANN_LSH_INDEX_H_\n\n#include <algorithm>\n#include <cassert>\n#include <cstring>\n#include <map>\n#include <vector>\n\n#include \"general.h\"\n#include \"nn_index.h\"\n#include \"matrix.h\"\n#include \"result_set.h\"\n#include \"heap.h\"\n#include \"lsh_table.h\"\n#include \"allocator.h\"\n#include \"random.h\"\n#include \"saving.h\"\n\nnamespace cvflann\n{\n\nstruct LshIndexParams : public IndexParams\n{\n    LshIndexParams(unsigned int table_number = 12, unsigned int key_size = 20, unsigned int multi_probe_level = 2)\n    {\n        (* this)[\"algorithm\"] = FLANN_INDEX_LSH;\n        // The number of hash tables to use\n        (*this)[\"table_number\"] = table_number;\n        // The length of the key in the hash tables\n        (*this)[\"key_size\"] = key_size;\n        // Number of levels to use in multi-probe (0 for standard LSH)\n        (*this)[\"multi_probe_level\"] = multi_probe_level;\n    }\n};\n\n/**\n * Randomized kd-tree index\n *\n * Contains the k-d trees and other information for indexing a set of points\n * for nearest-neighbor matching.\n */\ntemplate<typename Distance>\nclass LshIndex : public NNIndex<Distance>\n{\npublic:\n    typedef typename Distance::ElementType ElementType;\n    typedef typename Distance::ResultType DistanceType;\n\n    /** Constructor\n     * @param input_data dataset with the input features\n     * @param params parameters passed to the LSH algorithm\n     * @param d the distance used\n     */\n    LshIndex(const Matrix<ElementType>& input_data, const IndexParams& params = LshIndexParams(),\n             Distance d = Distance()) :\n        dataset_(input_data), index_params_(params), distance_(d)\n    {\n        // cv::flann::IndexParams sets integer params as 'int', so it is used with get_param\n        // in place of 'unsigned int'\n        table_number_ = (unsigned int)get_param<int>(index_params_,\"table_number\",12);\n        key_size_ = (unsigned int)get_param<int>(index_params_,\"key_size\",20);\n        multi_probe_level_ = (unsigned int)get_param<int>(index_params_,\"multi_probe_level\",2);\n\n        feature_size_ = (unsigned)dataset_.cols;\n        fill_xor_mask(0, key_size_, multi_probe_level_, xor_masks_);\n    }\n\n\n    LshIndex(const LshIndex&);\n    LshIndex& operator=(const LshIndex&);\n\n    /**\n     * Builds the index\n     */\n    void buildIndex()\n    {\n        tables_.resize(table_number_);\n        for (unsigned int i = 0; i < table_number_; ++i) {\n            lsh::LshTable<ElementType>& table = tables_[i];\n            table = lsh::LshTable<ElementType>(feature_size_, key_size_);\n\n            // Add the features to the table\n            table.add(dataset_);\n        }\n    }\n\n    flann_algorithm_t getType() const\n    {\n        return FLANN_INDEX_LSH;\n    }\n\n\n    void saveIndex(FILE* stream)\n    {\n        save_value(stream,table_number_);\n        save_value(stream,key_size_);\n        save_value(stream,multi_probe_level_);\n        save_value(stream, dataset_);\n    }\n\n    void loadIndex(FILE* stream)\n    {\n        load_value(stream, table_number_);\n        load_value(stream, key_size_);\n        load_value(stream, multi_probe_level_);\n        load_value(stream, dataset_);\n        // Building the index is so fast we can afford not storing it\n        buildIndex();\n\n        index_params_[\"algorithm\"] = getType();\n        index_params_[\"table_number\"] = table_number_;\n        index_params_[\"key_size\"] = key_size_;\n        index_params_[\"multi_probe_level\"] = multi_probe_level_;\n    }\n\n    /**\n     *  Returns size of index.\n     */\n    size_t size() const\n    {\n        return dataset_.rows;\n    }\n\n    /**\n     * Returns the length of an index feature.\n     */\n    size_t veclen() const\n    {\n        return feature_size_;\n    }\n\n    /**\n     * Computes the index memory usage\n     * Returns: memory used by the index\n     */\n    int usedMemory() const\n    {\n        return (int)(dataset_.rows * sizeof(int));\n    }\n\n\n    IndexParams getParameters() const\n    {\n        return index_params_;\n    }\n\n    /**\n     * \\brief Perform k-nearest neighbor search\n     * \\param[in] queries The query points for which to find the nearest neighbors\n     * \\param[out] indices The indices of the nearest neighbors found\n     * \\param[out] dists Distances to the nearest neighbors found\n     * \\param[in] knn Number of nearest neighbors to return\n     * \\param[in] params Search parameters\n     */\n    virtual void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params)\n    {\n        assert(queries.cols == veclen());\n        assert(indices.rows >= queries.rows);\n        assert(dists.rows >= queries.rows);\n        assert(int(indices.cols) >= knn);\n        assert(int(dists.cols) >= knn);\n\n\n        KNNUniqueResultSet<DistanceType> resultSet(knn);\n        for (size_t i = 0; i < queries.rows; i++) {\n            resultSet.clear();\n            std::fill_n(indices[i], knn, -1);\n            std::fill_n(dists[i], knn, std::numeric_limits<DistanceType>::max());\n            findNeighbors(resultSet, queries[i], params);\n            if (get_param(params,\"sorted\",true)) resultSet.sortAndCopy(indices[i], dists[i], knn);\n            else resultSet.copy(indices[i], dists[i], knn);\n        }\n    }\n\n\n    /**\n     * Find set of nearest neighbors to vec. Their indices are stored inside\n     * the result object.\n     *\n     * Params:\n     *     result = the result object in which the indices of the nearest-neighbors are stored\n     *     vec = the vector for which to search the nearest neighbors\n     *     maxCheck = the maximum number of restarts (in a best-bin-first manner)\n     */\n    void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& /*searchParams*/)\n    {\n        getNeighbors(vec, result);\n    }\n\nprivate:\n    /** Defines the comparator on score and index\n     */\n    typedef std::pair<float, unsigned int> ScoreIndexPair;\n    struct SortScoreIndexPairOnSecond\n    {\n        bool operator()(const ScoreIndexPair& left, const ScoreIndexPair& right) const\n        {\n            return left.second < right.second;\n        }\n    };\n\n    /** Fills the different xor masks to use when getting the neighbors in multi-probe LSH\n     * @param key the key we build neighbors from\n     * @param lowest_index the lowest index of the bit set\n     * @param level the multi-probe level we are at\n     * @param xor_masks all the xor mask\n     */\n    void fill_xor_mask(lsh::BucketKey key, int lowest_index, unsigned int level,\n                       std::vector<lsh::BucketKey>& xor_masks)\n    {\n        xor_masks.push_back(key);\n        if (level == 0) return;\n        for (int index = lowest_index - 1; index >= 0; --index) {\n            // Create a new key\n            lsh::BucketKey new_key = key | (1 << index);\n            fill_xor_mask(new_key, index, level - 1, xor_masks);\n        }\n    }\n\n    /** Performs the approximate nearest-neighbor search.\n     * @param vec the feature to analyze\n     * @param do_radius flag indicating if we check the radius too\n     * @param radius the radius if it is a radius search\n     * @param do_k flag indicating if we limit the number of nn\n     * @param k_nn the number of nearest neighbors\n     * @param checked_average used for debugging\n     */\n    void getNeighbors(const ElementType* vec, bool /*do_radius*/, float radius, bool do_k, unsigned int k_nn,\n                      float& /*checked_average*/)\n    {\n        static std::vector<ScoreIndexPair> score_index_heap;\n\n        if (do_k) {\n            unsigned int worst_score = std::numeric_limits<unsigned int>::max();\n            typename std::vector<lsh::LshTable<ElementType> >::const_iterator table = tables_.begin();\n            typename std::vector<lsh::LshTable<ElementType> >::const_iterator table_end = tables_.end();\n            for (; table != table_end; ++table) {\n                size_t key = table->getKey(vec);\n                std::vector<lsh::BucketKey>::const_iterator xor_mask = xor_masks_.begin();\n                std::vector<lsh::BucketKey>::const_iterator xor_mask_end = xor_masks_.end();\n                for (; xor_mask != xor_mask_end; ++xor_mask) {\n                    size_t sub_key = key ^ (*xor_mask);\n                    const lsh::Bucket* bucket = table->getBucketFromKey(sub_key);\n                    if (bucket == 0) continue;\n\n                    // Go over each descriptor index\n                    std::vector<lsh::FeatureIndex>::const_iterator training_index = bucket->begin();\n                    std::vector<lsh::FeatureIndex>::const_iterator last_training_index = bucket->end();\n                    DistanceType hamming_distance;\n\n                    // Process the rest of the candidates\n                    for (; training_index < last_training_index; ++training_index) {\n                        hamming_distance = distance_(vec, dataset_[*training_index], dataset_.cols);\n\n                        if (hamming_distance < worst_score) {\n                            // Insert the new element\n                            score_index_heap.push_back(ScoreIndexPair(hamming_distance, training_index));\n                            std::push_heap(score_index_heap.begin(), score_index_heap.end());\n\n                            if (score_index_heap.size() > (unsigned int)k_nn) {\n                                // Remove the highest distance value as we have too many elements\n                                std::pop_heap(score_index_heap.begin(), score_index_heap.end());\n                                score_index_heap.pop_back();\n                                // Keep track of the worst score\n                                worst_score = score_index_heap.front().first;\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        else {\n            typename std::vector<lsh::LshTable<ElementType> >::const_iterator table = tables_.begin();\n            typename std::vector<lsh::LshTable<ElementType> >::const_iterator table_end = tables_.end();\n            for (; table != table_end; ++table) {\n                size_t key = table->getKey(vec);\n                std::vector<lsh::BucketKey>::const_iterator xor_mask = xor_masks_.begin();\n                std::vector<lsh::BucketKey>::const_iterator xor_mask_end = xor_masks_.end();\n                for (; xor_mask != xor_mask_end; ++xor_mask) {\n                    size_t sub_key = key ^ (*xor_mask);\n                    const lsh::Bucket* bucket = table->getBucketFromKey(sub_key);\n                    if (bucket == 0) continue;\n\n                    // Go over each descriptor index\n                    std::vector<lsh::FeatureIndex>::const_iterator training_index = bucket->begin();\n                    std::vector<lsh::FeatureIndex>::const_iterator last_training_index = bucket->end();\n                    DistanceType hamming_distance;\n\n                    // Process the rest of the candidates\n                    for (; training_index < last_training_index; ++training_index) {\n                        // Compute the Hamming distance\n                        hamming_distance = distance_(vec, dataset_[*training_index], dataset_.cols);\n                        if (hamming_distance < radius) score_index_heap.push_back(ScoreIndexPair(hamming_distance, training_index));\n                    }\n                }\n            }\n        }\n    }\n\n    /** Performs the approximate nearest-neighbor search.\n     * This is a slower version than the above as it uses the ResultSet\n     * @param vec the feature to analyze\n     */\n    void getNeighbors(const ElementType* vec, ResultSet<DistanceType>& result)\n    {\n        typename std::vector<lsh::LshTable<ElementType> >::const_iterator table = tables_.begin();\n        typename std::vector<lsh::LshTable<ElementType> >::const_iterator table_end = tables_.end();\n        for (; table != table_end; ++table) {\n            size_t key = table->getKey(vec);\n            std::vector<lsh::BucketKey>::const_iterator xor_mask = xor_masks_.begin();\n            std::vector<lsh::BucketKey>::const_iterator xor_mask_end = xor_masks_.end();\n            for (; xor_mask != xor_mask_end; ++xor_mask) {\n                size_t sub_key = key ^ (*xor_mask);\n                const lsh::Bucket* bucket = table->getBucketFromKey((lsh::BucketKey)sub_key);\n                if (bucket == 0) continue;\n\n                // Go over each descriptor index\n                std::vector<lsh::FeatureIndex>::const_iterator training_index = bucket->begin();\n                std::vector<lsh::FeatureIndex>::const_iterator last_training_index = bucket->end();\n                DistanceType hamming_distance;\n\n                // Process the rest of the candidates\n                for (; training_index < last_training_index; ++training_index) {\n                    // Compute the Hamming distance\n                    hamming_distance = distance_(vec, dataset_[*training_index], (int)dataset_.cols);\n                    result.addPoint(hamming_distance, *training_index);\n                }\n            }\n        }\n    }\n\n    /** The different hash tables */\n    std::vector<lsh::LshTable<ElementType> > tables_;\n\n    /** The data the LSH tables where built from */\n    Matrix<ElementType> dataset_;\n\n    /** The size of the features (as ElementType[]) */\n    unsigned int feature_size_;\n\n    IndexParams index_params_;\n\n    /** table number */\n    unsigned int table_number_;\n    /** key size */\n    unsigned int key_size_;\n    /** How far should we look for neighbors in multi-probe LSH */\n    unsigned int multi_probe_level_;\n\n    /** The XOR masks to apply to a key to get the neighboring buckets */\n    std::vector<lsh::BucketKey> xor_masks_;\n\n    Distance distance_;\n};\n}\n\n#endif //OPENCV_FLANN_LSH_INDEX_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/lsh_table.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n/***********************************************************************\n * Author: Vincent Rabaud\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_LSH_TABLE_H_\n#define OPENCV_FLANN_LSH_TABLE_H_\n\n#include <algorithm>\n#include <iostream>\n#include <iomanip>\n#include <limits.h>\n// TODO as soon as we use C++0x, use the code in USE_UNORDERED_MAP\n#ifdef __GXX_EXPERIMENTAL_CXX0X__\n#  define USE_UNORDERED_MAP 1\n#else\n#  define USE_UNORDERED_MAP 0\n#endif\n#if USE_UNORDERED_MAP\n#include <unordered_map>\n#else\n#include <map>\n#endif\n#include <math.h>\n#include <stddef.h>\n\n#include \"dynamic_bitset.h\"\n#include \"matrix.h\"\n\nnamespace cvflann\n{\n\nnamespace lsh\n{\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n/** What is stored in an LSH bucket\n */\ntypedef uint32_t FeatureIndex;\n/** The id from which we can get a bucket back in an LSH table\n */\ntypedef unsigned int BucketKey;\n\n/** A bucket in an LSH table\n */\ntypedef std::vector<FeatureIndex> Bucket;\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n/** POD for stats about an LSH table\n */\nstruct LshStats\n{\n    std::vector<unsigned int> bucket_sizes_;\n    size_t n_buckets_;\n    size_t bucket_size_mean_;\n    size_t bucket_size_median_;\n    size_t bucket_size_min_;\n    size_t bucket_size_max_;\n    size_t bucket_size_std_dev;\n    /** Each contained vector contains three value: beginning/end for interval, number of elements in the bin\n     */\n    std::vector<std::vector<unsigned int> > size_histogram_;\n};\n\n/** Overload the << operator for LshStats\n * @param out the streams\n * @param stats the stats to display\n * @return the streams\n */\ninline std::ostream& operator <<(std::ostream& out, const LshStats& stats)\n{\n    int w = 20;\n    out << \"Lsh Table Stats:\\n\" << std::setw(w) << std::setiosflags(std::ios::right) << \"N buckets : \"\n    << stats.n_buckets_ << \"\\n\" << std::setw(w) << std::setiosflags(std::ios::right) << \"mean size : \"\n    << std::setiosflags(std::ios::left) << stats.bucket_size_mean_ << \"\\n\" << std::setw(w)\n    << std::setiosflags(std::ios::right) << \"median size : \" << stats.bucket_size_median_ << \"\\n\" << std::setw(w)\n    << std::setiosflags(std::ios::right) << \"min size : \" << std::setiosflags(std::ios::left)\n    << stats.bucket_size_min_ << \"\\n\" << std::setw(w) << std::setiosflags(std::ios::right) << \"max size : \"\n    << std::setiosflags(std::ios::left) << stats.bucket_size_max_;\n\n    // Display the histogram\n    out << std::endl << std::setw(w) << std::setiosflags(std::ios::right) << \"histogram : \"\n    << std::setiosflags(std::ios::left);\n    for (std::vector<std::vector<unsigned int> >::const_iterator iterator = stats.size_histogram_.begin(), end =\n             stats.size_histogram_.end(); iterator != end; ++iterator) out << (*iterator)[0] << \"-\" << (*iterator)[1] << \": \" << (*iterator)[2] << \",  \";\n\n    return out;\n}\n\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n/** Lsh hash table. As its key is a sub-feature, and as usually\n * the size of it is pretty small, we keep it as a continuous memory array.\n * The value is an index in the corpus of features (we keep it as an unsigned\n * int for pure memory reasons, it could be a size_t)\n */\ntemplate<typename ElementType>\nclass LshTable\n{\npublic:\n    /** A container of all the feature indices. Optimized for space\n     */\n#if USE_UNORDERED_MAP\n    typedef std::unordered_map<BucketKey, Bucket> BucketsSpace;\n#else\n    typedef std::map<BucketKey, Bucket> BucketsSpace;\n#endif\n\n    /** A container of all the feature indices. Optimized for speed\n     */\n    typedef std::vector<Bucket> BucketsSpeed;\n\n    /** Default constructor\n     */\n    LshTable()\n    {\n    }\n\n    /** Default constructor\n     * Create the mask and allocate the memory\n     * @param feature_size is the size of the feature (considered as a ElementType[])\n     * @param key_size is the number of bits that are turned on in the feature\n     */\n    LshTable(unsigned int feature_size, unsigned int key_size)\n    {\n        (void)feature_size;\n        (void)key_size;\n        std::cerr << \"LSH is not implemented for that type\" << std::endl;\n        assert(0);\n    }\n\n    /** Add a feature to the table\n     * @param value the value to store for that feature\n     * @param feature the feature itself\n     */\n    void add(unsigned int value, const ElementType* feature)\n    {\n        // Add the value to the corresponding bucket\n        BucketKey key = (lsh::BucketKey)getKey(feature);\n\n        switch (speed_level_) {\n        case kArray:\n            // That means we get the buckets from an array\n            buckets_speed_[key].push_back(value);\n            break;\n        case kBitsetHash:\n            // That means we can check the bitset for the presence of a key\n            key_bitset_.set(key);\n            buckets_space_[key].push_back(value);\n            break;\n        case kHash:\n        {\n            // That means we have to check for the hash table for the presence of a key\n            buckets_space_[key].push_back(value);\n            break;\n        }\n        }\n    }\n\n    /** Add a set of features to the table\n     * @param dataset the values to store\n     */\n    void add(Matrix<ElementType> dataset)\n    {\n#if USE_UNORDERED_MAP\n        buckets_space_.rehash((buckets_space_.size() + dataset.rows) * 1.2);\n#endif\n        // Add the features to the table\n        for (unsigned int i = 0; i < dataset.rows; ++i) add(i, dataset[i]);\n        // Now that the table is full, optimize it for speed/space\n        optimize();\n    }\n\n    /** Get a bucket given the key\n     * @param key\n     * @return\n     */\n    inline const Bucket* getBucketFromKey(BucketKey key) const\n    {\n        // Generate other buckets\n        switch (speed_level_) {\n        case kArray:\n            // That means we get the buckets from an array\n            return &buckets_speed_[key];\n            break;\n        case kBitsetHash:\n            // That means we can check the bitset for the presence of a key\n            if (key_bitset_.test(key)) return &buckets_space_.find(key)->second;\n            else return 0;\n            break;\n        case kHash:\n        {\n            // That means we have to check for the hash table for the presence of a key\n            BucketsSpace::const_iterator bucket_it, bucket_end = buckets_space_.end();\n            bucket_it = buckets_space_.find(key);\n            // Stop here if that bucket does not exist\n            if (bucket_it == bucket_end) return 0;\n            else return &bucket_it->second;\n            break;\n        }\n        }\n        return 0;\n    }\n\n    /** Compute the sub-signature of a feature\n     */\n    size_t getKey(const ElementType* /*feature*/) const\n    {\n        std::cerr << \"LSH is not implemented for that type\" << std::endl;\n        assert(0);\n        return 1;\n    }\n\n    /** Get statistics about the table\n     * @return\n     */\n    LshStats getStats() const;\n\nprivate:\n    /** defines the speed fo the implementation\n     * kArray uses a vector for storing data\n     * kBitsetHash uses a hash map but checks for the validity of a key with a bitset\n     * kHash uses a hash map only\n     */\n    enum SpeedLevel\n    {\n        kArray, kBitsetHash, kHash\n    };\n\n    /** Initialize some variables\n     */\n    void initialize(size_t key_size)\n    {\n        const size_t key_size_lower_bound = 1;\n        //a value (size_t(1) << key_size) must fit the size_t type so key_size has to be strictly less than size of size_t\n        const size_t key_size_upper_bound = std::min(sizeof(BucketKey) * CHAR_BIT + 1, sizeof(size_t) * CHAR_BIT);\n        if (key_size < key_size_lower_bound || key_size >= key_size_upper_bound)\n        {\n            CV_Error(cv::Error::StsBadArg, cv::format(\"Invalid key_size (=%d). Valid values for your system are %d <= key_size < %d.\", (int)key_size, (int)key_size_lower_bound, (int)key_size_upper_bound));\n        }\n\n        speed_level_ = kHash;\n        key_size_ = (unsigned)key_size;\n    }\n\n    /** Optimize the table for speed/space\n     */\n    void optimize()\n    {\n        // If we are already using the fast storage, no need to do anything\n        if (speed_level_ == kArray) return;\n\n        // Use an array if it will be more than half full\n        if (buckets_space_.size() > ((size_t(1) << key_size_) / 2)) {\n            speed_level_ = kArray;\n            // Fill the array version of it\n            buckets_speed_.resize(size_t(1) << key_size_);\n            for (BucketsSpace::const_iterator key_bucket = buckets_space_.begin(); key_bucket != buckets_space_.end(); ++key_bucket) buckets_speed_[key_bucket->first] = key_bucket->second;\n\n            // Empty the hash table\n            buckets_space_.clear();\n            return;\n        }\n\n        // If the bitset is going to use less than 10% of the RAM of the hash map (at least 1 size_t for the key and two\n        // for the vector) or less than 512MB (key_size_ <= 30)\n        if (((std::max(buckets_space_.size(), buckets_speed_.size()) * CHAR_BIT * 3 * sizeof(BucketKey)) / 10\n             >= (size_t(1) << key_size_)) || (key_size_ <= 32)) {\n            speed_level_ = kBitsetHash;\n            key_bitset_.resize(size_t(1) << key_size_);\n            key_bitset_.reset();\n            // Try with the BucketsSpace\n            for (BucketsSpace::const_iterator key_bucket = buckets_space_.begin(); key_bucket != buckets_space_.end(); ++key_bucket) key_bitset_.set(key_bucket->first);\n        }\n        else {\n            speed_level_ = kHash;\n            key_bitset_.clear();\n        }\n    }\n\n    /** The vector of all the buckets if they are held for speed\n     */\n    BucketsSpeed buckets_speed_;\n\n    /** The hash table of all the buckets in case we cannot use the speed version\n     */\n    BucketsSpace buckets_space_;\n\n    /** What is used to store the data */\n    SpeedLevel speed_level_;\n\n    /** If the subkey is small enough, it will keep track of which subkeys are set through that bitset\n     * That is just a speedup so that we don't look in the hash table (which can be mush slower that checking a bitset)\n     */\n    DynamicBitset key_bitset_;\n\n    /** The size of the sub-signature in bits\n     */\n    unsigned int key_size_;\n\n    // Members only used for the unsigned char specialization\n    /** The mask to apply to a feature to get the hash key\n     * Only used in the unsigned char case\n     */\n    std::vector<size_t> mask_;\n};\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Specialization for unsigned char\n\ntemplate<>\ninline LshTable<unsigned char>::LshTable(unsigned int feature_size, unsigned int subsignature_size)\n{\n    initialize(subsignature_size);\n    // Allocate the mask\n    mask_ = std::vector<size_t>((size_t)ceil((float)(feature_size * sizeof(char)) / (float)sizeof(size_t)), 0);\n\n    // A bit brutal but fast to code\n    std::vector<size_t> indices(feature_size * CHAR_BIT);\n    for (size_t i = 0; i < feature_size * CHAR_BIT; ++i) indices[i] = i;\n    std::random_shuffle(indices.begin(), indices.end());\n\n    // Generate a random set of order of subsignature_size_ bits\n    for (unsigned int i = 0; i < key_size_; ++i) {\n        size_t index = indices[i];\n\n        // Set that bit in the mask\n        size_t divisor = CHAR_BIT * sizeof(size_t);\n        size_t idx = index / divisor; //pick the right size_t index\n        mask_[idx] |= size_t(1) << (index % divisor); //use modulo to find the bit offset\n    }\n\n    // Set to 1 if you want to display the mask for debug\n#if 0\n    {\n        size_t bcount = 0;\n        BOOST_FOREACH(size_t mask_block, mask_){\n            out << std::setw(sizeof(size_t) * CHAR_BIT / 4) << std::setfill('0') << std::hex << mask_block\n                << std::endl;\n            bcount += __builtin_popcountll(mask_block);\n        }\n        out << \"bit count : \" << std::dec << bcount << std::endl;\n        out << \"mask size : \" << mask_.size() << std::endl;\n        return out;\n    }\n#endif\n}\n\n/** Return the Subsignature of a feature\n * @param feature the feature to analyze\n */\ntemplate<>\ninline size_t LshTable<unsigned char>::getKey(const unsigned char* feature) const\n{\n    // no need to check if T is dividable by sizeof(size_t) like in the Hamming\n    // distance computation as we have a mask\n    const size_t* feature_block_ptr = reinterpret_cast<const size_t*> ((const void*)feature);\n\n    // Figure out the subsignature of the feature\n    // Given the feature ABCDEF, and the mask 001011, the output will be\n    // 000CEF\n    size_t subsignature = 0;\n    size_t bit_index = 1;\n\n    for (std::vector<size_t>::const_iterator pmask_block = mask_.begin(); pmask_block != mask_.end(); ++pmask_block) {\n        // get the mask and signature blocks\n        size_t feature_block = *feature_block_ptr;\n        size_t mask_block = *pmask_block;\n        while (mask_block) {\n            // Get the lowest set bit in the mask block\n            size_t lowest_bit = mask_block & (-(ptrdiff_t)mask_block);\n            // Add it to the current subsignature if necessary\n            subsignature += (feature_block & lowest_bit) ? bit_index : 0;\n            // Reset the bit in the mask block\n            mask_block ^= lowest_bit;\n            // increment the bit index for the subsignature\n            bit_index <<= 1;\n        }\n        // Check the next feature block\n        ++feature_block_ptr;\n    }\n    return subsignature;\n}\n\ntemplate<>\ninline LshStats LshTable<unsigned char>::getStats() const\n{\n    LshStats stats;\n    stats.bucket_size_mean_ = 0;\n    if ((buckets_speed_.empty()) && (buckets_space_.empty())) {\n        stats.n_buckets_ = 0;\n        stats.bucket_size_median_ = 0;\n        stats.bucket_size_min_ = 0;\n        stats.bucket_size_max_ = 0;\n        return stats;\n    }\n\n    if (!buckets_speed_.empty()) {\n        for (BucketsSpeed::const_iterator pbucket = buckets_speed_.begin(); pbucket != buckets_speed_.end(); ++pbucket) {\n            stats.bucket_sizes_.push_back((lsh::FeatureIndex)pbucket->size());\n            stats.bucket_size_mean_ += pbucket->size();\n        }\n        stats.bucket_size_mean_ /= buckets_speed_.size();\n        stats.n_buckets_ = buckets_speed_.size();\n    }\n    else {\n        for (BucketsSpace::const_iterator x = buckets_space_.begin(); x != buckets_space_.end(); ++x) {\n            stats.bucket_sizes_.push_back((lsh::FeatureIndex)x->second.size());\n            stats.bucket_size_mean_ += x->second.size();\n        }\n        stats.bucket_size_mean_ /= buckets_space_.size();\n        stats.n_buckets_ = buckets_space_.size();\n    }\n\n    std::sort(stats.bucket_sizes_.begin(), stats.bucket_sizes_.end());\n\n    //  BOOST_FOREACH(int size, stats.bucket_sizes_)\n    //          std::cout << size << \" \";\n    //  std::cout << std::endl;\n    stats.bucket_size_median_ = stats.bucket_sizes_[stats.bucket_sizes_.size() / 2];\n    stats.bucket_size_min_ = stats.bucket_sizes_.front();\n    stats.bucket_size_max_ = stats.bucket_sizes_.back();\n\n    // TODO compute mean and std\n    /*float mean, stddev;\n       stats.bucket_size_mean_ = mean;\n       stats.bucket_size_std_dev = stddev;*/\n\n    // Include a histogram of the buckets\n    unsigned int bin_start = 0;\n    unsigned int bin_end = 20;\n    bool is_new_bin = true;\n    for (std::vector<unsigned int>::iterator iterator = stats.bucket_sizes_.begin(), end = stats.bucket_sizes_.end(); iterator\n         != end; )\n        if (*iterator < bin_end) {\n            if (is_new_bin) {\n                stats.size_histogram_.push_back(std::vector<unsigned int>(3, 0));\n                stats.size_histogram_.back()[0] = bin_start;\n                stats.size_histogram_.back()[1] = bin_end - 1;\n                is_new_bin = false;\n            }\n            ++stats.size_histogram_.back()[2];\n            ++iterator;\n        }\n        else {\n            bin_start += 20;\n            bin_end += 20;\n            is_new_bin = true;\n        }\n\n    return stats;\n}\n\n// End the two namespaces\n}\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n#endif /* OPENCV_FLANN_LSH_TABLE_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/matrix.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_DATASET_H_\n#define OPENCV_FLANN_DATASET_H_\n\n#include <stdio.h>\n\n#include \"general.h\"\n\nnamespace cvflann\n{\n\n/**\n * Class that implements a simple rectangular matrix stored in a memory buffer and\n * provides convenient matrix-like access using the [] operators.\n */\ntemplate <typename T>\nclass Matrix\n{\npublic:\n    typedef T type;\n\n    size_t rows;\n    size_t cols;\n    size_t stride;\n    T* data;\n\n    Matrix() : rows(0), cols(0), stride(0), data(NULL)\n    {\n    }\n\n    Matrix(T* data_, size_t rows_, size_t cols_, size_t stride_ = 0) :\n        rows(rows_), cols(cols_),  stride(stride_), data(data_)\n    {\n        if (stride==0) stride = cols;\n    }\n\n    /**\n     * Convenience function for deallocating the storage data.\n     */\n    FLANN_DEPRECATED void free()\n    {\n        fprintf(stderr, \"The cvflann::Matrix<T>::free() method is deprecated \"\n                \"and it does not do any memory deallocation any more.  You are\"\n                \"responsible for deallocating the matrix memory (by doing\"\n                \"'delete[] matrix.data' for example)\");\n    }\n\n    /**\n     * Operator that return a (pointer to a) row of the data.\n     */\n    T* operator[](size_t index) const\n    {\n        return data+index*stride;\n    }\n};\n\n\nclass UntypedMatrix\n{\npublic:\n    size_t rows;\n    size_t cols;\n    void* data;\n    flann_datatype_t type;\n\n    UntypedMatrix(void* data_, long rows_, long cols_) :\n        rows(rows_), cols(cols_), data(data_)\n    {\n    }\n\n    ~UntypedMatrix()\n    {\n    }\n\n\n    template<typename T>\n    Matrix<T> as()\n    {\n        return Matrix<T>((T*)data, rows, cols);\n    }\n};\n\n\n\n}\n\n#endif //OPENCV_FLANN_DATASET_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/miniflann.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef _OPENCV_MINIFLANN_HPP_\n#define _OPENCV_MINIFLANN_HPP_\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/flann/defines.h\"\n\nnamespace cv\n{\n\nnamespace flann\n{\n\nstruct CV_EXPORTS IndexParams\n{\n    IndexParams();\n    ~IndexParams();\n\n    String getString(const String& key, const String& defaultVal=String()) const;\n    int getInt(const String& key, int defaultVal=-1) const;\n    double getDouble(const String& key, double defaultVal=-1) const;\n\n    void setString(const String& key, const String& value);\n    void setInt(const String& key, int value);\n    void setDouble(const String& key, double value);\n    void setFloat(const String& key, float value);\n    void setBool(const String& key, bool value);\n    void setAlgorithm(int value);\n\n    void getAll(std::vector<String>& names,\n                std::vector<int>& types,\n                std::vector<String>& strValues,\n                std::vector<double>& numValues) const;\n\n    void* params;\n};\n\nstruct CV_EXPORTS KDTreeIndexParams : public IndexParams\n{\n    KDTreeIndexParams(int trees=4);\n};\n\nstruct CV_EXPORTS LinearIndexParams : public IndexParams\n{\n    LinearIndexParams();\n};\n\nstruct CV_EXPORTS CompositeIndexParams : public IndexParams\n{\n    CompositeIndexParams(int trees = 4, int branching = 32, int iterations = 11,\n                         cvflann::flann_centers_init_t centers_init = cvflann::FLANN_CENTERS_RANDOM, float cb_index = 0.2f );\n};\n\nstruct CV_EXPORTS AutotunedIndexParams : public IndexParams\n{\n    AutotunedIndexParams(float target_precision = 0.8f, float build_weight = 0.01f,\n                         float memory_weight = 0, float sample_fraction = 0.1f);\n};\n\nstruct CV_EXPORTS HierarchicalClusteringIndexParams : public IndexParams\n{\n    HierarchicalClusteringIndexParams(int branching = 32,\n                      cvflann::flann_centers_init_t centers_init = cvflann::FLANN_CENTERS_RANDOM, int trees = 4, int leaf_size = 100 );\n};\n\nstruct CV_EXPORTS KMeansIndexParams : public IndexParams\n{\n    KMeansIndexParams(int branching = 32, int iterations = 11,\n                      cvflann::flann_centers_init_t centers_init = cvflann::FLANN_CENTERS_RANDOM, float cb_index = 0.2f );\n};\n\nstruct CV_EXPORTS LshIndexParams : public IndexParams\n{\n    LshIndexParams(int table_number, int key_size, int multi_probe_level);\n};\n\nstruct CV_EXPORTS SavedIndexParams : public IndexParams\n{\n    SavedIndexParams(const String& filename);\n};\n\nstruct CV_EXPORTS SearchParams : public IndexParams\n{\n    SearchParams( int checks = 32, float eps = 0, bool sorted = true );\n};\n\nclass CV_EXPORTS_W Index\n{\npublic:\n    CV_WRAP Index();\n    CV_WRAP Index(InputArray features, const IndexParams& params, cvflann::flann_distance_t distType=cvflann::FLANN_DIST_L2);\n    virtual ~Index();\n\n    CV_WRAP virtual void build(InputArray features, const IndexParams& params, cvflann::flann_distance_t distType=cvflann::FLANN_DIST_L2);\n    CV_WRAP virtual void knnSearch(InputArray query, OutputArray indices,\n                   OutputArray dists, int knn, const SearchParams& params=SearchParams());\n\n    CV_WRAP virtual int radiusSearch(InputArray query, OutputArray indices,\n                             OutputArray dists, double radius, int maxResults,\n                             const SearchParams& params=SearchParams());\n\n    CV_WRAP virtual void save(const String& filename) const;\n    CV_WRAP virtual bool load(InputArray features, const String& filename);\n    CV_WRAP virtual void release();\n    CV_WRAP cvflann::flann_distance_t getDistance() const;\n    CV_WRAP cvflann::flann_algorithm_t getAlgorithm() const;\n\nprotected:\n    cvflann::flann_distance_t distType;\n    cvflann::flann_algorithm_t algo;\n    int featureType;\n    void* index;\n};\n\n} } // namespace cv::flann\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/nn_index.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_NNINDEX_H\n#define OPENCV_FLANN_NNINDEX_H\n\n#include \"general.h\"\n#include \"matrix.h\"\n#include \"result_set.h\"\n#include \"params.h\"\n\nnamespace cvflann\n{\n\n/**\n * Nearest-neighbour index base class\n */\ntemplate <typename Distance>\nclass NNIndex\n{\n    typedef typename Distance::ElementType ElementType;\n    typedef typename Distance::ResultType DistanceType;\n\npublic:\n\n    virtual ~NNIndex() {}\n\n    /**\n     * \\brief Builds the index\n     */\n    virtual void buildIndex() = 0;\n\n    /**\n     * \\brief Perform k-nearest neighbor search\n     * \\param[in] queries The query points for which to find the nearest neighbors\n     * \\param[out] indices The indices of the nearest neighbors found\n     * \\param[out] dists Distances to the nearest neighbors found\n     * \\param[in] knn Number of nearest neighbors to return\n     * \\param[in] params Search parameters\n     */\n    virtual void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params)\n    {\n        assert(queries.cols == veclen());\n        assert(indices.rows >= queries.rows);\n        assert(dists.rows >= queries.rows);\n        assert(int(indices.cols) >= knn);\n        assert(int(dists.cols) >= knn);\n\n#if 0\n        KNNResultSet<DistanceType> resultSet(knn);\n        for (size_t i = 0; i < queries.rows; i++) {\n            resultSet.init(indices[i], dists[i]);\n            findNeighbors(resultSet, queries[i], params);\n        }\n#else\n        KNNUniqueResultSet<DistanceType> resultSet(knn);\n        for (size_t i = 0; i < queries.rows; i++) {\n            resultSet.clear();\n            findNeighbors(resultSet, queries[i], params);\n            if (get_param(params,\"sorted\",true)) resultSet.sortAndCopy(indices[i], dists[i], knn);\n            else resultSet.copy(indices[i], dists[i], knn);\n        }\n#endif\n    }\n\n    /**\n     * \\brief Perform radius search\n     * \\param[in] query The query point\n     * \\param[out] indices The indinces of the neighbors found within the given radius\n     * \\param[out] dists The distances to the nearest neighbors found\n     * \\param[in] radius The radius used for search\n     * \\param[in] params Search parameters\n     * \\returns Number of neighbors found\n     */\n    virtual int radiusSearch(const Matrix<ElementType>& query, Matrix<int>& indices, Matrix<DistanceType>& dists, float radius, const SearchParams& params)\n    {\n        if (query.rows != 1) {\n            fprintf(stderr, \"I can only search one feature at a time for range search\\n\");\n            return -1;\n        }\n        assert(query.cols == veclen());\n        assert(indices.cols == dists.cols);\n\n        int n = 0;\n        int* indices_ptr = NULL;\n        DistanceType* dists_ptr = NULL;\n        if (indices.cols > 0) {\n            n = (int)indices.cols;\n            indices_ptr = indices[0];\n            dists_ptr = dists[0];\n        }\n\n        RadiusUniqueResultSet<DistanceType> resultSet((DistanceType)radius);\n        resultSet.clear();\n        findNeighbors(resultSet, query[0], params);\n        if (n>0) {\n            if (get_param(params,\"sorted\",true)) resultSet.sortAndCopy(indices_ptr, dists_ptr, n);\n            else resultSet.copy(indices_ptr, dists_ptr, n);\n        }\n\n        return (int)resultSet.size();\n    }\n\n    /**\n     * \\brief Saves the index to a stream\n     * \\param stream The stream to save the index to\n     */\n    virtual void saveIndex(FILE* stream) = 0;\n\n    /**\n     * \\brief Loads the index from a stream\n     * \\param stream The stream from which the index is loaded\n     */\n    virtual void loadIndex(FILE* stream) = 0;\n\n    /**\n     * \\returns number of features in this index.\n     */\n    virtual size_t size() const = 0;\n\n    /**\n     * \\returns The dimensionality of the features in this index.\n     */\n    virtual size_t veclen() const = 0;\n\n    /**\n     * \\returns The amount of memory (in bytes) used by the index.\n     */\n    virtual int usedMemory() const = 0;\n\n    /**\n     * \\returns The index type (kdtree, kmeans,...)\n     */\n    virtual flann_algorithm_t getType() const = 0;\n\n    /**\n     * \\returns The index parameters\n     */\n    virtual IndexParams getParameters() const = 0;\n\n\n    /**\n     * \\brief Method that searches for nearest-neighbours\n     */\n    virtual void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams) = 0;\n};\n\n}\n\n#endif //OPENCV_FLANN_NNINDEX_H\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/object_factory.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_OBJECT_FACTORY_H_\n#define OPENCV_FLANN_OBJECT_FACTORY_H_\n\n#include <map>\n\nnamespace cvflann\n{\n\nclass CreatorNotFound\n{\n};\n\ntemplate<typename BaseClass,\n         typename UniqueIdType,\n         typename ObjectCreator = BaseClass* (*)()>\nclass ObjectFactory\n{\n    typedef ObjectFactory<BaseClass,UniqueIdType,ObjectCreator> ThisClass;\n    typedef std::map<UniqueIdType, ObjectCreator> ObjectRegistry;\n\n    // singleton class, private constructor\n    ObjectFactory() {}\n\npublic:\n\n    bool subscribe(UniqueIdType id, ObjectCreator creator)\n    {\n        if (object_registry.find(id) != object_registry.end()) return false;\n\n        object_registry[id] = creator;\n        return true;\n    }\n\n    bool unregister(UniqueIdType id)\n    {\n        return object_registry.erase(id) == 1;\n    }\n\n    ObjectCreator create(UniqueIdType id)\n    {\n        typename ObjectRegistry::const_iterator iter = object_registry.find(id);\n\n        if (iter == object_registry.end()) {\n            throw CreatorNotFound();\n        }\n\n        return iter->second;\n    }\n\n    static ThisClass& instance()\n    {\n        static ThisClass the_factory;\n        return the_factory;\n    }\nprivate:\n    ObjectRegistry object_registry;\n};\n\n}\n\n#endif /* OPENCV_FLANN_OBJECT_FACTORY_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/params.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2011  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2011  David G. Lowe (lowe@cs.ubc.ca). 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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n\n#ifndef OPENCV_FLANN_PARAMS_H_\n#define OPENCV_FLANN_PARAMS_H_\n\n#include \"any.h\"\n#include \"general.h\"\n#include <iostream>\n#include <map>\n\n\nnamespace cvflann\n{\n\ntypedef std::map<cv::String, any> IndexParams;\n\nstruct SearchParams : public IndexParams\n{\n    SearchParams(int checks = 32, float eps = 0, bool sorted = true )\n    {\n        // how many leafs to visit when searching for neighbours (-1 for unlimited)\n        (*this)[\"checks\"] = checks;\n        // search for eps-approximate neighbours (default: 0)\n        (*this)[\"eps\"] = eps;\n        // only for radius search, require neighbours sorted by distance (default: true)\n        (*this)[\"sorted\"] = sorted;\n    }\n};\n\n\ntemplate<typename T>\nT get_param(const IndexParams& params, cv::String name, const T& default_value)\n{\n    IndexParams::const_iterator it = params.find(name);\n    if (it != params.end()) {\n        return it->second.cast<T>();\n    }\n    else {\n        return default_value;\n    }\n}\n\ntemplate<typename T>\nT get_param(const IndexParams& params, cv::String name)\n{\n    IndexParams::const_iterator it = params.find(name);\n    if (it != params.end()) {\n        return it->second.cast<T>();\n    }\n    else {\n        throw FLANNException(cv::String(\"Missing parameter '\")+name+cv::String(\"' in the parameters given\"));\n    }\n}\n\ninline void print_params(const IndexParams& params, std::ostream& stream)\n{\n    IndexParams::const_iterator it;\n\n    for(it=params.begin(); it!=params.end(); ++it) {\n        stream << it->first << \" : \" << it->second << std::endl;\n    }\n}\n\ninline void print_params(const IndexParams& params)\n{\n    print_params(params, std::cout);\n}\n\n}\n\n\n#endif /* OPENCV_FLANN_PARAMS_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/random.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_RANDOM_H\n#define OPENCV_FLANN_RANDOM_H\n\n#include <algorithm>\n#include <cstdlib>\n#include <vector>\n\n#include \"general.h\"\n\nnamespace cvflann\n{\n\n/**\n * Seeds the random number generator\n *  @param seed Random seed\n */\ninline void seed_random(unsigned int seed)\n{\n    srand(seed);\n}\n\n/*\n * Generates a random double value.\n */\n/**\n * Generates a random double value.\n * @param high Upper limit\n * @param low Lower limit\n * @return Random double value\n */\ninline double rand_double(double high = 1.0, double low = 0)\n{\n    return low + ((high-low) * (std::rand() / (RAND_MAX + 1.0)));\n}\n\n/**\n * Generates a random integer value.\n * @param high Upper limit\n * @param low Lower limit\n * @return Random integer value\n */\ninline int rand_int(int high = RAND_MAX, int low = 0)\n{\n    return low + (int) ( double(high-low) * (std::rand() / (RAND_MAX + 1.0)));\n}\n\n/**\n * Random number generator that returns a distinct number from\n * the [0,n) interval each time.\n */\nclass UniqueRandom\n{\n    std::vector<int> vals_;\n    int size_;\n    int counter_;\n\npublic:\n    /**\n     * Constructor.\n     * @param n Size of the interval from which to generate\n     * @return\n     */\n    UniqueRandom(int n)\n    {\n        init(n);\n    }\n\n    /**\n     * Initializes the number generator.\n     * @param n the size of the interval from which to generate random numbers.\n     */\n    void init(int n)\n    {\n        // create and initialize an array of size n\n        vals_.resize(n);\n        size_ = n;\n        for (int i = 0; i < size_; ++i) vals_[i] = i;\n\n        // shuffle the elements in the array\n        std::random_shuffle(vals_.begin(), vals_.end());\n\n        counter_ = 0;\n    }\n\n    /**\n     * Return a distinct random integer in greater or equal to 0 and less\n     * than 'n' on each call. It should be called maximum 'n' times.\n     * Returns: a random integer\n     */\n    int next()\n    {\n        if (counter_ == size_) {\n            return -1;\n        }\n        else {\n            return vals_[counter_++];\n        }\n    }\n};\n\n}\n\n#endif //OPENCV_FLANN_RANDOM_H\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/result_set.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_RESULTSET_H\n#define OPENCV_FLANN_RESULTSET_H\n\n#include <algorithm>\n#include <cstring>\n#include <iostream>\n#include <limits>\n#include <set>\n#include <vector>\n\nnamespace cvflann\n{\n\n/* This record represents a branch point when finding neighbors in\n    the tree.  It contains a record of the minimum distance to the query\n    point, as well as the node at which the search resumes.\n */\n\ntemplate <typename T, typename DistanceType>\nstruct BranchStruct\n{\n    T node;           /* Tree node at which search resumes */\n    DistanceType mindist;     /* Minimum distance to query for all nodes below. */\n\n    BranchStruct() {}\n    BranchStruct(const T& aNode, DistanceType dist) : node(aNode), mindist(dist) {}\n\n    bool operator<(const BranchStruct<T, DistanceType>& rhs) const\n    {\n        return mindist<rhs.mindist;\n    }\n};\n\n\ntemplate <typename DistanceType>\nclass ResultSet\n{\npublic:\n    virtual ~ResultSet() {}\n\n    virtual bool full() const = 0;\n\n    virtual void addPoint(DistanceType dist, int index) = 0;\n\n    virtual DistanceType worstDist() const = 0;\n\n};\n\n/**\n * KNNSimpleResultSet does not ensure that the element it holds are unique.\n * Is used in those cases where the nearest neighbour algorithm used does not\n * attempt to insert the same element multiple times.\n */\ntemplate <typename DistanceType>\nclass KNNSimpleResultSet : public ResultSet<DistanceType>\n{\n    int* indices;\n    DistanceType* dists;\n    int capacity;\n    int count;\n    DistanceType worst_distance_;\n\npublic:\n    KNNSimpleResultSet(int capacity_) : capacity(capacity_), count(0)\n    {\n    }\n\n    void init(int* indices_, DistanceType* dists_)\n    {\n        indices = indices_;\n        dists = dists_;\n        count = 0;\n        worst_distance_ = (std::numeric_limits<DistanceType>::max)();\n        dists[capacity-1] = worst_distance_;\n    }\n\n    size_t size() const\n    {\n        return count;\n    }\n\n    bool full() const\n    {\n        return count == capacity;\n    }\n\n\n    void addPoint(DistanceType dist, int index)\n    {\n        if (dist >= worst_distance_) return;\n        int i;\n        for (i=count; i>0; --i) {\n#ifdef FLANN_FIRST_MATCH\n            if ( (dists[i-1]>dist) || ((dist==dists[i-1])&&(indices[i-1]>index)) )\n#else\n            if (dists[i-1]>dist)\n#endif\n            {\n                if (i<capacity) {\n                    dists[i] = dists[i-1];\n                    indices[i] = indices[i-1];\n                }\n            }\n            else break;\n        }\n        if (count < capacity) ++count;\n        dists[i] = dist;\n        indices[i] = index;\n        worst_distance_ = dists[capacity-1];\n    }\n\n    DistanceType worstDist() const\n    {\n        return worst_distance_;\n    }\n};\n\n/**\n * K-Nearest neighbour result set. Ensures that the elements inserted are unique\n */\ntemplate <typename DistanceType>\nclass KNNResultSet : public ResultSet<DistanceType>\n{\n    int* indices;\n    DistanceType* dists;\n    int capacity;\n    int count;\n    DistanceType worst_distance_;\n\npublic:\n    KNNResultSet(int capacity_) : capacity(capacity_), count(0)\n    {\n    }\n\n    void init(int* indices_, DistanceType* dists_)\n    {\n        indices = indices_;\n        dists = dists_;\n        count = 0;\n        worst_distance_ = (std::numeric_limits<DistanceType>::max)();\n        dists[capacity-1] = worst_distance_;\n    }\n\n    size_t size() const\n    {\n        return count;\n    }\n\n    bool full() const\n    {\n        return count == capacity;\n    }\n\n\n    void addPoint(DistanceType dist, int index)\n    {\n        if (dist >= worst_distance_) return;\n        int i;\n        for (i = count; i > 0; --i) {\n#ifdef FLANN_FIRST_MATCH\n            if ( (dists[i-1]<=dist) && ((dist!=dists[i-1])||(indices[i-1]<=index)) )\n#else\n            if (dists[i-1]<=dist)\n#endif\n            {\n                // Check for duplicate indices\n                int j = i - 1;\n                while ((j >= 0) && (dists[j] == dist)) {\n                    if (indices[j] == index) {\n                        return;\n                    }\n                    --j;\n                }\n                break;\n            }\n        }\n\n        if (count < capacity) ++count;\n        for (int j = count-1; j > i; --j) {\n            dists[j] = dists[j-1];\n            indices[j] = indices[j-1];\n        }\n        dists[i] = dist;\n        indices[i] = index;\n        worst_distance_ = dists[capacity-1];\n    }\n\n    DistanceType worstDist() const\n    {\n        return worst_distance_;\n    }\n};\n\n\n/**\n * A result-set class used when performing a radius based search.\n */\ntemplate <typename DistanceType>\nclass RadiusResultSet : public ResultSet<DistanceType>\n{\n    DistanceType radius;\n    int* indices;\n    DistanceType* dists;\n    size_t capacity;\n    size_t count;\n\npublic:\n    RadiusResultSet(DistanceType radius_, int* indices_, DistanceType* dists_, int capacity_) :\n        radius(radius_), indices(indices_), dists(dists_), capacity(capacity_)\n    {\n        init();\n    }\n\n    ~RadiusResultSet()\n    {\n    }\n\n    void init()\n    {\n        count = 0;\n    }\n\n    size_t size() const\n    {\n        return count;\n    }\n\n    bool full() const\n    {\n        return true;\n    }\n\n    void addPoint(DistanceType dist, int index)\n    {\n        if (dist<radius) {\n            if ((capacity>0)&&(count < capacity)) {\n                dists[count] = dist;\n                indices[count] = index;\n            }\n            count++;\n        }\n    }\n\n    DistanceType worstDist() const\n    {\n        return radius;\n    }\n\n};\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n/** Class that holds the k NN neighbors\n * Faster than KNNResultSet as it uses a binary heap and does not maintain two arrays\n */\ntemplate<typename DistanceType>\nclass UniqueResultSet : public ResultSet<DistanceType>\n{\npublic:\n    struct DistIndex\n    {\n        DistIndex(DistanceType dist, unsigned int index) :\n            dist_(dist), index_(index)\n        {\n        }\n        bool operator<(const DistIndex dist_index) const\n        {\n            return (dist_ < dist_index.dist_) || ((dist_ == dist_index.dist_) && index_ < dist_index.index_);\n        }\n        DistanceType dist_;\n        unsigned int index_;\n    };\n\n    /** Default cosntructor */\n    UniqueResultSet() :\n        worst_distance_(std::numeric_limits<DistanceType>::max())\n    {\n    }\n\n    /** Check the status of the set\n     * @return true if we have k NN\n     */\n    inline bool full() const\n    {\n        return is_full_;\n    }\n\n    /** Remove all elements in the set\n     */\n    virtual void clear() = 0;\n\n    /** Copy the set to two C arrays\n     * @param indices pointer to a C array of indices\n     * @param dist pointer to a C array of distances\n     * @param n_neighbors the number of neighbors to copy\n     */\n    virtual void copy(int* indices, DistanceType* dist, int n_neighbors = -1) const\n    {\n        if (n_neighbors < 0) {\n            for (typename std::set<DistIndex>::const_iterator dist_index = dist_indices_.begin(), dist_index_end =\n                     dist_indices_.end(); dist_index != dist_index_end; ++dist_index, ++indices, ++dist) {\n                *indices = dist_index->index_;\n                *dist = dist_index->dist_;\n            }\n        }\n        else {\n            int i = 0;\n            for (typename std::set<DistIndex>::const_iterator dist_index = dist_indices_.begin(), dist_index_end =\n                     dist_indices_.end(); (dist_index != dist_index_end) && (i < n_neighbors); ++dist_index, ++indices, ++dist, ++i) {\n                *indices = dist_index->index_;\n                *dist = dist_index->dist_;\n            }\n        }\n    }\n\n    /** Copy the set to two C arrays but sort it according to the distance first\n     * @param indices pointer to a C array of indices\n     * @param dist pointer to a C array of distances\n     * @param n_neighbors the number of neighbors to copy\n     */\n    virtual void sortAndCopy(int* indices, DistanceType* dist, int n_neighbors = -1) const\n    {\n        copy(indices, dist, n_neighbors);\n    }\n\n    /** The number of neighbors in the set\n     * @return\n     */\n    size_t size() const\n    {\n        return dist_indices_.size();\n    }\n\n    /** The distance of the furthest neighbor\n     * If we don't have enough neighbors, it returns the max possible value\n     * @return\n     */\n    inline DistanceType worstDist() const\n    {\n        return worst_distance_;\n    }\nprotected:\n    /** Flag to say if the set is full */\n    bool is_full_;\n\n    /** The worst distance found so far */\n    DistanceType worst_distance_;\n\n    /** The best candidates so far */\n    std::set<DistIndex> dist_indices_;\n};\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n/** Class that holds the k NN neighbors\n * Faster than KNNResultSet as it uses a binary heap and does not maintain two arrays\n */\ntemplate<typename DistanceType>\nclass KNNUniqueResultSet : public UniqueResultSet<DistanceType>\n{\npublic:\n    /** Constructor\n     * @param capacity the number of neighbors to store at max\n     */\n    KNNUniqueResultSet(unsigned int capacity) : capacity_(capacity)\n    {\n        this->is_full_ = false;\n        this->clear();\n    }\n\n    /** Add a possible candidate to the best neighbors\n     * @param dist distance for that neighbor\n     * @param index index of that neighbor\n     */\n    inline void addPoint(DistanceType dist, int index)\n    {\n        // Don't do anything if we are worse than the worst\n        if (dist >= worst_distance_) return;\n        dist_indices_.insert(DistIndex(dist, index));\n\n        if (is_full_) {\n            if (dist_indices_.size() > capacity_) {\n                dist_indices_.erase(*dist_indices_.rbegin());\n                worst_distance_ = dist_indices_.rbegin()->dist_;\n            }\n        }\n        else if (dist_indices_.size() == capacity_) {\n            is_full_ = true;\n            worst_distance_ = dist_indices_.rbegin()->dist_;\n        }\n    }\n\n    /** Remove all elements in the set\n     */\n    void clear()\n    {\n        dist_indices_.clear();\n        worst_distance_ = std::numeric_limits<DistanceType>::max();\n        is_full_ = false;\n    }\n\nprotected:\n    typedef typename UniqueResultSet<DistanceType>::DistIndex DistIndex;\n    using UniqueResultSet<DistanceType>::is_full_;\n    using UniqueResultSet<DistanceType>::worst_distance_;\n    using UniqueResultSet<DistanceType>::dist_indices_;\n\n    /** The number of neighbors to keep */\n    unsigned int capacity_;\n};\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n/** Class that holds the radius nearest neighbors\n * It is more accurate than RadiusResult as it is not limited in the number of neighbors\n */\ntemplate<typename DistanceType>\nclass RadiusUniqueResultSet : public UniqueResultSet<DistanceType>\n{\npublic:\n    /** Constructor\n     * @param radius the maximum distance of a neighbor\n     */\n    RadiusUniqueResultSet(DistanceType radius) :\n        radius_(radius)\n    {\n        is_full_ = true;\n    }\n\n    /** Add a possible candidate to the best neighbors\n     * @param dist distance for that neighbor\n     * @param index index of that neighbor\n     */\n    void addPoint(DistanceType dist, int index)\n    {\n        if (dist <= radius_) dist_indices_.insert(DistIndex(dist, index));\n    }\n\n    /** Remove all elements in the set\n     */\n    inline void clear()\n    {\n        dist_indices_.clear();\n    }\n\n\n    /** Check the status of the set\n     * @return alwys false\n     */\n    inline bool full() const\n    {\n        return true;\n    }\n\n    /** The distance of the furthest neighbor\n     * If we don't have enough neighbors, it returns the max possible value\n     * @return\n     */\n    inline DistanceType worstDist() const\n    {\n        return radius_;\n    }\nprivate:\n    typedef typename UniqueResultSet<DistanceType>::DistIndex DistIndex;\n    using UniqueResultSet<DistanceType>::dist_indices_;\n    using UniqueResultSet<DistanceType>::is_full_;\n\n    /** The furthest distance a neighbor can be */\n    DistanceType radius_;\n};\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n/** Class that holds the k NN neighbors within a radius distance\n */\ntemplate<typename DistanceType>\nclass KNNRadiusUniqueResultSet : public KNNUniqueResultSet<DistanceType>\n{\npublic:\n    /** Constructor\n     * @param capacity the number of neighbors to store at max\n     * @param radius the maximum distance of a neighbor\n     */\n    KNNRadiusUniqueResultSet(unsigned int capacity, DistanceType radius)\n    {\n        this->capacity_ = capacity;\n        this->radius_ = radius;\n        this->dist_indices_.reserve(capacity_);\n        this->clear();\n    }\n\n    /** Remove all elements in the set\n     */\n    void clear()\n    {\n        dist_indices_.clear();\n        worst_distance_ = radius_;\n        is_full_ = false;\n    }\nprivate:\n    using KNNUniqueResultSet<DistanceType>::dist_indices_;\n    using KNNUniqueResultSet<DistanceType>::is_full_;\n    using KNNUniqueResultSet<DistanceType>::worst_distance_;\n\n    /** The maximum number of neighbors to consider */\n    unsigned int capacity_;\n\n    /** The maximum distance of a neighbor */\n    DistanceType radius_;\n};\n}\n\n#endif //OPENCV_FLANN_RESULTSET_H\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/sampling.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). 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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n\n#ifndef OPENCV_FLANN_SAMPLING_H_\n#define OPENCV_FLANN_SAMPLING_H_\n\n#include \"matrix.h\"\n#include \"random.h\"\n\nnamespace cvflann\n{\n\ntemplate<typename T>\nMatrix<T> random_sample(Matrix<T>& srcMatrix, long size, bool remove = false)\n{\n    Matrix<T> newSet(new T[size * srcMatrix.cols], size,srcMatrix.cols);\n\n    T* src,* dest;\n    for (long i=0; i<size; ++i) {\n        long r = rand_int((int)(srcMatrix.rows-i));\n        dest = newSet[i];\n        src = srcMatrix[r];\n        std::copy(src, src+srcMatrix.cols, dest);\n        if (remove) {\n            src = srcMatrix[srcMatrix.rows-i-1];\n            dest = srcMatrix[r];\n            std::copy(src, src+srcMatrix.cols, dest);\n        }\n    }\n    if (remove) {\n        srcMatrix.rows -= size;\n    }\n    return newSet;\n}\n\ntemplate<typename T>\nMatrix<T> random_sample(const Matrix<T>& srcMatrix, size_t size)\n{\n    UniqueRandom rand((int)srcMatrix.rows);\n    Matrix<T> newSet(new T[size * srcMatrix.cols], size,srcMatrix.cols);\n\n    T* src,* dest;\n    for (size_t i=0; i<size; ++i) {\n        long r = rand.next();\n        dest = newSet[i];\n        src = srcMatrix[r];\n        std::copy(src, src+srcMatrix.cols, dest);\n    }\n    return newSet;\n}\n\n} // namespace\n\n\n#endif /* OPENCV_FLANN_SAMPLING_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/saving.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). 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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE NNIndexGOODS 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_SAVING_H_\n#define OPENCV_FLANN_SAVING_H_\n\n#include <cstring>\n#include <vector>\n\n#include \"general.h\"\n#include \"nn_index.h\"\n\n#ifdef FLANN_SIGNATURE_\n#undef FLANN_SIGNATURE_\n#endif\n#define FLANN_SIGNATURE_ \"FLANN_INDEX\"\n\nnamespace cvflann\n{\n\ntemplate <typename T>\nstruct Datatype {};\ntemplate<>\nstruct Datatype<char> { static flann_datatype_t type() { return FLANN_INT8; } };\ntemplate<>\nstruct Datatype<short> { static flann_datatype_t type() { return FLANN_INT16; } };\ntemplate<>\nstruct Datatype<int> { static flann_datatype_t type() { return FLANN_INT32; } };\ntemplate<>\nstruct Datatype<unsigned char> { static flann_datatype_t type() { return FLANN_UINT8; } };\ntemplate<>\nstruct Datatype<unsigned short> { static flann_datatype_t type() { return FLANN_UINT16; } };\ntemplate<>\nstruct Datatype<unsigned int> { static flann_datatype_t type() { return FLANN_UINT32; } };\ntemplate<>\nstruct Datatype<float> { static flann_datatype_t type() { return FLANN_FLOAT32; } };\ntemplate<>\nstruct Datatype<double> { static flann_datatype_t type() { return FLANN_FLOAT64; } };\n\n\n/**\n * Structure representing the index header.\n */\nstruct IndexHeader\n{\n    char signature[16];\n    char version[16];\n    flann_datatype_t data_type;\n    flann_algorithm_t index_type;\n    size_t rows;\n    size_t cols;\n};\n\n/**\n * Saves index header to stream\n *\n * @param stream - Stream to save to\n * @param index - The index to save\n */\ntemplate<typename Distance>\nvoid save_header(FILE* stream, const NNIndex<Distance>& index)\n{\n    IndexHeader header;\n    memset(header.signature, 0, sizeof(header.signature));\n    strcpy(header.signature, FLANN_SIGNATURE_);\n    memset(header.version, 0, sizeof(header.version));\n    strcpy(header.version, FLANN_VERSION_);\n    header.data_type = Datatype<typename Distance::ElementType>::type();\n    header.index_type = index.getType();\n    header.rows = index.size();\n    header.cols = index.veclen();\n\n    std::fwrite(&header, sizeof(header),1,stream);\n}\n\n\n/**\n *\n * @param stream - Stream to load from\n * @return Index header\n */\ninline IndexHeader load_header(FILE* stream)\n{\n    IndexHeader header;\n    size_t read_size = fread(&header,sizeof(header),1,stream);\n\n    if (read_size!=(size_t)1) {\n        throw FLANNException(\"Invalid index file, cannot read\");\n    }\n\n    if (strcmp(header.signature,FLANN_SIGNATURE_)!=0) {\n        throw FLANNException(\"Invalid index file, wrong signature\");\n    }\n\n    return header;\n\n}\n\n\ntemplate<typename T>\nvoid save_value(FILE* stream, const T& value, size_t count = 1)\n{\n    fwrite(&value, sizeof(value),count, stream);\n}\n\ntemplate<typename T>\nvoid save_value(FILE* stream, const cvflann::Matrix<T>& value)\n{\n    fwrite(&value, sizeof(value),1, stream);\n    fwrite(value.data, sizeof(T),value.rows*value.cols, stream);\n}\n\ntemplate<typename T>\nvoid save_value(FILE* stream, const std::vector<T>& value)\n{\n    size_t size = value.size();\n    fwrite(&size, sizeof(size_t), 1, stream);\n    fwrite(&value[0], sizeof(T), size, stream);\n}\n\ntemplate<typename T>\nvoid load_value(FILE* stream, T& value, size_t count = 1)\n{\n    size_t read_cnt = fread(&value, sizeof(value), count, stream);\n    if (read_cnt != count) {\n        throw FLANNException(\"Cannot read from file\");\n    }\n}\n\ntemplate<typename T>\nvoid load_value(FILE* stream, cvflann::Matrix<T>& value)\n{\n    size_t read_cnt = fread(&value, sizeof(value), 1, stream);\n    if (read_cnt != 1) {\n        throw FLANNException(\"Cannot read from file\");\n    }\n    value.data = new T[value.rows*value.cols];\n    read_cnt = fread(value.data, sizeof(T), value.rows*value.cols, stream);\n    if (read_cnt != (size_t)(value.rows*value.cols)) {\n        throw FLANNException(\"Cannot read from file\");\n    }\n}\n\n\ntemplate<typename T>\nvoid load_value(FILE* stream, std::vector<T>& value)\n{\n    size_t size;\n    size_t read_cnt = fread(&size, sizeof(size_t), 1, stream);\n    if (read_cnt!=1) {\n        throw FLANNException(\"Cannot read from file\");\n    }\n    value.resize(size);\n    read_cnt = fread(&value[0], sizeof(T), size, stream);\n    if (read_cnt != size) {\n        throw FLANNException(\"Cannot read from file\");\n    }\n}\n\n}\n\n#endif /* OPENCV_FLANN_SAVING_H_ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/simplex_downhill.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_SIMPLEX_DOWNHILL_H_\n#define OPENCV_FLANN_SIMPLEX_DOWNHILL_H_\n\nnamespace cvflann\n{\n\n/**\n    Adds val to array vals (and point to array points) and keeping the arrays sorted by vals.\n */\ntemplate <typename T>\nvoid addValue(int pos, float val, float* vals, T* point, T* points, int n)\n{\n    vals[pos] = val;\n    for (int i=0; i<n; ++i) {\n        points[pos*n+i] = point[i];\n    }\n\n    // bubble down\n    int j=pos;\n    while (j>0 && vals[j]<vals[j-1]) {\n        swap(vals[j],vals[j-1]);\n        for (int i=0; i<n; ++i) {\n            swap(points[j*n+i],points[(j-1)*n+i]);\n        }\n        --j;\n    }\n}\n\n\n/**\n    Simplex downhill optimization function.\n    Preconditions: points is a 2D mattrix of size (n+1) x n\n                    func is the cost function taking n an array of n params and returning float\n                    vals is the cost function in the n+1 simplex points, if NULL it will be computed\n\n    Postcondition: returns optimum value and points[0..n] are the optimum parameters\n */\ntemplate <typename T, typename F>\nfloat optimizeSimplexDownhill(T* points, int n, F func, float* vals = NULL )\n{\n    const int MAX_ITERATIONS = 10;\n\n    assert(n>0);\n\n    T* p_o = new T[n];\n    T* p_r = new T[n];\n    T* p_e = new T[n];\n\n    int alpha = 1;\n\n    int iterations = 0;\n\n    bool ownVals = false;\n    if (vals == NULL) {\n        ownVals = true;\n        vals = new float[n+1];\n        for (int i=0; i<n+1; ++i) {\n            float val = func(points+i*n);\n            addValue(i, val, vals, points+i*n, points, n);\n        }\n    }\n    int nn = n*n;\n\n    while (true) {\n\n        if (iterations++ > MAX_ITERATIONS) break;\n\n        // compute average of simplex points (except the highest point)\n        for (int j=0; j<n; ++j) {\n            p_o[j] = 0;\n            for (int i=0; i<n; ++i) {\n                p_o[i] += points[j*n+i];\n            }\n        }\n        for (int i=0; i<n; ++i) {\n            p_o[i] /= n;\n        }\n\n        bool converged = true;\n        for (int i=0; i<n; ++i) {\n            if (p_o[i] != points[nn+i]) {\n                converged = false;\n            }\n        }\n        if (converged) break;\n\n        // trying a reflection\n        for (int i=0; i<n; ++i) {\n            p_r[i] = p_o[i] + alpha*(p_o[i]-points[nn+i]);\n        }\n        float val_r = func(p_r);\n\n        if ((val_r>=vals[0])&&(val_r<vals[n])) {\n            // reflection between second highest and lowest\n            // add it to the simplex\n            Logger::info(\"Choosing reflection\\n\");\n            addValue(n, val_r,vals, p_r, points, n);\n            continue;\n        }\n\n        if (val_r<vals[0]) {\n            // value is smaller than smalest in simplex\n\n            // expand some more to see if it drops further\n            for (int i=0; i<n; ++i) {\n                p_e[i] = 2*p_r[i]-p_o[i];\n            }\n            float val_e = func(p_e);\n\n            if (val_e<val_r) {\n                Logger::info(\"Choosing reflection and expansion\\n\");\n                addValue(n, val_e,vals,p_e,points,n);\n            }\n            else {\n                Logger::info(\"Choosing reflection\\n\");\n                addValue(n, val_r,vals,p_r,points,n);\n            }\n            continue;\n        }\n        if (val_r>=vals[n]) {\n            for (int i=0; i<n; ++i) {\n                p_e[i] = (p_o[i]+points[nn+i])/2;\n            }\n            float val_e = func(p_e);\n\n            if (val_e<vals[n]) {\n                Logger::info(\"Choosing contraction\\n\");\n                addValue(n,val_e,vals,p_e,points,n);\n                continue;\n            }\n        }\n        {\n            Logger::info(\"Full contraction\\n\");\n            for (int j=1; j<=n; ++j) {\n                for (int i=0; i<n; ++i) {\n                    points[j*n+i] = (points[j*n+i]+points[i])/2;\n                }\n                float val = func(points+j*n);\n                addValue(j,val,vals,points+j*n,points,n);\n            }\n        }\n    }\n\n    float bestVal = vals[0];\n\n    delete[] p_r;\n    delete[] p_o;\n    delete[] p_e;\n    if (ownVals) delete[] vals;\n\n    return bestVal;\n}\n\n}\n\n#endif //OPENCV_FLANN_SIMPLEX_DOWNHILL_H_\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann/timer.h",
    "content": "/***********************************************************************\n * Software License Agreement (BSD License)\n *\n * Copyright 2008-2009  Marius Muja (mariusm@cs.ubc.ca). All rights reserved.\n * Copyright 2008-2009  David G. Lowe (lowe@cs.ubc.ca). All rights reserved.\n *\n * THE BSD LICENSE\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 * 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 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT 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 OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *************************************************************************/\n\n#ifndef OPENCV_FLANN_TIMER_H\n#define OPENCV_FLANN_TIMER_H\n\n#include <time.h>\n#include \"opencv2/core.hpp\"\n#include \"opencv2/core/utility.hpp\"\n\nnamespace cvflann\n{\n\n/**\n * A start-stop timer class.\n *\n * Can be used to time portions of code.\n */\nclass StartStopTimer\n{\n    int64 startTime;\n\npublic:\n    /**\n     * Value of the timer.\n     */\n    double value;\n\n\n    /**\n     * Constructor.\n     */\n    StartStopTimer()\n    {\n        reset();\n    }\n\n    /**\n     * Starts the timer.\n     */\n    void start()\n    {\n        startTime = cv::getTickCount();\n    }\n\n    /**\n     * Stops the timer and updates timer value.\n     */\n    void stop()\n    {\n        int64 stopTime = cv::getTickCount();\n        value += ( (double)stopTime - startTime) / cv::getTickFrequency();\n    }\n\n    /**\n     * Resets the timer value to 0.\n     */\n    void reset()\n    {\n        value = 0;\n    }\n\n};\n\n}\n\n#endif // FLANN_TIMER_H\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/flann.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef _OPENCV_FLANN_HPP_\n#define _OPENCV_FLANN_HPP_\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/flann/miniflann.hpp\"\n#include \"opencv2/flann/flann_base.hpp\"\n\n/**\n@defgroup flann Clustering and Search in Multi-Dimensional Spaces\n\nThis section documents OpenCV's interface to the FLANN library. FLANN (Fast Library for Approximate\nNearest Neighbors) is a library that contains a collection of algorithms optimized for fast nearest\nneighbor search in large datasets and for high dimensional features. More information about FLANN\ncan be found in @cite Muja2009 .\n*/\n\nnamespace cvflann\n{\n    CV_EXPORTS flann_distance_t flann_distance_type();\n    FLANN_DEPRECATED CV_EXPORTS void set_distance_type(flann_distance_t distance_type, int order);\n}\n\n\nnamespace cv\n{\nnamespace flann\n{\n\n\n//! @addtogroup flann\n//! @{\n\ntemplate <typename T> struct CvType {};\ntemplate <> struct CvType<unsigned char> { static int type() { return CV_8U; } };\ntemplate <> struct CvType<char> { static int type() { return CV_8S; } };\ntemplate <> struct CvType<unsigned short> { static int type() { return CV_16U; } };\ntemplate <> struct CvType<short> { static int type() { return CV_16S; } };\ntemplate <> struct CvType<int> { static int type() { return CV_32S; } };\ntemplate <> struct CvType<float> { static int type() { return CV_32F; } };\ntemplate <> struct CvType<double> { static int type() { return CV_64F; } };\n\n\n// bring the flann parameters into this namespace\nusing ::cvflann::get_param;\nusing ::cvflann::print_params;\n\n// bring the flann distances into this namespace\nusing ::cvflann::L2_Simple;\nusing ::cvflann::L2;\nusing ::cvflann::L1;\nusing ::cvflann::MinkowskiDistance;\nusing ::cvflann::MaxDistance;\nusing ::cvflann::HammingLUT;\nusing ::cvflann::Hamming;\nusing ::cvflann::Hamming2;\nusing ::cvflann::HistIntersectionDistance;\nusing ::cvflann::HellingerDistance;\nusing ::cvflann::ChiSquareDistance;\nusing ::cvflann::KL_Divergence;\n\n\n/** @brief The FLANN nearest neighbor index class. This class is templated with the type of elements for which\nthe index is built.\n */\ntemplate <typename Distance>\nclass GenericIndex\n{\npublic:\n        typedef typename Distance::ElementType ElementType;\n        typedef typename Distance::ResultType DistanceType;\n\n        /** @brief Constructs a nearest neighbor search index for a given dataset.\n\n        @param features Matrix of containing the features(points) to index. The size of the matrix is\n        num_features x feature_dimensionality and the data type of the elements in the matrix must\n        coincide with the type of the index.\n        @param params Structure containing the index parameters. The type of index that will be\n        constructed depends on the type of this parameter. See the description.\n        @param distance\n\n        The method constructs a fast search structure from a set of features using the specified algorithm\n        with specified parameters, as defined by params. params is a reference to one of the following class\n        IndexParams descendants:\n\n        - **LinearIndexParams** When passing an object of this type, the index will perform a linear,\n        brute-force search. :\n        @code\n        struct LinearIndexParams : public IndexParams\n        {\n        };\n        @endcode\n        - **KDTreeIndexParams** When passing an object of this type the index constructed will consist of\n        a set of randomized kd-trees which will be searched in parallel. :\n        @code\n        struct KDTreeIndexParams : public IndexParams\n        {\n            KDTreeIndexParams( int trees = 4 );\n        };\n        @endcode\n        - **KMeansIndexParams** When passing an object of this type the index constructed will be a\n        hierarchical k-means tree. :\n        @code\n        struct KMeansIndexParams : public IndexParams\n        {\n            KMeansIndexParams(\n                int branching = 32,\n                int iterations = 11,\n                flann_centers_init_t centers_init = CENTERS_RANDOM,\n                float cb_index = 0.2 );\n        };\n        @endcode\n        - **CompositeIndexParams** When using a parameters object of this type the index created\n        combines the randomized kd-trees and the hierarchical k-means tree. :\n        @code\n        struct CompositeIndexParams : public IndexParams\n        {\n            CompositeIndexParams(\n                int trees = 4,\n                int branching = 32,\n                int iterations = 11,\n                flann_centers_init_t centers_init = CENTERS_RANDOM,\n                float cb_index = 0.2 );\n        };\n        @endcode\n        - **LshIndexParams** When using a parameters object of this type the index created uses\n        multi-probe LSH (by Multi-Probe LSH: Efficient Indexing for High-Dimensional Similarity Search\n        by Qin Lv, William Josephson, Zhe Wang, Moses Charikar, Kai Li., Proceedings of the 33rd\n        International Conference on Very Large Data Bases (VLDB). Vienna, Austria. September 2007) :\n        @code\n        struct LshIndexParams : public IndexParams\n        {\n            LshIndexParams(\n                unsigned int table_number,\n                unsigned int key_size,\n                unsigned int multi_probe_level );\n        };\n        @endcode\n        - **AutotunedIndexParams** When passing an object of this type the index created is\n        automatically tuned to offer the best performance, by choosing the optimal index type\n        (randomized kd-trees, hierarchical kmeans, linear) and parameters for the dataset provided. :\n        @code\n        struct AutotunedIndexParams : public IndexParams\n        {\n            AutotunedIndexParams(\n                float target_precision = 0.9,\n                float build_weight = 0.01,\n                float memory_weight = 0,\n                float sample_fraction = 0.1 );\n        };\n        @endcode\n        - **SavedIndexParams** This object type is used for loading a previously saved index from the\n        disk. :\n        @code\n        struct SavedIndexParams : public IndexParams\n        {\n            SavedIndexParams( String filename );\n        };\n        @endcode\n         */\n        GenericIndex(const Mat& features, const ::cvflann::IndexParams& params, Distance distance = Distance());\n\n        ~GenericIndex();\n\n        /** @brief Performs a K-nearest neighbor search for a given query point using the index.\n\n        @param query The query point\n        @param indices Vector that will contain the indices of the K-nearest neighbors found. It must have\n        at least knn size.\n        @param dists Vector that will contain the distances to the K-nearest neighbors found. It must have\n        at least knn size.\n        @param knn Number of nearest neighbors to search for.\n        @param params SearchParams\n         */\n        void knnSearch(const std::vector<ElementType>& query, std::vector<int>& indices,\n                       std::vector<DistanceType>& dists, int knn, const ::cvflann::SearchParams& params);\n        void knnSearch(const Mat& queries, Mat& indices, Mat& dists, int knn, const ::cvflann::SearchParams& params);\n\n        int radiusSearch(const std::vector<ElementType>& query, std::vector<int>& indices,\n                         std::vector<DistanceType>& dists, DistanceType radius, const ::cvflann::SearchParams& params);\n        int radiusSearch(const Mat& query, Mat& indices, Mat& dists,\n                         DistanceType radius, const ::cvflann::SearchParams& params);\n\n        void save(String filename) { nnIndex->save(filename); }\n\n        int veclen() const { return nnIndex->veclen(); }\n\n        int size() const { return nnIndex->size(); }\n\n        ::cvflann::IndexParams getParameters() { return nnIndex->getParameters(); }\n\n        FLANN_DEPRECATED const ::cvflann::IndexParams* getIndexParameters() { return nnIndex->getIndexParameters(); }\n\nprivate:\n        ::cvflann::Index<Distance>* nnIndex;\n};\n\n//! @cond IGNORED\n\n#define FLANN_DISTANCE_CHECK \\\n    if ( ::cvflann::flann_distance_type() != cvflann::FLANN_DIST_L2) { \\\n        printf(\"[WARNING] You are using cv::flann::Index (or cv::flann::GenericIndex) and have also changed \"\\\n        \"the distance using cvflann::set_distance_type. This is no longer working as expected \"\\\n        \"(cv::flann::Index always uses L2). You should create the index templated on the distance, \"\\\n        \"for example for L1 distance use: GenericIndex< L1<float> > \\n\"); \\\n    }\n\n\ntemplate <typename Distance>\nGenericIndex<Distance>::GenericIndex(const Mat& dataset, const ::cvflann::IndexParams& params, Distance distance)\n{\n    CV_Assert(dataset.type() == CvType<ElementType>::type());\n    CV_Assert(dataset.isContinuous());\n    ::cvflann::Matrix<ElementType> m_dataset((ElementType*)dataset.ptr<ElementType>(0), dataset.rows, dataset.cols);\n\n    nnIndex = new ::cvflann::Index<Distance>(m_dataset, params, distance);\n\n    FLANN_DISTANCE_CHECK\n\n    nnIndex->buildIndex();\n}\n\ntemplate <typename Distance>\nGenericIndex<Distance>::~GenericIndex()\n{\n    delete nnIndex;\n}\n\ntemplate <typename Distance>\nvoid GenericIndex<Distance>::knnSearch(const std::vector<ElementType>& query, std::vector<int>& indices, std::vector<DistanceType>& dists, int knn, const ::cvflann::SearchParams& searchParams)\n{\n    ::cvflann::Matrix<ElementType> m_query((ElementType*)&query[0], 1, query.size());\n    ::cvflann::Matrix<int> m_indices(&indices[0], 1, indices.size());\n    ::cvflann::Matrix<DistanceType> m_dists(&dists[0], 1, dists.size());\n\n    FLANN_DISTANCE_CHECK\n\n    nnIndex->knnSearch(m_query,m_indices,m_dists,knn,searchParams);\n}\n\n\ntemplate <typename Distance>\nvoid GenericIndex<Distance>::knnSearch(const Mat& queries, Mat& indices, Mat& dists, int knn, const ::cvflann::SearchParams& searchParams)\n{\n    CV_Assert(queries.type() == CvType<ElementType>::type());\n    CV_Assert(queries.isContinuous());\n    ::cvflann::Matrix<ElementType> m_queries((ElementType*)queries.ptr<ElementType>(0), queries.rows, queries.cols);\n\n    CV_Assert(indices.type() == CV_32S);\n    CV_Assert(indices.isContinuous());\n    ::cvflann::Matrix<int> m_indices((int*)indices.ptr<int>(0), indices.rows, indices.cols);\n\n    CV_Assert(dists.type() == CvType<DistanceType>::type());\n    CV_Assert(dists.isContinuous());\n    ::cvflann::Matrix<DistanceType> m_dists((DistanceType*)dists.ptr<DistanceType>(0), dists.rows, dists.cols);\n\n    FLANN_DISTANCE_CHECK\n\n    nnIndex->knnSearch(m_queries,m_indices,m_dists,knn, searchParams);\n}\n\ntemplate <typename Distance>\nint GenericIndex<Distance>::radiusSearch(const std::vector<ElementType>& query, std::vector<int>& indices, std::vector<DistanceType>& dists, DistanceType radius, const ::cvflann::SearchParams& searchParams)\n{\n    ::cvflann::Matrix<ElementType> m_query((ElementType*)&query[0], 1, query.size());\n    ::cvflann::Matrix<int> m_indices(&indices[0], 1, indices.size());\n    ::cvflann::Matrix<DistanceType> m_dists(&dists[0], 1, dists.size());\n\n    FLANN_DISTANCE_CHECK\n\n    return nnIndex->radiusSearch(m_query,m_indices,m_dists,radius,searchParams);\n}\n\ntemplate <typename Distance>\nint GenericIndex<Distance>::radiusSearch(const Mat& query, Mat& indices, Mat& dists, DistanceType radius, const ::cvflann::SearchParams& searchParams)\n{\n    CV_Assert(query.type() == CvType<ElementType>::type());\n    CV_Assert(query.isContinuous());\n    ::cvflann::Matrix<ElementType> m_query((ElementType*)query.ptr<ElementType>(0), query.rows, query.cols);\n\n    CV_Assert(indices.type() == CV_32S);\n    CV_Assert(indices.isContinuous());\n    ::cvflann::Matrix<int> m_indices((int*)indices.ptr<int>(0), indices.rows, indices.cols);\n\n    CV_Assert(dists.type() == CvType<DistanceType>::type());\n    CV_Assert(dists.isContinuous());\n    ::cvflann::Matrix<DistanceType> m_dists((DistanceType*)dists.ptr<DistanceType>(0), dists.rows, dists.cols);\n\n    FLANN_DISTANCE_CHECK\n\n    return nnIndex->radiusSearch(m_query,m_indices,m_dists,radius,searchParams);\n}\n\n//! @endcond\n\n/**\n * @deprecated Use GenericIndex class instead\n */\ntemplate <typename T>\nclass\n#ifndef _MSC_VER\n FLANN_DEPRECATED\n#endif\n Index_ {\npublic:\n        typedef typename L2<T>::ElementType ElementType;\n        typedef typename L2<T>::ResultType DistanceType;\n\n    Index_(const Mat& features, const ::cvflann::IndexParams& params);\n\n    ~Index_();\n\n    void knnSearch(const std::vector<ElementType>& query, std::vector<int>& indices, std::vector<DistanceType>& dists, int knn, const ::cvflann::SearchParams& params);\n    void knnSearch(const Mat& queries, Mat& indices, Mat& dists, int knn, const ::cvflann::SearchParams& params);\n\n    int radiusSearch(const std::vector<ElementType>& query, std::vector<int>& indices, std::vector<DistanceType>& dists, DistanceType radius, const ::cvflann::SearchParams& params);\n    int radiusSearch(const Mat& query, Mat& indices, Mat& dists, DistanceType radius, const ::cvflann::SearchParams& params);\n\n    void save(String filename)\n        {\n            if (nnIndex_L1) nnIndex_L1->save(filename);\n            if (nnIndex_L2) nnIndex_L2->save(filename);\n        }\n\n    int veclen() const\n    {\n            if (nnIndex_L1) return nnIndex_L1->veclen();\n            if (nnIndex_L2) return nnIndex_L2->veclen();\n        }\n\n    int size() const\n    {\n            if (nnIndex_L1) return nnIndex_L1->size();\n            if (nnIndex_L2) return nnIndex_L2->size();\n        }\n\n        ::cvflann::IndexParams getParameters()\n        {\n            if (nnIndex_L1) return nnIndex_L1->getParameters();\n            if (nnIndex_L2) return nnIndex_L2->getParameters();\n\n        }\n\n        FLANN_DEPRECATED const ::cvflann::IndexParams* getIndexParameters()\n        {\n            if (nnIndex_L1) return nnIndex_L1->getIndexParameters();\n            if (nnIndex_L2) return nnIndex_L2->getIndexParameters();\n        }\n\nprivate:\n        // providing backwards compatibility for L2 and L1 distances (most common)\n        ::cvflann::Index< L2<ElementType> >* nnIndex_L2;\n        ::cvflann::Index< L1<ElementType> >* nnIndex_L1;\n};\n\n#ifdef _MSC_VER\ntemplate <typename T>\nclass FLANN_DEPRECATED Index_;\n#endif\n\n//! @cond IGNORED\n\ntemplate <typename T>\nIndex_<T>::Index_(const Mat& dataset, const ::cvflann::IndexParams& params)\n{\n    printf(\"[WARNING] The cv::flann::Index_<T> class is deperecated, use cv::flann::GenericIndex<Distance> instead\\n\");\n\n    CV_Assert(dataset.type() == CvType<ElementType>::type());\n    CV_Assert(dataset.isContinuous());\n    ::cvflann::Matrix<ElementType> m_dataset((ElementType*)dataset.ptr<ElementType>(0), dataset.rows, dataset.cols);\n\n    if ( ::cvflann::flann_distance_type() == cvflann::FLANN_DIST_L2 ) {\n        nnIndex_L1 = NULL;\n        nnIndex_L2 = new ::cvflann::Index< L2<ElementType> >(m_dataset, params);\n    }\n    else if ( ::cvflann::flann_distance_type() == cvflann::FLANN_DIST_L1 ) {\n        nnIndex_L1 = new ::cvflann::Index< L1<ElementType> >(m_dataset, params);\n        nnIndex_L2 = NULL;\n    }\n    else {\n        printf(\"[ERROR] cv::flann::Index_<T> only provides backwards compatibility for the L1 and L2 distances. \"\n        \"For other distance types you must use cv::flann::GenericIndex<Distance>\\n\");\n        CV_Assert(0);\n    }\n    if (nnIndex_L1) nnIndex_L1->buildIndex();\n    if (nnIndex_L2) nnIndex_L2->buildIndex();\n}\n\ntemplate <typename T>\nIndex_<T>::~Index_()\n{\n    if (nnIndex_L1) delete nnIndex_L1;\n    if (nnIndex_L2) delete nnIndex_L2;\n}\n\ntemplate <typename T>\nvoid Index_<T>::knnSearch(const std::vector<ElementType>& query, std::vector<int>& indices, std::vector<DistanceType>& dists, int knn, const ::cvflann::SearchParams& searchParams)\n{\n    ::cvflann::Matrix<ElementType> m_query((ElementType*)&query[0], 1, query.size());\n    ::cvflann::Matrix<int> m_indices(&indices[0], 1, indices.size());\n    ::cvflann::Matrix<DistanceType> m_dists(&dists[0], 1, dists.size());\n\n    if (nnIndex_L1) nnIndex_L1->knnSearch(m_query,m_indices,m_dists,knn,searchParams);\n    if (nnIndex_L2) nnIndex_L2->knnSearch(m_query,m_indices,m_dists,knn,searchParams);\n}\n\n\ntemplate <typename T>\nvoid Index_<T>::knnSearch(const Mat& queries, Mat& indices, Mat& dists, int knn, const ::cvflann::SearchParams& searchParams)\n{\n    CV_Assert(queries.type() == CvType<ElementType>::type());\n    CV_Assert(queries.isContinuous());\n    ::cvflann::Matrix<ElementType> m_queries((ElementType*)queries.ptr<ElementType>(0), queries.rows, queries.cols);\n\n    CV_Assert(indices.type() == CV_32S);\n    CV_Assert(indices.isContinuous());\n    ::cvflann::Matrix<int> m_indices((int*)indices.ptr<int>(0), indices.rows, indices.cols);\n\n    CV_Assert(dists.type() == CvType<DistanceType>::type());\n    CV_Assert(dists.isContinuous());\n    ::cvflann::Matrix<DistanceType> m_dists((DistanceType*)dists.ptr<DistanceType>(0), dists.rows, dists.cols);\n\n    if (nnIndex_L1) nnIndex_L1->knnSearch(m_queries,m_indices,m_dists,knn, searchParams);\n    if (nnIndex_L2) nnIndex_L2->knnSearch(m_queries,m_indices,m_dists,knn, searchParams);\n}\n\ntemplate <typename T>\nint Index_<T>::radiusSearch(const std::vector<ElementType>& query, std::vector<int>& indices, std::vector<DistanceType>& dists, DistanceType radius, const ::cvflann::SearchParams& searchParams)\n{\n    ::cvflann::Matrix<ElementType> m_query((ElementType*)&query[0], 1, query.size());\n    ::cvflann::Matrix<int> m_indices(&indices[0], 1, indices.size());\n    ::cvflann::Matrix<DistanceType> m_dists(&dists[0], 1, dists.size());\n\n    if (nnIndex_L1) return nnIndex_L1->radiusSearch(m_query,m_indices,m_dists,radius,searchParams);\n    if (nnIndex_L2) return nnIndex_L2->radiusSearch(m_query,m_indices,m_dists,radius,searchParams);\n}\n\ntemplate <typename T>\nint Index_<T>::radiusSearch(const Mat& query, Mat& indices, Mat& dists, DistanceType radius, const ::cvflann::SearchParams& searchParams)\n{\n    CV_Assert(query.type() == CvType<ElementType>::type());\n    CV_Assert(query.isContinuous());\n    ::cvflann::Matrix<ElementType> m_query((ElementType*)query.ptr<ElementType>(0), query.rows, query.cols);\n\n    CV_Assert(indices.type() == CV_32S);\n    CV_Assert(indices.isContinuous());\n    ::cvflann::Matrix<int> m_indices((int*)indices.ptr<int>(0), indices.rows, indices.cols);\n\n    CV_Assert(dists.type() == CvType<DistanceType>::type());\n    CV_Assert(dists.isContinuous());\n    ::cvflann::Matrix<DistanceType> m_dists((DistanceType*)dists.ptr<DistanceType>(0), dists.rows, dists.cols);\n\n    if (nnIndex_L1) return nnIndex_L1->radiusSearch(m_query,m_indices,m_dists,radius,searchParams);\n    if (nnIndex_L2) return nnIndex_L2->radiusSearch(m_query,m_indices,m_dists,radius,searchParams);\n}\n\n//! @endcond\n\n/** @brief Clusters features using hierarchical k-means algorithm.\n\n@param features The points to be clustered. The matrix must have elements of type\nDistance::ElementType.\n@param centers The centers of the clusters obtained. The matrix must have type\nDistance::ResultType. The number of rows in this matrix represents the number of clusters desired,\nhowever, because of the way the cut in the hierarchical tree is chosen, the number of clusters\ncomputed will be the highest number of the form (branching-1)\\*k+1 that's lower than the number of\nclusters desired, where branching is the tree's branching factor (see description of the\nKMeansIndexParams).\n@param params Parameters used in the construction of the hierarchical k-means tree.\n@param d Distance to be used for clustering.\n\nThe method clusters the given feature vectors by constructing a hierarchical k-means tree and\nchoosing a cut in the tree that minimizes the cluster's variance. It returns the number of clusters\nfound.\n */\ntemplate <typename Distance>\nint hierarchicalClustering(const Mat& features, Mat& centers, const ::cvflann::KMeansIndexParams& params,\n                           Distance d = Distance())\n{\n    typedef typename Distance::ElementType ElementType;\n    typedef typename Distance::ResultType DistanceType;\n\n    CV_Assert(features.type() == CvType<ElementType>::type());\n    CV_Assert(features.isContinuous());\n    ::cvflann::Matrix<ElementType> m_features((ElementType*)features.ptr<ElementType>(0), features.rows, features.cols);\n\n    CV_Assert(centers.type() == CvType<DistanceType>::type());\n    CV_Assert(centers.isContinuous());\n    ::cvflann::Matrix<DistanceType> m_centers((DistanceType*)centers.ptr<DistanceType>(0), centers.rows, centers.cols);\n\n    return ::cvflann::hierarchicalClustering<Distance>(m_features, m_centers, params, d);\n}\n\n/** @deprecated\n*/\ntemplate <typename ELEM_TYPE, typename DIST_TYPE>\nFLANN_DEPRECATED int hierarchicalClustering(const Mat& features, Mat& centers, const ::cvflann::KMeansIndexParams& params)\n{\n    printf(\"[WARNING] cv::flann::hierarchicalClustering<ELEM_TYPE,DIST_TYPE> is deprecated, use \"\n        \"cv::flann::hierarchicalClustering<Distance> instead\\n\");\n\n    if ( ::cvflann::flann_distance_type() == cvflann::FLANN_DIST_L2 ) {\n        return hierarchicalClustering< L2<ELEM_TYPE> >(features, centers, params);\n    }\n    else if ( ::cvflann::flann_distance_type() == cvflann::FLANN_DIST_L1 ) {\n        return hierarchicalClustering< L1<ELEM_TYPE> >(features, centers, params);\n    }\n    else {\n        printf(\"[ERROR] cv::flann::hierarchicalClustering<ELEM_TYPE,DIST_TYPE> only provides backwards \"\n        \"compatibility for the L1 and L2 distances. \"\n        \"For other distance types you must use cv::flann::hierarchicalClustering<Distance>\\n\");\n        CV_Assert(0);\n    }\n}\n\n//! @} flann\n\n} } // namespace cv::flann\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/hal/defs.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_DEF_H__\n#define __OPENCV_DEF_H__\n\n#if !defined _CRT_SECURE_NO_DEPRECATE && defined _MSC_VER && _MSC_VER > 1300\n#  define _CRT_SECURE_NO_DEPRECATE /* to avoid multiple Visual Studio warnings */\n#endif\n\n#include <limits.h>\n\n#if defined __ICL\n#  define CV_ICC   __ICL\n#elif defined __ICC\n#  define CV_ICC   __ICC\n#elif defined __ECL\n#  define CV_ICC   __ECL\n#elif defined __ECC\n#  define CV_ICC   __ECC\n#elif defined __INTEL_COMPILER\n#  define CV_ICC   __INTEL_COMPILER\n#endif\n\n#ifndef CV_INLINE\n#  if defined __cplusplus\n#    define CV_INLINE static inline\n#  elif defined _MSC_VER\n#    define CV_INLINE __inline\n#  else\n#    define CV_INLINE static\n#  endif\n#endif\n\n#if defined CV_ICC && !defined CV_ENABLE_UNROLLED\n#  define CV_ENABLE_UNROLLED 0\n#else\n#  define CV_ENABLE_UNROLLED 1\n#endif\n\n#ifdef __GNUC__\n#  define CV_DECL_ALIGNED(x) __attribute__ ((aligned (x)))\n#elif defined _MSC_VER\n#  define CV_DECL_ALIGNED(x) __declspec(align(x))\n#else\n#  define CV_DECL_ALIGNED(x)\n#endif\n\n/* CPU features and intrinsics support */\n#define CV_CPU_NONE             0\n#define CV_CPU_MMX              1\n#define CV_CPU_SSE              2\n#define CV_CPU_SSE2             3\n#define CV_CPU_SSE3             4\n#define CV_CPU_SSSE3            5\n#define CV_CPU_SSE4_1           6\n#define CV_CPU_SSE4_2           7\n#define CV_CPU_POPCNT           8\n\n#define CV_CPU_AVX              10\n#define CV_CPU_AVX2             11\n#define CV_CPU_FMA3             12\n\n#define CV_CPU_AVX_512F         13\n#define CV_CPU_AVX_512BW        14\n#define CV_CPU_AVX_512CD        15\n#define CV_CPU_AVX_512DQ        16\n#define CV_CPU_AVX_512ER        17\n#define CV_CPU_AVX_512IFMA512   18\n#define CV_CPU_AVX_512PF        19\n#define CV_CPU_AVX_512VBMI      20\n#define CV_CPU_AVX_512VL        21\n\n#define CV_CPU_NEON   100\n\n// when adding to this list remember to update the enum in core/utility.cpp\n#define CV_HARDWARE_MAX_FEATURE 255\n\n// do not include SSE/AVX/NEON headers for NVCC compiler\n#ifndef __CUDACC__\n\n#if defined __SSE2__ || defined _M_X64 || (defined _M_IX86_FP && _M_IX86_FP >= 2)\n#  include <emmintrin.h>\n#  define CV_MMX 1\n#  define CV_SSE 1\n#  define CV_SSE2 1\n#  if defined __SSE3__ || (defined _MSC_VER && _MSC_VER >= 1500)\n#    include <pmmintrin.h>\n#    define CV_SSE3 1\n#  endif\n#  if defined __SSSE3__  || (defined _MSC_VER && _MSC_VER >= 1500)\n#    include <tmmintrin.h>\n#    define CV_SSSE3 1\n#  endif\n#  if defined __SSE4_1__ || (defined _MSC_VER && _MSC_VER >= 1500)\n#    include <smmintrin.h>\n#    define CV_SSE4_1 1\n#  endif\n#  if defined __SSE4_2__ || (defined _MSC_VER && _MSC_VER >= 1500)\n#    include <nmmintrin.h>\n#    define CV_SSE4_2 1\n#  endif\n#  if defined __POPCNT__ || (defined _MSC_VER && _MSC_VER >= 1500)\n#    ifdef _MSC_VER\n#      include <nmmintrin.h>\n#    else\n#      include <popcntintrin.h>\n#    endif\n#    define CV_POPCNT 1\n#  endif\n#  if defined __AVX__ || (defined _MSC_VER && _MSC_VER >= 1600 && 0)\n// MS Visual Studio 2010 (2012?) has no macro pre-defined to identify the use of /arch:AVX\n// See: http://connect.microsoft.com/VisualStudio/feedback/details/605858/arch-avx-should-define-a-predefined-macro-in-x64-and-set-a-unique-value-for-m-ix86-fp-in-win32\n#    include <immintrin.h>\n#    define CV_AVX 1\n#    if defined(_XCR_XFEATURE_ENABLED_MASK)\n#      define __xgetbv() _xgetbv(_XCR_XFEATURE_ENABLED_MASK)\n#    else\n#      define __xgetbv() 0\n#    endif\n#  endif\n#  if defined __AVX2__ || (defined _MSC_VER && _MSC_VER >= 1800 && 0)\n#    include <immintrin.h>\n#    define CV_AVX2 1\n#    if defined __FMA__\n#      define CV_FMA3 1\n#    endif\n#  endif\n#endif\n\n#if (defined WIN32 || defined _WIN32) && defined(_M_ARM)\n# include <Intrin.h>\n# include \"arm_neon.h\"\n# define CV_NEON 1\n# define CPU_HAS_NEON_FEATURE (true)\n#elif defined(__ARM_NEON__) || (defined (__ARM_NEON) && defined(__aarch64__))\n#  include <arm_neon.h>\n#  define CV_NEON 1\n#endif\n\n#if defined __GNUC__ && defined __arm__ && (defined __ARM_PCS_VFP || defined __ARM_VFPV3__)\n#  define CV_VFP 1\n#endif\n\n#endif // __CUDACC__\n\n#ifndef CV_POPCNT\n#define CV_POPCNT 0\n#endif\n#ifndef CV_MMX\n#  define CV_MMX 0\n#endif\n#ifndef CV_SSE\n#  define CV_SSE 0\n#endif\n#ifndef CV_SSE2\n#  define CV_SSE2 0\n#endif\n#ifndef CV_SSE3\n#  define CV_SSE3 0\n#endif\n#ifndef CV_SSSE3\n#  define CV_SSSE3 0\n#endif\n#ifndef CV_SSE4_1\n#  define CV_SSE4_1 0\n#endif\n#ifndef CV_SSE4_2\n#  define CV_SSE4_2 0\n#endif\n#ifndef CV_AVX\n#  define CV_AVX 0\n#endif\n#ifndef CV_AVX2\n#  define CV_AVX2 0\n#endif\n#ifndef CV_FMA3\n#  define CV_FMA3 0\n#endif\n#ifndef CV_AVX_512F\n#  define CV_AVX_512F 0\n#endif\n#ifndef CV_AVX_512BW\n#  define CV_AVX_512BW 0\n#endif\n#ifndef CV_AVX_512CD\n#  define CV_AVX_512CD 0\n#endif\n#ifndef CV_AVX_512DQ\n#  define CV_AVX_512DQ 0\n#endif\n#ifndef CV_AVX_512ER\n#  define CV_AVX_512ER 0\n#endif\n#ifndef CV_AVX_512IFMA512\n#  define CV_AVX_512IFMA512 0\n#endif\n#ifndef CV_AVX_512PF\n#  define CV_AVX_512PF 0\n#endif\n#ifndef CV_AVX_512VBMI\n#  define CV_AVX_512VBMI 0\n#endif\n#ifndef CV_AVX_512VL\n#  define CV_AVX_512VL 0\n#endif\n\n#ifndef CV_NEON\n#  define CV_NEON 0\n#endif\n\n#ifndef CV_VFP\n#  define CV_VFP 0\n#endif\n\n/* primitive types */\n/*\n  schar  - signed 1 byte integer\n  uchar  - unsigned 1 byte integer\n  short  - signed 2 byte integer\n  ushort - unsigned 2 byte integer\n  int    - signed 4 byte integer\n  uint   - unsigned 4 byte integer\n  int64  - signed 8 byte integer\n  uint64 - unsigned 8 byte integer\n*/\n\n#if !defined _MSC_VER && !defined __BORLANDC__\n#  if defined __cplusplus && __cplusplus >= 201103L\n#    include <cstdint>\n     typedef std::uint32_t uint;\n#  else\n#    include <stdint.h>\n     typedef uint32_t uint;\n#  endif\n#else\n   typedef unsigned uint;\n#endif\n\ntypedef signed char schar;\n\n#ifndef __IPL_H__\n   typedef unsigned char uchar;\n   typedef unsigned short ushort;\n#endif\n\n#if defined _MSC_VER || defined __BORLANDC__\n   typedef __int64 int64;\n   typedef unsigned __int64 uint64;\n#  define CV_BIG_INT(n)   n##I64\n#  define CV_BIG_UINT(n)  n##UI64\n#else\n   typedef int64_t int64;\n   typedef uint64_t uint64;\n#  define CV_BIG_INT(n)   n##LL\n#  define CV_BIG_UINT(n)  n##ULL\n#endif\n\n/* fundamental constants */\n#define CV_PI   3.1415926535897932384626433832795\n#define CV_2PI 6.283185307179586476925286766559\n#define CV_LOG2 0.69314718055994530941723212145818\n\ntypedef union Cv32suf\n{\n    int i;\n    unsigned u;\n    float f;\n}\nCv32suf;\n\ntypedef union Cv64suf\n{\n    int64 i;\n    uint64 u;\n    double f;\n}\nCv64suf;\n\n\n/****************************************************************************************\\\n*                                      fast math                                         *\n\\****************************************************************************************/\n\n#if defined __BORLANDC__\n#  include <fastmath.h>\n#elif defined __cplusplus\n#  include <cmath>\n#else\n#  include <math.h>\n#endif\n\n#ifdef HAVE_TEGRA_OPTIMIZATION\n#  include \"tegra_round.hpp\"\n#endif\n\n//! @addtogroup core_utils\n//! @{\n\n#if CV_VFP\n    // 1. general scheme\n    #define ARM_ROUND(_value, _asm_string) \\\n        int res; \\\n        float temp; \\\n        asm(_asm_string : [res] \"=r\" (res), [temp] \"=w\" (temp) : [value] \"w\" (_value)); \\\n        return res\n    // 2. version for double\n    #ifdef __clang__\n        #define ARM_ROUND_DBL(value) ARM_ROUND(value, \"vcvtr.s32.f64 %[temp], %[value] \\n vmov %[res], %[temp]\")\n    #else\n        #define ARM_ROUND_DBL(value) ARM_ROUND(value, \"vcvtr.s32.f64 %[temp], %P[value] \\n vmov %[res], %[temp]\")\n    #endif\n    // 3. version for float\n    #define ARM_ROUND_FLT(value) ARM_ROUND(value, \"vcvtr.s32.f32 %[temp], %[value]\\n vmov %[res], %[temp]\")\n#endif // CV_VFP\n\n/** @brief Rounds floating-point number to the nearest integer\n\n @param value floating-point number. If the value is outside of INT_MIN ... INT_MAX range, the\n result is not defined.\n */\nCV_INLINE int\ncvRound( double value )\n{\n#if ((defined _MSC_VER && defined _M_X64) || (defined __GNUC__ && defined __x86_64__ \\\n    && defined __SSE2__ && !defined __APPLE__)) && !defined(__CUDACC__)\n    __m128d t = _mm_set_sd( value );\n    return _mm_cvtsd_si32(t);\n#elif defined _MSC_VER && defined _M_IX86\n    int t;\n    __asm\n    {\n        fld value;\n        fistp t;\n    }\n    return t;\n#elif ((defined _MSC_VER && defined _M_ARM) || defined CV_ICC || \\\n        defined __GNUC__) && defined HAVE_TEGRA_OPTIMIZATION\n    TEGRA_ROUND_DBL(value);\n#elif defined CV_ICC || defined __GNUC__\n# if CV_VFP\n    ARM_ROUND_DBL(value);\n# else\n    return (int)lrint(value);\n# endif\n#else\n    /* it's ok if round does not comply with IEEE754 standard;\n       the tests should allow +/-1 difference when the tested functions use round */\n    return (int)(value + (value >= 0 ? 0.5 : -0.5));\n#endif\n}\n\n\n/** @brief Rounds floating-point number to the nearest integer not larger than the original.\n\n The function computes an integer i such that:\n \\f[i \\le \\texttt{value} < i+1\\f]\n @param value floating-point number. If the value is outside of INT_MIN ... INT_MAX range, the\n result is not defined.\n */\nCV_INLINE int cvFloor( double value )\n{\n#if (defined _MSC_VER && defined _M_X64 || (defined __GNUC__ && defined __SSE2__ && !defined __APPLE__)) && !defined(__CUDACC__)\n    __m128d t = _mm_set_sd( value );\n    int i = _mm_cvtsd_si32(t);\n    return i - _mm_movemask_pd(_mm_cmplt_sd(t, _mm_cvtsi32_sd(t,i)));\n#elif defined __GNUC__\n    int i = (int)value;\n    return i - (i > value);\n#else\n    int i = cvRound(value);\n    float diff = (float)(value - i);\n    return i - (diff < 0);\n#endif\n}\n\n/** @brief Rounds floating-point number to the nearest integer not larger than the original.\n\n The function computes an integer i such that:\n \\f[i \\le \\texttt{value} < i+1\\f]\n @param value floating-point number. If the value is outside of INT_MIN ... INT_MAX range, the\n result is not defined.\n */\nCV_INLINE int cvCeil( double value )\n{\n#if (defined _MSC_VER && defined _M_X64 || (defined __GNUC__ && defined __SSE2__&& !defined __APPLE__)) && !defined(__CUDACC__)\n    __m128d t = _mm_set_sd( value );\n    int i = _mm_cvtsd_si32(t);\n    return i + _mm_movemask_pd(_mm_cmplt_sd(_mm_cvtsi32_sd(t,i), t));\n#elif defined __GNUC__\n    int i = (int)value;\n    return i + (i < value);\n#else\n    int i = cvRound(value);\n    float diff = (float)(i - value);\n    return i + (diff < 0);\n#endif\n}\n\n/** @brief Determines if the argument is Not A Number.\n\n @param value The input floating-point value\n\n The function returns 1 if the argument is Not A Number (as defined by IEEE754 standard), 0\n otherwise. */\nCV_INLINE int cvIsNaN( double value )\n{\n    Cv64suf ieee754;\n    ieee754.f = value;\n    return ((unsigned)(ieee754.u >> 32) & 0x7fffffff) +\n           ((unsigned)ieee754.u != 0) > 0x7ff00000;\n}\n\n/** @brief Determines if the argument is Infinity.\n\n @param value The input floating-point value\n\n The function returns 1 if the argument is a plus or minus infinity (as defined by IEEE754 standard)\n and 0 otherwise. */\nCV_INLINE int cvIsInf( double value )\n{\n    Cv64suf ieee754;\n    ieee754.f = value;\n    return ((unsigned)(ieee754.u >> 32) & 0x7fffffff) == 0x7ff00000 &&\n            (unsigned)ieee754.u == 0;\n}\n\n#ifdef __cplusplus\n\n/** @overload */\nCV_INLINE int cvRound(float value)\n{\n#if ((defined _MSC_VER && defined _M_X64) || (defined __GNUC__ && defined __x86_64__ && \\\n      defined __SSE2__ && !defined __APPLE__)) && !defined(__CUDACC__)\n    __m128 t = _mm_set_ss( value );\n    return _mm_cvtss_si32(t);\n#elif defined _MSC_VER && defined _M_IX86\n    int t;\n    __asm\n    {\n        fld value;\n        fistp t;\n    }\n    return t;\n#elif ((defined _MSC_VER && defined _M_ARM) || defined CV_ICC || \\\n        defined __GNUC__) && defined HAVE_TEGRA_OPTIMIZATION\n    TEGRA_ROUND_FLT(value);\n#elif defined CV_ICC || defined __GNUC__\n# if CV_VFP\n    ARM_ROUND_FLT(value);\n# else\n    return (int)lrintf(value);\n# endif\n#else\n    /* it's ok if round does not comply with IEEE754 standard;\n     the tests should allow +/-1 difference when the tested functions use round */\n    return (int)(value + (value >= 0 ? 0.5f : -0.5f));\n#endif\n}\n\n/** @overload */\nCV_INLINE int cvRound( int value )\n{\n    return value;\n}\n\n/** @overload */\nCV_INLINE int cvFloor( float value )\n{\n#if (defined _MSC_VER && defined _M_X64 || (defined __GNUC__ && defined __SSE2__ && !defined __APPLE__)) && !defined(__CUDACC__)\n    __m128 t = _mm_set_ss( value );\n    int i = _mm_cvtss_si32(t);\n    return i - _mm_movemask_ps(_mm_cmplt_ss(t, _mm_cvtsi32_ss(t,i)));\n#elif defined __GNUC__\n    int i = (int)value;\n    return i - (i > value);\n#else\n    int i = cvRound(value);\n    float diff = (float)(value - i);\n    return i - (diff < 0);\n#endif\n}\n\n/** @overload */\nCV_INLINE int cvFloor( int value )\n{\n    return value;\n}\n\n/** @overload */\nCV_INLINE int cvCeil( float value )\n{\n#if (defined _MSC_VER && defined _M_X64 || (defined __GNUC__ && defined __SSE2__&& !defined __APPLE__)) && !defined(__CUDACC__)\n    __m128 t = _mm_set_ss( value );\n    int i = _mm_cvtss_si32(t);\n    return i + _mm_movemask_ps(_mm_cmplt_ss(_mm_cvtsi32_ss(t,i), t));\n#elif defined __GNUC__\n    int i = (int)value;\n    return i + (i < value);\n#else\n    int i = cvRound(value);\n    float diff = (float)(i - value);\n    return i + (diff < 0);\n#endif\n}\n\n/** @overload */\nCV_INLINE int cvCeil( int value )\n{\n    return value;\n}\n\n/** @overload */\nCV_INLINE int cvIsNaN( float value )\n{\n    Cv32suf ieee754;\n    ieee754.f = value;\n    return (ieee754.u & 0x7fffffff) > 0x7f800000;\n}\n\n/** @overload */\nCV_INLINE int cvIsInf( float value )\n{\n    Cv32suf ieee754;\n    ieee754.f = value;\n    return (ieee754.u & 0x7fffffff) == 0x7f800000;\n}\n\n#include <algorithm>\n\nnamespace cv\n{\n\n/////////////// saturate_cast (used in image & signal processing) ///////////////////\n\n/**\n Template function for accurate conversion from one primitive type to another.\n\n The functions saturate_cast resemble the standard C++ cast operations, such as static_cast\\<T\\>()\n and others. They perform an efficient and accurate conversion from one primitive type to another\n (see the introduction chapter). saturate in the name means that when the input value v is out of the\n range of the target type, the result is not formed just by taking low bits of the input, but instead\n the value is clipped. For example:\n @code\n uchar a = saturate_cast<uchar>(-100); // a = 0 (UCHAR_MIN)\n short b = saturate_cast<short>(33333.33333); // b = 32767 (SHRT_MAX)\n @endcode\n Such clipping is done when the target type is unsigned char , signed char , unsigned short or\n signed short . For 32-bit integers, no clipping is done.\n\n When the parameter is a floating-point value and the target type is an integer (8-, 16- or 32-bit),\n the floating-point value is first rounded to the nearest integer and then clipped if needed (when\n the target type is 8- or 16-bit).\n\n This operation is used in the simplest or most complex image processing functions in OpenCV.\n\n @param v Function parameter.\n @sa add, subtract, multiply, divide, Mat::convertTo\n */\ntemplate<typename _Tp> static inline _Tp saturate_cast(uchar v)    { return _Tp(v); }\n/** @overload */\ntemplate<typename _Tp> static inline _Tp saturate_cast(schar v)    { return _Tp(v); }\n/** @overload */\ntemplate<typename _Tp> static inline _Tp saturate_cast(ushort v)   { return _Tp(v); }\n/** @overload */\ntemplate<typename _Tp> static inline _Tp saturate_cast(short v)    { return _Tp(v); }\n/** @overload */\ntemplate<typename _Tp> static inline _Tp saturate_cast(unsigned v) { return _Tp(v); }\n/** @overload */\ntemplate<typename _Tp> static inline _Tp saturate_cast(int v)      { return _Tp(v); }\n/** @overload */\ntemplate<typename _Tp> static inline _Tp saturate_cast(float v)    { return _Tp(v); }\n/** @overload */\ntemplate<typename _Tp> static inline _Tp saturate_cast(double v)   { return _Tp(v); }\n/** @overload */\ntemplate<typename _Tp> static inline _Tp saturate_cast(int64 v)    { return _Tp(v); }\n/** @overload */\ntemplate<typename _Tp> static inline _Tp saturate_cast(uint64 v)   { return _Tp(v); }\n\n//! @cond IGNORED\n\ntemplate<> inline uchar saturate_cast<uchar>(schar v)        { return (uchar)std::max((int)v, 0); }\ntemplate<> inline uchar saturate_cast<uchar>(ushort v)       { return (uchar)std::min((unsigned)v, (unsigned)UCHAR_MAX); }\ntemplate<> inline uchar saturate_cast<uchar>(int v)          { return (uchar)((unsigned)v <= UCHAR_MAX ? v : v > 0 ? UCHAR_MAX : 0); }\ntemplate<> inline uchar saturate_cast<uchar>(short v)        { return saturate_cast<uchar>((int)v); }\ntemplate<> inline uchar saturate_cast<uchar>(unsigned v)     { return (uchar)std::min(v, (unsigned)UCHAR_MAX); }\ntemplate<> inline uchar saturate_cast<uchar>(float v)        { int iv = cvRound(v); return saturate_cast<uchar>(iv); }\ntemplate<> inline uchar saturate_cast<uchar>(double v)       { int iv = cvRound(v); return saturate_cast<uchar>(iv); }\ntemplate<> inline uchar saturate_cast<uchar>(int64 v)        { return (uchar)((uint64)v <= (uint64)UCHAR_MAX ? v : v > 0 ? UCHAR_MAX : 0); }\ntemplate<> inline uchar saturate_cast<uchar>(uint64 v)       { return (uchar)std::min(v, (uint64)UCHAR_MAX); }\n\ntemplate<> inline schar saturate_cast<schar>(uchar v)        { return (schar)std::min((int)v, SCHAR_MAX); }\ntemplate<> inline schar saturate_cast<schar>(ushort v)       { return (schar)std::min((unsigned)v, (unsigned)SCHAR_MAX); }\ntemplate<> inline schar saturate_cast<schar>(int v)          { return (schar)((unsigned)(v-SCHAR_MIN) <= (unsigned)UCHAR_MAX ? v : v > 0 ? SCHAR_MAX : SCHAR_MIN); }\ntemplate<> inline schar saturate_cast<schar>(short v)        { return saturate_cast<schar>((int)v); }\ntemplate<> inline schar saturate_cast<schar>(unsigned v)     { return (schar)std::min(v, (unsigned)SCHAR_MAX); }\ntemplate<> inline schar saturate_cast<schar>(float v)        { int iv = cvRound(v); return saturate_cast<schar>(iv); }\ntemplate<> inline schar saturate_cast<schar>(double v)       { int iv = cvRound(v); return saturate_cast<schar>(iv); }\ntemplate<> inline schar saturate_cast<schar>(int64 v)        { return (schar)((uint64)((int64)v-SCHAR_MIN) <= (uint64)UCHAR_MAX ? v : v > 0 ? SCHAR_MAX : SCHAR_MIN); }\ntemplate<> inline schar saturate_cast<schar>(uint64 v)       { return (schar)std::min(v, (uint64)SCHAR_MAX); }\n\ntemplate<> inline ushort saturate_cast<ushort>(schar v)      { return (ushort)std::max((int)v, 0); }\ntemplate<> inline ushort saturate_cast<ushort>(short v)      { return (ushort)std::max((int)v, 0); }\ntemplate<> inline ushort saturate_cast<ushort>(int v)        { return (ushort)((unsigned)v <= (unsigned)USHRT_MAX ? v : v > 0 ? USHRT_MAX : 0); }\ntemplate<> inline ushort saturate_cast<ushort>(unsigned v)   { return (ushort)std::min(v, (unsigned)USHRT_MAX); }\ntemplate<> inline ushort saturate_cast<ushort>(float v)      { int iv = cvRound(v); return saturate_cast<ushort>(iv); }\ntemplate<> inline ushort saturate_cast<ushort>(double v)     { int iv = cvRound(v); return saturate_cast<ushort>(iv); }\ntemplate<> inline ushort saturate_cast<ushort>(int64 v)      { return (ushort)((uint64)v <= (uint64)USHRT_MAX ? v : v > 0 ? USHRT_MAX : 0); }\ntemplate<> inline ushort saturate_cast<ushort>(uint64 v)     { return (ushort)std::min(v, (uint64)USHRT_MAX); }\n\ntemplate<> inline short saturate_cast<short>(ushort v)       { return (short)std::min((int)v, SHRT_MAX); }\ntemplate<> inline short saturate_cast<short>(int v)          { return (short)((unsigned)(v - SHRT_MIN) <= (unsigned)USHRT_MAX ? v : v > 0 ? SHRT_MAX : SHRT_MIN); }\ntemplate<> inline short saturate_cast<short>(unsigned v)     { return (short)std::min(v, (unsigned)SHRT_MAX); }\ntemplate<> inline short saturate_cast<short>(float v)        { int iv = cvRound(v); return saturate_cast<short>(iv); }\ntemplate<> inline short saturate_cast<short>(double v)       { int iv = cvRound(v); return saturate_cast<short>(iv); }\ntemplate<> inline short saturate_cast<short>(int64 v)        { return (short)((uint64)((int64)v - SHRT_MIN) <= (uint64)USHRT_MAX ? v : v > 0 ? SHRT_MAX : SHRT_MIN); }\ntemplate<> inline short saturate_cast<short>(uint64 v)       { return (short)std::min(v, (uint64)SHRT_MAX); }\n\ntemplate<> inline int saturate_cast<int>(float v)            { return cvRound(v); }\ntemplate<> inline int saturate_cast<int>(double v)           { return cvRound(v); }\n\n// we intentionally do not clip negative numbers, to make -1 become 0xffffffff etc.\ntemplate<> inline unsigned saturate_cast<unsigned>(float v)  { return cvRound(v); }\ntemplate<> inline unsigned saturate_cast<unsigned>(double v) { return cvRound(v); }\n\n//! @endcond\n\n}\n\n#endif // __cplusplus\n\n//! @} core_utils\n\n#endif //__OPENCV_HAL_H__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/hal/intrin.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_HAL_INTRIN_HPP__\n#define __OPENCV_HAL_INTRIN_HPP__\n\n#include <cmath>\n#include <float.h>\n#include <stdlib.h>\n\n#define OPENCV_HAL_ADD(a, b) ((a) + (b))\n#define OPENCV_HAL_AND(a, b) ((a) & (b))\n#define OPENCV_HAL_NOP(a) (a)\n#define OPENCV_HAL_1ST(a, b) (a)\n\n// unlike HAL API, which is in cv::hal,\n// we put intrinsics into cv namespace to make its\n// access from within opencv code more accessible\nnamespace cv {\n\ntemplate<typename _Tp> struct V_TypeTraits\n{\n    typedef _Tp int_type;\n    typedef _Tp uint_type;\n    typedef _Tp abs_type;\n    typedef _Tp sum_type;\n\n    enum { delta = 0, shift = 0 };\n\n    static int_type reinterpret_int(_Tp x) { return x; }\n    static uint_type reinterpet_uint(_Tp x) { return x; }\n    static _Tp reinterpret_from_int(int_type x) { return (_Tp)x; }\n};\n\ntemplate<> struct V_TypeTraits<uchar>\n{\n    typedef uchar value_type;\n    typedef schar int_type;\n    typedef uchar uint_type;\n    typedef uchar abs_type;\n    typedef int sum_type;\n\n    typedef ushort w_type;\n\n    enum { delta = 128, shift = 8 };\n\n    static int_type reinterpret_int(value_type x) { return (int_type)x; }\n    static uint_type reinterpret_uint(value_type x) { return (uint_type)x; }\n    static value_type reinterpret_from_int(int_type x) { return (value_type)x; }\n};\n\ntemplate<> struct V_TypeTraits<schar>\n{\n    typedef schar value_type;\n    typedef schar int_type;\n    typedef uchar uint_type;\n    typedef uchar abs_type;\n    typedef int sum_type;\n\n    typedef short w_type;\n\n    enum { delta = 128, shift = 8 };\n\n    static int_type reinterpret_int(value_type x) { return (int_type)x; }\n    static uint_type reinterpret_uint(value_type x) { return (uint_type)x; }\n    static value_type reinterpret_from_int(int_type x) { return (value_type)x; }\n};\n\ntemplate<> struct V_TypeTraits<ushort>\n{\n    typedef ushort value_type;\n    typedef short int_type;\n    typedef ushort uint_type;\n    typedef ushort abs_type;\n    typedef int sum_type;\n\n    typedef unsigned w_type;\n    typedef uchar nu_type;\n\n    enum { delta = 32768, shift = 16 };\n\n    static int_type reinterpret_int(value_type x) { return (int_type)x; }\n    static uint_type reinterpret_uint(value_type x) { return (uint_type)x; }\n    static value_type reinterpret_from_int(int_type x) { return (value_type)x; }\n};\n\ntemplate<> struct V_TypeTraits<short>\n{\n    typedef short value_type;\n    typedef short int_type;\n    typedef ushort uint_type;\n    typedef ushort abs_type;\n    typedef int sum_type;\n\n    typedef int w_type;\n    typedef uchar nu_type;\n    typedef schar n_type;\n\n    enum { delta = 128, shift = 8 };\n\n    static int_type reinterpret_int(value_type x) { return (int_type)x; }\n    static uint_type reinterpret_uint(value_type x) { return (uint_type)x; }\n    static value_type reinterpret_from_int(int_type x) { return (value_type)x; }\n};\n\ntemplate<> struct V_TypeTraits<unsigned>\n{\n    typedef unsigned value_type;\n    typedef int int_type;\n    typedef unsigned uint_type;\n    typedef unsigned abs_type;\n    typedef unsigned sum_type;\n\n    typedef uint64 w_type;\n    typedef ushort nu_type;\n\n    static int_type reinterpret_int(value_type x) { return (int_type)x; }\n    static uint_type reinterpret_uint(value_type x) { return (uint_type)x; }\n    static value_type reinterpret_from_int(int_type x) { return (value_type)x; }\n};\n\ntemplate<> struct V_TypeTraits<int>\n{\n    typedef int value_type;\n    typedef int int_type;\n    typedef unsigned uint_type;\n    typedef unsigned abs_type;\n    typedef int sum_type;\n\n    typedef int64 w_type;\n    typedef short n_type;\n    typedef ushort nu_type;\n\n    static int_type reinterpret_int(value_type x) { return (int_type)x; }\n    static uint_type reinterpret_uint(value_type x) { return (uint_type)x; }\n    static value_type reinterpret_from_int(int_type x) { return (value_type)x; }\n};\n\ntemplate<> struct V_TypeTraits<uint64>\n{\n    typedef uint64 value_type;\n    typedef int64 int_type;\n    typedef uint64 uint_type;\n    typedef uint64 abs_type;\n    typedef uint64 sum_type;\n\n    typedef unsigned nu_type;\n\n    static int_type reinterpret_int(value_type x) { return (int_type)x; }\n    static uint_type reinterpret_uint(value_type x) { return (uint_type)x; }\n    static value_type reinterpret_from_int(int_type x) { return (value_type)x; }\n};\n\ntemplate<> struct V_TypeTraits<int64>\n{\n    typedef int64 value_type;\n    typedef int64 int_type;\n    typedef uint64 uint_type;\n    typedef uint64 abs_type;\n    typedef int64 sum_type;\n\n    typedef int nu_type;\n\n    static int_type reinterpret_int(value_type x) { return (int_type)x; }\n    static uint_type reinterpret_uint(value_type x) { return (uint_type)x; }\n    static value_type reinterpret_from_int(int_type x) { return (value_type)x; }\n};\n\n\ntemplate<> struct V_TypeTraits<float>\n{\n    typedef float value_type;\n    typedef int int_type;\n    typedef unsigned uint_type;\n    typedef float abs_type;\n    typedef float sum_type;\n\n    typedef double w_type;\n\n    static int_type reinterpret_int(value_type x)\n    {\n        Cv32suf u;\n        u.f = x;\n        return u.i;\n    }\n    static uint_type reinterpet_uint(value_type x)\n    {\n        Cv32suf u;\n        u.f = x;\n        return u.u;\n    }\n    static value_type reinterpret_from_int(int_type x)\n    {\n        Cv32suf u;\n        u.i = x;\n        return u.f;\n    }\n};\n\ntemplate<> struct V_TypeTraits<double>\n{\n    typedef double value_type;\n    typedef int64 int_type;\n    typedef uint64 uint_type;\n    typedef double abs_type;\n    typedef double sum_type;\n    static int_type reinterpret_int(value_type x)\n    {\n        Cv64suf u;\n        u.f = x;\n        return u.i;\n    }\n    static uint_type reinterpet_uint(value_type x)\n    {\n        Cv64suf u;\n        u.f = x;\n        return u.u;\n    }\n    static value_type reinterpret_from_int(int_type x)\n    {\n        Cv64suf u;\n        u.i = x;\n        return u.f;\n    }\n};\n\n}\n\n#if CV_SSE2\n\n#include \"opencv2/hal/intrin_sse.hpp\"\n\n#elif CV_NEON\n\n#include \"opencv2/hal/intrin_neon.hpp\"\n\n#else\n\n#include \"opencv2/hal/intrin_cpp.hpp\"\n\n#endif\n\n#ifndef CV_SIMD128\n#define CV_SIMD128 0\n#endif\n\n#ifndef CV_SIMD128_64F\n#define CV_SIMD128_64F 0\n#endif\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/hal/intrin_cpp.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_HAL_INTRIN_CPP_HPP__\n#define __OPENCV_HAL_INTRIN_CPP_HPP__\n\nnamespace cv\n{\n\ntemplate<typename _Tp, int n> struct v_reg\n{\n    typedef _Tp lane_type;\n    typedef v_reg<typename V_TypeTraits<_Tp>::int_type, n> int_vec;\n    typedef v_reg<typename V_TypeTraits<_Tp>::abs_type, n> abs_vec;\n    enum { nlanes = n };\n\n    explicit v_reg(const _Tp* ptr) { for( int i = 0; i < n; i++ ) s[i] = ptr[i]; }\n    v_reg(_Tp s0, _Tp s1) { s[0] = s0; s[1] = s1; }\n    v_reg(_Tp s0, _Tp s1, _Tp s2, _Tp s3) { s[0] = s0; s[1] = s1; s[2] = s2; s[3] = s3; }\n    v_reg(_Tp s0, _Tp s1, _Tp s2, _Tp s3,\n           _Tp s4, _Tp s5, _Tp s6, _Tp s7)\n    {\n        s[0] = s0; s[1] = s1; s[2] = s2; s[3] = s3;\n        s[4] = s4; s[5] = s5; s[6] = s6; s[7] = s7;\n    }\n    v_reg(_Tp s0, _Tp s1, _Tp s2, _Tp s3,\n           _Tp s4, _Tp s5, _Tp s6, _Tp s7,\n           _Tp s8, _Tp s9, _Tp s10, _Tp s11,\n           _Tp s12, _Tp s13, _Tp s14, _Tp s15)\n    {\n        s[0] = s0; s[1] = s1; s[2] = s2; s[3] = s3;\n        s[4] = s4; s[5] = s5; s[6] = s6; s[7] = s7;\n        s[8] = s8; s[9] = s9; s[10] = s10; s[11] = s11;\n        s[12] = s12; s[13] = s13; s[14] = s14; s[15] = s15;\n    }\n\n    v_reg() {}\n    v_reg(const v_reg<_Tp, n> & r)\n    {\n        for( int i = 0; i < n; i++ )\n            s[i] = r.s[i];\n    }\n\n    _Tp get(const int i) const { return s[i]; }\n    _Tp get0() const { return s[0]; }\n    v_reg<_Tp, n> high() const\n    {\n        v_reg<_Tp, n> c;\n        int i;\n        for( i = 0; i < n/2; i++ )\n        {\n            c.s[i] = s[i+(n/2)];\n            c.s[i+(n/2)] = 0;\n        }\n        return c;\n    }\n\n    static v_reg<_Tp, n> zero()\n    {\n        v_reg<_Tp, n> c;\n        for( int i = 0; i < n; i++ )\n            c.s[i] = (_Tp)0;\n        return c;\n    }\n\n    static v_reg<_Tp, n> all(_Tp s)\n    {\n        v_reg<_Tp, n> c;\n        for( int i = 0; i < n; i++ )\n            c.s[i] = s;\n        return c;\n    }\n\n    template<typename _Tp2, int n2> v_reg<_Tp2, n2> reinterpret_as() const\n    {\n        size_t bytes = std::min(sizeof(_Tp2)*n2, sizeof(_Tp)*n);\n        v_reg<_Tp2, n2> c;\n        memcpy(&c.s[0], &s[0], bytes);\n        return c;\n    }\n\n    _Tp s[n];\n};\n\n#define OPENCV_HAL_IMPL_BIN_OP(bin_op) \\\ntemplate<typename _Tp, int n> inline v_reg<_Tp, n> \\\n    operator bin_op (const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \\\n{ \\\n    v_reg<_Tp, n> c; \\\n    for( int i = 0; i < n; i++ ) \\\n        c.s[i] = saturate_cast<_Tp>(a.s[i] bin_op b.s[i]); \\\n    return c; \\\n} \\\ntemplate<typename _Tp, int n> inline v_reg<_Tp, n>& \\\n    operator bin_op##= (v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \\\n{ \\\n    for( int i = 0; i < n; i++ ) \\\n        a.s[i] = saturate_cast<_Tp>(a.s[i] bin_op b.s[i]); \\\n    return a; \\\n}\n\nOPENCV_HAL_IMPL_BIN_OP(+)\nOPENCV_HAL_IMPL_BIN_OP(-)\nOPENCV_HAL_IMPL_BIN_OP(*)\nOPENCV_HAL_IMPL_BIN_OP(/)\n\n#define OPENCV_HAL_IMPL_BIT_OP(bit_op) \\\ntemplate<typename _Tp, int n> inline v_reg<_Tp, n> operator bit_op \\\n    (const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \\\n{ \\\n    v_reg<_Tp, n> c; \\\n    typedef typename V_TypeTraits<_Tp>::int_type itype; \\\n    for( int i = 0; i < n; i++ ) \\\n        c.s[i] = V_TypeTraits<_Tp>::reinterpret_from_int((itype)(V_TypeTraits<_Tp>::reinterpret_int(a.s[i]) bit_op \\\n                                                        V_TypeTraits<_Tp>::reinterpret_int(b.s[i]))); \\\n    return c; \\\n} \\\ntemplate<typename _Tp, int n> inline v_reg<_Tp, n>& operator \\\n    bit_op##= (v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \\\n{ \\\n    typedef typename V_TypeTraits<_Tp>::int_type itype; \\\n    for( int i = 0; i < n; i++ ) \\\n        a.s[i] = V_TypeTraits<_Tp>::reinterpret_from_int((itype)(V_TypeTraits<_Tp>::reinterpret_int(a.s[i]) bit_op \\\n                                                        V_TypeTraits<_Tp>::reinterpret_int(b.s[i]))); \\\n    return a; \\\n}\n\nOPENCV_HAL_IMPL_BIT_OP(&)\nOPENCV_HAL_IMPL_BIT_OP(|)\nOPENCV_HAL_IMPL_BIT_OP(^)\n\ntemplate<typename _Tp, int n> inline v_reg<_Tp, n> operator ~ (const v_reg<_Tp, n>& a)\n{\n    v_reg<_Tp, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = V_TypeTraits<_Tp>::reinterpret_from_int(~V_TypeTraits<_Tp>::reinterpret_int(a.s[i]));\n        return c;\n}\n\n#define OPENCV_HAL_IMPL_MATH_FUNC(func, cfunc, _Tp2) \\\ntemplate<typename _Tp, int n> inline v_reg<_Tp2, n> func(const v_reg<_Tp, n>& a) \\\n{ \\\n    v_reg<_Tp2, n> c; \\\n    for( int i = 0; i < n; i++ ) \\\n        c.s[i] = cfunc(a.s[i]); \\\n    return c; \\\n}\n\nOPENCV_HAL_IMPL_MATH_FUNC(v_sqrt, std::sqrt, _Tp)\nOPENCV_HAL_IMPL_MATH_FUNC(v_sin, std::sin, _Tp)\nOPENCV_HAL_IMPL_MATH_FUNC(v_cos, std::cos, _Tp)\nOPENCV_HAL_IMPL_MATH_FUNC(v_exp, std::exp, _Tp)\nOPENCV_HAL_IMPL_MATH_FUNC(v_log, std::log, _Tp)\nOPENCV_HAL_IMPL_MATH_FUNC(v_abs, (typename V_TypeTraits<_Tp>::abs_type)std::abs,\n                          typename V_TypeTraits<_Tp>::abs_type)\nOPENCV_HAL_IMPL_MATH_FUNC(v_round, cvRound, int)\nOPENCV_HAL_IMPL_MATH_FUNC(v_floor, cvFloor, int)\nOPENCV_HAL_IMPL_MATH_FUNC(v_ceil, cvCeil, int)\nOPENCV_HAL_IMPL_MATH_FUNC(v_trunc, int, int)\n\n#define OPENCV_HAL_IMPL_MINMAX_FUNC(func, hfunc, cfunc) \\\ntemplate<typename _Tp, int n> inline v_reg<_Tp, n> func(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \\\n{ \\\n    v_reg<_Tp, n> c; \\\n    for( int i = 0; i < n; i++ ) \\\n        c.s[i] = cfunc(a.s[i], b.s[i]); \\\n    return c; \\\n} \\\ntemplate<typename _Tp, int n> inline _Tp hfunc(const v_reg<_Tp, n>& a) \\\n{ \\\n    _Tp c = a.s[0]; \\\n    for( int i = 1; i < n; i++ ) \\\n        c = cfunc(c, a.s[i]); \\\n    return c; \\\n}\n\nOPENCV_HAL_IMPL_MINMAX_FUNC(v_min, v_reduce_min, std::min)\nOPENCV_HAL_IMPL_MINMAX_FUNC(v_max, v_reduce_max, std::max)\n\ntemplate<typename _Tp, int n>\ninline void v_minmax( const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b,\n                      v_reg<_Tp, n>& minval, v_reg<_Tp, n>& maxval )\n{\n    for( int i = 0; i < n; i++ )\n    {\n        minval.s[i] = std::min(a.s[i], b.s[i]);\n        maxval.s[i] = std::max(a.s[i], b.s[i]);\n    }\n}\n\n\n#define OPENCV_HAL_IMPL_CMP_OP(cmp_op) \\\ntemplate<typename _Tp, int n> \\\ninline v_reg<_Tp, n> operator cmp_op(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \\\n{ \\\n    typedef typename V_TypeTraits<_Tp>::int_type itype; \\\n    v_reg<_Tp, n> c; \\\n    for( int i = 0; i < n; i++ ) \\\n        c.s[i] = V_TypeTraits<_Tp>::reinterpret_from_int((itype)-(int)(a.s[i] cmp_op b.s[i])); \\\n    return c; \\\n}\n\nOPENCV_HAL_IMPL_CMP_OP(<)\nOPENCV_HAL_IMPL_CMP_OP(>)\nOPENCV_HAL_IMPL_CMP_OP(<=)\nOPENCV_HAL_IMPL_CMP_OP(>=)\nOPENCV_HAL_IMPL_CMP_OP(==)\nOPENCV_HAL_IMPL_CMP_OP(!=)\n\n#define OPENCV_HAL_IMPL_ADD_SUB_OP(func, bin_op, cast_op, _Tp2) \\\ntemplate<typename _Tp, int n> \\\ninline v_reg<_Tp2, n> func(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \\\n{ \\\n    typedef _Tp2 rtype; \\\n    v_reg<rtype, n> c; \\\n    for( int i = 0; i < n; i++ ) \\\n        c.s[i] = cast_op(a.s[i] bin_op b.s[i]); \\\n    return c; \\\n}\n\nOPENCV_HAL_IMPL_ADD_SUB_OP(v_add_wrap, +, (_Tp), _Tp)\nOPENCV_HAL_IMPL_ADD_SUB_OP(v_sub_wrap, -, (_Tp), _Tp)\nOPENCV_HAL_IMPL_ADD_SUB_OP(v_absdiff, -, (rtype)std::abs, typename V_TypeTraits<_Tp>::abs_type)\n\ntemplate<typename _Tp, int n>\ninline v_reg<_Tp, n> v_invsqrt(const v_reg<_Tp, n>& a)\n{\n    v_reg<_Tp, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = 1.f/std::sqrt(a.s[i]);\n    return c;\n}\n\ntemplate<typename _Tp, int n>\ninline v_reg<_Tp, n> v_magnitude(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b)\n{\n    v_reg<_Tp, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = std::sqrt(a.s[i]*a.s[i] + b.s[i]*b.s[i]);\n    return c;\n}\n\n\ntemplate<typename _Tp, int n>\ninline v_reg<_Tp, n> v_sqr_magnitude(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b)\n{\n    v_reg<_Tp, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = a.s[i]*a.s[i] + b.s[i]*b.s[i];\n    return c;\n}\n\ntemplate<typename _Tp, int n>\ninline v_reg<_Tp, n> v_muladd(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b,\n                              const v_reg<_Tp, n>& c)\n{\n    v_reg<_Tp, n> d;\n    for( int i = 0; i < n; i++ )\n        d.s[i] = a.s[i]*b.s[i] + c.s[i];\n    return d;\n}\n\ntemplate<typename _Tp, int n> inline v_reg<typename V_TypeTraits<_Tp>::w_type, n/2>\n    v_dotprod(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b)\n{\n    typedef typename V_TypeTraits<_Tp>::w_type w_type;\n    v_reg<w_type, n/2> c;\n    for( int i = 0; i < (n/2); i++ )\n        c.s[i] = (w_type)a.s[i*2]*b.s[i*2] + (w_type)a.s[i*2+1]*b.s[i*2+1];\n    return c;\n}\n\ntemplate<typename _Tp, int n> inline void v_mul_expand(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b,\n                                                       v_reg<typename V_TypeTraits<_Tp>::w_type, n/2>& c,\n                                                       v_reg<typename V_TypeTraits<_Tp>::w_type, n/2>& d)\n{\n    typedef typename V_TypeTraits<_Tp>::w_type w_type;\n    for( int i = 0; i < (n/2); i++ )\n    {\n        c.s[i] = (w_type)a.s[i]*b.s[i]*2;\n        d.s[i] = (w_type)a.s[i+(n/2)]*b.s[i+(n/2)];\n    }\n}\n\ntemplate<typename _Tp, int n> inline void v_hsum(const v_reg<_Tp, n>& a,\n                                                 v_reg<typename V_TypeTraits<_Tp>::w_type, n/2>& c)\n{\n    typedef typename V_TypeTraits<_Tp>::w_type w_type;\n    for( int i = 0; i < (n/2); i++ )\n    {\n        c.s[i] = (w_type)a.s[i*2] + a.s[i*2+1];\n    }\n}\n\n#define OPENCV_HAL_IMPL_SHIFT_OP(shift_op) \\\ntemplate<typename _Tp, int n> inline v_reg<_Tp, n> operator shift_op(const v_reg<_Tp, n>& a, int imm) \\\n{ \\\n    v_reg<_Tp, n> c; \\\n    for( int i = 0; i < n; i++ ) \\\n        c.s[i] = (_Tp)(a.s[i] shift_op imm); \\\n    return c; \\\n}\n\nOPENCV_HAL_IMPL_SHIFT_OP(<<)\nOPENCV_HAL_IMPL_SHIFT_OP(>>)\n\ntemplate<typename _Tp, int n> inline typename V_TypeTraits<_Tp>::sum_type v_reduce_sum(const v_reg<_Tp, n>& a)\n{\n    typename V_TypeTraits<_Tp>::sum_type c = a.s[0];\n    for( int i = 1; i < n; i++ )\n        c += a.s[i];\n    return c;\n}\n\ntemplate<typename _Tp, int n> inline int v_signmask(const v_reg<_Tp, n>& a)\n{\n    int mask = 0;\n    for( int i = 0; i < n; i++ )\n        mask |= (V_TypeTraits<_Tp>::reinterpret_int(a.s[i]) < 0) << i;\n    return mask;\n}\n\ntemplate<typename _Tp, int n> inline bool v_check_all(const v_reg<_Tp, n>& a)\n{\n    for( int i = 0; i < n; i++ )\n        if( V_TypeTraits<_Tp>::reinterpret_int(a.s[i]) >= 0 )\n            return false;\n    return true;\n}\n\ntemplate<typename _Tp, int n> inline bool v_check_any(const v_reg<_Tp, n>& a)\n{\n    for( int i = 0; i < n; i++ )\n        if( V_TypeTraits<_Tp>::reinterpret_int(a.s[i]) < 0 )\n            return true;\n    return false;\n}\n\ntemplate<typename _Tp, int n> inline v_reg<_Tp, n> v_select(const v_reg<_Tp, n>& mask,\n                                                           const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b)\n{\n    v_reg<_Tp, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = V_TypeTraits<_Tp>::reinterpret_int(mask.s[i]) < 0 ? b.s[i] : a.s[i];\n    return c;\n}\n\ntemplate<typename _Tp, int n> inline void v_expand(const v_reg<_Tp, n>& a,\n                            v_reg<typename V_TypeTraits<_Tp>::w_type, n/2>& b0,\n                            v_reg<typename V_TypeTraits<_Tp>::w_type, n/2>& b1)\n{\n    for( int i = 0; i < (n/2); i++ )\n    {\n        b0.s[i] = a.s[i];\n        b1.s[i] = a.s[i+(n/2)];\n    }\n}\n\ntemplate<typename _Tp, int n> inline v_reg<typename V_TypeTraits<_Tp>::int_type, n>\n    v_reinterpret_as_int(const v_reg<_Tp, n>& a)\n{\n    v_reg<typename V_TypeTraits<_Tp>::int_type, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = V_TypeTraits<_Tp>::reinterpret_int(a.s[i]);\n    return c;\n}\n\ntemplate<typename _Tp, int n> inline v_reg<typename V_TypeTraits<_Tp>::uint_type, n>\n    v_reinterpret_as_uint(const v_reg<_Tp, n>& a)\n{\n    v_reg<typename V_TypeTraits<_Tp>::uint_type, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = V_TypeTraits<_Tp>::reinterpret_uint(a.s[i]);\n    return c;\n}\n\ntemplate<typename _Tp, int n> inline void v_zip( const v_reg<_Tp, n>& a0, const v_reg<_Tp, n>& a1,\n                                               v_reg<_Tp, n>& b0, v_reg<_Tp, n>& b1 )\n{\n    int i;\n    for( i = 0; i < n/2; i++ )\n    {\n        b0.s[i*2] = a0.s[i];\n        b0.s[i*2+1] = a1.s[i];\n    }\n    for( ; i < n; i++ )\n    {\n        b1.s[i*2-n] = a0.s[i];\n        b1.s[i*2-n+1] = a1.s[i];\n    }\n}\n\ntemplate<typename _Tp, int n> inline v_reg<_Tp, n> v_load(const _Tp* ptr)\n{\n    return v_reg<_Tp, n>(ptr);\n}\n\ntemplate<typename _Tp, int n> inline v_reg<_Tp, n> v_load_aligned(const _Tp* ptr)\n{\n    return v_reg<_Tp, n>(ptr);\n}\n\ntemplate<typename _Tp, int n> inline void v_load_halves(const _Tp* loptr, const _Tp* hiptr)\n{\n    v_reg<_Tp, n> c;\n    for( int i = 0; i < n/2; i++ )\n    {\n        c.s[i] = loptr[i];\n        c.s[i+n/2] = hiptr[i];\n    }\n    return c;\n}\n\ntemplate<typename _Tp, int n> inline v_reg<typename V_TypeTraits<_Tp>::w_type, n> v_load_expand(const _Tp* ptr)\n{\n    typedef typename V_TypeTraits<_Tp>::w_type w_type;\n    v_reg<w_type, n> c;\n    for( int i = 0; i < n; i++ )\n    {\n        c.s[i] = ptr[i];\n    }\n    return c;\n}\n\ntemplate<typename _Tp, int n> inline v_reg<typename\n    V_TypeTraits<typename V_TypeTraits<_Tp>::w_type>::w_type, n> v_load_expand_q(const _Tp* ptr)\n{\n    typedef typename V_TypeTraits<typename V_TypeTraits<_Tp>::w_type>::w_type w_type;\n    v_reg<w_type, n> c;\n    for( int i = 0; i < n; i++ )\n    {\n        c.s[i] = ptr[i];\n    }\n    return c;\n}\n\ntemplate<typename _Tp, int n> inline void v_load_deinterleave(const _Tp* ptr, v_reg<_Tp, n>& a,\n                                                            v_reg<_Tp, n>& b, v_reg<_Tp, n>& c)\n{\n    int i, i3;\n    for( i = i3 = 0; i < n; i++, i3 += 3 )\n    {\n        a.s[i] = ptr[i3];\n        b.s[i] = ptr[i3+1];\n        c.s[i] = ptr[i3+2];\n    }\n}\n\ntemplate<typename _Tp, int n>\ninline void v_load_deinterleave(const _Tp* ptr, v_reg<_Tp, n>& a,\n                                v_reg<_Tp, n>& b, v_reg<_Tp, n>& c,\n                                v_reg<_Tp, n>& d)\n{\n    int i, i4;\n    for( i = i4 = 0; i < n; i++, i4 += 4 )\n    {\n        a.s[i] = ptr[i4];\n        b.s[i] = ptr[i4+1];\n        c.s[i] = ptr[i4+2];\n        d.s[i] = ptr[i4+3];\n    }\n}\n\ntemplate<typename _Tp, int n>\ninline void v_store_interleave( _Tp* ptr, const v_reg<_Tp, n>& a,\n                                const v_reg<_Tp, n>& b, const v_reg<_Tp, n>& c)\n{\n    int i, i3;\n    for( i = i3 = 0; i < n; i++, i3 += 3 )\n    {\n        ptr[i3] = a.s[i];\n        ptr[i3+1] = b.s[i];\n        ptr[i3+2] = c.s[i];\n    }\n}\n\ntemplate<typename _Tp, int n> inline void v_store_interleave( _Tp* ptr, const v_reg<_Tp, n>& a,\n                                                            const v_reg<_Tp, n>& b, const v_reg<_Tp, n>& c,\n                                                            const v_reg<_Tp, n>& d)\n{\n    int i, i4;\n    for( i = i4 = 0; i < n; i++, i4 += 4 )\n    {\n        ptr[i4] = a.s[i];\n        ptr[i4+1] = b.s[i];\n        ptr[i4+2] = c.s[i];\n        ptr[i4+3] = d.s[i];\n    }\n}\n\ntemplate<typename _Tp, int n>\ninline void v_store(_Tp* ptr, const v_reg<_Tp, n>& a)\n{\n    for( int i = 0; i < n; i++ )\n        ptr[i] = a.s[i];\n}\n\ntemplate<typename _Tp, int n>\ninline void v_store_low(_Tp* ptr, const v_reg<_Tp, n>& a)\n{\n    for( int i = 0; i < (n/2); i++ )\n        ptr[i] = a.s[i];\n}\n\ntemplate<typename _Tp, int n>\ninline void v_store_high(_Tp* ptr, const v_reg<_Tp, n>& a)\n{\n    for( int i = 0; i < (n/2); i++ )\n        ptr[i] = a.s[i+(n/2)];\n}\n\ntemplate<typename _Tp, int n>\ninline void v_store_aligned(_Tp* ptr, const v_reg<_Tp, n>& a)\n{\n    for( int i = 0; i < n; i++ )\n        ptr[i] = a.s[i];\n}\n\ntemplate<typename _Tp, int n>\ninline v_reg<_Tp, n> v_combine_low(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b)\n{\n    v_reg<_Tp, n> c;\n    for( int i = 0; i < (n/2); i++ )\n    {\n        c.s[i] = a.s[i];\n        c.s[i+(n/2)] = b.s[i];\n    }\n}\n\ntemplate<typename _Tp, int n>\ninline v_reg<_Tp, n> v_combine_high(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b)\n{\n    v_reg<_Tp, n> c;\n    for( int i = 0; i < (n/2); i++ )\n    {\n        c.s[i] = a.s[i+(n/2)];\n        c.s[i+(n/2)] = b.s[i+(n/2)];\n    }\n}\n\ntemplate<typename _Tp, int n>\ninline void v_recombine(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b,\n                        v_reg<_Tp, n>& low, v_reg<_Tp, n>& high)\n{\n    for( int i = 0; i < (n/2); i++ )\n    {\n        low.s[i] = a.s[i];\n        low.s[i+(n/2)] = b.s[i];\n        high.s[i] = a.s[i+(n/2)];\n        high.s[i+(n/2)] = b.s[i+(n/2)];\n    }\n}\n\ntemplate<int n> inline v_reg<int, n> v_round(const v_reg<float, n>& a)\n{\n    v_reg<int, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = cvRound(a.s[i]);\n    return c;\n}\n\ntemplate<int n> inline v_reg<int, n> v_floor(const v_reg<float, n>& a)\n{\n    v_reg<int, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = cvFloor(a.s[i]);\n    return c;\n}\n\ntemplate<int n> inline v_reg<int, n> v_ceil(const v_reg<float, n>& a)\n{\n    v_reg<int, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = cvCeil(a.s[i]);\n    return c;\n}\n\ntemplate<int n> inline v_reg<int, n> v_trunc(const v_reg<float, n>& a)\n{\n    v_reg<int, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = (int)(a.s[i]);\n    return c;\n}\n\ntemplate<int n> inline v_reg<int, n*2> v_round(const v_reg<double, n>& a)\n{\n    v_reg<int, n*2> c;\n    for( int i = 0; i < n; i++ )\n    {\n        c.s[i] = cvRound(a.s[i]);\n        c.s[i+n] = 0;\n    }\n    return c;\n}\n\ntemplate<int n> inline v_reg<int, n*2> v_floor(const v_reg<double, n>& a)\n{\n    v_reg<int, n> c;\n    for( int i = 0; i < n; i++ )\n    {\n        c.s[i] = cvFloor(a.s[i]);\n        c.s[i+n] = 0;\n    }\n    return c;\n}\n\ntemplate<int n> inline v_reg<int, n*2> v_ceil(const v_reg<double, n>& a)\n{\n    v_reg<int, n> c;\n    for( int i = 0; i < n; i++ )\n    {\n        c.s[i] = cvCeil(a.s[i]);\n        c.s[i+n] = 0;\n    }\n    return c;\n}\n\ntemplate<int n> inline v_reg<int, n*2> v_trunc(const v_reg<double, n>& a)\n{\n    v_reg<int, n> c;\n    for( int i = 0; i < n; i++ )\n    {\n        c.s[i] = cvCeil(a.s[i]);\n        c.s[i+n] = 0;\n    }\n    return c;\n}\n\ntemplate<int n> inline v_reg<float, n> v_cvt_f32(const v_reg<int, n>& a)\n{\n    v_reg<float, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = (float)a.s[i];\n    return c;\n}\n\ntemplate<int n> inline v_reg<double, n> v_cvt_f64(const v_reg<int, n*2>& a)\n{\n    v_reg<double, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = (double)a.s[i];\n    return c;\n}\n\ntemplate<int n> inline v_reg<double, n> v_cvt_f64(const v_reg<float, n*2>& a)\n{\n    v_reg<double, n> c;\n    for( int i = 0; i < n; i++ )\n        c.s[i] = (double)a.s[i];\n    return c;\n}\n\ntemplate<typename _Tp>\ninline void v_transpose4x4( v_reg<_Tp, 4>& a0, const v_reg<_Tp, 4>& a1,\n                            const v_reg<_Tp, 4>& a2, const v_reg<_Tp, 4>& a3,\n                            v_reg<_Tp, 4>& b0, v_reg<_Tp, 4>& b1,\n                            v_reg<_Tp, 4>& b2, v_reg<_Tp, 4>& b3 )\n{\n    b0 = v_reg<_Tp, 4>(a0.s[0], a1.s[0], a2.s[0], a3.s[0]);\n    b1 = v_reg<_Tp, 4>(a0.s[1], a1.s[1], a2.s[1], a3.s[1]);\n    b2 = v_reg<_Tp, 4>(a0.s[2], a1.s[2], a2.s[2], a3.s[2]);\n    b3 = v_reg<_Tp, 4>(a0.s[3], a1.s[3], a2.s[3], a3.s[3]);\n}\n\ntypedef v_reg<uchar, 16> v_uint8x16;\ntypedef v_reg<schar, 16> v_int8x16;\ntypedef v_reg<ushort, 8> v_uint16x8;\ntypedef v_reg<short, 8> v_int16x8;\ntypedef v_reg<unsigned, 4> v_uint32x4;\ntypedef v_reg<int, 4> v_int32x4;\ntypedef v_reg<float, 4> v_float32x4;\ntypedef v_reg<float, 8> v_float32x8;\ntypedef v_reg<double, 2> v_float64x2;\ntypedef v_reg<uint64, 2> v_uint64x2;\ntypedef v_reg<int64, 2> v_int64x2;\n\n#define OPENCV_HAL_IMPL_C_INIT(_Tpvec, _Tp, suffix) \\\ninline _Tpvec v_setzero_##suffix() { return _Tpvec::zero(); } \\\ninline _Tpvec v_setall_##suffix(_Tp val) { return _Tpvec::all(val); } \\\ntemplate<typename _Tp0, int n0> inline _Tpvec \\\n    v_reinterpret_as_##suffix(const v_reg<_Tp0, n0>& a) \\\n{ return a.template reinterpret_as<_Tp, _Tpvec::nlanes>(a); }\n\nOPENCV_HAL_IMPL_C_INIT(v_uint8x16, uchar, u8)\nOPENCV_HAL_IMPL_C_INIT(v_int8x16, schar, s8)\nOPENCV_HAL_IMPL_C_INIT(v_uint16x8, ushort, u16)\nOPENCV_HAL_IMPL_C_INIT(v_int16x8, short, s16)\nOPENCV_HAL_IMPL_C_INIT(v_uint32x4, unsigned, u32)\nOPENCV_HAL_IMPL_C_INIT(v_int32x4, int, s32)\nOPENCV_HAL_IMPL_C_INIT(v_float32x4, float, f32)\nOPENCV_HAL_IMPL_C_INIT(v_float64x2, double, f64)\nOPENCV_HAL_IMPL_C_INIT(v_uint64x2, uint64, u64)\nOPENCV_HAL_IMPL_C_INIT(v_uint64x2, int64, s64)\n\n#define OPENCV_HAL_IMPL_C_SHIFT(_Tpvec, _Tp) \\\ntemplate<int n> inline _Tpvec v_shl(const _Tpvec& a) \\\n{ return a << n; } \\\ntemplate<int n> inline _Tpvec v_shr(const _Tpvec& a) \\\n{ return a >> n; } \\\ntemplate<int n> inline _Tpvec v_rshr(const _Tpvec& a) \\\n{ \\\n    _Tpvec c; \\\n    for( int i = 0; i < _Tpvec::nlanes; i++ ) \\\n        c.s[i] = (_Tp)((a.s[i] + ((_Tp)1 << (n - 1))) >> n); \\\n    return c; \\\n}\n\nOPENCV_HAL_IMPL_C_SHIFT(v_uint16x8, ushort)\nOPENCV_HAL_IMPL_C_SHIFT(v_int16x8, short)\nOPENCV_HAL_IMPL_C_SHIFT(v_uint32x4, unsigned)\nOPENCV_HAL_IMPL_C_SHIFT(v_int32x4, int)\nOPENCV_HAL_IMPL_C_SHIFT(v_uint64x2, uint64)\nOPENCV_HAL_IMPL_C_SHIFT(v_int64x2, int64)\n\n\n#define OPENCV_HAL_IMPL_C_PACK(_Tpvec, _Tp, _Tpnvec, _Tpn, pack_suffix) \\\ninline _Tpnvec v_##pack_suffix(const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    _Tpnvec c; \\\n    for( int i = 0; i < _Tpvec::nlanes; i++ ) \\\n    { \\\n        c.s[i] = saturate_cast<_Tpn>(a.s[i]); \\\n        c.s[i+_Tpvec::nlanes] = saturate_cast<_Tpn>(b.s[i]); \\\n    } \\\n    return c; \\\n} \\\ntemplate<int n> inline _Tpnvec v_rshr_##pack_suffix(const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    _Tpnvec c; \\\n    for( int i = 0; i < _Tpvec::nlanes; i++ ) \\\n    { \\\n        c.s[i] = saturate_cast<_Tpn>((a.s[i] + ((_Tp)1 << (n - 1))) >> n); \\\n        c.s[i+_Tpvec::nlanes] = saturate_cast<_Tpn>((b.s[i] + ((_Tp)1 << (n - 1))) >> n); \\\n    } \\\n    return c; \\\n} \\\ninline void v_##pack_suffix##_store(_Tpn* ptr, const _Tpvec& a) \\\n{ \\\n    for( int i = 0; i < _Tpvec::nlanes; i++ ) \\\n        ptr[i] = saturate_cast<_Tpn>(a.s[i]); \\\n} \\\ntemplate<int n> inline void v_rshr_##pack_suffix##_store(_Tpn* ptr, const _Tpvec& a) \\\n{ \\\n    for( int i = 0; i < _Tpvec::nlanes; i++ ) \\\n        ptr[i] = saturate_cast<_Tpn>((a.s[i] + ((_Tp)1 << (n - 1))) >> n); \\\n}\n\nOPENCV_HAL_IMPL_C_PACK(v_uint16x8, ushort, v_uint8x16, uchar, pack)\nOPENCV_HAL_IMPL_C_PACK(v_int16x8, short, v_int8x16, schar, pack)\nOPENCV_HAL_IMPL_C_PACK(v_int16x8, short, v_uint8x16, uchar, pack_u)\nOPENCV_HAL_IMPL_C_PACK(v_uint32x4, unsigned, v_uint16x8, ushort, pack)\nOPENCV_HAL_IMPL_C_PACK(v_int32x4, int, v_int16x8, short, pack)\nOPENCV_HAL_IMPL_C_PACK(v_int32x4, int, v_uint16x8, ushort, pack_u)\nOPENCV_HAL_IMPL_C_PACK(v_uint64x2, uint64, v_uint32x4, unsigned, pack)\nOPENCV_HAL_IMPL_C_PACK(v_int64x2, int64, v_int32x4, int, pack)\n\ninline v_float32x4 v_matmul(const v_float32x4& v, const v_float32x4& m0,\n                            const v_float32x4& m1, const v_float32x4& m2,\n                            const v_float32x4& m3)\n{\n    return v_float32x4(v.s[0]*m0.s[0] + v.s[1]*m1.s[0] + v.s[2]*m2.s[0] + v.s[3]*m3.s[0],\n                       v.s[0]*m0.s[1] + v.s[1]*m1.s[1] + v.s[2]*m2.s[1] + v.s[3]*m3.s[1],\n                       v.s[0]*m0.s[2] + v.s[1]*m1.s[2] + v.s[2]*m2.s[2] + v.s[3]*m3.s[2],\n                       v.s[0]*m0.s[3] + v.s[1]*m1.s[3] + v.s[2]*m2.s[3] + v.s[3]*m3.s[3]);\n}\n\n}\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/hal/intrin_neon.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_HAL_INTRIN_NEON_HPP__\n#define __OPENCV_HAL_INTRIN_NEON_HPP__\n\nnamespace cv\n{\n\n#define CV_SIMD128 1\n\nstruct v_uint8x16\n{\n    typedef uchar lane_type;\n    enum { nlanes = 16 };\n\n    v_uint8x16() {}\n    explicit v_uint8x16(uint8x16_t v) : val(v) {}\n    v_uint8x16(uchar v0, uchar v1, uchar v2, uchar v3, uchar v4, uchar v5, uchar v6, uchar v7,\n               uchar v8, uchar v9, uchar v10, uchar v11, uchar v12, uchar v13, uchar v14, uchar v15)\n    {\n        uchar v[] = {v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15};\n        val = vld1q_u8(v);\n    }\n    uchar get0() const\n    {\n        return vgetq_lane_u8(val, 0);\n    }\n\n    uint8x16_t val;\n};\n\nstruct v_int8x16\n{\n    typedef schar lane_type;\n    enum { nlanes = 16 };\n\n    v_int8x16() {}\n    explicit v_int8x16(int8x16_t v) : val(v) {}\n    v_int8x16(schar v0, schar v1, schar v2, schar v3, schar v4, schar v5, schar v6, schar v7,\n               schar v8, schar v9, schar v10, schar v11, schar v12, schar v13, schar v14, schar v15)\n    {\n        schar v[] = {v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15};\n        val = vld1q_s8(v);\n    }\n    schar get0() const\n    {\n        return vgetq_lane_s8(val, 0);\n    }\n\n    int8x16_t val;\n};\n\nstruct v_uint16x8\n{\n    typedef ushort lane_type;\n    enum { nlanes = 8 };\n\n    v_uint16x8() {}\n    explicit v_uint16x8(uint16x8_t v) : val(v) {}\n    v_uint16x8(ushort v0, ushort v1, ushort v2, ushort v3, ushort v4, ushort v5, ushort v6, ushort v7)\n    {\n        ushort v[] = {v0, v1, v2, v3, v4, v5, v6, v7};\n        val = vld1q_u16(v);\n    }\n    ushort get0() const\n    {\n        return vgetq_lane_u16(val, 0);\n    }\n\n    uint16x8_t val;\n};\n\nstruct v_int16x8\n{\n    typedef short lane_type;\n    enum { nlanes = 8 };\n\n    v_int16x8() {}\n    explicit v_int16x8(int16x8_t v) : val(v) {}\n    v_int16x8(short v0, short v1, short v2, short v3, short v4, short v5, short v6, short v7)\n    {\n        short v[] = {v0, v1, v2, v3, v4, v5, v6, v7};\n        val = vld1q_s16(v);\n    }\n    short get0() const\n    {\n        return vgetq_lane_s16(val, 0);\n    }\n\n    int16x8_t val;\n};\n\nstruct v_uint32x4\n{\n    typedef unsigned lane_type;\n    enum { nlanes = 4 };\n\n    v_uint32x4() {}\n    explicit v_uint32x4(uint32x4_t v) : val(v) {}\n    v_uint32x4(unsigned v0, unsigned v1, unsigned v2, unsigned v3)\n    {\n        unsigned v[] = {v0, v1, v2, v3};\n        val = vld1q_u32(v);\n    }\n    unsigned get0() const\n    {\n        return vgetq_lane_u32(val, 0);\n    }\n\n    uint32x4_t val;\n};\n\nstruct v_int32x4\n{\n    typedef int lane_type;\n    enum { nlanes = 4 };\n\n    v_int32x4() {}\n    explicit v_int32x4(int32x4_t v) : val(v) {}\n    v_int32x4(int v0, int v1, int v2, int v3)\n    {\n        int v[] = {v0, v1, v2, v3};\n        val = vld1q_s32(v);\n    }\n    int get0() const\n    {\n        return vgetq_lane_s32(val, 0);\n    }\n    int32x4_t val;\n};\n\nstruct v_float32x4\n{\n    typedef float lane_type;\n    enum { nlanes = 4 };\n\n    v_float32x4() {}\n    explicit v_float32x4(float32x4_t v) : val(v) {}\n    v_float32x4(float v0, float v1, float v2, float v3)\n    {\n        float v[] = {v0, v1, v2, v3};\n        val = vld1q_f32(v);\n    }\n    float get0() const\n    {\n        return vgetq_lane_f32(val, 0);\n    }\n    float32x4_t val;\n};\n\nstruct v_uint64x2\n{\n    typedef uint64 lane_type;\n    enum { nlanes = 2 };\n\n    v_uint64x2() {}\n    explicit v_uint64x2(uint64x2_t v) : val(v) {}\n    v_uint64x2(unsigned v0, unsigned v1)\n    {\n        uint64 v[] = {v0, v1};\n        val = vld1q_u64(v);\n    }\n    uint64 get0() const\n    {\n        return vgetq_lane_u64(val, 0);\n    }\n    uint64x2_t val;\n};\n\nstruct v_int64x2\n{\n    typedef int64 lane_type;\n    enum { nlanes = 2 };\n\n    v_int64x2() {}\n    explicit v_int64x2(int64x2_t v) : val(v) {}\n    v_int64x2(int v0, int v1)\n    {\n        int64 v[] = {v0, v1};\n        val = vld1q_s64(v);\n    }\n    int64 get0() const\n    {\n        return vgetq_lane_s64(val, 0);\n    }\n    int64x2_t val;\n};\n\n#define OPENCV_HAL_IMPL_NEON_INIT(_Tpv, _Tp, suffix) \\\ninline v_##_Tpv v_setzero_##suffix() { return v_##_Tpv(vdupq_n_##suffix((_Tp)0)); } \\\ninline v_##_Tpv v_setall_##suffix(_Tp v) { return v_##_Tpv(vdupq_n_##suffix(v)); } \\\ninline _Tpv##_t vreinterpretq_##suffix##_##suffix(_Tpv##_t v) { return v; } \\\ninline v_uint8x16 v_reinterpret_as_u8(const v_##_Tpv& v) { return v_uint8x16(vreinterpretq_u8_##suffix(v.val)); } \\\ninline v_int8x16 v_reinterpret_as_s8(const v_##_Tpv& v) { return v_int8x16(vreinterpretq_s8_##suffix(v.val)); } \\\ninline v_uint16x8 v_reinterpret_as_u16(const v_##_Tpv& v) { return v_uint16x8(vreinterpretq_u16_##suffix(v.val)); } \\\ninline v_int16x8 v_reinterpret_as_s16(const v_##_Tpv& v) { return v_int16x8(vreinterpretq_s16_##suffix(v.val)); } \\\ninline v_uint32x4 v_reinterpret_as_u32(const v_##_Tpv& v) { return v_uint32x4(vreinterpretq_u32_##suffix(v.val)); } \\\ninline v_int32x4 v_reinterpret_as_s32(const v_##_Tpv& v) { return v_int32x4(vreinterpretq_s32_##suffix(v.val)); } \\\ninline v_uint64x2 v_reinterpret_as_u64(const v_##_Tpv& v) { return v_uint64x2(vreinterpretq_u64_##suffix(v.val)); } \\\ninline v_int64x2 v_reinterpret_as_s64(const v_##_Tpv& v) { return v_int64x2(vreinterpretq_s64_##suffix(v.val)); } \\\ninline v_float32x4 v_reinterpret_as_f32(const v_##_Tpv& v) { return v_float32x4(vreinterpretq_f32_##suffix(v.val)); }\n\nOPENCV_HAL_IMPL_NEON_INIT(uint8x16, uchar, u8)\nOPENCV_HAL_IMPL_NEON_INIT(int8x16, schar, s8)\nOPENCV_HAL_IMPL_NEON_INIT(uint16x8, ushort, u16)\nOPENCV_HAL_IMPL_NEON_INIT(int16x8, short, s16)\nOPENCV_HAL_IMPL_NEON_INIT(uint32x4, unsigned, u32)\nOPENCV_HAL_IMPL_NEON_INIT(int32x4, int, s32)\nOPENCV_HAL_IMPL_NEON_INIT(uint64x2, uint64, u64)\nOPENCV_HAL_IMPL_NEON_INIT(int64x2, int64, s64)\nOPENCV_HAL_IMPL_NEON_INIT(float32x4, float, f32)\n\n#define OPENCV_HAL_IMPL_NEON_PACK(_Tpvec, _Tp, hreg, suffix, _Tpwvec, wsuffix, pack, op) \\\ninline _Tpvec v_##pack(const _Tpwvec& a, const _Tpwvec& b) \\\n{ \\\n    hreg a1 = vqmov##op##_##wsuffix(a.val), b1 = vqmov##op##_##wsuffix(b.val); \\\n    return _Tpvec(vcombine_##suffix(a1, b1)); \\\n} \\\ninline void v_##pack##_store(_Tp* ptr, const _Tpwvec& a) \\\n{ \\\n    hreg a1 = vqmov##op##_##wsuffix(a.val); \\\n    vst1_##suffix(ptr, a1); \\\n} \\\ntemplate<int n> inline \\\n_Tpvec v_rshr_##pack(const _Tpwvec& a, const _Tpwvec& b) \\\n{ \\\n    hreg a1 = vqrshr##op##_n_##wsuffix(a.val, n); \\\n    hreg b1 = vqrshr##op##_n_##wsuffix(b.val, n); \\\n    return _Tpvec(vcombine_##suffix(a1, b1)); \\\n} \\\ntemplate<int n> inline \\\nvoid v_rshr_##pack##_store(_Tp* ptr, const _Tpwvec& a) \\\n{ \\\n    hreg a1 = vqrshr##op##_n_##wsuffix(a.val, n); \\\n    vst1_##suffix(ptr, a1); \\\n}\n\nOPENCV_HAL_IMPL_NEON_PACK(v_uint8x16, uchar, uint8x8_t, u8, v_uint16x8, u16, pack, n)\nOPENCV_HAL_IMPL_NEON_PACK(v_uint8x16, uchar, uint8x8_t, u8, v_int16x8, s16, pack_u, un)\nOPENCV_HAL_IMPL_NEON_PACK(v_int8x16, schar, int8x8_t, s8, v_int16x8, s16, pack, n)\nOPENCV_HAL_IMPL_NEON_PACK(v_uint16x8, ushort, uint16x4_t, u16, v_uint32x4, u32, pack, n)\nOPENCV_HAL_IMPL_NEON_PACK(v_uint16x8, ushort, uint16x4_t, u16, v_int32x4, s32, pack_u, un)\nOPENCV_HAL_IMPL_NEON_PACK(v_int16x8, short, int16x4_t, s16, v_int32x4, s32, pack, n)\nOPENCV_HAL_IMPL_NEON_PACK(v_uint32x4, unsigned, uint32x2_t, u32, v_uint64x2, u64, pack, n)\nOPENCV_HAL_IMPL_NEON_PACK(v_int32x4, int, int32x2_t, s32, v_int64x2, s64, pack, n)\n\ninline v_float32x4 v_matmul(const v_float32x4& v, const v_float32x4& m0,\n                            const v_float32x4& m1, const v_float32x4& m2,\n                            const v_float32x4& m3)\n{\n    float32x2_t vl = vget_low_f32(v.val), vh = vget_high_f32(v.val);\n    float32x4_t res = vmulq_lane_f32(m0.val, vl, 0);\n    res = vmlaq_lane_f32(res, m1.val, vl, 1);\n    res = vmlaq_lane_f32(res, m2.val, vh, 0);\n    res = vmlaq_lane_f32(res, m3.val, vh, 1);\n    return v_float32x4(res);\n}\n\n#define OPENCV_HAL_IMPL_NEON_BIN_OP(bin_op, _Tpvec, intrin) \\\ninline _Tpvec operator bin_op (const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    return _Tpvec(intrin(a.val, b.val)); \\\n} \\\ninline _Tpvec& operator bin_op##= (_Tpvec& a, const _Tpvec& b) \\\n{ \\\n    a.val = intrin(a.val, b.val); \\\n    return a; \\\n}\n\nOPENCV_HAL_IMPL_NEON_BIN_OP(+, v_uint8x16, vqaddq_u8)\nOPENCV_HAL_IMPL_NEON_BIN_OP(-, v_uint8x16, vqsubq_u8)\nOPENCV_HAL_IMPL_NEON_BIN_OP(+, v_int8x16, vqaddq_s8)\nOPENCV_HAL_IMPL_NEON_BIN_OP(-, v_int8x16, vqsubq_s8)\nOPENCV_HAL_IMPL_NEON_BIN_OP(+, v_uint16x8, vqaddq_u16)\nOPENCV_HAL_IMPL_NEON_BIN_OP(-, v_uint16x8, vqsubq_u16)\nOPENCV_HAL_IMPL_NEON_BIN_OP(*, v_uint16x8, vmulq_u16)\nOPENCV_HAL_IMPL_NEON_BIN_OP(+, v_int16x8, vqaddq_s16)\nOPENCV_HAL_IMPL_NEON_BIN_OP(-, v_int16x8, vqsubq_s16)\nOPENCV_HAL_IMPL_NEON_BIN_OP(*, v_int16x8, vmulq_s16)\nOPENCV_HAL_IMPL_NEON_BIN_OP(+, v_int32x4, vaddq_s32)\nOPENCV_HAL_IMPL_NEON_BIN_OP(-, v_int32x4, vsubq_s32)\nOPENCV_HAL_IMPL_NEON_BIN_OP(*, v_int32x4, vmulq_s32)\nOPENCV_HAL_IMPL_NEON_BIN_OP(+, v_uint32x4, vaddq_u32)\nOPENCV_HAL_IMPL_NEON_BIN_OP(-, v_uint32x4, vsubq_u32)\nOPENCV_HAL_IMPL_NEON_BIN_OP(*, v_uint32x4, vmulq_u32)\nOPENCV_HAL_IMPL_NEON_BIN_OP(+, v_float32x4, vaddq_f32)\nOPENCV_HAL_IMPL_NEON_BIN_OP(-, v_float32x4, vsubq_f32)\nOPENCV_HAL_IMPL_NEON_BIN_OP(*, v_float32x4, vmulq_f32)\nOPENCV_HAL_IMPL_NEON_BIN_OP(+, v_int64x2, vaddq_s64)\nOPENCV_HAL_IMPL_NEON_BIN_OP(-, v_int64x2, vsubq_s64)\nOPENCV_HAL_IMPL_NEON_BIN_OP(+, v_uint64x2, vaddq_u64)\nOPENCV_HAL_IMPL_NEON_BIN_OP(-, v_uint64x2, vsubq_u64)\n\ninline v_float32x4 operator / (const v_float32x4& a, const v_float32x4& b)\n{\n    float32x4_t reciprocal = vrecpeq_f32(b.val);\n    reciprocal = vmulq_f32(vrecpsq_f32(b.val, reciprocal), reciprocal);\n    reciprocal = vmulq_f32(vrecpsq_f32(b.val, reciprocal), reciprocal);\n    return v_float32x4(vmulq_f32(a.val, reciprocal));\n}\ninline v_float32x4& operator /= (v_float32x4& a, const v_float32x4& b)\n{\n    float32x4_t reciprocal = vrecpeq_f32(b.val);\n    reciprocal = vmulq_f32(vrecpsq_f32(b.val, reciprocal), reciprocal);\n    reciprocal = vmulq_f32(vrecpsq_f32(b.val, reciprocal), reciprocal);\n    a.val = vmulq_f32(a.val, reciprocal);\n    return a;\n}\n\ninline void v_mul_expand(const v_int16x8& a, const v_int16x8& b,\n                         v_int32x4& c, v_int32x4& d)\n{\n    c.val = vmull_s16(vget_low_s16(a.val), vget_low_s16(b.val));\n    d.val = vmull_s16(vget_high_s16(a.val), vget_high_s16(b.val));\n}\n\ninline void v_mul_expand(const v_uint16x8& a, const v_uint16x8& b,\n                         v_uint32x4& c, v_uint32x4& d)\n{\n    c.val = vmull_u16(vget_low_u16(a.val), vget_low_u16(b.val));\n    d.val = vmull_u16(vget_high_u16(a.val), vget_high_u16(b.val));\n}\n\ninline void v_mul_expand(const v_uint32x4& a, const v_uint32x4& b,\n                         v_uint64x2& c, v_uint64x2& d)\n{\n    c.val = vmull_u32(vget_low_u32(a.val), vget_low_u32(b.val));\n    d.val = vmull_u32(vget_high_u32(a.val), vget_high_u32(b.val));\n}\n\ninline v_int32x4 v_dotprod(const v_int16x8& a, const v_int16x8& b)\n{\n    int32x4_t c = vmull_s16(vget_low_s16(a.val), vget_low_s16(b.val));\n    int32x4_t d = vmull_s16(vget_high_s16(a.val), vget_high_s16(b.val));\n    int32x4x2_t cd = vtrnq_s32(c, d);\n    return v_int32x4(vaddq_s32(cd.val[0], cd.val[1]));\n}\n\n#define OPENCV_HAL_IMPL_NEON_LOGIC_OP(_Tpvec, suffix) \\\n    OPENCV_HAL_IMPL_NEON_BIN_OP(&, _Tpvec, vandq_##suffix) \\\n    OPENCV_HAL_IMPL_NEON_BIN_OP(|, _Tpvec, vorrq_##suffix) \\\n    OPENCV_HAL_IMPL_NEON_BIN_OP(^, _Tpvec, veorq_##suffix) \\\n    inline _Tpvec operator ~ (const _Tpvec& a) \\\n    { \\\n        return _Tpvec(vreinterpretq_##suffix##_u8(vmvnq_u8(vreinterpretq_u8_##suffix(a.val)))); \\\n    }\n\nOPENCV_HAL_IMPL_NEON_LOGIC_OP(v_uint8x16, u8)\nOPENCV_HAL_IMPL_NEON_LOGIC_OP(v_int8x16, s8)\nOPENCV_HAL_IMPL_NEON_LOGIC_OP(v_uint16x8, u16)\nOPENCV_HAL_IMPL_NEON_LOGIC_OP(v_int16x8, s16)\nOPENCV_HAL_IMPL_NEON_LOGIC_OP(v_uint32x4, u32)\nOPENCV_HAL_IMPL_NEON_LOGIC_OP(v_int32x4, s32)\nOPENCV_HAL_IMPL_NEON_LOGIC_OP(v_uint64x2, u64)\nOPENCV_HAL_IMPL_NEON_LOGIC_OP(v_int64x2, s64)\n\n#define OPENCV_HAL_IMPL_NEON_FLT_BIT_OP(bin_op, intrin) \\\ninline v_float32x4 operator bin_op (const v_float32x4& a, const v_float32x4& b) \\\n{ \\\n    return v_float32x4(vreinterpretq_f32_s32(intrin(vreinterpretq_s32_f32(a.val), vreinterpretq_s32_f32(b.val)))); \\\n} \\\ninline v_float32x4& operator bin_op##= (v_float32x4& a, const v_float32x4& b) \\\n{ \\\n    a.val = vreinterpretq_f32_s32(intrin(vreinterpretq_s32_f32(a.val), vreinterpretq_s32_f32(b.val))); \\\n    return a; \\\n}\n\nOPENCV_HAL_IMPL_NEON_FLT_BIT_OP(&, vandq_s32)\nOPENCV_HAL_IMPL_NEON_FLT_BIT_OP(|, vorrq_s32)\nOPENCV_HAL_IMPL_NEON_FLT_BIT_OP(^, veorq_s32)\n\ninline v_float32x4 operator ~ (const v_float32x4& a)\n{\n    return v_float32x4(vreinterpretq_f32_s32(vmvnq_s32(vreinterpretq_s32_f32(a.val))));\n}\n\ninline v_float32x4 v_sqrt(const v_float32x4& x)\n{\n    float32x4_t x1 = vmaxq_f32(x.val, vdupq_n_f32(FLT_MIN));\n    float32x4_t e = vrsqrteq_f32(x1);\n    e = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x1, e), e), e);\n    e = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x1, e), e), e);\n    return v_float32x4(vmulq_f32(x.val, e));\n}\n\ninline v_float32x4 v_invsqrt(const v_float32x4& x)\n{\n    float32x4_t e = vrsqrteq_f32(x.val);\n    e = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x.val, e), e), e);\n    e = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x.val, e), e), e);\n    return v_float32x4(e);\n}\n\ninline v_float32x4 v_abs(v_float32x4 x)\n{ return v_float32x4(vabsq_f32(x.val)); }\n\n// TODO: exp, log, sin, cos\n\n#define OPENCV_HAL_IMPL_NEON_BIN_FUNC(_Tpvec, func, intrin) \\\ninline _Tpvec func(const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    return _Tpvec(intrin(a.val, b.val)); \\\n}\n\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint8x16, v_min, vminq_u8)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint8x16, v_max, vmaxq_u8)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_int8x16, v_min, vminq_s8)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_int8x16, v_max, vmaxq_s8)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint16x8, v_min, vminq_u16)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint16x8, v_max, vmaxq_u16)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_int16x8, v_min, vminq_s16)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_int16x8, v_max, vmaxq_s16)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint32x4, v_min, vminq_u32)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint32x4, v_max, vmaxq_u32)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_int32x4, v_min, vminq_s32)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_int32x4, v_max, vmaxq_s32)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_float32x4, v_min, vminq_f32)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_float32x4, v_max, vmaxq_f32)\n\n\n#define OPENCV_HAL_IMPL_NEON_INT_CMP_OP(_Tpvec, cast, suffix, not_suffix) \\\ninline _Tpvec operator == (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(cast(vceqq_##suffix(a.val, b.val))); } \\\ninline _Tpvec operator != (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(cast(vmvnq_##not_suffix(vceqq_##suffix(a.val, b.val)))); } \\\ninline _Tpvec operator < (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(cast(vcltq_##suffix(a.val, b.val))); } \\\ninline _Tpvec operator > (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(cast(vcgtq_##suffix(a.val, b.val))); } \\\ninline _Tpvec operator <= (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(cast(vcleq_##suffix(a.val, b.val))); } \\\ninline _Tpvec operator >= (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(cast(vcgeq_##suffix(a.val, b.val))); }\n\nOPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_uint8x16, OPENCV_HAL_NOP, u8, u8)\nOPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_int8x16, vreinterpretq_s8_u8, s8, u8)\nOPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_uint16x8, OPENCV_HAL_NOP, u16, u16)\nOPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_int16x8, vreinterpretq_s16_u16, s16, u16)\nOPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_uint32x4, OPENCV_HAL_NOP, u32, u32)\nOPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_int32x4, vreinterpretq_s32_u32, s32, u32)\nOPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_float32x4, vreinterpretq_f32_u32, f32, u32)\n\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint8x16, v_add_wrap, vaddq_u8)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_int8x16, v_add_wrap, vaddq_s8)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint16x8, v_add_wrap, vaddq_u16)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_int16x8, v_add_wrap, vaddq_s16)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint8x16, v_sub_wrap, vsubq_u8)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_int8x16, v_sub_wrap, vsubq_s8)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint16x8, v_sub_wrap, vsubq_u16)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_int16x8, v_sub_wrap, vsubq_s16)\n\n// TODO: absdiff for signed integers\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint8x16, v_absdiff, vabdq_u8)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint16x8, v_absdiff, vabdq_u16)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_uint32x4, v_absdiff, vabdq_u32)\nOPENCV_HAL_IMPL_NEON_BIN_FUNC(v_float32x4, v_absdiff, vabdq_f32)\n\ninline v_float32x4 v_magnitude(const v_float32x4& a, const v_float32x4& b)\n{\n    v_float32x4 x(vmlaq_f32(vmulq_f32(a.val, a.val), b.val, b.val));\n    return v_sqrt(x);\n}\n\ninline v_float32x4 v_sqr_magnitude(const v_float32x4& a, const v_float32x4& b)\n{\n    return v_float32x4(vmlaq_f32(vmulq_f32(a.val, a.val), b.val, b.val));\n}\n\ninline v_float32x4 v_muladd(const v_float32x4& a, const v_float32x4& b, const v_float32x4& c)\n{\n    return v_float32x4(vmlaq_f32(c.val, a.val, b.val));\n}\n\n// trade efficiency for convenience\n#define OPENCV_HAL_IMPL_NEON_SHIFT_OP(_Tpvec, suffix, _Tps, ssuffix) \\\ninline _Tpvec operator << (const _Tpvec& a, int n) \\\n{ return _Tpvec(vshlq_##suffix(a.val, vdupq_n_##ssuffix((_Tps)n))); } \\\ninline _Tpvec operator >> (const _Tpvec& a, int n) \\\n{ return _Tpvec(vshlq_##suffix(a.val, vdupq_n_##ssuffix((_Tps)-n))); } \\\ntemplate<int n> inline _Tpvec v_shl(const _Tpvec& a) \\\n{ return _Tpvec(vshlq_n_##suffix(a.val, n)); } \\\ntemplate<int n> inline _Tpvec v_shr(const _Tpvec& a) \\\n{ return _Tpvec(vshrq_n_##suffix(a.val, n)); } \\\ntemplate<int n> inline _Tpvec v_rshr(const _Tpvec& a) \\\n{ return _Tpvec(vrshrq_n_##suffix(a.val, n)); }\n\nOPENCV_HAL_IMPL_NEON_SHIFT_OP(v_uint8x16, u8, schar, s8)\nOPENCV_HAL_IMPL_NEON_SHIFT_OP(v_int8x16, s8, schar, s8)\nOPENCV_HAL_IMPL_NEON_SHIFT_OP(v_uint16x8, u16, short, s16)\nOPENCV_HAL_IMPL_NEON_SHIFT_OP(v_int16x8, s16, short, s16)\nOPENCV_HAL_IMPL_NEON_SHIFT_OP(v_uint32x4, u32, int, s32)\nOPENCV_HAL_IMPL_NEON_SHIFT_OP(v_int32x4, s32, int, s32)\nOPENCV_HAL_IMPL_NEON_SHIFT_OP(v_uint64x2, u64, int64, s64)\nOPENCV_HAL_IMPL_NEON_SHIFT_OP(v_int64x2, s64, int64, s64)\n\n#define OPENCV_HAL_IMPL_NEON_LOADSTORE_OP(_Tpvec, _Tp, suffix) \\\ninline _Tpvec v_load(const _Tp* ptr) \\\n{ return _Tpvec(vld1q_##suffix(ptr)); } \\\ninline _Tpvec v_load_aligned(const _Tp* ptr) \\\n{ return _Tpvec(vld1q_##suffix(ptr)); } \\\ninline _Tpvec v_load_halves(const _Tp* ptr0, const _Tp* ptr1) \\\n{ return _Tpvec(vcombine_##suffix(vld1_##suffix(ptr0), vld1_##suffix(ptr1))); } \\\ninline void v_store(_Tp* ptr, const _Tpvec& a) \\\n{ vst1q_##suffix(ptr, a.val); } \\\ninline void v_store_aligned(_Tp* ptr, const _Tpvec& a) \\\n{ vst1q_##suffix(ptr, a.val); } \\\ninline void v_store_low(_Tp* ptr, const _Tpvec& a) \\\n{ vst1_##suffix(ptr, vget_low_##suffix(a.val)); } \\\ninline void v_store_high(_Tp* ptr, const _Tpvec& a) \\\n{ vst1_##suffix(ptr, vget_high_##suffix(a.val)); }\n\nOPENCV_HAL_IMPL_NEON_LOADSTORE_OP(v_uint8x16, uchar, u8)\nOPENCV_HAL_IMPL_NEON_LOADSTORE_OP(v_int8x16, schar, s8)\nOPENCV_HAL_IMPL_NEON_LOADSTORE_OP(v_uint16x8, ushort, u16)\nOPENCV_HAL_IMPL_NEON_LOADSTORE_OP(v_int16x8, short, s16)\nOPENCV_HAL_IMPL_NEON_LOADSTORE_OP(v_uint32x4, unsigned, u32)\nOPENCV_HAL_IMPL_NEON_LOADSTORE_OP(v_int32x4, int, s32)\nOPENCV_HAL_IMPL_NEON_LOADSTORE_OP(v_float32x4, float, f32)\n\n#define OPENCV_HAL_IMPL_NEON_REDUCE_OP_4(_Tpvec, scalartype, func, scalar_func) \\\ninline scalartype v_reduce_##func(const _Tpvec& a) \\\n{ \\\n    scalartype CV_DECL_ALIGNED(16) buf[4]; \\\n    v_store_aligned(buf, a); \\\n    scalartype s0 = scalar_func(buf[0], buf[1]); \\\n    scalartype s1 = scalar_func(buf[2], buf[3]); \\\n    return scalar_func(s0, s1); \\\n}\n\nOPENCV_HAL_IMPL_NEON_REDUCE_OP_4(v_uint32x4, unsigned, sum, OPENCV_HAL_ADD)\nOPENCV_HAL_IMPL_NEON_REDUCE_OP_4(v_uint32x4, unsigned, max, std::max)\nOPENCV_HAL_IMPL_NEON_REDUCE_OP_4(v_uint32x4, unsigned, min, std::min)\nOPENCV_HAL_IMPL_NEON_REDUCE_OP_4(v_int32x4, int, sum, OPENCV_HAL_ADD)\nOPENCV_HAL_IMPL_NEON_REDUCE_OP_4(v_int32x4, int, max, std::max)\nOPENCV_HAL_IMPL_NEON_REDUCE_OP_4(v_int32x4, int, min, std::min)\nOPENCV_HAL_IMPL_NEON_REDUCE_OP_4(v_float32x4, float, sum, OPENCV_HAL_ADD)\nOPENCV_HAL_IMPL_NEON_REDUCE_OP_4(v_float32x4, float, max, std::max)\nOPENCV_HAL_IMPL_NEON_REDUCE_OP_4(v_float32x4, float, min, std::min)\n\ninline int v_signmask(const v_uint8x16& a)\n{\n    int8x8_t m0 = vcreate_s8(CV_BIG_UINT(0x0706050403020100));\n    uint8x16_t v0 = vshlq_u8(vshrq_n_u8(a.val, 7), vcombine_s8(m0, m0));\n    uint64x2_t v1 = vpaddlq_u32(vpaddlq_u16(vpaddlq_u8(v0)));\n    return (int)vgetq_lane_u64(v1, 0) + ((int)vgetq_lane_u64(v1, 1) << 8);\n}\ninline int v_signmask(const v_int8x16& a)\n{ return v_signmask(v_reinterpret_as_u8(a)); }\n\ninline int v_signmask(const v_uint16x8& a)\n{\n    int16x4_t m0 = vcreate_s16(CV_BIG_UINT(0x0003000200010000));\n    uint16x8_t v0 = vshlq_u16(vshrq_n_u16(a.val, 15), vcombine_s16(m0, m0));\n    uint64x2_t v1 = vpaddlq_u32(vpaddlq_u16(v0));\n    return (int)vgetq_lane_u64(v1, 0) + ((int)vgetq_lane_u64(v1, 1) << 4);\n}\ninline int v_signmask(const v_int16x8& a)\n{ return v_signmask(v_reinterpret_as_u16(a)); }\n\ninline int v_signmask(const v_uint32x4& a)\n{\n    int32x2_t m0 = vcreate_s32(CV_BIG_UINT(0x0000000100000000));\n    uint32x4_t v0 = vshlq_u32(vshrq_n_u32(a.val, 31), vcombine_s32(m0, m0));\n    uint64x2_t v1 = vpaddlq_u32(v0);\n    return (int)vgetq_lane_u64(v1, 0) + ((int)vgetq_lane_u64(v1, 1) << 2);\n}\ninline int v_signmask(const v_int32x4& a)\n{ return v_signmask(v_reinterpret_as_u32(a)); }\ninline int v_signmask(const v_float32x4& a)\n{ return v_signmask(v_reinterpret_as_u32(a)); }\n\n#define OPENCV_HAL_IMPL_NEON_CHECK_ALLANY(_Tpvec, suffix, shift) \\\ninline bool v_check_all(const v_##_Tpvec& a) \\\n{ \\\n    _Tpvec##_t v0 = vshrq_n_##suffix(vmvnq_##suffix(a.val), shift); \\\n    uint64x2_t v1 = vreinterpretq_u64_##suffix(v0); \\\n    return (vgetq_lane_u64(v1, 0) | vgetq_lane_u64(v1, 1)) == 0; \\\n} \\\ninline bool v_check_any(const v_##_Tpvec& a) \\\n{ \\\n    _Tpvec##_t v0 = vshrq_n_##suffix(a.val, shift); \\\n    uint64x2_t v1 = vreinterpretq_u64_##suffix(v0); \\\n    return (vgetq_lane_u64(v1, 0) | vgetq_lane_u64(v1, 1)) != 0; \\\n}\n\nOPENCV_HAL_IMPL_NEON_CHECK_ALLANY(uint8x16, u8, 7)\nOPENCV_HAL_IMPL_NEON_CHECK_ALLANY(uint16x8, u16, 15)\nOPENCV_HAL_IMPL_NEON_CHECK_ALLANY(uint32x4, u32, 31)\n\ninline bool v_check_all(const v_int8x16& a)\n{ return v_check_all(v_reinterpret_as_u8(a)); }\ninline bool v_check_all(const v_int16x8& a)\n{ return v_check_all(v_reinterpret_as_u16(a)); }\ninline bool v_check_all(const v_int32x4& a)\n{ return v_check_all(v_reinterpret_as_u32(a)); }\ninline bool v_check_all(const v_float32x4& a)\n{ return v_check_all(v_reinterpret_as_u32(a)); }\n\ninline bool v_check_any(const v_int8x16& a)\n{ return v_check_all(v_reinterpret_as_u8(a)); }\ninline bool v_check_any(const v_int16x8& a)\n{ return v_check_all(v_reinterpret_as_u16(a)); }\ninline bool v_check_any(const v_int32x4& a)\n{ return v_check_all(v_reinterpret_as_u32(a)); }\ninline bool v_check_any(const v_float32x4& a)\n{ return v_check_all(v_reinterpret_as_u32(a)); }\n\n#define OPENCV_HAL_IMPL_NEON_SELECT(_Tpvec, suffix, usuffix) \\\ninline _Tpvec v_select(const _Tpvec& mask, const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    return _Tpvec(vbslq_##suffix(vreinterpretq_##usuffix##_##suffix(mask.val), a.val, b.val)); \\\n}\n\nOPENCV_HAL_IMPL_NEON_SELECT(v_uint8x16, u8, u8)\nOPENCV_HAL_IMPL_NEON_SELECT(v_int8x16, s8, u8)\nOPENCV_HAL_IMPL_NEON_SELECT(v_uint16x8, u16, u16)\nOPENCV_HAL_IMPL_NEON_SELECT(v_int16x8, s16, u16)\nOPENCV_HAL_IMPL_NEON_SELECT(v_uint32x4, u32, u32)\nOPENCV_HAL_IMPL_NEON_SELECT(v_int32x4, s32, u32)\nOPENCV_HAL_IMPL_NEON_SELECT(v_float32x4, f32, u32)\n\n#define OPENCV_HAL_IMPL_NEON_EXPAND(_Tpvec, _Tpwvec, _Tp, suffix) \\\ninline void v_expand(const _Tpvec& a, _Tpwvec& b0, _Tpwvec& b1) \\\n{ \\\n    b0.val = vmovl_##suffix(vget_low_##suffix(a.val)); \\\n    b1.val = vmovl_##suffix(vget_high_##suffix(a.val)); \\\n} \\\ninline _Tpwvec v_load_expand(const _Tp* ptr) \\\n{ \\\n    return _Tpwvec(vmovl_##suffix(vld1_##suffix(ptr))); \\\n}\n\nOPENCV_HAL_IMPL_NEON_EXPAND(v_uint8x16, v_uint16x8, uchar, u8)\nOPENCV_HAL_IMPL_NEON_EXPAND(v_int8x16, v_int16x8, schar, s8)\nOPENCV_HAL_IMPL_NEON_EXPAND(v_uint16x8, v_uint32x4, ushort, u16)\nOPENCV_HAL_IMPL_NEON_EXPAND(v_int16x8, v_int32x4, short, s16)\n\ninline v_uint32x4 v_load_expand_q(const uchar* ptr)\n{\n    uint8x8_t v0 = vcreate_u8(*(unsigned*)ptr);\n    uint16x4_t v1 = vget_low_u16(vmovl_u8(v0));\n    return v_uint32x4(vmovl_u16(v1));\n}\n\ninline v_int32x4 v_load_expand_q(const schar* ptr)\n{\n    int8x8_t v0 = vcreate_s8(*(unsigned*)ptr);\n    int16x4_t v1 = vget_low_s16(vmovl_s8(v0));\n    return v_int32x4(vmovl_s16(v1));\n}\n\n#define OPENCV_HAL_IMPL_NEON_UNPACKS(_Tpvec, suffix) \\\ninline void v_zip(const v_##_Tpvec& a0, const v_##_Tpvec& a1, v_##_Tpvec& b0, v_##_Tpvec& b1) \\\n{ \\\n    _Tpvec##x2_t p = vzipq_##suffix(a0.val, a1.val); \\\n    b0.val = p.val[0]; \\\n    b1.val = p.val[1]; \\\n} \\\ninline v_##_Tpvec v_combine_low(const v_##_Tpvec& a, const v_##_Tpvec& b) \\\n{ \\\n    return v_##_Tpvec(vcombine_##suffix(vget_low_##suffix(a.val), vget_low_##suffix(b.val))); \\\n} \\\ninline v_##_Tpvec v_combine_high(const v_##_Tpvec& a, const v_##_Tpvec& b) \\\n{ \\\n    return v_##_Tpvec(vcombine_##suffix(vget_high_##suffix(a.val), vget_high_##suffix(b.val))); \\\n} \\\ninline void v_recombine(const v_##_Tpvec& a, const v_##_Tpvec& b, v_##_Tpvec& c, v_##_Tpvec& d) \\\n{ \\\n    c.val = vcombine_##suffix(vget_low_##suffix(a.val), vget_low_##suffix(b.val)); \\\n    d.val = vcombine_##suffix(vget_high_##suffix(a.val), vget_high_##suffix(b.val)); \\\n}\n\nOPENCV_HAL_IMPL_NEON_UNPACKS(uint8x16, u8)\nOPENCV_HAL_IMPL_NEON_UNPACKS(int8x16, s8)\nOPENCV_HAL_IMPL_NEON_UNPACKS(uint16x8, u16)\nOPENCV_HAL_IMPL_NEON_UNPACKS(int16x8, s16)\nOPENCV_HAL_IMPL_NEON_UNPACKS(uint32x4, u32)\nOPENCV_HAL_IMPL_NEON_UNPACKS(int32x4, s32)\nOPENCV_HAL_IMPL_NEON_UNPACKS(float32x4, f32)\n\ninline v_int32x4 v_round(const v_float32x4& a)\n{\n    static const int32x4_t v_sign = vdupq_n_s32(1 << 31),\n        v_05 = vreinterpretq_s32_f32(vdupq_n_f32(0.5f));\n\n    int32x4_t v_addition = vorrq_s32(v_05, vandq_s32(v_sign, vreinterpretq_s32_f32(a.val)));\n    return v_int32x4(vcvtq_s32_f32(vaddq_f32(a.val, vreinterpretq_f32_s32(v_addition))));\n}\n\ninline v_int32x4 v_floor(const v_float32x4& a)\n{\n    int32x4_t a1 = vcvtq_s32_f32(a.val);\n    uint32x4_t mask = vcgtq_f32(vcvtq_f32_s32(a1), a.val);\n    return v_int32x4(vaddq_s32(a1, vreinterpretq_s32_u32(mask)));\n}\n\ninline v_int32x4 v_ceil(const v_float32x4& a)\n{\n    int32x4_t a1 = vcvtq_s32_f32(a.val);\n    uint32x4_t mask = vcgtq_f32(a.val, vcvtq_f32_s32(a1));\n    return v_int32x4(vsubq_s32(a1, vreinterpretq_s32_u32(mask)));\n}\n\ninline v_int32x4 v_trunc(const v_float32x4& a)\n{ return v_int32x4(vcvtq_s32_f32(a.val)); }\n\n#define OPENCV_HAL_IMPL_NEON_TRANSPOSE4x4(_Tpvec, suffix) \\\ninline void transpose4x4(const v_##_Tpvec& a0, const v_##_Tpvec& a1, \\\n                         const v_##_Tpvec& a2, const v_##_Tpvec& a3, \\\n                         v_##_Tpvec& b0, v_##_Tpvec& b1, \\\n                         v_##_Tpvec& b2, v_##_Tpvec& b3) \\\n{ \\\n    /* m00 m01 m02 m03 */ \\\n    /* m10 m11 m12 m13 */ \\\n    /* m20 m21 m22 m23 */ \\\n    /* m30 m31 m32 m33 */ \\\n    _Tpvec##x2_t t0 = vtrnq_##suffix(a0.val, a1.val); \\\n    _Tpvec##x2_t t1 = vtrnq_##suffix(a2.val, a3.val); \\\n    /* m00 m10 m02 m12 */ \\\n    /* m01 m11 m03 m13 */ \\\n    /* m20 m30 m22 m32 */ \\\n    /* m21 m31 m23 m33 */ \\\n    b0.val = vcombine_##suffix(vget_low_##suffix(t0.val[0]), vget_low_##suffix(t1.val[0])); \\\n    b1.val = vcombine_##suffix(vget_low_##suffix(t0.val[1]), vget_low_##suffix(t1.val[1])); \\\n    b2.val = vcombine_##suffix(vget_high_##suffix(t0.val[0]), vget_high_##suffix(t1.val[0])); \\\n    b3.val = vcombine_##suffix(vget_high_##suffix(t0.val[1]), vget_high_##suffix(t1.val[1])); \\\n}\n\nOPENCV_HAL_IMPL_NEON_TRANSPOSE4x4(uint32x4, u32)\nOPENCV_HAL_IMPL_NEON_TRANSPOSE4x4(int32x4, s32)\nOPENCV_HAL_IMPL_NEON_TRANSPOSE4x4(float32x4, f32)\n\n#define OPENCV_HAL_IMPL_NEON_INTERLEAVED(_Tpvec, _Tp, suffix) \\\ninline void v_load_deinterleave(const _Tp* ptr, v_##_Tpvec& a, v_##_Tpvec& b, v_##_Tpvec& c) \\\n{ \\\n    _Tpvec##x3_t v = vld3q_##suffix(ptr); \\\n    a.val = v.val[0]; \\\n    b.val = v.val[1]; \\\n    c.val = v.val[2]; \\\n} \\\ninline void v_load_deinterleave(const _Tp* ptr, v_##_Tpvec& a, v_##_Tpvec& b, \\\n                                v_##_Tpvec& c, v_##_Tpvec& d) \\\n{ \\\n    _Tpvec##x4_t v = vld4q_##suffix(ptr); \\\n    a.val = v.val[0]; \\\n    b.val = v.val[1]; \\\n    c.val = v.val[2]; \\\n    d.val = v.val[3]; \\\n} \\\ninline void v_store_interleave( _Tp* ptr, const v_##_Tpvec& a, const v_##_Tpvec& b, const v_##_Tpvec& c) \\\n{ \\\n    _Tpvec##x3_t v; \\\n    v.val[0] = a.val; \\\n    v.val[1] = b.val; \\\n    v.val[2] = c.val; \\\n    vst3q_##suffix(ptr, v); \\\n} \\\ninline void v_store_interleave( _Tp* ptr, const v_##_Tpvec& a, const v_##_Tpvec& b, \\\n                               const v_##_Tpvec& c, const v_##_Tpvec& d) \\\n{ \\\n    _Tpvec##x4_t v; \\\n    v.val[0] = a.val; \\\n    v.val[1] = b.val; \\\n    v.val[2] = c.val; \\\n    v.val[3] = d.val; \\\n    vst4q_##suffix(ptr, v); \\\n}\n\nOPENCV_HAL_IMPL_NEON_INTERLEAVED(uint8x16, uchar, u8)\nOPENCV_HAL_IMPL_NEON_INTERLEAVED(int8x16, schar, s8)\nOPENCV_HAL_IMPL_NEON_INTERLEAVED(uint16x8, ushort, u16)\nOPENCV_HAL_IMPL_NEON_INTERLEAVED(int16x8, short, s16)\nOPENCV_HAL_IMPL_NEON_INTERLEAVED(uint32x4, unsigned, u32)\nOPENCV_HAL_IMPL_NEON_INTERLEAVED(int32x4, int, s32)\nOPENCV_HAL_IMPL_NEON_INTERLEAVED(float32x4, float, f32)\n\ninline v_float32x4 v_cvt_f32(const v_int32x4& a)\n{\n    return v_float32x4(vcvtq_f32_s32(a.val));\n}\n\n}\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/hal/intrin_sse.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_HAL_SSE_HPP__\n#define __OPENCV_HAL_SSE_HPP__\n\n#define CV_SIMD128 1\n#define CV_SIMD128_64F 1\n\nnamespace cv\n{\n\nstruct v_uint8x16\n{\n    typedef uchar lane_type;\n    enum { nlanes = 16 };\n\n    v_uint8x16() {}\n    explicit v_uint8x16(__m128i v) : val(v) {}\n    v_uint8x16(uchar v0, uchar v1, uchar v2, uchar v3, uchar v4, uchar v5, uchar v6, uchar v7,\n               uchar v8, uchar v9, uchar v10, uchar v11, uchar v12, uchar v13, uchar v14, uchar v15)\n    {\n        val = _mm_setr_epi8((char)v0, (char)v1, (char)v2, (char)v3,\n                            (char)v4, (char)v5, (char)v6, (char)v7,\n                            (char)v8, (char)v9, (char)v10, (char)v11,\n                            (char)v12, (char)v13, (char)v14, (char)v15);\n    }\n    uchar get0() const\n    {\n        return (uchar)_mm_cvtsi128_si32(val);\n    }\n\n    __m128i val;\n};\n\nstruct v_int8x16\n{\n    typedef schar lane_type;\n    enum { nlanes = 16 };\n\n    v_int8x16() {}\n    explicit v_int8x16(__m128i v) : val(v) {}\n    v_int8x16(schar v0, schar v1, schar v2, schar v3, schar v4, schar v5, schar v6, schar v7,\n              schar v8, schar v9, schar v10, schar v11, schar v12, schar v13, schar v14, schar v15)\n    {\n        val = _mm_setr_epi8((char)v0, (char)v1, (char)v2, (char)v3,\n                            (char)v4, (char)v5, (char)v6, (char)v7,\n                            (char)v8, (char)v9, (char)v10, (char)v11,\n                            (char)v12, (char)v13, (char)v14, (char)v15);\n    }\n    schar get0() const\n    {\n        return (schar)_mm_cvtsi128_si32(val);\n    }\n\n    __m128i val;\n};\n\nstruct v_uint16x8\n{\n    typedef ushort lane_type;\n    enum { nlanes = 8 };\n\n    v_uint16x8() {}\n    explicit v_uint16x8(__m128i v) : val(v) {}\n    v_uint16x8(ushort v0, ushort v1, ushort v2, ushort v3, ushort v4, ushort v5, ushort v6, ushort v7)\n    {\n        val = _mm_setr_epi16((short)v0, (short)v1, (short)v2, (short)v3,\n                             (short)v4, (short)v5, (short)v6, (short)v7);\n    }\n    ushort get0() const\n    {\n        return (ushort)_mm_cvtsi128_si32(val);\n    }\n\n    __m128i val;\n};\n\nstruct v_int16x8\n{\n    typedef short lane_type;\n    enum { nlanes = 8 };\n\n    v_int16x8() {}\n    explicit v_int16x8(__m128i v) : val(v) {}\n    v_int16x8(short v0, short v1, short v2, short v3, short v4, short v5, short v6, short v7)\n    {\n        val = _mm_setr_epi16((short)v0, (short)v1, (short)v2, (short)v3,\n                             (short)v4, (short)v5, (short)v6, (short)v7);\n    }\n    short get0() const\n    {\n        return (short)_mm_cvtsi128_si32(val);\n    }\n    __m128i val;\n};\n\nstruct v_uint32x4\n{\n    typedef unsigned lane_type;\n    enum { nlanes = 4 };\n\n    v_uint32x4() {}\n    explicit v_uint32x4(__m128i v) : val(v) {}\n    v_uint32x4(unsigned v0, unsigned v1, unsigned v2, unsigned v3)\n    {\n        val = _mm_setr_epi32((int)v0, (int)v1, (int)v2, (int)v3);\n    }\n    unsigned get0() const\n    {\n        return (unsigned)_mm_cvtsi128_si32(val);\n    }\n    __m128i val;\n};\n\nstruct v_int32x4\n{\n    typedef int lane_type;\n    enum { nlanes = 4 };\n\n    v_int32x4() {}\n    explicit v_int32x4(__m128i v) : val(v) {}\n    v_int32x4(int v0, int v1, int v2, int v3)\n    {\n        val = _mm_setr_epi32(v0, v1, v2, v3);\n    }\n    int get0() const\n    {\n        return _mm_cvtsi128_si32(val);\n    }\n    __m128i val;\n};\n\nstruct v_float32x4\n{\n    typedef float lane_type;\n    enum { nlanes = 4 };\n\n    v_float32x4() {}\n    explicit v_float32x4(__m128 v) : val(v) {}\n    v_float32x4(float v0, float v1, float v2, float v3)\n    {\n        val = _mm_setr_ps(v0, v1, v2, v3);\n    }\n    float get0() const\n    {\n        return _mm_cvtss_f32(val);\n    }\n    __m128 val;\n};\n\nstruct v_uint64x2\n{\n    typedef uint64 lane_type;\n    enum { nlanes = 2 };\n\n    v_uint64x2() {}\n    explicit v_uint64x2(__m128i v) : val(v) {}\n    v_uint64x2(uint64 v0, uint64 v1)\n    {\n        val = _mm_setr_epi32((int)v0, (int)(v0 >> 32), (int)v1, (int)(v1 >> 32));\n    }\n    uint64 get0() const\n    {\n        int a = _mm_cvtsi128_si32(val);\n        int b = _mm_cvtsi128_si32(_mm_srli_epi64(val, 32));\n        return (unsigned)a | ((uint64)(unsigned)b << 32);\n    }\n    __m128i val;\n};\n\nstruct v_int64x2\n{\n    typedef int64 lane_type;\n    enum { nlanes = 2 };\n\n    v_int64x2() {}\n    explicit v_int64x2(__m128i v) : val(v) {}\n    v_int64x2(int64 v0, int64 v1)\n    {\n        val = _mm_setr_epi32((int)v0, (int)(v0 >> 32), (int)v1, (int)(v1 >> 32));\n    }\n    int64 get0() const\n    {\n        int a = _mm_cvtsi128_si32(val);\n        int b = _mm_cvtsi128_si32(_mm_srli_epi64(val, 32));\n        return (int64)((unsigned)a | ((uint64)(unsigned)b << 32));\n    }\n    __m128i val;\n};\n\nstruct v_float64x2\n{\n    typedef double lane_type;\n    enum { nlanes = 2 };\n\n    v_float64x2() {}\n    explicit v_float64x2(__m128d v) : val(v) {}\n    v_float64x2(double v0, double v1)\n    {\n        val = _mm_setr_pd(v0, v1);\n    }\n    double get0() const\n    {\n        return _mm_cvtsd_f64(val);\n    }\n    __m128d val;\n};\n\n#define OPENCV_HAL_IMPL_SSE_INITVEC(_Tpvec, _Tp, suffix, zsuffix, ssuffix, _Tps, cast) \\\ninline _Tpvec v_setzero_##suffix() { return _Tpvec(_mm_setzero_##zsuffix()); } \\\ninline _Tpvec v_setall_##suffix(_Tp v) { return _Tpvec(_mm_set1_##ssuffix((_Tps)v)); } \\\ntemplate<typename _Tpvec0> inline _Tpvec v_reinterpret_as_##suffix(const _Tpvec0& a) \\\n{ return _Tpvec(cast(a.val)); }\n\nOPENCV_HAL_IMPL_SSE_INITVEC(v_uint8x16, uchar, u8, si128, epi8, char, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_INITVEC(v_int8x16, schar, s8, si128, epi8, char, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_INITVEC(v_uint16x8, ushort, u16, si128, epi16, short, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_INITVEC(v_int16x8, short, s16, si128, epi16, short, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_INITVEC(v_uint32x4, unsigned, u32, si128, epi32, int, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_INITVEC(v_int32x4, int, s32, si128, epi32, int, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_INITVEC(v_float32x4, float, f32, ps, ps, float, _mm_castsi128_ps)\nOPENCV_HAL_IMPL_SSE_INITVEC(v_float64x2, double, f64, pd, pd, double, _mm_castsi128_pd)\n\ninline v_uint64x2 v_setzero_u64() { return v_uint64x2(_mm_setzero_si128()); }\ninline v_int64x2 v_setzero_s64() { return v_int64x2(_mm_setzero_si128()); }\ninline v_uint64x2 v_setall_u64(uint64 val) { return v_uint64x2(val, val); }\ninline v_int64x2 v_setall_s64(int64 val) { return v_int64x2(val, val); }\n\ntemplate<typename _Tpvec> inline\nv_uint64x2 v_reinterpret_as_u64(const _Tpvec& a) { return v_uint64x2(a.val); }\ntemplate<typename _Tpvec> inline\nv_int64x2 v_reinterpret_as_s64(const _Tpvec& a) { return v_int64x2(a.val); }\ninline v_float32x4 v_reinterpret_as_f32(const v_uint64x2& a)\n{ return v_float32x4(_mm_castsi128_ps(a.val)); }\ninline v_float32x4 v_reinterpret_as_f32(const v_int64x2& a)\n{ return v_float32x4(_mm_castsi128_ps(a.val)); }\ninline v_float64x2 v_reinterpret_as_f64(const v_uint64x2& a)\n{ return v_float64x2(_mm_castsi128_pd(a.val)); }\ninline v_float64x2 v_reinterpret_as_f64(const v_int64x2& a)\n{ return v_float64x2(_mm_castsi128_pd(a.val)); }\n\n#define OPENCV_HAL_IMPL_SSE_INIT_FROM_FLT(_Tpvec, suffix) \\\ninline _Tpvec v_reinterpret_as_##suffix(const v_float32x4& a) \\\n{ return _Tpvec(_mm_castps_si128(a.val)); } \\\ninline _Tpvec v_reinterpret_as_##suffix(const v_float64x2& a) \\\n{ return _Tpvec(_mm_castpd_si128(a.val)); }\n\nOPENCV_HAL_IMPL_SSE_INIT_FROM_FLT(v_uint8x16, u8)\nOPENCV_HAL_IMPL_SSE_INIT_FROM_FLT(v_int8x16, s8)\nOPENCV_HAL_IMPL_SSE_INIT_FROM_FLT(v_uint16x8, u16)\nOPENCV_HAL_IMPL_SSE_INIT_FROM_FLT(v_int16x8, s16)\nOPENCV_HAL_IMPL_SSE_INIT_FROM_FLT(v_uint32x4, u32)\nOPENCV_HAL_IMPL_SSE_INIT_FROM_FLT(v_int32x4, s32)\nOPENCV_HAL_IMPL_SSE_INIT_FROM_FLT(v_uint64x2, u64)\nOPENCV_HAL_IMPL_SSE_INIT_FROM_FLT(v_int64x2, s64)\n\n//////////////// PACK ///////////////\ninline v_uint8x16 v_pack(const v_uint16x8& a, const v_uint16x8& b)\n{\n    __m128i delta = _mm_set1_epi16(255);\n    return v_uint8x16(_mm_packus_epi16(_mm_subs_epu16(a.val, _mm_subs_epu16(a.val, delta)),\n                                       _mm_subs_epu16(b.val, _mm_subs_epu16(b.val, delta))));\n}\n\ninline void v_pack_store(uchar* ptr, const v_uint16x8& a)\n{\n    __m128i delta = _mm_set1_epi16(255);\n    __m128i a1 = _mm_subs_epu16(a.val, _mm_subs_epu16(a.val, delta));\n    _mm_storel_epi64((__m128i*)ptr, _mm_packus_epi16(a1, a1));\n}\n\ninline v_uint8x16 v_pack_u(const v_int16x8& a, const v_int16x8& b)\n{ return v_uint8x16(_mm_packus_epi16(a.val, b.val)); }\n\ninline void v_pack_u_store(uchar* ptr, const v_int16x8& a)\n{ _mm_storel_epi64((__m128i*)ptr, _mm_packus_epi16(a.val, a.val)); }\n\ntemplate<int n> inline\nv_uint8x16 v_rshr_pack(const v_uint16x8& a, const v_uint16x8& b)\n{\n    // we assume that n > 0, and so the shifted 16-bit values can be treated as signed numbers.\n    __m128i delta = _mm_set1_epi16((short)(1 << (n-1)));\n    return v_uint8x16(_mm_packus_epi16(_mm_srli_epi16(_mm_adds_epu16(a.val, delta), n),\n                                       _mm_srli_epi16(_mm_adds_epu16(b.val, delta), n)));\n}\n\ntemplate<int n> inline\nvoid v_rshr_pack_store(uchar* ptr, const v_uint16x8& a)\n{\n    __m128i delta = _mm_set1_epi16((short)(1 << (n-1)));\n    __m128i a1 = _mm_srli_epi16(_mm_adds_epu16(a.val, delta), n);\n    _mm_storel_epi64((__m128i*)ptr, _mm_packus_epi16(a1, a1));\n}\n\ntemplate<int n> inline\nv_uint8x16 v_rshr_pack_u(const v_int16x8& a, const v_int16x8& b)\n{\n    __m128i delta = _mm_set1_epi16((short)(1 << (n-1)));\n    return v_uint8x16(_mm_packus_epi16(_mm_srai_epi16(_mm_adds_epi16(a.val, delta), n),\n                                       _mm_srai_epi16(_mm_adds_epi16(b.val, delta), n)));\n}\n\ntemplate<int n> inline\nvoid v_rshr_pack_u_store(uchar* ptr, const v_int16x8& a)\n{\n    __m128i delta = _mm_set1_epi16((short)(1 << (n-1)));\n    __m128i a1 = _mm_srai_epi16(_mm_adds_epi16(a.val, delta), n);\n    _mm_storel_epi64((__m128i*)ptr, _mm_packus_epi16(a1, a1));\n}\n\ninline v_int8x16 v_pack(const v_int16x8& a, const v_int16x8& b)\n{ return v_int8x16(_mm_packs_epi16(a.val, b.val)); }\n\ninline void v_pack_store(schar* ptr, v_int16x8& a)\n{ _mm_storel_epi64((__m128i*)ptr, _mm_packs_epi16(a.val, a.val)); }\n\ntemplate<int n> inline\nv_int8x16 v_rshr_pack(const v_int16x8& a, const v_int16x8& b)\n{\n    // we assume that n > 0, and so the shifted 16-bit values can be treated as signed numbers.\n    __m128i delta = _mm_set1_epi16((short)(1 << (n-1)));\n    return v_int8x16(_mm_packs_epi16(_mm_srai_epi16(_mm_adds_epi16(a.val, delta), n),\n                                     _mm_srai_epi16(_mm_adds_epi16(b.val, delta), n)));\n}\ntemplate<int n> inline\nvoid v_rshr_pack_store(schar* ptr, const v_int16x8& a)\n{\n    // we assume that n > 0, and so the shifted 16-bit values can be treated as signed numbers.\n    __m128i delta = _mm_set1_epi16((short)(1 << (n-1)));\n    __m128i a1 = _mm_srai_epi16(_mm_adds_epi16(a.val, delta), n);\n    _mm_storel_epi64((__m128i*)ptr, _mm_packs_epi16(a1, a1));\n}\n\n\n// bit-wise \"mask ? a : b\"\ninline __m128i v_select_si128(__m128i mask, __m128i a, __m128i b)\n{\n    return _mm_xor_si128(b, _mm_and_si128(_mm_xor_si128(a, b), mask));\n}\n\ninline v_uint16x8 v_pack(const v_uint32x4& a, const v_uint32x4& b)\n{\n    __m128i z = _mm_setzero_si128(), maxval32 = _mm_set1_epi32(65535), delta32 = _mm_set1_epi32(32768);\n    __m128i a1 = _mm_sub_epi32(v_select_si128(_mm_cmpgt_epi32(z, a.val), maxval32, a.val), delta32);\n    __m128i b1 = _mm_sub_epi32(v_select_si128(_mm_cmpgt_epi32(z, b.val), maxval32, b.val), delta32);\n    __m128i r = _mm_packs_epi32(a1, b1);\n    return v_uint16x8(_mm_sub_epi16(r, _mm_set1_epi16(-32768)));\n}\n\ninline void v_pack_store(ushort* ptr, const v_uint32x4& a)\n{\n    __m128i z = _mm_setzero_si128(), maxval32 = _mm_set1_epi32(65535), delta32 = _mm_set1_epi32(32768);\n    __m128i a1 = _mm_sub_epi32(v_select_si128(_mm_cmpgt_epi32(z, a.val), maxval32, a.val), delta32);\n    __m128i r = _mm_packs_epi32(a1, a1);\n    _mm_storel_epi64((__m128i*)ptr, _mm_sub_epi16(r, _mm_set1_epi16(-32768)));\n}\n\ntemplate<int n> inline\nv_uint16x8 v_rshr_pack(const v_uint32x4& a, const v_uint32x4& b)\n{\n    __m128i delta = _mm_set1_epi32(1 << (n-1)), delta32 = _mm_set1_epi32(32768);\n    __m128i a1 = _mm_sub_epi32(_mm_srli_epi32(_mm_add_epi32(a.val, delta), n), delta32);\n    __m128i b1 = _mm_sub_epi32(_mm_srli_epi32(_mm_add_epi32(b.val, delta), n), delta32);\n    return v_uint16x8(_mm_sub_epi16(_mm_packs_epi32(a1, b1), _mm_set1_epi16(-32768)));\n}\n\ntemplate<int n> inline\nvoid v_rshr_pack_store(ushort* ptr, const v_uint32x4& a)\n{\n    __m128i delta = _mm_set1_epi32(1 << (n-1)), delta32 = _mm_set1_epi32(32768);\n    __m128i a1 = _mm_sub_epi32(_mm_srli_epi32(_mm_add_epi32(a.val, delta), n), delta32);\n    __m128i a2 = _mm_sub_epi16(_mm_packs_epi32(a1, a1), _mm_set1_epi16(-32768));\n    _mm_storel_epi64((__m128i*)ptr, a2);\n}\n\ninline v_uint16x8 v_pack_u(const v_int32x4& a, const v_int32x4& b)\n{\n    __m128i delta32 = _mm_set1_epi32(32768);\n    __m128i r = _mm_packs_epi32(_mm_sub_epi32(a.val, delta32), _mm_sub_epi32(b.val, delta32));\n    return v_uint16x8(_mm_sub_epi16(r, _mm_set1_epi16(-32768)));\n}\n\ninline void v_pack_u_store(ushort* ptr, const v_int32x4& a)\n{\n    __m128i delta32 = _mm_set1_epi32(32768);\n    __m128i a1 = _mm_sub_epi32(a.val, delta32);\n    __m128i r = _mm_sub_epi16(_mm_packs_epi32(a1, a1), _mm_set1_epi16(-32768));\n    _mm_storel_epi64((__m128i*)ptr, r);\n}\n\ntemplate<int n> inline\nvoid v_rshr_pack_u_store(ushort* ptr, const v_int32x4& a)\n{\n    __m128i delta = _mm_set1_epi32(1 << (n-1)), delta32 = _mm_set1_epi32(32768);\n    __m128i a1 = _mm_sub_epi32(_mm_srai_epi32(_mm_add_epi32(a.val, delta), n), delta32);\n    __m128i a2 = _mm_sub_epi16(_mm_packs_epi32(a1, a1), _mm_set1_epi16(-32768));\n    _mm_storel_epi64((__m128i*)ptr, a2);\n}\n\ninline v_int16x8 v_pack(const v_int32x4& a, const v_int32x4& b)\n{ return v_int16x8(_mm_packs_epi32(a.val, b.val)); }\n\ninline void v_pack_store(short* ptr, const v_int32x4& a)\n{\n    _mm_storel_epi64((__m128i*)ptr, _mm_packs_epi32(a.val, a.val));\n}\n\ntemplate<int n> inline\nv_int16x8 v_rshr_pack(const v_int32x4& a, const v_int32x4& b)\n{\n    __m128i delta = _mm_set1_epi32(1 << (n-1));\n    return v_int16x8(_mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(a.val, delta), n),\n                                     _mm_srai_epi32(_mm_add_epi32(b.val, delta), n)));\n}\n\ntemplate<int n> inline\nvoid v_rshr_pack_store(short* ptr, const v_int32x4& a)\n{\n    __m128i delta = _mm_set1_epi32(1 << (n-1));\n    __m128i a1 = _mm_srai_epi32(_mm_add_epi32(a.val, delta), n);\n    _mm_storel_epi64((__m128i*)ptr, a1);\n}\n\n\n// [a0 0 | b0 0]  [a1 0 | b1 0]\ninline v_uint32x4 v_pack(const v_uint64x2& a, const v_uint64x2& b)\n{\n    __m128i v0 = _mm_unpacklo_epi32(a.val, b.val); // a0 a1 0 0\n    __m128i v1 = _mm_unpackhi_epi32(a.val, b.val); // b0 b1 0 0\n    return v_uint32x4(_mm_unpacklo_epi64(v0, v1));\n}\n\ninline void v_pack_store(unsigned* ptr, const v_uint64x2& a)\n{\n    __m128i a1 = _mm_shuffle_epi32(a.val, _MM_SHUFFLE(0, 2, 2, 0));\n    _mm_storel_epi64((__m128i*)ptr, a1);\n}\n\n// [a0 0 | b0 0]  [a1 0 | b1 0]\ninline v_int32x4 v_pack(const v_int64x2& a, const v_int64x2& b)\n{\n    __m128i v0 = _mm_unpacklo_epi32(a.val, b.val); // a0 a1 0 0\n    __m128i v1 = _mm_unpackhi_epi32(a.val, b.val); // b0 b1 0 0\n    return v_int32x4(_mm_unpacklo_epi64(v0, v1));\n}\n\ninline void v_pack_store(int* ptr, const v_int64x2& a)\n{\n    __m128i a1 = _mm_shuffle_epi32(a.val, _MM_SHUFFLE(0, 2, 2, 0));\n    _mm_storel_epi64((__m128i*)ptr, a1);\n}\n\ntemplate<int n> inline\nv_uint32x4 v_rshr_pack(const v_uint64x2& a, const v_uint64x2& b)\n{\n    uint64 delta = (uint64)1 << (n-1);\n    v_uint64x2 delta2(delta, delta);\n    __m128i a1 = _mm_srli_epi64(_mm_add_epi64(a.val, delta2.val), n);\n    __m128i b1 = _mm_srli_epi64(_mm_add_epi64(b.val, delta2.val), n);\n    __m128i v0 = _mm_unpacklo_epi32(a1, b1); // a0 a1 0 0\n    __m128i v1 = _mm_unpackhi_epi32(a1, b1); // b0 b1 0 0\n    return v_uint32x4(_mm_unpacklo_epi64(v0, v1));\n}\n\ntemplate<int n> inline\nvoid v_rshr_pack_store(unsigned* ptr, const v_uint64x2& a)\n{\n    uint64 delta = (uint64)1 << (n-1);\n    v_uint64x2 delta2(delta, delta);\n    __m128i a1 = _mm_srli_epi64(_mm_add_epi64(a.val, delta2.val), n);\n    __m128i a2 = _mm_shuffle_epi32(a1, _MM_SHUFFLE(0, 2, 2, 0));\n    _mm_storel_epi64((__m128i*)ptr, a2);\n}\n\ninline __m128i v_sign_epi64(__m128i a)\n{\n    return _mm_shuffle_epi32(_mm_srai_epi32(a, 31), _MM_SHUFFLE(3, 3, 1, 1)); // x m0 | x m1\n}\n\ninline __m128i v_srai_epi64(__m128i a, int imm)\n{\n    __m128i smask = v_sign_epi64(a);\n    return _mm_xor_si128(_mm_srli_epi64(_mm_xor_si128(a, smask), imm), smask);\n}\n\ntemplate<int n> inline\nv_int32x4 v_rshr_pack(const v_int64x2& a, const v_int64x2& b)\n{\n    int64 delta = (int64)1 << (n-1);\n    v_int64x2 delta2(delta, delta);\n    __m128i a1 = v_srai_epi64(_mm_add_epi64(a.val, delta2.val), n);\n    __m128i b1 = v_srai_epi64(_mm_add_epi64(b.val, delta2.val), n);\n    __m128i v0 = _mm_unpacklo_epi32(a1, b1); // a0 a1 0 0\n    __m128i v1 = _mm_unpackhi_epi32(a1, b1); // b0 b1 0 0\n    return v_int32x4(_mm_unpacklo_epi64(v0, v1));\n}\n\ntemplate<int n> inline\nvoid v_rshr_pack_store(int* ptr, const v_int64x2& a)\n{\n    int64 delta = (int64)1 << (n-1);\n    v_int64x2 delta2(delta, delta);\n    __m128i a1 = v_srai_epi64(_mm_add_epi64(a.val, delta2.val), n);\n    __m128i a2 = _mm_shuffle_epi32(a1, _MM_SHUFFLE(0, 2, 2, 0));\n    _mm_storel_epi64((__m128i*)ptr, a2);\n}\n\ninline v_float32x4 v_matmul(const v_float32x4& v, const v_float32x4& m0,\n                            const v_float32x4& m1, const v_float32x4& m2,\n                            const v_float32x4& m3)\n{\n    __m128 v0 = _mm_mul_ps(_mm_shuffle_ps(v.val, v.val, _MM_SHUFFLE(0, 0, 0, 0)), m0.val);\n    __m128 v1 = _mm_mul_ps(_mm_shuffle_ps(v.val, v.val, _MM_SHUFFLE(1, 1, 1, 1)), m1.val);\n    __m128 v2 = _mm_mul_ps(_mm_shuffle_ps(v.val, v.val, _MM_SHUFFLE(2, 2, 2, 2)), m2.val);\n    __m128 v3 = _mm_mul_ps(_mm_shuffle_ps(v.val, v.val, _MM_SHUFFLE(3, 3, 3, 3)), m3.val);\n\n    return v_float32x4(_mm_add_ps(_mm_add_ps(v0, v1), _mm_add_ps(v2, v3)));\n}\n\n\n#define OPENCV_HAL_IMPL_SSE_BIN_OP(bin_op, _Tpvec, intrin) \\\n    inline _Tpvec operator bin_op (const _Tpvec& a, const _Tpvec& b) \\\n    { \\\n        return _Tpvec(intrin(a.val, b.val)); \\\n    } \\\n    inline _Tpvec& operator bin_op##= (_Tpvec& a, const _Tpvec& b) \\\n    { \\\n        a.val = intrin(a.val, b.val); \\\n        return a; \\\n    }\n\nOPENCV_HAL_IMPL_SSE_BIN_OP(+, v_uint8x16, _mm_adds_epu8)\nOPENCV_HAL_IMPL_SSE_BIN_OP(-, v_uint8x16, _mm_subs_epu8)\nOPENCV_HAL_IMPL_SSE_BIN_OP(+, v_int8x16, _mm_adds_epi8)\nOPENCV_HAL_IMPL_SSE_BIN_OP(-, v_int8x16, _mm_subs_epi8)\nOPENCV_HAL_IMPL_SSE_BIN_OP(+, v_uint16x8, _mm_adds_epu16)\nOPENCV_HAL_IMPL_SSE_BIN_OP(-, v_uint16x8, _mm_subs_epu16)\nOPENCV_HAL_IMPL_SSE_BIN_OP(*, v_uint16x8, _mm_mullo_epi16)\nOPENCV_HAL_IMPL_SSE_BIN_OP(+, v_int16x8, _mm_adds_epi16)\nOPENCV_HAL_IMPL_SSE_BIN_OP(-, v_int16x8, _mm_subs_epi16)\nOPENCV_HAL_IMPL_SSE_BIN_OP(*, v_int16x8, _mm_mullo_epi16)\nOPENCV_HAL_IMPL_SSE_BIN_OP(+, v_uint32x4, _mm_add_epi32)\nOPENCV_HAL_IMPL_SSE_BIN_OP(-, v_uint32x4, _mm_sub_epi32)\nOPENCV_HAL_IMPL_SSE_BIN_OP(+, v_int32x4, _mm_add_epi32)\nOPENCV_HAL_IMPL_SSE_BIN_OP(-, v_int32x4, _mm_sub_epi32)\nOPENCV_HAL_IMPL_SSE_BIN_OP(+, v_float32x4, _mm_add_ps)\nOPENCV_HAL_IMPL_SSE_BIN_OP(-, v_float32x4, _mm_sub_ps)\nOPENCV_HAL_IMPL_SSE_BIN_OP(*, v_float32x4, _mm_mul_ps)\nOPENCV_HAL_IMPL_SSE_BIN_OP(/, v_float32x4, _mm_div_ps)\nOPENCV_HAL_IMPL_SSE_BIN_OP(+, v_float64x2, _mm_add_pd)\nOPENCV_HAL_IMPL_SSE_BIN_OP(-, v_float64x2, _mm_sub_pd)\nOPENCV_HAL_IMPL_SSE_BIN_OP(*, v_float64x2, _mm_mul_pd)\nOPENCV_HAL_IMPL_SSE_BIN_OP(/, v_float64x2, _mm_div_pd)\nOPENCV_HAL_IMPL_SSE_BIN_OP(+, v_uint64x2, _mm_add_epi64)\nOPENCV_HAL_IMPL_SSE_BIN_OP(-, v_uint64x2, _mm_sub_epi64)\nOPENCV_HAL_IMPL_SSE_BIN_OP(+, v_int64x2, _mm_add_epi64)\nOPENCV_HAL_IMPL_SSE_BIN_OP(-, v_int64x2, _mm_sub_epi64)\n\ninline v_uint32x4 operator * (const v_uint32x4& a, const v_uint32x4& b)\n{\n    __m128i c0 = _mm_mul_epu32(a.val, b.val);\n    __m128i c1 = _mm_mul_epu32(_mm_srli_epi64(a.val, 32), _mm_srli_epi64(b.val, 32));\n    __m128i d0 = _mm_unpacklo_epi32(c0, c1);\n    __m128i d1 = _mm_unpackhi_epi32(c0, c1);\n    return v_uint32x4(_mm_unpacklo_epi64(d0, d1));\n}\ninline v_int32x4 operator * (const v_int32x4& a, const v_int32x4& b)\n{\n    __m128i c0 = _mm_mul_epu32(a.val, b.val);\n    __m128i c1 = _mm_mul_epu32(_mm_srli_epi64(a.val, 32), _mm_srli_epi64(b.val, 32));\n    __m128i d0 = _mm_unpacklo_epi32(c0, c1);\n    __m128i d1 = _mm_unpackhi_epi32(c0, c1);\n    return v_int32x4(_mm_unpacklo_epi64(d0, d1));\n}\ninline v_uint32x4& operator *= (v_uint32x4& a, const v_uint32x4& b)\n{\n    a = a * b;\n    return a;\n}\ninline v_int32x4& operator *= (v_int32x4& a, const v_int32x4& b)\n{\n    a = a * b;\n    return a;\n}\n\ninline void v_mul_expand(const v_int16x8& a, const v_int16x8& b,\n                         v_int32x4& c, v_int32x4& d)\n{\n    __m128i v0 = _mm_mullo_epi16(a.val, b.val);\n    __m128i v1 = _mm_mulhi_epi16(a.val, b.val);\n    c.val = _mm_unpacklo_epi32(v0, v1);\n    d.val = _mm_unpackhi_epi32(v0, v1);\n}\n\ninline void v_mul_expand(const v_uint16x8& a, const v_uint16x8& b,\n                         v_uint32x4& c, v_uint32x4& d)\n{\n    __m128i v0 = _mm_mullo_epi16(a.val, b.val);\n    __m128i v1 = _mm_mulhi_epu16(a.val, b.val);\n    c.val = _mm_unpacklo_epi32(v0, v1);\n    d.val = _mm_unpackhi_epi32(v0, v1);\n}\n\ninline void v_mul_expand(const v_uint32x4& a, const v_uint32x4& b,\n                         v_uint64x2& c, v_uint64x2& d)\n{\n    __m128i c0 = _mm_mul_epu32(a.val, b.val);\n    __m128i c1 = _mm_mul_epu32(_mm_srli_epi64(a.val, 32), _mm_srli_epi64(b.val, 32));\n    c.val = _mm_unpacklo_epi64(c0, c1);\n    d.val = _mm_unpackhi_epi64(c0, c1);\n}\n\ninline v_int32x4 v_dotprod(const v_int16x8& a, const v_int16x8& b)\n{\n    return v_int32x4(_mm_madd_epi16(a.val, b.val));\n}\n\n#define OPENCV_HAL_IMPL_SSE_LOGIC_OP(_Tpvec, suffix, not_const) \\\n    OPENCV_HAL_IMPL_SSE_BIN_OP(&, _Tpvec, _mm_and_##suffix) \\\n    OPENCV_HAL_IMPL_SSE_BIN_OP(|, _Tpvec, _mm_or_##suffix) \\\n    OPENCV_HAL_IMPL_SSE_BIN_OP(^, _Tpvec, _mm_xor_##suffix) \\\n    inline _Tpvec operator ~ (const _Tpvec& a) \\\n    { \\\n        return _Tpvec(_mm_xor_##suffix(a.val, not_const)); \\\n    }\n\nOPENCV_HAL_IMPL_SSE_LOGIC_OP(v_uint8x16, si128, _mm_set1_epi32(-1))\nOPENCV_HAL_IMPL_SSE_LOGIC_OP(v_int8x16, si128, _mm_set1_epi32(-1))\nOPENCV_HAL_IMPL_SSE_LOGIC_OP(v_uint16x8, si128, _mm_set1_epi32(-1))\nOPENCV_HAL_IMPL_SSE_LOGIC_OP(v_int16x8, si128, _mm_set1_epi32(-1))\nOPENCV_HAL_IMPL_SSE_LOGIC_OP(v_uint32x4, si128, _mm_set1_epi32(-1))\nOPENCV_HAL_IMPL_SSE_LOGIC_OP(v_int32x4, si128, _mm_set1_epi32(-1))\nOPENCV_HAL_IMPL_SSE_LOGIC_OP(v_uint64x2, si128, _mm_set1_epi32(-1))\nOPENCV_HAL_IMPL_SSE_LOGIC_OP(v_int64x2, si128, _mm_set1_epi32(-1))\nOPENCV_HAL_IMPL_SSE_LOGIC_OP(v_float32x4, ps, _mm_castsi128_ps(_mm_set1_epi32(-1)))\nOPENCV_HAL_IMPL_SSE_LOGIC_OP(v_float64x2, pd, _mm_castsi128_pd(_mm_set1_epi32(-1)))\n\ninline v_float32x4 v_sqrt(const v_float32x4& x)\n{ return v_float32x4(_mm_sqrt_ps(x.val)); }\n\ninline v_float32x4 v_invsqrt(const v_float32x4& x)\n{\n    static const __m128 _0_5 = _mm_set1_ps(0.5f), _1_5 = _mm_set1_ps(1.5f);\n    __m128 t = x.val;\n    __m128 h = _mm_mul_ps(t, _0_5);\n    t = _mm_rsqrt_ps(t);\n    t = _mm_mul_ps(t, _mm_sub_ps(_1_5, _mm_mul_ps(_mm_mul_ps(t, t), h)));\n    return v_float32x4(t);\n}\n\ninline v_float64x2 v_sqrt(const v_float64x2& x)\n{ return v_float64x2(_mm_sqrt_pd(x.val)); }\n\ninline v_float64x2 v_invsqrt(const v_float64x2& x)\n{\n    static const __m128d v_1 = _mm_set1_pd(1.);\n    return v_float64x2(_mm_div_pd(v_1, _mm_sqrt_pd(x.val)));\n}\n\ninline v_float32x4 v_abs(const v_float32x4& x)\n{ return v_float32x4(_mm_and_ps(x.val, _mm_castsi128_ps(_mm_set1_epi32(0x7fffffff)))); }\ninline v_float64x2 v_abs(const v_float64x2& x)\n{\n    return v_float64x2(_mm_and_pd(x.val,\n        _mm_castsi128_pd(_mm_srli_epi64(_mm_set1_epi32(-1), 1))));\n}\n\n// TODO: exp, log, sin, cos\n\n#define OPENCV_HAL_IMPL_SSE_BIN_FUNC(_Tpvec, func, intrin) \\\ninline _Tpvec func(const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    return _Tpvec(intrin(a.val, b.val)); \\\n}\n\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_uint8x16, v_min, _mm_min_epu8)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_uint8x16, v_max, _mm_max_epu8)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_int16x8, v_min, _mm_min_epi16)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_int16x8, v_max, _mm_max_epi16)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_float32x4, v_min, _mm_min_ps)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_float32x4, v_max, _mm_max_ps)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_float64x2, v_min, _mm_min_pd)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_float64x2, v_max, _mm_max_pd)\n\ninline v_int8x16 v_min(const v_int8x16& a, const v_int8x16& b)\n{\n    __m128i delta = _mm_set1_epi8((char)-128);\n    return v_int8x16(_mm_xor_si128(delta, _mm_min_epu8(_mm_xor_si128(a.val, delta),\n                                                       _mm_xor_si128(b.val, delta))));\n}\ninline v_int8x16 v_max(const v_int8x16& a, const v_int8x16& b)\n{\n    __m128i delta = _mm_set1_epi8((char)-128);\n    return v_int8x16(_mm_xor_si128(delta, _mm_max_epu8(_mm_xor_si128(a.val, delta),\n                                                       _mm_xor_si128(b.val, delta))));\n}\ninline v_uint16x8 v_min(const v_uint16x8& a, const v_uint16x8& b)\n{\n    return v_uint16x8(_mm_subs_epu16(a.val, _mm_subs_epu16(a.val, b.val)));\n}\ninline v_uint16x8 v_max(const v_uint16x8& a, const v_uint16x8& b)\n{\n    return v_uint16x8(_mm_adds_epu16(_mm_subs_epu16(a.val, b.val), b.val));\n}\ninline v_uint32x4 v_min(const v_uint32x4& a, const v_uint32x4& b)\n{\n    __m128i delta = _mm_set1_epi32((int)0x80000000);\n    __m128i mask = _mm_cmpgt_epi32(_mm_xor_si128(a.val, delta), _mm_xor_si128(b.val, delta));\n    return v_uint32x4(v_select_si128(mask, b.val, a.val));\n}\ninline v_uint32x4 v_max(const v_uint32x4& a, const v_uint32x4& b)\n{\n    __m128i delta = _mm_set1_epi32((int)0x80000000);\n    __m128i mask = _mm_cmpgt_epi32(_mm_xor_si128(a.val, delta), _mm_xor_si128(b.val, delta));\n    return v_uint32x4(v_select_si128(mask, a.val, b.val));\n}\ninline v_int32x4 v_min(const v_int32x4& a, const v_int32x4& b)\n{\n    return v_int32x4(v_select_si128(_mm_cmpgt_epi32(a.val, b.val), b.val, a.val));\n}\ninline v_int32x4 v_max(const v_int32x4& a, const v_int32x4& b)\n{\n    return v_int32x4(v_select_si128(_mm_cmpgt_epi32(a.val, b.val), a.val, b.val));\n}\n\n#define OPENCV_HAL_IMPL_SSE_INT_CMP_OP(_Tpuvec, _Tpsvec, suffix, sbit) \\\ninline _Tpuvec operator == (const _Tpuvec& a, const _Tpuvec& b) \\\n{ return _Tpuvec(_mm_cmpeq_##suffix(a.val, b.val)); } \\\ninline _Tpuvec operator != (const _Tpuvec& a, const _Tpuvec& b) \\\n{ \\\n    __m128i not_mask = _mm_set1_epi32(-1); \\\n    return _Tpuvec(_mm_xor_si128(_mm_cmpeq_##suffix(a.val, b.val), not_mask)); \\\n} \\\ninline _Tpsvec operator == (const _Tpsvec& a, const _Tpsvec& b) \\\n{ return _Tpsvec(_mm_cmpeq_##suffix(a.val, b.val)); } \\\ninline _Tpsvec operator != (const _Tpsvec& a, const _Tpsvec& b) \\\n{ \\\n    __m128i not_mask = _mm_set1_epi32(-1); \\\n    return _Tpsvec(_mm_xor_si128(_mm_cmpeq_##suffix(a.val, b.val), not_mask)); \\\n} \\\ninline _Tpuvec operator < (const _Tpuvec& a, const _Tpuvec& b) \\\n{ \\\n    __m128i smask = _mm_set1_##suffix(sbit); \\\n    return _Tpuvec(_mm_cmpgt_##suffix(_mm_xor_si128(b.val, smask), _mm_xor_si128(a.val, smask))); \\\n} \\\ninline _Tpuvec operator > (const _Tpuvec& a, const _Tpuvec& b) \\\n{ \\\n    __m128i smask = _mm_set1_##suffix(sbit); \\\n    return _Tpuvec(_mm_cmpgt_##suffix(_mm_xor_si128(a.val, smask), _mm_xor_si128(b.val, smask))); \\\n} \\\ninline _Tpuvec operator <= (const _Tpuvec& a, const _Tpuvec& b) \\\n{ \\\n    __m128i smask = _mm_set1_##suffix(sbit); \\\n    __m128i not_mask = _mm_set1_epi32(-1); \\\n    __m128i res = _mm_cmpgt_##suffix(_mm_xor_si128(a.val, smask), _mm_xor_si128(b.val, smask)); \\\n    return _Tpuvec(_mm_xor_si128(res, not_mask)); \\\n} \\\ninline _Tpuvec operator >= (const _Tpuvec& a, const _Tpuvec& b) \\\n{ \\\n    __m128i smask = _mm_set1_##suffix(sbit); \\\n    __m128i not_mask = _mm_set1_epi32(-1); \\\n    __m128i res = _mm_cmpgt_##suffix(_mm_xor_si128(b.val, smask), _mm_xor_si128(a.val, smask)); \\\n    return _Tpuvec(_mm_xor_si128(res, not_mask)); \\\n} \\\ninline _Tpsvec operator < (const _Tpsvec& a, const _Tpsvec& b) \\\n{ \\\n    return _Tpsvec(_mm_cmpgt_##suffix(b.val, a.val)); \\\n} \\\ninline _Tpsvec operator > (const _Tpsvec& a, const _Tpsvec& b) \\\n{ \\\n    return _Tpsvec(_mm_cmpgt_##suffix(a.val, b.val)); \\\n} \\\ninline _Tpsvec operator <= (const _Tpsvec& a, const _Tpsvec& b) \\\n{ \\\n    __m128i not_mask = _mm_set1_epi32(-1); \\\n    return _Tpsvec(_mm_xor_si128(_mm_cmpgt_##suffix(a.val, b.val), not_mask)); \\\n} \\\ninline _Tpsvec operator >= (const _Tpsvec& a, const _Tpsvec& b) \\\n{ \\\n    __m128i not_mask = _mm_set1_epi32(-1); \\\n    return _Tpsvec(_mm_xor_si128(_mm_cmpgt_##suffix(b.val, a.val), not_mask)); \\\n}\n\nOPENCV_HAL_IMPL_SSE_INT_CMP_OP(v_uint8x16, v_int8x16, epi8, (char)-128)\nOPENCV_HAL_IMPL_SSE_INT_CMP_OP(v_uint16x8, v_int16x8, epi16, (short)-32768)\nOPENCV_HAL_IMPL_SSE_INT_CMP_OP(v_uint32x4, v_int32x4, epi32, (int)0x80000000)\n\n#define OPENCV_HAL_IMPL_SSE_FLT_CMP_OP(_Tpvec, suffix) \\\ninline _Tpvec operator == (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(_mm_cmpeq_##suffix(a.val, b.val)); } \\\ninline _Tpvec operator != (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(_mm_cmpneq_##suffix(a.val, b.val)); } \\\ninline _Tpvec operator < (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(_mm_cmplt_##suffix(a.val, b.val)); } \\\ninline _Tpvec operator > (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(_mm_cmpgt_##suffix(a.val, b.val)); } \\\ninline _Tpvec operator <= (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(_mm_cmple_##suffix(a.val, b.val)); } \\\ninline _Tpvec operator >= (const _Tpvec& a, const _Tpvec& b) \\\n{ return _Tpvec(_mm_cmpge_##suffix(a.val, b.val)); }\n\nOPENCV_HAL_IMPL_SSE_FLT_CMP_OP(v_float32x4, ps)\nOPENCV_HAL_IMPL_SSE_FLT_CMP_OP(v_float64x2, pd)\n\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_uint8x16, v_add_wrap, _mm_add_epi8)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_int8x16, v_add_wrap, _mm_add_epi8)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_uint16x8, v_add_wrap, _mm_add_epi16)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_int16x8, v_add_wrap, _mm_add_epi16)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_uint8x16, v_sub_wrap, _mm_sub_epi8)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_int8x16, v_sub_wrap, _mm_sub_epi8)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_uint16x8, v_sub_wrap, _mm_sub_epi16)\nOPENCV_HAL_IMPL_SSE_BIN_FUNC(v_int16x8, v_sub_wrap, _mm_sub_epi16)\n\n#define OPENCV_HAL_IMPL_SSE_ABSDIFF_8_16(_Tpuvec, _Tpsvec, bits, smask32) \\\ninline _Tpuvec v_absdiff(const _Tpuvec& a, const _Tpuvec& b) \\\n{ \\\n    return _Tpuvec(_mm_add_epi##bits(_mm_subs_epu##bits(a.val, b.val), _mm_subs_epu##bits(b.val, a.val))); \\\n} \\\ninline _Tpuvec v_absdiff(const _Tpsvec& a, const _Tpsvec& b) \\\n{ \\\n    __m128i smask = _mm_set1_epi32(smask32); \\\n    __m128i a1 = _mm_xor_si128(a.val, smask); \\\n    __m128i b1 = _mm_xor_si128(b.val, smask); \\\n    return _Tpuvec(_mm_add_epi##bits(_mm_subs_epu##bits(a1, b1), _mm_subs_epu##bits(b1, a1))); \\\n}\n\nOPENCV_HAL_IMPL_SSE_ABSDIFF_8_16(v_uint8x16, v_int8x16, 8, (int)0x80808080)\nOPENCV_HAL_IMPL_SSE_ABSDIFF_8_16(v_uint16x8, v_int16x8, 16, (int)0x80008000)\n\n#define OPENCV_HAL_IMPL_SSE_MISC_FLT_OP(_Tpvec, _Tp, _Tpreg, suffix, absmask_vec) \\\ninline _Tpvec v_absdiff(const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    _Tpreg absmask = _mm_castsi128_##suffix(absmask_vec); \\\n    return _Tpvec(_mm_and_##suffix(_mm_sub_##suffix(a.val, b.val), absmask)); \\\n} \\\ninline _Tpvec v_magnitude(const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    _Tpreg res = _mm_add_##suffix(_mm_mul_##suffix(a.val, a.val), _mm_mul_##suffix(b.val, b.val)); \\\n    return _Tpvec(_mm_sqrt_##suffix(res)); \\\n} \\\ninline _Tpvec v_sqr_magnitude(const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    _Tpreg res = _mm_add_##suffix(_mm_mul_##suffix(a.val, a.val), _mm_mul_##suffix(b.val, b.val)); \\\n    return _Tpvec(res); \\\n} \\\ninline _Tpvec v_muladd(const _Tpvec& a, const _Tpvec& b, const _Tpvec& c) \\\n{ \\\n    return _Tpvec(_mm_add_##suffix(_mm_mul_##suffix(a.val, b.val), c.val)); \\\n}\n\nOPENCV_HAL_IMPL_SSE_MISC_FLT_OP(v_float32x4, float, __m128, ps, _mm_set1_epi32((int)0x7fffffff))\nOPENCV_HAL_IMPL_SSE_MISC_FLT_OP(v_float64x2, double, __m128d, pd, _mm_srli_epi64(_mm_set1_epi32(-1), 1))\n\n#define OPENCV_HAL_IMPL_SSE_SHIFT_OP(_Tpuvec, _Tpsvec, suffix, srai) \\\ninline _Tpuvec operator << (const _Tpuvec& a, int imm) \\\n{ \\\n    return _Tpuvec(_mm_slli_##suffix(a.val, imm)); \\\n} \\\ninline _Tpsvec operator << (const _Tpsvec& a, int imm) \\\n{ \\\n    return _Tpsvec(_mm_slli_##suffix(a.val, imm)); \\\n} \\\ninline _Tpuvec operator >> (const _Tpuvec& a, int imm) \\\n{ \\\n    return _Tpuvec(_mm_srli_##suffix(a.val, imm)); \\\n} \\\ninline _Tpsvec operator >> (const _Tpsvec& a, int imm) \\\n{ \\\n    return _Tpsvec(srai(a.val, imm)); \\\n} \\\ntemplate<int imm> \\\ninline _Tpuvec v_shl(const _Tpuvec& a) \\\n{ \\\n    return _Tpuvec(_mm_slli_##suffix(a.val, imm)); \\\n} \\\ntemplate<int imm> \\\ninline _Tpsvec v_shl(const _Tpsvec& a) \\\n{ \\\n    return _Tpsvec(_mm_slli_##suffix(a.val, imm)); \\\n} \\\ntemplate<int imm> \\\ninline _Tpuvec v_shr(const _Tpuvec& a) \\\n{ \\\n    return _Tpuvec(_mm_srli_##suffix(a.val, imm)); \\\n} \\\ntemplate<int imm> \\\ninline _Tpsvec v_shr(const _Tpsvec& a) \\\n{ \\\n    return _Tpsvec(srai(a.val, imm)); \\\n}\n\nOPENCV_HAL_IMPL_SSE_SHIFT_OP(v_uint16x8, v_int16x8, epi16, _mm_srai_epi16)\nOPENCV_HAL_IMPL_SSE_SHIFT_OP(v_uint32x4, v_int32x4, epi32, _mm_srai_epi32)\nOPENCV_HAL_IMPL_SSE_SHIFT_OP(v_uint64x2, v_int64x2, epi64, v_srai_epi64)\n\n#define OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(_Tpvec, _Tp) \\\ninline _Tpvec v_load(const _Tp* ptr) \\\n{ return _Tpvec(_mm_loadu_si128((const __m128i*)ptr)); } \\\ninline _Tpvec v_load_aligned(const _Tp* ptr) \\\n{ return _Tpvec(_mm_load_si128((const __m128i*)ptr)); } \\\ninline _Tpvec v_load_halves(const _Tp* ptr0, const _Tp* ptr1) \\\n{ \\\n    return _Tpvec(_mm_unpacklo_epi64(_mm_loadl_epi64((const __m128i*)ptr0), \\\n                                     _mm_loadl_epi64((const __m128i*)ptr1))); \\\n} \\\ninline void v_store(_Tp* ptr, const _Tpvec& a) \\\n{ _mm_storeu_si128((__m128i*)ptr, a.val); } \\\ninline void v_store_aligned(_Tp* ptr, const _Tpvec& a) \\\n{ _mm_store_si128((__m128i*)ptr, a.val); } \\\ninline void v_store_low(_Tp* ptr, const _Tpvec& a) \\\n{ _mm_storel_epi64((__m128i*)ptr, a.val); } \\\ninline void v_store_high(_Tp* ptr, const _Tpvec& a) \\\n{ _mm_storel_epi64((__m128i*)ptr, _mm_unpackhi_epi64(a.val, a.val)); }\n\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_uint8x16, uchar)\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_int8x16, schar)\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_uint16x8, ushort)\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_int16x8, short)\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_uint32x4, unsigned)\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_int32x4, int)\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_uint64x2, uint64)\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_int64x2, int64)\n\n#define OPENCV_HAL_IMPL_SSE_LOADSTORE_FLT_OP(_Tpvec, _Tp, suffix) \\\ninline _Tpvec v_load(const _Tp* ptr) \\\n{ return _Tpvec(_mm_loadu_##suffix(ptr)); } \\\ninline _Tpvec v_load_aligned(const _Tp* ptr) \\\n{ return _Tpvec(_mm_load_##suffix(ptr)); } \\\ninline _Tpvec v_load_halves(const _Tp* ptr0, const _Tp* ptr1) \\\n{ \\\n    return _Tpvec(_mm_castsi128_##suffix( \\\n        _mm_unpacklo_epi64(_mm_loadl_epi64((const __m128i*)ptr0), \\\n                           _mm_loadl_epi64((const __m128i*)ptr1)))); \\\n} \\\ninline void v_store(_Tp* ptr, const _Tpvec& a) \\\n{ _mm_storeu_##suffix(ptr, a.val); } \\\ninline void v_store_aligned(_Tp* ptr, const _Tpvec& a) \\\n{ _mm_store_##suffix(ptr, a.val); } \\\ninline void v_store_low(_Tp* ptr, const _Tpvec& a) \\\n{ _mm_storel_epi64((__m128i*)ptr, _mm_cast##suffix##_si128(a.val)); } \\\ninline void v_store_high(_Tp* ptr, const _Tpvec& a) \\\n{ \\\n    __m128i a1 = _mm_cast##suffix##_si128(a.val); \\\n    _mm_storel_epi64((__m128i*)ptr, _mm_unpackhi_epi64(a1, a1)); \\\n}\n\nOPENCV_HAL_IMPL_SSE_LOADSTORE_FLT_OP(v_float32x4, float, ps)\nOPENCV_HAL_IMPL_SSE_LOADSTORE_FLT_OP(v_float64x2, double, pd)\n\n#define OPENCV_HAL_IMPL_SSE_REDUCE_OP_4(_Tpvec, scalartype, func, scalar_func) \\\ninline scalartype v_reduce_##func(const _Tpvec& a) \\\n{ \\\n    scalartype CV_DECL_ALIGNED(16) buf[4]; \\\n    v_store_aligned(buf, a); \\\n    scalartype s0 = scalar_func(buf[0], buf[1]); \\\n    scalartype s1 = scalar_func(buf[2], buf[3]); \\\n    return scalar_func(s0, s1); \\\n}\n\nOPENCV_HAL_IMPL_SSE_REDUCE_OP_4(v_uint32x4, unsigned, sum, OPENCV_HAL_ADD)\nOPENCV_HAL_IMPL_SSE_REDUCE_OP_4(v_uint32x4, unsigned, max, std::max)\nOPENCV_HAL_IMPL_SSE_REDUCE_OP_4(v_uint32x4, unsigned, min, std::min)\nOPENCV_HAL_IMPL_SSE_REDUCE_OP_4(v_int32x4, int, sum, OPENCV_HAL_ADD)\nOPENCV_HAL_IMPL_SSE_REDUCE_OP_4(v_int32x4, int, max, std::max)\nOPENCV_HAL_IMPL_SSE_REDUCE_OP_4(v_int32x4, int, min, std::min)\nOPENCV_HAL_IMPL_SSE_REDUCE_OP_4(v_float32x4, float, sum, OPENCV_HAL_ADD)\nOPENCV_HAL_IMPL_SSE_REDUCE_OP_4(v_float32x4, float, max, std::max)\nOPENCV_HAL_IMPL_SSE_REDUCE_OP_4(v_float32x4, float, min, std::min)\n\n#define OPENCV_HAL_IMPL_SSE_CHECK_SIGNS(_Tpvec, suffix, pack_op, and_op, signmask, allmask) \\\ninline int v_signmask(const _Tpvec& a) \\\n{ \\\n    return and_op(_mm_movemask_##suffix(pack_op(a.val)), signmask); \\\n} \\\ninline bool v_check_all(const _Tpvec& a) \\\n{ return and_op(_mm_movemask_##suffix(a.val), allmask) == allmask; } \\\ninline bool v_check_any(const _Tpvec& a) \\\n{ return and_op(_mm_movemask_##suffix(a.val), allmask) != 0; }\n\n#define OPENCV_HAL_PACKS(a) _mm_packs_epi16(a, a)\ninline __m128i v_packq_epi32(__m128i a)\n{\n    __m128i b = _mm_packs_epi32(a, a);\n    return _mm_packs_epi16(b, b);\n}\n\nOPENCV_HAL_IMPL_SSE_CHECK_SIGNS(v_uint8x16, epi8, OPENCV_HAL_NOP, OPENCV_HAL_1ST, 65535, 65535)\nOPENCV_HAL_IMPL_SSE_CHECK_SIGNS(v_int8x16, epi8, OPENCV_HAL_NOP, OPENCV_HAL_1ST, 65535, 65535)\nOPENCV_HAL_IMPL_SSE_CHECK_SIGNS(v_uint16x8, epi8, OPENCV_HAL_PACKS, OPENCV_HAL_AND, 255, (int)0xaaaa)\nOPENCV_HAL_IMPL_SSE_CHECK_SIGNS(v_int16x8, epi8, OPENCV_HAL_PACKS, OPENCV_HAL_AND, 255, (int)0xaaaa)\nOPENCV_HAL_IMPL_SSE_CHECK_SIGNS(v_uint32x4, epi8, v_packq_epi32, OPENCV_HAL_AND, 15, (int)0x8888)\nOPENCV_HAL_IMPL_SSE_CHECK_SIGNS(v_int32x4, epi8, v_packq_epi32, OPENCV_HAL_AND, 15, (int)0x8888)\nOPENCV_HAL_IMPL_SSE_CHECK_SIGNS(v_float32x4, ps, OPENCV_HAL_NOP, OPENCV_HAL_1ST, 15, 15)\nOPENCV_HAL_IMPL_SSE_CHECK_SIGNS(v_float64x2, pd, OPENCV_HAL_NOP, OPENCV_HAL_1ST, 3, 3)\n\n#define OPENCV_HAL_IMPL_SSE_SELECT(_Tpvec, suffix) \\\ninline _Tpvec v_select(const _Tpvec& mask, const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    return _Tpvec(_mm_xor_##suffix(b.val, _mm_and_##suffix(_mm_xor_##suffix(b.val, a.val), mask.val))); \\\n}\n\nOPENCV_HAL_IMPL_SSE_SELECT(v_uint8x16, si128)\nOPENCV_HAL_IMPL_SSE_SELECT(v_int8x16, si128)\nOPENCV_HAL_IMPL_SSE_SELECT(v_uint16x8, si128)\nOPENCV_HAL_IMPL_SSE_SELECT(v_int16x8, si128)\nOPENCV_HAL_IMPL_SSE_SELECT(v_uint32x4, si128)\nOPENCV_HAL_IMPL_SSE_SELECT(v_int32x4, si128)\nOPENCV_HAL_IMPL_SSE_SELECT(v_uint64x2, si128)\nOPENCV_HAL_IMPL_SSE_SELECT(v_int64x2, si128)\nOPENCV_HAL_IMPL_SSE_SELECT(v_float32x4, ps)\nOPENCV_HAL_IMPL_SSE_SELECT(v_float64x2, pd)\n\n#define OPENCV_HAL_IMPL_SSE_EXPAND(_Tpuvec, _Tpwuvec, _Tpu, _Tpsvec, _Tpwsvec, _Tps, suffix, wsuffix, shift) \\\ninline void v_expand(const _Tpuvec& a, _Tpwuvec& b0, _Tpwuvec& b1) \\\n{ \\\n    __m128i z = _mm_setzero_si128(); \\\n    b0.val = _mm_unpacklo_##suffix(a.val, z); \\\n    b1.val = _mm_unpackhi_##suffix(a.val, z); \\\n} \\\ninline _Tpwuvec v_load_expand(const _Tpu* ptr) \\\n{ \\\n    __m128i z = _mm_setzero_si128(); \\\n    return _Tpwuvec(_mm_unpacklo_##suffix(_mm_loadl_epi64((const __m128i*)ptr), z)); \\\n} \\\ninline void v_expand(const _Tpsvec& a, _Tpwsvec& b0, _Tpwsvec& b1) \\\n{ \\\n    b0.val = _mm_srai_##wsuffix(_mm_unpacklo_##suffix(a.val, a.val), shift); \\\n    b1.val = _mm_srai_##wsuffix(_mm_unpackhi_##suffix(a.val, a.val), shift); \\\n} \\\ninline _Tpwsvec v_load_expand(const _Tps* ptr) \\\n{ \\\n    __m128i a = _mm_loadl_epi64((const __m128i*)ptr); \\\n    return _Tpwsvec(_mm_srai_##wsuffix(_mm_unpacklo_##suffix(a, a), shift)); \\\n}\n\nOPENCV_HAL_IMPL_SSE_EXPAND(v_uint8x16, v_uint16x8, uchar, v_int8x16, v_int16x8, schar, epi8, epi16, 8)\nOPENCV_HAL_IMPL_SSE_EXPAND(v_uint16x8, v_uint32x4, ushort, v_int16x8, v_int32x4, short, epi16, epi32, 16)\n\ninline void v_expand(const v_uint32x4& a, v_uint64x2& b0, v_uint64x2& b1)\n{\n    __m128i z = _mm_setzero_si128();\n    b0.val = _mm_unpacklo_epi32(a.val, z);\n    b1.val = _mm_unpackhi_epi32(a.val, z);\n}\ninline v_uint64x2 v_load_expand(const unsigned* ptr)\n{\n    __m128i z = _mm_setzero_si128();\n    return v_uint64x2(_mm_unpacklo_epi32(_mm_loadl_epi64((const __m128i*)ptr), z));\n}\ninline void v_expand(const v_int32x4& a, v_int64x2& b0, v_int64x2& b1)\n{\n    __m128i s = _mm_srai_epi32(a.val, 31);\n    b0.val = _mm_unpacklo_epi32(a.val, s);\n    b1.val = _mm_unpackhi_epi32(a.val, s);\n}\ninline v_int64x2 v_load_expand(const int* ptr)\n{\n    __m128i a = _mm_loadl_epi64((const __m128i*)ptr);\n    __m128i s = _mm_srai_epi32(a, 31);\n    return v_int64x2(_mm_unpacklo_epi32(a, s));\n}\n\ninline v_uint32x4 v_load_expand_q(const uchar* ptr)\n{\n    __m128i z = _mm_setzero_si128();\n    __m128i a = _mm_cvtsi32_si128(*(const int*)ptr);\n    return v_uint32x4(_mm_unpacklo_epi16(_mm_unpacklo_epi8(a, z), z));\n}\n\ninline v_int32x4 v_load_expand_q(const schar* ptr)\n{\n    __m128i a = _mm_cvtsi32_si128(*(const int*)ptr);\n    a = _mm_unpacklo_epi8(a, a);\n    a = _mm_unpacklo_epi8(a, a);\n    return v_int32x4(_mm_srai_epi32(a, 24));\n}\n\n#define OPENCV_HAL_IMPL_SSE_UNPACKS(_Tpvec, suffix, cast_from, cast_to) \\\ninline void v_zip(const _Tpvec& a0, const _Tpvec& a1, _Tpvec& b0, _Tpvec& b1) \\\n{ \\\n    b0.val = _mm_unpacklo_##suffix(a0.val, a1.val); \\\n    b1.val = _mm_unpackhi_##suffix(a0.val, a1.val); \\\n} \\\ninline _Tpvec v_combine_low(const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    __m128i a1 = cast_from(a.val), b1 = cast_from(b.val); \\\n    return _Tpvec(cast_to(_mm_unpacklo_epi64(a1, b1))); \\\n} \\\ninline _Tpvec v_combine_high(const _Tpvec& a, const _Tpvec& b) \\\n{ \\\n    __m128i a1 = cast_from(a.val), b1 = cast_from(b.val); \\\n    return _Tpvec(cast_to(_mm_unpackhi_epi64(a1, b1))); \\\n} \\\ninline void v_recombine(const _Tpvec& a, const _Tpvec& b, _Tpvec& c, _Tpvec& d) \\\n{ \\\n    __m128i a1 = cast_from(a.val), b1 = cast_from(b.val); \\\n    c.val = cast_to(_mm_unpacklo_epi64(a1, b1)); \\\n    d.val = cast_to(_mm_unpackhi_epi64(a1, b1)); \\\n}\n\nOPENCV_HAL_IMPL_SSE_UNPACKS(v_uint8x16, epi8, OPENCV_HAL_NOP, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_UNPACKS(v_int8x16, epi8, OPENCV_HAL_NOP, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_UNPACKS(v_uint16x8, epi16, OPENCV_HAL_NOP, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_UNPACKS(v_int16x8, epi16, OPENCV_HAL_NOP, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_UNPACKS(v_uint32x4, epi32, OPENCV_HAL_NOP, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_UNPACKS(v_int32x4, epi32, OPENCV_HAL_NOP, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_UNPACKS(v_float32x4, ps, _mm_castps_si128, _mm_castsi128_ps)\nOPENCV_HAL_IMPL_SSE_UNPACKS(v_float64x2, pd, _mm_castpd_si128, _mm_castsi128_pd)\n\ninline v_int32x4 v_round(const v_float32x4& a)\n{ return v_int32x4(_mm_cvtps_epi32(a.val)); }\n\ninline v_int32x4 v_floor(const v_float32x4& a)\n{\n    __m128i a1 = _mm_cvtps_epi32(a.val);\n    __m128i mask = _mm_castps_si128(_mm_cmpgt_ps(_mm_cvtepi32_ps(a1), a.val));\n    return v_int32x4(_mm_add_epi32(a1, mask));\n}\n\ninline v_int32x4 v_ceil(const v_float32x4& a)\n{\n    __m128i a1 = _mm_cvtps_epi32(a.val);\n    __m128i mask = _mm_castps_si128(_mm_cmpgt_ps(a.val, _mm_cvtepi32_ps(a1)));\n    return v_int32x4(_mm_sub_epi32(a1, mask));\n}\n\ninline v_int32x4 v_trunc(const v_float32x4& a)\n{ return v_int32x4(_mm_cvttps_epi32(a.val)); }\n\ninline v_int32x4 v_round(const v_float64x2& a)\n{ return v_int32x4(_mm_cvtpd_epi32(a.val)); }\n\ninline v_int32x4 v_floor(const v_float64x2& a)\n{\n    __m128i a1 = _mm_cvtpd_epi32(a.val);\n    __m128i mask = _mm_castpd_si128(_mm_cmpgt_pd(_mm_cvtepi32_pd(a1), a.val));\n    mask = _mm_srli_si128(_mm_slli_si128(mask, 4), 8); // m0 m0 m1 m1 => m0 m1 0 0\n    return v_int32x4(_mm_add_epi32(a1, mask));\n}\n\ninline v_int32x4 v_ceil(const v_float64x2& a)\n{\n    __m128i a1 = _mm_cvtpd_epi32(a.val);\n    __m128i mask = _mm_castpd_si128(_mm_cmpgt_pd(a.val, _mm_cvtepi32_pd(a1)));\n    mask = _mm_srli_si128(_mm_slli_si128(mask, 4), 8); // m0 m0 m1 m1 => m0 m1 0 0\n    return v_int32x4(_mm_sub_epi32(a1, mask));\n}\n\ninline v_int32x4 v_trunc(const v_float64x2& a)\n{ return v_int32x4(_mm_cvttpd_epi32(a.val)); }\n\n#define OPENCV_HAL_IMPL_SSE_TRANSPOSE4x4(_Tpvec, suffix, cast_from, cast_to) \\\ninline void v_transpose4x4(const _Tpvec& a0, const _Tpvec& a1, \\\n                           const _Tpvec& a2, const _Tpvec& a3, \\\n                           _Tpvec& b0, _Tpvec& b1, \\\n                           _Tpvec& b2, _Tpvec& b3) \\\n{ \\\n    __m128i t0 = cast_from(_mm_unpacklo_##suffix(a0.val, a1.val)); \\\n    __m128i t1 = cast_from(_mm_unpacklo_##suffix(a2.val, a3.val)); \\\n    __m128i t2 = cast_from(_mm_unpackhi_##suffix(a0.val, a1.val)); \\\n    __m128i t3 = cast_from(_mm_unpackhi_##suffix(a2.val, a3.val)); \\\n\\\n    b0.val = cast_to(_mm_unpacklo_epi64(t0, t1)); \\\n    b1.val = cast_to(_mm_unpackhi_epi64(t0, t1)); \\\n    b2.val = cast_to(_mm_unpacklo_epi64(t2, t3)); \\\n    b3.val = cast_to(_mm_unpackhi_epi64(t2, t3)); \\\n}\n\nOPENCV_HAL_IMPL_SSE_TRANSPOSE4x4(v_uint32x4, epi32, OPENCV_HAL_NOP, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_TRANSPOSE4x4(v_int32x4, epi32, OPENCV_HAL_NOP, OPENCV_HAL_NOP)\nOPENCV_HAL_IMPL_SSE_TRANSPOSE4x4(v_float32x4, ps, _mm_castps_si128, _mm_castsi128_ps)\n\n// adopted from sse_utils.hpp\ninline void v_load_deinterleave(const uchar* ptr, v_uint8x16& a, v_uint8x16& b, v_uint8x16& c)\n{\n    __m128i t00 = _mm_loadu_si128((const __m128i*)ptr);\n    __m128i t01 = _mm_loadu_si128((const __m128i*)(ptr + 16));\n    __m128i t02 = _mm_loadu_si128((const __m128i*)(ptr + 32));\n\n    __m128i t10 = _mm_unpacklo_epi8(t00, _mm_unpackhi_epi64(t01, t01));\n    __m128i t11 = _mm_unpacklo_epi8(_mm_unpackhi_epi64(t00, t00), t02);\n    __m128i t12 = _mm_unpacklo_epi8(t01, _mm_unpackhi_epi64(t02, t02));\n\n    __m128i t20 = _mm_unpacklo_epi8(t10, _mm_unpackhi_epi64(t11, t11));\n    __m128i t21 = _mm_unpacklo_epi8(_mm_unpackhi_epi64(t10, t10), t12);\n    __m128i t22 = _mm_unpacklo_epi8(t11, _mm_unpackhi_epi64(t12, t12));\n\n    __m128i t30 = _mm_unpacklo_epi8(t20, _mm_unpackhi_epi64(t21, t21));\n    __m128i t31 = _mm_unpacklo_epi8(_mm_unpackhi_epi64(t20, t20), t22);\n    __m128i t32 = _mm_unpacklo_epi8(t21, _mm_unpackhi_epi64(t22, t22));\n\n    a.val = _mm_unpacklo_epi8(t30, _mm_unpackhi_epi64(t31, t31));\n    b.val = _mm_unpacklo_epi8(_mm_unpackhi_epi64(t30, t30), t32);\n    c.val = _mm_unpacklo_epi8(t31, _mm_unpackhi_epi64(t32, t32));\n}\n\ninline void v_load_deinterleave(const uchar* ptr, v_uint8x16& a, v_uint8x16& b, v_uint8x16& c, v_uint8x16& d)\n{\n    __m128i u0 = _mm_loadu_si128((const __m128i*)ptr); // a0 b0 c0 d0 a1 b1 c1 d1 ...\n    __m128i u1 = _mm_loadu_si128((const __m128i*)(ptr + 16)); // a4 b4 c4 d4 ...\n    __m128i u2 = _mm_loadu_si128((const __m128i*)(ptr + 32)); // a8 b8 c8 d8 ...\n    __m128i u3 = _mm_loadu_si128((const __m128i*)(ptr + 48)); // a12 b12 c12 d12 ...\n\n    __m128i v0 = _mm_unpacklo_epi8(u0, u2); // a0 a8 b0 b8 ...\n    __m128i v1 = _mm_unpackhi_epi8(u0, u2); // a2 a10 b2 b10 ...\n    __m128i v2 = _mm_unpacklo_epi8(u1, u3); // a4 a12 b4 b12 ...\n    __m128i v3 = _mm_unpackhi_epi8(u1, u3); // a6 a14 b4 b14 ...\n\n    u0 = _mm_unpacklo_epi8(v0, v2); // a0 a4 a8 a12 ...\n    u1 = _mm_unpacklo_epi8(v1, v3); // a2 a6 a10 a14 ...\n    u2 = _mm_unpackhi_epi8(v0, v2); // a1 a5 a9 a13 ...\n    u3 = _mm_unpackhi_epi8(v1, v3); // a3 a7 a11 a15 ...\n\n    v0 = _mm_unpacklo_epi8(u0, u1); // a0 a2 a4 a6 ...\n    v1 = _mm_unpacklo_epi8(u2, u3); // a1 a3 a5 a7 ...\n    v2 = _mm_unpackhi_epi8(u0, u1); // b0 b2 b4 b6 ...\n    v3 = _mm_unpackhi_epi8(u2, u3); // b1 b3 b5 b7 ...\n\n    a.val = _mm_unpacklo_epi8(v0, v1);\n    b.val = _mm_unpacklo_epi8(v2, v3);\n    c.val = _mm_unpackhi_epi8(v0, v1);\n    d.val = _mm_unpacklo_epi8(v2, v3);\n}\n\ninline void v_load_deinterleave(const ushort* ptr, v_uint16x8& a, v_uint16x8& b, v_uint16x8& c)\n{\n    __m128i t00 = _mm_loadu_si128((const __m128i*)ptr);\n    __m128i t01 = _mm_loadu_si128((const __m128i*)(ptr + 8));\n    __m128i t02 = _mm_loadu_si128((const __m128i*)(ptr + 16));\n\n    __m128i t10 = _mm_unpacklo_epi16(t00, _mm_unpackhi_epi64(t01, t01));\n    __m128i t11 = _mm_unpacklo_epi16(_mm_unpackhi_epi64(t00, t00), t02);\n    __m128i t12 = _mm_unpacklo_epi16(t01, _mm_unpackhi_epi64(t02, t02));\n\n    __m128i t20 = _mm_unpacklo_epi16(t10, _mm_unpackhi_epi64(t11, t11));\n    __m128i t21 = _mm_unpacklo_epi16(_mm_unpackhi_epi64(t10, t10), t12);\n    __m128i t22 = _mm_unpacklo_epi16(t11, _mm_unpackhi_epi64(t12, t12));\n\n    a.val = _mm_unpacklo_epi16(t20, _mm_unpackhi_epi64(t21, t21));\n    b.val = _mm_unpacklo_epi16(_mm_unpackhi_epi64(t20, t20), t22);\n    c.val = _mm_unpacklo_epi16(t21, _mm_unpackhi_epi64(t22, t22));\n}\n\ninline void v_load_deinterleave(const ushort* ptr, v_uint16x8& a, v_uint16x8& b, v_uint16x8& c, v_uint16x8& d)\n{\n    __m128i u0 = _mm_loadu_si128((const __m128i*)ptr); // a0 b0 c0 d0 a1 b1 c1 d1\n    __m128i u1 = _mm_loadu_si128((const __m128i*)(ptr + 8)); // a2 b2 c2 d2 ...\n    __m128i u2 = _mm_loadu_si128((const __m128i*)(ptr + 16)); // a4 b4 c4 d4 ...\n    __m128i u3 = _mm_loadu_si128((const __m128i*)(ptr + 24)); // a6 b6 c6 d6 ...\n\n    __m128i v0 = _mm_unpacklo_epi16(u0, u2); // a0 a4 b0 b4 ...\n    __m128i v1 = _mm_unpackhi_epi16(u0, u2); // a1 a5 b1 b5 ...\n    __m128i v2 = _mm_unpacklo_epi16(u1, u3); // a2 a6 b2 b6 ...\n    __m128i v3 = _mm_unpackhi_epi16(u1, u3); // a3 a7 b3 b7 ...\n\n    u0 = _mm_unpacklo_epi16(v0, v2); // a0 a2 a4 a6 ...\n    u1 = _mm_unpacklo_epi16(v1, v3); // a1 a3 a5 a7 ...\n    u2 = _mm_unpackhi_epi16(v0, v2); // c0 c2 c4 c6 ...\n    u3 = _mm_unpackhi_epi16(v1, v3); // c1 c3 c5 c7 ...\n\n    a.val = _mm_unpacklo_epi16(u0, u1);\n    b.val = _mm_unpackhi_epi16(u0, u1);\n    c.val = _mm_unpacklo_epi16(u2, u3);\n    d.val = _mm_unpackhi_epi16(u2, u3);\n}\n\ninline void v_load_deinterleave(const unsigned* ptr, v_uint32x4& a, v_uint32x4& b, v_uint32x4& c)\n{\n    __m128i t00 = _mm_loadu_si128((const __m128i*)ptr);\n    __m128i t01 = _mm_loadu_si128((const __m128i*)(ptr + 4));\n    __m128i t02 = _mm_loadu_si128((const __m128i*)(ptr + 8));\n\n    __m128i t10 = _mm_unpacklo_epi32(t00, _mm_unpackhi_epi64(t01, t01));\n    __m128i t11 = _mm_unpacklo_epi32(_mm_unpackhi_epi64(t00, t00), t02);\n    __m128i t12 = _mm_unpacklo_epi32(t01, _mm_unpackhi_epi64(t02, t02));\n\n    a.val = _mm_unpacklo_epi32(t10, _mm_unpackhi_epi64(t11, t11));\n    b.val = _mm_unpacklo_epi32(_mm_unpackhi_epi64(t10, t10), t12);\n    c.val = _mm_unpacklo_epi32(t11, _mm_unpackhi_epi64(t12, t12));\n}\n\ninline void v_load_deinterleave(const unsigned* ptr, v_uint32x4& a, v_uint32x4& b, v_uint32x4& c, v_uint32x4& d)\n{\n    v_uint32x4 u0(_mm_loadu_si128((const __m128i*)ptr));        // a0 b0 c0 d0\n    v_uint32x4 u1(_mm_loadu_si128((const __m128i*)(ptr + 4))); // a1 b1 c1 d1\n    v_uint32x4 u2(_mm_loadu_si128((const __m128i*)(ptr + 8))); // a2 b2 c2 d2\n    v_uint32x4 u3(_mm_loadu_si128((const __m128i*)(ptr + 12))); // a3 b3 c3 d3\n\n    v_transpose4x4(u0, u1, u2, u3, a, b, c, d);\n}\n\ninline void v_store_interleave( uchar* ptr, const v_uint8x16& a, const v_uint8x16& b,\n                                const v_uint8x16& c )\n{\n    __m128i z = _mm_setzero_si128();\n    __m128i ab0 = _mm_unpacklo_epi8(a.val, b.val);\n    __m128i ab1 = _mm_unpackhi_epi8(a.val, b.val);\n    __m128i c0 = _mm_unpacklo_epi8(c.val, z);\n    __m128i c1 = _mm_unpackhi_epi8(c.val, z);\n\n    __m128i p00 = _mm_unpacklo_epi16(ab0, c0);\n    __m128i p01 = _mm_unpackhi_epi16(ab0, c0);\n    __m128i p02 = _mm_unpacklo_epi16(ab1, c1);\n    __m128i p03 = _mm_unpackhi_epi16(ab1, c1);\n\n    __m128i p10 = _mm_unpacklo_epi32(p00, p01);\n    __m128i p11 = _mm_unpackhi_epi32(p00, p01);\n    __m128i p12 = _mm_unpacklo_epi32(p02, p03);\n    __m128i p13 = _mm_unpackhi_epi32(p02, p03);\n\n    __m128i p20 = _mm_unpacklo_epi64(p10, p11);\n    __m128i p21 = _mm_unpackhi_epi64(p10, p11);\n    __m128i p22 = _mm_unpacklo_epi64(p12, p13);\n    __m128i p23 = _mm_unpackhi_epi64(p12, p13);\n\n    p20 = _mm_slli_si128(p20, 1);\n    p22 = _mm_slli_si128(p22, 1);\n\n    __m128i p30 = _mm_slli_epi64(_mm_unpacklo_epi32(p20, p21), 8);\n    __m128i p31 = _mm_srli_epi64(_mm_unpackhi_epi32(p20, p21), 8);\n    __m128i p32 = _mm_slli_epi64(_mm_unpacklo_epi32(p22, p23), 8);\n    __m128i p33 = _mm_srli_epi64(_mm_unpackhi_epi32(p22, p23), 8);\n\n    __m128i p40 = _mm_unpacklo_epi64(p30, p31);\n    __m128i p41 = _mm_unpackhi_epi64(p30, p31);\n    __m128i p42 = _mm_unpacklo_epi64(p32, p33);\n    __m128i p43 = _mm_unpackhi_epi64(p32, p33);\n\n    __m128i v0 = _mm_or_si128(_mm_srli_si128(p40, 2), _mm_slli_si128(p41, 10));\n    __m128i v1 = _mm_or_si128(_mm_srli_si128(p41, 6), _mm_slli_si128(p42, 6));\n    __m128i v2 = _mm_or_si128(_mm_srli_si128(p42, 10), _mm_slli_si128(p43, 2));\n\n    _mm_storeu_si128((__m128i*)(ptr), v0);\n    _mm_storeu_si128((__m128i*)(ptr + 16), v1);\n    _mm_storeu_si128((__m128i*)(ptr + 32), v2);\n}\n\ninline void v_store_interleave( uchar* ptr, const v_uint8x16& a, const v_uint8x16& b,\n                                const v_uint8x16& c, const v_uint8x16& d)\n{\n    // a0 a1 a2 a3 ....\n    // b0 b1 b2 b3 ....\n    // c0 c1 c2 c3 ....\n    // d0 d1 d2 d3 ....\n    __m128i u0 = _mm_unpacklo_epi8(a.val, c.val); // a0 c0 a1 c1 ...\n    __m128i u1 = _mm_unpackhi_epi8(a.val, c.val); // a8 c8 a9 c9 ...\n    __m128i u2 = _mm_unpacklo_epi8(b.val, d.val); // b0 d0 b1 d1 ...\n    __m128i u3 = _mm_unpackhi_epi8(b.val, d.val); // b8 d8 b9 d9 ...\n\n    __m128i v0 = _mm_unpacklo_epi8(u0, u2); // a0 b0 c0 d0 ...\n    __m128i v1 = _mm_unpacklo_epi8(u1, u3); // a8 b8 c8 d8 ...\n    __m128i v2 = _mm_unpackhi_epi8(u0, u2); // a4 b4 c4 d4 ...\n    __m128i v3 = _mm_unpackhi_epi8(u1, u3); // a12 b12 c12 d12 ...\n\n    _mm_storeu_si128((__m128i*)ptr, v0);\n    _mm_storeu_si128((__m128i*)(ptr + 16), v2);\n    _mm_storeu_si128((__m128i*)(ptr + 32), v1);\n    _mm_storeu_si128((__m128i*)(ptr + 48), v3);\n}\n\ninline void v_store_interleave( ushort* ptr, const v_uint16x8& a,\n                                const v_uint16x8& b,\n                                const v_uint16x8& c )\n{\n    __m128i z = _mm_setzero_si128();\n    __m128i ab0 = _mm_unpacklo_epi16(a.val, b.val);\n    __m128i ab1 = _mm_unpackhi_epi16(a.val, b.val);\n    __m128i c0 = _mm_unpacklo_epi16(c.val, z);\n    __m128i c1 = _mm_unpackhi_epi16(c.val, z);\n\n    __m128i p10 = _mm_unpacklo_epi32(ab0, c0);\n    __m128i p11 = _mm_unpackhi_epi32(ab0, c0);\n    __m128i p12 = _mm_unpacklo_epi32(ab1, c1);\n    __m128i p13 = _mm_unpackhi_epi32(ab1, c1);\n\n    __m128i p20 = _mm_unpacklo_epi64(p10, p11);\n    __m128i p21 = _mm_unpackhi_epi64(p10, p11);\n    __m128i p22 = _mm_unpacklo_epi64(p12, p13);\n    __m128i p23 = _mm_unpackhi_epi64(p12, p13);\n\n    p20 = _mm_slli_si128(p20, 2);\n    p22 = _mm_slli_si128(p22, 2);\n\n    __m128i p30 = _mm_unpacklo_epi64(p20, p21);\n    __m128i p31 = _mm_unpackhi_epi64(p20, p21);\n    __m128i p32 = _mm_unpacklo_epi64(p22, p23);\n    __m128i p33 = _mm_unpackhi_epi64(p22, p23);\n\n    __m128i v0 = _mm_or_si128(_mm_srli_si128(p30, 2), _mm_slli_si128(p31, 10));\n    __m128i v1 = _mm_or_si128(_mm_srli_si128(p31, 6), _mm_slli_si128(p32, 6));\n    __m128i v2 = _mm_or_si128(_mm_srli_si128(p32, 10), _mm_slli_si128(p33, 2));\n\n    _mm_storeu_si128((__m128i*)(ptr), v0);\n    _mm_storeu_si128((__m128i*)(ptr + 8), v1);\n    _mm_storeu_si128((__m128i*)(ptr + 16), v2);\n}\n\ninline void v_store_interleave( ushort* ptr, const v_uint16x8& a, const v_uint16x8& b,\n                                const v_uint16x8& c, const v_uint16x8& d)\n{\n    // a0 a1 a2 a3 ....\n    // b0 b1 b2 b3 ....\n    // c0 c1 c2 c3 ....\n    // d0 d1 d2 d3 ....\n    __m128i u0 = _mm_unpacklo_epi16(a.val, c.val); // a0 c0 a1 c1 ...\n    __m128i u1 = _mm_unpackhi_epi16(a.val, c.val); // a4 c4 a5 c5 ...\n    __m128i u2 = _mm_unpacklo_epi16(b.val, d.val); // b0 d0 b1 d1 ...\n    __m128i u3 = _mm_unpackhi_epi16(b.val, d.val); // b4 d4 b5 d5 ...\n\n    __m128i v0 = _mm_unpacklo_epi16(u0, u2); // a0 b0 c0 d0 ...\n    __m128i v1 = _mm_unpacklo_epi16(u1, u3); // a4 b4 c4 d4 ...\n    __m128i v2 = _mm_unpackhi_epi16(u0, u2); // a2 b2 c2 d2 ...\n    __m128i v3 = _mm_unpackhi_epi16(u1, u3); // a6 b6 c6 d6 ...\n\n    _mm_storeu_si128((__m128i*)ptr, v0);\n    _mm_storeu_si128((__m128i*)(ptr + 8), v2);\n    _mm_storeu_si128((__m128i*)(ptr + 16), v1);\n    _mm_storeu_si128((__m128i*)(ptr + 24), v3);\n}\n\ninline void v_store_interleave( unsigned* ptr, const v_uint32x4& a, const v_uint32x4& b,\n                                const v_uint32x4& c )\n{\n    v_uint32x4 z = v_setzero_u32(), u0, u1, u2, u3;\n    v_transpose4x4(a, b, c, z, u0, u1, u2, u3);\n\n    __m128i v0 = _mm_or_si128(u0.val, _mm_slli_si128(u1.val, 12));\n    __m128i v1 = _mm_or_si128(_mm_srli_si128(u1.val, 4), _mm_slli_si128(u2.val, 8));\n    __m128i v2 = _mm_or_si128(_mm_srli_si128(u2.val, 8), _mm_slli_si128(u3.val, 4));\n\n    _mm_storeu_si128((__m128i*)ptr, v0);\n    _mm_storeu_si128((__m128i*)(ptr + 4), v1);\n    _mm_storeu_si128((__m128i*)(ptr + 8), v2);\n}\n\ninline void v_store_interleave(unsigned* ptr, const v_uint32x4& a, const v_uint32x4& b,\n                               const v_uint32x4& c, const v_uint32x4& d)\n{\n    v_uint32x4 t0, t1, t2, t3;\n    v_transpose4x4(a, b, c, d, t0, t1, t2, t3);\n    v_store(ptr, t0);\n    v_store(ptr + 4, t1);\n    v_store(ptr + 8, t2);\n    v_store(ptr + 12, t3);\n}\n\n#define OPENCV_HAL_IMPL_SSE_LOADSTORE_INTERLEAVE(_Tpvec, _Tp, suffix, _Tpuvec, _Tpu, usuffix) \\\ninline void v_load_deinterleave( const _Tp* ptr, _Tpvec& a0, \\\n                                 _Tpvec& b0, _Tpvec& c0 ) \\\n{ \\\n    _Tpuvec a1, b1, c1; \\\n    v_load_deinterleave((const _Tpu*)ptr, a1, b1, c1); \\\n    a0 = v_reinterpret_as_##suffix(a1); \\\n    b0 = v_reinterpret_as_##suffix(b1); \\\n    c0 = v_reinterpret_as_##suffix(c1); \\\n} \\\ninline void v_load_deinterleave( const _Tp* ptr, _Tpvec& a0, \\\n                                 _Tpvec& b0, _Tpvec& c0, _Tpvec& d0 ) \\\n{ \\\n    _Tpuvec a1, b1, c1, d1; \\\n    v_load_deinterleave((const _Tpu*)ptr, a1, b1, c1, d1); \\\n    a0 = v_reinterpret_as_##suffix(a1); \\\n    b0 = v_reinterpret_as_##suffix(b1); \\\n    c0 = v_reinterpret_as_##suffix(c1); \\\n    d0 = v_reinterpret_as_##suffix(d1); \\\n} \\\ninline void v_store_interleave( _Tp* ptr, const _Tpvec& a0, \\\n                               const _Tpvec& b0, const _Tpvec& c0 ) \\\n{ \\\n    _Tpuvec a1 = v_reinterpret_as_##usuffix(a0); \\\n    _Tpuvec b1 = v_reinterpret_as_##usuffix(b0); \\\n    _Tpuvec c1 = v_reinterpret_as_##usuffix(c0); \\\n    v_store_interleave((_Tpu*)ptr, a1, b1, c1); \\\n} \\\ninline void v_store_interleave( _Tp* ptr, const _Tpvec& a0, const _Tpvec& b0, \\\n                               const _Tpvec& c0, const _Tpvec& d0 ) \\\n{ \\\n    _Tpuvec a1 = v_reinterpret_as_##usuffix(a0); \\\n    _Tpuvec b1 = v_reinterpret_as_##usuffix(b0); \\\n    _Tpuvec c1 = v_reinterpret_as_##usuffix(c0); \\\n    _Tpuvec d1 = v_reinterpret_as_##usuffix(d0); \\\n    v_store_interleave((_Tpu*)ptr, a1, b1, c1, d1); \\\n}\n\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INTERLEAVE(v_int8x16, schar, s8, v_uint8x16, uchar, u8)\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INTERLEAVE(v_int16x8, short, s16, v_uint16x8, ushort, u16)\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INTERLEAVE(v_int32x4, int, s32, v_uint32x4, unsigned, u32)\nOPENCV_HAL_IMPL_SSE_LOADSTORE_INTERLEAVE(v_float32x4, float, f32, v_uint32x4, unsigned, u32)\n\ninline v_float32x4 v_cvt_f32(const v_int32x4& a)\n{\n    return v_float32x4(_mm_cvtepi32_ps(a.val));\n}\n\ninline v_float32x4 v_cvt_f32(const v_float64x2& a)\n{\n    return v_float32x4(_mm_cvtpd_ps(a.val));\n}\n\ninline v_float64x2 v_cvt_f64(const v_int32x4& a)\n{\n    return v_float64x2(_mm_cvtepi32_pd(a.val));\n}\n\ninline v_float64x2 v_cvt_f64(const v_float32x4& a)\n{\n    return v_float64x2(_mm_cvtps_pd(a.val));\n}\n\n}\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/hal.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2015, Itseez Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_HAL_HPP__\n#define __OPENCV_HAL_HPP__\n\n#include \"opencv2/hal/defs.h\"\n\n/**\n  @defgroup hal Hardware Acceleration Layer\n*/\n\nnamespace cv { namespace hal {\n\nnamespace Error {\n\nenum\n{\n    Ok = 0,\n    Unknown = -1\n};\n\n}\n\nint normHamming(const uchar* a, int n);\nint normHamming(const uchar* a, const uchar* b, int n);\n\nint normHamming(const uchar* a, int n, int cellSize);\nint normHamming(const uchar* a, const uchar* b, int n, int cellSize);\n\n//////////////////////////////// low-level functions ////////////////////////////////\n\nint LU(float* A, size_t astep, int m, float* b, size_t bstep, int n);\nint LU(double* A, size_t astep, int m, double* b, size_t bstep, int n);\nbool Cholesky(float* A, size_t astep, int m, float* b, size_t bstep, int n);\nbool Cholesky(double* A, size_t astep, int m, double* b, size_t bstep, int n);\n\nint normL1_(const uchar* a, const uchar* b, int n);\nfloat normL1_(const float* a, const float* b, int n);\nfloat normL2Sqr_(const float* a, const float* b, int n);\n\nvoid exp(const float* src, float* dst, int n);\nvoid exp(const double* src, double* dst, int n);\nvoid log(const float* src, float* dst, int n);\nvoid log(const double* src, double* dst, int n);\n\nvoid fastAtan2(const float* y, const float* x, float* dst, int n, bool angleInDegrees);\nvoid magnitude(const float* x, const float* y, float* dst, int n);\nvoid magnitude(const double* x, const double* y, double* dst, int n);\nvoid sqrt(const float* src, float* dst, int len);\nvoid sqrt(const double* src, double* dst, int len);\nvoid invSqrt(const float* src, float* dst, int len);\nvoid invSqrt(const double* src, double* dst, int len);\n\n}} //cv::hal\n\n#endif //__OPENCV_HAL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/imgcodecs/imgcodecs.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/imgcodecs.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/imgcodecs/imgcodecs_c.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                        Intel License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000, Intel Corporation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of Intel Corporation may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_IMGCODECS_H__\n#define __OPENCV_IMGCODECS_H__\n\n#include \"opencv2/core/core_c.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/** @addtogroup imgcodecs_c\n  @{\n  */\n\nenum\n{\n/* 8bit, color or not */\n    CV_LOAD_IMAGE_UNCHANGED  =-1,\n/* 8bit, gray */\n    CV_LOAD_IMAGE_GRAYSCALE  =0,\n/* ?, color */\n    CV_LOAD_IMAGE_COLOR      =1,\n/* any depth, ? */\n    CV_LOAD_IMAGE_ANYDEPTH   =2,\n/* ?, any color */\n    CV_LOAD_IMAGE_ANYCOLOR   =4\n};\n\n/* load image from file\n  iscolor can be a combination of above flags where CV_LOAD_IMAGE_UNCHANGED\n  overrides the other flags\n  using CV_LOAD_IMAGE_ANYCOLOR alone is equivalent to CV_LOAD_IMAGE_UNCHANGED\n  unless CV_LOAD_IMAGE_ANYDEPTH is specified images are converted to 8bit\n*/\nCVAPI(IplImage*) cvLoadImage( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));\nCVAPI(CvMat*) cvLoadImageM( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));\n\nenum\n{\n    CV_IMWRITE_JPEG_QUALITY =1,\n    CV_IMWRITE_JPEG_PROGRESSIVE =2,\n    CV_IMWRITE_JPEG_OPTIMIZE =3,\n    CV_IMWRITE_JPEG_RST_INTERVAL =4,\n    CV_IMWRITE_JPEG_LUMA_QUALITY =5,\n    CV_IMWRITE_JPEG_CHROMA_QUALITY =6,\n    CV_IMWRITE_PNG_COMPRESSION =16,\n    CV_IMWRITE_PNG_STRATEGY =17,\n    CV_IMWRITE_PNG_BILEVEL =18,\n    CV_IMWRITE_PNG_STRATEGY_DEFAULT =0,\n    CV_IMWRITE_PNG_STRATEGY_FILTERED =1,\n    CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY =2,\n    CV_IMWRITE_PNG_STRATEGY_RLE =3,\n    CV_IMWRITE_PNG_STRATEGY_FIXED =4,\n    CV_IMWRITE_PXM_BINARY =32,\n    CV_IMWRITE_WEBP_QUALITY =64\n};\n\n/* save image to file */\nCVAPI(int) cvSaveImage( const char* filename, const CvArr* image,\n                        const int* params CV_DEFAULT(0) );\n\n/* decode image stored in the buffer */\nCVAPI(IplImage*) cvDecodeImage( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));\nCVAPI(CvMat*) cvDecodeImageM( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));\n\n/* encode image and store the result as a byte vector (single-row 8uC1 matrix) */\nCVAPI(CvMat*) cvEncodeImage( const char* ext, const CvArr* image,\n                             const int* params CV_DEFAULT(0) );\n\nenum\n{\n    CV_CVTIMG_FLIP      =1,\n    CV_CVTIMG_SWAP_RB   =2\n};\n\n/* utility function: convert one image to another with optional vertical flip */\nCVAPI(void) cvConvertImage( const CvArr* src, CvArr* dst, int flags CV_DEFAULT(0));\n\nCVAPI(int) cvHaveImageReader(const char* filename);\nCVAPI(int) cvHaveImageWriter(const char* filename);\n\n\n/****************************************************************************************\\\n*                              Obsolete functions/synonyms                               *\n\\****************************************************************************************/\n\n#define cvvLoadImage(name) cvLoadImage((name),1)\n#define cvvSaveImage cvSaveImage\n#define cvvConvertImage cvConvertImage\n\n/** @} imgcodecs_c */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // __OPENCV_IMGCODECS_H__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/imgcodecs/ios.h",
    "content": "\n/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#import <UIKit/UIKit.h>\n#import <Accelerate/Accelerate.h>\n#import <AVFoundation/AVFoundation.h>\n#import <ImageIO/ImageIO.h>\n#include \"opencv2/core/core.hpp\"\n\n//! @addtogroup imgcodecs_ios\n//! @{\n\nUIImage* MatToUIImage(const cv::Mat& image);\nvoid UIImageToMat(const UIImage* image,\n                         cv::Mat& m, bool alphaExist = false);\n\n//! @}\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/imgcodecs.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_IMGCODECS_HPP__\n#define __OPENCV_IMGCODECS_HPP__\n\n#include \"opencv2/core.hpp\"\n\n/**\n  @defgroup imgcodecs Image file reading and writing\n  @{\n    @defgroup imgcodecs_c C API\n    @defgroup imgcodecs_ios iOS glue\n  @}\n*/\n\n//////////////////////////////// image codec ////////////////////////////////\nnamespace cv\n{\n\n//! @addtogroup imgcodecs\n//! @{\n\n//! Imread flags\nenum ImreadModes {\n       IMREAD_UNCHANGED  = -1, //!< If set, return the loaded image as is (with alpha channel, otherwise it gets cropped).\n       IMREAD_GRAYSCALE  = 0,  //!< If set, always convert image to the single channel grayscale image.\n       IMREAD_COLOR      = 1,  //!< If set, always convert image to the 3 channel BGR color image.\n       IMREAD_ANYDEPTH   = 2,  //!< If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit.\n       IMREAD_ANYCOLOR   = 4,  //!< If set, the image is read in any possible color format.\n       IMREAD_LOAD_GDAL  = 8   //!< If set, use the gdal driver for loading the image.\n     };\n\n//! Imwrite flags\nenum ImwriteFlags {\n       IMWRITE_JPEG_QUALITY        = 1,  //!< For JPEG, it can be a quality from 0 to 100 (the higher is the better). Default value is 95.\n       IMWRITE_JPEG_PROGRESSIVE    = 2,  //!< Enable JPEG features, 0 or 1, default is False.\n       IMWRITE_JPEG_OPTIMIZE       = 3,  //!< Enable JPEG features, 0 or 1, default is False.\n       IMWRITE_JPEG_RST_INTERVAL   = 4,  //!< JPEG restart interval, 0 - 65535, default is 0 - no restart.\n       IMWRITE_JPEG_LUMA_QUALITY   = 5,  //!< Separate luma quality level, 0 - 100, default is 0 - don't use.\n       IMWRITE_JPEG_CHROMA_QUALITY = 6,  //!< Separate chroma quality level, 0 - 100, default is 0 - don't use.\n       IMWRITE_PNG_COMPRESSION     = 16, //!< For PNG, it can be the compression level from 0 to 9. A higher value means a smaller size and longer compression time. Default value is 3.\n       IMWRITE_PNG_STRATEGY        = 17, //!< One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_DEFAULT.\n       IMWRITE_PNG_BILEVEL         = 18, //!< Binary level PNG, 0 or 1, default is 0.\n       IMWRITE_PXM_BINARY          = 32, //!< For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1.\n       IMWRITE_WEBP_QUALITY        = 64  //!< For WEBP, it can be a quality from 1 to 100 (the higher is the better). By default (without any parameter) and for quality above 100 the lossless compression is used.\n     };\n\n//! Imwrite PNG specific flags\nenum ImwritePNGFlags {\n       IMWRITE_PNG_STRATEGY_DEFAULT      = 0,\n       IMWRITE_PNG_STRATEGY_FILTERED     = 1,\n       IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY = 2,\n       IMWRITE_PNG_STRATEGY_RLE          = 3,\n       IMWRITE_PNG_STRATEGY_FIXED        = 4\n     };\n\n/** @brief Loads an image from a file.\n\n@anchor imread\n\n@param filename Name of file to be loaded.\n@param flags Flag that can take values of @ref cv::ImreadModes\n\nThe function imread loads an image from the specified file and returns it. If the image cannot be\nread (because of missing file, improper permissions, unsupported or invalid format), the function\nreturns an empty matrix ( Mat::data==NULL ). Currently, the following file formats are supported:\n\n-   Windows bitmaps - \\*.bmp, \\*.dib (always supported)\n-   JPEG files - \\*.jpeg, \\*.jpg, \\*.jpe (see the *Notes* section)\n-   JPEG 2000 files - \\*.jp2 (see the *Notes* section)\n-   Portable Network Graphics - \\*.png (see the *Notes* section)\n-   WebP - \\*.webp (see the *Notes* section)\n-   Portable image format - \\*.pbm, \\*.pgm, \\*.ppm (always supported)\n-   Sun rasters - \\*.sr, \\*.ras (always supported)\n-   TIFF files - \\*.tiff, \\*.tif (see the *Notes* section)\n\n@note\n\n-   The function determines the type of an image by the content, not by the file extension.\n-   On Microsoft Windows\\* OS and MacOSX\\*, the codecs shipped with an OpenCV image (libjpeg,\n    libpng, libtiff, and libjasper) are used by default. So, OpenCV can always read JPEGs, PNGs,\n    and TIFFs. On MacOSX, there is also an option to use native MacOSX image readers. But beware\n    that currently these native image loaders give images with different pixel values because of\n    the color management embedded into MacOSX.\n-   On Linux\\*, BSD flavors and other Unix-like open-source operating systems, OpenCV looks for\n    codecs supplied with an OS image. Install the relevant packages (do not forget the development\n    files, for example, \"libjpeg-dev\", in Debian\\* and Ubuntu\\*) to get the codec support or turn\n    on the OPENCV_BUILD_3RDPARTY_LIBS flag in CMake.\n\n@note In the case of color images, the decoded images will have the channels stored in B G R order.\n */\nCV_EXPORTS_W Mat imread( const String& filename, int flags = IMREAD_COLOR );\n\n/** @brief Loads a multi-page image from a file. (see imread for details.)\n\n@param filename Name of file to be loaded.\n@param flags Flag that can take values of @ref cv::ImreadModes, default with IMREAD_ANYCOLOR.\n@param mats A vector of Mat objects holding each page, if more than one.\n\n*/\nCV_EXPORTS_W bool imreadmulti(const String& filename, std::vector<Mat>& mats, int flags = IMREAD_ANYCOLOR);\n\n/** @brief Saves an image to a specified file.\n\n@param filename Name of the file.\n@param img Image to be saved.\n@param params Format-specific save parameters encoded as pairs, see @ref cv::ImwriteFlags\nparamId_1, paramValue_1, paramId_2, paramValue_2, ... .\n\nThe function imwrite saves the image to the specified file. The image format is chosen based on the\nfilename extension (see imread for the list of extensions). Only 8-bit (or 16-bit unsigned (CV_16U)\nin case of PNG, JPEG 2000, and TIFF) single-channel or 3-channel (with 'BGR' channel order) images\ncan be saved using this function. If the format, depth or channel order is different, use\nMat::convertTo , and cvtColor to convert it before saving. Or, use the universal FileStorage I/O\nfunctions to save the image to XML or YAML format.\n\nIt is possible to store PNG images with an alpha channel using this function. To do this, create\n8-bit (or 16-bit) 4-channel image BGRA, where the alpha channel goes last. Fully transparent pixels\nshould have alpha set to 0, fully opaque pixels should have alpha set to 255/65535. The sample below\nshows how to create such a BGRA image and store to PNG file. It also demonstrates how to set custom\ncompression parameters :\n@code\n    #include <vector>\n    #include <stdio.h>\n    #include <opencv2/opencv.hpp>\n\n    using namespace cv;\n    using namespace std;\n\n    void createAlphaMat(Mat &mat)\n    {\n        CV_Assert(mat.channels() == 4);\n        for (int i = 0; i < mat.rows; ++i) {\n            for (int j = 0; j < mat.cols; ++j) {\n                Vec4b& bgra = mat.at<Vec4b>(i, j);\n                bgra[0] = UCHAR_MAX; // Blue\n                bgra[1] = saturate_cast<uchar>((float (mat.cols - j)) / ((float)mat.cols) * UCHAR_MAX); // Green\n                bgra[2] = saturate_cast<uchar>((float (mat.rows - i)) / ((float)mat.rows) * UCHAR_MAX); // Red\n                bgra[3] = saturate_cast<uchar>(0.5 * (bgra[1] + bgra[2])); // Alpha\n            }\n        }\n    }\n\n    int main(int argv, char **argc)\n    {\n        // Create mat with alpha channel\n        Mat mat(480, 640, CV_8UC4);\n        createAlphaMat(mat);\n\n        vector<int> compression_params;\n        compression_params.push_back(IMWRITE_PNG_COMPRESSION);\n        compression_params.push_back(9);\n\n        try {\n            imwrite(\"alpha.png\", mat, compression_params);\n        }\n        catch (runtime_error& ex) {\n            fprintf(stderr, \"Exception converting image to PNG format: %s\\n\", ex.what());\n            return 1;\n        }\n\n        fprintf(stdout, \"Saved PNG file with alpha data.\\n\");\n        return 0;\n    }\n@endcode\n */\nCV_EXPORTS_W bool imwrite( const String& filename, InputArray img,\n              const std::vector<int>& params = std::vector<int>());\n\n/** @overload */\nCV_EXPORTS_W Mat imdecode( InputArray buf, int flags );\n\n/** @brief Reads an image from a buffer in memory.\n\n@param buf Input array or vector of bytes.\n@param flags The same flags as in imread, see @ref cv::ImreadModes.\n@param dst The optional output placeholder for the decoded matrix. It can save the image\nreallocations when the function is called repeatedly for images of the same size.\n\nThe function reads an image from the specified buffer in the memory. If the buffer is too short or\ncontains invalid data, the empty matrix/image is returned.\n\nSee imread for the list of supported formats and flags description.\n\n@note In the case of color images, the decoded images will have the channels stored in B G R order.\n */\nCV_EXPORTS Mat imdecode( InputArray buf, int flags, Mat* dst);\n\n/** @brief Encodes an image into a memory buffer.\n\n@param ext File extension that defines the output format.\n@param img Image to be written.\n@param buf Output buffer resized to fit the compressed image.\n@param params Format-specific parameters. See imwrite and @ref cv::ImwriteFlags.\n\nThe function compresses the image and stores it in the memory buffer that is resized to fit the\nresult. See imwrite for the list of supported formats and flags description.\n\n@note cvEncodeImage returns single-row matrix of type CV_8UC1 that contains encoded image as array\nof bytes.\n */\nCV_EXPORTS_W bool imencode( const String& ext, InputArray img,\n                            CV_OUT std::vector<uchar>& buf,\n                            const std::vector<int>& params = std::vector<int>());\n\n//! @} imgcodecs\n\n} // cv\n\n#endif //__OPENCV_IMGCODECS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/imgproc/imgproc.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/imgproc.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/imgproc/imgproc_c.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_IMGPROC_IMGPROC_C_H__\n#define __OPENCV_IMGPROC_IMGPROC_C_H__\n\n#include \"opencv2/imgproc/types_c.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup imgproc_c\n@{\n*/\n\n/*********************** Background statistics accumulation *****************************/\n\n/** @brief Adds image to accumulator\n@see cv::accumulate\n*/\nCVAPI(void)  cvAcc( const CvArr* image, CvArr* sum,\n                   const CvArr* mask CV_DEFAULT(NULL) );\n\n/** @brief Adds squared image to accumulator\n@see cv::accumulateSquare\n*/\nCVAPI(void)  cvSquareAcc( const CvArr* image, CvArr* sqsum,\n                         const CvArr* mask CV_DEFAULT(NULL) );\n\n/** @brief Adds a product of two images to accumulator\n@see cv::accumulateProduct\n*/\nCVAPI(void)  cvMultiplyAcc( const CvArr* image1, const CvArr* image2, CvArr* acc,\n                           const CvArr* mask CV_DEFAULT(NULL) );\n\n/** @brief Adds image to accumulator with weights: acc = acc*(1-alpha) + image*alpha\n@see cv::accumulateWeighted\n*/\nCVAPI(void)  cvRunningAvg( const CvArr* image, CvArr* acc, double alpha,\n                          const CvArr* mask CV_DEFAULT(NULL) );\n\n/****************************************************************************************\\\n*                                    Image Processing                                    *\n\\****************************************************************************************/\n\n/** Copies source 2D array inside of the larger destination array and\n   makes a border of the specified type (IPL_BORDER_*) around the copied area. */\nCVAPI(void) cvCopyMakeBorder( const CvArr* src, CvArr* dst, CvPoint offset,\n                              int bordertype, CvScalar value CV_DEFAULT(cvScalarAll(0)));\n\n/** @brief Smooths the image in one of several ways.\n\n@param src The source image\n@param dst The destination image\n@param smoothtype Type of the smoothing, see SmoothMethod_c\n@param size1 The first parameter of the smoothing operation, the aperture width. Must be a\npositive odd number (1, 3, 5, ...)\n@param size2 The second parameter of the smoothing operation, the aperture height. Ignored by\nCV_MEDIAN and CV_BILATERAL methods. In the case of simple scaled/non-scaled and Gaussian blur if\nsize2 is zero, it is set to size1. Otherwise it must be a positive odd number.\n@param sigma1 In the case of a Gaussian parameter this parameter may specify Gaussian \\f$\\sigma\\f$\n(standard deviation). If it is zero, it is calculated from the kernel size:\n\\f[\\sigma  = 0.3 (n/2 - 1) + 0.8  \\quad   \\text{where}   \\quad  n= \\begin{array}{l l} \\mbox{\\texttt{size1} for horizontal kernel} \\\\ \\mbox{\\texttt{size2} for vertical kernel} \\end{array}\\f]\nUsing standard sigma for small kernels ( \\f$3\\times 3\\f$ to \\f$7\\times 7\\f$ ) gives better speed. If\nsigma1 is not zero, while size1 and size2 are zeros, the kernel size is calculated from the\nsigma (to provide accurate enough operation).\n@param sigma2 additional parameter for bilateral filtering\n\n@see cv::GaussianBlur, cv::blur, cv::medianBlur, cv::bilateralFilter.\n */\nCVAPI(void) cvSmooth( const CvArr* src, CvArr* dst,\n                      int smoothtype CV_DEFAULT(CV_GAUSSIAN),\n                      int size1 CV_DEFAULT(3),\n                      int size2 CV_DEFAULT(0),\n                      double sigma1 CV_DEFAULT(0),\n                      double sigma2 CV_DEFAULT(0));\n\n/** @brief Convolves an image with the kernel.\n\n@param src input image.\n@param dst output image of the same size and the same number of channels as src.\n@param kernel convolution kernel (or rather a correlation kernel), a single-channel floating point\nmatrix; if you want to apply different kernels to different channels, split the image into\nseparate color planes using split and process them individually.\n@param anchor anchor of the kernel that indicates the relative position of a filtered point within\nthe kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor\nis at the kernel center.\n\n@see cv::filter2D\n */\nCVAPI(void) cvFilter2D( const CvArr* src, CvArr* dst, const CvMat* kernel,\n                        CvPoint anchor CV_DEFAULT(cvPoint(-1,-1)));\n\n/** @brief Finds integral image: SUM(X,Y) = sum(x<X,y<Y)I(x,y)\n@see cv::integral\n*/\nCVAPI(void) cvIntegral( const CvArr* image, CvArr* sum,\n                       CvArr* sqsum CV_DEFAULT(NULL),\n                       CvArr* tilted_sum CV_DEFAULT(NULL));\n\n/** @brief Smoothes the input image with gaussian kernel and then down-samples it.\n\n   dst_width = floor(src_width/2)[+1],\n   dst_height = floor(src_height/2)[+1]\n   @see cv::pyrDown\n*/\nCVAPI(void)  cvPyrDown( const CvArr* src, CvArr* dst,\n                        int filter CV_DEFAULT(CV_GAUSSIAN_5x5) );\n\n/** @brief Up-samples image and smoothes the result with gaussian kernel.\n\n   dst_width = src_width*2,\n   dst_height = src_height*2\n   @see cv::pyrUp\n*/\nCVAPI(void)  cvPyrUp( const CvArr* src, CvArr* dst,\n                      int filter CV_DEFAULT(CV_GAUSSIAN_5x5) );\n\n/** @brief Builds pyramid for an image\n@see buildPyramid\n*/\nCVAPI(CvMat**) cvCreatePyramid( const CvArr* img, int extra_layers, double rate,\n                                const CvSize* layer_sizes CV_DEFAULT(0),\n                                CvArr* bufarr CV_DEFAULT(0),\n                                int calc CV_DEFAULT(1),\n                                int filter CV_DEFAULT(CV_GAUSSIAN_5x5) );\n\n/** @brief Releases pyramid */\nCVAPI(void)  cvReleasePyramid( CvMat*** pyramid, int extra_layers );\n\n\n/** @brief Filters image using meanshift algorithm\n@see cv::pyrMeanShiftFiltering\n*/\nCVAPI(void) cvPyrMeanShiftFiltering( const CvArr* src, CvArr* dst,\n    double sp, double sr, int max_level CV_DEFAULT(1),\n    CvTermCriteria termcrit CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,5,1)));\n\n/** @brief Segments image using seed \"markers\"\n@see cv::watershed\n*/\nCVAPI(void) cvWatershed( const CvArr* image, CvArr* markers );\n\n/** @brief Calculates an image derivative using generalized Sobel\n\n   (aperture_size = 1,3,5,7) or Scharr (aperture_size = -1) operator.\n   Scharr can be used only for the first dx or dy derivative\n@see cv::Sobel\n*/\nCVAPI(void) cvSobel( const CvArr* src, CvArr* dst,\n                    int xorder, int yorder,\n                    int aperture_size CV_DEFAULT(3));\n\n/** @brief Calculates the image Laplacian: (d2/dx + d2/dy)I\n@see cv::Laplacian\n*/\nCVAPI(void) cvLaplace( const CvArr* src, CvArr* dst,\n                      int aperture_size CV_DEFAULT(3) );\n\n/** @brief Converts input array pixels from one color space to another\n@see cv::cvtColor\n*/\nCVAPI(void)  cvCvtColor( const CvArr* src, CvArr* dst, int code );\n\n\n/** @brief Resizes image (input array is resized to fit the destination array)\n@see cv::resize\n*/\nCVAPI(void)  cvResize( const CvArr* src, CvArr* dst,\n                       int interpolation CV_DEFAULT( CV_INTER_LINEAR ));\n\n/** @brief Warps image with affine transform\n@note ::cvGetQuadrangleSubPix is similar to ::cvWarpAffine, but the outliers are extrapolated using\nreplication border mode.\n@see cv::warpAffine\n*/\nCVAPI(void)  cvWarpAffine( const CvArr* src, CvArr* dst, const CvMat* map_matrix,\n                           int flags CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS),\n                           CvScalar fillval CV_DEFAULT(cvScalarAll(0)) );\n\n/** @brief Computes affine transform matrix for mapping src[i] to dst[i] (i=0,1,2)\n@see cv::getAffineTransform\n*/\nCVAPI(CvMat*) cvGetAffineTransform( const CvPoint2D32f * src,\n                                    const CvPoint2D32f * dst,\n                                    CvMat * map_matrix );\n\n/** @brief Computes rotation_matrix matrix\n@see cv::getRotationMatrix2D\n*/\nCVAPI(CvMat*)  cv2DRotationMatrix( CvPoint2D32f center, double angle,\n                                   double scale, CvMat* map_matrix );\n\n/** @brief Warps image with perspective (projective) transform\n@see cv::warpPerspective\n*/\nCVAPI(void)  cvWarpPerspective( const CvArr* src, CvArr* dst, const CvMat* map_matrix,\n                                int flags CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS),\n                                CvScalar fillval CV_DEFAULT(cvScalarAll(0)) );\n\n/** @brief Computes perspective transform matrix for mapping src[i] to dst[i] (i=0,1,2,3)\n@see cv::getPerspectiveTransform\n*/\nCVAPI(CvMat*) cvGetPerspectiveTransform( const CvPoint2D32f* src,\n                                         const CvPoint2D32f* dst,\n                                         CvMat* map_matrix );\n\n/** @brief Performs generic geometric transformation using the specified coordinate maps\n@see cv::remap\n*/\nCVAPI(void)  cvRemap( const CvArr* src, CvArr* dst,\n                      const CvArr* mapx, const CvArr* mapy,\n                      int flags CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS),\n                      CvScalar fillval CV_DEFAULT(cvScalarAll(0)) );\n\n/** @brief Converts mapx & mapy from floating-point to integer formats for cvRemap\n@see cv::convertMaps\n*/\nCVAPI(void)  cvConvertMaps( const CvArr* mapx, const CvArr* mapy,\n                            CvArr* mapxy, CvArr* mapalpha );\n\n/** @brief Performs forward or inverse log-polar image transform\n@see cv::logPolar\n*/\nCVAPI(void)  cvLogPolar( const CvArr* src, CvArr* dst,\n                         CvPoint2D32f center, double M,\n                         int flags CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS));\n\n/** Performs forward or inverse linear-polar image transform\n@see cv::linearPolar\n*/\nCVAPI(void)  cvLinearPolar( const CvArr* src, CvArr* dst,\n                         CvPoint2D32f center, double maxRadius,\n                         int flags CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS));\n\n/** @brief Transforms the input image to compensate lens distortion\n@see cv::undistort\n*/\nCVAPI(void) cvUndistort2( const CvArr* src, CvArr* dst,\n                          const CvMat* camera_matrix,\n                          const CvMat* distortion_coeffs,\n                          const CvMat* new_camera_matrix CV_DEFAULT(0) );\n\n/** @brief Computes transformation map from intrinsic camera parameters\n   that can used by cvRemap\n*/\nCVAPI(void) cvInitUndistortMap( const CvMat* camera_matrix,\n                                const CvMat* distortion_coeffs,\n                                CvArr* mapx, CvArr* mapy );\n\n/** @brief Computes undistortion+rectification map for a head of stereo camera\n@see cv::initUndistortRectifyMap\n*/\nCVAPI(void) cvInitUndistortRectifyMap( const CvMat* camera_matrix,\n                                       const CvMat* dist_coeffs,\n                                       const CvMat *R, const CvMat* new_camera_matrix,\n                                       CvArr* mapx, CvArr* mapy );\n\n/** @brief Computes the original (undistorted) feature coordinates\n   from the observed (distorted) coordinates\n@see cv::undistortPoints\n*/\nCVAPI(void) cvUndistortPoints( const CvMat* src, CvMat* dst,\n                               const CvMat* camera_matrix,\n                               const CvMat* dist_coeffs,\n                               const CvMat* R CV_DEFAULT(0),\n                               const CvMat* P CV_DEFAULT(0));\n\n/** @brief Returns a structuring element of the specified size and shape for morphological operations.\n\n@note the created structuring element IplConvKernel\\* element must be released in the end using\n`cvReleaseStructuringElement(&element)`.\n\n@param cols Width of the structuring element\n@param rows Height of the structuring element\n@param anchor_x x-coordinate of the anchor\n@param anchor_y y-coordinate of the anchor\n@param shape element shape that could be one of the cv::MorphShapes_c\n@param values integer array of cols*rows elements that specifies the custom shape of the\nstructuring element, when shape=CV_SHAPE_CUSTOM.\n\n@see cv::getStructuringElement\n */\n CVAPI(IplConvKernel*)  cvCreateStructuringElementEx(\n            int cols, int  rows, int  anchor_x, int  anchor_y,\n            int shape, int* values CV_DEFAULT(NULL) );\n\n/** @brief releases structuring element\n@see cvCreateStructuringElementEx\n*/\nCVAPI(void)  cvReleaseStructuringElement( IplConvKernel** element );\n\n/** @brief erodes input image (applies minimum filter) one or more times.\n   If element pointer is NULL, 3x3 rectangular element is used\n@see cv::erode\n*/\nCVAPI(void)  cvErode( const CvArr* src, CvArr* dst,\n                      IplConvKernel* element CV_DEFAULT(NULL),\n                      int iterations CV_DEFAULT(1) );\n\n/** @brief dilates input image (applies maximum filter) one or more times.\n\n   If element pointer is NULL, 3x3 rectangular element is used\n@see cv::dilate\n*/\nCVAPI(void)  cvDilate( const CvArr* src, CvArr* dst,\n                       IplConvKernel* element CV_DEFAULT(NULL),\n                       int iterations CV_DEFAULT(1) );\n\n/** @brief Performs complex morphological transformation\n@see cv::morphologyEx\n*/\nCVAPI(void)  cvMorphologyEx( const CvArr* src, CvArr* dst,\n                             CvArr* temp, IplConvKernel* element,\n                             int operation, int iterations CV_DEFAULT(1) );\n\n/** @brief Calculates all spatial and central moments up to the 3rd order\n@see cv::moments\n*/\nCVAPI(void) cvMoments( const CvArr* arr, CvMoments* moments, int binary CV_DEFAULT(0));\n\n/** @brief Retrieve spatial moments */\nCVAPI(double)  cvGetSpatialMoment( CvMoments* moments, int x_order, int y_order );\n/** @brief Retrieve central moments */\nCVAPI(double)  cvGetCentralMoment( CvMoments* moments, int x_order, int y_order );\n/** @brief Retrieve normalized central moments */\nCVAPI(double)  cvGetNormalizedCentralMoment( CvMoments* moments,\n                                             int x_order, int y_order );\n\n/** @brief Calculates 7 Hu's invariants from precalculated spatial and central moments\n@see cv::HuMoments\n*/\nCVAPI(void) cvGetHuMoments( CvMoments*  moments, CvHuMoments*  hu_moments );\n\n/*********************************** data sampling **************************************/\n\n/** @brief Fetches pixels that belong to the specified line segment and stores them to the buffer.\n\n   Returns the number of retrieved points.\n@see cv::LineSegmentDetector\n*/\nCVAPI(int)  cvSampleLine( const CvArr* image, CvPoint pt1, CvPoint pt2, void* buffer,\n                          int connectivity CV_DEFAULT(8));\n\n/** @brief Retrieves the rectangular image region with specified center from the input array.\n\n dst(x,y) <- src(x + center.x - dst_width/2, y + center.y - dst_height/2).\n Values of pixels with fractional coordinates are retrieved using bilinear interpolation\n@see cv::getRectSubPix\n*/\nCVAPI(void)  cvGetRectSubPix( const CvArr* src, CvArr* dst, CvPoint2D32f center );\n\n\n/** @brief Retrieves quadrangle from the input array.\n\n    matrixarr = ( a11  a12 | b1 )   dst(x,y) <- src(A[x y]' + b)\n                ( a21  a22 | b2 )   (bilinear interpolation is used to retrieve pixels\n                                     with fractional coordinates)\n@see cvWarpAffine\n*/\nCVAPI(void)  cvGetQuadrangleSubPix( const CvArr* src, CvArr* dst,\n                                    const CvMat* map_matrix );\n\n/** @brief Measures similarity between template and overlapped windows in the source image\n   and fills the resultant image with the measurements\n@see cv::matchTemplate\n*/\nCVAPI(void)  cvMatchTemplate( const CvArr* image, const CvArr* templ,\n                              CvArr* result, int method );\n\n/** @brief Computes earth mover distance between\n   two weighted point sets (called signatures)\n@see cv::EMD\n*/\nCVAPI(float)  cvCalcEMD2( const CvArr* signature1,\n                          const CvArr* signature2,\n                          int distance_type,\n                          CvDistanceFunction distance_func CV_DEFAULT(NULL),\n                          const CvArr* cost_matrix CV_DEFAULT(NULL),\n                          CvArr* flow CV_DEFAULT(NULL),\n                          float* lower_bound CV_DEFAULT(NULL),\n                          void* userdata CV_DEFAULT(NULL));\n\n/****************************************************************************************\\\n*                              Contours retrieving                                       *\n\\****************************************************************************************/\n\n/** @brief Retrieves outer and optionally inner boundaries of white (non-zero) connected\n   components in the black (zero) background\n@see cv::findContours, cvStartFindContours, cvFindNextContour, cvSubstituteContour, cvEndFindContours\n*/\nCVAPI(int)  cvFindContours( CvArr* image, CvMemStorage* storage, CvSeq** first_contour,\n                            int header_size CV_DEFAULT(sizeof(CvContour)),\n                            int mode CV_DEFAULT(CV_RETR_LIST),\n                            int method CV_DEFAULT(CV_CHAIN_APPROX_SIMPLE),\n                            CvPoint offset CV_DEFAULT(cvPoint(0,0)));\n\n/** @brief Initializes contour retrieving process.\n\n   Calls cvStartFindContours.\n   Calls cvFindNextContour until null pointer is returned\n   or some other condition becomes true.\n   Calls cvEndFindContours at the end.\n@see cvFindContours\n*/\nCVAPI(CvContourScanner)  cvStartFindContours( CvArr* image, CvMemStorage* storage,\n                            int header_size CV_DEFAULT(sizeof(CvContour)),\n                            int mode CV_DEFAULT(CV_RETR_LIST),\n                            int method CV_DEFAULT(CV_CHAIN_APPROX_SIMPLE),\n                            CvPoint offset CV_DEFAULT(cvPoint(0,0)));\n\n/** @brief Retrieves next contour\n@see cvFindContours\n*/\nCVAPI(CvSeq*)  cvFindNextContour( CvContourScanner scanner );\n\n\n/** @brief Substitutes the last retrieved contour with the new one\n\n   (if the substitutor is null, the last retrieved contour is removed from the tree)\n@see cvFindContours\n*/\nCVAPI(void)   cvSubstituteContour( CvContourScanner scanner, CvSeq* new_contour );\n\n\n/** @brief Releases contour scanner and returns pointer to the first outer contour\n@see cvFindContours\n*/\nCVAPI(CvSeq*)  cvEndFindContours( CvContourScanner* scanner );\n\n/** @brief Approximates Freeman chain(s) with a polygonal curve.\n\nThis is a standalone contour approximation routine, not represented in the new interface. When\ncvFindContours retrieves contours as Freeman chains, it calls the function to get approximated\ncontours, represented as polygons.\n\n@param src_seq Pointer to the approximated Freeman chain that can refer to other chains.\n@param storage Storage location for the resulting polylines.\n@param method Approximation method (see the description of the function :ocvFindContours ).\n@param parameter Method parameter (not used now).\n@param minimal_perimeter Approximates only those contours whose perimeters are not less than\nminimal_perimeter . Other chains are removed from the resulting structure.\n@param recursive Recursion flag. If it is non-zero, the function approximates all chains that can\nbe obtained from chain by using the h_next or v_next links. Otherwise, the single input chain is\napproximated.\n@see cvStartReadChainPoints, cvReadChainPoint\n */\nCVAPI(CvSeq*) cvApproxChains( CvSeq* src_seq, CvMemStorage* storage,\n                            int method CV_DEFAULT(CV_CHAIN_APPROX_SIMPLE),\n                            double parameter CV_DEFAULT(0),\n                            int  minimal_perimeter CV_DEFAULT(0),\n                            int  recursive CV_DEFAULT(0));\n\n/** @brief Initializes Freeman chain reader.\n\n   The reader is used to iteratively get coordinates of all the chain points.\n   If the Freeman codes should be read as is, a simple sequence reader should be used\n@see cvApproxChains\n*/\nCVAPI(void) cvStartReadChainPoints( CvChain* chain, CvChainPtReader* reader );\n\n/** @brief Retrieves the next chain point\n@see cvApproxChains\n*/\nCVAPI(CvPoint) cvReadChainPoint( CvChainPtReader* reader );\n\n\n/****************************************************************************************\\\n*                            Contour Processing and Shape Analysis                       *\n\\****************************************************************************************/\n\n/** @brief Approximates a single polygonal curve (contour) or\n   a tree of polygonal curves (contours)\n@see cv::approxPolyDP\n*/\nCVAPI(CvSeq*)  cvApproxPoly( const void* src_seq,\n                             int header_size, CvMemStorage* storage,\n                             int method, double eps,\n                             int recursive CV_DEFAULT(0));\n\n/** @brief Calculates perimeter of a contour or length of a part of contour\n@see cv::arcLength\n*/\nCVAPI(double)  cvArcLength( const void* curve,\n                            CvSlice slice CV_DEFAULT(CV_WHOLE_SEQ),\n                            int is_closed CV_DEFAULT(-1));\n\n/** same as cvArcLength for closed contour\n*/\nCV_INLINE double cvContourPerimeter( const void* contour )\n{\n    return cvArcLength( contour, CV_WHOLE_SEQ, 1 );\n}\n\n\n/** @brief Calculates contour bounding rectangle (update=1) or\n   just retrieves pre-calculated rectangle (update=0)\n@see cv::boundingRect\n*/\nCVAPI(CvRect)  cvBoundingRect( CvArr* points, int update CV_DEFAULT(0) );\n\n/** @brief Calculates area of a contour or contour segment\n@see cv::contourArea\n*/\nCVAPI(double)  cvContourArea( const CvArr* contour,\n                              CvSlice slice CV_DEFAULT(CV_WHOLE_SEQ),\n                              int oriented CV_DEFAULT(0));\n\n/** @brief Finds minimum area rotated rectangle bounding a set of points\n@see cv::minAreaRect\n*/\nCVAPI(CvBox2D)  cvMinAreaRect2( const CvArr* points,\n                                CvMemStorage* storage CV_DEFAULT(NULL));\n\n/** @brief Finds minimum enclosing circle for a set of points\n@see cv::minEnclosingCircle\n*/\nCVAPI(int)  cvMinEnclosingCircle( const CvArr* points,\n                                  CvPoint2D32f* center, float* radius );\n\n/** @brief Compares two contours by matching their moments\n@see cv::matchShapes\n*/\nCVAPI(double)  cvMatchShapes( const void* object1, const void* object2,\n                              int method, double parameter CV_DEFAULT(0));\n\n/** @brief Calculates exact convex hull of 2d point set\n@see cv::convexHull\n*/\nCVAPI(CvSeq*) cvConvexHull2( const CvArr* input,\n                             void* hull_storage CV_DEFAULT(NULL),\n                             int orientation CV_DEFAULT(CV_CLOCKWISE),\n                             int return_points CV_DEFAULT(0));\n\n/** @brief Checks whether the contour is convex or not (returns 1 if convex, 0 if not)\n@see cv::isContourConvex\n*/\nCVAPI(int)  cvCheckContourConvexity( const CvArr* contour );\n\n\n/** @brief Finds convexity defects for the contour\n@see cv::convexityDefects\n*/\nCVAPI(CvSeq*)  cvConvexityDefects( const CvArr* contour, const CvArr* convexhull,\n                                   CvMemStorage* storage CV_DEFAULT(NULL));\n\n/** @brief Fits ellipse into a set of 2d points\n@see cv::fitEllipse\n*/\nCVAPI(CvBox2D) cvFitEllipse2( const CvArr* points );\n\n/** @brief Finds minimum rectangle containing two given rectangles */\nCVAPI(CvRect)  cvMaxRect( const CvRect* rect1, const CvRect* rect2 );\n\n/** @brief Finds coordinates of the box vertices */\nCVAPI(void) cvBoxPoints( CvBox2D box, CvPoint2D32f pt[4] );\n\n/** @brief Initializes sequence header for a matrix (column or row vector) of points\n\n   a wrapper for cvMakeSeqHeaderForArray (it does not initialize bounding rectangle!!!) */\nCVAPI(CvSeq*) cvPointSeqFromMat( int seq_kind, const CvArr* mat,\n                                 CvContour* contour_header,\n                                 CvSeqBlock* block );\n\n/** @brief Checks whether the point is inside polygon, outside, on an edge (at a vertex).\n\n   Returns positive, negative or zero value, correspondingly.\n   Optionally, measures a signed distance between\n   the point and the nearest polygon edge (measure_dist=1)\n@see cv::pointPolygonTest\n*/\nCVAPI(double) cvPointPolygonTest( const CvArr* contour,\n                                  CvPoint2D32f pt, int measure_dist );\n\n/****************************************************************************************\\\n*                                  Histogram functions                                   *\n\\****************************************************************************************/\n\n/** @brief Creates a histogram.\n\nThe function creates a histogram of the specified size and returns a pointer to the created\nhistogram. If the array ranges is 0, the histogram bin ranges must be specified later via the\nfunction cvSetHistBinRanges. Though cvCalcHist and cvCalcBackProject may process 8-bit images\nwithout setting bin ranges, they assume they are equally spaced in 0 to 255 bins.\n\n@param dims Number of histogram dimensions.\n@param sizes Array of the histogram dimension sizes.\n@param type Histogram representation format. CV_HIST_ARRAY means that the histogram data is\nrepresented as a multi-dimensional dense array CvMatND. CV_HIST_SPARSE means that histogram data\nis represented as a multi-dimensional sparse array CvSparseMat.\n@param ranges Array of ranges for the histogram bins. Its meaning depends on the uniform parameter\nvalue. The ranges are used when the histogram is calculated or backprojected to determine which\nhistogram bin corresponds to which value/tuple of values from the input image(s).\n@param uniform Uniformity flag. If not zero, the histogram has evenly spaced bins and for every\n\\f$0<=i<cDims\\f$ ranges[i] is an array of two numbers: lower and upper boundaries for the i-th\nhistogram dimension. The whole range [lower,upper] is then split into dims[i] equal parts to\ndetermine the i-th input tuple value ranges for every histogram bin. And if uniform=0 , then the\ni-th element of the ranges array contains dims[i]+1 elements: \\f$\\texttt{lower}_0,\n\\texttt{upper}_0, \\texttt{lower}_1, \\texttt{upper}_1 = \\texttt{lower}_2,\n...\n\\texttt{upper}_{dims[i]-1}\\f$ where \\f$\\texttt{lower}_j\\f$ and \\f$\\texttt{upper}_j\\f$ are lower\nand upper boundaries of the i-th input tuple value for the j-th bin, respectively. In either\ncase, the input values that are beyond the specified range for a histogram bin are not counted\nby cvCalcHist and filled with 0 by cvCalcBackProject.\n */\nCVAPI(CvHistogram*)  cvCreateHist( int dims, int* sizes, int type,\n                                   float** ranges CV_DEFAULT(NULL),\n                                   int uniform CV_DEFAULT(1));\n\n/** @brief Sets the bounds of the histogram bins.\n\nThis is a standalone function for setting bin ranges in the histogram. For a more detailed\ndescription of the parameters ranges and uniform, see the :ocvCalcHist function that can initialize\nthe ranges as well. Ranges for the histogram bins must be set before the histogram is calculated or\nthe backproject of the histogram is calculated.\n\n@param hist Histogram.\n@param ranges Array of bin ranges arrays. See :ocvCreateHist for details.\n@param uniform Uniformity flag. See :ocvCreateHist for details.\n */\nCVAPI(void)  cvSetHistBinRanges( CvHistogram* hist, float** ranges,\n                                int uniform CV_DEFAULT(1));\n\n/** @brief Makes a histogram out of an array.\n\nThe function initializes the histogram, whose header and bins are allocated by the user.\ncvReleaseHist does not need to be called afterwards. Only dense histograms can be initialized this\nway. The function returns hist.\n\n@param dims Number of the histogram dimensions.\n@param sizes Array of the histogram dimension sizes.\n@param hist Histogram header initialized by the function.\n@param data Array used to store histogram bins.\n@param ranges Histogram bin ranges. See cvCreateHist for details.\n@param uniform Uniformity flag. See cvCreateHist for details.\n */\nCVAPI(CvHistogram*)  cvMakeHistHeaderForArray(\n                            int  dims, int* sizes, CvHistogram* hist,\n                            float* data, float** ranges CV_DEFAULT(NULL),\n                            int uniform CV_DEFAULT(1));\n\n/** @brief Releases the histogram.\n\nThe function releases the histogram (header and the data). The pointer to the histogram is cleared\nby the function. If \\*hist pointer is already NULL, the function does nothing.\n\n@param hist Double pointer to the released histogram.\n */\nCVAPI(void)  cvReleaseHist( CvHistogram** hist );\n\n/** @brief Clears the histogram.\n\nThe function sets all of the histogram bins to 0 in case of a dense histogram and removes all\nhistogram bins in case of a sparse array.\n\n@param hist Histogram.\n */\nCVAPI(void)  cvClearHist( CvHistogram* hist );\n\n/** @brief Finds the minimum and maximum histogram bins.\n\nThe function finds the minimum and maximum histogram bins and their positions. All of output\narguments are optional. Among several extremas with the same value the ones with the minimum index\n(in the lexicographical order) are returned. In case of several maximums or minimums, the earliest\nin the lexicographical order (extrema locations) is returned.\n\n@param hist Histogram.\n@param min_value Pointer to the minimum value of the histogram.\n@param max_value Pointer to the maximum value of the histogram.\n@param min_idx Pointer to the array of coordinates for the minimum.\n@param max_idx Pointer to the array of coordinates for the maximum.\n */\nCVAPI(void)  cvGetMinMaxHistValue( const CvHistogram* hist,\n                                   float* min_value, float* max_value,\n                                   int* min_idx CV_DEFAULT(NULL),\n                                   int* max_idx CV_DEFAULT(NULL));\n\n\n/** @brief Normalizes the histogram.\n\nThe function normalizes the histogram bins by scaling them so that the sum of the bins becomes equal\nto factor.\n\n@param hist Pointer to the histogram.\n@param factor Normalization factor.\n */\nCVAPI(void)  cvNormalizeHist( CvHistogram* hist, double factor );\n\n\n/** @brief Thresholds the histogram.\n\nThe function clears histogram bins that are below the specified threshold.\n\n@param hist Pointer to the histogram.\n@param threshold Threshold level.\n */\nCVAPI(void)  cvThreshHist( CvHistogram* hist, double threshold );\n\n\n/** Compares two histogram */\nCVAPI(double)  cvCompareHist( const CvHistogram* hist1,\n                              const CvHistogram* hist2,\n                              int method);\n\n/** @brief Copies a histogram.\n\nThe function makes a copy of the histogram. If the second histogram pointer \\*dst is NULL, a new\nhistogram of the same size as src is created. Otherwise, both histograms must have equal types and\nsizes. Then the function copies the bin values of the source histogram to the destination histogram\nand sets the same bin value ranges as in src.\n\n@param src Source histogram.\n@param dst Pointer to the destination histogram.\n */\nCVAPI(void)  cvCopyHist( const CvHistogram* src, CvHistogram** dst );\n\n\n/** @brief Calculates bayesian probabilistic histograms\n   (each or src and dst is an array of _number_ histograms */\nCVAPI(void)  cvCalcBayesianProb( CvHistogram** src, int number,\n                                CvHistogram** dst);\n\n/** @brief Calculates array histogram\n@see cv::calcHist\n*/\nCVAPI(void)  cvCalcArrHist( CvArr** arr, CvHistogram* hist,\n                            int accumulate CV_DEFAULT(0),\n                            const CvArr* mask CV_DEFAULT(NULL) );\n\n/** @overload */\nCV_INLINE  void  cvCalcHist( IplImage** image, CvHistogram* hist,\n                             int accumulate CV_DEFAULT(0),\n                             const CvArr* mask CV_DEFAULT(NULL) )\n{\n    cvCalcArrHist( (CvArr**)image, hist, accumulate, mask );\n}\n\n/** @brief Calculates back project\n@see cvCalcBackProject, cv::calcBackProject\n*/\nCVAPI(void)  cvCalcArrBackProject( CvArr** image, CvArr* dst,\n                                   const CvHistogram* hist );\n\n#define  cvCalcBackProject(image, dst, hist) cvCalcArrBackProject((CvArr**)image, dst, hist)\n\n\n/** @brief Locates a template within an image by using a histogram comparison.\n\nThe function calculates the back projection by comparing histograms of the source image patches with\nthe given histogram. The function is similar to matchTemplate, but instead of comparing the raster\npatch with all its possible positions within the search window, the function CalcBackProjectPatch\ncompares histograms. See the algorithm diagram below:\n\n![image](pics/backprojectpatch.png)\n\n@param image Source images (though, you may pass CvMat\\*\\* as well).\n@param dst Destination image.\n@param range\n@param hist Histogram.\n@param method Comparison method passed to cvCompareHist (see the function description).\n@param factor Normalization factor for histograms that affects the normalization scale of the\ndestination image. Pass 1 if not sure.\n\n@see cvCalcBackProjectPatch\n */\nCVAPI(void)  cvCalcArrBackProjectPatch( CvArr** image, CvArr* dst, CvSize range,\n                                        CvHistogram* hist, int method,\n                                        double factor );\n\n#define  cvCalcBackProjectPatch( image, dst, range, hist, method, factor ) \\\n     cvCalcArrBackProjectPatch( (CvArr**)image, dst, range, hist, method, factor )\n\n\n/** @brief Divides one histogram by another.\n\nThe function calculates the object probability density from two histograms as:\n\n\\f[\\texttt{disthist} (I)= \\forkthree{0}{if \\(\\texttt{hist1}(I)=0\\)}{\\texttt{scale}}{if \\(\\texttt{hist1}(I) \\ne 0\\) and \\(\\texttt{hist2}(I) > \\texttt{hist1}(I)\\)}{\\frac{\\texttt{hist2}(I) \\cdot \\texttt{scale}}{\\texttt{hist1}(I)}}{if \\(\\texttt{hist1}(I) \\ne 0\\) and \\(\\texttt{hist2}(I) \\le \\texttt{hist1}(I)\\)}\\f]\n\n@param hist1 First histogram (the divisor).\n@param hist2 Second histogram.\n@param dst_hist Destination histogram.\n@param scale Scale factor for the destination histogram.\n */\nCVAPI(void)  cvCalcProbDensity( const CvHistogram* hist1, const CvHistogram* hist2,\n                                CvHistogram* dst_hist, double scale CV_DEFAULT(255) );\n\n/** @brief equalizes histogram of 8-bit single-channel image\n@see cv::equalizeHist\n*/\nCVAPI(void)  cvEqualizeHist( const CvArr* src, CvArr* dst );\n\n\n/** @brief Applies distance transform to binary image\n@see cv::distanceTransform\n*/\nCVAPI(void)  cvDistTransform( const CvArr* src, CvArr* dst,\n                              int distance_type CV_DEFAULT(CV_DIST_L2),\n                              int mask_size CV_DEFAULT(3),\n                              const float* mask CV_DEFAULT(NULL),\n                              CvArr* labels CV_DEFAULT(NULL),\n                              int labelType CV_DEFAULT(CV_DIST_LABEL_CCOMP));\n\n\n/** @brief Applies fixed-level threshold to grayscale image.\n\n   This is a basic operation applied before retrieving contours\n@see cv::threshold\n*/\nCVAPI(double)  cvThreshold( const CvArr*  src, CvArr*  dst,\n                            double  threshold, double  max_value,\n                            int threshold_type );\n\n/** @brief Applies adaptive threshold to grayscale image.\n\n   The two parameters for methods CV_ADAPTIVE_THRESH_MEAN_C and\n   CV_ADAPTIVE_THRESH_GAUSSIAN_C are:\n   neighborhood size (3, 5, 7 etc.),\n   and a constant subtracted from mean (...,-3,-2,-1,0,1,2,3,...)\n@see cv::adaptiveThreshold\n*/\nCVAPI(void)  cvAdaptiveThreshold( const CvArr* src, CvArr* dst, double max_value,\n                                  int adaptive_method CV_DEFAULT(CV_ADAPTIVE_THRESH_MEAN_C),\n                                  int threshold_type CV_DEFAULT(CV_THRESH_BINARY),\n                                  int block_size CV_DEFAULT(3),\n                                  double param1 CV_DEFAULT(5));\n\n/** @brief Fills the connected component until the color difference gets large enough\n@see cv::floodFill\n*/\nCVAPI(void)  cvFloodFill( CvArr* image, CvPoint seed_point,\n                          CvScalar new_val, CvScalar lo_diff CV_DEFAULT(cvScalarAll(0)),\n                          CvScalar up_diff CV_DEFAULT(cvScalarAll(0)),\n                          CvConnectedComp* comp CV_DEFAULT(NULL),\n                          int flags CV_DEFAULT(4),\n                          CvArr* mask CV_DEFAULT(NULL));\n\n/****************************************************************************************\\\n*                                  Feature detection                                     *\n\\****************************************************************************************/\n\n/** @brief Runs canny edge detector\n@see cv::Canny\n*/\nCVAPI(void)  cvCanny( const CvArr* image, CvArr* edges, double threshold1,\n                      double threshold2, int  aperture_size CV_DEFAULT(3) );\n\n/** @brief Calculates constraint image for corner detection\n\n   Dx^2 * Dyy + Dxx * Dy^2 - 2 * Dx * Dy * Dxy.\n   Applying threshold to the result gives coordinates of corners\n@see cv::preCornerDetect\n*/\nCVAPI(void) cvPreCornerDetect( const CvArr* image, CvArr* corners,\n                               int aperture_size CV_DEFAULT(3) );\n\n/** @brief Calculates eigen values and vectors of 2x2\n   gradient covariation matrix at every image pixel\n@see cv::cornerEigenValsAndVecs\n*/\nCVAPI(void)  cvCornerEigenValsAndVecs( const CvArr* image, CvArr* eigenvv,\n                                       int block_size, int aperture_size CV_DEFAULT(3) );\n\n/** @brief Calculates minimal eigenvalue for 2x2 gradient covariation matrix at\n   every image pixel\n@see cv::cornerMinEigenVal\n*/\nCVAPI(void)  cvCornerMinEigenVal( const CvArr* image, CvArr* eigenval,\n                                  int block_size, int aperture_size CV_DEFAULT(3) );\n\n/** @brief Harris corner detector:\n\n   Calculates det(M) - k*(trace(M)^2), where M is 2x2 gradient covariation matrix for each pixel\n@see cv::cornerHarris\n*/\nCVAPI(void)  cvCornerHarris( const CvArr* image, CvArr* harris_response,\n                             int block_size, int aperture_size CV_DEFAULT(3),\n                             double k CV_DEFAULT(0.04) );\n\n/** @brief Adjust corner position using some sort of gradient search\n@see cv::cornerSubPix\n*/\nCVAPI(void)  cvFindCornerSubPix( const CvArr* image, CvPoint2D32f* corners,\n                                 int count, CvSize win, CvSize zero_zone,\n                                 CvTermCriteria  criteria );\n\n/** @brief Finds a sparse set of points within the selected region\n   that seem to be easy to track\n@see cv::goodFeaturesToTrack\n*/\nCVAPI(void)  cvGoodFeaturesToTrack( const CvArr* image, CvArr* eig_image,\n                                    CvArr* temp_image, CvPoint2D32f* corners,\n                                    int* corner_count, double  quality_level,\n                                    double  min_distance,\n                                    const CvArr* mask CV_DEFAULT(NULL),\n                                    int block_size CV_DEFAULT(3),\n                                    int use_harris CV_DEFAULT(0),\n                                    double k CV_DEFAULT(0.04) );\n\n/** @brief Finds lines on binary image using one of several methods.\n\n   line_storage is either memory storage or 1 x _max number of lines_ CvMat, its\n   number of columns is changed by the function.\n   method is one of CV_HOUGH_*;\n   rho, theta and threshold are used for each of those methods;\n   param1 ~ line length, param2 ~ line gap - for probabilistic,\n   param1 ~ srn, param2 ~ stn - for multi-scale\n@see cv::HoughLines\n*/\nCVAPI(CvSeq*)  cvHoughLines2( CvArr* image, void* line_storage, int method,\n                              double rho, double theta, int threshold,\n                              double param1 CV_DEFAULT(0), double param2 CV_DEFAULT(0),\n                              double min_theta CV_DEFAULT(0), double max_theta CV_DEFAULT(CV_PI));\n\n/** @brief Finds circles in the image\n@see cv::HoughCircles\n*/\nCVAPI(CvSeq*) cvHoughCircles( CvArr* image, void* circle_storage,\n                              int method, double dp, double min_dist,\n                              double param1 CV_DEFAULT(100),\n                              double param2 CV_DEFAULT(100),\n                              int min_radius CV_DEFAULT(0),\n                              int max_radius CV_DEFAULT(0));\n\n/** @brief Fits a line into set of 2d or 3d points in a robust way (M-estimator technique)\n@see cv::fitLine\n*/\nCVAPI(void)  cvFitLine( const CvArr* points, int dist_type, double param,\n                        double reps, double aeps, float* line );\n\n/****************************************************************************************\\\n*                                     Drawing                                            *\n\\****************************************************************************************/\n\n/****************************************************************************************\\\n*       Drawing functions work with images/matrices of arbitrary type.                   *\n*       For color images the channel order is BGR[A]                                     *\n*       Antialiasing is supported only for 8-bit image now.                              *\n*       All the functions include parameter color that means rgb value (that may be      *\n*       constructed with CV_RGB macro) for color images and brightness                   *\n*       for grayscale images.                                                            *\n*       If a drawn figure is partially or completely outside of the image, it is clipped.*\n\\****************************************************************************************/\n\n#define CV_RGB( r, g, b )  cvScalar( (b), (g), (r), 0 )\n#define CV_FILLED -1\n\n#define CV_AA 16\n\n/** @brief Draws 4-connected, 8-connected or antialiased line segment connecting two points\n@see cv::line\n*/\nCVAPI(void)  cvLine( CvArr* img, CvPoint pt1, CvPoint pt2,\n                     CvScalar color, int thickness CV_DEFAULT(1),\n                     int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0) );\n\n/** @brief Draws a rectangle given two opposite corners of the rectangle (pt1 & pt2)\n\n   if thickness<0 (e.g. thickness == CV_FILLED), the filled box is drawn\n@see cv::rectangle\n*/\nCVAPI(void)  cvRectangle( CvArr* img, CvPoint pt1, CvPoint pt2,\n                          CvScalar color, int thickness CV_DEFAULT(1),\n                          int line_type CV_DEFAULT(8),\n                          int shift CV_DEFAULT(0));\n\n/** @brief Draws a rectangle specified by a CvRect structure\n@see cv::rectangle\n*/\nCVAPI(void)  cvRectangleR( CvArr* img, CvRect r,\n                           CvScalar color, int thickness CV_DEFAULT(1),\n                           int line_type CV_DEFAULT(8),\n                           int shift CV_DEFAULT(0));\n\n\n/** @brief Draws a circle with specified center and radius.\n\n   Thickness works in the same way as with cvRectangle\n@see cv::circle\n*/\nCVAPI(void)  cvCircle( CvArr* img, CvPoint center, int radius,\n                       CvScalar color, int thickness CV_DEFAULT(1),\n                       int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0));\n\n/** @brief Draws ellipse outline, filled ellipse, elliptic arc or filled elliptic sector\n\n   depending on _thickness_, _start_angle_ and _end_angle_ parameters. The resultant figure\n   is rotated by _angle_. All the angles are in degrees\n@see cv::ellipse\n*/\nCVAPI(void)  cvEllipse( CvArr* img, CvPoint center, CvSize axes,\n                        double angle, double start_angle, double end_angle,\n                        CvScalar color, int thickness CV_DEFAULT(1),\n                        int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0));\n\nCV_INLINE  void  cvEllipseBox( CvArr* img, CvBox2D box, CvScalar color,\n                               int thickness CV_DEFAULT(1),\n                               int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0) )\n{\n    CvSize axes;\n    axes.width = cvRound(box.size.width*0.5);\n    axes.height = cvRound(box.size.height*0.5);\n\n    cvEllipse( img, cvPointFrom32f( box.center ), axes, box.angle,\n               0, 360, color, thickness, line_type, shift );\n}\n\n/** @brief Fills convex or monotonous polygon.\n@see cv::fillConvexPoly\n*/\nCVAPI(void)  cvFillConvexPoly( CvArr* img, const CvPoint* pts, int npts, CvScalar color,\n                               int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0));\n\n/** @brief Fills an area bounded by one or more arbitrary polygons\n@see cv::fillPoly\n*/\nCVAPI(void)  cvFillPoly( CvArr* img, CvPoint** pts, const int* npts,\n                         int contours, CvScalar color,\n                         int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0) );\n\n/** @brief Draws one or more polygonal curves\n@see cv::polylines\n*/\nCVAPI(void)  cvPolyLine( CvArr* img, CvPoint** pts, const int* npts, int contours,\n                         int is_closed, CvScalar color, int thickness CV_DEFAULT(1),\n                         int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0) );\n\n#define cvDrawRect cvRectangle\n#define cvDrawLine cvLine\n#define cvDrawCircle cvCircle\n#define cvDrawEllipse cvEllipse\n#define cvDrawPolyLine cvPolyLine\n\n/** @brief Clips the line segment connecting *pt1 and *pt2\n   by the rectangular window\n\n   (0<=x<img_size.width, 0<=y<img_size.height).\n@see cv::clipLine\n*/\nCVAPI(int) cvClipLine( CvSize img_size, CvPoint* pt1, CvPoint* pt2 );\n\n/** @brief Initializes line iterator.\n\nInitially, line_iterator->ptr will point to pt1 (or pt2, see left_to_right description) location in\nthe image. Returns the number of pixels on the line between the ending points.\n@see cv::LineIterator\n*/\nCVAPI(int)  cvInitLineIterator( const CvArr* image, CvPoint pt1, CvPoint pt2,\n                                CvLineIterator* line_iterator,\n                                int connectivity CV_DEFAULT(8),\n                                int left_to_right CV_DEFAULT(0));\n\n#define CV_NEXT_LINE_POINT( line_iterator )                     \\\n{                                                               \\\n    int _line_iterator_mask = (line_iterator).err < 0 ? -1 : 0; \\\n    (line_iterator).err += (line_iterator).minus_delta +        \\\n        ((line_iterator).plus_delta & _line_iterator_mask);     \\\n    (line_iterator).ptr += (line_iterator).minus_step +         \\\n        ((line_iterator).plus_step & _line_iterator_mask);      \\\n}\n\n\n#define CV_FONT_HERSHEY_SIMPLEX         0\n#define CV_FONT_HERSHEY_PLAIN           1\n#define CV_FONT_HERSHEY_DUPLEX          2\n#define CV_FONT_HERSHEY_COMPLEX         3\n#define CV_FONT_HERSHEY_TRIPLEX         4\n#define CV_FONT_HERSHEY_COMPLEX_SMALL   5\n#define CV_FONT_HERSHEY_SCRIPT_SIMPLEX  6\n#define CV_FONT_HERSHEY_SCRIPT_COMPLEX  7\n\n#define CV_FONT_ITALIC                 16\n\n#define CV_FONT_VECTOR0    CV_FONT_HERSHEY_SIMPLEX\n\n\n/** Font structure */\ntypedef struct CvFont\n{\n  const char* nameFont;   //Qt:nameFont\n  CvScalar color;       //Qt:ColorFont -> cvScalar(blue_component, green_component, red_component[, alpha_component])\n    int         font_face;    //Qt: bool italic         /** =CV_FONT_* */\n    const int*  ascii;      //!< font data and metrics\n    const int*  greek;\n    const int*  cyrillic;\n    float       hscale, vscale;\n    float       shear;      //!< slope coefficient: 0 - normal, >0 - italic\n    int         thickness;    //!< Qt: weight               /** letters thickness */\n    float       dx;       //!< horizontal interval between letters\n    int         line_type;    //!< Qt: PointSize\n}\nCvFont;\n\n/** @brief Initializes font structure (OpenCV 1.x API).\n\nThe function initializes the font structure that can be passed to text rendering functions.\n\n@param font Pointer to the font structure initialized by the function\n@param font_face Font name identifier. See cv::HersheyFonts and corresponding old CV_* identifiers.\n@param hscale Horizontal scale. If equal to 1.0f , the characters have the original width\ndepending on the font type. If equal to 0.5f , the characters are of half the original width.\n@param vscale Vertical scale. If equal to 1.0f , the characters have the original height depending\non the font type. If equal to 0.5f , the characters are of half the original height.\n@param shear Approximate tangent of the character slope relative to the vertical line. A zero\nvalue means a non-italic font, 1.0f means about a 45 degree slope, etc.\n@param thickness Thickness of the text strokes\n@param line_type Type of the strokes, see line description\n\n@sa cvPutText\n */\nCVAPI(void)  cvInitFont( CvFont* font, int font_face,\n                         double hscale, double vscale,\n                         double shear CV_DEFAULT(0),\n                         int thickness CV_DEFAULT(1),\n                         int line_type CV_DEFAULT(8));\n\nCV_INLINE CvFont cvFont( double scale, int thickness CV_DEFAULT(1) )\n{\n    CvFont font;\n    cvInitFont( &font, CV_FONT_HERSHEY_PLAIN, scale, scale, 0, thickness, CV_AA );\n    return font;\n}\n\n/** @brief Renders text stroke with specified font and color at specified location.\n   CvFont should be initialized with cvInitFont\n@see cvInitFont, cvGetTextSize, cvFont, cv::putText\n*/\nCVAPI(void)  cvPutText( CvArr* img, const char* text, CvPoint org,\n                        const CvFont* font, CvScalar color );\n\n/** @brief Calculates bounding box of text stroke (useful for alignment)\n@see cv::getTextSize\n*/\nCVAPI(void)  cvGetTextSize( const char* text_string, const CvFont* font,\n                            CvSize* text_size, int* baseline );\n\n/** @brief Unpacks color value\n\nif arrtype is CV_8UC?, _color_ is treated as packed color value, otherwise the first channels\n(depending on arrtype) of destination scalar are set to the same value = _color_\n*/\nCVAPI(CvScalar)  cvColorToScalar( double packed_color, int arrtype );\n\n/** @brief Returns the polygon points which make up the given ellipse.\n\nThe ellipse is define by the box of size 'axes' rotated 'angle' around the 'center'. A partial\nsweep of the ellipse arc can be done by spcifying arc_start and arc_end to be something other than\n0 and 360, respectively. The input array 'pts' must be large enough to hold the result. The total\nnumber of points stored into 'pts' is returned by this function.\n@see cv::ellipse2Poly\n*/\nCVAPI(int) cvEllipse2Poly( CvPoint center, CvSize axes,\n                 int angle, int arc_start, int arc_end, CvPoint * pts, int delta );\n\n/** @brief Draws contour outlines or filled interiors on the image\n@see cv::drawContours\n*/\nCVAPI(void)  cvDrawContours( CvArr *img, CvSeq* contour,\n                             CvScalar external_color, CvScalar hole_color,\n                             int max_level, int thickness CV_DEFAULT(1),\n                             int line_type CV_DEFAULT(8),\n                             CvPoint offset CV_DEFAULT(cvPoint(0,0)));\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/imgproc/types_c.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_IMGPROC_TYPES_C_H__\n#define __OPENCV_IMGPROC_TYPES_C_H__\n\n#include \"opencv2/core/core_c.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup imgproc_c\n  @{\n*/\n\n/** Connected component structure */\ntypedef struct CvConnectedComp\n{\n    double area;    /**<area of the connected component  */\n    CvScalar value; /**<average color of the connected component */\n    CvRect rect;    /**<ROI of the component  */\n    CvSeq* contour; /**<optional component boundary\n                      (the contour might have child contours corresponding to the holes)*/\n}\nCvConnectedComp;\n\n/** Image smooth methods */\nenum SmoothMethod_c\n{\n    /** linear convolution with \\f$\\texttt{size1}\\times\\texttt{size2}\\f$ box kernel (all 1's). If\n    you want to smooth different pixels with different-size box kernels, you can use the integral\n    image that is computed using integral */\n    CV_BLUR_NO_SCALE =0,\n    /** linear convolution with \\f$\\texttt{size1}\\times\\texttt{size2}\\f$ box kernel (all\n    1's) with subsequent scaling by \\f$1/(\\texttt{size1}\\cdot\\texttt{size2})\\f$ */\n    CV_BLUR  =1,\n    /** linear convolution with a \\f$\\texttt{size1}\\times\\texttt{size2}\\f$ Gaussian kernel */\n    CV_GAUSSIAN  =2,\n    /** median filter with a \\f$\\texttt{size1}\\times\\texttt{size1}\\f$ square aperture */\n    CV_MEDIAN =3,\n    /** bilateral filter with a \\f$\\texttt{size1}\\times\\texttt{size1}\\f$ square aperture, color\n    sigma= sigma1 and spatial sigma= sigma2. If size1=0, the aperture square side is set to\n    cvRound(sigma2\\*1.5)\\*2+1. See cv::bilateralFilter */\n    CV_BILATERAL =4\n};\n\n/** Filters used in pyramid decomposition */\nenum\n{\n    CV_GAUSSIAN_5x5 = 7\n};\n\n/** Special filters */\nenum\n{\n    CV_SCHARR =-1,\n    CV_MAX_SOBEL_KSIZE =7\n};\n\n/** Constants for color conversion */\nenum\n{\n    CV_BGR2BGRA    =0,\n    CV_RGB2RGBA    =CV_BGR2BGRA,\n\n    CV_BGRA2BGR    =1,\n    CV_RGBA2RGB    =CV_BGRA2BGR,\n\n    CV_BGR2RGBA    =2,\n    CV_RGB2BGRA    =CV_BGR2RGBA,\n\n    CV_RGBA2BGR    =3,\n    CV_BGRA2RGB    =CV_RGBA2BGR,\n\n    CV_BGR2RGB     =4,\n    CV_RGB2BGR     =CV_BGR2RGB,\n\n    CV_BGRA2RGBA   =5,\n    CV_RGBA2BGRA   =CV_BGRA2RGBA,\n\n    CV_BGR2GRAY    =6,\n    CV_RGB2GRAY    =7,\n    CV_GRAY2BGR    =8,\n    CV_GRAY2RGB    =CV_GRAY2BGR,\n    CV_GRAY2BGRA   =9,\n    CV_GRAY2RGBA   =CV_GRAY2BGRA,\n    CV_BGRA2GRAY   =10,\n    CV_RGBA2GRAY   =11,\n\n    CV_BGR2BGR565  =12,\n    CV_RGB2BGR565  =13,\n    CV_BGR5652BGR  =14,\n    CV_BGR5652RGB  =15,\n    CV_BGRA2BGR565 =16,\n    CV_RGBA2BGR565 =17,\n    CV_BGR5652BGRA =18,\n    CV_BGR5652RGBA =19,\n\n    CV_GRAY2BGR565 =20,\n    CV_BGR5652GRAY =21,\n\n    CV_BGR2BGR555  =22,\n    CV_RGB2BGR555  =23,\n    CV_BGR5552BGR  =24,\n    CV_BGR5552RGB  =25,\n    CV_BGRA2BGR555 =26,\n    CV_RGBA2BGR555 =27,\n    CV_BGR5552BGRA =28,\n    CV_BGR5552RGBA =29,\n\n    CV_GRAY2BGR555 =30,\n    CV_BGR5552GRAY =31,\n\n    CV_BGR2XYZ     =32,\n    CV_RGB2XYZ     =33,\n    CV_XYZ2BGR     =34,\n    CV_XYZ2RGB     =35,\n\n    CV_BGR2YCrCb   =36,\n    CV_RGB2YCrCb   =37,\n    CV_YCrCb2BGR   =38,\n    CV_YCrCb2RGB   =39,\n\n    CV_BGR2HSV     =40,\n    CV_RGB2HSV     =41,\n\n    CV_BGR2Lab     =44,\n    CV_RGB2Lab     =45,\n\n    CV_BayerBG2BGR =46,\n    CV_BayerGB2BGR =47,\n    CV_BayerRG2BGR =48,\n    CV_BayerGR2BGR =49,\n\n    CV_BayerBG2RGB =CV_BayerRG2BGR,\n    CV_BayerGB2RGB =CV_BayerGR2BGR,\n    CV_BayerRG2RGB =CV_BayerBG2BGR,\n    CV_BayerGR2RGB =CV_BayerGB2BGR,\n\n    CV_BGR2Luv     =50,\n    CV_RGB2Luv     =51,\n    CV_BGR2HLS     =52,\n    CV_RGB2HLS     =53,\n\n    CV_HSV2BGR     =54,\n    CV_HSV2RGB     =55,\n\n    CV_Lab2BGR     =56,\n    CV_Lab2RGB     =57,\n    CV_Luv2BGR     =58,\n    CV_Luv2RGB     =59,\n    CV_HLS2BGR     =60,\n    CV_HLS2RGB     =61,\n\n    CV_BayerBG2BGR_VNG =62,\n    CV_BayerGB2BGR_VNG =63,\n    CV_BayerRG2BGR_VNG =64,\n    CV_BayerGR2BGR_VNG =65,\n\n    CV_BayerBG2RGB_VNG =CV_BayerRG2BGR_VNG,\n    CV_BayerGB2RGB_VNG =CV_BayerGR2BGR_VNG,\n    CV_BayerRG2RGB_VNG =CV_BayerBG2BGR_VNG,\n    CV_BayerGR2RGB_VNG =CV_BayerGB2BGR_VNG,\n\n    CV_BGR2HSV_FULL = 66,\n    CV_RGB2HSV_FULL = 67,\n    CV_BGR2HLS_FULL = 68,\n    CV_RGB2HLS_FULL = 69,\n\n    CV_HSV2BGR_FULL = 70,\n    CV_HSV2RGB_FULL = 71,\n    CV_HLS2BGR_FULL = 72,\n    CV_HLS2RGB_FULL = 73,\n\n    CV_LBGR2Lab     = 74,\n    CV_LRGB2Lab     = 75,\n    CV_LBGR2Luv     = 76,\n    CV_LRGB2Luv     = 77,\n\n    CV_Lab2LBGR     = 78,\n    CV_Lab2LRGB     = 79,\n    CV_Luv2LBGR     = 80,\n    CV_Luv2LRGB     = 81,\n\n    CV_BGR2YUV      = 82,\n    CV_RGB2YUV      = 83,\n    CV_YUV2BGR      = 84,\n    CV_YUV2RGB      = 85,\n\n    CV_BayerBG2GRAY = 86,\n    CV_BayerGB2GRAY = 87,\n    CV_BayerRG2GRAY = 88,\n    CV_BayerGR2GRAY = 89,\n\n    //YUV 4:2:0 formats family\n    CV_YUV2RGB_NV12 = 90,\n    CV_YUV2BGR_NV12 = 91,\n    CV_YUV2RGB_NV21 = 92,\n    CV_YUV2BGR_NV21 = 93,\n    CV_YUV420sp2RGB = CV_YUV2RGB_NV21,\n    CV_YUV420sp2BGR = CV_YUV2BGR_NV21,\n\n    CV_YUV2RGBA_NV12 = 94,\n    CV_YUV2BGRA_NV12 = 95,\n    CV_YUV2RGBA_NV21 = 96,\n    CV_YUV2BGRA_NV21 = 97,\n    CV_YUV420sp2RGBA = CV_YUV2RGBA_NV21,\n    CV_YUV420sp2BGRA = CV_YUV2BGRA_NV21,\n\n    CV_YUV2RGB_YV12 = 98,\n    CV_YUV2BGR_YV12 = 99,\n    CV_YUV2RGB_IYUV = 100,\n    CV_YUV2BGR_IYUV = 101,\n    CV_YUV2RGB_I420 = CV_YUV2RGB_IYUV,\n    CV_YUV2BGR_I420 = CV_YUV2BGR_IYUV,\n    CV_YUV420p2RGB = CV_YUV2RGB_YV12,\n    CV_YUV420p2BGR = CV_YUV2BGR_YV12,\n\n    CV_YUV2RGBA_YV12 = 102,\n    CV_YUV2BGRA_YV12 = 103,\n    CV_YUV2RGBA_IYUV = 104,\n    CV_YUV2BGRA_IYUV = 105,\n    CV_YUV2RGBA_I420 = CV_YUV2RGBA_IYUV,\n    CV_YUV2BGRA_I420 = CV_YUV2BGRA_IYUV,\n    CV_YUV420p2RGBA = CV_YUV2RGBA_YV12,\n    CV_YUV420p2BGRA = CV_YUV2BGRA_YV12,\n\n    CV_YUV2GRAY_420 = 106,\n    CV_YUV2GRAY_NV21 = CV_YUV2GRAY_420,\n    CV_YUV2GRAY_NV12 = CV_YUV2GRAY_420,\n    CV_YUV2GRAY_YV12 = CV_YUV2GRAY_420,\n    CV_YUV2GRAY_IYUV = CV_YUV2GRAY_420,\n    CV_YUV2GRAY_I420 = CV_YUV2GRAY_420,\n    CV_YUV420sp2GRAY = CV_YUV2GRAY_420,\n    CV_YUV420p2GRAY = CV_YUV2GRAY_420,\n\n    //YUV 4:2:2 formats family\n    CV_YUV2RGB_UYVY = 107,\n    CV_YUV2BGR_UYVY = 108,\n    //CV_YUV2RGB_VYUY = 109,\n    //CV_YUV2BGR_VYUY = 110,\n    CV_YUV2RGB_Y422 = CV_YUV2RGB_UYVY,\n    CV_YUV2BGR_Y422 = CV_YUV2BGR_UYVY,\n    CV_YUV2RGB_UYNV = CV_YUV2RGB_UYVY,\n    CV_YUV2BGR_UYNV = CV_YUV2BGR_UYVY,\n\n    CV_YUV2RGBA_UYVY = 111,\n    CV_YUV2BGRA_UYVY = 112,\n    //CV_YUV2RGBA_VYUY = 113,\n    //CV_YUV2BGRA_VYUY = 114,\n    CV_YUV2RGBA_Y422 = CV_YUV2RGBA_UYVY,\n    CV_YUV2BGRA_Y422 = CV_YUV2BGRA_UYVY,\n    CV_YUV2RGBA_UYNV = CV_YUV2RGBA_UYVY,\n    CV_YUV2BGRA_UYNV = CV_YUV2BGRA_UYVY,\n\n    CV_YUV2RGB_YUY2 = 115,\n    CV_YUV2BGR_YUY2 = 116,\n    CV_YUV2RGB_YVYU = 117,\n    CV_YUV2BGR_YVYU = 118,\n    CV_YUV2RGB_YUYV = CV_YUV2RGB_YUY2,\n    CV_YUV2BGR_YUYV = CV_YUV2BGR_YUY2,\n    CV_YUV2RGB_YUNV = CV_YUV2RGB_YUY2,\n    CV_YUV2BGR_YUNV = CV_YUV2BGR_YUY2,\n\n    CV_YUV2RGBA_YUY2 = 119,\n    CV_YUV2BGRA_YUY2 = 120,\n    CV_YUV2RGBA_YVYU = 121,\n    CV_YUV2BGRA_YVYU = 122,\n    CV_YUV2RGBA_YUYV = CV_YUV2RGBA_YUY2,\n    CV_YUV2BGRA_YUYV = CV_YUV2BGRA_YUY2,\n    CV_YUV2RGBA_YUNV = CV_YUV2RGBA_YUY2,\n    CV_YUV2BGRA_YUNV = CV_YUV2BGRA_YUY2,\n\n    CV_YUV2GRAY_UYVY = 123,\n    CV_YUV2GRAY_YUY2 = 124,\n    //CV_YUV2GRAY_VYUY = CV_YUV2GRAY_UYVY,\n    CV_YUV2GRAY_Y422 = CV_YUV2GRAY_UYVY,\n    CV_YUV2GRAY_UYNV = CV_YUV2GRAY_UYVY,\n    CV_YUV2GRAY_YVYU = CV_YUV2GRAY_YUY2,\n    CV_YUV2GRAY_YUYV = CV_YUV2GRAY_YUY2,\n    CV_YUV2GRAY_YUNV = CV_YUV2GRAY_YUY2,\n\n    // alpha premultiplication\n    CV_RGBA2mRGBA = 125,\n    CV_mRGBA2RGBA = 126,\n\n    CV_RGB2YUV_I420 = 127,\n    CV_BGR2YUV_I420 = 128,\n    CV_RGB2YUV_IYUV = CV_RGB2YUV_I420,\n    CV_BGR2YUV_IYUV = CV_BGR2YUV_I420,\n\n    CV_RGBA2YUV_I420 = 129,\n    CV_BGRA2YUV_I420 = 130,\n    CV_RGBA2YUV_IYUV = CV_RGBA2YUV_I420,\n    CV_BGRA2YUV_IYUV = CV_BGRA2YUV_I420,\n    CV_RGB2YUV_YV12  = 131,\n    CV_BGR2YUV_YV12  = 132,\n    CV_RGBA2YUV_YV12 = 133,\n    CV_BGRA2YUV_YV12 = 134,\n\n    // Edge-Aware Demosaicing\n    CV_BayerBG2BGR_EA = 135,\n    CV_BayerGB2BGR_EA = 136,\n    CV_BayerRG2BGR_EA = 137,\n    CV_BayerGR2BGR_EA = 138,\n\n    CV_BayerBG2RGB_EA = CV_BayerRG2BGR_EA,\n    CV_BayerGB2RGB_EA = CV_BayerGR2BGR_EA,\n    CV_BayerRG2RGB_EA = CV_BayerBG2BGR_EA,\n    CV_BayerGR2RGB_EA = CV_BayerGB2BGR_EA,\n\n    CV_COLORCVT_MAX  = 139\n};\n\n\n/** Sub-pixel interpolation methods */\nenum\n{\n    CV_INTER_NN        =0,\n    CV_INTER_LINEAR    =1,\n    CV_INTER_CUBIC     =2,\n    CV_INTER_AREA      =3,\n    CV_INTER_LANCZOS4  =4\n};\n\n/** ... and other image warping flags */\nenum\n{\n    CV_WARP_FILL_OUTLIERS =8,\n    CV_WARP_INVERSE_MAP  =16\n};\n\n/** Shapes of a structuring element for morphological operations\n@see cv::MorphShapes, cv::getStructuringElement\n*/\nenum MorphShapes_c\n{\n    CV_SHAPE_RECT      =0,\n    CV_SHAPE_CROSS     =1,\n    CV_SHAPE_ELLIPSE   =2,\n    CV_SHAPE_CUSTOM    =100 //!< custom structuring element\n};\n\n/** Morphological operations */\nenum\n{\n    CV_MOP_ERODE        =0,\n    CV_MOP_DILATE       =1,\n    CV_MOP_OPEN         =2,\n    CV_MOP_CLOSE        =3,\n    CV_MOP_GRADIENT     =4,\n    CV_MOP_TOPHAT       =5,\n    CV_MOP_BLACKHAT     =6\n};\n\n/** Spatial and central moments */\ntypedef struct CvMoments\n{\n    double  m00, m10, m01, m20, m11, m02, m30, m21, m12, m03; /**< spatial moments */\n    double  mu20, mu11, mu02, mu30, mu21, mu12, mu03; /**< central moments */\n    double  inv_sqrt_m00; /**< m00 != 0 ? 1/sqrt(m00) : 0 */\n\n#ifdef __cplusplus\n    CvMoments(){}\n    CvMoments(const cv::Moments& m)\n    {\n        m00 = m.m00; m10 = m.m10; m01 = m.m01;\n        m20 = m.m20; m11 = m.m11; m02 = m.m02;\n        m30 = m.m30; m21 = m.m21; m12 = m.m12; m03 = m.m03;\n        mu20 = m.mu20; mu11 = m.mu11; mu02 = m.mu02;\n        mu30 = m.mu30; mu21 = m.mu21; mu12 = m.mu12; mu03 = m.mu03;\n        double am00 = std::abs(m.m00);\n        inv_sqrt_m00 = am00 > DBL_EPSILON ? 1./std::sqrt(am00) : 0;\n    }\n    operator cv::Moments() const\n    {\n        return cv::Moments(m00, m10, m01, m20, m11, m02, m30, m21, m12, m03);\n    }\n#endif\n}\nCvMoments;\n\n/** Hu invariants */\ntypedef struct CvHuMoments\n{\n    double hu1, hu2, hu3, hu4, hu5, hu6, hu7; /**< Hu invariants */\n}\nCvHuMoments;\n\n/** Template matching methods */\nenum\n{\n    CV_TM_SQDIFF        =0,\n    CV_TM_SQDIFF_NORMED =1,\n    CV_TM_CCORR         =2,\n    CV_TM_CCORR_NORMED  =3,\n    CV_TM_CCOEFF        =4,\n    CV_TM_CCOEFF_NORMED =5\n};\n\ntypedef float (CV_CDECL * CvDistanceFunction)( const float* a, const float* b, void* user_param );\n\n/** Contour retrieval modes */\nenum\n{\n    CV_RETR_EXTERNAL=0,\n    CV_RETR_LIST=1,\n    CV_RETR_CCOMP=2,\n    CV_RETR_TREE=3,\n    CV_RETR_FLOODFILL=4\n};\n\n/** Contour approximation methods */\nenum\n{\n    CV_CHAIN_CODE=0,\n    CV_CHAIN_APPROX_NONE=1,\n    CV_CHAIN_APPROX_SIMPLE=2,\n    CV_CHAIN_APPROX_TC89_L1=3,\n    CV_CHAIN_APPROX_TC89_KCOS=4,\n    CV_LINK_RUNS=5\n};\n\n/*\nInternal structure that is used for sequential retrieving contours from the image.\nIt supports both hierarchical and plane variants of Suzuki algorithm.\n*/\ntypedef struct _CvContourScanner* CvContourScanner;\n\n/** Freeman chain reader state */\ntypedef struct CvChainPtReader\n{\n    CV_SEQ_READER_FIELDS()\n    char      code;\n    CvPoint   pt;\n    schar     deltas[8][2];\n}\nCvChainPtReader;\n\n/** initializes 8-element array for fast access to 3x3 neighborhood of a pixel */\n#define  CV_INIT_3X3_DELTAS( deltas, step, nch )            \\\n    ((deltas)[0] =  (nch),  (deltas)[1] = -(step) + (nch),  \\\n     (deltas)[2] = -(step), (deltas)[3] = -(step) - (nch),  \\\n     (deltas)[4] = -(nch),  (deltas)[5] =  (step) - (nch),  \\\n     (deltas)[6] =  (step), (deltas)[7] =  (step) + (nch))\n\n\n/** Contour approximation algorithms */\nenum\n{\n    CV_POLY_APPROX_DP = 0\n};\n\n/** @brief Shape matching methods\n\n\\f$A\\f$ denotes object1,\\f$B\\f$ denotes object2\n\n\\f$\\begin{array}{l} m^A_i =  \\mathrm{sign} (h^A_i)  \\cdot \\log{h^A_i} \\\\ m^B_i =  \\mathrm{sign} (h^B_i)  \\cdot \\log{h^B_i} \\end{array}\\f$\n\nand \\f$h^A_i, h^B_i\\f$ are the Hu moments of \\f$A\\f$ and \\f$B\\f$ , respectively.\n*/\nenum ShapeMatchModes\n{\n    CV_CONTOURS_MATCH_I1  =1, //!< \\f[I_1(A,B) =  \\sum _{i=1...7}  \\left |  \\frac{1}{m^A_i} -  \\frac{1}{m^B_i} \\right |\\f]\n    CV_CONTOURS_MATCH_I2  =2, //!< \\f[I_2(A,B) =  \\sum _{i=1...7}  \\left | m^A_i - m^B_i  \\right |\\f]\n    CV_CONTOURS_MATCH_I3  =3  //!< \\f[I_3(A,B) =  \\max _{i=1...7}  \\frac{ \\left| m^A_i - m^B_i \\right| }{ \\left| m^A_i \\right| }\\f]\n};\n\n/** Shape orientation */\nenum\n{\n    CV_CLOCKWISE         =1,\n    CV_COUNTER_CLOCKWISE =2\n};\n\n\n/** Convexity defect */\ntypedef struct CvConvexityDefect\n{\n    CvPoint* start; /**< point of the contour where the defect begins */\n    CvPoint* end; /**< point of the contour where the defect ends */\n    CvPoint* depth_point; /**< the farthest from the convex hull point within the defect */\n    float depth; /**< distance between the farthest point and the convex hull */\n} CvConvexityDefect;\n\n\n/** Histogram comparison methods */\nenum\n{\n    CV_COMP_CORREL        =0,\n    CV_COMP_CHISQR        =1,\n    CV_COMP_INTERSECT     =2,\n    CV_COMP_BHATTACHARYYA =3,\n    CV_COMP_HELLINGER     =CV_COMP_BHATTACHARYYA,\n    CV_COMP_CHISQR_ALT    =4,\n    CV_COMP_KL_DIV        =5\n};\n\n/** Mask size for distance transform */\nenum\n{\n    CV_DIST_MASK_3   =3,\n    CV_DIST_MASK_5   =5,\n    CV_DIST_MASK_PRECISE =0\n};\n\n/** Content of output label array: connected components or pixels */\nenum\n{\n  CV_DIST_LABEL_CCOMP = 0,\n  CV_DIST_LABEL_PIXEL = 1\n};\n\n/** Distance types for Distance Transform and M-estimators */\nenum\n{\n    CV_DIST_USER    =-1,  /**< User defined distance */\n    CV_DIST_L1      =1,   /**< distance = |x1-x2| + |y1-y2| */\n    CV_DIST_L2      =2,   /**< the simple euclidean distance */\n    CV_DIST_C       =3,   /**< distance = max(|x1-x2|,|y1-y2|) */\n    CV_DIST_L12     =4,   /**< L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1)) */\n    CV_DIST_FAIR    =5,   /**< distance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998 */\n    CV_DIST_WELSCH  =6,   /**< distance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846 */\n    CV_DIST_HUBER   =7    /**< distance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345 */\n};\n\n\n/** Threshold types */\nenum\n{\n    CV_THRESH_BINARY      =0,  /**< value = value > threshold ? max_value : 0       */\n    CV_THRESH_BINARY_INV  =1,  /**< value = value > threshold ? 0 : max_value       */\n    CV_THRESH_TRUNC       =2,  /**< value = value > threshold ? threshold : value   */\n    CV_THRESH_TOZERO      =3,  /**< value = value > threshold ? value : 0           */\n    CV_THRESH_TOZERO_INV  =4,  /**< value = value > threshold ? 0 : value           */\n    CV_THRESH_MASK        =7,\n    CV_THRESH_OTSU        =8, /**< use Otsu algorithm to choose the optimal threshold value;\n                                 combine the flag with one of the above CV_THRESH_* values */\n    CV_THRESH_TRIANGLE    =16  /**< use Triangle algorithm to choose the optimal threshold value;\n                                 combine the flag with one of the above CV_THRESH_* values, but not\n                                 with CV_THRESH_OTSU */\n};\n\n/** Adaptive threshold methods */\nenum\n{\n    CV_ADAPTIVE_THRESH_MEAN_C  =0,\n    CV_ADAPTIVE_THRESH_GAUSSIAN_C  =1\n};\n\n/** FloodFill flags */\nenum\n{\n    CV_FLOODFILL_FIXED_RANGE =(1 << 16),\n    CV_FLOODFILL_MASK_ONLY   =(1 << 17)\n};\n\n\n/** Canny edge detector flags */\nenum\n{\n    CV_CANNY_L2_GRADIENT  =(1 << 31)\n};\n\n/** Variants of a Hough transform */\nenum\n{\n    CV_HOUGH_STANDARD =0,\n    CV_HOUGH_PROBABILISTIC =1,\n    CV_HOUGH_MULTI_SCALE =2,\n    CV_HOUGH_GRADIENT =3\n};\n\n\n/* Fast search data structures  */\nstruct CvFeatureTree;\nstruct CvLSH;\nstruct CvLSHOperations;\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/imgproc.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_IMGPROC_HPP__\n#define __OPENCV_IMGPROC_HPP__\n\n#include \"opencv2/core.hpp\"\n\n/**\n  @defgroup imgproc Image processing\n  @{\n    @defgroup imgproc_filter Image Filtering\n\nFunctions and classes described in this section are used to perform various linear or non-linear\nfiltering operations on 2D images (represented as Mat's). It means that for each pixel location\n\\f$(x,y)\\f$ in the source image (normally, rectangular), its neighborhood is considered and used to\ncompute the response. In case of a linear filter, it is a weighted sum of pixel values. In case of\nmorphological operations, it is the minimum or maximum values, and so on. The computed response is\nstored in the destination image at the same location \\f$(x,y)\\f$. It means that the output image\nwill be of the same size as the input image. Normally, the functions support multi-channel arrays,\nin which case every channel is processed independently. Therefore, the output image will also have\nthe same number of channels as the input one.\n\nAnother common feature of the functions and classes described in this section is that, unlike\nsimple arithmetic functions, they need to extrapolate values of some non-existing pixels. For\nexample, if you want to smooth an image using a Gaussian \\f$3 \\times 3\\f$ filter, then, when\nprocessing the left-most pixels in each row, you need pixels to the left of them, that is, outside\nof the image. You can let these pixels be the same as the left-most image pixels (\"replicated\nborder\" extrapolation method), or assume that all the non-existing pixels are zeros (\"constant\nborder\" extrapolation method), and so on. OpenCV enables you to specify the extrapolation method.\nFor details, see cv::BorderTypes\n\n@anchor filter_depths\n### Depth combinations\nInput depth (src.depth()) | Output depth (ddepth)\n--------------------------|----------------------\nCV_8U                     | -1/CV_16S/CV_32F/CV_64F\nCV_16U/CV_16S             | -1/CV_32F/CV_64F\nCV_32F                    | -1/CV_32F/CV_64F\nCV_64F                    | -1/CV_64F\n\n@note when ddepth=-1, the output image will have the same depth as the source.\n\n    @defgroup imgproc_transform Geometric Image Transformations\n\nThe functions in this section perform various geometrical transformations of 2D images. They do not\nchange the image content but deform the pixel grid and map this deformed grid to the destination\nimage. In fact, to avoid sampling artifacts, the mapping is done in the reverse order, from\ndestination to the source. That is, for each pixel \\f$(x, y)\\f$ of the destination image, the\nfunctions compute coordinates of the corresponding \"donor\" pixel in the source image and copy the\npixel value:\n\n\\f[\\texttt{dst} (x,y)= \\texttt{src} (f_x(x,y), f_y(x,y))\\f]\n\nIn case when you specify the forward mapping \\f$\\left<g_x, g_y\\right>: \\texttt{src} \\rightarrow\n\\texttt{dst}\\f$, the OpenCV functions first compute the corresponding inverse mapping\n\\f$\\left<f_x, f_y\\right>: \\texttt{dst} \\rightarrow \\texttt{src}\\f$ and then use the above formula.\n\nThe actual implementations of the geometrical transformations, from the most generic remap and to\nthe simplest and the fastest resize, need to solve two main problems with the above formula:\n\n- Extrapolation of non-existing pixels. Similarly to the filtering functions described in the\nprevious section, for some \\f$(x,y)\\f$, either one of \\f$f_x(x,y)\\f$, or \\f$f_y(x,y)\\f$, or both\nof them may fall outside of the image. In this case, an extrapolation method needs to be used.\nOpenCV provides the same selection of extrapolation methods as in the filtering functions. In\naddition, it provides the method BORDER_TRANSPARENT. This means that the corresponding pixels in\nthe destination image will not be modified at all.\n\n- Interpolation of pixel values. Usually \\f$f_x(x,y)\\f$ and \\f$f_y(x,y)\\f$ are floating-point\nnumbers. This means that \\f$\\left<f_x, f_y\\right>\\f$ can be either an affine or perspective\ntransformation, or radial lens distortion correction, and so on. So, a pixel value at fractional\ncoordinates needs to be retrieved. In the simplest case, the coordinates can be just rounded to the\nnearest integer coordinates and the corresponding pixel can be used. This is called a\nnearest-neighbor interpolation. However, a better result can be achieved by using more\nsophisticated [interpolation methods](http://en.wikipedia.org/wiki/Multivariate_interpolation) ,\nwhere a polynomial function is fit into some neighborhood of the computed pixel \\f$(f_x(x,y),\nf_y(x,y))\\f$, and then the value of the polynomial at \\f$(f_x(x,y), f_y(x,y))\\f$ is taken as the\ninterpolated pixel value. In OpenCV, you can choose between several interpolation methods. See\nresize for details.\n\n    @defgroup imgproc_misc Miscellaneous Image Transformations\n    @defgroup imgproc_draw Drawing Functions\n\nDrawing functions work with matrices/images of arbitrary depth. The boundaries of the shapes can be\nrendered with antialiasing (implemented only for 8-bit images for now). All the functions include\nthe parameter color that uses an RGB value (that may be constructed with the Scalar constructor )\nfor color images and brightness for grayscale images. For color images, the channel ordering is\nnormally *Blue, Green, Red*. This is what imshow, imread, and imwrite expect. So, if you form a\ncolor using the Scalar constructor, it should look like:\n\n\\f[\\texttt{Scalar} (blue \\_ component, green \\_ component, red \\_ component[, alpha \\_ component])\\f]\n\nIf you are using your own image rendering and I/O functions, you can use any channel ordering. The\ndrawing functions process each channel independently and do not depend on the channel order or even\non the used color space. The whole image can be converted from BGR to RGB or to a different color\nspace using cvtColor .\n\nIf a drawn figure is partially or completely outside the image, the drawing functions clip it. Also,\nmany drawing functions can handle pixel coordinates specified with sub-pixel accuracy. This means\nthat the coordinates can be passed as fixed-point numbers encoded as integers. The number of\nfractional bits is specified by the shift parameter and the real point coordinates are calculated as\n\\f$\\texttt{Point}(x,y)\\rightarrow\\texttt{Point2f}(x*2^{-shift},y*2^{-shift})\\f$ . This feature is\nespecially effective when rendering antialiased shapes.\n\n@note The functions do not support alpha-transparency when the target image is 4-channel. In this\ncase, the color[3] is simply copied to the repainted pixels. Thus, if you want to paint\nsemi-transparent shapes, you can paint them in a separate buffer and then blend it with the main\nimage.\n\n    @defgroup imgproc_colormap ColorMaps in OpenCV\n\nThe human perception isn't built for observing fine changes in grayscale images. Human eyes are more\nsensitive to observing changes between colors, so you often need to recolor your grayscale images to\nget a clue about them. OpenCV now comes with various colormaps to enhance the visualization in your\ncomputer vision application.\n\nIn OpenCV you only need applyColorMap to apply a colormap on a given image. The following sample\ncode reads the path to an image from command line, applies a Jet colormap on it and shows the\nresult:\n\n@code\n#include <opencv2/core.hpp>\n#include <opencv2/imgproc.hpp>\n#include <opencv2/imgcodecs.hpp>\n#include <opencv2/highgui.hpp>\nusing namespace cv;\n\n#include <iostream>\nusing namespace std;\n\nint main(int argc, const char *argv[])\n{\n    // We need an input image. (can be grayscale or color)\n    if (argc < 2)\n    {\n        cerr << \"We need an image to process here. Please run: colorMap [path_to_image]\" << endl;\n        return -1;\n    }\n    Mat img_in = imread(argv[1]);\n    if(img_in.empty())\n    {\n        cerr << \"Sample image (\" << argv[1] << \") is empty. Please adjust your path, so it points to a valid input image!\" << endl;\n        return -1;\n    }\n    // Holds the colormap version of the image:\n    Mat img_color;\n    // Apply the colormap:\n    applyColorMap(img_in, img_color, COLORMAP_JET);\n    // Show the result:\n    imshow(\"colorMap\", img_color);\n    waitKey(0);\n    return 0;\n}\n@endcode\n\n@see cv::ColormapTypes\n\n    @defgroup imgproc_hist Histograms\n    @defgroup imgproc_shape Structural Analysis and Shape Descriptors\n    @defgroup imgproc_motion Motion Analysis and Object Tracking\n    @defgroup imgproc_feature Feature Detection\n    @defgroup imgproc_object Object Detection\n    @defgroup imgproc_c C API\n  @}\n*/\n\nnamespace cv\n{\n\n/** @addtogroup imgproc\n@{\n*/\n\n//! @addtogroup imgproc_filter\n//! @{\n\n//! type of morphological operation\nenum MorphTypes{\n    MORPH_ERODE    = 0, //!< see cv::erode\n    MORPH_DILATE   = 1, //!< see cv::dilate\n    MORPH_OPEN     = 2, //!< an opening operation\n                        //!< \\f[\\texttt{dst} = \\mathrm{open} ( \\texttt{src} , \\texttt{element} )= \\mathrm{dilate} ( \\mathrm{erode} ( \\texttt{src} , \\texttt{element} ))\\f]\n    MORPH_CLOSE    = 3, //!< a closing operation\n                        //!< \\f[\\texttt{dst} = \\mathrm{close} ( \\texttt{src} , \\texttt{element} )= \\mathrm{erode} ( \\mathrm{dilate} ( \\texttt{src} , \\texttt{element} ))\\f]\n    MORPH_GRADIENT = 4, //!< a morphological gradient\n                        //!< \\f[\\texttt{dst} = \\mathrm{morph\\_grad} ( \\texttt{src} , \\texttt{element} )= \\mathrm{dilate} ( \\texttt{src} , \\texttt{element} )- \\mathrm{erode} ( \\texttt{src} , \\texttt{element} )\\f]\n    MORPH_TOPHAT   = 5, //!< \"top hat\"\n                        //!< \\f[\\texttt{dst} = \\mathrm{tophat} ( \\texttt{src} , \\texttt{element} )= \\texttt{src} - \\mathrm{open} ( \\texttt{src} , \\texttt{element} )\\f]\n    MORPH_BLACKHAT = 6  //!< \"black hat\"\n                        //!< \\f[\\texttt{dst} = \\mathrm{blackhat} ( \\texttt{src} , \\texttt{element} )= \\mathrm{close} ( \\texttt{src} , \\texttt{element} )- \\texttt{src}\\f]\n};\n\n//! shape of the structuring element\nenum MorphShapes {\n    MORPH_RECT    = 0, //!< a rectangular structuring element:  \\f[E_{ij}=1\\f]\n    MORPH_CROSS   = 1, //!< a cross-shaped structuring element:\n                       //!< \\f[E_{ij} =  \\fork{1}{if i=\\texttt{anchor.y} or j=\\texttt{anchor.x}}{0}{otherwise}\\f]\n    MORPH_ELLIPSE = 2 //!< an elliptic structuring element, that is, a filled ellipse inscribed\n                      //!< into the rectangle Rect(0, 0, esize.width, 0.esize.height)\n};\n\n//! @} imgproc_filter\n\n//! @addtogroup imgproc_transform\n//! @{\n\n//! interpolation algorithm\nenum InterpolationFlags{\n    /** nearest neighbor interpolation */\n    INTER_NEAREST        = 0,\n    /** bilinear interpolation */\n    INTER_LINEAR         = 1,\n    /** bicubic interpolation */\n    INTER_CUBIC          = 2,\n    /** resampling using pixel area relation. It may be a preferred method for image decimation, as\n    it gives moire'-free results. But when the image is zoomed, it is similar to the INTER_NEAREST\n    method. */\n    INTER_AREA           = 3,\n    /** Lanczos interpolation over 8x8 neighborhood */\n    INTER_LANCZOS4       = 4,\n    /** mask for interpolation codes */\n    INTER_MAX            = 7,\n    /** flag, fills all of the destination image pixels. If some of them correspond to outliers in the\n    source image, they are set to zero */\n    WARP_FILL_OUTLIERS   = 8,\n    /** flag, inverse transformation\n\n    For example, polar transforms:\n    - flag is __not__ set: \\f$dst( \\phi , \\rho ) = src(x,y)\\f$\n    - flag is set: \\f$dst(x,y) = src( \\phi , \\rho )\\f$\n    */\n    WARP_INVERSE_MAP     = 16\n};\n\nenum InterpolationMasks {\n       INTER_BITS      = 5,\n       INTER_BITS2     = INTER_BITS * 2,\n       INTER_TAB_SIZE  = 1 << INTER_BITS,\n       INTER_TAB_SIZE2 = INTER_TAB_SIZE * INTER_TAB_SIZE\n     };\n\n//! @} imgproc_transform\n\n//! @addtogroup imgproc_misc\n//! @{\n\n//! Distance types for Distance Transform and M-estimators\n//! @see cv::distanceTransform, cv::fitLine\nenum DistanceTypes {\n    DIST_USER    = -1,  //!< User defined distance\n    DIST_L1      = 1,   //!< distance = |x1-x2| + |y1-y2|\n    DIST_L2      = 2,   //!< the simple euclidean distance\n    DIST_C       = 3,   //!< distance = max(|x1-x2|,|y1-y2|)\n    DIST_L12     = 4,   //!< L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1))\n    DIST_FAIR    = 5,   //!< distance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998\n    DIST_WELSCH  = 6,   //!< distance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846\n    DIST_HUBER   = 7    //!< distance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345\n};\n\n//! Mask size for distance transform\nenum DistanceTransformMasks {\n    DIST_MASK_3       = 3, //!< mask=3\n    DIST_MASK_5       = 5, //!< mask=5\n    DIST_MASK_PRECISE = 0  //!<\n};\n\n//! type of the threshold operation\n//! ![threshold types](pics/threshold.png)\nenum ThresholdTypes {\n    THRESH_BINARY     = 0, //!< \\f[\\texttt{dst} (x,y) =  \\fork{\\texttt{maxval}}{if \\(\\texttt{src}(x,y) > \\texttt{thresh}\\)}{0}{otherwise}\\f]\n    THRESH_BINARY_INV = 1, //!< \\f[\\texttt{dst} (x,y) =  \\fork{0}{if \\(\\texttt{src}(x,y) > \\texttt{thresh}\\)}{\\texttt{maxval}}{otherwise}\\f]\n    THRESH_TRUNC      = 2, //!< \\f[\\texttt{dst} (x,y) =  \\fork{\\texttt{threshold}}{if \\(\\texttt{src}(x,y) > \\texttt{thresh}\\)}{\\texttt{src}(x,y)}{otherwise}\\f]\n    THRESH_TOZERO     = 3, //!< \\f[\\texttt{dst} (x,y) =  \\fork{\\texttt{src}(x,y)}{if \\(\\texttt{src}(x,y) > \\texttt{thresh}\\)}{0}{otherwise}\\f]\n    THRESH_TOZERO_INV = 4, //!< \\f[\\texttt{dst} (x,y) =  \\fork{0}{if \\(\\texttt{src}(x,y) > \\texttt{thresh}\\)}{\\texttt{src}(x,y)}{otherwise}\\f]\n    THRESH_MASK       = 7,\n    THRESH_OTSU       = 8, //!< flag, use Otsu algorithm to choose the optimal threshold value\n    THRESH_TRIANGLE   = 16 //!< flag, use Triangle algorithm to choose the optimal threshold value\n};\n\n//! adaptive threshold algorithm\n//! see cv::adaptiveThreshold\nenum AdaptiveThresholdTypes {\n    /** the threshold value \\f$T(x,y)\\f$ is a mean of the \\f$\\texttt{blockSize} \\times\n    \\texttt{blockSize}\\f$ neighborhood of \\f$(x, y)\\f$ minus C */\n    ADAPTIVE_THRESH_MEAN_C     = 0,\n    /** the threshold value \\f$T(x, y)\\f$ is a weighted sum (cross-correlation with a Gaussian\n    window) of the \\f$\\texttt{blockSize} \\times \\texttt{blockSize}\\f$ neighborhood of \\f$(x, y)\\f$\n    minus C . The default sigma (standard deviation) is used for the specified blockSize . See\n    cv::getGaussianKernel*/\n    ADAPTIVE_THRESH_GAUSSIAN_C = 1\n};\n\n//! cv::undistort mode\nenum UndistortTypes {\n       PROJ_SPHERICAL_ORTHO  = 0,\n       PROJ_SPHERICAL_EQRECT = 1\n     };\n\n//! class of the pixel in GrabCut algorithm\nenum GrabCutClasses {\n    GC_BGD    = 0,  //!< an obvious background pixels\n    GC_FGD    = 1,  //!< an obvious foreground (object) pixel\n    GC_PR_BGD = 2,  //!< a possible background pixel\n    GC_PR_FGD = 3   //!< a possible foreground pixel\n};\n\n//! GrabCut algorithm flags\nenum GrabCutModes {\n    /** The function initializes the state and the mask using the provided rectangle. After that it\n    runs iterCount iterations of the algorithm. */\n    GC_INIT_WITH_RECT  = 0,\n    /** The function initializes the state using the provided mask. Note that GC_INIT_WITH_RECT\n    and GC_INIT_WITH_MASK can be combined. Then, all the pixels outside of the ROI are\n    automatically initialized with GC_BGD .*/\n    GC_INIT_WITH_MASK  = 1,\n    /** The value means that the algorithm should just resume. */\n    GC_EVAL            = 2\n};\n\n//! distanceTransform algorithm flags\nenum DistanceTransformLabelTypes {\n    /** each connected component of zeros in src (as well as all the non-zero pixels closest to the\n    connected component) will be assigned the same label */\n    DIST_LABEL_CCOMP = 0,\n    /** each zero pixel (and all the non-zero pixels closest to it) gets its own label. */\n    DIST_LABEL_PIXEL = 1\n};\n\n//! floodfill algorithm flags\nenum FloodFillFlags {\n    /** If set, the difference between the current pixel and seed pixel is considered. Otherwise,\n    the difference between neighbor pixels is considered (that is, the range is floating). */\n    FLOODFILL_FIXED_RANGE = 1 << 16,\n    /** If set, the function does not change the image ( newVal is ignored), and only fills the\n    mask with the value specified in bits 8-16 of flags as described above. This option only make\n    sense in function variants that have the mask parameter. */\n    FLOODFILL_MASK_ONLY   = 1 << 17\n};\n\n//! @} imgproc_misc\n\n//! @addtogroup imgproc_shape\n//! @{\n\n//! connected components algorithm output formats\nenum ConnectedComponentsTypes {\n    CC_STAT_LEFT   = 0, //!< The leftmost (x) coordinate which is the inclusive start of the bounding\n                        //!< box in the horizontal direction.\n    CC_STAT_TOP    = 1, //!< The topmost (y) coordinate which is the inclusive start of the bounding\n                        //!< box in the vertical direction.\n    CC_STAT_WIDTH  = 2, //!< The horizontal size of the bounding box\n    CC_STAT_HEIGHT = 3, //!< The vertical size of the bounding box\n    CC_STAT_AREA   = 4, //!< The total area (in pixels) of the connected component\n    CC_STAT_MAX    = 5\n};\n\n//! mode of the contour retrieval algorithm\nenum RetrievalModes {\n    /** retrieves only the extreme outer contours. It sets `hierarchy[i][2]=hierarchy[i][3]=-1` for\n    all the contours. */\n    RETR_EXTERNAL  = 0,\n    /** retrieves all of the contours without establishing any hierarchical relationships. */\n    RETR_LIST      = 1,\n    /** retrieves all of the contours and organizes them into a two-level hierarchy. At the top\n    level, there are external boundaries of the components. At the second level, there are\n    boundaries of the holes. If there is another contour inside a hole of a connected component, it\n    is still put at the top level. */\n    RETR_CCOMP     = 2,\n    /** retrieves all of the contours and reconstructs a full hierarchy of nested contours.*/\n    RETR_TREE      = 3,\n    RETR_FLOODFILL = 4 //!<\n};\n\n//! the contour approximation algorithm\nenum ContourApproximationModes {\n    /** stores absolutely all the contour points. That is, any 2 subsequent points (x1,y1) and\n    (x2,y2) of the contour will be either horizontal, vertical or diagonal neighbors, that is,\n    max(abs(x1-x2),abs(y2-y1))==1. */\n    CHAIN_APPROX_NONE      = 1,\n    /** compresses horizontal, vertical, and diagonal segments and leaves only their end points.\n    For example, an up-right rectangular contour is encoded with 4 points. */\n    CHAIN_APPROX_SIMPLE    = 2,\n    /** applies one of the flavors of the Teh-Chin chain approximation algorithm @cite TehChin89 */\n    CHAIN_APPROX_TC89_L1   = 3,\n    /** applies one of the flavors of the Teh-Chin chain approximation algorithm @cite TehChin89 */\n    CHAIN_APPROX_TC89_KCOS = 4\n};\n\n//! @} imgproc_shape\n\n//! Variants of a Hough transform\nenum HoughModes {\n\n    /** classical or standard Hough transform. Every line is represented by two floating-point\n    numbers \\f$(\\rho, \\theta)\\f$ , where \\f$\\rho\\f$ is a distance between (0,0) point and the line,\n    and \\f$\\theta\\f$ is the angle between x-axis and the normal to the line. Thus, the matrix must\n    be (the created sequence will be) of CV_32FC2 type */\n    HOUGH_STANDARD      = 0,\n    /** probabilistic Hough transform (more efficient in case if the picture contains a few long\n    linear segments). It returns line segments rather than the whole line. Each segment is\n    represented by starting and ending points, and the matrix must be (the created sequence will\n    be) of the CV_32SC4 type. */\n    HOUGH_PROBABILISTIC = 1,\n    /** multi-scale variant of the classical Hough transform. The lines are encoded the same way as\n    HOUGH_STANDARD. */\n    HOUGH_MULTI_SCALE   = 2,\n    HOUGH_GRADIENT      = 3 //!< basically *21HT*, described in @cite Yuen90\n};\n\n//! Variants of Line Segment %Detector\n//! @ingroup imgproc_feature\nenum LineSegmentDetectorModes {\n    LSD_REFINE_NONE = 0, //!< No refinement applied\n    LSD_REFINE_STD  = 1, //!< Standard refinement is applied. E.g. breaking arches into smaller straighter line approximations.\n    LSD_REFINE_ADV  = 2  //!< Advanced refinement. Number of false alarms is calculated, lines are\n                         //!< refined through increase of precision, decrement in size, etc.\n};\n\n/** Histogram comparison methods\n  @ingroup imgproc_hist\n*/\nenum HistCompMethods {\n    /** Correlation\n    \\f[d(H_1,H_2) =  \\frac{\\sum_I (H_1(I) - \\bar{H_1}) (H_2(I) - \\bar{H_2})}{\\sqrt{\\sum_I(H_1(I) - \\bar{H_1})^2 \\sum_I(H_2(I) - \\bar{H_2})^2}}\\f]\n    where\n    \\f[\\bar{H_k} =  \\frac{1}{N} \\sum _J H_k(J)\\f]\n    and \\f$N\\f$ is a total number of histogram bins. */\n    HISTCMP_CORREL        = 0,\n    /** Chi-Square\n    \\f[d(H_1,H_2) =  \\sum _I  \\frac{\\left(H_1(I)-H_2(I)\\right)^2}{H_1(I)}\\f] */\n    HISTCMP_CHISQR        = 1,\n    /** Intersection\n    \\f[d(H_1,H_2) =  \\sum _I  \\min (H_1(I), H_2(I))\\f] */\n    HISTCMP_INTERSECT     = 2,\n    /** Bhattacharyya distance\n    (In fact, OpenCV computes Hellinger distance, which is related to Bhattacharyya coefficient.)\n    \\f[d(H_1,H_2) =  \\sqrt{1 - \\frac{1}{\\sqrt{\\bar{H_1} \\bar{H_2} N^2}} \\sum_I \\sqrt{H_1(I) \\cdot H_2(I)}}\\f] */\n    HISTCMP_BHATTACHARYYA = 3,\n    HISTCMP_HELLINGER     = HISTCMP_BHATTACHARYYA, //!< Synonym for HISTCMP_BHATTACHARYYA\n    /** Alternative Chi-Square\n    \\f[d(H_1,H_2) =  2 * \\sum _I  \\frac{\\left(H_1(I)-H_2(I)\\right)^2}{H_1(I)+H_2(I)}\\f]\n    This alternative formula is regularly used for texture comparison. See e.g. @cite Puzicha1997 */\n    HISTCMP_CHISQR_ALT    = 4,\n    /** Kullback-Leibler divergence\n    \\f[d(H_1,H_2) = \\sum _I H_1(I) \\log \\left(\\frac{H_1(I)}{H_2(I)}\\right)\\f] */\n    HISTCMP_KL_DIV        = 5\n};\n\n/** the color conversion code\n@see @ref imgproc_color_conversions\n@ingroup imgproc_misc\n */\nenum ColorConversionCodes {\n    COLOR_BGR2BGRA     = 0, //!< add alpha channel to RGB or BGR image\n    COLOR_RGB2RGBA     = COLOR_BGR2BGRA,\n\n    COLOR_BGRA2BGR     = 1, //!< remove alpha channel from RGB or BGR image\n    COLOR_RGBA2RGB     = COLOR_BGRA2BGR,\n\n    COLOR_BGR2RGBA     = 2, //!< convert between RGB and BGR color spaces (with or without alpha channel)\n    COLOR_RGB2BGRA     = COLOR_BGR2RGBA,\n\n    COLOR_RGBA2BGR     = 3,\n    COLOR_BGRA2RGB     = COLOR_RGBA2BGR,\n\n    COLOR_BGR2RGB      = 4,\n    COLOR_RGB2BGR      = COLOR_BGR2RGB,\n\n    COLOR_BGRA2RGBA    = 5,\n    COLOR_RGBA2BGRA    = COLOR_BGRA2RGBA,\n\n    COLOR_BGR2GRAY     = 6, //!< convert between RGB/BGR and grayscale, @ref color_convert_rgb_gray \"color conversions\"\n    COLOR_RGB2GRAY     = 7,\n    COLOR_GRAY2BGR     = 8,\n    COLOR_GRAY2RGB     = COLOR_GRAY2BGR,\n    COLOR_GRAY2BGRA    = 9,\n    COLOR_GRAY2RGBA    = COLOR_GRAY2BGRA,\n    COLOR_BGRA2GRAY    = 10,\n    COLOR_RGBA2GRAY    = 11,\n\n    COLOR_BGR2BGR565   = 12, //!< convert between RGB/BGR and BGR565 (16-bit images)\n    COLOR_RGB2BGR565   = 13,\n    COLOR_BGR5652BGR   = 14,\n    COLOR_BGR5652RGB   = 15,\n    COLOR_BGRA2BGR565  = 16,\n    COLOR_RGBA2BGR565  = 17,\n    COLOR_BGR5652BGRA  = 18,\n    COLOR_BGR5652RGBA  = 19,\n\n    COLOR_GRAY2BGR565  = 20, //!< convert between grayscale to BGR565 (16-bit images)\n    COLOR_BGR5652GRAY  = 21,\n\n    COLOR_BGR2BGR555   = 22,  //!< convert between RGB/BGR and BGR555 (16-bit images)\n    COLOR_RGB2BGR555   = 23,\n    COLOR_BGR5552BGR   = 24,\n    COLOR_BGR5552RGB   = 25,\n    COLOR_BGRA2BGR555  = 26,\n    COLOR_RGBA2BGR555  = 27,\n    COLOR_BGR5552BGRA  = 28,\n    COLOR_BGR5552RGBA  = 29,\n\n    COLOR_GRAY2BGR555  = 30, //!< convert between grayscale and BGR555 (16-bit images)\n    COLOR_BGR5552GRAY  = 31,\n\n    COLOR_BGR2XYZ      = 32, //!< convert RGB/BGR to CIE XYZ, @ref color_convert_rgb_xyz \"color conversions\"\n    COLOR_RGB2XYZ      = 33,\n    COLOR_XYZ2BGR      = 34,\n    COLOR_XYZ2RGB      = 35,\n\n    COLOR_BGR2YCrCb    = 36, //!< convert RGB/BGR to luma-chroma (aka YCC), @ref color_convert_rgb_ycrcb \"color conversions\"\n    COLOR_RGB2YCrCb    = 37,\n    COLOR_YCrCb2BGR    = 38,\n    COLOR_YCrCb2RGB    = 39,\n\n    COLOR_BGR2HSV      = 40, //!< convert RGB/BGR to HSV (hue saturation value), @ref color_convert_rgb_hsv \"color conversions\"\n    COLOR_RGB2HSV      = 41,\n\n    COLOR_BGR2Lab      = 44, //!< convert RGB/BGR to CIE Lab, @ref color_convert_rgb_lab \"color conversions\"\n    COLOR_RGB2Lab      = 45,\n\n    COLOR_BGR2Luv      = 50, //!< convert RGB/BGR to CIE Luv, @ref color_convert_rgb_luv \"color conversions\"\n    COLOR_RGB2Luv      = 51,\n    COLOR_BGR2HLS      = 52, //!< convert RGB/BGR to HLS (hue lightness saturation), @ref color_convert_rgb_hls \"color conversions\"\n    COLOR_RGB2HLS      = 53,\n\n    COLOR_HSV2BGR      = 54, //!< backward conversions to RGB/BGR\n    COLOR_HSV2RGB      = 55,\n\n    COLOR_Lab2BGR      = 56,\n    COLOR_Lab2RGB      = 57,\n    COLOR_Luv2BGR      = 58,\n    COLOR_Luv2RGB      = 59,\n    COLOR_HLS2BGR      = 60,\n    COLOR_HLS2RGB      = 61,\n\n    COLOR_BGR2HSV_FULL = 66, //!<\n    COLOR_RGB2HSV_FULL = 67,\n    COLOR_BGR2HLS_FULL = 68,\n    COLOR_RGB2HLS_FULL = 69,\n\n    COLOR_HSV2BGR_FULL = 70,\n    COLOR_HSV2RGB_FULL = 71,\n    COLOR_HLS2BGR_FULL = 72,\n    COLOR_HLS2RGB_FULL = 73,\n\n    COLOR_LBGR2Lab     = 74,\n    COLOR_LRGB2Lab     = 75,\n    COLOR_LBGR2Luv     = 76,\n    COLOR_LRGB2Luv     = 77,\n\n    COLOR_Lab2LBGR     = 78,\n    COLOR_Lab2LRGB     = 79,\n    COLOR_Luv2LBGR     = 80,\n    COLOR_Luv2LRGB     = 81,\n\n    COLOR_BGR2YUV      = 82, //!< convert between RGB/BGR and YUV\n    COLOR_RGB2YUV      = 83,\n    COLOR_YUV2BGR      = 84,\n    COLOR_YUV2RGB      = 85,\n\n    //! YUV 4:2:0 family to RGB\n    COLOR_YUV2RGB_NV12  = 90,\n    COLOR_YUV2BGR_NV12  = 91,\n    COLOR_YUV2RGB_NV21  = 92,\n    COLOR_YUV2BGR_NV21  = 93,\n    COLOR_YUV420sp2RGB  = COLOR_YUV2RGB_NV21,\n    COLOR_YUV420sp2BGR  = COLOR_YUV2BGR_NV21,\n\n    COLOR_YUV2RGBA_NV12 = 94,\n    COLOR_YUV2BGRA_NV12 = 95,\n    COLOR_YUV2RGBA_NV21 = 96,\n    COLOR_YUV2BGRA_NV21 = 97,\n    COLOR_YUV420sp2RGBA = COLOR_YUV2RGBA_NV21,\n    COLOR_YUV420sp2BGRA = COLOR_YUV2BGRA_NV21,\n\n    COLOR_YUV2RGB_YV12  = 98,\n    COLOR_YUV2BGR_YV12  = 99,\n    COLOR_YUV2RGB_IYUV  = 100,\n    COLOR_YUV2BGR_IYUV  = 101,\n    COLOR_YUV2RGB_I420  = COLOR_YUV2RGB_IYUV,\n    COLOR_YUV2BGR_I420  = COLOR_YUV2BGR_IYUV,\n    COLOR_YUV420p2RGB   = COLOR_YUV2RGB_YV12,\n    COLOR_YUV420p2BGR   = COLOR_YUV2BGR_YV12,\n\n    COLOR_YUV2RGBA_YV12 = 102,\n    COLOR_YUV2BGRA_YV12 = 103,\n    COLOR_YUV2RGBA_IYUV = 104,\n    COLOR_YUV2BGRA_IYUV = 105,\n    COLOR_YUV2RGBA_I420 = COLOR_YUV2RGBA_IYUV,\n    COLOR_YUV2BGRA_I420 = COLOR_YUV2BGRA_IYUV,\n    COLOR_YUV420p2RGBA  = COLOR_YUV2RGBA_YV12,\n    COLOR_YUV420p2BGRA  = COLOR_YUV2BGRA_YV12,\n\n    COLOR_YUV2GRAY_420  = 106,\n    COLOR_YUV2GRAY_NV21 = COLOR_YUV2GRAY_420,\n    COLOR_YUV2GRAY_NV12 = COLOR_YUV2GRAY_420,\n    COLOR_YUV2GRAY_YV12 = COLOR_YUV2GRAY_420,\n    COLOR_YUV2GRAY_IYUV = COLOR_YUV2GRAY_420,\n    COLOR_YUV2GRAY_I420 = COLOR_YUV2GRAY_420,\n    COLOR_YUV420sp2GRAY = COLOR_YUV2GRAY_420,\n    COLOR_YUV420p2GRAY  = COLOR_YUV2GRAY_420,\n\n    //! YUV 4:2:2 family to RGB\n    COLOR_YUV2RGB_UYVY = 107,\n    COLOR_YUV2BGR_UYVY = 108,\n    //COLOR_YUV2RGB_VYUY = 109,\n    //COLOR_YUV2BGR_VYUY = 110,\n    COLOR_YUV2RGB_Y422 = COLOR_YUV2RGB_UYVY,\n    COLOR_YUV2BGR_Y422 = COLOR_YUV2BGR_UYVY,\n    COLOR_YUV2RGB_UYNV = COLOR_YUV2RGB_UYVY,\n    COLOR_YUV2BGR_UYNV = COLOR_YUV2BGR_UYVY,\n\n    COLOR_YUV2RGBA_UYVY = 111,\n    COLOR_YUV2BGRA_UYVY = 112,\n    //COLOR_YUV2RGBA_VYUY = 113,\n    //COLOR_YUV2BGRA_VYUY = 114,\n    COLOR_YUV2RGBA_Y422 = COLOR_YUV2RGBA_UYVY,\n    COLOR_YUV2BGRA_Y422 = COLOR_YUV2BGRA_UYVY,\n    COLOR_YUV2RGBA_UYNV = COLOR_YUV2RGBA_UYVY,\n    COLOR_YUV2BGRA_UYNV = COLOR_YUV2BGRA_UYVY,\n\n    COLOR_YUV2RGB_YUY2 = 115,\n    COLOR_YUV2BGR_YUY2 = 116,\n    COLOR_YUV2RGB_YVYU = 117,\n    COLOR_YUV2BGR_YVYU = 118,\n    COLOR_YUV2RGB_YUYV = COLOR_YUV2RGB_YUY2,\n    COLOR_YUV2BGR_YUYV = COLOR_YUV2BGR_YUY2,\n    COLOR_YUV2RGB_YUNV = COLOR_YUV2RGB_YUY2,\n    COLOR_YUV2BGR_YUNV = COLOR_YUV2BGR_YUY2,\n\n    COLOR_YUV2RGBA_YUY2 = 119,\n    COLOR_YUV2BGRA_YUY2 = 120,\n    COLOR_YUV2RGBA_YVYU = 121,\n    COLOR_YUV2BGRA_YVYU = 122,\n    COLOR_YUV2RGBA_YUYV = COLOR_YUV2RGBA_YUY2,\n    COLOR_YUV2BGRA_YUYV = COLOR_YUV2BGRA_YUY2,\n    COLOR_YUV2RGBA_YUNV = COLOR_YUV2RGBA_YUY2,\n    COLOR_YUV2BGRA_YUNV = COLOR_YUV2BGRA_YUY2,\n\n    COLOR_YUV2GRAY_UYVY = 123,\n    COLOR_YUV2GRAY_YUY2 = 124,\n    //CV_YUV2GRAY_VYUY    = CV_YUV2GRAY_UYVY,\n    COLOR_YUV2GRAY_Y422 = COLOR_YUV2GRAY_UYVY,\n    COLOR_YUV2GRAY_UYNV = COLOR_YUV2GRAY_UYVY,\n    COLOR_YUV2GRAY_YVYU = COLOR_YUV2GRAY_YUY2,\n    COLOR_YUV2GRAY_YUYV = COLOR_YUV2GRAY_YUY2,\n    COLOR_YUV2GRAY_YUNV = COLOR_YUV2GRAY_YUY2,\n\n    //! alpha premultiplication\n    COLOR_RGBA2mRGBA    = 125,\n    COLOR_mRGBA2RGBA    = 126,\n\n    //! RGB to YUV 4:2:0 family\n    COLOR_RGB2YUV_I420  = 127,\n    COLOR_BGR2YUV_I420  = 128,\n    COLOR_RGB2YUV_IYUV  = COLOR_RGB2YUV_I420,\n    COLOR_BGR2YUV_IYUV  = COLOR_BGR2YUV_I420,\n\n    COLOR_RGBA2YUV_I420 = 129,\n    COLOR_BGRA2YUV_I420 = 130,\n    COLOR_RGBA2YUV_IYUV = COLOR_RGBA2YUV_I420,\n    COLOR_BGRA2YUV_IYUV = COLOR_BGRA2YUV_I420,\n    COLOR_RGB2YUV_YV12  = 131,\n    COLOR_BGR2YUV_YV12  = 132,\n    COLOR_RGBA2YUV_YV12 = 133,\n    COLOR_BGRA2YUV_YV12 = 134,\n\n    //! Demosaicing\n    COLOR_BayerBG2BGR = 46,\n    COLOR_BayerGB2BGR = 47,\n    COLOR_BayerRG2BGR = 48,\n    COLOR_BayerGR2BGR = 49,\n\n    COLOR_BayerBG2RGB = COLOR_BayerRG2BGR,\n    COLOR_BayerGB2RGB = COLOR_BayerGR2BGR,\n    COLOR_BayerRG2RGB = COLOR_BayerBG2BGR,\n    COLOR_BayerGR2RGB = COLOR_BayerGB2BGR,\n\n    COLOR_BayerBG2GRAY = 86,\n    COLOR_BayerGB2GRAY = 87,\n    COLOR_BayerRG2GRAY = 88,\n    COLOR_BayerGR2GRAY = 89,\n\n    //! Demosaicing using Variable Number of Gradients\n    COLOR_BayerBG2BGR_VNG = 62,\n    COLOR_BayerGB2BGR_VNG = 63,\n    COLOR_BayerRG2BGR_VNG = 64,\n    COLOR_BayerGR2BGR_VNG = 65,\n\n    COLOR_BayerBG2RGB_VNG = COLOR_BayerRG2BGR_VNG,\n    COLOR_BayerGB2RGB_VNG = COLOR_BayerGR2BGR_VNG,\n    COLOR_BayerRG2RGB_VNG = COLOR_BayerBG2BGR_VNG,\n    COLOR_BayerGR2RGB_VNG = COLOR_BayerGB2BGR_VNG,\n\n    //! Edge-Aware Demosaicing\n    COLOR_BayerBG2BGR_EA  = 135,\n    COLOR_BayerGB2BGR_EA  = 136,\n    COLOR_BayerRG2BGR_EA  = 137,\n    COLOR_BayerGR2BGR_EA  = 138,\n\n    COLOR_BayerBG2RGB_EA  = COLOR_BayerRG2BGR_EA,\n    COLOR_BayerGB2RGB_EA  = COLOR_BayerGR2BGR_EA,\n    COLOR_BayerRG2RGB_EA  = COLOR_BayerBG2BGR_EA,\n    COLOR_BayerGR2RGB_EA  = COLOR_BayerGB2BGR_EA,\n\n\n    COLOR_COLORCVT_MAX  = 139\n};\n\n/** types of intersection between rectangles\n@ingroup imgproc_shape\n*/\nenum RectanglesIntersectTypes {\n    INTERSECT_NONE = 0, //!< No intersection\n    INTERSECT_PARTIAL  = 1, //!< There is a partial intersection\n    INTERSECT_FULL  = 2 //!< One of the rectangle is fully enclosed in the other\n};\n\n//! finds arbitrary template in the grayscale image using Generalized Hough Transform\nclass CV_EXPORTS GeneralizedHough : public Algorithm\n{\npublic:\n    //! set template to search\n    virtual void setTemplate(InputArray templ, Point templCenter = Point(-1, -1)) = 0;\n    virtual void setTemplate(InputArray edges, InputArray dx, InputArray dy, Point templCenter = Point(-1, -1)) = 0;\n\n    //! find template on image\n    virtual void detect(InputArray image, OutputArray positions, OutputArray votes = noArray()) = 0;\n    virtual void detect(InputArray edges, InputArray dx, InputArray dy, OutputArray positions, OutputArray votes = noArray()) = 0;\n\n    //! Canny low threshold.\n    virtual void setCannyLowThresh(int cannyLowThresh) = 0;\n    virtual int getCannyLowThresh() const = 0;\n\n    //! Canny high threshold.\n    virtual void setCannyHighThresh(int cannyHighThresh) = 0;\n    virtual int getCannyHighThresh() const = 0;\n\n    //! Minimum distance between the centers of the detected objects.\n    virtual void setMinDist(double minDist) = 0;\n    virtual double getMinDist() const = 0;\n\n    //! Inverse ratio of the accumulator resolution to the image resolution.\n    virtual void setDp(double dp) = 0;\n    virtual double getDp() const = 0;\n\n    //! Maximal size of inner buffers.\n    virtual void setMaxBufferSize(int maxBufferSize) = 0;\n    virtual int getMaxBufferSize() const = 0;\n};\n\n//! Ballard, D.H. (1981). Generalizing the Hough transform to detect arbitrary shapes. Pattern Recognition 13 (2): 111-122.\n//! Detects position only without traslation and rotation\nclass CV_EXPORTS GeneralizedHoughBallard : public GeneralizedHough\n{\npublic:\n    //! R-Table levels.\n    virtual void setLevels(int levels) = 0;\n    virtual int getLevels() const = 0;\n\n    //! The accumulator threshold for the template centers at the detection stage. The smaller it is, the more false positions may be detected.\n    virtual void setVotesThreshold(int votesThreshold) = 0;\n    virtual int getVotesThreshold() const = 0;\n};\n\n//! Guil, N., González-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038.\n//! Detects position, traslation and rotation\nclass CV_EXPORTS GeneralizedHoughGuil : public GeneralizedHough\n{\npublic:\n    //! Angle difference in degrees between two points in feature.\n    virtual void setXi(double xi) = 0;\n    virtual double getXi() const = 0;\n\n    //! Feature table levels.\n    virtual void setLevels(int levels) = 0;\n    virtual int getLevels() const = 0;\n\n    //! Maximal difference between angles that treated as equal.\n    virtual void setAngleEpsilon(double angleEpsilon) = 0;\n    virtual double getAngleEpsilon() const = 0;\n\n    //! Minimal rotation angle to detect in degrees.\n    virtual void setMinAngle(double minAngle) = 0;\n    virtual double getMinAngle() const = 0;\n\n    //! Maximal rotation angle to detect in degrees.\n    virtual void setMaxAngle(double maxAngle) = 0;\n    virtual double getMaxAngle() const = 0;\n\n    //! Angle step in degrees.\n    virtual void setAngleStep(double angleStep) = 0;\n    virtual double getAngleStep() const = 0;\n\n    //! Angle votes threshold.\n    virtual void setAngleThresh(int angleThresh) = 0;\n    virtual int getAngleThresh() const = 0;\n\n    //! Minimal scale to detect.\n    virtual void setMinScale(double minScale) = 0;\n    virtual double getMinScale() const = 0;\n\n    //! Maximal scale to detect.\n    virtual void setMaxScale(double maxScale) = 0;\n    virtual double getMaxScale() const = 0;\n\n    //! Scale step.\n    virtual void setScaleStep(double scaleStep) = 0;\n    virtual double getScaleStep() const = 0;\n\n    //! Scale votes threshold.\n    virtual void setScaleThresh(int scaleThresh) = 0;\n    virtual int getScaleThresh() const = 0;\n\n    //! Position votes threshold.\n    virtual void setPosThresh(int posThresh) = 0;\n    virtual int getPosThresh() const = 0;\n};\n\n\nclass CV_EXPORTS_W CLAHE : public Algorithm\n{\npublic:\n    CV_WRAP virtual void apply(InputArray src, OutputArray dst) = 0;\n\n    CV_WRAP virtual void setClipLimit(double clipLimit) = 0;\n    CV_WRAP virtual double getClipLimit() const = 0;\n\n    CV_WRAP virtual void setTilesGridSize(Size tileGridSize) = 0;\n    CV_WRAP virtual Size getTilesGridSize() const = 0;\n\n    CV_WRAP virtual void collectGarbage() = 0;\n};\n\n\nclass CV_EXPORTS_W Subdiv2D\n{\npublic:\n    enum { PTLOC_ERROR        = -2,\n           PTLOC_OUTSIDE_RECT = -1,\n           PTLOC_INSIDE       = 0,\n           PTLOC_VERTEX       = 1,\n           PTLOC_ON_EDGE      = 2\n         };\n\n    enum { NEXT_AROUND_ORG   = 0x00,\n           NEXT_AROUND_DST   = 0x22,\n           PREV_AROUND_ORG   = 0x11,\n           PREV_AROUND_DST   = 0x33,\n           NEXT_AROUND_LEFT  = 0x13,\n           NEXT_AROUND_RIGHT = 0x31,\n           PREV_AROUND_LEFT  = 0x20,\n           PREV_AROUND_RIGHT = 0x02\n         };\n\n    CV_WRAP Subdiv2D();\n    CV_WRAP Subdiv2D(Rect rect);\n    CV_WRAP void initDelaunay(Rect rect);\n\n    CV_WRAP int insert(Point2f pt);\n    CV_WRAP void insert(const std::vector<Point2f>& ptvec);\n    CV_WRAP int locate(Point2f pt, CV_OUT int& edge, CV_OUT int& vertex);\n\n    CV_WRAP int findNearest(Point2f pt, CV_OUT Point2f* nearestPt = 0);\n    CV_WRAP void getEdgeList(CV_OUT std::vector<Vec4f>& edgeList) const;\n    CV_WRAP void getTriangleList(CV_OUT std::vector<Vec6f>& triangleList) const;\n    CV_WRAP void getVoronoiFacetList(const std::vector<int>& idx, CV_OUT std::vector<std::vector<Point2f> >& facetList,\n                                     CV_OUT std::vector<Point2f>& facetCenters);\n\n    CV_WRAP Point2f getVertex(int vertex, CV_OUT int* firstEdge = 0) const;\n\n    CV_WRAP int getEdge( int edge, int nextEdgeType ) const;\n    CV_WRAP int nextEdge(int edge) const;\n    CV_WRAP int rotateEdge(int edge, int rotate) const;\n    CV_WRAP int symEdge(int edge) const;\n    CV_WRAP int edgeOrg(int edge, CV_OUT Point2f* orgpt = 0) const;\n    CV_WRAP int edgeDst(int edge, CV_OUT Point2f* dstpt = 0) const;\n\nprotected:\n    int newEdge();\n    void deleteEdge(int edge);\n    int newPoint(Point2f pt, bool isvirtual, int firstEdge = 0);\n    void deletePoint(int vtx);\n    void setEdgePoints( int edge, int orgPt, int dstPt );\n    void splice( int edgeA, int edgeB );\n    int connectEdges( int edgeA, int edgeB );\n    void swapEdges( int edge );\n    int isRightOf(Point2f pt, int edge) const;\n    void calcVoronoi();\n    void clearVoronoi();\n    void checkSubdiv() const;\n\n    struct CV_EXPORTS Vertex\n    {\n        Vertex();\n        Vertex(Point2f pt, bool _isvirtual, int _firstEdge=0);\n        bool isvirtual() const;\n        bool isfree() const;\n\n        int firstEdge;\n        int type;\n        Point2f pt;\n    };\n\n    struct CV_EXPORTS QuadEdge\n    {\n        QuadEdge();\n        QuadEdge(int edgeidx);\n        bool isfree() const;\n\n        int next[4];\n        int pt[4];\n    };\n\n    std::vector<Vertex> vtx;\n    std::vector<QuadEdge> qedges;\n    int freeQEdge;\n    int freePoint;\n    bool validGeometry;\n\n    int recentEdge;\n    Point2f topLeft;\n    Point2f bottomRight;\n};\n\n//! @addtogroup imgproc_feature\n//! @{\n\n/** @example lsd_lines.cpp\nAn example using the LineSegmentDetector\n*/\n\n/** @brief Line segment detector class\n\nfollowing the algorithm described at @cite Rafael12 .\n*/\nclass CV_EXPORTS_W LineSegmentDetector : public Algorithm\n{\npublic:\n\n    /** @brief Finds lines in the input image.\n\n    This is the output of the default parameters of the algorithm on the above shown image.\n\n    ![image](pics/building_lsd.png)\n\n    @param _image A grayscale (CV_8UC1) input image. If only a roi needs to be selected, use:\n    `lsd_ptr-\\>detect(image(roi), lines, ...); lines += Scalar(roi.x, roi.y, roi.x, roi.y);`\n    @param _lines A vector of Vec4i or Vec4f elements specifying the beginning and ending point of a line. Where\n    Vec4i/Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 - end. Returned lines are strictly\n    oriented depending on the gradient.\n    @param width Vector of widths of the regions, where the lines are found. E.g. Width of line.\n    @param prec Vector of precisions with which the lines are found.\n    @param nfa Vector containing number of false alarms in the line region, with precision of 10%. The\n    bigger the value, logarithmically better the detection.\n    - -1 corresponds to 10 mean false alarms\n    - 0 corresponds to 1 mean false alarm\n    - 1 corresponds to 0.1 mean false alarms\n    This vector will be calculated only when the objects type is LSD_REFINE_ADV.\n    */\n    CV_WRAP virtual void detect(InputArray _image, OutputArray _lines,\n                        OutputArray width = noArray(), OutputArray prec = noArray(),\n                        OutputArray nfa = noArray()) = 0;\n\n    /** @brief Draws the line segments on a given image.\n    @param _image The image, where the liens will be drawn. Should be bigger or equal to the image,\n    where the lines were found.\n    @param lines A vector of the lines that needed to be drawn.\n     */\n    CV_WRAP virtual void drawSegments(InputOutputArray _image, InputArray lines) = 0;\n\n    /** @brief Draws two groups of lines in blue and red, counting the non overlapping (mismatching) pixels.\n\n    @param size The size of the image, where lines1 and lines2 were found.\n    @param lines1 The first group of lines that needs to be drawn. It is visualized in blue color.\n    @param lines2 The second group of lines. They visualized in red color.\n    @param _image Optional image, where the lines will be drawn. The image should be color(3-channel)\n    in order for lines1 and lines2 to be drawn in the above mentioned colors.\n     */\n    CV_WRAP virtual int compareSegments(const Size& size, InputArray lines1, InputArray lines2, InputOutputArray _image = noArray()) = 0;\n\n    virtual ~LineSegmentDetector() { }\n};\n\n/** @brief Creates a smart pointer to a LineSegmentDetector object and initializes it.\n\nThe LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want\nto edit those, as to tailor it for their own application.\n\n@param _refine The way found lines will be refined, see cv::LineSegmentDetectorModes\n@param _scale The scale of the image that will be used to find the lines. Range (0..1].\n@param _sigma_scale Sigma for Gaussian filter. It is computed as sigma = _sigma_scale/_scale.\n@param _quant Bound to the quantization error on the gradient norm.\n@param _ang_th Gradient angle tolerance in degrees.\n@param _log_eps Detection threshold: -log10(NFA) \\> log_eps. Used only when advancent refinement\nis chosen.\n@param _density_th Minimal density of aligned region points in the enclosing rectangle.\n@param _n_bins Number of bins in pseudo-ordering of gradient modulus.\n */\nCV_EXPORTS_W Ptr<LineSegmentDetector> createLineSegmentDetector(\n    int _refine = LSD_REFINE_STD, double _scale = 0.8,\n    double _sigma_scale = 0.6, double _quant = 2.0, double _ang_th = 22.5,\n    double _log_eps = 0, double _density_th = 0.7, int _n_bins = 1024);\n\n//! @} imgproc_feature\n\n//! @addtogroup imgproc_filter\n//! @{\n\n/** @brief Returns Gaussian filter coefficients.\n\nThe function computes and returns the \\f$\\texttt{ksize} \\times 1\\f$ matrix of Gaussian filter\ncoefficients:\n\n\\f[G_i= \\alpha *e^{-(i-( \\texttt{ksize} -1)/2)^2/(2* \\texttt{sigma}^2)},\\f]\n\nwhere \\f$i=0..\\texttt{ksize}-1\\f$ and \\f$\\alpha\\f$ is the scale factor chosen so that \\f$\\sum_i G_i=1\\f$.\n\nTwo of such generated kernels can be passed to sepFilter2D. Those functions automatically recognize\nsmoothing kernels (a symmetrical kernel with sum of weights equal to 1) and handle them accordingly.\nYou may also use the higher-level GaussianBlur.\n@param ksize Aperture size. It should be odd ( \\f$\\texttt{ksize} \\mod 2 = 1\\f$ ) and positive.\n@param sigma Gaussian standard deviation. If it is non-positive, it is computed from ksize as\n`sigma = 0.3\\*((ksize-1)\\*0.5 - 1) + 0.8`.\n@param ktype Type of filter coefficients. It can be CV_32F or CV_64F .\n@sa  sepFilter2D, getDerivKernels, getStructuringElement, GaussianBlur\n */\nCV_EXPORTS_W Mat getGaussianKernel( int ksize, double sigma, int ktype = CV_64F );\n\n/** @brief Returns filter coefficients for computing spatial image derivatives.\n\nThe function computes and returns the filter coefficients for spatial image derivatives. When\n`ksize=CV_SCHARR`, the Scharr \\f$3 \\times 3\\f$ kernels are generated (see cv::Scharr). Otherwise, Sobel\nkernels are generated (see cv::Sobel). The filters are normally passed to sepFilter2D or to\n\n@param kx Output matrix of row filter coefficients. It has the type ktype .\n@param ky Output matrix of column filter coefficients. It has the type ktype .\n@param dx Derivative order in respect of x.\n@param dy Derivative order in respect of y.\n@param ksize Aperture size. It can be CV_SCHARR, 1, 3, 5, or 7.\n@param normalize Flag indicating whether to normalize (scale down) the filter coefficients or not.\nTheoretically, the coefficients should have the denominator \\f$=2^{ksize*2-dx-dy-2}\\f$. If you are\ngoing to filter floating-point images, you are likely to use the normalized kernels. But if you\ncompute derivatives of an 8-bit image, store the results in a 16-bit image, and wish to preserve\nall the fractional bits, you may want to set normalize=false .\n@param ktype Type of filter coefficients. It can be CV_32f or CV_64F .\n */\nCV_EXPORTS_W void getDerivKernels( OutputArray kx, OutputArray ky,\n                                   int dx, int dy, int ksize,\n                                   bool normalize = false, int ktype = CV_32F );\n\n/** @brief Returns Gabor filter coefficients.\n\nFor more details about gabor filter equations and parameters, see: [Gabor\nFilter](http://en.wikipedia.org/wiki/Gabor_filter).\n\n@param ksize Size of the filter returned.\n@param sigma Standard deviation of the gaussian envelope.\n@param theta Orientation of the normal to the parallel stripes of a Gabor function.\n@param lambd Wavelength of the sinusoidal factor.\n@param gamma Spatial aspect ratio.\n@param psi Phase offset.\n@param ktype Type of filter coefficients. It can be CV_32F or CV_64F .\n */\nCV_EXPORTS_W Mat getGaborKernel( Size ksize, double sigma, double theta, double lambd,\n                                 double gamma, double psi = CV_PI*0.5, int ktype = CV_64F );\n\n//! returns \"magic\" border value for erosion and dilation. It is automatically transformed to Scalar::all(-DBL_MAX) for dilation.\nstatic inline Scalar morphologyDefaultBorderValue() { return Scalar::all(DBL_MAX); }\n\n/** @brief Returns a structuring element of the specified size and shape for morphological operations.\n\nThe function constructs and returns the structuring element that can be further passed to cv::erode,\ncv::dilate or cv::morphologyEx. But you can also construct an arbitrary binary mask yourself and use it as\nthe structuring element.\n\n@param shape Element shape that could be one of cv::MorphShapes\n@param ksize Size of the structuring element.\n@param anchor Anchor position within the element. The default value \\f$(-1, -1)\\f$ means that the\nanchor is at the center. Note that only the shape of a cross-shaped element depends on the anchor\nposition. In other cases the anchor just regulates how much the result of the morphological\noperation is shifted.\n */\nCV_EXPORTS_W Mat getStructuringElement(int shape, Size ksize, Point anchor = Point(-1,-1));\n\n/** @brief Blurs an image using the median filter.\n\nThe function smoothes an image using the median filter with the \\f$\\texttt{ksize} \\times\n\\texttt{ksize}\\f$ aperture. Each channel of a multi-channel image is processed independently.\nIn-place operation is supported.\n\n@param src input 1-, 3-, or 4-channel image; when ksize is 3 or 5, the image depth should be\nCV_8U, CV_16U, or CV_32F, for larger aperture sizes, it can only be CV_8U.\n@param dst destination array of the same size and type as src.\n@param ksize aperture linear size; it must be odd and greater than 1, for example: 3, 5, 7 ...\n@sa  bilateralFilter, blur, boxFilter, GaussianBlur\n */\nCV_EXPORTS_W void medianBlur( InputArray src, OutputArray dst, int ksize );\n\n/** @brief Blurs an image using a Gaussian filter.\n\nThe function convolves the source image with the specified Gaussian kernel. In-place filtering is\nsupported.\n\n@param src input image; the image can have any number of channels, which are processed\nindependently, but the depth should be CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.\n@param dst output image of the same size and type as src.\n@param ksize Gaussian kernel size. ksize.width and ksize.height can differ but they both must be\npositive and odd. Or, they can be zero's and then they are computed from sigma.\n@param sigmaX Gaussian kernel standard deviation in X direction.\n@param sigmaY Gaussian kernel standard deviation in Y direction; if sigmaY is zero, it is set to be\nequal to sigmaX, if both sigmas are zeros, they are computed from ksize.width and ksize.height,\nrespectively (see cv::getGaussianKernel for details); to fully control the result regardless of\npossible future modifications of all this semantics, it is recommended to specify all of ksize,\nsigmaX, and sigmaY.\n@param borderType pixel extrapolation method, see cv::BorderTypes\n\n@sa  sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur\n */\nCV_EXPORTS_W void GaussianBlur( InputArray src, OutputArray dst, Size ksize,\n                                double sigmaX, double sigmaY = 0,\n                                int borderType = BORDER_DEFAULT );\n\n/** @brief Applies the bilateral filter to an image.\n\nThe function applies bilateral filtering to the input image, as described in\nhttp://www.dai.ed.ac.uk/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html\nbilateralFilter can reduce unwanted noise very well while keeping edges fairly sharp. However, it is\nvery slow compared to most filters.\n\n_Sigma values_: For simplicity, you can set the 2 sigma values to be the same. If they are small (\\<\n10), the filter will not have much effect, whereas if they are large (\\> 150), they will have a very\nstrong effect, making the image look \"cartoonish\".\n\n_Filter size_: Large filters (d \\> 5) are very slow, so it is recommended to use d=5 for real-time\napplications, and perhaps d=9 for offline applications that need heavy noise filtering.\n\nThis filter does not work inplace.\n@param src Source 8-bit or floating-point, 1-channel or 3-channel image.\n@param dst Destination image of the same size and type as src .\n@param d Diameter of each pixel neighborhood that is used during filtering. If it is non-positive,\nit is computed from sigmaSpace.\n@param sigmaColor Filter sigma in the color space. A larger value of the parameter means that\nfarther colors within the pixel neighborhood (see sigmaSpace) will be mixed together, resulting\nin larger areas of semi-equal color.\n@param sigmaSpace Filter sigma in the coordinate space. A larger value of the parameter means that\nfarther pixels will influence each other as long as their colors are close enough (see sigmaColor\n). When d\\>0, it specifies the neighborhood size regardless of sigmaSpace. Otherwise, d is\nproportional to sigmaSpace.\n@param borderType border mode used to extrapolate pixels outside of the image, see cv::BorderTypes\n */\nCV_EXPORTS_W void bilateralFilter( InputArray src, OutputArray dst, int d,\n                                   double sigmaColor, double sigmaSpace,\n                                   int borderType = BORDER_DEFAULT );\n\n/** @brief Blurs an image using the box filter.\n\nThe function smoothes an image using the kernel:\n\n\\f[\\texttt{K} =  \\alpha \\begin{bmatrix} 1 & 1 & 1 &  \\cdots & 1 & 1  \\\\ 1 & 1 & 1 &  \\cdots & 1 & 1  \\\\ \\hdotsfor{6} \\\\ 1 & 1 & 1 &  \\cdots & 1 & 1 \\end{bmatrix}\\f]\n\nwhere\n\n\\f[\\alpha = \\fork{\\frac{1}{\\texttt{ksize.width*ksize.height}}}{when \\texttt{normalize=true}}{1}{otherwise}\\f]\n\nUnnormalized box filter is useful for computing various integral characteristics over each pixel\nneighborhood, such as covariance matrices of image derivatives (used in dense optical flow\nalgorithms, and so on). If you need to compute pixel sums over variable-size windows, use cv::integral.\n\n@param src input image.\n@param dst output image of the same size and type as src.\n@param ddepth the output image depth (-1 to use src.depth()).\n@param ksize blurring kernel size.\n@param anchor anchor point; default value Point(-1,-1) means that the anchor is at the kernel\ncenter.\n@param normalize flag, specifying whether the kernel is normalized by its area or not.\n@param borderType border mode used to extrapolate pixels outside of the image, see cv::BorderTypes\n@sa  blur, bilateralFilter, GaussianBlur, medianBlur, integral\n */\nCV_EXPORTS_W void boxFilter( InputArray src, OutputArray dst, int ddepth,\n                             Size ksize, Point anchor = Point(-1,-1),\n                             bool normalize = true,\n                             int borderType = BORDER_DEFAULT );\n\n/** @brief Calculates the normalized sum of squares of the pixel values overlapping the filter.\n\nFor every pixel \\f$ (x, y) \\f$ in the source image, the function calculates the sum of squares of those neighboring\npixel values which overlap the filter placed over the pixel \\f$ (x, y) \\f$.\n\nThe unnormalized square box filter can be useful in computing local image statistics such as the the local\nvariance and standard deviation around the neighborhood of a pixel.\n\n@param _src input image\n@param _dst output image of the same size and type as _src\n@param ddepth the output image depth (-1 to use src.depth())\n@param ksize kernel size\n@param anchor kernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel\ncenter.\n@param normalize flag, specifying whether the kernel is to be normalized by it's area or not.\n@param borderType border mode used to extrapolate pixels outside of the image, see cv::BorderTypes\n@sa boxFilter\n*/\nCV_EXPORTS_W void sqrBoxFilter( InputArray _src, OutputArray _dst, int ddepth,\n                                Size ksize, Point anchor = Point(-1, -1),\n                                bool normalize = true,\n                                int borderType = BORDER_DEFAULT );\n\n/** @brief Blurs an image using the normalized box filter.\n\nThe function smoothes an image using the kernel:\n\n\\f[\\texttt{K} =  \\frac{1}{\\texttt{ksize.width*ksize.height}} \\begin{bmatrix} 1 & 1 & 1 &  \\cdots & 1 & 1  \\\\ 1 & 1 & 1 &  \\cdots & 1 & 1  \\\\ \\hdotsfor{6} \\\\ 1 & 1 & 1 &  \\cdots & 1 & 1  \\\\ \\end{bmatrix}\\f]\n\nThe call `blur(src, dst, ksize, anchor, borderType)` is equivalent to `boxFilter(src, dst, src.type(),\nanchor, true, borderType)`.\n\n@param src input image; it can have any number of channels, which are processed independently, but\nthe depth should be CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.\n@param dst output image of the same size and type as src.\n@param ksize blurring kernel size.\n@param anchor anchor point; default value Point(-1,-1) means that the anchor is at the kernel\ncenter.\n@param borderType border mode used to extrapolate pixels outside of the image, see cv::BorderTypes\n@sa  boxFilter, bilateralFilter, GaussianBlur, medianBlur\n */\nCV_EXPORTS_W void blur( InputArray src, OutputArray dst,\n                        Size ksize, Point anchor = Point(-1,-1),\n                        int borderType = BORDER_DEFAULT );\n\n/** @brief Convolves an image with the kernel.\n\nThe function applies an arbitrary linear filter to an image. In-place operation is supported. When\nthe aperture is partially outside the image, the function interpolates outlier pixel values\naccording to the specified border mode.\n\nThe function does actually compute correlation, not the convolution:\n\n\\f[\\texttt{dst} (x,y) =  \\sum _{ \\stackrel{0\\leq x' < \\texttt{kernel.cols},}{0\\leq y' < \\texttt{kernel.rows}} }  \\texttt{kernel} (x',y')* \\texttt{src} (x+x'- \\texttt{anchor.x} ,y+y'- \\texttt{anchor.y} )\\f]\n\nThat is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip\nthe kernel using cv::flip and set the new anchor to `(kernel.cols - anchor.x - 1, kernel.rows -\nanchor.y - 1)`.\n\nThe function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or\nlarger) and the direct algorithm for small kernels.\n\n@param src input image.\n@param dst output image of the same size and the same number of channels as src.\n@param ddepth desired depth of the destination image, see @ref filter_depths \"combinations\"\n@param kernel convolution kernel (or rather a correlation kernel), a single-channel floating point\nmatrix; if you want to apply different kernels to different channels, split the image into\nseparate color planes using split and process them individually.\n@param anchor anchor of the kernel that indicates the relative position of a filtered point within\nthe kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor\nis at the kernel center.\n@param delta optional value added to the filtered pixels before storing them in dst.\n@param borderType pixel extrapolation method, see cv::BorderTypes\n@sa  sepFilter2D, dft, matchTemplate\n */\nCV_EXPORTS_W void filter2D( InputArray src, OutputArray dst, int ddepth,\n                            InputArray kernel, Point anchor = Point(-1,-1),\n                            double delta = 0, int borderType = BORDER_DEFAULT );\n\n/** @brief Applies a separable linear filter to an image.\n\nThe function applies a separable linear filter to the image. That is, first, every row of src is\nfiltered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D\nkernel kernelY. The final result shifted by delta is stored in dst .\n\n@param src Source image.\n@param dst Destination image of the same size and the same number of channels as src .\n@param ddepth Destination image depth, see @ref filter_depths \"combinations\"\n@param kernelX Coefficients for filtering each row.\n@param kernelY Coefficients for filtering each column.\n@param anchor Anchor position within the kernel. The default value \\f$(-1,-1)\\f$ means that the anchor\nis at the kernel center.\n@param delta Value added to the filtered results before storing them.\n@param borderType Pixel extrapolation method, see cv::BorderTypes\n@sa  filter2D, Sobel, GaussianBlur, boxFilter, blur\n */\nCV_EXPORTS_W void sepFilter2D( InputArray src, OutputArray dst, int ddepth,\n                               InputArray kernelX, InputArray kernelY,\n                               Point anchor = Point(-1,-1),\n                               double delta = 0, int borderType = BORDER_DEFAULT );\n\n/** @brief Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.\n\nIn all cases except one, the \\f$\\texttt{ksize} \\times \\texttt{ksize}\\f$ separable kernel is used to\ncalculate the derivative. When \\f$\\texttt{ksize = 1}\\f$, the \\f$3 \\times 1\\f$ or \\f$1 \\times 3\\f$\nkernel is used (that is, no Gaussian smoothing is done). `ksize = 1` can only be used for the first\nor the second x- or y- derivatives.\n\nThere is also the special value `ksize = CV_SCHARR (-1)` that corresponds to the \\f$3\\times3\\f$ Scharr\nfilter that may give more accurate results than the \\f$3\\times3\\f$ Sobel. The Scharr aperture is\n\n\\f[\\vecthreethree{-3}{0}{3}{-10}{0}{10}{-3}{0}{3}\\f]\n\nfor the x-derivative, or transposed for the y-derivative.\n\nThe function calculates an image derivative by convolving the image with the appropriate kernel:\n\n\\f[\\texttt{dst} =  \\frac{\\partial^{xorder+yorder} \\texttt{src}}{\\partial x^{xorder} \\partial y^{yorder}}\\f]\n\nThe Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less\nresistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3)\nor ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first\ncase corresponds to a kernel of:\n\n\\f[\\vecthreethree{-1}{0}{1}{-2}{0}{2}{-1}{0}{1}\\f]\n\nThe second case corresponds to a kernel of:\n\n\\f[\\vecthreethree{-1}{-2}{-1}{0}{0}{0}{1}{2}{1}\\f]\n\n@param src input image.\n@param dst output image of the same size and the same number of channels as src .\n@param ddepth output image depth, see @ref filter_depths \"combinations\"; in the case of\n    8-bit input images it will result in truncated derivatives.\n@param dx order of the derivative x.\n@param dy order of the derivative y.\n@param ksize size of the extended Sobel kernel; it must be 1, 3, 5, or 7.\n@param scale optional scale factor for the computed derivative values; by default, no scaling is\napplied (see cv::getDerivKernels for details).\n@param delta optional delta value that is added to the results prior to storing them in dst.\n@param borderType pixel extrapolation method, see cv::BorderTypes\n@sa  Scharr, Laplacian, sepFilter2D, filter2D, GaussianBlur, cartToPolar\n */\nCV_EXPORTS_W void Sobel( InputArray src, OutputArray dst, int ddepth,\n                         int dx, int dy, int ksize = 3,\n                         double scale = 1, double delta = 0,\n                         int borderType = BORDER_DEFAULT );\n\n/** @brief Calculates the first x- or y- image derivative using Scharr operator.\n\nThe function computes the first x- or y- spatial image derivative using the Scharr operator. The\ncall\n\n\\f[\\texttt{Scharr(src, dst, ddepth, dx, dy, scale, delta, borderType)}\\f]\n\nis equivalent to\n\n\\f[\\texttt{Sobel(src, dst, ddepth, dx, dy, CV\\_SCHARR, scale, delta, borderType)} .\\f]\n\n@param src input image.\n@param dst output image of the same size and the same number of channels as src.\n@param ddepth output image depth, see @ref filter_depths \"combinations\"\n@param dx order of the derivative x.\n@param dy order of the derivative y.\n@param scale optional scale factor for the computed derivative values; by default, no scaling is\napplied (see getDerivKernels for details).\n@param delta optional delta value that is added to the results prior to storing them in dst.\n@param borderType pixel extrapolation method, see cv::BorderTypes\n@sa  cartToPolar\n */\nCV_EXPORTS_W void Scharr( InputArray src, OutputArray dst, int ddepth,\n                          int dx, int dy, double scale = 1, double delta = 0,\n                          int borderType = BORDER_DEFAULT );\n\n/** @example laplace.cpp\n  An example using Laplace transformations for edge detection\n*/\n\n/** @brief Calculates the Laplacian of an image.\n\nThe function calculates the Laplacian of the source image by adding up the second x and y\nderivatives calculated using the Sobel operator:\n\n\\f[\\texttt{dst} =  \\Delta \\texttt{src} =  \\frac{\\partial^2 \\texttt{src}}{\\partial x^2} +  \\frac{\\partial^2 \\texttt{src}}{\\partial y^2}\\f]\n\nThis is done when `ksize > 1`. When `ksize == 1`, the Laplacian is computed by filtering the image\nwith the following \\f$3 \\times 3\\f$ aperture:\n\n\\f[\\vecthreethree {0}{1}{0}{1}{-4}{1}{0}{1}{0}\\f]\n\n@param src Source image.\n@param dst Destination image of the same size and the same number of channels as src .\n@param ddepth Desired depth of the destination image.\n@param ksize Aperture size used to compute the second-derivative filters. See getDerivKernels for\ndetails. The size must be positive and odd.\n@param scale Optional scale factor for the computed Laplacian values. By default, no scaling is\napplied. See getDerivKernels for details.\n@param delta Optional delta value that is added to the results prior to storing them in dst .\n@param borderType Pixel extrapolation method, see cv::BorderTypes\n@sa  Sobel, Scharr\n */\nCV_EXPORTS_W void Laplacian( InputArray src, OutputArray dst, int ddepth,\n                             int ksize = 1, double scale = 1, double delta = 0,\n                             int borderType = BORDER_DEFAULT );\n\n//! @} imgproc_filter\n\n//! @addtogroup imgproc_feature\n//! @{\n\n/** @example edge.cpp\n  An example on using the canny edge detector\n*/\n\n/** @brief Finds edges in an image using the Canny algorithm @cite Canny86 .\n\nThe function finds edges in the input image image and marks them in the output map edges using the\nCanny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The\nlargest value is used to find initial segments of strong edges. See\n<http://en.wikipedia.org/wiki/Canny_edge_detector>\n\n@param image 8-bit input image.\n@param edges output edge map; single channels 8-bit image, which has the same size as image .\n@param threshold1 first threshold for the hysteresis procedure.\n@param threshold2 second threshold for the hysteresis procedure.\n@param apertureSize aperture size for the Sobel operator.\n@param L2gradient a flag, indicating whether a more accurate \\f$L_2\\f$ norm\n\\f$=\\sqrt{(dI/dx)^2 + (dI/dy)^2}\\f$ should be used to calculate the image gradient magnitude (\nL2gradient=true ), or whether the default \\f$L_1\\f$ norm \\f$=|dI/dx|+|dI/dy|\\f$ is enough (\nL2gradient=false ).\n */\nCV_EXPORTS_W void Canny( InputArray image, OutputArray edges,\n                         double threshold1, double threshold2,\n                         int apertureSize = 3, bool L2gradient = false );\n\n/** @brief Calculates the minimal eigenvalue of gradient matrices for corner detection.\n\nThe function is similar to cornerEigenValsAndVecs but it calculates and stores only the minimal\neigenvalue of the covariance matrix of derivatives, that is, \\f$\\min(\\lambda_1, \\lambda_2)\\f$ in terms\nof the formulae in the cornerEigenValsAndVecs description.\n\n@param src Input single-channel 8-bit or floating-point image.\n@param dst Image to store the minimal eigenvalues. It has the type CV_32FC1 and the same size as\nsrc .\n@param blockSize Neighborhood size (see the details on cornerEigenValsAndVecs ).\n@param ksize Aperture parameter for the Sobel operator.\n@param borderType Pixel extrapolation method. See cv::BorderTypes.\n */\nCV_EXPORTS_W void cornerMinEigenVal( InputArray src, OutputArray dst,\n                                     int blockSize, int ksize = 3,\n                                     int borderType = BORDER_DEFAULT );\n\n/** @brief Harris corner detector.\n\nThe function runs the Harris corner detector on the image. Similarly to cornerMinEigenVal and\ncornerEigenValsAndVecs , for each pixel \\f$(x, y)\\f$ it calculates a \\f$2\\times2\\f$ gradient covariance\nmatrix \\f$M^{(x,y)}\\f$ over a \\f$\\texttt{blockSize} \\times \\texttt{blockSize}\\f$ neighborhood. Then, it\ncomputes the following characteristic:\n\n\\f[\\texttt{dst} (x,y) =  \\mathrm{det} M^{(x,y)} - k  \\cdot \\left ( \\mathrm{tr} M^{(x,y)} \\right )^2\\f]\n\nCorners in the image can be found as the local maxima of this response map.\n\n@param src Input single-channel 8-bit or floating-point image.\n@param dst Image to store the Harris detector responses. It has the type CV_32FC1 and the same\nsize as src .\n@param blockSize Neighborhood size (see the details on cornerEigenValsAndVecs ).\n@param ksize Aperture parameter for the Sobel operator.\n@param k Harris detector free parameter. See the formula below.\n@param borderType Pixel extrapolation method. See cv::BorderTypes.\n */\nCV_EXPORTS_W void cornerHarris( InputArray src, OutputArray dst, int blockSize,\n                                int ksize, double k,\n                                int borderType = BORDER_DEFAULT );\n\n/** @brief Calculates eigenvalues and eigenvectors of image blocks for corner detection.\n\nFor every pixel \\f$p\\f$ , the function cornerEigenValsAndVecs considers a blockSize \\f$\\times\\f$ blockSize\nneighborhood \\f$S(p)\\f$ . It calculates the covariation matrix of derivatives over the neighborhood as:\n\n\\f[M =  \\begin{bmatrix} \\sum _{S(p)}(dI/dx)^2 &  \\sum _{S(p)}dI/dx dI/dy  \\\\ \\sum _{S(p)}dI/dx dI/dy &  \\sum _{S(p)}(dI/dy)^2 \\end{bmatrix}\\f]\n\nwhere the derivatives are computed using the Sobel operator.\n\nAfter that, it finds eigenvectors and eigenvalues of \\f$M\\f$ and stores them in the destination image as\n\\f$(\\lambda_1, \\lambda_2, x_1, y_1, x_2, y_2)\\f$ where\n\n-   \\f$\\lambda_1, \\lambda_2\\f$ are the non-sorted eigenvalues of \\f$M\\f$\n-   \\f$x_1, y_1\\f$ are the eigenvectors corresponding to \\f$\\lambda_1\\f$\n-   \\f$x_2, y_2\\f$ are the eigenvectors corresponding to \\f$\\lambda_2\\f$\n\nThe output of the function can be used for robust edge or corner detection.\n\n@param src Input single-channel 8-bit or floating-point image.\n@param dst Image to store the results. It has the same size as src and the type CV_32FC(6) .\n@param blockSize Neighborhood size (see details below).\n@param ksize Aperture parameter for the Sobel operator.\n@param borderType Pixel extrapolation method. See cv::BorderTypes.\n\n@sa  cornerMinEigenVal, cornerHarris, preCornerDetect\n */\nCV_EXPORTS_W void cornerEigenValsAndVecs( InputArray src, OutputArray dst,\n                                          int blockSize, int ksize,\n                                          int borderType = BORDER_DEFAULT );\n\n/** @brief Calculates a feature map for corner detection.\n\nThe function calculates the complex spatial derivative-based function of the source image\n\n\\f[\\texttt{dst} = (D_x  \\texttt{src} )^2  \\cdot D_{yy}  \\texttt{src} + (D_y  \\texttt{src} )^2  \\cdot D_{xx}  \\texttt{src} - 2 D_x  \\texttt{src} \\cdot D_y  \\texttt{src} \\cdot D_{xy}  \\texttt{src}\\f]\n\nwhere \\f$D_x\\f$,\\f$D_y\\f$ are the first image derivatives, \\f$D_{xx}\\f$,\\f$D_{yy}\\f$ are the second image\nderivatives, and \\f$D_{xy}\\f$ is the mixed derivative.\n\nThe corners can be found as local maximums of the functions, as shown below:\n@code\n    Mat corners, dilated_corners;\n    preCornerDetect(image, corners, 3);\n    // dilation with 3x3 rectangular structuring element\n    dilate(corners, dilated_corners, Mat(), 1);\n    Mat corner_mask = corners == dilated_corners;\n@endcode\n\n@param src Source single-channel 8-bit of floating-point image.\n@param dst Output image that has the type CV_32F and the same size as src .\n@param ksize %Aperture size of the Sobel .\n@param borderType Pixel extrapolation method. See cv::BorderTypes.\n */\nCV_EXPORTS_W void preCornerDetect( InputArray src, OutputArray dst, int ksize,\n                                   int borderType = BORDER_DEFAULT );\n\n/** @brief Refines the corner locations.\n\nThe function iterates to find the sub-pixel accurate location of corners or radial saddle points, as\nshown on the figure below.\n\n![image](pics/cornersubpix.png)\n\nSub-pixel accurate corner locator is based on the observation that every vector from the center \\f$q\\f$\nto a point \\f$p\\f$ located within a neighborhood of \\f$q\\f$ is orthogonal to the image gradient at \\f$p\\f$\nsubject to image and measurement noise. Consider the expression:\n\n\\f[\\epsilon _i = {DI_{p_i}}^T  \\cdot (q - p_i)\\f]\n\nwhere \\f${DI_{p_i}}\\f$ is an image gradient at one of the points \\f$p_i\\f$ in a neighborhood of \\f$q\\f$ . The\nvalue of \\f$q\\f$ is to be found so that \\f$\\epsilon_i\\f$ is minimized. A system of equations may be set up\nwith \\f$\\epsilon_i\\f$ set to zero:\n\n\\f[\\sum _i(DI_{p_i}  \\cdot {DI_{p_i}}^T) -  \\sum _i(DI_{p_i}  \\cdot {DI_{p_i}}^T  \\cdot p_i)\\f]\n\nwhere the gradients are summed within a neighborhood (\"search window\") of \\f$q\\f$ . Calling the first\ngradient term \\f$G\\f$ and the second gradient term \\f$b\\f$ gives:\n\n\\f[q = G^{-1}  \\cdot b\\f]\n\nThe algorithm sets the center of the neighborhood window at this new center \\f$q\\f$ and then iterates\nuntil the center stays within a set threshold.\n\n@param image Input image.\n@param corners Initial coordinates of the input corners and refined coordinates provided for\noutput.\n@param winSize Half of the side length of the search window. For example, if winSize=Size(5,5) ,\nthen a \\f$5*2+1 \\times 5*2+1 = 11 \\times 11\\f$ search window is used.\n@param zeroZone Half of the size of the dead region in the middle of the search zone over which\nthe summation in the formula below is not done. It is used sometimes to avoid possible\nsingularities of the autocorrelation matrix. The value of (-1,-1) indicates that there is no such\na size.\n@param criteria Criteria for termination of the iterative process of corner refinement. That is,\nthe process of corner position refinement stops either after criteria.maxCount iterations or when\nthe corner position moves by less than criteria.epsilon on some iteration.\n */\nCV_EXPORTS_W void cornerSubPix( InputArray image, InputOutputArray corners,\n                                Size winSize, Size zeroZone,\n                                TermCriteria criteria );\n\n/** @brief Determines strong corners on an image.\n\nThe function finds the most prominent corners in the image or in the specified image region, as\ndescribed in @cite Shi94\n\n-   Function calculates the corner quality measure at every source image pixel using the\n    cornerMinEigenVal or cornerHarris .\n-   Function performs a non-maximum suppression (the local maximums in *3 x 3* neighborhood are\n    retained).\n-   The corners with the minimal eigenvalue less than\n    \\f$\\texttt{qualityLevel} \\cdot \\max_{x,y} qualityMeasureMap(x,y)\\f$ are rejected.\n-   The remaining corners are sorted by the quality measure in the descending order.\n-   Function throws away each corner for which there is a stronger corner at a distance less than\n    maxDistance.\n\nThe function can be used to initialize a point-based tracker of an object.\n\n@note If the function is called with different values A and B of the parameter qualityLevel , and\nA \\> B, the vector of returned corners with qualityLevel=A will be the prefix of the output vector\nwith qualityLevel=B .\n\n@param image Input 8-bit or floating-point 32-bit, single-channel image.\n@param corners Output vector of detected corners.\n@param maxCorners Maximum number of corners to return. If there are more corners than are found,\nthe strongest of them is returned.\n@param qualityLevel Parameter characterizing the minimal accepted quality of image corners. The\nparameter value is multiplied by the best corner quality measure, which is the minimal eigenvalue\n(see cornerMinEigenVal ) or the Harris function response (see cornerHarris ). The corners with the\nquality measure less than the product are rejected. For example, if the best corner has the\nquality measure = 1500, and the qualityLevel=0.01 , then all the corners with the quality measure\nless than 15 are rejected.\n@param minDistance Minimum possible Euclidean distance between the returned corners.\n@param mask Optional region of interest. If the image is not empty (it needs to have the type\nCV_8UC1 and the same size as image ), it specifies the region in which the corners are detected.\n@param blockSize Size of an average block for computing a derivative covariation matrix over each\npixel neighborhood. See cornerEigenValsAndVecs .\n@param useHarrisDetector Parameter indicating whether to use a Harris detector (see cornerHarris)\nor cornerMinEigenVal.\n@param k Free parameter of the Harris detector.\n\n@sa  cornerMinEigenVal, cornerHarris, calcOpticalFlowPyrLK, estimateRigidTransform,\n */\nCV_EXPORTS_W void goodFeaturesToTrack( InputArray image, OutputArray corners,\n                                     int maxCorners, double qualityLevel, double minDistance,\n                                     InputArray mask = noArray(), int blockSize = 3,\n                                     bool useHarrisDetector = false, double k = 0.04 );\n\n/** @example houghlines.cpp\nAn example using the Hough line detector\n*/\n\n/** @brief Finds lines in a binary image using the standard Hough transform.\n\nThe function implements the standard or standard multi-scale Hough transform algorithm for line\ndetection. See <http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm> for a good explanation of Hough\ntransform.\n\n@param image 8-bit, single-channel binary source image. The image may be modified by the function.\n@param lines Output vector of lines. Each line is represented by a two-element vector\n\\f$(\\rho, \\theta)\\f$ . \\f$\\rho\\f$ is the distance from the coordinate origin \\f$(0,0)\\f$ (top-left corner of\nthe image). \\f$\\theta\\f$ is the line rotation angle in radians (\n\\f$0 \\sim \\textrm{vertical line}, \\pi/2 \\sim \\textrm{horizontal line}\\f$ ).\n@param rho Distance resolution of the accumulator in pixels.\n@param theta Angle resolution of the accumulator in radians.\n@param threshold Accumulator threshold parameter. Only those lines are returned that get enough\nvotes ( \\f$>\\texttt{threshold}\\f$ ).\n@param srn For the multi-scale Hough transform, it is a divisor for the distance resolution rho .\nThe coarse accumulator distance resolution is rho and the accurate accumulator resolution is\nrho/srn . If both srn=0 and stn=0 , the classical Hough transform is used. Otherwise, both these\nparameters should be positive.\n@param stn For the multi-scale Hough transform, it is a divisor for the distance resolution theta.\n@param min_theta For standard and multi-scale Hough transform, minimum angle to check for lines.\nMust fall between 0 and max_theta.\n@param max_theta For standard and multi-scale Hough transform, maximum angle to check for lines.\nMust fall between min_theta and CV_PI.\n */\nCV_EXPORTS_W void HoughLines( InputArray image, OutputArray lines,\n                              double rho, double theta, int threshold,\n                              double srn = 0, double stn = 0,\n                              double min_theta = 0, double max_theta = CV_PI );\n\n/** @brief Finds line segments in a binary image using the probabilistic Hough transform.\n\nThe function implements the probabilistic Hough transform algorithm for line detection, described\nin @cite Matas00\n\nSee the line detection example below:\n\n@code\n    #include <opencv2/imgproc.hpp>\n    #include <opencv2/highgui.hpp>\n\n    using namespace cv;\n\n    int main(int argc, char** argv)\n    {\n        Mat src, dst, color_dst;\n        if( argc != 2 || !(src=imread(argv[1], 0)).data)\n            return -1;\n\n        Canny( src, dst, 50, 200, 3 );\n        cvtColor( dst, color_dst, COLOR_GRAY2BGR );\n\n    #if 0\n        vector<Vec2f> lines;\n        HoughLines( dst, lines, 1, CV_PI/180, 100 );\n\n        for( size_t i = 0; i < lines.size(); i++ )\n        {\n            float rho = lines[i][0];\n            float theta = lines[i][1];\n            double a = cos(theta), b = sin(theta);\n            double x0 = a*rho, y0 = b*rho;\n            Point pt1(cvRound(x0 + 1000*(-b)),\n                      cvRound(y0 + 1000*(a)));\n            Point pt2(cvRound(x0 - 1000*(-b)),\n                      cvRound(y0 - 1000*(a)));\n            line( color_dst, pt1, pt2, Scalar(0,0,255), 3, 8 );\n        }\n    #else\n        vector<Vec4i> lines;\n        HoughLinesP( dst, lines, 1, CV_PI/180, 80, 30, 10 );\n        for( size_t i = 0; i < lines.size(); i++ )\n        {\n            line( color_dst, Point(lines[i][0], lines[i][1]),\n                Point(lines[i][2], lines[i][3]), Scalar(0,0,255), 3, 8 );\n        }\n    #endif\n        namedWindow( \"Source\", 1 );\n        imshow( \"Source\", src );\n\n        namedWindow( \"Detected Lines\", 1 );\n        imshow( \"Detected Lines\", color_dst );\n\n        waitKey(0);\n        return 0;\n    }\n@endcode\nThis is a sample picture the function parameters have been tuned for:\n\n![image](pics/building.jpg)\n\nAnd this is the output of the above program in case of the probabilistic Hough transform:\n\n![image](pics/houghp.png)\n\n@param image 8-bit, single-channel binary source image. The image may be modified by the function.\n@param lines Output vector of lines. Each line is represented by a 4-element vector\n\\f$(x_1, y_1, x_2, y_2)\\f$ , where \\f$(x_1,y_1)\\f$ and \\f$(x_2, y_2)\\f$ are the ending points of each detected\nline segment.\n@param rho Distance resolution of the accumulator in pixels.\n@param theta Angle resolution of the accumulator in radians.\n@param threshold Accumulator threshold parameter. Only those lines are returned that get enough\nvotes ( \\f$>\\texttt{threshold}\\f$ ).\n@param minLineLength Minimum line length. Line segments shorter than that are rejected.\n@param maxLineGap Maximum allowed gap between points on the same line to link them.\n\n@sa LineSegmentDetector\n */\nCV_EXPORTS_W void HoughLinesP( InputArray image, OutputArray lines,\n                               double rho, double theta, int threshold,\n                               double minLineLength = 0, double maxLineGap = 0 );\n\n/** @example houghcircles.cpp\nAn example using the Hough circle detector\n*/\n\n/** @brief Finds circles in a grayscale image using the Hough transform.\n\nThe function finds circles in a grayscale image using a modification of the Hough transform.\n\nExample: :\n@code\n    #include <opencv2/imgproc.hpp>\n    #include <opencv2/highgui.hpp>\n    #include <math.h>\n\n    using namespace cv;\n\n    int main(int argc, char** argv)\n    {\n        Mat img, gray;\n        if( argc != 2 && !(img=imread(argv[1], 1)).data)\n            return -1;\n        cvtColor(img, gray, COLOR_BGR2GRAY);\n        // smooth it, otherwise a lot of false circles may be detected\n        GaussianBlur( gray, gray, Size(9, 9), 2, 2 );\n        vector<Vec3f> circles;\n        HoughCircles(gray, circles, HOUGH_GRADIENT,\n                     2, gray->rows/4, 200, 100 );\n        for( size_t i = 0; i < circles.size(); i++ )\n        {\n             Point center(cvRound(circles[i][0]), cvRound(circles[i][1]));\n             int radius = cvRound(circles[i][2]);\n             // draw the circle center\n             circle( img, center, 3, Scalar(0,255,0), -1, 8, 0 );\n             // draw the circle outline\n             circle( img, center, radius, Scalar(0,0,255), 3, 8, 0 );\n        }\n        namedWindow( \"circles\", 1 );\n        imshow( \"circles\", img );\n        return 0;\n    }\n@endcode\n\n@note Usually the function detects the centers of circles well. However, it may fail to find correct\nradii. You can assist to the function by specifying the radius range ( minRadius and maxRadius ) if\nyou know it. Or, you may ignore the returned radius, use only the center, and find the correct\nradius using an additional procedure.\n\n@param image 8-bit, single-channel, grayscale input image.\n@param circles Output vector of found circles. Each vector is encoded as a 3-element\nfloating-point vector \\f$(x, y, radius)\\f$ .\n@param method Detection method, see cv::HoughModes. Currently, the only implemented method is HOUGH_GRADIENT\n@param dp Inverse ratio of the accumulator resolution to the image resolution. For example, if\ndp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has\nhalf as big width and height.\n@param minDist Minimum distance between the centers of the detected circles. If the parameter is\ntoo small, multiple neighbor circles may be falsely detected in addition to a true one. If it is\ntoo large, some circles may be missed.\n@param param1 First method-specific parameter. In case of CV_HOUGH_GRADIENT , it is the higher\nthreshold of the two passed to the Canny edge detector (the lower one is twice smaller).\n@param param2 Second method-specific parameter. In case of CV_HOUGH_GRADIENT , it is the\naccumulator threshold for the circle centers at the detection stage. The smaller it is, the more\nfalse circles may be detected. Circles, corresponding to the larger accumulator values, will be\nreturned first.\n@param minRadius Minimum circle radius.\n@param maxRadius Maximum circle radius.\n\n@sa fitEllipse, minEnclosingCircle\n */\nCV_EXPORTS_W void HoughCircles( InputArray image, OutputArray circles,\n                               int method, double dp, double minDist,\n                               double param1 = 100, double param2 = 100,\n                               int minRadius = 0, int maxRadius = 0 );\n\n//! @} imgproc_feature\n\n//! @addtogroup imgproc_filter\n//! @{\n\n/** @example morphology2.cpp\n  An example using the morphological operations\n*/\n\n/** @brief Erodes an image by using a specific structuring element.\n\nThe function erodes the source image using the specified structuring element that determines the\nshape of a pixel neighborhood over which the minimum is taken:\n\n\\f[\\texttt{dst} (x,y) =  \\min _{(x',y'):  \\, \\texttt{element} (x',y') \\ne0 } \\texttt{src} (x+x',y+y')\\f]\n\nThe function supports the in-place mode. Erosion can be applied several ( iterations ) times. In\ncase of multi-channel images, each channel is processed independently.\n\n@param src input image; the number of channels can be arbitrary, but the depth should be one of\nCV_8U, CV_16U, CV_16S, CV_32F or CV_64F.\n@param dst output image of the same size and type as src.\n@param kernel structuring element used for erosion; if `element=Mat()`, a `3 x 3` rectangular\nstructuring element is used. Kernel can be created using getStructuringElement.\n@param anchor position of the anchor within the element; default value (-1, -1) means that the\nanchor is at the element center.\n@param iterations number of times erosion is applied.\n@param borderType pixel extrapolation method, see cv::BorderTypes\n@param borderValue border value in case of a constant border\n@sa  dilate, morphologyEx, getStructuringElement\n */\nCV_EXPORTS_W void erode( InputArray src, OutputArray dst, InputArray kernel,\n                         Point anchor = Point(-1,-1), int iterations = 1,\n                         int borderType = BORDER_CONSTANT,\n                         const Scalar& borderValue = morphologyDefaultBorderValue() );\n\n/** @brief Dilates an image by using a specific structuring element.\n\nThe function dilates the source image using the specified structuring element that determines the\nshape of a pixel neighborhood over which the maximum is taken:\n\\f[\\texttt{dst} (x,y) =  \\max _{(x',y'):  \\, \\texttt{element} (x',y') \\ne0 } \\texttt{src} (x+x',y+y')\\f]\n\nThe function supports the in-place mode. Dilation can be applied several ( iterations ) times. In\ncase of multi-channel images, each channel is processed independently.\n\n@param src input image; the number of channels can be arbitrary, but the depth should be one of\nCV_8U, CV_16U, CV_16S, CV_32F or CV_64F.\n@param dst output image of the same size and type as src\\`.\n@param kernel structuring element used for dilation; if elemenat=Mat(), a 3 x 3 rectangular\nstructuring element is used. Kernel can be created using getStructuringElement\n@param anchor position of the anchor within the element; default value (-1, -1) means that the\nanchor is at the element center.\n@param iterations number of times dilation is applied.\n@param borderType pixel extrapolation method, see cv::BorderTypes\n@param borderValue border value in case of a constant border\n@sa  erode, morphologyEx, getStructuringElement\n */\nCV_EXPORTS_W void dilate( InputArray src, OutputArray dst, InputArray kernel,\n                          Point anchor = Point(-1,-1), int iterations = 1,\n                          int borderType = BORDER_CONSTANT,\n                          const Scalar& borderValue = morphologyDefaultBorderValue() );\n\n/** @brief Performs advanced morphological transformations.\n\nThe function can perform advanced morphological transformations using an erosion and dilation as\nbasic operations.\n\nAny of the operations can be done in-place. In case of multi-channel images, each channel is\nprocessed independently.\n\n@param src Source image. The number of channels can be arbitrary. The depth should be one of\nCV_8U, CV_16U, CV_16S, CV_32F or CV_64F.\n@param dst Destination image of the same size and type as  src\\` .\n@param kernel Structuring element. It can be created using getStructuringElement.\n@param anchor Anchor position with the kernel. Negative values mean that the anchor is at the\nkernel center.\n@param op Type of a morphological operation, see cv::MorphTypes\n@param iterations Number of times erosion and dilation are applied.\n@param borderType Pixel extrapolation method, see cv::BorderTypes\n@param borderValue Border value in case of a constant border. The default value has a special\nmeaning.\n@sa  dilate, erode, getStructuringElement\n */\nCV_EXPORTS_W void morphologyEx( InputArray src, OutputArray dst,\n                                int op, InputArray kernel,\n                                Point anchor = Point(-1,-1), int iterations = 1,\n                                int borderType = BORDER_CONSTANT,\n                                const Scalar& borderValue = morphologyDefaultBorderValue() );\n\n//! @} imgproc_filter\n\n//! @addtogroup imgproc_transform\n//! @{\n\n/** @brief Resizes an image.\n\nThe function resize resizes the image src down to or up to the specified size. Note that the\ninitial dst type or size are not taken into account. Instead, the size and type are derived from\nthe `src`,`dsize`,`fx`, and `fy`. If you want to resize src so that it fits the pre-created dst,\nyou may call the function as follows:\n@code\n    // explicitly specify dsize=dst.size(); fx and fy will be computed from that.\n    resize(src, dst, dst.size(), 0, 0, interpolation);\n@endcode\nIf you want to decimate the image by factor of 2 in each direction, you can call the function this\nway:\n@code\n    // specify fx and fy and let the function compute the destination image size.\n    resize(src, dst, Size(), 0.5, 0.5, interpolation);\n@endcode\nTo shrink an image, it will generally look best with CV_INTER_AREA interpolation, whereas to\nenlarge an image, it will generally look best with CV_INTER_CUBIC (slow) or CV_INTER_LINEAR\n(faster but still looks OK).\n\n@param src input image.\n@param dst output image; it has the size dsize (when it is non-zero) or the size computed from\nsrc.size(), fx, and fy; the type of dst is the same as of src.\n@param dsize output image size; if it equals zero, it is computed as:\n \\f[\\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\\f]\n Either dsize or both fx and fy must be non-zero.\n@param fx scale factor along the horizontal axis; when it equals 0, it is computed as\n\\f[\\texttt{(double)dsize.width/src.cols}\\f]\n@param fy scale factor along the vertical axis; when it equals 0, it is computed as\n\\f[\\texttt{(double)dsize.height/src.rows}\\f]\n@param interpolation interpolation method, see cv::InterpolationFlags\n\n@sa  warpAffine, warpPerspective, remap\n */\nCV_EXPORTS_W void resize( InputArray src, OutputArray dst,\n                          Size dsize, double fx = 0, double fy = 0,\n                          int interpolation = INTER_LINEAR );\n\n/** @brief Applies an affine transformation to an image.\n\nThe function warpAffine transforms the source image using the specified matrix:\n\n\\f[\\texttt{dst} (x,y) =  \\texttt{src} ( \\texttt{M} _{11} x +  \\texttt{M} _{12} y +  \\texttt{M} _{13}, \\texttt{M} _{21} x +  \\texttt{M} _{22} y +  \\texttt{M} _{23})\\f]\n\nwhen the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted\nwith cv::invertAffineTransform and then put in the formula above instead of M. The function cannot\noperate in-place.\n\n@param src input image.\n@param dst output image that has the size dsize and the same type as src .\n@param M \\f$2\\times 3\\f$ transformation matrix.\n@param dsize size of the output image.\n@param flags combination of interpolation methods (see cv::InterpolationFlags) and the optional\nflag WARP_INVERSE_MAP that means that M is the inverse transformation (\n\\f$\\texttt{dst}\\rightarrow\\texttt{src}\\f$ ).\n@param borderMode pixel extrapolation method (see cv::BorderTypes); when\nborderMode=BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to\nthe \"outliers\" in the source image are not modified by the function.\n@param borderValue value used in case of a constant border; by default, it is 0.\n\n@sa  warpPerspective, resize, remap, getRectSubPix, transform\n */\nCV_EXPORTS_W void warpAffine( InputArray src, OutputArray dst,\n                              InputArray M, Size dsize,\n                              int flags = INTER_LINEAR,\n                              int borderMode = BORDER_CONSTANT,\n                              const Scalar& borderValue = Scalar());\n\n/** @brief Applies a perspective transformation to an image.\n\nThe function warpPerspective transforms the source image using the specified matrix:\n\n\\f[\\texttt{dst} (x,y) =  \\texttt{src} \\left ( \\frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} ,\n     \\frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \\right )\\f]\n\nwhen the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert\nand then put in the formula above instead of M. The function cannot operate in-place.\n\n@param src input image.\n@param dst output image that has the size dsize and the same type as src .\n@param M \\f$3\\times 3\\f$ transformation matrix.\n@param dsize size of the output image.\n@param flags combination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the\noptional flag WARP_INVERSE_MAP, that sets M as the inverse transformation (\n\\f$\\texttt{dst}\\rightarrow\\texttt{src}\\f$ ).\n@param borderMode pixel extrapolation method (BORDER_CONSTANT or BORDER_REPLICATE).\n@param borderValue value used in case of a constant border; by default, it equals 0.\n\n@sa  warpAffine, resize, remap, getRectSubPix, perspectiveTransform\n */\nCV_EXPORTS_W void warpPerspective( InputArray src, OutputArray dst,\n                                   InputArray M, Size dsize,\n                                   int flags = INTER_LINEAR,\n                                   int borderMode = BORDER_CONSTANT,\n                                   const Scalar& borderValue = Scalar());\n\n/** @brief Applies a generic geometrical transformation to an image.\n\nThe function remap transforms the source image using the specified map:\n\n\\f[\\texttt{dst} (x,y) =  \\texttt{src} (map_x(x,y),map_y(x,y))\\f]\n\nwhere values of pixels with non-integer coordinates are computed using one of available\ninterpolation methods. \\f$map_x\\f$ and \\f$map_y\\f$ can be encoded as separate floating-point maps\nin \\f$map_1\\f$ and \\f$map_2\\f$ respectively, or interleaved floating-point maps of \\f$(x,y)\\f$ in\n\\f$map_1\\f$, or fixed-point maps created by using convertMaps. The reason you might want to\nconvert from floating to fixed-point representations of a map is that they can yield much faster\n(\\~2x) remapping operations. In the converted case, \\f$map_1\\f$ contains pairs (cvFloor(x),\ncvFloor(y)) and \\f$map_2\\f$ contains indices in a table of interpolation coefficients.\n\nThis function cannot operate in-place.\n\n@param src Source image.\n@param dst Destination image. It has the same size as map1 and the same type as src .\n@param map1 The first map of either (x,y) points or just x values having the type CV_16SC2 ,\nCV_32FC1, or CV_32FC2. See convertMaps for details on converting a floating point\nrepresentation to fixed-point for speed.\n@param map2 The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map\nif map1 is (x,y) points), respectively.\n@param interpolation Interpolation method (see cv::InterpolationFlags). The method INTER_AREA is\nnot supported by this function.\n@param borderMode Pixel extrapolation method (see cv::BorderTypes). When\nborderMode=BORDER_TRANSPARENT, it means that the pixels in the destination image that\ncorresponds to the \"outliers\" in the source image are not modified by the function.\n@param borderValue Value used in case of a constant border. By default, it is 0.\n */\nCV_EXPORTS_W void remap( InputArray src, OutputArray dst,\n                         InputArray map1, InputArray map2,\n                         int interpolation, int borderMode = BORDER_CONSTANT,\n                         const Scalar& borderValue = Scalar());\n\n/** @brief Converts image transformation maps from one representation to another.\n\nThe function converts a pair of maps for remap from one representation to another. The following\noptions ( (map1.type(), map2.type()) \\f$\\rightarrow\\f$ (dstmap1.type(), dstmap2.type()) ) are\nsupported:\n\n- \\f$\\texttt{(CV\\_32FC1, CV\\_32FC1)} \\rightarrow \\texttt{(CV\\_16SC2, CV\\_16UC1)}\\f$. This is the\nmost frequently used conversion operation, in which the original floating-point maps (see remap )\nare converted to a more compact and much faster fixed-point representation. The first output array\ncontains the rounded coordinates and the second array (created only when nninterpolation=false )\ncontains indices in the interpolation tables.\n\n- \\f$\\texttt{(CV\\_32FC2)} \\rightarrow \\texttt{(CV\\_16SC2, CV\\_16UC1)}\\f$. The same as above but\nthe original maps are stored in one 2-channel matrix.\n\n- Reverse conversion. Obviously, the reconstructed floating-point maps will not be exactly the same\nas the originals.\n\n@param map1 The first input map of type CV_16SC2, CV_32FC1, or CV_32FC2 .\n@param map2 The second input map of type CV_16UC1, CV_32FC1, or none (empty matrix),\nrespectively.\n@param dstmap1 The first output map that has the type dstmap1type and the same size as src .\n@param dstmap2 The second output map.\n@param dstmap1type Type of the first output map that should be CV_16SC2, CV_32FC1, or\nCV_32FC2 .\n@param nninterpolation Flag indicating whether the fixed-point maps are used for the\nnearest-neighbor or for a more complex interpolation.\n\n@sa  remap, undistort, initUndistortRectifyMap\n */\nCV_EXPORTS_W void convertMaps( InputArray map1, InputArray map2,\n                               OutputArray dstmap1, OutputArray dstmap2,\n                               int dstmap1type, bool nninterpolation = false );\n\n/** @brief Calculates an affine matrix of 2D rotation.\n\nThe function calculates the following matrix:\n\n\\f[\\begin{bmatrix} \\alpha &  \\beta & (1- \\alpha )  \\cdot \\texttt{center.x} -  \\beta \\cdot \\texttt{center.y} \\\\ - \\beta &  \\alpha &  \\beta \\cdot \\texttt{center.x} + (1- \\alpha )  \\cdot \\texttt{center.y} \\end{bmatrix}\\f]\n\nwhere\n\n\\f[\\begin{array}{l} \\alpha =  \\texttt{scale} \\cdot \\cos \\texttt{angle} , \\\\ \\beta =  \\texttt{scale} \\cdot \\sin \\texttt{angle} \\end{array}\\f]\n\nThe transformation maps the rotation center to itself. If this is not the target, adjust the shift.\n\n@param center Center of the rotation in the source image.\n@param angle Rotation angle in degrees. Positive values mean counter-clockwise rotation (the\ncoordinate origin is assumed to be the top-left corner).\n@param scale Isotropic scale factor.\n\n@sa  getAffineTransform, warpAffine, transform\n */\nCV_EXPORTS_W Mat getRotationMatrix2D( Point2f center, double angle, double scale );\n\n//! returns 3x3 perspective transformation for the corresponding 4 point pairs.\nCV_EXPORTS Mat getPerspectiveTransform( const Point2f src[], const Point2f dst[] );\n\n/** @brief Calculates an affine transform from three pairs of the corresponding points.\n\nThe function calculates the \\f$2 \\times 3\\f$ matrix of an affine transform so that:\n\n\\f[\\begin{bmatrix} x'_i \\\\ y'_i \\end{bmatrix} = \\texttt{map\\_matrix} \\cdot \\begin{bmatrix} x_i \\\\ y_i \\\\ 1 \\end{bmatrix}\\f]\n\nwhere\n\n\\f[dst(i)=(x'_i,y'_i), src(i)=(x_i, y_i), i=0,1,2\\f]\n\n@param src Coordinates of triangle vertices in the source image.\n@param dst Coordinates of the corresponding triangle vertices in the destination image.\n\n@sa  warpAffine, transform\n */\nCV_EXPORTS Mat getAffineTransform( const Point2f src[], const Point2f dst[] );\n\n/** @brief Inverts an affine transformation.\n\nThe function computes an inverse affine transformation represented by \\f$2 \\times 3\\f$ matrix M:\n\n\\f[\\begin{bmatrix} a_{11} & a_{12} & b_1  \\\\ a_{21} & a_{22} & b_2 \\end{bmatrix}\\f]\n\nThe result is also a \\f$2 \\times 3\\f$ matrix of the same type as M.\n\n@param M Original affine transformation.\n@param iM Output reverse affine transformation.\n */\nCV_EXPORTS_W void invertAffineTransform( InputArray M, OutputArray iM );\n\n/** @brief Calculates a perspective transform from four pairs of the corresponding points.\n\nThe function calculates the \\f$3 \\times 3\\f$ matrix of a perspective transform so that:\n\n\\f[\\begin{bmatrix} t_i x'_i \\\\ t_i y'_i \\\\ t_i \\end{bmatrix} = \\texttt{map\\_matrix} \\cdot \\begin{bmatrix} x_i \\\\ y_i \\\\ 1 \\end{bmatrix}\\f]\n\nwhere\n\n\\f[dst(i)=(x'_i,y'_i), src(i)=(x_i, y_i), i=0,1,2,3\\f]\n\n@param src Coordinates of quadrangle vertices in the source image.\n@param dst Coordinates of the corresponding quadrangle vertices in the destination image.\n\n@sa  findHomography, warpPerspective, perspectiveTransform\n */\nCV_EXPORTS_W Mat getPerspectiveTransform( InputArray src, InputArray dst );\n\nCV_EXPORTS_W Mat getAffineTransform( InputArray src, InputArray dst );\n\n/** @brief Retrieves a pixel rectangle from an image with sub-pixel accuracy.\n\nThe function getRectSubPix extracts pixels from src:\n\n\\f[dst(x, y) = src(x +  \\texttt{center.x} - ( \\texttt{dst.cols} -1)*0.5, y +  \\texttt{center.y} - ( \\texttt{dst.rows} -1)*0.5)\\f]\n\nwhere the values of the pixels at non-integer coordinates are retrieved using bilinear\ninterpolation. Every channel of multi-channel images is processed independently. While the center of\nthe rectangle must be inside the image, parts of the rectangle may be outside. In this case, the\nreplication border mode (see cv::BorderTypes) is used to extrapolate the pixel values outside of\nthe image.\n\n@param image Source image.\n@param patchSize Size of the extracted patch.\n@param center Floating point coordinates of the center of the extracted rectangle within the\nsource image. The center must be inside the image.\n@param patch Extracted patch that has the size patchSize and the same number of channels as src .\n@param patchType Depth of the extracted pixels. By default, they have the same depth as src .\n\n@sa  warpAffine, warpPerspective\n */\nCV_EXPORTS_W void getRectSubPix( InputArray image, Size patchSize,\n                                 Point2f center, OutputArray patch, int patchType = -1 );\n\n/** @example polar_transforms.cpp\nAn example using the cv::linearPolar and cv::logPolar operations\n*/\n\n/** @brief Remaps an image to log-polar space.\n\ntransforms the source image using the following transformation:\n\\f[dst( \\phi , \\rho ) = src(x,y)\\f]\nwhere\n\\f[\\rho = M  \\cdot \\log{\\sqrt{x^2 + y^2}} , \\phi =atan(y/x)\\f]\n\nThe function emulates the human \"foveal\" vision and can be used for fast scale and\nrotation-invariant template matching, for object tracking and so forth. The function can not operate\nin-place.\n\n@param src Source image\n@param dst Destination image\n@param center The transformation center; where the output precision is maximal\n@param M Magnitude scale parameter.\n@param flags A combination of interpolation methods, see cv::InterpolationFlags\n */\nCV_EXPORTS_W void logPolar( InputArray src, OutputArray dst,\n                            Point2f center, double M, int flags );\n\n/** @brief Remaps an image to polar space.\n\ntransforms the source image using the following transformation:\n\\f[dst( \\phi , \\rho ) = src(x,y)\\f]\nwhere\n\\f[\\rho = (src.width/maxRadius)  \\cdot \\sqrt{x^2 + y^2} , \\phi =atan(y/x)\\f]\n\nThe function can not operate in-place.\n\n@param src Source image\n@param dst Destination image\n@param center The transformation center;\n@param maxRadius Inverse magnitude scale parameter\n@param flags A combination of interpolation methods, see cv::InterpolationFlags\n */\nCV_EXPORTS_W void linearPolar( InputArray src, OutputArray dst,\n                               Point2f center, double maxRadius, int flags );\n\n//! @} imgproc_transform\n\n//! @addtogroup imgproc_misc\n//! @{\n\n/** @overload */\nCV_EXPORTS_W void integral( InputArray src, OutputArray sum, int sdepth = -1 );\n\n/** @overload */\nCV_EXPORTS_AS(integral2) void integral( InputArray src, OutputArray sum,\n                                        OutputArray sqsum, int sdepth = -1, int sqdepth = -1 );\n\n/** @brief Calculates the integral of an image.\n\nThe functions calculate one or more integral images for the source image as follows:\n\n\\f[\\texttt{sum} (X,Y) =  \\sum _{x<X,y<Y}  \\texttt{image} (x,y)\\f]\n\n\\f[\\texttt{sqsum} (X,Y) =  \\sum _{x<X,y<Y}  \\texttt{image} (x,y)^2\\f]\n\n\\f[\\texttt{tilted} (X,Y) =  \\sum _{y<Y,abs(x-X+1) \\leq Y-y-1}  \\texttt{image} (x,y)\\f]\n\nUsing these integral images, you can calculate sum, mean, and standard deviation over a specific\nup-right or rotated rectangular region of the image in a constant time, for example:\n\n\\f[\\sum _{x_1 \\leq x < x_2,  \\, y_1  \\leq y < y_2}  \\texttt{image} (x,y) =  \\texttt{sum} (x_2,y_2)- \\texttt{sum} (x_1,y_2)- \\texttt{sum} (x_2,y_1)+ \\texttt{sum} (x_1,y_1)\\f]\n\nIt makes possible to do a fast blurring or fast block correlation with a variable window size, for\nexample. In case of multi-channel images, sums for each channel are accumulated independently.\n\nAs a practical example, the next figure shows the calculation of the integral of a straight\nrectangle Rect(3,3,3,2) and of a tilted rectangle Rect(5,1,2,3) . The selected pixels in the\noriginal image are shown, as well as the relative pixels in the integral images sum and tilted .\n\n![integral calculation example](pics/integral.png)\n\n@param src input image as \\f$W \\times H\\f$, 8-bit or floating-point (32f or 64f).\n@param sum integral image as \\f$(W+1)\\times (H+1)\\f$ , 32-bit integer or floating-point (32f or 64f).\n@param sqsum integral image for squared pixel values; it is \\f$(W+1)\\times (H+1)\\f$, double-precision\nfloating-point (64f) array.\n@param tilted integral for the image rotated by 45 degrees; it is \\f$(W+1)\\times (H+1)\\f$ array with\nthe same data type as sum.\n@param sdepth desired depth of the integral and the tilted integral images, CV_32S, CV_32F, or\nCV_64F.\n@param sqdepth desired depth of the integral image of squared pixel values, CV_32F or CV_64F.\n */\nCV_EXPORTS_AS(integral3) void integral( InputArray src, OutputArray sum,\n                                        OutputArray sqsum, OutputArray tilted,\n                                        int sdepth = -1, int sqdepth = -1 );\n\n//! @} imgproc_misc\n\n//! @addtogroup imgproc_motion\n//! @{\n\n/** @brief Adds an image to the accumulator.\n\nThe function adds src or some of its elements to dst :\n\n\\f[\\texttt{dst} (x,y)  \\leftarrow \\texttt{dst} (x,y) +  \\texttt{src} (x,y)  \\quad \\text{if} \\quad \\texttt{mask} (x,y)  \\ne 0\\f]\n\nThe function supports multi-channel images. Each channel is processed independently.\n\nThe functions accumulate\\* can be used, for example, to collect statistics of a scene background\nviewed by a still camera and for the further foreground-background segmentation.\n\n@param src Input image as 1- or 3-channel, 8-bit or 32-bit floating point.\n@param dst %Accumulator image with the same number of channels as input image, 32-bit or 64-bit\nfloating-point.\n@param mask Optional operation mask.\n\n@sa  accumulateSquare, accumulateProduct, accumulateWeighted\n */\nCV_EXPORTS_W void accumulate( InputArray src, InputOutputArray dst,\n                              InputArray mask = noArray() );\n\n/** @brief Adds the square of a source image to the accumulator.\n\nThe function adds the input image src or its selected region, raised to a power of 2, to the\naccumulator dst :\n\n\\f[\\texttt{dst} (x,y)  \\leftarrow \\texttt{dst} (x,y) +  \\texttt{src} (x,y)^2  \\quad \\text{if} \\quad \\texttt{mask} (x,y)  \\ne 0\\f]\n\nThe function supports multi-channel images. Each channel is processed independently.\n\n@param src Input image as 1- or 3-channel, 8-bit or 32-bit floating point.\n@param dst %Accumulator image with the same number of channels as input image, 32-bit or 64-bit\nfloating-point.\n@param mask Optional operation mask.\n\n@sa  accumulateSquare, accumulateProduct, accumulateWeighted\n */\nCV_EXPORTS_W void accumulateSquare( InputArray src, InputOutputArray dst,\n                                    InputArray mask = noArray() );\n\n/** @brief Adds the per-element product of two input images to the accumulator.\n\nThe function adds the product of two images or their selected regions to the accumulator dst :\n\n\\f[\\texttt{dst} (x,y)  \\leftarrow \\texttt{dst} (x,y) +  \\texttt{src1} (x,y)  \\cdot \\texttt{src2} (x,y)  \\quad \\text{if} \\quad \\texttt{mask} (x,y)  \\ne 0\\f]\n\nThe function supports multi-channel images. Each channel is processed independently.\n\n@param src1 First input image, 1- or 3-channel, 8-bit or 32-bit floating point.\n@param src2 Second input image of the same type and the same size as src1 .\n@param dst %Accumulator with the same number of channels as input images, 32-bit or 64-bit\nfloating-point.\n@param mask Optional operation mask.\n\n@sa  accumulate, accumulateSquare, accumulateWeighted\n */\nCV_EXPORTS_W void accumulateProduct( InputArray src1, InputArray src2,\n                                     InputOutputArray dst, InputArray mask=noArray() );\n\n/** @brief Updates a running average.\n\nThe function calculates the weighted sum of the input image src and the accumulator dst so that dst\nbecomes a running average of a frame sequence:\n\n\\f[\\texttt{dst} (x,y)  \\leftarrow (1- \\texttt{alpha} )  \\cdot \\texttt{dst} (x,y) +  \\texttt{alpha} \\cdot \\texttt{src} (x,y)  \\quad \\text{if} \\quad \\texttt{mask} (x,y)  \\ne 0\\f]\n\nThat is, alpha regulates the update speed (how fast the accumulator \"forgets\" about earlier images).\nThe function supports multi-channel images. Each channel is processed independently.\n\n@param src Input image as 1- or 3-channel, 8-bit or 32-bit floating point.\n@param dst %Accumulator image with the same number of channels as input image, 32-bit or 64-bit\nfloating-point.\n@param alpha Weight of the input image.\n@param mask Optional operation mask.\n\n@sa  accumulate, accumulateSquare, accumulateProduct\n */\nCV_EXPORTS_W void accumulateWeighted( InputArray src, InputOutputArray dst,\n                                      double alpha, InputArray mask = noArray() );\n\n/** @brief The function is used to detect translational shifts that occur between two images.\n\nThe operation takes advantage of the Fourier shift theorem for detecting the translational shift in\nthe frequency domain. It can be used for fast image registration as well as motion estimation. For\nmore information please see <http://en.wikipedia.org/wiki/Phase_correlation>\n\nCalculates the cross-power spectrum of two supplied source arrays. The arrays are padded if needed\nwith getOptimalDFTSize.\n\nThe function performs the following equations:\n- First it applies a Hanning window (see <http://en.wikipedia.org/wiki/Hann_function>) to each\nimage to remove possible edge effects. This window is cached until the array size changes to speed\nup processing time.\n- Next it computes the forward DFTs of each source array:\n\\f[\\mathbf{G}_a = \\mathcal{F}\\{src_1\\}, \\; \\mathbf{G}_b = \\mathcal{F}\\{src_2\\}\\f]\nwhere \\f$\\mathcal{F}\\f$ is the forward DFT.\n- It then computes the cross-power spectrum of each frequency domain array:\n\\f[R = \\frac{ \\mathbf{G}_a \\mathbf{G}_b^*}{|\\mathbf{G}_a \\mathbf{G}_b^*|}\\f]\n- Next the cross-correlation is converted back into the time domain via the inverse DFT:\n\\f[r = \\mathcal{F}^{-1}\\{R\\}\\f]\n- Finally, it computes the peak location and computes a 5x5 weighted centroid around the peak to\nachieve sub-pixel accuracy.\n\\f[(\\Delta x, \\Delta y) = \\texttt{weightedCentroid} \\{\\arg \\max_{(x, y)}\\{r\\}\\}\\f]\n- If non-zero, the response parameter is computed as the sum of the elements of r within the 5x5\ncentroid around the peak location. It is normalized to a maximum of 1 (meaning there is a single\npeak) and will be smaller when there are multiple peaks.\n\n@param src1 Source floating point array (CV_32FC1 or CV_64FC1)\n@param src2 Source floating point array (CV_32FC1 or CV_64FC1)\n@param window Floating point array with windowing coefficients to reduce edge effects (optional).\n@param response Signal power within the 5x5 centroid around the peak, between 0 and 1 (optional).\n@returns detected phase shift (sub-pixel) between the two arrays.\n\n@sa dft, getOptimalDFTSize, idft, mulSpectrums createHanningWindow\n */\nCV_EXPORTS_W Point2d phaseCorrelate(InputArray src1, InputArray src2,\n                                    InputArray window = noArray(), CV_OUT double* response = 0);\n\n/** @brief This function computes a Hanning window coefficients in two dimensions.\n\nSee (http://en.wikipedia.org/wiki/Hann_function) and (http://en.wikipedia.org/wiki/Window_function)\nfor more information.\n\nAn example is shown below:\n@code\n    // create hanning window of size 100x100 and type CV_32F\n    Mat hann;\n    createHanningWindow(hann, Size(100, 100), CV_32F);\n@endcode\n@param dst Destination array to place Hann coefficients in\n@param winSize The window size specifications\n@param type Created array type\n */\nCV_EXPORTS_W void createHanningWindow(OutputArray dst, Size winSize, int type);\n\n//! @} imgproc_motion\n\n//! @addtogroup imgproc_misc\n//! @{\n\n/** @brief Applies a fixed-level threshold to each array element.\n\nThe function applies fixed-level thresholding to a single-channel array. The function is typically\nused to get a bi-level (binary) image out of a grayscale image ( cv::compare could be also used for\nthis purpose) or for removing a noise, that is, filtering out pixels with too small or too large\nvalues. There are several types of thresholding supported by the function. They are determined by\ntype parameter.\n\nAlso, the special values cv::THRESH_OTSU or cv::THRESH_TRIANGLE may be combined with one of the\nabove values. In these cases, the function determines the optimal threshold value using the Otsu's\nor Triangle algorithm and uses it instead of the specified thresh . The function returns the\ncomputed threshold value. Currently, the Otsu's and Triangle methods are implemented only for 8-bit\nimages.\n\n@param src input array (single-channel, 8-bit or 32-bit floating point).\n@param dst output array of the same size and type as src.\n@param thresh threshold value.\n@param maxval maximum value to use with the THRESH_BINARY and THRESH_BINARY_INV thresholding\ntypes.\n@param type thresholding type (see the cv::ThresholdTypes).\n\n@sa  adaptiveThreshold, findContours, compare, min, max\n */\nCV_EXPORTS_W double threshold( InputArray src, OutputArray dst,\n                               double thresh, double maxval, int type );\n\n\n/** @brief Applies an adaptive threshold to an array.\n\nThe function transforms a grayscale image to a binary image according to the formulae:\n-   **THRESH_BINARY**\n    \\f[dst(x,y) =  \\fork{\\texttt{maxValue}}{if \\(src(x,y) > T(x,y)\\)}{0}{otherwise}\\f]\n-   **THRESH_BINARY_INV**\n    \\f[dst(x,y) =  \\fork{0}{if \\(src(x,y) > T(x,y)\\)}{\\texttt{maxValue}}{otherwise}\\f]\nwhere \\f$T(x,y)\\f$ is a threshold calculated individually for each pixel (see adaptiveMethod parameter).\n\nThe function can process the image in-place.\n\n@param src Source 8-bit single-channel image.\n@param dst Destination image of the same size and the same type as src.\n@param maxValue Non-zero value assigned to the pixels for which the condition is satisfied\n@param adaptiveMethod Adaptive thresholding algorithm to use, see cv::AdaptiveThresholdTypes\n@param thresholdType Thresholding type that must be either THRESH_BINARY or THRESH_BINARY_INV,\nsee cv::ThresholdTypes.\n@param blockSize Size of a pixel neighborhood that is used to calculate a threshold value for the\npixel: 3, 5, 7, and so on.\n@param C Constant subtracted from the mean or weighted mean (see the details below). Normally, it\nis positive but may be zero or negative as well.\n\n@sa  threshold, blur, GaussianBlur\n */\nCV_EXPORTS_W void adaptiveThreshold( InputArray src, OutputArray dst,\n                                     double maxValue, int adaptiveMethod,\n                                     int thresholdType, int blockSize, double C );\n\n//! @} imgproc_misc\n\n//! @addtogroup imgproc_filter\n//! @{\n\n/** @brief Blurs an image and downsamples it.\n\nBy default, size of the output image is computed as `Size((src.cols+1)/2, (src.rows+1)/2)`, but in\nany case, the following conditions should be satisfied:\n\n\\f[\\begin{array}{l} | \\texttt{dstsize.width} *2-src.cols| \\leq 2 \\\\ | \\texttt{dstsize.height} *2-src.rows| \\leq 2 \\end{array}\\f]\n\nThe function performs the downsampling step of the Gaussian pyramid construction. First, it\nconvolves the source image with the kernel:\n\n\\f[\\frac{1}{256} \\begin{bmatrix} 1 & 4 & 6 & 4 & 1  \\\\ 4 & 16 & 24 & 16 & 4  \\\\ 6 & 24 & 36 & 24 & 6  \\\\ 4 & 16 & 24 & 16 & 4  \\\\ 1 & 4 & 6 & 4 & 1 \\end{bmatrix}\\f]\n\nThen, it downsamples the image by rejecting even rows and columns.\n\n@param src input image.\n@param dst output image; it has the specified size and the same type as src.\n@param dstsize size of the output image.\n@param borderType Pixel extrapolation method, see cv::BorderTypes (BORDER_CONSTANT isn't supported)\n */\nCV_EXPORTS_W void pyrDown( InputArray src, OutputArray dst,\n                           const Size& dstsize = Size(), int borderType = BORDER_DEFAULT );\n\n/** @brief Upsamples an image and then blurs it.\n\nBy default, size of the output image is computed as `Size(src.cols\\*2, (src.rows\\*2)`, but in any\ncase, the following conditions should be satisfied:\n\n\\f[\\begin{array}{l} | \\texttt{dstsize.width} -src.cols*2| \\leq  ( \\texttt{dstsize.width}   \\mod  2)  \\\\ | \\texttt{dstsize.height} -src.rows*2| \\leq  ( \\texttt{dstsize.height}   \\mod  2) \\end{array}\\f]\n\nThe function performs the upsampling step of the Gaussian pyramid construction, though it can\nactually be used to construct the Laplacian pyramid. First, it upsamples the source image by\ninjecting even zero rows and columns and then convolves the result with the same kernel as in\npyrDown multiplied by 4.\n\n@param src input image.\n@param dst output image. It has the specified size and the same type as src .\n@param dstsize size of the output image.\n@param borderType Pixel extrapolation method, see cv::BorderTypes (only BORDER_DEFAULT is supported)\n */\nCV_EXPORTS_W void pyrUp( InputArray src, OutputArray dst,\n                         const Size& dstsize = Size(), int borderType = BORDER_DEFAULT );\n\n/** @brief Constructs the Gaussian pyramid for an image.\n\nThe function constructs a vector of images and builds the Gaussian pyramid by recursively applying\npyrDown to the previously built pyramid layers, starting from `dst[0]==src`.\n\n@param src Source image. Check pyrDown for the list of supported types.\n@param dst Destination vector of maxlevel+1 images of the same type as src. dst[0] will be the\nsame as src. dst[1] is the next pyramid layer, a smoothed and down-sized src, and so on.\n@param maxlevel 0-based index of the last (the smallest) pyramid layer. It must be non-negative.\n@param borderType Pixel extrapolation method, see cv::BorderTypes (BORDER_CONSTANT isn't supported)\n */\nCV_EXPORTS void buildPyramid( InputArray src, OutputArrayOfArrays dst,\n                              int maxlevel, int borderType = BORDER_DEFAULT );\n\n//! @} imgproc_filter\n\n//! @addtogroup imgproc_transform\n//! @{\n\n/** @brief Transforms an image to compensate for lens distortion.\n\nThe function transforms an image to compensate radial and tangential lens distortion.\n\nThe function is simply a combination of cv::initUndistortRectifyMap (with unity R ) and cv::remap\n(with bilinear interpolation). See the former function for details of the transformation being\nperformed.\n\nThose pixels in the destination image, for which there is no correspondent pixels in the source\nimage, are filled with zeros (black color).\n\nA particular subset of the source image that will be visible in the corrected image can be regulated\nby newCameraMatrix. You can use cv::getOptimalNewCameraMatrix to compute the appropriate\nnewCameraMatrix depending on your requirements.\n\nThe camera matrix and the distortion parameters can be determined using cv::calibrateCamera. If\nthe resolution of images is different from the resolution used at the calibration stage, \\f$f_x,\nf_y, c_x\\f$ and \\f$c_y\\f$ need to be scaled accordingly, while the distortion coefficients remain\nthe same.\n\n@param src Input (distorted) image.\n@param dst Output (corrected) image that has the same size and type as src .\n@param cameraMatrix Input camera matrix \\f$A = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\\f$ .\n@param distCoeffs Input vector of distortion coefficients\n\\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]])\\f$ of 4, 5, or 8 elements. If the vector is\nNULL/empty, the zero distortion coefficients are assumed.\n@param newCameraMatrix Camera matrix of the distorted image. By default, it is the same as\ncameraMatrix but you may additionally scale and shift the result by using a different matrix.\n */\nCV_EXPORTS_W void undistort( InputArray src, OutputArray dst,\n                             InputArray cameraMatrix,\n                             InputArray distCoeffs,\n                             InputArray newCameraMatrix = noArray() );\n\n/** @brief Computes the undistortion and rectification transformation map.\n\nThe function computes the joint undistortion and rectification transformation and represents the\nresult in the form of maps for remap. The undistorted image looks like original, as if it is\ncaptured with a camera using the camera matrix =newCameraMatrix and zero distortion. In case of a\nmonocular camera, newCameraMatrix is usually equal to cameraMatrix, or it can be computed by\ncv::getOptimalNewCameraMatrix for a better control over scaling. In case of a stereo camera,\nnewCameraMatrix is normally set to P1 or P2 computed by cv::stereoRectify .\n\nAlso, this new camera is oriented differently in the coordinate space, according to R. That, for\nexample, helps to align two heads of a stereo camera so that the epipolar lines on both images\nbecome horizontal and have the same y- coordinate (in case of a horizontally aligned stereo camera).\n\nThe function actually builds the maps for the inverse mapping algorithm that is used by remap. That\nis, for each pixel \\f$(u, v)\\f$ in the destination (corrected and rectified) image, the function\ncomputes the corresponding coordinates in the source image (that is, in the original image from\ncamera). The following process is applied:\n\\f[\\begin{array}{l} x  \\leftarrow (u - {c'}_x)/{f'}_x  \\\\ y  \\leftarrow (v - {c'}_y)/{f'}_y  \\\\{[X\\,Y\\,W]} ^T  \\leftarrow R^{-1}*[x \\, y \\, 1]^T  \\\\ x'  \\leftarrow X/W  \\\\ y'  \\leftarrow Y/W  \\\\ x\"  \\leftarrow x' (1 + k_1 r^2 + k_2 r^4 + k_3 r^6) + 2p_1 x' y' + p_2(r^2 + 2 x'^2)  \\\\ y\"  \\leftarrow y' (1 + k_1 r^2 + k_2 r^4 + k_3 r^6) + p_1 (r^2 + 2 y'^2) + 2 p_2 x' y'  \\\\ map_x(u,v)  \\leftarrow x\" f_x + c_x  \\\\ map_y(u,v)  \\leftarrow y\" f_y + c_y \\end{array}\\f]\nwhere \\f$(k_1, k_2, p_1, p_2[, k_3])\\f$ are the distortion coefficients.\n\nIn case of a stereo camera, this function is called twice: once for each camera head, after\nstereoRectify, which in its turn is called after cv::stereoCalibrate. But if the stereo camera\nwas not calibrated, it is still possible to compute the rectification transformations directly from\nthe fundamental matrix using cv::stereoRectifyUncalibrated. For each camera, the function computes\nhomography H as the rectification transformation in a pixel domain, not a rotation matrix R in 3D\nspace. R can be computed from H as\n\\f[\\texttt{R} = \\texttt{cameraMatrix} ^{-1} \\cdot \\texttt{H} \\cdot \\texttt{cameraMatrix}\\f]\nwhere cameraMatrix can be chosen arbitrarily.\n\n@param cameraMatrix Input camera matrix \\f$A=\\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\\f$ .\n@param distCoeffs Input vector of distortion coefficients\n\\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]])\\f$ of 4, 5, or 8 elements. If the vector is\nNULL/empty, the zero distortion coefficients are assumed.\n@param R Optional rectification transformation in the object space (3x3 matrix). R1 or R2 ,\ncomputed by stereoRectify can be passed here. If the matrix is empty, the identity transformation\nis assumed. In cvInitUndistortMap R assumed to be an identity matrix.\n@param newCameraMatrix New camera matrix \\f$A'=\\vecthreethree{f_x'}{0}{c_x'}{0}{f_y'}{c_y'}{0}{0}{1}\\f$.\n@param size Undistorted image size.\n@param m1type Type of the first output map that can be CV_32FC1 or CV_16SC2, see cv::convertMaps\n@param map1 The first output map.\n@param map2 The second output map.\n */\nCV_EXPORTS_W void initUndistortRectifyMap( InputArray cameraMatrix, InputArray distCoeffs,\n                           InputArray R, InputArray newCameraMatrix,\n                           Size size, int m1type, OutputArray map1, OutputArray map2 );\n\n//! initializes maps for cv::remap() for wide-angle\nCV_EXPORTS_W float initWideAngleProjMap( InputArray cameraMatrix, InputArray distCoeffs,\n                                         Size imageSize, int destImageWidth,\n                                         int m1type, OutputArray map1, OutputArray map2,\n                                         int projType = PROJ_SPHERICAL_EQRECT, double alpha = 0);\n\n/** @brief Returns the default new camera matrix.\n\nThe function returns the camera matrix that is either an exact copy of the input cameraMatrix (when\ncenterPrinicipalPoint=false ), or the modified one (when centerPrincipalPoint=true).\n\nIn the latter case, the new camera matrix will be:\n\n\\f[\\begin{bmatrix} f_x && 0 && ( \\texttt{imgSize.width} -1)*0.5  \\\\ 0 && f_y && ( \\texttt{imgSize.height} -1)*0.5  \\\\ 0 && 0 && 1 \\end{bmatrix} ,\\f]\n\nwhere \\f$f_x\\f$ and \\f$f_y\\f$ are \\f$(0,0)\\f$ and \\f$(1,1)\\f$ elements of cameraMatrix, respectively.\n\nBy default, the undistortion functions in OpenCV (see initUndistortRectifyMap, undistort) do not\nmove the principal point. However, when you work with stereo, it is important to move the principal\npoints in both views to the same y-coordinate (which is required by most of stereo correspondence\nalgorithms), and may be to the same x-coordinate too. So, you can form the new camera matrix for\neach view where the principal points are located at the center.\n\n@param cameraMatrix Input camera matrix.\n@param imgsize Camera view image size in pixels.\n@param centerPrincipalPoint Location of the principal point in the new camera matrix. The\nparameter indicates whether this location should be at the image center or not.\n */\nCV_EXPORTS_W Mat getDefaultNewCameraMatrix( InputArray cameraMatrix, Size imgsize = Size(),\n                                            bool centerPrincipalPoint = false );\n\n/** @brief Computes the ideal point coordinates from the observed point coordinates.\n\nThe function is similar to cv::undistort and cv::initUndistortRectifyMap but it operates on a\nsparse set of points instead of a raster image. Also the function performs a reverse transformation\nto projectPoints. In case of a 3D object, it does not reconstruct its 3D coordinates, but for a\nplanar object, it does, up to a translation vector, if the proper R is specified.\n@code\n    // (u,v) is the input point, (u', v') is the output point\n    // camera_matrix=[fx 0 cx; 0 fy cy; 0 0 1]\n    // P=[fx' 0 cx' tx; 0 fy' cy' ty; 0 0 1 tz]\n    x\" = (u - cx)/fx\n    y\" = (v - cy)/fy\n    (x',y') = undistort(x\",y\",dist_coeffs)\n    [X,Y,W]T = R*[x' y' 1]T\n    x = X/W, y = Y/W\n    // only performed if P=[fx' 0 cx' [tx]; 0 fy' cy' [ty]; 0 0 1 [tz]] is specified\n    u' = x*fx' + cx'\n    v' = y*fy' + cy',\n@endcode\nwhere cv::undistort is an approximate iterative algorithm that estimates the normalized original\npoint coordinates out of the normalized distorted point coordinates (\"normalized\" means that the\ncoordinates do not depend on the camera matrix).\n\nThe function can be used for both a stereo camera head or a monocular camera (when R is empty).\n\n@param src Observed point coordinates, 1xN or Nx1 2-channel (CV_32FC2 or CV_64FC2).\n@param dst Output ideal point coordinates after undistortion and reverse perspective\ntransformation. If matrix P is identity or omitted, dst will contain normalized point coordinates.\n@param cameraMatrix Camera matrix \\f$\\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\\f$ .\n@param distCoeffs Input vector of distortion coefficients\n\\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]])\\f$ of 4, 5, or 8 elements. If the vector is\nNULL/empty, the zero distortion coefficients are assumed.\n@param R Rectification transformation in the object space (3x3 matrix). R1 or R2 computed by\ncv::stereoRectify can be passed here. If the matrix is empty, the identity transformation is used.\n@param P New camera matrix (3x3) or new projection matrix (3x4). P1 or P2 computed by\ncv::stereoRectify can be passed here. If the matrix is empty, the identity new camera matrix is used.\n */\nCV_EXPORTS_W void undistortPoints( InputArray src, OutputArray dst,\n                                   InputArray cameraMatrix, InputArray distCoeffs,\n                                   InputArray R = noArray(), InputArray P = noArray());\n\n//! @} imgproc_transform\n\n//! @addtogroup imgproc_hist\n//! @{\n\n/** @example demhist.cpp\nAn example for creating histograms of an image\n*/\n\n/** @brief Calculates a histogram of a set of arrays.\n\nThe functions calcHist calculate the histogram of one or more arrays. The elements of a tuple used\nto increment a histogram bin are taken from the corresponding input arrays at the same location. The\nsample below shows how to compute a 2D Hue-Saturation histogram for a color image. :\n@code\n    #include <opencv2/imgproc.hpp>\n    #include <opencv2/highgui.hpp>\n\n    using namespace cv;\n\n    int main( int argc, char** argv )\n    {\n        Mat src, hsv;\n        if( argc != 2 || !(src=imread(argv[1], 1)).data )\n            return -1;\n\n        cvtColor(src, hsv, COLOR_BGR2HSV);\n\n        // Quantize the hue to 30 levels\n        // and the saturation to 32 levels\n        int hbins = 30, sbins = 32;\n        int histSize[] = {hbins, sbins};\n        // hue varies from 0 to 179, see cvtColor\n        float hranges[] = { 0, 180 };\n        // saturation varies from 0 (black-gray-white) to\n        // 255 (pure spectrum color)\n        float sranges[] = { 0, 256 };\n        const float* ranges[] = { hranges, sranges };\n        MatND hist;\n        // we compute the histogram from the 0-th and 1-st channels\n        int channels[] = {0, 1};\n\n        calcHist( &hsv, 1, channels, Mat(), // do not use mask\n                 hist, 2, histSize, ranges,\n                 true, // the histogram is uniform\n                 false );\n        double maxVal=0;\n        minMaxLoc(hist, 0, &maxVal, 0, 0);\n\n        int scale = 10;\n        Mat histImg = Mat::zeros(sbins*scale, hbins*10, CV_8UC3);\n\n        for( int h = 0; h < hbins; h++ )\n            for( int s = 0; s < sbins; s++ )\n            {\n                float binVal = hist.at<float>(h, s);\n                int intensity = cvRound(binVal*255/maxVal);\n                rectangle( histImg, Point(h*scale, s*scale),\n                            Point( (h+1)*scale - 1, (s+1)*scale - 1),\n                            Scalar::all(intensity),\n                            CV_FILLED );\n            }\n\n        namedWindow( \"Source\", 1 );\n        imshow( \"Source\", src );\n\n        namedWindow( \"H-S Histogram\", 1 );\n        imshow( \"H-S Histogram\", histImg );\n        waitKey();\n    }\n@endcode\n\n@param images Source arrays. They all should have the same depth, CV_8U or CV_32F , and the same\nsize. Each of them can have an arbitrary number of channels.\n@param nimages Number of source images.\n@param channels List of the dims channels used to compute the histogram. The first array channels\nare numerated from 0 to images[0].channels()-1 , the second array channels are counted from\nimages[0].channels() to images[0].channels() + images[1].channels()-1, and so on.\n@param mask Optional mask. If the matrix is not empty, it must be an 8-bit array of the same size\nas images[i] . The non-zero mask elements mark the array elements counted in the histogram.\n@param hist Output histogram, which is a dense or sparse dims -dimensional array.\n@param dims Histogram dimensionality that must be positive and not greater than CV_MAX_DIMS\n(equal to 32 in the current OpenCV version).\n@param histSize Array of histogram sizes in each dimension.\n@param ranges Array of the dims arrays of the histogram bin boundaries in each dimension. When the\nhistogram is uniform ( uniform =true), then for each dimension i it is enough to specify the lower\n(inclusive) boundary \\f$L_0\\f$ of the 0-th histogram bin and the upper (exclusive) boundary\n\\f$U_{\\texttt{histSize}[i]-1}\\f$ for the last histogram bin histSize[i]-1 . That is, in case of a\nuniform histogram each of ranges[i] is an array of 2 elements. When the histogram is not uniform (\nuniform=false ), then each of ranges[i] contains histSize[i]+1 elements:\n\\f$L_0, U_0=L_1, U_1=L_2, ..., U_{\\texttt{histSize[i]}-2}=L_{\\texttt{histSize[i]}-1}, U_{\\texttt{histSize[i]}-1}\\f$\n. The array elements, that are not between \\f$L_0\\f$ and \\f$U_{\\texttt{histSize[i]}-1}\\f$ , are not\ncounted in the histogram.\n@param uniform Flag indicating whether the histogram is uniform or not (see above).\n@param accumulate Accumulation flag. If it is set, the histogram is not cleared in the beginning\nwhen it is allocated. This feature enables you to compute a single histogram from several sets of\narrays, or to update the histogram in time.\n*/\nCV_EXPORTS void calcHist( const Mat* images, int nimages,\n                          const int* channels, InputArray mask,\n                          OutputArray hist, int dims, const int* histSize,\n                          const float** ranges, bool uniform = true, bool accumulate = false );\n\n/** @overload\n\nthis variant uses cv::SparseMat for output\n*/\nCV_EXPORTS void calcHist( const Mat* images, int nimages,\n                          const int* channels, InputArray mask,\n                          SparseMat& hist, int dims,\n                          const int* histSize, const float** ranges,\n                          bool uniform = true, bool accumulate = false );\n\n/** @overload */\nCV_EXPORTS_W void calcHist( InputArrayOfArrays images,\n                            const std::vector<int>& channels,\n                            InputArray mask, OutputArray hist,\n                            const std::vector<int>& histSize,\n                            const std::vector<float>& ranges,\n                            bool accumulate = false );\n\n/** @brief Calculates the back projection of a histogram.\n\nThe functions calcBackProject calculate the back project of the histogram. That is, similarly to\ncv::calcHist , at each location (x, y) the function collects the values from the selected channels\nin the input images and finds the corresponding histogram bin. But instead of incrementing it, the\nfunction reads the bin value, scales it by scale , and stores in backProject(x,y) . In terms of\nstatistics, the function computes probability of each element value in respect with the empirical\nprobability distribution represented by the histogram. See how, for example, you can find and track\na bright-colored object in a scene:\n\n- Before tracking, show the object to the camera so that it covers almost the whole frame.\nCalculate a hue histogram. The histogram may have strong maximums, corresponding to the dominant\ncolors in the object.\n\n- When tracking, calculate a back projection of a hue plane of each input video frame using that\npre-computed histogram. Threshold the back projection to suppress weak colors. It may also make\nsense to suppress pixels with non-sufficient color saturation and too dark or too bright pixels.\n\n- Find connected components in the resulting picture and choose, for example, the largest\ncomponent.\n\nThis is an approximate algorithm of the CamShift color object tracker.\n\n@param images Source arrays. They all should have the same depth, CV_8U or CV_32F , and the same\nsize. Each of them can have an arbitrary number of channels.\n@param nimages Number of source images.\n@param channels The list of channels used to compute the back projection. The number of channels\nmust match the histogram dimensionality. The first array channels are numerated from 0 to\nimages[0].channels()-1 , the second array channels are counted from images[0].channels() to\nimages[0].channels() + images[1].channels()-1, and so on.\n@param hist Input histogram that can be dense or sparse.\n@param backProject Destination back projection array that is a single-channel array of the same\nsize and depth as images[0] .\n@param ranges Array of arrays of the histogram bin boundaries in each dimension. See calcHist .\n@param scale Optional scale factor for the output back projection.\n@param uniform Flag indicating whether the histogram is uniform or not (see above).\n\n@sa cv::calcHist, cv::compareHist\n */\nCV_EXPORTS void calcBackProject( const Mat* images, int nimages,\n                                 const int* channels, InputArray hist,\n                                 OutputArray backProject, const float** ranges,\n                                 double scale = 1, bool uniform = true );\n\n/** @overload */\nCV_EXPORTS void calcBackProject( const Mat* images, int nimages,\n                                 const int* channels, const SparseMat& hist,\n                                 OutputArray backProject, const float** ranges,\n                                 double scale = 1, bool uniform = true );\n\n/** @overload */\nCV_EXPORTS_W void calcBackProject( InputArrayOfArrays images, const std::vector<int>& channels,\n                                   InputArray hist, OutputArray dst,\n                                   const std::vector<float>& ranges,\n                                   double scale );\n\n/** @brief Compares two histograms.\n\nThe function compare two dense or two sparse histograms using the specified method.\n\nThe function returns \\f$d(H_1, H_2)\\f$ .\n\nWhile the function works well with 1-, 2-, 3-dimensional dense histograms, it may not be suitable\nfor high-dimensional sparse histograms. In such histograms, because of aliasing and sampling\nproblems, the coordinates of non-zero histogram bins can slightly shift. To compare such histograms\nor more general sparse configurations of weighted points, consider using the cv::EMD function.\n\n@param H1 First compared histogram.\n@param H2 Second compared histogram of the same size as H1 .\n@param method Comparison method, see cv::HistCompMethods\n */\nCV_EXPORTS_W double compareHist( InputArray H1, InputArray H2, int method );\n\n/** @overload */\nCV_EXPORTS double compareHist( const SparseMat& H1, const SparseMat& H2, int method );\n\n/** @brief Equalizes the histogram of a grayscale image.\n\nThe function equalizes the histogram of the input image using the following algorithm:\n\n- Calculate the histogram \\f$H\\f$ for src .\n- Normalize the histogram so that the sum of histogram bins is 255.\n- Compute the integral of the histogram:\n\\f[H'_i =  \\sum _{0  \\le j < i} H(j)\\f]\n- Transform the image using \\f$H'\\f$ as a look-up table: \\f$\\texttt{dst}(x,y) = H'(\\texttt{src}(x,y))\\f$\n\nThe algorithm normalizes the brightness and increases the contrast of the image.\n\n@param src Source 8-bit single channel image.\n@param dst Destination image of the same size and type as src .\n */\nCV_EXPORTS_W void equalizeHist( InputArray src, OutputArray dst );\n\n/** @brief Computes the \"minimal work\" distance between two weighted point configurations.\n\nThe function computes the earth mover distance and/or a lower boundary of the distance between the\ntwo weighted point configurations. One of the applications described in @cite RubnerSept98,\n@cite Rubner2000 is multi-dimensional histogram comparison for image retrieval. EMD is a transportation\nproblem that is solved using some modification of a simplex algorithm, thus the complexity is\nexponential in the worst case, though, on average it is much faster. In the case of a real metric\nthe lower boundary can be calculated even faster (using linear-time algorithm) and it can be used\nto determine roughly whether the two signatures are far enough so that they cannot relate to the\nsame object.\n\n@param signature1 First signature, a \\f$\\texttt{size1}\\times \\texttt{dims}+1\\f$ floating-point matrix.\nEach row stores the point weight followed by the point coordinates. The matrix is allowed to have\na single column (weights only) if the user-defined cost matrix is used.\n@param signature2 Second signature of the same format as signature1 , though the number of rows\nmay be different. The total weights may be different. In this case an extra \"dummy\" point is added\nto either signature1 or signature2 .\n@param distType Used metric. See cv::DistanceTypes.\n@param cost User-defined \\f$\\texttt{size1}\\times \\texttt{size2}\\f$ cost matrix. Also, if a cost matrix\nis used, lower boundary lowerBound cannot be calculated because it needs a metric function.\n@param lowerBound Optional input/output parameter: lower boundary of a distance between the two\nsignatures that is a distance between mass centers. The lower boundary may not be calculated if\nthe user-defined cost matrix is used, the total weights of point configurations are not equal, or\nif the signatures consist of weights only (the signature matrices have a single column). You\n**must** initialize \\*lowerBound . If the calculated distance between mass centers is greater or\nequal to \\*lowerBound (it means that the signatures are far enough), the function does not\ncalculate EMD. In any case \\*lowerBound is set to the calculated distance between mass centers on\nreturn. Thus, if you want to calculate both distance between mass centers and EMD, \\*lowerBound\nshould be set to 0.\n@param flow Resultant \\f$\\texttt{size1} \\times \\texttt{size2}\\f$ flow matrix: \\f$\\texttt{flow}_{i,j}\\f$ is\na flow from \\f$i\\f$ -th point of signature1 to \\f$j\\f$ -th point of signature2 .\n */\nCV_EXPORTS float EMD( InputArray signature1, InputArray signature2,\n                      int distType, InputArray cost=noArray(),\n                      float* lowerBound = 0, OutputArray flow = noArray() );\n\n//! @} imgproc_hist\n\n/** @example watershed.cpp\nAn example using the watershed algorithm\n */\n\n/** @brief Performs a marker-based image segmentation using the watershed algorithm.\n\nThe function implements one of the variants of watershed, non-parametric marker-based segmentation\nalgorithm, described in @cite Meyer92 .\n\nBefore passing the image to the function, you have to roughly outline the desired regions in the\nimage markers with positive (\\>0) indices. So, every region is represented as one or more connected\ncomponents with the pixel values 1, 2, 3, and so on. Such markers can be retrieved from a binary\nmask using findContours and drawContours (see the watershed.cpp demo). The markers are \"seeds\" of\nthe future image regions. All the other pixels in markers , whose relation to the outlined regions\nis not known and should be defined by the algorithm, should be set to 0's. In the function output,\neach pixel in markers is set to a value of the \"seed\" components or to -1 at boundaries between the\nregions.\n\n@note Any two neighbor connected components are not necessarily separated by a watershed boundary\n(-1's pixels); for example, they can touch each other in the initial marker image passed to the\nfunction.\n\n@param image Input 8-bit 3-channel image.\n@param markers Input/output 32-bit single-channel image (map) of markers. It should have the same\nsize as image .\n\n@sa findContours\n\n@ingroup imgproc_misc\n */\nCV_EXPORTS_W void watershed( InputArray image, InputOutputArray markers );\n\n//! @addtogroup imgproc_filter\n//! @{\n\n/** @brief Performs initial step of meanshift segmentation of an image.\n\nThe function implements the filtering stage of meanshift segmentation, that is, the output of the\nfunction is the filtered \"posterized\" image with color gradients and fine-grain texture flattened.\nAt every pixel (X,Y) of the input image (or down-sized input image, see below) the function executes\nmeanshift iterations, that is, the pixel (X,Y) neighborhood in the joint space-color hyperspace is\nconsidered:\n\n\\f[(x,y): X- \\texttt{sp} \\le x  \\le X+ \\texttt{sp} , Y- \\texttt{sp} \\le y  \\le Y+ \\texttt{sp} , ||(R,G,B)-(r,g,b)||   \\le \\texttt{sr}\\f]\n\nwhere (R,G,B) and (r,g,b) are the vectors of color components at (X,Y) and (x,y), respectively\n(though, the algorithm does not depend on the color space used, so any 3-component color space can\nbe used instead). Over the neighborhood the average spatial value (X',Y') and average color vector\n(R',G',B') are found and they act as the neighborhood center on the next iteration:\n\n\\f[(X,Y)~(X',Y'), (R,G,B)~(R',G',B').\\f]\n\nAfter the iterations over, the color components of the initial pixel (that is, the pixel from where\nthe iterations started) are set to the final value (average color at the last iteration):\n\n\\f[I(X,Y) <- (R*,G*,B*)\\f]\n\nWhen maxLevel \\> 0, the gaussian pyramid of maxLevel+1 levels is built, and the above procedure is\nrun on the smallest layer first. After that, the results are propagated to the larger layer and the\niterations are run again only on those pixels where the layer colors differ by more than sr from the\nlower-resolution layer of the pyramid. That makes boundaries of color regions sharper. Note that the\nresults will be actually different from the ones obtained by running the meanshift procedure on the\nwhole original image (i.e. when maxLevel==0).\n\n@param src The source 8-bit, 3-channel image.\n@param dst The destination image of the same format and the same size as the source.\n@param sp The spatial window radius.\n@param sr The color window radius.\n@param maxLevel Maximum level of the pyramid for the segmentation.\n@param termcrit Termination criteria: when to stop meanshift iterations.\n */\nCV_EXPORTS_W void pyrMeanShiftFiltering( InputArray src, OutputArray dst,\n                                         double sp, double sr, int maxLevel = 1,\n                                         TermCriteria termcrit=TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1) );\n\n//! @}\n\n//! @addtogroup imgproc_misc\n//! @{\n\n/** @example grabcut.cpp\nAn example using the GrabCut algorithm\n */\n\n/** @brief Runs the GrabCut algorithm.\n\nThe function implements the [GrabCut image segmentation algorithm](http://en.wikipedia.org/wiki/GrabCut).\n\n@param img Input 8-bit 3-channel image.\n@param mask Input/output 8-bit single-channel mask. The mask is initialized by the function when\nmode is set to GC_INIT_WITH_RECT. Its elements may have one of the cv::GrabCutClasses.\n@param rect ROI containing a segmented object. The pixels outside of the ROI are marked as\n\"obvious background\". The parameter is only used when mode==GC_INIT_WITH_RECT .\n@param bgdModel Temporary array for the background model. Do not modify it while you are\nprocessing the same image.\n@param fgdModel Temporary arrays for the foreground model. Do not modify it while you are\nprocessing the same image.\n@param iterCount Number of iterations the algorithm should make before returning the result. Note\nthat the result can be refined with further calls with mode==GC_INIT_WITH_MASK or\nmode==GC_EVAL .\n@param mode Operation mode that could be one of the cv::GrabCutModes\n */\nCV_EXPORTS_W void grabCut( InputArray img, InputOutputArray mask, Rect rect,\n                           InputOutputArray bgdModel, InputOutputArray fgdModel,\n                           int iterCount, int mode = GC_EVAL );\n\n/** @example distrans.cpp\nAn example on using the distance transform\\\n*/\n\n\n/** @brief Calculates the distance to the closest zero pixel for each pixel of the source image.\n\nThe functions distanceTransform calculate the approximate or precise distance from every binary\nimage pixel to the nearest zero pixel. For zero image pixels, the distance will obviously be zero.\n\nWhen maskSize == DIST_MASK_PRECISE and distanceType == DIST_L2 , the function runs the\nalgorithm described in @cite Felzenszwalb04 . This algorithm is parallelized with the TBB library.\n\nIn other cases, the algorithm @cite Borgefors86 is used. This means that for a pixel the function\nfinds the shortest path to the nearest zero pixel consisting of basic shifts: horizontal, vertical,\ndiagonal, or knight's move (the latest is available for a \\f$5\\times 5\\f$ mask). The overall\ndistance is calculated as a sum of these basic distances. Since the distance function should be\nsymmetric, all of the horizontal and vertical shifts must have the same cost (denoted as a ), all\nthe diagonal shifts must have the same cost (denoted as `b`), and all knight's moves must have the\nsame cost (denoted as `c`). For the cv::DIST_C and cv::DIST_L1 types, the distance is calculated\nprecisely, whereas for cv::DIST_L2 (Euclidean distance) the distance can be calculated only with a\nrelative error (a \\f$5\\times 5\\f$ mask gives more accurate results). For `a`,`b`, and `c`, OpenCV\nuses the values suggested in the original paper:\n- DIST_L1: `a = 1, b = 2`\n- DIST_L2:\n    - `3 x 3`: `a=0.955, b=1.3693`\n    - `5 x 5`: `a=1, b=1.4, c=2.1969`\n- DIST_C: `a = 1, b = 1`\n\nTypically, for a fast, coarse distance estimation DIST_L2, a \\f$3\\times 3\\f$ mask is used. For a\nmore accurate distance estimation DIST_L2, a \\f$5\\times 5\\f$ mask or the precise algorithm is used.\nNote that both the precise and the approximate algorithms are linear on the number of pixels.\n\nThis variant of the function does not only compute the minimum distance for each pixel \\f$(x, y)\\f$\nbut also identifies the nearest connected component consisting of zero pixels\n(labelType==DIST_LABEL_CCOMP) or the nearest zero pixel (labelType==DIST_LABEL_PIXEL). Index of the\ncomponent/pixel is stored in `labels(x, y)`. When labelType==DIST_LABEL_CCOMP, the function\nautomatically finds connected components of zero pixels in the input image and marks them with\ndistinct labels. When labelType==DIST_LABEL_CCOMP, the function scans through the input image and\nmarks all the zero pixels with distinct labels.\n\nIn this mode, the complexity is still linear. That is, the function provides a very fast way to\ncompute the Voronoi diagram for a binary image. Currently, the second variant can use only the\napproximate distance transform algorithm, i.e. maskSize=DIST_MASK_PRECISE is not supported\nyet.\n\n@param src 8-bit, single-channel (binary) source image.\n@param dst Output image with calculated distances. It is a 8-bit or 32-bit floating-point,\nsingle-channel image of the same size as src.\n@param labels Output 2D array of labels (the discrete Voronoi diagram). It has the type\nCV_32SC1 and the same size as src.\n@param distanceType Type of distance, see cv::DistanceTypes\n@param maskSize Size of the distance transform mask, see cv::DistanceTransformMasks.\nDIST_MASK_PRECISE is not supported by this variant. In case of the DIST_L1 or DIST_C distance type,\nthe parameter is forced to 3 because a \\f$3\\times 3\\f$ mask gives the same result as \\f$5\\times\n5\\f$ or any larger aperture.\n@param labelType Type of the label array to build, see cv::DistanceTransformLabelTypes.\n */\nCV_EXPORTS_AS(distanceTransformWithLabels) void distanceTransform( InputArray src, OutputArray dst,\n                                     OutputArray labels, int distanceType, int maskSize,\n                                     int labelType = DIST_LABEL_CCOMP );\n\n/** @overload\n@param src 8-bit, single-channel (binary) source image.\n@param dst Output image with calculated distances. It is a 8-bit or 32-bit floating-point,\nsingle-channel image of the same size as src .\n@param distanceType Type of distance, see cv::DistanceTypes\n@param maskSize Size of the distance transform mask, see cv::DistanceTransformMasks. In case of the\nDIST_L1 or DIST_C distance type, the parameter is forced to 3 because a \\f$3\\times 3\\f$ mask gives\nthe same result as \\f$5\\times 5\\f$ or any larger aperture.\n@param dstType Type of output image. It can be CV_8U or CV_32F. Type CV_8U can be used only for\nthe first variant of the function and distanceType == DIST_L1.\n*/\nCV_EXPORTS_W void distanceTransform( InputArray src, OutputArray dst,\n                                     int distanceType, int maskSize, int dstType=CV_32F);\n\n/** @example ffilldemo.cpp\n  An example using the FloodFill technique\n*/\n\n/** @overload\n\nvariant without `mask` parameter\n*/\nCV_EXPORTS int floodFill( InputOutputArray image,\n                          Point seedPoint, Scalar newVal, CV_OUT Rect* rect = 0,\n                          Scalar loDiff = Scalar(), Scalar upDiff = Scalar(),\n                          int flags = 4 );\n\n/** @brief Fills a connected component with the given color.\n\nThe functions floodFill fill a connected component starting from the seed point with the specified\ncolor. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The\npixel at \\f$(x,y)\\f$ is considered to belong to the repainted domain if:\n\n- in case of a grayscale image and floating range\n\\f[\\texttt{src} (x',y')- \\texttt{loDiff} \\leq \\texttt{src} (x,y)  \\leq \\texttt{src} (x',y')+ \\texttt{upDiff}\\f]\n\n\n- in case of a grayscale image and fixed range\n\\f[\\texttt{src} ( \\texttt{seedPoint} .x, \\texttt{seedPoint} .y)- \\texttt{loDiff} \\leq \\texttt{src} (x,y)  \\leq \\texttt{src} ( \\texttt{seedPoint} .x, \\texttt{seedPoint} .y)+ \\texttt{upDiff}\\f]\n\n\n- in case of a color image and floating range\n\\f[\\texttt{src} (x',y')_r- \\texttt{loDiff} _r \\leq \\texttt{src} (x,y)_r \\leq \\texttt{src} (x',y')_r+ \\texttt{upDiff} _r,\\f]\n\\f[\\texttt{src} (x',y')_g- \\texttt{loDiff} _g \\leq \\texttt{src} (x,y)_g \\leq \\texttt{src} (x',y')_g+ \\texttt{upDiff} _g\\f]\nand\n\\f[\\texttt{src} (x',y')_b- \\texttt{loDiff} _b \\leq \\texttt{src} (x,y)_b \\leq \\texttt{src} (x',y')_b+ \\texttt{upDiff} _b\\f]\n\n\n- in case of a color image and fixed range\n\\f[\\texttt{src} ( \\texttt{seedPoint} .x, \\texttt{seedPoint} .y)_r- \\texttt{loDiff} _r \\leq \\texttt{src} (x,y)_r \\leq \\texttt{src} ( \\texttt{seedPoint} .x, \\texttt{seedPoint} .y)_r+ \\texttt{upDiff} _r,\\f]\n\\f[\\texttt{src} ( \\texttt{seedPoint} .x, \\texttt{seedPoint} .y)_g- \\texttt{loDiff} _g \\leq \\texttt{src} (x,y)_g \\leq \\texttt{src} ( \\texttt{seedPoint} .x, \\texttt{seedPoint} .y)_g+ \\texttt{upDiff} _g\\f]\nand\n\\f[\\texttt{src} ( \\texttt{seedPoint} .x, \\texttt{seedPoint} .y)_b- \\texttt{loDiff} _b \\leq \\texttt{src} (x,y)_b \\leq \\texttt{src} ( \\texttt{seedPoint} .x, \\texttt{seedPoint} .y)_b+ \\texttt{upDiff} _b\\f]\n\n\nwhere \\f$src(x',y')\\f$ is the value of one of pixel neighbors that is already known to belong to the\ncomponent. That is, to be added to the connected component, a color/brightness of the pixel should\nbe close enough to:\n- Color/brightness of one of its neighbors that already belong to the connected component in case\nof a floating range.\n- Color/brightness of the seed point in case of a fixed range.\n\nUse these functions to either mark a connected component with the specified color in-place, or build\na mask and then extract the contour, or copy the region to another image, and so on.\n\n@param image Input/output 1- or 3-channel, 8-bit, or floating-point image. It is modified by the\nfunction unless the FLOODFILL_MASK_ONLY flag is set in the second variant of the function. See\nthe details below.\n@param mask Operation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels\ntaller than image. Since this is both an input and output parameter, you must take responsibility\nof initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example,\nan edge detector output can be used as a mask to stop filling at edges. On output, pixels in the\nmask corresponding to filled pixels in the image are set to 1 or to the a value specified in flags\nas described below. It is therefore possible to use the same mask in multiple calls to the function\nto make sure the filled areas do not overlap.\n@param seedPoint Starting point.\n@param newVal New value of the repainted domain pixels.\n@param loDiff Maximal lower brightness/color difference between the currently observed pixel and\none of its neighbors belonging to the component, or a seed pixel being added to the component.\n@param upDiff Maximal upper brightness/color difference between the currently observed pixel and\none of its neighbors belonging to the component, or a seed pixel being added to the component.\n@param rect Optional output parameter set by the function to the minimum bounding rectangle of the\nrepainted domain.\n@param flags Operation flags. The first 8 bits contain a connectivity value. The default value of\n4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A\nconnectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner)\nwill be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill\nthe mask (the default value is 1). For example, 4 | ( 255 \\<\\< 8 ) will consider 4 nearest\nneighbours and fill the mask with a value of 255. The following additional options occupy higher\nbits and therefore may be further combined with the connectivity and mask fill values using\nbit-wise or (|), see cv::FloodFillFlags.\n\n@note Since the mask is larger than the filled image, a pixel \\f$(x, y)\\f$ in image corresponds to the\npixel \\f$(x+1, y+1)\\f$ in the mask .\n\n@sa findContours\n */\nCV_EXPORTS_W int floodFill( InputOutputArray image, InputOutputArray mask,\n                            Point seedPoint, Scalar newVal, CV_OUT Rect* rect=0,\n                            Scalar loDiff = Scalar(), Scalar upDiff = Scalar(),\n                            int flags = 4 );\n\n/** @brief Converts an image from one color space to another.\n\nThe function converts an input image from one color space to another. In case of a transformation\nto-from RGB color space, the order of the channels should be specified explicitly (RGB or BGR). Note\nthat the default color format in OpenCV is often referred to as RGB but it is actually BGR (the\nbytes are reversed). So the first byte in a standard (24-bit) color image will be an 8-bit Blue\ncomponent, the second byte will be Green, and the third byte will be Red. The fourth, fifth, and\nsixth bytes would then be the second pixel (Blue, then Green, then Red), and so on.\n\nThe conventional ranges for R, G, and B channel values are:\n-   0 to 255 for CV_8U images\n-   0 to 65535 for CV_16U images\n-   0 to 1 for CV_32F images\n\nIn case of linear transformations, the range does not matter. But in case of a non-linear\ntransformation, an input RGB image should be normalized to the proper value range to get the correct\nresults, for example, for RGB \\f$\\rightarrow\\f$ L\\*u\\*v\\* transformation. For example, if you have a\n32-bit floating-point image directly converted from an 8-bit image without any scaling, then it will\nhave the 0..255 value range instead of 0..1 assumed by the function. So, before calling cvtColor ,\nyou need first to scale the image down:\n@code\n    img *= 1./255;\n    cvtColor(img, img, COLOR_BGR2Luv);\n@endcode\nIf you use cvtColor with 8-bit images, the conversion will have some information lost. For many\napplications, this will not be noticeable but it is recommended to use 32-bit images in applications\nthat need the full range of colors or that convert an image before an operation and then convert\nback.\n\nIf conversion adds the alpha channel, its value will set to the maximum of corresponding channel\nrange: 255 for CV_8U, 65535 for CV_16U, 1 for CV_32F.\n\n@param src input image: 8-bit unsigned, 16-bit unsigned ( CV_16UC... ), or single-precision\nfloating-point.\n@param dst output image of the same size and depth as src.\n@param code color space conversion code (see cv::ColorConversionCodes).\n@param dstCn number of channels in the destination image; if the parameter is 0, the number of the\nchannels is derived automatically from src and code.\n\n@see @ref imgproc_color_conversions\n */\nCV_EXPORTS_W void cvtColor( InputArray src, OutputArray dst, int code, int dstCn = 0 );\n\n//! @} imgproc_misc\n\n// main function for all demosaicing procceses\nCV_EXPORTS_W void demosaicing(InputArray _src, OutputArray _dst, int code, int dcn = 0);\n\n//! @addtogroup imgproc_shape\n//! @{\n\n/** @brief Calculates all of the moments up to the third order of a polygon or rasterized shape.\n\nThe function computes moments, up to the 3rd order, of a vector shape or a rasterized shape. The\nresults are returned in the structure cv::Moments.\n\n@param array Raster image (single-channel, 8-bit or floating-point 2D array) or an array (\n\\f$1 \\times N\\f$ or \\f$N \\times 1\\f$ ) of 2D points (Point or Point2f ).\n@param binaryImage If it is true, all non-zero image pixels are treated as 1's. The parameter is\nused for images only.\n@returns moments.\n\n@sa  contourArea, arcLength\n */\nCV_EXPORTS_W Moments moments( InputArray array, bool binaryImage = false );\n\n/** @brief Calculates seven Hu invariants.\n\nThe function calculates seven Hu invariants (introduced in @cite Hu62; see also\n<http://en.wikipedia.org/wiki/Image_moment>) defined as:\n\n\\f[\\begin{array}{l} hu[0]= \\eta _{20}+ \\eta _{02} \\\\ hu[1]=( \\eta _{20}- \\eta _{02})^{2}+4 \\eta _{11}^{2} \\\\ hu[2]=( \\eta _{30}-3 \\eta _{12})^{2}+ (3 \\eta _{21}- \\eta _{03})^{2} \\\\ hu[3]=( \\eta _{30}+ \\eta _{12})^{2}+ ( \\eta _{21}+ \\eta _{03})^{2} \\\\ hu[4]=( \\eta _{30}-3 \\eta _{12})( \\eta _{30}+ \\eta _{12})[( \\eta _{30}+ \\eta _{12})^{2}-3( \\eta _{21}+ \\eta _{03})^{2}]+(3 \\eta _{21}- \\eta _{03})( \\eta _{21}+ \\eta _{03})[3( \\eta _{30}+ \\eta _{12})^{2}-( \\eta _{21}+ \\eta _{03})^{2}] \\\\ hu[5]=( \\eta _{20}- \\eta _{02})[( \\eta _{30}+ \\eta _{12})^{2}- ( \\eta _{21}+ \\eta _{03})^{2}]+4 \\eta _{11}( \\eta _{30}+ \\eta _{12})( \\eta _{21}+ \\eta _{03}) \\\\ hu[6]=(3 \\eta _{21}- \\eta _{03})( \\eta _{21}+ \\eta _{03})[3( \\eta _{30}+ \\eta _{12})^{2}-( \\eta _{21}+ \\eta _{03})^{2}]-( \\eta _{30}-3 \\eta _{12})( \\eta _{21}+ \\eta _{03})[3( \\eta _{30}+ \\eta _{12})^{2}-( \\eta _{21}+ \\eta _{03})^{2}] \\\\ \\end{array}\\f]\n\nwhere \\f$\\eta_{ji}\\f$ stands for \\f$\\texttt{Moments::nu}_{ji}\\f$ .\n\nThese values are proved to be invariants to the image scale, rotation, and reflection except the\nseventh one, whose sign is changed by reflection. This invariance is proved with the assumption of\ninfinite image resolution. In case of raster images, the computed Hu invariants for the original and\ntransformed images are a bit different.\n\n@param moments Input moments computed with moments .\n@param hu Output Hu invariants.\n\n@sa matchShapes\n */\nCV_EXPORTS void HuMoments( const Moments& moments, double hu[7] );\n\n/** @overload */\nCV_EXPORTS_W void HuMoments( const Moments& m, OutputArray hu );\n\n//! @} imgproc_shape\n\n//! @addtogroup imgproc_object\n//! @{\n\n//! type of the template matching operation\nenum TemplateMatchModes {\n    TM_SQDIFF        = 0, //!< \\f[R(x,y)= \\sum _{x',y'} (T(x',y')-I(x+x',y+y'))^2\\f]\n    TM_SQDIFF_NORMED = 1, //!< \\f[R(x,y)= \\frac{\\sum_{x',y'} (T(x',y')-I(x+x',y+y'))^2}{\\sqrt{\\sum_{x',y'}T(x',y')^2 \\cdot \\sum_{x',y'} I(x+x',y+y')^2}}\\f]\n    TM_CCORR         = 2, //!< \\f[R(x,y)= \\sum _{x',y'} (T(x',y')  \\cdot I(x+x',y+y'))\\f]\n    TM_CCORR_NORMED  = 3, //!< \\f[R(x,y)= \\frac{\\sum_{x',y'} (T(x',y') \\cdot I(x+x',y+y'))}{\\sqrt{\\sum_{x',y'}T(x',y')^2 \\cdot \\sum_{x',y'} I(x+x',y+y')^2}}\\f]\n    TM_CCOEFF        = 4, //!< \\f[R(x,y)= \\sum _{x',y'} (T'(x',y')  \\cdot I'(x+x',y+y'))\\f]\n                          //!< where\n                          //!< \\f[\\begin{array}{l} T'(x',y')=T(x',y') - 1/(w  \\cdot h)  \\cdot \\sum _{x'',y''} T(x'',y'') \\\\ I'(x+x',y+y')=I(x+x',y+y') - 1/(w  \\cdot h)  \\cdot \\sum _{x'',y''} I(x+x'',y+y'') \\end{array}\\f]\n    TM_CCOEFF_NORMED = 5  //!< \\f[R(x,y)= \\frac{ \\sum_{x',y'} (T'(x',y') \\cdot I'(x+x',y+y')) }{ \\sqrt{\\sum_{x',y'}T'(x',y')^2 \\cdot \\sum_{x',y'} I'(x+x',y+y')^2} }\\f]\n};\n\n/** @brief Compares a template against overlapped image regions.\n\nThe function slides through image , compares the overlapped patches of size \\f$w \\times h\\f$ against\ntempl using the specified method and stores the comparison results in result . Here are the formulae\nfor the available comparison methods ( \\f$I\\f$ denotes image, \\f$T\\f$ template, \\f$R\\f$ result ). The summation\nis done over template and/or the image patch: \\f$x' = 0...w-1, y' = 0...h-1\\f$\n\nAfter the function finishes the comparison, the best matches can be found as global minimums (when\nTM_SQDIFF was used) or maximums (when TM_CCORR or TM_CCOEFF was used) using the\nminMaxLoc function. In case of a color image, template summation in the numerator and each sum in\nthe denominator is done over all of the channels and separate mean values are used for each channel.\nThat is, the function can take a color template and a color image. The result will still be a\nsingle-channel image, which is easier to analyze.\n\n@param image Image where the search is running. It must be 8-bit or 32-bit floating-point.\n@param templ Searched template. It must be not greater than the source image and have the same\ndata type.\n@param result Map of comparison results. It must be single-channel 32-bit floating-point. If image\nis \\f$W \\times H\\f$ and templ is \\f$w \\times h\\f$ , then result is \\f$(W-w+1) \\times (H-h+1)\\f$ .\n@param method Parameter specifying the comparison method, see cv::TemplateMatchModes\n@param mask Mask of searched template. It must have the same datatype and size with templ. It is\nnot set by default.\n */\nCV_EXPORTS_W void matchTemplate( InputArray image, InputArray templ,\n                                 OutputArray result, int method, InputArray mask = noArray() );\n\n//! @}\n\n//! @addtogroup imgproc_shape\n//! @{\n\n/** @brief computes the connected components labeled image of boolean image\n\nimage with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0\nrepresents the background label. ltype specifies the output label image type, an important\nconsideration based on the total number of labels or alternatively the total number of pixels in\nthe source image.\n\n@param image the image to be labeled\n@param labels destination labeled image\n@param connectivity 8 or 4 for 8-way or 4-way connectivity respectively\n@param ltype output image label type. Currently CV_32S and CV_16U are supported.\n */\nCV_EXPORTS_W int connectedComponents(InputArray image, OutputArray labels,\n                                     int connectivity = 8, int ltype = CV_32S);\n\n/** @overload\n@param image the image to be labeled\n@param labels destination labeled image\n@param stats statistics output for each label, including the background label, see below for\navailable statistics. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of\ncv::ConnectedComponentsTypes\n@param centroids floating point centroid (x,y) output for each label, including the background label\n@param connectivity 8 or 4 for 8-way or 4-way connectivity respectively\n@param ltype output image label type. Currently CV_32S and CV_16U are supported.\n*/\nCV_EXPORTS_W int connectedComponentsWithStats(InputArray image, OutputArray labels,\n                                              OutputArray stats, OutputArray centroids,\n                                              int connectivity = 8, int ltype = CV_32S);\n\n\n/** @brief Finds contours in a binary image.\n\nThe function retrieves contours from the binary image using the algorithm @cite Suzuki85 . The contours\nare a useful tool for shape analysis and object detection and recognition. See squares.c in the\nOpenCV sample directory.\n\n@note Source image is modified by this function. Also, the function does not take into account\n1-pixel border of the image (it's filled with 0's and used for neighbor analysis in the algorithm),\ntherefore the contours touching the image border will be clipped.\n\n@param image Source, an 8-bit single-channel image. Non-zero pixels are treated as 1's. Zero\npixels remain 0's, so the image is treated as binary . You can use compare , inRange , threshold ,\nadaptiveThreshold , Canny , and others to create a binary image out of a grayscale or color one.\nThe function modifies the image while extracting the contours. If mode equals to RETR_CCOMP\nor RETR_FLOODFILL, the input can also be a 32-bit integer image of labels (CV_32SC1).\n@param contours Detected contours. Each contour is stored as a vector of points.\n@param hierarchy Optional output vector, containing information about the image topology. It has\nas many elements as the number of contours. For each i-th contour contours[i] , the elements\nhierarchy[i][0] , hiearchy[i][1] , hiearchy[i][2] , and hiearchy[i][3] are set to 0-based indices\nin contours of the next and previous contours at the same hierarchical level, the first child\ncontour and the parent contour, respectively. If for the contour i there are no next, previous,\nparent, or nested contours, the corresponding elements of hierarchy[i] will be negative.\n@param mode Contour retrieval mode, see cv::RetrievalModes\n@param method Contour approximation method, see cv::ContourApproximationModes\n@param offset Optional offset by which every contour point is shifted. This is useful if the\ncontours are extracted from the image ROI and then they should be analyzed in the whole image\ncontext.\n */\nCV_EXPORTS_W void findContours( InputOutputArray image, OutputArrayOfArrays contours,\n                              OutputArray hierarchy, int mode,\n                              int method, Point offset = Point());\n\n/** @overload */\nCV_EXPORTS void findContours( InputOutputArray image, OutputArrayOfArrays contours,\n                              int mode, int method, Point offset = Point());\n\n/** @brief Approximates a polygonal curve(s) with the specified precision.\n\nThe functions approxPolyDP approximate a curve or a polygon with another curve/polygon with less\nvertices so that the distance between them is less or equal to the specified precision. It uses the\nDouglas-Peucker algorithm <http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm>\n\n@param curve Input vector of a 2D point stored in std::vector or Mat\n@param approxCurve Result of the approximation. The type should match the type of the input curve.\n@param epsilon Parameter specifying the approximation accuracy. This is the maximum distance\nbetween the original curve and its approximation.\n@param closed If true, the approximated curve is closed (its first and last vertices are\nconnected). Otherwise, it is not closed.\n */\nCV_EXPORTS_W void approxPolyDP( InputArray curve,\n                                OutputArray approxCurve,\n                                double epsilon, bool closed );\n\n/** @brief Calculates a contour perimeter or a curve length.\n\nThe function computes a curve length or a closed contour perimeter.\n\n@param curve Input vector of 2D points, stored in std::vector or Mat.\n@param closed Flag indicating whether the curve is closed or not.\n */\nCV_EXPORTS_W double arcLength( InputArray curve, bool closed );\n\n/** @brief Calculates the up-right bounding rectangle of a point set.\n\nThe function calculates and returns the minimal up-right bounding rectangle for the specified point set.\n\n@param points Input 2D point set, stored in std::vector or Mat.\n */\nCV_EXPORTS_W Rect boundingRect( InputArray points );\n\n/** @brief Calculates a contour area.\n\nThe function computes a contour area. Similarly to moments , the area is computed using the Green\nformula. Thus, the returned area and the number of non-zero pixels, if you draw the contour using\ndrawContours or fillPoly , can be different. Also, the function will most certainly give a wrong\nresults for contours with self-intersections.\n\nExample:\n@code\n    vector<Point> contour;\n    contour.push_back(Point2f(0, 0));\n    contour.push_back(Point2f(10, 0));\n    contour.push_back(Point2f(10, 10));\n    contour.push_back(Point2f(5, 4));\n\n    double area0 = contourArea(contour);\n    vector<Point> approx;\n    approxPolyDP(contour, approx, 5, true);\n    double area1 = contourArea(approx);\n\n    cout << \"area0 =\" << area0 << endl <<\n            \"area1 =\" << area1 << endl <<\n            \"approx poly vertices\" << approx.size() << endl;\n@endcode\n@param contour Input vector of 2D points (contour vertices), stored in std::vector or Mat.\n@param oriented Oriented area flag. If it is true, the function returns a signed area value,\ndepending on the contour orientation (clockwise or counter-clockwise). Using this feature you can\ndetermine orientation of a contour by taking the sign of an area. By default, the parameter is\nfalse, which means that the absolute value is returned.\n */\nCV_EXPORTS_W double contourArea( InputArray contour, bool oriented = false );\n\n/** @brief Finds a rotated rectangle of the minimum area enclosing the input 2D point set.\n\nThe function calculates and returns the minimum-area bounding rectangle (possibly rotated) for a\nspecified point set. See the OpenCV sample minarea.cpp . Developer should keep in mind that the\nreturned rotatedRect can contain negative indices when data is close to the containing Mat element\nboundary.\n\n@param points Input vector of 2D points, stored in std::vector\\<\\> or Mat\n */\nCV_EXPORTS_W RotatedRect minAreaRect( InputArray points );\n\n/** @brief Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.\n\nThe function finds the four vertices of a rotated rectangle. This function is useful to draw the\nrectangle. In C++, instead of using this function, you can directly use box.points() method. Please\nvisit the [tutorial on bounding\nrectangle](http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/bounding_rects_circles/bounding_rects_circles.html#bounding-rects-circles)\nfor more information.\n\n@param box The input rotated rectangle. It may be the output of\n@param points The output array of four vertices of rectangles.\n */\nCV_EXPORTS_W void boxPoints(RotatedRect box, OutputArray points);\n\n/** @brief Finds a circle of the minimum area enclosing a 2D point set.\n\nThe function finds the minimal enclosing circle of a 2D point set using an iterative algorithm. See\nthe OpenCV sample minarea.cpp .\n\n@param points Input vector of 2D points, stored in std::vector\\<\\> or Mat\n@param center Output center of the circle.\n@param radius Output radius of the circle.\n */\nCV_EXPORTS_W void minEnclosingCircle( InputArray points,\n                                      CV_OUT Point2f& center, CV_OUT float& radius );\n\n/** @example minarea.cpp\n  */\n\n/** @brief Finds a triangle of minimum area enclosing a 2D point set and returns its area.\n\nThe function finds a triangle of minimum area enclosing the given set of 2D points and returns its\narea. The output for a given 2D point set is shown in the image below. 2D points are depicted in\n*red* and the enclosing triangle in *yellow*.\n\n![Sample output of the minimum enclosing triangle function](pics/minenclosingtriangle.png)\n\nThe implementation of the algorithm is based on O'Rourke's @cite ORourke86 and Klee and Laskowski's\n@cite KleeLaskowski85 papers. O'Rourke provides a \\f$\\theta(n)\\f$ algorithm for finding the minimal\nenclosing triangle of a 2D convex polygon with n vertices. Since the minEnclosingTriangle function\ntakes a 2D point set as input an additional preprocessing step of computing the convex hull of the\n2D point set is required. The complexity of the convexHull function is \\f$O(n log(n))\\f$ which is higher\nthan \\f$\\theta(n)\\f$. Thus the overall complexity of the function is \\f$O(n log(n))\\f$.\n\n@param points Input vector of 2D points with depth CV_32S or CV_32F, stored in std::vector\\<\\> or Mat\n@param triangle Output vector of three 2D points defining the vertices of the triangle. The depth\nof the OutputArray must be CV_32F.\n */\nCV_EXPORTS_W double minEnclosingTriangle( InputArray points, CV_OUT OutputArray triangle );\n\n/** @brief Compares two shapes.\n\nThe function compares two shapes. All three implemented methods use the Hu invariants (see cv::HuMoments)\n\n@param contour1 First contour or grayscale image.\n@param contour2 Second contour or grayscale image.\n@param method Comparison method, see ::ShapeMatchModes\n@param parameter Method-specific parameter (not supported now).\n */\nCV_EXPORTS_W double matchShapes( InputArray contour1, InputArray contour2,\n                                 int method, double parameter );\n\n/** @example convexhull.cpp\nAn example using the convexHull functionality\n*/\n\n/** @brief Finds the convex hull of a point set.\n\nThe functions find the convex hull of a 2D point set using the Sklansky's algorithm @cite Sklansky82\nthat has *O(N logN)* complexity in the current implementation. See the OpenCV sample convexhull.cpp\nthat demonstrates the usage of different function variants.\n\n@param points Input 2D point set, stored in std::vector or Mat.\n@param hull Output convex hull. It is either an integer vector of indices or vector of points. In\nthe first case, the hull elements are 0-based indices of the convex hull points in the original\narray (since the set of convex hull points is a subset of the original point set). In the second\ncase, hull elements are the convex hull points themselves.\n@param clockwise Orientation flag. If it is true, the output convex hull is oriented clockwise.\nOtherwise, it is oriented counter-clockwise. The assumed coordinate system has its X axis pointing\nto the right, and its Y axis pointing upwards.\n@param returnPoints Operation flag. In case of a matrix, when the flag is true, the function\nreturns convex hull points. Otherwise, it returns indices of the convex hull points. When the\noutput array is std::vector, the flag is ignored, and the output depends on the type of the\nvector: std::vector\\<int\\> implies returnPoints=true, std::vector\\<Point\\> implies\nreturnPoints=false.\n */\nCV_EXPORTS_W void convexHull( InputArray points, OutputArray hull,\n                              bool clockwise = false, bool returnPoints = true );\n\n/** @brief Finds the convexity defects of a contour.\n\nThe figure below displays convexity defects of a hand contour:\n\n![image](pics/defects.png)\n\n@param contour Input contour.\n@param convexhull Convex hull obtained using convexHull that should contain indices of the contour\npoints that make the hull.\n@param convexityDefects The output vector of convexity defects. In C++ and the new Python/Java\ninterface each convexity defect is represented as 4-element integer vector (a.k.a. cv::Vec4i):\n(start_index, end_index, farthest_pt_index, fixpt_depth), where indices are 0-based indices\nin the original contour of the convexity defect beginning, end and the farthest point, and\nfixpt_depth is fixed-point approximation (with 8 fractional bits) of the distance between the\nfarthest contour point and the hull. That is, to get the floating-point value of the depth will be\nfixpt_depth/256.0.\n */\nCV_EXPORTS_W void convexityDefects( InputArray contour, InputArray convexhull, OutputArray convexityDefects );\n\n/** @brief Tests a contour convexity.\n\nThe function tests whether the input contour is convex or not. The contour must be simple, that is,\nwithout self-intersections. Otherwise, the function output is undefined.\n\n@param contour Input vector of 2D points, stored in std::vector\\<\\> or Mat\n */\nCV_EXPORTS_W bool isContourConvex( InputArray contour );\n\n//! finds intersection of two convex polygons\nCV_EXPORTS_W float intersectConvexConvex( InputArray _p1, InputArray _p2,\n                                          OutputArray _p12, bool handleNested = true );\n\n/** @example fitellipse.cpp\n  An example using the fitEllipse technique\n*/\n\n/** @brief Fits an ellipse around a set of 2D points.\n\nThe function calculates the ellipse that fits (in a least-squares sense) a set of 2D points best of\nall. It returns the rotated rectangle in which the ellipse is inscribed. The first algorithm described by @cite Fitzgibbon95\nis used. Developer should keep in mind that it is possible that the returned\nellipse/rotatedRect data contains negative indices, due to the data points being close to the\nborder of the containing Mat element.\n\n@param points Input 2D point set, stored in std::vector\\<\\> or Mat\n */\nCV_EXPORTS_W RotatedRect fitEllipse( InputArray points );\n\n/** @brief Fits a line to a 2D or 3D point set.\n\nThe function fitLine fits a line to a 2D or 3D point set by minimizing \\f$\\sum_i \\rho(r_i)\\f$ where\n\\f$r_i\\f$ is a distance between the \\f$i^{th}\\f$ point, the line and \\f$\\rho(r)\\f$ is a distance function, one\nof the following:\n-  DIST_L2\n\\f[\\rho (r) = r^2/2  \\quad \\text{(the simplest and the fastest least-squares method)}\\f]\n- DIST_L1\n\\f[\\rho (r) = r\\f]\n- DIST_L12\n\\f[\\rho (r) = 2  \\cdot ( \\sqrt{1 + \\frac{r^2}{2}} - 1)\\f]\n- DIST_FAIR\n\\f[\\rho \\left (r \\right ) = C^2  \\cdot \\left (  \\frac{r}{C} -  \\log{\\left(1 + \\frac{r}{C}\\right)} \\right )  \\quad \\text{where} \\quad C=1.3998\\f]\n- DIST_WELSCH\n\\f[\\rho \\left (r \\right ) =  \\frac{C^2}{2} \\cdot \\left ( 1 -  \\exp{\\left(-\\left(\\frac{r}{C}\\right)^2\\right)} \\right )  \\quad \\text{where} \\quad C=2.9846\\f]\n- DIST_HUBER\n\\f[\\rho (r) =  \\fork{r^2/2}{if \\(r < C\\)}{C \\cdot (r-C/2)}{otherwise} \\quad \\text{where} \\quad C=1.345\\f]\n\nThe algorithm is based on the M-estimator ( <http://en.wikipedia.org/wiki/M-estimator> ) technique\nthat iteratively fits the line using the weighted least-squares algorithm. After each iteration the\nweights \\f$w_i\\f$ are adjusted to be inversely proportional to \\f$\\rho(r_i)\\f$ .\n\n@param points Input vector of 2D or 3D points, stored in std::vector\\<\\> or Mat.\n@param line Output line parameters. In case of 2D fitting, it should be a vector of 4 elements\n(like Vec4f) - (vx, vy, x0, y0), where (vx, vy) is a normalized vector collinear to the line and\n(x0, y0) is a point on the line. In case of 3D fitting, it should be a vector of 6 elements (like\nVec6f) - (vx, vy, vz, x0, y0, z0), where (vx, vy, vz) is a normalized vector collinear to the line\nand (x0, y0, z0) is a point on the line.\n@param distType Distance used by the M-estimator, see cv::DistanceTypes\n@param param Numerical parameter ( C ) for some types of distances. If it is 0, an optimal value\nis chosen.\n@param reps Sufficient accuracy for the radius (distance between the coordinate origin and the line).\n@param aeps Sufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps.\n */\nCV_EXPORTS_W void fitLine( InputArray points, OutputArray line, int distType,\n                           double param, double reps, double aeps );\n\n/** @brief Performs a point-in-contour test.\n\nThe function determines whether the point is inside a contour, outside, or lies on an edge (or\ncoincides with a vertex). It returns positive (inside), negative (outside), or zero (on an edge)\nvalue, correspondingly. When measureDist=false , the return value is +1, -1, and 0, respectively.\nOtherwise, the return value is a signed distance between the point and the nearest contour edge.\n\nSee below a sample output of the function where each image pixel is tested against the contour:\n\n![sample output](pics/pointpolygon.png)\n\n@param contour Input contour.\n@param pt Point tested against the contour.\n@param measureDist If true, the function estimates the signed distance from the point to the\nnearest contour edge. Otherwise, the function only checks if the point is inside a contour or not.\n */\nCV_EXPORTS_W double pointPolygonTest( InputArray contour, Point2f pt, bool measureDist );\n\n/** @brief Finds out if there is any intersection between two rotated rectangles.\n\nIf there is then the vertices of the interesecting region are returned as well.\n\nBelow are some examples of intersection configurations. The hatched pattern indicates the\nintersecting region and the red vertices are returned by the function.\n\n![intersection examples](pics/intersection.png)\n\n@param rect1 First rectangle\n@param rect2 Second rectangle\n@param intersectingRegion The output array of the verticies of the intersecting region. It returns\nat most 8 vertices. Stored as std::vector\\<cv::Point2f\\> or cv::Mat as Mx1 of type CV_32FC2.\n@returns One of cv::RectanglesIntersectTypes\n */\nCV_EXPORTS_W int rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, OutputArray intersectingRegion  );\n\n//! @} imgproc_shape\n\nCV_EXPORTS_W Ptr<CLAHE> createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8));\n\n//! Ballard, D.H. (1981). Generalizing the Hough transform to detect arbitrary shapes. Pattern Recognition 13 (2): 111-122.\n//! Detects position only without traslation and rotation\nCV_EXPORTS Ptr<GeneralizedHoughBallard> createGeneralizedHoughBallard();\n\n//! Guil, N., González-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038.\n//! Detects position, traslation and rotation\nCV_EXPORTS Ptr<GeneralizedHoughGuil> createGeneralizedHoughGuil();\n\n//! Performs linear blending of two images\nCV_EXPORTS void blendLinear(InputArray src1, InputArray src2, InputArray weights1, InputArray weights2, OutputArray dst);\n\n//! @addtogroup imgproc_colormap\n//! @{\n\n//! GNU Octave/MATLAB equivalent colormaps\nenum ColormapTypes\n{\n    COLORMAP_AUTUMN = 0, //!< ![autumn](pics/colormaps/colorscale_autumn.jpg)\n    COLORMAP_BONE = 1, //!< ![bone](pics/colormaps/colorscale_bone.jpg)\n    COLORMAP_JET = 2, //!< ![jet](pics/colormaps/colorscale_jet.jpg)\n    COLORMAP_WINTER = 3, //!< ![winter](pics/colormaps/colorscale_winter.jpg)\n    COLORMAP_RAINBOW = 4, //!< ![rainbow](pics/colormaps/colorscale_rainbow.jpg)\n    COLORMAP_OCEAN = 5, //!< ![ocean](pics/colormaps/colorscale_ocean.jpg)\n    COLORMAP_SUMMER = 6, //!< ![summer](pics/colormaps/colorscale_summer.jpg)\n    COLORMAP_SPRING = 7, //!< ![spring](pics/colormaps/colorscale_spring.jpg)\n    COLORMAP_COOL = 8, //!< ![cool](pics/colormaps/colorscale_cool.jpg)\n    COLORMAP_HSV = 9, //!< ![HSV](pics/colormaps/colorscale_hsv.jpg)\n    COLORMAP_PINK = 10, //!< ![pink](pics/colormaps/colorscale_pink.jpg)\n    COLORMAP_HOT = 11, //!< ![hot](pics/colormaps/colorscale_hot.jpg)\n    COLORMAP_PARULA = 12 //!< ![hot](pics/colormaps/colorscale_parula.jpg)\n};\n\n/** @brief Applies a GNU Octave/MATLAB equivalent colormap on a given image.\n\n@param src The source image, grayscale or colored does not matter.\n@param dst The result is the colormapped source image. Note: Mat::create is called on dst.\n@param colormap The colormap to apply, see cv::ColormapTypes\n */\nCV_EXPORTS_W void applyColorMap(InputArray src, OutputArray dst, int colormap);\n\n//! @} imgproc_colormap\n\n//! @addtogroup imgproc_draw\n//! @{\n\n/** @brief Draws a line segment connecting two points.\n\nThe function line draws the line segment between pt1 and pt2 points in the image. The line is\nclipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected\nor 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased\nlines are drawn using Gaussian filtering.\n\n@param img Image.\n@param pt1 First point of the line segment.\n@param pt2 Second point of the line segment.\n@param color Line color.\n@param thickness Line thickness.\n@param lineType Type of the line, see cv::LineTypes.\n@param shift Number of fractional bits in the point coordinates.\n */\nCV_EXPORTS_W void line(InputOutputArray img, Point pt1, Point pt2, const Scalar& color,\n                     int thickness = 1, int lineType = LINE_8, int shift = 0);\n\n/** @brief Draws a arrow segment pointing from the first point to the second one.\n\nThe function arrowedLine draws an arrow between pt1 and pt2 points in the image. See also cv::line.\n\n@param img Image.\n@param pt1 The point the arrow starts from.\n@param pt2 The point the arrow points to.\n@param color Line color.\n@param thickness Line thickness.\n@param line_type Type of the line, see cv::LineTypes\n@param shift Number of fractional bits in the point coordinates.\n@param tipLength The length of the arrow tip in relation to the arrow length\n */\nCV_EXPORTS_W void arrowedLine(InputOutputArray img, Point pt1, Point pt2, const Scalar& color,\n                     int thickness=1, int line_type=8, int shift=0, double tipLength=0.1);\n\n/** @brief Draws a simple, thick, or filled up-right rectangle.\n\nThe function rectangle draws a rectangle outline or a filled rectangle whose two opposite corners\nare pt1 and pt2.\n\n@param img Image.\n@param pt1 Vertex of the rectangle.\n@param pt2 Vertex of the rectangle opposite to pt1 .\n@param color Rectangle color or brightness (grayscale image).\n@param thickness Thickness of lines that make up the rectangle. Negative values, like CV_FILLED ,\nmean that the function has to draw a filled rectangle.\n@param lineType Type of the line. See the line description.\n@param shift Number of fractional bits in the point coordinates.\n */\nCV_EXPORTS_W void rectangle(InputOutputArray img, Point pt1, Point pt2,\n                          const Scalar& color, int thickness = 1,\n                          int lineType = LINE_8, int shift = 0);\n\n/** @overload\n\nuse `rec` parameter as alternative specification of the drawn rectangle: `r.tl() and\nr.br()-Point(1,1)` are opposite corners\n*/\nCV_EXPORTS void rectangle(CV_IN_OUT Mat& img, Rect rec,\n                          const Scalar& color, int thickness = 1,\n                          int lineType = LINE_8, int shift = 0);\n\n/** @brief Draws a circle.\n\nThe function circle draws a simple or filled circle with a given center and radius.\n@param img Image where the circle is drawn.\n@param center Center of the circle.\n@param radius Radius of the circle.\n@param color Circle color.\n@param thickness Thickness of the circle outline, if positive. Negative thickness means that a\nfilled circle is to be drawn.\n@param lineType Type of the circle boundary. See the line description.\n@param shift Number of fractional bits in the coordinates of the center and in the radius value.\n */\nCV_EXPORTS_W void circle(InputOutputArray img, Point center, int radius,\n                       const Scalar& color, int thickness = 1,\n                       int lineType = LINE_8, int shift = 0);\n\n/** @brief Draws a simple or thick elliptic arc or fills an ellipse sector.\n\nThe functions ellipse with less parameters draw an ellipse outline, a filled ellipse, an elliptic\narc, or a filled ellipse sector. A piecewise-linear curve is used to approximate the elliptic arc\nboundary. If you need more control of the ellipse rendering, you can retrieve the curve using\nellipse2Poly and then render it with polylines or fill it with fillPoly . If you use the first\nvariant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and\nendAngle=360 . The figure below explains the meaning of the parameters.\n\n![Parameters of Elliptic Arc](pics/ellipse.png)\n\n@param img Image.\n@param center Center of the ellipse.\n@param axes Half of the size of the ellipse main axes.\n@param angle Ellipse rotation angle in degrees.\n@param startAngle Starting angle of the elliptic arc in degrees.\n@param endAngle Ending angle of the elliptic arc in degrees.\n@param color Ellipse color.\n@param thickness Thickness of the ellipse arc outline, if positive. Otherwise, this indicates that\na filled ellipse sector is to be drawn.\n@param lineType Type of the ellipse boundary. See the line description.\n@param shift Number of fractional bits in the coordinates of the center and values of axes.\n */\nCV_EXPORTS_W void ellipse(InputOutputArray img, Point center, Size axes,\n                        double angle, double startAngle, double endAngle,\n                        const Scalar& color, int thickness = 1,\n                        int lineType = LINE_8, int shift = 0);\n\n/** @overload\n@param img Image.\n@param box Alternative ellipse representation via RotatedRect. This means that the function draws\nan ellipse inscribed in the rotated rectangle.\n@param color Ellipse color.\n@param thickness Thickness of the ellipse arc outline, if positive. Otherwise, this indicates that\na filled ellipse sector is to be drawn.\n@param lineType Type of the ellipse boundary. See the line description.\n*/\nCV_EXPORTS_W void ellipse(InputOutputArray img, const RotatedRect& box, const Scalar& color,\n                        int thickness = 1, int lineType = LINE_8);\n\n/** @overload */\nCV_EXPORTS void fillConvexPoly(Mat& img, const Point* pts, int npts,\n                               const Scalar& color, int lineType = LINE_8,\n                               int shift = 0);\n\n/** @brief Fills a convex polygon.\n\nThe function fillConvexPoly draws a filled convex polygon. This function is much faster than the\nfunction cv::fillPoly . It can fill not only convex polygons but any monotonic polygon without\nself-intersections, that is, a polygon whose contour intersects every horizontal line (scan line)\ntwice at the most (though, its top-most and/or the bottom edge could be horizontal).\n\n@param img Image.\n@param points Polygon vertices.\n@param color Polygon color.\n@param lineType Type of the polygon boundaries. See the line description.\n@param shift Number of fractional bits in the vertex coordinates.\n */\nCV_EXPORTS_W void fillConvexPoly(InputOutputArray img, InputArray points,\n                                 const Scalar& color, int lineType = LINE_8,\n                                 int shift = 0);\n\n/** @overload */\nCV_EXPORTS void fillPoly(Mat& img, const Point** pts,\n                         const int* npts, int ncontours,\n                         const Scalar& color, int lineType = LINE_8, int shift = 0,\n                         Point offset = Point() );\n\n/** @brief Fills the area bounded by one or more polygons.\n\nThe function fillPoly fills an area bounded by several polygonal contours. The function can fill\ncomplex areas, for example, areas with holes, contours with self-intersections (some of their\nparts), and so forth.\n\n@param img Image.\n@param pts Array of polygons where each polygon is represented as an array of points.\n@param color Polygon color.\n@param lineType Type of the polygon boundaries. See the line description.\n@param shift Number of fractional bits in the vertex coordinates.\n@param offset Optional offset of all points of the contours.\n */\nCV_EXPORTS_W void fillPoly(InputOutputArray img, InputArrayOfArrays pts,\n                           const Scalar& color, int lineType = LINE_8, int shift = 0,\n                           Point offset = Point() );\n\n/** @overload */\nCV_EXPORTS void polylines(Mat& img, const Point* const* pts, const int* npts,\n                          int ncontours, bool isClosed, const Scalar& color,\n                          int thickness = 1, int lineType = LINE_8, int shift = 0 );\n\n/** @brief Draws several polygonal curves.\n\n@param img Image.\n@param pts Array of polygonal curves.\n@param isClosed Flag indicating whether the drawn polylines are closed or not. If they are closed,\nthe function draws a line from the last vertex of each curve to its first vertex.\n@param color Polyline color.\n@param thickness Thickness of the polyline edges.\n@param lineType Type of the line segments. See the line description.\n@param shift Number of fractional bits in the vertex coordinates.\n\nThe function polylines draws one or more polygonal curves.\n */\nCV_EXPORTS_W void polylines(InputOutputArray img, InputArrayOfArrays pts,\n                            bool isClosed, const Scalar& color,\n                            int thickness = 1, int lineType = LINE_8, int shift = 0 );\n\n/** @example contours2.cpp\n  An example using the drawContour functionality\n*/\n\n/** @example segment_objects.cpp\nAn example using drawContours to clean up a background segmentation result\n */\n\n/** @brief Draws contours outlines or filled contours.\n\nThe function draws contour outlines in the image if \\f$\\texttt{thickness} \\ge 0\\f$ or fills the area\nbounded by the contours if \\f$\\texttt{thickness}<0\\f$ . The example below shows how to retrieve\nconnected components from the binary image and label them: :\n@code\n    #include \"opencv2/imgproc.hpp\"\n    #include \"opencv2/highgui.hpp\"\n\n    using namespace cv;\n    using namespace std;\n\n    int main( int argc, char** argv )\n    {\n        Mat src;\n        // the first command-line parameter must be a filename of the binary\n        // (black-n-white) image\n        if( argc != 2 || !(src=imread(argv[1], 0)).data)\n            return -1;\n\n        Mat dst = Mat::zeros(src.rows, src.cols, CV_8UC3);\n\n        src = src > 1;\n        namedWindow( \"Source\", 1 );\n        imshow( \"Source\", src );\n\n        vector<vector<Point> > contours;\n        vector<Vec4i> hierarchy;\n\n        findContours( src, contours, hierarchy,\n            RETR_CCOMP, CHAIN_APPROX_SIMPLE );\n\n        // iterate through all the top-level contours,\n        // draw each connected component with its own random color\n        int idx = 0;\n        for( ; idx >= 0; idx = hierarchy[idx][0] )\n        {\n            Scalar color( rand()&255, rand()&255, rand()&255 );\n            drawContours( dst, contours, idx, color, FILLED, 8, hierarchy );\n        }\n\n        namedWindow( \"Components\", 1 );\n        imshow( \"Components\", dst );\n        waitKey(0);\n    }\n@endcode\n\n@param image Destination image.\n@param contours All the input contours. Each contour is stored as a point vector.\n@param contourIdx Parameter indicating a contour to draw. If it is negative, all the contours are drawn.\n@param color Color of the contours.\n@param thickness Thickness of lines the contours are drawn with. If it is negative (for example,\nthickness=CV_FILLED ), the contour interiors are drawn.\n@param lineType Line connectivity. See cv::LineTypes.\n@param hierarchy Optional information about hierarchy. It is only needed if you want to draw only\nsome of the contours (see maxLevel ).\n@param maxLevel Maximal level for drawn contours. If it is 0, only the specified contour is drawn.\nIf it is 1, the function draws the contour(s) and all the nested contours. If it is 2, the function\ndraws the contours, all the nested contours, all the nested-to-nested contours, and so on. This\nparameter is only taken into account when there is hierarchy available.\n@param offset Optional contour shift parameter. Shift all the drawn contours by the specified\n\\f$\\texttt{offset}=(dx,dy)\\f$ .\n */\nCV_EXPORTS_W void drawContours( InputOutputArray image, InputArrayOfArrays contours,\n                              int contourIdx, const Scalar& color,\n                              int thickness = 1, int lineType = LINE_8,\n                              InputArray hierarchy = noArray(),\n                              int maxLevel = INT_MAX, Point offset = Point() );\n\n/** @brief Clips the line against the image rectangle.\n\nThe functions clipLine calculate a part of the line segment that is entirely within the specified\nrectangle. They return false if the line segment is completely outside the rectangle. Otherwise,\nthey return true .\n@param imgSize Image size. The image rectangle is Rect(0, 0, imgSize.width, imgSize.height) .\n@param pt1 First line point.\n@param pt2 Second line point.\n */\nCV_EXPORTS bool clipLine(Size imgSize, CV_IN_OUT Point& pt1, CV_IN_OUT Point& pt2);\n\n/** @overload\n@param imgRect Image rectangle.\n@param pt1 First line point.\n@param pt2 Second line point.\n*/\nCV_EXPORTS_W bool clipLine(Rect imgRect, CV_OUT CV_IN_OUT Point& pt1, CV_OUT CV_IN_OUT Point& pt2);\n\n/** @brief Approximates an elliptic arc with a polyline.\n\nThe function ellipse2Poly computes the vertices of a polyline that approximates the specified\nelliptic arc. It is used by cv::ellipse.\n\n@param center Center of the arc.\n@param axes Half of the size of the ellipse main axes. See the ellipse for details.\n@param angle Rotation angle of the ellipse in degrees. See the ellipse for details.\n@param arcStart Starting angle of the elliptic arc in degrees.\n@param arcEnd Ending angle of the elliptic arc in degrees.\n@param delta Angle between the subsequent polyline vertices. It defines the approximation\naccuracy.\n@param pts Output vector of polyline vertices.\n */\nCV_EXPORTS_W void ellipse2Poly( Point center, Size axes, int angle,\n                                int arcStart, int arcEnd, int delta,\n                                CV_OUT std::vector<Point>& pts );\n\n/** @brief Draws a text string.\n\nThe function putText renders the specified text string in the image. Symbols that cannot be rendered\nusing the specified font are replaced by question marks. See getTextSize for a text rendering code\nexample.\n\n@param img Image.\n@param text Text string to be drawn.\n@param org Bottom-left corner of the text string in the image.\n@param fontFace Font type, see cv::HersheyFonts.\n@param fontScale Font scale factor that is multiplied by the font-specific base size.\n@param color Text color.\n@param thickness Thickness of the lines used to draw a text.\n@param lineType Line type. See the line for details.\n@param bottomLeftOrigin When true, the image data origin is at the bottom-left corner. Otherwise,\nit is at the top-left corner.\n */\nCV_EXPORTS_W void putText( InputOutputArray img, const String& text, Point org,\n                         int fontFace, double fontScale, Scalar color,\n                         int thickness = 1, int lineType = LINE_8,\n                         bool bottomLeftOrigin = false );\n\n/** @brief Calculates the width and height of a text string.\n\nThe function getTextSize calculates and returns the size of a box that contains the specified text.\nThat is, the following code renders some text, the tight box surrounding it, and the baseline: :\n@code\n    String text = \"Funny text inside the box\";\n    int fontFace = FONT_HERSHEY_SCRIPT_SIMPLEX;\n    double fontScale = 2;\n    int thickness = 3;\n\n    Mat img(600, 800, CV_8UC3, Scalar::all(0));\n\n    int baseline=0;\n    Size textSize = getTextSize(text, fontFace,\n                                fontScale, thickness, &baseline);\n    baseline += thickness;\n\n    // center the text\n    Point textOrg((img.cols - textSize.width)/2,\n                  (img.rows + textSize.height)/2);\n\n    // draw the box\n    rectangle(img, textOrg + Point(0, baseline),\n              textOrg + Point(textSize.width, -textSize.height),\n              Scalar(0,0,255));\n    // ... and the baseline first\n    line(img, textOrg + Point(0, thickness),\n         textOrg + Point(textSize.width, thickness),\n         Scalar(0, 0, 255));\n\n    // then put the text itself\n    putText(img, text, textOrg, fontFace, fontScale,\n            Scalar::all(255), thickness, 8);\n@endcode\n\n@param text Input text string.\n@param fontFace Font to use, see cv::HersheyFonts.\n@param fontScale Font scale factor that is multiplied by the font-specific base size.\n@param thickness Thickness of lines used to render the text. See putText for details.\n@param[out] baseLine y-coordinate of the baseline relative to the bottom-most text\npoint.\n@return The size of a box that contains the specified text.\n\n@see cv::putText\n */\nCV_EXPORTS_W Size getTextSize(const String& text, int fontFace,\n                            double fontScale, int thickness,\n                            CV_OUT int* baseLine);\n\n/** @brief Line iterator\n\nThe class is used to iterate over all the pixels on the raster line\nsegment connecting two specified points.\n\nThe class LineIterator is used to get each pixel of a raster line. It\ncan be treated as versatile implementation of the Bresenham algorithm\nwhere you can stop at each pixel and do some extra processing, for\nexample, grab pixel values along the line or draw a line with an effect\n(for example, with XOR operation).\n\nThe number of pixels along the line is stored in LineIterator::count.\nThe method LineIterator::pos returns the current position in the image:\n\n@code{.cpp}\n// grabs pixels along the line (pt1, pt2)\n// from 8-bit 3-channel image to the buffer\nLineIterator it(img, pt1, pt2, 8);\nLineIterator it2 = it;\nvector<Vec3b> buf(it.count);\n\nfor(int i = 0; i < it.count; i++, ++it)\n    buf[i] = *(const Vec3b)*it;\n\n// alternative way of iterating through the line\nfor(int i = 0; i < it2.count; i++, ++it2)\n{\n    Vec3b val = img.at<Vec3b>(it2.pos());\n    CV_Assert(buf[i] == val);\n}\n@endcode\n*/\nclass CV_EXPORTS LineIterator\n{\npublic:\n    /** @brief intializes the iterator\n\n    creates iterators for the line connecting pt1 and pt2\n    the line will be clipped on the image boundaries\n    the line is 8-connected or 4-connected\n    If leftToRight=true, then the iteration is always done\n    from the left-most point to the right most,\n    not to depend on the ordering of pt1 and pt2 parameters\n    */\n    LineIterator( const Mat& img, Point pt1, Point pt2,\n                  int connectivity = 8, bool leftToRight = false );\n    /** @brief returns pointer to the current pixel\n    */\n    uchar* operator *();\n    /** @brief prefix increment operator (++it). shifts iterator to the next pixel\n    */\n    LineIterator& operator ++();\n    /** @brief postfix increment operator (it++). shifts iterator to the next pixel\n    */\n    LineIterator operator ++(int);\n    /** @brief returns coordinates of the current pixel\n    */\n    Point pos() const;\n\n    uchar* ptr;\n    const uchar* ptr0;\n    int step, elemSize;\n    int err, count;\n    int minusDelta, plusDelta;\n    int minusStep, plusStep;\n};\n\n//! @cond IGNORED\n\n// === LineIterator implementation ===\n\ninline\nuchar* LineIterator::operator *()\n{\n    return ptr;\n}\n\ninline\nLineIterator& LineIterator::operator ++()\n{\n    int mask = err < 0 ? -1 : 0;\n    err += minusDelta + (plusDelta & mask);\n    ptr += minusStep + (plusStep & mask);\n    return *this;\n}\n\ninline\nLineIterator LineIterator::operator ++(int)\n{\n    LineIterator it = *this;\n    ++(*this);\n    return it;\n}\n\ninline\nPoint LineIterator::pos() const\n{\n    Point p;\n    p.y = (int)((ptr - ptr0)/step);\n    p.x = (int)(((ptr - ptr0) - p.y*step)/elemSize);\n    return p;\n}\n\n//! @endcond\n\n//! @} imgproc_draw\n\n//! @} imgproc\n\n} // cv\n\n#ifndef DISABLE_OPENCV_24_COMPATIBILITY\n#include \"opencv2/imgproc/imgproc_c.h\"\n#endif\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/ml/ml.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/ml.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/ml.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000, Intel Corporation, all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Copyright (C) 2014, Itseez Inc, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_ML_HPP__\n#define __OPENCV_ML_HPP__\n\n#ifdef __cplusplus\n#  include \"opencv2/core.hpp\"\n#endif\n\n#ifdef __cplusplus\n\n#include <float.h>\n#include <map>\n#include <iostream>\n\n/**\n  @defgroup ml Machine Learning\n\n  The Machine Learning Library (MLL) is a set of classes and functions for statistical\n  classification, regression, and clustering of data.\n\n  Most of the classification and regression algorithms are implemented as C++ classes. As the\n  algorithms have different sets of features (like an ability to handle missing measurements or\n  categorical input variables), there is a little common ground between the classes. This common\n  ground is defined by the class cv::ml::StatModel that all the other ML classes are derived from.\n\n  See detailed overview here: @ref ml_intro.\n */\n\nnamespace cv\n{\n\nnamespace ml\n{\n\n//! @addtogroup ml\n//! @{\n\n/** @brief Variable types */\nenum VariableTypes\n{\n    VAR_NUMERICAL    =0, //!< same as VAR_ORDERED\n    VAR_ORDERED      =0, //!< ordered variables\n    VAR_CATEGORICAL  =1  //!< categorical variables\n};\n\n/** @brief %Error types */\nenum ErrorTypes\n{\n    TEST_ERROR = 0,\n    TRAIN_ERROR = 1\n};\n\n/** @brief Sample types */\nenum SampleTypes\n{\n    ROW_SAMPLE = 0, //!< each training sample is a row of samples\n    COL_SAMPLE = 1  //!< each training sample occupies a column of samples\n};\n\n/** @brief The structure represents the logarithmic grid range of statmodel parameters.\n\nIt is used for optimizing statmodel accuracy by varying model parameters, the accuracy estimate\nbeing computed by cross-validation.\n */\nclass CV_EXPORTS ParamGrid\n{\npublic:\n    /** @brief Default constructor */\n    ParamGrid();\n    /** @brief Constructor with parameters */\n    ParamGrid(double _minVal, double _maxVal, double _logStep);\n\n    double minVal; //!< Minimum value of the statmodel parameter. Default value is 0.\n    double maxVal; //!< Maximum value of the statmodel parameter. Default value is 0.\n    /** @brief Logarithmic step for iterating the statmodel parameter.\n\n    The grid determines the following iteration sequence of the statmodel parameter values:\n    \\f[(minVal, minVal*step, minVal*{step}^2, \\dots,  minVal*{logStep}^n),\\f]\n    where \\f$n\\f$ is the maximal index satisfying\n    \\f[\\texttt{minVal} * \\texttt{logStep} ^n <  \\texttt{maxVal}\\f]\n    The grid is logarithmic, so logStep must always be greater then 1. Default value is 1.\n    */\n    double logStep;\n};\n\n/** @brief Class encapsulating training data.\n\nPlease note that the class only specifies the interface of training data, but not implementation.\nAll the statistical model classes in _ml_ module accepts Ptr\\<TrainData\\> as parameter. In other\nwords, you can create your own class derived from TrainData and pass smart pointer to the instance\nof this class into StatModel::train.\n\n@sa @ref ml_intro_data\n */\nclass CV_EXPORTS_W TrainData\n{\npublic:\n    static inline float missingValue() { return FLT_MAX; }\n    virtual ~TrainData();\n\n    CV_WRAP virtual int getLayout() const = 0;\n    CV_WRAP virtual int getNTrainSamples() const = 0;\n    CV_WRAP virtual int getNTestSamples() const = 0;\n    CV_WRAP virtual int getNSamples() const = 0;\n    CV_WRAP virtual int getNVars() const = 0;\n    CV_WRAP virtual int getNAllVars() const = 0;\n\n    CV_WRAP virtual void getSample(InputArray varIdx, int sidx, float* buf) const = 0;\n    CV_WRAP virtual Mat getSamples() const = 0;\n    CV_WRAP virtual Mat getMissing() const = 0;\n\n    /** @brief Returns matrix of train samples\n\n    @param layout The requested layout. If it's different from the initial one, the matrix is\n        transposed. See ml::SampleTypes.\n    @param compressSamples if true, the function returns only the training samples (specified by\n        sampleIdx)\n    @param compressVars if true, the function returns the shorter training samples, containing only\n        the active variables.\n\n    In current implementation the function tries to avoid physical data copying and returns the\n    matrix stored inside TrainData (unless the transposition or compression is needed).\n     */\n    CV_WRAP virtual Mat getTrainSamples(int layout=ROW_SAMPLE,\n                                bool compressSamples=true,\n                                bool compressVars=true) const = 0;\n\n    /** @brief Returns the vector of responses\n\n    The function returns ordered or the original categorical responses. Usually it's used in\n    regression algorithms.\n     */\n    CV_WRAP virtual Mat getTrainResponses() const = 0;\n\n    /** @brief Returns the vector of normalized categorical responses\n\n    The function returns vector of responses. Each response is integer from `0` to `<number of\n    classes>-1`. The actual label value can be retrieved then from the class label vector, see\n    TrainData::getClassLabels.\n     */\n    CV_WRAP virtual Mat getTrainNormCatResponses() const = 0;\n    CV_WRAP virtual Mat getTestResponses() const = 0;\n    CV_WRAP virtual Mat getTestNormCatResponses() const = 0;\n    CV_WRAP virtual Mat getResponses() const = 0;\n    CV_WRAP virtual Mat getNormCatResponses() const = 0;\n    CV_WRAP virtual Mat getSampleWeights() const = 0;\n    CV_WRAP virtual Mat getTrainSampleWeights() const = 0;\n    CV_WRAP virtual Mat getTestSampleWeights() const = 0;\n    CV_WRAP virtual Mat getVarIdx() const = 0;\n    CV_WRAP virtual Mat getVarType() const = 0;\n    CV_WRAP virtual int getResponseType() const = 0;\n    CV_WRAP virtual Mat getTrainSampleIdx() const = 0;\n    CV_WRAP virtual Mat getTestSampleIdx() const = 0;\n    CV_WRAP virtual void getValues(int vi, InputArray sidx, float* values) const = 0;\n    virtual void getNormCatValues(int vi, InputArray sidx, int* values) const = 0;\n    CV_WRAP virtual Mat getDefaultSubstValues() const = 0;\n\n    CV_WRAP virtual int getCatCount(int vi) const = 0;\n\n    /** @brief Returns the vector of class labels\n\n    The function returns vector of unique labels occurred in the responses.\n     */\n    CV_WRAP virtual Mat getClassLabels() const = 0;\n\n    CV_WRAP virtual Mat getCatOfs() const = 0;\n    CV_WRAP virtual Mat getCatMap() const = 0;\n\n    /** @brief Splits the training data into the training and test parts\n    @sa TrainData::setTrainTestSplitRatio\n     */\n    CV_WRAP virtual void setTrainTestSplit(int count, bool shuffle=true) = 0;\n\n    /** @brief Splits the training data into the training and test parts\n\n    The function selects a subset of specified relative size and then returns it as the training\n    set. If the function is not called, all the data is used for training. Please, note that for\n    each of TrainData::getTrain\\* there is corresponding TrainData::getTest\\*, so that the test\n    subset can be retrieved and processed as well.\n    @sa TrainData::setTrainTestSplit\n     */\n    CV_WRAP virtual void setTrainTestSplitRatio(double ratio, bool shuffle=true) = 0;\n    CV_WRAP virtual void shuffleTrainTest() = 0;\n\n    CV_WRAP static Mat getSubVector(const Mat& vec, const Mat& idx);\n\n    /** @brief Reads the dataset from a .csv file and returns the ready-to-use training data.\n\n    @param filename The input file name\n    @param headerLineCount The number of lines in the beginning to skip; besides the header, the\n        function also skips empty lines and lines staring with `#`\n    @param responseStartIdx Index of the first output variable. If -1, the function considers the\n        last variable as the response\n    @param responseEndIdx Index of the last output variable + 1. If -1, then there is single\n        response variable at responseStartIdx.\n    @param varTypeSpec The optional text string that specifies the variables' types. It has the\n        format `ord[n1-n2,n3,n4-n5,...]cat[n6,n7-n8,...]`. That is, variables from `n1 to n2`\n        (inclusive range), `n3`, `n4 to n5` ... are considered ordered and `n6`, `n7 to n8` ... are\n        considered as categorical. The range `[n1..n2] + [n3] + [n4..n5] + ... + [n6] + [n7..n8]`\n        should cover all the variables. If varTypeSpec is not specified, then algorithm uses the\n        following rules:\n        - all input variables are considered ordered by default. If some column contains has non-\n          numerical values, e.g. 'apple', 'pear', 'apple', 'apple', 'mango', the corresponding\n          variable is considered categorical.\n        - if there are several output variables, they are all considered as ordered. Error is\n          reported when non-numerical values are used.\n        - if there is a single output variable, then if its values are non-numerical or are all\n          integers, then it's considered categorical. Otherwise, it's considered ordered.\n    @param delimiter The character used to separate values in each line.\n    @param missch The character used to specify missing measurements. It should not be a digit.\n        Although it's a non-numerical value, it surely does not affect the decision of whether the\n        variable ordered or categorical.\n     */\n    static Ptr<TrainData> loadFromCSV(const String& filename,\n                                      int headerLineCount,\n                                      int responseStartIdx=-1,\n                                      int responseEndIdx=-1,\n                                      const String& varTypeSpec=String(),\n                                      char delimiter=',',\n                                      char missch='?');\n\n    /** @brief Creates training data from in-memory arrays.\n\n    @param samples matrix of samples. It should have CV_32F type.\n    @param layout see ml::SampleTypes.\n    @param responses matrix of responses. If the responses are scalar, they should be stored as a\n        single row or as a single column. The matrix should have type CV_32F or CV_32S (in the\n        former case the responses are considered as ordered by default; in the latter case - as\n        categorical)\n    @param varIdx vector specifying which variables to use for training. It can be an integer vector\n        (CV_32S) containing 0-based variable indices or byte vector (CV_8U) containing a mask of\n        active variables.\n    @param sampleIdx vector specifying which samples to use for training. It can be an integer\n        vector (CV_32S) containing 0-based sample indices or byte vector (CV_8U) containing a mask\n        of training samples.\n    @param sampleWeights optional vector with weights for each sample. It should have CV_32F type.\n    @param varType optional vector of type CV_8U and size `<number_of_variables_in_samples> +\n        <number_of_variables_in_responses>`, containing types of each input and output variable. See\n        ml::VariableTypes.\n     */\n    CV_WRAP static Ptr<TrainData> create(InputArray samples, int layout, InputArray responses,\n                                 InputArray varIdx=noArray(), InputArray sampleIdx=noArray(),\n                                 InputArray sampleWeights=noArray(), InputArray varType=noArray());\n};\n\n/** @brief Base class for statistical models in OpenCV ML.\n */\nclass CV_EXPORTS_W StatModel : public Algorithm\n{\npublic:\n    /** Predict options */\n    enum Flags {\n        UPDATE_MODEL = 1,\n        RAW_OUTPUT=1, //!< makes the method return the raw results (the sum), not the class label\n        COMPRESSED_INPUT=2,\n        PREPROCESSED_INPUT=4\n    };\n\n    /** @brief Returns the number of variables in training samples */\n    CV_WRAP virtual int getVarCount() const = 0;\n\n    CV_WRAP virtual bool empty() const;\n\n    /** @brief Returns true if the model is trained */\n    CV_WRAP virtual bool isTrained() const = 0;\n    /** @brief Returns true if the model is classifier */\n    CV_WRAP virtual bool isClassifier() const = 0;\n\n    /** @brief Trains the statistical model\n\n    @param trainData training data that can be loaded from file using TrainData::loadFromCSV or\n        created with TrainData::create.\n    @param flags optional flags, depending on the model. Some of the models can be updated with the\n        new training samples, not completely overwritten (such as NormalBayesClassifier or ANN_MLP).\n     */\n    CV_WRAP virtual bool train( const Ptr<TrainData>& trainData, int flags=0 );\n\n    /** @brief Trains the statistical model\n\n    @param samples training samples\n    @param layout See ml::SampleTypes.\n    @param responses vector of responses associated with the training samples.\n    */\n    CV_WRAP virtual bool train( InputArray samples, int layout, InputArray responses );\n\n    /** @brief Computes error on the training or test dataset\n\n    @param data the training data\n    @param test if true, the error is computed over the test subset of the data, otherwise it's\n        computed over the training subset of the data. Please note that if you loaded a completely\n        different dataset to evaluate already trained classifier, you will probably want not to set\n        the test subset at all with TrainData::setTrainTestSplitRatio and specify test=false, so\n        that the error is computed for the whole new set. Yes, this sounds a bit confusing.\n    @param resp the optional output responses.\n\n    The method uses StatModel::predict to compute the error. For regression models the error is\n    computed as RMS, for classifiers - as a percent of missclassified samples (0%-100%).\n     */\n    CV_WRAP virtual float calcError( const Ptr<TrainData>& data, bool test, OutputArray resp ) const;\n\n    /** @brief Predicts response(s) for the provided sample(s)\n\n    @param samples The input samples, floating-point matrix\n    @param results The optional output matrix of results.\n    @param flags The optional flags, model-dependent. See cv::ml::StatModel::Flags.\n     */\n    CV_WRAP virtual float predict( InputArray samples, OutputArray results=noArray(), int flags=0 ) const = 0;\n\n    /** @brief Create and train model with default parameters\n\n    The class must implement static `create()` method with no parameters or with all default parameter values\n    */\n    template<typename _Tp> static Ptr<_Tp> train(const Ptr<TrainData>& data, int flags=0)\n    {\n        Ptr<_Tp> model = _Tp::create();\n        return !model.empty() && model->train(data, flags) ? model : Ptr<_Tp>();\n    }\n};\n\n/****************************************************************************************\\\n*                                 Normal Bayes Classifier                                *\n\\****************************************************************************************/\n\n/** @brief Bayes classifier for normally distributed data.\n\n@sa @ref ml_intro_bayes\n */\nclass CV_EXPORTS_W NormalBayesClassifier : public StatModel\n{\npublic:\n    /** @brief Predicts the response for sample(s).\n\n    The method estimates the most probable classes for input vectors. Input vectors (one or more)\n    are stored as rows of the matrix inputs. In case of multiple input vectors, there should be one\n    output vector outputs. The predicted class for a single input vector is returned by the method.\n    The vector outputProbs contains the output probabilities corresponding to each element of\n    result.\n     */\n    CV_WRAP virtual float predictProb( InputArray inputs, OutputArray outputs,\n                               OutputArray outputProbs, int flags=0 ) const = 0;\n\n    /** Creates empty model\n    Use StatModel::train to train the model after creation. */\n    CV_WRAP static Ptr<NormalBayesClassifier> create();\n};\n\n/****************************************************************************************\\\n*                          K-Nearest Neighbour Classifier                                *\n\\****************************************************************************************/\n\n/** @brief The class implements K-Nearest Neighbors model\n\n@sa @ref ml_intro_knn\n */\nclass CV_EXPORTS_W KNearest : public StatModel\n{\npublic:\n\n    /** Default number of neighbors to use in predict method. */\n    /** @see setDefaultK */\n    CV_WRAP virtual int getDefaultK() const = 0;\n    /** @copybrief getDefaultK @see getDefaultK */\n    CV_WRAP virtual void setDefaultK(int val) = 0;\n\n    /** Whether classification or regression model should be trained. */\n    /** @see setIsClassifier */\n    CV_WRAP virtual bool getIsClassifier() const = 0;\n    /** @copybrief getIsClassifier @see getIsClassifier */\n    CV_WRAP virtual void setIsClassifier(bool val) = 0;\n\n    /** Parameter for KDTree implementation. */\n    /** @see setEmax */\n    CV_WRAP virtual int getEmax() const = 0;\n    /** @copybrief getEmax @see getEmax */\n    CV_WRAP virtual void setEmax(int val) = 0;\n\n    /** %Algorithm type, one of KNearest::Types. */\n    /** @see setAlgorithmType */\n    CV_WRAP virtual int getAlgorithmType() const = 0;\n    /** @copybrief getAlgorithmType @see getAlgorithmType */\n    CV_WRAP virtual void setAlgorithmType(int val) = 0;\n\n    /** @brief Finds the neighbors and predicts responses for input vectors.\n\n    @param samples Input samples stored by rows. It is a single-precision floating-point matrix of\n        `<number_of_samples> * k` size.\n    @param k Number of used nearest neighbors. Should be greater than 1.\n    @param results Vector with results of prediction (regression or classification) for each input\n        sample. It is a single-precision floating-point vector with `<number_of_samples>` elements.\n    @param neighborResponses Optional output values for corresponding neighbors. It is a single-\n        precision floating-point matrix of `<number_of_samples> * k` size.\n    @param dist Optional output distances from the input vectors to the corresponding neighbors. It\n        is a single-precision floating-point matrix of `<number_of_samples> * k` size.\n\n    For each input vector (a row of the matrix samples), the method finds the k nearest neighbors.\n    In case of regression, the predicted result is a mean value of the particular vector's neighbor\n    responses. In case of classification, the class is determined by voting.\n\n    For each input vector, the neighbors are sorted by their distances to the vector.\n\n    In case of C++ interface you can use output pointers to empty matrices and the function will\n    allocate memory itself.\n\n    If only a single input vector is passed, all output matrices are optional and the predicted\n    value is returned by the method.\n\n    The function is parallelized with the TBB library.\n     */\n    CV_WRAP virtual float findNearest( InputArray samples, int k,\n                               OutputArray results,\n                               OutputArray neighborResponses=noArray(),\n                               OutputArray dist=noArray() ) const = 0;\n\n    /** @brief Implementations of KNearest algorithm\n       */\n    enum Types\n    {\n        BRUTE_FORCE=1,\n        KDTREE=2\n    };\n\n    /** @brief Creates the empty model\n\n    The static method creates empty %KNearest classifier. It should be then trained using StatModel::train method.\n     */\n    CV_WRAP static Ptr<KNearest> create();\n};\n\n/****************************************************************************************\\\n*                                   Support Vector Machines                              *\n\\****************************************************************************************/\n\n/** @brief Support Vector Machines.\n\n@sa @ref ml_intro_svm\n */\nclass CV_EXPORTS_W SVM : public StatModel\n{\npublic:\n\n    class CV_EXPORTS Kernel : public Algorithm\n    {\n    public:\n        virtual int getType() const = 0;\n        virtual void calc( int vcount, int n, const float* vecs, const float* another, float* results ) = 0;\n    };\n\n    /** Type of a %SVM formulation.\n    See SVM::Types. Default value is SVM::C_SVC. */\n    /** @see setType */\n    CV_WRAP virtual int getType() const = 0;\n    /** @copybrief getType @see getType */\n    CV_WRAP virtual void setType(int val) = 0;\n\n    /** Parameter \\f$\\gamma\\f$ of a kernel function.\n    For SVM::POLY, SVM::RBF, SVM::SIGMOID or SVM::CHI2. Default value is 1. */\n    /** @see setGamma */\n    CV_WRAP virtual double getGamma() const = 0;\n    /** @copybrief getGamma @see getGamma */\n    CV_WRAP virtual void setGamma(double val) = 0;\n\n    /** Parameter _coef0_ of a kernel function.\n    For SVM::POLY or SVM::SIGMOID. Default value is 0.*/\n    /** @see setCoef0 */\n    CV_WRAP virtual double getCoef0() const = 0;\n    /** @copybrief getCoef0 @see getCoef0 */\n    CV_WRAP virtual void setCoef0(double val) = 0;\n\n    /** Parameter _degree_ of a kernel function.\n    For SVM::POLY. Default value is 0. */\n    /** @see setDegree */\n    CV_WRAP virtual double getDegree() const = 0;\n    /** @copybrief getDegree @see getDegree */\n    CV_WRAP virtual void setDegree(double val) = 0;\n\n    /** Parameter _C_ of a %SVM optimization problem.\n    For SVM::C_SVC, SVM::EPS_SVR or SVM::NU_SVR. Default value is 0. */\n    /** @see setC */\n    CV_WRAP virtual double getC() const = 0;\n    /** @copybrief getC @see getC */\n    CV_WRAP virtual void setC(double val) = 0;\n\n    /** Parameter \\f$\\nu\\f$ of a %SVM optimization problem.\n    For SVM::NU_SVC, SVM::ONE_CLASS or SVM::NU_SVR. Default value is 0. */\n    /** @see setNu */\n    CV_WRAP virtual double getNu() const = 0;\n    /** @copybrief getNu @see getNu */\n    CV_WRAP virtual void setNu(double val) = 0;\n\n    /** Parameter \\f$\\epsilon\\f$ of a %SVM optimization problem.\n    For SVM::EPS_SVR. Default value is 0. */\n    /** @see setP */\n    CV_WRAP virtual double getP() const = 0;\n    /** @copybrief getP @see getP */\n    CV_WRAP virtual void setP(double val) = 0;\n\n    /** Optional weights in the SVM::C_SVC problem, assigned to particular classes.\n    They are multiplied by _C_ so the parameter _C_ of class _i_ becomes `classWeights(i) * C`. Thus\n    these weights affect the misclassification penalty for different classes. The larger weight,\n    the larger penalty on misclassification of data from the corresponding class. Default value is\n    empty Mat. */\n    /** @see setClassWeights */\n    CV_WRAP virtual cv::Mat getClassWeights() const = 0;\n    /** @copybrief getClassWeights @see getClassWeights */\n    CV_WRAP virtual void setClassWeights(const cv::Mat &val) = 0;\n\n    /** Termination criteria of the iterative %SVM training procedure which solves a partial\n    case of constrained quadratic optimization problem.\n    You can specify tolerance and/or the maximum number of iterations. Default value is\n    `TermCriteria( TermCriteria::MAX_ITER + TermCriteria::EPS, 1000, FLT_EPSILON )`; */\n    /** @see setTermCriteria */\n    CV_WRAP virtual cv::TermCriteria getTermCriteria() const = 0;\n    /** @copybrief getTermCriteria @see getTermCriteria */\n    CV_WRAP virtual void setTermCriteria(const cv::TermCriteria &val) = 0;\n\n    /** Type of a %SVM kernel.\n    See SVM::KernelTypes. Default value is SVM::RBF. */\n    CV_WRAP virtual int getKernelType() const = 0;\n\n    /** Initialize with one of predefined kernels.\n    See SVM::KernelTypes. */\n    CV_WRAP virtual void setKernel(int kernelType) = 0;\n\n    /** Initialize with custom kernel.\n    See SVM::Kernel class for implementation details */\n    virtual void setCustomKernel(const Ptr<Kernel> &_kernel) = 0;\n\n    //! %SVM type\n    enum Types {\n        /** C-Support Vector Classification. n-class classification (n \\f$\\geq\\f$ 2), allows\n        imperfect separation of classes with penalty multiplier C for outliers. */\n        C_SVC=100,\n        /** \\f$\\nu\\f$-Support Vector Classification. n-class classification with possible\n        imperfect separation. Parameter \\f$\\nu\\f$ (in the range 0..1, the larger the value, the smoother\n        the decision boundary) is used instead of C. */\n        NU_SVC=101,\n        /** Distribution Estimation (One-class %SVM). All the training data are from\n        the same class, %SVM builds a boundary that separates the class from the rest of the feature\n        space. */\n        ONE_CLASS=102,\n        /** \\f$\\epsilon\\f$-Support Vector Regression. The distance between feature vectors\n        from the training set and the fitting hyper-plane must be less than p. For outliers the\n        penalty multiplier C is used. */\n        EPS_SVR=103,\n        /** \\f$\\nu\\f$-Support Vector Regression. \\f$\\nu\\f$ is used instead of p.\n        See @cite LibSVM for details. */\n        NU_SVR=104\n    };\n\n    /** @brief %SVM kernel type\n\n    A comparison of different kernels on the following 2D test case with four classes. Four\n    SVM::C_SVC SVMs have been trained (one against rest) with auto_train. Evaluation on three\n    different kernels (SVM::CHI2, SVM::INTER, SVM::RBF). The color depicts the class with max score.\n    Bright means max-score \\> 0, dark means max-score \\< 0.\n    ![image](pics/SVM_Comparison.png)\n    */\n    enum KernelTypes {\n        /** Returned by SVM::getKernelType in case when custom kernel has been set */\n        CUSTOM=-1,\n        /** Linear kernel. No mapping is done, linear discrimination (or regression) is\n        done in the original feature space. It is the fastest option. \\f$K(x_i, x_j) = x_i^T x_j\\f$. */\n        LINEAR=0,\n        /** Polynomial kernel:\n        \\f$K(x_i, x_j) = (\\gamma x_i^T x_j + coef0)^{degree}, \\gamma > 0\\f$. */\n        POLY=1,\n        /** Radial basis function (RBF), a good choice in most cases.\n        \\f$K(x_i, x_j) = e^{-\\gamma ||x_i - x_j||^2}, \\gamma > 0\\f$. */\n        RBF=2,\n        /** Sigmoid kernel: \\f$K(x_i, x_j) = \\tanh(\\gamma x_i^T x_j + coef0)\\f$. */\n        SIGMOID=3,\n        /** Exponential Chi2 kernel, similar to the RBF kernel:\n        \\f$K(x_i, x_j) = e^{-\\gamma \\chi^2(x_i,x_j)}, \\chi^2(x_i,x_j) = (x_i-x_j)^2/(x_i+x_j), \\gamma > 0\\f$. */\n        CHI2=4,\n        /** Histogram intersection kernel. A fast kernel. \\f$K(x_i, x_j) = min(x_i,x_j)\\f$. */\n        INTER=5\n    };\n\n    //! %SVM params type\n    enum ParamTypes {\n        C=0,\n        GAMMA=1,\n        P=2,\n        NU=3,\n        COEF=4,\n        DEGREE=5\n    };\n\n    /** @brief Trains an %SVM with optimal parameters.\n\n    @param data the training data that can be constructed using TrainData::create or\n        TrainData::loadFromCSV.\n    @param kFold Cross-validation parameter. The training set is divided into kFold subsets. One\n        subset is used to test the model, the others form the train set. So, the %SVM algorithm is\n        executed kFold times.\n    @param Cgrid grid for C\n    @param gammaGrid grid for gamma\n    @param pGrid grid for p\n    @param nuGrid grid for nu\n    @param coeffGrid grid for coeff\n    @param degreeGrid grid for degree\n    @param balanced If true and the problem is 2-class classification then the method creates more\n        balanced cross-validation subsets that is proportions between classes in subsets are close\n        to such proportion in the whole train dataset.\n\n    The method trains the %SVM model automatically by choosing the optimal parameters C, gamma, p,\n    nu, coef0, degree. Parameters are considered optimal when the cross-validation\n    estimate of the test set error is minimal.\n\n    If there is no need to optimize a parameter, the corresponding grid step should be set to any\n    value less than or equal to 1. For example, to avoid optimization in gamma, set `gammaGrid.step\n    = 0`, `gammaGrid.minVal`, `gamma_grid.maxVal` as arbitrary numbers. In this case, the value\n    `Gamma` is taken for gamma.\n\n    And, finally, if the optimization in a parameter is required but the corresponding grid is\n    unknown, you may call the function SVM::getDefaultGrid. To generate a grid, for example, for\n    gamma, call `SVM::getDefaultGrid(SVM::GAMMA)`.\n\n    This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the\n    regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and\n    the usual %SVM with parameters specified in params is executed.\n     */\n    virtual bool trainAuto( const Ptr<TrainData>& data, int kFold = 10,\n                    ParamGrid Cgrid = SVM::getDefaultGrid(SVM::C),\n                    ParamGrid gammaGrid  = SVM::getDefaultGrid(SVM::GAMMA),\n                    ParamGrid pGrid      = SVM::getDefaultGrid(SVM::P),\n                    ParamGrid nuGrid     = SVM::getDefaultGrid(SVM::NU),\n                    ParamGrid coeffGrid  = SVM::getDefaultGrid(SVM::COEF),\n                    ParamGrid degreeGrid = SVM::getDefaultGrid(SVM::DEGREE),\n                    bool balanced=false) = 0;\n\n    /** @brief Retrieves all the support vectors\n\n    The method returns all the support vector as floating-point matrix, where support vectors are\n    stored as matrix rows.\n     */\n    CV_WRAP virtual Mat getSupportVectors() const = 0;\n\n    /** @brief Retrieves the decision function\n\n    @param i the index of the decision function. If the problem solved is regression, 1-class or\n        2-class classification, then there will be just one decision function and the index should\n        always be 0. Otherwise, in the case of N-class classification, there will be \\f$N(N-1)/2\\f$\n        decision functions.\n    @param alpha the optional output vector for weights, corresponding to different support vectors.\n        In the case of linear %SVM all the alpha's will be 1's.\n    @param svidx the optional output vector of indices of support vectors within the matrix of\n        support vectors (which can be retrieved by SVM::getSupportVectors). In the case of linear\n        %SVM each decision function consists of a single \"compressed\" support vector.\n\n    The method returns rho parameter of the decision function, a scalar subtracted from the weighted\n    sum of kernel responses.\n     */\n    CV_WRAP virtual double getDecisionFunction(int i, OutputArray alpha, OutputArray svidx) const = 0;\n\n    /** @brief Generates a grid for %SVM parameters.\n\n    @param param_id %SVM parameters IDs that must be one of the SVM::ParamTypes. The grid is\n    generated for the parameter with this ID.\n\n    The function generates a grid for the specified parameter of the %SVM algorithm. The grid may be\n    passed to the function SVM::trainAuto.\n     */\n    static ParamGrid getDefaultGrid( int param_id );\n\n    /** Creates empty model.\n    Use StatModel::train to train the model. Since %SVM has several parameters, you may want to\n    find the best parameters for your problem, it can be done with SVM::trainAuto. */\n    CV_WRAP static Ptr<SVM> create();\n};\n\n/****************************************************************************************\\\n*                              Expectation - Maximization                                *\n\\****************************************************************************************/\n\n/** @brief The class implements the Expectation Maximization algorithm.\n\n@sa @ref ml_intro_em\n */\nclass CV_EXPORTS_W EM : public StatModel\n{\npublic:\n    //! Type of covariation matrices\n    enum Types {\n        /** A scaled identity matrix \\f$\\mu_k * I\\f$. There is the only\n        parameter \\f$\\mu_k\\f$ to be estimated for each matrix. The option may be used in special cases,\n        when the constraint is relevant, or as a first step in the optimization (for example in case\n        when the data is preprocessed with PCA). The results of such preliminary estimation may be\n        passed again to the optimization procedure, this time with\n        covMatType=EM::COV_MAT_DIAGONAL. */\n        COV_MAT_SPHERICAL=0,\n        /** A diagonal matrix with positive diagonal elements. The number of\n        free parameters is d for each matrix. This is most commonly used option yielding good\n        estimation results. */\n        COV_MAT_DIAGONAL=1,\n        /** A symmetric positively defined matrix. The number of free\n        parameters in each matrix is about \\f$d^2/2\\f$. It is not recommended to use this option, unless\n        there is pretty accurate initial estimation of the parameters and/or a huge number of\n        training samples. */\n        COV_MAT_GENERIC=2,\n        COV_MAT_DEFAULT=COV_MAT_DIAGONAL\n    };\n\n    //! Default parameters\n    enum {DEFAULT_NCLUSTERS=5, DEFAULT_MAX_ITERS=100};\n\n    //! The initial step\n    enum {START_E_STEP=1, START_M_STEP=2, START_AUTO_STEP=0};\n\n    /** The number of mixture components in the Gaussian mixture model.\n    Default value of the parameter is EM::DEFAULT_NCLUSTERS=5. Some of %EM implementation could\n    determine the optimal number of mixtures within a specified value range, but that is not the\n    case in ML yet. */\n    /** @see setClustersNumber */\n    CV_WRAP virtual int getClustersNumber() const = 0;\n    /** @copybrief getClustersNumber @see getClustersNumber */\n    CV_WRAP virtual void setClustersNumber(int val) = 0;\n\n    /** Constraint on covariance matrices which defines type of matrices.\n    See EM::Types. */\n    /** @see setCovarianceMatrixType */\n    CV_WRAP virtual int getCovarianceMatrixType() const = 0;\n    /** @copybrief getCovarianceMatrixType @see getCovarianceMatrixType */\n    CV_WRAP virtual void setCovarianceMatrixType(int val) = 0;\n\n    /** The termination criteria of the %EM algorithm.\n    The %EM algorithm can be terminated by the number of iterations termCrit.maxCount (number of\n    M-steps) or when relative change of likelihood logarithm is less than termCrit.epsilon. Default\n    maximum number of iterations is EM::DEFAULT_MAX_ITERS=100. */\n    /** @see setTermCriteria */\n    CV_WRAP virtual TermCriteria getTermCriteria() const = 0;\n    /** @copybrief getTermCriteria @see getTermCriteria */\n    CV_WRAP virtual void setTermCriteria(const TermCriteria &val) = 0;\n\n    /** @brief Returns weights of the mixtures\n\n    Returns vector with the number of elements equal to the number of mixtures.\n     */\n    CV_WRAP virtual Mat getWeights() const = 0;\n    /** @brief Returns the cluster centers (means of the Gaussian mixture)\n\n    Returns matrix with the number of rows equal to the number of mixtures and number of columns\n    equal to the space dimensionality.\n     */\n    CV_WRAP virtual Mat getMeans() const = 0;\n    /** @brief Returns covariation matrices\n\n    Returns vector of covariation matrices. Number of matrices is the number of gaussian mixtures,\n    each matrix is a square floating-point matrix NxN, where N is the space dimensionality.\n     */\n    virtual void getCovs(std::vector<Mat>& covs) const = 0;\n\n    /** @brief Returns a likelihood logarithm value and an index of the most probable mixture component\n    for the given sample.\n\n    @param sample A sample for classification. It should be a one-channel matrix of\n        \\f$1 \\times dims\\f$ or \\f$dims \\times 1\\f$ size.\n    @param probs Optional output matrix that contains posterior probabilities of each component\n        given the sample. It has \\f$1 \\times nclusters\\f$ size and CV_64FC1 type.\n\n    The method returns a two-element double vector. Zero element is a likelihood logarithm value for\n    the sample. First element is an index of the most probable mixture component for the given\n    sample.\n     */\n    CV_WRAP CV_WRAP virtual Vec2d predict2(InputArray sample, OutputArray probs) const = 0;\n\n    /** @brief Estimate the Gaussian mixture parameters from a samples set.\n\n    This variation starts with Expectation step. Initial values of the model parameters will be\n    estimated by the k-means algorithm.\n\n    Unlike many of the ML models, %EM is an unsupervised learning algorithm and it does not take\n    responses (class labels or function values) as input. Instead, it computes the *Maximum\n    Likelihood Estimate* of the Gaussian mixture parameters from an input sample set, stores all the\n    parameters inside the structure: \\f$p_{i,k}\\f$ in probs, \\f$a_k\\f$ in means , \\f$S_k\\f$ in\n    covs[k], \\f$\\pi_k\\f$ in weights , and optionally computes the output \"class label\" for each\n    sample: \\f$\\texttt{labels}_i=\\texttt{arg max}_k(p_{i,k}), i=1..N\\f$ (indices of the most\n    probable mixture component for each sample).\n\n    The trained model can be used further for prediction, just like any other classifier. The\n    trained model is similar to the NormalBayesClassifier.\n\n    @param samples Samples from which the Gaussian mixture model will be estimated. It should be a\n        one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type\n        it will be converted to the inner matrix of such type for the further computing.\n    @param logLikelihoods The optional output matrix that contains a likelihood logarithm value for\n        each sample. It has \\f$nsamples \\times 1\\f$ size and CV_64FC1 type.\n    @param labels The optional output \"class label\" for each sample:\n        \\f$\\texttt{labels}_i=\\texttt{arg max}_k(p_{i,k}), i=1..N\\f$ (indices of the most probable\n        mixture component for each sample). It has \\f$nsamples \\times 1\\f$ size and CV_32SC1 type.\n    @param probs The optional output matrix that contains posterior probabilities of each Gaussian\n        mixture component given the each sample. It has \\f$nsamples \\times nclusters\\f$ size and\n        CV_64FC1 type.\n     */\n    CV_WRAP virtual bool trainEM(InputArray samples,\n                         OutputArray logLikelihoods=noArray(),\n                         OutputArray labels=noArray(),\n                         OutputArray probs=noArray()) = 0;\n\n    /** @brief Estimate the Gaussian mixture parameters from a samples set.\n\n    This variation starts with Expectation step. You need to provide initial means \\f$a_k\\f$ of\n    mixture components. Optionally you can pass initial weights \\f$\\pi_k\\f$ and covariance matrices\n    \\f$S_k\\f$ of mixture components.\n\n    @param samples Samples from which the Gaussian mixture model will be estimated. It should be a\n        one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type\n        it will be converted to the inner matrix of such type for the further computing.\n    @param means0 Initial means \\f$a_k\\f$ of mixture components. It is a one-channel matrix of\n        \\f$nclusters \\times dims\\f$ size. If the matrix does not have CV_64F type it will be\n        converted to the inner matrix of such type for the further computing.\n    @param covs0 The vector of initial covariance matrices \\f$S_k\\f$ of mixture components. Each of\n        covariance matrices is a one-channel matrix of \\f$dims \\times dims\\f$ size. If the matrices\n        do not have CV_64F type they will be converted to the inner matrices of such type for the\n        further computing.\n    @param weights0 Initial weights \\f$\\pi_k\\f$ of mixture components. It should be a one-channel\n        floating-point matrix with \\f$1 \\times nclusters\\f$ or \\f$nclusters \\times 1\\f$ size.\n    @param logLikelihoods The optional output matrix that contains a likelihood logarithm value for\n        each sample. It has \\f$nsamples \\times 1\\f$ size and CV_64FC1 type.\n    @param labels The optional output \"class label\" for each sample:\n        \\f$\\texttt{labels}_i=\\texttt{arg max}_k(p_{i,k}), i=1..N\\f$ (indices of the most probable\n        mixture component for each sample). It has \\f$nsamples \\times 1\\f$ size and CV_32SC1 type.\n    @param probs The optional output matrix that contains posterior probabilities of each Gaussian\n        mixture component given the each sample. It has \\f$nsamples \\times nclusters\\f$ size and\n        CV_64FC1 type.\n    */\n    CV_WRAP virtual bool trainE(InputArray samples, InputArray means0,\n                        InputArray covs0=noArray(),\n                        InputArray weights0=noArray(),\n                        OutputArray logLikelihoods=noArray(),\n                        OutputArray labels=noArray(),\n                        OutputArray probs=noArray()) = 0;\n\n    /** @brief Estimate the Gaussian mixture parameters from a samples set.\n\n    This variation starts with Maximization step. You need to provide initial probabilities\n    \\f$p_{i,k}\\f$ to use this option.\n\n    @param samples Samples from which the Gaussian mixture model will be estimated. It should be a\n        one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type\n        it will be converted to the inner matrix of such type for the further computing.\n    @param probs0\n    @param logLikelihoods The optional output matrix that contains a likelihood logarithm value for\n        each sample. It has \\f$nsamples \\times 1\\f$ size and CV_64FC1 type.\n    @param labels The optional output \"class label\" for each sample:\n        \\f$\\texttt{labels}_i=\\texttt{arg max}_k(p_{i,k}), i=1..N\\f$ (indices of the most probable\n        mixture component for each sample). It has \\f$nsamples \\times 1\\f$ size and CV_32SC1 type.\n    @param probs The optional output matrix that contains posterior probabilities of each Gaussian\n        mixture component given the each sample. It has \\f$nsamples \\times nclusters\\f$ size and\n        CV_64FC1 type.\n    */\n    CV_WRAP virtual bool trainM(InputArray samples, InputArray probs0,\n                        OutputArray logLikelihoods=noArray(),\n                        OutputArray labels=noArray(),\n                        OutputArray probs=noArray()) = 0;\n\n    /** Creates empty %EM model.\n    The model should be trained then using StatModel::train(traindata, flags) method. Alternatively, you\n    can use one of the EM::train\\* methods or load it from file using Algorithm::load\\<EM\\>(filename).\n     */\n    CV_WRAP static Ptr<EM> create();\n};\n\n/****************************************************************************************\\\n*                                      Decision Tree                                     *\n\\****************************************************************************************/\n\n/** @brief The class represents a single decision tree or a collection of decision trees.\n\nThe current public interface of the class allows user to train only a single decision tree, however\nthe class is capable of storing multiple decision trees and using them for prediction (by summing\nresponses or using a voting schemes), and the derived from DTrees classes (such as RTrees and Boost)\nuse this capability to implement decision tree ensembles.\n\n@sa @ref ml_intro_trees\n*/\nclass CV_EXPORTS_W DTrees : public StatModel\n{\npublic:\n    /** Predict options */\n    enum Flags { PREDICT_AUTO=0, PREDICT_SUM=(1<<8), PREDICT_MAX_VOTE=(2<<8), PREDICT_MASK=(3<<8) };\n\n    /** Cluster possible values of a categorical variable into K\\<=maxCategories clusters to\n    find a suboptimal split.\n    If a discrete variable, on which the training procedure tries to make a split, takes more than\n    maxCategories values, the precise best subset estimation may take a very long time because the\n    algorithm is exponential. Instead, many decision trees engines (including our implementation)\n    try to find sub-optimal split in this case by clustering all the samples into maxCategories\n    clusters that is some categories are merged together. The clustering is applied only in n \\>\n    2-class classification problems for categorical variables with N \\> max_categories possible\n    values. In case of regression and 2-class classification the optimal split can be found\n    efficiently without employing clustering, thus the parameter is not used in these cases.\n    Default value is 10.*/\n    /** @see setMaxCategories */\n    CV_WRAP virtual int getMaxCategories() const = 0;\n    /** @copybrief getMaxCategories @see getMaxCategories */\n    CV_WRAP virtual void setMaxCategories(int val) = 0;\n\n    /** The maximum possible depth of the tree.\n    That is the training algorithms attempts to split a node while its depth is less than maxDepth.\n    The root node has zero depth. The actual depth may be smaller if the other termination criteria\n    are met (see the outline of the training procedure @ref ml_intro_trees \"here\"), and/or if the\n    tree is pruned. Default value is INT_MAX.*/\n    /** @see setMaxDepth */\n    CV_WRAP virtual int getMaxDepth() const = 0;\n    /** @copybrief getMaxDepth @see getMaxDepth */\n    CV_WRAP virtual void setMaxDepth(int val) = 0;\n\n    /** If the number of samples in a node is less than this parameter then the node will not be split.\n\n    Default value is 10.*/\n    /** @see setMinSampleCount */\n    CV_WRAP virtual int getMinSampleCount() const = 0;\n    /** @copybrief getMinSampleCount @see getMinSampleCount */\n    CV_WRAP virtual void setMinSampleCount(int val) = 0;\n\n    /** If CVFolds \\> 1 then algorithms prunes the built decision tree using K-fold\n    cross-validation procedure where K is equal to CVFolds.\n    Default value is 10.*/\n    /** @see setCVFolds */\n    CV_WRAP virtual int getCVFolds() const = 0;\n    /** @copybrief getCVFolds @see getCVFolds */\n    CV_WRAP virtual void setCVFolds(int val) = 0;\n\n    /** If true then surrogate splits will be built.\n    These splits allow to work with missing data and compute variable importance correctly.\n    Default value is false.\n    @note currently it's not implemented.*/\n    /** @see setUseSurrogates */\n    CV_WRAP virtual bool getUseSurrogates() const = 0;\n    /** @copybrief getUseSurrogates @see getUseSurrogates */\n    CV_WRAP virtual void setUseSurrogates(bool val) = 0;\n\n    /** If true then a pruning will be harsher.\n    This will make a tree more compact and more resistant to the training data noise but a bit less\n    accurate. Default value is true.*/\n    /** @see setUse1SERule */\n    CV_WRAP virtual bool getUse1SERule() const = 0;\n    /** @copybrief getUse1SERule @see getUse1SERule */\n    CV_WRAP virtual void setUse1SERule(bool val) = 0;\n\n    /** If true then pruned branches are physically removed from the tree.\n    Otherwise they are retained and it is possible to get results from the original unpruned (or\n    pruned less aggressively) tree. Default value is true.*/\n    /** @see setTruncatePrunedTree */\n    CV_WRAP virtual bool getTruncatePrunedTree() const = 0;\n    /** @copybrief getTruncatePrunedTree @see getTruncatePrunedTree */\n    CV_WRAP virtual void setTruncatePrunedTree(bool val) = 0;\n\n    /** Termination criteria for regression trees.\n    If all absolute differences between an estimated value in a node and values of train samples\n    in this node are less than this parameter then the node will not be split further. Default\n    value is 0.01f*/\n    /** @see setRegressionAccuracy */\n    CV_WRAP virtual float getRegressionAccuracy() const = 0;\n    /** @copybrief getRegressionAccuracy @see getRegressionAccuracy */\n    CV_WRAP virtual void setRegressionAccuracy(float val) = 0;\n\n    /** @brief The array of a priori class probabilities, sorted by the class label value.\n\n    The parameter can be used to tune the decision tree preferences toward a certain class. For\n    example, if you want to detect some rare anomaly occurrence, the training base will likely\n    contain much more normal cases than anomalies, so a very good classification performance\n    will be achieved just by considering every case as normal. To avoid this, the priors can be\n    specified, where the anomaly probability is artificially increased (up to 0.5 or even\n    greater), so the weight of the misclassified anomalies becomes much bigger, and the tree is\n    adjusted properly.\n\n    You can also think about this parameter as weights of prediction categories which determine\n    relative weights that you give to misclassification. That is, if the weight of the first\n    category is 1 and the weight of the second category is 10, then each mistake in predicting\n    the second category is equivalent to making 10 mistakes in predicting the first category.\n    Default value is empty Mat.*/\n    /** @see setPriors */\n    CV_WRAP virtual cv::Mat getPriors() const = 0;\n    /** @copybrief getPriors @see getPriors */\n    CV_WRAP virtual void setPriors(const cv::Mat &val) = 0;\n\n    /** @brief The class represents a decision tree node.\n     */\n    class CV_EXPORTS Node\n    {\n    public:\n        Node();\n        double value; //!< Value at the node: a class label in case of classification or estimated\n                      //!< function value in case of regression.\n        int classIdx; //!< Class index normalized to 0..class_count-1 range and assigned to the\n                      //!< node. It is used internally in classification trees and tree ensembles.\n        int parent; //!< Index of the parent node\n        int left; //!< Index of the left child node\n        int right; //!< Index of right child node\n        int defaultDir; //!< Default direction where to go (-1: left or +1: right). It helps in the\n                        //!< case of missing values.\n        int split; //!< Index of the first split\n    };\n\n    /** @brief The class represents split in a decision tree.\n     */\n    class CV_EXPORTS Split\n    {\n    public:\n        Split();\n        int varIdx; //!< Index of variable on which the split is created.\n        bool inversed; //!< If true, then the inverse split rule is used (i.e. left and right\n                       //!< branches are exchanged in the rule expressions below).\n        float quality; //!< The split quality, a positive number. It is used to choose the best split.\n        int next; //!< Index of the next split in the list of splits for the node\n        float c; /**< The threshold value in case of split on an ordered variable.\n                      The rule is:\n                      @code{.none}\n                      if var_value < c\n                        then next_node <- left\n                        else next_node <- right\n                      @endcode */\n        int subsetOfs; /**< Offset of the bitset used by the split on a categorical variable.\n                            The rule is:\n                            @code{.none}\n                            if bitset[var_value] == 1\n                                then next_node <- left\n                                else next_node <- right\n                            @endcode */\n    };\n\n    /** @brief Returns indices of root nodes\n    */\n    virtual const std::vector<int>& getRoots() const = 0;\n    /** @brief Returns all the nodes\n\n    all the node indices are indices in the returned vector\n     */\n    virtual const std::vector<Node>& getNodes() const = 0;\n    /** @brief Returns all the splits\n\n    all the split indices are indices in the returned vector\n     */\n    virtual const std::vector<Split>& getSplits() const = 0;\n    /** @brief Returns all the bitsets for categorical splits\n\n    Split::subsetOfs is an offset in the returned vector\n     */\n    virtual const std::vector<int>& getSubsets() const = 0;\n\n    /** @brief Creates the empty model\n\n    The static method creates empty decision tree with the specified parameters. It should be then\n    trained using train method (see StatModel::train). Alternatively, you can load the model from\n    file using Algorithm::load\\<DTrees\\>(filename).\n     */\n    CV_WRAP static Ptr<DTrees> create();\n};\n\n/****************************************************************************************\\\n*                                   Random Trees Classifier                              *\n\\****************************************************************************************/\n\n/** @brief The class implements the random forest predictor.\n\n@sa @ref ml_intro_rtrees\n */\nclass CV_EXPORTS_W RTrees : public DTrees\n{\npublic:\n\n    /** If true then variable importance will be calculated and then it can be retrieved by RTrees::getVarImportance.\n    Default value is false.*/\n    /** @see setCalculateVarImportance */\n    CV_WRAP virtual bool getCalculateVarImportance() const = 0;\n    /** @copybrief getCalculateVarImportance @see getCalculateVarImportance */\n    CV_WRAP virtual void setCalculateVarImportance(bool val) = 0;\n\n    /** The size of the randomly selected subset of features at each tree node and that are used\n    to find the best split(s).\n    If you set it to 0 then the size will be set to the square root of the total number of\n    features. Default value is 0.*/\n    /** @see setActiveVarCount */\n    CV_WRAP virtual int getActiveVarCount() const = 0;\n    /** @copybrief getActiveVarCount @see getActiveVarCount */\n    CV_WRAP virtual void setActiveVarCount(int val) = 0;\n\n    /** The termination criteria that specifies when the training algorithm stops.\n    Either when the specified number of trees is trained and added to the ensemble or when\n    sufficient accuracy (measured as OOB error) is achieved. Typically the more trees you have the\n    better the accuracy. However, the improvement in accuracy generally diminishes and asymptotes\n    pass a certain number of trees. Also to keep in mind, the number of tree increases the\n    prediction time linearly. Default value is TermCriteria(TermCriteria::MAX_ITERS +\n    TermCriteria::EPS, 50, 0.1)*/\n    /** @see setTermCriteria */\n    CV_WRAP virtual TermCriteria getTermCriteria() const = 0;\n    /** @copybrief getTermCriteria @see getTermCriteria */\n    CV_WRAP virtual void setTermCriteria(const TermCriteria &val) = 0;\n\n    /** Returns the variable importance array.\n    The method returns the variable importance vector, computed at the training stage when\n    CalculateVarImportance is set to true. If this flag was set to false, the empty matrix is\n    returned.\n     */\n    CV_WRAP virtual Mat getVarImportance() const = 0;\n\n    /** Creates the empty model.\n    Use StatModel::train to train the model, StatModel::train to create and train the model,\n    Algorithm::load to load the pre-trained model.\n     */\n    CV_WRAP static Ptr<RTrees> create();\n};\n\n/****************************************************************************************\\\n*                                   Boosted tree classifier                              *\n\\****************************************************************************************/\n\n/** @brief Boosted tree classifier derived from DTrees\n\n@sa @ref ml_intro_boost\n */\nclass CV_EXPORTS_W Boost : public DTrees\n{\npublic:\n    /** Type of the boosting algorithm.\n    See Boost::Types. Default value is Boost::REAL. */\n    /** @see setBoostType */\n    CV_WRAP virtual int getBoostType() const = 0;\n    /** @copybrief getBoostType @see getBoostType */\n    CV_WRAP virtual void setBoostType(int val) = 0;\n\n    /** The number of weak classifiers.\n    Default value is 100. */\n    /** @see setWeakCount */\n    CV_WRAP virtual int getWeakCount() const = 0;\n    /** @copybrief getWeakCount @see getWeakCount */\n    CV_WRAP virtual void setWeakCount(int val) = 0;\n\n    /** A threshold between 0 and 1 used to save computational time.\n    Samples with summary weight \\f$\\leq 1 - weight_trim_rate\\f$ do not participate in the *next*\n    iteration of training. Set this parameter to 0 to turn off this functionality. Default value is 0.95.*/\n    /** @see setWeightTrimRate */\n    CV_WRAP virtual double getWeightTrimRate() const = 0;\n    /** @copybrief getWeightTrimRate @see getWeightTrimRate */\n    CV_WRAP virtual void setWeightTrimRate(double val) = 0;\n\n    /** Boosting type.\n    Gentle AdaBoost and Real AdaBoost are often the preferable choices. */\n    enum Types {\n        DISCRETE=0, //!< Discrete AdaBoost.\n        REAL=1, //!< Real AdaBoost. It is a technique that utilizes confidence-rated predictions\n                //!< and works well with categorical data.\n        LOGIT=2, //!< LogitBoost. It can produce good regression fits.\n        GENTLE=3 //!< Gentle AdaBoost. It puts less weight on outlier data points and for that\n                 //!<reason is often good with regression data.\n    };\n\n    /** Creates the empty model.\n    Use StatModel::train to train the model, Algorithm::load\\<Boost\\>(filename) to load the pre-trained model. */\n    CV_WRAP static Ptr<Boost> create();\n};\n\n/****************************************************************************************\\\n*                                   Gradient Boosted Trees                               *\n\\****************************************************************************************/\n\n/*class CV_EXPORTS_W GBTrees : public DTrees\n{\npublic:\n    struct CV_EXPORTS_W_MAP Params : public DTrees::Params\n    {\n        CV_PROP_RW int weakCount;\n        CV_PROP_RW int lossFunctionType;\n        CV_PROP_RW float subsamplePortion;\n        CV_PROP_RW float shrinkage;\n\n        Params();\n        Params( int lossFunctionType, int weakCount, float shrinkage,\n                float subsamplePortion, int maxDepth, bool useSurrogates );\n    };\n\n    enum {SQUARED_LOSS=0, ABSOLUTE_LOSS, HUBER_LOSS=3, DEVIANCE_LOSS};\n\n    virtual void setK(int k) = 0;\n\n    virtual float predictSerial( InputArray samples,\n                                 OutputArray weakResponses, int flags) const = 0;\n\n    static Ptr<GBTrees> create(const Params& p);\n};*/\n\n/****************************************************************************************\\\n*                              Artificial Neural Networks (ANN)                          *\n\\****************************************************************************************/\n\n/////////////////////////////////// Multi-Layer Perceptrons //////////////////////////////\n\n/** @brief Artificial Neural Networks - Multi-Layer Perceptrons.\n\nUnlike many other models in ML that are constructed and trained at once, in the MLP model these\nsteps are separated. First, a network with the specified topology is created using the non-default\nconstructor or the method ANN_MLP::create. All the weights are set to zeros. Then, the network is\ntrained using a set of input and output vectors. The training procedure can be repeated more than\nonce, that is, the weights can be adjusted based on the new training data.\n\nAdditional flags for StatModel::train are available: ANN_MLP::TrainFlags.\n\n@sa @ref ml_intro_ann\n */\nclass CV_EXPORTS_W ANN_MLP : public StatModel\n{\npublic:\n    /** Available training methods */\n    enum TrainingMethods {\n        BACKPROP=0, //!< The back-propagation algorithm.\n        RPROP=1 //!< The RPROP algorithm. See @cite RPROP93 for details.\n    };\n\n    /** Sets training method and common parameters.\n    @param method Default value is ANN_MLP::RPROP. See ANN_MLP::TrainingMethods.\n    @param param1 passed to setRpropDW0 for ANN_MLP::RPROP and to setBackpropWeightScale for ANN_MLP::BACKPROP\n    @param param2 passed to setRpropDWMin for ANN_MLP::RPROP and to setBackpropMomentumScale for ANN_MLP::BACKPROP.\n    */\n    CV_WRAP virtual void setTrainMethod(int method, double param1 = 0, double param2 = 0) = 0;\n\n    /** Returns current training method */\n    CV_WRAP virtual int getTrainMethod() const = 0;\n\n    /** Initialize the activation function for each neuron.\n    Currently the default and the only fully supported activation function is ANN_MLP::SIGMOID_SYM.\n    @param type The type of activation function. See ANN_MLP::ActivationFunctions.\n    @param param1 The first parameter of the activation function, \\f$\\alpha\\f$. Default value is 0.\n    @param param2 The second parameter of the activation function, \\f$\\beta\\f$. Default value is 0.\n    */\n    CV_WRAP virtual void setActivationFunction(int type, double param1 = 0, double param2 = 0) = 0;\n\n    /**  Integer vector specifying the number of neurons in each layer including the input and output layers.\n    The very first element specifies the number of elements in the input layer.\n    The last element - number of elements in the output layer. Default value is empty Mat.\n    @sa getLayerSizes */\n    CV_WRAP virtual void setLayerSizes(InputArray _layer_sizes) = 0;\n\n    /**  Integer vector specifying the number of neurons in each layer including the input and output layers.\n    The very first element specifies the number of elements in the input layer.\n    The last element - number of elements in the output layer.\n    @sa setLayerSizes */\n    CV_WRAP virtual cv::Mat getLayerSizes() const = 0;\n\n    /** Termination criteria of the training algorithm.\n    You can specify the maximum number of iterations (maxCount) and/or how much the error could\n    change between the iterations to make the algorithm continue (epsilon). Default value is\n    TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 1000, 0.01).*/\n    /** @see setTermCriteria */\n    CV_WRAP virtual TermCriteria getTermCriteria() const = 0;\n    /** @copybrief getTermCriteria @see getTermCriteria */\n    CV_WRAP virtual void setTermCriteria(TermCriteria val) = 0;\n\n    /** BPROP: Strength of the weight gradient term.\n    The recommended value is about 0.1. Default value is 0.1.*/\n    /** @see setBackpropWeightScale */\n    CV_WRAP virtual double getBackpropWeightScale() const = 0;\n    /** @copybrief getBackpropWeightScale @see getBackpropWeightScale */\n    CV_WRAP virtual void setBackpropWeightScale(double val) = 0;\n\n    /** BPROP: Strength of the momentum term (the difference between weights on the 2 previous iterations).\n    This parameter provides some inertia to smooth the random fluctuations of the weights. It can\n    vary from 0 (the feature is disabled) to 1 and beyond. The value 0.1 or so is good enough.\n    Default value is 0.1.*/\n    /** @see setBackpropMomentumScale */\n    CV_WRAP virtual double getBackpropMomentumScale() const = 0;\n    /** @copybrief getBackpropMomentumScale @see getBackpropMomentumScale */\n    CV_WRAP virtual void setBackpropMomentumScale(double val) = 0;\n\n    /** RPROP: Initial value \\f$\\Delta_0\\f$ of update-values \\f$\\Delta_{ij}\\f$.\n    Default value is 0.1.*/\n    /** @see setRpropDW0 */\n    CV_WRAP virtual double getRpropDW0() const = 0;\n    /** @copybrief getRpropDW0 @see getRpropDW0 */\n    CV_WRAP virtual void setRpropDW0(double val) = 0;\n\n    /** RPROP: Increase factor \\f$\\eta^+\\f$.\n    It must be \\>1. Default value is 1.2.*/\n    /** @see setRpropDWPlus */\n    CV_WRAP virtual double getRpropDWPlus() const = 0;\n    /** @copybrief getRpropDWPlus @see getRpropDWPlus */\n    CV_WRAP virtual void setRpropDWPlus(double val) = 0;\n\n    /** RPROP: Decrease factor \\f$\\eta^-\\f$.\n    It must be \\<1. Default value is 0.5.*/\n    /** @see setRpropDWMinus */\n    CV_WRAP virtual double getRpropDWMinus() const = 0;\n    /** @copybrief getRpropDWMinus @see getRpropDWMinus */\n    CV_WRAP virtual void setRpropDWMinus(double val) = 0;\n\n    /** RPROP: Update-values lower limit \\f$\\Delta_{min}\\f$.\n    It must be positive. Default value is FLT_EPSILON.*/\n    /** @see setRpropDWMin */\n    CV_WRAP virtual double getRpropDWMin() const = 0;\n    /** @copybrief getRpropDWMin @see getRpropDWMin */\n    CV_WRAP virtual void setRpropDWMin(double val) = 0;\n\n    /** RPROP: Update-values upper limit \\f$\\Delta_{max}\\f$.\n    It must be \\>1. Default value is 50.*/\n    /** @see setRpropDWMax */\n    CV_WRAP virtual double getRpropDWMax() const = 0;\n    /** @copybrief getRpropDWMax @see getRpropDWMax */\n    CV_WRAP virtual void setRpropDWMax(double val) = 0;\n\n    /** possible activation functions */\n    enum ActivationFunctions {\n        /** Identity function: \\f$f(x)=x\\f$ */\n        IDENTITY = 0,\n        /** Symmetrical sigmoid: \\f$f(x)=\\beta*(1-e^{-\\alpha x})/(1+e^{-\\alpha x}\\f$\n        @note\n        If you are using the default sigmoid activation function with the default parameter values\n        fparam1=0 and fparam2=0 then the function used is y = 1.7159\\*tanh(2/3 \\* x), so the output\n        will range from [-1.7159, 1.7159], instead of [0,1].*/\n        SIGMOID_SYM = 1,\n        /** Gaussian function: \\f$f(x)=\\beta e^{-\\alpha x*x}\\f$ */\n        GAUSSIAN = 2\n    };\n\n    /** Train options */\n    enum TrainFlags {\n        /** Update the network weights, rather than compute them from scratch. In the latter case\n        the weights are initialized using the Nguyen-Widrow algorithm. */\n        UPDATE_WEIGHTS = 1,\n        /** Do not normalize the input vectors. If this flag is not set, the training algorithm\n        normalizes each input feature independently, shifting its mean value to 0 and making the\n        standard deviation equal to 1. If the network is assumed to be updated frequently, the new\n        training data could be much different from original one. In this case, you should take care\n        of proper normalization. */\n        NO_INPUT_SCALE = 2,\n        /** Do not normalize the output vectors. If the flag is not set, the training algorithm\n        normalizes each output feature independently, by transforming it to the certain range\n        depending on the used activation function. */\n        NO_OUTPUT_SCALE = 4\n    };\n\n    CV_WRAP virtual Mat getWeights(int layerIdx) const = 0;\n\n    /** @brief Creates empty model\n\n    Use StatModel::train to train the model, Algorithm::load\\<ANN_MLP\\>(filename) to load the pre-trained model.\n    Note that the train method has optional flags: ANN_MLP::TrainFlags.\n     */\n    CV_WRAP static Ptr<ANN_MLP> create();\n};\n\n/****************************************************************************************\\\n*                           Logistic Regression                                          *\n\\****************************************************************************************/\n\n/** @brief Implements Logistic Regression classifier.\n\n@sa @ref ml_intro_lr\n */\nclass CV_EXPORTS_W LogisticRegression : public StatModel\n{\npublic:\n\n    /** Learning rate. */\n    /** @see setLearningRate */\n    CV_WRAP virtual double getLearningRate() const = 0;\n    /** @copybrief getLearningRate @see getLearningRate */\n    CV_WRAP virtual void setLearningRate(double val) = 0;\n\n    /** Number of iterations. */\n    /** @see setIterations */\n    CV_WRAP virtual int getIterations() const = 0;\n    /** @copybrief getIterations @see getIterations */\n    CV_WRAP virtual void setIterations(int val) = 0;\n\n    /** Kind of regularization to be applied. See LogisticRegression::RegKinds. */\n    /** @see setRegularization */\n    CV_WRAP virtual int getRegularization() const = 0;\n    /** @copybrief getRegularization @see getRegularization */\n    CV_WRAP virtual void setRegularization(int val) = 0;\n\n    /** Kind of training method used. See LogisticRegression::Methods. */\n    /** @see setTrainMethod */\n    CV_WRAP virtual int getTrainMethod() const = 0;\n    /** @copybrief getTrainMethod @see getTrainMethod */\n    CV_WRAP virtual void setTrainMethod(int val) = 0;\n\n    /** Specifies the number of training samples taken in each step of Mini-Batch Gradient\n    Descent. Will only be used if using LogisticRegression::MINI_BATCH training algorithm. It\n    has to take values less than the total number of training samples. */\n    /** @see setMiniBatchSize */\n    CV_WRAP virtual int getMiniBatchSize() const = 0;\n    /** @copybrief getMiniBatchSize @see getMiniBatchSize */\n    CV_WRAP virtual void setMiniBatchSize(int val) = 0;\n\n    /** Termination criteria of the algorithm. */\n    /** @see setTermCriteria */\n    CV_WRAP virtual TermCriteria getTermCriteria() const = 0;\n    /** @copybrief getTermCriteria @see getTermCriteria */\n    CV_WRAP virtual void setTermCriteria(TermCriteria val) = 0;\n\n    //! Regularization kinds\n    enum RegKinds {\n        REG_DISABLE = -1, //!< Regularization disabled\n        REG_L1 = 0, //!< %L1 norm\n        REG_L2 = 1 //!< %L2 norm\n    };\n\n    //! Training methods\n    enum Methods {\n        BATCH = 0,\n        MINI_BATCH = 1 //!< Set MiniBatchSize to a positive integer when using this method.\n    };\n\n    /** @brief Predicts responses for input samples and returns a float type.\n\n    @param samples The input data for the prediction algorithm. Matrix [m x n], where each row\n        contains variables (features) of one object being classified. Should have data type CV_32F.\n    @param results Predicted labels as a column matrix of type CV_32S.\n    @param flags Not used.\n     */\n    CV_WRAP virtual float predict( InputArray samples, OutputArray results=noArray(), int flags=0 ) const = 0;\n\n    /** @brief This function returns the trained paramters arranged across rows.\n\n    For a two class classifcation problem, it returns a row matrix. It returns learnt paramters of\n    the Logistic Regression as a matrix of type CV_32F.\n     */\n    CV_WRAP virtual Mat get_learnt_thetas() const = 0;\n\n    /** @brief Creates empty model.\n\n    Creates Logistic Regression model with parameters given.\n     */\n    CV_WRAP static Ptr<LogisticRegression> create();\n};\n\n/****************************************************************************************\\\n*                           Auxilary functions declarations                              *\n\\****************************************************************************************/\n\n/** @brief Generates _sample_ from multivariate normal distribution\n\n@param mean an average row vector\n@param cov symmetric covariation matrix\n@param nsamples returned samples count\n@param samples returned samples array\n*/\nCV_EXPORTS void randMVNormal( InputArray mean, InputArray cov, int nsamples, OutputArray samples);\n\n/** @brief Generates sample from gaussian mixture distribution */\nCV_EXPORTS void randGaussMixture( InputArray means, InputArray covs, InputArray weights,\n                                  int nsamples, OutputArray samples, OutputArray sampClasses );\n\n/** @brief Creates test set */\nCV_EXPORTS void createConcentricSpheresTestSet( int nsamples, int nfeatures, int nclasses,\n                                                OutputArray samples, OutputArray responses);\n\n//! @} ml\n\n}\n}\n\n#endif // __cplusplus\n#endif // __OPENCV_ML_HPP__\n\n/* End of file. */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/objdetect/detection_based_tracker.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OBJDETECT_DBT_HPP__\n#define __OPENCV_OBJDETECT_DBT_HPP__\n\n#if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(__ANDROID__) || \\\n  (defined(__cplusplus) &&  __cplusplus > 201103L) || (defined(_MSC_VER) && _MSC_VER >= 1700)\n\n#include <vector>\n\nnamespace cv\n{\n\n//! @addtogroup objdetect\n//! @{\n\nclass CV_EXPORTS DetectionBasedTracker\n{\n    public:\n        struct Parameters\n        {\n            int maxTrackLifetime;\n            int minDetectionPeriod; //the minimal time between run of the big object detector (on the whole frame) in ms (1000 mean 1 sec), default=0\n\n            Parameters();\n        };\n\n        class IDetector\n        {\n            public:\n                IDetector():\n                    minObjSize(96, 96),\n                    maxObjSize(INT_MAX, INT_MAX),\n                    minNeighbours(2),\n                    scaleFactor(1.1f)\n                {}\n\n                virtual void detect(const cv::Mat& image, std::vector<cv::Rect>& objects) = 0;\n\n                void setMinObjectSize(const cv::Size& min)\n                {\n                    minObjSize = min;\n                }\n                void setMaxObjectSize(const cv::Size& max)\n                {\n                    maxObjSize = max;\n                }\n                cv::Size getMinObjectSize() const\n                {\n                    return minObjSize;\n                }\n                cv::Size getMaxObjectSize() const\n                {\n                    return maxObjSize;\n                }\n                float getScaleFactor()\n                {\n                    return scaleFactor;\n                }\n                void setScaleFactor(float value)\n                {\n                    scaleFactor = value;\n                }\n                int getMinNeighbours()\n                {\n                    return minNeighbours;\n                }\n                void setMinNeighbours(int value)\n                {\n                    minNeighbours = value;\n                }\n                virtual ~IDetector() {}\n\n            protected:\n                cv::Size minObjSize;\n                cv::Size maxObjSize;\n                int minNeighbours;\n                float scaleFactor;\n        };\n\n        DetectionBasedTracker(cv::Ptr<IDetector> mainDetector, cv::Ptr<IDetector> trackingDetector, const Parameters& params);\n        virtual ~DetectionBasedTracker();\n\n        virtual bool run();\n        virtual void stop();\n        virtual void resetTracking();\n\n        virtual void process(const cv::Mat& imageGray);\n\n        bool setParameters(const Parameters& params);\n        const Parameters& getParameters() const;\n\n\n        typedef std::pair<cv::Rect, int> Object;\n        virtual void getObjects(std::vector<cv::Rect>& result) const;\n        virtual void getObjects(std::vector<Object>& result) const;\n\n        enum ObjectStatus\n        {\n            DETECTED_NOT_SHOWN_YET,\n            DETECTED,\n            DETECTED_TEMPORARY_LOST,\n            WRONG_OBJECT\n        };\n        struct ExtObject\n        {\n            int id;\n            cv::Rect location;\n            ObjectStatus status;\n            ExtObject(int _id, cv::Rect _location, ObjectStatus _status)\n                :id(_id), location(_location), status(_status)\n            {\n            }\n        };\n        virtual void getObjects(std::vector<ExtObject>& result) const;\n\n\n        virtual int addObject(const cv::Rect& location); //returns id of the new object\n\n    protected:\n        class SeparateDetectionWork;\n        cv::Ptr<SeparateDetectionWork> separateDetectionWork;\n        friend void* workcycleObjectDetectorFunction(void* p);\n\n        struct InnerParameters\n        {\n            int numLastPositionsToTrack;\n            int numStepsToWaitBeforeFirstShow;\n            int numStepsToTrackWithoutDetectingIfObjectHasNotBeenShown;\n            int numStepsToShowWithoutDetecting;\n\n            float coeffTrackingWindowSize;\n            float coeffObjectSizeToTrack;\n            float coeffObjectSpeedUsingInPrediction;\n\n            InnerParameters();\n        };\n        Parameters parameters;\n        InnerParameters innerParameters;\n\n        struct TrackedObject\n        {\n            typedef std::vector<cv::Rect> PositionsVector;\n\n            PositionsVector lastPositions;\n\n            int numDetectedFrames;\n            int numFramesNotDetected;\n            int id;\n\n            TrackedObject(const cv::Rect& rect):numDetectedFrames(1), numFramesNotDetected(0)\n            {\n                lastPositions.push_back(rect);\n                id=getNextId();\n            };\n\n            static int getNextId()\n            {\n                static int _id=0;\n                return _id++;\n            }\n        };\n\n        int numTrackedSteps;\n        std::vector<TrackedObject> trackedObjects;\n\n        std::vector<float> weightsPositionsSmoothing;\n        std::vector<float> weightsSizesSmoothing;\n\n        cv::Ptr<IDetector> cascadeForTracking;\n\n        void updateTrackedObjects(const std::vector<cv::Rect>& detectedObjects);\n        cv::Rect calcTrackedObjectPositionToShow(int i) const;\n        cv::Rect calcTrackedObjectPositionToShow(int i, ObjectStatus& status) const;\n        void detectInRegion(const cv::Mat& img, const cv::Rect& r, std::vector<cv::Rect>& detectedObjectsInRegions);\n};\n\n//! @} objdetect\n\n} //end of cv namespace\n#endif\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/objdetect/objdetect.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/objdetect.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/objdetect/objdetect_c.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OBJDETECT_C_H__\n#define __OPENCV_OBJDETECT_C_H__\n\n#include \"opencv2/core/core_c.h\"\n\n#ifdef __cplusplus\n#include <deque>\n#include <vector>\n\nextern \"C\" {\n#endif\n\n/** @addtogroup objdetect_c\n  @{\n  */\n\n/****************************************************************************************\\\n*                         Haar-like Object Detection functions                           *\n\\****************************************************************************************/\n\n#define CV_HAAR_MAGIC_VAL    0x42500000\n#define CV_TYPE_NAME_HAAR    \"opencv-haar-classifier\"\n\n#define CV_IS_HAAR_CLASSIFIER( haar )                                                    \\\n    ((haar) != NULL &&                                                                   \\\n    (((const CvHaarClassifierCascade*)(haar))->flags & CV_MAGIC_MASK)==CV_HAAR_MAGIC_VAL)\n\n#define CV_HAAR_FEATURE_MAX  3\n\ntypedef struct CvHaarFeature\n{\n    int tilted;\n    struct\n    {\n        CvRect r;\n        float weight;\n    } rect[CV_HAAR_FEATURE_MAX];\n} CvHaarFeature;\n\ntypedef struct CvHaarClassifier\n{\n    int count;\n    CvHaarFeature* haar_feature;\n    float* threshold;\n    int* left;\n    int* right;\n    float* alpha;\n} CvHaarClassifier;\n\ntypedef struct CvHaarStageClassifier\n{\n    int  count;\n    float threshold;\n    CvHaarClassifier* classifier;\n\n    int next;\n    int child;\n    int parent;\n} CvHaarStageClassifier;\n\ntypedef struct CvHidHaarClassifierCascade CvHidHaarClassifierCascade;\n\ntypedef struct CvHaarClassifierCascade\n{\n    int  flags;\n    int  count;\n    CvSize orig_window_size;\n    CvSize real_window_size;\n    double scale;\n    CvHaarStageClassifier* stage_classifier;\n    CvHidHaarClassifierCascade* hid_cascade;\n} CvHaarClassifierCascade;\n\ntypedef struct CvAvgComp\n{\n    CvRect rect;\n    int neighbors;\n} CvAvgComp;\n\n/* Loads haar classifier cascade from a directory.\n   It is obsolete: convert your cascade to xml and use cvLoad instead */\nCVAPI(CvHaarClassifierCascade*) cvLoadHaarClassifierCascade(\n                    const char* directory, CvSize orig_window_size);\n\nCVAPI(void) cvReleaseHaarClassifierCascade( CvHaarClassifierCascade** cascade );\n\n#define CV_HAAR_DO_CANNY_PRUNING    1\n#define CV_HAAR_SCALE_IMAGE         2\n#define CV_HAAR_FIND_BIGGEST_OBJECT 4\n#define CV_HAAR_DO_ROUGH_SEARCH     8\n\nCVAPI(CvSeq*) cvHaarDetectObjects( const CvArr* image,\n                     CvHaarClassifierCascade* cascade, CvMemStorage* storage,\n                     double scale_factor CV_DEFAULT(1.1),\n                     int min_neighbors CV_DEFAULT(3), int flags CV_DEFAULT(0),\n                     CvSize min_size CV_DEFAULT(cvSize(0,0)), CvSize max_size CV_DEFAULT(cvSize(0,0)));\n\n/* sets images for haar classifier cascade */\nCVAPI(void) cvSetImagesForHaarClassifierCascade( CvHaarClassifierCascade* cascade,\n                                                const CvArr* sum, const CvArr* sqsum,\n                                                const CvArr* tilted_sum, double scale );\n\n/* runs the cascade on the specified window */\nCVAPI(int) cvRunHaarClassifierCascade( const CvHaarClassifierCascade* cascade,\n                                       CvPoint pt, int start_stage CV_DEFAULT(0));\n\n/** @} objdetect_c */\n\n#ifdef __cplusplus\n}\n\nCV_EXPORTS CvSeq* cvHaarDetectObjectsForROC( const CvArr* image,\n                     CvHaarClassifierCascade* cascade, CvMemStorage* storage,\n                     std::vector<int>& rejectLevels, std::vector<double>& levelWeightds,\n                     double scale_factor = 1.1,\n                     int min_neighbors = 3, int flags = 0,\n                     CvSize min_size = cvSize(0, 0), CvSize max_size = cvSize(0, 0),\n                     bool outputRejectLevels = false );\n\n#endif\n\n#endif /* __OPENCV_OBJDETECT_C_H__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/objdetect.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_OBJDETECT_HPP__\n#define __OPENCV_OBJDETECT_HPP__\n\n#include \"opencv2/core.hpp\"\n\n/**\n@defgroup objdetect Object Detection\n\nHaar Feature-based Cascade Classifier for Object Detection\n----------------------------------------------------------\n\nThe object detector described below has been initially proposed by Paul Viola @cite Viola01 and\nimproved by Rainer Lienhart @cite Lienhart02 .\n\nFirst, a classifier (namely a *cascade of boosted classifiers working with haar-like features*) is\ntrained with a few hundred sample views of a particular object (i.e., a face or a car), called\npositive examples, that are scaled to the same size (say, 20x20), and negative examples - arbitrary\nimages of the same size.\n\nAfter a classifier is trained, it can be applied to a region of interest (of the same size as used\nduring the training) in an input image. The classifier outputs a \"1\" if the region is likely to show\nthe object (i.e., face/car), and \"0\" otherwise. To search for the object in the whole image one can\nmove the search window across the image and check every location using the classifier. The\nclassifier is designed so that it can be easily \"resized\" in order to be able to find the objects of\ninterest at different sizes, which is more efficient than resizing the image itself. So, to find an\nobject of an unknown size in the image the scan procedure should be done several times at different\nscales.\n\nThe word \"cascade\" in the classifier name means that the resultant classifier consists of several\nsimpler classifiers (*stages*) that are applied subsequently to a region of interest until at some\nstage the candidate is rejected or all the stages are passed. The word \"boosted\" means that the\nclassifiers at every stage of the cascade are complex themselves and they are built out of basic\nclassifiers using one of four different boosting techniques (weighted voting). Currently Discrete\nAdaboost, Real Adaboost, Gentle Adaboost and Logitboost are supported. The basic classifiers are\ndecision-tree classifiers with at least 2 leaves. Haar-like features are the input to the basic\nclassifiers, and are calculated as described below. The current algorithm uses the following\nHaar-like features:\n\n![image](pics/haarfeatures.png)\n\nThe feature used in a particular classifier is specified by its shape (1a, 2b etc.), position within\nthe region of interest and the scale (this scale is not the same as the scale used at the detection\nstage, though these two scales are multiplied). For example, in the case of the third line feature\n(2c) the response is calculated as the difference between the sum of image pixels under the\nrectangle covering the whole feature (including the two white stripes and the black stripe in the\nmiddle) and the sum of the image pixels under the black stripe multiplied by 3 in order to\ncompensate for the differences in the size of areas. The sums of pixel values over a rectangular\nregions are calculated rapidly using integral images (see below and the integral description).\n\nTo see the object detector at work, have a look at the facedetect demo:\n<https://github.com/Itseez/opencv/tree/master/samples/cpp/dbt_face_detection.cpp>\n\nThe following reference is for the detection part only. There is a separate application called\nopencv_traincascade that can train a cascade of boosted classifiers from a set of samples.\n\n@note In the new C++ interface it is also possible to use LBP (local binary pattern) features in\naddition to Haar-like features. .. [Viola01] Paul Viola and Michael J. Jones. Rapid Object Detection\nusing a Boosted Cascade of Simple Features. IEEE CVPR, 2001. The paper is available online at\n<http://research.microsoft.com/en-us/um/people/viola/Pubs/Detect/violaJones_CVPR2001.pdf>\n\n@{\n    @defgroup objdetect_c C API\n@}\n */\n\ntypedef struct CvHaarClassifierCascade CvHaarClassifierCascade;\n\nnamespace cv\n{\n\n//! @addtogroup objdetect\n//! @{\n\n///////////////////////////// Object Detection ////////////////////////////\n\n//! class for grouping object candidates, detected by Cascade Classifier, HOG etc.\n//! instance of the class is to be passed to cv::partition (see cxoperations.hpp)\nclass CV_EXPORTS SimilarRects\n{\npublic:\n    SimilarRects(double _eps) : eps(_eps) {}\n    inline bool operator()(const Rect& r1, const Rect& r2) const\n    {\n        double delta = eps*(std::min(r1.width, r2.width) + std::min(r1.height, r2.height))*0.5;\n        return std::abs(r1.x - r2.x) <= delta &&\n            std::abs(r1.y - r2.y) <= delta &&\n            std::abs(r1.x + r1.width - r2.x - r2.width) <= delta &&\n            std::abs(r1.y + r1.height - r2.y - r2.height) <= delta;\n    }\n    double eps;\n};\n\n/** @brief Groups the object candidate rectangles.\n\n@param rectList Input/output vector of rectangles. Output vector includes retained and grouped\nrectangles. (The Python list is not modified in place.)\n@param groupThreshold Minimum possible number of rectangles minus 1. The threshold is used in a\ngroup of rectangles to retain it.\n@param eps Relative difference between sides of the rectangles to merge them into a group.\n\nThe function is a wrapper for the generic function partition . It clusters all the input rectangles\nusing the rectangle equivalence criteria that combines rectangles with similar sizes and similar\nlocations. The similarity is defined by eps. When eps=0 , no clustering is done at all. If\n\\f$\\texttt{eps}\\rightarrow +\\inf\\f$ , all the rectangles are put in one cluster. Then, the small\nclusters containing less than or equal to groupThreshold rectangles are rejected. In each other\ncluster, the average rectangle is computed and put into the output rectangle list.\n */\nCV_EXPORTS   void groupRectangles(std::vector<Rect>& rectList, int groupThreshold, double eps = 0.2);\n/** @overload */\nCV_EXPORTS_W void groupRectangles(CV_IN_OUT std::vector<Rect>& rectList, CV_OUT std::vector<int>& weights,\n                                  int groupThreshold, double eps = 0.2);\n/** @overload */\nCV_EXPORTS   void groupRectangles(std::vector<Rect>& rectList, int groupThreshold,\n                                  double eps, std::vector<int>* weights, std::vector<double>* levelWeights );\n/** @overload */\nCV_EXPORTS   void groupRectangles(std::vector<Rect>& rectList, std::vector<int>& rejectLevels,\n                                  std::vector<double>& levelWeights, int groupThreshold, double eps = 0.2);\n/** @overload */\nCV_EXPORTS   void groupRectangles_meanshift(std::vector<Rect>& rectList, std::vector<double>& foundWeights,\n                                            std::vector<double>& foundScales,\n                                            double detectThreshold = 0.0, Size winDetSize = Size(64, 128));\n\ntemplate<> CV_EXPORTS void DefaultDeleter<CvHaarClassifierCascade>::operator ()(CvHaarClassifierCascade* obj) const;\n\nenum { CASCADE_DO_CANNY_PRUNING    = 1,\n       CASCADE_SCALE_IMAGE         = 2,\n       CASCADE_FIND_BIGGEST_OBJECT = 4,\n       CASCADE_DO_ROUGH_SEARCH     = 8\n     };\n\nclass CV_EXPORTS_W BaseCascadeClassifier : public Algorithm\n{\npublic:\n    virtual ~BaseCascadeClassifier();\n    virtual bool empty() const = 0;\n    virtual bool load( const String& filename ) = 0;\n    virtual void detectMultiScale( InputArray image,\n                           CV_OUT std::vector<Rect>& objects,\n                           double scaleFactor,\n                           int minNeighbors, int flags,\n                           Size minSize, Size maxSize ) = 0;\n\n    virtual void detectMultiScale( InputArray image,\n                           CV_OUT std::vector<Rect>& objects,\n                           CV_OUT std::vector<int>& numDetections,\n                           double scaleFactor,\n                           int minNeighbors, int flags,\n                           Size minSize, Size maxSize ) = 0;\n\n    virtual void detectMultiScale( InputArray image,\n                                   CV_OUT std::vector<Rect>& objects,\n                                   CV_OUT std::vector<int>& rejectLevels,\n                                   CV_OUT std::vector<double>& levelWeights,\n                                   double scaleFactor,\n                                   int minNeighbors, int flags,\n                                   Size minSize, Size maxSize,\n                                   bool outputRejectLevels ) = 0;\n\n    virtual bool isOldFormatCascade() const = 0;\n    virtual Size getOriginalWindowSize() const = 0;\n    virtual int getFeatureType() const = 0;\n    virtual void* getOldCascade() = 0;\n\n    class CV_EXPORTS MaskGenerator\n    {\n    public:\n        virtual ~MaskGenerator() {}\n        virtual Mat generateMask(const Mat& src)=0;\n        virtual void initializeMask(const Mat& /*src*/) { }\n    };\n    virtual void setMaskGenerator(const Ptr<MaskGenerator>& maskGenerator) = 0;\n    virtual Ptr<MaskGenerator> getMaskGenerator() = 0;\n};\n\n/** @brief Cascade classifier class for object detection.\n */\nclass CV_EXPORTS_W CascadeClassifier\n{\npublic:\n    CV_WRAP CascadeClassifier();\n    /** @brief Loads a classifier from a file.\n\n    @param filename Name of the file from which the classifier is loaded.\n     */\n    CV_WRAP CascadeClassifier(const String& filename);\n    ~CascadeClassifier();\n    /** @brief Checks whether the classifier has been loaded.\n    */\n    CV_WRAP bool empty() const;\n    /** @brief Loads a classifier from a file.\n\n    @param filename Name of the file from which the classifier is loaded. The file may contain an old\n    HAAR classifier trained by the haartraining application or a new cascade classifier trained by the\n    traincascade application.\n     */\n    CV_WRAP bool load( const String& filename );\n    /** @brief Reads a classifier from a FileStorage node.\n\n    @note The file may contain a new cascade classifier (trained traincascade application) only.\n     */\n    CV_WRAP bool read( const FileNode& node );\n\n    /** @brief Detects objects of different sizes in the input image. The detected objects are returned as a list\n    of rectangles.\n\n    @param image Matrix of the type CV_8U containing an image where objects are detected.\n    @param objects Vector of rectangles where each rectangle contains the detected object, the\n    rectangles may be partially outside the original image.\n    @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.\n    @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have\n    to retain it.\n    @param flags Parameter with the same meaning for an old cascade as in the function\n    cvHaarDetectObjects. It is not used for a new cascade.\n    @param minSize Minimum possible object size. Objects smaller than that are ignored.\n    @param maxSize Maximum possible object size. Objects larger than that are ignored.\n\n    The function is parallelized with the TBB library.\n\n    @note\n       -   (Python) A face detection example using cascade classifiers can be found at\n            opencv_source_code/samples/python2/facedetect.py\n    */\n    CV_WRAP void detectMultiScale( InputArray image,\n                          CV_OUT std::vector<Rect>& objects,\n                          double scaleFactor = 1.1,\n                          int minNeighbors = 3, int flags = 0,\n                          Size minSize = Size(),\n                          Size maxSize = Size() );\n\n    /** @overload\n    @param image Matrix of the type CV_8U containing an image where objects are detected.\n    @param objects Vector of rectangles where each rectangle contains the detected object, the\n    rectangles may be partially outside the original image.\n    @param numDetections Vector of detection numbers for the corresponding objects. An object's number\n    of detections is the number of neighboring positively classified rectangles that were joined\n    together to form the object.\n    @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.\n    @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have\n    to retain it.\n    @param flags Parameter with the same meaning for an old cascade as in the function\n    cvHaarDetectObjects. It is not used for a new cascade.\n    @param minSize Minimum possible object size. Objects smaller than that are ignored.\n    @param maxSize Maximum possible object size. Objects larger than that are ignored.\n    */\n    CV_WRAP_AS(detectMultiScale2) void detectMultiScale( InputArray image,\n                          CV_OUT std::vector<Rect>& objects,\n                          CV_OUT std::vector<int>& numDetections,\n                          double scaleFactor=1.1,\n                          int minNeighbors=3, int flags=0,\n                          Size minSize=Size(),\n                          Size maxSize=Size() );\n\n    /** @overload\n    if `outputRejectLevels` is `true` returns `rejectLevels` and `levelWeights`\n    */\n    CV_WRAP_AS(detectMultiScale3) void detectMultiScale( InputArray image,\n                                  CV_OUT std::vector<Rect>& objects,\n                                  CV_OUT std::vector<int>& rejectLevels,\n                                  CV_OUT std::vector<double>& levelWeights,\n                                  double scaleFactor = 1.1,\n                                  int minNeighbors = 3, int flags = 0,\n                                  Size minSize = Size(),\n                                  Size maxSize = Size(),\n                                  bool outputRejectLevels = false );\n\n    CV_WRAP bool isOldFormatCascade() const;\n    CV_WRAP Size getOriginalWindowSize() const;\n    CV_WRAP int getFeatureType() const;\n    void* getOldCascade();\n\n    CV_WRAP static bool convert(const String& oldcascade, const String& newcascade);\n\n    void setMaskGenerator(const Ptr<BaseCascadeClassifier::MaskGenerator>& maskGenerator);\n    Ptr<BaseCascadeClassifier::MaskGenerator> getMaskGenerator();\n\n    Ptr<BaseCascadeClassifier> cc;\n};\n\nCV_EXPORTS Ptr<BaseCascadeClassifier::MaskGenerator> createFaceDetectionMaskGenerator();\n\n//////////////// HOG (Histogram-of-Oriented-Gradients) Descriptor and Object Detector //////////////\n\n//! struct for detection region of interest (ROI)\nstruct DetectionROI\n{\n   //! scale(size) of the bounding box\n   double scale;\n   //! set of requrested locations to be evaluated\n   std::vector<cv::Point> locations;\n   //! vector that will contain confidence values for each location\n   std::vector<double> confidences;\n};\n\nstruct CV_EXPORTS_W HOGDescriptor\n{\npublic:\n    enum { L2Hys = 0\n         };\n    enum { DEFAULT_NLEVELS = 64\n         };\n\n    CV_WRAP HOGDescriptor() : winSize(64,128), blockSize(16,16), blockStride(8,8),\n        cellSize(8,8), nbins(9), derivAperture(1), winSigma(-1),\n        histogramNormType(HOGDescriptor::L2Hys), L2HysThreshold(0.2), gammaCorrection(true),\n        free_coef(-1.f), nlevels(HOGDescriptor::DEFAULT_NLEVELS), signedGradient(false)\n    {}\n\n    CV_WRAP HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride,\n                  Size _cellSize, int _nbins, int _derivAperture=1, double _winSigma=-1,\n                  int _histogramNormType=HOGDescriptor::L2Hys,\n                  double _L2HysThreshold=0.2, bool _gammaCorrection=false,\n                  int _nlevels=HOGDescriptor::DEFAULT_NLEVELS, bool _signedGradient=false)\n    : winSize(_winSize), blockSize(_blockSize), blockStride(_blockStride), cellSize(_cellSize),\n    nbins(_nbins), derivAperture(_derivAperture), winSigma(_winSigma),\n    histogramNormType(_histogramNormType), L2HysThreshold(_L2HysThreshold),\n    gammaCorrection(_gammaCorrection), free_coef(-1.f), nlevels(_nlevels), signedGradient(_signedGradient)\n    {}\n\n    CV_WRAP HOGDescriptor(const String& filename)\n    {\n        load(filename);\n    }\n\n    HOGDescriptor(const HOGDescriptor& d)\n    {\n        d.copyTo(*this);\n    }\n\n    virtual ~HOGDescriptor() {}\n\n    CV_WRAP size_t getDescriptorSize() const;\n    CV_WRAP bool checkDetectorSize() const;\n    CV_WRAP double getWinSigma() const;\n\n    CV_WRAP virtual void setSVMDetector(InputArray _svmdetector);\n\n    virtual bool read(FileNode& fn);\n    virtual void write(FileStorage& fs, const String& objname) const;\n\n    CV_WRAP virtual bool load(const String& filename, const String& objname = String());\n    CV_WRAP virtual void save(const String& filename, const String& objname = String()) const;\n    virtual void copyTo(HOGDescriptor& c) const;\n\n    CV_WRAP virtual void compute(InputArray img,\n                         CV_OUT std::vector<float>& descriptors,\n                         Size winStride = Size(), Size padding = Size(),\n                         const std::vector<Point>& locations = std::vector<Point>()) const;\n\n    //! with found weights output\n    CV_WRAP virtual void detect(const Mat& img, CV_OUT std::vector<Point>& foundLocations,\n                        CV_OUT std::vector<double>& weights,\n                        double hitThreshold = 0, Size winStride = Size(),\n                        Size padding = Size(),\n                        const std::vector<Point>& searchLocations = std::vector<Point>()) const;\n    //! without found weights output\n    virtual void detect(const Mat& img, CV_OUT std::vector<Point>& foundLocations,\n                        double hitThreshold = 0, Size winStride = Size(),\n                        Size padding = Size(),\n                        const std::vector<Point>& searchLocations=std::vector<Point>()) const;\n\n    //! with result weights output\n    CV_WRAP virtual void detectMultiScale(InputArray img, CV_OUT std::vector<Rect>& foundLocations,\n                                  CV_OUT std::vector<double>& foundWeights, double hitThreshold = 0,\n                                  Size winStride = Size(), Size padding = Size(), double scale = 1.05,\n                                  double finalThreshold = 2.0,bool useMeanshiftGrouping = false) const;\n    //! without found weights output\n    virtual void detectMultiScale(InputArray img, CV_OUT std::vector<Rect>& foundLocations,\n                                  double hitThreshold = 0, Size winStride = Size(),\n                                  Size padding = Size(), double scale = 1.05,\n                                  double finalThreshold = 2.0, bool useMeanshiftGrouping = false) const;\n\n    CV_WRAP virtual void computeGradient(const Mat& img, CV_OUT Mat& grad, CV_OUT Mat& angleOfs,\n                                 Size paddingTL = Size(), Size paddingBR = Size()) const;\n\n    CV_WRAP static std::vector<float> getDefaultPeopleDetector();\n    CV_WRAP static std::vector<float> getDaimlerPeopleDetector();\n\n    CV_PROP Size winSize;\n    CV_PROP Size blockSize;\n    CV_PROP Size blockStride;\n    CV_PROP Size cellSize;\n    CV_PROP int nbins;\n    CV_PROP int derivAperture;\n    CV_PROP double winSigma;\n    CV_PROP int histogramNormType;\n    CV_PROP double L2HysThreshold;\n    CV_PROP bool gammaCorrection;\n    CV_PROP std::vector<float> svmDetector;\n    UMat oclSvmDetector;\n    float free_coef;\n    CV_PROP int nlevels;\n    CV_PROP bool signedGradient;\n\n\n    //! evaluate specified ROI and return confidence value for each location\n    virtual void detectROI(const cv::Mat& img, const std::vector<cv::Point> &locations,\n                                   CV_OUT std::vector<cv::Point>& foundLocations, CV_OUT std::vector<double>& confidences,\n                                   double hitThreshold = 0, cv::Size winStride = Size(),\n                                   cv::Size padding = Size()) const;\n\n    //! evaluate specified ROI and return confidence value for each location in multiple scales\n    virtual void detectMultiScaleROI(const cv::Mat& img,\n                                                       CV_OUT std::vector<cv::Rect>& foundLocations,\n                                                       std::vector<DetectionROI>& locations,\n                                                       double hitThreshold = 0,\n                                                       int groupThreshold = 0) const;\n\n    //! read/parse Dalal's alt model file\n    void readALTModel(String modelfile);\n    void groupRectangles(std::vector<cv::Rect>& rectList, std::vector<double>& weights, int groupThreshold, double eps) const;\n};\n\n//! @} objdetect\n\n}\n\n#include \"opencv2/objdetect/detection_based_tracker.hpp\"\n\n#ifndef DISABLE_OPENCV_24_COMPATIBILITY\n#include \"opencv2/objdetect/objdetect_c.h\"\n#endif\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/opencv.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2010, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_ALL_HPP__\n#define __OPENCV_ALL_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/imgproc.hpp\"\n#include \"opencv2/photo.hpp\"\n#include \"opencv2/video.hpp\"\n#include \"opencv2/features2d.hpp\"\n#include \"opencv2/objdetect.hpp\"\n#include \"opencv2/calib3d.hpp\"\n#include \"opencv2/imgcodecs.hpp\"\n#include \"opencv2/videoio.hpp\"\n#include \"opencv2/highgui.hpp\"\n#include \"opencv2/ml.hpp\"\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/opencv_modules.hpp",
    "content": "/*\r\n *      ** File generated automatically, do not modify **\r\n *\r\n * This file defines the list of modules available in current build configuration\r\n *\r\n *\r\n*/\r\n\r\n#define HAVE_OPENCV_CALIB3D\r\n#define HAVE_OPENCV_CORE\r\n#define HAVE_OPENCV_FEATURES2D\r\n#define HAVE_OPENCV_FLANN\r\n#define HAVE_OPENCV_HAL\r\n#define HAVE_OPENCV_IMGCODECS\r\n#define HAVE_OPENCV_IMGPROC\r\n#define HAVE_OPENCV_ML\r\n#define HAVE_OPENCV_OBJDETECT\r\n#define HAVE_OPENCV_PHOTO\r\n#define HAVE_OPENCV_SHAPE\r\n#define HAVE_OPENCV_STITCHING\r\n#define HAVE_OPENCV_VIDEO\r\n#define HAVE_OPENCV_VIDEOIO\r\n#define HAVE_OPENCV_VIDEOSTAB\r\n\r\n\r\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/photo/cuda.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2008-2012, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_PHOTO_CUDA_HPP__\n#define __OPENCV_PHOTO_CUDA_HPP__\n\n#include \"opencv2/core/cuda.hpp\"\n\nnamespace cv { namespace cuda {\n\n//! @addtogroup photo_denoise\n//! @{\n\n/** @brief Performs pure non local means denoising without any simplification, and thus it is not fast.\n\n@param src Source image. Supports only CV_8UC1, CV_8UC2 and CV_8UC3.\n@param dst Destination image.\n@param h Filter sigma regulating filter strength for color.\n@param search_window Size of search window.\n@param block_size Size of block used for computing weights.\n@param borderMode Border type. See borderInterpolate for details. BORDER_REFLECT101 ,\nBORDER_REPLICATE , BORDER_CONSTANT , BORDER_REFLECT and BORDER_WRAP are supported for now.\n@param stream Stream for the asynchronous version.\n\n@sa\n   fastNlMeansDenoising\n */\nCV_EXPORTS void nonLocalMeans(InputArray src, OutputArray dst,\n                              float h,\n                              int search_window = 21,\n                              int block_size = 7,\n                              int borderMode = BORDER_DEFAULT,\n                              Stream& stream = Stream::Null());\n\n/** @brief Perform image denoising using Non-local Means Denoising algorithm\n<http://www.ipol.im/pub/algo/bcm_non_local_means_denoising> with several computational\noptimizations. Noise expected to be a gaussian white noise\n\n@param src Input 8-bit 1-channel, 2-channel or 3-channel image.\n@param dst Output image with the same size and type as src .\n@param h Parameter regulating filter strength. Big h value perfectly removes noise but also\nremoves image details, smaller h value preserves details but also preserves some noise\n@param search_window Size in pixels of the window that is used to compute weighted average for\ngiven pixel. Should be odd. Affect performance linearly: greater search_window - greater\ndenoising time. Recommended value 21 pixels\n@param block_size Size in pixels of the template patch that is used to compute weights. Should be\nodd. Recommended value 7 pixels\n@param stream Stream for the asynchronous invocations.\n\nThis function expected to be applied to grayscale images. For colored images look at\nFastNonLocalMeansDenoising::labMethod.\n\n@sa\n   fastNlMeansDenoising\n */\nCV_EXPORTS void fastNlMeansDenoising(InputArray src, OutputArray dst,\n                                     float h,\n                                     int search_window = 21,\n                                     int block_size = 7,\n                                     Stream& stream = Stream::Null());\n\n/** @brief Modification of fastNlMeansDenoising function for colored images\n\n@param src Input 8-bit 3-channel image.\n@param dst Output image with the same size and type as src .\n@param h_luminance Parameter regulating filter strength. Big h value perfectly removes noise but\nalso removes image details, smaller h value preserves details but also preserves some noise\n@param photo_render float The same as h but for color components. For most images value equals 10 will be\nenough to remove colored noise and do not distort colors\n@param search_window Size in pixels of the window that is used to compute weighted average for\ngiven pixel. Should be odd. Affect performance linearly: greater search_window - greater\ndenoising time. Recommended value 21 pixels\n@param block_size Size in pixels of the template patch that is used to compute weights. Should be\nodd. Recommended value 7 pixels\n@param stream Stream for the asynchronous invocations.\n\nThe function converts image to CIELAB colorspace and then separately denoise L and AB components\nwith given h parameters using FastNonLocalMeansDenoising::simpleMethod function.\n\n@sa\n   fastNlMeansDenoisingColored\n */\nCV_EXPORTS void fastNlMeansDenoisingColored(InputArray src, OutputArray dst,\n                                            float h_luminance, float photo_render,\n                                            int search_window = 21,\n                                            int block_size = 7,\n                                            Stream& stream = Stream::Null());\n\n//! @} photo\n\n}} // namespace cv { namespace cuda {\n\n#endif /* __OPENCV_PHOTO_CUDA_HPP__ */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/photo/photo.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/photo.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/photo/photo_c.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2008-2012, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_PHOTO_C_H__\n#define __OPENCV_PHOTO_C_H__\n\n#include \"opencv2/core/core_c.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup photo_c\n  @{\n  */\n\n/* Inpainting algorithms */\nenum InpaintingModes\n{\n    CV_INPAINT_NS      =0,\n    CV_INPAINT_TELEA   =1\n};\n\n\n/* Inpaints the selected region in the image */\nCVAPI(void) cvInpaint( const CvArr* src, const CvArr* inpaint_mask,\n                       CvArr* dst, double inpaintRange, int flags );\n\n/** @} */\n\n#ifdef __cplusplus\n} //extern \"C\"\n#endif\n\n#endif //__OPENCV_PHOTO_C_H__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/photo.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2008-2012, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_PHOTO_HPP__\n#define __OPENCV_PHOTO_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/imgproc.hpp\"\n\n/**\n@defgroup photo Computational Photography\n@{\n    @defgroup photo_denoise Denoising\n    @defgroup photo_hdr HDR imaging\n\nThis section describes high dynamic range imaging algorithms namely tonemapping, exposure alignment,\ncamera calibration with multiple exposures and exposure fusion.\n\n    @defgroup photo_clone Seamless Cloning\n    @defgroup photo_render Non-Photorealistic Rendering\n    @defgroup photo_c C API\n@}\n  */\n\nnamespace cv\n{\n\n//! @addtogroup photo\n//! @{\n\n//! the inpainting algorithm\nenum\n{\n    INPAINT_NS    = 0, // Navier-Stokes algorithm\n    INPAINT_TELEA = 1 // A. Telea algorithm\n};\n\nenum\n{\n    NORMAL_CLONE = 1,\n    MIXED_CLONE  = 2,\n    MONOCHROME_TRANSFER = 3\n};\n\nenum\n{\n    RECURS_FILTER = 1,\n    NORMCONV_FILTER = 2\n};\n\n/** @brief Restores the selected region in an image using the region neighborhood.\n\n@param src Input 8-bit 1-channel or 3-channel image.\n@param inpaintMask Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that\nneeds to be inpainted.\n@param dst Output image with the same size and type as src .\n@param inpaintRadius Radius of a circular neighborhood of each point inpainted that is considered\nby the algorithm.\n@param flags Inpainting method that could be one of the following:\n-   **INPAINT_NS** Navier-Stokes based method [Navier01]\n-   **INPAINT_TELEA** Method by Alexandru Telea @cite Telea04 .\n\nThe function reconstructs the selected image area from the pixel near the area boundary. The\nfunction may be used to remove dust and scratches from a scanned photo, or to remove undesirable\nobjects from still images or video. See <http://en.wikipedia.org/wiki/Inpainting> for more details.\n\n@note\n   -   An example using the inpainting technique can be found at\n        opencv_source_code/samples/cpp/inpaint.cpp\n    -   (Python) An example using the inpainting technique can be found at\n        opencv_source_code/samples/python2/inpaint.py\n */\nCV_EXPORTS_W void inpaint( InputArray src, InputArray inpaintMask,\n        OutputArray dst, double inpaintRadius, int flags );\n\n//! @addtogroup photo_denoise\n//! @{\n\n/** @brief Perform image denoising using Non-local Means Denoising algorithm\n<http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational\noptimizations. Noise expected to be a gaussian white noise\n\n@param src Input 8-bit 1-channel, 2-channel, 3-channel or 4-channel image.\n@param dst Output image with the same size and type as src .\n@param templateWindowSize Size in pixels of the template patch that is used to compute weights.\nShould be odd. Recommended value 7 pixels\n@param searchWindowSize Size in pixels of the window that is used to compute weighted average for\ngiven pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater\ndenoising time. Recommended value 21 pixels\n@param h Parameter regulating filter strength. Big h value perfectly removes noise but also\nremoves image details, smaller h value preserves details but also preserves some noise\n\nThis function expected to be applied to grayscale images. For colored images look at\nfastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored\nimage in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting\nimage to CIELAB colorspace and then separately denoise L and AB components with different h\nparameter.\n */\nCV_EXPORTS_W void fastNlMeansDenoising( InputArray src, OutputArray dst, float h = 3,\n        int templateWindowSize = 7, int searchWindowSize = 21);\n\n/** @brief Perform image denoising using Non-local Means Denoising algorithm\n<http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational\noptimizations. Noise expected to be a gaussian white noise\n\n@param src Input 8-bit or 16-bit (only with NORM_L1) 1-channel,\n2-channel, 3-channel or 4-channel image.\n@param dst Output image with the same size and type as src .\n@param templateWindowSize Size in pixels of the template patch that is used to compute weights.\nShould be odd. Recommended value 7 pixels\n@param searchWindowSize Size in pixels of the window that is used to compute weighted average for\ngiven pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater\ndenoising time. Recommended value 21 pixels\n@param h Array of parameters regulating filter strength, either one\nparameter applied to all channels or one per channel in dst. Big h value\nperfectly removes noise but also removes image details, smaller h\nvalue preserves details but also preserves some noise\n@param normType Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1\n\nThis function expected to be applied to grayscale images. For colored images look at\nfastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored\nimage in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting\nimage to CIELAB colorspace and then separately denoise L and AB components with different h\nparameter.\n */\nCV_EXPORTS_W void fastNlMeansDenoising( InputArray src, OutputArray dst,\n                                        const std::vector<float>& h,\n                                        int templateWindowSize = 7, int searchWindowSize = 21,\n                                        int normType = NORM_L2);\n\n/** @brief Modification of fastNlMeansDenoising function for colored images\n\n@param src Input 8-bit 3-channel image.\n@param dst Output image with the same size and type as src .\n@param templateWindowSize Size in pixels of the template patch that is used to compute weights.\nShould be odd. Recommended value 7 pixels\n@param searchWindowSize Size in pixels of the window that is used to compute weighted average for\ngiven pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater\ndenoising time. Recommended value 21 pixels\n@param h Parameter regulating filter strength for luminance component. Bigger h value perfectly\nremoves noise but also removes image details, smaller h value preserves details but also preserves\nsome noise\n@param hColor The same as h but for color components. For most images value equals 10\nwill be enough to remove colored noise and do not distort colors\n\nThe function converts image to CIELAB colorspace and then separately denoise L and AB components\nwith given h parameters using fastNlMeansDenoising function.\n */\nCV_EXPORTS_W void fastNlMeansDenoisingColored( InputArray src, OutputArray dst,\n        float h = 3, float hColor = 3,\n        int templateWindowSize = 7, int searchWindowSize = 21);\n\n/** @brief Modification of fastNlMeansDenoising function for images sequence where consequtive images have been\ncaptured in small period of time. For example video. This version of the function is for grayscale\nimages or for manual manipulation with colorspaces. For more details see\n<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>\n\n@param srcImgs Input 8-bit 1-channel, 2-channel, 3-channel or\n4-channel images sequence. All images should have the same type and\nsize.\n@param imgToDenoiseIndex Target image to denoise index in srcImgs sequence\n@param temporalWindowSize Number of surrounding images to use for target image denoising. Should\nbe odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to\nimgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise\nsrcImgs[imgToDenoiseIndex] image.\n@param dst Output image with the same size and type as srcImgs images.\n@param templateWindowSize Size in pixels of the template patch that is used to compute weights.\nShould be odd. Recommended value 7 pixels\n@param searchWindowSize Size in pixels of the window that is used to compute weighted average for\ngiven pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater\ndenoising time. Recommended value 21 pixels\n@param h Parameter regulating filter strength. Bigger h value\nperfectly removes noise but also removes image details, smaller h\nvalue preserves details but also preserves some noise\n */\nCV_EXPORTS_W void fastNlMeansDenoisingMulti( InputArrayOfArrays srcImgs, OutputArray dst,\n        int imgToDenoiseIndex, int temporalWindowSize,\n        float h = 3, int templateWindowSize = 7, int searchWindowSize = 21);\n\n/** @brief Modification of fastNlMeansDenoising function for images sequence where consequtive images have been\ncaptured in small period of time. For example video. This version of the function is for grayscale\nimages or for manual manipulation with colorspaces. For more details see\n<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>\n\n@param srcImgs Input 8-bit or 16-bit (only with NORM_L1) 1-channel,\n2-channel, 3-channel or 4-channel images sequence. All images should\nhave the same type and size.\n@param imgToDenoiseIndex Target image to denoise index in srcImgs sequence\n@param temporalWindowSize Number of surrounding images to use for target image denoising. Should\nbe odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to\nimgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise\nsrcImgs[imgToDenoiseIndex] image.\n@param dst Output image with the same size and type as srcImgs images.\n@param templateWindowSize Size in pixels of the template patch that is used to compute weights.\nShould be odd. Recommended value 7 pixels\n@param searchWindowSize Size in pixels of the window that is used to compute weighted average for\ngiven pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater\ndenoising time. Recommended value 21 pixels\n@param h Array of parameters regulating filter strength, either one\nparameter applied to all channels or one per channel in dst. Big h value\nperfectly removes noise but also removes image details, smaller h\nvalue preserves details but also preserves some noise\n@param normType Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1\n */\nCV_EXPORTS_W void fastNlMeansDenoisingMulti( InputArrayOfArrays srcImgs, OutputArray dst,\n                                             int imgToDenoiseIndex, int temporalWindowSize,\n                                             const std::vector<float>& h,\n                                             int templateWindowSize = 7, int searchWindowSize = 21,\n                                             int normType = NORM_L2);\n\n/** @brief Modification of fastNlMeansDenoisingMulti function for colored images sequences\n\n@param srcImgs Input 8-bit 3-channel images sequence. All images should have the same type and\nsize.\n@param imgToDenoiseIndex Target image to denoise index in srcImgs sequence\n@param temporalWindowSize Number of surrounding images to use for target image denoising. Should\nbe odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to\nimgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise\nsrcImgs[imgToDenoiseIndex] image.\n@param dst Output image with the same size and type as srcImgs images.\n@param templateWindowSize Size in pixels of the template patch that is used to compute weights.\nShould be odd. Recommended value 7 pixels\n@param searchWindowSize Size in pixels of the window that is used to compute weighted average for\ngiven pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater\ndenoising time. Recommended value 21 pixels\n@param h Parameter regulating filter strength for luminance component. Bigger h value perfectly\nremoves noise but also removes image details, smaller h value preserves details but also preserves\nsome noise.\n@param hColor The same as h but for color components.\n\nThe function converts images to CIELAB colorspace and then separately denoise L and AB components\nwith given h parameters using fastNlMeansDenoisingMulti function.\n */\nCV_EXPORTS_W void fastNlMeansDenoisingColoredMulti( InputArrayOfArrays srcImgs, OutputArray dst,\n        int imgToDenoiseIndex, int temporalWindowSize,\n        float h = 3, float hColor = 3,\n        int templateWindowSize = 7, int searchWindowSize = 21);\n\n/** @brief Primal-dual algorithm is an algorithm for solving special types of variational problems (that is,\nfinding a function to minimize some functional). As the image denoising, in particular, may be seen\nas the variational problem, primal-dual algorithm then can be used to perform denoising and this is\nexactly what is implemented.\n\nIt should be noted, that this implementation was taken from the July 2013 blog entry\n@cite MA13 , which also contained (slightly more general) ready-to-use source code on Python.\nSubsequently, that code was rewritten on C++ with the usage of openCV by Vadim Pisarevsky at the end\nof July 2013 and finally it was slightly adapted by later authors.\n\nAlthough the thorough discussion and justification of the algorithm involved may be found in\n@cite ChambolleEtAl, it might make sense to skim over it here, following @cite MA13 . To begin\nwith, we consider the 1-byte gray-level images as the functions from the rectangular domain of\npixels (it may be seen as set\n\\f$\\left\\{(x,y)\\in\\mathbb{N}\\times\\mathbb{N}\\mid 1\\leq x\\leq n,\\;1\\leq y\\leq m\\right\\}\\f$ for some\n\\f$m,\\;n\\in\\mathbb{N}\\f$) into \\f$\\{0,1,\\dots,255\\}\\f$. We shall denote the noised images as \\f$f_i\\f$ and with\nthis view, given some image \\f$x\\f$ of the same size, we may measure how bad it is by the formula\n\n\\f[\\left\\|\\left\\|\\nabla x\\right\\|\\right\\| + \\lambda\\sum_i\\left\\|\\left\\|x-f_i\\right\\|\\right\\|\\f]\n\n\\f$\\|\\|\\cdot\\|\\|\\f$ here denotes \\f$L_2\\f$-norm and as you see, the first addend states that we want our\nimage to be smooth (ideally, having zero gradient, thus being constant) and the second states that\nwe want our result to be close to the observations we've got. If we treat \\f$x\\f$ as a function, this is\nexactly the functional what we seek to minimize and here the Primal-Dual algorithm comes into play.\n\n@param observations This array should contain one or more noised versions of the image that is to\nbe restored.\n@param result Here the denoised image will be stored. There is no need to do pre-allocation of\nstorage space, as it will be automatically allocated, if necessary.\n@param lambda Corresponds to \\f$\\lambda\\f$ in the formulas above. As it is enlarged, the smooth\n(blurred) images are treated more favorably than detailed (but maybe more noised) ones. Roughly\nspeaking, as it becomes smaller, the result will be more blur but more sever outliers will be\nremoved.\n@param niters Number of iterations that the algorithm will run. Of course, as more iterations as\nbetter, but it is hard to quantitatively refine this statement, so just use the default and\nincrease it if the results are poor.\n */\nCV_EXPORTS_W void denoise_TVL1(const std::vector<Mat>& observations,Mat& result, double lambda=1.0, int niters=30);\n\n//! @} photo_denoise\n\n//! @addtogroup photo_hdr\n//! @{\n\nenum { LDR_SIZE = 256 };\n\n/** @brief Base class for tonemapping algorithms - tools that are used to map HDR image to 8-bit range.\n */\nclass CV_EXPORTS_W Tonemap : public Algorithm\n{\npublic:\n    /** @brief Tonemaps image\n\n    @param src source image - 32-bit 3-channel Mat\n    @param dst destination image - 32-bit 3-channel Mat with values in [0, 1] range\n     */\n    CV_WRAP virtual void process(InputArray src, OutputArray dst) = 0;\n\n    CV_WRAP virtual float getGamma() const = 0;\n    CV_WRAP virtual void setGamma(float gamma) = 0;\n};\n\n/** @brief Creates simple linear mapper with gamma correction\n\n@param gamma positive value for gamma correction. Gamma value of 1.0 implies no correction, gamma\nequal to 2.2f is suitable for most displays.\nGenerally gamma \\> 1 brightens the image and gamma \\< 1 darkens it.\n */\nCV_EXPORTS_W Ptr<Tonemap> createTonemap(float gamma = 1.0f);\n\n/** @brief Adaptive logarithmic mapping is a fast global tonemapping algorithm that scales the image in\nlogarithmic domain.\n\nSince it's a global operator the same function is applied to all the pixels, it is controlled by the\nbias parameter.\n\nOptional saturation enhancement is possible as described in @cite FL02 .\n\nFor more information see @cite DM03 .\n */\nclass CV_EXPORTS_W TonemapDrago : public Tonemap\n{\npublic:\n\n    CV_WRAP virtual float getSaturation() const = 0;\n    CV_WRAP virtual void setSaturation(float saturation) = 0;\n\n    CV_WRAP virtual float getBias() const = 0;\n    CV_WRAP virtual void setBias(float bias) = 0;\n};\n\n/** @brief Creates TonemapDrago object\n\n@param gamma gamma value for gamma correction. See createTonemap\n@param saturation positive saturation enhancement value. 1.0 preserves saturation, values greater\nthan 1 increase saturation and values less than 1 decrease it.\n@param bias value for bias function in [0, 1] range. Values from 0.7 to 0.9 usually give best\nresults, default value is 0.85.\n */\nCV_EXPORTS_W Ptr<TonemapDrago> createTonemapDrago(float gamma = 1.0f, float saturation = 1.0f, float bias = 0.85f);\n\n/** @brief This algorithm decomposes image into two layers: base layer and detail layer using bilateral filter\nand compresses contrast of the base layer thus preserving all the details.\n\nThis implementation uses regular bilateral filter from opencv.\n\nSaturation enhancement is possible as in ocvTonemapDrago.\n\nFor more information see @cite DD02 .\n */\nclass CV_EXPORTS_W TonemapDurand : public Tonemap\n{\npublic:\n\n    CV_WRAP virtual float getSaturation() const = 0;\n    CV_WRAP virtual void setSaturation(float saturation) = 0;\n\n    CV_WRAP virtual float getContrast() const = 0;\n    CV_WRAP virtual void setContrast(float contrast) = 0;\n\n    CV_WRAP virtual float getSigmaSpace() const = 0;\n    CV_WRAP virtual void setSigmaSpace(float sigma_space) = 0;\n\n    CV_WRAP virtual float getSigmaColor() const = 0;\n    CV_WRAP virtual void setSigmaColor(float sigma_color) = 0;\n};\n\n/** @brief Creates TonemapDurand object\n\n@param gamma gamma value for gamma correction. See createTonemap\n@param contrast resulting contrast on logarithmic scale, i. e. log(max / min), where max and min\nare maximum and minimum luminance values of the resulting image.\n@param saturation saturation enhancement value. See createTonemapDrago\n@param sigma_space bilateral filter sigma in color space\n@param sigma_color bilateral filter sigma in coordinate space\n */\nCV_EXPORTS_W Ptr<TonemapDurand>\ncreateTonemapDurand(float gamma = 1.0f, float contrast = 4.0f, float saturation = 1.0f, float sigma_space = 2.0f, float sigma_color = 2.0f);\n\n/** @brief This is a global tonemapping operator that models human visual system.\n\nMapping function is controlled by adaptation parameter, that is computed using light adaptation and\ncolor adaptation.\n\nFor more information see @cite RD05 .\n */\nclass CV_EXPORTS_W TonemapReinhard : public Tonemap\n{\npublic:\n    CV_WRAP virtual float getIntensity() const = 0;\n    CV_WRAP virtual void setIntensity(float intensity) = 0;\n\n    CV_WRAP virtual float getLightAdaptation() const = 0;\n    CV_WRAP virtual void setLightAdaptation(float light_adapt) = 0;\n\n    CV_WRAP virtual float getColorAdaptation() const = 0;\n    CV_WRAP virtual void setColorAdaptation(float color_adapt) = 0;\n};\n\n/** @brief Creates TonemapReinhard object\n\n@param gamma gamma value for gamma correction. See createTonemap\n@param intensity result intensity in [-8, 8] range. Greater intensity produces brighter results.\n@param light_adapt light adaptation in [0, 1] range. If 1 adaptation is based only on pixel\nvalue, if 0 it's global, otherwise it's a weighted mean of this two cases.\n@param color_adapt chromatic adaptation in [0, 1] range. If 1 channels are treated independently,\nif 0 adaptation level is the same for each channel.\n */\nCV_EXPORTS_W Ptr<TonemapReinhard>\ncreateTonemapReinhard(float gamma = 1.0f, float intensity = 0.0f, float light_adapt = 1.0f, float color_adapt = 0.0f);\n\n/** @brief This algorithm transforms image to contrast using gradients on all levels of gaussian pyramid,\ntransforms contrast values to HVS response and scales the response. After this the image is\nreconstructed from new contrast values.\n\nFor more information see @cite MM06 .\n */\nclass CV_EXPORTS_W TonemapMantiuk : public Tonemap\n{\npublic:\n    CV_WRAP virtual float getScale() const = 0;\n    CV_WRAP virtual void setScale(float scale) = 0;\n\n    CV_WRAP virtual float getSaturation() const = 0;\n    CV_WRAP virtual void setSaturation(float saturation) = 0;\n};\n\n/** @brief Creates TonemapMantiuk object\n\n@param gamma gamma value for gamma correction. See createTonemap\n@param scale contrast scale factor. HVS response is multiplied by this parameter, thus compressing\ndynamic range. Values from 0.6 to 0.9 produce best results.\n@param saturation saturation enhancement value. See createTonemapDrago\n */\nCV_EXPORTS_W Ptr<TonemapMantiuk>\ncreateTonemapMantiuk(float gamma = 1.0f, float scale = 0.7f, float saturation = 1.0f);\n\n/** @brief The base class for algorithms that align images of the same scene with different exposures\n */\nclass CV_EXPORTS_W AlignExposures : public Algorithm\n{\npublic:\n    /** @brief Aligns images\n\n    @param src vector of input images\n    @param dst vector of aligned images\n    @param times vector of exposure time values for each image\n    @param response 256x1 matrix with inverse camera response function for each pixel value, it should\n    have the same number of channels as images.\n     */\n    CV_WRAP virtual void process(InputArrayOfArrays src, std::vector<Mat>& dst,\n                                 InputArray times, InputArray response) = 0;\n};\n\n/** @brief This algorithm converts images to median threshold bitmaps (1 for pixels brighter than median\nluminance and 0 otherwise) and than aligns the resulting bitmaps using bit operations.\n\nIt is invariant to exposure, so exposure values and camera response are not necessary.\n\nIn this implementation new image regions are filled with zeros.\n\nFor more information see @cite GW03 .\n */\nclass CV_EXPORTS_W AlignMTB : public AlignExposures\n{\npublic:\n    CV_WRAP virtual void process(InputArrayOfArrays src, std::vector<Mat>& dst,\n                                 InputArray times, InputArray response) = 0;\n\n    /** @brief Short version of process, that doesn't take extra arguments.\n\n    @param src vector of input images\n    @param dst vector of aligned images\n     */\n    CV_WRAP virtual void process(InputArrayOfArrays src, std::vector<Mat>& dst) = 0;\n\n    /** @brief Calculates shift between two images, i. e. how to shift the second image to correspond it with the\n    first.\n\n    @param img0 first image\n    @param img1 second image\n     */\n    CV_WRAP virtual Point calculateShift(InputArray img0, InputArray img1) = 0;\n    /** @brief Helper function, that shift Mat filling new regions with zeros.\n\n    @param src input image\n    @param dst result image\n    @param shift shift value\n     */\n    CV_WRAP virtual void shiftMat(InputArray src, OutputArray dst, const Point shift) = 0;\n    /** @brief Computes median threshold and exclude bitmaps of given image.\n\n    @param img input image\n    @param tb median threshold bitmap\n    @param eb exclude bitmap\n     */\n    CV_WRAP virtual void computeBitmaps(InputArray img, OutputArray tb, OutputArray eb) = 0;\n\n    CV_WRAP virtual int getMaxBits() const = 0;\n    CV_WRAP virtual void setMaxBits(int max_bits) = 0;\n\n    CV_WRAP virtual int getExcludeRange() const = 0;\n    CV_WRAP virtual void setExcludeRange(int exclude_range) = 0;\n\n    CV_WRAP virtual bool getCut() const = 0;\n    CV_WRAP virtual void setCut(bool value) = 0;\n};\n\n/** @brief Creates AlignMTB object\n\n@param max_bits logarithm to the base 2 of maximal shift in each dimension. Values of 5 and 6 are\nusually good enough (31 and 63 pixels shift respectively).\n@param exclude_range range for exclusion bitmap that is constructed to suppress noise around the\nmedian value.\n@param cut if true cuts images, otherwise fills the new regions with zeros.\n */\nCV_EXPORTS_W Ptr<AlignMTB> createAlignMTB(int max_bits = 6, int exclude_range = 4, bool cut = true);\n\n/** @brief The base class for camera response calibration algorithms.\n */\nclass CV_EXPORTS_W CalibrateCRF : public Algorithm\n{\npublic:\n    /** @brief Recovers inverse camera response.\n\n    @param src vector of input images\n    @param dst 256x1 matrix with inverse camera response function\n    @param times vector of exposure time values for each image\n     */\n    CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst, InputArray times) = 0;\n};\n\n/** @brief Inverse camera response function is extracted for each brightness value by minimizing an objective\nfunction as linear system. Objective function is constructed using pixel values on the same position\nin all images, extra term is added to make the result smoother.\n\nFor more information see @cite DM97 .\n */\nclass CV_EXPORTS_W CalibrateDebevec : public CalibrateCRF\n{\npublic:\n    CV_WRAP virtual float getLambda() const = 0;\n    CV_WRAP virtual void setLambda(float lambda) = 0;\n\n    CV_WRAP virtual int getSamples() const = 0;\n    CV_WRAP virtual void setSamples(int samples) = 0;\n\n    CV_WRAP virtual bool getRandom() const = 0;\n    CV_WRAP virtual void setRandom(bool random) = 0;\n};\n\n/** @brief Creates CalibrateDebevec object\n\n@param samples number of pixel locations to use\n@param lambda smoothness term weight. Greater values produce smoother results, but can alter the\nresponse.\n@param random if true sample pixel locations are chosen at random, otherwise the form a\nrectangular grid.\n */\nCV_EXPORTS_W Ptr<CalibrateDebevec> createCalibrateDebevec(int samples = 70, float lambda = 10.0f, bool random = false);\n\n/** @brief Inverse camera response function is extracted for each brightness value by minimizing an objective\nfunction as linear system. This algorithm uses all image pixels.\n\nFor more information see @cite RB99 .\n */\nclass CV_EXPORTS_W CalibrateRobertson : public CalibrateCRF\n{\npublic:\n    CV_WRAP virtual int getMaxIter() const = 0;\n    CV_WRAP virtual void setMaxIter(int max_iter) = 0;\n\n    CV_WRAP virtual float getThreshold() const = 0;\n    CV_WRAP virtual void setThreshold(float threshold) = 0;\n\n    CV_WRAP virtual Mat getRadiance() const = 0;\n};\n\n/** @brief Creates CalibrateRobertson object\n\n@param max_iter maximal number of Gauss-Seidel solver iterations.\n@param threshold target difference between results of two successive steps of the minimization.\n */\nCV_EXPORTS_W Ptr<CalibrateRobertson> createCalibrateRobertson(int max_iter = 30, float threshold = 0.01f);\n\n/** @brief The base class algorithms that can merge exposure sequence to a single image.\n */\nclass CV_EXPORTS_W MergeExposures : public Algorithm\n{\npublic:\n    /** @brief Merges images.\n\n    @param src vector of input images\n    @param dst result image\n    @param times vector of exposure time values for each image\n    @param response 256x1 matrix with inverse camera response function for each pixel value, it should\n    have the same number of channels as images.\n     */\n    CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst,\n                                 InputArray times, InputArray response) = 0;\n};\n\n/** @brief The resulting HDR image is calculated as weighted average of the exposures considering exposure\nvalues and camera response.\n\nFor more information see @cite DM97 .\n */\nclass CV_EXPORTS_W MergeDebevec : public MergeExposures\n{\npublic:\n    CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst,\n                                 InputArray times, InputArray response) = 0;\n    CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst, InputArray times) = 0;\n};\n\n/** @brief Creates MergeDebevec object\n */\nCV_EXPORTS_W Ptr<MergeDebevec> createMergeDebevec();\n\n/** @brief Pixels are weighted using contrast, saturation and well-exposedness measures, than images are\ncombined using laplacian pyramids.\n\nThe resulting image weight is constructed as weighted average of contrast, saturation and\nwell-exposedness measures.\n\nThe resulting image doesn't require tonemapping and can be converted to 8-bit image by multiplying\nby 255, but it's recommended to apply gamma correction and/or linear tonemapping.\n\nFor more information see @cite MK07 .\n */\nclass CV_EXPORTS_W MergeMertens : public MergeExposures\n{\npublic:\n    CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst,\n                                 InputArray times, InputArray response) = 0;\n    /** @brief Short version of process, that doesn't take extra arguments.\n\n    @param src vector of input images\n    @param dst result image\n     */\n    CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst) = 0;\n\n    CV_WRAP virtual float getContrastWeight() const = 0;\n    CV_WRAP virtual void setContrastWeight(float contrast_weiht) = 0;\n\n    CV_WRAP virtual float getSaturationWeight() const = 0;\n    CV_WRAP virtual void setSaturationWeight(float saturation_weight) = 0;\n\n    CV_WRAP virtual float getExposureWeight() const = 0;\n    CV_WRAP virtual void setExposureWeight(float exposure_weight) = 0;\n};\n\n/** @brief Creates MergeMertens object\n\n@param contrast_weight contrast measure weight. See MergeMertens.\n@param saturation_weight saturation measure weight\n@param exposure_weight well-exposedness measure weight\n */\nCV_EXPORTS_W Ptr<MergeMertens>\ncreateMergeMertens(float contrast_weight = 1.0f, float saturation_weight = 1.0f, float exposure_weight = 0.0f);\n\n/** @brief The resulting HDR image is calculated as weighted average of the exposures considering exposure\nvalues and camera response.\n\nFor more information see @cite RB99 .\n */\nclass CV_EXPORTS_W MergeRobertson : public MergeExposures\n{\npublic:\n    CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst,\n                                 InputArray times, InputArray response) = 0;\n    CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst, InputArray times) = 0;\n};\n\n/** @brief Creates MergeRobertson object\n */\nCV_EXPORTS_W Ptr<MergeRobertson> createMergeRobertson();\n\n//! @} photo_hdr\n\n/** @brief Transforms a color image to a grayscale image. It is a basic tool in digital printing, stylized\nblack-and-white photograph rendering, and in many single channel image processing applications\n@cite CL12 .\n\n@param src Input 8-bit 3-channel image.\n@param grayscale Output 8-bit 1-channel image.\n@param color_boost Output 8-bit 3-channel image.\n\nThis function is to be applied on color images.\n */\nCV_EXPORTS_W void decolor( InputArray src, OutputArray grayscale, OutputArray color_boost);\n\n//! @addtogroup photo_clone\n//! @{\n\n/** @brief Image editing tasks concern either global changes (color/intensity corrections, filters,\ndeformations) or local changes concerned to a selection. Here we are interested in achieving local\nchanges, ones that are restricted to a region manually selected (ROI), in a seamless and effortless\nmanner. The extent of the changes ranges from slight distortions to complete replacement by novel\ncontent @cite PM03 .\n\n@param src Input 8-bit 3-channel image.\n@param dst Input 8-bit 3-channel image.\n@param mask Input 8-bit 1 or 3-channel image.\n@param p Point in dst image where object is placed.\n@param blend Output image with the same size and type as dst.\n@param flags Cloning method that could be one of the following:\n-   **NORMAL_CLONE** The power of the method is fully expressed when inserting objects with\ncomplex outlines into a new background\n-   **MIXED_CLONE** The classic method, color-based selection and alpha masking might be time\nconsuming and often leaves an undesirable halo. Seamless cloning, even averaged with the\noriginal image, is not effective. Mixed seamless cloning based on a loose selection proves\neffective.\n-   **FEATURE_EXCHANGE** Feature exchange allows the user to easily replace certain features of\none object by alternative features.\n */\nCV_EXPORTS_W void seamlessClone( InputArray src, InputArray dst, InputArray mask, Point p,\n        OutputArray blend, int flags);\n\n/** @brief Given an original color image, two differently colored versions of this image can be mixed\nseamlessly.\n\n@param src Input 8-bit 3-channel image.\n@param mask Input 8-bit 1 or 3-channel image.\n@param dst Output image with the same size and type as src .\n@param red_mul R-channel multiply factor.\n@param green_mul G-channel multiply factor.\n@param blue_mul B-channel multiply factor.\n\nMultiplication factor is between .5 to 2.5.\n */\nCV_EXPORTS_W void colorChange(InputArray src, InputArray mask, OutputArray dst, float red_mul = 1.0f,\n        float green_mul = 1.0f, float blue_mul = 1.0f);\n\n/** @brief Applying an appropriate non-linear transformation to the gradient field inside the selection and\nthen integrating back with a Poisson solver, modifies locally the apparent illumination of an image.\n\n@param src Input 8-bit 3-channel image.\n@param mask Input 8-bit 1 or 3-channel image.\n@param dst Output image with the same size and type as src.\n@param alpha Value ranges between 0-2.\n@param beta Value ranges between 0-2.\n\nThis is useful to highlight under-exposed foreground objects or to reduce specular reflections.\n */\nCV_EXPORTS_W void illuminationChange(InputArray src, InputArray mask, OutputArray dst,\n        float alpha = 0.2f, float beta = 0.4f);\n\n/** @brief By retaining only the gradients at edge locations, before integrating with the Poisson solver, one\nwashes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge\nDetector is used.\n\n@param src Input 8-bit 3-channel image.\n@param mask Input 8-bit 1 or 3-channel image.\n@param dst Output image with the same size and type as src.\n@param low_threshold Range from 0 to 100.\n@param high_threshold Value \\> 100.\n@param kernel_size The size of the Sobel kernel to be used.\n\n**NOTE:**\n\nThe algorithm assumes that the color of the source image is close to that of the destination. This\nassumption means that when the colors don't match, the source image color gets tinted toward the\ncolor of the destination image.\n */\nCV_EXPORTS_W void textureFlattening(InputArray src, InputArray mask, OutputArray dst,\n        float low_threshold = 30, float high_threshold = 45,\n        int kernel_size = 3);\n\n//! @} photo_clone\n\n//! @addtogroup photo_render\n//! @{\n\n/** @brief Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing\nfilters are used in many different applications @cite EM11 .\n\n@param src Input 8-bit 3-channel image.\n@param dst Output 8-bit 3-channel image.\n@param flags Edge preserving filters:\n-   **RECURS_FILTER** = 1\n-   **NORMCONV_FILTER** = 2\n@param sigma_s Range between 0 to 200.\n@param sigma_r Range between 0 to 1.\n */\nCV_EXPORTS_W void edgePreservingFilter(InputArray src, OutputArray dst, int flags = 1,\n        float sigma_s = 60, float sigma_r = 0.4f);\n\n/** @brief This filter enhances the details of a particular image.\n\n@param src Input 8-bit 3-channel image.\n@param dst Output image with the same size and type as src.\n@param sigma_s Range between 0 to 200.\n@param sigma_r Range between 0 to 1.\n */\nCV_EXPORTS_W void detailEnhance(InputArray src, OutputArray dst, float sigma_s = 10,\n        float sigma_r = 0.15f);\n\n/** @brief Pencil-like non-photorealistic line drawing\n\n@param src Input 8-bit 3-channel image.\n@param dst1 Output 8-bit 1-channel image.\n@param dst2 Output image with the same size and type as src.\n@param sigma_s Range between 0 to 200.\n@param sigma_r Range between 0 to 1.\n@param shade_factor Range between 0 to 0.1.\n */\nCV_EXPORTS_W void pencilSketch(InputArray src, OutputArray dst1, OutputArray dst2,\n        float sigma_s = 60, float sigma_r = 0.07f, float shade_factor = 0.02f);\n\n/** @brief Stylization aims to produce digital imagery with a wide variety of effects not focused on\nphotorealism. Edge-aware filters are ideal for stylization, as they can abstract regions of low\ncontrast while preserving, or enhancing, high-contrast features.\n\n@param src Input 8-bit 3-channel image.\n@param dst Output image with the same size and type as src.\n@param sigma_s Range between 0 to 200.\n@param sigma_r Range between 0 to 1.\n */\nCV_EXPORTS_W void stylization(InputArray src, OutputArray dst, float sigma_s = 60,\n        float sigma_r = 0.45f);\n\n//! @} photo_render\n\n//! @} photo\n\n} // cv\n\n#ifndef DISABLE_OPENCV_24_COMPATIBILITY\n#include \"opencv2/photo/photo_c.h\"\n#endif\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/shape/emdL1.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2012, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_EMD_L1_HPP__\n#define __OPENCV_EMD_L1_HPP__\n\n#include \"opencv2/core.hpp\"\n\nnamespace cv\n{\n/****************************************************************************************\\\n*                                   EMDL1 Function                                      *\n\\****************************************************************************************/\n\n//! @addtogroup shape\n//! @{\n\n/** @brief Computes the \"minimal work\" distance between two weighted point configurations base on the papers\n\"EMD-L1: An efficient and Robust Algorithm for comparing histogram-based descriptors\", by Haibin\nLing and Kazunori Okuda; and \"The Earth Mover's Distance is the Mallows Distance: Some Insights from\nStatistics\", by Elizaveta Levina and Peter Bickel.\n\n@param signature1 First signature, a single column floating-point matrix. Each row is the value of\nthe histogram in each bin.\n@param signature2 Second signature of the same format and size as signature1.\n */\nCV_EXPORTS float EMDL1(InputArray signature1, InputArray signature2);\n\n//! @}\n\n}//namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/shape/hist_cost.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_HIST_COST_HPP__\n#define __OPENCV_HIST_COST_HPP__\n\n#include \"opencv2/imgproc.hpp\"\n\nnamespace cv\n{\n\n//! @addtogroup shape\n//! @{\n\n/** @brief Abstract base class for histogram cost algorithms.\n */\nclass CV_EXPORTS_W HistogramCostExtractor : public Algorithm\n{\npublic:\n    CV_WRAP virtual void buildCostMatrix(InputArray descriptors1, InputArray descriptors2, OutputArray costMatrix) = 0;\n\n    CV_WRAP virtual void setNDummies(int nDummies) = 0;\n    CV_WRAP virtual int getNDummies() const = 0;\n\n    CV_WRAP virtual void setDefaultCost(float defaultCost) = 0;\n    CV_WRAP virtual float getDefaultCost() const = 0;\n};\n\n/** @brief A norm based cost extraction. :\n */\nclass CV_EXPORTS_W NormHistogramCostExtractor : public HistogramCostExtractor\n{\npublic:\n    CV_WRAP virtual void setNormFlag(int flag) = 0;\n    CV_WRAP virtual int getNormFlag() const = 0;\n};\n\nCV_EXPORTS_W Ptr<HistogramCostExtractor>\n    createNormHistogramCostExtractor(int flag=DIST_L2, int nDummies=25, float defaultCost=0.2f);\n\n/** @brief An EMD based cost extraction. :\n */\nclass CV_EXPORTS_W EMDHistogramCostExtractor : public HistogramCostExtractor\n{\npublic:\n    CV_WRAP virtual void setNormFlag(int flag) = 0;\n    CV_WRAP virtual int getNormFlag() const = 0;\n};\n\nCV_EXPORTS_W Ptr<HistogramCostExtractor>\n    createEMDHistogramCostExtractor(int flag=DIST_L2, int nDummies=25, float defaultCost=0.2f);\n\n/** @brief An Chi based cost extraction. :\n */\nclass CV_EXPORTS_W ChiHistogramCostExtractor : public HistogramCostExtractor\n{};\n\nCV_EXPORTS_W Ptr<HistogramCostExtractor> createChiHistogramCostExtractor(int nDummies=25, float defaultCost=0.2f);\n\n/** @brief An EMD-L1 based cost extraction. :\n */\nclass CV_EXPORTS_W EMDL1HistogramCostExtractor : public HistogramCostExtractor\n{};\n\nCV_EXPORTS_W Ptr<HistogramCostExtractor>\n    createEMDL1HistogramCostExtractor(int nDummies=25, float defaultCost=0.2f);\n\n//! @}\n\n} // cv\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/shape/shape.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/shape.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/shape/shape_distance.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_SHAPE_SHAPE_DISTANCE_HPP__\n#define __OPENCV_SHAPE_SHAPE_DISTANCE_HPP__\n#include \"opencv2/core.hpp\"\n#include \"opencv2/shape/hist_cost.hpp\"\n#include \"opencv2/shape/shape_transformer.hpp\"\n\nnamespace cv\n{\n\n//! @addtogroup shape\n//! @{\n\n/** @brief Abstract base class for shape distance algorithms.\n */\nclass CV_EXPORTS_W ShapeDistanceExtractor : public Algorithm\n{\npublic:\n    /** @brief Compute the shape distance between two shapes defined by its contours.\n\n    @param contour1 Contour defining first shape.\n    @param contour2 Contour defining second shape.\n     */\n    CV_WRAP virtual float computeDistance(InputArray contour1, InputArray contour2) = 0;\n};\n\n/***********************************************************************************/\n/***********************************************************************************/\n/***********************************************************************************/\n/** @brief Implementation of the Shape Context descriptor and matching algorithm\n\nproposed by Belongie et al. in \"Shape Matching and Object Recognition Using Shape Contexts\" (PAMI\n2002). This implementation is packaged in a generic scheme, in order to allow you the\nimplementation of the common variations of the original pipeline.\n*/\nclass CV_EXPORTS_W ShapeContextDistanceExtractor : public ShapeDistanceExtractor\n{\npublic:\n    /** @brief Establish the number of angular bins for the Shape Context Descriptor used in the shape matching\n    pipeline.\n\n    @param nAngularBins The number of angular bins in the shape context descriptor.\n     */\n    CV_WRAP virtual void setAngularBins(int nAngularBins) = 0;\n    CV_WRAP virtual int getAngularBins() const = 0;\n\n    /** @brief Establish the number of radial bins for the Shape Context Descriptor used in the shape matching\n    pipeline.\n\n    @param nRadialBins The number of radial bins in the shape context descriptor.\n     */\n    CV_WRAP virtual void setRadialBins(int nRadialBins) = 0;\n    CV_WRAP virtual int getRadialBins() const = 0;\n\n    /** @brief Set the inner radius of the shape context descriptor.\n\n    @param innerRadius The value of the inner radius.\n     */\n    CV_WRAP virtual void setInnerRadius(float innerRadius) = 0;\n    CV_WRAP virtual float getInnerRadius() const = 0;\n\n    /** @brief Set the outer radius of the shape context descriptor.\n\n    @param outerRadius The value of the outer radius.\n     */\n    CV_WRAP virtual void setOuterRadius(float outerRadius) = 0;\n    CV_WRAP virtual float getOuterRadius() const = 0;\n\n    CV_WRAP virtual void setRotationInvariant(bool rotationInvariant) = 0;\n    CV_WRAP virtual bool getRotationInvariant() const = 0;\n\n    /** @brief Set the weight of the shape context distance in the final value of the shape distance. The shape\n    context distance between two shapes is defined as the symmetric sum of shape context matching costs\n    over best matching points. The final value of the shape distance is a user-defined linear\n    combination of the shape context distance, an image appearance distance, and a bending energy.\n\n    @param shapeContextWeight The weight of the shape context distance in the final distance value.\n     */\n    CV_WRAP virtual void setShapeContextWeight(float shapeContextWeight) = 0;\n    CV_WRAP virtual float getShapeContextWeight() const = 0;\n\n    /** @brief Set the weight of the Image Appearance cost in the final value of the shape distance. The image\n    appearance cost is defined as the sum of squared brightness differences in Gaussian windows around\n    corresponding image points. The final value of the shape distance is a user-defined linear\n    combination of the shape context distance, an image appearance distance, and a bending energy. If\n    this value is set to a number different from 0, is mandatory to set the images that correspond to\n    each shape.\n\n    @param imageAppearanceWeight The weight of the appearance cost in the final distance value.\n     */\n    CV_WRAP virtual void setImageAppearanceWeight(float imageAppearanceWeight) = 0;\n    CV_WRAP virtual float getImageAppearanceWeight() const = 0;\n\n    /** @brief Set the weight of the Bending Energy in the final value of the shape distance. The bending energy\n    definition depends on what transformation is being used to align the shapes. The final value of the\n    shape distance is a user-defined linear combination of the shape context distance, an image\n    appearance distance, and a bending energy.\n\n    @param bendingEnergyWeight The weight of the Bending Energy in the final distance value.\n     */\n    CV_WRAP virtual void setBendingEnergyWeight(float bendingEnergyWeight) = 0;\n    CV_WRAP virtual float getBendingEnergyWeight() const = 0;\n\n    /** @brief Set the images that correspond to each shape. This images are used in the calculation of the Image\n    Appearance cost.\n\n    @param image1 Image corresponding to the shape defined by contours1.\n    @param image2 Image corresponding to the shape defined by contours2.\n     */\n    CV_WRAP virtual void setImages(InputArray image1, InputArray image2) = 0;\n    CV_WRAP virtual void getImages(OutputArray image1, OutputArray image2) const = 0;\n\n    CV_WRAP virtual void setIterations(int iterations) = 0;\n    CV_WRAP virtual int getIterations() const = 0;\n\n    /** @brief Set the algorithm used for building the shape context descriptor cost matrix.\n\n    @param comparer Smart pointer to a HistogramCostExtractor, an algorithm that defines the cost\n    matrix between descriptors.\n     */\n    CV_WRAP virtual void setCostExtractor(Ptr<HistogramCostExtractor> comparer) = 0;\n    CV_WRAP virtual Ptr<HistogramCostExtractor> getCostExtractor() const = 0;\n\n    /** @brief Set the value of the standard deviation for the Gaussian window for the image appearance cost.\n\n    @param sigma Standard Deviation.\n     */\n    CV_WRAP virtual void setStdDev(float sigma) = 0;\n    CV_WRAP virtual float getStdDev() const = 0;\n\n    /** @brief Set the algorithm used for aligning the shapes.\n\n    @param transformer Smart pointer to a ShapeTransformer, an algorithm that defines the aligning\n    transformation.\n     */\n    CV_WRAP virtual void setTransformAlgorithm(Ptr<ShapeTransformer> transformer) = 0;\n    CV_WRAP virtual Ptr<ShapeTransformer> getTransformAlgorithm() const = 0;\n};\n\n/* Complete constructor */\nCV_EXPORTS_W Ptr<ShapeContextDistanceExtractor>\n    createShapeContextDistanceExtractor(int nAngularBins=12, int nRadialBins=4,\n                                        float innerRadius=0.2f, float outerRadius=2, int iterations=3,\n                                        const Ptr<HistogramCostExtractor> &comparer = createChiHistogramCostExtractor(),\n                                        const Ptr<ShapeTransformer> &transformer = createThinPlateSplineShapeTransformer());\n\n/***********************************************************************************/\n/***********************************************************************************/\n/***********************************************************************************/\n/** @brief A simple Hausdorff distance measure between shapes defined by contours\n\naccording to the paper \"Comparing Images using the Hausdorff distance.\" by D.P. Huttenlocher, G.A.\nKlanderman, and W.J. Rucklidge. (PAMI 1993). :\n */\nclass CV_EXPORTS_W HausdorffDistanceExtractor : public ShapeDistanceExtractor\n{\npublic:\n    /** @brief Set the norm used to compute the Hausdorff value between two shapes. It can be L1 or L2 norm.\n\n    @param distanceFlag Flag indicating which norm is used to compute the Hausdorff distance\n    (NORM_L1, NORM_L2).\n     */\n    CV_WRAP virtual void setDistanceFlag(int distanceFlag) = 0;\n    CV_WRAP virtual int getDistanceFlag() const = 0;\n\n    /** @brief This method sets the rank proportion (or fractional value) that establish the Kth ranked value of\n    the partial Hausdorff distance. Experimentally had been shown that 0.6 is a good value to compare\n    shapes.\n\n    @param rankProportion fractional value (between 0 and 1).\n     */\n    CV_WRAP virtual void setRankProportion(float rankProportion) = 0;\n    CV_WRAP virtual float getRankProportion() const = 0;\n};\n\n/* Constructor */\nCV_EXPORTS_W Ptr<HausdorffDistanceExtractor> createHausdorffDistanceExtractor(int distanceFlag=cv::NORM_L2, float rankProp=0.6f);\n\n//! @}\n\n} // cv\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/shape/shape_transformer.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_SHAPE_SHAPE_TRANSFORM_HPP__\n#define __OPENCV_SHAPE_SHAPE_TRANSFORM_HPP__\n#include <vector>\n#include \"opencv2/core.hpp\"\n#include \"opencv2/imgproc.hpp\"\n\nnamespace cv\n{\n\n//! @addtogroup shape\n//! @{\n\n/** @brief Abstract base class for shape transformation algorithms.\n */\nclass CV_EXPORTS_W ShapeTransformer : public Algorithm\n{\npublic:\n    /** @brief Estimate the transformation parameters of the current transformer algorithm, based on point matches.\n\n    @param transformingShape Contour defining first shape.\n    @param targetShape Contour defining second shape (Target).\n    @param matches Standard vector of Matches between points.\n     */\n    CV_WRAP virtual void estimateTransformation(InputArray transformingShape, InputArray targetShape,\n                                                 std::vector<DMatch>& matches) = 0;\n\n    /** @brief Apply a transformation, given a pre-estimated transformation parameters.\n\n    @param input Contour (set of points) to apply the transformation.\n    @param output Output contour.\n     */\n    CV_WRAP virtual float applyTransformation(InputArray input, OutputArray output=noArray()) = 0;\n\n    /** @brief Apply a transformation, given a pre-estimated transformation parameters, to an Image.\n\n    @param transformingImage Input image.\n    @param output Output image.\n    @param flags Image interpolation method.\n    @param borderMode border style.\n    @param borderValue border value.\n     */\n    CV_WRAP virtual void warpImage(InputArray transformingImage, OutputArray output,\n                                   int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT,\n                                   const Scalar& borderValue=Scalar()) const = 0;\n};\n\n/***********************************************************************************/\n/***********************************************************************************/\n\n/** @brief Definition of the transformation\n\nocupied in the paper \"Principal Warps: Thin-Plate Splines and Decomposition of Deformations\", by\nF.L. Bookstein (PAMI 1989). :\n */\nclass CV_EXPORTS_W ThinPlateSplineShapeTransformer : public ShapeTransformer\n{\npublic:\n    /** @brief Set the regularization parameter for relaxing the exact interpolation requirements of the TPS\n    algorithm.\n\n    @param beta value of the regularization parameter.\n     */\n    CV_WRAP virtual void setRegularizationParameter(double beta) = 0;\n    CV_WRAP virtual double getRegularizationParameter() const = 0;\n};\n\n/** Complete constructor */\nCV_EXPORTS_W Ptr<ThinPlateSplineShapeTransformer>\n    createThinPlateSplineShapeTransformer(double regularizationParameter=0);\n\n/***********************************************************************************/\n/***********************************************************************************/\n\n/** @brief Wrapper class for the OpenCV Affine Transformation algorithm. :\n */\nclass CV_EXPORTS_W AffineTransformer : public ShapeTransformer\n{\npublic:\n    CV_WRAP virtual void setFullAffine(bool fullAffine) = 0;\n    CV_WRAP virtual bool getFullAffine() const = 0;\n};\n\n/** Complete constructor */\nCV_EXPORTS_W Ptr<AffineTransformer> createAffineTransformer(bool fullAffine);\n\n//! @}\n\n} // cv\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/shape.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2012, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_SHAPE_HPP__\n#define __OPENCV_SHAPE_HPP__\n\n#include \"opencv2/shape/emdL1.hpp\"\n#include \"opencv2/shape/shape_transformer.hpp\"\n#include \"opencv2/shape/hist_cost.hpp\"\n#include \"opencv2/shape/shape_distance.hpp\"\n\n/**\n  @defgroup shape Shape Distance and Matching\n */\n\n#endif\n\n/* End of file. */\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/autocalib.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_AUTOCALIB_HPP__\n#define __OPENCV_STITCHING_AUTOCALIB_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"matchers.hpp\"\n\nnamespace cv {\nnamespace detail {\n\n//! @addtogroup stitching_autocalib\n//! @{\n\n/** @brief Tries to estimate focal lengths from the given homography under the assumption that the camera\nundergoes rotations around its centre only.\n\n@param H Homography.\n@param f0 Estimated focal length along X axis.\n@param f1 Estimated focal length along Y axis.\n@param f0_ok True, if f0 was estimated successfully, false otherwise.\n@param f1_ok True, if f1 was estimated successfully, false otherwise.\n\nSee \"Construction of Panoramic Image Mosaics with Global and Local Alignment\"\nby Heung-Yeung Shum and Richard Szeliski.\n */\nvoid CV_EXPORTS focalsFromHomography(const Mat &H, double &f0, double &f1, bool &f0_ok, bool &f1_ok);\n\n/** @brief Estimates focal lengths for each given camera.\n\n@param features Features of images.\n@param pairwise_matches Matches between all image pairs.\n@param focals Estimated focal lengths for each camera.\n */\nvoid CV_EXPORTS estimateFocal(const std::vector<ImageFeatures> &features,\n                              const std::vector<MatchesInfo> &pairwise_matches,\n                              std::vector<double> &focals);\n\nbool CV_EXPORTS calibrateRotatingCamera(const std::vector<Mat> &Hs, Mat &K);\n\n//! @} stitching_autocalib\n\n} // namespace detail\n} // namespace cv\n\n#endif // __OPENCV_STITCHING_AUTOCALIB_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/blenders.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_BLENDERS_HPP__\n#define __OPENCV_STITCHING_BLENDERS_HPP__\n\n#include \"opencv2/core.hpp\"\n\nnamespace cv {\nnamespace detail {\n\n//! @addtogroup stitching_blend\n//! @{\n\n/** @brief Base class for all blenders.\n\nSimple blender which puts one image over another\n*/\nclass CV_EXPORTS Blender\n{\npublic:\n    virtual ~Blender() {}\n\n    enum { NO, FEATHER, MULTI_BAND };\n    static Ptr<Blender> createDefault(int type, bool try_gpu = false);\n\n    /** @brief Prepares the blender for blending.\n\n    @param corners Source images top-left corners\n    @param sizes Source image sizes\n     */\n    void prepare(const std::vector<Point> &corners, const std::vector<Size> &sizes);\n    /** @overload */\n    virtual void prepare(Rect dst_roi);\n    /** @brief Processes the image.\n\n    @param img Source image\n    @param mask Source image mask\n    @param tl Source image top-left corners\n     */\n    virtual void feed(InputArray img, InputArray mask, Point tl);\n    /** @brief Blends and returns the final pano.\n\n    @param dst Final pano\n    @param dst_mask Final pano mask\n     */\n    virtual void blend(InputOutputArray dst, InputOutputArray dst_mask);\n\nprotected:\n    UMat dst_, dst_mask_;\n    Rect dst_roi_;\n};\n\n/** @brief Simple blender which mixes images at its borders.\n */\nclass CV_EXPORTS FeatherBlender : public Blender\n{\npublic:\n    FeatherBlender(float sharpness = 0.02f);\n\n    float sharpness() const { return sharpness_; }\n    void setSharpness(float val) { sharpness_ = val; }\n\n    void prepare(Rect dst_roi);\n    void feed(InputArray img, InputArray mask, Point tl);\n    void blend(InputOutputArray dst, InputOutputArray dst_mask);\n\n    //! Creates weight maps for fixed set of source images by their masks and top-left corners.\n    //! Final image can be obtained by simple weighting of the source images.\n    Rect createWeightMaps(const std::vector<UMat> &masks, const std::vector<Point> &corners,\n                          std::vector<UMat> &weight_maps);\n\nprivate:\n    float sharpness_;\n    UMat weight_map_;\n    UMat dst_weight_map_;\n};\n\ninline FeatherBlender::FeatherBlender(float _sharpness) { setSharpness(_sharpness); }\n\n/** @brief Blender which uses multi-band blending algorithm (see @cite BA83).\n */\nclass CV_EXPORTS MultiBandBlender : public Blender\n{\npublic:\n    MultiBandBlender(int try_gpu = false, int num_bands = 5, int weight_type = CV_32F);\n\n    int numBands() const { return actual_num_bands_; }\n    void setNumBands(int val) { actual_num_bands_ = val; }\n\n    void prepare(Rect dst_roi);\n    void feed(InputArray img, InputArray mask, Point tl);\n    void blend(InputOutputArray dst, InputOutputArray dst_mask);\n\nprivate:\n    int actual_num_bands_, num_bands_;\n    std::vector<UMat> dst_pyr_laplace_;\n    std::vector<UMat> dst_band_weights_;\n    Rect dst_roi_final_;\n    bool can_use_gpu_;\n    int weight_type_; //CV_32F or CV_16S\n};\n\n\n//////////////////////////////////////////////////////////////////////////////\n// Auxiliary functions\n\nvoid CV_EXPORTS normalizeUsingWeightMap(InputArray weight, InputOutputArray src);\n\nvoid CV_EXPORTS createWeightMap(InputArray mask, float sharpness, InputOutputArray weight);\n\nvoid CV_EXPORTS createLaplacePyr(InputArray img, int num_levels, std::vector<UMat>& pyr);\nvoid CV_EXPORTS createLaplacePyrGpu(InputArray img, int num_levels, std::vector<UMat>& pyr);\n\n// Restores source image\nvoid CV_EXPORTS restoreImageFromLaplacePyr(std::vector<UMat>& pyr);\nvoid CV_EXPORTS restoreImageFromLaplacePyrGpu(std::vector<UMat>& pyr);\n\n//! @}\n\n} // namespace detail\n} // namespace cv\n\n#endif // __OPENCV_STITCHING_BLENDERS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/camera.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_CAMERA_HPP__\n#define __OPENCV_STITCHING_CAMERA_HPP__\n\n#include \"opencv2/core.hpp\"\n\nnamespace cv {\nnamespace detail {\n\n//! @addtogroup stitching\n//! @{\n\n/** @brief Describes camera parameters.\n\n@note Translation is assumed to be zero during the whole stitching pipeline. :\n */\nstruct CV_EXPORTS CameraParams\n{\n    CameraParams();\n    CameraParams(const CameraParams& other);\n    const CameraParams& operator =(const CameraParams& other);\n    Mat K() const;\n\n    double focal; // Focal length\n    double aspect; // Aspect ratio\n    double ppx; // Principal point X\n    double ppy; // Principal point Y\n    Mat R; // Rotation\n    Mat t; // Translation\n};\n\n//! @}\n\n} // namespace detail\n} // namespace cv\n\n#endif // #ifndef __OPENCV_STITCHING_CAMERA_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/exposure_compensate.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_EXPOSURE_COMPENSATE_HPP__\n#define __OPENCV_STITCHING_EXPOSURE_COMPENSATE_HPP__\n\n#include \"opencv2/core.hpp\"\n\nnamespace cv {\nnamespace detail {\n\n//! @addtogroup stitching_exposure\n//! @{\n\n/** @brief Base class for all exposure compensators.\n */\nclass CV_EXPORTS ExposureCompensator\n{\npublic:\n    virtual ~ExposureCompensator() {}\n\n    enum { NO, GAIN, GAIN_BLOCKS };\n    static Ptr<ExposureCompensator> createDefault(int type);\n\n    /**\n    @param corners Source image top-left corners\n    @param images Source images\n    @param masks Image masks to update (second value in pair specifies the value which should be used\n    to detect where image is)\n     */\n    void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,\n              const std::vector<UMat> &masks);\n    /** @overload */\n    virtual void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,\n                      const std::vector<std::pair<UMat,uchar> > &masks) = 0;\n    /** @brief Compensate exposure in the specified image.\n\n    @param index Image index\n    @param corner Image top-left corner\n    @param image Image to process\n    @param mask Image mask\n     */\n    virtual void apply(int index, Point corner, InputOutputArray image, InputArray mask) = 0;\n};\n\n/** @brief Stub exposure compensator which does nothing.\n */\nclass CV_EXPORTS NoExposureCompensator : public ExposureCompensator\n{\npublic:\n    void feed(const std::vector<Point> &/*corners*/, const std::vector<UMat> &/*images*/,\n              const std::vector<std::pair<UMat,uchar> > &/*masks*/) { }\n    void apply(int /*index*/, Point /*corner*/, InputOutputArray /*image*/, InputArray /*mask*/) { }\n};\n\n/** @brief Exposure compensator which tries to remove exposure related artifacts by adjusting image\nintensities, see @cite BL07 and @cite WJ10 for details.\n */\nclass CV_EXPORTS GainCompensator : public ExposureCompensator\n{\npublic:\n    void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,\n              const std::vector<std::pair<UMat,uchar> > &masks);\n    void apply(int index, Point corner, InputOutputArray image, InputArray mask);\n    std::vector<double> gains() const;\n\nprivate:\n    Mat_<double> gains_;\n};\n\n/** @brief Exposure compensator which tries to remove exposure related artifacts by adjusting image block\nintensities, see @cite UES01 for details.\n */\nclass CV_EXPORTS BlocksGainCompensator : public ExposureCompensator\n{\npublic:\n    BlocksGainCompensator(int bl_width = 32, int bl_height = 32)\n            : bl_width_(bl_width), bl_height_(bl_height) {}\n    void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,\n              const std::vector<std::pair<UMat,uchar> > &masks);\n    void apply(int index, Point corner, InputOutputArray image, InputArray mask);\n\nprivate:\n    int bl_width_, bl_height_;\n    std::vector<UMat> gain_maps_;\n};\n\n//! @}\n\n} // namespace detail\n} // namespace cv\n\n#endif // __OPENCV_STITCHING_EXPOSURE_COMPENSATE_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/matchers.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_MATCHERS_HPP__\n#define __OPENCV_STITCHING_MATCHERS_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/features2d.hpp\"\n\n#include \"opencv2/opencv_modules.hpp\"\n\n#ifdef HAVE_OPENCV_XFEATURES2D\n#  include \"opencv2/xfeatures2d/cuda.hpp\"\n#endif\n\nnamespace cv {\nnamespace detail {\n\n//! @addtogroup stitching_match\n//! @{\n\n/** @brief Structure containing image keypoints and descriptors. */\nstruct CV_EXPORTS ImageFeatures\n{\n    int img_idx;\n    Size img_size;\n    std::vector<KeyPoint> keypoints;\n    UMat descriptors;\n};\n\n/** @brief Feature finders base class */\nclass CV_EXPORTS FeaturesFinder\n{\npublic:\n    virtual ~FeaturesFinder() {}\n    /** @overload */\n    void operator ()(InputArray image, ImageFeatures &features);\n    /** @brief Finds features in the given image.\n\n    @param image Source image\n    @param features Found features\n    @param rois Regions of interest\n\n    @sa detail::ImageFeatures, Rect_\n    */\n    void operator ()(InputArray image, ImageFeatures &features, const std::vector<cv::Rect> &rois);\n    /** @brief Frees unused memory allocated before if there is any. */\n    virtual void collectGarbage() {}\n\nprotected:\n    /** @brief This method must implement features finding logic in order to make the wrappers\n    detail::FeaturesFinder::operator()_ work.\n\n    @param image Source image\n    @param features Found features\n\n    @sa detail::ImageFeatures */\n    virtual void find(InputArray image, ImageFeatures &features) = 0;\n};\n\n/** @brief SURF features finder.\n\n@sa detail::FeaturesFinder, SURF\n*/\nclass CV_EXPORTS SurfFeaturesFinder : public FeaturesFinder\n{\npublic:\n    SurfFeaturesFinder(double hess_thresh = 300., int num_octaves = 3, int num_layers = 4,\n                       int num_octaves_descr = /*4*/3, int num_layers_descr = /*2*/4);\n\nprivate:\n    void find(InputArray image, ImageFeatures &features);\n\n    Ptr<FeatureDetector> detector_;\n    Ptr<DescriptorExtractor> extractor_;\n    Ptr<Feature2D> surf;\n};\n\n/** @brief ORB features finder. :\n\n@sa detail::FeaturesFinder, ORB\n*/\nclass CV_EXPORTS OrbFeaturesFinder : public FeaturesFinder\n{\npublic:\n    OrbFeaturesFinder(Size _grid_size = Size(3,1), int nfeatures=1500, float scaleFactor=1.3f, int nlevels=5);\n\nprivate:\n    void find(InputArray image, ImageFeatures &features);\n\n    Ptr<ORB> orb;\n    Size grid_size;\n};\n\n\n#ifdef HAVE_OPENCV_XFEATURES2D\nclass CV_EXPORTS SurfFeaturesFinderGpu : public FeaturesFinder\n{\npublic:\n    SurfFeaturesFinderGpu(double hess_thresh = 300., int num_octaves = 3, int num_layers = 4,\n                          int num_octaves_descr = 4, int num_layers_descr = 2);\n\n    void collectGarbage();\n\nprivate:\n    void find(InputArray image, ImageFeatures &features);\n\n    cuda::GpuMat image_;\n    cuda::GpuMat gray_image_;\n    cuda::SURF_CUDA surf_;\n    cuda::GpuMat keypoints_;\n    cuda::GpuMat descriptors_;\n    int num_octaves_, num_layers_;\n    int num_octaves_descr_, num_layers_descr_;\n};\n#endif\n\n/** @brief Structure containing information about matches between two images.\n\nIt's assumed that there is a homography between those images.\n*/\nstruct CV_EXPORTS MatchesInfo\n{\n    MatchesInfo();\n    MatchesInfo(const MatchesInfo &other);\n    const MatchesInfo& operator =(const MatchesInfo &other);\n\n    int src_img_idx, dst_img_idx;       //!< Images indices (optional)\n    std::vector<DMatch> matches;\n    std::vector<uchar> inliers_mask;    //!< Geometrically consistent matches mask\n    int num_inliers;                    //!< Number of geometrically consistent matches\n    Mat H;                              //!< Estimated homography\n    double confidence;                  //!< Confidence two images are from the same panorama\n};\n\n/** @brief Feature matchers base class. */\nclass CV_EXPORTS FeaturesMatcher\n{\npublic:\n    virtual ~FeaturesMatcher() {}\n\n    /** @overload\n    @param features1 First image features\n    @param features2 Second image features\n    @param matches_info Found matches\n    */\n    void operator ()(const ImageFeatures &features1, const ImageFeatures &features2,\n                     MatchesInfo& matches_info) { match(features1, features2, matches_info); }\n\n    /** @brief Performs images matching.\n\n    @param features Features of the source images\n    @param pairwise_matches Found pairwise matches\n    @param mask Mask indicating which image pairs must be matched\n\n    The function is parallelized with the TBB library.\n\n    @sa detail::MatchesInfo\n    */\n    void operator ()(const std::vector<ImageFeatures> &features, std::vector<MatchesInfo> &pairwise_matches,\n                     const cv::UMat &mask = cv::UMat());\n\n    /** @return True, if it's possible to use the same matcher instance in parallel, false otherwise\n    */\n    bool isThreadSafe() const { return is_thread_safe_; }\n\n    /** @brief Frees unused memory allocated before if there is any.\n    */\n    virtual void collectGarbage() {}\n\nprotected:\n    FeaturesMatcher(bool is_thread_safe = false) : is_thread_safe_(is_thread_safe) {}\n\n    /** @brief This method must implement matching logic in order to make the wrappers\n    detail::FeaturesMatcher::operator()_ work.\n\n    @param features1 first image features\n    @param features2 second image features\n    @param matches_info found matches\n     */\n    virtual void match(const ImageFeatures &features1, const ImageFeatures &features2,\n                       MatchesInfo& matches_info) = 0;\n\n    bool is_thread_safe_;\n};\n\n/** @brief Features matcher which finds two best matches for each feature and leaves the best one only if the\nratio between descriptor distances is greater than the threshold match_conf\n\n@sa detail::FeaturesMatcher\n */\nclass CV_EXPORTS BestOf2NearestMatcher : public FeaturesMatcher\n{\npublic:\n    /** @brief Constructs a \"best of 2 nearest\" matcher.\n\n    @param try_use_gpu Should try to use GPU or not\n    @param match_conf Match distances ration threshold\n    @param num_matches_thresh1 Minimum number of matches required for the 2D projective transform\n    estimation used in the inliers classification step\n    @param num_matches_thresh2 Minimum number of matches required for the 2D projective transform\n    re-estimation on inliers\n     */\n    BestOf2NearestMatcher(bool try_use_gpu = false, float match_conf = 0.3f, int num_matches_thresh1 = 6,\n                          int num_matches_thresh2 = 6);\n\n    void collectGarbage();\n\nprotected:\n    void match(const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo &matches_info);\n\n    int num_matches_thresh1_;\n    int num_matches_thresh2_;\n    Ptr<FeaturesMatcher> impl_;\n};\n\nclass CV_EXPORTS BestOf2NearestRangeMatcher : public BestOf2NearestMatcher\n{\npublic:\n    BestOf2NearestRangeMatcher(int range_width = 5, bool try_use_gpu = false, float match_conf = 0.3f,\n                            int num_matches_thresh1 = 6, int num_matches_thresh2 = 6);\n\n    void operator ()(const std::vector<ImageFeatures> &features, std::vector<MatchesInfo> &pairwise_matches,\n                     const cv::UMat &mask = cv::UMat());\n\n\nprotected:\n    int range_width_;\n};\n\n//! @} stitching_match\n\n} // namespace detail\n} // namespace cv\n\n#endif // __OPENCV_STITCHING_MATCHERS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/motion_estimators.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_MOTION_ESTIMATORS_HPP__\n#define __OPENCV_STITCHING_MOTION_ESTIMATORS_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"matchers.hpp\"\n#include \"util.hpp\"\n#include \"camera.hpp\"\n\nnamespace cv {\nnamespace detail {\n\n//! @addtogroup stitching_rotation\n//! @{\n\n/** @brief Rotation estimator base class.\n\nIt takes features of all images, pairwise matches between all images and estimates rotations of all\ncameras.\n\n@note The coordinate system origin is implementation-dependent, but you can always normalize the\nrotations in respect to the first camera, for instance. :\n */\nclass CV_EXPORTS Estimator\n{\npublic:\n    virtual ~Estimator() {}\n\n    /** @brief Estimates camera parameters.\n\n    @param features Features of images\n    @param pairwise_matches Pairwise matches of images\n    @param cameras Estimated camera parameters\n    @return True in case of success, false otherwise\n     */\n    bool operator ()(const std::vector<ImageFeatures> &features,\n                     const std::vector<MatchesInfo> &pairwise_matches,\n                     std::vector<CameraParams> &cameras)\n        { return estimate(features, pairwise_matches, cameras); }\n\nprotected:\n    /** @brief This method must implement camera parameters estimation logic in order to make the wrapper\n    detail::Estimator::operator()_ work.\n\n    @param features Features of images\n    @param pairwise_matches Pairwise matches of images\n    @param cameras Estimated camera parameters\n    @return True in case of success, false otherwise\n     */\n    virtual bool estimate(const std::vector<ImageFeatures> &features,\n                          const std::vector<MatchesInfo> &pairwise_matches,\n                          std::vector<CameraParams> &cameras) = 0;\n};\n\n/** @brief Homography based rotation estimator.\n */\nclass CV_EXPORTS HomographyBasedEstimator : public Estimator\n{\npublic:\n    HomographyBasedEstimator(bool is_focals_estimated = false)\n        : is_focals_estimated_(is_focals_estimated) {}\n\nprivate:\n    virtual bool estimate(const std::vector<ImageFeatures> &features,\n                          const std::vector<MatchesInfo> &pairwise_matches,\n                          std::vector<CameraParams> &cameras);\n\n    bool is_focals_estimated_;\n};\n\n/** @brief Base class for all camera parameters refinement methods.\n */\nclass CV_EXPORTS BundleAdjusterBase : public Estimator\n{\npublic:\n    const Mat refinementMask() const { return refinement_mask_.clone(); }\n    void setRefinementMask(const Mat &mask)\n    {\n        CV_Assert(mask.type() == CV_8U && mask.size() == Size(3, 3));\n        refinement_mask_ = mask.clone();\n    }\n\n    double confThresh() const { return conf_thresh_; }\n    void setConfThresh(double conf_thresh) { conf_thresh_ = conf_thresh; }\n\n    TermCriteria termCriteria() { return term_criteria_; }\n    void setTermCriteria(const TermCriteria& term_criteria) { term_criteria_ = term_criteria; }\n\nprotected:\n    /** @brief Construct a bundle adjuster base instance.\n\n    @param num_params_per_cam Number of parameters per camera\n    @param num_errs_per_measurement Number of error terms (components) per match\n     */\n    BundleAdjusterBase(int num_params_per_cam, int num_errs_per_measurement)\n        : num_params_per_cam_(num_params_per_cam),\n          num_errs_per_measurement_(num_errs_per_measurement)\n    {\n        setRefinementMask(Mat::ones(3, 3, CV_8U));\n        setConfThresh(1.);\n        setTermCriteria(TermCriteria(TermCriteria::EPS + TermCriteria::COUNT, 1000, DBL_EPSILON));\n    }\n\n    // Runs bundle adjustment\n    virtual bool estimate(const std::vector<ImageFeatures> &features,\n                          const std::vector<MatchesInfo> &pairwise_matches,\n                          std::vector<CameraParams> &cameras);\n\n    /** @brief Sets initial camera parameter to refine.\n\n    @param cameras Camera parameters\n     */\n    virtual void setUpInitialCameraParams(const std::vector<CameraParams> &cameras) = 0;\n    /** @brief Gets the refined camera parameters.\n\n    @param cameras Refined camera parameters\n     */\n    virtual void obtainRefinedCameraParams(std::vector<CameraParams> &cameras) const = 0;\n    /** @brief Calculates error vector.\n\n    @param err Error column-vector of length total_num_matches \\* num_errs_per_measurement\n     */\n    virtual void calcError(Mat &err) = 0;\n    /** @brief Calculates the cost function jacobian.\n\n    @param jac Jacobian matrix of dimensions\n    (total_num_matches \\* num_errs_per_measurement) x (num_images \\* num_params_per_cam)\n     */\n    virtual void calcJacobian(Mat &jac) = 0;\n\n    // 3x3 8U mask, where 0 means don't refine respective parameter, != 0 means refine\n    Mat refinement_mask_;\n\n    int num_images_;\n    int total_num_matches_;\n\n    int num_params_per_cam_;\n    int num_errs_per_measurement_;\n\n    const ImageFeatures *features_;\n    const MatchesInfo *pairwise_matches_;\n\n    // Threshold to filter out poorly matched image pairs\n    double conf_thresh_;\n\n    //Levenberg–Marquardt algorithm termination criteria\n    TermCriteria term_criteria_;\n\n    // Camera parameters matrix (CV_64F)\n    Mat cam_params_;\n\n    // Connected images pairs\n    std::vector<std::pair<int,int> > edges_;\n};\n\n\n/** @brief Implementation of the camera parameters refinement algorithm which minimizes sum of the reprojection\nerror squares\n\nIt can estimate focal length, aspect ratio, principal point.\nYou can affect only on them via the refinement mask.\n */\nclass CV_EXPORTS BundleAdjusterReproj : public BundleAdjusterBase\n{\npublic:\n    BundleAdjusterReproj() : BundleAdjusterBase(7, 2) {}\n\nprivate:\n    void setUpInitialCameraParams(const std::vector<CameraParams> &cameras);\n    void obtainRefinedCameraParams(std::vector<CameraParams> &cameras) const;\n    void calcError(Mat &err);\n    void calcJacobian(Mat &jac);\n\n    Mat err1_, err2_;\n};\n\n\n/** @brief Implementation of the camera parameters refinement algorithm which minimizes sum of the distances\nbetween the rays passing through the camera center and a feature. :\n\nIt can estimate focal length. It ignores the refinement mask for now.\n */\nclass CV_EXPORTS BundleAdjusterRay : public BundleAdjusterBase\n{\npublic:\n    BundleAdjusterRay() : BundleAdjusterBase(4, 3) {}\n\nprivate:\n    void setUpInitialCameraParams(const std::vector<CameraParams> &cameras);\n    void obtainRefinedCameraParams(std::vector<CameraParams> &cameras) const;\n    void calcError(Mat &err);\n    void calcJacobian(Mat &jac);\n\n    Mat err1_, err2_;\n};\n\n\nenum WaveCorrectKind\n{\n    WAVE_CORRECT_HORIZ,\n    WAVE_CORRECT_VERT\n};\n\n/** @brief Tries to make panorama more horizontal (or vertical).\n\n@param rmats Camera rotation matrices.\n@param kind Correction kind, see detail::WaveCorrectKind.\n */\nvoid CV_EXPORTS waveCorrect(std::vector<Mat> &rmats, WaveCorrectKind kind);\n\n\n//////////////////////////////////////////////////////////////////////////////\n// Auxiliary functions\n\n// Returns matches graph representation in DOT language\nString CV_EXPORTS matchesGraphAsString(std::vector<String> &pathes, std::vector<MatchesInfo> &pairwise_matches,\n                                            float conf_threshold);\n\nstd::vector<int> CV_EXPORTS leaveBiggestComponent(\n        std::vector<ImageFeatures> &features,\n        std::vector<MatchesInfo> &pairwise_matches,\n        float conf_threshold);\n\nvoid CV_EXPORTS findMaxSpanningTree(\n        int num_images, const std::vector<MatchesInfo> &pairwise_matches,\n        Graph &span_tree, std::vector<int> &centers);\n\n//! @} stitching_rotation\n\n} // namespace detail\n} // namespace cv\n\n#endif // __OPENCV_STITCHING_MOTION_ESTIMATORS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/seam_finders.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_SEAM_FINDERS_HPP__\n#define __OPENCV_STITCHING_SEAM_FINDERS_HPP__\n\n#include <set>\n#include \"opencv2/core.hpp\"\n#include \"opencv2/opencv_modules.hpp\"\n\nnamespace cv {\nnamespace detail {\n\n//! @addtogroup stitching_seam\n//! @{\n\n/** @brief Base class for a seam estimator.\n */\nclass CV_EXPORTS SeamFinder\n{\npublic:\n    virtual ~SeamFinder() {}\n    /** @brief Estimates seams.\n\n    @param src Source images\n    @param corners Source image top-left corners\n    @param masks Source image masks to update\n     */\n    virtual void find(const std::vector<UMat> &src, const std::vector<Point> &corners,\n                      std::vector<UMat> &masks) = 0;\n};\n\n/** @brief Stub seam estimator which does nothing.\n */\nclass CV_EXPORTS NoSeamFinder : public SeamFinder\n{\npublic:\n    void find(const std::vector<UMat>&, const std::vector<Point>&, std::vector<UMat>&) {}\n};\n\n/** @brief Base class for all pairwise seam estimators.\n */\nclass CV_EXPORTS PairwiseSeamFinder : public SeamFinder\n{\npublic:\n    virtual void find(const std::vector<UMat> &src, const std::vector<Point> &corners,\n                      std::vector<UMat> &masks);\n\nprotected:\n    void run();\n    /** @brief Resolves masks intersection of two specified images in the given ROI.\n\n    @param first First image index\n    @param second Second image index\n    @param roi Region of interest\n     */\n    virtual void findInPair(size_t first, size_t second, Rect roi) = 0;\n\n    std::vector<UMat> images_;\n    std::vector<Size> sizes_;\n    std::vector<Point> corners_;\n    std::vector<UMat> masks_;\n};\n\n/** @brief Voronoi diagram-based seam estimator.\n */\nclass CV_EXPORTS VoronoiSeamFinder : public PairwiseSeamFinder\n{\npublic:\n    virtual void find(const std::vector<UMat> &src, const std::vector<Point> &corners,\n                      std::vector<UMat> &masks);\n    virtual void find(const std::vector<Size> &size, const std::vector<Point> &corners,\n                      std::vector<UMat> &masks);\nprivate:\n    void findInPair(size_t first, size_t second, Rect roi);\n};\n\n\nclass CV_EXPORTS DpSeamFinder : public SeamFinder\n{\npublic:\n    enum CostFunction { COLOR, COLOR_GRAD };\n\n    DpSeamFinder(CostFunction costFunc = COLOR);\n\n    CostFunction costFunction() const { return costFunc_; }\n    void setCostFunction(CostFunction val) { costFunc_ = val; }\n\n    virtual void find(const std::vector<UMat> &src, const std::vector<Point> &corners,\n                      std::vector<UMat> &masks);\n\nprivate:\n    enum ComponentState\n    {\n        FIRST = 1, SECOND = 2, INTERS = 4,\n        INTERS_FIRST = INTERS | FIRST,\n        INTERS_SECOND = INTERS | SECOND\n    };\n\n    class ImagePairLess\n    {\n    public:\n        ImagePairLess(const std::vector<Mat> &images, const std::vector<Point> &corners)\n            : src_(&images[0]), corners_(&corners[0]) {}\n\n        bool operator() (const std::pair<size_t, size_t> &l, const std::pair<size_t, size_t> &r) const\n        {\n            Point c1 = corners_[l.first] + Point(src_[l.first].cols / 2, src_[l.first].rows / 2);\n            Point c2 = corners_[l.second] + Point(src_[l.second].cols / 2, src_[l.second].rows / 2);\n            int d1 = (c1 - c2).dot(c1 - c2);\n\n            c1 = corners_[r.first] + Point(src_[r.first].cols / 2, src_[r.first].rows / 2);\n            c2 = corners_[r.second] + Point(src_[r.second].cols / 2, src_[r.second].rows / 2);\n            int d2 = (c1 - c2).dot(c1 - c2);\n\n            return d1 < d2;\n        }\n\n    private:\n        const Mat *src_;\n        const Point *corners_;\n    };\n\n    class ClosePoints\n    {\n    public:\n        ClosePoints(int minDist) : minDist_(minDist) {}\n\n        bool operator() (const Point &p1, const Point &p2) const\n        {\n            int dist2 = (p1.x-p2.x) * (p1.x-p2.x) + (p1.y-p2.y) * (p1.y-p2.y);\n            return dist2 < minDist_ * minDist_;\n        }\n\n    private:\n        int minDist_;\n    };\n\n    void process(\n            const Mat &image1, const Mat &image2, Point tl1, Point tl2,  Mat &mask1, Mat &mask2);\n\n    void findComponents();\n\n    void findEdges();\n\n    void resolveConflicts(\n            const Mat &image1, const Mat &image2, Point tl1, Point tl2, Mat &mask1, Mat &mask2);\n\n    void computeGradients(const Mat &image1, const Mat &image2);\n\n    bool hasOnlyOneNeighbor(int comp);\n\n    bool closeToContour(int y, int x, const Mat_<uchar> &contourMask);\n\n    bool getSeamTips(int comp1, int comp2, Point &p1, Point &p2);\n\n    void computeCosts(\n            const Mat &image1, const Mat &image2, Point tl1, Point tl2,\n            int comp, Mat_<float> &costV, Mat_<float> &costH);\n\n    bool estimateSeam(\n            const Mat &image1, const Mat &image2, Point tl1, Point tl2, int comp,\n            Point p1, Point p2, std::vector<Point> &seam, bool &isHorizontal);\n\n    void updateLabelsUsingSeam(\n            int comp1, int comp2, const std::vector<Point> &seam, bool isHorizontalSeam);\n\n    CostFunction costFunc_;\n\n    // processing images pair data\n    Point unionTl_, unionBr_;\n    Size unionSize_;\n    Mat_<uchar> mask1_, mask2_;\n    Mat_<uchar> contour1mask_, contour2mask_;\n    Mat_<float> gradx1_, grady1_;\n    Mat_<float> gradx2_, grady2_;\n\n    // components data\n    int ncomps_;\n    Mat_<int> labels_;\n    std::vector<ComponentState> states_;\n    std::vector<Point> tls_, brs_;\n    std::vector<std::vector<Point> > contours_;\n    std::set<std::pair<int, int> > edges_;\n};\n\n/** @brief Base class for all minimum graph-cut-based seam estimators.\n */\nclass CV_EXPORTS GraphCutSeamFinderBase\n{\npublic:\n    enum CostType { COST_COLOR, COST_COLOR_GRAD };\n};\n\n/** @brief Minimum graph cut-based seam estimator. See details in @cite V03 .\n */\nclass CV_EXPORTS GraphCutSeamFinder : public GraphCutSeamFinderBase, public SeamFinder\n{\npublic:\n    GraphCutSeamFinder(int cost_type = COST_COLOR_GRAD, float terminal_cost = 10000.f,\n                       float bad_region_penalty = 1000.f);\n\n    ~GraphCutSeamFinder();\n\n    void find(const std::vector<UMat> &src, const std::vector<Point> &corners,\n              std::vector<UMat> &masks);\n\nprivate:\n    // To avoid GCGraph dependency\n    class Impl;\n    Ptr<PairwiseSeamFinder> impl_;\n};\n\n\n#ifdef HAVE_OPENCV_CUDALEGACY\nclass CV_EXPORTS GraphCutSeamFinderGpu : public GraphCutSeamFinderBase, public PairwiseSeamFinder\n{\npublic:\n    GraphCutSeamFinderGpu(int cost_type = COST_COLOR_GRAD, float terminal_cost = 10000.f,\n                          float bad_region_penalty = 1000.f)\n                          : cost_type_(cost_type), terminal_cost_(terminal_cost),\n                            bad_region_penalty_(bad_region_penalty) {}\n\n    void find(const std::vector<cv::UMat> &src, const std::vector<cv::Point> &corners,\n              std::vector<cv::UMat> &masks);\n    void findInPair(size_t first, size_t second, Rect roi);\n\nprivate:\n    void setGraphWeightsColor(const cv::Mat &img1, const cv::Mat &img2, const cv::Mat &mask1, const cv::Mat &mask2,\n                              cv::Mat &terminals, cv::Mat &leftT, cv::Mat &rightT, cv::Mat &top, cv::Mat &bottom);\n    void setGraphWeightsColorGrad(const cv::Mat &img1, const cv::Mat &img2, const cv::Mat &dx1, const cv::Mat &dx2,\n                                  const cv::Mat &dy1, const cv::Mat &dy2, const cv::Mat &mask1, const cv::Mat &mask2,\n                                  cv::Mat &terminals, cv::Mat &leftT, cv::Mat &rightT, cv::Mat &top, cv::Mat &bottom);\n    std::vector<Mat> dx_, dy_;\n    int cost_type_;\n    float terminal_cost_;\n    float bad_region_penalty_;\n};\n#endif\n\n//! @}\n\n} // namespace detail\n} // namespace cv\n\n#endif // __OPENCV_STITCHING_SEAM_FINDERS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/timelapsers.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n\n#ifndef __OPENCV_STITCHING_TIMELAPSERS_HPP__\n#define __OPENCV_STITCHING_TIMELAPSERS_HPP__\n\n#include \"opencv2/core.hpp\"\n\nnamespace cv {\nnamespace detail {\n\n//! @addtogroup stitching\n//! @{\n\n//  Base Timelapser class, takes a sequence of images, applies appropriate shift, stores result in dst_.\n\nclass CV_EXPORTS Timelapser\n{\npublic:\n\n    enum {AS_IS, CROP};\n\n    virtual ~Timelapser() {}\n\n    static Ptr<Timelapser> createDefault(int type);\n\n    virtual void initialize(const std::vector<Point> &corners, const std::vector<Size> &sizes);\n    virtual void process(InputArray img, InputArray mask, Point tl);\n    virtual const UMat& getDst() {return dst_;}\n\nprotected:\n\n    virtual bool test_point(Point pt);\n\n    UMat dst_;\n    Rect dst_roi_;\n};\n\n\nclass CV_EXPORTS TimelapserCrop : public Timelapser\n{\npublic:\n    virtual void initialize(const std::vector<Point> &corners, const std::vector<Size> &sizes);\n};\n\n//! @}\n\n} // namespace detail\n} // namespace cv\n\n#endif // __OPENCV_STITCHING_TIMELAPSERS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/util.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_UTIL_HPP__\n#define __OPENCV_STITCHING_UTIL_HPP__\n\n#include <list>\n#include \"opencv2/core.hpp\"\n\n#ifndef ENABLE_LOG\n#define ENABLE_LOG 0\n#endif\n\n// TODO remove LOG macros, add logging class\n#if ENABLE_LOG\n#ifdef ANDROID\n  #include <iostream>\n  #include <sstream>\n  #include <android/log.h>\n  #define LOG_STITCHING_MSG(msg) \\\n    do { \\\n        Stringstream _os; \\\n        _os << msg; \\\n       __android_log_print(ANDROID_LOG_DEBUG, \"STITCHING\", \"%s\", _os.str().c_str()); \\\n    } while(0);\n#else\n  #include <iostream>\n  #define LOG_STITCHING_MSG(msg) for(;;) { std::cout << msg; std::cout.flush(); break; }\n#endif\n#else\n  #define LOG_STITCHING_MSG(msg)\n#endif\n\n#define LOG_(_level, _msg)                     \\\n    for(;;)                                    \\\n    {                                          \\\n        using namespace std;                   \\\n        if ((_level) >= ::cv::detail::stitchingLogLevel()) \\\n        {                                      \\\n            LOG_STITCHING_MSG(_msg);           \\\n        }                                      \\\n    break;                                 \\\n    }\n\n\n#define LOG(msg) LOG_(1, msg)\n#define LOG_CHAT(msg) LOG_(0, msg)\n\n#define LOGLN(msg) LOG(msg << std::endl)\n#define LOGLN_CHAT(msg) LOG_CHAT(msg << std::endl)\n\n//#if DEBUG_LOG_CHAT\n//  #define LOG_CHAT(msg) LOG(msg)\n//  #define LOGLN_CHAT(msg) LOGLN(msg)\n//#else\n//  #define LOG_CHAT(msg) do{}while(0)\n//  #define LOGLN_CHAT(msg) do{}while(0)\n//#endif\n\nnamespace cv {\nnamespace detail {\n\n//! @addtogroup stitching\n//! @{\n\nclass CV_EXPORTS DisjointSets\n{\npublic:\n    DisjointSets(int elem_count = 0) { createOneElemSets(elem_count); }\n\n    void createOneElemSets(int elem_count);\n    int findSetByElem(int elem);\n    int mergeSets(int set1, int set2);\n\n    std::vector<int> parent;\n    std::vector<int> size;\n\nprivate:\n    std::vector<int> rank_;\n};\n\n\nstruct CV_EXPORTS GraphEdge\n{\n    GraphEdge(int from, int to, float weight);\n    bool operator <(const GraphEdge& other) const { return weight < other.weight; }\n    bool operator >(const GraphEdge& other) const { return weight > other.weight; }\n\n    int from, to;\n    float weight;\n};\n\ninline GraphEdge::GraphEdge(int _from, int _to, float _weight) : from(_from), to(_to), weight(_weight) {}\n\n\nclass CV_EXPORTS Graph\n{\npublic:\n    Graph(int num_vertices = 0) { create(num_vertices); }\n    void create(int num_vertices) { edges_.assign(num_vertices, std::list<GraphEdge>()); }\n    int numVertices() const { return static_cast<int>(edges_.size()); }\n    void addEdge(int from, int to, float weight);\n    template <typename B> B forEach(B body) const;\n    template <typename B> B walkBreadthFirst(int from, B body) const;\n\nprivate:\n    std::vector< std::list<GraphEdge> > edges_;\n};\n\n\n//////////////////////////////////////////////////////////////////////////////\n// Auxiliary functions\n\nCV_EXPORTS bool overlapRoi(Point tl1, Point tl2, Size sz1, Size sz2, Rect &roi);\nCV_EXPORTS Rect resultRoi(const std::vector<Point> &corners, const std::vector<UMat> &images);\nCV_EXPORTS Rect resultRoi(const std::vector<Point> &corners, const std::vector<Size> &sizes);\nCV_EXPORTS Rect resultRoiIntersection(const std::vector<Point> &corners, const std::vector<Size> &sizes);\nCV_EXPORTS Point resultTl(const std::vector<Point> &corners);\n\n// Returns random 'count' element subset of the {0,1,...,size-1} set\nCV_EXPORTS void selectRandomSubset(int count, int size, std::vector<int> &subset);\n\nCV_EXPORTS int& stitchingLogLevel();\n\n//! @}\n\n} // namespace detail\n} // namespace cv\n\n#include \"util_inl.hpp\"\n\n#endif // __OPENCV_STITCHING_UTIL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/util_inl.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_UTIL_INL_HPP__\n#define __OPENCV_STITCHING_UTIL_INL_HPP__\n\n#include <queue>\n#include \"opencv2/core.hpp\"\n#include \"util.hpp\" // Make your IDE see declarations\n\n//! @cond IGNORED\n\nnamespace cv {\nnamespace detail {\n\ntemplate <typename B>\nB Graph::forEach(B body) const\n{\n    for (int i = 0; i < numVertices(); ++i)\n    {\n        std::list<GraphEdge>::const_iterator edge = edges_[i].begin();\n        for (; edge != edges_[i].end(); ++edge)\n            body(*edge);\n    }\n    return body;\n}\n\n\ntemplate <typename B>\nB Graph::walkBreadthFirst(int from, B body) const\n{\n    std::vector<bool> was(numVertices(), false);\n    std::queue<int> vertices;\n\n    was[from] = true;\n    vertices.push(from);\n\n    while (!vertices.empty())\n    {\n        int vertex = vertices.front();\n        vertices.pop();\n\n        std::list<GraphEdge>::const_iterator edge = edges_[vertex].begin();\n        for (; edge != edges_[vertex].end(); ++edge)\n        {\n            if (!was[edge->to])\n            {\n                body(*edge);\n                was[edge->to] = true;\n                vertices.push(edge->to);\n            }\n        }\n    }\n\n    return body;\n}\n\n\n//////////////////////////////////////////////////////////////////////////////\n// Some auxiliary math functions\n\nstatic inline\nfloat normL2(const Point3f& a)\n{\n    return a.x * a.x + a.y * a.y + a.z * a.z;\n}\n\n\nstatic inline\nfloat normL2(const Point3f& a, const Point3f& b)\n{\n    return normL2(a - b);\n}\n\n\nstatic inline\ndouble normL2sq(const Mat &r)\n{\n    return r.dot(r);\n}\n\n\nstatic inline int sqr(int x) { return x * x; }\nstatic inline float sqr(float x) { return x * x; }\nstatic inline double sqr(double x) { return x * x; }\n\n} // namespace detail\n} // namespace cv\n\n//! @endcond\n\n#endif // __OPENCV_STITCHING_UTIL_INL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/warpers.hpp",
    "content": " /*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_WARPERS_HPP__\n#define __OPENCV_STITCHING_WARPERS_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/core/cuda.hpp\"\n#include \"opencv2/imgproc.hpp\"\n#include \"opencv2/opencv_modules.hpp\"\n\nnamespace cv {\nnamespace detail {\n\n//! @addtogroup stitching_warp\n//! @{\n\n/** @brief Rotation-only model image warper interface.\n */\nclass CV_EXPORTS RotationWarper\n{\npublic:\n    virtual ~RotationWarper() {}\n\n    /** @brief Projects the image point.\n\n    @param pt Source point\n    @param K Camera intrinsic parameters\n    @param R Camera rotation matrix\n    @return Projected point\n     */\n    virtual Point2f warpPoint(const Point2f &pt, InputArray K, InputArray R) = 0;\n\n    /** @brief Builds the projection maps according to the given camera data.\n\n    @param src_size Source image size\n    @param K Camera intrinsic parameters\n    @param R Camera rotation matrix\n    @param xmap Projection map for the x axis\n    @param ymap Projection map for the y axis\n    @return Projected image minimum bounding box\n     */\n    virtual Rect buildMaps(Size src_size, InputArray K, InputArray R, OutputArray xmap, OutputArray ymap) = 0;\n\n    /** @brief Projects the image.\n\n    @param src Source image\n    @param K Camera intrinsic parameters\n    @param R Camera rotation matrix\n    @param interp_mode Interpolation mode\n    @param border_mode Border extrapolation mode\n    @param dst Projected image\n    @return Project image top-left corner\n     */\n    virtual Point warp(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode,\n                       OutputArray dst) = 0;\n\n    /** @brief Projects the image backward.\n\n    @param src Projected image\n    @param K Camera intrinsic parameters\n    @param R Camera rotation matrix\n    @param interp_mode Interpolation mode\n    @param border_mode Border extrapolation mode\n    @param dst_size Backward-projected image size\n    @param dst Backward-projected image\n     */\n    virtual void warpBackward(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode,\n                              Size dst_size, OutputArray dst) = 0;\n\n    /**\n    @param src_size Source image bounding box\n    @param K Camera intrinsic parameters\n    @param R Camera rotation matrix\n    @return Projected image minimum bounding box\n     */\n    virtual Rect warpRoi(Size src_size, InputArray K, InputArray R) = 0;\n\n    virtual float getScale() const { return 1.f; }\n    virtual void setScale(float) {}\n};\n\n/** @brief Base class for warping logic implementation.\n */\nstruct CV_EXPORTS ProjectorBase\n{\n    void setCameraParams(InputArray K = Mat::eye(3, 3, CV_32F),\n                         InputArray R = Mat::eye(3, 3, CV_32F),\n                         InputArray T = Mat::zeros(3, 1, CV_32F));\n\n    float scale;\n    float k[9];\n    float rinv[9];\n    float r_kinv[9];\n    float k_rinv[9];\n    float t[3];\n};\n\n/** @brief Base class for rotation-based warper using a detail::ProjectorBase_ derived class.\n */\ntemplate <class P>\nclass CV_EXPORTS RotationWarperBase : public RotationWarper\n{\npublic:\n    Point2f warpPoint(const Point2f &pt, InputArray K, InputArray R);\n\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, OutputArray xmap, OutputArray ymap);\n\n    Point warp(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode,\n               OutputArray dst);\n\n    void warpBackward(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode,\n                      Size dst_size, OutputArray dst);\n\n    Rect warpRoi(Size src_size, InputArray K, InputArray R);\n\n    float getScale() const { return projector_.scale; }\n    void setScale(float val) { projector_.scale = val; }\n\nprotected:\n\n    // Detects ROI of the destination image. It's correct for any projection.\n    virtual void detectResultRoi(Size src_size, Point &dst_tl, Point &dst_br);\n\n    // Detects ROI of the destination image by walking over image border.\n    // Correctness for any projection isn't guaranteed.\n    void detectResultRoiByBorder(Size src_size, Point &dst_tl, Point &dst_br);\n\n    P projector_;\n};\n\n\nstruct CV_EXPORTS PlaneProjector : ProjectorBase\n{\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n/** @brief Warper that maps an image onto the z = 1 plane.\n */\nclass CV_EXPORTS PlaneWarper : public RotationWarperBase<PlaneProjector>\n{\npublic:\n    /** @brief Construct an instance of the plane warper class.\n\n    @param scale Projected image scale multiplier\n     */\n    PlaneWarper(float scale = 1.f) { projector_.scale = scale; }\n\n    Point2f warpPoint(const Point2f &pt, InputArray K, InputArray R);\n    Point2f warpPoint(const Point2f &pt, InputArray K, InputArray R, InputArray T);\n\n    virtual Rect buildMaps(Size src_size, InputArray K, InputArray R, InputArray T, OutputArray xmap, OutputArray ymap);\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, OutputArray xmap, OutputArray ymap);\n\n    Point warp(InputArray src, InputArray K, InputArray R,\n               int interp_mode, int border_mode, OutputArray dst);\n    virtual Point warp(InputArray src, InputArray K, InputArray R, InputArray T, int interp_mode, int border_mode,\n               OutputArray dst);\n\n    Rect warpRoi(Size src_size, InputArray K, InputArray R);\n    Rect warpRoi(Size src_size, InputArray K, InputArray R, InputArray T);\n\nprotected:\n    void detectResultRoi(Size src_size, Point &dst_tl, Point &dst_br);\n};\n\n\nstruct CV_EXPORTS SphericalProjector : ProjectorBase\n{\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\n/** @brief Warper that maps an image onto the unit sphere located at the origin.\n\n Projects image onto unit sphere with origin at (0, 0, 0).\n Poles are located at (0, -1, 0) and (0, 1, 0) points.\n*/\nclass CV_EXPORTS SphericalWarper : public RotationWarperBase<SphericalProjector>\n{\npublic:\n    /** @brief Construct an instance of the spherical warper class.\n\n    @param scale Projected image scale multiplier\n     */\n    SphericalWarper(float scale) { projector_.scale = scale; }\n\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, OutputArray xmap, OutputArray ymap);\n    Point warp(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode, OutputArray dst);\nprotected:\n    void detectResultRoi(Size src_size, Point &dst_tl, Point &dst_br);\n};\n\n\nstruct CV_EXPORTS CylindricalProjector : ProjectorBase\n{\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\n/** @brief Warper that maps an image onto the x\\*x + z\\*z = 1 cylinder.\n */\nclass CV_EXPORTS CylindricalWarper : public RotationWarperBase<CylindricalProjector>\n{\npublic:\n    /** @brief Construct an instance of the cylindrical warper class.\n\n    @param scale Projected image scale multiplier\n     */\n    CylindricalWarper(float scale) { projector_.scale = scale; }\n\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, OutputArray xmap, OutputArray ymap);\n    Point warp(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode, OutputArray dst);\nprotected:\n    void detectResultRoi(Size src_size, Point &dst_tl, Point &dst_br)\n    {\n        RotationWarperBase<CylindricalProjector>::detectResultRoiByBorder(src_size, dst_tl, dst_br);\n    }\n};\n\n\nstruct CV_EXPORTS FisheyeProjector : ProjectorBase\n{\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\nclass CV_EXPORTS FisheyeWarper : public RotationWarperBase<FisheyeProjector>\n{\npublic:\n    FisheyeWarper(float scale) { projector_.scale = scale; }\n};\n\n\nstruct CV_EXPORTS StereographicProjector : ProjectorBase\n{\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\nclass CV_EXPORTS StereographicWarper : public RotationWarperBase<StereographicProjector>\n{\npublic:\n    StereographicWarper(float scale) { projector_.scale = scale; }\n};\n\n\nstruct CV_EXPORTS CompressedRectilinearProjector : ProjectorBase\n{\n    float a, b;\n\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\nclass CV_EXPORTS CompressedRectilinearWarper : public RotationWarperBase<CompressedRectilinearProjector>\n{\npublic:\n    CompressedRectilinearWarper(float scale, float A = 1, float B = 1)\n    {\n        projector_.a = A;\n        projector_.b = B;\n        projector_.scale = scale;\n    }\n};\n\n\nstruct CV_EXPORTS CompressedRectilinearPortraitProjector : ProjectorBase\n{\n    float a, b;\n\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\nclass CV_EXPORTS CompressedRectilinearPortraitWarper : public RotationWarperBase<CompressedRectilinearPortraitProjector>\n{\npublic:\n   CompressedRectilinearPortraitWarper(float scale, float A = 1, float B = 1)\n   {\n       projector_.a = A;\n       projector_.b = B;\n       projector_.scale = scale;\n   }\n};\n\n\nstruct CV_EXPORTS PaniniProjector : ProjectorBase\n{\n    float a, b;\n\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\nclass CV_EXPORTS PaniniWarper : public RotationWarperBase<PaniniProjector>\n{\npublic:\n   PaniniWarper(float scale, float A = 1, float B = 1)\n   {\n       projector_.a = A;\n       projector_.b = B;\n       projector_.scale = scale;\n   }\n};\n\n\nstruct CV_EXPORTS PaniniPortraitProjector : ProjectorBase\n{\n    float a, b;\n\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\nclass CV_EXPORTS PaniniPortraitWarper : public RotationWarperBase<PaniniPortraitProjector>\n{\npublic:\n   PaniniPortraitWarper(float scale, float A = 1, float B = 1)\n   {\n       projector_.a = A;\n       projector_.b = B;\n       projector_.scale = scale;\n   }\n\n};\n\n\nstruct CV_EXPORTS MercatorProjector : ProjectorBase\n{\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\nclass CV_EXPORTS MercatorWarper : public RotationWarperBase<MercatorProjector>\n{\npublic:\n    MercatorWarper(float scale) { projector_.scale = scale; }\n};\n\n\nstruct CV_EXPORTS TransverseMercatorProjector : ProjectorBase\n{\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\nclass CV_EXPORTS TransverseMercatorWarper : public RotationWarperBase<TransverseMercatorProjector>\n{\npublic:\n    TransverseMercatorWarper(float scale) { projector_.scale = scale; }\n};\n\n\nclass CV_EXPORTS PlaneWarperGpu : public PlaneWarper\n{\npublic:\n    PlaneWarperGpu(float scale = 1.f) : PlaneWarper(scale) {}\n\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, OutputArray xmap, OutputArray ymap)\n    {\n        Rect result = buildMaps(src_size, K, R, d_xmap_, d_ymap_);\n        d_xmap_.download(xmap);\n        d_ymap_.download(ymap);\n        return result;\n    }\n\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, InputArray T, OutputArray xmap, OutputArray ymap)\n    {\n        Rect result = buildMaps(src_size, K, R, T, d_xmap_, d_ymap_);\n        d_xmap_.download(xmap);\n        d_ymap_.download(ymap);\n        return result;\n    }\n\n    Point warp(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode,\n               OutputArray dst)\n    {\n        d_src_.upload(src);\n        Point result = warp(d_src_, K, R, interp_mode, border_mode, d_dst_);\n        d_dst_.download(dst);\n        return result;\n    }\n\n    Point warp(InputArray src, InputArray K, InputArray R, InputArray T, int interp_mode, int border_mode,\n               OutputArray dst)\n    {\n        d_src_.upload(src);\n        Point result = warp(d_src_, K, R, T, interp_mode, border_mode, d_dst_);\n        d_dst_.download(dst);\n        return result;\n    }\n\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, cuda::GpuMat & xmap, cuda::GpuMat & ymap);\n\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, InputArray T, cuda::GpuMat & xmap, cuda::GpuMat & ymap);\n\n    Point warp(const cuda::GpuMat & src, InputArray K, InputArray R, int interp_mode, int border_mode,\n               cuda::GpuMat & dst);\n\n    Point warp(const cuda::GpuMat & src, InputArray K, InputArray R, InputArray T, int interp_mode, int border_mode,\n               cuda::GpuMat & dst);\n\nprivate:\n    cuda::GpuMat d_xmap_, d_ymap_, d_src_, d_dst_;\n};\n\n\nclass CV_EXPORTS SphericalWarperGpu : public SphericalWarper\n{\npublic:\n    SphericalWarperGpu(float scale) : SphericalWarper(scale) {}\n\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, OutputArray xmap, OutputArray ymap)\n    {\n        Rect result = buildMaps(src_size, K, R, d_xmap_, d_ymap_);\n        d_xmap_.download(xmap);\n        d_ymap_.download(ymap);\n        return result;\n    }\n\n    Point warp(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode,\n               OutputArray dst)\n    {\n        d_src_.upload(src);\n        Point result = warp(d_src_, K, R, interp_mode, border_mode, d_dst_);\n        d_dst_.download(dst);\n        return result;\n    }\n\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, cuda::GpuMat & xmap, cuda::GpuMat & ymap);\n\n    Point warp(const cuda::GpuMat & src, InputArray K, InputArray R, int interp_mode, int border_mode,\n               cuda::GpuMat & dst);\n\nprivate:\n    cuda::GpuMat d_xmap_, d_ymap_, d_src_, d_dst_;\n};\n\n\nclass CV_EXPORTS CylindricalWarperGpu : public CylindricalWarper\n{\npublic:\n    CylindricalWarperGpu(float scale) : CylindricalWarper(scale) {}\n\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, OutputArray xmap, OutputArray ymap)\n    {\n        Rect result = buildMaps(src_size, K, R, d_xmap_, d_ymap_);\n        d_xmap_.download(xmap);\n        d_ymap_.download(ymap);\n        return result;\n    }\n\n    Point warp(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode,\n               OutputArray dst)\n    {\n        d_src_.upload(src);\n        Point result = warp(d_src_, K, R, interp_mode, border_mode, d_dst_);\n        d_dst_.download(dst);\n        return result;\n    }\n\n    Rect buildMaps(Size src_size, InputArray K, InputArray R, cuda::GpuMat & xmap, cuda::GpuMat & ymap);\n\n    Point warp(const cuda::GpuMat & src, InputArray K, InputArray R, int interp_mode, int border_mode,\n               cuda::GpuMat & dst);\n\nprivate:\n    cuda::GpuMat d_xmap_, d_ymap_, d_src_, d_dst_;\n};\n\n\nstruct SphericalPortraitProjector : ProjectorBase\n{\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\n// Projects image onto unit sphere with origin at (0, 0, 0).\n// Poles are located NOT at (0, -1, 0) and (0, 1, 0) points, BUT at (1, 0, 0) and (-1, 0, 0) points.\nclass CV_EXPORTS SphericalPortraitWarper : public RotationWarperBase<SphericalPortraitProjector>\n{\npublic:\n    SphericalPortraitWarper(float scale) { projector_.scale = scale; }\n\nprotected:\n    void detectResultRoi(Size src_size, Point &dst_tl, Point &dst_br);\n};\n\nstruct CylindricalPortraitProjector : ProjectorBase\n{\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\nclass CV_EXPORTS CylindricalPortraitWarper : public RotationWarperBase<CylindricalPortraitProjector>\n{\npublic:\n    CylindricalPortraitWarper(float scale) { projector_.scale = scale; }\n\nprotected:\n    void detectResultRoi(Size src_size, Point &dst_tl, Point &dst_br)\n    {\n        RotationWarperBase<CylindricalPortraitProjector>::detectResultRoiByBorder(src_size, dst_tl, dst_br);\n    }\n};\n\nstruct PlanePortraitProjector : ProjectorBase\n{\n    void mapForward(float x, float y, float &u, float &v);\n    void mapBackward(float u, float v, float &x, float &y);\n};\n\n\nclass CV_EXPORTS PlanePortraitWarper : public RotationWarperBase<PlanePortraitProjector>\n{\npublic:\n    PlanePortraitWarper(float scale) { projector_.scale = scale; }\n\nprotected:\n    void detectResultRoi(Size src_size, Point &dst_tl, Point &dst_br)\n    {\n        RotationWarperBase<PlanePortraitProjector>::detectResultRoiByBorder(src_size, dst_tl, dst_br);\n    }\n};\n\n//! @} stitching_warp\n\n} // namespace detail\n} // namespace cv\n\n#include \"warpers_inl.hpp\"\n\n#endif // __OPENCV_STITCHING_WARPERS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/detail/warpers_inl.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_WARPERS_INL_HPP__\n#define __OPENCV_STITCHING_WARPERS_INL_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"warpers.hpp\" // Make your IDE see declarations\n#include <limits>\n\n//! @cond IGNORED\n\nnamespace cv {\nnamespace detail {\n\ntemplate <class P>\nPoint2f RotationWarperBase<P>::warpPoint(const Point2f &pt, InputArray K, InputArray R)\n{\n    projector_.setCameraParams(K, R);\n    Point2f uv;\n    projector_.mapForward(pt.x, pt.y, uv.x, uv.y);\n    return uv;\n}\n\n\ntemplate <class P>\nRect RotationWarperBase<P>::buildMaps(Size src_size, InputArray K, InputArray R, OutputArray _xmap, OutputArray _ymap)\n{\n    projector_.setCameraParams(K, R);\n\n    Point dst_tl, dst_br;\n    detectResultRoi(src_size, dst_tl, dst_br);\n\n    _xmap.create(dst_br.y - dst_tl.y + 1, dst_br.x - dst_tl.x + 1, CV_32F);\n    _ymap.create(dst_br.y - dst_tl.y + 1, dst_br.x - dst_tl.x + 1, CV_32F);\n\n    Mat xmap = _xmap.getMat(), ymap = _ymap.getMat();\n\n    float x, y;\n    for (int v = dst_tl.y; v <= dst_br.y; ++v)\n    {\n        for (int u = dst_tl.x; u <= dst_br.x; ++u)\n        {\n            projector_.mapBackward(static_cast<float>(u), static_cast<float>(v), x, y);\n            xmap.at<float>(v - dst_tl.y, u - dst_tl.x) = x;\n            ymap.at<float>(v - dst_tl.y, u - dst_tl.x) = y;\n        }\n    }\n\n    return Rect(dst_tl, dst_br);\n}\n\n\ntemplate <class P>\nPoint RotationWarperBase<P>::warp(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode,\n                                  OutputArray dst)\n{\n    UMat xmap, ymap;\n    Rect dst_roi = buildMaps(src.size(), K, R, xmap, ymap);\n\n    dst.create(dst_roi.height + 1, dst_roi.width + 1, src.type());\n    remap(src, dst, xmap, ymap, interp_mode, border_mode);\n\n    return dst_roi.tl();\n}\n\n\ntemplate <class P>\nvoid RotationWarperBase<P>::warpBackward(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode,\n                                         Size dst_size, OutputArray dst)\n{\n    projector_.setCameraParams(K, R);\n\n    Point src_tl, src_br;\n    detectResultRoi(dst_size, src_tl, src_br);\n\n    Size size = src.size();\n    CV_Assert(src_br.x - src_tl.x + 1 == size.width && src_br.y - src_tl.y + 1 == size.height);\n\n    Mat xmap(dst_size, CV_32F);\n    Mat ymap(dst_size, CV_32F);\n\n    float u, v;\n    for (int y = 0; y < dst_size.height; ++y)\n    {\n        for (int x = 0; x < dst_size.width; ++x)\n        {\n            projector_.mapForward(static_cast<float>(x), static_cast<float>(y), u, v);\n            xmap.at<float>(y, x) = u - src_tl.x;\n            ymap.at<float>(y, x) = v - src_tl.y;\n        }\n    }\n\n    dst.create(dst_size, src.type());\n    remap(src, dst, xmap, ymap, interp_mode, border_mode);\n}\n\n\ntemplate <class P>\nRect RotationWarperBase<P>::warpRoi(Size src_size, InputArray K, InputArray R)\n{\n    projector_.setCameraParams(K, R);\n\n    Point dst_tl, dst_br;\n    detectResultRoi(src_size, dst_tl, dst_br);\n\n    return Rect(dst_tl, Point(dst_br.x + 1, dst_br.y + 1));\n}\n\n\ntemplate <class P>\nvoid RotationWarperBase<P>::detectResultRoi(Size src_size, Point &dst_tl, Point &dst_br)\n{\n    float tl_uf = std::numeric_limits<float>::max();\n    float tl_vf = std::numeric_limits<float>::max();\n    float br_uf = -std::numeric_limits<float>::max();\n    float br_vf = -std::numeric_limits<float>::max();\n\n    float u, v;\n    for (int y = 0; y < src_size.height; ++y)\n    {\n        for (int x = 0; x < src_size.width; ++x)\n        {\n            projector_.mapForward(static_cast<float>(x), static_cast<float>(y), u, v);\n            tl_uf = std::min(tl_uf, u); tl_vf = std::min(tl_vf, v);\n            br_uf = std::max(br_uf, u); br_vf = std::max(br_vf, v);\n        }\n    }\n\n    dst_tl.x = static_cast<int>(tl_uf);\n    dst_tl.y = static_cast<int>(tl_vf);\n    dst_br.x = static_cast<int>(br_uf);\n    dst_br.y = static_cast<int>(br_vf);\n}\n\n\ntemplate <class P>\nvoid RotationWarperBase<P>::detectResultRoiByBorder(Size src_size, Point &dst_tl, Point &dst_br)\n{\n    float tl_uf = std::numeric_limits<float>::max();\n    float tl_vf = std::numeric_limits<float>::max();\n    float br_uf = -std::numeric_limits<float>::max();\n    float br_vf = -std::numeric_limits<float>::max();\n\n    float u, v;\n    for (float x = 0; x < src_size.width; ++x)\n    {\n        projector_.mapForward(static_cast<float>(x), 0, u, v);\n        tl_uf = std::min(tl_uf, u); tl_vf = std::min(tl_vf, v);\n        br_uf = std::max(br_uf, u); br_vf = std::max(br_vf, v);\n\n        projector_.mapForward(static_cast<float>(x), static_cast<float>(src_size.height - 1), u, v);\n        tl_uf = std::min(tl_uf, u); tl_vf = std::min(tl_vf, v);\n        br_uf = std::max(br_uf, u); br_vf = std::max(br_vf, v);\n    }\n    for (int y = 0; y < src_size.height; ++y)\n    {\n        projector_.mapForward(0, static_cast<float>(y), u, v);\n        tl_uf = std::min(tl_uf, u); tl_vf = std::min(tl_vf, v);\n        br_uf = std::max(br_uf, u); br_vf = std::max(br_vf, v);\n\n        projector_.mapForward(static_cast<float>(src_size.width - 1), static_cast<float>(y), u, v);\n        tl_uf = std::min(tl_uf, u); tl_vf = std::min(tl_vf, v);\n        br_uf = std::max(br_uf, u); br_vf = std::max(br_vf, v);\n    }\n\n    dst_tl.x = static_cast<int>(tl_uf);\n    dst_tl.y = static_cast<int>(tl_vf);\n    dst_br.x = static_cast<int>(br_uf);\n    dst_br.y = static_cast<int>(br_vf);\n}\n\n\ninline\nvoid PlaneProjector::mapForward(float x, float y, float &u, float &v)\n{\n    float x_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    x_ = t[0] + x_ / z_ * (1 - t[2]);\n    y_ = t[1] + y_ / z_ * (1 - t[2]);\n\n    u = scale * x_;\n    v = scale * y_;\n}\n\n\ninline\nvoid PlaneProjector::mapBackward(float u, float v, float &x, float &y)\n{\n    u = u / scale - t[0];\n    v = v / scale - t[1];\n\n    float z;\n    x = k_rinv[0] * u + k_rinv[1] * v + k_rinv[2] * (1 - t[2]);\n    y = k_rinv[3] * u + k_rinv[4] * v + k_rinv[5] * (1 - t[2]);\n    z = k_rinv[6] * u + k_rinv[7] * v + k_rinv[8] * (1 - t[2]);\n\n    x /= z;\n    y /= z;\n}\n\n\ninline\nvoid SphericalProjector::mapForward(float x, float y, float &u, float &v)\n{\n    float x_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    u = scale * atan2f(x_, z_);\n    float w = y_ / sqrtf(x_ * x_ + y_ * y_ + z_ * z_);\n    v = scale * (static_cast<float>(CV_PI) - acosf(w == w ? w : 0));\n}\n\n\ninline\nvoid SphericalProjector::mapBackward(float u, float v, float &x, float &y)\n{\n    u /= scale;\n    v /= scale;\n\n    float sinv = sinf(static_cast<float>(CV_PI) - v);\n    float x_ = sinv * sinf(u);\n    float y_ = cosf(static_cast<float>(CV_PI) - v);\n    float z_ = sinv * cosf(u);\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\n\ninline\nvoid CylindricalProjector::mapForward(float x, float y, float &u, float &v)\n{\n    float x_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    u = scale * atan2f(x_, z_);\n    v = scale * y_ / sqrtf(x_ * x_ + z_ * z_);\n}\n\n\ninline\nvoid CylindricalProjector::mapBackward(float u, float v, float &x, float &y)\n{\n    u /= scale;\n    v /= scale;\n\n    float x_ = sinf(u);\n    float y_ = v;\n    float z_ = cosf(u);\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\ninline\nvoid FisheyeProjector::mapForward(float x, float y, float &u, float &v)\n{\n    float x_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    float u_ = atan2f(x_, z_);\n    float v_ = (float)CV_PI - acosf(y_ / sqrtf(x_ * x_ + y_ * y_ + z_ * z_));\n\n    u = scale * v_ * cosf(u_);\n    v = scale * v_ * sinf(u_);\n}\n\ninline\nvoid FisheyeProjector::mapBackward(float u, float v, float &x, float &y)\n{\n    u /= scale;\n    v /= scale;\n\n    float u_ = atan2f(v, u);\n    float v_ = sqrtf(u*u + v*v);\n\n    float sinv = sinf((float)CV_PI - v_);\n    float x_ = sinv * sinf(u_);\n    float y_ = cosf((float)CV_PI - v_);\n    float z_ = sinv * cosf(u_);\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\ninline\nvoid StereographicProjector::mapForward(float x, float y, float &u, float &v)\n{\n    float x_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    float u_ = atan2f(x_, z_);\n    float v_ = (float)CV_PI - acosf(y_ / sqrtf(x_ * x_ + y_ * y_ + z_ * z_));\n\n    float r = sinf(v_) / (1 - cosf(v_));\n\n    u = scale * r * cos(u_);\n    v = scale * r * sin(u_);\n}\n\ninline\nvoid StereographicProjector::mapBackward(float u, float v, float &x, float &y)\n{\n    u /= scale;\n    v /= scale;\n\n    float u_ = atan2f(v, u);\n    float r = sqrtf(u*u + v*v);\n    float v_ = 2 * atanf(1.f / r);\n\n    float sinv = sinf((float)CV_PI - v_);\n    float x_ = sinv * sinf(u_);\n    float y_ = cosf((float)CV_PI - v_);\n    float z_ = sinv * cosf(u_);\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\ninline\nvoid CompressedRectilinearProjector::mapForward(float x, float y, float &u, float &v)\n{\n    float x_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    float u_ = atan2f(x_, z_);\n    float v_ = asinf(y_ / sqrtf(x_ * x_ + y_ * y_ + z_ * z_));\n\n    u = scale * a * tanf(u_ / a);\n    v = scale * b * tanf(v_) / cosf(u_);\n}\n\ninline\nvoid CompressedRectilinearProjector::mapBackward(float u, float v, float &x, float &y)\n{\n    u /= scale;\n    v /= scale;\n\n    float aatg = a * atanf(u / a);\n    float u_ = aatg;\n    float v_ = atanf(v * cosf(aatg) / b);\n\n    float cosv = cosf(v_);\n    float x_ = cosv * sinf(u_);\n    float y_ = sinf(v_);\n    float z_ = cosv * cosf(u_);\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\ninline\nvoid CompressedRectilinearPortraitProjector::mapForward(float x, float y, float &u, float &v)\n{\n    float y_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float x_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    float u_ = atan2f(x_, z_);\n    float v_ = asinf(y_ / sqrtf(x_ * x_ + y_ * y_ + z_ * z_));\n\n    u = - scale * a * tanf(u_ / a);\n    v = scale * b * tanf(v_) / cosf(u_);\n}\n\ninline\nvoid CompressedRectilinearPortraitProjector::mapBackward(float u, float v, float &x, float &y)\n{\n    u /= - scale;\n    v /= scale;\n\n    float aatg = a * atanf(u / a);\n    float u_ = aatg;\n    float v_ = atanf(v * cosf( aatg ) / b);\n\n    float cosv = cosf(v_);\n    float y_ = cosv * sinf(u_);\n    float x_ = sinf(v_);\n    float z_ = cosv * cosf(u_);\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\ninline\nvoid PaniniProjector::mapForward(float x, float y, float &u, float &v)\n{\n    float x_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    float u_ = atan2f(x_, z_);\n    float v_ = asinf(y_ / sqrtf(x_ * x_ + y_ * y_ + z_ * z_));\n\n    float tg = a * tanf(u_ / a);\n    u = scale * tg;\n\n    float sinu = sinf(u_);\n    if ( fabs(sinu) < 1E-7 )\n        v = scale * b * tanf(v_);\n    else\n        v = scale * b * tg * tanf(v_) / sinu;\n}\n\ninline\nvoid PaniniProjector::mapBackward(float u, float v, float &x, float &y)\n{\n    u /= scale;\n    v /= scale;\n\n    float lamda = a * atanf(u / a);\n    float u_ = lamda;\n\n    float v_;\n    if ( fabs(lamda) > 1E-7)\n        v_ = atanf(v * sinf(lamda) / (b * a * tanf(lamda / a)));\n    else\n        v_ = atanf(v / b);\n\n    float cosv = cosf(v_);\n    float x_ = cosv * sinf(u_);\n    float y_ = sinf(v_);\n    float z_ = cosv * cosf(u_);\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\ninline\nvoid PaniniPortraitProjector::mapForward(float x, float y, float &u, float &v)\n{\n    float y_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float x_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    float u_ = atan2f(x_, z_);\n    float v_ = asinf(y_ / sqrtf(x_ * x_ + y_ * y_ + z_ * z_));\n\n    float tg = a * tanf(u_ / a);\n    u = - scale * tg;\n\n    float sinu = sinf( u_ );\n    if ( fabs(sinu) < 1E-7 )\n        v = scale * b * tanf(v_);\n    else\n        v = scale * b * tg * tanf(v_) / sinu;\n}\n\ninline\nvoid PaniniPortraitProjector::mapBackward(float u, float v, float &x, float &y)\n{\n    u /= - scale;\n    v /= scale;\n\n    float lamda = a * atanf(u / a);\n    float u_ = lamda;\n\n    float v_;\n    if ( fabs(lamda) > 1E-7)\n        v_ = atanf(v * sinf(lamda) / (b * a * tanf(lamda/a)));\n    else\n        v_ = atanf(v / b);\n\n    float cosv = cosf(v_);\n    float y_ = cosv * sinf(u_);\n    float x_ = sinf(v_);\n    float z_ = cosv * cosf(u_);\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\ninline\nvoid MercatorProjector::mapForward(float x, float y, float &u, float &v)\n{\n    float x_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    float u_ = atan2f(x_, z_);\n    float v_ = asinf(y_ / sqrtf(x_ * x_ + y_ * y_ + z_ * z_));\n\n    u = scale * u_;\n    v = scale * logf( tanf( (float)(CV_PI/4) + v_/2 ) );\n}\n\ninline\nvoid MercatorProjector::mapBackward(float u, float v, float &x, float &y)\n{\n    u /= scale;\n    v /= scale;\n\n    float v_ = atanf( sinhf(v) );\n    float u_ = u;\n\n    float cosv = cosf(v_);\n    float x_ = cosv * sinf(u_);\n    float y_ = sinf(v_);\n    float z_ = cosv * cosf(u_);\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\ninline\nvoid TransverseMercatorProjector::mapForward(float x, float y, float &u, float &v)\n{\n    float x_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    float u_ = atan2f(x_, z_);\n    float v_ = asinf(y_ / sqrtf(x_ * x_ + y_ * y_ + z_ * z_));\n\n    float B = cosf(v_) * sinf(u_);\n\n    u = scale / 2 * logf( (1+B) / (1-B) );\n    v = scale * atan2f(tanf(v_), cosf(u_));\n}\n\ninline\nvoid TransverseMercatorProjector::mapBackward(float u, float v, float &x, float &y)\n{\n    u /= scale;\n    v /= scale;\n\n    float v_ = asinf( sinf(v) / coshf(u) );\n    float u_ = atan2f( sinhf(u), cos(v) );\n\n    float cosv = cosf(v_);\n    float x_ = cosv * sinf(u_);\n    float y_ = sinf(v_);\n    float z_ = cosv * cosf(u_);\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\ninline\nvoid SphericalPortraitProjector::mapForward(float x, float y, float &u0, float &v0)\n{\n    float x0_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y0_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_ = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    float x_ = y0_;\n    float y_ = x0_;\n    float u, v;\n\n    u = scale * atan2f(x_, z_);\n    v = scale * (static_cast<float>(CV_PI) - acosf(y_ / sqrtf(x_ * x_ + y_ * y_ + z_ * z_)));\n\n    u0 = -u;//v;\n    v0 = v;//u;\n}\n\n\ninline\nvoid SphericalPortraitProjector::mapBackward(float u0, float v0, float &x, float &y)\n{\n    float u, v;\n    u = -u0;//v0;\n    v = v0;//u0;\n\n    u /= scale;\n    v /= scale;\n\n    float sinv = sinf(static_cast<float>(CV_PI) - v);\n    float x0_ = sinv * sinf(u);\n    float y0_ = cosf(static_cast<float>(CV_PI) - v);\n    float z_ = sinv * cosf(u);\n\n    float x_ = y0_;\n    float y_ = x0_;\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\ninline\nvoid CylindricalPortraitProjector::mapForward(float x, float y, float &u0, float &v0)\n{\n    float x0_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y0_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_  = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    float x_ = y0_;\n    float y_ = x0_;\n    float u, v;\n\n    u = scale * atan2f(x_, z_);\n    v = scale * y_ / sqrtf(x_ * x_ + z_ * z_);\n\n    u0 = -u;//v;\n    v0 = v;//u;\n}\n\n\ninline\nvoid CylindricalPortraitProjector::mapBackward(float u0, float v0, float &x, float &y)\n{\n    float u, v;\n    u = -u0;//v0;\n    v = v0;//u0;\n\n    u /= scale;\n    v /= scale;\n\n    float x0_ = sinf(u);\n    float y0_ = v;\n    float z_  = cosf(u);\n\n    float x_ = y0_;\n    float y_ = x0_;\n\n    float z;\n    x = k_rinv[0] * x_ + k_rinv[1] * y_ + k_rinv[2] * z_;\n    y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;\n    z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;\n\n    if (z > 0) { x /= z; y /= z; }\n    else x = y = -1;\n}\n\ninline\nvoid PlanePortraitProjector::mapForward(float x, float y, float &u0, float &v0)\n{\n    float x0_ = r_kinv[0] * x + r_kinv[1] * y + r_kinv[2];\n    float y0_ = r_kinv[3] * x + r_kinv[4] * y + r_kinv[5];\n    float z_  = r_kinv[6] * x + r_kinv[7] * y + r_kinv[8];\n\n    float x_ = y0_;\n    float y_ = x0_;\n\n    x_ = t[0] + x_ / z_ * (1 - t[2]);\n    y_ = t[1] + y_ / z_ * (1 - t[2]);\n\n    float u,v;\n    u = scale * x_;\n    v = scale * y_;\n\n    u0 = -u;\n    v0 = v;\n}\n\n\ninline\nvoid PlanePortraitProjector::mapBackward(float u0, float v0, float &x, float &y)\n{\n    float u, v;\n    u = -u0;\n    v = v0;\n\n    u = u / scale - t[0];\n    v = v / scale - t[1];\n\n    float z;\n    x = k_rinv[0] * v + k_rinv[1] * u + k_rinv[2] * (1 - t[2]);\n    y = k_rinv[3] * v + k_rinv[4] * u + k_rinv[5] * (1 - t[2]);\n    z = k_rinv[6] * v + k_rinv[7] * u + k_rinv[8] * (1 - t[2]);\n\n    x /= z;\n    y /= z;\n}\n\n\n} // namespace detail\n} // namespace cv\n\n//! @endcond\n\n#endif // __OPENCV_STITCHING_WARPERS_INL_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching/warpers.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_WARPER_CREATORS_HPP__\n#define __OPENCV_STITCHING_WARPER_CREATORS_HPP__\n\n#include \"opencv2/stitching/detail/warpers.hpp\"\n\nnamespace cv {\n\n//! @addtogroup stitching_warp\n//! @{\n\n/** @brief Image warper factories base class.\n */\nclass WarperCreator\n{\npublic:\n    virtual ~WarperCreator() {}\n    virtual Ptr<detail::RotationWarper> create(float scale) const = 0;\n};\n\n/** @brief Plane warper factory class.\n  @sa detail::PlaneWarper\n */\nclass PlaneWarper : public WarperCreator\n{\npublic:\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::PlaneWarper>(scale); }\n};\n\n/** @brief Cylindrical warper factory class.\n@sa detail::CylindricalWarper\n*/\nclass CylindricalWarper: public WarperCreator\n{\npublic:\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::CylindricalWarper>(scale); }\n};\n\n/** @brief Spherical warper factory class */\nclass SphericalWarper: public WarperCreator\n{\npublic:\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::SphericalWarper>(scale); }\n};\n\nclass FisheyeWarper : public WarperCreator\n{\npublic:\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::FisheyeWarper>(scale); }\n};\n\nclass StereographicWarper: public WarperCreator\n{\npublic:\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::StereographicWarper>(scale); }\n};\n\nclass CompressedRectilinearWarper: public WarperCreator\n{\n    float a, b;\npublic:\n    CompressedRectilinearWarper(float A = 1, float B = 1)\n    {\n        a = A; b = B;\n    }\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::CompressedRectilinearWarper>(scale, a, b); }\n};\n\nclass CompressedRectilinearPortraitWarper: public WarperCreator\n{\n    float a, b;\npublic:\n    CompressedRectilinearPortraitWarper(float A = 1, float B = 1)\n    {\n        a = A; b = B;\n    }\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::CompressedRectilinearPortraitWarper>(scale, a, b); }\n};\n\nclass PaniniWarper: public WarperCreator\n{\n    float a, b;\npublic:\n    PaniniWarper(float A = 1, float B = 1)\n    {\n        a = A; b = B;\n    }\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::PaniniWarper>(scale, a, b); }\n};\n\nclass PaniniPortraitWarper: public WarperCreator\n{\n    float a, b;\npublic:\n    PaniniPortraitWarper(float A = 1, float B = 1)\n    {\n        a = A; b = B;\n    }\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::PaniniPortraitWarper>(scale, a, b); }\n};\n\nclass MercatorWarper: public WarperCreator\n{\npublic:\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::MercatorWarper>(scale); }\n};\n\nclass TransverseMercatorWarper: public WarperCreator\n{\npublic:\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::TransverseMercatorWarper>(scale); }\n};\n\n\n\n#ifdef HAVE_OPENCV_CUDAWARPING\nclass PlaneWarperGpu: public WarperCreator\n{\npublic:\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::PlaneWarperGpu>(scale); }\n};\n\n\nclass CylindricalWarperGpu: public WarperCreator\n{\npublic:\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::CylindricalWarperGpu>(scale); }\n};\n\n\nclass SphericalWarperGpu: public WarperCreator\n{\npublic:\n    Ptr<detail::RotationWarper> create(float scale) const { return makePtr<detail::SphericalWarperGpu>(scale); }\n};\n#endif\n\n//! @} stitching_warp\n\n} // namespace cv\n\n#endif // __OPENCV_STITCHING_WARPER_CREATORS_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/stitching.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_STITCHING_STITCHER_HPP__\n#define __OPENCV_STITCHING_STITCHER_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/features2d.hpp\"\n#include \"opencv2/stitching/warpers.hpp\"\n#include \"opencv2/stitching/detail/matchers.hpp\"\n#include \"opencv2/stitching/detail/motion_estimators.hpp\"\n#include \"opencv2/stitching/detail/exposure_compensate.hpp\"\n#include \"opencv2/stitching/detail/seam_finders.hpp\"\n#include \"opencv2/stitching/detail/blenders.hpp\"\n#include \"opencv2/stitching/detail/camera.hpp\"\n\n/**\n@defgroup stitching Images stitching\n\nThis figure illustrates the stitching module pipeline implemented in the Stitcher class. Using that\nclass it's possible to configure/remove some steps, i.e. adjust the stitching pipeline according to\nthe particular needs. All building blocks from the pipeline are available in the detail namespace,\none can combine and use them separately.\n\nThe implemented stitching pipeline is very similar to the one proposed in @cite BL07 .\n\n![image](StitchingPipeline.jpg)\n\n@{\n    @defgroup stitching_match Features Finding and Images Matching\n    @defgroup stitching_rotation Rotation Estimation\n    @defgroup stitching_autocalib Autocalibration\n    @defgroup stitching_warp Images Warping\n    @defgroup stitching_seam Seam Estimation\n    @defgroup stitching_exposure Exposure Compensation\n    @defgroup stitching_blend Image Blenders\n@}\n  */\n\nnamespace cv {\n\n//! @addtogroup stitching\n//! @{\n\n/** @brief High level image stitcher.\n\nIt's possible to use this class without being aware of the entire stitching pipeline. However, to\nbe able to achieve higher stitching stability and quality of the final images at least being\nfamiliar with the theory is recommended.\n\n@note\n   -   A basic example on image stitching can be found at\n        opencv_source_code/samples/cpp/stitching.cpp\n    -   A detailed example on image stitching can be found at\n        opencv_source_code/samples/cpp/stitching_detailed.cpp\n */\nclass CV_EXPORTS_W Stitcher\n{\npublic:\n    enum { ORIG_RESOL = -1 };\n    enum Status\n    {\n        OK = 0,\n        ERR_NEED_MORE_IMGS = 1,\n        ERR_HOMOGRAPHY_EST_FAIL = 2,\n        ERR_CAMERA_PARAMS_ADJUST_FAIL = 3\n    };\n\n   // Stitcher() {}\n    /** @brief Creates a stitcher with the default parameters.\n\n    @param try_use_gpu Flag indicating whether GPU should be used whenever it's possible.\n    @return Stitcher class instance.\n     */\n    static Stitcher createDefault(bool try_use_gpu = false);\n\n    CV_WRAP double registrationResol() const { return registr_resol_; }\n    CV_WRAP void setRegistrationResol(double resol_mpx) { registr_resol_ = resol_mpx; }\n\n    CV_WRAP double seamEstimationResol() const { return seam_est_resol_; }\n    CV_WRAP void setSeamEstimationResol(double resol_mpx) { seam_est_resol_ = resol_mpx; }\n\n    CV_WRAP double compositingResol() const { return compose_resol_; }\n    CV_WRAP void setCompositingResol(double resol_mpx) { compose_resol_ = resol_mpx; }\n\n    CV_WRAP double panoConfidenceThresh() const { return conf_thresh_; }\n    CV_WRAP void setPanoConfidenceThresh(double conf_thresh) { conf_thresh_ = conf_thresh; }\n\n    CV_WRAP bool waveCorrection() const { return do_wave_correct_; }\n    CV_WRAP void setWaveCorrection(bool flag) { do_wave_correct_ = flag; }\n\n    detail::WaveCorrectKind waveCorrectKind() const { return wave_correct_kind_; }\n    void setWaveCorrectKind(detail::WaveCorrectKind kind) { wave_correct_kind_ = kind; }\n\n    Ptr<detail::FeaturesFinder> featuresFinder() { return features_finder_; }\n    const Ptr<detail::FeaturesFinder> featuresFinder() const { return features_finder_; }\n    void setFeaturesFinder(Ptr<detail::FeaturesFinder> features_finder)\n        { features_finder_ = features_finder; }\n\n    Ptr<detail::FeaturesMatcher> featuresMatcher() { return features_matcher_; }\n    const Ptr<detail::FeaturesMatcher> featuresMatcher() const { return features_matcher_; }\n    void setFeaturesMatcher(Ptr<detail::FeaturesMatcher> features_matcher)\n        { features_matcher_ = features_matcher; }\n\n    const cv::UMat& matchingMask() const { return matching_mask_; }\n    void setMatchingMask(const cv::UMat &mask)\n    {\n        CV_Assert(mask.type() == CV_8U && mask.cols == mask.rows);\n        matching_mask_ = mask.clone();\n    }\n\n    Ptr<detail::BundleAdjusterBase> bundleAdjuster() { return bundle_adjuster_; }\n    const Ptr<detail::BundleAdjusterBase> bundleAdjuster() const { return bundle_adjuster_; }\n    void setBundleAdjuster(Ptr<detail::BundleAdjusterBase> bundle_adjuster)\n        { bundle_adjuster_ = bundle_adjuster; }\n\n    Ptr<WarperCreator> warper() { return warper_; }\n    const Ptr<WarperCreator> warper() const { return warper_; }\n    void setWarper(Ptr<WarperCreator> creator) { warper_ = creator; }\n\n    Ptr<detail::ExposureCompensator> exposureCompensator() { return exposure_comp_; }\n    const Ptr<detail::ExposureCompensator> exposureCompensator() const { return exposure_comp_; }\n    void setExposureCompensator(Ptr<detail::ExposureCompensator> exposure_comp)\n        { exposure_comp_ = exposure_comp; }\n\n    Ptr<detail::SeamFinder> seamFinder() { return seam_finder_; }\n    const Ptr<detail::SeamFinder> seamFinder() const { return seam_finder_; }\n    void setSeamFinder(Ptr<detail::SeamFinder> seam_finder) { seam_finder_ = seam_finder; }\n\n    Ptr<detail::Blender> blender() { return blender_; }\n    const Ptr<detail::Blender> blender() const { return blender_; }\n    void setBlender(Ptr<detail::Blender> b) { blender_ = b; }\n\n    /** @overload */\n    CV_WRAP Status estimateTransform(InputArrayOfArrays images);\n    /** @brief These functions try to match the given images and to estimate rotations of each camera.\n\n    @note Use the functions only if you're aware of the stitching pipeline, otherwise use\n    Stitcher::stitch.\n\n    @param images Input images.\n    @param rois Region of interest rectangles.\n    @return Status code.\n     */\n    Status estimateTransform(InputArrayOfArrays images, const std::vector<std::vector<Rect> > &rois);\n\n    /** @overload */\n    CV_WRAP Status composePanorama(OutputArray pano);\n    /** @brief These functions try to compose the given images (or images stored internally from the other function\n    calls) into the final pano under the assumption that the image transformations were estimated\n    before.\n\n    @note Use the functions only if you're aware of the stitching pipeline, otherwise use\n    Stitcher::stitch.\n\n    @param images Input images.\n    @param pano Final pano.\n    @return Status code.\n     */\n    Status composePanorama(InputArrayOfArrays images, OutputArray pano);\n\n    /** @overload */\n    CV_WRAP Status stitch(InputArrayOfArrays images, OutputArray pano);\n    /** @brief These functions try to stitch the given images.\n\n    @param images Input images.\n    @param rois Region of interest rectangles.\n    @param pano Final pano.\n    @return Status code.\n     */\n    Status stitch(InputArrayOfArrays images, const std::vector<std::vector<Rect> > &rois, OutputArray pano);\n\n    std::vector<int> component() const { return indices_; }\n    std::vector<detail::CameraParams> cameras() const { return cameras_; }\n    CV_WRAP double workScale() const { return work_scale_; }\n\nprivate:\n    //Stitcher() {}\n\n    Status matchImages();\n    Status estimateCameraParams();\n\n    double registr_resol_;\n    double seam_est_resol_;\n    double compose_resol_;\n    double conf_thresh_;\n    Ptr<detail::FeaturesFinder> features_finder_;\n    Ptr<detail::FeaturesMatcher> features_matcher_;\n    cv::UMat matching_mask_;\n    Ptr<detail::BundleAdjusterBase> bundle_adjuster_;\n    bool do_wave_correct_;\n    detail::WaveCorrectKind wave_correct_kind_;\n    Ptr<WarperCreator> warper_;\n    Ptr<detail::ExposureCompensator> exposure_comp_;\n    Ptr<detail::SeamFinder> seam_finder_;\n    Ptr<detail::Blender> blender_;\n\n    std::vector<cv::UMat> imgs_;\n    std::vector<std::vector<cv::Rect> > rois_;\n    std::vector<cv::Size> full_img_sizes_;\n    std::vector<detail::ImageFeatures> features_;\n    std::vector<detail::MatchesInfo> pairwise_matches_;\n    std::vector<cv::UMat> seam_est_imgs_;\n    std::vector<int> indices_;\n    std::vector<detail::CameraParams> cameras_;\n    double work_scale_;\n    double seam_scale_;\n    double seam_work_aspect_;\n    double warped_image_scale_;\n};\n\nCV_EXPORTS_W Ptr<Stitcher> createStitcher(bool try_use_gpu = false);\n\n//! @} stitching\n\n} // namespace cv\n\n#endif // __OPENCV_STITCHING_STITCHER_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/video/background_segm.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_BACKGROUND_SEGM_HPP__\n#define __OPENCV_BACKGROUND_SEGM_HPP__\n\n#include \"opencv2/core.hpp\"\n\nnamespace cv\n{\n\n//! @addtogroup video_motion\n//! @{\n\n/** @brief Base class for background/foreground segmentation. :\n\nThe class is only used to define the common interface for the whole family of background/foreground\nsegmentation algorithms.\n */\nclass CV_EXPORTS_W BackgroundSubtractor : public Algorithm\n{\npublic:\n    /** @brief Computes a foreground mask.\n\n    @param image Next video frame.\n    @param fgmask The output foreground mask as an 8-bit binary image.\n    @param learningRate The value between 0 and 1 that indicates how fast the background model is\n    learnt. Negative parameter value makes the algorithm to use some automatically chosen learning\n    rate. 0 means that the background model is not updated at all, 1 means that the background model\n    is completely reinitialized from the last frame.\n     */\n    CV_WRAP virtual void apply(InputArray image, OutputArray fgmask, double learningRate=-1) = 0;\n\n    /** @brief Computes a background image.\n\n    @param backgroundImage The output background image.\n\n    @note Sometimes the background image can be very blurry, as it contain the average background\n    statistics.\n     */\n    CV_WRAP virtual void getBackgroundImage(OutputArray backgroundImage) const = 0;\n};\n\n\n/** @brief Gaussian Mixture-based Background/Foreground Segmentation Algorithm.\n\nThe class implements the Gaussian mixture model background subtraction described in @cite Zivkovic2004\nand @cite Zivkovic2006 .\n */\nclass CV_EXPORTS_W BackgroundSubtractorMOG2 : public BackgroundSubtractor\n{\npublic:\n    /** @brief Returns the number of last frames that affect the background model\n    */\n    CV_WRAP virtual int getHistory() const = 0;\n    /** @brief Sets the number of last frames that affect the background model\n    */\n    CV_WRAP virtual void setHistory(int history) = 0;\n\n    /** @brief Returns the number of gaussian components in the background model\n    */\n    CV_WRAP virtual int getNMixtures() const = 0;\n    /** @brief Sets the number of gaussian components in the background model.\n\n    The model needs to be reinitalized to reserve memory.\n    */\n    CV_WRAP virtual void setNMixtures(int nmixtures) = 0;//needs reinitialization!\n\n    /** @brief Returns the \"background ratio\" parameter of the algorithm\n\n    If a foreground pixel keeps semi-constant value for about backgroundRatio\\*history frames, it's\n    considered background and added to the model as a center of a new component. It corresponds to TB\n    parameter in the paper.\n     */\n    CV_WRAP virtual double getBackgroundRatio() const = 0;\n    /** @brief Sets the \"background ratio\" parameter of the algorithm\n    */\n    CV_WRAP virtual void setBackgroundRatio(double ratio) = 0;\n\n    /** @brief Returns the variance threshold for the pixel-model match\n\n    The main threshold on the squared Mahalanobis distance to decide if the sample is well described by\n    the background model or not. Related to Cthr from the paper.\n     */\n    CV_WRAP virtual double getVarThreshold() const = 0;\n    /** @brief Sets the variance threshold for the pixel-model match\n    */\n    CV_WRAP virtual void setVarThreshold(double varThreshold) = 0;\n\n    /** @brief Returns the variance threshold for the pixel-model match used for new mixture component generation\n\n    Threshold for the squared Mahalanobis distance that helps decide when a sample is close to the\n    existing components (corresponds to Tg in the paper). If a pixel is not close to any component, it\n    is considered foreground or added as a new component. 3 sigma =\\> Tg=3\\*3=9 is default. A smaller Tg\n    value generates more components. A higher Tg value may result in a small number of components but\n    they can grow too large.\n     */\n    CV_WRAP virtual double getVarThresholdGen() const = 0;\n    /** @brief Sets the variance threshold for the pixel-model match used for new mixture component generation\n    */\n    CV_WRAP virtual void setVarThresholdGen(double varThresholdGen) = 0;\n\n    /** @brief Returns the initial variance of each gaussian component\n    */\n    CV_WRAP virtual double getVarInit() const = 0;\n    /** @brief Sets the initial variance of each gaussian component\n    */\n    CV_WRAP virtual void setVarInit(double varInit) = 0;\n\n    CV_WRAP virtual double getVarMin() const = 0;\n    CV_WRAP virtual void setVarMin(double varMin) = 0;\n\n    CV_WRAP virtual double getVarMax() const = 0;\n    CV_WRAP virtual void setVarMax(double varMax) = 0;\n\n    /** @brief Returns the complexity reduction threshold\n\n    This parameter defines the number of samples needed to accept to prove the component exists. CT=0.05\n    is a default value for all the samples. By setting CT=0 you get an algorithm very similar to the\n    standard Stauffer&Grimson algorithm.\n     */\n    CV_WRAP virtual double getComplexityReductionThreshold() const = 0;\n    /** @brief Sets the complexity reduction threshold\n    */\n    CV_WRAP virtual void setComplexityReductionThreshold(double ct) = 0;\n\n    /** @brief Returns the shadow detection flag\n\n    If true, the algorithm detects shadows and marks them. See createBackgroundSubtractorMOG2 for\n    details.\n     */\n    CV_WRAP virtual bool getDetectShadows() const = 0;\n    /** @brief Enables or disables shadow detection\n    */\n    CV_WRAP virtual void setDetectShadows(bool detectShadows) = 0;\n\n    /** @brief Returns the shadow value\n\n    Shadow value is the value used to mark shadows in the foreground mask. Default value is 127. Value 0\n    in the mask always means background, 255 means foreground.\n     */\n    CV_WRAP virtual int getShadowValue() const = 0;\n    /** @brief Sets the shadow value\n    */\n    CV_WRAP virtual void setShadowValue(int value) = 0;\n\n    /** @brief Returns the shadow threshold\n\n    A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in\n    the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel\n    is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiarra,\n    *Detecting Moving Shadows...*, IEEE PAMI,2003.\n     */\n    CV_WRAP virtual double getShadowThreshold() const = 0;\n    /** @brief Sets the shadow threshold\n    */\n    CV_WRAP virtual void setShadowThreshold(double threshold) = 0;\n};\n\n/** @brief Creates MOG2 Background Subtractor\n\n@param history Length of the history.\n@param varThreshold Threshold on the squared Mahalanobis distance between the pixel and the model\nto decide whether a pixel is well described by the background model. This parameter does not\naffect the background update.\n@param detectShadows If true, the algorithm will detect shadows and mark them. It decreases the\nspeed a bit, so if you do not need this feature, set the parameter to false.\n */\nCV_EXPORTS_W Ptr<BackgroundSubtractorMOG2>\n    createBackgroundSubtractorMOG2(int history=500, double varThreshold=16,\n                                   bool detectShadows=true);\n\n/** @brief K-nearest neigbours - based Background/Foreground Segmentation Algorithm.\n\nThe class implements the K-nearest neigbours background subtraction described in @cite Zivkovic2006 .\nVery efficient if number of foreground pixels is low.\n */\nclass CV_EXPORTS_W BackgroundSubtractorKNN : public BackgroundSubtractor\n{\npublic:\n    /** @brief Returns the number of last frames that affect the background model\n    */\n    CV_WRAP virtual int getHistory() const = 0;\n    /** @brief Sets the number of last frames that affect the background model\n    */\n    CV_WRAP virtual void setHistory(int history) = 0;\n\n    /** @brief Returns the number of data samples in the background model\n    */\n    CV_WRAP virtual int getNSamples() const = 0;\n    /** @brief Sets the number of data samples in the background model.\n\n    The model needs to be reinitalized to reserve memory.\n    */\n    CV_WRAP virtual void setNSamples(int _nN) = 0;//needs reinitialization!\n\n    /** @brief Returns the threshold on the squared distance between the pixel and the sample\n\n    The threshold on the squared distance between the pixel and the sample to decide whether a pixel is\n    close to a data sample.\n     */\n    CV_WRAP virtual double getDist2Threshold() const = 0;\n    /** @brief Sets the threshold on the squared distance\n    */\n    CV_WRAP virtual void setDist2Threshold(double _dist2Threshold) = 0;\n\n    /** @brief Returns the number of neighbours, the k in the kNN.\n\n    K is the number of samples that need to be within dist2Threshold in order to decide that that\n    pixel is matching the kNN background model.\n     */\n    CV_WRAP virtual int getkNNSamples() const = 0;\n    /** @brief Sets the k in the kNN. How many nearest neigbours need to match.\n    */\n    CV_WRAP virtual void setkNNSamples(int _nkNN) = 0;\n\n    /** @brief Returns the shadow detection flag\n\n    If true, the algorithm detects shadows and marks them. See createBackgroundSubtractorKNN for\n    details.\n     */\n    CV_WRAP virtual bool getDetectShadows() const = 0;\n    /** @brief Enables or disables shadow detection\n    */\n    CV_WRAP virtual void setDetectShadows(bool detectShadows) = 0;\n\n    /** @brief Returns the shadow value\n\n    Shadow value is the value used to mark shadows in the foreground mask. Default value is 127. Value 0\n    in the mask always means background, 255 means foreground.\n     */\n    CV_WRAP virtual int getShadowValue() const = 0;\n    /** @brief Sets the shadow value\n    */\n    CV_WRAP virtual void setShadowValue(int value) = 0;\n\n    /** @brief Returns the shadow threshold\n\n    A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in\n    the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel\n    is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiarra,\n    *Detecting Moving Shadows...*, IEEE PAMI,2003.\n     */\n    CV_WRAP virtual double getShadowThreshold() const = 0;\n    /** @brief Sets the shadow threshold\n     */\n    CV_WRAP virtual void setShadowThreshold(double threshold) = 0;\n};\n\n/** @brief Creates KNN Background Subtractor\n\n@param history Length of the history.\n@param dist2Threshold Threshold on the squared distance between the pixel and the sample to decide\nwhether a pixel is close to that sample. This parameter does not affect the background update.\n@param detectShadows If true, the algorithm will detect shadows and mark them. It decreases the\nspeed a bit, so if you do not need this feature, set the parameter to false.\n */\nCV_EXPORTS_W Ptr<BackgroundSubtractorKNN>\n    createBackgroundSubtractorKNN(int history=500, double dist2Threshold=400.0,\n                                   bool detectShadows=true);\n\n//! @} video_motion\n\n} // cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/video/tracking.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_TRACKING_HPP__\n#define __OPENCV_TRACKING_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/imgproc.hpp\"\n\nnamespace cv\n{\n\n//! @addtogroup video_track\n//! @{\n\nenum { OPTFLOW_USE_INITIAL_FLOW     = 4,\n       OPTFLOW_LK_GET_MIN_EIGENVALS = 8,\n       OPTFLOW_FARNEBACK_GAUSSIAN   = 256\n     };\n\n/** @brief Finds an object center, size, and orientation.\n\n@param probImage Back projection of the object histogram. See calcBackProject.\n@param window Initial search window.\n@param criteria Stop criteria for the underlying meanShift.\nreturns\n(in old interfaces) Number of iterations CAMSHIFT took to converge\nThe function implements the CAMSHIFT object tracking algorithm @cite Bradski98 . First, it finds an\nobject center using meanShift and then adjusts the window size and finds the optimal rotation. The\nfunction returns the rotated rectangle structure that includes the object position, size, and\norientation. The next position of the search window can be obtained with RotatedRect::boundingRect()\n\nSee the OpenCV sample camshiftdemo.c that tracks colored objects.\n\n@note\n-   (Python) A sample explaining the camshift tracking algorithm can be found at\n    opencv_source_code/samples/python2/camshift.py\n */\nCV_EXPORTS_W RotatedRect CamShift( InputArray probImage, CV_IN_OUT Rect& window,\n                                   TermCriteria criteria );\n\n/** @brief Finds an object on a back projection image.\n\n@param probImage Back projection of the object histogram. See calcBackProject for details.\n@param window Initial search window.\n@param criteria Stop criteria for the iterative search algorithm.\nreturns\n:   Number of iterations CAMSHIFT took to converge.\nThe function implements the iterative object search algorithm. It takes the input back projection of\nan object and the initial position. The mass center in window of the back projection image is\ncomputed and the search window center shifts to the mass center. The procedure is repeated until the\nspecified number of iterations criteria.maxCount is done or until the window center shifts by less\nthan criteria.epsilon. The algorithm is used inside CamShift and, unlike CamShift , the search\nwindow size or orientation do not change during the search. You can simply pass the output of\ncalcBackProject to this function. But better results can be obtained if you pre-filter the back\nprojection and remove the noise. For example, you can do this by retrieving connected components\nwith findContours , throwing away contours with small area ( contourArea ), and rendering the\nremaining contours with drawContours.\n\n@note\n-   A mean-shift tracking sample can be found at opencv_source_code/samples/cpp/camshiftdemo.cpp\n */\nCV_EXPORTS_W int meanShift( InputArray probImage, CV_IN_OUT Rect& window, TermCriteria criteria );\n\n/** @brief Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.\n\n@param img 8-bit input image.\n@param pyramid output pyramid.\n@param winSize window size of optical flow algorithm. Must be not less than winSize argument of\ncalcOpticalFlowPyrLK. It is needed to calculate required padding for pyramid levels.\n@param maxLevel 0-based maximal pyramid level number.\n@param withDerivatives set to precompute gradients for the every pyramid level. If pyramid is\nconstructed without the gradients then calcOpticalFlowPyrLK will calculate them internally.\n@param pyrBorder the border mode for pyramid layers.\n@param derivBorder the border mode for gradients.\n@param tryReuseInputImage put ROI of input image into the pyramid if possible. You can pass false\nto force data copying.\n@return number of levels in constructed pyramid. Can be less than maxLevel.\n */\nCV_EXPORTS_W int buildOpticalFlowPyramid( InputArray img, OutputArrayOfArrays pyramid,\n                                          Size winSize, int maxLevel, bool withDerivatives = true,\n                                          int pyrBorder = BORDER_REFLECT_101,\n                                          int derivBorder = BORDER_CONSTANT,\n                                          bool tryReuseInputImage = true );\n\n/** @brief Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with\npyramids.\n\n@param prevImg first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid.\n@param nextImg second input image or pyramid of the same size and the same type as prevImg.\n@param prevPts vector of 2D points for which the flow needs to be found; point coordinates must be\nsingle-precision floating-point numbers.\n@param nextPts output vector of 2D points (with single-precision floating-point coordinates)\ncontaining the calculated new positions of input features in the second image; when\nOPTFLOW_USE_INITIAL_FLOW flag is passed, the vector must have the same size as in the input.\n@param status output status vector (of unsigned chars); each element of the vector is set to 1 if\nthe flow for the corresponding features has been found, otherwise, it is set to 0.\n@param err output vector of errors; each element of the vector is set to an error for the\ncorresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't\nfound then the error is not defined (use the status parameter to find such cases).\n@param winSize size of the search window at each pyramid level.\n@param maxLevel 0-based maximal pyramid level number; if set to 0, pyramids are not used (single\nlevel), if set to 1, two levels are used, and so on; if pyramids are passed to input then\nalgorithm will use as many levels as pyramids have but no more than maxLevel.\n@param criteria parameter, specifying the termination criteria of the iterative search algorithm\n(after the specified maximum number of iterations criteria.maxCount or when the search window\nmoves by less than criteria.epsilon.\n@param flags operation flags:\n -   **OPTFLOW_USE_INITIAL_FLOW** uses initial estimations, stored in nextPts; if the flag is\n     not set, then prevPts is copied to nextPts and is considered the initial estimate.\n -   **OPTFLOW_LK_GET_MIN_EIGENVALS** use minimum eigen values as an error measure (see\n     minEigThreshold description); if the flag is not set, then L1 distance between patches\n     around the original and a moved point, divided by number of pixels in a window, is used as a\n     error measure.\n@param minEigThreshold the algorithm calculates the minimum eigen value of a 2x2 normal matrix of\noptical flow equations (this matrix is called a spatial gradient matrix in @cite Bouguet00), divided\nby number of pixels in a window; if this value is less than minEigThreshold, then a corresponding\nfeature is filtered out and its flow is not processed, so it allows to remove bad points and get a\nperformance boost.\n\nThe function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See\n@cite Bouguet00 . The function is parallelized with the TBB library.\n\n@note\n\n-   An example using the Lucas-Kanade optical flow algorithm can be found at\n    opencv_source_code/samples/cpp/lkdemo.cpp\n-   (Python) An example using the Lucas-Kanade optical flow algorithm can be found at\n    opencv_source_code/samples/python2/lk_track.py\n-   (Python) An example using the Lucas-Kanade tracker for homography matching can be found at\n    opencv_source_code/samples/python2/lk_homography.py\n */\nCV_EXPORTS_W void calcOpticalFlowPyrLK( InputArray prevImg, InputArray nextImg,\n                                        InputArray prevPts, InputOutputArray nextPts,\n                                        OutputArray status, OutputArray err,\n                                        Size winSize = Size(21,21), int maxLevel = 3,\n                                        TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01),\n                                        int flags = 0, double minEigThreshold = 1e-4 );\n\n/** @brief Computes a dense optical flow using the Gunnar Farneback's algorithm.\n\n@param prev first 8-bit single-channel input image.\n@param next second input image of the same size and the same type as prev.\n@param flow computed flow image that has the same size as prev and type CV_32FC2.\n@param pyr_scale parameter, specifying the image scale (\\<1) to build pyramids for each image;\npyr_scale=0.5 means a classical pyramid, where each next layer is twice smaller than the previous\none.\n@param levels number of pyramid layers including the initial image; levels=1 means that no extra\nlayers are created and only the original images are used.\n@param winsize averaging window size; larger values increase the algorithm robustness to image\nnoise and give more chances for fast motion detection, but yield more blurred motion field.\n@param iterations number of iterations the algorithm does at each pyramid level.\n@param poly_n size of the pixel neighborhood used to find polynomial expansion in each pixel;\nlarger values mean that the image will be approximated with smoother surfaces, yielding more\nrobust algorithm and more blurred motion field, typically poly_n =5 or 7.\n@param poly_sigma standard deviation of the Gaussian that is used to smooth derivatives used as a\nbasis for the polynomial expansion; for poly_n=5, you can set poly_sigma=1.1, for poly_n=7, a\ngood value would be poly_sigma=1.5.\n@param flags operation flags that can be a combination of the following:\n -   **OPTFLOW_USE_INITIAL_FLOW** uses the input flow as an initial flow approximation.\n -   **OPTFLOW_FARNEBACK_GAUSSIAN** uses the Gaussian \\f$\\texttt{winsize}\\times\\texttt{winsize}\\f$\n     filter instead of a box filter of the same size for optical flow estimation; usually, this\n     option gives z more accurate flow than with a box filter, at the cost of lower speed;\n     normally, winsize for a Gaussian window should be set to a larger value to achieve the same\n     level of robustness.\n\nThe function finds an optical flow for each prev pixel using the @cite Farneback2003 algorithm so that\n\n\\f[\\texttt{prev} (y,x)  \\sim \\texttt{next} ( y + \\texttt{flow} (y,x)[1],  x + \\texttt{flow} (y,x)[0])\\f]\n\n@note\n\n-   An example using the optical flow algorithm described by Gunnar Farneback can be found at\n    opencv_source_code/samples/cpp/fback.cpp\n-   (Python) An example using the optical flow algorithm described by Gunnar Farneback can be\n    found at opencv_source_code/samples/python2/opt_flow.py\n */\nCV_EXPORTS_W void calcOpticalFlowFarneback( InputArray prev, InputArray next, InputOutputArray flow,\n                                            double pyr_scale, int levels, int winsize,\n                                            int iterations, int poly_n, double poly_sigma,\n                                            int flags );\n\n/** @brief Computes an optimal affine transformation between two 2D point sets.\n\n@param src First input 2D point set stored in std::vector or Mat, or an image stored in Mat.\n@param dst Second input 2D point set of the same size and the same type as A, or another image.\n@param fullAffine If true, the function finds an optimal affine transformation with no additional\nrestrictions (6 degrees of freedom). Otherwise, the class of transformations to choose from is\nlimited to combinations of translation, rotation, and uniform scaling (5 degrees of freedom).\n\nThe function finds an optimal affine transform *[A|b]* (a 2 x 3 floating-point matrix) that\napproximates best the affine transformation between:\n\n*   Two point sets\n*   Two raster images. In this case, the function first finds some features in the src image and\n    finds the corresponding features in dst image. After that, the problem is reduced to the first\n    case.\nIn case of point sets, the problem is formulated as follows: you need to find a 2x2 matrix *A* and\n2x1 vector *b* so that:\n\n\\f[[A^*|b^*] = arg  \\min _{[A|b]}  \\sum _i  \\| \\texttt{dst}[i] - A { \\texttt{src}[i]}^T - b  \\| ^2\\f]\nwhere src[i] and dst[i] are the i-th points in src and dst, respectively\n\\f$[A|b]\\f$ can be either arbitrary (when fullAffine=true ) or have a form of\n\\f[\\begin{bmatrix} a_{11} & a_{12} & b_1  \\\\ -a_{12} & a_{11} & b_2  \\end{bmatrix}\\f]\nwhen fullAffine=false.\n\n@sa\ngetAffineTransform, getPerspectiveTransform, findHomography\n */\nCV_EXPORTS_W Mat estimateRigidTransform( InputArray src, InputArray dst, bool fullAffine );\n\n\nenum\n{\n    MOTION_TRANSLATION = 0,\n    MOTION_EUCLIDEAN   = 1,\n    MOTION_AFFINE      = 2,\n    MOTION_HOMOGRAPHY  = 3\n};\n\n/** @brief Finds the geometric transform (warp) between two images in terms of the ECC criterion @cite EP08 .\n\n@param templateImage single-channel template image; CV_8U or CV_32F array.\n@param inputImage single-channel input image which should be warped with the final warpMatrix in\norder to provide an image similar to templateImage, same type as temlateImage.\n@param warpMatrix floating-point \\f$2\\times 3\\f$ or \\f$3\\times 3\\f$ mapping matrix (warp).\n@param motionType parameter, specifying the type of motion:\n -   **MOTION_TRANSLATION** sets a translational motion model; warpMatrix is \\f$2\\times 3\\f$ with\n     the first \\f$2\\times 2\\f$ part being the unity matrix and the rest two parameters being\n     estimated.\n -   **MOTION_EUCLIDEAN** sets a Euclidean (rigid) transformation as motion model; three\n     parameters are estimated; warpMatrix is \\f$2\\times 3\\f$.\n -   **MOTION_AFFINE** sets an affine motion model (DEFAULT); six parameters are estimated;\n     warpMatrix is \\f$2\\times 3\\f$.\n -   **MOTION_HOMOGRAPHY** sets a homography as a motion model; eight parameters are\n     estimated;\\`warpMatrix\\` is \\f$3\\times 3\\f$.\n@param criteria parameter, specifying the termination criteria of the ECC algorithm;\ncriteria.epsilon defines the threshold of the increment in the correlation coefficient between two\niterations (a negative criteria.epsilon makes criteria.maxcount the only termination criterion).\nDefault values are shown in the declaration above.\n@param inputMask An optional mask to indicate valid values of inputImage.\n\nThe function estimates the optimum transformation (warpMatrix) with respect to ECC criterion\n(@cite EP08), that is\n\n\\f[\\texttt{warpMatrix} = \\texttt{warpMatrix} = \\arg\\max_{W} \\texttt{ECC}(\\texttt{templateImage}(x,y),\\texttt{inputImage}(x',y'))\\f]\n\nwhere\n\n\\f[\\begin{bmatrix} x' \\\\ y' \\end{bmatrix} = W \\cdot \\begin{bmatrix} x \\\\ y \\\\ 1 \\end{bmatrix}\\f]\n\n(the equation holds with homogeneous coordinates for homography). It returns the final enhanced\ncorrelation coefficient, that is the correlation coefficient between the template image and the\nfinal warped input image. When a \\f$3\\times 3\\f$ matrix is given with motionType =0, 1 or 2, the third\nrow is ignored.\n\nUnlike findHomography and estimateRigidTransform, the function findTransformECC implements an\narea-based alignment that builds on intensity similarities. In essence, the function updates the\ninitial transformation that roughly aligns the images. If this information is missing, the identity\nwarp (unity matrix) should be given as input. Note that if images undergo strong\ndisplacements/rotations, an initial transformation that roughly aligns the images is necessary\n(e.g., a simple euclidean/similarity transform that allows for the images showing the same image\ncontent approximately). Use inverse warping in the second image to take an image close to the first\none, i.e. use the flag WARP_INVERSE_MAP with warpAffine or warpPerspective. See also the OpenCV\nsample image_alignment.cpp that demonstrates the use of the function. Note that the function throws\nan exception if algorithm does not converges.\n\n@sa\nestimateRigidTransform, findHomography\n */\nCV_EXPORTS_W double findTransformECC( InputArray templateImage, InputArray inputImage,\n                                      InputOutputArray warpMatrix, int motionType = MOTION_AFFINE,\n                                      TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001),\n                                      InputArray inputMask = noArray());\n\n/** @brief Kalman filter class.\n\nThe class implements a standard Kalman filter <http://en.wikipedia.org/wiki/Kalman_filter>,\n@cite Welch95 . However, you can modify transitionMatrix, controlMatrix, and measurementMatrix to get\nan extended Kalman filter functionality. See the OpenCV sample kalman.cpp.\n\n@note\n\n-   An example using the standard Kalman filter can be found at\n    opencv_source_code/samples/cpp/kalman.cpp\n */\nclass CV_EXPORTS_W KalmanFilter\n{\npublic:\n    /** @brief The constructors.\n\n    @note In C API when CvKalman\\* kalmanFilter structure is not needed anymore, it should be released\n    with cvReleaseKalman(&kalmanFilter)\n     */\n    CV_WRAP KalmanFilter();\n    /** @overload\n    @param dynamParams Dimensionality of the state.\n    @param measureParams Dimensionality of the measurement.\n    @param controlParams Dimensionality of the control vector.\n    @param type Type of the created matrices that should be CV_32F or CV_64F.\n    */\n    CV_WRAP KalmanFilter( int dynamParams, int measureParams, int controlParams = 0, int type = CV_32F );\n\n    /** @brief Re-initializes Kalman filter. The previous content is destroyed.\n\n    @param dynamParams Dimensionality of the state.\n    @param measureParams Dimensionality of the measurement.\n    @param controlParams Dimensionality of the control vector.\n    @param type Type of the created matrices that should be CV_32F or CV_64F.\n     */\n    void init( int dynamParams, int measureParams, int controlParams = 0, int type = CV_32F );\n\n    /** @brief Computes a predicted state.\n\n    @param control The optional input control\n     */\n    CV_WRAP const Mat& predict( const Mat& control = Mat() );\n\n    /** @brief Updates the predicted state from the measurement.\n\n    @param measurement The measured system parameters\n     */\n    CV_WRAP const Mat& correct( const Mat& measurement );\n\n    CV_PROP_RW Mat statePre;           //!< predicted state (x'(k)): x(k)=A*x(k-1)+B*u(k)\n    CV_PROP_RW Mat statePost;          //!< corrected state (x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k))\n    CV_PROP_RW Mat transitionMatrix;   //!< state transition matrix (A)\n    CV_PROP_RW Mat controlMatrix;      //!< control matrix (B) (not used if there is no control)\n    CV_PROP_RW Mat measurementMatrix;  //!< measurement matrix (H)\n    CV_PROP_RW Mat processNoiseCov;    //!< process noise covariance matrix (Q)\n    CV_PROP_RW Mat measurementNoiseCov;//!< measurement noise covariance matrix (R)\n    CV_PROP_RW Mat errorCovPre;        //!< priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)*At + Q)*/\n    CV_PROP_RW Mat gain;               //!< Kalman gain matrix (K(k)): K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R)\n    CV_PROP_RW Mat errorCovPost;       //!< posteriori error estimate covariance matrix (P(k)): P(k)=(I-K(k)*H)*P'(k)\n\n    // temporary matrices\n    Mat temp1;\n    Mat temp2;\n    Mat temp3;\n    Mat temp4;\n    Mat temp5;\n};\n\n\nclass CV_EXPORTS_W DenseOpticalFlow : public Algorithm\n{\npublic:\n    /** @brief Calculates an optical flow.\n\n    @param I0 first 8-bit single-channel input image.\n    @param I1 second input image of the same size and the same type as prev.\n    @param flow computed flow image that has the same size as prev and type CV_32FC2.\n     */\n    CV_WRAP virtual void calc( InputArray I0, InputArray I1, InputOutputArray flow ) = 0;\n    /** @brief Releases all inner buffers.\n    */\n    CV_WRAP virtual void collectGarbage() = 0;\n};\n\n/** @brief \"Dual TV L1\" Optical Flow Algorithm.\n\nThe class implements the \"Dual TV L1\" optical flow algorithm described in @cite Zach2007 and\n@cite Javier2012 .\nHere are important members of the class that control the algorithm, which you can set after\nconstructing the class instance:\n\n-   member double tau\n    Time step of the numerical scheme.\n\n-   member double lambda\n    Weight parameter for the data term, attachment parameter. This is the most relevant\n    parameter, which determines the smoothness of the output. The smaller this parameter is,\n    the smoother the solutions we obtain. It depends on the range of motions of the images, so\n    its value should be adapted to each image sequence.\n\n-   member double theta\n    Weight parameter for (u - v)\\^2, tightness parameter. It serves as a link between the\n    attachment and the regularization terms. In theory, it should have a small value in order\n    to maintain both parts in correspondence. The method is stable for a large range of values\n    of this parameter.\n\n-   member int nscales\n    Number of scales used to create the pyramid of images.\n\n-   member int warps\n    Number of warpings per scale. Represents the number of times that I1(x+u0) and grad(\n    I1(x+u0) ) are computed per scale. This is a parameter that assures the stability of the\n    method. It also affects the running time, so it is a compromise between speed and\n    accuracy.\n\n-   member double epsilon\n    Stopping criterion threshold used in the numerical scheme, which is a trade-off between\n    precision and running time. A small value will yield more accurate solutions at the\n    expense of a slower convergence.\n\n-   member int iterations\n    Stopping criterion iterations number used in the numerical scheme.\n\nC. Zach, T. Pock and H. Bischof, \"A Duality Based Approach for Realtime TV-L1 Optical Flow\".\nJavier Sanchez, Enric Meinhardt-Llopis and Gabriele Facciolo. \"TV-L1 Optical Flow Estimation\".\n*/\nclass CV_EXPORTS_W DualTVL1OpticalFlow : public DenseOpticalFlow\n{\npublic:\n    //! @brief Time step of the numerical scheme\n    /** @see setTau */\n    virtual double getTau() const = 0;\n    /** @copybrief getTau @see getTau */\n    virtual void setTau(double val) = 0;\n    //! @brief Weight parameter for the data term, attachment parameter\n    /** @see setLambda */\n    virtual double getLambda() const = 0;\n    /** @copybrief getLambda @see getLambda */\n    virtual void setLambda(double val) = 0;\n    //! @brief Weight parameter for (u - v)^2, tightness parameter\n    /** @see setTheta */\n    virtual double getTheta() const = 0;\n    /** @copybrief getTheta @see getTheta */\n    virtual void setTheta(double val) = 0;\n    //! @brief coefficient for additional illumination variation term\n    /** @see setGamma */\n    virtual double getGamma() const = 0;\n    /** @copybrief getGamma @see getGamma */\n    virtual void setGamma(double val) = 0;\n    //! @brief Number of scales used to create the pyramid of images\n    /** @see setScalesNumber */\n    virtual int getScalesNumber() const = 0;\n    /** @copybrief getScalesNumber @see getScalesNumber */\n    virtual void setScalesNumber(int val) = 0;\n    //! @brief Number of warpings per scale\n    /** @see setWarpingsNumber */\n    virtual int getWarpingsNumber() const = 0;\n    /** @copybrief getWarpingsNumber @see getWarpingsNumber */\n    virtual void setWarpingsNumber(int val) = 0;\n    //! @brief Stopping criterion threshold used in the numerical scheme, which is a trade-off between precision and running time\n    /** @see setEpsilon */\n    virtual double getEpsilon() const = 0;\n    /** @copybrief getEpsilon @see getEpsilon */\n    virtual void setEpsilon(double val) = 0;\n    //! @brief Inner iterations (between outlier filtering) used in the numerical scheme\n    /** @see setInnerIterations */\n    virtual int getInnerIterations() const = 0;\n    /** @copybrief getInnerIterations @see getInnerIterations */\n    virtual void setInnerIterations(int val) = 0;\n    //! @brief Outer iterations (number of inner loops) used in the numerical scheme\n    /** @see setOuterIterations */\n    virtual int getOuterIterations() const = 0;\n    /** @copybrief getOuterIterations @see getOuterIterations */\n    virtual void setOuterIterations(int val) = 0;\n    //! @brief Use initial flow\n    /** @see setUseInitialFlow */\n    virtual bool getUseInitialFlow() const = 0;\n    /** @copybrief getUseInitialFlow @see getUseInitialFlow */\n    virtual void setUseInitialFlow(bool val) = 0;\n    //! @brief Step between scales (<1)\n    /** @see setScaleStep */\n    virtual double getScaleStep() const = 0;\n    /** @copybrief getScaleStep @see getScaleStep */\n    virtual void setScaleStep(double val) = 0;\n    //! @brief Median filter kernel size (1 = no filter) (3 or 5)\n    /** @see setMedianFiltering */\n    virtual int getMedianFiltering() const = 0;\n    /** @copybrief getMedianFiltering @see getMedianFiltering */\n    virtual void setMedianFiltering(int val) = 0;\n};\n\n/** @brief Creates instance of cv::DenseOpticalFlow\n*/\nCV_EXPORTS_W Ptr<DualTVL1OpticalFlow> createOptFlow_DualTVL1();\n\n//! @} video_track\n\n} // cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/video/tracking_c.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_TRACKING_C_H__\n#define __OPENCV_TRACKING_C_H__\n\n#include \"opencv2/imgproc/types_c.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup video_c\n  @{\n*/\n\n/****************************************************************************************\\\n*                                  Motion Analysis                                       *\n\\****************************************************************************************/\n\n/************************************ optical flow ***************************************/\n\n#define CV_LKFLOW_PYR_A_READY       1\n#define CV_LKFLOW_PYR_B_READY       2\n#define CV_LKFLOW_INITIAL_GUESSES   4\n#define CV_LKFLOW_GET_MIN_EIGENVALS 8\n\n/* It is Lucas & Kanade method, modified to use pyramids.\n   Also it does several iterations to get optical flow for\n   every point at every pyramid level.\n   Calculates optical flow between two images for certain set of points (i.e.\n   it is a \"sparse\" optical flow, which is opposite to the previous 3 methods) */\nCVAPI(void)  cvCalcOpticalFlowPyrLK( const CvArr*  prev, const CvArr*  curr,\n                                     CvArr*  prev_pyr, CvArr*  curr_pyr,\n                                     const CvPoint2D32f* prev_features,\n                                     CvPoint2D32f* curr_features,\n                                     int       count,\n                                     CvSize    win_size,\n                                     int       level,\n                                     char*     status,\n                                     float*    track_error,\n                                     CvTermCriteria criteria,\n                                     int       flags );\n\n\n/* Modification of a previous sparse optical flow algorithm to calculate\n   affine flow */\nCVAPI(void)  cvCalcAffineFlowPyrLK( const CvArr*  prev, const CvArr*  curr,\n                                    CvArr*  prev_pyr, CvArr*  curr_pyr,\n                                    const CvPoint2D32f* prev_features,\n                                    CvPoint2D32f* curr_features,\n                                    float* matrices, int  count,\n                                    CvSize win_size, int  level,\n                                    char* status, float* track_error,\n                                    CvTermCriteria criteria, int flags );\n\n/* Estimate rigid transformation between 2 images or 2 point sets */\nCVAPI(int)  cvEstimateRigidTransform( const CvArr* A, const CvArr* B,\n                                      CvMat* M, int full_affine );\n\n/* Estimate optical flow for each pixel using the two-frame G. Farneback algorithm */\nCVAPI(void) cvCalcOpticalFlowFarneback( const CvArr* prev, const CvArr* next,\n                                        CvArr* flow, double pyr_scale, int levels,\n                                        int winsize, int iterations, int poly_n,\n                                        double poly_sigma, int flags );\n\n/********************************* motion templates *************************************/\n\n/****************************************************************************************\\\n*        All the motion template functions work only with single channel images.         *\n*        Silhouette image must have depth IPL_DEPTH_8U or IPL_DEPTH_8S                   *\n*        Motion history image must have depth IPL_DEPTH_32F,                             *\n*        Gradient mask - IPL_DEPTH_8U or IPL_DEPTH_8S,                                   *\n*        Motion orientation image - IPL_DEPTH_32F                                        *\n*        Segmentation mask - IPL_DEPTH_32F                                               *\n*        All the angles are in degrees, all the times are in milliseconds                *\n\\****************************************************************************************/\n\n/* Updates motion history image given motion silhouette */\nCVAPI(void)    cvUpdateMotionHistory( const CvArr* silhouette, CvArr* mhi,\n                                      double timestamp, double duration );\n\n/* Calculates gradient of the motion history image and fills\n   a mask indicating where the gradient is valid */\nCVAPI(void)    cvCalcMotionGradient( const CvArr* mhi, CvArr* mask, CvArr* orientation,\n                                     double delta1, double delta2,\n                                     int aperture_size CV_DEFAULT(3));\n\n/* Calculates average motion direction within a selected motion region\n   (region can be selected by setting ROIs and/or by composing a valid gradient mask\n   with the region mask) */\nCVAPI(double)  cvCalcGlobalOrientation( const CvArr* orientation, const CvArr* mask,\n                                        const CvArr* mhi, double timestamp,\n                                        double duration );\n\n/* Splits a motion history image into a few parts corresponding to separate independent motions\n   (e.g. left hand, right hand) */\nCVAPI(CvSeq*)  cvSegmentMotion( const CvArr* mhi, CvArr* seg_mask,\n                                CvMemStorage* storage,\n                                double timestamp, double seg_thresh );\n\n/****************************************************************************************\\\n*                                       Tracking                                         *\n\\****************************************************************************************/\n\n/* Implements CAMSHIFT algorithm - determines object position, size and orientation\n   from the object histogram back project (extension of meanshift) */\nCVAPI(int)  cvCamShift( const CvArr* prob_image, CvRect  window,\n                        CvTermCriteria criteria, CvConnectedComp* comp,\n                        CvBox2D* box CV_DEFAULT(NULL) );\n\n/* Implements MeanShift algorithm - determines object position\n   from the object histogram back project */\nCVAPI(int)  cvMeanShift( const CvArr* prob_image, CvRect  window,\n                         CvTermCriteria criteria, CvConnectedComp* comp );\n\n/*\nstandard Kalman filter (in G. Welch' and G. Bishop's notation):\n\n  x(k)=A*x(k-1)+B*u(k)+w(k)  p(w)~N(0,Q)\n  z(k)=H*x(k)+v(k),   p(v)~N(0,R)\n*/\ntypedef struct CvKalman\n{\n    int MP;                     /* number of measurement vector dimensions */\n    int DP;                     /* number of state vector dimensions */\n    int CP;                     /* number of control vector dimensions */\n\n    /* backward compatibility fields */\n#if 1\n    float* PosterState;         /* =state_pre->data.fl */\n    float* PriorState;          /* =state_post->data.fl */\n    float* DynamMatr;           /* =transition_matrix->data.fl */\n    float* MeasurementMatr;     /* =measurement_matrix->data.fl */\n    float* MNCovariance;        /* =measurement_noise_cov->data.fl */\n    float* PNCovariance;        /* =process_noise_cov->data.fl */\n    float* KalmGainMatr;        /* =gain->data.fl */\n    float* PriorErrorCovariance;/* =error_cov_pre->data.fl */\n    float* PosterErrorCovariance;/* =error_cov_post->data.fl */\n    float* Temp1;               /* temp1->data.fl */\n    float* Temp2;               /* temp2->data.fl */\n#endif\n\n    CvMat* state_pre;           /* predicted state (x'(k)):\n                                    x(k)=A*x(k-1)+B*u(k) */\n    CvMat* state_post;          /* corrected state (x(k)):\n                                    x(k)=x'(k)+K(k)*(z(k)-H*x'(k)) */\n    CvMat* transition_matrix;   /* state transition matrix (A) */\n    CvMat* control_matrix;      /* control matrix (B)\n                                   (it is not used if there is no control)*/\n    CvMat* measurement_matrix;  /* measurement matrix (H) */\n    CvMat* process_noise_cov;   /* process noise covariance matrix (Q) */\n    CvMat* measurement_noise_cov; /* measurement noise covariance matrix (R) */\n    CvMat* error_cov_pre;       /* priori error estimate covariance matrix (P'(k)):\n                                    P'(k)=A*P(k-1)*At + Q)*/\n    CvMat* gain;                /* Kalman gain matrix (K(k)):\n                                    K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R)*/\n    CvMat* error_cov_post;      /* posteriori error estimate covariance matrix (P(k)):\n                                    P(k)=(I-K(k)*H)*P'(k) */\n    CvMat* temp1;               /* temporary matrices */\n    CvMat* temp2;\n    CvMat* temp3;\n    CvMat* temp4;\n    CvMat* temp5;\n} CvKalman;\n\n/* Creates Kalman filter and sets A, B, Q, R and state to some initial values */\nCVAPI(CvKalman*) cvCreateKalman( int dynam_params, int measure_params,\n                                 int control_params CV_DEFAULT(0));\n\n/* Releases Kalman filter state */\nCVAPI(void)  cvReleaseKalman( CvKalman** kalman);\n\n/* Updates Kalman filter by time (predicts future state of the system) */\nCVAPI(const CvMat*)  cvKalmanPredict( CvKalman* kalman,\n                                      const CvMat* control CV_DEFAULT(NULL));\n\n/* Updates Kalman filter by measurement\n   (corrects state of the system and internal matrices) */\nCVAPI(const CvMat*)  cvKalmanCorrect( CvKalman* kalman, const CvMat* measurement );\n\n#define cvKalmanUpdateByTime  cvKalmanPredict\n#define cvKalmanUpdateByMeasurement cvKalmanCorrect\n\n/** @} video_c */\n\n#ifdef __cplusplus\n} // extern \"C\"\n#endif\n\n\n#endif // __OPENCV_TRACKING_C_H__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/video/video.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/video.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/video.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEO_HPP__\n#define __OPENCV_VIDEO_HPP__\n\n/**\n  @defgroup video Video Analysis\n  @{\n    @defgroup video_motion Motion Analysis\n    @defgroup video_track Object Tracking\n    @defgroup video_c C API\n  @}\n*/\n\n#include \"opencv2/video/tracking.hpp\"\n#include \"opencv2/video/background_segm.hpp\"\n\n#ifndef DISABLE_OPENCV_24_COMPATIBILITY\n#include \"opencv2/video/tracking_c.h\"\n#endif\n\n#endif //__OPENCV_VIDEO_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videoio/cap_ios.h",
    "content": "/*  For iOS video I/O\n *  by Eduard Feicho on 29/07/12\n *  Copyright 2012. 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,\n *    this list of conditions and the following disclaimer.\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 * 3. The name of the author may not be used to endorse or promote products\n *    derived from this software 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#import <UIKit/UIKit.h>\n#import <Accelerate/Accelerate.h>\n#import <AVFoundation/AVFoundation.h>\n#import <ImageIO/ImageIO.h>\n#include \"opencv2/core.hpp\"\n\n//! @addtogroup videoio_ios\n//! @{\n\n/////////////////////////////////////// CvAbstractCamera /////////////////////////////////////\n\n@class CvAbstractCamera;\n\n@interface CvAbstractCamera : NSObject\n{\n    AVCaptureSession* captureSession;\n    AVCaptureConnection* videoCaptureConnection;\n    AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n    UIDeviceOrientation currentDeviceOrientation;\n\n    BOOL cameraAvailable;\n    BOOL captureSessionLoaded;\n    BOOL running;\n    BOOL useAVCaptureVideoPreviewLayer;\n\n    AVCaptureDevicePosition defaultAVCaptureDevicePosition;\n    AVCaptureVideoOrientation defaultAVCaptureVideoOrientation;\n    NSString *const defaultAVCaptureSessionPreset;\n\n    int defaultFPS;\n\n    UIView* parentView;\n\n    int imageWidth;\n    int imageHeight;\n}\n\n@property (nonatomic, retain) AVCaptureSession* captureSession;\n@property (nonatomic, retain) AVCaptureConnection* videoCaptureConnection;\n\n@property (nonatomic, readonly) BOOL running;\n@property (nonatomic, readonly) BOOL captureSessionLoaded;\n\n@property (nonatomic, assign) int defaultFPS;\n@property (nonatomic, assign) AVCaptureDevicePosition defaultAVCaptureDevicePosition;\n@property (nonatomic, assign) AVCaptureVideoOrientation defaultAVCaptureVideoOrientation;\n@property (nonatomic, assign) BOOL useAVCaptureVideoPreviewLayer;\n@property (nonatomic, strong) NSString *const defaultAVCaptureSessionPreset;\n\n@property (nonatomic, assign) int imageWidth;\n@property (nonatomic, assign) int imageHeight;\n\n@property (nonatomic, retain) UIView* parentView;\n\n- (void)start;\n- (void)stop;\n- (void)switchCameras;\n\n- (id)initWithParentView:(UIView*)parent;\n\n- (void)createCaptureOutput;\n- (void)createVideoPreviewLayer;\n- (void)updateOrientation;\n\n- (void)lockFocus;\n- (void)unlockFocus;\n- (void)lockExposure;\n- (void)unlockExposure;\n- (void)lockBalance;\n- (void)unlockBalance;\n\n@end\n\n///////////////////////////////// CvVideoCamera ///////////////////////////////////////////\n\n@class CvVideoCamera;\n\n@protocol CvVideoCameraDelegate <NSObject>\n\n#ifdef __cplusplus\n// delegate method for processing image frames\n- (void)processImage:(cv::Mat&)image;\n#endif\n\n@end\n\n@interface CvVideoCamera : CvAbstractCamera<AVCaptureVideoDataOutputSampleBufferDelegate>\n{\n    AVCaptureVideoDataOutput *videoDataOutput;\n\n    dispatch_queue_t videoDataOutputQueue;\n    CALayer *customPreviewLayer;\n\n    BOOL grayscaleMode;\n\n    BOOL recordVideo;\n    BOOL rotateVideo;\n    AVAssetWriterInput* recordAssetWriterInput;\n    AVAssetWriterInputPixelBufferAdaptor* recordPixelBufferAdaptor;\n    AVAssetWriter* recordAssetWriter;\n\n    CMTime lastSampleTime;\n\n}\n\n@property (nonatomic, assign) id<CvVideoCameraDelegate> delegate;\n@property (nonatomic, assign) BOOL grayscaleMode;\n\n@property (nonatomic, assign) BOOL recordVideo;\n@property (nonatomic, assign) BOOL rotateVideo;\n@property (nonatomic, retain) AVAssetWriterInput* recordAssetWriterInput;\n@property (nonatomic, retain) AVAssetWriterInputPixelBufferAdaptor* recordPixelBufferAdaptor;\n@property (nonatomic, retain) AVAssetWriter* recordAssetWriter;\n\n- (void)adjustLayoutToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;\n- (void)layoutPreviewLayer;\n- (void)saveVideo;\n- (NSURL *)videoFileURL;\n\n\n@end\n\n///////////////////////////////// CvPhotoCamera ///////////////////////////////////////////\n\n@class CvPhotoCamera;\n\n@protocol CvPhotoCameraDelegate <NSObject>\n\n- (void)photoCamera:(CvPhotoCamera*)photoCamera capturedImage:(UIImage *)image;\n- (void)photoCameraCancel:(CvPhotoCamera*)photoCamera;\n\n@end\n\n@interface CvPhotoCamera : CvAbstractCamera\n{\n    AVCaptureStillImageOutput *stillImageOutput;\n}\n\n@property (nonatomic, assign) id<CvPhotoCameraDelegate> delegate;\n\n- (void)takePicture;\n\n@end\n\n//! @} videoio_ios\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videoio/videoio.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifdef __OPENCV_BUILD\n#error this is a compatibility header which should not be used inside the OpenCV library\n#endif\n\n#include \"opencv2/videoio.hpp\"\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videoio/videoio_c.h",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                        Intel License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000, Intel Corporation, all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of Intel Corporation may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOIO_H__\n#define __OPENCV_VIDEOIO_H__\n\n#include \"opencv2/core/core_c.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n  @addtogroup videoio_c\n  @{\n*/\n\n/****************************************************************************************\\\n*                         Working with Video Files and Cameras                           *\n\\****************************************************************************************/\n\n/* \"black box\" capture structure */\ntypedef struct CvCapture CvCapture;\n\n/* start capturing frames from video file */\nCVAPI(CvCapture*) cvCreateFileCapture( const char* filename );\n\nenum\n{\n    CV_CAP_ANY      =0,     // autodetect\n\n    CV_CAP_MIL      =100,   // MIL proprietary drivers\n\n    CV_CAP_VFW      =200,   // platform native\n    CV_CAP_V4L      =200,\n    CV_CAP_V4L2     =200,\n\n    CV_CAP_FIREWARE =300,   // IEEE 1394 drivers\n    CV_CAP_FIREWIRE =300,\n    CV_CAP_IEEE1394 =300,\n    CV_CAP_DC1394   =300,\n    CV_CAP_CMU1394  =300,\n\n    CV_CAP_STEREO   =400,   // TYZX proprietary drivers\n    CV_CAP_TYZX     =400,\n    CV_TYZX_LEFT    =400,\n    CV_TYZX_RIGHT   =401,\n    CV_TYZX_COLOR   =402,\n    CV_TYZX_Z       =403,\n\n    CV_CAP_QT       =500,   // QuickTime\n\n    CV_CAP_UNICAP   =600,   // Unicap drivers\n\n    CV_CAP_DSHOW    =700,   // DirectShow (via videoInput)\n    CV_CAP_MSMF     =1400,  // Microsoft Media Foundation (via videoInput)\n\n    CV_CAP_PVAPI    =800,   // PvAPI, Prosilica GigE SDK\n\n    CV_CAP_OPENNI   =900,   // OpenNI (for Kinect)\n    CV_CAP_OPENNI_ASUS =910,   // OpenNI (for Asus Xtion)\n\n    CV_CAP_ANDROID  =1000,  // Android - not used\n    CV_CAP_ANDROID_BACK =CV_CAP_ANDROID+99, // Android back camera - not used\n    CV_CAP_ANDROID_FRONT =CV_CAP_ANDROID+98, // Android front camera - not used\n\n    CV_CAP_XIAPI    =1100,   // XIMEA Camera API\n\n    CV_CAP_AVFOUNDATION = 1200,  // AVFoundation framework for iOS (OS X Lion will have the same API)\n\n    CV_CAP_GIGANETIX = 1300,  // Smartek Giganetix GigEVisionSDK\n\n    CV_CAP_INTELPERC = 1500, // Intel Perceptual Computing\n\n    CV_CAP_OPENNI2 = 1600,   // OpenNI2 (for Kinect)\n\n    CV_CAP_GPHOTO2 = 1700\n};\n\n/* start capturing frames from camera: index = camera_index + domain_offset (CV_CAP_*) */\nCVAPI(CvCapture*) cvCreateCameraCapture( int index );\n\n/* grab a frame, return 1 on success, 0 on fail.\n  this function is thought to be fast               */\nCVAPI(int) cvGrabFrame( CvCapture* capture );\n\n/* get the frame grabbed with cvGrabFrame(..)\n  This function may apply some frame processing like\n  frame decompression, flipping etc.\n  !!!DO NOT RELEASE or MODIFY the retrieved frame!!! */\nCVAPI(IplImage*) cvRetrieveFrame( CvCapture* capture, int streamIdx CV_DEFAULT(0) );\n\n/* Just a combination of cvGrabFrame and cvRetrieveFrame\n   !!!DO NOT RELEASE or MODIFY the retrieved frame!!!      */\nCVAPI(IplImage*) cvQueryFrame( CvCapture* capture );\n\n/* stop capturing/reading and free resources */\nCVAPI(void) cvReleaseCapture( CvCapture** capture );\n\nenum\n{\n    // modes of the controlling registers (can be: auto, manual, auto single push, absolute Latter allowed with any other mode)\n    // every feature can have only one mode turned on at a time\n    CV_CAP_PROP_DC1394_OFF         = -4,  //turn the feature off (not controlled manually nor automatically)\n    CV_CAP_PROP_DC1394_MODE_MANUAL = -3, //set automatically when a value of the feature is set by the user\n    CV_CAP_PROP_DC1394_MODE_AUTO = -2,\n    CV_CAP_PROP_DC1394_MODE_ONE_PUSH_AUTO = -1,\n    CV_CAP_PROP_POS_MSEC       =0,\n    CV_CAP_PROP_POS_FRAMES     =1,\n    CV_CAP_PROP_POS_AVI_RATIO  =2,\n    CV_CAP_PROP_FRAME_WIDTH    =3,\n    CV_CAP_PROP_FRAME_HEIGHT   =4,\n    CV_CAP_PROP_FPS            =5,\n    CV_CAP_PROP_FOURCC         =6,\n    CV_CAP_PROP_FRAME_COUNT    =7,\n    CV_CAP_PROP_FORMAT         =8,\n    CV_CAP_PROP_MODE           =9,\n    CV_CAP_PROP_BRIGHTNESS    =10,\n    CV_CAP_PROP_CONTRAST      =11,\n    CV_CAP_PROP_SATURATION    =12,\n    CV_CAP_PROP_HUE           =13,\n    CV_CAP_PROP_GAIN          =14,\n    CV_CAP_PROP_EXPOSURE      =15,\n    CV_CAP_PROP_CONVERT_RGB   =16,\n    CV_CAP_PROP_WHITE_BALANCE_BLUE_U =17,\n    CV_CAP_PROP_RECTIFICATION =18,\n    CV_CAP_PROP_MONOCHROME    =19,\n    CV_CAP_PROP_SHARPNESS     =20,\n    CV_CAP_PROP_AUTO_EXPOSURE =21, // exposure control done by camera,\n                                   // user can adjust refernce level\n                                   // using this feature\n    CV_CAP_PROP_GAMMA         =22,\n    CV_CAP_PROP_TEMPERATURE   =23,\n    CV_CAP_PROP_TRIGGER       =24,\n    CV_CAP_PROP_TRIGGER_DELAY =25,\n    CV_CAP_PROP_WHITE_BALANCE_RED_V =26,\n    CV_CAP_PROP_ZOOM          =27,\n    CV_CAP_PROP_FOCUS         =28,\n    CV_CAP_PROP_GUID          =29,\n    CV_CAP_PROP_ISO_SPEED     =30,\n    CV_CAP_PROP_MAX_DC1394    =31,\n    CV_CAP_PROP_BACKLIGHT     =32,\n    CV_CAP_PROP_PAN           =33,\n    CV_CAP_PROP_TILT          =34,\n    CV_CAP_PROP_ROLL          =35,\n    CV_CAP_PROP_IRIS          =36,\n    CV_CAP_PROP_SETTINGS      =37,\n    CV_CAP_PROP_BUFFERSIZE    =38,\n\n    CV_CAP_PROP_AUTOGRAB      =1024, // property for videoio class CvCapture_Android only\n    CV_CAP_PROP_SUPPORTED_PREVIEW_SIZES_STRING=1025, // readonly, tricky property, returns cpnst char* indeed\n    CV_CAP_PROP_PREVIEW_FORMAT=1026, // readonly, tricky property, returns cpnst char* indeed\n\n    // OpenNI map generators\n    CV_CAP_OPENNI_DEPTH_GENERATOR = 1 << 31,\n    CV_CAP_OPENNI_IMAGE_GENERATOR = 1 << 30,\n    CV_CAP_OPENNI_GENERATORS_MASK = CV_CAP_OPENNI_DEPTH_GENERATOR + CV_CAP_OPENNI_IMAGE_GENERATOR,\n\n    // Properties of cameras available through OpenNI interfaces\n    CV_CAP_PROP_OPENNI_OUTPUT_MODE     = 100,\n    CV_CAP_PROP_OPENNI_FRAME_MAX_DEPTH = 101, // in mm\n    CV_CAP_PROP_OPENNI_BASELINE        = 102, // in mm\n    CV_CAP_PROP_OPENNI_FOCAL_LENGTH    = 103, // in pixels\n    CV_CAP_PROP_OPENNI_REGISTRATION    = 104, // flag\n    CV_CAP_PROP_OPENNI_REGISTRATION_ON = CV_CAP_PROP_OPENNI_REGISTRATION, // flag that synchronizes the remapping depth map to image map\n                                                                          // by changing depth generator's view point (if the flag is \"on\") or\n                                                                          // sets this view point to its normal one (if the flag is \"off\").\n    CV_CAP_PROP_OPENNI_APPROX_FRAME_SYNC = 105,\n    CV_CAP_PROP_OPENNI_MAX_BUFFER_SIZE   = 106,\n    CV_CAP_PROP_OPENNI_CIRCLE_BUFFER     = 107,\n    CV_CAP_PROP_OPENNI_MAX_TIME_DURATION = 108,\n\n    CV_CAP_PROP_OPENNI_GENERATOR_PRESENT = 109,\n    CV_CAP_PROP_OPENNI2_SYNC = 110,\n    CV_CAP_PROP_OPENNI2_MIRROR = 111,\n\n    CV_CAP_OPENNI_IMAGE_GENERATOR_PRESENT         = CV_CAP_OPENNI_IMAGE_GENERATOR + CV_CAP_PROP_OPENNI_GENERATOR_PRESENT,\n    CV_CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE     = CV_CAP_OPENNI_IMAGE_GENERATOR + CV_CAP_PROP_OPENNI_OUTPUT_MODE,\n    CV_CAP_OPENNI_DEPTH_GENERATOR_BASELINE        = CV_CAP_OPENNI_DEPTH_GENERATOR + CV_CAP_PROP_OPENNI_BASELINE,\n    CV_CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH    = CV_CAP_OPENNI_DEPTH_GENERATOR + CV_CAP_PROP_OPENNI_FOCAL_LENGTH,\n    CV_CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION    = CV_CAP_OPENNI_DEPTH_GENERATOR + CV_CAP_PROP_OPENNI_REGISTRATION,\n    CV_CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON = CV_CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION,\n\n    // Properties of cameras available through GStreamer interface\n    CV_CAP_GSTREAMER_QUEUE_LENGTH           = 200, // default is 1\n\n    // PVAPI\n    CV_CAP_PROP_PVAPI_MULTICASTIP           = 300, // ip for anable multicast master mode. 0 for disable multicast\n    CV_CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE = 301, // FrameStartTriggerMode: Determines how a frame is initiated\n    CV_CAP_PROP_PVAPI_DECIMATIONHORIZONTAL  = 302, // Horizontal sub-sampling of the image\n    CV_CAP_PROP_PVAPI_DECIMATIONVERTICAL    = 303, // Vertical sub-sampling of the image\n    CV_CAP_PROP_PVAPI_BINNINGX              = 304, // Horizontal binning factor\n    CV_CAP_PROP_PVAPI_BINNINGY              = 305, // Vertical binning factor\n    CV_CAP_PROP_PVAPI_PIXELFORMAT           = 306, // Pixel format\n\n    // Properties of cameras available through XIMEA SDK interface\n    CV_CAP_PROP_XI_DOWNSAMPLING  = 400,      // Change image resolution by binning or skipping.\n    CV_CAP_PROP_XI_DATA_FORMAT   = 401,       // Output data format.\n    CV_CAP_PROP_XI_OFFSET_X      = 402,      // Horizontal offset from the origin to the area of interest (in pixels).\n    CV_CAP_PROP_XI_OFFSET_Y      = 403,      // Vertical offset from the origin to the area of interest (in pixels).\n    CV_CAP_PROP_XI_TRG_SOURCE    = 404,      // Defines source of trigger.\n    CV_CAP_PROP_XI_TRG_SOFTWARE  = 405,      // Generates an internal trigger. PRM_TRG_SOURCE must be set to TRG_SOFTWARE.\n    CV_CAP_PROP_XI_GPI_SELECTOR  = 406,      // Selects general purpose input\n    CV_CAP_PROP_XI_GPI_MODE      = 407,      // Set general purpose input mode\n    CV_CAP_PROP_XI_GPI_LEVEL     = 408,      // Get general purpose level\n    CV_CAP_PROP_XI_GPO_SELECTOR  = 409,      // Selects general purpose output\n    CV_CAP_PROP_XI_GPO_MODE      = 410,      // Set general purpose output mode\n    CV_CAP_PROP_XI_LED_SELECTOR  = 411,      // Selects camera signalling LED\n    CV_CAP_PROP_XI_LED_MODE      = 412,      // Define camera signalling LED functionality\n    CV_CAP_PROP_XI_MANUAL_WB     = 413,      // Calculates White Balance(must be called during acquisition)\n    CV_CAP_PROP_XI_AUTO_WB       = 414,      // Automatic white balance\n    CV_CAP_PROP_XI_AEAG          = 415,      // Automatic exposure/gain\n    CV_CAP_PROP_XI_EXP_PRIORITY  = 416,      // Exposure priority (0.5 - exposure 50%, gain 50%).\n    CV_CAP_PROP_XI_AE_MAX_LIMIT  = 417,      // Maximum limit of exposure in AEAG procedure\n    CV_CAP_PROP_XI_AG_MAX_LIMIT  = 418,      // Maximum limit of gain in AEAG procedure\n    CV_CAP_PROP_XI_AEAG_LEVEL    = 419,       // Average intensity of output signal AEAG should achieve(in %)\n    CV_CAP_PROP_XI_TIMEOUT       = 420,       // Image capture timeout in milliseconds\n\n    // Properties for Android cameras\n    CV_CAP_PROP_ANDROID_FLASH_MODE = 8001,\n    CV_CAP_PROP_ANDROID_FOCUS_MODE = 8002,\n    CV_CAP_PROP_ANDROID_WHITE_BALANCE = 8003,\n    CV_CAP_PROP_ANDROID_ANTIBANDING = 8004,\n    CV_CAP_PROP_ANDROID_FOCAL_LENGTH = 8005,\n    CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_NEAR = 8006,\n    CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_OPTIMAL = 8007,\n    CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_FAR = 8008,\n    CV_CAP_PROP_ANDROID_EXPOSE_LOCK = 8009,\n    CV_CAP_PROP_ANDROID_WHITEBALANCE_LOCK = 8010,\n\n    // Properties of cameras available through AVFOUNDATION interface\n    CV_CAP_PROP_IOS_DEVICE_FOCUS = 9001,\n    CV_CAP_PROP_IOS_DEVICE_EXPOSURE = 9002,\n    CV_CAP_PROP_IOS_DEVICE_FLASH = 9003,\n    CV_CAP_PROP_IOS_DEVICE_WHITEBALANCE = 9004,\n    CV_CAP_PROP_IOS_DEVICE_TORCH = 9005,\n\n    // Properties of cameras available through Smartek Giganetix Ethernet Vision interface\n    /* --- Vladimir Litvinenko (litvinenko.vladimir@gmail.com) --- */\n    CV_CAP_PROP_GIGA_FRAME_OFFSET_X = 10001,\n    CV_CAP_PROP_GIGA_FRAME_OFFSET_Y = 10002,\n    CV_CAP_PROP_GIGA_FRAME_WIDTH_MAX = 10003,\n    CV_CAP_PROP_GIGA_FRAME_HEIGH_MAX = 10004,\n    CV_CAP_PROP_GIGA_FRAME_SENS_WIDTH = 10005,\n    CV_CAP_PROP_GIGA_FRAME_SENS_HEIGH = 10006,\n\n    CV_CAP_PROP_INTELPERC_PROFILE_COUNT               = 11001,\n    CV_CAP_PROP_INTELPERC_PROFILE_IDX                 = 11002,\n    CV_CAP_PROP_INTELPERC_DEPTH_LOW_CONFIDENCE_VALUE  = 11003,\n    CV_CAP_PROP_INTELPERC_DEPTH_SATURATION_VALUE      = 11004,\n    CV_CAP_PROP_INTELPERC_DEPTH_CONFIDENCE_THRESHOLD  = 11005,\n    CV_CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_HORZ     = 11006,\n    CV_CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_VERT     = 11007,\n\n    // Intel PerC streams\n    CV_CAP_INTELPERC_DEPTH_GENERATOR = 1 << 29,\n    CV_CAP_INTELPERC_IMAGE_GENERATOR = 1 << 28,\n    CV_CAP_INTELPERC_GENERATORS_MASK = CV_CAP_INTELPERC_DEPTH_GENERATOR + CV_CAP_INTELPERC_IMAGE_GENERATOR\n};\n\n// Generic camera output modes.\n// Currently, these are supported through the libv4l interface only.\nenum\n{\n    CV_CAP_MODE_BGR  = 0, // BGR24 (default)\n    CV_CAP_MODE_RGB  = 1, // RGB24\n    CV_CAP_MODE_GRAY = 2, // Y8\n    CV_CAP_MODE_YUYV = 3  // YUYV\n};\n\nenum\n{\n    // Data given from depth generator.\n    CV_CAP_OPENNI_DEPTH_MAP                 = 0, // Depth values in mm (CV_16UC1)\n    CV_CAP_OPENNI_POINT_CLOUD_MAP           = 1, // XYZ in meters (CV_32FC3)\n    CV_CAP_OPENNI_DISPARITY_MAP             = 2, // Disparity in pixels (CV_8UC1)\n    CV_CAP_OPENNI_DISPARITY_MAP_32F         = 3, // Disparity in pixels (CV_32FC1)\n    CV_CAP_OPENNI_VALID_DEPTH_MASK          = 4, // CV_8UC1\n\n    // Data given from RGB image generator.\n    CV_CAP_OPENNI_BGR_IMAGE                 = 5,\n    CV_CAP_OPENNI_GRAY_IMAGE                = 6\n};\n\n// Supported output modes of OpenNI image generator\nenum\n{\n    CV_CAP_OPENNI_VGA_30HZ     = 0,\n    CV_CAP_OPENNI_SXGA_15HZ    = 1,\n    CV_CAP_OPENNI_SXGA_30HZ    = 2,\n    CV_CAP_OPENNI_QVGA_30HZ    = 3,\n    CV_CAP_OPENNI_QVGA_60HZ    = 4\n};\n\nenum\n{\n    CV_CAP_INTELPERC_DEPTH_MAP              = 0, // Each pixel is a 16-bit integer. The value indicates the distance from an object to the camera's XY plane or the Cartesian depth.\n    CV_CAP_INTELPERC_UVDEPTH_MAP            = 1, // Each pixel contains two 32-bit floating point values in the range of 0-1, representing the mapping of depth coordinates to the color coordinates.\n    CV_CAP_INTELPERC_IR_MAP                 = 2, // Each pixel is a 16-bit integer. The value indicates the intensity of the reflected laser beam.\n    CV_CAP_INTELPERC_IMAGE                  = 3\n};\n\n// gPhoto2 properties, if propertyId is less than 0 then work on widget with that __additive inversed__ camera setting ID\n// Get IDs by using CAP_PROP_GPHOTO2_WIDGET_ENUMERATE.\n// @see CvCaptureCAM_GPHOTO2 for more info\nenum\n{\n    CV_CAP_PROP_GPHOTO2_PREVIEW           = 17001, // Capture only preview from liveview mode.\n    CV_CAP_PROP_GPHOTO2_WIDGET_ENUMERATE  = 17002, // Readonly, returns (const char *).\n    CV_CAP_PROP_GPHOTO2_RELOAD_CONFIG     = 17003, // Trigger, only by set. Reload camera settings.\n    CV_CAP_PROP_GPHOTO2_RELOAD_ON_CHANGE  = 17004, // Reload all settings on set.\n    CV_CAP_PROP_GPHOTO2_COLLECT_MSGS      = 17005, // Collect messages with details.\n    CV_CAP_PROP_GPHOTO2_FLUSH_MSGS        = 17006, // Readonly, returns (const char *).\n    CV_CAP_PROP_SPEED                     = 17007, // Exposure speed. Can be readonly, depends on camera program.\n    CV_CAP_PROP_APERTURE                  = 17008, // Aperture. Can be readonly, depends on camera program.\n    CV_CAP_PROP_EXPOSUREPROGRAM           = 17009, // Camera exposure program.\n    CV_CAP_PROP_VIEWFINDER                = 17010  // Enter liveview mode.\n};\n\n/* retrieve or set capture properties */\nCVAPI(double) cvGetCaptureProperty( CvCapture* capture, int property_id );\nCVAPI(int)    cvSetCaptureProperty( CvCapture* capture, int property_id, double value );\n\n// Return the type of the capturer (eg, CV_CAP_V4W, CV_CAP_UNICAP), which is unknown if created with CV_CAP_ANY\nCVAPI(int)    cvGetCaptureDomain( CvCapture* capture);\n\n/* \"black box\" video file writer structure */\ntypedef struct CvVideoWriter CvVideoWriter;\n\n#define CV_FOURCC_MACRO(c1, c2, c3, c4) (((c1) & 255) + (((c2) & 255) << 8) + (((c3) & 255) << 16) + (((c4) & 255) << 24))\n\nCV_INLINE int CV_FOURCC(char c1, char c2, char c3, char c4)\n{\n    return CV_FOURCC_MACRO(c1, c2, c3, c4);\n}\n\n#define CV_FOURCC_PROMPT -1  /* Open Codec Selection Dialog (Windows only) */\n#define CV_FOURCC_DEFAULT CV_FOURCC('I', 'Y', 'U', 'V') /* Use default codec for specified filename (Linux only) */\n\n/* initialize video file writer */\nCVAPI(CvVideoWriter*) cvCreateVideoWriter( const char* filename, int fourcc,\n                                           double fps, CvSize frame_size,\n                                           int is_color CV_DEFAULT(1));\n\n/* write frame to video file */\nCVAPI(int) cvWriteFrame( CvVideoWriter* writer, const IplImage* image );\n\n/* close video file writer */\nCVAPI(void) cvReleaseVideoWriter( CvVideoWriter** writer );\n\n/****************************************************************************************\\\n*                              Obsolete functions/synonyms                               *\n\\****************************************************************************************/\n\n#define cvCaptureFromFile cvCreateFileCapture\n#define cvCaptureFromCAM cvCreateCameraCapture\n#define cvCaptureFromAVI cvCaptureFromFile\n#define cvCreateAVIWriter cvCreateVideoWriter\n#define cvWriteToAVI cvWriteFrame\n\n/** @} videoio_c */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif //__OPENCV_VIDEOIO_H__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videoio.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                          License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOIO_HPP__\n#define __OPENCV_VIDEOIO_HPP__\n\n#include \"opencv2/core.hpp\"\n\n/**\n  @defgroup videoio Media I/O\n  @{\n    @defgroup videoio_c C API\n    @defgroup videoio_ios iOS glue\n    @defgroup videoio_winrt WinRT glue\n  @}\n*/\n\n////////////////////////////////// video io /////////////////////////////////\n\ntypedef struct CvCapture CvCapture;\ntypedef struct CvVideoWriter CvVideoWriter;\n\nnamespace cv\n{\n\n//! @addtogroup videoio\n//! @{\n\n// Camera API\nenum { CAP_ANY          = 0,     // autodetect\n       CAP_VFW          = 200,   // platform native\n       CAP_V4L          = 200,\n       CAP_V4L2         = CAP_V4L,\n       CAP_FIREWARE     = 300,   // IEEE 1394 drivers\n       CAP_FIREWIRE     = CAP_FIREWARE,\n       CAP_IEEE1394     = CAP_FIREWARE,\n       CAP_DC1394       = CAP_FIREWARE,\n       CAP_CMU1394      = CAP_FIREWARE,\n       CAP_QT           = 500,   // QuickTime\n       CAP_UNICAP       = 600,   // Unicap drivers\n       CAP_DSHOW        = 700,   // DirectShow (via videoInput)\n       CAP_PVAPI        = 800,   // PvAPI, Prosilica GigE SDK\n       CAP_OPENNI       = 900,   // OpenNI (for Kinect)\n       CAP_OPENNI_ASUS  = 910,   // OpenNI (for Asus Xtion)\n       CAP_ANDROID      = 1000,  // Android - not used\n       CAP_XIAPI        = 1100,  // XIMEA Camera API\n       CAP_AVFOUNDATION = 1200,  // AVFoundation framework for iOS (OS X Lion will have the same API)\n       CAP_GIGANETIX    = 1300,  // Smartek Giganetix GigEVisionSDK\n       CAP_MSMF         = 1400,  // Microsoft Media Foundation (via videoInput)\n       CAP_WINRT        = 1410,  // Microsoft Windows Runtime using Media Foundation\n       CAP_INTELPERC    = 1500,  // Intel Perceptual Computing SDK\n       CAP_OPENNI2      = 1600,  // OpenNI2 (for Kinect)\n       CAP_OPENNI2_ASUS = 1610,  // OpenNI2 (for Asus Xtion and Occipital Structure sensors)\n       CAP_GPHOTO2      = 1700   // gPhoto2 connection\n     };\n\n// generic properties (based on DC1394 properties)\nenum { CAP_PROP_POS_MSEC       =0,\n       CAP_PROP_POS_FRAMES     =1,\n       CAP_PROP_POS_AVI_RATIO  =2,\n       CAP_PROP_FRAME_WIDTH    =3,\n       CAP_PROP_FRAME_HEIGHT   =4,\n       CAP_PROP_FPS            =5,\n       CAP_PROP_FOURCC         =6,\n       CAP_PROP_FRAME_COUNT    =7,\n       CAP_PROP_FORMAT         =8,\n       CAP_PROP_MODE           =9,\n       CAP_PROP_BRIGHTNESS    =10,\n       CAP_PROP_CONTRAST      =11,\n       CAP_PROP_SATURATION    =12,\n       CAP_PROP_HUE           =13,\n       CAP_PROP_GAIN          =14,\n       CAP_PROP_EXPOSURE      =15,\n       CAP_PROP_CONVERT_RGB   =16,\n       CAP_PROP_WHITE_BALANCE_BLUE_U =17,\n       CAP_PROP_RECTIFICATION =18,\n       CAP_PROP_MONOCHROME    =19,\n       CAP_PROP_SHARPNESS     =20,\n       CAP_PROP_AUTO_EXPOSURE =21, // DC1394: exposure control done by camera, user can adjust refernce level using this feature\n       CAP_PROP_GAMMA         =22,\n       CAP_PROP_TEMPERATURE   =23,\n       CAP_PROP_TRIGGER       =24,\n       CAP_PROP_TRIGGER_DELAY =25,\n       CAP_PROP_WHITE_BALANCE_RED_V =26,\n       CAP_PROP_ZOOM          =27,\n       CAP_PROP_FOCUS         =28,\n       CAP_PROP_GUID          =29,\n       CAP_PROP_ISO_SPEED     =30,\n       CAP_PROP_BACKLIGHT     =32,\n       CAP_PROP_PAN           =33,\n       CAP_PROP_TILT          =34,\n       CAP_PROP_ROLL          =35,\n       CAP_PROP_IRIS          =36,\n       CAP_PROP_SETTINGS      =37\n     };\n\n\n// Generic camera output modes.\n// Currently, these are supported through the libv4l interface only.\nenum { CAP_MODE_BGR  = 0, // BGR24 (default)\n       CAP_MODE_RGB  = 1, // RGB24\n       CAP_MODE_GRAY = 2, // Y8\n       CAP_MODE_YUYV = 3  // YUYV\n     };\n\n\n// DC1394 only\n// modes of the controlling registers (can be: auto, manual, auto single push, absolute Latter allowed with any other mode)\n// every feature can have only one mode turned on at a time\nenum { CAP_PROP_DC1394_OFF                = -4, //turn the feature off (not controlled manually nor automatically)\n       CAP_PROP_DC1394_MODE_MANUAL        = -3, //set automatically when a value of the feature is set by the user\n       CAP_PROP_DC1394_MODE_AUTO          = -2,\n       CAP_PROP_DC1394_MODE_ONE_PUSH_AUTO = -1,\n       CAP_PROP_DC1394_MAX                = 31\n     };\n\n\n// OpenNI map generators\nenum { CAP_OPENNI_DEPTH_GENERATOR = 1 << 31,\n       CAP_OPENNI_IMAGE_GENERATOR = 1 << 30,\n       CAP_OPENNI_GENERATORS_MASK = CAP_OPENNI_DEPTH_GENERATOR + CAP_OPENNI_IMAGE_GENERATOR\n     };\n\n// Properties of cameras available through OpenNI interfaces\nenum { CAP_PROP_OPENNI_OUTPUT_MODE       = 100,\n       CAP_PROP_OPENNI_FRAME_MAX_DEPTH   = 101, // in mm\n       CAP_PROP_OPENNI_BASELINE          = 102, // in mm\n       CAP_PROP_OPENNI_FOCAL_LENGTH      = 103, // in pixels\n       CAP_PROP_OPENNI_REGISTRATION      = 104, // flag that synchronizes the remapping depth map to image map\n                                                // by changing depth generator's view point (if the flag is \"on\") or\n                                                // sets this view point to its normal one (if the flag is \"off\").\n       CAP_PROP_OPENNI_REGISTRATION_ON   = CAP_PROP_OPENNI_REGISTRATION,\n       CAP_PROP_OPENNI_APPROX_FRAME_SYNC = 105,\n       CAP_PROP_OPENNI_MAX_BUFFER_SIZE   = 106,\n       CAP_PROP_OPENNI_CIRCLE_BUFFER     = 107,\n       CAP_PROP_OPENNI_MAX_TIME_DURATION = 108,\n       CAP_PROP_OPENNI_GENERATOR_PRESENT = 109,\n       CAP_PROP_OPENNI2_SYNC             = 110,\n       CAP_PROP_OPENNI2_MIRROR           = 111\n     };\n\n// OpenNI shortcats\nenum { CAP_OPENNI_IMAGE_GENERATOR_PRESENT         = CAP_OPENNI_IMAGE_GENERATOR + CAP_PROP_OPENNI_GENERATOR_PRESENT,\n       CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE     = CAP_OPENNI_IMAGE_GENERATOR + CAP_PROP_OPENNI_OUTPUT_MODE,\n       CAP_OPENNI_DEPTH_GENERATOR_BASELINE        = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_BASELINE,\n       CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH    = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_FOCAL_LENGTH,\n       CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION    = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_REGISTRATION,\n       CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON = CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION\n     };\n\n// OpenNI data given from depth generator\nenum { CAP_OPENNI_DEPTH_MAP         = 0, // Depth values in mm (CV_16UC1)\n       CAP_OPENNI_POINT_CLOUD_MAP   = 1, // XYZ in meters (CV_32FC3)\n       CAP_OPENNI_DISPARITY_MAP     = 2, // Disparity in pixels (CV_8UC1)\n       CAP_OPENNI_DISPARITY_MAP_32F = 3, // Disparity in pixels (CV_32FC1)\n       CAP_OPENNI_VALID_DEPTH_MASK  = 4, // CV_8UC1\n\n       // Data given from RGB image generator\n       CAP_OPENNI_BGR_IMAGE         = 5,\n       CAP_OPENNI_GRAY_IMAGE        = 6\n     };\n\n// Supported output modes of OpenNI image generator\nenum { CAP_OPENNI_VGA_30HZ  = 0,\n       CAP_OPENNI_SXGA_15HZ = 1,\n       CAP_OPENNI_SXGA_30HZ = 2,\n       CAP_OPENNI_QVGA_30HZ = 3,\n       CAP_OPENNI_QVGA_60HZ = 4\n     };\n\n\n// GStreamer\nenum { CAP_PROP_GSTREAMER_QUEUE_LENGTH = 200 // default is 1\n     };\n\n\n// PVAPI\nenum { CAP_PROP_PVAPI_MULTICASTIP           = 300, // ip for anable multicast master mode. 0 for disable multicast\n       CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE = 301, // FrameStartTriggerMode: Determines how a frame is initiated\n       CAP_PROP_PVAPI_DECIMATIONHORIZONTAL  = 302, // Horizontal sub-sampling of the image\n       CAP_PROP_PVAPI_DECIMATIONVERTICAL    = 303, // Vertical sub-sampling of the image\n       CAP_PROP_PVAPI_BINNINGX              = 304, // Horizontal binning factor\n       CAP_PROP_PVAPI_BINNINGY              = 305, // Vertical binning factor\n       CAP_PROP_PVAPI_PIXELFORMAT           = 306  // Pixel format\n     };\n\n// PVAPI: FrameStartTriggerMode\nenum { CAP_PVAPI_FSTRIGMODE_FREERUN     = 0,    // Freerun\n       CAP_PVAPI_FSTRIGMODE_SYNCIN1     = 1,    // SyncIn1\n       CAP_PVAPI_FSTRIGMODE_SYNCIN2     = 2,    // SyncIn2\n       CAP_PVAPI_FSTRIGMODE_FIXEDRATE   = 3,    // FixedRate\n       CAP_PVAPI_FSTRIGMODE_SOFTWARE    = 4     // Software\n     };\n\n// PVAPI: DecimationHorizontal, DecimationVertical\nenum { CAP_PVAPI_DECIMATION_OFF       = 1,    // Off\n       CAP_PVAPI_DECIMATION_2OUTOF4   = 2,    // 2 out of 4 decimation\n       CAP_PVAPI_DECIMATION_2OUTOF8   = 4,    // 2 out of 8 decimation\n       CAP_PVAPI_DECIMATION_2OUTOF16  = 8     // 2 out of 16 decimation\n     };\n\n// PVAPI: PixelFormat\nenum { CAP_PVAPI_PIXELFORMAT_MONO8    = 1,    // Mono8\n       CAP_PVAPI_PIXELFORMAT_MONO16   = 2,    // Mono16\n       CAP_PVAPI_PIXELFORMAT_BAYER8   = 3,    // Bayer8\n       CAP_PVAPI_PIXELFORMAT_BAYER16  = 4,    // Bayer16\n       CAP_PVAPI_PIXELFORMAT_RGB24    = 5,    // Rgb24\n       CAP_PVAPI_PIXELFORMAT_BGR24    = 6,    // Bgr24\n       CAP_PVAPI_PIXELFORMAT_RGBA32   = 7,    // Rgba32\n       CAP_PVAPI_PIXELFORMAT_BGRA32   = 8,    // Bgra32\n     };\n\n// Properties of cameras available through XIMEA SDK interface\nenum { CAP_PROP_XI_DOWNSAMPLING  = 400, // Change image resolution by binning or skipping.\n       CAP_PROP_XI_DATA_FORMAT   = 401, // Output data format.\n       CAP_PROP_XI_OFFSET_X      = 402, // Horizontal offset from the origin to the area of interest (in pixels).\n       CAP_PROP_XI_OFFSET_Y      = 403, // Vertical offset from the origin to the area of interest (in pixels).\n       CAP_PROP_XI_TRG_SOURCE    = 404, // Defines source of trigger.\n       CAP_PROP_XI_TRG_SOFTWARE  = 405, // Generates an internal trigger. PRM_TRG_SOURCE must be set to TRG_SOFTWARE.\n       CAP_PROP_XI_GPI_SELECTOR  = 406, // Selects general purpose input\n       CAP_PROP_XI_GPI_MODE      = 407, // Set general purpose input mode\n       CAP_PROP_XI_GPI_LEVEL     = 408, // Get general purpose level\n       CAP_PROP_XI_GPO_SELECTOR  = 409, // Selects general purpose output\n       CAP_PROP_XI_GPO_MODE      = 410, // Set general purpose output mode\n       CAP_PROP_XI_LED_SELECTOR  = 411, // Selects camera signalling LED\n       CAP_PROP_XI_LED_MODE      = 412, // Define camera signalling LED functionality\n       CAP_PROP_XI_MANUAL_WB     = 413, // Calculates White Balance(must be called during acquisition)\n       CAP_PROP_XI_AUTO_WB       = 414, // Automatic white balance\n       CAP_PROP_XI_AEAG          = 415, // Automatic exposure/gain\n       CAP_PROP_XI_EXP_PRIORITY  = 416, // Exposure priority (0.5 - exposure 50%, gain 50%).\n       CAP_PROP_XI_AE_MAX_LIMIT  = 417, // Maximum limit of exposure in AEAG procedure\n       CAP_PROP_XI_AG_MAX_LIMIT  = 418, // Maximum limit of gain in AEAG procedure\n       CAP_PROP_XI_AEAG_LEVEL    = 419, // Average intensity of output signal AEAG should achieve(in %)\n       CAP_PROP_XI_TIMEOUT       = 420  // Image capture timeout in milliseconds\n     };\n\n// Properties of cameras available through AVFOUNDATION interface\nenum { CAP_PROP_IOS_DEVICE_FOCUS        = 9001,\n       CAP_PROP_IOS_DEVICE_EXPOSURE     = 9002,\n       CAP_PROP_IOS_DEVICE_FLASH        = 9003,\n       CAP_PROP_IOS_DEVICE_WHITEBALANCE = 9004,\n       CAP_PROP_IOS_DEVICE_TORCH        = 9005\n     };\n\n\n// Properties of cameras available through Smartek Giganetix Ethernet Vision interface\n/* --- Vladimir Litvinenko (litvinenko.vladimir@gmail.com) --- */\nenum { CAP_PROP_GIGA_FRAME_OFFSET_X   = 10001,\n       CAP_PROP_GIGA_FRAME_OFFSET_Y   = 10002,\n       CAP_PROP_GIGA_FRAME_WIDTH_MAX  = 10003,\n       CAP_PROP_GIGA_FRAME_HEIGH_MAX  = 10004,\n       CAP_PROP_GIGA_FRAME_SENS_WIDTH = 10005,\n       CAP_PROP_GIGA_FRAME_SENS_HEIGH = 10006\n     };\n\nenum { CAP_PROP_INTELPERC_PROFILE_COUNT               = 11001,\n       CAP_PROP_INTELPERC_PROFILE_IDX                 = 11002,\n       CAP_PROP_INTELPERC_DEPTH_LOW_CONFIDENCE_VALUE  = 11003,\n       CAP_PROP_INTELPERC_DEPTH_SATURATION_VALUE      = 11004,\n       CAP_PROP_INTELPERC_DEPTH_CONFIDENCE_THRESHOLD  = 11005,\n       CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_HORZ     = 11006,\n       CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_VERT     = 11007\n     };\n\n// Intel PerC streams\nenum { CAP_INTELPERC_DEPTH_GENERATOR = 1 << 29,\n       CAP_INTELPERC_IMAGE_GENERATOR = 1 << 28,\n       CAP_INTELPERC_GENERATORS_MASK = CAP_INTELPERC_DEPTH_GENERATOR + CAP_INTELPERC_IMAGE_GENERATOR\n     };\n\nenum { CAP_INTELPERC_DEPTH_MAP              = 0, // Each pixel is a 16-bit integer. The value indicates the distance from an object to the camera's XY plane or the Cartesian depth.\n       CAP_INTELPERC_UVDEPTH_MAP            = 1, // Each pixel contains two 32-bit floating point values in the range of 0-1, representing the mapping of depth coordinates to the color coordinates.\n       CAP_INTELPERC_IR_MAP                 = 2, // Each pixel is a 16-bit integer. The value indicates the intensity of the reflected laser beam.\n       CAP_INTELPERC_IMAGE                  = 3\n     };\n\nenum { VIDEOWRITER_PROP_QUALITY = 1,    // Quality (0..100%) of the videostream encoded\n       VIDEOWRITER_PROP_FRAMEBYTES = 2, // (Read-only): Size of just encoded video frame\n     };\n\n// gPhoto2 properties, if propertyId is less than 0 then work on widget with that __additive inversed__ camera setting ID\n// Get IDs by using CAP_PROP_GPHOTO2_WIDGET_ENUMERATE.\n// @see CvCaptureCAM_GPHOTO2 for more info\nenum { CAP_PROP_GPHOTO2_PREVIEW           = 17001, // Capture only preview from liveview mode.\n       CAP_PROP_GPHOTO2_WIDGET_ENUMERATE  = 17002, // Readonly, returns (const char *).\n       CAP_PROP_GPHOTO2_RELOAD_CONFIG     = 17003, // Trigger, only by set. Reload camera settings.\n       CAP_PROP_GPHOTO2_RELOAD_ON_CHANGE  = 17004, // Reload all settings on set.\n       CAP_PROP_GPHOTO2_COLLECT_MSGS      = 17005, // Collect messages with details.\n       CAP_PROP_GPHOTO2_FLUSH_MSGS        = 17006, // Readonly, returns (const char *).\n       CAP_PROP_SPEED                     = 17007, // Exposure speed. Can be readonly, depends on camera program.\n       CAP_PROP_APERTURE                  = 17008, // Aperture. Can be readonly, depends on camera program.\n       CAP_PROP_EXPOSUREPROGRAM           = 17009, // Camera exposure program.\n       CAP_PROP_VIEWFINDER                = 17010  // Enter liveview mode.\n     };\n\n//enum {\n\nclass IVideoCapture;\n\n/** @brief Class for video capturing from video files, image sequences or cameras. The class provides C++ API\nfor capturing video from cameras or for reading video files and image sequences. Here is how the\nclass can be used: :\n@code\n    #include \"opencv2/opencv.hpp\"\n\n    using namespace cv;\n\n    int main(int, char**)\n    {\n        VideoCapture cap(0); // open the default camera\n        if(!cap.isOpened())  // check if we succeeded\n            return -1;\n\n        Mat edges;\n        namedWindow(\"edges\",1);\n        for(;;)\n        {\n            Mat frame;\n            cap >> frame; // get a new frame from camera\n            cvtColor(frame, edges, COLOR_BGR2GRAY);\n            GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);\n            Canny(edges, edges, 0, 30, 3);\n            imshow(\"edges\", edges);\n            if(waitKey(30) >= 0) break;\n        }\n        // the camera will be deinitialized automatically in VideoCapture destructor\n        return 0;\n    }\n@endcode\n@note In C API the black-box structure CvCapture is used instead of VideoCapture.\n\n@note\n-   A basic sample on using the VideoCapture interface can be found at\n    opencv_source_code/samples/cpp/starter_video.cpp\n-   Another basic video processing sample can be found at\n    opencv_source_code/samples/cpp/video_dmtx.cpp\n-   (Python) A basic sample on using the VideoCapture interface can be found at\n    opencv_source_code/samples/python2/video.py\n-   (Python) Another basic video processing sample can be found at\n    opencv_source_code/samples/python2/video_dmtx.py\n-   (Python) A multi threaded video processing sample can be found at\n    opencv_source_code/samples/python2/video_threaded.py\n */\nclass CV_EXPORTS_W VideoCapture\n{\npublic:\n    /** @brief\n    @note In C API, when you finished working with video, release CvCapture structure with\n    cvReleaseCapture(), or use Ptr\\<CvCapture\\> that calls cvReleaseCapture() automatically in the\n    destructor.\n     */\n    CV_WRAP VideoCapture();\n\n    /** @overload\n    @param filename name of the opened video file (eg. video.avi) or image sequence (eg.\n    img_%02d.jpg, which will read samples like img_00.jpg, img_01.jpg, img_02.jpg, ...)\n    */\n    CV_WRAP VideoCapture(const String& filename);\n\n    /** @overload\n    @param device id of the opened video capturing device (i.e. a camera index). If there is a single\n    camera connected, just pass 0.\n    */\n    CV_WRAP VideoCapture(int device);\n\n    virtual ~VideoCapture();\n\n    /** @brief Open video file or a capturing device for video capturing\n\n    @param filename name of the opened video file (eg. video.avi) or image sequence (eg.\n    img_%02d.jpg, which will read samples like img_00.jpg, img_01.jpg, img_02.jpg, ...)\n\n    The methods first call VideoCapture::release to close the already opened file or camera.\n     */\n    CV_WRAP virtual bool open(const String& filename);\n\n    /** @overload\n    @param device id of the opened video capturing device (i.e. a camera index).\n    */\n    CV_WRAP virtual bool open(int device);\n\n    /** @brief Returns true if video capturing has been initialized already.\n\n    If the previous call to VideoCapture constructor or VideoCapture::open succeeded, the method returns\n    true.\n     */\n    CV_WRAP virtual bool isOpened() const;\n\n    /** @brief Closes video file or capturing device.\n\n    The methods are automatically called by subsequent VideoCapture::open and by VideoCapture\n    destructor.\n\n    The C function also deallocates memory and clears \\*capture pointer.\n     */\n    CV_WRAP virtual void release();\n\n    /** @brief Grabs the next frame from video file or capturing device.\n\n    The methods/functions grab the next frame from video file or camera and return true (non-zero) in\n    the case of success.\n\n    The primary use of the function is in multi-camera environments, especially when the cameras do not\n    have hardware synchronization. That is, you call VideoCapture::grab() for each camera and after that\n    call the slower method VideoCapture::retrieve() to decode and get frame from each camera. This way\n    the overhead on demosaicing or motion jpeg decompression etc. is eliminated and the retrieved frames\n    from different cameras will be closer in time.\n\n    Also, when a connected camera is multi-head (for example, a stereo camera or a Kinect device), the\n    correct way of retrieving data from it is to call VideoCapture::grab first and then call\n    VideoCapture::retrieve one or more times with different values of the channel parameter. See\n    <https://github.com/Itseez/opencv/tree/master/samples/cpp/openni_capture.cpp>\n     */\n    CV_WRAP virtual bool grab();\n\n    /** @brief Decodes and returns the grabbed video frame.\n\n    The methods/functions decode and return the just grabbed frame. If no frames has been grabbed\n    (camera has been disconnected, or there are no more frames in video file), the methods return false\n    and the functions return NULL pointer.\n\n    @note OpenCV 1.x functions cvRetrieveFrame and cv.RetrieveFrame return image stored inside the video\n    capturing structure. It is not allowed to modify or release the image! You can copy the frame using\n    :ocvcvCloneImage and then do whatever you want with the copy.\n     */\n    CV_WRAP virtual bool retrieve(OutputArray image, int flag = 0);\n    virtual VideoCapture& operator >> (CV_OUT Mat& image);\n    virtual VideoCapture& operator >> (CV_OUT UMat& image);\n\n    /** @brief Grabs, decodes and returns the next video frame.\n\n    The methods/functions combine VideoCapture::grab and VideoCapture::retrieve in one call. This is the\n    most convenient method for reading video files or capturing data from decode and return the just\n    grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more\n    frames in video file), the methods return false and the functions return NULL pointer.\n\n    @note OpenCV 1.x functions cvRetrieveFrame and cv.RetrieveFrame return image stored inside the video\n    capturing structure. It is not allowed to modify or release the image! You can copy the frame using\n    :ocvcvCloneImage and then do whatever you want with the copy.\n     */\n    CV_WRAP virtual bool read(OutputArray image);\n\n    /** @brief Sets a property in the VideoCapture.\n\n    @param propId Property identifier. It can be one of the following:\n     -   **CAP_PROP_POS_MSEC** Current position of the video file in milliseconds.\n     -   **CAP_PROP_POS_FRAMES** 0-based index of the frame to be decoded/captured next.\n     -   **CAP_PROP_POS_AVI_RATIO** Relative position of the video file: 0 - start of the\n         film, 1 - end of the film.\n     -   **CAP_PROP_FRAME_WIDTH** Width of the frames in the video stream.\n     -   **CAP_PROP_FRAME_HEIGHT** Height of the frames in the video stream.\n     -   **CAP_PROP_FPS** Frame rate.\n     -   **CAP_PROP_FOURCC** 4-character code of codec.\n     -   **CAP_PROP_FRAME_COUNT** Number of frames in the video file.\n     -   **CAP_PROP_FORMAT** Format of the Mat objects returned by retrieve() .\n     -   **CAP_PROP_MODE** Backend-specific value indicating the current capture mode.\n     -   **CAP_PROP_BRIGHTNESS** Brightness of the image (only for cameras).\n     -   **CAP_PROP_CONTRAST** Contrast of the image (only for cameras).\n     -   **CAP_PROP_SATURATION** Saturation of the image (only for cameras).\n     -   **CAP_PROP_HUE** Hue of the image (only for cameras).\n     -   **CAP_PROP_GAIN** Gain of the image (only for cameras).\n     -   **CAP_PROP_EXPOSURE** Exposure (only for cameras).\n     -   **CAP_PROP_CONVERT_RGB** Boolean flags indicating whether images should be converted\n         to RGB.\n     -   **CAP_PROP_WHITE_BALANCE** Currently unsupported\n     -   **CAP_PROP_RECTIFICATION** Rectification flag for stereo cameras (note: only supported\n         by DC1394 v 2.x backend currently)\n    @param value Value of the property.\n     */\n    CV_WRAP virtual bool set(int propId, double value);\n\n    /** @brief Returns the specified VideoCapture property\n\n    @param propId Property identifier. It can be one of the following:\n     -   **CAP_PROP_POS_MSEC** Current position of the video file in milliseconds or video\n         capture timestamp.\n     -   **CAP_PROP_POS_FRAMES** 0-based index of the frame to be decoded/captured next.\n     -   **CAP_PROP_POS_AVI_RATIO** Relative position of the video file: 0 - start of the\n         film, 1 - end of the film.\n     -   **CAP_PROP_FRAME_WIDTH** Width of the frames in the video stream.\n     -   **CAP_PROP_FRAME_HEIGHT** Height of the frames in the video stream.\n     -   **CAP_PROP_FPS** Frame rate.\n     -   **CAP_PROP_FOURCC** 4-character code of codec.\n     -   **CAP_PROP_FRAME_COUNT** Number of frames in the video file.\n     -   **CAP_PROP_FORMAT** Format of the Mat objects returned by retrieve() .\n     -   **CAP_PROP_MODE** Backend-specific value indicating the current capture mode.\n     -   **CAP_PROP_BRIGHTNESS** Brightness of the image (only for cameras).\n     -   **CAP_PROP_CONTRAST** Contrast of the image (only for cameras).\n     -   **CAP_PROP_SATURATION** Saturation of the image (only for cameras).\n     -   **CAP_PROP_HUE** Hue of the image (only for cameras).\n     -   **CAP_PROP_GAIN** Gain of the image (only for cameras).\n     -   **CAP_PROP_EXPOSURE** Exposure (only for cameras).\n     -   **CAP_PROP_CONVERT_RGB** Boolean flags indicating whether images should be converted\n         to RGB.\n     -   **CAP_PROP_WHITE_BALANCE** Currently not supported\n     -   **CAP_PROP_RECTIFICATION** Rectification flag for stereo cameras (note: only supported\n         by DC1394 v 2.x backend currently)\n\n    @note When querying a property that is not supported by the backend used by the VideoCapture\n    class, value 0 is returned.\n     */\n    CV_WRAP virtual double get(int propId) const;\n\nprotected:\n    Ptr<CvCapture> cap;\n    Ptr<IVideoCapture> icap;\n};\n\nclass IVideoWriter;\n\n/** @brief Video writer class.\n */\nclass CV_EXPORTS_W VideoWriter\n{\npublic:\n    /** @brief VideoWriter constructors\n\n    The constructors/functions initialize video writers. On Linux FFMPEG is used to write videos; on\n    Windows FFMPEG or VFW is used; on MacOSX QTKit is used.\n     */\n    CV_WRAP VideoWriter();\n\n    /** @overload\n    @param filename Name of the output video file.\n    @param fourcc 4-character code of codec used to compress the frames. For example,\n    VideoWriter::fourcc('P','I','M','1') is a MPEG-1 codec, VideoWriter::fourcc('M','J','P','G') is a\n    motion-jpeg codec etc. List of codes can be obtained at [Video Codecs by\n    FOURCC](http://www.fourcc.org/codecs.php) page.\n    @param fps Framerate of the created video stream.\n    @param frameSize Size of the video frames.\n    @param isColor If it is not zero, the encoder will expect and encode color frames, otherwise it\n    will work with grayscale frames (the flag is currently supported on Windows only).\n    */\n    CV_WRAP VideoWriter(const String& filename, int fourcc, double fps,\n                Size frameSize, bool isColor = true);\n\n    virtual ~VideoWriter();\n\n    /** @brief Initializes or reinitializes video writer.\n\n    The method opens video writer. Parameters are the same as in the constructor\n    VideoWriter::VideoWriter.\n     */\n    CV_WRAP virtual bool open(const String& filename, int fourcc, double fps,\n                      Size frameSize, bool isColor = true);\n\n    /** @brief Returns true if video writer has been successfully initialized.\n    */\n    CV_WRAP virtual bool isOpened() const;\n\n    /** @brief Closes the video writer.\n\n    The methods are automatically called by subsequent VideoWriter::open and by the VideoWriter\n    destructor.\n     */\n    CV_WRAP virtual void release();\n    virtual VideoWriter& operator << (const Mat& image);\n\n    /** @brief Writes the next video frame\n\n    @param image The written frame\n\n    The functions/methods write the specified image to video file. It must have the same size as has\n    been specified when opening the video writer.\n     */\n    CV_WRAP virtual void write(const Mat& image);\n\n    /** @brief Sets a property in the VideoWriter.\n\n     @param propId Property identifier. It can be one of the following:\n     -   **VIDEOWRITER_PROP_QUALITY** Quality (0..100%) of the videostream encoded. Can be adjusted dynamically in some codecs.\n     @param value Value of the property.\n     */\n    CV_WRAP virtual bool set(int propId, double value);\n\n    /** @brief Returns the specified VideoWriter property\n\n     @param propId Property identifier. It can be one of the following:\n     -   **VIDEOWRITER_PROP_QUALITY** Current quality of the encoded videostream.\n     -   **VIDEOWRITER_PROP_FRAMEBYTES** (Read-only) Size of just encoded video frame; note that the encoding order may be different from representation order.\n\n     @note When querying a property that is not supported by the backend used by the VideoWriter\n     class, value 0 is returned.\n     */\n    CV_WRAP virtual double get(int propId) const;\n\n    /** @brief Concatenates 4 chars to a fourcc code\n\n    This static method constructs the fourcc code of the codec to be used in the constructor\n    VideoWriter::VideoWriter or VideoWriter::open.\n     */\n    CV_WRAP static int fourcc(char c1, char c2, char c3, char c4);\n\nprotected:\n    Ptr<CvVideoWriter> writer;\n    Ptr<IVideoWriter> iwriter;\n\n    static Ptr<IVideoWriter> create(const String& filename, int fourcc, double fps,\n                                    Size frameSize, bool isColor = true);\n};\n\ntemplate<> CV_EXPORTS void DefaultDeleter<CvCapture>::operator ()(CvCapture* obj) const;\ntemplate<> CV_EXPORTS void DefaultDeleter<CvVideoWriter>::operator ()(CvVideoWriter* obj) const;\n\n//! @} videoio\n\n} // cv\n\n#endif //__OPENCV_VIDEOIO_HPP__\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/deblurring.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_DEBLURRING_HPP__\n#define __OPENCV_VIDEOSTAB_DEBLURRING_HPP__\n\n#include <vector>\n#include \"opencv2/core.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab\n//! @{\n\nCV_EXPORTS float calcBlurriness(const Mat &frame);\n\nclass CV_EXPORTS DeblurerBase\n{\npublic:\n    DeblurerBase() : radius_(0), frames_(0), motions_(0), blurrinessRates_(0) {}\n\n    virtual ~DeblurerBase() {}\n\n    virtual void setRadius(int val) { radius_ = val; }\n    virtual int radius() const { return radius_; }\n\n    virtual void deblur(int idx, Mat &frame) = 0;\n\n\n    // data from stabilizer\n\n    virtual void setFrames(const std::vector<Mat> &val) { frames_ = &val; }\n    virtual const std::vector<Mat>& frames() const { return *frames_; }\n\n    virtual void setMotions(const std::vector<Mat> &val) { motions_ = &val; }\n    virtual const std::vector<Mat>& motions() const { return *motions_; }\n\n    virtual void setBlurrinessRates(const std::vector<float> &val) { blurrinessRates_ = &val; }\n    virtual const std::vector<float>& blurrinessRates() const { return *blurrinessRates_; }\n\nprotected:\n    int radius_;\n    const std::vector<Mat> *frames_;\n    const std::vector<Mat> *motions_;\n    const std::vector<float> *blurrinessRates_;\n};\n\nclass CV_EXPORTS NullDeblurer : public DeblurerBase\n{\npublic:\n    virtual void deblur(int /*idx*/, Mat &/*frame*/) {}\n};\n\nclass CV_EXPORTS WeightingDeblurer : public DeblurerBase\n{\npublic:\n    WeightingDeblurer();\n\n    void setSensitivity(float val) { sensitivity_ = val; }\n    float sensitivity() const { return sensitivity_; }\n\n    virtual void deblur(int idx, Mat &frame);\n\nprivate:\n    float sensitivity_;\n    Mat_<float> bSum_, gSum_, rSum_, wSum_;\n};\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/fast_marching.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_FAST_MARCHING_HPP__\n#define __OPENCV_VIDEOSTAB_FAST_MARCHING_HPP__\n\n#include <cmath>\n#include <queue>\n#include <algorithm>\n#include \"opencv2/core.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab_marching\n//! @{\n\n/** @brief Describes the Fast Marching Method implementation.\n\n  See http://iwi.eldoc.ub.rug.nl/FILES/root/2004/JGraphToolsTelea/2004JGraphToolsTelea.pdf\n */\nclass CV_EXPORTS FastMarchingMethod\n{\npublic:\n    FastMarchingMethod() : inf_(1e6f) {}\n\n    /** @brief Template method that runs the Fast Marching Method.\n\n    @param mask Image mask. 0 value indicates that the pixel value must be inpainted, 255 indicates\n    that the pixel value is known, other values aren't acceptable.\n    @param inpaint Inpainting functor that overloads void operator ()(int x, int y).\n    @return Inpainting functor.\n     */\n    template <typename Inpaint>\n    Inpaint run(const Mat &mask, Inpaint inpaint);\n\n    /**\n    @return Distance map that's created during working of the method.\n    */\n    Mat distanceMap() const { return dist_; }\n\nprivate:\n    enum { INSIDE = 0, BAND = 1, KNOWN = 255 };\n\n    struct DXY\n    {\n        float dist;\n        int x, y;\n\n        DXY() : dist(0), x(0), y(0) {}\n        DXY(float _dist, int _x, int _y) : dist(_dist), x(_x), y(_y) {}\n        bool operator <(const DXY &dxy) const { return dist < dxy.dist; }\n    };\n\n    float solve(int x1, int y1, int x2, int y2) const;\n    int& indexOf(const DXY &dxy) { return index_(dxy.y, dxy.x); }\n\n    void heapUp(int idx);\n    void heapDown(int idx);\n    void heapAdd(const DXY &dxy);\n    void heapRemoveMin();\n\n    float inf_;\n\n    cv::Mat_<uchar> flag_; // flag map\n    cv::Mat_<float> dist_; // distance map\n\n    cv::Mat_<int> index_; // index of point in the narrow band\n    std::vector<DXY> narrowBand_; // narrow band heap\n    int size_; // narrow band size\n};\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#include \"fast_marching_inl.hpp\"\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/fast_marching_inl.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_FAST_MARCHING_INL_HPP__\n#define __OPENCV_VIDEOSTAB_FAST_MARCHING_INL_HPP__\n\n#include \"opencv2/videostab/fast_marching.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\ntemplate <typename Inpaint>\nInpaint FastMarchingMethod::run(const cv::Mat &mask, Inpaint inpaint)\n{\n    using namespace cv;\n\n    CV_Assert(mask.type() == CV_8U);\n\n    static const int lut[4][2] = {{-1,0}, {0,-1}, {1,0}, {0,1}};\n\n    mask.copyTo(flag_);\n    flag_.create(mask.size());\n    dist_.create(mask.size());\n    index_.create(mask.size());\n    narrowBand_.clear();\n    size_ = 0;\n\n    // init\n    for (int y = 0; y < flag_.rows; ++y)\n    {\n        for (int x = 0; x < flag_.cols; ++x)\n        {\n            if (flag_(y,x) == KNOWN)\n                dist_(y,x) = 0.f;\n            else\n            {\n                int n = 0;\n                int nunknown = 0;\n\n                for (int i = 0; i < 4; ++i)\n                {\n                    int xn = x + lut[i][0];\n                    int yn = y + lut[i][1];\n\n                    if (xn >= 0 && xn < flag_.cols && yn >= 0 && yn < flag_.rows)\n                    {\n                        n++;\n                        if (flag_(yn,xn) != KNOWN)\n                            nunknown++;\n                    }\n                }\n\n                if (n>0 && nunknown == n)\n                {\n                    dist_(y,x) = inf_;\n                    flag_(y,x) = INSIDE;\n                }\n                else\n                {\n                    dist_(y,x) = 0.f;\n                    flag_(y,x) = BAND;\n                    inpaint(x, y);\n\n                    narrowBand_.push_back(DXY(0.f,x,y));\n                    index_(y,x) = size_++;\n                }\n            }\n        }\n    }\n\n    // make heap\n    for (int i = size_/2-1; i >= 0; --i)\n        heapDown(i);\n\n    // main cycle\n    while (size_ > 0)\n    {\n        int x = narrowBand_[0].x;\n        int y = narrowBand_[0].y;\n        heapRemoveMin();\n\n        flag_(y,x) = KNOWN;\n        for (int n = 0; n < 4; ++n)\n        {\n            int xn = x + lut[n][0];\n            int yn = y + lut[n][1];\n\n            if (xn >= 0 && xn < flag_.cols && yn >= 0 && yn < flag_.rows && flag_(yn,xn) != KNOWN)\n            {\n                dist_(yn,xn) = std::min(std::min(solve(xn-1, yn, xn, yn-1), solve(xn+1, yn, xn, yn-1)),\n                                        std::min(solve(xn-1, yn, xn, yn+1), solve(xn+1, yn, xn, yn+1)));\n\n                if (flag_(yn,xn) == INSIDE)\n                {\n                    flag_(yn,xn) = BAND;\n                    inpaint(xn, yn);\n                    heapAdd(DXY(dist_(yn,xn),xn,yn));\n                }\n                else\n                {\n                    int i = index_(yn,xn);\n                    if (dist_(yn,xn) < narrowBand_[i].dist)\n                    {\n                        narrowBand_[i].dist = dist_(yn,xn);\n                        heapUp(i);\n                    }\n                    // works better if it's commented out\n                    /*else if (dist(yn,xn) > narrowBand[i].dist)\n                    {\n                        narrowBand[i].dist = dist(yn,xn);\n                        heapDown(i);\n                    }*/\n                }\n            }\n        }\n    }\n\n    return inpaint;\n}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/frame_source.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_FRAME_SOURCE_HPP__\n#define __OPENCV_VIDEOSTAB_FRAME_SOURCE_HPP__\n\n#include <vector>\n#include \"opencv2/core.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab\n//! @{\n\nclass CV_EXPORTS IFrameSource\n{\npublic:\n    virtual ~IFrameSource() {}\n    virtual void reset() = 0;\n    virtual Mat nextFrame() = 0;\n};\n\nclass CV_EXPORTS NullFrameSource : public IFrameSource\n{\npublic:\n    virtual void reset() {}\n    virtual Mat nextFrame() { return Mat(); }\n};\n\nclass CV_EXPORTS VideoFileSource : public IFrameSource\n{\npublic:\n    VideoFileSource(const String &path, bool volatileFrame = false);\n\n    virtual void reset();\n    virtual Mat nextFrame();\n\n    int width();\n    int height();\n    int count();\n    double fps();\n\nprivate:\n    Ptr<IFrameSource> impl;\n};\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/global_motion.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_GLOBAL_MOTION_HPP__\n#define __OPENCV_VIDEOSTAB_GLOBAL_MOTION_HPP__\n\n#include <vector>\n#include <fstream>\n#include \"opencv2/core.hpp\"\n#include \"opencv2/features2d.hpp\"\n#include \"opencv2/opencv_modules.hpp\"\n#include \"opencv2/videostab/optical_flow.hpp\"\n#include \"opencv2/videostab/motion_core.hpp\"\n#include \"opencv2/videostab/outlier_rejection.hpp\"\n\n#ifdef HAVE_OPENCV_CUDAIMGPROC\n#  include \"opencv2/cudaimgproc.hpp\"\n#endif\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab_motion\n//! @{\n\n/** @brief Estimates best global motion between two 2D point clouds in the least-squares sense.\n\n@note Works in-place and changes input point arrays.\n\n@param points0 Source set of 2D points (32F).\n@param points1 Destination set of 2D points (32F).\n@param model Motion model (up to MM_AFFINE).\n@param rmse Final root-mean-square error.\n@return 3x3 2D transformation matrix (32F).\n */\nCV_EXPORTS Mat estimateGlobalMotionLeastSquares(\n        InputOutputArray points0, InputOutputArray points1, int model = MM_AFFINE,\n        float *rmse = 0);\n\n/** @brief Estimates best global motion between two 2D point clouds robustly (using RANSAC method).\n\n@param points0 Source set of 2D points (32F).\n@param points1 Destination set of 2D points (32F).\n@param model Motion model. See cv::videostab::MotionModel.\n@param params RANSAC method parameters. See videostab::RansacParams.\n@param rmse Final root-mean-square error.\n@param ninliers Final number of inliers.\n */\nCV_EXPORTS Mat estimateGlobalMotionRansac(\n        InputArray points0, InputArray points1, int model = MM_AFFINE,\n        const RansacParams &params = RansacParams::default2dMotion(MM_AFFINE),\n        float *rmse = 0, int *ninliers = 0);\n\n/** @brief Base class for all global motion estimation methods.\n */\nclass CV_EXPORTS MotionEstimatorBase\n{\npublic:\n    virtual ~MotionEstimatorBase() {}\n\n    /** @brief Sets motion model.\n\n    @param val Motion model. See cv::videostab::MotionModel.\n     */\n    virtual void setMotionModel(MotionModel val) { motionModel_ = val; }\n\n    /**\n    @return Motion model. See cv::videostab::MotionModel.\n    */\n    virtual MotionModel motionModel() const { return motionModel_; }\n\n    /** @brief Estimates global motion between two 2D point clouds.\n\n    @param points0 Source set of 2D points (32F).\n    @param points1 Destination set of 2D points (32F).\n    @param ok Indicates whether motion was estimated successfully.\n    @return 3x3 2D transformation matrix (32F).\n     */\n    virtual Mat estimate(InputArray points0, InputArray points1, bool *ok = 0) = 0;\n\nprotected:\n    MotionEstimatorBase(MotionModel model) { setMotionModel(model); }\n\nprivate:\n    MotionModel motionModel_;\n};\n\n/** @brief Describes a robust RANSAC-based global 2D motion estimation method which minimizes L2 error.\n */\nclass CV_EXPORTS MotionEstimatorRansacL2 : public MotionEstimatorBase\n{\npublic:\n    MotionEstimatorRansacL2(MotionModel model = MM_AFFINE);\n\n    void setRansacParams(const RansacParams &val) { ransacParams_ = val; }\n    RansacParams ransacParams() const { return ransacParams_; }\n\n    void setMinInlierRatio(float val) { minInlierRatio_ = val; }\n    float minInlierRatio() const { return minInlierRatio_; }\n\n    virtual Mat estimate(InputArray points0, InputArray points1, bool *ok = 0);\n\nprivate:\n    RansacParams ransacParams_;\n    float minInlierRatio_;\n};\n\n/** @brief Describes a global 2D motion estimation method which minimizes L1 error.\n\n@note To be able to use this method you must build OpenCV with CLP library support. :\n */\nclass CV_EXPORTS MotionEstimatorL1 : public MotionEstimatorBase\n{\npublic:\n    MotionEstimatorL1(MotionModel model = MM_AFFINE);\n\n    virtual Mat estimate(InputArray points0, InputArray points1, bool *ok = 0);\n\nprivate:\n    std::vector<double> obj_, collb_, colub_;\n    std::vector<double> elems_, rowlb_, rowub_;\n    std::vector<int> rows_, cols_;\n\n    void set(int row, int col, double coef)\n    {\n        rows_.push_back(row);\n        cols_.push_back(col);\n        elems_.push_back(coef);\n    }\n};\n\n/** @brief Base class for global 2D motion estimation methods which take frames as input.\n */\nclass CV_EXPORTS ImageMotionEstimatorBase\n{\npublic:\n    virtual ~ImageMotionEstimatorBase() {}\n\n    virtual void setMotionModel(MotionModel val) { motionModel_ = val; }\n    virtual MotionModel motionModel() const { return motionModel_; }\n\n    virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0) = 0;\n\nprotected:\n    ImageMotionEstimatorBase(MotionModel model) { setMotionModel(model); }\n\nprivate:\n    MotionModel motionModel_;\n};\n\nclass CV_EXPORTS FromFileMotionReader : public ImageMotionEstimatorBase\n{\npublic:\n    FromFileMotionReader(const String &path);\n\n    virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0);\n\nprivate:\n    std::ifstream file_;\n};\n\nclass CV_EXPORTS ToFileMotionWriter : public ImageMotionEstimatorBase\n{\npublic:\n    ToFileMotionWriter(const String &path, Ptr<ImageMotionEstimatorBase> estimator);\n\n    virtual void setMotionModel(MotionModel val) { motionEstimator_->setMotionModel(val); }\n    virtual MotionModel motionModel() const { return motionEstimator_->motionModel(); }\n\n    virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0);\n\nprivate:\n    std::ofstream file_;\n    Ptr<ImageMotionEstimatorBase> motionEstimator_;\n};\n\n/** @brief Describes a global 2D motion estimation method which uses keypoints detection and optical flow for\nmatching.\n */\nclass CV_EXPORTS KeypointBasedMotionEstimator : public ImageMotionEstimatorBase\n{\npublic:\n    KeypointBasedMotionEstimator(Ptr<MotionEstimatorBase> estimator);\n\n    virtual void setMotionModel(MotionModel val) { motionEstimator_->setMotionModel(val); }\n    virtual MotionModel motionModel() const { return motionEstimator_->motionModel(); }\n\n    void setDetector(Ptr<FeatureDetector> val) { detector_ = val; }\n    Ptr<FeatureDetector> detector() const { return detector_; }\n\n    void setOpticalFlowEstimator(Ptr<ISparseOptFlowEstimator> val) { optFlowEstimator_ = val; }\n    Ptr<ISparseOptFlowEstimator> opticalFlowEstimator() const { return optFlowEstimator_; }\n\n    void setOutlierRejector(Ptr<IOutlierRejector> val) { outlierRejector_ = val; }\n    Ptr<IOutlierRejector> outlierRejector() const { return outlierRejector_; }\n\n    virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0);\n\nprivate:\n    Ptr<MotionEstimatorBase> motionEstimator_;\n    Ptr<FeatureDetector> detector_;\n    Ptr<ISparseOptFlowEstimator> optFlowEstimator_;\n    Ptr<IOutlierRejector> outlierRejector_;\n\n    std::vector<uchar> status_;\n    std::vector<KeyPoint> keypointsPrev_;\n    std::vector<Point2f> pointsPrev_, points_;\n    std::vector<Point2f> pointsPrevGood_, pointsGood_;\n};\n\n#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDAOPTFLOW)\n\nclass CV_EXPORTS KeypointBasedMotionEstimatorGpu : public ImageMotionEstimatorBase\n{\npublic:\n    KeypointBasedMotionEstimatorGpu(Ptr<MotionEstimatorBase> estimator);\n\n    virtual void setMotionModel(MotionModel val) { motionEstimator_->setMotionModel(val); }\n    virtual MotionModel motionModel() const { return motionEstimator_->motionModel(); }\n\n    void setOutlierRejector(Ptr<IOutlierRejector> val) { outlierRejector_ = val; }\n    Ptr<IOutlierRejector> outlierRejector() const { return outlierRejector_; }\n\n    virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0);\n    Mat estimate(const cuda::GpuMat &frame0, const cuda::GpuMat &frame1, bool *ok = 0);\n\nprivate:\n    Ptr<MotionEstimatorBase> motionEstimator_;\n    Ptr<cuda::CornersDetector> detector_;\n    SparsePyrLkOptFlowEstimatorGpu optFlowEstimator_;\n    Ptr<IOutlierRejector> outlierRejector_;\n\n    cuda::GpuMat frame0_, grayFrame0_, frame1_;\n    cuda::GpuMat pointsPrev_, points_;\n    cuda::GpuMat status_;\n\n    Mat hostPointsPrev_, hostPoints_;\n    std::vector<Point2f> hostPointsPrevTmp_, hostPointsTmp_;\n    std::vector<uchar> rejectionStatus_;\n};\n\n#endif // defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDAOPTFLOW)\n\n/** @brief Computes motion between two frames assuming that all the intermediate motions are known.\n\n@param from Source frame index.\n@param to Destination frame index.\n@param motions Pair-wise motions. motions[i] denotes motion from the frame i to the frame i+1\n@return Motion from the frame from to the frame to.\n */\nCV_EXPORTS Mat getMotion(int from, int to, const std::vector<Mat> &motions);\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/inpainting.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_INPAINTINT_HPP__\n#define __OPENCV_VIDEOSTAB_INPAINTINT_HPP__\n\n#include <vector>\n#include \"opencv2/core.hpp\"\n#include \"opencv2/videostab/optical_flow.hpp\"\n#include \"opencv2/videostab/fast_marching.hpp\"\n#include \"opencv2/videostab/global_motion.hpp\"\n#include \"opencv2/photo.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab\n//! @{\n\nclass CV_EXPORTS InpainterBase\n{\npublic:\n    InpainterBase()\n        : radius_(0), motionModel_(MM_UNKNOWN), frames_(0), motions_(0),\n          stabilizedFrames_(0), stabilizationMotions_(0) {}\n\n    virtual ~InpainterBase() {}\n\n    virtual void setRadius(int val) { radius_ = val; }\n    virtual int radius() const { return radius_; }\n\n    virtual void setMotionModel(MotionModel val) { motionModel_ = val; }\n    virtual MotionModel motionModel() const { return motionModel_; }\n\n    virtual void inpaint(int idx, Mat &frame, Mat &mask) = 0;\n\n\n    // data from stabilizer\n\n    virtual void setFrames(const std::vector<Mat> &val) { frames_ = &val; }\n    virtual const std::vector<Mat>& frames() const { return *frames_; }\n\n    virtual void setMotions(const std::vector<Mat> &val) { motions_ = &val; }\n    virtual const std::vector<Mat>& motions() const { return *motions_; }\n\n    virtual void setStabilizedFrames(const std::vector<Mat> &val) { stabilizedFrames_ = &val; }\n    virtual const std::vector<Mat>& stabilizedFrames() const { return *stabilizedFrames_; }\n\n    virtual void setStabilizationMotions(const std::vector<Mat> &val) { stabilizationMotions_ = &val; }\n    virtual const std::vector<Mat>& stabilizationMotions() const { return *stabilizationMotions_; }\n\nprotected:\n    int radius_;\n    MotionModel motionModel_;\n    const std::vector<Mat> *frames_;\n    const std::vector<Mat> *motions_;\n    const std::vector<Mat> *stabilizedFrames_;\n    const std::vector<Mat> *stabilizationMotions_;\n};\n\nclass CV_EXPORTS NullInpainter : public InpainterBase\n{\npublic:\n    virtual void inpaint(int /*idx*/, Mat &/*frame*/, Mat &/*mask*/) {}\n};\n\nclass CV_EXPORTS InpaintingPipeline : public InpainterBase\n{\npublic:\n    void pushBack(Ptr<InpainterBase> inpainter) { inpainters_.push_back(inpainter); }\n    bool empty() const { return inpainters_.empty(); }\n\n    virtual void setRadius(int val);\n    virtual void setMotionModel(MotionModel val);\n    virtual void setFrames(const std::vector<Mat> &val);\n    virtual void setMotions(const std::vector<Mat> &val);\n    virtual void setStabilizedFrames(const std::vector<Mat> &val);\n    virtual void setStabilizationMotions(const std::vector<Mat> &val);\n\n    virtual void inpaint(int idx, Mat &frame, Mat &mask);\n\nprivate:\n    std::vector<Ptr<InpainterBase> > inpainters_;\n};\n\nclass CV_EXPORTS ConsistentMosaicInpainter : public InpainterBase\n{\npublic:\n    ConsistentMosaicInpainter();\n\n    void setStdevThresh(float val) { stdevThresh_ = val; }\n    float stdevThresh() const { return stdevThresh_; }\n\n    virtual void inpaint(int idx, Mat &frame, Mat &mask);\n\nprivate:\n    float stdevThresh_;\n};\n\nclass CV_EXPORTS MotionInpainter : public InpainterBase\n{\npublic:\n    MotionInpainter();\n\n    void setOptFlowEstimator(Ptr<IDenseOptFlowEstimator> val) { optFlowEstimator_ = val; }\n    Ptr<IDenseOptFlowEstimator> optFlowEstimator() const { return optFlowEstimator_; }\n\n    void setFlowErrorThreshold(float val) { flowErrorThreshold_ = val; }\n    float flowErrorThreshold() const { return flowErrorThreshold_; }\n\n    void setDistThreshold(float val) { distThresh_ = val; }\n    float distThresh() const { return distThresh_; }\n\n    void setBorderMode(int val) { borderMode_ = val; }\n    int borderMode() const { return borderMode_; }\n\n    virtual void inpaint(int idx, Mat &frame, Mat &mask);\n\nprivate:\n    FastMarchingMethod fmm_;\n    Ptr<IDenseOptFlowEstimator> optFlowEstimator_;\n    float flowErrorThreshold_;\n    float distThresh_;\n    int borderMode_;\n\n    Mat frame1_, transformedFrame1_;\n    Mat_<uchar> grayFrame_, transformedGrayFrame1_;\n    Mat_<uchar> mask1_, transformedMask1_;\n    Mat_<float> flowX_, flowY_, flowErrors_;\n    Mat_<uchar> flowMask_;\n};\n\nclass CV_EXPORTS ColorAverageInpainter : public InpainterBase\n{\npublic:\n    virtual void inpaint(int idx, Mat &frame, Mat &mask);\n\nprivate:\n    FastMarchingMethod fmm_;\n};\n\nclass CV_EXPORTS ColorInpainter : public InpainterBase\n{\npublic:\n    ColorInpainter(int method = INPAINT_TELEA, double radius = 2.);\n\n    virtual void inpaint(int idx, Mat &frame, Mat &mask);\n\nprivate:\n    int method_;\n    double radius_;\n    Mat invMask_;\n};\n\ninline ColorInpainter::ColorInpainter(int _method, double _radius)\n        : method_(_method), radius_(_radius) {}\n\nCV_EXPORTS void calcFlowMask(\n        const Mat &flowX, const Mat &flowY, const Mat &errors, float maxError,\n        const Mat &mask0, const Mat &mask1, Mat &flowMask);\n\nCV_EXPORTS void completeFrameAccordingToFlow(\n        const Mat &flowMask, const Mat &flowX, const Mat &flowY, const Mat &frame1, const Mat &mask1,\n        float distThresh, Mat& frame0, Mat &mask0);\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/log.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_LOG_HPP__\n#define __OPENCV_VIDEOSTAB_LOG_HPP__\n\n#include \"opencv2/core.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab\n//! @{\n\nclass CV_EXPORTS ILog\n{\npublic:\n    virtual ~ILog() {}\n    virtual void print(const char *format, ...) = 0;\n};\n\nclass CV_EXPORTS NullLog : public ILog\n{\npublic:\n    virtual void print(const char * /*format*/, ...) {}\n};\n\nclass CV_EXPORTS LogToStdout : public ILog\n{\npublic:\n    virtual void print(const char *format, ...);\n};\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/motion_core.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_MOTION_CORE_HPP__\n#define __OPENCV_VIDEOSTAB_MOTION_CORE_HPP__\n\n#include <cmath>\n#include \"opencv2/core.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab_motion\n//! @{\n\n/** @brief Describes motion model between two point clouds.\n */\nenum MotionModel\n{\n    MM_TRANSLATION = 0,\n    MM_TRANSLATION_AND_SCALE = 1,\n    MM_ROTATION = 2,\n    MM_RIGID = 3,\n    MM_SIMILARITY = 4,\n    MM_AFFINE = 5,\n    MM_HOMOGRAPHY = 6,\n    MM_UNKNOWN = 7\n};\n\n/** @brief Describes RANSAC method parameters.\n */\nstruct CV_EXPORTS RansacParams\n{\n    int size; //!< subset size\n    float thresh; //!< max error to classify as inlier\n    float eps; //!< max outliers ratio\n    float prob; //!< probability of success\n\n    RansacParams() : size(0), thresh(0), eps(0), prob(0) {}\n    /** @brief Constructor\n    @param size Subset size.\n    @param thresh Maximum re-projection error value to classify as inlier.\n    @param eps Maximum ratio of incorrect correspondences.\n    @param prob Required success probability.\n     */\n    RansacParams(int size, float thresh, float eps, float prob);\n\n    /**\n    @return Number of iterations that'll be performed by RANSAC method.\n    */\n    int niters() const\n    {\n        return static_cast<int>(\n                std::ceil(std::log(1 - prob) / std::log(1 - std::pow(1 - eps, size))));\n    }\n\n    /**\n    @param model Motion model. See cv::videostab::MotionModel.\n    @return Default RANSAC method parameters for the given motion model.\n    */\n    static RansacParams default2dMotion(MotionModel model)\n    {\n        CV_Assert(model < MM_UNKNOWN);\n        if (model == MM_TRANSLATION)\n            return RansacParams(1, 0.5f, 0.5f, 0.99f);\n        if (model == MM_TRANSLATION_AND_SCALE)\n            return RansacParams(2, 0.5f, 0.5f, 0.99f);\n        if (model == MM_ROTATION)\n            return RansacParams(1, 0.5f, 0.5f, 0.99f);\n        if (model == MM_RIGID)\n            return RansacParams(2, 0.5f, 0.5f, 0.99f);\n        if (model == MM_SIMILARITY)\n            return RansacParams(2, 0.5f, 0.5f, 0.99f);\n        if (model == MM_AFFINE)\n            return RansacParams(3, 0.5f, 0.5f, 0.99f);\n        return RansacParams(4, 0.5f, 0.5f, 0.99f);\n    }\n};\n\ninline RansacParams::RansacParams(int _size, float _thresh, float _eps, float _prob)\n    : size(_size), thresh(_thresh), eps(_eps), prob(_prob) {}\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/motion_stabilizing.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_MOTION_STABILIZING_HPP__\n#define __OPENCV_VIDEOSTAB_MOTION_STABILIZING_HPP__\n\n#include <vector>\n#include <utility>\n#include \"opencv2/core.hpp\"\n#include \"opencv2/videostab/global_motion.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab_motion\n//! @{\n\nclass CV_EXPORTS IMotionStabilizer\n{\npublic:\n    virtual ~IMotionStabilizer() {}\n\n    //! assumes that [0, size-1) is in or equals to [range.first, range.second)\n    virtual void stabilize(\n            int size, const std::vector<Mat> &motions, std::pair<int,int> range,\n            Mat *stabilizationMotions) = 0;\n};\n\nclass CV_EXPORTS MotionStabilizationPipeline : public IMotionStabilizer\n{\npublic:\n    void pushBack(Ptr<IMotionStabilizer> stabilizer) { stabilizers_.push_back(stabilizer); }\n    bool empty() const { return stabilizers_.empty(); }\n\n    virtual void stabilize(\n            int size, const std::vector<Mat> &motions, std::pair<int,int> range,\n            Mat *stabilizationMotions);\n\nprivate:\n    std::vector<Ptr<IMotionStabilizer> > stabilizers_;\n};\n\nclass CV_EXPORTS MotionFilterBase : public IMotionStabilizer\n{\npublic:\n    virtual ~MotionFilterBase() {}\n\n    virtual Mat stabilize(\n            int idx, const std::vector<Mat> &motions, std::pair<int,int> range) = 0;\n\n    virtual void stabilize(\n            int size, const std::vector<Mat> &motions, std::pair<int,int> range,\n            Mat *stabilizationMotions);\n};\n\nclass CV_EXPORTS GaussianMotionFilter : public MotionFilterBase\n{\npublic:\n    GaussianMotionFilter(int radius = 15, float stdev = -1.f);\n\n    void setParams(int radius, float stdev = -1.f);\n    int radius() const { return radius_; }\n    float stdev() const { return stdev_; }\n\n    virtual Mat stabilize(\n            int idx, const std::vector<Mat> &motions, std::pair<int,int> range);\n\nprivate:\n    int radius_;\n    float stdev_;\n    std::vector<float> weight_;\n};\n\ninline GaussianMotionFilter::GaussianMotionFilter(int _radius, float _stdev) { setParams(_radius, _stdev); }\n\nclass CV_EXPORTS LpMotionStabilizer : public IMotionStabilizer\n{\npublic:\n    LpMotionStabilizer(MotionModel model = MM_SIMILARITY);\n\n    void setMotionModel(MotionModel val) { model_ = val; }\n    MotionModel motionModel() const { return model_; }\n\n    void setFrameSize(Size val) { frameSize_ = val; }\n    Size frameSize() const { return frameSize_; }\n\n    void setTrimRatio(float val) { trimRatio_ = val; }\n    float trimRatio() const { return trimRatio_; }\n\n    void setWeight1(float val) { w1_ = val; }\n    float weight1() const { return w1_; }\n\n    void setWeight2(float val) { w2_ = val; }\n    float weight2() const { return w2_; }\n\n    void setWeight3(float val) { w3_ = val; }\n    float weight3() const { return w3_; }\n\n    void setWeight4(float val) { w4_ = val; }\n    float weight4() const { return w4_; }\n\n    virtual void stabilize(\n            int size, const std::vector<Mat> &motions, std::pair<int,int> range,\n            Mat *stabilizationMotions);\n\nprivate:\n    MotionModel model_;\n    Size frameSize_;\n    float trimRatio_;\n    float w1_, w2_, w3_, w4_;\n\n    std::vector<double> obj_, collb_, colub_;\n    std::vector<int> rows_, cols_;\n    std::vector<double> elems_, rowlb_, rowub_;\n\n    void set(int row, int col, double coef)\n    {\n        rows_.push_back(row);\n        cols_.push_back(col);\n        elems_.push_back(coef);\n    }\n};\n\nCV_EXPORTS Mat ensureInclusionConstraint(const Mat &M, Size size, float trimRatio);\n\nCV_EXPORTS float estimateOptimalTrimRatio(const Mat &M, Size size);\n\n//! @}\n\n} // namespace videostab\n} // namespace\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/optical_flow.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_OPTICAL_FLOW_HPP__\n#define __OPENCV_VIDEOSTAB_OPTICAL_FLOW_HPP__\n\n#include \"opencv2/core.hpp\"\n#include \"opencv2/opencv_modules.hpp\"\n\n#ifdef HAVE_OPENCV_CUDAOPTFLOW\n  #include \"opencv2/cudaoptflow.hpp\"\n#endif\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab\n//! @{\n\nclass CV_EXPORTS ISparseOptFlowEstimator\n{\npublic:\n    virtual ~ISparseOptFlowEstimator() {}\n    virtual void run(\n            InputArray frame0, InputArray frame1, InputArray points0, InputOutputArray points1,\n            OutputArray status, OutputArray errors) = 0;\n};\n\nclass CV_EXPORTS IDenseOptFlowEstimator\n{\npublic:\n    virtual ~IDenseOptFlowEstimator() {}\n    virtual void run(\n            InputArray frame0, InputArray frame1, InputOutputArray flowX, InputOutputArray flowY,\n            OutputArray errors) = 0;\n};\n\nclass CV_EXPORTS PyrLkOptFlowEstimatorBase\n{\npublic:\n    PyrLkOptFlowEstimatorBase() { setWinSize(Size(21, 21)); setMaxLevel(3); }\n\n    virtual void setWinSize(Size val) { winSize_ = val; }\n    virtual Size winSize() const { return winSize_; }\n\n    virtual void setMaxLevel(int val) { maxLevel_ = val; }\n    virtual int maxLevel() const { return maxLevel_; }\n    virtual ~PyrLkOptFlowEstimatorBase() {}\n\nprotected:\n    Size winSize_;\n    int maxLevel_;\n};\n\nclass CV_EXPORTS SparsePyrLkOptFlowEstimator\n        : public PyrLkOptFlowEstimatorBase, public ISparseOptFlowEstimator\n{\npublic:\n    virtual void run(\n            InputArray frame0, InputArray frame1, InputArray points0, InputOutputArray points1,\n            OutputArray status, OutputArray errors);\n};\n\n#ifdef HAVE_OPENCV_CUDAOPTFLOW\n\nclass CV_EXPORTS SparsePyrLkOptFlowEstimatorGpu\n        : public PyrLkOptFlowEstimatorBase, public ISparseOptFlowEstimator\n{\npublic:\n    SparsePyrLkOptFlowEstimatorGpu();\n\n    virtual void run(\n            InputArray frame0, InputArray frame1, InputArray points0, InputOutputArray points1,\n            OutputArray status, OutputArray errors);\n\n    void run(const cuda::GpuMat &frame0, const cuda::GpuMat &frame1, const cuda::GpuMat &points0, cuda::GpuMat &points1,\n             cuda::GpuMat &status, cuda::GpuMat &errors);\n\n    void run(const cuda::GpuMat &frame0, const cuda::GpuMat &frame1, const cuda::GpuMat &points0, cuda::GpuMat &points1,\n             cuda::GpuMat &status);\n\nprivate:\n    Ptr<cuda::SparsePyrLKOpticalFlow> optFlowEstimator_;\n    cuda::GpuMat frame0_, frame1_, points0_, points1_, status_, errors_;\n};\n\nclass CV_EXPORTS DensePyrLkOptFlowEstimatorGpu\n        : public PyrLkOptFlowEstimatorBase, public IDenseOptFlowEstimator\n{\npublic:\n    DensePyrLkOptFlowEstimatorGpu();\n\n    virtual void run(\n            InputArray frame0, InputArray frame1, InputOutputArray flowX, InputOutputArray flowY,\n            OutputArray errors);\n\nprivate:\n    Ptr<cuda::DensePyrLKOpticalFlow> optFlowEstimator_;\n    cuda::GpuMat frame0_, frame1_, flowX_, flowY_, errors_;\n};\n\n#endif\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/outlier_rejection.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_OUTLIER_REJECTION_HPP__\n#define __OPENCV_VIDEOSTAB_OUTLIER_REJECTION_HPP__\n\n#include <vector>\n#include \"opencv2/core.hpp\"\n#include \"opencv2/videostab/motion_core.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab\n//! @{\n\nclass CV_EXPORTS IOutlierRejector\n{\npublic:\n    virtual ~IOutlierRejector() {}\n\n    virtual void process(\n            Size frameSize, InputArray points0, InputArray points1, OutputArray mask) = 0;\n};\n\nclass CV_EXPORTS NullOutlierRejector : public IOutlierRejector\n{\npublic:\n    virtual void process(\n            Size frameSize, InputArray points0, InputArray points1, OutputArray mask);\n};\n\nclass CV_EXPORTS TranslationBasedLocalOutlierRejector : public IOutlierRejector\n{\npublic:\n    TranslationBasedLocalOutlierRejector();\n\n    void setCellSize(Size val) { cellSize_ = val; }\n    Size cellSize() const { return cellSize_; }\n\n    void setRansacParams(RansacParams val) { ransacParams_ = val; }\n    RansacParams ransacParams() const { return ransacParams_; }\n\n    virtual void process(\n            Size frameSize, InputArray points0, InputArray points1, OutputArray mask);\n\nprivate:\n    Size cellSize_;\n    RansacParams ransacParams_;\n\n    typedef std::vector<int> Cell;\n    std::vector<Cell> grid_;\n};\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/ring_buffer.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_RING_BUFFER_HPP__\n#define __OPENCV_VIDEOSTAB_RING_BUFFER_HPP__\n\n#include <vector>\n#include \"opencv2/imgproc.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab\n//! @{\n\ntemplate <typename T> inline T& at(int idx, std::vector<T> &items)\n{\n    return items[cv::borderInterpolate(idx, static_cast<int>(items.size()), cv::BORDER_WRAP)];\n}\n\ntemplate <typename T> inline const T& at(int idx, const std::vector<T> &items)\n{\n    return items[cv::borderInterpolate(idx, static_cast<int>(items.size()), cv::BORDER_WRAP)];\n}\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/stabilizer.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_STABILIZER_HPP__\n#define __OPENCV_VIDEOSTAB_STABILIZER_HPP__\n\n#include <vector>\n#include <ctime>\n#include \"opencv2/core.hpp\"\n#include \"opencv2/imgproc.hpp\"\n#include \"opencv2/videostab/global_motion.hpp\"\n#include \"opencv2/videostab/motion_stabilizing.hpp\"\n#include \"opencv2/videostab/frame_source.hpp\"\n#include \"opencv2/videostab/log.hpp\"\n#include \"opencv2/videostab/inpainting.hpp\"\n#include \"opencv2/videostab/deblurring.hpp\"\n#include \"opencv2/videostab/wobble_suppression.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab\n//! @{\n\nclass CV_EXPORTS StabilizerBase\n{\npublic:\n    virtual ~StabilizerBase() {}\n\n    void setLog(Ptr<ILog> ilog) { log_ = ilog; }\n    Ptr<ILog> log() const { return log_; }\n\n    void setRadius(int val) { radius_ = val; }\n    int radius() const { return radius_; }\n\n    void setFrameSource(Ptr<IFrameSource> val) { frameSource_ = val; }\n    Ptr<IFrameSource> frameSource() const { return frameSource_; }\n\n    void setMotionEstimator(Ptr<ImageMotionEstimatorBase> val) { motionEstimator_ = val; }\n    Ptr<ImageMotionEstimatorBase> motionEstimator() const { return motionEstimator_; }\n\n    void setDeblurer(Ptr<DeblurerBase> val) { deblurer_ = val; }\n    Ptr<DeblurerBase> deblurrer() const { return deblurer_; }\n\n    void setTrimRatio(float val) { trimRatio_ = val; }\n    float trimRatio() const { return trimRatio_; }\n\n    void setCorrectionForInclusion(bool val) { doCorrectionForInclusion_ = val; }\n    bool doCorrectionForInclusion() const { return doCorrectionForInclusion_; }\n\n    void setBorderMode(int val) { borderMode_ = val; }\n    int borderMode() const { return borderMode_; }\n\n    void setInpainter(Ptr<InpainterBase> val) { inpainter_ = val; }\n    Ptr<InpainterBase> inpainter() const { return inpainter_; }\n\nprotected:\n    StabilizerBase();\n\n    void reset();\n    Mat nextStabilizedFrame();\n    bool doOneIteration();\n    virtual void setUp(const Mat &firstFrame);\n    virtual Mat estimateMotion() = 0;\n    virtual Mat estimateStabilizationMotion() = 0;\n    void stabilizeFrame();\n    virtual Mat postProcessFrame(const Mat &frame);\n    void logProcessingTime();\n\n    Ptr<ILog> log_;\n    Ptr<IFrameSource> frameSource_;\n    Ptr<ImageMotionEstimatorBase> motionEstimator_;\n    Ptr<DeblurerBase> deblurer_;\n    Ptr<InpainterBase> inpainter_;\n    int radius_;\n    float trimRatio_;\n    bool doCorrectionForInclusion_;\n    int borderMode_;\n\n    Size frameSize_;\n    Mat frameMask_;\n    int curPos_;\n    int curStabilizedPos_;\n    bool doDeblurring_;\n    Mat preProcessedFrame_;\n    bool doInpainting_;\n    Mat inpaintingMask_;\n    Mat finalFrame_;\n    std::vector<Mat> frames_;\n    std::vector<Mat> motions_; // motions_[i] is the motion from i-th to i+1-th frame\n    std::vector<float> blurrinessRates_;\n    std::vector<Mat> stabilizedFrames_;\n    std::vector<Mat> stabilizedMasks_;\n    std::vector<Mat> stabilizationMotions_;\n    clock_t processingStartTime_;\n};\n\nclass CV_EXPORTS OnePassStabilizer : public StabilizerBase, public IFrameSource\n{\npublic:\n    OnePassStabilizer();\n\n    void setMotionFilter(Ptr<MotionFilterBase> val) { motionFilter_ = val; }\n    Ptr<MotionFilterBase> motionFilter() const { return motionFilter_; }\n\n    virtual void reset();\n    virtual Mat nextFrame() { return nextStabilizedFrame(); }\n\nprotected:\n    virtual void setUp(const Mat &firstFrame);\n    virtual Mat estimateMotion();\n    virtual Mat estimateStabilizationMotion();\n    virtual Mat postProcessFrame(const Mat &frame);\n\n    Ptr<MotionFilterBase> motionFilter_;\n};\n\nclass CV_EXPORTS TwoPassStabilizer : public StabilizerBase, public IFrameSource\n{\npublic:\n    TwoPassStabilizer();\n\n    void setMotionStabilizer(Ptr<IMotionStabilizer> val) { motionStabilizer_ = val; }\n    Ptr<IMotionStabilizer> motionStabilizer() const { return motionStabilizer_; }\n\n    void setWobbleSuppressor(Ptr<WobbleSuppressorBase> val) { wobbleSuppressor_ = val; }\n    Ptr<WobbleSuppressorBase> wobbleSuppressor() const { return wobbleSuppressor_; }\n\n    void setEstimateTrimRatio(bool val) { mustEstTrimRatio_ = val; }\n    bool mustEstimateTrimaRatio() const { return mustEstTrimRatio_; }\n\n    virtual void reset();\n    virtual Mat nextFrame();\n\nprotected:\n    void runPrePassIfNecessary();\n\n    virtual void setUp(const Mat &firstFrame);\n    virtual Mat estimateMotion();\n    virtual Mat estimateStabilizationMotion();\n    virtual Mat postProcessFrame(const Mat &frame);\n\n    Ptr<IMotionStabilizer> motionStabilizer_;\n    Ptr<WobbleSuppressorBase> wobbleSuppressor_;\n    bool mustEstTrimRatio_;\n\n    int frameCount_;\n    bool isPrePassDone_;\n    bool doWobbleSuppression_;\n    std::vector<Mat> motions2_;\n    Mat suppressedFrame_;\n};\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab/wobble_suppression.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_WOBBLE_SUPPRESSION_HPP__\n#define __OPENCV_VIDEOSTAB_WOBBLE_SUPPRESSION_HPP__\n\n#include <vector>\n#include \"opencv2/core.hpp\"\n#include \"opencv2/core/cuda.hpp\"\n#include \"opencv2/videostab/global_motion.hpp\"\n#include \"opencv2/videostab/log.hpp\"\n\nnamespace cv\n{\nnamespace videostab\n{\n\n//! @addtogroup videostab\n//! @{\n\nclass CV_EXPORTS WobbleSuppressorBase\n{\npublic:\n    WobbleSuppressorBase();\n\n    virtual ~WobbleSuppressorBase() {}\n\n    void setMotionEstimator(Ptr<ImageMotionEstimatorBase> val) { motionEstimator_ = val; }\n    Ptr<ImageMotionEstimatorBase> motionEstimator() const { return motionEstimator_; }\n\n    virtual void suppress(int idx, const Mat &frame, Mat &result) = 0;\n\n\n    // data from stabilizer\n\n    virtual void setFrameCount(int val) { frameCount_ = val; }\n    virtual int frameCount() const { return frameCount_; }\n\n    virtual void setMotions(const std::vector<Mat> &val) { motions_ = &val; }\n    virtual const std::vector<Mat>& motions() const { return *motions_; }\n\n    virtual void setMotions2(const std::vector<Mat> &val) { motions2_ = &val; }\n    virtual const std::vector<Mat>& motions2() const { return *motions2_; }\n\n    virtual void setStabilizationMotions(const std::vector<Mat> &val) { stabilizationMotions_ = &val; }\n    virtual const std::vector<Mat>& stabilizationMotions() const { return *stabilizationMotions_; }\n\nprotected:\n    Ptr<ImageMotionEstimatorBase> motionEstimator_;\n    int frameCount_;\n    const std::vector<Mat> *motions_;\n    const std::vector<Mat> *motions2_;\n    const std::vector<Mat> *stabilizationMotions_;\n};\n\nclass CV_EXPORTS NullWobbleSuppressor : public WobbleSuppressorBase\n{\npublic:\n    virtual void suppress(int idx, const Mat &frame, Mat &result);\n};\n\nclass CV_EXPORTS MoreAccurateMotionWobbleSuppressorBase : public WobbleSuppressorBase\n{\npublic:\n    virtual void setPeriod(int val) { period_ = val; }\n    virtual int period() const { return period_; }\n\nprotected:\n    MoreAccurateMotionWobbleSuppressorBase() { setPeriod(30); }\n\n    int period_;\n};\n\nclass CV_EXPORTS MoreAccurateMotionWobbleSuppressor : public MoreAccurateMotionWobbleSuppressorBase\n{\npublic:\n    virtual void suppress(int idx, const Mat &frame, Mat &result);\n\nprivate:\n    Mat_<float> mapx_, mapy_;\n};\n\n#if defined(HAVE_OPENCV_CUDAWARPING)\nclass CV_EXPORTS MoreAccurateMotionWobbleSuppressorGpu : public MoreAccurateMotionWobbleSuppressorBase\n{\npublic:\n    void suppress(int idx, const cuda::GpuMat &frame, cuda::GpuMat &result);\n    virtual void suppress(int idx, const Mat &frame, Mat &result);\n\nprivate:\n    cuda::GpuMat frameDevice_, resultDevice_;\n    cuda::GpuMat mapx_, mapy_;\n};\n#endif\n\n//! @}\n\n} // namespace videostab\n} // namespace cv\n\n#endif\n"
  },
  {
    "path": "opencv/install/WP/8.0/ARM/include/opencv2/videostab.hpp",
    "content": "/*M///////////////////////////////////////////////////////////////////////////////////////\n//\n//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n//\n//  By downloading, copying, installing or using the software you agree to this license.\n//  If you do not agree to this license, do not download, install,\n//  copy or use the software.\n//\n//\n//                           License Agreement\n//                For Open Source Computer Vision Library\n//\n// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.\n// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.\n// Third party copyrights are property of their respective owners.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are met:\n//\n//   * Redistribution's of source code must retain the above copyright notice,\n//     this list of conditions and the following disclaimer.\n//\n//   * Redistribution's 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//   * The name of the copyright holders may not be used to endorse or promote products\n//     derived from this software without specific prior written permission.\n//\n// This software is provided by the copyright holders and contributors \"as is\" and\n// any express or implied warranties, including, but not limited to, the implied\n// warranties of merchantability and fitness for a particular purpose are disclaimed.\n// In no event shall the Intel Corporation or contributors be liable for any direct,\n// indirect, incidental, special, exemplary, or consequential damages\n// (including, but not limited to, procurement of substitute goods or services;\n// loss of use, data, or profits; or business interruption) however caused\n// and on any theory of liability, whether in contract, strict liability,\n// or tort (including negligence or otherwise) arising in any way out of\n// the use of this software, even if advised of the possibility of such damage.\n//\n//M*/\n\n#ifndef __OPENCV_VIDEOSTAB_HPP__\n#define __OPENCV_VIDEOSTAB_HPP__\n\n/**\n  @defgroup videostab Video Stabilization\n\nThe video stabilization module contains a set of functions and classes that can be used to solve the\nproblem of video stabilization. There are a few methods implemented, most of them are descibed in\nthe papers @cite OF06 and @cite G11 . However, there are some extensions and deviations from the orginal\npaper methods.\n\n### References\n\n 1. \"Full-Frame Video Stabilization with Motion Inpainting\"\n     Yasuyuki Matsushita, Eyal Ofek, Weina Ge, Xiaoou Tang, Senior Member, and Heung-Yeung Shum\n 2. \"Auto-Directed Video Stabilization with Robust L1 Optimal Camera Paths\"\n     Matthias Grundmann, Vivek Kwatra, Irfan Essa\n\n     @{\n         @defgroup videostab_motion Global Motion Estimation\n\nThe video stabilization module contains a set of functions and classes for global motion estimation\nbetween point clouds or between images. In the last case features are extracted and matched\ninternally. For the sake of convenience the motion estimation functions are wrapped into classes.\nBoth the functions and the classes are available.\n\n         @defgroup videostab_marching Fast Marching Method\n\nThe Fast Marching Method @cite Telea04 is used in of the video stabilization routines to do motion and\ncolor inpainting. The method is implemented is a flexible way and it's made public for other users.\n\n     @}\n\n*/\n\n#include \"opencv2/videostab/stabilizer.hpp\"\n#include \"opencv2/videostab/ring_buffer.hpp\"\n\n#endif\n"
  }
]